@hhgtech/hhg-components 1.29.110 → 1.29.111

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 (457) hide show
  1. package/build/Google-9a9770c8.js +38 -0
  2. package/build/{LastPeriod-9964beff.js → LastPeriod-d16c1ea8.js} +1 -1
  3. package/build/{MobileBottomNavigationIcon-47d13939.js → MobileBottomNavigationIcon-d0bc3fac.js} +3 -3
  4. package/build/{Spinner-3cfb77fb.js → Spinner-8a698498.js} +1 -1
  5. package/build/{WhatsApp-d804a21a.js → WhatsApp-f783bf8f.js} +1 -1
  6. package/build/adapters.js +18 -18
  7. package/build/atoms.js +45 -45
  8. package/build/babyGrowth.js +82 -82
  9. package/build/cache.js +2 -2
  10. package/build/care.js +17 -17
  11. package/build/careBookingSearchBar.js +14 -14
  12. package/build/careBookingSearchBarV2.js +15 -15
  13. package/build/components.js +88 -88
  14. package/build/{constants-b6a27170.js → constants-bda3fd86.js} +1 -1
  15. package/build/constants.js +3 -3
  16. package/build/constantsDomainLocales.js +1 -1
  17. package/build/constantsRiskScreener.js +2 -2
  18. package/build/constantsSite.js +2 -2
  19. package/build/{core-f7393a4d.js → core-cba930f7.js} +1 -1
  20. package/build/{dataTransform-a9aa9e94.js → dataTransform-837b8411.js} +1 -1
  21. package/build/ecom.js +4 -4
  22. package/build/{editor-44ca788c.js → editor-42ef0b82.js} +11 -11
  23. package/build/embeddedHeathToolCards_babyGrowth.js +22 -22
  24. package/build/embeddedHeathToolCards_babyPoop.js +18 -18
  25. package/build/embeddedHeathToolCards_babyVaccine.js +21 -21
  26. package/build/embeddedHeathToolCards_bmi_bmi.js +25 -25
  27. package/build/embeddedHeathToolCards_bmrBmr.js +25 -25
  28. package/build/embeddedHeathToolCards_dueDate_dueDate.js +21 -21
  29. package/build/embeddedHeathToolCards_ovulation_ovulation.js +21 -21
  30. package/build/embeddedHeathToolCards_pwg_pwg.js +26 -26
  31. package/build/embeddedHeathToolCards_targetHeartRate.js +27 -27
  32. package/build/esm/Google-844b3694.js +15 -0
  33. package/build/esm/{LastPeriod-94d47b13.js → LastPeriod-6a71dddc.js} +1 -1
  34. package/build/esm/{MobileBottomNavigationIcon-5a2f9cda.js → MobileBottomNavigationIcon-3cfa4b14.js} +3 -3
  35. package/build/esm/{Spinner-adc15177.js → Spinner-5a0df635.js} +1 -1
  36. package/build/esm/{WhatsApp-72259ef3.js → WhatsApp-def7f0e9.js} +1 -1
  37. package/build/esm/adapters.js +18 -18
  38. package/build/esm/atoms.js +45 -45
  39. package/build/esm/babyGrowth.js +82 -82
  40. package/build/esm/cache.js +2 -2
  41. package/build/esm/care.js +17 -17
  42. package/build/esm/careBookingSearchBar.js +14 -14
  43. package/build/esm/careBookingSearchBarV2.js +15 -15
  44. package/build/esm/components.js +88 -88
  45. package/build/esm/{constants-62165820.js → constants-03f8dbae.js} +1 -1
  46. package/build/esm/constants.js +3 -3
  47. package/build/esm/constantsDomainLocales.js +1 -1
  48. package/build/esm/constantsRiskScreener.js +2 -2
  49. package/build/esm/constantsSite.js +2 -2
  50. package/build/esm/{core-d6efb3c7.js → core-e8e5bd42.js} +1 -1
  51. package/build/esm/{dataTransform-0a6dc377.js → dataTransform-6d013343.js} +1 -1
  52. package/build/esm/ecom.js +4 -4
  53. package/build/esm/{editor-9349fc79.js → editor-99f55a70.js} +11 -11
  54. package/build/esm/embeddedHeathToolCards_babyGrowth.js +22 -22
  55. package/build/esm/embeddedHeathToolCards_babyPoop.js +18 -18
  56. package/build/esm/embeddedHeathToolCards_babyVaccine.js +21 -21
  57. package/build/esm/embeddedHeathToolCards_bmi_bmi.js +25 -25
  58. package/build/esm/embeddedHeathToolCards_bmrBmr.js +25 -25
  59. package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +21 -21
  60. package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +21 -21
  61. package/build/esm/embeddedHeathToolCards_pwg_pwg.js +26 -26
  62. package/build/esm/embeddedHeathToolCards_targetHeartRate.js +27 -27
  63. package/build/esm/{fixedBottomAdBlock-f4baa787.js → fixedBottomAdBlock-a2106963.js} +22 -22
  64. package/build/esm/footer.js +20 -20
  65. package/build/esm/gAssets.js +2 -2
  66. package/build/esm/healthToolsCardWrapper.js +17 -17
  67. package/build/esm/healthToolsForm.js +33 -33
  68. package/build/esm/hooks.js +14 -14
  69. package/build/esm/i18n.js +2 -2
  70. package/build/esm/i18nV2.js +2 -2
  71. package/build/esm/{index-33bb2e7a.js → index-02336dba.js} +1 -1
  72. package/build/esm/{index-3e3fcf95.js → index-0251091e.js} +2 -2
  73. package/build/esm/{index-5221ae6b.js → index-061cf8ff.js} +11 -11
  74. package/build/esm/{index-16c22540.js → index-072a4c0b.js} +2 -2
  75. package/build/esm/{index-89f80018.js → index-1a32ef86.js} +14 -14
  76. package/build/esm/{index-a807d223.js → index-1dd59b40.js} +16 -16
  77. package/build/esm/{index-aa32f4d3.js → index-20e6a915.js} +23 -23
  78. package/build/esm/{index-8064c18c.js → index-2381e9de.js} +6 -6
  79. package/build/esm/{index-15fa6e53.js → index-2542c25d.js} +1 -1
  80. package/build/esm/{index-53b37308.js → index-29c78f77.js} +15 -15
  81. package/build/esm/{index-c2025e5d.js → index-2a6c5203.js} +12 -12
  82. package/build/esm/{index-c072844e.js → index-30ca84b5.js} +2 -2
  83. package/build/esm/{index-2448ba80.js → index-316277f8.js} +3 -3
  84. package/build/esm/{index-cf2e8195.js → index-38efcc39.js} +2 -2
  85. package/build/esm/{index-3d5d1e1b.js → index-3d912153.js} +14 -14
  86. package/build/esm/{index-43b726db.js → index-3fd32195.js} +2 -2
  87. package/build/esm/{index-aa9360c8.js → index-4bb6e69a.js} +4 -4
  88. package/build/esm/{index-56a79323.js → index-5a54ed9b.js} +3 -3
  89. package/build/esm/{index-b7f5af36.js → index-6e166286.js} +13 -13
  90. package/build/esm/{index-5ded1850.js → index-83a8eee7.js} +15 -15
  91. package/build/esm/{index-2af5a80e.js → index-87acd8f7.js} +18 -18
  92. package/build/esm/{index-35c7265c.js → index-8af36482.js} +3 -3
  93. package/build/esm/{index-50eafe3e.js → index-8b5cf2b7.js} +12 -12
  94. package/build/esm/{index-e6dcd686.js → index-8d68eb39.js} +1 -1
  95. package/build/esm/{index-d942cc15.js → index-8e3e9da4.js} +5 -5
  96. package/build/esm/{index-e52421fc.js → index-918e70f4.js} +16 -16
  97. package/build/esm/{index-b9208015.js → index-9335ba57.js} +15 -15
  98. package/build/esm/{index-6e7ee277.js → index-93df7701.js} +16 -16
  99. package/build/esm/{index-b7a5ae7c.js → index-96a59dd0.js} +6 -6
  100. package/build/esm/{index-bc9435ba.js → index-9a05ab79.js} +21 -21
  101. package/build/esm/{index-d46a2e09.js → index-a1ac4405.js} +1 -1
  102. package/build/esm/{index-8f6f01e4.js → index-a2b7c2e7.js} +19 -19
  103. package/build/esm/{index-235e6ff6.js → index-a4e0d76f.js} +1 -1
  104. package/build/esm/{index-0fde3c88.js → index-a8815b22.js} +31 -31
  105. package/build/esm/{index-cbf33f76.js → index-ad747da0.js} +2 -2
  106. package/build/esm/{index-8cfb8ffd.js → index-c94cfc7d.js} +2 -2
  107. package/build/esm/{index-d46bc097.js → index-cad3f20c.js} +12 -12
  108. package/build/esm/{index-16cca3e0.js → index-cb04f4e0.js} +3 -3
  109. package/build/esm/{index-d6ba0b97.js → index-cb235b95.js} +3 -3
  110. package/build/esm/{index-7f2d389c.js → index-d1b85eee.js} +1 -1
  111. package/build/esm/{index-58449963.js → index-d6d45316.js} +7 -7
  112. package/build/esm/{index-32ef64f3.js → index-d9197263.js} +2 -2
  113. package/build/esm/{index-0653c377.js → index-dbb54dad.js} +6 -6
  114. package/build/esm/{index-5c8ec94d.js → index-df82f273.js} +2 -2
  115. package/build/esm/{index-cdff6bde.js → index-e20c7cb4.js} +6 -6
  116. package/build/esm/{index-88d1e9fe.js → index-e43e6daf.js} +1 -1
  117. package/build/esm/{index-f67d0646.js → index-e45c2db8.js} +1 -1
  118. package/build/esm/{index-17fce332.js → index-e730899e.js} +17 -17
  119. package/build/esm/{index-a47dc117.js → index-e900f7fc.js} +5 -5
  120. package/build/esm/{index-37d07df3.js → index-ebc6c341.js} +12 -12
  121. package/build/esm/{index-5154a719.js → index-edf5db37.js} +14 -14
  122. package/build/esm/{index-a5d23469.js → index-f10f1fb8.js} +7 -7
  123. package/build/esm/{index-14d4175c.js → index-f2732541.js} +1 -1
  124. package/build/esm/{index-e0813672.js → index-f5bca47f.js} +2 -2
  125. package/build/esm/{index-ab3252bc.js → index-fc9567f0.js} +2 -2
  126. package/build/esm/{index-0ab47613.js → index-fdc3a02f.js} +20 -20
  127. package/build/esm/index.js +111 -122
  128. package/build/esm/{index.styles-87407526.js → index.styles-9ffb84a3.js} +1 -1
  129. package/build/esm/{labelSorting-f9f43706.js → labelSorting-e862f3cb.js} +4 -4
  130. package/build/esm/lead.js +22 -22
  131. package/build/esm/{logoIcon-acc01a57.js → logoIcon-34e8fa76.js} +2 -2
  132. package/build/esm/mantine.js +24 -24
  133. package/build/esm/misc.js +18 -18
  134. package/build/esm/miscGetDynamicHealthTool.js +5 -5
  135. package/build/esm/miscGetSocialList.js +8 -8
  136. package/build/esm/miscScreenSizeContext.js +1 -1
  137. package/build/esm/mobileBottomNavigation.js +5 -5
  138. package/build/esm/mobileBottomNavigationIcon.js +5 -5
  139. package/build/esm/molecules.js +67 -67
  140. package/build/esm/moleculesArticleCard.js +6 -6
  141. package/build/esm/moleculesArticleCardV2.js +15 -15
  142. package/build/esm/navigation.js +40 -40
  143. package/build/esm/navigationLogoutPopup.js +9 -9
  144. package/build/esm/navigationProfileButton.js +23 -23
  145. package/build/esm/onboardingV2.js +28 -28
  146. package/build/esm/organisms.js +44 -44
  147. package/build/esm/{post-e5559ad6.js → post-3e244908.js} +2 -2
  148. package/build/esm/profileNavigation.js +19 -19
  149. package/build/esm/progressBar.js +1 -1
  150. package/build/esm/pwg.js +21 -21
  151. package/build/esm/ssoV2.js +1622 -0
  152. package/build/esm/subot.js +30 -30
  153. package/build/esm/surveyOrPremiumBanner.js +29 -29
  154. package/build/esm/surveyQuestionCard.js +10 -10
  155. package/build/esm/{surveyThankyouCard-bcf08bf0.js → surveyThankyouCard-dda42736.js} +5 -5
  156. package/build/esm/together.js +50 -50
  157. package/build/esm/togetherApiUtils.js +4 -4
  158. package/build/esm/togetherAtoms.js +30 -30
  159. package/build/esm/togetherComponentGlobalContext.js +4 -4
  160. package/build/esm/togetherMolecules.js +40 -40
  161. package/build/esm/togetherMoleculesCardAuthor.js +24 -24
  162. package/build/esm/togetherMoleculesPostImagePreview.js +11 -11
  163. package/build/esm/togetherMoleculesProfileDetail.js +30 -30
  164. package/build/esm/togetherOrganisms.js +45 -45
  165. package/build/esm/togetherRichTextEditor.js +17 -17
  166. package/build/esm/togetherShareBox.js +10 -10
  167. package/build/esm/{treePopoverMenu-fbc40cab.js → treePopoverMenu-99ccaf15.js} +18 -18
  168. package/build/esm/{types-f7e921ce.js → types-943eb3cb.js} +2 -2
  169. package/build/esm/types.js +2 -2
  170. package/build/esm/{useCategory-e9c58e46.js → useCategory-032bef23.js} +5 -5
  171. package/build/esm/{useHealthToolCache-5dcdf1dd.js → useHealthToolCache-5bc2c18b.js} +1 -1
  172. package/build/esm/{useMantineLocale-e24e123a.js → useMantineLocale-8c5b5fc9.js} +5 -5
  173. package/build/esm/{usePlacesAutocomplete-c6b04bb5.js → usePlacesAutocomplete-8af8d9c4.js} +1 -1
  174. package/build/esm/useTogetherAuthRequiredAction.js +4 -4
  175. package/build/esm/{useTranslations-07b27d99.js → useTranslations-95c6883a.js} +1 -1
  176. package/build/esm/{utils-4e13c960.js → utils-073ebee6.js} +2 -2
  177. package/build/esm/{utils-36b96c58.js → utils-56de005f.js} +3 -3
  178. package/build/esm/{utils-017de61e.js → utils-62937217.js} +2 -2
  179. package/build/esm/vaccination.js +20 -20
  180. package/build/{fixedBottomAdBlock-40e013d6.js → fixedBottomAdBlock-4e2f014d.js} +22 -22
  181. package/build/footer.js +20 -20
  182. package/build/gAssets.js +2 -2
  183. package/build/healthToolsCardWrapper.js +17 -17
  184. package/build/healthToolsForm.js +33 -33
  185. package/build/hooks.js +14 -14
  186. package/build/i18n.js +1 -1
  187. package/build/i18nV2.js +1 -1
  188. package/build/{index-c0d6ff80.js → index-0b5356e5.js} +6 -6
  189. package/build/{index-95abe4d4.js → index-0c83d79d.js} +2 -2
  190. package/build/{index-8da9d74a.js → index-0e75a585.js} +2 -2
  191. package/build/{index-d7e780fe.js → index-14584b97.js} +15 -15
  192. package/build/{index-99282efe.js → index-1fcb5e5c.js} +14 -14
  193. package/build/{index-c63ea941.js → index-205dc16c.js} +3 -3
  194. package/build/{index-75bae308.js → index-24116842.js} +2 -2
  195. package/build/{index-9deaf0f8.js → index-2952c70d.js} +3 -3
  196. package/build/{index-747fed64.js → index-2aa7c4cd.js} +2 -2
  197. package/build/{index-e3b79653.js → index-2ac6a777.js} +3 -3
  198. package/build/{index-a6b6b993.js → index-2e7f9ae7.js} +12 -12
  199. package/build/{index-f5944a20.js → index-35f41022.js} +4 -4
  200. package/build/{index-7233bd6d.js → index-36227b55.js} +2 -2
  201. package/build/{index-049aece7.js → index-46743170.js} +19 -19
  202. package/build/{index-27bfcf07.js → index-4ec635ce.js} +1 -1
  203. package/build/{index-1ddced1b.js → index-50a7b410.js} +11 -11
  204. package/build/{index-b0472af7.js → index-545c39d3.js} +17 -17
  205. package/build/{index-e7e7b68c.js → index-55d4275e.js} +20 -20
  206. package/build/{index-2ce37ad2.js → index-570d9d4c.js} +16 -16
  207. package/build/{index-529f2cf6.js → index-581d8105.js} +6 -6
  208. package/build/{index-8ea79133.js → index-612701f6.js} +6 -6
  209. package/build/{index-13ad9534.js → index-65b72b18.js} +3 -3
  210. package/build/{index-40d370cc.js → index-67ffc70a.js} +1 -1
  211. package/build/{index-28e00c63.js → index-6bd20e17.js} +12 -12
  212. package/build/{index-03548c34.js → index-6c2f66f8.js} +1 -1
  213. package/build/{index-5c8dc1a3.js → index-74f169c4.js} +2 -2
  214. package/build/{index-b1794d6c.js → index-7e4b085c.js} +2 -2
  215. package/build/{index-28722db9.js → index-823c0f3c.js} +2 -2
  216. package/build/{index-986d4587.js → index-85bcdccc.js} +2 -2
  217. package/build/{index-f6c7b353.js → index-8a341a35.js} +1 -1
  218. package/build/{index-9244359b.js → index-8e570054.js} +12 -12
  219. package/build/{index-de3d8886.js → index-90dd5604.js} +31 -31
  220. package/build/{index-45fab631.js → index-9216c6ed.js} +1 -1
  221. package/build/{index-81bf5c98.js → index-96c1b956.js} +15 -15
  222. package/build/{index-5b08c63c.js → index-9b03e760.js} +7 -7
  223. package/build/{index-d84ef58d.js → index-9b2a6df6.js} +1 -1
  224. package/build/{index-4e709717.js → index-a5f1a090.js} +13 -12
  225. package/build/{index-6192f9c2.js → index-a79f2e3c.js} +16 -16
  226. package/build/{index-f5bb3a9d.js → index-a8647e95.js} +15 -15
  227. package/build/{index-742fa48b.js → index-ad655c42.js} +14 -14
  228. package/build/{index-21598eb4.js → index-b2519660.js} +2 -2
  229. package/build/{index-f24a8689.js → index-b47d6440.js} +1 -1
  230. package/build/{index-830cf23b.js → index-b96fc0d1.js} +12 -12
  231. package/build/{index-f77a5513.js → index-bbe2ebb5.js} +6 -6
  232. package/build/{index-a80275e1.js → index-c99871c5.js} +5 -5
  233. package/build/{index-b77008b4.js → index-cd40a719.js} +23 -23
  234. package/build/{index-a812f053.js → index-d585bec5.js} +16 -16
  235. package/build/{index-3d5a2af4.js → index-dd400977.js} +18 -18
  236. package/build/{index-45a2a666.js → index-ddf07c51.js} +21 -21
  237. package/build/{index-583288bc.js → index-e0c93d12.js} +1 -1
  238. package/build/{index-8adbdb4f.js → index-e19284e4.js} +7 -7
  239. package/build/{index-f3afbbb6.js → index-e435db02.js} +1 -1
  240. package/build/{index-13fbb425.js → index-e59269bb.js} +14 -14
  241. package/build/{index-61c24e51.js → index-e8ede7d9.js} +5 -5
  242. package/build/{index-19e4fddf.js → index-ed9e7ac3.js} +3 -3
  243. package/build/{index-e77fda5d.js → index-fab1cc3a.js} +2 -2
  244. package/build/index.js +112 -123
  245. package/build/{index.styles-cf5296fa.js → index.styles-3c08adf1.js} +1 -1
  246. package/build/{labelSorting-1767b217.js → labelSorting-c35f771e.js} +4 -4
  247. package/build/lead.js +22 -22
  248. package/build/{logoIcon-b6e9ebbc.js → logoIcon-206b5862.js} +2 -2
  249. package/build/mantine.js +20 -20
  250. package/build/misc.js +18 -18
  251. package/build/miscGetDynamicHealthTool.js +5 -5
  252. package/build/miscGetSocialList.js +8 -8
  253. package/build/miscScreenSizeContext.js +1 -1
  254. package/build/mobileBottomNavigation.js +5 -5
  255. package/build/mobileBottomNavigationIcon.js +5 -5
  256. package/build/molecules.js +67 -67
  257. package/build/moleculesArticleCard.js +6 -6
  258. package/build/moleculesArticleCardV2.js +15 -15
  259. package/build/navigation.js +40 -40
  260. package/build/navigationLogoutPopup.js +9 -9
  261. package/build/navigationProfileButton.js +23 -23
  262. package/build/onboardingV2.js +27 -27
  263. package/build/organisms.js +44 -44
  264. package/build/{post-563403e1.js → post-c0fc6a66.js} +2 -2
  265. package/build/profileNavigation.js +19 -19
  266. package/build/progressBar.js +1 -1
  267. package/build/pwg.js +21 -21
  268. package/build/ssoV2.js +1652 -0
  269. package/build/subot.js +29 -29
  270. package/build/surveyOrPremiumBanner.js +29 -29
  271. package/build/surveyQuestionCard.js +10 -10
  272. package/build/{surveyThankyouCard-40786ef3.js → surveyThankyouCard-2bdf2dcd.js} +5 -5
  273. package/build/together.js +50 -50
  274. package/build/togetherApiUtils.js +4 -4
  275. package/build/togetherAtoms.js +30 -30
  276. package/build/togetherComponentGlobalContext.js +4 -4
  277. package/build/togetherMolecules.js +40 -40
  278. package/build/togetherMoleculesCardAuthor.js +24 -24
  279. package/build/togetherMoleculesPostImagePreview.js +11 -11
  280. package/build/togetherMoleculesProfileDetail.js +30 -30
  281. package/build/togetherOrganisms.js +45 -45
  282. package/build/togetherRichTextEditor.js +17 -17
  283. package/build/togetherShareBox.js +10 -10
  284. package/build/{treePopoverMenu-e0f418f8.js → treePopoverMenu-2ab933a7.js} +18 -18
  285. package/build/{types-a5ed4acd.js → types-59f18720.js} +2 -2
  286. package/build/types.js +2 -2
  287. package/build/{useCategory-7833d8d9.js → useCategory-09029dc3.js} +5 -5
  288. package/build/{useHealthToolCache-7ef0f9cd.js → useHealthToolCache-de6b2733.js} +1 -1
  289. package/build/{useMantineLocale-16175b54.js → useMantineLocale-06fe1f92.js} +5 -5
  290. package/build/{usePlacesAutocomplete-48ea8506.js → usePlacesAutocomplete-96f0c57a.js} +1 -1
  291. package/build/useTogetherAuthRequiredAction.js +4 -4
  292. package/build/{useTranslations-783bc413.js → useTranslations-398426f8.js} +1 -1
  293. package/build/{utils-dfe2edbf.js → utils-1645a4a3.js} +3 -3
  294. package/build/{utils-3aa5b9de.js → utils-74cf7dfd.js} +2 -2
  295. package/build/{utils-17e8be52.js → utils-9c9e505f.js} +2 -2
  296. package/build/vaccination.js +20 -20
  297. package/package.json +1 -1
  298. /package/build/{BMI_BOYS.percentile.monthly-31834ca0.js → BMI_BOYS.percentile.monthly-b2263c02.js} +0 -0
  299. /package/build/{BMI_BOYS.percentile.weekly-bb6043c1.js → BMI_BOYS.percentile.weekly-7189e549.js} +0 -0
  300. /package/build/{BMI_BOYS.percentile.yearly-cc6cba70.js → BMI_BOYS.percentile.yearly-01310d86.js} +0 -0
  301. /package/build/{BMI_BOYS.zscore.monthly-1b73153b.js → BMI_BOYS.zscore.monthly-a80fe254.js} +0 -0
  302. /package/build/{BMI_BOYS.zscore.weekly-0a4888e3.js → BMI_BOYS.zscore.weekly-4b605ea9.js} +0 -0
  303. /package/build/{BMI_BOYS.zscore.yearly-e7a5067a.js → BMI_BOYS.zscore.yearly-ee3eba97.js} +0 -0
  304. /package/build/{BMI_GIRLS.percentile.monthly-de7218fe.js → BMI_GIRLS.percentile.monthly-166e660d.js} +0 -0
  305. /package/build/{BMI_GIRLS.percentile.weekly-2d05d7fc.js → BMI_GIRLS.percentile.weekly-62efceea.js} +0 -0
  306. /package/build/{BMI_GIRLS.percentile.yearly-6b402892.js → BMI_GIRLS.percentile.yearly-1ee84938.js} +0 -0
  307. /package/build/{BMI_GIRLS.zscore.monthly-43fb7f4b.js → BMI_GIRLS.zscore.monthly-59fdaf1b.js} +0 -0
  308. /package/build/{BMI_GIRLS.zscore.weekly-cca85dfc.js → BMI_GIRLS.zscore.weekly-da5bb3f4.js} +0 -0
  309. /package/build/{BMI_GIRLS.zscore.yearly-79aa7d6f.js → BMI_GIRLS.zscore.yearly-745c6883.js} +0 -0
  310. /package/build/{ChevronDown-0bb6ebf7.js → ChevronDown-db345ad4.js} +0 -0
  311. /package/build/{Close-fc7a4318.js → Close-556fd99a.js} +0 -0
  312. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-18fb5aae.js → HEAD CIRCUM_BOYS.percentile.monthly-c46325c7.js} +0 -0
  313. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-ff6fc30b.js → HEAD CIRCUM_BOYS.percentile.weekly-cd1657f0.js} +0 -0
  314. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-7ada75df.js → HEAD CIRCUM_BOYS.percentile.yearly-e3f39494.js} +0 -0
  315. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-a8a584ad.js → HEAD CIRCUM_BOYS.zscore.monthly-ca64bade.js} +0 -0
  316. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-78df99bd.js → HEAD CIRCUM_BOYS.zscore.weekly-a443b982.js} +0 -0
  317. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-5a089140.js → HEAD CIRCUM_BOYS.zscore.yearly-33721395.js} +0 -0
  318. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-71447fa2.js → HEAD CIRCUM_GIRLS.percentile.monthly-ac1db53c.js} +0 -0
  319. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-09041858.js → HEAD CIRCUM_GIRLS.percentile.weekly-6c4f0f23.js} +0 -0
  320. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-218785e5.js → HEAD CIRCUM_GIRLS.percentile.yearly-24448b3b.js} +0 -0
  321. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-3c0fdcef.js → HEAD CIRCUM_GIRLS.zscore.monthly-ab7475ce.js} +0 -0
  322. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-210cbe5a.js → HEAD CIRCUM_GIRLS.zscore.weekly-2aa317de.js} +0 -0
  323. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-51bab3b5.js → HEAD CIRCUM_GIRLS.zscore.yearly-70253fe6.js} +0 -0
  324. /package/build/{HEIGHT_BOYS.percentile.monthly-42cab1f3.js → HEIGHT_BOYS.percentile.monthly-be0f2b40.js} +0 -0
  325. /package/build/{HEIGHT_BOYS.percentile.weekly-ea8a4c57.js → HEIGHT_BOYS.percentile.weekly-75ebc1b7.js} +0 -0
  326. /package/build/{HEIGHT_BOYS.percentile.yearly-6b52f3a2.js → HEIGHT_BOYS.percentile.yearly-5234db88.js} +0 -0
  327. /package/build/{HEIGHT_BOYS.zscore.monthly-1ff1109c.js → HEIGHT_BOYS.zscore.monthly-0ee39002.js} +0 -0
  328. /package/build/{HEIGHT_BOYS.zscore.weekly-91ac3319.js → HEIGHT_BOYS.zscore.weekly-2c310565.js} +0 -0
  329. /package/build/{HEIGHT_BOYS.zscore.yearly-08a54dc1.js → HEIGHT_BOYS.zscore.yearly-0bf8fade.js} +0 -0
  330. /package/build/{HEIGHT_GIRLS.percentile.monthly-374799e5.js → HEIGHT_GIRLS.percentile.monthly-748720cd.js} +0 -0
  331. /package/build/{HEIGHT_GIRLS.percentile.weekly-f4fb53fc.js → HEIGHT_GIRLS.percentile.weekly-8a46153d.js} +0 -0
  332. /package/build/{HEIGHT_GIRLS.percentile.yearly-e3687860.js → HEIGHT_GIRLS.percentile.yearly-330180a0.js} +0 -0
  333. /package/build/{HEIGHT_GIRLS.zscore.monthly-567531c2.js → HEIGHT_GIRLS.zscore.monthly-85383059.js} +0 -0
  334. /package/build/{HEIGHT_GIRLS.zscore.weekly-ec4377ed.js → HEIGHT_GIRLS.zscore.weekly-80e2f73d.js} +0 -0
  335. /package/build/{HEIGHT_GIRLS.zscore.yearly-dfea8277.js → HEIGHT_GIRLS.zscore.yearly-cba1cdb3.js} +0 -0
  336. /package/build/{Locale-da0ee478.js → Locale-ced9e812.js} +0 -0
  337. /package/build/{Visible-b7f98f50.js → Visible-395cf603.js} +0 -0
  338. /package/build/{WEIGHT_BOYS.percentile.monthly-7618b9f6.js → WEIGHT_BOYS.percentile.monthly-1f8d0b96.js} +0 -0
  339. /package/build/{WEIGHT_BOYS.percentile.weekly-ddb5a122.js → WEIGHT_BOYS.percentile.weekly-19bd270c.js} +0 -0
  340. /package/build/{WEIGHT_BOYS.percentile.yearly-8e3c3567.js → WEIGHT_BOYS.percentile.yearly-1d3127d2.js} +0 -0
  341. /package/build/{WEIGHT_BOYS.zscore.monthly-b243c952.js → WEIGHT_BOYS.zscore.monthly-e91aa7b9.js} +0 -0
  342. /package/build/{WEIGHT_BOYS.zscore.weekly-e9328217.js → WEIGHT_BOYS.zscore.weekly-5bfa9b63.js} +0 -0
  343. /package/build/{WEIGHT_BOYS.zscore.yearly-6e5652c7.js → WEIGHT_BOYS.zscore.yearly-377e4368.js} +0 -0
  344. /package/build/{WEIGHT_GIRLS.percentile.monthly-fec10910.js → WEIGHT_GIRLS.percentile.monthly-cd9bf691.js} +0 -0
  345. /package/build/{WEIGHT_GIRLS.percentile.weekly-11d3a59c.js → WEIGHT_GIRLS.percentile.weekly-017fd0e2.js} +0 -0
  346. /package/build/{WEIGHT_GIRLS.percentile.yearly-cf89f368.js → WEIGHT_GIRLS.percentile.yearly-d13af71c.js} +0 -0
  347. /package/build/{WEIGHT_GIRLS.zscore.monthly-2fff3f7b.js → WEIGHT_GIRLS.zscore.monthly-47af4518.js} +0 -0
  348. /package/build/{WEIGHT_GIRLS.zscore.weekly-8c4f6b7f.js → WEIGHT_GIRLS.zscore.weekly-11bb0652.js} +0 -0
  349. /package/build/{WEIGHT_GIRLS.zscore.yearly-b151d214.js → WEIGHT_GIRLS.zscore.yearly-975dca0f.js} +0 -0
  350. /package/build/{animation-60d97a74.js → animation-6eabf812.js} +0 -0
  351. /package/build/{constants-cdc1139b.js → constants-467b578b.js} +0 -0
  352. /package/build/{constants-cd64dee8.js → constants-8ccc1c6f.js} +0 -0
  353. /package/build/{constants-36dd380b.js → constants-b11de697.js} +0 -0
  354. /package/build/{dataTransform-ffd966a9.js → dataTransform-aa9f096c.js} +0 -0
  355. /package/build/{doctor-e94198ef.js → doctor-e6502faf.js} +0 -0
  356. /package/build/esm/{BMI_BOYS.percentile.monthly-2a332a3a.js → BMI_BOYS.percentile.monthly-ced0a7a3.js} +0 -0
  357. /package/build/esm/{BMI_BOYS.percentile.weekly-c3d892ac.js → BMI_BOYS.percentile.weekly-1b3ca2b8.js} +0 -0
  358. /package/build/esm/{BMI_BOYS.percentile.yearly-cdc46283.js → BMI_BOYS.percentile.yearly-2c5a0ee8.js} +0 -0
  359. /package/build/esm/{BMI_BOYS.zscore.monthly-66652c80.js → BMI_BOYS.zscore.monthly-cd03546a.js} +0 -0
  360. /package/build/esm/{BMI_BOYS.zscore.weekly-ab18f061.js → BMI_BOYS.zscore.weekly-fcc1661e.js} +0 -0
  361. /package/build/esm/{BMI_BOYS.zscore.yearly-0c467eb6.js → BMI_BOYS.zscore.yearly-9cabe9ca.js} +0 -0
  362. /package/build/esm/{BMI_GIRLS.percentile.monthly-2429b0cf.js → BMI_GIRLS.percentile.monthly-210f66f1.js} +0 -0
  363. /package/build/esm/{BMI_GIRLS.percentile.weekly-b9b4c395.js → BMI_GIRLS.percentile.weekly-4d723cba.js} +0 -0
  364. /package/build/esm/{BMI_GIRLS.percentile.yearly-6fb9ad13.js → BMI_GIRLS.percentile.yearly-9c05a767.js} +0 -0
  365. /package/build/esm/{BMI_GIRLS.zscore.monthly-c9bbc776.js → BMI_GIRLS.zscore.monthly-4382143e.js} +0 -0
  366. /package/build/esm/{BMI_GIRLS.zscore.weekly-5dc0474f.js → BMI_GIRLS.zscore.weekly-c0709379.js} +0 -0
  367. /package/build/esm/{BMI_GIRLS.zscore.yearly-e2ef86f8.js → BMI_GIRLS.zscore.yearly-be97f79b.js} +0 -0
  368. /package/build/esm/{ChevronDown-02044338.js → ChevronDown-b42c352b.js} +0 -0
  369. /package/build/esm/{Close-61220f73.js → Close-1e215489.js} +0 -0
  370. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-fd04fa07.js → HEAD CIRCUM_BOYS.percentile.monthly-a24003f5.js} +0 -0
  371. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-528f1994.js → HEAD CIRCUM_BOYS.percentile.weekly-96006f38.js} +0 -0
  372. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-83ba6bf3.js → HEAD CIRCUM_BOYS.percentile.yearly-5610453d.js} +0 -0
  373. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-ed488d96.js → HEAD CIRCUM_BOYS.zscore.monthly-e8d8d9ce.js} +0 -0
  374. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-17cdff23.js → HEAD CIRCUM_BOYS.zscore.weekly-4daab427.js} +0 -0
  375. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-d3dc9d78.js → HEAD CIRCUM_BOYS.zscore.yearly-08ec7af4.js} +0 -0
  376. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-f56ed0bf.js → HEAD CIRCUM_GIRLS.percentile.monthly-009bc515.js} +0 -0
  377. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-942cc7b6.js → HEAD CIRCUM_GIRLS.percentile.weekly-69a760cf.js} +0 -0
  378. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-211ea40d.js → HEAD CIRCUM_GIRLS.percentile.yearly-81b6e6b4.js} +0 -0
  379. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-68b579a0.js → HEAD CIRCUM_GIRLS.zscore.monthly-2c6d6ca7.js} +0 -0
  380. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-37cdec10.js → HEAD CIRCUM_GIRLS.zscore.weekly-8a16120c.js} +0 -0
  381. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-1cb077e9.js → HEAD CIRCUM_GIRLS.zscore.yearly-710b1ee2.js} +0 -0
  382. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-0ace7dd5.js → HEIGHT_BOYS.percentile.monthly-3387956d.js} +0 -0
  383. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-64dbe278.js → HEIGHT_BOYS.percentile.weekly-7f2c0632.js} +0 -0
  384. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-fe232854.js → HEIGHT_BOYS.percentile.yearly-c1bb4a68.js} +0 -0
  385. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-32f5b99c.js → HEIGHT_BOYS.zscore.monthly-7e42058a.js} +0 -0
  386. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-f1bad17d.js → HEIGHT_BOYS.zscore.weekly-583b2b8b.js} +0 -0
  387. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-bebdef69.js → HEIGHT_BOYS.zscore.yearly-4f581e61.js} +0 -0
  388. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-18d1f48d.js → HEIGHT_GIRLS.percentile.monthly-4f367793.js} +0 -0
  389. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-ee656308.js → HEIGHT_GIRLS.percentile.weekly-0f233037.js} +0 -0
  390. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-bd0761eb.js → HEIGHT_GIRLS.percentile.yearly-6d387c7f.js} +0 -0
  391. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-c5680c01.js → HEIGHT_GIRLS.zscore.monthly-a340801d.js} +0 -0
  392. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-e4eb9dfb.js → HEIGHT_GIRLS.zscore.weekly-8fa49156.js} +0 -0
  393. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-5b368aea.js → HEIGHT_GIRLS.zscore.yearly-39888c32.js} +0 -0
  394. /package/build/esm/{Locale-c89fbd16.js → Locale-2e537a6a.js} +0 -0
  395. /package/build/esm/{Visible-b92c39ca.js → Visible-4941f057.js} +0 -0
  396. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-e8772fe0.js → WEIGHT_BOYS.percentile.monthly-7a60a73c.js} +0 -0
  397. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-943a8f07.js → WEIGHT_BOYS.percentile.weekly-3cfb9f20.js} +0 -0
  398. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-e0d5b2d1.js → WEIGHT_BOYS.percentile.yearly-166da826.js} +0 -0
  399. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-7ec7bb71.js → WEIGHT_BOYS.zscore.monthly-96e662e5.js} +0 -0
  400. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-77029cdb.js → WEIGHT_BOYS.zscore.weekly-deef00c4.js} +0 -0
  401. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-fa652850.js → WEIGHT_BOYS.zscore.yearly-d27b755f.js} +0 -0
  402. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-2d420c45.js → WEIGHT_GIRLS.percentile.monthly-361eaf8a.js} +0 -0
  403. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-7c95da70.js → WEIGHT_GIRLS.percentile.weekly-df3a8d7e.js} +0 -0
  404. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-131a0c7e.js → WEIGHT_GIRLS.percentile.yearly-65ec2031.js} +0 -0
  405. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-bf6a297e.js → WEIGHT_GIRLS.zscore.monthly-7ad785b0.js} +0 -0
  406. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-a45a5b31.js → WEIGHT_GIRLS.zscore.weekly-ce7380eb.js} +0 -0
  407. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-1673c2b4.js → WEIGHT_GIRLS.zscore.yearly-eb5f8c05.js} +0 -0
  408. /package/build/esm/{animation-b441d9e7.js → animation-8cdf0413.js} +0 -0
  409. /package/build/esm/{constants-a84552ab.js → constants-0a2e2d89.js} +0 -0
  410. /package/build/esm/{constants-568c2ca4.js → constants-39fd57dc.js} +0 -0
  411. /package/build/esm/{constants-df4d1c0d.js → constants-c6b6dd70.js} +0 -0
  412. /package/build/esm/{dataTransform-1801ffc6.js → dataTransform-46c04e86.js} +0 -0
  413. /package/build/esm/{doctor-921f53e7.js → doctor-77d627cf.js} +0 -0
  414. /package/build/esm/{index-c7b97299.js → index-103508c0.js} +0 -0
  415. /package/build/esm/{index-18fc11e8.js → index-347e9ebf.js} +0 -0
  416. /package/build/esm/{index-ece91fe7.js → index-4a0f7a2a.js} +0 -0
  417. /package/build/esm/{index-404735f4.js → index-6df8ce2b.js} +0 -0
  418. /package/build/esm/{index-9f91a24e.js → index-823e3a77.js} +0 -0
  419. /package/build/esm/{index-f226ee8e.js → index-c2c1151d.js} +0 -0
  420. /package/build/esm/{index-24541ad3.js → index-c6266db7.js} +0 -0
  421. /package/build/esm/{index-58b02c69.js → index-f7f5582d.js} +0 -0
  422. /package/build/esm/{localizeNumberFormat-af0711db.js → localizeNumberFormat-55809d96.js} +0 -0
  423. /package/build/esm/{normalizeLink-98741f59.js → normalizeLink-5ca463b6.js} +0 -0
  424. /package/build/esm/{number-8cf59b73.js → number-4657b47b.js} +0 -0
  425. /package/build/esm/{other-5355d55f.js → other-09dd1a84.js} +0 -0
  426. /package/build/esm/{paths-59c509e3.js → paths-baec036c.js} +0 -0
  427. /package/build/esm/{routing-f4ff38f2.js → routing-3e2e2990.js} +0 -0
  428. /package/build/esm/{translationsContext-4bf4000a.js → translationsContext-b39ae826.js} +0 -0
  429. /package/build/esm/{tslib.es6-bb49a9db.js → tslib.es6-5f83e366.js} +0 -0
  430. /package/build/esm/{types-f588016e.js → types-dbdccf8d.js} +0 -0
  431. /package/build/esm/{useIsInit-93c72c57.js → useIsInit-a92309dc.js} +0 -0
  432. /package/build/esm/{useOutsideClick-1f5614e9.js → useOutsideClick-0be26f49.js} +0 -0
  433. /package/build/esm/{useScrollbarSize-09745987.js → useScrollbarSize-a4d05dbd.js} +0 -0
  434. /package/build/esm/{useUniqueId-f32a085b.js → useUniqueId-7d9bfd02.js} +0 -0
  435. /package/build/esm/{utils-393be1f5.js → utils-f168370f.js} +0 -0
  436. /package/build/{index-919c8bcc.js → index-3413e9d2.js} +0 -0
  437. /package/build/{index-9dcca919.js → index-3ab23404.js} +0 -0
  438. /package/build/{index-c1400cee.js → index-aabca052.js} +0 -0
  439. /package/build/{index-27ca71a1.js → index-b9c86a3d.js} +0 -0
  440. /package/build/{index-98868c1d.js → index-c6494ca6.js} +0 -0
  441. /package/build/{index-f5eaaf0a.js → index-f5d2c8d3.js} +0 -0
  442. /package/build/{index-e14e6c07.js → index-f64e7c74.js} +0 -0
  443. /package/build/{index-670ba3e3.js → index-fc8fe2d4.js} +0 -0
  444. /package/build/{localizeNumberFormat-5f29804a.js → localizeNumberFormat-d2e5c1a5.js} +0 -0
  445. /package/build/{normalizeLink-fab7982c.js → normalizeLink-84ac179b.js} +0 -0
  446. /package/build/{number-7485b550.js → number-e5fda4be.js} +0 -0
  447. /package/build/{other-7842a151.js → other-f335833f.js} +0 -0
  448. /package/build/{paths-76a73441.js → paths-643266bc.js} +0 -0
  449. /package/build/{routing-ab1ad38d.js → routing-5902192d.js} +0 -0
  450. /package/build/{translationsContext-531de800.js → translationsContext-8627f575.js} +0 -0
  451. /package/build/{tslib.es6-ba3eff7f.js → tslib.es6-bdc4ef33.js} +0 -0
  452. /package/build/{types-88e52088.js → types-efc43fc9.js} +0 -0
  453. /package/build/{useIsInit-24caa63d.js → useIsInit-a9a5096b.js} +0 -0
  454. /package/build/{useOutsideClick-d75084aa.js → useOutsideClick-6e5b26b3.js} +0 -0
  455. /package/build/{useScrollbarSize-ad4b22ea.js → useScrollbarSize-01d92d17.js} +0 -0
  456. /package/build/{useUniqueId-fafea8ea.js → useUniqueId-72e1f41e.js} +0 -0
  457. /package/build/{utils-59b38be2.js → utils-c6a6f3d0.js} +0 -0
