@hhgtech/hhg-components 1.27.113 → 1.27.115

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.
Files changed (269) hide show
  1. package/build/babyGrowth.js +2 -2
  2. package/build/cache.js +1 -1
  3. package/build/care/components/organisms/bookingSearchBarV2/searchResultSpecialties/index.d.ts +2 -1
  4. package/build/care/interfaces/constants.d.ts +1 -0
  5. package/build/care.js +1 -1
  6. package/build/components/molecules/surveyOrPremiumBanner/context.d.ts +3 -1
  7. package/build/components/molecules/surveyOrPremiumBanner/index.d.ts +1 -1
  8. package/build/components.js +1 -1
  9. package/build/{constants-fd82a887.js → constants-dee18538.js} +1 -1
  10. package/build/constants.js +1 -1
  11. package/build/core-5f367bd4.js +1 -0
  12. package/build/ecom.js +1 -1
  13. package/build/esm/babyGrowth.js +5 -5
  14. package/build/esm/cache.js +1 -1
  15. package/build/esm/care/components/organisms/bookingSearchBarV2/searchResultSpecialties/index.d.ts +2 -1
  16. package/build/esm/care/interfaces/constants.d.ts +1 -0
  17. package/build/esm/care.js +1 -1
  18. package/build/esm/components/molecules/surveyOrPremiumBanner/context.d.ts +3 -1
  19. package/build/esm/components/molecules/surveyOrPremiumBanner/index.d.ts +1 -1
  20. package/build/esm/components.js +1 -1
  21. package/build/esm/{constants-66251709.js → constants-55b45825.js} +1 -1
  22. package/build/esm/constants.js +1 -1
  23. package/build/esm/{core-256cda08.js → core-3eccb9f3.js} +1 -1
  24. package/build/esm/ecom.js +1 -1
  25. package/build/esm/{fixedBottomAdBlock-42a0fc3b.js → fixedBottomAdBlock-96dd8500.js} +1 -1
  26. package/build/esm/footer.js +1 -1
  27. package/build/esm/gAssets.js +1 -1
  28. package/build/esm/{getDynamicHealthTool-0e9dffaf.js → getDynamicHealthTool-4de90d2c.js} +1 -1
  29. package/build/esm/{getSocialList-04ad7465.js → getSocialList-ffdab233.js} +1 -1
  30. package/build/esm/hooks.js +1 -1
  31. package/build/esm/i18n.js +1 -1
  32. package/build/esm/i18nV2.js +1 -1
  33. package/build/esm/{index-c9c1af14.js → index-09c17ca0.js} +1 -1
  34. package/build/esm/{index-4ef01662.js → index-163dbf81.js} +1 -1
  35. package/build/esm/{index-7ea25330.js → index-17e0de1a.js} +1 -1
  36. package/build/esm/{index-1f31ee2c.js → index-337f9c4b.js} +1 -1
  37. package/build/esm/index-5b495943.js +1 -0
  38. package/build/esm/{index-c04a8332.js → index-72ccbc84.js} +1 -1
  39. package/build/esm/{index-c52c6d1d.js → index-74c5df78.js} +1 -1
  40. package/build/esm/{index-aab6e937.js → index-7cae1139.js} +1 -1
  41. package/build/esm/{index-9a6cbd76.js → index-86fa35f1.js} +1 -1
  42. package/build/esm/{index-5b15422c.js → index-8c194e19.js} +1 -1
  43. package/build/esm/{index-c20147f5.js → index-948c3689.js} +1 -1
  44. package/build/esm/{index-d533e676.js → index-a53fa885.js} +1 -1
  45. package/build/esm/{index-671bebd2.js → index-a5f32e1f.js} +1 -1
  46. package/build/esm/{index-4b0913ef.js → index-b38a4082.js} +1 -1
  47. package/build/esm/{index-9dc3058e.js → index-bee675e7.js} +1 -1
  48. package/build/esm/{index-6bfebf91.js → index-cd94eec4.js} +1 -1
  49. package/build/esm/{index-79cd66c0.js → index-e8312aa1.js} +1 -1
  50. package/build/esm/{index-37ac3e0a.js → index-ec45fec9.js} +6 -6
  51. package/build/esm/{index-40352094.js → index-f0703e1c.js} +2 -2
  52. package/build/esm/{index-f9338e27.js → index-f2e5ccac.js} +2 -2
  53. package/build/esm/{index-2472bb2e.js → index-f5c58742.js} +1 -1
  54. package/build/esm/index.js +1 -1
  55. package/build/esm/{index.styled-8ad8796f.js → index.styled-476ff122.js} +4 -4
  56. package/build/esm/{index.styled-c742d0a3.js → index.styled-54cd15cf.js} +4 -4
  57. package/build/esm/{index.styled-ce98cbc1.js → index.styled-dd9882a9.js} +1 -1
  58. package/build/esm/{index.styles-952b0f4b.js → index.styles-70158aec.js} +1 -1
  59. package/build/esm/lead.js +1 -1
  60. package/build/esm/mantine.js +1 -1
  61. package/build/esm/misc.js +1 -1
  62. package/build/esm/navigation.js +1 -1
  63. package/build/esm/{normalizeLink-58957b47.js → normalizeLink-ec13b136.js} +1 -1
  64. package/build/esm/onboarding.js +1 -1
  65. package/build/esm/onboardingV2.js +1 -1
  66. package/build/esm/pwg.js +3 -3
  67. package/build/esm/together.js +1 -1
  68. package/build/esm/{types-0cbaa281.js → types-8b4be14a.js} +130 -130
  69. package/build/esm/{types-27c16503.js → types-d95ff0a2.js} +1 -1
  70. package/build/esm/types.js +1 -1
  71. package/build/esm/{useCategory-bfba2de5.js → useCategory-04f78bbd.js} +1 -1
  72. package/build/esm/useHealthToolCache-144f477f.js +1 -0
  73. package/build/esm/{useRafState-66b5f663.js → useRafState-a8591aed.js} +1 -1
  74. package/build/esm/{useTranslations-b2f04ab6.js → useTranslations-b80f6cea.js} +1 -1
  75. package/build/esm/{utils-33c4c832.js → utils-6efd33c7.js} +1 -1
  76. package/build/esm/vaccination.js +5 -5
  77. package/build/{fixedBottomAdBlock-664a6e50.js → fixedBottomAdBlock-7cd506c7.js} +1 -1
  78. package/build/footer.js +1 -1
  79. package/build/gAssets.js +1 -1
  80. package/build/{getDynamicHealthTool-571597e0.js → getDynamicHealthTool-5c61456a.js} +1 -1
  81. package/build/{getSocialList-2d43911c.js → getSocialList-5de74aca.js} +1 -1
  82. package/build/hooks.js +1 -1
  83. package/build/i18n.js +1 -1
  84. package/build/i18nV2.js +1 -1
  85. package/build/{index-537bccbe.js → index-05e21683.js} +1 -1
  86. package/build/{index-a89b23de.js → index-06a0ee4f.js} +1 -1
  87. package/build/index-09ed8172.js +53 -0
  88. package/build/{index-c57b487f.js → index-120a5211.js} +1 -1
  89. package/build/{index-e7f2e80f.js → index-2078c919.js} +1 -1
  90. package/build/{index-32d3a385.js → index-239bd1af.js} +1 -1
  91. package/build/{index-8383af12.js → index-2fba8b09.js} +1 -1
  92. package/build/{index-e022af07.js → index-5c8e9580.js} +1 -1
  93. package/build/{index-5b7dfda4.js → index-63626740.js} +1 -1
  94. package/build/{index-63632fd5.js → index-66bd0a7b.js} +1 -1
  95. package/build/{index-f36821a3.js → index-6a45ff11.js} +1 -1
  96. package/build/{index-55a6f97a.js → index-716e7e90.js} +1 -1
  97. package/build/index-76173979.js +1 -0
  98. package/build/{index-22a4d8ec.js → index-80d1c6d3.js} +1 -1
  99. package/build/index-8dfe86fe.js +1 -0
  100. package/build/{index-9669998e.js → index-97a47459.js} +1 -1
  101. package/build/{index-b99409f1.js → index-9b288574.js} +1 -1
  102. package/build/{index-bc8fcf35.js → index-ca244410.js} +1 -1
  103. package/build/{index-9f6e2696.js → index-eb228f66.js} +15 -15
  104. package/build/{index-dad94e78.js → index-f9ef69b8.js} +1 -1
  105. package/build/index-fb707465.js +1 -0
  106. package/build/index.js +1 -1
  107. package/build/{index.styled-0d4d68f3.js → index.styled-f21b31a6.js} +1 -1
  108. package/build/{index.styled-90c35fc5.js → index.styled-f3571c38.js} +1 -1
  109. package/build/{index.styled-b9465af1.js → index.styled-f3b66fe9.js} +5 -5
  110. package/build/{index.styles-9285e23d.js → index.styles-b9febcc9.js} +1 -1
  111. package/build/lead.js +1 -1
  112. package/build/mantine.js +1 -1
  113. package/build/misc.js +1 -1
  114. package/build/navigation.js +1 -1
  115. package/build/{normalizeLink-28258895.js → normalizeLink-886f7c9d.js} +1 -1
  116. package/build/onboarding.js +1 -1
  117. package/build/onboardingV2.js +1 -1
  118. package/build/pwg.js +2 -2
  119. package/build/together.js +1 -1
  120. package/build/{types-ffea7b45.js → types-b9f1522b.js} +1 -1
  121. package/build/{types-90d8b488.js → types-c2a36494.js} +12 -12
  122. package/build/types.js +1 -1
  123. package/build/{useCategory-971481b4.js → useCategory-ff3032d0.js} +1 -1
  124. package/build/useHealthToolCache-bf07b19c.js +1 -0
  125. package/build/{useRafState-5cd3ac64.js → useRafState-8b05394a.js} +1 -1
  126. package/build/{useTranslations-2e7d64aa.js → useTranslations-1901ec76.js} +1 -1
  127. package/build/{utils-2fb6eb7d.js → utils-6a2363f8.js} +1 -1
  128. package/build/vaccination.js +1 -1
  129. package/package.json +1 -1
  130. package/build/core-5c4c9018.js +0 -1
  131. package/build/esm/index-404d6f42.js +0 -1
  132. package/build/esm/useHealthToolCache-b9973713.js +0 -1
  133. package/build/index-2584fe83.js +0 -53
  134. package/build/index-2db33f49.js +0 -1
  135. package/build/index-4efa8e7e.js +0 -1
  136. package/build/index-58609826.js +0 -1
  137. package/build/useHealthToolCache-10f561aa.js +0 -1
  138. /package/build/{BMI_BOYS.percentile.monthly-5b917714.js → BMI_BOYS.percentile.monthly-9b668c29.js} +0 -0
  139. /package/build/{BMI_BOYS.percentile.weekly-9566eb37.js → BMI_BOYS.percentile.weekly-b4c3a07f.js} +0 -0
  140. /package/build/{BMI_BOYS.percentile.yearly-db737739.js → BMI_BOYS.percentile.yearly-c3e94826.js} +0 -0
  141. /package/build/{BMI_BOYS.zscore.monthly-86f68a0b.js → BMI_BOYS.zscore.monthly-71a3da1d.js} +0 -0
  142. /package/build/{BMI_BOYS.zscore.weekly-92d923b0.js → BMI_BOYS.zscore.weekly-14aa09df.js} +0 -0
  143. /package/build/{BMI_BOYS.zscore.yearly-4d92f086.js → BMI_BOYS.zscore.yearly-1535f1b6.js} +0 -0
  144. /package/build/{BMI_GIRLS.percentile.monthly-6a6d1837.js → BMI_GIRLS.percentile.monthly-be24fd95.js} +0 -0
  145. /package/build/{BMI_GIRLS.percentile.weekly-5589d39f.js → BMI_GIRLS.percentile.weekly-97d31ea1.js} +0 -0
  146. /package/build/{BMI_GIRLS.percentile.yearly-15c4d279.js → BMI_GIRLS.percentile.yearly-0a98eaa5.js} +0 -0
  147. /package/build/{BMI_GIRLS.zscore.monthly-667e63fd.js → BMI_GIRLS.zscore.monthly-ec195345.js} +0 -0
  148. /package/build/{BMI_GIRLS.zscore.weekly-3fdeccfe.js → BMI_GIRLS.zscore.weekly-05151437.js} +0 -0
  149. /package/build/{BMI_GIRLS.zscore.yearly-ea25f63d.js → BMI_GIRLS.zscore.yearly-296ebe80.js} +0 -0
  150. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-6db968ca.js → HEAD CIRCUM_BOYS.percentile.monthly-ca9cb5b7.js} +0 -0
  151. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-2a4e9201.js → HEAD CIRCUM_BOYS.percentile.weekly-af15543c.js} +0 -0
  152. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-c566092e.js → HEAD CIRCUM_BOYS.percentile.yearly-8da4114b.js} +0 -0
  153. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-03fc7b94.js → HEAD CIRCUM_BOYS.zscore.monthly-56c3da8d.js} +0 -0
  154. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-faa83c6d.js → HEAD CIRCUM_BOYS.zscore.weekly-697ad965.js} +0 -0
  155. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-629071b8.js → HEAD CIRCUM_BOYS.zscore.yearly-c0f55526.js} +0 -0
  156. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-fd8e09c4.js → HEAD CIRCUM_GIRLS.percentile.monthly-6c536973.js} +0 -0
  157. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-d7bc181c.js → HEAD CIRCUM_GIRLS.percentile.weekly-bf3fc7ed.js} +0 -0
  158. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-2c18bf98.js → HEAD CIRCUM_GIRLS.percentile.yearly-bf8b0db8.js} +0 -0
  159. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-8d909763.js → HEAD CIRCUM_GIRLS.zscore.monthly-8694e757.js} +0 -0
  160. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-018ebd5c.js → HEAD CIRCUM_GIRLS.zscore.weekly-9ad440da.js} +0 -0
  161. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-f4da36f0.js → HEAD CIRCUM_GIRLS.zscore.yearly-3acde4ed.js} +0 -0
  162. /package/build/{HEIGHT_BOYS.percentile.monthly-4bcc65ef.js → HEIGHT_BOYS.percentile.monthly-5a5e9d9d.js} +0 -0
  163. /package/build/{HEIGHT_BOYS.percentile.weekly-7c769b89.js → HEIGHT_BOYS.percentile.weekly-e42a798f.js} +0 -0
  164. /package/build/{HEIGHT_BOYS.percentile.yearly-3f50eba5.js → HEIGHT_BOYS.percentile.yearly-178082da.js} +0 -0
  165. /package/build/{HEIGHT_BOYS.zscore.monthly-a78a7a26.js → HEIGHT_BOYS.zscore.monthly-0073ec8c.js} +0 -0
  166. /package/build/{HEIGHT_BOYS.zscore.weekly-caab37b3.js → HEIGHT_BOYS.zscore.weekly-dbe2bb6a.js} +0 -0
  167. /package/build/{HEIGHT_BOYS.zscore.yearly-c2d46f1f.js → HEIGHT_BOYS.zscore.yearly-14ca8968.js} +0 -0
  168. /package/build/{HEIGHT_GIRLS.percentile.monthly-b3265a7d.js → HEIGHT_GIRLS.percentile.monthly-f5aff8ff.js} +0 -0
  169. /package/build/{HEIGHT_GIRLS.percentile.weekly-69403da3.js → HEIGHT_GIRLS.percentile.weekly-a3b5e2a5.js} +0 -0
  170. /package/build/{HEIGHT_GIRLS.percentile.yearly-5f19a816.js → HEIGHT_GIRLS.percentile.yearly-a32c2583.js} +0 -0
  171. /package/build/{HEIGHT_GIRLS.zscore.monthly-e56cd9ff.js → HEIGHT_GIRLS.zscore.monthly-6f9a7d7e.js} +0 -0
  172. /package/build/{HEIGHT_GIRLS.zscore.weekly-cfbee1ac.js → HEIGHT_GIRLS.zscore.weekly-7948cd1b.js} +0 -0
  173. /package/build/{HEIGHT_GIRLS.zscore.yearly-603fd96e.js → HEIGHT_GIRLS.zscore.yearly-e4cc71d8.js} +0 -0
  174. /package/build/{Onboarding-2b01db17.js → Onboarding-2f763873.js} +0 -0
  175. /package/build/{Visible-7e3703b1.js → Visible-671ae192.js} +0 -0
  176. /package/build/{WEIGHT_BOYS.percentile.monthly-df2b38ad.js → WEIGHT_BOYS.percentile.monthly-aa8cbaa8.js} +0 -0
  177. /package/build/{WEIGHT_BOYS.percentile.weekly-017d4587.js → WEIGHT_BOYS.percentile.weekly-01192e49.js} +0 -0
  178. /package/build/{WEIGHT_BOYS.percentile.yearly-d98f06d0.js → WEIGHT_BOYS.percentile.yearly-f77d5156.js} +0 -0
  179. /package/build/{WEIGHT_BOYS.zscore.monthly-3efc2926.js → WEIGHT_BOYS.zscore.monthly-f49c33bc.js} +0 -0
  180. /package/build/{WEIGHT_BOYS.zscore.weekly-1478e955.js → WEIGHT_BOYS.zscore.weekly-26f94187.js} +0 -0
  181. /package/build/{WEIGHT_BOYS.zscore.yearly-96592d44.js → WEIGHT_BOYS.zscore.yearly-a8d2da3b.js} +0 -0
  182. /package/build/{WEIGHT_GIRLS.percentile.monthly-7990f762.js → WEIGHT_GIRLS.percentile.monthly-fc72fd67.js} +0 -0
  183. /package/build/{WEIGHT_GIRLS.percentile.weekly-4b98de90.js → WEIGHT_GIRLS.percentile.weekly-83cbe837.js} +0 -0
  184. /package/build/{WEIGHT_GIRLS.percentile.yearly-5686e441.js → WEIGHT_GIRLS.percentile.yearly-5df84ca6.js} +0 -0
  185. /package/build/{WEIGHT_GIRLS.zscore.monthly-76c7187f.js → WEIGHT_GIRLS.zscore.monthly-79e4c930.js} +0 -0
  186. /package/build/{WEIGHT_GIRLS.zscore.weekly-bc5910e8.js → WEIGHT_GIRLS.zscore.weekly-24ba6197.js} +0 -0
  187. /package/build/{WEIGHT_GIRLS.zscore.yearly-07b83056.js → WEIGHT_GIRLS.zscore.yearly-6fb7bfb7.js} +0 -0
  188. /package/build/{cookieHelper-47e34efa.js → cookieHelper-56a7d794.js} +0 -0
  189. /package/build/{dataTransform-fe677610.js → dataTransform-1578190f.js} +0 -0
  190. /package/build/esm/{BMI_BOYS.percentile.monthly-9e7fdff9.js → BMI_BOYS.percentile.monthly-c19f4e7c.js} +0 -0
  191. /package/build/esm/{BMI_BOYS.percentile.weekly-109aa882.js → BMI_BOYS.percentile.weekly-64ecc96e.js} +0 -0
  192. /package/build/esm/{BMI_BOYS.percentile.yearly-2f4904a4.js → BMI_BOYS.percentile.yearly-b3072dd2.js} +0 -0
  193. /package/build/esm/{BMI_BOYS.zscore.monthly-b7818505.js → BMI_BOYS.zscore.monthly-7397adb4.js} +0 -0
  194. /package/build/esm/{BMI_BOYS.zscore.weekly-8a8c6e60.js → BMI_BOYS.zscore.weekly-b4228f0f.js} +0 -0
  195. /package/build/esm/{BMI_BOYS.zscore.yearly-259d827f.js → BMI_BOYS.zscore.yearly-fbec987d.js} +0 -0
  196. /package/build/esm/{BMI_GIRLS.percentile.monthly-4c85f2e2.js → BMI_GIRLS.percentile.monthly-af6db555.js} +0 -0
  197. /package/build/esm/{BMI_GIRLS.percentile.weekly-52780dde.js → BMI_GIRLS.percentile.weekly-7ce86044.js} +0 -0
  198. /package/build/esm/{BMI_GIRLS.percentile.yearly-d552f7ff.js → BMI_GIRLS.percentile.yearly-728a4d6b.js} +0 -0
  199. /package/build/esm/{BMI_GIRLS.zscore.monthly-70736759.js → BMI_GIRLS.zscore.monthly-6f6f33de.js} +0 -0
  200. /package/build/esm/{BMI_GIRLS.zscore.weekly-09d9a498.js → BMI_GIRLS.zscore.weekly-23f23397.js} +0 -0
  201. /package/build/esm/{BMI_GIRLS.zscore.yearly-787a71f2.js → BMI_GIRLS.zscore.yearly-fd5e78dc.js} +0 -0
  202. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-3dc23858.js → HEAD CIRCUM_BOYS.percentile.monthly-b99d27b3.js} +0 -0
  203. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-fc90a435.js → HEAD CIRCUM_BOYS.percentile.weekly-554de12c.js} +0 -0
  204. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-d311328c.js → HEAD CIRCUM_BOYS.percentile.yearly-e2db0550.js} +0 -0
  205. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-a4105e49.js → HEAD CIRCUM_BOYS.zscore.monthly-e6254b70.js} +0 -0
  206. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-1602faff.js → HEAD CIRCUM_BOYS.zscore.weekly-85e9e0e2.js} +0 -0
  207. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-314d87f2.js → HEAD CIRCUM_BOYS.zscore.yearly-e58cec4d.js} +0 -0
  208. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-1755894d.js → HEAD CIRCUM_GIRLS.percentile.monthly-3d76a65b.js} +0 -0
  209. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-eff64869.js → HEAD CIRCUM_GIRLS.percentile.weekly-c0c51676.js} +0 -0
  210. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-ec836bd1.js → HEAD CIRCUM_GIRLS.percentile.yearly-10f4d9bb.js} +0 -0
  211. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-45824afc.js → HEAD CIRCUM_GIRLS.zscore.monthly-1ade5695.js} +0 -0
  212. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-3dda450c.js → HEAD CIRCUM_GIRLS.zscore.weekly-e0dec6e3.js} +0 -0
  213. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-47d31d6a.js → HEAD CIRCUM_GIRLS.zscore.yearly-abc7ddd2.js} +0 -0
  214. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-8e3e5eea.js → HEIGHT_BOYS.percentile.monthly-9a38d9b6.js} +0 -0
  215. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-4fd1e4f0.js → HEIGHT_BOYS.percentile.weekly-25092e6f.js} +0 -0
  216. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-a72efc6f.js → HEIGHT_BOYS.percentile.yearly-72dbc7cc.js} +0 -0
  217. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-bbc5d61a.js → HEIGHT_BOYS.zscore.monthly-5e8fff1a.js} +0 -0
  218. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-be4b43d4.js → HEIGHT_BOYS.zscore.weekly-6c778e57.js} +0 -0
  219. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-41fab017.js → HEIGHT_BOYS.zscore.yearly-cb8f1769.js} +0 -0
  220. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-5960d7bc.js → HEIGHT_GIRLS.percentile.monthly-c3a69e26.js} +0 -0
  221. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-842b0b35.js → HEIGHT_GIRLS.percentile.weekly-c233b340.js} +0 -0
  222. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-5e771144.js → HEIGHT_GIRLS.percentile.yearly-2d88d968.js} +0 -0
  223. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-a87662f6.js → HEIGHT_GIRLS.zscore.monthly-ed0b0fd2.js} +0 -0
  224. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-9974df51.js → HEIGHT_GIRLS.zscore.weekly-7abeb26d.js} +0 -0
  225. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-036899ae.js → HEIGHT_GIRLS.zscore.yearly-0ca5aab2.js} +0 -0
  226. /package/build/esm/{Onboarding-3631c6d1.js → Onboarding-03e07675.js} +0 -0
  227. /package/build/esm/{Visible-2bac67a9.js → Visible-8321b81d.js} +0 -0
  228. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-fb78f02c.js → WEIGHT_BOYS.percentile.monthly-1c993046.js} +0 -0
  229. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-a91de386.js → WEIGHT_BOYS.percentile.weekly-e5d59278.js} +0 -0
  230. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-ad66fdd2.js → WEIGHT_BOYS.percentile.yearly-b8822d69.js} +0 -0
  231. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-2f39cc76.js → WEIGHT_BOYS.zscore.monthly-a101acdc.js} +0 -0
  232. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-14cc15d4.js → WEIGHT_BOYS.zscore.weekly-664fff4e.js} +0 -0
  233. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-2041fbea.js → WEIGHT_BOYS.zscore.yearly-b066dd44.js} +0 -0
  234. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-3a60ac45.js → WEIGHT_GIRLS.percentile.monthly-1cc08b51.js} +0 -0
  235. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-d0fbecca.js → WEIGHT_GIRLS.percentile.weekly-0a5407e2.js} +0 -0
  236. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-3ae3438e.js → WEIGHT_GIRLS.percentile.yearly-78551541.js} +0 -0
  237. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-ed2bf2a6.js → WEIGHT_GIRLS.zscore.monthly-a40de4e8.js} +0 -0
  238. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-3328de54.js → WEIGHT_GIRLS.zscore.weekly-acbadfd5.js} +0 -0
  239. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-e78ef269.js → WEIGHT_GIRLS.zscore.yearly-39895e16.js} +0 -0
  240. /package/build/esm/{cookieHelper-2fe90225.js → cookieHelper-48427295.js} +0 -0
  241. /package/build/esm/{dataTransform-532e7457.js → dataTransform-747d4e52.js} +0 -0
  242. /package/build/esm/{index-7df304c0.js → index-81131e03.js} +0 -0
  243. /package/build/esm/{isProduction-85c6cb19.js → isProduction-1a2ee964.js} +0 -0
  244. /package/build/esm/{localizeNumberFormat-17475a32.js → localizeNumberFormat-128eb5ef.js} +0 -0
  245. /package/build/esm/{number-251f8529.js → number-1741390a.js} +0 -0
  246. /package/build/esm/{paths-46458204.js → paths-32761998.js} +0 -0
  247. /package/build/esm/{screenSizeContext-4ff53e25.js → screenSizeContext-823a0ed3.js} +0 -0
  248. /package/build/esm/{theme-b5489d82.js → theme-1fbc994e.js} +0 -0
  249. /package/build/esm/{translationsContext-be2e1844.js → translationsContext-93c2cf4e.js} +0 -0
  250. /package/build/esm/{tslib.es6-0405df6a.js → tslib.es6-ac3afa23.js} +0 -0
  251. /package/build/esm/{types-48c94135.js → types-3a5bac59.js} +0 -0
  252. /package/build/esm/{useIsInit-942b94fa.js → useIsInit-c52c83fe.js} +0 -0
  253. /package/build/esm/{useOutsideClick-3450a7a8.js → useOutsideClick-60f0a66c.js} +0 -0
  254. /package/build/esm/{useScrollbarSize-11faa525.js → useScrollbarSize-97b46895.js} +0 -0
  255. /package/build/esm/{useUniqueId-d35bf586.js → useUniqueId-85a1867a.js} +0 -0
  256. /package/build/{index-4046269f.js → index-17d4eae2.js} +0 -0
  257. /package/build/{isProduction-e1b7813f.js → isProduction-0720723e.js} +0 -0
  258. /package/build/{localizeNumberFormat-7424a97a.js → localizeNumberFormat-66256a35.js} +0 -0
  259. /package/build/{number-b3767f34.js → number-5d2dc1a0.js} +0 -0
  260. /package/build/{paths-2ac2ae14.js → paths-2840670d.js} +0 -0
  261. /package/build/{screenSizeContext-4d5786c6.js → screenSizeContext-5fb2e1e3.js} +0 -0
  262. /package/build/{theme-1a7c14fb.js → theme-430914fa.js} +0 -0
  263. /package/build/{translationsContext-f962ff63.js → translationsContext-91bf4ce0.js} +0 -0
  264. /package/build/{tslib.es6-0d31715f.js → tslib.es6-ada91747.js} +0 -0
  265. /package/build/{types-ef750ab6.js → types-00acdbca.js} +0 -0
  266. /package/build/{useIsInit-790b9962.js → useIsInit-8236e789.js} +0 -0
  267. /package/build/{useOutsideClick-81c62034.js → useOutsideClick-9f3c981c.js} +0 -0
  268. /package/build/{useScrollbarSize-29ac8766.js → useScrollbarSize-2ff4d0ee.js} +0 -0
  269. /package/build/{useUniqueId-86a9e1d4.js → useUniqueId-e09145f0.js} +0 -0
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("./tslib.es6-0d31715f.js"),t=require("react"),a=require("./useTranslations-2e7d64aa.js"),i=require("lodash/debounce"),o=require("./constants-fd82a887.js"),l=require("./index-537bccbe.js"),n=require("styled-components"),s=require("./index-e022af07.js"),r=require("./theme-1a7c14fb.js"),c=require("./screenSizeContext-4d5786c6.js"),d=require("react-loading-skeleton"),u=require("lodash/shuffle"),p=require("./useOutsideClick-81c62034.js"),h=require("./paths-2ac2ae14.js"),g=require("@mantine/core"),f=require("./index-a89b23de.js"),m=require("./cookieHelper-47e34efa.js"),C=require("./index-5b7dfda4.js"),b=require("string-format");function y(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function v(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,i.get?i:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var x=v(t),E=y(t),S=y(i),w=y(n),L=y(d),O=y(u),k=y(b);const I=e=>x.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),x.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 T(){const[e,a]=t.useState((()=>{if("undefined"==typeof window)return"unset";if(m.getCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE))return"granted";const e=!location.protocol.includes("https")&&"localhost"!==location.hostname;return!navigator.geolocation||e?"denied":"unset"})),[i,o]=t.useState((()=>{if("undefined"==typeof window)return null;const e=m.getCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE);if(e)try{return JSON.parse(e)}catch(e){console.log(e)}return null})),l=t.useCallback((function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition((e=>{const t={lat:""+Math.round(1e7*e.coords.latitude)/1e7,lng:""+Math.round(1e7*e.coords.longitude)/1e7};m.setCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE,JSON.stringify(t),{minutes:15}),o(t),a("granted")}),(()=>{m.deleteCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE),a("denied")}))}),[]);return t.useMemo((()=>({geoLocationPermission:e,geoLocationCoordinates:i,requestGeoLocation:l})),[e,i])}const j=w.default.div``,M=w.default.div`
1
+ "use strict";var e=require("./tslib.es6-ada91747.js"),t=require("react"),a=require("./useTranslations-1901ec76.js"),i=require("lodash/debounce"),o=require("./constants-dee18538.js"),l=require("./index-05e21683.js"),n=require("styled-components"),s=require("./index-5c8e9580.js"),r=require("./theme-430914fa.js"),c=require("./screenSizeContext-5fb2e1e3.js"),d=require("react-loading-skeleton"),u=require("lodash/shuffle"),p=require("./useOutsideClick-9f3c981c.js"),h=require("./paths-2840670d.js"),g=require("@mantine/core"),f=require("./index-06a0ee4f.js"),m=require("./cookieHelper-56a7d794.js"),C=require("./index-63626740.js"),b=require("string-format");function y(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function v(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,i.get?i:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var x=v(t),E=y(t),S=y(i),w=y(n),L=y(d),O=y(u),k=y(b);const I=e=>x.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),x.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 T(){const[e,a]=t.useState((()=>{if("undefined"==typeof window)return"unset";if(m.getCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE))return"granted";const e=!location.protocol.includes("https")&&"localhost"!==location.hostname;return!navigator.geolocation||e?"denied":"unset"})),[i,o]=t.useState((()=>{if("undefined"==typeof window)return null;const e=m.getCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE);if(e)try{return JSON.parse(e)}catch(e){console.log(e)}return null})),l=t.useCallback((function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition((e=>{const t={lat:""+Math.round(1e7*e.coords.latitude)/1e7,lng:""+Math.round(1e7*e.coords.longitude)/1e7};m.setCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE,JSON.stringify(t),{minutes:15}),o(t),a("granted")}),(()=>{m.deleteCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE),a("denied")}))}),[]);return t.useMemo((()=>({geoLocationPermission:e,geoLocationCoordinates:i,requestGeoLocation:l})),[e,i])}const j=w.default.div``,M=w.default.div`
2
2
  --searchbar-z-index: 305;
