@hhgtech/hhg-components 1.28.25 → 1.28.26
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/babyGrowth.js +2 -2
- package/build/cache.js +1 -1
- package/build/care.js +1 -1
- package/build/components.js +1 -1
- package/build/{constants-eb373bf5.js → constants-206f3b70.js} +1 -1
- package/build/{constants-8af12980.js → constants-d9ea113d.js} +1 -1
- package/build/constants.js +1 -1
- package/build/{core-5978cdd4.js → core-1e5dc399.js} +1 -1
- package/build/ecom.js +1 -1
- package/build/esm/babyGrowth.js +2 -2
- package/build/esm/cache.js +1 -1
- package/build/esm/care.js +1 -1
- package/build/esm/components.js +1 -1
- package/build/esm/{constants-bca8e7af.js → constants-b1321698.js} +2 -2
- package/build/esm/{constants-fc5771dc.js → constants-f9d7aa8c.js} +1 -1
- package/build/esm/constants.js +1 -1
- package/build/esm/{core-3c6e483d.js → core-f858b620.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-844c6f6a.js +1 -0
- package/build/esm/{getSocialList-9ed2061e.js → getSocialList-7e971b70.js} +1 -1
- package/build/esm/hooks.js +1 -1
- package/build/esm/i18n.js +1 -1
- package/build/esm/i18nV2.js +1 -1
- package/build/esm/{index-9c867337.js → index-11fea400.js} +1 -1
- package/build/esm/{index-b340c88e.js → index-146e09e3.js} +1 -1
- package/build/esm/{index-6338ed1b.js → index-3d5c1bc6.js} +1 -1
- package/build/esm/{index-1c55143a.js → index-480d01ae.js} +1 -1
- package/build/esm/{index-e8aaf5df.js → index-48404b57.js} +1 -1
- package/build/esm/{index-6faee03f.js → index-58c18460.js} +1 -1
- package/build/esm/{index-bd53a722.js → index-5b6ce3c8.js} +1 -1
- package/build/esm/{index-4174f289.js → index-6bfa1218.js} +1 -1
- package/build/esm/index-7344117e.js +1 -0
- package/build/esm/{index-ddb32dc6.js → index-798caaf0.js} +1 -1
- package/build/esm/index-9dfd478f.js +1 -0
- package/build/esm/{index-c63fb626.js → index-a192f489.js} +1 -1
- package/build/esm/{index-880d2a8f.js → index-bac9d662.js} +1 -1
- package/build/esm/{index-69a4a005.js → index-bbcd103b.js} +1 -1
- package/build/esm/{index-a6e8c71e.js → index-c382ba8d.js} +1 -1
- package/build/esm/{index-8927cb0f.js → index-d08071f0.js} +1 -1
- package/build/esm/{index-836c956c.js → index-dbff2d47.js} +1 -1
- package/build/esm/{index-3ac431a8.js → index-ee15c33c.js} +5 -5
- package/build/esm/{index-306fbf41.js → index-f4cf350a.js} +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/{index.styled-3020e8c4.js → index.styled-2bdbb16a.js} +1 -1
- package/build/esm/{index.styled-11c36629.js → index.styled-7ef36c68.js} +1 -1
- package/build/esm/{index.styles-f629b750.js → index.styles-07a11ccd.js} +2 -2
- 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/onboardingV2.js +9 -9
- package/build/esm/pwg.js +1 -1
- package/build/esm/{routing-0aec38d3.js → routing-a4e59b08.js} +1 -1
- package/build/esm/together/api/utils.d.ts +1 -1
- package/build/esm/together/components/molecules/socialLinkPreview/index.d.ts +2 -1
- package/build/esm/together.js +1 -1
- package/build/esm/types-6e7ea58d.js +1 -0
- package/build/esm/{types-c9f0199d.js → types-de6c8d61.js} +1 -1
- package/build/esm/types.js +1 -1
- package/build/esm/{useCategory-cbb912b5.js → useCategory-66dc7051.js} +1 -1
- package/build/esm/useHealthToolCache-5b011d4c.js +1 -0
- package/build/esm/{useRafState-6698a0f5.js → useRafState-1446e72b.js} +1 -1
- package/build/esm/{useTranslations-18faf79a.js → useTranslations-28b19550.js} +1 -1
- package/build/esm/{utils-dc9fb887.js → utils-4dd7269c.js} +1 -1
- package/build/esm/{utils-434d3391.js → utils-c9c9f998.js} +1 -1
- package/build/esm/vaccination.js +1 -1
- package/build/footer.js +1 -1
- package/build/gAssets.js +1 -1
- package/build/getDynamicHealthTool-701bf691.js +1 -0
- package/build/{getSocialList-b291d0bd.js → getSocialList-34b4160e.js} +1 -1
- package/build/hooks.js +1 -1
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/{index-240fca13.js → index-0212babb.js} +1 -1
- package/build/{index-2a6287f6.js → index-26547fdb.js} +1 -1
- package/build/{index-928fd58f.js → index-2922fa49.js} +1 -1
- package/build/{index-8938097e.js → index-2ef62da6.js} +1 -1
- package/build/{index-0d263401.js → index-43968e3d.js} +16 -16
- package/build/index-6e03cf5a.js +1 -0
- package/build/{index-9fd91b07.js → index-773217c2.js} +1 -1
- package/build/{index-95417452.js → index-781bee17.js} +1 -1
- package/build/index-79708112.js +1 -0
- package/build/{index-6a6dcb68.js → index-80c61fb6.js} +1 -1
- package/build/{index-5909a7ec.js → index-820acd26.js} +1 -1
- package/build/{index-b45db661.js → index-85409c2e.js} +1 -1
- package/build/{index-d546f88a.js → index-a0d5a151.js} +1 -1
- package/build/{index-ae5f9f02.js → index-b75de7cd.js} +1 -1
- package/build/{index-c838819c.js → index-c5b7c15a.js} +1 -1
- package/build/{index-8373a77d.js → index-e2b8fc0e.js} +1 -1
- package/build/{index-b83d2770.js → index-e3a8e828.js} +3 -3
- package/build/index-e68f4447.js +1 -0
- package/build/{index-8673ffc2.js → index-f7536bc6.js} +1 -1
- package/build/index.js +1 -1
- package/build/{index.styled-c178082e.js → index.styled-0a9266aa.js} +1 -1
- package/build/{index.styled-a7549b47.js → index.styled-e25011fd.js} +1 -1
- package/build/{index.styles-f4aff724.js → index.styles-f208cbbd.js} +5 -5
- 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/onboardingV2.js +5 -5
- package/build/pwg.js +2 -2
- package/build/{routing-b67a278f.js → routing-eeb746d3.js} +1 -1
- package/build/together/api/utils.d.ts +1 -1
- package/build/together/components/molecules/socialLinkPreview/index.d.ts +2 -1
- package/build/together.js +1 -1
- package/build/types-5160cfd8.js +1 -0
- package/build/{types-7c122b9c.js → types-9c12ca83.js} +1 -1
- package/build/types.js +1 -1
- package/build/{useCategory-cfd11905.js → useCategory-9cb93e7b.js} +1 -1
- package/build/useHealthToolCache-6cdee506.js +1 -0
- package/build/{useRafState-81abb010.js → useRafState-1e420cf7.js} +1 -1
- package/build/{useTranslations-96b012cf.js → useTranslations-91457229.js} +1 -1
- package/build/{utils-f9e93016.js → utils-18296362.js} +1 -1
- package/build/{utils-e8a0f10a.js → utils-293ffa82.js} +1 -1
- package/build/vaccination.js +1 -1
- package/package.json +1 -1
- package/build/esm/getDynamicHealthTool-ed690f75.js +0 -1
- package/build/esm/index-66cbe237.js +0 -1
- package/build/esm/index-a82319dd.js +0 -1
- package/build/esm/types-6351eb61.js +0 -1
- package/build/esm/useHealthToolCache-95ff51a6.js +0 -1
- package/build/getDynamicHealthTool-2a8e5e1b.js +0 -1
- package/build/index-1c682ea0.js +0 -1
- package/build/index-758f38da.js +0 -1
- package/build/index-b3e4136f.js +0 -1
- package/build/types-bb29c964.js +0 -1
- package/build/useHealthToolCache-caf47ec9.js +0 -1
- /package/build/{BMI_BOYS.percentile.monthly-218f0308.js → BMI_BOYS.percentile.monthly-1cd695d8.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-f903e937.js → BMI_BOYS.percentile.weekly-0056c560.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-ea53587d.js → BMI_BOYS.percentile.yearly-03cca0be.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-936d706e.js → BMI_BOYS.zscore.monthly-aa5df91d.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-b438f646.js → BMI_BOYS.zscore.weekly-3d76505b.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-60a4ace7.js → BMI_BOYS.zscore.yearly-52d967e9.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-7e1aa1db.js → BMI_GIRLS.percentile.monthly-1d8ebde3.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-35f9cd60.js → BMI_GIRLS.percentile.weekly-77acf120.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-e94e765f.js → BMI_GIRLS.percentile.yearly-0baa066c.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-e5a9ae4f.js → BMI_GIRLS.zscore.monthly-2c416f8b.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-9ac26fd9.js → BMI_GIRLS.zscore.weekly-05aa726d.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-4b2deeb6.js → BMI_GIRLS.zscore.yearly-d1a2c524.js} +0 -0
- /package/build/{ChevronDown-4382f734.js → ChevronDown-a7f9de37.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-3ea985a6.js → HEAD CIRCUM_BOYS.percentile.monthly-5c54a40f.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-3ace3bc8.js → HEAD CIRCUM_BOYS.percentile.weekly-ed924d0f.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-52f6f772.js → HEAD CIRCUM_BOYS.percentile.yearly-39b250f2.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-05fed8e9.js → HEAD CIRCUM_BOYS.zscore.monthly-89b42d5b.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-8077b479.js → HEAD CIRCUM_BOYS.zscore.weekly-11d3c7fe.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-3c3ff74e.js → HEAD CIRCUM_BOYS.zscore.yearly-48bbe7a5.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-88a58be8.js → HEAD CIRCUM_GIRLS.percentile.monthly-f611c38e.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-22c2a712.js → HEAD CIRCUM_GIRLS.percentile.weekly-fcbd5d63.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-2daf3ff1.js → HEAD CIRCUM_GIRLS.percentile.yearly-8224f26f.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-1f3e0b93.js → HEAD CIRCUM_GIRLS.zscore.monthly-c7f6b828.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-8a8fd74c.js → HEAD CIRCUM_GIRLS.zscore.weekly-49769efc.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-d66b4ee6.js → HEAD CIRCUM_GIRLS.zscore.yearly-0b528e0a.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-dab81c96.js → HEIGHT_BOYS.percentile.monthly-e35d8b62.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-dd1d7401.js → HEIGHT_BOYS.percentile.weekly-521fe16f.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-e2c22eb2.js → HEIGHT_BOYS.percentile.yearly-0330595f.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-49e9becc.js → HEIGHT_BOYS.zscore.monthly-829ea24d.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-fc714d39.js → HEIGHT_BOYS.zscore.weekly-a21e2c75.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-bdd2dd80.js → HEIGHT_BOYS.zscore.yearly-9a35dcb2.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-c3829545.js → HEIGHT_GIRLS.percentile.monthly-2b496255.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-52c1b624.js → HEIGHT_GIRLS.percentile.weekly-798d0798.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-4865a9e1.js → HEIGHT_GIRLS.percentile.yearly-98716d86.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-74debfe8.js → HEIGHT_GIRLS.zscore.monthly-c7cae5ca.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-a90875d3.js → HEIGHT_GIRLS.zscore.weekly-2a3d14bd.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-0e560772.js → HEIGHT_GIRLS.zscore.yearly-1f072a23.js} +0 -0
- /package/build/{Onboarding-f5b4434c.js → Onboarding-657118be.js} +0 -0
- /package/build/{Visible-7d93de62.js → Visible-18046824.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-1c4ea131.js → WEIGHT_BOYS.percentile.monthly-3934e3d6.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-808746c8.js → WEIGHT_BOYS.percentile.weekly-d1e205d3.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-8f65ba15.js → WEIGHT_BOYS.percentile.yearly-60038eb2.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-13efc6d1.js → WEIGHT_BOYS.zscore.monthly-09c98a58.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-d430ec92.js → WEIGHT_BOYS.zscore.weekly-f5af9666.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-87942e91.js → WEIGHT_BOYS.zscore.yearly-af4fa571.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-d18aa1b7.js → WEIGHT_GIRLS.percentile.monthly-8aba1338.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-97e6cc9e.js → WEIGHT_GIRLS.percentile.weekly-5aa37aee.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-ea43b3e3.js → WEIGHT_GIRLS.percentile.yearly-76c3462e.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-7d53e17c.js → WEIGHT_GIRLS.zscore.monthly-b95aebe5.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-67f173d3.js → WEIGHT_GIRLS.zscore.weekly-f9e24db4.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-39e28850.js → WEIGHT_GIRLS.zscore.yearly-48f4eb07.js} +0 -0
- /package/build/{cookieHelper-1783b725.js → cookieHelper-e985d4c7.js} +0 -0
- /package/build/{dataTransform-a8a79524.js → dataTransform-30c3f50a.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-95a74310.js → BMI_BOYS.percentile.monthly-a4a0ad7b.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-0e4e63a2.js → BMI_BOYS.percentile.weekly-63b2bfcf.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-853ffee1.js → BMI_BOYS.percentile.yearly-ce94b23f.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-5496d93b.js → BMI_BOYS.zscore.monthly-ae9d6e27.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-bd4e0edd.js → BMI_BOYS.zscore.weekly-2f5e4917.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-2983511d.js → BMI_BOYS.zscore.yearly-f2a75999.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-40a88871.js → BMI_GIRLS.percentile.monthly-867ec46e.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-527c02ad.js → BMI_GIRLS.percentile.weekly-175ab658.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-805b7ad2.js → BMI_GIRLS.percentile.yearly-5ee37a78.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-8f23f4c9.js → BMI_GIRLS.zscore.monthly-c7b46d27.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-11b1c77e.js → BMI_GIRLS.zscore.weekly-6cf428b7.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-b6400101.js → BMI_GIRLS.zscore.yearly-cf665059.js} +0 -0
- /package/build/esm/{ChevronDown-ce280375.js → ChevronDown-5eb26fa9.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-9662021b.js → HEAD CIRCUM_BOYS.percentile.monthly-c0092a9b.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-ed12efaf.js → HEAD CIRCUM_BOYS.percentile.weekly-60e4e681.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-dd901e38.js → HEAD CIRCUM_BOYS.percentile.yearly-e195a8f5.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-9511507c.js → HEAD CIRCUM_BOYS.zscore.monthly-83ea3849.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-636f6754.js → HEAD CIRCUM_BOYS.zscore.weekly-9f9f34e6.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-895b69f9.js → HEAD CIRCUM_BOYS.zscore.yearly-3837882e.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-88e35ff0.js → HEAD CIRCUM_GIRLS.percentile.monthly-8eb0c2b1.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-5c38c8a9.js → HEAD CIRCUM_GIRLS.percentile.weekly-e35d52a1.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-0d5f2c25.js → HEAD CIRCUM_GIRLS.percentile.yearly-b85a212e.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-c979810d.js → HEAD CIRCUM_GIRLS.zscore.monthly-d05611bf.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-46f235a2.js → HEAD CIRCUM_GIRLS.zscore.weekly-68620b06.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-b1659c98.js → HEAD CIRCUM_GIRLS.zscore.yearly-6589d2cd.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-6c5af9fa.js → HEIGHT_BOYS.percentile.monthly-e528b356.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-0a5ed1d5.js → HEIGHT_BOYS.percentile.weekly-5cc30d5e.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-b88eebdf.js → HEIGHT_BOYS.percentile.yearly-5f6d1261.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-e30f12c2.js → HEIGHT_BOYS.zscore.monthly-df54093d.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-3811f440.js → HEIGHT_BOYS.zscore.weekly-cb871f3e.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-02a3ad59.js → HEIGHT_BOYS.zscore.yearly-be2bf770.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-12989867.js → HEIGHT_GIRLS.percentile.monthly-faac10ab.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-ffd2fd60.js → HEIGHT_GIRLS.percentile.weekly-171f0405.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-d87163d9.js → HEIGHT_GIRLS.percentile.yearly-1e9a8a8c.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-35e8a9e2.js → HEIGHT_GIRLS.zscore.monthly-c6a3a15a.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-a63b5b22.js → HEIGHT_GIRLS.zscore.weekly-16914b26.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-436400b0.js → HEIGHT_GIRLS.zscore.yearly-d1bb3b68.js} +0 -0
- /package/build/esm/{Onboarding-f538c632.js → Onboarding-68463903.js} +0 -0
- /package/build/esm/{Visible-a9de7388.js → Visible-a28d7eb0.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-5c205bc4.js → WEIGHT_BOYS.percentile.monthly-eb935b31.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-6b2234ad.js → WEIGHT_BOYS.percentile.weekly-e87dae78.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-cfa64b7b.js → WEIGHT_BOYS.percentile.yearly-3b5ceca6.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-7a952e01.js → WEIGHT_BOYS.zscore.monthly-c289c49f.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-88043d5b.js → WEIGHT_BOYS.zscore.weekly-43ced9e1.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-97865923.js → WEIGHT_BOYS.zscore.yearly-159239ae.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-bf43f67c.js → WEIGHT_GIRLS.percentile.monthly-2acfe764.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-a7916366.js → WEIGHT_GIRLS.percentile.weekly-0fa87a0f.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-0f4f4835.js → WEIGHT_GIRLS.percentile.yearly-0009507a.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-720c9d68.js → WEIGHT_GIRLS.zscore.monthly-e4df7056.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-0fe876f7.js → WEIGHT_GIRLS.zscore.weekly-1b18ee01.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-6e69aa6f.js → WEIGHT_GIRLS.zscore.yearly-3e77aea2.js} +0 -0
- /package/build/esm/{cookieHelper-66019d7c.js → cookieHelper-87d0e0e7.js} +0 -0
- /package/build/esm/{dataTransform-7cbe2b75.js → dataTransform-233027fc.js} +0 -0
- /package/build/esm/{index-d71717bf.js → index-0aeb7ac9.js} +0 -0
- /package/build/esm/{index-44be6dee.js → index-9d684c92.js} +0 -0
- /package/build/esm/{index-1dbd770d.js → index-db903b7d.js} +0 -0
- /package/build/esm/{isProduction-f5099945.js → isProduction-51fadd96.js} +0 -0
- /package/build/esm/{localizeNumberFormat-760ac0c3.js → localizeNumberFormat-f423cfc1.js} +0 -0
- /package/build/esm/{normalizeLink-f4e87ebe.js → normalizeLink-7f6a35f5.js} +0 -0
- /package/build/esm/{number-150cab79.js → number-06671b87.js} +0 -0
- /package/build/esm/{paths-b8ff5553.js → paths-b4d6519e.js} +0 -0
- /package/build/esm/{screenSizeContext-25c92de6.js → screenSizeContext-7e881f6d.js} +0 -0
- /package/build/esm/{theme-de71eed3.js → theme-f470318d.js} +0 -0
- /package/build/esm/{translationsContext-85ba1228.js → translationsContext-d199b4bc.js} +0 -0
- /package/build/esm/{tslib.es6-f1757470.js → tslib.es6-71be3ad2.js} +0 -0
- /package/build/esm/{types-6a9ff247.js → types-daf9f191.js} +0 -0
- /package/build/esm/{useIsInit-04c9dc57.js → useIsInit-96aef578.js} +0 -0
- /package/build/esm/{useOutsideClick-f4512be5.js → useOutsideClick-3c9bb801.js} +0 -0
- /package/build/esm/{useScrollbarSize-8ef8c6e8.js → useScrollbarSize-a671c544.js} +0 -0
- /package/build/{index-feba14a5.js → index-69072e3c.js} +0 -0
- /package/build/{index-757ab0e0.js → index-e46f2dda.js} +0 -0
- /package/build/{index-4e9cf4f0.js → index-e906cca1.js} +0 -0
- /package/build/{isProduction-2c9e592d.js → isProduction-8be63fc2.js} +0 -0
- /package/build/{localizeNumberFormat-dfc09584.js → localizeNumberFormat-8a4ccd79.js} +0 -0
- /package/build/{normalizeLink-a4c74a93.js → normalizeLink-f918ee2e.js} +0 -0
- /package/build/{number-31761a03.js → number-04972221.js} +0 -0
- /package/build/{paths-b5498508.js → paths-7708bedf.js} +0 -0
- /package/build/{screenSizeContext-633e2500.js → screenSizeContext-927d5e3b.js} +0 -0
- /package/build/{theme-202c84dc.js → theme-1bc846ef.js} +0 -0
- /package/build/{translationsContext-b7d75f11.js → translationsContext-6e3c777d.js} +0 -0
- /package/build/{tslib.es6-22ed8255.js → tslib.es6-60cf710c.js} +0 -0
- /package/build/{types-eb4862f1.js → types-d48ad8ac.js} +0 -0
- /package/build/{useIsInit-a4040fcf.js → useIsInit-1b9b9148.js} +0 -0
- /package/build/{useOutsideClick-81fc0751.js → useOutsideClick-44f136c3.js} +0 -0
- /package/build/{useScrollbarSize-7efdc277.js → useScrollbarSize-7aaaacbb.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-71be3ad2.js";import{Box as p,Input as u,Grid as g,Title as h,Container as b,Flex as E,rem as f,Stack as L,AspectRatio as v}from"@mantine/core";import{P as y,c as C,R as x,O as w,d as S,u as j,B as P}from"./index-ee15c33c.js";import{D as O}from"./index-d08071f0.js";import{T as k,I as F}from"./index-c382ba8d.js";import"dayjs";import{M as z,k as B}from"./screenSizeContext-7e881f6d.js";import N from"styled-components";import{t as T}from"./theme-f470318d.js";import{L as I}from"./index-dbff2d47.js";import"./isProduction-51fadd96.js";import"./Onboarding-68463903.js";import{CommonGAssets as D}from"./gAssets.js";import{u as A}from"./useTranslations-28b19550.js";import{useInterval as Z,useCounter as _}from"@mantine/hooks";import{A as V}from"./index-58c18460.js";import"lodash/debounce";import"./useCategory-66dc7051.js";import{V as q}from"./Visible-a28d7eb0.js";import{createFormContext as $,yupResolver as H}from"@mantine/form";import{M as W,h as U}from"./utils-c9c9f998.js";export{M as MAPPED_LOCALE}from"./utils-c9c9f998.js";import{H as Y}from"./index.styles-07a11ccd.js";import"./constants-b1321698.js";import{L as R}from"./utils-4dd7269c.js";import"@mantine/dates";import"./index.styled-7ef36c68.js";import"./index-0aeb7ac9.js";import*as G from"yup";import{createPortal as K}from"react-dom";import"./translationsContext-d199b4bc.js";import"string-format";import J from"lodash/throttle";import{B as Q}from"./index-a192f489.js";import{T as X}from"./index-7344117e.js";import{format as ee}from"date-fns";import te from"react-keyed-flatten-children";import"@mantine/carousel";import"classnames";import"date-fns/locale";import"./cookieHelper-87d0e0e7.js";import"slugify";const ne=t({currentStep:0,setCurrentStep:()=>!1,setMaxStep:()=>!1,nextStep:()=>!1,prevStep:()=>!1,isMarryBaby:!1,siteType:"helloSites",sharedData:{},setSharedData:()=>!1}),[re,oe,ae]=$(),ie=N(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
|
-
`,le=t=>{var{inputOrder:n=["phone"],withSimilac:r=!1,customTerms:o="",formContext:a}=t,i=d(t,["inputOrder","withSimilac","customTerms","formContext"]);const{t:l}=A(),s=a||oe(),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(k,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.similac.input.phone")):void 0},e.createElement(y,Object.assign({defaultCountry:W[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(k,{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(k,{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(O,Object.assign({label:e.createElement(k,{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(x.Group,Object.assign({className:"radio-group",label:e.createElement(k,{size:"s4",weight:"semiBold",as:"span"},n||l("tools.selectGender"))},s.getInputProps(r),o),e.createElement(x,{value:"0",label:l("onboarding.formEmail.genderMale")}),e.createElement(x,{value:"1",label:l("onboarding.formEmail.genderFemale")}))},otp:({name:t="otp"})=>e.createElement("div",{className:"otp-input"},e.createElement(w,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(k,{size:"s4",weight:"semiBold",as:"span"},t||l("onboarding.updatePassword.password")),withAsterisk:!0,rightSection:e.createElement(q,null)},s.getInputProps(n))),confirm_password:({label:t,name:n="confirmPassword"})=>e.createElement(C.Password,Object.assign({label:e.createElement(k,{size:"s4",weight:"semiBold",as:"span"},t||l("onboarding.updatePassword.confirmPassword")),withAsterisk:!0,rightSection:e.createElement(q,null)},s.getInputProps(n))),term:({name:t="term",className:n=""})=>o?e.createElement("div",{style:{marginBottom:16},className:n},e.createElement(S,Object.assign({label:e.createElement(k,{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(V,Object.assign({className:`${r} input-control`,label:e.createElement(k,{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(ie,Object.assign({},i),c)},se=e=>G.object().shape({phone:G.string().required(e("onboarding.updatePhone.error")).default(""),name:G.string().required(e("onboarding.errorMessage.requiredName")),email:G.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),address:G.mixed().required(e("onboarding.similac.address.error")),term:G.bool().oneOf([!0],e("onboarding.similac.term.error"))});var me=n(((t,n)=>{var{inputOrder:a,onSubmit:i,validateSchema:l,defaultValues:s,isActive:m,customTerms:u,customFormTexts:g}=t,
|
|
18
|
+
`,le=t=>{var{inputOrder:n=["phone"],withSimilac:r=!1,customTerms:o="",formContext:a}=t,i=d(t,["inputOrder","withSimilac","customTerms","formContext"]);const{t:l}=A(),s=a||oe(),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(k,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.similac.input.phone")):void 0},e.createElement(y,Object.assign({defaultCountry:W[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(k,{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(k,{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(O,Object.assign({label:e.createElement(k,{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(x.Group,Object.assign({className:"radio-group",label:e.createElement(k,{size:"s4",weight:"semiBold",as:"span"},n||l("tools.selectGender"))},s.getInputProps(r),o),e.createElement(x,{value:"0",label:l("onboarding.formEmail.genderMale")}),e.createElement(x,{value:"1",label:l("onboarding.formEmail.genderFemale")}))},otp:({name:t="otp"})=>e.createElement("div",{className:"otp-input"},e.createElement(w,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(k,{size:"s4",weight:"semiBold",as:"span"},t||l("onboarding.updatePassword.password")),withAsterisk:!0,rightSection:e.createElement(q,null)},s.getInputProps(n))),confirm_password:({label:t,name:n="confirmPassword"})=>e.createElement(C.Password,Object.assign({label:e.createElement(k,{size:"s4",weight:"semiBold",as:"span"},t||l("onboarding.updatePassword.confirmPassword")),withAsterisk:!0,rightSection:e.createElement(q,null)},s.getInputProps(n))),term:({name:t="term",className:n=""})=>o?e.createElement("div",{style:{marginBottom:16},className:n},e.createElement(S,Object.assign({label:e.createElement(k,{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(V,Object.assign({className:`${r} input-control`,label:e.createElement(k,{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(ie,Object.assign({},i),c)},se=e=>G.object().shape({phone:G.string().required(e("onboarding.updatePhone.error")).default(""),name:G.string().required(e("onboarding.errorMessage.requiredName")),email:G.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),address:G.mixed().required(e("onboarding.similac.address.error")),term:G.bool().oneOf([!0],e("onboarding.similac.term.error"))});var me=n(((t,n)=>{var{inputOrder:a,onSubmit:i,validateSchema:l,defaultValues:s,isActive:m,customTerms:u,customFormTexts:g}=t,h=d(t,["inputOrder","onSubmit","validateSchema","defaultValues","isActive","customTerms","customFormTexts"]);const{nextStep:b,setSharedData:E,sharedData:f}=r(ne),{t:L}=A(),v=ae({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||H(se(L))}),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}))),b()}catch(e){console.error(e)}})),C=e=>{console.log(e)},x=()=>{var e;return null===(e=v.onSubmit(y,C))||void 0===e?void 0:e()};return o(n,(()=>({submitForm:x}))),e.createElement(p,Object.assign({"data-active":m},h),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(Y,{tag:"h4",as:"h2"},null==g?void 0:g.heading),e.createElement(k,{size:"p3"},null==g?void 0:g.description)),e.createElement(re,{form:v},e.createElement("form",{className:"friso-form",style:{width:"100%"},onSubmit:v.onSubmit(y,C)},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(le,{inputOrder:a,customTerms:u,className:"friso-form"}))))))}));const de=N.div`
|
|
19
19
|
position: fixed;
|
|
20
20
|
inset: 0;
|
|
21
21
|
z-index: 1000;
|
|
@@ -61,10 +61,10 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
|
|
|
61
61
|
&[data-is-marry-baby='true'] {
|
|
62
62
|
background-color: ${T.mbColors.tonePink};
|
|
63
63
|
}
|
|
64
|
-
`,
|
|
64
|
+
`,he=N.div`
|
|
65
65
|
margin-top: 40px;
|
|
66
66
|
padding: 24px 40px;
|
|
67
|
-
`,
|
|
67
|
+
`,be=N.div`
|
|
68
68
|
width: 100%;
|
|
69
69
|
display: block;
|
|
70
70
|
img {
|
|
@@ -94,7 +94,7 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
|
|
|
94
94
|
&.similac {
|
|
95
95
|
margin-top: 16px;
|
|
96
96
|
}
|
|
97
|
-
`,fe=N(
|
|
97
|
+
`,fe=N(b)`
|
|
98
98
|
&.hhg-comp-onboarding-container.hhg-comp-onboarding-container {
|
|
99
99
|
display: flex;
|
|
100
100
|
flex-direction: column;
|
|
@@ -137,7 +137,7 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
|
|
|
137
137
|
}
|
|
138
138
|
`,Le=N.img`
|
|
139
139
|
margin-bottom: 38px;
|
|
140
|
-
`,ve=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(ne);return e.createElement(fe,Object.assign({},c,{className:`hhg-comp-onboarding-container ${l}`,size:"sm"}),!m&&e.createElement(R,{type:p?u:(null===(n=I[process.env.UNIFY_LOCALE])||void 0===n?void 0:n.LOGO_TYPE)||"hellobacsi"}),e.createElement(Ee,{className:m?"similac":""},s&&e.createElement(Le,{src:s,loading:"lazy"}),(o||a)&&e.createElement("div",{className:"header"},o&&e.createElement(
|
|
140
|
+
`,ve=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(ne);return e.createElement(fe,Object.assign({},c,{className:`hhg-comp-onboarding-container ${l}`,size:"sm"}),!m&&e.createElement(R,{type:p?u:(null===(n=I[process.env.UNIFY_LOCALE])||void 0===n?void 0:n.LOGO_TYPE)||"hellobacsi"}),e.createElement(Ee,{className:m?"similac":""},s&&e.createElement(Le,{src:s,loading:"lazy"}),(o||a)&&e.createElement("div",{className:"header"},o&&e.createElement(h,{order:3},o),a&&e.createElement(k,{size:"p3",mt:8,color:T.colors.gray600},a)),i))},ye=N(ve)`
|
|
141
141
|
.phone-input {
|
|
142
142
|
width: 100%;
|
|
143
143
|
margin-bottom: 32px;
|
|
@@ -199,7 +199,7 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
|
|
|
199
199
|
&.similac {
|
|
200
200
|
margin-top: 16px;
|
|
201
201
|
}
|
|
202
|
-
`,Me=N(
|
|
202
|
+
`,Me=N(b)`
|
|
203
203
|
&.hhg-comp-onboarding-container.hhg-comp-onboarding-container {
|
|
204
204
|
display: flex;
|
|
205
205
|
flex-direction: column;
|
|
@@ -242,7 +242,7 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
|
|
|
242
242
|
}
|
|
243
243
|
`,Pe=N.img`
|
|
244
244
|
margin-bottom: 38px;
|
|
245
|
-
`,Oe=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(ne);return e.createElement(Me,Object.assign({},c,{className:`hhg-comp-onboarding-container ${l}`,size:"sm"}),!m&&e.createElement(R,{type:p?u:(null===(n=I[process.env.UNIFY_LOCALE])||void 0===n?void 0:n.LOGO_TYPE)||"hellobacsi"}),e.createElement(je,{className:m?"similac":""},s&&e.createElement(Pe,{src:s,loading:"lazy"}),e.createElement("div",{className:"header"},e.createElement(
|
|
245
|
+
`,Oe=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(ne);return e.createElement(Me,Object.assign({},c,{className:`hhg-comp-onboarding-container ${l}`,size:"sm"}),!m&&e.createElement(R,{type:p?u:(null===(n=I[process.env.UNIFY_LOCALE])||void 0===n?void 0:n.LOGO_TYPE)||"hellobacsi"}),e.createElement(je,{className:m?"similac":""},s&&e.createElement(Pe,{src:s,loading:"lazy"}),e.createElement("div",{className:"header"},e.createElement(h,{order:3},o),e.createElement(k,{size:"p3",mt:8,color:T.colors.gray600},a)),i))},ke=N(ve)`
|
|
246
246
|
.phone-input {
|
|
247
247
|
width: 100%;
|
|
248
248
|
margin-bottom: 32px;
|
|
@@ -282,4 +282,4 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
|
|
|
282
282
|
&:not([data-active='true']) {
|
|
283
283
|
display: none !important;
|
|
284
284
|
}
|
|
285
|
-
`,Be=e=>G.object().shape({password:G.string().required(e("onboarding.errorMessage.requiredPassword")).min(8,e("onboarding.errorMessage.minLength",{length:8})).matches(/.*[A-Z].*/,e("onboarding.errorMessage.passWithPattern")).default(""),confirmPassword:G.string().required(e("onboarding.errorMessage.requiredConfirmPassword")).oneOf([G.ref("password"),null],e("onboarding.errorMessage.passNotMatch")).default("")}),Ne={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(ne.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}=j(),{isMarryBaby:m}=r(ne),{t:c}=A();if(i&&"undefined"==typeof window)return null;const p=e.createElement(de,Object.assign({},l),e.createElement(ce,null,e.createElement(g,{sx:{[z.mbDown]:{margin:0},".mantine-Grid-col":{[z.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(pe,{"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(ue,null,e.createElement(ge,{"data-is-marry-baby":m},e.createElement(be,null,a.heading&&e.createElement(b,{order:1,mb:24},a.heading),a.description&&e.createElement(k,{size:"p1",color:T.colors.gray800},c("onboarding.welcomeScreen.content"))),e.createElement(he,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(he,{className:"similac"},a.imgSrc?e.createElement("img",{src:a.imgSrc,loading:"lazy"}):a.imgComponent?a.imgComponent:null)))));return i?K(p,B()):p},Form:({onClose:t,onSubmit:n,canSkip:o=!0,customFormTexts:a,isActive:i,submitProps:l,submitLabel:s,skipProps:m,isWhatsApp:d})=>{const{t:p}=A(),{sharedData:u,setSharedData:g,nextStep:b}=r(ne),h=ae({initialValues:{phone:(null==u?void 0:u.phone)||""},validate:H(Ce(p))});return e.createElement(ye,{heading:(null==a?void 0:a.heading)||p("onboarding.updatePhone.heading"),description:(null==a?void 0:a.description)||p(d?"onboarding.updateWhatsapp.description":"onboarding.updatePhone.description"),"data-active":i},e.createElement(re,{form:h},e.createElement("form",{onSubmit:h.onSubmit((e=>c(void 0,void 0,void 0,(function*(){try{g((t=>Object.assign(Object.assign({},t),{phone:e.phone}))),yield null==n?void 0:n(e.phone),b()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(le,{inputOrder:["phone"]}),e.createElement(P,Object.assign({variant:"primary",fullWidth:!0,size:"lg"},d&&{leftIcon:e.createElement(F.WhatsApp,{size:18,useCurrentColor:!0})},l,{type:"submit","data-event-category":d?"OTP":"Sign Up","data-event-action":d?"Whatsapp - Fill phone and continue Click":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"}),s||p(d?"onboarding.updateWhatsapp.submitLabel":"onboarding.button.continue")),o&&e.createElement(P,Object.assign({variant:"ghost",fullWidth:!0,size:"lg"},d&&{dataEventCategory:"OTP",dataEventAction:"Whatsapp - Skip fill phone Click",dataEventLabel:"undefined"!=typeof window?window.location.href:""},m,{onClick:t,type:"button"}),p("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(ne),y=n||g||"",[C,x]=a(30),w=Z((()=>x((e=>e-1))),1e3),[S,j]=_(0,{min:0,max:3}),M=i(!0),{t:P}=A();l((()=>(w.start(),w.stop)),[]),l((()=>{0===C&&(w.stop(),M.current=!1)}),[C]);const O=ae({initialValues:{otp:""},validate:H(we(P))});l((()=>{m&&O.setFieldError("otp",m)}),[m]);const k=s((()=>J((()=>{M.current||(j.increment(),x(30),null==o||o(y),w.start(),M.current=!0)}),1e3,{trailing:!1})),[y,o,w]),F=b>=2;return e.createElement(xe,{heading:P("onboarding.otpForm.heading"),description:e.createElement(e.Fragment,null,e.createElement("span",{dangerouslySetInnerHTML:{__html:P("onboarding.otpForm.descriptionEmail",{email:`<b style="color:${T.colors.gray800}">${U(y)}</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",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(re,{form:O},e.createElement("form",{onSubmit:O.onSubmit((e=>c(void 0,void 0,void 0,(function*(){try{j.increment();!(yield null==t?void 0:t(e.otp))&&v()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(le,{inputOrder:["otp"]}),e.createElement("div",{className:"resend"},e.createElement(X,{size:"p4",color:T.colors.gray400},P("onboarding.otpForm.notReceiveOTP")),e.createElement(X,{as:"a",size:"p4",color:L?T.mbColors.pink:T.colors.primaryBase,onClick:k},P("onboarding.otpForm.resendCode",{seconds:C}))),e.createElement(Q,{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"},P("onboarding.button.continue")),u&&S>=3&&e.createElement(Q,{theme:f,color:"ghost",isBlock:!0,size:"lg",onClick:d,type:"button"},P("onboarding.button.skip")))))},Phone:({onSubmit:t,phone:n,onResendCode:o,otpError:m,onClose:d,loading:p,canSkip:u,isWhatsApp:g})=>{const{sharedData:{phone:b,retryPhoneCount:h},setSharedData:L,prevStep:v,siteType:y,isMarryBaby:C,nextStep:x}=r(ne),w=n||b||"",[S,j]=a(30),M=Z((()=>j((e=>e-1))),1e3),[P,O]=_(0,{min:0,max:3}),F=i(!0),{t:z}=A();l((()=>(M.start(),M.stop)),[]),l((()=>{0===S&&(M.stop(),F.current=!1)}),[S]);const B=ae({initialValues:{otp:""},validate:H(we(z))});l((()=>{m&&B.setFieldError("otp",m)}),[m]);const N=s((()=>J((()=>{F.current||(O.increment(),j(30),null==o||o(w),M.start(),F.current=!0)}),1e3,{trailing:!1})),[w,o,M]),I=h>=2,V=`<b style="color:${T.colors.gray800}">${w.slice(0,-3).replace(/./g,"x").concat(w.slice(-3))}</b>`;return e.createElement(xe,{heading:g?e.createElement(E,{align:"center",justify:"center",gap:f(8)},e.createElement("img",{style:{width:f(24)},loading:"lazy",src:D.getAssetPath("whatsapp.svg"),alt:"whatsapp"}),e.createElement("span",null,z("onboarding.otpWhatsapps.heading"))):z("onboarding.otpForm.heading"),description:e.createElement(e.Fragment,null,e.createElement("span",{dangerouslySetInnerHTML:{__html:z(g?"onboarding.otpWhatsapps.description":"onboarding.otpForm.description",{phone:V})}}),!I&&e.createElement("svg",{onClick:()=>{h>=2||(L((e=>Object.assign(Object.assign({},e),{retryPhoneCount:e.retryPhoneCount+1}))),v())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",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(re,{form:B},e.createElement("form",{onSubmit:B.onSubmit((e=>c(void 0,void 0,void 0,(function*(){try{O.increment();!(yield null==t?void 0:t(e.otp))&&x()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(le,{inputOrder:["otp"]}),e.createElement("div",{className:"resend"},e.createElement(k,{size:"p4",color:T.colors.gray400},z("onboarding.otpForm.notReceiveOTP")),e.createElement(k,{as:"a",size:"p4",color:C?T.mbColors.pink:T.colors.primaryBase,onClick:N},z("onboarding.otpForm.resendCode",{seconds:S}))),e.createElement(Q,{theme:y,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:p,disabled:p,"data-event-category":g?"OTP":"Sign Up","data-event-action":g?"Whatsapp - OTP verified Click":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},z("onboarding.button.continue")),u&&P>=3&&e.createElement(Q,{theme:y,color:"ghost",isBlock:!0,size:"lg",onClick:d,type:"button"},z("onboarding.button.skip")))))}},PersonalInfoForm:({onClose:t,onSubmit:n,canSkip:o,loading:a,errorMessage:i,initialData:s})=>{const{t:m,locale:d}=A(),{siteType:p,isMarryBaby:u,setSharedData:g,nextStep:b}=r(ne),h=ae({validate:H(Se(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(Oe,{heading:m("onboarding.formEmail.heading"),description:m("onboarding.formEmail.description",{site:u?"Marry Baby":I[d].SITE_NAME_FORMATTED})},e.createElement(re,{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&&ee(e.birthday,"yyyy-MM-dd")})))&&b()}))),(e=>{console.log({fieldErrors:e})}))},e.createElement(le,{inputOrder:["full_name","email","dob","gender"]}),e.createElement(Q,{color:"primary",isBlock:!0,size:"lg",type:"submit",theme:p,isLoading:a,disabled:a},m("onboarding.button.continue")),o&&e.createElement(Q,{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}=A(),{siteType:i}=r(ne);return e.createElement(Oe,Object.assign({},o),e.createElement(Q,{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}=A(),{nextStep:g,setSharedData:b,sharedData:h}=r(ne),{isMobile:E}=j(),f=ae({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(Fe(u,!l))}),L=(null==s?void 0:s.email)?["full_name","phone","address","term"]:["full_name","email","phone","address","term"];return e.createElement(ke,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(re,{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(le,{inputOrder:L,withSimilac:!0,customTerms:l}),e.createElement(P,{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(P,{variant:"ghost",fullWidth:!0,size:"lg",onClick:n,type:"button"},u("onboarding.button.skip")))))},FrisoForm:me,UpdatePasswordForm:({onClose:t,onSubmit:n,canSkip:o,errorMessage:a,loading:i})=>{const{t:l}=A(),{nextStep:s}=r(ne),m=ae({initialValues:{password:"",confirmPassword:""},validate:H(Be(l))});return e.createElement(Oe,{heading:l("onboarding.updatePassword.heading"),description:l("onboarding.updatePassword.description")},e.createElement(re,{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(le,{inputOrder:["password","confirm_password"]}),e.createElement(Q,{color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:i,disabled:i},l("onboarding.button.continue")),o&&e.createElement(Q,{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(ne),i=e.Children.count(t);return l((()=>{null==n||n(o)}),[o]),l((()=>{a(i-1)}),[i]),e.createElement(e.Fragment,null,te(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}=A(),{isMobile:l}=j();return e.createElement(ze,Object.assign({heading:"",description:"",hiddenLogo:l,"data-active":o},a),e.createElement(h,{fluid:!0},e.createElement(L,{align:"center",spacing:8,w:"100%",ta:"center"},e.createElement(v,{ratio:1,w:{base:120,md:160}},e.createElement("svg",{width:"160",height:"160",viewBox:"0 0 160 160",fill:"none"},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(Y,{tag:"h3"},null==r?void 0:r.title),e.createElement(k,{size:"p3",color:"gray.6"},null==r?void 0:r.description),e.createElement(P,{mt:{base:16,md:24},fullWidth:l,size:"lg",onClick:n},i("similac.thankYou.done")))))}};export{le as DynamicForm,Ne as Onboarding,ne as OnboardingContext};
|
|
285
|
+
`,Be=e=>G.object().shape({password:G.string().required(e("onboarding.errorMessage.requiredPassword")).min(8,e("onboarding.errorMessage.minLength",{length:8})).matches(/.*[A-Z].*/,e("onboarding.errorMessage.passWithPattern")).default(""),confirmPassword:G.string().required(e("onboarding.errorMessage.requiredConfirmPassword")).oneOf([G.ref("password"),null],e("onboarding.errorMessage.passNotMatch")).default("")}),Ne={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(ne.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}=j(),{isMarryBaby:m}=r(ne),{t:c}=A();if(i&&"undefined"==typeof window)return null;const p=e.createElement(de,Object.assign({},l),e.createElement(ce,null,e.createElement(g,{sx:{[z.mbDown]:{margin:0},".mantine-Grid-col":{[z.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(pe,{"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(ue,null,e.createElement(ge,{"data-is-marry-baby":m},e.createElement(he,null,a.heading&&e.createElement(h,{order:1,mb:24},a.heading),a.description&&e.createElement(k,{size:"p1",color:T.colors.gray800},c("onboarding.welcomeScreen.content"))),e.createElement(be,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(be,{className:"similac"},a.imgSrc?e.createElement("img",{src:a.imgSrc,loading:"lazy"}):a.imgComponent?a.imgComponent:null)))));return i?K(p,B()):p},Form:({onClose:t,onSubmit:n,canSkip:o=!0,customFormTexts:a,isActive:i,submitProps:l,submitLabel:s,skipProps:m,isWhatsApp:d})=>{const{t:p}=A(),{sharedData:u,setSharedData:g,nextStep:h}=r(ne),b=ae({initialValues:{phone:(null==u?void 0:u.phone)||""},validate:H(Ce(p))});return e.createElement(ye,{heading:(null==a?void 0:a.heading)||p("onboarding.updatePhone.heading"),description:(null==a?void 0:a.description)||p(d?"onboarding.updateWhatsapp.description":"onboarding.updatePhone.description"),"data-active":i},e.createElement(re,{form:b},e.createElement("form",{onSubmit:b.onSubmit((e=>c(void 0,void 0,void 0,(function*(){try{g((t=>Object.assign(Object.assign({},t),{phone:e.phone}))),yield null==n?void 0:n(e.phone),h()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(le,{inputOrder:["phone"]}),e.createElement(P,Object.assign({variant:"primary",fullWidth:!0,size:"lg"},d&&{leftIcon:e.createElement(F.WhatsApp,{size:18,useCurrentColor:!0})},l,{type:"submit","data-event-category":d?"OTP":"Sign Up","data-event-action":d?"Whatsapp - Fill phone and continue Click":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"}),s||p(d?"onboarding.updateWhatsapp.submitLabel":"onboarding.button.continue")),o&&e.createElement(P,Object.assign({variant:"ghost",fullWidth:!0,size:"lg"},d&&{dataEventCategory:"OTP",dataEventAction:"Whatsapp - Skip fill phone Click",dataEventLabel:"undefined"!=typeof window?window.location.href:""},m,{onClick:t,type:"button"}),p("onboarding.button.skip")))))},OtpForm:{Email:({onSubmit:t,email:n,onResendCode:o,otpError:m,onClose:d,loading:p,canSkip:u})=>{const{sharedData:{email:g,retryEmailCount:h},setSharedData:b,prevStep:E,siteType:f,isMarryBaby:L,nextStep:v}=r(ne),y=n||g||"",[C,x]=a(30),w=Z((()=>x((e=>e-1))),1e3),[S,j]=_(0,{min:0,max:3}),M=i(!0),{t:P}=A();l((()=>(w.start(),w.stop)),[]),l((()=>{0===C&&(w.stop(),M.current=!1)}),[C]);const O=ae({initialValues:{otp:""},validate:H(we(P))});l((()=>{m&&O.setFieldError("otp",m)}),[m]);const k=s((()=>J((()=>{M.current||(j.increment(),x(30),null==o||o(y),w.start(),M.current=!0)}),1e3,{trailing:!1})),[y,o,w]),F=h>=2;return e.createElement(xe,{heading:P("onboarding.otpForm.heading"),description:e.createElement(e.Fragment,null,e.createElement("span",{dangerouslySetInnerHTML:{__html:P("onboarding.otpForm.descriptionEmail",{email:`<b style="color:${T.colors.gray800}">${U(y)}</b>`})}}),!F&&e.createElement("svg",{onClick:()=>{h>=2||(b((e=>Object.assign(Object.assign({},e),{retryEmailCount:e.retryEmailCount+1}))),E())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",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(re,{form:O},e.createElement("form",{onSubmit:O.onSubmit((e=>c(void 0,void 0,void 0,(function*(){try{j.increment();!(yield null==t?void 0:t(e.otp))&&v()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(le,{inputOrder:["otp"]}),e.createElement("div",{className:"resend"},e.createElement(X,{size:"p4",color:T.colors.gray400},P("onboarding.otpForm.notReceiveOTP")),e.createElement(X,{as:"a",size:"p4",color:L?T.mbColors.pink:T.colors.primaryBase,onClick:k},P("onboarding.otpForm.resendCode",{seconds:C}))),e.createElement(Q,{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"},P("onboarding.button.continue")),u&&S>=3&&e.createElement(Q,{theme:f,color:"ghost",isBlock:!0,size:"lg",onClick:d,type:"button"},P("onboarding.button.skip")))))},Phone:({onSubmit:t,phone:n,onResendCode:o,otpError:m,onClose:d,loading:p,canSkip:u,isWhatsApp:g})=>{const{sharedData:{phone:h,retryPhoneCount:b},setSharedData:L,prevStep:v,siteType:y,isMarryBaby:C,nextStep:x}=r(ne),w=n||h||"",[S,j]=a(30),M=Z((()=>j((e=>e-1))),1e3),[P,O]=_(0,{min:0,max:3}),F=i(!0),{t:z}=A();l((()=>(M.start(),M.stop)),[]),l((()=>{0===S&&(M.stop(),F.current=!1)}),[S]);const B=ae({initialValues:{otp:""},validate:H(we(z))});l((()=>{m&&B.setFieldError("otp",m)}),[m]);const N=s((()=>J((()=>{F.current||(O.increment(),j(30),null==o||o(w),M.start(),F.current=!0)}),1e3,{trailing:!1})),[w,o,M]),I=b>=2,V=`<b style="color:${T.colors.gray800}">${w.slice(0,-3).replace(/./g,"x").concat(w.slice(-3))}</b>`;return e.createElement(xe,{heading:g?e.createElement(E,{align:"center",justify:"center",gap:f(8)},e.createElement("img",{style:{width:f(24)},loading:"lazy",src:D.getAssetPath("whatsapp.svg"),alt:"whatsapp"}),e.createElement("span",null,z("onboarding.otpWhatsapps.heading"))):z("onboarding.otpForm.heading"),description:e.createElement(e.Fragment,null,e.createElement("span",{dangerouslySetInnerHTML:{__html:z(g?"onboarding.otpWhatsapps.description":"onboarding.otpForm.description",{phone:V})}}),!I&&e.createElement("svg",{onClick:()=>{b>=2||(L((e=>Object.assign(Object.assign({},e),{retryPhoneCount:e.retryPhoneCount+1}))),v())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",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(re,{form:B},e.createElement("form",{onSubmit:B.onSubmit((e=>c(void 0,void 0,void 0,(function*(){try{O.increment();!(yield null==t?void 0:t(e.otp))&&x()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(le,{inputOrder:["otp"]}),e.createElement("div",{className:"resend"},e.createElement(k,{size:"p4",color:T.colors.gray400},z("onboarding.otpForm.notReceiveOTP")),e.createElement(k,{as:"a",size:"p4",color:C?T.mbColors.pink:T.colors.primaryBase,onClick:N},z("onboarding.otpForm.resendCode",{seconds:S}))),e.createElement(Q,{theme:y,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:p,disabled:p,"data-event-category":g?"OTP":"Sign Up","data-event-action":g?"Whatsapp - OTP verified Click":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},z("onboarding.button.continue")),u&&P>=3&&e.createElement(Q,{theme:y,color:"ghost",isBlock:!0,size:"lg",onClick:d,type:"button"},z("onboarding.button.skip")))))}},PersonalInfoForm:({onClose:t,onSubmit:n,canSkip:o,loading:a,errorMessage:i,initialData:s})=>{const{t:m,locale:d}=A(),{siteType:p,isMarryBaby:u,setSharedData:g,nextStep:h}=r(ne),b=ae({validate:H(Se(m))});return l((()=>{b.setValues(Object.assign(Object.assign({gender:"0"},s),(null==s?void 0:s.birthday)&&{birthday:new Date(s.birthday)}))}),[s]),l((()=>{i&&b.setFieldError("email",i)}),[i]),e.createElement(Oe,{heading:m("onboarding.formEmail.heading"),description:m("onboarding.formEmail.description",{site:u?"Marry Baby":I[d].SITE_NAME_FORMATTED})},e.createElement(re,{form:b},e.createElement("form",{className:"form",onSubmit:b.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&&ee(e.birthday,"yyyy-MM-dd")})))&&h()}))),(e=>{console.log({fieldErrors:e})}))},e.createElement(le,{inputOrder:["full_name","email","dob","gender"]}),e.createElement(Q,{color:"primary",isBlock:!0,size:"lg",type:"submit",theme:p,isLoading:a,disabled:a},m("onboarding.button.continue")),o&&e.createElement(Q,{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}=A(),{siteType:i}=r(ne);return e.createElement(Oe,Object.assign({},o),e.createElement(Q,{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}=A(),{nextStep:g,setSharedData:h,sharedData:b}=r(ne),{isMobile:E}=j(),f=ae({initialValues:{term:!1,phone:(null==b?void 0:b.phone)||(null==s?void 0:s.phone)||"",email:(null==b?void 0:b.email)||(null==s?void 0:s.email)||"",name:(null==b?void 0:b.name)||(null==s?void 0:s.name)||""},validate:H(Fe(u,!l))}),L=(null==s?void 0:s.email)?["full_name","phone","address","term"]:["full_name","email","phone","address","term"];return e.createElement(ke,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(re,{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),h((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(le,{inputOrder:L,withSimilac:!0,customTerms:l}),e.createElement(P,{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(P,{variant:"ghost",fullWidth:!0,size:"lg",onClick:n,type:"button"},u("onboarding.button.skip")))))},FrisoForm:me,UpdatePasswordForm:({onClose:t,onSubmit:n,canSkip:o,errorMessage:a,loading:i})=>{const{t:l}=A(),{nextStep:s}=r(ne),m=ae({initialValues:{password:"",confirmPassword:""},validate:H(Be(l))});return e.createElement(Oe,{heading:l("onboarding.updatePassword.heading"),description:l("onboarding.updatePassword.description")},e.createElement(re,{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(le,{inputOrder:["password","confirm_password"]}),e.createElement(Q,{color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:i,disabled:i},l("onboarding.button.continue")),o&&e.createElement(Q,{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(ne),i=e.Children.count(t);return l((()=>{null==n||n(o)}),[o]),l((()=>{a(i-1)}),[i]),e.createElement(e.Fragment,null,te(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}=A(),{isMobile:l}=j();return e.createElement(ze,Object.assign({heading:"",description:"",hiddenLogo:l,"data-active":o},a),e.createElement(b,{fluid:!0},e.createElement(L,{align:"center",spacing:8,w:"100%",ta:"center"},e.createElement(v,{ratio:1,w:{base:120,md:160}},e.createElement("svg",{width:"160",height:"160",viewBox:"0 0 160 160",fill:"none"},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(Y,{tag:"h3"},null==r?void 0:r.title),e.createElement(k,{size:"p3",color:"gray.6"},null==r?void 0:r.description),e.createElement(P,{mt:{base:16,md:24},fullWidth:l,size:"lg",onClick:n},i("similac.thankYou.done")))))}};export{le as DynamicForm,Ne as Onboarding,ne as OnboardingContext};
|
package/build/esm/pwg.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e,{useMemo as t,useState as r,useRef as a}from"react";import{M as o,a as l}from"./index-
|
|
1
|
+
import e,{useMemo as t,useState as r,useRef as a}from"react";import{M as o,a as l}from"./index-f4cf350a.js";import{T as n}from"./index-c382ba8d.js";import{P as i}from"./index-480d01ae.js";import{u as s}from"./useTranslations-28b19550.js";import{t as c}from"./theme-f470318d.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-0aeb7ac9.js";import{a as x}from"./useOutsideClick-3c9bb801.js";import E from"styled-components";import{_ as k}from"./tslib.es6-71be3ad2.js";import"./index.styled-7ef36c68.js";import"@mantine/core";import"dayjs";import"./screenSizeContext-7e881f6d.js";import"lodash/throttle";import"./index-dbff2d47.js";import"date-fns/locale";import"./Onboarding-68463903.js";import"./isProduction-51fadd96.js";import"./gAssets.js";import"./index-ee15c33c.js";import"@mantine/hooks";import"@mantine/carousel";import"classnames";import"./index-7344117e.js";import"@mantine/dates";import"./translationsContext-d199b4bc.js";import"string-format";const w=t=>{const{x:r,y:a,payload:o,activeWeek:l}=t;return l===o.value?e.createElement("g",{transform:`translate(${r},${a})`},e.createElement("circle",{r:12,fill:"marryBaby"===t.siteType?c.mbColors.pink:c.colors.primaryBase}),e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:c.colors.white,fontFamily:"Inter",fontWeight:"600",fontSize:"12px"},o.value)):e.createElement("g",{transform:`translate(${r},${a})`},e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:c.colors.gray600,fontFamily:"Inter",fontWeight:"400",fontSize:"12px"},o.value))},v=E.div`
|
|
2
2
|
/* position: absolute; */
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e}from"./index-
|
|
1
|
+
import{d as e}from"./index-dbff2d47.js";import{i as s}from"./isProduction-51fadd96.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};
|
|
@@ -20,7 +20,7 @@ export declare const getApiPath: (path: string, params?: {
|
|
|
20
20
|
[key: string]: string | number;
|
|
21
21
|
}, query?: {
|
|
22
22
|
[key: string]: string | number;
|
|
23
|
-
}) => string;
|
|
23
|
+
}, baseUrl?: string) => string;
|
|
24
24
|
export declare const getDiscoverApiPath: (path: string, params?: {
|
|
25
25
|
[key: string]: string | number;
|
|
26
26
|
}, useProOnDev?: boolean) => string;
|
|
@@ -5,6 +5,7 @@ export type Props = {
|
|
|
5
5
|
className?: string;
|
|
6
6
|
style?: CSSProperties;
|
|
7
7
|
autoPlay?: boolean;
|
|
8
|
+
baseUrl?: string;
|
|
8
9
|
};
|
|
9
|
-
declare const SocialLinkPreview: ({ url, image, className, style, autoPlay, }: Props) => React.JSX.Element;
|
|
10
|
+
declare const SocialLinkPreview: ({ url, image, className, style, baseUrl, autoPlay, }: Props) => React.JSX.Element;
|
|
10
11
|
export { SocialLinkPreview };
|
package/build/esm/together.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{f as CardAuthor,C as CardReactions,L as LabelSortPin,e as LabelSorting,o as PopoverMenu,g as PopupDoctor,P as PopupExpert,i as PopupFrame,h as PopupHospital,k as PostContent,m as ProfileDetail,l as ProfileDetailModal,j as ShareBox,S as SharePopup,p as SourceList,n as TabNameInProfileDetail,d as TagTopic,T as TogetherAuthConfigContext,c as TogetherAuthConfigContextProvider,u as useTogetherAuthRequiredAction}from"./index.styled-
|
|
1
|
+
export{f as CardAuthor,C as CardReactions,L as LabelSortPin,e as LabelSorting,o as PopoverMenu,g as PopupDoctor,P as PopupExpert,i as PopupFrame,h as PopupHospital,k as PostContent,m as ProfileDetail,l as ProfileDetailModal,j as ShareBox,S as SharePopup,p as SourceList,n as TabNameInProfileDetail,d as TagTopic,T as TogetherAuthConfigContext,c as TogetherAuthConfigContextProvider,u as useTogetherAuthRequiredAction}from"./index.styled-2bdbb16a.js";export{d as TogetherDataTransforms,U as UserAvatar}from"./index-6bfa1218.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-6e7ea58d.js";export{D as DefaultComponentGlobalContextData,G as GlobalData,b as TogetherComponentGlobalContext,d as TogetherComponentGlobalContextProvider,c as TogetherConstants}from"./index.styles-07a11ccd.js";import"react";import"./index-ee15c33c.js";import"./tslib.es6-71be3ad2.js";import"@mantine/core";import"@mantine/hooks";import"./theme-f470318d.js";import"./gAssets.js";import"./index-dbff2d47.js";import"date-fns/locale";import"./Onboarding-68463903.js";import"./isProduction-51fadd96.js";import"dayjs";import"./screenSizeContext-7e881f6d.js";import"styled-components";import"lodash/throttle";import"@mantine/carousel";import"./index-c382ba8d.js";import"./useTranslations-28b19550.js";import"./translationsContext-d199b4bc.js";import"string-format";import"classnames";import"@mantine/dates";import"./number-06671b87.js";import"date-fns";import"./index-a192f489.js";import"./index-11fea400.js";import"./constants-b1321698.js";import"./routing-a4e59b08.js";import"dayjs/plugin/relativeTime";import"./paths-b4d6519e.js";import"lodash/debounce";import"./useCategory-66dc7051.js";import"./index-48404b57.js";import"innertext";import"./cookieHelper-87d0e0e7.js";import"react-contenteditable";import"react-dom";import"./utils-4dd7269c.js";import"./index.styled-7ef36c68.js";import"./index-0aeb7ac9.js";import"react-keyed-flatten-children";import"slugify";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,_ as t}from"./tslib.es6-71be3ad2.js";import o,{useContext as a,useState as n,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{r as p,L as v,s as g,t as h,v as y,w as C,x as E,R as k,y as w,z as f,E as b,F as N,G as I,H as x,I as P,J as T,K as M,B as j,b as _,M as L,i as S,N as z,O as B,Q as A,U as O,V as F,W as R,X as D,Y as U,Z as V,_ as $,$ as Z,a0 as H,a1 as W,a2 as Q,a3 as K,a4 as G,a5 as q,u as J,S as Y,a6 as X,l as ee,m as te,c as oe,a7 as ae,D as ne,f as le,k as ie,a8 as se,C as re,a9 as ce,aa as de,d as me}from"./index.styled-2bdbb16a.js";import{u as ue}from"./useTranslations-28b19550.js";import pe from"innertext";import{t as ve}from"./theme-f470318d.js";import{T as ge,a as he,A as ye,C as Ce,b as Ee,I as ke}from"./index-c382ba8d.js";import{B as we,I as fe}from"./index-ee15c33c.js";import"@mantine/dates";import{d as be}from"./index-dbff2d47.js";import"./Onboarding-68463903.js";import{CommonGAssets as Ne}from"./gAssets.js";import"dayjs";import{o as Ie,t as xe,k as Pe}from"./screenSizeContext-7e881f6d.js";import"styled-components";import"./isProduction-51fadd96.js";import"@mantine/hooks";import{b as Te,L as Me,B as je,C as _e,a8 as Le,H as Se,A as ze,a9 as Be,aa as Ae,ab as Oe,M as Fe,R as Re,Q as De,ac as Ue,U as Ve}from"./index.styles-07a11ccd.js";import{g as $e,a as Ze,U as He,h as We}from"./index-6bfa1218.js";import{I as Qe}from"./index-11fea400.js";import Ke from"lodash/debounce";import Ge from"react-contenteditable";import"./useCategory-66dc7051.js";import{B as qe}from"./index-a192f489.js";import*as Je from"react-dom";import"./constants-b1321698.js";const Ye=({title:t,url:s,image:r,logo:d,className:m,style:u,noRefetch:v})=>{const{data:{locale:g,env:{isMarryBaby:h}}}=a(Te),[y,C]=n(!1),E=c(),k=l(v);k.current=v;const[w,f]=n(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}))),Me(je(_e.FETCH_PREVIEW,{_locale:g}),"POST",{data:{link:s},headers:{"Content-Type":"application/json"}}).then((e=>{var t,o,a;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===(a=null==e?void 0:e.data)||void 0===a?void 0:a.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=Le)},loading:"lazy"}),o.createElement("img",{className:"link-image",src:b,onError:e=>{T.current||(T.current=!0,e.currentTarget.src=Le)},loading:"lazy"})),o.createElement("div",{className:"link-info-container"},o.createElement(ge,{size:"n1"},h&&I&&!y&&o.createElement("img",{className:"link-logo",src:I,onError:()=>C(!0),loading:"lazy"}),P),o.createElement(Se,{tag:"h6"},N))))};const Xe=({onClick:e,color:t,className:n,style:l})=>{const{data:{env:{isMarryBaby:i}}}=a(Te),{t:s}=ue();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 ${n}`,style:l})},et=e=>({message:e("notification.failure"),type:"danger"});var tt="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 ot=(e,t)=>{const[o,a]=n(e||[]);return{onSelectImages:n=>{const l=n.target.files;if(l)if(t&&e){t((e||o).concat(Array.from(l)))}else a((o=>{const a=e||o;return t&&t(a.concat(Array.from(l))),a.concat(Array.from(l))}))},onRemoveImage:o=>{if(t&&e){const a=e;a.splice(o,1),t(a.slice())}else a((a=>{const n=e||a;return n.splice(o,1),t&&t(n.slice()),n.slice()}))},onRemoveAllImages:()=>{t?t([]):a([])},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 nt=({className:e,style:t,bannedWords:a=[],value:s,onChange:r,onPreviewUrlChange:c,onInvalidUrlsChange:d,onImageFilesChange:m,imageFiles:u,isReplying:p})=>{const{t:v}=ue(),[g,h]=n(null),y=l(null),{onSelectImages:C,onRemoveImage:f,imageSrcs:b}=ot(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(ge,{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:a,onImagePickerClick:()=>{var e;return null===(e=y.current)||void 0===e?void 0:e.click()},onPreviewUrlChange:h,onInvalidUrlsChange:d,isReplying:p}))),o.createElement(ge,{size:"p4",className:"count-string"},v("character"),": ",pe(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(Ye,{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>Be?o.createElement("div",{className:"input-notification"},o.createElement("img",{src:tt,loading:"lazy"}),o.createElement(ge,{size:"p4",color:ve.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"}))))))},lt=(e,t)=>{if(!t)return e;const{limit:o,bannedWords:a=[]}=t,n="number"==typeof o&&o>=0?e.substring(0,o):e;return f(n,a)},it=({className:e,style:t,bannedWords:a=[],value:s,onChange:c})=>{var d;const{t:m}=ue(),[u,p]=n(""),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==a?void 0:a.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,a);e!==t&&(c&&c(e),p(e))}}}),[g]);const h=r(Ke((()=>{if(v.current){const e=lt(v.current.innerText,{limit:120,bannedWords:a});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(Qe,{name:"title",value:s||u,size:"md",label:m("createPost.title"),CustomInput:o.createElement(Ge,{innerRef:v,html:s||u,onChange:()=>{if(v.current&&v.current.innerText!==(s||u)){const e=lt(v.current.innerText,{bannedWords:a});c&&c(e),p(e),h()}},className:"title-input"})}),o.createElement(ge,{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})))},st=({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}}}=a(Te),[b,I]=n(c?[...c]:[]),[x,P]=n(g?[...g]:[]),[T,M]=n(!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 Me(je(_e.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(rt,{key:`${e.id}-${e.mappedCategoryId}`,topic:e,disabled:!0,selected:!0,dataEventAction:C,dataEventCategory:y,dataEventLabel:E}))),z.map((e=>o.createElement(rt,{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"}))},rt=e=>{var{topic:a,disabled:n,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":n,onClick:n?void 0:i},s),a.name)},ct=({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:L,currentPageUrl:S})=>{const z=!!(null==E?void 0:E.id),{data:{locale:B,env:{isMarryBaby:A}},action:{pushNotifications:O,sanitizeFunction:F}}=a(Te),{t:R}=ue(),[D,U]=n(!1),[V,$]=n(N),[Z,H]=n(!1),[W,Q]=n(!1),[K,G]=n(!1),[q,J]=n(""),[Y,X]=n(""),[ee,te]=n(m?{label:m.name,value:`${m.id||""}-${m.mappedCategoryId||""}`}:{label:R("community.choose"),value:""}),[oe,ae]=n([...u]||[]),[ne,le]=n([]),[ie,se]=n([]),re=m||c.find((e=>`${e.id||""}-${e.mappedCategoryId||""}`===ee.value)),ce=m?[m]:c.filter((e=>e.isActive)).sort(((e,t)=>e.name>t.name?1:e.name<t.name?-1:0)),[de,me]=n(null),[Ce,Ee]=n([]),ke=q&&!W&&pe(Y)&&(v||!v&&oe.length>0)&&re&&(!ne||ne.length<=Be)&&!(null==Ce?void 0:Ce.length)&&!K;i((()=>{if(E){const e=E;J(e.title||""),X(I(x(e.description||"","edit"),e.mentions)),te({label:e.community.name,value:`${e.community.id||""}-${e.community.mappedCategoryId||""}`}),ae(e.topics||[]),le(e.photos||[]),U(!!e.isAnonymous||!1),$(!!e.isAskDoctor||!1)}else k&&te({label:k.name,value:`${k.id||""}-${k.mappedCategoryId||""}`}),w&&ae(w)}),[]),i((()=>{Q(""!==q&&!/[a-zA-Z]/.test(q))}),[q]);const fe=()=>e(void 0,void 0,void 0,(function*(){var t,o,a,n,l,i,c,d,m;if(L&&void 0===V)return H(!0),!1;const u=yield(({title:t,description:o,communityId:a,imageFiles:n,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)):a&&e.append("community_id",String(a)),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",Ie(l.url)),(null==l?void 0:l.image)&&e.append("preview_image",Ie(l.image)),null==i||i.forEach((t=>{e.append("topics[]",String(t||""))})),null==d||d.forEach((t=>{e.append("category_topics[]",String(t||""))})),null==n?void 0:n.length){const t=yield Promise.all(n.map(((e,t)=>new Promise((o=>{setTimeout((()=>{o(C(e,s))}),2e3*t)})))));null==t||t.filter(Boolean).slice(0,Be).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:q,description:Y,communityId:String((null==re?void 0:re.id)||""),imageFiles:ne,previewUrl:de,topicIds:null==oe?void 0:oe.map((e=>String(e.id||""))).filter(Boolean),locale:B,sanitizeFunction:F,categoryCommunityId:String((null==re?void 0:re.mappedCategoryId)||""),categoryTopicIds:null==oe?void 0:oe.map((e=>String(e.mappedCategoryId||""))).filter(Boolean),isAnonymous:D?1:0,isAskDoctor:V?1:0});let v;p&&u.append("article_id",p),z?(null==E?void 0:E.id)&&(v=yield(({id:t,locale:o,formData:a})=>e(void 0,void 0,void 0,(function*(){return yield ze(je(_e.POST.UPDATE,{id:t,_locale:o}),"POST",{data:a})})))({id:E.id,formData:u,locale:B})):v=yield(({locale:t,formData:o,isArticleComment:a})=>e(void 0,void 0,void 0,(function*(){return yield ze(je(a?_e.POST.CREATE_ARTICLE_COMMENT:_e.POST.CREATE,{_locale:t}),"POST",{data:o})})))({formData:u,locale:B,isArticleComment:!(null==re?void 0:re.id)&&!!(null==re?void 0:re.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)?(O({message:R("createPost.popup.success"),type:"success"}),(e=>{s&&s(Ze(e),z),r&&r()})(k)):"banned"===(null===(n=null===(a=null==v?void 0:v.messages)||void 0===a?void 0:a.moderation)||void 0===n?void 0:n.type)?(O({title:R("notification.post.blocked.title"),message:R("notification.post.blocked.message"),type:"danger"}),v.messages.moderation.words&&se(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)?(O({title:R("notification.post.suspect.title"),message:R("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"))})))?(O({message:R("notification.suspend.message"),type:"danger"}),r&&r()):O({message:(null===(m=null==v?void 0:v.messages)||void 0===m?void 0:m[0])||R("notification.failure"),type:"danger"})}));return o.createElement(P,{className:t,style:l},o.createElement("div",{className:"input-group-container"},o.createElement(it,{className:"input-group",bannedWords:ie,value:q,onChange:J}),W&&o.createElement(T,null,o.createElement(he,{isSolid:!0,color:ve.colors.red700,size:14}),o.createElement(ge,{size:"p3",as:"span",color:ve.colors.red700},R("createPost.popup.specialCharErr"))),o.createElement(nt,{className:"input-group",bannedWords:ie,value:Y,onChange:X,onPreviewUrlChange:me,onInvalidUrlsChange:Ee,onImageFilesChange:le,imageFiles:ne}),L&&o.createElement(M,{"data-is-marry-baby":A},o.createElement("div",{className:"switch-label"},o.createElement(ye,{isMarryBaby:A,size:A?32:24,color:ve.colors.primaryBase,className:"label-icon"}),o.createElement("span",{className:"label-txt"},R("createPost.askDoctor"))),o.createElement(j,{value:V,choices:[{label:R("createPost.askDoctorChoice.yes"),value:!0,dataEventCategory:"Together",dataEventAction:"Write Post Click - Ask Doctor",dataEventLabel:S},{label:R("createPost.askDoctorChoice.no"),value:!1}],onChange:e=>{"boolean"==typeof e&&(H(!1),$(e))}})),Z&&o.createElement(T,null,o.createElement(he,{isSolid:!0,color:ve.colors.red700,size:14}),o.createElement(ge,{size:"p3",as:"span",color:ve.colors.red700},R("createPost.message.askDoctorRequire"))),o.createElement("div",{className:"input-group"},o.createElement(ge,{size:"p4",className:"input-group-label"},R("admin.community")),o.createElement(_,{options:(null==ce?void 0:ce.map((e=>({label:e.name,value:`${e.id||""}-${e.mappedCategoryId||""}`}))))||[],id:"community-picker",placeholder:R("community.choose"),value:ee,dropdownLabelTrackingAttributes:{"data-event-category":"Together","data-event-action":"Write Post Click - Choose Community/Topic","data-event-label":S},onChange:e=>{te({label:e.label,value:String(e.value)}),ae([])},disabled:!!m}),o.createElement(ge,{size:"sm",className:"warning",color:ve.colors.gray400},"* ",R("commentPopup.warning.newPost"))),!b&&o.createElement("div",{className:"input-group"},o.createElement(ge,{size:"p4",className:"input-group-label"},R("tab.topic")),o.createElement("div",{className:"input-notification"},o.createElement("img",{src:re?"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":tt,loading:"lazy"}),o.createElement(ge,{size:"base",color:ve.colors.gray500},R(re?"createPost.popup.primary":"createPost.popup.warning"))),re&&o.createElement(st,{className:"tag-list",communityId:re.id,forceTopics:u,onChange:ae,selectedTopics:oe,noFetch:f,dataEventCategory:"Together",dataEventAction:"Write Post Click - Choose Community/Topic",dataEventLabel:S}))),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:A?"pink":void 0,"data-event-category":"Together","data-event-action":"Write Post Click - Incognito","data-event-label":S,label:o.createElement("div",{className:"switch-label"},o.createElement("img",{className:"label-icon",src:Ne.getAssetPath("anomyous-avatar.svg"),alt:"anomyous avatar",style:{marginRight:"10px",width:"24px"},loading:"lazy"}),o.createElement("span",{className:"label-txt"},R("createPost.postAnonymous"))),value:"Post Anonymous",onChange:e=>U(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(we,{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(ke&&!K){G(!0);try{yield fe()}catch(e){console.error(e),O(et(R))}G(!1)}})),disabled:!ke,loading:K},R("createPost.popup.submit")))))},dt=({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}}}=a(Te),k="boolean"==typeof t?t:E,[w,f]=n(!1);return i((()=>(xe(!0),setTimeout((()=>f(!0)),0),()=>xe(!1))),[]),"undefined"==typeof window?null:Je.createPortal(o.createElement(L,{"data-is-marrybaby":k,className:e,style:l,"data-open":w},o.createElement(S,{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(Se,{className:"title",tag:"h2"},s),o.createElement(ge,{className:"desc",size:"lg"},r),o.createElement("div",{className:"btn-group"},o.createElement(qe,Object.assign({theme:k?"marryBaby":"helloSites",size:"md",color:"tertiary",onClick:()=>{null==m||m(),null==g||g()}},y,h),c),o.createElement(qe,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"})))),Pe())};const mt=({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}}}=a(Te),x="boolean"==typeof g?g:I,{t:P}=ue(),{onSelectImages:T,onRemoveImage:M,imageSrcs:j,onRemoveAllImages:_,imageFiles:L}=ot(),[S,A]=n(""),{trigger:O}=a(z),[F,R]=n(!1),D=l(null),U=l(null),V=l(null),[$,Z]=n([]),[H,W]=n([]),[Q,K]=n(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(B,{"data-is-reply":t,className:s,style:d},t&&o.createElement("div",{className:"reply-to-container"},o.createElement(ge,{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:Ae,username:(null==b?void 0:b.name)||(null==b?void 0:b.username)}),o.createElement("input",{ref:D,onChange:T,type:"file",multiple:!0,accept:"image/png,image/jpeg",name:"images",style:{display:"none"}}),o.createElement(Qe,{value:S,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:S,onChange:A,onImagePickerClick:()=>{var e;return null===(e=D.current)||void 0===e?void 0:e.click()},bannedWords:H,onPreviewUrlChange:K,onInvalidUrlsChange:Z,setEditorRef:e=>U.current=e,isReplying:t}))}),o.createElement(qe,{theme:x?"marryBaby":"helloSites",className:"send-button",size:"sm",onClick:()=>e(void 0,void 0,void 0,(function*(){var o,a,n,l,i,s,c,d,g;if((null==v?void 0:v.id)&&!F){R(!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:a,link:n,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 a&&a.length>0&&(yield Promise.all(null==a?void 0:a.map((e=>C(e,l))))).filter(Boolean).slice(0,Be).forEach((t=>{e.append("images[]",t)})),n&&e.append("link",n),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:S,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 ze(je(_e.COMMENT.REPLY,{_locale:o}),"POST",{data:t})})))(w,N):((t,o)=>e(void 0,void 0,void 0,(function*(){return ze(je(_e.COMMENT.CREATE,{_locale:o}),"POST",{data:t})})))(w,N),I=null==b?void 0:b.data;(null==I?void 0:I.id)&&!(null===(n=null===(a=null==b?void 0:b.messages)||void 0===a?void 0:a.moderation)||void 0===n?void 0:n.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"})}R(!1)}})),isLoading:F,isDisabled:!!(null==$?void 0:$.length)||F||!S||(null==S?void 0:S.length)<2||!S.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(Ye,{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 ut="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 pt=({className:t,style:l,reason:i,reasonText:s,onClose:r,postId:c})=>{const{data:{locale:d,env:{isMarryBaby:m}},action:{pushNotifications:u}}=a(Te),{t:p}=ue(),[v,g]=n(!1);return o.createElement(A,{"data-is-marrybaby":m,className:t,style:l},o.createElement("ul",{className:"report-list"},o.createElement("li",{className:"report-item"},o.createElement("img",{src:ut,loading:"lazy"}),o.createElement(ge,{className:"__label",color:ve.colors.gray800,size:"p4"},s))),o.createElement(qe,{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 a=new FormData;return a.append("reason",t),ze(je(_e.POST.REPORT,{_locale:o,id:e}),"POST",{data:a})})({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 vt=({className:e,style:t,authorName:a,images:l,onClose:s,onOpenSingleView:r,alt:c})=>{const{t:d}=ue(),[u,p]=n(!1);return i((()=>{setTimeout((()=>{p(!0)}),0)}),[]),o.createElement(m,null,o.createElement(O,{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(ge,{size:"p2",weight:"bold",style:{textAlign:"center"}},d("previewPhotos.title",{name:a}))),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 gt="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 ht=({initialViewIndex:e,images:t,onClose:a,alt:l})=>{const[s,r]=n(e),[c,d]=n(!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(F,{"data-open":c&&!!u},o.createElement(R,null,o.createElement("img",{src:D,className:"icon-close",onClick:a,alt:"close",loading:"lazy"})),u&&s>=0&&o.createElement(o.Fragment,null,o.createElement(U,null,o.createElement("img",{className:"img-preview",src:u,alt:l,loading:"lazy"}),o.createElement(V,{"data-disabled":p,onClick:()=>!p&&r(s-1)},o.createElement($,null,o.createElement("img",{src:gt,style:{transform:"rotate(180deg)"},alt:"left arrow","data-disabled":p,loading:"lazy"}))),o.createElement(V,{"data-right":!0,"data-disabled":v,onClick:()=>!v&&r(s+1)},o.createElement($,null,o.createElement("img",{src:gt,alt:"right arrow","data-disabled":v,loading:"lazy"})))))))},yt=({image:e,showIcon:t=!0})=>{const[a,l]=n(!0);return o.createElement(Z,{"data-is-blurred":a,onClick:e=>a&&e.stopPropagation()},o.createElement("img",{loading:"lazy",className:"img-preview",src:e}),o.createElement(H,{onClick:e=>{e.stopPropagation(),l(!a)}},t&&o.createElement(W,null,a?o.createElement("svg",{width:"22",height:"20",viewBox:"0 0 22 20",fill:"none"},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"},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"})))))},Ct=({className:e,images:t=[],style:s,authorName:r,isSensitive:c=!1,alt:d})=>{const{data:{env:{isMarryBaby:m}}}=a(Te),{t:u}=ue(),p="+ "+((t.length||0)-4),[v,g]=n(!1),[h,y]=n(-1),C=t.length>5,E=l(!1);return i((()=>()=>{E.current&&xe(!1)}),[]),i((()=>{v||h>=0?(xe(!0),E.current=!0):(xe(!1),E.current=!1)}),[v,h]),o.createElement(o.Fragment,null,c&&o.createElement(Q,{message:u("sensitiveMask.contentWarningDescription"),icon:o.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},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(K,{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 a=4===t&&C;return o.createElement("div",{className:"img-wrapper",key:t,onClick:()=>{t>=4&&C?g(!0):y(t)}},c&&o.createElement(yt,{image:e,showIcon:!a}),!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}),a&&o.createElement("div",{className:"img-more-overlay"},o.createElement(Se,{tag:"h1",as:"h2",color:"white"},p)))}))),v&&o.createElement(vt,{authorName:r||"",images:t,onClose:()=>g(!1),onOpenSingleView:y,alt:d}),h>=0&&o.createElement(ht,{images:t,initialViewIndex:h,onClose:()=>y(-1),alt:d}))},Et=({url:t,image:r,className:d,style:m,baseUrl:u="",autoPlay:p=!0})=>{const{data:{locale:v}}=a(Te),[g,h]=n(null);i((()=>{e(void 0,void 0,void 0,(function*(){if(!r){if(!t)return h(null);h((e=>Object.assign(Object.assign({},e),{isFetching:!0}))),Me(je(_e.FETCH_PREVIEW,{_locale:v},void 0,u),"POST",{data:{link:t},headers:{"Content-Type":"application/json"}},!!u).then((e=>{var o,a;h({url:t,image:(null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.image)||(null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.logo)})})).catch((()=>{h(null)}))}}))}),[t,r]);const y=r||(null==g?void 0:g.image),C=(null==g?void 0:g.url)||t,E=s((()=>G(C)),[C]),k=s((()=>C.includes("facebook.com")||C.includes("fb.watch")),[C]),f=l(0),b=l(0),[N,I]=n(!1);i((()=>{const e=()=>{var e;const t=null===(e=x.current)||void 0===e?void 0:e.getBoundingClientRect();let o=!1;t&&(!f.current||Math.abs((f.current-t.width)/(null==t?void 0:t.width))>.2)&&(f.current=Math.floor(t.width),o=!0),t&&(!b.current||Math.abs((b.current-t.height)/(null==t?void 0:t.height))>.2)&&(b.current=Math.floor(t.height),o=!0),o&&I((e=>!e))};return e(),window.addEventListener("resize",e,{passive:!0}),()=>{window.removeEventListener("resize",e)}}),[]);const x=l(null),P=c();return o.createElement(q,{className:`${d} no-replace-click`,style:m,ref:x,color:P.colors[P.primaryColor][0]},r||!E&&!k?o.createElement("a",{href:C,target:"_blank",rel:"noreferrer"},o.createElement("div",{className:"link-image-wrapper "+((null==g?void 0:g.isFetching)?"fetching":"")},(null==g?void 0:g.isFetching)?o.createElement(w,{className:"loading-spinner"}):o.createElement(fe,{className:"link-image",src:y||Le,backupSrc:Le,alt:C}))):o.createElement("div",{className:"link-image-wrapper"},E?o.createElement("iframe",{width:"100%",height:"100%",src:`https://www.youtube.com/embed/${E}?&autoplay=${p?1:0}&mute=1&enablejsapi=1`,frameBorder:"0",allowFullScreen:!0,style:{position:"absolute",top:0,left:0,border:"none",overflow:"hidden"},loading:"lazy"}):k?o.createElement("iframe",{key:String(N),src:`https://www.facebook.com/plugins/video.php?href=${encodeURIComponent(C)}&autoplay=${p?1:0}&show_text=false&t=0&width=${f.current}&height=${b.current}`,style:{position:"absolute",top:"50%",left:"50%",border:"none",overflow:"hidden",height:b.current,width:f.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 kt="KsWg8i6",wt="_9tS0EUN",ft="kyyRKlb",bt="-Uqqka-";const Nt=l=>{var{post:i,onSkip:s,btnText:d,currentPageUrl:m}=l,p=t(l,["post","onSkip","btnText","currentPageUrl"]);const{t:v}=ue(),{data:{locale:g},action:{pushNotifications:h}}=a(Te),[y,C]=n(!1),[E,k]=n(!1),w=c(),f=r((()=>e(void 0,void 0,void 0,(function*(){var e;k(!0);const t=yield ze(je(_e.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:`${kt} ${(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:wt},v("profilePanel.skipQuestion.heading")),o.createElement("div",{className:ft},v("profilePanel.skipQuestion.content")),o.createElement("div",{className:bt},o.createElement(we,{size:"md",variant:"secondary",leftIcon:o.createElement(Ce,{color:w.fn.primaryColor(),size:24}),onClick:()=>C(!1),styles:()=>({leftIcon:{marginRight:0}})}),o.createElement(we,{variant:"primary",size:"md",leftIcon:o.createElement(Ee,{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 It="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",xt="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",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='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='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",Mt="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",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='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 _t=({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}}=a(Te),{t:C}=ue(),[E,k]=n(!1),[w,f]=n(!1),[b,N]=n(!1),{authActionWrapper:I}=J(),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(Y,{url:i,text:null==s?void 0:s.title,onClose:()=>N(!1)}),w&&o.createElement(dt,{thumbnail:Ne.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 ze(je(_e.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(X,{className:c,toggleButtonContent:o.createElement("img",{src:h?It:Tt,loading:"lazy"}),position:"bottom",align:"end",buttonProps:{isLoading:E},data:x?{isShowheader:!1,type:"list",list:[{icon:Mt,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:jt,label:C("actionPopover.delete"),onClick:()=>{I((()=>f(!0)))}}]}:{isShowheader:!1,type:"list",list:[{icon:Mt,label:C("morePopover.share"),onClick:()=>N(!0)},{icon:(null==s?void 0:s.bookmarked)?xt:Pt,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 ze(je(_e.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:Pt}),m&&m()):y({title:"",message:"Remove failed",type:"danger",displayIcon:Pt})}else{const e=yield ze(je(_e.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:xt}),d&&d()):y({title:"",message:"Post saved failed",type:"danger",displayIcon:Pt})}}))))}},{icon:ut,label:C("morePopover.report"),subTree:{title:C("morePopover.report.title"),description:C("morePopover.report.description"),isShowheader:!0,type:"list",list:Object.keys(Oe).map((e=>({label:Oe[e].label,reason:Oe[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(pt,{reason:e.reasonValue,reasonText:C(e.reason),postId:null==s?void 0:s.id,onClose:()=>t&&t(!1)})}})))}}]}}))};const Lt=({onDeleteComment:t,commentId:l,className:i="",popoverClassName:s=""})=>{const{data:{env:{isMarryBaby:r},locale:c},action:{pushNotifications:d}}=a(Te),{t:m}=ue(),[u,p]=n(!1),{authActionWrapper:v}=J();return o.createElement("div",{className:i,onClick:e=>{e.preventDefault(),e.stopPropagation()}},u&&o.createElement(dt,{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})=>ze(je(_e.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(X,{position:"bottom",align:"end",data:{isShowheader:!1,type:"list",list:[{icon:jt,label:m("actionPopover.delete"),onClick:()=>{v((()=>{p(!0)}))}}]},className:s,toggleButtonContent:o.createElement("img",{src:r?It:Tt,loading:"lazy"}),buttonProps:{}}))};var St="-dzIuHr";const zt=({userId:e,avatar:t,name:a,role:l,title:i,className:s})=>{const{t:r}=ue(),[c,d]=n(!1);return o.createElement(o.Fragment,null,o.createElement(qe,{className:`${St} ${s}`,color:"success",size:"xs",onClick:()=>d(!0),style:{padding:"5px 8px",marginBottom:"12px",borderRadius:"4px"}},o.createElement("span",{className:"text"},o.createElement(ke.Endorse,{isSolid:!0,size:18,color:ve.colors.green800,className:"icon"}),r("cardReply.verifyBy",{name:`${a||""}`}))),o.createElement(ee,{open:c,onClose:()=>d(!1),profileModalProps:{zIndex:1e3}},o.createElement(te,{authorProps:{userId:e,avatar:t,name:a,role:l,title:i},hideQuestionTab:!0})))};const Bt=({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}}}=a(Te),{t:O}=ue(),[F,R]=n(r||null),{id:D,countLikes:U,content:V,replies:$=[],images:Z=[],author:H,liked:W,link:Q,mentionedUser:K,mentions:G}=F,{text:q,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}=J({_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,te]=n(4),de=!!(null==B?void 0:B.id)&&(null==$?void 0:$.some((e=>e.author.id===B.id))),me=e=>{R((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}))},[pe,ve]=n(!1),ge=s((()=>"comment"===c&&$&&0!=$.length?$.sort(((e,t)=>{const o=new Date(e.createdAt).getTime(),a=new Date(t.createdAt).getTime();return o>a?-1:o<a?1:0})):$),[c,$]),he=(null==$?void 0:$.length)||0,ye=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),Ce=(null==H?void 0:H.name)||(null==H?void 0:H.username)||"",Ee=(null==H?void 0:H.username)||(null==H?void 0:H.name)||"",ke=null==H?void 0:H.avatar,we=(null==p?void 0:p.isAnonymous)||null==H?void 0:H.role,fe=[...(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||[]],[Ne,Ie]=n(null),[xe,Pe]=n(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 Me(Fe(Re.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)&&Ie(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 Me(Fe(Re.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)&&Pe(null==o?void 0:o._data.doctor)}));t(H.doctorId)}}),[H.hospitalId,H.doctorId]);const Le=(null==xe?void 0:xe.valid_outpatient)||(null==xe?void 0:xe.valid_telemedicine),Se=((null==Ne?void 0:Ne.total_available_service)||(null==Ne?void 0:Ne.total_available_doctor))>0,Be=h&&(Le||Se),Ae="chatbot"===(null===(N=null==F?void 0:F.author)||void 0===N?void 0:N.type);return o.createElement(oe,{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(ae,{className:t,style:l,"data-is-reply":!!d,"data-is-marrybaby":A,"data-has-booking":Be},"reply"===c&&o.createElement(ne,{className:"top-divider",type:"solid"}),o.createElement("div",{style:{padding:"16px 16px 0"}},o.createElement(le,Object.assign({avatar:ke,name:Ce,username:Ee,timeText:null==p?void 0:p.createdTime,community:null==p?void 0:p.community,className:"post-author "+(ye?"with-popover":""),type:c,userId:null==H?void 0:H.id,role:we,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:Be,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:Ae,userType:null==H?void 0:H.type},C)),Boolean(null==F?void 0:F.isVerify)&&!Boolean(null==F?void 0:F.isOppose)&&o.createElement(zt,{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(ie,{className:"post-content-wrapper",replyingTo:Y,mentionedUser:K,description:q,mentions:fe,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(Ct,{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(Ye,{url:Q})),"most-engaging"!==c?o.createElement(o.Fragment,null,Ae&&o.createElement(se,{listUrl:null==F?void 0:F.source,categorySlug:null==F?void 0:F.categorySlug}),o.createElement(re,{type:ce.reply,loveCount:U,replyCount:he,className:"post-reaction",liked:W,isReplied:de,hideCommentIcon:"reply"===c||Ae,hasShare:!1,onCommentClick:()=>X((()=>ve((e=>!e)))),onCommentCountClick:()=>X((()=>{ve(!0)})),onLikeClick:()=>X((()=>e(void 0,void 0,void 0,(function*(){if(D){const t=yield(({commentId:t,setLike:o=!1,locale:a})=>e(void 0,void 0,void 0,(function*(){return ze(je(o?_e.COMMENT.LIKE:_e.COMMENT.UNLIKE,{_locale:a,id:t}),"GET")})))({commentId:D,setLike:!W,locale:z});1===t.status&&R((e=>Object.assign(Object.assign({},e),{liked:!W,countLikes:e.countLikes+(W?-1:1)})))}}))))}),pe&&o.createElement(mt,{replyingId:m||F.id,replyToName:Ce,isReply:!0,onClose:()=>ve(!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==ge?void 0:ge.slice(0,ee))||void 0===S?void 0:S.map((e=>o.createElement(Bt,{key:e.id,comment:e,type:"reply",className:"comment-reply-item",level:d+1,replyingId:D,onPostCommentSuccess:me,post:p,onDeleteComment:()=>{R((t=>Object.assign(Object.assign({},t),{replies:t.replies.filter((t=>t.id!==e.id)),countReplies:t.countReplies-1})))},handleMakeAppointment:y,hasQuickBookingEnable:h}))),he>ee&&o.createElement(o.Fragment,null,o.createElement(ne,{className:"top-divider",type:"solid"}),o.createElement(qe,{className:"more-cmt",size:"lg",color:"ghost",onClick:()=>te((e=>e+4))},O("comment.seeMoreReplies",{count:he-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,ye&&o.createElement(Lt,{onDeleteComment:v,className:"popover",commentId:F.id})))},At=(t,o)=>e(void 0,void 0,void 0,(function*(){var e,a,n;const l=yield Ue(je(_e.COMMENT.LIST,{postId:t,_locale:o,sort:"popularity",perPage:1,withoutReply:1}),"GET");return null===(n=null===(a=null===(e=null==l?void 0:l.data)||void 0===e?void 0:e.comments)||void 0===a?void 0:a.map(We))||void 0===n?void 0:n[0]})),Ot=({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]=n(y),[P,T]=n(!1),[M,j]=n(C),{community:_,topics:L,author:S,slug:z,isPin:B,liked:A,photos:O,mentions:F,title:R,description:D,previewUrl:U,likesCount:V,commentsCount:$,id:Z,commented:H}=I,{data:{locale:W,env:{isMarryBaby:Q,togetherBasePath:K}},action:{pushNotifications:G}}=a(Te),{t:q}=ue(),[X,ee]=n(k),te=`${K}/${(null==_?void 0:_.slug)||"_"}/${z||""}`,ae=`${De(W)}${te}`,{authActionWrapper:ne}=J((null==_?void 0:_.slug)?{_joinCommunityIds:[_.id],_joinTopicIds:null==L?void 0:L.map((e=>e.id))}:void 0),[se,ve]=n(!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,Ce=(null==I?void 0:I.isAnonymous)||null==S?void 0:S.role,[Ee,ke]=n(null),[we,fe]=n(null);i((()=>{if(null==S?void 0:S.hospitalId){(t=>e(void 0,void 0,void 0,(function*(){var e;const o=yield Me(Fe(Re.GET_HOSPITAL_INFO,{hospital_branch_id:t,website_url:Ve[W]}),"get");(null===(e=null==o?void 0:o._data)||void 0===e?void 0:e.branch)&&ke(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 Me(Fe(Re.GET_DOCTOR_INFO,{doctorId:t,website_url:Ve[W]}),"get");(null===(e=null==o?void 0:o._data)||void 0===e?void 0:e.doctor)&&fe(null==o?void 0:o._data.doctor)})))(S.doctorId)}}),[S.hospitalId,S.doctorId]);const be=(null==we?void 0:we.valid_outpatient)||(null==we?void 0:we.valid_telemedicine),Ne=((null==Ee?void 0:Ee.total_available_service)||(null==Ee?void 0:Ee.total_available_doctor))>0,Ie=f&&(be||Ne);i((()=>{e(void 0,void 0,void 0,(function*(){if(Z&&$&&r&&!(null==C?void 0:C.id)){const e=yield At(Z,W);j(e)}}))}),[Z,W,$,r,null==C?void 0:C.id]),i((()=>{j(C)}),[null==C?void 0:C.id]);const xe=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 At(Z,W);j(e)}x((e=>Object.assign(Object.assign({},e),{commentsCount:e.commentsCount-1}))),E&&E(t)}));return o.createElement(oe,{defaultParams:(null==_?void 0:_.slug)?{_joinCommunityIds:[_.id],_joinTopicIds:null==L?void 0:L.map((e=>e.id))}:void 0},P&&o.createElement(Y,{url:ae,avatar:Le,text:R,onClose:()=>T(!1)}),o.createElement(de,{className:t,style:l,"data-is-marrybaby":Q},B?o.createElement(Xe,{className:"post-pin"}):null,o.createElement("div",{style:{position:"relative",padding:"1rem 1rem 0"}},o.createElement(le,Object.assign({avatar:ye,name:ge,username:he,url:p?void 0:te,community:_,timeText:null==I?void 0:I.createdTime,className:"post-author",role:Ce,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:Ie,handleMakeAppointment:b,"data-testid":"name",isAnonymous:!!(null==I?void 0:I.isAnonymous),extendEle:o.createElement(_t,{authorEmail:String(null==S?void 0:S.email),onDeletePost:g,shareUrl:ae,post:I,className:"popover",onEditPost:h})},N))),o.createElement("a",{href:p?void 0:te,className:"post-content-link-wrapper"},R&&o.createElement(Se,{className:"post-content-title",as:"h2",tag:"h5",fontWeight:"bold","data-testid":"Title of the Post"},pe(R)),o.createElement(ie,{className:"post-content-wrapper",description:D,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(me,{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(Et,{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(Ct,{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(Ye,{title:U.title,url:U.url,image:U.image}))),o.createElement(re,{isMarryBaby:Q,type:ce.post,loveCount:V,replyCount:$,className:"post-reaction "+((null==O?void 0:O.length)||(null==U?void 0:U.url)?"hide-top-border":""),liked:se?!A:A,isReplied:H,onCommentClick:()=>ne((()=>{c?c():ee((e=>!e))})),onCommentCountClick:()=>{ne((()=>{Q?ee(!0):d?d():!p&&(window.location.href=te)}))},onShareClick:()=>{T(!0)},onLikeClick:()=>e(void 0,void 0,void 0,(function*(){if(Z&&!se){ve(!0);try{const t=yield(({id:t,locale:o})=>e(void 0,void 0,void 0,(function*(){if(t)return yield ze(je(_e.POST.LIKE,{id:t,_locale:o}),"GET")})))({id:Z,locale:W});1!==(null==t?void 0:t.status)?G(et(q)):x((e=>Object.assign(Object.assign({},e),{likesCount:(e.likesCount||0)+(e.liked?-1:1),liked:!e.liked})))}catch(e){G(et(q))}ve(!1)}})),showingMostEngaging:!(!r||!(null==M?void 0:M.id))}),X&&o.createElement(mt,{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=te}},o.createElement(Bt,{hasQuickBookingEnable:f,handleMakeAppointment:b,comment:M,post:I,onDeleteComment:()=>{xe&&xe(M)},className:"most-engaging-comment",type:"most-engaging",key:M.id,cardAuthorProps:N}),$>1&&!s&&o.createElement(qe,{className:"see-more-comments",color:"ghost",size:"md"},q("comment.seeMoreComments",{count:$-1}))):null,w))};var Ft=Object.freeze({__proto__:null});export{Ye as C,mt as I,Xe as L,dt as P,pt as S,st as T,zt as V,ct as a,nt as b,it as c,vt as d,ht as e,Ct as f,Et as g,Nt as h,Ot as i,_t as j,Bt as k,Lt as l,Ft as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e}from"./tslib.es6-
|
|
1
|
+
import{a as e}from"./tslib.es6-71be3ad2.js";import t,{useState as i,useCallback as a,useMemo as o,useEffect as n,useRef as s,useReducer as l}from"react";import{u as r}from"./useTranslations-28b19550.js";import c from"lodash/debounce";import{I as d,a as p,f as u,M as h,g,C as m}from"./constants-b1321698.js";import{I as C}from"./index-11fea400.js";import b,{createGlobalStyle as y}from"styled-components";import{T as f,I as v}from"./index-c382ba8d.js";import{t as x}from"./theme-f470318d.js";import S from"lodash/shuffle";import{a as E}from"./useOutsideClick-3c9bb801.js";import{M as w}from"./screenSizeContext-7e881f6d.js";import L from"react-loading-skeleton";import{P as k}from"./paths-b4d6519e.js";import{Skeleton as O,Input as j,Divider as I,Tabs as $,Flex as F,Button as M}from"@mantine/core";import{U as R,d as T}from"./index-dbff2d47.js";import{g as P,s as N,d as A}from"./cookieHelper-87d0e0e7.js";import{C as B}from"./index-9d684c92.js";import{C as V}from"./ChevronDown-5eb26fa9.js";import D from"string-format";function K(){const[e,t]=i((()=>{if("undefined"==typeof window)return"unset";if(P(R))return"granted";const e=!location.protocol.includes("https")&&"localhost"!==location.hostname;return!navigator.geolocation||e?"denied":"unset"})),[n,s]=i((()=>{if("undefined"==typeof window)return null;const e=P(R);if(e)try{return JSON.parse(e)}catch(e){console.log(e)}return null})),l=a((function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition((e=>{const i={lat:""+Math.round(1e7*e.coords.latitude)/1e7,lng:""+Math.round(1e7*e.coords.longitude)/1e7};N(R,JSON.stringify(i),{minutes:15}),s(i),t("granted")}),(()=>{A(R),t("denied")}))}),[]);return o((()=>({geoLocationPermission:e,geoLocationCoordinates:n,requestGeoLocation:l})),[e,n])}const z=b.div``,_=b.div`
|
|
2
2
|
--searchbar-z-index: 305;
|
|
3
3
|
&[data-is-modal='true'] {
|
|
4
4
|
position: fixed;
|
package/build/esm/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as BabyGrowthChartDuration,B as BabyGrowthChartType,b as BabyGrowthResultTab,G as Gender,L as LOCALE,O as OnboardingStep}from"./Onboarding-
|
|
1
|
+
export{a as BabyGrowthChartDuration,B as BabyGrowthChartType,b as BabyGrowthResultTab,G as Gender,L as LOCALE,O as OnboardingStep}from"./Onboarding-68463903.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useMemo as e}from"react";import{L as a}from"./Onboarding-
|
|
1
|
+
import{useMemo as e}from"react";import{L as a}from"./Onboarding-68463903.js";import{u as n}from"./useTranslations-28b19550.js";const t={"vi-VN":"mang-thai","id-ID":"kehamilan","ms-MY":"kehamilan","km-KH":"ពពោះ","en-PH":"pregnancy","tl-PH":"pregnancy","th-TH":"การตั้งครรภ์","my-MM":"pregnancy","zh-TW":"pregnancy","hi-IN":"pregnancy"},b={[a.Vietnam]:{sexualWellness:"suc-khoe-tinh-duc",health:"suc-khoe",healthyEating:"an-uong-lanh-manh",skinHealth:"da-lieu",healthyHabit:"thoi-quen-lanh-manh",drug:"thuoc",womensHealth:"suc-khoe-phu-nu",fitness:"the-duc-the-thao",pregnancy:"mang-thai",parenting:"nuoi-day-con",diabetes:"tieu-duong-dai-thao-duong",healthyMind:"tam-ly-tam-than"},[a.Indonesia]:{pregnancy:"kehamilan",parenting:"parenting",health:"sehat",diabetes:"diabetes",womensHealth:"wanita",drug:"obat-suplemen",sexualWellness:"",healthyEating:"",skinHealth:""},[a.Malaysia]:{pregnancy:"kehamilan",parenting:"keibubapaan",health:"kesihatan",diabetes:"kencing-manis",womensHealth:"kesihatan-wanita",drug:"ubat",sexualWellness:"",healthyEating:"",skinHealth:""},[a.Cambodia]:{pregnancy:"%e1%9e%96%e1%9e%96%e1%9f%84%e1%9f%87",parenting:"%e1%9e%85%e1%9e%b7%e1%9e%89%e1%9f%92%e1%9e%85%e1%9e%b9%e1%9e%98%e1%9e%80%e1%9e%bc%e1%9e%93",health:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%91%e1%9e%bc%e1%9e%91%e1%9f%85",diabetes:"%e1%9e%87%e1%9f%86%e1%9e%84%e1%9e%ba%e1%9e%91%e1%9e%b9%e1%9e%80%e1%9e%93%e1%9f%84%e1%9e%98%e1%9e%95%e1%9f%92%e1%9e%a2%e1%9f%82%e1%9e%98",womensHealth:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%9f%e1%9f%92%e1%9e%8f%e1%9f%92%e1%9e%9a%e1%9e%b8",drug:"%e1%9e%b1%e1%9e%9f%e1%9e%90%e1%9e%93%e1%9e%b7%e1%9e%84%e1%9e%a2%e1%9e%b6%e1%9e%a0%e1%9e%b6%e1%9e%9a%e1%9e%94%e1%9f%86%e1%9e%94%e1%9f%89%e1%9e%93",sexualWellness:"",healthyEating:"",skinHealth:""},[a.PhilippinesEnglish]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[a.PhilippinesTagalog]:{pregnancy:"pagbubuntis",parenting:"pagiging-magulang",health:"kalusugan",diabetes:"diabetes-fil",womensHealth:"kalusugan-kababaihan",drug:"drugs-at-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[a.Thailand]:{pregnancy:"%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87%e0%b8%84%e0%b8%a3%e0%b8%a3%e0%b8%a0%e0%b9%8c",parenting:"%e0%b8%9e%e0%b9%88%e0%b8%ad%e0%b9%81%e0%b8%a1%e0%b9%88%e0%b9%80%e0%b8%a5%e0%b8%b5%e0%b9%89%e0%b8%a2%e0%b8%87%e0%b8%a5%e0%b8%b9%e0%b8%81",health:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e",diabetes:"%e0%b9%82%e0%b8%a3%e0%b8%84%e0%b9%80%e0%b8%9a%e0%b8%b2%e0%b8%ab%e0%b8%a7%e0%b8%b2%e0%b8%99",womensHealth:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e%e0%b8%ab%e0%b8%8d%e0%b8%b4%e0%b8%87",drug:"%e0%b8%a2%e0%b8%b2%e0%b9%81%e0%b8%a5%e0%b8%b0%e0%b8%ad%e0%b8%b2%e0%b8%ab%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%aa%e0%b8%a3%e0%b8%b4%e0%b8%a1",sexualWellness:"",healthyEating:"",skinHealth:""},[a.Myanmar]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-az",sexualWellness:"",healthyEating:"",skinHealth:""},[a.Taiwan]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplement",sexualWellness:"",healthyEating:"",skinHealth:""},[a.India]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",diabetesEn:"en-diabetes",drug:"dawaai",sexualWellness:"",healthyEating:"",skinHealth:""}};const s=a=>{const{locale:s}=n();return{isPregnancy:e((()=>decodeURI(a.replace(/\//gi,"")).includes(t[s])),[]),isParenting:e((()=>{var e;return decodeURI(a.replace(/\//gi,"")).includes(null===(e=b[s])||void 0===e?void 0:e.parenting)}),[]),type:e((()=>function(e,a){const n=e.split("/");for(const e in a){const t=a[e];if(n.includes(t))return e}return null}(a,b[s])),[a,s])}};export{b as M,t as P,s as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o}from"./tslib.es6-71be3ad2.js";import{useState as t,useEffect as i,useCallback as a}from"react";import{a as e}from"./getDynamicHealthTool-844c6f6a.js";const l=l=>{const[n,r]=t([]);i((()=>{o(void 0,void 0,void 0,(function*(){const o=yield e(l);r(o)}))}),[e,l]);const s=a((o=>{var t;return(null===(t=n.find((t=>t.template===o)))||void 0===t?void 0:t.link)||""}),[n]);return{allTools:n,getHealthToolLink:s}};export{l as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./tslib.es6-
|
|
1
|
+
import{a as e}from"./tslib.es6-71be3ad2.js";import{useRef as t,useEffect as n,useState as r,useCallback as i}from"react";import{g as o}from"./cookieHelper-87d0e0e7.js";import{a}from"./useTranslations-28b19550.js";function l(e){const t=(new TextEncoder).encode(e.trim().toLowerCase());return crypto.subtle.digest("SHA-256",t).then((e=>Array.from(new Uint8Array(e)).map((e=>e.toString(16).padStart(2,"0"))).join("")))}const c=r=>{const i=t("");n((()=>(e(void 0,void 0,void 0,(function*(){var e,t,n,a,c;if(!i.current){let e=yield fetch("https://api.ipify.org").then((e=>e.text()));e||(e=yield fetch("https://icanhazip.com").then((e=>e.text()))),i.current=e}if(null===(t=null===(e=window.localStorage)||void 0===e?void 0:e.setItem)||void 0===t||t.call(e,"fbClientIp",JSON.stringify({client_ip_address:(null===(n=i.current)||void 0===n?void 0:n.replace("\n",""))||"",client_user_agent:navigator.userAgent||""})),null==r?void 0:r.id){const[e,t,n,i,s,u]=yield Promise.all([r.email?l(r.email):null,r.phone?l(r.phone):null,r.birthday?l(r.birthday.split("-").join("")):null,r.gender?"m":"f",r.city_name?l(r.city_name).then((e=>e.replace(/\s/g,""))):null,r.name?l(r.name):null]);o("_fbc"),o("_fbp");const d={user_id:r.id};u&&(d.fn=u),e&&(d.em=e),t&&(d.ph=t),n&&(d.db=n),s&&(d.ct=s),null===(c=null===(a=window.localStorage)||void 0===a?void 0:a.setItem)||void 0===c||c.call(a,"fbDataLayer_userInfo",JSON.stringify(d))}})),()=>{})),[r])},s=e=>{const n=t(),r=t(e);return a()||r.current===e||(n.current=r.current,r.current=e),n.current},u=e=>{const[o,a]=r(e),l=t(0),c=i((e=>{cancelAnimationFrame(l.current),l.current=requestAnimationFrame((()=>{a(e)}))}),[]);return n((()=>()=>cancelAnimationFrame(l.current))),[o,c]};export{s as a,u as b,c as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useRef as r,useContext as t,useMemo as n}from"react";import{T as o}from"./translationsContext-
|
|
1
|
+
import{useRef as r,useContext as t,useMemo as n}from"react";import{T as o}from"./translationsContext-d199b4bc.js";import e from"string-format";const a=()=>{const t=r(!0);return!!t.current&&(t.current=!1,!0)};let s=0;const l=()=>{const t=r("");return a()&&(s+=1,t.current=`hhg-gen-id${s}`),t.current};function c(){const{values:r,locale:a}=t(o)||{locale:"en-PH"};return n((()=>({t:(t,n)=>r?r[t]?n?e(r[t]||t,n):r[t]||t:(console.warn(`[useTranslations] Missing translation for key ${t} and locale ${a}`),n?e(t,n):t):(console.error("[useTranslations] t method called before translation values are loaded"),t),locale:a})),[r,a])}export{a,l as b,c as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{M as t}from"./screenSizeContext-
|
|
1
|
+
import{M as t}from"./screenSizeContext-7e881f6d.js";import e from"styled-components";import a,{memo as o,useMemo as s}from"react";import{CommonGAssets as n}from"./gAssets.js";import{I as r}from"./index-ee15c33c.js";import{L as h}from"./Onboarding-68463903.js";const l=e.div`
|
|
2
2
|
position: relative;
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
align-items: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as a}from"./Onboarding-
|
|
1
|
+
import{L as a}from"./Onboarding-68463903.js";const i={[a.Vietnam]:"VN",[a.Cambodia]:"KH",[a.Indonesia]:"ID",[a.Malaysia]:"MY",[a.PhilippinesEnglish]:"PH",[a.PhilippinesTagalog]:"PH",[a.Taiwan]:"TW",[a.Thailand]:"TH",[a.Myanmar]:"MM"},n=(a="")=>{const i=a.indexOf("@"),n=a.substring(0,i),s=n.length>3?3:n.length;return a.replace(a.substring(s,i),a.slice(s,i).replace(/./g,"x"))};export{i as M,n as h};
|
package/build/esm/vaccination.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as e,a as t}from"./tslib.es6-
|
|
1
|
+
import{_ as e,a as t}from"./tslib.es6-71be3ad2.js";import a,{useMemo as n,useState as r,useEffect as i,Fragment as l}from"react";import{Stack as o,Flex as c,Badge as s,Grid as d,Box as m,Input as C,Container as p,AspectRatio as u,Tabs as g,ScrollArea as b,Divider as h,SimpleGrid as E}from"@mantine/core";import{B as f,t as y,b as v,u as x}from"./index-ee15c33c.js";import"@mantine/dates";import"./index-dbff2d47.js";import{G as w}from"./Onboarding-68463903.js";import"./gAssets.js";import{T as k,I as L}from"./index-c382ba8d.js";import j from"dayjs";import{M}from"./screenSizeContext-7e881f6d.js";import D from"styled-components";import{t as z}from"./theme-f470318d.js";import"./isProduction-51fadd96.js";import{u as V}from"./useTranslations-28b19550.js";import{useDisclosure as T}from"@mantine/hooks";import"lodash/debounce";import"./useCategory-66dc7051.js";import{S as $}from"./index-db903b7d.js";import"./translationsContext-d199b4bc.js";import"string-format";import{H as B}from"./index.styles-07a11ccd.js";import"./constants-b1321698.js";import"./utils-4dd7269c.js";import"./index.styled-7ef36c68.js";import"./index-0aeb7ac9.js";import{M as F}from"./index-48404b57.js";import{useForm as _}from"@mantine/form";import H from"dayjs/plugin/customParseFormat";import{D as Z}from"./index-d08071f0.js";import"@mantine/carousel";import"classnames";import"date-fns/locale";import"lodash/throttle";import"react-keyed-flatten-children";import"./cookieHelper-87d0e0e7.js";import"slugify";const O=D.div`
|
|
2
2
|
position: relative;
|
|
3
3
|
padding: 16px;
|
|
4
4
|
min-height: 110px;
|