@hhgtech/hhg-components 1.28.67 → 1.28.69

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 (521) hide show
  1. package/build/BMI_BOYS.percentile.monthly-48c9471d.js +688 -0
  2. package/build/BMI_BOYS.percentile.weekly-4965852e.js +182 -0
  3. package/build/BMI_BOYS.percentile.yearly-0f7cc8f4.js +83 -0
  4. package/build/BMI_BOYS.zscore.monthly-5bb8a433.js +440 -0
  5. package/build/BMI_BOYS.zscore.weekly-3d56f80f.js +118 -0
  6. package/build/BMI_BOYS.zscore.yearly-57081f24.js +55 -0
  7. package/build/BMI_GIRLS.percentile.monthly-95859cd9.js +688 -0
  8. package/build/BMI_GIRLS.percentile.weekly-009cf4df.js +182 -0
  9. package/build/BMI_GIRLS.percentile.yearly-4436947b.js +83 -0
  10. package/build/BMI_GIRLS.zscore.monthly-689b4eee.js +440 -0
  11. package/build/BMI_GIRLS.zscore.weekly-dff693df.js +118 -0
  12. package/build/BMI_GIRLS.zscore.yearly-05ef5f4f.js +55 -0
  13. package/build/ChevronDown-275f1ab5.js +29 -0
  14. package/build/HEAD CIRCUM_BOYS.percentile.monthly-55c580a7.js +688 -0
  15. package/build/HEAD CIRCUM_BOYS.percentile.weekly-e30f4a42.js +182 -0
  16. package/build/HEAD CIRCUM_BOYS.percentile.yearly-2378a5f0.js +83 -0
  17. package/build/HEAD CIRCUM_BOYS.zscore.monthly-102d5559.js +440 -0
  18. package/build/HEAD CIRCUM_BOYS.zscore.weekly-7b0f1ba8.js +118 -0
  19. package/build/HEAD CIRCUM_BOYS.zscore.yearly-e9237d31.js +55 -0
  20. package/build/HEAD CIRCUM_GIRLS.percentile.monthly-1ddda8b3.js +688 -0
  21. package/build/HEAD CIRCUM_GIRLS.percentile.weekly-843147ea.js +182 -0
  22. package/build/HEAD CIRCUM_GIRLS.percentile.yearly-9b51c237.js +83 -0
  23. package/build/HEAD CIRCUM_GIRLS.zscore.monthly-3f1b233c.js +440 -0
  24. package/build/HEAD CIRCUM_GIRLS.zscore.weekly-9e14d3fe.js +118 -0
  25. package/build/HEAD CIRCUM_GIRLS.zscore.yearly-d924f5ae.js +55 -0
  26. package/build/HEIGHT_BOYS.percentile.monthly-15538920.js +688 -0
  27. package/build/HEIGHT_BOYS.percentile.weekly-10bd0277.js +182 -0
  28. package/build/HEIGHT_BOYS.percentile.yearly-8e678d38.js +237 -0
  29. package/build/HEIGHT_BOYS.zscore.monthly-2c110da9.js +440 -0
  30. package/build/HEIGHT_BOYS.zscore.weekly-288b7733.js +118 -0
  31. package/build/HEIGHT_BOYS.zscore.yearly-42f6f9f7.js +153 -0
  32. package/build/HEIGHT_GIRLS.percentile.monthly-04abe7d2.js +688 -0
  33. package/build/HEIGHT_GIRLS.percentile.weekly-9653b16c.js +182 -0
  34. package/build/HEIGHT_GIRLS.percentile.yearly-9efacd67.js +237 -0
  35. package/build/HEIGHT_GIRLS.zscore.monthly-c64a97b2.js +440 -0
  36. package/build/HEIGHT_GIRLS.zscore.weekly-3302dd83.js +118 -0
  37. package/build/HEIGHT_GIRLS.zscore.yearly-ebe5114f.js +153 -0
  38. package/build/Subot-5fc40fb5.js +217 -0
  39. package/build/Visible-5c5d57cf.js +29 -0
  40. package/build/WEIGHT_BOYS.percentile.monthly-5e11e7a0.js +688 -0
  41. package/build/WEIGHT_BOYS.percentile.weekly-68ae2578.js +182 -0
  42. package/build/WEIGHT_BOYS.percentile.yearly-030c06a4.js +138 -0
  43. package/build/WEIGHT_BOYS.zscore.monthly-d22c7b57.js +440 -0
  44. package/build/WEIGHT_BOYS.zscore.weekly-d8d901e6.js +118 -0
  45. package/build/WEIGHT_BOYS.zscore.yearly-c311a084.js +90 -0
  46. package/build/WEIGHT_GIRLS.percentile.monthly-5c44f8eb.js +688 -0
  47. package/build/WEIGHT_GIRLS.percentile.weekly-faa98671.js +182 -0
  48. package/build/WEIGHT_GIRLS.percentile.yearly-560b862e.js +138 -0
  49. package/build/WEIGHT_GIRLS.zscore.monthly-5365ba1a.js +440 -0
  50. package/build/WEIGHT_GIRLS.zscore.weekly-0d9dc521.js +118 -0
  51. package/build/WEIGHT_GIRLS.zscore.yearly-5a3c4e43.js +90 -0
  52. package/build/adapters.js +36 -1
  53. package/build/{esm/animation-0340efb3.js → animation-eb4e500b.js} +32 -10
  54. package/build/babyGrowth.js +913 -47
  55. package/build/cache.js +13 -1
  56. package/build/care.js +38 -1
  57. package/build/components/navigationV2/hooks/useNavConfig.d.ts +1 -3
  58. package/build/components.js +186 -1
  59. package/build/constants-8b8bc19f.js +255 -0
  60. package/build/constants-ae18ce18.js +935 -0
  61. package/build/constants.js +43 -1
  62. package/build/cookieHelper-5c9f4bb8.js +43 -0
  63. package/build/core-2aa8d86c.js +51 -0
  64. package/build/dataTransform-089f414c.js +66 -0
  65. package/build/ecom.js +745 -1
  66. package/build/esm/BMI_BOYS.percentile.monthly-de5dce68.js +686 -0
  67. package/build/esm/BMI_BOYS.percentile.weekly-9d3990b6.js +180 -0
  68. package/build/esm/BMI_BOYS.percentile.yearly-98b9114a.js +81 -0
  69. package/build/esm/BMI_BOYS.zscore.monthly-394646f0.js +438 -0
  70. package/build/esm/BMI_BOYS.zscore.weekly-c669ea51.js +116 -0
  71. package/build/esm/BMI_BOYS.zscore.yearly-771ef6b6.js +53 -0
  72. package/build/esm/BMI_GIRLS.percentile.monthly-1ff3d499.js +686 -0
  73. package/build/esm/BMI_GIRLS.percentile.weekly-211d2f27.js +180 -0
  74. package/build/esm/BMI_GIRLS.percentile.yearly-206fdcff.js +81 -0
  75. package/build/esm/BMI_GIRLS.zscore.monthly-b1137e36.js +438 -0
  76. package/build/esm/BMI_GIRLS.zscore.weekly-63ed3cd6.js +116 -0
  77. package/build/esm/BMI_GIRLS.zscore.yearly-221d187c.js +53 -0
  78. package/build/esm/ChevronDown-9a8ece61.js +7 -0
  79. package/build/esm/HEAD CIRCUM_BOYS.percentile.monthly-4c37847c.js +686 -0
  80. package/build/esm/HEAD CIRCUM_BOYS.percentile.weekly-8f6ea38a.js +180 -0
  81. package/build/esm/HEAD CIRCUM_BOYS.percentile.yearly-6c12a99a.js +81 -0
  82. package/build/esm/HEAD CIRCUM_BOYS.zscore.monthly-c531b497.js +438 -0
  83. package/build/esm/HEAD CIRCUM_BOYS.zscore.weekly-6cafba00.js +116 -0
  84. package/build/esm/HEAD CIRCUM_BOYS.zscore.yearly-fe8114a0.js +53 -0
  85. package/build/esm/HEAD CIRCUM_GIRLS.percentile.monthly-25ce0d36.js +686 -0
  86. package/build/esm/HEAD CIRCUM_GIRLS.percentile.weekly-5d3f2862.js +180 -0
  87. package/build/esm/HEAD CIRCUM_GIRLS.percentile.yearly-2b709ca5.js +81 -0
  88. package/build/esm/HEAD CIRCUM_GIRLS.zscore.monthly-e8617bae.js +438 -0
  89. package/build/esm/HEAD CIRCUM_GIRLS.zscore.weekly-f3252d67.js +116 -0
  90. package/build/esm/HEAD CIRCUM_GIRLS.zscore.yearly-5b62d41f.js +53 -0
  91. package/build/esm/HEIGHT_BOYS.percentile.monthly-63d2cf96.js +686 -0
  92. package/build/esm/HEIGHT_BOYS.percentile.weekly-8ea5102d.js +180 -0
  93. package/build/esm/HEIGHT_BOYS.percentile.yearly-8107b77b.js +235 -0
  94. package/build/esm/HEIGHT_BOYS.zscore.monthly-641cdfa3.js +438 -0
  95. package/build/esm/HEIGHT_BOYS.zscore.weekly-86da0362.js +116 -0
  96. package/build/esm/HEIGHT_BOYS.zscore.yearly-060f6e79.js +151 -0
  97. package/build/esm/HEIGHT_GIRLS.percentile.monthly-fb987d37.js +686 -0
  98. package/build/esm/HEIGHT_GIRLS.percentile.weekly-82655dc0.js +180 -0
  99. package/build/esm/HEIGHT_GIRLS.percentile.yearly-a63b8456.js +235 -0
  100. package/build/esm/HEIGHT_GIRLS.zscore.monthly-77d676a3.js +438 -0
  101. package/build/esm/HEIGHT_GIRLS.zscore.weekly-c0387a4e.js +116 -0
  102. package/build/esm/HEIGHT_GIRLS.zscore.yearly-41203c20.js +151 -0
  103. package/build/esm/Subot-3289bd8e.js +212 -0
  104. package/build/esm/Visible-a3d436dd.js +7 -0
  105. package/build/esm/WEIGHT_BOYS.percentile.monthly-50802d8b.js +686 -0
  106. package/build/esm/WEIGHT_BOYS.percentile.weekly-4d72ddd6.js +180 -0
  107. package/build/esm/WEIGHT_BOYS.percentile.yearly-20a29844.js +136 -0
  108. package/build/esm/WEIGHT_BOYS.zscore.monthly-729e6614.js +438 -0
  109. package/build/esm/WEIGHT_BOYS.zscore.weekly-90352f48.js +116 -0
  110. package/build/esm/WEIGHT_BOYS.zscore.yearly-fe1871cc.js +88 -0
  111. package/build/esm/WEIGHT_GIRLS.percentile.monthly-e6afb2e0.js +686 -0
  112. package/build/esm/WEIGHT_GIRLS.percentile.weekly-b66d3016.js +180 -0
  113. package/build/esm/WEIGHT_GIRLS.percentile.yearly-a55622c5.js +136 -0
  114. package/build/esm/WEIGHT_GIRLS.zscore.monthly-2cdcbe75.js +438 -0
  115. package/build/esm/WEIGHT_GIRLS.zscore.weekly-d5be31d5.js +116 -0
  116. package/build/esm/WEIGHT_GIRLS.zscore.yearly-99e8d3a7.js +88 -0
  117. package/build/esm/adapters.js +26 -1
  118. package/build/{animation-d5d9ef32.js → esm/animation-3d5edc39.js} +22 -10
  119. package/build/esm/babyGrowth.js +883 -47
  120. package/build/esm/cache.js +3 -1
  121. package/build/esm/care.js +26 -1
  122. package/build/esm/components/navigationV2/hooks/useNavConfig.d.ts +1 -3
  123. package/build/esm/components.js +88 -1
  124. package/build/esm/constants-2a6d2434.js +932 -0
  125. package/build/esm/constants-b77ffe3d.js +238 -0
  126. package/build/esm/constants.js +4 -1
  127. package/build/esm/cookieHelper-d314282c.js +39 -0
  128. package/build/esm/core-8c73d133.js +47 -0
  129. package/build/esm/dataTransform-8ecfc046.js +56 -0
  130. package/build/esm/ecom.js +737 -1
  131. package/build/esm/footer.js +31 -1
  132. package/build/esm/gAssets.js +5 -1
  133. package/build/esm/getDynamicHealthTool-f4497aa5.js +44 -0
  134. package/build/esm/getSocialList-a5b8462e.js +66 -0
  135. package/build/esm/hooks.js +21 -1
  136. package/build/esm/i18n-values/en-PH.js +600 -1
  137. package/build/esm/i18n-values/hi-IN.js +600 -1
  138. package/build/esm/i18n-values/id-ID.js +600 -1
  139. package/build/esm/i18n-values/km-KH.js +600 -1
  140. package/build/esm/i18n-values/ms-MY.js +602 -1
  141. package/build/esm/i18n-values/my-MM.js +600 -1
  142. package/build/esm/i18n-values/th-TH.js +600 -1
  143. package/build/esm/i18n-values/tl-PH.js +600 -1
  144. package/build/esm/i18n-values/vi-VN.js +607 -1
  145. package/build/esm/i18n-values/vi-VN_MB.js +607 -1
  146. package/build/esm/i18n-values/zh-TW.js +600 -1
  147. package/build/esm/i18n.js +55 -1
  148. package/build/esm/i18nV2.js +18 -1
  149. package/build/esm/index-12fa4985.js +8 -0
  150. package/build/esm/index-1e59f99a.js +152 -0
  151. package/build/esm/index-32e53dac.js +1936 -0
  152. package/build/esm/index-3474401a.js +149 -0
  153. package/build/esm/index-34899aa3.js +17 -0
  154. package/build/esm/index-350e8f5b.js +124 -0
  155. package/build/esm/index-41bf860a.js +151 -0
  156. package/build/esm/index-4aa8e518.js +116 -0
  157. package/build/esm/index-4fe2b03f.js +32 -0
  158. package/build/esm/index-6ea6484e.js +29 -0
  159. package/build/esm/index-717401ee.js +184 -0
  160. package/build/esm/index-7af5242a.js +24 -0
  161. package/build/esm/index-7b8c85cd.js +8302 -0
  162. package/build/esm/index-81f295b7.js +23 -0
  163. package/build/esm/index-8858383e.js +52 -0
  164. package/build/esm/index-8f52dcf3.js +33 -0
  165. package/build/esm/index-9ea7e838.js +33 -0
  166. package/build/esm/index-aabac2aa.js +3241 -0
  167. package/build/esm/index-b9b2c417.js +837 -0
  168. package/build/esm/index-c2da5293.js +12 -0
  169. package/build/esm/index-c56d60db.js +370 -0
  170. package/build/esm/index-c5d7f692.js +24 -0
  171. package/build/esm/index-cc93e010.js +53 -0
  172. package/build/esm/index-d7f046db.js +5 -0
  173. package/build/esm/index-d8177667.js +14 -0
  174. package/build/esm/index-da139dda.js +615 -0
  175. package/build/esm/index-e612be9c.js +905 -0
  176. package/build/esm/index-f3d0592b.js +71 -0
  177. package/build/esm/index.js +190 -1
  178. package/build/{index.styled-0a1fb891.js → esm/index.styled-9c9db9cc.js} +17 -5
  179. package/build/esm/index.styles-5add27c5.js +1303 -0
  180. package/build/esm/isProduction-0ea904dd.js +27 -0
  181. package/build/esm/lead.js +2140 -1
  182. package/build/esm/localizeNumberFormat-2ac3773e.js +23 -0
  183. package/build/esm/mantine.js +113 -1
  184. package/build/esm/misc.js +22 -1
  185. package/build/esm/navigation.js +51 -1
  186. package/build/esm/normalizeLink-d1c9617e.js +12 -0
  187. package/build/esm/number-0c126a39.js +38 -0
  188. package/build/esm/onboardingV2.js +860 -34
  189. package/build/esm/paths-a8204db4.js +14 -0
  190. package/build/esm/pwg.js +208 -7
  191. package/build/esm/routing-2474f896.js +40 -0
  192. package/build/esm/subot.js +4553 -134
  193. package/build/esm/theme-e74db08c.js +186 -0
  194. package/build/esm/together.js +52 -1
  195. package/build/esm/translationsContext-ad3e25de.js +5 -0
  196. package/build/esm/tslib.es6-1b1533a9.js +38 -0
  197. package/build/esm/types-06f00b3d.js +8015 -0
  198. package/build/esm/types-15e34418.js +3432 -0
  199. package/build/esm/types-ba190c26.js +21 -0
  200. package/build/esm/types.js +1 -1
  201. package/build/esm/unifyEnv.js +42 -1
  202. package/build/esm/useCategory-2c87152d.js +292 -0
  203. package/build/esm/useHealthToolCache-29d22ddb.js +17 -0
  204. package/build/esm/useIsInit-8a2fc8e5.js +11 -0
  205. package/build/esm/useOutsideClick-c8a7ff20.js +45 -0
  206. package/build/esm/usePlacesAutocomplete-63e04e8e.js +80 -0
  207. package/build/esm/useScrollbarSize-51ce1374.js +57 -0
  208. package/build/esm/useTranslations-4f1db486.js +26 -0
  209. package/build/esm/useUniqueId-3638402f.js +41 -0
  210. package/build/esm/utils-2c484c05.js +132 -0
  211. package/build/esm/utils-3a2a47d9.js +22 -0
  212. package/build/esm/utils-6d7b88da.js +367 -0
  213. package/build/esm/utils-70718e9c.js +1124 -0
  214. package/build/esm/vaccination.js +868 -40
  215. package/build/footer.js +39 -1
  216. package/build/gAssets.js +14 -1
  217. package/build/getDynamicHealthTool-114a1e27.js +48 -0
  218. package/build/getSocialList-4713441d.js +72 -0
  219. package/build/hooks.js +44 -1
  220. package/build/i18n-values/en-PH.js +611 -1
  221. package/build/i18n-values/hi-IN.js +611 -1
  222. package/build/i18n-values/id-ID.js +611 -1
  223. package/build/i18n-values/km-KH.js +611 -1
  224. package/build/i18n-values/ms-MY.js +613 -1
  225. package/build/i18n-values/my-MM.js +611 -1
  226. package/build/i18n-values/th-TH.js +611 -1
  227. package/build/i18n-values/tl-PH.js +611 -1
  228. package/build/i18n-values/vi-VN.js +618 -1
  229. package/build/i18n-values/vi-VN_MB.js +618 -1
  230. package/build/i18n-values/zh-TW.js +611 -1
  231. package/build/i18n.js +64 -1
  232. package/build/i18nV2.js +26 -1
  233. package/build/index-020e6908.js +39 -0
  234. package/build/index-0da9b2e8.js +59 -0
  235. package/build/index-11468c00.js +157 -0
  236. package/build/index-117448a5.js +133 -0
  237. package/build/index-12c07f71.js +18 -0
  238. package/build/index-1a105e87.js +123 -0
  239. package/build/index-1baaedb0.js +55 -0
  240. package/build/index-32d38318.js +7 -0
  241. package/build/index-38582ee0.js +8373 -0
  242. package/build/index-3e5fc2d6.js +1994 -0
  243. package/build/index-3eef6bed.js +853 -0
  244. package/build/index-4035e658.js +159 -0
  245. package/build/index-488d71ae.js +30 -0
  246. package/build/index-5553f9e1.js +930 -0
  247. package/build/index-5fa68e45.js +380 -0
  248. package/build/index-7b467209.js +39 -0
  249. package/build/index-81cb1142.js +77 -0
  250. package/build/index-84ab5b89.js +38 -0
  251. package/build/index-8a95d709.js +30 -0
  252. package/build/index-9da9f0c3.js +35 -0
  253. package/build/index-af91c83e.js +20 -0
  254. package/build/index-b6aea85e.js +191 -0
  255. package/build/index-bc4f4c33.js +156 -0
  256. package/build/index-c604d6bb.js +624 -0
  257. package/build/index-d330735e.js +30 -0
  258. package/build/index-d8a7efaf.js +14 -0
  259. package/build/index-e2e81fa2.js +23 -0
  260. package/build/index-e3d896b3.js +3261 -0
  261. package/build/index.js +436 -1
  262. package/build/{esm/index.styled-14b65c9e.js → index.styled-5628b3e7.js} +25 -5
  263. package/build/index.styles-b822bf42.js +1342 -0
  264. package/build/isProduction-5ce3a388.js +29 -0
  265. package/build/lead.js +2168 -1
  266. package/build/localizeNumberFormat-f5f50987.js +31 -0
  267. package/build/mantine.js +154 -1
  268. package/build/misc.js +70 -1
  269. package/build/navigation.js +61 -1
  270. package/build/normalizeLink-6f7b85d8.js +15 -0
  271. package/build/number-79fe92e1.js +40 -0
  272. package/build/onboardingV2.js +892 -34
  273. package/build/paths-a5643d9e.js +16 -0
  274. package/build/pwg.js +217 -7
  275. package/build/routing-191a9a00.js +46 -0
  276. package/build/subot.js +4592 -134
  277. package/build/theme-fa910869.js +189 -0
  278. package/build/together.js +112 -1
  279. package/build/translationsContext-950334bf.js +7 -0
  280. package/build/tslib.es6-65e312a5.js +41 -0
  281. package/build/types-0f117a9f.js +8084 -0
  282. package/build/types-1fedb3d1.js +3446 -0
  283. package/build/types-52a4e888.js +24 -0
  284. package/build/types.js +56 -1
  285. package/build/unifyEnv.js +46 -1
  286. package/build/useCategory-cfc702f5.js +299 -0
  287. package/build/useHealthToolCache-43a7014d.js +19 -0
  288. package/build/useIsInit-89535012.js +13 -0
  289. package/build/useOutsideClick-c6813964.js +49 -0
  290. package/build/usePlacesAutocomplete-297de092.js +84 -0
  291. package/build/useScrollbarSize-0fa31aa7.js +64 -0
  292. package/build/useTranslations-e1853417.js +32 -0
  293. package/build/useUniqueId-11369116.js +44 -0
  294. package/build/utils-52113753.js +384 -0
  295. package/build/utils-64bd0c42.js +143 -0
  296. package/build/utils-661411f6.js +1171 -0
  297. package/build/utils-e1513cbc.js +25 -0
  298. package/build/vaccination.js +891 -40
  299. package/package.json +4 -5
  300. package/build/BMI_BOYS.percentile.monthly-c56b0165.js +0 -1
  301. package/build/BMI_BOYS.percentile.weekly-64287e04.js +0 -1
  302. package/build/BMI_BOYS.percentile.yearly-8db65d54.js +0 -1
  303. package/build/BMI_BOYS.zscore.monthly-f12389cd.js +0 -1
  304. package/build/BMI_BOYS.zscore.weekly-fff37a57.js +0 -1
  305. package/build/BMI_BOYS.zscore.yearly-a19b57eb.js +0 -1
  306. package/build/BMI_GIRLS.percentile.monthly-a4b36d7d.js +0 -1
  307. package/build/BMI_GIRLS.percentile.weekly-b6089202.js +0 -1
  308. package/build/BMI_GIRLS.percentile.yearly-0d340818.js +0 -1
  309. package/build/BMI_GIRLS.zscore.monthly-fd5b57c0.js +0 -1
  310. package/build/BMI_GIRLS.zscore.weekly-d4577f50.js +0 -1
  311. package/build/BMI_GIRLS.zscore.yearly-e40b8a7d.js +0 -1
  312. package/build/ChevronDown-602ce39e.js +0 -1
  313. package/build/HEAD CIRCUM_BOYS.percentile.monthly-2e4c5776.js +0 -1
  314. package/build/HEAD CIRCUM_BOYS.percentile.weekly-fc5728a5.js +0 -1
  315. package/build/HEAD CIRCUM_BOYS.percentile.yearly-6bfab277.js +0 -1
  316. package/build/HEAD CIRCUM_BOYS.zscore.monthly-6af7ce44.js +0 -1
  317. package/build/HEAD CIRCUM_BOYS.zscore.weekly-9adb819b.js +0 -1
  318. package/build/HEAD CIRCUM_BOYS.zscore.yearly-9a6cdbcf.js +0 -1
  319. package/build/HEAD CIRCUM_GIRLS.percentile.monthly-e7bfe9c6.js +0 -1
  320. package/build/HEAD CIRCUM_GIRLS.percentile.weekly-9f17e019.js +0 -1
  321. package/build/HEAD CIRCUM_GIRLS.percentile.yearly-8a59f541.js +0 -1
  322. package/build/HEAD CIRCUM_GIRLS.zscore.monthly-b7ddb16c.js +0 -1
  323. package/build/HEAD CIRCUM_GIRLS.zscore.weekly-72701c55.js +0 -1
  324. package/build/HEAD CIRCUM_GIRLS.zscore.yearly-dd94bded.js +0 -1
  325. package/build/HEIGHT_BOYS.percentile.monthly-b890068c.js +0 -1
  326. package/build/HEIGHT_BOYS.percentile.weekly-a1aa5130.js +0 -1
  327. package/build/HEIGHT_BOYS.percentile.yearly-5727d920.js +0 -1
  328. package/build/HEIGHT_BOYS.zscore.monthly-13b70aa6.js +0 -1
  329. package/build/HEIGHT_BOYS.zscore.weekly-3e1d7f23.js +0 -1
  330. package/build/HEIGHT_BOYS.zscore.yearly-a956102d.js +0 -1
  331. package/build/HEIGHT_GIRLS.percentile.monthly-da5ec01b.js +0 -1
  332. package/build/HEIGHT_GIRLS.percentile.weekly-e6205d32.js +0 -1
  333. package/build/HEIGHT_GIRLS.percentile.yearly-caefa502.js +0 -1
  334. package/build/HEIGHT_GIRLS.zscore.monthly-102ba473.js +0 -1
  335. package/build/HEIGHT_GIRLS.zscore.weekly-db4f710b.js +0 -1
  336. package/build/HEIGHT_GIRLS.zscore.yearly-36465920.js +0 -1
  337. package/build/Subot-4751194d.js +0 -1
  338. package/build/Visible-9497c463.js +0 -1
  339. package/build/WEIGHT_BOYS.percentile.monthly-554d0361.js +0 -1
  340. package/build/WEIGHT_BOYS.percentile.weekly-8e5334b8.js +0 -1
  341. package/build/WEIGHT_BOYS.percentile.yearly-536e1ccb.js +0 -1
  342. package/build/WEIGHT_BOYS.zscore.monthly-01eccee1.js +0 -1
  343. package/build/WEIGHT_BOYS.zscore.weekly-ee8f2c6b.js +0 -1
  344. package/build/WEIGHT_BOYS.zscore.yearly-0aea2749.js +0 -1
  345. package/build/WEIGHT_GIRLS.percentile.monthly-7abf9d06.js +0 -1
  346. package/build/WEIGHT_GIRLS.percentile.weekly-f9b6e963.js +0 -1
  347. package/build/WEIGHT_GIRLS.percentile.yearly-254865a5.js +0 -1
  348. package/build/WEIGHT_GIRLS.zscore.monthly-909f7417.js +0 -1
  349. package/build/WEIGHT_GIRLS.zscore.weekly-e62cd084.js +0 -1
  350. package/build/WEIGHT_GIRLS.zscore.yearly-8d6e5405.js +0 -1
  351. package/build/constants-00e06f68.js +0 -108
  352. package/build/constants-51251306.js +0 -1
  353. package/build/cookieHelper-7d519a72.js +0 -1
  354. package/build/core-ba3af3e2.js +0 -1
  355. package/build/dataTransform-1805eae3.js +0 -1
  356. package/build/esm/BMI_BOYS.percentile.monthly-6272f835.js +0 -1
  357. package/build/esm/BMI_BOYS.percentile.weekly-80d18f47.js +0 -1
  358. package/build/esm/BMI_BOYS.percentile.yearly-a7e5b5f6.js +0 -1
  359. package/build/esm/BMI_BOYS.zscore.monthly-d3658f97.js +0 -1
  360. package/build/esm/BMI_BOYS.zscore.weekly-6e6708dc.js +0 -1
  361. package/build/esm/BMI_BOYS.zscore.yearly-b8400c9d.js +0 -1
  362. package/build/esm/BMI_GIRLS.percentile.monthly-98586b46.js +0 -1
  363. package/build/esm/BMI_GIRLS.percentile.weekly-7c1511b0.js +0 -1
  364. package/build/esm/BMI_GIRLS.percentile.yearly-ea667f90.js +0 -1
  365. package/build/esm/BMI_GIRLS.zscore.monthly-3a4fd1a6.js +0 -1
  366. package/build/esm/BMI_GIRLS.zscore.weekly-cc1de097.js +0 -1
  367. package/build/esm/BMI_GIRLS.zscore.yearly-6dd1a364.js +0 -1
  368. package/build/esm/ChevronDown-4e59cac6.js +0 -1
  369. package/build/esm/HEAD CIRCUM_BOYS.percentile.monthly-bd0965ae.js +0 -1
  370. package/build/esm/HEAD CIRCUM_BOYS.percentile.weekly-db1053f7.js +0 -1
  371. package/build/esm/HEAD CIRCUM_BOYS.percentile.yearly-cd38b622.js +0 -1
  372. package/build/esm/HEAD CIRCUM_BOYS.zscore.monthly-d7f88a95.js +0 -1
  373. package/build/esm/HEAD CIRCUM_BOYS.zscore.weekly-76f7db79.js +0 -1
  374. package/build/esm/HEAD CIRCUM_BOYS.zscore.yearly-3ce70f8e.js +0 -1
  375. package/build/esm/HEAD CIRCUM_GIRLS.percentile.monthly-b2e678ae.js +0 -1
  376. package/build/esm/HEAD CIRCUM_GIRLS.percentile.weekly-8e2664bb.js +0 -1
  377. package/build/esm/HEAD CIRCUM_GIRLS.percentile.yearly-f5c075a9.js +0 -1
  378. package/build/esm/HEAD CIRCUM_GIRLS.zscore.monthly-6f87849e.js +0 -1
  379. package/build/esm/HEAD CIRCUM_GIRLS.zscore.weekly-48da0aaa.js +0 -1
  380. package/build/esm/HEAD CIRCUM_GIRLS.zscore.yearly-4eea437b.js +0 -1
  381. package/build/esm/HEIGHT_BOYS.percentile.monthly-d1a8cc8e.js +0 -1
  382. package/build/esm/HEIGHT_BOYS.percentile.weekly-2b6cfe6c.js +0 -1
  383. package/build/esm/HEIGHT_BOYS.percentile.yearly-9e78afc3.js +0 -1
  384. package/build/esm/HEIGHT_BOYS.zscore.monthly-5292d78a.js +0 -1
  385. package/build/esm/HEIGHT_BOYS.zscore.weekly-fbdee645.js +0 -1
  386. package/build/esm/HEIGHT_BOYS.zscore.yearly-c11a8f1b.js +0 -1
  387. package/build/esm/HEIGHT_GIRLS.percentile.monthly-8e11e2dc.js +0 -1
  388. package/build/esm/HEIGHT_GIRLS.percentile.weekly-dc3965cb.js +0 -1
  389. package/build/esm/HEIGHT_GIRLS.percentile.yearly-490f7b4e.js +0 -1
  390. package/build/esm/HEIGHT_GIRLS.zscore.monthly-e3531c32.js +0 -1
  391. package/build/esm/HEIGHT_GIRLS.zscore.weekly-36a16a66.js +0 -1
  392. package/build/esm/HEIGHT_GIRLS.zscore.yearly-61736bba.js +0 -1
  393. package/build/esm/Subot-4642c5bf.js +0 -1
  394. package/build/esm/Visible-ff7d225c.js +0 -1
  395. package/build/esm/WEIGHT_BOYS.percentile.monthly-0cfe7ecd.js +0 -1
  396. package/build/esm/WEIGHT_BOYS.percentile.weekly-89802113.js +0 -1
  397. package/build/esm/WEIGHT_BOYS.percentile.yearly-0eb40972.js +0 -1
  398. package/build/esm/WEIGHT_BOYS.zscore.monthly-7f8c5a15.js +0 -1
  399. package/build/esm/WEIGHT_BOYS.zscore.weekly-3dcfa8ce.js +0 -1
  400. package/build/esm/WEIGHT_BOYS.zscore.yearly-98ce1ea0.js +0 -1
  401. package/build/esm/WEIGHT_GIRLS.percentile.monthly-df98e335.js +0 -1
  402. package/build/esm/WEIGHT_GIRLS.percentile.weekly-63fff42a.js +0 -1
  403. package/build/esm/WEIGHT_GIRLS.percentile.yearly-8db8cdd0.js +0 -1
  404. package/build/esm/WEIGHT_GIRLS.zscore.monthly-15c83c6d.js +0 -1
  405. package/build/esm/WEIGHT_GIRLS.zscore.weekly-747a55ec.js +0 -1
  406. package/build/esm/WEIGHT_GIRLS.zscore.yearly-197dc52d.js +0 -1
  407. package/build/esm/constants-6ecfa77c.js +0 -1
  408. package/build/esm/constants-f7c80032.js +0 -108
  409. package/build/esm/cookieHelper-4f089e3c.js +0 -1
  410. package/build/esm/core-80112758.js +0 -1
  411. package/build/esm/dataTransform-0fa341bb.js +0 -1
  412. package/build/esm/getDynamicHealthTool-a4c9d6dd.js +0 -1
  413. package/build/esm/getSocialList-4e48deba.js +0 -1
  414. package/build/esm/index-13dc1f44.js +0 -1
  415. package/build/esm/index-13e62563.js +0 -137
  416. package/build/esm/index-1e7ad007.js +0 -1
  417. package/build/esm/index-24557f2b.js +0 -1
  418. package/build/esm/index-252cb964.js +0 -1
  419. package/build/esm/index-2e99f941.js +0 -1
  420. package/build/esm/index-3452fed2.js +0 -1
  421. package/build/esm/index-3aff939b.js +0 -1
  422. package/build/esm/index-459e0362.js +0 -1
  423. package/build/esm/index-45dcd965.js +0 -1
  424. package/build/esm/index-486b71cd.js +0 -1
  425. package/build/esm/index-5408f5a4.js +0 -113
  426. package/build/esm/index-5e1af23a.js +0 -1
  427. package/build/esm/index-79ef3a30.js +0 -1
  428. package/build/esm/index-7c77273a.js +0 -1
  429. package/build/esm/index-823fd7c0.js +0 -117
  430. package/build/esm/index-8c77d7e0.js +0 -1
  431. package/build/esm/index-93e5b4f3.js +0 -1
  432. package/build/esm/index-9c7b9011.js +0 -2748
  433. package/build/esm/index-9e5956c2.js +0 -1
  434. package/build/esm/index-a83aad1c.js +0 -375
  435. package/build/esm/index-b7cc3ca2.js +0 -1
  436. package/build/esm/index-bf11f9e9.js +0 -50
  437. package/build/esm/index-ce3d38fd.js +0 -1
  438. package/build/esm/index-d27a0e25.js +0 -1
  439. package/build/esm/index-e21276e3.js +0 -1
  440. package/build/esm/index-f9514788.js +0 -177
  441. package/build/esm/index-fd04ccb7.js +0 -1430
  442. package/build/esm/index.styles-94af560f.js +0 -817
  443. package/build/esm/isProduction-00695d80.js +0 -1
  444. package/build/esm/localizeNumberFormat-8355a44f.js +0 -1
  445. package/build/esm/normalizeLink-1c194268.js +0 -1
  446. package/build/esm/number-1347eb7b.js +0 -1
  447. package/build/esm/paths-749b4b53.js +0 -1
  448. package/build/esm/routing-2b284b30.js +0 -1
  449. package/build/esm/theme-3db3c9a8.js +0 -1
  450. package/build/esm/translationsContext-6d2efd65.js +0 -1
  451. package/build/esm/tslib.es6-266309d1.js +0 -1
  452. package/build/esm/types-6d397125.js +0 -3004
  453. package/build/esm/types-850814a7.js +0 -785
  454. package/build/esm/types-d3da37d2.js +0 -1
  455. package/build/esm/useCategory-f5f74749.js +0 -1
  456. package/build/esm/useHealthToolCache-f1488032.js +0 -1
  457. package/build/esm/useIsInit-9661c5f5.js +0 -1
  458. package/build/esm/useOutsideClick-0704b383.js +0 -1
  459. package/build/esm/usePlacesAutocomplete-0733ec49.js +0 -1
  460. package/build/esm/useScrollbarSize-90b179a5.js +0 -1
  461. package/build/esm/useTranslations-df1b3bb8.js +0 -1
  462. package/build/esm/useUniqueId-03fbaecd.js +0 -1
  463. package/build/esm/utils-3d2e3f0f.js +0 -141
  464. package/build/esm/utils-5b4e60da.js +0 -1
  465. package/build/esm/utils-970ce0c0.js +0 -8
  466. package/build/esm/utils-b87ec473.js +0 -1
  467. package/build/getDynamicHealthTool-31f44ca1.js +0 -1
  468. package/build/getSocialList-29c0a6e8.js +0 -1
  469. package/build/index-1714c81c.js +0 -2748
  470. package/build/index-238813a4.js +0 -375
  471. package/build/index-2438163d.js +0 -1430
  472. package/build/index-29d302f4.js +0 -137
  473. package/build/index-3184ae4e.js +0 -1
  474. package/build/index-34b6bd24.js +0 -1
  475. package/build/index-35192783.js +0 -1
  476. package/build/index-41d684a8.js +0 -50
  477. package/build/index-4a8c8ce6.js +0 -1
  478. package/build/index-58e0d49f.js +0 -1
  479. package/build/index-64d2f812.js +0 -1
  480. package/build/index-85c621a2.js +0 -113
  481. package/build/index-90f4bc02.js +0 -1
  482. package/build/index-9a845847.js +0 -117
  483. package/build/index-9ed509d1.js +0 -1
  484. package/build/index-aa495d24.js +0 -1
  485. package/build/index-ad5cf64d.js +0 -1
  486. package/build/index-b21a1d96.js +0 -1
  487. package/build/index-b320255d.js +0 -1
  488. package/build/index-b9af15da.js +0 -1
  489. package/build/index-bd4b31bf.js +0 -1
  490. package/build/index-bf81cb71.js +0 -1
  491. package/build/index-c3cbb8f3.js +0 -1
  492. package/build/index-d25afe2f.js +0 -1
  493. package/build/index-e7c1ff53.js +0 -177
  494. package/build/index-ed8656f9.js +0 -1
  495. package/build/index-f6217f73.js +0 -1
  496. package/build/index-f7088d57.js +0 -1
  497. package/build/index.styles-2ecb9c85.js +0 -817
  498. package/build/isProduction-28d96804.js +0 -1
  499. package/build/localizeNumberFormat-22b2d7aa.js +0 -1
  500. package/build/normalizeLink-594ccff1.js +0 -1
  501. package/build/number-cf06dcc0.js +0 -1
  502. package/build/paths-ed72ecb8.js +0 -1
  503. package/build/routing-f2edd0d0.js +0 -1
  504. package/build/theme-f2b8aad7.js +0 -1
  505. package/build/translationsContext-4c4c33c4.js +0 -1
  506. package/build/tslib.es6-ceb091fd.js +0 -1
  507. package/build/types-49f0543a.js +0 -785
  508. package/build/types-5b303b71.js +0 -1
  509. package/build/types-bfd12e24.js +0 -3004
  510. package/build/useCategory-94d60dab.js +0 -1
  511. package/build/useHealthToolCache-7307d240.js +0 -1
  512. package/build/useIsInit-c3cf1925.js +0 -1
  513. package/build/useOutsideClick-15fef824.js +0 -1
  514. package/build/usePlacesAutocomplete-6ab0181b.js +0 -1
  515. package/build/useScrollbarSize-ab332673.js +0 -1
  516. package/build/useTranslations-233c68bc.js +0 -1
  517. package/build/useUniqueId-46834e18.js +0 -1
  518. package/build/utils-13ea4f2f.js +0 -8
  519. package/build/utils-45e691a3.js +0 -1
  520. package/build/utils-bee8be92.js +0 -141
  521. package/build/utils-d5766c73.js +0 -1
