@hhgtech/hhg-components 1.29.111 → 1.29.113

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 (502) hide show
  1. package/build/{LastPeriod-d16c1ea8.js → LastPeriod-e88f3e57.js} +1 -1
  2. package/build/{MobileBottomNavigationIcon-d0bc3fac.js → MobileBottomNavigationIcon-fbef7bdd.js} +3 -3
  3. package/build/{Spinner-8a698498.js → Spinner-f673b78b.js} +1 -1
  4. package/build/{WhatsApp-f783bf8f.js → WhatsApp-a8ef7d55.js} +1 -1
  5. package/build/adapters.js +19 -18
  6. package/build/atoms.js +46 -45
  7. package/build/babyGrowth.js +83 -82
  8. package/build/cache.js +2 -2
  9. package/build/care.js +17 -17
  10. package/build/careBookingSearchBar.js +14 -14
  11. package/build/careBookingSearchBarV2.js +15 -15
  12. package/build/components/mantine/index.d.ts +1 -0
  13. package/build/components/mantine/provider/notifications/icons.d.ts +5 -0
  14. package/build/components/mantine/provider/notifications/index.d.ts +6 -0
  15. package/build/components/organisms/navigationProfileButton/index.d.ts +1 -2
  16. package/build/components.js +91 -88
  17. package/build/{constants-bda3fd86.js → constants-ab163ec3.js} +1 -1
  18. package/build/constants.js +4 -3
  19. package/build/constantsDomainLocales.js +1 -1
  20. package/build/constantsRiskScreener.js +2 -2
  21. package/build/constantsSite.js +2 -2
  22. package/build/{core-cba930f7.js → core-db929265.js} +1 -1
  23. package/build/{dataTransform-837b8411.js → dataTransform-83c20f5b.js} +1 -1
  24. package/build/ecom.js +4 -4
  25. package/build/{editor-42ef0b82.js → editor-11307b90.js} +11 -11
  26. package/build/embeddedHeathToolCards_babyGrowth.js +23 -22
  27. package/build/embeddedHeathToolCards_babyPoop.js +19 -18
  28. package/build/embeddedHeathToolCards_babyVaccine.js +22 -21
  29. package/build/embeddedHeathToolCards_bmi_bmi.js +26 -25
  30. package/build/embeddedHeathToolCards_bmrBmr.js +26 -25
  31. package/build/embeddedHeathToolCards_dueDate_dueDate.js +22 -21
  32. package/build/embeddedHeathToolCards_ovulation_ovulation.js +22 -21
  33. package/build/embeddedHeathToolCards_pwg_pwg.js +27 -26
  34. package/build/embeddedHeathToolCards_targetHeartRate.js +28 -27
  35. package/build/esm/{LastPeriod-6a71dddc.js → LastPeriod-fc2345b6.js} +1 -1
  36. package/build/esm/{MobileBottomNavigationIcon-3cfa4b14.js → MobileBottomNavigationIcon-3e7c99e8.js} +3 -3
  37. package/build/esm/{Spinner-5a0df635.js → Spinner-e9091392.js} +1 -1
  38. package/build/esm/{WhatsApp-def7f0e9.js → WhatsApp-9a585ede.js} +1 -1
  39. package/build/esm/adapters.js +19 -18
  40. package/build/esm/atoms.js +46 -45
  41. package/build/esm/babyGrowth.js +83 -82
  42. package/build/esm/cache.js +2 -2
  43. package/build/esm/care.js +17 -17
  44. package/build/esm/careBookingSearchBar.js +14 -14
  45. package/build/esm/careBookingSearchBarV2.js +15 -15
  46. package/build/esm/components/mantine/index.d.ts +1 -0
  47. package/build/esm/components/mantine/provider/notifications/icons.d.ts +5 -0
  48. package/build/esm/components/mantine/provider/notifications/index.d.ts +6 -0
  49. package/build/esm/components/organisms/navigationProfileButton/index.d.ts +1 -2
  50. package/build/esm/components.js +91 -88
  51. package/build/esm/{constants-03f8dbae.js → constants-acf69a0d.js} +1 -1
  52. package/build/esm/constants.js +3 -3
  53. package/build/esm/constantsDomainLocales.js +1 -1
  54. package/build/esm/constantsRiskScreener.js +2 -2
  55. package/build/esm/constantsSite.js +2 -2
  56. package/build/esm/{core-e8e5bd42.js → core-59eaab00.js} +1 -1
  57. package/build/esm/{dataTransform-6d013343.js → dataTransform-12716264.js} +1 -1
  58. package/build/esm/ecom.js +4 -4
  59. package/build/esm/{editor-99f55a70.js → editor-59767c68.js} +11 -11
  60. package/build/esm/embeddedHeathToolCards_babyGrowth.js +23 -22
  61. package/build/esm/embeddedHeathToolCards_babyPoop.js +19 -18
  62. package/build/esm/embeddedHeathToolCards_babyVaccine.js +22 -21
  63. package/build/esm/embeddedHeathToolCards_bmi_bmi.js +26 -25
  64. package/build/esm/embeddedHeathToolCards_bmrBmr.js +26 -25
  65. package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +22 -21
  66. package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +22 -21
  67. package/build/esm/embeddedHeathToolCards_pwg_pwg.js +27 -26
  68. package/build/esm/embeddedHeathToolCards_targetHeartRate.js +28 -27
  69. package/build/esm/{fixedBottomAdBlock-a2106963.js → fixedBottomAdBlock-88cd5c92.js} +22 -22
  70. package/build/esm/footer.js +21 -20
  71. package/build/esm/gAssets.js +2 -2
  72. package/build/esm/healthToolsCardWrapper.js +18 -17
  73. package/build/esm/healthToolsForm.js +34 -33
  74. package/build/esm/hooks.js +14 -14
  75. package/build/esm/i18n.js +2 -2
  76. package/build/esm/i18nV2.js +2 -2
  77. package/build/esm/{index-29c78f77.js → index-04812b3b.js} +15 -15
  78. package/build/esm/{index-8af36482.js → index-07624def.js} +3 -3
  79. package/build/esm/{index-2542c25d.js → index-07699578.js} +1 -1
  80. package/build/esm/{index-8d68eb39.js → index-0af5d653.js} +1 -1
  81. package/build/esm/{index-dbb54dad.js → index-0d31a2ea.js} +6 -6
  82. package/build/esm/{index-c94cfc7d.js → index-0ee94ac3.js} +2 -2
  83. package/build/esm/{index-df82f273.js → index-1111b49d.js} +2 -2
  84. package/build/esm/{index-a4e0d76f.js → index-12f42387.js} +1 -1
  85. package/build/esm/{index-02336dba.js → index-1babf601.js} +1 -1
  86. package/build/esm/{index-87acd8f7.js → index-1d30c0f4.js} +18 -18
  87. package/build/esm/{index-cb04f4e0.js → index-2228b676.js} +3 -3
  88. package/build/esm/{index-316277f8.js → index-22852c53.js} +3 -3
  89. package/build/esm/{index-061cf8ff.js → index-2dc7f46d.js} +13 -20
  90. package/build/esm/{index-9335ba57.js → index-2f36dac4.js} +15 -15
  91. package/build/esm/{index-1a32ef86.js → index-3dbfb5de.js} +14 -14
  92. package/build/esm/{index-6e166286.js → index-42e125f0.js} +19 -15
  93. package/build/esm/{index-fdc3a02f.js → index-48efcc43.js} +20 -20
  94. package/build/esm/{index-f10f1fb8.js → index-4d0f0219.js} +7 -7
  95. package/build/esm/{index-e20c7cb4.js → index-4ea5dd91.js} +6 -6
  96. package/build/esm/{index-3d912153.js → index-58c33209.js} +14 -14
  97. package/build/esm/{index-a1ac4405.js → index-59f60051.js} +1 -1
  98. package/build/esm/{index-d6d45316.js → index-6bcce8ae.js} +7 -7
  99. package/build/esm/{index-fc9567f0.js → index-70d624c6.js} +2 -2
  100. package/build/esm/{index-38efcc39.js → index-745f205b.js} +5 -3
  101. package/build/esm/{index-918e70f4.js → index-7590f44e.js} +16 -16
  102. package/build/esm/{index-e730899e.js → index-7fcdd2d6.js} +17 -17
  103. package/build/esm/{index-1dd59b40.js → index-876d9889.js} +16 -16
  104. package/build/esm/{index-d9197263.js → index-87b3acfa.js} +2 -2
  105. package/build/esm/{index-0251091e.js → index-8de6087d.js} +2 -2
  106. package/build/esm/{index-072a4c0b.js → index-8f1cc691.js} +2 -2
  107. package/build/esm/{index-a8815b22.js → index-96b98c10.js} +41 -32
  108. package/build/esm/{index-4bb6e69a.js → index-994165cc.js} +4 -4
  109. package/build/esm/{index-3fd32195.js → index-a53dae98.js} +2 -2
  110. package/build/esm/{index-8b5cf2b7.js → index-a8ca8563.js} +12 -12
  111. package/build/esm/{index-30ca84b5.js → index-a9fcc396.js} +2 -2
  112. package/build/esm/{index-ebc6c341.js → index-b9d3e9ee.js} +12 -12
  113. package/build/esm/{index-cb235b95.js → index-bb4654be.js} +3 -3
  114. package/build/esm/{index-d1b85eee.js → index-bbf929d1.js} +1 -1
  115. package/build/esm/{index-e900f7fc.js → index-c00f4799.js} +5 -5
  116. package/build/esm/{index-ad747da0.js → index-c3148516.js} +2 -2
  117. package/build/esm/{index-20e6a915.js → index-c6b18c0b.js} +23 -23
  118. package/build/esm/{index-e45c2db8.js → index-cdc8acb9.js} +1 -1
  119. package/build/esm/{index-2381e9de.js → index-d4c470e1.js} +6 -6
  120. package/build/esm/{index-93df7701.js → index-d796d768.js} +16 -16
  121. package/build/esm/{index-f2732541.js → index-da46a1f1.js} +1 -1
  122. package/build/esm/{index-cad3f20c.js → index-dee6dee5.js} +12 -12
  123. package/build/esm/{index-f5bca47f.js → index-e4c75815.js} +2 -2
  124. package/build/esm/{index-e43e6daf.js → index-e5494b1e.js} +1 -1
  125. package/build/esm/{index-9a05ab79.js → index-e59c8b7b.js} +21 -21
  126. package/build/esm/{index-edf5db37.js → index-e8abbb29.js} +14 -14
  127. package/build/esm/{index-5a54ed9b.js → index-ea1b6358.js} +3 -3
  128. package/build/esm/{index-a2b7c2e7.js → index-eebd4963.js} +19 -19
  129. package/build/esm/{index-96a59dd0.js → index-f099850d.js} +6 -6
  130. package/build/esm/{index-2a6c5203.js → index-febfb5b8.js} +12 -12
  131. package/build/esm/{index-83a8eee7.js → index-ff30ce31.js} +15 -15
  132. package/build/esm/{index-8e3e9da4.js → index-ff57703d.js} +5 -5
  133. package/build/esm/index.js +113 -110
  134. package/build/esm/{index.styles-9ffb84a3.js → index.styles-826b6cf4.js} +1 -1
  135. package/build/esm/interfaces/constants/index.d.ts +1 -0
  136. package/build/esm/{labelSorting-e862f3cb.js → labelSorting-f6db8f6a.js} +4 -4
  137. package/build/esm/lead.js +23 -22
  138. package/build/esm/{logoIcon-34e8fa76.js → logoIcon-f4e92a05.js} +2 -2
  139. package/build/esm/mantine.js +28 -25
  140. package/build/esm/misc.js +19 -18
  141. package/build/esm/miscGetDynamicHealthTool.js +5 -5
  142. package/build/esm/miscGetSocialList.js +8 -8
  143. package/build/esm/miscScreenSizeContext.js +1 -1
  144. package/build/esm/mobileBottomNavigation.js +5 -5
  145. package/build/esm/mobileBottomNavigationIcon.js +5 -5
  146. package/build/esm/molecules.js +68 -67
  147. package/build/esm/moleculesArticleCard.js +6 -6
  148. package/build/esm/moleculesArticleCardV2.js +16 -15
  149. package/build/esm/navigation.js +43 -40
  150. package/build/esm/navigationLogoutPopup.js +9 -9
  151. package/build/esm/navigationProfileButton.js +24 -23
  152. package/build/esm/onboardingV2.js +29 -28
  153. package/build/esm/organisms.js +47 -44
  154. package/build/esm/{post-3e244908.js → post-6f180e90.js} +2 -2
  155. package/build/esm/profileNavigation.js +20 -19
  156. package/build/esm/progressBar.js +1 -1
  157. package/build/esm/pwg.js +22 -21
  158. package/build/esm/ssoV2/api/email.d.ts +1 -1
  159. package/build/esm/ssoV2/api/index.d.ts +14 -11
  160. package/build/esm/ssoV2/api/paths.d.ts +4 -0
  161. package/build/esm/ssoV2/api/phone.d.ts +2 -0
  162. package/build/esm/ssoV2/api/zalo.d.ts +2 -0
  163. package/build/esm/ssoV2/index.d.ts +4 -1
  164. package/build/esm/ssoV2/popupWrapper/collectInfoTextPopup/index.d.ts +1 -1
  165. package/build/esm/ssoV2/popupWrapper/collectInfoTextPopup/modal.d.ts +2 -0
  166. package/build/esm/ssoV2/popupWrapper/confirmClosePopup.d.ts +6 -0
  167. package/build/esm/ssoV2/screens/otp.d.ts +3 -1
  168. package/build/esm/ssoV2/screens/passwordForgotEmail.d.ts +5 -0
  169. package/build/esm/ssoV2/screens/passwordForgotSetup/checkIcons.d.ts +4 -0
  170. package/build/esm/ssoV2/screens/setup/genderIcons.d.ts +3 -0
  171. package/build/esm/ssoV2/ssoStateManager/index.d.ts +2 -0
  172. package/build/esm/ssoV2/ssoStateManager/store.d.ts +9 -0
  173. package/build/esm/ssoV2/stepsManager/index.d.ts +8 -1
  174. package/build/esm/ssoV2.js +1256 -708
  175. package/build/esm/store-c39c07f1.js +12 -0
  176. package/build/esm/subot.js +31 -30
  177. package/build/esm/surveyOrPremiumBanner.js +30 -29
  178. package/build/esm/surveyQuestionCard.js +10 -10
  179. package/build/esm/{surveyThankyouCard-dda42736.js → surveyThankyouCard-6bd78f41.js} +5 -5
  180. package/build/esm/together.js +51 -50
  181. package/build/esm/togetherApiUtils.js +4 -4
  182. package/build/esm/togetherAtoms.js +31 -30
  183. package/build/esm/togetherComponentGlobalContext.js +4 -4
  184. package/build/esm/togetherMolecules.js +41 -40
  185. package/build/esm/togetherMoleculesCardAuthor.js +24 -24
  186. package/build/esm/togetherMoleculesPostImagePreview.js +11 -11
  187. package/build/esm/togetherMoleculesProfileDetail.js +31 -30
  188. package/build/esm/togetherOrganisms.js +46 -45
  189. package/build/esm/togetherRichTextEditor.js +17 -17
  190. package/build/esm/togetherShareBox.js +10 -10
  191. package/build/esm/{treePopoverMenu-99ccaf15.js → treePopoverMenu-e54dce53.js} +18 -18
  192. package/build/esm/{types-943eb3cb.js → types-5e3ac4a4.js} +2 -2
  193. package/build/esm/types.js +2 -2
  194. package/build/esm/{useCategory-032bef23.js → useCategory-dfd6cd05.js} +5 -5
  195. package/build/esm/{useHealthToolCache-5bc2c18b.js → useHealthToolCache-64324642.js} +1 -1
  196. package/build/esm/useMantineLocale-b8431753.js +142 -0
  197. package/build/esm/{usePlacesAutocomplete-8af8d9c4.js → usePlacesAutocomplete-24761930.js} +1 -1
  198. package/build/esm/useTogetherAuthRequiredAction.js +4 -4
  199. package/build/esm/{useTranslations-95c6883a.js → useTranslations-c6210631.js} +1 -1
  200. package/build/esm/{utils-073ebee6.js → utils-0f0f5f03.js} +2 -2
  201. package/build/esm/{utils-62937217.js → utils-1d124077.js} +2 -2
  202. package/build/esm/{utils-56de005f.js → utils-9df4250d.js} +3 -3
  203. package/build/esm/vaccination.js +21 -20
  204. package/build/{fixedBottomAdBlock-4e2f014d.js → fixedBottomAdBlock-037feb6a.js} +22 -22
  205. package/build/footer.js +21 -20
  206. package/build/gAssets.js +2 -2
  207. package/build/healthToolsCardWrapper.js +18 -17
  208. package/build/healthToolsForm.js +34 -33
  209. package/build/hooks.js +14 -14
  210. package/build/i18n.js +1 -1
  211. package/build/i18nV2.js +1 -1
  212. package/build/{index-a79f2e3c.js → index-00f0f9f8.js} +16 -16
  213. package/build/{index-b2519660.js → index-043818fb.js} +2 -2
  214. package/build/{index-bbe2ebb5.js → index-0f118d9f.js} +6 -6
  215. package/build/{index-e59269bb.js → index-1025bf8a.js} +14 -14
  216. package/build/{index-fab1cc3a.js → index-17344bc9.js} +5 -2
  217. package/build/{index-d585bec5.js → index-1a1c4dbd.js} +16 -16
  218. package/build/{index-581d8105.js → index-1d646c8d.js} +6 -6
  219. package/build/{index-a5f1a090.js → index-234def9f.js} +18 -14
  220. package/build/{index-205dc16c.js → index-2436536b.js} +3 -3
  221. package/build/{index-9216c6ed.js → index-261c7c41.js} +1 -1
  222. package/build/{index-55d4275e.js → index-2677cccd.js} +20 -20
  223. package/build/{index-a8647e95.js → index-272c917d.js} +15 -15
  224. package/build/{index-46743170.js → index-3772f824.js} +19 -19
  225. package/build/{index-cd40a719.js → index-3e4baf44.js} +23 -23
  226. package/build/{index-14584b97.js → index-4e359c77.js} +15 -15
  227. package/build/{index-0b5356e5.js → index-4ee82754.js} +6 -6
  228. package/build/{index-c99871c5.js → index-51e2164b.js} +5 -5
  229. package/build/{index-2952c70d.js → index-51ec8d1b.js} +3 -3
  230. package/build/{index-0c83d79d.js → index-56181cb6.js} +2 -2
  231. package/build/{index-24116842.js → index-5d1e6a98.js} +2 -2
  232. package/build/{index-823c0f3c.js → index-5e4074b2.js} +2 -2
  233. package/build/{index-ad655c42.js → index-6609d728.js} +14 -14
  234. package/build/{index-e19284e4.js → index-685bc0a5.js} +7 -7
  235. package/build/{index-b96fc0d1.js → index-69e28113.js} +12 -12
  236. package/build/{index-b47d6440.js → index-6b959e5e.js} +1 -1
  237. package/build/{index-65b72b18.js → index-711b6daf.js} +3 -3
  238. package/build/{index-8e570054.js → index-7893eacd.js} +12 -12
  239. package/build/{index-6bd20e17.js → index-7beadb47.js} +12 -12
  240. package/build/{index-35f41022.js → index-7ceb5868.js} +4 -4
  241. package/build/{index-dd400977.js → index-7f087e20.js} +18 -18
  242. package/build/{index-8a341a35.js → index-8a14f56e.js} +1 -1
  243. package/build/{index-50a7b410.js → index-8fe0d6c5.js} +12 -19
  244. package/build/{index-1fcb5e5c.js → index-93b49320.js} +14 -14
  245. package/build/{index-9b03e760.js → index-99a644d2.js} +7 -7
  246. package/build/{index-96c1b956.js → index-a6d8d3c0.js} +15 -15
  247. package/build/{index-90dd5604.js → index-ac49648f.js} +41 -32
  248. package/build/{index-ed9e7ac3.js → index-b6dcc6b6.js} +3 -3
  249. package/build/{index-36227b55.js → index-bb145c83.js} +2 -2
  250. package/build/{index-9b2a6df6.js → index-bb4dd835.js} +1 -1
  251. package/build/{index-4ec635ce.js → index-bd7d458a.js} +1 -1
  252. package/build/{index-0e75a585.js → index-bdd01759.js} +2 -2
  253. package/build/{index-e8ede7d9.js → index-c11e8d3a.js} +5 -5
  254. package/build/{index-570d9d4c.js → index-ca18a5a5.js} +16 -16
  255. package/build/{index-545c39d3.js → index-d2d43b56.js} +17 -17
  256. package/build/{index-e435db02.js → index-d4e3a73f.js} +1 -1
  257. package/build/{index-ddf07c51.js → index-d9acdb61.js} +21 -21
  258. package/build/{index-2ac6a777.js → index-dbdbc0a7.js} +3 -3
  259. package/build/{index-612701f6.js → index-dbdbfe0e.js} +6 -6
  260. package/build/{index-2aa7c4cd.js → index-e314ad5e.js} +2 -2
  261. package/build/{index-2e7f9ae7.js → index-e4bfec92.js} +12 -12
  262. package/build/{index-6c2f66f8.js → index-e5e20f87.js} +1 -1
  263. package/build/{index-74f169c4.js → index-e828df8d.js} +2 -2
  264. package/build/{index-7e4b085c.js → index-e9e89637.js} +2 -2
  265. package/build/{index-85bcdccc.js → index-eb8c0106.js} +2 -2
  266. package/build/{index-67ffc70a.js → index-f67aff2e.js} +1 -1
  267. package/build/{index-e0c93d12.js → index-fcc8ea12.js} +1 -1
  268. package/build/index.js +113 -110
  269. package/build/{index.styles-3c08adf1.js → index.styles-572373bc.js} +1 -1
  270. package/build/interfaces/constants/index.d.ts +1 -0
  271. package/build/{labelSorting-c35f771e.js → labelSorting-173bb4c2.js} +4 -4
  272. package/build/lead.js +23 -22
  273. package/build/{logoIcon-206b5862.js → logoIcon-f73b2d25.js} +2 -2
  274. package/build/mantine.js +25 -21
  275. package/build/misc.js +19 -18
  276. package/build/miscGetDynamicHealthTool.js +5 -5
  277. package/build/miscGetSocialList.js +8 -8
  278. package/build/miscScreenSizeContext.js +1 -1
  279. package/build/mobileBottomNavigation.js +5 -5
  280. package/build/mobileBottomNavigationIcon.js +5 -5
  281. package/build/molecules.js +68 -67
  282. package/build/moleculesArticleCard.js +6 -6
  283. package/build/moleculesArticleCardV2.js +16 -15
  284. package/build/navigation.js +43 -40
  285. package/build/navigationLogoutPopup.js +9 -9
  286. package/build/navigationProfileButton.js +24 -23
  287. package/build/onboardingV2.js +28 -27
  288. package/build/organisms.js +47 -44
  289. package/build/{post-c0fc6a66.js → post-4ea4886a.js} +2 -2
  290. package/build/profileNavigation.js +20 -19
  291. package/build/progressBar.js +1 -1
  292. package/build/pwg.js +22 -21
  293. package/build/ssoV2/api/email.d.ts +1 -1
  294. package/build/ssoV2/api/index.d.ts +14 -11
  295. package/build/ssoV2/api/paths.d.ts +4 -0
  296. package/build/ssoV2/api/phone.d.ts +2 -0
  297. package/build/ssoV2/api/zalo.d.ts +2 -0
  298. package/build/ssoV2/index.d.ts +4 -1
  299. package/build/ssoV2/popupWrapper/collectInfoTextPopup/index.d.ts +1 -1
  300. package/build/ssoV2/popupWrapper/collectInfoTextPopup/modal.d.ts +2 -0
  301. package/build/ssoV2/popupWrapper/confirmClosePopup.d.ts +6 -0
  302. package/build/ssoV2/screens/otp.d.ts +3 -1
  303. package/build/ssoV2/screens/passwordForgotEmail.d.ts +5 -0
  304. package/build/ssoV2/screens/passwordForgotSetup/checkIcons.d.ts +4 -0
  305. package/build/ssoV2/screens/setup/genderIcons.d.ts +3 -0
  306. package/build/ssoV2/ssoStateManager/index.d.ts +2 -0
  307. package/build/ssoV2/ssoStateManager/store.d.ts +9 -0
  308. package/build/ssoV2/stepsManager/index.d.ts +8 -1
  309. package/build/ssoV2.js +1317 -769
  310. package/build/store-c08b75bf.js +14 -0
  311. package/build/subot.js +30 -29
  312. package/build/surveyOrPremiumBanner.js +30 -29
  313. package/build/surveyQuestionCard.js +10 -10
  314. package/build/{surveyThankyouCard-2bdf2dcd.js → surveyThankyouCard-59e0629f.js} +5 -5
  315. package/build/together.js +51 -50
  316. package/build/togetherApiUtils.js +4 -4
  317. package/build/togetherAtoms.js +31 -30
  318. package/build/togetherComponentGlobalContext.js +4 -4
  319. package/build/togetherMolecules.js +41 -40
  320. package/build/togetherMoleculesCardAuthor.js +24 -24
  321. package/build/togetherMoleculesPostImagePreview.js +11 -11
  322. package/build/togetherMoleculesProfileDetail.js +31 -30
  323. package/build/togetherOrganisms.js +46 -45
  324. package/build/togetherRichTextEditor.js +17 -17
  325. package/build/togetherShareBox.js +10 -10
  326. package/build/{treePopoverMenu-2ab933a7.js → treePopoverMenu-d5928844.js} +18 -18
  327. package/build/{types-59f18720.js → types-dc0fc718.js} +2 -2
  328. package/build/types.js +2 -2
  329. package/build/{useCategory-09029dc3.js → useCategory-fbebb4d8.js} +5 -5
  330. package/build/{useHealthToolCache-de6b2733.js → useHealthToolCache-326dc6a5.js} +1 -1
  331. package/build/{useMantineLocale-06fe1f92.js → useMantineLocale-96fbf5fa.js} +68 -5
  332. package/build/{usePlacesAutocomplete-96f0c57a.js → usePlacesAutocomplete-a6d0a21b.js} +1 -1
  333. package/build/useTogetherAuthRequiredAction.js +4 -4
  334. package/build/{useTranslations-398426f8.js → useTranslations-39001d48.js} +1 -1
  335. package/build/{utils-1645a4a3.js → utils-3e9eea0e.js} +3 -3
  336. package/build/{utils-9c9e505f.js → utils-61609a38.js} +2 -2
  337. package/build/{utils-74cf7dfd.js → utils-b72e0fef.js} +2 -2
  338. package/build/vaccination.js +21 -20
  339. package/package.json +4 -2
  340. package/build/esm/useMantineLocale-8c5b5fc9.js +0 -82
  341. /package/build/{BMI_BOYS.percentile.monthly-b2263c02.js → BMI_BOYS.percentile.monthly-e9490f46.js} +0 -0
  342. /package/build/{BMI_BOYS.percentile.weekly-7189e549.js → BMI_BOYS.percentile.weekly-846795ec.js} +0 -0
  343. /package/build/{BMI_BOYS.percentile.yearly-01310d86.js → BMI_BOYS.percentile.yearly-a578ef66.js} +0 -0
  344. /package/build/{BMI_BOYS.zscore.monthly-a80fe254.js → BMI_BOYS.zscore.monthly-2a9262e2.js} +0 -0
  345. /package/build/{BMI_BOYS.zscore.weekly-4b605ea9.js → BMI_BOYS.zscore.weekly-ee7cf142.js} +0 -0
  346. /package/build/{BMI_BOYS.zscore.yearly-ee3eba97.js → BMI_BOYS.zscore.yearly-d7de19b0.js} +0 -0
  347. /package/build/{BMI_GIRLS.percentile.monthly-166e660d.js → BMI_GIRLS.percentile.monthly-c5af1a3f.js} +0 -0
  348. /package/build/{BMI_GIRLS.percentile.weekly-62efceea.js → BMI_GIRLS.percentile.weekly-5adaacbc.js} +0 -0
  349. /package/build/{BMI_GIRLS.percentile.yearly-1ee84938.js → BMI_GIRLS.percentile.yearly-2bf47bf2.js} +0 -0
  350. /package/build/{BMI_GIRLS.zscore.monthly-59fdaf1b.js → BMI_GIRLS.zscore.monthly-230afb1c.js} +0 -0
  351. /package/build/{BMI_GIRLS.zscore.weekly-da5bb3f4.js → BMI_GIRLS.zscore.weekly-650a656e.js} +0 -0
  352. /package/build/{BMI_GIRLS.zscore.yearly-745c6883.js → BMI_GIRLS.zscore.yearly-d4c56dd1.js} +0 -0
  353. /package/build/{ChevronDown-db345ad4.js → ChevronDown-f0709618.js} +0 -0
  354. /package/build/{Close-556fd99a.js → Close-413d7dea.js} +0 -0
  355. /package/build/{Google-9a9770c8.js → Google-79fe9c55.js} +0 -0
  356. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-c46325c7.js → HEAD CIRCUM_BOYS.percentile.monthly-07d5db76.js} +0 -0
  357. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-cd1657f0.js → HEAD CIRCUM_BOYS.percentile.weekly-688fcae3.js} +0 -0
  358. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-e3f39494.js → HEAD CIRCUM_BOYS.percentile.yearly-04e72a2e.js} +0 -0
  359. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-ca64bade.js → HEAD CIRCUM_BOYS.zscore.monthly-7bc6382f.js} +0 -0
  360. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-a443b982.js → HEAD CIRCUM_BOYS.zscore.weekly-2338f758.js} +0 -0
  361. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-33721395.js → HEAD CIRCUM_BOYS.zscore.yearly-082620a2.js} +0 -0
  362. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-ac1db53c.js → HEAD CIRCUM_GIRLS.percentile.monthly-7f392c6b.js} +0 -0
  363. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-6c4f0f23.js → HEAD CIRCUM_GIRLS.percentile.weekly-0e83918e.js} +0 -0
  364. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-24448b3b.js → HEAD CIRCUM_GIRLS.percentile.yearly-37ed78a5.js} +0 -0
  365. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-ab7475ce.js → HEAD CIRCUM_GIRLS.zscore.monthly-99befed5.js} +0 -0
  366. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-2aa317de.js → HEAD CIRCUM_GIRLS.zscore.weekly-0a8bc9ab.js} +0 -0
  367. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-70253fe6.js → HEAD CIRCUM_GIRLS.zscore.yearly-9e1c36a7.js} +0 -0
  368. /package/build/{HEIGHT_BOYS.percentile.monthly-be0f2b40.js → HEIGHT_BOYS.percentile.monthly-f18b9e7c.js} +0 -0
  369. /package/build/{HEIGHT_BOYS.percentile.weekly-75ebc1b7.js → HEIGHT_BOYS.percentile.weekly-52be3396.js} +0 -0
  370. /package/build/{HEIGHT_BOYS.percentile.yearly-5234db88.js → HEIGHT_BOYS.percentile.yearly-7cf93661.js} +0 -0
  371. /package/build/{HEIGHT_BOYS.zscore.monthly-0ee39002.js → HEIGHT_BOYS.zscore.monthly-99e4cf73.js} +0 -0
  372. /package/build/{HEIGHT_BOYS.zscore.weekly-2c310565.js → HEIGHT_BOYS.zscore.weekly-dc0e5112.js} +0 -0
  373. /package/build/{HEIGHT_BOYS.zscore.yearly-0bf8fade.js → HEIGHT_BOYS.zscore.yearly-a486d2f4.js} +0 -0
  374. /package/build/{HEIGHT_GIRLS.percentile.monthly-748720cd.js → HEIGHT_GIRLS.percentile.monthly-b16f6d0c.js} +0 -0
  375. /package/build/{HEIGHT_GIRLS.percentile.weekly-8a46153d.js → HEIGHT_GIRLS.percentile.weekly-8c63620c.js} +0 -0
  376. /package/build/{HEIGHT_GIRLS.percentile.yearly-330180a0.js → HEIGHT_GIRLS.percentile.yearly-3a4ca8c0.js} +0 -0
  377. /package/build/{HEIGHT_GIRLS.zscore.monthly-85383059.js → HEIGHT_GIRLS.zscore.monthly-fa763991.js} +0 -0
  378. /package/build/{HEIGHT_GIRLS.zscore.weekly-80e2f73d.js → HEIGHT_GIRLS.zscore.weekly-3895f9d9.js} +0 -0
  379. /package/build/{HEIGHT_GIRLS.zscore.yearly-cba1cdb3.js → HEIGHT_GIRLS.zscore.yearly-3a6b113a.js} +0 -0
  380. /package/build/{Locale-ced9e812.js → Locale-f1adca37.js} +0 -0
  381. /package/build/{Visible-395cf603.js → Visible-eaa30977.js} +0 -0
  382. /package/build/{WEIGHT_BOYS.percentile.monthly-1f8d0b96.js → WEIGHT_BOYS.percentile.monthly-b12bb7c8.js} +0 -0
  383. /package/build/{WEIGHT_BOYS.percentile.weekly-19bd270c.js → WEIGHT_BOYS.percentile.weekly-e6a76aed.js} +0 -0
  384. /package/build/{WEIGHT_BOYS.percentile.yearly-1d3127d2.js → WEIGHT_BOYS.percentile.yearly-685500c3.js} +0 -0
  385. /package/build/{WEIGHT_BOYS.zscore.monthly-e91aa7b9.js → WEIGHT_BOYS.zscore.monthly-b2c46c2d.js} +0 -0
  386. /package/build/{WEIGHT_BOYS.zscore.weekly-5bfa9b63.js → WEIGHT_BOYS.zscore.weekly-9b0eb154.js} +0 -0
  387. /package/build/{WEIGHT_BOYS.zscore.yearly-377e4368.js → WEIGHT_BOYS.zscore.yearly-182c9525.js} +0 -0
  388. /package/build/{WEIGHT_GIRLS.percentile.monthly-cd9bf691.js → WEIGHT_GIRLS.percentile.monthly-0a2eb04f.js} +0 -0
  389. /package/build/{WEIGHT_GIRLS.percentile.weekly-017fd0e2.js → WEIGHT_GIRLS.percentile.weekly-b0b920c6.js} +0 -0
  390. /package/build/{WEIGHT_GIRLS.percentile.yearly-d13af71c.js → WEIGHT_GIRLS.percentile.yearly-c5d01fda.js} +0 -0
  391. /package/build/{WEIGHT_GIRLS.zscore.monthly-47af4518.js → WEIGHT_GIRLS.zscore.monthly-633342b8.js} +0 -0
  392. /package/build/{WEIGHT_GIRLS.zscore.weekly-11bb0652.js → WEIGHT_GIRLS.zscore.weekly-1fe63ea6.js} +0 -0
  393. /package/build/{WEIGHT_GIRLS.zscore.yearly-975dca0f.js → WEIGHT_GIRLS.zscore.yearly-217b3995.js} +0 -0
  394. /package/build/{animation-6eabf812.js → animation-77cdbee9.js} +0 -0
  395. /package/build/{constants-467b578b.js → constants-4e89d2e1.js} +0 -0
  396. /package/build/{constants-8ccc1c6f.js → constants-7447f49a.js} +0 -0
  397. /package/build/{constants-b11de697.js → constants-bdbdb06f.js} +0 -0
  398. /package/build/{dataTransform-aa9f096c.js → dataTransform-2b24697e.js} +0 -0
  399. /package/build/{doctor-e6502faf.js → doctor-e29b3f60.js} +0 -0
  400. /package/build/esm/{BMI_BOYS.percentile.monthly-ced0a7a3.js → BMI_BOYS.percentile.monthly-33a94a94.js} +0 -0
  401. /package/build/esm/{BMI_BOYS.percentile.weekly-1b3ca2b8.js → BMI_BOYS.percentile.weekly-0cb752a7.js} +0 -0
  402. /package/build/esm/{BMI_BOYS.percentile.yearly-2c5a0ee8.js → BMI_BOYS.percentile.yearly-ac41628b.js} +0 -0
  403. /package/build/esm/{BMI_BOYS.zscore.monthly-cd03546a.js → BMI_BOYS.zscore.monthly-4ba7c4bc.js} +0 -0
  404. /package/build/esm/{BMI_BOYS.zscore.weekly-fcc1661e.js → BMI_BOYS.zscore.weekly-0b7b9364.js} +0 -0
  405. /package/build/esm/{BMI_BOYS.zscore.yearly-9cabe9ca.js → BMI_BOYS.zscore.yearly-00ced3e6.js} +0 -0
  406. /package/build/esm/{BMI_GIRLS.percentile.monthly-210f66f1.js → BMI_GIRLS.percentile.monthly-dff49a68.js} +0 -0
  407. /package/build/esm/{BMI_GIRLS.percentile.weekly-4d723cba.js → BMI_GIRLS.percentile.weekly-61eb9298.js} +0 -0
  408. /package/build/esm/{BMI_GIRLS.percentile.yearly-9c05a767.js → BMI_GIRLS.percentile.yearly-f370ac4b.js} +0 -0
  409. /package/build/esm/{BMI_GIRLS.zscore.monthly-4382143e.js → BMI_GIRLS.zscore.monthly-054b25e1.js} +0 -0
  410. /package/build/esm/{BMI_GIRLS.zscore.weekly-c0709379.js → BMI_GIRLS.zscore.weekly-3bb67521.js} +0 -0
  411. /package/build/esm/{BMI_GIRLS.zscore.yearly-be97f79b.js → BMI_GIRLS.zscore.yearly-28d80e84.js} +0 -0
  412. /package/build/esm/{ChevronDown-b42c352b.js → ChevronDown-e9331d10.js} +0 -0
  413. /package/build/esm/{Close-1e215489.js → Close-a5d2cb6c.js} +0 -0
  414. /package/build/esm/{Google-844b3694.js → Google-2424299e.js} +0 -0
  415. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-a24003f5.js → HEAD CIRCUM_BOYS.percentile.monthly-4a6a33c4.js} +0 -0
  416. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-96006f38.js → HEAD CIRCUM_BOYS.percentile.weekly-3ace606b.js} +0 -0
  417. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-5610453d.js → HEAD CIRCUM_BOYS.percentile.yearly-e570e113.js} +0 -0
  418. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-e8d8d9ce.js → HEAD CIRCUM_BOYS.zscore.monthly-1102fb4b.js} +0 -0
  419. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-4daab427.js → HEAD CIRCUM_BOYS.zscore.weekly-5d64b5a8.js} +0 -0
  420. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-08ec7af4.js → HEAD CIRCUM_BOYS.zscore.yearly-52bacf74.js} +0 -0
  421. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-009bc515.js → HEAD CIRCUM_GIRLS.percentile.monthly-8eef0771.js} +0 -0
  422. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-69a760cf.js → HEAD CIRCUM_GIRLS.percentile.weekly-522e82ae.js} +0 -0
  423. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-81b6e6b4.js → HEAD CIRCUM_GIRLS.percentile.yearly-144d5a93.js} +0 -0
  424. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-2c6d6ca7.js → HEAD CIRCUM_GIRLS.zscore.monthly-9bfc6ba1.js} +0 -0
  425. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-8a16120c.js → HEAD CIRCUM_GIRLS.zscore.weekly-f1ad4780.js} +0 -0
  426. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-710b1ee2.js → HEAD CIRCUM_GIRLS.zscore.yearly-55fea99b.js} +0 -0
  427. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-3387956d.js → HEIGHT_BOYS.percentile.monthly-d99311cd.js} +0 -0
  428. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-7f2c0632.js → HEIGHT_BOYS.percentile.weekly-edc5c0fb.js} +0 -0
  429. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-c1bb4a68.js → HEIGHT_BOYS.percentile.yearly-12cd2c17.js} +0 -0
  430. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-7e42058a.js → HEIGHT_BOYS.zscore.monthly-709ec42f.js} +0 -0
  431. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-583b2b8b.js → HEIGHT_BOYS.zscore.weekly-7d05cf79.js} +0 -0
  432. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-4f581e61.js → HEIGHT_BOYS.zscore.yearly-f15223b2.js} +0 -0
  433. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-4f367793.js → HEIGHT_GIRLS.percentile.monthly-18b74a4c.js} +0 -0
  434. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-0f233037.js → HEIGHT_GIRLS.percentile.weekly-eca52802.js} +0 -0
  435. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-6d387c7f.js → HEIGHT_GIRLS.percentile.yearly-6a8ff56b.js} +0 -0
  436. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-a340801d.js → HEIGHT_GIRLS.zscore.monthly-79ab8fca.js} +0 -0
  437. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-8fa49156.js → HEIGHT_GIRLS.zscore.weekly-4921e7ce.js} +0 -0
  438. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-39888c32.js → HEIGHT_GIRLS.zscore.yearly-7df93c38.js} +0 -0
  439. /package/build/esm/{Locale-2e537a6a.js → Locale-eaad3fa1.js} +0 -0
  440. /package/build/esm/{Visible-4941f057.js → Visible-83f5dd42.js} +0 -0
  441. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-7a60a73c.js → WEIGHT_BOYS.percentile.monthly-730634b0.js} +0 -0
  442. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-3cfb9f20.js → WEIGHT_BOYS.percentile.weekly-fcceaf00.js} +0 -0
  443. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-166da826.js → WEIGHT_BOYS.percentile.yearly-55413826.js} +0 -0
  444. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-96e662e5.js → WEIGHT_BOYS.zscore.monthly-f2dc1aa3.js} +0 -0
  445. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-deef00c4.js → WEIGHT_BOYS.zscore.weekly-3509ffc9.js} +0 -0
  446. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-d27b755f.js → WEIGHT_BOYS.zscore.yearly-570fae42.js} +0 -0
  447. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-361eaf8a.js → WEIGHT_GIRLS.percentile.monthly-2264b7be.js} +0 -0
  448. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-df3a8d7e.js → WEIGHT_GIRLS.percentile.weekly-b62f6fe3.js} +0 -0
  449. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-65ec2031.js → WEIGHT_GIRLS.percentile.yearly-b13d50f8.js} +0 -0
  450. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-7ad785b0.js → WEIGHT_GIRLS.zscore.monthly-4b7222dd.js} +0 -0
  451. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-ce7380eb.js → WEIGHT_GIRLS.zscore.weekly-9c52f897.js} +0 -0
  452. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-eb5f8c05.js → WEIGHT_GIRLS.zscore.yearly-4ea30806.js} +0 -0
  453. /package/build/esm/{animation-8cdf0413.js → animation-7f0b238b.js} +0 -0
  454. /package/build/esm/{constants-c6b6dd70.js → constants-2eaa8f5b.js} +0 -0
  455. /package/build/esm/{constants-0a2e2d89.js → constants-deb09b39.js} +0 -0
  456. /package/build/esm/{constants-39fd57dc.js → constants-f170914c.js} +0 -0
  457. /package/build/esm/{dataTransform-46c04e86.js → dataTransform-1d980e37.js} +0 -0
  458. /package/build/esm/{doctor-77d627cf.js → doctor-f8f585eb.js} +0 -0
  459. /package/build/esm/{index-c2c1151d.js → index-80efd6d8.js} +0 -0
  460. /package/build/esm/{index-4a0f7a2a.js → index-910d863e.js} +0 -0
  461. /package/build/esm/{index-f7f5582d.js → index-9e06fa51.js} +0 -0
  462. /package/build/esm/{index-c6266db7.js → index-a8484016.js} +0 -0
  463. /package/build/esm/{index-823e3a77.js → index-aaf4f6ea.js} +0 -0
  464. /package/build/esm/{index-347e9ebf.js → index-ec778b90.js} +0 -0
  465. /package/build/esm/{index-6df8ce2b.js → index-f153abc8.js} +0 -0
  466. /package/build/esm/{index-103508c0.js → index-f32de26a.js} +0 -0
  467. /package/build/esm/{localizeNumberFormat-55809d96.js → localizeNumberFormat-79c240f7.js} +0 -0
  468. /package/build/esm/{normalizeLink-5ca463b6.js → normalizeLink-3fea79dc.js} +0 -0
  469. /package/build/esm/{number-4657b47b.js → number-25ac44dc.js} +0 -0
  470. /package/build/esm/{other-09dd1a84.js → other-9ea1cbe5.js} +0 -0
  471. /package/build/esm/{paths-baec036c.js → paths-eef9fe77.js} +0 -0
  472. /package/build/esm/{routing-3e2e2990.js → routing-8d70e86c.js} +0 -0
  473. /package/build/esm/{translationsContext-b39ae826.js → translationsContext-5f5f4d35.js} +0 -0
  474. /package/build/esm/{tslib.es6-5f83e366.js → tslib.es6-f3a499e3.js} +0 -0
  475. /package/build/esm/{types-dbdccf8d.js → types-0448e320.js} +0 -0
  476. /package/build/esm/{useIsInit-a92309dc.js → useIsInit-ca4bdf65.js} +0 -0
  477. /package/build/esm/{useOutsideClick-0be26f49.js → useOutsideClick-1ee3798c.js} +0 -0
  478. /package/build/esm/{useScrollbarSize-a4d05dbd.js → useScrollbarSize-1a93f108.js} +0 -0
  479. /package/build/esm/{useUniqueId-7d9bfd02.js → useUniqueId-2a6f1b27.js} +0 -0
  480. /package/build/esm/{utils-f168370f.js → utils-8bc7ef6f.js} +0 -0
  481. /package/build/{index-c6494ca6.js → index-0cc06aa6.js} +0 -0
  482. /package/build/{index-f64e7c74.js → index-71457a8a.js} +0 -0
  483. /package/build/{index-f5d2c8d3.js → index-72dace7d.js} +0 -0
  484. /package/build/{index-b9c86a3d.js → index-94f0219c.js} +0 -0
  485. /package/build/{index-3ab23404.js → index-bf3a3a6b.js} +0 -0
  486. /package/build/{index-aabca052.js → index-bf3c292b.js} +0 -0
  487. /package/build/{index-3413e9d2.js → index-c08653a6.js} +0 -0
  488. /package/build/{index-fc8fe2d4.js → index-f78c2c75.js} +0 -0
  489. /package/build/{localizeNumberFormat-d2e5c1a5.js → localizeNumberFormat-5dbb221b.js} +0 -0
  490. /package/build/{normalizeLink-84ac179b.js → normalizeLink-cf43c3dd.js} +0 -0
  491. /package/build/{number-e5fda4be.js → number-8390df04.js} +0 -0
  492. /package/build/{other-f335833f.js → other-a5087437.js} +0 -0
  493. /package/build/{paths-643266bc.js → paths-9b76502a.js} +0 -0
  494. /package/build/{routing-5902192d.js → routing-929238aa.js} +0 -0
  495. /package/build/{translationsContext-8627f575.js → translationsContext-2e89ee02.js} +0 -0
  496. /package/build/{tslib.es6-bdc4ef33.js → tslib.es6-aca88a2c.js} +0 -0
  497. /package/build/{types-efc43fc9.js → types-d64e102d.js} +0 -0
  498. /package/build/{useIsInit-a9a5096b.js → useIsInit-9e580096.js} +0 -0
  499. /package/build/{useOutsideClick-6e5b26b3.js → useOutsideClick-a6ecea5e.js} +0 -0
  500. /package/build/{useScrollbarSize-01d92d17.js → useScrollbarSize-657ef9b6.js} +0 -0
  501. /package/build/{useUniqueId-72e1f41e.js → useUniqueId-7b8066f0.js} +0 -0
  502. /package/build/{utils-c6a6f3d0.js → utils-c29ae23e.js} +0 -0
