@hhgtech/hhg-components 1.27.97 → 1.27.99
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/_topic-b21cc467.js +6897 -0
- package/build/babyGrowth.js +2 -2
- package/build/cache.js +1 -1
- package/build/care.js +1 -1
- package/build/components/molecules/index.d.ts +2 -0
- package/build/components/molecules/premiumNewsletterBanner/bannerWithOption.d.ts +10 -0
- package/build/components/molecules/premiumNewsletterBanner/context.d.ts +19 -0
- package/build/components/molecules/premiumNewsletterBanner/index.d.ts +10 -0
- package/build/components/molecules/premiumNewsletterBanner/testingBanner.d.ts +3 -0
- package/build/components/molecules/premiumNewsletterBanner/toolBanner.d.ts +10 -0
- package/build/components/molecules/premiumNewsletterModal/context.d.ts +36 -0
- package/build/components/molecules/premiumNewsletterModal/index.d.ts +17 -0
- package/build/components/molecules/premiumNewsletterModal/layout.d.ts +9 -0
- package/build/components/molecules/premiumNewsletterModal/mainForm.d.ts +2 -0
- package/build/components/molecules/premiumNewsletterModal/moreTopics.d.ts +2 -0
- package/build/components/molecules/premiumNewsletterModal/result.d.ts +2 -0
- package/build/components/molecules/premiumTopicSelect/_normalTopic.d.ts +10 -0
- package/build/components/molecules/premiumTopicSelect/_suggestedTopic.d.ts +3 -0
- package/build/components/molecules/premiumTopicSelect/_topic.d.ts +3 -0
- package/build/components/molecules/premiumTopicSelect/_topicSlide.d.ts +10 -0
- package/build/components/molecules/premiumTopicSelect/historySection.d.ts +8 -0
- package/build/components/molecules/premiumTopicSelect/index.d.ts +13 -0
- package/build/components/molecules/premiumTopicSelect/recentlyViewedSection.d.ts +13 -0
- package/build/components/molecules/premiumTopicSelect/topicSection.d.ts +27 -0
- package/build/components/molecules/premiumTopicSelect/trendingCarousel.d.ts +15 -0
- package/build/components/molecules/sideBannerModal/index.d.ts +23 -0
- package/build/components.js +1 -1
- package/build/constants.js +1 -1
- package/build/core-992821b1.js +1 -0
- package/build/ecom.js +1 -1
- package/build/esm/_topic-616fda4c.js +6897 -0
- package/build/esm/babyGrowth.js +5 -5
- package/build/esm/cache.js +1 -1
- package/build/esm/care.js +1 -1
- package/build/esm/components/molecules/index.d.ts +2 -0
- package/build/esm/components/molecules/premiumNewsletterBanner/bannerWithOption.d.ts +10 -0
- package/build/esm/components/molecules/premiumNewsletterBanner/context.d.ts +19 -0
- package/build/esm/components/molecules/premiumNewsletterBanner/index.d.ts +10 -0
- package/build/esm/components/molecules/premiumNewsletterBanner/testingBanner.d.ts +3 -0
- package/build/esm/components/molecules/premiumNewsletterBanner/toolBanner.d.ts +10 -0
- package/build/esm/components/molecules/premiumNewsletterModal/context.d.ts +36 -0
- package/build/esm/components/molecules/premiumNewsletterModal/index.d.ts +17 -0
- package/build/esm/components/molecules/premiumNewsletterModal/layout.d.ts +9 -0
- package/build/esm/components/molecules/premiumNewsletterModal/mainForm.d.ts +2 -0
- package/build/esm/components/molecules/premiumNewsletterModal/moreTopics.d.ts +2 -0
- package/build/esm/components/molecules/premiumNewsletterModal/result.d.ts +2 -0
- package/build/esm/components/molecules/premiumTopicSelect/_normalTopic.d.ts +10 -0
- package/build/esm/components/molecules/premiumTopicSelect/_suggestedTopic.d.ts +3 -0
- package/build/esm/components/molecules/premiumTopicSelect/_topic.d.ts +3 -0
- package/build/esm/components/molecules/premiumTopicSelect/_topicSlide.d.ts +10 -0
- package/build/esm/components/molecules/premiumTopicSelect/historySection.d.ts +8 -0
- package/build/esm/components/molecules/premiumTopicSelect/index.d.ts +13 -0
- package/build/esm/components/molecules/premiumTopicSelect/recentlyViewedSection.d.ts +13 -0
- package/build/esm/components/molecules/premiumTopicSelect/topicSection.d.ts +27 -0
- package/build/esm/components/molecules/premiumTopicSelect/trendingCarousel.d.ts +15 -0
- package/build/esm/components/molecules/sideBannerModal/index.d.ts +23 -0
- package/build/esm/components.js +1 -1
- package/build/esm/constants.js +1 -1
- package/build/esm/{core-f5681c9f.js → core-85cc6a99.js} +1 -1
- package/build/esm/ecom.js +1 -1
- package/build/esm/footer.js +1 -1
- package/build/esm/gAssets.js +1 -1
- package/build/esm/getDynamicHealthTool-21089974.js +1 -0
- package/build/esm/{getSocialList-de8e6c68.js → getSocialList-b3d002ba.js} +1 -1
- package/build/esm/hooks/index.d.ts +1 -0
- package/build/esm/hooks/useCategory.d.ts +14 -0
- package/build/esm/hooks.js +1 -1
- package/build/esm/i18n/translationKeys.d.ts +1 -1
- package/build/esm/i18n-values/en-PH.js +1 -1
- package/build/esm/i18n-values/hi-IN.js +1 -1
- package/build/esm/i18n-values/id-ID.js +1 -1
- package/build/esm/i18n-values/km-KH.js +1 -1
- package/build/esm/i18n-values/ms-MY.js +1 -1
- package/build/esm/i18n-values/my-MM.js +1 -1
- package/build/esm/i18n-values/th-TH.js +1 -1
- package/build/esm/i18n-values/tl-PH.js +1 -1
- package/build/esm/i18n-values/vi-VN.js +1 -1
- package/build/esm/i18n-values/vi-VN_MB.js +1 -1
- package/build/esm/i18n-values/zh-TW.js +1 -1
- package/build/esm/i18n.js +1 -1
- package/build/esm/i18nV2.js +1 -1
- package/build/esm/{index-e440f31a.js → index-15d7660d.js} +1 -1
- package/build/esm/{index-5c940967.js → index-2c0ef308.js} +1 -1
- package/build/esm/{index-ee1819c9.js → index-4c061256.js} +1 -1
- package/build/esm/{index-a75f3157.js → index-4d69e3a6.js} +2 -2
- package/build/esm/{index-4efeaafb.js → index-4db4b3b2.js} +1 -1
- package/build/esm/{index-2801f113.js → index-5968a9b1.js} +1 -1
- package/build/esm/index-634bfb22.js +1 -0
- package/build/esm/index-656071c0.js +1 -0
- package/build/esm/index-6f45922a.js +1 -0
- package/build/esm/index-6fc847b9.js +1 -0
- package/build/esm/{index-ebdb5ee9.js → index-7433ba52.js} +1 -1
- package/build/esm/index-8299b7e3.js +1 -0
- package/build/esm/index-890f07f7.js +1 -0
- package/build/esm/index-94b1edc9.js +1 -0
- package/build/esm/{index-6fcc8bc3.js → index-c0d7abdb.js} +1 -1
- package/build/esm/{index-40d35a26.js → index-d3a5ab49.js} +1 -1
- package/build/esm/{index-3f8a6b5e.js → index-da6144c5.js} +1 -1
- package/build/esm/{index-e0784192.js → index-dae69259.js} +1 -1
- package/build/esm/{index-94ca9b0b.js → index-de57ecd9.js} +1 -1
- package/build/esm/{index-f6bcb648.js → index-fb88d784.js} +4 -4
- package/build/esm/index-fe39531b.js +1 -0
- package/build/esm/index.css +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/{index.styled-938364f7.js → index.styled-76288999.js} +238 -238
- package/build/esm/{index.styled-a2322aef.js → index.styled-894b40c7.js} +6 -6
- package/build/esm/{index.styled-f375cb88.js → index.styled-a2b780e4.js} +1 -1
- package/build/esm/{index.styles-7434589b.js → index.styles-82f67895.js} +13 -13
- package/build/esm/interfaces/constants/index.d.ts +1 -0
- package/build/esm/interfaces/healthTools.d.ts +27 -0
- package/build/esm/lead.js +1 -1
- package/build/esm/mantine.js +1 -1
- package/build/esm/misc.js +1 -1
- package/build/esm/navigation.js +1 -1
- package/build/esm/onboarding.js +1 -1
- package/build/esm/onboardingV2.js +6 -6
- package/build/esm/premiumNewsletter/api/paths.d.ts +9 -0
- package/build/esm/premiumNewsletter/interfaces/constants.d.ts +2 -0
- package/build/esm/premiumNewsletter/interfaces/types.d.ts +30 -0
- package/build/esm/pwg.js +5 -5
- package/build/esm/{routing-0e2cb50e.js → routing-210e19d0.js} +1 -1
- package/build/esm/sso/api/paths.d.ts +3 -0
- package/build/esm/together/api/paths.d.ts +4 -0
- package/build/esm/together/api/utils.d.ts +6 -0
- package/build/esm/together/togetherComponentGlobalContext.d.ts +2 -0
- package/build/esm/together.js +1 -1
- package/build/esm/types-0e6afe78.js +1 -0
- package/build/esm/{types-97b8e4c8.js → types-25c3154a.js} +1 -1
- package/build/esm/types.js +1 -1
- package/build/esm/useCategory-a175adb8.js +1 -0
- package/build/esm/useHealthToolCache-d4fccf30.js +1 -0
- package/build/esm/{useRafState-f7b7e184.js → useRafState-85f8c6df.js} +1 -1
- package/build/esm/useTranslations-7b0b4bfb.js +1 -0
- package/build/esm/{utils-7111bf36.js → utils-f23fae06.js} +1 -1
- package/build/esm/vaccination.js +5 -5
- package/build/footer.js +1 -1
- package/build/gAssets.js +1 -1
- package/build/getDynamicHealthTool-80f4de9f.js +1 -0
- package/build/{getSocialList-621d61f3.js → getSocialList-71e1d219.js} +1 -1
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/useCategory.d.ts +14 -0
- package/build/hooks.js +1 -1
- package/build/i18n/translationKeys.d.ts +1 -1
- package/build/i18n-values/en-PH.js +1 -1
- package/build/i18n-values/hi-IN.js +1 -1
- package/build/i18n-values/id-ID.js +1 -1
- package/build/i18n-values/km-KH.js +1 -1
- package/build/i18n-values/ms-MY.js +1 -1
- package/build/i18n-values/my-MM.js +1 -1
- package/build/i18n-values/th-TH.js +1 -1
- package/build/i18n-values/tl-PH.js +1 -1
- package/build/i18n-values/vi-VN.js +1 -1
- package/build/i18n-values/vi-VN_MB.js +1 -1
- package/build/i18n-values/zh-TW.js +1 -1
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/index-0ce8e0b9.js +1 -0
- package/build/{index-8b57a21d.js → index-0dade44f.js} +1 -1
- package/build/{index-8d7e5c00.js → index-2a1223e3.js} +1 -1
- package/build/index-2ac25800.js +1 -0
- package/build/{index-887f8002.js → index-3614a1ab.js} +1 -1
- package/build/index-4b503825.js +1 -0
- package/build/index-4bdc08c4.js +1 -0
- package/build/{index-abbdb0ce.js → index-634e6cf3.js} +1 -1
- package/build/{index-d87aeb0c.js → index-66174ebd.js} +1 -1
- package/build/index-66a9881f.js +1 -0
- package/build/{index-1a77ebba.js → index-68568f2e.js} +1 -1
- package/build/{index-1f6543e8.js → index-791704b6.js} +1 -1
- package/build/{index-b8f5ea3e.js → index-8d1b7346.js} +1 -1
- package/build/{index-0b029cb7.js → index-9401241f.js} +1 -1
- package/build/index-9ea69966.js +53 -0
- package/build/{index-73fc1f83.js → index-b3de5132.js} +1 -1
- package/build/{index-b5839c5f.js → index-b8f6c5c9.js} +1 -1
- package/build/{index-fd123a19.js → index-d1457a44.js} +1 -1
- package/build/{index-b5b42569.js → index-db04774b.js} +1 -1
- package/build/{index-dd310cca.js → index-def3eb4f.js} +1 -1
- package/build/index-fe18ea3b.js +1 -0
- package/build/index.css +1 -1
- package/build/index.js +1 -1
- package/build/{index.styled-ac98c34c.js → index.styled-402ee1f1.js} +238 -238
- package/build/{index.styled-f444714f.js → index.styled-c401faed.js} +1 -1
- package/build/index.styled-c659adf9.js +50 -0
- package/build/{index.styles-53f79814.js → index.styles-115763fd.js} +22 -22
- package/build/interfaces/constants/index.d.ts +1 -0
- package/build/interfaces/healthTools.d.ts +27 -0
- package/build/lead.js +1 -1
- package/build/mantine.js +1 -1
- package/build/misc.js +1 -1
- package/build/navigation.js +1 -1
- package/build/onboarding.js +1 -1
- package/build/onboardingV2.js +1 -1
- package/build/premiumNewsletter/api/paths.d.ts +9 -0
- package/build/premiumNewsletter/interfaces/constants.d.ts +2 -0
- package/build/premiumNewsletter/interfaces/types.d.ts +30 -0
- package/build/pwg.js +4 -4
- package/build/{routing-aee6f2fb.js → routing-e973d1a5.js} +1 -1
- package/build/sso/api/paths.d.ts +3 -0
- package/build/together/api/paths.d.ts +4 -0
- package/build/together/api/utils.d.ts +6 -0
- package/build/together/togetherComponentGlobalContext.d.ts +2 -0
- package/build/together.js +1 -1
- package/build/{types-4978b529.js → types-25b9dcb3.js} +1 -1
- package/build/types-64ce4439.js +1 -0
- package/build/types.js +1 -1
- package/build/useCategory-5f321f01.js +1 -0
- package/build/useHealthToolCache-774a87a2.js +1 -0
- package/build/{useRafState-a8803e00.js → useRafState-a286772a.js} +1 -1
- package/build/{useTranslations-dcb718af.js → useTranslations-3f02a526.js} +1 -1
- package/build/{utils-2474d839.js → utils-b83c9a04.js} +1 -1
- package/build/vaccination.js +1 -1
- package/package.json +1 -1
- package/build/core-e2826af2.js +0 -1
- package/build/dataTransform-67acfc20.js +0 -1
- package/build/esm/dataTransform-ffe381e3.js +0 -1
- package/build/esm/fixedBottomAdBlock-6d87adb6.js +0 -1
- package/build/esm/getDynamicHealthTool-161b5514.js +0 -1
- package/build/esm/index-119c00b7.js +0 -1
- package/build/esm/index-821974a1.js +0 -3820
- package/build/esm/index-998315b6.js +0 -1
- package/build/esm/index-9f285e04.js +0 -1
- package/build/esm/index-ba9bf2aa.js +0 -1
- package/build/esm/index-e25982d8.js +0 -1
- package/build/esm/index-f456ff87.js +0 -1
- package/build/esm/index-f8b70d7a.js +0 -1
- package/build/esm/types-1fa949bd.js +0 -3078
- package/build/esm/useHealthToolCache-67d0f3be.js +0 -1
- package/build/esm/useTranslations-3e20b105.js +0 -1
- package/build/fixedBottomAdBlock-8d99f4cc.js +0 -1
- package/build/getDynamicHealthTool-89e345f4.js +0 -1
- package/build/index-0c597de5.js +0 -1
- package/build/index-31db9b76.js +0 -3820
- package/build/index-47fd8dfd.js +0 -1
- package/build/index-6402ed24.js +0 -1
- package/build/index-7b47e49c.js +0 -1
- package/build/index-96b34b52.js +0 -53
- package/build/index-f139c20e.js +0 -1
- package/build/index.styled-7406d988.js +0 -50
- package/build/types-e4c49659.js +0 -3078
- package/build/useHealthToolCache-2c8680ca.js +0 -1
- /package/build/{BMI_BOYS.percentile.monthly-c6e25448.js → BMI_BOYS.percentile.monthly-c1dbab88.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-f308f6c3.js → BMI_BOYS.percentile.weekly-539f4089.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-e6701fbe.js → BMI_BOYS.percentile.yearly-3d737312.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-cba18417.js → BMI_BOYS.zscore.monthly-8d104361.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-a65102bd.js → BMI_BOYS.zscore.weekly-7fed0e1e.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-792b4184.js → BMI_BOYS.zscore.yearly-ada0c66a.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-f46868b6.js → BMI_GIRLS.percentile.monthly-72df6a2c.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-8404899e.js → BMI_GIRLS.percentile.weekly-b717b845.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-a8ef28ec.js → BMI_GIRLS.percentile.yearly-e2319817.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-efb5b251.js → BMI_GIRLS.zscore.monthly-7b0a8452.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-c7a6711c.js → BMI_GIRLS.zscore.weekly-10fa981a.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-41fe7a03.js → BMI_GIRLS.zscore.yearly-86482964.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-326df1d5.js → HEAD CIRCUM_BOYS.percentile.monthly-c87d51e6.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-bbe7f619.js → HEAD CIRCUM_BOYS.percentile.weekly-cc1d1a22.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-27104613.js → HEAD CIRCUM_BOYS.percentile.yearly-76cc4d8a.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-2e4619cf.js → HEAD CIRCUM_BOYS.zscore.monthly-18a9a090.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-a78f8880.js → HEAD CIRCUM_BOYS.zscore.weekly-312a883d.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-f553e13f.js → HEAD CIRCUM_BOYS.zscore.yearly-c918f331.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-ac5dd69d.js → HEAD CIRCUM_GIRLS.percentile.monthly-0a9191d1.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-4cb2a0d9.js → HEAD CIRCUM_GIRLS.percentile.weekly-18442675.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-4a7778ba.js → HEAD CIRCUM_GIRLS.percentile.yearly-691ccbf9.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-88b1c2a5.js → HEAD CIRCUM_GIRLS.zscore.monthly-c96d67dc.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-dac57086.js → HEAD CIRCUM_GIRLS.zscore.weekly-eed0f3ee.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-4995f2cc.js → HEAD CIRCUM_GIRLS.zscore.yearly-2e6de873.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-ff87c1a9.js → HEIGHT_BOYS.percentile.monthly-b8a74983.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-ca132b75.js → HEIGHT_BOYS.percentile.weekly-944fbdd3.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-864ea5eb.js → HEIGHT_BOYS.percentile.yearly-c4541aa4.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-6d037446.js → HEIGHT_BOYS.zscore.monthly-fa19c71b.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-cc604778.js → HEIGHT_BOYS.zscore.weekly-0a460484.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-ed9dc66b.js → HEIGHT_BOYS.zscore.yearly-16dbb592.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-6515c33f.js → HEIGHT_GIRLS.percentile.monthly-c3a6a864.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-901c4481.js → HEIGHT_GIRLS.percentile.weekly-05a915e9.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-98961052.js → HEIGHT_GIRLS.percentile.yearly-9942185e.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-1e632f3a.js → HEIGHT_GIRLS.zscore.monthly-011e55d1.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-72ddbcaf.js → HEIGHT_GIRLS.zscore.weekly-ae0032a1.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-6b5c18df.js → HEIGHT_GIRLS.zscore.yearly-9515029f.js} +0 -0
- /package/build/{Onboarding-7993a1aa.js → Onboarding-cfad3b99.js} +0 -0
- /package/build/{Visible-8bc11c55.js → Visible-99c68f0f.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-c09f2d80.js → WEIGHT_BOYS.percentile.monthly-2e0886ff.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-5b71127b.js → WEIGHT_BOYS.percentile.weekly-eaa5a8dd.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-4b535102.js → WEIGHT_BOYS.percentile.yearly-c9594485.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-12707c15.js → WEIGHT_BOYS.zscore.monthly-e0379a2e.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-9c55567e.js → WEIGHT_BOYS.zscore.weekly-f74730d3.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-f9cd8424.js → WEIGHT_BOYS.zscore.yearly-a0b2bc51.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-44bab69f.js → WEIGHT_GIRLS.percentile.monthly-f24efff6.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-4c28cc99.js → WEIGHT_GIRLS.percentile.weekly-3ad4f689.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-0d9195d0.js → WEIGHT_GIRLS.percentile.yearly-7cf6c50e.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-b1dce194.js → WEIGHT_GIRLS.zscore.monthly-e3cb6ae2.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-cfe9b3cc.js → WEIGHT_GIRLS.zscore.weekly-a1fc7740.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-13941be9.js → WEIGHT_GIRLS.zscore.yearly-e83afc07.js} +0 -0
- /package/build/{constants-1d32370a.js → constants-9c242146.js} +0 -0
- /package/build/{cookieHelper-cbd14b3e.js → cookieHelper-6203f88a.js} +0 -0
- /package/build/{dataTransform-21c87d7c.js → dataTransform-f2bc6834.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-9d42f590.js → BMI_BOYS.percentile.monthly-0d5ad19b.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-6839af28.js → BMI_BOYS.percentile.weekly-13c1ca9b.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-69bcb479.js → BMI_BOYS.percentile.yearly-12ac07ce.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-23f8c532.js → BMI_BOYS.zscore.monthly-e4c1507f.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-89115d9c.js → BMI_BOYS.zscore.weekly-f4f793ea.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-3306e312.js → BMI_BOYS.zscore.yearly-8119ce03.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-846e671f.js → BMI_GIRLS.percentile.monthly-acca1a4a.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-0078c970.js → BMI_GIRLS.percentile.weekly-5ef50131.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-ac9e9a93.js → BMI_GIRLS.percentile.yearly-1443032d.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-4d1f059f.js → BMI_GIRLS.zscore.monthly-1bf65223.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-ee5080e3.js → BMI_GIRLS.zscore.weekly-801084c2.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-51f17ff5.js → BMI_GIRLS.zscore.yearly-9115acc9.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-4e05e699.js → HEAD CIRCUM_BOYS.percentile.monthly-1bf37859.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-5f55a476.js → HEAD CIRCUM_BOYS.percentile.weekly-e7738c0f.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-0272d885.js → HEAD CIRCUM_BOYS.percentile.yearly-a3fc108f.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-d53f7a6f.js → HEAD CIRCUM_BOYS.zscore.monthly-e6407117.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-c2f4a9a0.js → HEAD CIRCUM_BOYS.zscore.weekly-feee7729.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-bee9d3d2.js → HEAD CIRCUM_BOYS.zscore.yearly-d6a14c6b.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-5ecd5dfc.js → HEAD CIRCUM_GIRLS.percentile.monthly-7730cf69.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-e517d104.js → HEAD CIRCUM_GIRLS.percentile.weekly-818f5e5c.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-9f2f1438.js → HEAD CIRCUM_GIRLS.percentile.yearly-e2fdd121.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-1873c64a.js → HEAD CIRCUM_GIRLS.zscore.monthly-646e4faf.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-09517ed4.js → HEAD CIRCUM_GIRLS.zscore.weekly-56af23ba.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-e1e972d1.js → HEAD CIRCUM_GIRLS.zscore.yearly-078974f7.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-2182b94f.js → HEIGHT_BOYS.percentile.monthly-bee990fa.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-738af159.js → HEIGHT_BOYS.percentile.weekly-aac39bfa.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-36e31bfe.js → HEIGHT_BOYS.percentile.yearly-32b4134f.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-f5535c86.js → HEIGHT_BOYS.zscore.monthly-5778778e.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-a697d0f4.js → HEIGHT_BOYS.zscore.weekly-83a94045.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-59787dee.js → HEIGHT_BOYS.zscore.yearly-de0adda9.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-d3f42671.js → HEIGHT_GIRLS.percentile.monthly-5837e957.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-21231514.js → HEIGHT_GIRLS.percentile.weekly-1b5acb53.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-0dbb8467.js → HEIGHT_GIRLS.percentile.yearly-6e9c04aa.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-36411acb.js → HEIGHT_GIRLS.zscore.monthly-a67d2e19.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-c015b3c4.js → HEIGHT_GIRLS.zscore.weekly-4e941b69.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-28728bba.js → HEIGHT_GIRLS.zscore.yearly-99bedd54.js} +0 -0
- /package/build/esm/{Onboarding-70785e8f.js → Onboarding-c0cfac18.js} +0 -0
- /package/build/esm/{Visible-80be40d5.js → Visible-c2e42d8a.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-f33b1c0c.js → WEIGHT_BOYS.percentile.monthly-6037d7a8.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-c49ec0f0.js → WEIGHT_BOYS.percentile.weekly-c15e5fe8.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-74b4142d.js → WEIGHT_BOYS.percentile.yearly-28119750.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-602b740f.js → WEIGHT_BOYS.zscore.monthly-70f9cb8e.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-01ae4068.js → WEIGHT_BOYS.zscore.weekly-b51300d2.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-7bf622b5.js → WEIGHT_BOYS.zscore.yearly-94939ebc.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-d6f39262.js → WEIGHT_GIRLS.percentile.monthly-03bc9790.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-f4125298.js → WEIGHT_GIRLS.percentile.weekly-0edda13d.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-7a0938b0.js → WEIGHT_GIRLS.percentile.yearly-135c174a.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-3ee18ba9.js → WEIGHT_GIRLS.zscore.monthly-6e2701b0.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-75d7f657.js → WEIGHT_GIRLS.zscore.weekly-b32a18db.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-3f77dac0.js → WEIGHT_GIRLS.zscore.yearly-c8f8b146.js} +0 -0
- /package/build/esm/{constants-124a0c69.js → constants-92019619.js} +0 -0
- /package/build/esm/{cookieHelper-c3ac9f5c.js → cookieHelper-4e12ad4b.js} +0 -0
- /package/build/esm/{dataTransform-d411ac2b.js → dataTransform-e5408977.js} +0 -0
- /package/build/esm/{index-f69aaefd.js → index-7a0ab473.js} +0 -0
- /package/build/esm/{isProduction-0a64196b.js → isProduction-b2d88eb1.js} +0 -0
- /package/build/esm/{localizeNumberFormat-83b574cc.js → localizeNumberFormat-ea835d1b.js} +0 -0
- /package/build/esm/{normalizeLink-4cf48bd4.js → normalizeLink-3bc92ac0.js} +0 -0
- /package/build/esm/{number-d62307a5.js → number-9f092e4b.js} +0 -0
- /package/build/esm/{paths-84e7b017.js → paths-24013383.js} +0 -0
- /package/build/esm/{screenSizeContext-bdf24fa6.js → screenSizeContext-4855603d.js} +0 -0
- /package/build/esm/{theme-72026c60.js → theme-05390e1a.js} +0 -0
- /package/build/esm/{translationsContext-1e2e6dff.js → translationsContext-9d561788.js} +0 -0
- /package/build/esm/{tslib.es6-287085c8.js → tslib.es6-a59ac7f2.js} +0 -0
- /package/build/esm/{types-ba260963.js → types-f88531b2.js} +0 -0
- /package/build/esm/{useIsInit-8d56ae19.js → useIsInit-5ace6ff2.js} +0 -0
- /package/build/esm/{useOutsideClick-8d3bf173.js → useOutsideClick-b2f40fe8.js} +0 -0
- /package/build/esm/{useScrollbarSize-773497db.js → useScrollbarSize-c8dc6432.js} +0 -0
- /package/build/esm/{useUniqueId-581c6a48.js → useUniqueId-6cb9ddef.js} +0 -0
- /package/build/{index-3cc148c2.js → index-6b40de15.js} +0 -0
- /package/build/{isProduction-b9a37b42.js → isProduction-b32e7dc2.js} +0 -0
- /package/build/{localizeNumberFormat-700f2f69.js → localizeNumberFormat-7bc188f6.js} +0 -0
- /package/build/{normalizeLink-819058cb.js → normalizeLink-5e6d567b.js} +0 -0
- /package/build/{number-d9ae8a16.js → number-311438cc.js} +0 -0
- /package/build/{paths-c0c06752.js → paths-8700fdcd.js} +0 -0
- /package/build/{screenSizeContext-8d8226dc.js → screenSizeContext-19c4826a.js} +0 -0
- /package/build/{theme-46d96035.js → theme-30b54bf9.js} +0 -0
- /package/build/{translationsContext-a0912c14.js → translationsContext-1ff6fee5.js} +0 -0
- /package/build/{tslib.es6-a8db223b.js → tslib.es6-b6b32e47.js} +0 -0
- /package/build/{types-fc0beaa8.js → types-af3ec16f.js} +0 -0
- /package/build/{useIsInit-62a53088.js → useIsInit-3403ada4.js} +0 -0
- /package/build/{useOutsideClick-4eed75cd.js → useOutsideClick-6917a729.js} +0 -0
- /package/build/{useScrollbarSize-e0d83678.js → useScrollbarSize-45efedb6.js} +0 -0
- /package/build/{useUniqueId-7740c2ea.js → useUniqueId-b9c05ea1.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle as o,useState as a,useRef as i,useEffect as l,useMemo as s,Fragment as m}from"react";import{_ as d,a as c}from"./tslib.es6-
|
|
1
|
+
import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle as o,useState as a,useRef as i,useEffect as l,useMemo as s,Fragment as m}from"react";import{_ as d,a as c}from"./tslib.es6-a59ac7f2.js";import{Box as p,Input as u,Grid as g,Title as b,Container as h,Stack as E,AspectRatio as f}from"@mantine/core";import{x as L,aG as v,K as C,aH as y,aI as x,aJ as w,H as S,y as M,L as P,I as j}from"./index.styles-82f67895.js";import{D as k}from"./index-2c0ef308.js";import"dayjs";import{M as O,k as F}from"./screenSizeContext-4855603d.js";import B from"styled-components";import{t as I}from"./theme-05390e1a.js";import{L as z}from"./index-5968a9b1.js";import"./isProduction-b2d88eb1.js";import{L as N}from"./Onboarding-c0cfac18.js";import"./gAssets.js";import{u as T}from"./useTranslations-7b0b4bfb.js";import"./index-fb88d784.js";import{useInterval as D,useCounter as Z}from"@mantine/hooks";import{A}from"./index-6fc847b9.js";import"lodash/debounce";import"./useCategory-a175adb8.js";import{V as _}from"./Visible-c2e42d8a.js";import{createFormContext as H,yupResolver as V}from"@mantine/form";import"./index-4db4b3b2.js";import"@mantine/dates";import*as q from"yup";import{createPortal as $}from"react-dom";import{B as U}from"./index-dae69259.js";import{b as Y}from"./index-4d69e3a6.js";import R from"lodash/throttle";import{T as W}from"./index-d3a5ab49.js";import{format as G}from"date-fns";import"./translationsContext-9d561788.js";import"string-format";import K from"react-keyed-flatten-children";import"@mantine/carousel";import"./useUniqueId-6cb9ddef.js";import"./cookieHelper-4e12ad4b.js";import"slugify";import"date-fns/locale";import"./utils-f23fae06.js";const J=t({currentStep:0,setCurrentStep:()=>!1,setMaxStep:()=>!1,nextStep:()=>!1,prevStep:()=>!1,isMarryBaby:!1,siteType:"helloSites",sharedData:{},setSharedData:()=>!1}),[Q,X,ee]=H(),te=B(p)`
|
|
2
2
|
.phone-input {
|
|
3
3
|
width: 100%;
|
|
4
4
|
margin-bottom: 32px;
|
|
@@ -15,7 +15,7 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
|
|
|
15
15
|
border-radius: 0 4px 4px 0;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
`,ne={[N.Vietnam]:"VN",[N.Cambodia]:"KH",[N.Indonesia]:"ID",[N.Malaysia]:"MY",[N.PhilippinesEnglish]:"PH",[N.PhilippinesTagalog]:"PH",[N.Taiwan]:"TW",[N.Thailand]:"TH",[N.Myanmar]:"MM"},re=(e="")=>{const t=e.indexOf("@"),n=e.substring(0,t),r=n.length>3?3:n.length;return e.replace(e.substring(r,t),e.slice(r,t).replace(/./g,"x"))},oe=t=>{var{inputOrder:n=["phone"],withSimilac:r=!1,customTerms:o="",formContext:a}=t,i=d(t,["inputOrder","withSimilac","customTerms","formContext"]);const{t:l}=T(),s=a||X(),m={phone:t=>{var{label:n,name:o="phone"}=t,a=d(t,["label","name"]);return e.createElement(u.Wrapper,{className:r?"input-control":"phone-input",withAsterisk:!0,label:n||r?e.createElement(L,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.similac.input.phone")):void 0},e.createElement(v,Object.assign({defaultCountry:ne[process.env.UNIFY_LOCALE]||"VN"},s.getInputProps(o),a)),e.createElement(u.Error,{size:"md"},s.errors.phone))},full_name:t=>{var{label:n,name:r="name"}=t,o=d(t,["label","name"]);return e.createElement(C,Object.assign({label:e.createElement(L,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.formEmail.yourName")),withAsterisk:!0},s.getInputProps(r),o))},email:t=>{var{label:n,name:r="email"}=t,o=d(t,["label","name"]);return e.createElement(C,Object.assign({label:e.createElement(L,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.formEmail.yourEmail")),withAsterisk:!0},s.getInputProps(r),o))},dob:t=>{var{label:n,name:r="dob"}=t,o=d(t,["label","name"]);return e.createElement(k,Object.assign({label:e.createElement(L,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.formEmail.yourBirthday")),placeholder:"DD/MM/YYYY"},s.getInputProps(r),o))},gender:t=>{var{label:n,name:r="gender"}=t,o=d(t,["label","name"]);return e.createElement(y.Group,Object.assign({className:"radio-group",label:e.createElement(L,{size:"s4",weight:"semiBold",as:"span"},n||l("bmi.selectGender"))},s.getInputProps(r),o),e.createElement(y,{value:"0",label:l("onboarding.formEmail.genderMale")}),e.createElement(y,{value:"1",label:l("onboarding.formEmail.genderFemale")}))},otp:({name:t="otp"})=>e.createElement("div",{className:"otp-input"},e.createElement(x,Object.assign({enterKeyHint:void 0,nonce:void 0},s.getInputProps(t))),e.createElement(u.Error,null,s.errors.otp)),password:({label:t,name:n="password"})=>e.createElement(C.Password,Object.assign({label:e.createElement(L,{size:"s4",weight:"semiBold",as:"span"},t||l("onboarding.updatePassword.password")),withAsterisk:!0,rightSection:e.createElement(_,null)},s.getInputProps(n))),confirm_password:({label:t,name:n="confirmPassword"})=>e.createElement(C.Password,Object.assign({label:e.createElement(L,{size:"s4",weight:"semiBold",as:"span"},t||l("onboarding.updatePassword.confirmPassword")),withAsterisk:!0,rightSection:e.createElement(_,null)},s.getInputProps(n))),term:({name:t="term",className:n=""})=>o?e.createElement("div",{style:{marginBottom:16},className:n},e.createElement(w,Object.assign({label:e.createElement(L,{size:"p4",as:"span",sx:{a:{color:"#2d87f3",fontWeight:"bold",letterSpacing:0}}},o)},s.getInputProps(t,{type:"checkbox"}),{error:null})),e.createElement(u.Error,{size:"md"},s.getInputProps("term",{type:"checkbox"}).error)):null,address:t=>{var{label:n,className:r="",name:o="address"}=t,a=d(t,["label","className","name"]);return e.createElement(A,Object.assign({className:`${r} input-control`,label:e.createElement(L,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.similac.input.address"))},s.getInputProps(o),a))}},c=n.map((e=>{var t;const n="string"==typeof e?{inputType:e}:e;return null===(t=m[n.inputType])||void 0===t?void 0:t.call(m,n)}));return e.createElement(te,Object.assign({},i),c)},ae=e=>q.object().shape({phone:q.string().required(e("onboarding.updatePhone.error")).default(""),name:q.string().required(e("onboarding.errorMessage.requiredName")),email:q.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),address:q.mixed().required(e("onboarding.similac.address.error")),term:q.bool().oneOf([!0],e("onboarding.similac.term.error"))});var ie=n(((t,n)=>{var{inputOrder:a,onSubmit:i,validateSchema:l,defaultValues:s,isActive:m,customTerms:u,customFormTexts:g}=t,b=d(t,["inputOrder","onSubmit","validateSchema","defaultValues","isActive","customTerms","customFormTexts"]);const{nextStep:h,setSharedData:E,sharedData:f}=r(J),{t:v}=T(),C=ee({initialValues:{term:!1,phone:(null==f?void 0:f.phone)||(null==s?void 0:s.phone)||"",email:(null==f?void 0:f.email)||(null==s?void 0:s.email)||"",name:(null==f?void 0:f.name)||(null==s?void 0:s.name)||""},validate:l||
|
|
18
|
+
`,ne={[N.Vietnam]:"VN",[N.Cambodia]:"KH",[N.Indonesia]:"ID",[N.Malaysia]:"MY",[N.PhilippinesEnglish]:"PH",[N.PhilippinesTagalog]:"PH",[N.Taiwan]:"TW",[N.Thailand]:"TH",[N.Myanmar]:"MM"},re=(e="")=>{const t=e.indexOf("@"),n=e.substring(0,t),r=n.length>3?3:n.length;return e.replace(e.substring(r,t),e.slice(r,t).replace(/./g,"x"))},oe=t=>{var{inputOrder:n=["phone"],withSimilac:r=!1,customTerms:o="",formContext:a}=t,i=d(t,["inputOrder","withSimilac","customTerms","formContext"]);const{t:l}=T(),s=a||X(),m={phone:t=>{var{label:n,name:o="phone"}=t,a=d(t,["label","name"]);return e.createElement(u.Wrapper,{className:r?"input-control":"phone-input",withAsterisk:!0,label:n||r?e.createElement(L,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.similac.input.phone")):void 0},e.createElement(v,Object.assign({defaultCountry:ne[process.env.UNIFY_LOCALE]||"VN"},s.getInputProps(o),a)),e.createElement(u.Error,{size:"md"},s.errors.phone))},full_name:t=>{var{label:n,name:r="name"}=t,o=d(t,["label","name"]);return e.createElement(C,Object.assign({label:e.createElement(L,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.formEmail.yourName")),withAsterisk:!0},s.getInputProps(r),o))},email:t=>{var{label:n,name:r="email"}=t,o=d(t,["label","name"]);return e.createElement(C,Object.assign({label:e.createElement(L,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.formEmail.yourEmail")),withAsterisk:!0},s.getInputProps(r),o))},dob:t=>{var{label:n,name:r="dob"}=t,o=d(t,["label","name"]);return e.createElement(k,Object.assign({label:e.createElement(L,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.formEmail.yourBirthday")),placeholder:"DD/MM/YYYY"},s.getInputProps(r),o))},gender:t=>{var{label:n,name:r="gender"}=t,o=d(t,["label","name"]);return e.createElement(y.Group,Object.assign({className:"radio-group",label:e.createElement(L,{size:"s4",weight:"semiBold",as:"span"},n||l("bmi.selectGender"))},s.getInputProps(r),o),e.createElement(y,{value:"0",label:l("onboarding.formEmail.genderMale")}),e.createElement(y,{value:"1",label:l("onboarding.formEmail.genderFemale")}))},otp:({name:t="otp"})=>e.createElement("div",{className:"otp-input"},e.createElement(x,Object.assign({enterKeyHint:void 0,nonce:void 0},s.getInputProps(t))),e.createElement(u.Error,null,s.errors.otp)),password:({label:t,name:n="password"})=>e.createElement(C.Password,Object.assign({label:e.createElement(L,{size:"s4",weight:"semiBold",as:"span"},t||l("onboarding.updatePassword.password")),withAsterisk:!0,rightSection:e.createElement(_,null)},s.getInputProps(n))),confirm_password:({label:t,name:n="confirmPassword"})=>e.createElement(C.Password,Object.assign({label:e.createElement(L,{size:"s4",weight:"semiBold",as:"span"},t||l("onboarding.updatePassword.confirmPassword")),withAsterisk:!0,rightSection:e.createElement(_,null)},s.getInputProps(n))),term:({name:t="term",className:n=""})=>o?e.createElement("div",{style:{marginBottom:16},className:n},e.createElement(w,Object.assign({label:e.createElement(L,{size:"p4",as:"span",sx:{a:{color:"#2d87f3",fontWeight:"bold",letterSpacing:0}}},o)},s.getInputProps(t,{type:"checkbox"}),{error:null})),e.createElement(u.Error,{size:"md"},s.getInputProps("term",{type:"checkbox"}).error)):null,address:t=>{var{label:n,className:r="",name:o="address"}=t,a=d(t,["label","className","name"]);return e.createElement(A,Object.assign({className:`${r} input-control`,label:e.createElement(L,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.similac.input.address"))},s.getInputProps(o),a))}},c=n.map((e=>{var t;const n="string"==typeof e?{inputType:e}:e;return null===(t=m[n.inputType])||void 0===t?void 0:t.call(m,n)}));return e.createElement(te,Object.assign({},i),c)},ae=e=>q.object().shape({phone:q.string().required(e("onboarding.updatePhone.error")).default(""),name:q.string().required(e("onboarding.errorMessage.requiredName")),email:q.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),address:q.mixed().required(e("onboarding.similac.address.error")),term:q.bool().oneOf([!0],e("onboarding.similac.term.error"))});var ie=n(((t,n)=>{var{inputOrder:a,onSubmit:i,validateSchema:l,defaultValues:s,isActive:m,customTerms:u,customFormTexts:g}=t,b=d(t,["inputOrder","onSubmit","validateSchema","defaultValues","isActive","customTerms","customFormTexts"]);const{nextStep:h,setSharedData:E,sharedData:f}=r(J),{t:v}=T(),C=ee({initialValues:{term:!1,phone:(null==f?void 0:f.phone)||(null==s?void 0:s.phone)||"",email:(null==f?void 0:f.email)||(null==s?void 0:s.email)||"",name:(null==f?void 0:f.name)||(null==s?void 0:s.name)||""},validate:l||V(ae(v))}),y=e=>c(void 0,void 0,void 0,(function*(){try{yield null==i?void 0:i(e),E((t=>Object.assign(Object.assign({},t),{phone:e.phone,email:e.email,name:e.name}))),h()}catch(e){console.error(e)}})),x=e=>{console.log(e)},w=()=>{var e;return null===(e=C.onSubmit(y,x))||void 0===e?void 0:e()};return o(n,(()=>({submitForm:w}))),e.createElement(p,Object.assign({"data-active":m},b),e.createElement(p,{sx:e=>({display:"flex",flexDirection:"column",gap:"16px",[e.fn.largerThan("md")]:{gap:"24px"}})},e.createElement(p,{sx:{textAlign:"center"}},e.createElement(S,{tag:"h4",as:"h2"},null==g?void 0:g.heading),e.createElement(L,{size:"p3"},null==g?void 0:g.description)),e.createElement(Q,{form:C},e.createElement("form",{className:"friso-form",style:{width:"100%"},onSubmit:C.onSubmit(y,x)},e.createElement(p,{sx:{".friso-form":{display:"flex",flexWrap:"wrap",gap:"8px",".input-control":{width:"100%",marginBottom:0},".phone-input":{marginBottom:"0 !important",".PhoneInput":{marginBottom:"0 !important"}}}}},e.createElement(oe,{inputOrder:a,customTerms:u,className:"friso-form"}))))))}));const le=B.div`
|
|
19
19
|
position: fixed;
|
|
20
20
|
inset: 0;
|
|
21
21
|
z-index: 1000;
|
|
@@ -51,7 +51,7 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
|
|
|
51
51
|
display: table-cell;
|
|
52
52
|
}
|
|
53
53
|
`,ce=B.div`
|
|
54
|
-
background-color: ${
|
|
54
|
+
background-color: ${I.colors.primary50};
|
|
55
55
|
border-radius: 12px;
|
|
56
56
|
height: 100%;
|
|
57
57
|
display: flex;
|
|
@@ -59,7 +59,7 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
|
|
|
59
59
|
justify-content: space-between;
|
|
60
60
|
|
|
61
61
|
&[data-is-marry-baby='true'] {
|
|
62
|
-
background-color: ${
|
|
62
|
+
background-color: ${I.mbColors.tonePink};
|
|
63
63
|
}
|
|
64
64
|
`,pe=B.div`
|
|
65
65
|
margin-top: 40px;
|
|
@@ -190,7 +190,7 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
|
|
|
190
190
|
}
|
|
191
191
|
`,Ce=B.img`
|
|
192
192
|
margin-bottom: 38px;
|
|
193
|
-
`,ye=t=>{var n,{heading:o,description:a,children:i,className:l,imgSrc:s,hiddenLogo:m=!1}=t,c=d(t,["heading","description","children","className","imgSrc","hiddenLogo"]);const{isMarryBaby:p,siteType:u}=r(J);return e.createElement(ve,Object.assign({},c,{className:`hhg-comp-onboarding-container ${l}`,size:"sm"}),!m&&e.createElement(P,{type:p?u:(null===(n=
|
|
193
|
+
`,ye=t=>{var n,{heading:o,description:a,children:i,className:l,imgSrc:s,hiddenLogo:m=!1}=t,c=d(t,["heading","description","children","className","imgSrc","hiddenLogo"]);const{isMarryBaby:p,siteType:u}=r(J);return e.createElement(ve,Object.assign({},c,{className:`hhg-comp-onboarding-container ${l}`,size:"sm"}),!m&&e.createElement(P,{type:p?u:(null===(n=z[process.env.UNIFY_LOCALE])||void 0===n?void 0:n.LOGO_TYPE)||"hellobacsi"}),e.createElement(Le,{className:m?"similac":""},s&&e.createElement(Ce,{src:s,loading:"lazy"}),e.createElement("div",{className:"header"},e.createElement(b,{order:3},o),e.createElement(L,{size:"p3",mt:8,color:I.colors.gray600},a)),i))},xe=B(Y)`
|
|
194
194
|
.phone-input {
|
|
195
195
|
width: 100%;
|
|
196
196
|
margin-bottom: 32px;
|
|
@@ -230,4 +230,4 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
|
|
|
230
230
|
&:not([data-active='true']) {
|
|
231
231
|
display: none !important;
|
|
232
232
|
}
|
|
233
|
-
`,Me=e=>q.object().shape({password:q.string().required(e("onboarding.errorMessage.requiredPassword")).min(8,e("onboarding.errorMessage.minLength",{length:8})).matches(/.*[A-Z].*/,e("onboarding.errorMessage.passWithPattern")).default(""),confirmPassword:q.string().required(e("onboarding.errorMessage.requiredConfirmPassword")).oneOf([q.ref("password"),null],e("onboarding.errorMessage.passNotMatch")).default("")}),Pe={Provider:({children:t,siteType:n,setSharedData:r})=>{const[o,i]=a(0),[s,m]=a(0),[d,c]=a({});return l((()=>{null==r||r(d)}),[d,r]),e.createElement(J.Provider,{value:{currentStep:o,setCurrentStep:i,setMaxStep:m,nextStep:()=>o+1<=s&&i(o+1),prevStep:()=>o-1>=0&&i(o-1),siteType:n,isMarryBaby:"marryBaby"===n,sharedData:d,setSharedData:c}},t)},Modal:t=>{var{children:n,withSimilac:o,banner:a,withPortal:i}=t,l=d(t,["children","withSimilac","banner","withPortal"]);const{isMobile:s}=M(),{isMarryBaby:m}=r(J),{t:c}=T();if(i&&"undefined"==typeof window)return null;const p=e.createElement(le,Object.assign({},l),e.createElement(se,null,e.createElement(g,{sx:{[O.mbDown]:{margin:0},".mantine-Grid-col":{[O.mbDown]:{padding:0}}}},e.createElement(g.Col,{span:"object"!=typeof a&&!o||s?12:6,order:o?2:1,orderMd:o?1:2,sx:{zIndex:o?99:void 0}},e.createElement(me,{"data-similac":o,"data-has-banner":"object"==typeof a},n)),a&&"object"==typeof a&&!o&&e.createElement(g.Col,{span:s?12:6,order:1,orderMd:2},e.createElement(de,null,e.createElement(ce,{"data-is-marry-baby":m},e.createElement(pe,null,a.heading&&e.createElement(b,{order:1,mb:24},a.heading),a.description&&e.createElement(L,{size:"p1",color:z.colors.gray800},c("onboarding.welcomeScreen.content"))),e.createElement(ue,null,a.imgSrc?e.createElement("img",{src:a.imgSrc,loading:"lazy"}):a.imgComponent?a.imgComponent:null)))),a&&"object"==typeof a&&o&&(a.imgSrc||a.imgComponent)&&e.createElement(g.Col,{span:"auto",order:1,orderMd:2},e.createElement(ue,{className:"similac"},a.imgSrc?e.createElement("img",{src:a.imgSrc,loading:"lazy"}):a.imgComponent?a.imgComponent:null)))));return i?$(p,F()):p},Form:({onClose:t,onSubmit:n,canSkip:o=!0,customFormTexts:a,isActive:i})=>{const{t:l}=T(),{sharedData:s,setSharedData:m,nextStep:d}=r(J),p=ee({initialValues:{phone:(null==s?void 0:s.phone)||""},validate:H(be(l))});return e.createElement(ge,{heading:(null==a?void 0:a.heading)||l("onboarding.updatePhone.heading"),description:(null==a?void 0:a.description)||l("onboarding.updatePhone.description"),"data-active":i},e.createElement(Q,{form:p},e.createElement("form",{onSubmit:p.onSubmit((e=>c(void 0,void 0,void 0,(function*(){try{m((t=>Object.assign(Object.assign({},t),{phone:e.phone}))),yield null==n?void 0:n(e.phone),d()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(oe,{inputOrder:["phone"]}),e.createElement(U,{color:"primary",isBlock:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},l("onboarding.button.continue")),o&&e.createElement(U,{color:"ghost",isBlock:!0,size:"lg",onClick:t,type:"button"},l("onboarding.button.skip")))))},OtpForm:{Email:({onSubmit:t,email:n,onResendCode:o,otpError:m,onClose:d,loading:p,canSkip:u})=>{const{sharedData:{email:g,retryEmailCount:b},setSharedData:h,prevStep:E,siteType:f,isMarryBaby:L,nextStep:v}=r(J),C=n||g||"",[y,x]=a(30),w=D((()=>x((e=>e-1))),1e3),[S,M]=Z(0,{min:0,max:3}),P=i(!0),{t:j}=T();l((()=>(w.start(),w.stop)),[]),l((()=>{0===y&&(w.stop(),P.current=!1)}),[y]);const k=ee({initialValues:{otp:""},validate:H(Ee(j))});l((()=>{m&&k.setFieldError("otp",m)}),[m]);const O=s((()=>R((()=>{P.current||(M.increment(),x(30),null==o||o(C),w.start(),P.current=!0)}),1e3,{trailing:!1})),[C,o,w]),F=b>=2;return e.createElement(he,{heading:j("onboarding.otpForm.heading"),description:e.createElement(e.Fragment,null,e.createElement("span",{dangerouslySetInnerHTML:{__html:j("onboarding.otpForm.descriptionEmail",{email:`<b style="color:${z.colors.gray800}">${re(C)}</b>`})}}),!F&&e.createElement("svg",{onClick:()=>{b>=2||(h((e=>Object.assign(Object.assign({},e),{retryEmailCount:e.retryEmailCount+1}))),E())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"otp-description-edit-icon"},e.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},e.createElement(Q,{form:k},e.createElement("form",{onSubmit:k.onSubmit((e=>c(void 0,void 0,void 0,(function*(){try{M.increment();!(yield null==t?void 0:t(e.otp))&&v()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(oe,{inputOrder:["otp"]}),e.createElement("div",{className:"resend"},e.createElement(W,{size:"p4",color:z.colors.gray400},j("onboarding.otpForm.notReceiveOTP")),e.createElement(W,{as:"a",size:"p4",color:L?z.mbColors.pink:z.colors.primaryBase,onClick:O},j("onboarding.otpForm.resendCode",{seconds:y}))),e.createElement(U,{theme:f,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:p,disabled:p,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},j("onboarding.button.continue")),u&&S>=3&&e.createElement(U,{theme:f,color:"ghost",isBlock:!0,size:"lg",onClick:d,type:"button"},j("onboarding.button.skip")))))},Phone:({onSubmit:t,phone:n,onResendCode:o,otpError:m,onClose:d,loading:p,canSkip:u})=>{const{sharedData:{phone:g,retryPhoneCount:b},setSharedData:h,prevStep:E,siteType:f,isMarryBaby:L,nextStep:v}=r(J),C=n||g||"",[y,x]=a(30),w=D((()=>x((e=>e-1))),1e3),[S,M]=Z(0,{min:0,max:3}),P=i(!0),{t:j}=T();l((()=>(w.start(),w.stop)),[]),l((()=>{0===y&&(w.stop(),P.current=!1)}),[y]);const k=ee({initialValues:{otp:""},validate:H(Ee(j))});l((()=>{m&&k.setFieldError("otp",m)}),[m]);const O=s((()=>R((()=>{P.current||(M.increment(),x(30),null==o||o(C),w.start(),P.current=!0)}),1e3,{trailing:!1})),[C,o,w]),F=b>=2;return e.createElement(he,{heading:j("onboarding.otpForm.heading"),description:e.createElement(e.Fragment,null,e.createElement("span",{dangerouslySetInnerHTML:{__html:j("onboarding.otpForm.description",{phone:`<b style="color:${z.colors.gray800}">${C.slice(0,-3).replace(/./g,"x").concat(C.slice(-3))}</b>`})}}),!F&&e.createElement("svg",{onClick:()=>{b>=2||(h((e=>Object.assign(Object.assign({},e),{retryPhoneCount:e.retryPhoneCount+1}))),E())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"otp-description-edit-icon"},e.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},e.createElement(Q,{form:k},e.createElement("form",{onSubmit:k.onSubmit((e=>c(void 0,void 0,void 0,(function*(){try{M.increment();!(yield null==t?void 0:t(e.otp))&&v()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(oe,{inputOrder:["otp"]}),e.createElement("div",{className:"resend"},e.createElement(W,{size:"p4",color:z.colors.gray400},j("onboarding.otpForm.notReceiveOTP")),e.createElement(W,{as:"a",size:"p4",color:L?z.mbColors.pink:z.colors.primaryBase,onClick:O},j("onboarding.otpForm.resendCode",{seconds:y}))),e.createElement(U,{theme:f,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:p,disabled:p,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},j("onboarding.button.continue")),u&&S>=3&&e.createElement(U,{theme:f,color:"ghost",isBlock:!0,size:"lg",onClick:d,type:"button"},j("onboarding.button.skip")))))}},PersonalInfoForm:({onClose:t,onSubmit:n,canSkip:o,loading:a,errorMessage:i,initialData:s})=>{const{t:m,locale:d}=T(),{siteType:p,isMarryBaby:u,setSharedData:g,nextStep:b}=r(J),h=ee({validate:H(fe(m))});return l((()=>{h.setValues(Object.assign(Object.assign({gender:"0"},s),(null==s?void 0:s.birthday)&&{birthday:new Date(s.birthday)}))}),[s]),l((()=>{i&&h.setFieldError("email",i)}),[i]),e.createElement(ye,{heading:m("onboarding.formEmail.heading"),description:m("onboarding.formEmail.description",{site:u?"Marry Baby":I[d].SITE_NAME_FORMATTED})},e.createElement(Q,{form:h},e.createElement("form",{className:"form",onSubmit:h.onSubmit((e=>c(void 0,void 0,void 0,(function*(){g((t=>Object.assign(Object.assign({},t),e)));!(yield null==n?void 0:n(Object.assign(Object.assign({},e),{birthday:e.birthday&&G(e.birthday,"yyyy-MM-dd")})))&&b()}))),(e=>{console.log({fieldErrors:e})}))},e.createElement(oe,{inputOrder:["full_name","email","dob","gender"]}),e.createElement(U,{color:"primary",isBlock:!0,size:"lg",type:"submit",theme:p,isLoading:a,disabled:a},m("onboarding.button.continue")),o&&e.createElement(U,{theme:p,color:"ghost",isBlock:!0,size:"lg",onClick:t,type:"button"},m("onboarding.button.skip")))))},ResultScreen:t=>{var{onClose:n}=t,o=d(t,["onClose"]);const{t:a}=T(),{siteType:i}=r(J);return e.createElement(ye,Object.assign({},o),e.createElement(U,{theme:i,size:"lg",onClick:n,className:"form-button"},a("onboarding.button.continue")))},SimilacForm:t=>{var{onClose:n,onSubmit:o,canSkip:a=!0,customFormTexts:i,customTerms:l,defaultValues:s,isActive:m}=t,p=d(t,["onClose","onSubmit","canSkip","customFormTexts","customTerms","defaultValues","isActive"]);const{t:u}=T(),{nextStep:g,setSharedData:b,sharedData:h}=r(J),{isMobile:E}=M(),f=ee({initialValues:{term:!1,phone:(null==h?void 0:h.phone)||(null==s?void 0:s.phone)||"",email:(null==h?void 0:h.email)||(null==s?void 0:s.email)||"",name:(null==h?void 0:h.name)||(null==s?void 0:s.name)||""},validate:H(we(u,!l))}),L=(null==s?void 0:s.email)?["full_name","phone","address","term"]:["full_name","email","phone","address","term"];return e.createElement(xe,Object.assign({heading:(null==i?void 0:i.heading)||u("onboarding.updatePhone.heading"),description:(null==i?void 0:i.description)||u("onboarding.updatePhone.description"),hiddenLogo:E,"data-active":m},p),e.createElement(Q,{form:f},e.createElement("form",{style:{width:"100%"},onSubmit:f.onSubmit((e=>c(void 0,void 0,void 0,(function*(){try{yield null==o?void 0:o(e),b((t=>Object.assign(Object.assign({},t),{phone:e.phone,email:e.email,name:e.name}))),g()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(oe,{inputOrder:L,withSimilac:!0,customTerms:l}),e.createElement(j,{fullWidth:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},u("onboarding.button.continue")),a&&e.createElement(j,{variant:"ghost",fullWidth:!0,size:"lg",onClick:n,type:"button"},u("onboarding.button.skip")))))},FrisoForm:ie,UpdatePasswordForm:({onClose:t,onSubmit:n,canSkip:o,errorMessage:a,loading:i})=>{const{t:l}=T(),{nextStep:s}=r(J),m=ee({initialValues:{password:"",confirmPassword:""},validate:H(Me(l))});return e.createElement(ye,{heading:l("onboarding.updatePassword.heading"),description:l("onboarding.updatePassword.description")},e.createElement(Q,{form:m},e.createElement("form",{className:"form",onSubmit:m.onSubmit((e=>c(void 0,void 0,void 0,(function*(){yield n((null==e?void 0:e.password)||""),!a&&s()}))),(e=>{console.log({fieldErrors:e})}))},e.createElement(oe,{inputOrder:["password","confirm_password"]}),e.createElement(U,{color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:i,disabled:i},l("onboarding.button.continue")),o&&e.createElement(U,{color:"ghost",isBlock:!0,size:"lg",onClick:t},l("onboarding.button.skip")),a&&e.createElement(u.Error,{className:"form-error"},a))))},StepRenderer:({children:t,onStepChange:n})=>{const{currentStep:o,setMaxStep:a}=r(J),i=e.Children.count(t);return l((()=>{null==n||n(o)}),[o]),l((()=>{a(i-1)}),[i]),e.createElement(e.Fragment,null,K(t).map(((t,n)=>{const r=n===o;return e.createElement(m,{key:n},e.isValidElement(t)?t.props.alwaysRender||r?e.cloneElement(t,{isActive:n===o,stepIndex:n}):null:r?t:null)})))},ThankYou:t=>{var{onClose:n,thanksPageInfo:r,isActive:o}=t,a=d(t,["onClose","thanksPageInfo","isActive"]);const{t:i}=T(),{isMobile:l}=M();return e.createElement(Se,Object.assign({heading:"",description:"",hiddenLogo:l,"data-active":o},a),e.createElement(h,{fluid:!0},e.createElement(E,{align:"center",spacing:8,w:"100%",ta:"center"},e.createElement(f,{ratio:1,w:{base:120,md:160}},e.createElement("svg",{width:"160",height:"160",viewBox:"0 0 160 160",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("mask",{id:"mask0_4580_96805",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"160",height:"160"},e.createElement("circle",{cx:"80",cy:"80",r:"80",fill:"url(#paint0_radial_4580_96805)"})),e.createElement("g",{mask:"url(#mask0_4580_96805)"},e.createElement("path",{d:"M71.5938 0.45906L76.9763 38.1373C77.0115 38.1373 77.0819 38.1373 77.1171 38.102L82.3589 75.0033L87.5656 38.0666C87.6008 38.0666 87.636 38.0666 87.636 38.0666L92.8426 1.02406C88.6562 0.353123 84.3642 0 80.0018 0C77.1522 0 74.3378 0.141249 71.5938 0.45906Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M131.15 18.5391C125.733 14.0191 119.682 10.1701 113.173 7.20386L97.8699 41.0683C97.9051 41.0683 97.9403 41.1037 97.9403 41.1037L82.4609 75.2859L131.15 18.5391Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M46.4386 64.8334L82.1114 75.3212H81.9707L82.3225 75.4271H82.3577L82.3928 75.3918L82.428 75.4271H82.3928L82.428 75.4624H82.4632L82.6039 75.5331L82.4984 75.4624L118.347 85.9855C118.347 86.0208 118.347 86.0208 118.312 86.0561L158.101 97.8151C159.332 92.2005 160.001 86.3386 160.001 80.3355C160.001 78.6758 159.93 76.9809 159.86 75.3565H119.825C119.825 75.3918 119.825 75.3918 119.825 75.4271L82.4632 75.4624V75.4271L82.6391 75.3918L82.4984 75.4624L82.815 75.3565H82.6391L155.497 53.6394C153.07 46.7182 149.728 40.2208 145.612 34.2883L82.6391 75.2859H82.4984L82.5687 75.2152L82.4632 75.2859L82.4984 75.074L82.428 75.2152V75.2506L82.3928 75.2859V75.2506H82.3225V75.2152L82.2521 75.074L82.2873 75.2506L82.2169 75.2152L82.2521 75.2506H82.1114L15.7614 32.4167C11.2231 38.5258 7.52917 45.341 4.85547 52.6154L46.4386 64.8334ZM82.3225 75.3918V75.4271L82.2169 75.3565L82.3225 75.3918Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M57.8032 46.9301L82.2887 75.2506L66.7741 41.1036L50.556 5.61475C43.6607 8.33379 37.2579 12.0063 31.4531 16.4556L57.8032 46.9301Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M113.877 95.8023L82.5312 75.5684L106.982 103.854C106.946 103.854 106.946 103.889 106.911 103.889L136.005 137.647C141.529 132.209 146.243 125.994 150.042 119.179L113.877 95.8023Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.3203 75.427V75.4627H82.356L82.3203 75.427H82.356H82.3203Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.2857 75.4623L82.321 75.427H82.2857L82.1445 75.4976L82.2857 75.4623Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.2164 75.5684L50.9411 95.9436C50.906 95.9082 50.906 95.8729 50.8708 95.8376L11.3281 121.51C15.4794 128.501 20.6861 134.787 26.7019 140.19L62.5858 98.4507L82.2164 75.5684Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M46.438 86.0559L82.2867 75.3916L0.140721 75.4975C0.0351803 77.0866 0 78.6756 0 80.3C0 86.7975 0.773967 93.1184 2.21636 99.1921L46.438 86.0559C46.438 86.0912 46.438 86.0912 46.438 86.0559Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.2507 75.7095L47 153.467C54.2823 156.786 62.1275 159.011 70.3949 160L82.2507 75.7095Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.4609 75.7095L94.3519 159.329C102.373 157.881 109.972 155.233 116.938 151.56L82.4609 75.7095Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.3203 75.5684L82.3556 75.8509L82.4262 75.5684L82.3556 75.4978L82.3203 75.5684Z",fill:"#E0F8EE"})),e.createElement("path",{d:"M124.694 61.2L124.986 62.1726C125.083 62.6589 125.472 62.9507 125.959 63.1452L126.931 63.437L125.959 63.8261C125.569 63.9234 125.18 64.3124 125.083 64.7015L124.694 65.7714L124.305 64.7015C124.111 64.3124 123.819 64.0206 123.43 63.8261L122.457 63.5343L123.43 63.2425C123.819 63.1452 124.111 62.7562 124.305 62.3671L124.694 61.2Z",fill:"#2D87F3"}),e.createElement("path",{d:"M104.744 34.2856L104.915 34.8571C104.973 35.1428 105.201 35.3142 105.487 35.4285L106.058 35.5999L105.487 35.8285C105.258 35.8856 105.03 36.1142 104.973 36.3428L104.744 36.9714L104.515 36.3428C104.401 36.1142 104.23 35.9428 104.001 35.8285L103.43 35.6571L104.001 35.4856C104.23 35.4285 104.401 35.1999 104.515 34.9714L104.744 34.2856Z",fill:"#00B16A"}),e.createElement("path",{d:"M118.345 38L119.088 40.4C119.431 41.4857 120.288 42.3429 121.317 42.6286L123.717 43.3714L121.259 44.2286C120.231 44.5714 119.488 45.3714 119.145 46.3429L118.288 48.8L117.317 46.2286C116.974 45.2571 116.174 44.5143 115.202 44.1714L112.859 43.3714L115.145 42.5714C116.117 42.2286 116.859 41.4857 117.259 40.5714L118.345 38Z",fill:"#FFB521"}),e.createElement("path",{d:"M41.8846 98.8572L42.056 99.4286C42.1132 99.7143 42.3417 99.8857 42.6275 100L43.1989 100.171L42.6275 100.4C42.3989 100.457 42.1703 100.686 42.1132 100.914L41.8846 101.543L41.656 100.914C41.5417 100.686 41.3703 100.514 41.1417 100.4L40.5703 100.229L41.1417 100.057C41.3703 100 41.5417 99.7715 41.656 99.5429L41.8846 98.8572Z",fill:"#00B16A"}),e.createElement("path",{d:"M64.5717 125.314L65.3145 127.714C65.6574 128.8 66.5145 129.657 67.5431 129.943L69.9431 130.686L67.4859 131.543C66.4574 131.886 65.7145 132.686 65.3717 133.657L64.5145 136.114L63.5431 133.543C63.2002 132.571 62.4002 131.828 61.4288 131.486L59.0859 130.686L61.3717 129.886C62.3431 129.543 63.0859 128.8 63.4859 127.886L64.5717 125.314Z",fill:"#FFB521"}),e.createElement("path",{d:"M80.9708 120.343L81.2565 121.314C81.3708 121.771 81.7708 122.114 82.1708 122.228L83.1993 122.514L82.1708 122.857C81.7708 122.971 81.4279 123.314 81.3136 123.714L80.9708 124.743L80.5708 123.657C80.3993 123.257 80.1136 122.914 79.7136 122.8L78.7422 122.457L79.7136 122.114C80.1136 122 80.3993 121.657 80.5708 121.314L80.9708 120.343Z",fill:"#2D87F3"}),e.createElement("path",{d:"M130.307 98.2856L130.529 99.0426C130.619 99.3988 130.93 99.666 131.242 99.755L132.043 99.9777L131.242 100.245C130.93 100.334 130.663 100.601 130.574 100.913L130.307 101.714L129.995 100.868C129.862 100.557 129.639 100.289 129.327 100.2L128.57 99.9331L129.327 99.666C129.639 99.5769 129.862 99.3098 129.995 99.0426L130.307 98.2856Z",fill:"#00B16A"}),e.createElement("path",{d:"M36.592 64L36.8147 64.757C36.9037 65.1132 37.2154 65.3803 37.5271 65.4694L38.3286 65.692L37.5271 65.9592C37.2154 66.0482 36.9482 66.3154 36.8592 66.6271L36.592 67.4286L36.2803 66.5826C36.1467 66.2709 35.9241 66.0037 35.6124 65.9147L34.8555 65.6475L35.6124 65.3803C35.9241 65.2913 36.1467 65.0241 36.2803 64.757L36.592 64Z",fill:"#FFB521"}),e.createElement("path",{d:"M67.3816 26.8572L67.6734 27.8298C67.7707 28.3161 68.1597 28.6079 68.646 28.8025L69.6187 29.0942L68.646 29.4833C68.257 29.5806 67.8679 29.9696 67.7707 30.3587L67.3816 31.4286L66.9926 30.3587C66.798 29.9696 66.5062 29.6778 66.1172 29.4833L65.1445 29.1915L66.1172 28.8997C66.5062 28.8025 66.798 28.4134 66.9926 28.0243L67.3816 26.8572Z",fill:"#2D87F3"}),e.createElement("path",{d:"M80.0011 108.572C95.7807 108.572 108.573 95.7797 108.573 80.0001C108.573 64.2206 95.7807 51.4287 80.0011 51.4287C64.2216 51.4287 51.4297 64.2206 51.4297 80.0001C51.4297 95.7797 64.2216 108.572 80.0011 108.572Z",fill:"#00B16A"}),e.createElement("path",{d:"M78.5808 89.1451C77.3597 89.147 76.1503 88.908 75.0217 88.4418C73.8932 87.9757 72.8677 87.2914 72.0039 86.4283L68.6389 83.0617C68.1939 82.6009 67.9477 81.9838 67.9532 81.3432C67.9588 80.7027 68.2157 80.0899 68.6687 79.6369C69.1217 79.1839 69.7344 78.927 70.375 78.9214C71.0156 78.9159 71.6327 79.1621 72.0935 79.6071L75.4585 82.9738C75.8649 83.3802 76.3473 83.7025 76.8783 83.9225C77.4093 84.1424 77.9784 84.2556 78.5531 84.2556C79.1278 84.2556 79.6969 84.1424 80.2279 83.9225C80.7589 83.7025 81.2413 83.3802 81.6477 82.9738L102.984 63.6911C103.468 63.2745 104.095 63.0635 104.732 63.1034C105.369 63.1433 105.965 63.4308 106.392 63.9044C106.82 64.3781 107.046 65.0003 107.02 65.6379C106.995 66.2756 106.722 66.8781 106.258 67.3166L85.0046 86.513C84.1599 87.3531 83.1576 88.0181 82.0552 88.4698C80.9528 88.9215 79.7721 89.151 78.5808 89.1451Z",fill:"white"}),e.createElement("defs",null,e.createElement("radialGradient",{id:"paint0_radial_4580_96805",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(80 80) rotate(90) scale(80)"},e.createElement("stop",{stopColor:"#C4C4C4"}),e.createElement("stop",{offset:"1",stopColor:"#C4C4C4",stopOpacity:"0"}))))),e.createElement(S,{tag:"h3"},null==r?void 0:r.title),e.createElement(L,{size:"p3",color:"gray.6"},null==r?void 0:r.description),e.createElement(j,{mt:{base:16,md:24},fullWidth:l,size:"lg",onClick:n},i("similac.thankYou.done")))))}};export{oe as DynamicForm,ne as MAPPED_LOCALE,Pe as Onboarding,J as OnboardingContext};
|
|
233
|
+
`,Me=e=>q.object().shape({password:q.string().required(e("onboarding.errorMessage.requiredPassword")).min(8,e("onboarding.errorMessage.minLength",{length:8})).matches(/.*[A-Z].*/,e("onboarding.errorMessage.passWithPattern")).default(""),confirmPassword:q.string().required(e("onboarding.errorMessage.requiredConfirmPassword")).oneOf([q.ref("password"),null],e("onboarding.errorMessage.passNotMatch")).default("")}),Pe={Provider:({children:t,siteType:n,setSharedData:r})=>{const[o,i]=a(0),[s,m]=a(0),[d,c]=a({});return l((()=>{null==r||r(d)}),[d,r]),e.createElement(J.Provider,{value:{currentStep:o,setCurrentStep:i,setMaxStep:m,nextStep:()=>o+1<=s&&i(o+1),prevStep:()=>o-1>=0&&i(o-1),siteType:n,isMarryBaby:"marryBaby"===n,sharedData:d,setSharedData:c}},t)},Modal:t=>{var{children:n,withSimilac:o,banner:a,withPortal:i}=t,l=d(t,["children","withSimilac","banner","withPortal"]);const{isMobile:s}=M(),{isMarryBaby:m}=r(J),{t:c}=T();if(i&&"undefined"==typeof window)return null;const p=e.createElement(le,Object.assign({},l),e.createElement(se,null,e.createElement(g,{sx:{[O.mbDown]:{margin:0},".mantine-Grid-col":{[O.mbDown]:{padding:0}}}},e.createElement(g.Col,{span:"object"!=typeof a&&!o||s?12:6,order:o?2:1,orderMd:o?1:2,sx:{zIndex:o?99:void 0}},e.createElement(me,{"data-similac":o,"data-has-banner":"object"==typeof a},n)),a&&"object"==typeof a&&!o&&e.createElement(g.Col,{span:s?12:6,order:1,orderMd:2},e.createElement(de,null,e.createElement(ce,{"data-is-marry-baby":m},e.createElement(pe,null,a.heading&&e.createElement(b,{order:1,mb:24},a.heading),a.description&&e.createElement(L,{size:"p1",color:I.colors.gray800},c("onboarding.welcomeScreen.content"))),e.createElement(ue,null,a.imgSrc?e.createElement("img",{src:a.imgSrc,loading:"lazy"}):a.imgComponent?a.imgComponent:null)))),a&&"object"==typeof a&&o&&(a.imgSrc||a.imgComponent)&&e.createElement(g.Col,{span:"auto",order:1,orderMd:2},e.createElement(ue,{className:"similac"},a.imgSrc?e.createElement("img",{src:a.imgSrc,loading:"lazy"}):a.imgComponent?a.imgComponent:null)))));return i?$(p,F()):p},Form:({onClose:t,onSubmit:n,canSkip:o=!0,customFormTexts:a,isActive:i})=>{const{t:l}=T(),{sharedData:s,setSharedData:m,nextStep:d}=r(J),p=ee({initialValues:{phone:(null==s?void 0:s.phone)||""},validate:V(be(l))});return e.createElement(ge,{heading:(null==a?void 0:a.heading)||l("onboarding.updatePhone.heading"),description:(null==a?void 0:a.description)||l("onboarding.updatePhone.description"),"data-active":i},e.createElement(Q,{form:p},e.createElement("form",{onSubmit:p.onSubmit((e=>c(void 0,void 0,void 0,(function*(){try{m((t=>Object.assign(Object.assign({},t),{phone:e.phone}))),yield null==n?void 0:n(e.phone),d()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(oe,{inputOrder:["phone"]}),e.createElement(U,{color:"primary",isBlock:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},l("onboarding.button.continue")),o&&e.createElement(U,{color:"ghost",isBlock:!0,size:"lg",onClick:t,type:"button"},l("onboarding.button.skip")))))},OtpForm:{Email:({onSubmit:t,email:n,onResendCode:o,otpError:m,onClose:d,loading:p,canSkip:u})=>{const{sharedData:{email:g,retryEmailCount:b},setSharedData:h,prevStep:E,siteType:f,isMarryBaby:L,nextStep:v}=r(J),C=n||g||"",[y,x]=a(30),w=D((()=>x((e=>e-1))),1e3),[S,M]=Z(0,{min:0,max:3}),P=i(!0),{t:j}=T();l((()=>(w.start(),w.stop)),[]),l((()=>{0===y&&(w.stop(),P.current=!1)}),[y]);const k=ee({initialValues:{otp:""},validate:V(Ee(j))});l((()=>{m&&k.setFieldError("otp",m)}),[m]);const O=s((()=>R((()=>{P.current||(M.increment(),x(30),null==o||o(C),w.start(),P.current=!0)}),1e3,{trailing:!1})),[C,o,w]),F=b>=2;return e.createElement(he,{heading:j("onboarding.otpForm.heading"),description:e.createElement(e.Fragment,null,e.createElement("span",{dangerouslySetInnerHTML:{__html:j("onboarding.otpForm.descriptionEmail",{email:`<b style="color:${I.colors.gray800}">${re(C)}</b>`})}}),!F&&e.createElement("svg",{onClick:()=>{b>=2||(h((e=>Object.assign(Object.assign({},e),{retryEmailCount:e.retryEmailCount+1}))),E())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"otp-description-edit-icon"},e.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},e.createElement(Q,{form:k},e.createElement("form",{onSubmit:k.onSubmit((e=>c(void 0,void 0,void 0,(function*(){try{M.increment();!(yield null==t?void 0:t(e.otp))&&v()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(oe,{inputOrder:["otp"]}),e.createElement("div",{className:"resend"},e.createElement(W,{size:"p4",color:I.colors.gray400},j("onboarding.otpForm.notReceiveOTP")),e.createElement(W,{as:"a",size:"p4",color:L?I.mbColors.pink:I.colors.primaryBase,onClick:O},j("onboarding.otpForm.resendCode",{seconds:y}))),e.createElement(U,{theme:f,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:p,disabled:p,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},j("onboarding.button.continue")),u&&S>=3&&e.createElement(U,{theme:f,color:"ghost",isBlock:!0,size:"lg",onClick:d,type:"button"},j("onboarding.button.skip")))))},Phone:({onSubmit:t,phone:n,onResendCode:o,otpError:m,onClose:d,loading:p,canSkip:u})=>{const{sharedData:{phone:g,retryPhoneCount:b},setSharedData:h,prevStep:E,siteType:f,isMarryBaby:L,nextStep:v}=r(J),C=n||g||"",[y,x]=a(30),w=D((()=>x((e=>e-1))),1e3),[S,M]=Z(0,{min:0,max:3}),P=i(!0),{t:j}=T();l((()=>(w.start(),w.stop)),[]),l((()=>{0===y&&(w.stop(),P.current=!1)}),[y]);const k=ee({initialValues:{otp:""},validate:V(Ee(j))});l((()=>{m&&k.setFieldError("otp",m)}),[m]);const O=s((()=>R((()=>{P.current||(M.increment(),x(30),null==o||o(C),w.start(),P.current=!0)}),1e3,{trailing:!1})),[C,o,w]),F=b>=2;return e.createElement(he,{heading:j("onboarding.otpForm.heading"),description:e.createElement(e.Fragment,null,e.createElement("span",{dangerouslySetInnerHTML:{__html:j("onboarding.otpForm.description",{phone:`<b style="color:${I.colors.gray800}">${C.slice(0,-3).replace(/./g,"x").concat(C.slice(-3))}</b>`})}}),!F&&e.createElement("svg",{onClick:()=>{b>=2||(h((e=>Object.assign(Object.assign({},e),{retryPhoneCount:e.retryPhoneCount+1}))),E())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"otp-description-edit-icon"},e.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},e.createElement(Q,{form:k},e.createElement("form",{onSubmit:k.onSubmit((e=>c(void 0,void 0,void 0,(function*(){try{M.increment();!(yield null==t?void 0:t(e.otp))&&v()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(oe,{inputOrder:["otp"]}),e.createElement("div",{className:"resend"},e.createElement(W,{size:"p4",color:I.colors.gray400},j("onboarding.otpForm.notReceiveOTP")),e.createElement(W,{as:"a",size:"p4",color:L?I.mbColors.pink:I.colors.primaryBase,onClick:O},j("onboarding.otpForm.resendCode",{seconds:y}))),e.createElement(U,{theme:f,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:p,disabled:p,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},j("onboarding.button.continue")),u&&S>=3&&e.createElement(U,{theme:f,color:"ghost",isBlock:!0,size:"lg",onClick:d,type:"button"},j("onboarding.button.skip")))))}},PersonalInfoForm:({onClose:t,onSubmit:n,canSkip:o,loading:a,errorMessage:i,initialData:s})=>{const{t:m,locale:d}=T(),{siteType:p,isMarryBaby:u,setSharedData:g,nextStep:b}=r(J),h=ee({validate:V(fe(m))});return l((()=>{h.setValues(Object.assign(Object.assign({gender:"0"},s),(null==s?void 0:s.birthday)&&{birthday:new Date(s.birthday)}))}),[s]),l((()=>{i&&h.setFieldError("email",i)}),[i]),e.createElement(ye,{heading:m("onboarding.formEmail.heading"),description:m("onboarding.formEmail.description",{site:u?"Marry Baby":z[d].SITE_NAME_FORMATTED})},e.createElement(Q,{form:h},e.createElement("form",{className:"form",onSubmit:h.onSubmit((e=>c(void 0,void 0,void 0,(function*(){g((t=>Object.assign(Object.assign({},t),e)));!(yield null==n?void 0:n(Object.assign(Object.assign({},e),{birthday:e.birthday&&G(e.birthday,"yyyy-MM-dd")})))&&b()}))),(e=>{console.log({fieldErrors:e})}))},e.createElement(oe,{inputOrder:["full_name","email","dob","gender"]}),e.createElement(U,{color:"primary",isBlock:!0,size:"lg",type:"submit",theme:p,isLoading:a,disabled:a},m("onboarding.button.continue")),o&&e.createElement(U,{theme:p,color:"ghost",isBlock:!0,size:"lg",onClick:t,type:"button"},m("onboarding.button.skip")))))},ResultScreen:t=>{var{onClose:n}=t,o=d(t,["onClose"]);const{t:a}=T(),{siteType:i}=r(J);return e.createElement(ye,Object.assign({},o),e.createElement(U,{theme:i,size:"lg",onClick:n,className:"form-button"},a("onboarding.button.continue")))},SimilacForm:t=>{var{onClose:n,onSubmit:o,canSkip:a=!0,customFormTexts:i,customTerms:l,defaultValues:s,isActive:m}=t,p=d(t,["onClose","onSubmit","canSkip","customFormTexts","customTerms","defaultValues","isActive"]);const{t:u}=T(),{nextStep:g,setSharedData:b,sharedData:h}=r(J),{isMobile:E}=M(),f=ee({initialValues:{term:!1,phone:(null==h?void 0:h.phone)||(null==s?void 0:s.phone)||"",email:(null==h?void 0:h.email)||(null==s?void 0:s.email)||"",name:(null==h?void 0:h.name)||(null==s?void 0:s.name)||""},validate:V(we(u,!l))}),L=(null==s?void 0:s.email)?["full_name","phone","address","term"]:["full_name","email","phone","address","term"];return e.createElement(xe,Object.assign({heading:(null==i?void 0:i.heading)||u("onboarding.updatePhone.heading"),description:(null==i?void 0:i.description)||u("onboarding.updatePhone.description"),hiddenLogo:E,"data-active":m},p),e.createElement(Q,{form:f},e.createElement("form",{style:{width:"100%"},onSubmit:f.onSubmit((e=>c(void 0,void 0,void 0,(function*(){try{yield null==o?void 0:o(e),b((t=>Object.assign(Object.assign({},t),{phone:e.phone,email:e.email,name:e.name}))),g()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(oe,{inputOrder:L,withSimilac:!0,customTerms:l}),e.createElement(j,{fullWidth:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},u("onboarding.button.continue")),a&&e.createElement(j,{variant:"ghost",fullWidth:!0,size:"lg",onClick:n,type:"button"},u("onboarding.button.skip")))))},FrisoForm:ie,UpdatePasswordForm:({onClose:t,onSubmit:n,canSkip:o,errorMessage:a,loading:i})=>{const{t:l}=T(),{nextStep:s}=r(J),m=ee({initialValues:{password:"",confirmPassword:""},validate:V(Me(l))});return e.createElement(ye,{heading:l("onboarding.updatePassword.heading"),description:l("onboarding.updatePassword.description")},e.createElement(Q,{form:m},e.createElement("form",{className:"form",onSubmit:m.onSubmit((e=>c(void 0,void 0,void 0,(function*(){yield n((null==e?void 0:e.password)||""),!a&&s()}))),(e=>{console.log({fieldErrors:e})}))},e.createElement(oe,{inputOrder:["password","confirm_password"]}),e.createElement(U,{color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:i,disabled:i},l("onboarding.button.continue")),o&&e.createElement(U,{color:"ghost",isBlock:!0,size:"lg",onClick:t},l("onboarding.button.skip")),a&&e.createElement(u.Error,{className:"form-error"},a))))},StepRenderer:({children:t,onStepChange:n})=>{const{currentStep:o,setMaxStep:a}=r(J),i=e.Children.count(t);return l((()=>{null==n||n(o)}),[o]),l((()=>{a(i-1)}),[i]),e.createElement(e.Fragment,null,K(t).map(((t,n)=>{const r=n===o;return e.createElement(m,{key:n},e.isValidElement(t)?t.props.alwaysRender||r?e.cloneElement(t,{isActive:n===o,stepIndex:n}):null:r?t:null)})))},ThankYou:t=>{var{onClose:n,thanksPageInfo:r,isActive:o}=t,a=d(t,["onClose","thanksPageInfo","isActive"]);const{t:i}=T(),{isMobile:l}=M();return e.createElement(Se,Object.assign({heading:"",description:"",hiddenLogo:l,"data-active":o},a),e.createElement(h,{fluid:!0},e.createElement(E,{align:"center",spacing:8,w:"100%",ta:"center"},e.createElement(f,{ratio:1,w:{base:120,md:160}},e.createElement("svg",{width:"160",height:"160",viewBox:"0 0 160 160",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("mask",{id:"mask0_4580_96805",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"160",height:"160"},e.createElement("circle",{cx:"80",cy:"80",r:"80",fill:"url(#paint0_radial_4580_96805)"})),e.createElement("g",{mask:"url(#mask0_4580_96805)"},e.createElement("path",{d:"M71.5938 0.45906L76.9763 38.1373C77.0115 38.1373 77.0819 38.1373 77.1171 38.102L82.3589 75.0033L87.5656 38.0666C87.6008 38.0666 87.636 38.0666 87.636 38.0666L92.8426 1.02406C88.6562 0.353123 84.3642 0 80.0018 0C77.1522 0 74.3378 0.141249 71.5938 0.45906Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M131.15 18.5391C125.733 14.0191 119.682 10.1701 113.173 7.20386L97.8699 41.0683C97.9051 41.0683 97.9403 41.1037 97.9403 41.1037L82.4609 75.2859L131.15 18.5391Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M46.4386 64.8334L82.1114 75.3212H81.9707L82.3225 75.4271H82.3577L82.3928 75.3918L82.428 75.4271H82.3928L82.428 75.4624H82.4632L82.6039 75.5331L82.4984 75.4624L118.347 85.9855C118.347 86.0208 118.347 86.0208 118.312 86.0561L158.101 97.8151C159.332 92.2005 160.001 86.3386 160.001 80.3355C160.001 78.6758 159.93 76.9809 159.86 75.3565H119.825C119.825 75.3918 119.825 75.3918 119.825 75.4271L82.4632 75.4624V75.4271L82.6391 75.3918L82.4984 75.4624L82.815 75.3565H82.6391L155.497 53.6394C153.07 46.7182 149.728 40.2208 145.612 34.2883L82.6391 75.2859H82.4984L82.5687 75.2152L82.4632 75.2859L82.4984 75.074L82.428 75.2152V75.2506L82.3928 75.2859V75.2506H82.3225V75.2152L82.2521 75.074L82.2873 75.2506L82.2169 75.2152L82.2521 75.2506H82.1114L15.7614 32.4167C11.2231 38.5258 7.52917 45.341 4.85547 52.6154L46.4386 64.8334ZM82.3225 75.3918V75.4271L82.2169 75.3565L82.3225 75.3918Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M57.8032 46.9301L82.2887 75.2506L66.7741 41.1036L50.556 5.61475C43.6607 8.33379 37.2579 12.0063 31.4531 16.4556L57.8032 46.9301Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M113.877 95.8023L82.5312 75.5684L106.982 103.854C106.946 103.854 106.946 103.889 106.911 103.889L136.005 137.647C141.529 132.209 146.243 125.994 150.042 119.179L113.877 95.8023Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.3203 75.427V75.4627H82.356L82.3203 75.427H82.356H82.3203Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.2857 75.4623L82.321 75.427H82.2857L82.1445 75.4976L82.2857 75.4623Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.2164 75.5684L50.9411 95.9436C50.906 95.9082 50.906 95.8729 50.8708 95.8376L11.3281 121.51C15.4794 128.501 20.6861 134.787 26.7019 140.19L62.5858 98.4507L82.2164 75.5684Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M46.438 86.0559L82.2867 75.3916L0.140721 75.4975C0.0351803 77.0866 0 78.6756 0 80.3C0 86.7975 0.773967 93.1184 2.21636 99.1921L46.438 86.0559C46.438 86.0912 46.438 86.0912 46.438 86.0559Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.2507 75.7095L47 153.467C54.2823 156.786 62.1275 159.011 70.3949 160L82.2507 75.7095Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.4609 75.7095L94.3519 159.329C102.373 157.881 109.972 155.233 116.938 151.56L82.4609 75.7095Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.3203 75.5684L82.3556 75.8509L82.4262 75.5684L82.3556 75.4978L82.3203 75.5684Z",fill:"#E0F8EE"})),e.createElement("path",{d:"M124.694 61.2L124.986 62.1726C125.083 62.6589 125.472 62.9507 125.959 63.1452L126.931 63.437L125.959 63.8261C125.569 63.9234 125.18 64.3124 125.083 64.7015L124.694 65.7714L124.305 64.7015C124.111 64.3124 123.819 64.0206 123.43 63.8261L122.457 63.5343L123.43 63.2425C123.819 63.1452 124.111 62.7562 124.305 62.3671L124.694 61.2Z",fill:"#2D87F3"}),e.createElement("path",{d:"M104.744 34.2856L104.915 34.8571C104.973 35.1428 105.201 35.3142 105.487 35.4285L106.058 35.5999L105.487 35.8285C105.258 35.8856 105.03 36.1142 104.973 36.3428L104.744 36.9714L104.515 36.3428C104.401 36.1142 104.23 35.9428 104.001 35.8285L103.43 35.6571L104.001 35.4856C104.23 35.4285 104.401 35.1999 104.515 34.9714L104.744 34.2856Z",fill:"#00B16A"}),e.createElement("path",{d:"M118.345 38L119.088 40.4C119.431 41.4857 120.288 42.3429 121.317 42.6286L123.717 43.3714L121.259 44.2286C120.231 44.5714 119.488 45.3714 119.145 46.3429L118.288 48.8L117.317 46.2286C116.974 45.2571 116.174 44.5143 115.202 44.1714L112.859 43.3714L115.145 42.5714C116.117 42.2286 116.859 41.4857 117.259 40.5714L118.345 38Z",fill:"#FFB521"}),e.createElement("path",{d:"M41.8846 98.8572L42.056 99.4286C42.1132 99.7143 42.3417 99.8857 42.6275 100L43.1989 100.171L42.6275 100.4C42.3989 100.457 42.1703 100.686 42.1132 100.914L41.8846 101.543L41.656 100.914C41.5417 100.686 41.3703 100.514 41.1417 100.4L40.5703 100.229L41.1417 100.057C41.3703 100 41.5417 99.7715 41.656 99.5429L41.8846 98.8572Z",fill:"#00B16A"}),e.createElement("path",{d:"M64.5717 125.314L65.3145 127.714C65.6574 128.8 66.5145 129.657 67.5431 129.943L69.9431 130.686L67.4859 131.543C66.4574 131.886 65.7145 132.686 65.3717 133.657L64.5145 136.114L63.5431 133.543C63.2002 132.571 62.4002 131.828 61.4288 131.486L59.0859 130.686L61.3717 129.886C62.3431 129.543 63.0859 128.8 63.4859 127.886L64.5717 125.314Z",fill:"#FFB521"}),e.createElement("path",{d:"M80.9708 120.343L81.2565 121.314C81.3708 121.771 81.7708 122.114 82.1708 122.228L83.1993 122.514L82.1708 122.857C81.7708 122.971 81.4279 123.314 81.3136 123.714L80.9708 124.743L80.5708 123.657C80.3993 123.257 80.1136 122.914 79.7136 122.8L78.7422 122.457L79.7136 122.114C80.1136 122 80.3993 121.657 80.5708 121.314L80.9708 120.343Z",fill:"#2D87F3"}),e.createElement("path",{d:"M130.307 98.2856L130.529 99.0426C130.619 99.3988 130.93 99.666 131.242 99.755L132.043 99.9777L131.242 100.245C130.93 100.334 130.663 100.601 130.574 100.913L130.307 101.714L129.995 100.868C129.862 100.557 129.639 100.289 129.327 100.2L128.57 99.9331L129.327 99.666C129.639 99.5769 129.862 99.3098 129.995 99.0426L130.307 98.2856Z",fill:"#00B16A"}),e.createElement("path",{d:"M36.592 64L36.8147 64.757C36.9037 65.1132 37.2154 65.3803 37.5271 65.4694L38.3286 65.692L37.5271 65.9592C37.2154 66.0482 36.9482 66.3154 36.8592 66.6271L36.592 67.4286L36.2803 66.5826C36.1467 66.2709 35.9241 66.0037 35.6124 65.9147L34.8555 65.6475L35.6124 65.3803C35.9241 65.2913 36.1467 65.0241 36.2803 64.757L36.592 64Z",fill:"#FFB521"}),e.createElement("path",{d:"M67.3816 26.8572L67.6734 27.8298C67.7707 28.3161 68.1597 28.6079 68.646 28.8025L69.6187 29.0942L68.646 29.4833C68.257 29.5806 67.8679 29.9696 67.7707 30.3587L67.3816 31.4286L66.9926 30.3587C66.798 29.9696 66.5062 29.6778 66.1172 29.4833L65.1445 29.1915L66.1172 28.8997C66.5062 28.8025 66.798 28.4134 66.9926 28.0243L67.3816 26.8572Z",fill:"#2D87F3"}),e.createElement("path",{d:"M80.0011 108.572C95.7807 108.572 108.573 95.7797 108.573 80.0001C108.573 64.2206 95.7807 51.4287 80.0011 51.4287C64.2216 51.4287 51.4297 64.2206 51.4297 80.0001C51.4297 95.7797 64.2216 108.572 80.0011 108.572Z",fill:"#00B16A"}),e.createElement("path",{d:"M78.5808 89.1451C77.3597 89.147 76.1503 88.908 75.0217 88.4418C73.8932 87.9757 72.8677 87.2914 72.0039 86.4283L68.6389 83.0617C68.1939 82.6009 67.9477 81.9838 67.9532 81.3432C67.9588 80.7027 68.2157 80.0899 68.6687 79.6369C69.1217 79.1839 69.7344 78.927 70.375 78.9214C71.0156 78.9159 71.6327 79.1621 72.0935 79.6071L75.4585 82.9738C75.8649 83.3802 76.3473 83.7025 76.8783 83.9225C77.4093 84.1424 77.9784 84.2556 78.5531 84.2556C79.1278 84.2556 79.6969 84.1424 80.2279 83.9225C80.7589 83.7025 81.2413 83.3802 81.6477 82.9738L102.984 63.6911C103.468 63.2745 104.095 63.0635 104.732 63.1034C105.369 63.1433 105.965 63.4308 106.392 63.9044C106.82 64.3781 107.046 65.0003 107.02 65.6379C106.995 66.2756 106.722 66.8781 106.258 67.3166L85.0046 86.513C84.1599 87.3531 83.1576 88.0181 82.0552 88.4698C80.9528 88.9215 79.7721 89.151 78.5808 89.1451Z",fill:"white"}),e.createElement("defs",null,e.createElement("radialGradient",{id:"paint0_radial_4580_96805",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(80 80) rotate(90) scale(80)"},e.createElement("stop",{stopColor:"#C4C4C4"}),e.createElement("stop",{offset:"1",stopColor:"#C4C4C4",stopOpacity:"0"}))))),e.createElement(S,{tag:"h3"},null==r?void 0:r.title),e.createElement(L,{size:"p3",color:"gray.6"},null==r?void 0:r.description),e.createElement(j,{mt:{base:16,md:24},fullWidth:l,size:"lg",onClick:n},i("similac.thankYou.done")))))}};export{oe as DynamicForm,ne as MAPPED_LOCALE,Pe as Onboarding,J as OnboardingContext};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const PATHS: {
|
|
2
|
+
GET_SUGGESTED_TOPIC: string;
|
|
3
|
+
GET_NEWSLETTER_CATEGORIES: string;
|
|
4
|
+
POST_SUBSCRIPTION: string;
|
|
5
|
+
TEMP_POST_SUBSCRIPTION: string;
|
|
6
|
+
TEMP_POST_SUBSCRIPTION_OFFICIAL: string;
|
|
7
|
+
TEMP_GET_NEWSLETTER_CATEGORIES: string;
|
|
8
|
+
GET_SUBSCRIPTION_CATEGORIES: string;
|
|
9
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type NewsletterTopicApi = {
|
|
2
|
+
id: string;
|
|
3
|
+
external_id: number;
|
|
4
|
+
name: string;
|
|
5
|
+
thumbnail: string;
|
|
6
|
+
is_trending: number;
|
|
7
|
+
site_id: number;
|
|
8
|
+
bgColor?: string;
|
|
9
|
+
};
|
|
10
|
+
export type NewsletterTopic = {
|
|
11
|
+
bgColor?: string;
|
|
12
|
+
catId: string;
|
|
13
|
+
engName: string;
|
|
14
|
+
guid?: string;
|
|
15
|
+
localName: string;
|
|
16
|
+
ranking: string;
|
|
17
|
+
template?: string;
|
|
18
|
+
};
|
|
19
|
+
export type PreferContent = {
|
|
20
|
+
title: string;
|
|
21
|
+
description: string;
|
|
22
|
+
icon: string;
|
|
23
|
+
checked: boolean;
|
|
24
|
+
id: number;
|
|
25
|
+
};
|
|
26
|
+
export type NewsletterCategoryApi = {
|
|
27
|
+
trending: Array<NewsletterTopic>;
|
|
28
|
+
recently: Array<NewsletterTopic>;
|
|
29
|
+
interested: Array<NewsletterTopic>;
|
|
30
|
+
};
|
package/build/esm/pwg.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e,{useMemo as t,useState as r,useRef as
|
|
1
|
+
import e,{useMemo as t,useState as r,useRef as a}from"react";import{M as l,a as o}from"./index-634bfb22.js";import{T as n}from"./index-d3a5ab49.js";import{P as i}from"./index-4c061256.js";import{u as c}from"./useTranslations-7b0b4bfb.js";import{t as s}from"./theme-05390e1a.js";import{ResponsiveContainer as m,AreaChart as d,CartesianGrid as p,Tooltip as g,XAxis as y,YAxis as u,Area as b,ReferenceDot as h}from"recharts";import{C as f}from"./index-fb88d784.js";import{a as x}from"./useOutsideClick-b2f40fe8.js";import E from"styled-components";import{_ as k}from"./tslib.es6-a59ac7f2.js";import"./Onboarding-c0cfac18.js";import"./index.styled-894b40c7.js";import"./gAssets.js";import"./index-5968a9b1.js";import"date-fns/locale";import"./isProduction-b2d88eb1.js";import"./translationsContext-9d561788.js";import"string-format";import"@mantine/carousel";import"@mantine/core";import"@mantine/hooks";const w=t=>{const{x:r,y:a,payload:l,activeWeek:o}=t;return o===l.value?e.createElement("g",{transform:`translate(${r},${a})`},e.createElement("circle",{r:12,fill:"marryBaby"===t.siteType?s.mbColors.pink:s.colors.primaryBase}),e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:s.colors.white,fontFamily:"Inter",fontWeight:"600",fontSize:"12px"},l.value)):e.createElement("g",{transform:`translate(${r},${a})`},e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:s.colors.gray600,fontFamily:"Inter",fontWeight:"400",fontSize:"12px"},l.value))},v=E.div`
|
|
2
2
|
/* position: absolute; */
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
@@ -18,7 +18,7 @@ import e,{useMemo as t,useState as r,useRef as l}from"react";import{M as a,a as
|
|
|
18
18
|
display: flex;
|
|
19
19
|
align-items: center;
|
|
20
20
|
padding: 4px 8px;
|
|
21
|
-
background: ${
|
|
21
|
+
background: ${s.colors.yellow600};
|
|
22
22
|
border-radius: 3px;
|
|
23
23
|
} */
|
|
24
24
|
& > * {
|
|
@@ -55,14 +55,14 @@ import e,{useMemo as t,useState as r,useRef as l}from"react";import{M as a,a as
|
|
|
55
55
|
align-items: center;
|
|
56
56
|
gap: 4px;
|
|
57
57
|
}
|
|
58
|
-
`,T=[{name:"overweight",backgroundColor:
|
|
58
|
+
`,T=[{name:"overweight",backgroundColor:s.colors.yellow50,color:s.colors.yellow900},{name:"underweight",backgroundColor:s.colors.yellow50,color:s.colors.yellow900},{name:"healthy",backgroundColor:s.colors.green50,color:s.colors.green900}],B=r=>{var a,l,o,i,c;const{payload:m,active:d}=r,p=null===(a=null==m?void 0:m[0])||void 0===a?void 0:a.payload;if(!p||!p.toolTipLabel||!d)return null;const{backgroundColor:g,color:y}=t((()=>T.find((e=>e.name===p.status))),[null==p?void 0:p.status]);return e.createElement(v,null,e.createElement("div",null,null===(l=p.toolTipLabel)||void 0===l?void 0:l[0]," ",null===(o=p.toolTipLabel)||void 0===o?void 0:o[1]),e.createElement("div",null,(null===(i=p.toolTipLabel)||void 0===i?void 0:i[2])&&e.createElement(n,{as:"span",size:"s3",color:s.colors.gray800,type:"semiBold"},null===(c=p.toolTipLabel)||void 0===c?void 0:c[2]),e.createElement("div",{className:"risk",style:{backgroundColor:g}},e.createElement(n,{size:"n1",color:y},p.translatedStatus))))},W=({weightByWeek:e,weightBefore:t,toolTipLabel:r,status:a,activeWeek:l,t:o})=>{const n=o(`bmi.result.${a}`);return e.map((e=>Object.assign({name:e.week,min:t+e.min,difference:e.max-e.min,max:t+e.max},e.week===l?{toolTipLabel:r,translatedStatus:n,status:a}:{})))},z=({weightBefore:o,weightByWeek:i,activeWeek:E,currentWeight:k,toolTipLabel:v=[],status:C,withLine:T=!1,siteType:z})=>{const{t:L}=c(),S="marryBaby"===z,O=t((()=>W({weightByWeek:i,weightBefore:o,toolTipLabel:v,status:C,activeWeek:E,t:L})),[i,o,v,C,E]),[F,I]=r(!1),M=a(null);return x(M,(()=>I(!1))),e.createElement(j,null,S?e.createElement(l,{type:"bodytext-3",color:s.mbColors.dark}," ",L("babyGrowth.weight")," ",L("pregnancyWeightGain.weightInput.desc")):e.createElement(n,{size:"n1",color:s.colors.gray500},L("babyGrowth.weight")," ",L("pregnancyWeightGain.weightInput.desc")),Array.isArray(O)&&O.length>0&&e.createElement(j,null,e.createElement(m,{height:388,className:"chart"},e.createElement(d,{data:O,margin:{top:16,right:0,left:0}},e.createElement(p,{stroke:s.colors.neutral100}),e.createElement(g,{trigger:"click",content:t=>e.createElement(B,Object.assign({active:!T&&F&&void 0!==E&&void 0!==k},t))}),e.createElement(y,{type:"number",scale:"linear",ticks:Array.from({length:40},((e,t)=>t+1)),dataKey:"name",tickLine:!1,tickMargin:12,tick:t=>e.createElement(w,Object.assign({},t,{activeWeek:E,siteType:z})),domain:["dataMin","dataMax"],interval:"preserveStartEnd",tickCount:1,allowDecimals:!1}),e.createElement(u,{domain:[e=>Math.max(e,o-10||e),e=>Math.max(e,o+20||e)],type:"number",scale:"auto",interval:"preserveStartEnd",tickLine:!1,tickMargin:7,width:45,tickCount:10,allowDecimals:!0,tickFormatter:e=>String(Math.round(100*(e+Number.EPSILON))/100),tick:{fontFamily:"Inter",fontWeight:400,fontSize:12,color:s.colors.gray600}}),e.createElement(b,{connectNulls:!0,type:"monotone",dataKey:"min",stackId:"1",stroke:"transparent",fill:"transparent"}),e.createElement(b,{connectNulls:!0,type:"monotone",dataKey:"difference",stackId:"1",stroke:"transparent",fill:S?s.mbColors.tonePink:s.colors.primary100}),void 0!==E&&void 0!==k&&e.createElement(h,{onClick:()=>I(!0),x:0===E?1:E,y:k,r:4,shape:e.createElement(f,{ref:M,r:4}),fill:S?s.mbColors.pink:s.colors.primaryBase,stroke:S?s.mbColors.pink:s.colors.primaryBase}))),e.createElement("div",{className:"custom-chart-label"},e.createElement("i",null),S?e.createElement(l,{type:"bodytext-3",color:s.mbColors.dark},L("pregnancy.week")):e.createElement(n,{size:"n1",color:s.colors.gray500},L("pregnancy.week")))))},L=t=>{var{color:r}=t,a=k(t,["color"]);return e.createElement("svg",Object.assign({width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),e.createElement("circle",{cx:"4",cy:"4",r:"4",fill:r||s.colors.primaryBase}))},S=({idealWeight:t,siteType:r})=>{const{t:a}=c(),o="marryBaby"===r;return e.createElement(C,null,e.createElement("div",null,o?e.createElement(e.Fragment,null,e.createElement(L,{color:s.mbColors.lightPink}),e.createElement(l,{type:"bodytext-3",color:s.mbColors.dark},a("pregnancyTool.weightSuggested")," ",e.createElement(n,{size:"n1",color:s.colors.gray800,type:"bold",as:"span"},t))):e.createElement(e.Fragment,null,e.createElement(L,{color:s.colors.primary100}),e.createElement(n,{size:"n1",color:s.colors.gray600},e.createElement(n,{size:"n1",as:"span"},a("pregnancyTool.weightSuggested")," "),e.createElement(n,{size:"n1",color:s.colors.gray800,type:"bold",as:"span"},t)))),e.createElement("div",null,o?e.createElement(e.Fragment,null,e.createElement(L,{color:s.mbColors.pink}),e.createElement(l,{type:"bodytext-3",color:s.mbColors.dark},a("pwg.placeholder.weight"))):e.createElement(e.Fragment,null,e.createElement(L,null),e.createElement(n,{size:"n1",color:s.colors.gray600},a("pwg.placeholder.weight")))))},O=E.div`
|
|
59
59
|
display: flex;
|
|
60
60
|
flex-direction: column;
|
|
61
61
|
align-items: center;
|
|
62
62
|
padding: 24px 16px;
|
|
63
63
|
width: 100%;
|
|
64
64
|
gap: 24px;
|
|
65
|
-
border: 1px solid ${
|
|
65
|
+
border: 1px solid ${s.colors.neutral100};
|
|
66
66
|
border-radius: 8px;
|
|
67
67
|
.chart-header {
|
|
68
68
|
text-align: center;
|
|
@@ -70,4 +70,4 @@ import e,{useMemo as t,useState as r,useRef as l}from"react";import{M as a,a as
|
|
|
70
70
|
> div {
|
|
71
71
|
width: 100%;
|
|
72
72
|
}
|
|
73
|
-
`,F=({chartProps:t,pillCarouselProps:r,idealWeight:
|
|
73
|
+
`,F=({chartProps:t,pillCarouselProps:r,idealWeight:a,description:l,siteType:m})=>{const{t:d}=c(),p="marryBaby"===m;return e.createElement(O,null,e.createElement("div",{className:"chart-header"},p?e.createElement(o,{type:"h3",color:s.mbColors.dark},d("pregnancyTool.weightSuggested")):e.createElement(n,{size:"s1",type:"semiBold",color:s.colors.gray800},d("pregnancyTool.weightSuggested")),l&&l),e.createElement(i,Object.assign({},r)),e.createElement("div",null,e.createElement(S,{idealWeight:a,siteType:m}),e.createElement(z,Object.assign({},t,{siteType:m}))))};export{F as PregnancyWeightGainChart};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e}from"./index-
|
|
1
|
+
import{d as e}from"./index-5968a9b1.js";import{i as s}from"./isProduction-b2d88eb1.js";const t=(t,o)=>{if("undefined"!=typeof window)return window.location.origin;const r="development"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return r?"http://localhost:3000":`https://${!r&&!s?o?"fe.":"discover.":o?"www.":""}${e[o?"vi-VN_MB":t]}`},o=(t,o)=>process.env.UNIFY_SSO_API||`https://${s?"id.":"staging-id."}${e[o?"vi-VN_MB":t]}`,r=()=>process.env.UNIFY_INTERNAL_TOGETHER_API||process.env.UNIFY_TOGETHER_API||`https://${s?"together.":"staging-together."}hellohealthgroup.com`,n=t=>process.env.UNIFY_DISCOVER_API||`https://${s?"wp.":"staging."}${e[t]}`,i=()=>process.env.UNIFY_INTERNAL_CARE_API||process.env.UNIFY_CARE_API||`https://${s?"health-care.":"service-health-care."}hellohealthgroup.com`;export{o as a,r as b,n as c,i as d,t as g};
|
|
@@ -30,6 +30,12 @@ export declare const getMarryBabyApiPath: (path: string, params?: {
|
|
|
30
30
|
export declare const getCarePath: (path: string, params?: {
|
|
31
31
|
[key: string]: string | number;
|
|
32
32
|
}) => string;
|
|
33
|
+
export declare const getPremiumApiPath: (path: string, params?: {
|
|
34
|
+
[key: string]: string | number;
|
|
35
|
+
}) => string;
|
|
36
|
+
export declare const getSsoApiPath: (path: string, params?: {
|
|
37
|
+
[key: string]: string | number;
|
|
38
|
+
}) => string;
|
|
33
39
|
type ApiOptions = RequestInit & {
|
|
34
40
|
data?: any;
|
|
35
41
|
};
|
|
@@ -23,6 +23,7 @@ export type UserInfo = {
|
|
|
23
23
|
first_time_bookmark?: boolean;
|
|
24
24
|
provider?: string;
|
|
25
25
|
_togetherUserId?: string;
|
|
26
|
+
subscription?: number;
|
|
26
27
|
};
|
|
27
28
|
export type PushNotificationPayloadType = {
|
|
28
29
|
message: string;
|
|
@@ -46,6 +47,7 @@ export type TogetherComponentGlobalContextType = {
|
|
|
46
47
|
marryBabyApiUrl?: string;
|
|
47
48
|
marryBabyProdApiUrl?: string;
|
|
48
49
|
careBaseApiUrl?: string;
|
|
50
|
+
premiumBaseApiUrl?: string;
|
|
49
51
|
};
|
|
50
52
|
router?: {
|
|
51
53
|
asPath?: string;
|
package/build/esm/together.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{k as CardAuthor,C as CardReactions,i as LabelSortPin,j as LabelSorting,L as Loading,v as PopoverMenu,l as PopupDoctor,P as PopupExpert,n as PopupFrame,m as PopupHospital,q as PostContent,s as ProfileDetail,r as ProfileDetailModal,p as ShareBox,o as SharePopup,w as SourceList,t as TabNameInProfileDetail,h as TagTopic,f as TogetherAuthConfigContext,g as TogetherAuthConfigContextProvider,u as useTogetherAuthRequiredAction}from"./_topic-616fda4c.js";export{d as TogetherDataTransforms,U as UserAvatar}from"./index.styled-76288999.js";export{C as CardLink,i as CardPost,j as CardPostPopoverMore,k as CardReply,l as CardReplyPopover,a as CreateNewPostContent,b as CreatePostDescription,c as CreatePostTitle,d as ImagePreviewPopup,I as InputCommentBar,L as LabelPin,P as PopupDanger,f as PostImagePreview,e as PostSingleImageViewPopup,h as SkipQuestionOfExpertBtn,g as SocialLinkPreview,S as SubmitReportForm,t as TogetherTypes,T as TopicSelectList,V as VerifiedTag}from"./types-0e6afe78.js";export{D as DefaultComponentGlobalContextData,G as GlobalData,d as TogetherComponentGlobalContext,e as TogetherComponentGlobalContextProvider,c as TogetherConstants}from"./index.styles-82f67895.js";import"./screenSizeContext-4855603d.js";import"styled-components";import"react";import"lodash/throttle";import"./tslib.es6-a59ac7f2.js";import"@mantine/core";import"./useTranslations-7b0b4bfb.js";import"./translationsContext-9d561788.js";import"string-format";import"./index-d3a5ab49.js";import"./index-fb88d784.js";import"@mantine/carousel";import"@mantine/hooks";import"./index-dae69259.js";import"./gAssets.js";import"./index-5968a9b1.js";import"date-fns/locale";import"./Onboarding-c0cfac18.js";import"./isProduction-b2d88eb1.js";import"./index-de57ecd9.js";import"./index-4db4b3b2.js";import"./theme-05390e1a.js";import"dayjs";import"./useUniqueId-6cb9ddef.js";import"@mantine/dates";import"lodash/debounce";import"./useCategory-a175adb8.js";import"innertext";import"date-fns";import"react-day-picker/DayPickerInput";import"react-dom";import"./index-da6144c5.js";import"./index-634bfb22.js";import"./index-890f07f7.js";import"./types-f88531b2.js";import"react-hook-form";import"@hookform/resolvers/yup";import"./index-656071c0.js";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./index.styled-894b40c7.js";import"uuid";import"./utils-f23fae06.js";import"./cookieHelper-4e12ad4b.js";import"./number-9f092e4b.js";import"dayjs/plugin/relativeTime";import"./paths-24013383.js";import"./constants-92019619.js";import"./index-7433ba52.js";import"react-contenteditable";import"js-cookie";import"@mantine/form";import"lodash/flatten";import"lodash/uniqBy";import"./routing-210e19d0.js";import"./index-fe39531b.js";import"react-keyed-flatten-children";import"slugify";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,_ as t}from"./tslib.es6-a59ac7f2.js";import o,{useContext as n,useState as a,useRef as l,useEffect as i,useMemo as s,useCallback as r}from"react";import{useMantineTheme as c,Checkbox as d,Portal as m,Popover as u}from"@mantine/core";import{bu as p,i as v,bv as g,bw as h,bx as y,by as C,bz as E,bA as k,L as w,bB as f,bC as b,bD as N,bE as I,bF as x,bG as P,bH as T,bI as M,a as j,bJ as _,n as L,bK as S,bL as z,bM as B,bN as A,bO as O,bP as F,bQ as D,bR as R,bS as U,bT as V,bU as $,bV as Z,bW as H,bX as W,bY as Q,bZ as K,b_ as G,u as q,o as J,b$ as Y,r as X,s as ee,g as te,c0 as oe,k as ne,q as ae,c1 as le,C as ie,c2 as se,c3 as re,h as ce}from"./_topic-616fda4c.js";import{u as de}from"./useTranslations-7b0b4bfb.js";import me from"innertext";import{t as ue}from"./theme-05390e1a.js";import{d as pe,A as ve,e as ge,f as he,I as ye}from"./index-4db4b3b2.js";import{d as Ce,a4 as Ee,N as ke,O as we,aw as fe,H as be,M as Ne,ax as Ie,x as xe,I as Pe,ay as Te,az as Me,a5 as je,ad as _e,ac as Le,aA as Se,ae as ze}from"./index.styles-82f67895.js";import"@mantine/dates";import{d as Be}from"./index-5968a9b1.js";import"./Onboarding-c0cfac18.js";import{CommonGAssets as Ae}from"./gAssets.js";import"dayjs";import{o as Oe,t as Fe,k as De}from"./screenSizeContext-4855603d.js";import"styled-components";import"./isProduction-b2d88eb1.js";import{I as Re}from"./index-fb88d784.js";import"@mantine/hooks";import{B as Ue,D as Ve}from"./index-fe39531b.js";import{ar as $e,an as Ze,U as He,as as We}from"./index.styled-76288999.js";import{T as Qe}from"./index-d3a5ab49.js";import{I as Ke}from"./index-de57ecd9.js";import Ge from"lodash/debounce";import qe from"react-contenteditable";import"./useCategory-a175adb8.js";import{B as Je}from"./index-dae69259.js";import*as Ye from"react-dom";import"date-fns";import"react-day-picker/DayPickerInput";import"./index-da6144c5.js";import"lodash/throttle";import"./types-f88531b2.js";import"react-hook-form";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./index.styled-894b40c7.js";import"uuid";import"./utils-f23fae06.js";import"js-cookie";import"@mantine/form";import"lodash/flatten";import"lodash/uniqBy";import"string-format";const Xe=({title:t,url:s,image:r,logo:d,className:m,style:u,noRefetch:v})=>{const{data:{locale:g,env:{isMarryBaby:h}}}=n(Ce),[y,C]=a(!1),E=c(),k=l(v);k.current=v;const[w,f]=a(null);i((()=>{e(void 0,void 0,void 0,(function*(){if(!k.current){if(!s)return f(null);f((e=>Object.assign(Object.assign({},e),{isFetching:!0}))),Ee(ke(we.FETCH_PREVIEW,{_locale:g}),"POST",{data:{link:s},headers:{"Content-Type":"application/json"}}).then((e=>{var t,o,n;C(!1),f({title:null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.title,url:s,image:(null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.image)||(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.logo)})})).catch((()=>{f(null)}))}}))}),[s]);const b=(null==w?void 0:w.image)||r,N=(null==w?void 0:w.title)||t,I=(null==w?void 0:w.logo)||d,x=(null==w?void 0:w.url)||s,P=x.replace("http://","").replace("https://","").split(/[/?#]/)[0],T=l(!1);return o.createElement(p,{"data-is-marrybaby":h,className:`${m} no-replace-click`,style:u,color:E.colors[E.primaryColor][0]},o.createElement("a",{href:x,target:"_blank",rel:"noreferrer"},b&&o.createElement("div",{className:"link-image-wrapper"},!h&&o.createElement("img",{className:"link-image-blur",src:b,onError:e=>{T.current||(T.current=!0,e.currentTarget.src=fe)},loading:"lazy"}),o.createElement("img",{className:"link-image",src:b,onError:e=>{T.current||(T.current=!0,e.currentTarget.src=fe)},loading:"lazy"})),o.createElement("div",{className:"link-info-container"},o.createElement(Qe,{size:"n1"},h&&I&&!y&&o.createElement("img",{className:"link-logo",src:I,onError:()=>C(!0),loading:"lazy"}),P),o.createElement(be,{tag:"h6"},N))))};const et=({onClick:e,color:t,className:a,style:l})=>{const{data:{env:{isMarryBaby:i}}}=n(Ce),{t:s}=de();return o.createElement(v,{label:o.createElement(o.Fragment,null,i&&o.createElement("img",{className:"label-sort-pin-icon",src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M3.5 19.9999L7.87 15.6299' stroke='%23FB8C00' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e %3cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.95634 11.294C4.56534 11.685 4.56534 12.318 4.95634 12.708L7.87434 15.626L10.7923 18.544C11.1833 18.935 11.8163 18.935 12.2063 18.544L13.3813 17.369C13.5693 17.181 13.6743 16.927 13.6743 16.662V12.726L16.5743 9.82597L18.8833 9.94897C19.1663 9.96397 19.4433 9.85797 19.6433 9.65797L20.2173 9.08397C20.6083 8.69297 20.6083 8.05997 20.2173 7.66997L15.8313 3.28397C15.4403 2.89297 14.8073 2.89297 14.4173 3.28397L13.8433 3.85797C13.6423 4.05897 13.5363 4.33497 13.5523 4.61797L13.6753 6.92697L10.7753 9.82697H6.83834C6.57334 9.82697 6.31834 9.93197 6.13134 10.12L4.95634 11.294V11.294Z' stroke='%23FB8C00' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e %3cpath d='M16.5699 9.83018L13.6699 6.93018' stroke='%23FB8C00' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e %3c/svg%3e",loading:"lazy"})," ",s("label.pinnedPost")),rightLabel:!i&&o.createElement("img",{className:"label-sort-pin-icon",src:"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cline x1='7.18605' y1='7.68219' x2='3.68219' y2='13.8139' stroke='%23FEA21E' stroke-linecap='round'/%3e%3cpath d='M3.24591 7.78426C3.21275 7.84168 3.20376 7.90993 3.22092 7.97398C3.23808 8.03803 3.27998 8.09264 3.3374 8.12579L8.78429 11.2706C8.90385 11.3396 9.05674 11.2986 9.12578 11.1791C9.71191 10.1641 9.71348 8.97262 9.23682 7.99339L10.8583 5.18521C11.5115 5.00603 12.0982 4.57973 12.4638 3.94629C12.5328 3.82672 12.4919 3.67383 12.3723 3.6048L8.18237 1.18584C8.12494 1.15268 8.0567 1.1437 7.99265 1.16086C7.92861 1.17803 7.874 1.21993 7.84086 1.27736C7.47521 1.91077 7.39934 2.63194 7.57065 3.28723L5.94919 6.09545C4.86323 6.1723 3.83201 6.76934 3.24591 7.78426Z' fill='%23FEA21E' stroke='%23FEA21E' stroke-width='0.5' stroke-linejoin='round'/%3e%3c/svg%3e",loading:"lazy"}),onClick:e,color:"white",className:`label-pinned ${a}`,style:l})},tt=e=>({message:e("notification.failure"),type:"danger"});var ot="data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8 14.5C11.3137 14.5 14 11.8137 14 8.5C14 5.18629 11.3137 2.5 8 2.5C4.68629 2.5 2 5.18629 2 8.5C2 11.8137 4.68629 14.5 8 14.5Z' fill='%23FE921D'/%3e%3cpath d='M8 5.5V8.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M8 11.5H8.00708' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";const nt=(e,t)=>{const[o,n]=a(e||[]);return{onSelectImages:a=>{const l=a.target.files;if(l)if(t&&e){t((e||o).concat(Array.from(l)))}else n((o=>{const n=e||o;return t&&t(n.concat(Array.from(l))),n.concat(Array.from(l))}))},onRemoveImage:o=>{if(t&&e){const n=e;n.splice(o,1),t(n.slice())}else n((n=>{const a=e||n;return a.splice(o,1),t&&t(a.slice()),a.slice()}))},onRemoveAllImages:()=>{t?t([]):n([])},imageSrcs:s((()=>(e||o).map((e=>"string"==typeof e?e:URL.createObjectURL(e)))),[e,o]),imageFiles:e||o}};var at="data:image/svg+xml,%3csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 22.9844C17.5228 22.9844 22 18.5072 22 12.9844C22 7.46153 17.5228 2.98438 12 2.98438C6.47715 2.98438 2 7.46153 2 12.9844C2 18.5072 6.47715 22.9844 12 22.9844Z' fill='%23262626'/%3e%3cpath d='M14.8281 10.1562L9.17127 15.8131' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M9.17188 10.1562L14.8287 15.8131' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";const lt=({className:e,style:t,bannedWords:n=[],value:s,onChange:r,onPreviewUrlChange:c,onInvalidUrlsChange:d,onImageFilesChange:m,imageFiles:u,isReplying:p})=>{const{t:v}=de(),[g,h]=a(null),y=l(null),{onSelectImages:C,onRemoveImage:f,imageSrcs:b}=nt(u,m);return i((()=>{c&&((null==g?void 0:g.url)?c({title:g.title||"",url:g.url||"",image:g.image||"",description:g.description||""}):c(null))}),[g]),o.createElement(E,{className:e,style:t},o.createElement(Qe,{size:"p4",className:"description-label"},v("createPost.popup.description")),o.createElement("div",{className:"textarea-control"},o.createElement("div",{className:"textarea-wrapper"},o.createElement(k,{html:s||"",onChange:r,bannedWords:n,onImagePickerClick:()=>{var e;return null===(e=y.current)||void 0===e?void 0:e.click()},onPreviewUrlChange:h,onInvalidUrlsChange:d,isReplying:p}))),o.createElement(Qe,{size:"p4",className:"count-string"},v("character"),": ",me(s||"").length),(!b||0===b.length)&&g&&o.createElement("div",{className:"link-preview-wrapper"},g.isFetching?o.createElement(w,null):o.createElement(o.Fragment,null,o.createElement(Xe,{title:g.title,url:g.url||"#",image:g.image,noRefetch:!0}),o.createElement("img",{src:at,className:"icon-close",onClick:()=>h(null),loading:"lazy"}))),o.createElement("input",{ref:y,type:"file",accept:"image/png, image/gif, image/jpeg",multiple:!0,style:{display:"none"},onChange:C}),b.length>Ie?o.createElement("div",{className:"input-notification"},o.createElement("img",{src:ot,loading:"lazy"}),o.createElement(Qe,{size:"p4",color:ue.colors.alertWarning},v("createPost.popup.warningImage"))):null,b.length>0&&o.createElement("div",{className:"image-gallery"},b.map(((e,t)=>o.createElement("div",{key:t,className:"image-item"},o.createElement("img",{src:e,loading:"lazy"}),o.createElement("img",{className:"close-btn",src:at,onClick:()=>f(t),loading:"lazy"}))))))},it=(e,t)=>{if(!t)return e;const{limit:o,bannedWords:n=[]}=t,a="number"==typeof o&&o>=0?e.substring(0,o):e;return f(a,n)},st=({className:e,style:t,bannedWords:n=[],value:s,onChange:c})=>{var d;const{t:m}=de(),[u,p]=a(""),v=l(null);i((()=>{if(v.current){const e=e=>{var t;e.preventDefault();const o=null===(t=e.clipboardData)||void 0===t?void 0:t.getData("text/plain");document.execCommand("insertHTML",!1,o)},t=v.current;return t.addEventListener("paste",e,{passive:!0}),()=>t.removeEventListener("paste",e)}}),[v]);const g=(null==n?void 0:n.join(","))||"";i((()=>{var e;if(g){const t=null===(e=v.current)||void 0===e?void 0:e.innerText;if(t){const e=f(t,n);e!==t&&(c&&c(e),p(e))}}}),[g]);const h=r(Ge((()=>{if(v.current){const e=it(v.current.innerText,{limit:120,bannedWords:n});c&&c(e),p(e)}}),300),[]);return i((()=>{setTimeout((()=>{var e;null===(e=v.current)||void 0===e||e.focus()}),500)}),[]),o.createElement(b,{className:e,style:t},o.createElement(Ke,{name:"title",value:s||u,size:"md",label:m("createPost.title"),CustomInput:o.createElement(qe,{innerRef:v,html:s||u,onChange:()=>{if(v.current&&v.current.innerText!==(s||u)){const e=it(v.current.innerText,{bannedWords:n});c&&c(e),p(e),h()}},className:"title-input"})}),o.createElement(Qe,{size:"p4",className:"count-string"},m("createPost.popup.wordCount",{count:(null===(d=v.current)||void 0===d?void 0:d.innerText.length)||0,max:120})))},rt=({className:t,style:r,topics:c,communityId:d,onChange:m,isLoading:u,disabled:p,forceTopics:v,selectedTopics:g,noFetch:h,dataEventCategory:y,dataEventAction:C,dataEventLabel:E})=>{const{data:{locale:k,env:{isMarryBaby:f}}}=n(Ce),[b,I]=a(c?[...c]:[]),[x,P]=a(g?[...g]:[]),[T,M]=a(!1),j=l(c);j.current=c,i((()=>{var t;!d||h||(null===(t=j.current)||void 0===t?void 0:t.length)||(I([]),M(!0),e(void 0,void 0,void 0,(function*(){var e;try{const t=yield Ee(ke(we.TOPIC.LIST,{communityId:d,_locale:k}),"GET"),o=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.topics;Array.isArray(o)&&I((()=>(null==o?void 0:o.map($e).sort(((e,t)=>(e.order||0)-(t.order||0))))||[]))}catch(e){console.log(e),M(!1)}M(!1)})))}),[d,h]);const _=null==c?void 0:c.map((e=>e.id)).join("-"),L=null==b?void 0:b.map((e=>e.id)).join("-"),S=null==v?void 0:v.map((e=>e.id)).join("-");i((()=>{c&&void 0!==_&&_!==L&&I(c)}),[c,_,L]);const z=s((()=>b.filter((e=>!(null==v?void 0:v.some((t=>t.id&&t.id===e.id||t.mappedCategoryId&&t.mappedCategoryId===e.mappedCategoryId)))))),[L,S]);return o.createElement(N,{"data-is-marrybaby":f,className:t,style:r},v.map((e=>o.createElement(ct,{key:`${e.id}-${e.mappedCategoryId}`,topic:e,disabled:!0,selected:!0,dataEventAction:C,dataEventCategory:y,dataEventLabel:E}))),z.map((e=>o.createElement(ct,{key:`${e.id}-${e.mappedCategoryId}`,topic:e,disabled:p,selected:(g||x).some((t=>t.id&&t.id===e.id||t.mappedCategoryId&&t.mappedCategoryId===e.mappedCategoryId)),onClick:()=>{const t=g||x,o=t.findIndex((t=>t.id&&t.id===e.id||t.mappedCategoryId&&t.mappedCategoryId===e.mappedCategoryId));-1!==o?t.splice(o,1):t.push(e),m&&g?m(t.slice()):(m&&m(t.slice()),P(t.slice()))},dataEventAction:C,dataEventCategory:y,dataEventLabel:E}))),(u||T)&&o.createElement(w,{className:"topic-spinner"}))},ct=e=>{var{topic:n,disabled:a,selected:l,onClick:i}=e,s=t(e,["topic","disabled","selected","onClick"]);return o.createElement("div",Object.assign({className:"tag-item"+(l?" --active":""),"data-disabled":a,onClick:a?void 0:i},s),n.name)},dt=({className:t,style:l,onPostCreatedEdited:s,onClose:r,communities:c=[],forceSelectCommunity:m,forceSelectTopics:u,articleId:p,optionalTopic:v,editPostData:E,defaultCommunity:k,defaultTopics:w,noFetchTopic:f,hideTopicList:b,selectAskDoctor:N,showAskDoctorOptions:_,currentPageUrl:L})=>{const S=!!(null==E?void 0:E.id),{data:{locale:z,env:{isMarryBaby:B}},action:{pushNotifications:A,sanitizeFunction:O}}=n(Ce),{t:F}=de(),[D,R]=a(!1),[U,V]=a(N),[$,Z]=a(!1),[H,W]=a(!1),[Q,K]=a(!1),[G,q]=a(""),[J,Y]=a(""),[X,ee]=a(m?{label:m.name,value:`${m.id||""}-${m.mappedCategoryId||""}`}:{label:F("community.choose"),value:""}),[te,oe]=a([...u]||[]),[ne,ae]=a([]),[le,ie]=a([]),se=m||c.find((e=>`${e.id||""}-${e.mappedCategoryId||""}`===X.value)),re=m?[m]:c.filter((e=>e.isActive)).sort(((e,t)=>e.name>t.name?1:e.name<t.name?-1:0)),[ce,ge]=a(null),[he,ye]=a([]),Ee=G&&!H&&me(J)&&(v||!v&&te.length>0)&&se&&(!ne||ne.length<=Ie)&&!(null==he?void 0:he.length)&&!Q;i((()=>{if(E){const e=E;q(e.title||""),Y(I(x(e.description||"","edit"),e.mentions)),ee({label:e.community.name,value:`${e.community.id||""}-${e.community.mappedCategoryId||""}`}),oe(e.topics||[]),ae(e.photos||[]),R(!!e.isAnonymous||!1),V(!!e.isAskDoctor||!1)}else k&&ee({label:k.name,value:`${k.id||""}-${k.mappedCategoryId||""}`}),w&&oe(w)}),[]),i((()=>{W(""!==G&&!/[a-zA-Z]/.test(G))}),[G]);const fe=()=>e(void 0,void 0,void 0,(function*(){var t,o,n,a,l,i,c,d,m;if(_&&void 0===U)return Z(!0),!1;const u=yield(({title:t,description:o,communityId:n,imageFiles:a,previewUrl:l,topicIds:i,locale:s,sanitizeFunction:r,categoryCommunityId:c,categoryTopicIds:d,introUrl:m,bannerUrl:u,scheduleTime:p,isAnonymous:v,isAskDoctor:E})=>e(void 0,void 0,void 0,(function*(){const e=new FormData,k=g(o),w=g(t),f=h(k);if(e.append("title",w),e.append("description",y(k,r)),c?e.append("category_community",String(c)):n&&e.append("community_id",String(n)),e.append("is_anonymous",v?"1":"0"),e.append("is_question",E?"1":"0"),(null==l?void 0:l.title)&&e.append("preview_title",l.title),(null==l?void 0:l.description)&&e.append("preview_description",l.description),(null==l?void 0:l.url)&&e.append("preview_link",Oe(l.url)),(null==l?void 0:l.image)&&e.append("preview_image",Oe(l.image)),null==i||i.forEach((t=>{e.append("topics[]",String(t||""))})),null==d||d.forEach((t=>{e.append("category_topics[]",String(t||""))})),null==a?void 0:a.length){const t=yield Promise.all(a.map(((e,t)=>new Promise((o=>{setTimeout((()=>{o(C(e,s))}),2e3*t)})))));null==t||t.filter(Boolean).slice(0,Ie).forEach(((t,o)=>{e.append(`images[${o}]`,t)}))}else e.append("images","");return null==f||f.forEach((t=>{e.append("mention_ids[]",t)})),e.append("intro_url",m||""),e.append("banner",u||""),p&&(e.append("post_type","scheduled"),e.append("schedule_datetime",p)),e})))({title:G,description:J,communityId:String((null==se?void 0:se.id)||""),imageFiles:ne,previewUrl:ce,topicIds:null==te?void 0:te.map((e=>String(e.id||""))).filter(Boolean),locale:z,sanitizeFunction:O,categoryCommunityId:String((null==se?void 0:se.mappedCategoryId)||""),categoryTopicIds:null==te?void 0:te.map((e=>String(e.mappedCategoryId||""))).filter(Boolean),isAnonymous:D?1:0,isAskDoctor:U?1:0});let v;p&&u.append("article_id",p),S?(null==E?void 0:E.id)&&(v=yield(({id:t,locale:o,formData:n})=>e(void 0,void 0,void 0,(function*(){return yield Ne(ke(we.POST.UPDATE,{id:t,_locale:o}),"POST",{data:n})})))({id:E.id,formData:u,locale:z})):v=yield(({locale:t,formData:o,isArticleComment:n})=>e(void 0,void 0,void 0,(function*(){return yield Ne(ke(n?we.POST.CREATE_ARTICLE_COMMENT:we.POST.CREATE,{_locale:t}),"POST",{data:o})})))({formData:u,locale:z,isArticleComment:!(null==se?void 0:se.id)&&!!(null==se?void 0:se.mappedCategoryId)});const k=null==v?void 0:v.data;(null==k?void 0:k.id)&&!(null===(o=null===(t=null==v?void 0:v.messages)||void 0===t?void 0:t.moderation)||void 0===o?void 0:o.type)?(A({message:F("createPost.popup.success"),type:"success"}),(e=>{s&&s(Ze(e),S),r&&r()})(k)):"banned"===(null===(a=null===(n=null==v?void 0:v.messages)||void 0===n?void 0:n.moderation)||void 0===a?void 0:a.type)?(A({title:F("notification.post.blocked.title"),message:F("notification.post.blocked.message"),type:"danger"}),v.messages.moderation.words&&ie(v.messages.moderation.words)):"suspect"===(null===(i=null===(l=null==v?void 0:v.messages)||void 0===l?void 0:l.moderation)||void 0===i?void 0:i.type)?(A({title:F("notification.post.suspect.title"),message:F("notification.post.suspect.message"),type:"warning"}),r&&r()):(null===(d=null===(c=null==v?void 0:v.messages)||void 0===c?void 0:c.find)||void 0===d?void 0:d.call(c,(e=>{var t;return!!(null===(t=null==e?void 0:e.includes)||void 0===t?void 0:t.call(e,"suspend"))})))?(A({message:F("notification.suspend.message"),type:"danger"}),r&&r()):A({message:(null===(m=null==v?void 0:v.messages)||void 0===m?void 0:m[0])||F("notification.failure"),type:"danger"})}));return o.createElement(P,{className:t,style:l},o.createElement("div",{className:"input-group-container"},o.createElement(st,{className:"input-group",bannedWords:le,value:G,onChange:q}),H&&o.createElement(T,null,o.createElement(pe,{isSolid:!0,color:ue.colors.red700,size:14}),o.createElement(xe,{size:"p3",as:"span",color:ue.colors.red700},F("createPost.popup.specialCharErr"))),o.createElement(lt,{className:"input-group",bannedWords:le,value:J,onChange:Y,onPreviewUrlChange:ge,onInvalidUrlsChange:ye,onImageFilesChange:ae,imageFiles:ne}),_&&o.createElement(M,{"data-is-marry-baby":B},o.createElement("div",{className:"switch-label"},o.createElement(ve,{isMarryBaby:B,size:B?32:24,color:ue.colors.primaryBase,className:"label-icon"}),o.createElement("span",{className:"label-txt"},F("createPost.askDoctor"))),o.createElement(Ue,{value:U,choices:[{label:F("createPost.askDoctorChoice.yes"),value:!0,dataEventCategory:"Together",dataEventAction:"Write Post Click - Ask Doctor",dataEventLabel:L},{label:F("createPost.askDoctorChoice.no"),value:!1}],onChange:e=>{"boolean"==typeof e&&(Z(!1),V(e))}})),$&&o.createElement(T,null,o.createElement(pe,{isSolid:!0,color:ue.colors.red700,size:14}),o.createElement(xe,{size:"p3",as:"span",color:ue.colors.red700},F("createPost.message.askDoctorRequire"))),o.createElement("div",{className:"input-group"},o.createElement(xe,{size:"p4",className:"input-group-label"},F("admin.community")),o.createElement(j,{options:(null==re?void 0:re.map((e=>({label:e.name,value:`${e.id||""}-${e.mappedCategoryId||""}`}))))||[],id:"community-picker",placeholder:F("community.choose"),value:X,dropdownLabelTrackingAttributes:{"data-event-category":"Together","data-event-action":"Write Post Click - Choose Community/Topic","data-event-label":L},onChange:e=>{ee({label:e.label,value:String(e.value)}),oe([])},disabled:!!m}),o.createElement(xe,{size:"sm",className:"warning",color:ue.colors.gray400},"* ",F("commentPopup.warning.newPost"))),!b&&o.createElement("div",{className:"input-group"},o.createElement(xe,{size:"p4",className:"input-group-label"},F("tab.topic")),o.createElement("div",{className:"input-notification"},o.createElement("img",{src:se?"data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8 14.5C11.3137 14.5 14 11.8137 14 8.5C14 5.18629 11.3137 2.5 8 2.5C4.68629 2.5 2 5.18629 2 8.5C2 11.8137 4.68629 14.5 8 14.5Z' fill='%232D87F3'/%3e%3cpath d='M8 5.5V8.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M8 11.5H8.00708' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e":ot,loading:"lazy"}),o.createElement(xe,{size:"base",color:ue.colors.gray500},F(se?"createPost.popup.primary":"createPost.popup.warning"))),se&&o.createElement(rt,{className:"tag-list",communityId:se.id,forceTopics:u,onChange:oe,selectedTopics:te,noFetch:f,dataEventCategory:"Together",dataEventAction:"Write Post Click - Choose Community/Topic",dataEventLabel:L}))),o.createElement("div",{className:"form-action"},o.createElement("div",{className:"input-group"},o.createElement(d,{className:"swich-input-group",labelPosition:"left",name:"PostAnonymous",checked:D,color:B?"pink":void 0,"data-event-category":"Together","data-event-action":"Write Post Click - Incognito","data-event-label":L,label:o.createElement("div",{className:"switch-label"},o.createElement("img",{className:"label-icon",src:Ae.getAssetPath("anomyous-avatar.svg"),alt:"anomyous avatar",style:{marginRight:"10px",width:"24px"},loading:"lazy"}),o.createElement("span",{className:"label-txt"},F("createPost.postAnonymous"))),value:"Post Anonymous",onChange:e=>R(e.currentTarget.checked),styles:{body:{display:"flex",width:"100%",justifyContent:"space-between",alignItems:"center"},label:{display:"flex",alignItems:"center"}}})),o.createElement("div",{className:"input-group"},o.createElement(Pe,{className:"submit-btn pointer-event-child-none",size:"lg","data-event-category":"Ask Doctor","data-event-action":"Submit Question","data-event-label":window.location.href,onClick:()=>e(void 0,void 0,void 0,(function*(){if(Ee&&!Q){K(!0);try{yield fe()}catch(e){console.error(e),A(tt(F))}K(!1)}})),disabled:!Ee,loading:Q},F("createPost.popup.submit")))))},mt=({className:e,isMarryBaby:t,style:l,title:s,description:r,acceptText:c,cancelText:d,onAccept:m,onCancel:u,thumbnail:p,isThumbnailIcon:v,onClose:g,acceptBtnTracking:h,acceptBtnProps:y,cancelBtnProps:C})=>{const{data:{env:{isMarryBaby:E}}}=n(Ce),k="boolean"==typeof t?t:E,[w,f]=a(!1);return i((()=>(Fe(!0),setTimeout((()=>f(!0)),0),()=>Fe(!1))),[]),"undefined"==typeof window?null:Ye.createPortal(o.createElement(_,{"data-is-marrybaby":k,className:e,style:l,"data-open":w},o.createElement(L,{className:"popup-frame",isOpen:w,onClose:g},o.createElement("div",{className:"confirm-dialog",onClick:e=>e.stopPropagation()},o.createElement("div",{className:"confirm-content"},p&&o.createElement("div",{className:"thumbnail-container "+(v?"is-icon":"")},o.createElement("img",{className:"thumbnail",src:p,loading:"lazy"})),o.createElement(be,{className:"title",tag:"h2"},s),o.createElement(Qe,{className:"desc",size:"lg"},r),o.createElement("div",{className:"btn-group"},o.createElement(Je,Object.assign({theme:k?"marryBaby":"helloSites",size:"md",color:"tertiary",onClick:()=>{null==m||m(),null==g||g()}},y,h),c),o.createElement(Je,Object.assign({theme:k?"marryBaby":"helloSites",size:"md",onClick:()=>{null==u||u(),null==g||g()}},C),d)))),k&&p&&o.createElement("div",{className:"thumbnail-container is-mobile "+(v?"is-icon":"")},o.createElement("img",{className:"thumbnail",src:p,loading:"lazy"})))),De())};const ut=({isReply:t,className:s,onClose:r,replyToName:c,style:d,replyingId:m,replyingUser:u,onPostSuccess:p,post:v,isMarryBaby:g})=>{const{action:{pushNotifications:E,sanitizeFunction:f},data:{userInfo:b,locale:N,env:{isMarryBaby:I}}}=n(Ce),x="boolean"==typeof g?g:I,{t:P}=de(),{onSelectImages:T,onRemoveImage:M,imageSrcs:j,onRemoveAllImages:_,imageFiles:L}=nt(),[B,A]=a(""),{trigger:O}=n(S),[F,D]=a(!1),R=l(null),U=l(null),V=l(null),[$,Z]=a([]),[H,W]=a([]),[Q,K]=a(null);return i((()=>{var e;null===(e=V.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout((()=>{var e;null===(e=U.current)||void 0===e||e.focus()}),400)}),[O]),o.createElement(z,{"data-is-reply":t,className:s,style:d},t&&o.createElement("div",{className:"reply-to-container"},o.createElement(Qe,{size:"p4"},o.createElement("span",{dangerouslySetInnerHTML:{__html:P("inputComment.replyTo",{name:`<span style="color: #2D87F3; cursor: pointer">@${c||""}</span>`})}})),o.createElement("img",{src:"data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8.00016' cy='8.50004' r='6.66667' fill='white' stroke='%23404040'/%3e%3cpath d='M10 6.5L6 10.5' stroke='%23404040' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M6 6.5L10 10.5' stroke='%23404040' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",className:"icon-close-comment",onClick:()=>r&&r(),loading:"lazy"})),o.createElement("div",{className:"input-container",ref:V},o.createElement(He,{className:"avatar-wrapper "+(t?"avatar-wrapper-reply":""),avatar:(null==b?void 0:b.id)?b.avatar:Te,username:(null==b?void 0:b.name)||(null==b?void 0:b.username)}),o.createElement("input",{ref:R,onChange:T,type:"file",multiple:!0,accept:"image/png,image/jpeg",name:"images",style:{display:"none"}}),o.createElement(Ke,{value:B,name:"input",size:"md",className:"input-wrapper",displayIcon:o.createElement("img",{src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M10.7543 4.85352H4.49227C4.01776 4.85352 3.56268 5.04201 3.22715 5.37754C2.89162 5.71307 2.70313 6.16815 2.70312 6.64266V19.1667C2.70313 19.6412 2.89162 20.0963 3.22715 20.4318C3.56268 20.7673 4.01776 20.9558 4.49227 20.9558H17.0163C17.4908 20.9558 17.9459 20.7673 18.2814 20.4318C18.6169 20.0963 18.8054 19.6412 18.8054 19.1667V12.9047' stroke='%232D87F3' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M17.4633 3.51187C17.8192 3.15599 18.3019 2.95605 18.8052 2.95605C19.3085 2.95605 19.7912 3.15599 20.147 3.51187C20.5029 3.86775 20.7029 4.35044 20.7029 4.85373C20.7029 5.35702 20.5029 5.83971 20.147 6.19559L11.6486 14.694L8.07031 15.5886L8.96489 12.0103L17.4633 3.51187Z' stroke='%232D87F3' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",loading:"lazy"}),CustomInput:o.createElement("div",{className:"as-input"},o.createElement(k,{className:"textarea",html:B,onChange:A,onImagePickerClick:()=>{var e;return null===(e=R.current)||void 0===e?void 0:e.click()},bannedWords:H,onPreviewUrlChange:K,onInvalidUrlsChange:Z,setEditorRef:e=>U.current=e,isReplying:t}))}),o.createElement(Je,{theme:x?"marryBaby":"helloSites",className:"send-button",size:"sm",onClick:()=>e(void 0,void 0,void 0,(function*(){var o,n,a,l,i,s,c,d,g;if((null==v?void 0:v.id)&&!F){D(!0);try{const k=e=>{A(""),_(),r&&r();const t=We(e.data);"string"==typeof t.images&&(t.images=JSON.parse(t.images)),p&&p(t)},w=yield(({postId:t,message:o,photos:n,link:a,locale:l,sanitizeFunction:i,replyingUserId:s,replyingUserName:r,replyingId:c})=>e(void 0,void 0,void 0,(function*(){const e=new FormData;let d=y(o.replace(/(\ )+/g," "),i);const m=h(d);return n&&n.length>0&&(yield Promise.all(null==n?void 0:n.map((e=>C(e,l))))).filter(Boolean).slice(0,Ie).forEach((t=>{e.append("images[]",t)})),a&&e.append("link",a),null==m||m.forEach((t=>{e.append("mention_ids[]",t)})),e.append("post_id",t),c&&e.append("parent_id",c),s&&(m.unshift(s),d=`[mention+id="${s}"+name="${(r||"").replace('"',"'")}"]${d}`,e.append("parent_user_id",String(s))),e.append("content",d),e.append("content",d),e})))(Object.assign({message:B,photos:L,postId:String(v.id),link:null==Q?void 0:Q.url,sanitizeFunction:f,locale:N},t&&m?{replyingUserId:String((null==u?void 0:u.id)||(null===(o=null==v?void 0:v.author)||void 0===o?void 0:o.id)||""),replyingId:m,replyingUserName:(null==u?void 0:u.name)||(null==u?void 0:u.username)||""}:{})),b=yield t&&m?((t,o)=>e(void 0,void 0,void 0,(function*(){return Ne(ke(we.COMMENT.REPLY,{_locale:o}),"POST",{data:t})})))(w,N):((t,o)=>e(void 0,void 0,void 0,(function*(){return Ne(ke(we.COMMENT.CREATE,{_locale:o}),"POST",{data:t})})))(w,N),I=null==b?void 0:b.data;(null==I?void 0:I.id)&&!(null===(a=null===(n=null==b?void 0:b.messages)||void 0===n?void 0:n.moderation)||void 0===a?void 0:a.type)?k(b):"banned"===(null===(i=null===(l=null==b?void 0:b.messages)||void 0===l?void 0:l.moderation)||void 0===i?void 0:i.type)?(E({title:P("notification.comment.blocked.title"),message:P("notification.comment.blocked.message"),type:"danger"}),b.messages.moderation.words&&W(b.messages.moderation.words)):"suspect"===(null===(c=null===(s=null==b?void 0:b.messages)||void 0===s?void 0:s.moderation)||void 0===c?void 0:c.type)?(E({title:P("notification.comment.suspect.title"),message:P("notification.comment.suspect.message"),type:"warning"}),A(""),_(),r&&r()):(null===(d=null==b?void 0:b.messages)||void 0===d?void 0:d.find((e=>{var t;return!!(null===(t=null==e?void 0:e.includes)||void 0===t?void 0:t.call(e,"suspend"))})))?(E({message:P("notification.suspend.message"),type:"warning"}),A(""),_(),r&&r()):E({title:"",message:(null===(g=null==b?void 0:b.messages)||void 0===g?void 0:g[0])||P("notification.comment.somethingWrong"),type:"danger"})}catch(e){E({title:"",message:P("notification.comment.somethingWrong"),type:"danger"})}D(!1)}})),isLoading:F,isDisabled:!!(null==$?void 0:$.length)||F||!B||(null==B?void 0:B.length)<2||!B.trim()},o.createElement("img",{src:"data:image/svg+xml,%3csvg width='20' height='21' viewBox='0 0 20 21' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M7.5 9.73438L3.75 13.4844L7.5 17.2344' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M16.25 4.73438L16.25 10.3026C16.25 11.1464 15.9208 11.9557 15.3347 12.5524C14.7487 13.1491 13.9538 13.4844 13.125 13.4844L3.75 13.4844' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",className:"icon-enter",loading:"lazy"}))),(null==$?void 0:$.length)?o.createElement("div",{className:"error-text"},P("notification.limitUrlDomain")):null,(!j||0===j.length)&&Q&&o.createElement("div",{className:"link-preview-wrapper"},Q.isFetching?o.createElement(w,null):o.createElement(o.Fragment,null,o.createElement(Xe,{title:Q.title,url:Q.url||"#",image:Q.image,noRefetch:!0}),o.createElement("img",{src:at,className:"icon-close",onClick:()=>K(null),loading:"lazy"}))),j&&j.length>0&&o.createElement("div",{className:"preview-images-container"},j.map(((e,t)=>o.createElement("div",{key:t,className:"image-src-wrapper"},o.createElement("img",{className:"preview-image",src:e,loading:"lazy"}),o.createElement("img",{src:at,className:"icon-close-circle",onClick:()=>M(t),loading:"lazy"}))))))};var pt="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14Z' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M8 5V8' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M8 11H8.00708' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";const vt=({className:t,style:l,reason:i,reasonText:s,onClose:r,postId:c})=>{const{data:{locale:d,env:{isMarryBaby:m}},action:{pushNotifications:u}}=n(Ce),{t:p}=de(),[v,g]=a(!1);return o.createElement(B,{"data-is-marrybaby":m,className:t,style:l},o.createElement("ul",{className:"report-list"},o.createElement("li",{className:"report-item"},o.createElement("img",{src:pt,loading:"lazy"}),o.createElement(Qe,{className:"__label",color:ue.colors.gray800,size:"p4"},s))),o.createElement(Je,{theme:m?"marryBaby":"helloSites",className:"report-submit",size:"lg",color:"primary",isLoading:v,onClick:()=>e(void 0,void 0,void 0,(function*(){if(c&&!v){g(!0);try{const e=yield(({id:e,reason:t,locale:o})=>{const n=new FormData;return n.append("reason",t),Ne(ke(we.POST.REPORT,{_locale:o,id:e}),"POST",{data:n})})({id:c,reason:i,locale:d});1===(null==e?void 0:e.status)&&(u({message:"Post reported",type:"success"}),r&&r())}catch(e){}g(!1)}}))},p("submit")))};const gt=({className:e,style:t,authorName:n,images:l,onClose:s,onOpenSingleView:r,alt:c})=>{const{t:d}=de(),[u,p]=a(!1);return i((()=>{setTimeout((()=>{p(!0)}),0)}),[]),o.createElement(m,null,o.createElement(A,{className:e,style:t,"data-open":u},o.createElement("div",{className:"top-bar"},o.createElement("img",{className:"icon-arrow-left",src:"data:image/svg+xml,%3csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M10.0508 18.0607L4.00078 12.0367L10.0508 6.01172' stroke='%23262626' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M4.00195 12.0352L19.002 12.0352' stroke='%23262626' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",onClick:s,alt:"go back",loading:"lazy"}),o.createElement(Qe,{size:"p2",type:"bold",style:{textAlign:"center"}},d("previewPhotos.title",{name:n}))),o.createElement("div",{className:"container"},l.map(((e,t)=>o.createElement("img",{className:"img-preview",key:t,src:e,onClick:()=>null==r?void 0:r(t),alt:c,loading:"lazy"}))))),",")};var ht="data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M6 12.8125L10 8.8125L6 4.8125' stroke='white' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";const yt=({initialViewIndex:e,images:t,onClose:n,alt:l})=>{const[s,r]=a(e),[c,d]=a(!1);i((()=>{setTimeout((()=>{d(!0)}),0)}),[]);const u=null==t?void 0:t[s],p=0===s,v=!(null==t?void 0:t.length)||s===(null==t?void 0:t.length)-1;return o.createElement(m,null,o.createElement(O,{"data-open":c&&!!u},o.createElement(F,null,o.createElement("img",{src:D,className:"icon-close",onClick:n,alt:"close",loading:"lazy"})),u&&s>=0&&o.createElement(o.Fragment,null,o.createElement(R,null,o.createElement("img",{className:"img-preview",src:u,alt:l,loading:"lazy"}),o.createElement(U,{"data-disabled":p,onClick:()=>!p&&r(s-1)},o.createElement(V,null,o.createElement("img",{src:ht,style:{transform:"rotate(180deg)"},alt:"left arrow","data-disabled":p,loading:"lazy"}))),o.createElement(U,{"data-right":!0,"data-disabled":v,onClick:()=>!v&&r(s+1)},o.createElement(V,null,o.createElement("img",{src:ht,alt:"right arrow","data-disabled":v,loading:"lazy"})))))))},Ct=({image:e,showIcon:t=!0})=>{const[n,l]=a(!0);return o.createElement($,{"data-is-blurred":n,onClick:e=>n&&e.stopPropagation()},o.createElement("img",{loading:"lazy",className:"img-preview",src:e}),o.createElement(Z,{onClick:e=>{e.stopPropagation(),l(!n)}},t&&o.createElement(H,null,n?o.createElement("svg",{width:"22",height:"20",viewBox:"0 0 22 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.71 2.5399C1.32 2.1499 1.32 1.5199 1.71 1.1299C2.1 0.739902 2.74 0.739902 3.13 1.1299L19.44 17.4599C19.83 17.8499 19.83 18.4799 19.44 18.8699C19.05 19.2599 18.42 19.2599 18.03 18.8699L15.31 16.1499C13.97 16.6699 12.52 16.9699 11 16.9699C6 16.9699 1.73 13.8599 0 9.4699C0.77 7.4999 2.06 5.7999 3.68 4.5099L1.71 2.5399ZM16 9.4699C16 6.7099 13.76 4.4699 11 4.4699C10.49 4.4699 10 4.5699 9.53 4.7099L7.36 2.5399C8.51 2.1699 9.73 1.9699 11 1.9699C16 1.9699 20.27 5.0799 22 9.4599C21.31 11.2199 20.21 12.7599 18.82 13.9899L15.76 10.9299C15.9 10.4699 16 9.9799 16 9.4699ZM11 14.4699C8.24 14.4699 6 12.2299 6 9.4699C6 8.6999 6.18 7.9699 6.49 7.3299L8.06 8.8999C8.03 9.0799 8 9.2699 8 9.4699C8 11.1299 9.34 12.4699 11 12.4699C11.2 12.4699 11.38 12.4399 11.57 12.3999L13.14 13.9699C12.49 14.2899 11.77 14.4699 11 14.4699ZM13.97 9.1399C13.82 7.7399 12.72 6.6499 11.33 6.4999L13.97 9.1399Z",fill:"white"})):o.createElement("svg",{width:"23",height:"16",viewBox:"0 0 23 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.createElement("path",{d:"M11.9999 0C5.14188 0 1.88558 5.87864 1.09558 7.55664C0.963582 7.83664 0.963582 8.16141 1.09558 8.44141C1.88558 10.1204 5.14188 16 11.9999 16C18.8339 16 22.0924 10.1629 22.8964 8.46094C23.0344 8.16794 23.0344 7.83206 22.8964 7.53906C22.0924 5.83706 18.8339 0 11.9999 0ZM11.9999 3C14.7609 3 16.9999 5.239 16.9999 8C16.9999 10.761 14.7609 13 11.9999 13C9.23888 13 6.99988 10.761 6.99988 8C6.99988 5.239 9.23888 3 11.9999 3ZM11.9999 5C11.2042 5 10.4412 5.31607 9.87856 5.87868C9.31595 6.44129 8.99988 7.20435 8.99988 8C8.99988 8.79565 9.31595 9.55871 9.87856 10.1213C10.4412 10.6839 11.2042 11 11.9999 11C12.7955 11 13.5586 10.6839 14.1212 10.1213C14.6838 9.55871 14.9999 8.79565 14.9999 8C14.9999 7.20435 14.6838 6.44129 14.1212 5.87868C13.5586 5.31607 12.7955 5 11.9999 5Z",fill:"#2D87F3"})))))},Et=({className:e,images:t=[],style:s,authorName:r,isSensitive:c=!1,alt:d})=>{const{data:{env:{isMarryBaby:m}}}=n(Ce),{t:u}=de(),p="+ "+((t.length||0)-4),[v,g]=a(!1),[h,y]=a(-1),C=t.length>5,E=l(!1);return i((()=>()=>{E.current&&Fe(!1)}),[]),i((()=>{v||h>=0?(Fe(!0),E.current=!0):(Fe(!1),E.current=!1)}),[v,h]),o.createElement(o.Fragment,null,c&&o.createElement(W,{message:u("sensitiveMask.contentWarningDescription"),icon:o.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.00002 0.666748C4.40002 0.666748 0.666687 4.40008 0.666687 9.00008C0.666687 13.6001 4.40002 17.3334 9.00002 17.3334C13.6 17.3334 17.3334 13.6001 17.3334 9.00008C17.3334 4.40008 13.6 0.666748 9.00002 0.666748ZM9.00002 9.83341C8.54169 9.83341 8.16669 9.45841 8.16669 9.00008V5.66675C8.16669 5.20842 8.54169 4.83342 9.00002 4.83342C9.45835 4.83342 9.83335 5.20842 9.83335 5.66675V9.00008C9.83335 9.45841 9.45835 9.83341 9.00002 9.83341ZM8.16669 11.5001V13.1667H9.83335V11.5001H8.16669Z",fill:"#FE921D"}))}),o.createElement(Q,{className:e,style:s,"data-image-count":C?5:t.length||0,"data-is-marrybaby":m,"data-cursor-pointer":!c},null==t?void 0:t.slice(0,5).map(((e,t)=>{const n=4===t&&C;return o.createElement("div",{className:"img-wrapper",key:t,onClick:()=>{t>=4&&C?g(!0):y(t)}},c&&o.createElement(Ct,{image:e,showIcon:!n}),!m&&o.createElement("img",{loading:"lazy",className:"img-preview-blur",src:e,alt:d}),o.createElement("img",{loading:"lazy",className:"img-preview",src:e,alt:d}),n&&o.createElement("div",{className:"img-more-overlay"},o.createElement(be,{tag:"h1",as:"h2",color:"white"},p)))}))),v&&o.createElement(gt,{authorName:r||"",images:t,onClose:()=>g(!1),onOpenSingleView:y,alt:d}),h>=0&&o.createElement(yt,{images:t,initialViewIndex:h,onClose:()=>y(-1),alt:d}))},kt=({url:t,image:r,className:d,style:m,autoPlay:u=!0})=>{const{data:{locale:p}}=n(Ce),[v,g]=a(null);i((()=>{e(void 0,void 0,void 0,(function*(){if(!r){if(!t)return g(null);g((e=>Object.assign(Object.assign({},e),{isFetching:!0}))),Ee(ke(we.FETCH_PREVIEW,{_locale:p}),"POST",{data:{link:t},headers:{"Content-Type":"application/json"}}).then((e=>{var o,n;g({url:t,image:(null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.image)||(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.logo)})})).catch((()=>{g(null)}))}}))}),[t,r]);const h=r||(null==v?void 0:v.image),y=(null==v?void 0:v.url)||t,C=s((()=>K(y)),[y]),E=s((()=>y.includes("facebook.com")||y.includes("fb.watch")),[y]),k=l(0),f=l(0),[b,N]=a(!1);i((()=>{const e=()=>{var e;const t=null===(e=I.current)||void 0===e?void 0:e.getBoundingClientRect();let o=!1;t&&(!k.current||Math.abs((k.current-t.width)/(null==t?void 0:t.width))>.2)&&(k.current=Math.floor(t.width),o=!0),t&&(!f.current||Math.abs((f.current-t.height)/(null==t?void 0:t.height))>.2)&&(f.current=Math.floor(t.height),o=!0),o&&N((e=>!e))};return e(),window.addEventListener("resize",e,{passive:!0}),()=>{window.removeEventListener("resize",e)}}),[]);const I=l(null),x=c();return o.createElement(G,{className:`${d} no-replace-click`,style:m,ref:I,color:x.colors[x.primaryColor][0]},r||!C&&!E?o.createElement("a",{href:y,target:"_blank",rel:"noreferrer"},o.createElement("div",{className:"link-image-wrapper "+((null==v?void 0:v.isFetching)?"fetching":"")},(null==v?void 0:v.isFetching)?o.createElement(w,{className:"loading-spinner"}):o.createElement(Re,{className:"link-image",src:h||fe,backupSrc:fe,alt:y}))):o.createElement("div",{className:"link-image-wrapper"},C?o.createElement("iframe",{width:"100%",height:"100%",src:`https://www.youtube.com/embed/${C}?&autoplay=${u?1:0}&mute=1&enablejsapi=1`,frameBorder:"0",allowFullScreen:!0,style:{position:"absolute",top:0,left:0,border:"none",overflow:"hidden"},loading:"lazy"}):E?o.createElement("iframe",{key:String(b),src:`https://www.facebook.com/plugins/video.php?href=${encodeURIComponent(y)}&autoplay=${u?1:0}&show_text=false&t=0&width=${k.current}&height=${f.current}`,style:{position:"absolute",top:"50%",left:"50%",border:"none",overflow:"hidden",height:f.current,width:k.current,transform:"translate(-50%, -50%)"},scrolling:"no",frameBorder:"0",allowFullScreen:!0,allow:"autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share",loading:"lazy"}):null))};var wt="KsWg8i6",ft="_9tS0EUN",bt="kyyRKlb",Nt="-Uqqka-";const It=l=>{var{post:i,onSkip:s,btnText:d,currentPageUrl:m}=l,p=t(l,["post","onSkip","btnText","currentPageUrl"]);const{t:v}=de(),{data:{locale:g},action:{pushNotifications:h}}=n(Ce),[y,C]=a(!1),[E,k]=a(!1),w=c(),f=r((()=>e(void 0,void 0,void 0,(function*(){var e;k(!0);const t=yield Ne(ke(we.USER.SKIP_QUESTION,{_locale:g,id:null==i?void 0:i.id}),"PUT");1===(null==t?void 0:t.status)?(null==s||s({id:(null==i?void 0:i.id)||"",communityId:(null===(e=null==i?void 0:i.community)||void 0===e?void 0:e.id)||""}),C(!1),h({title:"",message:"Skip success",type:"success"})):h({title:"",message:null==t?void 0:t.messages,type:"danger"}),k(!1)}))),[]);return o.createElement(u,{width:327,withArrow:!0,shadow:"md",opened:y},o.createElement(u.Target,null,o.createElement("div",Object.assign({className:`${wt} ${(null==p?void 0:p.className)||""}`,onClick:()=>C(!0)},p),d||v("profilePanel.questionNotClear"))),o.createElement(u.Dropdown,null,o.createElement("div",null,o.createElement("div",{className:ft},v("profilePanel.skipQuestion.heading")),o.createElement("div",{className:bt},v("profilePanel.skipQuestion.content")),o.createElement("div",{className:Nt},o.createElement(Pe,{size:"md",variant:"secondary",leftIcon:o.createElement(ge,{color:w.fn.primaryColor(),size:24}),onClick:()=>C(!1),styles:()=>({leftIcon:{marginRight:0}})}),o.createElement(Pe,{variant:"primary",size:"md",leftIcon:o.createElement(he,{color:"white",size:24}),onClick:f,loading:E,"data-event-category":"Together","data-event-action":"Unclear Question Click","data-event-label":m,styles:()=>({leftIcon:{marginRight:0}})})))))};var xt="data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M5 10C3.9 10 3 10.9 3 12C3 13.1 3.9 14 5 14C6.1 14 7 13.1 7 12C7 10.9 6.1 10 5 10Z' fill='%233E3F58'/%3e %3cpath d='M19 10C17.9 10 17 10.9 17 12C17 13.1 17.9 14 19 14C20.1 14 21 13.1 21 12C21 10.9 20.1 10 19 10Z' fill='%233E3F58'/%3e %3cpath d='M12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10Z' fill='%233E3F58'/%3e %3c/svg%3e",Pt="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='%23595959' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 13.3334L8 10.3704L4 13.3334V3.85187C4 3.53754 4.12041 3.23608 4.33474 3.01382C4.54906 2.79155 4.83975 2.66669 5.14286 2.66669H10.8571C11.1602 2.66669 11.4509 2.79155 11.6653 3.01382C11.8796 3.23608 12 3.53754 12 3.85187V13.3334Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",Tt="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 13.3334L8 10.3704L4 13.3334V3.85187C4 3.53754 4.12041 3.23608 4.33474 3.01382C4.54906 2.79155 4.83975 2.66669 5.14286 2.66669H10.8571C11.1602 2.66669 11.4509 2.79155 11.6653 3.01382C11.8796 3.23608 12 3.53754 12 3.85187V13.3334Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",Mt="data:image/svg+xml,%3csvg width='3' height='13' viewBox='0 0 3 13' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='1.58326' cy='6.41663' r='1.25' transform='rotate(89.9997 1.58326 6.41663)' fill='%23595959'/%3e%3cellipse cx='1.58326' cy='1.41663' rx='1.25' ry='1.25' transform='rotate(89.9997 1.58326 1.41663)' fill='%23595959'/%3e%3cellipse cx='1.58326' cy='11.4166' rx='1.25' ry='1.25' transform='rotate(89.9997 1.58326 11.4166)' fill='%23595959'/%3e%3c/svg%3e",jt="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 5.33337C13.1046 5.33337 14 4.43794 14 3.33337C14 2.2288 13.1046 1.33337 12 1.33337C10.8954 1.33337 10 2.2288 10 3.33337C10 4.43794 10.8954 5.33337 12 5.33337Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M4 10C5.10457 10 6 9.10457 6 8C6 6.89543 5.10457 6 4 6C2.89543 6 2 6.89543 2 8C2 9.10457 2.89543 10 4 10Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M12 14.6666C13.1046 14.6666 14 13.7712 14 12.6666C14 11.5621 13.1046 10.6666 12 10.6666C10.8954 10.6666 10 11.5621 10 12.6666C10 13.7712 10.8954 14.6666 12 14.6666Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M5.72668 9.00665L10.28 11.66' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M10.2734 4.33997L5.72668 6.9933' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",_t="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M2 4H3.33333H14' stroke='%23737373' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M5.33334 3.99992V2.66659C5.33334 2.31296 5.47382 1.97382 5.72387 1.72378C5.97392 1.47373 6.31305 1.33325 6.66668 1.33325H9.33334C9.68697 1.33325 10.0261 1.47373 10.2762 1.72378C10.5262 1.97382 10.6667 2.31296 10.6667 2.66659V3.99992M12.6667 3.99992V13.3333C12.6667 13.6869 12.5262 14.026 12.2762 14.2761C12.0261 14.5261 11.687 14.6666 11.3333 14.6666H4.66668C4.31305 14.6666 3.97392 14.5261 3.72387 14.2761C3.47382 14.026 3.33334 13.6869 3.33334 13.3333V3.99992H12.6667Z' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M6.66666 7.33325V11.3333' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M9.33334 7.33325V11.3333' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";const Lt=({authorEmail:t,onDeletePost:l,shareUrl:i,post:s,className:r="",popoverClassName:c="",onBookmark:d,onRemoveBookmark:m,onEditPost:u})=>{const{data:{locale:p,userInfo:v,togetherUserId:g,env:{isMarryBaby:h}},action:{pushNotifications:y}}=n(Ce),{t:C}=de(),[E,k]=a(!1),[w,f]=a(!1),[b,N]=a(!1),{authActionWrapper:I}=q(),x=t&&(null==v?void 0:v.email)&&t===String(null==v?void 0:v.email);return o.createElement("div",{className:r,onClick:e=>{e.preventDefault(),e.stopPropagation()}},b&&o.createElement(J,{url:i,text:null==s?void 0:s.title,onClose:()=>N(!1)}),w&&o.createElement(mt,{thumbnail:Ae.getAssetPath("trash-bin.svg"),isThumbnailIcon:!0,title:C("popup.deletePost.title"),description:C("popup.deletePost.description"),acceptText:C("popup.deletePost.accept"),cancelText:C("popup.deletePost.cancel"),onAccept:()=>e(void 0,void 0,void 0,(function*(){if((null==s?void 0:s.id)&&!E){k(!0);try{const t=yield(({id:t,locale:o})=>e(void 0,void 0,void 0,(function*(){if(t)return yield Ne(ke(we.POST.DELETE,{id:t,_locale:o}),"DELETE")})))({id:s.id,locale:p});1===(null==t?void 0:t.status)&&(null==l||l())}catch(e){}k(!1)}})),onClose:()=>f(!1)}),o.createElement(Y,{className:c,toggleButtonContent:o.createElement("img",{src:h?xt:Mt,loading:"lazy"}),position:"bottom",align:"end",buttonProps:{isLoading:E},data:x?{isShowheader:!1,type:"list",list:[{icon:jt,label:C("morePopover.share"),onClick:()=>N(!0)},{icon:"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M7.16952 3.2356H2.99484C2.6785 3.2356 2.37512 3.36126 2.15143 3.58495C1.92774 3.80863 1.80208 4.11202 1.80208 4.42836V12.7777C1.80208 13.094 1.92774 13.3974 2.15143 13.6211C2.37512 13.8448 2.6785 13.9705 2.99484 13.9705H11.3442C11.6605 13.9705 11.9639 13.8448 12.1876 13.6211C12.4113 13.3974 12.537 13.094 12.537 12.7777V8.60303' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M11.6425 2.341C11.8798 2.10375 12.2016 1.97046 12.5371 1.97046C12.8726 1.97046 13.1944 2.10375 13.4317 2.341C13.6689 2.57826 13.8022 2.90005 13.8022 3.23558C13.8022 3.57111 13.6689 3.89289 13.4317 4.13015L7.76607 9.79578L5.38054 10.3922L5.97692 8.00663L11.6425 2.341Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",label:C("actionPopover.edit"),onClick:u},{icon:_t,label:C("actionPopover.delete"),onClick:()=>{I((()=>f(!0)))}}]}:{isShowheader:!1,type:"list",list:[{icon:jt,label:C("morePopover.share"),onClick:()=>N(!0)},{icon:(null==s?void 0:s.bookmarked)?Pt:Tt,label:(null==s?void 0:s.bookmarked)?C("morePopover.unsavePost"):C("morePopover.savePost"),onClick:()=>{I((()=>e(void 0,void 0,void 0,(function*(){if((null==v?void 0:v.id)&&(null==s?void 0:s.id))if(null==s?void 0:s.bookmarked){const e=yield Ne(ke(we.BOOKMARK.DELETE,{_locale:p}),"DELETE",{data:{post_id:String(s.id)}});1===(null==e?void 0:e.status)?(y({title:"",message:"Removed saved post",type:"success",displayIcon:Tt}),m&&m()):y({title:"",message:"Remove failed",type:"danger",displayIcon:Tt})}else{const e=yield Ne(ke(we.BOOKMARK.CREATE,{_locale:p}),"POST",{data:{user_id:g||v.id,post_id:s.id}});1===(null==e?void 0:e.status)?(y({title:"",message:"Post saved",type:"success",displayIcon:Pt}),d&&d()):y({title:"",message:"Post saved failed",type:"danger",displayIcon:Tt})}}))))}},{icon:pt,label:C("morePopover.report"),subTree:{title:C("morePopover.report.title"),description:C("morePopover.report.description"),isShowheader:!0,type:"list",list:Object.keys(Me).map((e=>({label:Me[e].label,reason:Me[e].reportReasonText,reasonValue:e}))).map((e=>({label:C(e.label),subTree:{title:C("morePopover.reportSubmit.title"),description:C("morePopover.reportSubmit.description"),isShowheader:!0,type:"jsx",jsxRenderer:t=>o.createElement(vt,{reason:e.reasonValue,reasonText:C(e.reason),postId:null==s?void 0:s.id,onClose:()=>t&&t(!1)})}})))}}]}}))};const St=({onDeleteComment:t,commentId:l,className:i="",popoverClassName:s=""})=>{const{data:{env:{isMarryBaby:r},locale:c},action:{pushNotifications:d}}=n(Ce),{t:m}=de(),[u,p]=a(!1),{authActionWrapper:v}=q();return o.createElement("div",{className:i,onClick:e=>{e.preventDefault(),e.stopPropagation()}},u&&o.createElement(mt,{thumbnail:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='17' fill='none'%3e%3cg stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' clip-path='url(%23clip0)'%3e%3cpath d='M2 4.008h12M5.333 4.008V2.675a1.333 1.333 0 0 1 1.334-1.333h2.666a1.333 1.333 0 0 1 1.334 1.333v1.333m2 0v9.334a1.333 1.333 0 0 1-1.334 1.333H4.667a1.333 1.333 0 0 1-1.334-1.333V4.008h9.334ZM6.667 7.342v4M9.333 7.342v4'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0'%3e%3cpath fill='white' d='M0 .008h16v16H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",isThumbnailIcon:!0,title:m("popup.deleteComment.title"),description:m("popup.deleteComment.description"),acceptText:m("popup.deletePost.accept"),cancelText:m("popup.deletePost.cancel"),onAccept:()=>e(void 0,void 0,void 0,(function*(){var e;if(!l)return;const o=yield(({id:e,locale:t})=>Ne(ke(we.COMMENT.DELETE,{_locale:t,id:e}),"DELETE"))({id:l,locale:c});1===(null==o?void 0:o.status)?(t&&t(),d({title:"",message:m("notification.success"),type:"success"})):d({title:"",message:(null===(e=null==o?void 0:o.messages)||void 0===e?void 0:e[0])||m("notification.failure"),type:"danger"})})),onClose:()=>p(!1)}),o.createElement(Y,{position:"bottom",align:"end",data:{isShowheader:!1,type:"list",list:[{icon:_t,label:m("actionPopover.delete"),onClick:()=>{v((()=>{p(!0)}))}}]},className:s,toggleButtonContent:o.createElement("img",{src:r?xt:Mt,loading:"lazy"}),buttonProps:{}}))};var zt="-dzIuHr";const Bt=({userId:e,avatar:t,name:n,role:l,title:i,className:s})=>{const{t:r}=de(),[c,d]=a(!1);return o.createElement(o.Fragment,null,o.createElement(Je,{className:`${zt} ${s}`,color:"success",size:"xs",onClick:()=>d(!0),style:{padding:"5px 8px",marginBottom:"12px",borderRadius:"4px"}},o.createElement("span",{className:"text"},o.createElement(ye.Endorse,{isSolid:!0,size:18,color:ue.colors.green800,className:"icon"}),r("cardReply.verifyBy",{name:`${n||""}`}))),o.createElement(X,{open:c,onClose:()=>d(!1),profileModalProps:{zIndex:1e3}},o.createElement(ee,{authorProps:{userId:e,avatar:t,name:n,role:l,title:i},hideQuestionTab:!0})))};const At=({className:t,style:l,comment:r,type:c="comment",level:d=0,replyingId:m,onPostCommentSuccess:u,post:p,onDeleteComment:v,refetchComment:g,hasQuickBookingEnable:h,handleMakeAppointment:y,cardAuthorProps:C,maxChars:E=600,disableShortenContent:k})=>{var w,f,b,N,I,x,P,T,M,j,_,L,S;const{data:{locale:z,userInfo:B,env:{isMarryBaby:A}}}=n(Ce),{t:O}=de(),[F,D]=a(r||null),{id:R,countLikes:U,content:V,replies:$=[],images:Z=[],author:H,liked:W,link:Q,mentionedUser:K,mentions:G}=F,{text:J,replyingTo:Y}=(e=>{try{const t=e.match(/\[@([^\]]+)\]/),o=t?t[0].replace("[@","").replace("]",""):"";return{text:e.replace(/\[@([^\]]+)\]/,"").trim(),replyingTo:o}}catch(e){}return{text:""}})(V),{authActionWrapper:X}=q({_joinCommunityIds:[null===(w=null==p?void 0:p.community)||void 0===w?void 0:w.id],_joinTopicIds:null===(f=null==p?void 0:p.topics)||void 0===f?void 0:f.map((e=>e.id))}),[ee,re]=a(4),ce=!!(null==B?void 0:B.id)&&(null==$?void 0:$.some((e=>e.author.id===B.id))),me=e=>{D((t=>{if(!t.replies.find((t=>t.id===e.id))){t.replies.unshift(e);const o=Object.assign(Object.assign({},t),{replies:t.replies.slice(),countReplies:t.countReplies+1});return g&&g(o),o}return t}))},[ue,pe]=a(!1),ve=s((()=>"comment"===c&&$&&0!=$.length?$.sort(((e,t)=>{const o=new Date(e.createdAt).getTime(),n=new Date(t.createdAt).getTime();return o>n?-1:o<n?1:0})):$),[c,$]),ge=(null==$?void 0:$.length)||0,he=String(null==H?void 0:H.email)&&(null==B?void 0:B.email)&&String(null==H?void 0:H.email)===String(null==B?void 0:B.email),ye=(null==H?void 0:H.name)||(null==H?void 0:H.username)||"",fe=(null==H?void 0:H.username)||(null==H?void 0:H.name)||"",be=null==H?void 0:H.avatar,Ie=(null==p?void 0:p.isAnonymous)||null==H?void 0:H.role,xe=[...(null==p?void 0:p.isAnonymous)?[{id:(null===(b=null==p?void 0:p.author)||void 0===b?void 0:b.id)||0,name:O("cardPost.anonymous")}]:[],...G||[]],[Pe,Te]=a(null),[Me,Le]=a(null);i((()=>{if(null==H?void 0:H.hospitalId){const t=t=>e(void 0,void 0,void 0,(function*(){var e;const o=yield Ee(je(_e.GET_HOSPITAL_INFO,{hospital_branch_id:t,website_url:Be[z]}),"get");(null===(e=null==o?void 0:o._data)||void 0===e?void 0:e.branch)&&Te(null==o?void 0:o._data.branch)}));t(H.hospitalId)}if(null==H?void 0:H.doctorId){const t=t=>e(void 0,void 0,void 0,(function*(){var e;const o=yield Ee(je(_e.GET_DOCTOR_INFO,{doctorId:t,website_url:Be[z]}),"get");(null===(e=null==o?void 0:o._data)||void 0===e?void 0:e.doctor)&&Le(null==o?void 0:o._data.doctor)}));t(H.doctorId)}}),[H.hospitalId,H.doctorId]);const Se=(null==Me?void 0:Me.valid_outpatient)||(null==Me?void 0:Me.valid_telemedicine),ze=((null==Pe?void 0:Pe.total_available_service)||(null==Pe?void 0:Pe.total_available_doctor))>0,Ae=h&&(Se||ze),Oe="chatbot"===(null===(N=null==F?void 0:F.author)||void 0===N?void 0:N.type);return o.createElement(te,{defaultParams:{_joinCommunityIds:[null===(I=null==p?void 0:p.community)||void 0===I?void 0:I.id],_joinTopicIds:null===(x=null==p?void 0:p.topics)||void 0===x?void 0:x.map((e=>e.id))}},o.createElement(oe,{className:t,style:l,"data-is-reply":!!d,"data-is-marrybaby":A,"data-has-booking":Ae},"reply"===c&&o.createElement(Ve,{className:"top-divider",type:"solid"}),o.createElement("div",{style:{padding:"16px 16px 0"}},o.createElement(ne,Object.assign({avatar:be,name:ye,username:fe,timeText:null==p?void 0:p.createdTime,community:null==p?void 0:p.community,className:"post-author "+(he?"with-popover":""),type:c,userId:null==H?void 0:H.id,role:Ie,expertId:null==H?void 0:H.partnerId,title:null==H?void 0:H.title,doctorId:null==H?void 0:H.doctorId,hospitalId:null==H?void 0:H.hospitalId,hasQuickBooking:Ae,handleMakeAppointment:y,isAnonymous:(null==F?void 0:F.isAnonymous)||Boolean(null==p?void 0:p.isAnonymous)&&(null===(P=null==p?void 0:p.author)||void 0===P?void 0:P.username)===(null==H?void 0:H.username),hideBackground:Oe,userType:null==H?void 0:H.type},C)),Boolean(null==F?void 0:F.isVerify)&&!Boolean(null==F?void 0:F.isOppose)&&o.createElement(Bt,{title:null===(T=null==F?void 0:F.userVerify)||void 0===T?void 0:T.title,name:null===(M=null==F?void 0:F.userVerify)||void 0===M?void 0:M.name,userId:null===(j=null==F?void 0:F.userVerify)||void 0===j?void 0:j.id,role:null===(_=null==F?void 0:F.userVerify)||void 0===_?void 0:_.role,avatar:null===(L=null==F?void 0:F.userVerify)||void 0===L?void 0:L.avatar,className:"verify-tag"})),o.createElement(ae,{className:"post-content-wrapper",replyingTo:Y,mentionedUser:K,description:J,mentions:xe,maxChars:E,disableShortenContent:k}),o.createElement("span",null),o.createElement("span",null),Z&&Z.length>0?o.createElement("div",{key:"image-preview",className:"image-preview-wrapper","data-is-reply":!0},o.createElement(Et,{images:Z,authorName:null==H?void 0:H.username})):null,Z&&0!==Z.length||!Q?null:o.createElement("div",{key:"link-preview",className:"link-preview-wrapper","data-is-reply":!0},o.createElement(Xe,{url:Q})),"most-engaging"!==c?o.createElement(o.Fragment,null,Oe&&o.createElement(le,{listUrl:null==F?void 0:F.source,categorySlug:null==F?void 0:F.categorySlug}),o.createElement(ie,{type:se.reply,loveCount:U,replyCount:ge,className:"post-reaction",liked:W,isReplied:ce,hideCommentIcon:"reply"===c||Oe,hasShare:!1,onCommentClick:()=>X((()=>pe((e=>!e)))),onCommentCountClick:()=>X((()=>{pe(!0)})),onLikeClick:()=>X((()=>e(void 0,void 0,void 0,(function*(){if(R){const t=yield(({commentId:t,setLike:o=!1,locale:n})=>e(void 0,void 0,void 0,(function*(){return Ne(ke(o?we.COMMENT.LIKE:we.COMMENT.UNLIKE,{_locale:n,id:t}),"GET")})))({commentId:R,setLike:!W,locale:z});1===t.status&&D((e=>Object.assign(Object.assign({},e),{liked:!W,countLikes:e.countLikes+(W?-1:1)})))}}))))}),ue&&o.createElement(ut,{replyingId:m||F.id,replyToName:ye,isReply:!0,onClose:()=>pe(!1),onPostSuccess:e=>{"reply"===c?u&&u(e):me(e)},post:p,replyingUser:H}),"comment"===c&&$&&$.length>0?o.createElement("div",{className:"comment-reply-wrapper"},null===(S=null==ve?void 0:ve.slice(0,ee))||void 0===S?void 0:S.map((e=>o.createElement(At,{key:e.id,comment:e,type:"reply",className:"comment-reply-item",level:d+1,replyingId:R,onPostCommentSuccess:me,post:p,onDeleteComment:()=>{D((t=>Object.assign(Object.assign({},t),{replies:t.replies.filter((t=>t.id!==e.id)),countReplies:t.countReplies-1})))},handleMakeAppointment:y,hasQuickBookingEnable:h}))),ge>ee&&o.createElement(o.Fragment,null,o.createElement(Ve,{className:"top-divider",type:"solid"}),o.createElement(Je,{className:"more-cmt",size:"lg",color:"ghost",onClick:()=>re((e=>e+4))},O("comment.seeMoreReplies",{count:ge-ee}),o.createElement("img",{className:"chevron-right",src:"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M6 12L10 8L6 4' stroke='%232D87F3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",loading:"lazy"})))):null):null,he&&o.createElement(St,{onDeleteComment:v,className:"popover",commentId:F.id})))},Ot=(t,o)=>e(void 0,void 0,void 0,(function*(){var e,n,a;const l=yield Se(ke(we.COMMENT.LIST,{postId:t,_locale:o,sort:"popularity",perPage:1,withoutReply:1}),"GET");return null===(a=null===(n=null===(e=null==l?void 0:l.data)||void 0===e?void 0:e.comments)||void 0===n?void 0:n.map(We))||void 0===a?void 0:a[0]})),Ft=({className:t,style:l,hideViewMoreComment:s,showMostEngaging:r,onCommentClick:c,onCommentCountClick:d,onMostEngagingCommentClick:m,onPostCommentSuccess:u,disableCardLink:p,disableShortenContent:v,onDeletePost:g,onEditPost:h,post:y,mostEngagingComment:C,onDeleteComment:E,showInputComment:k,InlineCommentsComponent:w,hasQuickBookingEnable:f,handleMakeAppointment:b,cardAuthorProps:N})=>{const[I,x]=a(y),[P,T]=a(!1),[M,j]=a(C),{community:_,topics:L,author:S,slug:z,isPin:B,liked:A,photos:O,mentions:F,title:D,description:R,previewUrl:U,likesCount:V,commentsCount:$,id:Z,commented:H}=I,{data:{locale:W,env:{isMarryBaby:Q,togetherBasePath:K}},action:{pushNotifications:G}}=n(Ce),{t:Y}=de(),[X,ee]=a(k),oe=`${K}/${(null==_?void 0:_.slug)||"_"}/${z||""}`,le=`${Le(W)}${oe}`,{authActionWrapper:ue}=q((null==_?void 0:_.slug)?{_joinCommunityIds:[_.id],_joinTopicIds:null==L?void 0:L.map((e=>e.id))}:void 0),[pe,ve]=a(!1);i((()=>{ee(k)}),[k]);const ge=(null==S?void 0:S.name)||(null==S?void 0:S.username)||"",he=(null==S?void 0:S.username)||(null==S?void 0:S.name)||"",ye=null==S?void 0:S.avatar,Ie=(null==I?void 0:I.isAnonymous)||null==S?void 0:S.role,[xe,Pe]=a(null),[Te,Me]=a(null);i((()=>{if(null==S?void 0:S.hospitalId){(t=>e(void 0,void 0,void 0,(function*(){var e;const o=yield Ee(je(_e.GET_HOSPITAL_INFO,{hospital_branch_id:t,website_url:ze[W]}),"get");(null===(e=null==o?void 0:o._data)||void 0===e?void 0:e.branch)&&Pe(null==o?void 0:o._data.branch)})))(S.hospitalId)}if(null==S?void 0:S.doctorId){(t=>e(void 0,void 0,void 0,(function*(){var e;const o=yield Ee(je(_e.GET_DOCTOR_INFO,{doctorId:t,website_url:ze[W]}),"get");(null===(e=null==o?void 0:o._data)||void 0===e?void 0:e.doctor)&&Me(null==o?void 0:o._data.doctor)})))(S.doctorId)}}),[S.hospitalId,S.doctorId]);const Se=(null==Te?void 0:Te.valid_outpatient)||(null==Te?void 0:Te.valid_telemedicine),Be=((null==xe?void 0:xe.total_available_service)||(null==xe?void 0:xe.total_available_doctor))>0,Ae=f&&(Se||Be);i((()=>{e(void 0,void 0,void 0,(function*(){if(Z&&$&&r&&!(null==C?void 0:C.id)){const e=yield Ot(Z,W);j(e)}}))}),[Z,W,$,r,null==C?void 0:C.id]),i((()=>{j(C)}),[null==C?void 0:C.id]);const Oe=t=>e(void 0,void 0,void 0,(function*(){if($>1&&(null==M?void 0:M.id)&&(null==M?void 0:M.id)===(null==t?void 0:t.id)){const e=yield Ot(Z,W);j(e)}x((e=>Object.assign(Object.assign({},e),{commentsCount:e.commentsCount-1}))),E&&E(t)}));return o.createElement(te,{defaultParams:(null==_?void 0:_.slug)?{_joinCommunityIds:[_.id],_joinTopicIds:null==L?void 0:L.map((e=>e.id))}:void 0},P&&o.createElement(J,{url:le,avatar:fe,text:D,onClose:()=>T(!1)}),o.createElement(re,{className:t,style:l,"data-is-marrybaby":Q},B?o.createElement(et,{className:"post-pin"}):null,o.createElement("div",{style:{position:"relative",padding:"1rem 1rem 0"}},o.createElement(ne,Object.assign({avatar:ye,name:ge,username:he,url:p?void 0:oe,community:_,timeText:null==I?void 0:I.createdTime,className:"post-author",role:Ie,userId:null==S?void 0:S.id,expertId:null==S?void 0:S.partnerId,doctorId:null==S?void 0:S.doctorId,hospitalId:null==S?void 0:S.hospitalId,title:null==S?void 0:S.title,hasQuickBooking:Ae,handleMakeAppointment:b,"data-testid":"name",isAnonymous:!!(null==I?void 0:I.isAnonymous),extendEle:o.createElement(Lt,{authorEmail:String(null==S?void 0:S.email),onDeletePost:g,shareUrl:le,post:I,className:"popover",onEditPost:h})},N))),o.createElement("a",{href:p?void 0:oe,className:"post-content-link-wrapper"},D&&o.createElement(be,{className:"post-content-title",as:"h2",tag:"h5",fontWeight:"bold","data-testid":"Title of the Post"},me(D)),o.createElement(ae,{className:"post-content-wrapper",description:R,disableShortenContent:v,mentions:F,"data-testid":"Content of the Post"})),o.createElement("span",null),o.createElement("span",null),o.createElement("div",{key:"tag-topic"},L&&L.length>0?o.createElement(ce,{topics:L,className:"post-topics"}):null),o.createElement("div",{key:"social-preview"},(null==I?void 0:I.introUrl)?o.createElement("div",{className:"social-preview-wrapper "+((null==O?void 0:O.length)?"has-image":"")},o.createElement(kt,{url:I.introUrl,image:I.bannerImage})):null),o.createElement("div",{key:"image-preview"},(null==O?void 0:O.length)?o.createElement("div",{className:"image-preview-wrapper"},o.createElement(Et,{images:O,authorName:null==S?void 0:S.name})):null),o.createElement("div",{key:"link-preview"},(null==I?void 0:I.introUrl)||(null==O?void 0:O.length)||!(null==U?void 0:U.url)?null:o.createElement("div",{className:"link-preview-wrapper"},o.createElement(Xe,{title:U.title,url:U.url,image:U.image}))),o.createElement(ie,{isMarryBaby:Q,type:se.post,loveCount:V,replyCount:$,className:"post-reaction "+((null==O?void 0:O.length)||(null==U?void 0:U.url)?"hide-top-border":""),liked:pe?!A:A,isReplied:H,onCommentClick:()=>ue((()=>{c?c():ee((e=>!e))})),onCommentCountClick:()=>{ue((()=>{Q?ee(!0):d?d():!p&&(window.location.href=oe)}))},onShareClick:()=>{T(!0)},onLikeClick:()=>e(void 0,void 0,void 0,(function*(){if(Z&&!pe){ve(!0);try{const t=yield(({id:t,locale:o})=>e(void 0,void 0,void 0,(function*(){if(t)return yield Ne(ke(we.POST.LIKE,{id:t,_locale:o}),"GET")})))({id:Z,locale:W});1!==(null==t?void 0:t.status)?G(tt(Y)):x((e=>Object.assign(Object.assign({},e),{likesCount:(e.likesCount||0)+(e.liked?-1:1),liked:!e.liked})))}catch(e){G(tt(Y))}ve(!1)}})),showingMostEngaging:!(!r||!(null==M?void 0:M.id))}),X&&o.createElement(ut,{isMainCmt:!k,onClose:()=>ee(!1),onPostSuccess:e=>{0!==$||(null==M?void 0:M.id)||j(e),x((e=>Object.assign(Object.assign({},e),{commentsCount:e.commentsCount+1,commented:!0}))),u&&u(e)},post:I}),r&&(null==M?void 0:M.id)?o.createElement("div",{className:"most-engaging-wrapper",onClick:e=>{m?(e.stopPropagation(),m()):window.location.href=oe}},o.createElement(At,{hasQuickBookingEnable:f,handleMakeAppointment:b,comment:M,post:I,onDeleteComment:()=>{Oe&&Oe(M)},className:"most-engaging-comment",type:"most-engaging",key:M.id,cardAuthorProps:N}),$>1&&!s&&o.createElement(Je,{className:"see-more-comments",color:"ghost",size:"md"},Y("comment.seeMoreComments",{count:$-1}))):null,w))};var Dt=Object.freeze({__proto__:null});export{Xe as C,ut as I,et as L,mt as P,vt as S,rt as T,Bt as V,dt as a,lt as b,st as c,gt as d,yt as e,Et as f,kt as g,It as h,Ft as i,Lt as j,At as k,St as l,Dt as t};
|