@@ -0,0 +1,3241 @@
1
+ import { _ as __rest, a as __awaiter } from './tslib.es6-1b1533a9.js';
2
+ import React__default, { useState, useMemo, useRef, Fragment, useEffect, useContext, useCallback } from 'react';
3
+ import { F as Flag, a as Avatar, B as Button$1, c as Input } from './index-32e53dac.js';
4
+ import styled, { css } from 'styled-components';
5
+ import { t as theme } from './theme-e74db08c.js';
6
+ import { T as Text } from './index-3474401a.js';
7
+ import { C as CommonGAssets } from './index-8858383e.js';
8
+ import { C as CARE_LOCALES, T as TOGETHER_LOCALES, E as ECOM_LOCALES, b as CARE_BOOKING_LOCALES, d as domainLocales, L as LOCALE_SPECS, S as STATIC_PAGES } from './index-e612be9c.js';
9
+ import { n as normalizeLinkSlash, a as normalizeLink } from './normalizeLink-d1c9617e.js';
10
+ import { a as getCurrentSsoUrl, g as getCurrentBaseUrl, b as getTogetherApiDomain, c as getDiscoverApiDomain, d as getCareApiDomain } from './routing-2474f896.js';
11
+ import { P as Popup, U as UserAvatar, c as formatCommunity, a as formatPost } from './index-b9b2c417.js';
12
+ import { L as Logo } from './index-f3d0592b.js';
13
+ import { u as useTranslations } from './useTranslations-4f1db486.js';
14
+ import throttle from 'lodash/throttle';
15
+ import { createStyles, rem, Box, Indicator, Portal } from '@mantine/core';
16
+ import '@mantine/dates';
17
+ import { L as LOCALE } from './Subot-3289bd8e.js';
18
+ import './translationsContext-ad3e25de.js';
19
+ import formatString from 'string-format';
20
+ import '@mantine/hooks';
21
+ import { g as getBoundariesFromMediaQueryKey, M as MediaQueries } from './utils-2c484c05.js';
22
+ import { L as LOCALISED_SLUGS } from './constants-2a6d2434.js';
23
+ import { I as Icon } from './index-cc93e010.js';
24
+ import { User } from '@hhgtech/icons/core';
25
+ import { g as getDefaultClassWrapper } from './index.styles-5add27c5.js';
26
+ import { C as ChevronDown } from './ChevronDown-9a8ece61.js';
27
+ import { B as Button } from './index-6ea6484e.js';
28
+ import { x as domainLocalesMarryBaby } from './utils-70718e9c.js';
29
+ import { a as LOCALIZED_SLUGS } from './constants-b77ffe3d.js';
30
+ import { H as Heading } from './index-34899aa3.js';
31
+ import { I as Indicator$1 } from './index-d8177667.js';
32
+ import { u as useIsInit } from './useIsInit-8a2fc8e5.js';
33
+ import './utils-6d7b88da.js';
34
+ import './index.styled-9c9db9cc.js';
35
+ import './index-12fa4985.js';
36
+ import dayjs from 'dayjs';
37
+ import relativeTime from 'dayjs/plugin/relativeTime';
38
+ import { C as Container } from './index-c2da5293.js';
39
+ import debounce from 'lodash/debounce';
40
+ import { g as getDataWithCache } from './core-8c73d133.js';
41
+
42
+ const ALLOW_DOMAIN_URL = [
43
+ 'hellobacsi.com',
44
+ 'hellosehat.com',
45
+ 'hellodoktor.com',
46
+ 'hellokrupet.com',
47
+ 'hellodoctor.com.ph',
48
+ 'hellokhunmor.com',
49
+ 'hellosayarwon.com',
50
+ 'helloyishi.com.tw',
51
+ 'helloswasthya.com',
52
+ 'marrybaby.vn',
53
+ 'hellohealth.questionpro.com',
54
+ 'hellobacsivn.page.link',
55
+ ];
56
+ const isInternalLink = (url = '') => {
57
+ return ALLOW_DOMAIN_URL.some((o) => new URL(url).origin.endsWith(o));
58
+ };
59
+
60
+ const StyledLanguageChangeLink = styled.a `
61
+ display: inline-flex;
62
+ position: relative;
63
+ flex-direction: row;
64
+ align-items: center;
65
+ padding: 7px 11px;
66
+ gap: 2px;
67
+
68
+ background: ${theme.colors.white};
69
+ border: 1px solid ${theme.colors.neutral100};
70
+ border-radius: 20px;
71
+
72
+ color: ${theme.colors.gray600};
73
+ font-weight: 600;
74
+ font-size: 12px;
75
+ line-height: 18px;
76
+ text-decoration: none;
77
+
78
+ cursor: pointer;
79
+ `;
80
+
81
+ const StyledSelectionContainer = styled.div `
82
+ position: relative;
83
+ display: inline-block;
84
+ `;
85
+ const StyledSelectionLabel = styled.div `
86
+ position: relative;
87
+ `;
88
+ const StyleSelectionPopup = styled.div `
89
+ position: absolute;
90
+ z-index: 21;
91
+ top: 100%;
92
+ right: 0;
93
+ width: 327px;
94
+ padding: 8px;
95
+ background: white;
96
+ border-radius: 4px;
97
+ filter: drop-shadow(0px 8px 40px rgba(0, 0, 0, 0.1));
98
+
99
+ &[data-is-open='false'] {
100
+ display: none;
101
+ }
102
+ &[data-show-indicator='true'] {
103
+ &:before {
104
+ position: absolute;
105
+ right: 11px;
106
+ bottom: 100%;
107
+ width: 0;
108
+ height: 0;
109
+ border: 0.5rem solid transparent;
110
+ border-top: none;
111
+ border-bottom-color: #fff;
112
+ content: '';
113
+ filter: drop-shadow(0 -0.0625rem 0.0625rem rgba(0, 0, 0, 0.1));
114
+ }
115
+ }
116
+ `;
117
+ const StyledOption = styled.div `
118
+ display: flex;
119
+ height: 40px;
120
+ align-items: center;
121
+ justify-content: space-between;
122
+
123
+ padding: 0 16px;
124
+ border-radius: ${theme.borderRadius};
125
+ cursor: pointer;
126
+
127
+ .check-icon {
128
+ width: 16px;
129
+ height: 16px;
130
+ }
131
+ &[data-selected='false'] {
132
+ background-color: ${theme.colors.gray100};
133
+ }
134
+ `;
135
+ const StyledPopupBackground = styled.div `
136
+ position: fixed;
137
+ z-index: 20;
138
+ top: 0;
139
+ left: 0;
140
+ width: 100%;
141
+ height: 100%;
142
+ cursor: default;
143
+ `;
144
+
145
+ const TooltipSelection = ({ options, label, labelRenderer, selected, onChange, showSelected = true, style = {}, showIndicator = true, }) => {
146
+ const [isOpen, setIsOpen] = useState(false);
147
+ return (React__default.createElement(React__default.Fragment, null,
148
+ React__default.createElement(StyledSelectionContainer, null,
149
+ React__default.createElement(StyledSelectionLabel, { onClick: () => setIsOpen((value) => !value) },
150
+ label || (labelRenderer === null || labelRenderer === void 0 ? void 0 : labelRenderer(isOpen)) || null,
151
+ React__default.createElement(StyleSelectionPopup, { "data-is-open": isOpen, style: style, "data-show-indicator": showIndicator }, options.map((option, index) => (React__default.createElement(StyledOption, { key: index, "data-selected": showSelected && selected === option.value, onClick: (e) => {
152
+ if (selected !== option.value) {
153
+ onChange(option.value);
154
+ setIsOpen((value) => !value);
155
+ }
156
+ e.stopPropagation();
157
+ } },
158
+ React__default.createElement(Text, { size: "p3" }, option.label),
159
+ showSelected && selected === option.value && (React__default.createElement("img", { src: CommonGAssets.getAssetPath('check.svg'), alt: "check", className: "check-icon", loading: "lazy" })))))))),
160
+ isOpen && (React__default.createElement(StyledPopupBackground, { onClick: () => setIsOpen(false) }))));
161
+ };
162
+
163
+ const LanguageSwitcher = ({ languageOptions, locale }) => {
164
+ var _a, _b;
165
+ const selectedLanguage = languageOptions === null || languageOptions === void 0 ? void 0 : languageOptions.find((option) => option.locale === locale);
166
+ if (!(languageOptions === null || languageOptions === void 0 ? void 0 : languageOptions.length)) {
167
+ return null;
168
+ }
169
+ return (React__default.createElement(TooltipSelection, { options: languageOptions, selected: selectedLanguage.value, label: React__default.createElement(LanguageLabel, { locale: locale, label: selectedLanguage.label || ((_b = (_a = locale.split('-')) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.toUpperCase()) }), onChange: (href) => {
170
+ if (typeof window !== 'undefined') {
171
+ window.location.href = href;
172
+ }
173
+ }, style: { width: 100 }, showSelected: true, showIndicator: false }));
174
+ };
175
+ const LanguageLabel = ({ locale, label, href, }) => {
176
+ var _a, _b, _c;
177
+ return (React__default.createElement(StyledLanguageChangeLink, { href: href },
178
+ React__default.createElement(Flag, { country: (_b = (_a = locale === null || locale === void 0 ? void 0 : locale.split('-')) === null || _a === void 0 ? void 0 : _a[1]) === null || _b === void 0 ? void 0 : _b.toUpperCase(), width: 16, height: 16, rounded: true, language: (_c = locale === null || locale === void 0 ? void 0 : locale.split('-')) === null || _c === void 0 ? void 0 : _c[0] }),
179
+ React__default.createElement("span", null, label)));
180
+ };
181
+
182
+ const getEcomUrl = ({ path, locale, }) => {
183
+ var _a;
184
+ return `/shop/${(_a = LOCALISED_SLUGS[locale || 'vi-VN']) === null || _a === void 0 ? void 0 : _a[path]}/`;
185
+ };
186
+
187
+ var useStyles = createStyles(() => {
188
+ return {
189
+ root: {
190
+ textDecoration: 'none',
191
+ },
192
+ indicatorRoot: {
193
+ marginRight: rem(10),
194
+ },
195
+ iconText: {
196
+ color: '#fff',
197
+ },
198
+ };
199
+ });
200
+
201
+ const CartBadge = (_a) => {
202
+ var { count, styles, className, classNames, locale } = _a, boxProps = __rest(_a, ["count", "styles", "className", "classNames", "locale"]);
203
+ const { classes, cx } = useStyles(undefined, {
204
+ name: 'CartBadge',
205
+ styles,
206
+ classNames,
207
+ });
208
+ return typeof count !== 'undefined' ? (React__default.createElement(Box, Object.assign({ component: "a", href: getEcomUrl({ path: 'CART', locale }), className: cx(classes.root, className) }, boxProps),
209
+ React__default.createElement(Indicator, { classNames: {
210
+ root: classes.indicatorRoot,
211
+ }, withBorder: true, color: 'red', size: 20, disabled: count === 0, label: React__default.createElement(Text, { className: classes.iconText, size: "s5" }, count > 99 ? '99+' : count) },
212
+ React__default.createElement(Icon.Cart, { size: 24 })))) : null;
213
+ };
214
+
215
+ const StyledDisplayWrapper = styled.div `
216
+ ${(props) => `
217
+ ${props.lowerBound !== 0 ? `@media (max-width: ${props.lowerBound - 1}px) { display: none; }` : ''}
218
+ ${props.upperBound !== 0 ? `@media (min-width: ${props.upperBound}px) { display: none; }` : ''}
219
+ `}
220
+ `;
221
+
222
+ const DisplayWrapper = ({ forceDisplay, mediaQueryKey, children, className, style, }) => {
223
+ // use CSS to display or not
224
+ const [lowerBoundValue, upperBoundValue] = useMemo(() => getBoundariesFromMediaQueryKey(mediaQueryKey), [mediaQueryKey]);
225
+ return (React__default.createElement(StyledDisplayWrapper, { lowerBound: forceDisplay ? 0 : lowerBoundValue, upperBound: forceDisplay ? 0 : upperBoundValue, className: className, style: style }, children));
226
+ };
227
+
228
+ const useCSSFocusPopupHelper = (configs) => {
229
+ const { allowBgScroll } = configs || {};
230
+ const ref = useRef();
231
+ return {
232
+ containerRef: ref,
233
+ onContainerFocus: () => {
234
+ if (!allowBgScroll)
235
+ document.documentElement.style.overflow = 'hidden';
236
+ },
237
+ onContainerBlur: () => {
238
+ if (!allowBgScroll)
239
+ document.documentElement.style.overflow = '';
240
+ },
241
+ onButtonMouseDown: (e) => {
242
+ // this close popup when click, run after REact init
243
+ if (ref.current &&
244
+ (document.activeElement === ref.current ||
245
+ ref.current.contains(document.activeElement))) {
246
+ ref.current.blur();
247
+ document.activeElement.blur();
248
+ e.preventDefault();
249
+ }
250
+ },
251
+ onClose: () => {
252
+ if (ref.current &&
253
+ (document.activeElement === ref.current ||
254
+ ref.current.contains(document.activeElement))) {
255
+ ref.current.blur();
256
+ document.activeElement.blur();
257
+ }
258
+ },
259
+ };
260
+ };
261
+
262
+ const _StyledPopup = styled.div `
263
+ position: absolute;
264
+ right: 0;
265
+ transition: all 0.5s ease-in-out;
266
+ overflow-y: auto;
267
+ padding-bottom: 70px;
268
+
269
+ &[data-open='true'] {
270
+ z-index: 200;
271
+ top: 120%;
272
+ opacity: 1;
273
+ visibility: visible;
274
+ }
275
+
276
+ &[data-open='false'] {
277
+ display: none;
278
+ }
279
+
280
+ .popup-content {
281
+ z-index: 111;
282
+ height: 100%;
283
+ border: 1px solid #0000001a;
284
+ ${MediaQueries.mbDown} {
285
+ > div {
286
+ border-top-left-radius: 0;
287
+ border-top-right-radius: 0;
288
+ }
289
+ }
290
+ }
291
+
292
+ /* min-height: 415px; */
293
+ ${MediaQueries.mbUp} {
294
+ width: 320px;
295
+ }
296
+ ${MediaQueries.mbDown} {
297
+ position: fixed;
298
+ left: 0;
299
+ width: 100%;
300
+ }
301
+ `;
302
+ const StyledPopupClass = 'hhgcomp-navprofilebutton-popup';
303
+ const StyledPopup$1 = getDefaultClassWrapper(_StyledPopup, StyledPopupClass);
304
+ const _StyledPopupWrapper = styled.div `
305
+ position: fixed;
306
+ z-index: 150;
307
+ top: var(--header-bottom, 56px);
308
+ left: 0;
309
+ width: 100%;
310
+ height: 100%;
311
+ align-items: center;
312
+
313
+ ${MediaQueries.mbUp} {
314
+ background-color: transparent;
315
+ &[data-type='welcome'] {
316
+ background: rgba(38, 38, 38, 0.3);
317
+ }
318
+ &[data-type='due-date'] {
319
+ background: rgba(38, 38, 38, 0.3);
320
+ }
321
+ }
322
+
323
+ ${MediaQueries.mbDown} {
324
+ background: rgba(38, 38, 38, 0.3);
325
+ }
326
+
327
+ &[data-type='welcome'] {
328
+ top: 0;
329
+ }
330
+
331
+ &[data-open='false'] {
332
+ display: none;
333
+ }
334
+ `;
335
+ const StyledPopupWrapperClass = 'hhgcomp-navprofilebutton-popupwrapper';
336
+ getDefaultClassWrapper(_StyledPopupWrapper, StyledPopupWrapperClass);
337
+ const StyledAvatar = styled.div `
338
+ width: 40px;
339
+ height: 40px;
340
+ cursor: pointer;
341
+
342
+ img {
343
+ border-radius: 50%;
344
+ }
345
+
346
+ .avatar {
347
+ width: 40px;
348
+ height: 40px;
349
+ object-fit: cover;
350
+ }
351
+
352
+ .avatar-default {
353
+ display: flex;
354
+ align-items: center;
355
+ justify-content: center;
356
+ background-color: ${theme.colors.secondaryBase};
357
+ border-radius: 50%;
358
+ color: white;
359
+ font-size: 20px;
360
+ font-weight: bold;
361
+ }
362
+ `;
363
+ const StyledImageWrapper$1 = styled.div `
364
+ display: inline-flex;
365
+ position: relative;
366
+ width: 40px;
367
+ height: 40px;
368
+ display: flex;
369
+ align-items: center;
370
+ justify-content: center;
371
+ text-decoration: none;
372
+ flex-shrink: 0;
373
+ cursor: pointer;
374
+
375
+ .user-close-icon {
376
+ display: none;
377
+ }
378
+ &:focus-within {
379
+ .user-close-icon {
380
+ display: block;
381
+ }
382
+ .user-avatar {
383
+ display: none;
384
+ }
385
+ .${StyledPopupClass} {
386
+ z-index: 200;
387
+ top: 120%;
388
+ opacity: 1;
389
+ visibility: visible;
390
+ display: initial;
391
+ ${MediaQueries.mbDown} {
392
+ top: 100%;
393
+ }
394
+ }
395
+ .${StyledPopupWrapperClass} {
396
+ display: initial;
397
+ }
398
+ }
399
+ `;
400
+ const StyledLoggedOutAnchor = styled.a `
401
+ display: inline-flex;
402
+ .login-btn[data-color='tertiary'][data-size='md'] {
403
+ padding-left: 12px;
404
+ padding-right: 12px;
405
+ }
406
+ .mobile-only {
407
+ ${MediaQueries.mbUp} {
408
+ display: none;
409
+ }
410
+ }
411
+ .login-btn {
412
+ display: none;
413
+ ${MediaQueries.mbUp} {
414
+ display: block;
415
+ }
416
+ }
417
+ `;
418
+
419
+ const NavBookingIcon = (props) => (React__default.createElement("svg", Object.assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, props),
420
+ React__default.createElement("path", { d: "M2.5 6.5a3.2 3.2 0 0 1 3.2-3.2h7.9a3.2 3.2 0 0 1 3.19 3.2v4.72a3.2 3.2 0 0 1-3.2 3.2H5.7a3.2 3.2 0 0 1-3.19-3.2V6.49Z", fill: "#E3F2FF" }),
421
+ React__default.createElement("path", { d: "M2.5 5.68A2.38 2.38 0 0 1 4.88 3.3h9.52a2.38 2.38 0 0 1 2.39 2.38H2.5Z", fill: "#2D87F3" }),
422
+ React__default.createElement("path", { d: "M13.6 2.5h-.03c-.36 0-.65.3-.65.65V4.2c0 .36.3.65.65.65h.03c.36 0 .65-.3.65-.65V3.15a.65.65 0 0 0-.65-.65ZM5.27 4.86h.03c.36 0 .65-.3.65-.65V3.15a.65.65 0 0 0-.65-.65h-.03c-.36 0-.65.3-.65.65V4.2c0 .36.3.65.65.65Z", fill: "#2743AD" }),
423
+ React__default.createElement("path", { d: "M5.56 8.17h-.5a.4.4 0 0 0-.4.4v.59c0 .22.18.4.4.4h.5a.4.4 0 0 0 .4-.4v-.58a.4.4 0 0 0-.4-.41Zm2.7 0h-.5a.4.4 0 0 0-.4.4v.59c0 .22.18.4.4.4h.5a.4.4 0 0 0 .4-.4v-.58a.4.4 0 0 0-.4-.41Zm2.7 0h-.5a.4.4 0 0 0-.4.4v.59c0 .22.18.4.4.4h.5a.4.4 0 0 0 .4-.4v-.58a.4.4 0 0 0-.4-.41Zm2.87 0h-.49a.4.4 0 0 0-.4.4v.59c0 .22.18.4.4.4h.49a.4.4 0 0 0 .4-.4v-.58a.4.4 0 0 0-.4-.41Zm-8.3 2.52h-.5a.4.4 0 0 0-.4.4v.58c0 .23.18.4.4.4h.5a.4.4 0 0 0 .4-.4v-.58a.4.4 0 0 0-.4-.4Zm2.7 0h-.5a.4.4 0 0 0-.4.4v.58c0 .23.18.4.4.4h.5a.4.4 0 0 0 .4-.4v-.58a.4.4 0 0 0-.4-.4Zm2.7 0h-.49a.4.4 0 0 0-.4.4v.58c0 .23.18.4.4.4h.5a.4.4 0 0 0 .4-.4v-.58a.4.4 0 0 0-.4-.4Zm2.87 0h-.49a.4.4 0 0 0-.4.4v.58c0 .23.18.4.4.4h.5a.4.4 0 0 0 .4-.4v-.58a.4.4 0 0 0-.4-.4Z", fill: "#2D87F3" }),
424
+ React__default.createElement("path", { d: "M16 16.8a3.17 3.17 0 1 0 0-6.36 3.17 3.17 0 0 0 0 6.35Z", fill: "#FE921D" }),
425
+ React__default.createElement("path", { d: "M15.78 13.62v-1.36a.21.21 0 0 1 .42 0v1.26l.48.4a.21.21 0 0 1-.01.33.21.21 0 0 1-.26-.01l-.55-.46-.02-.01a.21.21 0 0 1-.06-.15Z", fill: "#fff" })));
426
+
427
+ const NavCommunityIcon = (props) => (React__default.createElement("svg", Object.assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, props),
428
+ React__default.createElement("path", { d: "M7.06 4.97h-2.3a3.12 3.12 0 0 0-3.1 3.1v.43a3.12 3.12 0 0 0 3.1 3.1h1.39s1.47 1.11 1.5.97c.03-.22-.23-.99-.23-.99a3.13 3.13 0 0 0 2.72-3.09v-.41a3.12 3.12 0 0 0-3.08-3.11Zm-2.7 3.55a.23.23 0 1 1 0-.46.23.23 0 0 1 0 .46Zm1.35.4a.33.33 0 1 1 0-.66.33.33 0 0 1 0 .65Zm1.57-.05Z", fill: "#2D87F3" }),
429
+ React__default.createElement("path", { d: "M12.88 9.52a3.53 3.53 0 0 0-1.35 6.8s-.23 1.03-.2 1.25c.03.14 1.55-.99 1.55-.99a3.53 3.53 0 0 0 0-7.06Zm-1.33 4.24a.48.48 0 1 1 0-.97.48.48 0 0 1 0 .97Zm1.58.04a.33.33 0 1 1 0-.66.33.33 0 0 1 0 .66Zm1.34-.39a.23.23 0 1 1 0-.46.23.23 0 0 1 0 .46Z", fill: "#FFB521" }),
430
+ React__default.createElement("path", { d: "M16.45 1.67h-3.87a1.88 1.88 0 0 0-1.88 2.06l.22 2.29a1.88 1.88 0 0 0 1.73 1.7s-.17.94-.14 1.16c.02.14 1.66-1.13 1.66-1.13l1.92-.03a1.88 1.88 0 0 0 1.86-1.59l.36-2.29a1.88 1.88 0 0 0-1.86-2.17ZM13.1 5.23a.48.48 0 1 1 .34-.14c-.1.1-.22.14-.34.14Zm1.57.05a.33.33 0 1 1 .23-.1.33.33 0 0 1-.23.1Zm1.34-.4a.23.23 0 1 1 .1-.01.23.23 0 0 1-.1.02Z", fill: "#91CAFF" })));
431
+
432
+ const NavDotIcon = (props) => (React__default.createElement("svg", Object.assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, props),
433
+ React__default.createElement("rect", { x: "8.33337", y: "8.33325", width: "3.33333", height: "3.33333", rx: "1.66667", fill: "#2D87F3" })));
434
+
435
+ const NavEshopIcon = (props) => (React__default.createElement("svg", Object.assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, props),
436
+ React__default.createElement("path", { d: "m3.18 7.06 1.6 1.6 4.33-4.69a.72.72 0 0 0-.03-.99l-.22-.22a.72.72 0 0 0-.99-.02L3.18 7.06Zm13.64 0-1.6 1.6-4.33-4.69a.72.72 0 0 1 .02-.99l.23-.22a.72.72 0 0 1 .99-.02l4.69 4.32Z", fill: "#2743AD" }),
437
+ React__default.createElement("path", { d: "M15.04 16.7H4.9a.78.78 0 0 1-.77-.7l-.7-6.67h13.09l-.7 6.67a.78.78 0 0 1-.78.7Z", fill: "#2D87F3" }),
438
+ React__default.createElement("path", { d: "M6.23 15.7a.23.23 0 0 1-.23-.22l-.3-4.46a.23.23 0 1 1 .47-.04l.3 4.47a.23.23 0 0 1-.22.25h-.02Zm2.39 0a.23.23 0 0 1-.23-.23L8.3 11a.23.23 0 1 1 .47 0l.07 4.46a.23.23 0 0 1-.22.24h-.01Zm5.15 0h-.02a.23.23 0 0 1-.2-.16.23.23 0 0 1-.02-.09l.3-4.47a.24.24 0 0 1 .25-.22.23.23 0 0 1 .22.26l-.3 4.46a.23.23 0 0 1-.23.22Zm-2.39 0a.23.23 0 0 1-.23-.23l.07-4.47a.24.24 0 0 1 .24-.23.23.23 0 0 1 .23.23l-.08 4.47a.23.23 0 0 1-.23.23Z", fill: "#2743AD" }),
439
+ React__default.createElement("path", { d: "M16.04 18.12a2.01 2.01 0 1 0 0-4.03 2.01 2.01 0 0 0 0 4.03Z", fill: "#FE921D" }),
440
+ React__default.createElement("path", { d: "M16.97 15.87h-.7v-.7a.23.23 0 0 0-.46 0v.7h-.7a.23.23 0 1 0 0 .47h.7v.69a.23.23 0 1 0 .47 0v-.7h.69a.23.23 0 1 0 0-.46Z", fill: "#fff" }),
441
+ React__default.createElement("path", { d: "M16.58 9.48H3.42a.8.8 0 0 1-.78-.7l-.13-1.1a.8.8 0 0 1 .78-.88h13.42a.8.8 0 0 1 .78.88l-.13 1.1a.8.8 0 0 1-.78.7Z", fill: "#BCDEFF" })));
442
+
443
+ const NavHelpIcon = (props) => (React__default.createElement("svg", Object.assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, props),
444
+ React__default.createElement("path", { d: "M10 1.667c-4.595 0-8.333 3.738-8.333 8.333 0 4.595 3.738 8.333 8.333 8.333 4.595 0 8.333-3.738 8.333-8.333 0-4.595-3.738-8.333-8.333-8.333Zm0 13.194a.695.695 0 1 1 0-1.39.695.695 0 0 1 0 1.39Zm1.1-4.415a.698.698 0 0 0-.405.631v.312a.694.694 0 1 1-1.39 0v-.312c0-.81.477-1.553 1.213-1.893.707-.326 1.218-1.19 1.218-1.615 0-.956-.778-1.736-1.736-1.736s-1.736.78-1.736 1.736a.694.694 0 1 1-1.389 0A3.129 3.129 0 0 1 10 4.444a3.129 3.129 0 0 1 3.125 3.125c0 .939-.814 2.318-2.026 2.877Z", fill: "#FF6F4D" })));
445
+
446
+ const NavLogOutIcon = (props) => (React__default.createElement("svg", Object.assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, props),
447
+ React__default.createElement("path", { d: "M11.116 1.72 5.488.85a1.898 1.898 0 0 0-2.155 1.856v14.588a1.898 1.898 0 0 0 2.158 1.855l5.625-.869a1.865 1.865 0 0 0 1.592-1.855V3.575a1.87 1.87 0 0 0-1.592-1.855", fill: "#2D87F3" }),
448
+ React__default.createElement("path", { d: "M17.642 9.584a.6.6 0 0 1-.232.472l-1.964 1.518a.446.446 0 0 1-.719-.353v-.51l-2.118-.01a.225.225 0 0 1-.223-.225v-1.8a.225.225 0 0 1 .224-.225l2.12.002-.004-.506a.446.446 0 0 1 .719-.354l1.965 1.52a.6.6 0 0 1 .232.471", fill: "#FF6F4D" }),
449
+ React__default.createElement("path", { d: "M17.642 9.584a.6.6 0 0 1-.232.472l-1.964 1.518a.446.446 0 0 1-.719-.353v-.51l-2.118-.01a.225.225 0 0 1-.223-.225v-1.8a.225.225 0 0 1 .224-.225l2.12.002-.004-.506a.446.446 0 0 1 .719-.354l1.965 1.52a.6.6 0 0 1 .232.471m-7.603-.908v1.802c0 .124.1.225.224.225h1.257c.124 0 .225-.1.225-.225V8.676c0-.124-.1-.224-.225-.224h-1.257c-.124 0-.224.1-.224.224m-.673 1.809a.224.224 0 0 1-.225.225h-.407a.61.61 0 0 1-.609-.61V9.069a.61.61 0 0 1 .61-.61h.406a.224.224 0 0 1 .225.225z", fill: "#FF6F4D" })));
450
+
451
+ const NavMyHealthIcon = (props) => (React__default.createElement("svg", Object.assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, props),
452
+ React__default.createElement("path", { d: "M6.114 3.333a4.64 4.64 0 0 1 3.565 1.708.412.412 0 0 0 .642 0 4.64 4.64 0 0 1 3.565-1.708c2.646 0 4.447 2.302 4.447 5.142 0 1.698-.904 4.446-2.675 6.102-2.522 2.358-4.665 2.965-5.392 3.11a1.3 1.3 0 0 1-.53 0c-.728-.146-2.871-.752-5.393-3.11-1.772-1.656-2.676-4.404-2.676-6.102 0-2.84 1.801-5.142 4.447-5.142", fill: "#FF6F4D" }),
453
+ React__default.createElement("path", { d: "M13.298 11.226v-.829a1.205 1.205 0 0 0-1.202-1.204h-.208a.26.26 0 0 1-.261-.259v-.208a1.205 1.205 0 0 0-1.201-1.204h-.832A1.205 1.205 0 0 0 8.39 8.726v.205a.26.26 0 0 1-.259.261h-.207a1.2 1.2 0 0 0-1.202 1.202v.834a1.204 1.204 0 0 0 1.202 1.201h.207a.26.26 0 0 1 .259.262v.205A1.205 1.205 0 0 0 9.594 14.1h.832a1.204 1.204 0 0 0 1.201-1.204v-.208a.26.26 0 0 1 .261-.258h.208a1.205 1.205 0 0 0 1.202-1.204", fill: "#fff" })));
454
+
455
+ const NavSaveIcon = (props) => (React__default.createElement("svg", Object.assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, props),
456
+ React__default.createElement("path", { d: "M4.767 17.236a1.36 1.36 0 0 0 1.256.188l4.097-1.397a.37.37 0 0 1 .28 0l4.097 1.397q.22.071.45.075c.29.002.573-.09.807-.263a1.43 1.43 0 0 0 .6-1.171V3.935A1.417 1.417 0 0 0 14.946 2.5H5.573a1.416 1.416 0 0 0-1.406 1.434v12.13a1.43 1.43 0 0 0 .6 1.172", fill: "#00CB8A" })));
457
+
458
+ const NavSettingsIcon = (props) => (React__default.createElement("svg", Object.assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, props),
459
+ React__default.createElement("path", { d: "M17.339 8.075a2.177 2.177 0 0 1-1.717-2.944 1.02 1.02 0 0 0-.305-1.15 8.2 8.2 0 0 0-2.445-1.417 1.03 1.03 0 0 0-1.16.323 2.173 2.173 0 0 1-3.423 0 1.03 1.03 0 0 0-1.161-.323A8.2 8.2 0 0 0 4.85 3.842a1.03 1.03 0 0 0-.322 1.183 2.167 2.167 0 0 1-1.806 2.978 1.03 1.03 0 0 0-.9.828 8 8 0 0 0-.05 2.861 1.03 1.03 0 0 0 .906.861 2.166 2.166 0 0 1 1.767 3.061 1.01 1.01 0 0 0 .283 1.211A8.2 8.2 0 0 0 7.15 18.22q.17.059.35.061a1.02 1.02 0 0 0 .833-.433 2.15 2.15 0 0 1 1.778-.934 2.18 2.18 0 0 1 1.745.878 1.02 1.02 0 0 0 1.2.339 8.3 8.3 0 0 0 2.222-1.328 1.03 1.03 0 0 0 .3-1.172 2.167 2.167 0 0 1 1.739-2.995 1.03 1.03 0 0 0 .872-.844 8 8 0 0 0 .144-1.405q0-.749-.138-1.484a1.02 1.02 0 0 0-.856-.828m-4.561 2.312a2.778 2.778 0 1 1-5.556 0 2.778 2.778 0 0 1 5.556 0", fill: "#2D87F3" })));
460
+
461
+ const NavUserIcon = (props) => (React__default.createElement("svg", Object.assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, props),
462
+ React__default.createElement("path", { d: "M10 19.167A9.167 9.167 0 1 0 10 .833a9.167 9.167 0 0 0 0 18.334", fill: "#BCDEFF" }),
463
+ React__default.createElement("path", { d: "M17.356 15.463a9.188 9.188 0 0 0-14.716-.005 9.155 9.155 0 0 0 14.716.005", fill: "#2D87F3" }),
464
+ React__default.createElement("path", { d: "M10 10.591a3.548 3.548 0 1 0 0-7.096 3.548 3.548 0 0 0 0 7.096", fill: "#2D87F3" })));
465
+
466
+ const StyledNavMenu = styled.div `
467
+ padding: 16px;
468
+ border-radius: 16px;
469
+ background-color: white;
470
+ hr {
471
+ border-color: ${theme.colors.neutral100};
472
+ border-bottom-width: 0px;
473
+ border-style: solid;
474
+ }
475
+ .profile-nav-item-group {
476
+ background-color: white;
477
+ border-radius: 8px;
478
+ }
479
+ `;
480
+ const StyledNavMenuItem = styled.div `
481
+ display: block;
482
+ border: 1px solid transparent;
483
+ transition: all 300ms linear;
484
+ cursor: pointer;
485
+ position: relative;
486
+
487
+ ${(props) => props.hasSubmenu &&
488
+ css `
489
+ cursor: pointer;
490
+ `}
491
+
492
+ &[data-is-open='true'] {
493
+ & + div {
494
+ margin-top: 8px;
495
+ }
496
+ }
497
+
498
+ border-left-width: 0;
499
+ border-right-width: 0;
500
+ &[data-is-open='true'] {
501
+ & + div {
502
+ margin-top: 0;
503
+ }
504
+ .nav-menu-item:last-child {
505
+ border-bottom-color: ${theme.colors.neutral100};
506
+ }
507
+ }
508
+ .nav-menu-item {
509
+ background-color: ${theme.colors.neutral50};
510
+ }
511
+
512
+ .nav-menu-item {
513
+ padding-left: 38px;
514
+ }
515
+ `;
516
+ const StyledNavMenuItemContent = styled.div `
517
+ display: flex;
518
+ align-items: center;
519
+ height: 48px;
520
+ border: 1px solid transparent;
521
+ transition: all 300ms;
522
+ border-radius: 8px;
523
+
524
+ &:hover {
525
+ background-color: ${theme.colors.neutral150};
526
+ }
527
+ &[data-active='true'] {
528
+ background-color: ${theme.colors.blue50};
529
+ }
530
+ `;
531
+ const StyledNavMenuItemDropdown = styled.div `
532
+ margin-left: auto;
533
+
534
+ svg {
535
+ fill: ${theme.colors.gray600};
536
+ transition: transform 300ms;
537
+ }
538
+
539
+ &[data-is-open='true'] svg {
540
+ transform: rotate(180deg);
541
+ }
542
+ `;
543
+ const StyledNavFooterSubMenu = styled.div `
544
+ overflow: hidden;
545
+ max-height: 0;
546
+ transition: max-height 0.3s ease-out;
547
+
548
+ [data-is-open='true'] & {
549
+ max-height: 500px;
550
+ transition-timing-function: ease-in;
551
+ }
552
+ `;
553
+
554
+ const rankIconUrlMap = {
555
+ helloSites: {
556
+ member: () => CommonGAssets.getAssetPath('userProfileNav/helloSites/icon-rank-member.svg'),
557
+ ambassador: () => CommonGAssets.getAssetPath('userProfileNav/helloSites/icon-rank-ambassador.svg'),
558
+ doctor: () => CommonGAssets.getAssetPath('userProfileNav/helloSites/icon-rank-doctor.svg'),
559
+ expert: () => CommonGAssets.getAssetPath('userProfileNav/helloSites/icon-rank-expert.svg'),
560
+ influencer: () => CommonGAssets.getAssetPath('userProfileNav/helloSites/icon-rank-influencer.svg'),
561
+ },
562
+ marryBaby: {
563
+ member: () => CommonGAssets.getAssetPath('userProfileNav/marryBaby/icon-rank-member.svg'),
564
+ ambassador: () => CommonGAssets.getAssetPath('userProfileNav/marryBaby/icon-rank-ambassador.svg'),
565
+ doctor: () => CommonGAssets.getAssetPath('userProfileNav/marryBaby/icon-rank-doctor.svg'),
566
+ expert: () => CommonGAssets.getAssetPath('userProfileNav/marryBaby/icon-rank-expert.svg'),
567
+ influencer: () => CommonGAssets.getAssetPath('userProfileNav/marryBaby/icon-rank-influencer.svg'),
568
+ },
569
+ };
570
+ const Rank = ({ rank, siteType = 'helloSites', }) => {
571
+ const iconUrl = useMemo(() => {
572
+ var _a, _b;
573
+ return ((_b = (_a = rankIconUrlMap[siteType]) === null || _a === void 0 ? void 0 : _a[rank]) === null || _b === void 0 ? void 0 : _b.call(_a)) || '';
574
+ }, [rank, siteType]);
575
+ const { t } = useTranslations();
576
+ return (React__default.createElement("div", { style: {
577
+ display: 'inline-flex',
578
+ height: 'fit-content',
579
+ alignItems: 'center',
580
+ padding: '5px 12px',
581
+ gap: '4px',
582
+ borderRadius: 16,
583
+ border: `1px solid ${siteType === 'helloSites' ? theme.colors.blue100 : theme.colors.mb100}`,
584
+ } },
585
+ React__default.createElement("img", { src: iconUrl, alt: rank, style: {
586
+ height: 16,
587
+ width: 16,
588
+ } }),
589
+ React__default.createElement(Text, { size: "s5", color: "gray.8", weight: "semiBold" }, t(`userProfile.userRank.${rank}`))));
590
+ };
591
+
592
+ const UserInfoSection = ({ siteType = 'helloSites', userInfo, }) => {
593
+ return (userInfo === null || userInfo === void 0 ? void 0 : userInfo.id) ? (React__default.createElement(React__default.Fragment, null,
594
+ React__default.createElement("div", { style: {
595
+ display: 'flex',
596
+ width: '100%',
597
+ justifyContent: 'space-between',
598
+ } },
599
+ React__default.createElement(Avatar, { src: userInfo.avatar, alt: userInfo.name, size: 48, style: { marginBottom: 8 } }),
600
+ React__default.createElement(Rank, { rank: "member", siteType: siteType })),
601
+ React__default.createElement(Text, { size: "s3", weight: "semiBold", color: "gray.8", style: { marginBottom: 4 } }, userInfo.name),
602
+ React__default.createElement(Text, { size: "n1", weight: "regular", color: siteType === 'helloSites' ? 'hb.6' : 'mb.6' },
603
+ "@",
604
+ userInfo.username),
605
+ React__default.createElement("hr", null))) : null;
606
+ };
607
+
608
+ const ProfileNavigation = ({ className, activeItem: forceActiveItem, navMenuItems: navMenuItemsProp, style, onLogout, siteType = 'helloSites', userInfo, }) => {
609
+ const { locale } = useTranslations();
610
+ const [localActiveItem, setLocalActiveItem] = useState();
611
+ const activeItem = typeof forceActiveItem === 'string' ? forceActiveItem : localActiveItem;
612
+ const SSO_URL = normalizeLinkSlash(getCurrentSsoUrl(locale, siteType === 'marryBaby') + '/');
613
+ const BASE_URL = normalizeLinkSlash(getCurrentBaseUrl(locale, siteType === 'marryBaby') + '/');
614
+ const navMenuItems = navMenuItemsProp || [
615
+ [
616
+ {
617
+ key: 'userProfile.nav.header.viewProfile',
618
+ icon: React__default.createElement(NavUserIcon, { width: "24", height: "24" }),
619
+ value: 'profile',
620
+ tracking: {
621
+ action: 'Profile Click',
622
+ },
623
+ link: `${SSO_URL}user/profile/`,
624
+ },
625
+ {
626
+ key: 'userProfile.nav.card.myHealth',
627
+ icon: React__default.createElement(NavMyHealthIcon, { width: "24", height: "24" }),
628
+ value: 'myHealth',
629
+ tracking: {
630
+ action: 'My Health Click',
631
+ },
632
+ link: `${SSO_URL}user/health/`,
633
+ },
634
+ {
635
+ key: 'userProfile.nav.card.mySaved',
636
+ icon: React__default.createElement(NavSaveIcon, { width: "24", height: "24" }),
637
+ iconColor: 'green_300',
638
+ value: 'saved',
639
+ tracking: {
640
+ action: 'Bookmarks Click',
641
+ },
642
+ link: `${SSO_URL}user/saved/`,
643
+ },
644
+ {
645
+ key: 'userProfile.nav.card.myBooking',
646
+ icon: React__default.createElement(NavBookingIcon, { width: "24", height: "24" }),
647
+ value: 'booking',
648
+ disabled: !CARE_LOCALES.includes(locale),
649
+ tracking: {
650
+ action: 'Manage Booking Click',
651
+ },
652
+ link: `${SSO_URL}user/booking/`,
653
+ },
654
+ {
655
+ key: 'userProfile.nav.card.myCommunity',
656
+ icon: React__default.createElement(NavCommunityIcon, { width: "24", height: "24" }),
657
+ value: 'myCommunities',
658
+ disabled: !TOGETHER_LOCALES.includes(locale),
659
+ tracking: {
660
+ action: 'Community Click',
661
+ },
662
+ link: `${SSO_URL}user/my-communities/`,
663
+ },
664
+ ],
665
+ ...(ECOM_LOCALES.includes(locale)
666
+ ? [
667
+ [
668
+ {
669
+ key: 'userProfile.nav.card.eCom',
670
+ icon: React__default.createElement(NavEshopIcon, { width: "24", height: "24" }),
671
+ value: 'eCom',
672
+ disabled: !ECOM_LOCALES.includes(locale),
673
+ subMenu: [
674
+ {
675
+ key: 'userProfile.nav.card.ecom.manageOrders',
676
+ value: 'eCom-manageOrders',
677
+ icon: React__default.createElement(NavDotIcon, { width: "24", height: "24" }),
678
+ link: `${BASE_URL}shop/ho-so/quan-li-don-hang/`,
679
+ tracking: {
680
+ action: 'Order Management Click',
681
+ },
682
+ },
683
+ {
684
+ key: 'userProfile.nav.card.ecom.DeliveryAddress',
685
+ value: 'eCom-manageAddress',
686
+ icon: React__default.createElement(NavDotIcon, { width: "24", height: "24" }),
687
+ link: `${BASE_URL}shop/ho-so/dia-chi-giao-hang/`,
688
+ tracking: {
689
+ action: 'Address Management Click',
690
+ },
691
+ },
692
+ {
693
+ key: 'userProfile.nav.card.ecom.voucher',
694
+ value: 'eCom-voucher',
695
+ icon: React__default.createElement(NavDotIcon, { width: "24", height: "24" }),
696
+ link: `${BASE_URL}shop/ho-so/khuyen-mai/`,
697
+ tracking: {
698
+ action: 'Voucher Click',
699
+ },
700
+ },
701
+ // {
702
+ // key: 'nav.card.memberCard',
703
+ // value: 'eCom-memberCard',
704
+ // icon: <NavDotIcon width="24"
705
+ // height="24"/>,
706
+ // link: routingHandler
707
+ // .getLocalisedUrl('', 'PROFILE_MEMBER_CARD')
708
+ // .toString(),
709
+ // tracking: {
710
+ // action: 'Member Card Click',
711
+ // },
712
+ // },
713
+ ],
714
+ },
715
+ ],
716
+ ]
717
+ : []),
718
+ [
719
+ {
720
+ key: 'userProfile.nav.menu.accountSettings',
721
+ icon: React__default.createElement(NavSettingsIcon, { width: "24", height: "24" }),
722
+ subMenu: [
723
+ {
724
+ key: 'common.profileNavigator.newsletterSubscription',
725
+ value: 'subscription',
726
+ icon: React__default.createElement(NavDotIcon, { width: "24", height: "24" }),
727
+ tracking: { action: 'Subscription Click' },
728
+ link: `${SSO_URL}user/subscriptions/`,
729
+ disabled: locale !== 'vi-VN',
730
+ },
731
+ {
732
+ key: 'userProfile.nav.menu.password',
733
+ value: 'password',
734
+ icon: React__default.createElement(NavDotIcon, { width: "24", height: "24" }),
735
+ tracking: { action: 'Set Password Click' },
736
+ link: `${SSO_URL}user/password/`,
737
+ },
738
+ {
739
+ key: 'userProfile.nav.menu.disableAccount',
740
+ value: 'disable-account',
741
+ icon: React__default.createElement(NavDotIcon, { width: "24", height: "24" }),
742
+ tracking: { action: 'Disable Account Click' },
743
+ link: `${SSO_URL}user/disable-account/`,
744
+ },
745
+ ],
746
+ },
747
+ ],
748
+ [
749
+ {
750
+ key: 'userProfile.nav.menu.help',
751
+ icon: React__default.createElement(NavHelpIcon, { width: "24", height: "24" }),
752
+ value: 'help',
753
+ link: `${SSO_URL}user/help`,
754
+ tracking: {
755
+ action: 'Support Click',
756
+ },
757
+ },
758
+ {
759
+ key: 'userProfile.nav.menu.logout',
760
+ icon: React__default.createElement(NavLogOutIcon, { width: "24", height: "24" }),
761
+ value: 'logout',
762
+ tracking: {
763
+ action: 'Sign Out Click',
764
+ },
765
+ },
766
+ ],
767
+ ];
768
+ return (React__default.createElement(StyledNavMenu, { className: className, style: style },
769
+ React__default.createElement(UserInfoSection, { userInfo: userInfo, siteType: siteType }),
770
+ navMenuItems.map((items, index) => (React__default.createElement(Fragment, { key: index },
771
+ React__default.createElement("div", { className: "profile-nav-item-group", key: index }, items.map((item) => (React__default.createElement(NavMenuItem, { key: item.key, item: item, activeKey: activeItem || '', onLogout: onLogout, onClick: () => setLocalActiveItem((k) => k === item.key ? undefined : item.key), siteType: siteType })))),
772
+ index !== navMenuItems.length - 1 && React__default.createElement("hr", null))))));
773
+ };
774
+ const NavMenuItem = ({ item, activeKey, forceOpen, onLogout, onClick, siteType = 'helloSites', }) => {
775
+ var _a, _b;
776
+ const [localOpen, setLocalOpen] = useState(false);
777
+ const currentUrl = useMemo(() => {
778
+ if (typeof window !== 'undefined') {
779
+ return window.location.href;
780
+ }
781
+ else
782
+ return '';
783
+ }, []);
784
+ if (item.disabled) {
785
+ return null;
786
+ }
787
+ const { t } = useTranslations();
788
+ const hasChildActive = (_a = item.subMenu) === null || _a === void 0 ? void 0 : _a.some((subItem) => subItem.key === activeKey);
789
+ const isActive = activeKey === item.key;
790
+ useEffect(() => {
791
+ if (hasChildActive || isActive) {
792
+ setLocalOpen(true);
793
+ }
794
+ }, [hasChildActive, isActive]);
795
+ const isOpen = typeof forceOpen === 'boolean' ? forceOpen : localOpen;
796
+ return (React__default.createElement(StyledNavMenuItem, { as: !item.subMenu ? 'a' : undefined, "data-is-open": isOpen, key: item.key, hasSubmenu: !!item.subMenu, onClick: () => {
797
+ onClick === null || onClick === void 0 ? void 0 : onClick();
798
+ if (item.subMenu && !forceOpen) {
799
+ setLocalOpen((k) => !k);
800
+ }
801
+ else {
802
+ if (item.value === 'logout') {
803
+ onLogout === null || onLogout === void 0 ? void 0 : onLogout();
804
+ }
805
+ else if (item.link) {
806
+ window.location.href = item.link;
807
+ }
808
+ }
809
+ }, "data-event-category": "Ecommerce", "data-event-action": ((_b = item === null || item === void 0 ? void 0 : item.tracking) === null || _b === void 0 ? void 0 : _b.action) || '', "data-event-label": currentUrl },
810
+ React__default.createElement(StyledNavMenuItemContent, { "data-active": isActive },
811
+ item.icon,
812
+ React__default.createElement(Text, { size: "p3", style: {
813
+ marginLeft: item.icon ? 24 : 48,
814
+ transition: `color 300ms`,
815
+ }, color: isActive ? (siteType === 'helloSites' ? 'hb.6' : 'mb.6') : 'gray.8' }, t(item.key)),
816
+ item.subMenu && (React__default.createElement(StyledNavMenuItemDropdown, { "data-is-open": isOpen },
817
+ React__default.createElement(ChevronDown, { width: 14 })))),
818
+ item.subMenu && (React__default.createElement(StyledNavFooterSubMenu, null, item.subMenu.map((subItem) => (React__default.createElement(NavMenuItem, { key: subItem.key, item: subItem, activeKey: activeKey, onLogout: onLogout, siteType: siteType })))))));
819
+ };
820
+
821
+ const ProfilePopup = ({ isOpen, userInfo, closePopup, siteType = 'helloSites', dispatchLogout, }) => {
822
+ const handleClickLogout = () => {
823
+ if (dispatchLogout) {
824
+ dispatchLogout();
825
+ closePopup();
826
+ }
827
+ };
828
+ return (React__default.createElement(StyledPopup$1, { "data-open": isOpen },
829
+ React__default.createElement("div", { className: "popup-content" },
830
+ React__default.createElement(ProfileNavigation, { siteType: siteType, onLogout: handleClickLogout, userInfo: userInfo }))));
831
+ };
832
+
833
+ const StyledPopup = styled.div `
834
+ background-color: white;
835
+ text-align: center;
836
+ .cancle-img {
837
+ margin-top: 24px;
838
+ ${MediaQueries.mbDown} {
839
+ width: 80px;
840
+ height: 80px;
841
+ }
842
+
843
+ ${MediaQueries.mbUp} {
844
+ width: 100px;
845
+ height: 100px;
846
+ }
847
+ }
848
+
849
+ h2 {
850
+ margin-top: 32px;
851
+ color: ${theme.colors.gray800};
852
+ font-style: normal;
853
+ font-weight: bold;
854
+ ${MediaQueries.mbDown} {
855
+ font-size: 24px;
856
+ line-height: 32px;
857
+ }
858
+
859
+ ${MediaQueries.mbUp} {
860
+ font-size: 32px;
861
+ line-height: 42px;
862
+ }
863
+ }
864
+
865
+ p {
866
+ margin-top: 8px;
867
+ color: ${theme.colors.gray600};
868
+ font-style: normal;
869
+ font-weight: normal;
870
+ ${MediaQueries.mbDown} {
871
+ font-size: 16px;
872
+ line-height: 24px;
873
+ }
874
+
875
+ ${MediaQueries.mbUp} {
876
+ font-size: 16px;
877
+ line-height: 24px;
878
+ }
879
+ }
880
+ `;
881
+ const StyledButtonGroup = styled.div `
882
+ display: flex;
883
+
884
+ ${MediaQueries.mbDown} {
885
+ margin-top: 24px;
886
+ }
887
+
888
+ ${MediaQueries.mbUp} {
889
+ margin-top: 32px;
890
+ }
891
+ justify-content: space-around;
892
+ button {
893
+ flex: 1;
894
+ margin: 4px;
895
+ }
896
+
897
+ ${(props) => props.siteType === 'marryBaby'
898
+ ? `
899
+ .cancel-button {
900
+ background-color: #E55C8A;
901
+ }
902
+ .cancel-button:hover {
903
+ background-color: #E55C8A !important;
904
+ }
905
+ .logout-button {
906
+ border-color: #E55C8A;
907
+ color: #E55C8A;
908
+ }
909
+ `
910
+ : ''}
911
+ `;
912
+
913
+ const NavigationLogoutPopup = ({ openLogoutPopup, onCloseHandler, onLogoutHandler, siteType = 'helloSites', }) => {
914
+ const { t } = useTranslations();
915
+ useEffect(() => {
916
+ document.body.classList.toggle('noscroll', openLogoutPopup);
917
+ }, [openLogoutPopup]);
918
+ return (React__default.createElement(Portal, null,
919
+ React__default.createElement(Popup, { type: "confirm", isOpen: openLogoutPopup, closeIcon: React__default.createElement("img", { src: CommonGAssets.getAssetPath('closeLight.svg'), style: { width: 24, height: 24 }, alt: "close-icon", loading: "lazy" }), onClose: onCloseHandler },
920
+ React__default.createElement(StyledPopup, null,
921
+ siteType === 'helloSites' && (React__default.createElement("img", { src: CommonGAssets.getAssetPath('arrowDoor.svg'), className: "cancle-img", alt: "close-account", loading: "lazy" })),
922
+ React__default.createElement("h2", null, t(siteType === 'helloSites'
923
+ ? 'logout.popup.ask1'
924
+ : 'logout.popup.ask.mb')),
925
+ React__default.createElement("p", null, t('logout.popup.ask2')),
926
+ React__default.createElement(StyledButtonGroup, { siteType: siteType },
927
+ React__default.createElement(Button, { className: "logout-button", color: "tertiary", size: "lg", onClick: onLogoutHandler }, t('logout.popup.button.logout')),
928
+ React__default.createElement(Button, { className: "cancel-button", color: "primary", size: "lg", onClick: onCloseHandler }, t('logout.popup.button.cancel')))))));
929
+ };
930
+
931
+ const NavigationProfileButton = ({ userInfo, siteType, onLoginClick, SSO_URL, currentUrl, isMinifyLogin, onLogout, style, isLoading, locale, }) => {
932
+ const { t } = useTranslations();
933
+ const [isLogoutConfirmOpen, setIsLogoutConfirmOpen] = useState(false);
934
+ const name = (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.username);
935
+ const [init, setInit] = useState(false);
936
+ useEffect(() => {
937
+ setInit(true);
938
+ }, []);
939
+ const { containerRef, onContainerFocus, onContainerBlur, onButtonMouseDown, onClose, } = useCSSFocusPopupHelper();
940
+ if (isLoading)
941
+ return React__default.createElement(Button$1, { size: "sm", color: "transparent", loading: true });
942
+ return (userInfo === null || userInfo === void 0 ? void 0 : userInfo.id) ? (React__default.createElement(React__default.Fragment, null,
943
+ React__default.createElement(StyledImageWrapper$1, { ref: containerRef, style: style, tabIndex: 0, onBlur: onContainerBlur, onFocus: () => {
944
+ var _a;
945
+ onContainerFocus();
946
+ const popup = (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.querySelector('#desktop-sticky-header .hhgcomp-navprofilebutton-popup');
947
+ if (popup) {
948
+ const bound = popup.getBoundingClientRect();
949
+ const top = bound.top;
950
+ const maxHeight = `calc(100vh - ${top}px)`;
951
+ popup.setAttribute('style', `max-height: ${maxHeight};`);
952
+ }
953
+ } },
954
+ React__default.createElement("div", { onMouseDown: onButtonMouseDown },
955
+ React__default.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", className: "user-close-icon" },
956
+ React__default.createElement("path", { d: "M18 6L6 18M18 18L6 6", stroke: "#3E3F58", strokeWidth: "1.3", strokeLinecap: "round" })),
957
+ React__default.createElement(Avatar, { size: 40, className: "user-avatar", src: userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar, color: siteType === 'marryBaby'
958
+ ? theme.mbColors.pink
959
+ : theme.colors.secondaryBase, placeholderText: name && name.length ? name[0].toUpperCase() : 'A' })),
960
+ React__default.createElement(ProfilePopup, { dispatchLogout: () => {
961
+ onClose();
962
+ setIsLogoutConfirmOpen(true);
963
+ }, isOpen: false, closePopup: onClose, siteType: siteType, userInfo: userInfo })),
964
+ React__default.createElement(NavigationLogoutPopup, { openLogoutPopup: isLogoutConfirmOpen, onCloseHandler: () => {
965
+ document.body.classList.toggle('noscroll', false);
966
+ setIsLogoutConfirmOpen(false);
967
+ }, siteType: siteType, onLogoutHandler: () => __awaiter(void 0, void 0, void 0, function* () {
968
+ setIsLogoutConfirmOpen(false);
969
+ document.body.classList.toggle('noscroll', false);
970
+ yield onLogout();
971
+ }) }))) : (React__default.createElement(StyledLoggedOutAnchor, { style: Object.assign({ textDecoration: 'none' }, style), "data-event-category": "Sign Up", "data-event-action": "Button Click", "data-event-label": currentUrl, href: !init
972
+ ? normalizeLinkSlash(`${SSO_URL}?returnUrl=${currentUrl}`)
973
+ : undefined, "data-site-type": siteType }, isMinifyLogin ? (React__default.createElement(StyledAvatar, { onClick: onLoginClick },
974
+ React__default.createElement("img", { src: CommonGAssets.getAssetPath('lock.png'), className: "avatar", loading: "lazy", alt: "avatar" }))) : (
975
+ // LOGIC:
976
+ // - DEsktop: always show button
977
+ // - Mobile: show button only for helloSites, show text for MarryBaby
978
+ React__default.createElement(React__default.Fragment, null,
979
+ siteType === 'helloSites' &&
980
+ (locale === LOCALE.Indonesia ||
981
+ locale === LOCALE.PhilippinesTagalog ||
982
+ locale === LOCALE.PhilippinesEnglish ? (React__default.createElement("img", { className: "mobile-only", src: CommonGAssets.getAssetPath('login.svg'), style: {
983
+ cursor: 'pointer',
984
+ height: 24,
985
+ width: 24,
986
+ }, onClick: onLoginClick })) : (React__default.createElement(Button$1, { className: "mobile-only", size: "sm", onClick: onLoginClick, leftIcon: React__default.createElement(User, { color: "currentColor", isSolid: true, size: 22 }), sx: {
987
+ paddingLeft: '8px',
988
+ paddingRight: '12px',
989
+ } }, t('navigation.loginJoin')))),
990
+ siteType === 'marryBaby' && (React__default.createElement("div", { className: "mobile-only", onClick: onLoginClick, style: {
991
+ paddingLeft: 16,
992
+ } },
993
+ React__default.createElement(Text, { size: "p3", color: theme.mbColors.pink }, t('navigation.loginJoin')))),
994
+ React__default.createElement(Button$1, { className: "login-btn", size: "md", onClick: onLoginClick, leftIcon: React__default.createElement(User, { color: "currentColor", isSolid: true, size: 22 }) }, t('navigation.loginJoin'))))));
995
+ };
996
+
997
+ var styles$3 = {"bookingButton":"spdlGfq","bookingButtonAnchor":"vgS16jX"};
998
+
999
+ const BookingButton = ({ onCareHeaderClick, currentUrl, careUrlFe, btnName, }) => {
1000
+ return onCareHeaderClick ? (React__default.createElement(Button, { className: styles$3.bookingButton, size: "md", color: "primary", dataEventCategory: "Care", dataEventAction: "Navigation Bar Click", dataEventLabel: currentUrl, onClick: (e) => onCareHeaderClick(e), style: {
1001
+ paddingLeft: 10,
1002
+ paddingRight: 10,
1003
+ } }, btnName)) : (React__default.createElement("a", { href: careUrlFe, className: `${styles$3.bookingButtonAnchor} care-button no-replace-click` },
1004
+ React__default.createElement(Button, { className: styles$3.bookingButton, size: "md", color: "primary", dataEventCategory: "Care", dataEventAction: "Navigation Bar Click", dataEventLabel: currentUrl }, btnName)));
1005
+ };
1006
+
1007
+ var styles$2 = {"menuContainer":"y5VJdvw","menuIcon":"oVhOSCy","menuIconWrapper":"pX8OXTM"};
1008
+
1009
+ const useNavConfig = ({ locale, projectType, siteType, enableBookingBtn, }) => {
1010
+ const config = useMemo(() => {
1011
+ const enableSearchBar = projectType === 'discover' ||
1012
+ projectType === 'marryBaby' ||
1013
+ (projectType === 'profile' && siteType === 'marryBaby');
1014
+ const enableNavCare = siteType !== 'marryBaby' &&
1015
+ projectType !== 'marryBaby' &&
1016
+ CARE_LOCALES.includes(locale);
1017
+ const enableNavCareBooking = enableBookingBtn &&
1018
+ projectType !== 'marryBaby' &&
1019
+ projectType === 'discover' &&
1020
+ siteType !== 'marryBaby' &&
1021
+ CARE_BOOKING_LOCALES.includes(locale);
1022
+ const enableNavTogether = projectType === 'marryBaby' || TOGETHER_LOCALES.includes(locale);
1023
+ const enableNavDiscover = true;
1024
+ const enableNavHealthTools = true;
1025
+ const enableProfileMySaved = true;
1026
+ const enableNavEcom = siteType !== 'marryBaby' && ECOM_LOCALES.includes(locale);
1027
+ const enableProfileEcom = siteType !== 'marryBaby' && ECOM_LOCALES.includes(locale);
1028
+ const enableProfileMyHealth = true;
1029
+ const baseUrl = getCurrentBaseUrl(locale, siteType === 'marryBaby');
1030
+ let fixBaseUrl = baseUrl;
1031
+ if (typeof window !== 'undefined') {
1032
+ if (fixBaseUrl.includes('//id.'))
1033
+ fixBaseUrl = fixBaseUrl.replace('id.', '');
1034
+ if (fixBaseUrl.includes('//staging-id.'))
1035
+ fixBaseUrl = fixBaseUrl.replace('staging-id.', 'discover.');
1036
+ }
1037
+ const ssoUrl = getCurrentSsoUrl(locale, siteType === 'marryBaby');
1038
+ const statics = (() => {
1039
+ return {
1040
+ HOME_PAGE_URL: fixBaseUrl,
1041
+ CARE_URL_FE: `${fixBaseUrl}/care`,
1042
+ TOGETHER_URL_FE: `${fixBaseUrl}/community`,
1043
+ SSO_URL: ssoUrl,
1044
+ TOGETHER_API: getTogetherApiDomain(),
1045
+ DISCOVER_API: getDiscoverApiDomain(locale),
1046
+ };
1047
+ })();
1048
+ return {
1049
+ enableSearchBar,
1050
+ enableNavCare,
1051
+ enableNavCareBooking,
1052
+ enableNavTogether,
1053
+ enableNavEcom,
1054
+ enableProfileEcom,
1055
+ enableProfileMyHealth,
1056
+ enableNavDiscover,
1057
+ enableNavHealthTools,
1058
+ enableProfileMySaved,
1059
+ statics,
1060
+ };
1061
+ }, [locale, projectType]);
1062
+ return config;
1063
+ };
1064
+
1065
+ const NavigationContext = React__default.createContext({});
1066
+ const NavigationProvider = (_a) => {
1067
+ var { children } = _a, props = __rest(_a, ["children"]);
1068
+ const [currentUrl, setCurrentUrl] = React__default.useState(() => {
1069
+ return (props.currentUrl ||
1070
+ `https://${props.siteType === 'marryBaby'
1071
+ ? domainLocalesMarryBaby[props.locale || 'en-PH']
1072
+ : domainLocales[props.locale || 'en-PH']}${props.projectType === 'together'
1073
+ ? '/community'
1074
+ : props.projectType === 'ecom'
1075
+ ? '/ecom'
1076
+ : props.projectType === 'care'
1077
+ ? '/care'
1078
+ : ''}/`);
1079
+ });
1080
+ useEffect(() => {
1081
+ const update = () => {
1082
+ setCurrentUrl(window.location.href);
1083
+ };
1084
+ window.addEventListener('popstate', update);
1085
+ update();
1086
+ return () => {
1087
+ window.removeEventListener('popstate', update);
1088
+ };
1089
+ }, []);
1090
+ const configs = useNavConfig({
1091
+ locale: props.locale,
1092
+ projectType: props.projectType,
1093
+ siteType: props.siteType,
1094
+ enableBookingBtn: props.enableBookingBtn,
1095
+ });
1096
+ return (React__default.createElement(NavigationContext.Provider, { value: Object.assign(Object.assign({}, props), { configs: Object.assign(Object.assign({}, configs), props.configs), currentUrl: props.currentUrl || currentUrl }) }, children));
1097
+ };
1098
+
1099
+ function ClosePopupIcon({ className }) {
1100
+ return (React__default.createElement("div", null,
1101
+ React__default.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", className: className },
1102
+ React__default.createElement("path", { d: "M18 6L6 18M18 18L6 6", stroke: "#3E3F58", strokeWidth: "1.3", strokeLinecap: "round" }))));
1103
+ }
1104
+
1105
+ function HamburgerIcon({ siteType, enableSearch, className }) {
1106
+ if (siteType === 'helloSites') {
1107
+ return (React__default.createElement("div", null,
1108
+ React__default.createElement("img", { "data-list-type": "Header", "data-content-type": "Navigation", "data-content-topic": "Hamburger", src: enableSearch
1109
+ ? CommonGAssets.getAssetPath('hamburgerMenuNewWithSearch.svg')
1110
+ : CommonGAssets.getAssetPath('hamburgerMenuNew.svg'), style: { width: '24px', height: '24px' }, alt: "home", className: className, loading: "lazy" })));
1111
+ }
1112
+ /** Marry Baby */
1113
+ return (React__default.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", className: className },
1114
+ React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M3.34961 15C3.34961 14.641 3.64062 14.35 3.99961 14.35L13.9996 14.35C14.3586 14.35 14.6496 14.641 14.6496 15C14.6496 15.359 14.3586 15.65 13.9996 15.65L3.99961 15.65C3.64062 15.65 3.34961 15.359 3.34961 15ZM3.34961 8.99999C3.34961 8.64101 3.64062 8.34999 3.99961 8.34999L19.9992 8.34999C20.3582 8.34999 20.6492 8.64101 20.6492 8.99999C20.6492 9.35898 20.3582 9.64999 19.9992 9.64999L3.99961 9.64999C3.64062 9.64999 3.34961 9.35898 3.34961 8.99999Z", fill: "#3E3F58" })));
1115
+ }
1116
+
1117
+ // import { StyledMenuPopupWrapperClass } from '../../atoms/PopupWrapper/index.styled'
1118
+ const StyledMasterMenuContainer = styled.div `
1119
+ position: fixed;
1120
+ z-index: 201;
1121
+ top: calc(100% + 1px);
1122
+ width: 100%;
1123
+ height: calc(100vh - var(--header-bottom));
1124
+ overflow-x: hidden;
1125
+ overflow-y: auto;
1126
+ background: white;
1127
+ display: flex;
1128
+ flex-direction: column;
1129
+ padding-bottom: 0;
1130
+ left: 0;
1131
+ .hhgcomp-navigation-popupwrapper-menuwrapper {
1132
+ position: unset;
1133
+ }
1134
+ `;
1135
+ // Desktop
1136
+ // export const StyledMenuPopupWrapper = styled.div`
1137
+ // position: fixed;
1138
+ // z-index: ${Z_INDEX.menuCategoryPopupWrapper};
1139
+ // top: 69px;
1140
+ // left: 0;
1141
+ // width: 100%;
1142
+ // height: 100%;
1143
+ // align-items: center;
1144
+ // background-color: transparent;
1145
+ // &[data-is-display='false'] {
1146
+ // display: none;
1147
+ // }
1148
+ // `
1149
+ const StyledServiceListMenuSearchInputWrapper = styled.div `
1150
+ padding: 16px;
1151
+ padding-bottom: 12px;
1152
+ .fake-search-input {
1153
+ pointer-events: none;
1154
+ input {
1155
+ line-height: 20px;
1156
+ padding-top: 10px;
1157
+ padding-bottom: 10px;
1158
+ }
1159
+ }
1160
+ &[data-theme='marryBaby'] {
1161
+ input {
1162
+ background: ${theme.mbColors.lightGray};
1163
+ border-radius: 16px;
1164
+ border: none;
1165
+ }
1166
+ }
1167
+ `;
1168
+ const StyledWrapper = styled.div `
1169
+ display: block;
1170
+ overflow-y: auto;
1171
+ flex: 1;
1172
+ padding-bottom: 16px;
1173
+ &::-webkit-scrollbar {
1174
+ width: 0;
1175
+ display: none;
1176
+ }
1177
+ `;
1178
+
1179
+ const SearchInput = ({ id }) => {
1180
+ const { locale, configs: { statics }, siteType, } = useContext(NavigationContext);
1181
+ const { t } = useTranslations();
1182
+ return (React__default.createElement(Input, { className: "fake-search-input", name: 'search-input-menu-service' + id, size: "md", placeholder: siteType === 'marryBaby'
1183
+ ? t('navigation.search.input.placeholder')
1184
+ : t('home.search', {
1185
+ site: LOCALE_SPECS[locale || 'en-PH']
1186
+ ? LOCALE_SPECS[locale || 'en-PH'].SITE_NAME
1187
+ : '',
1188
+ }), onChange: () => undefined, onKeyDown: (e) => e.key === 'Enter' &&
1189
+ (window.location.href = `${statics.HOME_PAGE_URL}/search/?s=${e.target.value}`), type: "search", onFocus: (e) => {
1190
+ e.preventDefault();
1191
+ }, icon: React__default.createElement("a", { "data-event-category": "Search Button", "data-event-action": "Click" },
1192
+ React__default.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", style: {
1193
+ verticalAlign: 'bottom',
1194
+ } },
1195
+ React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M3.97183 10.8732C3.97183 7.0617 7.0617 3.97183 10.8732 3.97183C14.6848 3.97183 17.7746 7.0617 17.7746 10.8732C17.7746 14.6848 14.6848 17.7746 10.8732 17.7746C7.0617 17.7746 3.97183 14.6848 3.97183 10.8732ZM10.8732 2C5.97268 2 2 5.97268 2 10.8732C2 15.7738 5.97268 19.7465 10.8732 19.7465C12.9683 19.7465 14.8938 19.0204 16.4118 17.8061L20.3169 21.7112C20.702 22.0963 21.3262 22.0963 21.7112 21.7112C22.0963 21.3262 22.0963 20.702 21.7112 20.3169L17.8061 16.4118C19.0204 14.8938 19.7465 12.9683 19.7465 10.8732C19.7465 5.97268 15.7738 2 10.8732 2Z", fill: "#8C8C8C" }))) }));
1196
+ };
1197
+
1198
+ const StyledItemGridLeft = styled.div `
1199
+ padding-right: 1rem;
1200
+ margin-top: 10px;
1201
+ background: #ffffff;
1202
+ padding: 5px 15px;
1203
+ ${MediaQueries.mbUp} {
1204
+ border-right: 1px solid #e4e8ec;
1205
+ }
1206
+ `;
1207
+ const StyledItem$6 = styled.a `
1208
+ padding: 10px 0;
1209
+ position: relative;
1210
+
1211
+ display: flex;
1212
+ align-items: center;
1213
+ text-decoration: none;
1214
+ color: ${theme.colors.gray800};
1215
+ * {
1216
+ pointer-events: none;
1217
+ }
1218
+ p {
1219
+ font-size: 16px;
1220
+ font-weight: 400;
1221
+ padding: 0 0.4rem;
1222
+ }
1223
+
1224
+ &[data-theme='marryBaby']:hover,
1225
+ &[data-theme='marryBaby'][data-active='true'] {
1226
+ p {
1227
+ color: ${theme.mbColors.pink};
1228
+ }
1229
+ .icon {
1230
+ background-color: ${theme.mbColors.lightPink};
1231
+ }
1232
+ }
1233
+ &[data-theme='helloSites']:hover,
1234
+ &[data-theme='helloSites'][data-active='true'] {
1235
+ p {
1236
+ color: ${theme.colors.primaryActive};
1237
+ }
1238
+ }
1239
+ a {
1240
+ }
1241
+
1242
+ &[data-theme='marryBaby'] {
1243
+ .icon {
1244
+ display: flex;
1245
+ align-items: center;
1246
+ justify-content: center;
1247
+ max-width: 40px;
1248
+ width: 100%;
1249
+ height: 40px;
1250
+ border-radius: 50%;
1251
+ background-color: ${theme.mbColors.lightGray};
1252
+ img {
1253
+ border-radius: 50%;
1254
+ }
1255
+ }
1256
+ }
1257
+ `;
1258
+ const StyledHeading$1 = styled.div `
1259
+ margin: 15px 0;
1260
+ ${MediaQueries.mbDown} {
1261
+ display: none;
1262
+ }
1263
+ `;
1264
+ const StyledIconNav = styled.div `
1265
+ display: flex;
1266
+ position: absolute;
1267
+ right: 0;
1268
+ ${MediaQueries.mbUp} {
1269
+ display: none;
1270
+ }
1271
+ `;
1272
+ const StyledItemAll = styled.div `
1273
+ display: flex;
1274
+ align-items: center;
1275
+ color: ${theme.colors.primaryBase};
1276
+ font-size: ${theme.sizes.fsParagraph4};
1277
+ font-weight: ${theme.sizes.fwBold};
1278
+ line-height: 24px;
1279
+ font-size: 14px;
1280
+ font-weight: 600;
1281
+ &[data-event-category] * {
1282
+ pointer-events: none;
1283
+ }
1284
+ &[data-theme='marryBaby'] {
1285
+ color: ${theme.mbColors.pink};
1286
+ }
1287
+ `;
1288
+ const StyledImageWrapper = styled.div `
1289
+ display: flex;
1290
+ align-items: center;
1291
+ margin-left: 10px;
1292
+ `;
1293
+ const StyledViewMore$1 = styled.a `
1294
+ border: 1px solid ${theme.colors.primaryBase};
1295
+ &[data-theme='marryBaby'] {
1296
+ border: 1px solid ${theme.mbColors.pink};
1297
+
1298
+ svg path {
1299
+ stroke: ${theme.mbColors.pink};
1300
+ }
1301
+ }
1302
+ position: relative;
1303
+ display: flex;
1304
+ align-items: center;
1305
+ justify-content: center;
1306
+ padding: 6px;
1307
+ border-radius: 5px;
1308
+ margin-top: 20px;
1309
+ ${MediaQueries.mbDown} {
1310
+ display: none;
1311
+ }
1312
+ `;
1313
+
1314
+ var styles$1 = {"menuIconWrapper":"wnUb-dV","menuButton":"cjbOxWe","careIconContainer":"gB4rp89","scale":"EDlp5Zf"};
1315
+
1316
+ const ItemMenu = ({ item, menu }) => {
1317
+ const { containerRef, onContainerFocus, onContainerBlur, onButtonMouseDown, onClose, } = useCSSFocusPopupHelper({
1318
+ allowBgScroll: true,
1319
+ });
1320
+ const isInit = useIsInit();
1321
+ if (!item.popupType && item.link) {
1322
+ return (React__default.createElement(NewWrapper, { isNew: item.isNew },
1323
+ React__default.createElement("a", { className: `hhgcomp-navigation-itemnav-headeritem ${!isInit ? `menu-handler-${item.id}` : ''} ${item.id === 'care' ? 'force-focus' : ''}`, tabIndex: 0, href: item.link, "data-event-category": "Hamburger Navigation", "data-event-action": "Click", "data-event-label": item.link },
1324
+ React__default.createElement("div", { "data-event-category": "Hamburger Navigation", "data-event-action": "Click", "data-event-label": item.link, className: styles$1.menuButton },
1325
+ item.id === 'care' && (React__default.createElement("div", { className: styles$1.careIconContainer },
1326
+ React__default.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
1327
+ React__default.createElement("path", { d: "M13.4751 21.5C11.8084 21.5 10.3918 20.9167 9.2251 19.75C8.05843 18.5833 7.4751 17.1667 7.4751 15.5V14.95C6.1251 14.7833 4.9961 14.1833 4.0881 13.15C3.17943 12.1167 2.7251 10.9 2.7251 9.5V4.65C2.7251 4.4 2.81243 4.18733 2.9871 4.012C3.16243 3.83733 3.3751 3.75 3.6251 3.75H5.7251V3.5C5.7251 3.28333 5.7961 3.104 5.9381 2.962C6.07943 2.82067 6.25843 2.75 6.4751 2.75C6.69176 2.75 6.8711 2.82067 7.0131 2.962C7.15443 3.104 7.2251 3.28333 7.2251 3.5V5.5C7.2251 5.71667 7.15443 5.89567 7.0131 6.037C6.8711 6.179 6.69176 6.25 6.4751 6.25C6.25843 6.25 6.07943 6.179 5.9381 6.037C5.7961 5.89567 5.7251 5.71667 5.7251 5.5V5.25H4.2251V9.5C4.2251 10.6 4.61676 11.5417 5.4001 12.325C6.18343 13.1083 7.1251 13.5 8.2251 13.5C9.3251 13.5 10.2668 13.1083 11.0501 12.325C11.8334 11.5417 12.2251 10.6 12.2251 9.5V5.25H10.7251V5.5C10.7251 5.71667 10.6544 5.89567 10.5131 6.037C10.3711 6.179 10.1918 6.25 9.9751 6.25C9.75843 6.25 9.57943 6.179 9.4381 6.037C9.2961 5.89567 9.2251 5.71667 9.2251 5.5V3.5C9.2251 3.28333 9.2961 3.104 9.4381 2.962C9.57943 2.82067 9.75843 2.75 9.9751 2.75C10.1918 2.75 10.3711 2.82067 10.5131 2.962C10.6544 3.104 10.7251 3.28333 10.7251 3.5V3.75H12.8251C13.0751 3.75 13.2878 3.83733 13.4631 4.012C13.6378 4.18733 13.7251 4.4 13.7251 4.65V9.5C13.7251 10.9 13.2711 12.1167 12.3631 13.15C11.4544 14.1833 10.3251 14.7833 8.9751 14.95V15.5C8.9751 16.75 9.41276 17.8127 10.2881 18.688C11.1628 19.5627 12.2251 20 13.4751 20C14.7251 20 15.7878 19.5627 16.6631 18.688C17.5378 17.8127 17.9751 16.75 17.9751 15.5V13.875C17.4584 13.7083 17.0294 13.404 16.6881 12.962C16.3461 12.5207 16.1751 12.0167 16.1751 11.45C16.1751 10.7333 16.4251 10.125 16.9251 9.625C17.4251 9.125 18.0251 8.875 18.7251 8.875C19.4418 8.875 20.0501 9.125 20.5501 9.625C21.0501 10.125 21.3001 10.7333 21.3001 11.45C21.3001 12.0167 21.1294 12.5207 20.7881 12.962C20.4461 13.404 20.0084 13.7083 19.4751 13.875V15.5C19.4751 17.1667 18.8918 18.5833 17.7251 19.75C16.5584 20.9167 15.1418 21.5 13.4751 21.5Z", fill: "#2D87F3", strokeWidth: 0 })))),
1328
+ item.name))));
1329
+ }
1330
+ return (React__default.createElement(NewWrapper, { isNew: item.isNew },
1331
+ React__default.createElement("div", { ref: containerRef, className: `hhgcomp-navigation-itemnav-headeritem ${!isInit ? `menu-handler-${item.id}` : ''} ${item.id === 'care' ? 'force-focus' : ''}`, tabIndex: 0, key: item.id, onBlur: onContainerBlur, onFocus: onContainerFocus, "data-event-category": "Hamburger Navigation", "data-event-action": "Click", "data-event-label": item.link },
1332
+ React__default.createElement("div", { "data-event-category": "Hamburger Navigation", "data-event-action": "Click", "data-event-label": item.link, onMouseDown: onButtonMouseDown, className: styles$1.menuButton },
1333
+ item.id === 'care' && (React__default.createElement("a", { className: styles$1.careIconContainer, href: normalizeLinkSlash(item.link + '/') },
1334
+ React__default.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
1335
+ React__default.createElement("path", { d: "M13.4751 21.5C11.8084 21.5 10.3918 20.9167 9.2251 19.75C8.05843 18.5833 7.4751 17.1667 7.4751 15.5V14.95C6.1251 14.7833 4.9961 14.1833 4.0881 13.15C3.17943 12.1167 2.7251 10.9 2.7251 9.5V4.65C2.7251 4.4 2.81243 4.18733 2.9871 4.012C3.16243 3.83733 3.3751 3.75 3.6251 3.75H5.7251V3.5C5.7251 3.28333 5.7961 3.104 5.9381 2.962C6.07943 2.82067 6.25843 2.75 6.4751 2.75C6.69176 2.75 6.8711 2.82067 7.0131 2.962C7.15443 3.104 7.2251 3.28333 7.2251 3.5V5.5C7.2251 5.71667 7.15443 5.89567 7.0131 6.037C6.8711 6.179 6.69176 6.25 6.4751 6.25C6.25843 6.25 6.07943 6.179 5.9381 6.037C5.7961 5.89567 5.7251 5.71667 5.7251 5.5V5.25H4.2251V9.5C4.2251 10.6 4.61676 11.5417 5.4001 12.325C6.18343 13.1083 7.1251 13.5 8.2251 13.5C9.3251 13.5 10.2668 13.1083 11.0501 12.325C11.8334 11.5417 12.2251 10.6 12.2251 9.5V5.25H10.7251V5.5C10.7251 5.71667 10.6544 5.89567 10.5131 6.037C10.3711 6.179 10.1918 6.25 9.9751 6.25C9.75843 6.25 9.57943 6.179 9.4381 6.037C9.2961 5.89567 9.2251 5.71667 9.2251 5.5V3.5C9.2251 3.28333 9.2961 3.104 9.4381 2.962C9.57943 2.82067 9.75843 2.75 9.9751 2.75C10.1918 2.75 10.3711 2.82067 10.5131 2.962C10.6544 3.104 10.7251 3.28333 10.7251 3.5V3.75H12.8251C13.0751 3.75 13.2878 3.83733 13.4631 4.012C13.6378 4.18733 13.7251 4.4 13.7251 4.65V9.5C13.7251 10.9 13.2711 12.1167 12.3631 13.15C11.4544 14.1833 10.3251 14.7833 8.9751 14.95V15.5C8.9751 16.75 9.41276 17.8127 10.2881 18.688C11.1628 19.5627 12.2251 20 13.4751 20C14.7251 20 15.7878 19.5627 16.6631 18.688C17.5378 17.8127 17.9751 16.75 17.9751 15.5V13.875C17.4584 13.7083 17.0294 13.404 16.6881 12.962C16.3461 12.5207 16.1751 12.0167 16.1751 11.45C16.1751 10.7333 16.4251 10.125 16.9251 9.625C17.4251 9.125 18.0251 8.875 18.7251 8.875C19.4418 8.875 20.0501 9.125 20.5501 9.625C21.0501 10.125 21.3001 10.7333 21.3001 11.45C21.3001 12.0167 21.1294 12.5207 20.7881 12.962C20.4461 13.404 20.0084 13.7083 19.4751 13.875V15.5C19.4751 17.1667 18.8918 18.5833 17.7251 19.75C16.5584 20.9167 15.1418 21.5 13.4751 21.5Z", fill: "#2D87F3", strokeWidth: 0 })))),
1336
+ item.name,
1337
+ item.popupType && (React__default.createElement("div", { className: styles$1.menuIconWrapper },
1338
+ React__default.createElement("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none" },
1339
+ React__default.createElement("path", { d: "M11.5 7.5L9 10L6.5 7.5", stroke: "#202135", strokeWidth: "1.33", strokeLinecap: "round", strokeLinejoin: "round" }))))),
1340
+ React__default.isValidElement(menu)
1341
+ ? React__default.cloneElement(menu, {
1342
+ onClose,
1343
+ })
1344
+ : null)));
1345
+ };
1346
+ const NewWrapper = ({ isNew, children, }) => {
1347
+ const { t } = useTranslations();
1348
+ if (isNew) {
1349
+ return (React__default.createElement(Indicator$1, { color: "green", label: t('home.navigator.menuItem.new'), size: 20, styles: {
1350
+ root: {
1351
+ paddingRight: 10,
1352
+ },
1353
+ } }, children));
1354
+ }
1355
+ return React__default.createElement(React__default.Fragment, null, children);
1356
+ };
1357
+
1358
+ const Categories = ({ hrefViewMore, titleBtnViewMore, UrlFE, onClosePopup, menuItems, headingTitle, activeItem, }) => {
1359
+ const { siteType } = useContext(NavigationContext);
1360
+ return (React__default.createElement(StyledItemGridLeft, null,
1361
+ React__default.createElement(StyledHeading$1, null,
1362
+ React__default.createElement(Heading, { tag: siteType === 'marryBaby' ? 'h5' : 'h6', as: "p", fontWeight: "semibold" }, headingTitle)), menuItems === null || menuItems === void 0 ? void 0 :
1363
+ menuItems.slice(0, 6).map((item, index) => {
1364
+ const href = (item === null || item === void 0 ? void 0 : item.link)
1365
+ ? (item === null || item === void 0 ? void 0 : item.link.startsWith('http'))
1366
+ ? item === null || item === void 0 ? void 0 : item.link
1367
+ : `${UrlFE}/${item === null || item === void 0 ? void 0 : item.link.split('/').filter(Boolean).join('/')}/`
1368
+ : '/';
1369
+ return (React__default.createElement(StyledItem$6, Object.assign({ className: "iconMenu", "data-event-category": "Hamburger Navigation", "data-event-action": "Click", "data-event-label": href, "data-is-heading-category": false, "data-active": item.id && item.id === activeItem, href: href }, (!isInternalLink(href) && {
1370
+ target: '_blank',
1371
+ }), { "data-theme": siteType, key: index, onClick: onClosePopup }),
1372
+ React__default.createElement("div", { className: "icon" },
1373
+ React__default.createElement("img", { loading: "lazy", alt: item.name, src: item.thumbnail || '/images/avatar.jpg', style: {
1374
+ width: 32,
1375
+ height: 32,
1376
+ maxWidth: 32,
1377
+ maxHeight: 32,
1378
+ overflow: 'hidden',
1379
+ } })),
1380
+ React__default.createElement(NewWrapper, { isNew: item.isNew },
1381
+ React__default.createElement("p", { style: { paddingRight: item.isNew ? 10 : 0 } }, item.name)),
1382
+ React__default.createElement(StyledIconNav, null, React__default.createElement("img", { src: CommonGAssets.getAssetPath('chevronRight.svg'), style: { width: '16px', height: '16px' }, loading: "lazy" }))));
1383
+ }),
1384
+ titleBtnViewMore && (React__default.createElement(StyledViewMore$1, { "data-theme": siteType, style: { textDecoration: 'none' }, href: hrefViewMore, "data-event-category": "Hamburger Navigation", "data-event-action": "Click", "data-event-label": hrefViewMore },
1385
+ React__default.createElement(StyledItemAll, { onClick: onClosePopup, "data-theme": siteType, "data-is-heading-category": false },
1386
+ titleBtnViewMore,
1387
+ React__default.createElement(StyledImageWrapper, null,
1388
+ React__default.createElement("img", { className: "svg", src: siteType === 'marryBaby'
1389
+ ? CommonGAssets.getAssetPath('chevronRightPink.svg')
1390
+ : CommonGAssets.getAssetPath('chevronRightActive.svg'), style: { width: '16px', height: '16px' }, loading: "lazy" })))))));
1391
+ };
1392
+
1393
+ const StyledContainerItems$4 = styled.div `
1394
+ display: grid;
1395
+
1396
+ grid-template-columns: repeat(3, 1fr);
1397
+ gap: 24px;
1398
+ margin-bottom: 3.5rem;
1399
+ ${MediaQueries.tdDown} {
1400
+ grid-template-columns: repeat(1, 1fr);
1401
+ }
1402
+ `;
1403
+
1404
+ const StyledImageCard$3 = styled.div `
1405
+ height: 152px;
1406
+ position: absolute;
1407
+ top: 0;
1408
+ left: 0;
1409
+ z-index: 3;
1410
+ overflow: hidden;
1411
+ border-radius: 4px;
1412
+ padding: 16px;
1413
+ width: 100%;
1414
+
1415
+ .img-container {
1416
+ width: 100%;
1417
+ height: 100%;
1418
+ }
1419
+ img {
1420
+ width: 100%;
1421
+ height: 100%;
1422
+ display: block;
1423
+ object-fit: contain;
1424
+ }
1425
+ ${MediaQueries.tdDown} {
1426
+ margin-bottom: 0;
1427
+ padding: 0;
1428
+ height: 100%;
1429
+ position: unset;
1430
+ width: 150px;
1431
+ }
1432
+ ${MediaQueries.mbDown} {
1433
+ width: 80px;
1434
+ }
1435
+ `;
1436
+ const StyledImageCardInner = styled.div `
1437
+ background-color: #ffffff;
1438
+ border-radius: 4px;
1439
+ width: 100%;
1440
+ height: 100%;
1441
+ `;
1442
+ const StyledBtnView$2 = styled.div `
1443
+ display: flex;
1444
+ margin-top: 1rem;
1445
+ align-items: center;
1446
+ color: ${theme.colors.primaryBase};
1447
+ font-weight: 400;
1448
+ font-size: 14px;
1449
+ text-decoration: none;
1450
+ ${MediaQueries.tdDown} {
1451
+ display: none;
1452
+ }
1453
+ `;
1454
+ const StyledTitle$5 = styled.p `
1455
+ font-size: 16px;
1456
+ font-weight: 600;
1457
+ line-height: 1.6;
1458
+ color: ${theme.colors.gray800};
1459
+ ${MediaQueries.tdDown} {
1460
+ padding: 0;
1461
+ }
1462
+ `;
1463
+ const StyledDes$2 = styled.p `
1464
+ font-size: 14px;
1465
+ line-height: 1.6;
1466
+ font-weight: 400;
1467
+ color: ${theme.colors.gray600};
1468
+ height: 40px;
1469
+ text-overflow: ellipsis;
1470
+ overflow: hidden;
1471
+ display: -webkit-box;
1472
+ -webkit-line-clamp: 2;
1473
+ -webkit-box-orient: vertical;
1474
+ margin-bottom: auto;
1475
+ ${MediaQueries.tdDown} {
1476
+ height: unset;
1477
+ padding: 0;
1478
+ }
1479
+ `;
1480
+ const _StyledContentWrapper = styled.div `
1481
+ display: flex;
1482
+ flex-direction: column;
1483
+ gap: 8px;
1484
+ flex: 1;
1485
+ z-index: 1;
1486
+ ${MediaQueries.tdDown} {
1487
+ gap: 4px;
1488
+ }
1489
+ `;
1490
+ const StyledContentWrapperClass = 'hhgcomp-navigation-menucareitem-contentwrapper';
1491
+ const StyledContentWrapper$2 = getDefaultClassWrapper(_StyledContentWrapper, StyledContentWrapperClass);
1492
+ const StyledItem$5 = styled.a `
1493
+ text-decoration: none;
1494
+ border-radius: 4px;
1495
+ background: ${theme.colors.white};
1496
+ position: relative;
1497
+ overflow: hidden;
1498
+ padding: 16px;
1499
+ display: flex;
1500
+ padding-top: 166px;
1501
+ * {
1502
+ pointer-events: none;
1503
+ }
1504
+ ${MediaQueries.tdUp} {
1505
+ box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.04), 0px 0px 2px rgba(0, 0, 0, 0.06),
1506
+ 0px 0px 1px rgba(0, 0, 0, 0.04);
1507
+ gap: 30px;
1508
+ flex-direction: column;
1509
+ a {
1510
+ display: flex;
1511
+ width: 100%;
1512
+ }
1513
+ }
1514
+ ${MediaQueries.tdDown} {
1515
+ padding-top: 16px;
1516
+ a {
1517
+ display: none;
1518
+ }
1519
+ grid-template-columns: 2fr 1fr;
1520
+ gap: 10px;
1521
+ display: grid;
1522
+ max-height: 110px;
1523
+ display: flex;
1524
+ flex-direction: row-reverse;
1525
+ > .${StyledContentWrapperClass} {
1526
+ flex: 1;
1527
+ }
1528
+ img {
1529
+ width: 150px;
1530
+ }
1531
+ }
1532
+ ${MediaQueries.mbDown} {
1533
+ box-shadow: 0px 10px 16px rgba(0, 0, 0, 0.04),
1534
+ 0px 2px 8px rgba(0, 0, 0, 0.04), 0px 0px 1px rgba(0, 0, 0, 0.04);
1535
+ display: flex;
1536
+ flex-direction: row-reverse;
1537
+ img {
1538
+ width: 80px;
1539
+ height: 80px;
1540
+ }
1541
+ }
1542
+ ${MediaQueries.tdOnly} {
1543
+ border: 1px solid ${theme.colors.neutral100};
1544
+ }
1545
+ .bg-svg {
1546
+ width: 100%;
1547
+ max-width: 245px;
1548
+ height: 100%;
1549
+ top: 0;
1550
+ right: -40px;
1551
+ position: absolute;
1552
+ display: inline-block;
1553
+ }
1554
+ `;
1555
+
1556
+ const Item$4 = ({ item, index = 0 }) => {
1557
+ var _a;
1558
+ const { t } = useTranslations();
1559
+ const { locale, configs: { statics }, } = useContext(NavigationContext);
1560
+ if (!item)
1561
+ return null;
1562
+ const href = `${statics.CARE_URL_FE}/${(_a = LOCALIZED_SLUGS[locale]) === null || _a === void 0 ? void 0 : _a.HOSPITAL}/${item.slug}-${item.id}`;
1563
+ return (React__default.createElement(StyledItem$5, { key: item.id, href: href, "data-event-category": "Hamburger Navigation", "data-event-action": `Care Click ${index + 1}`, "data-event-label": href },
1564
+ React__default.createElement("img", { src: CommonGAssets.getAssetPath('navCareCardBg.svg'), alt: "", className: "bg-svg", loading: "lazy" }),
1565
+ React__default.createElement(StyledImageCard$3, null,
1566
+ React__default.createElement(StyledImageCardInner, null,
1567
+ React__default.createElement("img", { loading: "lazy", alt: item.name, src: item.logo || '/images/avatar.jpg' }))),
1568
+ React__default.createElement(StyledContentWrapper$2, null,
1569
+ React__default.createElement(StyledTitle$5, null, item.name),
1570
+ React__default.createElement(StyledDes$2, null, item.description),
1571
+ React__default.createElement(StyledBtnView$2, null,
1572
+ t('home.seeMore'),
1573
+ React__default.createElement("img", { src: CommonGAssets.getAssetPath('chevronRightActive.svg'), style: {
1574
+ width: '16px',
1575
+ height: '16px',
1576
+ marginTop: '3px',
1577
+ marginLeft: '5px',
1578
+ }, loading: "lazy" })))));
1579
+ };
1580
+
1581
+ const StyledContainerNoPosts = styled.div `
1582
+ padding: 16px;
1583
+ border-radius: 8px;
1584
+ position: relative;
1585
+ z-index: 1;
1586
+ overflow: hidden;
1587
+ a {
1588
+ text-decoration: none;
1589
+ }
1590
+
1591
+ .bg-svg {
1592
+ height: 100%;
1593
+ position: absolute;
1594
+ top: 0;
1595
+ left: 0;
1596
+ z-index: -1;
1597
+ }
1598
+ ${MediaQueries.mbDown} {
1599
+ display: block;
1600
+ .bg-svg {
1601
+ right: -24px;
1602
+ left: unset;
1603
+ top: 0;
1604
+ transform: rotateY(180deg);
1605
+ }
1606
+ }
1607
+
1608
+ ${MediaQueries.mbUp} {
1609
+ display: grid;
1610
+ grid-gap: 10px;
1611
+ grid-template-columns: 1fr 3fr;
1612
+ }
1613
+ `;
1614
+ const StyledDescription = styled.div `
1615
+ font-weight: 400;
1616
+ font-size: 14px;
1617
+ line-height: 24px;
1618
+ color: ${theme.colors.gray600};
1619
+ margin-bottom: 15px;
1620
+ `;
1621
+ const StyledTitle$4 = styled.div `
1622
+ font-weight: 600;
1623
+ font-size: 16px;
1624
+ line-height: 26px;
1625
+ color: #000000;
1626
+ margin-bottom: 4px;
1627
+ `;
1628
+ const StyledContentLeft = styled.div `
1629
+ background: #fff;
1630
+ padding: 5px;
1631
+ display: flex;
1632
+ align-items: center;
1633
+ justify-content: center;
1634
+ border-radius: 50px;
1635
+ `;
1636
+ const StyledLeft = styled.div `
1637
+ display: flex;
1638
+ justify-content: center;
1639
+ align-items: center;
1640
+ position: relative;
1641
+ ${MediaQueries.mbDown} {
1642
+ justify-content: end;
1643
+ min-height: 100px;
1644
+ }
1645
+ `;
1646
+
1647
+ const SpotlightNoData = ({ title, link, description, cta, icon }) => {
1648
+ const { siteType } = useContext(NavigationContext);
1649
+ return (React__default.createElement(StyledContainerNoPosts, { "data-theme": siteType },
1650
+ React__default.createElement(StyledLeft, null,
1651
+ React__default.createElement("img", { src: siteType === 'marryBaby'
1652
+ ? CommonGAssets.getAssetPath('navMBSpotlightBgNoData.svg')
1653
+ : CommonGAssets.getAssetPath('navSpotlightBgNoData.svg'), alt: "", loading: "lazy", className: "bg-svg" }),
1654
+ React__default.createElement(StyledContentLeft, null, icon && React__default.createElement("img", { src: icon, width: 64, height: 64, loading: "lazy" }))),
1655
+ React__default.createElement("div", null,
1656
+ title && React__default.createElement(StyledTitle$4, null, title),
1657
+ description && React__default.createElement(StyledDescription, null, description),
1658
+ cta && (React__default.createElement("div", null,
1659
+ React__default.createElement("a", { href: link },
1660
+ React__default.createElement(Button, { theme: siteType, className: "survey-contact-submit", size: "md" }, cta)))))));
1661
+ };
1662
+
1663
+ const StyledItemGridRight = styled.div `
1664
+ margin-top: 10px;
1665
+ background: #ffffff;
1666
+ padding: 5px 15px;
1667
+ position: relative;
1668
+ ${MediaQueries.mbDown} {
1669
+ &:after {
1670
+ position: absolute;
1671
+ top: 0;
1672
+ left: 0;
1673
+ width: 100%;
1674
+ height: 4px;
1675
+ background-color: ${theme.colors.neutral100};
1676
+ content: '';
1677
+ }
1678
+ }
1679
+ `;
1680
+ const StyledHeading = styled.div `
1681
+ margin: 15px 0;
1682
+ display: flex;
1683
+ `;
1684
+ const StyledViewMore = styled.a `
1685
+ padding-left: 10px;
1686
+ display: flex;
1687
+ align-items: center;
1688
+ text-decoration: none;
1689
+ font-weight: 400;
1690
+ font-size: 14px;
1691
+ color: ${theme.colors.primaryBase};
1692
+ &[data-theme='marryBaby'] {
1693
+ color: ${theme.mbColors.pink};
1694
+ }
1695
+ img {
1696
+ padding-left: 5px;
1697
+ }
1698
+ ${MediaQueries.mbDown} {
1699
+ margin-left: auto;
1700
+ }
1701
+ `;
1702
+
1703
+ const Spotlights = ({ title, viewMore, children, link, dataEventAction = '', }) => {
1704
+ const { siteType } = useContext(NavigationContext);
1705
+ return (React__default.createElement(StyledItemGridRight, null,
1706
+ React__default.createElement(StyledHeading, null,
1707
+ React__default.createElement(Heading, { tag: siteType === 'marryBaby' ? 'h5' : 'h6', as: "p", fontWeight: "semibold" }, title),
1708
+ viewMore && (React__default.createElement(StyledViewMore, { "data-event-category": "Hamburger Navigation", "data-event-action": dataEventAction, "data-event-label": link, href: link, "data-theme": siteType },
1709
+ viewMore,
1710
+ React__default.createElement("img", { src: siteType === 'marryBaby'
1711
+ ? CommonGAssets.getAssetPath('chevronRightPink.svg')
1712
+ : CommonGAssets.getAssetPath('chevronRightActive.svg'), style: { width: '16px', height: '16px' }, loading: "lazy" })))),
1713
+ children));
1714
+ };
1715
+
1716
+ const CareSpotlights = ({ spotlights = [], hrefViewMore }) => {
1717
+ const { t } = useTranslations();
1718
+ const { siteType } = useContext(NavigationContext);
1719
+ return (React__default.createElement(Spotlights, { title: t('home.navigator.menu.spotlightHospitals') }, spotlights.length !== 0 ? (React__default.createElement(React__default.Fragment, null,
1720
+ React__default.createElement(StyledContainerItems$4, null, spotlights === null || spotlights === void 0 ? void 0 : spotlights.slice(0, 3).map((s, index) => (React__default.createElement(Item$4, { key: index, index: index, item: s })))),
1721
+ React__default.createElement("div", { style: {
1722
+ position: 'absolute',
1723
+ bottom: '6px',
1724
+ right: '1rem',
1725
+ } },
1726
+ React__default.createElement("a", { href: hrefViewMore },
1727
+ React__default.createElement(Button, { theme: siteType, className: "survey-contact-submit", size: "md" }, t('home.navigator.menu.care.homeButton')))))) : (React__default.createElement(SpotlightNoData, { title: t('home.navigator.menu.care.noDatas.title'), description: t('home.navigator.menu.care.noDatas.description'), link: hrefViewMore, cta: t('home.navigator.menu.care.homeButton'), icon: CommonGAssets.getAssetPath('community.svg') }))));
1728
+ };
1729
+
1730
+ const StyledContainerItems$3 = styled.div `
1731
+ display: grid;
1732
+
1733
+ grid-template-columns: repeat(4, 1fr);
1734
+ gap: 24px;
1735
+ ${MediaQueries.tdDown} {
1736
+ gap: 12px;
1737
+ grid-template-columns: 1fr;
1738
+ }
1739
+ `;
1740
+
1741
+ const StyledItem$4 = styled.a `
1742
+ width: 100%;
1743
+ display: flex;
1744
+ align-items: center;
1745
+ text-decoration: none;
1746
+ * {
1747
+ pointer-events: none;
1748
+ }
1749
+ `;
1750
+ const StyledImageCard$2 = styled.div `
1751
+ border-radius: 5px;
1752
+ display: block;
1753
+ overflow: hidden;
1754
+ padding-top: 140%;
1755
+ width: 100%;
1756
+ position: relative;
1757
+ height: 0;
1758
+ img {
1759
+ position: absolute;
1760
+ width: 100%;
1761
+ height: 100%;
1762
+ display: block;
1763
+ object-fit: cover;
1764
+ top: 0;
1765
+ left: 0;
1766
+ }
1767
+ ${MediaQueries.tdDown} {
1768
+ width: 72px;
1769
+ padding-top: 100px;
1770
+ }
1771
+ `;
1772
+ const StyledTitle$3 = styled.p `
1773
+ font-size: 16px;
1774
+ font-weight: 400;
1775
+ padding: 4px 15px;
1776
+ line-height: 1.4;
1777
+ color: ${theme.colors.gray800};
1778
+ flex: 1;
1779
+ ${MediaQueries.tdUp} {
1780
+ display: none;
1781
+ }
1782
+ `;
1783
+
1784
+ const Item$3 = ({ item, index = 0 }) => {
1785
+ if (!item)
1786
+ return null;
1787
+ return (React__default.createElement(StyledItem$4, { key: item.id, href: item.link, "data-event-category": "Hamburger Navigation", "data-event-action": `Spotlight Click ${index + 1}`, "data-event-label": item.link },
1788
+ React__default.createElement(StyledImageCard$2, null,
1789
+ React__default.createElement("img", { loading: "lazy", alt: item.title, src: item.banner || '/images/notFound-min-small.jpg' })),
1790
+ React__default.createElement(StyledTitle$3, null, item.title)));
1791
+ };
1792
+
1793
+ const CategorySpotlights = ({ spotlightsList = [], hrefViewMore }) => {
1794
+ const { t } = useTranslations();
1795
+ const { configs: { statics }, } = useContext(NavigationContext);
1796
+ return (React__default.createElement(Spotlights, { title: t('home.navigator.menu.spotlights'), viewMore: t('home.navigator.menu.spotlights.seeAll'), link: hrefViewMore, dataEventAction: "Spotlight See More Click" }, spotlightsList.length !== 0 ? (React__default.createElement(StyledContainerItems$3, null, spotlightsList === null || spotlightsList === void 0 ? void 0 : spotlightsList.slice(0, 4).map((spotlight, index) => (React__default.createElement(Item$3, { key: index, index: index, item: {
1797
+ id: spotlight.id,
1798
+ link: statics.HOME_PAGE_URL + spotlight.permalink,
1799
+ title: spotlight.name,
1800
+ banner: spotlight.image,
1801
+ } }))))) : (React__default.createElement(SpotlightNoData, { title: t('home.navigator.menu.category.noDatas.title'), description: t('home.navigator.menu.category.noDatas.description'), link: hrefViewMore, cta: t('home.navigator.menu.category.noDatas.cta'), icon: CommonGAssets.getAssetPath('Spotlight.svg') }))));
1802
+ };
1803
+
1804
+ const StyledContainerItems$2 = styled.div `
1805
+ display: grid;
1806
+ grid-template-columns: repeat(2, 1fr);
1807
+ grid-gap: 48px;
1808
+ ${MediaQueries.tdDown} {
1809
+ grid-template-columns: 1fr;
1810
+ grid-gap: 32px;
1811
+ }
1812
+ ${MediaQueries.mbDown} {
1813
+ grid-gap: 24px;
1814
+ }
1815
+ `;
1816
+
1817
+ const StyledContent$1 = styled.div `
1818
+ padding: 5px;
1819
+ flex: 1;
1820
+ `;
1821
+ const StyledImage = styled.img `
1822
+ width: 88px;
1823
+ height: 88px;
1824
+ border-radius: 4px;
1825
+ object-fit: cover;
1826
+ `;
1827
+ const StyledName = styled.div `
1828
+ font-size: 12px;
1829
+ font-weight: 600;
1830
+ color: ${theme.colors.gray800};
1831
+ text-decoration: none;
1832
+ &[data-theme='marryBaby'] {
1833
+ font-weight: 400;
1834
+ letter-spacing: -0.2px;
1835
+ }
1836
+ `;
1837
+ const StyledCategory = styled.div `
1838
+ text-decoration: none;
1839
+ font-size: 12px;
1840
+ font-weight: 400;
1841
+ color: ${theme.colors.primaryBase};
1842
+ &[data-theme='marryBaby'] {
1843
+ font-weight: 400;
1844
+ letter-spacing: -0.2px;
1845
+ }
1846
+ `;
1847
+ const StyledModifiedTime = styled.div `
1848
+ font-size: 12px;
1849
+ font-weight: 400;
1850
+ color: ${theme.colors.gray600};
1851
+ `;
1852
+ const StyledDot = styled.div `
1853
+ font-size: 12px;
1854
+ font-weight: 400;
1855
+ color: ${theme.colors.gray600};
1856
+ `;
1857
+ const StyledItem$3 = styled.a `
1858
+ display: flex;
1859
+ gap: 10px;
1860
+ text-decoration: none;
1861
+ position: relative;
1862
+ &::after {
1863
+ content: '';
1864
+ display: block;
1865
+ width: 100%;
1866
+ height: 1px;
1867
+ border-top: 1px dashed ${theme.colors.neutral100};
1868
+ position: absolute;
1869
+ bottom: -24px;
1870
+ ${MediaQueries.tdOnly} {
1871
+ bottom: -16px;
1872
+ }
1873
+ ${MediaQueries.mbDown} {
1874
+ bottom: -12px;
1875
+ }
1876
+ }
1877
+ &:last-child {
1878
+ &::after {
1879
+ display: none;
1880
+ }
1881
+ }
1882
+ ${MediaQueries.tdUp} {
1883
+ &:nth-last-child(2) {
1884
+ &::after {
1885
+ display: none;
1886
+ }
1887
+ }
1888
+ }
1889
+ `;
1890
+ const StyledInfoUser = styled.div `
1891
+ display: flex;
1892
+ gap: 10px;
1893
+ vertical-align: middle;
1894
+ align-items: center;
1895
+ `;
1896
+ const StyledTitle$2 = styled.div `
1897
+ margin-top: 8px;
1898
+ font-size: 16px;
1899
+ font-weight: 600;
1900
+ color: ${theme.colors.gray800};
1901
+ &[data-theme='marryBaby'] {
1902
+ margin-top: 12px;
1903
+ font-weight: 400;
1904
+ font-size: 14px;
1905
+ line-height: 24px;
1906
+ letter-spacing: -0.2px;
1907
+ }
1908
+ `;
1909
+ const StyledInfo = styled.div `
1910
+ display: flex;
1911
+ flex-wrap: wrap;
1912
+ align-items: center;
1913
+ column-gap: 5px;
1914
+ `;
1915
+ const StyledWrapInfo = styled.div `
1916
+ display: flex;
1917
+ gap: 4px;
1918
+ flex-direction: column;
1919
+ `;
1920
+
1921
+ dayjs.extend(relativeTime);
1922
+ const Item$2 = ({ post, index = 0 }) => {
1923
+ var _a, _b, _c, _d, _e, _f, _g;
1924
+ const { siteType, configs: { statics }, } = useContext(NavigationContext);
1925
+ if (!post)
1926
+ return null;
1927
+ const communityUrl = [statics.TOGETHER_URL_FE, (_a = post.community) === null || _a === void 0 ? void 0 : _a.slug].join('/');
1928
+ const postUrl = [communityUrl, post.slug].join('/');
1929
+ const time = post.createdAt;
1930
+ const cleanedTimeDate = time
1931
+ ? !isNaN(new Date(time).getTime())
1932
+ ? new Date(time)
1933
+ : null
1934
+ : null;
1935
+ const timeText = cleanedTimeDate ? dayjs(cleanedTimeDate).toNow(true) : time;
1936
+ return (React__default.createElement(StyledItem$3, { href: postUrl, "data-event-category": "Hamburger Navigation", "data-event-action": `Together Click ${index + 1}`, "data-event-label": postUrl },
1937
+ React__default.createElement(StyledContent$1, null,
1938
+ React__default.createElement(StyledInfoUser, null,
1939
+ React__default.createElement(UserAvatar, { avatar: (_b = post.author) === null || _b === void 0 ? void 0 : _b.avatar, username: ((_c = post.author) === null || _c === void 0 ? void 0 : _c.name) || ((_d = post.author) === null || _d === void 0 ? void 0 : _d.username) }),
1940
+ React__default.createElement(StyledWrapInfo, null,
1941
+ React__default.createElement(StyledName, { "data-theme": siteType }, (_e = post.author) === null || _e === void 0 ? void 0 : _e.name),
1942
+ React__default.createElement(StyledInfo, null,
1943
+ React__default.createElement(StyledCategory, { "data-event-category": "Hamburger Navigation", "data-event-action": `Topic Click ${index + 1}`, "data-event-label": communityUrl, onClick: (e) => {
1944
+ e.preventDefault();
1945
+ location.href = communityUrl;
1946
+ }, "data-theme": siteType }, (_f = post.community) === null || _f === void 0 ? void 0 : _f.name),
1947
+ React__default.createElement(StyledDot, null, "\u2022"),
1948
+ React__default.createElement(StyledModifiedTime, { "data-theme": siteType }, timeText)))),
1949
+ React__default.createElement(StyledTitle$2, null, post.title)),
1950
+ !!((_g = post.photos) === null || _g === void 0 ? void 0 : _g.length) && (React__default.createElement(StyledImage, { loading: "lazy", src: post.photos[0] }))));
1951
+ };
1952
+
1953
+ const CommunitySpotlights = ({ spotlights = [] }) => {
1954
+ const { configs: { statics }, } = useContext(NavigationContext);
1955
+ const { t } = useTranslations();
1956
+ return (React__default.createElement(Spotlights, { title: t('home.navigator.menu.trendingPosts'), viewMore: t('home.navigator.menu.trendingPosts.seeMore'), link: normalizeLink(statics.TOGETHER_URL_FE), dataEventAction: "Together See More Click" }, spotlights.length !== 0 ? (React__default.createElement(StyledContainerItems$2, null, spotlights === null || spotlights === void 0 ? void 0 : spotlights.slice(0, 4).map((p, index) => (React__default.createElement(Item$2, { index: index, post: p, key: p.id }))))) : (React__default.createElement(SpotlightNoData, { title: t('home.navigator.menu.together.noPosts.title'), description: t('home.navigator.menu.together.noPosts.description'), link: `${statics.HOME_PAGE_URL}/community/`, cta: t('home.navigator.menu.together.noPosts.cta'), icon: CommonGAssets.getAssetPath('community.svg') }))));
1957
+ };
1958
+
1959
+ const StyledContainerItems$1 = styled.div `
1960
+ display: grid;
1961
+
1962
+ grid-template-columns: repeat(3, 1fr);
1963
+ gap: 24px;
1964
+ margin-bottom: 3.5rem;
1965
+ ${MediaQueries.tdDown} {
1966
+ grid-template-columns: repeat(1, 1fr);
1967
+ }
1968
+ `;
1969
+
1970
+ const StyledItem$2 = styled.a `
1971
+ text-decoration: none;
1972
+ display: flex;
1973
+ align-items: center;
1974
+ `;
1975
+
1976
+ const Item$1 = ({ item, index = 0 }) => {
1977
+ if (!item)
1978
+ return null;
1979
+ return (React__default.createElement(StyledItem$2, { href: item.url, "data-event-category": "Hamburger Navigation", "data-event-action": `Care Click ${index + 1}`, "data-event-label": item.url },
1980
+ React__default.createElement("img", { loading: "lazy", alt: item.name, src: item.featuredImage || '/images/avatar.jpg', style: {
1981
+ width: '40px',
1982
+ height: '40px',
1983
+ } }),
1984
+ React__default.createElement(Text, { size: "p2", weight: "regular", style: {
1985
+ marginLeft: 16,
1986
+ } }, item.name),
1987
+ React__default.createElement("img", { src: CommonGAssets.getAssetPath('chevronRightActive.svg'), style: {
1988
+ width: '20px',
1989
+ height: '20px',
1990
+ marginLeft: 'auto',
1991
+ }, loading: "lazy" })));
1992
+ };
1993
+
1994
+ const EcomSpotlights = ({ helpfulUrls = [], }) => {
1995
+ const { t } = useTranslations();
1996
+ // const { siteType } = useContext(NavigationContext)
1997
+ if (!helpfulUrls.length)
1998
+ return null;
1999
+ return (React__default.createElement(Spotlights, { title: t('home.navigator.menu.spotlightEcom') }, helpfulUrls.length !== 0 ? (React__default.createElement(StyledContainerItems$1, null, helpfulUrls === null || helpfulUrls === void 0 ? void 0 : helpfulUrls.slice(0, 5).map((s, index) => (React__default.createElement(Item$1, { key: index, index: index, item: s }))))) : (React__default.createElement(React__default.Fragment, null)
2000
+ // <SpotlightNoData
2001
+ // title={t('home.navigator.menu.ecom.noDatas.title')}
2002
+ // description={t('home.navigator.menu.ecom.noDatas.description')}
2003
+ // link={hrefViewMore}
2004
+ // cta={t('home.navigator.menu.ecom.homeButton')}
2005
+ // icon={CommonGAssets.getAssetPath('ecom.svg')}
2006
+ // />
2007
+ )));
2008
+ };
2009
+
2010
+ const StyledContainerItems = styled.div `
2011
+ display: grid;
2012
+
2013
+ grid-template-columns: repeat(3, 1fr);
2014
+ gap: 24px;
2015
+ ${MediaQueries.tdDown} {
2016
+ grid-template-columns: 1fr;
2017
+ gap: 12px;
2018
+ }
2019
+ `;
2020
+
2021
+ const StyledItem$1 = styled.a `
2022
+ text-decoration: none;
2023
+ border-radius: 4px;
2024
+ background: ${theme.colors.primary50};
2025
+ position: relative;
2026
+ overflow: hidden;
2027
+ display: flex;
2028
+ * {
2029
+ pointer-events: none;
2030
+ }
2031
+ .bg-svg {
2032
+ width: 245px;
2033
+ top: 0;
2034
+ right: 0;
2035
+ height: 100%;
2036
+ position: absolute;
2037
+ ${MediaQueries.tdDown} {
2038
+ top: calc(51% - 68px);
2039
+ right: -8px;
2040
+ }
2041
+ }
2042
+ padding: 180px 24px 16px;
2043
+ a {
2044
+ display: flex;
2045
+ width: 100%;
2046
+ }
2047
+ ${MediaQueries.tdDown} {
2048
+ padding-top: 16px;
2049
+ display: flex;
2050
+ align-items: center;
2051
+ }
2052
+ `;
2053
+ const StyledImageCard$1 = styled.div `
2054
+ width: 64px;
2055
+ height: 64px;
2056
+ background: white;
2057
+ position: absolute;
2058
+ right: 25px;
2059
+ top: 35px;
2060
+ z-index: 3;
2061
+ border-radius: 50%;
2062
+ img {
2063
+ position: absolute;
2064
+ width: 64px;
2065
+ height: 64px;
2066
+ top: 50%;
2067
+ left: 50%;
2068
+ display: block;
2069
+ transform: translate(-50%, -50%);
2070
+ }
2071
+ ${MediaQueries.tdDown} {
2072
+ position: relative;
2073
+ top: unset;
2074
+ right: unset;
2075
+ }
2076
+ `;
2077
+ const StyledBtnView$1 = styled.div `
2078
+ display: flex;
2079
+ align-items: center;
2080
+ color: ${theme.colors.primaryBase};
2081
+ font-weight: 400;
2082
+ font-size: 14px;
2083
+ text-decoration: none;
2084
+ `;
2085
+ const StyledTitle$1 = styled.p `
2086
+ font-size: 16px;
2087
+ font-weight: 600;
2088
+ line-height: 1.4;
2089
+ color: ${theme.colors.gray800};
2090
+ `;
2091
+ const StyledDes$1 = styled.p `
2092
+ font-size: 14px;
2093
+ line-height: 1.4;
2094
+ font-weight: 400;
2095
+ color: ${theme.colors.gray600};
2096
+ height: 40px;
2097
+ text-overflow: ellipsis;
2098
+ overflow: hidden;
2099
+ display: -webkit-box;
2100
+ -webkit-line-clamp: 2;
2101
+ -webkit-box-orient: vertical;
2102
+ margin-bottom: auto;
2103
+ ${MediaQueries.tdDown} {
2104
+ display: none;
2105
+ }
2106
+ `;
2107
+ const StyledContentWrapper$1 = styled.div `
2108
+ display: flex;
2109
+ flex-direction: column;
2110
+ flex: 1;
2111
+ z-index: 1;
2112
+ ${MediaQueries.tdUp} {
2113
+ gap: 8px;
2114
+ }
2115
+ ${MediaQueries.tdDown} {
2116
+ gap: 4px;
2117
+ flex: 1;
2118
+ }
2119
+ `;
2120
+
2121
+ const Item = ({ item, index = 0 }) => {
2122
+ const { t } = useTranslations();
2123
+ const { configs: { statics }, } = useContext(NavigationContext);
2124
+ if (!item)
2125
+ return null;
2126
+ const link = item.link
2127
+ ? item.link.startsWith('http')
2128
+ ? item.link
2129
+ : `${statics.HOME_PAGE_URL}${item.link}`
2130
+ : undefined;
2131
+ return (React__default.createElement(StyledItem$1, { href: link, "data-event-category": "Hamburger Navigation", "data-event-action": `Engage Click ${index + 1}`, "data-event-label": link },
2132
+ React__default.createElement("img", { src: CommonGAssets.getAssetPath('navToolCardBg.svg'), alt: "", loading: "lazy", className: "bg-svg" }),
2133
+ React__default.createElement(StyledContentWrapper$1, null,
2134
+ React__default.createElement(StyledTitle$1, null, item.title),
2135
+ React__default.createElement(StyledDes$1, null, item.subtitle),
2136
+ React__default.createElement(StyledBtnView$1, null,
2137
+ t('home.seeMore'),
2138
+ React__default.createElement("img", { src: CommonGAssets.getAssetPath('chevronRightActive.svg'), style: {
2139
+ width: '16px',
2140
+ height: '16px',
2141
+ marginTop: '3px',
2142
+ marginLeft: '5px',
2143
+ }, loading: "lazy" }))),
2144
+ React__default.createElement(StyledImageCard$1, null,
2145
+ React__default.createElement("img", { loading: "lazy", alt: item.title, src: item.icon || '/images/avatar.jpg' }))));
2146
+ };
2147
+
2148
+ const StyledItem = styled.a `
2149
+ text-decoration: none;
2150
+ border-radius: 12px;
2151
+
2152
+ position: relative;
2153
+ overflow: hidden;
2154
+ display: flex;
2155
+ * {
2156
+ pointer-events: none;
2157
+ }
2158
+ .bg-svg {
2159
+ top: 0;
2160
+ left: 0;
2161
+ position: absolute;
2162
+ }
2163
+
2164
+ .dot-svg {
2165
+ width: 40px;
2166
+ height: 30px;
2167
+ top: 36px;
2168
+ left: 16px;
2169
+ position: absolute;
2170
+ stroke-width: 0;
2171
+ }
2172
+
2173
+ &[data-color='pink'] {
2174
+ background: ${theme.mbColors.tonePink};
2175
+ .bg-svg {
2176
+ fill: ${theme.mbColors.peach};
2177
+ }
2178
+ }
2179
+ &[data-color='orange'] {
2180
+ background: ${theme.mbColors.toneYellow};
2181
+ .bg-svg {
2182
+ fill: ${theme.mbColors.orange};
2183
+ }
2184
+ }
2185
+ &[data-color='green'] {
2186
+ background: ${theme.mbColors.toneGreen};
2187
+ .bg-svg {
2188
+ fill: ${theme.mbColors.mint};
2189
+ }
2190
+ }
2191
+
2192
+ padding: 180px 24px 16px;
2193
+ a {
2194
+ display: flex;
2195
+ width: 100%;
2196
+ }
2197
+ ${MediaQueries.tdDown} {
2198
+ padding-top: 16px;
2199
+ display: flex;
2200
+ align-items: flex-start;
2201
+ justify-content: flex-start;
2202
+ }
2203
+ ${MediaQueries.mbDown} {
2204
+ padding-top: 0;
2205
+ padding-left: 80px;
2206
+ height: 96px;
2207
+ align-items: flex-start;
2208
+ justify-content: center;
2209
+ flex-direction: column;
2210
+ .dot-svg {
2211
+ top: 22px;
2212
+ left: 16px;
2213
+ }
2214
+ }
2215
+ ${MediaQueries.tdUp} {
2216
+ min-height: 296px;
2217
+ }
2218
+ .mobile-only {
2219
+ ${MediaQueries.tdUp} {
2220
+ display: none;
2221
+ }
2222
+ }
2223
+ .desktop-only {
2224
+ ${MediaQueries.tdDown} {
2225
+ display: none;
2226
+ }
2227
+ }
2228
+ `;
2229
+ const StyledImageCard = styled.div `
2230
+ width: 48px;
2231
+ height: 48px;
2232
+ background: white;
2233
+ position: absolute;
2234
+ right: 25px;
2235
+ top: 35px;
2236
+ z-index: 3;
2237
+ border-radius: 50%;
2238
+ img {
2239
+ position: absolute;
2240
+ width: 36px;
2241
+ height: 36px;
2242
+ top: 50%;
2243
+ left: 50%;
2244
+ display: block;
2245
+ transform: translate(-50%, -50%);
2246
+ }
2247
+ ${MediaQueries.tdDown} {
2248
+ position: relative;
2249
+ top: unset;
2250
+ right: unset;
2251
+ }
2252
+ ${MediaQueries.mbDown} {
2253
+ position: absolute;
2254
+ left: 32px;
2255
+ top: 28px;
2256
+ }
2257
+ `;
2258
+ const StyledBtnView = styled.div `
2259
+ display: flex;
2260
+ align-items: center;
2261
+ background: white;
2262
+ font-weight: 400;
2263
+ font-size: 14px;
2264
+ text-decoration: none;
2265
+ border-radius: 50%;
2266
+ width: 20px;
2267
+ height: 20px;
2268
+
2269
+ svg path {
2270
+ fill: ${theme.mbColors.gray};
2271
+ }
2272
+
2273
+ ${MediaQueries.tdDown} {
2274
+ background: none;
2275
+ width: 100%;
2276
+ font-weight: 400;
2277
+ font-size: 12px;
2278
+ line-height: 18px;
2279
+ color: ${theme.mbColors.pink};
2280
+ padding-left: 16px;
2281
+ }
2282
+ `;
2283
+ const StyledTitle = styled.p `
2284
+ font-weight: 600;
2285
+ font-size: 14px;
2286
+ line-height: 24px;
2287
+ letter-spacing: -0.2px;
2288
+ color: ${theme.colors.gray800};
2289
+ `;
2290
+ const StyledDes = styled.p `
2291
+ font-weight: 400;
2292
+ font-size: 12px;
2293
+ line-height: 18px;
2294
+ letter-spacing: -0.2px;
2295
+ color: ${theme.colors.gray600};
2296
+ height: 54px;
2297
+ text-overflow: ellipsis;
2298
+ overflow: hidden;
2299
+ display: -webkit-box;
2300
+ -webkit-line-clamp: 3;
2301
+ -webkit-box-orient: vertical;
2302
+ margin-bottom: auto;
2303
+ ${MediaQueries.tdDown} {
2304
+ display: none;
2305
+ }
2306
+ `;
2307
+ const StyledContentWrapper = styled.div `
2308
+ display: flex;
2309
+ flex: 1;
2310
+ z-index: 1;
2311
+ align-items: flex-end;
2312
+ justify-content: flex-end;
2313
+ ${MediaQueries.tdUp} {
2314
+ gap: 8px;
2315
+ flex-direction: row;
2316
+ }
2317
+
2318
+ ${MediaQueries.tdDown} {
2319
+ align-items: flex-start;
2320
+ justify-content: flex-start;
2321
+ gap: 4px;
2322
+ }
2323
+ `;
2324
+ const StyledContent = styled.div `
2325
+ display: flex;
2326
+ flex-direction: column;
2327
+ flex: 1;
2328
+ z-index: 1;
2329
+ ${MediaQueries.tdUp} {
2330
+ gap: 8px;
2331
+ }
2332
+ ${MediaQueries.tdDown} {
2333
+ gap: 4px;
2334
+ flex: 1;
2335
+ padding-left: 16px;
2336
+ }
2337
+ `;
2338
+ const StyledWrapName = styled.div `
2339
+ display: flex;
2340
+ flex-direction: row;
2341
+ flex: 1;
2342
+ z-index: 1;
2343
+ ${MediaQueries.tdUp} {
2344
+ gap: 8px;
2345
+ justify-content: flex-end;
2346
+ align-items: flex-end;
2347
+ }
2348
+ ${MediaQueries.tdDown} {
2349
+ flex-direction: column;
2350
+ justify-content: flex-start;
2351
+ align-items: flex-start;
2352
+ }
2353
+ `;
2354
+
2355
+ const ItemMarryBaby = ({ item, index = 0, color }) => {
2356
+ const { t } = useTranslations();
2357
+ const { configs: { statics }, } = useContext(NavigationContext);
2358
+ if (!item)
2359
+ return null;
2360
+ const link = item.link
2361
+ ? item.link.startsWith('http')
2362
+ ? item.link
2363
+ : `${statics.HOME_PAGE_URL}${item.link}`
2364
+ : undefined;
2365
+ const renderIcon = () => (React__default.createElement(StyledImageCard, null,
2366
+ React__default.createElement("img", { loading: "lazy", alt: item.title, src: item.icon || '/images/avatar.jpg' })));
2367
+ const renderName = () => (React__default.createElement(StyledWrapName, null,
2368
+ React__default.createElement(StyledContent, null,
2369
+ React__default.createElement(StyledTitle, null, item.title),
2370
+ React__default.createElement(StyledDes, null, item.subtitle)),
2371
+ React__default.createElement(StyledBtnView, null,
2372
+ React__default.createElement("div", { className: "mobile-only" }, t('home.seeMore')),
2373
+ React__default.createElement("img", { src: CommonGAssets.getAssetPath('arrowRightGray.svg'), style: {
2374
+ width: '12px',
2375
+ height: '12px',
2376
+ marginTop: '2px',
2377
+ marginLeft: '5px',
2378
+ }, loading: "lazy" }))));
2379
+ return (React__default.createElement(StyledItem, { href: link, "data-event-category": "Hamburger Navigation", "data-event-action": `Engage Click ${index + 1}`, "data-event-label": link, "data-color": color },
2380
+ React__default.createElement("svg", { className: "bg-svg", width: "74", height: "121", viewBox: "0 0 74 121", fill: "none" },
2381
+ React__default.createElement("path", { d: "M58.5713 53.428C40.6466 70.0213 12.9929 71.0875 -7.00506 84.9856C-24.9277 97.4005 -38.3893 120.472 -60.213 120.346C-73.3615 120.271 -84.9289 110.925 -91.9303 99.8138C-101.443 84.7327 -103.994 64.0482 -93.916 49.3276C-81.8133 31.6505 -56.6933 28.1101 -41.7246 12.7895C-35.4351 6.35117 -31.2212 -1.90115 -24.8564 -8.25051C-7.17639 -25.9054 34.9604 -29.7543 56.852 -16.9562C80.9056 -2.89888 77.046 36.3304 58.5713 53.428Z", strokeWidth: "0" })),
2382
+ React__default.createElement("img", { src: CommonGAssets.getAssetPath('navMBCardDotBg.svg'), className: "dot-svg", loading: "lazy", alt: "" }),
2383
+ React__default.createElement(StyledContentWrapper, null,
2384
+ React__default.createElement("div", { className: "mobile-only" }, renderIcon()),
2385
+ React__default.createElement("div", { className: "desktop-only" }, renderName())),
2386
+ React__default.createElement("div", { className: "mobile-only" }, renderName()),
2387
+ React__default.createElement("div", { className: "desktop-only" }, renderIcon())));
2388
+ };
2389
+
2390
+ const ToolSpotlights = ({ hrefViewMore, spotlightHealthTools = [] }) => {
2391
+ const { t } = useTranslations();
2392
+ const marryBabyCardColor = ['pink', 'orange', 'green'];
2393
+ const { siteType } = useContext(NavigationContext);
2394
+ return (React__default.createElement(Spotlights, { title: t('home.navigator.menu.spotlightTools') },
2395
+ spotlightHealthTools.length !== 0 && (React__default.createElement(StyledContainerItems, null, spotlightHealthTools === null || spotlightHealthTools === void 0 ? void 0 : spotlightHealthTools.slice(0, 3).map((item, index) => siteType === 'marryBaby' ? (React__default.createElement(ItemMarryBaby, { key: index, index: index, item: item, color: marryBabyCardColor[index] })) : (React__default.createElement(Item, { key: index, index: index, item: item }))))),
2396
+ spotlightHealthTools.length === 0 && (React__default.createElement(SpotlightNoData, { title: t('home.navigator.menu.healthTools.noDatas.title'), description: t('home.navigator.menu.healthTools.noDatas.description'), link: hrefViewMore, cta: t('home.navigator.menu.healthTools.noDatas.cta'), icon: CommonGAssets.getAssetPath('community.svg') }))));
2397
+ };
2398
+
2399
+ const MenuServiceList = ({ closePopup, menuItems = [] }) => {
2400
+ var _a, _b;
2401
+ const { siteType, ssrMenuContent: { categories, healthTools, care, together, ecom }, activeMenuService, configs: { statics, enableSearchBar }, locale, } = useContext(NavigationContext);
2402
+ const { t } = useTranslations();
2403
+ return (React__default.createElement(StyledMasterMenuContainer, { id: 'categories-menu' },
2404
+ enableSearchBar ? (React__default.createElement(StyledServiceListMenuSearchInputWrapper, { "data-theme": siteType, onClick: () => {
2405
+ window.location.href = `${statics.HOME_PAGE_URL}/search`;
2406
+ } },
2407
+ React__default.createElement(SearchInput, { id: "mobile" }))) : null,
2408
+ React__default.createElement(StyledWrapper, null,
2409
+ React__default.createElement(Categories, { UrlFE: statics.HOME_PAGE_URL, titleBtnViewMore: t('home.navigator.menuItem.allCategories'), menuItems: menuItems, headingTitle: t('home.navigator.menuItem.healthCategories'), onClosePopup: closePopup, activeItem: activeMenuService }),
2410
+ activeMenuService === 'categories' && (React__default.createElement(CategorySpotlights, { spotlightsList: (categories === null || categories === void 0 ? void 0 : categories.spotlights) || [], hrefViewMore: `${statics.HOME_PAGE_URL}${locale === 'tl-PH' ? '/fil' : ''}/spotlight/` })),
2411
+ activeMenuService === 'tools' && (React__default.createElement(ToolSpotlights, { spotlightHealthTools: healthTools === null || healthTools === void 0 ? void 0 : healthTools.spotlights, hrefViewMore: `${statics.HOME_PAGE_URL}${locale === 'tl-PH' ? '/fil' : ''}${((_a = STATIC_PAGES[locale]) === null || _a === void 0 ? void 0 : _a.HEALTH_TOOLS) || ''}` })),
2412
+ activeMenuService === 'care' && (React__default.createElement(CareSpotlights, { spotlights: care === null || care === void 0 ? void 0 : care.spotlights, hrefViewMore: `${statics.CARE_URL_FE}/${(_b = LOCALIZED_SLUGS[locale]) === null || _b === void 0 ? void 0 : _b.SPECIALTIES}` })),
2413
+ activeMenuService === 'together' && (React__default.createElement(CommunitySpotlights, { spotlights: together === null || together === void 0 ? void 0 : together.spotlights })),
2414
+ activeMenuService === 'ecom' && (React__default.createElement(EcomSpotlights, { helpfulUrls: ecom === null || ecom === void 0 ? void 0 : ecom.helpfulUrls })))));
2415
+ };
2416
+
2417
+ const HamburgerMenu = ({ menuItems }) => {
2418
+ const { siteType, configs: { enableSearchBar }, } = useContext(NavigationContext);
2419
+ const { containerRef, onContainerFocus, onContainerBlur, onButtonMouseDown, onClose, } = useCSSFocusPopupHelper();
2420
+ return (React__default.createElement(DisplayWrapper, { mediaQueryKey: "mbDown" },
2421
+ React__default.createElement("header", { className: styles$2.menuContainer },
2422
+ React__default.createElement("div", { className: styles$2.menuIcon, ref: containerRef, role: "button", tabIndex: 0, onBlur: onContainerBlur, onFocus: onContainerFocus },
2423
+ React__default.createElement("div", { className: styles$2.menuIconWrapper, onMouseDown: onButtonMouseDown, "data-event-category": "Hamburger Navigation", "data-event-action": "Click", "data-event-label": "Hamburger Navigation URL" },
2424
+ React__default.createElement(ClosePopupIcon, { className: "mobile-close-icon" }),
2425
+ React__default.createElement(HamburgerIcon, { siteType: siteType, enableSearch: enableSearchBar, className: "mobile-hamburger-icon" })),
2426
+ React__default.createElement(MenuServiceList, { menuItems: menuItems, closePopup: onClose })))));
2427
+ };
2428
+
2429
+ const TOGETHER_PATHS = {
2430
+ COMMUNITIES: 'community?website_url={websiteUrl}',
2431
+ MENU_TOPIC: 'topic?community_id={communityId}&website_url={websiteUrl}',
2432
+ GET_USER_POSTS: 'profile/posts?website_url={websiteUrl}',
2433
+ };
2434
+ const Z_INDEX = {
2435
+ adBlock: 48,
2436
+ headerContainerHome: 99,
2437
+ headerContainerPopup: 300,
2438
+ headerContainerPopupSUbLevel: 400,
2439
+ menuCategoryPopupWrapper: 200,
2440
+ menuCategoryPopupContainer: 210,
2441
+ menuSearchInputPopup: 5,
2442
+ menuSearchInputDisplayIcon: 6,
2443
+ menuSearchPopup: 300,
2444
+ homeSearchComponent: 200,
2445
+ };
2446
+
2447
+ const StyledHeaderWrapper = styled.div `
2448
+ z-index: 201;
2449
+ width: 100%;
2450
+ align-items: center;
2451
+
2452
+ background-color: ${theme.colors.white};
2453
+
2454
+ transition: height 0.3s, transform 0.3s;
2455
+
2456
+ &[data-site-type='helloSites'] {
2457
+ border-bottom: 1px solid ${theme.colors.neutral100};
2458
+ }
2459
+ &[data-sponsored='true'] {
2460
+ border-bottom: none;
2461
+ }
2462
+ &[data-marry-baby-tone='pink'] {
2463
+ background-color: ${theme.mbColors.lightPink};
2464
+ }
2465
+
2466
+ ${MediaQueries.mbUp} {
2467
+ &[data-sitewide-banner-shown='true'][data-collapsed='true'] {
2468
+ transform: translateY(-64px);
2469
+ }
2470
+ }
2471
+ ${MediaQueries.mbDown} {
2472
+ &[data-site-type='marryBaby'] {
2473
+ border-bottom: none;
2474
+ }
2475
+
2476
+ &[data-fixed-bar='true'] {
2477
+ position: fixed;
2478
+ transform: translateY(0);
2479
+ }
2480
+
2481
+ &[data-fixed-bar='false'] {
2482
+ position: absolute;
2483
+ }
2484
+
2485
+ &[data-collapsed='true'] {
2486
+ transform: translateY(-100%);
2487
+ transition: transform 0.5s;
2488
+ }
2489
+ &[data-collapsed='false'] {
2490
+ transform: translateY(0);
2491
+ transition: transform 0.5s;
2492
+ }
2493
+
2494
+ .top-bar-header {
2495
+ line-height: normal;
2496
+ }
2497
+
2498
+ &[data-header-type='home'] {
2499
+ z-index: ${Z_INDEX.headerContainerHome};
2500
+ }
2501
+
2502
+ &[data-is-displayed='false'] {
2503
+ //display: none;
2504
+ visibility: hidden;
2505
+ }
2506
+ }
2507
+
2508
+ .marry-baby {
2509
+ input {
2510
+ background: ${theme.mbColors.lightGray};
2511
+ border-radius: 16px;
2512
+ border: none;
2513
+ }
2514
+ max-width: 172px;
2515
+ }
2516
+ &[data-site-type='marryBaby'] {
2517
+ .close-btn {
2518
+ top: 16px;
2519
+ right: 16px;
2520
+ }
2521
+ }
2522
+ `;
2523
+ const StyledHeader = styled.div `
2524
+ display: flex;
2525
+ height: 100%;
2526
+ align-items: center;
2527
+
2528
+ justify-content: space-between;
2529
+ padding: 0 2rem;
2530
+ height: 56px;
2531
+ ${MediaQueries.pcDown} {
2532
+ padding: 0 1rem;
2533
+ }
2534
+
2535
+ ${MediaQueries.mbDown} {
2536
+ position: relative;
2537
+ height: 56px;
2538
+ background: white;
2539
+ gap: 2px;
2540
+ }
2541
+
2542
+ &[data-site-type='marryBaby'] {
2543
+ width: 100%;
2544
+ margin: 0 auto;
2545
+ padding: 0 16px;
2546
+ ${MediaQueries.tdUp} {
2547
+ max-width: 1064px;
2548
+ }
2549
+ }
2550
+ `;
2551
+ const StyledLeftGroup = styled.div `
2552
+ display: flex;
2553
+ align-items: center;
2554
+ height: 100%;
2555
+ gap: 24px;
2556
+ ${MediaQueries.pcDown} {
2557
+ flex-shrink: 0;
2558
+ gap: 16px;
2559
+ }
2560
+ ${MediaQueries.pcDown} {
2561
+ gap: 12px;
2562
+ }
2563
+ &[data-site-type='marryBaby'] {
2564
+ gap: 26px;
2565
+ }
2566
+ `;
2567
+ const StyledRightGroup = styled.div `
2568
+ display: flex;
2569
+ align-items: center;
2570
+ height: 100%;
2571
+ flex-shrink: 0;
2572
+ /* gap: 16px; */
2573
+ ${MediaQueries.tdDown} {
2574
+ flex-shrink: 0.6;
2575
+ }
2576
+ .hhgcomp-navigation-itemnav-headeritem {
2577
+ gap: 2px;
2578
+ ${MediaQueries.pcUp} {
2579
+ padding: 0 10px;
2580
+ }
2581
+ ${MediaQueries.pcDown} {
2582
+ padding: 0 6px;
2583
+ }
2584
+ ${MediaQueries.mbDown} {
2585
+ display: none;
2586
+ }
2587
+ a {
2588
+ text-decoration: none;
2589
+ }
2590
+ }
2591
+ `;
2592
+ styled.div `
2593
+ .fake-search-input {
2594
+ pointer-events: none;
2595
+ input {
2596
+ line-height: 20px;
2597
+ padding-top: 10px;
2598
+ padding-bottom: 10px;
2599
+ }
2600
+ }
2601
+ `;
2602
+ const StyledProfileNavGroup = styled.div `
2603
+ margin-left: 16px;
2604
+ display: flex;
2605
+ gap: 12px;
2606
+ align-items: center;
2607
+ flex-shrink: 0;
2608
+ ${MediaQueries.pcDown} {
2609
+ margin-left: 8px;
2610
+ gap: 8px;
2611
+ }
2612
+ ${MediaQueries.mbDown} {
2613
+ margin-left: 0;
2614
+ gap: 10px;
2615
+ }
2616
+ `;
2617
+ const StyledWrapMenuItems = styled.div `
2618
+ display: flex;
2619
+ align-items: center;
2620
+ height: 100%;
2621
+ &[data-site-type='marryBaby'] {
2622
+ gap: 26px;
2623
+ }
2624
+ `;
2625
+
2626
+ const formatSponsor = (sponsor) => {
2627
+ if (!sponsor)
2628
+ return {};
2629
+ return {
2630
+ title: sponsor.title,
2631
+ logo: sponsor.logo,
2632
+ link: sponsor.link,
2633
+ };
2634
+ };
2635
+ const formatReviewedCategory = (data) => {
2636
+ return {
2637
+ postTitle: data.post_title,
2638
+ permalink: data.permalink,
2639
+ };
2640
+ };
2641
+ const formatFaqsCategory = (data) => {
2642
+ return {
2643
+ title: data.title,
2644
+ content: data.content,
2645
+ };
2646
+ };
2647
+ const formatCategory = (category) => {
2648
+ var _a, _b;
2649
+ if (!category)
2650
+ return {};
2651
+ return {
2652
+ termId: category.term_id || null,
2653
+ sponsor: category.sponsor ? formatSponsor(category.sponsor) : null,
2654
+ isSponsored: category.is_sponsored || null,
2655
+ categoryName: category.cat_name || category.name || null,
2656
+ name: category.name || null,
2657
+ iconUrl: category.icon || '',
2658
+ slugName: category.category_nicename || null,
2659
+ description: category.description || null,
2660
+ featureImage: category.thumbnail || category.image || null,
2661
+ displayName: category.name || null,
2662
+ parent: category.parent || null,
2663
+ permalink: category.permalink || null,
2664
+ slug: category.slug || null,
2665
+ childCates: ((_a = category.child_cates) === null || _a === void 0 ? void 0 : _a.map((childCate) => {
2666
+ return formatCategory(childCate);
2667
+ })) || [],
2668
+ thumnailColor: category.thumnail_color ||
2669
+ ['#FFEAF1', '#E0E9FB', '#FFF9EB', '#F2FCF7', '#F3F3F3'][(Math.random() * 5) | 0],
2670
+ colorFeatureImage: category.color_feature_image || null,
2671
+ imageColor: category.image_color || null,
2672
+ textColor: category.text_color || null,
2673
+ catParent: ((_b = category.cat_parent) === null || _b === void 0 ? void 0 : _b.name)
2674
+ ? {
2675
+ name: category.cat_parent.name,
2676
+ permalink: category.cat_parent.permalink,
2677
+ }
2678
+ : {},
2679
+ metaTag: category.meta_tag || '',
2680
+ reviewedBy: category.reviewed_by
2681
+ ? formatReviewedCategory(category.reviewed_by)
2682
+ : null,
2683
+ reviewedDate: category.reviewed_date || '',
2684
+ faqs: category.faqs
2685
+ ? category.faqs.map((faq) => formatFaqsCategory(faq))
2686
+ : null,
2687
+ customizedUrl: category.customized_url || null,
2688
+ };
2689
+ };
2690
+ const formatHealthTool = (healthTool) => {
2691
+ var _a, _b;
2692
+ if (!healthTool)
2693
+ return {};
2694
+ const isBot = (_a = healthTool.link) === null || _a === void 0 ? void 0 : _a.includes('/bot/');
2695
+ const hasFilPrefix = (_b = healthTool.link) === null || _b === void 0 ? void 0 : _b.startsWith('/fil/');
2696
+ const link = healthTool.link
2697
+ ? healthTool.link.startsWith('http')
2698
+ ? healthTool.link
2699
+ : isBot
2700
+ ? healthTool.link
2701
+ : hasFilPrefix
2702
+ ? healthTool.link
2703
+ .replace('/health-tools/', '/')
2704
+ .replace('/fil/', '/fil/health-tools/')
2705
+ : `/health-tools${healthTool.link.replace('/health-tools/', '/')}`
2706
+ : undefined;
2707
+ return {
2708
+ icon: healthTool.icon,
2709
+ link,
2710
+ subtitle: healthTool.subtitle,
2711
+ title: healthTool.title,
2712
+ };
2713
+ };
2714
+ const formatSpecialties = (specialties) => {
2715
+ var _a, _b, _c, _d, _e;
2716
+ if (!specialties || !(specialties === null || specialties === void 0 ? void 0 : specialties.object_id))
2717
+ return {};
2718
+ return {
2719
+ thumbnail: ((_a = specialties === null || specialties === void 0 ? void 0 : specialties.object_id) === null || _a === void 0 ? void 0 : _a.logo) || '',
2720
+ link: ((_b = specialties === null || specialties === void 0 ? void 0 : specialties.object_id) === null || _b === void 0 ? void 0 : _b.slug) || '',
2721
+ subtitle: ((_c = specialties.object_id) === null || _c === void 0 ? void 0 : _c.name) || '',
2722
+ name: ((_d = specialties.object_id) === null || _d === void 0 ? void 0 : _d.name) || '',
2723
+ slug: ((_e = specialties.object_id) === null || _e === void 0 ? void 0 : _e.slug) || '',
2724
+ };
2725
+ };
2726
+ const formatHospital = (hospital) => {
2727
+ var _a, _b, _c, _d, _e;
2728
+ if (!hospital || !(hospital === null || hospital === void 0 ? void 0 : hospital.object_id))
2729
+ return {};
2730
+ return {
2731
+ id: (_a = hospital.object_id) === null || _a === void 0 ? void 0 : _a.id,
2732
+ name: ((_b = hospital.object_id) === null || _b === void 0 ? void 0 : _b.name) || '',
2733
+ logo: ((_c = hospital === null || hospital === void 0 ? void 0 : hospital.object_id) === null || _c === void 0 ? void 0 : _c.logo) || '',
2734
+ description: ((_d = hospital.object_id) === null || _d === void 0 ? void 0 : _d.description) || '',
2735
+ slug: ((_e = hospital.object_id) === null || _e === void 0 ? void 0 : _e.slug) || '',
2736
+ };
2737
+ };
2738
+ const getTogetherUserPostsApiPath = (locale, isMarryBaby, apiDomain, params) => {
2739
+ const apiUrl = apiDomain || `https://together.hellohealthgroup.com/`;
2740
+ return (apiUrl +
2741
+ 'api/v1/' +
2742
+ formatString(TOGETHER_PATHS.GET_USER_POSTS, Object.assign(Object.assign({}, params), { websiteUrl: isMarryBaby
2743
+ ? 'https://marrybaby.vn'
2744
+ : `https://${domainLocales[locale]}` })));
2745
+ };
2746
+ const getCareSearchUrl = ({ type, specialtySlug, locale, }) => {
2747
+ var _a, _b;
2748
+ return `${(_a = LOCALIZED_SLUGS[locale]) === null || _a === void 0 ? void 0 : _a.ALL}/${((_b = LOCALIZED_SLUGS[locale]) === null || _b === void 0 ? void 0 : _b[type]) || 'doctor'}/${specialtySlug !== null && specialtySlug !== void 0 ? specialtySlug : ''}`;
2749
+ };
2750
+ const formatSpotlightsList = (spotlight) => {
2751
+ if (!spotlight)
2752
+ return {};
2753
+ return {
2754
+ id: spotlight.ID,
2755
+ name: spotlight.name,
2756
+ permalink: spotlight.permalink,
2757
+ image: (spotlight === null || spotlight === void 0 ? void 0 : spotlight.small_banner) || (spotlight === null || spotlight === void 0 ? void 0 : spotlight.image) || '',
2758
+ imageMedium: (spotlight === null || spotlight === void 0 ? void 0 : spotlight.image_medium) || null,
2759
+ imageThumbnail: (spotlight === null || spotlight === void 0 ? void 0 : spotlight.image_thumbnail) || null,
2760
+ startDate: spotlight === null || spotlight === void 0 ? void 0 : spotlight.start_date,
2761
+ endDate: spotlight === null || spotlight === void 0 ? void 0 : spotlight.end_date,
2762
+ };
2763
+ };
2764
+ const checkAvailableSpotlight = (spotlight) => {
2765
+ const today = new Date();
2766
+ if (spotlight === null || spotlight === void 0 ? void 0 : spotlight.startDate) {
2767
+ const startDate = new Date(spotlight.startDate);
2768
+ if (today.getTime() < startDate.getTime())
2769
+ return false;
2770
+ }
2771
+ if (spotlight === null || spotlight === void 0 ? void 0 : spotlight.endDate) {
2772
+ const endDate = new Date(spotlight.endDate);
2773
+ if (today.getTime() > endDate.getTime())
2774
+ return false;
2775
+ }
2776
+ return true;
2777
+ };
2778
+
2779
+ var styles = {"gridContainer":"q3nL5cp","container":"_2DNf80G","closeWrapper":"Q-glX-n"};
2780
+
2781
+ const BtnClosePopup = ({ onClosePopup }) => {
2782
+ return (React__default.createElement("div", { className: `${styles.closeWrapper} close-btn`, onClick: onClosePopup },
2783
+ React__default.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
2784
+ React__default.createElement("path", { d: "M18 6L6 18M18 18L6 6", stroke: "#3E3F58", strokeWidth: "1.3", strokeLinecap: "round" }))));
2785
+ };
2786
+
2787
+ const PopupWrapper = ({ onClosePopup, isDisplay, children, isNavMenu, hideCloseBtn, }) => {
2788
+ return (React__default.createElement("div", { className: "hhgcomp-navigation-popupwrapper-menuwrapper top-menu-health-tools", "data-is-display": !!isDisplay, "data-is-nav-menu": !!isNavMenu },
2789
+ React__default.createElement(Container, null,
2790
+ !hideCloseBtn && (React__default.createElement("div", { className: styles.container },
2791
+ React__default.createElement(BtnClosePopup, { onClosePopup: onClosePopup }))),
2792
+ React__default.createElement(Container, { className: styles.gridContainer }, children))));
2793
+ };
2794
+
2795
+ const MenuCareList = ({ careSpecialties = [], isOpen, onClose, spotlights = [], }) => {
2796
+ var _a;
2797
+ const { t } = useTranslations();
2798
+ const { locale, configs: { statics }, } = useContext(NavigationContext);
2799
+ return (React__default.createElement(PopupWrapper, { onClosePopup: onClose, isDisplay: isOpen, isNavMenu: true },
2800
+ React__default.createElement(Categories, { headingTitle: t('home.navigator.menuItem.specialties'), hrefViewMore: `${statics.CARE_URL_FE}/`, UrlFE: statics.CARE_URL_FE, onClosePopup: onClose, titleBtnViewMore: t('home.navigator.menuItem.allSpecialties'), menuItems: (careSpecialties === null || careSpecialties === void 0 ? void 0 : careSpecialties.map((specialty) => {
2801
+ if (!specialty)
2802
+ return {};
2803
+ return {
2804
+ name: String(specialty.name) || '',
2805
+ link: getCareSearchUrl({
2806
+ type: 'DOCTOR',
2807
+ specialtySlug: specialty.slug,
2808
+ locale,
2809
+ }),
2810
+ thumbnail: (specialty === null || specialty === void 0 ? void 0 : specialty.thumbnail) || '',
2811
+ };
2812
+ })) || [] }),
2813
+ React__default.createElement(CareSpotlights, { spotlights: spotlights, hrefViewMore: `${statics.CARE_URL_FE}/${(_a = LOCALIZED_SLUGS[locale]) === null || _a === void 0 ? void 0 : _a.SPECIALTIES}/` })));
2814
+ };
2815
+
2816
+ const MenuCategoriesList = ({ categories = [], spotlightsList = [], onClose, isOpen, }) => {
2817
+ const { t } = useTranslations();
2818
+ const { locale, configs: { statics }, } = useContext(NavigationContext);
2819
+ return (React__default.createElement(PopupWrapper, { onClosePopup: onClose, isDisplay: isOpen, isNavMenu: true },
2820
+ React__default.createElement(Categories, { hrefViewMore: `${statics.HOME_PAGE_URL}${locale === 'tl-PH' ? '/fil' : ''}/categories/`, UrlFE: statics.HOME_PAGE_URL, onClosePopup: onClose, titleBtnViewMore: t('home.navigator.menuItem.allCategories'), menuItems: (categories === null || categories === void 0 ? void 0 : categories.map((cat) => {
2821
+ if (!cat)
2822
+ return {};
2823
+ return {
2824
+ name: cat.displayName || null,
2825
+ link: (cat === null || cat === void 0 ? void 0 : cat.customizedUrl) || (cat === null || cat === void 0 ? void 0 : cat.permalink) || '/',
2826
+ thumbnail: cat.iconUrl || null,
2827
+ };
2828
+ })) || [], headingTitle: t('home.navigator.menuItem.healthCategories') }),
2829
+ React__default.createElement(CategorySpotlights, { spotlightsList: spotlightsList, hrefViewMore: `${statics.HOME_PAGE_URL}${locale === 'tl-PH' ? '/fil' : ''}/spotlight/` })));
2830
+ };
2831
+
2832
+ const MenuCommunitiesList = ({ communities = [], onClose, isOpen, spotlights = [], }) => {
2833
+ const { t } = useTranslations();
2834
+ const { configs: { statics }, } = useContext(NavigationContext);
2835
+ return (React__default.createElement(PopupWrapper, { onClosePopup: onClose, isDisplay: isOpen, isNavMenu: true },
2836
+ React__default.createElement(Categories, { hrefViewMore: normalizeLink(statics.TOGETHER_URL_FE), UrlFE: normalizeLinkSlash(statics.TOGETHER_URL_FE), onClosePopup: onClose, titleBtnViewMore: t('home.navigator.menuItem.allCommunities'), menuItems: (communities === null || communities === void 0 ? void 0 : communities.map((community) => {
2837
+ if (!community)
2838
+ return {};
2839
+ return {
2840
+ name: community.name || '',
2841
+ link: community.slug || '/',
2842
+ thumbnail: community.thumbnail || '',
2843
+ };
2844
+ })) || [], headingTitle: t('home.navigator.menuItem.allCommunitiesheadingTitle') }),
2845
+ React__default.createElement(CommunitySpotlights, { spotlights: spotlights })));
2846
+ };
2847
+
2848
+ const MenuHealthToolsList = ({ locale, onClose, isOpen, spotlightHealthTools = [], healthTools = [], }) => {
2849
+ var _a;
2850
+ const { t } = useTranslations();
2851
+ const { configs: { statics }, } = useContext(NavigationContext);
2852
+ const hrefViewMore = `${statics.HOME_PAGE_URL}${locale === 'tl-PH' ? '/fil' : ''}${((_a = STATIC_PAGES[locale]) === null || _a === void 0 ? void 0 : _a.HEALTH_TOOLS) || ''}`;
2853
+ return (React__default.createElement(PopupWrapper, { onClosePopup: onClose, isDisplay: isOpen, isNavMenu: true },
2854
+ React__default.createElement(Categories, { hrefViewMore: hrefViewMore, UrlFE: statics.HOME_PAGE_URL, onClosePopup: onClose, headingTitle: t('home.navigator.menuItem.healthToolsList'), titleBtnViewMore: t('home.navigator.menuItem.allHealthTools'), menuItems: healthTools.map((t) => ({
2855
+ name: t.title,
2856
+ link: t.link
2857
+ ? t.link.startsWith('http')
2858
+ ? t.link
2859
+ : `${statics.HOME_PAGE_URL}${t.link}`
2860
+ : undefined,
2861
+ thumbnail: t.icon,
2862
+ })) }),
2863
+ React__default.createElement(ToolSpotlights, { spotlightHealthTools: spotlightHealthTools, hrefViewMore: hrefViewMore })));
2864
+ };
2865
+
2866
+ const NavigationBar = ({ onTopBarAppears, languageMenu, menuItems, logoComponent, }) => {
2867
+ var _a;
2868
+ const { siteType, isMobile = false, locale, sitewideBanner, sitewideBannerShown = true, sponsorComponent, onBookingClick, currentUrl, onLoginClick, cartNumber,
2869
+ // ssrMenuContent: { categories, healthTools, care, together },
2870
+ configs: { statics, enableNavCareBooking, enableSearchBar,
2871
+ // enableNavCare,
2872
+ // enableProfileMyHealth,
2873
+ // enableProfileMySaved,
2874
+ // enableNavTogether,
2875
+ // enableProfileEcom,
2876
+ }, userState: { userInfo }, onLogout,
2877
+ // userProfileRouterPush,
2878
+ isUserLoading, } = useContext(NavigationContext);
2879
+ const { t } = useTranslations();
2880
+ const { SSO_URL, HOME_PAGE_URL } = statics;
2881
+ const isSponsored = !!sponsorComponent;
2882
+ const [isCollapsed, setIsCollapsed] = useState(false);
2883
+ const scrollY = useRef(47);
2884
+ const headerRef = useRef(null);
2885
+ const collapsedMenu = useRef(false);
2886
+ const goToLogin = () => {
2887
+ const currentLocation = window.location.href;
2888
+ window.location.href = SSO_URL
2889
+ ? normalizeLinkSlash(`${SSO_URL}?returnUrl=${currentLocation}`)
2890
+ : currentLocation;
2891
+ };
2892
+ const logoType = siteType === 'helloSites'
2893
+ ? (_a = LOCALE_SPECS[locale]) === null || _a === void 0 ? void 0 : _a.LOGO_TYPE
2894
+ : siteType;
2895
+ const isBrowser = typeof window !== 'undefined';
2896
+ const scrolling = useCallback(throttle(() => {
2897
+ if (isBrowser) {
2898
+ if (!headerRef.current)
2899
+ return;
2900
+ const headerBoundingRect = headerRef.current.getBoundingClientRect();
2901
+ if (headerBoundingRect.top <= 0 &&
2902
+ window.scrollY > scrollY.current &&
2903
+ window.scrollY > headerBoundingRect.height + 20 &&
2904
+ !collapsedMenu.current) {
2905
+ collapsedMenu.current = true;
2906
+ setIsCollapsed(true);
2907
+ }
2908
+ if (window.scrollY < scrollY.current && collapsedMenu.current) {
2909
+ collapsedMenu.current = false;
2910
+ setIsCollapsed(false);
2911
+ }
2912
+ if (window.scrollY >= 0)
2913
+ scrollY.current = window.scrollY;
2914
+ }
2915
+ }, 200), []);
2916
+ useEffect(() => {
2917
+ onTopBarAppears === null || onTopBarAppears === void 0 ? void 0 : onTopBarAppears(!isCollapsed);
2918
+ }, [isCollapsed]);
2919
+ useEffect(() => {
2920
+ window.addEventListener('scroll', scrolling, { passive: true });
2921
+ return () => {
2922
+ window.removeEventListener('scroll', scrolling);
2923
+ };
2924
+ }, []);
2925
+ useEffect(() => {
2926
+ if (isMobile)
2927
+ scrolling();
2928
+ }, [isMobile]);
2929
+ const isShowingSiteWideBanner = sitewideBannerShown && !!sitewideBanner;
2930
+ return (React__default.createElement(StyledHeaderWrapper, { "data-site-type": siteType, "data-sponsored": isSponsored, "data-sitewide-banner-shown": isShowingSiteWideBanner, "data-header-type": "home", "data-collapsed": isCollapsed, "data-is-displayed": true, id: "site-header", ref: headerRef },
2931
+ sitewideBanner,
2932
+ React__default.createElement(StyledHeader, { "data-site-type": siteType },
2933
+ React__default.createElement(StyledLeftGroup, { "data-site-type": siteType },
2934
+ isMobile && React__default.createElement(HamburgerMenu, { menuItems: menuItems }),
2935
+ logoComponent || (React__default.createElement("a", { style: {
2936
+ flexShrink: 0,
2937
+ }, href: HOME_PAGE_URL },
2938
+ React__default.createElement("div", null,
2939
+ React__default.createElement(Logo, { style: {
2940
+ display: 'flex',
2941
+ }, type: logoType, badge: locale === 'id-ID' && (React__default.createElement("img", { src: CommonGAssets.getAssetPath('sehat-badge.png'), width: "56", height: "23", loading: "lazy" })), dateForSeasonal: new Date(), locale: locale, key: typeof window !== 'undefined' ? 'client' : 'server' })))),
2942
+ !isMobile && (React__default.createElement(React__default.Fragment, null, siteType === 'marryBaby' ? (React__default.createElement(NavigationMenu, { menuItems: menuItems })) : (enableSearchBar && React__default.createElement(NavigtionSearch, { siteType: siteType }))))),
2943
+ React__default.createElement(StyledRightGroup, { "data-site-type": siteType },
2944
+ !isMobile && (React__default.createElement(React__default.Fragment, null, siteType === 'marryBaby' ? (enableSearchBar && React__default.createElement(NavigtionSearch, { siteType: siteType })) : (React__default.createElement(NavigationMenu, { menuItems: menuItems })))),
2945
+ React__default.createElement(StyledProfileNavGroup, null,
2946
+ React__default.createElement(CartBadge, { "data-cart-menu": "true", "data-event-category": "Ecommerce", "data-event-action": "Cart Click", "data-event-label": currentUrl, count: cartNumber, locale: locale }),
2947
+ enableNavCareBooking && (React__default.createElement(DisplayWrapper, { mediaQueryKey: "mbUp" },
2948
+ React__default.createElement(BookingButton, { careUrlFe: statics.CARE_URL_FE, currentUrl: currentUrl, btnName: t('login.booking'), onCareHeaderClick: onBookingClick }))),
2949
+ languageMenu,
2950
+ React__default.createElement(NavigationProfileButton, { userInfo: userInfo, siteType: siteType, onLoginClick: onLoginClick || goToLogin, SSO_URL: normalizeLink(statics.SSO_URL), currentUrl: currentUrl, onLogout: onLogout, isLoading: isUserLoading, locale: locale })))),
2951
+ sponsorComponent
2952
+ ? !React__default.isValidElement(sponsorComponent)
2953
+ ? sponsorComponent
2954
+ : React__default.cloneElement(sponsorComponent, {
2955
+ isCollapsed,
2956
+ locale,
2957
+ isMobile,
2958
+ })
2959
+ : null));
2960
+ };
2961
+ const NavigtionSearch = ({ siteType }) => (React__default.createElement(DisplayWrapper, { mediaQueryKey: "mbUp", className: siteType === 'marryBaby' ? 'marry-baby' : '' },
2962
+ React__default.createElement(SearchInput, { id: "desktop" })));
2963
+ const NavigationMenu = ({ menuItems }) => {
2964
+ const { siteType, locale, ssrMenuContent: { categories, healthTools, care, together }, } = useContext(NavigationContext);
2965
+ return (React__default.createElement(DisplayWrapper, { mediaQueryKey: "mbUp", style: { height: '100%' } },
2966
+ React__default.createElement(StyledWrapMenuItems, { "data-site-type": siteType }, menuItems === null || menuItems === void 0 ? void 0 : menuItems.map((menuItem, index) => (React__default.createElement(ItemMenu, { key: index, item: menuItem, menu: menuItem.popupType === 'categories' ? (React__default.createElement(MenuCategoriesList, { categories: categories === null || categories === void 0 ? void 0 : categories.items, spotlightsList: categories === null || categories === void 0 ? void 0 : categories.spotlights })) : menuItem.popupType === 'tools' ? (React__default.createElement(MenuHealthToolsList, { locale: locale, healthTools: healthTools === null || healthTools === void 0 ? void 0 : healthTools.items, spotlightHealthTools: healthTools === null || healthTools === void 0 ? void 0 : healthTools.spotlights })) : menuItem.popupType === 'together' ? (React__default.createElement(MenuCommunitiesList, { communities: together === null || together === void 0 ? void 0 : together.items, spotlights: together === null || together === void 0 ? void 0 : together.spotlights })) : menuItem.popupType === 'care' ? (React__default.createElement(MenuCareList, { careSpecialties: care === null || care === void 0 ? void 0 : care.items, spotlights: care === null || care === void 0 ? void 0 : care.spotlights })) : null }))))));
2967
+ };
2968
+
2969
+ const useHeaderHeight = ({ hasSponsoredBanners, isSponsored, isShowingSiteWideBanner, isMobile, }) => {
2970
+ const headerRef = useRef(null);
2971
+ const [headerHeight, setHeaderHeight] = useState(0);
2972
+ const [headerBottom, setHeaderBottom] = useState(64);
2973
+ const debounceSetHeader = useCallback(debounce(() => {
2974
+ var _a, _b, _c, _d;
2975
+ const newHeaderHeight = ((_a = headerRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight) ||
2976
+ ((_c = (_b = headerRef.current) === null || _b === void 0 ? void 0 : _b.children[0]) === null || _c === void 0 ? void 0 : _c.clientHeight) ||
2977
+ 0;
2978
+ // limit recalculation to once per 200ms + less than 300px from top of page
2979
+ if (window.scrollY <= newHeaderHeight + 200) {
2980
+ setHeaderHeight(newHeaderHeight);
2981
+ setHeaderBottom(((_d = headerRef.current) === null || _d === void 0 ? void 0 : _d.getBoundingClientRect().bottom) || headerHeight);
2982
+ // setTimeout(() => debounceSetHeader(), 200)
2983
+ }
2984
+ }, 200), []);
2985
+ useEffect(() => {
2986
+ window.addEventListener('resize', debounceSetHeader, {
2987
+ passive: true,
2988
+ });
2989
+ window.addEventListener('scroll', debounceSetHeader, {
2990
+ passive: true,
2991
+ });
2992
+ debounceSetHeader();
2993
+ return () => {
2994
+ window.removeEventListener('resize', debounceSetHeader);
2995
+ window.removeEventListener('scroll', debounceSetHeader);
2996
+ };
2997
+ }, []);
2998
+ useEffect(() => {
2999
+ debounceSetHeader();
3000
+ }, [
3001
+ isMobile,
3002
+ isShowingSiteWideBanner,
3003
+ isSponsored,
3004
+ hasSponsoredBanners,
3005
+ headerRef.current,
3006
+ ]);
3007
+ const defaultHeaderHeight = useMemo(() => {
3008
+ let res = isMobile ? 56 : 56;
3009
+ if (isShowingSiteWideBanner) {
3010
+ res += 64;
3011
+ }
3012
+ if (isSponsored) {
3013
+ res += 40;
3014
+ if (hasSponsoredBanners) {
3015
+ res += 57;
3016
+ }
3017
+ }
3018
+ return res;
3019
+ }, [isMobile, isShowingSiteWideBanner, hasSponsoredBanners, isSponsored]);
3020
+ return {
3021
+ defaultHeaderHeight,
3022
+ headerHeight: headerHeight || defaultHeaderHeight,
3023
+ headerBottom,
3024
+ headerRef,
3025
+ };
3026
+ };
3027
+
3028
+ const useInsider = () => {
3029
+ const { isFirstLogin, userState } = useContext(NavigationContext);
3030
+ const { userInfo } = userState;
3031
+ useEffect(() => {
3032
+ if (userInfo === null || userInfo === void 0 ? void 0 : userInfo.id) {
3033
+ if (isFirstLogin) {
3034
+ // sign up
3035
+ (userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) && (userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) !== ''
3036
+ ? (() => {
3037
+ window.insider_object = {
3038
+ user: Object.assign({ uuid: userInfo === null || userInfo === void 0 ? void 0 : userInfo.id, email: userInfo === null || userInfo === void 0 ? void 0 : userInfo.email, gdpr_optin: true, email_optin: true, sign_up: true }, ((userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) ? { name: userInfo === null || userInfo === void 0 ? void 0 : userInfo.name } : {})),
3039
+ };
3040
+ })()
3041
+ : (() => {
3042
+ window.insider_object = {
3043
+ user: Object.assign({ uuid: userInfo === null || userInfo === void 0 ? void 0 : userInfo.id, sign_up: true }, ((userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) ? { name: userInfo === null || userInfo === void 0 ? void 0 : userInfo.name } : {})),
3044
+ };
3045
+ })();
3046
+ }
3047
+ else {
3048
+ // log in
3049
+ (userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) && (userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) !== ''
3050
+ ? (() => {
3051
+ window.insider_object = {
3052
+ user: Object.assign({ uuid: userInfo === null || userInfo === void 0 ? void 0 : userInfo.id, email: userInfo === null || userInfo === void 0 ? void 0 : userInfo.email, gdpr_optin: true, email_optin: true, log_in: true }, ((userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) ? { name: userInfo === null || userInfo === void 0 ? void 0 : userInfo.name } : {})),
3053
+ };
3054
+ })()
3055
+ : (() => {
3056
+ window.insider_object = {
3057
+ user: Object.assign({ uuid: userInfo === null || userInfo === void 0 ? void 0 : userInfo.id, log_in: true }, ((userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) ? { name: userInfo === null || userInfo === void 0 ? void 0 : userInfo.name } : {})),
3058
+ };
3059
+ })();
3060
+ }
3061
+ }
3062
+ }, []);
3063
+ };
3064
+
3065
+ const useNavServices = () => {
3066
+ const { t } = useTranslations();
3067
+ const { siteType, locale, configs: { enableNavDiscover, enableNavHealthTools, enableNavCare, enableNavTogether, enableNavEcom, statics, }, } = useContext(NavigationContext);
3068
+ const isMarryBaby = siteType === 'marryBaby';
3069
+ const services = useMemo(() => {
3070
+ var _a;
3071
+ const _services = [];
3072
+ enableNavDiscover &&
3073
+ _services.push({
3074
+ name: t('home.navigator.menuItem.discover'),
3075
+ id: 'categories',
3076
+ link: `${statics.HOME_PAGE_URL}${locale === 'tl-PH' ? '/fil' : ''}/categories`,
3077
+ niceName: '',
3078
+ thumbnail: isMarryBaby
3079
+ ? CommonGAssets.getAssetPath('categories-mb.svg')
3080
+ : CommonGAssets.getAssetPath('nav-icons/discover.svg'),
3081
+ popupType: 'categories',
3082
+ });
3083
+ enableNavHealthTools &&
3084
+ _services.push({
3085
+ name: t('home.navigator.menuItem.healthTools'),
3086
+ id: 'tools',
3087
+ link: `${statics.HOME_PAGE_URL}${locale === 'tl-PH' ? '/fil' : ''}${((_a = STATIC_PAGES[locale]) === null || _a === void 0 ? void 0 : _a.HEALTH_TOOLS) || ''}`,
3088
+ thumbnail: isMarryBaby
3089
+ ? CommonGAssets.getAssetPath('healthtools-mb.svg')
3090
+ : CommonGAssets.getAssetPath('nav-icons/health-tools.svg'),
3091
+ popupType: 'tools',
3092
+ });
3093
+ enableNavTogether &&
3094
+ _services.push({
3095
+ name: t('home.navigator.menuItem.helloTogether'),
3096
+ id: 'together',
3097
+ link: normalizeLinkSlash(statics.TOGETHER_URL_FE + '/'),
3098
+ thumbnail: isMarryBaby
3099
+ ? CommonGAssets.getAssetPath('community-mb.svg')
3100
+ : CommonGAssets.getAssetPath('nav-icons/community.svg'),
3101
+ popupType: 'together',
3102
+ });
3103
+ enableNavEcom &&
3104
+ _services.push({
3105
+ name: t('home.navigator.menuItem.helloEcom'),
3106
+ id: 'ecom',
3107
+ link: normalizeLinkSlash(statics.HOME_PAGE_URL + '/shop'),
3108
+ thumbnail: CommonGAssets.getAssetPath('nav-icons/shop.svg'),
3109
+ popupType: null,
3110
+ });
3111
+ enableNavCare &&
3112
+ _services.push({
3113
+ name: t('home.navigator.menuItem.helloCare'),
3114
+ id: 'care',
3115
+ link: locale === 'ms-MY'
3116
+ ? normalizeLinkSlash(statics.HOME_PAGE_URL + '/care/current-location/hospital/')
3117
+ : normalizeLinkSlash(statics.HOME_PAGE_URL + '/care'),
3118
+ thumbnail: CommonGAssets.getAssetPath('nav-icons/care.svg'),
3119
+ popupType: locale === 'id-ID' ? 'care' : null,
3120
+ });
3121
+ return _services;
3122
+ }, [locale, enableNavCare, enableNavTogether, enableNavEcom]);
3123
+ return services;
3124
+ };
3125
+
3126
+ const StyledContainer = styled.div `
3127
+ --header-z-index: 305;
3128
+ top: 0;
3129
+ z-index: var(--header-z-index);
3130
+
3131
+ ${MediaQueries.mbDown} {
3132
+ width: 100vw;
3133
+ max-width: 100%;
3134
+ }
3135
+ --amp-site-wide-closed: 2px;
3136
+
3137
+ -webkit-transform: translateZ(0);
3138
+ position: sticky;
3139
+
3140
+ &.nav-open {
3141
+ margin-top: 64px;
3142
+ }
3143
+
3144
+ &:not(.nav-open) {
3145
+ --amp-site-wide-closed: 66px;
3146
+ }
3147
+ pointer-events: none;
3148
+ > section *:not([data-cart-menu] *) {
3149
+ pointer-events: auto;
3150
+ }
3151
+ `;
3152
+
3153
+ const _NavigationV2 = (props) => {
3154
+ var _a, _b;
3155
+ const { isMobile, locale, onTopBarAppears, languageOptions, sponsorComponent, sitewideBanner, sitewideBannerShown, className, logoComponent, } = props;
3156
+ const services = useNavServices();
3157
+ useInsider();
3158
+ const isShowingSiteWideBanner = sitewideBannerShown && !!sitewideBanner;
3159
+ const isSponsored = !!sponsorComponent;
3160
+ const hasSponsoredBanners = !!((_b = (_a = sponsorComponent === null || sponsorComponent === void 0 ? void 0 : sponsorComponent.props) === null || _a === void 0 ? void 0 : _a.sponsoredBy) === null || _b === void 0 ? void 0 : _b.length);
3161
+ const { headerRef, defaultHeaderHeight, headerHeight, headerBottom } = useHeaderHeight({
3162
+ isShowingSiteWideBanner,
3163
+ isSponsored,
3164
+ hasSponsoredBanners,
3165
+ isMobile,
3166
+ });
3167
+ return (React__default.createElement(StyledContainer, { id: "navigation-v2", style: {
3168
+ '--default-header-height': defaultHeaderHeight + 'px',
3169
+ '--header-height': `calc(${headerHeight}px - var(--amp-site-wide-closed), 64px)`,
3170
+ '--header-bottom': headerBottom + 'px',
3171
+ }, className: className },
3172
+ React__default.createElement("section", { ref: headerRef },
3173
+ React__default.createElement(NavigationBar, { menuItems: services, onTopBarAppears: onTopBarAppears, logoComponent: logoComponent, languageMenu: React__default.createElement(LanguageSwitcher, { languageOptions: languageOptions, locale: locale }) }))));
3174
+ };
3175
+ const NavigationV2 = (props) => {
3176
+ const propsWithDefaultValues = Object.assign({ siteType: 'helloSites', projectType: 'discover', locale: 'vi-VN', activeMenuService: 'categories', ssrMenuContent: {} }, props);
3177
+ return (React__default.createElement(NavigationProvider, Object.assign({}, propsWithDefaultValues),
3178
+ React__default.createElement(_NavigationV2, Object.assign({}, propsWithDefaultValues))));
3179
+ };
3180
+ const getNavMenuContent = (locale) => __awaiter(void 0, void 0, void 0, function* () {
3181
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
3182
+ const res = {};
3183
+ const isMarryBaby = locale === 'vi-VN_MB';
3184
+ try {
3185
+ const customLang = locale === 'tl-PH' ? 'lang=fil' : '';
3186
+ try {
3187
+ const [categories, spotlights, healthtools, healthtoolsFavorites] = yield Promise.all([
3188
+ fetch(normalizeLinkSlash(`${getDiscoverApiDomain(locale)}/wp-json/api/categories${customLang ? '?' + customLang : ''}`)).then((res) => res.json()),
3189
+ fetch(normalizeLinkSlash(`${getDiscoverApiDomain(locale)}/wp-json/api/spotlights?per_page=10&order_by=start_date${customLang ? '&' + customLang : ''}`)).then((res) => res.json()),
3190
+ fetch(normalizeLinkSlash(`${getDiscoverApiDomain(locale)}/wp-json/api/${isMarryBaby ? 'health-tools' : 'healthtools'}${customLang ? '?' + customLang : ''}`)).then((res) => res.json()),
3191
+ fetch(normalizeLinkSlash(`${getDiscoverApiDomain(locale)}/wp-json/api/${isMarryBaby ? 'health-tools' : 'healthtools'}/favorites${customLang ? '?' + customLang : ''}`)).then((res) => res.json()),
3192
+ ]);
3193
+ res.categories = {
3194
+ items: ((_b = (_a = categories === null || categories === void 0 ? void 0 : categories.data) === null || _a === void 0 ? void 0 : _a.map) === null || _b === void 0 ? void 0 : _b.call(_a, formatCategory)) || [],
3195
+ spotlights: ((_f = (_e = (_d = (_c = spotlights === null || spotlights === void 0 ? void 0 : spotlights.data) === null || _c === void 0 ? void 0 : _c.articles) === null || _d === void 0 ? void 0 : _d.map) === null || _e === void 0 ? void 0 : _e.call(_d, formatSpotlightsList)) === null || _f === void 0 ? void 0 : _f.filter(checkAvailableSpotlight)) || [],
3196
+ };
3197
+ res.healthTools = {
3198
+ items: ((_h = (_g = healthtools === null || healthtools === void 0 ? void 0 : healthtools.data) === null || _g === void 0 ? void 0 : _g.map) === null || _h === void 0 ? void 0 : _h.call(_g, formatHealthTool)) || [],
3199
+ spotlights: ((_k = (_j = healthtoolsFavorites === null || healthtoolsFavorites === void 0 ? void 0 : healthtoolsFavorites.data) === null || _j === void 0 ? void 0 : _j.map) === null || _k === void 0 ? void 0 : _k.call(_j, formatHealthTool)) || [],
3200
+ };
3201
+ }
3202
+ catch (_z) { }
3203
+ if (isMarryBaby || TOGETHER_LOCALES.includes(locale)) {
3204
+ try {
3205
+ const [communities, spotlightPosts] = yield Promise.all([
3206
+ fetch(normalizeLinkSlash(`${getTogetherApiDomain()}/api/v1/community?website_url=https://${domainLocales[locale]}`)).then((res) => res.json()),
3207
+ fetch(normalizeLinkSlash(`${getTogetherApiDomain()}/api/v1/options?website_url=https://${domainLocales[locale]}&meta_key=popular_post`)).then((res) => res.json()),
3208
+ ]);
3209
+ res.together = {
3210
+ items: ((_o = (_m = (_l = communities === null || communities === void 0 ? void 0 : communities.data) === null || _l === void 0 ? void 0 : _l.communities) === null || _m === void 0 ? void 0 : _m.map) === null || _o === void 0 ? void 0 : _o.call(_m, formatCommunity)) || [],
3211
+ spotlights: ((_r = (_q = (_p = spotlightPosts === null || spotlightPosts === void 0 ? void 0 : spotlightPosts.data) === null || _p === void 0 ? void 0 : _p.posts) === null || _q === void 0 ? void 0 : _q.map) === null || _r === void 0 ? void 0 : _r.call(_q, formatPost)) || [],
3212
+ };
3213
+ }
3214
+ catch (_0) { }
3215
+ }
3216
+ if (CARE_LOCALES.includes(locale)) {
3217
+ try {
3218
+ const [specialties, hospitals] = yield Promise.all([
3219
+ fetch(normalizeLinkSlash(getCareApiDomain() +
3220
+ `/api/options/setting_menu?site=${domainLocales[locale]}&type=0`)).then((res) => res.json()),
3221
+ fetch(normalizeLinkSlash(getCareApiDomain() +
3222
+ `/api/options/setting_menu?site=${domainLocales[locale]}&type=1`)).then((res) => res.json()),
3223
+ ]);
3224
+ res.care = {
3225
+ items: ((_v = (_u = (_t = (_s = specialties === null || specialties === void 0 ? void 0 : specialties._data) === null || _s === void 0 ? void 0 : _s.setting_menu) === null || _t === void 0 ? void 0 : _t.menu_specialty) === null || _u === void 0 ? void 0 : _u.map) === null || _v === void 0 ? void 0 : _v.call(_u, formatSpecialties)) || [],
3226
+ spotlights: ((_y = (_x = (_w = hospitals === null || hospitals === void 0 ? void 0 : hospitals._data.setting_menu) === null || _w === void 0 ? void 0 : _w.menu_hospital) === null || _x === void 0 ? void 0 : _x.map) === null || _y === void 0 ? void 0 : _y.call(_x, formatHospital)) || [],
3227
+ };
3228
+ }
3229
+ catch (_1) { }
3230
+ }
3231
+ }
3232
+ catch (e) {
3233
+ console.error(e);
3234
+ }
3235
+ return res;
3236
+ });
3237
+ const getNavMenuContentWithCache = (locale) => __awaiter(void 0, void 0, void 0, function* () {
3238
+ return (yield getDataWithCache('nav-menu-content', () => getNavMenuContent(locale || 'en-PH'), (data) => { var _a, _b; return !!((_b = (_a = data === null || data === void 0 ? void 0 : data.categories) === null || _a === void 0 ? void 0 : _a.items) === null || _b === void 0 ? void 0 : _b.length); })) || {};
3239
+ });
3240
+
3241
+ export { LanguageSwitcher as L, NavigationV2 as N, ProfileNavigation as P, getNavMenuContentWithCache as a, NavigationLogoutPopup as b, NavigationProfileButton as c, getTogetherUserPostsApiPath as d, getNavMenuContent as g, isInternalLink as i };