@hhgtech/hhg-components 1.22.26 → 1.22.28
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/{BMI_BOYS.percentile.monthly-e1af0e66.js → BMI_BOYS.percentile.monthly-1ad1666c.js} +0 -0
- package/build/{BMI_BOYS.percentile.weekly-75bff607.js → BMI_BOYS.percentile.weekly-87103966.js} +0 -0
- package/build/{BMI_BOYS.percentile.yearly-a1a3d0ef.js → BMI_BOYS.percentile.yearly-37b67c96.js} +0 -0
- package/build/{BMI_BOYS.zscore.monthly-a175df2d.js → BMI_BOYS.zscore.monthly-f1d840db.js} +0 -0
- package/build/{BMI_BOYS.zscore.weekly-aba5d53b.js → BMI_BOYS.zscore.weekly-b50aedd3.js} +0 -0
- package/build/{BMI_BOYS.zscore.yearly-aafb7ce1.js → BMI_BOYS.zscore.yearly-274f1e3e.js} +0 -0
- package/build/{BMI_GIRLS.percentile.monthly-4c519db6.js → BMI_GIRLS.percentile.monthly-6f30dd37.js} +0 -0
- package/build/{BMI_GIRLS.percentile.weekly-aa3da5c1.js → BMI_GIRLS.percentile.weekly-e575c948.js} +0 -0
- package/build/{BMI_GIRLS.percentile.yearly-8561e48e.js → BMI_GIRLS.percentile.yearly-167b2fa9.js} +0 -0
- package/build/{BMI_GIRLS.zscore.monthly-849cbbe5.js → BMI_GIRLS.zscore.monthly-a1fcbc6d.js} +0 -0
- package/build/{BMI_GIRLS.zscore.weekly-56e2c916.js → BMI_GIRLS.zscore.weekly-3214a7ba.js} +0 -0
- package/build/{BMI_GIRLS.zscore.yearly-eb9d49d1.js → BMI_GIRLS.zscore.yearly-21188b2d.js} +0 -0
- package/build/{HEAD CIRCUM_BOYS.percentile.monthly-790479be.js → HEAD CIRCUM_BOYS.percentile.monthly-f578ad99.js} +0 -0
- package/build/{HEAD CIRCUM_BOYS.percentile.weekly-923d3626.js → HEAD CIRCUM_BOYS.percentile.weekly-0a11085d.js} +0 -0
- package/build/{HEAD CIRCUM_BOYS.percentile.yearly-b5aaa103.js → HEAD CIRCUM_BOYS.percentile.yearly-236ac50e.js} +0 -0
- package/build/{HEAD CIRCUM_BOYS.zscore.monthly-bc73088f.js → HEAD CIRCUM_BOYS.zscore.monthly-f637a5d5.js} +0 -0
- package/build/{HEAD CIRCUM_BOYS.zscore.weekly-f472daa8.js → HEAD CIRCUM_BOYS.zscore.weekly-f97928b0.js} +0 -0
- package/build/{HEAD CIRCUM_BOYS.zscore.yearly-d7a7b9df.js → HEAD CIRCUM_BOYS.zscore.yearly-8ace6ff5.js} +0 -0
- package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-24290dfb.js → HEAD CIRCUM_GIRLS.percentile.monthly-77aac3a7.js} +0 -0
- package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-0020f6e2.js → HEAD CIRCUM_GIRLS.percentile.weekly-f3659921.js} +0 -0
- package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-22dd615a.js → HEAD CIRCUM_GIRLS.percentile.yearly-d8f5ab6b.js} +0 -0
- package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-96a0f069.js → HEAD CIRCUM_GIRLS.zscore.monthly-3aeab786.js} +0 -0
- package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-a0fa670d.js → HEAD CIRCUM_GIRLS.zscore.weekly-ecc8659c.js} +0 -0
- package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-02cf35f7.js → HEAD CIRCUM_GIRLS.zscore.yearly-4500f318.js} +0 -0
- package/build/{HEIGHT_BOYS.percentile.monthly-e61c2896.js → HEIGHT_BOYS.percentile.monthly-634c92b7.js} +0 -0
- package/build/{HEIGHT_BOYS.percentile.weekly-71fb3532.js → HEIGHT_BOYS.percentile.weekly-326b8a6c.js} +0 -0
- package/build/{HEIGHT_BOYS.percentile.yearly-5156c057.js → HEIGHT_BOYS.percentile.yearly-67bcf8d4.js} +0 -0
- package/build/{HEIGHT_BOYS.zscore.monthly-910c2bd0.js → HEIGHT_BOYS.zscore.monthly-75ddebd0.js} +0 -0
- package/build/{HEIGHT_BOYS.zscore.weekly-70c18763.js → HEIGHT_BOYS.zscore.weekly-5405469d.js} +0 -0
- package/build/{HEIGHT_BOYS.zscore.yearly-bd97678c.js → HEIGHT_BOYS.zscore.yearly-8b2f6f3f.js} +0 -0
- package/build/{HEIGHT_GIRLS.percentile.monthly-a7bf2e5d.js → HEIGHT_GIRLS.percentile.monthly-5b3aac94.js} +0 -0
- package/build/{HEIGHT_GIRLS.percentile.weekly-b2628828.js → HEIGHT_GIRLS.percentile.weekly-1a88ee9c.js} +0 -0
- package/build/{HEIGHT_GIRLS.percentile.yearly-e00c3ffd.js → HEIGHT_GIRLS.percentile.yearly-33d011e3.js} +0 -0
- package/build/{HEIGHT_GIRLS.zscore.monthly-3542327e.js → HEIGHT_GIRLS.zscore.monthly-4cd6fe77.js} +0 -0
- package/build/{HEIGHT_GIRLS.zscore.weekly-7ed52595.js → HEIGHT_GIRLS.zscore.weekly-0072a73a.js} +0 -0
- package/build/{HEIGHT_GIRLS.zscore.yearly-4bbd497c.js → HEIGHT_GIRLS.zscore.yearly-ee1372f8.js} +0 -0
- package/build/{Locale-11b51016.js → Locale-a817e0b3.js} +0 -0
- package/build/{WEIGHT_BOYS.percentile.monthly-9966bfb1.js → WEIGHT_BOYS.percentile.monthly-02f12da2.js} +0 -0
- package/build/{WEIGHT_BOYS.percentile.weekly-8b301e27.js → WEIGHT_BOYS.percentile.weekly-093b6285.js} +0 -0
- package/build/{WEIGHT_BOYS.percentile.yearly-c10eda77.js → WEIGHT_BOYS.percentile.yearly-4611aebe.js} +0 -0
- package/build/{WEIGHT_BOYS.zscore.monthly-897fca0b.js → WEIGHT_BOYS.zscore.monthly-e8e0cbbd.js} +0 -0
- package/build/{WEIGHT_BOYS.zscore.weekly-0b1faf98.js → WEIGHT_BOYS.zscore.weekly-58f4d069.js} +0 -0
- package/build/{WEIGHT_BOYS.zscore.yearly-80018532.js → WEIGHT_BOYS.zscore.yearly-32c78cd8.js} +0 -0
- package/build/{WEIGHT_GIRLS.percentile.monthly-822f3f97.js → WEIGHT_GIRLS.percentile.monthly-c5dae03a.js} +0 -0
- package/build/{WEIGHT_GIRLS.percentile.weekly-63c6a2a3.js → WEIGHT_GIRLS.percentile.weekly-e6a664ad.js} +0 -0
- package/build/{WEIGHT_GIRLS.percentile.yearly-8f44f763.js → WEIGHT_GIRLS.percentile.yearly-ba4e3120.js} +0 -0
- package/build/{WEIGHT_GIRLS.zscore.monthly-86b583c7.js → WEIGHT_GIRLS.zscore.monthly-fa683dd4.js} +0 -0
- package/build/{WEIGHT_GIRLS.zscore.weekly-29d8f232.js → WEIGHT_GIRLS.zscore.weekly-a9d44aff.js} +0 -0
- package/build/{WEIGHT_GIRLS.zscore.yearly-07eeb8b5.js → WEIGHT_GIRLS.zscore.yearly-6a6fef2b.js} +0 -0
- package/build/babyGrowth.js +1 -1
- package/build/cache.js +1 -1
- package/build/care.js +1 -1
- package/build/components/molecules/articleCard/cardAuthor.d.ts +17 -0
- package/build/components/molecules/articleCard/cardExpert.d.ts +16 -0
- package/build/components/molecules/articleCard/icons/affiliate.d.ts +2 -0
- package/build/components/molecules/articleCard/icons/bookmarked.d.ts +6 -0
- package/build/components/molecules/articleCard/icons/unbookmarked.d.ts +6 -0
- package/build/components.js +1 -1
- package/build/{constants-ca5ea110.js → constants-b4dc5a05.js} +0 -0
- package/build/constants.js +1 -1
- package/build/{cookieHelper-3553173d.js → cookieHelper-54048238.js} +0 -0
- package/build/core-e6a29d83.js +1 -0
- package/build/{dataTransform-a27830ef.js → dataTransform-0d8a1f88.js} +0 -0
- package/build/{defaultClassWrapper-0eac7dff.js → defaultClassWrapper-a222d084.js} +1 -1
- package/build/ecom.js +1 -1
- package/build/esm/{BMI_BOYS.percentile.monthly-f524741d.js → BMI_BOYS.percentile.monthly-9613fc5c.js} +0 -0
- package/build/esm/{BMI_BOYS.percentile.weekly-3e59e311.js → BMI_BOYS.percentile.weekly-0f2a9be9.js} +0 -0
- package/build/esm/{BMI_BOYS.percentile.yearly-6d8de73b.js → BMI_BOYS.percentile.yearly-a0f66dad.js} +0 -0
- package/build/esm/{BMI_BOYS.zscore.monthly-a1e3c494.js → BMI_BOYS.zscore.monthly-45590518.js} +0 -0
- package/build/esm/{BMI_BOYS.zscore.weekly-71fe0115.js → BMI_BOYS.zscore.weekly-4b7bf951.js} +0 -0
- package/build/esm/{BMI_BOYS.zscore.yearly-09f20a36.js → BMI_BOYS.zscore.yearly-e3305dc1.js} +0 -0
- package/build/esm/{BMI_GIRLS.percentile.monthly-001ea609.js → BMI_GIRLS.percentile.monthly-5832380f.js} +0 -0
- package/build/esm/{BMI_GIRLS.percentile.weekly-e48d680c.js → BMI_GIRLS.percentile.weekly-2cc558b4.js} +0 -0
- package/build/esm/{BMI_GIRLS.percentile.yearly-7df5fcbe.js → BMI_GIRLS.percentile.yearly-39ab9a50.js} +0 -0
- package/build/esm/{BMI_GIRLS.zscore.monthly-5802a837.js → BMI_GIRLS.zscore.monthly-7aa5e382.js} +0 -0
- package/build/esm/{BMI_GIRLS.zscore.weekly-82f7aa14.js → BMI_GIRLS.zscore.weekly-4ea758d9.js} +0 -0
- package/build/esm/{BMI_GIRLS.zscore.yearly-347ac14e.js → BMI_GIRLS.zscore.yearly-95662df7.js} +0 -0
- package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-dbb676b7.js → HEAD CIRCUM_BOYS.percentile.monthly-87bd0acc.js} +0 -0
- package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-92a20a1c.js → HEAD CIRCUM_BOYS.percentile.weekly-7f6e6778.js} +0 -0
- package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-284ffe85.js → HEAD CIRCUM_BOYS.percentile.yearly-3fe405d7.js} +0 -0
- package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-0518141a.js → HEAD CIRCUM_BOYS.zscore.monthly-7591e909.js} +0 -0
- package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-58c98bc3.js → HEAD CIRCUM_BOYS.zscore.weekly-6d099b56.js} +0 -0
- package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-0ab91f53.js → HEAD CIRCUM_BOYS.zscore.yearly-016dd217.js} +0 -0
- package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-47ca419d.js → HEAD CIRCUM_GIRLS.percentile.monthly-e7991ddc.js} +0 -0
- package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-0a80b339.js → HEAD CIRCUM_GIRLS.percentile.weekly-46b0f9dd.js} +0 -0
- package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-2a9af33c.js → HEAD CIRCUM_GIRLS.percentile.yearly-b760ffde.js} +0 -0
- package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-502454c8.js → HEAD CIRCUM_GIRLS.zscore.monthly-3b6345ef.js} +0 -0
- package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-81f96658.js → HEAD CIRCUM_GIRLS.zscore.weekly-0f0a3f73.js} +0 -0
- package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-d96c5d22.js → HEAD CIRCUM_GIRLS.zscore.yearly-21dfba78.js} +0 -0
- package/build/esm/{HEIGHT_BOYS.percentile.monthly-46c82cfc.js → HEIGHT_BOYS.percentile.monthly-f638ffed.js} +0 -0
- package/build/esm/{HEIGHT_BOYS.percentile.weekly-452b6591.js → HEIGHT_BOYS.percentile.weekly-43a0c3b0.js} +0 -0
- package/build/esm/{HEIGHT_BOYS.percentile.yearly-b69ee2b1.js → HEIGHT_BOYS.percentile.yearly-1921695e.js} +0 -0
- package/build/esm/{HEIGHT_BOYS.zscore.monthly-9fd9d0b9.js → HEIGHT_BOYS.zscore.monthly-318a412c.js} +0 -0
- package/build/esm/{HEIGHT_BOYS.zscore.weekly-935edd5c.js → HEIGHT_BOYS.zscore.weekly-197c21de.js} +0 -0
- package/build/esm/{HEIGHT_BOYS.zscore.yearly-1feaa056.js → HEIGHT_BOYS.zscore.yearly-38e92801.js} +0 -0
- package/build/esm/{HEIGHT_GIRLS.percentile.monthly-2954319e.js → HEIGHT_GIRLS.percentile.monthly-13ce64a2.js} +0 -0
- package/build/esm/{HEIGHT_GIRLS.percentile.weekly-575d53c8.js → HEIGHT_GIRLS.percentile.weekly-dfcc1da5.js} +0 -0
- package/build/esm/{HEIGHT_GIRLS.percentile.yearly-37b9afa9.js → HEIGHT_GIRLS.percentile.yearly-5781220e.js} +0 -0
- package/build/esm/{HEIGHT_GIRLS.zscore.monthly-eb51992f.js → HEIGHT_GIRLS.zscore.monthly-21cd4f77.js} +0 -0
- package/build/esm/{HEIGHT_GIRLS.zscore.weekly-7292924a.js → HEIGHT_GIRLS.zscore.weekly-16b9d785.js} +0 -0
- package/build/esm/{HEIGHT_GIRLS.zscore.yearly-60c98917.js → HEIGHT_GIRLS.zscore.yearly-e1fa1181.js} +0 -0
- package/build/esm/{Locale-69030fff.js → Locale-597e8a2f.js} +0 -0
- package/build/esm/{WEIGHT_BOYS.percentile.monthly-9e94fae6.js → WEIGHT_BOYS.percentile.monthly-3ded879f.js} +0 -0
- package/build/esm/{WEIGHT_BOYS.percentile.weekly-a43c4530.js → WEIGHT_BOYS.percentile.weekly-67dc9cf9.js} +0 -0
- package/build/esm/{WEIGHT_BOYS.percentile.yearly-23512fa8.js → WEIGHT_BOYS.percentile.yearly-17c9b304.js} +0 -0
- package/build/esm/{WEIGHT_BOYS.zscore.monthly-c1471d63.js → WEIGHT_BOYS.zscore.monthly-aad5e2a9.js} +0 -0
- package/build/esm/{WEIGHT_BOYS.zscore.weekly-7419ed62.js → WEIGHT_BOYS.zscore.weekly-dd4fdda8.js} +0 -0
- package/build/esm/{WEIGHT_BOYS.zscore.yearly-c9e3c050.js → WEIGHT_BOYS.zscore.yearly-2e331ddf.js} +0 -0
- package/build/esm/{WEIGHT_GIRLS.percentile.monthly-e5e8908b.js → WEIGHT_GIRLS.percentile.monthly-229f4a35.js} +0 -0
- package/build/esm/{WEIGHT_GIRLS.percentile.weekly-3942d908.js → WEIGHT_GIRLS.percentile.weekly-064496ed.js} +0 -0
- package/build/esm/{WEIGHT_GIRLS.percentile.yearly-18fa4dc9.js → WEIGHT_GIRLS.percentile.yearly-397329b9.js} +0 -0
- package/build/esm/{WEIGHT_GIRLS.zscore.monthly-9d865314.js → WEIGHT_GIRLS.zscore.monthly-09a6fc32.js} +0 -0
- package/build/esm/{WEIGHT_GIRLS.zscore.weekly-c824c3a7.js → WEIGHT_GIRLS.zscore.weekly-fe79a902.js} +0 -0
- package/build/esm/{WEIGHT_GIRLS.zscore.yearly-0409e36d.js → WEIGHT_GIRLS.zscore.yearly-71ad793d.js} +0 -0
- package/build/esm/babyGrowth.js +1 -1
- 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-a0a981fa.js → constants-8bd53831.js} +0 -0
- package/build/esm/constants.js +1 -1
- package/build/esm/{cookieHelper-8c12973e.js → cookieHelper-8dd17c53.js} +0 -0
- package/build/esm/{core-8c1d445f.js → core-6e924d14.js} +1 -1
- package/build/esm/{dataTransform-28541f72.js → dataTransform-a2d43770.js} +0 -0
- package/build/esm/defaultClassWrapper-7a9672a6.js +1 -0
- 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-8e66f8a7.js → getDynamicHealthTool-b1a08883.js} +1 -1
- package/build/esm/{getSocialList-6e11d024.js → getSocialList-4fc97f2d.js} +1 -1
- package/build/esm/hooks.js +1 -1
- package/build/esm/i18n.js +1 -1
- package/build/esm/{index-a0d0d5fa.js → index-0459d803.js} +1 -1
- package/build/esm/{index-d20231b7.js → index-06186051.js} +1 -1
- package/build/esm/{index-a1a50ff8.js → index-22818d55.js} +1 -1
- package/build/esm/{index-06b0427f.js → index-2dce20f0.js} +1 -1
- package/build/esm/index-43dc3915.js +1 -0
- package/build/esm/{index-aca74507.js → index-49f531ae.js} +1 -1
- package/build/esm/{index-71a7683a.js → index-4ba866f2.js} +1 -1
- package/build/esm/{index-bfb83ce8.js → index-613cf5d4.js} +1 -1
- package/build/esm/{index-a0e2043c.js → index-61536465.js} +1 -1
- package/build/esm/{index-20a09f62.js → index-749708a4.js} +1 -1
- package/build/esm/{index-f0ca1d99.js → index-7d79b5b8.js} +1 -1
- package/build/esm/{index-5066858f.js → index-81277185.js} +1 -1
- package/build/esm/index-bba2d823.js +1 -0
- package/build/esm/{index-bbc3936f.js → index-be749962.js} +1 -1
- package/build/esm/{index-a8d73207.js → index-c1f96447.js} +1 -1
- package/build/esm/{index-550400d7.js → index-d84bb549.js} +1 -1
- package/build/esm/{index-c2f532a6.js → index-d9eeae90.js} +1 -1
- package/build/esm/{index-e675632b.js → index-e1487bae.js} +1 -1
- package/build/esm/{index-550f04ea.js → index-ef0c076e.js} +1 -1
- package/build/esm/{index-564f6899.js → index-f62ee0af.js} +1 -1
- package/build/esm/index.css +1 -0
- package/build/esm/index.js +1 -1
- package/build/esm/{index.styled-ed780131.js → index.styled-7a561061.js} +1 -1
- package/build/esm/{isProduction-6fc0946c.js → isProduction-0f7c16f9.js} +0 -0
- package/build/esm/{lazyLoad-59e8ff6d.js → lazyLoad-97f7dbd4.js} +0 -0
- package/build/esm/lead.js +1 -1
- package/build/esm/{localizeNumberFormat-ec8c08da.js → localizeNumberFormat-33e5e811.js} +0 -0
- package/build/esm/mantine.js +1 -1
- package/build/esm/misc.js +1 -1
- package/build/esm/navigation.js +1 -1
- package/build/esm/pwg.js +1 -1
- package/build/esm/routing-405df031.js +1 -0
- package/build/esm/{screenSizeContext-ff96a3d1.js → screenSizeContext-a0192e3a.js} +1 -1
- package/build/esm/{theme-13d11d67.js → theme-4a36a09c.js} +0 -0
- package/build/esm/together.js +1 -1
- package/build/esm/{translationsContext-7cd9a0bc.js → translationsContext-c5cf6a09.js} +0 -0
- package/build/esm/{translationsProvider-d61ac730.js → translationsProvider-2857dc12.js} +1 -1
- package/build/esm/{tslib.es6-2fa94e2c.js → tslib.es6-c7fb770c.js} +0 -0
- package/build/esm/types-3685524a.js +1 -0
- package/build/esm/types-8a7ea39d.js +1 -0
- package/build/esm/{types-f57c9932.js → types-c068aafa.js} +0 -0
- package/build/esm/types.js +1 -1
- package/build/esm/{useFbDataLayer-f97c847d.js → useFbDataLayer-bb248530.js} +1 -1
- package/build/esm/useHealthToolCache-bd293ae2.js +1 -0
- package/build/esm/{useOutsideClick-6004483a.js → useOutsideClick-d2703f2e.js} +0 -0
- package/build/esm/{useScrollbarSize-99db33e1.js → useScrollbarSize-988623e5.js} +0 -0
- package/build/esm/{useTranslations-05d40ae4.js → useTranslations-e769d6fe.js} +1 -1
- package/build/esm/{utils-40d4438f.js → utils-a4496303.js} +0 -0
- package/build/footer.js +1 -1
- package/build/gAssets.js +1 -1
- package/build/{getDynamicHealthTool-5794ef69.js → getDynamicHealthTool-95168d7e.js} +1 -1
- package/build/{getSocialList-7fd6363b.js → getSocialList-a18576d6.js} +1 -1
- package/build/hooks.js +1 -1
- package/build/i18n.js +1 -1
- package/build/{index-5830eec7.js → index-01fbb796.js} +1 -1
- package/build/{index-f50d4c63.js → index-169ac707.js} +1 -1
- package/build/{index-d632029d.js → index-1a21b05f.js} +1 -1
- package/build/{index-9b944f11.js → index-4a7640b0.js} +1 -1
- package/build/{index-57503957.js → index-62bd569d.js} +1 -1
- package/build/{index-9f3366ff.js → index-8a9914ab.js} +1 -1
- package/build/{index-7d3b086d.js → index-91465581.js} +1 -1
- package/build/{index-6193a08c.js → index-950ef85a.js} +1 -1
- package/build/{index-8ddc0bb9.js → index-9c65be48.js} +1 -1
- package/build/{index-4f2fe9a1.js → index-a6aa1a98.js} +1 -1
- package/build/{index-2657dba3.js → index-b5605049.js} +1 -1
- package/build/{index-4338f5f7.js → index-bd12fd05.js} +1 -1
- package/build/{index-186b627d.js → index-ca047d53.js} +1 -1
- package/build/{index-b63d6868.js → index-cbf63898.js} +1 -1
- package/build/{index-10ede9ab.js → index-cc56ecff.js} +1 -1
- package/build/{index-1d1cfd31.js → index-db6b3891.js} +1 -1
- package/build/{index-ba9a9356.js → index-dc5e33b5.js} +1 -1
- package/build/index-dd9da438.js +1 -0
- package/build/{index-5748940b.js → index-eb5e4bd6.js} +1 -1
- package/build/{index-76dc603c.js → index-f6abdc3f.js} +1 -1
- package/build/index.css +1 -0
- package/build/index.js +1 -1
- package/build/{index.styled-5df734b4.js → index.styled-622d0725.js} +1 -1
- package/build/{isProduction-32e6a55a.js → isProduction-69fc41c0.js} +0 -0
- package/build/{lazyLoad-f5c59bb0.js → lazyLoad-76f23903.js} +0 -0
- package/build/lead/index.d.ts +1 -0
- package/build/lead.js +1 -1
- package/build/{localizeNumberFormat-155e5aec.js → localizeNumberFormat-e4a3a145.js} +0 -0
- package/build/mantine.js +1 -1
- package/build/misc.js +1 -1
- package/build/navigation.js +1 -1
- package/build/pwg.js +1 -1
- package/build/routing-9b0aa164.js +1 -0
- package/build/{screenSizeContext-00584173.js → screenSizeContext-5d49a18f.js} +1 -1
- package/build/{theme-b4bf0ca3.js → theme-ee07bb4b.js} +0 -0
- package/build/theme.scss +217 -0
- package/build/together.js +1 -1
- package/build/{translationsContext-14a025ec.js → translationsContext-8d6c61df.js} +0 -0
- package/build/{translationsProvider-4bcaa73e.js → translationsProvider-4fe7a551.js} +1 -1
- package/build/{tslib.es6-e6f346c4.js → tslib.es6-0065074f.js} +0 -0
- package/build/types-14f6f884.js +1 -0
- package/build/{types-2b3bdf79.js → types-1895ef72.js} +0 -0
- package/build/types-562dd4fc.js +1 -0
- package/build/types.js +1 -1
- package/build/{useFbDataLayer-dbcf5c0c.js → useFbDataLayer-900607af.js} +1 -1
- package/build/{useHealthToolCache-99b7a2a8.js → useHealthToolCache-38f50452.js} +1 -1
- package/build/{useOutsideClick-528bfd6c.js → useOutsideClick-c0e4fa4d.js} +0 -0
- package/build/{useScrollbarSize-586f6706.js → useScrollbarSize-f805c30e.js} +0 -0
- package/build/useTranslations-231429a4.js +1 -0
- package/build/{utils-43f2c752.js → utils-950aead5.js} +0 -0
- package/package.json +30 -9
- package/build/core-27ea44f3.js +0 -1
- package/build/esm/defaultClassWrapper-27a74473.js +0 -1
- package/build/esm/index-62c22dbe.js +0 -1
- package/build/esm/index-dee53c51.js +0 -1
- package/build/esm/routing-f5958830.js +0 -1
- package/build/esm/types-86e8c0dc.js +0 -1
- package/build/esm/types-9445055d.js +0 -1
- package/build/esm/useHealthToolCache-cfd4900b.js +0 -1
- package/build/index-5405f4a4.js +0 -1
- package/build/lead/style.d.ts +0 -2
- package/build/routing-99cb7fb3.js +0 -1
- package/build/types-20ce190d.js +0 -1
- package/build/types-961e8898.js +0 -1
- package/build/useTranslations-ef4df454.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e}from"./tslib.es6-
|
|
1
|
+
import{b as e}from"./tslib.es6-c7fb770c.js";import n from"react";import t from"styled-components";var a,i=t.label(a||(a=e(["\n &[data-size='label1'] {\n font-size: 14px;\n line-height: 22px;\n }\n &[data-size='label2'] {\n font-size: 13px;\n line-height: 19px;\n }\n"],["\n &[data-size='label1'] {\n font-size: 14px;\n line-height: 22px;\n }\n &[data-size='label2'] {\n font-size: 13px;\n line-height: 19px;\n }\n"]))),l=function(e){var t=e.children,a=e.className,l=e.style,s=e.htmlFor,o=e.size;return n.createElement(i,{"data-size":o,className:a,style:l,htmlFor:s},t)};export{l as L};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,b as t,d as i,e as o}from"./tslib.es6-2fa94e2c.js";import n,{useState as r,useEffect as a,createContext as l,useContext as s}from"react";import{S as u}from"./index-aca74507.js";import{M as d}from"./utils-40d4438f.js";import c from"styled-components";import{g as m}from"./cookieHelper-8c12973e.js";import p from"slugify";import _ from"string-format";var v,g,h={xs:28,small:32,medium:40,large:48,xl:64,xxl:80,xxxl:96},E=function(t){var i=t.type,o=void 0===i?"square":i,l=t.size,s=t.avatarImg,d=t.avatarUrl,c=t.firstLetter,m=t.backgroundColor,p=t.onClick,_=t.style,v=t.className,g=t.isAmp,E=void 0!==g&&g,T=t.width,f=t.height,b=l?h[l]:void 0,y=r(!1),A=y[0],w=y[1];a((function(){if(d){var e=document.createElement("img");e.setAttribute("src",d),e.addEventListener("error",(function(){w(!0)}))}}),[d,w]);var O=(!d&&!s||A)&&c;return n.createElement(u,{style:e(e({},_),{"--size":!E&&b?b+"px":void 0,"--width-prop":T?T+"px":void 0,"--height-prop":f?f+"px":void 0,"--background-color":m}),"data-has-max":!(!T||!f),"data-avatar-type":o,onClick:p,className:v,avatarUrl:d,"data-is-amp":E,"data-custom-size":!!l},s,d&&!A&&n.createElement("img",{src:d}),O&&c)},T=c.div(v||(v=t(["\n position: fixed;\n left: 50%;\n\n padding: 0 16px 32px;\n background-color: ",";\n border-radius: 6px;\n box-shadow: 0px 4px 8px ",";\n transform: translate(-50%, -50%);\n transition: all 0.5s ease-in-out;\n visibility: hidden;\n\n &[data-open='true'] {\n z-index: 200;\n top: 50%;\n opacity: 1;\n visibility: visible;\n }\n\n &[data-open='false'] {\n top: -50%;\n }\n\n &[data-type='lead'] {\n width: 332px;\n height: 460px;\n\n div {\n top: -15px;\n right: -15px;\n }\n }\n\n &[data-type='form'] {\n width: 496px;\n height: 548px;\n "," {\n width: 340px;\n }\n }\n\n &[data-type='confirm'] {\n "," {\n width: calc(100% - 32px);\n }\n "," {\n width: 100%;\n max-width: 407px;\n }\n }\n\n .popup-content {\n position: relative;\n z-index: 111;\n height: 100%;\n padding: 16px;\n }\n\n .close-button {\n position: absolute;\n top: 16px;\n right: 0;\n cursor: pointer;\n\n img {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n }\n }\n"],["\n position: fixed;\n left: 50%;\n\n padding: 0 16px 32px;\n background-color: ",";\n border-radius: 6px;\n box-shadow: 0px 4px 8px ",";\n transform: translate(-50%, -50%);\n transition: all 0.5s ease-in-out;\n visibility: hidden;\n\n &[data-open='true'] {\n z-index: 200;\n top: 50%;\n opacity: 1;\n visibility: visible;\n }\n\n &[data-open='false'] {\n top: -50%;\n }\n\n &[data-type='lead'] {\n width: 332px;\n height: 460px;\n\n div {\n top: -15px;\n right: -15px;\n }\n }\n\n &[data-type='form'] {\n width: 496px;\n height: 548px;\n "," {\n width: 340px;\n }\n }\n\n &[data-type='confirm'] {\n "," {\n width: calc(100% - 32px);\n }\n "," {\n width: 100%;\n max-width: 407px;\n }\n }\n\n .popup-content {\n position: relative;\n z-index: 111;\n height: 100%;\n padding: 16px;\n }\n\n .close-button {\n position: absolute;\n top: 16px;\n right: 0;\n cursor: pointer;\n\n img {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n }\n }\n"])),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.gray200}),d.mbDown,d.mbDown,d.mbUp),f=c.div(g||(g=t(["\n position: fixed;\n z-index: 110;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n align-items: center;\n background: rgba(38, 38, 38, 0.3);\n\n &[data-open='false'] {\n display: none;\n }\n"],["\n position: fixed;\n z-index: 110;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n align-items: center;\n background: rgba(38, 38, 38, 0.3);\n\n &[data-open='false'] {\n display: none;\n }\n"]))),b=function(e){var t=e.type,i=void 0===t?"lead":t,o=e.closeIcon,r=e.isOpen,a=void 0===r||r,l=e.onClose,s=e.children,u=e.className,d=void 0===u?"":u,c=e.enableAnimation,m=void 0===c||c;return n.createElement(n.Fragment,null,n.createElement(T,{"data-open":a,"data-type":i,"data-animation":m},n.createElement("div",{className:"".concat(d||""," popup-content")},!!o&&n.createElement("div",{className:"close-button",onClick:l},o),s)),n.createElement(f,{"data-open":a,onClick:l}))},y="DD/MM/YYYY",A="/images/avatar.jpg",w="/images/default-image.jpg",O={DUE_DATE:"DUE_DATE",BMI:"BMI",BMR:"BMR",OVULATION:"OVULATION",IFRAME:"IFRAME",PWG:"PWG",THR:"THR"},I={"id-ID":{"kalkulator-bmi":O.BMI,"kebutuhan-kalori":O.BMR,"kalkulator-hari-perkiraan-lahir":O.DUE_DATE,"kalkulator-masa-subur-2":O.OVULATION,"kalkulator-kenaikan-berat-badan-ibu-hamil":O.PWG,"kalkulator-detak-jantung-saat-olahraga":O.THR},"ms-MY":{"kalkulator-bmi":O.BMI,"kalkulator-bmr":O.BMR,"kalkulator-tarikh-bersalin":O.DUE_DATE,"kalkulator-kesuburan":O.OVULATION,"kalkulator-tambah-berat-badan-hamil":O.PWG,"target-heart-rate-calculator":O.THR},"vi-VN":{"cach-tinh-chi-so-bmi":O.BMI,"tinh-chi-so-bmr":O.BMR,"cong-cu-tinh-ngay-du-sinh":O.DUE_DATE,"tinh-ngay-rung-trung":O.OVULATION,"cong-cu-tinh-can-nang-khi-mang-thai":O.PWG,"cong-cu-do-nhip-tim":O.THR},"zh-TW":{"bmi-calculator":O.BMI,"bmr-calculator":O.BMR,"due-date-calculator":O.DUE_DATE,"ovulation-calculator":O.OVULATION,"pregnancy-weight-gain-calculator":O.PWG,"target-heart-rate-calculator":O.THR},"en-PH":{"bmi-calculator":O.BMI,"bmr-calculator":O.BMR,"due-date-calculator":O.DUE_DATE,"ovulation-calculator":O.OVULATION,"pregnancy-weight-gain-calculator":O.PWG,"target-heart-rate-calculator":O.THR},"th-TH":{"เครื่องคำนวณหา-ค่าดัชนี":O.BMI,"เครื่องคำนวณอัตราการเผาผลาญพลังงาน-bmr":O.BMR,"เครื่องมือคำนวณกำหนดคลอด":O.DUE_DATE,"เครื่องคำนวณการตกไข่-ovulation-calculat":O.OVULATION,"เครื่องคำนวณน้ำหนักตัว":O.PWG,"เครื่องวัดอัตราการเต้น":O.THR},"hi-IN":{"bmi-calculator-en":O.BMI,"bmi-calculator":O.BMI,"bmr-calculator":O.BMR,"delivery-date-calculator":O.DUE_DATE,"ovulation-calculator":O.OVULATION,"pregnancy-weight-gain-calculator":O.PWG,"target-heart-rate-calculator":O.THR},"km-KH":{"គណនា-bmi":O.BMI,"គណនា-bmr":O.BMR,"គណនាថ្ងៃសម្រាលកូន":O.DUE_DATE,"គណនាថ្ងៃមេជីវិតញីទុំធ្លាក់":O.OVULATION,"គណនាទម្ងន់ស្ត្រីពពោះ":O.PWG,"គណនារកចង្វាក់បេះដូងល្អ":O.THR},"my-MM":{"bmi-calculator":O.BMI,"bmr-calculator":O.BMR,"due-date-calendar":O.DUE_DATE,"ovulation-calculator":O.OVULATION,"pregnaancy-weight-calculator":O.PWG,"target-heartrate":O.THR,"pregnancy-weight-calculator":O.PWG,"target-heart-rate":O.THR}},L="hhg_user_token",S="together_admin_token",R={report_scam:{label:"morePopover.report.scam",reportReasonText:"morePopover.report.scam"},report_sex:{label:"morePopover.report.sex",reportReasonText:"morePopover.report.sex"},report_offensive:{label:"morePopover.report.offensive",reportReasonText:"morePopover.report.offensive"},report_violence:{label:"morePopover.report.violence",reportReasonText:"morePopover.report.violence"},report_prohibited:{label:"morePopover.report.prohibited",reportReasonText:"morePopover.report.prohibited"},report_spam:{label:"morePopover.report.spam",reportReasonText:"morePopover.report.spam"},report_falseNews:{label:"morePopover.report.falseNews",reportReasonText:"morePopover.report.falseNews"},report_other:{label:"morePopover.report.other",reportReasonText:"morePopover.report.other"}},k=20,P={"en-PH":{ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location"},"vi-VN":{ALL:"tat-ca",HOSPITAL:"benh-vien",SERVICE:"dich-vu",DOCTOR:"bac-si",SEARCH:"tim-kiem",SPECIALTIES:"chuyen-khoa",CURRENT:"vi-tri-hien-tai"},"id-ID":{ALL:"semua",HOSPITAL:"rumah-sakit",SERVICE:"layanan",DOCTOR:"dokter",SEARCH:"cari",SPECIALTIES:"spesialisasi",CURRENT:"posisi-saya-saat-ini"}},D=Object.freeze({__proto__:null,POST_DATE_FORMAT:"dd/MM/yyyy",NORMAL_DATE_FORMAT:"YYYY-MM-DD",DUE_DATE_FORMAT:y,DEFAULT_AVATAR_IMG:A,DEFAULT_RESULT_IMG:"/images/default.png",DEFAULT_IMG:w,BMI_LEVELS:["underweight","healthy","overweight","obese_level_1","obese_level_2"],BMR_LEVELS:["low","normal","high"],CORAL_TOKEN_COOKE:"coral_together_user_token",HEALTH_TOOL_TYPE:O,LOCALE_HEALTH_TOOLS:I,BEARER_TOKEN_COOKIE:L,TOGETHER_DISCLAIMER_COOKIE:"hhg_together_disclaimer",BEARER_ADMIN_TOKEN_COOKIE:S,Z_INDEX:{adBlock:48,articleAdContainer:47,headerContainerHome:99,headerContainerPopup:200,headerContainerPopupSUbLevel:300,menuSearchInputPopup:5,menuSearchInputDisplayIcon:6,menuSearchPopup:200},BmrActiveLevels:[{value:"sedentary",icon:"bmr-sedentary",name:"bmr.activeLevel.sedentary",description:"bmr.activeLevel.sedentary.description"},{value:"lightly-active",icon:"bmr-light",name:"bmr.activeLevel.lightlyActive",description:"bmr.activeLevel.lightlyActive.description"},{value:"moderately-active",icon:"bmr-moderately",name:"bmr.activeLevel.moderatelyActive",description:"bmr.activeLevel.moderatelyActive.description"},{value:"intensely-active",icon:"bmr-intensively",name:"bmr.activeLevel.intenselyActive",description:"bmr.activeLevel.intenselyActive.description"},{value:"extremely-active",icon:"bmr-extremely",name:"bmr.activeLevel.extremelyActive",description:"bmr.activeLevel.extremelyActive.description"}],LEAD_CAMPAIGN_CODE:"lmoct7xfr5sv4fv",LEAD_TOKEN_COOKIE:"hhg-id",GA_TOKEN_COOKIE:"_ga",GOOGLE_CALENDAR_AUTH_CLIENT_ID:"1038242799566-esoq4ij201ve5qfp266nbca44scpo3c6.apps.googleusercontent.com",FIND_CARE_IFRAME_URL:"https://www.appsheet.com/start/4ba34ebe-3cb6-4c16-8dd4-d074025a5bb6#appName=DependentDropdowns-2711103&group=%5B%5D&page=card&sort=%5B%5D&table=Menu&view=Menu",REPORT_REASON_MAP:R,MB_SOCIAL_LINKS:{LINKEDIN:"https://www.linkedin.com/company/hello-health-group/",FACEBOOK:"https://www.facebook.com/marry.baby.vn",INSTAGRAM:"https://www.instagram.com/marrybaby.vn/",TWITTER:"",YOUTUBE:"https://www.youtube.com/channel/UCeZybTkY1VzJ3N7LvPGdKbg",ZALO:"http://zalo.me/806483414530291942"},INTERNAL_ROLES:["admin","moderator","local-admin"],EXTERNAL_ROLES:["ambassador","expert","sponsor","guide","influencer"],INTERNAL_PROFILE_ROLES:["moderator","local-admin"],EXTERNAL_PROFILE_ROLES:["expert","ambassador","sponsor"],RoleDataMap:{moderator:{text:"Moderator",fid:"cardAuthor.moderator",background:"#fe921d"},admin:{text:"Admin",fid:"cardAuthor.admin",background:"#2b62cd"},"local-admin":{text:"Local admin",fid:"cardAuthor.localAdmin",background:"#2b62cd"},expert:{text:"Expert",fid:"cardAuthor.expert",background:"#ff6f4d"},sponsor:{text:"Sponsor",fid:"cardAuthor.sponsor",background:"#00c7e6"},ambassador:{text:"Ambassador",fid:"cardAuthor.ambassador",background:"#00CB8A"}},MAX_IMAGE_UPLOADS:20,LOCALISED_SLUGS:P}),x=function(e){return e?{displayName:e.display_name||null,avatar:e.avatar||null,thumbnailAvatar:e.avatar_thumbnail||null,profileUrl:e.profile_url||null,description:e.description||null,metaTag:e.meta_tag||""}:{}},C=function(e){return e?{id:e.ID||null,name:e.name||null,specialty:e.specialty||null,avatar:e.avatar||null,permalink:e.permalink||null,thumbnailAvatar:e.avatar_thumbnail||null}:{}},N=function(t){var i,o,n,r;return t?{id:t.ID,postName:t.post_name,sponsor:t.sponsor?M(t.sponsor):null,isSponsored:t.is_sponsored||null,postTitle:t.post_title||"",postModified:t.post_modified||"",postDate:t.post_date||"",modifiedTime:t.modified_time||"",permalink:t.permalink||"",featureImage:t.image||null,featureImageMobile:t.image_medium||null,featureImageMobileXs:t.image_thumbnail||null,author:x(t.author),reviewer:t.reviewed_by&&x(t.reviewed_by)||null,articleReviewed:(null==t?void 0:t.reviewed)?e(e({},null==t?void 0:t.reviewed),{author:G(null===(i=null==t?void 0:t.reviewed)||void 0===i?void 0:i.author),editor:G(null===(o=null==t?void 0:t.reviewed)||void 0===o?void 0:o.editor),expert:G(null===(n=null==t?void 0:t.reviewed)||void 0===n?void 0:n.expert),fact_check:G(null===(r=null==t?void 0:t.reviewed)||void 0===r?void 0:r.fact_check)}):null,category:B(t.category),postContent:t.post_content||null,sections:t.sections||null,categories:(t.categories||[]).map(B),sources:t.sources||null,description:t.description||null,excerpt:t.excerpt||null,expert:C(t.expert),metaTag:t.meta_tag||null}:{}},G=function(t){return void 0!==t&&t?e(e({},t),{profile_url:(null==t?void 0:t.slug)?["expert","medical"].includes((null==t?void 0:t.role)||"")?"/expert/".concat(null==t?void 0:t.slug):"/author/".concat(null==t?void 0:t.slug):t.profile_url}):null},M=function(e){return e?{title:e.title,logo:e.logo,link:e.link}:{}},U=function(e){return{postTitle:e.post_title,permalink:e.permalink}},B=function(e){var t,i;return e?{termId:e.term_id||null,sponsor:e.sponsor?M(e.sponsor):null,isSponsored:e.is_sponsored||null,categoryName:e.cat_name||null,name:e.name||null,iconUrl:e.icon||"",slugName:e.category_nicename||null,description:e.description||null,featureImage:e.image||null,displayName:e.name||null,parent:e.parent||null,permalink:e.permalink||null,slug:e.slug||null,childCates:(null===(t=e.child_cates)||void 0===t?void 0:t.map((function(e){return B(e)})))||[],colorFeatureImage:e.color_feature_image||null,imageColor:e.image_color||null,textColor:e.text_color||null,catParent:(null===(i=e.cat_parent)||void 0===i?void 0:i.name)?{name:e.cat_parent.name,permalink:e.cat_parent.permalink}:{},metaTag:e.meta_tag||"",reviewedBy:e.reviewed_by?U(e.reviewed_by):null,reviewedDate:e.reviewed_date||"",faqs:e.faqs?e.faqs.map((function(e){return H(e)})):null}:{}},H=function(e){return{title:e.title,content:e.content}},F=function(e){return e?{icon:e.icon,link:e.link.startsWith("http")?e.link:"/health-tools"+e.link,subtitle:e.subtitle,title:e.title}:{}},V=function(e){return e?{topicCount:e.topics_count||0,postCount:e.posts_count||0,memberCount:e.members_count||0,thumbnail:e.thumbnail||"",coverImage:e.cover_image||"",mobileCoverImage:e.mobile_cover_image||"",name:e.name||"",description:e.description||"",slug:e.slug||"",id:e.id||0,joined:Boolean(e.joined),isActive:null===e.is_active||void 0===e.is_active||Boolean(e.is_active),mappedCategoryId:e.mapped_category_id||0,discoverCategory:e.discover_category?{categoryId:e.discover_category.category_id||0,name:e.discover_category.name||""}:null,isHidden:Boolean(e.is_hidden)}:{}},K=function(e){var t,i,o,n;return e?{id:e.id||0,name:e.name||"",image:e.thumbnail||"",slug:e.slug||"",url:"/"+(null===(t=e.community)||void 0===t?void 0:t.slug)+"/"+(null==e?void 0:e.slug)||"",description:e.description||"",joined:e.joined||!1,postCount:e.count_posts||0,memberCount:e.count_members||0,communityId:String(null===(i=e.community)||void 0===i?void 0:i.id),communitySlug:null===(o=e.community)||void 0===o?void 0:o.slug,communityName:null===(n=e.community)||void 0===n?void 0:n.name,order:e.order||0,isActive:null===e.is_active||void 0===e.is_active||Boolean(e.is_active),mappedCategoryId:e.mapped_category_id||0,discoverCategory:e.discover_category?{categoryId:e.discover_category.category_id||0,name:e.discover_category.name||""}:null,isHidden:Boolean(e.is_hidden)}:{}},Y=function(e){var t,i,o,n,r,a,l,s,u,d,c,m,p,_,v,g,h,E,T,f,b;return e?{id:e.id,topics:(null===(t=e.topics)||void 0===t?void 0:t.map((function(t){var i,o,n,r;return{id:t.id||0,name:t.name||"",slug:t.slug||"",url:"/"+(null===(i=e.community)||void 0===i?void 0:i.slug)+"/"+t.slug,communityId:String(null===(o=e.community)||void 0===o?void 0:o.id),communitySlug:(null===(n=e.community)||void 0===n?void 0:n.slug)||"",communityName:(null===(r=e.community)||void 0===r?void 0:r.name)||"",isHidden:Boolean(t.is_hidden),isActive:!0}})))||[],community:{id:(null===(i=e.community)||void 0===i?void 0:i.id)||0,name:(null===(o=e.community)||void 0===o?void 0:o.name)||"",slug:(null===(n=e.community)||void 0===n?void 0:n.slug)||"",isActive:!0,isHidden:Boolean(null===(r=e.community)||void 0===r?void 0:r.is_hidden)},slug:e.slug||"",author:{id:(null===(a=e.user)||void 0===a?void 0:a.id)||0,username:(null===(l=e.user)||void 0===l?void 0:l.user_name)||"",email:(null===(s=e.user)||void 0===s?void 0:s.email)||"",name:(null===(u=e.user)||void 0===u?void 0:u.name)||"",avatar:(null===(d=e.user)||void 0===d?void 0:d.avatar)||"",role:(null===(c=e.user)||void 0===c?void 0:c.role)?null===(p=null===(m=e.user)||void 0===m?void 0:m.role)||void 0===p?void 0:p.toLowerCase():"",type:(null===(_=e.user)||void 0===_?void 0:_.type)||"",partnerId:(null===(v=e.user)||void 0===v?void 0:v.partner_id)?String(null===(g=e.user)||void 0===g?void 0:g.partner_id):"",title:(null===(h=e.user)||void 0===h?void 0:h.title)||"",doctorId:(null===(E=e.user)||void 0===E?void 0:E.doctor_id)?String(null===(T=e.user)||void 0===T?void 0:T.doctor_id):"",hospitalId:(null===(f=e.user)||void 0===f?void 0:f.hospital_id)?String(null===(b=e.user)||void 0===b?void 0:b.hospital_id):""},previewUrl:{title:e.preview_title||"",url:e.preview_link||"",image:e.preview_image||"",description:e.preview_description||""},createdAt:e.created_at||"",scheduleDateTime:e.schedule_datetime||"",photos:e.images||[],description:e.description||"",commentsCount:e.comments_count||0,likesCount:e.likes_count||0,title:e.name||"",isPin:!!e.is_pin,pinDate:e.pin_date||"",liked:e.liked||!1,bookmarked:Boolean(e.bookmarked)||!1,mentions:e.mentions||[],commented:Boolean(e.commented)||!1,introUrl:e.intro_url||"",bannerImage:e.banner_image||""}:{}},j=function(e){return e?{disclaimer:e.disclaimer,featuredImage:e.featured_image,info:e.info||[],reviewedBy:e.reviewed_by?{id:e.reviewed_by.ID,permalink:e.reviewed_by.permalink,name:e.reviewed_by.name,postTitle:e.reviewed_by.post_title}:null,reviewedDate:e.reviewed_date}:{}},z=function(e){var t,i,o,n,r,a,l,s,u,d,c,m,p,_,v,g,h,E,T,f,b,y,A,w,O,I,L,S,R,k,P,D;return e?{content:e.content,countLikes:e.likes_count,countReplies:e.replies_count,createdAt:e.created_at,createdTime:e.created_time,id:String(e.id),images:e.image||[],link:e.link||null,replies:e.replies&&e.replies.length>0?e.replies.map(z):[],author:{id:(null===(t=e.user)||void 0===t?void 0:t.id)||0,username:(null===(i=e.user)||void 0===i?void 0:i.user_name)||"",name:(null===(o=e.user)||void 0===o?void 0:o.name)||"",role:(null===(n=e.user)||void 0===n?void 0:n.role)?null===(a=null===(r=e.user)||void 0===r?void 0:r.role)||void 0===a?void 0:a.toLowerCase():"",avatar:(null===(l=e.user)||void 0===l?void 0:l.avatar)||"",type:(null===(s=e.user)||void 0===s?void 0:s.type)||"",email:(null===(u=e.user)||void 0===u?void 0:u.email)||"",partnerId:(null===(d=e.user)||void 0===d?void 0:d.partner_id)?String(null===(c=e.user)||void 0===c?void 0:c.partner_id):"",title:(null===(m=e.user)||void 0===m?void 0:m.title)||"",doctorId:(null===(p=e.user)||void 0===p?void 0:p.doctor_id)?String(null===(_=e.user)||void 0===_?void 0:_.doctor_id):"",hospitalId:(null===(v=e.user)||void 0===v?void 0:v.hospital_id)?String(null===(g=e.user)||void 0===g?void 0:g.hospital_id):""},liked:!!e.liked,mentionedUser:e.mentioned?{id:(null===(h=e.mentioned)||void 0===h?void 0:h.id)||0,username:(null===(E=e.mentioned)||void 0===E?void 0:E.user_name)||"",name:(null===(T=e.mentioned)||void 0===T?void 0:T.name)||"",role:(null===(f=e.mentioned)||void 0===f?void 0:f.role)?null===(y=null===(b=e.mentioned)||void 0===b?void 0:b.role)||void 0===y?void 0:y.toLowerCase():"",avatar:(null===(A=e.mentioned)||void 0===A?void 0:A.avatar)||"",type:(null===(w=e.mentioned)||void 0===w?void 0:w.type)||"",email:(null===(O=e.mentioned)||void 0===O?void 0:O.email)||"",partnerId:(null===(I=e.mentioned)||void 0===I?void 0:I.partner_id)?String(null===(L=e.mentioned)||void 0===L?void 0:L.partner_id):"",doctorId:(null===(S=e.mentioned)||void 0===S?void 0:S.doctor_id)?String(null===(R=e.mentioned)||void 0===R?void 0:R.doctor_id):"",hospitalId:(null===(k=e.mentioned)||void 0===k?void 0:k.hospital_id)?String(null===(P=e.mentioned)||void 0===P?void 0:P.hospital_id):"",title:(null===(D=e.mentioned)||void 0===D?void 0:D.title)||""}:null,mentions:e.mentions||[]}:{}},W=function(e){return void 0!==e&&e?(null==e?void 0:e.turn_off_profile)?"":(null==e?void 0:e.slug)?["expert","medical"].includes((null==e?void 0:e.role)||"")?"/expert/".concat(null==e?void 0:e.slug):"/author/".concat(null==e?void 0:e.slug):(null==e?void 0:e.profile_url)||(null==e?void 0:e.permalink)||"#":""},X=Object.freeze({__proto__:null,formatAuthor:x,formatArticleExpert:C,formatArticle:N,formatUserProfile:G,formatBMIResult:function(e){var t,i,o,n,r,a,l,s,u;return e&&e.status?{status:null==e?void 0:e.status,comparison:null!==(t=null==e?void 0:e.comparison)&&void 0!==t?t:"",assessmentData:[{tab:"tools.condition",content:null!==(i=null==e?void 0:e.condition)&&void 0!==i?i:""},{tab:"tools.risks",content:null!==(o=null==e?void 0:e.risk)&&void 0!==o?o:""},{tab:"tools.suggestion",content:null!==(n=null==e?void 0:e.suggestion)&&void 0!==n?n:""}],chartData:(null===(r=null==e?void 0:e.chart_data)||void 0===r?void 0:r.length)>0?null==e?void 0:e.chart_data:[],disclaimer:null!==(a=null==e?void 0:e.disclaimer)&&void 0!==a?a:"",illustrator:null!==(l=null==e?void 0:e.illustrator)&&void 0!==l?l:"",faqs:null!==(s=null==e?void 0:e.faqs)&&void 0!==s?s:[],suggestedArticlesLink:null!==(u=null==e?void 0:e.suggested_articles_link)&&void 0!==u?u:""}:{}},formatSponsor:M,formatReviewedCategory:U,formatCategory:B,formatCategoryApi:function(e){return e?{categoryInfo:B(e.data.category)||null,explainersPosts:(e.data.explainers_posts||[]).map(N),subCategories:(e.data.sub_categories||[]).map(B)}:{}},formatFaqsCategory:H,formatHealthTool:F,formatHealthToolTypeCategory:function(e){var t,i;return e?{termId:(null==e?void 0:e.term_id)||0,name:(null==e?void 0:e.name)||"",healthTools:null!==(i=null===(t=null==e?void 0:e.health_tools)||void 0===t?void 0:t.map((function(e){return F(e)})))&&void 0!==i?i:[]}:{}},formatCommunity:V,formatTopic:K,formatPost:Y,formatPostPagination:function(e){return e?{currentPage:e.current||0,lastPage:e.last||0,total:e.total_items||0}:{}},formatNotification:function(e){var t,i,o;return e?{time:e.created_at,content:e.content,postId:String(e.post_id),fromUser:{name:null===(t=e.from_user)||void 0===t?void 0:t.name,id:null===(i=e.from_user)||void 0===i?void 0:i.id,avatar:null===(o=e.from_user)||void 0===o?void 0:o.avatar},toUserId:String(e.to_user_id),postSlug:e.post_slug||"",communitySlug:e.community_slug||""}:{}},formatSpotlightsList:function(e){return e?e.map((function(e){return{id:e.ID,name:e.name,permalink:e.permalink,image:(null==e?void 0:e.small_banner)||(null==e?void 0:e.image),imageMedium:(null==e?void 0:e.image_medium)||null,imageThumbnail:(null==e?void 0:e.image_thumbnail)||null,startDate:null==e?void 0:e.start_date,endDate:null==e?void 0:e.end_date}})):[]},formatOvulationInfo:j,formatSuggestedArticle:function(e){return e?{postId:e.post_id||null,categoryId:e.category_id||null,postUrl:e.post_url||null,postReviewed:e.post_reviewed||null,postPageviews:e.post_pageviews||null,postRank:e.post_rank||null,isPin:e.is_pin||null,frequency:e.frequency||null,topic:e.topic||null}:{}},formatTopicHealthTool:function(e){return e?{id:e.tool_id||null,topicFrequency:e.frequency||null,topicId:e.topic_id||null,topicName:e.topic_name||null,isPinned:!!e.is_pin||null,toolLink:e.tool_link||""}:{}},formatComment:z,formatReportedPostToPostDetail:function(e){return e?{name:e.title,description:e.description,images:e.images,likes_count:e.count_likes,comments_count:e.count_comments,topics:[],slug:e.post_slug,id:e.post_id,is_pin:e.is_pin,pin_date:"",post_type:e.post_type,schedule_datetime:e.schedule_datetime,is_active:e.is_active,preview_title:e.preview_title||"",preview_image:e.preview_image||"",preview_description:e.preview_description||"",preview_link:e.preview_link||"",user:e.user,created_at:"",created_time:"",community:{id:e.community_id,name:e.community_name,slug:e.community_slug,description:""}}:{}},formatTopicSubot:function(e){return e?{chatBotId:e.subot_id,isPinned:e.is_pin,topicId:e.topic_id,topicFrequency:e.frequency}:{}},formatSiteWideBanner:function(e,t){return void 0!==e&&e?{content:(null==e?void 0:e.content)||"",icon:(null==e?void 0:e.icon)||"",type:t||"other"}:null},formatPWGContent:function(e){return e?{disclaimer:e.disclaimer,info:e.info||[],reviewedBy:e.reviewed_by?G(e.reviewed_by):null,reviewedDate:e.reviewed_date,metaTag:e.meta_tag}:{}},formatUserProfileUrl:W,formatTHRContent:function(e){return e?{disclaimer:e.disclaimer,info:e.info||[],reviewedBy:e.reviewed_by?G(e.reviewed_by):null,reviewedDate:e.reviewed_date,metaTag:e.meta_tag}:{}},formatBabyGrowthContent:function(e){var t,i,o;return e&&e.information?{information:null!==(t=e.information.map((function(e){return{title:e.title,description:e.description}})))&&void 0!==t?t:[],reviewBy:{reviewer:(null===(i=e.reviewed_by)||void 0===i?void 0:i.display_name)||(null===(o=e.reviewed_by)||void 0===o?void 0:o.name)||"",date:e.reviewed_date||"",link:W(null==e?void 0:e.reviewed_by)},metaTag:e.meta_tag||"",title:e.title||"",description:e.description||"",disclaimer:e.disclaimer||"",is_sponsored:e.is_sponsored||!1,sponsor:e.sponsor,featuredImage:e.featured_image||""}:{}}}),q={BASE_API_PATH:"/",PROFILE:"profile?website_url={website_url}",SEARCH_USER:"profile/search?website_url={website_url}&name={name}",FETCH_PREVIEW:"fetch/preview?website_url={website_url}",FETCH_POST_OR_TOPIC:"fetch/{slug}?website_url={website_url}&community_slug={communitySlug}",POST:{LIST:"post?website_url={website_url}&slug={slug}&pin={pin}&page={page}&community_id={communityId}&topic_id={topicId}&sort_by={sort}&id={id}",DETAIL_BY_ID_OR_SLUG:"post/{idSlug}?website_url={website_url}",CREATE:"post/create?website_url={website_url}",LIKE:"post/{id}/like?website_url={website_url}",DELETE:"post/{id}/delete?website_url={website_url}",REPORT:"post/{id}/report?website_url={website_url}",UPDATE:"post/{id}/update?website_url={website_url}",FOLLOW:"post/{id}/follow?website_url={website_url}",CREATE_ARTICLE_COMMENT:"article-comment/create?website_url={website_url}"},COMMENT:{LIST:"comment?website_url={website_url}&post_id={postId}&page={page}&sort_by={sort}&items_per_page={perPage}&_without_reply={withoutReply}",CREATE:"comment/create?website_url={website_url}",REPLY:"comment/reply?website_url={website_url}",DELETE:"comment/{id}/delete?website_url={website_url}",LIKE:"comment/{id}/like?website_url={website_url}",UNLIKE:"comment/{id}/unlike?website_url={website_url}",IMAGE_UPLOAD:"comment/image/upload?website_url={website_url}"},COMMUNITY:{LIST:"community?website_url={website_url}&page={page}",DETAIL_BY_ID_OR_SLUG:"community/{idSlug}?website_url={website_url}",JOIN:"community/join?website_url={website_url}",LEAVE:"community/leave?website_url={website_url}"},TOPIC:{LIST:"topic?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}&page={page}",DETAIL_BY_ID_OR_SLUG:"topic/{idSlug}?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}",HEALTH_TOOLS:"tools?topic_id={topicId}&website_url={website_url}",SUBOTS:"subots?topic_id={topicId}&website_url={website_url}",SUGGESTED_POSTS:"suggested-posts?topic_id={topicId}&website_url={website_url}&page={page}",JOIN:"topic/join?website_url={website_url}",LEAVE:"topic/leave?website_url={website_url}"},BOOKMARK:{LIST:"bookmark?user_id={userId}&website_url={website_url}",CREATE:"bookmark/create?website_url={website_url}",DELETE:"bookmark/delete?website_url={website_url}"},UPLOAD_IMAGE:"auth/comment/image/upload?website_url={website_url}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info"},$={GET_DOCTOR_INFO:"api/doctors/{doctorId}?site={website_url}",GET_HOSPITAL_INFO:"api/hospital/branch/{hospital_branch_id}?site={website_url}"},J={BASE_API_PATH:"/",GET_SEARCH_ARTICLES:"search?s={keyword}&page={page}",GET_ALL_CATEGORIES:"categories?type=all",GET_HOMEPAGE_POSTS:"home/trending-post?type={type}",GET_HOMEPAGE_LATEST_POSTS:"articles?page=1&_islatest=1",GET_ARTICLE_DETAIL:"article/{slug}?skip_ids={skipIds}&_isrelated={isRelated}",GET_CATEGORY_DETAIL:"category/{slug}",GET_CATEGORY_OR_ARTICLE_DETAIL:"fetch/{fullSlug}",GET_PREVIEW_ARTICLE:"fetch/{fullSlug}?preview_nonce={nonce}&preview=true",GET_ARTICLE_OF_CATEGORY:"articles?category_id={categoryId}&page={currentPage}",GET_PAGE_STATIC:"page/{slug}",GET_ALL_HEALTH_TOOLS:"healthtools",GET_ALL_MARRYBABY_HEALTH_TOOLS:"health-tools",GET_HEALTH_TOOLS_BY_CATEGORY:"healthtools?_hasgroup=1",GET_AUTHOR:"author/{slug}",GET_ALL_EXPERTS:"experts",GET_ALL_EXPERTS_PAGING:"experts?page={page}",GET_EXPERT:"expert/{slug}",GET_EXPERT_POST:"expert/article?page={page}",POST_ARTICLE_FEEDBACK:"article/feedback/{id}",GET_AZ_DRUGS:"category/a-z/{category}",GET_HOMEPAGE_MEDICAL_REVIEWED:"home/medical-reviewed",GET_ARTICLES_BY_IDS:"articles?ids={ids}",GET_ARTICLE_OF_CATEGORY_NO_EXPLAINERS:"articles?category_id={categoryId}&page={currentPage}&skip_ids={ids}",GET_EXPERT_OF_CATEGORY:"category/expert/?id={id}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info",GET_DUE_DATE_ALL_WEEKS:"health-tools/due-date-calculator/all",GET_DUE_DATE_SUGGESTED_ARTICLES:"health-tools/due-date-calculator/result?from_week={from}&to_week={to}",GET_PROFILE:"user/profile",GET_ADMIN_PROFILE:"GET_ADMIN_PROFILE",GET_FEATURE:"feature",POST_NEW_FEATURE:"feature/update",CREATE_BOOKMARK:"bookmark/create",DELETE_BOOKMARK:"bookmark/delete",DELETE_ALL_BOOKMARK:"bookmark/delete-all",GET_ALL_BOOKMARK:"bookmark",SSO_USER_PROFILE:"user",SSO_USER_BOOKMARKS:"user/bookmarks",SSO_USER_PASSWORD:"user/settings/password",SSO_USER_EMAIL:"user/settings/update-email",SSO_CLOSE_ACCOUNT:"user/settings/close-account",SSO_HELP:"user/settings/help",GET_HEALTH_TOOL_OVULATION_INFO:"health-tools/ovulation-calculator/info",GET_HEALTH_TOOL_OVULATION_SUGGESTED_ARTICLES:"health-tools/ovulation-calculator/result?method={method}",GET_HEALTH_TOOL_BMI_INFO:"health-tools/bmi-calculator/info",GET_HEALTH_TOOL_BMI_RESULT:"health-tools/bmi-calculator/result?gender={gender}&bmi={bmi}&age={age}",GET_HEALTH_TOOL_BMR_INFO:"health-tools/bmr-calculator/info",GET_HEALTH_TOOL_BMR_RESULT:"health-tools/bmr-calculator/result?kcals={kcals}&gender={gender}&age={age}",GET_HEALTH_TOOL_PWG_INFO:"health-tools/preweight-gain-calculator/info",GET_HEALTH_TOOL_THR_INFO:"health-tools/target-heart-rate/info",GET_HEALTH_TOOL_BABY_GROWTH_INFO:"health-tools/baby-growth-tracking/info",POST_UPDATE_LOCATION:"tracking/geo/",GET_SIDIS_DUE_DATE:"frontend/tools/due_date",GET_SIDIS_OVULATION:"frontend/tools/ovulation",GET_SIDIS_BMI:"frontend/tools/bmi",GET_SIDIS_BMR:"frontend/tools/bmr",POST_LOGOUT:"user/logout",OVULATION_CREATE_EVENT:"ovulation/event?method={method}&day={day}&cycle={cycle}&period={period}&token={token}&user_id={user_id}",GET_ALL_SPOTLIGHT:"spotlights?per_page={perPage}&order_by={orderBy}",SSO_UPDATE_FIRST_TIME_BOOKMARK:"bookmark/update-first-time",POST_COMMENT_NOTIFICATION:"comment/notification",GET_ABOUT_US_DATA:"about",POST_LEAD_IMPRESSION:"campaign/{campaignCode}/impression",POST_LEAD_POPUP_EXIT:"campaign/{campaignCode}/popup_exit",POST_LEAD_LEAD:"campaign/{campaignCode}/lead",POST_SSO_VERIFY_TOKEN:"verify-id-token",GET_LANDING_PAGE_FIRST_NODE:"landing_page/bot",GET_LANDING_PAGE_NEXT_NODE:"landing_page/messages",POST_LANDING_PAGE_IMPRESSION:"landing_page/impressions",POST_LANDING_PAGE_CLICK:"landing_page/clicks",FETCH_URL_DATA:"preview",GET_SPOTLIGHT_LANDING:"spotlight/{slug}",GET_FOOTER_INFO:"footer",CHECK_SSO_EMAIL:"member/check-email",GET_HOMEPAGE_SITEWIDE_BANNER:"home/sitewide-banner",GET_DYNAMIC_FOOTER:"menu/footer",GET_EXPERTS:"experts?page={page}&number={perPage}&s={search}",GET_EXPERT_BY_ID:"expert/{id}"},Z={SEARCH_USER:"admin/profile/search?website_url={website_url}&name={name}",COMMENT:{IMAGE_UPLOAD:"admin/comment/image/upload?website_url={website_url}"}},Q=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");var i={},o=(t||{}).decode||oe,n=0;for(;n<e.length;){var r=e.indexOf("=",n);if(-1===r)break;var a=e.indexOf(";",n);if(-1===a)a=e.length;else if(a<r){n=e.lastIndexOf(";",r-1)+1;continue}var l=e.slice(n,r).trim();if(void 0===i[l]){var s=e.slice(r+1,a).trim();34===s.charCodeAt(0)&&(s=s.slice(1,-1)),i[l]=re(s,o)}n=a+1}return i},ee=function(e,t,i){var o=i||{},n=o.encode||ne;if("function"!=typeof n)throw new TypeError("option encode is invalid");if(!ie.test(e))throw new TypeError("argument name is invalid");var r=n(t);if(r&&!ie.test(r))throw new TypeError("argument val is invalid");var a=e+"="+r;if(null!=o.maxAge){var l=o.maxAge-0;if(isNaN(l)||!isFinite(l))throw new TypeError("option maxAge is invalid");a+="; Max-Age="+Math.floor(l)}if(o.domain){if(!ie.test(o.domain))throw new TypeError("option domain is invalid");a+="; Domain="+o.domain}if(o.path){if(!ie.test(o.path))throw new TypeError("option path is invalid");a+="; Path="+o.path}if(o.expires){var s=o.expires;if(!function(e){return"[object Date]"===te.call(e)||e instanceof Date}(s)||isNaN(s.valueOf()))throw new TypeError("option expires is invalid");a+="; Expires="+s.toUTCString()}o.httpOnly&&(a+="; HttpOnly");o.secure&&(a+="; Secure");if(o.priority){switch("string"==typeof o.priority?o.priority.toLowerCase():o.priority){case"low":a+="; Priority=Low";break;case"medium":a+="; Priority=Medium";break;case"high":a+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(o.sameSite){switch("string"==typeof o.sameSite?o.sameSite.toLowerCase():o.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return a},te=Object.prototype.toString,ie=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function oe(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function ne(e){return encodeURIComponent(e)}function re(e,t){try{return t(e)}catch(t){return e}}var ae={parse:Q,serialize:ee},le={"vi-VN":"hellobacsi.com","id-ID":"hellosehat.com","ms-MY":"hellodoktor.com","km-KH":"hellokrupet.com","en-PH":"hellodoctor.com.ph","th-TH":"hellokhunmor.com","my-MM":"hellosayarwon.com","zh-TW":"helloyishi.com.tw","hi-IN":"helloswasthya.com"},se={"vi-VN":"marrybaby.vn"},ue=process.env.NEXT_PUBLIC_DEPLOY_LOCALE||"vi-VN",de=function(e){var t=Re.env.isMarryBaby;return"https://".concat(t?se[e]:le[e])},ce=function(e){var t=e.indexOf("?");return t>=0?e.slice(0,t+1)+e.slice(t+1).replace(/[^=&]+=(&|$)/g,"").replace(/&$/,""):e},me=function(e){var t=Re.env.isMarryBaby;if("undefined"!=typeof window)return window.location.origin;var i="staging"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return"development"===process.env.NEXT_PUBLIC_DEPLOY_ENV?"http://localhost:3000":"https://".concat(i?t?"fe.":"discover.":t?"www.":"").concat(le[e])},pe=function(t,i,o){var n="";o&&(n=Object.keys(o).map((function(e){return e+"="+o[e]})).join("&"));var r=((null==Re?void 0:Re.env)||{}).togetherBaseApiUrl,a=void 0===r?"":r,l=_(t,e(e({},(null==i?void 0:i._locale)?{website_url:de(String(i._locale))}:{}),i));return l+="".concat(l.includes("?")?"&":"?").concat(n),a+"api/v1/"+ce(l)},_e=function(t,i){var o=((null==Re?void 0:Re.env)||{}).discoverBaseApiUrl;return(void 0===o?"":o)+"wp-json/api/"+ce(_(t,e({},i)))},ve=function(t,i){var o=((null==Re?void 0:Re.env)||{}).careBaseApiUrl;return((void 0===o?"":o)||"https://service-health-care.hellohealthgroup.com/")+ce(_(t,e({},i)))},ge=function(e){return(null==e?void 0:e.data)&&(e.data instanceof FormData?e.body=e.data:"object"==typeof e.data&&(e.body=JSON.stringify(e.data)),delete e.data),e},he=function(t,n,r,a){return void 0===a&&(a=!1),i(void 0,void 0,void 0,(function(){var i,l,s,u,d;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,fetch(a?t:(c=t,encodeURI(c).replace(/%5B/g,"[").replace(/%5D/g,"]")),e(e({method:n},ge(r)),{headers:e({},null==r?void 0:r.headers)})).then((function(e){return e.json()}))];case 1:return(i=o.sent())?[2,i]:[3,3];case 2:return l=o.sent(),console.log(l),console.log({url:t,status:null===(s=null==l?void 0:l.response)||void 0===s?void 0:s.status,statusText:null===(u=null==l?void 0:l.response)||void 0===u?void 0:u.statusText}),[2,(null===(d=null==l?void 0:l.response)||void 0===d?void 0:d.data)||null];case 3:return[2,null]}var c}))}))},Ee=function(t,n,r,a){return void 0===n&&(n="GET"),i(void 0,void 0,void 0,(function(){var i,l,s,u,d,c,p,_,v,g,h,E,T,f;return o(this,(function(o){switch(o.label){case 0:if(o.trys.push([0,7,,8]),i="string"==typeof t?t:t.url,l="string"==typeof t?t:t.backupUrl,s=ae.parse(a||""),u=s[L],!(d=u||m(L))||!d.length)return[3,5];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,fetch(i,e(e({method:n},ge(r)),{headers:e({Authorization:"Bearer "+d},null==r?void 0:r.headers)})).then((function(e){return e.json()}))];case 2:return c=o.sent(),(null===(v=null==c?void 0:c.messages)||void 0===v?void 0:v.find((function(e){return"Unauthenticated"===(null==e?void 0:e.toLowerCase())})))?[2,he(l||i,n,r)]:c?[2,c]:[3,4];case 3:return p=o.sent(),console.log({status:null===(g=null==p?void 0:p.response)||void 0===g?void 0:g.status,statusText:null===(h=null==p?void 0:p.response)||void 0===h?void 0:h.statusText}),[2,he(l||i,n,r)];case 4:return[3,6];case 5:return[2,he(l||i,n,r)];case 6:return[3,8];case 7:return _=o.sent(),console.log({status:null===(E=null==_?void 0:_.response)||void 0===E?void 0:E.status,statusText:null===(T=null==_?void 0:_.response)||void 0===T?void 0:T.statusText}),[2,(null===(f=null==_?void 0:_.response)||void 0===f?void 0:f.data)||null];case 8:return[2,null]}}))}))},Te=function(t,n,r,a){return i(void 0,void 0,void 0,(function(){var i,l,s,u;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),i=ae.parse(a||""),l=i[L],(s=l||m(L))&&s.length?[4,fetch(t,e(e({method:n},ge(r)),{headers:e({Authorization:"Bearer "+s},null==r?void 0:r.headers)})).then((function(e){return e.json()}))]:[3,2];case 1:if(u=o.sent())return[2,u];o.label=2;case 2:return[3,4];case 3:return o.sent(),[2,null];case 4:return[2,null]}}))}))},fe=function(t,n,r,a){return i(void 0,void 0,void 0,(function(){var i,l,s,u;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),i=ae.parse(a||""),l=i[S],(s=l||m(S))&&s.length?[4,fetch(t,e(e({method:n},ge(r)),{headers:e({Authorization:"Bearer "+s},null==r?void 0:r.headers)})).then((function(e){return e.json()}))]:[3,2];case 1:if(u=o.sent())return[2,u];o.label=2;case 2:return[3,4];case 3:return o.sent(),[2,null];case 4:return[2,null]}}))}))};function be(e,t,i){var o=new RegExp("([?&])"+t+"=.*?(&|$)","i"),n=-1!==e.indexOf("?")?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+i+"$2"):e+n+t+"="+i}var ye,Ae=function(e,t,i){void 0===i&&(i="/community");var o=e||("undefined"!=typeof window?window.location.href:"/"),n="undefined"!=typeof window?window.location.origin:"";return n||e&&(e.startsWith("http://")||e.startsWith("https://"))&&(n=e.split("/").slice(0,3).join("/")),function(e,t){var i=Re.env.publicSSO,o=e||window.location.href;return t&&Object.keys(t).map((function(e){be(o,e,t[e])})),be(o,"source","communities"),i?"".concat(i,"?returnUrl=").concat(encodeURIComponent(o.toString())):o}("".concat(n).concat(i,"/on-boarding?return=").concat(encodeURIComponent(o)),t)},we=function(e,t,i,o){return i&&t?"".concat(i,"-").concat(t):"".concat(p(e||"",{lower:!0,locale:o||ue}),"-").concat(t)},Oe=function(e){var t,i=e.name,o=e.id,n=e.locale;return"/care/".concat(null===(t=P[n||"vi-VN"])||void 0===t?void 0:t.DOCTOR,"/").concat(we(i,o))},Ie=function(e){var t,i=e.name,o=e.id,n=e.slug,r=e.locale;return"/care/".concat(null===(t=P[r||"vi-VN"])||void 0===t?void 0:t.HOSPITAL,"/").concat(we(i,o,n))},Le={locale:"vi-VN",env:{isMarryBaby:!1,togetherBasePath:"/community"},router:{basePath:"",asPath:"/"}},Se=l({data:Le,action:{pushNotifications:function(e){return e},sanitizeFunction:function(e){return e}}}),Re=Le,ke=function(e){var t=e.locale,i=void 0===t?"vi-VN":t,o=e.children,l=e.userInfo,s=e.router,u=e.env,d=void 0===u?{isMarryBaby:!1,togetherBasePath:"/community"}:u,c=e.sanitizeFunction,m=void 0===c?function(e){return e}:c,p=e.pushNotifications,_=void 0===p?function(){return!1}:p,v=r(),g=v[0],h=v[1];return Re={userInfo:l,locale:i,togetherUserId:g,router:s,env:d},a((function(){(null==l?void 0:l.id)&&Te(pe(q.PROFILE,{_locale:i}),"GET").then((function(e){var t;h(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)}))}),[null==l?void 0:l.id]),n.createElement(Se.Provider,{value:{data:{userInfo:l,locale:i,togetherUserId:g,router:s,env:d},action:{pushNotifications:_,sanitizeFunction:m}}},o)},Pe=c.div(ye||(ye=t(["\n width: 40px;\n height: 40px;\n flex-shrink: 0;\n cursor: pointer;\n font-size: 20px;\n\n img {\n border-radius: 50%;\n }\n\n .avatar {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n .avatar-default {\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ",";\n border-radius: 50%;\n color: white;\n font-size: 1em;\n font-weight: bold;\n line-height: 1;\n }\n\n &[data-is-marrybaby='true'] {\n .avatar-default {\n background-color: ",";\n }\n }\n"],["\n width: 40px;\n height: 40px;\n flex-shrink: 0;\n cursor: pointer;\n font-size: 20px;\n\n img {\n border-radius: 50%;\n }\n\n .avatar {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n .avatar-default {\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ",";\n border-radius: 50%;\n color: white;\n font-size: 1em;\n font-weight: bold;\n line-height: 1;\n }\n\n &[data-is-marrybaby='true'] {\n .avatar-default {\n background-color: ",";\n }\n }\n"])),(function(e){return e.theme.colors.secondaryBase}),(function(e){return e.theme.mbColors.pink})),De=function(e){var t=e.className,i=e.isMarryBaby,o=e.style,l=e.avatar,u=e.username,d=e.isLazy,c=s(Se).data.env.isMarryBaby,m="boolean"==typeof i?i:c,p=r(!1),_=p[0],v=p[1];return a((function(){var e=new Image;e.onerror=function(){v(!0)},e.src=l}),[]),n.createElement(Pe,{"data-is-marrybaby":m,className:t,style:o},l&&!_?n.createElement("img",{src:d?void 0:l,"data-src":d?l:void 0,className:"avatar ".concat(d?"lazy":""),alt:"avatar",onError:function(){v(!0)}}):n.createElement("div",{className:"avatar avatar-default"},u&&(null==u?void 0:u.length)>0?u[0].toUpperCase():"A"))};export{E as A,L as B,$ as C,Le as D,Ee as E,Re as G,O as H,k as M,b as P,R,Se as T,De as U,ke as a,y as b,D as c,X as d,j as e,W as f,V as g,Y as h,Ae as i,w as j,he as k,pe as l,q as m,me as n,ve as o,le as p,Ie as q,Oe as r,_e as s,J as t,Z as u,fe as v,Te as w,K as x,A as y,z};
|
|
1
|
+
import{_ as e,b as t,d as i,e as o}from"./tslib.es6-c7fb770c.js";import n,{useState as r,useEffect as a,createContext as l,useContext as s}from"react";import{S as u}from"./index-49f531ae.js";import{M as d}from"./utils-a4496303.js";import c from"styled-components";import{g as m}from"./cookieHelper-8dd17c53.js";import p from"slugify";import _ from"string-format";var v,g,h={xs:28,small:32,medium:40,large:48,xl:64,xxl:80,xxxl:96},E=function(t){var i=t.type,o=void 0===i?"square":i,l=t.size,s=t.avatarImg,d=t.avatarUrl,c=t.firstLetter,m=t.backgroundColor,p=t.onClick,_=t.style,v=t.className,g=t.isAmp,E=void 0!==g&&g,T=t.width,f=t.height,b=l?h[l]:void 0,y=r(!1),A=y[0],w=y[1];a((function(){if(d){var e=document.createElement("img");e.setAttribute("src",d),e.addEventListener("error",(function(){w(!0)}))}}),[d,w]);var O=(!d&&!s||A)&&c;return n.createElement(u,{style:e(e({},_),{"--size":!E&&b?b+"px":void 0,"--width-prop":T?T+"px":void 0,"--height-prop":f?f+"px":void 0,"--background-color":m}),"data-has-max":!(!T||!f),"data-avatar-type":o,onClick:p,className:v,avatarUrl:d,"data-is-amp":E,"data-custom-size":!!l},s,d&&!A&&n.createElement("img",{src:d}),O&&c)},T=c.div(v||(v=t(["\n position: fixed;\n left: 50%;\n\n padding: 0 16px 32px;\n background-color: ",";\n border-radius: 6px;\n box-shadow: 0px 4px 8px ",";\n transform: translate(-50%, -50%);\n transition: all 0.5s ease-in-out;\n visibility: hidden;\n\n &[data-open='true'] {\n z-index: 200;\n top: 50%;\n opacity: 1;\n visibility: visible;\n }\n\n &[data-open='false'] {\n top: -50%;\n }\n\n &[data-type='lead'] {\n width: 332px;\n height: 460px;\n\n div {\n top: -15px;\n right: -15px;\n }\n }\n\n &[data-type='form'] {\n width: 496px;\n height: 548px;\n "," {\n width: 340px;\n }\n }\n\n &[data-type='confirm'] {\n "," {\n width: calc(100% - 32px);\n }\n "," {\n width: 100%;\n max-width: 407px;\n }\n }\n\n .popup-content {\n position: relative;\n z-index: 111;\n height: 100%;\n padding: 16px;\n }\n\n .close-button {\n position: absolute;\n top: 16px;\n right: 0;\n cursor: pointer;\n\n img {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n }\n }\n"],["\n position: fixed;\n left: 50%;\n\n padding: 0 16px 32px;\n background-color: ",";\n border-radius: 6px;\n box-shadow: 0px 4px 8px ",";\n transform: translate(-50%, -50%);\n transition: all 0.5s ease-in-out;\n visibility: hidden;\n\n &[data-open='true'] {\n z-index: 200;\n top: 50%;\n opacity: 1;\n visibility: visible;\n }\n\n &[data-open='false'] {\n top: -50%;\n }\n\n &[data-type='lead'] {\n width: 332px;\n height: 460px;\n\n div {\n top: -15px;\n right: -15px;\n }\n }\n\n &[data-type='form'] {\n width: 496px;\n height: 548px;\n "," {\n width: 340px;\n }\n }\n\n &[data-type='confirm'] {\n "," {\n width: calc(100% - 32px);\n }\n "," {\n width: 100%;\n max-width: 407px;\n }\n }\n\n .popup-content {\n position: relative;\n z-index: 111;\n height: 100%;\n padding: 16px;\n }\n\n .close-button {\n position: absolute;\n top: 16px;\n right: 0;\n cursor: pointer;\n\n img {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n }\n }\n"])),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.gray200}),d.mbDown,d.mbDown,d.mbUp),f=c.div(g||(g=t(["\n position: fixed;\n z-index: 110;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n align-items: center;\n background: rgba(38, 38, 38, 0.3);\n\n &[data-open='false'] {\n display: none;\n }\n"],["\n position: fixed;\n z-index: 110;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n align-items: center;\n background: rgba(38, 38, 38, 0.3);\n\n &[data-open='false'] {\n display: none;\n }\n"]))),b=function(e){var t=e.type,i=void 0===t?"lead":t,o=e.closeIcon,r=e.isOpen,a=void 0===r||r,l=e.onClose,s=e.children,u=e.className,d=void 0===u?"":u,c=e.enableAnimation,m=void 0===c||c;return n.createElement(n.Fragment,null,n.createElement(T,{"data-open":a,"data-type":i,"data-animation":m},n.createElement("div",{className:"".concat(d||""," popup-content")},!!o&&n.createElement("div",{className:"close-button",onClick:l},o),s)),n.createElement(f,{"data-open":a,onClick:l}))},y="DD/MM/YYYY",A="/images/avatar.jpg",w="/images/default-image.jpg",O={DUE_DATE:"DUE_DATE",BMI:"BMI",BMR:"BMR",OVULATION:"OVULATION",IFRAME:"IFRAME",PWG:"PWG",THR:"THR"},I={"id-ID":{"kalkulator-bmi":O.BMI,"kebutuhan-kalori":O.BMR,"kalkulator-hari-perkiraan-lahir":O.DUE_DATE,"kalkulator-masa-subur-2":O.OVULATION,"kalkulator-kenaikan-berat-badan-ibu-hamil":O.PWG,"kalkulator-detak-jantung-saat-olahraga":O.THR},"ms-MY":{"kalkulator-bmi":O.BMI,"kalkulator-bmr":O.BMR,"kalkulator-tarikh-bersalin":O.DUE_DATE,"kalkulator-kesuburan":O.OVULATION,"kalkulator-tambah-berat-badan-hamil":O.PWG,"target-heart-rate-calculator":O.THR},"vi-VN":{"cach-tinh-chi-so-bmi":O.BMI,"tinh-chi-so-bmr":O.BMR,"cong-cu-tinh-ngay-du-sinh":O.DUE_DATE,"tinh-ngay-rung-trung":O.OVULATION,"cong-cu-tinh-can-nang-khi-mang-thai":O.PWG,"cong-cu-do-nhip-tim":O.THR},"zh-TW":{"bmi-calculator":O.BMI,"bmr-calculator":O.BMR,"due-date-calculator":O.DUE_DATE,"ovulation-calculator":O.OVULATION,"pregnancy-weight-gain-calculator":O.PWG,"target-heart-rate-calculator":O.THR},"en-PH":{"bmi-calculator":O.BMI,"bmr-calculator":O.BMR,"due-date-calculator":O.DUE_DATE,"ovulation-calculator":O.OVULATION,"pregnancy-weight-gain-calculator":O.PWG,"target-heart-rate-calculator":O.THR},"th-TH":{"เครื่องคำนวณหา-ค่าดัชนี":O.BMI,"เครื่องคำนวณอัตราการเผาผลาญพลังงาน-bmr":O.BMR,"เครื่องมือคำนวณกำหนดคลอด":O.DUE_DATE,"เครื่องคำนวณการตกไข่-ovulation-calculat":O.OVULATION,"เครื่องคำนวณน้ำหนักตัว":O.PWG,"เครื่องวัดอัตราการเต้น":O.THR},"hi-IN":{"bmi-calculator-en":O.BMI,"bmi-calculator":O.BMI,"bmr-calculator":O.BMR,"delivery-date-calculator":O.DUE_DATE,"ovulation-calculator":O.OVULATION,"pregnancy-weight-gain-calculator":O.PWG,"target-heart-rate-calculator":O.THR},"km-KH":{"គណនា-bmi":O.BMI,"គណនា-bmr":O.BMR,"គណនាថ្ងៃសម្រាលកូន":O.DUE_DATE,"គណនាថ្ងៃមេជីវិតញីទុំធ្លាក់":O.OVULATION,"គណនាទម្ងន់ស្ត្រីពពោះ":O.PWG,"គណនារកចង្វាក់បេះដូងល្អ":O.THR},"my-MM":{"bmi-calculator":O.BMI,"bmr-calculator":O.BMR,"due-date-calendar":O.DUE_DATE,"ovulation-calculator":O.OVULATION,"pregnaancy-weight-calculator":O.PWG,"target-heartrate":O.THR,"pregnancy-weight-calculator":O.PWG,"target-heart-rate":O.THR}},L="hhg_user_token",S="together_admin_token",R={report_scam:{label:"morePopover.report.scam",reportReasonText:"morePopover.report.scam"},report_sex:{label:"morePopover.report.sex",reportReasonText:"morePopover.report.sex"},report_offensive:{label:"morePopover.report.offensive",reportReasonText:"morePopover.report.offensive"},report_violence:{label:"morePopover.report.violence",reportReasonText:"morePopover.report.violence"},report_prohibited:{label:"morePopover.report.prohibited",reportReasonText:"morePopover.report.prohibited"},report_spam:{label:"morePopover.report.spam",reportReasonText:"morePopover.report.spam"},report_falseNews:{label:"morePopover.report.falseNews",reportReasonText:"morePopover.report.falseNews"},report_other:{label:"morePopover.report.other",reportReasonText:"morePopover.report.other"}},k=20,P={"en-PH":{ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location"},"vi-VN":{ALL:"tat-ca",HOSPITAL:"benh-vien",SERVICE:"dich-vu",DOCTOR:"bac-si",SEARCH:"tim-kiem",SPECIALTIES:"chuyen-khoa",CURRENT:"vi-tri-hien-tai"},"id-ID":{ALL:"semua",HOSPITAL:"rumah-sakit",SERVICE:"layanan",DOCTOR:"dokter",SEARCH:"cari",SPECIALTIES:"spesialisasi",CURRENT:"posisi-saya-saat-ini"}},D=Object.freeze({__proto__:null,POST_DATE_FORMAT:"dd/MM/yyyy",NORMAL_DATE_FORMAT:"YYYY-MM-DD",DUE_DATE_FORMAT:y,DEFAULT_AVATAR_IMG:A,DEFAULT_RESULT_IMG:"/images/default.png",DEFAULT_IMG:w,BMI_LEVELS:["underweight","healthy","overweight","obese_level_1","obese_level_2"],BMR_LEVELS:["low","normal","high"],CORAL_TOKEN_COOKE:"coral_together_user_token",HEALTH_TOOL_TYPE:O,LOCALE_HEALTH_TOOLS:I,BEARER_TOKEN_COOKIE:L,TOGETHER_DISCLAIMER_COOKIE:"hhg_together_disclaimer",BEARER_ADMIN_TOKEN_COOKIE:S,Z_INDEX:{adBlock:48,articleAdContainer:47,headerContainerHome:99,headerContainerPopup:200,headerContainerPopupSUbLevel:300,menuSearchInputPopup:5,menuSearchInputDisplayIcon:6,menuSearchPopup:200},BmrActiveLevels:[{value:"sedentary",icon:"bmr-sedentary",name:"bmr.activeLevel.sedentary",description:"bmr.activeLevel.sedentary.description"},{value:"lightly-active",icon:"bmr-light",name:"bmr.activeLevel.lightlyActive",description:"bmr.activeLevel.lightlyActive.description"},{value:"moderately-active",icon:"bmr-moderately",name:"bmr.activeLevel.moderatelyActive",description:"bmr.activeLevel.moderatelyActive.description"},{value:"intensely-active",icon:"bmr-intensively",name:"bmr.activeLevel.intenselyActive",description:"bmr.activeLevel.intenselyActive.description"},{value:"extremely-active",icon:"bmr-extremely",name:"bmr.activeLevel.extremelyActive",description:"bmr.activeLevel.extremelyActive.description"}],LEAD_CAMPAIGN_CODE:"lmoct7xfr5sv4fv",LEAD_TOKEN_COOKIE:"hhg-id",GA_TOKEN_COOKIE:"_ga",GOOGLE_CALENDAR_AUTH_CLIENT_ID:"1038242799566-esoq4ij201ve5qfp266nbca44scpo3c6.apps.googleusercontent.com",FIND_CARE_IFRAME_URL:"https://www.appsheet.com/start/4ba34ebe-3cb6-4c16-8dd4-d074025a5bb6#appName=DependentDropdowns-2711103&group=%5B%5D&page=card&sort=%5B%5D&table=Menu&view=Menu",REPORT_REASON_MAP:R,MB_SOCIAL_LINKS:{LINKEDIN:"https://www.linkedin.com/company/hello-health-group/",FACEBOOK:"https://www.facebook.com/marry.baby.vn",INSTAGRAM:"https://www.instagram.com/marrybaby.vn/",TWITTER:"",YOUTUBE:"https://www.youtube.com/channel/UCeZybTkY1VzJ3N7LvPGdKbg",ZALO:"http://zalo.me/806483414530291942"},INTERNAL_ROLES:["admin","moderator","local-admin"],EXTERNAL_ROLES:["ambassador","expert","sponsor","guide","influencer"],INTERNAL_PROFILE_ROLES:["moderator","local-admin"],EXTERNAL_PROFILE_ROLES:["expert","ambassador","sponsor"],RoleDataMap:{moderator:{text:"Moderator",fid:"cardAuthor.moderator",background:"#fe921d"},admin:{text:"Admin",fid:"cardAuthor.admin",background:"#2b62cd"},"local-admin":{text:"Local admin",fid:"cardAuthor.localAdmin",background:"#2b62cd"},expert:{text:"Expert",fid:"cardAuthor.expert",background:"#ff6f4d"},sponsor:{text:"Sponsor",fid:"cardAuthor.sponsor",background:"#00c7e6"},ambassador:{text:"Ambassador",fid:"cardAuthor.ambassador",background:"#00CB8A"}},MAX_IMAGE_UPLOADS:20,LOCALISED_SLUGS:P}),x=function(e){return e?{displayName:e.display_name||null,avatar:e.avatar||null,thumbnailAvatar:e.avatar_thumbnail||null,profileUrl:e.profile_url||null,description:e.description||null,metaTag:e.meta_tag||""}:{}},C=function(e){return e?{id:e.ID||null,name:e.name||null,specialty:e.specialty||null,avatar:e.avatar||null,permalink:e.permalink||null,thumbnailAvatar:e.avatar_thumbnail||null}:{}},N=function(t){var i,o,n,r;return t?{id:t.ID,postName:t.post_name,sponsor:t.sponsor?M(t.sponsor):null,isSponsored:t.is_sponsored||null,postTitle:t.post_title||"",postModified:t.post_modified||"",postDate:t.post_date||"",modifiedTime:t.modified_time||"",permalink:t.permalink||"",featureImage:t.image||null,featureImageMobile:t.image_medium||null,featureImageMobileXs:t.image_thumbnail||null,author:x(t.author),reviewer:t.reviewed_by&&x(t.reviewed_by)||null,articleReviewed:(null==t?void 0:t.reviewed)?e(e({},null==t?void 0:t.reviewed),{author:G(null===(i=null==t?void 0:t.reviewed)||void 0===i?void 0:i.author),editor:G(null===(o=null==t?void 0:t.reviewed)||void 0===o?void 0:o.editor),expert:G(null===(n=null==t?void 0:t.reviewed)||void 0===n?void 0:n.expert),fact_check:G(null===(r=null==t?void 0:t.reviewed)||void 0===r?void 0:r.fact_check)}):null,category:B(t.category),postContent:t.post_content||null,sections:t.sections||null,categories:(t.categories||[]).map(B),sources:t.sources||null,description:t.description||null,excerpt:t.excerpt||null,expert:C(t.expert),metaTag:t.meta_tag||null}:{}},G=function(t){return void 0!==t&&t?e(e({},t),{profile_url:(null==t?void 0:t.slug)?["expert","medical"].includes((null==t?void 0:t.role)||"")?"/expert/".concat(null==t?void 0:t.slug):"/author/".concat(null==t?void 0:t.slug):t.profile_url}):null},M=function(e){return e?{title:e.title,logo:e.logo,link:e.link}:{}},U=function(e){return{postTitle:e.post_title,permalink:e.permalink}},B=function(e){var t,i;return e?{termId:e.term_id||null,sponsor:e.sponsor?M(e.sponsor):null,isSponsored:e.is_sponsored||null,categoryName:e.cat_name||null,name:e.name||null,iconUrl:e.icon||"",slugName:e.category_nicename||null,description:e.description||null,featureImage:e.image||null,displayName:e.name||null,parent:e.parent||null,permalink:e.permalink||null,slug:e.slug||null,childCates:(null===(t=e.child_cates)||void 0===t?void 0:t.map((function(e){return B(e)})))||[],colorFeatureImage:e.color_feature_image||null,imageColor:e.image_color||null,textColor:e.text_color||null,catParent:(null===(i=e.cat_parent)||void 0===i?void 0:i.name)?{name:e.cat_parent.name,permalink:e.cat_parent.permalink}:{},metaTag:e.meta_tag||"",reviewedBy:e.reviewed_by?U(e.reviewed_by):null,reviewedDate:e.reviewed_date||"",faqs:e.faqs?e.faqs.map((function(e){return H(e)})):null}:{}},H=function(e){return{title:e.title,content:e.content}},F=function(e){return e?{icon:e.icon,link:e.link.startsWith("http")?e.link:"/health-tools"+e.link,subtitle:e.subtitle,title:e.title}:{}},V=function(e){return e?{topicCount:e.topics_count||0,postCount:e.posts_count||0,memberCount:e.members_count||0,thumbnail:e.thumbnail||"",coverImage:e.cover_image||"",mobileCoverImage:e.mobile_cover_image||"",name:e.name||"",description:e.description||"",slug:e.slug||"",id:e.id||0,joined:Boolean(e.joined),isActive:null===e.is_active||void 0===e.is_active||Boolean(e.is_active),mappedCategoryId:e.mapped_category_id||0,discoverCategory:e.discover_category?{categoryId:e.discover_category.category_id||0,name:e.discover_category.name||""}:null,isHidden:Boolean(e.is_hidden)}:{}},K=function(e){var t,i,o,n;return e?{id:e.id||0,name:e.name||"",image:e.thumbnail||"",slug:e.slug||"",url:"/"+(null===(t=e.community)||void 0===t?void 0:t.slug)+"/"+(null==e?void 0:e.slug)||"",description:e.description||"",joined:e.joined||!1,postCount:e.count_posts||0,memberCount:e.count_members||0,communityId:String(null===(i=e.community)||void 0===i?void 0:i.id),communitySlug:null===(o=e.community)||void 0===o?void 0:o.slug,communityName:null===(n=e.community)||void 0===n?void 0:n.name,order:e.order||0,isActive:null===e.is_active||void 0===e.is_active||Boolean(e.is_active),mappedCategoryId:e.mapped_category_id||0,discoverCategory:e.discover_category?{categoryId:e.discover_category.category_id||0,name:e.discover_category.name||""}:null,isHidden:Boolean(e.is_hidden)}:{}},Y=function(e){var t,i,o,n,r,a,l,s,u,d,c,m,p,_,v,g,h,E,T,f,b;return e?{id:e.id,topics:(null===(t=e.topics)||void 0===t?void 0:t.map((function(t){var i,o,n,r;return{id:t.id||0,name:t.name||"",slug:t.slug||"",url:"/"+(null===(i=e.community)||void 0===i?void 0:i.slug)+"/"+t.slug,communityId:String(null===(o=e.community)||void 0===o?void 0:o.id),communitySlug:(null===(n=e.community)||void 0===n?void 0:n.slug)||"",communityName:(null===(r=e.community)||void 0===r?void 0:r.name)||"",isHidden:Boolean(t.is_hidden),isActive:!0}})))||[],community:{id:(null===(i=e.community)||void 0===i?void 0:i.id)||0,name:(null===(o=e.community)||void 0===o?void 0:o.name)||"",slug:(null===(n=e.community)||void 0===n?void 0:n.slug)||"",isActive:!0,isHidden:Boolean(null===(r=e.community)||void 0===r?void 0:r.is_hidden)},slug:e.slug||"",author:{id:(null===(a=e.user)||void 0===a?void 0:a.id)||0,username:(null===(l=e.user)||void 0===l?void 0:l.user_name)||"",email:(null===(s=e.user)||void 0===s?void 0:s.email)||"",name:(null===(u=e.user)||void 0===u?void 0:u.name)||"",avatar:(null===(d=e.user)||void 0===d?void 0:d.avatar)||"",role:(null===(c=e.user)||void 0===c?void 0:c.role)?null===(p=null===(m=e.user)||void 0===m?void 0:m.role)||void 0===p?void 0:p.toLowerCase():"",type:(null===(_=e.user)||void 0===_?void 0:_.type)||"",partnerId:(null===(v=e.user)||void 0===v?void 0:v.partner_id)?String(null===(g=e.user)||void 0===g?void 0:g.partner_id):"",title:(null===(h=e.user)||void 0===h?void 0:h.title)||"",doctorId:(null===(E=e.user)||void 0===E?void 0:E.doctor_id)?String(null===(T=e.user)||void 0===T?void 0:T.doctor_id):"",hospitalId:(null===(f=e.user)||void 0===f?void 0:f.hospital_id)?String(null===(b=e.user)||void 0===b?void 0:b.hospital_id):""},previewUrl:{title:e.preview_title||"",url:e.preview_link||"",image:e.preview_image||"",description:e.preview_description||""},createdAt:e.created_at||"",scheduleDateTime:e.schedule_datetime||"",photos:e.images||[],description:e.description||"",commentsCount:e.comments_count||0,likesCount:e.likes_count||0,title:e.name||"",isPin:!!e.is_pin,pinDate:e.pin_date||"",liked:e.liked||!1,bookmarked:Boolean(e.bookmarked)||!1,mentions:e.mentions||[],commented:Boolean(e.commented)||!1,introUrl:e.intro_url||"",bannerImage:e.banner_image||""}:{}},j=function(e){return e?{disclaimer:e.disclaimer,featuredImage:e.featured_image,info:e.info||[],reviewedBy:e.reviewed_by?{id:e.reviewed_by.ID,permalink:e.reviewed_by.permalink,name:e.reviewed_by.name,postTitle:e.reviewed_by.post_title}:null,reviewedDate:e.reviewed_date}:{}},z=function(e){var t,i,o,n,r,a,l,s,u,d,c,m,p,_,v,g,h,E,T,f,b,y,A,w,O,I,L,S,R,k,P,D;return e?{content:e.content,countLikes:e.likes_count,countReplies:e.replies_count,createdAt:e.created_at,createdTime:e.created_time,id:String(e.id),images:e.image||[],link:e.link||null,replies:e.replies&&e.replies.length>0?e.replies.map(z):[],author:{id:(null===(t=e.user)||void 0===t?void 0:t.id)||0,username:(null===(i=e.user)||void 0===i?void 0:i.user_name)||"",name:(null===(o=e.user)||void 0===o?void 0:o.name)||"",role:(null===(n=e.user)||void 0===n?void 0:n.role)?null===(a=null===(r=e.user)||void 0===r?void 0:r.role)||void 0===a?void 0:a.toLowerCase():"",avatar:(null===(l=e.user)||void 0===l?void 0:l.avatar)||"",type:(null===(s=e.user)||void 0===s?void 0:s.type)||"",email:(null===(u=e.user)||void 0===u?void 0:u.email)||"",partnerId:(null===(d=e.user)||void 0===d?void 0:d.partner_id)?String(null===(c=e.user)||void 0===c?void 0:c.partner_id):"",title:(null===(m=e.user)||void 0===m?void 0:m.title)||"",doctorId:(null===(p=e.user)||void 0===p?void 0:p.doctor_id)?String(null===(_=e.user)||void 0===_?void 0:_.doctor_id):"",hospitalId:(null===(v=e.user)||void 0===v?void 0:v.hospital_id)?String(null===(g=e.user)||void 0===g?void 0:g.hospital_id):""},liked:!!e.liked,mentionedUser:e.mentioned?{id:(null===(h=e.mentioned)||void 0===h?void 0:h.id)||0,username:(null===(E=e.mentioned)||void 0===E?void 0:E.user_name)||"",name:(null===(T=e.mentioned)||void 0===T?void 0:T.name)||"",role:(null===(f=e.mentioned)||void 0===f?void 0:f.role)?null===(y=null===(b=e.mentioned)||void 0===b?void 0:b.role)||void 0===y?void 0:y.toLowerCase():"",avatar:(null===(A=e.mentioned)||void 0===A?void 0:A.avatar)||"",type:(null===(w=e.mentioned)||void 0===w?void 0:w.type)||"",email:(null===(O=e.mentioned)||void 0===O?void 0:O.email)||"",partnerId:(null===(I=e.mentioned)||void 0===I?void 0:I.partner_id)?String(null===(L=e.mentioned)||void 0===L?void 0:L.partner_id):"",doctorId:(null===(S=e.mentioned)||void 0===S?void 0:S.doctor_id)?String(null===(R=e.mentioned)||void 0===R?void 0:R.doctor_id):"",hospitalId:(null===(k=e.mentioned)||void 0===k?void 0:k.hospital_id)?String(null===(P=e.mentioned)||void 0===P?void 0:P.hospital_id):"",title:(null===(D=e.mentioned)||void 0===D?void 0:D.title)||""}:null,mentions:e.mentions||[]}:{}},W=function(e){return void 0!==e&&e?(null==e?void 0:e.turn_off_profile)?"":(null==e?void 0:e.slug)?["expert","medical"].includes((null==e?void 0:e.role)||"")?"/expert/".concat(null==e?void 0:e.slug):"/author/".concat(null==e?void 0:e.slug):(null==e?void 0:e.profile_url)||(null==e?void 0:e.permalink)||"#":""},X=Object.freeze({__proto__:null,formatAuthor:x,formatArticleExpert:C,formatArticle:N,formatUserProfile:G,formatBMIResult:function(e){var t,i,o,n,r,a,l,s,u;return e&&e.status?{status:null==e?void 0:e.status,comparison:null!==(t=null==e?void 0:e.comparison)&&void 0!==t?t:"",assessmentData:[{tab:"tools.condition",content:null!==(i=null==e?void 0:e.condition)&&void 0!==i?i:""},{tab:"tools.risks",content:null!==(o=null==e?void 0:e.risk)&&void 0!==o?o:""},{tab:"tools.suggestion",content:null!==(n=null==e?void 0:e.suggestion)&&void 0!==n?n:""}],chartData:(null===(r=null==e?void 0:e.chart_data)||void 0===r?void 0:r.length)>0?null==e?void 0:e.chart_data:[],disclaimer:null!==(a=null==e?void 0:e.disclaimer)&&void 0!==a?a:"",illustrator:null!==(l=null==e?void 0:e.illustrator)&&void 0!==l?l:"",faqs:null!==(s=null==e?void 0:e.faqs)&&void 0!==s?s:[],suggestedArticlesLink:null!==(u=null==e?void 0:e.suggested_articles_link)&&void 0!==u?u:""}:{}},formatSponsor:M,formatReviewedCategory:U,formatCategory:B,formatCategoryApi:function(e){return e?{categoryInfo:B(e.data.category)||null,explainersPosts:(e.data.explainers_posts||[]).map(N),subCategories:(e.data.sub_categories||[]).map(B)}:{}},formatFaqsCategory:H,formatHealthTool:F,formatHealthToolTypeCategory:function(e){var t,i;return e?{termId:(null==e?void 0:e.term_id)||0,name:(null==e?void 0:e.name)||"",healthTools:null!==(i=null===(t=null==e?void 0:e.health_tools)||void 0===t?void 0:t.map((function(e){return F(e)})))&&void 0!==i?i:[]}:{}},formatCommunity:V,formatTopic:K,formatPost:Y,formatPostPagination:function(e){return e?{currentPage:e.current||0,lastPage:e.last||0,total:e.total_items||0}:{}},formatNotification:function(e){var t,i,o;return e?{time:e.created_at,content:e.content,postId:String(e.post_id),fromUser:{name:null===(t=e.from_user)||void 0===t?void 0:t.name,id:null===(i=e.from_user)||void 0===i?void 0:i.id,avatar:null===(o=e.from_user)||void 0===o?void 0:o.avatar},toUserId:String(e.to_user_id),postSlug:e.post_slug||"",communitySlug:e.community_slug||""}:{}},formatSpotlightsList:function(e){return e?e.map((function(e){return{id:e.ID,name:e.name,permalink:e.permalink,image:(null==e?void 0:e.small_banner)||(null==e?void 0:e.image),imageMedium:(null==e?void 0:e.image_medium)||null,imageThumbnail:(null==e?void 0:e.image_thumbnail)||null,startDate:null==e?void 0:e.start_date,endDate:null==e?void 0:e.end_date}})):[]},formatOvulationInfo:j,formatSuggestedArticle:function(e){return e?{postId:e.post_id||null,categoryId:e.category_id||null,postUrl:e.post_url||null,postReviewed:e.post_reviewed||null,postPageviews:e.post_pageviews||null,postRank:e.post_rank||null,isPin:e.is_pin||null,frequency:e.frequency||null,topic:e.topic||null}:{}},formatTopicHealthTool:function(e){return e?{id:e.tool_id||null,topicFrequency:e.frequency||null,topicId:e.topic_id||null,topicName:e.topic_name||null,isPinned:!!e.is_pin||null,toolLink:e.tool_link||""}:{}},formatComment:z,formatReportedPostToPostDetail:function(e){return e?{name:e.title,description:e.description,images:e.images,likes_count:e.count_likes,comments_count:e.count_comments,topics:[],slug:e.post_slug,id:e.post_id,is_pin:e.is_pin,pin_date:"",post_type:e.post_type,schedule_datetime:e.schedule_datetime,is_active:e.is_active,preview_title:e.preview_title||"",preview_image:e.preview_image||"",preview_description:e.preview_description||"",preview_link:e.preview_link||"",user:e.user,created_at:"",created_time:"",community:{id:e.community_id,name:e.community_name,slug:e.community_slug,description:""}}:{}},formatTopicSubot:function(e){return e?{chatBotId:e.subot_id,isPinned:e.is_pin,topicId:e.topic_id,topicFrequency:e.frequency}:{}},formatSiteWideBanner:function(e,t){return void 0!==e&&e?{content:(null==e?void 0:e.content)||"",icon:(null==e?void 0:e.icon)||"",type:t||"other"}:null},formatPWGContent:function(e){return e?{disclaimer:e.disclaimer,info:e.info||[],reviewedBy:e.reviewed_by?G(e.reviewed_by):null,reviewedDate:e.reviewed_date,metaTag:e.meta_tag}:{}},formatUserProfileUrl:W,formatTHRContent:function(e){return e?{disclaimer:e.disclaimer,info:e.info||[],reviewedBy:e.reviewed_by?G(e.reviewed_by):null,reviewedDate:e.reviewed_date,metaTag:e.meta_tag}:{}},formatBabyGrowthContent:function(e){var t,i,o;return e&&e.information?{information:null!==(t=e.information.map((function(e){return{title:e.title,description:e.description}})))&&void 0!==t?t:[],reviewBy:{reviewer:(null===(i=e.reviewed_by)||void 0===i?void 0:i.display_name)||(null===(o=e.reviewed_by)||void 0===o?void 0:o.name)||"",date:e.reviewed_date||"",link:W(null==e?void 0:e.reviewed_by)},metaTag:e.meta_tag||"",title:e.title||"",description:e.description||"",disclaimer:e.disclaimer||"",is_sponsored:e.is_sponsored||!1,sponsor:e.sponsor,featuredImage:e.featured_image||""}:{}}}),q={BASE_API_PATH:"/",PROFILE:"profile?website_url={website_url}",SEARCH_USER:"profile/search?website_url={website_url}&name={name}",FETCH_PREVIEW:"fetch/preview?website_url={website_url}",FETCH_POST_OR_TOPIC:"fetch/{slug}?website_url={website_url}&community_slug={communitySlug}",POST:{LIST:"post?website_url={website_url}&slug={slug}&pin={pin}&page={page}&community_id={communityId}&topic_id={topicId}&sort_by={sort}&id={id}",DETAIL_BY_ID_OR_SLUG:"post/{idSlug}?website_url={website_url}",CREATE:"post/create?website_url={website_url}",LIKE:"post/{id}/like?website_url={website_url}",DELETE:"post/{id}/delete?website_url={website_url}",REPORT:"post/{id}/report?website_url={website_url}",UPDATE:"post/{id}/update?website_url={website_url}",FOLLOW:"post/{id}/follow?website_url={website_url}",CREATE_ARTICLE_COMMENT:"article-comment/create?website_url={website_url}"},COMMENT:{LIST:"comment?website_url={website_url}&post_id={postId}&page={page}&sort_by={sort}&items_per_page={perPage}&_without_reply={withoutReply}",CREATE:"comment/create?website_url={website_url}",REPLY:"comment/reply?website_url={website_url}",DELETE:"comment/{id}/delete?website_url={website_url}",LIKE:"comment/{id}/like?website_url={website_url}",UNLIKE:"comment/{id}/unlike?website_url={website_url}",IMAGE_UPLOAD:"comment/image/upload?website_url={website_url}"},COMMUNITY:{LIST:"community?website_url={website_url}&page={page}",DETAIL_BY_ID_OR_SLUG:"community/{idSlug}?website_url={website_url}",JOIN:"community/join?website_url={website_url}",LEAVE:"community/leave?website_url={website_url}"},TOPIC:{LIST:"topic?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}&page={page}",DETAIL_BY_ID_OR_SLUG:"topic/{idSlug}?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}",HEALTH_TOOLS:"tools?topic_id={topicId}&website_url={website_url}",SUBOTS:"subots?topic_id={topicId}&website_url={website_url}",SUGGESTED_POSTS:"suggested-posts?topic_id={topicId}&website_url={website_url}&page={page}",JOIN:"topic/join?website_url={website_url}",LEAVE:"topic/leave?website_url={website_url}"},BOOKMARK:{LIST:"bookmark?user_id={userId}&website_url={website_url}",CREATE:"bookmark/create?website_url={website_url}",DELETE:"bookmark/delete?website_url={website_url}"},UPLOAD_IMAGE:"auth/comment/image/upload?website_url={website_url}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info"},$={GET_DOCTOR_INFO:"api/doctors/{doctorId}?site={website_url}",GET_HOSPITAL_INFO:"api/hospital/branch/{hospital_branch_id}?site={website_url}"},J={BASE_API_PATH:"/",GET_SEARCH_ARTICLES:"search?s={keyword}&page={page}",GET_ALL_CATEGORIES:"categories?type=all",GET_HOMEPAGE_POSTS:"home/trending-post?type={type}",GET_HOMEPAGE_LATEST_POSTS:"articles?page=1&_islatest=1",GET_ARTICLE_DETAIL:"article/{slug}?skip_ids={skipIds}&_isrelated={isRelated}",GET_CATEGORY_DETAIL:"category/{slug}",GET_CATEGORY_OR_ARTICLE_DETAIL:"fetch/{fullSlug}",GET_PREVIEW_ARTICLE:"fetch/{fullSlug}?preview_nonce={nonce}&preview=true",GET_ARTICLE_OF_CATEGORY:"articles?category_id={categoryId}&page={currentPage}",GET_PAGE_STATIC:"page/{slug}",GET_ALL_HEALTH_TOOLS:"healthtools",GET_ALL_MARRYBABY_HEALTH_TOOLS:"health-tools",GET_HEALTH_TOOLS_BY_CATEGORY:"healthtools?_hasgroup=1",GET_AUTHOR:"author/{slug}",GET_ALL_EXPERTS:"experts",GET_ALL_EXPERTS_PAGING:"experts?page={page}",GET_EXPERT:"expert/{slug}",GET_EXPERT_POST:"expert/article?page={page}",POST_ARTICLE_FEEDBACK:"article/feedback/{id}",GET_AZ_DRUGS:"category/a-z/{category}",GET_HOMEPAGE_MEDICAL_REVIEWED:"home/medical-reviewed",GET_ARTICLES_BY_IDS:"articles?ids={ids}",GET_ARTICLE_OF_CATEGORY_NO_EXPLAINERS:"articles?category_id={categoryId}&page={currentPage}&skip_ids={ids}",GET_EXPERT_OF_CATEGORY:"category/expert/?id={id}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info",GET_DUE_DATE_ALL_WEEKS:"health-tools/due-date-calculator/all",GET_DUE_DATE_SUGGESTED_ARTICLES:"health-tools/due-date-calculator/result?from_week={from}&to_week={to}",GET_PROFILE:"user/profile",GET_ADMIN_PROFILE:"GET_ADMIN_PROFILE",GET_FEATURE:"feature",POST_NEW_FEATURE:"feature/update",CREATE_BOOKMARK:"bookmark/create",DELETE_BOOKMARK:"bookmark/delete",DELETE_ALL_BOOKMARK:"bookmark/delete-all",GET_ALL_BOOKMARK:"bookmark",SSO_USER_PROFILE:"user",SSO_USER_BOOKMARKS:"user/bookmarks",SSO_USER_PASSWORD:"user/settings/password",SSO_USER_EMAIL:"user/settings/update-email",SSO_CLOSE_ACCOUNT:"user/settings/close-account",SSO_HELP:"user/settings/help",GET_HEALTH_TOOL_OVULATION_INFO:"health-tools/ovulation-calculator/info",GET_HEALTH_TOOL_OVULATION_SUGGESTED_ARTICLES:"health-tools/ovulation-calculator/result?method={method}",GET_HEALTH_TOOL_BMI_INFO:"health-tools/bmi-calculator/info",GET_HEALTH_TOOL_BMI_RESULT:"health-tools/bmi-calculator/result?gender={gender}&bmi={bmi}&age={age}",GET_HEALTH_TOOL_BMR_INFO:"health-tools/bmr-calculator/info",GET_HEALTH_TOOL_BMR_RESULT:"health-tools/bmr-calculator/result?kcals={kcals}&gender={gender}&age={age}",GET_HEALTH_TOOL_PWG_INFO:"health-tools/preweight-gain-calculator/info",GET_HEALTH_TOOL_THR_INFO:"health-tools/target-heart-rate/info",GET_HEALTH_TOOL_BABY_GROWTH_INFO:"health-tools/baby-growth-tracking/info",POST_UPDATE_LOCATION:"tracking/geo/",GET_SIDIS_DUE_DATE:"frontend/tools/due_date",GET_SIDIS_OVULATION:"frontend/tools/ovulation",GET_SIDIS_BMI:"frontend/tools/bmi",GET_SIDIS_BMR:"frontend/tools/bmr",POST_LOGOUT:"user/logout",OVULATION_CREATE_EVENT:"ovulation/event?method={method}&day={day}&cycle={cycle}&period={period}&token={token}&user_id={user_id}",GET_ALL_SPOTLIGHT:"spotlights?per_page={perPage}&order_by={orderBy}",SSO_UPDATE_FIRST_TIME_BOOKMARK:"bookmark/update-first-time",POST_COMMENT_NOTIFICATION:"comment/notification",GET_ABOUT_US_DATA:"about",POST_LEAD_IMPRESSION:"campaign/{campaignCode}/impression",POST_LEAD_POPUP_EXIT:"campaign/{campaignCode}/popup_exit",POST_LEAD_LEAD:"campaign/{campaignCode}/lead",POST_SSO_VERIFY_TOKEN:"verify-id-token",GET_LANDING_PAGE_FIRST_NODE:"landing_page/bot",GET_LANDING_PAGE_NEXT_NODE:"landing_page/messages",POST_LANDING_PAGE_IMPRESSION:"landing_page/impressions",POST_LANDING_PAGE_CLICK:"landing_page/clicks",FETCH_URL_DATA:"preview",GET_SPOTLIGHT_LANDING:"spotlight/{slug}",GET_FOOTER_INFO:"footer",CHECK_SSO_EMAIL:"member/check-email",GET_HOMEPAGE_SITEWIDE_BANNER:"home/sitewide-banner",GET_DYNAMIC_FOOTER:"menu/footer",GET_EXPERTS:"experts?page={page}&number={perPage}&s={search}",GET_EXPERT_BY_ID:"expert/{id}"},Z={SEARCH_USER:"admin/profile/search?website_url={website_url}&name={name}",COMMENT:{IMAGE_UPLOAD:"admin/comment/image/upload?website_url={website_url}"}},Q=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");var i={},o=(t||{}).decode||oe,n=0;for(;n<e.length;){var r=e.indexOf("=",n);if(-1===r)break;var a=e.indexOf(";",n);if(-1===a)a=e.length;else if(a<r){n=e.lastIndexOf(";",r-1)+1;continue}var l=e.slice(n,r).trim();if(void 0===i[l]){var s=e.slice(r+1,a).trim();34===s.charCodeAt(0)&&(s=s.slice(1,-1)),i[l]=re(s,o)}n=a+1}return i},ee=function(e,t,i){var o=i||{},n=o.encode||ne;if("function"!=typeof n)throw new TypeError("option encode is invalid");if(!ie.test(e))throw new TypeError("argument name is invalid");var r=n(t);if(r&&!ie.test(r))throw new TypeError("argument val is invalid");var a=e+"="+r;if(null!=o.maxAge){var l=o.maxAge-0;if(isNaN(l)||!isFinite(l))throw new TypeError("option maxAge is invalid");a+="; Max-Age="+Math.floor(l)}if(o.domain){if(!ie.test(o.domain))throw new TypeError("option domain is invalid");a+="; Domain="+o.domain}if(o.path){if(!ie.test(o.path))throw new TypeError("option path is invalid");a+="; Path="+o.path}if(o.expires){var s=o.expires;if(!function(e){return"[object Date]"===te.call(e)||e instanceof Date}(s)||isNaN(s.valueOf()))throw new TypeError("option expires is invalid");a+="; Expires="+s.toUTCString()}o.httpOnly&&(a+="; HttpOnly");o.secure&&(a+="; Secure");if(o.priority){switch("string"==typeof o.priority?o.priority.toLowerCase():o.priority){case"low":a+="; Priority=Low";break;case"medium":a+="; Priority=Medium";break;case"high":a+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(o.sameSite){switch("string"==typeof o.sameSite?o.sameSite.toLowerCase():o.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return a},te=Object.prototype.toString,ie=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function oe(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function ne(e){return encodeURIComponent(e)}function re(e,t){try{return t(e)}catch(t){return e}}var ae={parse:Q,serialize:ee},le={"vi-VN":"hellobacsi.com","id-ID":"hellosehat.com","ms-MY":"hellodoktor.com","km-KH":"hellokrupet.com","en-PH":"hellodoctor.com.ph","th-TH":"hellokhunmor.com","my-MM":"hellosayarwon.com","zh-TW":"helloyishi.com.tw","hi-IN":"helloswasthya.com"},se={"vi-VN":"marrybaby.vn"},ue=process.env.NEXT_PUBLIC_DEPLOY_LOCALE||"vi-VN",de=function(e){var t=Re.env.isMarryBaby;return"https://".concat(t?se[e]:le[e])},ce=function(e){var t=e.indexOf("?");return t>=0?e.slice(0,t+1)+e.slice(t+1).replace(/[^=&]+=(&|$)/g,"").replace(/&$/,""):e},me=function(e){var t=Re.env.isMarryBaby;if("undefined"!=typeof window)return window.location.origin;var i="staging"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return"development"===process.env.NEXT_PUBLIC_DEPLOY_ENV?"http://localhost:3000":"https://".concat(i?t?"fe.":"discover.":t?"www.":"").concat(le[e])},pe=function(t,i,o){var n="";o&&(n=Object.keys(o).map((function(e){return e+"="+o[e]})).join("&"));var r=((null==Re?void 0:Re.env)||{}).togetherBaseApiUrl,a=void 0===r?"":r,l=_(t,e(e({},(null==i?void 0:i._locale)?{website_url:de(String(i._locale))}:{}),i));return l+="".concat(l.includes("?")?"&":"?").concat(n),a+"api/v1/"+ce(l)},_e=function(t,i){var o=((null==Re?void 0:Re.env)||{}).discoverBaseApiUrl;return(void 0===o?"":o)+"wp-json/api/"+ce(_(t,e({},i)))},ve=function(t,i){var o=((null==Re?void 0:Re.env)||{}).careBaseApiUrl;return((void 0===o?"":o)||"https://service-health-care.hellohealthgroup.com/")+ce(_(t,e({},i)))},ge=function(e){return(null==e?void 0:e.data)&&(e.data instanceof FormData?e.body=e.data:"object"==typeof e.data&&(e.body=JSON.stringify(e.data)),delete e.data),e},he=function(t,n,r,a){return void 0===a&&(a=!1),i(void 0,void 0,void 0,(function(){var i,l,s,u,d;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,fetch(a?t:(c=t,encodeURI(c).replace(/%5B/g,"[").replace(/%5D/g,"]")),e(e({method:n},ge(r)),{headers:e({},null==r?void 0:r.headers)})).then((function(e){return e.json()}))];case 1:return(i=o.sent())?[2,i]:[3,3];case 2:return l=o.sent(),console.log(l),console.log({url:t,status:null===(s=null==l?void 0:l.response)||void 0===s?void 0:s.status,statusText:null===(u=null==l?void 0:l.response)||void 0===u?void 0:u.statusText}),[2,(null===(d=null==l?void 0:l.response)||void 0===d?void 0:d.data)||null];case 3:return[2,null]}var c}))}))},Ee=function(t,n,r,a){return void 0===n&&(n="GET"),i(void 0,void 0,void 0,(function(){var i,l,s,u,d,c,p,_,v,g,h,E,T,f;return o(this,(function(o){switch(o.label){case 0:if(o.trys.push([0,7,,8]),i="string"==typeof t?t:t.url,l="string"==typeof t?t:t.backupUrl,s=ae.parse(a||""),u=s[L],!(d=u||m(L))||!d.length)return[3,5];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,fetch(i,e(e({method:n},ge(r)),{headers:e({Authorization:"Bearer "+d},null==r?void 0:r.headers)})).then((function(e){return e.json()}))];case 2:return c=o.sent(),(null===(v=null==c?void 0:c.messages)||void 0===v?void 0:v.find((function(e){return"Unauthenticated"===(null==e?void 0:e.toLowerCase())})))?[2,he(l||i,n,r)]:c?[2,c]:[3,4];case 3:return p=o.sent(),console.log({status:null===(g=null==p?void 0:p.response)||void 0===g?void 0:g.status,statusText:null===(h=null==p?void 0:p.response)||void 0===h?void 0:h.statusText}),[2,he(l||i,n,r)];case 4:return[3,6];case 5:return[2,he(l||i,n,r)];case 6:return[3,8];case 7:return _=o.sent(),console.log({status:null===(E=null==_?void 0:_.response)||void 0===E?void 0:E.status,statusText:null===(T=null==_?void 0:_.response)||void 0===T?void 0:T.statusText}),[2,(null===(f=null==_?void 0:_.response)||void 0===f?void 0:f.data)||null];case 8:return[2,null]}}))}))},Te=function(t,n,r,a){return i(void 0,void 0,void 0,(function(){var i,l,s,u;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),i=ae.parse(a||""),l=i[L],(s=l||m(L))&&s.length?[4,fetch(t,e(e({method:n},ge(r)),{headers:e({Authorization:"Bearer "+s},null==r?void 0:r.headers)})).then((function(e){return e.json()}))]:[3,2];case 1:if(u=o.sent())return[2,u];o.label=2;case 2:return[3,4];case 3:return o.sent(),[2,null];case 4:return[2,null]}}))}))},fe=function(t,n,r,a){return i(void 0,void 0,void 0,(function(){var i,l,s,u;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),i=ae.parse(a||""),l=i[S],(s=l||m(S))&&s.length?[4,fetch(t,e(e({method:n},ge(r)),{headers:e({Authorization:"Bearer "+s},null==r?void 0:r.headers)})).then((function(e){return e.json()}))]:[3,2];case 1:if(u=o.sent())return[2,u];o.label=2;case 2:return[3,4];case 3:return o.sent(),[2,null];case 4:return[2,null]}}))}))};function be(e,t,i){var o=new RegExp("([?&])"+t+"=.*?(&|$)","i"),n=-1!==e.indexOf("?")?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+i+"$2"):e+n+t+"="+i}var ye,Ae=function(e,t,i){void 0===i&&(i="/community");var o=e||("undefined"!=typeof window?window.location.href:"/"),n="undefined"!=typeof window?window.location.origin:"";return n||e&&(e.startsWith("http://")||e.startsWith("https://"))&&(n=e.split("/").slice(0,3).join("/")),function(e,t){var i=Re.env.publicSSO,o=e||window.location.href;return t&&Object.keys(t).map((function(e){be(o,e,t[e])})),be(o,"source","communities"),i?"".concat(i,"?returnUrl=").concat(encodeURIComponent(o.toString())):o}("".concat(n).concat(i,"/on-boarding?return=").concat(encodeURIComponent(o)),t)},we=function(e,t,i,o){return i&&t?"".concat(i,"-").concat(t):"".concat(p(e||"",{lower:!0,locale:o||ue}),"-").concat(t)},Oe=function(e){var t,i=e.name,o=e.id,n=e.locale;return"/care/".concat(null===(t=P[n||"vi-VN"])||void 0===t?void 0:t.DOCTOR,"/").concat(we(i,o))},Ie=function(e){var t,i=e.name,o=e.id,n=e.slug,r=e.locale;return"/care/".concat(null===(t=P[r||"vi-VN"])||void 0===t?void 0:t.HOSPITAL,"/").concat(we(i,o,n))},Le={locale:"vi-VN",env:{isMarryBaby:!1,togetherBasePath:"/community"},router:{basePath:"",asPath:"/"}},Se=l({data:Le,action:{pushNotifications:function(e){return e},sanitizeFunction:function(e){return e}}}),Re=Le,ke=function(e){var t=e.locale,i=void 0===t?"vi-VN":t,o=e.children,l=e.userInfo,s=e.router,u=e.env,d=void 0===u?{isMarryBaby:!1,togetherBasePath:"/community"}:u,c=e.sanitizeFunction,m=void 0===c?function(e){return e}:c,p=e.pushNotifications,_=void 0===p?function(){return!1}:p,v=r(),g=v[0],h=v[1];return Re={userInfo:l,locale:i,togetherUserId:g,router:s,env:d},a((function(){(null==l?void 0:l.id)&&Te(pe(q.PROFILE,{_locale:i}),"GET").then((function(e){var t;h(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)}))}),[null==l?void 0:l.id]),n.createElement(Se.Provider,{value:{data:{userInfo:l,locale:i,togetherUserId:g,router:s,env:d},action:{pushNotifications:_,sanitizeFunction:m}}},o)},Pe=c.div(ye||(ye=t(["\n width: 40px;\n height: 40px;\n flex-shrink: 0;\n cursor: pointer;\n font-size: 20px;\n\n img {\n border-radius: 50%;\n }\n\n .avatar {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n .avatar-default {\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ",";\n border-radius: 50%;\n color: white;\n font-size: 1em;\n font-weight: bold;\n line-height: 1;\n }\n\n &[data-is-marrybaby='true'] {\n .avatar-default {\n background-color: ",";\n }\n }\n"],["\n width: 40px;\n height: 40px;\n flex-shrink: 0;\n cursor: pointer;\n font-size: 20px;\n\n img {\n border-radius: 50%;\n }\n\n .avatar {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n .avatar-default {\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ",";\n border-radius: 50%;\n color: white;\n font-size: 1em;\n font-weight: bold;\n line-height: 1;\n }\n\n &[data-is-marrybaby='true'] {\n .avatar-default {\n background-color: ",";\n }\n }\n"])),(function(e){return e.theme.colors.secondaryBase}),(function(e){return e.theme.mbColors.pink})),De=function(e){var t=e.className,i=e.isMarryBaby,o=e.style,l=e.avatar,u=e.username,d=e.isLazy,c=s(Se).data.env.isMarryBaby,m="boolean"==typeof i?i:c,p=r(!1),_=p[0],v=p[1];return a((function(){var e=new Image;e.onerror=function(){v(!0)},e.src=l}),[]),n.createElement(Pe,{"data-is-marrybaby":m,className:t,style:o},l&&!_?n.createElement("img",{src:d?void 0:l,"data-src":d?l:void 0,className:"avatar ".concat(d?"lazy":""),alt:"avatar",onError:function(){v(!0)}}):n.createElement("div",{className:"avatar avatar-default"},u&&(null==u?void 0:u.length)>0?u[0].toUpperCase():"A"))};export{E as A,L as B,$ as C,Le as D,Ee as E,Re as G,O as H,k as M,b as P,R,Se as T,De as U,ke as a,y as b,D as c,X as d,j as e,W as f,V as g,Y as h,Ae as i,w as j,he as k,pe as l,q as m,me as n,ve as o,le as p,Ie as q,Oe as r,_e as s,J as t,Z as u,fe as v,Te as w,K as x,A as y,z};
|