3
3
  &[data-is-modal='true'] {
4
4
  position: fixed;
@@ -35,7 +35,7 @@
35
35
  z-index: 2;
36
36
  }
37
37
  }
38
- `,F=({className:e,color:t})=>E.default.createElement("svg",{className:e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},E.default.createElement("path",{d:"M18 6L6 18",stroke:t||"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),E.default.createElement("path",{d:"M6 6L18 18",stroke:t||"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),_=({className:e,color:t})=>E.default.createElement("svg",{width:"14",height:"20",viewBox:"0 0 14 20",className:e},E.default.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"})),$=({className:e,color:t})=>E.default.createElement("svg",{className:e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},E.default.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"}),E.default.createElement("path",{d:"M20 20L16 16",stroke:t||"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),D=({width:e,height:t})=>E.default.createElement("svg",{width:e||30,height:t||30,viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},E.default.createElement("circle",{cx:"15",cy:"15",r:"15",fill:"#F7F9FC"})),B=w.default.li`
38
+ `,_=({className:e,color:t})=>E.default.createElement("svg",{className:e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},E.default.createElement("path",{d:"M18 6L6 18",stroke:t||"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),E.default.createElement("path",{d:"M6 6L18 18",stroke:t||"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),F=({className:e,color:t})=>E.default.createElement("svg",{width:"14",height:"20",viewBox:"0 0 14 20",className:e},E.default.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"})),$=({className:e,color:t})=>E.default.createElement("svg",{className:e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},E.default.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"}),E.default.createElement("path",{d:"M20 20L16 16",stroke:t||"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),D=({width:e,height:t})=>E.default.createElement("svg",{width:e||30,height:t||30,viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},E.default.createElement("circle",{cx:"15",cy:"15",r:"15",fill:"#F7F9FC"})),B=w.default.li`
39
39
  display: flex;
40
40
  align-items: center;
41
41
  gap: 12px;
@@ -79,7 +79,7 @@
79
79
  width: 100%;
80
80
  max-height: 600px;
81
81
  overflow-y: auto;
82
- `,H=w.default(_)`
82
+ `,H=w.default(F)`
83
83
  width: 12px;
84
84
  height: 18px;
85
85
  `,z=w.default.li`
@@ -158,7 +158,7 @@
158
158
  `,ue=w.default(s.Text)`
159
159
  color: ${r.theme.colors.secondaryDark};
160
160
  text-align: start;
161
- `,pe=({className:e,onLeftClick:t,headingText:a,onRightClick:i,iconLeft:o,textRight:l})=>E.default.createElement(se,{className:e},E.default.createElement(ce,{onClick:t},o||E.default.createElement(F,{color:r.theme.colors.gray800})),E.default.createElement(de,null,E.default.createElement(ue,{size:"md",type:"bold"},a)),E.default.createElement(re,{onClick:i},l&&E.default.createElement("p",null,l))),he={"en-PH":3,"tl-PH":2,"id-ID":3,"vi-VN":2,"zh-TW":0,"ms-MY":2},ge={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 fe;function me(e){const{selectedLocation:t,searchLocationKeywords:a}=e;return t&&a!==t.name?Object.assign(Object.assign({},e),{searchLocationKeywords:t.name}):e}function Ce(e,t){var a;switch(e.isDebug&&console.log("bookingSearchBar",{action:t,state:e}),t.type){case fe.NavigateTo:return Object.assign(Object.assign({},e),{navigateTo:t.payload,focused:"none",isMobileModalOpened:!1});case fe.ClickOutsideInputLocation:return e.isMobile||"location"!==e.focused?e:me(Object.assign(Object.assign({},e),{focused:"none"}));case fe.ClickOutsideInputSearch:return e.isMobile||"search"!==e.focused?e:Object.assign(Object.assign({},e),{focused:"none"});case fe.FocusInputLocation:{const t=Object.assign(Object.assign({},e),{focused:"location"});return(null===(a=e.selectedLocation)||void 0===a?void 0:a.id)===o.ID_OPTION_CURRENT_LOCATION&&(t.searchLocationKeywords=""),t}case fe.FocusInputSearch:const i=Object.assign(Object.assign({},e),{focused:"search"});return e.isMobile?me(i):i;case fe.ChangeInputLocation:return Object.assign(Object.assign({},e),{searchLocationKeywords:t.payload});case fe.ChangeInputSearch:{const a=t.payload;return Object.assign(Object.assign({},e),{searchKeywords:a,isLoadingSearchResults:a.trim().length>he[e.locale]})}case fe.SelectCurrentLocation:return Object.assign(Object.assign({},e),{focused:"none",selectedLocation:t.payload,searchLocationKeywords:t.payload.name});case fe.ClearInputLocation:return Object.assign(Object.assign({},e),{focused:"location",cities:e.initialCities,searchLocationKeywords:""});case fe.ClearInputSearch:return Object.assign(Object.assign({},e),{focused:"search",searchKeywords:""});case fe.SelectLocation:return Object.assign(Object.assign({},e),{focused:"none",selectedLocation:t.payload,searchLocationKeywords:t.payload.name});case fe.SelectSearchResult:return Object.assign(Object.assign({},e),{searchKeywords:t.payload.name,isMobileModalOpened:!1,focused:"none",navigateTo:t.payload.url});case fe.FetchCitiesStart:return Object.assign(Object.assign({},e),{isLoadingCities:!0});case fe.FetchCitiesFinish:return Object.assign(Object.assign({},e),{isLoadingCities:!1});case fe.FetchSearchResultsStart:return Object.assign(Object.assign({},e),{isLoadingSearchResults:!0});case fe.FetchSearchResultsFinish:return Object.assign(Object.assign({},e),{isLoadingSearchResults:!1});case fe.FetchSearchResultsComplete:{const a=Object.assign(Object.assign({},e),{searchResults:t.payload});return 0===e.initialSearchResults.length&&(a.initialSearchResults=t.payload),a}case fe.FetchCitiesByGeoIpComplete:{let{cities:a}=t.payload;const{default:i}=t.payload;a=a.filter((e=>e.id!==i.id)),a.unshift(i),e.initialSelectedCity&&!a.find((t=>t.id===e.initialSelectedCity.id))&&a.unshift(e.initialSelectedCity);const o=Object.assign(Object.assign({},e),{defaultCity:i,initialCities:a,cities:a});return"denied"!==e.geoLocationPermission||e.initialSelectedCity||(o.selectedLocation=i,o.searchLocationKeywords=i.name),o}case fe.FetchCitiesByKeywordComplete:return Object.assign(Object.assign({},e),{cities:t.payload});case fe.DisplayInitialCities:return Object.assign(Object.assign({},e),{cities:e.initialCities});case fe.DisplayInitialSearchResults:return Object.assign(Object.assign({},e),{searchResults:e.initialSearchResults,isLoadingSearchResults:!1});case fe.GrantGeoLocationPermission:return Object.assign(Object.assign({},e),{geoLocationPermission:"granted",geoLocationCoordinates:t.payload});case fe.DenyGeoLocationPermission:return Object.assign(Object.assign({},e),{geoLocationPermission:"denied",geoLocationCoordinates:null});case fe.OpenMobileModal:return Object.assign(Object.assign({},e),{isMobileModalOpened:!0});case fe.CloseMobileModal:return Object.assign(Object.assign({},e),{isMobileModalOpened:!1});case fe.UpdateInitialSearchValue:return Object.assign(Object.assign({},e),{searchKeywords:t.payload});case fe.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"}(fe||(fe={}));const be=w.default.div`
161
+ `,pe=({className:e,onLeftClick:t,headingText:a,onRightClick:i,iconLeft:o,textRight:l})=>E.default.createElement(se,{className:e},E.default.createElement(ce,{onClick:t},o||E.default.createElement(_,{color:r.theme.colors.gray800})),E.default.createElement(de,null,E.default.createElement(ue,{size:"md",type:"bold"},a)),E.default.createElement(re,{onClick:i},l&&E.default.createElement("p",null,l))),he={"en-PH":3,"tl-PH":2,"id-ID":3,"vi-VN":2,"zh-TW":0,"ms-MY":2},ge={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 fe;function me(e){const{selectedLocation:t,searchLocationKeywords:a}=e;return t&&a!==t.name?Object.assign(Object.assign({},e),{searchLocationKeywords:t.name}):e}function Ce(e,t){var a;switch(e.isDebug&&console.log("bookingSearchBar",{action:t,state:e}),t.type){case fe.NavigateTo:return Object.assign(Object.assign({},e),{navigateTo:t.payload,focused:"none",isMobileModalOpened:!1});case fe.ClickOutsideInputLocation:return e.isMobile||"location"!==e.focused?e:me(Object.assign(Object.assign({},e),{focused:"none"}));case fe.ClickOutsideInputSearch:return e.isMobile||"search"!==e.focused?e:Object.assign(Object.assign({},e),{focused:"none"});case fe.FocusInputLocation:{const t=Object.assign(Object.assign({},e),{focused:"location"});return(null===(a=e.selectedLocation)||void 0===a?void 0:a.id)===o.ID_OPTION_CURRENT_LOCATION&&(t.searchLocationKeywords=""),t}case fe.FocusInputSearch:const i=Object.assign(Object.assign({},e),{focused:"search"});return e.isMobile?me(i):i;case fe.ChangeInputLocation:return Object.assign(Object.assign({},e),{searchLocationKeywords:t.payload});case fe.ChangeInputSearch:{const a=t.payload;return Object.assign(Object.assign({},e),{searchKeywords:a,isLoadingSearchResults:a.trim().length>he[e.locale]})}case fe.SelectCurrentLocation:return Object.assign(Object.assign({},e),{focused:"none",selectedLocation:t.payload,searchLocationKeywords:t.payload.name});case fe.ClearInputLocation:return Object.assign(Object.assign({},e),{focused:"location",cities:e.initialCities,searchLocationKeywords:""});case fe.ClearInputSearch:return Object.assign(Object.assign({},e),{focused:"search",searchKeywords:""});case fe.SelectLocation:return Object.assign(Object.assign({},e),{focused:"none",selectedLocation:t.payload,searchLocationKeywords:t.payload.name});case fe.SelectSearchResult:return Object.assign(Object.assign({},e),{searchKeywords:t.payload.name,isMobileModalOpened:!1,focused:"none",navigateTo:t.payload.url});case fe.FetchCitiesStart:return Object.assign(Object.assign({},e),{isLoadingCities:!0});case fe.FetchCitiesFinish:return Object.assign(Object.assign({},e),{isLoadingCities:!1});case fe.FetchSearchResultsStart:return Object.assign(Object.assign({},e),{isLoadingSearchResults:!0});case fe.FetchSearchResultsFinish:return Object.assign(Object.assign({},e),{isLoadingSearchResults:!1});case fe.FetchSearchResultsComplete:{const a=Object.assign(Object.assign({},e),{searchResults:t.payload});return 0===e.initialSearchResults.length&&(a.initialSearchResults=t.payload),a}case fe.FetchCitiesByGeoIpComplete:{let{cities:a}=t.payload;const{default:i}=t.payload;a=a.filter((e=>e.id!==i.id)),a.unshift(i),e.initialSelectedCity&&!a.find((t=>t.id===e.initialSelectedCity.id))&&a.unshift(e.initialSelectedCity);const o=Object.assign(Object.assign({},e),{defaultCity:i,initialCities:a,cities:a});return"denied"!==e.geoLocationPermission||e.initialSelectedCity||(o.selectedLocation=i,o.searchLocationKeywords=i.name),o}case fe.FetchCitiesByKeywordComplete:return Object.assign(Object.assign({},e),{cities:t.payload});case fe.DisplayInitialCities:return Object.assign(Object.assign({},e),{cities:e.initialCities});case fe.DisplayInitialSearchResults:return Object.assign(Object.assign({},e),{searchResults:e.initialSearchResults,isLoadingSearchResults:!1});case fe.GrantGeoLocationPermission:return Object.assign(Object.assign({},e),{geoLocationPermission:"granted",geoLocationCoordinates:t.payload});case fe.DenyGeoLocationPermission:return Object.assign(Object.assign({},e),{geoLocationPermission:"denied",geoLocationCoordinates:null});case fe.OpenMobileModal:return Object.assign(Object.assign({},e),{isMobileModalOpened:!0});case fe.CloseMobileModal:return Object.assign(Object.assign({},e),{isMobileModalOpened:!1});case fe.UpdateInitialSearchValue:return Object.assign(Object.assign({},e),{searchKeywords:t.payload});case fe.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"}(fe||(fe={}));const be=w.default.div`
162
162
  display: flex;
