@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,3261 @@
1
+ 'use strict';
2
+
3
+ var tslib_es6 = require('./tslib.es6-65e312a5.js');
4
+ var React = require('react');
5
+ var index$2 = require('./index-3e5fc2d6.js');
6
+ var styled = require('styled-components');
7
+ var theme = require('./theme-fa910869.js');
8
+ var index = require('./index-bc4f4c33.js');
9
+ var index$1 = require('./index-1baaedb0.js');
10
+ var index$4 = require('./index-5553f9e1.js');
11
+ var normalizeLink = require('./normalizeLink-6f7b85d8.js');
12
+ var routing = require('./routing-191a9a00.js');
13
+ var index$5 = require('./index-3eef6bed.js');
14
+ var index$a = require('./index-81cb1142.js');
15
+ var useTranslations = require('./useTranslations-e1853417.js');
16
+ var throttle = require('lodash/throttle');
17
+ var core = require('@mantine/core');
18
+ require('@mantine/dates');
19
+ var Subot = require('./Subot-5fc40fb5.js');
20
+ require('./translationsContext-950334bf.js');
21
+ var formatString = require('string-format');
22
+ require('@mantine/hooks');
23
+ var utils = require('./utils-64bd0c42.js');
24
+ var constants = require('./constants-ae18ce18.js');
25
+ var index$3 = require('./index-0da9b2e8.js');
26
+ var core$1 = require('@hhgtech/icons/core');
27
+ var index_styles = require('./index.styles-b822bf42.js');
28
+ var ChevronDown = require('./ChevronDown-275f1ab5.js');
29
+ var index$6 = require('./index-9da9f0c3.js');
30
+ var utils$1 = require('./utils-661411f6.js');
31
+ var constants$1 = require('./constants-8b8bc19f.js');
32
+ var index$8 = require('./index-e2e81fa2.js');
33
+ var index$7 = require('./index-af91c83e.js');
34
+ var useIsInit = require('./useIsInit-89535012.js');
35
+ require('./utils-52113753.js');
36
+ require('./index.styled-5628b3e7.js');
37
+ require('./index-d8a7efaf.js');
38
+ var dayjs = require('dayjs');
39
+ var relativeTime = require('dayjs/plugin/relativeTime');
40
+ var index$9 = require('./index-12c07f71.js');
41
+ var debounce = require('lodash/debounce');
42
+ var core$2 = require('./core-2aa8d86c.js');
43
+
44
+ function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
45
+
46
+ var React__default = /*#__PURE__*/_interopDefault(React);
47
+ var styled__default = /*#__PURE__*/_interopDefault(styled);
48
+ var throttle__default = /*#__PURE__*/_interopDefault(throttle);
49
+ var formatString__default = /*#__PURE__*/_interopDefault(formatString);
50
+ var dayjs__default = /*#__PURE__*/_interopDefault(dayjs);
51
+ var relativeTime__default = /*#__PURE__*/_interopDefault(relativeTime);
52
+ var debounce__default = /*#__PURE__*/_interopDefault(debounce);
53
+
54
+ const ALLOW_DOMAIN_URL = [
55
+ 'hellobacsi.com',
56
+ 'hellosehat.com',
57
+ 'hellodoktor.com',
58
+ 'hellokrupet.com',
59
+ 'hellodoctor.com.ph',
60
+ 'hellokhunmor.com',
61
+ 'hellosayarwon.com',
62
+ 'helloyishi.com.tw',
63
+ 'helloswasthya.com',
64
+ 'marrybaby.vn',
65
+ 'hellohealth.questionpro.com',
66
+ 'hellobacsivn.page.link',
67
+ ];
68
+ const isInternalLink = (url = '') => {
69
+ return ALLOW_DOMAIN_URL.some((o) => new URL(url).origin.endsWith(o));
70
+ };
71
+
72
+ const StyledLanguageChangeLink = styled__default["default"].a `
73
+ display: inline-flex;
74
+ position: relative;
75
+ flex-direction: row;
76
+ align-items: center;
77
+ padding: 7px 11px;
78
+ gap: 2px;
79
+
80
+ background: ${theme.theme.colors.white};
81
+ border: 1px solid ${theme.theme.colors.neutral100};
82
+ border-radius: 20px;
83
+
84
+ color: ${theme.theme.colors.gray600};
85
+ font-weight: 600;
86
+ font-size: 12px;
87
+ line-height: 18px;
88
+ text-decoration: none;
89
+
90
+ cursor: pointer;
91
+ `;
92
+
93
+ const StyledSelectionContainer = styled__default["default"].div `
94
+ position: relative;
95
+ display: inline-block;
96
+ `;
97
+ const StyledSelectionLabel = styled__default["default"].div `
98
+ position: relative;
99
+ `;
100
+ const StyleSelectionPopup = styled__default["default"].div `
101
+ position: absolute;
102
+ z-index: 21;
103
+ top: 100%;
104
+ right: 0;
105
+ width: 327px;
106
+ padding: 8px;
107
+ background: white;
108
+ border-radius: 4px;
109
+ filter: drop-shadow(0px 8px 40px rgba(0, 0, 0, 0.1));
110
+
111
+ &[data-is-open='false'] {
112
+ display: none;
113
+ }
114
+ &[data-show-indicator='true'] {
115
+ &:before {
116
+ position: absolute;
117
+ right: 11px;
118
+ bottom: 100%;
119
+ width: 0;
120
+ height: 0;
121
+ border: 0.5rem solid transparent;
122
+ border-top: none;
123
+ border-bottom-color: #fff;
124
+ content: '';
125
+ filter: drop-shadow(0 -0.0625rem 0.0625rem rgba(0, 0, 0, 0.1));
126
+ }
127
+ }
128
+ `;
129
+ const StyledOption = styled__default["default"].div `
130
+ display: flex;
131
+ height: 40px;
132
+ align-items: center;
133
+ justify-content: space-between;
134
+
135
+ padding: 0 16px;
136
+ border-radius: ${theme.theme.borderRadius};
137
+ cursor: pointer;
138
+
139
+ .check-icon {
140
+ width: 16px;
141
+ height: 16px;
142
+ }
143
+ &[data-selected='false'] {
144
+ background-color: ${theme.theme.colors.gray100};
145
+ }
146
+ `;
147
+ const StyledPopupBackground = styled__default["default"].div `
148
+ position: fixed;
149
+ z-index: 20;
150
+ top: 0;
151
+ left: 0;
152
+ width: 100%;
153
+ height: 100%;
154
+ cursor: default;
155
+ `;
156
+
157
+ const TooltipSelection = ({ options, label, labelRenderer, selected, onChange, showSelected = true, style = {}, showIndicator = true, }) => {
158
+ const [isOpen, setIsOpen] = React.useState(false);
159
+ return (React__default["default"].createElement(React__default["default"].Fragment, null,
160
+ React__default["default"].createElement(StyledSelectionContainer, null,
161
+ React__default["default"].createElement(StyledSelectionLabel, { onClick: () => setIsOpen((value) => !value) },
162
+ label || (labelRenderer === null || labelRenderer === void 0 ? void 0 : labelRenderer(isOpen)) || null,
163
+ React__default["default"].createElement(StyleSelectionPopup, { "data-is-open": isOpen, style: style, "data-show-indicator": showIndicator }, options.map((option, index$2) => (React__default["default"].createElement(StyledOption, { key: index$2, "data-selected": showSelected && selected === option.value, onClick: (e) => {
164
+ if (selected !== option.value) {
165
+ onChange(option.value);
166
+ setIsOpen((value) => !value);
167
+ }
168
+ e.stopPropagation();
169
+ } },
170
+ React__default["default"].createElement(index.Text, { size: "p3" }, option.label),
171
+ showSelected && selected === option.value && (React__default["default"].createElement("img", { src: index$1.CommonGAssets.getAssetPath('check.svg'), alt: "check", className: "check-icon", loading: "lazy" })))))))),
172
+ isOpen && (React__default["default"].createElement(StyledPopupBackground, { onClick: () => setIsOpen(false) }))));
173
+ };
174
+
175
+ const LanguageSwitcher = ({ languageOptions, locale }) => {
176
+ var _a, _b;
177
+ const selectedLanguage = languageOptions === null || languageOptions === void 0 ? void 0 : languageOptions.find((option) => option.locale === locale);
178
+ if (!(languageOptions === null || languageOptions === void 0 ? void 0 : languageOptions.length)) {
179
+ return null;
180
+ }
181
+ return (React__default["default"].createElement(TooltipSelection, { options: languageOptions, selected: selectedLanguage.value, label: React__default["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) => {
182
+ if (typeof window !== 'undefined') {
183
+ window.location.href = href;
184
+ }
185
+ }, style: { width: 100 }, showSelected: true, showIndicator: false }));
186
+ };
187
+ const LanguageLabel = ({ locale, label, href, }) => {
188
+ var _a, _b, _c;
189
+ return (React__default["default"].createElement(StyledLanguageChangeLink, { href: href },
190
+ React__default["default"].createElement(index$2.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] }),
191
+ React__default["default"].createElement("span", null, label)));
192
+ };
193
+
194
+ const getEcomUrl = ({ path, locale, }) => {
195
+ var _a;
196
+ return `/shop/${(_a = constants.LOCALISED_SLUGS[locale || 'vi-VN']) === null || _a === void 0 ? void 0 : _a[path]}/`;
197
+ };
198
+
199
+ var useStyles = core.createStyles(() => {
200
+ return {
201
+ root: {
202
+ textDecoration: 'none',
203
+ },
204
+ indicatorRoot: {
205
+ marginRight: core.rem(10),
206
+ },
207
+ iconText: {
208
+ color: '#fff',
209
+ },
210
+ };
211
+ });
212
+
213
+ const CartBadge = (_a) => {
214
+ var { count, styles, className, classNames, locale } = _a, boxProps = tslib_es6.__rest(_a, ["count", "styles", "className", "classNames", "locale"]);
215
+ const { classes, cx } = useStyles(undefined, {
216
+ name: 'CartBadge',
217
+ styles,
218
+ classNames,
219
+ });
220
+ return typeof count !== 'undefined' ? (React__default["default"].createElement(core.Box, Object.assign({ component: "a", href: getEcomUrl({ path: 'CART', locale }), className: cx(classes.root, className) }, boxProps),
221
+ React__default["default"].createElement(core.Indicator, { classNames: {
222
+ root: classes.indicatorRoot,
223
+ }, withBorder: true, color: 'red', size: 20, disabled: count === 0, label: React__default["default"].createElement(index.Text, { className: classes.iconText, size: "s5" }, count > 99 ? '99+' : count) },
224
+ React__default["default"].createElement(index$3.Icon.Cart, { size: 24 })))) : null;
225
+ };
226
+
227
+ const StyledDisplayWrapper = styled__default["default"].div `
228
+ ${(props) => `
229
+ ${props.lowerBound !== 0 ? `@media (max-width: ${props.lowerBound - 1}px) { display: none; }` : ''}
230
+ ${props.upperBound !== 0 ? `@media (min-width: ${props.upperBound}px) { display: none; }` : ''}
231
+ `}
232
+ `;
233
+
234
+ const DisplayWrapper = ({ forceDisplay, mediaQueryKey, children, className, style, }) => {
235
+ // use CSS to display or not
236
+ const [lowerBoundValue, upperBoundValue] = React.useMemo(() => utils.getBoundariesFromMediaQueryKey(mediaQueryKey), [mediaQueryKey]);
237
+ return (React__default["default"].createElement(StyledDisplayWrapper, { lowerBound: forceDisplay ? 0 : lowerBoundValue, upperBound: forceDisplay ? 0 : upperBoundValue, className: className, style: style }, children));
238
+ };
239
+
240
+ const useCSSFocusPopupHelper = (configs) => {
241
+ const { allowBgScroll } = configs || {};
242
+ const ref = React.useRef();
243
+ return {
244
+ containerRef: ref,
245
+ onContainerFocus: () => {
246
+ if (!allowBgScroll)
247
+ document.documentElement.style.overflow = 'hidden';
248
+ },
249
+ onContainerBlur: () => {
250
+ if (!allowBgScroll)
251
+ document.documentElement.style.overflow = '';
252
+ },
253
+ onButtonMouseDown: (e) => {
254
+ // this close popup when click, run after REact init
255
+ if (ref.current &&
256
+ (document.activeElement === ref.current ||
257
+ ref.current.contains(document.activeElement))) {
258
+ ref.current.blur();
259
+ document.activeElement.blur();
260
+ e.preventDefault();
261
+ }
262
+ },
263
+ onClose: () => {
264
+ if (ref.current &&
265
+ (document.activeElement === ref.current ||
266
+ ref.current.contains(document.activeElement))) {
267
+ ref.current.blur();
268
+ document.activeElement.blur();
269
+ }
270
+ },
271
+ };
272
+ };
273
+
274
+ const _StyledPopup = styled__default["default"].div `
275
+ position: absolute;
276
+ right: 0;
277
+ transition: all 0.5s ease-in-out;
278
+ overflow-y: auto;
279
+ padding-bottom: 70px;
280
+
281
+ &[data-open='true'] {
282
+ z-index: 200;
283
+ top: 120%;
284
+ opacity: 1;
285
+ visibility: visible;
286
+ }
287
+
288
+ &[data-open='false'] {
289
+ display: none;
290
+ }
291
+
292
+ .popup-content {
293
+ z-index: 111;
294
+ height: 100%;
295
+ border: 1px solid #0000001a;
296
+ ${utils.MediaQueries.mbDown} {
297
+ > div {
298
+ border-top-left-radius: 0;
299
+ border-top-right-radius: 0;
300
+ }
301
+ }
302
+ }
303
+
304
+ /* min-height: 415px; */
305
+ ${utils.MediaQueries.mbUp} {
306
+ width: 320px;
307
+ }
308
+ ${utils.MediaQueries.mbDown} {
309
+ position: fixed;
310
+ left: 0;
311
+ width: 100%;
312
+ }
313
+ `;
314
+ const StyledPopupClass = 'hhgcomp-navprofilebutton-popup';
315
+ const StyledPopup$1 = index_styles.getDefaultClassWrapper(_StyledPopup, StyledPopupClass);
316
+ const _StyledPopupWrapper = styled__default["default"].div `
317
+ position: fixed;
318
+ z-index: 150;
319
+ top: var(--header-bottom, 56px);
320
+ left: 0;
321
+ width: 100%;
322
+ height: 100%;
323
+ align-items: center;
324
+
325
+ ${utils.MediaQueries.mbUp} {
326
+ background-color: transparent;
327
+ &[data-type='welcome'] {
328
+ background: rgba(38, 38, 38, 0.3);
329
+ }
330
+ &[data-type='due-date'] {
331
+ background: rgba(38, 38, 38, 0.3);
332
+ }
333
+ }
334
+
335
+ ${utils.MediaQueries.mbDown} {
336
+ background: rgba(38, 38, 38, 0.3);
337
+ }
338
+
339
+ &[data-type='welcome'] {
340
+ top: 0;
341
+ }
342
+
343
+ &[data-open='false'] {
344
+ display: none;
345
+ }
346
+ `;
347
+ const StyledPopupWrapperClass = 'hhgcomp-navprofilebutton-popupwrapper';
348
+ index_styles.getDefaultClassWrapper(_StyledPopupWrapper, StyledPopupWrapperClass);
349
+ const StyledAvatar = styled__default["default"].div `
350
+ width: 40px;
351
+ height: 40px;
352
+ cursor: pointer;
353
+
354
+ img {
355
+ border-radius: 50%;
356
+ }
357
+
358
+ .avatar {
359
+ width: 40px;
360
+ height: 40px;
361
+ object-fit: cover;
362
+ }
363
+
364
+ .avatar-default {
365
+ display: flex;
366
+ align-items: center;
367
+ justify-content: center;
368
+ background-color: ${theme.theme.colors.secondaryBase};
369
+ border-radius: 50%;
370
+ color: white;
371
+ font-size: 20px;
372
+ font-weight: bold;
373
+ }
374
+ `;
375
+ const StyledImageWrapper$1 = styled__default["default"].div `
376
+ display: inline-flex;
377
+ position: relative;
378
+ width: 40px;
379
+ height: 40px;
380
+ display: flex;
381
+ align-items: center;
382
+ justify-content: center;
383
+ text-decoration: none;
384
+ flex-shrink: 0;
385
+ cursor: pointer;
386
+
387
+ .user-close-icon {
388
+ display: none;
389
+ }
390
+ &:focus-within {
391
+ .user-close-icon {
392
+ display: block;
393
+ }
394
+ .user-avatar {
395
+ display: none;
396
+ }
397
+ .${StyledPopupClass} {
398
+ z-index: 200;
399
+ top: 120%;
400
+ opacity: 1;
401
+ visibility: visible;
402
+ display: initial;
403
+ ${utils.MediaQueries.mbDown} {
404
+ top: 100%;
405
+ }
406
+ }
407
+ .${StyledPopupWrapperClass} {
408
+ display: initial;
409
+ }
410
+ }
411
+ `;
412
+ const StyledLoggedOutAnchor = styled__default["default"].a `
413
+ display: inline-flex;
414
+ .login-btn[data-color='tertiary'][data-size='md'] {
415
+ padding-left: 12px;
416
+ padding-right: 12px;
417
+ }
418
+ .mobile-only {
419
+ ${utils.MediaQueries.mbUp} {
420
+ display: none;
421
+ }
422
+ }
423
+ .login-btn {
424
+ display: none;
425
+ ${utils.MediaQueries.mbUp} {
426
+ display: block;
427
+ }
428
+ }
429
+ `;
430
+
431
+ const NavBookingIcon = (props) => (React__default["default"].createElement("svg", Object.assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, props),
432
+ React__default["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" }),
433
+ React__default["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" }),
434
+ React__default["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" }),
435
+ React__default["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" }),
436
+ React__default["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" }),
437
+ React__default["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" })));
438
+
439
+ const NavCommunityIcon = (props) => (React__default["default"].createElement("svg", Object.assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, props),
440
+ React__default["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" }),
441
+ React__default["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" }),
442
+ React__default["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" })));
443
+
444
+ const NavDotIcon = (props) => (React__default["default"].createElement("svg", Object.assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, props),
445
+ React__default["default"].createElement("rect", { x: "8.33337", y: "8.33325", width: "3.33333", height: "3.33333", rx: "1.66667", fill: "#2D87F3" })));
446
+
447
+ const NavEshopIcon = (props) => (React__default["default"].createElement("svg", Object.assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, props),
448
+ React__default["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" }),
449
+ React__default["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" }),
450
+ React__default["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" }),
451
+ React__default["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" }),
452
+ React__default["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" }),
453
+ React__default["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" })));
454
+
455
+ const NavHelpIcon = (props) => (React__default["default"].createElement("svg", Object.assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, props),
456
+ React__default["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" })));
457
+
458
+ const NavLogOutIcon = (props) => (React__default["default"].createElement("svg", Object.assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, props),
459
+ React__default["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" }),
460
+ React__default["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" }),
461
+ React__default["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" })));
462
+
463
+ const NavMyHealthIcon = (props) => (React__default["default"].createElement("svg", Object.assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, props),
464
+ React__default["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" }),
465
+ React__default["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" })));
466
+
467
+ const NavSaveIcon = (props) => (React__default["default"].createElement("svg", Object.assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, props),
468
+ React__default["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" })));
469
+
470
+ const NavSettingsIcon = (props) => (React__default["default"].createElement("svg", Object.assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, props),
471
+ React__default["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" })));
472
+
473
+ const NavUserIcon = (props) => (React__default["default"].createElement("svg", Object.assign({ width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, props),
474
+ React__default["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" }),
475
+ React__default["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" }),
476
+ React__default["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" })));
477
+
478
+ const StyledNavMenu = styled__default["default"].div `
479
+ padding: 16px;
480
+ border-radius: 16px;
481
+ background-color: white;
482
+ hr {
483
+ border-color: ${theme.theme.colors.neutral100};
484
+ border-bottom-width: 0px;
485
+ border-style: solid;
486
+ }
487
+ .profile-nav-item-group {
488
+ background-color: white;
489
+ border-radius: 8px;
490
+ }
491
+ `;
492
+ const StyledNavMenuItem = styled__default["default"].div `
493
+ display: block;
494
+ border: 1px solid transparent;
495
+ transition: all 300ms linear;
496
+ cursor: pointer;
497
+ position: relative;
498
+
499
+ ${(props) => props.hasSubmenu &&
500
+ styled.css `
501
+ cursor: pointer;
502
+ `}
503
+
504
+ &[data-is-open='true'] {
505
+ & + div {
506
+ margin-top: 8px;
507
+ }
508
+ }
509
+
510
+ border-left-width: 0;
511
+ border-right-width: 0;
512
+ &[data-is-open='true'] {
513
+ & + div {
514
+ margin-top: 0;
515
+ }
516
+ .nav-menu-item:last-child {
517
+ border-bottom-color: ${theme.theme.colors.neutral100};
518
+ }
519
+ }
520
+ .nav-menu-item {
521
+ background-color: ${theme.theme.colors.neutral50};
522
+ }
523
+
524
+ .nav-menu-item {
525
+ padding-left: 38px;
526
+ }
527
+ `;
528
+ const StyledNavMenuItemContent = styled__default["default"].div `
529
+ display: flex;
530
+ align-items: center;
531
+ height: 48px;
532
+ border: 1px solid transparent;
533
+ transition: all 300ms;
534
+ border-radius: 8px;
535
+
536
+ &:hover {
537
+ background-color: ${theme.theme.colors.neutral150};
538
+ }
539
+ &[data-active='true'] {
540
+ background-color: ${theme.theme.colors.blue50};
541
+ }
542
+ `;
543
+ const StyledNavMenuItemDropdown = styled__default["default"].div `
544
+ margin-left: auto;
545
+
546
+ svg {
547
+ fill: ${theme.theme.colors.gray600};
548
+ transition: transform 300ms;
549
+ }
550
+
551
+ &[data-is-open='true'] svg {
552
+ transform: rotate(180deg);
553
+ }
554
+ `;
555
+ const StyledNavFooterSubMenu = styled__default["default"].div `
556
+ overflow: hidden;
557
+ max-height: 0;
558
+ transition: max-height 0.3s ease-out;
559
+
560
+ [data-is-open='true'] & {
561
+ max-height: 500px;
562
+ transition-timing-function: ease-in;
563
+ }
564
+ `;
565
+
566
+ const rankIconUrlMap = {
567
+ helloSites: {
568
+ member: () => index$1.CommonGAssets.getAssetPath('userProfileNav/helloSites/icon-rank-member.svg'),
569
+ ambassador: () => index$1.CommonGAssets.getAssetPath('userProfileNav/helloSites/icon-rank-ambassador.svg'),
570
+ doctor: () => index$1.CommonGAssets.getAssetPath('userProfileNav/helloSites/icon-rank-doctor.svg'),
571
+ expert: () => index$1.CommonGAssets.getAssetPath('userProfileNav/helloSites/icon-rank-expert.svg'),
572
+ influencer: () => index$1.CommonGAssets.getAssetPath('userProfileNav/helloSites/icon-rank-influencer.svg'),
573
+ },
574
+ marryBaby: {
575
+ member: () => index$1.CommonGAssets.getAssetPath('userProfileNav/marryBaby/icon-rank-member.svg'),
576
+ ambassador: () => index$1.CommonGAssets.getAssetPath('userProfileNav/marryBaby/icon-rank-ambassador.svg'),
577
+ doctor: () => index$1.CommonGAssets.getAssetPath('userProfileNav/marryBaby/icon-rank-doctor.svg'),
578
+ expert: () => index$1.CommonGAssets.getAssetPath('userProfileNav/marryBaby/icon-rank-expert.svg'),
579
+ influencer: () => index$1.CommonGAssets.getAssetPath('userProfileNav/marryBaby/icon-rank-influencer.svg'),
580
+ },
581
+ };
582
+ const Rank = ({ rank, siteType = 'helloSites', }) => {
583
+ const iconUrl = React.useMemo(() => {
584
+ var _a, _b;
585
+ return ((_b = (_a = rankIconUrlMap[siteType]) === null || _a === void 0 ? void 0 : _a[rank]) === null || _b === void 0 ? void 0 : _b.call(_a)) || '';
586
+ }, [rank, siteType]);
587
+ const { t } = useTranslations.useTranslations();
588
+ return (React__default["default"].createElement("div", { style: {
589
+ display: 'inline-flex',
590
+ height: 'fit-content',
591
+ alignItems: 'center',
592
+ padding: '5px 12px',
593
+ gap: '4px',
594
+ borderRadius: 16,
595
+ border: `1px solid ${siteType === 'helloSites' ? theme.theme.colors.blue100 : theme.theme.colors.mb100}`,
596
+ } },
597
+ React__default["default"].createElement("img", { src: iconUrl, alt: rank, style: {
598
+ height: 16,
599
+ width: 16,
600
+ } }),
601
+ React__default["default"].createElement(index.Text, { size: "s5", color: "gray.8", weight: "semiBold" }, t(`userProfile.userRank.${rank}`))));
602
+ };
603
+
604
+ const UserInfoSection = ({ siteType = 'helloSites', userInfo, }) => {
605
+ return (userInfo === null || userInfo === void 0 ? void 0 : userInfo.id) ? (React__default["default"].createElement(React__default["default"].Fragment, null,
606
+ React__default["default"].createElement("div", { style: {
607
+ display: 'flex',
608
+ width: '100%',
609
+ justifyContent: 'space-between',
610
+ } },
611
+ React__default["default"].createElement(index$2.Avatar, { src: userInfo.avatar, alt: userInfo.name, size: 48, style: { marginBottom: 8 } }),
612
+ React__default["default"].createElement(Rank, { rank: "member", siteType: siteType })),
613
+ React__default["default"].createElement(index.Text, { size: "s3", weight: "semiBold", color: "gray.8", style: { marginBottom: 4 } }, userInfo.name),
614
+ React__default["default"].createElement(index.Text, { size: "n1", weight: "regular", color: siteType === 'helloSites' ? 'hb.6' : 'mb.6' },
615
+ "@",
616
+ userInfo.username),
617
+ React__default["default"].createElement("hr", null))) : null;
618
+ };
619
+
620
+ const ProfileNavigation = ({ className, activeItem: forceActiveItem, navMenuItems: navMenuItemsProp, style, onLogout, siteType = 'helloSites', userInfo, }) => {
621
+ const { locale } = useTranslations.useTranslations();
622
+ const [localActiveItem, setLocalActiveItem] = React.useState();
623
+ const activeItem = typeof forceActiveItem === 'string' ? forceActiveItem : localActiveItem;
624
+ const SSO_URL = normalizeLink.normalizeLinkSlash(routing.getCurrentSsoUrl(locale, siteType === 'marryBaby') + '/');
625
+ const BASE_URL = normalizeLink.normalizeLinkSlash(routing.getCurrentBaseUrl(locale, siteType === 'marryBaby') + '/');
626
+ const navMenuItems = navMenuItemsProp || [
627
+ [
628
+ {
629
+ key: 'userProfile.nav.header.viewProfile',
630
+ icon: React__default["default"].createElement(NavUserIcon, { width: "24", height: "24" }),
631
+ value: 'profile',
632
+ tracking: {
633
+ action: 'Profile Click',
634
+ },
635
+ link: `${SSO_URL}user/profile/`,
636
+ },
637
+ {
638
+ key: 'userProfile.nav.card.myHealth',
639
+ icon: React__default["default"].createElement(NavMyHealthIcon, { width: "24", height: "24" }),
640
+ value: 'myHealth',
641
+ tracking: {
642
+ action: 'My Health Click',
643
+ },
644
+ link: `${SSO_URL}user/health/`,
645
+ },
646
+ {
647
+ key: 'userProfile.nav.card.mySaved',
648
+ icon: React__default["default"].createElement(NavSaveIcon, { width: "24", height: "24" }),
649
+ iconColor: 'green_300',
650
+ value: 'saved',
651
+ tracking: {
652
+ action: 'Bookmarks Click',
653
+ },
654
+ link: `${SSO_URL}user/saved/`,
655
+ },
656
+ {
657
+ key: 'userProfile.nav.card.myBooking',
658
+ icon: React__default["default"].createElement(NavBookingIcon, { width: "24", height: "24" }),
659
+ value: 'booking',
660
+ disabled: !index$4.CARE_LOCALES.includes(locale),
661
+ tracking: {
662
+ action: 'Manage Booking Click',
663
+ },
664
+ link: `${SSO_URL}user/booking/`,
665
+ },
666
+ {
667
+ key: 'userProfile.nav.card.myCommunity',
668
+ icon: React__default["default"].createElement(NavCommunityIcon, { width: "24", height: "24" }),
669
+ value: 'myCommunities',
670
+ disabled: !index$4.TOGETHER_LOCALES.includes(locale),
671
+ tracking: {
672
+ action: 'Community Click',
673
+ },
674
+ link: `${SSO_URL}user/my-communities/`,
675
+ },
676
+ ],
677
+ ...(index$4.ECOM_LOCALES.includes(locale)
678
+ ? [
679
+ [
680
+ {
681
+ key: 'userProfile.nav.card.eCom',
682
+ icon: React__default["default"].createElement(NavEshopIcon, { width: "24", height: "24" }),
683
+ value: 'eCom',
684
+ disabled: !index$4.ECOM_LOCALES.includes(locale),
685
+ subMenu: [
686
+ {
687
+ key: 'userProfile.nav.card.ecom.manageOrders',
688
+ value: 'eCom-manageOrders',
689
+ icon: React__default["default"].createElement(NavDotIcon, { width: "24", height: "24" }),
690
+ link: `${BASE_URL}shop/ho-so/quan-li-don-hang/`,
691
+ tracking: {
692
+ action: 'Order Management Click',
693
+ },
694
+ },
695
+ {
696
+ key: 'userProfile.nav.card.ecom.DeliveryAddress',
697
+ value: 'eCom-manageAddress',
698
+ icon: React__default["default"].createElement(NavDotIcon, { width: "24", height: "24" }),
699
+ link: `${BASE_URL}shop/ho-so/dia-chi-giao-hang/`,
700
+ tracking: {
701
+ action: 'Address Management Click',
702
+ },
703
+ },
704
+ {
705
+ key: 'userProfile.nav.card.ecom.voucher',
706
+ value: 'eCom-voucher',
707
+ icon: React__default["default"].createElement(NavDotIcon, { width: "24", height: "24" }),
708
+ link: `${BASE_URL}shop/ho-so/khuyen-mai/`,
709
+ tracking: {
710
+ action: 'Voucher Click',
711
+ },
712
+ },
713
+ // {
714
+ // key: 'nav.card.memberCard',
715
+ // value: 'eCom-memberCard',
716
+ // icon: <NavDotIcon width="24"
717
+ // height="24"/>,
718
+ // link: routingHandler
719
+ // .getLocalisedUrl('', 'PROFILE_MEMBER_CARD')
720
+ // .toString(),
721
+ // tracking: {
722
+ // action: 'Member Card Click',
723
+ // },
724
+ // },
725
+ ],
726
+ },
727
+ ],
728
+ ]
729
+ : []),
730
+ [
731
+ {
732
+ key: 'userProfile.nav.menu.accountSettings',
733
+ icon: React__default["default"].createElement(NavSettingsIcon, { width: "24", height: "24" }),
734
+ subMenu: [
735
+ {
736
+ key: 'common.profileNavigator.newsletterSubscription',
737
+ value: 'subscription',
738
+ icon: React__default["default"].createElement(NavDotIcon, { width: "24", height: "24" }),
739
+ tracking: { action: 'Subscription Click' },
740
+ link: `${SSO_URL}user/subscriptions/`,
741
+ disabled: locale !== 'vi-VN',
742
+ },
743
+ {
744
+ key: 'userProfile.nav.menu.password',
745
+ value: 'password',
746
+ icon: React__default["default"].createElement(NavDotIcon, { width: "24", height: "24" }),
747
+ tracking: { action: 'Set Password Click' },
748
+ link: `${SSO_URL}user/password/`,
749
+ },
750
+ {
751
+ key: 'userProfile.nav.menu.disableAccount',
752
+ value: 'disable-account',
753
+ icon: React__default["default"].createElement(NavDotIcon, { width: "24", height: "24" }),
754
+ tracking: { action: 'Disable Account Click' },
755
+ link: `${SSO_URL}user/disable-account/`,
756
+ },
757
+ ],
758
+ },
759
+ ],
760
+ [
761
+ {
762
+ key: 'userProfile.nav.menu.help',
763
+ icon: React__default["default"].createElement(NavHelpIcon, { width: "24", height: "24" }),
764
+ value: 'help',
765
+ link: `${SSO_URL}user/help`,
766
+ tracking: {
767
+ action: 'Support Click',
768
+ },
769
+ },
770
+ {
771
+ key: 'userProfile.nav.menu.logout',
772
+ icon: React__default["default"].createElement(NavLogOutIcon, { width: "24", height: "24" }),
773
+ value: 'logout',
774
+ tracking: {
775
+ action: 'Sign Out Click',
776
+ },
777
+ },
778
+ ],
779
+ ];
780
+ return (React__default["default"].createElement(StyledNavMenu, { className: className, style: style },
781
+ React__default["default"].createElement(UserInfoSection, { userInfo: userInfo, siteType: siteType }),
782
+ navMenuItems.map((items, index) => (React__default["default"].createElement(React.Fragment, { key: index },
783
+ React__default["default"].createElement("div", { className: "profile-nav-item-group", key: index }, items.map((item) => (React__default["default"].createElement(NavMenuItem, { key: item.key, item: item, activeKey: activeItem || '', onLogout: onLogout, onClick: () => setLocalActiveItem((k) => k === item.key ? undefined : item.key), siteType: siteType })))),
784
+ index !== navMenuItems.length - 1 && React__default["default"].createElement("hr", null))))));
785
+ };
786
+ const NavMenuItem = ({ item, activeKey, forceOpen, onLogout, onClick, siteType = 'helloSites', }) => {
787
+ var _a, _b;
788
+ const [localOpen, setLocalOpen] = React.useState(false);
789
+ const currentUrl = React.useMemo(() => {
790
+ if (typeof window !== 'undefined') {
791
+ return window.location.href;
792
+ }
793
+ else
794
+ return '';
795
+ }, []);
796
+ if (item.disabled) {
797
+ return null;
798
+ }
799
+ const { t } = useTranslations.useTranslations();
800
+ const hasChildActive = (_a = item.subMenu) === null || _a === void 0 ? void 0 : _a.some((subItem) => subItem.key === activeKey);
801
+ const isActive = activeKey === item.key;
802
+ React.useEffect(() => {
803
+ if (hasChildActive || isActive) {
804
+ setLocalOpen(true);
805
+ }
806
+ }, [hasChildActive, isActive]);
807
+ const isOpen = typeof forceOpen === 'boolean' ? forceOpen : localOpen;
808
+ return (React__default["default"].createElement(StyledNavMenuItem, { as: !item.subMenu ? 'a' : undefined, "data-is-open": isOpen, key: item.key, hasSubmenu: !!item.subMenu, onClick: () => {
809
+ onClick === null || onClick === void 0 ? void 0 : onClick();
810
+ if (item.subMenu && !forceOpen) {
811
+ setLocalOpen((k) => !k);
812
+ }
813
+ else {
814
+ if (item.value === 'logout') {
815
+ onLogout === null || onLogout === void 0 ? void 0 : onLogout();
816
+ }
817
+ else if (item.link) {
818
+ window.location.href = item.link;
819
+ }
820
+ }
821
+ }, "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 },
822
+ React__default["default"].createElement(StyledNavMenuItemContent, { "data-active": isActive },
823
+ item.icon,
824
+ React__default["default"].createElement(index.Text, { size: "p3", style: {
825
+ marginLeft: item.icon ? 24 : 48,
826
+ transition: `color 300ms`,
827
+ }, color: isActive ? (siteType === 'helloSites' ? 'hb.6' : 'mb.6') : 'gray.8' }, t(item.key)),
828
+ item.subMenu && (React__default["default"].createElement(StyledNavMenuItemDropdown, { "data-is-open": isOpen },
829
+ React__default["default"].createElement(ChevronDown.ChevronDown, { width: 14 })))),
830
+ item.subMenu && (React__default["default"].createElement(StyledNavFooterSubMenu, null, item.subMenu.map((subItem) => (React__default["default"].createElement(NavMenuItem, { key: subItem.key, item: subItem, activeKey: activeKey, onLogout: onLogout, siteType: siteType })))))));
831
+ };
832
+
833
+ const ProfilePopup = ({ isOpen, userInfo, closePopup, siteType = 'helloSites', dispatchLogout, }) => {
834
+ const handleClickLogout = () => {
835
+ if (dispatchLogout) {
836
+ dispatchLogout();
837
+ closePopup();
838
+ }
839
+ };
840
+ return (React__default["default"].createElement(StyledPopup$1, { "data-open": isOpen },
841
+ React__default["default"].createElement("div", { className: "popup-content" },
842
+ React__default["default"].createElement(ProfileNavigation, { siteType: siteType, onLogout: handleClickLogout, userInfo: userInfo }))));
843
+ };
844
+
845
+ const StyledPopup = styled__default["default"].div `
846
+ background-color: white;
847
+ text-align: center;
848
+ .cancle-img {
849
+ margin-top: 24px;
850
+ ${utils.MediaQueries.mbDown} {
851
+ width: 80px;
852
+ height: 80px;
853
+ }
854
+
855
+ ${utils.MediaQueries.mbUp} {
856
+ width: 100px;
857
+ height: 100px;
858
+ }
859
+ }
860
+
861
+ h2 {
862
+ margin-top: 32px;
863
+ color: ${theme.theme.colors.gray800};
864
+ font-style: normal;
865
+ font-weight: bold;
866
+ ${utils.MediaQueries.mbDown} {
867
+ font-size: 24px;
868
+ line-height: 32px;
869
+ }
870
+
871
+ ${utils.MediaQueries.mbUp} {
872
+ font-size: 32px;
873
+ line-height: 42px;
874
+ }
875
+ }
876
+
877
+ p {
878
+ margin-top: 8px;
879
+ color: ${theme.theme.colors.gray600};
880
+ font-style: normal;
881
+ font-weight: normal;
882
+ ${utils.MediaQueries.mbDown} {
883
+ font-size: 16px;
884
+ line-height: 24px;
885
+ }
886
+
887
+ ${utils.MediaQueries.mbUp} {
888
+ font-size: 16px;
889
+ line-height: 24px;
890
+ }
891
+ }
892
+ `;
893
+ const StyledButtonGroup = styled__default["default"].div `
894
+ display: flex;
895
+
896
+ ${utils.MediaQueries.mbDown} {
897
+ margin-top: 24px;
898
+ }
899
+
900
+ ${utils.MediaQueries.mbUp} {
901
+ margin-top: 32px;
902
+ }
903
+ justify-content: space-around;
904
+ button {
905
+ flex: 1;
906
+ margin: 4px;
907
+ }
908
+
909
+ ${(props) => props.siteType === 'marryBaby'
910
+ ? `
911
+ .cancel-button {
912
+ background-color: #E55C8A;
913
+ }
914
+ .cancel-button:hover {
915
+ background-color: #E55C8A !important;
916
+ }
917
+ .logout-button {
918
+ border-color: #E55C8A;
919
+ color: #E55C8A;
920
+ }
921
+ `
922
+ : ''}
923
+ `;
924
+
925
+ const NavigationLogoutPopup = ({ openLogoutPopup, onCloseHandler, onLogoutHandler, siteType = 'helloSites', }) => {
926
+ const { t } = useTranslations.useTranslations();
927
+ React.useEffect(() => {
928
+ document.body.classList.toggle('noscroll', openLogoutPopup);
929
+ }, [openLogoutPopup]);
930
+ return (React__default["default"].createElement(core.Portal, null,
931
+ React__default["default"].createElement(index$5.Popup, { type: "confirm", isOpen: openLogoutPopup, closeIcon: React__default["default"].createElement("img", { src: index$1.CommonGAssets.getAssetPath('closeLight.svg'), style: { width: 24, height: 24 }, alt: "close-icon", loading: "lazy" }), onClose: onCloseHandler },
932
+ React__default["default"].createElement(StyledPopup, null,
933
+ siteType === 'helloSites' && (React__default["default"].createElement("img", { src: index$1.CommonGAssets.getAssetPath('arrowDoor.svg'), className: "cancle-img", alt: "close-account", loading: "lazy" })),
934
+ React__default["default"].createElement("h2", null, t(siteType === 'helloSites'
935
+ ? 'logout.popup.ask1'
936
+ : 'logout.popup.ask.mb')),
937
+ React__default["default"].createElement("p", null, t('logout.popup.ask2')),
938
+ React__default["default"].createElement(StyledButtonGroup, { siteType: siteType },
939
+ React__default["default"].createElement(index$6.Button, { className: "logout-button", color: "tertiary", size: "lg", onClick: onLogoutHandler }, t('logout.popup.button.logout')),
940
+ React__default["default"].createElement(index$6.Button, { className: "cancel-button", color: "primary", size: "lg", onClick: onCloseHandler }, t('logout.popup.button.cancel')))))));
941
+ };
942
+
943
+ const NavigationProfileButton = ({ userInfo, siteType, onLoginClick, SSO_URL, currentUrl, isMinifyLogin, onLogout, style, isLoading, locale, }) => {
944
+ const { t } = useTranslations.useTranslations();
945
+ const [isLogoutConfirmOpen, setIsLogoutConfirmOpen] = React.useState(false);
946
+ const name = (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.username);
947
+ const [init, setInit] = React.useState(false);
948
+ React.useEffect(() => {
949
+ setInit(true);
950
+ }, []);
951
+ const { containerRef, onContainerFocus, onContainerBlur, onButtonMouseDown, onClose, } = useCSSFocusPopupHelper();
952
+ if (isLoading)
953
+ return React__default["default"].createElement(index$2.Button, { size: "sm", color: "transparent", loading: true });
954
+ return (userInfo === null || userInfo === void 0 ? void 0 : userInfo.id) ? (React__default["default"].createElement(React__default["default"].Fragment, null,
955
+ React__default["default"].createElement(StyledImageWrapper$1, { ref: containerRef, style: style, tabIndex: 0, onBlur: onContainerBlur, onFocus: () => {
956
+ var _a;
957
+ onContainerFocus();
958
+ const popup = (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.querySelector('#desktop-sticky-header .hhgcomp-navprofilebutton-popup');
959
+ if (popup) {
960
+ const bound = popup.getBoundingClientRect();
961
+ const top = bound.top;
962
+ const maxHeight = `calc(100vh - ${top}px)`;
963
+ popup.setAttribute('style', `max-height: ${maxHeight};`);
964
+ }
965
+ } },
966
+ React__default["default"].createElement("div", { onMouseDown: onButtonMouseDown },
967
+ React__default["default"].createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", className: "user-close-icon" },
968
+ React__default["default"].createElement("path", { d: "M18 6L6 18M18 18L6 6", stroke: "#3E3F58", strokeWidth: "1.3", strokeLinecap: "round" })),
969
+ React__default["default"].createElement(index$2.Avatar, { size: 40, className: "user-avatar", src: userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar, color: siteType === 'marryBaby'
970
+ ? theme.theme.mbColors.pink
971
+ : theme.theme.colors.secondaryBase, placeholderText: name && name.length ? name[0].toUpperCase() : 'A' })),
972
+ React__default["default"].createElement(ProfilePopup, { dispatchLogout: () => {
973
+ onClose();
974
+ setIsLogoutConfirmOpen(true);
975
+ }, isOpen: false, closePopup: onClose, siteType: siteType, userInfo: userInfo })),
976
+ React__default["default"].createElement(NavigationLogoutPopup, { openLogoutPopup: isLogoutConfirmOpen, onCloseHandler: () => {
977
+ document.body.classList.toggle('noscroll', false);
978
+ setIsLogoutConfirmOpen(false);
979
+ }, siteType: siteType, onLogoutHandler: () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
980
+ setIsLogoutConfirmOpen(false);
981
+ document.body.classList.toggle('noscroll', false);
982
+ yield onLogout();
983
+ }) }))) : (React__default["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
984
+ ? normalizeLink.normalizeLinkSlash(`${SSO_URL}?returnUrl=${currentUrl}`)
985
+ : undefined, "data-site-type": siteType }, isMinifyLogin ? (React__default["default"].createElement(StyledAvatar, { onClick: onLoginClick },
986
+ React__default["default"].createElement("img", { src: index$1.CommonGAssets.getAssetPath('lock.png'), className: "avatar", loading: "lazy", alt: "avatar" }))) : (
987
+ // LOGIC:
988
+ // - DEsktop: always show button
989
+ // - Mobile: show button only for helloSites, show text for MarryBaby
990
+ React__default["default"].createElement(React__default["default"].Fragment, null,
991
+ siteType === 'helloSites' &&
992
+ (locale === Subot.LOCALE.Indonesia ||
993
+ locale === Subot.LOCALE.PhilippinesTagalog ||
994
+ locale === Subot.LOCALE.PhilippinesEnglish ? (React__default["default"].createElement("img", { className: "mobile-only", src: index$1.CommonGAssets.getAssetPath('login.svg'), style: {
995
+ cursor: 'pointer',
996
+ height: 24,
997
+ width: 24,
998
+ }, onClick: onLoginClick })) : (React__default["default"].createElement(index$2.Button, { className: "mobile-only", size: "sm", onClick: onLoginClick, leftIcon: React__default["default"].createElement(core$1.User, { color: "currentColor", isSolid: true, size: 22 }), sx: {
999
+ paddingLeft: '8px',
1000
+ paddingRight: '12px',
1001
+ } }, t('navigation.loginJoin')))),
1002
+ siteType === 'marryBaby' && (React__default["default"].createElement("div", { className: "mobile-only", onClick: onLoginClick, style: {
1003
+ paddingLeft: 16,
1004
+ } },
1005
+ React__default["default"].createElement(index.Text, { size: "p3", color: theme.theme.mbColors.pink }, t('navigation.loginJoin')))),
1006
+ React__default["default"].createElement(index$2.Button, { className: "login-btn", size: "md", onClick: onLoginClick, leftIcon: React__default["default"].createElement(core$1.User, { color: "currentColor", isSolid: true, size: 22 }) }, t('navigation.loginJoin'))))));
1007
+ };
1008
+
1009
+ var styles$3 = {"bookingButton":"spdlGfq","bookingButtonAnchor":"vgS16jX"};
1010
+
1011
+ const BookingButton = ({ onCareHeaderClick, currentUrl, careUrlFe, btnName, }) => {
1012
+ return onCareHeaderClick ? (React__default["default"].createElement(index$6.Button, { className: styles$3.bookingButton, size: "md", color: "primary", dataEventCategory: "Care", dataEventAction: "Navigation Bar Click", dataEventLabel: currentUrl, onClick: (e) => onCareHeaderClick(e), style: {
1013
+ paddingLeft: 10,
1014
+ paddingRight: 10,
1015
+ } }, btnName)) : (React__default["default"].createElement("a", { href: careUrlFe, className: `${styles$3.bookingButtonAnchor} care-button no-replace-click` },
1016
+ React__default["default"].createElement(index$6.Button, { className: styles$3.bookingButton, size: "md", color: "primary", dataEventCategory: "Care", dataEventAction: "Navigation Bar Click", dataEventLabel: currentUrl }, btnName)));
1017
+ };
1018
+
1019
+ var styles$2 = {"menuContainer":"y5VJdvw","menuIcon":"oVhOSCy","menuIconWrapper":"pX8OXTM"};
1020
+
1021
+ const useNavConfig = ({ locale, projectType, siteType, enableBookingBtn, }) => {
1022
+ const config = React.useMemo(() => {
1023
+ const enableSearchBar = projectType === 'discover' ||
1024
+ projectType === 'marryBaby' ||
1025
+ (projectType === 'profile' && siteType === 'marryBaby');
1026
+ const enableNavCare = siteType !== 'marryBaby' &&
1027
+ projectType !== 'marryBaby' &&
1028
+ index$4.CARE_LOCALES.includes(locale);
1029
+ const enableNavCareBooking = enableBookingBtn &&
1030
+ projectType !== 'marryBaby' &&
1031
+ projectType === 'discover' &&
1032
+ siteType !== 'marryBaby' &&
1033
+ index$4.CARE_BOOKING_LOCALES.includes(locale);
1034
+ const enableNavTogether = projectType === 'marryBaby' || index$4.TOGETHER_LOCALES.includes(locale);
1035
+ const enableNavDiscover = true;
1036
+ const enableNavHealthTools = true;
1037
+ const enableProfileMySaved = true;
1038
+ const enableNavEcom = siteType !== 'marryBaby' && index$4.ECOM_LOCALES.includes(locale);
1039
+ const enableProfileEcom = siteType !== 'marryBaby' && index$4.ECOM_LOCALES.includes(locale);
1040
+ const enableProfileMyHealth = true;
1041
+ const baseUrl = routing.getCurrentBaseUrl(locale, siteType === 'marryBaby');
1042
+ let fixBaseUrl = baseUrl;
1043
+ if (typeof window !== 'undefined') {
1044
+ if (fixBaseUrl.includes('//id.'))
1045
+ fixBaseUrl = fixBaseUrl.replace('id.', '');
1046
+ if (fixBaseUrl.includes('//staging-id.'))
1047
+ fixBaseUrl = fixBaseUrl.replace('staging-id.', 'discover.');
1048
+ }
1049
+ const ssoUrl = routing.getCurrentSsoUrl(locale, siteType === 'marryBaby');
1050
+ const statics = (() => {
1051
+ return {
1052
+ HOME_PAGE_URL: fixBaseUrl,
1053
+ CARE_URL_FE: `${fixBaseUrl}/care`,
1054
+ TOGETHER_URL_FE: `${fixBaseUrl}/community`,
1055
+ SSO_URL: ssoUrl,
1056
+ TOGETHER_API: routing.getTogetherApiDomain(),
1057
+ DISCOVER_API: routing.getDiscoverApiDomain(locale),
1058
+ };
1059
+ })();
1060
+ return {
1061
+ enableSearchBar,
1062
+ enableNavCare,
1063
+ enableNavCareBooking,
1064
+ enableNavTogether,
1065
+ enableNavEcom,
1066
+ enableProfileEcom,
1067
+ enableProfileMyHealth,
1068
+ enableNavDiscover,
1069
+ enableNavHealthTools,
1070
+ enableProfileMySaved,
1071
+ statics,
1072
+ };
1073
+ }, [locale, projectType]);
1074
+ return config;
1075
+ };
1076
+
1077
+ const NavigationContext = React__default["default"].createContext({});
1078
+ const NavigationProvider = (_a) => {
1079
+ var { children } = _a, props = tslib_es6.__rest(_a, ["children"]);
1080
+ const [currentUrl, setCurrentUrl] = React__default["default"].useState(() => {
1081
+ return (props.currentUrl ||
1082
+ `https://${props.siteType === 'marryBaby'
1083
+ ? utils$1.domainLocalesMarryBaby[props.locale || 'en-PH']
1084
+ : index$4.domainLocales[props.locale || 'en-PH']}${props.projectType === 'together'
1085
+ ? '/community'
1086
+ : props.projectType === 'ecom'
1087
+ ? '/ecom'
1088
+ : props.projectType === 'care'
1089
+ ? '/care'
1090
+ : ''}/`);
1091
+ });
1092
+ React.useEffect(() => {
1093
+ const update = () => {
1094
+ setCurrentUrl(window.location.href);
1095
+ };
1096
+ window.addEventListener('popstate', update);
1097
+ update();
1098
+ return () => {
1099
+ window.removeEventListener('popstate', update);
1100
+ };
1101
+ }, []);
1102
+ const configs = useNavConfig({
1103
+ locale: props.locale,
1104
+ projectType: props.projectType,
1105
+ siteType: props.siteType,
1106
+ enableBookingBtn: props.enableBookingBtn,
1107
+ });
1108
+ return (React__default["default"].createElement(NavigationContext.Provider, { value: Object.assign(Object.assign({}, props), { configs: Object.assign(Object.assign({}, configs), props.configs), currentUrl: props.currentUrl || currentUrl }) }, children));
1109
+ };
1110
+
1111
+ function ClosePopupIcon({ className }) {
1112
+ return (React__default["default"].createElement("div", null,
1113
+ React__default["default"].createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", className: className },
1114
+ React__default["default"].createElement("path", { d: "M18 6L6 18M18 18L6 6", stroke: "#3E3F58", strokeWidth: "1.3", strokeLinecap: "round" }))));
1115
+ }
1116
+
1117
+ function HamburgerIcon({ siteType, enableSearch, className }) {
1118
+ if (siteType === 'helloSites') {
1119
+ return (React__default["default"].createElement("div", null,
1120
+ React__default["default"].createElement("img", { "data-list-type": "Header", "data-content-type": "Navigation", "data-content-topic": "Hamburger", src: enableSearch
1121
+ ? index$1.CommonGAssets.getAssetPath('hamburgerMenuNewWithSearch.svg')
1122
+ : index$1.CommonGAssets.getAssetPath('hamburgerMenuNew.svg'), style: { width: '24px', height: '24px' }, alt: "home", className: className, loading: "lazy" })));
1123
+ }
1124
+ /** Marry Baby */
1125
+ return (React__default["default"].createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", className: className },
1126
+ React__default["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" })));
1127
+ }
1128
+
1129
+ // import { StyledMenuPopupWrapperClass } from '../../atoms/PopupWrapper/index.styled'
1130
+ const StyledMasterMenuContainer = styled__default["default"].div `
1131
+ position: fixed;
1132
+ z-index: 201;
1133
+ top: calc(100% + 1px);
1134
+ width: 100%;
1135
+ height: calc(100vh - var(--header-bottom));
1136
+ overflow-x: hidden;
1137
+ overflow-y: auto;
1138
+ background: white;
1139
+ display: flex;
1140
+ flex-direction: column;
1141
+ padding-bottom: 0;
1142
+ left: 0;
1143
+ .hhgcomp-navigation-popupwrapper-menuwrapper {
1144
+ position: unset;
1145
+ }
1146
+ `;
1147
+ // Desktop
1148
+ // export const StyledMenuPopupWrapper = styled.div`
1149
+ // position: fixed;
1150
+ // z-index: ${Z_INDEX.menuCategoryPopupWrapper};
1151
+ // top: 69px;
1152
+ // left: 0;
1153
+ // width: 100%;
1154
+ // height: 100%;
1155
+ // align-items: center;
1156
+ // background-color: transparent;
1157
+ // &[data-is-display='false'] {
1158
+ // display: none;
1159
+ // }
1160
+ // `
1161
+ const StyledServiceListMenuSearchInputWrapper = styled__default["default"].div `
1162
+ padding: 16px;
1163
+ padding-bottom: 12px;
1164
+ .fake-search-input {
1165
+ pointer-events: none;
1166
+ input {
1167
+ line-height: 20px;
1168
+ padding-top: 10px;
1169
+ padding-bottom: 10px;
1170
+ }
1171
+ }
1172
+ &[data-theme='marryBaby'] {
1173
+ input {
1174
+ background: ${theme.theme.mbColors.lightGray};
1175
+ border-radius: 16px;
1176
+ border: none;
1177
+ }
1178
+ }
1179
+ `;
1180
+ const StyledWrapper = styled__default["default"].div `
1181
+ display: block;
1182
+ overflow-y: auto;
1183
+ flex: 1;
1184
+ padding-bottom: 16px;
1185
+ &::-webkit-scrollbar {
1186
+ width: 0;
1187
+ display: none;
1188
+ }
1189
+ `;
1190
+
1191
+ const SearchInput = ({ id }) => {
1192
+ const { locale, configs: { statics }, siteType, } = React.useContext(NavigationContext);
1193
+ const { t } = useTranslations.useTranslations();
1194
+ return (React__default["default"].createElement(index$2.Input, { className: "fake-search-input", name: 'search-input-menu-service' + id, size: "md", placeholder: siteType === 'marryBaby'
1195
+ ? t('navigation.search.input.placeholder')
1196
+ : t('home.search', {
1197
+ site: index$4.LOCALE_SPECS[locale || 'en-PH']
1198
+ ? index$4.LOCALE_SPECS[locale || 'en-PH'].SITE_NAME
1199
+ : '',
1200
+ }), onChange: () => undefined, onKeyDown: (e) => e.key === 'Enter' &&
1201
+ (window.location.href = `${statics.HOME_PAGE_URL}/search/?s=${e.target.value}`), type: "search", onFocus: (e) => {
1202
+ e.preventDefault();
1203
+ }, icon: React__default["default"].createElement("a", { "data-event-category": "Search Button", "data-event-action": "Click" },
1204
+ React__default["default"].createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", style: {
1205
+ verticalAlign: 'bottom',
1206
+ } },
1207
+ React__default["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" }))) }));
1208
+ };
1209
+
1210
+ const StyledItemGridLeft = styled__default["default"].div `
1211
+ padding-right: 1rem;
1212
+ margin-top: 10px;
1213
+ background: #ffffff;
1214
+ padding: 5px 15px;
1215
+ ${utils.MediaQueries.mbUp} {
1216
+ border-right: 1px solid #e4e8ec;
1217
+ }
1218
+ `;
1219
+ const StyledItem$6 = styled__default["default"].a `
1220
+ padding: 10px 0;
1221
+ position: relative;
1222
+
1223
+ display: flex;
1224
+ align-items: center;
1225
+ text-decoration: none;
1226
+ color: ${theme.theme.colors.gray800};
1227
+ * {
1228
+ pointer-events: none;
1229
+ }
1230
+ p {
1231
+ font-size: 16px;
1232
+ font-weight: 400;
1233
+ padding: 0 0.4rem;
1234
+ }
1235
+
1236
+ &[data-theme='marryBaby']:hover,
1237
+ &[data-theme='marryBaby'][data-active='true'] {
1238
+ p {
1239
+ color: ${theme.theme.mbColors.pink};
1240
+ }
1241
+ .icon {
1242
+ background-color: ${theme.theme.mbColors.lightPink};
1243
+ }
1244
+ }
1245
+ &[data-theme='helloSites']:hover,
1246
+ &[data-theme='helloSites'][data-active='true'] {
1247
+ p {
1248
+ color: ${theme.theme.colors.primaryActive};
1249
+ }
1250
+ }
1251
+ a {
1252
+ }
1253
+
1254
+ &[data-theme='marryBaby'] {
1255
+ .icon {
1256
+ display: flex;
1257
+ align-items: center;
1258
+ justify-content: center;
1259
+ max-width: 40px;
1260
+ width: 100%;
1261
+ height: 40px;
1262
+ border-radius: 50%;
1263
+ background-color: ${theme.theme.mbColors.lightGray};
1264
+ img {
1265
+ border-radius: 50%;
1266
+ }
1267
+ }
1268
+ }
1269
+ `;
1270
+ const StyledHeading$1 = styled__default["default"].div `
1271
+ margin: 15px 0;
1272
+ ${utils.MediaQueries.mbDown} {
1273
+ display: none;
1274
+ }
1275
+ `;
1276
+ const StyledIconNav = styled__default["default"].div `
1277
+ display: flex;
1278
+ position: absolute;
1279
+ right: 0;
1280
+ ${utils.MediaQueries.mbUp} {
1281
+ display: none;
1282
+ }
1283
+ `;
1284
+ const StyledItemAll = styled__default["default"].div `
1285
+ display: flex;
1286
+ align-items: center;
1287
+ color: ${theme.theme.colors.primaryBase};
1288
+ font-size: ${theme.theme.sizes.fsParagraph4};
1289
+ font-weight: ${theme.theme.sizes.fwBold};
1290
+ line-height: 24px;
1291
+ font-size: 14px;
1292
+ font-weight: 600;
1293
+ &[data-event-category] * {
1294
+ pointer-events: none;
1295
+ }
1296
+ &[data-theme='marryBaby'] {
1297
+ color: ${theme.theme.mbColors.pink};
1298
+ }
1299
+ `;
1300
+ const StyledImageWrapper = styled__default["default"].div `
1301
+ display: flex;
1302
+ align-items: center;
1303
+ margin-left: 10px;
1304
+ `;
1305
+ const StyledViewMore$1 = styled__default["default"].a `
1306
+ border: 1px solid ${theme.theme.colors.primaryBase};
1307
+ &[data-theme='marryBaby'] {
1308
+ border: 1px solid ${theme.theme.mbColors.pink};
1309
+
1310
+ svg path {
1311
+ stroke: ${theme.theme.mbColors.pink};
1312
+ }
1313
+ }
1314
+ position: relative;
1315
+ display: flex;
1316
+ align-items: center;
1317
+ justify-content: center;
1318
+ padding: 6px;
1319
+ border-radius: 5px;
1320
+ margin-top: 20px;
1321
+ ${utils.MediaQueries.mbDown} {
1322
+ display: none;
1323
+ }
1324
+ `;
1325
+
1326
+ var styles$1 = {"menuIconWrapper":"wnUb-dV","menuButton":"cjbOxWe","careIconContainer":"gB4rp89","scale":"EDlp5Zf"};
1327
+
1328
+ const ItemMenu = ({ item, menu }) => {
1329
+ const { containerRef, onContainerFocus, onContainerBlur, onButtonMouseDown, onClose, } = useCSSFocusPopupHelper({
1330
+ allowBgScroll: true,
1331
+ });
1332
+ const isInit = useIsInit.useIsInit();
1333
+ if (!item.popupType && item.link) {
1334
+ return (React__default["default"].createElement(NewWrapper, { isNew: item.isNew },
1335
+ React__default["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 },
1336
+ React__default["default"].createElement("div", { "data-event-category": "Hamburger Navigation", "data-event-action": "Click", "data-event-label": item.link, className: styles$1.menuButton },
1337
+ item.id === 'care' && (React__default["default"].createElement("div", { className: styles$1.careIconContainer },
1338
+ React__default["default"].createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
1339
+ React__default["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 })))),
1340
+ item.name))));
1341
+ }
1342
+ return (React__default["default"].createElement(NewWrapper, { isNew: item.isNew },
1343
+ React__default["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 },
1344
+ React__default["default"].createElement("div", { "data-event-category": "Hamburger Navigation", "data-event-action": "Click", "data-event-label": item.link, onMouseDown: onButtonMouseDown, className: styles$1.menuButton },
1345
+ item.id === 'care' && (React__default["default"].createElement("a", { className: styles$1.careIconContainer, href: normalizeLink.normalizeLinkSlash(item.link + '/') },
1346
+ React__default["default"].createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
1347
+ React__default["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 })))),
1348
+ item.name,
1349
+ item.popupType && (React__default["default"].createElement("div", { className: styles$1.menuIconWrapper },
1350
+ React__default["default"].createElement("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none" },
1351
+ React__default["default"].createElement("path", { d: "M11.5 7.5L9 10L6.5 7.5", stroke: "#202135", strokeWidth: "1.33", strokeLinecap: "round", strokeLinejoin: "round" }))))),
1352
+ React__default["default"].isValidElement(menu)
1353
+ ? React__default["default"].cloneElement(menu, {
1354
+ onClose,
1355
+ })
1356
+ : null)));
1357
+ };
1358
+ const NewWrapper = ({ isNew, children, }) => {
1359
+ const { t } = useTranslations.useTranslations();
1360
+ if (isNew) {
1361
+ return (React__default["default"].createElement(index$7.Indicator, { color: "green", label: t('home.navigator.menuItem.new'), size: 20, styles: {
1362
+ root: {
1363
+ paddingRight: 10,
1364
+ },
1365
+ } }, children));
1366
+ }
1367
+ return React__default["default"].createElement(React__default["default"].Fragment, null, children);
1368
+ };
1369
+
1370
+ const Categories = ({ hrefViewMore, titleBtnViewMore, UrlFE, onClosePopup, menuItems, headingTitle, activeItem, }) => {
1371
+ const { siteType } = React.useContext(NavigationContext);
1372
+ return (React__default["default"].createElement(StyledItemGridLeft, null,
1373
+ React__default["default"].createElement(StyledHeading$1, null,
1374
+ React__default["default"].createElement(index$8.Heading, { tag: siteType === 'marryBaby' ? 'h5' : 'h6', as: "p", fontWeight: "semibold" }, headingTitle)), menuItems === null || menuItems === void 0 ? void 0 :
1375
+ menuItems.slice(0, 6).map((item, index) => {
1376
+ const href = (item === null || item === void 0 ? void 0 : item.link)
1377
+ ? (item === null || item === void 0 ? void 0 : item.link.startsWith('http'))
1378
+ ? item === null || item === void 0 ? void 0 : item.link
1379
+ : `${UrlFE}/${item === null || item === void 0 ? void 0 : item.link.split('/').filter(Boolean).join('/')}/`
1380
+ : '/';
1381
+ return (React__default["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) && {
1382
+ target: '_blank',
1383
+ }), { "data-theme": siteType, key: index, onClick: onClosePopup }),
1384
+ React__default["default"].createElement("div", { className: "icon" },
1385
+ React__default["default"].createElement("img", { loading: "lazy", alt: item.name, src: item.thumbnail || '/images/avatar.jpg', style: {
1386
+ width: 32,
1387
+ height: 32,
1388
+ maxWidth: 32,
1389
+ maxHeight: 32,
1390
+ overflow: 'hidden',
1391
+ } })),
1392
+ React__default["default"].createElement(NewWrapper, { isNew: item.isNew },
1393
+ React__default["default"].createElement("p", { style: { paddingRight: item.isNew ? 10 : 0 } }, item.name)),
1394
+ React__default["default"].createElement(StyledIconNav, null, React__default["default"].createElement("img", { src: index$1.CommonGAssets.getAssetPath('chevronRight.svg'), style: { width: '16px', height: '16px' }, loading: "lazy" }))));
1395
+ }),
1396
+ titleBtnViewMore && (React__default["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 },
1397
+ React__default["default"].createElement(StyledItemAll, { onClick: onClosePopup, "data-theme": siteType, "data-is-heading-category": false },
1398
+ titleBtnViewMore,
1399
+ React__default["default"].createElement(StyledImageWrapper, null,
1400
+ React__default["default"].createElement("img", { className: "svg", src: siteType === 'marryBaby'
1401
+ ? index$1.CommonGAssets.getAssetPath('chevronRightPink.svg')
1402
+ : index$1.CommonGAssets.getAssetPath('chevronRightActive.svg'), style: { width: '16px', height: '16px' }, loading: "lazy" })))))));
1403
+ };
1404
+
1405
+ const StyledContainerItems$4 = styled__default["default"].div `
1406
+ display: grid;
1407
+
1408
+ grid-template-columns: repeat(3, 1fr);
1409
+ gap: 24px;
1410
+ margin-bottom: 3.5rem;
1411
+ ${utils.MediaQueries.tdDown} {
1412
+ grid-template-columns: repeat(1, 1fr);
1413
+ }
1414
+ `;
1415
+
1416
+ const StyledImageCard$3 = styled__default["default"].div `
1417
+ height: 152px;
1418
+ position: absolute;
1419
+ top: 0;
1420
+ left: 0;
1421
+ z-index: 3;
1422
+ overflow: hidden;
1423
+ border-radius: 4px;
1424
+ padding: 16px;
1425
+ width: 100%;
1426
+
1427
+ .img-container {
1428
+ width: 100%;
1429
+ height: 100%;
1430
+ }
1431
+ img {
1432
+ width: 100%;
1433
+ height: 100%;
1434
+ display: block;
1435
+ object-fit: contain;
1436
+ }
1437
+ ${utils.MediaQueries.tdDown} {
1438
+ margin-bottom: 0;
1439
+ padding: 0;
1440
+ height: 100%;
1441
+ position: unset;
1442
+ width: 150px;
1443
+ }
1444
+ ${utils.MediaQueries.mbDown} {
1445
+ width: 80px;
1446
+ }
1447
+ `;
1448
+ const StyledImageCardInner = styled__default["default"].div `
1449
+ background-color: #ffffff;
1450
+ border-radius: 4px;
1451
+ width: 100%;
1452
+ height: 100%;
1453
+ `;
1454
+ const StyledBtnView$2 = styled__default["default"].div `
1455
+ display: flex;
1456
+ margin-top: 1rem;
1457
+ align-items: center;
1458
+ color: ${theme.theme.colors.primaryBase};
1459
+ font-weight: 400;
1460
+ font-size: 14px;
1461
+ text-decoration: none;
1462
+ ${utils.MediaQueries.tdDown} {
1463
+ display: none;
1464
+ }
1465
+ `;
1466
+ const StyledTitle$5 = styled__default["default"].p `
1467
+ font-size: 16px;
1468
+ font-weight: 600;
1469
+ line-height: 1.6;
1470
+ color: ${theme.theme.colors.gray800};
1471
+ ${utils.MediaQueries.tdDown} {
1472
+ padding: 0;
1473
+ }
1474
+ `;
1475
+ const StyledDes$2 = styled__default["default"].p `
1476
+ font-size: 14px;
1477
+ line-height: 1.6;
1478
+ font-weight: 400;
1479
+ color: ${theme.theme.colors.gray600};
1480
+ height: 40px;
1481
+ text-overflow: ellipsis;
1482
+ overflow: hidden;
1483
+ display: -webkit-box;
1484
+ -webkit-line-clamp: 2;
1485
+ -webkit-box-orient: vertical;
1486
+ margin-bottom: auto;
1487
+ ${utils.MediaQueries.tdDown} {
1488
+ height: unset;
1489
+ padding: 0;
1490
+ }
1491
+ `;
1492
+ const _StyledContentWrapper = styled__default["default"].div `
1493
+ display: flex;
1494
+ flex-direction: column;
1495
+ gap: 8px;
1496
+ flex: 1;
1497
+ z-index: 1;
1498
+ ${utils.MediaQueries.tdDown} {
1499
+ gap: 4px;
1500
+ }
1501
+ `;
1502
+ const StyledContentWrapperClass = 'hhgcomp-navigation-menucareitem-contentwrapper';
1503
+ const StyledContentWrapper$2 = index_styles.getDefaultClassWrapper(_StyledContentWrapper, StyledContentWrapperClass);
1504
+ const StyledItem$5 = styled__default["default"].a `
1505
+ text-decoration: none;
1506
+ border-radius: 4px;
1507
+ background: ${theme.theme.colors.white};
1508
+ position: relative;
1509
+ overflow: hidden;
1510
+ padding: 16px;
1511
+ display: flex;
1512
+ padding-top: 166px;
1513
+ * {
1514
+ pointer-events: none;
1515
+ }
1516
+ ${utils.MediaQueries.tdUp} {
1517
+ box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.04), 0px 0px 2px rgba(0, 0, 0, 0.06),
1518
+ 0px 0px 1px rgba(0, 0, 0, 0.04);
1519
+ gap: 30px;
1520
+ flex-direction: column;
1521
+ a {
1522
+ display: flex;
1523
+ width: 100%;
1524
+ }
1525
+ }
1526
+ ${utils.MediaQueries.tdDown} {
1527
+ padding-top: 16px;
1528
+ a {
1529
+ display: none;
1530
+ }
1531
+ grid-template-columns: 2fr 1fr;
1532
+ gap: 10px;
1533
+ display: grid;
1534
+ max-height: 110px;
1535
+ display: flex;
1536
+ flex-direction: row-reverse;
1537
+ > .${StyledContentWrapperClass} {
1538
+ flex: 1;
1539
+ }
1540
+ img {
1541
+ width: 150px;
1542
+ }
1543
+ }
1544
+ ${utils.MediaQueries.mbDown} {
1545
+ box-shadow: 0px 10px 16px rgba(0, 0, 0, 0.04),
1546
+ 0px 2px 8px rgba(0, 0, 0, 0.04), 0px 0px 1px rgba(0, 0, 0, 0.04);
1547
+ display: flex;
1548
+ flex-direction: row-reverse;
1549
+ img {
1550
+ width: 80px;
1551
+ height: 80px;
1552
+ }
1553
+ }
1554
+ ${utils.MediaQueries.tdOnly} {
1555
+ border: 1px solid ${theme.theme.colors.neutral100};
1556
+ }
1557
+ .bg-svg {
1558
+ width: 100%;
1559
+ max-width: 245px;
1560
+ height: 100%;
1561
+ top: 0;
1562
+ right: -40px;
1563
+ position: absolute;
1564
+ display: inline-block;
1565
+ }
1566
+ `;
1567
+
1568
+ const Item$4 = ({ item, index = 0 }) => {
1569
+ var _a;
1570
+ const { t } = useTranslations.useTranslations();
1571
+ const { locale, configs: { statics }, } = React.useContext(NavigationContext);
1572
+ if (!item)
1573
+ return null;
1574
+ const href = `${statics.CARE_URL_FE}/${(_a = constants$1.LOCALIZED_SLUGS[locale]) === null || _a === void 0 ? void 0 : _a.HOSPITAL}/${item.slug}-${item.id}`;
1575
+ return (React__default["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 },
1576
+ React__default["default"].createElement("img", { src: index$1.CommonGAssets.getAssetPath('navCareCardBg.svg'), alt: "", className: "bg-svg", loading: "lazy" }),
1577
+ React__default["default"].createElement(StyledImageCard$3, null,
1578
+ React__default["default"].createElement(StyledImageCardInner, null,
1579
+ React__default["default"].createElement("img", { loading: "lazy", alt: item.name, src: item.logo || '/images/avatar.jpg' }))),
1580
+ React__default["default"].createElement(StyledContentWrapper$2, null,
1581
+ React__default["default"].createElement(StyledTitle$5, null, item.name),
1582
+ React__default["default"].createElement(StyledDes$2, null, item.description),
1583
+ React__default["default"].createElement(StyledBtnView$2, null,
1584
+ t('home.seeMore'),
1585
+ React__default["default"].createElement("img", { src: index$1.CommonGAssets.getAssetPath('chevronRightActive.svg'), style: {
1586
+ width: '16px',
1587
+ height: '16px',
1588
+ marginTop: '3px',
1589
+ marginLeft: '5px',
1590
+ }, loading: "lazy" })))));
1591
+ };
1592
+
1593
+ const StyledContainerNoPosts = styled__default["default"].div `
1594
+ padding: 16px;
1595
+ border-radius: 8px;
1596
+ position: relative;
1597
+ z-index: 1;
1598
+ overflow: hidden;
1599
+ a {
1600
+ text-decoration: none;
1601
+ }
1602
+
1603
+ .bg-svg {
1604
+ height: 100%;
1605
+ position: absolute;
1606
+ top: 0;
1607
+ left: 0;
1608
+ z-index: -1;
1609
+ }
1610
+ ${utils.MediaQueries.mbDown} {
1611
+ display: block;
1612
+ .bg-svg {
1613
+ right: -24px;
1614
+ left: unset;
1615
+ top: 0;
1616
+ transform: rotateY(180deg);
1617
+ }
1618
+ }
1619
+
1620
+ ${utils.MediaQueries.mbUp} {
1621
+ display: grid;
1622
+ grid-gap: 10px;
1623
+ grid-template-columns: 1fr 3fr;
1624
+ }
1625
+ `;
1626
+ const StyledDescription = styled__default["default"].div `
1627
+ font-weight: 400;
1628
+ font-size: 14px;
1629
+ line-height: 24px;
1630
+ color: ${theme.theme.colors.gray600};
1631
+ margin-bottom: 15px;
1632
+ `;
1633
+ const StyledTitle$4 = styled__default["default"].div `
1634
+ font-weight: 600;
1635
+ font-size: 16px;
1636
+ line-height: 26px;
1637
+ color: #000000;
1638
+ margin-bottom: 4px;
1639
+ `;
1640
+ const StyledContentLeft = styled__default["default"].div `
1641
+ background: #fff;
1642
+ padding: 5px;
1643
+ display: flex;
1644
+ align-items: center;
1645
+ justify-content: center;
1646
+ border-radius: 50px;
1647
+ `;
1648
+ const StyledLeft = styled__default["default"].div `
1649
+ display: flex;
1650
+ justify-content: center;
1651
+ align-items: center;
1652
+ position: relative;
1653
+ ${utils.MediaQueries.mbDown} {
1654
+ justify-content: end;
1655
+ min-height: 100px;
1656
+ }
1657
+ `;
1658
+
1659
+ const SpotlightNoData = ({ title, link, description, cta, icon }) => {
1660
+ const { siteType } = React.useContext(NavigationContext);
1661
+ return (React__default["default"].createElement(StyledContainerNoPosts, { "data-theme": siteType },
1662
+ React__default["default"].createElement(StyledLeft, null,
1663
+ React__default["default"].createElement("img", { src: siteType === 'marryBaby'
1664
+ ? index$1.CommonGAssets.getAssetPath('navMBSpotlightBgNoData.svg')
1665
+ : index$1.CommonGAssets.getAssetPath('navSpotlightBgNoData.svg'), alt: "", loading: "lazy", className: "bg-svg" }),
1666
+ React__default["default"].createElement(StyledContentLeft, null, icon && React__default["default"].createElement("img", { src: icon, width: 64, height: 64, loading: "lazy" }))),
1667
+ React__default["default"].createElement("div", null,
1668
+ title && React__default["default"].createElement(StyledTitle$4, null, title),
1669
+ description && React__default["default"].createElement(StyledDescription, null, description),
1670
+ cta && (React__default["default"].createElement("div", null,
1671
+ React__default["default"].createElement("a", { href: link },
1672
+ React__default["default"].createElement(index$6.Button, { theme: siteType, className: "survey-contact-submit", size: "md" }, cta)))))));
1673
+ };
1674
+
1675
+ const StyledItemGridRight = styled__default["default"].div `
1676
+ margin-top: 10px;
1677
+ background: #ffffff;
1678
+ padding: 5px 15px;
1679
+ position: relative;
1680
+ ${utils.MediaQueries.mbDown} {
1681
+ &:after {
1682
+ position: absolute;
1683
+ top: 0;
1684
+ left: 0;
1685
+ width: 100%;
1686
+ height: 4px;
1687
+ background-color: ${theme.theme.colors.neutral100};
1688
+ content: '';
1689
+ }
1690
+ }
1691
+ `;
1692
+ const StyledHeading = styled__default["default"].div `
1693
+ margin: 15px 0;
1694
+ display: flex;
1695
+ `;
1696
+ const StyledViewMore = styled__default["default"].a `
1697
+ padding-left: 10px;
1698
+ display: flex;
1699
+ align-items: center;
1700
+ text-decoration: none;
1701
+ font-weight: 400;
1702
+ font-size: 14px;
1703
+ color: ${theme.theme.colors.primaryBase};
1704
+ &[data-theme='marryBaby'] {
1705
+ color: ${theme.theme.mbColors.pink};
1706
+ }
1707
+ img {
1708
+ padding-left: 5px;
1709
+ }
1710
+ ${utils.MediaQueries.mbDown} {
1711
+ margin-left: auto;
1712
+ }
1713
+ `;
1714
+
1715
+ const Spotlights = ({ title, viewMore, children, link, dataEventAction = '', }) => {
1716
+ const { siteType } = React.useContext(NavigationContext);
1717
+ return (React__default["default"].createElement(StyledItemGridRight, null,
1718
+ React__default["default"].createElement(StyledHeading, null,
1719
+ React__default["default"].createElement(index$8.Heading, { tag: siteType === 'marryBaby' ? 'h5' : 'h6', as: "p", fontWeight: "semibold" }, title),
1720
+ viewMore && (React__default["default"].createElement(StyledViewMore, { "data-event-category": "Hamburger Navigation", "data-event-action": dataEventAction, "data-event-label": link, href: link, "data-theme": siteType },
1721
+ viewMore,
1722
+ React__default["default"].createElement("img", { src: siteType === 'marryBaby'
1723
+ ? index$1.CommonGAssets.getAssetPath('chevronRightPink.svg')
1724
+ : index$1.CommonGAssets.getAssetPath('chevronRightActive.svg'), style: { width: '16px', height: '16px' }, loading: "lazy" })))),
1725
+ children));
1726
+ };
1727
+
1728
+ const CareSpotlights = ({ spotlights = [], hrefViewMore }) => {
1729
+ const { t } = useTranslations.useTranslations();
1730
+ const { siteType } = React.useContext(NavigationContext);
1731
+ return (React__default["default"].createElement(Spotlights, { title: t('home.navigator.menu.spotlightHospitals') }, spotlights.length !== 0 ? (React__default["default"].createElement(React__default["default"].Fragment, null,
1732
+ React__default["default"].createElement(StyledContainerItems$4, null, spotlights === null || spotlights === void 0 ? void 0 : spotlights.slice(0, 3).map((s, index) => (React__default["default"].createElement(Item$4, { key: index, index: index, item: s })))),
1733
+ React__default["default"].createElement("div", { style: {
1734
+ position: 'absolute',
1735
+ bottom: '6px',
1736
+ right: '1rem',
1737
+ } },
1738
+ React__default["default"].createElement("a", { href: hrefViewMore },
1739
+ React__default["default"].createElement(index$6.Button, { theme: siteType, className: "survey-contact-submit", size: "md" }, t('home.navigator.menu.care.homeButton')))))) : (React__default["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: index$1.CommonGAssets.getAssetPath('community.svg') }))));
1740
+ };
1741
+
1742
+ const StyledContainerItems$3 = styled__default["default"].div `
1743
+ display: grid;
1744
+
1745
+ grid-template-columns: repeat(4, 1fr);
1746
+ gap: 24px;
1747
+ ${utils.MediaQueries.tdDown} {
1748
+ gap: 12px;
1749
+ grid-template-columns: 1fr;
1750
+ }
1751
+ `;
1752
+
1753
+ const StyledItem$4 = styled__default["default"].a `
1754
+ width: 100%;
1755
+ display: flex;
1756
+ align-items: center;
1757
+ text-decoration: none;
1758
+ * {
1759
+ pointer-events: none;
1760
+ }
1761
+ `;
1762
+ const StyledImageCard$2 = styled__default["default"].div `
1763
+ border-radius: 5px;
1764
+ display: block;
1765
+ overflow: hidden;
1766
+ padding-top: 140%;
1767
+ width: 100%;
1768
+ position: relative;
1769
+ height: 0;
1770
+ img {
1771
+ position: absolute;
1772
+ width: 100%;
1773
+ height: 100%;
1774
+ display: block;
1775
+ object-fit: cover;
1776
+ top: 0;
1777
+ left: 0;
1778
+ }
1779
+ ${utils.MediaQueries.tdDown} {
1780
+ width: 72px;
1781
+ padding-top: 100px;
1782
+ }
1783
+ `;
1784
+ const StyledTitle$3 = styled__default["default"].p `
1785
+ font-size: 16px;
1786
+ font-weight: 400;
1787
+ padding: 4px 15px;
1788
+ line-height: 1.4;
1789
+ color: ${theme.theme.colors.gray800};
1790
+ flex: 1;
1791
+ ${utils.MediaQueries.tdUp} {
1792
+ display: none;
1793
+ }
1794
+ `;
1795
+
1796
+ const Item$3 = ({ item, index = 0 }) => {
1797
+ if (!item)
1798
+ return null;
1799
+ return (React__default["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 },
1800
+ React__default["default"].createElement(StyledImageCard$2, null,
1801
+ React__default["default"].createElement("img", { loading: "lazy", alt: item.title, src: item.banner || '/images/notFound-min-small.jpg' })),
1802
+ React__default["default"].createElement(StyledTitle$3, null, item.title)));
1803
+ };
1804
+
1805
+ const CategorySpotlights = ({ spotlightsList = [], hrefViewMore }) => {
1806
+ const { t } = useTranslations.useTranslations();
1807
+ const { configs: { statics }, } = React.useContext(NavigationContext);
1808
+ return (React__default["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["default"].createElement(StyledContainerItems$3, null, spotlightsList === null || spotlightsList === void 0 ? void 0 : spotlightsList.slice(0, 4).map((spotlight, index) => (React__default["default"].createElement(Item$3, { key: index, index: index, item: {
1809
+ id: spotlight.id,
1810
+ link: statics.HOME_PAGE_URL + spotlight.permalink,
1811
+ title: spotlight.name,
1812
+ banner: spotlight.image,
1813
+ } }))))) : (React__default["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: index$1.CommonGAssets.getAssetPath('Spotlight.svg') }))));
1814
+ };
1815
+
1816
+ const StyledContainerItems$2 = styled__default["default"].div `
1817
+ display: grid;
1818
+ grid-template-columns: repeat(2, 1fr);
1819
+ grid-gap: 48px;
1820
+ ${utils.MediaQueries.tdDown} {
1821
+ grid-template-columns: 1fr;
1822
+ grid-gap: 32px;
1823
+ }
1824
+ ${utils.MediaQueries.mbDown} {
1825
+ grid-gap: 24px;
1826
+ }
1827
+ `;
1828
+
1829
+ const StyledContent$1 = styled__default["default"].div `
1830
+ padding: 5px;
1831
+ flex: 1;
1832
+ `;
1833
+ const StyledImage = styled__default["default"].img `
1834
+ width: 88px;
1835
+ height: 88px;
1836
+ border-radius: 4px;
1837
+ object-fit: cover;
1838
+ `;
1839
+ const StyledName = styled__default["default"].div `
1840
+ font-size: 12px;
1841
+ font-weight: 600;
1842
+ color: ${theme.theme.colors.gray800};
1843
+ text-decoration: none;
1844
+ &[data-theme='marryBaby'] {
1845
+ font-weight: 400;
1846
+ letter-spacing: -0.2px;
1847
+ }
1848
+ `;
1849
+ const StyledCategory = styled__default["default"].div `
1850
+ text-decoration: none;
1851
+ font-size: 12px;
1852
+ font-weight: 400;
1853
+ color: ${theme.theme.colors.primaryBase};
1854
+ &[data-theme='marryBaby'] {
1855
+ font-weight: 400;
1856
+ letter-spacing: -0.2px;
1857
+ }
1858
+ `;
1859
+ const StyledModifiedTime = styled__default["default"].div `
1860
+ font-size: 12px;
1861
+ font-weight: 400;
1862
+ color: ${theme.theme.colors.gray600};
1863
+ `;
1864
+ const StyledDot = styled__default["default"].div `
1865
+ font-size: 12px;
1866
+ font-weight: 400;
1867
+ color: ${theme.theme.colors.gray600};
1868
+ `;
1869
+ const StyledItem$3 = styled__default["default"].a `
1870
+ display: flex;
1871
+ gap: 10px;
1872
+ text-decoration: none;
1873
+ position: relative;
1874
+ &::after {
1875
+ content: '';
1876
+ display: block;
1877
+ width: 100%;
1878
+ height: 1px;
1879
+ border-top: 1px dashed ${theme.theme.colors.neutral100};
1880
+ position: absolute;
1881
+ bottom: -24px;
1882
+ ${utils.MediaQueries.tdOnly} {
1883
+ bottom: -16px;
1884
+ }
1885
+ ${utils.MediaQueries.mbDown} {
1886
+ bottom: -12px;
1887
+ }
1888
+ }
1889
+ &:last-child {
1890
+ &::after {
1891
+ display: none;
1892
+ }
1893
+ }
1894
+ ${utils.MediaQueries.tdUp} {
1895
+ &:nth-last-child(2) {
1896
+ &::after {
1897
+ display: none;
1898
+ }
1899
+ }
1900
+ }
1901
+ `;
1902
+ const StyledInfoUser = styled__default["default"].div `
1903
+ display: flex;
1904
+ gap: 10px;
1905
+ vertical-align: middle;
1906
+ align-items: center;
1907
+ `;
1908
+ const StyledTitle$2 = styled__default["default"].div `
1909
+ margin-top: 8px;
1910
+ font-size: 16px;
1911
+ font-weight: 600;
1912
+ color: ${theme.theme.colors.gray800};
1913
+ &[data-theme='marryBaby'] {
1914
+ margin-top: 12px;
1915
+ font-weight: 400;
1916
+ font-size: 14px;
1917
+ line-height: 24px;
1918
+ letter-spacing: -0.2px;
1919
+ }
1920
+ `;
1921
+ const StyledInfo = styled__default["default"].div `
1922
+ display: flex;
1923
+ flex-wrap: wrap;
1924
+ align-items: center;
1925
+ column-gap: 5px;
1926
+ `;
1927
+ const StyledWrapInfo = styled__default["default"].div `
1928
+ display: flex;
1929
+ gap: 4px;
1930
+ flex-direction: column;
1931
+ `;
1932
+
1933
+ dayjs__default["default"].extend(relativeTime__default["default"]);
1934
+ const Item$2 = ({ post, index = 0 }) => {
1935
+ var _a, _b, _c, _d, _e, _f, _g;
1936
+ const { siteType, configs: { statics }, } = React.useContext(NavigationContext);
1937
+ if (!post)
1938
+ return null;
1939
+ const communityUrl = [statics.TOGETHER_URL_FE, (_a = post.community) === null || _a === void 0 ? void 0 : _a.slug].join('/');
1940
+ const postUrl = [communityUrl, post.slug].join('/');
1941
+ const time = post.createdAt;
1942
+ const cleanedTimeDate = time
1943
+ ? !isNaN(new Date(time).getTime())
1944
+ ? new Date(time)
1945
+ : null
1946
+ : null;
1947
+ const timeText = cleanedTimeDate ? dayjs__default["default"](cleanedTimeDate).toNow(true) : time;
1948
+ return (React__default["default"].createElement(StyledItem$3, { href: postUrl, "data-event-category": "Hamburger Navigation", "data-event-action": `Together Click ${index + 1}`, "data-event-label": postUrl },
1949
+ React__default["default"].createElement(StyledContent$1, null,
1950
+ React__default["default"].createElement(StyledInfoUser, null,
1951
+ React__default["default"].createElement(index$5.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) }),
1952
+ React__default["default"].createElement(StyledWrapInfo, null,
1953
+ React__default["default"].createElement(StyledName, { "data-theme": siteType }, (_e = post.author) === null || _e === void 0 ? void 0 : _e.name),
1954
+ React__default["default"].createElement(StyledInfo, null,
1955
+ React__default["default"].createElement(StyledCategory, { "data-event-category": "Hamburger Navigation", "data-event-action": `Topic Click ${index + 1}`, "data-event-label": communityUrl, onClick: (e) => {
1956
+ e.preventDefault();
1957
+ location.href = communityUrl;
1958
+ }, "data-theme": siteType }, (_f = post.community) === null || _f === void 0 ? void 0 : _f.name),
1959
+ React__default["default"].createElement(StyledDot, null, "\u2022"),
1960
+ React__default["default"].createElement(StyledModifiedTime, { "data-theme": siteType }, timeText)))),
1961
+ React__default["default"].createElement(StyledTitle$2, null, post.title)),
1962
+ !!((_g = post.photos) === null || _g === void 0 ? void 0 : _g.length) && (React__default["default"].createElement(StyledImage, { loading: "lazy", src: post.photos[0] }))));
1963
+ };
1964
+
1965
+ const CommunitySpotlights = ({ spotlights = [] }) => {
1966
+ const { configs: { statics }, } = React.useContext(NavigationContext);
1967
+ const { t } = useTranslations.useTranslations();
1968
+ return (React__default["default"].createElement(Spotlights, { title: t('home.navigator.menu.trendingPosts'), viewMore: t('home.navigator.menu.trendingPosts.seeMore'), link: normalizeLink.normalizeLink(statics.TOGETHER_URL_FE), dataEventAction: "Together See More Click" }, spotlights.length !== 0 ? (React__default["default"].createElement(StyledContainerItems$2, null, spotlights === null || spotlights === void 0 ? void 0 : spotlights.slice(0, 4).map((p, index) => (React__default["default"].createElement(Item$2, { index: index, post: p, key: p.id }))))) : (React__default["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: index$1.CommonGAssets.getAssetPath('community.svg') }))));
1969
+ };
1970
+
1971
+ const StyledContainerItems$1 = styled__default["default"].div `
1972
+ display: grid;
1973
+
1974
+ grid-template-columns: repeat(3, 1fr);
1975
+ gap: 24px;
1976
+ margin-bottom: 3.5rem;
1977
+ ${utils.MediaQueries.tdDown} {
1978
+ grid-template-columns: repeat(1, 1fr);
1979
+ }
1980
+ `;
1981
+
1982
+ const StyledItem$2 = styled__default["default"].a `
1983
+ text-decoration: none;
1984
+ display: flex;
1985
+ align-items: center;
1986
+ `;
1987
+
1988
+ const Item$1 = ({ item, index: index$2 = 0 }) => {
1989
+ if (!item)
1990
+ return null;
1991
+ return (React__default["default"].createElement(StyledItem$2, { href: item.url, "data-event-category": "Hamburger Navigation", "data-event-action": `Care Click ${index$2 + 1}`, "data-event-label": item.url },
1992
+ React__default["default"].createElement("img", { loading: "lazy", alt: item.name, src: item.featuredImage || '/images/avatar.jpg', style: {
1993
+ width: '40px',
1994
+ height: '40px',
1995
+ } }),
1996
+ React__default["default"].createElement(index.Text, { size: "p2", weight: "regular", style: {
1997
+ marginLeft: 16,
1998
+ } }, item.name),
1999
+ React__default["default"].createElement("img", { src: index$1.CommonGAssets.getAssetPath('chevronRightActive.svg'), style: {
2000
+ width: '20px',
2001
+ height: '20px',
2002
+ marginLeft: 'auto',
2003
+ }, loading: "lazy" })));
2004
+ };
2005
+
2006
+ const EcomSpotlights = ({ helpfulUrls = [], }) => {
2007
+ const { t } = useTranslations.useTranslations();
2008
+ // const { siteType } = useContext(NavigationContext)
2009
+ if (!helpfulUrls.length)
2010
+ return null;
2011
+ return (React__default["default"].createElement(Spotlights, { title: t('home.navigator.menu.spotlightEcom') }, helpfulUrls.length !== 0 ? (React__default["default"].createElement(StyledContainerItems$1, null, helpfulUrls === null || helpfulUrls === void 0 ? void 0 : helpfulUrls.slice(0, 5).map((s, index) => (React__default["default"].createElement(Item$1, { key: index, index: index, item: s }))))) : (React__default["default"].createElement(React__default["default"].Fragment, null)
2012
+ // <SpotlightNoData
2013
+ // title={t('home.navigator.menu.ecom.noDatas.title')}
2014
+ // description={t('home.navigator.menu.ecom.noDatas.description')}
2015
+ // link={hrefViewMore}
2016
+ // cta={t('home.navigator.menu.ecom.homeButton')}
2017
+ // icon={CommonGAssets.getAssetPath('ecom.svg')}
2018
+ // />
2019
+ )));
2020
+ };
2021
+
2022
+ const StyledContainerItems = styled__default["default"].div `
2023
+ display: grid;
2024
+
2025
+ grid-template-columns: repeat(3, 1fr);
2026
+ gap: 24px;
2027
+ ${utils.MediaQueries.tdDown} {
2028
+ grid-template-columns: 1fr;
2029
+ gap: 12px;
2030
+ }
2031
+ `;
2032
+
2033
+ const StyledItem$1 = styled__default["default"].a `
2034
+ text-decoration: none;
2035
+ border-radius: 4px;
2036
+ background: ${theme.theme.colors.primary50};
2037
+ position: relative;
2038
+ overflow: hidden;
2039
+ display: flex;
2040
+ * {
2041
+ pointer-events: none;
2042
+ }
2043
+ .bg-svg {
2044
+ width: 245px;
2045
+ top: 0;
2046
+ right: 0;
2047
+ height: 100%;
2048
+ position: absolute;
2049
+ ${utils.MediaQueries.tdDown} {
2050
+ top: calc(51% - 68px);
2051
+ right: -8px;
2052
+ }
2053
+ }
2054
+ padding: 180px 24px 16px;
2055
+ a {
2056
+ display: flex;
2057
+ width: 100%;
2058
+ }
2059
+ ${utils.MediaQueries.tdDown} {
2060
+ padding-top: 16px;
2061
+ display: flex;
2062
+ align-items: center;
2063
+ }
2064
+ `;
2065
+ const StyledImageCard$1 = styled__default["default"].div `
2066
+ width: 64px;
2067
+ height: 64px;
2068
+ background: white;
2069
+ position: absolute;
2070
+ right: 25px;
2071
+ top: 35px;
2072
+ z-index: 3;
2073
+ border-radius: 50%;
2074
+ img {
2075
+ position: absolute;
2076
+ width: 64px;
2077
+ height: 64px;
2078
+ top: 50%;
2079
+ left: 50%;
2080
+ display: block;
2081
+ transform: translate(-50%, -50%);
2082
+ }
2083
+ ${utils.MediaQueries.tdDown} {
2084
+ position: relative;
2085
+ top: unset;
2086
+ right: unset;
2087
+ }
2088
+ `;
2089
+ const StyledBtnView$1 = styled__default["default"].div `
2090
+ display: flex;
2091
+ align-items: center;
2092
+ color: ${theme.theme.colors.primaryBase};
2093
+ font-weight: 400;
2094
+ font-size: 14px;
2095
+ text-decoration: none;
2096
+ `;
2097
+ const StyledTitle$1 = styled__default["default"].p `
2098
+ font-size: 16px;
2099
+ font-weight: 600;
2100
+ line-height: 1.4;
2101
+ color: ${theme.theme.colors.gray800};
2102
+ `;
2103
+ const StyledDes$1 = styled__default["default"].p `
2104
+ font-size: 14px;
2105
+ line-height: 1.4;
2106
+ font-weight: 400;
2107
+ color: ${theme.theme.colors.gray600};
2108
+ height: 40px;
2109
+ text-overflow: ellipsis;
2110
+ overflow: hidden;
2111
+ display: -webkit-box;
2112
+ -webkit-line-clamp: 2;
2113
+ -webkit-box-orient: vertical;
2114
+ margin-bottom: auto;
2115
+ ${utils.MediaQueries.tdDown} {
2116
+ display: none;
2117
+ }
2118
+ `;
2119
+ const StyledContentWrapper$1 = styled__default["default"].div `
2120
+ display: flex;
2121
+ flex-direction: column;
2122
+ flex: 1;
2123
+ z-index: 1;
2124
+ ${utils.MediaQueries.tdUp} {
2125
+ gap: 8px;
2126
+ }
2127
+ ${utils.MediaQueries.tdDown} {
2128
+ gap: 4px;
2129
+ flex: 1;
2130
+ }
2131
+ `;
2132
+
2133
+ const Item = ({ item, index = 0 }) => {
2134
+ const { t } = useTranslations.useTranslations();
2135
+ const { configs: { statics }, } = React.useContext(NavigationContext);
2136
+ if (!item)
2137
+ return null;
2138
+ const link = item.link
2139
+ ? item.link.startsWith('http')
2140
+ ? item.link
2141
+ : `${statics.HOME_PAGE_URL}${item.link}`
2142
+ : undefined;
2143
+ return (React__default["default"].createElement(StyledItem$1, { href: link, "data-event-category": "Hamburger Navigation", "data-event-action": `Engage Click ${index + 1}`, "data-event-label": link },
2144
+ React__default["default"].createElement("img", { src: index$1.CommonGAssets.getAssetPath('navToolCardBg.svg'), alt: "", loading: "lazy", className: "bg-svg" }),
2145
+ React__default["default"].createElement(StyledContentWrapper$1, null,
2146
+ React__default["default"].createElement(StyledTitle$1, null, item.title),
2147
+ React__default["default"].createElement(StyledDes$1, null, item.subtitle),
2148
+ React__default["default"].createElement(StyledBtnView$1, null,
2149
+ t('home.seeMore'),
2150
+ React__default["default"].createElement("img", { src: index$1.CommonGAssets.getAssetPath('chevronRightActive.svg'), style: {
2151
+ width: '16px',
2152
+ height: '16px',
2153
+ marginTop: '3px',
2154
+ marginLeft: '5px',
2155
+ }, loading: "lazy" }))),
2156
+ React__default["default"].createElement(StyledImageCard$1, null,
2157
+ React__default["default"].createElement("img", { loading: "lazy", alt: item.title, src: item.icon || '/images/avatar.jpg' }))));
2158
+ };
2159
+
2160
+ const StyledItem = styled__default["default"].a `
2161
+ text-decoration: none;
2162
+ border-radius: 12px;
2163
+
2164
+ position: relative;
2165
+ overflow: hidden;
2166
+ display: flex;
2167
+ * {
2168
+ pointer-events: none;
2169
+ }
2170
+ .bg-svg {
2171
+ top: 0;
2172
+ left: 0;
2173
+ position: absolute;
2174
+ }
2175
+
2176
+ .dot-svg {
2177
+ width: 40px;
2178
+ height: 30px;
2179
+ top: 36px;
2180
+ left: 16px;
2181
+ position: absolute;
2182
+ stroke-width: 0;
2183
+ }
2184
+
2185
+ &[data-color='pink'] {
2186
+ background: ${theme.theme.mbColors.tonePink};
2187
+ .bg-svg {
2188
+ fill: ${theme.theme.mbColors.peach};
2189
+ }
2190
+ }
2191
+ &[data-color='orange'] {
2192
+ background: ${theme.theme.mbColors.toneYellow};
2193
+ .bg-svg {
2194
+ fill: ${theme.theme.mbColors.orange};
2195
+ }
2196
+ }
2197
+ &[data-color='green'] {
2198
+ background: ${theme.theme.mbColors.toneGreen};
2199
+ .bg-svg {
2200
+ fill: ${theme.theme.mbColors.mint};
2201
+ }
2202
+ }
2203
+
2204
+ padding: 180px 24px 16px;
2205
+ a {
2206
+ display: flex;
2207
+ width: 100%;
2208
+ }
2209
+ ${utils.MediaQueries.tdDown} {
2210
+ padding-top: 16px;
2211
+ display: flex;
2212
+ align-items: flex-start;
2213
+ justify-content: flex-start;
2214
+ }
2215
+ ${utils.MediaQueries.mbDown} {
2216
+ padding-top: 0;
2217
+ padding-left: 80px;
2218
+ height: 96px;
2219
+ align-items: flex-start;
2220
+ justify-content: center;
2221
+ flex-direction: column;
2222
+ .dot-svg {
2223
+ top: 22px;
2224
+ left: 16px;
2225
+ }
2226
+ }
2227
+ ${utils.MediaQueries.tdUp} {
2228
+ min-height: 296px;
2229
+ }
2230
+ .mobile-only {
2231
+ ${utils.MediaQueries.tdUp} {
2232
+ display: none;
2233
+ }
2234
+ }
2235
+ .desktop-only {
2236
+ ${utils.MediaQueries.tdDown} {
2237
+ display: none;
2238
+ }
2239
+ }
2240
+ `;
2241
+ const StyledImageCard = styled__default["default"].div `
2242
+ width: 48px;
2243
+ height: 48px;
2244
+ background: white;
2245
+ position: absolute;
2246
+ right: 25px;
2247
+ top: 35px;
2248
+ z-index: 3;
2249
+ border-radius: 50%;
2250
+ img {
2251
+ position: absolute;
2252
+ width: 36px;
2253
+ height: 36px;
2254
+ top: 50%;
2255
+ left: 50%;
2256
+ display: block;
2257
+ transform: translate(-50%, -50%);
2258
+ }
2259
+ ${utils.MediaQueries.tdDown} {
2260
+ position: relative;
2261
+ top: unset;
2262
+ right: unset;
2263
+ }
2264
+ ${utils.MediaQueries.mbDown} {
2265
+ position: absolute;
2266
+ left: 32px;
2267
+ top: 28px;
2268
+ }
2269
+ `;
2270
+ const StyledBtnView = styled__default["default"].div `
2271
+ display: flex;
2272
+ align-items: center;
2273
+ background: white;
2274
+ font-weight: 400;
2275
+ font-size: 14px;
2276
+ text-decoration: none;
2277
+ border-radius: 50%;
2278
+ width: 20px;
2279
+ height: 20px;
2280
+
2281
+ svg path {
2282
+ fill: ${theme.theme.mbColors.gray};
2283
+ }
2284
+
2285
+ ${utils.MediaQueries.tdDown} {
2286
+ background: none;
2287
+ width: 100%;
2288
+ font-weight: 400;
2289
+ font-size: 12px;
2290
+ line-height: 18px;
2291
+ color: ${theme.theme.mbColors.pink};
2292
+ padding-left: 16px;
2293
+ }
2294
+ `;
2295
+ const StyledTitle = styled__default["default"].p `
2296
+ font-weight: 600;
2297
+ font-size: 14px;
2298
+ line-height: 24px;
2299
+ letter-spacing: -0.2px;
2300
+ color: ${theme.theme.colors.gray800};
2301
+ `;
2302
+ const StyledDes = styled__default["default"].p `
2303
+ font-weight: 400;
2304
+ font-size: 12px;
2305
+ line-height: 18px;
2306
+ letter-spacing: -0.2px;
2307
+ color: ${theme.theme.colors.gray600};
2308
+ height: 54px;
2309
+ text-overflow: ellipsis;
2310
+ overflow: hidden;
2311
+ display: -webkit-box;
2312
+ -webkit-line-clamp: 3;
2313
+ -webkit-box-orient: vertical;
2314
+ margin-bottom: auto;
2315
+ ${utils.MediaQueries.tdDown} {
2316
+ display: none;
2317
+ }
2318
+ `;
2319
+ const StyledContentWrapper = styled__default["default"].div `
2320
+ display: flex;
2321
+ flex: 1;
2322
+ z-index: 1;
2323
+ align-items: flex-end;
2324
+ justify-content: flex-end;
2325
+ ${utils.MediaQueries.tdUp} {
2326
+ gap: 8px;
2327
+ flex-direction: row;
2328
+ }
2329
+
2330
+ ${utils.MediaQueries.tdDown} {
2331
+ align-items: flex-start;
2332
+ justify-content: flex-start;
2333
+ gap: 4px;
2334
+ }
2335
+ `;
2336
+ const StyledContent = styled__default["default"].div `
2337
+ display: flex;
2338
+ flex-direction: column;
2339
+ flex: 1;
2340
+ z-index: 1;
2341
+ ${utils.MediaQueries.tdUp} {
2342
+ gap: 8px;
2343
+ }
2344
+ ${utils.MediaQueries.tdDown} {
2345
+ gap: 4px;
2346
+ flex: 1;
2347
+ padding-left: 16px;
2348
+ }
2349
+ `;
2350
+ const StyledWrapName = styled__default["default"].div `
2351
+ display: flex;
2352
+ flex-direction: row;
2353
+ flex: 1;
2354
+ z-index: 1;
2355
+ ${utils.MediaQueries.tdUp} {
2356
+ gap: 8px;
2357
+ justify-content: flex-end;
2358
+ align-items: flex-end;
2359
+ }
2360
+ ${utils.MediaQueries.tdDown} {
2361
+ flex-direction: column;
2362
+ justify-content: flex-start;
2363
+ align-items: flex-start;
2364
+ }
2365
+ `;
2366
+
2367
+ const ItemMarryBaby = ({ item, index = 0, color }) => {
2368
+ const { t } = useTranslations.useTranslations();
2369
+ const { configs: { statics }, } = React.useContext(NavigationContext);
2370
+ if (!item)
2371
+ return null;
2372
+ const link = item.link
2373
+ ? item.link.startsWith('http')
2374
+ ? item.link
2375
+ : `${statics.HOME_PAGE_URL}${item.link}`
2376
+ : undefined;
2377
+ const renderIcon = () => (React__default["default"].createElement(StyledImageCard, null,
2378
+ React__default["default"].createElement("img", { loading: "lazy", alt: item.title, src: item.icon || '/images/avatar.jpg' })));
2379
+ const renderName = () => (React__default["default"].createElement(StyledWrapName, null,
2380
+ React__default["default"].createElement(StyledContent, null,
2381
+ React__default["default"].createElement(StyledTitle, null, item.title),
2382
+ React__default["default"].createElement(StyledDes, null, item.subtitle)),
2383
+ React__default["default"].createElement(StyledBtnView, null,
2384
+ React__default["default"].createElement("div", { className: "mobile-only" }, t('home.seeMore')),
2385
+ React__default["default"].createElement("img", { src: index$1.CommonGAssets.getAssetPath('arrowRightGray.svg'), style: {
2386
+ width: '12px',
2387
+ height: '12px',
2388
+ marginTop: '2px',
2389
+ marginLeft: '5px',
2390
+ }, loading: "lazy" }))));
2391
+ return (React__default["default"].createElement(StyledItem, { href: link, "data-event-category": "Hamburger Navigation", "data-event-action": `Engage Click ${index + 1}`, "data-event-label": link, "data-color": color },
2392
+ React__default["default"].createElement("svg", { className: "bg-svg", width: "74", height: "121", viewBox: "0 0 74 121", fill: "none" },
2393
+ React__default["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" })),
2394
+ React__default["default"].createElement("img", { src: index$1.CommonGAssets.getAssetPath('navMBCardDotBg.svg'), className: "dot-svg", loading: "lazy", alt: "" }),
2395
+ React__default["default"].createElement(StyledContentWrapper, null,
2396
+ React__default["default"].createElement("div", { className: "mobile-only" }, renderIcon()),
2397
+ React__default["default"].createElement("div", { className: "desktop-only" }, renderName())),
2398
+ React__default["default"].createElement("div", { className: "mobile-only" }, renderName()),
2399
+ React__default["default"].createElement("div", { className: "desktop-only" }, renderIcon())));
2400
+ };
2401
+
2402
+ const ToolSpotlights = ({ hrefViewMore, spotlightHealthTools = [] }) => {
2403
+ const { t } = useTranslations.useTranslations();
2404
+ const marryBabyCardColor = ['pink', 'orange', 'green'];
2405
+ const { siteType } = React.useContext(NavigationContext);
2406
+ return (React__default["default"].createElement(Spotlights, { title: t('home.navigator.menu.spotlightTools') },
2407
+ spotlightHealthTools.length !== 0 && (React__default["default"].createElement(StyledContainerItems, null, spotlightHealthTools === null || spotlightHealthTools === void 0 ? void 0 : spotlightHealthTools.slice(0, 3).map((item, index) => siteType === 'marryBaby' ? (React__default["default"].createElement(ItemMarryBaby, { key: index, index: index, item: item, color: marryBabyCardColor[index] })) : (React__default["default"].createElement(Item, { key: index, index: index, item: item }))))),
2408
+ spotlightHealthTools.length === 0 && (React__default["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: index$1.CommonGAssets.getAssetPath('community.svg') }))));
2409
+ };
2410
+
2411
+ const MenuServiceList = ({ closePopup, menuItems = [] }) => {
2412
+ var _a, _b;
2413
+ const { siteType, ssrMenuContent: { categories, healthTools, care, together, ecom }, activeMenuService, configs: { statics, enableSearchBar }, locale, } = React.useContext(NavigationContext);
2414
+ const { t } = useTranslations.useTranslations();
2415
+ return (React__default["default"].createElement(StyledMasterMenuContainer, { id: 'categories-menu' },
2416
+ enableSearchBar ? (React__default["default"].createElement(StyledServiceListMenuSearchInputWrapper, { "data-theme": siteType, onClick: () => {
2417
+ window.location.href = `${statics.HOME_PAGE_URL}/search`;
2418
+ } },
2419
+ React__default["default"].createElement(SearchInput, { id: "mobile" }))) : null,
2420
+ React__default["default"].createElement(StyledWrapper, null,
2421
+ React__default["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 }),
2422
+ activeMenuService === 'categories' && (React__default["default"].createElement(CategorySpotlights, { spotlightsList: (categories === null || categories === void 0 ? void 0 : categories.spotlights) || [], hrefViewMore: `${statics.HOME_PAGE_URL}${locale === 'tl-PH' ? '/fil' : ''}/spotlight/` })),
2423
+ activeMenuService === 'tools' && (React__default["default"].createElement(ToolSpotlights, { spotlightHealthTools: healthTools === null || healthTools === void 0 ? void 0 : healthTools.spotlights, hrefViewMore: `${statics.HOME_PAGE_URL}${locale === 'tl-PH' ? '/fil' : ''}${((_a = index$4.STATIC_PAGES[locale]) === null || _a === void 0 ? void 0 : _a.HEALTH_TOOLS) || ''}` })),
2424
+ activeMenuService === 'care' && (React__default["default"].createElement(CareSpotlights, { spotlights: care === null || care === void 0 ? void 0 : care.spotlights, hrefViewMore: `${statics.CARE_URL_FE}/${(_b = constants$1.LOCALIZED_SLUGS[locale]) === null || _b === void 0 ? void 0 : _b.SPECIALTIES}` })),
2425
+ activeMenuService === 'together' && (React__default["default"].createElement(CommunitySpotlights, { spotlights: together === null || together === void 0 ? void 0 : together.spotlights })),
2426
+ activeMenuService === 'ecom' && (React__default["default"].createElement(EcomSpotlights, { helpfulUrls: ecom === null || ecom === void 0 ? void 0 : ecom.helpfulUrls })))));
2427
+ };
2428
+
2429
+ const HamburgerMenu = ({ menuItems }) => {
2430
+ const { siteType, configs: { enableSearchBar }, } = React.useContext(NavigationContext);
2431
+ const { containerRef, onContainerFocus, onContainerBlur, onButtonMouseDown, onClose, } = useCSSFocusPopupHelper();
2432
+ return (React__default["default"].createElement(DisplayWrapper, { mediaQueryKey: "mbDown" },
2433
+ React__default["default"].createElement("header", { className: styles$2.menuContainer },
2434
+ React__default["default"].createElement("div", { className: styles$2.menuIcon, ref: containerRef, role: "button", tabIndex: 0, onBlur: onContainerBlur, onFocus: onContainerFocus },
2435
+ React__default["default"].createElement("div", { className: styles$2.menuIconWrapper, onMouseDown: onButtonMouseDown, "data-event-category": "Hamburger Navigation", "data-event-action": "Click", "data-event-label": "Hamburger Navigation URL" },
2436
+ React__default["default"].createElement(ClosePopupIcon, { className: "mobile-close-icon" }),
2437
+ React__default["default"].createElement(HamburgerIcon, { siteType: siteType, enableSearch: enableSearchBar, className: "mobile-hamburger-icon" })),
2438
+ React__default["default"].createElement(MenuServiceList, { menuItems: menuItems, closePopup: onClose })))));
2439
+ };
2440
+
2441
+ const TOGETHER_PATHS = {
2442
+ COMMUNITIES: 'community?website_url={websiteUrl}',
2443
+ MENU_TOPIC: 'topic?community_id={communityId}&website_url={websiteUrl}',
2444
+ GET_USER_POSTS: 'profile/posts?website_url={websiteUrl}',
2445
+ };
2446
+ const Z_INDEX = {
2447
+ adBlock: 48,
2448
+ headerContainerHome: 99,
2449
+ headerContainerPopup: 300,
2450
+ headerContainerPopupSUbLevel: 400,
2451
+ menuCategoryPopupWrapper: 200,
2452
+ menuCategoryPopupContainer: 210,
2453
+ menuSearchInputPopup: 5,
2454
+ menuSearchInputDisplayIcon: 6,
2455
+ menuSearchPopup: 300,
2456
+ homeSearchComponent: 200,
2457
+ };
2458
+
2459
+ const StyledHeaderWrapper = styled__default["default"].div `
2460
+ z-index: 201;
2461
+ width: 100%;
2462
+ align-items: center;
2463
+
2464
+ background-color: ${theme.theme.colors.white};
2465
+
2466
+ transition: height 0.3s, transform 0.3s;
2467
+
2468
+ &[data-site-type='helloSites'] {
2469
+ border-bottom: 1px solid ${theme.theme.colors.neutral100};
2470
+ }
2471
+ &[data-sponsored='true'] {
2472
+ border-bottom: none;
2473
+ }
2474
+ &[data-marry-baby-tone='pink'] {
2475
+ background-color: ${theme.theme.mbColors.lightPink};
2476
+ }
2477
+
2478
+ ${utils.MediaQueries.mbUp} {
2479
+ &[data-sitewide-banner-shown='true'][data-collapsed='true'] {
2480
+ transform: translateY(-64px);
2481
+ }
2482
+ }
2483
+ ${utils.MediaQueries.mbDown} {
2484
+ &[data-site-type='marryBaby'] {
2485
+ border-bottom: none;
2486
+ }
2487
+
2488
+ &[data-fixed-bar='true'] {
2489
+ position: fixed;
2490
+ transform: translateY(0);
2491
+ }
2492
+
2493
+ &[data-fixed-bar='false'] {
2494
+ position: absolute;
2495
+ }
2496
+
2497
+ &[data-collapsed='true'] {
2498
+ transform: translateY(-100%);
2499
+ transition: transform 0.5s;
2500
+ }
2501
+ &[data-collapsed='false'] {
2502
+ transform: translateY(0);
2503
+ transition: transform 0.5s;
2504
+ }
2505
+
2506
+ .top-bar-header {
2507
+ line-height: normal;
2508
+ }
2509
+
2510
+ &[data-header-type='home'] {
2511
+ z-index: ${Z_INDEX.headerContainerHome};
2512
+ }
2513
+
2514
+ &[data-is-displayed='false'] {
2515
+ //display: none;
2516
+ visibility: hidden;
2517
+ }
2518
+ }
2519
+
2520
+ .marry-baby {
2521
+ input {
2522
+ background: ${theme.theme.mbColors.lightGray};
2523
+ border-radius: 16px;
2524
+ border: none;
2525
+ }
2526
+ max-width: 172px;
2527
+ }
2528
+ &[data-site-type='marryBaby'] {
2529
+ .close-btn {
2530
+ top: 16px;
2531
+ right: 16px;
2532
+ }
2533
+ }
2534
+ `;
2535
+ const StyledHeader = styled__default["default"].div `
2536
+ display: flex;
2537
+ height: 100%;
2538
+ align-items: center;
2539
+
2540
+ justify-content: space-between;
2541
+ padding: 0 2rem;
2542
+ height: 56px;
2543
+ ${utils.MediaQueries.pcDown} {
2544
+ padding: 0 1rem;
2545
+ }
2546
+
2547
+ ${utils.MediaQueries.mbDown} {
2548
+ position: relative;
2549
+ height: 56px;
2550
+ background: white;
2551
+ gap: 2px;
2552
+ }
2553
+
2554
+ &[data-site-type='marryBaby'] {
2555
+ width: 100%;
2556
+ margin: 0 auto;
2557
+ padding: 0 16px;
2558
+ ${utils.MediaQueries.tdUp} {
2559
+ max-width: 1064px;
2560
+ }
2561
+ }
2562
+ `;
2563
+ const StyledLeftGroup = styled__default["default"].div `
2564
+ display: flex;
2565
+ align-items: center;
2566
+ height: 100%;
2567
+ gap: 24px;
2568
+ ${utils.MediaQueries.pcDown} {
2569
+ flex-shrink: 0;
2570
+ gap: 16px;
2571
+ }
2572
+ ${utils.MediaQueries.pcDown} {
2573
+ gap: 12px;
2574
+ }
2575
+ &[data-site-type='marryBaby'] {
2576
+ gap: 26px;
2577
+ }
2578
+ `;
2579
+ const StyledRightGroup = styled__default["default"].div `
2580
+ display: flex;
2581
+ align-items: center;
2582
+ height: 100%;
2583
+ flex-shrink: 0;
2584
+ /* gap: 16px; */
2585
+ ${utils.MediaQueries.tdDown} {
2586
+ flex-shrink: 0.6;
2587
+ }
2588
+ .hhgcomp-navigation-itemnav-headeritem {
2589
+ gap: 2px;
2590
+ ${utils.MediaQueries.pcUp} {
2591
+ padding: 0 10px;
2592
+ }
2593
+ ${utils.MediaQueries.pcDown} {
2594
+ padding: 0 6px;
2595
+ }
2596
+ ${utils.MediaQueries.mbDown} {
2597
+ display: none;
2598
+ }
2599
+ a {
2600
+ text-decoration: none;
2601
+ }
2602
+ }
2603
+ `;
2604
+ styled__default["default"].div `
2605
+ .fake-search-input {
2606
+ pointer-events: none;
2607
+ input {
2608
+ line-height: 20px;
2609
+ padding-top: 10px;
2610
+ padding-bottom: 10px;
2611
+ }
2612
+ }
2613
+ `;
2614
+ const StyledProfileNavGroup = styled__default["default"].div `
2615
+ margin-left: 16px;
2616
+ display: flex;
2617
+ gap: 12px;
2618
+ align-items: center;
2619
+ flex-shrink: 0;
2620
+ ${utils.MediaQueries.pcDown} {
2621
+ margin-left: 8px;
2622
+ gap: 8px;
2623
+ }
2624
+ ${utils.MediaQueries.mbDown} {
2625
+ margin-left: 0;
2626
+ gap: 10px;
2627
+ }
2628
+ `;
2629
+ const StyledWrapMenuItems = styled__default["default"].div `
2630
+ display: flex;
2631
+ align-items: center;
2632
+ height: 100%;
2633
+ &[data-site-type='marryBaby'] {
2634
+ gap: 26px;
2635
+ }
2636
+ `;
2637
+
2638
+ const formatSponsor = (sponsor) => {
2639
+ if (!sponsor)
2640
+ return {};
2641
+ return {
2642
+ title: sponsor.title,
2643
+ logo: sponsor.logo,
2644
+ link: sponsor.link,
2645
+ };
2646
+ };
2647
+ const formatReviewedCategory = (data) => {
2648
+ return {
2649
+ postTitle: data.post_title,
2650
+ permalink: data.permalink,
2651
+ };
2652
+ };
2653
+ const formatFaqsCategory = (data) => {
2654
+ return {
2655
+ title: data.title,
2656
+ content: data.content,
2657
+ };
2658
+ };
2659
+ const formatCategory = (category) => {
2660
+ var _a, _b;
2661
+ if (!category)
2662
+ return {};
2663
+ return {
2664
+ termId: category.term_id || null,
2665
+ sponsor: category.sponsor ? formatSponsor(category.sponsor) : null,
2666
+ isSponsored: category.is_sponsored || null,
2667
+ categoryName: category.cat_name || category.name || null,
2668
+ name: category.name || null,
2669
+ iconUrl: category.icon || '',
2670
+ slugName: category.category_nicename || null,
2671
+ description: category.description || null,
2672
+ featureImage: category.thumbnail || category.image || null,
2673
+ displayName: category.name || null,
2674
+ parent: category.parent || null,
2675
+ permalink: category.permalink || null,
2676
+ slug: category.slug || null,
2677
+ childCates: ((_a = category.child_cates) === null || _a === void 0 ? void 0 : _a.map((childCate) => {
2678
+ return formatCategory(childCate);
2679
+ })) || [],
2680
+ thumnailColor: category.thumnail_color ||
2681
+ ['#FFEAF1', '#E0E9FB', '#FFF9EB', '#F2FCF7', '#F3F3F3'][(Math.random() * 5) | 0],
2682
+ colorFeatureImage: category.color_feature_image || null,
2683
+ imageColor: category.image_color || null,
2684
+ textColor: category.text_color || null,
2685
+ catParent: ((_b = category.cat_parent) === null || _b === void 0 ? void 0 : _b.name)
2686
+ ? {
2687
+ name: category.cat_parent.name,
2688
+ permalink: category.cat_parent.permalink,
2689
+ }
2690
+ : {},
2691
+ metaTag: category.meta_tag || '',
2692
+ reviewedBy: category.reviewed_by
2693
+ ? formatReviewedCategory(category.reviewed_by)
2694
+ : null,
2695
+ reviewedDate: category.reviewed_date || '',
2696
+ faqs: category.faqs
2697
+ ? category.faqs.map((faq) => formatFaqsCategory(faq))
2698
+ : null,
2699
+ customizedUrl: category.customized_url || null,
2700
+ };
2701
+ };
2702
+ const formatHealthTool = (healthTool) => {
2703
+ var _a, _b;
2704
+ if (!healthTool)
2705
+ return {};
2706
+ const isBot = (_a = healthTool.link) === null || _a === void 0 ? void 0 : _a.includes('/bot/');
2707
+ const hasFilPrefix = (_b = healthTool.link) === null || _b === void 0 ? void 0 : _b.startsWith('/fil/');
2708
+ const link = healthTool.link
2709
+ ? healthTool.link.startsWith('http')
2710
+ ? healthTool.link
2711
+ : isBot
2712
+ ? healthTool.link
2713
+ : hasFilPrefix
2714
+ ? healthTool.link
2715
+ .replace('/health-tools/', '/')
2716
+ .replace('/fil/', '/fil/health-tools/')
2717
+ : `/health-tools${healthTool.link.replace('/health-tools/', '/')}`
2718
+ : undefined;
2719
+ return {
2720
+ icon: healthTool.icon,
2721
+ link,
2722
+ subtitle: healthTool.subtitle,
2723
+ title: healthTool.title,
2724
+ };
2725
+ };
2726
+ const formatSpecialties = (specialties) => {
2727
+ var _a, _b, _c, _d, _e;
2728
+ if (!specialties || !(specialties === null || specialties === void 0 ? void 0 : specialties.object_id))
2729
+ return {};
2730
+ return {
2731
+ thumbnail: ((_a = specialties === null || specialties === void 0 ? void 0 : specialties.object_id) === null || _a === void 0 ? void 0 : _a.logo) || '',
2732
+ link: ((_b = specialties === null || specialties === void 0 ? void 0 : specialties.object_id) === null || _b === void 0 ? void 0 : _b.slug) || '',
2733
+ subtitle: ((_c = specialties.object_id) === null || _c === void 0 ? void 0 : _c.name) || '',
2734
+ name: ((_d = specialties.object_id) === null || _d === void 0 ? void 0 : _d.name) || '',
2735
+ slug: ((_e = specialties.object_id) === null || _e === void 0 ? void 0 : _e.slug) || '',
2736
+ };
2737
+ };
2738
+ const formatHospital = (hospital) => {
2739
+ var _a, _b, _c, _d, _e;
2740
+ if (!hospital || !(hospital === null || hospital === void 0 ? void 0 : hospital.object_id))
2741
+ return {};
2742
+ return {
2743
+ id: (_a = hospital.object_id) === null || _a === void 0 ? void 0 : _a.id,
2744
+ name: ((_b = hospital.object_id) === null || _b === void 0 ? void 0 : _b.name) || '',
2745
+ logo: ((_c = hospital === null || hospital === void 0 ? void 0 : hospital.object_id) === null || _c === void 0 ? void 0 : _c.logo) || '',
2746
+ description: ((_d = hospital.object_id) === null || _d === void 0 ? void 0 : _d.description) || '',
2747
+ slug: ((_e = hospital.object_id) === null || _e === void 0 ? void 0 : _e.slug) || '',
2748
+ };
2749
+ };
2750
+ const getTogetherUserPostsApiPath = (locale, isMarryBaby, apiDomain, params) => {
2751
+ const apiUrl = apiDomain || `https://together.hellohealthgroup.com/`;
2752
+ return (apiUrl +
2753
+ 'api/v1/' +
2754
+ formatString__default["default"](TOGETHER_PATHS.GET_USER_POSTS, Object.assign(Object.assign({}, params), { websiteUrl: isMarryBaby
2755
+ ? 'https://marrybaby.vn'
2756
+ : `https://${index$4.domainLocales[locale]}` })));
2757
+ };
2758
+ const getCareSearchUrl = ({ type, specialtySlug, locale, }) => {
2759
+ var _a, _b;
2760
+ return `${(_a = constants$1.LOCALIZED_SLUGS[locale]) === null || _a === void 0 ? void 0 : _a.ALL}/${((_b = constants$1.LOCALIZED_SLUGS[locale]) === null || _b === void 0 ? void 0 : _b[type]) || 'doctor'}/${specialtySlug !== null && specialtySlug !== void 0 ? specialtySlug : ''}`;
2761
+ };
2762
+ const formatSpotlightsList = (spotlight) => {
2763
+ if (!spotlight)
2764
+ return {};
2765
+ return {
2766
+ id: spotlight.ID,
2767
+ name: spotlight.name,
2768
+ permalink: spotlight.permalink,
2769
+ image: (spotlight === null || spotlight === void 0 ? void 0 : spotlight.small_banner) || (spotlight === null || spotlight === void 0 ? void 0 : spotlight.image) || '',
2770
+ imageMedium: (spotlight === null || spotlight === void 0 ? void 0 : spotlight.image_medium) || null,
2771
+ imageThumbnail: (spotlight === null || spotlight === void 0 ? void 0 : spotlight.image_thumbnail) || null,
2772
+ startDate: spotlight === null || spotlight === void 0 ? void 0 : spotlight.start_date,
2773
+ endDate: spotlight === null || spotlight === void 0 ? void 0 : spotlight.end_date,
2774
+ };
2775
+ };
2776
+ const checkAvailableSpotlight = (spotlight) => {
2777
+ const today = new Date();
2778
+ if (spotlight === null || spotlight === void 0 ? void 0 : spotlight.startDate) {
2779
+ const startDate = new Date(spotlight.startDate);
2780
+ if (today.getTime() < startDate.getTime())
2781
+ return false;
2782
+ }
2783
+ if (spotlight === null || spotlight === void 0 ? void 0 : spotlight.endDate) {
2784
+ const endDate = new Date(spotlight.endDate);
2785
+ if (today.getTime() > endDate.getTime())
2786
+ return false;
2787
+ }
2788
+ return true;
2789
+ };
2790
+
2791
+ var styles = {"gridContainer":"q3nL5cp","container":"_2DNf80G","closeWrapper":"Q-glX-n"};
2792
+
2793
+ const BtnClosePopup = ({ onClosePopup }) => {
2794
+ return (React__default["default"].createElement("div", { className: `${styles.closeWrapper} close-btn`, onClick: onClosePopup },
2795
+ React__default["default"].createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
2796
+ React__default["default"].createElement("path", { d: "M18 6L6 18M18 18L6 6", stroke: "#3E3F58", strokeWidth: "1.3", strokeLinecap: "round" }))));
2797
+ };
2798
+
2799
+ const PopupWrapper = ({ onClosePopup, isDisplay, children, isNavMenu, hideCloseBtn, }) => {
2800
+ return (React__default["default"].createElement("div", { className: "hhgcomp-navigation-popupwrapper-menuwrapper top-menu-health-tools", "data-is-display": !!isDisplay, "data-is-nav-menu": !!isNavMenu },
2801
+ React__default["default"].createElement(index$9.Container, null,
2802
+ !hideCloseBtn && (React__default["default"].createElement("div", { className: styles.container },
2803
+ React__default["default"].createElement(BtnClosePopup, { onClosePopup: onClosePopup }))),
2804
+ React__default["default"].createElement(index$9.Container, { className: styles.gridContainer }, children))));
2805
+ };
2806
+
2807
+ const MenuCareList = ({ careSpecialties = [], isOpen, onClose, spotlights = [], }) => {
2808
+ var _a;
2809
+ const { t } = useTranslations.useTranslations();
2810
+ const { locale, configs: { statics }, } = React.useContext(NavigationContext);
2811
+ return (React__default["default"].createElement(PopupWrapper, { onClosePopup: onClose, isDisplay: isOpen, isNavMenu: true },
2812
+ React__default["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) => {
2813
+ if (!specialty)
2814
+ return {};
2815
+ return {
2816
+ name: String(specialty.name) || '',
2817
+ link: getCareSearchUrl({
2818
+ type: 'DOCTOR',
2819
+ specialtySlug: specialty.slug,
2820
+ locale,
2821
+ }),
2822
+ thumbnail: (specialty === null || specialty === void 0 ? void 0 : specialty.thumbnail) || '',
2823
+ };
2824
+ })) || [] }),
2825
+ React__default["default"].createElement(CareSpotlights, { spotlights: spotlights, hrefViewMore: `${statics.CARE_URL_FE}/${(_a = constants$1.LOCALIZED_SLUGS[locale]) === null || _a === void 0 ? void 0 : _a.SPECIALTIES}/` })));
2826
+ };
2827
+
2828
+ const MenuCategoriesList = ({ categories = [], spotlightsList = [], onClose, isOpen, }) => {
2829
+ const { t } = useTranslations.useTranslations();
2830
+ const { locale, configs: { statics }, } = React.useContext(NavigationContext);
2831
+ return (React__default["default"].createElement(PopupWrapper, { onClosePopup: onClose, isDisplay: isOpen, isNavMenu: true },
2832
+ React__default["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) => {
2833
+ if (!cat)
2834
+ return {};
2835
+ return {
2836
+ name: cat.displayName || null,
2837
+ link: (cat === null || cat === void 0 ? void 0 : cat.customizedUrl) || (cat === null || cat === void 0 ? void 0 : cat.permalink) || '/',
2838
+ thumbnail: cat.iconUrl || null,
2839
+ };
2840
+ })) || [], headingTitle: t('home.navigator.menuItem.healthCategories') }),
2841
+ React__default["default"].createElement(CategorySpotlights, { spotlightsList: spotlightsList, hrefViewMore: `${statics.HOME_PAGE_URL}${locale === 'tl-PH' ? '/fil' : ''}/spotlight/` })));
2842
+ };
2843
+
2844
+ const MenuCommunitiesList = ({ communities = [], onClose, isOpen, spotlights = [], }) => {
2845
+ const { t } = useTranslations.useTranslations();
2846
+ const { configs: { statics }, } = React.useContext(NavigationContext);
2847
+ return (React__default["default"].createElement(PopupWrapper, { onClosePopup: onClose, isDisplay: isOpen, isNavMenu: true },
2848
+ React__default["default"].createElement(Categories, { hrefViewMore: normalizeLink.normalizeLink(statics.TOGETHER_URL_FE), UrlFE: normalizeLink.normalizeLinkSlash(statics.TOGETHER_URL_FE), onClosePopup: onClose, titleBtnViewMore: t('home.navigator.menuItem.allCommunities'), menuItems: (communities === null || communities === void 0 ? void 0 : communities.map((community) => {
2849
+ if (!community)
2850
+ return {};
2851
+ return {
2852
+ name: community.name || '',
2853
+ link: community.slug || '/',
2854
+ thumbnail: community.thumbnail || '',
2855
+ };
2856
+ })) || [], headingTitle: t('home.navigator.menuItem.allCommunitiesheadingTitle') }),
2857
+ React__default["default"].createElement(CommunitySpotlights, { spotlights: spotlights })));
2858
+ };
2859
+
2860
+ const MenuHealthToolsList = ({ locale, onClose, isOpen, spotlightHealthTools = [], healthTools = [], }) => {
2861
+ var _a;
2862
+ const { t } = useTranslations.useTranslations();
2863
+ const { configs: { statics }, } = React.useContext(NavigationContext);
2864
+ const hrefViewMore = `${statics.HOME_PAGE_URL}${locale === 'tl-PH' ? '/fil' : ''}${((_a = index$4.STATIC_PAGES[locale]) === null || _a === void 0 ? void 0 : _a.HEALTH_TOOLS) || ''}`;
2865
+ return (React__default["default"].createElement(PopupWrapper, { onClosePopup: onClose, isDisplay: isOpen, isNavMenu: true },
2866
+ React__default["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) => ({
2867
+ name: t.title,
2868
+ link: t.link
2869
+ ? t.link.startsWith('http')
2870
+ ? t.link
2871
+ : `${statics.HOME_PAGE_URL}${t.link}`
2872
+ : undefined,
2873
+ thumbnail: t.icon,
2874
+ })) }),
2875
+ React__default["default"].createElement(ToolSpotlights, { spotlightHealthTools: spotlightHealthTools, hrefViewMore: hrefViewMore })));
2876
+ };
2877
+
2878
+ const NavigationBar = ({ onTopBarAppears, languageMenu, menuItems, logoComponent, }) => {
2879
+ var _a;
2880
+ const { siteType, isMobile = false, locale, sitewideBanner, sitewideBannerShown = true, sponsorComponent, onBookingClick, currentUrl, onLoginClick, cartNumber,
2881
+ // ssrMenuContent: { categories, healthTools, care, together },
2882
+ configs: { statics, enableNavCareBooking, enableSearchBar,
2883
+ // enableNavCare,
2884
+ // enableProfileMyHealth,
2885
+ // enableProfileMySaved,
2886
+ // enableNavTogether,
2887
+ // enableProfileEcom,
2888
+ }, userState: { userInfo }, onLogout,
2889
+ // userProfileRouterPush,
2890
+ isUserLoading, } = React.useContext(NavigationContext);
2891
+ const { t } = useTranslations.useTranslations();
2892
+ const { SSO_URL, HOME_PAGE_URL } = statics;
2893
+ const isSponsored = !!sponsorComponent;
2894
+ const [isCollapsed, setIsCollapsed] = React.useState(false);
2895
+ const scrollY = React.useRef(47);
2896
+ const headerRef = React.useRef(null);
2897
+ const collapsedMenu = React.useRef(false);
2898
+ const goToLogin = () => {
2899
+ const currentLocation = window.location.href;
2900
+ window.location.href = SSO_URL
2901
+ ? normalizeLink.normalizeLinkSlash(`${SSO_URL}?returnUrl=${currentLocation}`)
2902
+ : currentLocation;
2903
+ };
2904
+ const logoType = siteType === 'helloSites'
2905
+ ? (_a = index$4.LOCALE_SPECS[locale]) === null || _a === void 0 ? void 0 : _a.LOGO_TYPE
2906
+ : siteType;
2907
+ const isBrowser = typeof window !== 'undefined';
2908
+ const scrolling = React.useCallback(throttle__default["default"](() => {
2909
+ if (isBrowser) {
2910
+ if (!headerRef.current)
2911
+ return;
2912
+ const headerBoundingRect = headerRef.current.getBoundingClientRect();
2913
+ if (headerBoundingRect.top <= 0 &&
2914
+ window.scrollY > scrollY.current &&
2915
+ window.scrollY > headerBoundingRect.height + 20 &&
2916
+ !collapsedMenu.current) {
2917
+ collapsedMenu.current = true;
2918
+ setIsCollapsed(true);
2919
+ }
2920
+ if (window.scrollY < scrollY.current && collapsedMenu.current) {
2921
+ collapsedMenu.current = false;
2922
+ setIsCollapsed(false);
2923
+ }
2924
+ if (window.scrollY >= 0)
2925
+ scrollY.current = window.scrollY;
2926
+ }
2927
+ }, 200), []);
2928
+ React.useEffect(() => {
2929
+ onTopBarAppears === null || onTopBarAppears === void 0 ? void 0 : onTopBarAppears(!isCollapsed);
2930
+ }, [isCollapsed]);
2931
+ React.useEffect(() => {
2932
+ window.addEventListener('scroll', scrolling, { passive: true });
2933
+ return () => {
2934
+ window.removeEventListener('scroll', scrolling);
2935
+ };
2936
+ }, []);
2937
+ React.useEffect(() => {
2938
+ if (isMobile)
2939
+ scrolling();
2940
+ }, [isMobile]);
2941
+ const isShowingSiteWideBanner = sitewideBannerShown && !!sitewideBanner;
2942
+ return (React__default["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 },
2943
+ sitewideBanner,
2944
+ React__default["default"].createElement(StyledHeader, { "data-site-type": siteType },
2945
+ React__default["default"].createElement(StyledLeftGroup, { "data-site-type": siteType },
2946
+ isMobile && React__default["default"].createElement(HamburgerMenu, { menuItems: menuItems }),
2947
+ logoComponent || (React__default["default"].createElement("a", { style: {
2948
+ flexShrink: 0,
2949
+ }, href: HOME_PAGE_URL },
2950
+ React__default["default"].createElement("div", null,
2951
+ React__default["default"].createElement(index$a.Logo, { style: {
2952
+ display: 'flex',
2953
+ }, type: logoType, badge: locale === 'id-ID' && (React__default["default"].createElement("img", { src: index$1.CommonGAssets.getAssetPath('sehat-badge.png'), width: "56", height: "23", loading: "lazy" })), dateForSeasonal: new Date(), locale: locale, key: typeof window !== 'undefined' ? 'client' : 'server' })))),
2954
+ !isMobile && (React__default["default"].createElement(React__default["default"].Fragment, null, siteType === 'marryBaby' ? (React__default["default"].createElement(NavigationMenu, { menuItems: menuItems })) : (enableSearchBar && React__default["default"].createElement(NavigtionSearch, { siteType: siteType }))))),
2955
+ React__default["default"].createElement(StyledRightGroup, { "data-site-type": siteType },
2956
+ !isMobile && (React__default["default"].createElement(React__default["default"].Fragment, null, siteType === 'marryBaby' ? (enableSearchBar && React__default["default"].createElement(NavigtionSearch, { siteType: siteType })) : (React__default["default"].createElement(NavigationMenu, { menuItems: menuItems })))),
2957
+ React__default["default"].createElement(StyledProfileNavGroup, null,
2958
+ React__default["default"].createElement(CartBadge, { "data-cart-menu": "true", "data-event-category": "Ecommerce", "data-event-action": "Cart Click", "data-event-label": currentUrl, count: cartNumber, locale: locale }),
2959
+ enableNavCareBooking && (React__default["default"].createElement(DisplayWrapper, { mediaQueryKey: "mbUp" },
2960
+ React__default["default"].createElement(BookingButton, { careUrlFe: statics.CARE_URL_FE, currentUrl: currentUrl, btnName: t('login.booking'), onCareHeaderClick: onBookingClick }))),
2961
+ languageMenu,
2962
+ React__default["default"].createElement(NavigationProfileButton, { userInfo: userInfo, siteType: siteType, onLoginClick: onLoginClick || goToLogin, SSO_URL: normalizeLink.normalizeLink(statics.SSO_URL), currentUrl: currentUrl, onLogout: onLogout, isLoading: isUserLoading, locale: locale })))),
2963
+ sponsorComponent
2964
+ ? !React__default["default"].isValidElement(sponsorComponent)
2965
+ ? sponsorComponent
2966
+ : React__default["default"].cloneElement(sponsorComponent, {
2967
+ isCollapsed,
2968
+ locale,
2969
+ isMobile,
2970
+ })
2971
+ : null));
2972
+ };
2973
+ const NavigtionSearch = ({ siteType }) => (React__default["default"].createElement(DisplayWrapper, { mediaQueryKey: "mbUp", className: siteType === 'marryBaby' ? 'marry-baby' : '' },
2974
+ React__default["default"].createElement(SearchInput, { id: "desktop" })));
2975
+ const NavigationMenu = ({ menuItems }) => {
2976
+ const { siteType, locale, ssrMenuContent: { categories, healthTools, care, together }, } = React.useContext(NavigationContext);
2977
+ return (React__default["default"].createElement(DisplayWrapper, { mediaQueryKey: "mbUp", style: { height: '100%' } },
2978
+ React__default["default"].createElement(StyledWrapMenuItems, { "data-site-type": siteType }, menuItems === null || menuItems === void 0 ? void 0 : menuItems.map((menuItem, index) => (React__default["default"].createElement(ItemMenu, { key: index, item: menuItem, menu: menuItem.popupType === 'categories' ? (React__default["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["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["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["default"].createElement(MenuCareList, { careSpecialties: care === null || care === void 0 ? void 0 : care.items, spotlights: care === null || care === void 0 ? void 0 : care.spotlights })) : null }))))));
2979
+ };
2980
+
2981
+ const useHeaderHeight = ({ hasSponsoredBanners, isSponsored, isShowingSiteWideBanner, isMobile, }) => {
2982
+ const headerRef = React.useRef(null);
2983
+ const [headerHeight, setHeaderHeight] = React.useState(0);
2984
+ const [headerBottom, setHeaderBottom] = React.useState(64);
2985
+ const debounceSetHeader = React.useCallback(debounce__default["default"](() => {
2986
+ var _a, _b, _c, _d;
2987
+ const newHeaderHeight = ((_a = headerRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight) ||
2988
+ ((_c = (_b = headerRef.current) === null || _b === void 0 ? void 0 : _b.children[0]) === null || _c === void 0 ? void 0 : _c.clientHeight) ||
2989
+ 0;
2990
+ // limit recalculation to once per 200ms + less than 300px from top of page
2991
+ if (window.scrollY <= newHeaderHeight + 200) {
2992
+ setHeaderHeight(newHeaderHeight);
2993
+ setHeaderBottom(((_d = headerRef.current) === null || _d === void 0 ? void 0 : _d.getBoundingClientRect().bottom) || headerHeight);
2994
+ // setTimeout(() => debounceSetHeader(), 200)
2995
+ }
2996
+ }, 200), []);
2997
+ React.useEffect(() => {
2998
+ window.addEventListener('resize', debounceSetHeader, {
2999
+ passive: true,
3000
+ });
3001
+ window.addEventListener('scroll', debounceSetHeader, {
3002
+ passive: true,
3003
+ });
3004
+ debounceSetHeader();
3005
+ return () => {
3006
+ window.removeEventListener('resize', debounceSetHeader);
3007
+ window.removeEventListener('scroll', debounceSetHeader);
3008
+ };
3009
+ }, []);
3010
+ React.useEffect(() => {
3011
+ debounceSetHeader();
3012
+ }, [
3013
+ isMobile,
3014
+ isShowingSiteWideBanner,
3015
+ isSponsored,
3016
+ hasSponsoredBanners,
3017
+ headerRef.current,
3018
+ ]);
3019
+ const defaultHeaderHeight = React.useMemo(() => {
3020
+ let res = isMobile ? 56 : 56;
3021
+ if (isShowingSiteWideBanner) {
3022
+ res += 64;
3023
+ }
3024
+ if (isSponsored) {
3025
+ res += 40;
3026
+ if (hasSponsoredBanners) {
3027
+ res += 57;
3028
+ }
3029
+ }
3030
+ return res;
3031
+ }, [isMobile, isShowingSiteWideBanner, hasSponsoredBanners, isSponsored]);
3032
+ return {
3033
+ defaultHeaderHeight,
3034
+ headerHeight: headerHeight || defaultHeaderHeight,
3035
+ headerBottom,
3036
+ headerRef,
3037
+ };
3038
+ };
3039
+
3040
+ const useInsider = () => {
3041
+ const { isFirstLogin, userState } = React.useContext(NavigationContext);
3042
+ const { userInfo } = userState;
3043
+ React.useEffect(() => {
3044
+ if (userInfo === null || userInfo === void 0 ? void 0 : userInfo.id) {
3045
+ if (isFirstLogin) {
3046
+ // sign up
3047
+ (userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) && (userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) !== ''
3048
+ ? (() => {
3049
+ window.insider_object = {
3050
+ 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 } : {})),
3051
+ };
3052
+ })()
3053
+ : (() => {
3054
+ window.insider_object = {
3055
+ 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 } : {})),
3056
+ };
3057
+ })();
3058
+ }
3059
+ else {
3060
+ // log in
3061
+ (userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) && (userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) !== ''
3062
+ ? (() => {
3063
+ window.insider_object = {
3064
+ 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 } : {})),
3065
+ };
3066
+ })()
3067
+ : (() => {
3068
+ window.insider_object = {
3069
+ 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 } : {})),
3070
+ };
3071
+ })();
3072
+ }
3073
+ }
3074
+ }, []);
3075
+ };
3076
+
3077
+ const useNavServices = () => {
3078
+ const { t } = useTranslations.useTranslations();
3079
+ const { siteType, locale, configs: { enableNavDiscover, enableNavHealthTools, enableNavCare, enableNavTogether, enableNavEcom, statics, }, } = React.useContext(NavigationContext);
3080
+ const isMarryBaby = siteType === 'marryBaby';
3081
+ const services = React.useMemo(() => {
3082
+ var _a;
3083
+ const _services = [];
3084
+ enableNavDiscover &&
3085
+ _services.push({
3086
+ name: t('home.navigator.menuItem.discover'),
3087
+ id: 'categories',
3088
+ link: `${statics.HOME_PAGE_URL}${locale === 'tl-PH' ? '/fil' : ''}/categories`,
3089
+ niceName: '',
3090
+ thumbnail: isMarryBaby
3091
+ ? index$1.CommonGAssets.getAssetPath('categories-mb.svg')
3092
+ : index$1.CommonGAssets.getAssetPath('nav-icons/discover.svg'),
3093
+ popupType: 'categories',
3094
+ });
3095
+ enableNavHealthTools &&
3096
+ _services.push({
3097
+ name: t('home.navigator.menuItem.healthTools'),
3098
+ id: 'tools',
3099
+ link: `${statics.HOME_PAGE_URL}${locale === 'tl-PH' ? '/fil' : ''}${((_a = index$4.STATIC_PAGES[locale]) === null || _a === void 0 ? void 0 : _a.HEALTH_TOOLS) || ''}`,
3100
+ thumbnail: isMarryBaby
3101
+ ? index$1.CommonGAssets.getAssetPath('healthtools-mb.svg')
3102
+ : index$1.CommonGAssets.getAssetPath('nav-icons/health-tools.svg'),
3103
+ popupType: 'tools',
3104
+ });
3105
+ enableNavTogether &&
3106
+ _services.push({
3107
+ name: t('home.navigator.menuItem.helloTogether'),
3108
+ id: 'together',
3109
+ link: normalizeLink.normalizeLinkSlash(statics.TOGETHER_URL_FE + '/'),
3110
+ thumbnail: isMarryBaby
3111
+ ? index$1.CommonGAssets.getAssetPath('community-mb.svg')
3112
+ : index$1.CommonGAssets.getAssetPath('nav-icons/community.svg'),
3113
+ popupType: 'together',
3114
+ });
3115
+ enableNavEcom &&
3116
+ _services.push({
3117
+ name: t('home.navigator.menuItem.helloEcom'),
3118
+ id: 'ecom',
3119
+ link: normalizeLink.normalizeLinkSlash(statics.HOME_PAGE_URL + '/shop'),
3120
+ thumbnail: index$1.CommonGAssets.getAssetPath('nav-icons/shop.svg'),
3121
+ popupType: null,
3122
+ });
3123
+ enableNavCare &&
3124
+ _services.push({
3125
+ name: t('home.navigator.menuItem.helloCare'),
3126
+ id: 'care',
3127
+ link: locale === 'ms-MY'
3128
+ ? normalizeLink.normalizeLinkSlash(statics.HOME_PAGE_URL + '/care/current-location/hospital/')
3129
+ : normalizeLink.normalizeLinkSlash(statics.HOME_PAGE_URL + '/care'),
3130
+ thumbnail: index$1.CommonGAssets.getAssetPath('nav-icons/care.svg'),
3131
+ popupType: locale === 'id-ID' ? 'care' : null,
3132
+ });
3133
+ return _services;
3134
+ }, [locale, enableNavCare, enableNavTogether, enableNavEcom]);
3135
+ return services;
3136
+ };
3137
+
3138
+ const StyledContainer = styled__default["default"].div `
3139
+ --header-z-index: 305;
3140
+ top: 0;
3141
+ z-index: var(--header-z-index);
3142
+
3143
+ ${utils.MediaQueries.mbDown} {
3144
+ width: 100vw;
3145
+ max-width: 100%;
3146
+ }
3147
+ --amp-site-wide-closed: 2px;
3148
+
3149
+ -webkit-transform: translateZ(0);
3150
+ position: sticky;
3151
+
3152
+ &.nav-open {
3153
+ margin-top: 64px;
3154
+ }
3155
+
3156
+ &:not(.nav-open) {
3157
+ --amp-site-wide-closed: 66px;
3158
+ }
3159
+ pointer-events: none;
3160
+ > section *:not([data-cart-menu] *) {
3161
+ pointer-events: auto;
3162
+ }
3163
+ `;
3164
+
3165
+ const _NavigationV2 = (props) => {
3166
+ var _a, _b;
3167
+ const { isMobile, locale, onTopBarAppears, languageOptions, sponsorComponent, sitewideBanner, sitewideBannerShown, className, logoComponent, } = props;
3168
+ const services = useNavServices();
3169
+ useInsider();
3170
+ const isShowingSiteWideBanner = sitewideBannerShown && !!sitewideBanner;
3171
+ const isSponsored = !!sponsorComponent;
3172
+ 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);
3173
+ const { headerRef, defaultHeaderHeight, headerHeight, headerBottom } = useHeaderHeight({
3174
+ isShowingSiteWideBanner,
3175
+ isSponsored,
3176
+ hasSponsoredBanners,
3177
+ isMobile,
3178
+ });
3179
+ return (React__default["default"].createElement(StyledContainer, { id: "navigation-v2", style: {
3180
+ '--default-header-height': defaultHeaderHeight + 'px',
3181
+ '--header-height': `calc(${headerHeight}px - var(--amp-site-wide-closed), 64px)`,
3182
+ '--header-bottom': headerBottom + 'px',
3183
+ }, className: className },
3184
+ React__default["default"].createElement("section", { ref: headerRef },
3185
+ React__default["default"].createElement(NavigationBar, { menuItems: services, onTopBarAppears: onTopBarAppears, logoComponent: logoComponent, languageMenu: React__default["default"].createElement(LanguageSwitcher, { languageOptions: languageOptions, locale: locale }) }))));
3186
+ };
3187
+ const NavigationV2 = (props) => {
3188
+ const propsWithDefaultValues = Object.assign({ siteType: 'helloSites', projectType: 'discover', locale: 'vi-VN', activeMenuService: 'categories', ssrMenuContent: {} }, props);
3189
+ return (React__default["default"].createElement(NavigationProvider, Object.assign({}, propsWithDefaultValues),
3190
+ React__default["default"].createElement(_NavigationV2, Object.assign({}, propsWithDefaultValues))));
3191
+ };
3192
+ const getNavMenuContent = (locale) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
3193
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
3194
+ const res = {};
3195
+ const isMarryBaby = locale === 'vi-VN_MB';
3196
+ try {
3197
+ const customLang = locale === 'tl-PH' ? 'lang=fil' : '';
3198
+ try {
3199
+ const [categories, spotlights, healthtools, healthtoolsFavorites] = yield Promise.all([
3200
+ fetch(normalizeLink.normalizeLinkSlash(`${routing.getDiscoverApiDomain(locale)}/wp-json/api/categories${customLang ? '?' + customLang : ''}`)).then((res) => res.json()),
3201
+ fetch(normalizeLink.normalizeLinkSlash(`${routing.getDiscoverApiDomain(locale)}/wp-json/api/spotlights?per_page=10&order_by=start_date${customLang ? '&' + customLang : ''}`)).then((res) => res.json()),
3202
+ fetch(normalizeLink.normalizeLinkSlash(`${routing.getDiscoverApiDomain(locale)}/wp-json/api/${isMarryBaby ? 'health-tools' : 'healthtools'}${customLang ? '?' + customLang : ''}`)).then((res) => res.json()),
3203
+ fetch(normalizeLink.normalizeLinkSlash(`${routing.getDiscoverApiDomain(locale)}/wp-json/api/${isMarryBaby ? 'health-tools' : 'healthtools'}/favorites${customLang ? '?' + customLang : ''}`)).then((res) => res.json()),
3204
+ ]);
3205
+ res.categories = {
3206
+ 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)) || [],
3207
+ 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)) || [],
3208
+ };
3209
+ res.healthTools = {
3210
+ 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)) || [],
3211
+ 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)) || [],
3212
+ };
3213
+ }
3214
+ catch (_z) { }
3215
+ if (isMarryBaby || index$4.TOGETHER_LOCALES.includes(locale)) {
3216
+ try {
3217
+ const [communities, spotlightPosts] = yield Promise.all([
3218
+ fetch(normalizeLink.normalizeLinkSlash(`${routing.getTogetherApiDomain()}/api/v1/community?website_url=https://${index$4.domainLocales[locale]}`)).then((res) => res.json()),
3219
+ fetch(normalizeLink.normalizeLinkSlash(`${routing.getTogetherApiDomain()}/api/v1/options?website_url=https://${index$4.domainLocales[locale]}&meta_key=popular_post`)).then((res) => res.json()),
3220
+ ]);
3221
+ res.together = {
3222
+ 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, index$5.formatCommunity)) || [],
3223
+ 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, index$5.formatPost)) || [],
3224
+ };
3225
+ }
3226
+ catch (_0) { }
3227
+ }
3228
+ if (index$4.CARE_LOCALES.includes(locale)) {
3229
+ try {
3230
+ const [specialties, hospitals] = yield Promise.all([
3231
+ fetch(normalizeLink.normalizeLinkSlash(routing.getCareApiDomain() +
3232
+ `/api/options/setting_menu?site=${index$4.domainLocales[locale]}&type=0`)).then((res) => res.json()),
3233
+ fetch(normalizeLink.normalizeLinkSlash(routing.getCareApiDomain() +
3234
+ `/api/options/setting_menu?site=${index$4.domainLocales[locale]}&type=1`)).then((res) => res.json()),
3235
+ ]);
3236
+ res.care = {
3237
+ 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)) || [],
3238
+ 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)) || [],
3239
+ };
3240
+ }
3241
+ catch (_1) { }
3242
+ }
3243
+ }
3244
+ catch (e) {
3245
+ console.error(e);
3246
+ }
3247
+ return res;
3248
+ });
3249
+ const getNavMenuContentWithCache = (locale) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
3250
+ return (yield core$2.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); })) || {};
3251
+ });
3252
+
3253
+ exports.LanguageSwitcher = LanguageSwitcher;
3254
+ exports.NavigationLogoutPopup = NavigationLogoutPopup;
3255
+ exports.NavigationProfileButton = NavigationProfileButton;
3256
+ exports.NavigationV2 = NavigationV2;
3257
+ exports.ProfileNavigation = ProfileNavigation;
3258
+ exports.getNavMenuContent = getNavMenuContent;
3259
+ exports.getNavMenuContentWithCache = getNavMenuContentWithCache;
3260
+ exports.getTogetherUserPostsApiPath = getTogetherUserPostsApiPath;
3261
+ exports.isInternalLink = isInternalLink;