@hhgtech/hhg-components 1.27.69 → 1.27.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/babyGrowth.js +3 -3
- package/build/cache.js +1 -1
- package/build/care/api/paths.d.ts +1 -0
- package/build/care/components/organisms/bookingSearchBarV2/constants.d.ts +4 -0
- package/build/care/components/organisms/bookingSearchBarV2/index.d.ts +28 -0
- package/build/care/components/organisms/bookingSearchBarV2/index.styled.d.ts +4 -0
- package/build/care/components/organisms/bookingSearchBarV2/reducer.d.ts +144 -0
- package/build/care/components/organisms/bookingSearchBarV2/searchInputs/index.d.ts +24 -0
- package/build/care/components/organisms/bookingSearchBarV2/searchInputs/index.styled.d.ts +2 -0
- package/build/care/components/organisms/bookingSearchBarV2/searchLocation/index.d.ts +16 -0
- package/build/care/components/organisms/bookingSearchBarV2/searchLocation/index.styled.d.ts +10 -0
- package/build/care/components/organisms/bookingSearchBarV2/searchResult/icons.d.ts +5 -0
- package/build/care/components/organisms/bookingSearchBarV2/searchResult/index.d.ts +20 -0
- package/build/care/components/organisms/bookingSearchBarV2/searchResult/index.styled.d.ts +5 -0
- package/build/care/components/organisms/bookingSearchBarV2/searchResultSpecialties/index.d.ts +12 -0
- package/build/care/components/organisms/bookingSearchBarV2/searchResultSpecialties/index.styled.d.ts +5 -0
- package/build/care/components/organisms/bookingSearchBarV2/searchSpecialty/index.d.ts +14 -0
- package/build/care/components/organisms/bookingSearchBarV2/searchSpecialty/index.styled.d.ts +10 -0
- package/build/care/components/organisms/bookingSearchBarV2/searchTag/index.d.ts +3 -0
- package/build/care/components/organisms/bookingSearchBarV2/searchTag/index.styled.d.ts +2 -0
- package/build/care/components/organisms/bookingSearchBarV2/tabSearch/index.d.ts +9 -0
- package/build/care/components/organisms/bookingSearchBarV2/tabSearch/index.styled.d.ts +1 -0
- package/build/care/components/organisms/bookingSearchBarV2/types.d.ts +11 -0
- package/build/care/components/organisms/bookingSearchBarV2/useSearchBarApi.d.ts +18 -0
- package/build/care/index.d.ts +1 -0
- package/build/care/interfaces/types.d.ts +7 -0
- package/build/care.js +1 -1
- package/build/components/atoms/icons/Search.d.ts +4 -0
- package/build/components/atoms/icons/index.d.ts +1 -0
- package/build/components.js +1 -1
- package/build/constants.js +1 -1
- package/build/{core-364d1067.js → core-00fac4a1.js} +1 -1
- package/build/{dataTransform-7ab7ab3a.js → dataTransform-fb2e9aef.js} +1 -1
- package/build/ecom.js +1 -1
- package/build/esm/babyGrowth.js +9 -9
- package/build/esm/cache.js +1 -1
- package/build/esm/care/api/paths.d.ts +1 -0
- package/build/esm/care/components/organisms/bookingSearchBarV2/constants.d.ts +4 -0
- package/build/esm/care/components/organisms/bookingSearchBarV2/index.d.ts +28 -0
- package/build/esm/care/components/organisms/bookingSearchBarV2/index.styled.d.ts +4 -0
- package/build/esm/care/components/organisms/bookingSearchBarV2/reducer.d.ts +144 -0
- package/build/esm/care/components/organisms/bookingSearchBarV2/searchInputs/index.d.ts +24 -0
- package/build/esm/care/components/organisms/bookingSearchBarV2/searchInputs/index.styled.d.ts +2 -0
- package/build/esm/care/components/organisms/bookingSearchBarV2/searchLocation/index.d.ts +16 -0
- package/build/esm/care/components/organisms/bookingSearchBarV2/searchLocation/index.styled.d.ts +10 -0
- package/build/esm/care/components/organisms/bookingSearchBarV2/searchResult/icons.d.ts +5 -0
- package/build/esm/care/components/organisms/bookingSearchBarV2/searchResult/index.d.ts +20 -0
- package/build/esm/care/components/organisms/bookingSearchBarV2/searchResult/index.styled.d.ts +5 -0
- package/build/esm/care/components/organisms/bookingSearchBarV2/searchResultSpecialties/index.d.ts +12 -0
- package/build/esm/care/components/organisms/bookingSearchBarV2/searchResultSpecialties/index.styled.d.ts +5 -0
- package/build/esm/care/components/organisms/bookingSearchBarV2/searchSpecialty/index.d.ts +14 -0
- package/build/esm/care/components/organisms/bookingSearchBarV2/searchSpecialty/index.styled.d.ts +10 -0
- package/build/esm/care/components/organisms/bookingSearchBarV2/searchTag/index.d.ts +3 -0
- package/build/esm/care/components/organisms/bookingSearchBarV2/searchTag/index.styled.d.ts +2 -0
- package/build/esm/care/components/organisms/bookingSearchBarV2/tabSearch/index.d.ts +9 -0
- package/build/esm/care/components/organisms/bookingSearchBarV2/tabSearch/index.styled.d.ts +1 -0
- package/build/esm/care/components/organisms/bookingSearchBarV2/types.d.ts +11 -0
- package/build/esm/care/components/organisms/bookingSearchBarV2/useSearchBarApi.d.ts +18 -0
- package/build/esm/care/index.d.ts +1 -0
- package/build/esm/care/interfaces/types.d.ts +7 -0
- package/build/esm/care.js +1 -1
- package/build/esm/components/atoms/icons/Search.d.ts +4 -0
- package/build/esm/components/atoms/icons/index.d.ts +1 -0
- package/build/esm/components.js +1 -1
- package/build/esm/constants.js +1 -1
- package/build/esm/{core-6492f231.js → core-fe8e3ac4.js} +1 -1
- package/build/esm/{dataTransform-b8c22fc9.js → dataTransform-472ab3cb.js} +1 -1
- package/build/esm/ecom.js +1 -1
- package/build/esm/fixedBottomAdBlock-85d4c40e.js +1 -0
- package/build/esm/footer.js +1 -1
- package/build/esm/gAssets.js +1 -1
- package/build/esm/{getDynamicHealthTool-d16f3b54.js → getDynamicHealthTool-0f0a6a55.js} +1 -1
- package/build/esm/{getSocialList-f491a2d9.js → getSocialList-a9e6accc.js} +1 -1
- package/build/esm/hooks.js +1 -1
- package/build/esm/i18n/translationKeys.d.ts +1 -1
- package/build/esm/i18n-values/en-PH.js +1 -1
- package/build/esm/i18n-values/hi-IN.js +1 -1
- package/build/esm/i18n-values/id-ID.js +1 -1
- package/build/esm/i18n-values/km-KH.js +1 -1
- package/build/esm/i18n-values/ms-MY.js +1 -1
- package/build/esm/i18n-values/my-MM.js +1 -1
- package/build/esm/i18n-values/th-TH.js +1 -1
- package/build/esm/i18n-values/tl-PH.js +1 -1
- package/build/esm/i18n-values/vi-VN.js +1 -1
- package/build/esm/i18n-values/vi-VN_MB.js +1 -1
- package/build/esm/i18n-values/zh-TW.js +1 -1
- package/build/esm/i18n.js +1 -1
- package/build/esm/i18nV2.js +1 -1
- package/build/esm/{index-487953bb.js → index-07164e0d.js} +5 -5
- package/build/esm/{index-9b177171.js → index-075c02f5.js} +1 -1
- package/build/esm/index-1afa0089.js +1 -0
- package/build/esm/index-1da6924b.js +113 -0
- package/build/esm/index-2271114a.js +1 -0
- package/build/esm/index-24374711.js +177 -0
- package/build/esm/index-2c50f4ad.js +1 -0
- package/build/esm/{index-fd14a910.js → index-37be0623.js} +1 -1
- package/build/esm/{index-531008d2.js → index-3f7f7771.js} +1 -1
- package/build/esm/{index-fb3c41e5.js → index-583c5caf.js} +1 -1
- package/build/esm/{index-bb9b3e39.js → index-71b07919.js} +4 -4
- package/build/esm/{index-ed1cac71.js → index-74d8cf2c.js} +1 -1
- package/build/esm/{index-5fb217fb.js → index-783fd8db.js} +1 -1
- package/build/esm/{index-4d5c0771.js → index-93383cf3.js} +1 -1
- package/build/esm/index-9ae2e2dd.js +1 -0
- package/build/esm/{index-eabb2f3d.js → index-b0f9c8c2.js} +1 -1
- package/build/esm/{index-fe72b968.js → index-b88a25a3.js} +33 -33
- package/build/esm/{index-73288a5b.js → index-c9209389.js} +1 -1
- package/build/esm/{index-c4680d39.js → index-d754d2c5.js} +1 -1
- package/build/esm/{index-0a52e0c8.js → index-d7a14122.js} +1 -1
- package/build/esm/{index-45f7496a.js → index-e43a53fe.js} +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/{index.styled-8cd3ffb8.js → index.styled-33c36729.js} +6 -6
- package/build/esm/{index.styled-a5c98598.js → index.styled-5459405c.js} +22 -22
- package/build/esm/{index.styled-4eb37224.js → index.styled-bbbc0d87.js} +5 -5
- package/build/esm/lead.js +1 -1
- package/build/esm/mantine.js +1 -1
- package/build/esm/misc.js +1 -1
- package/build/esm/navigation.js +1 -1
- package/build/esm/onboarding.js +1 -1
- package/build/esm/onboardingV2.js +30 -30
- package/build/esm/{paths-8ff149e9.js → paths-2551a89f.js} +1 -1
- package/build/esm/pwg.js +2 -2
- package/build/esm/{routing-d9315774.js → routing-c886133a.js} +1 -1
- package/build/esm/screenSizeContext-2fd9933a.js +81 -0
- package/build/esm/together.js +1 -1
- package/build/esm/{types-7abf7ed5.js → types-073fcde8.js} +116 -116
- package/build/esm/types-14b6fe12.js +750 -0
- package/build/esm/types.js +1 -1
- package/build/esm/useHealthToolCache-3b53cefe.js +1 -0
- package/build/esm/{useRafState-be194a08.js → useRafState-b29e29b6.js} +1 -1
- package/build/esm/useTranslations-94a298de.js +1 -0
- package/build/esm/{utils-603729de.js → utils-3a82f3b7.js} +1 -1
- package/build/esm/utils-6dbfa2e2.js +1210 -0
- package/build/esm/vaccination.js +19 -19
- package/build/fixedBottomAdBlock-888c0461.js +1 -0
- package/build/footer.js +1 -1
- package/build/gAssets.js +1 -1
- package/build/getDynamicHealthTool-2491d41c.js +1 -0
- package/build/{getSocialList-1de29b3a.js → getSocialList-56cc0bdd.js} +1 -1
- package/build/hooks.js +1 -1
- package/build/i18n/translationKeys.d.ts +1 -1
- package/build/i18n-values/en-PH.js +1 -1
- package/build/i18n-values/hi-IN.js +1 -1
- package/build/i18n-values/id-ID.js +1 -1
- package/build/i18n-values/km-KH.js +1 -1
- package/build/i18n-values/ms-MY.js +1 -1
- package/build/i18n-values/my-MM.js +1 -1
- package/build/i18n-values/th-TH.js +1 -1
- package/build/i18n-values/tl-PH.js +1 -1
- package/build/i18n-values/vi-VN.js +1 -1
- package/build/i18n-values/vi-VN_MB.js +1 -1
- package/build/i18n-values/zh-TW.js +1 -1
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/{index-5878ef5b.js → index-03ced1e7.js} +14 -14
- package/build/{index-a9217025.js → index-04de4f49.js} +7 -7
- package/build/{index-81a906a4.js → index-0b86a969.js} +1 -1
- package/build/{index-8fd181ff.js → index-18bf24c4.js} +2 -2
- package/build/index-3594cf46.js +113 -0
- package/build/{index-185962f0.js → index-4320e812.js} +1 -1
- package/build/{index-c5e53640.js → index-586f414a.js} +1 -1
- package/build/{index-5426419e.js → index-5f1b82f8.js} +1 -1
- package/build/{index-a9abd927.js → index-74225755.js} +1 -1
- package/build/{index-82272902.js → index-87f1c61a.js} +1 -1
- package/build/index-9467210b.js +53 -0
- package/build/{index-165382ae.js → index-bdb74451.js} +1 -1
- package/build/{index-b98e0abe.js → index-c4863fbc.js} +1 -1
- package/build/{index-cd08fffe.js → index-c67a81fe.js} +1 -1
- package/build/index-cc6403bf.js +1 -0
- package/build/index-d2593989.js +1 -0
- package/build/index-dcff1800.js +1 -0
- package/build/{index-d0f3640e.js → index-e57e3072.js} +1 -1
- package/build/index-e6494985.js +1 -0
- package/build/{index-298ad9ee.js → index-f5e97467.js} +1 -1
- package/build/{index-5e5656f3.js → index-fc5ac11f.js} +1 -1
- package/build/index.js +1 -1
- package/build/index.styled-04c914b8.js +50 -0
- package/build/{index.styled-a8bfc669.js → index.styled-5de77bed.js} +12 -12
- package/build/{index.styled-f8627c59.js → index.styled-aeedd2f1.js} +6 -6
- package/build/lead.js +1 -1
- package/build/mantine.js +1 -1
- package/build/misc.js +1 -1
- package/build/navigation.js +1 -1
- package/build/onboarding.js +1 -1
- package/build/onboardingV2.js +17 -17
- package/build/paths-edf8d807.js +1 -0
- package/build/pwg.js +2 -2
- package/build/{routing-fb5db1d2.js → routing-3f03b7fc.js} +1 -1
- package/build/screenSizeContext-3bce883f.js +81 -0
- package/build/together.js +1 -1
- package/build/types-4357b272.js +750 -0
- package/build/{types-10d76b2f.js → types-bc949777.js} +80 -80
- package/build/types.js +1 -1
- package/build/useHealthToolCache-7cc7bbb4.js +1 -0
- package/build/{useRafState-a5e9cda8.js → useRafState-af8a4d48.js} +1 -1
- package/build/{useTranslations-e9a977c2.js → useTranslations-f946cddd.js} +1 -1
- package/build/utils-5f2e4ada.js +1210 -0
- package/build/{utils-8f9cdef6.js → utils-b69e0f1b.js} +1 -1
- package/build/vaccination.js +42 -42
- package/package.json +1 -1
- package/build/esm/fixedBottomAdBlock-6c133fcc.js +0 -1
- package/build/esm/index-41b77f3e.js +0 -1
- package/build/esm/index-663ec4de.js +0 -177
- package/build/esm/index-782be548.js +0 -1
- package/build/esm/index-823a548e.js +0 -1
- package/build/esm/index-a54b0739.js +0 -113
- package/build/esm/index-d20f3c10.js +0 -1
- package/build/esm/screenSizeContext-e0bb4713.js +0 -81
- package/build/esm/types-fc66947b.js +0 -339
- package/build/esm/useHealthToolCache-4b4cdc37.js +0 -1
- package/build/esm/useTranslations-3e881db9.js +0 -1
- package/build/esm/utils-1f109d73.js +0 -1210
- package/build/esm/utils-d5e5e420.js +0 -1
- package/build/fixedBottomAdBlock-80890f83.js +0 -1
- package/build/getDynamicHealthTool-bdf0afc0.js +0 -1
- package/build/index-024fd801.js +0 -1
- package/build/index-2b8f37e1.js +0 -53
- package/build/index-3c4ee26d.js +0 -1
- package/build/index-56aa446f.js +0 -1
- package/build/index-b9c68d00.js +0 -1
- package/build/index-ebedce55.js +0 -113
- package/build/index.styled-ef0fd080.js +0 -50
- package/build/paths-e4af6f7a.js +0 -1
- package/build/screenSizeContext-f4914aa0.js +0 -81
- package/build/types-ca7b4a5a.js +0 -339
- package/build/useHealthToolCache-f8aa169c.js +0 -1
- package/build/utils-d215a9f3.js +0 -1
- package/build/utils-f37ac675.js +0 -1210
- /package/build/{BMI_BOYS.percentile.monthly-566d44a6.js → BMI_BOYS.percentile.monthly-ce85cbaa.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-2d7a8532.js → BMI_BOYS.percentile.weekly-907fe858.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-4ef940c7.js → BMI_BOYS.percentile.yearly-53aebdc5.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-61bd02a5.js → BMI_BOYS.zscore.monthly-3f8ae54d.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-c4752c39.js → BMI_BOYS.zscore.weekly-d538296e.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-1bef43dd.js → BMI_BOYS.zscore.yearly-a18a90a9.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-79da78b5.js → BMI_GIRLS.percentile.monthly-a8bfe72c.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-d1dbd1b0.js → BMI_GIRLS.percentile.weekly-0c4f641f.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-de9fead6.js → BMI_GIRLS.percentile.yearly-296222bd.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-c787e54b.js → BMI_GIRLS.zscore.monthly-3005d7fb.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-ed863d49.js → BMI_GIRLS.zscore.weekly-882189f3.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-8515d7fb.js → BMI_GIRLS.zscore.yearly-d5ff80d7.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-2669b31c.js → HEAD CIRCUM_BOYS.percentile.monthly-07cdda99.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-610d83ed.js → HEAD CIRCUM_BOYS.percentile.weekly-1a366f96.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-f393638f.js → HEAD CIRCUM_BOYS.percentile.yearly-d6cf2202.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-be42756d.js → HEAD CIRCUM_BOYS.zscore.monthly-db5b94ab.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-26db840c.js → HEAD CIRCUM_BOYS.zscore.weekly-35b29074.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-79ed300c.js → HEAD CIRCUM_BOYS.zscore.yearly-175dc793.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-7ed956bc.js → HEAD CIRCUM_GIRLS.percentile.monthly-ea684642.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-643a5eef.js → HEAD CIRCUM_GIRLS.percentile.weekly-37333fc8.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-e5768cb7.js → HEAD CIRCUM_GIRLS.percentile.yearly-8f027f18.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-67cce25e.js → HEAD CIRCUM_GIRLS.zscore.monthly-a89a959c.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-fc98e3d3.js → HEAD CIRCUM_GIRLS.zscore.weekly-ee4a111b.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-681e1b54.js → HEAD CIRCUM_GIRLS.zscore.yearly-0ed20f95.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-7b20d402.js → HEIGHT_BOYS.percentile.monthly-1140adef.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-7e97094b.js → HEIGHT_BOYS.percentile.weekly-3bbf0b1f.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-54adbf6c.js → HEIGHT_BOYS.percentile.yearly-ae780adf.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-fbb459bf.js → HEIGHT_BOYS.zscore.monthly-78ed0896.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-091ae57d.js → HEIGHT_BOYS.zscore.weekly-6ad41d21.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-40990ba2.js → HEIGHT_BOYS.zscore.yearly-8776c3ee.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-a441682e.js → HEIGHT_GIRLS.percentile.monthly-8e628730.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-d7214c9a.js → HEIGHT_GIRLS.percentile.weekly-01b09969.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-f4e2be20.js → HEIGHT_GIRLS.percentile.yearly-af862b58.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-bc0b0f1a.js → HEIGHT_GIRLS.zscore.monthly-fdb87537.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-25a9c973.js → HEIGHT_GIRLS.zscore.weekly-a312ee05.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-4fd38d47.js → HEIGHT_GIRLS.zscore.yearly-f9b3d318.js} +0 -0
- /package/build/{Onboarding-918bcb2f.js → Onboarding-6046991e.js} +0 -0
- /package/build/{Visible-f7b9a0ea.js → Visible-8dfac33c.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-fa2a7a93.js → WEIGHT_BOYS.percentile.monthly-c7c2cbf5.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-273c8412.js → WEIGHT_BOYS.percentile.weekly-9551af52.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-33d1574d.js → WEIGHT_BOYS.percentile.yearly-87abbcbf.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-dcf0b685.js → WEIGHT_BOYS.zscore.monthly-346a63be.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-edecc293.js → WEIGHT_BOYS.zscore.weekly-ae0238bd.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-b575276b.js → WEIGHT_BOYS.zscore.yearly-adfb0402.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-a71f0afb.js → WEIGHT_GIRLS.percentile.monthly-85a3a57a.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-f970f70d.js → WEIGHT_GIRLS.percentile.weekly-0be4d3e9.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-12d34d41.js → WEIGHT_GIRLS.percentile.yearly-8d6a8a82.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-630258eb.js → WEIGHT_GIRLS.zscore.monthly-d3dd7142.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-d3a2c4de.js → WEIGHT_GIRLS.zscore.weekly-6017e0f0.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-bd6e091b.js → WEIGHT_GIRLS.zscore.yearly-fb435d58.js} +0 -0
- /package/build/{constants-8d1ab6b3.js → constants-dec7610d.js} +0 -0
- /package/build/{cookieHelper-3b665b4b.js → cookieHelper-7d5fd567.js} +0 -0
- /package/build/{dataTransform-fd8e952f.js → dataTransform-a105042f.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-6dd7eda4.js → BMI_BOYS.percentile.monthly-fe47e6cd.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-e74785e0.js → BMI_BOYS.percentile.weekly-aa044b48.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-99e25311.js → BMI_BOYS.percentile.yearly-fd50bc0e.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-2d627ad0.js → BMI_BOYS.zscore.monthly-bafb2899.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-a09067d0.js → BMI_BOYS.zscore.weekly-7ec736c9.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-659610e9.js → BMI_BOYS.zscore.yearly-f2a39ed3.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-fc7ea529.js → BMI_GIRLS.percentile.monthly-0710ab0b.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-9f82ac12.js → BMI_GIRLS.percentile.weekly-9abed752.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-7922630f.js → BMI_GIRLS.percentile.yearly-04436686.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-124db983.js → BMI_GIRLS.zscore.monthly-8725527a.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-2cd2ae10.js → BMI_GIRLS.zscore.weekly-38c97231.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-b47e8355.js → BMI_GIRLS.zscore.yearly-12253d20.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-0f849e49.js → HEAD CIRCUM_BOYS.percentile.monthly-119dfd3c.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-311179a8.js → HEAD CIRCUM_BOYS.percentile.weekly-7284d9b1.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-e7f94da6.js → HEAD CIRCUM_BOYS.percentile.yearly-e139f816.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-cc901cdc.js → HEAD CIRCUM_BOYS.zscore.monthly-26daac23.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-409787c4.js → HEAD CIRCUM_BOYS.zscore.weekly-c2c564d0.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-e15b53db.js → HEAD CIRCUM_BOYS.zscore.yearly-a9b1ab42.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-2ffb92f7.js → HEAD CIRCUM_GIRLS.percentile.monthly-8f19524f.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-5bed76e7.js → HEAD CIRCUM_GIRLS.percentile.weekly-6cdaeadb.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-2d9a9cf7.js → HEAD CIRCUM_GIRLS.percentile.yearly-649c05a6.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-c6a8c417.js → HEAD CIRCUM_GIRLS.zscore.monthly-3bcbed96.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-a5247bc4.js → HEAD CIRCUM_GIRLS.zscore.weekly-e0c17fa2.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-491daf49.js → HEAD CIRCUM_GIRLS.zscore.yearly-ee6da83b.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-089b50f8.js → HEIGHT_BOYS.percentile.monthly-fa7c526e.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-493ab21a.js → HEIGHT_BOYS.percentile.weekly-085d6a9f.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-f93e11b9.js → HEIGHT_BOYS.percentile.yearly-d6aaab6f.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-a102b290.js → HEIGHT_BOYS.zscore.monthly-da391c1b.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-8ddbacca.js → HEIGHT_BOYS.zscore.weekly-bb540454.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-eaaf50be.js → HEIGHT_BOYS.zscore.yearly-348b3816.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-0c718740.js → HEIGHT_GIRLS.percentile.monthly-b51d0fd6.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-f64f9559.js → HEIGHT_GIRLS.percentile.weekly-994e98db.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-62836edf.js → HEIGHT_GIRLS.percentile.yearly-c75f410e.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-efd7fe65.js → HEIGHT_GIRLS.zscore.monthly-e7264d3b.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-0b4c13ad.js → HEIGHT_GIRLS.zscore.weekly-0f8554b6.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-dbb1c464.js → HEIGHT_GIRLS.zscore.yearly-2f3f3a34.js} +0 -0
- /package/build/esm/{Onboarding-5209aa8f.js → Onboarding-232ac075.js} +0 -0
- /package/build/esm/{Visible-7fde197c.js → Visible-39409091.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-8d5f17eb.js → WEIGHT_BOYS.percentile.monthly-2a8bb322.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-f0d6bcdc.js → WEIGHT_BOYS.percentile.weekly-25425843.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-004d7884.js → WEIGHT_BOYS.percentile.yearly-4cc9d801.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-5cc93e2d.js → WEIGHT_BOYS.zscore.monthly-dccd7084.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-5bcc179a.js → WEIGHT_BOYS.zscore.weekly-c494ae68.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-aa793430.js → WEIGHT_BOYS.zscore.yearly-6a7fcff9.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-0ce0af1e.js → WEIGHT_GIRLS.percentile.monthly-0cc1fb2a.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-43dcc38a.js → WEIGHT_GIRLS.percentile.weekly-9c40d0ba.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-9a7ad2e7.js → WEIGHT_GIRLS.percentile.yearly-88a45f13.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-fb016308.js → WEIGHT_GIRLS.zscore.monthly-bc332015.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-72cb7146.js → WEIGHT_GIRLS.zscore.weekly-46c702bd.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-7a1353ef.js → WEIGHT_GIRLS.zscore.yearly-8358d95b.js} +0 -0
- /package/build/esm/{constants-22665a95.js → constants-454ca790.js} +0 -0
- /package/build/esm/{cookieHelper-c441527b.js → cookieHelper-bf990dc8.js} +0 -0
- /package/build/esm/{dataTransform-3cdbcc1f.js → dataTransform-b313aa54.js} +0 -0
- /package/build/esm/{index-8ce09b49.js → index-747533b3.js} +0 -0
- /package/build/esm/{isProduction-58e08b60.js → isProduction-51e5a882.js} +0 -0
- /package/build/esm/{localizeNumberFormat-34a914cf.js → localizeNumberFormat-1db9658b.js} +0 -0
- /package/build/esm/{normalizeLink-0ac71571.js → normalizeLink-01dd46d6.js} +0 -0
- /package/build/esm/{theme-808a1a77.js → theme-3f5fb9b4.js} +0 -0
- /package/build/esm/{translationsContext-616c8791.js → translationsContext-8e27754a.js} +0 -0
- /package/build/esm/{tslib.es6-f7c415e8.js → tslib.es6-c990ebbd.js} +0 -0
- /package/build/esm/{types-33ff47e6.js → types-59994293.js} +0 -0
- /package/build/esm/{useIsInit-6466d212.js → useIsInit-399900be.js} +0 -0
- /package/build/esm/{useOutsideClick-f36ba482.js → useOutsideClick-93403663.js} +0 -0
- /package/build/esm/{useScrollbarSize-ac53783f.js → useScrollbarSize-85d86621.js} +0 -0
- /package/build/esm/{useUniqueId-4a392949.js → useUniqueId-d2edd2de.js} +0 -0
- /package/build/{index-4cc291d1.js → index-484cc895.js} +0 -0
- /package/build/{isProduction-85cdc0ab.js → isProduction-6f51bfd8.js} +0 -0
- /package/build/{localizeNumberFormat-9735f40b.js → localizeNumberFormat-6c838ca4.js} +0 -0
- /package/build/{normalizeLink-7ef1495e.js → normalizeLink-7adeb83a.js} +0 -0
- /package/build/{theme-9e0d88e8.js → theme-2b27c2a9.js} +0 -0
- /package/build/{translationsContext-dc043578.js → translationsContext-10468cf0.js} +0 -0
- /package/build/{tslib.es6-e14619bf.js → tslib.es6-cd3b6b6c.js} +0 -0
- /package/build/{types-2dae143e.js → types-4777e5c6.js} +0 -0
- /package/build/{useIsInit-c65601fb.js → useIsInit-f81023ac.js} +0 -0
- /package/build/{useOutsideClick-ac254274.js → useOutsideClick-fd083518.js} +0 -0
- /package/build/{useScrollbarSize-251e49d0.js → useScrollbarSize-b84c486c.js} +0 -0
- /package/build/{useUniqueId-76b34caf.js → useUniqueId-908d46ed.js} +0 -0
|
@@ -0,0 +1,750 @@
|
|
|
1
|
+
import{a as e}from"./tslib.es6-c990ebbd.js";import*as t from"react";import o,{useState as i,useCallback as a,useMemo as n,useEffect as s,useRef as r,useReducer as l}from"react";import{u as c}from"./useTranslations-94a298de.js";import d from"lodash/debounce";import{I as p,L as u,a as h}from"./constants-454ca790.js";import{I as g}from"./index-3f7f7771.js";import m,{createGlobalStyle as C}from"styled-components";import{T as b}from"./index-d754d2c5.js";import{t as f}from"./theme-3f5fb9b4.js";import{M as y}from"./screenSizeContext-2fd9933a.js";import v from"react-loading-skeleton";import x from"lodash/shuffle";import{a as w}from"./useOutsideClick-93403663.js";import{P as E}from"./paths-2551a89f.js";import{Input as L,Divider as S,Skeleton as k,Tabs as O,Flex as j,Button as I}from"@mantine/core";import{c as M,d as F}from"./index-93383cf3.js";import{g as R,s as $,d as T}from"./cookieHelper-bf990dc8.js";import{C as P,I as A}from"./index-1da6924b.js";import N from"string-format";const B=e=>t.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),t.createElement("path",{d:"M7.99969 9.38055L5.45236 6.83322C5.17636 6.55722 4.72836 6.55722 4.45236 6.83322C4.17636 7.10922 4.17636 7.55722 4.45236 7.83322L7.52836 10.9092C7.78903 11.1699 8.21103 11.1699 8.47103 10.9092L11.547 7.83322C11.823 7.55722 11.823 7.10922 11.547 6.83322C11.271 6.55722 10.823 6.55722 10.547 6.83322L7.99969 9.38055Z"}));function V(){const[e,t]=i((()=>{if("undefined"==typeof window)return"unset";if(R(M))return"granted";const e=!location.protocol.includes("https")&&"localhost"!==location.hostname;return!navigator.geolocation||e?"denied":"unset"})),[o,s]=i((()=>{if("undefined"==typeof window)return null;const e=R(M);if(e)try{return JSON.parse(e)}catch(e){console.log(e)}return null})),r=a((function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition((e=>{const o={lat:""+Math.round(1e7*e.coords.latitude)/1e7,lng:""+Math.round(1e7*e.coords.longitude)/1e7};$(M,JSON.stringify(o),{minutes:15}),s(o),t("granted")}),(()=>{T(M),t("denied")}))}),[]);return n((()=>({geoLocationPermission:e,geoLocationCoordinates:o,requestGeoLocation:r})),[e,o])}const D=m.div``,z=m.div`
|
|
2
|
+
--searchbar-z-index: 305;
|
|
3
|
+
&[data-is-modal='true'] {
|
|
4
|
+
position: fixed;
|
|
5
|
+
left: 0;
|
|
6
|
+
right: 0;
|
|
7
|
+
top: 0;
|
|
8
|
+
height: var(--mobile-care-searchbar-height, 100%);
|
|
9
|
+
overflow-y: auto;
|
|
10
|
+
-webkit-overflow-scrolling: touch;
|
|
11
|
+
background-color: white;
|
|
12
|
+
z-index: var(--searchbar-z-index);
|
|
13
|
+
}
|
|
14
|
+
`,H=m.section``,K=m.input`
|
|
15
|
+
position: fixed;
|
|
16
|
+
left: -100%;
|
|
17
|
+
top: -100%;
|
|
18
|
+
`,_=m(g)`
|
|
19
|
+
#booking-search-bar & {
|
|
20
|
+
input {
|
|
21
|
+
font-size: 16px;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
`,G=C`
|
|
25
|
+
.care-popup-open {
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
position: fixed;
|
|
28
|
+
&::before {
|
|
29
|
+
content: '';
|
|
30
|
+
inset: 0;
|
|
31
|
+
position: absolute;
|
|
32
|
+
background-color: white;
|
|
33
|
+
min-height: 100vh;
|
|
34
|
+
min-width: 100vw;
|
|
35
|
+
z-index: 2;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
`,Z=({className:e,color:t})=>o.createElement("svg",{className:e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.createElement("path",{d:"M18 6L6 18",stroke:t||"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M6 6L18 18",stroke:t||"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),Y=({className:e,color:t})=>o.createElement("svg",{width:"14",height:"20",viewBox:"0 0 14 20",className:e},o.createElement("path",{d:"M7 0C3.134 0 0 3.134 0 7C0 10.966 4.404 16.82 6.226 19.071C6.626 19.565 7.374 19.565 7.774 19.071C9.596 16.82 14 10.966 14 7C14 3.134 10.866 0 7 0ZM7 9.5C5.619 9.5 4.5 8.381 4.5 7C4.5 5.619 5.619 4.5 7 4.5C8.381 4.5 9.5 5.619 9.5 7C9.5 8.381 8.381 9.5 7 9.5Z",fill:t||"currentColor"})),U=({className:e,color:t})=>o.createElement("svg",{className:e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.createElement("path",{d:"M11 18C14.866 18 18 14.866 18 11C18 7.13401 14.866 4 11 4C7.13401 4 4 7.13401 4 11C4 14.866 7.13401 18 11 18Z",stroke:t||"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M20 20L16 16",stroke:t||"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),W=({width:e,height:t})=>o.createElement("svg",{width:e||30,height:t||30,viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.createElement("circle",{cx:"15",cy:"15",r:"15",fill:"#F7F9FC"})),Q=m.li`
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
gap: 12px;
|
|
42
|
+
padding: 8px 16px;
|
|
43
|
+
|
|
44
|
+
> :first-child {
|
|
45
|
+
flex: 1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
> :nth-child(2) {
|
|
49
|
+
flex: 6;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
& + li::before {
|
|
53
|
+
content: '';
|
|
54
|
+
position: absolute;
|
|
55
|
+
left: 18px;
|
|
56
|
+
right: 18px;
|
|
57
|
+
top: 0;
|
|
58
|
+
height: 1px;
|
|
59
|
+
background-color: ${f.colors.neutral100};
|
|
60
|
+
}
|
|
61
|
+
`,q=m.div`
|
|
62
|
+
display: flex;
|
|
63
|
+
position: absolute;
|
|
64
|
+
top: 48px;
|
|
65
|
+
min-width: 100%;
|
|
66
|
+
box-shadow: 0px 24px 32px rgba(0, 0, 0, 0.04),
|
|
67
|
+
0px 16px 24px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04),
|
|
68
|
+
0px 0px 1px rgba(0, 0, 0, 0.04);
|
|
69
|
+
border-radius: ${e=>e.theme.borderRadius};
|
|
70
|
+
background-color: white;
|
|
71
|
+
z-index: 30;
|
|
72
|
+
|
|
73
|
+
${y.tdDown} {
|
|
74
|
+
position: relative;
|
|
75
|
+
top: 0;
|
|
76
|
+
box-shadow: initial;
|
|
77
|
+
}
|
|
78
|
+
`,J=m.ul`
|
|
79
|
+
width: 100%;
|
|
80
|
+
max-height: 600px;
|
|
81
|
+
overflow-y: auto;
|
|
82
|
+
`,X=m(Y)`
|
|
83
|
+
width: 12px;
|
|
84
|
+
height: 18px;
|
|
85
|
+
`,ee=m.li`
|
|
86
|
+
position: relative;
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
padding: 12px 18px;
|
|
89
|
+
display: flex;
|
|
90
|
+
align-items: center;
|
|
91
|
+
gap: 14px;
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
|
|
94
|
+
${({isSelected:e})=>e&&"\n &::after {\n content: url(\"data:image/svg+xml,%3Csvg width='19' height='14' viewBox='0 0 19 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16.9803 0.990669C16.7205 0.99841 16.4739 1.10699 16.2928 1.2934L5.99984 11.5864L2.70687 8.2934C2.61473 8.19743 2.50436 8.12081 2.38223 8.06802C2.2601 8.01524 2.12867 7.98735 1.99563 7.986C1.86259 7.98464 1.73061 8.00985 1.60743 8.06014C1.48426 8.11043 1.37235 8.18479 1.27827 8.27887C1.1842 8.37295 1.10983 8.48485 1.05954 8.60803C1.00926 8.73121 0.98405 8.86318 0.985403 8.99622C0.986757 9.12926 1.01464 9.26069 1.06743 9.38282C1.12021 9.50495 1.19684 9.61532 1.29281 9.70747L5.29281 13.7075C5.48035 13.8949 5.73467 14.0002 5.99984 14.0002C6.26501 14.0002 6.51933 13.8949 6.70687 13.7075L17.7069 2.70747C17.8514 2.567 17.9501 2.38616 17.99 2.18864C18.03 1.99112 18.0093 1.78614 17.9308 1.60055C17.8523 1.41497 17.7195 1.25744 17.5499 1.14861C17.3803 1.03978 17.1817 0.984729 16.9803 0.990669Z' fill='%232685F1'/%3E%3C/svg%3E%0A\");\n top: 50%;\n right: 18px;\n position: absolute;\n transform: translateY(-50%);\n }\n "}
|
|
95
|
+
|
|
96
|
+
& + li::before {
|
|
97
|
+
content: '';
|
|
98
|
+
position: absolute;
|
|
99
|
+
left: 18px;
|
|
100
|
+
right: 18px;
|
|
101
|
+
top: 0;
|
|
102
|
+
height: 1px;
|
|
103
|
+
background-color: ${f.colors.neutral100};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&:not([data-is-denied='true']):hover {
|
|
107
|
+
background-color: ${f.colors.neutral50};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&:last-child:hover {
|
|
111
|
+
border-bottom-right-radius: 6px;
|
|
112
|
+
border-bottom-left-radius: 6px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&:first-child:hover {
|
|
116
|
+
border-top-right-radius: 6px;
|
|
117
|
+
border-top-left-radius: 6px;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&[data-is-denied='true'] {
|
|
121
|
+
cursor: not-allowed;
|
|
122
|
+
}
|
|
123
|
+
`,te=m((({count:e,className:t})=>o.createElement(o.Fragment,null,[...Array(e)].map(((e,i)=>o.createElement(Q,{className:t,key:i},o.createElement(v,{count:1,height:32}),o.createElement(v,{count:1,height:24})))))))`
|
|
124
|
+
&:first-child {
|
|
125
|
+
padding-top: 18px;
|
|
126
|
+
}
|
|
127
|
+
`,oe=({cities:e,isLoading:t,onLocationClick:i,selectedLocation:a})=>{const{t:n,locale:s}=c();return o.createElement(q,{"data-testid":"location-search-results"},o.createElement(J,null,t?o.createElement(te,{count:5}):!e||e.length<1?o.createElement(o.Fragment,null,o.createElement(ee,{"data-is-denied":"true"},o.createElement(b,{size:"sm",color:"#ccc"},n("booking.searchBar.noResults")))):o.createElement(o.Fragment,null,o.createElement(ee,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{var e;i&&i({name:n("booking.searchBar.allLocations"),id:p,slug:null===(e=u[s])||void 0===e?void 0:e.ALL})}},o.createElement(X,{color:f.colors.neutral400}),o.createElement(b,{size:"md"},n("booking.searchBar.allLocations"))),e.map((e=>o.createElement(ee,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),i&&i(e)},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==a?void 0:a.id)===e.id},o.createElement(X,{color:f.colors.neutral400}),o.createElement(b,{size:"md"},e.name)))))))},ie="TYPE_CHARACTER",ae="REMOVE_CHARACTER",ne="REMOVE_ALL",se="REMOVE_LAST_VISIBLE_NODE",re="PAUSE_FOR",le="CHANGE_DELETE_SPEED",ce="CHANGE_DELAY",de="PASTE_STRING",pe=(e,t)=>Math.floor(Math.random()*(t-e+1))+e,ue="TEXT_NODE";class he{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(re,{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:o}=this.options||{},i="function"==typeof o?o(e):e.split("");this.typeCharacters(i,t)}return this},this.pasteString=(e,t=null)=>(e&&this.addEventToQueue(de,{character:e,node:t}),this),this.deleteAll=(e="natural")=>(this.addEventToQueue(ne,{speed:e}),this),this.changeDeleteSpeed=e=>{if(!e)throw new Error("Must provide new delete speed");return this.addEventToQueue(le,{speed:e}),this},this.changeDelay=e=>{if(!e)throw new Error("Must provide new delay");return this.addEventToQueue(ce,{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(ae);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(ie,{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(ae)})),this},this.addEventToQueue=(e,t,o=!1)=>this.addEventToStateProperty(e,t,o,"eventQueue"),this.addReverseCalledEvent=(e,t,o=!1)=>{const{loop:i}=this.options;return i?this.addEventToStateProperty(e,t,o,"reverseCalledEvents"):this},this.addEventToStateProperty=(e,t,o=!1,i)=>{const a={eventName:e,eventArgs:t||{}};return this.state[i]=o?[a,...this.state[i]]:[...this.state[i],a],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 o=[...this.state.eventQueue],i=o.shift();let a=0;if(a=i.eventName===se||i.eventName===ae?"natural"===this.options.deleteSpeed?pe(40,80):this.options.deleteSpeed:"natural"===this.options.delay?pe(120,160):this.options.delay,t<=a)return;const{eventName:n,eventArgs:s}=i;switch(n){case de:case ie:{const{character:e}=s,t=document.createTextNode(e);let o=t;this.options.onCreateTextNode&&"function"==typeof this.options.onCreateTextNode&&(o=this.options.onCreateTextNode(e,t)),this.state.visibleNodes=[...this.state.visibleNodes,{type:ue,character:e,node:o}];break}case ae:o.unshift({eventName:se,eventArgs:{removingCharacterNode:!0}});break;case re:{const{ms:e}=i.eventArgs;this.state.pauseUntil=Date.now()+parseInt(e);break}case ne:{const{visibleNodes:e}=this.state,{speed:t}=s,i=[];t&&i.push({eventName:le,eventArgs:{speed:t,temp:!0}});for(let t=0,o=e.length;t<o;t++)i.push({eventName:se,eventArgs:{removingCharacterNode:!1}});t&&i.push({eventName:le,eventArgs:{speed:this.options.deleteSpeed,temp:!0}}),o.unshift(...i);break}case se: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 le:this.options.deleteSpeed=i.eventArgs.speed;break;case ce:this.options.delay=i.eventArgs.delay}this.options.loop&&(i.eventName===se||i.eventArgs&&i.eventArgs.temp||(this.state.calledEvents=[...this.state.calledEvents,i])),this.state.eventQueue=o,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(ne,null,!0),!0===this.options.autoStart&&this.options.strings&&this.typeOutAllStrings().start()}}function ge({inputRef:e,wrapperRef:t,disabled:o}){const{t:i,locale:a}=c(),r=n((()=>{if(o)return[];const e=["booking.searchBar.placeholder.hospital","booking.searchBar.placeholder.doctor"];return"zh-TW"!==a&&e.push("booking.searchBar.placeholder.specialty","booking.searchBar.placeholder.service"),x(e).map((e=>i(e)))}),[i,a]);function l(e){const t=p();return t&&(t.placeholder=t.placeholder+e),null}function d(){const e=p();e&&(e.placeholder=e.placeholder.slice(0,-1))}function p(){return e&&e.current?e.current:t&&t.current&&t.current.querySelector("input")||null}s((()=>{if(o)return;const e=p();e&&(e.placeholder="",new he({strings:r,autoStart:!0,loop:!0,delay:32,deleteSpeed:32,pauseFor:1500,onCreateTextNode:l,onRemoveNode:d}))}),[e,t])}const me=m.div`
|
|
128
|
+
user-select: none;
|
|
129
|
+
input {
|
|
130
|
+
pointer-events: none;
|
|
131
|
+
background-color: white;
|
|
132
|
+
}
|
|
133
|
+
`;function Ce({focused:e,value:t="",onClick:i,trackingAttributes:a,inputSearchPlaceholder:s}){const{t:l}=c(),d=r(null);ge({wrapperRef:d,disabled:!!s});const p=n((()=>a?{"data-event-category":a.dataEventCategory,"data-event-action":a.dataEventAction,"data-event-label":a.dataEventLabel}:{}),[a]);return o.createElement(me,Object.assign({onClick:()=>i&&i(),ref:d},p),o.createElement(_,{inputClassName:"location"===e?"focused":void 0,name:"booking-search-placeholder",displayIcon:o.createElement(U,{color:f.colors.gray400}),placeholder:l("booking.searchBar.searchInput.placeholder"),value:t,size:"md"}))}const be=m.header`
|
|
134
|
+
display: flex;
|
|
135
|
+
height: 64px;
|
|
136
|
+
align-items: center;
|
|
137
|
+
justify-content: space-between;
|
|
138
|
+
margin: 0 auto;
|
|
139
|
+
position: sticky;
|
|
140
|
+
z-index: 99;
|
|
141
|
+
background-color: white;
|
|
142
|
+
top: 0;
|
|
143
|
+
left: 0;
|
|
144
|
+
`,fe=m.div`
|
|
145
|
+
display: inline-flex;
|
|
146
|
+
flex: 1;
|
|
147
|
+
justify-content: flex-end;
|
|
148
|
+
cursor: pointer;
|
|
149
|
+
text-decoration: underline;
|
|
150
|
+
`,ye=m.div`
|
|
151
|
+
display: flex;
|
|
152
|
+
align-items: center;
|
|
153
|
+
margin-left: 16px;
|
|
154
|
+
cursor: pointer;
|
|
155
|
+
`,ve=m.div`
|
|
156
|
+
width: 100%;
|
|
157
|
+
margin-left: 24px;
|
|
158
|
+
`,xe=m(b)`
|
|
159
|
+
color: ${f.colors.secondaryDark};
|
|
160
|
+
text-align: start;
|
|
161
|
+
`,we=({className:e,onLeftClick:t,headingText:i,onRightClick:a,iconLeft:n,textRight:s})=>o.createElement(be,{className:e},o.createElement(ye,{onClick:t},n||o.createElement(Z,{color:f.colors.gray800})),o.createElement(ve,null,o.createElement(xe,{size:"md",type:"bold"},i)),o.createElement(fe,{onClick:a},s&&o.createElement("p",null,s))),Ee={"en-PH":3,"tl-PH":2,"id-ID":3,"vi-VN":2,"zh-TW":0,"ms-MY":2},Le={isMobile:!1,isDebug:!1,navigateTo:null,geoLocationPermission:"unset",geoLocationCoordinates:null,focused:"none",searchLocationKeywords:"",searchKeywords:"",selectedLocation:null,defaultCity:null,initialCities:[],cities:[],searchResults:[],initialSearchResults:[],isLoadingCities:!1,isLoadingSearchResults:!1,isMobileModalOpened:!1,initialSelectedCity:null,autoCompleteDisabled:!1,inputSearchPlaceholder:"",locale:"vi-VN"};var Se;function ke(e){const{selectedLocation:t,searchLocationKeywords:o}=e;return t&&o!==t.name?Object.assign(Object.assign({},e),{searchLocationKeywords:t.name}):e}function Oe(e,t){var o;switch(e.isDebug&&console.log("bookingSearchBar",{action:t,state:e}),t.type){case Se.NavigateTo:return Object.assign(Object.assign({},e),{navigateTo:t.payload,focused:"none",isMobileModalOpened:!1});case Se.ClickOutsideInputLocation:return e.isMobile||"location"!==e.focused?e:ke(Object.assign(Object.assign({},e),{focused:"none"}));case Se.ClickOutsideInputSearch:return e.isMobile||"search"!==e.focused?e:Object.assign(Object.assign({},e),{focused:"none"});case Se.FocusInputLocation:{const t=Object.assign(Object.assign({},e),{focused:"location"});return(null===(o=e.selectedLocation)||void 0===o?void 0:o.id)===h&&(t.searchLocationKeywords=""),t}case Se.FocusInputSearch:const i=Object.assign(Object.assign({},e),{focused:"search"});return e.isMobile?ke(i):i;case Se.ChangeInputLocation:return Object.assign(Object.assign({},e),{searchLocationKeywords:t.payload});case Se.ChangeInputSearch:{const o=t.payload;return Object.assign(Object.assign({},e),{searchKeywords:o,isLoadingSearchResults:o.trim().length>Ee[e.locale]})}case Se.SelectCurrentLocation:return Object.assign(Object.assign({},e),{focused:"none",selectedLocation:t.payload,searchLocationKeywords:t.payload.name});case Se.ClearInputLocation:return Object.assign(Object.assign({},e),{focused:"location",cities:e.initialCities,searchLocationKeywords:""});case Se.ClearInputSearch:return Object.assign(Object.assign({},e),{focused:"search",searchKeywords:""});case Se.SelectLocation:return Object.assign(Object.assign({},e),{focused:"none",selectedLocation:t.payload,searchLocationKeywords:t.payload.name});case Se.SelectSearchResult:return Object.assign(Object.assign({},e),{searchKeywords:t.payload.name,isMobileModalOpened:!1,focused:"none",navigateTo:t.payload.url});case Se.FetchCitiesStart:return Object.assign(Object.assign({},e),{isLoadingCities:!0});case Se.FetchCitiesFinish:return Object.assign(Object.assign({},e),{isLoadingCities:!1});case Se.FetchSearchResultsStart:return Object.assign(Object.assign({},e),{isLoadingSearchResults:!0});case Se.FetchSearchResultsFinish:return Object.assign(Object.assign({},e),{isLoadingSearchResults:!1});case Se.FetchSearchResultsComplete:{const o=Object.assign(Object.assign({},e),{searchResults:t.payload});return 0===e.initialSearchResults.length&&(o.initialSearchResults=t.payload),o}case Se.FetchCitiesByGeoIpComplete:{let{cities:o}=t.payload;const{default:i}=t.payload;o=o.filter((e=>e.id!==i.id)),o.unshift(i),e.initialSelectedCity&&!o.find((t=>t.id===e.initialSelectedCity.id))&&o.unshift(e.initialSelectedCity);const a=Object.assign(Object.assign({},e),{defaultCity:i,initialCities:o,cities:o});return"denied"!==e.geoLocationPermission||e.initialSelectedCity||(a.selectedLocation=i,a.searchLocationKeywords=i.name),a}case Se.FetchCitiesByKeywordComplete:return Object.assign(Object.assign({},e),{cities:t.payload});case Se.DisplayInitialCities:return Object.assign(Object.assign({},e),{cities:e.initialCities});case Se.DisplayInitialSearchResults:return Object.assign(Object.assign({},e),{searchResults:e.initialSearchResults,isLoadingSearchResults:!1});case Se.GrantGeoLocationPermission:return Object.assign(Object.assign({},e),{geoLocationPermission:"granted",geoLocationCoordinates:t.payload});case Se.DenyGeoLocationPermission:return Object.assign(Object.assign({},e),{geoLocationPermission:"denied",geoLocationCoordinates:null});case Se.OpenMobileModal:return Object.assign(Object.assign({},e),{isMobileModalOpened:!0});case Se.CloseMobileModal:return Object.assign(Object.assign({},e),{isMobileModalOpened:!1});case Se.UpdateInitialSearchValue:return Object.assign(Object.assign({},e),{searchKeywords:t.payload});case Se.SetInputSearchPlaceholder:return Object.assign(Object.assign({},e),{inputSearchPlaceholder:t.payload});default:return e}}!function(e){e.NavigateTo="navigate to url",e.ClickOutsideInputLocation="click outside input location",e.ClickOutsideInputSearch="click outside input search",e.SelectCurrentLocation="select current location",e.FocusInputLocation="focus input location",e.FocusInputSearch="focus input search",e.ChangeInputLocation="change input location",e.ChangeInputSearch="change input search",e.ClearInputLocation="clear input location",e.ClearInputSearch="clear input search",e.SelectLocation="select location",e.FetchCitiesStart="fetch cities start",e.FetchCitiesFinish="fetch cities finish",e.FetchSearchResultsStart="fetch search results start",e.FetchSearchResultsComplete="fetch search results complete",e.FetchSearchResultsFinish="fetch search results finish",e.FetchCitiesByGeoIpComplete="fetch cities by geo IP finish",e.FetchCitiesByKeywordComplete="fetch cities by keyword finish",e.DisplayInitialCities="display initial cities",e.DisplayInitialSearchResults="display initial search results",e.GrantGeoLocationPermission="grant geolocation permission",e.DenyGeoLocationPermission="deny geolocation permission",e.OpenMobileModal="open mobile modal",e.CloseMobileModal="close mobile modal",e.UpdateInitialSearchValue="update initial search value",e.SelectSearchResult="select search result",e.SetInputSearchPlaceholder="set input search placeholder"}(Se||(Se={}));const je=m.div`
|
|
162
|
+
display: flex;
|
|
163
|
+
gap: 16px;
|
|
164
|
+
${y.mbDown} {
|
|
165
|
+
flex-direction: column;
|
|
166
|
+
padding: 14px;
|
|
167
|
+
background-color: ${f.colors.primary50};
|
|
168
|
+
|
|
169
|
+
input {
|
|
170
|
+
filter: drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.04))
|
|
171
|
+
drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.06))
|
|
172
|
+
drop-shadow(0px 0px 1px rgba(0, 0, 0, 0.04));
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
input {
|
|
177
|
+
background-color: white;
|
|
178
|
+
}
|
|
179
|
+
`,Ie=m.div`
|
|
180
|
+
position: relative;
|
|
181
|
+
`,Me=m(Ie)`
|
|
182
|
+
flex: 1;
|
|
183
|
+
`,Fe=m(Ie)`
|
|
184
|
+
flex: 2;
|
|
185
|
+
`,Re=m((({className:e,color:t})=>o.createElement("svg",{className:e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.createElement("rect",{x:"4",y:"4",width:"16",height:"16",rx:"8",fill:"white"}),o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM8.29289 8.29289C8.68342 7.90237 9.31658 7.90237 9.70711 8.29289L12 10.5858L14.2929 8.29289C14.6834 7.90237 15.3166 7.90237 15.7071 8.29289C16.0976 8.68342 16.0976 9.31658 15.7071 9.70711L13.4142 12L15.7071 14.2929C16.0976 14.6834 16.0976 15.3166 15.7071 15.7071C15.3166 16.0976 14.6834 16.0976 14.2929 15.7071L12 13.4142L9.70711 15.7071C9.31658 16.0976 8.68342 16.0976 8.29289 15.7071C7.90237 15.3166 7.90237 14.6834 8.29289 14.2929L10.5858 12L8.29289 9.70711C7.90237 9.31658 7.90237 8.68342 8.29289 8.29289Z",fill:t||"currentColor"}))))`
|
|
186
|
+
display: none;
|
|
187
|
+
&.shown {
|
|
188
|
+
display: block;
|
|
189
|
+
}
|
|
190
|
+
`,$e=()=>o.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18"},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.97887 8.15493C2.97887 5.29627 5.29627 2.97887 8.15493 2.97887C11.0136 2.97887 13.331 5.29627 13.331 8.15493C13.331 11.0136 11.0136 13.331 8.15493 13.331C5.29627 13.331 2.97887 11.0136 2.97887 8.15493ZM8.15493 1.5C4.47951 1.5 1.5 4.47951 1.5 8.15493C1.5 11.8303 4.47951 14.8099 8.15493 14.8099C9.72624 14.8099 11.1704 14.2653 12.3089 13.3546L15.2377 16.2834C15.5265 16.5722 15.9947 16.5722 16.2834 16.2834C16.5722 15.9947 16.5722 15.5265 16.2834 15.2377L13.3546 12.3089C14.2653 11.1704 14.8099 9.72624 14.8099 8.15493C14.8099 4.47951 11.8303 1.5 8.15493 1.5Z",fill:"white"})),Te=m.button`
|
|
191
|
+
min-height: 100%;
|
|
192
|
+
border-radius: 6px;
|
|
193
|
+
background-color: ${({theme:e})=>e.colors.primaryBase};
|
|
194
|
+
display: flex;
|
|
195
|
+
justify-content: center;
|
|
196
|
+
align-items: center;
|
|
197
|
+
gap: 11px;
|
|
198
|
+
cursor: pointer;
|
|
199
|
+
flex: 0.3;
|
|
200
|
+
|
|
201
|
+
${y.mbDown} {
|
|
202
|
+
--margin: 16px;
|
|
203
|
+
min-height: 44px;
|
|
204
|
+
margin: var(--margin);
|
|
205
|
+
width: calc(100% - var(--margin) * 2);
|
|
206
|
+
position: absolute;
|
|
207
|
+
bottom: 0;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
&:hover {
|
|
211
|
+
background-color: ${({theme:e})=>e.colors.primaryHover};
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
&:active {
|
|
215
|
+
background-color: ${({theme:e})=>e.colors.primaryActive};
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
&:focus-visible {
|
|
219
|
+
outline: 1px solid black;
|
|
220
|
+
}
|
|
221
|
+
`,Pe=m(b)`
|
|
222
|
+
font-weight: ${({theme:e})=>e.sizes.fwSemiBold};
|
|
223
|
+
`,Ae=({onClick:e})=>{const{t:t}=c(),i=t("booking.searchBar.searchButton");return o.createElement(Te,{onClick:e,title:i},o.createElement($e,null),o.createElement(Pe,{size:"s3",color:"white"},i))};function Ne({isMobile:e,state:t,dispatch:i,debouncedFetchCitiesByKeyword:s,debouncedFetchSearchResults:l,focusLocationInput:d,focusSearchInput:p,renderLocationResults:u,renderSearchResults:g,locationTrackingAttributes:m,trackingAttributes:C,onSearch:b,initalSearchValue:y}){const v=r(null),x=r(null),{focused:E,searchLocationKeywords:L,geoLocationPermission:S,selectedLocation:k,searchKeywords:O,inputSearchPlaceholder:j}=t,{t:I}=c();ge({wrapperRef:x,disabled:!!j}),w(v,(()=>{e||i({type:Se.ClickOutsideInputLocation})})),w(x,(()=>{e||i({type:Se.ClickOutsideInputSearch})}));const M=n((()=>"granted"===S&&(null==k?void 0:k.id)===h?f.colors.primaryBase:f.colors.gray400),[S,k]),F=a((function(e){i({type:Se.ChangeInputSearch,payload:e}),"function"!=typeof b&&(e.trim().length>Ee[t.locale]||y?l(e.trim(),t):(l.cancel(),i({type:Se.DisplayInitialSearchResults})))}),[i,t]),R=a((function(e){i({type:Se.ChangeInputLocation,payload:e}),e.trim().length>Ee[t.locale]?s(e.trim()):(s.cancel(),i({type:Se.DisplayInitialCities}))}),[s,i]);return o.createElement(je,null,o.createElement(Me,{ref:v},o.createElement(_,{inputClassName:"location"===E?"focused":void 0,placeholder:I("booking.searchBar.locationPlaceholder"),autoComplete:"off",name:"search-location",displayIcon:o.createElement(Y,{className:"location-pin-icon",color:M}),actionIcon:o.createElement(Re,{color:f.colors.gray300,className:""!==L?"shown":""}),onActionClick:function(){i({type:Se.ClearInputLocation}),s.cancel(),d()},value:L,onChange:R,onFocus:()=>i({type:Se.FocusInputLocation}),size:"md",trackingAttributes:m}),!e&&u()),o.createElement(Fe,{ref:x},o.createElement(_,{placeholder:j||I("booking.searchBar.searchInput.placeholder"),autoComplete:"off",name:"search-results",actionIcon:o.createElement(Re,{color:f.colors.gray300,className:""!==O?"shown":""}),onActionClick:function(){i({type:Se.ClearInputSearch}),l.cancel(),l("",t),p()},value:O,onChange:F,onFocus:()=>i({type:Se.FocusInputSearch}),inputClassName:"search"===E?"focused":void 0,size:"md",trackingAttributes:C,onKeyPress:e=>{t.autoCompleteDisabled&&"Enter"===e.key&&b&&b({cityId:t.selectedLocation.id,keyword:O})},enterKeyHint:t.autoCompleteDisabled?"search":void 0}),!e&&g()),t.autoCompleteDisabled&&!t.isMobile&&o.createElement(Ae,{onClick:()=>{b({cityId:t.selectedLocation.id,keyword:O})}}))}const Be=()=>o.createElement("svg",{width:"14",height:"18",viewBox:"0 0 14 18"},o.createElement("path",{d:"M7.00004 0.666992C5.29757 0.666992 3.64067 0.813476 2.52087 1.03158C1.73311 1.18457 1.16671 1.86816 1.16671 2.6722V4.83366C1.16671 5.29264 1.54106 5.66699 2.00004 5.66699H12C12.459 5.66699 12.8334 5.29264 12.8334 4.83366V2.69824C12.8334 1.89421 12.267 1.21061 11.4792 1.05762C10.3562 0.839518 8.69275 0.666992 7.00004 0.666992ZM6.16671 1.50033H7.83337V2.33366H8.66671V4.00033H7.83337V4.83366H6.16671V4.00033H5.33337V2.33366H6.16671V1.50033ZM1.42712 6.50033C1.3197 6.89421 1.24158 7.32389 1.19275 7.77637C1.14718 8.18001 1.05603 9.25423 1.06254 9.36491C0.603556 9.72624 0.333374 10.2861 0.333374 10.9014C0.333374 11.8356 0.977906 12.6364 1.84379 12.8285C2.74548 15.0192 4.55212 17.3337 7.00004 17.3337C9.44796 17.3337 11.2546 14.9964 12.1563 12.8024C13.0222 12.6136 13.6667 11.8356 13.6667 10.9014C13.6667 10.2861 13.3965 9.72624 12.9375 9.36491C12.9441 9.25423 12.8562 8.16048 12.8073 7.75033C12.7552 7.30436 12.6804 6.89095 12.573 6.50033H5.35942C6.52804 8.20606 9.27543 7.18717 11.0365 7.62012C11.5736 8.79199 11.1667 10.4326 11.1667 10.4326L11.8177 10.641C11.9121 10.6702 12 10.7549 12 10.9014C12 11.0576 11.8861 11.1943 11.6875 11.1878L11.0105 11.0837L10.7761 11.7347C9.96554 14.0492 8.4128 15.667 7.00004 15.667C5.58728 15.667 4.03455 14.0492 3.224 11.7347L2.96358 11.0837L2.26046 11.1878C2.11723 11.1878 2.00004 11.0576 2.00004 10.9014C2.00004 10.7549 2.08793 10.6702 2.18233 10.641L2.83337 10.4326C2.73246 10.5531 2.4102 8.7041 2.83337 8.03678C3.59184 7.5127 4.2266 7.87728 5.12504 6.50033H1.42712ZM5.17712 9.05241C4.57166 9.05241 4.08337 9.55371 4.08337 10.1722C4.08337 10.7907 4.57166 11.292 5.17712 11.292C5.78259 11.292 6.27087 10.7907 6.27087 10.1722C6.27087 9.55371 5.78259 9.05241 5.17712 9.05241ZM8.82296 9.05241C8.21749 9.05241 7.72921 9.55371 7.72921 10.1722C7.72921 10.7907 8.21749 11.292 8.82296 11.292C9.42843 11.292 9.91671 10.7907 9.91671 10.1722C9.91671 9.55371 9.42843 9.05241 8.82296 9.05241Z",fill:"#9AA2AC"})),Ve=()=>o.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18"},o.createElement("path",{d:"M8.99996 0.666992C6.27535 0.666992 3.85348 1.97884 2.33329 4.00033H4.59892C5.80009 2.94564 7.36259 2.33366 8.99996 2.33366C10.6373 2.33366 12.1998 2.94564 13.401 4.00033H15.6666C14.1464 1.97884 11.7246 0.666992 8.99996 0.666992ZM1.78642 4.83366C1.07678 7.04069 0.666626 9.59928 0.666626 12.3337C0.666626 14.085 0.826131 15.7679 1.13538 17.3337H16.8645C17.1738 15.7679 17.3333 14.085 17.3333 12.3337C17.3333 9.59928 16.9231 7.04069 16.2135 4.83366H1.78642ZM8.99996 7.33366C11.3014 7.33366 13.1666 9.19889 13.1666 11.5003C13.1666 13.8018 11.3014 15.667 8.99996 15.667C6.69853 15.667 4.83329 13.8018 4.83329 11.5003C4.83329 9.19889 6.69853 7.33366 8.99996 7.33366ZM8.16663 9.00033V10.667H6.49996V12.3337H8.16663V14.0003H9.83329V12.3337H11.5V10.667H9.83329V9.00033H8.16663Z",fill:"#9AA2AC"})),De=()=>o.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17"},o.createElement("path",{d:"M8 0.666992L0.5 5.63533V14.8337C0.5 15.7545 1.24583 16.5003 2.16667 16.5003H13.8333C14.7542 16.5003 15.5 15.7545 15.5 14.8337V5.63533L8 0.666992ZM11.3333 10.667H8.83333V13.167H7.16667V10.667H4.66667V9.00033H7.16667V6.50033H8.83333V9.00033H11.3333V10.667Z",fill:"#9AA2AC"})),ze=()=>o.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16"},o.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"})),He=m.header`
|
|
224
|
+
display: flex;
|
|
225
|
+
justify-content: space-between;
|
|
226
|
+
padding: 12px 24px;
|
|
227
|
+
background-color: ${f.colors.neutral50};
|
|
228
|
+
box-shadow: inset 0px 1px 0px #e4e8ec;
|
|
229
|
+
`,Ke=m.div`
|
|
230
|
+
display: grid;
|
|
231
|
+
flex: 2;
|
|
232
|
+
align-items: center;
|
|
233
|
+
gap: 16px;
|
|
234
|
+
grid-template-columns: 16px 1fr;
|
|
235
|
+
`,_e=m.p`
|
|
236
|
+
color: ${f.colors.neutral800};
|
|
237
|
+
font-size: 14px;
|
|
238
|
+
font-weight: ${f.sizes.fwSemiBold};
|
|
239
|
+
letter-spacing: -0.2px;
|
|
240
|
+
line-height: 22px;
|
|
241
|
+
`,Ge=m.button`
|
|
242
|
+
flex: 1;
|
|
243
|
+
cursor: pointer;
|
|
244
|
+
text-align: end;
|
|
245
|
+
`,Ze=m.section`
|
|
246
|
+
padding: 12px 16px;
|
|
247
|
+
--rowGap: 16px;
|
|
248
|
+
--graphicSize: 32px;
|
|
249
|
+
|
|
250
|
+
${y.tdUp} {
|
|
251
|
+
--rowGap: 8px;
|
|
252
|
+
}
|
|
253
|
+
`,Ye=m.ul`
|
|
254
|
+
--gap: 16px;
|
|
255
|
+
${y.tdUp} {
|
|
256
|
+
--gap: 8px;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
display: grid;
|
|
260
|
+
overflow: hidden;
|
|
261
|
+
gap: var(--gap);
|
|
262
|
+
transition: max-height 0.8s ease-out;
|
|
263
|
+
|
|
264
|
+
${({isMore:e})=>e&&"\n height: auto;\n max-height: 0;\n margin-top: var(--gap);\n "}
|
|
265
|
+
|
|
266
|
+
${({isShown:e})=>e&&"\n max-height: 600px;\n "}
|
|
267
|
+
|
|
268
|
+
@media (prefers-reduced-motion) {
|
|
269
|
+
transition: none;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
${y.tdUp} {
|
|
273
|
+
grid-template-columns: 1fr 1fr;
|
|
274
|
+
} ;
|
|
275
|
+
`,Ue=m(b)`
|
|
276
|
+
margin-top: 12px;
|
|
277
|
+
margin-bottom: 8px;
|
|
278
|
+
cursor: pointer;
|
|
279
|
+
text-align: start;
|
|
280
|
+
text-transform: capitalize;
|
|
281
|
+
`,We=m.li`
|
|
282
|
+
display: flex;
|
|
283
|
+
align-items: center;
|
|
284
|
+
gap: var(--rowGap);
|
|
285
|
+
cursor: pointer;
|
|
286
|
+
&.not-nav {
|
|
287
|
+
cursor: default;
|
|
288
|
+
}
|
|
289
|
+
`,Qe=m.div`
|
|
290
|
+
--wrapper-size: var(--graphicSize);
|
|
291
|
+
border-radius: calc(var(--wrapper-size) / 2);
|
|
292
|
+
background-color: var(--neutral50);
|
|
293
|
+
width: var(--wrapper-size);
|
|
294
|
+
height: var(--wrapper-size);
|
|
295
|
+
aspect-ratio: 1/1;
|
|
296
|
+
overflow: hidden;
|
|
297
|
+
|
|
298
|
+
${({type:e})=>e&&"doctors"===e&&"\n border-radius: calc(var(--graphicSize) / 2);\n "}
|
|
299
|
+
|
|
300
|
+
img {
|
|
301
|
+
width: var(--graphicSize);
|
|
302
|
+
height: var(--graphicSize);
|
|
303
|
+
${({type:e})=>e&&"doctors"===e?"\n\n object-fit: cover; \n ":"\n object-fit: contain;\n "}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
&:focus-visible {
|
|
307
|
+
outline: 1px solid ${f.colors.gray600};
|
|
308
|
+
}
|
|
309
|
+
`,qe=m(b)`
|
|
310
|
+
line-height: 22px;
|
|
311
|
+
letter-spacing: -0.2px;
|
|
312
|
+
|
|
313
|
+
${y.tdUp} {
|
|
314
|
+
&[data-size='p3'] {
|
|
315
|
+
font-size: 14px;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
`,Je=m.figure`
|
|
319
|
+
max-width: var(--graphicSize);
|
|
320
|
+
min-width: var(--graphicSize);
|
|
321
|
+
`,Xe=m.svg`
|
|
322
|
+
margin: 0 auto;
|
|
323
|
+
display: block;
|
|
324
|
+
`,et=m.div`
|
|
325
|
+
display: grid;
|
|
326
|
+
place-items: center;
|
|
327
|
+
`,tt={doctors:({width:e,height:t})=>o.createElement("svg",{width:e||32,height:t||32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.createElement("g",{clipPath:"url(#clip0_14712_400114)"},o.createElement("rect",{width:"32",height:"32",rx:"16",fill:"#E4E8EC"}),o.createElement("path",{d:"M22.065 9.58305C22.1108 9.80952 22.1431 10.0396 22.1614 10.2722C22.3769 13.0522 22.5858 16.1276 22.5727 17.618C22.5306 20.5688 19.708 21.1325 19.4564 21.1769L19.4495 21.5357L19.5228 23.9014C20.8688 23.9341 22.203 24.1759 23.4772 24.6196C24.5264 24.9739 25.4827 25.5591 26.2757 26.332C27.0688 27.105 27.6783 28.0461 28.0594 29.0858L31.9886 39.2068C31.91 39.3048 30.6939 39.6356 29.4888 39.944C30.1695 42.3315 30.4582 44.8142 30.3432 47.2953C30.2991 48.2666 30.1816 49.264 29.7245 50.1211C29.4508 50.6342 29.0319 51.0912 28.5296 51.3753C28.5099 51.4347 28.4864 51.4928 28.4593 51.5495C28.4293 51.6146 28.3908 51.6756 28.3448 51.7307C28.3293 51.7772 28.3232 51.8406 28.3162 51.9135C28.3004 52.0779 28.2799 52.2909 28.1362 52.4685C28.001 52.6373 27.8519 52.7945 27.6905 52.9386C27.6905 52.9386 27.092 52.9667 26.4133 52.9845L26.458 58.4088H5.7492L6.30965 52.9523L5.66093 53.1637C5.07664 53.3528 4.45628 53.4028 3.84925 53.3099C3.24222 53.2169 2.66526 52.9835 2.1643 52.6283C1.61489 52.2388 1.17445 51.715 0.884966 51.1068C0.595484 50.4987 0.46662 49.8266 0.510669 49.1545L0.644528 47.1369L1.41503 38.3366L1.81323 38.4135L-0.914307 37.8437L-0.402886 36.5663C-0.407359 36.5645 -0.411803 36.5627 -0.416214 36.5608C-0.410804 36.56 -0.40538 36.5594 -0.399946 36.5589L2.05995 30.4146C3.00034 28.0825 4.7421 26.1624 6.97187 24.9999C8.56171 24.176 10.3028 23.6861 12.0882 23.5597L11.788 16.5865C11.1882 16.6507 10.0095 16.5266 9.96087 14.954C9.91229 13.3824 11.0457 13.3171 11.6507 13.3961L11.6445 13.2523C11.5785 12.8433 11.5088 12.439 11.4577 12.2132C11.3782 11.8628 11.2611 11.4953 11.1419 11.1207C10.8794 10.2967 10.6061 9.43855 10.697 8.65293C10.697 8.65293 10.6909 8.00438 11.4565 7.24044C11.3707 6.86644 11.3686 6.47786 11.4507 6.10258C11.5366 5.70965 11.7125 5.34199 11.9645 5.02848C12.2165 4.71497 12.5377 4.46414 12.9029 4.29569C13.2682 4.12725 13.6675 4.04577 14.0696 4.05766C14.2277 4.06393 14.3849 4.08493 14.5418 4.10589C14.7932 4.13945 15.0439 4.17294 15.2971 4.14581C15.7708 4.09409 16.177 3.83884 16.5862 3.58167C16.8357 3.42492 17.0863 3.26745 17.354 3.15494C17.9119 2.93744 18.5266 2.91281 19.1002 3.08497C19.6738 3.25713 20.1733 3.61619 20.5192 4.105C20.5943 4.21716 20.6621 4.33678 20.7298 4.45631C20.9035 4.76299 21.077 5.06915 21.373 5.24769C21.5927 5.38236 21.8482 5.42658 22.1057 5.47114C22.2633 5.49842 22.4216 5.52582 22.5728 5.57417C23.0267 5.71015 23.3999 6.0411 23.6319 6.45436C23.6327 6.40753 23.6317 6.36062 23.629 6.31374C23.6502 6.3657 23.6623 6.42092 23.6649 6.47698C23.6661 6.49165 23.667 6.50632 23.6677 6.521C23.8246 6.82609 23.9058 7.17114 23.8885 7.51347C23.8544 7.93447 23.7053 8.33801 23.4574 8.68001C23.2096 9.02201 22.8725 9.28933 22.483 9.45278C22.3469 9.50712 22.2071 9.55061 22.065 9.58305Z",fill:"white"})),o.createElement("defs",null,o.createElement("clipPath",{id:"clip0_14712_400114"},o.createElement("rect",{width:"32",height:"32",rx:"16",fill:"white"})))),services:({width:e,height:t})=>o.createElement("svg",{width:e||30,height:t||30,viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.createElement("circle",{cx:"15",cy:"15",r:"15",fill:"#F7F9FC"}),o.createElement("path",{d:"M14.9998 6.66663C12.2752 6.66663 9.85335 7.97848 8.33317 9.99996H10.5988C11.8 8.94527 13.3625 8.33329 14.9998 8.33329C16.6372 8.33329 18.1997 8.94527 19.4009 9.99996H21.6665C20.1463 7.97848 17.7244 6.66663 14.9998 6.66663ZM7.7863 10.8333C7.07666 13.0403 6.6665 15.5989 6.6665 18.3333C6.6665 20.0846 6.82601 21.7675 7.13525 23.3333H22.8644C23.1737 21.7675 23.3332 20.0846 23.3332 18.3333C23.3332 15.5989 22.923 13.0403 22.2134 10.8333H7.7863ZM14.9998 13.3333C17.3013 13.3333 19.1665 15.1985 19.1665 17.5C19.1665 19.8014 17.3013 21.6666 14.9998 21.6666C12.6984 21.6666 10.8332 19.8014 10.8332 17.5C10.8332 15.1985 12.6984 13.3333 14.9998 13.3333ZM14.1665 15V16.6666H12.4998V18.3333H14.1665V20H15.8332V18.3333H17.4998V16.6666H15.8332V15H14.1665Z",fill:"#BFC5CC"}))},ot=({type:e,item:t,imageUrl:i,className:a,onClickItem:s})=>{const r=n((()=>{const t=tt[e]||W;return o.createElement(t,{width:32,height:"services"===e?32:24})}),[e]);return o.createElement(We,{onClick:()=>s&&s(t),onKeyDown:e=>{"Enter"!==e.key&&"Space"!==e.key||s&&s(t)},tabIndex:0,role:"button",className:a},o.createElement(Je,null,"hospitals"===e?o.createElement(Xe,{width:"12",height:"16",viewBox:"0 0 12 16"},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.75 5.94873C0.75 3.04623 3.0975 0.69873 6 0.69873C8.9025 0.69873 11.25 3.04623 11.25 5.94873C11.25 9.07623 7.935 13.3887 6.5775 15.0312C6.2775 15.3912 5.73 15.3912 5.43 15.0312C4.065 13.3887 0.75 9.07623 0.75 5.94873ZM4.125 5.94873C4.125 6.98373 4.965 7.82373 6 7.82373C7.035 7.82373 7.875 6.98373 7.875 5.94873C7.875 4.91373 7.035 4.07373 6 4.07373C4.965 4.07373 4.125 4.91373 4.125 5.94873Z",fill:"#9AA2AC"})):o.createElement(Qe,{type:e},i?o.createElement("img",{src:i,width:32,height:"services"===e?32:24,loading:"lazy"}):r)),o.createElement(qe,{color:f.colors.gray800,size:"p3"},t.name))},it=({type:e,data:t,state:a,dispatch:s,itemsToShow:r,itemsToShowDesktop:l,isMobile:d,isLoading:p,keyword:h,isNavResultItem:g})=>{const[m,C]=i(!1),{t:y,locale:x}=c(),{selectedLocation:w,searchKeywords:E}=a,L=n((()=>u[x]),[x]),S="ms-MY"===x,k=n((()=>({doctors:{name:y("booking.searchPopup.doctors"),icon:o.createElement(Be,null),slug:L.DOCTOR},services:{name:y("booking.searchPopup.services"),icon:o.createElement(Ve,null),slug:L.SERVICE},hospitals:{name:y("booking.searchPopup.hospitals"),icon:o.createElement(De,null),slug:L.HOSPITAL},specialties:{name:y("booking.searchPopup.specialties"),icon:o.createElement(ze,null),slug:L.SPECIALTIES}})),[e,L]),O=n((()=>k[e].slug),[k]),j=d?r:l;function I(t){let o="";switch(e){case"specialties":o=`/${w.slug}/${k.doctors.slug}/${t.slug}`;break;case"services":o=`/${w.slug}/${O}/${t.slug}`;break;case"doctors":case"hospitals":o=`/${O}/${t.slug}-${t.id}`}o&&s({type:Se.SelectSearchResult,payload:{name:t.name,url:o}})}function M(t){return o.createElement(ot,{key:t.id,item:t,type:e,imageUrl:t.logo||t.avatar||t.thumbnail,className:g?"":"not-nav",onClickItem:g&&I})}return o.createElement("section",null,o.createElement(He,null,o.createElement(Ke,null,k[e].icon,o.createElement(_e,null,k[e].name)),(h.trim().length<=Ee[x]||S)&&o.createElement(Ge,{onClick:function(){let t="";switch(e){case"specialties":t=`/${O}`;break;case"services":case"doctors":case"hospitals":t=`/${w.slug}/${O}`}t&&s({type:Se.NavigateTo,payload:t})}},o.createElement(b,{size:"p3",color:f.colors.primaryBase},y("booking.searchPopup.seeAll")))),(p||t&&t.length>0)&&o.createElement(Ze,null,o.createElement(Ye,null,p&&Array(2).fill(void 0).map(((t,i)=>o.createElement(We,{key:e+"loading"+i},o.createElement(Je,null,o.createElement(et,null,o.createElement(v,{height:14,width:"hospitals"===e?12:32,style:{maxWidth:"var(--graphicSize)",minHeight:"var(--graphicSize)"}}))),o.createElement(v,{width:120,height:24})))),!p&&t&&t.length>0&&t.slice(0,j).map(M)),o.createElement(Ye,{isShown:m,isMore:!0},t.slice(j,-1).map(M)),"specialties"===e&&j<t.length&&!p&&o.createElement("button",{onClick:()=>C(!m)},o.createElement(Ue,{size:"p3",color:f.colors.primaryBase},y(m?"booking.searchPopup.seeLessSpecialties":"booking.searchPopup.seeMoreSpecialties"))),"specialties"!==e&&(j<t.length||S)&&!p&&h.trim().length>Ee[x]&&o.createElement("button",{onClick:function(){const{slug:t}=k[e],o=`/${w.slug}/${t}?q=${E}`;s({type:Se.NavigateTo,payload:o})}},o.createElement(Ue,{size:"p3",color:f.colors.primaryBase},y(`booking.searchPopup.searchIn.${e}`,{name:h})))),!p&&0===(null==t?void 0:t.length)&&o.createElement(Ze,null,o.createElement(b,{size:"sm",color:f.colors.gray400},y("booking.searchBar.noResults"))))},at=m.section`
|
|
328
|
+
background-color: white;
|
|
329
|
+
border-radius: 4px;
|
|
330
|
+
position: absolute;
|
|
331
|
+
width: 100%;
|
|
332
|
+
z-index: 30;
|
|
333
|
+
|
|
334
|
+
${y.tdUp} {
|
|
335
|
+
box-shadow: 0px 24px 32px rgba(0, 0, 0, 0.04),
|
|
336
|
+
0px 16px 24px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04),
|
|
337
|
+
0px 0px 1px rgba(0, 0, 0, 0.04);
|
|
338
|
+
}
|
|
339
|
+
`,nt=({data:e,state:t,dispatch:i,isMobile:a,isLoading:n,keyword:s,hideResults:r,isNavResultItem:l})=>o.createElement(at,null,e&&e.map((e=>r&&r.includes(e.type)?o.createElement(o.Fragment,null):o.createElement(it,{type:e.type,state:t,dispatch:i,itemsToShow:2,itemsToShowDesktop:4,key:e.type,data:e.results,isMobile:a,isLoading:n,keyword:s,isNavResultItem:l})))),st=(e,t,o)=>N(e,Object.assign(Object.assign({},t),{domain:F[o||"en-PH"]}));const rt=({isMobile:t,careApiDomain:g,geoLocationPermission:m,geoLocationCoordinates:C,initialSelectedCity:b,initialSearchValue:f="",careFrontDomain:y="/care",isDebug:v=!1,askForGeolocationPermission:x=!1,gaTrackingSearchBar:w,gaTrackingLocationSearch:L,autoCompleteDisabled:S=!1,inputSearchPlaceholder:k="",isOptionAllLocation:O=!1,hideResults:j=[],isNavResultItem:I=!0,routerPush:M,onGeoLocationPermissionChange:F,onSearch:R,onChangeLocation:$})=>{const{t:T,locale:P}=c(),A=r(null),N=r(null),[B,_]=i(void 0),[Z,Y]=i(!1),{geoLocationPermission:U,geoLocationCoordinates:W,requestGeoLocation:Q}=V(),[q,J]=l(Oe,Le,(e=>Object.assign(Object.assign({},e),{isDebug:v,isMobile:t,geoLocationPermission:m||U||"unset",geoLocationCoordinates:C||W||null,searchKeywords:f,initialSelectedCity:b||null,selectedLocation:b||e.selectedLocation||null,searchLocationKeywords:(null==b?void 0:b.name)||e.searchLocationKeywords,autoCompleteDisabled:S,inputSearchPlaceholder:k,locale:P}))),{navigateTo:X,focused:ee,isLoadingCities:te,cities:ie,searchKeywords:ae,geoLocationPermission:ne,selectedLocation:se,initialSelectedCity:re,defaultCity:le,searchResults:ce,isLoadingSearchResults:de,isMobileModalOpened:pe,inputSearchPlaceholder:ue}=q,{fetchCitiesByLocation:he,fetchCitiesByKeyword:ge,fetchSearchResults:me}=function({dispatch:e,careApiDomain:t,locale:o="vi-VN"}){const i=a((function(i,a={}){const n=`${t}${i}`;return e({type:Se.FetchCitiesStart}),fetch(st(n,a,o),{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:Se.FetchCitiesFinish})))}),[o]);return{fetchCitiesByLocation:a((function({coordinates:t}){let a={};const n={};t&&(a={lat:t.lat,lng:t.lng}),"ms-MY"===o&&(n.noPaging=1);const s=[i(E.GET_CITY_BY_IP,Object.assign(Object.assign({},a),n))];return"zh-TW"===o&&s.push(i(E.GET_CITIES_LIST,{noPaging:1})),Promise.all(s).then((([t,o])=>{const i=Object.assign({},t);if(o){const e=i.cities.map((e=>e.id));i.cities=i.cities.concat(o.cities.filter((t=>!e.includes(t.id))))}e({type:Se.FetchCitiesByGeoIpComplete,payload:i})})).catch((e=>console.error("error loading cities by location",e)))}),[o,t,e]),fetchCitiesByKeyword:a((function(t){return i(E.GET_CITIES_LIST,{keyword:t}).then((t=>{e({type:Se.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[o,t,e]),fetchSearchResults:a((function(i,a){const n=`${t}${E.GET_SEARCH_V2}`;e({type:Se.FetchSearchResultsStart});const{defaultCity:s,selectedLocation:r,geoLocationCoordinates:l}=a;let c="";if(!r||!s)return void e({type:Se.FetchSearchResultsFinish});r.id===h?l||(c=s.id):c=r.id===p?"":r.id;const d=(null==l?void 0:l.lat)||"",u=(null==l?void 0:l.lng)||"";return fetch(st(n,{domain:t,searchType:"global",keyword:i.trim().length>Ee[o]?i.trim():"",city:c===h?"":c,lat:d,lng:u},o),{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:Se.FetchSearchResultsComplete,payload:t}))).catch((e=>{console.log("error loading search results",{url:n,error:e})})).finally((()=>e({type:Se.FetchSearchResultsFinish})))}),[o,t,e])}}({dispatch:J,locale:P,careApiDomain:g}),be=n((()=>{var e;return{id:h,name:T("booking.searchBar.currentLocation"),slug:null===(e=u[P])||void 0===e?void 0:e.CURRENT}}),[T,P]),fe=n((()=>d(ge,400)),[ge]),ye=n((()=>d(me,400)),[me]);s((()=>{""!==f&&f!==q.searchKeywords&&J({type:Se.UpdateInitialSearchValue,payload:f})}),[f]),s((()=>{x&&(null==se?void 0:se.id)===h&&"unset"===ne&&Q()}),[x,se,ne]),s((()=>{m||ne===U||("granted"===U&&W?J({type:Se.GrantGeoLocationPermission,payload:W}):"denied"===U&&J({type:Se.DenyGeoLocationPermission}))}),[ne,U,W,m]),s((()=>{X&&(M?M(X):window.location.href=`${y}${X}`)}),[X]);const ve=a((function(){J({type:Se.SelectCurrentLocation,payload:be})}),[T,J]);s((()=>{var e;"denied"===ne||re||J({type:Se.SelectLocation,payload:{name:T("booking.searchBar.allLocations"),id:p,slug:null===(e=u[P])||void 0===e?void 0:e.ALL}}),F&&F(ne,q.geoLocationCoordinates),t&&"granted"===ne&&se&&J({type:Se.FocusInputSearch}),he({coordinates:q.geoLocationCoordinates})}),[ne]),s((()=>{se&&le&&me(q.searchKeywords,q)}),[se,le]),s((()=>{k!==ue&&J({type:Se.SetInputSearchPlaceholder,payload:k})}),[k,ue]),s((()=>{pe?document.body.classList.add("care-popup-open"):document.body.classList.remove("care-popup-open")}),[pe]);const xe=a((function(e){"ms-MY"===P&&Y(!0),J({type:Se.SelectLocation,payload:e}),"ms-MY"!==P&&Ie(),$&&$(e)}),[T,J]);function ke(){"ms-MY"===P&&Y(!0),t&&"granted"!==q.geoLocationPermission?Q():(ve(),"ms-MY"!==P&&Ie())}function je(){var e;A.current&&(null===(e=A.current.querySelector('input[name="search-location"]'))||void 0===e||e.focus())}function Ie(){var e;A.current&&(null===(e=A.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}function Me(){J({type:Se.CloseMobileModal})}function Fe(){return"location"!==ee?null:o.createElement(oe,{isLoading:te,cities:ie,onLocationClick:xe,onCurrentLocationClick:ke,isLocationLoading:te,geoLocationPermission:ne,selectedLocation:se,isOptionAllLocation:O})}function Re(){return"search"!==ee?null:q.autoCompleteDisabled?t?o.createElement(Ae,{onClick:()=>{R({cityId:q.selectedLocation.id,keyword:ae}),Me()}}):null:o.createElement(nt,{data:ce,state:q,dispatch:J,isMobile:!1,keyword:ae,isLoading:de,hideResults:j,isNavResultItem:I})}function $e(){return o.createElement(Ne,{isMobile:t,state:q,dispatch:J,debouncedFetchCitiesByKeyword:fe,debouncedFetchSearchResults:ye,focusLocationInput:je,focusSearchInput:Ie,renderLocationResults:Fe,renderSearchResults:Re,trackingAttributes:w,locationTrackingAttributes:L,onSearch:R,initalSearchValue:f})}return s((()=>{if(window.visualViewport){const e=e=>{const t=e.target;_(null==t?void 0:t.height)};return window.visualViewport.addEventListener("resize",e,{passive:!0}),()=>{window.visualViewport.removeEventListener("resize",e)}}}),[_]),s((()=>{if(se&&Z&&"ms-MY"===P){const e=`/${se.slug}/hospital`;J({type:Se.NavigateTo,payload:e}),Y(!1)}}),[Z,P,se]),t?o.createElement(o.Fragment,null,o.createElement(G,null),o.createElement(K,{ref:N}),o.createElement(z,{id:"booking-search-bar",ref:A,"data-is-modal":t&&pe,style:{"--mobile-care-searchbar-height":pe&&B?`${B}px`:"100%"}},pe?o.createElement(o.Fragment,null,o.createElement(H,null,o.createElement(we,{headingText:T("booking.searchBar.searchButton"),onLeftClick:Me}),$e()),Fe(),Re()):o.createElement(Ce,{onClick:function(){var t;return e(this,void 0,void 0,(function*(){N.current&&N.current.focus(),J({type:Se.OpenMobileModal}),yield Promise.resolve(),A.current&&(null===(t=A.current.querySelector('input[name="search-location"]'))||void 0===t||t.focus())}))},focused:ee,value:ae,trackingAttributes:w,inputSearchPlaceholder:k}))):o.createElement(D,{id:"booking-search-bar",ref:A},$e())},lt=m.div``,ct=m.div`
|
|
340
|
+
background-color: ${f.colors.neutral50};
|
|
341
|
+
${y.mbDown} {
|
|
342
|
+
padding: 0 16px;
|
|
343
|
+
}
|
|
344
|
+
`,dt=m(P)`
|
|
345
|
+
padding: 30px 56px;
|
|
346
|
+
border-radius: 0px 0px 4px 4px;
|
|
347
|
+
background-color: ${f.colors.white};
|
|
348
|
+
box-shadow: 0px 0px 1px 0px rgba(0, 0, 0, 0.04),
|
|
349
|
+
0px 0px 2px 0px rgba(0, 0, 0, 0.06), 0px 4px 8px 0px rgba(0, 0, 0, 0.04);
|
|
350
|
+
|
|
351
|
+
${y.mbDown} {
|
|
352
|
+
padding: 16px 16px;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.flex-search-input {
|
|
356
|
+
flex-direction: row;
|
|
357
|
+
${y.mbDown} {
|
|
358
|
+
flex-direction: column;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
`,pt={"en-PH":3,"tl-PH":2,"id-ID":3,"vi-VN":2,"zh-TW":0,"ms-MY":2},ut={isMobile:!1,isDebug:!1,navigateTo:null,geoLocationPermission:"unset",geoLocationCoordinates:null,focused:"none",searchLocationKeywords:"",searchSpecialtyKeywords:"",searchKeywords:"",selectedLocation:null,selectedSpecialty:null,defaultCity:null,initialCities:[],cities:[],searchResults:{},initialSearchResults:{},isLoadingCities:!1,isLoadingSearchResults:!1,isMobileModalOpened:!1,initialSelectedCity:null,autoCompleteDisabled:!1,inputSearchPlaceholder:"",locale:"vi-VN",allSpecialties:[]};var ht;function gt(e){const{selectedLocation:t,searchLocationKeywords:o}=e;return t&&o!==t.name?Object.assign(Object.assign({},e),{searchLocationKeywords:t.name}):e}function mt(e,t){var o,i;switch(e.isDebug&&console.log("bookingSearchBar",{action:t,state:e}),t.type){case ht.NavigateTo:return Object.assign(Object.assign({},e),{navigateTo:t.payload,focused:"none",isMobileModalOpened:!1});case ht.ClickOutsideInputLocation:return"location"!==e.focused?e:gt(Object.assign(Object.assign({},e),{focused:"none"}));case ht.ClickOutsideInputSpecialty:return"specialty"!==e.focused?e:gt(Object.assign(Object.assign({},e),{focused:"none"}));case ht.ClickOutsideInputSearch:return"search"!==e.focused?e:Object.assign(Object.assign({},e),{focused:"none"});case ht.FocusInputLocation:{const t=Object.assign(Object.assign({},e),{focused:"location"});return(null===(o=e.selectedLocation)||void 0===o?void 0:o.id)===h&&(t.searchLocationKeywords=""),t}case ht.FocusInputSpecialty:{const t=Object.assign(Object.assign({},e),{focused:"specialty"});return(null===(i=e.selectedLocation)||void 0===i?void 0:i.id)===h&&(t.searchLocationKeywords=""),t}case ht.FocusInputSearch:const a=Object.assign(Object.assign({},e),{focused:"search"});return e.isMobile?gt(a):a;case ht.ChangeInputLocation:return Object.assign(Object.assign({},e),{searchLocationKeywords:t.payload});case ht.ChangeInputSearch:{const o=t.payload;return Object.assign(Object.assign({},e),{searchKeywords:o,isLoadingSearchResults:o.trim().length>pt[e.locale]})}case ht.SelectCurrentLocation:return Object.assign(Object.assign({},e),{focused:"none",selectedLocation:t.payload,searchLocationKeywords:t.payload.name});case ht.ClearInputLocation:return Object.assign(Object.assign({},e),{focused:"location",cities:e.initialCities,searchLocationKeywords:""});case ht.ClearInputSearch:return Object.assign(Object.assign({},e),{focused:"search",searchKeywords:""});case ht.SelectLocation:return Object.assign(Object.assign({},e),{focused:"none",selectedLocation:t.payload,searchLocationKeywords:t.payload.name});case ht.SelectSpecialty:return Object.assign(Object.assign({},e),{focused:"none",selectedSpecialty:t.payload});case ht.SelectSearchResult:return Object.assign(Object.assign({},e),{searchKeywords:t.payload.name,isMobileModalOpened:!1,focused:"none",navigateTo:t.payload.url});case ht.FetchCitiesStart:return Object.assign(Object.assign({},e),{isLoadingCities:!0});case ht.FetchCitiesFinish:return Object.assign(Object.assign({},e),{isLoadingCities:!1});case ht.FetchSearchResultsStart:return Object.assign(Object.assign({},e),{isLoadingSearchResults:!0});case ht.FetchSearchResultsFinish:return Object.assign(Object.assign({},e),{isLoadingSearchResults:!1});case ht.FetchSearchResultsComplete:{const o=Object.assign(Object.assign({},e),{searchResults:t.payload});return Object.keys(e.initialSearchResults).length||(o.initialSearchResults=t.payload),o}case ht.FetchCitiesByGeoIpComplete:{let{cities:o}=t.payload;const{default:i}=t.payload;o=o.filter((e=>e.id!==i.id)),o.unshift(i),e.initialSelectedCity&&!o.find((t=>t.id===e.initialSelectedCity.id))&&o.unshift(e.initialSelectedCity);const a=Object.assign(Object.assign({},e),{defaultCity:i,initialCities:o,cities:o});return"denied"!==e.geoLocationPermission||e.initialSelectedCity||(a.selectedLocation=i,a.searchLocationKeywords=i.name),a}case ht.FetchCitiesByKeywordComplete:return Object.assign(Object.assign({},e),{cities:t.payload});case ht.DisplayInitialCities:return Object.assign(Object.assign({},e),{cities:e.initialCities});case ht.DisplayInitialSearchResults:return Object.assign(Object.assign({},e),{searchResults:e.initialSearchResults,isLoadingSearchResults:!1});case ht.GrantGeoLocationPermission:return Object.assign(Object.assign({},e),{geoLocationPermission:"granted",geoLocationCoordinates:t.payload});case ht.DenyGeoLocationPermission:return Object.assign(Object.assign({},e),{geoLocationPermission:"denied",geoLocationCoordinates:null});case ht.OpenMobileModal:return Object.assign(Object.assign({},e),{isMobileModalOpened:!0});case ht.CloseMobileModal:return Object.assign(Object.assign({},e),{isMobileModalOpened:!1});case ht.UpdateInitialSearchValue:return Object.assign(Object.assign({},e),{searchKeywords:t.payload});case ht.SetInputSearchPlaceholder:return Object.assign(Object.assign({},e),{inputSearchPlaceholder:t.payload});case ht.FetchAllSpecialties:return Object.assign(Object.assign({},e),{allSpecialties:t.payload});default:return e}}!function(e){e.NavigateTo="navigate to url",e.ClickOutsideInputLocation="click outside input location",e.ClickOutsideInputSearch="click outside input search",e.ClickOutsideInputSpecialty="click outside input specialty",e.SelectCurrentLocation="select current location",e.FocusInputLocation="focus input location",e.FocusInputSearch="focus input search",e.ChangeInputLocation="change input location",e.ChangeInputSearch="change input search",e.ClearInputLocation="clear input location",e.ClearInputSearch="clear input search",e.SelectLocation="select location",e.SelectSpecialty="select specialty",e.FetchCitiesStart="fetch cities start",e.FetchCitiesFinish="fetch cities finish",e.FetchSearchResultsStart="fetch search results start",e.FetchSearchResultsComplete="fetch search results complete",e.FetchSearchResultsFinish="fetch search results finish",e.FetchCitiesByGeoIpComplete="fetch cities by geo IP finish",e.FetchCitiesByKeywordComplete="fetch cities by keyword finish",e.DisplayInitialCities="display initial cities",e.DisplayInitialSearchResults="display initial search results",e.GrantGeoLocationPermission="grant geolocation permission",e.DenyGeoLocationPermission="deny geolocation permission",e.OpenMobileModal="open mobile modal",e.CloseMobileModal="close mobile modal",e.UpdateInitialSearchValue="update initial search value",e.SelectSearchResult="select search result",e.SetInputSearchPlaceholder="set input search placeholder",e.FocusInputSpecialty="focus input specialty",e.FetchAllSpecialties="fetch all specialty"}(ht||(ht={}));const Ct=m.div`
|
|
362
|
+
flex: 1;
|
|
363
|
+
position: relative;
|
|
364
|
+
|
|
365
|
+
${y.mbDown} {
|
|
366
|
+
width: 100%;
|
|
367
|
+
display: flex;
|
|
368
|
+
flex-direction: column;
|
|
369
|
+
gap: 12px;
|
|
370
|
+
}
|
|
371
|
+
`,bt=m.div`
|
|
372
|
+
position: absolute;
|
|
373
|
+
top: calc(100% + 2px);
|
|
374
|
+
width: 100%;
|
|
375
|
+
border-radius: 4px;
|
|
376
|
+
background: ${f.colors.white};
|
|
377
|
+
box-shadow: 0px 8px 40px 0px rgba(0, 0, 0, 0.1);
|
|
378
|
+
z-index: 10;
|
|
379
|
+
|
|
380
|
+
${y.mbDown} {
|
|
381
|
+
width: calc(100% + 64px);
|
|
382
|
+
left: -32px;
|
|
383
|
+
}
|
|
384
|
+
`,ft=m.div``,yt=m.div`
|
|
385
|
+
display: flex;
|
|
386
|
+
justify-content: space-between;
|
|
387
|
+
align-item: center;
|
|
388
|
+
padding: 9px 14px 9px 22px;
|
|
389
|
+
background: #f7f9fc;
|
|
390
|
+
|
|
391
|
+
.title {
|
|
392
|
+
color: ${f.colors.gray800};
|
|
393
|
+
font-size: 14px;
|
|
394
|
+
font-weight: 600;
|
|
395
|
+
line-height: 22px;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.btn-see-all {
|
|
399
|
+
color: ${f.colors.blue600};
|
|
400
|
+
font-size: 14px;
|
|
401
|
+
line-height: 22px;
|
|
402
|
+
cursor: pointer;
|
|
403
|
+
}
|
|
404
|
+
`,vt=m.div`
|
|
405
|
+
padding: 10px 16px;
|
|
406
|
+
max-height: 400px;
|
|
407
|
+
overflow: auto;
|
|
408
|
+
`,xt=m.div`
|
|
409
|
+
display: flex;
|
|
410
|
+
gap: 12px;
|
|
411
|
+
align-items: center;
|
|
412
|
+
cursor: pointer;
|
|
413
|
+
|
|
414
|
+
&:hover {
|
|
415
|
+
background-color: ${f.colors.blue50};
|
|
416
|
+
}
|
|
417
|
+
.image-item {
|
|
418
|
+
flex: 0 0 48px;
|
|
419
|
+
width: 48px;
|
|
420
|
+
height: 48px;
|
|
421
|
+
border-radius: 50%;
|
|
422
|
+
background-color: ${f.colors.pink50};
|
|
423
|
+
|
|
424
|
+
img {
|
|
425
|
+
width: 100%;
|
|
426
|
+
height: 100%;
|
|
427
|
+
border-radius: 50%;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
.infor {
|
|
431
|
+
overflow: hidden;
|
|
432
|
+
padding: 12px 0;
|
|
433
|
+
flex: 1;
|
|
434
|
+
border-bottom: 1px solid ${f.colors.neutral100};
|
|
435
|
+
.title {
|
|
436
|
+
color: ${f.colors.gray800};
|
|
437
|
+
font-size: 16px;
|
|
438
|
+
font-weight: 600;
|
|
439
|
+
line-height: 24px;
|
|
440
|
+
}
|
|
441
|
+
.description {
|
|
442
|
+
overflow: hidden;
|
|
443
|
+
color: ${f.colors.gray600};
|
|
444
|
+
text-overflow: ellipsis;
|
|
445
|
+
white-space: nowrap;
|
|
446
|
+
font-size: 12px;
|
|
447
|
+
line-height: 18px;
|
|
448
|
+
display: flex;
|
|
449
|
+
gap: 8px;
|
|
450
|
+
align-items: center;
|
|
451
|
+
margin-top: 5px;
|
|
452
|
+
|
|
453
|
+
svg {
|
|
454
|
+
flex: 0 0 16px;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.sub-description {
|
|
458
|
+
overflow: hidden;
|
|
459
|
+
white-space: nowrap;
|
|
460
|
+
text-overflow: ellipsis;
|
|
461
|
+
flex: 1;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
&.last-item {
|
|
467
|
+
.infor {
|
|
468
|
+
border-bottom: none;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
`;m.div`
|
|
472
|
+
padding: 0 16px 16px;
|
|
473
|
+
|
|
474
|
+
.search-detail-btn {
|
|
475
|
+
color: ${f.colors.blue600};
|
|
476
|
+
font-size: 14px;
|
|
477
|
+
line-height: 22px;
|
|
478
|
+
cursor: pointer;
|
|
479
|
+
}
|
|
480
|
+
`;const wt=({state:e,type:t,results:i,location:a,typeInformation:s,dispatch:r})=>{const{t:l}=c(),{selectedLocation:d}=e,p=n((()=>s[t].slug),[s,t]);return o.createElement(ft,null,o.createElement(yt,null,o.createElement("div",{className:"title"},l("booking.searchResult.description",{search_type:s[t].name,search_location:a})),i.length>0&&o.createElement("div",{className:"btn-see-all",onClick:()=>{const e=`/${d.slug}/${p}`;e&&r({type:ht.NavigateTo,payload:e})}},l("home.seeAll"))),o.createElement(vt,null,i.map(((e,a)=>{var n,l;const c=i.length>4&&3===a||i.length<=4&&a===i.length-1;let u="";return"hospital"===t&&(u=(null==e?void 0:e.address)||""),"doctor"===t&&(u=(null===(n=null==e?void 0:e.specialties)||void 0===n?void 0:n.join(", "))||""),"service"===t&&(u=(null===(l=null==e?void 0:e.organization)||void 0===l?void 0:l.name)||""),a>=4?o.createElement(o.Fragment,null):o.createElement(xt,{key:e.id,className:c?"last-item":"",onClick:()=>(e=>{let o="";switch(t){case"service":o=`/${d.slug}/${p}/${e.slug}`;break;case"doctor":case"hospital":o=`/${p}/${e.slug}-${e.id}`}o&&r({type:ht.NavigateTo,payload:o})})(e)},o.createElement("div",{className:"image-item"},o.createElement("img",{src:e.logo||e.avatar,alt:e.name})),o.createElement("div",{className:"infor"},o.createElement("div",{className:"title"},e.name),o.createElement("div",{className:"description"},s[t].icon,o.createElement("div",{className:"sub-description"},u))))})),0===i.length&&o.createElement(b,{size:"sm",color:f.colors.gray400},l("booking.searchBar.noResults"))))},Et=m.div`
|
|
481
|
+
position: relative;
|
|
482
|
+
|
|
483
|
+
${y.mbDown} {
|
|
484
|
+
width: 100%;
|
|
485
|
+
display: flex;
|
|
486
|
+
flex-direction: column;
|
|
487
|
+
gap: 12px;
|
|
488
|
+
}
|
|
489
|
+
`,Lt=m.div`
|
|
490
|
+
position: absolute;
|
|
491
|
+
top: calc(100% + 2px);
|
|
492
|
+
width: calc(100% + 100px);
|
|
493
|
+
border-radius: 4px;
|
|
494
|
+
background: ${f.colors.white};
|
|
495
|
+
box-shadow: 0px 8px 40px 0px rgba(0, 0, 0, 0.1);
|
|
496
|
+
z-index: 10;
|
|
497
|
+
max-height: 300px;
|
|
498
|
+
overflow: auto;
|
|
499
|
+
|
|
500
|
+
${y.mbDown} {
|
|
501
|
+
width: calc(100% + 64px);
|
|
502
|
+
left: -32px;
|
|
503
|
+
}
|
|
504
|
+
`,St=m.li`
|
|
505
|
+
position: relative;
|
|
506
|
+
cursor: pointer;
|
|
507
|
+
padding: 12px 18px;
|
|
508
|
+
display: flex;
|
|
509
|
+
align-items: center;
|
|
510
|
+
gap: 14px;
|
|
511
|
+
overflow: hidden;
|
|
512
|
+
|
|
513
|
+
.image-item {
|
|
514
|
+
display: flex;
|
|
515
|
+
align-items: center;
|
|
516
|
+
width: 40px;
|
|
517
|
+
height: 40px;
|
|
518
|
+
|
|
519
|
+
img {
|
|
520
|
+
width: 100%;
|
|
521
|
+
object-fit: cover;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
svg {
|
|
525
|
+
width: 40px;
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
${({isSelected:e})=>e&&"\n &::after {\n content: url(\"data:image/svg+xml,%3Csvg width='19' height='14' viewBox='0 0 19 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16.9803 0.990669C16.7205 0.99841 16.4739 1.10699 16.2928 1.2934L5.99984 11.5864L2.70687 8.2934C2.61473 8.19743 2.50436 8.12081 2.38223 8.06802C2.2601 8.01524 2.12867 7.98735 1.99563 7.986C1.86259 7.98464 1.73061 8.00985 1.60743 8.06014C1.48426 8.11043 1.37235 8.18479 1.27827 8.27887C1.1842 8.37295 1.10983 8.48485 1.05954 8.60803C1.00926 8.73121 0.98405 8.86318 0.985403 8.99622C0.986757 9.12926 1.01464 9.26069 1.06743 9.38282C1.12021 9.50495 1.19684 9.61532 1.29281 9.70747L5.29281 13.7075C5.48035 13.8949 5.73467 14.0002 5.99984 14.0002C6.26501 14.0002 6.51933 13.8949 6.70687 13.7075L17.7069 2.70747C17.8514 2.567 17.9501 2.38616 17.99 2.18864C18.03 1.99112 18.0093 1.78614 17.9308 1.60055C17.8523 1.41497 17.7195 1.25744 17.5499 1.14861C17.3803 1.03978 17.1817 0.984729 16.9803 0.990669Z' fill='%232685F1'/%3E%3C/svg%3E%0A\");\n top: 50%;\n right: 18px;\n position: absolute;\n transform: translateY(-50%);\n }\n "}
|
|
530
|
+
|
|
531
|
+
& + li::before {
|
|
532
|
+
content: '';
|
|
533
|
+
position: absolute;
|
|
534
|
+
left: 18px;
|
|
535
|
+
right: 18px;
|
|
536
|
+
top: 0;
|
|
537
|
+
height: 1px;
|
|
538
|
+
background-color: ${f.colors.neutral100};
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
&:not([data-is-denied='true']):hover {
|
|
542
|
+
background-color: ${f.colors.neutral50};
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
&:last-child:hover {
|
|
546
|
+
border-bottom-right-radius: 6px;
|
|
547
|
+
border-bottom-left-radius: 6px;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
&:first-child:hover {
|
|
551
|
+
border-top-right-radius: 6px;
|
|
552
|
+
border-top-left-radius: 6px;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
&[data-is-denied='true'] {
|
|
556
|
+
cursor: not-allowed;
|
|
557
|
+
}
|
|
558
|
+
`;m(Y)`
|
|
559
|
+
width: 12px;
|
|
560
|
+
height: 18px;
|
|
561
|
+
`;const kt=()=>o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},o.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"})),Ot=()=>o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},o.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"})),jt=()=>o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},o.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"})),It=()=>o.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16"},o.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"})),Mt=({state:e,isMobile:t,debouncedFetchSearchResults:i,selectedLocation:s,onSpecialtyClick:l,dispatch:d})=>{var p;const{t:h,locale:g}=c(),m=r(null),C=n((()=>u[g]),[g]),f=n((()=>({wrapper:{"&:after":{content:'""',width:"1px",height:"20px",backgroundColor:"#E4E8EC",position:"absolute",right:0,top:"13px"}},input:{border:t?"border: 1px solid #d9d9d9":"none",height:t?"40px":"46px !important",paddingRight:"30px","&:focus":{boxShadow:t?"box-shadow: 0px 0px 0px 2px #91caff":"none"}},rightSection:{width:"30px",svg:{fontSize:"20px"}}})),[t]),y=a((function(e){console.log(e)}),[i,d]);return w(m,(()=>{d({type:ht.ClickOutsideInputSpecialty})})),o.createElement(Et,{ref:m},o.createElement(L.Wrapper,null,o.createElement(L,{size:t?"md":"lg",placeholder:h("booking.searchPopup.specialties"),value:(null===(p=null==e?void 0:e.selectedSpecialty)||void 0===p?void 0:p.name)||"",rightSection:o.createElement(B,null),styles:f,onFocus:()=>d({type:ht.FocusInputSpecialty}),onChange:e=>{y(e.target.value)}})),"specialty"===e.focused&&o.createElement(Lt,null,o.createElement(St,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{l&&l({name:h("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:C.SPECIALTIES})}},o.createElement("div",{className:"image-item"},o.createElement(It,null)),o.createElement(b,{size:"md"},h("booking.searchBar.allSpecialties"))),e.allSpecialties.map((e=>o.createElement(St,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),l&&l(Object.assign(Object.assign({},e),{total_doctor:0}))},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==s?void 0:s.id)===e.id},o.createElement("div",{className:"image-item"},o.createElement("img",{src:e.thumbnail,alt:e.name})),o.createElement(b,{size:"md"},e.name))))))},Ft=({state:e,type:t,isMobile:i,initalSearchValue:s,typeInformation:l,debouncedFetchSearchResults:d,trackingAttributes:p,focusSearchInput:u,onSearch:h,dispatch:g})=>{var m;const{t:C}=c(),b=r(null),f=n((()=>p?{"data-event-category":p.dataEventCategory,"data-event-action":p.dataEventAction,"data-event-label":p.dataEventLabel}:{}),[p]),y=n((()=>"doctor"===t?C("booking.searchBar.placeholder.doctor"):"service"===t?C("booking.searchBar.placeholder.service"):"hospital"===t?C("booking.searchBar.placeholder.hospital"):"specialty"===t?C("booking.searchBar.placeholder.specialty"):""),[t]),v=n((()=>({root:{flex:1}})),[]),x=n((()=>({icon:{left:"165px"},input:{color:"#262626",'&[data-with-icon="true"]':{paddingLeft:"205px",paddingRight:"16px"}},rightSection:{left:0,width:"165px",padding:"1px"}})),[]),E=n((()=>({input:{color:"#262626"}})),[]);w(b,(()=>{g({type:ht.ClickOutsideInputSearch})}));const S=a((function(o){g({type:ht.ChangeInputSearch,payload:o}),"function"!=typeof h&&(o.trim().length>pt[e.locale]||s||0===o.trim().length?d(o.trim(),e,t):(d.cancel(),g({type:ht.DisplayInitialSearchResults})))}),[g,e,t]),k=a((function(e){g({type:ht.SelectSpecialty,payload:e}),u()}),[g]);return o.createElement(Ct,{ref:b},"specialty"===t?o.createElement(L.Wrapper,{styles:v},o.createElement(L,{icon:o.createElement(A.Search,null),size:i?"md":"lg",placeholder:y,styles:E,onChange:e=>{S(e.target.value)}})):o.createElement(o.Fragment,null,i?o.createElement(o.Fragment,null,o.createElement(Mt,{state:e,isMobile:i,dispatch:g,debouncedFetchSearchResults:d,onSpecialtyClick:k}),o.createElement(L.Wrapper,{styles:v},o.createElement(L,{icon:o.createElement(A.Search,null),size:"md",placeholder:y,onFocus:()=>g({type:ht.FocusInputSearch}),onChange:e=>{S(e.target.value)}}))):o.createElement(L.Wrapper,{styles:v},o.createElement(L,Object.assign({icon:o.createElement(A.Search,null),size:"lg",placeholder:y,styles:x,name:"search-results",autoComplete:"off",onChange:e=>{S(e.target.value)},onFocus:()=>g({type:ht.FocusInputSearch})},f,{rightSection:o.createElement(Mt,{state:e,isMobile:i,dispatch:g,debouncedFetchSearchResults:d,onSpecialtyClick:k})}))),"search"===e.focused&&o.createElement(bt,null,o.createElement(wt,{type:t,state:e,results:(null===(m=e.searchResults)||void 0===m?void 0:m.searches)||[],location:e.selectedLocation.name,dispatch:g,typeInformation:l}))))},Rt=m.div`
|
|
562
|
+
position: relative;
|
|
563
|
+
|
|
564
|
+
${y.mbDown} {
|
|
565
|
+
width: 100%;
|
|
566
|
+
display: flex;
|
|
567
|
+
flex-direction: column;
|
|
568
|
+
gap: 12px;
|
|
569
|
+
}
|
|
570
|
+
`,$t=m.div`
|
|
571
|
+
position: absolute;
|
|
572
|
+
top: calc(100% + 2px);
|
|
573
|
+
width: 100%;
|
|
574
|
+
border-radius: 4px;
|
|
575
|
+
background: ${f.colors.white};
|
|
576
|
+
box-shadow: 0px 8px 40px 0px rgba(0, 0, 0, 0.1);
|
|
577
|
+
z-index: 10;
|
|
578
|
+
|
|
579
|
+
${y.mbDown} {
|
|
580
|
+
width: calc(100% + 64px);
|
|
581
|
+
left: -32px;
|
|
582
|
+
}
|
|
583
|
+
`,Tt=m.li`
|
|
584
|
+
position: relative;
|
|
585
|
+
cursor: pointer;
|
|
586
|
+
padding: 12px 18px;
|
|
587
|
+
display: flex;
|
|
588
|
+
align-items: center;
|
|
589
|
+
gap: 14px;
|
|
590
|
+
overflow: hidden;
|
|
591
|
+
|
|
592
|
+
${({isSelected:e})=>e&&"\n &::after {\n content: url(\"data:image/svg+xml,%3Csvg width='19' height='14' viewBox='0 0 19 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16.9803 0.990669C16.7205 0.99841 16.4739 1.10699 16.2928 1.2934L5.99984 11.5864L2.70687 8.2934C2.61473 8.19743 2.50436 8.12081 2.38223 8.06802C2.2601 8.01524 2.12867 7.98735 1.99563 7.986C1.86259 7.98464 1.73061 8.00985 1.60743 8.06014C1.48426 8.11043 1.37235 8.18479 1.27827 8.27887C1.1842 8.37295 1.10983 8.48485 1.05954 8.60803C1.00926 8.73121 0.98405 8.86318 0.985403 8.99622C0.986757 9.12926 1.01464 9.26069 1.06743 9.38282C1.12021 9.50495 1.19684 9.61532 1.29281 9.70747L5.29281 13.7075C5.48035 13.8949 5.73467 14.0002 5.99984 14.0002C6.26501 14.0002 6.51933 13.8949 6.70687 13.7075L17.7069 2.70747C17.8514 2.567 17.9501 2.38616 17.99 2.18864C18.03 1.99112 18.0093 1.78614 17.9308 1.60055C17.8523 1.41497 17.7195 1.25744 17.5499 1.14861C17.3803 1.03978 17.1817 0.984729 16.9803 0.990669Z' fill='%232685F1'/%3E%3C/svg%3E%0A\");\n top: 50%;\n right: 18px;\n position: absolute;\n transform: translateY(-50%);\n }\n "}
|
|
593
|
+
|
|
594
|
+
& + li::before {
|
|
595
|
+
content: '';
|
|
596
|
+
position: absolute;
|
|
597
|
+
left: 18px;
|
|
598
|
+
right: 18px;
|
|
599
|
+
top: 0;
|
|
600
|
+
height: 1px;
|
|
601
|
+
background-color: ${f.colors.neutral100};
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
&:not([data-is-denied='true']):hover {
|
|
605
|
+
background-color: ${f.colors.neutral50};
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
&:last-child:hover {
|
|
609
|
+
border-bottom-right-radius: 6px;
|
|
610
|
+
border-bottom-left-radius: 6px;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
&:first-child:hover {
|
|
614
|
+
border-top-right-radius: 6px;
|
|
615
|
+
border-top-left-radius: 6px;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
&[data-is-denied='true'] {
|
|
619
|
+
cursor: not-allowed;
|
|
620
|
+
}
|
|
621
|
+
`,Pt=m(Y)`
|
|
622
|
+
width: 12px;
|
|
623
|
+
height: 18px;
|
|
624
|
+
`,At=({state:e,isMobile:t,debouncedFetchCitiesByKeyword:i,selectedLocation:s,trackingAttributes:l,onLocationClick:d,dispatch:h})=>{const{t:g,locale:m}=c(),C=r(null),y=n((()=>l?{"data-event-category":l.dataEventCategory,"data-event-action":l.dataEventAction,"data-event-label":l.dataEventLabel}:{}),[l]),v=a((function(t){h({type:ht.ChangeInputLocation,payload:t}),t.trim().length>pt[e.locale]?i(t.trim()):(i.cancel(),h({type:ht.DisplayInitialCities}))}),[i,h]);return w(C,(()=>{h({type:ht.ClickOutsideInputLocation})})),o.createElement(Rt,{ref:C},o.createElement(L.Wrapper,null,o.createElement(L,Object.assign({size:t?"md":"lg",placeholder:"Search location",value:e.searchLocationKeywords,onFocus:()=>h({type:ht.FocusInputLocation}),onChange:e=>{v(e.target.value)}},y))),"location"===e.focused&&o.createElement($t,null,o.createElement(Tt,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{var e;d&&d({name:g("booking.searchBar.allLocations"),id:p,slug:null===(e=u[m])||void 0===e?void 0:e.ALL})}},o.createElement(Pt,{color:f.colors.neutral400}),o.createElement(b,{size:"md"},g("booking.searchBar.allLocations"))),e.cities.map((e=>o.createElement(Tt,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),d&&d(e)},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==s?void 0:s.id)===e.id},o.createElement(Pt,{color:f.colors.neutral400}),o.createElement(b,{size:"md"},e.name))))))},Nt=m.div`
|
|
625
|
+
display: flex;
|
|
626
|
+
flex-wrap: wrap;
|
|
627
|
+
row-gap: 8px;
|
|
628
|
+
column-gap: 20px;
|
|
629
|
+
${y.mbDown} {
|
|
630
|
+
margin-top: 12px;
|
|
631
|
+
}
|
|
632
|
+
`,Bt=m.div`
|
|
633
|
+
display: flex;
|
|
634
|
+
align-items: center;
|
|
635
|
+
border-radius: 8px;
|
|
636
|
+
border: 1px solid ${f.colors.neutral100};
|
|
637
|
+
background: ${f.colors.white};
|
|
638
|
+
padding: 8px 12px 8px 8px;
|
|
639
|
+
flex: 0 0 calc(33.3% - 13px);
|
|
640
|
+
gap: 12px;
|
|
641
|
+
cursor: pointer;
|
|
642
|
+
|
|
643
|
+
&:hover {
|
|
644
|
+
background: ${f.colors.blue50};
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
${y.tdDown} {
|
|
648
|
+
flex: 0 0 calc(50% - 10px);
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
${y.mbDown} {
|
|
652
|
+
flex: 0 0 100%;
|
|
653
|
+
border: none;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
.image-item {
|
|
657
|
+
display: flex;
|
|
658
|
+
align-items: center;
|
|
659
|
+
width: 40px;
|
|
660
|
+
height: 40px;
|
|
661
|
+
|
|
662
|
+
img {
|
|
663
|
+
width: 100%;
|
|
664
|
+
object-fit: cover;
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
.infor {
|
|
669
|
+
.title {
|
|
670
|
+
color: ${f.colors.gray800};
|
|
671
|
+
font-size: 14px;
|
|
672
|
+
font-style: normal;
|
|
673
|
+
font-weight: 400;
|
|
674
|
+
line-height: 22px;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
.description {
|
|
678
|
+
color: ${f.colors.gray600};
|
|
679
|
+
font-size: 12px;
|
|
680
|
+
font-weight: 400;
|
|
681
|
+
line-height: 18px;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
`,Vt=m(S)`
|
|
685
|
+
margin: 24px 0 !important;
|
|
686
|
+
`,Dt=m.div`
|
|
687
|
+
display: flex;
|
|
688
|
+
justify-content: center;
|
|
689
|
+
margin-top: 24px;
|
|
690
|
+
.show-more {
|
|
691
|
+
border-radius: 4px;
|
|
692
|
+
border: 1px solid ${f.colors.neutral200};
|
|
693
|
+
padding: 12px 16px;
|
|
694
|
+
cursor: pointer;
|
|
695
|
+
display: inline-block;
|
|
696
|
+
color: ${f.colors.gray800};
|
|
697
|
+
font-size: 16px;
|
|
698
|
+
font-weight: 600;
|
|
699
|
+
line-height: 24px;
|
|
700
|
+
|
|
701
|
+
${y.mbDown} {
|
|
702
|
+
width: 100%;
|
|
703
|
+
text-align: center;
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
`,zt=({state:e,isMobile:t,specialties:i,isLoading:a,dispatch:s})=>{const{t:r,locale:l}=c(),{selectedLocation:d}=e,p=n((()=>u[l]),[l]);return o.createElement(o.Fragment,null,!t&&o.createElement(Vt,{color:"#E4E8EC"}),o.createElement(Nt,null,i.map(((e,t)=>t>=15?o.createElement(o.Fragment,null):o.createElement(Bt,{key:e.id,onClick:()=>(e=>{const t=`/${d.slug}/${p.DOCTOR}/${e}`;s({type:ht.NavigateTo,payload:t})})(e.slug)},o.createElement("div",{className:"image-item"},o.createElement("img",{src:e.thumbnail,alt:e.name})),o.createElement("div",{className:"infor"},o.createElement("div",{className:"title"},e.name))))),0===i.length&&!a&&o.createElement(b,{size:"sm",color:f.colors.gray400},r("booking.searchBar.noResults")),a&&o.createElement(o.Fragment,null,o.createElement(k,{height:8,mt:10,radius:"xl",animate:!0}),o.createElement(k,{height:8,mt:10,radius:"xl",animate:!0}),o.createElement(k,{height:8,mt:10,radius:"xl",animate:!0}))),i.length>15&&o.createElement(Dt,null,o.createElement("div",{className:"show-more",onClick:()=>{const e=`/${p.SPECIALTIES}`;s({type:ht.NavigateTo,payload:e})}},r("home.seeAll"))))},Ht=m.div`
|
|
707
|
+
// display: flex;
|
|
708
|
+
display: none;
|
|
709
|
+
gap: 5px;
|
|
710
|
+
margin-top: 16px;
|
|
711
|
+
flex-wrap: wrap;
|
|
712
|
+
`,Kt=m.div`
|
|
713
|
+
color: ${f.colors.gray600};
|
|
714
|
+
font-size: 14px;
|
|
715
|
+
font-weight: 600;
|
|
716
|
+
line-height: 22px;
|
|
717
|
+
padding: 4px 12px;
|
|
718
|
+
background: ${f.colors.white};
|
|
719
|
+
border-radius: 32px;
|
|
720
|
+
cursor: pointer;
|
|
721
|
+
border: 1px solid ${f.colors.white};
|
|
722
|
+
margin-bottom: 5px;
|
|
723
|
+
|
|
724
|
+
&.active {
|
|
725
|
+
border-color: ${f.colors.neutral100};
|
|
726
|
+
background: #f7f9fc;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
&.view-all {
|
|
730
|
+
border-radius: 32px;
|
|
731
|
+
border-color: ${f.colors.blue50};
|
|
732
|
+
background: ${f.colors.blue50};
|
|
733
|
+
color: ${f.colors.blue600};
|
|
734
|
+
|
|
735
|
+
&:hover {
|
|
736
|
+
border-color: ${f.colors.blue50};
|
|
737
|
+
background: ${f.colors.blue50};
|
|
738
|
+
color: ${f.colors.blue600};
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
&:hover {
|
|
743
|
+
border-color: ${f.colors.neutral100};
|
|
744
|
+
background: #f7f9fc;
|
|
745
|
+
}
|
|
746
|
+
`,_t=()=>o.createElement(Ht,null,o.createElement(Kt,null,"Popular Specialties"),o.createElement(Kt,{className:"active"},"General Practitioner"),o.createElement(Kt,{className:"view-all"},"View all")),Gt=m.div`
|
|
747
|
+
background: rgba(255, 255, 255, 0.64);
|
|
748
|
+
backdrop-filter: blur(12px);
|
|
749
|
+
border-bottom: 1px solid ${f.colors.neutral100};
|
|
750
|
+
`,Zt=({currentTab:e,isMobile:t,setCurrentTab:i})=>{const{t:a}=c(),s=n((()=>({root:{overflowY:t?"hidden":"initial",overflowX:t?"auto":"initial"},tabsList:{background:"rgba(255, 255, 255, 0)",borderBottom:"none",flexWrap:"nowrap",".mantine-Tabs-tab":{"&:last-child":{"&:after":{display:"none"}}}},tab:{padding:t?"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:t?"14px":"16px",fontWeight:600,lineHeight:t?"22px":"24px"}})),[t]);return o.createElement(Gt,null,o.createElement(P,null,o.createElement(O,{value:e,onTabChange:e=>{i(e)},styles:s},o.createElement(O.List,null,o.createElement(O.Tab,{value:"hospital"},a("booking.searchPopup.hospitals")),o.createElement(O.Tab,{value:"doctor"},a("booking.searchPopup.doctors")),o.createElement(O.Tab,{value:"service"},a("booking.searchPopup.services")),o.createElement(O.Tab,{value:"specialty"},a("booking.searchPopup.specialties"))))))};const Yt=({isMobile:e,careApiDomain:t,geoLocationPermission:g,geoLocationCoordinates:m,initialSelectedCity:C,initialSearchValue:b="",careFrontDomain:f="/care",isDebug:y=!1,gaTrackingSearchBar:v,gaTrackingLocationSearch:x,autoCompleteDisabled:w=!1,inputSearchPlaceholder:L="",routerPush:S,onGeoLocationPermissionChange:k,onChangeLocation:O})=>{const{locale:M,t:F}=c(),R=r(null),[$,T]=i("doctor"),{geoLocationPermission:P,geoLocationCoordinates:A}=V(),[N,B]=l(mt,ut,(t=>Object.assign(Object.assign({},t),{isDebug:y,isMobile:e,geoLocationPermission:g||P||"unset",geoLocationCoordinates:m||A||null,searchKeywords:b,initialSelectedCity:C||null,selectedLocation:C||t.selectedLocation||null,searchLocationKeywords:(null==C?void 0:C.name)||t.searchLocationKeywords,autoCompleteDisabled:w,inputSearchPlaceholder:L,locale:M}))),{navigateTo:D,searchKeywords:z,geoLocationPermission:H,selectedLocation:K,selectedSpecialty:_,initialSelectedCity:G,searchResults:Z,isLoadingSearchResults:Y}=N,{fetchCitiesByLocation:U,fetchCitiesByKeyword:W,fetchSearchResults:Q,fetchAllSpecialties:q}=function({dispatch:e,careApiDomain:t,locale:o="vi-VN"}){const i=a((function(i,a={}){const n=`${t}${i}`;return e({type:ht.FetchCitiesStart}),fetch(st(n,a,o),{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:ht.FetchCitiesFinish})))}),[o]);return{fetchCitiesByLocation:a((function({coordinates:t}){let a={};const n={};t&&(a={lat:t.lat,lng:t.lng}),"ms-MY"===o&&(n.noPaging=1);const s=[i(E.GET_CITY_BY_IP,Object.assign(Object.assign({},a),n))];return"zh-TW"===o&&s.push(i(E.GET_CITIES_LIST,{noPaging:1})),Promise.all(s).then((([t,o])=>{const i=Object.assign({},t);if(o){const e=i.cities.map((e=>e.id));i.cities=i.cities.concat(o.cities.filter((t=>!e.includes(t.id))))}e({type:ht.FetchCitiesByGeoIpComplete,payload:i})})).catch((e=>console.error("error loading cities by location",e)))}),[o,t,e]),fetchCitiesByKeyword:a((function(t){return i(E.GET_CITIES_LIST,{keyword:t}).then((t=>{e({type:ht.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[o,t,e]),fetchSearchResults:a((function(i,a,n){const s="specialty"===n?`${t}${E.GET_SEARCH_SPECIALTY}`:`${t}${E.GET_SEARCH_V2}`;e({type:ht.FetchSearchResultsStart});const{defaultCity:r,selectedLocation:l,geoLocationCoordinates:c,selectedSpecialty:d}=a;let u="";if(!l||!r)return void e({type:ht.FetchSearchResultsFinish});l.id===h?c||(u=r.id):u=l.id===p?"":l.id;const g=(null==c?void 0:c.lat)||"",m=(null==c?void 0:c.lng)||"",C=(null==d?void 0:d.id)||"";return fetch(st(s,{domain:t,searchType:n||"global",keyword:i.trim().length>pt[o]?i.trim():"",city:u===h?"":u,lat:g,lng:m,specialty_id:C},o),{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:ht.FetchSearchResultsComplete,payload:t}))).catch((e=>{console.log("error loading search results",{url:s,error:e})})).finally((()=>e({type:ht.FetchSearchResultsFinish})))}),[o,t,e]),fetchAllSpecialties:a((function(){const i=`${t}${E.GET_SEARCH_SPECIALTY}`;return fetch(st(i,{domain:t,searchType:""},o),{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:ht.FetchAllSpecialties,payload:t.specialties||[]})})).catch((e=>{console.log("error loading search results",{url:i,error:e})}))}),[o,t,e])}}({dispatch:B,locale:M,careApiDomain:t}),J=n((()=>u[M]),[M]),X=n((()=>({doctor:{name:F("booking.searchPopup.doctors"),icon:o.createElement(kt,null),slug:J.DOCTOR},service:{name:F("booking.searchPopup.services"),icon:o.createElement(Ot,null),slug:J.SERVICE},hospital:{name:F("booking.searchPopup.hospitals"),icon:o.createElement(jt,null),slug:J.HOSPITAL},specialty:{name:F("booking.searchPopup.specialties"),icon:o.createElement(It,null),slug:J.SPECIALTIES}})),[$]),ee=n((()=>d(W,400)),[W]),te=n((()=>d(Q,400)),[Q]),oe=a((function(e){B({type:ht.SelectLocation,payload:e}),ie(),O&&O(e)}),[F,B]);function ie(){var e;R.current&&(null===(e=R.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}return s((()=>{var t;"denied"===H||G||B({type:ht.SelectLocation,payload:{name:F("booking.searchBar.allLocations"),id:p,slug:null===(t=u[M])||void 0===t?void 0:t.ALL}}),k&&k(H,N.geoLocationCoordinates),e&&"granted"===H&&K&&B({type:ht.FocusInputSearch}),U({coordinates:N.geoLocationCoordinates})}),[H]),s((()=>{q()}),[]),s((()=>{D&&(S?S(D):window.location.href=`${f}${D}`)}),[D]),s((()=>{(K||_)&&Q(N.searchKeywords,N,$)}),[K,_]),s((()=>{te("",N,$)}),[$]),o.createElement(lt,{ref:R},o.createElement(Zt,{currentTab:$,setCurrentTab:T,isMobile:e}),o.createElement(ct,null,o.createElement(dt,null,o.createElement(j,{gap:"12px",justify:"space-between",align:"center",direction:e?"column":"row",className:"flex-search-input"},"specialty"!==$&&o.createElement(At,{state:N,isMobile:e,dispatch:B,debouncedFetchCitiesByKeyword:ee,selectedLocation:K,onLocationClick:oe,trackingAttributes:x}),o.createElement(Ft,{type:$,isMobile:e,state:N,dispatch:B,debouncedFetchSearchResults:te,initalSearchValue:b,focusSearchInput:ie,typeInformation:X,trackingAttributes:v}),o.createElement(I,{size:e?"md":"lg",fullWidth:e,onClick:function(){const{slug:e}=X[$],t=`/${K.slug}/${e}?q=${z}`;B({type:ht.NavigateTo,payload:t})},styles:{root:{height:e?"40px":"48px"}}},F("booking.searchBar.searchButton"))),"specialty"!==$&&o.createElement(_t,null),"specialty"===$&&o.createElement(zt,{state:N,isMobile:e,dispatch:B,specialties:(null==Z?void 0:Z.specialties)||[],isLoading:Y}))))};var Ut;!function(e){e[e.SPECIALTY=1]="SPECIALTY",e[e.DOCTOR=2]="DOCTOR",e[e.CLINIC=3]="CLINIC",e[e.SERVICE=4]="SERVICE"}(Ut||(Ut={}));var Wt=Object.freeze({__proto__:null,get RedirectType(){return Ut}});export{rt as B,B as C,Yt as a,Wt as t};
|