163
163
  gap: 16px;
164
164
  ${c.MediaQueries.mbDown} {
@@ -220,7 +220,7 @@
220
220
  }
221
221
  `,Le=w.default(s.Text)`
222
222
  font-weight: ${({theme:e})=>e.sizes.fwSemiBold};
223
- `,Oe=({onClick:e})=>{const{t:t}=a.useTranslations(),i=t("booking.searchBar.searchButton");return E.default.createElement(we,{onClick:e,title:i},E.default.createElement(Se,null),E.default.createElement(Le,{size:"s3",color:"white"},i))};function ke({isMobile:e,state:i,dispatch:l,debouncedFetchCitiesByKeyword:n,debouncedFetchSearchResults:s,focusLocationInput:c,focusSearchInput:d,renderLocationResults:u,renderSearchResults:h,locationTrackingAttributes:g,trackingAttributes:f,onSearch:m,initalSearchValue:C}){const b=t.useRef(null),y=t.useRef(null),{focused:v,searchLocationKeywords:x,geoLocationPermission:S,selectedLocation:w,searchKeywords:L,inputSearchPlaceholder:O}=i,{t:k}=a.useTranslations();oe({wrapperRef:y,disabled:!!O}),p.useOutsideClick(b,(()=>{e||l({type:fe.ClickOutsideInputLocation})})),p.useOutsideClick(y,(()=>{e||l({type:fe.ClickOutsideInputSearch})}));const I=t.useMemo((()=>"granted"===S&&(null==w?void 0:w.id)===o.ID_OPTION_CURRENT_LOCATION?r.theme.colors.primaryBase:r.theme.colors.gray400),[S,w]),T=t.useCallback((function(e){l({type:fe.ChangeInputSearch,payload:e}),"function"!=typeof m&&(e.trim().length>he[i.locale]||C?s(e.trim(),i):(s.cancel(),l({type:fe.DisplayInitialSearchResults})))}),[l,i]),j=t.useCallback((function(e){l({type:fe.ChangeInputLocation,payload:e}),e.trim().length>he[i.locale]?n(e.trim()):(n.cancel(),l({type:fe.DisplayInitialCities}))}),[n,l]);return E.default.createElement(be,null,E.default.createElement(ve,{ref:b},E.default.createElement(N,{inputClassName:"location"===v?"focused":void 0,placeholder:k("booking.searchBar.locationPlaceholder"),autoComplete:"off",name:"search-location",displayIcon:E.default.createElement(_,{className:"location-pin-icon",color:I}),actionIcon:E.default.createElement(Ee,{color:r.theme.colors.gray300,className:""!==x?"shown":""}),onActionClick:function(){l({type:fe.ClearInputLocation}),n.cancel(),c()},value:x,onChange:j,onFocus:()=>l({type:fe.FocusInputLocation}),size:"md",trackingAttributes:g}),!e&&u()),E.default.createElement(xe,{ref:y},E.default.createElement(N,{placeholder:O||k("booking.searchBar.searchInput.placeholder"),autoComplete:"off",name:"search-results",actionIcon:E.default.createElement(Ee,{color:r.theme.colors.gray300,className:""!==L?"shown":""}),onActionClick:function(){l({type:fe.ClearInputSearch}),s.cancel(),s("",i),d()},value:L,onChange:T,onFocus:()=>l({type:fe.FocusInputSearch}),inputClassName:"search"===v?"focused":void 0,size:"md",trackingAttributes:f,onKeyPress:e=>{i.autoCompleteDisabled&&"Enter"===e.key&&m&&m({cityId:i.selectedLocation.id,keyword:L})},enterKeyHint:i.autoCompleteDisabled?"search":void 0}),!e&&h()),i.autoCompleteDisabled&&!i.isMobile&&E.default.createElement(Oe,{onClick:()=>{m({cityId:i.selectedLocation.id,keyword:L})}}))}const Ie=()=>E.default.createElement("svg",{width:"14",height:"18",viewBox:"0 0 14 18"},E.default.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"})),Te=()=>E.default.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18"},E.default.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"})),je=()=>E.default.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17"},E.default.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"})),Me=()=>E.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16"},E.default.createElement("path",{d:"M3.83333 0.5C2.94928 0.5 2.10143 0.851189 1.47631 1.47631C0.851189 2.10143 0.5 2.94928 0.5 3.83333C0.5 4.71739 0.851189 5.56523 1.47631 6.19036C2.10143 6.81548 2.94928 7.16667 3.83333 7.16667C4.71739 7.16667 5.56523 6.81548 6.19036 6.19036C6.81548 5.56523 7.16667 4.71739 7.16667 3.83333C7.16667 2.94928 6.81548 2.10143 6.19036 1.47631C5.56523 0.851189 4.71739 0.5 3.83333 0.5V0.5ZM10.5 0.5C9.57917 0.5 8.83333 1.24583 8.83333 2.16667V5.5C8.83333 6.42083 9.57917 7.16667 10.5 7.16667H13.8333C14.7542 7.16667 15.5 6.42083 15.5 5.5V2.16667C15.5 1.24583 14.7542 0.5 13.8333 0.5H10.5ZM3.83333 8.83333C2.94928 8.83333 2.10143 9.18452 1.47631 9.80964C0.851189 10.4348 0.5 11.2826 0.5 12.1667C0.5 13.0507 0.851189 13.8986 1.47631 14.5237C2.10143 15.1488 2.94928 15.5 3.83333 15.5C4.71739 15.5 5.56523 15.1488 6.19036 14.5237C6.81548 13.8986 7.16667 13.0507 7.16667 12.1667C7.16667 11.2826 6.81548 10.4348 6.19036 9.80964C5.56523 9.18452 4.71739 8.83333 3.83333 8.83333V8.83333ZM12.1667 8.83333C11.2826 8.83333 10.4348 9.18452 9.80964 9.80964C9.18452 10.4348 8.83333 11.2826 8.83333 12.1667C8.83333 13.0507 9.18452 13.8986 9.80964 14.5237C10.4348 15.1488 11.2826 15.5 12.1667 15.5C13.0507 15.5 13.8986 15.1488 14.5237 14.5237C15.1488 13.8986 15.5 13.0507 15.5 12.1667C15.5 11.2826 15.1488 10.4348 14.5237 9.80964C13.8986 9.18452 13.0507 8.83333 12.1667 8.83333V8.83333Z",fill:"#9AA2AC"})),Re=w.default.header`
223
+ `,Oe=({onClick:e})=>{const{t:t}=a.useTranslations(),i=t("booking.searchBar.searchButton");return E.default.createElement(we,{onClick:e,title:i},E.default.createElement(Se,null),E.default.createElement(Le,{size:"s3",color:"white"},i))};function ke({isMobile:e,state:i,dispatch:l,debouncedFetchCitiesByKeyword:n,debouncedFetchSearchResults:s,focusLocationInput:c,focusSearchInput:d,renderLocationResults:u,renderSearchResults:h,locationTrackingAttributes:g,trackingAttributes:f,onSearch:m,initalSearchValue:C}){const b=t.useRef(null),y=t.useRef(null),{focused:v,searchLocationKeywords:x,geoLocationPermission:S,selectedLocation:w,searchKeywords:L,inputSearchPlaceholder:O}=i,{t:k}=a.useTranslations();oe({wrapperRef:y,disabled:!!O}),p.useOutsideClick(b,(()=>{e||l({type:fe.ClickOutsideInputLocation})})),p.useOutsideClick(y,(()=>{e||l({type:fe.ClickOutsideInputSearch})}));const I=t.useMemo((()=>"granted"===S&&(null==w?void 0:w.id)===o.ID_OPTION_CURRENT_LOCATION?r.theme.colors.primaryBase:r.theme.colors.gray400),[S,w]),T=t.useCallback((function(e){l({type:fe.ChangeInputSearch,payload:e}),"function"!=typeof m&&(e.trim().length>he[i.locale]||C?s(e.trim(),i):(s.cancel(),l({type:fe.DisplayInitialSearchResults})))}),[l,i]),j=t.useCallback((function(e){l({type:fe.ChangeInputLocation,payload:e}),e.trim().length>he[i.locale]?n(e.trim()):(n.cancel(),l({type:fe.DisplayInitialCities}))}),[n,l]);return E.default.createElement(be,null,E.default.createElement(ve,{ref:b},E.default.createElement(N,{inputClassName:"location"===v?"focused":void 0,placeholder:k("booking.searchBar.locationPlaceholder"),autoComplete:"off",name:"search-location",displayIcon:E.default.createElement(F,{className:"location-pin-icon",color:I}),actionIcon:E.default.createElement(Ee,{color:r.theme.colors.gray300,className:""!==x?"shown":""}),onActionClick:function(){l({type:fe.ClearInputLocation}),n.cancel(),c()},value:x,onChange:j,onFocus:()=>l({type:fe.FocusInputLocation}),size:"md",trackingAttributes:g}),!e&&u()),E.default.createElement(xe,{ref:y},E.default.createElement(N,{placeholder:O||k("booking.searchBar.searchInput.placeholder"),autoComplete:"off",name:"search-results",actionIcon:E.default.createElement(Ee,{color:r.theme.colors.gray300,className:""!==L?"shown":""}),onActionClick:function(){l({type:fe.ClearInputSearch}),s.cancel(),s("",i),d()},value:L,onChange:T,onFocus:()=>l({type:fe.FocusInputSearch}),inputClassName:"search"===v?"focused":void 0,size:"md",trackingAttributes:f,onKeyPress:e=>{i.autoCompleteDisabled&&"Enter"===e.key&&m&&m({cityId:i.selectedLocation.id,keyword:L})},enterKeyHint:i.autoCompleteDisabled?"search":void 0}),!e&&h()),i.autoCompleteDisabled&&!i.isMobile&&E.default.createElement(Oe,{onClick:()=>{m({cityId:i.selectedLocation.id,keyword:L})}}))}const Ie=()=>E.default.createElement("svg",{width:"14",height:"18",viewBox:"0 0 14 18"},E.default.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"})),Te=()=>E.default.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18"},E.default.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"})),je=()=>E.default.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17"},E.default.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"})),Me=()=>E.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16"},E.default.createElement("path",{d:"M3.83333 0.5C2.94928 0.5 2.10143 0.851189 1.47631 1.47631C0.851189 2.10143 0.5 2.94928 0.5 3.83333C0.5 4.71739 0.851189 5.56523 1.47631 6.19036C2.10143 6.81548 2.94928 7.16667 3.83333 7.16667C4.71739 7.16667 5.56523 6.81548 6.19036 6.19036C6.81548 5.56523 7.16667 4.71739 7.16667 3.83333C7.16667 2.94928 6.81548 2.10143 6.19036 1.47631C5.56523 0.851189 4.71739 0.5 3.83333 0.5V0.5ZM10.5 0.5C9.57917 0.5 8.83333 1.24583 8.83333 2.16667V5.5C8.83333 6.42083 9.57917 7.16667 10.5 7.16667H13.8333C14.7542 7.16667 15.5 6.42083 15.5 5.5V2.16667C15.5 1.24583 14.7542 0.5 13.8333 0.5H10.5ZM3.83333 8.83333C2.94928 8.83333 2.10143 9.18452 1.47631 9.80964C0.851189 10.4348 0.5 11.2826 0.5 12.1667C0.5 13.0507 0.851189 13.8986 1.47631 14.5237C2.10143 15.1488 2.94928 15.5 3.83333 15.5C4.71739 15.5 5.56523 15.1488 6.19036 14.5237C6.81548 13.8986 7.16667 13.0507 7.16667 12.1667C7.16667 11.2826 6.81548 10.4348 6.19036 9.80964C5.56523 9.18452 4.71739 8.83333 3.83333 8.83333V8.83333ZM12.1667 8.83333C11.2826 8.83333 10.4348 9.18452 9.80964 9.80964C9.18452 10.4348 8.83333 11.2826 8.83333 12.1667C8.83333 13.0507 9.18452 13.8986 9.80964 14.5237C10.4348 15.1488 11.2826 15.5 12.1667 15.5C13.0507 15.5 13.8986 15.1488 14.5237 14.5237C15.1488 13.8986 15.5 13.0507 15.5 12.1667C15.5 11.2826 15.1488 10.4348 14.5237 9.80964C13.8986 9.18452 13.0507 8.83333 12.1667 8.83333V8.83333Z",fill:"#9AA2AC"})),Re=w.default.header`
224
224
  display: flex;
225
225
  justify-content: space-between;
226
226
  padding: 12px 24px;
@@ -242,7 +242,7 @@
242
242
  flex: 1;
243
243
  cursor: pointer;
244
244
  text-align: end;
245
- `,Fe=w.default.section`
245
+ `,_e=w.default.section`
246
246
  padding: 12px 16px;
247
247
  --rowGap: 16px;
248
248
  --graphicSize: 32px;
@@ -250,7 +250,7 @@
250
250
  ${c.MediaQueries.tdUp} {
251
251
  --rowGap: 8px;
252
252
  }
253
- `,_e=w.default.ul`
253
+ `,Fe=w.default.ul`
254
254
  --gap: 16px;