package/build/ssoV2.js CHANGED
@@ -3,49 +3,53 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
+ var ReactDOM = require('react-dom');
6
7
  var arrow = require('@hhgtech/icons/arrow');
7
- var core = require('@hhgtech/icons/core');
8
- var logoIcon = require('./logoIcon-206b5862.js');
9
- var index$2 = require('./index-4ec635ce.js');
10
- var index$1 = require('./index-0e75a585.js');
11
- var Locale = require('./Locale-ced9e812.js');
12
- var index = require('./index-fab1cc3a.js');
13
- var tslib_es6 = require('./tslib.es6-bdc4ef33.js');
14
- var core$1 = require('@mantine/core');
15
- var index$4 = require('./index-a5f1a090.js');
8
+ var core$1 = require('@hhgtech/icons/core');
9
+ var logoIcon = require('./logoIcon-f73b2d25.js');
10
+ var index$1 = require('./index-bd7d458a.js');
11
+ var index = require('./index-bdd01759.js');
12
+ var core = require('@mantine/core');
13
+ var throttle = require('lodash/throttle');
14
+ var index$3 = require('./index-234def9f.js');
15
+ require('@mantine/dates');
16
+ var index$4 = require('./index-17344bc9.js');
17
+ require('./index-f67aff2e.js');
18
+ require('./index-94f0219c.js');
19
+ var useMantineLocale = require('./useMantineLocale-96fbf5fa.js');
20
+ var index$2 = require('./index-56181cb6.js');
21
+ var useTranslations = require('./useTranslations-39001d48.js');
22
+ require('@mantine/hooks');
23
+ var utils$1 = require('./utils-c29ae23e.js');
24
+ require('./other-a5087437.js');
25
+ var Locale = require('./Locale-f1adca37.js');
26
+ require('./translationsContext-2e89ee02.js');
27
+ require('string-format');
28
+ var tslib_es6 = require('./tslib.es6-aca88a2c.js');
16
29
  var constantsIsProduction = require('./constantsIsProduction.js');
17
- var routing = require('./routing-5902192d.js');
18
- var index$3 = require('./index-0c83d79d.js');
19
- var other = require('@hhgtech/icons/other');
20
- var Google = require('./Google-9a9770c8.js');
21
- var styled = require('@emotion/styled');
22
- var utils = require('./utils-9c9e505f.js');
30
+ var routing = require('./routing-929238aa.js');
23
31
  var miscCookieHelper = require('./miscCookieHelper.js');
24
- var miscTheme = require('./miscTheme.js');
25
32
  var constantsDomainLocales = require('./constantsDomainLocales.js');
33
+ var Google = require('./Google-79fe9c55.js');
34
+ var other = require('@hhgtech/icons/other');
35
+ require('./index.styles-572373bc.js');
36
+ var styled = require('@emotion/styled');
37
+ var utils = require('./utils-61609a38.js');
26
38
  var form = require('@mantine/form');
27
- var throttle = require('lodash/throttle');
28
- require('@mantine/dates');
29
- require('./index-67ffc70a.js');
30
- require('./index-b9c86a3d.js');
31
- require('./useMantineLocale-06fe1f92.js');
32
- var useTranslations = require('./useTranslations-398426f8.js');
33
- require('@mantine/hooks');
34
- require('./utils-c6a6f3d0.js');
35
- require('./other-f335833f.js');
36
39
  var yup = require('yup');
37
40
  var dayjs = require('dayjs');
38
- var index$5 = require('./index-0b5356e5.js');
39
- require('./index-e0c93d12.js');
40
- require('./index.styles-3c08adf1.js');
41
- require('date-fns/locale');
42
- require('./constantsSite.js');
43
- require('./constantsRiskScreener.js');
41
+ var index$5 = require('./index-4ee82754.js');
42
+ var store = require('./store-c08b75bf.js');
43
+ require('./index-fcc8ea12.js');
44
44
  require('@mantine/carousel');
45
+ require('./miscTheme.js');
45
46
  require('classnames');
46
- require('./useUniqueId-72e1f41e.js');
47
- require('./translationsContext-8627f575.js');
48
- require('string-format');
47
+ require('./useUniqueId-7b8066f0.js');
48
+ require('./constantsSite.js');
49
+ require('date-fns/locale');
50
+ require('./constantsRiskScreener.js');
51
+ require('@mantine/notifications');
52
+ require('zustand');
49
53
 
50
54
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
51
55
 
@@ -68,8 +72,8 @@ function _interopNamespace(e) {
68
72
  }
69
73
 
70
74
  var React__default = /*#__PURE__*/_interopDefault(React);
71
- var styled__default = /*#__PURE__*/_interopDefault(styled);
72
75
  var throttle__default = /*#__PURE__*/_interopDefault(throttle);
76
+ var styled__default = /*#__PURE__*/_interopDefault(styled);
73
77
  var yup__namespace = /*#__PURE__*/_interopNamespace(yup);
74
78
  var dayjs__default = /*#__PURE__*/_interopDefault(dayjs);
75
79
 
@@ -79,90 +83,188 @@ const SSOStateContext = React.createContext({
79
83
  source: 'default',
80
84
  });
81
85
  const SSOStateProvider = ({ children, locale = Locale.LOCALE.Vietnam, onClose, source = 'default', }) => {
86
+ const [openCollectInfoPopup, setOpenCollectInfoPopup] = React__default["default"].useState(false);
82
87
  return (React__default["default"].createElement(SSOStateContext.Provider, { value: {
83
88
  locale,
84
89
  onClose,
85
90
  source,
91
+ openCollectInfoPopup,
92
+ setOpenCollectInfoPopup,
86
93
  } }, children));
87
94
  };
88
95
  const useSSOState = () => {
89
96
  return React__default["default"].useContext(SSOStateContext);
90
97
  };
91
98
 
