@hhgtech/hhg-components 1.29.111 → 1.29.113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{LastPeriod-d16c1ea8.js → LastPeriod-e88f3e57.js} +1 -1
- package/build/{MobileBottomNavigationIcon-d0bc3fac.js → MobileBottomNavigationIcon-fbef7bdd.js} +3 -3
- package/build/{Spinner-8a698498.js → Spinner-f673b78b.js} +1 -1
- package/build/{WhatsApp-f783bf8f.js → WhatsApp-a8ef7d55.js} +1 -1
- package/build/adapters.js +19 -18
- package/build/atoms.js +46 -45
- package/build/babyGrowth.js +83 -82
- package/build/cache.js +2 -2
- package/build/care.js +17 -17
- package/build/careBookingSearchBar.js +14 -14
- package/build/careBookingSearchBarV2.js +15 -15
- package/build/components/mantine/index.d.ts +1 -0
- package/build/components/mantine/provider/notifications/icons.d.ts +5 -0
- package/build/components/mantine/provider/notifications/index.d.ts +6 -0
- package/build/components/organisms/navigationProfileButton/index.d.ts +1 -2
- package/build/components.js +91 -88
- package/build/{constants-bda3fd86.js → constants-ab163ec3.js} +1 -1
- package/build/constants.js +4 -3
- package/build/constantsDomainLocales.js +1 -1
- package/build/constantsRiskScreener.js +2 -2
- package/build/constantsSite.js +2 -2
- package/build/{core-cba930f7.js → core-db929265.js} +1 -1
- package/build/{dataTransform-837b8411.js → dataTransform-83c20f5b.js} +1 -1
- package/build/ecom.js +4 -4
- package/build/{editor-42ef0b82.js → editor-11307b90.js} +11 -11
- package/build/embeddedHeathToolCards_babyGrowth.js +23 -22
- package/build/embeddedHeathToolCards_babyPoop.js +19 -18
- package/build/embeddedHeathToolCards_babyVaccine.js +22 -21
- package/build/embeddedHeathToolCards_bmi_bmi.js +26 -25
- package/build/embeddedHeathToolCards_bmrBmr.js +26 -25
- package/build/embeddedHeathToolCards_dueDate_dueDate.js +22 -21
- package/build/embeddedHeathToolCards_ovulation_ovulation.js +22 -21
- package/build/embeddedHeathToolCards_pwg_pwg.js +27 -26
- package/build/embeddedHeathToolCards_targetHeartRate.js +28 -27
- package/build/esm/{LastPeriod-6a71dddc.js → LastPeriod-fc2345b6.js} +1 -1
- package/build/esm/{MobileBottomNavigationIcon-3cfa4b14.js → MobileBottomNavigationIcon-3e7c99e8.js} +3 -3
- package/build/esm/{Spinner-5a0df635.js → Spinner-e9091392.js} +1 -1
- package/build/esm/{WhatsApp-def7f0e9.js → WhatsApp-9a585ede.js} +1 -1
- package/build/esm/adapters.js +19 -18
- package/build/esm/atoms.js +46 -45
- package/build/esm/babyGrowth.js +83 -82
- package/build/esm/cache.js +2 -2
- package/build/esm/care.js +17 -17
- package/build/esm/careBookingSearchBar.js +14 -14
- package/build/esm/careBookingSearchBarV2.js +15 -15
- package/build/esm/components/mantine/index.d.ts +1 -0
- package/build/esm/components/mantine/provider/notifications/icons.d.ts +5 -0
- package/build/esm/components/mantine/provider/notifications/index.d.ts +6 -0
- package/build/esm/components/organisms/navigationProfileButton/index.d.ts +1 -2
- package/build/esm/components.js +91 -88
- package/build/esm/{constants-03f8dbae.js → constants-acf69a0d.js} +1 -1
- package/build/esm/constants.js +3 -3
- package/build/esm/constantsDomainLocales.js +1 -1
- package/build/esm/constantsRiskScreener.js +2 -2
- package/build/esm/constantsSite.js +2 -2
- package/build/esm/{core-e8e5bd42.js → core-59eaab00.js} +1 -1
- package/build/esm/{dataTransform-6d013343.js → dataTransform-12716264.js} +1 -1
- package/build/esm/ecom.js +4 -4
- package/build/esm/{editor-99f55a70.js → editor-59767c68.js} +11 -11
- package/build/esm/embeddedHeathToolCards_babyGrowth.js +23 -22
- package/build/esm/embeddedHeathToolCards_babyPoop.js +19 -18
- package/build/esm/embeddedHeathToolCards_babyVaccine.js +22 -21
- package/build/esm/embeddedHeathToolCards_bmi_bmi.js +26 -25
- package/build/esm/embeddedHeathToolCards_bmrBmr.js +26 -25
- package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +22 -21
- package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +22 -21
- package/build/esm/embeddedHeathToolCards_pwg_pwg.js +27 -26
- package/build/esm/embeddedHeathToolCards_targetHeartRate.js +28 -27
- package/build/esm/{fixedBottomAdBlock-a2106963.js → fixedBottomAdBlock-88cd5c92.js} +22 -22
- package/build/esm/footer.js +21 -20
- package/build/esm/gAssets.js +2 -2
- package/build/esm/healthToolsCardWrapper.js +18 -17
- package/build/esm/healthToolsForm.js +34 -33
- package/build/esm/hooks.js +14 -14
- package/build/esm/i18n.js +2 -2
- package/build/esm/i18nV2.js +2 -2
- package/build/esm/{index-29c78f77.js → index-04812b3b.js} +15 -15
- package/build/esm/{index-8af36482.js → index-07624def.js} +3 -3
- package/build/esm/{index-2542c25d.js → index-07699578.js} +1 -1
- package/build/esm/{index-8d68eb39.js → index-0af5d653.js} +1 -1
- package/build/esm/{index-dbb54dad.js → index-0d31a2ea.js} +6 -6
- package/build/esm/{index-c94cfc7d.js → index-0ee94ac3.js} +2 -2
- package/build/esm/{index-df82f273.js → index-1111b49d.js} +2 -2
- package/build/esm/{index-a4e0d76f.js → index-12f42387.js} +1 -1
- package/build/esm/{index-02336dba.js → index-1babf601.js} +1 -1
- package/build/esm/{index-87acd8f7.js → index-1d30c0f4.js} +18 -18
- package/build/esm/{index-cb04f4e0.js → index-2228b676.js} +3 -3
- package/build/esm/{index-316277f8.js → index-22852c53.js} +3 -3
- package/build/esm/{index-061cf8ff.js → index-2dc7f46d.js} +13 -20
- package/build/esm/{index-9335ba57.js → index-2f36dac4.js} +15 -15
- package/build/esm/{index-1a32ef86.js → index-3dbfb5de.js} +14 -14
- package/build/esm/{index-6e166286.js → index-42e125f0.js} +19 -15
- package/build/esm/{index-fdc3a02f.js → index-48efcc43.js} +20 -20
- package/build/esm/{index-f10f1fb8.js → index-4d0f0219.js} +7 -7
- package/build/esm/{index-e20c7cb4.js → index-4ea5dd91.js} +6 -6
- package/build/esm/{index-3d912153.js → index-58c33209.js} +14 -14
- package/build/esm/{index-a1ac4405.js → index-59f60051.js} +1 -1
- package/build/esm/{index-d6d45316.js → index-6bcce8ae.js} +7 -7
- package/build/esm/{index-fc9567f0.js → index-70d624c6.js} +2 -2
- package/build/esm/{index-38efcc39.js → index-745f205b.js} +5 -3
- package/build/esm/{index-918e70f4.js → index-7590f44e.js} +16 -16
- package/build/esm/{index-e730899e.js → index-7fcdd2d6.js} +17 -17
- package/build/esm/{index-1dd59b40.js → index-876d9889.js} +16 -16
- package/build/esm/{index-d9197263.js → index-87b3acfa.js} +2 -2
- package/build/esm/{index-0251091e.js → index-8de6087d.js} +2 -2
- package/build/esm/{index-072a4c0b.js → index-8f1cc691.js} +2 -2
- package/build/esm/{index-a8815b22.js → index-96b98c10.js} +41 -32
- package/build/esm/{index-4bb6e69a.js → index-994165cc.js} +4 -4
- package/build/esm/{index-3fd32195.js → index-a53dae98.js} +2 -2
- package/build/esm/{index-8b5cf2b7.js → index-a8ca8563.js} +12 -12
- package/build/esm/{index-30ca84b5.js → index-a9fcc396.js} +2 -2
- package/build/esm/{index-ebc6c341.js → index-b9d3e9ee.js} +12 -12
- package/build/esm/{index-cb235b95.js → index-bb4654be.js} +3 -3
- package/build/esm/{index-d1b85eee.js → index-bbf929d1.js} +1 -1
- package/build/esm/{index-e900f7fc.js → index-c00f4799.js} +5 -5
- package/build/esm/{index-ad747da0.js → index-c3148516.js} +2 -2
- package/build/esm/{index-20e6a915.js → index-c6b18c0b.js} +23 -23
- package/build/esm/{index-e45c2db8.js → index-cdc8acb9.js} +1 -1
- package/build/esm/{index-2381e9de.js → index-d4c470e1.js} +6 -6
- package/build/esm/{index-93df7701.js → index-d796d768.js} +16 -16
- package/build/esm/{index-f2732541.js → index-da46a1f1.js} +1 -1
- package/build/esm/{index-cad3f20c.js → index-dee6dee5.js} +12 -12
- package/build/esm/{index-f5bca47f.js → index-e4c75815.js} +2 -2
- package/build/esm/{index-e43e6daf.js → index-e5494b1e.js} +1 -1
- package/build/esm/{index-9a05ab79.js → index-e59c8b7b.js} +21 -21
- package/build/esm/{index-edf5db37.js → index-e8abbb29.js} +14 -14
- package/build/esm/{index-5a54ed9b.js → index-ea1b6358.js} +3 -3
- package/build/esm/{index-a2b7c2e7.js → index-eebd4963.js} +19 -19
- package/build/esm/{index-96a59dd0.js → index-f099850d.js} +6 -6
- package/build/esm/{index-2a6c5203.js → index-febfb5b8.js} +12 -12
- package/build/esm/{index-83a8eee7.js → index-ff30ce31.js} +15 -15
- package/build/esm/{index-8e3e9da4.js → index-ff57703d.js} +5 -5
- package/build/esm/index.js +113 -110
- package/build/esm/{index.styles-9ffb84a3.js → index.styles-826b6cf4.js} +1 -1
- package/build/esm/interfaces/constants/index.d.ts +1 -0
- package/build/esm/{labelSorting-e862f3cb.js → labelSorting-f6db8f6a.js} +4 -4
- package/build/esm/lead.js +23 -22
- package/build/esm/{logoIcon-34e8fa76.js → logoIcon-f4e92a05.js} +2 -2
- package/build/esm/mantine.js +28 -25
- package/build/esm/misc.js +19 -18
- package/build/esm/miscGetDynamicHealthTool.js +5 -5
- package/build/esm/miscGetSocialList.js +8 -8
- package/build/esm/miscScreenSizeContext.js +1 -1
- package/build/esm/mobileBottomNavigation.js +5 -5
- package/build/esm/mobileBottomNavigationIcon.js +5 -5
- package/build/esm/molecules.js +68 -67
- package/build/esm/moleculesArticleCard.js +6 -6
- package/build/esm/moleculesArticleCardV2.js +16 -15
- package/build/esm/navigation.js +43 -40
- package/build/esm/navigationLogoutPopup.js +9 -9
- package/build/esm/navigationProfileButton.js +24 -23
- package/build/esm/onboardingV2.js +29 -28
- package/build/esm/organisms.js +47 -44
- package/build/esm/{post-3e244908.js → post-6f180e90.js} +2 -2
- package/build/esm/profileNavigation.js +20 -19
- package/build/esm/progressBar.js +1 -1
- package/build/esm/pwg.js +22 -21
- package/build/esm/ssoV2/api/email.d.ts +1 -1
- package/build/esm/ssoV2/api/index.d.ts +14 -11
- package/build/esm/ssoV2/api/paths.d.ts +4 -0
- package/build/esm/ssoV2/api/phone.d.ts +2 -0
- package/build/esm/ssoV2/api/zalo.d.ts +2 -0
- package/build/esm/ssoV2/index.d.ts +4 -1
- package/build/esm/ssoV2/popupWrapper/collectInfoTextPopup/index.d.ts +1 -1
- package/build/esm/ssoV2/popupWrapper/collectInfoTextPopup/modal.d.ts +2 -0
- package/build/esm/ssoV2/popupWrapper/confirmClosePopup.d.ts +6 -0
- package/build/esm/ssoV2/screens/otp.d.ts +3 -1
- package/build/esm/ssoV2/screens/passwordForgotEmail.d.ts +5 -0
- package/build/esm/ssoV2/screens/passwordForgotSetup/checkIcons.d.ts +4 -0
- package/build/esm/ssoV2/screens/setup/genderIcons.d.ts +3 -0
- package/build/esm/ssoV2/ssoStateManager/index.d.ts +2 -0
- package/build/esm/ssoV2/ssoStateManager/store.d.ts +9 -0
- package/build/esm/ssoV2/stepsManager/index.d.ts +8 -1
- package/build/esm/ssoV2.js +1256 -708
- package/build/esm/store-c39c07f1.js +12 -0
- package/build/esm/subot.js +31 -30
- package/build/esm/surveyOrPremiumBanner.js +30 -29
- package/build/esm/surveyQuestionCard.js +10 -10
- package/build/esm/{surveyThankyouCard-dda42736.js → surveyThankyouCard-6bd78f41.js} +5 -5
- package/build/esm/together.js +51 -50
- package/build/esm/togetherApiUtils.js +4 -4
- package/build/esm/togetherAtoms.js +31 -30
- package/build/esm/togetherComponentGlobalContext.js +4 -4
- package/build/esm/togetherMolecules.js +41 -40
- package/build/esm/togetherMoleculesCardAuthor.js +24 -24
- package/build/esm/togetherMoleculesPostImagePreview.js +11 -11
- package/build/esm/togetherMoleculesProfileDetail.js +31 -30
- package/build/esm/togetherOrganisms.js +46 -45
- package/build/esm/togetherRichTextEditor.js +17 -17
- package/build/esm/togetherShareBox.js +10 -10
- package/build/esm/{treePopoverMenu-99ccaf15.js → treePopoverMenu-e54dce53.js} +18 -18
- package/build/esm/{types-943eb3cb.js → types-5e3ac4a4.js} +2 -2
- package/build/esm/types.js +2 -2
- package/build/esm/{useCategory-032bef23.js → useCategory-dfd6cd05.js} +5 -5
- package/build/esm/{useHealthToolCache-5bc2c18b.js → useHealthToolCache-64324642.js} +1 -1
- package/build/esm/useMantineLocale-b8431753.js +142 -0
- package/build/esm/{usePlacesAutocomplete-8af8d9c4.js → usePlacesAutocomplete-24761930.js} +1 -1
- package/build/esm/useTogetherAuthRequiredAction.js +4 -4
- package/build/esm/{useTranslations-95c6883a.js → useTranslations-c6210631.js} +1 -1
- package/build/esm/{utils-073ebee6.js → utils-0f0f5f03.js} +2 -2
- package/build/esm/{utils-62937217.js → utils-1d124077.js} +2 -2
- package/build/esm/{utils-56de005f.js → utils-9df4250d.js} +3 -3
- package/build/esm/vaccination.js +21 -20
- package/build/{fixedBottomAdBlock-4e2f014d.js → fixedBottomAdBlock-037feb6a.js} +22 -22
- package/build/footer.js +21 -20
- package/build/gAssets.js +2 -2
- package/build/healthToolsCardWrapper.js +18 -17
- package/build/healthToolsForm.js +34 -33
- package/build/hooks.js +14 -14
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/{index-a79f2e3c.js → index-00f0f9f8.js} +16 -16
- package/build/{index-b2519660.js → index-043818fb.js} +2 -2
- package/build/{index-bbe2ebb5.js → index-0f118d9f.js} +6 -6
- package/build/{index-e59269bb.js → index-1025bf8a.js} +14 -14
- package/build/{index-fab1cc3a.js → index-17344bc9.js} +5 -2
- package/build/{index-d585bec5.js → index-1a1c4dbd.js} +16 -16
- package/build/{index-581d8105.js → index-1d646c8d.js} +6 -6
- package/build/{index-a5f1a090.js → index-234def9f.js} +18 -14
- package/build/{index-205dc16c.js → index-2436536b.js} +3 -3
- package/build/{index-9216c6ed.js → index-261c7c41.js} +1 -1
- package/build/{index-55d4275e.js → index-2677cccd.js} +20 -20
- package/build/{index-a8647e95.js → index-272c917d.js} +15 -15
- package/build/{index-46743170.js → index-3772f824.js} +19 -19
- package/build/{index-cd40a719.js → index-3e4baf44.js} +23 -23
- package/build/{index-14584b97.js → index-4e359c77.js} +15 -15
- package/build/{index-0b5356e5.js → index-4ee82754.js} +6 -6
- package/build/{index-c99871c5.js → index-51e2164b.js} +5 -5
- package/build/{index-2952c70d.js → index-51ec8d1b.js} +3 -3
- package/build/{index-0c83d79d.js → index-56181cb6.js} +2 -2
- package/build/{index-24116842.js → index-5d1e6a98.js} +2 -2
- package/build/{index-823c0f3c.js → index-5e4074b2.js} +2 -2
- package/build/{index-ad655c42.js → index-6609d728.js} +14 -14
- package/build/{index-e19284e4.js → index-685bc0a5.js} +7 -7
- package/build/{index-b96fc0d1.js → index-69e28113.js} +12 -12
- package/build/{index-b47d6440.js → index-6b959e5e.js} +1 -1
- package/build/{index-65b72b18.js → index-711b6daf.js} +3 -3
- package/build/{index-8e570054.js → index-7893eacd.js} +12 -12
- package/build/{index-6bd20e17.js → index-7beadb47.js} +12 -12
- package/build/{index-35f41022.js → index-7ceb5868.js} +4 -4
- package/build/{index-dd400977.js → index-7f087e20.js} +18 -18
- package/build/{index-8a341a35.js → index-8a14f56e.js} +1 -1
- package/build/{index-50a7b410.js → index-8fe0d6c5.js} +12 -19
- package/build/{index-1fcb5e5c.js → index-93b49320.js} +14 -14
- package/build/{index-9b03e760.js → index-99a644d2.js} +7 -7
- package/build/{index-96c1b956.js → index-a6d8d3c0.js} +15 -15
- package/build/{index-90dd5604.js → index-ac49648f.js} +41 -32
- package/build/{index-ed9e7ac3.js → index-b6dcc6b6.js} +3 -3
- package/build/{index-36227b55.js → index-bb145c83.js} +2 -2
- package/build/{index-9b2a6df6.js → index-bb4dd835.js} +1 -1
- package/build/{index-4ec635ce.js → index-bd7d458a.js} +1 -1
- package/build/{index-0e75a585.js → index-bdd01759.js} +2 -2
- package/build/{index-e8ede7d9.js → index-c11e8d3a.js} +5 -5
- package/build/{index-570d9d4c.js → index-ca18a5a5.js} +16 -16
- package/build/{index-545c39d3.js → index-d2d43b56.js} +17 -17
- package/build/{index-e435db02.js → index-d4e3a73f.js} +1 -1
- package/build/{index-ddf07c51.js → index-d9acdb61.js} +21 -21
- package/build/{index-2ac6a777.js → index-dbdbc0a7.js} +3 -3
- package/build/{index-612701f6.js → index-dbdbfe0e.js} +6 -6
- package/build/{index-2aa7c4cd.js → index-e314ad5e.js} +2 -2
- package/build/{index-2e7f9ae7.js → index-e4bfec92.js} +12 -12
- package/build/{index-6c2f66f8.js → index-e5e20f87.js} +1 -1
- package/build/{index-74f169c4.js → index-e828df8d.js} +2 -2
- package/build/{index-7e4b085c.js → index-e9e89637.js} +2 -2
- package/build/{index-85bcdccc.js → index-eb8c0106.js} +2 -2
- package/build/{index-67ffc70a.js → index-f67aff2e.js} +1 -1
- package/build/{index-e0c93d12.js → index-fcc8ea12.js} +1 -1
- package/build/index.js +113 -110
- package/build/{index.styles-3c08adf1.js → index.styles-572373bc.js} +1 -1
- package/build/interfaces/constants/index.d.ts +1 -0
- package/build/{labelSorting-c35f771e.js → labelSorting-173bb4c2.js} +4 -4
- package/build/lead.js +23 -22
- package/build/{logoIcon-206b5862.js → logoIcon-f73b2d25.js} +2 -2
- package/build/mantine.js +25 -21
- package/build/misc.js +19 -18
- package/build/miscGetDynamicHealthTool.js +5 -5
- package/build/miscGetSocialList.js +8 -8
- package/build/miscScreenSizeContext.js +1 -1
- package/build/mobileBottomNavigation.js +5 -5
- package/build/mobileBottomNavigationIcon.js +5 -5
- package/build/molecules.js +68 -67
- package/build/moleculesArticleCard.js +6 -6
- package/build/moleculesArticleCardV2.js +16 -15
- package/build/navigation.js +43 -40
- package/build/navigationLogoutPopup.js +9 -9
- package/build/navigationProfileButton.js +24 -23
- package/build/onboardingV2.js +28 -27
- package/build/organisms.js +47 -44
- package/build/{post-c0fc6a66.js → post-4ea4886a.js} +2 -2
- package/build/profileNavigation.js +20 -19
- package/build/progressBar.js +1 -1
- package/build/pwg.js +22 -21
- package/build/ssoV2/api/email.d.ts +1 -1
- package/build/ssoV2/api/index.d.ts +14 -11
- package/build/ssoV2/api/paths.d.ts +4 -0
- package/build/ssoV2/api/phone.d.ts +2 -0
- package/build/ssoV2/api/zalo.d.ts +2 -0
- package/build/ssoV2/index.d.ts +4 -1
- package/build/ssoV2/popupWrapper/collectInfoTextPopup/index.d.ts +1 -1
- package/build/ssoV2/popupWrapper/collectInfoTextPopup/modal.d.ts +2 -0
- package/build/ssoV2/popupWrapper/confirmClosePopup.d.ts +6 -0
- package/build/ssoV2/screens/otp.d.ts +3 -1
- package/build/ssoV2/screens/passwordForgotEmail.d.ts +5 -0
- package/build/ssoV2/screens/passwordForgotSetup/checkIcons.d.ts +4 -0
- package/build/ssoV2/screens/setup/genderIcons.d.ts +3 -0
- package/build/ssoV2/ssoStateManager/index.d.ts +2 -0
- package/build/ssoV2/ssoStateManager/store.d.ts +9 -0
- package/build/ssoV2/stepsManager/index.d.ts +8 -1
- package/build/ssoV2.js +1317 -769
- package/build/store-c08b75bf.js +14 -0
- package/build/subot.js +30 -29
- package/build/surveyOrPremiumBanner.js +30 -29
- package/build/surveyQuestionCard.js +10 -10
- package/build/{surveyThankyouCard-2bdf2dcd.js → surveyThankyouCard-59e0629f.js} +5 -5
- package/build/together.js +51 -50
- package/build/togetherApiUtils.js +4 -4
- package/build/togetherAtoms.js +31 -30
- package/build/togetherComponentGlobalContext.js +4 -4
- package/build/togetherMolecules.js +41 -40
- package/build/togetherMoleculesCardAuthor.js +24 -24
- package/build/togetherMoleculesPostImagePreview.js +11 -11
- package/build/togetherMoleculesProfileDetail.js +31 -30
- package/build/togetherOrganisms.js +46 -45
- package/build/togetherRichTextEditor.js +17 -17
- package/build/togetherShareBox.js +10 -10
- package/build/{treePopoverMenu-2ab933a7.js → treePopoverMenu-d5928844.js} +18 -18
- package/build/{types-59f18720.js → types-dc0fc718.js} +2 -2
- package/build/types.js +2 -2
- package/build/{useCategory-09029dc3.js → useCategory-fbebb4d8.js} +5 -5
- package/build/{useHealthToolCache-de6b2733.js → useHealthToolCache-326dc6a5.js} +1 -1
- package/build/{useMantineLocale-06fe1f92.js → useMantineLocale-96fbf5fa.js} +68 -5
- package/build/{usePlacesAutocomplete-96f0c57a.js → usePlacesAutocomplete-a6d0a21b.js} +1 -1
- package/build/useTogetherAuthRequiredAction.js +4 -4
- package/build/{useTranslations-398426f8.js → useTranslations-39001d48.js} +1 -1
- package/build/{utils-1645a4a3.js → utils-3e9eea0e.js} +3 -3
- package/build/{utils-9c9e505f.js → utils-61609a38.js} +2 -2
- package/build/{utils-74cf7dfd.js → utils-b72e0fef.js} +2 -2
- package/build/vaccination.js +21 -20
- package/package.json +4 -2
- package/build/esm/useMantineLocale-8c5b5fc9.js +0 -82
- /package/build/{BMI_BOYS.percentile.monthly-b2263c02.js → BMI_BOYS.percentile.monthly-e9490f46.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-7189e549.js → BMI_BOYS.percentile.weekly-846795ec.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-01310d86.js → BMI_BOYS.percentile.yearly-a578ef66.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-a80fe254.js → BMI_BOYS.zscore.monthly-2a9262e2.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-4b605ea9.js → BMI_BOYS.zscore.weekly-ee7cf142.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-ee3eba97.js → BMI_BOYS.zscore.yearly-d7de19b0.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-166e660d.js → BMI_GIRLS.percentile.monthly-c5af1a3f.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-62efceea.js → BMI_GIRLS.percentile.weekly-5adaacbc.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-1ee84938.js → BMI_GIRLS.percentile.yearly-2bf47bf2.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-59fdaf1b.js → BMI_GIRLS.zscore.monthly-230afb1c.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-da5bb3f4.js → BMI_GIRLS.zscore.weekly-650a656e.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-745c6883.js → BMI_GIRLS.zscore.yearly-d4c56dd1.js} +0 -0
- /package/build/{ChevronDown-db345ad4.js → ChevronDown-f0709618.js} +0 -0
- /package/build/{Close-556fd99a.js → Close-413d7dea.js} +0 -0
- /package/build/{Google-9a9770c8.js → Google-79fe9c55.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-c46325c7.js → HEAD CIRCUM_BOYS.percentile.monthly-07d5db76.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-cd1657f0.js → HEAD CIRCUM_BOYS.percentile.weekly-688fcae3.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-e3f39494.js → HEAD CIRCUM_BOYS.percentile.yearly-04e72a2e.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-ca64bade.js → HEAD CIRCUM_BOYS.zscore.monthly-7bc6382f.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-a443b982.js → HEAD CIRCUM_BOYS.zscore.weekly-2338f758.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-33721395.js → HEAD CIRCUM_BOYS.zscore.yearly-082620a2.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-ac1db53c.js → HEAD CIRCUM_GIRLS.percentile.monthly-7f392c6b.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-6c4f0f23.js → HEAD CIRCUM_GIRLS.percentile.weekly-0e83918e.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-24448b3b.js → HEAD CIRCUM_GIRLS.percentile.yearly-37ed78a5.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-ab7475ce.js → HEAD CIRCUM_GIRLS.zscore.monthly-99befed5.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-2aa317de.js → HEAD CIRCUM_GIRLS.zscore.weekly-0a8bc9ab.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-70253fe6.js → HEAD CIRCUM_GIRLS.zscore.yearly-9e1c36a7.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-be0f2b40.js → HEIGHT_BOYS.percentile.monthly-f18b9e7c.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-75ebc1b7.js → HEIGHT_BOYS.percentile.weekly-52be3396.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-5234db88.js → HEIGHT_BOYS.percentile.yearly-7cf93661.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-0ee39002.js → HEIGHT_BOYS.zscore.monthly-99e4cf73.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-2c310565.js → HEIGHT_BOYS.zscore.weekly-dc0e5112.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-0bf8fade.js → HEIGHT_BOYS.zscore.yearly-a486d2f4.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-748720cd.js → HEIGHT_GIRLS.percentile.monthly-b16f6d0c.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-8a46153d.js → HEIGHT_GIRLS.percentile.weekly-8c63620c.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-330180a0.js → HEIGHT_GIRLS.percentile.yearly-3a4ca8c0.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-85383059.js → HEIGHT_GIRLS.zscore.monthly-fa763991.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-80e2f73d.js → HEIGHT_GIRLS.zscore.weekly-3895f9d9.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-cba1cdb3.js → HEIGHT_GIRLS.zscore.yearly-3a6b113a.js} +0 -0
- /package/build/{Locale-ced9e812.js → Locale-f1adca37.js} +0 -0
- /package/build/{Visible-395cf603.js → Visible-eaa30977.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-1f8d0b96.js → WEIGHT_BOYS.percentile.monthly-b12bb7c8.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-19bd270c.js → WEIGHT_BOYS.percentile.weekly-e6a76aed.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-1d3127d2.js → WEIGHT_BOYS.percentile.yearly-685500c3.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-e91aa7b9.js → WEIGHT_BOYS.zscore.monthly-b2c46c2d.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-5bfa9b63.js → WEIGHT_BOYS.zscore.weekly-9b0eb154.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-377e4368.js → WEIGHT_BOYS.zscore.yearly-182c9525.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-cd9bf691.js → WEIGHT_GIRLS.percentile.monthly-0a2eb04f.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-017fd0e2.js → WEIGHT_GIRLS.percentile.weekly-b0b920c6.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-d13af71c.js → WEIGHT_GIRLS.percentile.yearly-c5d01fda.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-47af4518.js → WEIGHT_GIRLS.zscore.monthly-633342b8.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-11bb0652.js → WEIGHT_GIRLS.zscore.weekly-1fe63ea6.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-975dca0f.js → WEIGHT_GIRLS.zscore.yearly-217b3995.js} +0 -0
- /package/build/{animation-6eabf812.js → animation-77cdbee9.js} +0 -0
- /package/build/{constants-467b578b.js → constants-4e89d2e1.js} +0 -0
- /package/build/{constants-8ccc1c6f.js → constants-7447f49a.js} +0 -0
- /package/build/{constants-b11de697.js → constants-bdbdb06f.js} +0 -0
- /package/build/{dataTransform-aa9f096c.js → dataTransform-2b24697e.js} +0 -0
- /package/build/{doctor-e6502faf.js → doctor-e29b3f60.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-ced0a7a3.js → BMI_BOYS.percentile.monthly-33a94a94.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-1b3ca2b8.js → BMI_BOYS.percentile.weekly-0cb752a7.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-2c5a0ee8.js → BMI_BOYS.percentile.yearly-ac41628b.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-cd03546a.js → BMI_BOYS.zscore.monthly-4ba7c4bc.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-fcc1661e.js → BMI_BOYS.zscore.weekly-0b7b9364.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-9cabe9ca.js → BMI_BOYS.zscore.yearly-00ced3e6.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-210f66f1.js → BMI_GIRLS.percentile.monthly-dff49a68.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-4d723cba.js → BMI_GIRLS.percentile.weekly-61eb9298.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-9c05a767.js → BMI_GIRLS.percentile.yearly-f370ac4b.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-4382143e.js → BMI_GIRLS.zscore.monthly-054b25e1.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-c0709379.js → BMI_GIRLS.zscore.weekly-3bb67521.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-be97f79b.js → BMI_GIRLS.zscore.yearly-28d80e84.js} +0 -0
- /package/build/esm/{ChevronDown-b42c352b.js → ChevronDown-e9331d10.js} +0 -0
- /package/build/esm/{Close-1e215489.js → Close-a5d2cb6c.js} +0 -0
- /package/build/esm/{Google-844b3694.js → Google-2424299e.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-a24003f5.js → HEAD CIRCUM_BOYS.percentile.monthly-4a6a33c4.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-96006f38.js → HEAD CIRCUM_BOYS.percentile.weekly-3ace606b.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-5610453d.js → HEAD CIRCUM_BOYS.percentile.yearly-e570e113.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-e8d8d9ce.js → HEAD CIRCUM_BOYS.zscore.monthly-1102fb4b.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-4daab427.js → HEAD CIRCUM_BOYS.zscore.weekly-5d64b5a8.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-08ec7af4.js → HEAD CIRCUM_BOYS.zscore.yearly-52bacf74.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-009bc515.js → HEAD CIRCUM_GIRLS.percentile.monthly-8eef0771.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-69a760cf.js → HEAD CIRCUM_GIRLS.percentile.weekly-522e82ae.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-81b6e6b4.js → HEAD CIRCUM_GIRLS.percentile.yearly-144d5a93.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-2c6d6ca7.js → HEAD CIRCUM_GIRLS.zscore.monthly-9bfc6ba1.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-8a16120c.js → HEAD CIRCUM_GIRLS.zscore.weekly-f1ad4780.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-710b1ee2.js → HEAD CIRCUM_GIRLS.zscore.yearly-55fea99b.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-3387956d.js → HEIGHT_BOYS.percentile.monthly-d99311cd.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-7f2c0632.js → HEIGHT_BOYS.percentile.weekly-edc5c0fb.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-c1bb4a68.js → HEIGHT_BOYS.percentile.yearly-12cd2c17.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-7e42058a.js → HEIGHT_BOYS.zscore.monthly-709ec42f.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-583b2b8b.js → HEIGHT_BOYS.zscore.weekly-7d05cf79.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-4f581e61.js → HEIGHT_BOYS.zscore.yearly-f15223b2.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-4f367793.js → HEIGHT_GIRLS.percentile.monthly-18b74a4c.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-0f233037.js → HEIGHT_GIRLS.percentile.weekly-eca52802.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-6d387c7f.js → HEIGHT_GIRLS.percentile.yearly-6a8ff56b.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-a340801d.js → HEIGHT_GIRLS.zscore.monthly-79ab8fca.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-8fa49156.js → HEIGHT_GIRLS.zscore.weekly-4921e7ce.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-39888c32.js → HEIGHT_GIRLS.zscore.yearly-7df93c38.js} +0 -0
- /package/build/esm/{Locale-2e537a6a.js → Locale-eaad3fa1.js} +0 -0
- /package/build/esm/{Visible-4941f057.js → Visible-83f5dd42.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-7a60a73c.js → WEIGHT_BOYS.percentile.monthly-730634b0.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-3cfb9f20.js → WEIGHT_BOYS.percentile.weekly-fcceaf00.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-166da826.js → WEIGHT_BOYS.percentile.yearly-55413826.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-96e662e5.js → WEIGHT_BOYS.zscore.monthly-f2dc1aa3.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-deef00c4.js → WEIGHT_BOYS.zscore.weekly-3509ffc9.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-d27b755f.js → WEIGHT_BOYS.zscore.yearly-570fae42.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-361eaf8a.js → WEIGHT_GIRLS.percentile.monthly-2264b7be.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-df3a8d7e.js → WEIGHT_GIRLS.percentile.weekly-b62f6fe3.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-65ec2031.js → WEIGHT_GIRLS.percentile.yearly-b13d50f8.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-7ad785b0.js → WEIGHT_GIRLS.zscore.monthly-4b7222dd.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-ce7380eb.js → WEIGHT_GIRLS.zscore.weekly-9c52f897.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-eb5f8c05.js → WEIGHT_GIRLS.zscore.yearly-4ea30806.js} +0 -0
- /package/build/esm/{animation-8cdf0413.js → animation-7f0b238b.js} +0 -0
- /package/build/esm/{constants-c6b6dd70.js → constants-2eaa8f5b.js} +0 -0
- /package/build/esm/{constants-0a2e2d89.js → constants-deb09b39.js} +0 -0
- /package/build/esm/{constants-39fd57dc.js → constants-f170914c.js} +0 -0
- /package/build/esm/{dataTransform-46c04e86.js → dataTransform-1d980e37.js} +0 -0
- /package/build/esm/{doctor-77d627cf.js → doctor-f8f585eb.js} +0 -0
- /package/build/esm/{index-c2c1151d.js → index-80efd6d8.js} +0 -0
- /package/build/esm/{index-4a0f7a2a.js → index-910d863e.js} +0 -0
- /package/build/esm/{index-f7f5582d.js → index-9e06fa51.js} +0 -0
- /package/build/esm/{index-c6266db7.js → index-a8484016.js} +0 -0
- /package/build/esm/{index-823e3a77.js → index-aaf4f6ea.js} +0 -0
- /package/build/esm/{index-347e9ebf.js → index-ec778b90.js} +0 -0
- /package/build/esm/{index-6df8ce2b.js → index-f153abc8.js} +0 -0
- /package/build/esm/{index-103508c0.js → index-f32de26a.js} +0 -0
- /package/build/esm/{localizeNumberFormat-55809d96.js → localizeNumberFormat-79c240f7.js} +0 -0
- /package/build/esm/{normalizeLink-5ca463b6.js → normalizeLink-3fea79dc.js} +0 -0
- /package/build/esm/{number-4657b47b.js → number-25ac44dc.js} +0 -0
- /package/build/esm/{other-09dd1a84.js → other-9ea1cbe5.js} +0 -0
- /package/build/esm/{paths-baec036c.js → paths-eef9fe77.js} +0 -0
- /package/build/esm/{routing-3e2e2990.js → routing-8d70e86c.js} +0 -0
- /package/build/esm/{translationsContext-b39ae826.js → translationsContext-5f5f4d35.js} +0 -0
- /package/build/esm/{tslib.es6-5f83e366.js → tslib.es6-f3a499e3.js} +0 -0
- /package/build/esm/{types-dbdccf8d.js → types-0448e320.js} +0 -0
- /package/build/esm/{useIsInit-a92309dc.js → useIsInit-ca4bdf65.js} +0 -0
- /package/build/esm/{useOutsideClick-0be26f49.js → useOutsideClick-1ee3798c.js} +0 -0
- /package/build/esm/{useScrollbarSize-a4d05dbd.js → useScrollbarSize-1a93f108.js} +0 -0
- /package/build/esm/{useUniqueId-7d9bfd02.js → useUniqueId-2a6f1b27.js} +0 -0
- /package/build/esm/{utils-f168370f.js → utils-8bc7ef6f.js} +0 -0
- /package/build/{index-c6494ca6.js → index-0cc06aa6.js} +0 -0
- /package/build/{index-f64e7c74.js → index-71457a8a.js} +0 -0
- /package/build/{index-f5d2c8d3.js → index-72dace7d.js} +0 -0
- /package/build/{index-b9c86a3d.js → index-94f0219c.js} +0 -0
- /package/build/{index-3ab23404.js → index-bf3a3a6b.js} +0 -0
- /package/build/{index-aabca052.js → index-bf3c292b.js} +0 -0
- /package/build/{index-3413e9d2.js → index-c08653a6.js} +0 -0
- /package/build/{index-fc8fe2d4.js → index-f78c2c75.js} +0 -0
- /package/build/{localizeNumberFormat-d2e5c1a5.js → localizeNumberFormat-5dbb221b.js} +0 -0
- /package/build/{normalizeLink-84ac179b.js → normalizeLink-cf43c3dd.js} +0 -0
- /package/build/{number-e5fda4be.js → number-8390df04.js} +0 -0
- /package/build/{other-f335833f.js → other-a5087437.js} +0 -0
- /package/build/{paths-643266bc.js → paths-9b76502a.js} +0 -0
- /package/build/{routing-5902192d.js → routing-929238aa.js} +0 -0
- /package/build/{translationsContext-8627f575.js → translationsContext-2e89ee02.js} +0 -0
- /package/build/{tslib.es6-bdc4ef33.js → tslib.es6-aca88a2c.js} +0 -0
- /package/build/{types-efc43fc9.js → types-d64e102d.js} +0 -0
- /package/build/{useIsInit-a9a5096b.js → useIsInit-9e580096.js} +0 -0
- /package/build/{useOutsideClick-6e5b26b3.js → useOutsideClick-a6ecea5e.js} +0 -0
- /package/build/{useScrollbarSize-01d92d17.js → useScrollbarSize-657ef9b6.js} +0 -0
- /package/build/{useUniqueId-72e1f41e.js → useUniqueId-7b8066f0.js} +0 -0
- /package/build/{utils-c6a6f3d0.js → utils-c29ae23e.js} +0 -0
package/build/esm/ssoV2.js
CHANGED
|
@@ -1,47 +1,52 @@
|
|
|
1
|
-
import React__default, { createContext, useState,
|
|
1
|
+
import React__default, { createContext, useState, useRef, useMemo, useEffect } from 'react';
|
|
2
|
+
import { createPortal } from 'react-dom';
|
|
2
3
|
import { ChevronLeft } from '@hhgtech/icons/arrow';
|
|
3
|
-
import { Close
|
|
4
|
-
import { L as LogoIcon } from './logoIcon-
|
|
5
|
-
import { B as Button } from './index-
|
|
6
|
-
import { M as Modal } from './index-
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
4
|
+
import { Close } from '@hhgtech/icons/core';
|
|
5
|
+
import { L as LogoIcon } from './logoIcon-f4e92a05.js';
|
|
6
|
+
import { B as Button } from './index-e5494b1e.js';
|
|
7
|
+
import { M as Modal } from './index-c3148516.js';
|
|
8
|
+
import { Box, Stack, Group } from '@mantine/core';
|
|
9
|
+
import throttle from 'lodash/throttle';
|
|
10
|
+
import { f as Accordion, I as Input, P as Phone, O as OTP, g as PasswordInput, R as Radio } from './index-42e125f0.js';
|
|
11
|
+
import '@mantine/dates';
|
|
12
|
+
import { L as LOCALE_SPECS, f as BEARER_REFRESH_TOKEN_COOKIE } from './index-745f205b.js';
|
|
13
|
+
import './index-59f60051.js';
|
|
14
|
+
import './index-a8484016.js';
|
|
15
|
+
import { s as showNotification } from './useMantineLocale-b8431753.js';
|
|
16
|
+
import { T as Text } from './index-70d624c6.js';
|
|
17
|
+
import { u as useTranslations } from './useTranslations-c6210631.js';
|
|
18
|
+
import '@mantine/hooks';
|
|
19
|
+
import { a as getPopupWrapperDom } from './utils-8bc7ef6f.js';
|
|
20
|
+
import './other-9ea1cbe5.js';
|
|
21
|
+
import { L as LOCALE } from './Locale-eaad3fa1.js';
|
|
22
|
+
import './translationsContext-5f5f4d35.js';
|
|
23
|
+
import 'string-format';
|
|
24
|
+
import { a as __awaiter, _ as __rest } from './tslib.es6-f3a499e3.js';
|
|
12
25
|
import { isProduction } from './constantsIsProduction.js';
|
|
13
|
-
import { a as getCurrentSsoUrl } from './routing-
|
|
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';
|
|
26
|
+
import { a as getCurrentSsoUrl } from './routing-8d70e86c.js';
|
|
19
27
|
import { setCookie } from './miscCookieHelper.js';
|
|
20
|
-
import { theme } from './miscTheme.js';
|
|
21
28
|
import { domainLocales } from './constantsDomainLocales.js';
|
|
29
|
+
import { G as Google, F as Facebook } from './Google-2424299e.js';
|
|
30
|
+
import { Info } from '@hhgtech/icons/other';
|
|
31
|
+
import './index.styles-826b6cf4.js';
|
|
32
|
+
import styled from '@emotion/styled';
|
|
33
|
+
import { M as MAPPED_LOCALE } from './utils-0f0f5f03.js';
|
|
22
34
|
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
35
|
import * as yup from 'yup';
|
|
33
36
|
import dayjs from 'dayjs';
|
|
34
|
-
import { D as DatePicker } from './index-
|
|
35
|
-
import './
|
|
36
|
-
|
|
37
|
-
import '
|
|
38
|
-
import './constantsSite.js';
|
|
39
|
-
import './constantsRiskScreener.js';
|
|
37
|
+
import { D as DatePicker } from './index-d4c470e1.js';
|
|
38
|
+
import { u as useSSOV2Store } from './store-c39c07f1.js';
|
|
39
|
+
export { u as useSSOV2Store } from './store-c39c07f1.js';
|
|
40
|
+
import './index-bbf929d1.js';
|
|
40
41
|
import '@mantine/carousel';
|
|
42
|
+
import './miscTheme.js';
|
|
41
43
|
import 'classnames';
|
|
42
|
-
import './useUniqueId-
|
|
43
|
-
import './
|
|
44
|
-
import '
|
|
44
|
+
import './useUniqueId-2a6f1b27.js';
|
|
45
|
+
import './constantsSite.js';
|
|
46
|
+
import 'date-fns/locale';
|
|
47
|
+
import './constantsRiskScreener.js';
|
|
48
|
+
import '@mantine/notifications';
|
|
49
|
+
import 'zustand';
|
|
45
50
|
|
|
46
51
|
const SSOStateContext = createContext({
|
|
47
52
|
locale: LOCALE.Vietnam,
|
|
@@ -49,90 +54,188 @@ const SSOStateContext = createContext({
|
|
|
49
54
|
source: 'default',
|
|
50
55
|
});
|
|
51
56
|
const SSOStateProvider = ({ children, locale = LOCALE.Vietnam, onClose, source = 'default', }) => {
|
|
57
|
+
const [openCollectInfoPopup, setOpenCollectInfoPopup] = React__default.useState(false);
|
|
52
58
|
return (React__default.createElement(SSOStateContext.Provider, { value: {
|
|
53
59
|
locale,
|
|
54
60
|
onClose,
|
|
55
61
|
source,
|
|
62
|
+
openCollectInfoPopup,
|
|
63
|
+
setOpenCollectInfoPopup,
|
|
56
64
|
} }, children));
|
|
57
65
|
};
|
|
58
66
|
const useSSOState = () => {
|
|
59
67
|
return React__default.useContext(SSOStateContext);
|
|
60
68
|
};
|
|
61
69
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
70
|
+
const BackgroundHeader$1 = () => (React__default.createElement("svg", { width: "292", height: "255", viewBox: "0 0 292 255", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: {
|
|
71
|
+
position: 'absolute',
|
|
72
|
+
top: 0,
|
|
73
|
+
left: '50%',
|
|
74
|
+
zIndex: 0,
|
|
75
|
+
transform: 'translateX(-50%)',
|
|
76
|
+
pointerEvents: 'none',
|
|
77
|
+
} },
|
|
78
|
+
React__default.createElement("circle", { opacity: ".2", cx: "146", cy: "109", r: "146", fill: "url(#paint0_linear_908_34610)" }),
|
|
79
|
+
React__default.createElement("circle", { opacity: ".3", cx: "146", cy: "109", r: "85", fill: "url(#paint1_linear_908_34610)" }),
|
|
80
|
+
React__default.createElement("circle", { cx: "146.5", cy: "108.5", r: "47.5", fill: "url(#paint2_linear_908_34610)" }),
|
|
81
|
+
React__default.createElement("circle", { cx: "146.5", cy: "108.5", r: "47", stroke: "url(#paint3_linear_908_34610)" }),
|
|
82
|
+
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" }),
|
|
83
|
+
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" }),
|
|
84
|
+
React__default.createElement("path", { d: "M129.074 111.859v.358q.002-.18.032-.358zm34.25 0q.031.178.032.358v-.358z", fill: "#38454F" }),
|
|
85
|
+
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" }),
|
|
86
|
+
React__default.createElement("path", { d: "M129.074 103.287v.357q.002-.18.032-.357zm34.25 0q.031.178.032.357v-.357z", fill: "#556080" }),
|
|
87
|
+
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" }),
|
|
88
|
+
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" }),
|
|
89
|
+
React__default.createElement("path", { d: "M129.074 94.717v.357q.002-.18.032-.357zm34.25 0q.031.177.032.357v-.357z", fill: "#8697CB" }),
|
|
90
|
+
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" }),
|
|
91
|
+
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" }),
|
|
92
|
+
React__default.createElement("defs", null,
|
|
93
|
+
React__default.createElement("linearGradient", { id: "paint0_linear_908_34610", x1: "147.5", y1: "141", x2: "36.5", y2: "30", gradientUnits: "userSpaceOnUse" },
|
|
94
|
+
React__default.createElement("stop", { stopColor: "#fff", stopOpacity: "0" }),
|
|
95
|
+
React__default.createElement("stop", { offset: "1", stopColor: "#fff" })),
|
|
96
|
+
React__default.createElement("linearGradient", { id: "paint1_linear_908_34610", x1: "218.376", y1: "63.134", x2: "61", y2: "109", gradientUnits: "userSpaceOnUse" },
|
|
97
|
+
React__default.createElement("stop", { stopColor: "#fff" }),
|
|
98
|
+
React__default.createElement("stop", { offset: "1", stopColor: "#fff", stopOpacity: "0" })),
|
|
99
|
+
React__default.createElement("linearGradient", { id: "paint2_linear_908_34610", x1: "146.5", y1: "61", x2: "146.5", y2: "156", gradientUnits: "userSpaceOnUse" },
|
|
100
|
+
React__default.createElement("stop", { stopColor: "#fff", stopOpacity: ".6" }),
|
|
101
|
+
React__default.createElement("stop", { offset: "1", stopColor: "#fff", stopOpacity: "0" })),
|
|
102
|
+
React__default.createElement("linearGradient", { id: "paint3_linear_908_34610", x1: "178.979", y1: "98.35", x2: "108.338", y2: "98.35", gradientUnits: "userSpaceOnUse" },
|
|
103
|
+
React__default.createElement("stop", { stopColor: "#fff", stopOpacity: "0" }),
|
|
104
|
+
React__default.createElement("stop", { offset: "1", stopColor: "#fff" })))));
|
|
105
|
+
|
|
106
|
+
const CustomerSupportIcon = () => {
|
|
107
|
+
return (React__default.createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
108
|
+
React__default.createElement("g", { clipPath: "url(#clip0_911_24123)" },
|
|
109
|
+
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" }),
|
|
110
|
+
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" }),
|
|
111
|
+
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" }),
|
|
112
|
+
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" }),
|
|
113
|
+
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" }),
|
|
114
|
+
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" }),
|
|
115
|
+
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" }),
|
|
116
|
+
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" }),
|
|
117
|
+
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" }),
|
|
118
|
+
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" }),
|
|
119
|
+
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" }),
|
|
120
|
+
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" }),
|
|
121
|
+
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" }),
|
|
122
|
+
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" }),
|
|
123
|
+
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" })),
|
|
124
|
+
React__default.createElement("defs", null,
|
|
125
|
+
React__default.createElement("clipPath", { id: "clip0_911_24123" },
|
|
126
|
+
React__default.createElement("path", { fill: "#fff", d: "M0 0h32v32H0z" })))));
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const HealthUpdateIcon = () => {
|
|
130
|
+
return (React__default.createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
131
|
+
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" }),
|
|
132
|
+
React__default.createElement("path", { d: "m4.488 5.49 16.427-2.458 3.13 20.914-16.427 2.458z", fill: "#fff" }),
|
|
133
|
+
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" }),
|
|
134
|
+
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" }),
|
|
135
|
+
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" }),
|
|
136
|
+
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" })));
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
const PersonalizeIcon = () => {
|
|
140
|
+
return (React__default.createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
141
|
+
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" }),
|
|
142
|
+
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" }),
|
|
143
|
+
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" }),
|
|
144
|
+
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" }),
|
|
145
|
+
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" }),
|
|
146
|
+
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" }),
|
|
147
|
+
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" }),
|
|
148
|
+
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" }),
|
|
149
|
+
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" }),
|
|
150
|
+
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" }),
|
|
151
|
+
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" }),
|
|
152
|
+
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" })));
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
const SecurityIcon = () => {
|
|
156
|
+
return (React__default.createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
157
|
+
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" }),
|
|
158
|
+
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" }),
|
|
159
|
+
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" }),
|
|
160
|
+
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" })));
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
const ServiceIcon = () => {
|
|
164
|
+
return (React__default.createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
165
|
+
React__default.createElement("g", { clipPath: "url(#clip0_911_3434)" },
|
|
166
|
+
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" }),
|
|
167
|
+
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" }),
|
|
168
|
+
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" }),
|
|
169
|
+
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" }),
|
|
170
|
+
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" }),
|
|
171
|
+
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" }),
|
|
172
|
+
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" }),
|
|
173
|
+
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" }),
|
|
174
|
+
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" }),
|
|
175
|
+
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" }),
|
|
176
|
+
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" })),
|
|
177
|
+
React__default.createElement("defs", null,
|
|
178
|
+
React__default.createElement("clipPath", { id: "clip0_911_3434" },
|
|
179
|
+
React__default.createElement("path", { fill: "#fff", d: "M0 0h32v32H0z" })))));
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
183
|
+
const getContents = (t) => {
|
|
184
|
+
return [
|
|
77
185
|
{
|
|
78
|
-
|
|
186
|
+
label: 'Personalized Experience',
|
|
187
|
+
description: 'Your name, gender, and date of birth help us provide tailored health advice and personalized care plans that fit your unique needs.',
|
|
188
|
+
icon: React__default.createElement(PersonalizeIcon, null),
|
|
79
189
|
},
|
|
80
|
-
],
|
|
81
|
-
setSteps: () => false,
|
|
82
|
-
goNext: () => false,
|
|
83
|
-
goBack: () => false,
|
|
84
|
-
addStep: () => false,
|
|
85
|
-
});
|
|
86
|
-
const SSOStepsProvider = ({ children }) => {
|
|
87
|
-
const [steps, setSteps] = useState([
|
|
88
190
|
{
|
|
89
|
-
|
|
191
|
+
label: 'Timely Health Updates',
|
|
192
|
+
description: 'We use your phone number and email to send important notifications, health reminders, and updates on new content to keep you informed.',
|
|
193
|
+
icon: React__default.createElement(HealthUpdateIcon, null),
|
|
90
194
|
},
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
},
|
|
108
|
-
} }, children));
|
|
195
|
+
{
|
|
196
|
+
label: 'Enhanced Security',
|
|
197
|
+
description: 'We use your phone number and email to send important notifications, health reminders, and updates on new content to keep you informed.',
|
|
198
|
+
icon: React__default.createElement(SecurityIcon, null),
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
label: 'Quick Customer Support',
|
|
202
|
+
description: 'We use your phone number and email to send important notifications, health reminders, and updates on new content to keep you informed.',
|
|
203
|
+
icon: React__default.createElement(CustomerSupportIcon, null),
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
label: 'Service Improvement',
|
|
207
|
+
description: 'We use your phone number and email to send important notifications, health reminders, and updates on new content to keep you informed.',
|
|
208
|
+
icon: React__default.createElement(ServiceIcon, null),
|
|
209
|
+
},
|
|
210
|
+
];
|
|
109
211
|
};
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
};
|
|
212
|
+
const CollectInfoTextPopup = () => {
|
|
213
|
+
const { openCollectInfoPopup, setOpenCollectInfoPopup } = useSSOState();
|
|
214
|
+
useTranslations();
|
|
215
|
+
const contents = getContents();
|
|
216
|
+
const [mobileDragOffset, setMobileDragOffset] = useState(0);
|
|
217
|
+
const dragStartYRef = useRef(0);
|
|
218
|
+
const mobileDragOffsetRef = useRef(mobileDragOffset);
|
|
219
|
+
mobileDragOffsetRef.current = mobileDragOffset;
|
|
220
|
+
const throttleSetMobileDragOffset = useMemo(() => {
|
|
221
|
+
return throttle(setMobileDragOffset, 70);
|
|
222
|
+
}, []);
|
|
223
|
+
useEffect(() => {
|
|
224
|
+
if (openCollectInfoPopup) {
|
|
225
|
+
setMobileDragOffset(0);
|
|
226
|
+
}
|
|
227
|
+
}, [openCollectInfoPopup]);
|
|
126
228
|
return (React__default.createElement(React__default.Fragment, null,
|
|
127
|
-
React__default.createElement(
|
|
229
|
+
React__default.createElement("style", { key: mobileDragOffset }, `
|
|
230
|
+
.collect-info-text-popup .mantine-Modal-inner {
|
|
231
|
+
transform: translateY(${Math.round(mobileDragOffset)}px);
|
|
232
|
+
}
|
|
233
|
+
`),
|
|
234
|
+
React__default.createElement(Modal, { opened: openCollectInfoPopup, onClose: () => setOpenCollectInfoPopup(false), withCloseButton: false, styles: (theme) => ({
|
|
128
235
|
body: {
|
|
129
|
-
|
|
130
|
-
flexDirection: 'column',
|
|
131
|
-
gap: 24,
|
|
132
|
-
padding: '36px 24px',
|
|
236
|
+
padding: '32px 24px',
|
|
133
237
|
position: 'relative',
|
|
134
|
-
background: 'linear-gradient(180deg, #
|
|
135
|
-
overflow: 'auto',
|
|
238
|
+
background: 'linear-gradient(180deg, #91CAFF 0%, #CFE8FF 100px, #FFFFFF 200px)',
|
|
136
239
|
[theme.fn.smallerThan('sm')]: {
|
|
137
240
|
height: '100%',
|
|
138
241
|
},
|
|
@@ -141,7 +244,8 @@ const SSOPopupWrapper = ({ children, opened, onClose, }) => {
|
|
|
141
244
|
[theme.fn.smallerThan('sm')]: {
|
|
142
245
|
width: '100%',
|
|
143
246
|
height: '100%',
|
|
144
|
-
|
|
247
|
+
borderBottomLeftRadius: 0,
|
|
248
|
+
borderBottomRightRadius: 0,
|
|
145
249
|
maxWidth: '100%',
|
|
146
250
|
maxHeight: '100%',
|
|
147
251
|
},
|
|
@@ -151,17 +255,283 @@ const SSOPopupWrapper = ({ children, opened, onClose, }) => {
|
|
|
151
255
|
padding: 0,
|
|
152
256
|
left: 0,
|
|
153
257
|
right: 0,
|
|
258
|
+
top: 120,
|
|
259
|
+
// transform: `translateY(${Math.round(mobileDragOffset)}px)`,
|
|
154
260
|
display: 'block',
|
|
261
|
+
transition: 'transform 70ms',
|
|
155
262
|
},
|
|
156
263
|
},
|
|
157
|
-
}),
|
|
158
|
-
React__default.createElement(
|
|
159
|
-
|
|
264
|
+
}), className: "collect-info-text-popup" },
|
|
265
|
+
React__default.createElement(Box, { sx: (theme) => ({
|
|
266
|
+
[theme.fn.largerThan('sm')]: {
|
|
267
|
+
display: 'none',
|
|
268
|
+
},
|
|
269
|
+
padding: 8,
|
|
270
|
+
width: '100%',
|
|
271
|
+
cursor: 'grab',
|
|
160
272
|
display: 'flex',
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
273
|
+
justifyContent: 'center',
|
|
274
|
+
position: 'absolute',
|
|
275
|
+
top: 0,
|
|
276
|
+
left: 0,
|
|
277
|
+
}), draggable: true, onDrag: (e) => {
|
|
278
|
+
if (e.clientY <= 5)
|
|
279
|
+
return;
|
|
280
|
+
throttleSetMobileDragOffset(e.clientY - dragStartYRef.current);
|
|
281
|
+
}, onDragStart: (e) => {
|
|
282
|
+
dragStartYRef.current = e.clientY;
|
|
283
|
+
}, onDragEnd: (e) => {
|
|
284
|
+
if (e.clientY - dragStartYRef.current > 100) {
|
|
285
|
+
setMobileDragOffset(window.innerHeight);
|
|
286
|
+
setTimeout(() => {
|
|
287
|
+
setOpenCollectInfoPopup(false);
|
|
288
|
+
}, 100);
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
throttleSetMobileDragOffset(0);
|
|
292
|
+
}
|
|
293
|
+
}, onTouchStart: (e) => {
|
|
294
|
+
dragStartYRef.current = e.touches[0].clientY;
|
|
295
|
+
}, onTouchMove: (e) => {
|
|
296
|
+
if (e.touches[0].clientY < 0)
|
|
297
|
+
return;
|
|
298
|
+
throttleSetMobileDragOffset(e.touches[0].clientY - dragStartYRef.current);
|
|
299
|
+
}, onTouchEnd: (e) => {
|
|
300
|
+
if (e.changedTouches[0].clientY - dragStartYRef.current > 100) {
|
|
301
|
+
setMobileDragOffset(window.innerHeight);
|
|
302
|
+
setTimeout(() => {
|
|
303
|
+
setOpenCollectInfoPopup(false);
|
|
304
|
+
}, 100);
|
|
305
|
+
}
|
|
306
|
+
else {
|
|
307
|
+
throttleSetMobileDragOffset(0);
|
|
308
|
+
}
|
|
309
|
+
} },
|
|
310
|
+
React__default.createElement(Box, { sx: {
|
|
311
|
+
border: '1.5px solid #ADB3BC',
|
|
312
|
+
background: 'gray',
|
|
313
|
+
borderRadius: 3,
|
|
314
|
+
width: 44,
|
|
315
|
+
} })),
|
|
316
|
+
React__default.createElement("div", { style: {
|
|
317
|
+
height: 40,
|
|
318
|
+
} },
|
|
319
|
+
React__default.createElement(Button, { variant: "white", sx: (theme) => ({
|
|
320
|
+
width: 40,
|
|
321
|
+
height: 40,
|
|
322
|
+
padding: 8,
|
|
323
|
+
background: 'white',
|
|
324
|
+
borderRadius: '100%',
|
|
325
|
+
[theme.fn.smallerThan('sm')]: {
|
|
326
|
+
display: 'none',
|
|
327
|
+
},
|
|
328
|
+
}), onClick: () => setOpenCollectInfoPopup(false) },
|
|
329
|
+
React__default.createElement(ChevronLeft, null))),
|
|
330
|
+
React__default.createElement(BackgroundHeader$1, null),
|
|
331
|
+
React__default.createElement(Stack, { pos: "relative", mt: 100, spacing: 8, style: {
|
|
332
|
+
zIndex: 1,
|
|
333
|
+
} },
|
|
334
|
+
React__default.createElement(Text, { size: "h4" }, "Why We Need Your Information"),
|
|
335
|
+
React__default.createElement(Accordion, { styles: {
|
|
336
|
+
item: {
|
|
337
|
+
borderBottomColor: '#E4E8EC',
|
|
338
|
+
paddingBottom: 16,
|
|
339
|
+
marginTop: 16,
|
|
340
|
+
},
|
|
341
|
+
control: {
|
|
342
|
+
padding: 0,
|
|
343
|
+
},
|
|
344
|
+
content: {
|
|
345
|
+
padding: 0,
|
|
346
|
+
marginTop: 8,
|
|
347
|
+
},
|
|
348
|
+
} }, contents.map((item, index) => (React__default.createElement(Accordion.Item, { key: index, value: item.label },
|
|
349
|
+
React__default.createElement(Accordion.Control, { icon: item.icon },
|
|
350
|
+
React__default.createElement(Text, { size: "s3", weight: "semiBold" }, item.label)),
|
|
351
|
+
React__default.createElement(Accordion.Panel, null,
|
|
352
|
+
React__default.createElement(Text, { size: "p3" }, item.description))))))))));
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
const ConfirmClosePopup = ({ opened, onCancel, onClose, }) => {
|
|
356
|
+
return (React__default.createElement(Modal, { opened: opened, onClose: () => onCancel(), withCloseButton: false, styles: (theme) => ({
|
|
357
|
+
body: {
|
|
358
|
+
padding: '32px 24px',
|
|
359
|
+
position: 'relative',
|
|
360
|
+
background: 'linear-gradient(180deg, #91CAFF 0%, #CFE8FF 100px, #FFFFFF 200px)',
|
|
361
|
+
[theme.fn.smallerThan('sm')]: {
|
|
362
|
+
height: '100%',
|
|
363
|
+
},
|
|
364
|
+
},
|
|
365
|
+
content: {
|
|
366
|
+
[theme.fn.smallerThan('sm')]: {
|
|
367
|
+
width: '100%',
|
|
368
|
+
height: '100%',
|
|
369
|
+
borderBottomLeftRadius: 0,
|
|
370
|
+
borderBottomRightRadius: 0,
|
|
371
|
+
maxWidth: '100%',
|
|
372
|
+
maxHeight: '100%',
|
|
373
|
+
},
|
|
374
|
+
},
|
|
375
|
+
inner: {
|
|
376
|
+
[theme.fn.smallerThan('sm')]: {
|
|
377
|
+
padding: 0,
|
|
378
|
+
left: 0,
|
|
379
|
+
right: 0,
|
|
380
|
+
top: 'unset',
|
|
381
|
+
// transform: `translateY(${Math.round(mobileDragOffset)}px)`,
|
|
382
|
+
display: 'block',
|
|
383
|
+
transition: 'transform 70ms',
|
|
384
|
+
},
|
|
385
|
+
},
|
|
386
|
+
}) },
|
|
387
|
+
React__default.createElement(BackgroundHeader, null),
|
|
388
|
+
React__default.createElement(Stack, { pos: "relative", mt: 150, spacing: 8, style: {
|
|
389
|
+
zIndex: 1,
|
|
390
|
+
textAlign: 'center',
|
|
391
|
+
} },
|
|
392
|
+
React__default.createElement(Text, { size: "h4" }, "Are you sure you want to exit?"),
|
|
393
|
+
React__default.createElement(Text, { size: "p3" }, "You\u2019re just a step away from completing your account setup. Do you really want to leave?")),
|
|
394
|
+
React__default.createElement(Stack, { mt: 32, spacing: 8, align: "center" },
|
|
395
|
+
React__default.createElement(Button, { variant: "primary", size: "lg", onClick: onCancel, w: "50%", radius: 40 },
|
|
396
|
+
React__default.createElement(Text, { size: "s2", weight: "regular", color: "inherit" }, "Cancel")),
|
|
397
|
+
React__default.createElement(Button, { variant: "white", size: "lg", onClick: onClose, fullWidth: true },
|
|
398
|
+
React__default.createElement(Text, { size: "p2", weight: "regular", color: "gray.6" }, "I want to exit now")))));
|
|
399
|
+
};
|
|
400
|
+
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: {
|
|
401
|
+
position: 'absolute',
|
|
402
|
+
top: 0,
|
|
403
|
+
left: '50%',
|
|
404
|
+
zIndex: 0,
|
|
405
|
+
transform: 'translateX(-50%)',
|
|
406
|
+
pointerEvents: 'none',
|
|
407
|
+
} },
|
|
408
|
+
React__default.createElement("circle", { opacity: ".2", cx: "146", cy: "109", r: "146", fill: "url(#paint0_linear_908_35161)" }),
|
|
409
|
+
React__default.createElement("circle", { opacity: ".3", cx: "146", cy: "109", r: "85", fill: "url(#paint1_linear_908_35161)" }),
|
|
410
|
+
React__default.createElement("circle", { cx: "146.5", cy: "108.5", r: "47.5", fill: "url(#paint2_linear_908_35161)" }),
|
|
411
|
+
React__default.createElement("circle", { cx: "146.5", cy: "108.5", r: "47", stroke: "url(#paint3_linear_908_35161)" }),
|
|
412
|
+
React__default.createElement("path", { d: "m148.68 89.129-13.51-2.087a4.552 4.552 0 0 0-5.17 4.454v35.009a4.55 4.55 0 0 0 1.586 3.395 4.56 4.56 0 0 0 3.594 1.059l13.5-2.087a4.474 4.474 0 0 0 3.82-4.452V93.58a4.48 4.48 0 0 0-3.82-4.451", fill: "#2D87F3" }),
|
|
413
|
+
React__default.createElement("path", { d: "M164.342 108.002a1.43 1.43 0 0 1-.557 1.132l-4.714 3.643a1.07 1.07 0 0 1-1.563-.281 1.1 1.1 0 0 1-.161-.566v-1.224l-5.085-.025a.54.54 0 0 1-.535-.539v-4.322a.54.54 0 0 1 .538-.538l5.088.004-.009-1.214a1.08 1.08 0 0 1 .598-.962 1.07 1.07 0 0 1 1.127.113l4.716 3.648a1.42 1.42 0 0 1 .557 1.131", fill: "#FF6F4D" }),
|
|
414
|
+
React__default.createElement("path", { d: "M164.342 108.002a1.43 1.43 0 0 1-.557 1.132l-4.714 3.643a1.07 1.07 0 0 1-1.563-.281 1.1 1.1 0 0 1-.161-.566v-1.224l-5.085-.025a.54.54 0 0 1-.535-.539v-4.322a.54.54 0 0 1 .538-.538l5.088.004-.009-1.214a1.08 1.08 0 0 1 .598-.962 1.07 1.07 0 0 1 1.127.113l4.716 3.648a1.42 1.42 0 0 1 .557 1.131m-18.248-2.179v4.324a.54.54 0 0 0 .539.539h3.017a.54.54 0 0 0 .538-.539v-4.324a.54.54 0 0 0-.538-.539h-3.017a.54.54 0 0 0-.539.539m-1.616 4.341a.54.54 0 0 1-.539.539h-.977a1.463 1.463 0 0 1-1.462-1.462v-2.478a1.463 1.463 0 0 1 1.462-1.463h.977a.54.54 0 0 1 .539.539z", fill: "#FF6F4D" }),
|
|
415
|
+
React__default.createElement("defs", null,
|
|
416
|
+
React__default.createElement("linearGradient", { id: "paint0_linear_908_35161", x1: "147.5", y1: "141", x2: "36.5", y2: "30", gradientUnits: "userSpaceOnUse" },
|
|
417
|
+
React__default.createElement("stop", { stopColor: "#fff", stopOpacity: "0" }),
|
|
418
|
+
React__default.createElement("stop", { offset: "1", stopColor: "#fff" })),
|
|
419
|
+
React__default.createElement("linearGradient", { id: "paint1_linear_908_35161", x1: "218.376", y1: "63.134", x2: "61", y2: "109", gradientUnits: "userSpaceOnUse" },
|
|
420
|
+
React__default.createElement("stop", { stopColor: "#fff" }),
|
|
421
|
+
React__default.createElement("stop", { offset: "1", stopColor: "#fff", stopOpacity: "0" })),
|
|
422
|
+
React__default.createElement("linearGradient", { id: "paint2_linear_908_35161", x1: "146.5", y1: "61", x2: "146.5", y2: "156", gradientUnits: "userSpaceOnUse" },
|
|
423
|
+
React__default.createElement("stop", { stopColor: "#fff", stopOpacity: ".6" }),
|
|
424
|
+
React__default.createElement("stop", { offset: "1", stopColor: "#fff", stopOpacity: "0" })),
|
|
425
|
+
React__default.createElement("linearGradient", { id: "paint3_linear_908_35161", x1: "178.979", y1: "98.35", x2: "108.338", y2: "98.35", gradientUnits: "userSpaceOnUse" },
|
|
426
|
+
React__default.createElement("stop", { stopColor: "#fff", stopOpacity: "0" }),
|
|
427
|
+
React__default.createElement("stop", { offset: "1", stopColor: "#fff" })))));
|
|
428
|
+
|
|
429
|
+
var SSOStepTypeType;
|
|
430
|
+
(function (SSOStepTypeType) {
|
|
431
|
+
SSOStepTypeType["FIRST"] = "first";
|
|
432
|
+
SSOStepTypeType["EMAIL"] = "email";
|
|
433
|
+
SSOStepTypeType["VERIFY_PHONE"] = "verify_phone";
|
|
434
|
+
SSOStepTypeType["PASSWORD"] = "password";
|
|
435
|
+
SSOStepTypeType["UPDATE_EMAIL"] = "update_email";
|
|
436
|
+
SSOStepTypeType["FORGOT_PASSWORD_PHONE"] = "forgot_password_phone";
|
|
437
|
+
SSOStepTypeType["FORGOT_PASSWORD_SETUP"] = "forgot_password_setup";
|
|
438
|
+
SSOStepTypeType["OTP"] = "otp";
|
|
439
|
+
SSOStepTypeType["SETUP_FULL"] = "setup_full";
|
|
440
|
+
})(SSOStepTypeType || (SSOStepTypeType = {}));
|
|
441
|
+
const SSOStepsContext = createContext({
|
|
442
|
+
currentStepIndex: 0,
|
|
443
|
+
steps: [
|
|
444
|
+
{
|
|
445
|
+
type: SSOStepTypeType.FIRST,
|
|
446
|
+
},
|
|
447
|
+
],
|
|
448
|
+
setSteps: () => false,
|
|
449
|
+
goNext: () => false,
|
|
450
|
+
goBack: () => false,
|
|
451
|
+
addStep: () => false,
|
|
452
|
+
});
|
|
453
|
+
const SSOStepsProvider = ({ children, defaultSteps, }) => {
|
|
454
|
+
const [steps, setSteps] = useState(defaultSteps || [
|
|
455
|
+
{
|
|
456
|
+
type: SSOStepTypeType.FIRST,
|
|
457
|
+
},
|
|
458
|
+
]);
|
|
459
|
+
const [currentStepIndex, setCurrentStepIndex] = useState(0);
|
|
460
|
+
const [shareData, setShareData] = useState({});
|
|
461
|
+
return (React__default.createElement(SSOStepsContext.Provider, { value: {
|
|
462
|
+
currentStepIndex,
|
|
463
|
+
steps,
|
|
464
|
+
setSteps,
|
|
465
|
+
addStep: (step) => {
|
|
466
|
+
setSteps((s) => [...s, step]);
|
|
467
|
+
},
|
|
468
|
+
goNext: () => {
|
|
469
|
+
setCurrentStepIndex((index) => index + 1);
|
|
470
|
+
},
|
|
471
|
+
goBack: () => {
|
|
472
|
+
setCurrentStepIndex((index) => index - 1);
|
|
473
|
+
// remove step when go back
|
|
474
|
+
setSteps((steps) => steps.slice(0, steps.length - 1));
|
|
475
|
+
},
|
|
476
|
+
shareData,
|
|
477
|
+
setShareData,
|
|
478
|
+
} }, children));
|
|
479
|
+
};
|
|
480
|
+
const useSSOSteps = () => {
|
|
481
|
+
return React__default.useContext(SSOStepsContext);
|
|
482
|
+
};
|
|
483
|
+
|
|
484
|
+
const SSOPopupWrapper = ({ children, opened, onClose, }) => {
|
|
485
|
+
var _a;
|
|
486
|
+
const { steps, goBack } = useSSOSteps();
|
|
487
|
+
const { locale } = useSSOState();
|
|
488
|
+
const showBack = steps.length > 1;
|
|
489
|
+
const showClose = steps.length === 1;
|
|
490
|
+
const showLogo = steps.length === 1;
|
|
491
|
+
const logoType = (_a = LOCALE_SPECS[locale]) === null || _a === void 0 ? void 0 : _a.LOGO_TYPE;
|
|
492
|
+
const [closeConfirmOpen, setCloseConfirmOpen] = React__default.useState(false);
|
|
493
|
+
const onCloseClick = () => {
|
|
494
|
+
setCloseConfirmOpen(true);
|
|
495
|
+
};
|
|
496
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
497
|
+
React__default.createElement(Modal, { opened: opened, onClose: onCloseClick, styles: (theme) => ({
|
|
498
|
+
body: {
|
|
499
|
+
display: 'flex',
|
|
500
|
+
flexDirection: 'column',
|
|
501
|
+
gap: 24,
|
|
502
|
+
padding: '36px 24px',
|
|
503
|
+
position: 'relative',
|
|
504
|
+
background: 'linear-gradient(180deg, #A5D4FF 0%, #FFFFFF 150px)',
|
|
505
|
+
overflow: 'auto',
|
|
506
|
+
[theme.fn.smallerThan('sm')]: {
|
|
507
|
+
height: '100%',
|
|
508
|
+
},
|
|
509
|
+
},
|
|
510
|
+
content: {
|
|
511
|
+
[theme.fn.smallerThan('sm')]: {
|
|
512
|
+
width: '100%',
|
|
513
|
+
height: '100%',
|
|
514
|
+
borderRadius: 0,
|
|
515
|
+
maxWidth: '100%',
|
|
516
|
+
maxHeight: '100%',
|
|
517
|
+
},
|
|
518
|
+
},
|
|
519
|
+
inner: {
|
|
520
|
+
[theme.fn.smallerThan('sm')]: {
|
|
521
|
+
padding: 0,
|
|
522
|
+
left: 0,
|
|
523
|
+
right: 0,
|
|
524
|
+
display: 'block',
|
|
525
|
+
},
|
|
526
|
+
},
|
|
527
|
+
}), withCloseButton: false },
|
|
528
|
+
React__default.createElement("div", { style: {
|
|
529
|
+
height: 40,
|
|
530
|
+
display: 'flex',
|
|
531
|
+
alignItems: 'center',
|
|
532
|
+
justifyContent: 'space-between',
|
|
533
|
+
} },
|
|
534
|
+
showBack && (React__default.createElement(Button, { variant: "white", style: {
|
|
165
535
|
width: 40,
|
|
166
536
|
height: 40,
|
|
167
537
|
padding: 8,
|
|
@@ -181,10 +551,11 @@ const SSOPopupWrapper = ({ children, opened, onClose, }) => {
|
|
|
181
551
|
React__default.createElement("div", { style: {
|
|
182
552
|
flex: 1,
|
|
183
553
|
} }, children)),
|
|
184
|
-
React__default.createElement(
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
554
|
+
React__default.createElement(ConfirmClosePopup, { opened: closeConfirmOpen, onCancel: () => setCloseConfirmOpen(false), onClose: () => {
|
|
555
|
+
setCloseConfirmOpen(false);
|
|
556
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
557
|
+
} }),
|
|
558
|
+
React__default.createElement(CollectInfoTextPopup, null)));
|
|
188
559
|
};
|
|
189
560
|
|
|
190
561
|
const SSO_V2_PATHS = {
|
|
@@ -199,12 +570,16 @@ const SSO_V2_PATHS = {
|
|
|
199
570
|
REGISTER_BY_SEND_OTP: 'login/login-with-sms',
|
|
200
571
|
SEND_OTP: 'login/sms/sent-otp',
|
|
201
572
|
VERIFY_BY_OTP: 'login/phone-verify-code',
|
|
202
|
-
LOGIN_BY_PASSWORD: 'member/login-by-phone'
|
|
573
|
+
LOGIN_BY_PASSWORD: 'member/login-by-phone',
|
|
574
|
+
UPDATE_PHONE_SEND_OTP: 'sms-social/sent-otp',
|
|
575
|
+
UPDATE_PHONE_VERIFY_OTP: 'sms-social/phone-verify-code',
|
|
203
576
|
},
|
|
204
577
|
ZALO: {
|
|
205
578
|
REGISTER_BY_SEND_OTP: 'login/login-with-zalo',
|
|
206
579
|
SEND_OTP: 'login/zalo/sent-otp',
|
|
207
|
-
VERIFY_BY_OTP: 'login/zalo-verify-code'
|
|
580
|
+
VERIFY_BY_OTP: 'login/zalo-verify-code',
|
|
581
|
+
UPDATE_PHONE_SEND_OTP: 'sms-social/zalo/sent-otp',
|
|
582
|
+
UPDATE_PHONE_VERIFY_OTP: 'sms-social/zalo-verify-code',
|
|
208
583
|
},
|
|
209
584
|
RESET_PASSWORD: 'login/reset-password',
|
|
210
585
|
CHECK_USER_EXIST: 'member/check-user-exist',
|
|
@@ -226,11 +601,14 @@ const BEARER_TOKEN_COOKIE = 'hhg_user_token';
|
|
|
226
601
|
const fetchSSOV2Api = (path, options = {}, noAuth) => __awaiter(void 0, void 0, void 0, function* () {
|
|
227
602
|
var _a;
|
|
228
603
|
let response;
|
|
229
|
-
const authToken = noAuth
|
|
230
|
-
|
|
231
|
-
|
|
604
|
+
const authToken = noAuth
|
|
605
|
+
? ''
|
|
606
|
+
: (_a = document.cookie
|
|
607
|
+
.split('; ')
|
|
608
|
+
.find((row) => row.startsWith(BEARER_TOKEN_COOKIE))) === null || _a === void 0 ? void 0 : _a.split('=')[1];
|
|
232
609
|
try {
|
|
233
|
-
response = yield fetch(getSSOV2ApiUrl(path), authToken
|
|
610
|
+
response = yield fetch(getSSOV2ApiUrl(path), authToken
|
|
611
|
+
? Object.assign(Object.assign({}, options), { headers: Object.assign({ Authorization: `Bearer ${authToken}` }, options === null || options === void 0 ? void 0 : options.headers) }) : options);
|
|
234
612
|
}
|
|
235
613
|
catch (error) {
|
|
236
614
|
console.error(error);
|
|
@@ -241,11 +619,14 @@ const fetchSSOV2Api = (path, options = {}, noAuth) => __awaiter(void 0, void 0,
|
|
|
241
619
|
const fetchSSOApi = (path, options = {}, noAuth) => __awaiter(void 0, void 0, void 0, function* () {
|
|
242
620
|
var _b;
|
|
243
621
|
let response;
|
|
244
|
-
const authToken = noAuth
|
|
245
|
-
|
|
246
|
-
|
|
622
|
+
const authToken = noAuth
|
|
623
|
+
? ''
|
|
624
|
+
: (_b = document.cookie
|
|
625
|
+
.split('; ')
|
|
626
|
+
.find((row) => row.startsWith(BEARER_TOKEN_COOKIE))) === null || _b === void 0 ? void 0 : _b.split('=')[1];
|
|
247
627
|
try {
|
|
248
|
-
response = yield fetch(getSSOApiUrl(path), authToken
|
|
628
|
+
response = yield fetch(getSSOApiUrl(path), authToken
|
|
629
|
+
? Object.assign(Object.assign({}, options), { headers: Object.assign({ Authorization: `Bearer ${authToken}` }, options === null || options === void 0 ? void 0 : options.headers) }) : options);
|
|
249
630
|
}
|
|
250
631
|
catch (error) {
|
|
251
632
|
console.error(error);
|
|
@@ -254,17 +635,17 @@ const fetchSSOApi = (path, options = {}, noAuth) => __awaiter(void 0, void 0, vo
|
|
|
254
635
|
return response === null || response === void 0 ? void 0 : response.json();
|
|
255
636
|
});
|
|
256
637
|
const resetPassword = (password, confirmPassword) => __awaiter(void 0, void 0, void 0, function* () {
|
|
638
|
+
const formData = new FormData();
|
|
639
|
+
formData.append('password', password);
|
|
640
|
+
formData.append('confirm-password', confirmPassword);
|
|
257
641
|
return fetchSSOV2Api(SSO_V2_PATHS.RESET_PASSWORD, {
|
|
258
642
|
method: 'POST',
|
|
259
|
-
body:
|
|
260
|
-
"password": password,
|
|
261
|
-
"confirm-password": confirmPassword
|
|
262
|
-
}),
|
|
643
|
+
body: formData,
|
|
263
644
|
});
|
|
264
645
|
});
|
|
265
646
|
// "email":"kenny_test2201_11@mailinator.com"
|
|
266
647
|
// "phone_number":"906911910"
|
|
267
|
-
const checkUserExist = ({ email, phone // no +
|
|
648
|
+
const checkUserExist = ({ email, phone, // no +
|
|
268
649
|
}) => __awaiter(void 0, void 0, void 0, function* () {
|
|
269
650
|
// "provider": "email",
|
|
270
651
|
// "is_pass": true,
|
|
@@ -278,7 +659,7 @@ const checkUserExist = ({ email, phone // no +
|
|
|
278
659
|
}
|
|
279
660
|
return fetchSSOV2Api(SSO_V2_PATHS.CHECK_USER_EXIST, {
|
|
280
661
|
method: 'POST',
|
|
281
|
-
body: formData
|
|
662
|
+
body: formData,
|
|
282
663
|
});
|
|
283
664
|
});
|
|
284
665
|
// "name": "Huy Tran 888",
|
|
@@ -286,33 +667,67 @@ const checkUserExist = ({ email, phone // no +
|
|
|
286
667
|
// "email":"kenny_test2201_02@mailinator.com", // optional chỉ require khi source là care | ecom
|
|
287
668
|
// "password": "Kenny2103",
|
|
288
669
|
// "confirm_password":"Kenny2103",
|
|
289
|
-
// "phone_number":"906911912", // require khi user register bằng email hoặc social
|
|
670
|
+
// "phone_number":"906911912", // require khi user register bằng email hoặc social
|
|
290
671
|
// "area_code":"+84", // require khi có phone number
|
|
291
672
|
// "gender": 1,
|
|
292
|
-
// "validate": false, // true validate sau khi validate xong truyền false để update
|
|
673
|
+
// "validate": false, // true validate sau khi validate xong truyền false để update
|
|
293
674
|
// "source": "care" | "ecom" // default sẽ ko require email. nếu source là care sẽ require email. ==> support cho business care
|
|
294
675
|
const updateUserInfo = (data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
295
676
|
const formData = new FormData();
|
|
296
677
|
Object.keys(data).forEach((key) => {
|
|
297
|
-
if (data[key]) {
|
|
678
|
+
if (typeof data[key] !== 'undefined' && data[key] !== null) {
|
|
298
679
|
formData.append(key, data[key]);
|
|
299
680
|
}
|
|
300
681
|
});
|
|
301
682
|
return fetchSSOV2Api(SSO_V2_PATHS.UPDATE_USER_INFO, {
|
|
302
683
|
method: 'POST',
|
|
303
|
-
body: formData
|
|
684
|
+
body: formData,
|
|
685
|
+
});
|
|
686
|
+
});
|
|
687
|
+
const GoogleAuthClientId = isProduction
|
|
688
|
+
? '289442006438-040a42cbidr6v5d178f3iqi9q95821r3.apps.googleusercontent.com'
|
|
689
|
+
: '289442006438-cihobuq1h3r4426pur7u0e43fqdnep59.apps.googleusercontent.com';
|
|
690
|
+
const FacebookAppId = '2759888574045636';
|
|
691
|
+
const getUserInfo = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
692
|
+
return fetchSSOApi('user/profile', {
|
|
693
|
+
method: 'POST',
|
|
304
694
|
});
|
|
305
695
|
});
|
|
306
|
-
const
|
|
307
|
-
|
|
696
|
+
const handleAuthSuccess = (res) => {
|
|
697
|
+
(res === null || res === void 0 ? void 0 : res.token) &&
|
|
698
|
+
setCookie(BEARER_TOKEN_COOKIE, res.token, {
|
|
699
|
+
domain: window.location.hostname === 'localhost'
|
|
700
|
+
? 'localhost'
|
|
701
|
+
: `.${domainLocales[process.env.UNIFY_LOCALE || 'vi-VN']}`,
|
|
702
|
+
expires: new Date(res.expire_in * 1000).toUTCString(),
|
|
703
|
+
});
|
|
704
|
+
(res === null || res === void 0 ? void 0 : res.refresh_token) &&
|
|
705
|
+
setCookie(BEARER_REFRESH_TOKEN_COOKIE, res.refresh_token, {
|
|
706
|
+
domain: window.location.hostname === 'localhost'
|
|
707
|
+
? 'localhost'
|
|
708
|
+
: `.${domainLocales[process.env.UNIFY_LOCALE || 'vi-VN']}`,
|
|
709
|
+
});
|
|
710
|
+
};
|
|
308
711
|
|
|
712
|
+
const loginByEmailPassword = (email, password) => __awaiter(void 0, void 0, void 0, function* () {
|
|
713
|
+
const formData = new FormData();
|
|
714
|
+
formData.append('email', email);
|
|
715
|
+
formData.append('password', password);
|
|
716
|
+
return fetchSSOV2Api(SSO_V2_PATHS.EMAIL.LOGIN_BY_PASSWORD, {
|
|
717
|
+
method: 'POST',
|
|
718
|
+
body: formData,
|
|
719
|
+
headers: {
|
|
720
|
+
Authorization: `Basic aGhnOjEyMzQ1Njc4OUBAIyQhQCQjJSRe`,
|
|
721
|
+
},
|
|
722
|
+
});
|
|
723
|
+
});
|
|
309
724
|
const registerBySendEmailOTP = (email) => __awaiter(void 0, void 0, void 0, function* () {
|
|
310
725
|
const formData = new FormData();
|
|
311
726
|
formData.append('email', email);
|
|
312
727
|
formData.append('website_id', websiteId);
|
|
313
728
|
return fetchSSOV2Api(SSO_V2_PATHS.EMAIL.REGISTER_BY_SEND_OTP, {
|
|
314
729
|
method: 'POST',
|
|
315
|
-
body: formData
|
|
730
|
+
body: formData,
|
|
316
731
|
});
|
|
317
732
|
});
|
|
318
733
|
const resendEmailOTP = (email) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -320,7 +735,7 @@ const resendEmailOTP = (email) => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
320
735
|
formData.append('email', email);
|
|
321
736
|
return fetchSSOV2Api(SSO_V2_PATHS.EMAIL.SEND_OTP, {
|
|
322
737
|
method: 'POST',
|
|
323
|
-
body: formData
|
|
738
|
+
body: formData,
|
|
324
739
|
});
|
|
325
740
|
});
|
|
326
741
|
const verifyByEmailOTP = (email, otpCode) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -329,7 +744,7 @@ const verifyByEmailOTP = (email, otpCode) => __awaiter(void 0, void 0, void 0, f
|
|
|
329
744
|
formData.append('code', otpCode);
|
|
330
745
|
return fetchSSOV2Api(SSO_V2_PATHS.EMAIL.VERIFY_BY_OTP, {
|
|
331
746
|
method: 'POST',
|
|
332
|
-
body: formData
|
|
747
|
+
body: formData,
|
|
333
748
|
});
|
|
334
749
|
});
|
|
335
750
|
|
|
@@ -339,13 +754,12 @@ const SSOEmailScreen = ({ hidden, }) => {
|
|
|
339
754
|
return (React__default.createElement("form", { style: {
|
|
340
755
|
display: hidden ? 'none' : 'block',
|
|
341
756
|
}, onSubmit: (e) => __awaiter(void 0, void 0, void 0, function* () {
|
|
342
|
-
var _a, _b, _c;
|
|
757
|
+
var _a, _b, _c, _d;
|
|
343
758
|
e.preventDefault();
|
|
344
759
|
const email = e.currentTarget.email.value;
|
|
345
760
|
const existRes = yield checkUserExist({ email });
|
|
346
761
|
if ((existRes === null || existRes === void 0 ? void 0 : existRes._status) === 1) {
|
|
347
|
-
if ((
|
|
348
|
-
((_b = existRes._data) === null || _b === void 0 ? void 0 : _b.is_status) === 'Active') {
|
|
762
|
+
if ((_a = existRes._data) === null || _a === void 0 ? void 0 : _a.is_pass) {
|
|
349
763
|
// go to password screen
|
|
350
764
|
addStep({
|
|
351
765
|
type: SSOStepTypeType.PASSWORD,
|
|
@@ -356,20 +770,31 @@ const SSOEmailScreen = ({ hidden, }) => {
|
|
|
356
770
|
goNext();
|
|
357
771
|
}
|
|
358
772
|
else {
|
|
773
|
+
let res;
|
|
774
|
+
if (!((_b = existRes._data) === null || _b === void 0 ? void 0 : _b.provider)) {
|
|
775
|
+
res = yield registerBySendEmailOTP(email);
|
|
776
|
+
}
|
|
777
|
+
else {
|
|
778
|
+
res = yield resendEmailOTP(email);
|
|
779
|
+
}
|
|
780
|
+
if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
|
|
781
|
+
setErrMsg(((_c = res._messages) === null || _c === void 0 ? void 0 : _c[0]) || 'API error');
|
|
782
|
+
return;
|
|
783
|
+
}
|
|
359
784
|
// go to register screen
|
|
360
|
-
registerBySendEmailOTP(email);
|
|
361
785
|
addStep({
|
|
362
786
|
type: SSOStepTypeType.OTP,
|
|
363
787
|
config: {
|
|
364
788
|
email,
|
|
365
789
|
otpType: 'email',
|
|
790
|
+
afterAction: 'setup',
|
|
366
791
|
},
|
|
367
792
|
});
|
|
368
793
|
goNext();
|
|
369
794
|
}
|
|
370
795
|
}
|
|
371
796
|
else {
|
|
372
|
-
setErrMsg(((
|
|
797
|
+
setErrMsg(((_d = existRes._messages) === null || _d === void 0 ? void 0 : _d[0]) || 'api error');
|
|
373
798
|
}
|
|
374
799
|
}) },
|
|
375
800
|
React__default.createElement(Stack, { spacing: 8 },
|
|
@@ -379,19 +804,52 @@ const SSOEmailScreen = ({ hidden, }) => {
|
|
|
379
804
|
React__default.createElement(Button, { type: "submit", size: "lg", variant: "primary", fullWidth: true, mt: 16 }, "Verify Your Email")));
|
|
380
805
|
};
|
|
381
806
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
});
|
|
393
|
-
|
|
394
|
-
|
|
807
|
+
const splitPhone = (phone) => {
|
|
808
|
+
var _a, _b;
|
|
809
|
+
if (!phone)
|
|
810
|
+
return { areaCode: undefined, phoneNumber: undefined };
|
|
811
|
+
let areaCode = '';
|
|
812
|
+
let phoneNumber = phone;
|
|
813
|
+
if (phone.startsWith('+')) {
|
|
814
|
+
areaCode =
|
|
815
|
+
((_a = phone.match(new RegExp(`^\\+(${allAvailableAreaCodes
|
|
816
|
+
.map((c) => c.replace('+', ''))
|
|
817
|
+
.join('|')})`))) === null || _a === void 0 ? void 0 : _a[0]) || '';
|
|
818
|
+
phoneNumber = phone.slice(areaCode.length);
|
|
819
|
+
}
|
|
820
|
+
else {
|
|
821
|
+
areaCode =
|
|
822
|
+
((_b = phone.match(new RegExp(`^(${allAvailableAreaCodes
|
|
823
|
+
.map((c) => c.replace('+', ''))
|
|
824
|
+
.join('|')})`))) === null || _b === void 0 ? void 0 : _b[0]) || '';
|
|
825
|
+
phoneNumber = phone.slice(areaCode.length);
|
|
826
|
+
if (areaCode) {
|
|
827
|
+
areaCode = `+${areaCode}`;
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
return { areaCode, phoneNumber };
|
|
831
|
+
};
|
|
832
|
+
|
|
833
|
+
// "phone_number":"906911910",
|
|
834
|
+
// "password":"Kenny2103!"
|
|
835
|
+
const loginByPhonePassword = (phone, password) => __awaiter(void 0, void 0, void 0, function* () {
|
|
836
|
+
const formData = new FormData();
|
|
837
|
+
let { phoneNumber } = splitPhone(phone);
|
|
838
|
+
phoneNumber = phoneNumber.startsWith('0')
|
|
839
|
+
? phoneNumber.substring(1)
|
|
840
|
+
: phoneNumber;
|
|
841
|
+
formData.append('phone_number', phoneNumber);
|
|
842
|
+
formData.append('password', password);
|
|
843
|
+
return fetchSSOV2Api(SSO_V2_PATHS.PHONE.LOGIN_BY_PASSWORD, {
|
|
844
|
+
method: 'POST',
|
|
845
|
+
body: formData,
|
|
846
|
+
headers: {
|
|
847
|
+
Authorization: 'Basic aGhnOjEyMzQ1Njc4OUBAIyQhQCQjJSRe',
|
|
848
|
+
},
|
|
849
|
+
}, true);
|
|
850
|
+
});
|
|
851
|
+
// "phone_number": "906911910",
|
|
852
|
+
// "area_code":"+84",
|
|
395
853
|
const registerBySendPhoneOTP = (phone, areaCode) => __awaiter(void 0, void 0, void 0, function* () {
|
|
396
854
|
const formData = new FormData();
|
|
397
855
|
formData.append('phone_number', phone);
|
|
@@ -399,7 +857,7 @@ const registerBySendPhoneOTP = (phone, areaCode) => __awaiter(void 0, void 0, vo
|
|
|
399
857
|
formData.append('website_id', websiteId);
|
|
400
858
|
return fetchSSOV2Api(SSO_V2_PATHS.PHONE.REGISTER_BY_SEND_OTP, {
|
|
401
859
|
method: 'POST',
|
|
402
|
-
body: formData
|
|
860
|
+
body: formData,
|
|
403
861
|
});
|
|
404
862
|
});
|
|
405
863
|
// "phone_number": "906911910",
|
|
@@ -410,7 +868,7 @@ const resendPhoneOTP = (phone, areaCode) => __awaiter(void 0, void 0, void 0, fu
|
|
|
410
868
|
formData.append('area_code', areaCode);
|
|
411
869
|
return fetchSSOV2Api(SSO_V2_PATHS.PHONE.SEND_OTP, {
|
|
412
870
|
method: 'POST',
|
|
413
|
-
body: formData
|
|
871
|
+
body: formData,
|
|
414
872
|
});
|
|
415
873
|
});
|
|
416
874
|
// "otp_code":"212616",
|
|
@@ -425,28 +883,26 @@ const verifyByPhoneOTP = (phone, areaCode, otpCode) => __awaiter(void 0, void 0,
|
|
|
425
883
|
method: 'POST',
|
|
426
884
|
body: formData,
|
|
427
885
|
});
|
|
886
|
+
});
|
|
887
|
+
const resendUpdatePhoneOTP = (phone, areaCode) => __awaiter(void 0, void 0, void 0, function* () {
|
|
888
|
+
const formData = new FormData();
|
|
889
|
+
formData.append('phone_number', phone);
|
|
890
|
+
formData.append('area_code', areaCode);
|
|
891
|
+
return fetchSSOV2Api(SSO_V2_PATHS.PHONE.UPDATE_PHONE_SEND_OTP, {
|
|
892
|
+
method: 'POST',
|
|
893
|
+
body: formData,
|
|
894
|
+
});
|
|
895
|
+
});
|
|
896
|
+
const verifyUpdatePhoneOTP = (areaCode, otpCode) => __awaiter(void 0, void 0, void 0, function* () {
|
|
897
|
+
const formData = new FormData();
|
|
898
|
+
formData.append('otp_code', otpCode);
|
|
899
|
+
formData.append('area_code', areaCode);
|
|
900
|
+
return fetchSSOV2Api(SSO_V2_PATHS.PHONE.UPDATE_PHONE_VERIFY_OTP, {
|
|
901
|
+
method: 'POST',
|
|
902
|
+
body: formData,
|
|
903
|
+
});
|
|
428
904
|
});
|
|
429
905
|
|
|
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
906
|
const loginBySocial = (token, social) => __awaiter(void 0, void 0, void 0, function* () {
|
|
451
907
|
const formData = new FormData();
|
|
452
908
|
formData.append('token', token);
|
|
@@ -455,6 +911,9 @@ const loginBySocial = (token, social) => __awaiter(void 0, void 0, void 0, funct
|
|
|
455
911
|
return fetchSSOV2Api(SSO_V2_PATHS.LOGIN_BY_SOCIAL, {
|
|
456
912
|
method: 'POST',
|
|
457
913
|
body: formData,
|
|
914
|
+
headers: {
|
|
915
|
+
Authorization: `Basic aGhnOjEyMzQ1Njc4OUBAIyQhQCQjJSRe`,
|
|
916
|
+
},
|
|
458
917
|
});
|
|
459
918
|
});
|
|
460
919
|
|
|
@@ -478,7 +937,7 @@ const resendZaloOTP = (phone, areaCode) => __awaiter(void 0, void 0, void 0, fun
|
|
|
478
937
|
formData.append('area_code', areaCode);
|
|
479
938
|
return fetchSSOV2Api(SSO_V2_PATHS.ZALO.SEND_OTP, {
|
|
480
939
|
method: 'POST',
|
|
481
|
-
body: formData
|
|
940
|
+
body: formData,
|
|
482
941
|
});
|
|
483
942
|
});
|
|
484
943
|
// "otp_code":"212616",
|
|
@@ -491,10 +950,43 @@ const verifyByZaloOTP = (phone, areaCode, otpCode) => __awaiter(void 0, void 0,
|
|
|
491
950
|
formData.append('area_code', areaCode);
|
|
492
951
|
return fetchSSOV2Api(SSO_V2_PATHS.ZALO.VERIFY_BY_OTP, {
|
|
493
952
|
method: 'POST',
|
|
494
|
-
body: formData
|
|
953
|
+
body: formData,
|
|
954
|
+
});
|
|
955
|
+
});
|
|
956
|
+
const resendUpdatePhoneZaloOTP = (phone, areaCode) => __awaiter(void 0, void 0, void 0, function* () {
|
|
957
|
+
const formData = new FormData();
|
|
958
|
+
formData.append('phone_number', phone);
|
|
959
|
+
formData.append('area_code', areaCode);
|
|
960
|
+
return fetchSSOV2Api(SSO_V2_PATHS.ZALO.UPDATE_PHONE_SEND_OTP, {
|
|
961
|
+
method: 'POST',
|
|
962
|
+
body: formData,
|
|
963
|
+
});
|
|
964
|
+
});
|
|
965
|
+
const verifyUpdatePhoneZaloOTP = (phone, areaCode, otpCode) => __awaiter(void 0, void 0, void 0, function* () {
|
|
966
|
+
const formData = new FormData();
|
|
967
|
+
formData.append('phone_number', phone);
|
|
968
|
+
formData.append('otp_code', otpCode);
|
|
969
|
+
formData.append('area_code', areaCode);
|
|
970
|
+
return fetchSSOV2Api(SSO_V2_PATHS.ZALO.UPDATE_PHONE_VERIFY_OTP, {
|
|
971
|
+
method: 'POST',
|
|
972
|
+
body: formData,
|
|
495
973
|
});
|
|
496
974
|
});
|
|
497
975
|
|
|
976
|
+
const CollectInfoText = () => {
|
|
977
|
+
const { setOpenCollectInfoPopup } = useSSOState();
|
|
978
|
+
return (React__default.createElement(Text, { size: "p4", onClick: () => {
|
|
979
|
+
setOpenCollectInfoPopup(true);
|
|
980
|
+
}, color: "blue.6", style: {
|
|
981
|
+
cursor: 'pointer',
|
|
982
|
+
} },
|
|
983
|
+
React__default.createElement(Info, { size: 16, color: '#2D87F3', style: {
|
|
984
|
+
verticalAlign: 'sub',
|
|
985
|
+
} }),
|
|
986
|
+
' ',
|
|
987
|
+
"Why We Need Your Information?"));
|
|
988
|
+
};
|
|
989
|
+
|
|
498
990
|
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
991
|
React__default.createElement("g", { clipPath: "url(#clip0_869_25628)" },
|
|
500
992
|
React__default.createElement("rect", { width: "24", height: "24", rx: "12", fill: "#00B16A" }),
|
|
@@ -533,31 +1025,30 @@ const SSOFirstScreen = ({ hidden }) => {
|
|
|
533
1025
|
const [phone, setPhone] = React__default.useState('');
|
|
534
1026
|
const [errMsg, setErrMsg] = React__default.useState('');
|
|
535
1027
|
const { locale, onClose } = useSSOState();
|
|
536
|
-
const { addStep, goNext } = useSSOSteps();
|
|
1028
|
+
const { addStep, goNext, setShareData } = useSSOSteps();
|
|
537
1029
|
const handleLoginBySocial = (credential, provider) => __awaiter(void 0, void 0, void 0, function* () {
|
|
538
|
-
var _a, _b, _c, _d
|
|
1030
|
+
var _a, _b, _c, _d;
|
|
539
1031
|
const res = yield loginBySocial(credential, provider);
|
|
540
1032
|
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
541
|
-
|
|
542
|
-
|
|
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');
|
|
1033
|
+
handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
|
|
1034
|
+
const userInfo = yield getUserInfo();
|
|
549
1035
|
if ((userInfo === null || userInfo === void 0 ? void 0 : userInfo._status) === 1) {
|
|
550
|
-
|
|
1036
|
+
setShareData({
|
|
1037
|
+
authMethod: provider,
|
|
1038
|
+
});
|
|
1039
|
+
if ((_a = userInfo._data) === null || _a === void 0 ? void 0 : _a.is_new) {
|
|
1040
|
+
setShareData((a) => (Object.assign(Object.assign({}, a), { authFlow: 'register' })));
|
|
551
1041
|
addStep({
|
|
552
1042
|
type: SSOStepTypeType.SETUP_FULL,
|
|
553
1043
|
config: {
|
|
554
|
-
userInfo,
|
|
1044
|
+
userInfo: userInfo._data,
|
|
555
1045
|
disabledEmail: true,
|
|
556
1046
|
},
|
|
557
1047
|
});
|
|
558
1048
|
goNext();
|
|
559
1049
|
}
|
|
560
|
-
else if (!((
|
|
1050
|
+
else if (!((_b = userInfo._data) === null || _b === void 0 ? void 0 : _b.phone_verified)) {
|
|
1051
|
+
setShareData((a) => (Object.assign(Object.assign({}, a), { authFlow: 'verify-phone' })));
|
|
561
1052
|
addStep({
|
|
562
1053
|
type: SSOStepTypeType.VERIFY_PHONE,
|
|
563
1054
|
});
|
|
@@ -568,11 +1059,11 @@ const SSOFirstScreen = ({ hidden }) => {
|
|
|
568
1059
|
}
|
|
569
1060
|
}
|
|
570
1061
|
else {
|
|
571
|
-
setErrMsg(((
|
|
1062
|
+
setErrMsg(((_c = userInfo === null || userInfo === void 0 ? void 0 : userInfo._messages) === null || _c === void 0 ? void 0 : _c[0]) || 'API error');
|
|
572
1063
|
}
|
|
573
1064
|
}
|
|
574
1065
|
else {
|
|
575
|
-
setErrMsg(((
|
|
1066
|
+
setErrMsg(((_d = res === null || res === void 0 ? void 0 : res._messages) === null || _d === void 0 ? void 0 : _d[0]) || 'API error');
|
|
576
1067
|
}
|
|
577
1068
|
});
|
|
578
1069
|
useEffect(() => {
|
|
@@ -606,64 +1097,101 @@ const SSOFirstScreen = ({ hidden }) => {
|
|
|
606
1097
|
};
|
|
607
1098
|
}, []);
|
|
608
1099
|
const onClickContinueZalo = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
609
|
-
var _f, _g, _h;
|
|
1100
|
+
var _e, _f, _g, _h;
|
|
610
1101
|
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
611
1102
|
const userExist = yield checkUserExist({ phone: phoneNumber });
|
|
612
1103
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
613
|
-
|
|
1104
|
+
setShareData({
|
|
1105
|
+
authMethod: 'phone',
|
|
1106
|
+
});
|
|
1107
|
+
if ((_e = userExist._data) === null || _e === void 0 ? void 0 : _e.is_pass) {
|
|
1108
|
+
setShareData((a) => (Object.assign(Object.assign({}, a), { authFlow: 'login' })));
|
|
614
1109
|
addStep({
|
|
615
1110
|
type: SSOStepTypeType.PASSWORD,
|
|
616
1111
|
config: {
|
|
617
1112
|
phone,
|
|
618
1113
|
},
|
|
619
1114
|
});
|
|
1115
|
+
goNext();
|
|
620
1116
|
}
|
|
621
1117
|
else {
|
|
622
|
-
|
|
1118
|
+
let res;
|
|
1119
|
+
if (!((_f = userExist._data) === null || _f === void 0 ? void 0 : _f.provider)) {
|
|
1120
|
+
res = yield registerBySendZaloOTP(phoneNumber, areaCode);
|
|
1121
|
+
}
|
|
1122
|
+
else {
|
|
1123
|
+
res = yield resendZaloOTP(phoneNumber, areaCode);
|
|
1124
|
+
}
|
|
1125
|
+
if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
|
|
1126
|
+
setErrMsg(((_g = res._messages) === null || _g === void 0 ? void 0 : _g[0]) || 'API error');
|
|
1127
|
+
return;
|
|
1128
|
+
}
|
|
1129
|
+
setShareData((a) => (Object.assign(Object.assign({}, a), { authFlow: 'register' })));
|
|
623
1130
|
addStep({
|
|
624
1131
|
type: SSOStepTypeType.OTP,
|
|
625
1132
|
config: {
|
|
626
1133
|
phone,
|
|
627
1134
|
otpType: 'phone-zalo',
|
|
1135
|
+
afterAction: 'setup',
|
|
628
1136
|
},
|
|
629
1137
|
});
|
|
1138
|
+
goNext();
|
|
630
1139
|
}
|
|
631
|
-
goNext();
|
|
632
1140
|
}
|
|
633
1141
|
else {
|
|
634
1142
|
setErrMsg(((_h = userExist === null || userExist === void 0 ? void 0 : userExist._messages) === null || _h === void 0 ? void 0 : _h[0]) || 'API error');
|
|
635
1143
|
}
|
|
636
1144
|
});
|
|
637
1145
|
const onClickContinuePhone = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
638
|
-
var _j, _k, _l;
|
|
1146
|
+
var _j, _k, _l, _m;
|
|
639
1147
|
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
640
1148
|
const userExist = yield checkUserExist({ phone: phoneNumber });
|
|
641
1149
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
642
|
-
|
|
1150
|
+
setShareData({
|
|
1151
|
+
authMethod: 'phone',
|
|
1152
|
+
});
|
|
1153
|
+
if ((_j = userExist._data) === null || _j === void 0 ? void 0 : _j.is_pass) {
|
|
1154
|
+
setShareData((a) => (Object.assign(Object.assign({}, a), { authFlow: 'login' })));
|
|
643
1155
|
addStep({
|
|
644
1156
|
type: SSOStepTypeType.PASSWORD,
|
|
645
1157
|
config: {
|
|
646
1158
|
phone,
|
|
647
1159
|
},
|
|
648
1160
|
});
|
|
1161
|
+
goNext();
|
|
649
1162
|
}
|
|
650
1163
|
else {
|
|
651
|
-
|
|
1164
|
+
let res;
|
|
1165
|
+
if (!((_k = userExist._data) === null || _k === void 0 ? void 0 : _k.provider)) {
|
|
1166
|
+
res = yield registerBySendPhoneOTP(phoneNumber, areaCode);
|
|
1167
|
+
}
|
|
1168
|
+
else {
|
|
1169
|
+
res = yield resendPhoneOTP(phoneNumber, areaCode);
|
|
1170
|
+
}
|
|
1171
|
+
if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
|
|
1172
|
+
setErrMsg(((_l = res._messages) === null || _l === void 0 ? void 0 : _l[0]) || 'API error');
|
|
1173
|
+
return;
|
|
1174
|
+
}
|
|
1175
|
+
setShareData((a) => (Object.assign(Object.assign({}, a), { authFlow: 'register' })));
|
|
652
1176
|
addStep({
|
|
653
1177
|
type: SSOStepTypeType.OTP,
|
|
654
1178
|
config: {
|
|
655
1179
|
phone,
|
|
656
1180
|
otpType: 'phone-sms',
|
|
1181
|
+
afterAction: 'setup',
|
|
657
1182
|
},
|
|
658
1183
|
});
|
|
1184
|
+
goNext();
|
|
659
1185
|
}
|
|
660
|
-
goNext();
|
|
661
1186
|
}
|
|
662
1187
|
else {
|
|
663
|
-
setErrMsg(((
|
|
1188
|
+
setErrMsg(((_m = userExist === null || userExist === void 0 ? void 0 : userExist._messages) === null || _m === void 0 ? void 0 : _m[0]) || 'API error');
|
|
664
1189
|
}
|
|
665
1190
|
});
|
|
666
1191
|
const onClickEmail = () => {
|
|
1192
|
+
setShareData({
|
|
1193
|
+
authMethod: 'mail',
|
|
1194
|
+
});
|
|
667
1195
|
addStep({
|
|
668
1196
|
type: SSOStepTypeType.EMAIL,
|
|
669
1197
|
});
|
|
@@ -744,12 +1272,7 @@ const SSOFirstScreen = ({ hidden }) => {
|
|
|
744
1272
|
marginTop: 'auto',
|
|
745
1273
|
},
|
|
746
1274
|
}) },
|
|
747
|
-
React__default.createElement(
|
|
748
|
-
React__default.createElement(Info, { size: 16, color: theme.colors.primaryBase, style: {
|
|
749
|
-
verticalAlign: 'sub',
|
|
750
|
-
} }),
|
|
751
|
-
' ',
|
|
752
|
-
"Why We Need Your Information?"),
|
|
1275
|
+
React__default.createElement(CollectInfoText, null),
|
|
753
1276
|
React__default.createElement(Text, { size: "p5", color: "gray.6" },
|
|
754
1277
|
"By tapping continue, I confirm that I have read, understand and agree to the",
|
|
755
1278
|
' ',
|
|
@@ -769,33 +1292,90 @@ const SSOFirstScreen = ({ hidden }) => {
|
|
|
769
1292
|
};
|
|
770
1293
|
|
|
771
1294
|
const SSOOTPScreen = ({ hidden, index, }) => {
|
|
1295
|
+
const { onClose } = useSSOState();
|
|
772
1296
|
const { steps, setSteps, addStep, goNext } = useSSOSteps();
|
|
773
1297
|
const [otp, setOtp] = React__default.useState('');
|
|
774
1298
|
const [error, setError] = React__default.useState('');
|
|
775
1299
|
const currentStepIndex = index;
|
|
776
1300
|
const currentStep = steps[currentStepIndex];
|
|
777
|
-
const { phone, email, otpType,
|
|
1301
|
+
const { phone, email, otpType, isUpdatePhone, afterAction, setupData } = currentStep.config;
|
|
778
1302
|
const isEmail = otpType === 'email';
|
|
779
1303
|
const sendOTPCode = (checkResend) => {
|
|
780
1304
|
if (checkResend && resendTime > 0)
|
|
781
1305
|
return;
|
|
782
1306
|
// send otp code logic here
|
|
783
1307
|
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
784
|
-
if (
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
1308
|
+
if (isUpdatePhone) {
|
|
1309
|
+
if (otpType === 'phone-sms') {
|
|
1310
|
+
resendUpdatePhoneOTP(phoneNumber, areaCode);
|
|
1311
|
+
}
|
|
1312
|
+
else if (otpType === 'phone-zalo') {
|
|
1313
|
+
resendUpdatePhoneZaloOTP(phoneNumber, areaCode);
|
|
1314
|
+
}
|
|
789
1315
|
}
|
|
790
|
-
else
|
|
791
|
-
|
|
1316
|
+
else {
|
|
1317
|
+
if (otpType === 'phone-sms') {
|
|
1318
|
+
resendPhoneOTP(phoneNumber, areaCode);
|
|
1319
|
+
}
|
|
1320
|
+
else if (otpType === 'phone-zalo') {
|
|
1321
|
+
resendZaloOTP(phoneNumber, areaCode);
|
|
1322
|
+
}
|
|
1323
|
+
else if (otpType === 'email') {
|
|
1324
|
+
resendEmailOTP(email);
|
|
1325
|
+
}
|
|
792
1326
|
}
|
|
793
1327
|
setupResendTimer();
|
|
794
1328
|
};
|
|
795
1329
|
const submitOtp = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
796
|
-
var _a, _b;
|
|
1330
|
+
var _a, _b, _c, _d, _e;
|
|
797
1331
|
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
798
1332
|
// submit otp code logic here
|
|
1333
|
+
if (isUpdatePhone) {
|
|
1334
|
+
let res;
|
|
1335
|
+
if (otpType === 'phone-sms') {
|
|
1336
|
+
res = yield verifyUpdatePhoneOTP(areaCode, otp);
|
|
1337
|
+
}
|
|
1338
|
+
else if (otpType === 'phone-zalo') {
|
|
1339
|
+
res = yield verifyUpdatePhoneZaloOTP(phoneNumber, areaCode, otp);
|
|
1340
|
+
}
|
|
1341
|
+
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
1342
|
+
if (afterAction === 'setup') {
|
|
1343
|
+
const userInfo = yield getUserInfo();
|
|
1344
|
+
if ((userInfo === null || userInfo === void 0 ? void 0 : userInfo._status) !== 1) {
|
|
1345
|
+
// log error
|
|
1346
|
+
setError(((_a = userInfo._messages) === null || _a === void 0 ? void 0 : _a[0]) || 'API error');
|
|
1347
|
+
return;
|
|
1348
|
+
}
|
|
1349
|
+
addStep({
|
|
1350
|
+
type: SSOStepTypeType.SETUP_FULL,
|
|
1351
|
+
config: {
|
|
1352
|
+
phone,
|
|
1353
|
+
userInfo: userInfo === null || userInfo === void 0 ? void 0 : userInfo._data,
|
|
1354
|
+
},
|
|
1355
|
+
});
|
|
1356
|
+
goNext();
|
|
1357
|
+
}
|
|
1358
|
+
else if (afterAction === 'submitSetup') {
|
|
1359
|
+
const res = yield updateUserInfo(Object.assign(Object.assign({}, setupData), { validate: '' }));
|
|
1360
|
+
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
1361
|
+
handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
|
|
1362
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
1363
|
+
}
|
|
1364
|
+
else {
|
|
1365
|
+
// log error
|
|
1366
|
+
setError(((_b = res._messages) === null || _b === void 0 ? void 0 : _b[0]) || 'API error');
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
else {
|
|
1370
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
else {
|
|
1374
|
+
// log error
|
|
1375
|
+
setError(((_c = res._messages) === null || _c === void 0 ? void 0 : _c[0]) || 'API error');
|
|
1376
|
+
}
|
|
1377
|
+
return;
|
|
1378
|
+
}
|
|
799
1379
|
let res;
|
|
800
1380
|
if (otpType === 'phone-sms') {
|
|
801
1381
|
res = yield verifyByPhoneOTP(phoneNumber, areaCode, otp);
|
|
@@ -809,31 +1389,36 @@ const SSOOTPScreen = ({ hidden, index, }) => {
|
|
|
809
1389
|
if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
|
|
810
1390
|
setOtp('');
|
|
811
1391
|
// log error
|
|
812
|
-
setError(((
|
|
1392
|
+
setError(((_d = res._messages) === null || _d === void 0 ? void 0 : _d[0]) || 'API error');
|
|
813
1393
|
return;
|
|
814
1394
|
}
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
? 'localhost'
|
|
818
|
-
: `.${domainLocales[process.env.UNIFY_LOCALE || 'vi-VN']}`,
|
|
819
|
-
expires: new Date(res._data.expire_in * 1000).toUTCString(),
|
|
820
|
-
});
|
|
821
|
-
if (isForgot) {
|
|
1395
|
+
handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
|
|
1396
|
+
if (afterAction === 'forgot') {
|
|
822
1397
|
addStep({
|
|
823
1398
|
type: SSOStepTypeType.FORGOT_PASSWORD_SETUP,
|
|
824
1399
|
});
|
|
1400
|
+
goNext();
|
|
825
1401
|
}
|
|
826
|
-
else {
|
|
827
|
-
const userInfo = yield
|
|
1402
|
+
else if (afterAction === 'setup') {
|
|
1403
|
+
const userInfo = yield getUserInfo();
|
|
1404
|
+
if ((userInfo === null || userInfo === void 0 ? void 0 : userInfo._status) !== 1) {
|
|
1405
|
+
// log error
|
|
1406
|
+
setError(((_e = userInfo._messages) === null || _e === void 0 ? void 0 : _e[0]) || 'API error');
|
|
1407
|
+
return;
|
|
1408
|
+
}
|
|
828
1409
|
addStep({
|
|
829
1410
|
type: SSOStepTypeType.SETUP_FULL,
|
|
830
1411
|
config: {
|
|
831
|
-
|
|
1412
|
+
phone,
|
|
1413
|
+
userInfo: userInfo === null || userInfo === void 0 ? void 0 : userInfo._data,
|
|
832
1414
|
disabledEmail: isEmail,
|
|
833
1415
|
},
|
|
834
1416
|
});
|
|
1417
|
+
goNext();
|
|
1418
|
+
}
|
|
1419
|
+
else {
|
|
1420
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
835
1421
|
}
|
|
836
|
-
goNext();
|
|
837
1422
|
});
|
|
838
1423
|
const swapZaloSms = () => {
|
|
839
1424
|
if (isEmail)
|
|
@@ -841,15 +1426,16 @@ const SSOOTPScreen = ({ hidden, index, }) => {
|
|
|
841
1426
|
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
842
1427
|
const newType = otpType === 'phone-sms' ? 'phone-zalo' : 'phone-sms';
|
|
843
1428
|
if (newType === 'phone-sms') {
|
|
844
|
-
|
|
1429
|
+
resendPhoneOTP(phoneNumber, areaCode);
|
|
845
1430
|
}
|
|
846
1431
|
else {
|
|
847
|
-
|
|
1432
|
+
resendZaloOTP(phoneNumber, areaCode);
|
|
848
1433
|
}
|
|
849
1434
|
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
1435
|
};
|
|
851
1436
|
const [resendTime, setResendTime] = React__default.useState(30);
|
|
852
1437
|
const setupResendTimer = () => {
|
|
1438
|
+
setResendTime(30);
|
|
853
1439
|
const countdown = () => {
|
|
854
1440
|
setResendTime((t) => {
|
|
855
1441
|
if (t - 1 > 0) {
|
|
@@ -863,11 +1449,14 @@ const SSOOTPScreen = ({ hidden, index, }) => {
|
|
|
863
1449
|
useEffect(() => {
|
|
864
1450
|
setupResendTimer();
|
|
865
1451
|
}, []);
|
|
866
|
-
return (React__default.createElement("
|
|
1452
|
+
return (React__default.createElement("form", { style: {
|
|
867
1453
|
display: hidden ? 'none' : 'block',
|
|
1454
|
+
}, onSubmit: (e) => {
|
|
1455
|
+
e.preventDefault();
|
|
1456
|
+
submitOtp();
|
|
868
1457
|
} },
|
|
869
1458
|
React__default.createElement(Stack, { spacing: 8 },
|
|
870
|
-
React__default.createElement(Text, { size: "s1", weight: "semiBold" },
|
|
1459
|
+
React__default.createElement(Text, { size: "s1", weight: "semiBold" }, isEmail ? 'Verify Email' : 'Verify Phone Number'),
|
|
871
1460
|
React__default.createElement(Text, { size: "p4" }, isEmail ? (React__default.createElement(React__default.Fragment, null,
|
|
872
1461
|
"Enter the 6-digit OTP sent to your email ",
|
|
873
1462
|
React__default.createElement("b", null, email),
|
|
@@ -886,415 +1475,210 @@ const SSOOTPScreen = ({ hidden, index, }) => {
|
|
|
886
1475
|
height: 40,
|
|
887
1476
|
} },
|
|
888
1477
|
React__default.createElement(Text, { size: "p4" }, "Didn\u2019t receive the code?"),
|
|
889
|
-
React__default.createElement(Text, {
|
|
1478
|
+
React__default.createElement(Text, { style: {
|
|
1479
|
+
pointerEvents: resendTime > 0 ? 'none' : 'auto',
|
|
1480
|
+
cursor: resendTime > 0 ? 'not-allowed' : 'pointer',
|
|
1481
|
+
}, size: "s4", color: "blue.6", onClick: () => sendOTPCode(true) },
|
|
890
1482
|
"Resend (",
|
|
891
1483
|
resendTime,
|
|
892
1484
|
")"))),
|
|
893
|
-
React__default.createElement(Button, { size: "lg", variant: "primary", mt: 12,
|
|
1485
|
+
React__default.createElement(Button, { type: "submit", size: "lg", variant: "primary", mt: 12, fullWidth: true }, "Continue"),
|
|
894
1486
|
!isEmail && (React__default.createElement(Button, { size: "lg", variant: "tertiary", mt: 12, onClick: swapZaloSms, fullWidth: true },
|
|
895
1487
|
"Send OTP Code via ",
|
|
896
1488
|
otpType === 'phone-sms' ? 'Zalo App' : 'SMS'))));
|
|
897
1489
|
};
|
|
898
1490
|
|
|
899
1491
|
const SSOPasswordScreen = ({ hidden, index, }) => {
|
|
900
|
-
var _a;
|
|
1492
|
+
var _a, _b;
|
|
1493
|
+
const { onClose } = useSSOState();
|
|
901
1494
|
const [errMsg, setErrMsg] = React__default.useState('');
|
|
902
1495
|
const { steps, addStep, goNext } = useSSOSteps();
|
|
903
|
-
const resetPassword = () => {
|
|
904
|
-
addStep({
|
|
905
|
-
type: SSOStepTypeType.FORGOT_PASSWORD_PHONE,
|
|
906
|
-
});
|
|
907
|
-
goNext();
|
|
908
|
-
};
|
|
909
1496
|
const thisStep = steps[index];
|
|
910
1497
|
const phone = (_a = thisStep === null || thisStep === void 0 ? void 0 : thisStep.config) === null || _a === void 0 ? void 0 : _a.phone;
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
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);
|
|
1498
|
+
const email = (_b = thisStep === null || thisStep === void 0 ? void 0 : thisStep.config) === null || _b === void 0 ? void 0 : _b.email;
|
|
1499
|
+
const resetPassword = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
1500
|
+
var _c, _d;
|
|
1501
|
+
if (phone) {
|
|
980
1502
|
addStep({
|
|
981
|
-
type: SSOStepTypeType.
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
};
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
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);
|
|
1503
|
+
type: SSOStepTypeType.FORGOT_PASSWORD_PHONE,
|
|
1504
|
+
});
|
|
1505
|
+
}
|
|
1506
|
+
else {
|
|
1507
|
+
const existRes = yield checkUserExist({ email });
|
|
1508
|
+
if ((existRes === null || existRes === void 0 ? void 0 : existRes._status) === 1) {
|
|
1509
|
+
let res;
|
|
1510
|
+
if (!((_c = existRes._data) === null || _c === void 0 ? void 0 : _c.provider)) {
|
|
1511
|
+
res = yield registerBySendEmailOTP(email);
|
|
1512
|
+
}
|
|
1513
|
+
else {
|
|
1514
|
+
res = yield resendEmailOTP(email);
|
|
1515
|
+
}
|
|
1516
|
+
if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
|
|
1517
|
+
setErrMsg(((_d = res._messages) === null || _d === void 0 ? void 0 : _d[0]) || 'API error');
|
|
1518
|
+
return;
|
|
1519
|
+
}
|
|
1520
|
+
addStep({
|
|
1521
|
+
type: SSOStepTypeType.OTP,
|
|
1522
|
+
config: {
|
|
1523
|
+
email,
|
|
1524
|
+
otpType: 'email',
|
|
1525
|
+
afterAction: 'forgot',
|
|
1526
|
+
},
|
|
1527
|
+
});
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
goNext();
|
|
1531
|
+
});
|
|
1532
|
+
return (React__default.createElement("form", { style: {
|
|
1533
|
+
display: hidden ? 'none' : 'block',
|
|
1534
|
+
}, onSubmit: (e) => {
|
|
1535
|
+
e.preventDefault();
|
|
1536
|
+
const password = e.currentTarget.password.value;
|
|
1537
|
+
// call api to login with email and password, if fail then show error
|
|
1538
|
+
if (phone) {
|
|
1539
|
+
loginByPhonePassword(phone, password)
|
|
1540
|
+
.then((res) => {
|
|
1541
|
+
var _a;
|
|
1542
|
+
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
1543
|
+
handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
|
|
1544
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
1232
1545
|
}
|
|
1233
1546
|
else {
|
|
1234
|
-
|
|
1547
|
+
setErrMsg(((_a = res === null || res === void 0 ? void 0 : res._messages) === null || _a === void 0 ? void 0 : _a[0]) || 'API error');
|
|
1235
1548
|
}
|
|
1236
|
-
}
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1549
|
+
})
|
|
1550
|
+
.catch(() => {
|
|
1551
|
+
setErrMsg('api error');
|
|
1552
|
+
});
|
|
1553
|
+
}
|
|
1554
|
+
else {
|
|
1555
|
+
loginByEmailPassword(email, password)
|
|
1556
|
+
.then((res) => {
|
|
1557
|
+
var _a;
|
|
1558
|
+
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
1559
|
+
handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
|
|
1560
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
1248
1561
|
}
|
|
1249
1562
|
else {
|
|
1250
|
-
|
|
1563
|
+
setErrMsg(((_a = res === null || res === void 0 ? void 0 : res._messages) === null || _a === void 0 ? void 0 : _a[0]) || 'API error');
|
|
1251
1564
|
}
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
React__default.createElement(
|
|
1565
|
+
})
|
|
1566
|
+
.catch(() => {
|
|
1567
|
+
setErrMsg('api error');
|
|
1568
|
+
});
|
|
1569
|
+
}
|
|
1570
|
+
} },
|
|
1571
|
+
React__default.createElement(Stack, { spacing: 8 },
|
|
1572
|
+
React__default.createElement(Text, { size: "s1", weight: "semiBold" },
|
|
1573
|
+
"Welcome back!",
|
|
1574
|
+
React__default.createElement("br", null),
|
|
1575
|
+
"Enter your password"),
|
|
1576
|
+
React__default.createElement(Text, { size: "p4" }, "\u0110\u0103ng nh\u1EADp b\u1EB1ng m\u1EADt kh\u1EA9u c\u1EE7a b\u1EA1n.")),
|
|
1577
|
+
React__default.createElement(Stack, { mt: 24, spacing: 8 },
|
|
1578
|
+
React__default.createElement(PasswordInput, { name: "password", placeholder: "Nh\u1EADp m\u1EADt kh\u1EA9u", error: errMsg || undefined }),
|
|
1579
|
+
React__default.createElement(Group, { spacing: 8, align: "center", style: {
|
|
1260
1580
|
height: 40,
|
|
1261
1581
|
} },
|
|
1262
|
-
React__default.createElement(
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1582
|
+
React__default.createElement(Text, { size: "p4" }, "Forgot Password?"),
|
|
1583
|
+
React__default.createElement(Text, { size: "s4", color: "blue.6", style: {
|
|
1584
|
+
cursor: 'pointer',
|
|
1585
|
+
}, onClick: resetPassword }, "Reset"))),
|
|
1586
|
+
React__default.createElement(Button, { type: "submit", size: "lg", variant: "primary", mt: 12, fullWidth: true }, "Sign In")));
|
|
1587
|
+
};
|
|
1588
|
+
|
|
1589
|
+
const SSOPasswordForgotPhone = ({ hidden, }) => {
|
|
1590
|
+
const [phone, setPhone] = React__default.useState('');
|
|
1591
|
+
const [errMsg, setErrMsg] = React__default.useState('');
|
|
1592
|
+
const { locale } = useSSOState();
|
|
1593
|
+
const { addStep, goNext, setShareData } = useSSOSteps();
|
|
1594
|
+
const onClickContinueZalo = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
1595
|
+
var _a, _b, _c;
|
|
1596
|
+
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
1597
|
+
const userExist = yield checkUserExist({ phone: phoneNumber });
|
|
1598
|
+
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
1599
|
+
setShareData({
|
|
1600
|
+
authMethod: 'phone',
|
|
1601
|
+
});
|
|
1602
|
+
let res;
|
|
1603
|
+
if (!((_a = userExist._data) === null || _a === void 0 ? void 0 : _a.provider)) {
|
|
1604
|
+
res = yield registerBySendZaloOTP(phoneNumber, areaCode);
|
|
1605
|
+
}
|
|
1606
|
+
else {
|
|
1607
|
+
res = yield resendZaloOTP(phoneNumber, areaCode);
|
|
1608
|
+
}
|
|
1609
|
+
if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
|
|
1610
|
+
setErrMsg(((_b = res._messages) === null || _b === void 0 ? void 0 : _b[0]) || 'API error');
|
|
1611
|
+
return;
|
|
1612
|
+
}
|
|
1613
|
+
setShareData((a) => (Object.assign(Object.assign({}, a), { authFlow: 'register' })));
|
|
1614
|
+
addStep({
|
|
1615
|
+
type: SSOStepTypeType.OTP,
|
|
1616
|
+
config: {
|
|
1617
|
+
phone,
|
|
1618
|
+
otpType: 'phone-zalo',
|
|
1619
|
+
afterAction: 'forgot',
|
|
1620
|
+
},
|
|
1621
|
+
});
|
|
1622
|
+
goNext();
|
|
1623
|
+
}
|
|
1624
|
+
else {
|
|
1625
|
+
setErrMsg(((_c = userExist === null || userExist === void 0 ? void 0 : userExist._messages) === null || _c === void 0 ? void 0 : _c[0]) || 'API error');
|
|
1626
|
+
}
|
|
1627
|
+
});
|
|
1628
|
+
const onClickContinuePhone = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
1629
|
+
var _d, _e, _f;
|
|
1630
|
+
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
1631
|
+
const userExist = yield checkUserExist({ phone: phoneNumber });
|
|
1632
|
+
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
1633
|
+
setShareData({
|
|
1634
|
+
authMethod: 'phone',
|
|
1635
|
+
});
|
|
1636
|
+
let res;
|
|
1637
|
+
if (!((_d = userExist._data) === null || _d === void 0 ? void 0 : _d.provider)) {
|
|
1638
|
+
res = yield registerBySendPhoneOTP(phoneNumber, areaCode);
|
|
1639
|
+
}
|
|
1640
|
+
else {
|
|
1641
|
+
res = yield resendPhoneOTP(phoneNumber, areaCode);
|
|
1642
|
+
}
|
|
1643
|
+
if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
|
|
1644
|
+
setErrMsg(((_e = res._messages) === null || _e === void 0 ? void 0 : _e[0]) || 'API error');
|
|
1645
|
+
return;
|
|
1646
|
+
}
|
|
1647
|
+
setShareData((a) => (Object.assign(Object.assign({}, a), { authFlow: 'register' })));
|
|
1648
|
+
addStep({
|
|
1649
|
+
type: SSOStepTypeType.OTP,
|
|
1650
|
+
config: {
|
|
1651
|
+
phone,
|
|
1652
|
+
otpType: 'phone-sms',
|
|
1653
|
+
afterAction: 'forgot',
|
|
1654
|
+
},
|
|
1655
|
+
});
|
|
1656
|
+
goNext();
|
|
1657
|
+
}
|
|
1658
|
+
else {
|
|
1659
|
+
setErrMsg(((_f = userExist === null || userExist === void 0 ? void 0 : userExist._messages) === null || _f === void 0 ? void 0 : _f[0]) || 'API error');
|
|
1660
|
+
}
|
|
1661
|
+
});
|
|
1662
|
+
return (React__default.createElement("div", { style: {
|
|
1663
|
+
display: hidden ? 'none' : 'block',
|
|
1664
|
+
} },
|
|
1665
|
+
React__default.createElement(Stack, { spacing: 8 },
|
|
1666
|
+
React__default.createElement(Text, { size: "s1", weight: "semiBold" }, "Reset password"),
|
|
1667
|
+
React__default.createElement(Text, { size: "p4" }, "Please provide the phone number you used to create your account.")),
|
|
1668
|
+
React__default.createElement(Stack, { mt: 24, spacing: 16 },
|
|
1669
|
+
React__default.createElement(StyledPhone, { defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: phone, onChange: (value) => setPhone(value), isError: !!errMsg, required: true }),
|
|
1670
|
+
errMsg && (React__default.createElement(Text, { size: "label2", color: "red.6", mt: -12 }, errMsg)),
|
|
1671
|
+
React__default.createElement(Button, { size: "lg", variant: "primary", onClick: onClickContinueZalo }, "Continue with Zalo"),
|
|
1672
|
+
React__default.createElement(Button, { size: "lg", variant: "secondary", onClick: onClickContinuePhone }, "Continue with SMS"))));
|
|
1296
1673
|
};
|
|
1297
1674
|
|
|
1675
|
+
const CheckGrayIcon = () => (React__default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
1676
|
+
React__default.createElement("path", { d: "M7.053 9.43 5.505 7.883a.48.48 0 0 0-.349-.142.47.47 0 0 0-.354.142.48.48 0 0 0-.145.351q0 .207.145.352l1.83 1.83q.18.18.421.18.24 0 .422-.18l3.709-3.71a.48.48 0 0 0 .142-.348.47.47 0 0 0-.142-.354.48.48 0 0 0-.351-.145.48.48 0 0 0-.352.145zm.948 4.903a6.2 6.2 0 0 1-2.47-.498 6.4 6.4 0 0 1-2.012-1.354 6.4 6.4 0 0 1-1.354-2.01A6.2 6.2 0 0 1 1.666 8q0-1.315.499-2.47a6.4 6.4 0 0 1 1.353-2.01 6.4 6.4 0 0 1 2.01-1.354 6.2 6.2 0 0 1 2.47-.5q1.314 0 2.47.5 1.157.498 2.012 1.353t1.354 2.01q.498 1.156.499 2.47 0 1.314-.499 2.47a6.4 6.4 0 0 1-1.354 2.011 6.4 6.4 0 0 1-2.01 1.355 6.2 6.2 0 0 1-2.47.498m-.002-1q2.234 0 3.784-1.55T13.333 8t-1.55-3.783-3.784-1.55-3.783 1.55T2.666 8t1.55 3.783 3.783 1.55", fill: "#8C8C8C" })));
|
|
1677
|
+
const CheckGreenIcon = () => (React__default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
1678
|
+
React__default.createElement("path", { d: "M7.053 9.43 5.505 7.883a.48.48 0 0 0-.349-.142.47.47 0 0 0-.354.142.48.48 0 0 0-.145.351q0 .207.145.352l1.83 1.83q.18.18.421.18.24 0 .422-.18l3.709-3.71a.48.48 0 0 0 .142-.348.47.47 0 0 0-.142-.354.48.48 0 0 0-.351-.145.48.48 0 0 0-.352.145zm.948 4.903a6.2 6.2 0 0 1-2.47-.498 6.4 6.4 0 0 1-2.012-1.354 6.4 6.4 0 0 1-1.354-2.01A6.2 6.2 0 0 1 1.666 8q0-1.315.499-2.47a6.4 6.4 0 0 1 1.353-2.01 6.4 6.4 0 0 1 2.01-1.354 6.2 6.2 0 0 1 2.47-.5q1.314 0 2.47.5 1.157.498 2.012 1.353t1.354 2.01q.498 1.156.499 2.47 0 1.314-.499 2.47a6.4 6.4 0 0 1-1.354 2.011 6.4 6.4 0 0 1-2.01 1.355 6.2 6.2 0 0 1-2.47.498", fill: "#00B16A" })));
|
|
1679
|
+
const CheckRedIcon = () => (React__default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
1680
|
+
React__default.createElement("path", { d: "m8.001 8.703 2.049 2.048q.138.14.348.142a.47.47 0 0 0 .355-.142.48.48 0 0 0 .145-.35.48.48 0 0 0-.145-.352L8.703 8l2.05-2.049a.48.48 0 0 0 .141-.348.47.47 0 0 0-.141-.354.48.48 0 0 0-.352-.145.48.48 0 0 0-.351.145L8.001 7.298l-2.048-2.05a.48.48 0 0 0-.349-.14.47.47 0 0 0-.354.14.48.48 0 0 0-.145.352q0 .207.145.351l2.049 2.05-2.049 2.048a.48.48 0 0 0-.142.348.47.47 0 0 0 .142.354.48.48 0 0 0 .351.145.48.48 0 0 0 .352-.145zm.001 5.63a6.2 6.2 0 0 1-2.47-.498 6.4 6.4 0 0 1-2.011-1.354 6.4 6.4 0 0 1-1.354-2.01A6.2 6.2 0 0 1 1.668 8q0-1.315.499-2.47A6.4 6.4 0 0 1 3.52 3.52a6.4 6.4 0 0 1 2.01-1.354 6.2 6.2 0 0 1 2.47-.5q1.314 0 2.47.5 1.156.498 2.012 1.353.855.855 1.354 2.01.499 1.156.499 2.47t-.499 2.47a6.4 6.4 0 0 1-1.354 2.011 6.4 6.4 0 0 1-2.01 1.355 6.2 6.2 0 0 1-2.47.498", fill: "#F44D2C" })));
|
|
1681
|
+
|
|
1298
1682
|
const SSOPasswordWithConfirm = (_a) => {
|
|
1299
1683
|
var { form } = _a, props = __rest(_a, ["form"]);
|
|
1300
1684
|
const [atLeast8Chars, setAtLeast8Chars] = React__default.useState(undefined);
|
|
@@ -1304,31 +1688,32 @@ const SSOPasswordWithConfirm = (_a) => {
|
|
|
1304
1688
|
if (typeof password === 'undefined')
|
|
1305
1689
|
return;
|
|
1306
1690
|
setAtLeast8Chars(password.length >= 8);
|
|
1307
|
-
setAtLeastOneUpper(!!password.match(
|
|
1691
|
+
setAtLeastOneUpper(!!password.match(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/));
|
|
1308
1692
|
}, [password]);
|
|
1309
1693
|
return (React__default.createElement(Stack, Object.assign({ spacing: 12 }, props),
|
|
1310
1694
|
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
1695
|
React__default.createElement(Stack, { spacing: 8 },
|
|
1312
1696
|
React__default.createElement(Text, { size: "n1" },
|
|
1313
|
-
atLeast8Chars ? (React__default.createElement(
|
|
1697
|
+
atLeast8Chars ? (React__default.createElement(CheckGreenIcon, null)) : typeof atLeast8Chars === 'undefined' ? (React__default.createElement(CheckGrayIcon, null)) : (React__default.createElement(CheckRedIcon, null)),
|
|
1314
1698
|
' ',
|
|
1315
1699
|
"At least 8 characters."),
|
|
1316
1700
|
React__default.createElement(Text, { size: "n1" },
|
|
1317
|
-
atLeastOneUpper ? (React__default.createElement(
|
|
1701
|
+
atLeastOneUpper ? (React__default.createElement(CheckGreenIcon, null)) : typeof atLeastOneUpper === 'undefined' ? (React__default.createElement(CheckGrayIcon, null)) : (React__default.createElement(CheckRedIcon, null)),
|
|
1318
1702
|
' ',
|
|
1319
|
-
"At least one uppercase letter and one number.")),
|
|
1703
|
+
"At least one uppercase letter, one lowercase letter, and one number.")),
|
|
1320
1704
|
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
1705
|
};
|
|
1322
1706
|
|
|
1323
1707
|
const SSOPasswordForgotSetup = ({ hidden }) => {
|
|
1324
|
-
const {
|
|
1708
|
+
const { steps, goBack, currentStepIndex, addStep, goNext } = useSSOSteps();
|
|
1325
1709
|
const form = useForm({
|
|
1326
1710
|
validate: yupResolver(yup.object().shape({
|
|
1327
1711
|
password: yup
|
|
1328
1712
|
.string()
|
|
1329
1713
|
.required('Password is required')
|
|
1330
|
-
.min(8)
|
|
1331
|
-
.
|
|
1714
|
+
.min(8, ' ')
|
|
1715
|
+
.max(50, ' ')
|
|
1716
|
+
.matches(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/, ' '),
|
|
1332
1717
|
confirmPassword: yup
|
|
1333
1718
|
.string()
|
|
1334
1719
|
.required('Confirm password is required')
|
|
@@ -1338,14 +1723,36 @@ const SSOPasswordForgotSetup = ({ hidden }) => {
|
|
|
1338
1723
|
})),
|
|
1339
1724
|
});
|
|
1340
1725
|
const onSubmit = (values) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1726
|
+
var _a;
|
|
1341
1727
|
const { password, confirmPassword } = values;
|
|
1342
1728
|
if (password.length >= 8 &&
|
|
1343
|
-
password.
|
|
1729
|
+
password.length <= 50 &&
|
|
1730
|
+
password.match(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/) &&
|
|
1344
1731
|
password === confirmPassword) {
|
|
1345
1732
|
const res = yield resetPassword(password, confirmPassword);
|
|
1346
1733
|
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
1347
|
-
|
|
1348
|
-
|
|
1734
|
+
showNotification({
|
|
1735
|
+
type: 'success',
|
|
1736
|
+
message: 'Password has been reset successfully',
|
|
1737
|
+
});
|
|
1738
|
+
// back to login step
|
|
1739
|
+
const foundPasswordIndex = steps.findIndex((step) => step.type === SSOStepTypeType.PASSWORD);
|
|
1740
|
+
const foundPasswordStep = steps.find((step) => step.type === SSOStepTypeType.PASSWORD);
|
|
1741
|
+
const diffIndex = currentStepIndex - foundPasswordIndex;
|
|
1742
|
+
for (let i = 0; i < diffIndex; i++) {
|
|
1743
|
+
goBack();
|
|
1744
|
+
}
|
|
1745
|
+
goBack();
|
|
1746
|
+
addStep(foundPasswordStep);
|
|
1747
|
+
goNext();
|
|
1748
|
+
// onClose?.()
|
|
1749
|
+
}
|
|
1750
|
+
else {
|
|
1751
|
+
// toast error message
|
|
1752
|
+
showNotification({
|
|
1753
|
+
type: 'danger',
|
|
1754
|
+
message: ((_a = res === null || res === void 0 ? void 0 : res._messages) === null || _a === void 0 ? void 0 : _a[0]) || 'API error',
|
|
1755
|
+
});
|
|
1349
1756
|
}
|
|
1350
1757
|
}
|
|
1351
1758
|
});
|
|
@@ -1357,8 +1764,8 @@ const SSOPasswordForgotSetup = ({ hidden }) => {
|
|
|
1357
1764
|
React__default.createElement(Text, { size: "s1", weight: "semiBold" }, "Setup your password"),
|
|
1358
1765
|
React__default.createElement(Text, { size: "p4" }, "Set up your login password and other details to complete the registration process.")),
|
|
1359
1766
|
React__default.createElement(SSOPasswordWithConfirm, { form: form }),
|
|
1360
|
-
React__default.createElement(
|
|
1361
|
-
React__default.createElement(Button, { size: "lg", variant: "primary", fullWidth: true }, "Save"))));
|
|
1767
|
+
React__default.createElement(CollectInfoText, null),
|
|
1768
|
+
React__default.createElement(Button, { type: "submit", size: "lg", variant: "primary", fullWidth: true }, "Save"))));
|
|
1362
1769
|
};
|
|
1363
1770
|
|
|
1364
1771
|
const SSOPhoneVerify = ({ hidden, }) => {
|
|
@@ -1378,18 +1785,21 @@ const SSOPhoneVerify = ({ hidden, }) => {
|
|
|
1378
1785
|
phone,
|
|
1379
1786
|
},
|
|
1380
1787
|
});
|
|
1788
|
+
goNext();
|
|
1381
1789
|
}
|
|
1382
1790
|
else {
|
|
1383
|
-
|
|
1791
|
+
resendUpdatePhoneZaloOTP(phoneNumber, areaCode);
|
|
1384
1792
|
addStep({
|
|
1385
1793
|
type: SSOStepTypeType.OTP,
|
|
1386
1794
|
config: {
|
|
1387
1795
|
phone,
|
|
1388
1796
|
otpType: 'phone-zalo',
|
|
1797
|
+
isUpdatePhone: true,
|
|
1798
|
+
afterAction: 'setup',
|
|
1389
1799
|
},
|
|
1390
1800
|
});
|
|
1801
|
+
goNext();
|
|
1391
1802
|
}
|
|
1392
|
-
goNext();
|
|
1393
1803
|
}
|
|
1394
1804
|
else {
|
|
1395
1805
|
setErrMsg(((_c = userExist === null || userExist === void 0 ? void 0 : userExist._messages) === null || _c === void 0 ? void 0 : _c[0]) || 'API error');
|
|
@@ -1400,66 +1810,40 @@ const SSOPhoneVerify = ({ hidden, }) => {
|
|
|
1400
1810
|
const { areaCode, phoneNumber } = splitPhone(phone);
|
|
1401
1811
|
const userExist = yield checkUserExist({ phone: phoneNumber });
|
|
1402
1812
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
1403
|
-
if ((
|
|
1813
|
+
if ((_d = userExist._data) === null || _d === void 0 ? void 0 : _d.is_pass) {
|
|
1404
1814
|
addStep({
|
|
1405
1815
|
type: SSOStepTypeType.PASSWORD,
|
|
1406
1816
|
config: {
|
|
1407
1817
|
phone,
|
|
1408
1818
|
},
|
|
1409
1819
|
});
|
|
1820
|
+
goNext();
|
|
1410
1821
|
}
|
|
1411
1822
|
else {
|
|
1412
|
-
|
|
1823
|
+
const res = yield resendUpdatePhoneOTP(phoneNumber, areaCode);
|
|
1824
|
+
if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
|
|
1825
|
+
setErrMsg(((_e = res === null || res === void 0 ? void 0 : res._messages) === null || _e === void 0 ? void 0 : _e[0]) || 'API error');
|
|
1826
|
+
return;
|
|
1827
|
+
}
|
|
1413
1828
|
addStep({
|
|
1414
1829
|
type: SSOStepTypeType.OTP,
|
|
1415
1830
|
config: {
|
|
1416
1831
|
phone,
|
|
1417
1832
|
otpType: 'phone-sms',
|
|
1833
|
+
isUpdatePhone: true,
|
|
1834
|
+
afterAction: 'setup',
|
|
1418
1835
|
},
|
|
1419
1836
|
});
|
|
1837
|
+
goNext();
|
|
1420
1838
|
}
|
|
1421
|
-
goNext();
|
|
1422
1839
|
}
|
|
1423
1840
|
else {
|
|
1424
1841
|
setErrMsg(((_f = userExist === null || userExist === void 0 ? void 0 : userExist._messages) === null || _f === void 0 ? void 0 : _f[0]) || 'API error');
|
|
1425
1842
|
}
|
|
1426
1843
|
});
|
|
1427
|
-
return (React__default.createElement("
|
|
1844
|
+
return (React__default.createElement("div", { style: {
|
|
1428
1845
|
display: hidden ? 'none' : 'block',
|
|
1429
|
-
}
|
|
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
|
-
}) },
|
|
1846
|
+
} },
|
|
1463
1847
|
React__default.createElement(Stack, { spacing: 24 },
|
|
1464
1848
|
React__default.createElement(Stack, { spacing: 8 },
|
|
1465
1849
|
React__default.createElement(Text, { size: "s1", weight: "semiBold" }, "Verify Phone Number"),
|
|
@@ -1469,56 +1853,124 @@ const SSOPhoneVerify = ({ hidden, }) => {
|
|
|
1469
1853
|
React__default.createElement(StyledPhone, { defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: phone, onChange: (value) => setPhone(value), isError: !!errMsg, required: true, name: "phone" })),
|
|
1470
1854
|
React__default.createElement(Button, { size: "lg", variant: "primary", onClick: onClickContinueZalo }, "Continue with Zalo"),
|
|
1471
1855
|
React__default.createElement(Button, { size: "lg", variant: "secondary", onClick: onClickContinuePhone }, "Continue with SMS")),
|
|
1472
|
-
React__default.createElement(
|
|
1856
|
+
React__default.createElement(CollectInfoText, null))));
|
|
1473
1857
|
};
|
|
1474
1858
|
|
|
1859
|
+
const FemaleIcon = () => (React__default.createElement("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
1860
|
+
React__default.createElement("path", { d: "M9.907.476C7.828.428 5.535 2.36 4.817 4.593c-1.192 3.7.154 9.554-1.391 13.089l10.542-.056c.649-3.603.786-7.28.41-10.922-.159-1.46-.4-3.184-1.33-4.294C12.02 1.184 11.02.624 10.514.514a2.4 2.4 0 0 0-.607-.038", fill: "#262626" }),
|
|
1861
|
+
React__default.createElement("path", { d: "M14.224 18.144H5.532c-1.44 0-2.196-.447-1.206-1.493a7 7 0 0 1 .531-.502c.537-.457 1.743-1.437 2.57-1.921.513-.3.894-.78 1.068-1.348q.108-.418.143-.847h2.48q.035.43.143.847a2.36 2.36 0 0 0 1.066 1.348c.83.484 2.034 1.464 2.572 1.921q.28.238.532.502c.99 1.046.233 1.493-1.207 1.493", fill: "#FFB497" }),
|
|
1862
|
+
React__default.createElement("path", { d: "M15.841 17.15c.41.686.031 1.06-.556 1.401-.604.35-2.454 1.086-5.407 1.086S5.076 18.9 4.471 18.55c-.587-.34-.965-.715-.555-1.4q.327-.538.76-.985a9.3 9.3 0 0 1 2.64-1.846l2.59 2.726 2.573-2.707a9.3 9.3 0 0 1 2.6 1.827h.003c.287.297.542.628.759.985", fill: "#FC488D" }),
|
|
1863
|
+
React__default.createElement("path", { d: "M6.037 7.275a.95.95 0 0 0-.763-.012c-.442.225-.502.809-.353 1.227.19.538.782 1.076 1.414.871z", fill: "#FFB497" }),
|
|
1864
|
+
React__default.createElement("path", { d: "M6.334 8.688a.23.23 0 0 1-.192-.104.66.66 0 0 0-.514-.249.23.23 0 0 1-.003-.46c.023 0 .6-.005.902.457a.23.23 0 0 1-.193.356m4.929 4.192c-.519.285-1.054.501-1.384.501s-.865-.216-1.383-.501q.108-.418.143-.847h2.481q.034.43.143.847", fill: "#FF977B" }),
|
|
1865
|
+
React__default.createElement("path", { d: "M13.564 6.966c-.181-1.907-1.68-4.121-2.63-3.686a.18.18 0 0 1-.194-.028C9.154 1.846 9.156 6.759 6.035 7.274c.071 2.186.776 3.652 1.512 4.224.667.52 1.781 1.116 2.33 1.116s1.664-.596 2.332-1.116c.77-.6 1.577-2.186 1.355-4.532", fill: "#FCCAAF" }),
|
|
1866
|
+
React__default.createElement("path", { d: "M11.786 7.978a.387.387 0 1 0 0-.775.387.387 0 0 0 0 .775", fill: "#404040" }),
|
|
1867
|
+
React__default.createElement("path", { d: "M11.098 7.092a.85.85 0 0 1 .417-.26c.15-.04.307-.048.46-.022q.218.034.413.136.069.03.143.03l.045-.001a.157.157 0 0 1 .163.153.2.2 0 0 1-.012.065.34.34 0 0 1-.207.188.45.45 0 0 1-.323-.02 1.1 1.1 0 0 0-.287-.072.8.8 0 0 0-.268.014.5.5 0 0 0-.207.104l-.018.015a.23.23 0 0 1-.319-.33m-.157-1.074c.35-.09.711-.116 1.07-.076a2.5 2.5 0 0 1 1.012.349.179.179 0 0 1-.177.31 2.2 2.2 0 0 0-.875-.253 2.5 2.5 0 0 0-.908.113.23.23 0 0 1-.134-.44z", fill: "#262626" }),
|
|
1868
|
+
React__default.createElement("path", { d: "M7.971 7.978a.387.387 0 1 0 0-.775.387.387 0 0 0 0 .775", fill: "#404040" }),
|
|
1869
|
+
React__default.createElement("path", { d: "M8.324 7.409a.5.5 0 0 0-.207-.105.8.8 0 0 0-.268-.014 1.1 1.1 0 0 0-.288.073.45.45 0 0 1-.322.019.34.34 0 0 1-.208-.188.158.158 0 0 1 .15-.217l.047.001q.075 0 .143-.03.195-.102.412-.136c.153-.026.31-.018.46.022a.85.85 0 0 1 .416.26.23.23 0 0 1-.317.33zm.37-.948a2.5 2.5 0 0 0-.907-.113 2.2 2.2 0 0 0-.876.253.179.179 0 0 1-.176-.31h.001a2.5 2.5 0 0 1 1.013-.35c.358-.039.72-.013 1.069.077a.23.23 0 0 1-.11.447l-.01-.003z", fill: "#262626" }),
|
|
1870
|
+
React__default.createElement("path", { d: "M10.887 9.971a.15.15 0 0 0-.19-.094l-.012.005a.2.2 0 0 1-.118.004c-.046-.01-.108-.032-.193-.05a.6.6 0 0 0-.397.053.6.6 0 0 0-.397-.053c-.084.019-.145.041-.192.05a.2.2 0 0 1-.118-.004l-.012-.004a.15.15 0 0 0-.132.265.5.5 0 0 0 .283.082c.092 0 .165-.013.217-.012.053.001.152.115.188.145a.28.28 0 0 0 .36-.033c.02-.024.101-.111.155-.112.054 0 .126.012.218.012a.5.5 0 0 0 .282-.082.15.15 0 0 0 .058-.172", fill: "#F44D2C" }),
|
|
1871
|
+
React__default.createElement("path", { d: "M10.142 8.676a.23.23 0 0 0-.173.078.4.4 0 0 1-.092.015.4.4 0 0 1-.093-.015.23.23 0 0 0-.403.152c0 .32.49.324.496.324.005 0 .494-.004.494-.324a.23.23 0 0 0-.23-.23", fill: "#FF977B" }),
|
|
1872
|
+
React__default.createElement("path", { d: "M10.026 10.691h-.294a.23.23 0 1 0 0 .46h.294a.23.23 0 0 0 0-.46", fill: "#F44D2C" }),
|
|
1873
|
+
React__default.createElement("path", { d: "M11.796 18.906a.45.45 0 0 1-.402-.628c.7-1.683-.73-4.184-.36-6.07a9 9 0 0 0 1.09-.687c.771-.6 1.578-2.186 1.356-4.532-.178-1.869-1.621-4.033-2.574-3.71l-.008.001-.007-.005a.013.013 0 0 1 .001-.016c.267-.299.343-1.113-.318-1.782-.498-.505-.665-.992-.418-.979 1.971.11 4.022 2.014 4.7 4.117.79 2.454.252 5.67.611 8.706.23 1.94 1.62 5.74-3.671 5.585", fill: "#262626" })));
|
|
1874
|
+
const MaleIcon = () => (React__default.createElement("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
1875
|
+
React__default.createElement("path", { d: "M10.334 16.266c-3.177 0-3.932-2.198-3.444-2.426.155-.073.312-.14.465-.21.487-.136.801-.72.966-1.133s.213-.762.219-.997l.19.37q.102.06.21.107a3.27 3.27 0 0 0 2.789 0c.072-.031.532-.437.599-.477l-.1.498c.005.226.063.286.14.499.222.59.41.89.955 1.138q.226.1.456.205c.153.071.017 2.426-3.445 2.426", fill: "#FF977B" }),
|
|
1876
|
+
React__default.createElement("path", { d: "M17.623 17.018c.503.8.038 1.233-.68 1.63-.74.407-2.994 1.263-6.609 1.263s-5.869-.856-6.61-1.264c-.717-.396-1.182-.83-.68-1.63.43-.685 1.662-2.158 3.845-3.177.155-.073.312-.14.466-.21.695 1.15 2.091 1.4 2.985 1.4s2.286-.25 2.983-1.395q.225.1.456.205c2.183 1.019 3.415 2.492 3.844 3.178", fill: "#2D87F3" }),
|
|
1877
|
+
React__default.createElement("path", { d: "M12.852 12.533c-.72.35-1.573.539-2.447.543a5.8 5.8 0 0 1-2.458-.517c.117-.22.18-.453.188-.688l.003-.002q.143.06.296.107c.617.205 1.29.312 1.972.312a6.3 6.3 0 0 0 2.269-.419l.002.002c.007.226.066.45.175.662", fill: "#FF6F4D" }),
|
|
1878
|
+
React__default.createElement("path", { d: "M14.755 7.579H5.61c-.213-2.439.17-4.883 1.27-5.997a.97.97 0 0 1 .98-.242c.205.066.731.01.906-.234.14-.197.714-.443 1.08-.104a.5.5 0 0 0 .334.127h.003a.52.52 0 0 0 .335-.127c.365-.339.939-.093 1.078.104.176.245.703.3.908.234a.97.97 0 0 1 .98.242c1.1 1.114 1.482 3.558 1.27 5.997", fill: "#404040" }),
|
|
1879
|
+
React__default.createElement("path", { d: "M14.02 6.912a1 1 0 0 1 .728-.007c.5.203.641.795.438 1.417-.2.617-.906 1.045-1.517.826-.179-.587-.062-1.716.351-2.236M6.607 9.147c-.611.219-1.317-.208-1.517-.825-.203-.622-.063-1.214.437-1.417a1 1 0 0 1 .728.007c.612.412.71 1.838.352 2.235", fill: "#FF977B" }),
|
|
1880
|
+
React__default.createElement("path", { d: "M13.887 8.263a.156.156 0 0 1-.125-.25 1.05 1.05 0 0 1 .804-.417.156.156 0 1 1-.003.312h-.001a.73.73 0 0 0-.55.292.16.16 0 0 1-.125.063m-7.498-.008a.16.16 0 0 1-.125-.063.7.7 0 0 0-.545-.282.16.16 0 0 1-.16-.151.156.156 0 0 1 .15-.161 1.02 1.02 0 0 1 .805.408.156.156 0 0 1-.125.25z", fill: "#FF6F4D" }),
|
|
1881
|
+
React__default.createElement("path", { d: "M12.353 3.765c-.545.131-.883.448-2.2.448s-1.656-.317-2.201-.448c-1.02-.247-1.649 2.672-1.647 3.883.001.18.028.696.054 1.2l.029.493q.03.34.152.66c1.108 3.11 6.118 3.096 7.347-.04.002-.085.015-.324.032-.62l.028-.493c.026-.504.053-1.02.053-1.2.002-1.211-.625-4.13-1.647-3.883", fill: "#FFB497" }),
|
|
1882
|
+
React__default.createElement("path", { d: "M12.348 6.946a.359.359 0 1 0-.717 0v.14a.359.359 0 1 0 .717 0zm-4.421.141a.359.359 0 0 0 .718 0v-.14a.359.359 0 1 0-.718 0z", fill: "#595959" }),
|
|
1883
|
+
React__default.createElement("path", { d: "M11.344 6.96a.2.2 0 0 1-.061-.013.15.15 0 0 1-.082-.198c.081-.196.348-.278.557-.312.381-.062.889-.017 1.102.228a.156.156 0 1 1-.236.206c-.1-.116-.446-.174-.772-.132-.24.032-.35.102-.363.13a.16.16 0 0 1-.145.091", fill: "#404040" }),
|
|
1884
|
+
React__default.createElement("path", { d: "M10.137 8.963c-.008 0-.772-.033-.772-.373a.156.156 0 0 1 .305-.048c.147.068.306.105.467.11.163-.005.324-.042.472-.11a.156.156 0 0 1 .305.048c0 .34-.77.373-.777.373", fill: "#FF6F4D" }),
|
|
1885
|
+
React__default.createElement("path", { d: "M11.122 6.393a.157.157 0 0 1-.051-.304c.687-.234 1.688-.344 2.26-.03a.156.156 0 0 1-.15.274c-.463-.254-1.38-.163-2.009.052a.2.2 0 0 1-.05.008m-2.19.572a.16.16 0 0 1-.144-.097c-.013-.027-.123-.097-.363-.129-.325-.043-.672.016-.772.131a.156.156 0 1 1-.236-.205c.214-.245.721-.29 1.103-.228.209.034.475.116.556.311a.156.156 0 0 1-.144.217m.222-.571a.2.2 0 0 1-.05-.009c-.629-.215-1.546-.306-2.009-.051a.156.156 0 1 1-.15-.274c.572-.315 1.572-.206 2.26.03a.156.156 0 0 1-.05.304", fill: "#404040" }),
|
|
1886
|
+
React__default.createElement("path", { d: "m11.12 9.547-.019.001a8 8 0 0 1-1.928 0 .156.156 0 1 0-.037.31c.665.08 1.337.08 2.003 0a.156.156 0 0 0-.019-.31", fill: "#D84023" })));
|
|
1887
|
+
|
|
1475
1888
|
// always has name, gender dob
|
|
1476
1889
|
const OtherSetup = ({ form, needPhone, needEmail, isEmailDisable, }) => {
|
|
1477
1890
|
const { locale = 'vi-VN' } = useSSOState();
|
|
1478
|
-
return (React__default.createElement(Stack, { spacing:
|
|
1479
|
-
needPhone && (React__default.createElement(
|
|
1480
|
-
React__default.createElement(
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1891
|
+
return (React__default.createElement(Stack, { spacing: 12 },
|
|
1892
|
+
needPhone && (React__default.createElement(React__default.Fragment, null,
|
|
1893
|
+
React__default.createElement(Input.Wrapper, Object.assign({ label: "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i", withAsterisk: true }, form.getInputProps('phone')),
|
|
1894
|
+
React__default.createElement(StyledPhone, { defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: form.getInputProps('phone').value, onChange: (value) => {
|
|
1895
|
+
form.setFieldValue('phone', value);
|
|
1896
|
+
}, isError: !!form.getInputProps('phone').error, required: true, name: "phone" })),
|
|
1897
|
+
React__default.createElement(Group, { spacing: 24 },
|
|
1898
|
+
React__default.createElement(Text, { size: "p4" }, "Nh\u1EADn OTP qua"),
|
|
1899
|
+
React__default.createElement(Radio.Group, Object.assign({ name: "otpMethod", styles: {
|
|
1900
|
+
root: {
|
|
1901
|
+
display: 'flex',
|
|
1902
|
+
flexDirection: 'row',
|
|
1903
|
+
flexWrap: 'wrap',
|
|
1904
|
+
gap: 24,
|
|
1905
|
+
},
|
|
1906
|
+
} }, form.getInputProps('otpMethod')),
|
|
1907
|
+
React__default.createElement(Radio, { value: "zalo", label: "Zalo", styles: {
|
|
1908
|
+
label: {
|
|
1909
|
+
paddingLeft: 8,
|
|
1910
|
+
},
|
|
1911
|
+
} }),
|
|
1912
|
+
React__default.createElement(Radio, { value: "sms", label: "SMS", styles: {
|
|
1913
|
+
label: {
|
|
1914
|
+
paddingLeft: 8,
|
|
1915
|
+
},
|
|
1916
|
+
} }))))),
|
|
1484
1917
|
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'))),
|
|
1918
|
+
React__default.createElement(Input, Object.assign({ name: "name", label: "Name", withAsterisk: true, required: true, placeholder: "Enter your name" }, form.getInputProps('name'))),
|
|
1486
1919
|
React__default.createElement(Input.Wrapper, Object.assign({ label: "Gender", withAsterisk: true }, form.getInputProps('gender')),
|
|
1487
1920
|
React__default.createElement(Group, null,
|
|
1488
|
-
React__default.createElement(Button, { type: "button",
|
|
1489
|
-
|
|
1921
|
+
React__default.createElement(Button, { type: "button", styles: {
|
|
1922
|
+
root: {
|
|
1923
|
+
flex: 1,
|
|
1924
|
+
},
|
|
1925
|
+
leftIcon: {
|
|
1926
|
+
marginRight: 8,
|
|
1927
|
+
},
|
|
1928
|
+
inner: {
|
|
1929
|
+
justifyContent: 'start',
|
|
1930
|
+
},
|
|
1490
1931
|
}, variant: form.getInputProps('gender').value === 'female'
|
|
1491
1932
|
? 'secondary'
|
|
1492
1933
|
: 'tertiary', onClick: () => {
|
|
1493
1934
|
form.setFieldValue('gender', 'female');
|
|
1494
|
-
} }, "Female"),
|
|
1495
|
-
React__default.createElement(Button, { type: "button",
|
|
1496
|
-
|
|
1935
|
+
}, leftIcon: React__default.createElement(FemaleIcon, null) }, "Female"),
|
|
1936
|
+
React__default.createElement(Button, { type: "button", styles: {
|
|
1937
|
+
root: {
|
|
1938
|
+
flex: 1,
|
|
1939
|
+
},
|
|
1940
|
+
leftIcon: {
|
|
1941
|
+
marginRight: 8,
|
|
1942
|
+
},
|
|
1943
|
+
inner: {
|
|
1944
|
+
justifyContent: 'start',
|
|
1945
|
+
},
|
|
1497
1946
|
}, variant: form.getInputProps('gender').value === 'male'
|
|
1498
1947
|
? 'secondary'
|
|
1499
1948
|
: 'tertiary', onClick: () => {
|
|
1500
1949
|
form.setFieldValue('gender', 'male');
|
|
1501
|
-
} }, "Male"))),
|
|
1502
|
-
React__default.createElement(DatePicker, Object.assign({ name: "dob", label: "Birthday", withAsterisk: true, required: true }, form.getInputProps('dob')))));
|
|
1950
|
+
}, leftIcon: React__default.createElement(MaleIcon, null) }, "Male"))),
|
|
1951
|
+
React__default.createElement(DatePicker, Object.assign({ name: "dob", label: "Birthday", withAsterisk: true, required: true, placeholder: "Enter your birthday" }, form.getInputProps('dob')))));
|
|
1503
1952
|
};
|
|
1504
1953
|
|
|
1505
1954
|
const SSOSetupScreen = ({ hidden, index, }) => {
|
|
1506
1955
|
const { onClose, source } = useSSOState();
|
|
1507
|
-
const { steps } = useSSOSteps();
|
|
1956
|
+
const { goNext, steps, addStep, shareData } = useSSOSteps();
|
|
1957
|
+
const [errMsg, setErrMsg] = React__default.useState('');
|
|
1508
1958
|
const currentStep = steps[index];
|
|
1509
1959
|
const config = currentStep === null || currentStep === void 0 ? void 0 : currentStep.config;
|
|
1510
1960
|
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
1961
|
const needPass = !(userInfo === null || userInfo === void 0 ? void 0 : userInfo.is_pass);
|
|
1513
1962
|
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
1963
|
// const isNew = !!userInfo?.is_new
|
|
1964
|
+
const authMethod = shareData === null || shareData === void 0 ? void 0 : shareData.authMethod;
|
|
1965
|
+
const authFlow = shareData === null || shareData === void 0 ? void 0 : shareData.authFlow;
|
|
1966
|
+
const isEmailDisable = authMethod === 'google' || authMethod === 'mail';
|
|
1967
|
+
const needEmail = authFlow !== 'verify-phone';
|
|
1516
1968
|
const form = useForm({
|
|
1517
|
-
initialValues: Object.assign({}, (
|
|
1969
|
+
initialValues: Object.assign(Object.assign({}, (needPhone
|
|
1518
1970
|
? {
|
|
1519
|
-
|
|
1971
|
+
otpMethod: 'zalo',
|
|
1520
1972
|
}
|
|
1521
|
-
: {})),
|
|
1973
|
+
: {})), { dob: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.birthday) ? new Date(userInfo.birthday) : undefined, name: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) || undefined, email: isEmailDisable ? (userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) || undefined : undefined }),
|
|
1522
1974
|
validateInputOnBlur: true,
|
|
1523
1975
|
validate: yupResolver(yup.object().shape(Object.assign(Object.assign(Object.assign(Object.assign({}, (needPass
|
|
1524
1976
|
? {
|
|
@@ -1526,7 +1978,8 @@ const SSOSetupScreen = ({ hidden, index, }) => {
|
|
|
1526
1978
|
.string()
|
|
1527
1979
|
.required('Password is required')
|
|
1528
1980
|
.min(8, ' ')
|
|
1529
|
-
.
|
|
1981
|
+
.max(50, ' ')
|
|
1982
|
+
.matches(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/, ' '),
|
|
1530
1983
|
confirmPassword: yup
|
|
1531
1984
|
.string()
|
|
1532
1985
|
.required('Confirm password is required')
|
|
@@ -1537,6 +1990,10 @@ const SSOSetupScreen = ({ hidden, index, }) => {
|
|
|
1537
1990
|
: {})), (needPhone
|
|
1538
1991
|
? {
|
|
1539
1992
|
phone: yup.string().required('Phone number is required'),
|
|
1993
|
+
otpMethod: yup
|
|
1994
|
+
.string()
|
|
1995
|
+
.required('OTP method is required')
|
|
1996
|
+
.oneOf(['zalo', 'sms']),
|
|
1540
1997
|
}
|
|
1541
1998
|
: {})), (needEmail
|
|
1542
1999
|
? {
|
|
@@ -1548,9 +2005,10 @@ const SSOSetupScreen = ({ hidden, index, }) => {
|
|
|
1548
2005
|
.oneOf(['male', 'female']), dob: yup.date().required('Date of birth is required'), name: yup.string().required('Name is required') }))),
|
|
1549
2006
|
});
|
|
1550
2007
|
const onSubmit = (values) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1551
|
-
var _a;
|
|
1552
|
-
const { password, confirmPassword, phone, gender, name, dob } = values;
|
|
2008
|
+
var _a, _b, _c, _d;
|
|
2009
|
+
const { password, confirmPassword, phone, gender, name, dob, otpMethod } = values;
|
|
1553
2010
|
const { phoneNumber, areaCode } = splitPhone(phone || '');
|
|
2011
|
+
// validate only, delay set data to after otp
|
|
1554
2012
|
const res = yield updateUserInfo({
|
|
1555
2013
|
name,
|
|
1556
2014
|
birthday: dayjs(dob).format('YYYY-MM-DD'),
|
|
@@ -1561,15 +2019,86 @@ const SSOSetupScreen = ({ hidden, index, }) => {
|
|
|
1561
2019
|
area_code: areaCode,
|
|
1562
2020
|
gender: gender === 'male' ? 1 : 0,
|
|
1563
2021
|
source,
|
|
2022
|
+
validate: 'true',
|
|
1564
2023
|
});
|
|
1565
2024
|
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
:
|
|
1571
|
-
|
|
1572
|
-
|
|
2025
|
+
// if need phone and has phone then start phone verify step, close after done
|
|
2026
|
+
if (needPhone && phone) {
|
|
2027
|
+
const setupData = {
|
|
2028
|
+
name,
|
|
2029
|
+
birthday: dayjs(dob).format('YYYY-MM-DD'),
|
|
2030
|
+
email: values.email,
|
|
2031
|
+
password,
|
|
2032
|
+
confirm_password: confirmPassword,
|
|
2033
|
+
phone_number: phoneNumber,
|
|
2034
|
+
area_code: areaCode,
|
|
2035
|
+
gender: gender === 'male' ? 1 : 0,
|
|
2036
|
+
source,
|
|
2037
|
+
};
|
|
2038
|
+
if (otpMethod === 'zalo') {
|
|
2039
|
+
const res = yield resendUpdatePhoneZaloOTP(phoneNumber, areaCode);
|
|
2040
|
+
if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
|
|
2041
|
+
setErrMsg(((_a = res === null || res === void 0 ? void 0 : res._messages) === null || _a === void 0 ? void 0 : _a[0]) || 'API error');
|
|
2042
|
+
return;
|
|
2043
|
+
}
|
|
2044
|
+
addStep({
|
|
2045
|
+
type: SSOStepTypeType.OTP,
|
|
2046
|
+
config: {
|
|
2047
|
+
phone,
|
|
2048
|
+
otpType: 'phone-zalo',
|
|
2049
|
+
isUpdatePhone: true,
|
|
2050
|
+
afterAction: 'submitSetup',
|
|
2051
|
+
setupData,
|
|
2052
|
+
},
|
|
2053
|
+
});
|
|
2054
|
+
goNext();
|
|
2055
|
+
}
|
|
2056
|
+
else {
|
|
2057
|
+
const res = yield resendUpdatePhoneOTP(phoneNumber, areaCode);
|
|
2058
|
+
if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
|
|
2059
|
+
setErrMsg(((_b = res === null || res === void 0 ? void 0 : res._messages) === null || _b === void 0 ? void 0 : _b[0]) || 'API error');
|
|
2060
|
+
return;
|
|
2061
|
+
}
|
|
2062
|
+
addStep({
|
|
2063
|
+
type: SSOStepTypeType.OTP,
|
|
2064
|
+
config: {
|
|
2065
|
+
phone,
|
|
2066
|
+
otpType: 'phone-sms',
|
|
2067
|
+
isUpdatePhone: true,
|
|
2068
|
+
afterAction: 'submitSetup',
|
|
2069
|
+
setupData,
|
|
2070
|
+
},
|
|
2071
|
+
});
|
|
2072
|
+
goNext();
|
|
2073
|
+
}
|
|
2074
|
+
}
|
|
2075
|
+
else {
|
|
2076
|
+
// close?
|
|
2077
|
+
const res = yield updateUserInfo({
|
|
2078
|
+
name,
|
|
2079
|
+
birthday: dayjs(dob).format('YYYY-MM-DD'),
|
|
2080
|
+
email: values.email,
|
|
2081
|
+
password,
|
|
2082
|
+
confirm_password: confirmPassword,
|
|
2083
|
+
phone_number: phoneNumber,
|
|
2084
|
+
area_code: areaCode,
|
|
2085
|
+
gender: gender === 'male' ? 1 : 0,
|
|
2086
|
+
source,
|
|
2087
|
+
validate: '',
|
|
2088
|
+
});
|
|
2089
|
+
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
2090
|
+
handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
|
|
2091
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
2092
|
+
}
|
|
2093
|
+
else {
|
|
2094
|
+
setErrMsg(((_c = res._messages) === null || _c === void 0 ? void 0 : _c[0]) || 'API error');
|
|
2095
|
+
return;
|
|
2096
|
+
}
|
|
2097
|
+
}
|
|
2098
|
+
}
|
|
2099
|
+
else {
|
|
2100
|
+
// toast error message
|
|
2101
|
+
setErrMsg(((_d = res._messages) === null || _d === void 0 ? void 0 : _d[0]) || 'API error');
|
|
1573
2102
|
}
|
|
1574
2103
|
});
|
|
1575
2104
|
return (React__default.createElement("form", { style: {
|
|
@@ -1581,7 +2110,8 @@ const SSOSetupScreen = ({ hidden, index, }) => {
|
|
|
1581
2110
|
React__default.createElement(Text, { size: "p4" }, "Please provide additional information to complete the account registration process.")),
|
|
1582
2111
|
needPass && React__default.createElement(SSOPasswordWithConfirm, { form: form }),
|
|
1583
2112
|
React__default.createElement(OtherSetup, { needPhone: needPhone, needEmail: needEmail, isEmailDisable: isEmailDisable, form: form }),
|
|
1584
|
-
React__default.createElement(
|
|
2113
|
+
React__default.createElement(CollectInfoText, null),
|
|
2114
|
+
errMsg && (React__default.createElement(Text, { color: "red.6", size: "p4" }, errMsg)),
|
|
1585
2115
|
React__default.createElement(Button, { type: "submit", variant: "primary", fullWidth: true }, needPhone ? 'Verify Phone Number' : 'Save'))));
|
|
1586
2116
|
};
|
|
1587
2117
|
|
|
@@ -1612,11 +2142,29 @@ const SSOScreenRenderer = () => {
|
|
|
1612
2142
|
})));
|
|
1613
2143
|
};
|
|
1614
2144
|
|
|
1615
|
-
const SSOV2 = ({ onClose, locale, source = 'default' }) => {
|
|
1616
|
-
|
|
1617
|
-
|
|
2145
|
+
const SSOV2 = ({ onClose: onCloseProps, locale, source = 'default', defaultSteps, }) => {
|
|
2146
|
+
const { isOpen, setOpen, returnUrl, setMounted } = useSSOV2Store();
|
|
2147
|
+
useEffect(() => {
|
|
2148
|
+
setMounted(true);
|
|
2149
|
+
return () => {
|
|
2150
|
+
setMounted(false);
|
|
2151
|
+
};
|
|
2152
|
+
}, []);
|
|
2153
|
+
if (!isOpen) {
|
|
2154
|
+
return null;
|
|
2155
|
+
}
|
|
2156
|
+
const onClose = (success) => {
|
|
2157
|
+
if (success && returnUrl) {
|
|
2158
|
+
window.location.href = returnUrl;
|
|
2159
|
+
return;
|
|
2160
|
+
}
|
|
2161
|
+
setOpen(false);
|
|
2162
|
+
onCloseProps === null || onCloseProps === void 0 ? void 0 : onCloseProps();
|
|
2163
|
+
};
|
|
2164
|
+
return createPortal(React__default.createElement(SSOStateProvider, { onClose: onClose, locale: locale, source: source },
|
|
2165
|
+
React__default.createElement(SSOStepsProvider, { defaultSteps: defaultSteps },
|
|
1618
2166
|
React__default.createElement(SSOPopupWrapper, { opened: true, onClose: onClose },
|
|
1619
|
-
React__default.createElement(SSOScreenRenderer, null)))));
|
|
2167
|
+
React__default.createElement(SSOScreenRenderer, null)))), getPopupWrapperDom());
|
|
1620
2168
|
};
|
|
1621
2169
|
|
|
1622
2170
|
export { SSOV2 };
|