255
255
  ${c.MediaQueries.tdUp} {
256
256
  --gap: 8px;
@@ -324,7 +324,7 @@
324
324
  `,ze=w.default.div`
325
325
  display: grid;
326
326
  place-items: center;
327
- `,Ge={doctors:({width:e,height:t})=>E.default.createElement("svg",{width:e||32,height:t||32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},E.default.createElement("g",{clipPath:"url(#clip0_14712_400114)"},E.default.createElement("rect",{width:"32",height:"32",rx:"16",fill:"#E4E8EC"}),E.default.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"})),E.default.createElement("defs",null,E.default.createElement("clipPath",{id:"clip0_14712_400114"},E.default.createElement("rect",{width:"32",height:"32",rx:"16",fill:"white"})))),services:({width:e,height:t})=>E.default.createElement("svg",{width:e||30,height:t||30,viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},E.default.createElement("circle",{cx:"15",cy:"15",r:"15",fill:"#F7F9FC"}),E.default.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"}))},Ze=({type:e,item:a,imageUrl:i,className:o,onClickItem:l})=>{const n=t.useMemo((()=>{const t=Ge[e]||D;return E.default.createElement(t,{width:32,height:"services"===e?32:24})}),[e]);return E.default.createElement(De,{onClick:()=>l&&l(a),onKeyDown:e=>{"Enter"!==e.key&&"Space"!==e.key||l&&l(a)},tabIndex:0,role:"button",className:o},E.default.createElement(Ke,null,"hospitals"===e?E.default.createElement(He,{width:"12",height:"16",viewBox:"0 0 12 16"},E.default.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"})):E.default.createElement(Be,{type:e},i?E.default.createElement("img",{src:i,width:32,height:"services"===e?32:24,loading:"lazy"}):n)),E.default.createElement(Ve,{color:r.theme.colors.gray800,size:"p3"},a.name))},Ue=({type:e,data:i,state:l,dispatch:n,itemsToShow:c,itemsToShowDesktop:d,isMobile:u,isLoading:p,keyword:h,isNavResultItem:g})=>{const[f,m]=t.useState(!1),{t:C,locale:b}=a.useTranslations(),{selectedLocation:y,searchKeywords:v}=l,x=t.useMemo((()=>o.LOCALIZED_SLUGS[b]),[b]),S="ms-MY"===b,w=t.useMemo((()=>({doctors:{name:C("booking.searchPopup.doctors"),icon:E.default.createElement(Ie,null),slug:x.DOCTOR},services:{name:C("booking.searchPopup.services"),icon:E.default.createElement(Te,null),slug:x.SERVICE},hospitals:{name:C("booking.searchPopup.hospitals"),icon:E.default.createElement(je,null),slug:x.HOSPITAL},specialties:{name:C("booking.searchPopup.specialties"),icon:E.default.createElement(Me,null),slug:x.SPECIALTIES}})),[e,x]),O=t.useMemo((()=>w[e].slug),[w]),k=u?c:d;function I(t){let a="";switch(e){case"specialties":a=`/${y.slug}/${w.doctors.slug}/${t.slug}`;break;case"services":a=`/${y.slug}/${O}/${t.slug}`;break;case"doctors":case"hospitals":a=`/${O}/${t.slug}-${t.id}`}a&&n({type:fe.SelectSearchResult,payload:{name:t.name,url:a}})}function T(t){return E.default.createElement(Ze,{key:t.id,item:t,type:e,imageUrl:t.logo||t.avatar||t.thumbnail,className:g?"":"not-nav",onClickItem:g&&I})}return E.default.createElement("section",null,E.default.createElement(Re,null,E.default.createElement(Ae,null,w[e].icon,E.default.createElement(Ne,null,w[e].name)),(h.trim().length<=he[b]||S)&&E.default.createElement(Pe,{onClick:function(){let t="";switch(e){case"specialties":t=`/${O}`;break;case"services":case"doctors":case"hospitals":t=`/${y.slug}/${O}`}t&&n({type:fe.NavigateTo,payload:t})}},E.default.createElement(s.Text,{size:"p3",color:r.theme.colors.primaryBase},C("booking.searchPopup.seeAll")))),(p||i&&i.length>0)&&E.default.createElement(Fe,null,E.default.createElement(_e,null,p&&Array(2).fill(void 0).map(((t,a)=>E.default.createElement(De,{key:e+"loading"+a},E.default.createElement(Ke,null,E.default.createElement(ze,null,E.default.createElement(L.default,{height:14,width:"hospitals"===e?12:32,style:{maxWidth:"var(--graphicSize)",minHeight:"var(--graphicSize)"}}))),E.default.createElement(L.default,{width:120,height:24})))),!p&&i&&i.length>0&&i.slice(0,k).map(T)),E.default.createElement(_e,{isShown:f,isMore:!0},i.slice(k,-1).map(T)),"specialties"===e&&k<i.length&&!p&&E.default.createElement("button",{onClick:()=>m(!f)},E.default.createElement($e,{size:"p3",color:r.theme.colors.primaryBase},C(f?"booking.searchPopup.seeLessSpecialties":"booking.searchPopup.seeMoreSpecialties"))),"specialties"!==e&&(k<i.length||S)&&!p&&h.trim().length>he[b]&&E.default.createElement("button",{onClick:function(){const{slug:t}=w[e],a=`/${y.slug}/${t}?q=${v}`;n({type:fe.NavigateTo,payload:a})}},E.default.createElement($e,{size:"p3",color:r.theme.colors.primaryBase},C(`booking.searchPopup.searchIn.${e}`,{name:h})))),!p&&0===(null==i?void 0:i.length)&&E.default.createElement(Fe,null,E.default.createElement(s.Text,{size:"sm",color:r.theme.colors.gray400},C("booking.searchBar.noResults"))))},Qe=w.default.section`
327
+ `,Ge={doctors:({width:e,height:t})=>E.default.createElement("svg",{width:e||32,height:t||32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},E.default.createElement("g",{clipPath:"url(#clip0_14712_400114)"},E.default.createElement("rect",{width:"32",height:"32",rx:"16",fill:"#E4E8EC"}),E.default.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"})),E.default.createElement("defs",null,E.default.createElement("clipPath",{id:"clip0_14712_400114"},E.default.createElement("rect",{width:"32",height:"32",rx:"16",fill:"white"})))),services:({width:e,height:t})=>E.default.createElement("svg",{width:e||30,height:t||30,viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},E.default.createElement("circle",{cx:"15",cy:"15",r:"15",fill:"#F7F9FC"}),E.default.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"}))},Ze=({type:e,item:a,imageUrl:i,className:o,onClickItem:l})=>{const n=t.useMemo((()=>{const t=Ge[e]||D;return E.default.createElement(t,{width:32,height:"services"===e?32:24})}),[e]);return E.default.createElement(De,{onClick:()=>l&&l(a),onKeyDown:e=>{"Enter"!==e.key&&"Space"!==e.key||l&&l(a)},tabIndex:0,role:"button",className:o},E.default.createElement(Ke,null,"hospitals"===e?E.default.createElement(He,{width:"12",height:"16",viewBox:"0 0 12 16"},E.default.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"})):E.default.createElement(Be,{type:e},i?E.default.createElement("img",{src:i,width:32,height:"services"===e?32:24,loading:"lazy"}):n)),E.default.createElement(Ve,{color:r.theme.colors.gray800,size:"p3"},a.name))},Ue=({type:e,data:i,state:l,dispatch:n,itemsToShow:c,itemsToShowDesktop:d,isMobile:u,isLoading:p,keyword:h,isNavResultItem:g})=>{const[f,m]=t.useState(!1),{t:C,locale:b}=a.useTranslations(),{selectedLocation:y,searchKeywords:v}=l,x=t.useMemo((()=>o.LOCALIZED_SLUGS[b]),[b]),S="ms-MY"===b,w=t.useMemo((()=>({doctors:{name:C("booking.searchPopup.doctors"),icon:E.default.createElement(Ie,null),slug:x.DOCTOR},services:{name:C("booking.searchPopup.services"),icon:E.default.createElement(Te,null),slug:x.SERVICE},hospitals:{name:C("booking.searchPopup.hospitals"),icon:E.default.createElement(je,null),slug:x.HOSPITAL},specialties:{name:C("booking.searchPopup.specialties"),icon:E.default.createElement(Me,null),slug:x.SPECIALTIES}})),[e,x]),O=t.useMemo((()=>w[e].slug),[w]),k=u?c:d;function I(t){let a="";switch(e){case"specialties":a=`/${y.slug}/${w.doctors.slug}/${t.slug}`;break;case"services":a=`/${y.slug}/${O}/${t.slug}`;break;case"doctors":case"hospitals":a=`/${O}/${t.slug}-${t.id}`}a&&n({type:fe.SelectSearchResult,payload:{name:t.name,url:a}})}function T(t){return E.default.createElement(Ze,{key:t.id,item:t,type:e,imageUrl:t.logo||t.avatar||t.thumbnail,className:g?"":"not-nav",onClickItem:g&&I})}return E.default.createElement("section",null,E.default.createElement(Re,null,E.default.createElement(Ae,null,w[e].icon,E.default.createElement(Ne,null,w[e].name)),(h.trim().length<=he[b]||S)&&E.default.createElement(Pe,{onClick:function(){let t="";switch(e){case"specialties":t=`/${O}`;break;case"services":case"doctors":case"hospitals":t=`/${y.slug}/${O}`}t&&n({type:fe.NavigateTo,payload:t})}},E.default.createElement(s.Text,{size:"p3",color:r.theme.colors.primaryBase},C("booking.searchPopup.seeAll")))),(p||i&&i.length>0)&&E.default.createElement(_e,null,E.default.createElement(Fe,null,p&&Array(2).fill(void 0).map(((t,a)=>E.default.createElement(De,{key:e+"loading"+a},E.default.createElement(Ke,null,E.default.createElement(ze,null,E.default.createElement(L.default,{height:14,width:"hospitals"===e?12:32,style:{maxWidth:"var(--graphicSize)",minHeight:"var(--graphicSize)"}}))),E.default.createElement(L.default,{width:120,height:24})))),!p&&i&&i.length>0&&i.slice(0,k).map(T)),E.default.createElement(Fe,{isShown:f,isMore:!0},i.slice(k,-1).map(T)),"specialties"===e&&k<i.length&&!p&&E.default.createElement("button",{onClick:()=>m(!f)},E.default.createElement($e,{size:"p3",color:r.theme.colors.primaryBase},C(f?"booking.searchPopup.seeLessSpecialties":"booking.searchPopup.seeMoreSpecialties"))),"specialties"!==e&&(k<i.length||S)&&!p&&h.trim().length>he[b]&&E.default.createElement("button",{onClick:function(){const{slug:t}=w[e],a=`/${y.slug}/${t}?q=${v}`;n({type:fe.NavigateTo,payload:a})}},E.default.createElement($e,{size:"p3",color:r.theme.colors.primaryBase},C(`booking.searchPopup.searchIn.${e}`,{name:h})))),!p&&0===(null==i?void 0:i.length)&&E.default.createElement(_e,null,E.default.createElement(s.Text,{size:"sm",color:r.theme.colors.gray400},C("booking.searchBar.noResults"))))},Qe=w.default.section`
328
328
  background-color: white;
329
329
  border-radius: 4px;
330
330
  position: absolute;
@@ -556,7 +556,7 @@
556
556
  &[data-is-denied='true'] {
557
557
  cursor: not-allowed;
558
558
  }
559
- `;w.default(_)`
559
+ `;w.default(F)`
560
560
  width: 12px;
561
561
  height: 18px;
562
562
  `;const ft=()=>E.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},E.default.createElement("path",{d:"M8.98307 14.3333C7.87196 14.3333 6.92752 13.9445 6.14974 13.1667C5.37196 12.3889 4.98307 11.4445 4.98307 10.3333V9.96668C4.08307 9.85557 3.33041 9.45557 2.72507 8.76668C2.1193 8.07779 1.81641 7.26668 1.81641 6.33334V3.10001C1.81641 2.93334 1.87463 2.79157 1.99107 2.67468C2.10796 2.55823 2.24974 2.50001 2.41641 2.50001H3.81641V2.33334C3.81641 2.1889 3.86374 2.06934 3.95841 1.97468C4.05263 1.88045 4.17196 1.83334 4.31641 1.83334C4.46085 1.83334 4.58041 1.88045 4.67507 1.97468C4.7693 2.06934 4.81641 2.1889 4.81641 2.33334V3.66668C4.81641 3.81112 4.7693 3.93045 4.67507 4.02468C4.58041 4.11934 4.46085 4.16668 4.31641 4.16668C4.17196 4.16668 4.05263 4.11934 3.95841 4.02468C3.86374 3.93045 3.81641 3.81112 3.81641 3.66668V3.50001H2.81641V6.33334C2.81641 7.06668 3.07752 7.69445 3.59974 8.21668C4.12196 8.7389 4.74974 9.00001 5.48307 9.00001C6.21641 9.00001 6.84418 8.7389 7.36641 8.21668C7.88863 7.69445 8.14974 7.06668 8.14974 6.33334V3.50001H7.14974V3.66668C7.14974 3.81112 7.10263 3.93045 7.00841 4.02468C6.91374 4.11934 6.79418 4.16668 6.64974 4.16668C6.5053 4.16668 6.38596 4.11934 6.29174 4.02468C6.19707 3.93045 6.14974 3.81112 6.14974 3.66668V2.33334C6.14974 2.1889 6.19707 2.06934 6.29174 1.97468C6.38596 1.88045 6.5053 1.83334 6.64974 1.83334C6.79418 1.83334 6.91374 1.88045 7.00841 1.97468C7.10263 2.06934 7.14974 2.1889 7.14974 2.33334V2.50001H8.54974C8.71641 2.50001 8.85818 2.55823 8.97507 2.67468C9.09152 2.79157 9.14974 2.93334 9.14974 3.10001V6.33334C9.14974 7.26668 8.84707 8.07779 8.24174 8.76668C7.63596 9.45557 6.88307 9.85557 5.98307 9.96668V10.3333C5.98307 11.1667 6.27485 11.8751 6.85841 12.4587C7.44152 13.0418 8.14974 13.3333 8.98307 13.3333C9.81641 13.3333 10.5249 13.0418 11.1084 12.4587C11.6915 11.8751 11.9831 11.1667 11.9831 10.3333V9.25001C11.6386 9.1389 11.3526 8.93601 11.1251 8.64134C10.8971 8.34712 10.7831 8.01112 10.7831 7.63334C10.7831 7.15557 10.9497 6.75001 11.2831 6.41668C11.6164 6.08334 12.0164 5.91668 12.4831 5.91668C12.9609 5.91668 13.3664 6.08334 13.6997 6.41668C14.0331 6.75001 14.1997 7.15557 14.1997 7.63334C14.1997 8.01112 14.086 8.34712 13.8584 8.64134C13.6304 8.93601 13.3386 9.1389 12.9831 9.25001V10.3333C12.9831 11.4445 12.5942 12.3889 11.8164 13.1667C11.0386 13.9445 10.0942 14.3333 8.98307 14.3333ZM12.4831 8.33334C12.6831 8.33334 12.8526 8.26401 12.9917 8.12534C13.1304 7.98623 13.1997 7.82223 13.1997 7.63334C13.1997 7.43334 13.1304 7.26401 12.9917 7.12534C12.8526 6.98623 12.6831 6.91668 12.4831 6.91668C12.2831 6.91668 12.1164 6.98623 11.9831 7.12534C11.8497 7.26401 11.7831 7.43334 11.7831 7.63334C11.7831 7.82223 11.8497 7.98623 11.9831 8.12534C12.1164 8.26401 12.2831 8.33334 12.4831 8.33334Z",fill:"#595959"})),mt=()=>E.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},E.default.createElement("path",{d:"M6.86836 9.26489V10.2386C6.86836 10.509 6.96294 10.7389 7.15209 10.9283C7.34124 11.1176 7.57093 11.2122 7.84114 11.2122C8.11135 11.2122 8.34133 11.1176 8.53106 10.9283C8.7208 10.7389 8.81567 10.509 8.81567 10.2386V9.26489H9.78936C10.0598 9.26489 10.2897 9.17031 10.479 8.98116C10.6684 8.79201 10.763 8.56233 10.763 8.29211C10.763 8.0219 10.6684 7.79192 10.479 7.60219C10.2897 7.41245 10.0598 7.31758 9.78936 7.31758H8.81567V6.34389C8.81567 6.07343 8.72109 5.84354 8.53194 5.65422C8.34279 5.4649 8.11311 5.37024 7.84289 5.37024C7.57268 5.37024 7.3427 5.4649 7.15297 5.65422C6.96323 5.84354 6.86836 6.07343 6.86836 6.34389V7.31758H5.89467C5.62421 7.31758 5.39432 7.41216 5.205 7.60131C5.01568 7.79046 4.92102 8.02014 4.92102 8.29036C4.92102 8.56057 5.01568 8.79055 5.205 8.98028C5.39432 9.17002 5.62421 9.26489 5.89467 9.26489H6.86836ZM3.40809 14.1333C3.02086 14.1333 2.68938 13.9954 2.41364 13.7196C2.13788 13.4439 2 13.1124 2 12.7252V6.07426C2 5.85132 2.04987 5.64011 2.14961 5.44063C2.24936 5.24116 2.38723 5.07689 2.56323 4.94782L6.99718 1.61486C7.24323 1.42712 7.52444 1.33325 7.84081 1.33325C8.15718 1.33325 8.43919 1.42712 8.68685 1.61486L13.1208 4.94782C13.2968 5.07689 13.4347 5.24116 13.5344 5.44063C13.6342 5.64011 13.684 5.85132 13.684 6.07426V12.7252C13.684 13.1124 13.5462 13.4439 13.2704 13.7196C12.9947 13.9954 12.6632 14.1333 12.2759 14.1333H3.40809ZM3.40809 12.9649H12.2759C12.3459 12.9649 12.4033 12.9424 12.4482 12.8974C12.4932 12.8525 12.5156 12.7951 12.5156 12.7252V6.07426C12.5156 6.03431 12.5069 5.99811 12.4894 5.96566C12.4719 5.9332 12.4482 5.90449 12.4183 5.87953L7.98433 2.55406C7.94438 2.51911 7.89694 2.50164 7.84202 2.50164C7.78709 2.50164 7.73965 2.51911 7.69971 2.55406L3.26576 5.87953C3.2358 5.90449 3.21209 5.9332 3.1946 5.96566C3.17712 5.99811 3.16839 6.03431 3.16839 6.07426V12.7252C3.16839 12.7951 3.19086 12.8525 3.2358 12.8974C3.28075 12.9424 3.33818 12.9649 3.40809 12.9649Z",fill:"#595959"})),Ct=()=>E.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},E.default.createElement("path",{d:"M7.99984 8.00004C8.3665 8.00004 8.68039 7.86949 8.9415 7.60837C9.20261 7.34726 9.33317 7.03337 9.33317 6.66671C9.33317 6.30004 9.20261 5.98615 8.9415 5.72504C8.68039 5.46393 8.3665 5.33337 7.99984 5.33337C7.63317 5.33337 7.31928 5.46393 7.05817 5.72504C6.79706 5.98615 6.6665 6.30004 6.6665 6.66671C6.6665 7.03337 6.79706 7.34726 7.05817 7.60837C7.31928 7.86949 7.63317 8.00004 7.99984 8.00004ZM7.99984 12.9C9.35539 11.6556 10.3609 10.525 11.0165 9.50837C11.6721 8.49171 11.9998 7.58893 11.9998 6.80004C11.9998 5.58893 11.6137 4.59726 10.8415 3.82504C10.0693 3.05282 9.12206 2.66671 7.99984 2.66671C6.87761 2.66671 5.93039 3.05282 5.15817 3.82504C4.38595 4.59726 3.99984 5.58893 3.99984 6.80004C3.99984 7.58893 4.32761 8.49171 4.98317 9.50837C5.63873 10.525 6.64428 11.6556 7.99984 12.9ZM7.99984 14.4167C7.91095 14.4167 7.82206 14.4 7.73317 14.3667C7.64428 14.3334 7.5665 14.2889 7.49984 14.2334C5.87761 12.8 4.6665 11.4695 3.8665 10.2417C3.0665 9.01393 2.6665 7.86671 2.6665 6.80004C2.6665 5.13337 3.20261 3.8056 4.27484 2.81671C5.34706 1.82782 6.58873 1.33337 7.99984 1.33337C9.41095 1.33337 10.6526 1.82782 11.7248 2.81671C12.7971 3.8056 13.3332 5.13337 13.3332 6.80004C13.3332 7.86671 12.9332 9.01393 12.1332 10.2417C11.3332 11.4695 10.1221 12.8 8.49984 14.2334C8.43317 14.2889 8.35539 14.3334 8.2665 14.3667C8.17761 14.4 8.08873 14.4167 7.99984 14.4167Z",fill:"#8C8C8C"})),bt=()=>E.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16"},E.default.createElement("path",{d:"M3.83333 0.5C2.94928 0.5 2.10143 0.851189 1.47631 1.47631C0.851189 2.10143 0.5 2.94928 0.5 3.83333C0.5 4.71739 0.851189 5.56523 1.47631 6.19036C2.10143 6.81548 2.94928 7.16667 3.83333 7.16667C4.71739 7.16667 5.56523 6.81548 6.19036 6.19036C6.81548 5.56523 7.16667 4.71739 7.16667 3.83333C7.16667 2.94928 6.81548 2.10143 6.19036 1.47631C5.56523 0.851189 4.71739 0.5 3.83333 0.5V0.5ZM10.5 0.5C9.57917 0.5 8.83333 1.24583 8.83333 2.16667V5.5C8.83333 6.42083 9.57917 7.16667 10.5 7.16667H13.8333C14.7542 7.16667 15.5 6.42083 15.5 5.5V2.16667C15.5 1.24583 14.7542 0.5 13.8333 0.5H10.5ZM3.83333 8.83333C2.94928 8.83333 2.10143 9.18452 1.47631 9.80964C0.851189 10.4348 0.5 11.2826 0.5 12.1667C0.5 13.0507 0.851189 13.8986 1.47631 14.5237C2.10143 15.1488 2.94928 15.5 3.83333 15.5C4.71739 15.5 5.56523 15.1488 6.19036 14.5237C6.81548 13.8986 7.16667 13.0507 7.16667 12.1667C7.16667 11.2826 6.81548 10.4348 6.19036 9.80964C5.56523 9.18452 4.71739 8.83333 3.83333 8.83333V8.83333ZM12.1667 8.83333C11.2826 8.83333 10.4348 9.18452 9.80964 9.80964C9.18452 10.4348 8.83333 11.2826 8.83333 12.1667C8.83333 13.0507 9.18452 13.8986 9.80964 14.5237C10.4348 15.1488 11.2826 15.5 12.1667 15.5C13.0507 15.5 13.8986 15.1488 14.5237 14.5237C15.1488 13.8986 15.5 13.0507 15.5 12.1667C15.5 11.2826 15.1488 10.4348 14.5237 9.80964C13.8986 9.18452 13.0507 8.83333 12.1667 8.83333V8.83333Z",fill:"#9AA2AC"})),yt=({state:e,isMobile:i,debouncedFetchSearchResults:l,selectedLocation:n,onSpecialtyClick:r,dispatch:c})=>{var d;const{t:u,locale:h}=a.useTranslations(),f=t.useRef(null),m=t.useMemo((()=>o.LOCALIZED_SLUGS[h]),[h]),C=t.useMemo((()=>({wrapper:{"&:after":{content:'""',width:"1px",height:"20px",backgroundColor:"#E4E8EC",position:"absolute",right:0,top:"13px"}},input:{border:i?"border: 1px solid #d9d9d9":"none",height:i?"40px":"46px !important",paddingRight:"30px","&:focus":{boxShadow:i?"box-shadow: 0px 0px 0px 2px #91caff":"none"}},rightSection:{width:"30px",svg:{fontSize:"20px"}}})),[i]),b=t.useCallback((function(e){console.log(e)}),[l,c]);return p.useOutsideClick(f,(()=>{c({type:at.ClickOutsideInputSpecialty})})),E.default.createElement(pt,{ref:f},E.default.createElement(g.Input.Wrapper,null,E.default.createElement(g.Input,{size:i?"md":"lg",placeholder:u("booking.searchPopup.specialties"),value:(null===(d=null==e?void 0:e.selectedSpecialty)||void 0===d?void 0:d.name)||"",rightSection:E.default.createElement(I,null),styles:C,onFocus:()=>c({type:at.FocusInputSpecialty}),onChange:e=>{b(e.target.value)}})),"specialty"===e.focused&&E.default.createElement(ht,null,E.default.createElement(gt,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{r&&r({name:u("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:m.SPECIALTIES})}},E.default.createElement("div",{className:"image-item"},E.default.createElement(bt,null)),E.default.createElement(s.Text,{size:"md"},u("booking.searchBar.allSpecialties"))),e.allSpecialties.map((e=>E.default.createElement(gt,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),r&&r(Object.assign(Object.assign({},e),{total_doctor:0}))},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==n?void 0:n.id)===e.id},E.default.createElement("div",{className:"image-item"},E.default.createElement("img",{src:e.thumbnail,alt:e.name})),E.default.createElement(s.Text,{size:"md"},e.name))))))},vt=({state:e,type:i,isMobile:o,isLoading:l,initalSearchValue:n,typeInformation:s,debouncedFetchSearchResults:r,trackingAttributes:c,hideSpecialtySelection:d=!1,clientSlug:u="",focusSearchInput:h,onSearch:f,dispatch:m})=>{var b;const{t:y}=a.useTranslations(),v=t.useRef(null),x=t.useMemo((()=>c?{"data-event-category":c.dataEventCategory,"data-event-action":c.dataEventAction,"data-event-label":c.dataEventLabel}:{}),[c]),S=t.useMemo((()=>"doctor"===i?y("booking.searchBar.placeholder.doctor"):"service"===i?y("booking.searchBar.placeholder.service"):"hospital"===i?y("booking.searchBar.placeholder.hospital"):"specialty"===i?y("booking.searchBar.placeholder.specialty"):""),[i]),w=t.useMemo((()=>({root:{flex:1,"&.hide-specialty-selection":{".mantine-Input-rightSection":{display:"none"},input:{paddingLeft:"48px"},".mantine-Input-icon":{left:"0"}}}})),[]),L=t.useMemo((()=>({icon:{left:"165px"},input:{color:"#262626",'&[data-with-icon="true"]':{paddingLeft:"205px",paddingRight:"16px"}},rightSection:{left:0,width:"165px",padding:"1px"}})),[]),O=t.useMemo((()=>({input:{color:"#262626"}})),[]);p.useOutsideClick(v,(()=>{m({type:at.ClickOutsideInputSearch})}));const k=t.useCallback((function(t){m({type:at.ChangeInputSearch,payload:t}),"function"!=typeof f&&(t.trim().length>et[e.locale]||n||0===t.trim().length?r(t.trim(),e,i,u):(r.cancel(),m({type:at.DisplayInitialSearchResults})))}),[m,e,i]),I=t.useCallback((function(e){m({type:at.SelectSpecialty,payload:e}),h()}),[m]);return E.default.createElement(lt,{ref:v},"specialty"===i?E.default.createElement(g.Input.Wrapper,{styles:w},E.default.createElement(g.Input,{icon:E.default.createElement(C.Icon.Search,null),size:o?"md":"lg",placeholder:S,styles:O,value:e.searchKeywords,onFocus:()=>m({type:at.FocusInputSearchSpecialty}),onChange:e=>{k(e.target.value)}})):E.default.createElement(E.default.Fragment,null,"service"===i?E.default.createElement(g.Input.Wrapper,{styles:w},E.default.createElement(g.Input,{icon:E.default.createElement(C.Icon.Search,null),size:o?"md":"lg",name:"search-results",placeholder:S,onFocus:()=>m({type:at.FocusInputSearch}),value:e.searchKeywords,onChange:e=>{k(e.target.value)}})):E.default.createElement(E.default.Fragment,null,o&&!d?E.default.createElement(E.default.Fragment,null,E.default.createElement(yt,{state:e,isMobile:o,dispatch:m,debouncedFetchSearchResults:r,onSpecialtyClick:I}),E.default.createElement(g.Input.Wrapper,{styles:w},E.default.createElement(g.Input,{icon:E.default.createElement(C.Icon.Search,null),size:"md",placeholder:S,value:e.searchKeywords,name:"search-results",onFocus:()=>m({type:at.FocusInputSearch}),onChange:e=>{k(e.target.value)}}))):E.default.createElement(g.Input.Wrapper,{styles:w,className:d?"hide-specialty-selection":""},E.default.createElement(g.Input,Object.assign({icon:E.default.createElement(C.Icon.Search,null),size:"lg",placeholder:S,styles:L,name:"search-results",autoComplete:"off",value:e.searchKeywords,onChange:e=>{k(e.target.value)},onFocus:()=>m({type:at.FocusInputSearch})},x,{rightSection:d?E.default.createElement(E.default.Fragment,null):E.default.createElement(yt,{state:e,isMobile:o,dispatch:m,debouncedFetchSearchResults:r,onSpecialtyClick:I})})))),"search"===e.focused&&E.default.createElement(nt,null,E.default.createElement(ut,{type:i,state:e,results:(null===(b=e.searchResults)||void 0===b?void 0:b[i])||[],location:e.selectedLocation.name,dispatch:m,isLoading:l,typeInformation:s,clientSlug:u}))))},xt=w.default.div`
@@ -619,7 +619,7 @@
619
619
  &[data-is-denied='true'] {
620
620
  cursor: not-allowed;
621
621
  }
622
- `,wt=w.default(_)`
622
+ `,wt=w.default(F)`
623
623
  width: 12px;
624
624
  height: 18px;
625
625
  `,Lt=({state:e,isMobile:i,debouncedFetchCitiesByKeyword:l,selectedLocation:n,trackingAttributes:c,onLocationClick:d,dispatch:u})=>{const{t:h,locale:f}=a.useTranslations(),m=t.useRef(null),C=t.useMemo((()=>c?{"data-event-category":c.dataEventCategory,"data-event-action":c.dataEventAction,"data-event-label":c.dataEventLabel}:{}),[c]),b=t.useCallback((function(t){u({type:at.ChangeInputLocation,payload:t}),t.trim().length>et[e.locale]?l(t.trim()):(l.cancel(),u({type:at.DisplayInitialCities}))}),[l,u]);return p.useOutsideClick(m,(()=>{u({type:at.ClickOutsideInputLocation})})),E.default.createElement(xt,{ref:m},E.default.createElement(g.Input.Wrapper,null,E.default.createElement(g.Input,Object.assign({size:i?"md":"lg",placeholder:"Search location",value:e.searchLocationKeywords,onFocus:()=>u({type:at.FocusInputLocation}),onChange:e=>{b(e.target.value)}},C))),"location"===e.focused&&E.default.createElement(Et,null,E.default.createElement(St,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{var e;d&&d({name:h("booking.searchBar.allLocations"),id:o.ID_OPTION_ALL_LOCATION,slug:null===(e=o.LOCALIZED_SLUGS[f])||void 0===e?void 0:e.ALL})}},E.default.createElement(wt,{color:r.theme.colors.neutral400}),E.default.createElement(s.Text,{size:"md"},h("booking.searchBar.allLocations"))),e.cities.map((e=>E.default.createElement(St,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),d&&d(e)},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==n?void 0:n.id)===e.id},E.default.createElement(wt,{color:r.theme.colors.neutral400}),E.default.createElement(s.Text,{size:"md"},e.name))))))},Ot=w.default.div`
@@ -705,7 +705,7 @@
705
705
  text-align: center;
706
706
  }