92
- var SSOStepTypeType;
93
- (function (SSOStepTypeType) {
94
- SSOStepTypeType["FIRST"] = "first";
95
- SSOStepTypeType["EMAIL"] = "email";
96
- SSOStepTypeType["VERIFY_PHONE"] = "verify_phone";
97
- SSOStepTypeType["PASSWORD"] = "password";
98
- SSOStepTypeType["UPDATE_EMAIL"] = "update_email";
99
- SSOStepTypeType["FORGOT_PASSWORD_PHONE"] = "forgot_password_phone";
100
- SSOStepTypeType["FORGOT_PASSWORD_SETUP"] = "forgot_password_setup";
101
- SSOStepTypeType["OTP"] = "otp";
102
- SSOStepTypeType["SETUP_FULL"] = "setup_full";
103
- })(SSOStepTypeType || (SSOStepTypeType = {}));
104
- const SSOStepsContext = React.createContext({
105
- currentStepIndex: 0,
106
- steps: [
99
+ const BackgroundHeader$1 = () => (React__default["default"].createElement("svg", { width: "292", height: "255", viewBox: "0 0 292 255", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: {
100
+ position: 'absolute',
101
+ top: 0,
102
+ left: '50%',
103
+ zIndex: 0,
104
+ transform: 'translateX(-50%)',
105
+ pointerEvents: 'none',
106
+ } },
107
+ React__default["default"].createElement("circle", { opacity: ".2", cx: "146", cy: "109", r: "146", fill: "url(#paint0_linear_908_34610)" }),
108
+ React__default["default"].createElement("circle", { opacity: ".3", cx: "146", cy: "109", r: "85", fill: "url(#paint1_linear_908_34610)" }),
109
+ React__default["default"].createElement("circle", { cx: "146.5", cy: "108.5", r: "47.5", fill: "url(#paint2_linear_908_34610)" }),
110
+ React__default["default"].createElement("circle", { cx: "146.5", cy: "108.5", r: "47", stroke: "url(#paint3_linear_908_34610)" }),
111
+ React__default["default"].createElement("path", { d: "M163.327 94.716c-.522-3.187-7.981-5.714-17.11-5.714s-16.589 2.527-17.111 5.714h-.032v26.428h.032c.522 3.186 7.982 5.714 17.111 5.714 9.128 0 16.588-2.528 17.11-5.714h.032V94.716z", fill: "#545E73" }),
112
+ React__default["default"].createElement("path", { d: "M146.217 118.286c-9.468 0-17.143-2.718-17.143-6.071v8.928h.032c.522 3.187 7.982 5.714 17.111 5.714 9.128 0 16.588-2.527 17.11-5.714h.032v-8.928c0 3.353-7.675 6.071-17.142 6.071", fill: "#2B62CD" }),
113
+ React__default["default"].createElement("path", { d: "M129.074 111.859v.358q.002-.18.032-.358zm34.25 0q.031.178.032.358v-.358z", fill: "#38454F" }),
114
+ React__default["default"].createElement("path", { d: "M146.217 109.714c-9.468 0-17.143-2.719-17.143-6.071v8.928h.032c.522 3.186 7.982 5.714 17.111 5.714 9.128 0 16.588-2.528 17.11-5.714h.032v-8.928c0 3.352-7.675 6.071-17.142 6.071", fill: "#2D87F3" }),
115
+ React__default["default"].createElement("path", { d: "M129.074 103.287v.357q.002-.18.032-.357zm34.25 0q.031.178.032.357v-.357z", fill: "#556080" }),
116
+ React__default["default"].createElement("path", { d: "M146.217 101.145c9.467 0 17.142-2.719 17.142-6.072s-7.675-6.071-17.142-6.071c-9.468 0-17.143 2.718-17.143 6.071s7.675 6.072 17.143 6.072", fill: "#91CAFF" }),
117
+ React__default["default"].createElement("path", { d: "M146.217 101.144c-9.468 0-17.143-2.719-17.143-6.072v8.929h.032c.522 3.186 7.982 5.714 17.111 5.714 9.128 0 16.588-2.528 17.11-5.714h.032v-8.929c0 3.353-7.675 6.072-17.142 6.072", fill: "#45A4FF" }),
118
+ React__default["default"].createElement("path", { d: "M129.074 94.717v.357q.002-.18.032-.357zm34.25 0q.031.177.032.357v-.357z", fill: "#8697CB" }),
119
+ React__default["default"].createElement("path", { d: "M156.36 129.002a8.57 8.57 0 0 0 8.571-8.571 8.571 8.571 0 1 0-8.571 8.571", fill: "#00B16A" }),
120
+ React__default["default"].createElement("path", { d: "M161.054 116.273a.714.714 0 0 0-.995.178l-3.997 5.743-2.82-2.316a.714.714 0 0 0-.906 1.105l3.418 2.806a.72.72 0 0 0 1.04-.144l4.438-6.377a.716.716 0 0 0-.178-.995", fill: "#fff" }),
121
+ React__default["default"].createElement("defs", null,
122
+ React__default["default"].createElement("linearGradient", { id: "paint0_linear_908_34610", x1: "147.5", y1: "141", x2: "36.5", y2: "30", gradientUnits: "userSpaceOnUse" },
123
+ React__default["default"].createElement("stop", { stopColor: "#fff", stopOpacity: "0" }),
124
+ React__default["default"].createElement("stop", { offset: "1", stopColor: "#fff" })),
125
+ React__default["default"].createElement("linearGradient", { id: "paint1_linear_908_34610", x1: "218.376", y1: "63.134", x2: "61", y2: "109", gradientUnits: "userSpaceOnUse" },
126
+ React__default["default"].createElement("stop", { stopColor: "#fff" }),
127
+ React__default["default"].createElement("stop", { offset: "1", stopColor: "#fff", stopOpacity: "0" })),
128
+ React__default["default"].createElement("linearGradient", { id: "paint2_linear_908_34610", x1: "146.5", y1: "61", x2: "146.5", y2: "156", gradientUnits: "userSpaceOnUse" },
129
+ React__default["default"].createElement("stop", { stopColor: "#fff", stopOpacity: ".6" }),
130
+ React__default["default"].createElement("stop", { offset: "1", stopColor: "#fff", stopOpacity: "0" })),
131
+ React__default["default"].createElement("linearGradient", { id: "paint3_linear_908_34610", x1: "178.979", y1: "98.35", x2: "108.338", y2: "98.35", gradientUnits: "userSpaceOnUse" },
132
+ React__default["default"].createElement("stop", { stopColor: "#fff", stopOpacity: "0" }),
133
+ React__default["default"].createElement("stop", { offset: "1", stopColor: "#fff" })))));
134
+
135
+ const CustomerSupportIcon = () => {
136
+ return (React__default["default"].createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
137
+ React__default["default"].createElement("g", { clipPath: "url(#clip0_911_24123)" },
138
+ React__default["default"].createElement("path", { d: "M23.3 16.625c-.042-1.1.166-4.401.166-4.401.073-.27.15-.594.205-.854C25.33 3.783 20.246.75 16 .75c-1.133 0-2.488.413-3.13 1.203a.82.82 0 0 1-.503.307c-2.862.46-4.742 4.183-4.062 8.77q.087.586.23 1.19v.002c.183 1.009.231 3.303.165 4.403-.271 4.482-5.173 8.453-1.985 11.608 8.41 1.974 10.202 2.142 18.57 0 3.187-3.155-1.81-7.122-1.985-11.608", fill: "#9B4E4E" }),
139
+ React__default["default"].createElement("path", { d: "M24.675 14.972a3.2 3.2 0 0 0-.64-.718.25.25 0 1 0-.302.399q.308.261.53.6a1.41 1.41 0 0 1 .177 1.562c-.465.892-1.84 1.63-3.614 2.043q.139.221.264.451c1.85-.457 3.275-1.267 3.794-2.263a1.89 1.89 0 0 0-.21-2.074", fill: "#473049" }),
140
+ React__default["default"].createElement("path", { d: "M18.545 22.798c-.35.41-2.09 4.555-2.535 5.29-.448-.735-2.198-4.89-2.545-5.3.351-.358.597-.808.707-1.297q.096-.405.115-.82c.365.137 3.063.134 3.428-.003v.003q.018.4.11.79c.107.505.357.969.72 1.337", fill: "#FF977B" }),
141
+ React__default["default"].createElement("path", { d: "M17.824 21.46a3.39 3.39 0 0 1-3.652.03q.095-.404.115-.82c.365.138 3.062.135 3.427-.002v.003q.018.4.11.79", fill: "#FF7364" }),
142
+ React__default["default"].createElement("path", { d: "M25.284 28.233c.153.66-.362 1.082-1.08 1.472-.917.5-3.717 1.55-8.205 1.55s-7.287-1.05-8.205-1.55c-.717-.39-1.232-.812-1.08-1.472.048-.187.126-.365.233-.525.535-.84 1.567-2.198 4.2-3.598q.335-.174.692-.33c.075 1.013 2.985.21 2.985.21a.96.96 0 0 1 .57.835c.038.888.168 2.528.615 3.263.445-.735.575-2.375.613-3.263a.96.96 0 0 1 .57-.835s2.907.81 2.985-.202q.347.151.675.322c2.632 1.4 3.665 2.758 4.2 3.598.107.16.185.338.232.525", fill: "#F9E0B4" }),
143
+ React__default["default"].createElement("path", { d: "M22.317 12.023c.359-.006.715.05 1.055.165.785.282 1.33.962 1.2 2.3-.105 1.1-.647 1.752-1.317 2.03-.461.188-.97.217-1.45.085.277-.97.555-3.88.512-4.58m-12.124 4.579a2.26 2.26 0 0 1-1.448-.082c-.672-.28-1.215-.93-1.322-2.033-.123-1.287.375-1.965 1.112-2.265a3 3 0 0 1 1.145-.2c-.042.7.235 3.61.513 4.58", fill: "#4B3956" }),
144
+ React__default["default"].createElement("path", { d: "M22.319 12.021c.04.7-.235 3.61-.513 4.581-.285.996-1.532 3.582-5.285 4.418a2.4 2.4 0 0 1-1.044 0c-3.752-.836-5-3.422-5.284-4.418-.278-.97-.554-3.88-.513-4.58 1.219-.669.668-2.955 1.56-5.057.556-1.307 1.305-1.644 1.722-1.727a.9.9 0 0 0 .533-.338c1.6-2.056 4.794-.95 5.966 1.225 1.066 1.977 1.225 4.918 2.858 5.896", fill: "#FFB497" }),
145
+ React__default["default"].createElement("path", { d: "M20.13 23.118c.067.217.083.446.048.67-.077 1.012-.52 2.735-1.227 2.542-1.018-.277-1.758-2.34-1.758-2.34.518-.23 1.003-.782 1.353-1.192q.068-.086.132-.16a.463.463 0 0 1 .625-.103c.295.153.683.345.828.583m-5.306.872s-.74 2.063-1.758 2.34c-.71.193-1.152-1.537-1.227-2.55a1.5 1.5 0 0 1 .047-.662c.145-.238.533-.43.828-.583a.463.463 0 0 1 .625.103l.125.15c.347.41.837.972 1.36 1.202", fill: "#F7F0DF" }),
146
+ React__default["default"].createElement("path", { d: "M14.94 16.018a.306.306 0 0 0-.3.385 1.414 1.414 0 0 0 2.72 0 .307.307 0 0 0-.3-.385z", fill: "#fff" }),
147
+ React__default["default"].createElement("path", { d: "M12.776 11.492h-.05a.676.676 0 0 0-.675.676v.541c0 .374.302.676.676.676h.049a.676.676 0 0 0 .676-.676v-.54a.676.676 0 0 0-.676-.677m6.448 1.893h.05a.676.676 0 0 0 .675-.676v-.541a.676.676 0 0 0-.676-.676h-.049a.676.676 0 0 0-.676.675v.542c0 .373.303.676.676.676", fill: "#9B4E4E" }),
148
+ React__default["default"].createElement("path", { d: "M16.017 29.117h-.034a.47.47 0 0 0-.471.472v.034c0 .26.21.471.471.471h.034c.26 0 .472-.21.472-.471v-.034a.47.47 0 0 0-.472-.472", fill: "#fff" }),
149
+ React__default["default"].createElement("path", { d: "M16.003 15.2c-.008 0-.69-.01-.69-.402a.25.25 0 0 1 .455-.142 1 1 0 0 0 .235.044.8.8 0 0 0 .229-.044.25.25 0 0 1 .456.142c0 .391-.679.402-.685.402", fill: "#FF7364" }),
150
+ React__default["default"].createElement("path", { d: "M11.532 12.095a.25.25 0 0 1-.225-.36 1.62 1.62 0 0 1 1.338-.752c.396-.017.782.124 1.075.39a.25.25 0 1 1-.333.374 1 1 0 0 0-.742-.264 1.14 1.14 0 0 0-.888.473.25.25 0 0 1-.225.14m-.451-1.716a.25.25 0 0 1-.175-.43c.606-.587 2.632-.888 3.235-.48a.25.25 0 0 1-.281.415c-.37-.253-2.149-.02-2.606.425a.25.25 0 0 1-.173.07m9.387 1.715a.25.25 0 0 1-.226-.14 1.14 1.14 0 0 0-.887-.472 1 1 0 0 0-.742.264.25.25 0 1 1-.332-.373c.293-.267.68-.408 1.075-.391a1.62 1.62 0 0 1 1.337.752.25.25 0 0 1-.225.36m.452-1.715a.25.25 0 0 1-.174-.07c-.457-.444-2.235-.677-2.605-.426a.25.25 0 0 1-.281-.414c.603-.408 2.628-.108 3.234.48a.25.25 0 0 1-.175.43zm2.71 1.175c-.135-.78-.492-2.643-2.005-5.64-.06-.125-.092-.258.005-.355a.254.254 0 0 1 .355.005c.795.817 1.67 2.882 1.9 4.565zM10.163 6.313c-.015.025-1.525 2.925-1.83 4.89l-.028-.173q-.1-.658-.127-1.322C8.54 7.94 9.673 6.16 9.73 6.063a.25.25 0 0 1 .34-.093.25.25 0 0 1 .093.343", fill: "#844040" }),
151
+ React__default["default"].createElement("path", { d: "M23.29 17.917c-1.345.813-3.559 1.331-5.908 1.3a.254.254 0 0 0-.253.247.25.25 0 0 0 .246.253l.23.002c2.522 0 4.831-.603 6.2-1.543a23 23 0 0 1-.516-.259", fill: "#473049" }),
152
+ React__default["default"].createElement("path", { d: "M16.138 20.42c.686 0 1.241-.426 1.241-.952s-.555-.952-1.241-.952-1.242.426-1.242.952.556.952 1.242.952", fill: "#4B3956" })),
153
+ React__default["default"].createElement("defs", null,
154
+ React__default["default"].createElement("clipPath", { id: "clip0_911_24123" },
155
+ React__default["default"].createElement("path", { fill: "#fff", d: "M0 0h32v32H0z" })))));
156
+ };
157
+
158
+ const HealthUpdateIcon = () => {
159
+ return (React__default["default"].createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
160
+ React__default["default"].createElement("path", { d: "M20.69 3.066 4.714 5.456a1.714 1.714 0 0 0-1.442 1.95l3.01 20.106a1.714 1.714 0 0 0 1.948 1.442l15.975-2.39a1.714 1.714 0 0 0 1.441-1.95L22.638 4.507a1.714 1.714 0 0 0-1.949-1.441", fill: "#1B89E5" }),
161
+ React__default["default"].createElement("path", { d: "m4.488 5.49 16.427-2.458 3.13 20.914-16.427 2.458z", fill: "#fff" }),
162
+ React__default["default"].createElement("path", { d: "m13.559 8.067-.567.084a.83.83 0 0 0-.696.942l.02.141a.18.18 0 0 1-.15.203l-.14.021a.83.83 0 0 0-.697.942l.085.568a.83.83 0 0 0 .942.696l.141-.021a.18.18 0 0 1 .203.15l.022.14a.83.83 0 0 0 .942.697l.566-.085a.83.83 0 0 0 .697-.941l-.021-.142a.18.18 0 0 1 .15-.203l.141-.021a.83.83 0 0 0 .697-.943l-.085-.565a.83.83 0 0 0-.942-.697l-.142.022a.18.18 0 0 1-.203-.15l-.02-.142a.83.83 0 0 0-.943-.696m6.553 5.392-9.31 1.393a.32.32 0 0 0 .094.634l9.31-1.393a.32.32 0 1 0-.095-.634m.299 2.303L8.74 17.508a.32.32 0 0 0 .096.634l11.67-1.746a.32.32 0 0 0-.096-.634m-.591 2.436L9.039 19.81a.32.32 0 1 0 .095.634l10.78-1.613a.32.32 0 0 0-.095-.634m-1.084 2.51-9.397 1.406a.32.32 0 0 0 .095.634l9.397-1.407a.32.32 0 1 0-.095-.633m2.318-.347-.828.124a.32.32 0 0 0 .095.634l.828-.124a.32.32 0 0 0-.095-.634", fill: "#78C5EF" }),
163
+ React__default["default"].createElement("path", { d: "m27.358 4.303-.805-.273a1.26 1.26 0 0 0-1.596.789l-4.406 13.013.494 2.544a.442.442 0 0 0 .728.246l1.937-1.72 2.61-7.71.224.075a.583.583 0 0 0 .739-.365l1.357-4.007a2.045 2.045 0 0 0-1.282-2.592", fill: "#36B1F2" }),
164
+ React__default["default"].createElement("path", { d: "M26.32 11.443a.25.25 0 0 1-.236-.33l1.614-4.768a.25.25 0 1 1 .474.16l-1.615 4.768a.25.25 0 0 1-.237.17", fill: "#1B89E5" }),
165
+ React__default["default"].createElement("path", { d: "M17.67 5.535 8.324 6.934a1.15 1.15 0 0 1-1.307-.967l-.098-.654a.44.44 0 0 1 .368-.497l10.754-1.61a.437.437 0 0 1 .498.368l.097.654a1.15 1.15 0 0 1-.967 1.307z", fill: "#3C3854" })));
166
+ };
167
+
168
+ const PersonalizeIcon = () => {
169
+ return (React__default["default"].createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
170
+ React__default["default"].createElement("path", { d: "M31.364 22.343a5 5 0 0 0-1.713-1.477c-.847-.488-1.52-.816-1.638-1.931h-1.761c-.12 1.115-.797 1.443-1.644 1.931a5 5 0 0 0-1.712 1.477c-.33.438-.095.709.331.936.723.386 2.4.827 3.903.827 1.502 0 3.18-.441 3.902-.827.426-.227.662-.498.332-.936", fill: "#F78181" }),
171
+ React__default["default"].createElement("path", { d: "M21.765 14c-.006-3.907-4.11-7.388-7.666-4.77a.4.4 0 0 1-.129.065c-.958.303-1.65 1.213-2.108 2.305-1.408 3.347.2 7.77-.291 11.538h9.938c-.185-2.536.26-6.777.256-9.138", fill: "#FF6671" }),
172
+ React__default["default"].createElement("path", { d: "M5.354 9.745c-3.033 0-5.268 3.012-4.76 6.07.424 2.568 3.008 2.747 3.008 2.747l3.5-.003s2.586-.175 3.012-2.743c.507-3.06-1.728-6.07-4.76-6.07", fill: "#3A417C" }),
173
+ React__default["default"].createElement("path", { d: "M9.073 22.755c-.688.367-2.288.79-3.72.79s-3.03-.423-3.72-.79c-.408-.218-.63-.475-.318-.893.43-.588.99-1.07 1.635-1.407.205-.118.393-.203.563-.283h.002c.503-.235.843-.415.928-1.207h1.822c.085.797.428.975.935 1.21.17.08.355.165.558.28.644.339 1.202.82 1.632 1.407.315.418.09.675-.317.893", fill: "#BF6666" }),
174
+ React__default["default"].createElement("path", { d: "M31.332 22.342a5.04 5.04 0 0 0-1.712-1.477 9 9 0 0 1-.815-.498 3.43 3.43 0 0 1-3.373-.005c-.245.178-.547.325-.855.503a5 5 0 0 0-1.712 1.477c-.33.44-.095.71.33.938.722.385 2.4.827 3.902.827s3.18-.442 3.903-.827c.427-.228.662-.498.332-.938", fill: "#3A417C" }),
175
+ React__default["default"].createElement("path", { d: "M28.232 9.496c-1.05-.28-3.25-.14-3.708 1.205a.46.46 0 0 1-.18.24c-1.035.682-1.353 1.643-.862 3.845h7.298c.738-4.148-1.278-4.95-2.548-5.29", fill: "#FFB45A" }),
176
+ React__default["default"].createElement("path", { d: "M8.402 14.623a.51.51 0 0 1 .229.432 5.9 5.9 0 0 1-.278 1.793c-.262.697-.942 1.882-2.245 2.152a4 4 0 0 1-.757.09 4 4 0 0 1-.76-.09c-1.303-.27-1.98-1.455-2.243-2.152a5.9 5.9 0 0 1-.278-1.793.51.51 0 0 1 .229-.432c.99-.668 2.339-.862 3.052-.86.71-.002 2.06.192 3.051.86", fill: "#CE7A7A" }),
177
+ React__default["default"].createElement("path", { d: "M30.781 14.786a1.2 1.2 0 0 0-.469-.053.45.45 0 0 1-.225-.04c-.956-.438-.852-1.208-.955-1.723-.407-2.036-2.745-1.94-3.408-1.24a.36.36 0 0 1-.19.11c-.87.175-1.371 1.948-1.469 2.68a.24.24 0 0 1-.232.209q-.18 0-.35.057c-.448.157-.572.675-.392 1.157a1.03 1.03 0 0 0 .948.725.255.255 0 0 1 .267.175 3.31 3.31 0 0 0 1.945 2.092 2.13 2.13 0 0 0 1.762 0 3.3 3.3 0 0 0 1.945-2.092.254.254 0 0 1 .267-.175 1.03 1.03 0 0 0 .947-.725c.181-.482.056-1-.391-1.157m-9.271 8.351a5.9 5.9 0 0 0-2.012-1.734c-.995-.573-1.723-.494-1.863-1.803l-2.213-.01c-.14 1.31-.844 1.24-1.839 1.814a5.9 5.9 0 0 0-2.011 1.734c-.388.515-.112.833.389 1.1.849.453 2.82.972 4.584.972s3.726-.519 4.575-.972c.5-.268.777-.586.39-1.1", fill: "#FF9797" }),
178
+ React__default["default"].createElement("path", { d: "M21.51 23.137a5.9 5.9 0 0 0-2.012-1.734c-.995-.573-1.723-.494-1.863-1.803l-2.213-.01c-.14 1.31-.844 1.24-1.839 1.814a5.9 5.9 0 0 0-2.011 1.734c-.388.515-.112.833.389 1.1.849.453 2.82.972 4.584.972s3.726-.519 4.575-.972c.5-.268.777-.586.39-1.1", fill: "#FF9797" }),
179
+ React__default["default"].createElement("path", { d: "M18.682 13.703a3.32 3.32 0 0 1 1.206 3.398 3.63 3.63 0 0 1-2.229 2.489 3.5 3.5 0 0 1-1.118.213 3.5 3.5 0 0 1-1.12-.213 3.63 3.63 0 0 1-2.228-2.49 8.5 8.5 0 0 1-.284-2.55c.137-2.045.975-3.52 2.095-3.245a.25.25 0 0 0 .182-.023c1.377-.755 1.672 1.03 3.496 2.421", fill: "#FFAEAE" }),
180
+ React__default["default"].createElement("path", { d: "M21.12 24.238c-.85.452-2.81.972-4.575.972s-3.735-.52-4.585-.972c-.5-.268-.777-.585-.387-1.1a5.65 5.65 0 0 1 1.735-1.573 6.03 6.03 0 0 0 3.232.788 6.1 6.1 0 0 0 3.253-.775 5.7 5.7 0 0 1 1.717 1.56c.388.515.11.832-.39 1.1", fill: "#5C8EFF" }),
181
+ React__default["default"].createElement("path", { d: "M9.073 22.755c-.688.368-2.288.79-3.72.79s-3.03-.422-3.72-.79c-.408-.217-.63-.475-.318-.892.43-.588.99-1.07 1.635-1.408.205-.117.393-.202.563-.282h.002c.557.318 1.192.47 1.833.44a3.47 3.47 0 0 0 1.852-.438c.17.08.355.165.558.28a4.8 4.8 0 0 1 1.632 1.408c.315.417.09.675-.317.892", fill: "#4856B5" })));
182
+ };
183
+
184
+ const SecurityIcon = () => {
185
+ return (React__default["default"].createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
186
+ React__default["default"].createElement("path", { d: "M16 29.625c1.196 0 2.348-.639 3.327-1.31 5.423-3.715 6.606-5.558 6.995-6.163.436-.68 1.533-2.23 2.73-12.356.33-2.804-1.143-5.19-3.893-6.066a31.65 31.65 0 0 0-18.319 0c-2.75.874-4.222 3.262-3.892 6.067 1.196 10.125 2.293 11.674 2.73 12.355.388.605 1.572 2.448 6.994 6.163.98.671 2.13 1.31 3.328 1.31", fill: "#9DBA22" }),
187
+ React__default["default"].createElement("path", { d: "M25.142 7.18c-2.902-1.307-6.095-1.645-9.143-1.645s-6.241.338-9.143 1.645c-.7.316-1.115.77-1.04 1.365.382 3.052 1.583 11.235 2.192 12.128 1.21 1.777 5.533 4.67 7.267 5.788a1.37 1.37 0 0 0 1.448 0c1.733-1.119 6.056-4.011 7.267-5.788.609-.893 1.81-9.075 2.193-12.128.074-.595-.34-1.049-1.041-1.365", fill: "#BFDF46" }),
188
+ React__default["default"].createElement("path", { d: "M15.798 19.264c-1.522-.418-2.486-1.494-2.992-3.333a9.2 9.2 0 0 1-.177-4.156c.109-.644.715-1.192 1.434-.802q1.159.616 2.377 1.102c2.909 1.205 3.817 4.07 2.732 5.783-.578.912-1.922 1.806-3.375 1.406", fill: "#fff" }),
189
+ React__default["default"].createElement("path", { d: "M20.667 20.13a.3.3 0 0 1-.095-.015c-2.152-.684-4.24-2.662-4.838-4.08a.313.313 0 0 1 .508-.35q.045.045.067.106c.461 1.092 2.311 3.048 4.451 3.728a.313.313 0 0 1-.094.61", fill: "#9DBA22" })));
190
+ };
191
+
192
+ const ServiceIcon = () => {
193
+ return (React__default["default"].createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
194
+ React__default["default"].createElement("g", { clipPath: "url(#clip0_911_3434)" },
195
+ React__default["default"].createElement("path", { d: "M30.466 17.553c.714-.548.988-1.39.611-1.881s-1.261-.444-1.975.104c-.714.549-.988 1.391-.611 1.882s1.261.444 1.975-.105", fill: "#563960" }),
196
+ React__default["default"].createElement("path", { d: "M30.122 7.72a2.2 2.2 0 0 1-.438.37 2.355 2.355 0 0 1-2.787-3.79l.022-.017a2.356 2.356 0 0 1 3.203 3.437", fill: "#E8E2E2" }),
197
+ React__default["default"].createElement("path", { d: "M16.474 3.996c-.544-.568-1.058-1.45-1.082-2.29l-1.395.7a1.394 1.394 0 1 0 1.247 2.491l1.159-.583.259-.14a3 3 0 0 1-.188-.178", fill: "#E5395E" }),
198
+ React__default["default"].createElement("path", { d: "M18.934 2.175a1.39 1.39 0 0 1-.77 1.246l-1.472.738-.256.138a2.52 2.52 0 0 1-1.189-1.331 2 2 0 0 1-.042-1.165l.353-.191 1.358-.68a1.392 1.392 0 0 1 2.018 1.245", fill: "#F9AF2B" }),
199
+ React__default["default"].createElement("path", { d: "M5.507 6.695c-.407.705-1.475.86-2.425.362L2.975 7a3 3 0 0 1-.358-.248c.005-.012 1.05-.635 1.355-1.157.258-.44.25-1.335.268-1.38q.136.058.265.132.132.078.257.168c.795.585 1.128 1.515.745 2.18", fill: "#F44A52" }),
200
+ React__default["default"].createElement("path", { d: "M4.343 5.848a2.9 2.9 0 0 1-1.285 1.197L2.976 7a2.6 2.6 0 0 1-.398-.28c-.692-.587-.965-1.442-.605-2.067.378-.655 1.323-.833 2.215-.463a3 3 0 0 1 .51.28c.029.485-.095.967-.355 1.378", fill: "#E8E2E2" }),
201
+ React__default["default"].createElement("path", { d: "M1.87 17.24a1.12 1.12 0 1 0 0-2.24 1.12 1.12 0 0 0 0 2.24", fill: "#F9AF2B" }),
202
+ React__default["default"].createElement("path", { d: "M30.123 7.72a2.2 2.2 0 0 1-.437.37c0-1.013-1.5-3.058-3.153-3.418q.162-.206.365-.372l.023-.018c1.65.45 3.052 2.16 3.202 3.438", fill: "#C3C7C9" }),
203
+ React__default["default"].createElement("path", { d: "M25.295 17.4v9.637c0 2.13-1.745 3.225-3.855 3.518-2.707.375-8.128.375-10.835 0-2.11-.29-3.855-1.387-3.855-3.517v-9.637a3.86 3.86 0 0 1 1.354-2.93c.229-.194.412-.436.537-.71h14.767c.12.275.303.518.534.71q.16.135.303.29a3.85 3.85 0 0 1 1.05 2.64", fill: "#1B89E5" }),
204
+ React__default["default"].createElement("path", { d: "M16.568 17.151h-1.093a1.58 1.58 0 0 0-1.58 1.58v.272a.34.34 0 0 1-.34.34h-.272a1.58 1.58 0 0 0-1.58 1.58v1.095a1.58 1.58 0 0 0 1.58 1.58h.272a.34.34 0 0 1 .34.34v.272a1.58 1.58 0 0 0 1.58 1.58h1.093a1.58 1.58 0 0 0 1.58-1.58v-.273a.34.34 0 0 1 .34-.34h.274a1.58 1.58 0 0 0 1.58-1.58v-1.092a1.58 1.58 0 0 0-1.58-1.58h-.273a.34.34 0 0 1-.341-.34v-.274a1.58 1.58 0 0 0-1.58-1.58", fill: "#fff" }),
205
+ React__default["default"].createElement("path", { d: "M24.137 13.762H7.907a.47.47 0 0 1-.471-.47v-2.7a2.583 2.583 0 0 1 2.552-2.554c3.017-.1 9.05-.1 12.067 0a2.583 2.583 0 0 1 2.553 2.552v2.7a.473.473 0 0 1-.471.472", fill: "#E8E2E2" })),
206
+ React__default["default"].createElement("defs", null,
207
+ React__default["default"].createElement("clipPath", { id: "clip0_911_3434" },
208
+ React__default["default"].createElement("path", { fill: "#fff", d: "M0 0h32v32H0z" })))));
209
+ };
210
+
211
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
212
+ const getContents = (t) => {
213
+ return [
107
214
  {
108
- type: SSOStepTypeType.FIRST,
215
+ label: 'Personalized Experience',
216
+ description: 'Your name, gender, and date of birth help us provide tailored health advice and personalized care plans that fit your unique needs.',
217
+ icon: React__default["default"].createElement(PersonalizeIcon, null),
109
218
  },
110
- ],
111
- setSteps: () => false,
112
- goNext: () => false,
113
- goBack: () => false,
114
- addStep: () => false,
115
- });
116
- const SSOStepsProvider = ({ children }) => {
117
- const [steps, setSteps] = React.useState([
118
219
  {
119
- type: SSOStepTypeType.FIRST,
220
+ label: 'Timely Health Updates',
221
+ description: 'We use your phone number and email to send important notifications, health reminders, and updates on new content to keep you informed.',
222
+ icon: React__default["default"].createElement(HealthUpdateIcon, null),
120
223
  },
121
- ]);
122
- const [currentStepIndex, setCurrentStepIndex] = React.useState(0);
123
- return (React__default["default"].createElement(SSOStepsContext.Provider, { value: {
124
- currentStepIndex,
125
- steps,
126
- setSteps,
127
- addStep: (step) => {
128
- setSteps((s) => [...s, step]);
129
- },
130
- goNext: () => {
131
- setCurrentStepIndex((index) => index + 1);
132
- },
133
- goBack: () => {
134
- setCurrentStepIndex((index) => index - 1);
135
- // remove step when go back
136
- setSteps((steps) => steps.slice(0, steps.length - 1));
137
- },
138
- } }, children));
224
+ {
225
+ label: 'Enhanced Security',
226
+ description: 'We use your phone number and email to send important notifications, health reminders, and updates on new content to keep you informed.',
227
+ icon: React__default["default"].createElement(SecurityIcon, null),
228
+ },
229
+ {
230
+ label: 'Quick Customer Support',
231
+ description: 'We use your phone number and email to send important notifications, health reminders, and updates on new content to keep you informed.',
232
+ icon: React__default["default"].createElement(CustomerSupportIcon, null),
233
+ },
234
+ {
235
+ label: 'Service Improvement',
236
+ description: 'We use your phone number and email to send important notifications, health reminders, and updates on new content to keep you informed.',
237
+ icon: React__default["default"].createElement(ServiceIcon, null),
238
+ },
239
+ ];
139
240
  };