@@ -0,0 +1,1622 @@
1
+ import React__default, { createContext, useState, useEffect, useRef, useMemo } from 'react';
2
+ import { ChevronLeft } from '@hhgtech/icons/arrow';
3
+ import { Close, CheckCircle } from '@hhgtech/icons/core';
4
+ import { L as LogoIcon } from './logoIcon-34e8fa76.js';
5
+ import { B as Button } from './index-e43e6daf.js';
6
+ import { M as Modal } from './index-ad747da0.js';
7
+ import { L as LOCALE } from './Locale-2e537a6a.js';
8
+ import { L as LOCALE_SPECS, B as BEARER_TOKEN_COOKIE$1 } from './index-38efcc39.js';
9
+ import { a as __awaiter, _ as __rest } from './tslib.es6-5f83e366.js';
10
+ import { Stack, Group, Box } from '@mantine/core';
11
+ import { I as Input, P as Phone, O as OTP, f as PasswordInput, g as Accordion } from './index-6e166286.js';
12
+ import { isProduction } from './constantsIsProduction.js';
13
+ import { a as getCurrentSsoUrl } from './routing-3e2e2990.js';
14
+ import { T as Text } from './index-fc9567f0.js';
15
+ import { Info, CircleBorder } from '@hhgtech/icons/other';
16
+ import { G as Google, F as Facebook } from './Google-844b3694.js';
17
+ import styled from '@emotion/styled';
18
+ import { M as MAPPED_LOCALE } from './utils-073ebee6.js';
19
+ import { setCookie } from './miscCookieHelper.js';
20
+ import { theme } from './miscTheme.js';
21
+ import { domainLocales } from './constantsDomainLocales.js';
22
+ import { useForm, yupResolver } from '@mantine/form';
23
+ import throttle from 'lodash/throttle';
24
+ import '@mantine/dates';
25
+ import './index-a1ac4405.js';
26
+ import './index-c6266db7.js';
27
+ import './useMantineLocale-8c5b5fc9.js';
28
+ import { u as useTranslations } from './useTranslations-95c6883a.js';
29
+ import '@mantine/hooks';
30
+ import './utils-f168370f.js';
31
+ import './other-09dd1a84.js';
32
+ import * as yup from 'yup';
33
+ import dayjs from 'dayjs';
34
+ import { D as DatePicker } from './index-2381e9de.js';
35
+ import './index-d1b85eee.js';
36
+ import './index.styles-9ffb84a3.js';
37
+ import 'date-fns/locale';
38
+ import './constantsSite.js';
39
+ import './constantsRiskScreener.js';
40
+ import '@mantine/carousel';
41
+ import 'classnames';
42
+ import './useUniqueId-7d9bfd02.js';
43
+ import './translationsContext-b39ae826.js';
44
+ import 'string-format';
45
+
46
+ const SSOStateContext = createContext({
47
+ locale: LOCALE.Vietnam,
48
+ onClose: () => false,
49
+ source: 'default',
50
+ });
51
+ const SSOStateProvider = ({ children, locale = LOCALE.Vietnam, onClose, source = 'default', }) => {
52
+ return (React__default.createElement(SSOStateContext.Provider, { value: {
53
+ locale,
54
+ onClose,
55
+ source,
56
+ } }, children));
57
+ };
58
+ const useSSOState = () => {
59
+ return React__default.useContext(SSOStateContext);
60
+ };
61
+
62
+ var SSOStepTypeType;
63
+ (function (SSOStepTypeType) {
64
+ SSOStepTypeType["FIRST"] = "first";
65
+ SSOStepTypeType["EMAIL"] = "email";
66
+ SSOStepTypeType["VERIFY_PHONE"] = "verify_phone";
67
+ SSOStepTypeType["PASSWORD"] = "password";
68
+ SSOStepTypeType["UPDATE_EMAIL"] = "update_email";
69
+ SSOStepTypeType["FORGOT_PASSWORD_PHONE"] = "forgot_password_phone";
70
+ SSOStepTypeType["FORGOT_PASSWORD_SETUP"] = "forgot_password_setup";
71
+ SSOStepTypeType["OTP"] = "otp";
72
+ SSOStepTypeType["SETUP_FULL"] = "setup_full";
73
+ })(SSOStepTypeType || (SSOStepTypeType = {}));
74
+ const SSOStepsContext = createContext({
75
+ currentStepIndex: 0,
76
+ steps: [
77
+ {
78
+ type: SSOStepTypeType.FIRST,
79
+ },
80
+ ],
81
+ setSteps: () => false,
82
+ goNext: () => false,
83
+ goBack: () => false,
84
+ addStep: () => false,
85
+ });
86
+ const SSOStepsProvider = ({ children }) => {
87
+ const [steps, setSteps] = useState([
88
+ {
89
+ type: SSOStepTypeType.FIRST,
90
+ },
91
+ ]);
92
+ const [currentStepIndex, setCurrentStepIndex] = useState(0);
93
+ return (React__default.createElement(SSOStepsContext.Provider, { value: {
94
+ currentStepIndex,
95
+ steps,
96
+ setSteps,
97
+ addStep: (step) => {
98
+ setSteps((s) => [...s, step]);
99
+ },
100
+ goNext: () => {
101
+ setCurrentStepIndex((index) => index + 1);
102
+ },
103
+ goBack: () => {
104
+ setCurrentStepIndex((index) => index - 1);
105
+ // remove step when go back
106
+ setSteps((steps) => steps.slice(0, steps.length - 1));
107
+ },
108
+ } }, children));
109
+ };
110
+ const useSSOSteps = () => {
111
+ return React__default.useContext(SSOStepsContext);
112
+ };
113
+
114
+ const SSOPopupWrapper = ({ children, opened, onClose, }) => {
115
+ var _a;
116
+ const { steps, goBack } = useSSOSteps();
117
+ const { locale } = useSSOState();
118
+ const showBack = steps.length > 1;
119
+ const showClose = steps.length === 1;
120
+ const showLogo = steps.length === 1;
121
+ const logoType = (_a = LOCALE_SPECS[locale]) === null || _a === void 0 ? void 0 : _a.LOGO_TYPE;
122
+ const [closeConfirmOpen, setCloseConfirmOpen] = React__default.useState(false);
123
+ const onCloseClick = () => {
124
+ setCloseConfirmOpen(true);
125
+ };
126
+ return (React__default.createElement(React__default.Fragment, null,
127
+ React__default.createElement(Modal, { opened: opened, onClose: onCloseClick, styles: (theme) => ({
128
+ body: {
129
+ display: 'flex',
130
+ flexDirection: 'column',
131
+ gap: 24,
132
+ padding: '36px 24px',
133
+ position: 'relative',
134
+ background: 'linear-gradient(180deg, #A5D4FF 0%, #FFFFFF 150px)',
135
+ overflow: 'auto',
136
+ [theme.fn.smallerThan('sm')]: {
137
+ height: '100%',
138
+ },
139
+ },
140
+ content: {
141
+ [theme.fn.smallerThan('sm')]: {
142
+ width: '100%',
143
+ height: '100%',
144
+ borderRadius: 0,
145
+ maxWidth: '100%',
146
+ maxHeight: '100%',
147
+ },
148
+ },
149
+ inner: {
150
+ [theme.fn.smallerThan('sm')]: {
151
+ padding: 0,
152
+ left: 0,
153
+ right: 0,
154
+ display: 'block',
155
+ },
156
+ },
157
+ }), withCloseButton: false },
158
+ React__default.createElement("div", { style: {
159
+ height: 40,
160
+ display: 'flex',
161
+ alignItems: 'center',
162
+ justifyContent: 'space-between',
163
+ } },
164
+ showBack && (React__default.createElement(Button, { variant: "white", style: {
165
+ width: 40,
166
+ height: 40,
167
+ padding: 8,
168
+ background: 'white',
169
+ borderRadius: '100%',
170
+ }, onClick: goBack },
171
+ React__default.createElement(ChevronLeft, null))),
172
+ showLogo && (React__default.createElement(LogoIcon, { type: logoType, height: 32, width: 'unset' })),
173
+ showClose && (React__default.createElement(Button, { variant: "white", style: {
174
+ width: 40,
175
+ height: 40,
176
+ padding: 8,
177
+ background: 'white',
178
+ borderRadius: '100%',
179
+ }, onClick: onCloseClick },
180
+ React__default.createElement(Close, null)))),
181
+ React__default.createElement("div", { style: {
182
+ flex: 1,
183
+ } }, children)),
184
+ React__default.createElement(Modal, { opened: closeConfirmOpen, onClose: () => setCloseConfirmOpen(false), withCloseButton: false },
185
+ "are you sure",
186
+ React__default.createElement(Button, { onClick: onClose }, "Yes"),
187
+ React__default.createElement(Button, { onClick: () => setCloseConfirmOpen(false) }, "No"))));
188
+ };
189
+
190
+ const SSO_V2_PATHS = {
191
+ LOGIN_BY_SOCIAL: 'member/social-login',
192
+ EMAIL: {
193
+ REGISTER_BY_SEND_OTP: 'login/login-with-email',
194
+ LOGIN_BY_PASSWORD: 'member/login',
195
+ VERIFY_BY_OTP: 'login/email-verify-code',
196
+ SEND_OTP: 'login/email-resend-otp-code', // FOR RESEND OTP IN CASE FAIL
197
+ },
198
+ PHONE: {
199
+ REGISTER_BY_SEND_OTP: 'login/login-with-sms',
200
+ SEND_OTP: 'login/sms/sent-otp',
201
+ VERIFY_BY_OTP: 'login/phone-verify-code',
202
+ LOGIN_BY_PASSWORD: 'member/login-by-phone'
203
+ },
204
+ ZALO: {
205
+ REGISTER_BY_SEND_OTP: 'login/login-with-zalo',
206
+ SEND_OTP: 'login/zalo/sent-otp',
207
+ VERIFY_BY_OTP: 'login/zalo-verify-code'
208
+ },
209
+ RESET_PASSWORD: 'login/reset-password',
210
+ CHECK_USER_EXIST: 'member/check-user-exist',
211
+ UPDATE_USER_INFO: 'login/update-first-info',
212
+ };
213
+
214
+ const locale = process.env.UNIFY_LOCALE || 'vi-VN';
215
+ const websiteId = LOCALE_SPECS[locale].SITE_ID;
216
+ LOCALE_SPECS[locale].PHONE;
217
+ const allAvailableAreaCodes = Object.keys(LOCALE_SPECS).map((locale) => LOCALE_SPECS[locale].PHONE);
218
+ const getSSOV2ApiUrl = (path) => {
219
+ return `${getCurrentSsoUrl(locale)}/api/v2/${path}`;
220
+ };
221
+ const getSSOApiUrl = (path) => {
222
+ return `${getCurrentSsoUrl(locale)}/api/${path}`;
223
+ };
224
+ const BEARER_TOKEN_COOKIE = 'hhg_user_token';
225
+ // NOTICE: RUN ONLY CLIENT SIDE
226
+ const fetchSSOV2Api = (path, options = {}, noAuth) => __awaiter(void 0, void 0, void 0, function* () {
227
+ var _a;
228
+ let response;
229
+ const authToken = noAuth ? '' : (_a = document.cookie
230
+ .split('; ')
231
+ .find((row) => row.startsWith(BEARER_TOKEN_COOKIE))) === null || _a === void 0 ? void 0 : _a.split('=')[1];
232
+ try {
233
+ 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);
234
+ }
235
+ catch (error) {
236
+ console.error(error);
237
+ return null;
238
+ }
239
+ return response === null || response === void 0 ? void 0 : response.json();
240
+ });
241
+ const fetchSSOApi = (path, options = {}, noAuth) => __awaiter(void 0, void 0, void 0, function* () {
242
+ var _b;
243
+ let response;
244
+ const authToken = noAuth ? '' : (_b = document.cookie
245
+ .split('; ')
246
+ .find((row) => row.startsWith(BEARER_TOKEN_COOKIE))) === null || _b === void 0 ? void 0 : _b.split('=')[1];
247
+ try {
248
+ 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);
249
+ }
250
+ catch (error) {
251
+ console.error(error);
252
+ return null;
253
+ }
254
+ return response === null || response === void 0 ? void 0 : response.json();
255
+ });
256
+ const resetPassword = (password, confirmPassword) => __awaiter(void 0, void 0, void 0, function* () {
257
+ return fetchSSOV2Api(SSO_V2_PATHS.RESET_PASSWORD, {
258
+ method: 'POST',
259
+ body: JSON.stringify({
260
+ "password": password,
261
+ "confirm-password": confirmPassword
262
+ }),
263
+ });
264
+ });
265
+ // "email":"kenny_test2201_11@mailinator.com"
266
+ // "phone_number":"906911910"
267
+ const checkUserExist = ({ email, phone // no +
268
+ }) => __awaiter(void 0, void 0, void 0, function* () {
269
+ // "provider": "email",
270
+ // "is_pass": true,
271
+ // "is_status": "Active"
272
+ const formData = new FormData();
273
+ if (email) {
274
+ formData.append('email', email);
275
+ }
276
+ else {
277
+ formData.append('phone_number', phone);
278
+ }
279
+ return fetchSSOV2Api(SSO_V2_PATHS.CHECK_USER_EXIST, {
280
+ method: 'POST',
281
+ body: formData
282
+ });
283
+ });
284
+ // "name": "Huy Tran 888",
285
+ // "birthday": "1989-04-26",
286
+ // "email":"kenny_test2201_02@mailinator.com", // optional chỉ require khi source là care | ecom
287
+ // "password": "Kenny2103",
288
+ // "confirm_password":"Kenny2103",
289
+ // "phone_number":"906911912", // require khi user register bằng email hoặc social
290
+ // "area_code":"+84", // require khi có phone number
291
+ // "gender": 1,
292
+ // "validate": false, // true validate sau khi validate xong truyền false để update
293
+ // "source": "care" | "ecom" // default sẽ ko require email. nếu source là care sẽ require email. ==> support cho business care
294
+ const updateUserInfo = (data) => __awaiter(void 0, void 0, void 0, function* () {
295
+ const formData = new FormData();
296
+ Object.keys(data).forEach((key) => {
297
+ if (data[key]) {
298
+ formData.append(key, data[key]);
299
+ }
300
+ });
301
+ return fetchSSOV2Api(SSO_V2_PATHS.UPDATE_USER_INFO, {
302
+ method: 'POST',
303
+ body: formData
304
+ });
305
+ });
306
+ const GoogleAuthClientId = isProduction ? '289442006438-040a42cbidr6v5d178f3iqi9q95821r3.apps.googleusercontent.com' : '289442006438-cihobuq1h3r4426pur7u0e43fqdnep59.apps.googleusercontent.com';
307
+ const FacebookAppId = '2759888574045636';
308
+
309
+ const registerBySendEmailOTP = (email) => __awaiter(void 0, void 0, void 0, function* () {
310
+ const formData = new FormData();
311
+ formData.append('email', email);
312
+ formData.append('website_id', websiteId);
313
+ return fetchSSOV2Api(SSO_V2_PATHS.EMAIL.REGISTER_BY_SEND_OTP, {
314
+ method: 'POST',
315
+ body: formData
316
+ });
317
+ });
318
+ const resendEmailOTP = (email) => __awaiter(void 0, void 0, void 0, function* () {
319
+ const formData = new FormData();
320
+ formData.append('email', email);
321
+ return fetchSSOV2Api(SSO_V2_PATHS.EMAIL.SEND_OTP, {
322
+ method: 'POST',
323
+ body: formData
324
+ });
325
+ });
326
+ const verifyByEmailOTP = (email, otpCode) => __awaiter(void 0, void 0, void 0, function* () {
327
+ const formData = new FormData();
328
+ formData.append('email', email);
329
+ formData.append('code', otpCode);
330
+ return fetchSSOV2Api(SSO_V2_PATHS.EMAIL.VERIFY_BY_OTP, {
331
+ method: 'POST',
332
+ body: formData
333
+ });
334
+ });
335
+
336
+ const SSOEmailScreen = ({ hidden, }) => {
337
+ const [errMsg, setErrMsg] = React__default.useState('');
338
+ const { addStep, goNext } = useSSOSteps();
339
+ return (React__default.createElement("form", { style: {
340
+ display: hidden ? 'none' : 'block',
341
+ }, onSubmit: (e) => __awaiter(void 0, void 0, void 0, function* () {
342
+ var _a, _b, _c;
343
+ e.preventDefault();
344
+ const email = e.currentTarget.email.value;
345
+ const existRes = yield checkUserExist({ email });
346
+ if ((existRes === null || existRes === void 0 ? void 0 : existRes._status) === 1) {
347
+ if (((_a = existRes._data) === null || _a === void 0 ? void 0 : _a.is_pass) &&
348
+ ((_b = existRes._data) === null || _b === void 0 ? void 0 : _b.is_status) === 'Active') {
349
+ // go to password screen
350
+ addStep({
351
+ type: SSOStepTypeType.PASSWORD,
352
+ config: {
353
+ email,
354
+ },
355
+ });
356
+ goNext();
357
+ }
358
+ else {
359
+ // go to register screen
360
+ registerBySendEmailOTP(email);
361
+ addStep({
362
+ type: SSOStepTypeType.OTP,
363
+ config: {
364
+ email,
365
+ otpType: 'email',
366
+ },
367
+ });
368
+ goNext();
369
+ }
370
+ }
371
+ else {
372
+ setErrMsg(((_c = existRes._messages) === null || _c === void 0 ? void 0 : _c[0]) || 'api error');
373
+ }
374
+ }) },
375
+ React__default.createElement(Stack, { spacing: 8 },
376
+ React__default.createElement(Text, { size: "s1", weight: "semiBold" }, "Continue with email"),
377
+ React__default.createElement(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")),
378
+ React__default.createElement(Input, { name: "email", placeholder: "Email c\u1EE7a b\u1EA1n", error: errMsg || undefined, type: "email", required: true, mt: 24 }),
379
+ React__default.createElement(Button, { type: "submit", size: "lg", variant: "primary", fullWidth: true, mt: 16 }, "Verify Your Email")));
380
+ };
381
+
382
+ // "phone_number":"906911910",
383
+ // "password":"Kenny2103!"
384
+ const loginByPhonePassword = (phone, password) => __awaiter(void 0, void 0, void 0, function* () {
385
+ const formData = new FormData();
386
+ formData.append('phone_number', phone);
387
+ formData.append('password', password);
388
+ return fetchSSOV2Api(SSO_V2_PATHS.PHONE.LOGIN_BY_PASSWORD, {
389
+ method: 'POST',
390
+ body: formData
391
+ }, true);
392
+ });
393
+ // "phone_number": "906911910",
394
+ // "area_code":"+84",
395
+ const registerBySendPhoneOTP = (phone, areaCode) => __awaiter(void 0, void 0, void 0, function* () {
396
+ const formData = new FormData();
397
+ formData.append('phone_number', phone);
398
+ formData.append('area_code', areaCode);
399
+ formData.append('website_id', websiteId);
400
+ return fetchSSOV2Api(SSO_V2_PATHS.PHONE.REGISTER_BY_SEND_OTP, {
401
+ method: 'POST',
402
+ body: formData
403
+ });
404
+ });
405
+ // "phone_number": "906911910",
406
+ // "area_code":"+84",
407
+ const resendPhoneOTP = (phone, areaCode) => __awaiter(void 0, void 0, void 0, function* () {
408
+ const formData = new FormData();
409
+ formData.append('phone_number', phone);
410
+ formData.append('area_code', areaCode);
411
+ return fetchSSOV2Api(SSO_V2_PATHS.PHONE.SEND_OTP, {
412
+ method: 'POST',
413
+ body: formData
414
+ });
415
+ });
416
+ // "otp_code":"212616",
417
+ // "phone_number": "906911910",
418
+ // "area_code":"+84"
419
+ const verifyByPhoneOTP = (phone, areaCode, otpCode) => __awaiter(void 0, void 0, void 0, function* () {
420
+ const formData = new FormData();
421
+ formData.append('phone_number', phone);
422
+ formData.append('area_code', areaCode);
423
+ formData.append('otp_code', otpCode);
424
+ return fetchSSOV2Api(SSO_V2_PATHS.PHONE.VERIFY_BY_OTP, {
425
+ method: 'POST',
426
+ body: formData,
427
+ });
428
+ });
429
+
430
+ const splitPhone = (phone) => {
431
+ var _a, _b;
432
+ if (!phone)
433
+ return { areaCode: '', phoneNumber: '' };
434
+ let areaCode = '';
435
+ let phoneNumber = phone;
436
+ if (phone.startsWith('+')) {
437
+ areaCode = ((_a = phone.match(new RegExp(`^\\+(${allAvailableAreaCodes.map(c => c.replace('+', '')).join('|')})`))) === null || _a === void 0 ? void 0 : _a[0]) || '';
438
+ phoneNumber = phone.slice(areaCode.length);
439
+ }
440
+ else {
441
+ areaCode = ((_b = phone.match(new RegExp(`^(${allAvailableAreaCodes.map(c => c.replace('+', '')).join('|')})`))) === null || _b === void 0 ? void 0 : _b[0]) || '';
442
+ phoneNumber = phone.slice(areaCode.length);
443
+ if (areaCode) {
444
+ areaCode = `+${areaCode}`;
445
+ }
446
+ }
447
+ return { areaCode, phoneNumber };
448
+ };
449
+
450
+ const loginBySocial = (token, social) => __awaiter(void 0, void 0, void 0, function* () {
451
+ const formData = new FormData();
452
+ formData.append('token', token);
453
+ formData.append('social', social);
454
+ formData.append('website_id', websiteId);
455
+ return fetchSSOV2Api(SSO_V2_PATHS.LOGIN_BY_SOCIAL, {
456
+ method: 'POST',
457
+ body: formData,
458
+ });
459
+ });
460
+
461
+ // "phone_number": "906911910",
462
+ // "area_code":"+84",
463
+ const registerBySendZaloOTP = (phone, areaCode) => __awaiter(void 0, void 0, void 0, function* () {
464
+ const formData = new FormData();
465
+ formData.append('phone_number', phone);
466
+ formData.append('area_code', areaCode);
467
+ formData.append('website_id', websiteId);
468
+ return fetchSSOV2Api(SSO_V2_PATHS.ZALO.REGISTER_BY_SEND_OTP, {
469
+ method: 'POST',
470
+ body: formData,
471
+ });
472
+ });
473
+ // "phone_number": "906911910",
474
+ // "area_code":"+84",
475
+ const resendZaloOTP = (phone, areaCode) => __awaiter(void 0, void 0, void 0, function* () {
476
+ const formData = new FormData();
477
+ formData.append('phone_number', phone);
478
+ formData.append('area_code', areaCode);
479
+ return fetchSSOV2Api(SSO_V2_PATHS.ZALO.SEND_OTP, {
480
+ method: 'POST',
481
+ body: formData
482
+ });
483
+ });
484
+ // "otp_code":"212616",
485
+ // "phone_number": "906911910",
486
+ // "area_code":"+84"
487
+ const verifyByZaloOTP = (phone, areaCode, otpCode) => __awaiter(void 0, void 0, void 0, function* () {
488
+ const formData = new FormData();
489
+ formData.append('otp_code', otpCode);
490
+ formData.append('phone_number', phone);
491
+ formData.append('area_code', areaCode);
492
+ return fetchSSOV2Api(SSO_V2_PATHS.ZALO.VERIFY_BY_OTP, {
493
+ method: 'POST',
494
+ body: formData
495
+ });
496
+ });
497
+
498
+ const MailIcon = (props) => (React__default.createElement("svg", Object.assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
499
+ React__default.createElement("g", { clipPath: "url(#clip0_869_25628)" },
500
+ React__default.createElement("rect", { width: "24", height: "24", rx: "12", fill: "#00B16A" }),
501
+ React__default.createElement("path", { d: "M15.75 5.625h-7.5C6 5.625 4.5 6.75 4.5 9.375v5.25c0 2.625 1.5 3.75 3.75 3.75h7.5c2.25 0 3.75-1.125 3.75-3.75v-5.25c0-2.625-1.5-3.75-3.75-3.75m.352 4.568-2.347 1.875c-.495.397-1.125.592-1.755.592s-1.267-.195-1.755-.592l-2.347-1.875a.577.577 0 0 1-.09-.795.56.56 0 0 1 .787-.09l2.348 1.874c.57.458 1.537.458 2.107 0l2.348-1.875c.24-.194.6-.157.787.09a.57.57 0 0 1-.082.796", fill: "#fff" })),
502
+ React__default.createElement("defs", null,
503
+ React__default.createElement("clipPath", { id: "clip0_869_25628" },
504
+ React__default.createElement("path", { fill: "#fff", d: "M0 0h24v24H0z" })))));
505
+
506
+ const StyledPhone = styled(Phone) `
507
+ position: relative;
508
+ .PhoneInputCountry {
509
+ background: unset;
510
+ border: none;
511
+ position: absolute;
512
+ left: 0;
513
+ top: 0;
514
+ height: 100%;
515
+ padding-right: 0;
516
+ min-width: 100px;
517
+ .PhoneInputCountryIcon {
518
+ min-width: 70px;
519
+ .PhoneInputCountryIconImg {
520
+ margin: auto;
521
+ }
522
+ }
523
+ }
524
+ .PhoneInputInput {
525
+ border-radius: 8px;
526
+ border-left-width: 1px;
527
+ line-height: 46px;
528
+ padding-left: 105px;
529
+ }
530
+ `;
531
+
532
+ const SSOFirstScreen = ({ hidden }) => {
533
+ const [phone, setPhone] = React__default.useState('');
534
+ const [errMsg, setErrMsg] = React__default.useState('');
535
+ const { locale, onClose } = useSSOState();
536
+ const { addStep, goNext } = useSSOSteps();
537
+ const handleLoginBySocial = (credential, provider) => __awaiter(void 0, void 0, void 0, function* () {
538
+ var _a, _b, _c, _d, _e;
539
+ const res = yield loginBySocial(credential, provider);
540
+ if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
541
+ // TODO: set token, get profile, determin if need update info or just login
542
+ setCookie(BEARER_TOKEN_COOKIE$1, (_a = res._data) === null || _a === void 0 ? void 0 : _a.token, {
543
+ domain: window.location.hostname === 'localhost'
544
+ ? 'localhost'
545
+ : `.${domainLocales[process.env.UNIFY_LOCALE || 'vi-VN']}`,
546
+ expires: new Date(res._data.expire_in * 1000).toUTCString(),
547
+ });
548
+ const userInfo = yield fetchSSOApi('user/profile');
549
+ if ((userInfo === null || userInfo === void 0 ? void 0 : userInfo._status) === 1) {
550
+ if ((_b = userInfo._data) === null || _b === void 0 ? void 0 : _b.is_new) {
551
+ addStep({
552
+ type: SSOStepTypeType.SETUP_FULL,
553
+ config: {
554
+ userInfo,
555
+ disabledEmail: true,
556
+ },
557
+ });
558
+ goNext();
559
+ }
560
+ else if (!((_c = userInfo._data) === null || _c === void 0 ? void 0 : _c.phone_verified)) {
561
+ addStep({
562
+ type: SSOStepTypeType.VERIFY_PHONE,
563
+ });
564
+ goNext();
565
+ }
566
+ else {
567
+ onClose();
568
+ }
569
+ }
570
+ else {
571
+ setErrMsg(((_d = userInfo === null || userInfo === void 0 ? void 0 : userInfo._messages) === null || _d === void 0 ? void 0 : _d[0]) || 'API error');
572
+ }
573
+ }
574
+ else {
575
+ setErrMsg(((_e = res === null || res === void 0 ? void 0 : res._messages) === null || _e === void 0 ? void 0 : _e[0]) || 'API error');
576
+ }
577
+ });
578
+ useEffect(() => {
579
+ const script = document.createElement('script');
580
+ script.src = 'https://accounts.google.com/gsi/client';
581
+ script.async = true;
582
+ document.body.appendChild(script);
583
+ window.googleAuthCallback = (authData) => __awaiter(void 0, void 0, void 0, function* () {
584
+ if (authData === null || authData === void 0 ? void 0 : authData.credential) {
585
+ handleLoginBySocial(authData.credential, 'google');
586
+ }
587
+ else {
588
+ setErrMsg('Google login failed');
589
+ }
590
+ });
591
+ const fbScript = document.createElement('script');
592
+ fbScript.src = 'https://connect.facebook.net/en_US/sdk.js';
593
+ fbScript.async = true;
594
+ document.body.appendChild(fbScript);
595
+ window.fbAsyncInit = function () {
596
+ window.FB.init({
597
+ appId: FacebookAppId,
598
+ cookie: true,
599
+ xfbml: true,
600
+ version: 'v20.0', // Use this Graph API version for this call.
601
+ });
602
+ };
603
+ return () => {
604
+ document.body.removeChild(script);
605
+ document.body.removeChild(fbScript);
606
+ };
607
+ }, []);
608
+ const onClickContinueZalo = () => __awaiter(void 0, void 0, void 0, function* () {
609
+ var _f, _g, _h;
610
+ const { areaCode, phoneNumber } = splitPhone(phone);
611
+ const userExist = yield checkUserExist({ phone: phoneNumber });
612
+ if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
613
+ 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') {
614
+ addStep({
615
+ type: SSOStepTypeType.PASSWORD,
616
+ config: {
617
+ phone,
618
+ },
619
+ });
620
+ }
621
+ else {
622
+ registerBySendZaloOTP(phoneNumber, areaCode);
623
+ addStep({
624
+ type: SSOStepTypeType.OTP,
625
+ config: {
626
+ phone,
627
+ otpType: 'phone-zalo',
628
+ },
629
+ });
630
+ }
631
+ goNext();
632
+ }
633
+ else {
634
+ setErrMsg(((_h = userExist === null || userExist === void 0 ? void 0 : userExist._messages) === null || _h === void 0 ? void 0 : _h[0]) || 'API error');
635
+ }
636
+ });
637
+ const onClickContinuePhone = () => __awaiter(void 0, void 0, void 0, function* () {
638
+ var _j, _k, _l;
639
+ const { areaCode, phoneNumber } = splitPhone(phone);
640
+ const userExist = yield checkUserExist({ phone: phoneNumber });
641
+ if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
642
+ 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') {
643
+ addStep({
644
+ type: SSOStepTypeType.PASSWORD,
645
+ config: {
646
+ phone,
647
+ },
648
+ });
649
+ }
650
+ else {
651
+ registerBySendPhoneOTP(phoneNumber, areaCode);
652
+ addStep({
653
+ type: SSOStepTypeType.OTP,
654
+ config: {
655
+ phone,
656
+ otpType: 'phone-sms',
657
+ },
658
+ });
659
+ }
660
+ goNext();
661
+ }
662
+ else {
663
+ setErrMsg(((_l = userExist === null || userExist === void 0 ? void 0 : userExist._messages) === null || _l === void 0 ? void 0 : _l[0]) || 'API error');
664
+ }
665
+ });
666
+ const onClickEmail = () => {
667
+ addStep({
668
+ type: SSOStepTypeType.EMAIL,
669
+ });
670
+ goNext();
671
+ };
672
+ return (React__default.createElement("div", { style: {
673
+ display: hidden ? 'none' : 'flex',
674
+ flexDirection: 'column',
675
+ height: '100%',
676
+ } },
677
+ React__default.createElement(Stack, { spacing: 8 },
678
+ React__default.createElement(Text, { size: "s1", weight: "semiBold" }, "Sign in or Sign up"),
679
+ React__default.createElement(Text, { size: "p4" }, "Continue with your phone number, email or your socials to log in or sign up.")),
680
+ React__default.createElement(Stack, { mt: 24, spacing: 24 },
681
+ React__default.createElement(Stack, { spacing: 16 },
682
+ React__default.createElement(Input.Wrapper, { error: errMsg },
683
+ React__default.createElement(StyledPhone, { defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: phone, onChange: (value) => setPhone(value), isError: !!errMsg, required: true, name: "phone" })),
684
+ React__default.createElement(Button, { size: "lg", variant: "primary", onClick: onClickContinueZalo }, "Continue with Zalo"),
685
+ React__default.createElement(Button, { size: "lg", variant: "secondary", onClick: onClickContinuePhone }, "Continue with SMS")),
686
+ React__default.createElement(Stack, { spacing: 16, align: "center" },
687
+ React__default.createElement(Text, { size: "p4" }, "Or continue with"),
688
+ React__default.createElement(Group, { spacing: 24 },
689
+ React__default.createElement("div", { style: {
690
+ position: 'relative',
691
+ width: 48,
692
+ height: 48,
693
+ } },
694
+ React__default.createElement("div", { id: "g_id_onload", "data-client_id": GoogleAuthClientId, "data-context": "signin", "data-ux_mode": "popup", "data-callback": "googleAuthCallback", "data-auto_prompt": "false" }),
695
+ React__default.createElement("div", { className: "g_id_signin", "data-type": "icon", "data-shape": "circle", "data-theme": "outline", "data-text": "signin_with", "data-size": "large", style: {
696
+ transform: 'translate(4px,4px) scale(1.1)',
697
+ } }),
698
+ React__default.createElement(Button, { variant: "white", style: {
699
+ width: 48,
700
+ height: 48,
701
+ padding: 12,
702
+ background: '#F7F9FC',
703
+ borderRadius: '100%',
704
+ position: 'absolute',
705
+ pointerEvents: 'none',
706
+ top: 0,
707
+ left: 0,
708
+ }, onClick: () => {
709
+ const googleButton = document.querySelector('.g_id_signin');
710
+ googleButton === null || googleButton === void 0 ? void 0 : googleButton.dispatchEvent(new Event('click'));
711
+ } },
712
+ React__default.createElement(Google, { style: { width: 24, height: 24 } }))),
713
+ React__default.createElement(Button, { variant: "white", style: {
714
+ width: 48,
715
+ height: 48,
716
+ padding: 12,
717
+ background: '#F7F9FC',
718
+ borderRadius: '100%',
719
+ }, onClick: () => {
720
+ window.FB.login(function (response) {
721
+ var _a;
722
+ return __awaiter(this, void 0, void 0, function* () {
723
+ if ((_a = response === null || response === void 0 ? void 0 : response.authResponse) === null || _a === void 0 ? void 0 : _a.accessToken) {
724
+ handleLoginBySocial(response.authResponse.accessToken, 'facebook');
725
+ }
726
+ else {
727
+ setErrMsg('Facebook login failed');
728
+ }
729
+ });
730
+ }, { scope: 'public_profile,email' });
731
+ } },
732
+ React__default.createElement(Facebook, { style: { width: 24, height: 24 } })),
733
+ React__default.createElement(Button, { variant: "white", style: {
734
+ width: 48,
735
+ height: 48,
736
+ padding: 12,
737
+ background: '#F7F9FC',
738
+ borderRadius: '100%',
739
+ }, onClick: onClickEmail },
740
+ React__default.createElement(MailIcon, null))))),
741
+ React__default.createElement(Stack, { spacing: 24, sx: (theme) => ({
742
+ marginTop: 56,
743
+ [theme.fn.smallerThan('sm')]: {
744
+ marginTop: 'auto',
745
+ },
746
+ }) },
747
+ React__default.createElement(Text, { size: "p4", color: 'blue.6' },
748
+ React__default.createElement(Info, { size: 16, color: theme.colors.primaryBase, style: {
749
+ verticalAlign: 'sub',
750
+ } }),
751
+ ' ',
752
+ "Why We Need Your Information?"),
753
+ React__default.createElement(Text, { size: "p5", color: "gray.6" },
754
+ "By tapping continue, I confirm that I have read, understand and agree to the",
755
+ ' ',
756
+ React__default.createElement("a", { href: "#privacy", target: "_blank", style: {
757
+ color: '#262626',
758
+ textDecoration: 'underline',
759
+ } }, "Privacy Policy"),
760
+ ' ',
761
+ "and the",
762
+ ' ',
763
+ React__default.createElement("a", { href: "#tos", target: "_blank", style: {
764
+ color: '#262626',
765
+ textDecoration: 'underline',
766
+ } }, "Terms of Service"),
767
+ ' ',
768
+ "of Hello Health Group."))));
769
+ };
770
+
771
+ const SSOOTPScreen = ({ hidden, index, }) => {
772
+ const { steps, setSteps, addStep, goNext } = useSSOSteps();
773
+ const [otp, setOtp] = React__default.useState('');
774
+ const [error, setError] = React__default.useState('');
775
+ const currentStepIndex = index;
776
+ const currentStep = steps[currentStepIndex];
777
+ const { phone, email, otpType, isForgot } = currentStep.config;
778
+ const isEmail = otpType === 'email';
779
+ const sendOTPCode = (checkResend) => {
780
+ if (checkResend && resendTime > 0)
781
+ return;
782
+ // send otp code logic here
783
+ const { areaCode, phoneNumber } = splitPhone(phone);
784
+ if (otpType === 'phone-sms') {
785
+ resendPhoneOTP(phoneNumber, areaCode);
786
+ }
787
+ else if (otpType === 'phone-zalo') {
788
+ resendZaloOTP(phoneNumber, areaCode);
789
+ }
790
+ else if (otpType === 'email') {
791
+ resendEmailOTP(email);
792
+ }
793
+ setupResendTimer();
794
+ };
795
+ const submitOtp = () => __awaiter(void 0, void 0, void 0, function* () {
796
+ var _a, _b;
797
+ const { areaCode, phoneNumber } = splitPhone(phone);
798
+ // submit otp code logic here
799
+ let res;
800
+ if (otpType === 'phone-sms') {
801
+ res = yield verifyByPhoneOTP(phoneNumber, areaCode, otp);
802
+ }
803
+ else if (otpType === 'phone-zalo') {
804
+ res = yield verifyByZaloOTP(phoneNumber, areaCode, otp);
805
+ }
806
+ else if (otpType === 'email') {
807
+ res = yield verifyByEmailOTP(email, otp);
808
+ }
809
+ if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
810
+ setOtp('');
811
+ // log error
812
+ setError(((_a = res._messages) === null || _a === void 0 ? void 0 : _a[0]) || 'API error');
813
+ return;
814
+ }
815
+ setCookie(BEARER_TOKEN_COOKIE$1, (_b = res._data) === null || _b === void 0 ? void 0 : _b.token, {
816
+ domain: window.location.hostname === 'localhost'
817
+ ? 'localhost'
818
+ : `.${domainLocales[process.env.UNIFY_LOCALE || 'vi-VN']}`,
819
+ expires: new Date(res._data.expire_in * 1000).toUTCString(),
820
+ });
821
+ if (isForgot) {
822
+ addStep({
823
+ type: SSOStepTypeType.FORGOT_PASSWORD_SETUP,
824
+ });
825
+ }
826
+ else {
827
+ const userInfo = yield fetchSSOApi('user/profile');
828
+ addStep({
829
+ type: SSOStepTypeType.SETUP_FULL,
830
+ config: {
831
+ userInfo: userInfo,
832
+ disabledEmail: isEmail,
833
+ },
834
+ });
835
+ }
836
+ goNext();
837
+ });
838
+ const swapZaloSms = () => {
839
+ if (isEmail)
840
+ return;
841
+ const { areaCode, phoneNumber } = splitPhone(phone);
842
+ const newType = otpType === 'phone-sms' ? 'phone-zalo' : 'phone-sms';
843
+ if (newType === 'phone-sms') {
844
+ registerBySendPhoneOTP(phoneNumber, areaCode);
845
+ }
846
+ else {
847
+ registerBySendZaloOTP(phoneNumber, areaCode);
848
+ }
849
+ 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 }) })));
850
+ };
851
+ const [resendTime, setResendTime] = React__default.useState(30);
852
+ const setupResendTimer = () => {
853
+ const countdown = () => {
854
+ setResendTime((t) => {
855
+ if (t - 1 > 0) {
856
+ setTimeout(() => countdown(), 1000);
857
+ }
858
+ return t - 1;
859
+ });
860
+ };
861
+ countdown();
862
+ };
863
+ useEffect(() => {
864
+ setupResendTimer();
865
+ }, []);
866
+ return (React__default.createElement("div", { style: {
867
+ display: hidden ? 'none' : 'block',
868
+ } },
869
+ React__default.createElement(Stack, { spacing: 8 },
870
+ React__default.createElement(Text, { size: "s1", weight: "semiBold" }, "Verify Phone Number"),
871
+ React__default.createElement(Text, { size: "p4" }, isEmail ? (React__default.createElement(React__default.Fragment, null,
872
+ "Enter the 6-digit OTP sent to your email ",
873
+ React__default.createElement("b", null, email),
874
+ ".")) : (React__default.createElement(React__default.Fragment, null,
875
+ "Enter the 6-digit OTP sent to the phone number ",
876
+ React__default.createElement("b", null, phone),
877
+ " via",
878
+ ' ',
879
+ React__default.createElement("b", null, otpType === 'phone-sms' ? 'SMS' : 'Zalo App'),
880
+ ". OTP code will expire in ",
881
+ React__default.createElement("b", null, "10 mins"))))),
882
+ React__default.createElement(Stack, { mt: 24, spacing: 8 },
883
+ React__default.createElement(Input.Wrapper, { error: error },
884
+ React__default.createElement(OTP, { value: otp, onChange: (otp) => setOtp(String(otp)) })),
885
+ React__default.createElement(Group, { spacing: 8, align: "center", style: {
886
+ height: 40,
887
+ } },
888
+ React__default.createElement(Text, { size: "p4" }, "Didn\u2019t receive the code?"),
889
+ React__default.createElement(Text, { size: "s4", color: "blue.6", onClick: () => sendOTPCode(true) },
890
+ "Resend (",
891
+ resendTime,
892
+ ")"))),
893
+ React__default.createElement(Button, { size: "lg", variant: "primary", mt: 12, onClick: submitOtp, fullWidth: true }, "Continue"),
894
+ !isEmail && (React__default.createElement(Button, { size: "lg", variant: "tertiary", mt: 12, onClick: swapZaloSms, fullWidth: true },
895
+ "Send OTP Code via ",
896
+ otpType === 'phone-sms' ? 'Zalo App' : 'SMS'))));
897
+ };
898
+
899
+ const SSOPasswordScreen = ({ hidden, index, }) => {
900
+ var _a;
901
+ const [errMsg, setErrMsg] = React__default.useState('');
902
+ const { steps, addStep, goNext } = useSSOSteps();
903
+ const resetPassword = () => {
904
+ addStep({
905
+ type: SSOStepTypeType.FORGOT_PASSWORD_PHONE,
906
+ });
907
+ goNext();
908
+ };
909
+ const thisStep = steps[index];
910
+ const phone = (_a = thisStep === null || thisStep === void 0 ? void 0 : thisStep.config) === null || _a === void 0 ? void 0 : _a.phone;
911
+ return (React__default.createElement("form", { style: {
912
+ display: hidden ? 'none' : 'block',
913
+ }, onSubmit: (e) => {
914
+ e.preventDefault();
915
+ const password = e.currentTarget.password.value;
916
+ // call api to login with email and password, if fail then show error
917
+ loginByPhonePassword(phone, password)
918
+ .then((res) => {
919
+ var _a;
920
+ if ((_a = res._messages) === null || _a === void 0 ? void 0 : _a[0]) {
921
+ setErrMsg(res._messages[0]);
922
+ }
923
+ else {
924
+ setErrMsg('api error');
925
+ }
926
+ })
927
+ .catch(() => {
928
+ setErrMsg('api error');
929
+ });
930
+ } },
931
+ React__default.createElement(Stack, { spacing: 8 },
932
+ React__default.createElement(Text, { size: "s1", weight: "semiBold" },
933
+ "Welcome back!",
934
+ React__default.createElement("br", null),
935
+ "Enter your password"),
936
+ React__default.createElement(Text, { size: "p4" }, "\u0110\u0103ng nh\u1EADp b\u1EB1ng m\u1EADt kh\u1EA9u c\u1EE7a b\u1EA1n.")),
937
+ React__default.createElement(Stack, { mt: 24, spacing: 8 },
938
+ React__default.createElement(PasswordInput, { name: "password", placeholder: "Nh\u1EADp m\u1EADt kh\u1EA9u", error: errMsg || undefined }),
939
+ React__default.createElement(Group, { spacing: 8, align: "center", style: {
940
+ height: 40,
941
+ } },
942
+ React__default.createElement(Text, { size: "p4" }, "Forgot Password?"),
943
+ React__default.createElement(Text, { size: "s4", color: "blue.6", style: {
944
+ cursor: 'pointer',
945
+ }, onClick: resetPassword }, "Reset"))),
946
+ React__default.createElement(Button, { type: "submit", size: "lg", variant: "primary", mt: 12, fullWidth: true }, "Sign In")));
947
+ };
948
+
949
+ const SSOPasswordForgotPhone = ({ hidden, }) => {
950
+ const [phone, setPhone] = React__default.useState('');
951
+ const [errMsg, setErrMsg] = React__default.useState('');
952
+ const { locale } = useSSOState();
953
+ const { addStep, goNext } = useSSOSteps();
954
+ const onClickContinueZalo = () => __awaiter(void 0, void 0, void 0, function* () {
955
+ var _a;
956
+ const { areaCode, phoneNumber } = splitPhone(phone);
957
+ const userExist = yield checkUserExist({ phone: phoneNumber });
958
+ if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
959
+ resendZaloOTP(phoneNumber, areaCode);
960
+ addStep({
961
+ type: SSOStepTypeType.OTP,
962
+ config: {
963
+ phone,
964
+ otpType: 'phone-zalo',
965
+ isForgot: true,
966
+ },
967
+ });
968
+ goNext();
969
+ }
970
+ else {
971
+ setErrMsg(((_a = userExist === null || userExist === void 0 ? void 0 : userExist._messages) === null || _a === void 0 ? void 0 : _a[0]) || 'API error');
972
+ }
973
+ });
974
+ const onClickContinuePhone = () => __awaiter(void 0, void 0, void 0, function* () {
975
+ var _b;
976
+ const { areaCode, phoneNumber } = splitPhone(phone);
977
+ const userExist = yield checkUserExist({ phone: phoneNumber });
978
+ if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
979
+ registerBySendPhoneOTP(phoneNumber, areaCode);
980
+ addStep({
981
+ type: SSOStepTypeType.OTP,
982
+ config: {
983
+ phone,
984
+ otpType: 'phone-sms',
985
+ isForgot: true,
986
+ },
987
+ });
988
+ goNext();
989
+ }
990
+ else {
991
+ setErrMsg(((_b = userExist === null || userExist === void 0 ? void 0 : userExist._messages) === null || _b === void 0 ? void 0 : _b[0]) || 'API error');
992
+ }
993
+ });
994
+ return (React__default.createElement("div", { style: {
995
+ display: hidden ? 'none' : 'block',
996
+ } },
997
+ React__default.createElement(Stack, { spacing: 8 },
998
+ React__default.createElement(Text, { size: "s1", weight: "semiBold" }, "Reset password"),
999
+ React__default.createElement(Text, { size: "p4" }, "Please provide the phone number you used to create your account.")),
1000
+ React__default.createElement(Stack, { mt: 24, spacing: 16 },
1001
+ React__default.createElement(StyledPhone, { defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: phone, onChange: (value) => setPhone(value), isError: !!errMsg, required: true }),
1002
+ errMsg && (React__default.createElement(Text, { size: "label2", color: "red.6", mt: -12 }, errMsg)),
1003
+ React__default.createElement(Button, { size: "lg", variant: "primary", onClick: onClickContinueZalo }, "Continue with Zalo"),
1004
+ React__default.createElement(Button, { size: "lg", variant: "secondary", onClick: onClickContinuePhone }, "Continue with SMS"))));
1005
+ };
1006
+
1007
+ const BackgroundHeader = () => (React__default.createElement("svg", { width: "292", height: "255", viewBox: "0 0 292 255", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: {
1008
+ position: 'absolute',
1009
+ top: 0,
1010
+ left: '50%',
1011
+ zIndex: 0,
1012
+ transform: 'translateX(-50%)',
1013
+ pointerEvents: 'none',
1014
+ } },
1015
+ React__default.createElement("circle", { opacity: ".2", cx: "146", cy: "109", r: "146", fill: "url(#paint0_linear_908_34610)" }),
1016
+ React__default.createElement("circle", { opacity: ".3", cx: "146", cy: "109", r: "85", fill: "url(#paint1_linear_908_34610)" }),
1017
+ React__default.createElement("circle", { cx: "146.5", cy: "108.5", r: "47.5", fill: "url(#paint2_linear_908_34610)" }),
1018
+ React__default.createElement("circle", { cx: "146.5", cy: "108.5", r: "47", stroke: "url(#paint3_linear_908_34610)" }),
1019
+ React__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" }),
1020
+ React__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" }),
1021
+ React__default.createElement("path", { d: "M129.074 111.859v.358q.002-.18.032-.358zm34.25 0q.031.178.032.358v-.358z", fill: "#38454F" }),
1022
+ React__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" }),
1023
+ React__default.createElement("path", { d: "M129.074 103.287v.357q.002-.18.032-.357zm34.25 0q.031.178.032.357v-.357z", fill: "#556080" }),
1024
+ React__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" }),
1025
+ React__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" }),
1026
+ React__default.createElement("path", { d: "M129.074 94.717v.357q.002-.18.032-.357zm34.25 0q.031.177.032.357v-.357z", fill: "#8697CB" }),
1027
+ React__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" }),
1028
+ React__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" }),
1029
+ React__default.createElement("defs", null,
1030
+ React__default.createElement("linearGradient", { id: "paint0_linear_908_34610", x1: "147.5", y1: "141", x2: "36.5", y2: "30", gradientUnits: "userSpaceOnUse" },
1031
+ React__default.createElement("stop", { stopColor: "#fff", stopOpacity: "0" }),
1032
+ React__default.createElement("stop", { offset: "1", stopColor: "#fff" })),
1033
+ React__default.createElement("linearGradient", { id: "paint1_linear_908_34610", x1: "218.376", y1: "63.134", x2: "61", y2: "109", gradientUnits: "userSpaceOnUse" },
1034
+ React__default.createElement("stop", { stopColor: "#fff" }),
1035
+ React__default.createElement("stop", { offset: "1", stopColor: "#fff", stopOpacity: "0" })),
1036
+ React__default.createElement("linearGradient", { id: "paint2_linear_908_34610", x1: "146.5", y1: "61", x2: "146.5", y2: "156", gradientUnits: "userSpaceOnUse" },
1037
+ React__default.createElement("stop", { stopColor: "#fff", stopOpacity: ".6" }),
1038
+ React__default.createElement("stop", { offset: "1", stopColor: "#fff", stopOpacity: "0" })),
1039
+ React__default.createElement("linearGradient", { id: "paint3_linear_908_34610", x1: "178.979", y1: "98.35", x2: "108.338", y2: "98.35", gradientUnits: "userSpaceOnUse" },
1040
+ React__default.createElement("stop", { stopColor: "#fff", stopOpacity: "0" }),
1041
+ React__default.createElement("stop", { offset: "1", stopColor: "#fff" })))));
1042
+
1043
+ const CustomerSupportIcon = () => {
1044
+ return (React__default.createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1045
+ React__default.createElement("g", { clipPath: "url(#clip0_911_24123)" },
1046
+ React__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" }),
1047
+ React__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" }),
1048
+ React__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" }),
1049
+ React__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" }),
1050
+ React__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" }),
1051
+ React__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" }),
1052
+ React__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" }),
1053
+ React__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" }),
1054
+ React__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" }),
1055
+ React__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" }),
1056
+ React__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" }),
1057
+ React__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" }),
1058
+ React__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" }),
1059
+ React__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" }),
1060
+ React__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" })),
1061
+ React__default.createElement("defs", null,
1062
+ React__default.createElement("clipPath", { id: "clip0_911_24123" },
1063
+ React__default.createElement("path", { fill: "#fff", d: "M0 0h32v32H0z" })))));
1064
+ };
1065
+
1066
+ const HealthUpdateIcon = () => {
1067
+ return (React__default.createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1068
+ React__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" }),
1069
+ React__default.createElement("path", { d: "m4.488 5.49 16.427-2.458 3.13 20.914-16.427 2.458z", fill: "#fff" }),
1070
+ React__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" }),
1071
+ React__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" }),
1072
+ React__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" }),
1073
+ React__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" })));
1074
+ };
1075
+
1076
+ const PersonalizeIcon = () => {
1077
+ return (React__default.createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1078
+ React__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" }),
1079
+ React__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" }),
1080
+ React__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" }),
1081
+ React__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" }),
1082
+ React__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" }),
1083
+ React__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" }),
1084
+ React__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" }),
1085
+ React__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" }),
1086
+ React__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" }),
1087
+ React__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" }),
1088
+ React__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" }),
1089
+ React__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" })));
1090
+ };
1091
+
1092
+ const SecurityIcon = () => {
1093
+ return (React__default.createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1094
+ React__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" }),
1095
+ React__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" }),
1096
+ React__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" }),
1097
+ React__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" })));
1098
+ };
1099
+
1100
+ const ServiceIcon = () => {
1101
+ return (React__default.createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1102
+ React__default.createElement("g", { clipPath: "url(#clip0_911_3434)" },
1103
+ React__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" }),
1104
+ React__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" }),
1105
+ React__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" }),
1106
+ React__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" }),
1107
+ React__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" }),
1108
+ React__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" }),
1109
+ React__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" }),
1110
+ React__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" }),
1111
+ React__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" }),
1112
+ React__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" }),
1113
+ React__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" })),
1114
+ React__default.createElement("defs", null,
1115
+ React__default.createElement("clipPath", { id: "clip0_911_3434" },
1116
+ React__default.createElement("path", { fill: "#fff", d: "M0 0h32v32H0z" })))));
1117
+ };
1118
+
1119
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
1120
+ const getContents = (t) => {
1121
+ return [
1122
+ {
1123
+ label: 'Personalized Experience',
1124
+ description: 'Your name, gender, and date of birth help us provide tailored health advice and personalized care plans that fit your unique needs.',
1125
+ icon: React__default.createElement(PersonalizeIcon, null),
1126
+ },
1127
+ {
1128
+ label: 'Timely Health Updates',
1129
+ description: 'We use your phone number and email to send important notifications, health reminders, and updates on new content to keep you informed.',
1130
+ icon: React__default.createElement(HealthUpdateIcon, null),
1131
+ },
1132
+ {
1133
+ label: 'Enhanced Security',
1134
+ description: 'We use your phone number and email to send important notifications, health reminders, and updates on new content to keep you informed.',
1135
+ icon: React__default.createElement(SecurityIcon, null),
1136
+ },
1137
+ {
1138
+ label: 'Quick Customer Support',
1139
+ description: 'We use your phone number and email to send important notifications, health reminders, and updates on new content to keep you informed.',
1140
+ icon: React__default.createElement(CustomerSupportIcon, null),
1141
+ },
1142
+ {
1143
+ label: 'Service Improvement',
1144
+ description: 'We use your phone number and email to send important notifications, health reminders, and updates on new content to keep you informed.',
1145
+ icon: React__default.createElement(ServiceIcon, null),
1146
+ },
1147
+ ];
1148
+ };
1149
+ const CollectInfoTextPopup = () => {
1150
+ const [opened, setOpened] = React__default.useState(false);
1151
+ useTranslations();
1152
+ const contents = getContents();
1153
+ const [mobileDragOffset, setMobileDragOffset] = useState(0);
1154
+ const dragStartYRef = useRef(0);
1155
+ const mobileDragOffsetRef = useRef(mobileDragOffset);
1156
+ mobileDragOffsetRef.current = mobileDragOffset;
1157
+ const throttleSetMobileDragOffset = useMemo(() => {
1158
+ return throttle(setMobileDragOffset, 70);
1159
+ }, []);
1160
+ return (React__default.createElement(React__default.Fragment, null,
1161
+ React__default.createElement(Text, { size: "p4", onClick: () => {
1162
+ setOpened(true);
1163
+ setMobileDragOffset(0);
1164
+ }, color: "blue.6", style: {
1165
+ cursor: 'pointer',
1166
+ } },
1167
+ React__default.createElement(Info, { size: 16, color: '#2D87F3', style: {
1168
+ verticalAlign: 'sub',
1169
+ } }),
1170
+ ' ',
1171
+ "Why We Need Your Information?"),
1172
+ React__default.createElement("style", { key: mobileDragOffset }, `
1173
+ .collect-info-text-popup .mantine-Modal-inner {
1174
+ transform: translateY(${Math.round(mobileDragOffset)}px);
1175
+ }
1176
+ `),
1177
+ React__default.createElement(Modal, { opened: opened, onClose: () => setOpened(false), withCloseButton: false, styles: (theme) => ({
1178
+ body: {
1179
+ padding: '32px 24px',
1180
+ position: 'relative',
1181
+ background: 'linear-gradient(180deg, #91CAFF 0%, #CFE8FF 100px, #FFFFFF 200px)',
1182
+ [theme.fn.smallerThan('sm')]: {
1183
+ height: '100%',
1184
+ },
1185
+ },
1186
+ content: {
1187
+ [theme.fn.smallerThan('sm')]: {
1188
+ width: '100%',
1189
+ height: '100%',
1190
+ borderBottomLeftRadius: 0,
1191
+ borderBottomRightRadius: 0,
1192
+ maxWidth: '100%',
1193
+ maxHeight: '100%',
1194
+ },
1195
+ },
1196
+ inner: {
1197
+ [theme.fn.smallerThan('sm')]: {
1198
+ padding: 0,
1199
+ left: 0,
1200
+ right: 0,
1201
+ top: 120,
1202
+ // transform: `translateY(${Math.round(mobileDragOffset)}px)`,
1203
+ display: 'block',
1204
+ transition: 'transform 70ms',
1205
+ },
1206
+ },
1207
+ }), className: "collect-info-text-popup" },
1208
+ React__default.createElement(Box, { sx: (theme) => ({
1209
+ [theme.fn.largerThan('sm')]: {
1210
+ display: 'none',
1211
+ },
1212
+ padding: 8,
1213
+ width: '100%',
1214
+ cursor: 'grab',
1215
+ display: 'flex',
1216
+ justifyContent: 'center',
1217
+ position: 'absolute',
1218
+ top: 0,
1219
+ left: 0,
1220
+ }), draggable: true, onDrag: (e) => {
1221
+ if (e.clientY < 0)
1222
+ return;
1223
+ throttleSetMobileDragOffset(e.clientY - dragStartYRef.current);
1224
+ }, onDragStart: (e) => {
1225
+ dragStartYRef.current = e.clientY;
1226
+ }, onDragEnd: (e) => {
1227
+ if (e.clientY - dragStartYRef.current > 100) {
1228
+ setMobileDragOffset(window.innerHeight);
1229
+ setTimeout(() => {
1230
+ setOpened(false);
1231
+ }, 100);
1232
+ }
1233
+ else {
1234
+ throttleSetMobileDragOffset(0);
1235
+ }
1236
+ }, onTouchStart: (e) => {
1237
+ dragStartYRef.current = e.touches[0].clientY;
1238
+ }, onTouchMove: (e) => {
1239
+ if (e.touches[0].clientY < 0)
1240
+ return;
1241
+ throttleSetMobileDragOffset(e.touches[0].clientY - dragStartYRef.current);
1242
+ }, onTouchEnd: (e) => {
1243
+ if (e.changedTouches[0].clientY - dragStartYRef.current > 100) {
1244
+ setMobileDragOffset(window.innerHeight);
1245
+ setTimeout(() => {
1246
+ setOpened(false);
1247
+ }, 100);
1248
+ }
1249
+ else {
1250
+ throttleSetMobileDragOffset(0);
1251
+ }
1252
+ } },
1253
+ React__default.createElement(Box, { sx: {
1254
+ border: '1.5px solid #ADB3BC',
1255
+ background: 'gray',
1256
+ borderRadius: 3,
1257
+ width: 44,
1258
+ } })),
1259
+ React__default.createElement("div", { style: {
1260
+ height: 40,
1261
+ } },
1262
+ React__default.createElement(Button, { variant: "white", sx: (theme) => ({
1263
+ width: 40,
1264
+ height: 40,
1265
+ padding: 8,
1266
+ background: 'white',
1267
+ borderRadius: '100%',
1268
+ [theme.fn.smallerThan('sm')]: {
1269
+ display: 'none',
1270
+ },
1271
+ }), onClick: () => setOpened(false) },
1272
+ React__default.createElement(ChevronLeft, null))),
1273
+ React__default.createElement(BackgroundHeader, null),
1274
+ React__default.createElement(Stack, { pos: "relative", mt: 100, spacing: 8, style: {
1275
+ zIndex: 1,
1276
+ } },
1277
+ React__default.createElement(Text, { size: "h4" }, "Why We Need Your Information"),
1278
+ React__default.createElement(Accordion, { styles: {
1279
+ item: {
1280
+ borderBottomColor: '#E4E8EC',
1281
+ paddingBottom: 16,
1282
+ marginTop: 16,
1283
+ },
1284
+ control: {
1285
+ padding: 0,
1286
+ },
1287
+ content: {
1288
+ padding: 0,
1289
+ marginTop: 8,
1290
+ },
1291
+ } }, contents.map((item, index) => (React__default.createElement(Accordion.Item, { key: index, value: item.label },
1292
+ React__default.createElement(Accordion.Control, { icon: item.icon },
1293
+ React__default.createElement(Text, { size: "s3", weight: "semiBold" }, item.label)),
1294
+ React__default.createElement(Accordion.Panel, null,
1295
+ React__default.createElement(Text, { size: "p3" }, item.description))))))))));
1296
+ };
1297
+
1298
+ const SSOPasswordWithConfirm = (_a) => {
1299
+ var { form } = _a, props = __rest(_a, ["form"]);
1300
+ const [atLeast8Chars, setAtLeast8Chars] = React__default.useState(undefined);
1301
+ const [atLeastOneUpper, setAtLeastOneUpper] = React__default.useState(undefined);
1302
+ const password = form.values.password;
1303
+ useEffect(() => {
1304
+ if (typeof password === 'undefined')
1305
+ return;
1306
+ setAtLeast8Chars(password.length >= 8);
1307
+ setAtLeastOneUpper(!!password.match(/[A-Z]/));
1308
+ }, [password]);
1309
+ return (React__default.createElement(Stack, Object.assign({ spacing: 12 }, props),
1310
+ React__default.createElement(PasswordInput, Object.assign({ name: "password", placeholder: "Nh\u1EADp m\u1EADt kh\u1EA9u", label: "Password", required: true, withAsterisk: true }, form.getInputProps('password'))),
1311
+ React__default.createElement(Stack, { spacing: 8 },
1312
+ React__default.createElement(Text, { size: "n1" },
1313
+ atLeast8Chars ? (React__default.createElement(CheckCircle, { color: theme.colors.green600 })) : typeof atLeast8Chars === 'undefined' ? (React__default.createElement(CheckCircle, null)) : (React__default.createElement(CircleBorder, { color: theme.colors.red600, isSolid: true })),
1314
+ ' ',
1315
+ "At least 8 characters."),
1316
+ React__default.createElement(Text, { size: "n1" },
1317
+ atLeastOneUpper ? (React__default.createElement(CheckCircle, { color: theme.colors.green600 })) : typeof atLeastOneUpper === 'undefined' ? (React__default.createElement(CheckCircle, null)) : (React__default.createElement(CircleBorder, { color: theme.colors.red600, isSolid: true })),
1318
+ ' ',
1319
+ "At least one uppercase letter and one number.")),
1320
+ React__default.createElement(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')))));
1321
+ };
1322
+
1323
+ const SSOPasswordForgotSetup = ({ hidden }) => {
1324
+ const { onClose } = useSSOState();
1325
+ const form = useForm({
1326
+ validate: yupResolver(yup.object().shape({
1327
+ password: yup
1328
+ .string()
1329
+ .required('Password is required')
1330
+ .min(8)
1331
+ .matches(/[A-Z]/, 'Password must contain at least one uppercase letter'),
1332
+ confirmPassword: yup
1333
+ .string()
1334
+ .required('Confirm password is required')
1335
+ .test('passwords-match', 'Passwords must match', function (value) {
1336
+ return this.parent.password === value;
1337
+ }),
1338
+ })),
1339
+ });
1340
+ const onSubmit = (values) => __awaiter(void 0, void 0, void 0, function* () {
1341
+ const { password, confirmPassword } = values;
1342
+ if (password.length >= 8 &&
1343
+ password.match(/[A-Z]/) &&
1344
+ password === confirmPassword) {
1345
+ const res = yield resetPassword(password, confirmPassword);
1346
+ if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
1347
+ // close popup
1348
+ onClose === null || onClose === void 0 ? void 0 : onClose();
1349
+ }
1350
+ }
1351
+ });
1352
+ return (React__default.createElement("form", { style: {
1353
+ display: hidden ? 'none' : 'block',
1354
+ }, onSubmit: form.onSubmit(onSubmit) },
1355
+ React__default.createElement(Stack, { spacing: 24 },
1356
+ React__default.createElement(Stack, { spacing: 8 },
1357
+ React__default.createElement(Text, { size: "s1", weight: "semiBold" }, "Setup your password"),
1358
+ React__default.createElement(Text, { size: "p4" }, "Set up your login password and other details to complete the registration process.")),
1359
+ React__default.createElement(SSOPasswordWithConfirm, { form: form }),
1360
+ React__default.createElement(CollectInfoTextPopup, null),
1361
+ React__default.createElement(Button, { size: "lg", variant: "primary", fullWidth: true }, "Save"))));
1362
+ };
1363
+
1364
+ const SSOPhoneVerify = ({ hidden, }) => {
1365
+ const [phone, setPhone] = React__default.useState('');
1366
+ const [errMsg, setErrMsg] = React__default.useState('');
1367
+ const { locale } = useSSOState();
1368
+ const { addStep, goNext } = useSSOSteps();
1369
+ const onClickContinueZalo = () => __awaiter(void 0, void 0, void 0, function* () {
1370
+ var _a, _b, _c;
1371
+ const { areaCode, phoneNumber } = splitPhone(phone);
1372
+ const userExist = yield checkUserExist({ phone: phoneNumber });
1373
+ if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
1374
+ if (((_a = userExist._data) === null || _a === void 0 ? void 0 : _a.is_pass) && ((_b = userExist._data) === null || _b === void 0 ? void 0 : _b.is_status) === 'Active') {
1375
+ addStep({
1376
+ type: SSOStepTypeType.PASSWORD,
1377
+ config: {
1378
+ phone,
1379
+ },
1380
+ });
1381
+ }
1382
+ else {
1383
+ registerBySendZaloOTP(phoneNumber, areaCode);
1384
+ addStep({
1385
+ type: SSOStepTypeType.OTP,
1386
+ config: {
1387
+ phone,
1388
+ otpType: 'phone-zalo',
1389
+ },
1390
+ });
1391
+ }
1392
+ goNext();
1393
+ }
1394
+ else {
1395
+ setErrMsg(((_c = userExist === null || userExist === void 0 ? void 0 : userExist._messages) === null || _c === void 0 ? void 0 : _c[0]) || 'API error');
1396
+ }
1397
+ });
1398
+ const onClickContinuePhone = () => __awaiter(void 0, void 0, void 0, function* () {
1399
+ var _d, _e, _f;
1400
+ const { areaCode, phoneNumber } = splitPhone(phone);
1401
+ const userExist = yield checkUserExist({ phone: phoneNumber });
1402
+ if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
1403
+ 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') {
1404
+ addStep({
1405
+ type: SSOStepTypeType.PASSWORD,
1406
+ config: {
1407
+ phone,
1408
+ },
1409
+ });
1410
+ }
1411
+ else {
1412
+ registerBySendPhoneOTP(phoneNumber, areaCode);
1413
+ addStep({
1414
+ type: SSOStepTypeType.OTP,
1415
+ config: {
1416
+ phone,
1417
+ otpType: 'phone-sms',
1418
+ },
1419
+ });
1420
+ }
1421
+ goNext();
1422
+ }
1423
+ else {
1424
+ setErrMsg(((_f = userExist === null || userExist === void 0 ? void 0 : userExist._messages) === null || _f === void 0 ? void 0 : _f[0]) || 'API error');
1425
+ }
1426
+ });
1427
+ return (React__default.createElement("form", { style: {
1428
+ display: hidden ? 'none' : 'block',
1429
+ }, onSubmit: (e) => __awaiter(void 0, void 0, void 0, function* () {
1430
+ var _g, _h, _j;
1431
+ e.preventDefault();
1432
+ const email = e.currentTarget.email.value;
1433
+ const existRes = yield checkUserExist({ email });
1434
+ if ((existRes === null || existRes === void 0 ? void 0 : existRes._status) === 1) {
1435
+ if (((_g = existRes._data) === null || _g === void 0 ? void 0 : _g.is_pass) &&
1436
+ ((_h = existRes._data) === null || _h === void 0 ? void 0 : _h.is_status) === 'Active') {
1437
+ // go to password screen
1438
+ addStep({
1439
+ type: SSOStepTypeType.PASSWORD,
1440
+ config: {
1441
+ email,
1442
+ },
1443
+ });
1444
+ goNext();
1445
+ }
1446
+ else {
1447
+ // go to register screen
1448
+ registerBySendEmailOTP(email);
1449
+ addStep({
1450
+ type: SSOStepTypeType.OTP,
1451
+ config: {
1452
+ email,
1453
+ otpType: 'email',
1454
+ },
1455
+ });
1456
+ goNext();
1457
+ }
1458
+ }
1459
+ else {
1460
+ setErrMsg(((_j = existRes._messages) === null || _j === void 0 ? void 0 : _j[0]) || 'api error');
1461
+ }
1462
+ }) },
1463
+ React__default.createElement(Stack, { spacing: 24 },
1464
+ React__default.createElement(Stack, { spacing: 8 },
1465
+ React__default.createElement(Text, { size: "s1", weight: "semiBold" }, "Verify Phone Number"),
1466
+ React__default.createElement(Text, { size: "p4" }, "Please provide additional information to complete the account registration process.")),
1467
+ React__default.createElement(Stack, { spacing: 16 },
1468
+ React__default.createElement(Input.Wrapper, { error: errMsg },
1469
+ React__default.createElement(StyledPhone, { defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: phone, onChange: (value) => setPhone(value), isError: !!errMsg, required: true, name: "phone" })),
1470
+ React__default.createElement(Button, { size: "lg", variant: "primary", onClick: onClickContinueZalo }, "Continue with Zalo"),
1471
+ React__default.createElement(Button, { size: "lg", variant: "secondary", onClick: onClickContinuePhone }, "Continue with SMS")),
1472
+ React__default.createElement(CollectInfoTextPopup, null))));
1473
+ };
1474
+
1475
+ // always has name, gender dob
1476
+ const OtherSetup = ({ form, needPhone, needEmail, isEmailDisable, }) => {
1477
+ const { locale = 'vi-VN' } = useSSOState();
1478
+ return (React__default.createElement(Stack, { spacing: 8 },
1479
+ needPhone && (React__default.createElement(Input.Wrapper, Object.assign({ label: "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i", withAsterisk: true }, form.getInputProps('phone')),
1480
+ React__default.createElement(StyledPhone, { defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: form.getInputProps('phone').value, onChange: (value) => {
1481
+ form.setFieldValue('phone', value);
1482
+ }, isError: !!form.getInputProps('phone').error, required: true, name: "phone" }))),
1483
+ // email is disabled
1484
+ needEmail && (React__default.createElement(Input, Object.assign({ name: "email", type: "email", label: "Email", disabled: isEmailDisable }, form.getInputProps('email')))),
1485
+ React__default.createElement(Input, Object.assign({ name: "name", label: "Name", withAsterisk: true, required: true }, form.getInputProps('name'))),
1486
+ React__default.createElement(Input.Wrapper, Object.assign({ label: "Gender", withAsterisk: true }, form.getInputProps('gender')),
1487
+ React__default.createElement(Group, null,
1488
+ React__default.createElement(Button, { type: "button", sx: {
1489
+ flex: 1,
1490
+ }, variant: form.getInputProps('gender').value === 'female'
1491
+ ? 'secondary'
1492
+ : 'tertiary', onClick: () => {
1493
+ form.setFieldValue('gender', 'female');
1494
+ } }, "Female"),
1495
+ React__default.createElement(Button, { type: "button", sx: {
1496
+ flex: 1,
1497
+ }, variant: form.getInputProps('gender').value === 'male'
1498
+ ? 'secondary'
1499
+ : 'tertiary', onClick: () => {
1500
+ form.setFieldValue('gender', 'male');
1501
+ } }, "Male"))),
1502
+ React__default.createElement(DatePicker, Object.assign({ name: "dob", label: "Birthday", withAsterisk: true, required: true }, form.getInputProps('dob')))));
1503
+ };
1504
+
1505
+ const SSOSetupScreen = ({ hidden, index, }) => {
1506
+ const { onClose, source } = useSSOState();
1507
+ const { steps } = useSSOSteps();
1508
+ const currentStep = steps[index];
1509
+ const config = currentStep === null || currentStep === void 0 ? void 0 : currentStep.config;
1510
+ const userInfo = config === null || config === void 0 ? void 0 : config.userInfo;
1511
+ const isEmailDisable = !!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) && !!(config === null || config === void 0 ? void 0 : config.disabledEmail);
1512
+ const needPass = !(userInfo === null || userInfo === void 0 ? void 0 : userInfo.is_pass);
1513
+ const needPhone = !(userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone_verified_at);
1514
+ const needEmail = !(userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) || isEmailDisable;
1515
+ // const isNew = !!userInfo?.is_new
1516
+ const form = useForm({
1517
+ initialValues: Object.assign({}, (needEmail
1518
+ ? {
1519
+ email: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) || '',
1520
+ }
1521
+ : {})),
1522
+ validateInputOnBlur: true,
1523
+ validate: yupResolver(yup.object().shape(Object.assign(Object.assign(Object.assign(Object.assign({}, (needPass
1524
+ ? {
1525
+ password: yup
1526
+ .string()
1527
+ .required('Password is required')
1528
+ .min(8, ' ')
1529
+ .matches(/[A-Z]/, ' '),
1530
+ confirmPassword: yup
1531
+ .string()
1532
+ .required('Confirm password is required')
1533
+ .test('passwords-match', 'Passwords must match', function (value) {
1534
+ return this.parent.password === value;
1535
+ }),
1536
+ }
1537
+ : {})), (needPhone
1538
+ ? {
1539
+ phone: yup.string().required('Phone number is required'),
1540
+ }
1541
+ : {})), (needEmail
1542
+ ? {
1543
+ email: yup.string().email('Invalid email'),
1544
+ }
1545
+ : {})), { gender: yup
1546
+ .string()
1547
+ .required('Gender is required')
1548
+ .oneOf(['male', 'female']), dob: yup.date().required('Date of birth is required'), name: yup.string().required('Name is required') }))),
1549
+ });
1550
+ const onSubmit = (values) => __awaiter(void 0, void 0, void 0, function* () {
1551
+ var _a;
1552
+ const { password, confirmPassword, phone, gender, name, dob } = values;
1553
+ const { phoneNumber, areaCode } = splitPhone(phone || '');
1554
+ const res = yield updateUserInfo({
1555
+ name,
1556
+ birthday: dayjs(dob).format('YYYY-MM-DD'),
1557
+ email: values.email,
1558
+ password,
1559
+ confirm_password: confirmPassword,
1560
+ phone_number: phoneNumber,
1561
+ area_code: areaCode,
1562
+ gender: gender === 'male' ? 1 : 0,
1563
+ source,
1564
+ });
1565
+ if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
1566
+ onClose === null || onClose === void 0 ? void 0 : onClose();
1567
+ setCookie(BEARER_TOKEN_COOKIE$1, (_a = res._data) === null || _a === void 0 ? void 0 : _a.token, {
1568
+ domain: window.location.hostname === 'localhost'
1569
+ ? 'localhost'
1570
+ : `.${domainLocales[process.env.UNIFY_LOCALE || 'vi-VN']}`,
1571
+ expires: new Date(res._data.expire_in * 1000).toUTCString(),
1572
+ });
1573
+ }
1574
+ });
1575
+ return (React__default.createElement("form", { style: {
1576
+ display: hidden ? 'none' : 'block',
1577
+ }, onSubmit: form.onSubmit(onSubmit) },
1578
+ React__default.createElement(Stack, { spacing: 24 },
1579
+ React__default.createElement(Stack, { spacing: 8 },
1580
+ React__default.createElement(Text, { size: "s1", weight: "semiBold" }, "Almost done!"),
1581
+ React__default.createElement(Text, { size: "p4" }, "Please provide additional information to complete the account registration process.")),
1582
+ needPass && React__default.createElement(SSOPasswordWithConfirm, { form: form }),
1583
+ React__default.createElement(OtherSetup, { needPhone: needPhone, needEmail: needEmail, isEmailDisable: isEmailDisable, form: form }),
1584
+ React__default.createElement(CollectInfoTextPopup, null),
1585
+ React__default.createElement(Button, { type: "submit", variant: "primary", fullWidth: true }, needPhone ? 'Verify Phone Number' : 'Save'))));
1586
+ };
1587
+
1588
+ const SSOScreenRenderer = () => {
1589
+ const { steps, currentStepIndex } = useSSOSteps();
1590
+ return (React__default.createElement(React__default.Fragment, null, steps.map((step, index) => {
1591
+ const isCurrentStep = index === currentStepIndex;
1592
+ switch (step.type) {
1593
+ case SSOStepTypeType.FIRST:
1594
+ return React__default.createElement(SSOFirstScreen, { key: index, hidden: !isCurrentStep });
1595
+ case SSOStepTypeType.PASSWORD:
1596
+ return (React__default.createElement(SSOPasswordScreen, { key: index, hidden: !isCurrentStep, index: index }));
1597
+ case SSOStepTypeType.FORGOT_PASSWORD_PHONE:
1598
+ return (React__default.createElement(SSOPasswordForgotPhone, { key: index, hidden: !isCurrentStep, index: index }));
1599
+ case SSOStepTypeType.FORGOT_PASSWORD_SETUP:
1600
+ return (React__default.createElement(SSOPasswordForgotSetup, { key: index, hidden: !isCurrentStep }));
1601
+ case SSOStepTypeType.OTP:
1602
+ return (React__default.createElement(SSOOTPScreen, { key: index, hidden: !isCurrentStep, index: index }));
1603
+ case SSOStepTypeType.EMAIL:
1604
+ return (React__default.createElement(SSOEmailScreen, { key: index, hidden: !isCurrentStep, index: index }));
1605
+ case SSOStepTypeType.SETUP_FULL:
1606
+ return (React__default.createElement(SSOSetupScreen, { key: index, hidden: !isCurrentStep, index: index }));
1607
+ case SSOStepTypeType.VERIFY_PHONE:
1608
+ return (React__default.createElement(SSOPhoneVerify, { key: index, hidden: !isCurrentStep, index: index }));
1609
+ default:
1610
+ return React__default.createElement("div", { key: index }, "Not found");
1611
+ }
1612
+ })));
1613
+ };
1614
+
1615
+ const SSOV2 = ({ onClose, locale, source = 'default' }) => {
1616
+ return (React__default.createElement(SSOStateProvider, { onClose: onClose, locale: locale, source: source },
1617
+ React__default.createElement(SSOStepsProvider, null,
1618
+ React__default.createElement(SSOPopupWrapper, { opened: true, onClose: onClose },
1619
+ React__default.createElement(SSOScreenRenderer, null)))));
1620
+ };
1621
+
1622
+ export { SSOV2 };