@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,853 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var utils = require('./utils-64bd0c42.js');
5
+ var styled = require('styled-components');
6
+ var theme = require('./theme-fa910869.js');
7
+ var tslib_es6 = require('./tslib.es6-65e312a5.js');
8
+ var utils$1 = require('./utils-661411f6.js');
9
+
10
+ function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
11
+
12
+ var React__default = /*#__PURE__*/_interopDefault(React);
13
+ var styled__default = /*#__PURE__*/_interopDefault(styled);
14
+
15
+ const StyledPopup = styled__default["default"].div `
16
+ position: fixed;
17
+ left: 50%;
18
+
19
+ padding: 0 16px 32px;
20
+ background-color: ${theme.theme.colors.white};
21
+ border-radius: ${theme.theme.borderRadius};
22
+ box-shadow: 0px 4px 8px ${theme.theme.colors.gray200};
23
+ transform: translate(-50%, -50%);
24
+ transition: all 0.5s ease-in-out;
25
+ visibility: hidden;
26
+
27
+ &[data-open='true'] {
28
+ z-index: 400;
29
+ top: 50%;
30
+ opacity: 1;
31
+ visibility: visible;
32
+ }
33
+
34
+ &[data-open='false'] {
35
+ top: -50%;
36
+ }
37
+
38
+ &[data-type='lead'] {
39
+ width: 332px;
40
+ height: 460px;
41
+
42
+ div {
43
+ top: -15px;
44
+ right: -15px;
45
+ }
46
+ }
47
+
48
+ &[data-type='form'] {
49
+ width: 496px;
50
+ height: 548px;
51
+ ${utils.MediaQueries.mbDown} {
52
+ width: 340px;
53
+ }
54
+ }
55
+
56
+ &[data-type='confirm'] {
57
+ ${utils.MediaQueries.mbDown} {
58
+ width: calc(100% - 32px);
59
+ }
60
+ ${utils.MediaQueries.mbUp} {
61
+ width: 100%;
62
+ max-width: 407px;
63
+ }
64
+ }
65
+
66
+ .popup-content {
67
+ position: relative;
68
+ z-index: 111;
69
+ height: 100%;
70
+ padding: 16px;
71
+ }
72
+
73
+ .close-button {
74
+ position: absolute;
75
+ top: 16px;
76
+ right: 0;
77
+ cursor: pointer;
78
+
79
+ img {
80
+ width: 100%;
81
+ height: 100%;
82
+ border-radius: 50%;
83
+ }
84
+ }
85
+ `;
86
+ const StyledPopupWrapper = styled__default["default"].div `
87
+ position: fixed;
88
+ z-index: 110;
89
+ top: 0;
90
+ left: 0;
91
+ width: 100%;
92
+ height: 100%;
93
+ align-items: center;
94
+ background: rgba(38, 38, 38, 0.3);
95
+
96
+ &[data-open='false'] {
97
+ display: none;
98
+ }
99
+ `;
100
+
101
+ const Popup = ({ type = 'lead', closeIcon, isOpen = true, onClose, children, className = '', enableAnimation = true, }) => {
102
+ return (React__default["default"].createElement(React__default["default"].Fragment, null,
103
+ React__default["default"].createElement(StyledPopup, { "data-open": isOpen, "data-type": type, "data-animation": enableAnimation },
104
+ React__default["default"].createElement("div", { className: `${className || ''} popup-content` },
105
+ !!closeIcon && (React__default["default"].createElement("div", { className: "close-button", onClick: onClose }, closeIcon)),
106
+ children)),
107
+ React__default["default"].createElement(StyledPopupWrapper, { "data-open": isOpen, onClick: onClose })));
108
+ };
109
+
110
+ const formatAuthor = (author) => {
111
+ if (!author)
112
+ return {};
113
+ return {
114
+ displayName: author.display_name || null,
115
+ avatar: author.avatar || null,
116
+ thumbnailAvatar: author.avatar_thumbnail || null,
117
+ profileUrl: author.profile_url || null,
118
+ description: author.description || null,
119
+ metaTag: author.meta_tag || '',
120
+ specialty: author.specialty || '',
121
+ organisation: author.organisation || '',
122
+ };
123
+ };
124
+ const formatArticleExpert = (expert) => {
125
+ if (!expert)
126
+ return {};
127
+ return {
128
+ id: expert.ID || null,
129
+ name: expert.name || null,
130
+ specialty: expert.specialty || null,
131
+ avatar: expert.avatar || null,
132
+ permalink: expert.permalink || null,
133
+ thumbnailAvatar: expert.avatar_thumbnail || null,
134
+ };
135
+ };
136
+ const formatSpotlightsSummary = (spotlight) => {
137
+ if (typeof spotlight === 'undefined' || !spotlight)
138
+ return null;
139
+ return {
140
+ id: spotlight.ID,
141
+ name: spotlight.name,
142
+ permalink: spotlight.permalink,
143
+ image: (spotlight === null || spotlight === void 0 ? void 0 : spotlight.small_banner) || (spotlight === null || spotlight === void 0 ? void 0 : spotlight.image) || '',
144
+ imageMedium: (spotlight === null || spotlight === void 0 ? void 0 : spotlight.image_medium) || null,
145
+ imageThumbnail: (spotlight === null || spotlight === void 0 ? void 0 : spotlight.image_thumbnail) || null,
146
+ // desktopBanner: spotlight?.desktop_banner || '',
147
+ // mobileBanner: spotlight?.mobile_banner || '',
148
+ startDate: spotlight === null || spotlight === void 0 ? void 0 : spotlight.start_date,
149
+ endDate: spotlight === null || spotlight === void 0 ? void 0 : spotlight.end_date,
150
+ };
151
+ };
152
+ const formatArticleSubscriptionBanner = (banner) => {
153
+ if (!banner)
154
+ return {};
155
+ const { button_text, button_url, status, banner_desktop, banner_mobile } = banner, rest = tslib_es6.__rest(banner, ["button_text", "button_url", "status", "banner_desktop", "banner_mobile"]);
156
+ return Object.assign({ buttonText: button_text || '', buttonUrl: button_url || '', status: Boolean(status), bannerDesktop: banner_desktop || '', bannerMobile: banner_mobile || '' }, rest);
157
+ };
158
+ const TRANSLATE_LANGUAGES = {
159
+ EN: 'English',
160
+ FIL: 'Filipino',
161
+ };
162
+ const formatTranslateOptions = (translate) => {
163
+ if (typeof translate === 'undefined' || Object.keys(translate).length < 2)
164
+ return [];
165
+ return Object.keys(translate).map((languageKey) => ({
166
+ label: languageKey.toUpperCase() in TRANSLATE_LANGUAGES
167
+ ? TRANSLATE_LANGUAGES[languageKey.toUpperCase()]
168
+ : languageKey.toUpperCase(),
169
+ value: translate[languageKey].slice(-1) === '/'
170
+ ? translate[languageKey]
171
+ : `${translate[languageKey]}/`,
172
+ }));
173
+ };
174
+ const formatArticle = (article) => {
175
+ var _a, _b, _c, _d;
176
+ if (!article)
177
+ return {};
178
+ return {
179
+ id: article.ID,
180
+ postName: article.post_name,
181
+ sponsor: article.sponsor ? formatSponsor(article.sponsor) : null,
182
+ isSponsored: article.is_sponsored || null,
183
+ isPremium: article.is_premium || false,
184
+ postTitle: article.post_title || '',
185
+ postModified: article.post_modified || '',
186
+ postDate: article.post_date || '',
187
+ modifiedTime: article.modified_time || '',
188
+ permalink: article.permalink || '',
189
+ featureImage: article.image || null,
190
+ featureImageMobile: article.image_medium || null,
191
+ featureImageMobileXs: article.image_thumbnail || null,
192
+ author: formatAuthor(article.author),
193
+ reviewer: article.reviewed_by
194
+ ? formatAuthor(article.reviewed_by) || null
195
+ : null,
196
+ articleReviewed: (article === null || article === void 0 ? void 0 : article.reviewed)
197
+ ? Object.assign(Object.assign({}, article === null || article === void 0 ? void 0 : article.reviewed), { author: formatUserProfile((_a = article === null || article === void 0 ? void 0 : article.reviewed) === null || _a === void 0 ? void 0 : _a.author), editor: formatUserProfile((_b = article === null || article === void 0 ? void 0 : article.reviewed) === null || _b === void 0 ? void 0 : _b.editor), expert: formatUserProfile((_c = article === null || article === void 0 ? void 0 : article.reviewed) === null || _c === void 0 ? void 0 : _c.expert), fact_check: formatUserProfile((_d = article === null || article === void 0 ? void 0 : article.reviewed) === null || _d === void 0 ? void 0 : _d.fact_check) }) : null,
198
+ category: formatCategory(article.category),
199
+ postContent: article.post_content || null,
200
+ keyTakeaways: article.key_takeaways || null,
201
+ categories: (article.categories || []).map(formatCategory),
202
+ sources: article.sources || null,
203
+ description: article.description || null,
204
+ excerpt: article.excerpt || null,
205
+ expert: formatArticleExpert(article.expert),
206
+ metaTag: article.meta_tag || null,
207
+ spotlight: formatSpotlightsSummary(article === null || article === void 0 ? void 0 : article.spotlight),
208
+ affiliate_message: article.affiliate_message || null,
209
+ turnOffComment: !!article.turn_off_comment,
210
+ hasAffiliate: !!article.is_affiliate,
211
+ // faqs: (article.faqs || []).map(formatArticleFaqs),
212
+ translateOptions: formatTranslateOptions(article.translate),
213
+ jumpingLink: article.jumping_link || [],
214
+ pregnancy: (article === null || article === void 0 ? void 0 : article.pregnancy) || false,
215
+ pregnancyWeek: (article === null || article === void 0 ? void 0 : article.week_pregnancy) || 1,
216
+ primaryCategory: formatCategory(article.primary_category),
217
+ turnOffIvsPlayer: !!article.turn_off_ivs_player,
218
+ turnOffArticleVoice: !!article.turn_off_article_voice,
219
+ enableAudio: !!article.enable_audio,
220
+ // breadcrumb: (article.breadcrumb || [])?.map(formatBreadcrumb) || [],
221
+ label: (article === null || article === void 0 ? void 0 : article.label) || '',
222
+ editLast: formatAuthor(article.edit_last),
223
+ subscriptionBanner: formatArticleSubscriptionBanner(article.subscription_banner),
224
+ };
225
+ };
226
+ const formatUserProfile = (user) => {
227
+ if (typeof user === 'undefined' || !user)
228
+ return null;
229
+ return Object.assign(Object.assign({}, user), { profile_url: (user === null || user === void 0 ? void 0 : user.slug)
230
+ ? ['expert', 'medical'].includes((user === null || user === void 0 ? void 0 : user.role) || '')
231
+ ? `/expert/${user === null || user === void 0 ? void 0 : user.slug}`
232
+ : `/author/${user === null || user === void 0 ? void 0 : user.slug}`
233
+ : user.profile_url });
234
+ };
235
+ const formatBMIResult = (data) => {
236
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
237
+ if (!data || !data.status)
238
+ return {};
239
+ return {
240
+ status: data === null || data === void 0 ? void 0 : data.status,
241
+ comparison: (_a = data === null || data === void 0 ? void 0 : data.comparison) !== null && _a !== void 0 ? _a : '',
242
+ assessmentData: [
243
+ {
244
+ tab: 'tools.condition',
245
+ content: (_b = data === null || data === void 0 ? void 0 : data.condition) !== null && _b !== void 0 ? _b : '',
246
+ },
247
+ {
248
+ tab: 'tools.risks',
249
+ content: (_c = data === null || data === void 0 ? void 0 : data.risk) !== null && _c !== void 0 ? _c : '',
250
+ },
251
+ {
252
+ tab: 'tools.suggestion',
253
+ content: (_d = data === null || data === void 0 ? void 0 : data.suggestion) !== null && _d !== void 0 ? _d : '',
254
+ },
255
+ ],
256
+ chartData: ((_e = data === null || data === void 0 ? void 0 : data.chart_data) === null || _e === void 0 ? void 0 : _e.length) > 0 ? data === null || data === void 0 ? void 0 : data.chart_data : [],
257
+ disclaimer: (_f = data === null || data === void 0 ? void 0 : data.disclaimer) !== null && _f !== void 0 ? _f : '',
258
+ illustrator: (_g = data === null || data === void 0 ? void 0 : data.illustrator) !== null && _g !== void 0 ? _g : '',
259
+ faqs: (_h = data === null || data === void 0 ? void 0 : data.faqs) !== null && _h !== void 0 ? _h : [],
260
+ suggestedArticlesLink: (_j = data === null || data === void 0 ? void 0 : data.suggested_articles_link) !== null && _j !== void 0 ? _j : '',
261
+ // suggestedArticles: data?.suggested_articles?.map(formatArticle) ?? [],
262
+ };
263
+ };
264
+ const formatSponsor = (sponsor) => {
265
+ if (!sponsor)
266
+ return {};
267
+ return {
268
+ title: sponsor.title,
269
+ logo: sponsor.logo,
270
+ link: sponsor.link,
271
+ };
272
+ };
273
+ const formatReviewedCategory = (data) => {
274
+ return {
275
+ postTitle: data.post_title,
276
+ permalink: data.permalink,
277
+ };
278
+ };
279
+ const formatCategory = (category) => {
280
+ var _a, _b;
281
+ if (!category)
282
+ return {};
283
+ return {
284
+ termId: category.term_id || null,
285
+ sponsor: category.sponsor ? formatSponsor(category.sponsor) : null,
286
+ isSponsored: category.is_sponsored || null,
287
+ categoryName: category.cat_name || null,
288
+ name: category.name || null,
289
+ iconUrl: category.icon || '',
290
+ slugName: category.category_nicename || null,
291
+ description: category.description || null,
292
+ featureImage: category.image || null,
293
+ displayName: category.name || null,
294
+ parent: category.parent || null,
295
+ permalink: category.permalink || null,
296
+ slug: category.slug || null,
297
+ childCates: ((_a = category.child_cates) === null || _a === void 0 ? void 0 : _a.map((childCate) => {
298
+ return formatCategory(childCate);
299
+ })) || [],
300
+ colorFeatureImage: category.color_feature_image || null,
301
+ imageColor: category.image_color || null,
302
+ textColor: category.text_color || null,
303
+ catParent: ((_b = category.cat_parent) === null || _b === void 0 ? void 0 : _b.name)
304
+ ? {
305
+ name: category.cat_parent.name,
306
+ permalink: category.cat_parent.permalink,
307
+ }
308
+ : {},
309
+ metaTag: category.meta_tag || '',
310
+ reviewedBy: category.reviewed_by
311
+ ? formatReviewedCategory(category.reviewed_by)
312
+ : null,
313
+ reviewedDate: category.reviewed_date || '',
314
+ faqs: category.faqs
315
+ ? category.faqs.map((faq) => formatFaqsCategory(faq))
316
+ : null,
317
+ };
318
+ };
319
+ const formatCategoryApi = (category) => {
320
+ if (!category)
321
+ return {};
322
+ return {
323
+ categoryInfo: formatCategory(category.data.category) || null,
324
+ explainersPosts: (category.data.explainers_posts || []).map(formatArticle),
325
+ subCategories: (category.data.sub_categories || []).map(formatCategory),
326
+ };
327
+ };
328
+ const formatFaqsCategory = (data) => {
329
+ return {
330
+ title: data.title,
331
+ content: data.content,
332
+ };
333
+ };
334
+ const formatHealthTool = (healthTool) => {
335
+ if (!healthTool)
336
+ return {};
337
+ return {
338
+ icon: healthTool.icon,
339
+ link: healthTool.link.startsWith('http')
340
+ ? healthTool.link
341
+ : '/health-tools' + healthTool.link,
342
+ subtitle: healthTool.subtitle,
343
+ title: healthTool.title,
344
+ };
345
+ };
346
+ const formatHealthToolTypeCategory = (category) => {
347
+ var _a, _b;
348
+ if (!category)
349
+ return {};
350
+ return {
351
+ termId: (category === null || category === void 0 ? void 0 : category.term_id) || 0,
352
+ name: (category === null || category === void 0 ? void 0 : category.name) || '',
353
+ healthTools: (_b = (_a = category === null || category === void 0 ? void 0 : category.health_tools) === null || _a === void 0 ? void 0 : _a.map((tool) => formatHealthTool(tool))) !== null && _b !== void 0 ? _b : [],
354
+ };
355
+ };
356
+ const formatCommunity = (community) => {
357
+ if (!community)
358
+ return {};
359
+ return {
360
+ topicCount: community.topics_count || 0,
361
+ postCount: community.posts_count || 0,
362
+ memberCount: community.members_count || 0,
363
+ thumbnail: community.thumbnail || '',
364
+ coverImage: community.cover_image || '',
365
+ mobileCoverImage: community.mobile_cover_image || '',
366
+ name: community.name || '',
367
+ description: community.description || '',
368
+ slug: community.slug || '',
369
+ id: community.id || 0,
370
+ joined: Boolean(community.joined),
371
+ isActive: community.is_active !== null && typeof community.is_active !== 'undefined'
372
+ ? Boolean(community.is_active)
373
+ : true,
374
+ mappedCategoryId: community.mapped_category_id || 0,
375
+ discoverCategory: community.discover_category
376
+ ? {
377
+ categoryId: community.discover_category.category_id || 0,
378
+ name: community.discover_category.name || '',
379
+ }
380
+ : null,
381
+ isHidden: Boolean(community.is_hidden),
382
+ };
383
+ };
384
+ const formatTopic = (topic) => {
385
+ var _a, _b, _c, _d;
386
+ if (!topic)
387
+ return {};
388
+ return {
389
+ id: topic.id || 0,
390
+ name: topic.name || '',
391
+ image: topic.thumbnail || '',
392
+ slug: topic.slug || '',
393
+ url: '/' + ((_a = topic.community) === null || _a === void 0 ? void 0 : _a.slug) + '/' + (topic === null || topic === void 0 ? void 0 : topic.slug) || '',
394
+ description: topic.description || '',
395
+ joined: topic.joined || false,
396
+ postCount: topic.count_posts || 0,
397
+ memberCount: topic.count_members || 0,
398
+ communityId: String((_b = topic.community) === null || _b === void 0 ? void 0 : _b.id),
399
+ communitySlug: (_c = topic.community) === null || _c === void 0 ? void 0 : _c.slug,
400
+ communityName: (_d = topic.community) === null || _d === void 0 ? void 0 : _d.name,
401
+ order: topic.order || 0,
402
+ isActive: topic.is_active !== null && typeof topic.is_active !== 'undefined'
403
+ ? Boolean(topic.is_active)
404
+ : true,
405
+ mappedCategoryId: topic.mapped_category_id || 0,
406
+ discoverCategory: topic.discover_category
407
+ ? {
408
+ categoryId: topic.discover_category.category_id || 0,
409
+ name: topic.discover_category.name || '',
410
+ }
411
+ : null,
412
+ isHidden: Boolean(topic.is_hidden),
413
+ };
414
+ };
415
+ const formatExpertAnswer = (data) => {
416
+ if (!data)
417
+ return {};
418
+ return {
419
+ answer: data === null || data === void 0 ? void 0 : data.answer.map(formatComment),
420
+ expert: data === null || data === void 0 ? void 0 : data.expert,
421
+ };
422
+ };
423
+ const formatPost = (post) => {
424
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
425
+ if (!post)
426
+ return {};
427
+ return {
428
+ id: post.id,
429
+ topics: ((_a = post.topics) === null || _a === void 0 ? void 0 : _a.map((topic) => {
430
+ var _a, _b, _c, _d;
431
+ return ({
432
+ id: topic.id || 0,
433
+ name: topic.name || '',
434
+ slug: topic.slug || '',
435
+ url: '/' + ((_a = post.community) === null || _a === void 0 ? void 0 : _a.slug) + '/' + topic.slug,
436
+ communityId: String((_b = post.community) === null || _b === void 0 ? void 0 : _b.id),
437
+ communitySlug: ((_c = post.community) === null || _c === void 0 ? void 0 : _c.slug) || '',
438
+ communityName: ((_d = post.community) === null || _d === void 0 ? void 0 : _d.name) || '',
439
+ isHidden: Boolean(topic.is_hidden),
440
+ isActive: true,
441
+ });
442
+ })) || [],
443
+ community: {
444
+ id: ((_b = post.community) === null || _b === void 0 ? void 0 : _b.id) || 0,
445
+ name: ((_c = post.community) === null || _c === void 0 ? void 0 : _c.name) || '',
446
+ slug: ((_d = post.community) === null || _d === void 0 ? void 0 : _d.slug) || '',
447
+ isActive: true,
448
+ isHidden: Boolean((_e = post.community) === null || _e === void 0 ? void 0 : _e.is_hidden),
449
+ },
450
+ slug: post.slug || '',
451
+ author: {
452
+ id: ((_f = post.user) === null || _f === void 0 ? void 0 : _f.id) || 0,
453
+ username: ((_g = post.user) === null || _g === void 0 ? void 0 : _g.user_name) || '',
454
+ email: ((_h = post.user) === null || _h === void 0 ? void 0 : _h.email) || '',
455
+ name: ((_j = post.user) === null || _j === void 0 ? void 0 : _j.name) || '',
456
+ avatar: ((_k = post.user) === null || _k === void 0 ? void 0 : _k.avatar) || '',
457
+ role: ((_l = post.user) === null || _l === void 0 ? void 0 : _l.role)
458
+ ? (_o = (_m = post.user) === null || _m === void 0 ? void 0 : _m.role) === null || _o === void 0 ? void 0 : _o.toLowerCase()
459
+ : '',
460
+ type: ((_p = post.user) === null || _p === void 0 ? void 0 : _p.type) || '',
461
+ partnerId: ((_q = post.user) === null || _q === void 0 ? void 0 : _q.partner_id) ? String((_r = post.user) === null || _r === void 0 ? void 0 : _r.partner_id) : '',
462
+ title: ((_s = post.user) === null || _s === void 0 ? void 0 : _s.title) || '',
463
+ doctorId: ((_t = post.user) === null || _t === void 0 ? void 0 : _t.doctor_id) ? String((_u = post.user) === null || _u === void 0 ? void 0 : _u.doctor_id) : '',
464
+ hospitalId: ((_v = post.user) === null || _v === void 0 ? void 0 : _v.hospital_id) ? String((_w = post.user) === null || _w === void 0 ? void 0 : _w.hospital_id) : '',
465
+ },
466
+ previewUrl: {
467
+ title: post.preview_title || '',
468
+ url: post.preview_link || '',
469
+ image: post.preview_image || '',
470
+ description: post.preview_description || '',
471
+ },
472
+ createdAt: post.created_at || '',
473
+ scheduleDateTime: post.schedule_datetime || '',
474
+ photos: post.images || [],
475
+ description: post.description || '',
476
+ commentsCount: post.comments_count || 0,
477
+ likesCount: post.likes_count || 0,
478
+ title: post.name || '',
479
+ isPin: !!post.is_pin,
480
+ pinDate: post.pin_date || '',
481
+ liked: post.liked || false,
482
+ bookmarked: Boolean(post.bookmarked) || false,
483
+ mentions: post.mentions || [],
484
+ commented: Boolean(post.commented) || false,
485
+ introUrl: post.intro_url || '',
486
+ bannerImage: post.banner_image || '',
487
+ isAnonymous: post.is_anonymous ? 1 : 0,
488
+ isAskDoctor: post.is_question ? 1 : 0,
489
+ expertAnswer: formatExpertAnswer(post === null || post === void 0 ? void 0 : post.expert_answer),
490
+ createdTime: post.created_time || '',
491
+ isMinigame: post.event_type === 'mini_game',
492
+ eventStart: post.event_start,
493
+ eventEnd: post.event_end,
494
+ // authorExpertId: post.author_expert_id ? String(post.author_expert_id) : '',
495
+ };
496
+ };
497
+ const formatPostPagination = (pagination) => {
498
+ if (!pagination)
499
+ return {};
500
+ return {
501
+ currentPage: pagination.current || 0,
502
+ lastPage: pagination.last || 0,
503
+ total: pagination.total_items || 0,
504
+ };
505
+ };
506
+ const formatNotification = (notification) => {
507
+ var _a, _b, _c;
508
+ if (!notification)
509
+ return {};
510
+ return {
511
+ time: notification.created_at,
512
+ content: notification.content,
513
+ postId: String(notification.post_id),
514
+ fromUser: {
515
+ name: (_a = notification.from_user) === null || _a === void 0 ? void 0 : _a.name,
516
+ id: (_b = notification.from_user) === null || _b === void 0 ? void 0 : _b.id,
517
+ avatar: (_c = notification.from_user) === null || _c === void 0 ? void 0 : _c.avatar,
518
+ },
519
+ toUserId: String(notification.to_user_id),
520
+ postSlug: notification.post_slug || '',
521
+ communitySlug: notification.community_slug || '',
522
+ };
523
+ };
524
+ const formatSpotlightsList = (spotligts) => {
525
+ if (!spotligts)
526
+ return [];
527
+ return spotligts.map((spotlight) => ({
528
+ id: spotlight.ID,
529
+ name: spotlight.name,
530
+ permalink: spotlight.permalink,
531
+ image: (spotlight === null || spotlight === void 0 ? void 0 : spotlight.small_banner) || (spotlight === null || spotlight === void 0 ? void 0 : spotlight.image),
532
+ imageMedium: (spotlight === null || spotlight === void 0 ? void 0 : spotlight.image_medium) || null,
533
+ imageThumbnail: (spotlight === null || spotlight === void 0 ? void 0 : spotlight.image_thumbnail) || null,
534
+ startDate: spotlight === null || spotlight === void 0 ? void 0 : spotlight.start_date,
535
+ endDate: spotlight === null || spotlight === void 0 ? void 0 : spotlight.end_date,
536
+ }));
537
+ };
538
+ const formatOvulationInfo = (data) => {
539
+ if (!data)
540
+ return {};
541
+ return {
542
+ disclaimer: data.disclaimer,
543
+ featuredImage: data.featured_image,
544
+ info: data.informations || [],
545
+ reviewedBy: data.reviewed_by
546
+ ? {
547
+ id: data.reviewed_by.ID,
548
+ permalink: data.reviewed_by.permalink,
549
+ name: data.reviewed_by.name,
550
+ postTitle: data.reviewed_by.post_title,
551
+ }
552
+ : null,
553
+ reviewedDate: data.reviewed_date,
554
+ };
555
+ };
556
+ const formatSuggestedArticle = (data) => {
557
+ if (!data)
558
+ return {};
559
+ return {
560
+ postId: data.post_id || null,
561
+ categoryId: data.category_id || null,
562
+ postUrl: data.post_url || null,
563
+ postReviewed: data.post_reviewed || null,
564
+ postPageviews: data.post_pageviews || null,
565
+ postRank: data.post_rank || null,
566
+ isPin: data.is_pin || null,
567
+ frequency: data.frequency || null,
568
+ topic: data.topic || null,
569
+ };
570
+ };
571
+ const formatTopicHealthTool = (data) => {
572
+ if (!data)
573
+ return {};
574
+ return {
575
+ id: data.tool_id || null,
576
+ topicFrequency: data.frequency || null,
577
+ topicId: data.topic_id || null,
578
+ topicName: data.topic_name || null,
579
+ isPinned: !!data.is_pin || null,
580
+ toolLink: data.tool_link || '',
581
+ };
582
+ };
583
+ const formatComment = (data) => {
584
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
585
+ if (!data)
586
+ return {};
587
+ return {
588
+ content: data.content,
589
+ countLikes: data.likes_count,
590
+ countReplies: data.replies_count,
591
+ createdAt: data.created_at,
592
+ createdTime: data.created_time,
593
+ id: String(data.id),
594
+ images: data.image || [],
595
+ link: data.link || null,
596
+ replies: data.replies && data.replies.length > 0
597
+ ? data.replies.map(formatComment)
598
+ : [],
599
+ author: {
600
+ id: ((_a = data.user) === null || _a === void 0 ? void 0 : _a.id) || 0,
601
+ username: ((_b = data.user) === null || _b === void 0 ? void 0 : _b.user_name) || '',
602
+ name: ((_c = data.user) === null || _c === void 0 ? void 0 : _c.name) || '',
603
+ role: ((_d = data.user) === null || _d === void 0 ? void 0 : _d.role)
604
+ ? (_f = (_e = data.user) === null || _e === void 0 ? void 0 : _e.role) === null || _f === void 0 ? void 0 : _f.toLowerCase()
605
+ : '',
606
+ avatar: ((_g = data.user) === null || _g === void 0 ? void 0 : _g.avatar) || '',
607
+ type: ((_h = data.user) === null || _h === void 0 ? void 0 : _h.type) || '',
608
+ email: ((_j = data.user) === null || _j === void 0 ? void 0 : _j.email) || '',
609
+ partnerId: ((_k = data.user) === null || _k === void 0 ? void 0 : _k.partner_id) ? String((_l = data.user) === null || _l === void 0 ? void 0 : _l.partner_id) : '',
610
+ title: ((_m = data.user) === null || _m === void 0 ? void 0 : _m.title) || '',
611
+ doctorId: ((_o = data.user) === null || _o === void 0 ? void 0 : _o.doctor_id) ? String((_p = data.user) === null || _p === void 0 ? void 0 : _p.doctor_id) : '',
612
+ hospitalId: ((_q = data.user) === null || _q === void 0 ? void 0 : _q.hospital_id) ? String((_r = data.user) === null || _r === void 0 ? void 0 : _r.hospital_id) : '',
613
+ },
614
+ liked: !!data.liked,
615
+ mentionedUser: data.mentioned
616
+ ? {
617
+ id: ((_s = data.mentioned) === null || _s === void 0 ? void 0 : _s.id) || 0,
618
+ username: ((_t = data.mentioned) === null || _t === void 0 ? void 0 : _t.user_name) || '',
619
+ name: ((_u = data.mentioned) === null || _u === void 0 ? void 0 : _u.name) || '',
620
+ role: ((_v = data.mentioned) === null || _v === void 0 ? void 0 : _v.role)
621
+ ? (_x = (_w = data.mentioned) === null || _w === void 0 ? void 0 : _w.role) === null || _x === void 0 ? void 0 : _x.toLowerCase()
622
+ : '',
623
+ avatar: ((_y = data.mentioned) === null || _y === void 0 ? void 0 : _y.avatar) || '',
624
+ type: ((_z = data.mentioned) === null || _z === void 0 ? void 0 : _z.type) || '',
625
+ email: ((_0 = data.mentioned) === null || _0 === void 0 ? void 0 : _0.email) || '',
626
+ partnerId: ((_1 = data.mentioned) === null || _1 === void 0 ? void 0 : _1.partner_id)
627
+ ? String((_2 = data.mentioned) === null || _2 === void 0 ? void 0 : _2.partner_id)
628
+ : '',
629
+ doctorId: ((_3 = data.mentioned) === null || _3 === void 0 ? void 0 : _3.doctor_id)
630
+ ? String((_4 = data.mentioned) === null || _4 === void 0 ? void 0 : _4.doctor_id)
631
+ : '',
632
+ hospitalId: ((_5 = data.mentioned) === null || _5 === void 0 ? void 0 : _5.hospital_id)
633
+ ? String((_6 = data.mentioned) === null || _6 === void 0 ? void 0 : _6.hospital_id)
634
+ : '',
635
+ title: ((_7 = data.mentioned) === null || _7 === void 0 ? void 0 : _7.title) || '',
636
+ }
637
+ : null,
638
+ mentions: data.mentions || [],
639
+ isSensitive: data.is_sensitive || 0,
640
+ userReadComment: data.user_read_comment,
641
+ source: data.source || [],
642
+ isVerify: data.is_verify || 0,
643
+ isOppose: data.is_oppose || 0,
644
+ userVerify: data.user_verify || {},
645
+ categorySlug: data.categories || '',
646
+ isAnonymous: Boolean(Number(data.is_anonymous || 0)),
647
+ };
648
+ };
649
+ const formatReportedPostToPostDetail = (data) => {
650
+ if (!data)
651
+ return {};
652
+ return {
653
+ name: data.title,
654
+ description: data.description,
655
+ images: data.images,
656
+ likes_count: data.count_likes,
657
+ comments_count: data.count_comments,
658
+ topics: [],
659
+ // created_at:
660
+ // created_date?: string
661
+ // preview_image:
662
+ slug: data.post_slug,
663
+ id: data.post_id,
664
+ is_pin: data.is_pin,
665
+ pin_date: '',
666
+ post_type: data.post_type,
667
+ schedule_datetime: data.schedule_datetime,
668
+ is_active: data.is_active,
669
+ preview_title: data.preview_title || '',
670
+ preview_image: data.preview_image || '',
671
+ preview_description: data.preview_description || '',
672
+ preview_link: data.preview_link || '',
673
+ user: data.user,
674
+ created_at: '',
675
+ created_time: '',
676
+ community: {
677
+ id: data.community_id,
678
+ name: data.community_name,
679
+ slug: data.community_slug,
680
+ description: '',
681
+ },
682
+ };
683
+ };
684
+ const formatTopicSubot = (data) => {
685
+ if (!data)
686
+ return {};
687
+ return {
688
+ chatBotId: data.subot_id,
689
+ isPinned: data.is_pin,
690
+ topicId: data.topic_id,
691
+ topicFrequency: data.frequency,
692
+ };
693
+ };
694
+ const formatSiteWideBanner = (sitewide_banner, type) => {
695
+ if (typeof sitewide_banner === 'undefined' || !sitewide_banner)
696
+ return null;
697
+ return {
698
+ content: (sitewide_banner === null || sitewide_banner === void 0 ? void 0 : sitewide_banner.content) || '',
699
+ icon: (sitewide_banner === null || sitewide_banner === void 0 ? void 0 : sitewide_banner.icon) || '',
700
+ type: type || 'other',
701
+ };
702
+ };
703
+ const formatPWGContent = (data) => {
704
+ if (!data)
705
+ return {};
706
+ return {
707
+ disclaimer: data.disclaimer,
708
+ info: data.info || [],
709
+ reviewedBy: data.reviewed_by ? formatUserProfile(data.reviewed_by) : null,
710
+ reviewedDate: data.reviewed_date,
711
+ metaTag: data.meta_tag,
712
+ };
713
+ };
714
+ const formatUserProfileUrl = (user) => {
715
+ if (typeof user === 'undefined' || !user)
716
+ return '';
717
+ return (user === null || user === void 0 ? void 0 : user.turn_off_profile)
718
+ ? ''
719
+ : (user === null || user === void 0 ? void 0 : user.slug)
720
+ ? ['expert', 'medical'].includes((user === null || user === void 0 ? void 0 : user.role) || '')
721
+ ? `/expert/${user === null || user === void 0 ? void 0 : user.slug}`
722
+ : `/author/${user === null || user === void 0 ? void 0 : user.slug}`
723
+ : (user === null || user === void 0 ? void 0 : user.profile_url) || (user === null || user === void 0 ? void 0 : user.permalink) || '#';
724
+ };
725
+ const formatTHRContent = (data) => {
726
+ if (!data)
727
+ return {};
728
+ return {
729
+ disclaimer: data.disclaimer,
730
+ info: data.info || [],
731
+ reviewedBy: data.reviewed_by ? formatUserProfile(data.reviewed_by) : null,
732
+ reviewedDate: data.reviewed_date,
733
+ metaTag: data.meta_tag,
734
+ };
735
+ };
736
+ const formatBabyGrowthContent = (data) => {
737
+ var _a, _b, _c;
738
+ if (!data || !data.information)
739
+ return {};
740
+ return {
741
+ information: (_a = data.information.map((info) => ({
742
+ title: info.title,
743
+ description: info.description,
744
+ }))) !== null && _a !== void 0 ? _a : [],
745
+ reviewBy: {
746
+ reviewer: ((_b = data.reviewed_by) === null || _b === void 0 ? void 0 : _b.display_name) || ((_c = data.reviewed_by) === null || _c === void 0 ? void 0 : _c.name) || '',
747
+ date: data.reviewed_date || '',
748
+ link: formatUserProfileUrl(data === null || data === void 0 ? void 0 : data.reviewed_by),
749
+ },
750
+ metaTag: data.meta_tag || '',
751
+ title: data.title || '',
752
+ description: data.description || '',
753
+ disclaimer: data.disclaimer || '',
754
+ is_sponsored: data.is_sponsored || false,
755
+ sponsor: data.sponsor,
756
+ featuredImage: data.featured_image || '',
757
+ };
758
+ };
759
+
760
+ var dataTransform = /*#__PURE__*/Object.freeze({
761
+ __proto__: null,
762
+ formatAuthor: formatAuthor,
763
+ formatArticleExpert: formatArticleExpert,
764
+ formatSpotlightsSummary: formatSpotlightsSummary,
765
+ TRANSLATE_LANGUAGES: TRANSLATE_LANGUAGES,
766
+ formatTranslateOptions: formatTranslateOptions,
767
+ formatArticle: formatArticle,
768
+ formatUserProfile: formatUserProfile,
769
+ formatBMIResult: formatBMIResult,
770
+ formatSponsor: formatSponsor,
771
+ formatReviewedCategory: formatReviewedCategory,
772
+ formatCategory: formatCategory,
773
+ formatCategoryApi: formatCategoryApi,
774
+ formatFaqsCategory: formatFaqsCategory,
775
+ formatHealthTool: formatHealthTool,
776
+ formatHealthToolTypeCategory: formatHealthToolTypeCategory,
777
+ formatCommunity: formatCommunity,
778
+ formatTopic: formatTopic,
779
+ formatExpertAnswer: formatExpertAnswer,
780
+ formatPost: formatPost,
781
+ formatPostPagination: formatPostPagination,
782
+ formatNotification: formatNotification,
783
+ formatSpotlightsList: formatSpotlightsList,
784
+ formatOvulationInfo: formatOvulationInfo,
785
+ formatSuggestedArticle: formatSuggestedArticle,
786
+ formatTopicHealthTool: formatTopicHealthTool,
787
+ formatComment: formatComment,
788
+ formatReportedPostToPostDetail: formatReportedPostToPostDetail,
789
+ formatTopicSubot: formatTopicSubot,
790
+ formatSiteWideBanner: formatSiteWideBanner,
791
+ formatPWGContent: formatPWGContent,
792
+ formatUserProfileUrl: formatUserProfileUrl,
793
+ formatTHRContent: formatTHRContent,
794
+ formatBabyGrowthContent: formatBabyGrowthContent
795
+ });
796
+
797
+ const StyledUserAvatar = styled__default["default"].div `
798
+ width: ${(props) => props.size || 40}px;
799
+ height: ${(props) => props.size || 40}px;
800
+ flex-shrink: 0;
801
+ cursor: pointer;
802
+
803
+ img {
804
+ border-radius: 50%;
805
+ }
806
+
807
+ .avatar {
808
+ width: 100%;
809
+ height: 100%;
810
+ object-fit: cover;
811
+ }
812
+
813
+ .avatar-default {
814
+ display: flex;
815
+ align-items: center;
816
+ justify-content: center;
817
+ background-color: ${theme.theme.colors.secondaryBase};
818
+ border-radius: 50%;
819
+ color: white;
820
+ font-size: 1em;
821
+ font-weight: bold;
822
+ line-height: 1;
823
+ }
824
+
825
+ &[data-is-marrybaby='true'] {
826
+ .avatar-default {
827
+ background-color: ${theme.theme.mbColors.pink};
828
+ }
829
+ }
830
+ `;
831
+
832
+ const UserAvatar = (_a) => {
833
+ var { className, isMarryBaby: isMarryBabyProp, style, avatar, username, size } = _a, rest = tslib_es6.__rest(_a, ["className", "isMarryBaby", "style", "avatar", "username", "size"]);
834
+ const { data: { env: { isMarryBaby: isMarryBabyContext }, }, } = React.useContext(utils$1.TogetherComponentGlobalContext);
835
+ const isMarryBaby = typeof isMarryBabyProp === 'boolean' ? isMarryBabyProp : isMarryBabyContext;
836
+ const [tempAvatar, setTempAvatar] = React.useState(false);
837
+ return (React__default["default"].createElement(StyledUserAvatar, Object.assign({ "data-is-marrybaby": isMarryBaby, className: className, style: style, size: size }, rest), avatar && !tempAvatar ? (React__default["default"].createElement("img", { loading: "lazy", src: avatar, className: `avatar`, alt: "avatar", onError: () => {
838
+ // e.currentTarget.onerror = null
839
+ if (!tempAvatar)
840
+ setTempAvatar(true);
841
+ } })) : (React__default["default"].createElement("div", { className: "avatar avatar-default" }, username && (username === null || username === void 0 ? void 0 : username.length) > 0 ? username[0].toUpperCase() : 'A'))));
842
+ };
843
+
844
+ exports.Popup = Popup;
845
+ exports.UserAvatar = UserAvatar;
846
+ exports.dataTransform = dataTransform;
847
+ exports.formatArticle = formatArticle;
848
+ exports.formatCategory = formatCategory;
849
+ exports.formatComment = formatComment;
850
+ exports.formatCommunity = formatCommunity;
851
+ exports.formatPost = formatPost;
852
+ exports.formatTopic = formatTopic;
853
+ exports.formatUserProfileUrl = formatUserProfileUrl;