140
- const useSSOSteps = () => {
141
- return React__default["default"].useContext(SSOStepsContext);
142
- };
143
-
144
- const SSOPopupWrapper = ({ children, opened, onClose, }) => {
145
- var _a;
146
- const { steps, goBack } = useSSOSteps();
147
- const { locale } = useSSOState();
148
- const showBack = steps.length > 1;
149
- const showClose = steps.length === 1;
150
- const showLogo = steps.length === 1;
151
- const logoType = (_a = index.LOCALE_SPECS[locale]) === null || _a === void 0 ? void 0 : _a.LOGO_TYPE;
152
- const [closeConfirmOpen, setCloseConfirmOpen] = React__default["default"].useState(false);
153
- const onCloseClick = () => {
154
- setCloseConfirmOpen(true);
155
- };
241
+ const CollectInfoTextPopup = () => {
242
+ const { openCollectInfoPopup, setOpenCollectInfoPopup } = useSSOState();
243
+ useTranslations.useTranslations();
244
+ const contents = getContents();
245
+ const [mobileDragOffset, setMobileDragOffset] = React.useState(0);
246
+ const dragStartYRef = React.useRef(0);
247
+ const mobileDragOffsetRef = React.useRef(mobileDragOffset);
248
+ mobileDragOffsetRef.current = mobileDragOffset;
249
+ const throttleSetMobileDragOffset = React.useMemo(() => {
250
+ return throttle__default["default"](setMobileDragOffset, 70);
251
+ }, []);
252
+ React.useEffect(() => {
253
+ if (openCollectInfoPopup) {
254
+ setMobileDragOffset(0);
255
+ }
256
+ }, [openCollectInfoPopup]);
156
257
  return (React__default["default"].createElement(React__default["default"].Fragment, null,
157
- React__default["default"].createElement(index$1.Modal, { opened: opened, onClose: onCloseClick, styles: (theme) => ({
258
+ React__default["default"].createElement("style", { key: mobileDragOffset }, `
259
+ .collect-info-text-popup .mantine-Modal-inner {
260
+ transform: translateY(${Math.round(mobileDragOffset)}px);
261
+ }
262
+ `),
263
+ React__default["default"].createElement(index.Modal, { opened: openCollectInfoPopup, onClose: () => setOpenCollectInfoPopup(false), withCloseButton: false, styles: (theme) => ({
158
264
  body: {
159
- display: 'flex',
160
- flexDirection: 'column',
161
- gap: 24,
162
- padding: '36px 24px',
265
+ padding: '32px 24px',
163
266
  position: 'relative',
164
- background: 'linear-gradient(180deg, #A5D4FF 0%, #FFFFFF 150px)',
165
- overflow: 'auto',
267
+ background: 'linear-gradient(180deg, #91CAFF 0%, #CFE8FF 100px, #FFFFFF 200px)',
166
268
  [theme.fn.smallerThan('sm')]: {
167
269
  height: '100%',
168
270
  },
@@ -171,7 +273,8 @@ const SSOPopupWrapper = ({ children, opened, onClose, }) => {
171
273
  [theme.fn.smallerThan('sm')]: {
172
274
  width: '100%',
173
275
  height: '100%',
174
- borderRadius: 0,
276
+ borderBottomLeftRadius: 0,
277
+ borderBottomRightRadius: 0,
175
278
  maxWidth: '100%',
176
279
  maxHeight: '100%',
177
280
  },
@@ -181,17 +284,283 @@ const SSOPopupWrapper = ({ children, opened, onClose, }) => {
181
284
  padding: 0,
182
285
  left: 0,
183
286
  right: 0,
287
+ top: 120,
288
+ // transform: `translateY(${Math.round(mobileDragOffset)}px)`,
184
289
  display: 'block',
290
+ transition: 'transform 70ms',
185
291
  },
186
292
  },
187
- }), withCloseButton: false },
188
- React__default["default"].createElement("div", { style: {
189
- height: 40,
293
+ }), className: "collect-info-text-popup" },
294
+ React__default["default"].createElement(core.Box, { sx: (theme) => ({
295
+ [theme.fn.largerThan('sm')]: {
296
+ display: 'none',
297
+ },
298
+ padding: 8,
299
+ width: '100%',
300
+ cursor: 'grab',
190
301
  display: 'flex',
191
- alignItems: 'center',
192
- justifyContent: 'space-between',
193
- } },
194
- showBack && (React__default["default"].createElement(index$2.Button, { variant: "white", style: {
302
+ justifyContent: 'center',
303
+ position: 'absolute',
304
+ top: 0,
305
+ left: 0,
306
+ }), draggable: true, onDrag: (e) => {
307
+ if (e.clientY <= 5)
308
+ return;
309
+ throttleSetMobileDragOffset(e.clientY - dragStartYRef.current);
310
+ }, onDragStart: (e) => {
311
+ dragStartYRef.current = e.clientY;
312
+ }, onDragEnd: (e) => {
313
+ if (e.clientY - dragStartYRef.current > 100) {
314
+ setMobileDragOffset(window.innerHeight);
315
+ setTimeout(() => {
316
+ setOpenCollectInfoPopup(false);
317
+ }, 100);
318
+ }
319
+ else {
320
+ throttleSetMobileDragOffset(0);
321
+ }
322
+ }, onTouchStart: (e) => {
323
+ dragStartYRef.current = e.touches[0].clientY;
324
+ }, onTouchMove: (e) => {
325
+ if (e.touches[0].clientY < 0)
326
+ return;
327
+ throttleSetMobileDragOffset(e.touches[0].clientY - dragStartYRef.current);
328
+ }, onTouchEnd: (e) => {
329
+ if (e.changedTouches[0].clientY - dragStartYRef.current > 100) {
330
+ setMobileDragOffset(window.innerHeight);
331
+ setTimeout(() => {
332
+ setOpenCollectInfoPopup(false);
333
+ }, 100);
334
+ }
335
+ else {
336
+ throttleSetMobileDragOffset(0);
337
+ }
338
+ } },
339
+ React__default["default"].createElement(core.Box, { sx: {
340
+ border: '1.5px solid #ADB3BC',
341
+ background: 'gray',
342
+ borderRadius: 3,
343
+ width: 44,
344
+ } })),
345
+ React__default["default"].createElement("div", { style: {
346
+ height: 40,
347
+ } },
348
+ React__default["default"].createElement(index$1.Button, { variant: "white", sx: (theme) => ({
349
+ width: 40,
350
+ height: 40,
351
+ padding: 8,
352
+ background: 'white',
353
+ borderRadius: '100%',
354
+ [theme.fn.smallerThan('sm')]: {
355
+ display: 'none',
356
+ },
357
+ }), onClick: () => setOpenCollectInfoPopup(false) },
358
+ React__default["default"].createElement(arrow.ChevronLeft, null))),
359
+ React__default["default"].createElement(BackgroundHeader$1, null),
360
+ React__default["default"].createElement(core.Stack, { pos: "relative", mt: 100, spacing: 8, style: {
361
+ zIndex: 1,
362
+ } },
363
+ React__default["default"].createElement(index$2.Text, { size: "h4" }, "Why We Need Your Information"),
364
+ React__default["default"].createElement(index$3.Accordion, { styles: {
365
+ item: {
366
+ borderBottomColor: '#E4E8EC',
367
+ paddingBottom: 16,
368
+ marginTop: 16,
369
+ },
370
+ control: {
371
+ padding: 0,
372
+ },
373
+ content: {
374
+ padding: 0,
375
+ marginTop: 8,
376
+ },
377
+ } }, contents.map((item, index) => (React__default["default"].createElement(index$3.Accordion.Item, { key: index, value: item.label },
378
+ React__default["default"].createElement(index$3.Accordion.Control, { icon: item.icon },
379
+ React__default["default"].createElement(index$2.Text, { size: "s3", weight: "semiBold" }, item.label)),
380
+ React__default["default"].createElement(index$3.Accordion.Panel, null,
381
+ React__default["default"].createElement(index$2.Text, { size: "p3" }, item.description))))))))));
382
+ };
383
+
384
+ const ConfirmClosePopup = ({ opened, onCancel, onClose, }) => {
385
+ return (React__default["default"].createElement(index.Modal, { opened: opened, onClose: () => onCancel(), withCloseButton: false, styles: (theme) => ({
386
+ body: {
387
+ padding: '32px 24px',
388
+ position: 'relative',
389
+ background: 'linear-gradient(180deg, #91CAFF 0%, #CFE8FF 100px, #FFFFFF 200px)',
390
+ [theme.fn.smallerThan('sm')]: {
391
+ height: '100%',
392
+ },
393
+ },
394
+ content: {
395
+ [theme.fn.smallerThan('sm')]: {
396
+ width: '100%',
397
+ height: '100%',
398
+ borderBottomLeftRadius: 0,
399
+ borderBottomRightRadius: 0,
400
+ maxWidth: '100%',
401
+ maxHeight: '100%',
402
+ },
403
+ },
404
+ inner: {
405
+ [theme.fn.smallerThan('sm')]: {
406
+ padding: 0,
407
+ left: 0,
408
+ right: 0,
409
+ top: 'unset',
410
+ // transform: `translateY(${Math.round(mobileDragOffset)}px)`,
411
+ display: 'block',
412
+ transition: 'transform 70ms',
413
+ },
414
+ },
415
+ }) },
416
+ React__default["default"].createElement(BackgroundHeader, null),
417
+ React__default["default"].createElement(core.Stack, { pos: "relative", mt: 150, spacing: 8, style: {
418
+ zIndex: 1,
419
+ textAlign: 'center',
420
+ } },
421
+ React__default["default"].createElement(index$2.Text, { size: "h4" }, "Are you sure you want to exit?"),
422
+ React__default["default"].createElement(index$2.Text, { size: "p3" }, "You\u2019re just a step away from completing your account setup. Do you really want to leave?")),
423
+ React__default["default"].createElement(core.Stack, { mt: 32, spacing: 8, align: "center" },
424
+ React__default["default"].createElement(index$1.Button, { variant: "primary", size: "lg", onClick: onCancel, w: "50%", radius: 40 },
425
+ React__default["default"].createElement(index$2.Text, { size: "s2", weight: "regular", color: "inherit" }, "Cancel")),
426
+ React__default["default"].createElement(index$1.Button, { variant: "white", size: "lg", onClick: onClose, fullWidth: true },
427
+ React__default["default"].createElement(index$2.Text, { size: "p2", weight: "regular", color: "gray.6" }, "I want to exit now")))));
428
+ };
429
+ const BackgroundHeader = () => (React__default["default"].createElement("svg", { width: "292", height: "255", viewBox: "0 0 292 255", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: {
430
+ position: 'absolute',
431
+ top: 0,
432
+ left: '50%',
433
+ zIndex: 0,
434
+ transform: 'translateX(-50%)',
435
+ pointerEvents: 'none',
436
+ } },
437
+ React__default["default"].createElement("circle", { opacity: ".2", cx: "146", cy: "109", r: "146", fill: "url(#paint0_linear_908_35161)" }),
438
+ React__default["default"].createElement("circle", { opacity: ".3", cx: "146", cy: "109", r: "85", fill: "url(#paint1_linear_908_35161)" }),
439
+ React__default["default"].createElement("circle", { cx: "146.5", cy: "108.5", r: "47.5", fill: "url(#paint2_linear_908_35161)" }),
440
+ React__default["default"].createElement("circle", { cx: "146.5", cy: "108.5", r: "47", stroke: "url(#paint3_linear_908_35161)" }),
441
+ React__default["default"].createElement("path", { d: "m148.68 89.129-13.51-2.087a4.552 4.552 0 0 0-5.17 4.454v35.009a4.55 4.55 0 0 0 1.586 3.395 4.56 4.56 0 0 0 3.594 1.059l13.5-2.087a4.474 4.474 0 0 0 3.82-4.452V93.58a4.48 4.48 0 0 0-3.82-4.451", fill: "#2D87F3" }),
442
+ React__default["default"].createElement("path", { d: "M164.342 108.002a1.43 1.43 0 0 1-.557 1.132l-4.714 3.643a1.07 1.07 0 0 1-1.563-.281 1.1 1.1 0 0 1-.161-.566v-1.224l-5.085-.025a.54.54 0 0 1-.535-.539v-4.322a.54.54 0 0 1 .538-.538l5.088.004-.009-1.214a1.08 1.08 0 0 1 .598-.962 1.07 1.07 0 0 1 1.127.113l4.716 3.648a1.42 1.42 0 0 1 .557 1.131", fill: "#FF6F4D" }),
443
+ React__default["default"].createElement("path", { d: "M164.342 108.002a1.43 1.43 0 0 1-.557 1.132l-4.714 3.643a1.07 1.07 0 0 1-1.563-.281 1.1 1.1 0 0 1-.161-.566v-1.224l-5.085-.025a.54.54 0 0 1-.535-.539v-4.322a.54.54 0 0 1 .538-.538l5.088.004-.009-1.214a1.08 1.08 0 0 1 .598-.962 1.07 1.07 0 0 1 1.127.113l4.716 3.648a1.42 1.42 0 0 1 .557 1.131m-18.248-2.179v4.324a.54.54 0 0 0 .539.539h3.017a.54.54 0 0 0 .538-.539v-4.324a.54.54 0 0 0-.538-.539h-3.017a.54.54 0 0 0-.539.539m-1.616 4.341a.54.54 0 0 1-.539.539h-.977a1.463 1.463 0 0 1-1.462-1.462v-2.478a1.463 1.463 0 0 1 1.462-1.463h.977a.54.54 0 0 1 .539.539z", fill: "#FF6F4D" }),
444
+ React__default["default"].createElement("defs", null,
445
+ React__default["default"].createElement("linearGradient", { id: "paint0_linear_908_35161", x1: "147.5", y1: "141", x2: "36.5", y2: "30", gradientUnits: "userSpaceOnUse" },
446
+ React__default["default"].createElement("stop", { stopColor: "#fff", stopOpacity: "0" }),
447
+ React__default["default"].createElement("stop", { offset: "1", stopColor: "#fff" })),
448
+ React__default["default"].createElement("linearGradient", { id: "paint1_linear_908_35161", x1: "218.376", y1: "63.134", x2: "61", y2: "109", gradientUnits: "userSpaceOnUse" },
449
+ React__default["default"].createElement("stop", { stopColor: "#fff" }),
450
+ React__default["default"].createElement("stop", { offset: "1", stopColor: "#fff", stopOpacity: "0" })),
451
+ React__default["default"].createElement("linearGradient", { id: "paint2_linear_908_35161", x1: "146.5", y1: "61", x2: "146.5", y2: "156", gradientUnits: "userSpaceOnUse" },
452
+ React__default["default"].createElement("stop", { stopColor: "#fff", stopOpacity: ".6" }),
453
+ React__default["default"].createElement("stop", { offset: "1", stopColor: "#fff", stopOpacity: "0" })),
454
+ React__default["default"].createElement("linearGradient", { id: "paint3_linear_908_35161", x1: "178.979", y1: "98.35", x2: "108.338", y2: "98.35", gradientUnits: "userSpaceOnUse" },
455
+ React__default["default"].createElement("stop", { stopColor: "#fff", stopOpacity: "0" }),
456
+ React__default["default"].createElement("stop", { offset: "1", stopColor: "#fff" })))));
457
+
458
+ var SSOStepTypeType;
459
+ (function (SSOStepTypeType) {
460
+ SSOStepTypeType["FIRST"] = "first";
461
+ SSOStepTypeType["EMAIL"] = "email";
462
+ SSOStepTypeType["VERIFY_PHONE"] = "verify_phone";
463
+ SSOStepTypeType["PASSWORD"] = "password";
464
+ SSOStepTypeType["UPDATE_EMAIL"] = "update_email";
465
+ SSOStepTypeType["FORGOT_PASSWORD_PHONE"] = "forgot_password_phone";
466
+ SSOStepTypeType["FORGOT_PASSWORD_SETUP"] = "forgot_password_setup";
467
+ SSOStepTypeType["OTP"] = "otp";
468
+ SSOStepTypeType["SETUP_FULL"] = "setup_full";
469
+ })(SSOStepTypeType || (SSOStepTypeType = {}));
470
+ const SSOStepsContext = React.createContext({
471
+ currentStepIndex: 0,
472
+ steps: [
473
+ {
474
+ type: SSOStepTypeType.FIRST,
475
+ },
476
+ ],
477
+ setSteps: () => false,
478
+ goNext: () => false,
479
+ goBack: () => false,
480
+ addStep: () => false,
481
+ });
482
+ const SSOStepsProvider = ({ children, defaultSteps, }) => {
483
+ const [steps, setSteps] = React.useState(defaultSteps || [
484
+ {
485
+ type: SSOStepTypeType.FIRST,
486
+ },
487
+ ]);
488
+ const [currentStepIndex, setCurrentStepIndex] = React.useState(0);
489
+ const [shareData, setShareData] = React.useState({});
490
+ return (React__default["default"].createElement(SSOStepsContext.Provider, { value: {
491
+ currentStepIndex,
492
+ steps,
493
+ setSteps,
494
+ addStep: (step) => {
495
+ setSteps((s) => [...s, step]);
496
+ },
497
+ goNext: () => {
498
+ setCurrentStepIndex((index) => index + 1);
499
+ },
500
+ goBack: () => {
501
+ setCurrentStepIndex((index) => index - 1);
502
+ // remove step when go back
503
+ setSteps((steps) => steps.slice(0, steps.length - 1));
504
+ },
505
+ shareData,
506
+ setShareData,
507
+ } }, children));
508
+ };
509
+ const useSSOSteps = () => {
510
+ return React__default["default"].useContext(SSOStepsContext);
511
+ };
512
+
513
+ const SSOPopupWrapper = ({ children, opened, onClose, }) => {
514
+ var _a;
515
+ const { steps, goBack } = useSSOSteps();
516
+ const { locale } = useSSOState();
517
+ const showBack = steps.length > 1;
518
+ const showClose = steps.length === 1;
519
+ const showLogo = steps.length === 1;
520
+ const logoType = (_a = index$4.LOCALE_SPECS[locale]) === null || _a === void 0 ? void 0 : _a.LOGO_TYPE;
521
+ const [closeConfirmOpen, setCloseConfirmOpen] = React__default["default"].useState(false);
522
+ const onCloseClick = () => {
523
+ setCloseConfirmOpen(true);
524
+ };
525
+ return (React__default["default"].createElement(React__default["default"].Fragment, null,
526
+ React__default["default"].createElement(index.Modal, { opened: opened, onClose: onCloseClick, styles: (theme) => ({
527
+ body: {
528
+ display: 'flex',
529
+ flexDirection: 'column',
530
+ gap: 24,
531
+ padding: '36px 24px',
532
+ position: 'relative',
533
+ background: 'linear-gradient(180deg, #A5D4FF 0%, #FFFFFF 150px)',
534
+ overflow: 'auto',
535
+ [theme.fn.smallerThan('sm')]: {
536
+ height: '100%',
537
+ },
538
+ },
539
+ content: {
540
+ [theme.fn.smallerThan('sm')]: {
541
+ width: '100%',
542
+ height: '100%',
543
+ borderRadius: 0,
544
+ maxWidth: '100%',
545
+ maxHeight: '100%',
546
+ },
547
+ },
548
+ inner: {
549
+ [theme.fn.smallerThan('sm')]: {
550
+ padding: 0,
551
+ left: 0,
552
+ right: 0,
553
+ display: 'block',
554
+ },
555
+ },
556
+ }), withCloseButton: false },
557
+ React__default["default"].createElement("div", { style: {
558
+ height: 40,
559
+ display: 'flex',
560
+ alignItems: 'center',
561
+ justifyContent: 'space-between',
562
+ } },
563
+ showBack && (React__default["default"].createElement(index$1.Button, { variant: "white", style: {
195
564
  width: 40,
196
565
  height: 40,
197
566
  padding: 8,
@@ -200,21 +569,22 @@ const SSOPopupWrapper = ({ children, opened, onClose, }) => {
200
569
  }, onClick: goBack },
201
570
  React__default["default"].createElement(arrow.ChevronLeft, null))),
202
571
  showLogo && (React__default["default"].createElement(logoIcon.LogoIcon, { type: logoType, height: 32, width: 'unset' })),
203
- showClose && (React__default["default"].createElement(index$2.Button, { variant: "white", style: {
572
+ showClose && (React__default["default"].createElement(index$1.Button, { variant: "white", style: {
204
573
  width: 40,
205
574
  height: 40,
206
575
  padding: 8,
207
576
  background: 'white',
208
577
  borderRadius: '100%',
209
578
  }, onClick: onCloseClick },
210
- React__default["default"].createElement(core.Close, null)))),
579
+ React__default["default"].createElement(core$1.Close, null)))),
211
580
  React__default["default"].createElement("div", { style: {
212
581
  flex: 1,
213
582
  } }, children)),
214
- React__default["default"].createElement(index$1.Modal, { opened: closeConfirmOpen, onClose: () => setCloseConfirmOpen(false), withCloseButton: false },
215
- "are you sure",
216
- React__default["default"].createElement(index$2.Button, { onClick: onClose }, "Yes"),
217
- React__default["default"].createElement(index$2.Button, { onClick: () => setCloseConfirmOpen(false) }, "No"))));
583
+ React__default["default"].createElement(ConfirmClosePopup, { opened: closeConfirmOpen, onCancel: () => setCloseConfirmOpen(false), onClose: () => {
584
+ setCloseConfirmOpen(false);
585
+ onClose === null || onClose === void 0 ? void 0 : onClose();
586
+ } }),
587
+ React__default["default"].createElement(CollectInfoTextPopup, null)));
218
588
  };
219
589
 
220
590
  const SSO_V2_PATHS = {
@@ -229,12 +599,16 @@ const SSO_V2_PATHS = {
229
599
  REGISTER_BY_SEND_OTP: 'login/login-with-sms',
230
600
  SEND_OTP: 'login/sms/sent-otp',
231
601
  VERIFY_BY_OTP: 'login/phone-verify-code',
232
- LOGIN_BY_PASSWORD: 'member/login-by-phone'
602
+ LOGIN_BY_PASSWORD: 'member/login-by-phone',
603
+ UPDATE_PHONE_SEND_OTP: 'sms-social/sent-otp',
604
+ UPDATE_PHONE_VERIFY_OTP: 'sms-social/phone-verify-code',
233
605
  },
234
606
  ZALO: {
235
607
  REGISTER_BY_SEND_OTP: 'login/login-with-zalo',
236
608
  SEND_OTP: 'login/zalo/sent-otp',
237
- VERIFY_BY_OTP: 'login/zalo-verify-code'
609
+ VERIFY_BY_OTP: 'login/zalo-verify-code',
610
+ UPDATE_PHONE_SEND_OTP: 'sms-social/zalo/sent-otp',
611
+ UPDATE_PHONE_VERIFY_OTP: 'sms-social/zalo-verify-code',
238
612
  },
239
613
  RESET_PASSWORD: 'login/reset-password',
240
614
  CHECK_USER_EXIST: 'member/check-user-exist',
@@ -242,9 +616,9 @@ const SSO_V2_PATHS = {
242
616
  };
243
617
 
244
618
  const locale = process.env.UNIFY_LOCALE || 'vi-VN';
245
- const websiteId = index.LOCALE_SPECS[locale].SITE_ID;
246
- index.LOCALE_SPECS[locale].PHONE;
247
- const allAvailableAreaCodes = Object.keys(index.LOCALE_SPECS).map((locale) => index.LOCALE_SPECS[locale].PHONE);
619
+ const websiteId = index$4.LOCALE_SPECS[locale].SITE_ID;
620
+ index$4.LOCALE_SPECS[locale].PHONE;
621
+ const allAvailableAreaCodes = Object.keys(index$4.LOCALE_SPECS).map((locale) => index$4.LOCALE_SPECS[locale].PHONE);
248
622
  const getSSOV2ApiUrl = (path) => {
249
623
  return `${routing.getCurrentSsoUrl(locale)}/api/v2/${path}`;
250
624
  };
@@ -256,11 +630,14 @@ const BEARER_TOKEN_COOKIE = 'hhg_user_token';
256
630
  const fetchSSOV2Api = (path, options = {}, noAuth) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
257
631
  var _a;
258
632
  let response;
259
- const authToken = noAuth ? '' : (_a = document.cookie
260
- .split('; ')
261
- .find((row) => row.startsWith(BEARER_TOKEN_COOKIE))) === null || _a === void 0 ? void 0 : _a.split('=')[1];
633
+ const authToken = noAuth
634
+ ? ''
635
+ : (_a = document.cookie
636
+ .split('; ')
637
+ .find((row) => row.startsWith(BEARER_TOKEN_COOKIE))) === null || _a === void 0 ? void 0 : _a.split('=')[1];
262
638
  try {
263
- response = yield fetch(getSSOV2ApiUrl(path), authToken ? Object.assign(Object.assign({}, options), { headers: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.headers), { Authorization: `Bearer ${authToken}` }) }) : options);
639
+ response = yield fetch(getSSOV2ApiUrl(path), authToken
640
+ ? Object.assign(Object.assign({}, options), { headers: Object.assign({ Authorization: `Bearer ${authToken}` }, options === null || options === void 0 ? void 0 : options.headers) }) : options);
264
641
  }
265
642
  catch (error) {
266
643
  console.error(error);
@@ -271,11 +648,14 @@ const fetchSSOV2Api = (path, options = {}, noAuth) => tslib_es6.__awaiter(void 0
271
648
  const fetchSSOApi = (path, options = {}, noAuth) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
272
649
  var _b;
273
650
  let response;
274
- const authToken = noAuth ? '' : (_b = document.cookie
275
- .split('; ')
276
- .find((row) => row.startsWith(BEARER_TOKEN_COOKIE))) === null || _b === void 0 ? void 0 : _b.split('=')[1];
651
+ const authToken = noAuth
652
+ ? ''
653
+ : (_b = document.cookie
654
+ .split('; ')
655
+ .find((row) => row.startsWith(BEARER_TOKEN_COOKIE))) === null || _b === void 0 ? void 0 : _b.split('=')[1];
277
656
  try {
278
- response = yield fetch(getSSOApiUrl(path), authToken ? Object.assign(Object.assign({}, options), { headers: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.headers), { Authorization: `Bearer ${authToken}` }) }) : options);
657
+ response = yield fetch(getSSOApiUrl(path), authToken
658
+ ? Object.assign(Object.assign({}, options), { headers: Object.assign({ Authorization: `Bearer ${authToken}` }, options === null || options === void 0 ? void 0 : options.headers) }) : options);
279
659
  }
280
660
  catch (error) {
281
661
  console.error(error);
@@ -284,17 +664,17 @@ const fetchSSOApi = (path, options = {}, noAuth) => tslib_es6.__awaiter(void 0,
284
664
  return response === null || response === void 0 ? void 0 : response.json();
285
665
  });
286
666
  const resetPassword = (password, confirmPassword) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
667
+ const formData = new FormData();
668
+ formData.append('password', password);
669
+ formData.append('confirm-password', confirmPassword);
287
670
  return fetchSSOV2Api(SSO_V2_PATHS.RESET_PASSWORD, {
288
671
  method: 'POST',
289
- body: JSON.stringify({
290
- "password": password,
291
- "confirm-password": confirmPassword
292
- }),
672
+ body: formData,
293
673
  });
294
674
  });
295
675
  // "email":"kenny_test2201_11@mailinator.com"
296
676
  // "phone_number":"906911910"
297
- const checkUserExist = ({ email, phone // no +
677
+ const checkUserExist = ({ email, phone, // no +
298
678
  }) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
299
679
  // "provider": "email",
300
680
  // "is_pass": true,
@@ -308,7 +688,7 @@ const checkUserExist = ({ email, phone // no +
308
688
  }
309
689
  return fetchSSOV2Api(SSO_V2_PATHS.CHECK_USER_EXIST, {
310
690
  method: 'POST',
311
- body: formData
691
+ body: formData,
312
692
  });
313
693
  });
314
694
  // "name": "Huy Tran 888",
@@ -316,33 +696,67 @@ const checkUserExist = ({ email, phone // no +
316
696
  // "email":"kenny_test2201_02@mailinator.com", // optional chỉ require khi source là care | ecom
317
697
  // "password": "Kenny2103",
318
698
  // "confirm_password":"Kenny2103",
319
- // "phone_number":"906911912", // require khi user register bằng email hoặc social
699
+ // "phone_number":"906911912", // require khi user register bằng email hoặc social
320
700
  // "area_code":"+84", // require khi có phone number
321
701
  // "gender": 1,
322
- // "validate": false, // true validate sau khi validate xong truyền false để update
702
+ // "validate": false, // true validate sau khi validate xong truyền false để update
323
703
  // "source": "care" | "ecom" // default sẽ ko require email. nếu source là care sẽ require email. ==> support cho business care
324
704
  const updateUserInfo = (data) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
325
705
  const formData = new FormData();
326
706
  Object.keys(data).forEach((key) => {
327
- if (data[key]) {
707
+ if (typeof data[key] !== 'undefined' && data[key] !== null) {
328
708
  formData.append(key, data[key]);
329
709
  }
330
710
  });
331
711
  return fetchSSOV2Api(SSO_V2_PATHS.UPDATE_USER_INFO, {
332
712
  method: 'POST',
333
- body: formData
713
+ body: formData,
714
+ });
715
+ });
716
+ const GoogleAuthClientId = constantsIsProduction.isProduction
717
+ ? '289442006438-040a42cbidr6v5d178f3iqi9q95821r3.apps.googleusercontent.com'
718
+ : '289442006438-cihobuq1h3r4426pur7u0e43fqdnep59.apps.googleusercontent.com';
719
+ const FacebookAppId = '2759888574045636';
720
+ const getUserInfo = () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
721
+ return fetchSSOApi('user/profile', {
722
+ method: 'POST',
334
723
  });
335
724
  });
336
- const GoogleAuthClientId = constantsIsProduction.isProduction ? '289442006438-040a42cbidr6v5d178f3iqi9q95821r3.apps.googleusercontent.com' : '289442006438-cihobuq1h3r4426pur7u0e43fqdnep59.apps.googleusercontent.com';
337
- const FacebookAppId = '2759888574045636';
725
+ const handleAuthSuccess = (res) => {
726
+ (res === null || res === void 0 ? void 0 : res.token) &&
727
+ miscCookieHelper.setCookie(BEARER_TOKEN_COOKIE, res.token, {
728
+ domain: window.location.hostname === 'localhost'
729
+ ? 'localhost'
730
+ : `.${constantsDomainLocales.domainLocales[process.env.UNIFY_LOCALE || 'vi-VN']}`,
731
+ expires: new Date(res.expire_in * 1000).toUTCString(),
732
+ });
733
+ (res === null || res === void 0 ? void 0 : res.refresh_token) &&
734
+ miscCookieHelper.setCookie(index$4.BEARER_REFRESH_TOKEN_COOKIE, res.refresh_token, {
735
+ domain: window.location.hostname === 'localhost'
736
+ ? 'localhost'
737
+ : `.${constantsDomainLocales.domainLocales[process.env.UNIFY_LOCALE || 'vi-VN']}`,
738
+ });
739
+ };
338
740
 
741
+ const loginByEmailPassword = (email, password) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
742
+ const formData = new FormData();
743
+ formData.append('email', email);
744
+ formData.append('password', password);
745
+ return fetchSSOV2Api(SSO_V2_PATHS.EMAIL.LOGIN_BY_PASSWORD, {
746
+ method: 'POST',
747
+ body: formData,
748
+ headers: {
749
+ Authorization: `Basic aGhnOjEyMzQ1Njc4OUBAIyQhQCQjJSRe`,
750
+ },
751
+ });
752
+ });
339
753
  const registerBySendEmailOTP = (email) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
340
754
  const formData = new FormData();
341
755
  formData.append('email', email);
342
756
  formData.append('website_id', websiteId);
343
757
  return fetchSSOV2Api(SSO_V2_PATHS.EMAIL.REGISTER_BY_SEND_OTP, {
344
758
  method: 'POST',
345
- body: formData
759
+ body: formData,
346
760
  });
347
761
  });
348
762
  const resendEmailOTP = (email) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
@@ -350,7 +764,7 @@ const resendEmailOTP = (email) => tslib_es6.__awaiter(void 0, void 0, void 0, fu
350
764
  formData.append('email', email);
351
765
  return fetchSSOV2Api(SSO_V2_PATHS.EMAIL.SEND_OTP, {
352
766
  method: 'POST',
353
- body: formData
767
+ body: formData,
354
768
  });
355
769
  });
356
770
  const verifyByEmailOTP = (email, otpCode) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
@@ -359,7 +773,7 @@ const verifyByEmailOTP = (email, otpCode) => tslib_es6.__awaiter(void 0, void 0,
359
773
  formData.append('code', otpCode);
360
774
  return fetchSSOV2Api(SSO_V2_PATHS.EMAIL.VERIFY_BY_OTP, {
361
775
  method: 'POST',
362
- body: formData
776
+ body: formData,
363
777
  });
364
778
  });
365
779
 
@@ -369,13 +783,12 @@ const SSOEmailScreen = ({ hidden, }) => {
369
783
  return (React__default["default"].createElement("form", { style: {
370
784
  display: hidden ? 'none' : 'block',
371
785
  }, onSubmit: (e) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
372
- var _a, _b, _c;
786
+ var _a, _b, _c, _d;
373
787
  e.preventDefault();
374
788
  const email = e.currentTarget.email.value;
375
789
  const existRes = yield checkUserExist({ email });
376
790
  if ((existRes === null || existRes === void 0 ? void 0 : existRes._status) === 1) {
377
- if (((_a = existRes._data) === null || _a === void 0 ? void 0 : _a.is_pass) &&
378
- ((_b = existRes._data) === null || _b === void 0 ? void 0 : _b.is_status) === 'Active') {
791
+ if ((_a = existRes._data) === null || _a === void 0 ? void 0 : _a.is_pass) {
379
792
  // go to password screen
380
793
  addStep({
381
794
  type: SSOStepTypeType.PASSWORD,
@@ -386,38 +799,82 @@ const SSOEmailScreen = ({ hidden, }) => {
386
799
  goNext();
387
800
  }
388
801
  else {
802
+ let res;
803
+ if (!((_b = existRes._data) === null || _b === void 0 ? void 0 : _b.provider)) {
804
+ res = yield registerBySendEmailOTP(email);
805
+ }
806
+ else {
807
+ res = yield resendEmailOTP(email);
808
+ }
809
+ if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
810
+ setErrMsg(((_c = res._messages) === null || _c === void 0 ? void 0 : _c[0]) || 'API error');
811
+ return;
812
+ }
389
813
  // go to register screen
390
- registerBySendEmailOTP(email);
391
814
  addStep({
392
815
  type: SSOStepTypeType.OTP,
393
816
  config: {
394
817
  email,
395
818
  otpType: 'email',
819
+ afterAction: 'setup',
396
820
  },
397
821
  });
398
822
  goNext();
399
823
  }
400
824
  }
401
825
  else {
402
- setErrMsg(((_c = existRes._messages) === null || _c === void 0 ? void 0 : _c[0]) || 'api error');
826
+ setErrMsg(((_d = existRes._messages) === null || _d === void 0 ? void 0 : _d[0]) || 'api error');
403
827
  }
404
828
  }) },
405
- React__default["default"].createElement(core$1.Stack, { spacing: 8 },
406
- React__default["default"].createElement(index$3.Text, { size: "s1", weight: "semiBold" }, "Continue with email"),
407
- React__default["default"].createElement(index$3.Text, { size: "p4" }, "S\u1EED d\u1EE5ng email c\u1EE7a b\u1EA1n \u0111\u1EC3 ti\u1EBFp t\u1EE5c \u0111\u0103ng nh\u1EADp ho\u1EB7c \u0111\u0103ng k\u00FD")),
408
- React__default["default"].createElement(index$4.Input, { name: "email", placeholder: "Email c\u1EE7a b\u1EA1n", error: errMsg || undefined, type: "email", required: true, mt: 24 }),
409
- React__default["default"].createElement(index$2.Button, { type: "submit", size: "lg", variant: "primary", fullWidth: true, mt: 16 }, "Verify Your Email")));
829
+ React__default["default"].createElement(core.Stack, { spacing: 8 },
830
+ React__default["default"].createElement(index$2.Text, { size: "s1", weight: "semiBold" }, "Continue with email"),
831
+ React__default["default"].createElement(index$2.Text, { size: "p4" }, "S\u1EED d\u1EE5ng email c\u1EE7a b\u1EA1n \u0111\u1EC3 ti\u1EBFp t\u1EE5c \u0111\u0103ng nh\u1EADp ho\u1EB7c \u0111\u0103ng k\u00FD")),
832
+ React__default["default"].createElement(index$3.Input, { name: "email", placeholder: "Email c\u1EE7a b\u1EA1n", error: errMsg || undefined, type: "email", required: true, mt: 24 }),
833
+ React__default["default"].createElement(index$1.Button, { type: "submit", size: "lg", variant: "primary", fullWidth: true, mt: 16 }, "Verify Your Email")));
834
+ };
835
+
836
+ const splitPhone = (phone) => {
837
+ var _a, _b;
838
+ if (!phone)
839
+ return { areaCode: undefined, phoneNumber: undefined };
840
+ let areaCode = '';
841
+ let phoneNumber = phone;
842
+ if (phone.startsWith('+')) {
843
+ areaCode =
844
+ ((_a = phone.match(new RegExp(`^\\+(${allAvailableAreaCodes
845
+ .map((c) => c.replace('+', ''))
846
+ .join('|')})`))) === null || _a === void 0 ? void 0 : _a[0]) || '';
847
+ phoneNumber = phone.slice(areaCode.length);
848
+ }
849
+ else {
850
+ areaCode =
851
+ ((_b = phone.match(new RegExp(`^(${allAvailableAreaCodes
852
+ .map((c) => c.replace('+', ''))
853
+ .join('|')})`))) === null || _b === void 0 ? void 0 : _b[0]) || '';
854
+ phoneNumber = phone.slice(areaCode.length);
855
+ if (areaCode) {
856
+ areaCode = `+${areaCode}`;
857
+ }
858
+ }
859
+ return { areaCode, phoneNumber };
410
860
  };
411
861
 
412
862
  // "phone_number":"906911910",
413
863
  // "password":"Kenny2103!"
414
864
  const loginByPhonePassword = (phone, password) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
415
865
  const formData = new FormData();
416
- formData.append('phone_number', phone);
866
+ let { phoneNumber } = splitPhone(phone);
867
+ phoneNumber = phoneNumber.startsWith('0')
868
+ ? phoneNumber.substring(1)
869
+ : phoneNumber;
870
+ formData.append('phone_number', phoneNumber);
417
871
  formData.append('password', password);
418
872
  return fetchSSOV2Api(SSO_V2_PATHS.PHONE.LOGIN_BY_PASSWORD, {
419
873
  method: 'POST',
420
- body: formData
874
+ body: formData,
875
+ headers: {
876
+ Authorization: 'Basic aGhnOjEyMzQ1Njc4OUBAIyQhQCQjJSRe',
877
+ },
421
878
  }, true);
422
879
  });
423
880
  // "phone_number": "906911910",
@@ -429,7 +886,7 @@ const registerBySendPhoneOTP = (phone, areaCode) => tslib_es6.__awaiter(void 0,
429
886
  formData.append('website_id', websiteId);
430
887
  return fetchSSOV2Api(SSO_V2_PATHS.PHONE.REGISTER_BY_SEND_OTP, {
431
888
  method: 'POST',
432
- body: formData
889
+ body: formData,
433
890
  });
434
891
  });
435
892
  // "phone_number": "906911910",
@@ -440,7 +897,7 @@ const resendPhoneOTP = (phone, areaCode) => tslib_es6.__awaiter(void 0, void 0,
440
897
  formData.append('area_code', areaCode);
441
898
  return fetchSSOV2Api(SSO_V2_PATHS.PHONE.SEND_OTP, {
442
899
  method: 'POST',
443
- body: formData
900
+ body: formData,
444
901
  });
445
902
  });
446
903
  // "otp_code":"212616",
@@ -455,27 +912,25 @@ const verifyByPhoneOTP = (phone, areaCode, otpCode) => tslib_es6.__awaiter(void
455
912
  method: 'POST',
456
913
  body: formData,
457
914
  });
458
- });
459
-
460
- const splitPhone = (phone) => {
461
- var _a, _b;
462
- if (!phone)
463
- return { areaCode: '', phoneNumber: '' };
464
- let areaCode = '';
465
- let phoneNumber = phone;
466
- if (phone.startsWith('+')) {
467
- areaCode = ((_a = phone.match(new RegExp(`^\\+(${allAvailableAreaCodes.map(c => c.replace('+', '')).join('|')})`))) === null || _a === void 0 ? void 0 : _a[0]) || '';
468
- phoneNumber = phone.slice(areaCode.length);
469
- }
470
- else {
471
- areaCode = ((_b = phone.match(new RegExp(`^(${allAvailableAreaCodes.map(c => c.replace('+', '')).join('|')})`))) === null || _b === void 0 ? void 0 : _b[0]) || '';
472
- phoneNumber = phone.slice(areaCode.length);
473
- if (areaCode) {
474
- areaCode = `+${areaCode}`;
475
- }
476
- }
477
- return { areaCode, phoneNumber };
478
- };
915
+ });
916
+ const resendUpdatePhoneOTP = (phone, areaCode) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
917
+ const formData = new FormData();
918
+ formData.append('phone_number', phone);
919
+ formData.append('area_code', areaCode);
920
+ return fetchSSOV2Api(SSO_V2_PATHS.PHONE.UPDATE_PHONE_SEND_OTP, {
921
+ method: 'POST',
922
+ body: formData,
923
+ });
924
+ });
925
+ const verifyUpdatePhoneOTP = (areaCode, otpCode) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
926
+ const formData = new FormData();
927
+ formData.append('otp_code', otpCode);
928
+ formData.append('area_code', areaCode);
929
+ return fetchSSOV2Api(SSO_V2_PATHS.PHONE.UPDATE_PHONE_VERIFY_OTP, {
930
+ method: 'POST',
931
+ body: formData,
932
+ });
933
+ });
479
934
 
480
935
  const loginBySocial = (token, social) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
481
936
  const formData = new FormData();
@@ -485,6 +940,9 @@ const loginBySocial = (token, social) => tslib_es6.__awaiter(void 0, void 0, voi
485
940
  return fetchSSOV2Api(SSO_V2_PATHS.LOGIN_BY_SOCIAL, {
486
941
  method: 'POST',
487
942
  body: formData,
943
+ headers: {
944
+ Authorization: `Basic aGhnOjEyMzQ1Njc4OUBAIyQhQCQjJSRe`,
945
+ },
488
946
  });
489
947
  });
490
948
 
@@ -508,7 +966,7 @@ const resendZaloOTP = (phone, areaCode) => tslib_es6.__awaiter(void 0, void 0, v
508
966
  formData.append('area_code', areaCode);
509
967
  return fetchSSOV2Api(SSO_V2_PATHS.ZALO.SEND_OTP, {
510
968
  method: 'POST',
511
- body: formData
969
+ body: formData,
512
970
  });
513
971
  });
514
972
  // "otp_code":"212616",
@@ -521,10 +979,43 @@ const verifyByZaloOTP = (phone, areaCode, otpCode) => tslib_es6.__awaiter(void 0
521
979
  formData.append('area_code', areaCode);
522
980
  return fetchSSOV2Api(SSO_V2_PATHS.ZALO.VERIFY_BY_OTP, {
523
981
  method: 'POST',
524
- body: formData
982
+ body: formData,
983
+ });
984
+ });
985
+ const resendUpdatePhoneZaloOTP = (phone, areaCode) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
986
+ const formData = new FormData();
987
+ formData.append('phone_number', phone);
988
+ formData.append('area_code', areaCode);
989
+ return fetchSSOV2Api(SSO_V2_PATHS.ZALO.UPDATE_PHONE_SEND_OTP, {
990
+ method: 'POST',
991
+ body: formData,
992
+ });
993
+ });
994
+ const verifyUpdatePhoneZaloOTP = (phone, areaCode, otpCode) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
995
+ const formData = new FormData();
996
+ formData.append('phone_number', phone);
997
+ formData.append('otp_code', otpCode);
998
+ formData.append('area_code', areaCode);
999
+ return fetchSSOV2Api(SSO_V2_PATHS.ZALO.UPDATE_PHONE_VERIFY_OTP, {
1000
+ method: 'POST',
1001
+ body: formData,
525
1002
  });
