@hhgtech/hhg-components 1.28.44 → 1.28.46
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/README.md +5 -0
- package/build/animation-1e9aff6a.js +81 -0
- package/build/babyGrowth.js +24 -24
- package/build/cache.js +1 -1
- package/build/care.js +1 -1
- package/build/components.js +1 -1
- package/build/{constants-53ed67a1.js → constants-28db3174.js} +1 -1
- package/build/{constants-1b55e92a.js → constants-627c575a.js} +2 -2
- package/build/constants.js +1 -1
- package/build/{core-7ce3a7ec.js → core-19b328be.js} +1 -1
- package/build/dataTransform-308ec1d0.js +1 -0
- package/build/ecom.js +1 -1
- package/build/esm/animation-03daa77e.js +81 -0
- package/build/esm/babyGrowth.js +38 -38
- 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-63c68cb5.js → constants-414e0341.js} +1 -1
- package/build/esm/{constants-3923407c.js → constants-e35c5696.js} +2 -2
- package/build/esm/constants.js +1 -1
- package/build/esm/{core-9bf4e218.js → core-091d7f79.js} +1 -1
- package/build/esm/dataTransform-6f1823e1.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-37333454.js +1 -0
- package/build/esm/{getSocialList-4cd36db5.js → getSocialList-a6c965a8.js} +1 -1
- package/build/esm/hooks.js +1 -1
- package/build/esm/i18n.js +1 -1
- package/build/esm/i18nV2.js +1 -1
- package/build/esm/{index-cf5e3a41.js → index-1bf1317e.js} +9 -9
- package/build/esm/{index-4bcf944f.js → index-34cf1092.js} +1 -1
- package/build/esm/{index-c011f60e.js → index-3d2b9817.js} +1 -1
- package/build/esm/index-3e89f917.js +1 -0
- package/build/esm/{index-d2d4296b.js → index-4786b57c.js} +1 -1
- package/build/esm/{index-c55d9a53.js → index-49c2a65e.js} +1 -1
- package/build/esm/index-5cacbac8.js +1 -0
- package/build/esm/index-638a744e.js +1 -0
- package/build/esm/index-73532662.js +1 -0
- package/build/esm/{index-219d0267.js → index-7b8714ba.js} +1 -1
- package/build/esm/index-865973f4.js +375 -0
- package/build/esm/index-92506b05.js +1 -0
- package/build/esm/{index-bc7b446c.js → index-9e5a2805.js} +5 -5
- package/build/esm/index-a0bcdf6a.js +1 -0
- package/build/esm/index-bb8dc02f.js +1 -0
- package/build/esm/{index-49f5f7fe.js → index-bcca5543.js} +1 -1
- package/build/esm/index-c1cb45b2.js +1 -0
- package/build/esm/index-cb13973d.js +50 -0
- package/build/esm/index-cc5ea46f.js +137 -0
- package/build/esm/index-d18cfff8.js +2748 -0
- package/build/esm/index-d6dac1a0.js +177 -0
- package/build/esm/index-f21deeb6.js +1430 -0
- package/build/esm/index-fd0e0617.js +1 -0
- package/build/esm/index.js +1 -1
- package/build/esm/{index.styled-93aedd4f.js → index.styled-b876c90a.js} +3 -3
- package/build/esm/index.styles-00233f7a.js +839 -0
- package/build/esm/lead.js +1 -1
- package/build/esm/mantine.js +1 -1
- package/build/esm/misc.js +1 -1
- package/build/esm/navigation.js +1 -1
- package/build/esm/onboardingV2.js +34 -34
- package/build/esm/pwg.js +5 -5
- package/build/esm/{routing-eb0f44e6.js → routing-5b211351.js} +1 -1
- package/build/esm/subot.js +124 -124
- package/build/esm/together.js +1 -1
- package/build/esm/types-21b8927e.js +3004 -0
- package/build/esm/{types-432589c8.js → types-242705e6.js} +10 -10
- package/build/esm/types.js +1 -1
- package/build/esm/useCategory-2e217da0.js +1 -0
- package/build/esm/useHealthToolCache-011e34e2.js +1 -0
- package/build/esm/{usePlacesAutocomplete-db537374.js → usePlacesAutocomplete-ed4983f5.js} +1 -1
- package/build/esm/{useTranslations-154c6e71.js → useTranslations-80f9bf98.js} +1 -1
- package/build/esm/{utils-283a240e.js → utils-19ad9237.js} +2 -2
- package/build/esm/utils-39fb1c8c.js +7 -0
- package/build/esm/utils-3f639011.js +1 -0
- package/build/esm/{utils-e247d963.js → utils-d4e0e9b5.js} +1 -1
- package/build/esm/vaccination.js +40 -40
- package/build/footer.js +1 -1
- package/build/gAssets.js +1 -1
- package/build/getDynamicHealthTool-3e4543ff.js +1 -0
- package/build/{getSocialList-2ef855cd.js → getSocialList-196c323b.js} +1 -1
- package/build/hooks.js +1 -1
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/index-065c9097.js +1 -0
- package/build/index-07dff904.js +1 -0
- package/build/index-0c7093ea.js +50 -0
- package/build/{index-cc5c10b5.js → index-0f6355d4.js} +1 -1
- package/build/index-19e259ce.js +1 -0
- package/build/index-2420eee5.js +1430 -0
- package/build/index-425f3390.js +1 -0
- package/build/index-43df25b1.js +1 -0
- package/build/{index-a4fbcb10.js → index-4a8b5e48.js} +1 -1
- package/build/index-4c4d7568.js +137 -0
- package/build/{index-a1855a8c.js → index-4de92198.js} +4 -4
- package/build/{index-f97ad29a.js → index-5385e211.js} +1 -1
- package/build/{index-4ec0c769.js → index-6f8ff7df.js} +1 -1
- package/build/index-7154350f.js +375 -0
- package/build/{index-1cce3d61.js → index-8a21ecb2.js} +1 -1
- package/build/index-8e6644eb.js +1 -0
- package/build/{index-90bb6947.js → index-9003442e.js} +1 -1
- package/build/{index-c68ec57c.js → index-96dd78ba.js} +3 -3
- package/build/index-beef0ff7.js +1 -0
- package/build/index-cbbe3154.js +2748 -0
- package/build/{index-15ae0fb6.js → index-d27a3f5f.js} +1 -1
- package/build/{index-895087de.js → index-e13a4f9a.js} +1 -1
- package/build/index-ff74de8e.js +177 -0
- package/build/index.js +1 -1
- package/build/{index.styled-7556937e.js → index.styled-a45b7854.js} +1 -1
- package/build/index.styles-ce607f17.js +839 -0
- package/build/lead.js +1 -1
- package/build/mantine.js +1 -1
- package/build/misc.js +1 -1
- package/build/navigation.js +1 -1
- package/build/onboardingV2.js +34 -34
- package/build/pwg.js +2 -2
- package/build/{routing-b6fbe4e9.js → routing-46446fba.js} +1 -1
- package/build/subot.js +123 -123
- package/build/together.js +1 -1
- package/build/types-d2335814.js +3004 -0
- package/build/{types-2b75bb53.js → types-e54d8d93.js} +10 -10
- package/build/types.js +1 -1
- package/build/useCategory-c99469f2.js +1 -0
- package/build/useHealthToolCache-dc437f4f.js +1 -0
- package/build/{usePlacesAutocomplete-f182b9d8.js → usePlacesAutocomplete-55e04a25.js} +1 -1
- package/build/{useTranslations-f081b85d.js → useTranslations-b435b717.js} +1 -1
- package/build/utils-469dda3f.js +1 -0
- package/build/{utils-bdaf775c.js → utils-83803365.js} +2 -2
- package/build/{utils-9a23430c.js → utils-9778a239.js} +1 -1
- package/build/utils-c18ec2df.js +1 -0
- package/build/vaccination.js +33 -33
- package/package.json +10 -3
- package/build/dataTransform-777dc7c3.js +0 -1
- package/build/esm/dataTransform-0f753a8d.js +0 -1
- package/build/esm/getDynamicHealthTool-bf5ae45e.js +0 -1
- package/build/esm/index-063cc1f8.js +0 -1
- package/build/esm/index-13896a1f.js +0 -1
- package/build/esm/index-1d02f620.js +0 -1
- package/build/esm/index-43771efb.js +0 -1
- package/build/esm/index-48f2acf5.js +0 -1
- package/build/esm/index-5beb9325.js +0 -1
- package/build/esm/index-67cf9fd6.js +0 -177
- package/build/esm/index-6dd55943.js +0 -3122
- package/build/esm/index-7b051fad.js +0 -1
- package/build/esm/index-8d0e1fc9.js +0 -1
- package/build/esm/index-b4e3cda1.js +0 -1
- package/build/esm/index-cd27c1f3.js +0 -1
- package/build/esm/index-d2fd18b2.js +0 -1
- package/build/esm/index-e9845176.js +0 -1
- package/build/esm/index-edff5128.js +0 -1
- package/build/esm/index.styled-6f2497bf.js +0 -1430
- package/build/esm/index.styled-a1372cbc.js +0 -3140
- package/build/esm/index.styled-aa903af8.js +0 -50
- package/build/esm/index.styles-968498ec.js +0 -846
- package/build/esm/screenSizeContext-96560239.js +0 -81
- package/build/esm/types-a2185681.js +0 -1
- package/build/esm/useCategory-89c67c7a.js +0 -1
- package/build/esm/useHealthToolCache-b4214f5b.js +0 -1
- package/build/esm/useRafState-60be12a5.js +0 -1
- package/build/getDynamicHealthTool-88abb9f6.js +0 -1
- package/build/index-08fdac64.js +0 -1
- package/build/index-22b73910.js +0 -1
- package/build/index-2a9e9db0.js +0 -1
- package/build/index-6cbdbb0f.js +0 -1
- package/build/index-90651331.js +0 -1
- package/build/index-9bec53cb.js +0 -177
- package/build/index-aa35fe57.js +0 -3122
- package/build/index-b30908be.js +0 -1
- package/build/index-c45fd3c9.js +0 -1
- package/build/index-c97e51b3.js +0 -1
- package/build/index-cff12c7f.js +0 -1
- package/build/index-d75cc027.js +0 -1
- package/build/index-f3d26f67.js +0 -1
- package/build/index.styled-49e95638.js +0 -3140
- package/build/index.styled-a3496699.js +0 -1430
- package/build/index.styled-a3cec606.js +0 -50
- package/build/index.styles-8637f663.js +0 -846
- package/build/screenSizeContext-0242fe70.js +0 -81
- package/build/types-ff669f4e.js +0 -1
- package/build/useCategory-99b3ce3f.js +0 -1
- package/build/useHealthToolCache-194e52e1.js +0 -1
- package/build/useRafState-eb46223d.js +0 -1
- /package/build/{BMI_BOYS.percentile.monthly-4bdcde00.js → BMI_BOYS.percentile.monthly-0eb54c7c.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-1155ea68.js → BMI_BOYS.percentile.weekly-b7bde0b1.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-7c76df92.js → BMI_BOYS.percentile.yearly-2aa9ad44.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-181d5ae3.js → BMI_BOYS.zscore.monthly-97389f6d.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-0cf8df2f.js → BMI_BOYS.zscore.weekly-bc5a17ee.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-102965ca.js → BMI_BOYS.zscore.yearly-95e1abf3.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-2cf6d311.js → BMI_GIRLS.percentile.monthly-8a628c8b.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-5b6d4586.js → BMI_GIRLS.percentile.weekly-c3423d0b.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-3509e0f0.js → BMI_GIRLS.percentile.yearly-30c05aa5.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-dbe09d64.js → BMI_GIRLS.zscore.monthly-e81868f9.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-727a462b.js → BMI_GIRLS.zscore.weekly-98365971.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-9aa1baa4.js → BMI_GIRLS.zscore.yearly-34dac101.js} +0 -0
- /package/build/{ChevronDown-09646e34.js → ChevronDown-77fab19e.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-67f49877.js → HEAD CIRCUM_BOYS.percentile.monthly-f49c4a46.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-b7cdc6c2.js → HEAD CIRCUM_BOYS.percentile.weekly-72afd132.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-679ce89e.js → HEAD CIRCUM_BOYS.percentile.yearly-ab0deda0.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-ac11764c.js → HEAD CIRCUM_BOYS.zscore.monthly-fbd5f8c4.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-6794e1f8.js → HEAD CIRCUM_BOYS.zscore.weekly-87f840f6.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-abd78ce6.js → HEAD CIRCUM_BOYS.zscore.yearly-9a7dd00c.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-770aee60.js → HEAD CIRCUM_GIRLS.percentile.monthly-679b8839.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-7b02ba8f.js → HEAD CIRCUM_GIRLS.percentile.weekly-b4e20015.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-7271e0f4.js → HEAD CIRCUM_GIRLS.percentile.yearly-9cd60765.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-d849260b.js → HEAD CIRCUM_GIRLS.zscore.monthly-ab6de2c6.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-b1e4bdb4.js → HEAD CIRCUM_GIRLS.zscore.weekly-7d38c523.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-fe67e62b.js → HEAD CIRCUM_GIRLS.zscore.yearly-eb9d57e8.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-a9b28e03.js → HEIGHT_BOYS.percentile.monthly-41de847f.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-d256f904.js → HEIGHT_BOYS.percentile.weekly-62b868f0.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-d0d7870c.js → HEIGHT_BOYS.percentile.yearly-e2c7bb82.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-1f6d8b3b.js → HEIGHT_BOYS.zscore.monthly-5d6cc9db.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-ca971d85.js → HEIGHT_BOYS.zscore.weekly-d7b99302.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-0f6350a9.js → HEIGHT_BOYS.zscore.yearly-e5699025.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-515bf89a.js → HEIGHT_GIRLS.percentile.monthly-bac0286d.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-c9e09302.js → HEIGHT_GIRLS.percentile.weekly-6999925f.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-aeba297a.js → HEIGHT_GIRLS.percentile.yearly-ebfa2c19.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-b580279d.js → HEIGHT_GIRLS.zscore.monthly-39be4dd2.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-a957ddaf.js → HEIGHT_GIRLS.zscore.weekly-207cf2f5.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-5931c772.js → HEIGHT_GIRLS.zscore.yearly-265aafc2.js} +0 -0
- /package/build/{Subot-f5c59f1e.js → Subot-54546cbb.js} +0 -0
- /package/build/{Visible-b951d667.js → Visible-27b623f0.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-03059aba.js → WEIGHT_BOYS.percentile.monthly-9ca3a316.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-003a1949.js → WEIGHT_BOYS.percentile.weekly-7e51fb9b.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-edb57cf2.js → WEIGHT_BOYS.percentile.yearly-b47c5be9.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-7bdf338c.js → WEIGHT_BOYS.zscore.monthly-6d59370f.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-e5476fd1.js → WEIGHT_BOYS.zscore.weekly-38beac02.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-c7fa6d7e.js → WEIGHT_BOYS.zscore.yearly-1f4013a7.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-06c20697.js → WEIGHT_GIRLS.percentile.monthly-c9144c22.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-a7169e9c.js → WEIGHT_GIRLS.percentile.weekly-5455b91e.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-51c606c5.js → WEIGHT_GIRLS.percentile.yearly-03c736dd.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-f2ffff35.js → WEIGHT_GIRLS.zscore.monthly-415a66a8.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-dab69627.js → WEIGHT_GIRLS.zscore.weekly-1e23361d.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-f10ce018.js → WEIGHT_GIRLS.zscore.yearly-8db29178.js} +0 -0
- /package/build/{cookieHelper-16601856.js → cookieHelper-59a64e32.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-f262473c.js → BMI_BOYS.percentile.monthly-57e884f8.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-f5b94d14.js → BMI_BOYS.percentile.weekly-b2c63459.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-7ec74edd.js → BMI_BOYS.percentile.yearly-8ca90fac.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-a4ac044c.js → BMI_BOYS.zscore.monthly-b493d2f9.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-b7953339.js → BMI_BOYS.zscore.weekly-62ae4fbc.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-8d5a5f2d.js → BMI_BOYS.zscore.yearly-e2aad569.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-3b21e9f6.js → BMI_GIRLS.percentile.monthly-7f8de0c2.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-8a72ee76.js → BMI_GIRLS.percentile.weekly-6e0b116a.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-629770c3.js → BMI_GIRLS.percentile.yearly-4a395636.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-565f420c.js → BMI_GIRLS.zscore.monthly-be973fb7.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-e4afc98b.js → BMI_GIRLS.zscore.weekly-c19aae0e.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-b35d87f5.js → BMI_GIRLS.zscore.yearly-7bf54eb9.js} +0 -0
- /package/build/esm/{ChevronDown-a01c53f7.js → ChevronDown-b9b5a352.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-6a8bb7ee.js → HEAD CIRCUM_BOYS.percentile.monthly-6e42d726.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-82951ccd.js → HEAD CIRCUM_BOYS.percentile.weekly-8999c4bf.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-9eef9698.js → HEAD CIRCUM_BOYS.percentile.yearly-b5760636.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-a3391bc3.js → HEAD CIRCUM_BOYS.zscore.monthly-fe30f273.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-f733d920.js → HEAD CIRCUM_BOYS.zscore.weekly-17145cf6.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-2146715a.js → HEAD CIRCUM_BOYS.zscore.yearly-0d813a98.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-9952f63b.js → HEAD CIRCUM_GIRLS.percentile.monthly-ae35f7b2.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-a79e4cb3.js → HEAD CIRCUM_GIRLS.percentile.weekly-430e5931.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-5793bddc.js → HEAD CIRCUM_GIRLS.percentile.yearly-ce5d85d6.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-9cf0d7e7.js → HEAD CIRCUM_GIRLS.zscore.monthly-b304dc6c.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-554b1c54.js → HEAD CIRCUM_GIRLS.zscore.weekly-de588d96.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-92513492.js → HEAD CIRCUM_GIRLS.zscore.yearly-44e77264.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-dde47a57.js → HEIGHT_BOYS.percentile.monthly-e574a87c.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-26a48f0b.js → HEIGHT_BOYS.percentile.weekly-49bc6c02.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-7f453bec.js → HEIGHT_BOYS.percentile.yearly-99cf7774.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-ef1cb387.js → HEIGHT_BOYS.zscore.monthly-63c3566b.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-97fa211a.js → HEIGHT_BOYS.zscore.weekly-a7eff90c.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-3e3bde63.js → HEIGHT_BOYS.zscore.yearly-b06dea5e.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-30be483f.js → HEIGHT_GIRLS.percentile.monthly-b154ae1d.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-7379a593.js → HEIGHT_GIRLS.percentile.weekly-a3dd221b.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-478368ef.js → HEIGHT_GIRLS.percentile.yearly-c1a93361.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-3a72a7a6.js → HEIGHT_GIRLS.zscore.monthly-47b24f91.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-b6c34b3a.js → HEIGHT_GIRLS.zscore.weekly-f3cd351a.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-76e796e8.js → HEIGHT_GIRLS.zscore.yearly-f6e9bb0c.js} +0 -0
- /package/build/esm/{Subot-dac02b43.js → Subot-0c45fa4c.js} +0 -0
- /package/build/esm/{Visible-47f22dfd.js → Visible-3eb21335.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-687b7b12.js → WEIGHT_BOYS.percentile.monthly-87900c96.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-8af24869.js → WEIGHT_BOYS.percentile.weekly-6fb93a78.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-284c0509.js → WEIGHT_BOYS.percentile.yearly-ccca0fe8.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-3e998d39.js → WEIGHT_BOYS.zscore.monthly-35d466dc.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-e6a34c52.js → WEIGHT_BOYS.zscore.weekly-d74d6ff5.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-78b9aee1.js → WEIGHT_BOYS.zscore.yearly-2c068e1e.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-a09b44e8.js → WEIGHT_GIRLS.percentile.monthly-1ee7e829.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-feee61f9.js → WEIGHT_GIRLS.percentile.weekly-ab30775b.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-63bc5a30.js → WEIGHT_GIRLS.percentile.yearly-893b6771.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-eb53f818.js → WEIGHT_GIRLS.zscore.monthly-c37f1d39.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-d393998a.js → WEIGHT_GIRLS.zscore.weekly-3a1449f6.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-7a32a9cc.js → WEIGHT_GIRLS.zscore.yearly-aa00837d.js} +0 -0
- /package/build/esm/{cookieHelper-55e30d0f.js → cookieHelper-cbd9f06e.js} +0 -0
- /package/build/esm/{index-07063e55.js → index-7d682662.js} +0 -0
- /package/build/esm/{index-3d838a6b.js → index-c9bdb9a2.js} +0 -0
- /package/build/esm/{index-f30ca662.js → index-fb029176.js} +0 -0
- /package/build/esm/{isProduction-d1491481.js → isProduction-cfb9150a.js} +0 -0
- /package/build/esm/{localizeNumberFormat-6df9f051.js → localizeNumberFormat-213a73b8.js} +0 -0
- /package/build/esm/{normalizeLink-38377186.js → normalizeLink-cc25681e.js} +0 -0
- /package/build/esm/{number-161e80f5.js → number-dd894856.js} +0 -0
- /package/build/esm/{paths-25ba6851.js → paths-2d37bc61.js} +0 -0
- /package/build/esm/{theme-0bf733e5.js → theme-9f017335.js} +0 -0
- /package/build/esm/{translationsContext-2928d817.js → translationsContext-9fc8f894.js} +0 -0
- /package/build/esm/{tslib.es6-ed0fd94c.js → tslib.es6-cabcb8ea.js} +0 -0
- /package/build/esm/{types-b8a4b227.js → types-2d28585d.js} +0 -0
- /package/build/esm/{useIsInit-cb7d2978.js → useIsInit-81de6d8b.js} +0 -0
- /package/build/esm/{useOutsideClick-f603145b.js → useOutsideClick-e1437a3f.js} +0 -0
- /package/build/esm/{useScrollbarSize-258e8689.js → useScrollbarSize-6ecc2f5a.js} +0 -0
- /package/build/{index-aa2246a9.js → index-21c825aa.js} +0 -0
- /package/build/{index-c11ba2de.js → index-4b719c83.js} +0 -0
- /package/build/{index-8f6f3262.js → index-7005321e.js} +0 -0
- /package/build/{isProduction-60ee72ee.js → isProduction-426652cc.js} +0 -0
- /package/build/{localizeNumberFormat-3a99a4d3.js → localizeNumberFormat-5389239f.js} +0 -0
- /package/build/{normalizeLink-e9909bca.js → normalizeLink-ef4fc463.js} +0 -0
- /package/build/{number-991a82e8.js → number-f6e8e1a9.js} +0 -0
- /package/build/{paths-090390a0.js → paths-b1c94851.js} +0 -0
- /package/build/{theme-1a96d62c.js → theme-98a7bede.js} +0 -0
- /package/build/{translationsContext-d6a9ac72.js → translationsContext-6c5fb248.js} +0 -0
- /package/build/{tslib.es6-5195a8c8.js → tslib.es6-d46558cb.js} +0 -0
- /package/build/{types-e5a9bebd.js → types-032556e4.js} +0 -0
- /package/build/{useIsInit-ff0abff5.js → useIsInit-8386673c.js} +0 -0
- /package/build/{useOutsideClick-357f47d1.js → useOutsideClick-5544e570.js} +0 -0
- /package/build/{useScrollbarSize-560f763b.js → useScrollbarSize-d4ccc356.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var e=require("./tslib.es6-
|
|
1
|
+
"use strict";var e=require("./tslib.es6-d46558cb.js"),t=require("react"),a=require("./useTranslations-b435b717.js"),i=require("lodash/debounce"),o=require("./constants-627c575a.js"),l=require("./index-5385e211.js"),n=require("styled-components"),s=require("./index-beef0ff7.js"),r=require("./theme-98a7bede.js"),c=require("lodash/shuffle"),d=require("./useOutsideClick-5544e570.js"),u=require("./utils-469dda3f.js"),p=require("react-loading-skeleton"),h=require("./paths-b1c94851.js"),g=require("@mantine/core"),f=require("./index-d27a3f5f.js"),m=require("./cookieHelper-59a64e32.js"),C=require("./index-21c825aa.js"),b=require("./ChevronDown-77fab19e.js"),y=require("string-format");function v(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var x=v(t),E=v(i),S=v(n),L=v(c),w=v(p),O=v(y);function k(){const[e,a]=t.useState((()=>{if("undefined"==typeof window)return"unset";if(m.getCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE))return"granted";const e=!location.protocol.includes("https")&&"localhost"!==location.hostname;return!navigator.geolocation||e?"denied":"unset"})),[i,o]=t.useState((()=>{if("undefined"==typeof window)return null;const e=m.getCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE);if(e)try{return JSON.parse(e)}catch(e){console.log(e)}return null})),l=t.useCallback((function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition((e=>{const t={lat:""+Math.round(1e7*e.coords.latitude)/1e7,lng:""+Math.round(1e7*e.coords.longitude)/1e7};m.setCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE,JSON.stringify(t),{minutes:15}),o(t),a("granted")}),(()=>{m.deleteCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE),a("denied")}))}),[]);return t.useMemo((()=>({geoLocationPermission:e,geoLocationCoordinates:i,requestGeoLocation:l})),[e,i])}const I=S.default.div``,T=S.default.div`
|
|
2
2
|
--searchbar-z-index: 305;
|
|
3
3
|
&[data-is-modal='true'] {
|
|
4
4
|
position: fixed;
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
&:first-child {
|
|
125
125
|
padding-top: 18px;
|
|
126
126
|
}
|
|
127
|
-
`,G=({cities:e,isLoading:t,onLocationClick:i,selectedLocation:l})=>{const{t:n,locale:c}=a.useTranslations();return x.default.createElement(B,{"data-testid":"location-search-results"},x.default.createElement(K,null,t?x.default.createElement(z,{count:5}):!e||e.length<1?x.default.createElement(x.default.Fragment,null,x.default.createElement(H,{"data-is-denied":"true"},x.default.createElement(s.Text,{size:"sm",color:"#ccc"},n("booking.searchBar.noResults")))):x.default.createElement(x.default.Fragment,null,x.default.createElement(H,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{var e;i&&i({name:n("booking.searchBar.allLocations"),id:o.ID_OPTION_ALL_LOCATION,slug:null===(e=o.LOCALIZED_SLUGS[c])||void 0===e?void 0:e.ALL})}},x.default.createElement(V,{color:r.theme.colors.neutral400}),x.default.createElement(s.Text,{size:"md"},n("booking.searchBar.allLocations"))),e.map((e=>x.default.createElement(H,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),i&&i(e)},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==l?void 0:l.id)===e.id},x.default.createElement(V,{color:r.theme.colors.neutral400}),x.default.createElement(s.Text,{size:"md"},e.name)))))))},Z="TYPE_CHARACTER",U="REMOVE_CHARACTER",Q="REMOVE_ALL",
|
|
127
|
+
`,G=({cities:e,isLoading:t,onLocationClick:i,selectedLocation:l})=>{const{t:n,locale:c}=a.useTranslations();return x.default.createElement(B,{"data-testid":"location-search-results"},x.default.createElement(K,null,t?x.default.createElement(z,{count:5}):!e||e.length<1?x.default.createElement(x.default.Fragment,null,x.default.createElement(H,{"data-is-denied":"true"},x.default.createElement(s.Text,{size:"sm",color:"#ccc"},n("booking.searchBar.noResults")))):x.default.createElement(x.default.Fragment,null,x.default.createElement(H,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{var e;i&&i({name:n("booking.searchBar.allLocations"),id:o.ID_OPTION_ALL_LOCATION,slug:null===(e=o.LOCALIZED_SLUGS[c])||void 0===e?void 0:e.ALL})}},x.default.createElement(V,{color:r.theme.colors.neutral400}),x.default.createElement(s.Text,{size:"md"},n("booking.searchBar.allLocations"))),e.map((e=>x.default.createElement(H,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),i&&i(e)},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==l?void 0:l.id)===e.id},x.default.createElement(V,{color:r.theme.colors.neutral400}),x.default.createElement(s.Text,{size:"md"},e.name)))))))},Z="TYPE_CHARACTER",U="REMOVE_CHARACTER",Q="REMOVE_ALL",Y="REMOVE_LAST_VISIBLE_NODE",q="PAUSE_FOR",W="CHANGE_DELETE_SPEED",J="CHANGE_DELAY",X="PASTE_STRING",ee=(e,t)=>Math.floor(Math.random()*(t-e+1))+e,te="TEXT_NODE";class ae{constructor(e){this.state={lastFrameTime:null,pauseUntil:null,eventQueue:[],eventLoop:null,eventLoopPaused:!1,reverseCalledEvents:[],calledEvents:[],visibleNodes:[],initialOptions:null},this.options={strings:null,delay:"natural",pauseFor:1500,deleteSpeed:"natural",loop:!1,autoStart:!1,stringSplitter:null,onCreateTextNode:null,onRemoveNode:null},this.start=()=>(this.state.eventLoopPaused=!1,this.runEventLoop(),this),this.pause=()=>(this.state.eventLoopPaused=!0,this),this.stop=()=>(this.state.eventLoop&&(window.cancelAnimationFrame(this.state.eventLoop),this.state.eventLoop=null),this),this.pauseFor=e=>(this.addEventToQueue(q,{ms:e}),this),this.typeOutAllStrings=()=>"string"==typeof this.options.strings?(this.typeString(this.options.strings).pauseFor(this.options.pauseFor),this):(this.options.strings.forEach((e=>{this.typeString(e).pauseFor(this.options.pauseFor).deleteAll(this.options.deleteSpeed)})),this),this.typeString=(e,t=null)=>{if(e){const{stringSplitter:a}=this.options||{},i="function"==typeof a?a(e):e.split("");this.typeCharacters(i,t)}return this},this.pasteString=(e,t=null)=>(e&&this.addEventToQueue(X,{character:e,node:t}),this),this.deleteAll=(e="natural")=>(this.addEventToQueue(Q,{speed:e}),this),this.changeDeleteSpeed=e=>{if(!e)throw new Error("Must provide new delete speed");return this.addEventToQueue(W,{speed:e}),this},this.changeDelay=e=>{if(!e)throw new Error("Must provide new delay");return this.addEventToQueue(J,{delay:e}),this},this.deleteChars=e=>{if(!e)throw new Error("Must provide amount of characters to delete");for(let t=0;t<e;t++)this.addEventToQueue(U);return this},this.typeCharacters=(e,t=null)=>{if(!e||!Array.isArray(e))throw new Error("Characters must be an array");return e.forEach((e=>{this.addEventToQueue(Z,{character:e,node:t})})),this},this.removeCharacters=e=>{if(!e||!Array.isArray(e))throw new Error("Characters must be an array");return e.forEach((()=>{this.addEventToQueue(U)})),this},this.addEventToQueue=(e,t,a=!1)=>this.addEventToStateProperty(e,t,a,"eventQueue"),this.addReverseCalledEvent=(e,t,a=!1)=>{const{loop:i}=this.options;return i?this.addEventToStateProperty(e,t,a,"reverseCalledEvents"):this},this.addEventToStateProperty=(e,t,a=!1,i)=>{const o={eventName:e,eventArgs:t||{}};return this.state[i]=a?[o,...this.state[i]]:[...this.state[i],o],this},this.runEventLoop=()=>{this.state.lastFrameTime||(this.state.lastFrameTime=Date.now());const e=Date.now(),t=e-this.state.lastFrameTime;if(!this.state.eventQueue.length){if(!this.options.loop)return;this.state.eventQueue=[...this.state.calledEvents],this.state.calledEvents=[],this.options=Object.assign({},this.state.initialOptions)}if(this.state.eventLoop=window.requestAnimationFrame(this.runEventLoop),this.state.eventLoopPaused)return;if(this.state.pauseUntil){if(e<this.state.pauseUntil)return;this.state.pauseUntil=null}const a=[...this.state.eventQueue],i=a.shift();let o=0;if(o=i.eventName===Y||i.eventName===U?"natural"===this.options.deleteSpeed?ee(40,80):this.options.deleteSpeed:"natural"===this.options.delay?ee(120,160):this.options.delay,t<=o)return;const{eventName:l,eventArgs:n}=i;switch(l){case X:case Z:{const{character:e}=n,t=document.createTextNode(e);let a=t;this.options.onCreateTextNode&&"function"==typeof this.options.onCreateTextNode&&(a=this.options.onCreateTextNode(e,t)),this.state.visibleNodes=[...this.state.visibleNodes,{type:te,character:e,node:a}];break}case U:a.unshift({eventName:Y,eventArgs:{removingCharacterNode:!0}});break;case q:{const{ms:e}=i.eventArgs;this.state.pauseUntil=Date.now()+parseInt(e);break}case Q:{const{visibleNodes:e}=this.state,{speed:t}=n,i=[];t&&i.push({eventName:W,eventArgs:{speed:t,temp:!0}});for(let t=0,a=e.length;t<a;t++)i.push({eventName:Y,eventArgs:{removingCharacterNode:!1}});t&&i.push({eventName:W,eventArgs:{speed:this.options.deleteSpeed,temp:!0}}),a.unshift(...i);break}case Y:if(this.state.visibleNodes.length){const{node:e,character:t}=this.state.visibleNodes.pop();this.options.onRemoveNode&&"function"==typeof this.options.onRemoveNode&&this.options.onRemoveNode({node:e,character:t}),e&&e.parentNode.removeChild(e)}break;case W:this.options.deleteSpeed=i.eventArgs.speed;break;case J:this.options.delay=i.eventArgs.delay}this.options.loop&&(i.eventName===Y||i.eventArgs&&i.eventArgs.temp||(this.state.calledEvents=[...this.state.calledEvents,i])),this.state.eventQueue=a,this.state.lastFrameTime=e},e&&(this.options=Object.assign(Object.assign({},this.options),e)),this.state.initialOptions=Object.assign({},this.options),this.init()}init(){this.addEventToQueue(Q,null,!0),!0===this.options.autoStart&&this.options.strings&&this.typeOutAllStrings().start()}}function ie({inputRef:e,wrapperRef:i,disabled:o}){const{t:l,locale:n}=a.useTranslations(),s=t.useMemo((()=>{if(o)return[];const e=["booking.searchBar.placeholder.hospital","booking.searchBar.placeholder.doctor"];return"zh-TW"!==n&&e.push("booking.searchBar.placeholder.specialty","booking.searchBar.placeholder.service"),L.default(e).map((e=>l(e)))}),[l,n]);function r(e){const t=d();return t&&(t.placeholder=t.placeholder+e),null}function c(){const e=d();e&&(e.placeholder=e.placeholder.slice(0,-1))}function d(){return e&&e.current?e.current:i&&i.current&&i.current.querySelector("input")||null}t.useEffect((()=>{if(o)return;const e=d();e&&(e.placeholder="",new ae({strings:s,autoStart:!0,loop:!0,delay:32,deleteSpeed:32,pauseFor:1500,onCreateTextNode:r,onRemoveNode:c}))}),[e,i])}const oe=S.default.div`
|
|
128
128
|
user-select: none;
|
|
129
129
|
input {
|
|
130
130
|
pointer-events: none;
|
|
@@ -336,7 +336,7 @@
|
|
|
336
336
|
0px 16px 24px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04),
|
|
337
337
|
0px 0px 1px rgba(0, 0, 0, 0.04);
|
|
338
338
|
}
|
|
339
|
-
`,Qe=({data:e,state:t,dispatch:a,isMobile:i,isLoading:o,keyword:l,hideResults:n,isNavResultItem:s})=>x.default.createElement(Ue,null,e&&e.map((e=>n&&n.includes(e.type)?x.default.createElement(x.default.Fragment,null):x.default.createElement(Ze,{type:e.type,state:t,dispatch:a,itemsToShow:2,itemsToShowDesktop:4,key:e.type,data:e.results,isMobile:i,isLoading:o,keyword:l,isNavResultItem:s})))),
|
|
339
|
+
`,Qe=({data:e,state:t,dispatch:a,isMobile:i,isLoading:o,keyword:l,hideResults:n,isNavResultItem:s})=>x.default.createElement(Ue,null,e&&e.map((e=>n&&n.includes(e.type)?x.default.createElement(x.default.Fragment,null):x.default.createElement(Ze,{type:e.type,state:t,dispatch:a,itemsToShow:2,itemsToShowDesktop:4,key:e.type,data:e.results,isMobile:i,isLoading:o,keyword:l,isNavResultItem:s})))),Ye=(e,t,a)=>O.default(e,Object.assign(Object.assign({},t),{domain:f.domainLocales[a||"en-PH"]}));const qe=S.default.div``,We=S.default.div`
|
|
340
340
|
background-color: ${r.theme.colors.neutral50};
|
|
341
341
|
padding-bottom: 1px;
|
|
342
342
|
${u.MediaQueries.mbDown} {
|
|
@@ -485,7 +485,7 @@
|
|
|
485
485
|
line-height: 22px;
|
|
486
486
|
cursor: pointer;
|
|
487
487
|
}
|
|
488
|
-
`;const ut=({state:e,type:i,results:l,location:n,isLoading:c,typeInformation:d,clientSlug:u="",dispatch:p})=>{const{locale:h,t:
|
|
488
|
+
`;const ut=({state:e,type:i,results:l,location:n,isLoading:c,typeInformation:d,clientSlug:u="",dispatch:p})=>{const{locale:h,t:f}=a.useTranslations(),{selectedLocation:m}=e,C=t.useMemo((()=>d[i].slug),[d,i]);return x.default.createElement(st,null,x.default.createElement(rt,null,x.default.createElement("div",{className:"title"},f("booking.searchResult.description",{search_type:d[i].name,search_location:n})),l.length>0&&x.default.createElement("div",{className:"btn-see-all",onClick:()=>{let t=`/${m.slug}/${C}`;const a=o.MAPPING_CLIENT_WITH_SLUG[h][u];a&&(t+=`/${a}`),("doctor"===i||"hospital"===i)&&e.selectedSpecialty.id>0&&(t+=`?specialtyId=${e.selectedSpecialty.id}`),t&&p({type:at.NavigateTo,payload:t})}},f("home.seeAll"))),x.default.createElement(ct,null,c&&Array(3).fill(void 0).map(((e,t)=>x.default.createElement(dt,{key:i+"loading"+t,className:2===t?"last-item":""},x.default.createElement("div",{className:"image-item"},x.default.createElement(g.Skeleton,{height:48,circle:!0,mb:"xl",animate:!0})),x.default.createElement("div",{className:"infor"},x.default.createElement("div",{className:"title"},x.default.createElement(g.Skeleton,{height:8,mt:10,radius:"xl",animate:!0})),x.default.createElement("div",{className:"description"},x.default.createElement("div",{className:"sub-description"},x.default.createElement(g.Skeleton,{height:8,mt:10,radius:"xl",width:"80%",animate:!0}))))))),!c&&l&&l.length>0&&x.default.createElement(x.default.Fragment,null,l.map(((e,t)=>{var a,o;const n=l.length>4&&3===t||l.length<=4&&t===l.length-1;let s="";return"hospital"===i&&(s=(null==e?void 0:e.address)||""),"doctor"===i&&(s=(null===(a=null==e?void 0:e.specialties)||void 0===a?void 0:a.join(", "))||""),"service"===i&&(s=(null===(o=null==e?void 0:e.hospital_branch)||void 0===o?void 0:o.name)||""),t>=4?x.default.createElement(x.default.Fragment,null):x.default.createElement(dt,{key:e.id,className:n?"last-item":"",onClick:()=>(e=>{let t="";switch(i){case"service":t=`/${m.slug}/${C}/${e.slug}`;break;case"doctor":case"hospital":t=`/${C}/${e.slug}-${e.id}`}t&&p({type:at.NavigateTo,payload:t})})(e)},x.default.createElement("div",{className:"image-item"},x.default.createElement("img",{src:e.logo||e.avatar,alt:e.name})),x.default.createElement("div",{className:"infor"},x.default.createElement("div",{className:"title"},e.name),x.default.createElement("div",{className:"description"},d[i].icon,x.default.createElement("div",{className:"sub-description"},s))))}))),!c&&0===(null==l?void 0:l.length)&&x.default.createElement(s.Text,{size:"sm",color:r.theme.colors.gray400},f("booking.searchBar.noResults"))))},pt=S.default.div`
|
|
489
489
|
position: relative;
|
|
490
490
|
|
|
491
491
|
${u.MediaQueries.mbDown} {
|
|
@@ -563,7 +563,7 @@
|
|
|
563
563
|
&[data-is-denied='true'] {
|
|
564
564
|
cursor: not-allowed;
|
|
565
565
|
}
|
|
566
|
-
`,ft=()=>x.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},x.default.createElement("path",{d:"M8.98307 14.3333C7.87196 14.3333 6.92752 13.9445 6.14974 13.1667C5.37196 12.3889 4.98307 11.4445 4.98307 10.3333V9.96668C4.08307 9.85557 3.33041 9.45557 2.72507 8.76668C2.1193 8.07779 1.81641 7.26668 1.81641 6.33334V3.10001C1.81641 2.93334 1.87463 2.79157 1.99107 2.67468C2.10796 2.55823 2.24974 2.50001 2.41641 2.50001H3.81641V2.33334C3.81641 2.1889 3.86374 2.06934 3.95841 1.97468C4.05263 1.88045 4.17196 1.83334 4.31641 1.83334C4.46085 1.83334 4.58041 1.88045 4.67507 1.97468C4.7693 2.06934 4.81641 2.1889 4.81641 2.33334V3.66668C4.81641 3.81112 4.7693 3.93045 4.67507 4.02468C4.58041 4.11934 4.46085 4.16668 4.31641 4.16668C4.17196 4.16668 4.05263 4.11934 3.95841 4.02468C3.86374 3.93045 3.81641 3.81112 3.81641 3.66668V3.50001H2.81641V6.33334C2.81641 7.06668 3.07752 7.69445 3.59974 8.21668C4.12196 8.7389 4.74974 9.00001 5.48307 9.00001C6.21641 9.00001 6.84418 8.7389 7.36641 8.21668C7.88863 7.69445 8.14974 7.06668 8.14974 6.33334V3.50001H7.14974V3.66668C7.14974 3.81112 7.10263 3.93045 7.00841 4.02468C6.91374 4.11934 6.79418 4.16668 6.64974 4.16668C6.5053 4.16668 6.38596 4.11934 6.29174 4.02468C6.19707 3.93045 6.14974 3.81112 6.14974 3.66668V2.33334C6.14974 2.1889 6.19707 2.06934 6.29174 1.97468C6.38596 1.88045 6.5053 1.83334 6.64974 1.83334C6.79418 1.83334 6.91374 1.88045 7.00841 1.97468C7.10263 2.06934 7.14974 2.1889 7.14974 2.33334V2.50001H8.54974C8.71641 2.50001 8.85818 2.55823 8.97507 2.67468C9.09152 2.79157 9.14974 2.93334 9.14974 3.10001V6.33334C9.14974 7.26668 8.84707 8.07779 8.24174 8.76668C7.63596 9.45557 6.88307 9.85557 5.98307 9.96668V10.3333C5.98307 11.1667 6.27485 11.8751 6.85841 12.4587C7.44152 13.0418 8.14974 13.3333 8.98307 13.3333C9.81641 13.3333 10.5249 13.0418 11.1084 12.4587C11.6915 11.8751 11.9831 11.1667 11.9831 10.3333V9.25001C11.6386 9.1389 11.3526 8.93601 11.1251 8.64134C10.8971 8.34712 10.7831 8.01112 10.7831 7.63334C10.7831 7.15557 10.9497 6.75001 11.2831 6.41668C11.6164 6.08334 12.0164 5.91668 12.4831 5.91668C12.9609 5.91668 13.3664 6.08334 13.6997 6.41668C14.0331 6.75001 14.1997 7.15557 14.1997 7.63334C14.1997 8.01112 14.086 8.34712 13.8584 8.64134C13.6304 8.93601 13.3386 9.1389 12.9831 9.25001V10.3333C12.9831 11.4445 12.5942 12.3889 11.8164 13.1667C11.0386 13.9445 10.0942 14.3333 8.98307 14.3333ZM12.4831 8.33334C12.6831 8.33334 12.8526 8.26401 12.9917 8.12534C13.1304 7.98623 13.1997 7.82223 13.1997 7.63334C13.1997 7.43334 13.1304 7.26401 12.9917 7.12534C12.8526 6.98623 12.6831 6.91668 12.4831 6.91668C12.2831 6.91668 12.1164 6.98623 11.9831 7.12534C11.8497 7.26401 11.7831 7.43334 11.7831 7.63334C11.7831 7.82223 11.8497 7.98623 11.9831 8.12534C12.1164 8.26401 12.2831 8.33334 12.4831 8.33334Z",fill:"#595959"})),mt=()=>x.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},x.default.createElement("path",{d:"M6.86836 9.26489V10.2386C6.86836 10.509 6.96294 10.7389 7.15209 10.9283C7.34124 11.1176 7.57093 11.2122 7.84114 11.2122C8.11135 11.2122 8.34133 11.1176 8.53106 10.9283C8.7208 10.7389 8.81567 10.509 8.81567 10.2386V9.26489H9.78936C10.0598 9.26489 10.2897 9.17031 10.479 8.98116C10.6684 8.79201 10.763 8.56233 10.763 8.29211C10.763 8.0219 10.6684 7.79192 10.479 7.60219C10.2897 7.41245 10.0598 7.31758 9.78936 7.31758H8.81567V6.34389C8.81567 6.07343 8.72109 5.84354 8.53194 5.65422C8.34279 5.4649 8.11311 5.37024 7.84289 5.37024C7.57268 5.37024 7.3427 5.4649 7.15297 5.65422C6.96323 5.84354 6.86836 6.07343 6.86836 6.34389V7.31758H5.89467C5.62421 7.31758 5.39432 7.41216 5.205 7.60131C5.01568 7.79046 4.92102 8.02014 4.92102 8.29036C4.92102 8.56057 5.01568 8.79055 5.205 8.98028C5.39432 9.17002 5.62421 9.26489 5.89467 9.26489H6.86836ZM3.40809 14.1333C3.02086 14.1333 2.68938 13.9954 2.41364 13.7196C2.13788 13.4439 2 13.1124 2 12.7252V6.07426C2 5.85132 2.04987 5.64011 2.14961 5.44063C2.24936 5.24116 2.38723 5.07689 2.56323 4.94782L6.99718 1.61486C7.24323 1.42712 7.52444 1.33325 7.84081 1.33325C8.15718 1.33325 8.43919 1.42712 8.68685 1.61486L13.1208 4.94782C13.2968 5.07689 13.4347 5.24116 13.5344 5.44063C13.6342 5.64011 13.684 5.85132 13.684 6.07426V12.7252C13.684 13.1124 13.5462 13.4439 13.2704 13.7196C12.9947 13.9954 12.6632 14.1333 12.2759 14.1333H3.40809ZM3.40809 12.9649H12.2759C12.3459 12.9649 12.4033 12.9424 12.4482 12.8974C12.4932 12.8525 12.5156 12.7951 12.5156 12.7252V6.07426C12.5156 6.03431 12.5069 5.99811 12.4894 5.96566C12.4719 5.9332 12.4482 5.90449 12.4183 5.87953L7.98433 2.55406C7.94438 2.51911 7.89694 2.50164 7.84202 2.50164C7.78709 2.50164 7.73965 2.51911 7.69971 2.55406L3.26576 5.87953C3.2358 5.90449 3.21209 5.9332 3.1946 5.96566C3.17712 5.99811 3.16839 6.03431 3.16839 6.07426V12.7252C3.16839 12.7951 3.19086 12.8525 3.2358 12.8974C3.28075 12.9424 3.33818 12.9649 3.40809 12.9649Z",fill:"#595959"})),Ct=()=>x.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},x.default.createElement("path",{d:"M7.99984 8.00004C8.3665 8.00004 8.68039 7.86949 8.9415 7.60837C9.20261 7.34726 9.33317 7.03337 9.33317 6.66671C9.33317 6.30004 9.20261 5.98615 8.9415 5.72504C8.68039 5.46393 8.3665 5.33337 7.99984 5.33337C7.63317 5.33337 7.31928 5.46393 7.05817 5.72504C6.79706 5.98615 6.6665 6.30004 6.6665 6.66671C6.6665 7.03337 6.79706 7.34726 7.05817 7.60837C7.31928 7.86949 7.63317 8.00004 7.99984 8.00004ZM7.99984 12.9C9.35539 11.6556 10.3609 10.525 11.0165 9.50837C11.6721 8.49171 11.9998 7.58893 11.9998 6.80004C11.9998 5.58893 11.6137 4.59726 10.8415 3.82504C10.0693 3.05282 9.12206 2.66671 7.99984 2.66671C6.87761 2.66671 5.93039 3.05282 5.15817 3.82504C4.38595 4.59726 3.99984 5.58893 3.99984 6.80004C3.99984 7.58893 4.32761 8.49171 4.98317 9.50837C5.63873 10.525 6.64428 11.6556 7.99984 12.9ZM7.99984 14.4167C7.91095 14.4167 7.82206 14.4 7.73317 14.3667C7.64428 14.3334 7.5665 14.2889 7.49984 14.2334C5.87761 12.8 4.6665 11.4695 3.8665 10.2417C3.0665 9.01393 2.6665 7.86671 2.6665 6.80004C2.6665 5.13337 3.20261 3.8056 4.27484 2.81671C5.34706 1.82782 6.58873 1.33337 7.99984 1.33337C9.41095 1.33337 10.6526 1.82782 11.7248 2.81671C12.7971 3.8056 13.3332 5.13337 13.3332 6.80004C13.3332 7.86671 12.9332 9.01393 12.1332 10.2417C11.3332 11.4695 10.1221 12.8 8.49984 14.2334C8.43317 14.2889 8.35539 14.3334 8.2665 14.3667C8.17761 14.4 8.08873 14.4167 7.99984 14.4167Z",fill:"#8C8C8C"})),bt=()=>x.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16"},x.default.createElement("path",{d:"M3.83333 0.5C2.94928 0.5 2.10143 0.851189 1.47631 1.47631C0.851189 2.10143 0.5 2.94928 0.5 3.83333C0.5 4.71739 0.851189 5.56523 1.47631 6.19036C2.10143 6.81548 2.94928 7.16667 3.83333 7.16667C4.71739 7.16667 5.56523 6.81548 6.19036 6.19036C6.81548 5.56523 7.16667 4.71739 7.16667 3.83333C7.16667 2.94928 6.81548 2.10143 6.19036 1.47631C5.56523 0.851189 4.71739 0.5 3.83333 0.5V0.5ZM10.5 0.5C9.57917 0.5 8.83333 1.24583 8.83333 2.16667V5.5C8.83333 6.42083 9.57917 7.16667 10.5 7.16667H13.8333C14.7542 7.16667 15.5 6.42083 15.5 5.5V2.16667C15.5 1.24583 14.7542 0.5 13.8333 0.5H10.5ZM3.83333 8.83333C2.94928 8.83333 2.10143 9.18452 1.47631 9.80964C0.851189 10.4348 0.5 11.2826 0.5 12.1667C0.5 13.0507 0.851189 13.8986 1.47631 14.5237C2.10143 15.1488 2.94928 15.5 3.83333 15.5C4.71739 15.5 5.56523 15.1488 6.19036 14.5237C6.81548 13.8986 7.16667 13.0507 7.16667 12.1667C7.16667 11.2826 6.81548 10.4348 6.19036 9.80964C5.56523 9.18452 4.71739 8.83333 3.83333 8.83333V8.83333ZM12.1667 8.83333C11.2826 8.83333 10.4348 9.18452 9.80964 9.80964C9.18452 10.4348 8.83333 11.2826 8.83333 12.1667C8.83333 13.0507 9.18452 13.8986 9.80964 14.5237C10.4348 15.1488 11.2826 15.5 12.1667 15.5C13.0507 15.5 13.8986 15.1488 14.5237 14.5237C15.1488 13.8986 15.5 13.0507 15.5 12.1667C15.5 11.2826 15.1488 10.4348 14.5237 9.80964C13.8986 9.18452 13.0507 8.83333 12.1667 8.83333V8.83333Z",fill:"#9AA2AC"})),yt=({state:e,isMobile:i,debouncedFetchSearchResults:l,selectedLocation:n,onSpecialtyClick:r,dispatch:c})=>{var u;const{t:p,locale:h}=a.useTranslations(),g=t.useRef(null),m=t.useMemo((()=>o.LOCALIZED_SLUGS[h]),[h]),C=t.useMemo((()=>({wrapper:{"&:after":{content:'""',width:"1px",height:"20px",backgroundColor:"#E4E8EC",position:"absolute",right:0,top:"13px"}},input:{border:i?"border: 1px solid #d9d9d9":"none",height:i?"40px":"46px !important",paddingRight:"30px","&:focus":{boxShadow:i?"box-shadow: 0px 0px 0px 2px #91caff":"none"}},rightSection:{width:"30px",svg:{fontSize:"20px"}}})),[i]),y=t.useCallback((function(e){console.log(e)}),[l,c]);return d.useOutsideClick(g,(()=>{c({type:at.ClickOutsideInputSpecialty})})),x.default.createElement(pt,{ref:g},x.default.createElement(f.Input.Wrapper,null,x.default.createElement(f.Input,{size:i?"md":"lg",placeholder:p("booking.searchPopup.specialties"),value:(null===(u=null==e?void 0:e.selectedSpecialty)||void 0===u?void 0:u.name)||"",rightSection:x.default.createElement(b.ChevronDown,null),styles:C,onFocus:()=>c({type:at.FocusInputSpecialty}),onChange:e=>{y(e.target.value)}})),"specialty"===e.focused&&x.default.createElement(ht,null,x.default.createElement(gt,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{r&&r({name:p("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:m.SPECIALTIES})}},x.default.createElement("div",{className:"image-item"},x.default.createElement(bt,null)),x.default.createElement(s.Text,{size:"md"},p("booking.searchBar.allSpecialties"))),e.allSpecialties.map((e=>x.default.createElement(gt,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),r&&r(Object.assign(Object.assign({},e),{total_doctor:0}))},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==n?void 0:n.id)===e.id},x.default.createElement("div",{className:"image-item"},x.default.createElement("img",{src:e.thumbnail,alt:e.name})),x.default.createElement(s.Text,{size:"md"},e.name))))))},vt=({state:e,type:i,isMobile:o,isLoading:l,initalSearchValue:n,typeInformation:r,debouncedFetchSearchResults:c,trackingAttributes:u,hideSpecialtySelection:p=!1,clientSlug:h="",focusSearchInput:g,onSearch:m,onEnterSearch:C,dispatch:b})=>{var y;const{t:v}=a.useTranslations(),E=t.useRef(null),S=t.useMemo((()=>u?{"data-event-category":u.dataEventCategory,"data-event-action":u.dataEventAction,"data-event-label":u.dataEventLabel}:{}),[u]),L=t.useMemo((()=>"doctor"===i?v("booking.searchBar.placeholder.doctor"):"service"===i?v("booking.searchBar.placeholder.service"):"hospital"===i?v("booking.searchBar.placeholder.hospital"):"specialty"===i?v("booking.searchBar.placeholder.specialty"):""),[i]),w=t.useMemo((()=>({root:{flex:1,"&.hide-specialty-selection":{".mantine-Input-rightSection":{display:"none"},input:{paddingLeft:"48px"},".mantine-Input-icon":{left:"0"}}}})),[]),O=t.useMemo((()=>({icon:{left:"165px"},input:{color:"#262626",'&[data-with-icon="true"]':{paddingLeft:"205px",paddingRight:"16px"}},rightSection:{left:0,width:"165px",padding:"1px"}})),[]),k=t.useMemo((()=>({input:{color:"#262626"}})),[]);d.useOutsideClick(E,(()=>{b({type:at.ClickOutsideInputSearch})}));const I=t.useCallback((function(t){b({type:at.ChangeInputSearch,payload:t}),"function"!=typeof m&&(t.trim().length>et[e.locale]||n||0===t.trim().length?c(t.trim(),e,i,h):(c.cancel(),b({type:at.DisplayInitialSearchResults})))}),[b,e,i]),T=t.useCallback((function(e){b({type:at.SelectSpecialty,payload:e}),g()}),[b]),j=t.useCallback((e=>{13===e.keyCode&&(e.stopPropagation(),e.preventDefault(),C&&C())}),[C]);return x.default.createElement(lt,{ref:E},"specialty"===i?x.default.createElement(f.Input.Wrapper,{styles:w},x.default.createElement(f.Input,{icon:x.default.createElement(s.Icon.Search,null),size:o?"md":"lg",placeholder:L,styles:k,value:e.searchKeywords,onFocus:()=>b({type:at.FocusInputSearchSpecialty}),onChange:e=>{I(e.target.value)},onKeyDown:j})):x.default.createElement(x.default.Fragment,null,"service"===i?x.default.createElement(f.Input.Wrapper,{styles:w},x.default.createElement(f.Input,{icon:x.default.createElement(s.Icon.Search,null),size:o?"md":"lg",name:"search-results",placeholder:L,onFocus:()=>b({type:at.FocusInputSearch}),value:e.searchKeywords,onChange:e=>{I(e.target.value)},onKeyDown:j})):x.default.createElement(x.default.Fragment,null,o&&!p?x.default.createElement(x.default.Fragment,null,x.default.createElement(yt,{state:e,isMobile:o,dispatch:b,debouncedFetchSearchResults:c,onSpecialtyClick:T}),x.default.createElement(f.Input.Wrapper,{styles:w},x.default.createElement(f.Input,{icon:x.default.createElement(s.Icon.Search,null),size:"md",placeholder:L,value:e.searchKeywords,name:"search-results",onFocus:()=>b({type:at.FocusInputSearch}),onChange:e=>{I(e.target.value)},onKeyDown:j}))):x.default.createElement(f.Input.Wrapper,{styles:w,className:p?"hide-specialty-selection":""},x.default.createElement(f.Input,Object.assign({icon:x.default.createElement(s.Icon.Search,null),size:"lg",placeholder:L,styles:O,name:"search-results",autoComplete:"off",value:e.searchKeywords,onChange:e=>{I(e.target.value)},onFocus:()=>b({type:at.FocusInputSearch}),onKeyDown:j},S,{rightSection:p?x.default.createElement(x.default.Fragment,null):x.default.createElement(yt,{state:e,isMobile:o,dispatch:b,debouncedFetchSearchResults:c,onSpecialtyClick:T})})))),"search"===e.focused&&x.default.createElement(nt,null,x.default.createElement(ut,{type:i,state:e,results:(null===(y=e.searchResults)||void 0===y?void 0:y[i])||[],location:e.selectedLocation.name,dispatch:b,isLoading:l,typeInformation:r,clientSlug:h}))))},xt=S.default.div`
|
|
566
|
+
`,ft=()=>x.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},x.default.createElement("path",{d:"M8.98307 14.3333C7.87196 14.3333 6.92752 13.9445 6.14974 13.1667C5.37196 12.3889 4.98307 11.4445 4.98307 10.3333V9.96668C4.08307 9.85557 3.33041 9.45557 2.72507 8.76668C2.1193 8.07779 1.81641 7.26668 1.81641 6.33334V3.10001C1.81641 2.93334 1.87463 2.79157 1.99107 2.67468C2.10796 2.55823 2.24974 2.50001 2.41641 2.50001H3.81641V2.33334C3.81641 2.1889 3.86374 2.06934 3.95841 1.97468C4.05263 1.88045 4.17196 1.83334 4.31641 1.83334C4.46085 1.83334 4.58041 1.88045 4.67507 1.97468C4.7693 2.06934 4.81641 2.1889 4.81641 2.33334V3.66668C4.81641 3.81112 4.7693 3.93045 4.67507 4.02468C4.58041 4.11934 4.46085 4.16668 4.31641 4.16668C4.17196 4.16668 4.05263 4.11934 3.95841 4.02468C3.86374 3.93045 3.81641 3.81112 3.81641 3.66668V3.50001H2.81641V6.33334C2.81641 7.06668 3.07752 7.69445 3.59974 8.21668C4.12196 8.7389 4.74974 9.00001 5.48307 9.00001C6.21641 9.00001 6.84418 8.7389 7.36641 8.21668C7.88863 7.69445 8.14974 7.06668 8.14974 6.33334V3.50001H7.14974V3.66668C7.14974 3.81112 7.10263 3.93045 7.00841 4.02468C6.91374 4.11934 6.79418 4.16668 6.64974 4.16668C6.5053 4.16668 6.38596 4.11934 6.29174 4.02468C6.19707 3.93045 6.14974 3.81112 6.14974 3.66668V2.33334C6.14974 2.1889 6.19707 2.06934 6.29174 1.97468C6.38596 1.88045 6.5053 1.83334 6.64974 1.83334C6.79418 1.83334 6.91374 1.88045 7.00841 1.97468C7.10263 2.06934 7.14974 2.1889 7.14974 2.33334V2.50001H8.54974C8.71641 2.50001 8.85818 2.55823 8.97507 2.67468C9.09152 2.79157 9.14974 2.93334 9.14974 3.10001V6.33334C9.14974 7.26668 8.84707 8.07779 8.24174 8.76668C7.63596 9.45557 6.88307 9.85557 5.98307 9.96668V10.3333C5.98307 11.1667 6.27485 11.8751 6.85841 12.4587C7.44152 13.0418 8.14974 13.3333 8.98307 13.3333C9.81641 13.3333 10.5249 13.0418 11.1084 12.4587C11.6915 11.8751 11.9831 11.1667 11.9831 10.3333V9.25001C11.6386 9.1389 11.3526 8.93601 11.1251 8.64134C10.8971 8.34712 10.7831 8.01112 10.7831 7.63334C10.7831 7.15557 10.9497 6.75001 11.2831 6.41668C11.6164 6.08334 12.0164 5.91668 12.4831 5.91668C12.9609 5.91668 13.3664 6.08334 13.6997 6.41668C14.0331 6.75001 14.1997 7.15557 14.1997 7.63334C14.1997 8.01112 14.086 8.34712 13.8584 8.64134C13.6304 8.93601 13.3386 9.1389 12.9831 9.25001V10.3333C12.9831 11.4445 12.5942 12.3889 11.8164 13.1667C11.0386 13.9445 10.0942 14.3333 8.98307 14.3333ZM12.4831 8.33334C12.6831 8.33334 12.8526 8.26401 12.9917 8.12534C13.1304 7.98623 13.1997 7.82223 13.1997 7.63334C13.1997 7.43334 13.1304 7.26401 12.9917 7.12534C12.8526 6.98623 12.6831 6.91668 12.4831 6.91668C12.2831 6.91668 12.1164 6.98623 11.9831 7.12534C11.8497 7.26401 11.7831 7.43334 11.7831 7.63334C11.7831 7.82223 11.8497 7.98623 11.9831 8.12534C12.1164 8.26401 12.2831 8.33334 12.4831 8.33334Z",fill:"#595959"})),mt=()=>x.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},x.default.createElement("path",{d:"M6.86836 9.26489V10.2386C6.86836 10.509 6.96294 10.7389 7.15209 10.9283C7.34124 11.1176 7.57093 11.2122 7.84114 11.2122C8.11135 11.2122 8.34133 11.1176 8.53106 10.9283C8.7208 10.7389 8.81567 10.509 8.81567 10.2386V9.26489H9.78936C10.0598 9.26489 10.2897 9.17031 10.479 8.98116C10.6684 8.79201 10.763 8.56233 10.763 8.29211C10.763 8.0219 10.6684 7.79192 10.479 7.60219C10.2897 7.41245 10.0598 7.31758 9.78936 7.31758H8.81567V6.34389C8.81567 6.07343 8.72109 5.84354 8.53194 5.65422C8.34279 5.4649 8.11311 5.37024 7.84289 5.37024C7.57268 5.37024 7.3427 5.4649 7.15297 5.65422C6.96323 5.84354 6.86836 6.07343 6.86836 6.34389V7.31758H5.89467C5.62421 7.31758 5.39432 7.41216 5.205 7.60131C5.01568 7.79046 4.92102 8.02014 4.92102 8.29036C4.92102 8.56057 5.01568 8.79055 5.205 8.98028C5.39432 9.17002 5.62421 9.26489 5.89467 9.26489H6.86836ZM3.40809 14.1333C3.02086 14.1333 2.68938 13.9954 2.41364 13.7196C2.13788 13.4439 2 13.1124 2 12.7252V6.07426C2 5.85132 2.04987 5.64011 2.14961 5.44063C2.24936 5.24116 2.38723 5.07689 2.56323 4.94782L6.99718 1.61486C7.24323 1.42712 7.52444 1.33325 7.84081 1.33325C8.15718 1.33325 8.43919 1.42712 8.68685 1.61486L13.1208 4.94782C13.2968 5.07689 13.4347 5.24116 13.5344 5.44063C13.6342 5.64011 13.684 5.85132 13.684 6.07426V12.7252C13.684 13.1124 13.5462 13.4439 13.2704 13.7196C12.9947 13.9954 12.6632 14.1333 12.2759 14.1333H3.40809ZM3.40809 12.9649H12.2759C12.3459 12.9649 12.4033 12.9424 12.4482 12.8974C12.4932 12.8525 12.5156 12.7951 12.5156 12.7252V6.07426C12.5156 6.03431 12.5069 5.99811 12.4894 5.96566C12.4719 5.9332 12.4482 5.90449 12.4183 5.87953L7.98433 2.55406C7.94438 2.51911 7.89694 2.50164 7.84202 2.50164C7.78709 2.50164 7.73965 2.51911 7.69971 2.55406L3.26576 5.87953C3.2358 5.90449 3.21209 5.9332 3.1946 5.96566C3.17712 5.99811 3.16839 6.03431 3.16839 6.07426V12.7252C3.16839 12.7951 3.19086 12.8525 3.2358 12.8974C3.28075 12.9424 3.33818 12.9649 3.40809 12.9649Z",fill:"#595959"})),Ct=()=>x.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},x.default.createElement("path",{d:"M7.99984 8.00004C8.3665 8.00004 8.68039 7.86949 8.9415 7.60837C9.20261 7.34726 9.33317 7.03337 9.33317 6.66671C9.33317 6.30004 9.20261 5.98615 8.9415 5.72504C8.68039 5.46393 8.3665 5.33337 7.99984 5.33337C7.63317 5.33337 7.31928 5.46393 7.05817 5.72504C6.79706 5.98615 6.6665 6.30004 6.6665 6.66671C6.6665 7.03337 6.79706 7.34726 7.05817 7.60837C7.31928 7.86949 7.63317 8.00004 7.99984 8.00004ZM7.99984 12.9C9.35539 11.6556 10.3609 10.525 11.0165 9.50837C11.6721 8.49171 11.9998 7.58893 11.9998 6.80004C11.9998 5.58893 11.6137 4.59726 10.8415 3.82504C10.0693 3.05282 9.12206 2.66671 7.99984 2.66671C6.87761 2.66671 5.93039 3.05282 5.15817 3.82504C4.38595 4.59726 3.99984 5.58893 3.99984 6.80004C3.99984 7.58893 4.32761 8.49171 4.98317 9.50837C5.63873 10.525 6.64428 11.6556 7.99984 12.9ZM7.99984 14.4167C7.91095 14.4167 7.82206 14.4 7.73317 14.3667C7.64428 14.3334 7.5665 14.2889 7.49984 14.2334C5.87761 12.8 4.6665 11.4695 3.8665 10.2417C3.0665 9.01393 2.6665 7.86671 2.6665 6.80004C2.6665 5.13337 3.20261 3.8056 4.27484 2.81671C5.34706 1.82782 6.58873 1.33337 7.99984 1.33337C9.41095 1.33337 10.6526 1.82782 11.7248 2.81671C12.7971 3.8056 13.3332 5.13337 13.3332 6.80004C13.3332 7.86671 12.9332 9.01393 12.1332 10.2417C11.3332 11.4695 10.1221 12.8 8.49984 14.2334C8.43317 14.2889 8.35539 14.3334 8.2665 14.3667C8.17761 14.4 8.08873 14.4167 7.99984 14.4167Z",fill:"#8C8C8C"})),bt=()=>x.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16"},x.default.createElement("path",{d:"M3.83333 0.5C2.94928 0.5 2.10143 0.851189 1.47631 1.47631C0.851189 2.10143 0.5 2.94928 0.5 3.83333C0.5 4.71739 0.851189 5.56523 1.47631 6.19036C2.10143 6.81548 2.94928 7.16667 3.83333 7.16667C4.71739 7.16667 5.56523 6.81548 6.19036 6.19036C6.81548 5.56523 7.16667 4.71739 7.16667 3.83333C7.16667 2.94928 6.81548 2.10143 6.19036 1.47631C5.56523 0.851189 4.71739 0.5 3.83333 0.5V0.5ZM10.5 0.5C9.57917 0.5 8.83333 1.24583 8.83333 2.16667V5.5C8.83333 6.42083 9.57917 7.16667 10.5 7.16667H13.8333C14.7542 7.16667 15.5 6.42083 15.5 5.5V2.16667C15.5 1.24583 14.7542 0.5 13.8333 0.5H10.5ZM3.83333 8.83333C2.94928 8.83333 2.10143 9.18452 1.47631 9.80964C0.851189 10.4348 0.5 11.2826 0.5 12.1667C0.5 13.0507 0.851189 13.8986 1.47631 14.5237C2.10143 15.1488 2.94928 15.5 3.83333 15.5C4.71739 15.5 5.56523 15.1488 6.19036 14.5237C6.81548 13.8986 7.16667 13.0507 7.16667 12.1667C7.16667 11.2826 6.81548 10.4348 6.19036 9.80964C5.56523 9.18452 4.71739 8.83333 3.83333 8.83333V8.83333ZM12.1667 8.83333C11.2826 8.83333 10.4348 9.18452 9.80964 9.80964C9.18452 10.4348 8.83333 11.2826 8.83333 12.1667C8.83333 13.0507 9.18452 13.8986 9.80964 14.5237C10.4348 15.1488 11.2826 15.5 12.1667 15.5C13.0507 15.5 13.8986 15.1488 14.5237 14.5237C15.1488 13.8986 15.5 13.0507 15.5 12.1667C15.5 11.2826 15.1488 10.4348 14.5237 9.80964C13.8986 9.18452 13.0507 8.83333 12.1667 8.83333V8.83333Z",fill:"#9AA2AC"})),yt=({state:e,isMobile:i,debouncedFetchSearchResults:l,selectedLocation:n,onSpecialtyClick:r,dispatch:c})=>{var u;const{t:p,locale:h}=a.useTranslations(),f=t.useRef(null),m=t.useMemo((()=>o.LOCALIZED_SLUGS[h]),[h]),C=t.useMemo((()=>({wrapper:{"&:after":{content:'""',width:"1px",height:"20px",backgroundColor:"#E4E8EC",position:"absolute",right:0,top:"13px"}},input:{border:i?"border: 1px solid #d9d9d9":"none",height:i?"40px":"46px !important",paddingRight:"30px","&:focus":{boxShadow:i?"box-shadow: 0px 0px 0px 2px #91caff":"none"}},rightSection:{width:"30px",svg:{fontSize:"20px"}}})),[i]),y=t.useCallback((function(e){console.log(e)}),[l,c]);return d.useOutsideClick(f,(()=>{c({type:at.ClickOutsideInputSpecialty})})),x.default.createElement(pt,{ref:f},x.default.createElement(g.Input.Wrapper,null,x.default.createElement(g.Input,{size:i?"md":"lg",placeholder:p("booking.searchPopup.specialties"),value:(null===(u=null==e?void 0:e.selectedSpecialty)||void 0===u?void 0:u.name)||"",rightSection:x.default.createElement(b.ChevronDown,null),styles:C,onFocus:()=>c({type:at.FocusInputSpecialty}),onChange:e=>{y(e.target.value)}})),"specialty"===e.focused&&x.default.createElement(ht,null,x.default.createElement(gt,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{r&&r({name:p("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:m.SPECIALTIES})}},x.default.createElement("div",{className:"image-item"},x.default.createElement(bt,null)),x.default.createElement(s.Text,{size:"md"},p("booking.searchBar.allSpecialties"))),e.allSpecialties.map((e=>x.default.createElement(gt,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),r&&r(Object.assign(Object.assign({},e),{total_doctor:0}))},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==n?void 0:n.id)===e.id},x.default.createElement("div",{className:"image-item"},x.default.createElement("img",{src:e.thumbnail,alt:e.name})),x.default.createElement(s.Text,{size:"md"},e.name))))))},vt=({state:e,type:i,isMobile:o,isLoading:l,initalSearchValue:n,typeInformation:r,debouncedFetchSearchResults:c,trackingAttributes:u,hideSpecialtySelection:p=!1,clientSlug:h="",focusSearchInput:f,onSearch:m,onEnterSearch:C,dispatch:b})=>{var y;const{t:v}=a.useTranslations(),E=t.useRef(null),S=t.useMemo((()=>u?{"data-event-category":u.dataEventCategory,"data-event-action":u.dataEventAction,"data-event-label":u.dataEventLabel}:{}),[u]),L=t.useMemo((()=>"doctor"===i?v("booking.searchBar.placeholder.doctor"):"service"===i?v("booking.searchBar.placeholder.service"):"hospital"===i?v("booking.searchBar.placeholder.hospital"):"specialty"===i?v("booking.searchBar.placeholder.specialty"):""),[i]),w=t.useMemo((()=>({root:{flex:1,"&.hide-specialty-selection":{".mantine-Input-rightSection":{display:"none"},input:{paddingLeft:"48px"},".mantine-Input-icon":{left:"0"}}}})),[]),O=t.useMemo((()=>({icon:{left:"165px"},input:{color:"#262626",'&[data-with-icon="true"]':{paddingLeft:"205px",paddingRight:"16px"}},rightSection:{left:0,width:"165px",padding:"1px"}})),[]),k=t.useMemo((()=>({input:{color:"#262626"}})),[]);d.useOutsideClick(E,(()=>{b({type:at.ClickOutsideInputSearch})}));const I=t.useCallback((function(t){b({type:at.ChangeInputSearch,payload:t}),"function"!=typeof m&&(t.trim().length>et[e.locale]||n||0===t.trim().length?c(t.trim(),e,i,h):(c.cancel(),b({type:at.DisplayInitialSearchResults})))}),[b,e,i]),T=t.useCallback((function(e){b({type:at.SelectSpecialty,payload:e}),f()}),[b]),j=t.useCallback((e=>{13===e.keyCode&&(e.stopPropagation(),e.preventDefault(),C&&C())}),[C]);return x.default.createElement(lt,{ref:E},"specialty"===i?x.default.createElement(g.Input.Wrapper,{styles:w},x.default.createElement(g.Input,{icon:x.default.createElement(s.Icon.Search,null),size:o?"md":"lg",placeholder:L,styles:k,value:e.searchKeywords,onFocus:()=>b({type:at.FocusInputSearchSpecialty}),onChange:e=>{I(e.target.value)},onKeyDown:j})):x.default.createElement(x.default.Fragment,null,"service"===i?x.default.createElement(g.Input.Wrapper,{styles:w},x.default.createElement(g.Input,{icon:x.default.createElement(s.Icon.Search,null),size:o?"md":"lg",name:"search-results",placeholder:L,onFocus:()=>b({type:at.FocusInputSearch}),value:e.searchKeywords,onChange:e=>{I(e.target.value)},onKeyDown:j})):x.default.createElement(x.default.Fragment,null,o&&!p?x.default.createElement(x.default.Fragment,null,x.default.createElement(yt,{state:e,isMobile:o,dispatch:b,debouncedFetchSearchResults:c,onSpecialtyClick:T}),x.default.createElement(g.Input.Wrapper,{styles:w},x.default.createElement(g.Input,{icon:x.default.createElement(s.Icon.Search,null),size:"md",placeholder:L,value:e.searchKeywords,name:"search-results",onFocus:()=>b({type:at.FocusInputSearch}),onChange:e=>{I(e.target.value)},onKeyDown:j}))):x.default.createElement(g.Input.Wrapper,{styles:w,className:p?"hide-specialty-selection":""},x.default.createElement(g.Input,Object.assign({icon:x.default.createElement(s.Icon.Search,null),size:"lg",placeholder:L,styles:O,name:"search-results",autoComplete:"off",value:e.searchKeywords,onChange:e=>{I(e.target.value)},onFocus:()=>b({type:at.FocusInputSearch}),onKeyDown:j},S,{rightSection:p?x.default.createElement(x.default.Fragment,null):x.default.createElement(yt,{state:e,isMobile:o,dispatch:b,debouncedFetchSearchResults:c,onSpecialtyClick:T})})))),"search"===e.focused&&x.default.createElement(nt,null,x.default.createElement(ut,{type:i,state:e,results:(null===(y=e.searchResults)||void 0===y?void 0:y[i])||[],location:e.selectedLocation.name,dispatch:b,isLoading:l,typeInformation:r,clientSlug:h}))))},xt=S.default.div`
|
|
567
567
|
position: relative;
|
|
568
568
|
|
|
569
569
|
${u.MediaQueries.mbDown} {
|
|
@@ -627,7 +627,7 @@
|
|
|
627
627
|
width: 12px;
|
|
628
628
|
height: 18px;
|
|
629
629
|
flex: 0 0 12px;
|
|
630
|
-
`,wt=({state:e,isMobile:i,debouncedFetchCitiesByKeyword:l,selectedLocation:n,trackingAttributes:c,onLocationClick:u,dispatch:p})=>{const{t:h,locale:
|
|
630
|
+
`,wt=({state:e,isMobile:i,debouncedFetchCitiesByKeyword:l,selectedLocation:n,trackingAttributes:c,onLocationClick:u,dispatch:p})=>{const{t:h,locale:f}=a.useTranslations(),m=t.useRef(null),C=t.useMemo((()=>c?{"data-event-category":c.dataEventCategory,"data-event-action":c.dataEventAction,"data-event-label":c.dataEventLabel}:{}),[c]),b=t.useCallback((function(t){p({type:at.ChangeInputLocation,payload:t}),t.trim().length>et[e.locale]?l(t.trim()):(l.cancel(),p({type:at.DisplayInitialCities}))}),[l,p]);return d.useOutsideClick(m,(()=>{p({type:at.ClickOutsideInputLocation})})),x.default.createElement(xt,{ref:m},x.default.createElement(g.Input.Wrapper,null,x.default.createElement(g.Input,Object.assign({size:i?"md":"lg",placeholder:"Search location",value:e.searchLocationKeywords,onFocus:()=>p({type:at.FocusInputLocation}),onChange:e=>{b(e.target.value)}},C))),"location"===e.focused&&x.default.createElement(Et,null,x.default.createElement(St,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{var e;u&&u({name:h("booking.searchBar.allLocations"),id:o.ID_OPTION_ALL_LOCATION,slug:null===(e=o.LOCALIZED_SLUGS[f])||void 0===e?void 0:e.ALL})}},x.default.createElement(Lt,{color:r.theme.colors.neutral400}),x.default.createElement(s.Text,{size:"md"},h("booking.searchBar.allLocations"))),e.cities.map((e=>x.default.createElement(St,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),u&&u(e)},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==n?void 0:n.id)===e.id},x.default.createElement(Lt,{color:r.theme.colors.neutral400}),x.default.createElement(s.Text,{size:"md"},e.name))))))},Ot=S.default.div`
|
|
631
631
|
display: flex;
|
|
632
632
|
flex-wrap: wrap;
|
|
633
633
|
row-gap: 8px;
|
|
@@ -688,7 +688,7 @@
|
|
|
688
688
|
line-height: 18px;
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
|
-
`,It=S.default(
|
|
691
|
+
`,It=S.default(g.Divider)`
|
|
692
692
|
margin: 24px 0 !important;
|
|
693
693
|
`,Tt=S.default.div`
|
|
694
694
|
display: flex;
|
|
@@ -710,7 +710,7 @@
|
|
|
710
710
|
text-align: center;
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
|
-
`,jt=({state:e,isMobile:i,specialties:l,isLoading:n,dispatch:c})=>{const{t:d,locale:u}=a.useTranslations(),{selectedLocation:p}=e,h=t.useMemo((()=>o.LOCALIZED_SLUGS[u]),[u]),
|
|
713
|
+
`,jt=({state:e,isMobile:i,specialties:l,isLoading:n,dispatch:c})=>{const{t:d,locale:u}=a.useTranslations(),{selectedLocation:p}=e,h=t.useMemo((()=>o.LOCALIZED_SLUGS[u]),[u]),f=t.useMemo((()=>l.length>=9||e.searchKeywords.trim().length<=et[e.locale]),[e.searchKeywords,l]);return x.default.createElement(x.default.Fragment,null,!i&&x.default.createElement(It,{color:"#E4E8EC"}),x.default.createElement(Ot,null,l.length>0&&!n&&x.default.createElement(x.default.Fragment,null,l.map(((e,t)=>t>=9?x.default.createElement(x.default.Fragment,null):x.default.createElement(kt,{key:e.id,onClick:()=>(e=>{let t="";e===o.SLUG_VACIN_ID?(t=`/${p.slug}/${h.HOSPITAL}/${o.CLIENT_KEY.GSK}/`,c({type:at.ClickOutsideInputSearchSpecialty})):t=`/${p.slug}/${h.DOCTOR}/${e}`,c({type:at.NavigateTo,payload:t})})(e.slug)},x.default.createElement("div",{className:"image-item"},x.default.createElement("img",{src:e.thumbnail,alt:e.name})),x.default.createElement("div",{className:"infor"},x.default.createElement("div",{className:"title"},e.name)))))),0===l.length&&!n&&x.default.createElement(s.Text,{size:"sm",color:r.theme.colors.gray400},d("booking.searchBar.noResults")),n&&Array(6).fill(void 0).map(((e,t)=>x.default.createElement(kt,{key:"loading"+t},x.default.createElement("div",{className:"image-item"},x.default.createElement(g.Skeleton,{height:40,animate:!0})),x.default.createElement("div",{className:"infor"},x.default.createElement("div",{className:"title"},x.default.createElement(g.Skeleton,{height:20,radius:"sm",animate:!0}))))))),f&&x.default.createElement(Tt,null,x.default.createElement("div",{className:"show-more",onClick:()=>{const e=`/${h.SPECIALTIES}`;c({type:at.NavigateTo,payload:e})}},d("home.seeAll"))))},Mt=S.default.div`
|
|
714
714
|
display: flex;
|
|
715
715
|
gap: 5px;
|
|
716
716
|
margin-top: 16px;
|
|
@@ -763,7 +763,7 @@
|
|
|
763
763
|
border-bottom: 1px solid ${r.theme.colors.neutral100};
|
|
764
764
|
`,_t=S.default(C.Container)`
|
|
765
765
|
padding: 0 16px;
|
|
766
|
-
`,$t=({currentTab:e,hideTabBookingSearch:i=[],isMobile:o,setCurrentTab:l})=>{const n=t.useMemo((()=>({root:{overflowY:o?"hidden":"initial",overflowX:o?"auto":"initial"},tabsList:{background:"rgba(255, 255, 255, 0)",borderBottom:"none",flexWrap:"nowrap",".mantine-Tabs-tab":{"&:last-child":{"&:after":{display:"none"}}}},tab:{padding:o?"12px 16px 12px 16px":"15px 40px 15px 40px",borderTop:"2px solid transparent",borderBottom:"none",margin:0,borderRadius:0,position:"relative",width:"auto",'&[data-active="true"]':{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:after":{display:"none"},"&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:hover":{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:after":{content:'""',width:"1px",height:"24px",backgroundColor:"#E4E8EC",position:"absolute",right:"-1px"}},tabLabel:{color:"#595959",fontSize:o?"14px":"16px",fontWeight:600,lineHeight:o?"22px":"24px"}})),[o]),s=(()=>{const{t:e}=a.useTranslations();return[{value:"hospital",label:e("booking.searchPopup.hospitals")},{value:"doctor",label:e("booking.searchPopup.doctors")},{value:"service",label:e("booking.searchPopup.services")},{value:"specialty",label:e("booking.searchPopup.specialties")}]})(),r=t.useMemo((()=>s.filter((e=>!i.includes(e.value)))||[]),[i,s]);return x.default.createElement(Pt,{className:"booking-search-tab"},x.default.createElement(_t,null,x.default.createElement(
|
|
766
|
+
`,$t=({currentTab:e,hideTabBookingSearch:i=[],isMobile:o,setCurrentTab:l})=>{const n=t.useMemo((()=>({root:{overflowY:o?"hidden":"initial",overflowX:o?"auto":"initial"},tabsList:{background:"rgba(255, 255, 255, 0)",borderBottom:"none",flexWrap:"nowrap",".mantine-Tabs-tab":{"&:last-child":{"&:after":{display:"none"}}}},tab:{padding:o?"12px 16px 12px 16px":"15px 40px 15px 40px",borderTop:"2px solid transparent",borderBottom:"none",margin:0,borderRadius:0,position:"relative",width:"auto",'&[data-active="true"]':{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:after":{display:"none"},"&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:hover":{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:after":{content:'""',width:"1px",height:"24px",backgroundColor:"#E4E8EC",position:"absolute",right:"-1px"}},tabLabel:{color:"#595959",fontSize:o?"14px":"16px",fontWeight:600,lineHeight:o?"22px":"24px"}})),[o]),s=(()=>{const{t:e}=a.useTranslations();return[{value:"hospital",label:e("booking.searchPopup.hospitals")},{value:"doctor",label:e("booking.searchPopup.doctors")},{value:"service",label:e("booking.searchPopup.services")},{value:"specialty",label:e("booking.searchPopup.specialties")}]})(),r=t.useMemo((()=>s.filter((e=>!i.includes(e.value)))||[]),[i,s]);return x.default.createElement(Pt,{className:"booking-search-tab"},x.default.createElement(_t,null,x.default.createElement(g.Tabs,{value:e,onTabChange:e=>{l(e)},styles:n},x.default.createElement(g.Tabs.List,null,r.map((e=>x.default.createElement(g.Tabs.Tab,{value:e.value,key:e.value},e.label)))))))};var Ft;!function(e){e.doctor="doctor",e.service="hospital_service",e.hospital="hospital_branch"}(Ft||(Ft={}));const Dt=S.default.div`
|
|
767
767
|
background-color: var(--neutral50);
|
|
768
768
|
padding: 12px 0;
|
|
769
769
|
box-shadow: inset 0px 1px 0px #e4e8ec;
|
|
@@ -782,4 +782,4 @@
|
|
|
782
782
|
display: flex;
|
|
783
783
|
align-items: center;
|
|
784
784
|
}
|
|
785
|
-
`;var Bt;!function(e){e[e.SPECIALTY=1]="SPECIALTY",e[e.DOCTOR=2]="DOCTOR",e[e.CLINIC=3]="CLINIC",e[e.SERVICE=4]="SERVICE"}(Bt||(Bt={}));var Kt=Object.freeze({__proto__:null,get RedirectType(){return Bt}});exports.BookingSearchBar=({isMobile:i,careApiDomain:l,geoLocationPermission:n,geoLocationCoordinates:s,initialSelectedCity:r,initialSearchValue:c="",careFrontDomain:d="/care",isDebug:u=!1,askForGeolocationPermission:p=!1,gaTrackingSearchBar:h,gaTrackingLocationSearch:f,autoCompleteDisabled:m=!1,inputSearchPlaceholder:C="",isOptionAllLocation:b=!1,hideResults:y=[],isNavResultItem:v=!0,routerPush:S,onGeoLocationPermissionChange:L,onSearch:w,onChangeLocation:O})=>{const{t:R,locale:A}=a.useTranslations(),P=t.useRef(null),_=t.useRef(null),[$,F]=t.useState(void 0),[D,B]=t.useState(!1),{geoLocationPermission:K,geoLocationCoordinates:V,requestGeoLocation:H}=k(),[z,Z]=t.useReducer(me,he,(e=>Object.assign(Object.assign({},e),{isDebug:u,isMobile:i,geoLocationPermission:n||K||"unset",geoLocationCoordinates:s||V||null,searchKeywords:c,initialSelectedCity:r||null,selectedLocation:r||e.selectedLocation||null,searchLocationKeywords:(null==r?void 0:r.name)||e.searchLocationKeywords,autoCompleteDisabled:m,inputSearchPlaceholder:C,locale:A}))),{navigateTo:U,focused:Q,isLoadingCities:q,cities:Y,searchKeywords:W,geoLocationPermission:J,selectedLocation:X,initialSelectedCity:ee,defaultCity:te,searchResults:ae,isLoadingSearchResults:ie,isMobileModalOpened:oe,inputSearchPlaceholder:ne}=z,{fetchCitiesByLocation:se,fetchCitiesByKeyword:re,fetchSearchResults:ce}=function({dispatch:e,careApiDomain:a,locale:i="vi-VN"}){const l=t.useCallback((function(t,o={}){const l=`${a}${t}`;return e({type:ge.FetchCitiesStart}),fetch(qe(l,o,i),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:ge.FetchCitiesFinish})))}),[i]);return{fetchCitiesByLocation:t.useCallback((function({coordinates:t}){let a={};const o={};t&&(a={lat:t.lat,lng:t.lng}),"ms-MY"===i&&(o.noPaging=1);const n=[l(g.PATHS.GET_CITY_BY_IP,Object.assign(Object.assign({},a),o))];return"zh-TW"===i&&n.push(l(g.PATHS.GET_CITIES_LIST,{noPaging:1})),Promise.all(n).then((([t,a])=>{const i=Object.assign({},t);if(a){const e=i.cities.map((e=>e.id));i.cities=i.cities.concat(a.cities.filter((t=>!e.includes(t.id))))}e({type:ge.FetchCitiesByGeoIpComplete,payload:i})})).catch((e=>console.error("error loading cities by location",e)))}),[i,a,e]),fetchCitiesByKeyword:t.useCallback((function(t){return l(g.PATHS.GET_CITIES_LIST,{keyword:t}).then((t=>{e({type:ge.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,a,e]),fetchSearchResults:t.useCallback((function(t,l){const n=`${a}${g.PATHS.GET_SEARCH_V2}`;e({type:ge.FetchSearchResultsStart});const{defaultCity:s,selectedLocation:r,geoLocationCoordinates:c}=l;let d="";if(!r||!s)return void e({type:ge.FetchSearchResultsFinish});r.id===o.ID_OPTION_CURRENT_LOCATION?c||(d=s.id):d=r.id===o.ID_OPTION_ALL_LOCATION?"":r.id;const u=(null==c?void 0:c.lat)||"",p=(null==c?void 0:c.lng)||"";return fetch(qe(n,{domain:a,searchType:"global",keyword:t.trim().length>pe[i]?t.trim():"",city:d===o.ID_OPTION_CURRENT_LOCATION?"":d,lat:u,lng:p},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>e({type:ge.FetchSearchResultsComplete,payload:t}))).catch((e=>{console.log("error loading search results",{url:n,error:e})})).finally((()=>e({type:ge.FetchSearchResultsFinish})))}),[i,a,e])}}({dispatch:Z,locale:A,careApiDomain:l}),de=t.useMemo((()=>{var e;return{id:o.ID_OPTION_CURRENT_LOCATION,name:R("booking.searchBar.currentLocation"),slug:null===(e=o.LOCALIZED_SLUGS[A])||void 0===e?void 0:e.CURRENT}}),[R,A]),fe=t.useMemo((()=>E.default(re,400)),[re]),Ce=t.useMemo((()=>E.default(ce,400)),[ce]);t.useEffect((()=>{""!==c&&c!==z.searchKeywords&&Z({type:ge.UpdateInitialSearchValue,payload:c})}),[c]),t.useEffect((()=>{p&&(null==X?void 0:X.id)===o.ID_OPTION_CURRENT_LOCATION&&"unset"===J&&H()}),[p,X,J]),t.useEffect((()=>{n||J===K||("granted"===K&&V?Z({type:ge.GrantGeoLocationPermission,payload:V}):"denied"===K&&Z({type:ge.DenyGeoLocationPermission}))}),[J,K,V,n]),t.useEffect((()=>{U&&(S?S(U):window.location.href=`${d}${U}`)}),[U]);const be=t.useCallback((function(){Z({type:ge.SelectCurrentLocation,payload:de})}),[R,Z]);t.useEffect((()=>{var e;"denied"===J||ee||Z({type:ge.SelectLocation,payload:{name:R("booking.searchBar.allLocations"),id:o.ID_OPTION_ALL_LOCATION,slug:null===(e=o.LOCALIZED_SLUGS[A])||void 0===e?void 0:e.ALL}}),L&&L(J,z.geoLocationCoordinates),i&&"granted"===J&&X&&Z({type:ge.FocusInputSearch}),se({coordinates:z.geoLocationCoordinates})}),[J]),t.useEffect((()=>{X&&te&&ce(z.searchKeywords,z)}),[X,te]),t.useEffect((()=>{C!==ne&&Z({type:ge.SetInputSearchPlaceholder,payload:C})}),[C,ne]),t.useEffect((()=>{oe?document.body.classList.add("care-popup-open"):document.body.classList.remove("care-popup-open")}),[oe]);const ye=t.useCallback((function(e){"ms-MY"===A&&B(!0),Z({type:ge.SelectLocation,payload:e}),"ms-MY"!==A&&Ee(),O&&O(e)}),[R,Z]);function ve(){"ms-MY"===A&&B(!0),i&&"granted"!==z.geoLocationPermission?H():(be(),"ms-MY"!==A&&Ee())}function xe(){var e;P.current&&(null===(e=P.current.querySelector('input[name="search-location"]'))||void 0===e||e.focus())}function Ee(){var e;P.current&&(null===(e=P.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}function Se(){Z({type:ge.CloseMobileModal})}function Le(){return"location"!==Q?null:x.default.createElement(G,{isLoading:q,cities:Y,onLocationClick:ye,onCurrentLocationClick:ve,isLocationLoading:q,geoLocationPermission:J,selectedLocation:X,isOptionAllLocation:b})}function ke(){return"search"!==Q?null:z.autoCompleteDisabled?i?x.default.createElement(we,{onClick:()=>{w({cityId:z.selectedLocation.id,keyword:W}),Se()}}):null:x.default.createElement(Qe,{data:ae,state:z,dispatch:Z,isMobile:!1,keyword:W,isLoading:ie,hideResults:y,isNavResultItem:v})}function Ie(){return x.default.createElement(Oe,{isMobile:i,state:z,dispatch:Z,debouncedFetchCitiesByKeyword:fe,debouncedFetchSearchResults:Ce,focusLocationInput:xe,focusSearchInput:Ee,renderLocationResults:Le,renderSearchResults:ke,trackingAttributes:h,locationTrackingAttributes:f,onSearch:w,initalSearchValue:c})}return t.useEffect((()=>{if(window.visualViewport){const e=e=>{const t=e.target;F(null==t?void 0:t.height)};return window.visualViewport.addEventListener("resize",e,{passive:!0}),()=>{window.visualViewport.removeEventListener("resize",e)}}}),[F]),t.useEffect((()=>{if(X&&D&&"ms-MY"===A){const e=`/${X.slug}/hospital`;Z({type:ge.NavigateTo,payload:e}),B(!1)}}),[D,A,X]),i?x.default.createElement(x.default.Fragment,null,x.default.createElement(N,null),x.default.createElement(M,{ref:_}),x.default.createElement(T,{id:"booking-search-bar",ref:P,"data-is-modal":i&&oe,style:{"--mobile-care-searchbar-height":oe&&$?`${$}px`:"100%"}},oe?x.default.createElement(x.default.Fragment,null,x.default.createElement(j,null,x.default.createElement(ue,{headingText:R("booking.searchBar.searchButton"),onLeftClick:Se}),Ie()),Le(),ke()):x.default.createElement(le,{onClick:function(){var t;return e.__awaiter(this,void 0,void 0,(function*(){_.current&&_.current.focus(),Z({type:ge.OpenMobileModal}),yield Promise.resolve(),P.current&&(null===(t=P.current.querySelector('input[name="search-location"]'))||void 0===t||t.focus())}))},focused:Q,value:W,trackingAttributes:h,inputSearchPlaceholder:C}))):x.default.createElement(I,{id:"booking-search-bar",ref:P},Ie())},exports.BookingSearchBarV2=({isMobile:e,careApiDomain:i,geoLocationPermission:l,geoLocationCoordinates:n,initialSelectedCity:s,initialSearchValue:r="",initTypeSearch:c="hospital",initSpecialty:u,careFrontDomain:p="/care",isDebug:h=!1,gaTrackingSearchBar:m,gaTrackingLocationSearch:C,autoCompleteDisabled:b=!1,inputSearchPlaceholder:y="",hideTabBookingSearch:v=[],hideSpecialtySelection:S=!1,hidePopularSearchKeys:L=!1,clientSlug:w="",routerPush:O,onGeoLocationPermissionChange:I,onChangeLocation:T})=>{const{locale:j,t:M}=a.useTranslations(),R=t.useRef(null),N=t.useRef(null),[A,P]=t.useState(c),{geoLocationPermission:_,geoLocationCoordinates:$}=k(),[F,D]=t.useReducer(ot,tt,(t=>Object.assign(Object.assign({},t),{isDebug:h,isMobile:e,geoLocationPermission:l||_||"unset",geoLocationCoordinates:n||$||null,searchKeywords:r,initialSelectedCity:s||null,selectedLocation:s||t.selectedLocation||null,searchLocationKeywords:(null==s?void 0:s.name)||t.searchLocationKeywords,autoCompleteDisabled:b,inputSearchPlaceholder:y,locale:j}))),{navigateTo:B,focusedSpecialty:K,searchKeywords:V,geoLocationPermission:H,selectedLocation:z,selectedSpecialty:G,initialSelectedCity:Z,searchResults:U,isLoadingSearchResults:Q}=F,{fetchCitiesByLocation:q,fetchCitiesByKeyword:Y,fetchSearchResults:W,fetchAllSpecialties:J,fetchPopularKeys:X}=function({dispatch:e,careApiDomain:a,locale:i="vi-VN",client:l=""}){const n=t.useCallback((function(t,o={}){const l=`${a}${t}`;return e({type:at.FetchCitiesStart}),fetch(qe(l,o,i),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:at.FetchCitiesFinish})))}),[i]);return{fetchCitiesByLocation:t.useCallback((function({coordinates:t}){let a={};const s={};t&&(a={lat:t.lat,lng:t.lng}),"ms-MY"===i&&(s.noPaging=1);const r=[n(g.PATHS.GET_CITY_BY_IP,Object.assign(Object.assign(Object.assign({},a),s),{client:o.CLIENT_KEY.MSD===l?"":l}))];return"zh-TW"===i&&r.push(n(g.PATHS.GET_CITIES_LIST,{noPaging:1,client:o.CLIENT_KEY.MSD===l?"":l})),Promise.all(r).then((([t,a])=>{const i=Object.assign({},t);if(a){const e=i.cities.map((e=>e.id));i.cities=i.cities.concat(a.cities.filter((t=>!e.includes(t.id))))}e({type:at.FetchCitiesByGeoIpComplete,payload:i})})).catch((e=>console.error("error loading cities by location",e)))}),[i,a,e]),fetchCitiesByKeyword:t.useCallback((function(t){return n(g.PATHS.GET_CITIES_LIST,{keyword:t,client:l}).then((t=>{e({type:at.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,a,e]),fetchSearchResults:t.useCallback((function(t,n,s,r,c){const d="specialty"===s?`${a}${g.PATHS.GET_SEARCH_SPECIALTY}`:`${a}${g.PATHS.GET_SEARCH_V2}`;e({type:at.FetchSearchResultsStart});const{selectedLocation:u,geoLocationCoordinates:p,selectedSpecialty:h}=n;let f="";if(!u)return void e({type:at.FetchSearchResultsFinish});f=u.id===o.ID_OPTION_ALL_LOCATION?"":u.id;const m=(null==p?void 0:p.lat)||"",C=(null==p?void 0:p.lng)||"",b=(null==h?void 0:h.id)>0?null==h?void 0:h.id:"",y=t.trim().length>et[i]?t.trim():"";return fetch(qe(d,{domain:a,searchType:s||"global",keyword:y,city:f===o.ID_OPTION_CURRENT_LOCATION?"":f,lat:m,lng:C,specialty_id:b,client_slug:o.CLIENT_KEY.MSD===r?"":r,msd:o.CLIENT_KEY.MSD===l?1:""},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{let a=[];"specialty"!==s&&(a=t.searches),"specialty"===s&&(a=y?t.specialties:t.default),e({type:at.FetchSearchResultsComplete,payload:{key:s,searches:a||[]}}),c&&e({type:at.UpdateInitialSearchResults,payload:{key:s,searches:a||[]}})})).catch((e=>{console.log("error loading search results",{url:d,error:e})})).finally((()=>e({type:at.FetchSearchResultsFinish})))}),[i,a,e]),fetchAllSpecialties:t.useCallback((function(){const t=`${a}${g.PATHS.GET_SEARCH_SPECIALTY}`;return fetch(qe(t,{domain:a,searchType:"",msd:o.CLIENT_KEY.MSD===l?1:""},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{e({type:at.FetchAllSpecialties,payload:t.specialties||[]})})).catch((e=>{console.log("error loading search results",{url:t,error:e})}))}),[i,a,e]),fetchPopularKeys:t.useCallback((function(t){const o=`${a}${g.PATHS.GET_SEARCH_POPULAR_KEY}`;return fetch(qe(o,{domain:a,searchType:Ft[t],sort_by:"display_order",sort_order:"asc"},i)).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{e({type:at.FetchPopularKeys,payload:t.popular_searches||[]})})).catch((e=>{console.log("error loading search results",{url:o,error:e})}))}),[i,a,e])}}({dispatch:D,locale:j,careApiDomain:i,client:w}),ee=t.useMemo((()=>o.LOCALIZED_SLUGS[j]),[j]),te=t.useMemo((()=>({doctor:{name:M("booking.searchPopup.doctors"),icon:x.default.createElement(ft,null),slug:ee.DOCTOR},service:{name:M("booking.searchPopup.services"),icon:x.default.createElement(mt,null),slug:ee.SERVICE},hospital:{name:M("booking.searchPopup.hospitals"),icon:x.default.createElement(Ct,null),slug:ee.HOSPITAL},specialty:{name:M("booking.searchPopup.specialties"),icon:x.default.createElement(bt,null),slug:ee.SPECIALTIES}})),[A]),ae=t.useMemo((()=>E.default(Y,400)),[Y]),ie=t.useMemo((()=>E.default(W,400)),[W]),oe=t.useCallback((function(e){D({type:at.SelectLocation,payload:e}),le(),T&&T(e)}),[M,D]);function le(){var e;R.current&&(null===(e=R.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}function ne(){let e="";const{slug:t}=te[A];let a="";const i=o.MAPPING_CLIENT_WITH_SLUG[j][w];("doctor"===A||"hospital"===A)&&F.selectedSpecialty.id>0&&(a=`&specialtyId=${F.selectedSpecialty.id}`),e="specialty"===A?`/${t}`:`/${z.slug}/${t}`,i&&(e+=`/${i}`),e+=`?q=${V}${a}`,e&&D({type:at.NavigateTo,payload:e})}return d.useOutsideClick(N,(()=>{D({type:at.ClickOutsideInputSearchSpecialty})})),t.useEffect((()=>{var t;"denied"===H||Z||D({type:at.SelectLocation,payload:{name:M("booking.searchBar.allLocations"),id:o.ID_OPTION_ALL_LOCATION,slug:null===(t=o.LOCALIZED_SLUGS[j])||void 0===t?void 0:t.ALL}}),I&&I(H,F.geoLocationCoordinates),e&&"granted"===H&&z&&D({type:at.FocusInputSearch}),q({coordinates:F.geoLocationCoordinates})}),[H]),t.useEffect((()=>{const e=u||{name:M("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:ee.SPECIALTIES};F.selectedSpecialty||D({type:at.SelectSpecialty,payload:e})}),[u,F.selectedSpecialty]),t.useEffect((()=>{J()}),[]),t.useEffect((()=>{X(A)}),[A]),t.useEffect((()=>{B&&(O?O(B):window.location.href=`${p}${B}`)}),[B]),t.useEffect((()=>{W(F.searchKeywords,F,A,w,!0)}),[z,G,A]),x.default.createElement(Ye,{ref:R},x.default.createElement($t,{currentTab:A,setCurrentTab:P,isMobile:e,hideTabBookingSearch:v}),x.default.createElement(We,{className:"booking-search-container"},x.default.createElement(Je,null,x.default.createElement(Xe,null,x.default.createElement("div",{ref:N},x.default.createElement(f.Flex,{gap:"12px",justify:"space-between",align:"center",direction:e?"column":"row",className:"flex-search-input"},"specialty"!==A&&x.default.createElement(wt,{state:F,isMobile:e,dispatch:D,debouncedFetchCitiesByKeyword:ae,selectedLocation:z,onLocationClick:oe,trackingAttributes:C}),x.default.createElement(vt,{type:A,isMobile:e,state:F,dispatch:D,debouncedFetchSearchResults:ie,initalSearchValue:r,focusSearchInput:le,onEnterSearch:ne,typeInformation:te,trackingAttributes:m,isLoading:Q,hideSpecialtySelection:S,clientSlug:w}),x.default.createElement(f.Button,{size:e?"md":"lg",color:"#2D87F3",fullWidth:e,variant:"filled",onClick:ne,styles:{root:{height:e?"40px":"48px"}}},M("booking.searchBar.searchButton"))),!L&&"specialty"!==A&&F.popularKeys.length>0&&x.default.createElement(At,{type:A,state:F,typeInformation:te,dispatch:D}),"specialty"===A&&"search"===K&&x.default.createElement(jt,{state:F,isMobile:e,dispatch:D,specialties:(null==U?void 0:U.specialty)||[],isLoading:Q}))))))},exports.TextDivider=({children:e,icon:t,className:a,style:i})=>x.default.createElement(Dt,{style:i,className:a},x.default.createElement(C.Container,null,x.default.createElement("div",{className:"icon-wrapper"},t),x.default.createElement(s.Text,{size:"c1",color:"var(--neutral800)"},e))),exports.types=Kt;
|
|
785
|
+
`;var Bt;!function(e){e[e.SPECIALTY=1]="SPECIALTY",e[e.DOCTOR=2]="DOCTOR",e[e.CLINIC=3]="CLINIC",e[e.SERVICE=4]="SERVICE"}(Bt||(Bt={}));var Kt=Object.freeze({__proto__:null,get RedirectType(){return Bt}});exports.BookingSearchBar=({isMobile:i,careApiDomain:l,geoLocationPermission:n,geoLocationCoordinates:s,initialSelectedCity:r,initialSearchValue:c="",careFrontDomain:d="/care",isDebug:u=!1,askForGeolocationPermission:p=!1,gaTrackingSearchBar:g,gaTrackingLocationSearch:f,autoCompleteDisabled:m=!1,inputSearchPlaceholder:C="",isOptionAllLocation:b=!1,hideResults:y=[],isNavResultItem:v=!0,routerPush:S,onGeoLocationPermissionChange:L,onSearch:w,onChangeLocation:O})=>{const{t:R,locale:A}=a.useTranslations(),P=t.useRef(null),_=t.useRef(null),[$,F]=t.useState(void 0),[D,B]=t.useState(!1),{geoLocationPermission:K,geoLocationCoordinates:V,requestGeoLocation:H}=k(),[z,Z]=t.useReducer(me,he,(e=>Object.assign(Object.assign({},e),{isDebug:u,isMobile:i,geoLocationPermission:n||K||"unset",geoLocationCoordinates:s||V||null,searchKeywords:c,initialSelectedCity:r||null,selectedLocation:r||e.selectedLocation||null,searchLocationKeywords:(null==r?void 0:r.name)||e.searchLocationKeywords,autoCompleteDisabled:m,inputSearchPlaceholder:C,locale:A}))),{navigateTo:U,focused:Q,isLoadingCities:Y,cities:q,searchKeywords:W,geoLocationPermission:J,selectedLocation:X,initialSelectedCity:ee,defaultCity:te,searchResults:ae,isLoadingSearchResults:ie,isMobileModalOpened:oe,inputSearchPlaceholder:ne}=z,{fetchCitiesByLocation:se,fetchCitiesByKeyword:re,fetchSearchResults:ce}=function({dispatch:e,careApiDomain:a,locale:i="vi-VN"}){const l=t.useCallback((function(t,o={}){const l=`${a}${t}`;return e({type:ge.FetchCitiesStart}),fetch(Ye(l,o,i),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:ge.FetchCitiesFinish})))}),[i]);return{fetchCitiesByLocation:t.useCallback((function({coordinates:t}){let a={};const o={};t&&(a={lat:t.lat,lng:t.lng}),"ms-MY"===i&&(o.noPaging=1);const n=[l(h.PATHS.GET_CITY_BY_IP,Object.assign(Object.assign({},a),o))];return"zh-TW"===i&&n.push(l(h.PATHS.GET_CITIES_LIST,{noPaging:1})),Promise.all(n).then((([t,a])=>{const i=Object.assign({},t);if(a){const e=i.cities.map((e=>e.id));i.cities=i.cities.concat(a.cities.filter((t=>!e.includes(t.id))))}e({type:ge.FetchCitiesByGeoIpComplete,payload:i})})).catch((e=>console.error("error loading cities by location",e)))}),[i,a,e]),fetchCitiesByKeyword:t.useCallback((function(t){return l(h.PATHS.GET_CITIES_LIST,{keyword:t}).then((t=>{e({type:ge.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,a,e]),fetchSearchResults:t.useCallback((function(t,l){const n=`${a}${h.PATHS.GET_SEARCH_V2}`;e({type:ge.FetchSearchResultsStart});const{defaultCity:s,selectedLocation:r,geoLocationCoordinates:c}=l;let d="";if(!r||!s)return void e({type:ge.FetchSearchResultsFinish});r.id===o.ID_OPTION_CURRENT_LOCATION?c||(d=s.id):d=r.id===o.ID_OPTION_ALL_LOCATION?"":r.id;const u=(null==c?void 0:c.lat)||"",p=(null==c?void 0:c.lng)||"";return fetch(Ye(n,{domain:a,searchType:"global",keyword:t.trim().length>pe[i]?t.trim():"",city:d===o.ID_OPTION_CURRENT_LOCATION?"":d,lat:u,lng:p},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>e({type:ge.FetchSearchResultsComplete,payload:t}))).catch((e=>{console.log("error loading search results",{url:n,error:e})})).finally((()=>e({type:ge.FetchSearchResultsFinish})))}),[i,a,e])}}({dispatch:Z,locale:A,careApiDomain:l}),de=t.useMemo((()=>{var e;return{id:o.ID_OPTION_CURRENT_LOCATION,name:R("booking.searchBar.currentLocation"),slug:null===(e=o.LOCALIZED_SLUGS[A])||void 0===e?void 0:e.CURRENT}}),[R,A]),fe=t.useMemo((()=>E.default(re,400)),[re]),Ce=t.useMemo((()=>E.default(ce,400)),[ce]);t.useEffect((()=>{""!==c&&c!==z.searchKeywords&&Z({type:ge.UpdateInitialSearchValue,payload:c})}),[c]),t.useEffect((()=>{p&&(null==X?void 0:X.id)===o.ID_OPTION_CURRENT_LOCATION&&"unset"===J&&H()}),[p,X,J]),t.useEffect((()=>{n||J===K||("granted"===K&&V?Z({type:ge.GrantGeoLocationPermission,payload:V}):"denied"===K&&Z({type:ge.DenyGeoLocationPermission}))}),[J,K,V,n]),t.useEffect((()=>{U&&(S?S(U):window.location.href=`${d}${U}`)}),[U]);const be=t.useCallback((function(){Z({type:ge.SelectCurrentLocation,payload:de})}),[R,Z]);t.useEffect((()=>{var e;"denied"===J||ee||Z({type:ge.SelectLocation,payload:{name:R("booking.searchBar.allLocations"),id:o.ID_OPTION_ALL_LOCATION,slug:null===(e=o.LOCALIZED_SLUGS[A])||void 0===e?void 0:e.ALL}}),L&&L(J,z.geoLocationCoordinates),i&&"granted"===J&&X&&Z({type:ge.FocusInputSearch}),se({coordinates:z.geoLocationCoordinates})}),[J]),t.useEffect((()=>{X&&te&&ce(z.searchKeywords,z)}),[X,te]),t.useEffect((()=>{C!==ne&&Z({type:ge.SetInputSearchPlaceholder,payload:C})}),[C,ne]),t.useEffect((()=>{oe?document.body.classList.add("care-popup-open"):document.body.classList.remove("care-popup-open")}),[oe]);const ye=t.useCallback((function(e){"ms-MY"===A&&B(!0),Z({type:ge.SelectLocation,payload:e}),"ms-MY"!==A&&Ee(),O&&O(e)}),[R,Z]);function ve(){"ms-MY"===A&&B(!0),i&&"granted"!==z.geoLocationPermission?H():(be(),"ms-MY"!==A&&Ee())}function xe(){var e;P.current&&(null===(e=P.current.querySelector('input[name="search-location"]'))||void 0===e||e.focus())}function Ee(){var e;P.current&&(null===(e=P.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}function Se(){Z({type:ge.CloseMobileModal})}function Le(){return"location"!==Q?null:x.default.createElement(G,{isLoading:Y,cities:q,onLocationClick:ye,onCurrentLocationClick:ve,isLocationLoading:Y,geoLocationPermission:J,selectedLocation:X,isOptionAllLocation:b})}function ke(){return"search"!==Q?null:z.autoCompleteDisabled?i?x.default.createElement(we,{onClick:()=>{w({cityId:z.selectedLocation.id,keyword:W}),Se()}}):null:x.default.createElement(Qe,{data:ae,state:z,dispatch:Z,isMobile:!1,keyword:W,isLoading:ie,hideResults:y,isNavResultItem:v})}function Ie(){return x.default.createElement(Oe,{isMobile:i,state:z,dispatch:Z,debouncedFetchCitiesByKeyword:fe,debouncedFetchSearchResults:Ce,focusLocationInput:xe,focusSearchInput:Ee,renderLocationResults:Le,renderSearchResults:ke,trackingAttributes:g,locationTrackingAttributes:f,onSearch:w,initalSearchValue:c})}return t.useEffect((()=>{if(window.visualViewport){const e=e=>{const t=e.target;F(null==t?void 0:t.height)};return window.visualViewport.addEventListener("resize",e,{passive:!0}),()=>{window.visualViewport.removeEventListener("resize",e)}}}),[F]),t.useEffect((()=>{if(X&&D&&"ms-MY"===A){const e=`/${X.slug}/hospital`;Z({type:ge.NavigateTo,payload:e}),B(!1)}}),[D,A,X]),i?x.default.createElement(x.default.Fragment,null,x.default.createElement(N,null),x.default.createElement(M,{ref:_}),x.default.createElement(T,{id:"booking-search-bar",ref:P,"data-is-modal":i&&oe,style:{"--mobile-care-searchbar-height":oe&&$?`${$}px`:"100%"}},oe?x.default.createElement(x.default.Fragment,null,x.default.createElement(j,null,x.default.createElement(ue,{headingText:R("booking.searchBar.searchButton"),onLeftClick:Se}),Ie()),Le(),ke()):x.default.createElement(le,{onClick:function(){var t;return e.__awaiter(this,void 0,void 0,(function*(){_.current&&_.current.focus(),Z({type:ge.OpenMobileModal}),yield Promise.resolve(),P.current&&(null===(t=P.current.querySelector('input[name="search-location"]'))||void 0===t||t.focus())}))},focused:Q,value:W,trackingAttributes:g,inputSearchPlaceholder:C}))):x.default.createElement(I,{id:"booking-search-bar",ref:P},Ie())},exports.BookingSearchBarV2=({isMobile:e,careApiDomain:i,geoLocationPermission:l,geoLocationCoordinates:n,initialSelectedCity:s,initialSearchValue:r="",initTypeSearch:c="hospital",initSpecialty:u,careFrontDomain:p="/care",isDebug:f=!1,gaTrackingSearchBar:m,gaTrackingLocationSearch:C,autoCompleteDisabled:b=!1,inputSearchPlaceholder:y="",hideTabBookingSearch:v=[],hideSpecialtySelection:S=!1,hidePopularSearchKeys:L=!1,clientSlug:w="",routerPush:O,onGeoLocationPermissionChange:I,onChangeLocation:T})=>{const{locale:j,t:M}=a.useTranslations(),R=t.useRef(null),N=t.useRef(null),[A,P]=t.useState(c),{geoLocationPermission:_,geoLocationCoordinates:$}=k(),[F,D]=t.useReducer(ot,tt,(t=>Object.assign(Object.assign({},t),{isDebug:f,isMobile:e,geoLocationPermission:l||_||"unset",geoLocationCoordinates:n||$||null,searchKeywords:r,initialSelectedCity:s||null,selectedLocation:s||t.selectedLocation||null,searchLocationKeywords:(null==s?void 0:s.name)||t.searchLocationKeywords,autoCompleteDisabled:b,inputSearchPlaceholder:y,locale:j}))),{navigateTo:B,focusedSpecialty:K,searchKeywords:V,geoLocationPermission:H,selectedLocation:z,selectedSpecialty:G,initialSelectedCity:Z,searchResults:U,isLoadingSearchResults:Q}=F,{fetchCitiesByLocation:Y,fetchCitiesByKeyword:q,fetchSearchResults:W,fetchAllSpecialties:J,fetchPopularKeys:X}=function({dispatch:e,careApiDomain:a,locale:i="vi-VN",client:l=""}){const n=t.useCallback((function(t,o={}){const l=`${a}${t}`;return e({type:at.FetchCitiesStart}),fetch(Ye(l,o,i),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:at.FetchCitiesFinish})))}),[i]);return{fetchCitiesByLocation:t.useCallback((function({coordinates:t}){let a={};const s={};t&&(a={lat:t.lat,lng:t.lng}),"ms-MY"===i&&(s.noPaging=1);const r=[n(h.PATHS.GET_CITY_BY_IP,Object.assign(Object.assign(Object.assign({},a),s),{client:o.CLIENT_KEY.MSD===l?"":l}))];return"zh-TW"===i&&r.push(n(h.PATHS.GET_CITIES_LIST,{noPaging:1,client:o.CLIENT_KEY.MSD===l?"":l})),Promise.all(r).then((([t,a])=>{const i=Object.assign({},t);if(a){const e=i.cities.map((e=>e.id));i.cities=i.cities.concat(a.cities.filter((t=>!e.includes(t.id))))}e({type:at.FetchCitiesByGeoIpComplete,payload:i})})).catch((e=>console.error("error loading cities by location",e)))}),[i,a,e]),fetchCitiesByKeyword:t.useCallback((function(t){return n(h.PATHS.GET_CITIES_LIST,{keyword:t,client:l}).then((t=>{e({type:at.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,a,e]),fetchSearchResults:t.useCallback((function(t,n,s,r,c){const d="specialty"===s?`${a}${h.PATHS.GET_SEARCH_SPECIALTY}`:`${a}${h.PATHS.GET_SEARCH_V2}`;e({type:at.FetchSearchResultsStart});const{selectedLocation:u,geoLocationCoordinates:p,selectedSpecialty:g}=n;let f="";if(!u)return void e({type:at.FetchSearchResultsFinish});f=u.id===o.ID_OPTION_ALL_LOCATION?"":u.id;const m=(null==p?void 0:p.lat)||"",C=(null==p?void 0:p.lng)||"",b=(null==g?void 0:g.id)>0?null==g?void 0:g.id:"",y=t.trim().length>et[i]?t.trim():"";return fetch(Ye(d,{domain:a,searchType:s||"global",keyword:y,city:f===o.ID_OPTION_CURRENT_LOCATION?"":f,lat:m,lng:C,specialty_id:b,client_slug:o.CLIENT_KEY.MSD===r?"":r,msd:o.CLIENT_KEY.MSD===l?1:""},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{let a=[];"specialty"!==s&&(a=t.searches),"specialty"===s&&(a=y?t.specialties:t.default),e({type:at.FetchSearchResultsComplete,payload:{key:s,searches:a||[]}}),c&&e({type:at.UpdateInitialSearchResults,payload:{key:s,searches:a||[]}})})).catch((e=>{console.log("error loading search results",{url:d,error:e})})).finally((()=>e({type:at.FetchSearchResultsFinish})))}),[i,a,e]),fetchAllSpecialties:t.useCallback((function(){const t=`${a}${h.PATHS.GET_SEARCH_SPECIALTY}`;return fetch(Ye(t,{domain:a,searchType:"",msd:o.CLIENT_KEY.MSD===l?1:""},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{e({type:at.FetchAllSpecialties,payload:t.specialties||[]})})).catch((e=>{console.log("error loading search results",{url:t,error:e})}))}),[i,a,e]),fetchPopularKeys:t.useCallback((function(t){const o=`${a}${h.PATHS.GET_SEARCH_POPULAR_KEY}`;return fetch(Ye(o,{domain:a,searchType:Ft[t],sort_by:"display_order",sort_order:"asc"},i)).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{e({type:at.FetchPopularKeys,payload:t.popular_searches||[]})})).catch((e=>{console.log("error loading search results",{url:o,error:e})}))}),[i,a,e])}}({dispatch:D,locale:j,careApiDomain:i,client:w}),ee=t.useMemo((()=>o.LOCALIZED_SLUGS[j]),[j]),te=t.useMemo((()=>({doctor:{name:M("booking.searchPopup.doctors"),icon:x.default.createElement(ft,null),slug:ee.DOCTOR},service:{name:M("booking.searchPopup.services"),icon:x.default.createElement(mt,null),slug:ee.SERVICE},hospital:{name:M("booking.searchPopup.hospitals"),icon:x.default.createElement(Ct,null),slug:ee.HOSPITAL},specialty:{name:M("booking.searchPopup.specialties"),icon:x.default.createElement(bt,null),slug:ee.SPECIALTIES}})),[A]),ae=t.useMemo((()=>E.default(q,400)),[q]),ie=t.useMemo((()=>E.default(W,400)),[W]),oe=t.useCallback((function(e){D({type:at.SelectLocation,payload:e}),le(),T&&T(e)}),[M,D]);function le(){var e;R.current&&(null===(e=R.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}function ne(){let e="";const{slug:t}=te[A];let a="";const i=o.MAPPING_CLIENT_WITH_SLUG[j][w];("doctor"===A||"hospital"===A)&&F.selectedSpecialty.id>0&&(a=`&specialtyId=${F.selectedSpecialty.id}`),e="specialty"===A?`/${t}`:`/${z.slug}/${t}`,i&&(e+=`/${i}`),e+=`?q=${V}${a}`,e&&D({type:at.NavigateTo,payload:e})}return d.useOutsideClick(N,(()=>{D({type:at.ClickOutsideInputSearchSpecialty})})),t.useEffect((()=>{var t;"denied"===H||Z||D({type:at.SelectLocation,payload:{name:M("booking.searchBar.allLocations"),id:o.ID_OPTION_ALL_LOCATION,slug:null===(t=o.LOCALIZED_SLUGS[j])||void 0===t?void 0:t.ALL}}),I&&I(H,F.geoLocationCoordinates),e&&"granted"===H&&z&&D({type:at.FocusInputSearch}),Y({coordinates:F.geoLocationCoordinates})}),[H]),t.useEffect((()=>{const e=u||{name:M("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:ee.SPECIALTIES};F.selectedSpecialty||D({type:at.SelectSpecialty,payload:e})}),[u,F.selectedSpecialty]),t.useEffect((()=>{J()}),[]),t.useEffect((()=>{X(A)}),[A]),t.useEffect((()=>{B&&(O?O(B):window.location.href=`${p}${B}`)}),[B]),t.useEffect((()=>{W(F.searchKeywords,F,A,w,!0)}),[z,G,A]),x.default.createElement(qe,{ref:R},x.default.createElement($t,{currentTab:A,setCurrentTab:P,isMobile:e,hideTabBookingSearch:v}),x.default.createElement(We,{className:"booking-search-container"},x.default.createElement(Je,null,x.default.createElement(Xe,null,x.default.createElement("div",{ref:N},x.default.createElement(g.Flex,{gap:"12px",justify:"space-between",align:"center",direction:e?"column":"row",className:"flex-search-input"},"specialty"!==A&&x.default.createElement(wt,{state:F,isMobile:e,dispatch:D,debouncedFetchCitiesByKeyword:ae,selectedLocation:z,onLocationClick:oe,trackingAttributes:C}),x.default.createElement(vt,{type:A,isMobile:e,state:F,dispatch:D,debouncedFetchSearchResults:ie,initalSearchValue:r,focusSearchInput:le,onEnterSearch:ne,typeInformation:te,trackingAttributes:m,isLoading:Q,hideSpecialtySelection:S,clientSlug:w}),x.default.createElement(g.Button,{size:e?"md":"lg",color:"#2D87F3",fullWidth:e,variant:"filled",onClick:ne,styles:{root:{height:e?"40px":"48px"}}},M("booking.searchBar.searchButton"))),!L&&"specialty"!==A&&F.popularKeys.length>0&&x.default.createElement(At,{type:A,state:F,typeInformation:te,dispatch:D}),"specialty"===A&&"search"===K&&x.default.createElement(jt,{state:F,isMobile:e,dispatch:D,specialties:(null==U?void 0:U.specialty)||[],isLoading:Q}))))))},exports.TextDivider=({children:e,icon:t,className:a,style:i})=>x.default.createElement(Dt,{style:i,className:a},x.default.createElement(C.Container,null,x.default.createElement("div",{className:"icon-wrapper"},t),x.default.createElement(s.Text,{size:"c1",color:"var(--neutral800)"},e))),exports.types=Kt;
|
package/build/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Subot-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Subot-54546cbb.js");Object.defineProperty(exports,"BabyGrowthChartDuration",{enumerable:!0,get:function(){return e.BabyGrowthChartDuration}}),Object.defineProperty(exports,"BabyGrowthChartType",{enumerable:!0,get:function(){return e.BabyGrowthChartType}}),Object.defineProperty(exports,"BabyGrowthResultTab",{enumerable:!0,get:function(){return e.BabyGrowthResultTab}}),exports.ELEMENT_CONTROL_INPUT_TYPE=e.ELEMENT_CONTROL_INPUT_TYPE,exports.FULL_KEY_ADDRESS=e.FULL_KEY_ADDRESS,Object.defineProperty(exports,"Gender",{enumerable:!0,get:function(){return e.Gender}}),Object.defineProperty(exports,"LOCALE",{enumerable:!0,get:function(){return e.LOCALE}}),Object.defineProperty(exports,"NodeActionType",{enumerable:!0,get:function(){return e.NodeActionType}}),exports.NodeFinalTypes=e.NodeFinalTypes,Object.defineProperty(exports,"NodeIntentType",{enumerable:!0,get:function(){return e.NodeIntentType}}),Object.defineProperty(exports,"NodeMultipleOptions",{enumerable:!0,get:function(){return e.NodeMultipleOptions}}),Object.defineProperty(exports,"NodePosition",{enumerable:!0,get:function(){return e.NodePosition}}),Object.defineProperty(exports,"NodeType",{enumerable:!0,get:function(){return e.NodeType}}),Object.defineProperty(exports,"OnboardingStep",{enumerable:!0,get:function(){return e.OnboardingStep}}),exports.SubotType=e.SubotType;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./tslib.es6-d46558cb.js"),a=require("react"),n=require("./cookieHelper-59a64e32.js"),t=require("./useTranslations-b435b717.js"),i=require("./Subot-54546cbb.js");function s(e){const a=(new TextEncoder).encode(e.trim().toLowerCase());return crypto.subtle.digest("SHA-256",a).then((e=>Array.from(new Uint8Array(e)).map((e=>e.toString(16).padStart(2,"0"))).join("")))}const l={"vi-VN":"mang-thai","id-ID":"kehamilan","ms-MY":"kehamilan","km-KH":"ពពោះ","en-PH":"pregnancy","tl-PH":"pregnancy","th-TH":"การตั้งครรภ์","my-MM":"pregnancy","zh-TW":"pregnancy","hi-IN":"pregnancy"},r={[i.LOCALE.Vietnam]:{sexualWellness:"suc-khoe-tinh-duc",health:"suc-khoe",healthyEating:"an-uong-lanh-manh",skinHealth:"da-lieu",healthyHabit:"thoi-quen-lanh-manh",drug:"thuoc",womensHealth:"suc-khoe-phu-nu",fitness:"the-duc-the-thao",pregnancy:"mang-thai",parenting:"nuoi-day-con",diabetes:"tieu-duong-dai-thao-duong",healthyMind:"tam-ly-tam-than"},[i.LOCALE.Indonesia]:{pregnancy:"kehamilan",parenting:"parenting",health:"sehat",diabetes:"diabetes",womensHealth:"wanita",drug:"obat-suplemen",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Malaysia]:{pregnancy:"kehamilan",parenting:"keibubapaan",health:"kesihatan",diabetes:"kencing-manis",womensHealth:"kesihatan-wanita",drug:"ubat",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Cambodia]:{pregnancy:"%e1%9e%96%e1%9e%96%e1%9f%84%e1%9f%87",parenting:"%e1%9e%85%e1%9e%b7%e1%9e%89%e1%9f%92%e1%9e%85%e1%9e%b9%e1%9e%98%e1%9e%80%e1%9e%bc%e1%9e%93",health:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%91%e1%9e%bc%e1%9e%91%e1%9f%85",diabetes:"%e1%9e%87%e1%9f%86%e1%9e%84%e1%9e%ba%e1%9e%91%e1%9e%b9%e1%9e%80%e1%9e%93%e1%9f%84%e1%9e%98%e1%9e%95%e1%9f%92%e1%9e%a2%e1%9f%82%e1%9e%98",womensHealth:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%9f%e1%9f%92%e1%9e%8f%e1%9f%92%e1%9e%9a%e1%9e%b8",drug:"%e1%9e%b1%e1%9e%9f%e1%9e%90%e1%9e%93%e1%9e%b7%e1%9e%84%e1%9e%a2%e1%9e%b6%e1%9e%a0%e1%9e%b6%e1%9e%9a%e1%9e%94%e1%9f%86%e1%9e%94%e1%9f%89%e1%9e%93",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.PhilippinesEnglish]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.PhilippinesTagalog]:{pregnancy:"pagbubuntis",parenting:"pagiging-magulang",health:"kalusugan",diabetes:"diabetes-fil",womensHealth:"kalusugan-kababaihan",drug:"drugs-at-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Thailand]:{pregnancy:"%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87%e0%b8%84%e0%b8%a3%e0%b8%a3%e0%b8%a0%e0%b9%8c",parenting:"%e0%b8%9e%e0%b9%88%e0%b8%ad%e0%b9%81%e0%b8%a1%e0%b9%88%e0%b9%80%e0%b8%a5%e0%b8%b5%e0%b9%89%e0%b8%a2%e0%b8%87%e0%b8%a5%e0%b8%b9%e0%b8%81",health:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e",diabetes:"%e0%b9%82%e0%b8%a3%e0%b8%84%e0%b9%80%e0%b8%9a%e0%b8%b2%e0%b8%ab%e0%b8%a7%e0%b8%b2%e0%b8%99",womensHealth:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e%e0%b8%ab%e0%b8%8d%e0%b8%b4%e0%b8%87",drug:"%e0%b8%a2%e0%b8%b2%e0%b9%81%e0%b8%a5%e0%b8%b0%e0%b8%ad%e0%b8%b2%e0%b8%ab%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%aa%e0%b8%a3%e0%b8%b4%e0%b8%a1",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Myanmar]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-az",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Taiwan]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplement",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.India]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",diabetesEn:"en-diabetes",drug:"dawaai",sexualWellness:"",healthyEating:"",skinHealth:""}};exports.MAPPED_CATEGORY_SLUGS=r,exports.PREGNANCY_SLUG=l,exports.useCategory=e=>{const{locale:n}=t.useTranslations();return{isPregnancy:a.useMemo((()=>decodeURI(e.replace(/\//gi,"")).includes(l[n])),[]),isParenting:a.useMemo((()=>{var a;return decodeURI(e.replace(/\//gi,"")).includes(null===(a=r[n])||void 0===a?void 0:a.parenting)}),[]),type:a.useMemo((()=>function(e,a){const n=e.split("/");for(const e in a){const t=a[e];if(n.includes(t))return e}return null}(e,r[n])),[e,n])}},exports.useFbDataLayer=t=>{const i=a.useRef("");a.useEffect((()=>(e.__awaiter(void 0,void 0,void 0,(function*(){var e,a,l,r,b;if(!i.current){let e=yield fetch("https://api.ipify.org").then((e=>e.text()));e||(e=yield fetch("https://icanhazip.com").then((e=>e.text()))),i.current=e}if(null===(a=null===(e=window.localStorage)||void 0===e?void 0:e.setItem)||void 0===a||a.call(e,"fbClientIp",JSON.stringify({client_ip_address:(null===(l=i.current)||void 0===l?void 0:l.replace("\n",""))||"",client_user_agent:navigator.userAgent||""})),null==t?void 0:t.id){const[e,a,i,l,h,u]=yield Promise.all([t.email?s(t.email):null,t.phone?s(t.phone):null,t.birthday?s(t.birthday.split("-").join("")):null,t.gender?"m":"f",t.city_name?s(t.city_name).then((e=>e.replace(/\s/g,""))):null,t.name?s(t.name):null]);n.getCookie("_fbc"),n.getCookie("_fbp");const o={user_id:t.id};u&&(o.fn=u),e&&(o.em=e),a&&(o.ph=a),i&&(o.db=i),h&&(o.ct=h),null===(b=null===(r=window.localStorage)||void 0===r?void 0:r.setItem)||void 0===b||b.call(r,"fbDataLayer_userInfo",JSON.stringify(o))}})),()=>{})),[t])},exports.usePrevious=e=>{const n=a.useRef(),i=a.useRef(e);return t.useInitialMount()||i.current===e||(n.current=i.current,i.current=e),n.current},exports.useRafState=e=>{const[n,t]=a.useState(e),i=a.useRef(0),s=a.useCallback((e=>{cancelAnimationFrame(i.current),i.current=requestAnimationFrame((()=>{t(e)}))}),[]);return a.useEffect((()=>()=>cancelAnimationFrame(i.current))),[n,s]};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./tslib.es6-d46558cb.js"),t=require("react"),o=require("./getDynamicHealthTool-3e4543ff.js");exports.useHealthToolsCache=a=>{const[i,l]=t.useState([]);t.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){const e=yield o.getDynamicHealthToolWithCache(a);l(e)}))}),[o.getDynamicHealthToolWithCache,a]);const r=t.useCallback((e=>{var t;return(null===(t=i.find((t=>t.template===e)))||void 0===t?void 0:t.link)||""}),[i]);return{allTools:i,getHealthToolLink:r}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./tslib.es6-
|
|
1
|
+
"use strict";var e=require("./tslib.es6-d46558cb.js"),t=require("react");const i="undefined"==typeof window,o={VN:"vi",ID:"id",TH:"th",MY:"ms",TW:"zh-TW",KH:"km",MM:"my",IN:"hi",PH:"en"};exports.GOOGLE_API_KEY="AIzaSyD9AbNa4AFwr8eNVs90G1YhQLhfWJ6KncU",exports.GOOGLE_API_LANGUAGE=o,exports.usePlacesAutocomplete=(n="",r="",s="",c=500)=>{const[a,d]=t.useState([]),[u,l]=t.useState(!1);return t.useEffect((()=>{let t;return n?t=window.setTimeout((()=>e.__awaiter(void 0,void 0,void 0,(function*(){var t;if(n)try{l(!0);const c=yield((t="",n="",r="vi")=>e.__awaiter(void 0,void 0,void 0,(function*(){return new Promise(((e,s)=>{if(!t)return s("Need valid text input");if(i)return s("Need valid window object");try{(new window.google.maps.places.AutocompleteService).getPlacePredictions(Object.assign(Object.assign({input:t},n?{componentRestrictions:{country:n}}:{}),{language:o[r]}),e)}catch(e){s(e)}}))})))(n,r,s);d(!(t=c)||t.length<1?[]:t.map((e=>({placeId:e.place_id,description:e.description}))))}catch(e){console.error(e)}finally{l(!1)}else d([])}))),c):a.length&&d([]),()=>{window.clearTimeout(t)}}),[n,c,r]),{isLoading:u,predictions:a}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react"),t=require("./translationsContext-
|
|
1
|
+
"use strict";var e=require("react"),t=require("./translationsContext-6c5fb248.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(require("string-format"));const s=()=>{const t=e.useRef(!0);return!!t.current&&(t.current=!1,!0)};let o=0;exports.useInitialMount=s,exports.useTranslations=function(){const{values:n,locale:s}=e.useContext(t.TranslationsContext)||{locale:"en-PH"};return e.useMemo((()=>({t:(e,t)=>n?n[e]?t?r.default(n[e]||e,t):n[e]||e:(console.warn(`[useTranslations] Missing translation for key ${e} and locale ${s}`),t?r.default(e,t):e):(console.error("[useTranslations] t method called before translation values are loaded"),e),locale:s})),[n,s])},exports.useUniqueId=()=>{const t=e.useRef("");return s()&&(o+=1,t.current=`hhg-gen-id${o}`),t.current};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=e=>{const t=Object.keys(e);return t.length?"?"+t.map((t=>`${t}=${e[t]}`)).join("&"):""},t={BREAK_POINT_SMALL_MOBILE:480,BREAK_POINT_MOBILE:768,BREAK_POINT_TABLET:1024,BREAK_POINT_PC:1159,BREAK_POINT_LGPC:1440},r={smbDown:`@media (max-width: ${t.BREAK_POINT_SMALL_MOBILE-1}px)`,smbUp:`@media (min-width: ${t.BREAK_POINT_SMALL_MOBILE}px)`,mbDown:`@media (max-width: ${t.BREAK_POINT_MOBILE-1}px)`,mbOnly:`@media (min-width: ${t.BREAK_POINT_SMALL_MOBILE}px) and (max-width: ${t.BREAK_POINT_MOBILE-1}px)`,mbUp:`@media (min-width: ${t.BREAK_POINT_MOBILE}px)`,tdDown:`@media (max-width: ${t.BREAK_POINT_TABLET-1}px)`,tdOnly:`@media (min-width: ${t.BREAK_POINT_MOBILE}px) and (max-width: ${t.BREAK_POINT_TABLET-1}px)`,tdUp:`@media (min-width: ${t.BREAK_POINT_TABLET}px)`,pcUp:`@media (min-width: ${t.BREAK_POINT_PC}px)`,pcOnly:`@media (min-width: ${t.BREAK_POINT_TABLET}px) and (max-width: ${t.BREAK_POINT_PC-1}px)`,pcDown:`@media (max-width: ${t.BREAK_POINT_PC-1}px)`,lgPcUp:`@media (min-width: ${t.BREAK_POINT_LGPC}px)`,lgPcOnly:`@media (min-width: ${t.BREAK_POINT_PC}px) and (max-width: ${t.BREAK_POINT_LGPC-1}px)`,lgPcDown:`@media (max-width: ${t.BREAK_POINT_LGPC-1}px)`,mbToPC:`@media (min-width: ${t.BREAK_POINT_MOBILE}px) and (max-width: ${t.BREAK_POINT_PC-1}px)`};exports.Breakpoints=t,exports.MediaQueries=r,exports.formatUrlWithPageParam=(t,r=1,_="page")=>{const[n,a]=t.split("?"),d=new URLSearchParams(a||""),p={};return d.forEach(((e,t)=>{e&&(p[t]=e)})),Number(r)>1?p[_]=String(r):delete p[_],n+e(p)},exports.getBoundariesFromMediaQueryKey=e=>{switch(e){case"smbDown":return[0,t.BREAK_POINT_SMALL_MOBILE-1];case"smbUp":return[t.BREAK_POINT_SMALL_MOBILE,0];case"mbDown":return[0,t.BREAK_POINT_MOBILE-1];case"mbOnly":return[t.BREAK_POINT_SMALL_MOBILE,t.BREAK_POINT_MOBILE-1];case"mbUp":return[t.BREAK_POINT_MOBILE,0];case"tdDown":return[0,t.BREAK_POINT_TABLET-1];case"tdOnly":return[t.BREAK_POINT_MOBILE,t.BREAK_POINT_TABLET-1];case"tdUp":return[t.BREAK_POINT_TABLET,0];case"pcUp":return[t.BREAK_POINT_PC,0];case"pcOnly":return[t.BREAK_POINT_TABLET,t.BREAK_POINT_PC-1];case"pcDown":return[0,t.BREAK_POINT_PC-1];case"lgPcUp":return[t.BREAK_POINT_LGPC,0];case"lgPcOnly":return[t.BREAK_POINT_PC,t.BREAK_POINT_LGPC-1];case"lgPcDown":return[0,t.BREAK_POINT_LGPC-1];case"mbToPC":return[t.BREAK_POINT_MOBILE,t.BREAK_POINT_PC-1]}},exports.getPopupWrapperDom=()=>{if("undefined"==typeof document)return null;const e="hhg-comp-popup-wrapper";if(!document.querySelector("#"+e)){const t=document.createElement("div");t.id=e,document.body.appendChild(t)}return document.querySelector("#"+e)},exports.getWrapperDomWithSelector=(e,t)=>{if("undefined"==typeof document)return null;if(!e.querySelector(`[data-wrapper-selector="${t}"]`)){const e=document.createElement("div");e.setAttribute("data-wrapper-selector",t),document.body.appendChild(e)}return e.querySelector(`[data-wrapper-selector="${t}"]`)},exports.makeParams=e,exports.safeEncodeURI=e=>decodeURI(e)!==e?e:encodeURI(e),exports.startCase=e=>e.replace(/\w\S*/g,(function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})),exports.toggleNoScroll=e=>{"undefined"!=typeof window&&(document.documentElement.style.overflow=e?"hidden":"")};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var e=require("./
|
|
1
|
+
"use strict";var e=require("./utils-469dda3f.js"),t=require("styled-components"),o=require("react"),s=require("./index-065c9097.js"),a=require("./index-4de92198.js"),n=require("./Subot-54546cbb.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=r(t),h=r(o);const g=l.default.div`
|
|
2
2
|
position: relative;
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
align-items: center;
|
|
@@ -138,4 +138,4 @@
|
|
|
138
138
|
width: unset;
|
|
139
139
|
margin-bottom: 4px;
|
|
140
140
|
margin-left: -3px;
|
|
141
|
-
`,p=o.memo((({type:e,width:t,height:n})=>{const r=o.useMemo((()=>{switch(e){case"hellobacsi":return{width:t||"107px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellobacsi.png")};case"hellodoktor":return{width:t||"127px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellodoktor.png")};case"hellosehat":return{width:t||"121px",height:n||"27px",src:s.CommonGAssets.getAssetPath("logo/hellosehat.png")};case"hellohealth":return{width:t||"123px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellohealth.png")};case"hellotogether":return{width:t||"150px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellotogether.png")};case"hellocare":return{width:t||"99px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellocare.png")};case"hellodoctor":return{width:t||"127px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellodoctor.png")};case"hellokrupet":return{width:t||"101px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellokrupet.png")};case"hellosayarwon":return{width:t||"111px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellosayarwon.png")};case"helloyishi":return{width:t||"89px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/helloyishi.png")};case"hellokhunmor":return{width:t||"123px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellokhunmor.png")};case"helloswasthya":return{width:t||"105px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/helloswasthya.png")};case"logomark":return{width:t||"60px",height:n||"57px",src:s.CommonGAssets.getAssetPath("logo/logomark.png")};case"marryBaby":return{width:t||"145px",height:n||"28px",src:s.CommonGAssets.getAssetPath("logo/marrybaby.png")};default:return null}}),[e,t,n]),{src:l,width:g,height:i}=r||{};return h.default.createElement(a.ImageWrap,{alt:`${e} logo`,className:"main-logo-icon",src:l,style:{width:g,height:i}})})),
|
|
141
|
+
`,p=o.memo((({type:e,width:t,height:n})=>{const r=o.useMemo((()=>{switch(e){case"hellobacsi":return{width:t||"107px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellobacsi.png")};case"hellodoktor":return{width:t||"127px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellodoktor.png")};case"hellosehat":return{width:t||"121px",height:n||"27px",src:s.CommonGAssets.getAssetPath("logo/hellosehat.png")};case"hellohealth":return{width:t||"123px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellohealth.png")};case"hellotogether":return{width:t||"150px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellotogether.png")};case"hellocare":return{width:t||"99px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellocare.png")};case"hellodoctor":return{width:t||"127px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellodoctor.png")};case"hellokrupet":return{width:t||"101px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellokrupet.png")};case"hellosayarwon":return{width:t||"111px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellosayarwon.png")};case"helloyishi":return{width:t||"89px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/helloyishi.png")};case"hellokhunmor":return{width:t||"123px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellokhunmor.png")};case"helloswasthya":return{width:t||"105px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/helloswasthya.png")};case"logomark":return{width:t||"60px",height:n||"57px",src:s.CommonGAssets.getAssetPath("logo/logomark.png")};case"marryBaby":return{width:t||"145px",height:n||"28px",src:s.CommonGAssets.getAssetPath("logo/marrybaby.png")};default:return null}}),[e,t,n]),{src:l,width:g,height:i}=r||{};return h.default.createElement(a.ImageWrap,{alt:`${e} logo`,className:"main-logo-icon",src:l,style:{width:g,height:i}})})),d={2023:[22,0],2024:[10,1],2025:[29,0],2026:[17,1],2027:[6,1],2028:[26,0],2029:[13,1],2030:[3,1],2031:[23,0],2032:[11,1],2033:[31,0],2034:[19,1],2035:[8,1],2036:[28,0],2037:[15,1],2038:[4,1],2039:[24,0],2040:[12,1]},m=[n.LOCALE.Vietnam,n.LOCALE.Taiwan,n.LOCALE.Indonesia,n.LOCALE.Malaysia],c=[{year:2024,start:[10,2],end:[8,3]},{year:2025,start:[1,2],end:[30,2]},{year:2026,start:[18,1],end:[19,2]},{year:2027,start:[8,1],end:[9,2]},{year:2028,start:[28,0],end:[26,1]},{year:2029,start:[16,0],end:[14,1]},{year:2030,start:[6,0],end:[4,1]},{year:2030,start:[26,11],end:[24,0,2031]},{year:2031,start:[15,11],end:[13,0,2032]},{year:2032,start:[4,11],end:[2,0,2033]}],x={2024:[18,3],2025:[7,3],2026:[26,3],2027:[16,3],2028:[4,3],2029:[23,3],2030:[12,3],2031:[1,3],2032:[19,3],2033:[9,3],2034:[28,3],2035:[17,3]};exports.LogoIcon=p,exports.LunarNewYearLocale=m,exports.StyledLogo=g,exports.StyledProLogo=i,exports.isChristmas=e=>{const t=e.getDate();return 11===e.getMonth()&&t>=16&&t<=25},exports.isLabourDay=e=>{const t=e.getFullYear(),o=new Date(t,4,1),s=new Date(o);s.setDate(o.getDate()-1);const a=new Date(o);return a.setDate(o.getDate()+1),s<=e&&e<=a},exports.isLunarNewYear=e=>{const t=e.getFullYear(),o=d[t];if(!o)return!1;const s=new Date(t,o[1],o[0]),a=new Date(s);a.setDate(s.getDate()-7);const n=new Date(s);return n.setDate(s.getDate()+5),a<=e&&e<=n},exports.isNewYear=e=>{const t=e.getDate(),o=e.getMonth();return 11===o&&t>=26||0===o&&t<=15},exports.isRamadan=e=>{const t=e.getFullYear(),o=c.filter((e=>e.year===t));return!!o.length&&o.some((o=>{const s=o.start[2]||t,a=new Date(s,o.start[1],o.start[0]),n=new Date(s,o.end[1],o.end[0]);return a<=e&&e<=n}))},exports.isVN3004=e=>{const t=e.getFullYear(),o=new Date(t,3,30),s=new Date(o);s.setDate(o.getDate()-1);const a=new Date(o);return a.setDate(o.getDate()+2),s<=e&&e<=a},exports.isVNHungKing=e=>{const t=e.getFullYear(),o=x[t];if(!o)return!1;const s=new Date(t,o[1],o[0]),a=new Date(s);a.setDate(s.getDate()-1);const n=new Date(s);return n.setDate(s.getDate()+1),a<=e&&e<=n};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var i=require("./Subot-
|
|
1
|
+
"use strict";var i=require("./Subot-54546cbb.js");const a={[i.LOCALE.Vietnam]:"VN",[i.LOCALE.Cambodia]:"KH",[i.LOCALE.Indonesia]:"ID",[i.LOCALE.Malaysia]:"MY",[i.LOCALE.PhilippinesEnglish]:"PH",[i.LOCALE.PhilippinesTagalog]:"PH",[i.LOCALE.Taiwan]:"TW",[i.LOCALE.Thailand]:"TH",[i.LOCALE.Myanmar]:"MM"};exports.MAPPED_LOCALE=a,exports.hiddenEmailChar=(i="")=>{const a=i.indexOf("@"),L=i.substring(0,a),e=L.length>3?3:L.length;return i.replace(i.substring(e,a),i.slice(e,a).replace(/./g,"x"))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./tslib.es6-d46558cb.js"),t=require("./cookieHelper-59a64e32.js"),o=require("slugify");require("./index-d27a3f5f.js");var r=require("string-format"),a=require("react"),i=require("./isProduction-426652cc.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=l(o),n=l(r),_=l(a),u=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");var o={},r=(t||{}).decode||E,a=0;for(;a<e.length;){var i=e.indexOf("=",a);if(-1===i)break;var l=e.indexOf(";",a);if(-1===l)l=e.length;else if(l<i){a=e.lastIndexOf(";",i-1)+1;continue}var s=e.slice(a,i).trim();if(void 0===o[s]){var n=e.slice(i+1,l).trim();34===n.charCodeAt(0)&&(n=n.slice(1,-1)),o[s]=m(n,r)}a=l+1}return o},c=function(e,t,o){var r=o||{},a=r.encode||T;if("function"!=typeof a)throw new TypeError("option encode is invalid");if(!d.test(e))throw new TypeError("argument name is invalid");var i=a(t);if(i&&!d.test(i))throw new TypeError("argument val is invalid");var l=e+"="+i;if(null!=r.maxAge){var s=r.maxAge-0;if(isNaN(s)||!isFinite(s))throw new TypeError("option maxAge is invalid");l+="; Max-Age="+Math.floor(s)}if(r.domain){if(!d.test(r.domain))throw new TypeError("option domain is invalid");l+="; Domain="+r.domain}if(r.path){if(!d.test(r.path))throw new TypeError("option path is invalid");l+="; Path="+r.path}if(r.expires){var n=r.expires;if(!function(e){return"[object Date]"===p.call(e)||e instanceof Date}(n)||isNaN(n.valueOf()))throw new TypeError("option expires is invalid");l+="; Expires="+n.toUTCString()}r.httpOnly&&(l+="; HttpOnly");r.secure&&(l+="; Secure");if(r.priority){switch("string"==typeof r.priority?r.priority.toLowerCase():r.priority){case"low":l+="; Priority=Low";break;case"medium":l+="; Priority=Medium";break;case"high":l+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"strict":l+="; SameSite=Strict";break;case"none":l+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return l},p=Object.prototype.toString,d=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function E(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function T(e){return encodeURIComponent(e)}function m(e,t){try{return t(e)}catch(t){return e}}var b={parse:u,serialize:c};const A={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",USER:{DETAIL:"profile/user/detail?website_url={website_url}&user_id={id}",COUNT_TABS:"profile/user/counting?website_url={website_url}&user_id={id}&total_post={post}&total_comment={comment}&total_community={community}&total_reply={reply}&total_question={question}",LIST_POST:"profile/user/posts?website_url={website_url}&user_id={id}&is_anonymous={isAnonymous}&paging=none",LIST_QUESTION_NEED_REPLY:"questions/no-reply?website_url={website_url}",LIST_QUESTION:"question/{id}?website_url={website_url}&is_reply={isReply}&is_question={isQuestion}&is_ignore={isIgnore}&group_by={groupBy}",SKIP_QUESTION:"questions/ignore?website_url={website_url}&question_id={id}",LIST_ANSWERS:"replied/{id}?website_url={website_url}&paging=1&items_per_page={pageSize}"},HEALTH_TOOL:{CREATE:"health-profile/{type}/create?website_url={website_url}",GET_STATUS:"health-profile/get-status-for-user?website_url={website_url}"}},O={locale:"vi-VN",env:{isMarryBaby:!1,togetherBasePath:"/community"},router:{basePath:"",asPath:"/"}},h=a.createContext({data:O,action:{pushNotifications:e=>e,sanitizeFunction:e=>e},formatMessage:()=>null});exports.GlobalData=O;const g="DD/MM/YYYY",v="/images/avatar.jpg",I="/images/default-image.jpg",L={DUE_DATE:"DUE_DATE",BMI:"BMI",BMR:"BMR",OVULATION:"OVULATION",IFRAME:"IFRAME",PWG:"PWG",THR:"THR",BGC:"BGC"},S={"id-ID":{"kalkulator-bmi":L.BMI,"kebutuhan-kalori":L.BMR,"kalkulator-hari-perkiraan-lahir":L.DUE_DATE,"kalkulator-masa-subur-2":L.OVULATION,"kalkulator-kenaikan-berat-badan-ibu-hamil":L.PWG,"kalkulator-detak-jantung-saat-olahraga":L.THR},"ms-MY":{"kalkulator-bmi":L.BMI,"kalkulator-bmr":L.BMR,"kalkulator-tarikh-bersalin":L.DUE_DATE,"kalkulator-kesuburan":L.OVULATION,"kalkulator-tambah-berat-badan-hamil":L.PWG,"target-heart-rate-calculator":L.THR},"vi-VN":{"cach-tinh-chi-so-bmi":L.BMI,"tinh-chi-so-bmr":L.BMR,"cong-cu-tinh-ngay-du-sinh":L.DUE_DATE,"tinh-ngay-rung-trung":L.OVULATION,"cong-cu-tinh-can-nang-khi-mang-thai":L.PWG,"cong-cu-do-nhip-tim":L.THR},"zh-TW":{"bmi-calculator":L.BMI,"bmr-calculator":L.BMR,"due-date-calculator":L.DUE_DATE,"ovulation-calculator":L.OVULATION,"pregnancy-weight-gain-calculator":L.PWG,"target-heart-rate-calculator":L.THR},"en-PH":{"bmi-calculator":L.BMI,"bmr-calculator":L.BMR,"due-date-calculator":L.DUE_DATE,"ovulation-calculator":L.OVULATION,"pregnancy-weight-gain-calculator":L.PWG,"target-heart-rate-calculator":L.THR},"th-TH":{"เครื่องคำนวณหา-ค่าดัชนี":L.BMI,"เครื่องคำนวณอัตราการเผาผลาญพลังงาน-bmr":L.BMR,"เครื่องมือคำนวณกำหนดคลอด":L.DUE_DATE,"เครื่องคำนวณการตกไข่-ovulation-calculat":L.OVULATION,"เครื่องคำนวณน้ำหนักตัว":L.PWG,"เครื่องวัดอัตราการเต้น":L.THR},"hi-IN":{"bmi-calculator-en":L.BMI,"bmi-calculator":L.BMI,"bmr-calculator":L.BMR,"delivery-date-calculator":L.DUE_DATE,"ovulation-calculator":L.OVULATION,"pregnancy-weight-gain-calculator":L.PWG,"target-heart-rate-calculator":L.THR},"km-KH":{"គណនា-bmi":L.BMI,"គណនា-bmr":L.BMR,"គណនាថ្ងៃសម្រាលកូន":L.DUE_DATE,"គណនាថ្ងៃមេជីវិតញីទុំធ្លាក់":L.OVULATION,"គណនាទម្ងន់ស្ត្រីពពោះ":L.PWG,"គណនារកចង្វាក់បេះដូងល្អ":L.THR},"my-MM":{"bmi-calculator":L.BMI,"bmr-calculator":L.BMR,"due-date-calendar":L.DUE_DATE,"ovulation-calculator":L.OVULATION,"pregnaancy-weight-calculator":L.PWG,"target-heartrate":L.THR,"pregnancy-weight-calculator":L.PWG,"target-heart-rate":L.THR}},R="hhg_user_token",w="together_admin_token",f={adBlock:48,articleAdContainer:47,headerContainerHome:99,headerContainerPopup:200,headerContainerPopupSUbLevel:300,menuSearchInputPopup:5,menuSearchInputDisplayIcon:6,menuSearchPopup:200},y="hhg-id",D={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"}},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"}};var G=Object.freeze({__proto__:null,POST_DATE_FORMAT:"dd/MM/yyyy",NORMAL_DATE_FORMAT:"YYYY-MM-DD",DUE_DATE_FORMAT:g,DEFAULT_AVATAR_IMG:v,DEFAULT_RESULT_IMG:"/images/default.png",DEFAULT_IMG:I,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:L,LOCALE_HEALTH_TOOLS:S,BEARER_TOKEN_COOKIE:R,TOGETHER_DISCLAIMER_COOKIE:"hhg_together_disclaimer",BEARER_ADMIN_TOKEN_COOKIE:w,Z_INDEX:f,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:y,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:D,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});const N={"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"},C={"vi-VN":"marrybaby.vn"},x=process.env.NEXT_PUBLIC_DEPLOY_LOCALE||"vi-VN",M=e=>{const{env:{isMarryBaby:t}}=exports.GlobalData;return`https://${t?C[e]:N[e]}`},U=e=>{const t=e.indexOf("?");return t>=0?e.slice(0,t+1)+e.slice(t+1).replace(/[^=&]+=(&|$)/g,"").replace(/&$/,""):e},k=(e,t,o,r)=>{let a="";o&&(a=Object.keys(o).map((e=>e+"="+o[e])).join("&"));const{togetherBaseApiUrl:i=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};let l=n.default(e,Object.assign(Object.assign({},(null==t?void 0:t._locale)?{website_url:M(String(t._locale))}:{}),t));l+=`${l.includes("?")?"&":"?"}${a}`;return(r||i)+"api/v1/"+U(l)},B=e=>((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),H=(t,o,r,a=!1)=>e.__awaiter(void 0,void 0,void 0,(function*(){var e,i,l,s;try{const e=yield fetch(a?t:(s=t,encodeURI(s).replace(/%5B/g,"[").replace(/%5D/g,"]")),Object.assign(Object.assign({method:o},B(r)),{headers:Object.assign({},null==r?void 0:r.headers)})).then((e=>e.json()));if(e)return e}catch(o){return console.log(o),console.log({url:t,status:null===(e=null==o?void 0:o.response)||void 0===e?void 0:e.status,statusText:null===(i=null==o?void 0:o.response)||void 0===i?void 0:i.statusText}),(null===(l=null==o?void 0:o.response)||void 0===l?void 0:l.data)||null}return null})),F=(o,r,a,i)=>e.__awaiter(void 0,void 0,void 0,(function*(){try{const e=b.parse(i||""),l=e[R]||t.getCookie(R);if(l&&l.length){const e=yield fetch(o,Object.assign(Object.assign({method:r},B(a)),{headers:Object.assign({Authorization:"Bearer "+l},null==a?void 0:a.headers)})).then((e=>e.json()));if(e)return e}}catch(e){return null}return null}));function j(e,t,o){const r=new RegExp("([?&])"+t+"=.*?(&|$)","i"),a=-1!==e.indexOf("?")?"&":"?";return e.match(r)?e.replace(r,"$1"+t+"="+o+"$2"):e+a+t+"="+o}const K=(e,t,o,r)=>o&&t?`${o}-${t}`:`${s.default(e||"",{lower:!0,locale:r||x})}-${t}`;exports.ADMIN_PATHS={SEARCH_USER:"admin/profile/search?website_url={website_url}&name={name}",COMMENT:{IMAGE_UPLOAD:"admin/comment/image/upload?website_url={website_url}"}},exports.BEARER_TOKEN_COOKIE=R,exports.CARE_PATHS={GET_DOCTOR_INFO:"api/doctors/{doctorId}?site={website_url}",GET_HOSPITAL_INFO:"api/hospital/branch/{hospital_branch_id}?site={website_url}"},exports.DEFAULT_AVATAR_IMG=v,exports.DEFAULT_IMG=I,exports.DISCOVER_PATHS={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}"},exports.DUE_DATE_FORMAT=g,exports.DefaultComponentGlobalContextData=O,exports.HEALTH_TOOL_TYPE=L,exports.LEAD_TOKEN_COOKIE=y,exports.MAX_IMAGE_UPLOADS=20,exports.PATHS=A,exports.REPORT_REASON_MAP=D,exports.TogetherComponentGlobalContext=h,exports.TogetherComponentGlobalContextProvider=({locale:e="vi-VN",children:t,userInfo:o,router:r,env:i={isMarryBaby:!1,togetherBasePath:"/community"},sanitizeFunction:l=(e=>e),pushNotifications:s=(()=>!1),formatMessage:n})=>{const[u,c]=a.useState();return exports.GlobalData={userInfo:o,locale:e,togetherUserId:u,router:r,env:i},a.useEffect((()=>{(null==o?void 0:o.id)&&F(k(A.PROFILE,{_locale:e}),"GET").then((e=>{var t;c(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)}))}),[null==o?void 0:o.id]),_.default.createElement(h.Provider,{value:{data:{userInfo:o,locale:e,togetherUserId:u,router:r,env:i},action:{pushNotifications:s,sanitizeFunction:l},formatMessage:n}},t)},exports.Z_INDEX=f,exports.callApi=H,exports.callApiWithAdminAuth=(o,r,a,i)=>e.__awaiter(void 0,void 0,void 0,(function*(){try{const e=b.parse(i||""),l=e[w]||t.getCookie(w);if(l&&l.length){const e=yield fetch(o,Object.assign(Object.assign({method:r},B(a)),{headers:Object.assign({Authorization:"Bearer "+l},null==a?void 0:a.headers)})).then((e=>e.json()));if(e)return e}}catch(e){return null}return null})),exports.callApiWithAuth=F,exports.callApiWithOptionalAuth=(o,r="GET",a,i)=>e.__awaiter(void 0,void 0,void 0,(function*(){var e,l,s,n,_,u;try{const n="string"==typeof o?o:o.url,_="string"==typeof o?o:o.backupUrl,u=b.parse(i||""),c=u[R]||t.getCookie(R);if(!c||!c.length)return H(_||n,r,a);try{const t=yield fetch(n,Object.assign(Object.assign({method:r},B(a)),{headers:Object.assign({Authorization:"Bearer "+c},null==a?void 0:a.headers)})).then((e=>e.json()));if(null===(e=null==t?void 0:t.messages)||void 0===e?void 0:e.find((e=>"Unauthenticated"===(null==e?void 0:e.toLowerCase()))))return H(_||n,r,a);if(t)return t}catch(e){return console.log({status:null===(l=null==e?void 0:e.response)||void 0===l?void 0:l.status,statusText:null===(s=null==e?void 0:e.response)||void 0===s?void 0:s.statusText}),H(_||n,r,a)}}catch(e){return console.log({status:null===(n=null==e?void 0:e.response)||void 0===n?void 0:n.status,statusText:null===(_=null==e?void 0:e.response)||void 0===_?void 0:_.statusText}),(null===(u=null==e?void 0:e.response)||void 0===u?void 0:u.data)||null}return null})),exports.constants=G,exports.cookie=b,exports.domainLocales=N,exports.domainLocalesMarryBaby=C,exports.getApiPath=k,exports.getCareDoctorUrl=({name:e,id:t,locale:o})=>{var r;return`/care/${null===(r=P[o||"vi-VN"])||void 0===r?void 0:r.DOCTOR}/${K(e,t)}`},exports.getCareHospitalUrl=({name:e,id:t,slug:o,locale:r})=>{var a;return`/care/${null===(a=P[r||"vi-VN"])||void 0===a?void 0:a.HOSPITAL}/${K(e,t,o)}`},exports.getCarePath=(e,t)=>{const{careBaseApiUrl:o=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};return(o||"https://service-health-care.hellohealthgroup.com/")+U(n.default(e,Object.assign({},t)))},exports.getCurrentBaseUrl=e=>{const{env:{isMarryBaby:t}}=exports.GlobalData;if("undefined"!=typeof window)return window.location.origin;const o="staging"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return"development"===process.env.NEXT_PUBLIC_DEPLOY_ENV?"http://localhost:3000":`https://${o?t?"fe.":"discover.":t?"www.":""}${N[e]}`},exports.getDiscoverApiPath=(e,t,o)=>{const{discoverBaseApiUrl:r="",discoverBaseProdApiUrl:a=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};return(!i.isProduction&&o?a:r)+"wp-json/api/"+U(n.default(e,Object.assign({},t)))},exports.getMarryBabyApiPath=(e,t,o)=>{const{marryBabyApiUrl:r="",marryBabyProdApiUrl:a=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};return(o&&!i.isProduction?a:r)+"wp-json/api/"+U(n.default(e,Object.assign({},t)))},exports.getPremiumApiPath=(e,t)=>{const{premiumBaseApiUrl:o=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};return(o||"https://premium-content-stag.hellohealthgroup.com/")+U(n.default(e,Object.assign({},t)))},exports.getSsoApiPath=(e,t)=>{const{publicSSO:o=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};return(o||"https://staging-id.hellobacsi.com/")+"api/"+U(n.default(e,Object.assign({},t)))},exports.getUrlToSignUp=(e,t,o="/community")=>{const r=e||("undefined"!=typeof window?window.location.href:"/");let a="undefined"!=typeof window?window.location.origin:"";a||e&&(e.startsWith("http://")||e.startsWith("https://"))&&(a=e.split("/").slice(0,3).join("/"));return((e,t)=>{const{publicSSO:o}=exports.GlobalData.env,r=e||window.location.href;return t&&Object.keys(t).map((e=>{j(r,e,t[e])})),j(r,"source","communities"),o?`${o}?returnUrl=${encodeURIComponent(r.toString())}`:r})(`${a}${o}/on-boarding?return=${encodeURIComponent(r)}`,t)},exports.getWebsiteUrlApi=M,exports.locale=x;
|