707
707
  }
708
- `,jt=({state:e,isMobile:i,specialties:l,isLoading:n,dispatch:c})=>{const{t:d,locale:u}=a.useTranslations(),{selectedLocation:p}=e,h=t.useMemo((()=>o.LOCALIZED_SLUGS[u]),[u]),f=t.useMemo((()=>l.length>=9||e.searchKeywords.trim().length<=et[e.locale]),[e.searchKeywords,l]);return E.default.createElement(E.default.Fragment,null,!i&&E.default.createElement(It,{color:"#E4E8EC"}),E.default.createElement(Ot,null,l.length>0&&!n&&E.default.createElement(E.default.Fragment,null,l.map(((e,t)=>t>=9?E.default.createElement(E.default.Fragment,null):E.default.createElement(kt,{key:e.id,onClick:()=>(e=>{const t=`/${p.slug}/${h.DOCTOR}/${e}`;c({type:at.NavigateTo,payload:t})})(e.slug)},E.default.createElement("div",{className:"image-item"},E.default.createElement("img",{src:e.thumbnail,alt:e.name})),E.default.createElement("div",{className:"infor"},E.default.createElement("div",{className:"title"},e.name)))))),0===l.length&&!n&&E.default.createElement(s.Text,{size:"sm",color:r.theme.colors.gray400},d("booking.searchBar.noResults")),n&&Array(6).fill(void 0).map(((e,t)=>E.default.createElement(kt,{key:"loading"+t},E.default.createElement("div",{className:"image-item"},E.default.createElement(g.Skeleton,{height:40,animate:!0})),E.default.createElement("div",{className:"infor"},E.default.createElement("div",{className:"title"},E.default.createElement(g.Skeleton,{height:20,radius:"sm",animate:!0}))))))),f&&E.default.createElement(Tt,null,E.default.createElement("div",{className:"show-more",onClick:()=>{const e=`/${h.SPECIALTIES}`;c({type:at.NavigateTo,payload:e})}},d("home.seeAll"))))},Mt=w.default.div`
708
+ `,jt=({state:e,isMobile:i,specialties:l,isLoading:n,clientSlug:c="",dispatch:d})=>{const{t:u,locale:p}=a.useTranslations(),{selectedLocation:h}=e,f=t.useMemo((()=>o.LOCALIZED_SLUGS[p]),[p]),m=t.useMemo((()=>l.length>=9||e.searchKeywords.trim().length<=et[e.locale]),[e.searchKeywords,l]);return E.default.createElement(E.default.Fragment,null,!i&&E.default.createElement(It,{color:"#E4E8EC"}),E.default.createElement(Ot,null,l.length>0&&!n&&E.default.createElement(E.default.Fragment,null,l.map(((e,t)=>t>=9?E.default.createElement(E.default.Fragment,null):E.default.createElement(kt,{key:e.id,onClick:()=>(e=>{let t="";t=e===o.SLUG_VACIN_ID&&c?`/${h.slug}/${f.HOSPITAL}/${c}/`:`/${h.slug}/${f.DOCTOR}/${e}`,d({type:at.NavigateTo,payload:t})})(e.slug)},E.default.createElement("div",{className:"image-item"},E.default.createElement("img",{src:e.thumbnail,alt:e.name})),E.default.createElement("div",{className:"infor"},E.default.createElement("div",{className:"title"},e.name)))))),0===l.length&&!n&&E.default.createElement(s.Text,{size:"sm",color:r.theme.colors.gray400},u("booking.searchBar.noResults")),n&&Array(6).fill(void 0).map(((e,t)=>E.default.createElement(kt,{key:"loading"+t},E.default.createElement("div",{className:"image-item"},E.default.createElement(g.Skeleton,{height:40,animate:!0})),E.default.createElement("div",{className:"infor"},E.default.createElement("div",{className:"title"},E.default.createElement(g.Skeleton,{height:20,radius:"sm",animate:!0}))))))),m&&E.default.createElement(Tt,null,E.default.createElement("div",{className:"show-more",onClick:()=>{const e=`/${f.SPECIALTIES}`;d({type:at.NavigateTo,payload:e})}},u("home.seeAll"))))},Mt=w.default.div`
709
709
  display: flex;
710
710
  gap: 5px;
711
711
  margin-top: 16px;
@@ -756,4 +756,4 @@
756
756
  background: rgba(255, 255, 255, 0.64);
757
757
  backdrop-filter: blur(12px);
758
758
  border-bottom: 1px solid ${r.theme.colors.neutral100};