526
1003
  });
527
1004
 
1005
+ const CollectInfoText = () => {
1006
+ const { setOpenCollectInfoPopup } = useSSOState();
1007
+ return (React__default["default"].createElement(index$2.Text, { size: "p4", onClick: () => {
1008
+ setOpenCollectInfoPopup(true);
1009
+ }, color: "blue.6", style: {
1010
+ cursor: 'pointer',
1011
+ } },
1012
+ React__default["default"].createElement(other.Info, { size: 16, color: '#2D87F3', style: {
1013
+ verticalAlign: 'sub',
1014
+ } }),
1015
+ ' ',
1016
+ "Why We Need Your Information?"));
1017
+ };
1018
+
528
1019
  const MailIcon = (props) => (React__default["default"].createElement("svg", Object.assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
529
1020
  React__default["default"].createElement("g", { clipPath: "url(#clip0_869_25628)" },
530
1021
  React__default["default"].createElement("rect", { width: "24", height: "24", rx: "12", fill: "#00B16A" }),
@@ -533,7 +1024,7 @@ const MailIcon = (props) => (React__default["default"].createElement("svg", Obje
533
1024
  React__default["default"].createElement("clipPath", { id: "clip0_869_25628" },
534
1025
  React__default["default"].createElement("path", { fill: "#fff", d: "M0 0h24v24H0z" })))));
535
1026
 
536
- const StyledPhone = styled__default["default"](index$4.Phone) `
1027
+ const StyledPhone = styled__default["default"](index$3.Phone) `
537
1028
  position: relative;
538
1029
  .PhoneInputCountry {
539
1030
  background: unset;
@@ -563,31 +1054,30 @@ const SSOFirstScreen = ({ hidden }) => {
563
1054
  const [phone, setPhone] = React__default["default"].useState('');
564
1055
  const [errMsg, setErrMsg] = React__default["default"].useState('');
565
1056
  const { locale, onClose } = useSSOState();
566
- const { addStep, goNext } = useSSOSteps();
1057
+ const { addStep, goNext, setShareData } = useSSOSteps();
567
1058
  const handleLoginBySocial = (credential, provider) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
568
- var _a, _b, _c, _d, _e;
1059
+ var _a, _b, _c, _d;
569
1060
  const res = yield loginBySocial(credential, provider);
570
1061
  if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
571
- // TODO: set token, get profile, determin if need update info or just login
572
- miscCookieHelper.setCookie(index.BEARER_TOKEN_COOKIE, (_a = res._data) === null || _a === void 0 ? void 0 : _a.token, {
573
- domain: window.location.hostname === 'localhost'
574
- ? 'localhost'
575
- : `.${constantsDomainLocales.domainLocales[process.env.UNIFY_LOCALE || 'vi-VN']}`,
576
- expires: new Date(res._data.expire_in * 1000).toUTCString(),
577
- });
578
- const userInfo = yield fetchSSOApi('user/profile');
1062
+ handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
1063
+ const userInfo = yield getUserInfo();
579
1064
  if ((userInfo === null || userInfo === void 0 ? void 0 : userInfo._status) === 1) {
580
- if ((_b = userInfo._data) === null || _b === void 0 ? void 0 : _b.is_new) {
1065
+ setShareData({
1066
+ authMethod: provider,
1067
+ });
1068
+ if ((_a = userInfo._data) === null || _a === void 0 ? void 0 : _a.is_new) {
1069
+ setShareData((a) => (Object.assign(Object.assign({}, a), { authFlow: 'register' })));
581
1070
  addStep({
582
1071
  type: SSOStepTypeType.SETUP_FULL,
583
1072
  config: {
584
- userInfo,
1073
+ userInfo: userInfo._data,
585
1074
  disabledEmail: true,
586
1075
  },
587
1076
  });
588
1077
  goNext();
589
1078
  }
590
- else if (!((_c = userInfo._data) === null || _c === void 0 ? void 0 : _c.phone_verified)) {
1079
+ else if (!((_b = userInfo._data) === null || _b === void 0 ? void 0 : _b.phone_verified)) {
1080
+ setShareData((a) => (Object.assign(Object.assign({}, a), { authFlow: 'verify-phone' })));
591
1081
  addStep({
592
1082
  type: SSOStepTypeType.VERIFY_PHONE,
593
1083
  });
@@ -598,11 +1088,11 @@ const SSOFirstScreen = ({ hidden }) => {
598
1088
  }
599
1089
  }
600
1090
  else {
601
- setErrMsg(((_d = userInfo === null || userInfo === void 0 ? void 0 : userInfo._messages) === null || _d === void 0 ? void 0 : _d[0]) || 'API error');
1091
+ setErrMsg(((_c = userInfo === null || userInfo === void 0 ? void 0 : userInfo._messages) === null || _c === void 0 ? void 0 : _c[0]) || 'API error');
602
1092
  }
603
1093
  }
604
1094
  else {
605
- setErrMsg(((_e = res === null || res === void 0 ? void 0 : res._messages) === null || _e === void 0 ? void 0 : _e[0]) || 'API error');
1095
+ setErrMsg(((_d = res === null || res === void 0 ? void 0 : res._messages) === null || _d === void 0 ? void 0 : _d[0]) || 'API error');
606
1096
  }
607
1097
  });
608
1098
  React.useEffect(() => {
@@ -636,64 +1126,101 @@ const SSOFirstScreen = ({ hidden }) => {
636
1126
  };
637
1127
  }, []);
638
1128
  const onClickContinueZalo = () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
639
- var _f, _g, _h;
1129
+ var _e, _f, _g, _h;
640
1130
  const { areaCode, phoneNumber } = splitPhone(phone);
641
1131
  const userExist = yield checkUserExist({ phone: phoneNumber });
642
1132
  if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
643
- if (((_f = userExist._data) === null || _f === void 0 ? void 0 : _f.is_pass) && ((_g = userExist._data) === null || _g === void 0 ? void 0 : _g.is_status) === 'Active') {
1133
+ setShareData({
1134
+ authMethod: 'phone',
1135
+ });
1136
+ if ((_e = userExist._data) === null || _e === void 0 ? void 0 : _e.is_pass) {
1137
+ setShareData((a) => (Object.assign(Object.assign({}, a), { authFlow: 'login' })));
644
1138
  addStep({
645
1139
  type: SSOStepTypeType.PASSWORD,
646
1140
  config: {
647
1141
  phone,
648
1142
  },
649
1143
  });
1144
+ goNext();
650
1145
  }
651
1146
  else {
652
- registerBySendZaloOTP(phoneNumber, areaCode);
1147
+ let res;
1148
+ if (!((_f = userExist._data) === null || _f === void 0 ? void 0 : _f.provider)) {
1149
+ res = yield registerBySendZaloOTP(phoneNumber, areaCode);
1150
+ }
1151
+ else {
1152
+ res = yield resendZaloOTP(phoneNumber, areaCode);
1153
+ }
1154
+ if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
1155
+ setErrMsg(((_g = res._messages) === null || _g === void 0 ? void 0 : _g[0]) || 'API error');
1156
+ return;
1157
+ }
1158
+ setShareData((a) => (Object.assign(Object.assign({}, a), { authFlow: 'register' })));
653
1159
  addStep({
654
1160
  type: SSOStepTypeType.OTP,
655
1161
  config: {
656
1162
  phone,
657
1163
  otpType: 'phone-zalo',
1164
+ afterAction: 'setup',
658
1165
  },
659
1166
  });
1167
+ goNext();
660
1168
  }
661
- goNext();
662
1169
  }
663
1170
  else {
664
1171
  setErrMsg(((_h = userExist === null || userExist === void 0 ? void 0 : userExist._messages) === null || _h === void 0 ? void 0 : _h[0]) || 'API error');
665
1172
  }
666
1173
  });
667
1174
  const onClickContinuePhone = () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
668
- var _j, _k, _l;
1175
+ var _j, _k, _l, _m;
669
1176
  const { areaCode, phoneNumber } = splitPhone(phone);
670
1177
  const userExist = yield checkUserExist({ phone: phoneNumber });
671
1178
  if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
672
- if (((_j = userExist._data) === null || _j === void 0 ? void 0 : _j.is_pass) && ((_k = userExist._data) === null || _k === void 0 ? void 0 : _k.is_status) === 'Active') {
1179
+ setShareData({
1180
+ authMethod: 'phone',
1181
+ });
1182
+ if ((_j = userExist._data) === null || _j === void 0 ? void 0 : _j.is_pass) {
1183
+ setShareData((a) => (Object.assign(Object.assign({}, a), { authFlow: 'login' })));
673
1184
  addStep({
674
1185
  type: SSOStepTypeType.PASSWORD,
675
1186
  config: {
676
1187
  phone,
677
1188
  },
678
1189
  });
1190
+ goNext();
679
1191
  }
680
1192
  else {
681
- registerBySendPhoneOTP(phoneNumber, areaCode);
1193
+ let res;
1194
+ if (!((_k = userExist._data) === null || _k === void 0 ? void 0 : _k.provider)) {
1195
+ res = yield registerBySendPhoneOTP(phoneNumber, areaCode);
1196
+ }
1197
+ else {
1198
+ res = yield resendPhoneOTP(phoneNumber, areaCode);
1199
+ }
1200
+ if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
1201
+ setErrMsg(((_l = res._messages) === null || _l === void 0 ? void 0 : _l[0]) || 'API error');
1202
+ return;
1203
+ }
1204
+ setShareData((a) => (Object.assign(Object.assign({}, a), { authFlow: 'register' })));
682
1205
  addStep({
683
1206
  type: SSOStepTypeType.OTP,
684
1207
  config: {
685
1208
  phone,
686
1209
  otpType: 'phone-sms',
1210
+ afterAction: 'setup',
687
1211
  },
688
1212
  });
1213
+ goNext();
689
1214
  }
690
- goNext();
691
1215
  }
692
1216
  else {
693
- setErrMsg(((_l = userExist === null || userExist === void 0 ? void 0 : userExist._messages) === null || _l === void 0 ? void 0 : _l[0]) || 'API error');
1217
+ setErrMsg(((_m = userExist === null || userExist === void 0 ? void 0 : userExist._messages) === null || _m === void 0 ? void 0 : _m[0]) || 'API error');
694
1218
  }
695
1219
  });
696
1220
  const onClickEmail = () => {
1221
+ setShareData({
1222
+ authMethod: 'mail',
1223
+ });
697
1224
  addStep({
698
1225
  type: SSOStepTypeType.EMAIL,
699
1226
  });
@@ -704,18 +1231,18 @@ const SSOFirstScreen = ({ hidden }) => {
704
1231
  flexDirection: 'column',
705
1232
  height: '100%',
706
1233
  } },
707
- React__default["default"].createElement(core$1.Stack, { spacing: 8 },
708
- React__default["default"].createElement(index$3.Text, { size: "s1", weight: "semiBold" }, "Sign in or Sign up"),
709
- React__default["default"].createElement(index$3.Text, { size: "p4" }, "Continue with your phone number, email or your socials to log in or sign up.")),
710
- React__default["default"].createElement(core$1.Stack, { mt: 24, spacing: 24 },
711
- React__default["default"].createElement(core$1.Stack, { spacing: 16 },
712
- React__default["default"].createElement(index$4.Input.Wrapper, { error: errMsg },
1234
+ React__default["default"].createElement(core.Stack, { spacing: 8 },
1235
+ React__default["default"].createElement(index$2.Text, { size: "s1", weight: "semiBold" }, "Sign in or Sign up"),
1236
+ React__default["default"].createElement(index$2.Text, { size: "p4" }, "Continue with your phone number, email or your socials to log in or sign up.")),
1237
+ React__default["default"].createElement(core.Stack, { mt: 24, spacing: 24 },
1238
+ React__default["default"].createElement(core.Stack, { spacing: 16 },
1239
+ React__default["default"].createElement(index$3.Input.Wrapper, { error: errMsg },
713
1240
  React__default["default"].createElement(StyledPhone, { defaultCountry: (locale ? utils.MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: phone, onChange: (value) => setPhone(value), isError: !!errMsg, required: true, name: "phone" })),
714
- React__default["default"].createElement(index$2.Button, { size: "lg", variant: "primary", onClick: onClickContinueZalo }, "Continue with Zalo"),
715
- React__default["default"].createElement(index$2.Button, { size: "lg", variant: "secondary", onClick: onClickContinuePhone }, "Continue with SMS")),
716
- React__default["default"].createElement(core$1.Stack, { spacing: 16, align: "center" },
717
- React__default["default"].createElement(index$3.Text, { size: "p4" }, "Or continue with"),
718
- React__default["default"].createElement(core$1.Group, { spacing: 24 },
1241
+ React__default["default"].createElement(index$1.Button, { size: "lg", variant: "primary", onClick: onClickContinueZalo }, "Continue with Zalo"),
1242
+ React__default["default"].createElement(index$1.Button, { size: "lg", variant: "secondary", onClick: onClickContinuePhone }, "Continue with SMS")),
1243
+ React__default["default"].createElement(core.Stack, { spacing: 16, align: "center" },
1244
+ React__default["default"].createElement(index$2.Text, { size: "p4" }, "Or continue with"),
1245
+ React__default["default"].createElement(core.Group, { spacing: 24 },
719
1246
  React__default["default"].createElement("div", { style: {
720
1247
  position: 'relative',
721
1248
  width: 48,
@@ -725,7 +1252,7 @@ const SSOFirstScreen = ({ hidden }) => {
725
1252
  React__default["default"].createElement("div", { className: "g_id_signin", "data-type": "icon", "data-shape": "circle", "data-theme": "outline", "data-text": "signin_with", "data-size": "large", style: {
726
1253
  transform: 'translate(4px,4px) scale(1.1)',
727
1254
  } }),
728
- React__default["default"].createElement(index$2.Button, { variant: "white", style: {
1255
+ React__default["default"].createElement(index$1.Button, { variant: "white", style: {
729
1256
  width: 48,
730
1257
  height: 48,
731
1258
  padding: 12,
@@ -740,7 +1267,7 @@ const SSOFirstScreen = ({ hidden }) => {
740
1267
  googleButton === null || googleButton === void 0 ? void 0 : googleButton.dispatchEvent(new Event('click'));
741
1268
  } },
742
1269
  React__default["default"].createElement(Google.Google, { style: { width: 24, height: 24 } }))),
743
- React__default["default"].createElement(index$2.Button, { variant: "white", style: {
1270
+ React__default["default"].createElement(index$1.Button, { variant: "white", style: {
744
1271
  width: 48,
745
1272
  height: 48,
746
1273
  padding: 12,
@@ -760,7 +1287,7 @@ const SSOFirstScreen = ({ hidden }) => {
760
1287
  }, { scope: 'public_profile,email' });
761
1288
  } },
762
1289
  React__default["default"].createElement(Google.Facebook, { style: { width: 24, height: 24 } })),
763
- React__default["default"].createElement(index$2.Button, { variant: "white", style: {
1290
+ React__default["default"].createElement(index$1.Button, { variant: "white", style: {
764
1291
  width: 48,
765
1292
  height: 48,
766
1293
  padding: 12,
@@ -768,19 +1295,14 @@ const SSOFirstScreen = ({ hidden }) => {
768
1295
  borderRadius: '100%',
769
1296
  }, onClick: onClickEmail },
770
1297
  React__default["default"].createElement(MailIcon, null))))),
771
- React__default["default"].createElement(core$1.Stack, { spacing: 24, sx: (theme) => ({
1298
+ React__default["default"].createElement(core.Stack, { spacing: 24, sx: (theme) => ({
772
1299
  marginTop: 56,
773
1300
  [theme.fn.smallerThan('sm')]: {
774
1301
  marginTop: 'auto',
775
1302
  },
776
1303
  }) },
777
- React__default["default"].createElement(index$3.Text, { size: "p4", color: 'blue.6' },
778
- React__default["default"].createElement(other.Info, { size: 16, color: miscTheme.theme.colors.primaryBase, style: {
779
- verticalAlign: 'sub',
780
- } }),
781
- ' ',
782
- "Why We Need Your Information?"),
783
- React__default["default"].createElement(index$3.Text, { size: "p5", color: "gray.6" },
1304
+ React__default["default"].createElement(CollectInfoText, null),
1305
+ React__default["default"].createElement(index$2.Text, { size: "p5", color: "gray.6" },
784
1306
  "By tapping continue, I confirm that I have read, understand and agree to the",
785
1307
  ' ',
786
1308
  React__default["default"].createElement("a", { href: "#privacy", target: "_blank", style: {
@@ -798,34 +1320,91 @@ const SSOFirstScreen = ({ hidden }) => {
798
1320
  "of Hello Health Group."))));
799
1321
  };
800
1322
 
801
- const SSOOTPScreen = ({ hidden, index: index$1, }) => {
1323
+ const SSOOTPScreen = ({ hidden, index, }) => {
1324
+ const { onClose } = useSSOState();
802
1325
  const { steps, setSteps, addStep, goNext } = useSSOSteps();
803
1326
  const [otp, setOtp] = React__default["default"].useState('');
804
1327
  const [error, setError] = React__default["default"].useState('');
805
- const currentStepIndex = index$1;
1328
+ const currentStepIndex = index;
806
1329
  const currentStep = steps[currentStepIndex];
807
- const { phone, email, otpType, isForgot } = currentStep.config;
1330
+ const { phone, email, otpType, isUpdatePhone, afterAction, setupData } = currentStep.config;
808
1331
  const isEmail = otpType === 'email';
809
1332
  const sendOTPCode = (checkResend) => {
810
1333
  if (checkResend && resendTime > 0)
811
1334
  return;
812
1335
  // send otp code logic here
813
1336
  const { areaCode, phoneNumber } = splitPhone(phone);
814
- if (otpType === 'phone-sms') {
815
- resendPhoneOTP(phoneNumber, areaCode);
816
- }
817
- else if (otpType === 'phone-zalo') {
818
- resendZaloOTP(phoneNumber, areaCode);
1337
+ if (isUpdatePhone) {
1338
+ if (otpType === 'phone-sms') {
1339
+ resendUpdatePhoneOTP(phoneNumber, areaCode);
1340
+ }
1341
+ else if (otpType === 'phone-zalo') {
1342
+ resendUpdatePhoneZaloOTP(phoneNumber, areaCode);
1343
+ }
819
1344
  }
820
- else if (otpType === 'email') {
821
- resendEmailOTP(email);
1345
+ else {
1346
+ if (otpType === 'phone-sms') {
1347
+ resendPhoneOTP(phoneNumber, areaCode);
1348
+ }
1349
+ else if (otpType === 'phone-zalo') {
1350
+ resendZaloOTP(phoneNumber, areaCode);
1351
+ }
1352
+ else if (otpType === 'email') {
1353
+ resendEmailOTP(email);
1354
+ }
822
1355
  }
823
1356
  setupResendTimer();
824
1357
  };
825
1358
  const submitOtp = () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
826
- var _a, _b;
1359
+ var _a, _b, _c, _d, _e;
827
1360
  const { areaCode, phoneNumber } = splitPhone(phone);
828
1361
  // submit otp code logic here
1362
+ if (isUpdatePhone) {
1363
+ let res;
1364
+ if (otpType === 'phone-sms') {
1365
+ res = yield verifyUpdatePhoneOTP(areaCode, otp);
1366
+ }
1367
+ else if (otpType === 'phone-zalo') {
1368
+ res = yield verifyUpdatePhoneZaloOTP(phoneNumber, areaCode, otp);
1369
+ }
1370
+ if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
1371
+ if (afterAction === 'setup') {
1372
+ const userInfo = yield getUserInfo();
1373
+ if ((userInfo === null || userInfo === void 0 ? void 0 : userInfo._status) !== 1) {
1374
+ // log error
1375
+ setError(((_a = userInfo._messages) === null || _a === void 0 ? void 0 : _a[0]) || 'API error');
1376
+ return;
1377
+ }
1378
+ addStep({
1379
+ type: SSOStepTypeType.SETUP_FULL,
1380
+ config: {
1381
+ phone,
1382
+ userInfo: userInfo === null || userInfo === void 0 ? void 0 : userInfo._data,
1383
+ },
1384
+ });
1385
+ goNext();
1386
+ }
1387
+ else if (afterAction === 'submitSetup') {
1388
+ const res = yield updateUserInfo(Object.assign(Object.assign({}, setupData), { validate: '' }));
1389
+ if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
1390
+ handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
1391
+ onClose === null || onClose === void 0 ? void 0 : onClose();
1392
+ }
1393
+ else {
1394
+ // log error
1395
+ setError(((_b = res._messages) === null || _b === void 0 ? void 0 : _b[0]) || 'API error');
1396
+ }
1397
+ }
1398
+ else {
1399
+ onClose === null || onClose === void 0 ? void 0 : onClose();
1400
+ }
1401
+ }
1402
+ else {
1403
+ // log error
1404
+ setError(((_c = res._messages) === null || _c === void 0 ? void 0 : _c[0]) || 'API error');
1405
+ }
1406
+ return;
1407
+ }
829
1408
  let res;
830
1409
  if (otpType === 'phone-sms') {
831
1410
  res = yield verifyByPhoneOTP(phoneNumber, areaCode, otp);
@@ -839,31 +1418,36 @@ const SSOOTPScreen = ({ hidden, index: index$1, }) => {
839
1418
  if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
840
1419
  setOtp('');
841
1420
  // log error
842
- setError(((_a = res._messages) === null || _a === void 0 ? void 0 : _a[0]) || 'API error');
1421
+ setError(((_d = res._messages) === null || _d === void 0 ? void 0 : _d[0]) || 'API error');
843
1422
  return;
844
1423
  }
845
- miscCookieHelper.setCookie(index.BEARER_TOKEN_COOKIE, (_b = res._data) === null || _b === void 0 ? void 0 : _b.token, {
846
- domain: window.location.hostname === 'localhost'
847
- ? 'localhost'
848
- : `.${constantsDomainLocales.domainLocales[process.env.UNIFY_LOCALE || 'vi-VN']}`,
849
- expires: new Date(res._data.expire_in * 1000).toUTCString(),
850
- });
851
- if (isForgot) {
1424
+ handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
1425
+ if (afterAction === 'forgot') {
852
1426
  addStep({
853
1427
  type: SSOStepTypeType.FORGOT_PASSWORD_SETUP,
854
1428
  });
1429
+ goNext();
855
1430
  }
856
- else {
857
- const userInfo = yield fetchSSOApi('user/profile');
1431
+ else if (afterAction === 'setup') {
1432
+ const userInfo = yield getUserInfo();
1433
+ if ((userInfo === null || userInfo === void 0 ? void 0 : userInfo._status) !== 1) {
1434
+ // log error
1435
+ setError(((_e = userInfo._messages) === null || _e === void 0 ? void 0 : _e[0]) || 'API error');
1436
+ return;
1437
+ }
858
1438
  addStep({
859
1439
  type: SSOStepTypeType.SETUP_FULL,
860
1440
  config: {
861
- userInfo: userInfo,
1441
+ phone,
1442
+ userInfo: userInfo === null || userInfo === void 0 ? void 0 : userInfo._data,
862
1443
  disabledEmail: isEmail,
863
1444
  },
864
1445
  });
1446
+ goNext();
1447
+ }
1448
+ else {
1449
+ onClose === null || onClose === void 0 ? void 0 : onClose();
865
1450
  }
866
- goNext();
867
1451
  });
868
1452
  const swapZaloSms = () => {
869
1453
  if (isEmail)
@@ -871,15 +1455,16 @@ const SSOOTPScreen = ({ hidden, index: index$1, }) => {
871
1455
  const { areaCode, phoneNumber } = splitPhone(phone);
872
1456
  const newType = otpType === 'phone-sms' ? 'phone-zalo' : 'phone-sms';
873
1457
  if (newType === 'phone-sms') {
874
- registerBySendPhoneOTP(phoneNumber, areaCode);
1458
+ resendPhoneOTP(phoneNumber, areaCode);
875
1459
  }
876
1460
  else {
877
- registerBySendZaloOTP(phoneNumber, areaCode);
1461
+ resendZaloOTP(phoneNumber, areaCode);
878
1462
  }
879
1463
  setSteps((s) => s.splice(currentStepIndex, 1, Object.assign(Object.assign({}, currentStep), { config: Object.assign(Object.assign({}, currentStep === null || currentStep === void 0 ? void 0 : currentStep.config), { otpType: newType }) })));
880
1464
  };
881
1465
  const [resendTime, setResendTime] = React__default["default"].useState(30);
882
1466
  const setupResendTimer = () => {
1467
+ setResendTime(30);
883
1468
  const countdown = () => {
884
1469
  setResendTime((t) => {
885
1470
  if (t - 1 > 0) {
@@ -893,12 +1478,15 @@ const SSOOTPScreen = ({ hidden, index: index$1, }) => {
893
1478
  React.useEffect(() => {
894
1479
  setupResendTimer();
895
1480
  }, []);
896
- return (React__default["default"].createElement("div", { style: {
1481
+ return (React__default["default"].createElement("form", { style: {
897
1482
  display: hidden ? 'none' : 'block',
1483
+ }, onSubmit: (e) => {
1484
+ e.preventDefault();
1485
+ submitOtp();
898
1486
  } },
899
- React__default["default"].createElement(core$1.Stack, { spacing: 8 },
900
- React__default["default"].createElement(index$3.Text, { size: "s1", weight: "semiBold" }, "Verify Phone Number"),
901
- React__default["default"].createElement(index$3.Text, { size: "p4" }, isEmail ? (React__default["default"].createElement(React__default["default"].Fragment, null,
1487
+ React__default["default"].createElement(core.Stack, { spacing: 8 },
1488
+ React__default["default"].createElement(index$2.Text, { size: "s1", weight: "semiBold" }, isEmail ? 'Verify Email' : 'Verify Phone Number'),
1489
+ React__default["default"].createElement(index$2.Text, { size: "p4" }, isEmail ? (React__default["default"].createElement(React__default["default"].Fragment, null,
902
1490
  "Enter the 6-digit OTP sent to your email ",
903
1491
  React__default["default"].createElement("b", null, email),
904
1492
  ".")) : (React__default["default"].createElement(React__default["default"].Fragment, null,
@@ -909,422 +1497,217 @@ const SSOOTPScreen = ({ hidden, index: index$1, }) => {
909
1497
  React__default["default"].createElement("b", null, otpType === 'phone-sms' ? 'SMS' : 'Zalo App'),
910
1498
  ". OTP code will expire in ",
911
1499
  React__default["default"].createElement("b", null, "10 mins"))))),
912
- React__default["default"].createElement(core$1.Stack, { mt: 24, spacing: 8 },
913
- React__default["default"].createElement(index$4.Input.Wrapper, { error: error },
914
- React__default["default"].createElement(index$4.OTP, { value: otp, onChange: (otp) => setOtp(String(otp)) })),
915
- React__default["default"].createElement(core$1.Group, { spacing: 8, align: "center", style: {
1500
+ React__default["default"].createElement(core.Stack, { mt: 24, spacing: 8 },
1501
+ React__default["default"].createElement(index$3.Input.Wrapper, { error: error },
1502
+ React__default["default"].createElement(index$3.OTP, { value: otp, onChange: (otp) => setOtp(String(otp)) })),
1503
+ React__default["default"].createElement(core.Group, { spacing: 8, align: "center", style: {
916
1504
  height: 40,
917
1505
  } },
918
- React__default["default"].createElement(index$3.Text, { size: "p4" }, "Didn\u2019t receive the code?"),
919
- React__default["default"].createElement(index$3.Text, { size: "s4", color: "blue.6", onClick: () => sendOTPCode(true) },
1506
+ React__default["default"].createElement(index$2.Text, { size: "p4" }, "Didn\u2019t receive the code?"),
1507
+ React__default["default"].createElement(index$2.Text, { style: {
1508
+ pointerEvents: resendTime > 0 ? 'none' : 'auto',
1509
+ cursor: resendTime > 0 ? 'not-allowed' : 'pointer',
1510
+ }, size: "s4", color: "blue.6", onClick: () => sendOTPCode(true) },
920
1511
  "Resend (",
921
1512
  resendTime,
922
1513
  ")"))),
923
- React__default["default"].createElement(index$2.Button, { size: "lg", variant: "primary", mt: 12, onClick: submitOtp, fullWidth: true }, "Continue"),
924
- !isEmail && (React__default["default"].createElement(index$2.Button, { size: "lg", variant: "tertiary", mt: 12, onClick: swapZaloSms, fullWidth: true },
1514
+ React__default["default"].createElement(index$1.Button, { type: "submit", size: "lg", variant: "primary", mt: 12, fullWidth: true }, "Continue"),
1515
+ !isEmail && (React__default["default"].createElement(index$1.Button, { size: "lg", variant: "tertiary", mt: 12, onClick: swapZaloSms, fullWidth: true },
925
1516
  "Send OTP Code via ",
926
1517
  otpType === 'phone-sms' ? 'Zalo App' : 'SMS'))));
927
1518
  };
928
-
929
- const SSOPasswordScreen = ({ hidden, index, }) => {
930
- var _a;
931
- const [errMsg, setErrMsg] = React__default["default"].useState('');
932
- const { steps, addStep, goNext } = useSSOSteps();
933
- const resetPassword = () => {
934
- addStep({
935
- type: SSOStepTypeType.FORGOT_PASSWORD_PHONE,
936
- });
937
- goNext();
938
- };
939
- const thisStep = steps[index];
940
- const phone = (_a = thisStep === null || thisStep === void 0 ? void 0 : thisStep.config) === null || _a === void 0 ? void 0 : _a.phone;
941
- return (React__default["default"].createElement("form", { style: {
942
- display: hidden ? 'none' : 'block',
943
- }, onSubmit: (e) => {
944
- e.preventDefault();
945
- const password = e.currentTarget.password.value;
946
- // call api to login with email and password, if fail then show error
947
- loginByPhonePassword(phone, password)
948
- .then((res) => {
949
- var _a;
950
- if ((_a = res._messages) === null || _a === void 0 ? void 0 : _a[0]) {
951
- setErrMsg(res._messages[0]);
952
- }
953
- else {
954
- setErrMsg('api error');
955
- }
956
- })
957
- .catch(() => {
958
- setErrMsg('api error');
959
- });
960
- } },
961
- React__default["default"].createElement(core$1.Stack, { spacing: 8 },
962
- React__default["default"].createElement(index$3.Text, { size: "s1", weight: "semiBold" },
963
- "Welcome back!",
964
- React__default["default"].createElement("br", null),
965
- "Enter your password"),
966
- React__default["default"].createElement(index$3.Text, { size: "p4" }, "\u0110\u0103ng nh\u1EADp b\u1EB1ng m\u1EADt kh\u1EA9u c\u1EE7a b\u1EA1n.")),
967
- React__default["default"].createElement(core$1.Stack, { mt: 24, spacing: 8 },
968
- React__default["default"].createElement(index$4.PasswordInput, { name: "password", placeholder: "Nh\u1EADp m\u1EADt kh\u1EA9u", error: errMsg || undefined }),
969
- React__default["default"].createElement(core$1.Group, { spacing: 8, align: "center", style: {
970
- height: 40,
971
- } },
972
- React__default["default"].createElement(index$3.Text, { size: "p4" }, "Forgot Password?"),
973
- React__default["default"].createElement(index$3.Text, { size: "s4", color: "blue.6", style: {
974
- cursor: 'pointer',
975
- }, onClick: resetPassword }, "Reset"))),
976
- React__default["default"].createElement(index$2.Button, { type: "submit", size: "lg", variant: "primary", mt: 12, fullWidth: true }, "Sign In")));
977
- };
978
-
979
- const SSOPasswordForgotPhone = ({ hidden, }) => {
980
- const [phone, setPhone] = React__default["default"].useState('');
981
- const [errMsg, setErrMsg] = React__default["default"].useState('');
982
- const { locale } = useSSOState();
983
- const { addStep, goNext } = useSSOSteps();
984
- const onClickContinueZalo = () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
985
- var _a;
986
- const { areaCode, phoneNumber } = splitPhone(phone);
987
- const userExist = yield checkUserExist({ phone: phoneNumber });
988
- if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
989
- resendZaloOTP(phoneNumber, areaCode);
990
- addStep({
991
- type: SSOStepTypeType.OTP,
992
- config: {
993
- phone,
994
- otpType: 'phone-zalo',
995
- isForgot: true,
996
- },
997
- });
998
- goNext();
999
- }
1000
- else {
1001
- setErrMsg(((_a = userExist === null || userExist === void 0 ? void 0 : userExist._messages) === null || _a === void 0 ? void 0 : _a[0]) || 'API error');
1002
- }
1003
- });
1004
- const onClickContinuePhone = () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
1005
- var _b;
1006
- const { areaCode, phoneNumber } = splitPhone(phone);
1007
- const userExist = yield checkUserExist({ phone: phoneNumber });
1008
- if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
1009
- registerBySendPhoneOTP(phoneNumber, areaCode);
1010
- addStep({
1011
- type: SSOStepTypeType.OTP,
1012
- config: {
1013
- phone,
1014
- otpType: 'phone-sms',
1015
- isForgot: true,
1016
- },
1017
- });
1018
- goNext();
1019
- }
1020
- else {
1021
- setErrMsg(((_b = userExist === null || userExist === void 0 ? void 0 : userExist._messages) === null || _b === void 0 ? void 0 : _b[0]) || 'API error');
1022
- }
1023
- });
1024
- return (React__default["default"].createElement("div", { style: {
1025
- display: hidden ? 'none' : 'block',
1026
- } },
1027
- React__default["default"].createElement(core$1.Stack, { spacing: 8 },
1028
- React__default["default"].createElement(index$3.Text, { size: "s1", weight: "semiBold" }, "Reset password"),
1029
- React__default["default"].createElement(index$3.Text, { size: "p4" }, "Please provide the phone number you used to create your account.")),
1030
- React__default["default"].createElement(core$1.Stack, { mt: 24, spacing: 16 },
1031
- React__default["default"].createElement(StyledPhone, { defaultCountry: (locale ? utils.MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: phone, onChange: (value) => setPhone(value), isError: !!errMsg, required: true }),
1032
- errMsg && (React__default["default"].createElement(index$3.Text, { size: "label2", color: "red.6", mt: -12 }, errMsg)),
1033
- React__default["default"].createElement(index$2.Button, { size: "lg", variant: "primary", onClick: onClickContinueZalo }, "Continue with Zalo"),
1034
- React__default["default"].createElement(index$2.Button, { size: "lg", variant: "secondary", onClick: onClickContinuePhone }, "Continue with SMS"))));
1035
- };
1036
-
1037
- const BackgroundHeader = () => (React__default["default"].createElement("svg", { width: "292", height: "255", viewBox: "0 0 292 255", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: {
1038
- position: 'absolute',
1039
- top: 0,
1040
- left: '50%',
1041
- zIndex: 0,
1042
- transform: 'translateX(-50%)',
1043
- pointerEvents: 'none',
1044
- } },
1045
- React__default["default"].createElement("circle", { opacity: ".2", cx: "146", cy: "109", r: "146", fill: "url(#paint0_linear_908_34610)" }),
1046
- React__default["default"].createElement("circle", { opacity: ".3", cx: "146", cy: "109", r: "85", fill: "url(#paint1_linear_908_34610)" }),
1047
- React__default["default"].createElement("circle", { cx: "146.5", cy: "108.5", r: "47.5", fill: "url(#paint2_linear_908_34610)" }),
1048
- React__default["default"].createElement("circle", { cx: "146.5", cy: "108.5", r: "47", stroke: "url(#paint3_linear_908_34610)" }),
1049
- React__default["default"].createElement("path", { d: "M163.327 94.716c-.522-3.187-7.981-5.714-17.11-5.714s-16.589 2.527-17.111 5.714h-.032v26.428h.032c.522 3.186 7.982 5.714 17.111 5.714 9.128 0 16.588-2.528 17.11-5.714h.032V94.716z", fill: "#545E73" }),
1050
- React__default["default"].createElement("path", { d: "M146.217 118.286c-9.468 0-17.143-2.718-17.143-6.071v8.928h.032c.522 3.187 7.982 5.714 17.111 5.714 9.128 0 16.588-2.527 17.11-5.714h.032v-8.928c0 3.353-7.675 6.071-17.142 6.071", fill: "#2B62CD" }),
1051
- React__default["default"].createElement("path", { d: "M129.074 111.859v.358q.002-.18.032-.358zm34.25 0q.031.178.032.358v-.358z", fill: "#38454F" }),
1052
- React__default["default"].createElement("path", { d: "M146.217 109.714c-9.468 0-17.143-2.719-17.143-6.071v8.928h.032c.522 3.186 7.982 5.714 17.111 5.714 9.128 0 16.588-2.528 17.11-5.714h.032v-8.928c0 3.352-7.675 6.071-17.142 6.071", fill: "#2D87F3" }),
1053
- React__default["default"].createElement("path", { d: "M129.074 103.287v.357q.002-.18.032-.357zm34.25 0q.031.178.032.357v-.357z", fill: "#556080" }),
1054
- React__default["default"].createElement("path", { d: "M146.217 101.145c9.467 0 17.142-2.719 17.142-6.072s-7.675-6.071-17.142-6.071c-9.468 0-17.143 2.718-17.143 6.071s7.675 6.072 17.143 6.072", fill: "#91CAFF" }),
1055
- React__default["default"].createElement("path", { d: "M146.217 101.144c-9.468 0-17.143-2.719-17.143-6.072v8.929h.032c.522 3.186 7.982 5.714 17.111 5.714 9.128 0 16.588-2.528 17.11-5.714h.032v-8.929c0 3.353-7.675 6.072-17.142 6.072", fill: "#45A4FF" }),
1056
- React__default["default"].createElement("path", { d: "M129.074 94.717v.357q.002-.18.032-.357zm34.25 0q.031.177.032.357v-.357z", fill: "#8697CB" }),
1057
- React__default["default"].createElement("path", { d: "M156.36 129.002a8.57 8.57 0 0 0 8.571-8.571 8.571 8.571 0 1 0-8.571 8.571", fill: "#00B16A" }),
1058
- React__default["default"].createElement("path", { d: "M161.054 116.273a.714.714 0 0 0-.995.178l-3.997 5.743-2.82-2.316a.714.714 0 0 0-.906 1.105l3.418 2.806a.72.72 0 0 0 1.04-.144l4.438-6.377a.716.716 0 0 0-.178-.995", fill: "#fff" }),
1059
- React__default["default"].createElement("defs", null,
1060
- React__default["default"].createElement("linearGradient", { id: "paint0_linear_908_34610", x1: "147.5", y1: "141", x2: "36.5", y2: "30", gradientUnits: "userSpaceOnUse" },
1061
- React__default["default"].createElement("stop", { stopColor: "#fff", stopOpacity: "0" }),
1062
- React__default["default"].createElement("stop", { offset: "1", stopColor: "#fff" })),
1063
- React__default["default"].createElement("linearGradient", { id: "paint1_linear_908_34610", x1: "218.376", y1: "63.134", x2: "61", y2: "109", gradientUnits: "userSpaceOnUse" },
1064
- React__default["default"].createElement("stop", { stopColor: "#fff" }),
1065
- React__default["default"].createElement("stop", { offset: "1", stopColor: "#fff", stopOpacity: "0" })),
1066
- React__default["default"].createElement("linearGradient", { id: "paint2_linear_908_34610", x1: "146.5", y1: "61", x2: "146.5", y2: "156", gradientUnits: "userSpaceOnUse" },
1067
- React__default["default"].createElement("stop", { stopColor: "#fff", stopOpacity: ".6" }),
1068
- React__default["default"].createElement("stop", { offset: "1", stopColor: "#fff", stopOpacity: "0" })),
1069
- React__default["default"].createElement("linearGradient", { id: "paint3_linear_908_34610", x1: "178.979", y1: "98.35", x2: "108.338", y2: "98.35", gradientUnits: "userSpaceOnUse" },
1070
- React__default["default"].createElement("stop", { stopColor: "#fff", stopOpacity: "0" }),
1071
- React__default["default"].createElement("stop", { offset: "1", stopColor: "#fff" })))));
1072
-
1073
- const CustomerSupportIcon = () => {
1074
- return (React__default["default"].createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1075
- React__default["default"].createElement("g", { clipPath: "url(#clip0_911_24123)" },
1076
- React__default["default"].createElement("path", { d: "M23.3 16.625c-.042-1.1.166-4.401.166-4.401.073-.27.15-.594.205-.854C25.33 3.783 20.246.75 16 .75c-1.133 0-2.488.413-3.13 1.203a.82.82 0 0 1-.503.307c-2.862.46-4.742 4.183-4.062 8.77q.087.586.23 1.19v.002c.183 1.009.231 3.303.165 4.403-.271 4.482-5.173 8.453-1.985 11.608 8.41 1.974 10.202 2.142 18.57 0 3.187-3.155-1.81-7.122-1.985-11.608", fill: "#9B4E4E" }),
1077
- React__default["default"].createElement("path", { d: "M24.675 14.972a3.2 3.2 0 0 0-.64-.718.25.25 0 1 0-.302.399q.308.261.53.6a1.41 1.41 0 0 1 .177 1.562c-.465.892-1.84 1.63-3.614 2.043q.139.221.264.451c1.85-.457 3.275-1.267 3.794-2.263a1.89 1.89 0 0 0-.21-2.074", fill: "#473049" }),
1078
- React__default["default"].createElement("path", { d: "M18.545 22.798c-.35.41-2.09 4.555-2.535 5.29-.448-.735-2.198-4.89-2.545-5.3.351-.358.597-.808.707-1.297q.096-.405.115-.82c.365.137 3.063.134 3.428-.003v.003q.018.4.11.79c.107.505.357.969.72 1.337", fill: "#FF977B" }),
1079
- React__default["default"].createElement("path", { d: "M17.824 21.46a3.39 3.39 0 0 1-3.652.03q.095-.404.115-.82c.365.138 3.062.135 3.427-.002v.003q.018.4.11.79", fill: "#FF7364" }),
1080
- React__default["default"].createElement("path", { d: "M25.284 28.233c.153.66-.362 1.082-1.08 1.472-.917.5-3.717 1.55-8.205 1.55s-7.287-1.05-8.205-1.55c-.717-.39-1.232-.812-1.08-1.472.048-.187.126-.365.233-.525.535-.84 1.567-2.198 4.2-3.598q.335-.174.692-.33c.075 1.013 2.985.21 2.985.21a.96.96 0 0 1 .57.835c.038.888.168 2.528.615 3.263.445-.735.575-2.375.613-3.263a.96.96 0 0 1 .57-.835s2.907.81 2.985-.202q.347.151.675.322c2.632 1.4 3.665 2.758 4.2 3.598.107.16.185.338.232.525", fill: "#F9E0B4" }),
1081
- React__default["default"].createElement("path", { d: "M22.317 12.023c.359-.006.715.05 1.055.165.785.282 1.33.962 1.2 2.3-.105 1.1-.647 1.752-1.317 2.03-.461.188-.97.217-1.45.085.277-.97.555-3.88.512-4.58m-12.124 4.579a2.26 2.26 0 0 1-1.448-.082c-.672-.28-1.215-.93-1.322-2.033-.123-1.287.375-1.965 1.112-2.265a3 3 0 0 1 1.145-.2c-.042.7.235 3.61.513 4.58", fill: "#4B3956" }),
1082
- React__default["default"].createElement("path", { d: "M22.319 12.021c.04.7-.235 3.61-.513 4.581-.285.996-1.532 3.582-5.285 4.418a2.4 2.4 0 0 1-1.044 0c-3.752-.836-5-3.422-5.284-4.418-.278-.97-.554-3.88-.513-4.58 1.219-.669.668-2.955 1.56-5.057.556-1.307 1.305-1.644 1.722-1.727a.9.9 0 0 0 .533-.338c1.6-2.056 4.794-.95 5.966 1.225 1.066 1.977 1.225 4.918 2.858 5.896", fill: "#FFB497" }),
1083
- React__default["default"].createElement("path", { d: "M20.13 23.118c.067.217.083.446.048.67-.077 1.012-.52 2.735-1.227 2.542-1.018-.277-1.758-2.34-1.758-2.34.518-.23 1.003-.782 1.353-1.192q.068-.086.132-.16a.463.463 0 0 1 .625-.103c.295.153.683.345.828.583m-5.306.872s-.74 2.063-1.758 2.34c-.71.193-1.152-1.537-1.227-2.55a1.5 1.5 0 0 1 .047-.662c.145-.238.533-.43.828-.583a.463.463 0 0 1 .625.103l.125.15c.347.41.837.972 1.36 1.202", fill: "#F7F0DF" }),
1084
- React__default["default"].createElement("path", { d: "M14.94 16.018a.306.306 0 0 0-.3.385 1.414 1.414 0 0 0 2.72 0 .307.307 0 0 0-.3-.385z", fill: "#fff" }),
1085
- React__default["default"].createElement("path", { d: "M12.776 11.492h-.05a.676.676 0 0 0-.675.676v.541c0 .374.302.676.676.676h.049a.676.676 0 0 0 .676-.676v-.54a.676.676 0 0 0-.676-.677m6.448 1.893h.05a.676.676 0 0 0 .675-.676v-.541a.676.676 0 0 0-.676-.676h-.049a.676.676 0 0 0-.676.675v.542c0 .373.303.676.676.676", fill: "#9B4E4E" }),
1086
- React__default["default"].createElement("path", { d: "M16.017 29.117h-.034a.47.47 0 0 0-.471.472v.034c0 .26.21.471.471.471h.034c.26 0 .472-.21.472-.471v-.034a.47.47 0 0 0-.472-.472", fill: "#fff" }),
1087
- React__default["default"].createElement("path", { d: "M16.003 15.2c-.008 0-.69-.01-.69-.402a.25.25 0 0 1 .455-.142 1 1 0 0 0 .235.044.8.8 0 0 0 .229-.044.25.25 0 0 1 .456.142c0 .391-.679.402-.685.402", fill: "#FF7364" }),
1088
- React__default["default"].createElement("path", { d: "M11.532 12.095a.25.25 0 0 1-.225-.36 1.62 1.62 0 0 1 1.338-.752c.396-.017.782.124 1.075.39a.25.25 0 1 1-.333.374 1 1 0 0 0-.742-.264 1.14 1.14 0 0 0-.888.473.25.25 0 0 1-.225.14m-.451-1.716a.25.25 0 0 1-.175-.43c.606-.587 2.632-.888 3.235-.48a.25.25 0 0 1-.281.415c-.37-.253-2.149-.02-2.606.425a.25.25 0 0 1-.173.07m9.387 1.715a.25.25 0 0 1-.226-.14 1.14 1.14 0 0 0-.887-.472 1 1 0 0 0-.742.264.25.25 0 1 1-.332-.373c.293-.267.68-.408 1.075-.391a1.62 1.62 0 0 1 1.337.752.25.25 0 0 1-.225.36m.452-1.715a.25.25 0 0 1-.174-.07c-.457-.444-2.235-.677-2.605-.426a.25.25 0 0 1-.281-.414c.603-.408 2.628-.108 3.234.48a.25.25 0 0 1-.175.43zm2.71 1.175c-.135-.78-.492-2.643-2.005-5.64-.06-.125-.092-.258.005-.355a.254.254 0 0 1 .355.005c.795.817 1.67 2.882 1.9 4.565zM10.163 6.313c-.015.025-1.525 2.925-1.83 4.89l-.028-.173q-.1-.658-.127-1.322C8.54 7.94 9.673 6.16 9.73 6.063a.25.25 0 0 1 .34-.093.25.25 0 0 1 .093.343", fill: "#844040" }),
1089
- React__default["default"].createElement("path", { d: "M23.29 17.917c-1.345.813-3.559 1.331-5.908 1.3a.254.254 0 0 0-.253.247.25.25 0 0 0 .246.253l.23.002c2.522 0 4.831-.603 6.2-1.543a23 23 0 0 1-.516-.259", fill: "#473049" }),
1090
- React__default["default"].createElement("path", { d: "M16.138 20.42c.686 0 1.241-.426 1.241-.952s-.555-.952-1.241-.952-1.242.426-1.242.952.556.952 1.242.952", fill: "#4B3956" })),
1091
- React__default["default"].createElement("defs", null,
1092
- React__default["default"].createElement("clipPath", { id: "clip0_911_24123" },
1093
- React__default["default"].createElement("path", { fill: "#fff", d: "M0 0h32v32H0z" })))));
1094
- };
1095
-
1096
- const HealthUpdateIcon = () => {
1097
- return (React__default["default"].createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1098
- React__default["default"].createElement("path", { d: "M20.69 3.066 4.714 5.456a1.714 1.714 0 0 0-1.442 1.95l3.01 20.106a1.714 1.714 0 0 0 1.948 1.442l15.975-2.39a1.714 1.714 0 0 0 1.441-1.95L22.638 4.507a1.714 1.714 0 0 0-1.949-1.441", fill: "#1B89E5" }),
1099
- React__default["default"].createElement("path", { d: "m4.488 5.49 16.427-2.458 3.13 20.914-16.427 2.458z", fill: "#fff" }),
1100
- React__default["default"].createElement("path", { d: "m13.559 8.067-.567.084a.83.83 0 0 0-.696.942l.02.141a.18.18 0 0 1-.15.203l-.14.021a.83.83 0 0 0-.697.942l.085.568a.83.83 0 0 0 .942.696l.141-.021a.18.18 0 0 1 .203.15l.022.14a.83.83 0 0 0 .942.697l.566-.085a.83.83 0 0 0 .697-.941l-.021-.142a.18.18 0 0 1 .15-.203l.141-.021a.83.83 0 0 0 .697-.943l-.085-.565a.83.83 0 0 0-.942-.697l-.142.022a.18.18 0 0 1-.203-.15l-.02-.142a.83.83 0 0 0-.943-.696m6.553 5.392-9.31 1.393a.32.32 0 0 0 .094.634l9.31-1.393a.32.32 0 1 0-.095-.634m.299 2.303L8.74 17.508a.32.32 0 0 0 .096.634l11.67-1.746a.32.32 0 0 0-.096-.634m-.591 2.436L9.039 19.81a.32.32 0 1 0 .095.634l10.78-1.613a.32.32 0 0 0-.095-.634m-1.084 2.51-9.397 1.406a.32.32 0 0 0 .095.634l9.397-1.407a.32.32 0 1 0-.095-.633m2.318-.347-.828.124a.32.32 0 0 0 .095.634l.828-.124a.32.32 0 0 0-.095-.634", fill: "#78C5EF" }),
1101
- React__default["default"].createElement("path", { d: "m27.358 4.303-.805-.273a1.26 1.26 0 0 0-1.596.789l-4.406 13.013.494 2.544a.442.442 0 0 0 .728.246l1.937-1.72 2.61-7.71.224.075a.583.583 0 0 0 .739-.365l1.357-4.007a2.045 2.045 0 0 0-1.282-2.592", fill: "#36B1F2" }),
1102
- React__default["default"].createElement("path", { d: "M26.32 11.443a.25.25 0 0 1-.236-.33l1.614-4.768a.25.25 0 1 1 .474.16l-1.615 4.768a.25.25 0 0 1-.237.17", fill: "#1B89E5" }),
1103
- React__default["default"].createElement("path", { d: "M17.67 5.535 8.324 6.934a1.15 1.15 0 0 1-1.307-.967l-.098-.654a.44.44 0 0 1 .368-.497l10.754-1.61a.437.437 0 0 1 .498.368l.097.654a1.15 1.15 0 0 1-.967 1.307z", fill: "#3C3854" })));
1104
- };
1105
-
1106
- const PersonalizeIcon = () => {
1107
- return (React__default["default"].createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1108
- React__default["default"].createElement("path", { d: "M31.364 22.343a5 5 0 0 0-1.713-1.477c-.847-.488-1.52-.816-1.638-1.931h-1.761c-.12 1.115-.797 1.443-1.644 1.931a5 5 0 0 0-1.712 1.477c-.33.438-.095.709.331.936.723.386 2.4.827 3.903.827 1.502 0 3.18-.441 3.902-.827.426-.227.662-.498.332-.936", fill: "#F78181" }),
1109
- React__default["default"].createElement("path", { d: "M21.765 14c-.006-3.907-4.11-7.388-7.666-4.77a.4.4 0 0 1-.129.065c-.958.303-1.65 1.213-2.108 2.305-1.408 3.347.2 7.77-.291 11.538h9.938c-.185-2.536.26-6.777.256-9.138", fill: "#FF6671" }),
1110
- React__default["default"].createElement("path", { d: "M5.354 9.745c-3.033 0-5.268 3.012-4.76 6.07.424 2.568 3.008 2.747 3.008 2.747l3.5-.003s2.586-.175 3.012-2.743c.507-3.06-1.728-6.07-4.76-6.07", fill: "#3A417C" }),
1111
- React__default["default"].createElement("path", { d: "M9.073 22.755c-.688.367-2.288.79-3.72.79s-3.03-.423-3.72-.79c-.408-.218-.63-.475-.318-.893.43-.588.99-1.07 1.635-1.407.205-.118.393-.203.563-.283h.002c.503-.235.843-.415.928-1.207h1.822c.085.797.428.975.935 1.21.17.08.355.165.558.28.644.339 1.202.82 1.632 1.407.315.418.09.675-.317.893", fill: "#BF6666" }),
1112
- React__default["default"].createElement("path", { d: "M31.332 22.342a5.04 5.04 0 0 0-1.712-1.477 9 9 0 0 1-.815-.498 3.43 3.43 0 0 1-3.373-.005c-.245.178-.547.325-.855.503a5 5 0 0 0-1.712 1.477c-.33.44-.095.71.33.938.722.385 2.4.827 3.902.827s3.18-.442 3.903-.827c.427-.228.662-.498.332-.938", fill: "#3A417C" }),
1113
- React__default["default"].createElement("path", { d: "M28.232 9.496c-1.05-.28-3.25-.14-3.708 1.205a.46.46 0 0 1-.18.24c-1.035.682-1.353 1.643-.862 3.845h7.298c.738-4.148-1.278-4.95-2.548-5.29", fill: "#FFB45A" }),
1114
- React__default["default"].createElement("path", { d: "M8.402 14.623a.51.51 0 0 1 .229.432 5.9 5.9 0 0 1-.278 1.793c-.262.697-.942 1.882-2.245 2.152a4 4 0 0 1-.757.09 4 4 0 0 1-.76-.09c-1.303-.27-1.98-1.455-2.243-2.152a5.9 5.9 0 0 1-.278-1.793.51.51 0 0 1 .229-.432c.99-.668 2.339-.862 3.052-.86.71-.002 2.06.192 3.051.86", fill: "#CE7A7A" }),
1115
- React__default["default"].createElement("path", { d: "M30.781 14.786a1.2 1.2 0 0 0-.469-.053.45.45 0 0 1-.225-.04c-.956-.438-.852-1.208-.955-1.723-.407-2.036-2.745-1.94-3.408-1.24a.36.36 0 0 1-.19.11c-.87.175-1.371 1.948-1.469 2.68a.24.24 0 0 1-.232.209q-.18 0-.35.057c-.448.157-.572.675-.392 1.157a1.03 1.03 0 0 0 .948.725.255.255 0 0 1 .267.175 3.31 3.31 0 0 0 1.945 2.092 2.13 2.13 0 0 0 1.762 0 3.3 3.3 0 0 0 1.945-2.092.254.254 0 0 1 .267-.175 1.03 1.03 0 0 0 .947-.725c.181-.482.056-1-.391-1.157m-9.271 8.351a5.9 5.9 0 0 0-2.012-1.734c-.995-.573-1.723-.494-1.863-1.803l-2.213-.01c-.14 1.31-.844 1.24-1.839 1.814a5.9 5.9 0 0 0-2.011 1.734c-.388.515-.112.833.389 1.1.849.453 2.82.972 4.584.972s3.726-.519 4.575-.972c.5-.268.777-.586.39-1.1", fill: "#FF9797" }),
1116
- React__default["default"].createElement("path", { d: "M21.51 23.137a5.9 5.9 0 0 0-2.012-1.734c-.995-.573-1.723-.494-1.863-1.803l-2.213-.01c-.14 1.31-.844 1.24-1.839 1.814a5.9 5.9 0 0 0-2.011 1.734c-.388.515-.112.833.389 1.1.849.453 2.82.972 4.584.972s3.726-.519 4.575-.972c.5-.268.777-.586.39-1.1", fill: "#FF9797" }),
1117
- React__default["default"].createElement("path", { d: "M18.682 13.703a3.32 3.32 0 0 1 1.206 3.398 3.63 3.63 0 0 1-2.229 2.489 3.5 3.5 0 0 1-1.118.213 3.5 3.5 0 0 1-1.12-.213 3.63 3.63 0 0 1-2.228-2.49 8.5 8.5 0 0 1-.284-2.55c.137-2.045.975-3.52 2.095-3.245a.25.25 0 0 0 .182-.023c1.377-.755 1.672 1.03 3.496 2.421", fill: "#FFAEAE" }),
1118
- React__default["default"].createElement("path", { d: "M21.12 24.238c-.85.452-2.81.972-4.575.972s-3.735-.52-4.585-.972c-.5-.268-.777-.585-.387-1.1a5.65 5.65 0 0 1 1.735-1.573 6.03 6.03 0 0 0 3.232.788 6.1 6.1 0 0 0 3.253-.775 5.7 5.7 0 0 1 1.717 1.56c.388.515.11.832-.39 1.1", fill: "#5C8EFF" }),
1119
- React__default["default"].createElement("path", { d: "M9.073 22.755c-.688.368-2.288.79-3.72.79s-3.03-.422-3.72-.79c-.408-.217-.63-.475-.318-.892.43-.588.99-1.07 1.635-1.408.205-.117.393-.202.563-.282h.002c.557.318 1.192.47 1.833.44a3.47 3.47 0 0 0 1.852-.438c.17.08.355.165.558.28a4.8 4.8 0 0 1 1.632 1.408c.315.417.09.675-.317.892", fill: "#4856B5" })));
1120
- };
1121
-
1122
- const SecurityIcon = () => {
1123
- return (React__default["default"].createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1124
- React__default["default"].createElement("path", { d: "M16 29.625c1.196 0 2.348-.639 3.327-1.31 5.423-3.715 6.606-5.558 6.995-6.163.436-.68 1.533-2.23 2.73-12.356.33-2.804-1.143-5.19-3.893-6.066a31.65 31.65 0 0 0-18.319 0c-2.75.874-4.222 3.262-3.892 6.067 1.196 10.125 2.293 11.674 2.73 12.355.388.605 1.572 2.448 6.994 6.163.98.671 2.13 1.31 3.328 1.31", fill: "#9DBA22" }),
1125
- React__default["default"].createElement("path", { d: "M25.142 7.18c-2.902-1.307-6.095-1.645-9.143-1.645s-6.241.338-9.143 1.645c-.7.316-1.115.77-1.04 1.365.382 3.052 1.583 11.235 2.192 12.128 1.21 1.777 5.533 4.67 7.267 5.788a1.37 1.37 0 0 0 1.448 0c1.733-1.119 6.056-4.011 7.267-5.788.609-.893 1.81-9.075 2.193-12.128.074-.595-.34-1.049-1.041-1.365", fill: "#BFDF46" }),
1126
- React__default["default"].createElement("path", { d: "M15.798 19.264c-1.522-.418-2.486-1.494-2.992-3.333a9.2 9.2 0 0 1-.177-4.156c.109-.644.715-1.192 1.434-.802q1.159.616 2.377 1.102c2.909 1.205 3.817 4.07 2.732 5.783-.578.912-1.922 1.806-3.375 1.406", fill: "#fff" }),
1127
- React__default["default"].createElement("path", { d: "M20.667 20.13a.3.3 0 0 1-.095-.015c-2.152-.684-4.24-2.662-4.838-4.08a.313.313 0 0 1 .508-.35q.045.045.067.106c.461 1.092 2.311 3.048 4.451 3.728a.313.313 0 0 1-.094.61", fill: "#9DBA22" })));
1128
- };
1129
-
1130
- const ServiceIcon = () => {
1131
- return (React__default["default"].createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1132
- React__default["default"].createElement("g", { clipPath: "url(#clip0_911_3434)" },
1133
- React__default["default"].createElement("path", { d: "M30.466 17.553c.714-.548.988-1.39.611-1.881s-1.261-.444-1.975.104c-.714.549-.988 1.391-.611 1.882s1.261.444 1.975-.105", fill: "#563960" }),
1134
- React__default["default"].createElement("path", { d: "M30.122 7.72a2.2 2.2 0 0 1-.438.37 2.355 2.355 0 0 1-2.787-3.79l.022-.017a2.356 2.356 0 0 1 3.203 3.437", fill: "#E8E2E2" }),
1135
- React__default["default"].createElement("path", { d: "M16.474 3.996c-.544-.568-1.058-1.45-1.082-2.29l-1.395.7a1.394 1.394 0 1 0 1.247 2.491l1.159-.583.259-.14a3 3 0 0 1-.188-.178", fill: "#E5395E" }),
1136
- React__default["default"].createElement("path", { d: "M18.934 2.175a1.39 1.39 0 0 1-.77 1.246l-1.472.738-.256.138a2.52 2.52 0 0 1-1.189-1.331 2 2 0 0 1-.042-1.165l.353-.191 1.358-.68a1.392 1.392 0 0 1 2.018 1.245", fill: "#F9AF2B" }),
1137
- React__default["default"].createElement("path", { d: "M5.507 6.695c-.407.705-1.475.86-2.425.362L2.975 7a3 3 0 0 1-.358-.248c.005-.012 1.05-.635 1.355-1.157.258-.44.25-1.335.268-1.38q.136.058.265.132.132.078.257.168c.795.585 1.128 1.515.745 2.18", fill: "#F44A52" }),
1138
- React__default["default"].createElement("path", { d: "M4.343 5.848a2.9 2.9 0 0 1-1.285 1.197L2.976 7a2.6 2.6 0 0 1-.398-.28c-.692-.587-.965-1.442-.605-2.067.378-.655 1.323-.833 2.215-.463a3 3 0 0 1 .51.28c.029.485-.095.967-.355 1.378", fill: "#E8E2E2" }),
1139
- React__default["default"].createElement("path", { d: "M1.87 17.24a1.12 1.12 0 1 0 0-2.24 1.12 1.12 0 0 0 0 2.24", fill: "#F9AF2B" }),
1140
- React__default["default"].createElement("path", { d: "M30.123 7.72a2.2 2.2 0 0 1-.437.37c0-1.013-1.5-3.058-3.153-3.418q.162-.206.365-.372l.023-.018c1.65.45 3.052 2.16 3.202 3.438", fill: "#C3C7C9" }),
1141
- React__default["default"].createElement("path", { d: "M25.295 17.4v9.637c0 2.13-1.745 3.225-3.855 3.518-2.707.375-8.128.375-10.835 0-2.11-.29-3.855-1.387-3.855-3.517v-9.637a3.86 3.86 0 0 1 1.354-2.93c.229-.194.412-.436.537-.71h14.767c.12.275.303.518.534.71q.16.135.303.29a3.85 3.85 0 0 1 1.05 2.64", fill: "#1B89E5" }),
1142
- React__default["default"].createElement("path", { d: "M16.568 17.151h-1.093a1.58 1.58 0 0 0-1.58 1.58v.272a.34.34 0 0 1-.34.34h-.272a1.58 1.58 0 0 0-1.58 1.58v1.095a1.58 1.58 0 0 0 1.58 1.58h.272a.34.34 0 0 1 .34.34v.272a1.58 1.58 0 0 0 1.58 1.58h1.093a1.58 1.58 0 0 0 1.58-1.58v-.273a.34.34 0 0 1 .34-.34h.274a1.58 1.58 0 0 0 1.58-1.58v-1.092a1.58 1.58 0 0 0-1.58-1.58h-.273a.34.34 0 0 1-.341-.34v-.274a1.58 1.58 0 0 0-1.58-1.58", fill: "#fff" }),
1143
- React__default["default"].createElement("path", { d: "M24.137 13.762H7.907a.47.47 0 0 1-.471-.47v-2.7a2.583 2.583 0 0 1 2.552-2.554c3.017-.1 9.05-.1 12.067 0a2.583 2.583 0 0 1 2.553 2.552v2.7a.473.473 0 0 1-.471.472", fill: "#E8E2E2" })),
1144
- React__default["default"].createElement("defs", null,
1145
- React__default["default"].createElement("clipPath", { id: "clip0_911_3434" },
1146
- React__default["default"].createElement("path", { fill: "#fff", d: "M0 0h32v32H0z" })))));
1147
- };
1148
-
1149
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1150
- const getContents = (t) => {
1151
- return [
1152
- {
1153
- label: 'Personalized Experience',
1154
- description: 'Your name, gender, and date of birth help us provide tailored health advice and personalized care plans that fit your unique needs.',
1155
- icon: React__default["default"].createElement(PersonalizeIcon, null),
1156
- },
1157
- {
1158
- label: 'Timely Health Updates',
1159
- description: 'We use your phone number and email to send important notifications, health reminders, and updates on new content to keep you informed.',
1160
- icon: React__default["default"].createElement(HealthUpdateIcon, null),
1161
- },
1162
- {
1163
- label: 'Enhanced Security',
1164
- description: 'We use your phone number and email to send important notifications, health reminders, and updates on new content to keep you informed.',
1165
- icon: React__default["default"].createElement(SecurityIcon, null),
1166
- },
1167
- {
1168
- label: 'Quick Customer Support',
1169
- description: 'We use your phone number and email to send important notifications, health reminders, and updates on new content to keep you informed.',
1170
- icon: React__default["default"].createElement(CustomerSupportIcon, null),
1171
- },
1172
- {
1173
- label: 'Service Improvement',
1174
- description: 'We use your phone number and email to send important notifications, health reminders, and updates on new content to keep you informed.',
1175
- icon: React__default["default"].createElement(ServiceIcon, null),
1176
- },
1177
- ];
1178
- };
1179
- const CollectInfoTextPopup = () => {
1180
- const [opened, setOpened] = React__default["default"].useState(false);
1181
- useTranslations.useTranslations();
1182
- const contents = getContents();
1183
- const [mobileDragOffset, setMobileDragOffset] = React.useState(0);
1184
- const dragStartYRef = React.useRef(0);
1185
- const mobileDragOffsetRef = React.useRef(mobileDragOffset);
1186
- mobileDragOffsetRef.current = mobileDragOffset;
1187
- const throttleSetMobileDragOffset = React.useMemo(() => {
1188
- return throttle__default["default"](setMobileDragOffset, 70);
1189
- }, []);
1190
- return (React__default["default"].createElement(React__default["default"].Fragment, null,
1191
- React__default["default"].createElement(index$3.Text, { size: "p4", onClick: () => {
1192
- setOpened(true);
1193
- setMobileDragOffset(0);
1194
- }, color: "blue.6", style: {
1195
- cursor: 'pointer',
1196
- } },
1197
- React__default["default"].createElement(other.Info, { size: 16, color: '#2D87F3', style: {
1198
- verticalAlign: 'sub',
1199
- } }),
1200
- ' ',
1201
- "Why We Need Your Information?"),
1202
- React__default["default"].createElement("style", { key: mobileDragOffset }, `
1203
- .collect-info-text-popup .mantine-Modal-inner {
1204
- transform: translateY(${Math.round(mobileDragOffset)}px);
1205
- }
1206
- `),
1207
- React__default["default"].createElement(index$1.Modal, { opened: opened, onClose: () => setOpened(false), withCloseButton: false, styles: (theme) => ({
1208
- body: {
1209
- padding: '32px 24px',
1210
- position: 'relative',
1211
- background: 'linear-gradient(180deg, #91CAFF 0%, #CFE8FF 100px, #FFFFFF 200px)',
1212
- [theme.fn.smallerThan('sm')]: {
1213
- height: '100%',
1214
- },
1215
- },
1216
- content: {
1217
- [theme.fn.smallerThan('sm')]: {
1218
- width: '100%',
1219
- height: '100%',
1220
- borderBottomLeftRadius: 0,
1221
- borderBottomRightRadius: 0,
1222
- maxWidth: '100%',
1223
- maxHeight: '100%',
1224
- },
1225
- },
1226
- inner: {
1227
- [theme.fn.smallerThan('sm')]: {
1228
- padding: 0,
1229
- left: 0,
1230
- right: 0,
1231
- top: 120,
1232
- // transform: `translateY(${Math.round(mobileDragOffset)}px)`,
1233
- display: 'block',
1234
- transition: 'transform 70ms',
1235
- },
1236
- },
1237
- }), className: "collect-info-text-popup" },
1238
- React__default["default"].createElement(core$1.Box, { sx: (theme) => ({
1239
- [theme.fn.largerThan('sm')]: {
1240
- display: 'none',
1519
+
1520
+ const SSOPasswordScreen = ({ hidden, index, }) => {
1521
+ var _a, _b;
1522
+ const { onClose } = useSSOState();
1523
+ const [errMsg, setErrMsg] = React__default["default"].useState('');
1524
+ const { steps, addStep, goNext } = useSSOSteps();
1525
+ const thisStep = steps[index];
1526
+ const phone = (_a = thisStep === null || thisStep === void 0 ? void 0 : thisStep.config) === null || _a === void 0 ? void 0 : _a.phone;
1527
+ const email = (_b = thisStep === null || thisStep === void 0 ? void 0 : thisStep.config) === null || _b === void 0 ? void 0 : _b.email;
1528
+ const resetPassword = () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
1529
+ var _c, _d;
1530
+ if (phone) {
1531
+ addStep({
1532
+ type: SSOStepTypeType.FORGOT_PASSWORD_PHONE,
1533
+ });
1534
+ }
1535
+ else {
1536
+ const existRes = yield checkUserExist({ email });
1537
+ if ((existRes === null || existRes === void 0 ? void 0 : existRes._status) === 1) {
1538
+ let res;
1539
+ if (!((_c = existRes._data) === null || _c === void 0 ? void 0 : _c.provider)) {
1540
+ res = yield registerBySendEmailOTP(email);
1541
+ }
1542
+ else {
1543
+ res = yield resendEmailOTP(email);
1544
+ }
1545
+ if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
1546
+ setErrMsg(((_d = res._messages) === null || _d === void 0 ? void 0 : _d[0]) || 'API error');
1547
+ return;
1548
+ }
1549
+ addStep({
1550
+ type: SSOStepTypeType.OTP,
1551
+ config: {
1552
+ email,
1553
+ otpType: 'email',
1554
+ afterAction: 'forgot',
1241
1555
  },
1242
- padding: 8,
1243
- width: '100%',
1244
- cursor: 'grab',
1245
- display: 'flex',
1246
- justifyContent: 'center',
1247
- position: 'absolute',
1248
- top: 0,
1249
- left: 0,
1250
- }), draggable: true, onDrag: (e) => {
1251
- if (e.clientY < 0)
1252
- return;
1253
- throttleSetMobileDragOffset(e.clientY - dragStartYRef.current);
1254
- }, onDragStart: (e) => {
1255
- dragStartYRef.current = e.clientY;
1256
- }, onDragEnd: (e) => {
1257
- if (e.clientY - dragStartYRef.current > 100) {
1258
- setMobileDragOffset(window.innerHeight);
1259
- setTimeout(() => {
1260
- setOpened(false);
1261
- }, 100);
1556
+ });
1557
+ }
1558
+ }
1559
+ goNext();
1560
+ });
1561
+ return (React__default["default"].createElement("form", { style: {
1562
+ display: hidden ? 'none' : 'block',
1563
+ }, onSubmit: (e) => {
1564
+ e.preventDefault();
1565
+ const password = e.currentTarget.password.value;
1566
+ // call api to login with email and password, if fail then show error
1567
+ if (phone) {
1568
+ loginByPhonePassword(phone, password)
1569
+ .then((res) => {
1570
+ var _a;
1571
+ if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
1572
+ handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
1573
+ onClose === null || onClose === void 0 ? void 0 : onClose();
1262
1574
  }
1263
1575
  else {
1264
- throttleSetMobileDragOffset(0);
1576
+ setErrMsg(((_a = res === null || res === void 0 ? void 0 : res._messages) === null || _a === void 0 ? void 0 : _a[0]) || 'API error');
1265
1577
  }
1266
- }, onTouchStart: (e) => {
1267
- dragStartYRef.current = e.touches[0].clientY;
1268
- }, onTouchMove: (e) => {
1269
- if (e.touches[0].clientY < 0)
1270
- return;
1271
- throttleSetMobileDragOffset(e.touches[0].clientY - dragStartYRef.current);
1272
- }, onTouchEnd: (e) => {
1273
- if (e.changedTouches[0].clientY - dragStartYRef.current > 100) {
1274
- setMobileDragOffset(window.innerHeight);
1275
- setTimeout(() => {
1276
- setOpened(false);
1277
- }, 100);
1578
+ })
1579
+ .catch(() => {
1580
+ setErrMsg('api error');
1581
+ });
1582
+ }
1583
+ else {
1584
+ loginByEmailPassword(email, password)
1585
+ .then((res) => {
1586
+ var _a;
1587
+ if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
1588
+ handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
1589
+ onClose === null || onClose === void 0 ? void 0 : onClose();
1278
1590
  }
1279
1591
  else {
1280
- throttleSetMobileDragOffset(0);
1592
+ setErrMsg(((_a = res === null || res === void 0 ? void 0 : res._messages) === null || _a === void 0 ? void 0 : _a[0]) || 'API error');
1281
1593
  }
1282
- } },
1283
- React__default["default"].createElement(core$1.Box, { sx: {
1284
- border: '1.5px solid #ADB3BC',
1285
- background: 'gray',
1286
- borderRadius: 3,
1287
- width: 44,
1288
- } })),
1289
- React__default["default"].createElement("div", { style: {
1594
+ })
1595
+ .catch(() => {
1596
+ setErrMsg('api error');
1597
+ });
1598
+ }
1599
+ } },
1600
+ React__default["default"].createElement(core.Stack, { spacing: 8 },
1601
+ React__default["default"].createElement(index$2.Text, { size: "s1", weight: "semiBold" },
1602
+ "Welcome back!",
1603
+ React__default["default"].createElement("br", null),
1604
+ "Enter your password"),
1605
+ React__default["default"].createElement(index$2.Text, { size: "p4" }, "\u0110\u0103ng nh\u1EADp b\u1EB1ng m\u1EADt kh\u1EA9u c\u1EE7a b\u1EA1n.")),
1606
+ React__default["default"].createElement(core.Stack, { mt: 24, spacing: 8 },
1607
+ React__default["default"].createElement(index$3.PasswordInput, { name: "password", placeholder: "Nh\u1EADp m\u1EADt kh\u1EA9u", error: errMsg || undefined }),
1608
+ React__default["default"].createElement(core.Group, { spacing: 8, align: "center", style: {
1290
1609
  height: 40,
1291
1610
  } },
1292
- React__default["default"].createElement(index$2.Button, { variant: "white", sx: (theme) => ({
1293
- width: 40,
1294
- height: 40,
1295
- padding: 8,
1296
- background: 'white',
1297
- borderRadius: '100%',
1298
- [theme.fn.smallerThan('sm')]: {
1299
- display: 'none',
1300
- },
1301
- }), onClick: () => setOpened(false) },
1302
- React__default["default"].createElement(arrow.ChevronLeft, null))),
1303
- React__default["default"].createElement(BackgroundHeader, null),
1304
- React__default["default"].createElement(core$1.Stack, { pos: "relative", mt: 100, spacing: 8, style: {
1305
- zIndex: 1,
1306
- } },
1307
- React__default["default"].createElement(index$3.Text, { size: "h4" }, "Why We Need Your Information"),
1308
- React__default["default"].createElement(index$4.Accordion, { styles: {
1309
- item: {
1310
- borderBottomColor: '#E4E8EC',
1311
- paddingBottom: 16,
1312
- marginTop: 16,
1313
- },
1314
- control: {
1315
- padding: 0,
1316
- },
1317
- content: {
1318
- padding: 0,
1319
- marginTop: 8,
1320
- },
1321
- } }, contents.map((item, index) => (React__default["default"].createElement(index$4.Accordion.Item, { key: index, value: item.label },
1322
- React__default["default"].createElement(index$4.Accordion.Control, { icon: item.icon },
1323
- React__default["default"].createElement(index$3.Text, { size: "s3", weight: "semiBold" }, item.label)),
1324
- React__default["default"].createElement(index$4.Accordion.Panel, null,
1325
- React__default["default"].createElement(index$3.Text, { size: "p3" }, item.description))))))))));
1611
+ React__default["default"].createElement(index$2.Text, { size: "p4" }, "Forgot Password?"),
1612
+ React__default["default"].createElement(index$2.Text, { size: "s4", color: "blue.6", style: {
1613
+ cursor: 'pointer',
1614
+ }, onClick: resetPassword }, "Reset"))),
1615
+ React__default["default"].createElement(index$1.Button, { type: "submit", size: "lg", variant: "primary", mt: 12, fullWidth: true }, "Sign In")));
1616
+ };
1617
+
1618
+ const SSOPasswordForgotPhone = ({ hidden, }) => {
1619
+ const [phone, setPhone] = React__default["default"].useState('');
1620
+ const [errMsg, setErrMsg] = React__default["default"].useState('');
1621
+ const { locale } = useSSOState();
1622
+ const { addStep, goNext, setShareData } = useSSOSteps();
1623
+ const onClickContinueZalo = () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
1624
+ var _a, _b, _c;
1625
+ const { areaCode, phoneNumber } = splitPhone(phone);
1626
+ const userExist = yield checkUserExist({ phone: phoneNumber });
1627
+ if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
1628
+ setShareData({
1629
+ authMethod: 'phone',
1630
+ });
1631
+ let res;
1632
+ if (!((_a = userExist._data) === null || _a === void 0 ? void 0 : _a.provider)) {
1633
+ res = yield registerBySendZaloOTP(phoneNumber, areaCode);
1634
+ }
1635
+ else {
1636
+ res = yield resendZaloOTP(phoneNumber, areaCode);
1637
+ }
1638
+ if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
1639
+ setErrMsg(((_b = res._messages) === null || _b === void 0 ? void 0 : _b[0]) || 'API error');
1640
+ return;
1641
+ }
1642
+ setShareData((a) => (Object.assign(Object.assign({}, a), { authFlow: 'register' })));
1643
+ addStep({
1644
+ type: SSOStepTypeType.OTP,
1645
+ config: {
1646
+ phone,
1647
+ otpType: 'phone-zalo',
1648
+ afterAction: 'forgot',
1649
+ },
1650
+ });
1651
+ goNext();
1652
+ }
1653
+ else {
1654
+ setErrMsg(((_c = userExist === null || userExist === void 0 ? void 0 : userExist._messages) === null || _c === void 0 ? void 0 : _c[0]) || 'API error');
1655
+ }
1656
+ });
1657
+ const onClickContinuePhone = () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
1658
+ var _d, _e, _f;
1659
+ const { areaCode, phoneNumber } = splitPhone(phone);
1660
+ const userExist = yield checkUserExist({ phone: phoneNumber });
1661
+ if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
1662
+ setShareData({
1663
+ authMethod: 'phone',
1664
+ });
1665
+ let res;
1666
+ if (!((_d = userExist._data) === null || _d === void 0 ? void 0 : _d.provider)) {
1667
+ res = yield registerBySendPhoneOTP(phoneNumber, areaCode);
1668
+ }
1669
+ else {
1670
+ res = yield resendPhoneOTP(phoneNumber, areaCode);
1671
+ }
1672
+ if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
1673
+ setErrMsg(((_e = res._messages) === null || _e === void 0 ? void 0 : _e[0]) || 'API error');
1674
+ return;
1675
+ }
1676
+ setShareData((a) => (Object.assign(Object.assign({}, a), { authFlow: 'register' })));
1677
+ addStep({
1678
+ type: SSOStepTypeType.OTP,
1679
+ config: {
1680
+ phone,
1681
+ otpType: 'phone-sms',
1682
+ afterAction: 'forgot',
1683
+ },
1684
+ });
1685
+ goNext();
1686
+ }
1687
+ else {
1688
+ setErrMsg(((_f = userExist === null || userExist === void 0 ? void 0 : userExist._messages) === null || _f === void 0 ? void 0 : _f[0]) || 'API error');
1689
+ }
1690
+ });
1691
+ return (React__default["default"].createElement("div", { style: {
1692
+ display: hidden ? 'none' : 'block',
1693
+ } },
1694
+ React__default["default"].createElement(core.Stack, { spacing: 8 },
1695
+ React__default["default"].createElement(index$2.Text, { size: "s1", weight: "semiBold" }, "Reset password"),
1696
+ React__default["default"].createElement(index$2.Text, { size: "p4" }, "Please provide the phone number you used to create your account.")),
1697
+ React__default["default"].createElement(core.Stack, { mt: 24, spacing: 16 },
1698
+ React__default["default"].createElement(StyledPhone, { defaultCountry: (locale ? utils.MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: phone, onChange: (value) => setPhone(value), isError: !!errMsg, required: true }),
1699
+ errMsg && (React__default["default"].createElement(index$2.Text, { size: "label2", color: "red.6", mt: -12 }, errMsg)),
1700
+ React__default["default"].createElement(index$1.Button, { size: "lg", variant: "primary", onClick: onClickContinueZalo }, "Continue with Zalo"),
1701
+ React__default["default"].createElement(index$1.Button, { size: "lg", variant: "secondary", onClick: onClickContinuePhone }, "Continue with SMS"))));
1326
1702
  };
1327
1703
 
1704
+ const CheckGrayIcon = () => (React__default["default"].createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1705
+ React__default["default"].createElement("path", { d: "M7.053 9.43 5.505 7.883a.48.48 0 0 0-.349-.142.47.47 0 0 0-.354.142.48.48 0 0 0-.145.351q0 .207.145.352l1.83 1.83q.18.18.421.18.24 0 .422-.18l3.709-3.71a.48.48 0 0 0 .142-.348.47.47 0 0 0-.142-.354.48.48 0 0 0-.351-.145.48.48 0 0 0-.352.145zm.948 4.903a6.2 6.2 0 0 1-2.47-.498 6.4 6.4 0 0 1-2.012-1.354 6.4 6.4 0 0 1-1.354-2.01A6.2 6.2 0 0 1 1.666 8q0-1.315.499-2.47a6.4 6.4 0 0 1 1.353-2.01 6.4 6.4 0 0 1 2.01-1.354 6.2 6.2 0 0 1 2.47-.5q1.314 0 2.47.5 1.157.498 2.012 1.353t1.354 2.01q.498 1.156.499 2.47 0 1.314-.499 2.47a6.4 6.4 0 0 1-1.354 2.011 6.4 6.4 0 0 1-2.01 1.355 6.2 6.2 0 0 1-2.47.498m-.002-1q2.234 0 3.784-1.55T13.333 8t-1.55-3.783-3.784-1.55-3.783 1.55T2.666 8t1.55 3.783 3.783 1.55", fill: "#8C8C8C" })));
1706
+ const CheckGreenIcon = () => (React__default["default"].createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1707
+ React__default["default"].createElement("path", { d: "M7.053 9.43 5.505 7.883a.48.48 0 0 0-.349-.142.47.47 0 0 0-.354.142.48.48 0 0 0-.145.351q0 .207.145.352l1.83 1.83q.18.18.421.18.24 0 .422-.18l3.709-3.71a.48.48 0 0 0 .142-.348.47.47 0 0 0-.142-.354.48.48 0 0 0-.351-.145.48.48 0 0 0-.352.145zm.948 4.903a6.2 6.2 0 0 1-2.47-.498 6.4 6.4 0 0 1-2.012-1.354 6.4 6.4 0 0 1-1.354-2.01A6.2 6.2 0 0 1 1.666 8q0-1.315.499-2.47a6.4 6.4 0 0 1 1.353-2.01 6.4 6.4 0 0 1 2.01-1.354 6.2 6.2 0 0 1 2.47-.5q1.314 0 2.47.5 1.157.498 2.012 1.353t1.354 2.01q.498 1.156.499 2.47 0 1.314-.499 2.47a6.4 6.4 0 0 1-1.354 2.011 6.4 6.4 0 0 1-2.01 1.355 6.2 6.2 0 0 1-2.47.498", fill: "#00B16A" })));
1708
+ const CheckRedIcon = () => (React__default["default"].createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1709
+ React__default["default"].createElement("path", { d: "m8.001 8.703 2.049 2.048q.138.14.348.142a.47.47 0 0 0 .355-.142.48.48 0 0 0 .145-.35.48.48 0 0 0-.145-.352L8.703 8l2.05-2.049a.48.48 0 0 0 .141-.348.47.47 0 0 0-.141-.354.48.48 0 0 0-.352-.145.48.48 0 0 0-.351.145L8.001 7.298l-2.048-2.05a.48.48 0 0 0-.349-.14.47.47 0 0 0-.354.14.48.48 0 0 0-.145.352q0 .207.145.351l2.049 2.05-2.049 2.048a.48.48 0 0 0-.142.348.47.47 0 0 0 .142.354.48.48 0 0 0 .351.145.48.48 0 0 0 .352-.145zm.001 5.63a6.2 6.2 0 0 1-2.47-.498 6.4 6.4 0 0 1-2.011-1.354 6.4 6.4 0 0 1-1.354-2.01A6.2 6.2 0 0 1 1.668 8q0-1.315.499-2.47A6.4 6.4 0 0 1 3.52 3.52a6.4 6.4 0 0 1 2.01-1.354 6.2 6.2 0 0 1 2.47-.5q1.314 0 2.47.5 1.156.498 2.012 1.353.855.855 1.354 2.01.499 1.156.499 2.47t-.499 2.47a6.4 6.4 0 0 1-1.354 2.011 6.4 6.4 0 0 1-2.01 1.355 6.2 6.2 0 0 1-2.47.498", fill: "#F44D2C" })));
1710
+
1328
1711
  const SSOPasswordWithConfirm = (_a) => {
1329
1712
  var { form } = _a, props = tslib_es6.__rest(_a, ["form"]);
1330
1713
  const [atLeast8Chars, setAtLeast8Chars] = React__default["default"].useState(undefined);
@@ -1334,31 +1717,32 @@ const SSOPasswordWithConfirm = (_a) => {
1334
1717
  if (typeof password === 'undefined')
1335
1718
  return;
1336
1719
  setAtLeast8Chars(password.length >= 8);
1337
- setAtLeastOneUpper(!!password.match(/[A-Z]/));
1720
+ setAtLeastOneUpper(!!password.match(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/));
1338
1721
  }, [password]);
1339
- return (React__default["default"].createElement(core$1.Stack, Object.assign({ spacing: 12 }, props),
1340
- React__default["default"].createElement(index$4.PasswordInput, Object.assign({ name: "password", placeholder: "Nh\u1EADp m\u1EADt kh\u1EA9u", label: "Password", required: true, withAsterisk: true }, form.getInputProps('password'))),
1341
- React__default["default"].createElement(core$1.Stack, { spacing: 8 },
1342
- React__default["default"].createElement(index$3.Text, { size: "n1" },
1343
- atLeast8Chars ? (React__default["default"].createElement(core.CheckCircle, { color: miscTheme.theme.colors.green600 })) : typeof atLeast8Chars === 'undefined' ? (React__default["default"].createElement(core.CheckCircle, null)) : (React__default["default"].createElement(other.CircleBorder, { color: miscTheme.theme.colors.red600, isSolid: true })),
1722
+ return (React__default["default"].createElement(core.Stack, Object.assign({ spacing: 12 }, props),
1723
+ React__default["default"].createElement(index$3.PasswordInput, Object.assign({ name: "password", placeholder: "Nh\u1EADp m\u1EADt kh\u1EA9u", label: "Password", required: true, withAsterisk: true }, form.getInputProps('password'))),
1724
+ React__default["default"].createElement(core.Stack, { spacing: 8 },
1725
+ React__default["default"].createElement(index$2.Text, { size: "n1" },
1726
+ atLeast8Chars ? (React__default["default"].createElement(CheckGreenIcon, null)) : typeof atLeast8Chars === 'undefined' ? (React__default["default"].createElement(CheckGrayIcon, null)) : (React__default["default"].createElement(CheckRedIcon, null)),
1344
1727
  ' ',
1345
1728
  "At least 8 characters."),
1346
- React__default["default"].createElement(index$3.Text, { size: "n1" },
1347
- atLeastOneUpper ? (React__default["default"].createElement(core.CheckCircle, { color: miscTheme.theme.colors.green600 })) : typeof atLeastOneUpper === 'undefined' ? (React__default["default"].createElement(core.CheckCircle, null)) : (React__default["default"].createElement(other.CircleBorder, { color: miscTheme.theme.colors.red600, isSolid: true })),
1729
+ React__default["default"].createElement(index$2.Text, { size: "n1" },
1730
+ atLeastOneUpper ? (React__default["default"].createElement(CheckGreenIcon, null)) : typeof atLeastOneUpper === 'undefined' ? (React__default["default"].createElement(CheckGrayIcon, null)) : (React__default["default"].createElement(CheckRedIcon, null)),
1348
1731
  ' ',
1349
- "At least one uppercase letter and one number.")),
1350
- React__default["default"].createElement(index$4.PasswordInput, Object.assign({ name: "confirm-password", placeholder: "X\u00E1c nh\u1EADn m\u1EADt kh\u1EA9u", label: "Confirm Password", required: true, withAsterisk: true }, form.getInputProps('confirmPassword')))));
1732
+ "At least one uppercase letter, one lowercase letter, and one number.")),
1733
+ React__default["default"].createElement(index$3.PasswordInput, Object.assign({ name: "confirm-password", placeholder: "X\u00E1c nh\u1EADn m\u1EADt kh\u1EA9u", label: "Confirm Password", required: true, withAsterisk: true }, form.getInputProps('confirmPassword')))));
1351
1734
  };
1352
1735
 
1353
1736
  const SSOPasswordForgotSetup = ({ hidden }) => {
1354
- const { onClose } = useSSOState();
1737
+ const { steps, goBack, currentStepIndex, addStep, goNext } = useSSOSteps();
1355
1738
  const form$1 = form.useForm({
1356
1739
  validate: form.yupResolver(yup__namespace.object().shape({
1357
1740
  password: yup__namespace
1358
1741
  .string()
1359
1742
  .required('Password is required')
1360
- .min(8)
1361
- .matches(/[A-Z]/, 'Password must contain at least one uppercase letter'),
1743
+ .min(8, ' ')
1744
+ .max(50, ' ')
1745
+ .matches(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/, ' '),
1362
1746
  confirmPassword: yup__namespace
1363
1747
  .string()
1364
1748
  .required('Confirm password is required')
@@ -1368,27 +1752,49 @@ const SSOPasswordForgotSetup = ({ hidden }) => {
1368
1752
  })),
1369
1753
  });
1370
1754
  const onSubmit = (values) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
1755
+ var _a;
1371
1756
  const { password, confirmPassword } = values;
1372
1757
  if (password.length >= 8 &&
1373
- password.match(/[A-Z]/) &&
1758
+ password.length <= 50 &&
1759
+ password.match(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/) &&
1374
1760
  password === confirmPassword) {
1375
1761
  const res = yield resetPassword(password, confirmPassword);
1376
1762
  if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
1377
- // close popup
1378
- onClose === null || onClose === void 0 ? void 0 : onClose();
1763
+ useMantineLocale.showNotification({
1764
+ type: 'success',
1765
+ message: 'Password has been reset successfully',
1766
+ });
1767
+ // back to login step
1768
+ const foundPasswordIndex = steps.findIndex((step) => step.type === SSOStepTypeType.PASSWORD);
1769
+ const foundPasswordStep = steps.find((step) => step.type === SSOStepTypeType.PASSWORD);
1770
+ const diffIndex = currentStepIndex - foundPasswordIndex;
1771
+ for (let i = 0; i < diffIndex; i++) {
1772
+ goBack();
1773
+ }
1774
+ goBack();
1775
+ addStep(foundPasswordStep);
1776
+ goNext();
1777
+ // onClose?.()
1778
+ }
1779
+ else {
1780
+ // toast error message
1781
+ useMantineLocale.showNotification({
1782
+ type: 'danger',
1783
+ message: ((_a = res === null || res === void 0 ? void 0 : res._messages) === null || _a === void 0 ? void 0 : _a[0]) || 'API error',
1784
+ });
1379
1785
  }
1380
1786
  }
1381
1787
  });
1382
1788
  return (React__default["default"].createElement("form", { style: {
1383
1789
  display: hidden ? 'none' : 'block',
1384
1790
  }, onSubmit: form$1.onSubmit(onSubmit) },
1385
- React__default["default"].createElement(core$1.Stack, { spacing: 24 },
1386
- React__default["default"].createElement(core$1.Stack, { spacing: 8 },
1387
- React__default["default"].createElement(index$3.Text, { size: "s1", weight: "semiBold" }, "Setup your password"),
1388
- React__default["default"].createElement(index$3.Text, { size: "p4" }, "Set up your login password and other details to complete the registration process.")),
1791
+ React__default["default"].createElement(core.Stack, { spacing: 24 },
1792
+ React__default["default"].createElement(core.Stack, { spacing: 8 },
1793
+ React__default["default"].createElement(index$2.Text, { size: "s1", weight: "semiBold" }, "Setup your password"),
1794
+ React__default["default"].createElement(index$2.Text, { size: "p4" }, "Set up your login password and other details to complete the registration process.")),
1389
1795
  React__default["default"].createElement(SSOPasswordWithConfirm, { form: form$1 }),
1390
- React__default["default"].createElement(CollectInfoTextPopup, null),
1391
- React__default["default"].createElement(index$2.Button, { size: "lg", variant: "primary", fullWidth: true }, "Save"))));
1796
+ React__default["default"].createElement(CollectInfoText, null),
1797
+ React__default["default"].createElement(index$1.Button, { type: "submit", size: "lg", variant: "primary", fullWidth: true }, "Save"))));
1392
1798
  };
1393
1799
 
1394
1800
  const SSOPhoneVerify = ({ hidden, }) => {
@@ -1408,18 +1814,21 @@ const SSOPhoneVerify = ({ hidden, }) => {
1408
1814
  phone,
1409
1815
  },
1410
1816
  });
1817
+ goNext();
1411
1818
  }
1412
1819
  else {
1413
- registerBySendZaloOTP(phoneNumber, areaCode);
1820
+ resendUpdatePhoneZaloOTP(phoneNumber, areaCode);
1414
1821
  addStep({
1415
1822
  type: SSOStepTypeType.OTP,
1416
1823
  config: {
1417
1824
  phone,
1418
1825
  otpType: 'phone-zalo',
1826
+ isUpdatePhone: true,
1827
+ afterAction: 'setup',
1419
1828
  },
1420
1829
  });
1830
+ goNext();
1421
1831
  }
1422
- goNext();
1423
1832
  }
1424
1833
  else {
1425
1834
  setErrMsg(((_c = userExist === null || userExist === void 0 ? void 0 : userExist._messages) === null || _c === void 0 ? void 0 : _c[0]) || 'API error');
@@ -1430,125 +1839,167 @@ const SSOPhoneVerify = ({ hidden, }) => {
1430
1839
  const { areaCode, phoneNumber } = splitPhone(phone);
1431
1840
  const userExist = yield checkUserExist({ phone: phoneNumber });
1432
1841
  if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
1433
- if (((_d = userExist._data) === null || _d === void 0 ? void 0 : _d.is_pass) && ((_e = userExist._data) === null || _e === void 0 ? void 0 : _e.is_status) === 'Active') {
1842
+ if ((_d = userExist._data) === null || _d === void 0 ? void 0 : _d.is_pass) {
1434
1843
  addStep({
1435
1844
  type: SSOStepTypeType.PASSWORD,
1436
1845
  config: {
1437
1846
  phone,
1438
1847
  },
1439
1848
  });
1849
+ goNext();
1440
1850
  }
1441
1851
  else {
1442
- registerBySendPhoneOTP(phoneNumber, areaCode);
1852
+ const res = yield resendUpdatePhoneOTP(phoneNumber, areaCode);
1853
+ if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
1854
+ setErrMsg(((_e = res === null || res === void 0 ? void 0 : res._messages) === null || _e === void 0 ? void 0 : _e[0]) || 'API error');
1855
+ return;
1856
+ }
1443
1857
  addStep({
1444
1858
  type: SSOStepTypeType.OTP,
1445
1859
  config: {
1446
1860
  phone,
1447
1861
  otpType: 'phone-sms',
1862
+ isUpdatePhone: true,
1863
+ afterAction: 'setup',
1448
1864
  },
1449
1865
  });
1866
+ goNext();
1450
1867
  }
1451
- goNext();
1452
1868
  }
1453
1869
  else {
1454
1870
  setErrMsg(((_f = userExist === null || userExist === void 0 ? void 0 : userExist._messages) === null || _f === void 0 ? void 0 : _f[0]) || 'API error');
1455
1871
  }
1456
1872
  });
1457
- return (React__default["default"].createElement("form", { style: {
1873
+ return (React__default["default"].createElement("div", { style: {
1458
1874
  display: hidden ? 'none' : 'block',
1459
- }, onSubmit: (e) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
1460
- var _g, _h, _j;
1461
- e.preventDefault();
1462
- const email = e.currentTarget.email.value;
1463
- const existRes = yield checkUserExist({ email });
1464
- if ((existRes === null || existRes === void 0 ? void 0 : existRes._status) === 1) {
1465
- if (((_g = existRes._data) === null || _g === void 0 ? void 0 : _g.is_pass) &&
1466
- ((_h = existRes._data) === null || _h === void 0 ? void 0 : _h.is_status) === 'Active') {
1467
- // go to password screen
1468
- addStep({
1469
- type: SSOStepTypeType.PASSWORD,
1470
- config: {
1471
- email,
1472
- },
1473
- });
1474
- goNext();
1475
- }
1476
- else {
1477
- // go to register screen
1478
- registerBySendEmailOTP(email);
1479
- addStep({
1480
- type: SSOStepTypeType.OTP,
1481
- config: {
1482
- email,
1483
- otpType: 'email',
1484
- },
1485
- });
1486
- goNext();
1487
- }
1488
- }
1489
- else {
1490
- setErrMsg(((_j = existRes._messages) === null || _j === void 0 ? void 0 : _j[0]) || 'api error');
1491
- }
1492
- }) },
1493
- React__default["default"].createElement(core$1.Stack, { spacing: 24 },
1494
- React__default["default"].createElement(core$1.Stack, { spacing: 8 },
1495
- React__default["default"].createElement(index$3.Text, { size: "s1", weight: "semiBold" }, "Verify Phone Number"),
1496
- React__default["default"].createElement(index$3.Text, { size: "p4" }, "Please provide additional information to complete the account registration process.")),
1497
- React__default["default"].createElement(core$1.Stack, { spacing: 16 },
1498
- React__default["default"].createElement(index$4.Input.Wrapper, { error: errMsg },
1875
+ } },
1876
+ React__default["default"].createElement(core.Stack, { spacing: 24 },
1877
+ React__default["default"].createElement(core.Stack, { spacing: 8 },
1878
+ React__default["default"].createElement(index$2.Text, { size: "s1", weight: "semiBold" }, "Verify Phone Number"),
1879
+ React__default["default"].createElement(index$2.Text, { size: "p4" }, "Please provide additional information to complete the account registration process.")),
1880
+ React__default["default"].createElement(core.Stack, { spacing: 16 },
1881
+ React__default["default"].createElement(index$3.Input.Wrapper, { error: errMsg },
1499
1882
  React__default["default"].createElement(StyledPhone, { defaultCountry: (locale ? utils.MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: phone, onChange: (value) => setPhone(value), isError: !!errMsg, required: true, name: "phone" })),
1500
- React__default["default"].createElement(index$2.Button, { size: "lg", variant: "primary", onClick: onClickContinueZalo }, "Continue with Zalo"),
1501
- React__default["default"].createElement(index$2.Button, { size: "lg", variant: "secondary", onClick: onClickContinuePhone }, "Continue with SMS")),
1502
- React__default["default"].createElement(CollectInfoTextPopup, null))));
1883
+ React__default["default"].createElement(index$1.Button, { size: "lg", variant: "primary", onClick: onClickContinueZalo }, "Continue with Zalo"),
1884
+ React__default["default"].createElement(index$1.Button, { size: "lg", variant: "secondary", onClick: onClickContinuePhone }, "Continue with SMS")),
1885
+ React__default["default"].createElement(CollectInfoText, null))));
1503
1886
  };
1504
1887
 
1888
+ const FemaleIcon = () => (React__default["default"].createElement("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1889
+ React__default["default"].createElement("path", { d: "M9.907.476C7.828.428 5.535 2.36 4.817 4.593c-1.192 3.7.154 9.554-1.391 13.089l10.542-.056c.649-3.603.786-7.28.41-10.922-.159-1.46-.4-3.184-1.33-4.294C12.02 1.184 11.02.624 10.514.514a2.4 2.4 0 0 0-.607-.038", fill: "#262626" }),
1890
+ React__default["default"].createElement("path", { d: "M14.224 18.144H5.532c-1.44 0-2.196-.447-1.206-1.493a7 7 0 0 1 .531-.502c.537-.457 1.743-1.437 2.57-1.921.513-.3.894-.78 1.068-1.348q.108-.418.143-.847h2.48q.035.43.143.847a2.36 2.36 0 0 0 1.066 1.348c.83.484 2.034 1.464 2.572 1.921q.28.238.532.502c.99 1.046.233 1.493-1.207 1.493", fill: "#FFB497" }),
1891
+ React__default["default"].createElement("path", { d: "M15.841 17.15c.41.686.031 1.06-.556 1.401-.604.35-2.454 1.086-5.407 1.086S5.076 18.9 4.471 18.55c-.587-.34-.965-.715-.555-1.4q.327-.538.76-.985a9.3 9.3 0 0 1 2.64-1.846l2.59 2.726 2.573-2.707a9.3 9.3 0 0 1 2.6 1.827h.003c.287.297.542.628.759.985", fill: "#FC488D" }),
1892
+ React__default["default"].createElement("path", { d: "M6.037 7.275a.95.95 0 0 0-.763-.012c-.442.225-.502.809-.353 1.227.19.538.782 1.076 1.414.871z", fill: "#FFB497" }),
1893
+ React__default["default"].createElement("path", { d: "M6.334 8.688a.23.23 0 0 1-.192-.104.66.66 0 0 0-.514-.249.23.23 0 0 1-.003-.46c.023 0 .6-.005.902.457a.23.23 0 0 1-.193.356m4.929 4.192c-.519.285-1.054.501-1.384.501s-.865-.216-1.383-.501q.108-.418.143-.847h2.481q.034.43.143.847", fill: "#FF977B" }),
1894
+ React__default["default"].createElement("path", { d: "M13.564 6.966c-.181-1.907-1.68-4.121-2.63-3.686a.18.18 0 0 1-.194-.028C9.154 1.846 9.156 6.759 6.035 7.274c.071 2.186.776 3.652 1.512 4.224.667.52 1.781 1.116 2.33 1.116s1.664-.596 2.332-1.116c.77-.6 1.577-2.186 1.355-4.532", fill: "#FCCAAF" }),
1895
+ React__default["default"].createElement("path", { d: "M11.786 7.978a.387.387 0 1 0 0-.775.387.387 0 0 0 0 .775", fill: "#404040" }),
1896
+ React__default["default"].createElement("path", { d: "M11.098 7.092a.85.85 0 0 1 .417-.26c.15-.04.307-.048.46-.022q.218.034.413.136.069.03.143.03l.045-.001a.157.157 0 0 1 .163.153.2.2 0 0 1-.012.065.34.34 0 0 1-.207.188.45.45 0 0 1-.323-.02 1.1 1.1 0 0 0-.287-.072.8.8 0 0 0-.268.014.5.5 0 0 0-.207.104l-.018.015a.23.23 0 0 1-.319-.33m-.157-1.074c.35-.09.711-.116 1.07-.076a2.5 2.5 0 0 1 1.012.349.179.179 0 0 1-.177.31 2.2 2.2 0 0 0-.875-.253 2.5 2.5 0 0 0-.908.113.23.23 0 0 1-.134-.44z", fill: "#262626" }),
1897
+ React__default["default"].createElement("path", { d: "M7.971 7.978a.387.387 0 1 0 0-.775.387.387 0 0 0 0 .775", fill: "#404040" }),
1898
+ React__default["default"].createElement("path", { d: "M8.324 7.409a.5.5 0 0 0-.207-.105.8.8 0 0 0-.268-.014 1.1 1.1 0 0 0-.288.073.45.45 0 0 1-.322.019.34.34 0 0 1-.208-.188.158.158 0 0 1 .15-.217l.047.001q.075 0 .143-.03.195-.102.412-.136c.153-.026.31-.018.46.022a.85.85 0 0 1 .416.26.23.23 0 0 1-.317.33zm.37-.948a2.5 2.5 0 0 0-.907-.113 2.2 2.2 0 0 0-.876.253.179.179 0 0 1-.176-.31h.001a2.5 2.5 0 0 1 1.013-.35c.358-.039.72-.013 1.069.077a.23.23 0 0 1-.11.447l-.01-.003z", fill: "#262626" }),
1899
+ React__default["default"].createElement("path", { d: "M10.887 9.971a.15.15 0 0 0-.19-.094l-.012.005a.2.2 0 0 1-.118.004c-.046-.01-.108-.032-.193-.05a.6.6 0 0 0-.397.053.6.6 0 0 0-.397-.053c-.084.019-.145.041-.192.05a.2.2 0 0 1-.118-.004l-.012-.004a.15.15 0 0 0-.132.265.5.5 0 0 0 .283.082c.092 0 .165-.013.217-.012.053.001.152.115.188.145a.28.28 0 0 0 .36-.033c.02-.024.101-.111.155-.112.054 0 .126.012.218.012a.5.5 0 0 0 .282-.082.15.15 0 0 0 .058-.172", fill: "#F44D2C" }),
1900
+ React__default["default"].createElement("path", { d: "M10.142 8.676a.23.23 0 0 0-.173.078.4.4 0 0 1-.092.015.4.4 0 0 1-.093-.015.23.23 0 0 0-.403.152c0 .32.49.324.496.324.005 0 .494-.004.494-.324a.23.23 0 0 0-.23-.23", fill: "#FF977B" }),
1901
+ React__default["default"].createElement("path", { d: "M10.026 10.691h-.294a.23.23 0 1 0 0 .46h.294a.23.23 0 0 0 0-.46", fill: "#F44D2C" }),
1902
+ React__default["default"].createElement("path", { d: "M11.796 18.906a.45.45 0 0 1-.402-.628c.7-1.683-.73-4.184-.36-6.07a9 9 0 0 0 1.09-.687c.771-.6 1.578-2.186 1.356-4.532-.178-1.869-1.621-4.033-2.574-3.71l-.008.001-.007-.005a.013.013 0 0 1 .001-.016c.267-.299.343-1.113-.318-1.782-.498-.505-.665-.992-.418-.979 1.971.11 4.022 2.014 4.7 4.117.79 2.454.252 5.67.611 8.706.23 1.94 1.62 5.74-3.671 5.585", fill: "#262626" })));
1903
+ const MaleIcon = () => (React__default["default"].createElement("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1904
+ React__default["default"].createElement("path", { d: "M10.334 16.266c-3.177 0-3.932-2.198-3.444-2.426.155-.073.312-.14.465-.21.487-.136.801-.72.966-1.133s.213-.762.219-.997l.19.37q.102.06.21.107a3.27 3.27 0 0 0 2.789 0c.072-.031.532-.437.599-.477l-.1.498c.005.226.063.286.14.499.222.59.41.89.955 1.138q.226.1.456.205c.153.071.017 2.426-3.445 2.426", fill: "#FF977B" }),
1905
+ React__default["default"].createElement("path", { d: "M17.623 17.018c.503.8.038 1.233-.68 1.63-.74.407-2.994 1.263-6.609 1.263s-5.869-.856-6.61-1.264c-.717-.396-1.182-.83-.68-1.63.43-.685 1.662-2.158 3.845-3.177.155-.073.312-.14.466-.21.695 1.15 2.091 1.4 2.985 1.4s2.286-.25 2.983-1.395q.225.1.456.205c2.183 1.019 3.415 2.492 3.844 3.178", fill: "#2D87F3" }),
1906
+ React__default["default"].createElement("path", { d: "M12.852 12.533c-.72.35-1.573.539-2.447.543a5.8 5.8 0 0 1-2.458-.517c.117-.22.18-.453.188-.688l.003-.002q.143.06.296.107c.617.205 1.29.312 1.972.312a6.3 6.3 0 0 0 2.269-.419l.002.002c.007.226.066.45.175.662", fill: "#FF6F4D" }),
1907
+ React__default["default"].createElement("path", { d: "M14.755 7.579H5.61c-.213-2.439.17-4.883 1.27-5.997a.97.97 0 0 1 .98-.242c.205.066.731.01.906-.234.14-.197.714-.443 1.08-.104a.5.5 0 0 0 .334.127h.003a.52.52 0 0 0 .335-.127c.365-.339.939-.093 1.078.104.176.245.703.3.908.234a.97.97 0 0 1 .98.242c1.1 1.114 1.482 3.558 1.27 5.997", fill: "#404040" }),
1908
+ React__default["default"].createElement("path", { d: "M14.02 6.912a1 1 0 0 1 .728-.007c.5.203.641.795.438 1.417-.2.617-.906 1.045-1.517.826-.179-.587-.062-1.716.351-2.236M6.607 9.147c-.611.219-1.317-.208-1.517-.825-.203-.622-.063-1.214.437-1.417a1 1 0 0 1 .728.007c.612.412.71 1.838.352 2.235", fill: "#FF977B" }),
1909
+ React__default["default"].createElement("path", { d: "M13.887 8.263a.156.156 0 0 1-.125-.25 1.05 1.05 0 0 1 .804-.417.156.156 0 1 1-.003.312h-.001a.73.73 0 0 0-.55.292.16.16 0 0 1-.125.063m-7.498-.008a.16.16 0 0 1-.125-.063.7.7 0 0 0-.545-.282.16.16 0 0 1-.16-.151.156.156 0 0 1 .15-.161 1.02 1.02 0 0 1 .805.408.156.156 0 0 1-.125.25z", fill: "#FF6F4D" }),
1910
+ React__default["default"].createElement("path", { d: "M12.353 3.765c-.545.131-.883.448-2.2.448s-1.656-.317-2.201-.448c-1.02-.247-1.649 2.672-1.647 3.883.001.18.028.696.054 1.2l.029.493q.03.34.152.66c1.108 3.11 6.118 3.096 7.347-.04.002-.085.015-.324.032-.62l.028-.493c.026-.504.053-1.02.053-1.2.002-1.211-.625-4.13-1.647-3.883", fill: "#FFB497" }),
1911
+ React__default["default"].createElement("path", { d: "M12.348 6.946a.359.359 0 1 0-.717 0v.14a.359.359 0 1 0 .717 0zm-4.421.141a.359.359 0 0 0 .718 0v-.14a.359.359 0 1 0-.718 0z", fill: "#595959" }),
1912
+ React__default["default"].createElement("path", { d: "M11.344 6.96a.2.2 0 0 1-.061-.013.15.15 0 0 1-.082-.198c.081-.196.348-.278.557-.312.381-.062.889-.017 1.102.228a.156.156 0 1 1-.236.206c-.1-.116-.446-.174-.772-.132-.24.032-.35.102-.363.13a.16.16 0 0 1-.145.091", fill: "#404040" }),
1913
+ React__default["default"].createElement("path", { d: "M10.137 8.963c-.008 0-.772-.033-.772-.373a.156.156 0 0 1 .305-.048c.147.068.306.105.467.11.163-.005.324-.042.472-.11a.156.156 0 0 1 .305.048c0 .34-.77.373-.777.373", fill: "#FF6F4D" }),
1914
+ React__default["default"].createElement("path", { d: "M11.122 6.393a.157.157 0 0 1-.051-.304c.687-.234 1.688-.344 2.26-.03a.156.156 0 0 1-.15.274c-.463-.254-1.38-.163-2.009.052a.2.2 0 0 1-.05.008m-2.19.572a.16.16 0 0 1-.144-.097c-.013-.027-.123-.097-.363-.129-.325-.043-.672.016-.772.131a.156.156 0 1 1-.236-.205c.214-.245.721-.29 1.103-.228.209.034.475.116.556.311a.156.156 0 0 1-.144.217m.222-.571a.2.2 0 0 1-.05-.009c-.629-.215-1.546-.306-2.009-.051a.156.156 0 1 1-.15-.274c.572-.315 1.572-.206 2.26.03a.156.156 0 0 1-.05.304", fill: "#404040" }),
1915
+ React__default["default"].createElement("path", { d: "m11.12 9.547-.019.001a8 8 0 0 1-1.928 0 .156.156 0 1 0-.037.31c.665.08 1.337.08 2.003 0a.156.156 0 0 0-.019-.31", fill: "#D84023" })));
1916
+
1505
1917
  // always has name, gender dob
1506
1918
  const OtherSetup = ({ form, needPhone, needEmail, isEmailDisable, }) => {
1507
1919
  const { locale = 'vi-VN' } = useSSOState();
1508
- return (React__default["default"].createElement(core$1.Stack, { spacing: 8 },
1509
- needPhone && (React__default["default"].createElement(index$4.Input.Wrapper, Object.assign({ label: "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i", withAsterisk: true }, form.getInputProps('phone')),
1510
- React__default["default"].createElement(StyledPhone, { defaultCountry: (locale ? utils.MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: form.getInputProps('phone').value, onChange: (value) => {
1511
- form.setFieldValue('phone', value);
1512
- }, isError: !!form.getInputProps('phone').error, required: true, name: "phone" }))),
1513
- // email is disabled
1514
- needEmail && (React__default["default"].createElement(index$4.Input, Object.assign({ name: "email", type: "email", label: "Email", disabled: isEmailDisable }, form.getInputProps('email')))),
1515
- React__default["default"].createElement(index$4.Input, Object.assign({ name: "name", label: "Name", withAsterisk: true, required: true }, form.getInputProps('name'))),
1516
- React__default["default"].createElement(index$4.Input.Wrapper, Object.assign({ label: "Gender", withAsterisk: true }, form.getInputProps('gender')),
1517
- React__default["default"].createElement(core$1.Group, null,
1518
- React__default["default"].createElement(index$2.Button, { type: "button", sx: {
1519
- flex: 1,
1920
+ return (React__default["default"].createElement(core.Stack, { spacing: 12 },
1921
+ needPhone && (React__default["default"].createElement(React__default["default"].Fragment, null,
1922
+ React__default["default"].createElement(index$3.Input.Wrapper, Object.assign({ label: "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i", withAsterisk: true }, form.getInputProps('phone')),
1923
+ React__default["default"].createElement(StyledPhone, { defaultCountry: (locale ? utils.MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: form.getInputProps('phone').value, onChange: (value) => {
1924
+ form.setFieldValue('phone', value);
1925
+ }, isError: !!form.getInputProps('phone').error, required: true, name: "phone" })),
1926
+ React__default["default"].createElement(core.Group, { spacing: 24 },
1927
+ React__default["default"].createElement(index$2.Text, { size: "p4" }, "Nh\u1EADn OTP qua"),
1928
+ React__default["default"].createElement(index$3.Radio.Group, Object.assign({ name: "otpMethod", styles: {
1929
+ root: {
1930
+ display: 'flex',
1931
+ flexDirection: 'row',
1932
+ flexWrap: 'wrap',
1933
+ gap: 24,
1934
+ },
1935
+ } }, form.getInputProps('otpMethod')),
1936
+ React__default["default"].createElement(index$3.Radio, { value: "zalo", label: "Zalo", styles: {
1937
+ label: {
1938
+ paddingLeft: 8,
1939
+ },
1940
+ } }),
1941
+ React__default["default"].createElement(index$3.Radio, { value: "sms", label: "SMS", styles: {
1942
+ label: {
1943
+ paddingLeft: 8,
1944
+ },
1945
+ } }))))),
1946
+ needEmail && (React__default["default"].createElement(index$3.Input, Object.assign({ name: "email", type: "email", label: "Email", disabled: isEmailDisable }, form.getInputProps('email')))),
1947
+ React__default["default"].createElement(index$3.Input, Object.assign({ name: "name", label: "Name", withAsterisk: true, required: true, placeholder: "Enter your name" }, form.getInputProps('name'))),
1948
+ React__default["default"].createElement(index$3.Input.Wrapper, Object.assign({ label: "Gender", withAsterisk: true }, form.getInputProps('gender')),
1949
+ React__default["default"].createElement(core.Group, null,
1950
+ React__default["default"].createElement(index$1.Button, { type: "button", styles: {
1951
+ root: {
1952
+ flex: 1,
1953
+ },
1954
+ leftIcon: {
1955
+ marginRight: 8,
1956
+ },
1957
+ inner: {
1958
+ justifyContent: 'start',
1959
+ },
1520
1960
  }, variant: form.getInputProps('gender').value === 'female'
1521
1961
  ? 'secondary'
1522
1962
  : 'tertiary', onClick: () => {
1523
1963
  form.setFieldValue('gender', 'female');
1524
- } }, "Female"),
1525
- React__default["default"].createElement(index$2.Button, { type: "button", sx: {
1526
- flex: 1,
1964
+ }, leftIcon: React__default["default"].createElement(FemaleIcon, null) }, "Female"),
1965
+ React__default["default"].createElement(index$1.Button, { type: "button", styles: {
1966
+ root: {
1967
+ flex: 1,
1968
+ },
1969
+ leftIcon: {
1970
+ marginRight: 8,
1971
+ },
1972
+ inner: {
1973
+ justifyContent: 'start',
1974
+ },
1527
1975
  }, variant: form.getInputProps('gender').value === 'male'
1528
1976
  ? 'secondary'
1529
1977
  : 'tertiary', onClick: () => {
1530
1978
  form.setFieldValue('gender', 'male');
1531
- } }, "Male"))),
1532
- React__default["default"].createElement(index$5.DatePicker, Object.assign({ name: "dob", label: "Birthday", withAsterisk: true, required: true }, form.getInputProps('dob')))));
1979
+ }, leftIcon: React__default["default"].createElement(MaleIcon, null) }, "Male"))),
1980
+ React__default["default"].createElement(index$5.DatePicker, Object.assign({ name: "dob", label: "Birthday", withAsterisk: true, required: true, placeholder: "Enter your birthday" }, form.getInputProps('dob')))));
1533
1981
  };
1534
1982
 
1535
- const SSOSetupScreen = ({ hidden, index: index$1, }) => {
1983
+ const SSOSetupScreen = ({ hidden, index, }) => {
1536
1984
  const { onClose, source } = useSSOState();
1537
- const { steps } = useSSOSteps();
1538
- const currentStep = steps[index$1];
1985
+ const { goNext, steps, addStep, shareData } = useSSOSteps();
1986
+ const [errMsg, setErrMsg] = React__default["default"].useState('');
1987
+ const currentStep = steps[index];
1539
1988
  const config = currentStep === null || currentStep === void 0 ? void 0 : currentStep.config;
1540
1989
  const userInfo = config === null || config === void 0 ? void 0 : config.userInfo;
1541
- const isEmailDisable = !!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) && !!(config === null || config === void 0 ? void 0 : config.disabledEmail);
1542
1990
  const needPass = !(userInfo === null || userInfo === void 0 ? void 0 : userInfo.is_pass);
1543
1991
  const needPhone = !(userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone_verified_at);
1544
- const needEmail = !(userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) || isEmailDisable;
1545
1992
  // const isNew = !!userInfo?.is_new
1993
+ const authMethod = shareData === null || shareData === void 0 ? void 0 : shareData.authMethod;
1994
+ const authFlow = shareData === null || shareData === void 0 ? void 0 : shareData.authFlow;
1995
+ const isEmailDisable = authMethod === 'google' || authMethod === 'mail';
1996
+ const needEmail = authFlow !== 'verify-phone';
1546
1997
  const form$1 = form.useForm({
1547
- initialValues: Object.assign({}, (needEmail
1998
+ initialValues: Object.assign(Object.assign({}, (needPhone
1548
1999
  ? {
1549
- email: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) || '',
2000
+ otpMethod: 'zalo',
1550
2001
  }
1551
- : {})),
2002
+ : {})), { dob: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.birthday) ? new Date(userInfo.birthday) : undefined, name: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) || undefined, email: isEmailDisable ? (userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) || undefined : undefined }),
1552
2003
  validateInputOnBlur: true,
1553
2004
  validate: form.yupResolver(yup__namespace.object().shape(Object.assign(Object.assign(Object.assign(Object.assign({}, (needPass
1554
2005
  ? {
@@ -1556,7 +2007,8 @@ const SSOSetupScreen = ({ hidden, index: index$1, }) => {
1556
2007
  .string()
1557
2008
  .required('Password is required')
1558
2009
  .min(8, ' ')
1559
- .matches(/[A-Z]/, ' '),
2010
+ .max(50, ' ')
2011
+ .matches(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/, ' '),
1560
2012
  confirmPassword: yup__namespace
1561
2013
  .string()
1562
2014
  .required('Confirm password is required')
@@ -1567,6 +2019,10 @@ const SSOSetupScreen = ({ hidden, index: index$1, }) => {
1567
2019
  : {})), (needPhone
1568
2020
  ? {
1569
2021
  phone: yup__namespace.string().required('Phone number is required'),
2022
+ otpMethod: yup__namespace
2023
+ .string()
2024
+ .required('OTP method is required')
2025
+ .oneOf(['zalo', 'sms']),
1570
2026
  }
1571
2027
  : {})), (needEmail
1572
2028
  ? {
@@ -1578,9 +2034,10 @@ const SSOSetupScreen = ({ hidden, index: index$1, }) => {
1578
2034
  .oneOf(['male', 'female']), dob: yup__namespace.date().required('Date of birth is required'), name: yup__namespace.string().required('Name is required') }))),
1579
2035
  });
1580
2036
  const onSubmit = (values) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
1581
- var _a;
1582
- const { password, confirmPassword, phone, gender, name, dob } = values;
2037
+ var _a, _b, _c, _d;
2038
+ const { password, confirmPassword, phone, gender, name, dob, otpMethod } = values;
1583
2039
  const { phoneNumber, areaCode } = splitPhone(phone || '');
2040
+ // validate only, delay set data to after otp
1584
2041
  const res = yield updateUserInfo({
1585
2042
  name,
1586
2043
  birthday: dayjs__default["default"](dob).format('YYYY-MM-DD'),
@@ -1591,28 +2048,100 @@ const SSOSetupScreen = ({ hidden, index: index$1, }) => {
1591
2048
  area_code: areaCode,
1592
2049
  gender: gender === 'male' ? 1 : 0,
1593
2050
  source,
2051
+ validate: 'true',
1594
2052
  });
1595
2053
  if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
1596
- onClose === null || onClose === void 0 ? void 0 : onClose();
1597
- miscCookieHelper.setCookie(index.BEARER_TOKEN_COOKIE, (_a = res._data) === null || _a === void 0 ? void 0 : _a.token, {
1598
- domain: window.location.hostname === 'localhost'
1599
- ? 'localhost'
1600
- : `.${constantsDomainLocales.domainLocales[process.env.UNIFY_LOCALE || 'vi-VN']}`,
1601
- expires: new Date(res._data.expire_in * 1000).toUTCString(),
1602
- });
2054
+ // if need phone and has phone then start phone verify step, close after done
2055
+ if (needPhone && phone) {
2056
+ const setupData = {
2057
+ name,
2058
+ birthday: dayjs__default["default"](dob).format('YYYY-MM-DD'),
2059
+ email: values.email,
2060
+ password,
2061
+ confirm_password: confirmPassword,
2062
+ phone_number: phoneNumber,
2063
+ area_code: areaCode,
2064
+ gender: gender === 'male' ? 1 : 0,
2065
+ source,
2066
+ };
2067
+ if (otpMethod === 'zalo') {
2068
+ const res = yield resendUpdatePhoneZaloOTP(phoneNumber, areaCode);
2069
+ if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
2070
+ setErrMsg(((_a = res === null || res === void 0 ? void 0 : res._messages) === null || _a === void 0 ? void 0 : _a[0]) || 'API error');
2071
+ return;
2072
+ }
2073
+ addStep({
2074
+ type: SSOStepTypeType.OTP,
2075
+ config: {
2076
+ phone,
2077
+ otpType: 'phone-zalo',
2078
+ isUpdatePhone: true,
2079
+ afterAction: 'submitSetup',
2080
+ setupData,
2081
+ },
2082
+ });
2083
+ goNext();
2084
+ }
2085
+ else {
2086
+ const res = yield resendUpdatePhoneOTP(phoneNumber, areaCode);
2087
+ if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
2088
+ setErrMsg(((_b = res === null || res === void 0 ? void 0 : res._messages) === null || _b === void 0 ? void 0 : _b[0]) || 'API error');
2089
+ return;
2090
+ }
2091
+ addStep({
2092
+ type: SSOStepTypeType.OTP,
2093
+ config: {
2094
+ phone,
2095
+ otpType: 'phone-sms',
2096
+ isUpdatePhone: true,
2097
+ afterAction: 'submitSetup',
2098
+ setupData,
2099
+ },
2100
+ });
2101
+ goNext();
2102
+ }
2103
+ }
2104
+ else {
2105
+ // close?
2106
+ const res = yield updateUserInfo({
2107
+ name,
2108
+ birthday: dayjs__default["default"](dob).format('YYYY-MM-DD'),
2109
+ email: values.email,
2110
+ password,
2111
+ confirm_password: confirmPassword,
2112
+ phone_number: phoneNumber,
2113
+ area_code: areaCode,
2114
+ gender: gender === 'male' ? 1 : 0,
2115
+ source,
2116
+ validate: '',
2117
+ });
2118
+ if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
2119
+ handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
2120
+ onClose === null || onClose === void 0 ? void 0 : onClose();
2121
+ }
2122
+ else {
2123
+ setErrMsg(((_c = res._messages) === null || _c === void 0 ? void 0 : _c[0]) || 'API error');
2124
+ return;
2125
+ }
2126
+ }
2127
+ }
2128
+ else {
2129
+ // toast error message
2130
+ setErrMsg(((_d = res._messages) === null || _d === void 0 ? void 0 : _d[0]) || 'API error');
1603
2131
  }
1604
2132
  });
1605
2133
  return (React__default["default"].createElement("form", { style: {
1606
2134
  display: hidden ? 'none' : 'block',
1607
2135
  }, onSubmit: form$1.onSubmit(onSubmit) },
1608
- React__default["default"].createElement(core$1.Stack, { spacing: 24 },
1609
- React__default["default"].createElement(core$1.Stack, { spacing: 8 },
1610
- React__default["default"].createElement(index$3.Text, { size: "s1", weight: "semiBold" }, "Almost done!"),
1611
- React__default["default"].createElement(index$3.Text, { size: "p4" }, "Please provide additional information to complete the account registration process.")),
2136
+ React__default["default"].createElement(core.Stack, { spacing: 24 },
2137
+ React__default["default"].createElement(core.Stack, { spacing: 8 },
2138
+ React__default["default"].createElement(index$2.Text, { size: "s1", weight: "semiBold" }, "Almost done!"),
2139
+ React__default["default"].createElement(index$2.Text, { size: "p4" }, "Please provide additional information to complete the account registration process.")),
1612
2140
  needPass && React__default["default"].createElement(SSOPasswordWithConfirm, { form: form$1 }),
1613
2141
  React__default["default"].createElement(OtherSetup, { needPhone: needPhone, needEmail: needEmail, isEmailDisable: isEmailDisable, form: form$1 }),
1614
- React__default["default"].createElement(CollectInfoTextPopup, null),
1615
- React__default["default"].createElement(index$2.Button, { type: "submit", variant: "primary", fullWidth: true }, needPhone ? 'Verify Phone Number' : 'Save'))));
2142
+ React__default["default"].createElement(CollectInfoText, null),
2143
+ errMsg && (React__default["default"].createElement(index$2.Text, { color: "red.6", size: "p4" }, errMsg)),
2144
+ React__default["default"].createElement(index$1.Button, { type: "submit", variant: "primary", fullWidth: true }, needPhone ? 'Verify Phone Number' : 'Save'))));
1616
2145
  };
1617
2146
 
1618
2147
  const SSOScreenRenderer = () => {
@@ -1642,11 +2171,30 @@ const SSOScreenRenderer = () => {
1642
2171
  })));
1643
2172
  };
1644
2173
 
1645
- const SSOV2 = ({ onClose, locale, source = 'default' }) => {
1646
- return (React__default["default"].createElement(SSOStateProvider, { onClose: onClose, locale: locale, source: source },
1647
- React__default["default"].createElement(SSOStepsProvider, null,
2174
+ const SSOV2 = ({ onClose: onCloseProps, locale, source = 'default', defaultSteps, }) => {
2175
+ const { isOpen, setOpen, returnUrl, setMounted } = store.useSSOV2Store();
2176
+ React.useEffect(() => {
2177
+ setMounted(true);
2178
+ return () => {
2179
+ setMounted(false);
2180
+ };
2181
+ }, []);
2182
+ if (!isOpen) {
2183
+ return null;
2184
+ }
2185
+ const onClose = (success) => {
2186
+ if (success && returnUrl) {
2187
+ window.location.href = returnUrl;
2188
+ return;
2189
+ }
2190
+ setOpen(false);
2191
+ onCloseProps === null || onCloseProps === void 0 ? void 0 : onCloseProps();
2192
+ };
2193
+ return ReactDOM.createPortal(React__default["default"].createElement(SSOStateProvider, { onClose: onClose, locale: locale, source: source },
2194
+ React__default["default"].createElement(SSOStepsProvider, { defaultSteps: defaultSteps },
1648
2195
  React__default["default"].createElement(SSOPopupWrapper, { opened: true, onClose: onClose },
1649
- React__default["default"].createElement(SSOScreenRenderer, null)))));
2196
+ React__default["default"].createElement(SSOScreenRenderer, null)))), utils$1.getPopupWrapperDom());
1650
2197
  };
1651
2198
 
2199
+ exports.useSSOV2Store = store.useSSOV2Store;
1652
2200
  exports.SSOV2 = SSOV2;