759
- `,Ft=({currentTab:e,hideTabBookingSearch:i=[],isMobile:o,setCurrentTab:l})=>{const{t:n}=a.useTranslations(),s=t.useMemo((()=>({root:{overflowY:o?"hidden":"initial",overflowX:o?"auto":"initial"},tabsList:{background:"rgba(255, 255, 255, 0)",borderBottom:"none",flexWrap:"nowrap",".mantine-Tabs-tab":{"&:last-child":{"&:after":{display:"none"}}}},tab:{padding:o?"12px 16px 12px 16px":"15px 40px 15px 40px",borderTop:"2px solid transparent",borderBottom:"none",margin:0,borderRadius:0,position:"relative",width:"auto",'&[data-active="true"]':{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:after":{display:"none"},"&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:hover":{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:after":{content:'""',width:"1px",height:"24px",backgroundColor:"#E4E8EC",position:"absolute",right:"-1px"}},tabLabel:{color:"#595959",fontSize:o?"14px":"16px",fontWeight:600,lineHeight:o?"22px":"24px"}})),[o]),r=(()=>{const{t:e}=a.useTranslations();return[{value:"hospital",label:e("booking.searchPopup.hospitals")},{value:"doctor",label:e("booking.searchPopup.doctors")},{value:"service",label:e("booking.searchPopup.services")},{value:"specialty",label:e("booking.searchPopup.specialties")}]})(),c=t.useMemo((()=>r.filter((e=>!i.includes(e.value)))||[]),[i,r]);return E.default.createElement(Pt,{className:"booking-search-tab"},E.default.createElement(C.Container,null,E.default.createElement(g.Tabs,{value:e,onTabChange:e=>{l(e)},styles:s},E.default.createElement(g.Tabs.List,null,c.map((e=>E.default.createElement(g.Tabs.Tab,{value:e.value,key:e.value},n(e.label))))))))};var _t;!function(e){e.doctor="doctor",e.service="hospital_service",e.hospital="hospital_branch"}(_t||(_t={}));var $t;!function(e){e[e.SPECIALTY=1]="SPECIALTY",e[e.DOCTOR=2]="DOCTOR",e[e.CLINIC=3]="CLINIC",e[e.SERVICE=4]="SERVICE"}($t||($t={}));var Dt=Object.freeze({__proto__:null,get RedirectType(){return $t}});exports.BookingSearchBar=({isMobile:i,careApiDomain:l,geoLocationPermission:n,geoLocationCoordinates:s,initialSelectedCity:r,initialSearchValue:c="",careFrontDomain:d="/care",isDebug:u=!1,askForGeolocationPermission:p=!1,gaTrackingSearchBar:g,gaTrackingLocationSearch:f,autoCompleteDisabled:m=!1,inputSearchPlaceholder:C="",isOptionAllLocation:b=!1,hideResults:y=[],isNavResultItem:v=!0,routerPush:x,onGeoLocationPermissionChange:w,onSearch:L,onChangeLocation:O})=>{const{t:k,locale:I}=a.useTranslations(),N=t.useRef(null),F=t.useRef(null),[_,$]=t.useState(void 0),[D,B]=t.useState(!1),{geoLocationPermission:V,geoLocationCoordinates:K,requestGeoLocation:H}=T(),[z,G]=t.useReducer(Ce,ge,(e=>Object.assign(Object.assign({},e),{isDebug:u,isMobile:i,geoLocationPermission:n||V||"unset",geoLocationCoordinates:s||K||null,searchKeywords:c,initialSelectedCity:r||null,selectedLocation:r||e.selectedLocation||null,searchLocationKeywords:(null==r?void 0:r.name)||e.searchLocationKeywords,autoCompleteDisabled:m,inputSearchPlaceholder:C,locale:I}))),{navigateTo:U,focused:Q,isLoadingCities:q,cities:Y,searchKeywords:W,geoLocationPermission:J,selectedLocation:X,initialSelectedCity:ee,defaultCity:te,searchResults:ae,isLoadingSearchResults:ie,isMobileModalOpened:oe,inputSearchPlaceholder:le}=z,{fetchCitiesByLocation:se,fetchCitiesByKeyword:re,fetchSearchResults:ce}=function({dispatch:e,careApiDomain:a,locale:i="vi-VN"}){const l=t.useCallback((function(t,o={}){const l=`${a}${t}`;return e({type:fe.FetchCitiesStart}),fetch(Ye(l,o,i),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:fe.FetchCitiesFinish})))}),[i]);return{fetchCitiesByLocation:t.useCallback((function({coordinates:t}){let a={};const o={};t&&(a={lat:t.lat,lng:t.lng}),"ms-MY"===i&&(o.noPaging=1);const n=[l(h.PATHS.GET_CITY_BY_IP,Object.assign(Object.assign({},a),o))];return"zh-TW"===i&&n.push(l(h.PATHS.GET_CITIES_LIST,{noPaging:1})),Promise.all(n).then((([t,a])=>{const i=Object.assign({},t);if(a){const e=i.cities.map((e=>e.id));i.cities=i.cities.concat(a.cities.filter((t=>!e.includes(t.id))))}e({type:fe.FetchCitiesByGeoIpComplete,payload:i})})).catch((e=>console.error("error loading cities by location",e)))}),[i,a,e]),fetchCitiesByKeyword:t.useCallback((function(t){return l(h.PATHS.GET_CITIES_LIST,{keyword:t}).then((t=>{e({type:fe.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,a,e]),fetchSearchResults:t.useCallback((function(t,l){const n=`${a}${h.PATHS.GET_SEARCH_V2}`;e({type:fe.FetchSearchResultsStart});const{defaultCity:s,selectedLocation:r,geoLocationCoordinates:c}=l;let d="";if(!r||!s)return void e({type:fe.FetchSearchResultsFinish});r.id===o.ID_OPTION_CURRENT_LOCATION?c||(d=s.id):d=r.id===o.ID_OPTION_ALL_LOCATION?"":r.id;const u=(null==c?void 0:c.lat)||"",p=(null==c?void 0:c.lng)||"";return fetch(Ye(n,{domain:a,searchType:"global",keyword:t.trim().length>he[i]?t.trim():"",city:d===o.ID_OPTION_CURRENT_LOCATION?"":d,lat:u,lng:p},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>e({type:fe.FetchSearchResultsComplete,payload:t}))).catch((e=>{console.log("error loading search results",{url:n,error:e})})).finally((()=>e({type:fe.FetchSearchResultsFinish})))}),[i,a,e])}}({dispatch:G,locale:I,careApiDomain:l}),de=t.useMemo((()=>{var e;return{id:o.ID_OPTION_CURRENT_LOCATION,name:k("booking.searchBar.currentLocation"),slug:null===(e=o.LOCALIZED_SLUGS[I])||void 0===e?void 0:e.CURRENT}}),[k,I]),ue=t.useMemo((()=>S.default(re,400)),[re]),me=t.useMemo((()=>S.default(ce,400)),[ce]);t.useEffect((()=>{""!==c&&c!==z.searchKeywords&&G({type:fe.UpdateInitialSearchValue,payload:c})}),[c]),t.useEffect((()=>{p&&(null==X?void 0:X.id)===o.ID_OPTION_CURRENT_LOCATION&&"unset"===J&&H()}),[p,X,J]),t.useEffect((()=>{n||J===V||("granted"===V&&K?G({type:fe.GrantGeoLocationPermission,payload:K}):"denied"===V&&G({type:fe.DenyGeoLocationPermission}))}),[J,V,K,n]),t.useEffect((()=>{U&&(x?x(U):window.location.href=`${d}${U}`)}),[U]);const be=t.useCallback((function(){G({type:fe.SelectCurrentLocation,payload:de})}),[k,G]);t.useEffect((()=>{var e;"denied"===J||ee||G({type:fe.SelectLocation,payload:{name:k("booking.searchBar.allLocations"),id:o.ID_OPTION_ALL_LOCATION,slug:null===(e=o.LOCALIZED_SLUGS[I])||void 0===e?void 0:e.ALL}}),w&&w(J,z.geoLocationCoordinates),i&&"granted"===J&&X&&G({type:fe.FocusInputSearch}),se({coordinates:z.geoLocationCoordinates})}),[J]),t.useEffect((()=>{X&&te&&ce(z.searchKeywords,z)}),[X,te]),t.useEffect((()=>{C!==le&&G({type:fe.SetInputSearchPlaceholder,payload:C})}),[C,le]),t.useEffect((()=>{oe?document.body.classList.add("care-popup-open"):document.body.classList.remove("care-popup-open")}),[oe]);const ye=t.useCallback((function(e){"ms-MY"===I&&B(!0),G({type:fe.SelectLocation,payload:e}),"ms-MY"!==I&&Ee(),O&&O(e)}),[k,G]);function ve(){"ms-MY"===I&&B(!0),i&&"granted"!==z.geoLocationPermission?H():(be(),"ms-MY"!==I&&Ee())}function xe(){var e;N.current&&(null===(e=N.current.querySelector('input[name="search-location"]'))||void 0===e||e.focus())}function Ee(){var e;N.current&&(null===(e=N.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}function Se(){G({type:fe.CloseMobileModal})}function we(){return"location"!==Q?null:E.default.createElement(Z,{isLoading:q,cities:Y,onLocationClick:ye,onCurrentLocationClick:ve,isLocationLoading:q,geoLocationPermission:J,selectedLocation:X,isOptionAllLocation:b})}function Le(){return"search"!==Q?null:z.autoCompleteDisabled?i?E.default.createElement(Oe,{onClick:()=>{L({cityId:z.selectedLocation.id,keyword:W}),Se()}}):null:E.default.createElement(qe,{data:ae,state:z,dispatch:G,isMobile:!1,keyword:W,isLoading:ie,hideResults:y,isNavResultItem:v})}function Ie(){return E.default.createElement(ke,{isMobile:i,state:z,dispatch:G,debouncedFetchCitiesByKeyword:ue,debouncedFetchSearchResults:me,focusLocationInput:xe,focusSearchInput:Ee,renderLocationResults:we,renderSearchResults:Le,trackingAttributes:g,locationTrackingAttributes:f,onSearch:L,initalSearchValue:c})}return t.useEffect((()=>{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)}}}),[$]),t.useEffect((()=>{if(X&&D&&"ms-MY"===I){const e=`/${X.slug}/hospital`;G({type:fe.NavigateTo,payload:e}),B(!1)}}),[D,I,X]),i?E.default.createElement(E.default.Fragment,null,E.default.createElement(P,null),E.default.createElement(A,{ref:F}),E.default.createElement(M,{id:"booking-search-bar",ref:N,"data-is-modal":i&&oe,style:{"--mobile-care-searchbar-height":oe&&_?`${_}px`:"100%"}},oe?E.default.createElement(E.default.Fragment,null,E.default.createElement(R,null,E.default.createElement(pe,{headingText:k("booking.searchBar.searchButton"),onLeftClick:Se}),Ie()),we(),Le()):E.default.createElement(ne,{onClick:function(){var t;return e.__awaiter(this,void 0,void 0,(function*(){F.current&&F.current.focus(),G({type:fe.OpenMobileModal}),yield Promise.resolve(),N.current&&(null===(t=N.current.querySelector('input[name="search-location"]'))||void 0===t||t.focus())}))},focused:Q,value:W,trackingAttributes:g,inputSearchPlaceholder:C}))):E.default.createElement(j,{id:"booking-search-bar",ref:N},Ie())},exports.BookingSearchBarV2=({isMobile:e,careApiDomain:i,geoLocationPermission:l,geoLocationCoordinates:n,initialSelectedCity:s,initialSearchValue:r="",initTypeSearch:c="hospital",initSpecialty:d,careFrontDomain:u="/care",isDebug:f=!1,gaTrackingSearchBar:m,gaTrackingLocationSearch:C,autoCompleteDisabled:b=!1,inputSearchPlaceholder:y="",hideTabBookingSearch:v=[],hideSpecialtySelection:x=!1,hidePopularSearchKeys:w=!1,clientSlug:L="",routerPush:O,onGeoLocationPermissionChange:k,onChangeLocation:I})=>{const{locale:j,t:M}=a.useTranslations(),R=t.useRef(null),A=t.useRef(null),[N,P]=t.useState(c),{geoLocationPermission:F,geoLocationCoordinates:_}=T(),[$,D]=t.useReducer(ot,tt,(t=>Object.assign(Object.assign({},t),{isDebug:f,isMobile:e,geoLocationPermission:l||F||"unset",geoLocationCoordinates:n||_||null,searchKeywords:r,initialSelectedCity:s||null,selectedLocation:s||t.selectedLocation||null,searchLocationKeywords:(null==s?void 0:s.name)||t.searchLocationKeywords,autoCompleteDisabled:b,inputSearchPlaceholder:y,locale:j}))),{navigateTo:B,focusedSpecialty:V,searchKeywords:K,geoLocationPermission:H,selectedLocation:z,selectedSpecialty:G,initialSelectedCity:Z,searchResults:U,isLoadingSearchResults:Q}=$,{fetchCitiesByLocation:q,fetchCitiesByKeyword:Y,fetchSearchResults:W,fetchAllSpecialties:J,fetchPopularKeys:X}=function({dispatch:e,careApiDomain:a,locale:i="vi-VN"}){const l=t.useCallback((function(t,o={}){const l=`${a}${t}`;return e({type:at.FetchCitiesStart}),fetch(Ye(l,o,i),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:at.FetchCitiesFinish})))}),[i]);return{fetchCitiesByLocation:t.useCallback((function({coordinates:t}){let a={};const o={};t&&(a={lat:t.lat,lng:t.lng}),"ms-MY"===i&&(o.noPaging=1);const n=[l(h.PATHS.GET_CITY_BY_IP,Object.assign(Object.assign({},a),o))];return"zh-TW"===i&&n.push(l(h.PATHS.GET_CITIES_LIST,{noPaging:1})),Promise.all(n).then((([t,a])=>{const i=Object.assign({},t);if(a){const e=i.cities.map((e=>e.id));i.cities=i.cities.concat(a.cities.filter((t=>!e.includes(t.id))))}e({type:at.FetchCitiesByGeoIpComplete,payload:i})})).catch((e=>console.error("error loading cities by location",e)))}),[i,a,e]),fetchCitiesByKeyword:t.useCallback((function(t){return l(h.PATHS.GET_CITIES_LIST,{keyword:t}).then((t=>{e({type:at.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,a,e]),fetchSearchResults:t.useCallback((function(t,l,n,s,r){const c="specialty"===n?`${a}${h.PATHS.GET_SEARCH_SPECIALTY}`:`${a}${h.PATHS.GET_SEARCH_V2}`;e({type:at.FetchSearchResultsStart});const{selectedLocation:d,geoLocationCoordinates:u,selectedSpecialty:p}=l;let g="";if(!d)return void e({type:at.FetchSearchResultsFinish});g=d.id===o.ID_OPTION_ALL_LOCATION?"":d.id;const f=(null==u?void 0:u.lat)||"",m=(null==u?void 0:u.lng)||"",C=(null==p?void 0:p.id)>0?null==p?void 0:p.id:"",b=t.trim().length>et[i]?t.trim():"";return fetch(Ye(c,{domain:a,searchType:n||"global",keyword:b,city:g===o.ID_OPTION_CURRENT_LOCATION?"":g,lat:f,lng:m,specialty_id:C,client_slug:s},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{let a=[];"specialty"!==n&&(a=t.searches),"specialty"===n&&(a=b?t.specialties:t.default),e({type:at.FetchSearchResultsComplete,payload:{key:n,searches:a||[]}}),r&&e({type:at.UpdateInitialSearchResults,payload:{key:n,searches:a||[]}})})).catch((e=>{console.log("error loading search results",{url:c,error:e})})).finally((()=>e({type:at.FetchSearchResultsFinish})))}),[i,a,e]),fetchAllSpecialties:t.useCallback((function(){const t=`${a}${h.PATHS.GET_SEARCH_SPECIALTY}`;return fetch(Ye(t,{domain:a,searchType:""},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{e({type:at.FetchAllSpecialties,payload:t.specialties||[]})})).catch((e=>{console.log("error loading search results",{url:t,error:e})}))}),[i,a,e]),fetchPopularKeys:t.useCallback((function(t){const o=`${a}${h.PATHS.GET_SEARCH_POPULAR_KEY}`;return fetch(Ye(o,{domain:a,searchType:_t[t],sort_by:"display_order",sort_order:"asc"},i)).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{e({type:at.FetchPopularKeys,payload:t.popular_searches||[]})})).catch((e=>{console.log("error loading search results",{url:o,error:e})}))}),[i,a,e])}}({dispatch:D,locale:j,careApiDomain:i}),ee=t.useMemo((()=>o.LOCALIZED_SLUGS[j]),[j]),te=t.useMemo((()=>({doctor:{name:M("booking.searchPopup.doctors"),icon:E.default.createElement(ft,null),slug:ee.DOCTOR},service:{name:M("booking.searchPopup.services"),icon:E.default.createElement(mt,null),slug:ee.SERVICE},hospital:{name:M("booking.searchPopup.hospitals"),icon:E.default.createElement(Ct,null),slug:ee.HOSPITAL},specialty:{name:M("booking.searchPopup.specialties"),icon:E.default.createElement(bt,null),slug:ee.SPECIALTIES}})),[N]),ae=t.useMemo((()=>S.default(Y,400)),[Y]),ie=t.useMemo((()=>S.default(W,400)),[W]),oe=t.useCallback((function(e){D({type:at.SelectLocation,payload:e}),le(),I&&I(e)}),[M,D]);function le(){var e;R.current&&(null===(e=R.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}return p.useOutsideClick(A,(()=>{D({type:at.ClickOutsideInputSearchSpecialty})})),t.useEffect((()=>{var t;"denied"===H||Z||D({type:at.SelectLocation,payload:{name:M("booking.searchBar.allLocations"),id:o.ID_OPTION_ALL_LOCATION,slug:null===(t=o.LOCALIZED_SLUGS[j])||void 0===t?void 0:t.ALL}}),k&&k(H,$.geoLocationCoordinates),e&&"granted"===H&&z&&D({type:at.FocusInputSearch}),q({coordinates:$.geoLocationCoordinates})}),[H]),t.useEffect((()=>{const e=d||{name:M("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:ee.SPECIALTIES};$.selectedSpecialty||D({type:at.SelectSpecialty,payload:e})}),[d,$.selectedSpecialty]),t.useEffect((()=>{J()}),[]),t.useEffect((()=>{X(N)}),[N]),t.useEffect((()=>{B&&(O?O(B):window.location.href=`${u}${B}`)}),[B]),t.useEffect((()=>{W($.searchKeywords,$,N,L,!0)}),[z,G,N]),E.default.createElement(We,{ref:R},E.default.createElement(Ft,{currentTab:N,setCurrentTab:P,isMobile:e,hideTabBookingSearch:v}),E.default.createElement(Je,{className:"booking-search-container"},E.default.createElement(Xe,null,E.default.createElement("div",{ref:A},E.default.createElement(g.Flex,{gap:"12px",justify:"space-between",align:"center",direction:e?"column":"row",className:"flex-search-input"},"specialty"!==N&&E.default.createElement(Lt,{state:$,isMobile:e,dispatch:D,debouncedFetchCitiesByKeyword:ae,selectedLocation:z,onLocationClick:oe,trackingAttributes:C}),E.default.createElement(vt,{type:N,isMobile:e,state:$,dispatch:D,debouncedFetchSearchResults:ie,initalSearchValue:r,focusSearchInput:le,typeInformation:te,trackingAttributes:m,isLoading:Q,hideSpecialtySelection:x,clientSlug:L}),E.default.createElement(g.Button,{size:e?"md":"lg",fullWidth:e,onClick:function(){let e="";const{slug:t}=te[N];let a="";("doctor"===N||"hospital"===N)&&$.selectedSpecialty.id>0&&(a=`&specialtyId=${$.selectedSpecialty.id}`),e="specialty"===N?`/${t}`:`/${z.slug}/${t}`,L===o.CLIENT_GSK&&(e+=`/${L}`),e+=`?q=${K}${a}`,e&&D({type:at.NavigateTo,payload:e})},styles:{root:{height:e?"40px":"48px"}}},M("booking.searchBar.searchButton"))),!w&&"specialty"!==N&&$.popularKeys.length>0&&E.default.createElement(Nt,{type:N,state:$,typeInformation:te,dispatch:D}),"specialty"===N&&"search"===V&&E.default.createElement(jt,{state:$,isMobile:e,dispatch:D,specialties:(null==U?void 0:U.specialty)||[],isLoading:Q})))))},exports.ChevronDown=I,exports.types=Dt;
759
+ `,_t=({currentTab:e,hideTabBookingSearch:i=[],isMobile:o,setCurrentTab:l})=>{const{t:n}=a.useTranslations(),s=t.useMemo((()=>({root:{overflowY:o?"hidden":"initial",overflowX:o?"auto":"initial"},tabsList:{background:"rgba(255, 255, 255, 0)",borderBottom:"none",flexWrap:"nowrap",".mantine-Tabs-tab":{"&:last-child":{"&:after":{display:"none"}}}},tab:{padding:o?"12px 16px 12px 16px":"15px 40px 15px 40px",borderTop:"2px solid transparent",borderBottom:"none",margin:0,borderRadius:0,position:"relative",width:"auto",'&[data-active="true"]':{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:after":{display:"none"},"&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:hover":{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:after":{content:'""',width:"1px",height:"24px",backgroundColor:"#E4E8EC",position:"absolute",right:"-1px"}},tabLabel:{color:"#595959",fontSize:o?"14px":"16px",fontWeight:600,lineHeight:o?"22px":"24px"}})),[o]),r=(()=>{const{t:e}=a.useTranslations();return[{value:"hospital",label:e("booking.searchPopup.hospitals")},{value:"doctor",label:e("booking.searchPopup.doctors")},{value:"service",label:e("booking.searchPopup.services")},{value:"specialty",label:e("booking.searchPopup.specialties")}]})(),c=t.useMemo((()=>r.filter((e=>!i.includes(e.value)))||[]),[i,r]);return E.default.createElement(Pt,{className:"booking-search-tab"},E.default.createElement(C.Container,null,E.default.createElement(g.Tabs,{value:e,onTabChange:e=>{l(e)},styles:s},E.default.createElement(g.Tabs.List,null,c.map((e=>E.default.createElement(g.Tabs.Tab,{value:e.value,key:e.value},n(e.label))))))))};var Ft;!function(e){e.doctor="doctor",e.service="hospital_service",e.hospital="hospital_branch"}(Ft||(Ft={}));var $t;!function(e){e[e.SPECIALTY=1]="SPECIALTY",e[e.DOCTOR=2]="DOCTOR",e[e.CLINIC=3]="CLINIC",e[e.SERVICE=4]="SERVICE"}($t||($t={}));var Dt=Object.freeze({__proto__:null,get RedirectType(){return $t}});exports.BookingSearchBar=({isMobile:i,careApiDomain:l,geoLocationPermission:n,geoLocationCoordinates:s,initialSelectedCity:r,initialSearchValue:c="",careFrontDomain:d="/care",isDebug:u=!1,askForGeolocationPermission:p=!1,gaTrackingSearchBar:g,gaTrackingLocationSearch:f,autoCompleteDisabled:m=!1,inputSearchPlaceholder:C="",isOptionAllLocation:b=!1,hideResults:y=[],isNavResultItem:v=!0,routerPush:x,onGeoLocationPermissionChange:w,onSearch:L,onChangeLocation:O})=>{const{t:k,locale:I}=a.useTranslations(),N=t.useRef(null),_=t.useRef(null),[F,$]=t.useState(void 0),[D,B]=t.useState(!1),{geoLocationPermission:V,geoLocationCoordinates:K,requestGeoLocation:H}=T(),[z,G]=t.useReducer(Ce,ge,(e=>Object.assign(Object.assign({},e),{isDebug:u,isMobile:i,geoLocationPermission:n||V||"unset",geoLocationCoordinates:s||K||null,searchKeywords:c,initialSelectedCity:r||null,selectedLocation:r||e.selectedLocation||null,searchLocationKeywords:(null==r?void 0:r.name)||e.searchLocationKeywords,autoCompleteDisabled:m,inputSearchPlaceholder:C,locale:I}))),{navigateTo:U,focused:Q,isLoadingCities:q,cities:Y,searchKeywords:W,geoLocationPermission:J,selectedLocation:X,initialSelectedCity:ee,defaultCity:te,searchResults:ae,isLoadingSearchResults:ie,isMobileModalOpened:oe,inputSearchPlaceholder:le}=z,{fetchCitiesByLocation:se,fetchCitiesByKeyword:re,fetchSearchResults:ce}=function({dispatch:e,careApiDomain:a,locale:i="vi-VN"}){const l=t.useCallback((function(t,o={}){const l=`${a}${t}`;return e({type:fe.FetchCitiesStart}),fetch(Ye(l,o,i),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:fe.FetchCitiesFinish})))}),[i]);return{fetchCitiesByLocation:t.useCallback((function({coordinates:t}){let a={};const o={};t&&(a={lat:t.lat,lng:t.lng}),"ms-MY"===i&&(o.noPaging=1);const n=[l(h.PATHS.GET_CITY_BY_IP,Object.assign(Object.assign({},a),o))];return"zh-TW"===i&&n.push(l(h.PATHS.GET_CITIES_LIST,{noPaging:1})),Promise.all(n).then((([t,a])=>{const i=Object.assign({},t);if(a){const e=i.cities.map((e=>e.id));i.cities=i.cities.concat(a.cities.filter((t=>!e.includes(t.id))))}e({type:fe.FetchCitiesByGeoIpComplete,payload:i})})).catch((e=>console.error("error loading cities by location",e)))}),[i,a,e]),fetchCitiesByKeyword:t.useCallback((function(t){return l(h.PATHS.GET_CITIES_LIST,{keyword:t}).then((t=>{e({type:fe.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,a,e]),fetchSearchResults:t.useCallback((function(t,l){const n=`${a}${h.PATHS.GET_SEARCH_V2}`;e({type:fe.FetchSearchResultsStart});const{defaultCity:s,selectedLocation:r,geoLocationCoordinates:c}=l;let d="";if(!r||!s)return void e({type:fe.FetchSearchResultsFinish});r.id===o.ID_OPTION_CURRENT_LOCATION?c||(d=s.id):d=r.id===o.ID_OPTION_ALL_LOCATION?"":r.id;const u=(null==c?void 0:c.lat)||"",p=(null==c?void 0:c.lng)||"";return fetch(Ye(n,{domain:a,searchType:"global",keyword:t.trim().length>he[i]?t.trim():"",city:d===o.ID_OPTION_CURRENT_LOCATION?"":d,lat:u,lng:p},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>e({type:fe.FetchSearchResultsComplete,payload:t}))).catch((e=>{console.log("error loading search results",{url:n,error:e})})).finally((()=>e({type:fe.FetchSearchResultsFinish})))}),[i,a,e])}}({dispatch:G,locale:I,careApiDomain:l}),de=t.useMemo((()=>{var e;return{id:o.ID_OPTION_CURRENT_LOCATION,name:k("booking.searchBar.currentLocation"),slug:null===(e=o.LOCALIZED_SLUGS[I])||void 0===e?void 0:e.CURRENT}}),[k,I]),ue=t.useMemo((()=>S.default(re,400)),[re]),me=t.useMemo((()=>S.default(ce,400)),[ce]);t.useEffect((()=>{""!==c&&c!==z.searchKeywords&&G({type:fe.UpdateInitialSearchValue,payload:c})}),[c]),t.useEffect((()=>{p&&(null==X?void 0:X.id)===o.ID_OPTION_CURRENT_LOCATION&&"unset"===J&&H()}),[p,X,J]),t.useEffect((()=>{n||J===V||("granted"===V&&K?G({type:fe.GrantGeoLocationPermission,payload:K}):"denied"===V&&G({type:fe.DenyGeoLocationPermission}))}),[J,V,K,n]),t.useEffect((()=>{U&&(x?x(U):window.location.href=`${d}${U}`)}),[U]);const be=t.useCallback((function(){G({type:fe.SelectCurrentLocation,payload:de})}),[k,G]);t.useEffect((()=>{var e;"denied"===J||ee||G({type:fe.SelectLocation,payload:{name:k("booking.searchBar.allLocations"),id:o.ID_OPTION_ALL_LOCATION,slug:null===(e=o.LOCALIZED_SLUGS[I])||void 0===e?void 0:e.ALL}}),w&&w(J,z.geoLocationCoordinates),i&&"granted"===J&&X&&G({type:fe.FocusInputSearch}),se({coordinates:z.geoLocationCoordinates})}),[J]),t.useEffect((()=>{X&&te&&ce(z.searchKeywords,z)}),[X,te]),t.useEffect((()=>{C!==le&&G({type:fe.SetInputSearchPlaceholder,payload:C})}),[C,le]),t.useEffect((()=>{oe?document.body.classList.add("care-popup-open"):document.body.classList.remove("care-popup-open")}),[oe]);const ye=t.useCallback((function(e){"ms-MY"===I&&B(!0),G({type:fe.SelectLocation,payload:e}),"ms-MY"!==I&&Ee(),O&&O(e)}),[k,G]);function ve(){"ms-MY"===I&&B(!0),i&&"granted"!==z.geoLocationPermission?H():(be(),"ms-MY"!==I&&Ee())}function xe(){var e;N.current&&(null===(e=N.current.querySelector('input[name="search-location"]'))||void 0===e||e.focus())}function Ee(){var e;N.current&&(null===(e=N.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}function Se(){G({type:fe.CloseMobileModal})}function we(){return"location"!==Q?null:E.default.createElement(Z,{isLoading:q,cities:Y,onLocationClick:ye,onCurrentLocationClick:ve,isLocationLoading:q,geoLocationPermission:J,selectedLocation:X,isOptionAllLocation:b})}function Le(){return"search"!==Q?null:z.autoCompleteDisabled?i?E.default.createElement(Oe,{onClick:()=>{L({cityId:z.selectedLocation.id,keyword:W}),Se()}}):null:E.default.createElement(qe,{data:ae,state:z,dispatch:G,isMobile:!1,keyword:W,isLoading:ie,hideResults:y,isNavResultItem:v})}function Ie(){return E.default.createElement(ke,{isMobile:i,state:z,dispatch:G,debouncedFetchCitiesByKeyword:ue,debouncedFetchSearchResults:me,focusLocationInput:xe,focusSearchInput:Ee,renderLocationResults:we,renderSearchResults:Le,trackingAttributes:g,locationTrackingAttributes:f,onSearch:L,initalSearchValue:c})}return t.useEffect((()=>{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)}}}),[$]),t.useEffect((()=>{if(X&&D&&"ms-MY"===I){const e=`/${X.slug}/hospital`;G({type:fe.NavigateTo,payload:e}),B(!1)}}),[D,I,X]),i?E.default.createElement(E.default.Fragment,null,E.default.createElement(P,null),E.default.createElement(A,{ref:_}),E.default.createElement(M,{id:"booking-search-bar",ref:N,"data-is-modal":i&&oe,style:{"--mobile-care-searchbar-height":oe&&F?`${F}px`:"100%"}},oe?E.default.createElement(E.default.Fragment,null,E.default.createElement(R,null,E.default.createElement(pe,{headingText:k("booking.searchBar.searchButton"),onLeftClick:Se}),Ie()),we(),Le()):E.default.createElement(ne,{onClick:function(){var t;return e.__awaiter(this,void 0,void 0,(function*(){_.current&&_.current.focus(),G({type:fe.OpenMobileModal}),yield Promise.resolve(),N.current&&(null===(t=N.current.querySelector('input[name="search-location"]'))||void 0===t||t.focus())}))},focused:Q,value:W,trackingAttributes:g,inputSearchPlaceholder:C}))):E.default.createElement(j,{id:"booking-search-bar",ref:N},Ie())},exports.BookingSearchBarV2=({isMobile:e,careApiDomain:i,geoLocationPermission:l,geoLocationCoordinates:n,initialSelectedCity:s,initialSearchValue:r="",initTypeSearch:c="hospital",initSpecialty:d,careFrontDomain:u="/care",isDebug:f=!1,gaTrackingSearchBar:m,gaTrackingLocationSearch:C,autoCompleteDisabled:b=!1,inputSearchPlaceholder:y="",hideTabBookingSearch:v=[],hideSpecialtySelection:x=!1,hidePopularSearchKeys:w=!1,clientSlug:L="",routerPush:O,onGeoLocationPermissionChange:k,onChangeLocation:I})=>{const{locale:j,t:M}=a.useTranslations(),R=t.useRef(null),A=t.useRef(null),[N,P]=t.useState(c),{geoLocationPermission:_,geoLocationCoordinates:F}=T(),[$,D]=t.useReducer(ot,tt,(t=>Object.assign(Object.assign({},t),{isDebug:f,isMobile:e,geoLocationPermission:l||_||"unset",geoLocationCoordinates:n||F||null,searchKeywords:r,initialSelectedCity:s||null,selectedLocation:s||t.selectedLocation||null,searchLocationKeywords:(null==s?void 0:s.name)||t.searchLocationKeywords,autoCompleteDisabled:b,inputSearchPlaceholder:y,locale:j}))),{navigateTo:B,focusedSpecialty:V,searchKeywords:K,geoLocationPermission:H,selectedLocation:z,selectedSpecialty:G,initialSelectedCity:Z,searchResults:U,isLoadingSearchResults:Q}=$,{fetchCitiesByLocation:q,fetchCitiesByKeyword:Y,fetchSearchResults:W,fetchAllSpecialties:J,fetchPopularKeys:X}=function({dispatch:e,careApiDomain:a,locale:i="vi-VN"}){const l=t.useCallback((function(t,o={}){const l=`${a}${t}`;return e({type:at.FetchCitiesStart}),fetch(Ye(l,o,i),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:at.FetchCitiesFinish})))}),[i]);return{fetchCitiesByLocation:t.useCallback((function({coordinates:t}){let a={};const o={};t&&(a={lat:t.lat,lng:t.lng}),"ms-MY"===i&&(o.noPaging=1);const n=[l(h.PATHS.GET_CITY_BY_IP,Object.assign(Object.assign({},a),o))];return"zh-TW"===i&&n.push(l(h.PATHS.GET_CITIES_LIST,{noPaging:1})),Promise.all(n).then((([t,a])=>{const i=Object.assign({},t);if(a){const e=i.cities.map((e=>e.id));i.cities=i.cities.concat(a.cities.filter((t=>!e.includes(t.id))))}e({type:at.FetchCitiesByGeoIpComplete,payload:i})})).catch((e=>console.error("error loading cities by location",e)))}),[i,a,e]),fetchCitiesByKeyword:t.useCallback((function(t){return l(h.PATHS.GET_CITIES_LIST,{keyword:t}).then((t=>{e({type:at.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,a,e]),fetchSearchResults:t.useCallback((function(t,l,n,s,r){const c="specialty"===n?`${a}${h.PATHS.GET_SEARCH_SPECIALTY}`:`${a}${h.PATHS.GET_SEARCH_V2}`;e({type:at.FetchSearchResultsStart});const{selectedLocation:d,geoLocationCoordinates:u,selectedSpecialty:p}=l;let g="";if(!d)return void e({type:at.FetchSearchResultsFinish});g=d.id===o.ID_OPTION_ALL_LOCATION?"":d.id;const f=(null==u?void 0:u.lat)||"",m=(null==u?void 0:u.lng)||"",C=(null==p?void 0:p.id)>0?null==p?void 0:p.id:"",b=t.trim().length>et[i]?t.trim():"";return fetch(Ye(c,{domain:a,searchType:n||"global",keyword:b,city:g===o.ID_OPTION_CURRENT_LOCATION?"":g,lat:f,lng:m,specialty_id:C,client_slug:s},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{let a=[];"specialty"!==n&&(a=t.searches),"specialty"===n&&(a=b?t.specialties:t.default),e({type:at.FetchSearchResultsComplete,payload:{key:n,searches:a||[]}}),r&&e({type:at.UpdateInitialSearchResults,payload:{key:n,searches:a||[]}})})).catch((e=>{console.log("error loading search results",{url:c,error:e})})).finally((()=>e({type:at.FetchSearchResultsFinish})))}),[i,a,e]),fetchAllSpecialties:t.useCallback((function(){const t=`${a}${h.PATHS.GET_SEARCH_SPECIALTY}`;return fetch(Ye(t,{domain:a,searchType:""},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{e({type:at.FetchAllSpecialties,payload:t.specialties||[]})})).catch((e=>{console.log("error loading search results",{url:t,error:e})}))}),[i,a,e]),fetchPopularKeys:t.useCallback((function(t){const o=`${a}${h.PATHS.GET_SEARCH_POPULAR_KEY}`;return fetch(Ye(o,{domain:a,searchType:Ft[t],sort_by:"display_order",sort_order:"asc"},i)).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{e({type:at.FetchPopularKeys,payload:t.popular_searches||[]})})).catch((e=>{console.log("error loading search results",{url:o,error:e})}))}),[i,a,e])}}({dispatch:D,locale:j,careApiDomain:i}),ee=t.useMemo((()=>o.LOCALIZED_SLUGS[j]),[j]),te=t.useMemo((()=>({doctor:{name:M("booking.searchPopup.doctors"),icon:E.default.createElement(ft,null),slug:ee.DOCTOR},service:{name:M("booking.searchPopup.services"),icon:E.default.createElement(mt,null),slug:ee.SERVICE},hospital:{name:M("booking.searchPopup.hospitals"),icon:E.default.createElement(Ct,null),slug:ee.HOSPITAL},specialty:{name:M("booking.searchPopup.specialties"),icon:E.default.createElement(bt,null),slug:ee.SPECIALTIES}})),[N]),ae=t.useMemo((()=>S.default(Y,400)),[Y]),ie=t.useMemo((()=>S.default(W,400)),[W]),oe=t.useCallback((function(e){D({type:at.SelectLocation,payload:e}),le(),I&&I(e)}),[M,D]);function le(){var e;R.current&&(null===(e=R.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}return p.useOutsideClick(A,(()=>{D({type:at.ClickOutsideInputSearchSpecialty})})),t.useEffect((()=>{var t;"denied"===H||Z||D({type:at.SelectLocation,payload:{name:M("booking.searchBar.allLocations"),id:o.ID_OPTION_ALL_LOCATION,slug:null===(t=o.LOCALIZED_SLUGS[j])||void 0===t?void 0:t.ALL}}),k&&k(H,$.geoLocationCoordinates),e&&"granted"===H&&z&&D({type:at.FocusInputSearch}),q({coordinates:$.geoLocationCoordinates})}),[H]),t.useEffect((()=>{const e=d||{name:M("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:ee.SPECIALTIES};$.selectedSpecialty||D({type:at.SelectSpecialty,payload:e})}),[d,$.selectedSpecialty]),t.useEffect((()=>{J()}),[]),t.useEffect((()=>{X(N)}),[N]),t.useEffect((()=>{B&&(O?O(B):window.location.href=`${u}${B}`)}),[B]),t.useEffect((()=>{W($.searchKeywords,$,N,L,!0)}),[z,G,N]),E.default.createElement(We,{ref:R},E.default.createElement(_t,{currentTab:N,setCurrentTab:P,isMobile:e,hideTabBookingSearch:v}),E.default.createElement(Je,{className:"booking-search-container"},E.default.createElement(Xe,null,E.default.createElement("div",{ref:A},E.default.createElement(g.Flex,{gap:"12px",justify:"space-between",align:"center",direction:e?"column":"row",className:"flex-search-input"},"specialty"!==N&&E.default.createElement(Lt,{state:$,isMobile:e,dispatch:D,debouncedFetchCitiesByKeyword:ae,selectedLocation:z,onLocationClick:oe,trackingAttributes:C}),E.default.createElement(vt,{type:N,isMobile:e,state:$,dispatch:D,debouncedFetchSearchResults:ie,initalSearchValue:r,focusSearchInput:le,typeInformation:te,trackingAttributes:m,isLoading:Q,hideSpecialtySelection:x,clientSlug:L}),E.default.createElement(g.Button,{size:e?"md":"lg",fullWidth:e,onClick:function(){let e="";const{slug:t}=te[N];let a="";("doctor"===N||"hospital"===N)&&$.selectedSpecialty.id>0&&(a=`&specialtyId=${$.selectedSpecialty.id}`),e="specialty"===N?`/${t}`:`/${z.slug}/${t}`,L===o.CLIENT_GSK&&(e+=`/${L}`),e+=`?q=${K}${a}`,e&&D({type:at.NavigateTo,payload:e})},styles:{root:{height:e?"40px":"48px"}}},M("booking.searchBar.searchButton"))),!w&&"specialty"!==N&&$.popularKeys.length>0&&E.default.createElement(Nt,{type:N,state:$,typeInformation:te,dispatch:D}),"specialty"===N&&"search"===V&&E.default.createElement(jt,{state:$,isMobile:e,dispatch:D,specialties:(null==U?void 0:U.specialty)||[],isLoading:Q,clientSlug:L})))))},exports.ChevronDown=I,exports.types=Dt;
package/build/types.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Onboarding-2b01db17.js");Object.defineProperty(exports,"BabyGrowthChartDuration",{enumerable:!0,get:function(){return e.BabyGrowthChartDuration}}),Object.defineProperty(exports,"BabyGrowthChartType",{enumerable:!0,get:function(){return e.BabyGrowthChartType}}),Object.defineProperty(exports,"BabyGrowthResultTab",{enumerable:!0,get:function(){return e.BabyGrowthResultTab}}),Object.defineProperty(exports,"Gender",{enumerable:!0,get:function(){return e.Gender}}),Object.defineProperty(exports,"LOCALE",{enumerable:!0,get:function(){return e.LOCALE}}),Object.defineProperty(exports,"OnboardingStep",{enumerable:!0,get:function(){return e.OnboardingStep}});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Onboarding-2f763873.js");Object.defineProperty(exports,"BabyGrowthChartDuration",{enumerable:!0,get:function(){return e.BabyGrowthChartDuration}}),Object.defineProperty(exports,"BabyGrowthChartType",{enumerable:!0,get:function(){return e.BabyGrowthChartType}}),Object.defineProperty(exports,"BabyGrowthResultTab",{enumerable:!0,get:function(){return e.BabyGrowthResultTab}}),Object.defineProperty(exports,"Gender",{enumerable:!0,get:function(){return e.Gender}}),Object.defineProperty(exports,"LOCALE",{enumerable:!0,get:function(){return e.LOCALE}}),Object.defineProperty(exports,"OnboardingStep",{enumerable:!0,get:function(){return e.OnboardingStep}});
@@ -1 +1 @@
1
- "use strict";var e=require("react"),a=require("./Onboarding-2b01db17.js"),n=require("./useTranslations-2e7d64aa.js");const t={"vi-VN":"mang-thai","id-ID":"kehamilan","ms-MY":"kehamilan","km-KH":"ពពោះ","en-PH":"pregnancy","tl-PH":"pregnancy","th-TH":"การตั้งครรภ์","my-MM":"pregnancy","zh-TW":"pregnancy","hi-IN":"pregnancy"},b={[a.LOCALE.Vietnam]:{sexualWellness:"suc-khoe-tinh-duc",health:"suc-khoe",healthyEating:"an-uong-lanh-manh",skinHealth:"da-lieu",healthyHabit:"thoi-quen-lanh-manh",drug:"thuoc",womensHealth:"suc-khoe-phu-nu",fitness:"the-duc-the-thao",pregnancy:"mang-thai",parenting:"nuoi-day-con",diabetes:"tieu-duong-dai-thao-duong",healthyMind:"tam-ly-tam-than"},[a.LOCALE.Indonesia]:{pregnancy:"kehamilan",parenting:"parenting",health:"sehat",diabetes:"diabetes",womensHealth:"wanita",drug:"obat-suplemen",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.Malaysia]:{pregnancy:"kehamilan",parenting:"keibubapaan",health:"kesihatan",diabetes:"kencing-manis",womensHealth:"kesihatan-wanita",drug:"ubat",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.Cambodia]:{pregnancy:"%e1%9e%96%e1%9e%96%e1%9f%84%e1%9f%87",parenting:"%e1%9e%85%e1%9e%b7%e1%9e%89%e1%9f%92%e1%9e%85%e1%9e%b9%e1%9e%98%e1%9e%80%e1%9e%bc%e1%9e%93",health:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%91%e1%9e%bc%e1%9e%91%e1%9f%85",diabetes:"%e1%9e%87%e1%9f%86%e1%9e%84%e1%9e%ba%e1%9e%91%e1%9e%b9%e1%9e%80%e1%9e%93%e1%9f%84%e1%9e%98%e1%9e%95%e1%9f%92%e1%9e%a2%e1%9f%82%e1%9e%98",womensHealth:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%9f%e1%9f%92%e1%9e%8f%e1%9f%92%e1%9e%9a%e1%9e%b8",drug:"%e1%9e%b1%e1%9e%9f%e1%9e%90%e1%9e%93%e1%9e%b7%e1%9e%84%e1%9e%a2%e1%9e%b6%e1%9e%a0%e1%9e%b6%e1%9e%9a%e1%9e%94%e1%9f%86%e1%9e%94%e1%9f%89%e1%9e%93",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.PhilippinesEnglish]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.PhilippinesTagalog]:{pregnancy:"pagbubuntis",parenting:"pagiging-magulang",health:"kalusugan",diabetes:"diabetes-fil",womensHealth:"kalusugan-kababaihan",drug:"drugs-at-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.Thailand]:{pregnancy:"%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87%e0%b8%84%e0%b8%a3%e0%b8%a3%e0%b8%a0%e0%b9%8c",parenting:"%e0%b8%9e%e0%b9%88%e0%b8%ad%e0%b9%81%e0%b8%a1%e0%b9%88%e0%b9%80%e0%b8%a5%e0%b8%b5%e0%b9%89%e0%b8%a2%e0%b8%87%e0%b8%a5%e0%b8%b9%e0%b8%81",health:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e",diabetes:"%e0%b9%82%e0%b8%a3%e0%b8%84%e0%b9%80%e0%b8%9a%e0%b8%b2%e0%b8%ab%e0%b8%a7%e0%b8%b2%e0%b8%99",womensHealth:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e%e0%b8%ab%e0%b8%8d%e0%b8%b4%e0%b8%87",drug:"%e0%b8%a2%e0%b8%b2%e0%b9%81%e0%b8%a5%e0%b8%b0%e0%b8%ad%e0%b8%b2%e0%b8%ab%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%aa%e0%b8%a3%e0%b8%b4%e0%b8%a1",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.Myanmar]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-az",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.Taiwan]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplement",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.India]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",diabetesEn:"en-diabetes",drug:"dawaai",sexualWellness:"",healthyEating:"",skinHealth:""}};exports.MAPPED_CATEGORY_SLUGS=b,exports.PREGNANCY_SLUG=t,exports.useCategory=a=>{const{locale:s}=n.useTranslations();return{isPregnancy:e.useMemo((()=>decodeURI(a.replace(/\//gi,"")).includes(t[s])),[]),isParenting:e.useMemo((()=>{var e;return decodeURI(a.replace(/\//gi,"")).includes(null===(e=b[s])||void 0===e?void 0:e.parenting)}),[]),type:e.useMemo((()=>function(e,a){const n=e.split("/");for(const e in a){const t=a[e];if(n.includes(t))return e}return null}(a,b[s])),[a,s])}};
1
+ "use strict";var e=require("react"),a=require("./Onboarding-2f763873.js"),n=require("./useTranslations-1901ec76.js");const t={"vi-VN":"mang-thai","id-ID":"kehamilan","ms-MY":"kehamilan","km-KH":"ពពោះ","en-PH":"pregnancy","tl-PH":"pregnancy","th-TH":"การตั้งครรภ์","my-MM":"pregnancy","zh-TW":"pregnancy","hi-IN":"pregnancy"},b={[a.LOCALE.Vietnam]:{sexualWellness:"suc-khoe-tinh-duc",health:"suc-khoe",healthyEating:"an-uong-lanh-manh",skinHealth:"da-lieu",healthyHabit:"thoi-quen-lanh-manh",drug:"thuoc",womensHealth:"suc-khoe-phu-nu",fitness:"the-duc-the-thao",pregnancy:"mang-thai",parenting:"nuoi-day-con",diabetes:"tieu-duong-dai-thao-duong",healthyMind:"tam-ly-tam-than"},[a.LOCALE.Indonesia]:{pregnancy:"kehamilan",parenting:"parenting",health:"sehat",diabetes:"diabetes",womensHealth:"wanita",drug:"obat-suplemen",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.Malaysia]:{pregnancy:"kehamilan",parenting:"keibubapaan",health:"kesihatan",diabetes:"kencing-manis",womensHealth:"kesihatan-wanita",drug:"ubat",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.Cambodia]:{pregnancy:"%e1%9e%96%e1%9e%96%e1%9f%84%e1%9f%87",parenting:"%e1%9e%85%e1%9e%b7%e1%9e%89%e1%9f%92%e1%9e%85%e1%9e%b9%e1%9e%98%e1%9e%80%e1%9e%bc%e1%9e%93",health:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%91%e1%9e%bc%e1%9e%91%e1%9f%85",diabetes:"%e1%9e%87%e1%9f%86%e1%9e%84%e1%9e%ba%e1%9e%91%e1%9e%b9%e1%9e%80%e1%9e%93%e1%9f%84%e1%9e%98%e1%9e%95%e1%9f%92%e1%9e%a2%e1%9f%82%e1%9e%98",womensHealth:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%9f%e1%9f%92%e1%9e%8f%e1%9f%92%e1%9e%9a%e1%9e%b8",drug:"%e1%9e%b1%e1%9e%9f%e1%9e%90%e1%9e%93%e1%9e%b7%e1%9e%84%e1%9e%a2%e1%9e%b6%e1%9e%a0%e1%9e%b6%e1%9e%9a%e1%9e%94%e1%9f%86%e1%9e%94%e1%9f%89%e1%9e%93",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.PhilippinesEnglish]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.PhilippinesTagalog]:{pregnancy:"pagbubuntis",parenting:"pagiging-magulang",health:"kalusugan",diabetes:"diabetes-fil",womensHealth:"kalusugan-kababaihan",drug:"drugs-at-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.Thailand]:{pregnancy:"%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87%e0%b8%84%e0%b8%a3%e0%b8%a3%e0%b8%a0%e0%b9%8c",parenting:"%e0%b8%9e%e0%b9%88%e0%b8%ad%e0%b9%81%e0%b8%a1%e0%b9%88%e0%b9%80%e0%b8%a5%e0%b8%b5%e0%b9%89%e0%b8%a2%e0%b8%87%e0%b8%a5%e0%b8%b9%e0%b8%81",health:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e",diabetes:"%e0%b9%82%e0%b8%a3%e0%b8%84%e0%b9%80%e0%b8%9a%e0%b8%b2%e0%b8%ab%e0%b8%a7%e0%b8%b2%e0%b8%99",womensHealth:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e%e0%b8%ab%e0%b8%8d%e0%b8%b4%e0%b8%87",drug:"%e0%b8%a2%e0%b8%b2%e0%b9%81%e0%b8%a5%e0%b8%b0%e0%b8%ad%e0%b8%b2%e0%b8%ab%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%aa%e0%b8%a3%e0%b8%b4%e0%b8%a1",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.Myanmar]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-az",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.Taiwan]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplement",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.India]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",diabetesEn:"en-diabetes",drug:"dawaai",sexualWellness:"",healthyEating:"",skinHealth:""}};exports.MAPPED_CATEGORY_SLUGS=b,exports.PREGNANCY_SLUG=t,exports.useCategory=a=>{const{locale:s}=n.useTranslations();return{isPregnancy:e.useMemo((()=>decodeURI(a.replace(/\//gi,"")).includes(t[s])),[]),isParenting:e.useMemo((()=>{var e;return decodeURI(a.replace(/\//gi,"")).includes(null===(e=b[s])||void 0===e?void 0:e.parenting)}),[]),type:e.useMemo((()=>function(e,a){const n=e.split("/");for(const e in a){const t=a[e];if(n.includes(t))return e}return null}(a,b[s])),[a,s])}};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./tslib.es6-ada91747.js"),t=require("react"),a=require("./getDynamicHealthTool-5c61456a.js");exports.useHealthToolsCache=o=>{const[i,l]=t.useState([]);t.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){const e=yield a.getDynamicHealthToolWithCache(o);l(e)}))}),[a.getDynamicHealthToolWithCache,o]);const r=t.useCallback((e=>{var t;return(null===(t=i.find((t=>t.template===e)))||void 0===t?void 0:t.link)||""}),[i]);return{allTools:i,getHealthToolLink:r}};
@@ -1 +1 @@
1
- "use strict";var e=require("./tslib.es6-0d31715f.js"),t=require("react"),r=require("./cookieHelper-47e34efa.js"),n=require("./useUniqueId-86a9e1d4.js");function i(e){const t=(new TextEncoder).encode(e.trim().toLowerCase());return crypto.subtle.digest("SHA-256",t).then((e=>Array.from(new Uint8Array(e)).map((e=>e.toString(16).padStart(2,"0"))).join("")))}exports.useFbDataLayer=n=>{const a=t.useRef("");t.useEffect((()=>(e.__awaiter(void 0,void 0,void 0,(function*(){var e,t,o,u,l;if(!a.current){let e=yield fetch("https://api.ipify.org").then((e=>e.text()));e||(e=yield fetch("https://icanhazip.com").then((e=>e.text()))),a.current=e}if(null===(t=null===(e=window.localStorage)||void 0===e?void 0:e.setItem)||void 0===t||t.call(e,"fbClientIp",JSON.stringify({client_ip_address:(null===(o=a.current)||void 0===o?void 0:o.replace("\n",""))||"",client_user_agent:navigator.userAgent||""})),null==n?void 0:n.id){const[e,t,a,o,s,c]=yield Promise.all([n.email?i(n.email):null,n.phone?i(n.phone):null,n.birthday?i(n.birthday.split("-").join("")):null,n.gender?"m":"f",n.city_name?i(n.city_name).then((e=>e.replace(/\s/g,""))):null,n.name?i(n.name):null]);r.getCookie("_fbc"),r.getCookie("_fbp");const d={user_id:n.id};c&&(d.fn=c),e&&(d.em=e),t&&(d.ph=t),a&&(d.db=a),s&&(d.ct=s),null===(l=null===(u=window.localStorage)||void 0===u?void 0:u.setItem)||void 0===l||l.call(u,"fbDataLayer_userInfo",JSON.stringify(d))}})),()=>{})),[n])},exports.usePrevious=e=>{const r=t.useRef(),i=t.useRef(e);return n.useInitialMount()||i.current===e||(r.current=i.current,i.current=e),r.current},exports.useRafState=e=>{const[r,n]=t.useState(e),i=t.useRef(0),a=t.useCallback((e=>{cancelAnimationFrame(i.current),i.current=requestAnimationFrame((()=>{n(e)}))}),[]);return t.useEffect((()=>()=>cancelAnimationFrame(i.current))),[r,a]};
1
+ "use strict";var e=require("./tslib.es6-ada91747.js"),t=require("react"),r=require("./cookieHelper-56a7d794.js"),n=require("./useUniqueId-e09145f0.js");function i(e){const t=(new TextEncoder).encode(e.trim().toLowerCase());return crypto.subtle.digest("SHA-256",t).then((e=>Array.from(new Uint8Array(e)).map((e=>e.toString(16).padStart(2,"0"))).join("")))}exports.useFbDataLayer=n=>{const a=t.useRef("");t.useEffect((()=>(e.__awaiter(void 0,void 0,void 0,(function*(){var e,t,o,u,l;if(!a.current){let e=yield fetch("https://api.ipify.org").then((e=>e.text()));e||(e=yield fetch("https://icanhazip.com").then((e=>e.text()))),a.current=e}if(null===(t=null===(e=window.localStorage)||void 0===e?void 0:e.setItem)||void 0===t||t.call(e,"fbClientIp",JSON.stringify({client_ip_address:(null===(o=a.current)||void 0===o?void 0:o.replace("\n",""))||"",client_user_agent:navigator.userAgent||""})),null==n?void 0:n.id){const[e,t,a,o,s,c]=yield Promise.all([n.email?i(n.email):null,n.phone?i(n.phone):null,n.birthday?i(n.birthday.split("-").join("")):null,n.gender?"m":"f",n.city_name?i(n.city_name).then((e=>e.replace(/\s/g,""))):null,n.name?i(n.name):null]);r.getCookie("_fbc"),r.getCookie("_fbp");const d={user_id:n.id};c&&(d.fn=c),e&&(d.em=e),t&&(d.ph=t),a&&(d.db=a),s&&(d.ct=s),null===(l=null===(u=window.localStorage)||void 0===u?void 0:u.setItem)||void 0===l||l.call(u,"fbDataLayer_userInfo",JSON.stringify(d))}})),()=>{})),[n])},exports.usePrevious=e=>{const r=t.useRef(),i=t.useRef(e);return n.useInitialMount()||i.current===e||(r.current=i.current,i.current=e),r.current},exports.useRafState=e=>{const[r,n]=t.useState(e),i=t.useRef(0),a=t.useCallback((e=>{cancelAnimationFrame(i.current),i.current=requestAnimationFrame((()=>{n(e)}))}),[]);return t.useEffect((()=>()=>cancelAnimationFrame(i.current))),[r,a]};
@@ -1 +1 @@
1
- "use strict";var e=require("react"),t=require("./translationsContext-f962ff63.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=a(require("string-format"));exports.useTranslations=function(){const{values:a,locale:o}=e.useContext(t.TranslationsContext)||{locale:"en-PH"};return e.useMemo((()=>({t:(e,t)=>a?a[e]?t?n.default(a[e]||e,t):a[e]||e:(console.warn(`[useTranslations] Missing translation for key ${e} and locale ${o}`),t?n.default(e,t):e):(console.error("[useTranslations] t method called before translation values are loaded"),e),locale:o})),[a,o])};
1
+ "use strict";var e=require("react"),t=require("./translationsContext-91bf4ce0.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=a(require("string-format"));exports.useTranslations=function(){const{values:a,locale:o}=e.useContext(t.TranslationsContext)||{locale:"en-PH"};return e.useMemo((()=>({t:(e,t)=>a?a[e]?t?n.default(a[e]||e,t):a[e]||e:(console.warn(`[useTranslations] Missing translation for key ${e} and locale ${o}`),t?n.default(e,t):e):(console.error("[useTranslations] t method called before translation values are loaded"),e),locale:o})),[a,o])};
@@ -1 +1 @@
1
- "use strict";var i=require("./Onboarding-2b01db17.js");const a={[i.LOCALE.Vietnam]:"VN",[i.LOCALE.Cambodia]:"KH",[i.LOCALE.Indonesia]:"ID",[i.LOCALE.Malaysia]:"MY",[i.LOCALE.PhilippinesEnglish]:"PH",[i.LOCALE.PhilippinesTagalog]:"PH",[i.LOCALE.Taiwan]:"TW",[i.LOCALE.Thailand]:"TH",[i.LOCALE.Myanmar]:"MM"};exports.MAPPED_LOCALE=a,exports.hiddenEmailChar=(i="")=>{const a=i.indexOf("@"),n=i.substring(0,a),L=n.length>3?3:n.length;return i.replace(i.substring(L,a),i.slice(L,a).replace(/./g,"x"))};
1
+ "use strict";var i=require("./Onboarding-2f763873.js");const a={[i.LOCALE.Vietnam]:"VN",[i.LOCALE.Cambodia]:"KH",[i.LOCALE.Indonesia]:"ID",[i.LOCALE.Malaysia]:"MY",[i.LOCALE.PhilippinesEnglish]:"PH",[i.LOCALE.PhilippinesTagalog]:"PH",[i.LOCALE.Taiwan]:"TW",[i.LOCALE.Thailand]:"TH",[i.LOCALE.Myanmar]:"MM"};exports.MAPPED_LOCALE=a,exports.hiddenEmailChar=(i="")=>{const a=i.indexOf("@"),n=i.substring(0,a),L=n.length>3?3:n.length;return i.replace(i.substring(L,a),i.slice(L,a).replace(/./g,"x"))};
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./tslib.es6-0d31715f.js"),t=require("react"),a=require("@mantine/core"),l=require("./index.styles-9285e23d.js");require("@mantine/dates"),require("./index-a89b23de.js");var n=require("./Onboarding-2b01db17.js");require("./gAssets.js");var r=require("dayjs"),i=require("./screenSizeContext-4d5786c6.js"),o=require("styled-components"),c=require("./theme-1a7c14fb.js");require("./isProduction-e1b7813f.js");var s=require("./useTranslations-2e7d64aa.js");require("./index-dad94e78.js");var d=require("@mantine/hooks");require("lodash/debounce"),require("./useCategory-971481b4.js");var u=require("./index-4046269f.js");require("./translationsContext-f962ff63.js"),require("string-format");var m=require("./index-5b7dfda4.js"),f=require("./index-f36821a3.js"),C=require("@mantine/form"),p=require("dayjs/plugin/customParseFormat"),g=require("./index-2db33f49.js");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("./index-e022af07.js"),require("react-keyed-flatten-children"),require("@mantine/carousel"),require("./useUniqueId-86a9e1d4.js"),require("./cookieHelper-47e34efa.js"),require("slugify"),require("date-fns/locale"),require("lodash/throttle");var b=h(t),E=h(r),x=h(o),v=h(p);const y=x.default.div`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./tslib.es6-ada91747.js"),t=require("react"),a=require("@mantine/core"),l=require("./index.styles-b9febcc9.js");require("@mantine/dates"),require("./index-06a0ee4f.js");var n=require("./Onboarding-2f763873.js");require("./gAssets.js");var r=require("dayjs"),i=require("./screenSizeContext-5fb2e1e3.js"),o=require("styled-components"),c=require("./theme-430914fa.js");require("./isProduction-0720723e.js");var s=require("./useTranslations-1901ec76.js");require("./index-f9ef69b8.js");var d=require("@mantine/hooks");require("lodash/debounce"),require("./useCategory-ff3032d0.js");var u=require("./index-17d4eae2.js");require("./translationsContext-91bf4ce0.js"),require("string-format");var m=require("./index-63626740.js"),f=require("./index-6a45ff11.js"),C=require("@mantine/form"),p=require("dayjs/plugin/customParseFormat"),g=require("./index-76173979.js");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("./index-5c8e9580.js"),require("react-keyed-flatten-children"),require("@mantine/carousel"),require("./useUniqueId-e09145f0.js"),require("./cookieHelper-56a7d794.js"),require("slugify"),require("date-fns/locale"),require("lodash/throttle");var b=h(t),E=h(r),x=h(o),v=h(p);const y=x.default.div`
2
2
  position: relative;
3
3
  padding: 16px;
4
4
  min-height: 110px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hhgtech/hhg-components",
3
- "version": "1.27.113",
3
+ "version": "1.27.115",
4
4
  "main": "build/index.js",
5
5
  "module": "build/esm/index.js",
6
6
  "files": [
@@ -1 +0,0 @@
1
- "use strict";var t=require("./tslib.es6-0d31715f.js"),e=require("./isProduction-e1b7813f.js");const i={},a=t=>{if("undefined"!=typeof window){let i;try{i=JSON.parse(localStorage.getItem((e.isProduction?"":"staging_")+"hhg-cache-"+t)||"{}")}catch(t){}return i||{}}return i[t]},r=(t,a)=>{try{"undefined"!=typeof window?localStorage.setItem((e.isProduction?"":"staging_")+"hhg-cache-"+t,JSON.stringify({data:a,time:Date.now()})):i[t]={data:a,time:Date.now()}}catch(t){}};exports.getCachedItem=a,exports.getDataWithCache=(e,i,o,n=9e5)=>t.__awaiter(void 0,void 0,void 0,(function*(){const t=a(e);if(t&&t.data&&t.time&&Date.now()-t.time<n)return t.data;if(i){const t=yield i();return o&&!o(t)||r(e,t),t}return null})),exports.setCachedItem=r;
@@ -1 +0,0 @@
1
- import{_ as o}from"./tslib.es6-0405df6a.js";import t from"react";import{Indicator as s}from"@mantine/core";import"dayjs";import"./screenSizeContext-4ff53e25.js";import"styled-components";import{t as e}from"./theme-b5489d82.js";import"./index-c9c1af14.js";import"./isProduction-85c6cb19.js";import"./Onboarding-3631c6d1.js";import"./gAssets.js";const r=r=>{var{styles:i,color:n=e.colors.red700}=r,c=o(r,["styles","color"]);return t.createElement(s,Object.assign({inline:!0,position:"top-end",offset:4,styles:Object.assign({processing:{animationDirection:"alternate"}},i),color:n},c))};export{r as I};
@@ -1 +0,0 @@
1
- import{a as o}from"./tslib.es6-0405df6a.js";import{useState as t,useEffect as i,useCallback as a}from"react";import{a as e}from"./getDynamicHealthTool-0e9dffaf.js";const l=l=>{const[n,r]=t([]);i((()=>{o(void 0,void 0,void 0,(function*(){const o=yield e(l);r(o)}))}),[e,l]);const s=a((o=>{var t;return(null===(t=n.find((t=>t.template===o)))||void 0===t?void 0:t.link)||""}),[n]);return{allTools:n,getHealthToolLink:s}};export{l as u};
@@ -1,53 +0,0 @@
1
- "use strict";var e=require("./tslib.es6-0d31715f.js"),r=require("react"),t=require("@mantine/core"),i=require("./index.styles-9285e23d.js");require("@mantine/dates");var n=require("./index-a89b23de.js");require("./Onboarding-2b01db17.js"),require("./gAssets.js"),require("dayjs");var o=require("./screenSizeContext-4d5786c6.js"),a=require("styled-components"),s=require("./theme-1a7c14fb.js");require("./isProduction-e1b7813f.js"),require("./translationsContext-f962ff63.js"),require("string-format"),require("./index-dad94e78.js"),require("@mantine/hooks");var d=require("@mantine/form");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=c(r),l=c(a);const u=r.createContext({}),[p,g,f]=d.createFormContext(),x=l.default.div`
2
- margin-top: 70px;
3
- display: flex;
4
- flex-direction: column;
5
- align-items: center;
6
- justify-content: center;
7
- &.similac {
8
- margin-top: 16px;
9
- }
10
- `,h=l.default(t.Container)`
11
- &.hhg-comp-onboarding-container.hhg-comp-onboarding-container {
12
- display: flex;
13
- flex-direction: column;
14
- align-items: center;
15
- height: 100%;
16
- width: 100%;
17
- max-width: 520px;
18
- }
19
- .header {
20
- margin-bottom: 32px;
21
- text-align: center;
22
- ${o.MediaQueries.mbDown} {
23
- margin-bottom: 16px;
24
- }
25
- }
26
-
27
- .input-control {
28
- width: 100%;
29
- }
30
- .radio-group,
31
- .input-control {
32
- margin-bottom: 16px;
33
- }
34
- .form {
35
- width: 100%;
36
- }
37
-
38
- /* .form-error {
39
- margin-top: 32px;
40
- font-size: 14px;
41
- }
42
-
43
- .field-error {
44
- margin-top: 10px;
45
- font-size: 14px;
46
- } */
47
-
48
- .form-button {
49
- width: 100%;
50
- }
51
- `,b=l.default.img`
52
- margin-bottom: 38px;
53
- `;exports.FormProvider=p,exports.Onboarding=o=>{var a,{heading:d,description:c,children:l,className:p,imgSrc:g,hiddenLogo:f=!1}=o,q=e.__rest(o,["heading","description","children","className","imgSrc","hiddenLogo"]);const{isMarryBaby:j,siteType:y}=r.useContext(u);return m.default.createElement(h,Object.assign({},q,{className:`hhg-comp-onboarding-container ${p}`,size:"sm"}),!f&&m.default.createElement(i.LogoIcon,{type:j?y:(null===(a=n.LOCALE_SPECS[process.env.UNIFY_LOCALE])||void 0===a?void 0:a.LOGO_TYPE)||"hellobacsi"}),m.default.createElement(x,{className:f?"similac":""},g&&m.default.createElement(b,{src:g,loading:"lazy"}),(d||c)&&m.default.createElement("div",{className:"header"},d&&m.default.createElement(t.Title,{order:3},d),c&&m.default.createElement(i.Text,{size:"p3",mt:8,color:s.theme.colors.gray600},c)),l))},exports.OnboardingContext=u,exports.useForm=f,exports.useFormContext=g;
@@ -1 +0,0 @@
1
- "use strict";var e=require("./tslib.es6-0d31715f.js"),t=require("react"),r=require("@mantine/core"),s=require("@mantine/dates"),i=require("./index-a89b23de.js"),a=require("./Onboarding-2b01db17.js"),n=require("./gAssets.js"),l=require("./index.styles-9285e23d.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=o(t);exports.DatePicker=t=>{var o,{value:d,fullWidth:c=!0}=t,v=e.__rest(t,["value","fullWidth"]);return u.default.createElement(s.DatePickerInput,Object.assign({locale:l.MAPPED_LOCALE[process.env.UNIFY_LOCALE||a.LOCALE.Vietnam],valueFormat:null===(o=i.ISO_FORMAT[process.env.UNIFY_LOCALE||a.LOCALE.Vietnam])||void 0===o?void 0:o.dateFormat,size:"md",clearable:!1,popoverProps:c?{styles:{dropdown:{minWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"}}}:{},styles:{root:{position:"relative"},rightSection:{pointerEvents:"none",cursor:"default"}},rightSection:u.default.createElement(r.Image,{src:n.CommonGAssets.getAssetPath(v.isMB?"MB-calendar.svg":"OutlineCalendar.svg"),width:16,height:16}),value:d},v,{className:`input-control ${(null==v?void 0:v.className)||""}`}))};
@@ -1 +0,0 @@
1
- "use strict";var e=require("./tslib.es6-0d31715f.js"),t=require("react"),s=require("@mantine/core"),r=require("./index.styles-9285e23d.js");require("@mantine/dates");var a=require("./index-a89b23de.js"),i=require("./Onboarding-2b01db17.js");require("./gAssets.js"),require("dayjs"),require("./screenSizeContext-4d5786c6.js"),require("styled-components"),require("./theme-1a7c14fb.js"),require("./isProduction-e1b7813f.js");var n=require("./useTranslations-2e7d64aa.js");require("./index-dad94e78.js"),require("@mantine/hooks"),require("lodash/debounce"),require("./useCategory-971481b4.js");var d=require("./utils-2fb6eb7d.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=c(t);const o={provinceByName:{},provinces:[],districts:[],wards:[],selectedProvince:"",selectedDistrict:"",selectedWard:""},u=(e,t)=>{switch(t.type){case"SET_DATA":return Object.assign(Object.assign({},e),t.payload);case"SET_DISTRICTS":return Object.assign(Object.assign({},e),{districts:t.payload});case"SET_WARDS":return Object.assign(Object.assign({},e),{wards:t.payload});case"SELECT_PROVINCE":return Object.assign(Object.assign({},e),{selectedProvince:t.payload,selectedDistrict:"",selectedWard:""});case"SELECT_DISTRICT":return Object.assign(Object.assign({},e),{selectedDistrict:t.payload,selectedWard:""});case"SELECT_WARD":return Object.assign(Object.assign({},e),{selectedWard:t.payload});default:return e}},p=({provinces:s})=>{const[r,n]=t.useReducer(u,o),{provinceByName:c,provinces:l,districts:p,wards:v,selectedProvince:b,selectedDistrict:y,selectedWard:E}=r,[h,j]=t.useState();t.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){var e,t,r,c;try{const l=yield fetch((c=process.env.UNIFY_LOCALE||i.LOCALE.Vietnam,`${a.CDN_ADDRESS}/cities-data-${d.MAPPED_LOCALE[c]}.json`)).then((e=>e.json()));j(l);const{list:o}=l,u=s?((e,t)=>{const s={};for(const[,e]of Object.entries(t)){const{id:t}=e;t&&(s[t]=e)}const r={};return e.map((e=>{r[e.name]=s[e.id]})),r})(s,o):o,p=Object.keys(u),v=Object.keys((null===(e=o[p[0]])||void 0===e?void 0:e.list)||{}),b=Object.keys((null===(r=null===(t=o[p[0]])||void 0===t?void 0:t[v[0]])||void 0===r?void 0:r.list)||{});n({type:"SET_DATA",payload:{provinceByName:u,provinces:p,districts:v,wards:b}})}catch(e){console.error("Error fetching address data:",e)}}))}),[process.env.UNIFY_LOCALE]);return{provinces:l,districts:p,wards:v,selectedProvince:b,selectedDistrict:y,selectedWard:E,handleProvinceChange:e=>{var t;const s=Object.keys((null===(t=c[e])||void 0===t?void 0:t.list)||{});n({type:"SET_DISTRICTS",payload:s}),n({type:"SET_WARDS",payload:[]}),n({type:"SELECT_PROVINCE",payload:e})},handleDistrictChange:e=>{var t,s;const r=Object.keys((null===(s=null===(t=c[b])||void 0===t?void 0:t.list[e])||void 0===s?void 0:s.list)||{});n({type:"SET_WARDS",payload:r}),n({type:"SELECT_DISTRICT",payload:e})},handleWardChange:e=>{n({type:"SELECT_WARD",payload:e})}}};exports.AddressInput=a=>{var{error:i,provinces:d,placeholder:c}=a,o=e.__rest(a,["error","provinces","placeholder"]);const{t:u}=n.useTranslations(),{provinces:v,districts:b,wards:y,selectedProvince:E,selectedDistrict:h,selectedWard:j,handleProvinceChange:g,handleDistrictChange:C,handleWardChange:S}=p({provinces:d}),[f,O]=t.useState("");return t.useEffect((()=>{E&&h&&j&&f?o.onChange({selectedProvince:E,selectedDistrict:h,selectedWard:j,extraInfo:f}):o.onChange(null)}),[E,h,j,f]),l.default.createElement(r.Input.Wrapper,Object.assign({withAsterisk:!0},o),l.default.createElement(s.Stack,null,l.default.createElement(r.Select,{placeholder:(null==c?void 0:c.province)||u("onboarding.similac.input.city"),data:d?v:v.sort(),searchable:!0,onChange:g,value:E}),l.default.createElement(r.Select,{placeholder:(null==c?void 0:c.district)||u("onboarding.similac.input.district"),data:b.sort(),searchable:!0,onChange:C,value:h,disabled:!E}),l.default.createElement(r.Select,{placeholder:(null==c?void 0:c.ward)||u("onboarding.similac.input.ward"),searchable:!0,data:y.sort(),value:j,onChange:S,disabled:!E||!h}),l.default.createElement(r.Input,{placeholder:(null==c?void 0:c.address)||u("onboarding.similac.input.no"),disabled:!E||!h||!j,value:f,onChange:O,style:{marginBottom:0}})),l.default.createElement(s.Input.Error,{size:"md"},i))};
@@ -1 +0,0 @@
1
- "use strict";var e=require("./tslib.es6-0d31715f.js"),r=require("react"),t=require("@mantine/core");require("dayjs"),require("./screenSizeContext-4d5786c6.js"),require("styled-components");var s=require("./theme-1a7c14fb.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("./index-a89b23de.js"),require("./isProduction-e1b7813f.js"),require("./Onboarding-2b01db17.js"),require("./gAssets.js");var n=i(r);exports.Indicator=r=>{var{styles:i,color:o=s.theme.colors.red700}=r,a=e.__rest(r,["styles","color"]);return n.default.createElement(t.Indicator,Object.assign({inline:!0,position:"top-end",offset:4,styles:Object.assign({processing:{animationDirection:"alternate"}},i),color:o},a))};
@@ -1 +0,0 @@
1
- "use strict";var e=require("./tslib.es6-0d31715f.js"),t=require("react"),o=require("./getDynamicHealthTool-571597e0.js");exports.useHealthToolsCache=a=>{const[i,l]=t.useState([]);t.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){const e=yield o.getDynamicHealthToolWithCache(a);l(e)}))}),[o.getDynamicHealthToolWithCache,a]);const r=t.useCallback((e=>{var t;return(null===(t=i.find((t=>t.template===e)))||void 0===t?void 0:t.link)||""}),[i]);return{allTools:i,getHealthToolLink:r}};