@hhgtech/hhg-components 1.26.32 → 1.26.34

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 (294) hide show
  1. package/build/babyGrowth.js +2 -2
  2. package/build/cache.js +1 -1
  3. package/build/care.js +1 -1
  4. package/build/components/atoms/authorBadge/index.styles.d.ts +4 -2
  5. package/build/components/atoms/customReferenceDot/index.d.ts +1 -1
  6. package/build/components/mantine/anchor/index.styles.d.ts +4 -2
  7. package/build/components/mantine/button/index.styles.d.ts +4 -2
  8. package/build/components/mantine/datepicker/index.d.ts +4 -8
  9. package/build/components/mantine/index.d.ts +1 -1
  10. package/build/components/mantine/input/number.d.ts +2 -2
  11. package/build/components/mantine/otp/index.d.ts +2 -2
  12. package/build/components/mantine/phone/index.d.ts +1 -1
  13. package/build/components/mantine/tabs/index.styles.d.ts +4 -2
  14. package/build/components/mantine/text/index.styles.d.ts +4 -2
  15. package/build/components/mantine/theme/input.d.ts +4 -3
  16. package/build/components/mantine/theme/other.d.ts +2 -2
  17. package/build/components/mantine/theme/text.d.ts +38 -38
  18. package/build/components/molecules/tabs/index.styles.d.ts +8 -2
  19. package/build/components.js +1 -1
  20. package/build/constants.js +1 -1
  21. package/build/core-e0ab68ed.js +1 -0
  22. package/build/{dataTransform-28101413.js → dataTransform-3d1fe75a.js} +1 -1
  23. package/build/ecom.js +1 -1
  24. package/build/esm/babyGrowth.js +2 -2
  25. package/build/esm/cache.js +1 -1
  26. package/build/esm/care.js +1 -1
  27. package/build/esm/components.js +1 -1
  28. package/build/esm/constants.js +1 -1
  29. package/build/esm/{core-8caadfc5.js → core-99bd482d.js} +1 -1
  30. package/build/esm/{dataTransform-274126e8.js → dataTransform-b1a60c6f.js} +1 -1
  31. package/build/esm/ecom.js +1 -1
  32. package/build/esm/footer.js +1 -1
  33. package/build/esm/gAssets.js +1 -1
  34. package/build/esm/{getDynamicHealthTool-90551b77.js → getDynamicHealthTool-9469155c.js} +1 -1
  35. package/build/esm/{getSocialList-466fa13f.js → getSocialList-26e7744f.js} +1 -1
  36. package/build/esm/hooks.js +1 -1
  37. package/build/esm/i18n.js +1 -1
  38. package/build/esm/index-052ead15.js +134 -0
  39. package/build/esm/{index-ad7df466.js → index-07d550bd.js} +1 -1
  40. package/build/esm/{index-c8894e53.js → index-1c2e6b11.js} +1 -1
  41. package/build/esm/index-35720c39.js +1 -0
  42. package/build/esm/{index-49d42994.js → index-3a573a81.js} +1 -1
  43. package/build/esm/{index-9e21a856.js → index-415aa6a6.js} +1 -1
  44. package/build/esm/{index-c1c4ea8a.js → index-492dce7f.js} +1 -1
  45. package/build/esm/index-4c732e19.js +1 -0
  46. package/build/esm/{index-7b7ecc63.js → index-4cdba9f7.js} +1 -1
  47. package/build/esm/index-5150413f.js +1 -0
  48. package/build/esm/{index-e1c04a61.js → index-5b3fa6f4.js} +1 -1
  49. package/build/esm/index-66ca40b3.js +1 -0
  50. package/build/esm/{index-587a7c6c.js → index-792f34c0.js} +1 -1
  51. package/build/esm/{index-a7593bb9.js → index-7c7a71c2.js} +1 -1
  52. package/build/esm/{index-12de6c42.js → index-9f920249.js} +1 -1
  53. package/build/esm/index-abc2e161.js +1 -0
  54. package/build/esm/{index-e00f38c9.js → index-cbd70f4c.js} +1 -1
  55. package/build/esm/{index-aa91b2e8.js → index-cc1cc2ec.js} +1 -1
  56. package/build/esm/{index-6e4970c6.js → index-ce636090.js} +1 -1
  57. package/build/esm/{index-5faf1733.js → index-dca34eeb.js} +6 -6
  58. package/build/esm/{index-f279f9cc.js → index-e0755edc.js} +1 -1
  59. package/build/esm/{index-2dcd7658.js → index-ec106ff6.js} +1 -1
  60. package/build/esm/index-f1de8784.js +1 -0
  61. package/build/esm/index.js +1 -1
  62. package/build/esm/{index.styled-30b4b2d2.js → index.styled-1ccc5a77.js} +2 -2
  63. package/build/esm/{index.styled-c8b3bbda.js → index.styled-8a25e151.js} +1 -1
  64. package/build/esm/{index.styled-e1458854.js → index.styled-940adc9b.js} +173 -173
  65. package/build/esm/{index.styled-1b7062fa.js → index.styled-afbee6df.js} +1 -1
  66. package/build/esm/{index.styled-7d3abcab.js → index.styled-c947699d.js} +1 -1
  67. package/build/esm/lead.js +1 -1
  68. package/build/esm/mantine.js +1 -1
  69. package/build/esm/misc.js +1 -1
  70. package/build/esm/navigation.js +1 -1
  71. package/build/esm/onboarding.js +1 -1
  72. package/build/esm/pwg.js +5 -5
  73. package/build/esm/{routing-5659c7c1.js → routing-975273e0.js} +1 -1
  74. package/build/esm/{screenSizeContext-ef383a81.js → screenSizeContext-e78224e2.js} +1 -1
  75. package/build/esm/together.js +1 -1
  76. package/build/esm/{translationsProvider-c6ae6aba.js → translationsProvider-6d5e47dc.js} +1 -1
  77. package/build/esm/{types-a8957b61.js → types-8b435e81.js} +1 -1
  78. package/build/esm/{types-b47cfb90.js → types-f9aab877.js} +80 -79
  79. package/build/esm/types.js +1 -1
  80. package/build/esm/{useHealthToolCache-33638761.js → useHealthToolCache-900f7b60.js} +1 -1
  81. package/build/esm/{useRafState-8ad5ff5d.js → useRafState-432223b9.js} +1 -1
  82. package/build/esm/{useTranslations-09fd59a7.js → useTranslations-9c41e6c8.js} +1 -1
  83. package/build/esm/{utils-737d26dc.js → utils-618e7683.js} +16 -16
  84. package/build/esm/vaccination.js +12 -12
  85. package/build/footer.js +1 -1
  86. package/build/gAssets.js +1 -1
  87. package/build/getDynamicHealthTool-b44915cf.js +1 -0
  88. package/build/{getSocialList-a32f7622.js → getSocialList-2c798760.js} +1 -1
  89. package/build/hooks.js +1 -1
  90. package/build/i18n.js +1 -1
  91. package/build/index-135d06ea.js +1 -0
  92. package/build/{index-8515331b.js → index-393683bd.js} +1 -1
  93. package/build/{index-20ec378a.js → index-518a689f.js} +1 -1
  94. package/build/{index-28df8c27.js → index-52ef0508.js} +1 -1
  95. package/build/{index-b24d30a4.js → index-602fff84.js} +1 -1
  96. package/build/{index-023543bd.js → index-62c90fc9.js} +11 -11
  97. package/build/{index-a2796700.js → index-65a1e316.js} +1 -1
  98. package/build/{index-6783d880.js → index-68b36671.js} +1 -1
  99. package/build/{index-ff37193f.js → index-7741d720.js} +1 -1
  100. package/build/index-84aa447d.js +134 -0
  101. package/build/{index-d3826236.js → index-880ed496.js} +1 -1
  102. package/build/index-8abaf3c2.js +1 -0
  103. package/build/index-94d01c18.js +1 -0
  104. package/build/index-a0c1abdd.js +1 -0
  105. package/build/{index-bcc60c35.js → index-ac489f86.js} +1 -1
  106. package/build/{index-db12a261.js → index-ba38d2ea.js} +1 -1
  107. package/build/index-d1c0f20d.js +1 -0
  108. package/build/{index-2479abce.js → index-d2e91e47.js} +1 -1
  109. package/build/index-d79c7f8f.js +1 -0
  110. package/build/{index-34d6ee2c.js → index-e5f077a0.js} +1 -1
  111. package/build/{index-a1f24ac5.js → index-ee837a02.js} +1 -1
  112. package/build/{index-41ec0350.js → index-f2b90c69.js} +1 -1
  113. package/build/{index-76781aaa.js → index-f940d627.js} +1 -1
  114. package/build/index.js +1 -1
  115. package/build/{index.styled-6da69873.js → index.styled-3b98796b.js} +1 -1
  116. package/build/{index.styled-722fa7a1.js → index.styled-46729c66.js} +3 -3
  117. package/build/{index.styled-6e88c577.js → index.styled-c4beee2d.js} +1 -1
  118. package/build/{index.styled-06bff8be.js → index.styled-ecfffb79.js} +2 -2
  119. package/build/{index.styled-360b806d.js → index.styled-f732f62a.js} +1 -1
  120. package/build/lead.js +1 -1
  121. package/build/mantine.js +1 -1
  122. package/build/misc.js +1 -1
  123. package/build/navigation.js +1 -1
  124. package/build/onboarding.js +1 -1
  125. package/build/pwg.js +4 -4
  126. package/build/{routing-11b59429.js → routing-e1c33fd6.js} +1 -1
  127. package/build/screenSizeContext-0e09fb90.js +81 -0
  128. package/build/together/components/atoms/tagTopic/index.d.ts +6 -2
  129. package/build/together/components/molecules/cardAuthor/index.styles.d.ts +5 -2
  130. package/build/together/components/molecules/postContent/index.styles.d.ts +4 -2
  131. package/build/together.js +1 -1
  132. package/build/{translationsProvider-f706d7ce.js → translationsProvider-c759758b.js} +1 -1
  133. package/build/{types-1c02a2e5.js → types-1acc14ed.js} +10 -9
  134. package/build/{types-181bd739.js → types-d19c0294.js} +37 -37
  135. package/build/types.js +1 -1
  136. package/build/useHealthToolCache-cd6dc17f.js +1 -0
  137. package/build/{useRafState-2246427c.js → useRafState-a94ab907.js} +1 -1
  138. package/build/useTranslations-ef5fab21.js +1 -0
  139. package/build/{utils-0eff6749.js → utils-0b352512.js} +14 -14
  140. package/build/vaccination.js +49 -49
  141. package/package.json +10 -15
  142. package/build/components/mantine/datepicker/index.styled.d.ts +0 -3
  143. package/build/components/mantine/datepicker/range.d.ts +0 -5
  144. package/build/core-e1d079c2.js +0 -1
  145. package/build/esm/index-7c08fc24.js +0 -151
  146. package/build/esm/index-96906ea3.js +0 -1
  147. package/build/esm/index-d67f0f84.js +0 -1
  148. package/build/esm/index-dfa681bc.js +0 -1
  149. package/build/esm/index-e0b5236e.js +0 -1
  150. package/build/esm/index-f9a3ccf7.js +0 -1
  151. package/build/getDynamicHealthTool-f5800966.js +0 -1
  152. package/build/index-05a92235.js +0 -1
  153. package/build/index-18e5870d.js +0 -1
  154. package/build/index-5140044f.js +0 -1
  155. package/build/index-922aa090.js +0 -1
  156. package/build/index-a2bee1ad.js +0 -1
  157. package/build/index-dfb7b798.js +0 -151
  158. package/build/screenSizeContext-2a70b050.js +0 -81
  159. package/build/useHealthToolCache-e8385f9f.js +0 -1
  160. package/build/useTranslations-b15251a8.js +0 -1
  161. /package/build/{BMI_BOYS.percentile.monthly-1d7af41b.js → BMI_BOYS.percentile.monthly-a12d572a.js} +0 -0
  162. /package/build/{BMI_BOYS.percentile.weekly-b069d62a.js → BMI_BOYS.percentile.weekly-d7bb5879.js} +0 -0
  163. /package/build/{BMI_BOYS.percentile.yearly-8ff4bb62.js → BMI_BOYS.percentile.yearly-9b242344.js} +0 -0
  164. /package/build/{BMI_BOYS.zscore.monthly-78a9cc6f.js → BMI_BOYS.zscore.monthly-79ce3b3a.js} +0 -0
  165. /package/build/{BMI_BOYS.zscore.weekly-1d2397cb.js → BMI_BOYS.zscore.weekly-7066042e.js} +0 -0
  166. /package/build/{BMI_BOYS.zscore.yearly-70f2ff71.js → BMI_BOYS.zscore.yearly-04ab4a71.js} +0 -0
  167. /package/build/{BMI_GIRLS.percentile.monthly-5c551722.js → BMI_GIRLS.percentile.monthly-52160865.js} +0 -0
  168. /package/build/{BMI_GIRLS.percentile.weekly-777ee642.js → BMI_GIRLS.percentile.weekly-cdb89d90.js} +0 -0
  169. /package/build/{BMI_GIRLS.percentile.yearly-1932ad70.js → BMI_GIRLS.percentile.yearly-7ce25f13.js} +0 -0
  170. /package/build/{BMI_GIRLS.zscore.monthly-0ae0242b.js → BMI_GIRLS.zscore.monthly-0108625a.js} +0 -0
  171. /package/build/{BMI_GIRLS.zscore.weekly-1b3d59ee.js → BMI_GIRLS.zscore.weekly-10f3e4c5.js} +0 -0
  172. /package/build/{BMI_GIRLS.zscore.yearly-acfef8b9.js → BMI_GIRLS.zscore.yearly-53941b82.js} +0 -0
  173. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-dc8dd3a0.js → HEAD CIRCUM_BOYS.percentile.monthly-b5307bc9.js} +0 -0
  174. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-757ffdef.js → HEAD CIRCUM_BOYS.percentile.weekly-d1b2f383.js} +0 -0
  175. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-dc3039e6.js → HEAD CIRCUM_BOYS.percentile.yearly-05ba5c38.js} +0 -0
  176. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-f9b9537a.js → HEAD CIRCUM_BOYS.zscore.monthly-8fbab683.js} +0 -0
  177. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-8e0b9e55.js → HEAD CIRCUM_BOYS.zscore.weekly-2bf495f2.js} +0 -0
  178. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-5ebba785.js → HEAD CIRCUM_BOYS.zscore.yearly-8734aefb.js} +0 -0
  179. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-7b3a69d4.js → HEAD CIRCUM_GIRLS.percentile.monthly-cae87b5d.js} +0 -0
  180. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-6468172c.js → HEAD CIRCUM_GIRLS.percentile.weekly-a0589aab.js} +0 -0
  181. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-8b529237.js → HEAD CIRCUM_GIRLS.percentile.yearly-c16050d3.js} +0 -0
  182. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-7e4b2c79.js → HEAD CIRCUM_GIRLS.zscore.monthly-c77441cb.js} +0 -0
  183. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-c93c76b4.js → HEAD CIRCUM_GIRLS.zscore.weekly-85e93804.js} +0 -0
  184. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-09ac4a34.js → HEAD CIRCUM_GIRLS.zscore.yearly-45847929.js} +0 -0
  185. /package/build/{HEIGHT_BOYS.percentile.monthly-f4df1d4f.js → HEIGHT_BOYS.percentile.monthly-0a7fd5fd.js} +0 -0
  186. /package/build/{HEIGHT_BOYS.percentile.weekly-98c3c7ae.js → HEIGHT_BOYS.percentile.weekly-31b8e7c0.js} +0 -0
  187. /package/build/{HEIGHT_BOYS.percentile.yearly-0af9a6c7.js → HEIGHT_BOYS.percentile.yearly-57e1bc17.js} +0 -0
  188. /package/build/{HEIGHT_BOYS.zscore.monthly-74469225.js → HEIGHT_BOYS.zscore.monthly-c0e961e1.js} +0 -0
  189. /package/build/{HEIGHT_BOYS.zscore.weekly-5aedeb27.js → HEIGHT_BOYS.zscore.weekly-67559cc3.js} +0 -0
  190. /package/build/{HEIGHT_BOYS.zscore.yearly-a4d18a96.js → HEIGHT_BOYS.zscore.yearly-803c449c.js} +0 -0
  191. /package/build/{HEIGHT_GIRLS.percentile.monthly-f1271059.js → HEIGHT_GIRLS.percentile.monthly-63968e56.js} +0 -0
  192. /package/build/{HEIGHT_GIRLS.percentile.weekly-8edfbaee.js → HEIGHT_GIRLS.percentile.weekly-83011a09.js} +0 -0
  193. /package/build/{HEIGHT_GIRLS.percentile.yearly-1e0afe8c.js → HEIGHT_GIRLS.percentile.yearly-deda1b74.js} +0 -0
  194. /package/build/{HEIGHT_GIRLS.zscore.monthly-6f2fc7a4.js → HEIGHT_GIRLS.zscore.monthly-f93618db.js} +0 -0
  195. /package/build/{HEIGHT_GIRLS.zscore.weekly-53b292b4.js → HEIGHT_GIRLS.zscore.weekly-fbeda00a.js} +0 -0
  196. /package/build/{HEIGHT_GIRLS.zscore.yearly-9e3857fe.js → HEIGHT_GIRLS.zscore.yearly-903d8196.js} +0 -0
  197. /package/build/{Onboarding-5e427213.js → Onboarding-eb1bafb0.js} +0 -0
  198. /package/build/{Visible-a814efb4.js → Visible-f8de44a9.js} +0 -0
  199. /package/build/{WEIGHT_BOYS.percentile.monthly-2fdd897c.js → WEIGHT_BOYS.percentile.monthly-429752cc.js} +0 -0
  200. /package/build/{WEIGHT_BOYS.percentile.weekly-3a3c029a.js → WEIGHT_BOYS.percentile.weekly-23e7f2f7.js} +0 -0
  201. /package/build/{WEIGHT_BOYS.percentile.yearly-ab37985a.js → WEIGHT_BOYS.percentile.yearly-49c5487e.js} +0 -0
  202. /package/build/{WEIGHT_BOYS.zscore.monthly-57efda55.js → WEIGHT_BOYS.zscore.monthly-80f4945b.js} +0 -0
  203. /package/build/{WEIGHT_BOYS.zscore.weekly-94193753.js → WEIGHT_BOYS.zscore.weekly-0c08c5a7.js} +0 -0
  204. /package/build/{WEIGHT_BOYS.zscore.yearly-87105032.js → WEIGHT_BOYS.zscore.yearly-fc5500b9.js} +0 -0
  205. /package/build/{WEIGHT_GIRLS.percentile.monthly-1fa364b8.js → WEIGHT_GIRLS.percentile.monthly-17fd3272.js} +0 -0
  206. /package/build/{WEIGHT_GIRLS.percentile.weekly-6ae3377b.js → WEIGHT_GIRLS.percentile.weekly-c2b0ce89.js} +0 -0
  207. /package/build/{WEIGHT_GIRLS.percentile.yearly-c593b312.js → WEIGHT_GIRLS.percentile.yearly-f48ff3fd.js} +0 -0
  208. /package/build/{WEIGHT_GIRLS.zscore.monthly-fecd4f64.js → WEIGHT_GIRLS.zscore.monthly-0c2b1197.js} +0 -0
  209. /package/build/{WEIGHT_GIRLS.zscore.weekly-1643fd19.js → WEIGHT_GIRLS.zscore.weekly-a5bb1ae0.js} +0 -0
  210. /package/build/{WEIGHT_GIRLS.zscore.yearly-5da211cc.js → WEIGHT_GIRLS.zscore.yearly-708edfc1.js} +0 -0
  211. /package/build/{constants-668cc2e5.js → constants-1b3cea5d.js} +0 -0
  212. /package/build/{cookieHelper-4f45dbb8.js → cookieHelper-3a0803b2.js} +0 -0
  213. /package/build/{dataTransform-a7507c47.js → dataTransform-10d78994.js} +0 -0
  214. /package/build/esm/{BMI_BOYS.percentile.monthly-3e304387.js → BMI_BOYS.percentile.monthly-6198aea9.js} +0 -0
  215. /package/build/esm/{BMI_BOYS.percentile.weekly-dba58733.js → BMI_BOYS.percentile.weekly-c6afc3e2.js} +0 -0
  216. /package/build/esm/{BMI_BOYS.percentile.yearly-7d2a5262.js → BMI_BOYS.percentile.yearly-46e36a3d.js} +0 -0
  217. /package/build/esm/{BMI_BOYS.zscore.monthly-cf9a9acf.js → BMI_BOYS.zscore.monthly-8c7cc30b.js} +0 -0
  218. /package/build/esm/{BMI_BOYS.zscore.weekly-27bc7023.js → BMI_BOYS.zscore.weekly-981c686f.js} +0 -0
  219. /package/build/esm/{BMI_BOYS.zscore.yearly-8a1848c9.js → BMI_BOYS.zscore.yearly-fb704618.js} +0 -0
  220. /package/build/esm/{BMI_GIRLS.percentile.monthly-3ae14efa.js → BMI_GIRLS.percentile.monthly-ae936a7e.js} +0 -0
  221. /package/build/esm/{BMI_GIRLS.percentile.weekly-23889eb5.js → BMI_GIRLS.percentile.weekly-5cf081ac.js} +0 -0
  222. /package/build/esm/{BMI_GIRLS.percentile.yearly-7d6220a0.js → BMI_GIRLS.percentile.yearly-36aaed23.js} +0 -0
  223. /package/build/esm/{BMI_GIRLS.zscore.monthly-4b4186ab.js → BMI_GIRLS.zscore.monthly-cb709d10.js} +0 -0
  224. /package/build/esm/{BMI_GIRLS.zscore.weekly-4f0e900e.js → BMI_GIRLS.zscore.weekly-925cd031.js} +0 -0
  225. /package/build/esm/{BMI_GIRLS.zscore.yearly-7a6a3589.js → BMI_GIRLS.zscore.yearly-90d4a59f.js} +0 -0
  226. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-b706ec38.js → HEAD CIRCUM_BOYS.percentile.monthly-a729146e.js} +0 -0
  227. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-94c67b1b.js → HEAD CIRCUM_BOYS.percentile.weekly-641f3bf9.js} +0 -0
  228. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-61b346e7.js → HEAD CIRCUM_BOYS.percentile.yearly-85577958.js} +0 -0
  229. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-395c7855.js → HEAD CIRCUM_BOYS.zscore.monthly-aedd75db.js} +0 -0
  230. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-26104ed6.js → HEAD CIRCUM_BOYS.zscore.weekly-0991576d.js} +0 -0
  231. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-5a12ea42.js → HEAD CIRCUM_BOYS.zscore.yearly-8a273cf3.js} +0 -0
  232. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-8ecca100.js → HEAD CIRCUM_GIRLS.percentile.monthly-73fbfc2d.js} +0 -0
  233. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-63eb4486.js → HEAD CIRCUM_GIRLS.percentile.weekly-079e2e6b.js} +0 -0
  234. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-c0036f0f.js → HEAD CIRCUM_GIRLS.percentile.yearly-46469707.js} +0 -0
  235. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-361f637a.js → HEAD CIRCUM_GIRLS.zscore.monthly-6cdfc88a.js} +0 -0
  236. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-c6d6a792.js → HEAD CIRCUM_GIRLS.zscore.weekly-f0290a90.js} +0 -0
  237. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-12fd93f6.js → HEAD CIRCUM_GIRLS.zscore.yearly-e02d2992.js} +0 -0
  238. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-2bede227.js → HEIGHT_BOYS.percentile.monthly-9ee724ae.js} +0 -0
  239. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-050f52eb.js → HEIGHT_BOYS.percentile.weekly-3e590c72.js} +0 -0
  240. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-3b87b132.js → HEIGHT_BOYS.percentile.yearly-ff070e64.js} +0 -0
  241. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-40bef220.js → HEIGHT_BOYS.zscore.monthly-c614cced.js} +0 -0
  242. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-9aa468e7.js → HEIGHT_BOYS.zscore.weekly-4dcf6850.js} +0 -0
  243. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-794b66c2.js → HEIGHT_BOYS.zscore.yearly-c72b1285.js} +0 -0
  244. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-ea31290f.js → HEIGHT_GIRLS.percentile.monthly-1d364b2e.js} +0 -0
  245. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-2aac8847.js → HEIGHT_GIRLS.percentile.weekly-7b1e5c83.js} +0 -0
  246. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-8e278f70.js → HEIGHT_GIRLS.percentile.yearly-c873e1c3.js} +0 -0
  247. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-42417d68.js → HEIGHT_GIRLS.zscore.monthly-d75227b1.js} +0 -0
  248. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-76528e2a.js → HEIGHT_GIRLS.zscore.weekly-f9cd377d.js} +0 -0
  249. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-8262a23a.js → HEIGHT_GIRLS.zscore.yearly-89a29d72.js} +0 -0
  250. /package/build/esm/{Onboarding-4f0cddc4.js → Onboarding-d98b0774.js} +0 -0
  251. /package/build/esm/{Visible-cfbdbafa.js → Visible-62e55d3e.js} +0 -0
  252. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-496c2978.js → WEIGHT_BOYS.percentile.monthly-a66df410.js} +0 -0
  253. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-a45d8435.js → WEIGHT_BOYS.percentile.weekly-14172e08.js} +0 -0
  254. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-fcc0e1d7.js → WEIGHT_BOYS.percentile.yearly-453362aa.js} +0 -0
  255. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-3c064878.js → WEIGHT_BOYS.zscore.monthly-7a70b8e5.js} +0 -0
  256. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-6b1ac607.js → WEIGHT_BOYS.zscore.weekly-55e0b627.js} +0 -0
  257. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-24ec3606.js → WEIGHT_BOYS.zscore.yearly-2c679127.js} +0 -0
  258. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-9a5d79de.js → WEIGHT_GIRLS.percentile.monthly-9d5d371c.js} +0 -0
  259. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-0c8157ed.js → WEIGHT_GIRLS.percentile.weekly-a0384e79.js} +0 -0
  260. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-b04ad579.js → WEIGHT_GIRLS.percentile.yearly-bd2ea6af.js} +0 -0
  261. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-3982ade2.js → WEIGHT_GIRLS.zscore.monthly-64bdb0fc.js} +0 -0
  262. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-a93fe176.js → WEIGHT_GIRLS.zscore.weekly-56458661.js} +0 -0
  263. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-ad2557ae.js → WEIGHT_GIRLS.zscore.yearly-41ca2f72.js} +0 -0
  264. /package/build/esm/{constants-62f03257.js → constants-79a0cf95.js} +0 -0
  265. /package/build/esm/{cookieHelper-d915d8aa.js → cookieHelper-90d9a31a.js} +0 -0
  266. /package/build/esm/{dataTransform-bec9ab4f.js → dataTransform-6bb57668.js} +0 -0
  267. /package/build/esm/{index-5e9f341a.js → index-b4cd461b.js} +0 -0
  268. /package/build/esm/{index-065a85d6.js → index-c67f25ce.js} +0 -0
  269. /package/build/esm/{isProduction-4ca4ba88.js → isProduction-ccc557d7.js} +0 -0
  270. /package/build/esm/{localizeNumberFormat-1d89a8f3.js → localizeNumberFormat-bfa04e69.js} +0 -0
  271. /package/build/esm/{normalizeLink-5db3e984.js → normalizeLink-21af4f5d.js} +0 -0
  272. /package/build/esm/{theme-5660ea9e.js → theme-d64df125.js} +0 -0
  273. /package/build/esm/{translationsContext-ea31a482.js → translationsContext-4a46dcec.js} +0 -0
  274. /package/build/esm/{tslib.es6-5ea1161d.js → tslib.es6-e30da8fd.js} +0 -0
  275. /package/build/esm/{types-db61e319.js → types-7a43b031.js} +0 -0
  276. /package/build/esm/{useIsInit-a958fa22.js → useIsInit-2c0f3461.js} +0 -0
  277. /package/build/esm/{useOutsideClick-904bbdea.js → useOutsideClick-46d61ca1.js} +0 -0
  278. /package/build/esm/{useScrollbarSize-e44804a5.js → useScrollbarSize-538091d5.js} +0 -0
  279. /package/build/esm/{useUniqueId-77ec7ac6.js → useUniqueId-a557d683.js} +0 -0
  280. /package/build/esm/{utils-53d109b3.js → utils-661f0fab.js} +0 -0
  281. /package/build/{index-026bb445.js → index-7c52b547.js} +0 -0
  282. /package/build/{index-cd53c242.js → index-d071c06b.js} +0 -0
  283. /package/build/{isProduction-5377bba0.js → isProduction-8235efe3.js} +0 -0
  284. /package/build/{localizeNumberFormat-6d3a030b.js → localizeNumberFormat-32d87ffb.js} +0 -0
  285. /package/build/{normalizeLink-f0f43c19.js → normalizeLink-3648c728.js} +0 -0
  286. /package/build/{theme-3d7b7e57.js → theme-b350d7e4.js} +0 -0
  287. /package/build/{translationsContext-3005d851.js → translationsContext-fc7a85ee.js} +0 -0
  288. /package/build/{tslib.es6-ff6d8bab.js → tslib.es6-87988b7e.js} +0 -0
  289. /package/build/{types-4a2937e6.js → types-9624c09a.js} +0 -0
  290. /package/build/{useIsInit-771c7f0e.js → useIsInit-57c29596.js} +0 -0
  291. /package/build/{useOutsideClick-0e005c18.js → useOutsideClick-40ff1be4.js} +0 -0
  292. /package/build/{useScrollbarSize-e9659238.js → useScrollbarSize-5cdd7d76.js} +0 -0
  293. /package/build/{useUniqueId-3c96cf52.js → useUniqueId-d28e0617.js} +0 -0
  294. /package/build/{utils-a25ea61c.js → utils-27b7214a.js} +0 -0
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("./tslib.es6-ff6d8bab.js"),t=require("react"),a=require("@mantine/core"),l=require("./index.styled-06bff8be.js"),o=require("./useTranslations-b15251a8.js"),n=require("innertext"),i=require("./theme-3d7b7e57.js"),r=require("./index.styled-6e88c577.js"),s=require("./gAssets.js"),d=require("./index-dfb7b798.js"),c=require("./index-05a92235.js"),u=require("dayjs");require("./screenSizeContext-2a70b050.js");var m=require("styled-components"),p=require("./index-d3826236.js"),g=require("./utils-a25ea61c.js");require("./isProduction-5377bba0.js"),require("./Onboarding-5e427213.js"),require("./index-76781aaa.js"),require("@mantine/hooks");var h=require("./index.styled-6da69873.js"),f=require("./index-922aa090.js"),v=require("./dataTransform-28101413.js"),b=require("./index-2479abce.js"),x=require("./index-b24d30a4.js"),w=require("lodash/debounce"),y=require("react-contenteditable"),C=require("./index-28df8c27.js"),E=require("./index-bcc60c35.js"),k=require("./cookieHelper-4f45dbb8.js"),A=require("react-dom");require("./index-ff37193f.js"),require("./index-8515331b.js"),require("./index.styled-360b806d.js"),require("./index-cd53c242.js"),require("date-fns"),require("react-day-picker/DayPickerInput"),require("./index-023543bd.js"),require("lodash/throttle"),require("keen-slider/react"),require("./types-4a2937e6.js"),require("react-hook-form"),require("date-fns/locale/en-US"),require("date-fns/locale/id"),require("date-fns/locale/vi"),require("date-fns/locale/zh-TW"),require("./index.styled-722fa7a1.js"),require("string-format");var N=require("dayjs/plugin/relativeTime"),T=require("./index-a2bee1ad.js"),S=require("./useUniqueId-3c96cf52.js");require("./translationsContext-3005d851.js");var P=require("./routing-11b59429.js");function L(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function M(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,l.get?l:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var I=M(t),R=L(t),B=L(n),z=L(u),j=L(m),F=L(w),O=L(y),D=M(A),U=L(N);const V=e=>I.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),I.createElement("path",{d:"M3.99403 3.32695C3.86141 3.32698 3.73181 3.36657 3.62181 3.44065C3.5118 3.51472 3.42638 3.61992 3.37648 3.7428C3.32658 3.86567 3.31445 4.00064 3.34165 4.13044C3.36885 4.26024 3.43415 4.37898 3.52919 4.47148L7.05784 8.00013L3.52919 11.5288C3.46521 11.5902 3.41413 11.6638 3.37894 11.7452C3.34375 11.8266 3.32516 11.9142 3.32425 12.0029C3.32335 12.0916 3.34015 12.1796 3.37368 12.2617C3.40721 12.3438 3.45678 12.4185 3.5195 12.4812C3.58222 12.5439 3.65682 12.5935 3.73894 12.627C3.82106 12.6605 3.90904 12.6773 3.99774 12.6764C4.08643 12.6755 4.17405 12.6569 4.25547 12.6217C4.33689 12.5865 4.41047 12.5355 4.4719 12.4715L8.00054 8.94283L11.5292 12.4715C11.5906 12.5355 11.6642 12.5865 11.7456 12.6217C11.827 12.6569 11.9147 12.6755 12.0034 12.6764C12.092 12.6773 12.18 12.6605 12.2621 12.627C12.3443 12.5935 12.4189 12.5439 12.4816 12.4812C12.5443 12.4185 12.5939 12.3439 12.6274 12.2617C12.6609 12.1796 12.6777 12.0916 12.6768 12.0029C12.6759 11.9142 12.6573 11.8266 12.6222 11.7452C12.587 11.6638 12.5359 11.5902 12.4719 11.5288L8.94325 8.00013L12.4719 4.47148C12.5682 4.37784 12.634 4.25728 12.6607 4.1256C12.6873 3.99392 12.6735 3.85726 12.6212 3.73354C12.5688 3.60982 12.4803 3.5048 12.3672 3.43224C12.2542 3.35969 12.1218 3.32299 11.9875 3.32695C11.8143 3.33211 11.6499 3.4045 11.5292 3.52877L8.00054 7.05742L4.4719 3.52877C4.40977 3.46491 4.33548 3.41415 4.2534 3.37948C4.17132 3.34482 4.08313 3.32696 3.99403 3.32695Z"})),_=t.createContext({}),H=({children:e,defaultParams:t})=>R.default.createElement(_.Provider,{value:{defaultParams:t}},e),W=e=>{const{data:{userInfo:a,env:{togetherBasePath:l}}}=t.useContext(h.TogetherComponentGlobalContext),{defaultParams:o}=t.useContext(_)||{},n=null==a?void 0:a.id,i=a&&"number"==typeof a.communities_interacted&&0===a.communities_interacted;return{authActionWrapper:(t,a)=>{const r=Object.assign(Object.assign(Object.assign({},o),e),a);if(!n||i){n||k.deleteCookie(h.BEARER_TOKEN_COOKIE),(null==r?void 0:r._joinCommunityIds)&&(localStorage.setItem("to_join_community_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_community_ids")||"[]")||[]).concat(r._joinCommunityIds).filter(Boolean))))),null==r||delete r._joinCommunityIds),(null==r?void 0:r._joinTopicIds)&&(localStorage.setItem("to_join_topic_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_topic_ids")||"[]")||[]).concat(r._joinTopicIds).filter(Boolean))))),null==r||delete r._joinTopicIds);const e=(null==r?void 0:r._location)||window.location.href;return null==r||delete r._location,window.location.href=h.getUrlToSignUp(e,r,l),null}return t&&t()},params:Object.assign(Object.assign({},o),e)}},q=j.default.div`
1
+ "use strict";var e=require("./tslib.es6-87988b7e.js"),t=require("react"),a=require("@mantine/core"),l=require("./index.styled-ecfffb79.js"),o=require("./useTranslations-ef5fab21.js"),n=require("innertext"),i=require("./theme-b350d7e4.js"),r=require("./index.styled-c4beee2d.js"),s=require("./gAssets.js");require("@mantine/dates");var d=require("./index-880ed496.js");require("./Onboarding-eb1bafb0.js");var c=require("./index-84aa447d.js"),u=require("./index-a0c1abdd.js"),m=require("dayjs");require("./screenSizeContext-0e09fb90.js");var p=require("styled-components"),g=require("./utils-27b7214a.js");require("./isProduction-8235efe3.js"),require("./index-f940d627.js"),require("@mantine/hooks");var h=require("./index.styled-3b98796b.js"),f=require("./index-94d01c18.js"),v=require("./dataTransform-3d1fe75a.js"),b=require("./index-d2e91e47.js"),x=require("./index-602fff84.js"),w=require("lodash/debounce"),y=require("react-contenteditable"),C=require("./index-52ef0508.js"),E=require("./index-ac489f86.js"),k=require("./cookieHelper-3a0803b2.js"),A=require("react-dom");require("./index-7741d720.js"),require("./index-393683bd.js"),require("./index.styled-f732f62a.js"),require("./index-d071c06b.js"),require("date-fns"),require("react-day-picker/DayPickerInput"),require("./index-62c90fc9.js"),require("lodash/throttle"),require("keen-slider/react"),require("./types-9624c09a.js"),require("react-hook-form"),require("date-fns/locale/en-US"),require("date-fns/locale/id"),require("date-fns/locale/vi"),require("date-fns/locale/zh-TW"),require("./index.styled-46729c66.js"),require("string-format");var N=require("dayjs/plugin/relativeTime"),T=require("./index-135d06ea.js"),S=require("./useUniqueId-d28e0617.js");require("./translationsContext-fc7a85ee.js");var P=require("./routing-e1c33fd6.js");function L(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function M(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,l.get?l:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var I=M(t),R=L(t),B=L(n),z=L(m),j=L(p),F=L(w),O=L(y),D=M(A),U=L(N);const V=e=>I.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),I.createElement("path",{d:"M3.99403 3.32695C3.86141 3.32698 3.73181 3.36657 3.62181 3.44065C3.5118 3.51472 3.42638 3.61992 3.37648 3.7428C3.32658 3.86567 3.31445 4.00064 3.34165 4.13044C3.36885 4.26024 3.43415 4.37898 3.52919 4.47148L7.05784 8.00013L3.52919 11.5288C3.46521 11.5902 3.41413 11.6638 3.37894 11.7452C3.34375 11.8266 3.32516 11.9142 3.32425 12.0029C3.32335 12.0916 3.34015 12.1796 3.37368 12.2617C3.40721 12.3438 3.45678 12.4185 3.5195 12.4812C3.58222 12.5439 3.65682 12.5935 3.73894 12.627C3.82106 12.6605 3.90904 12.6773 3.99774 12.6764C4.08643 12.6755 4.17405 12.6569 4.25547 12.6217C4.33689 12.5865 4.41047 12.5355 4.4719 12.4715L8.00054 8.94283L11.5292 12.4715C11.5906 12.5355 11.6642 12.5865 11.7456 12.6217C11.827 12.6569 11.9147 12.6755 12.0034 12.6764C12.092 12.6773 12.18 12.6605 12.2621 12.627C12.3443 12.5935 12.4189 12.5439 12.4816 12.4812C12.5443 12.4185 12.5939 12.3439 12.6274 12.2617C12.6609 12.1796 12.6777 12.0916 12.6768 12.0029C12.6759 11.9142 12.6573 11.8266 12.6222 11.7452C12.587 11.6638 12.5359 11.5902 12.4719 11.5288L8.94325 8.00013L12.4719 4.47148C12.5682 4.37784 12.634 4.25728 12.6607 4.1256C12.6873 3.99392 12.6735 3.85726 12.6212 3.73354C12.5688 3.60982 12.4803 3.5048 12.3672 3.43224C12.2542 3.35969 12.1218 3.32299 11.9875 3.32695C11.8143 3.33211 11.6499 3.4045 11.5292 3.52877L8.00054 7.05742L4.4719 3.52877C4.40977 3.46491 4.33548 3.41415 4.2534 3.37948C4.17132 3.34482 4.08313 3.32696 3.99403 3.32695Z"})),_=t.createContext({}),H=({children:e,defaultParams:t})=>R.default.createElement(_.Provider,{value:{defaultParams:t}},e),W=e=>{const{data:{userInfo:a,env:{togetherBasePath:l}}}=t.useContext(h.TogetherComponentGlobalContext),{defaultParams:o}=t.useContext(_)||{},n=null==a?void 0:a.id,i=a&&"number"==typeof a.communities_interacted&&0===a.communities_interacted;return{authActionWrapper:(t,a)=>{const r=Object.assign(Object.assign(Object.assign({},o),e),a);if(!n||i){n||k.deleteCookie(h.BEARER_TOKEN_COOKIE),(null==r?void 0:r._joinCommunityIds)&&(localStorage.setItem("to_join_community_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_community_ids")||"[]")||[]).concat(r._joinCommunityIds).filter(Boolean))))),null==r||delete r._joinCommunityIds),(null==r?void 0:r._joinTopicIds)&&(localStorage.setItem("to_join_topic_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_topic_ids")||"[]")||[]).concat(r._joinTopicIds).filter(Boolean))))),null==r||delete r._joinTopicIds);const e=(null==r?void 0:r._location)||window.location.href;return null==r||delete r._location,window.location.href=h.getUrlToSignUp(e,r,l),null}return t&&t()},params:Object.assign(Object.assign({},o),e)}},q=j.default.div`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  justify-content: center;
@@ -6,7 +6,7 @@
6
6
  button {
7
7
  position: relative;
8
8
  }
9
- `,G=m.keyframes`
9
+ `,G=p.keyframes`
10
10
  0% {
11
11
  transform: rotate(0deg);
12
12
  }
@@ -959,7 +959,7 @@
959
959
  width: 24px;
960
960
  height: 24px;
961
961
  }
962
- `;const $e=({isOpen:e=!0,onClose:a,enableAnimation:l=!0,hospitalId:n,locale:r,isMobile:d,overwriteProfileProps:c,avatarFallback:u=s.CommonGAssets.getAssetPath("avatar.jpg"),trackingCategory:m="Together"})=>{const{t:p}=o.useTranslations(),[g,v]=t.useState(null),[x,w]=t.useState(!1);t.useEffect((()=>{if(e&&n&&String(null==g?void 0:g.id)!==String(n)){w(!0);try{v(null),h.callApi(h.getCarePath(h.CARE_PATHS.GET_HOSPITAL_INFO,{hospital_branch_id:n,website_url:h.domainLocales[r]}),"get").then((e=>{v(Object.assign(Object.assign({},null==e?void 0:e._data.branch),c))}))}catch(e){console.error(e)}w(!1)}}),[e,n,null==g?void 0:g.id]);const y=(null==g?void 0:g.specialties)||[],C=t.useMemo((()=>y.map((e=>e.name))),[y]);return R.default.createElement(R.default.Fragment,null,R.default.createElement(Ze,{"data-open":e,"data-animation":l,onClick:e=>e.stopPropagation()},x||!g?R.default.createElement(Z,null):R.default.createElement("div",{className:"popup-content"},R.default.createElement("div",{className:"close-button",onClick:a},R.default.createElement("img",{src:Fe,style:{width:20,height:20},alt:"close-icon"})),R.default.createElement("div",{className:"main-info"},R.default.createElement("div",{className:"border-banner"}),R.default.createElement("div",{className:"avatar-title"},R.default.createElement(Xe,null,R.default.createElement("div",{className:"image-container"},R.default.createElement("div",{style:{position:"relative"}},R.default.createElement(f.ImageWithHandler,{src:null==g?void 0:g.logo,className:"profile-image",alt:"avatar",fallbackSrc:u}),R.default.createElement("img",{className:"badge-avatar",src:Oe,alt:"badge"})))),R.default.createElement(Ke,null,R.default.createElement(b.Text,{size:"s3",type:"semiBold",className:"full-name"},null==g?void 0:g.name),R.default.createElement("div",{className:"specialty"},y&&R.default.createElement(b.Text,{size:"p4",color:i.theme.colors.gray800},C.join(" • "),"•"),R.default.createElement("a",{href:h.getCareHospitalUrl({id:g.id,name:g.name,slug:g.slug,locale:r}),className:"organisation",target:"_blank",rel:"noreferrer"},R.default.createElement(b.Text,{size:"p4",className:"organisation",color:i.theme.colors.gray800,style:{textDecoration:"underline"}},null==g?void 0:g.name))))),!d&&R.default.createElement("a",{href:h.getCareHospitalUrl({id:g.id,name:g.name,slug:g.slug,locale:r})},R.default.createElement("div",{className:"btn-wrapper"},R.default.createElement(E.Button,{color:"primary",size:"md",className:"btn-booking"},p("careBooking.bookAnAppointment"))))),R.default.createElement(Ke,null,R.default.createElement("div",{className:"experience"},R.default.createElement(b.Text,{type:"bold",size:"s3",color:i.theme.colors.gray800,style:{paddingBottom:16}},p("hospital.content.description").toUpperCase()),R.default.createElement(b.Text,{size:"p2",color:i.theme.colors.gray500},g.about),d?R.default.createElement("a",{href:h.getCareHospitalUrl({id:g.id,name:g.name,slug:g.slug,locale:r})},R.default.createElement("div",{className:"btn-wrapper"},R.default.createElement(E.Button,{color:"primary",size:"md",className:"btn-booking"},p("careBooking.bookAnAppointment")))):R.default.createElement("a",{href:h.getCareHospitalUrl({id:g.id,name:g.name,slug:g.slug,locale:r})},R.default.createElement(b.Text,{size:"s4",color:"#2D87F3",as:"span","data-event-category":m,"data-event-action":"See Full Hospital Profile","data-event-label":h.getCurrentBaseUrl(r)+h.getCareHospitalUrl({id:g.id,name:g.name,slug:g.slug,locale:r})},p("home.seeHospital"))))))),R.default.createElement(Qe,{"data-open":e,onClick:e=>{e.stopPropagation(),a()}}))};var Ye="_2UKyiK1",Je="E5ga-tI",et="_8Y2nWXX",tt="d0T7kSP";const at=({open:e,onClose:t,children:a,profileModalProps:l})=>{const{t:n}=o.useTranslations();return R.default.createElement(T.Modal,Object.assign({className:Ye,opened:e,onClose:t,overlayOpacity:.2,overflow:"inside",styles:{inner:{padding:0,justifyContent:"flex-end",borderRadius:0},modal:{height:"100%",borderRadius:0},body:{padding:"24px",maxHeight:"100%"}},title:"Profile"},l),R.default.createElement("div",{className:Je},R.default.createElement("div",{className:et},n("profilePanel.modal.heading")),R.default.createElement("div",{className:tt,onClick:t},R.default.createElement(V,null))),a)};var lt=a.createStyles((()=>({root:{},authorBadge:{background:"yellow"}})));z.default.extend(U.default);const ot=t.createContext({}),nt=({siteType:e})=>{const{t:a}=o.useTranslations(),{handleMakeAppointment:l,doctorId:n,hospitalId:i,currentUrl:s}=t.useContext(ot);return R.default.createElement(E.Button,{theme:e,color:"primary",size:"xs",onClick:e=>{null==l||l(n,i),e.stopPropagation()},dataEventCategory:"Care",dataEventAction:"Comment - Quick Booking",dataEventLabel:s,icon:R.default.createElement(r.ArrowRight,{className:"buttonIcon",size:18}),iconPosition:"right",style:{whiteSpace:"nowrap"}},R.default.createElement("span",null,a("careBooking.bookAnAppointment")))},it=e=>{const{className:l="",community:n,name:d,username:c,url:u,avatar:m,role:v,title:b,userType:x="user",expertId:w,isMarryBaby:y,doctorId:C,hospitalId:E,hasQuickBooking:k,handleMakeAppointment:A,communityTrackingAttr:N,isAnonymous:T,showDetailPopup:S,subLine:P,authActionWrapper:L,profileProps:M,profileModalProps:I,extendEle:B,avatarProps:z,hideInfo:j,timeText:F,onCloseFromPost:O,avatarIcon:D,badgeIconSize:U,hideBackground:V,children:_,styles:H,dataEventCategory:W,dataEventAction:q,dataEventLabel:G}=e,{data:{locale:Z,router:Q,env:{isMarryBaby:X,togetherBasePath:K}}}=t.useContext(h.TogetherComponentGlobalContext),{t:$}=o.useTranslations(),{classes:Y}=lt(void 0,{name:"CardAuthor",styles:H}),J="boolean"==typeof y?y:X,ee=J?"marryBaby":"helloSites",te=T?$("cardPost.anonymous"):d||c||"",ae=T?s.CommonGAssets.getAssetPath("avatar.jpg"):m,le=T?void 0:v,[oe,ne]=t.useState(!1),{asPath:ie}=Q||{},re=`https://${p.domainLocales[Z]}${ie}`,se=()=>{if(T||"chatbot"===x)return!1;S?ce(!0):u&&(window.location.href=u)};t.useEffect((()=>{g.toggleNoScroll(oe)}),[oe]);const[de,ce]=t.useState(!1),ue="expert"===(null==e?void 0:e.role),[me,pe]=t.useState(null);return t.useEffect((()=>{de&&!me&&Promise.resolve().then((function(){return Rl})).then((e=>{pe((()=>e.ProfileDetail))}))}),[de]),R.default.createElement(ot.Provider,{value:{handleMakeAppointment:A,doctorId:C,hospitalId:E,currentUrl:re}},R.default.createElement(at,{open:de,onClose:()=>ce(!1),profileModalProps:I},me&&R.default.createElement(me,Object.assign({currentPageUrl:G,authorProps:{userId:null==e?void 0:e.userId,avatar:ae,name:null==e?void 0:e.name,role:null==e?void 0:e.role,title:null==e?void 0:e.title},authActionWrapper:L,onCloseFromPost:()=>{ce(!1),null==O||O()}},M))),"expert"===le&&w?R.default.createElement(Ge,{isOpen:oe,onClose:()=>ne(!1),expertId:w}):null,"expert"===le&&C?R.default.createElement(De,{isOpen:oe,onClose:()=>ne(!1),doctorId:C,locale:Z}):null,"expert"===le&&E?R.default.createElement($e,{isOpen:oe,onClose:()=>ne(!1),hospitalId:E,locale:Z}):null,R.default.createElement("div",{className:`hhg-card-author ${Y.root} ${l} ${ue?"expert-author":""}`,"data-background":!V&&ue,"data-is-marrybaby":J},R.default.createElement(Me,{dataEventCategory:W,dataEventAction:q,dataEventLabel:G,onAvatarClick:se,avatarProps:Object.assign(Object.assign({avatar:T?s.CommonGAssets.getAssetPath(J?"anomyous-avatar-1.svg":"anomyous-avatar.svg"):ae,username:te},z),{style:{cursor:T||!u&&!S?"default":"pointer"}}),avatarIcon:D||ue&&R.default.createElement(xe,{size:U||15})},_?R.default.createElement("div",{onClick:se},_):!j&&R.default.createElement(Me.Row,null,R.default.createElement(Me.ColLeft,null,R.default.createElement(a.Flex,{align:"center",onClick:se},R.default.createElement(Me.MainText,{onClick:se},te,"chatbot"===x?R.default.createElement(R.default.Fragment,null," ",R.default.createElement(r.ShieldCheck,{color:i.theme.colors.primaryBase,size:16,style:{display:"inline-block",transform:"translate(0, 2px)"}})):le&&R.default.createElement(f.AuthorBadge,{className:Y.authorBadge,siteType:ee,role:le,title:b,style:{verticalAlign:"bottom"}}))),P||R.default.createElement(Me.SubTextRow,null,(null==n?void 0:n.name)&&R.default.createElement(Me.SubText,null,R.default.createElement("a",Object.assign({href:(null==n?void 0:n.slug)&&n.isActive&&!n.isHidden?`${K}/${null==n?void 0:n.slug}`:void 0,className:"author-community-name"},N),`${null==n?void 0:n.name}`)),F&&R.default.createElement(R.default.Fragment,null,R.default.createElement(Me.SubDivider,null),R.default.createElement(Me.SubText,{className:"time-text"},F)))),k&&R.default.createElement(Me.ColRight,null,R.default.createElement(nt,{siteType:ee})))),B&&B))};it.BookingBtn=nt,it.MainText=Me.MainText,it.SubText=Me.SubText,it.SubTextRow=Me.SubTextRow,it.SubDivider=Me.SubDivider;const rt=e=>({message:e("notification.failure"),type:"danger"});var st="data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8 14.5C11.3137 14.5 14 11.8137 14 8.5C14 5.18629 11.3137 2.5 8 2.5C4.68629 2.5 2 5.18629 2 8.5C2 11.8137 4.68629 14.5 8 14.5Z' fill='%23FE921D'/%3e%3cpath d='M8 5.5V8.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M8 11.5H8.00708' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";const dt=/<mocka ([^>]*)data-url="true"[^<>]*>(.*?)<\/mocka>/gim,ct=/((?:=")|(?:data-url="true">)|)(https?:\/\/(www\.)?(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))/gim,ut=/\[a\+href="([^<"]+)"(?:\+text=\"([^<"]+)")?\]/gim,mt=/<mention [^>]*data-id="([^<"]+)"[^>]*>([^<]+)<\/mention>/gim,pt=/<mention [^>]*data-id="([^<"]+)" [^\>]*data-name="([^<"]+)"[^>]*>([^<]+)<\/mention>/gim,gt=/\[mention\+id="([^<"]+)"([^\]]*)\]/gim,ht=/^(https?:\/\/(www\.)?(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))$/gim,ft=/^((https?:\/\/)?(www\.)?(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))$/gim,vt=/<a [^>]*href="([^>"]+)"[^>]*>([^<]+)<\/a>/gim,bt=/<mocka [^\>]*data-bad-word="[^\"]*" [^\>]*data-error="true"[^\>]*>(.*?)<\/mocka>/gim,xt=({url:e,text:t,method:a})=>{const l=t.indexOf(t.trimStart()),o=t.trimEnd().length,n=t.substring(0,l),i=t.substring(l,o),r=t.substring(o);return"edit"===a?`${n}<mocka data-href="${e}" data-url="true">${i}</mocka>${r}`:"display"===a&&(e.startsWith("http://")||e.startsWith("https://"))?`${n}<a href="${e}" target="_blank">${i}</a>${r}`:t},wt=(e,t)=>e.replace(ut,((e,a,l)=>xt({text:l||a,url:a,method:t}))).replace(vt,((e,a,l)=>xt({text:l||a,url:a,method:t}))),yt=(e,t=[])=>e.replace(gt,((e,a,l)=>{const o=t.find((e=>String(e.id)===a));if(!o){if(!l)return"";let e="";return l.replace(/\+name="([^<"]+)"/i,((t,a)=>(e=a,t))),`<mention data-id="${a}" data-name="${e}">${e}</mention>`}return`<mention data-id="${a}" data-name="${o.name}">${o.name}</mention>`})),Ct=e=>{const t=[];return e.replace(/(\&amp;)+/g,"&").replace(ct,((e,a,l)=>('="'!==a&&'data-url="true">'!==a&&t.push(l),e))),t},Et=(e,t)=>{const a=[];return e.replace(mt,((e,t)=>(a.push(t),e))).replace(gt,((e,t)=>(a.push(t),e))),t?a:Array.from(new Set(a)).slice(0,30)},kt=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),At=e=>e.replace(bt,"$1"),Nt=(e,t=(e=>e))=>((e,t=(e=>e))=>{var a;return t(null===(a=e.replace(/(\&nbsp;)+/g," ").replace(/(\&amp;)+/g,"&"))||void 0===a?void 0:a.replace(/(\u200c|&zwnj;)+/g,"").replace(ct,((e,t,a)=>'="'!==t&&'data-url="true">'!==t?`<a href="${a}" target="_blank">${a}</a>`:e)).replace(dt,((e,t,a)=>{var l;const o=null===(l=t.match(/data-href="([^"]*)"/im))||void 0===l?void 0:l[1];return o?`<a href="${o}" target="_blank">${a}</a>`:`<a href="${a}" target="_blank">${a}</a>`})))})((e=>e.replace(mt,((e,t,a)=>`[mention+id="${t}"+name="${a}"]`)))(At(e)),t),Tt=["hellobacsi.com","hellosehat.com","hellodoktor.com","hellokrupet.com","hellodoctor.com.ph","hellokhunmor.com","hellosayarwon.com","helloyishi.com.tw","helloswasthya.com","marrybaby.vn"],St=e=>e.match(ft)?e.startsWith("https://")||e.startsWith("http://")?e:`https://${e}`:"",Pt=(e,t)=>{const a=t.filter(Boolean);if(e&&a.length>0){return At(e).replace(new RegExp(`\\b(${a.map((e=>kt(e))).join("|")})\\b`,"gi"),((e,t)=>{const a=document.createElement("mocka");return a.setAttribute("data-bad-word",t),a.setAttribute("data-error","true"),a.innerText=t,`${a.outerHTML}`}))}return e},Lt=(t,a,l)=>"string"==typeof t?Promise.resolve(t):e.__awaiter(void 0,void 0,void 0,(function*(){var e;const o=new FormData;if(t.type.startsWith("image/gif"))o.append("image",t);else{const e=yield Promise.resolve().then((function(){return M(require("browser-image-compression"))})),a=yield e.default(t,{maxSizeMB:.4,maxWidthOrHeight:1536,useWebWorker:!0});o.append("image",a)}const n=l?h.callApiWithAdminAuth:h.callApiWithAuth,i=yield n(h.getApiPath(l?h.ADMIN_PATHS.COMMENT.IMAGE_UPLOAD:h.PATHS.COMMENT.IMAGE_UPLOAD,{_locale:a}),"POST",{data:o});return(null===(e=null==i?void 0:i.data)||void 0===e?void 0:e.image)||""})),Mt=(e,a)=>{const[l,o]=t.useState(e||[]);return{onSelectImages:t=>{const n=t.target.files;if(n)if(a&&e){a((e||l).concat(Array.from(n)))}else o((t=>{const l=e||t;return a&&a(l.concat(Array.from(n))),l.concat(Array.from(n))}))},onRemoveImage:t=>{if(a&&e){const l=e;l.splice(t,1),a(l.slice())}else o((l=>{const o=e||l;return o.splice(t,1),a&&a(o.slice()),o.slice()}))},onRemoveAllImages:()=>{a?a([]):o([])},imageSrcs:t.useMemo((()=>(e||l).map((e=>"string"==typeof e?e:URL.createObjectURL(e)))),[e,l]),imageFiles:e||l}},It=j.default.div`
962
+ `;const $e=({isOpen:e=!0,onClose:a,enableAnimation:l=!0,hospitalId:n,locale:r,isMobile:d,overwriteProfileProps:c,avatarFallback:u=s.CommonGAssets.getAssetPath("avatar.jpg"),trackingCategory:m="Together"})=>{const{t:p}=o.useTranslations(),[g,v]=t.useState(null),[x,w]=t.useState(!1);t.useEffect((()=>{if(e&&n&&String(null==g?void 0:g.id)!==String(n)){w(!0);try{v(null),h.callApi(h.getCarePath(h.CARE_PATHS.GET_HOSPITAL_INFO,{hospital_branch_id:n,website_url:h.domainLocales[r]}),"get").then((e=>{v(Object.assign(Object.assign({},null==e?void 0:e._data.branch),c))}))}catch(e){console.error(e)}w(!1)}}),[e,n,null==g?void 0:g.id]);const y=(null==g?void 0:g.specialties)||[],C=t.useMemo((()=>y.map((e=>e.name))),[y]);return R.default.createElement(R.default.Fragment,null,R.default.createElement(Ze,{"data-open":e,"data-animation":l,onClick:e=>e.stopPropagation()},x||!g?R.default.createElement(Z,null):R.default.createElement("div",{className:"popup-content"},R.default.createElement("div",{className:"close-button",onClick:a},R.default.createElement("img",{src:Fe,style:{width:20,height:20},alt:"close-icon"})),R.default.createElement("div",{className:"main-info"},R.default.createElement("div",{className:"border-banner"}),R.default.createElement("div",{className:"avatar-title"},R.default.createElement(Xe,null,R.default.createElement("div",{className:"image-container"},R.default.createElement("div",{style:{position:"relative"}},R.default.createElement(f.ImageWithHandler,{src:null==g?void 0:g.logo,className:"profile-image",alt:"avatar",fallbackSrc:u}),R.default.createElement("img",{className:"badge-avatar",src:Oe,alt:"badge"})))),R.default.createElement(Ke,null,R.default.createElement(b.Text,{size:"s3",type:"semiBold",className:"full-name"},null==g?void 0:g.name),R.default.createElement("div",{className:"specialty"},y&&R.default.createElement(b.Text,{size:"p4",color:i.theme.colors.gray800},C.join(" • "),"•"),R.default.createElement("a",{href:h.getCareHospitalUrl({id:g.id,name:g.name,slug:g.slug,locale:r}),className:"organisation",target:"_blank",rel:"noreferrer"},R.default.createElement(b.Text,{size:"p4",className:"organisation",color:i.theme.colors.gray800,style:{textDecoration:"underline"}},null==g?void 0:g.name))))),!d&&R.default.createElement("a",{href:h.getCareHospitalUrl({id:g.id,name:g.name,slug:g.slug,locale:r})},R.default.createElement("div",{className:"btn-wrapper"},R.default.createElement(E.Button,{color:"primary",size:"md",className:"btn-booking"},p("careBooking.bookAnAppointment"))))),R.default.createElement(Ke,null,R.default.createElement("div",{className:"experience"},R.default.createElement(b.Text,{type:"bold",size:"s3",color:i.theme.colors.gray800,style:{paddingBottom:16}},p("hospital.content.description").toUpperCase()),R.default.createElement(b.Text,{size:"p2",color:i.theme.colors.gray500},g.about),d?R.default.createElement("a",{href:h.getCareHospitalUrl({id:g.id,name:g.name,slug:g.slug,locale:r})},R.default.createElement("div",{className:"btn-wrapper"},R.default.createElement(E.Button,{color:"primary",size:"md",className:"btn-booking"},p("careBooking.bookAnAppointment")))):R.default.createElement("a",{href:h.getCareHospitalUrl({id:g.id,name:g.name,slug:g.slug,locale:r})},R.default.createElement(b.Text,{size:"s4",color:"#2D87F3",as:"span","data-event-category":m,"data-event-action":"See Full Hospital Profile","data-event-label":h.getCurrentBaseUrl(r)+h.getCareHospitalUrl({id:g.id,name:g.name,slug:g.slug,locale:r})},p("home.seeHospital"))))))),R.default.createElement(Qe,{"data-open":e,onClick:e=>{e.stopPropagation(),a()}}))};var Ye="_2UKyiK1",Je="E5ga-tI",et="_8Y2nWXX",tt="d0T7kSP";const at=({open:e,onClose:t,children:a,profileModalProps:l})=>{const{t:n}=o.useTranslations();return R.default.createElement(T.Modal,Object.assign({className:Ye,opened:e,onClose:t,overlayOpacity:.2,overflow:"inside",styles:{inner:{padding:0,justifyContent:"flex-end",borderRadius:0},modal:{height:"100%",borderRadius:0},body:{padding:"24px",maxHeight:"100%"}},title:"Profile"},l),R.default.createElement("div",{className:Je},R.default.createElement("div",{className:et},n("profilePanel.modal.heading")),R.default.createElement("div",{className:tt,onClick:t},R.default.createElement(V,null))),a)};var lt=a.createStyles((()=>({root:{},authorBadge:{background:"yellow"}})));z.default.extend(U.default);const ot=t.createContext({}),nt=({siteType:e})=>{const{t:a}=o.useTranslations(),{handleMakeAppointment:l,doctorId:n,hospitalId:i,currentUrl:s}=t.useContext(ot);return R.default.createElement(E.Button,{theme:e,color:"primary",size:"xs",onClick:e=>{null==l||l(n,i),e.stopPropagation()},dataEventCategory:"Care",dataEventAction:"Comment - Quick Booking",dataEventLabel:s,icon:R.default.createElement(r.ArrowRight,{className:"buttonIcon",size:18}),iconPosition:"right",style:{whiteSpace:"nowrap"}},R.default.createElement("span",null,a("careBooking.bookAnAppointment")))},it=e=>{const{className:l="",community:n,name:c,username:u,url:m,avatar:p,role:v,title:b,userType:x="user",expertId:w,isMarryBaby:y,doctorId:C,hospitalId:E,hasQuickBooking:k,handleMakeAppointment:A,communityTrackingAttr:N,isAnonymous:T,showDetailPopup:S,subLine:P,authActionWrapper:L,profileProps:M,profileModalProps:I,extendEle:B,avatarProps:z,hideInfo:j,timeText:F,onCloseFromPost:O,avatarIcon:D,badgeIconSize:U,hideBackground:V,children:_,styles:H,dataEventCategory:W,dataEventAction:q,dataEventLabel:G}=e,{data:{locale:Z,router:Q,env:{isMarryBaby:X,togetherBasePath:K}}}=t.useContext(h.TogetherComponentGlobalContext),{t:$}=o.useTranslations(),{classes:Y}=lt(void 0,{name:"CardAuthor",styles:H}),J="boolean"==typeof y?y:X,ee=J?"marryBaby":"helloSites",te=T?$("cardPost.anonymous"):c||u||"",ae=T?s.CommonGAssets.getAssetPath("avatar.jpg"):p,le=T?void 0:v,[oe,ne]=t.useState(!1),{asPath:ie}=Q||{},re=`https://${d.domainLocales[Z]}${ie}`,se=()=>{if(T||"chatbot"===x)return!1;S?ce(!0):m&&(window.location.href=m)};t.useEffect((()=>{g.toggleNoScroll(oe)}),[oe]);const[de,ce]=t.useState(!1),ue="expert"===(null==e?void 0:e.role),[me,pe]=t.useState(null);return t.useEffect((()=>{de&&!me&&Promise.resolve().then((function(){return Rl})).then((e=>{pe((()=>e.ProfileDetail))}))}),[de]),R.default.createElement(ot.Provider,{value:{handleMakeAppointment:A,doctorId:C,hospitalId:E,currentUrl:re}},R.default.createElement(at,{open:de,onClose:()=>ce(!1),profileModalProps:I},me&&R.default.createElement(me,Object.assign({currentPageUrl:G,authorProps:{userId:null==e?void 0:e.userId,avatar:ae,name:null==e?void 0:e.name,role:null==e?void 0:e.role,title:null==e?void 0:e.title},authActionWrapper:L,onCloseFromPost:()=>{ce(!1),null==O||O()}},M))),"expert"===le&&w?R.default.createElement(Ge,{isOpen:oe,onClose:()=>ne(!1),expertId:w}):null,"expert"===le&&C?R.default.createElement(De,{isOpen:oe,onClose:()=>ne(!1),doctorId:C,locale:Z}):null,"expert"===le&&E?R.default.createElement($e,{isOpen:oe,onClose:()=>ne(!1),hospitalId:E,locale:Z}):null,R.default.createElement("div",{className:`hhg-card-author ${Y.root} ${l} ${ue?"expert-author":""}`,"data-background":!V&&ue,"data-is-marrybaby":J},R.default.createElement(Me,{dataEventCategory:W,dataEventAction:q,dataEventLabel:G,onAvatarClick:se,avatarProps:Object.assign(Object.assign({avatar:T?s.CommonGAssets.getAssetPath(J?"anomyous-avatar-1.svg":"anomyous-avatar.svg"):ae,username:te},z),{style:{cursor:T||!m&&!S?"default":"pointer"}}),avatarIcon:D||ue&&R.default.createElement(xe,{size:U||15})},_?R.default.createElement("div",{onClick:se},_):!j&&R.default.createElement(Me.Row,null,R.default.createElement(Me.ColLeft,null,R.default.createElement(a.Flex,{align:"center",onClick:se},R.default.createElement(Me.MainText,{onClick:se},te,"chatbot"===x?R.default.createElement(R.default.Fragment,null," ",R.default.createElement(r.ShieldCheck,{color:i.theme.colors.primaryBase,size:16,style:{display:"inline-block",transform:"translate(0, 2px)"}})):le&&R.default.createElement(f.AuthorBadge,{className:Y.authorBadge,siteType:ee,role:le,title:b,style:{verticalAlign:"bottom"}}))),P||R.default.createElement(Me.SubTextRow,null,(null==n?void 0:n.name)&&R.default.createElement(Me.SubText,null,R.default.createElement("a",Object.assign({href:(null==n?void 0:n.slug)&&n.isActive&&!n.isHidden?`${K}/${null==n?void 0:n.slug}`:void 0,className:"author-community-name"},N),`${null==n?void 0:n.name}`)),F&&R.default.createElement(R.default.Fragment,null,R.default.createElement(Me.SubDivider,null),R.default.createElement(Me.SubText,{className:"time-text"},F)))),k&&R.default.createElement(Me.ColRight,null,R.default.createElement(nt,{siteType:ee})))),B&&B))};it.BookingBtn=nt,it.MainText=Me.MainText,it.SubText=Me.SubText,it.SubTextRow=Me.SubTextRow,it.SubDivider=Me.SubDivider;const rt=e=>({message:e("notification.failure"),type:"danger"});var st="data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8 14.5C11.3137 14.5 14 11.8137 14 8.5C14 5.18629 11.3137 2.5 8 2.5C4.68629 2.5 2 5.18629 2 8.5C2 11.8137 4.68629 14.5 8 14.5Z' fill='%23FE921D'/%3e%3cpath d='M8 5.5V8.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M8 11.5H8.00708' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";const dt=/<mocka ([^>]*)data-url="true"[^<>]*>(.*?)<\/mocka>/gim,ct=/((?:=")|(?:data-url="true">)|)(https?:\/\/(www\.)?(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))/gim,ut=/\[a\+href="([^<"]+)"(?:\+text=\"([^<"]+)")?\]/gim,mt=/<mention [^>]*data-id="([^<"]+)"[^>]*>([^<]+)<\/mention>/gim,pt=/<mention [^>]*data-id="([^<"]+)" [^\>]*data-name="([^<"]+)"[^>]*>([^<]+)<\/mention>/gim,gt=/\[mention\+id="([^<"]+)"([^\]]*)\]/gim,ht=/^(https?:\/\/(www\.)?(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))$/gim,ft=/^((https?:\/\/)?(www\.)?(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))$/gim,vt=/<a [^>]*href="([^>"]+)"[^>]*>([^<]+)<\/a>/gim,bt=/<mocka [^\>]*data-bad-word="[^\"]*" [^\>]*data-error="true"[^\>]*>(.*?)<\/mocka>/gim,xt=({url:e,text:t,method:a})=>{const l=t.indexOf(t.trimStart()),o=t.trimEnd().length,n=t.substring(0,l),i=t.substring(l,o),r=t.substring(o);return"edit"===a?`${n}<mocka data-href="${e}" data-url="true">${i}</mocka>${r}`:"display"===a&&(e.startsWith("http://")||e.startsWith("https://"))?`${n}<a href="${e}" target="_blank">${i}</a>${r}`:t},wt=(e,t)=>e.replace(ut,((e,a,l)=>xt({text:l||a,url:a,method:t}))).replace(vt,((e,a,l)=>xt({text:l||a,url:a,method:t}))),yt=(e,t=[])=>e.replace(gt,((e,a,l)=>{const o=t.find((e=>String(e.id)===a));if(!o){if(!l)return"";let e="";return l.replace(/\+name="([^<"]+)"/i,((t,a)=>(e=a,t))),`<mention data-id="${a}" data-name="${e}">${e}</mention>`}return`<mention data-id="${a}" data-name="${o.name}">${o.name}</mention>`})),Ct=e=>{const t=[];return e.replace(/(\&amp;)+/g,"&").replace(ct,((e,a,l)=>('="'!==a&&'data-url="true">'!==a&&t.push(l),e))),t},Et=(e,t)=>{const a=[];return e.replace(mt,((e,t)=>(a.push(t),e))).replace(gt,((e,t)=>(a.push(t),e))),t?a:Array.from(new Set(a)).slice(0,30)},kt=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),At=e=>e.replace(bt,"$1"),Nt=(e,t=(e=>e))=>((e,t=(e=>e))=>{var a;return t(null===(a=e.replace(/(\&nbsp;)+/g," ").replace(/(\&amp;)+/g,"&"))||void 0===a?void 0:a.replace(/(\u200c|&zwnj;)+/g,"").replace(ct,((e,t,a)=>'="'!==t&&'data-url="true">'!==t?`<a href="${a}" target="_blank">${a}</a>`:e)).replace(dt,((e,t,a)=>{var l;const o=null===(l=t.match(/data-href="([^"]*)"/im))||void 0===l?void 0:l[1];return o?`<a href="${o}" target="_blank">${a}</a>`:`<a href="${a}" target="_blank">${a}</a>`})))})((e=>e.replace(mt,((e,t,a)=>`[mention+id="${t}"+name="${a}"]`)))(At(e)),t),Tt=["hellobacsi.com","hellosehat.com","hellodoktor.com","hellokrupet.com","hellodoctor.com.ph","hellokhunmor.com","hellosayarwon.com","helloyishi.com.tw","helloswasthya.com","marrybaby.vn"],St=e=>e.match(ft)?e.startsWith("https://")||e.startsWith("http://")?e:`https://${e}`:"",Pt=(e,t)=>{const a=t.filter(Boolean);if(e&&a.length>0){return At(e).replace(new RegExp(`\\b(${a.map((e=>kt(e))).join("|")})\\b`,"gi"),((e,t)=>{const a=document.createElement("mocka");return a.setAttribute("data-bad-word",t),a.setAttribute("data-error","true"),a.innerText=t,`${a.outerHTML}`}))}return e},Lt=(t,a,l)=>"string"==typeof t?Promise.resolve(t):e.__awaiter(void 0,void 0,void 0,(function*(){var e;const o=new FormData;if(t.type.startsWith("image/gif"))o.append("image",t);else{const e=yield Promise.resolve().then((function(){return M(require("browser-image-compression"))})),a=yield e.default(t,{maxSizeMB:.4,maxWidthOrHeight:1536,useWebWorker:!0});o.append("image",a)}const n=l?h.callApiWithAdminAuth:h.callApiWithAuth,i=yield n(h.getApiPath(l?h.ADMIN_PATHS.COMMENT.IMAGE_UPLOAD:h.PATHS.COMMENT.IMAGE_UPLOAD,{_locale:a}),"POST",{data:o});return(null===(e=null==i?void 0:i.data)||void 0===e?void 0:e.image)||""})),Mt=(e,a)=>{const[l,o]=t.useState(e||[]);return{onSelectImages:t=>{const n=t.target.files;if(n)if(a&&e){a((e||l).concat(Array.from(n)))}else o((t=>{const l=e||t;return a&&a(l.concat(Array.from(n))),l.concat(Array.from(n))}))},onRemoveImage:t=>{if(a&&e){const l=e;l.splice(t,1),a(l.slice())}else o((l=>{const o=e||l;return o.splice(t,1),a&&a(o.slice()),o.slice()}))},onRemoveAllImages:()=>{a?a([]):o([])},imageSrcs:t.useMemo((()=>(e||l).map((e=>"string"==typeof e?e:URL.createObjectURL(e)))),[e,l]),imageFiles:e||l}},It=j.default.div`
963
963
  input:focus,
964
964
  textarea:focus,
965
965
  [contenteditable='true'] {
@@ -1692,7 +1692,7 @@
1692
1692
  `,ea=j.default.div`
1693
1693
  [data-type='confirm'] {
1694
1694
  max-width: 468px;
1695
- height: 486px;
1695
+ /* height: 486px; */
1696
1696
  padding: 0;
1697
1697
 
1698
1698
  .popup-content {
@@ -1713,7 +1713,8 @@
1713
1713
  height: 56px;
1714
1714
  align-items: center;
1715
1715
  padding: 16px 56px 16px 32px;
1716
- border-bottom: 1px solid ${e=>e.theme.colors.neutral100};
1716
+ border-bottom: 1px solid
1717
+ ${e=>e.theme.colors.neutral100};
1717
1718
  font-weight: 900;
1718
1719
  width: 100%;
1719
1720
  justify-content: space-between;
@@ -1736,7 +1737,7 @@
1736
1737
  }
1737
1738
  }
1738
1739
 
1739
- ${e=>e.isExpand&&m.css`
1740
+ ${e=>e.isExpand&&p.css`
1740
1741
  & > div[data-open] {
1741
1742
  width: 100%;
1742
1743
  height: 100%;
@@ -1745,7 +1746,7 @@
1745
1746
  }
1746
1747
  `}
1747
1748
 
1748
- ${e=>e.hasFullscreen&&m.css`
1749
+ ${e=>e.hasFullscreen&&p.css`
1749
1750
  & > div[data-open] {
1750
1751
  transition: all 0.5s ease-in-out, width 0s, height 0s;
1751
1752
  }
@@ -2634,7 +2635,7 @@
2634
2635
  overflow: hidden;
2635
2636
  border-radius: 1rem;
2636
2637
  }
2637
- `,_a=({url:l,image:o,className:n,style:i,autoPlay:r=!0})=>{const{data:{locale:s}}=t.useContext(h.TogetherComponentGlobalContext),[d,c]=t.useState(null);t.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){if(!o){if(!l)return c(null);c((e=>Object.assign(Object.assign({},e),{isFetching:!0}))),h.callApi(h.getApiPath(h.PATHS.FETCH_PREVIEW,{_locale:s}),"POST",{data:{link:l},headers:{"Content-Type":"application/json"}}).then((e=>{var t,a;c({url:l,image:(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.image)||(null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.logo)})})).catch((()=>{c(null)}))}}))}),[l,o]);const u=o||(null==d?void 0:d.image),m=(null==d?void 0:d.url)||l,p=t.useMemo((()=>(e=>{var t;return e.includes("youtu")&&(null===(t=/(.*?)(^|\/|v=)([a-z0-9_-]{11})(.*)?/gim.exec(e))||void 0===t?void 0:t[3])||""})(m)),[m]),g=t.useMemo((()=>m.includes("facebook.com")||m.includes("fb.watch")),[m]),f=t.useRef(0),v=t.useRef(0),[b,x]=t.useState(!1);t.useEffect((()=>{const e=()=>{var e;const t=null===(e=w.current)||void 0===e?void 0:e.getBoundingClientRect();let a=!1;t&&(!f.current||Math.abs((f.current-t.width)/(null==t?void 0:t.width))>.2)&&(f.current=Math.floor(t.width),a=!0),t&&(!v.current||Math.abs((v.current-t.height)/(null==t?void 0:t.height))>.2)&&(v.current=Math.floor(t.height),a=!0),a&&x((e=>!e))};return e(),window.addEventListener("resize",e,{passive:!0}),()=>{window.removeEventListener("resize",e)}}),[]);const w=t.useRef(null),y=t.useRef(!1),C=a.useMantineTheme();return R.default.createElement(Va,{className:`${n} no-replace-click`,style:i,ref:w,color:C.colors[C.primaryColor][0]},o||!p&&!g?R.default.createElement("a",{href:m,target:"_blank",rel:"noreferrer"},R.default.createElement("div",{className:"link-image-wrapper "+((null==d?void 0:d.isFetching)?"fetching":"")},(null==d?void 0:d.isFetching)?R.default.createElement(Z,{className:"loading-spinner"}):R.default.createElement("img",{className:"link-image",src:u||h.DEFAULT_IMG,onError:e=>{y.current||(y.current=!0,e.currentTarget.src=h.DEFAULT_IMG)}}))):R.default.createElement("div",{className:"link-image-wrapper"},p?R.default.createElement("iframe",{width:"100%",height:"100%",src:`https://www.youtube.com/embed/${p}?&autoplay=${r?1:0}&mute=1&enablejsapi=1`,frameBorder:"0",allowFullScreen:!0,style:{position:"absolute",top:0,left:0,border:"none",overflow:"hidden"}}):g?R.default.createElement("iframe",{key:String(b),src:`https://www.facebook.com/plugins/video.php?href=${encodeURIComponent(m)}&autoplay=${r?1:0}&show_text=false&t=0&width=${f.current}&height=${v.current}`,style:{position:"absolute",top:"50%",left:"50%",border:"none",overflow:"hidden",height:v.current,width:f.current,transform:"translate(-50%, -50%)"},scrolling:"no",frameBorder:"0",allowFullScreen:!0,allow:"autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"}):null))};var Ha="PD6nRZX";const Wa=({className:e,size:t="md"})=>{const{t:a}=o.useTranslations();return R.default.createElement("div",{className:`${Ha} ${e}`},R.default.createElement(E.Button,{size:t,color:"transparent",isLoading:!0},a("loading")))},qa=t.createContext({});var Ga="l5fL1xL",Za="L-aGKo7";const Qa=({children:e,className:t=""})=>R.default.createElement("div",{className:`${Ga} ${t}`},e),Xa=({children:e,className:t=""})=>R.default.createElement("div",{className:`${Za} ${t}`},e);var Ka="eaR8ATZ",$a="xM-7K0a",Ya="DZmf3s7";const Ja=({src:e,defaultSrc:t=s.CommonGAssets.getAssetPath("logo/logomark.png"),ratio:a=1,size:l=80,radius:o=8,alt:n,className:i=""})=>R.default.createElement("div",{className:i},R.default.createElement("div",{className:Ya,style:{width:`${l}px`,height:l*a+"px",borderRadius:`${o}px`}},R.default.createElement(f.ImageWithHandler,{src:e,fallbackSrc:t,alt:n}))),el=({category:e,title:t,src:a,children:l,className:o=""})=>R.default.createElement("div",{className:`${Ka} ${o}`},R.default.createElement(Ja,{src:a}),R.default.createElement("div",{className:$a},l||R.default.createElement("div",null,e&&R.default.createElement(Qa,null,e),t&&R.default.createElement(Xa,null,t))));el.CategoryText=Qa,el.Title=Xa;const tl=({featureImage:e,postTitle:t,author:a,categories:l,isReview:o,className:n=""})=>{var i;const r=o?"Medically reviewed by Jobelle Ann Dela Cruz Bigalbal, MD":"Written by Jobelle Ann Dela Cruz Bigalbal, MD";return R.default.createElement(el,{src:e,className:n},R.default.createElement(R.default.Fragment,null,R.default.createElement(el.CategoryText,null,null===(i=null==l?void 0:l[0])||void 0===i?void 0:i.name),R.default.createElement(el.Title,null,t),R.default.createElement(Me,{avatarProps:Object.assign(Object.assign({},a),{size:32}),subTitle:R.default.createElement(R.default.Fragment,null,r,R.default.createElement(Me.SubDivider,null),"Dec 12, 2022")})))};var al={container:"SFSgnOz",header:"Tf3aoVa",heading:"TOt4QXl",headingIcon:"_5XYN1KT",accBodyGroup:"yE-tZRj",accBodyGroupItem:"LXiGuGT",accBodyGroupDesc:"r4rx-6v",subTitle:"XrHh8-C",subIcon:"c5-Yecd",group:"UBj6nWr",groupBody:"_2vptVBd",articleCardLink:"ZPDAwiR",relatedList:"_6wJn-NR",socialItem:"_21XDdFv",mbChevronWrapper:"LSyr3Zo"};const ll=({className:e=""})=>{var l,n,d,c,u;const{t:m}=o.useTranslations(),{info:p,isMarryBaby:g,currentPageUrl:h}=t.useContext(qa),f=null==p?void 0:p.data,v=[{type:"linkedin",icon:s.CommonGAssets.getAssetPath("linkedin.svg"),url:null===(l=null==p?void 0:p.contact)||void 0===l?void 0:l.linkedin,eventAction:"Doctor Profile - Linkedin"},{type:"instagram",icon:s.CommonGAssets.getAssetPath("instagram.svg"),url:null===(n=null==p?void 0:p.contact)||void 0===n?void 0:n.instagram,eventAction:"Doctor Profile - Instagram"},{type:"facebook",icon:s.CommonGAssets.getAssetPath("facebook.svg"),url:null===(d=null==p?void 0:p.contact)||void 0===d?void 0:d.facebook,eventAction:"Doctor Profile - Facebook"},{type:"youtube",icon:s.CommonGAssets.getAssetPath("youtube.svg"),url:null===(c=null==p?void 0:p.contact)||void 0===c?void 0:c.youtube,eventAction:"Doctor Profile - Youtube"},{type:"tiktok",icon:s.CommonGAssets.getAssetPath("tiktok.svg"),url:null===(u=null==p?void 0:p.contact)||void 0===u?void 0:u.tiktok,eventAction:"Doctor Profile - TikTok"}],b=[...((null==p?void 0:p.experiences)||[]).length>0?[{key:"experience",heading:m("profilePanel.experience"),iconSrc:s.CommonGAssets.getAssetPath(g?"award-doc-mb.svg":"award-doc.svg"),eventAction:"Doctor Experience Click",panel:R.default.createElement("div",{className:al.accBodyGroup},null==p?void 0:p.experiences.map(((e,t)=>R.default.createElement("div",{className:al.accBodyGroupItem,key:String(t)},R.default.createElement("div",{className:al.accBodyGroupTitle},e.title),R.default.createElement("div",{className:al.accBodyGroupDesc},R.default.createElement("p",null,e.organization),R.default.createElement("p",null,e.duration))))))}]:[],...((null==p?void 0:p.educations)||[]).length>0?[{key:"education",heading:m("profilePanel.education"),iconSrc:s.CommonGAssets.getAssetPath(g?"book-mb.svg":"book.svg"),eventAction:"Doctor Degree Click",panel:R.default.createElement("div",{className:al.accBodyGroup},null==p?void 0:p.educations.map(((e,t)=>R.default.createElement("div",{className:al.accBodyGroupItem,key:String(t)},R.default.createElement("div",{className:al.accBodyGroupTitle},e.schoolName),R.default.createElement("div",{className:al.accBodyGroupDesc},R.default.createElement("p",null,e.study),R.default.createElement("p",null,e.completedYear))))))}]:[],...((null==p?void 0:p.awards)||[]).length>0?[{key:"awards",heading:m("profilePanel.awards"),iconSrc:s.CommonGAssets.getAssetPath(g?"award-mb.svg":"award.svg"),eventAction:"Doctor Award Click",panel:R.default.createElement("div",{className:al.accBodyGroup},null==p?void 0:p.awards.map(((e,t)=>R.default.createElement("div",{className:al.accBodyGroupTitle,key:t},e.title))))}]:[]],x=(null==p?void 0:p.relatedPosts)||[],w=v.filter((e=>e.url));return R.default.createElement("div",{className:`${al.container} ${e}`,"data-is-marrybaby":g},b.length>0&&R.default.createElement(a.Accordion,{defaultValue:b[0].key,chevron:g?R.default.createElement("div",{className:al.mbChevronWrapper},R.default.createElement(r.Plus,{size:12,color:i.theme.mbColors.midGray})):R.default.createElement(r.Plus,{color:i.theme.colors.gray400}),styles:{chevron:{"&[data-rotate]":{".minus-path":{display:"block"},".plus-path":{display:"none"}}},content:{display:"flex",flexDirection:"column",gap:"16px",padding:"0"},item:{border:0},control:{paddingLeft:0,"&:hover":{background:"transparent"},"*":{pointerEvents:"none"}}}},b.map((e=>R.default.createElement(a.Accordion.Item,{key:e.key,value:e.key},R.default.createElement(a.Accordion.Control,{"data-event-category":"Together","data-event-action":e.eventAction,"data-event-label":h},R.default.createElement("div",{className:al.header},R.default.createElement("div",{className:al.headingIcon},R.default.createElement("img",{src:e.iconSrc})),R.default.createElement("div",{className:al.heading},e.heading))),R.default.createElement(a.Accordion.Panel,null,e.panel))))),x.length>0&&R.default.createElement("div",{className:al.group},R.default.createElement("div",{className:al.subTitle},R.default.createElement("img",{className:al.subIcon,src:s.CommonGAssets.getAssetPath(g?"mb-logo.svg":"logo/circle-solid.svg")}),m("profilePanel.publishedArticles")),R.default.createElement("div",{className:`${al.relatedList}`},null==p?void 0:p.relatedPosts.map((e=>R.default.createElement("a",{key:String(e.id),href:`${window.location.origin}${null==e?void 0:e.permalink}`,className:al.articleCardLink},R.default.createElement(tl,Object.assign({className:"article-card"},Object.assign(Object.assign({},e),!e.author&&{author:{displayName:null==f?void 0:f.name,avatar:null==f?void 0:f.avatar}}),{isReview:!0}))))))),w.length>0&&R.default.createElement("div",{className:al.group},R.default.createElement("div",{className:al.subTitle},R.default.createElement("img",{className:al.subIcon,src:s.CommonGAssets.getAssetPath(g?"social-mb.svg":"social.svg")}),m("profilePanel.socialLinks")),R.default.createElement("div",{className:al.groupBody},R.default.createElement(a.Flex,null,v.map(((e,t)=>e.url&&R.default.createElement("div",{className:al.socialItem,key:t},R.default.createElement("a",{href:e.url,target:"_blank",rel:"noreferrer"},R.default.createElement("img",{src:e.icon,loading:"lazy",width:"32px","data-event-category":"Together","data-event-action":e.eventAction,"data-event-label":h})))))))))};var ol={container:"GYUElSy",question:"_3C6QpT1",questionTitle:"_9M9VYL6",community:"_1RuSyv3",questionCard:"_1IG-eEp"};const nl=({post:e,className:a=""})=>{var l,n,i,r,s,u,m,p;const{t:g}=o.useTranslations(),{data:{userInfo:f,env:{togetherBasePath:v}}}=t.useContext(h.TogetherComponentGlobalContext),{authActionWrapper:b,authorProps:x,currentPageUrl:w}=t.useContext(qa),y=`${window.location.origin}${v}/${null===(l=null==e?void 0:e.community)||void 0===l?void 0:l.slug}/${null==e?void 0:e.slug}`;return R.default.createElement("div",{className:`${ol.container} ${a}`},R.default.createElement("div",{className:ol.header},R.default.createElement("div",{className:ol.question},g("profilePanel.question")," ",R.default.createElement(d.Anchor,{className:ol.questionTitle,href:"#",onClick:()=>{(null==f?void 0:f.id)||null==b||b((()=>window.location.href=y))}},"#",null==e?void 0:e.title)),R.default.createElement("div",{className:ol.community},null===(n=null==e?void 0:e.community)||void 0===n?void 0:n.name," - ",null==e?void 0:e.createdTime)),R.default.createElement("div",{className:ol.questionCard},R.default.createElement(it,Object.assign({className:"card-author"},x,{role:"user",avatarIcon:R.default.createElement(xe,null),subLine:R.default.createElement(it.SubTextRow,null,R.default.createElement(it.SubText,null,null===(s=null===(r=null===(i=null==e?void 0:e.expertAnswer)||void 0===i?void 0:i.answer)||void 0===r?void 0:r[0])||void 0===s?void 0:s.createdTime))})),R.default.createElement(ba,{className:"post-content-wrapper",description:(null===(p=null===(m=null===(u=null==e?void 0:e.expertAnswer)||void 0===u?void 0:u.answer)||void 0===m?void 0:m[0])||void 0===p?void 0:p.content)||"",mentions:null==e?void 0:e.mentions,"data-testid":"Content of the Post"})),R.default.createElement(c.Button,{variant:"secondary","data-event-category":"Together","data-event-action":"Doctor Reply Click","data-event-label":w,size:"md",onClick:()=>{(null==f?void 0:f.id)?window.location.href=y:null==b||b((()=>window.location.href=y))}},g("profilePanel.anserwing.viewFull")))};var il="MrdoES3",rl="_8fd7YMs",sl="DomiQfw",dl="-b2qnfL";const cl=({message:e,buttonTxt:a,imgSrc:l,onBtnClick:o})=>{const{siteType:n,isMarryBaby:i}=t.useContext(qa);return R.default.createElement("div",{className:rl},R.default.createElement("div",{className:sl},R.default.createElement("img",{src:l||s.CommonGAssets.getAssetPath(i?"comments-mb.svg":"comments.svg")})),e&&R.default.createElement("div",{className:dl},e),a&&R.default.createElement(E.Button,{size:"md",theme:n,color:"secondary",onClick:o},a))},ul=({id:a})=>{const{t:l}=o.useTranslations(),{data:{locale:n}}=t.useContext(h.TogetherComponentGlobalContext),{authorProps:i}=t.useContext(qa),[r,s]=t.useState(null),[d,c]=t.useState(!1);return t.useEffect((()=>{a&&e.__awaiter(void 0,void 0,void 0,(function*(){var e;c(!0);const t=yield h.callApi(h.getApiPath(h.PATHS.USER.LIST_ANSWERS,{_locale:n,id:a}),"GET"),l=((null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.replies)||[]).map(v.formatPost);s(l),c(!1)}))}),[]),R.default.createElement("div",{className:il},d?R.default.createElement(Wa,null):null!==r&&(r.length>0?r.map((e=>R.default.createElement(nl,{className:"post-card",key:e.id,post:e}))):R.default.createElement(cl,{message:l("profilePanel.emptyPostMess.content",{name:(null==i?void 0:i.name)||(null==i?void 0:i.username)})})))},ml=t=>{var{size:a,color:l}=t,o=e.__rest(t,["size","color"]);return R.default.createElement("svg",Object.assign({width:a,height:a,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),R.default.createElement("path",{d:"M9.99983 9.14326L6.94303 12.2001C6.61183 12.5313 6.07423 12.5313 5.74303 12.2001C5.41183 11.8689 5.41183 11.3313 5.74303 11.0001L9.43423 7.30886C9.74703 6.99606 10.2534 6.99606 10.5654 7.30886L14.2566 11.0001C14.5878 11.3313 14.5878 11.8689 14.2566 12.2001C13.9254 12.5313 13.3878 12.5313 13.0566 12.2001L9.99983 9.14326Z",fill:l}))};ml.defaultProps={size:24,color:i.theme.colors.gray600};var pl="toEutn7",gl="drdisHs";const hl=a=>{var l,o,n,i,{post:r}=a,s=e.__rest(a,["post"]);const{data:{env:{togetherBasePath:c}}}=t.useContext(h.TogetherComponentGlobalContext);return R.default.createElement(R.default.Fragment,null,R.default.createElement("div",Object.assign({},s,{className:`${pl} ${(null==s?void 0:s.className)||""}`}),R.default.createElement(it,{className:"card-author",avatar:null===(l=null==r?void 0:r.author)||void 0===l?void 0:l.avatar,name:(null===(o=null==r?void 0:r.author)||void 0===o?void 0:o.name)||(null===(n=null==r?void 0:r.author)||void 0===n?void 0:n.username),isAnonymous:Boolean(null==r?void 0:r.isAnonymous),subLine:R.default.createElement(it.SubTextRow,null,R.default.createElement(it.SubText,null,null==r?void 0:r.createdTime))}),R.default.createElement(d.Anchor,{href:`${window.location.origin}${c}/${null===(i=null==r?void 0:r.community)||void 0===i?void 0:i.slug}/${null==r?void 0:r.slug}`,className:gl,rel:"noreferrer"},null==r?void 0:r.title)))};var fl={accordion:"I-uIJ6E",header:"_41WRsj2",heading:"AcOGL93",headingIcon:"JD3dWJN",panel:"dKAgnS8",chevron:"L2Q9T6m",container:"h-pSmhX"};const vl=()=>{var l,n;const{t:r}=o.useTranslations(),{data:{locale:d,userInfo:c}}=t.useContext(h.TogetherComponentGlobalContext),{onSkipQuestion:u,countValues:m,setCountValues:p}=t.useContext(qa),[g,f]=t.useState(),[b,x]=t.useState([]),[w,y]=t.useState(!1),C=null==c?void 0:c.id;t.useEffect((()=>{C&&e.__awaiter(void 0,void 0,void 0,(function*(){var e;y(!0);const t=yield h.callApiWithAuth(h.getApiPath(h.PATHS.USER.LIST_QUESTION_NEED_REPLY,{_locale:d}),"GET"),a=[],l=Object.create({});((null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.communities)||[]).filter((e=>((null==e?void 0:e.question)||[]).length>0)).map((e=>{l[e.id]=e.question.map(v.formatPost),delete e.question,a.push(v.formatCommunity(e))})),x(a),f(l),y(!1)}))}),[]);const E=({id:e,communityId:t})=>{if(e&&t&&g){const a=Object.assign(Object.assign({},g),{[t]:[...((null==g?void 0:g[t])||[]).filter((t=>t.id!==e))]});let l=0;Object.keys(a).map((e=>l+=a[e].length||0)),f(a),p(Object.assign(Object.assign({},m),{total_question:l})),null==u||u(l)}};return R.default.createElement("div",{className:fl.container},w?R.default.createElement(Wa,null):(null==m?void 0:m.total_question)>0?b.length>0&&R.default.createElement(a.Accordion,{className:fl.accordion,defaultValue:String((null===(n=b[null===(l=Object.keys(b))||void 0===l?void 0:l[0]])||void 0===n?void 0:n.id)||""),styles:e=>({control:{padding:"16px",border:`1px solid ${e.colors.neutral[1]}`,borderTopLeftRadius:"8px",borderTopRightRadius:"8px",'&[aria-expanded="false"]':{borderBottom:0}},chevron:{width:"32px",height:"32px"},content:{padding:0,border:`1px solid ${e.colors.neutral[1]}`,borderTop:0,borderBottom:0},item:{marginBottom:"16px"}}),chevron:R.default.createElement("div",{className:fl.chevron},R.default.createElement(ml,{color:i.theme.colors.gray600,size:20}))},b.map((e=>{const t=g&&(null==g?void 0:g[e.id])||[];return t.length>0&&R.default.createElement(a.Accordion.Item,{key:e.id,value:String(e.id)},R.default.createElement(a.Accordion.Control,null,R.default.createElement("div",{className:fl.header},R.default.createElement("div",{className:fl.headingIcon},R.default.createElement("img",{src:e.thumbnail})),R.default.createElement("div",{className:fl.heading},e.name))),R.default.createElement(a.Accordion.Panel,null,R.default.createElement("div",{className:fl.body},t.map((e=>R.default.createElement(hl,{className:"question-card",key:e.id,post:e,onSkip:E}))))))}))):R.default.createElement(cl,{message:r("profilePanel.emptyCareMess.content"),imgSrc:s.CommonGAssets.getAssetPath("questions.svg")}))};var bl="GA-zc-O",xl="A18McWD",wl="IB049vj",yl="_8I--vEV";const Cl=({post:e,className:a=""})=>{var l;const{data:{userInfo:o,env:{togetherBasePath:n}}}=t.useContext(h.TogetherComponentGlobalContext),{authActionWrapper:i,authorProps:r}=t.useContext(qa),s=`${window.location.origin}${n}/${null===(l=null==e?void 0:e.community)||void 0===l?void 0:l.slug}/${null==e?void 0:e.slug}`;return R.default.createElement("div",{className:`${bl} ${a}`},R.default.createElement("div",{className:wl},R.default.createElement("a",{"data-event-category":"Together","data-event-action":"Click Post","data-event-label":s,className:yl,href:s,onClick:e=>{(null==o?void 0:o.id)||(e.preventDefault(),null==i||i((()=>window.location.href=s)))}}),R.default.createElement(Me,{className:"card-author",avatarProps:{avatar:null==r?void 0:r.avatar,size:32}},R.default.createElement(it.MainText,{className:xl},null==e?void 0:e.title),R.default.createElement(it.SubTextRow,null,R.default.createElement(it.SubText,null,null==e?void 0:e.createdTime))),R.default.createElement(ba,{className:"post-content-wrapper",description:null==e?void 0:e.description,mentions:null==e?void 0:e.mentions,maxChars:200,"data-testid":"Content of the Post"})))};var El="TSMHoEM";const kl=()=>{const{t:a}=o.useTranslations(),{data:{locale:l}}=t.useContext(h.TogetherComponentGlobalContext),{authorId:n,authorProps:i,isAuthorLogin:r,onCloseFromPost:s}=t.useContext(qa),[d,c]=t.useState(null),[u,m]=t.useState(!1);return t.useEffect((()=>{n&&e.__awaiter(void 0,void 0,void 0,(function*(){var e;m(!0);const t=yield h.callApi(h.getApiPath(h.PATHS.USER.LIST_POST,{_locale:l,id:n,isAnonymous:0}),"GET"),a=((null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.posts)||[]).map(v.formatPost);c(a),m(!1)}))}),[n]),R.default.createElement("div",{className:El},u?R.default.createElement(Wa,null):null!==d&&(d.length>0?d.map((e=>R.default.createElement(Cl,{className:"post-card",key:e.id,post:e}))):R.default.createElement(cl,{message:a("profilePanel.emptyPostMess.content",{name:(null==i?void 0:i.name)||(null==i?void 0:i.username)||""}),buttonTxt:r&&a("profilePanel.createPost"),onBtnClick:()=>{null==s||s()}})))};var Al="_4Vekw96",Nl="DIJdGcB",Tl="aQSt4-Q";const Sl=e=>e?{title:null==e?void 0:e.title,organization:null==e?void 0:e.organization,duration:e.duration}:{},Pl=e=>e?{completedYear:null==e?void 0:e.completed_year,schoolName:e.school_name,study:e.study}:{};var Ll,Ml;exports.TabName=void 0,(Ll=exports.TabName||(exports.TabName={}))[Ll.About=0]="About",Ll[Ll.Care=1]="Care",Ll[Ll.Answer=2]="Answer",Ll[Ll.Posts=3]="Posts",function(e){e[e.Expert=0]="Expert",e[e.User=1]="User"}(Ml||(Ml={}));const Il=a=>{var l,n,{authorProps:i,selectedTab:r,authActionWrapper:s,onSkipQuestion:d,onCloseFromPost:c,hideQuestionTab:u,hideAnswerTab:m,showSkipQuestionTag:p,rolesToShowQuestionsTab:g=["expert"],currentPageUrl:b}=a,x=e.__rest(a,["authorProps","selectedTab","authActionWrapper","onSkipQuestion","onCloseFromPost","hideQuestionTab","hideAnswerTab","showSkipQuestionTag","rolesToShowQuestionsTab","currentPageUrl"]);const{data:{locale:w,userInfo:y,env:{isMarryBaby:C}}}=t.useContext(h.TogetherComponentGlobalContext),{t:E}=o.useTranslations(),k=null==i?void 0:i.role,A=null==y?void 0:y.role,N=String(null==i?void 0:i.userId),[T,S]=t.useState(),[P,L]=t.useState(!1),[M,I]=t.useState(),B=(null==y?void 0:y._togetherUserId)===(null==i?void 0:i.userId),j=[...-1!==g.indexOf(k)?[{key:exports.TabName.About,name:E("profilePanel.tabs.highlight"),component:R.default.createElement(ll,{id:N,info:M}),dataEventCategory:"Together",dataEventAction:"Doctor Profile Click",dataEventLabel:b}]:[{key:exports.TabName.Posts,name:E("profilePanel.tabs.posts"),component:R.default.createElement(kl,null),hasCountResult:!0,keyOfCountApi:"post",keyOfResult:"total_post"}],...u||-1===g.indexOf(A)||(null==y?void 0:y._togetherUserId)!==(null==i?void 0:i.userId)?[]:[{key:exports.TabName.Care,name:`${E("profilePanel.tabs.care")}`,component:R.default.createElement(vl,null),hasCountResult:!0,keyOfCountApi:"question",keyOfResult:"total_question",dataEventCategory:"Together",dataEventAction:"Doctor Questions Click",dataEventLabel:b}],...m||-1===g.indexOf(k)?[]:[{key:exports.TabName.Answer,name:`${E("profilePanel.tabs.expertAnswer")}`,component:R.default.createElement(ul,{id:N}),hasCountResult:!0,keyOfCountApi:"reply",keyOfResult:"total_reply",dataEventCategory:"Together",dataEventAction:"Doctor Reply Tab Click",dataEventLabel:b}]],[F,O]=t.useState(null),[D,U]=t.useState(null),V={initialTab:D,tabContent:F,onChange:e=>U(e),styles:e=>({label:{fontSize:e.fontSizes.sm,fontWeight:600}})},_=null==j?void 0:j.filter((e=>null==e?void 0:e.hasCountResult));t.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){var e,t,a,l,o,n,i,s,d;L(!0);const c=yield Promise.all([h.callApi(h.getApiPath(h.PATHS.USER.DETAIL,{_locale:w,id:N}),"GET"),..._.map((e=>h.callApi(h.getApiPath(h.PATHS.USER.COUNT_TABS,{_locale:w,id:N,[e.keyOfCountApi]:1}),"GET")))]),[u]=c,m={data:null==u?void 0:u.data,experiences:((null===(t=null===(e=null==u?void 0:u.data)||void 0===e?void 0:e.fields)||void 0===t?void 0:t.experiences)||[]).map(Sl),relatedPosts:((null===(a=null==u?void 0:u.data)||void 0===a?void 0:a.related_post)||[]).map((e=>v.formatArticle(e.post))),educations:((null===(o=null===(l=null==u?void 0:u.data)||void 0===l?void 0:l.fields)||void 0===o?void 0:o.educations)||[]).map(Pl),awards:(null===(i=null===(n=null==u?void 0:u.data)||void 0===n?void 0:n.fields)||void 0===i?void 0:i.awards_accreditations)||[],contact:(null===(d=null===(s=null==u?void 0:u.data)||void 0===s?void 0:s.fields)||void 0===d?void 0:d.contact)||{}};1===(null==u?void 0:u.status)&&I(m);const p=(null==m?void 0:m.relatedPosts)||[],g=Object.keys(m.contact).map((e=>{var t;return""!==(null===(t=null==m?void 0:m.contact)||void 0===t?void 0:t[e])})),f=[...(null==m?void 0:m.experiences)||[],...(null==m?void 0:m.educations)||[],...(null==m?void 0:m.awards)||[]],b=p.length>0||g.length>0||f.length>0,x={},y=_.map(((e,t)=>{var a,l,o;const n=(null===(o=null===(l=null===(a=c[t+1])||void 0===a?void 0:a.data)||void 0===l?void 0:l.counting)||void 0===o?void 0:o[e.keyOfResult])||0;return n>0?(x[e.keyOfResult]=n,e):-1!==[exports.TabName.Care,exports.TabName.Posts].indexOf(e.key)?e:void 0})).filter(Boolean).map((e=>e.key)),C=j.map((e=>{const t=Object.assign(Object.assign({},e),{name:e.name+(e.keyOfResult?` (${(null==x?void 0:x[e.keyOfResult])||"0"})`:"")});return t.hasCountResult?-1!==y.indexOf(t.key)?t:void 0:t.key===exports.TabName.About?b&&t:t})).filter(Boolean);O(C),U((()=>{if(!r)return 0;const e=null==C?void 0:C.findIndex((e=>e.key===r));return-1!==e?e:0})()),S(x),L(!1)}))}),[]);const H=null==M?void 0:M.data;return R.default.createElement(qa.Provider,{value:{isMarryBaby:C,siteType:C?"marryBaby":"helloSites",authorId:String((null==i?void 0:i.userId)||""),authActionWrapper:s,onSkipQuestion:d,info:M,authorProps:i,onCloseFromPost:c,countValues:T,setCountValues:S,isAuthorLogin:B,showSkipQuestionTag:p,currentPageUrl:b}},R.default.createElement("div",Object.assign({},x,{className:`${Al} ${(null==x?void 0:x.className)||""}`,"data-is-marrybaby":C}),P?R.default.createElement(Wa,null):R.default.createElement(R.default.Fragment,null,R.default.createElement(it,Object.assign({},i,{className:"card-author",showDetailPopup:!1,subLine:"expert"===(null==i?void 0:i.role)?(null==H?void 0:H.specialty)&&(null==H?void 0:H.organisation)&&R.default.createElement(it.SubTextRow,null,(null==H?void 0:H.specialty)&&R.default.createElement(R.default.Fragment,null,R.default.createElement(it.SubText,null,null==H?void 0:H.specialty),R.default.createElement(it.SubDivider,null)),R.default.createElement(it.SubText,null,null==H?void 0:H.organisation)):(null==H?void 0:H.created_at)&&R.default.createElement(it.SubTextRow,null,R.default.createElement(it.SubText,null,E("profilePanel.joined")," ",z.default(null==H?void 0:H.created_at).toNow(!0)))})),"expert"===k&&R.default.createElement("div",{className:Nl,dangerouslySetInnerHTML:{__html:null===(l=null==M?void 0:M.data)||void 0===l?void 0:l.description}}),null!==F&&null!==D&&(F.length>0?R.default.createElement("div",{className:Tl},R.default.createElement(f.Tabs,Object.assign({},V)),null===(n=null==F?void 0:F[D])||void 0===n?void 0:n.component):R.default.createElement(cl,{message:E("profilePanel.emptyPostMess.content",{name:(null==i?void 0:i.name)||(null==i?void 0:i.username)||""})})))))};var Rl=Object.freeze({__proto__:null,get TabName(){return exports.TabName},get UserType(){return Ml},TabDataInit:{experiences:[],relatedPosts:[],educations:[],awards:[],contact:{},data:{}},ProfileDetail:Il}),Bl="KsWg8i6",zl="_9tS0EUN",jl="kyyRKlb",Fl="-Uqqka-";var Ol="data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M5 10C3.9 10 3 10.9 3 12C3 13.1 3.9 14 5 14C6.1 14 7 13.1 7 12C7 10.9 6.1 10 5 10Z' fill='%233E3F58'/%3e %3cpath d='M19 10C17.9 10 17 10.9 17 12C17 13.1 17.9 14 19 14C20.1 14 21 13.1 21 12C21 10.9 20.1 10 19 10Z' fill='%233E3F58'/%3e %3cpath d='M12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10Z' fill='%233E3F58'/%3e %3c/svg%3e",Dl="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='%23595959' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 13.3334L8 10.3704L4 13.3334V3.85187C4 3.53754 4.12041 3.23608 4.33474 3.01382C4.54906 2.79155 4.83975 2.66669 5.14286 2.66669H10.8571C11.1602 2.66669 11.4509 2.79155 11.6653 3.01382C11.8796 3.23608 12 3.53754 12 3.85187V13.3334Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",Ul="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 13.3334L8 10.3704L4 13.3334V3.85187C4 3.53754 4.12041 3.23608 4.33474 3.01382C4.54906 2.79155 4.83975 2.66669 5.14286 2.66669H10.8571C11.1602 2.66669 11.4509 2.79155 11.6653 3.01382C11.8796 3.23608 12 3.53754 12 3.85187V13.3334Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",Vl="data:image/svg+xml,%3csvg width='3' height='13' viewBox='0 0 3 13' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='1.58326' cy='6.41663' r='1.25' transform='rotate(89.9997 1.58326 6.41663)' fill='%23595959'/%3e%3cellipse cx='1.58326' cy='1.41663' rx='1.25' ry='1.25' transform='rotate(89.9997 1.58326 1.41663)' fill='%23595959'/%3e%3cellipse cx='1.58326' cy='11.4166' rx='1.25' ry='1.25' transform='rotate(89.9997 1.58326 11.4166)' fill='%23595959'/%3e%3c/svg%3e",_l="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 5.33337C13.1046 5.33337 14 4.43794 14 3.33337C14 2.2288 13.1046 1.33337 12 1.33337C10.8954 1.33337 10 2.2288 10 3.33337C10 4.43794 10.8954 5.33337 12 5.33337Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M4 10C5.10457 10 6 9.10457 6 8C6 6.89543 5.10457 6 4 6C2.89543 6 2 6.89543 2 8C2 9.10457 2.89543 10 4 10Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M12 14.6666C13.1046 14.6666 14 13.7712 14 12.6666C14 11.5621 13.1046 10.6666 12 10.6666C10.8954 10.6666 10 11.5621 10 12.6666C10 13.7712 10.8954 14.6666 12 14.6666Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M5.72668 9.00665L10.28 11.66' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M10.2734 4.33997L5.72668 6.9933' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",Hl="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M2 4H3.33333H14' stroke='%23737373' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M5.33334 3.99992V2.66659C5.33334 2.31296 5.47382 1.97382 5.72387 1.72378C5.97392 1.47373 6.31305 1.33325 6.66668 1.33325H9.33334C9.68697 1.33325 10.0261 1.47373 10.2762 1.72378C10.5262 1.97382 10.6667 2.31296 10.6667 2.66659V3.99992M12.6667 3.99992V13.3333C12.6667 13.6869 12.5262 14.026 12.2762 14.2761C12.0261 14.5261 11.687 14.6666 11.3333 14.6666H4.66668C4.31305 14.6666 3.97392 14.5261 3.72387 14.2761C3.47382 14.026 3.33334 13.6869 3.33334 13.3333V3.99992H12.6667Z' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M6.66666 7.33325V11.3333' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M9.33334 7.33325V11.3333' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";const Wl=({authorEmail:a,onDeletePost:l,shareUrl:n,post:i,className:r="",popoverClassName:d="",onBookmark:c,onRemoveBookmark:u,onEditPost:m})=>{const{data:{locale:p,userInfo:g,togetherUserId:f,env:{isMarryBaby:v}},action:{pushNotifications:b}}=t.useContext(h.TogetherComponentGlobalContext),{t:x}=o.useTranslations(),[w,y]=t.useState(!1),[C,E]=t.useState(!1),[k,A]=t.useState(!1),{authActionWrapper:N}=W(),T=a&&(null==g?void 0:g.email)&&a===String(null==g?void 0:g.email);return R.default.createElement("div",{className:r,onClick:e=>{e.preventDefault(),e.stopPropagation()}},k&&R.default.createElement(ua,{url:n,text:null==i?void 0:i.title,onClose:()=>A(!1)}),C&&R.default.createElement(oa,{thumbnail:s.CommonGAssets.getAssetPath("trash-bin.svg"),isThumbnailIcon:!0,title:x("popup.deletePost.title"),description:x("popup.deletePost.description"),acceptText:x("popup.deletePost.accept"),cancelText:x("popup.deletePost.cancel"),onAccept:()=>e.__awaiter(void 0,void 0,void 0,(function*(){if((null==i?void 0:i.id)&&!w){y(!0);try{const t=yield(({id:t,locale:a})=>e.__awaiter(void 0,void 0,void 0,(function*(){if(t)return yield h.callApiWithAuth(h.getApiPath(h.PATHS.POST.DELETE,{id:t,_locale:a}),"DELETE")})))({id:i.id,locale:p});1===(null==t?void 0:t.status)&&(null==l||l())}catch(e){}y(!1)}})),onClose:()=>E(!1)}),R.default.createElement(fe,{className:d,toggleButtonContent:R.default.createElement("img",{src:v?Ol:Vl}),position:"bottom",align:"end",buttonProps:{isLoading:w},data:T?{isShowheader:!1,type:"list",list:[{icon:_l,label:x("morePopover.share"),onClick:()=>A(!0)},{icon:"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M7.16952 3.2356H2.99484C2.6785 3.2356 2.37512 3.36126 2.15143 3.58495C1.92774 3.80863 1.80208 4.11202 1.80208 4.42836V12.7777C1.80208 13.094 1.92774 13.3974 2.15143 13.6211C2.37512 13.8448 2.6785 13.9705 2.99484 13.9705H11.3442C11.6605 13.9705 11.9639 13.8448 12.1876 13.6211C12.4113 13.3974 12.537 13.094 12.537 12.7777V8.60303' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M11.6425 2.341C11.8798 2.10375 12.2016 1.97046 12.5371 1.97046C12.8726 1.97046 13.1944 2.10375 13.4317 2.341C13.6689 2.57826 13.8022 2.90005 13.8022 3.23558C13.8022 3.57111 13.6689 3.89289 13.4317 4.13015L7.76607 9.79578L5.38054 10.3922L5.97692 8.00663L11.6425 2.341Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",label:x("actionPopover.edit"),onClick:m},{icon:Hl,label:x("actionPopover.delete"),onClick:()=>{N((()=>E(!0)))}}]}:{isShowheader:!1,type:"list",list:[{icon:_l,label:x("morePopover.share"),onClick:()=>A(!0)},{icon:(null==i?void 0:i.bookmarked)?Dl:Ul,label:(null==i?void 0:i.bookmarked)?x("morePopover.unsavePost"):x("morePopover.savePost"),onClick:()=>{N((()=>e.__awaiter(void 0,void 0,void 0,(function*(){if((null==g?void 0:g.id)&&(null==i?void 0:i.id))if(null==i?void 0:i.bookmarked){const e=yield h.callApiWithAuth(h.getApiPath(h.PATHS.BOOKMARK.DELETE,{_locale:p}),"DELETE",{data:{post_id:String(i.id)}});1===(null==e?void 0:e.status)?(b({title:"",message:"Removed saved post",type:"success",displayIcon:Ul}),u&&u()):b({title:"",message:"Remove failed",type:"danger",displayIcon:Ul})}else{const e=yield h.callApiWithAuth(h.getApiPath(h.PATHS.BOOKMARK.CREATE,{_locale:p}),"POST",{data:{user_id:f||g.id,post_id:i.id}});1===(null==e?void 0:e.status)?(b({title:"",message:"Post saved",type:"success",displayIcon:Dl}),c&&c()):b({title:"",message:"Post saved failed",type:"danger",displayIcon:Ul})}}))))}},{icon:ga,label:x("morePopover.report"),subTree:{title:x("morePopover.report.title"),description:x("morePopover.report.description"),isShowheader:!0,type:"list",list:Object.keys(h.REPORT_REASON_MAP).map((e=>({label:h.REPORT_REASON_MAP[e].label,reason:h.REPORT_REASON_MAP[e].reportReasonText,reasonValue:e}))).map((e=>({label:x(e.label),subTree:{title:x("morePopover.reportSubmit.title"),description:x("morePopover.reportSubmit.description"),isShowheader:!0,type:"jsx",jsxRenderer:t=>R.default.createElement(ha,{reason:e.reasonValue,reasonText:x(e.reason),postId:null==i?void 0:i.id,onClose:()=>t&&t(!1)})}})))}}]}}))},ql=j.default.div`
2638
+ `,_a=({url:l,image:o,className:n,style:i,autoPlay:r=!0})=>{const{data:{locale:s}}=t.useContext(h.TogetherComponentGlobalContext),[d,c]=t.useState(null);t.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){if(!o){if(!l)return c(null);c((e=>Object.assign(Object.assign({},e),{isFetching:!0}))),h.callApi(h.getApiPath(h.PATHS.FETCH_PREVIEW,{_locale:s}),"POST",{data:{link:l},headers:{"Content-Type":"application/json"}}).then((e=>{var t,a;c({url:l,image:(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.image)||(null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.logo)})})).catch((()=>{c(null)}))}}))}),[l,o]);const u=o||(null==d?void 0:d.image),m=(null==d?void 0:d.url)||l,p=t.useMemo((()=>(e=>{var t;return e.includes("youtu")&&(null===(t=/(.*?)(^|\/|v=)([a-z0-9_-]{11})(.*)?/gim.exec(e))||void 0===t?void 0:t[3])||""})(m)),[m]),g=t.useMemo((()=>m.includes("facebook.com")||m.includes("fb.watch")),[m]),f=t.useRef(0),v=t.useRef(0),[b,x]=t.useState(!1);t.useEffect((()=>{const e=()=>{var e;const t=null===(e=w.current)||void 0===e?void 0:e.getBoundingClientRect();let a=!1;t&&(!f.current||Math.abs((f.current-t.width)/(null==t?void 0:t.width))>.2)&&(f.current=Math.floor(t.width),a=!0),t&&(!v.current||Math.abs((v.current-t.height)/(null==t?void 0:t.height))>.2)&&(v.current=Math.floor(t.height),a=!0),a&&x((e=>!e))};return e(),window.addEventListener("resize",e,{passive:!0}),()=>{window.removeEventListener("resize",e)}}),[]);const w=t.useRef(null),y=t.useRef(!1),C=a.useMantineTheme();return R.default.createElement(Va,{className:`${n} no-replace-click`,style:i,ref:w,color:C.colors[C.primaryColor][0]},o||!p&&!g?R.default.createElement("a",{href:m,target:"_blank",rel:"noreferrer"},R.default.createElement("div",{className:"link-image-wrapper "+((null==d?void 0:d.isFetching)?"fetching":"")},(null==d?void 0:d.isFetching)?R.default.createElement(Z,{className:"loading-spinner"}):R.default.createElement("img",{className:"link-image",src:u||h.DEFAULT_IMG,onError:e=>{y.current||(y.current=!0,e.currentTarget.src=h.DEFAULT_IMG)}}))):R.default.createElement("div",{className:"link-image-wrapper"},p?R.default.createElement("iframe",{width:"100%",height:"100%",src:`https://www.youtube.com/embed/${p}?&autoplay=${r?1:0}&mute=1&enablejsapi=1`,frameBorder:"0",allowFullScreen:!0,style:{position:"absolute",top:0,left:0,border:"none",overflow:"hidden"}}):g?R.default.createElement("iframe",{key:String(b),src:`https://www.facebook.com/plugins/video.php?href=${encodeURIComponent(m)}&autoplay=${r?1:0}&show_text=false&t=0&width=${f.current}&height=${v.current}`,style:{position:"absolute",top:"50%",left:"50%",border:"none",overflow:"hidden",height:v.current,width:f.current,transform:"translate(-50%, -50%)"},scrolling:"no",frameBorder:"0",allowFullScreen:!0,allow:"autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"}):null))};var Ha="PD6nRZX";const Wa=({className:e,size:t="md"})=>{const{t:a}=o.useTranslations();return R.default.createElement("div",{className:`${Ha} ${e}`},R.default.createElement(E.Button,{size:t,color:"transparent",isLoading:!0},a("loading")))},qa=t.createContext({});var Ga="l5fL1xL",Za="L-aGKo7";const Qa=({children:e,className:t=""})=>R.default.createElement("div",{className:`${Ga} ${t}`},e),Xa=({children:e,className:t=""})=>R.default.createElement("div",{className:`${Za} ${t}`},e);var Ka="eaR8ATZ",$a="xM-7K0a",Ya="DZmf3s7";const Ja=({src:e,defaultSrc:t=s.CommonGAssets.getAssetPath("logo/logomark.png"),ratio:a=1,size:l=80,radius:o=8,alt:n,className:i=""})=>R.default.createElement("div",{className:i},R.default.createElement("div",{className:Ya,style:{width:`${l}px`,height:l*a+"px",borderRadius:`${o}px`}},R.default.createElement(f.ImageWithHandler,{src:e,fallbackSrc:t,alt:n}))),el=({category:e,title:t,src:a,children:l,className:o=""})=>R.default.createElement("div",{className:`${Ka} ${o}`},R.default.createElement(Ja,{src:a}),R.default.createElement("div",{className:$a},l||R.default.createElement("div",null,e&&R.default.createElement(Qa,null,e),t&&R.default.createElement(Xa,null,t))));el.CategoryText=Qa,el.Title=Xa;const tl=({featureImage:e,postTitle:t,author:a,categories:l,isReview:o,className:n=""})=>{var i;const r=o?"Medically reviewed by Jobelle Ann Dela Cruz Bigalbal, MD":"Written by Jobelle Ann Dela Cruz Bigalbal, MD";return R.default.createElement(el,{src:e,className:n},R.default.createElement(R.default.Fragment,null,R.default.createElement(el.CategoryText,null,null===(i=null==l?void 0:l[0])||void 0===i?void 0:i.name),R.default.createElement(el.Title,null,t),R.default.createElement(Me,{avatarProps:Object.assign(Object.assign({},a),{size:32}),subTitle:R.default.createElement(R.default.Fragment,null,r,R.default.createElement(Me.SubDivider,null),"Dec 12, 2022")})))};var al={container:"SFSgnOz",header:"Tf3aoVa",heading:"TOt4QXl",headingIcon:"_5XYN1KT",accBodyGroup:"yE-tZRj",accBodyGroupItem:"LXiGuGT",accBodyGroupDesc:"r4rx-6v",subTitle:"XrHh8-C",subIcon:"c5-Yecd",group:"UBj6nWr",groupBody:"_2vptVBd",articleCardLink:"ZPDAwiR",relatedList:"_6wJn-NR",socialItem:"_21XDdFv",mbChevronWrapper:"LSyr3Zo"};const ll=({className:e=""})=>{var l,n,d,c,u;const{t:m}=o.useTranslations(),{info:p,isMarryBaby:g,currentPageUrl:h}=t.useContext(qa),f=null==p?void 0:p.data,v=[{type:"linkedin",icon:s.CommonGAssets.getAssetPath("linkedin.svg"),url:null===(l=null==p?void 0:p.contact)||void 0===l?void 0:l.linkedin,eventAction:"Doctor Profile - Linkedin"},{type:"instagram",icon:s.CommonGAssets.getAssetPath("instagram.svg"),url:null===(n=null==p?void 0:p.contact)||void 0===n?void 0:n.instagram,eventAction:"Doctor Profile - Instagram"},{type:"facebook",icon:s.CommonGAssets.getAssetPath("facebook.svg"),url:null===(d=null==p?void 0:p.contact)||void 0===d?void 0:d.facebook,eventAction:"Doctor Profile - Facebook"},{type:"youtube",icon:s.CommonGAssets.getAssetPath("youtube.svg"),url:null===(c=null==p?void 0:p.contact)||void 0===c?void 0:c.youtube,eventAction:"Doctor Profile - Youtube"},{type:"tiktok",icon:s.CommonGAssets.getAssetPath("tiktok.svg"),url:null===(u=null==p?void 0:p.contact)||void 0===u?void 0:u.tiktok,eventAction:"Doctor Profile - TikTok"}],b=[...((null==p?void 0:p.experiences)||[]).length>0?[{key:"experience",heading:m("profilePanel.experience"),iconSrc:s.CommonGAssets.getAssetPath(g?"award-doc-mb.svg":"award-doc.svg"),eventAction:"Doctor Experience Click",panel:R.default.createElement("div",{className:al.accBodyGroup},null==p?void 0:p.experiences.map(((e,t)=>R.default.createElement("div",{className:al.accBodyGroupItem,key:String(t)},R.default.createElement("div",{className:al.accBodyGroupTitle},e.title),R.default.createElement("div",{className:al.accBodyGroupDesc},R.default.createElement("p",null,e.organization),R.default.createElement("p",null,e.duration))))))}]:[],...((null==p?void 0:p.educations)||[]).length>0?[{key:"education",heading:m("profilePanel.education"),iconSrc:s.CommonGAssets.getAssetPath(g?"book-mb.svg":"book.svg"),eventAction:"Doctor Degree Click",panel:R.default.createElement("div",{className:al.accBodyGroup},null==p?void 0:p.educations.map(((e,t)=>R.default.createElement("div",{className:al.accBodyGroupItem,key:String(t)},R.default.createElement("div",{className:al.accBodyGroupTitle},e.schoolName),R.default.createElement("div",{className:al.accBodyGroupDesc},R.default.createElement("p",null,e.study),R.default.createElement("p",null,e.completedYear))))))}]:[],...((null==p?void 0:p.awards)||[]).length>0?[{key:"awards",heading:m("profilePanel.awards"),iconSrc:s.CommonGAssets.getAssetPath(g?"award-mb.svg":"award.svg"),eventAction:"Doctor Award Click",panel:R.default.createElement("div",{className:al.accBodyGroup},null==p?void 0:p.awards.map(((e,t)=>R.default.createElement("div",{className:al.accBodyGroupTitle,key:t},e.title))))}]:[]],x=(null==p?void 0:p.relatedPosts)||[],w=v.filter((e=>e.url));return R.default.createElement("div",{className:`${al.container} ${e}`,"data-is-marrybaby":g},b.length>0&&R.default.createElement(a.Accordion,{defaultValue:b[0].key,chevron:g?R.default.createElement("div",{className:al.mbChevronWrapper},R.default.createElement(r.Plus,{size:12,color:i.theme.mbColors.midGray})):R.default.createElement(r.Plus,{color:i.theme.colors.gray400}),styles:{chevron:{"&[data-rotate]":{".minus-path":{display:"block"},".plus-path":{display:"none"}}},content:{display:"flex",flexDirection:"column",gap:"16px",padding:"0"},item:{border:0},control:{paddingLeft:0,"&:hover":{background:"transparent"},"*":{pointerEvents:"none"}}}},b.map((e=>R.default.createElement(a.Accordion.Item,{key:e.key,value:e.key},R.default.createElement(a.Accordion.Control,{"data-event-category":"Together","data-event-action":e.eventAction,"data-event-label":h},R.default.createElement("div",{className:al.header},R.default.createElement("div",{className:al.headingIcon},R.default.createElement("img",{src:e.iconSrc})),R.default.createElement("div",{className:al.heading},e.heading))),R.default.createElement(a.Accordion.Panel,null,e.panel))))),x.length>0&&R.default.createElement("div",{className:al.group},R.default.createElement("div",{className:al.subTitle},R.default.createElement("img",{className:al.subIcon,src:s.CommonGAssets.getAssetPath(g?"mb-logo.svg":"logo/circle-solid.svg")}),m("profilePanel.publishedArticles")),R.default.createElement("div",{className:`${al.relatedList}`},null==p?void 0:p.relatedPosts.map((e=>R.default.createElement("a",{key:String(e.id),href:`${window.location.origin}${null==e?void 0:e.permalink}`,className:al.articleCardLink},R.default.createElement(tl,Object.assign({className:"article-card"},Object.assign(Object.assign({},e),!e.author&&{author:{displayName:null==f?void 0:f.name,avatar:null==f?void 0:f.avatar}}),{isReview:!0}))))))),w.length>0&&R.default.createElement("div",{className:al.group},R.default.createElement("div",{className:al.subTitle},R.default.createElement("img",{className:al.subIcon,src:s.CommonGAssets.getAssetPath(g?"social-mb.svg":"social.svg")}),m("profilePanel.socialLinks")),R.default.createElement("div",{className:al.groupBody},R.default.createElement(a.Flex,null,v.map(((e,t)=>e.url&&R.default.createElement("div",{className:al.socialItem,key:t},R.default.createElement("a",{href:e.url,target:"_blank",rel:"noreferrer"},R.default.createElement("img",{src:e.icon,loading:"lazy",width:"32px","data-event-category":"Together","data-event-action":e.eventAction,"data-event-label":h})))))))))};var ol={container:"GYUElSy",question:"_3C6QpT1",questionTitle:"_9M9VYL6",community:"_1RuSyv3",questionCard:"_1IG-eEp"};const nl=({post:e,className:a=""})=>{var l,n,i,r,s,d,m,p;const{t:g}=o.useTranslations(),{data:{userInfo:f,env:{togetherBasePath:v}}}=t.useContext(h.TogetherComponentGlobalContext),{authActionWrapper:b,authorProps:x,currentPageUrl:w}=t.useContext(qa),y=`${window.location.origin}${v}/${null===(l=null==e?void 0:e.community)||void 0===l?void 0:l.slug}/${null==e?void 0:e.slug}`;return R.default.createElement("div",{className:`${ol.container} ${a}`},R.default.createElement("div",{className:ol.header},R.default.createElement("div",{className:ol.question},g("profilePanel.question")," ",R.default.createElement(c.Anchor,{className:ol.questionTitle,href:"#",onClick:()=>{(null==f?void 0:f.id)||null==b||b((()=>window.location.href=y))}},"#",null==e?void 0:e.title)),R.default.createElement("div",{className:ol.community},null===(n=null==e?void 0:e.community)||void 0===n?void 0:n.name," - ",null==e?void 0:e.createdTime)),R.default.createElement("div",{className:ol.questionCard},R.default.createElement(it,Object.assign({className:"card-author"},x,{role:"user",avatarIcon:R.default.createElement(xe,null),subLine:R.default.createElement(it.SubTextRow,null,R.default.createElement(it.SubText,null,null===(s=null===(r=null===(i=null==e?void 0:e.expertAnswer)||void 0===i?void 0:i.answer)||void 0===r?void 0:r[0])||void 0===s?void 0:s.createdTime))})),R.default.createElement(ba,{className:"post-content-wrapper",description:(null===(p=null===(m=null===(d=null==e?void 0:e.expertAnswer)||void 0===d?void 0:d.answer)||void 0===m?void 0:m[0])||void 0===p?void 0:p.content)||"",mentions:null==e?void 0:e.mentions,"data-testid":"Content of the Post"})),R.default.createElement(u.Button,{variant:"secondary","data-event-category":"Together","data-event-action":"Doctor Reply Click","data-event-label":w,size:"md",onClick:()=>{(null==f?void 0:f.id)?window.location.href=y:null==b||b((()=>window.location.href=y))}},g("profilePanel.anserwing.viewFull")))};var il="MrdoES3",rl="_8fd7YMs",sl="DomiQfw",dl="-b2qnfL";const cl=({message:e,buttonTxt:a,imgSrc:l,onBtnClick:o})=>{const{siteType:n,isMarryBaby:i}=t.useContext(qa);return R.default.createElement("div",{className:rl},R.default.createElement("div",{className:sl},R.default.createElement("img",{src:l||s.CommonGAssets.getAssetPath(i?"comments-mb.svg":"comments.svg")})),e&&R.default.createElement("div",{className:dl},e),a&&R.default.createElement(E.Button,{size:"md",theme:n,color:"secondary",onClick:o},a))},ul=({id:a})=>{const{t:l}=o.useTranslations(),{data:{locale:n}}=t.useContext(h.TogetherComponentGlobalContext),{authorProps:i}=t.useContext(qa),[r,s]=t.useState(null),[d,c]=t.useState(!1);return t.useEffect((()=>{a&&e.__awaiter(void 0,void 0,void 0,(function*(){var e;c(!0);const t=yield h.callApi(h.getApiPath(h.PATHS.USER.LIST_ANSWERS,{_locale:n,id:a}),"GET"),l=((null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.replies)||[]).map(v.formatPost);s(l),c(!1)}))}),[]),R.default.createElement("div",{className:il},d?R.default.createElement(Wa,null):null!==r&&(r.length>0?r.map((e=>R.default.createElement(nl,{className:"post-card",key:e.id,post:e}))):R.default.createElement(cl,{message:l("profilePanel.emptyPostMess.content",{name:(null==i?void 0:i.name)||(null==i?void 0:i.username)})})))},ml=t=>{var{size:a,color:l}=t,o=e.__rest(t,["size","color"]);return R.default.createElement("svg",Object.assign({width:a,height:a,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),R.default.createElement("path",{d:"M9.99983 9.14326L6.94303 12.2001C6.61183 12.5313 6.07423 12.5313 5.74303 12.2001C5.41183 11.8689 5.41183 11.3313 5.74303 11.0001L9.43423 7.30886C9.74703 6.99606 10.2534 6.99606 10.5654 7.30886L14.2566 11.0001C14.5878 11.3313 14.5878 11.8689 14.2566 12.2001C13.9254 12.5313 13.3878 12.5313 13.0566 12.2001L9.99983 9.14326Z",fill:l}))};ml.defaultProps={size:24,color:i.theme.colors.gray600};var pl="toEutn7",gl="drdisHs";const hl=a=>{var l,o,n,i,{post:r}=a,s=e.__rest(a,["post"]);const{data:{env:{togetherBasePath:d}}}=t.useContext(h.TogetherComponentGlobalContext);return R.default.createElement(R.default.Fragment,null,R.default.createElement("div",Object.assign({},s,{className:`${pl} ${(null==s?void 0:s.className)||""}`}),R.default.createElement(it,{className:"card-author",avatar:null===(l=null==r?void 0:r.author)||void 0===l?void 0:l.avatar,name:(null===(o=null==r?void 0:r.author)||void 0===o?void 0:o.name)||(null===(n=null==r?void 0:r.author)||void 0===n?void 0:n.username),isAnonymous:Boolean(null==r?void 0:r.isAnonymous),subLine:R.default.createElement(it.SubTextRow,null,R.default.createElement(it.SubText,null,null==r?void 0:r.createdTime))}),R.default.createElement(c.Anchor,{href:`${window.location.origin}${d}/${null===(i=null==r?void 0:r.community)||void 0===i?void 0:i.slug}/${null==r?void 0:r.slug}`,className:gl,rel:"noreferrer"},null==r?void 0:r.title)))};var fl={accordion:"I-uIJ6E",header:"_41WRsj2",heading:"AcOGL93",headingIcon:"JD3dWJN",panel:"dKAgnS8",chevron:"L2Q9T6m",container:"h-pSmhX"};const vl=()=>{var l,n;const{t:r}=o.useTranslations(),{data:{locale:d,userInfo:c}}=t.useContext(h.TogetherComponentGlobalContext),{onSkipQuestion:u,countValues:m,setCountValues:p}=t.useContext(qa),[g,f]=t.useState(),[b,x]=t.useState([]),[w,y]=t.useState(!1),C=null==c?void 0:c.id;t.useEffect((()=>{C&&e.__awaiter(void 0,void 0,void 0,(function*(){var e;y(!0);const t=yield h.callApiWithAuth(h.getApiPath(h.PATHS.USER.LIST_QUESTION_NEED_REPLY,{_locale:d}),"GET"),a=[],l=Object.create({});((null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.communities)||[]).filter((e=>((null==e?void 0:e.question)||[]).length>0)).map((e=>{l[e.id]=e.question.map(v.formatPost),delete e.question,a.push(v.formatCommunity(e))})),x(a),f(l),y(!1)}))}),[]);const E=({id:e,communityId:t})=>{if(e&&t&&g){const a=Object.assign(Object.assign({},g),{[t]:[...((null==g?void 0:g[t])||[]).filter((t=>t.id!==e))]});let l=0;Object.keys(a).map((e=>l+=a[e].length||0)),f(a),p(Object.assign(Object.assign({},m),{total_question:l})),null==u||u(l)}};return R.default.createElement("div",{className:fl.container},w?R.default.createElement(Wa,null):(null==m?void 0:m.total_question)>0?b.length>0&&R.default.createElement(a.Accordion,{className:fl.accordion,defaultValue:String((null===(n=b[null===(l=Object.keys(b))||void 0===l?void 0:l[0]])||void 0===n?void 0:n.id)||""),styles:e=>({control:{padding:"16px",border:`1px solid ${e.colors.neutral[1]}`,borderTopLeftRadius:"8px",borderTopRightRadius:"8px",'&[aria-expanded="false"]':{borderBottom:0}},chevron:{width:"32px",height:"32px"},content:{padding:0,border:`1px solid ${e.colors.neutral[1]}`,borderTop:0,borderBottom:0},item:{marginBottom:"16px"}}),chevron:R.default.createElement("div",{className:fl.chevron},R.default.createElement(ml,{color:i.theme.colors.gray600,size:20}))},b.map((e=>{const t=g&&(null==g?void 0:g[e.id])||[];return t.length>0&&R.default.createElement(a.Accordion.Item,{key:e.id,value:String(e.id)},R.default.createElement(a.Accordion.Control,null,R.default.createElement("div",{className:fl.header},R.default.createElement("div",{className:fl.headingIcon},R.default.createElement("img",{src:e.thumbnail})),R.default.createElement("div",{className:fl.heading},e.name))),R.default.createElement(a.Accordion.Panel,null,R.default.createElement("div",{className:fl.body},t.map((e=>R.default.createElement(hl,{className:"question-card",key:e.id,post:e,onSkip:E}))))))}))):R.default.createElement(cl,{message:r("profilePanel.emptyCareMess.content"),imgSrc:s.CommonGAssets.getAssetPath("questions.svg")}))};var bl="GA-zc-O",xl="A18McWD",wl="IB049vj",yl="_8I--vEV";const Cl=({post:e,className:a=""})=>{var l;const{data:{userInfo:o,env:{togetherBasePath:n}}}=t.useContext(h.TogetherComponentGlobalContext),{authActionWrapper:i,authorProps:r}=t.useContext(qa),s=`${window.location.origin}${n}/${null===(l=null==e?void 0:e.community)||void 0===l?void 0:l.slug}/${null==e?void 0:e.slug}`;return R.default.createElement("div",{className:`${bl} ${a}`},R.default.createElement("div",{className:wl},R.default.createElement("a",{"data-event-category":"Together","data-event-action":"Click Post","data-event-label":s,className:yl,href:s,onClick:e=>{(null==o?void 0:o.id)||(e.preventDefault(),null==i||i((()=>window.location.href=s)))}}),R.default.createElement(Me,{className:"card-author",avatarProps:{avatar:null==r?void 0:r.avatar,size:32}},R.default.createElement(it.MainText,{className:xl},null==e?void 0:e.title),R.default.createElement(it.SubTextRow,null,R.default.createElement(it.SubText,null,null==e?void 0:e.createdTime))),R.default.createElement(ba,{className:"post-content-wrapper",description:null==e?void 0:e.description,mentions:null==e?void 0:e.mentions,maxChars:200,"data-testid":"Content of the Post"})))};var El="TSMHoEM";const kl=()=>{const{t:a}=o.useTranslations(),{data:{locale:l}}=t.useContext(h.TogetherComponentGlobalContext),{authorId:n,authorProps:i,isAuthorLogin:r,onCloseFromPost:s}=t.useContext(qa),[d,c]=t.useState(null),[u,m]=t.useState(!1);return t.useEffect((()=>{n&&e.__awaiter(void 0,void 0,void 0,(function*(){var e;m(!0);const t=yield h.callApi(h.getApiPath(h.PATHS.USER.LIST_POST,{_locale:l,id:n,isAnonymous:0}),"GET"),a=((null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.posts)||[]).map(v.formatPost);c(a),m(!1)}))}),[n]),R.default.createElement("div",{className:El},u?R.default.createElement(Wa,null):null!==d&&(d.length>0?d.map((e=>R.default.createElement(Cl,{className:"post-card",key:e.id,post:e}))):R.default.createElement(cl,{message:a("profilePanel.emptyPostMess.content",{name:(null==i?void 0:i.name)||(null==i?void 0:i.username)||""}),buttonTxt:r&&a("profilePanel.createPost"),onBtnClick:()=>{null==s||s()}})))};var Al="_4Vekw96",Nl="DIJdGcB",Tl="aQSt4-Q";const Sl=e=>e?{title:null==e?void 0:e.title,organization:null==e?void 0:e.organization,duration:e.duration}:{},Pl=e=>e?{completedYear:null==e?void 0:e.completed_year,schoolName:e.school_name,study:e.study}:{};var Ll,Ml;exports.TabName=void 0,(Ll=exports.TabName||(exports.TabName={}))[Ll.About=0]="About",Ll[Ll.Care=1]="Care",Ll[Ll.Answer=2]="Answer",Ll[Ll.Posts=3]="Posts",function(e){e[e.Expert=0]="Expert",e[e.User=1]="User"}(Ml||(Ml={}));const Il=a=>{var l,n,{authorProps:i,selectedTab:r,authActionWrapper:s,onSkipQuestion:d,onCloseFromPost:c,hideQuestionTab:u,hideAnswerTab:m,showSkipQuestionTag:p,rolesToShowQuestionsTab:g=["expert"],currentPageUrl:b}=a,x=e.__rest(a,["authorProps","selectedTab","authActionWrapper","onSkipQuestion","onCloseFromPost","hideQuestionTab","hideAnswerTab","showSkipQuestionTag","rolesToShowQuestionsTab","currentPageUrl"]);const{data:{locale:w,userInfo:y,env:{isMarryBaby:C}}}=t.useContext(h.TogetherComponentGlobalContext),{t:E}=o.useTranslations(),k=null==i?void 0:i.role,A=null==y?void 0:y.role,N=String(null==i?void 0:i.userId),[T,S]=t.useState(),[P,L]=t.useState(!1),[M,I]=t.useState(),B=(null==y?void 0:y._togetherUserId)===(null==i?void 0:i.userId),j=[...-1!==g.indexOf(k)?[{key:exports.TabName.About,name:E("profilePanel.tabs.highlight"),component:R.default.createElement(ll,{id:N,info:M}),dataEventCategory:"Together",dataEventAction:"Doctor Profile Click",dataEventLabel:b}]:[{key:exports.TabName.Posts,name:E("profilePanel.tabs.posts"),component:R.default.createElement(kl,null),hasCountResult:!0,keyOfCountApi:"post",keyOfResult:"total_post"}],...u||-1===g.indexOf(A)||(null==y?void 0:y._togetherUserId)!==(null==i?void 0:i.userId)?[]:[{key:exports.TabName.Care,name:`${E("profilePanel.tabs.care")}`,component:R.default.createElement(vl,null),hasCountResult:!0,keyOfCountApi:"question",keyOfResult:"total_question",dataEventCategory:"Together",dataEventAction:"Doctor Questions Click",dataEventLabel:b}],...m||-1===g.indexOf(k)?[]:[{key:exports.TabName.Answer,name:`${E("profilePanel.tabs.expertAnswer")}`,component:R.default.createElement(ul,{id:N}),hasCountResult:!0,keyOfCountApi:"reply",keyOfResult:"total_reply",dataEventCategory:"Together",dataEventAction:"Doctor Reply Tab Click",dataEventLabel:b}]],[F,O]=t.useState(null),[D,U]=t.useState(null),V={initialTab:D,tabContent:F,onChange:e=>U(e),styles:e=>({label:{fontSize:e.fontSizes.sm,fontWeight:600}})},_=null==j?void 0:j.filter((e=>null==e?void 0:e.hasCountResult));t.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){var e,t,a,l,o,n,i,s,d;L(!0);const c=yield Promise.all([h.callApi(h.getApiPath(h.PATHS.USER.DETAIL,{_locale:w,id:N}),"GET"),..._.map((e=>h.callApi(h.getApiPath(h.PATHS.USER.COUNT_TABS,{_locale:w,id:N,[e.keyOfCountApi]:1}),"GET")))]),[u]=c,m={data:null==u?void 0:u.data,experiences:((null===(t=null===(e=null==u?void 0:u.data)||void 0===e?void 0:e.fields)||void 0===t?void 0:t.experiences)||[]).map(Sl),relatedPosts:((null===(a=null==u?void 0:u.data)||void 0===a?void 0:a.related_post)||[]).map((e=>v.formatArticle(e.post))),educations:((null===(o=null===(l=null==u?void 0:u.data)||void 0===l?void 0:l.fields)||void 0===o?void 0:o.educations)||[]).map(Pl),awards:(null===(i=null===(n=null==u?void 0:u.data)||void 0===n?void 0:n.fields)||void 0===i?void 0:i.awards_accreditations)||[],contact:(null===(d=null===(s=null==u?void 0:u.data)||void 0===s?void 0:s.fields)||void 0===d?void 0:d.contact)||{}};1===(null==u?void 0:u.status)&&I(m);const p=(null==m?void 0:m.relatedPosts)||[],g=Object.keys(m.contact).map((e=>{var t;return""!==(null===(t=null==m?void 0:m.contact)||void 0===t?void 0:t[e])})),f=[...(null==m?void 0:m.experiences)||[],...(null==m?void 0:m.educations)||[],...(null==m?void 0:m.awards)||[]],b=p.length>0||g.length>0||f.length>0,x={},y=_.map(((e,t)=>{var a,l,o;const n=(null===(o=null===(l=null===(a=c[t+1])||void 0===a?void 0:a.data)||void 0===l?void 0:l.counting)||void 0===o?void 0:o[e.keyOfResult])||0;return n>0?(x[e.keyOfResult]=n,e):-1!==[exports.TabName.Care,exports.TabName.Posts].indexOf(e.key)?e:void 0})).filter(Boolean).map((e=>e.key)),C=j.map((e=>{const t=Object.assign(Object.assign({},e),{name:e.name+(e.keyOfResult?` (${(null==x?void 0:x[e.keyOfResult])||"0"})`:"")});return t.hasCountResult?-1!==y.indexOf(t.key)?t:void 0:t.key===exports.TabName.About?b&&t:t})).filter(Boolean);O(C),U((()=>{if(!r)return 0;const e=null==C?void 0:C.findIndex((e=>e.key===r));return-1!==e?e:0})()),S(x),L(!1)}))}),[]);const H=null==M?void 0:M.data;return R.default.createElement(qa.Provider,{value:{isMarryBaby:C,siteType:C?"marryBaby":"helloSites",authorId:String((null==i?void 0:i.userId)||""),authActionWrapper:s,onSkipQuestion:d,info:M,authorProps:i,onCloseFromPost:c,countValues:T,setCountValues:S,isAuthorLogin:B,showSkipQuestionTag:p,currentPageUrl:b}},R.default.createElement("div",Object.assign({},x,{className:`${Al} ${(null==x?void 0:x.className)||""}`,"data-is-marrybaby":C}),P?R.default.createElement(Wa,null):R.default.createElement(R.default.Fragment,null,R.default.createElement(it,Object.assign({},i,{className:"card-author",showDetailPopup:!1,subLine:"expert"===(null==i?void 0:i.role)?(null==H?void 0:H.specialty)&&(null==H?void 0:H.organisation)&&R.default.createElement(it.SubTextRow,null,(null==H?void 0:H.specialty)&&R.default.createElement(R.default.Fragment,null,R.default.createElement(it.SubText,null,null==H?void 0:H.specialty),R.default.createElement(it.SubDivider,null)),R.default.createElement(it.SubText,null,null==H?void 0:H.organisation)):(null==H?void 0:H.created_at)&&R.default.createElement(it.SubTextRow,null,R.default.createElement(it.SubText,null,E("profilePanel.joined")," ",z.default(null==H?void 0:H.created_at).toNow(!0)))})),"expert"===k&&R.default.createElement("div",{className:Nl,dangerouslySetInnerHTML:{__html:null===(l=null==M?void 0:M.data)||void 0===l?void 0:l.description}}),null!==F&&null!==D&&(F.length>0?R.default.createElement("div",{className:Tl},R.default.createElement(f.Tabs,Object.assign({},V)),null===(n=null==F?void 0:F[D])||void 0===n?void 0:n.component):R.default.createElement(cl,{message:E("profilePanel.emptyPostMess.content",{name:(null==i?void 0:i.name)||(null==i?void 0:i.username)||""})})))))};var Rl=Object.freeze({__proto__:null,get TabName(){return exports.TabName},get UserType(){return Ml},TabDataInit:{experiences:[],relatedPosts:[],educations:[],awards:[],contact:{},data:{}},ProfileDetail:Il}),Bl="KsWg8i6",zl="_9tS0EUN",jl="kyyRKlb",Fl="-Uqqka-";var Ol="data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M5 10C3.9 10 3 10.9 3 12C3 13.1 3.9 14 5 14C6.1 14 7 13.1 7 12C7 10.9 6.1 10 5 10Z' fill='%233E3F58'/%3e %3cpath d='M19 10C17.9 10 17 10.9 17 12C17 13.1 17.9 14 19 14C20.1 14 21 13.1 21 12C21 10.9 20.1 10 19 10Z' fill='%233E3F58'/%3e %3cpath d='M12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10Z' fill='%233E3F58'/%3e %3c/svg%3e",Dl="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='%23595959' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 13.3334L8 10.3704L4 13.3334V3.85187C4 3.53754 4.12041 3.23608 4.33474 3.01382C4.54906 2.79155 4.83975 2.66669 5.14286 2.66669H10.8571C11.1602 2.66669 11.4509 2.79155 11.6653 3.01382C11.8796 3.23608 12 3.53754 12 3.85187V13.3334Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",Ul="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 13.3334L8 10.3704L4 13.3334V3.85187C4 3.53754 4.12041 3.23608 4.33474 3.01382C4.54906 2.79155 4.83975 2.66669 5.14286 2.66669H10.8571C11.1602 2.66669 11.4509 2.79155 11.6653 3.01382C11.8796 3.23608 12 3.53754 12 3.85187V13.3334Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",Vl="data:image/svg+xml,%3csvg width='3' height='13' viewBox='0 0 3 13' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='1.58326' cy='6.41663' r='1.25' transform='rotate(89.9997 1.58326 6.41663)' fill='%23595959'/%3e%3cellipse cx='1.58326' cy='1.41663' rx='1.25' ry='1.25' transform='rotate(89.9997 1.58326 1.41663)' fill='%23595959'/%3e%3cellipse cx='1.58326' cy='11.4166' rx='1.25' ry='1.25' transform='rotate(89.9997 1.58326 11.4166)' fill='%23595959'/%3e%3c/svg%3e",_l="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 5.33337C13.1046 5.33337 14 4.43794 14 3.33337C14 2.2288 13.1046 1.33337 12 1.33337C10.8954 1.33337 10 2.2288 10 3.33337C10 4.43794 10.8954 5.33337 12 5.33337Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M4 10C5.10457 10 6 9.10457 6 8C6 6.89543 5.10457 6 4 6C2.89543 6 2 6.89543 2 8C2 9.10457 2.89543 10 4 10Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M12 14.6666C13.1046 14.6666 14 13.7712 14 12.6666C14 11.5621 13.1046 10.6666 12 10.6666C10.8954 10.6666 10 11.5621 10 12.6666C10 13.7712 10.8954 14.6666 12 14.6666Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M5.72668 9.00665L10.28 11.66' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M10.2734 4.33997L5.72668 6.9933' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",Hl="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M2 4H3.33333H14' stroke='%23737373' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M5.33334 3.99992V2.66659C5.33334 2.31296 5.47382 1.97382 5.72387 1.72378C5.97392 1.47373 6.31305 1.33325 6.66668 1.33325H9.33334C9.68697 1.33325 10.0261 1.47373 10.2762 1.72378C10.5262 1.97382 10.6667 2.31296 10.6667 2.66659V3.99992M12.6667 3.99992V13.3333C12.6667 13.6869 12.5262 14.026 12.2762 14.2761C12.0261 14.5261 11.687 14.6666 11.3333 14.6666H4.66668C4.31305 14.6666 3.97392 14.5261 3.72387 14.2761C3.47382 14.026 3.33334 13.6869 3.33334 13.3333V3.99992H12.6667Z' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M6.66666 7.33325V11.3333' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M9.33334 7.33325V11.3333' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";const Wl=({authorEmail:a,onDeletePost:l,shareUrl:n,post:i,className:r="",popoverClassName:d="",onBookmark:c,onRemoveBookmark:u,onEditPost:m})=>{const{data:{locale:p,userInfo:g,togetherUserId:f,env:{isMarryBaby:v}},action:{pushNotifications:b}}=t.useContext(h.TogetherComponentGlobalContext),{t:x}=o.useTranslations(),[w,y]=t.useState(!1),[C,E]=t.useState(!1),[k,A]=t.useState(!1),{authActionWrapper:N}=W(),T=a&&(null==g?void 0:g.email)&&a===String(null==g?void 0:g.email);return R.default.createElement("div",{className:r,onClick:e=>{e.preventDefault(),e.stopPropagation()}},k&&R.default.createElement(ua,{url:n,text:null==i?void 0:i.title,onClose:()=>A(!1)}),C&&R.default.createElement(oa,{thumbnail:s.CommonGAssets.getAssetPath("trash-bin.svg"),isThumbnailIcon:!0,title:x("popup.deletePost.title"),description:x("popup.deletePost.description"),acceptText:x("popup.deletePost.accept"),cancelText:x("popup.deletePost.cancel"),onAccept:()=>e.__awaiter(void 0,void 0,void 0,(function*(){if((null==i?void 0:i.id)&&!w){y(!0);try{const t=yield(({id:t,locale:a})=>e.__awaiter(void 0,void 0,void 0,(function*(){if(t)return yield h.callApiWithAuth(h.getApiPath(h.PATHS.POST.DELETE,{id:t,_locale:a}),"DELETE")})))({id:i.id,locale:p});1===(null==t?void 0:t.status)&&(null==l||l())}catch(e){}y(!1)}})),onClose:()=>E(!1)}),R.default.createElement(fe,{className:d,toggleButtonContent:R.default.createElement("img",{src:v?Ol:Vl}),position:"bottom",align:"end",buttonProps:{isLoading:w},data:T?{isShowheader:!1,type:"list",list:[{icon:_l,label:x("morePopover.share"),onClick:()=>A(!0)},{icon:"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M7.16952 3.2356H2.99484C2.6785 3.2356 2.37512 3.36126 2.15143 3.58495C1.92774 3.80863 1.80208 4.11202 1.80208 4.42836V12.7777C1.80208 13.094 1.92774 13.3974 2.15143 13.6211C2.37512 13.8448 2.6785 13.9705 2.99484 13.9705H11.3442C11.6605 13.9705 11.9639 13.8448 12.1876 13.6211C12.4113 13.3974 12.537 13.094 12.537 12.7777V8.60303' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M11.6425 2.341C11.8798 2.10375 12.2016 1.97046 12.5371 1.97046C12.8726 1.97046 13.1944 2.10375 13.4317 2.341C13.6689 2.57826 13.8022 2.90005 13.8022 3.23558C13.8022 3.57111 13.6689 3.89289 13.4317 4.13015L7.76607 9.79578L5.38054 10.3922L5.97692 8.00663L11.6425 2.341Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",label:x("actionPopover.edit"),onClick:m},{icon:Hl,label:x("actionPopover.delete"),onClick:()=>{N((()=>E(!0)))}}]}:{isShowheader:!1,type:"list",list:[{icon:_l,label:x("morePopover.share"),onClick:()=>A(!0)},{icon:(null==i?void 0:i.bookmarked)?Dl:Ul,label:(null==i?void 0:i.bookmarked)?x("morePopover.unsavePost"):x("morePopover.savePost"),onClick:()=>{N((()=>e.__awaiter(void 0,void 0,void 0,(function*(){if((null==g?void 0:g.id)&&(null==i?void 0:i.id))if(null==i?void 0:i.bookmarked){const e=yield h.callApiWithAuth(h.getApiPath(h.PATHS.BOOKMARK.DELETE,{_locale:p}),"DELETE",{data:{post_id:String(i.id)}});1===(null==e?void 0:e.status)?(b({title:"",message:"Removed saved post",type:"success",displayIcon:Ul}),u&&u()):b({title:"",message:"Remove failed",type:"danger",displayIcon:Ul})}else{const e=yield h.callApiWithAuth(h.getApiPath(h.PATHS.BOOKMARK.CREATE,{_locale:p}),"POST",{data:{user_id:f||g.id,post_id:i.id}});1===(null==e?void 0:e.status)?(b({title:"",message:"Post saved",type:"success",displayIcon:Dl}),c&&c()):b({title:"",message:"Post saved failed",type:"danger",displayIcon:Ul})}}))))}},{icon:ga,label:x("morePopover.report"),subTree:{title:x("morePopover.report.title"),description:x("morePopover.report.description"),isShowheader:!0,type:"list",list:Object.keys(h.REPORT_REASON_MAP).map((e=>({label:h.REPORT_REASON_MAP[e].label,reason:h.REPORT_REASON_MAP[e].reportReasonText,reasonValue:e}))).map((e=>({label:x(e.label),subTree:{title:x("morePopover.reportSubmit.title"),description:x("morePopover.reportSubmit.description"),isShowheader:!0,type:"jsx",jsxRenderer:t=>R.default.createElement(ha,{reason:e.reasonValue,reasonText:x(e.reason),postId:null==i?void 0:i.id,onClose:()=>t&&t(!1)})}})))}}]}}))},ql=j.default.div`
2638
2639
  position: relative;
2639
2640
  margin-bottom: 24px;
2640
2641
  background: white;
@@ -3075,4 +3076,4 @@
3075
3076
  `,po=j.default(uo)`
3076
3077
  margin-top: 12px;
3077
3078
  padding: 0.5rem 1rem 1rem;
3078
- `;var go="-dzIuHr";const ho=({userId:e,avatar:a,name:l,role:n,title:r,className:s})=>{const{t:d}=o.useTranslations(),[c,u]=t.useState(!1);return R.default.createElement(R.default.Fragment,null,R.default.createElement(E.Button,{className:`${go} ${s}`,color:"success",size:"xs",onClick:()=>u(!0),style:{padding:"5px 8px",marginBottom:"12px",borderRadius:"4px"}},R.default.createElement("span",{className:"text"},R.default.createElement(C.Icon.Endorse,{isSolid:!0,size:18,color:i.theme.colors.green800,className:"icon"}),d("cardReply.verifyBy",{name:`${l||""}`}))),R.default.createElement(at,{open:c,onClose:()=>u(!1),profileModalProps:{zIndex:1e3}},R.default.createElement(Il,{authorProps:{userId:e,avatar:a,name:l,role:n,title:r},hideQuestionTab:!0})))};const fo=({className:a,style:l,comment:n,type:i="comment",level:r=0,replyingId:s,onPostCommentSuccess:d,post:c,onDeleteComment:u,refetchComment:m,hasQuickBookingEnable:g,handleMakeAppointment:v,cardAuthorProps:b,maxChars:x=600,disableShortenContent:w})=>{var y,C,k,A,N,T,S,P,L,M,I,B;const{data:{locale:z,userInfo:j,env:{isMarryBaby:F}}}=t.useContext(h.TogetherComponentGlobalContext),{t:O}=o.useTranslations(),[D,U]=t.useState(n||null),{id:V,countLikes:_,content:q,replies:G=[],images:Z=[],author:Q,liked:K,link:$,mentionedUser:Y,mentions:J}=D,{text:ee,replyingTo:ae}=(e=>{try{const t=e.match(/\[@([^\]]+)\]/),a=t?t[0].replace("[@","").replace("]",""):"";return{text:e.replace(/\[@([^\]]+)\]/,"").trim(),replyingTo:a}}catch(e){}return{text:""}})(q),{authActionWrapper:le}=W({_joinCommunityIds:[null===(y=null==c?void 0:c.community)||void 0===y?void 0:y.id],_joinTopicIds:null===(C=null==c?void 0:c.topics)||void 0===C?void 0:C.map((e=>e.id))}),[oe,ne]=t.useState(4),ie=!!(null==j?void 0:j.id)&&(null==G?void 0:G.some((e=>e.author.id===j.id))),se=e=>{U((t=>{if(!t.replies.find((t=>t.id===e.id))){t.replies.unshift(e);const a=Object.assign(Object.assign({},t),{replies:t.replies.slice(),countReplies:t.countReplies+1});return m&&m(a),a}return t}))},[de,ce]=t.useState(!1),ue=t.useMemo((()=>"comment"===i&&G&&0!=G.length?G.sort(((e,t)=>{const a=new Date(e.createdAt).getTime(),l=new Date(t.createdAt).getTime();return a>l?-1:a<l?1:0})):G),[i,G]),me=(null==G?void 0:G.length)||0,pe=String(null==Q?void 0:Q.email)&&(null==j?void 0:j.email)&&String(null==Q?void 0:Q.email)===String(null==j?void 0:j.email),ge=(null==Q?void 0:Q.name)||(null==Q?void 0:Q.username)||"",he=(null==Q?void 0:Q.username)||(null==Q?void 0:Q.name)||"",fe=null==Q?void 0:Q.avatar,ve=(null==c?void 0:c.isAnonymous)||null==Q?void 0:Q.role,be=[...(null==c?void 0:c.isAnonymous)?[{id:(null===(k=null==c?void 0:c.author)||void 0===k?void 0:k.id)||0,name:O("cardPost.anonymous")}]:[],...J||[]],[xe,we]=t.useState(null),[ye,Ce]=t.useState(null);t.useEffect((()=>{if(null==Q?void 0:Q.hospitalId){const t=t=>e.__awaiter(void 0,void 0,void 0,(function*(){var e;const a=yield h.callApi(h.getCarePath(h.CARE_PATHS.GET_HOSPITAL_INFO,{hospital_branch_id:t,website_url:p.domainLocales[z]}),"get");(null===(e=null==a?void 0:a._data)||void 0===e?void 0:e.branch)&&we(null==a?void 0:a._data.branch)}));t(Q.hospitalId)}if(null==Q?void 0:Q.doctorId){const t=t=>e.__awaiter(void 0,void 0,void 0,(function*(){var e;const a=yield h.callApi(h.getCarePath(h.CARE_PATHS.GET_DOCTOR_INFO,{doctorId:t,website_url:p.domainLocales[z]}),"get");(null===(e=null==a?void 0:a._data)||void 0===e?void 0:e.doctor)&&Ce(null==a?void 0:a._data.doctor)}));t(Q.doctorId)}}),[Q.hospitalId,Q.doctorId]);const Ee=(null==ye?void 0:ye.valid_outpatient)||(null==ye?void 0:ye.valid_telemedicine),ke=((null==xe?void 0:xe.total_available_service)||(null==xe?void 0:xe.total_available_doctor))>0,Ae=g&&(Ee||ke),Ne="chatbot"===(null===(A=null==D?void 0:D.author)||void 0===A?void 0:A.type);return R.default.createElement(H,{defaultParams:{_joinCommunityIds:[null===(N=null==c?void 0:c.community)||void 0===N?void 0:N.id],_joinTopicIds:null===(T=null==c?void 0:c.topics)||void 0===T?void 0:T.map((e=>e.id))}},R.default.createElement(mo,{className:a,style:l,"data-is-reply":!!r,"data-is-marrybaby":F,"data-has-booking":Ae},"reply"===i&&R.default.createElement(f.Divider,{className:"top-divider",type:"solid"}),R.default.createElement("div",{style:{padding:"16px 16px 0"}},R.default.createElement(it,Object.assign({avatar:fe,name:ge,username:he,timeText:null==c?void 0:c.createdTime,community:null==c?void 0:c.community,className:"post-author "+(pe?"with-popover":""),type:i,userId:null==Q?void 0:Q.id,role:ve,expertId:null==Q?void 0:Q.partnerId,title:null==Q?void 0:Q.title,doctorId:null==Q?void 0:Q.doctorId,hospitalId:null==Q?void 0:Q.hospitalId,hasQuickBooking:Ae,handleMakeAppointment:v,isAnonymous:!!(null==c?void 0:c.isAnonymous),hideBackground:Ne,userType:null==Q?void 0:Q.type},b)),Boolean(null==D?void 0:D.isVerify)&&!Boolean(null==D?void 0:D.isOppose)&&R.default.createElement(ho,{title:null===(S=null==D?void 0:D.userVerify)||void 0===S?void 0:S.title,name:null===(P=null==D?void 0:D.userVerify)||void 0===P?void 0:P.name,userId:null===(L=null==D?void 0:D.userVerify)||void 0===L?void 0:L.id,role:null===(M=null==D?void 0:D.userVerify)||void 0===M?void 0:M.role,avatar:null===(I=null==D?void 0:D.userVerify)||void 0===I?void 0:I.avatar,className:"verify-tag"})),R.default.createElement(ba,{className:"post-content-wrapper",replyingTo:ae,mentionedUser:Y,description:ee,mentions:be,maxChars:x,disableShortenContent:w}),R.default.createElement("span",null),R.default.createElement("span",null),Z&&Z.length>0?R.default.createElement("div",{key:"image-preview",className:"image-preview-wrapper","data-is-reply":!0},R.default.createElement(Ua,{images:Z,authorName:null==Q?void 0:Q.username})):null,Z&&0!==Z.length||!$?null:R.default.createElement("div",{key:"link-preview",className:"link-preview-wrapper","data-is-reply":!0},R.default.createElement(X,{url:$})),"most-engaging"!==i?R.default.createElement(R.default.Fragment,null,Ne&&R.default.createElement(po,{listUrl:null==D?void 0:D.source,categorySlug:null==D?void 0:D.categorySlug}),R.default.createElement(re,{type:te.reply,loveCount:_,replyCount:me,className:"post-reaction",liked:K,isReplied:ie,hideCommentIcon:"reply"===i||Ne,hasShare:!1,onCommentClick:()=>le((()=>ce((e=>!e)))),onCommentCountClick:()=>le((()=>{ce(!0)})),onLikeClick:()=>le((()=>e.__awaiter(void 0,void 0,void 0,(function*(){if(V){const t=yield(({commentId:t,setLike:a=!1,locale:l})=>e.__awaiter(void 0,void 0,void 0,(function*(){return h.callApiWithAuth(h.getApiPath(a?h.PATHS.COMMENT.LIKE:h.PATHS.COMMENT.UNLIKE,{_locale:l,id:t}),"GET")})))({commentId:V,setLike:!K,locale:z});1===t.status&&U((e=>Object.assign(Object.assign({},e),{liked:!K,countLikes:e.countLikes+(K?-1:1)})))}}))))}),de&&R.default.createElement(ra,{replyingId:s||D.id,replyToName:ge,isReply:!0,onClose:()=>ce(!1),onPostSuccess:e=>{"reply"===i?d&&d(e):se(e)},post:c,replyingUser:Q}),"comment"===i&&G&&G.length>0?R.default.createElement("div",{className:"comment-reply-wrapper"},null===(B=null==ue?void 0:ue.slice(0,oe))||void 0===B?void 0:B.map((e=>R.default.createElement(fo,{key:e.id,comment:e,type:"reply",className:"comment-reply-item",level:r+1,replyingId:V,onPostCommentSuccess:se,post:c,onDeleteComment:()=>{U((t=>Object.assign(Object.assign({},t),{replies:t.replies.filter((t=>t.id!==e.id)),countReplies:t.countReplies-1})))},handleMakeAppointment:v,hasQuickBookingEnable:g}))),me>oe&&R.default.createElement(R.default.Fragment,null,R.default.createElement(f.Divider,{className:"top-divider",type:"solid"}),R.default.createElement(E.Button,{className:"more-cmt",size:"lg",color:"ghost",onClick:()=>ne((e=>e+4))},O("comment.seeMoreReplies",{count:me-oe}),R.default.createElement("img",{className:"chevron-right",src:"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M6 12L10 8L6 4' stroke='%232D87F3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e"})))):null):null,pe&&R.default.createElement(Gl,{onDeleteComment:u,className:"popover",commentId:D.id})))},vo=(t,a)=>e.__awaiter(void 0,void 0,void 0,(function*(){var e,l,o;const n=yield h.callApiWithOptionalAuth(h.getApiPath(h.PATHS.COMMENT.LIST,{postId:t,_locale:a,sort:"popularity",perPage:1,withoutReply:1}),"GET");return null===(o=null===(l=null===(e=null==n?void 0:n.data)||void 0===e?void 0:e.comments)||void 0===l?void 0:l.map(v.formatComment))||void 0===o?void 0:o[0]}));var bo=Object.freeze({__proto__:null});exports.CardAuthor=it,exports.CardLink=X,exports.CardPost=({className:a,style:l,hideViewMoreComment:n,showMostEngaging:i,onCommentClick:s,onCommentCountClick:d,onMostEngagingCommentClick:c,onPostCommentSuccess:u,disableCardLink:m,disableShortenContent:p,onDeletePost:g,onEditPost:f,post:v,mostEngagingComment:b,onDeleteComment:x,showInputComment:w,InlineCommentsComponent:y,hasQuickBookingEnable:C,handleMakeAppointment:k,cardAuthorProps:A})=>{const[N,T]=t.useState(v),[S,P]=t.useState(!1),[L,M]=t.useState(b),{community:I,topics:z,author:j,slug:F,isPin:O,liked:D,photos:U,mentions:V,title:_,description:q,previewUrl:G,likesCount:Z,commentsCount:Q,id:K,commented:$}=N,{data:{locale:Y,env:{isMarryBaby:J,togetherBasePath:ee}},action:{pushNotifications:ae}}=t.useContext(h.TogetherComponentGlobalContext),{t:le}=o.useTranslations(),[oe,ne]=t.useState(w),ie=`${ee}/${(null==I?void 0:I.slug)||"_"}/${F||""}`,se=`${h.getCurrentBaseUrl(Y)}${ie}`,{authActionWrapper:ce}=W((null==I?void 0:I.slug)?{_joinCommunityIds:[I.id],_joinTopicIds:null==z?void 0:z.map((e=>e.id))}:void 0),[ue,pe]=t.useState(!1);t.useEffect((()=>{ne(w)}),[w]);const ge=(null==j?void 0:j.name)||(null==j?void 0:j.username)||"",he=(null==j?void 0:j.username)||(null==j?void 0:j.name)||"",fe=null==j?void 0:j.avatar,ve=(null==N?void 0:N.isAnonymous)||null==j?void 0:j.role,[be,xe]=t.useState(null),[we,ye]=t.useState(null);t.useEffect((()=>{if(null==j?void 0:j.hospitalId){(t=>e.__awaiter(void 0,void 0,void 0,(function*(){var e;const a=yield h.callApi(h.getCarePath(h.CARE_PATHS.GET_HOSPITAL_INFO,{hospital_branch_id:t,website_url:h.domainLocales[Y]}),"get");(null===(e=null==a?void 0:a._data)||void 0===e?void 0:e.branch)&&xe(null==a?void 0:a._data.branch)})))(j.hospitalId)}if(null==j?void 0:j.doctorId){(t=>e.__awaiter(void 0,void 0,void 0,(function*(){var e;const a=yield h.callApi(h.getCarePath(h.CARE_PATHS.GET_DOCTOR_INFO,{doctorId:t,website_url:h.domainLocales[Y]}),"get");(null===(e=null==a?void 0:a._data)||void 0===e?void 0:e.doctor)&&ye(null==a?void 0:a._data.doctor)})))(j.doctorId)}}),[j.hospitalId,j.doctorId]);const Ce=(null==we?void 0:we.valid_outpatient)||(null==we?void 0:we.valid_telemedicine),Ee=((null==be?void 0:be.total_available_service)||(null==be?void 0:be.total_available_doctor))>0,ke=C&&(Ce||Ee);t.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){if(K&&Q&&i&&!(null==b?void 0:b.id)){const e=yield vo(K,Y);M(e)}}))}),[K,Y,Q,i,null==b?void 0:b.id]),t.useEffect((()=>{M(b)}),[null==b?void 0:b.id]);const Ae=t=>e.__awaiter(void 0,void 0,void 0,(function*(){if(Q>1&&(null==L?void 0:L.id)&&(null==L?void 0:L.id)===(null==t?void 0:t.id)){const e=yield vo(K,Y);M(e)}T((e=>Object.assign(Object.assign({},e),{commentsCount:e.commentsCount-1}))),x&&x(t)}));return R.default.createElement(H,{defaultParams:(null==I?void 0:I.slug)?{_joinCommunityIds:[I.id],_joinTopicIds:null==z?void 0:z.map((e=>e.id))}:void 0},S&&R.default.createElement(ua,{url:se,avatar:h.DEFAULT_IMG,text:_,onClose:()=>P(!1)}),R.default.createElement(ql,{className:a,style:l,"data-is-marrybaby":J},O?R.default.createElement(me,{className:"post-pin"}):null,R.default.createElement("div",{style:{position:"relative",padding:"1rem 1rem 0"}},R.default.createElement(it,Object.assign({avatar:fe,name:ge,username:he,url:m?void 0:ie,community:I,timeText:null==N?void 0:N.createdTime,className:"post-author",role:ve,userId:null==j?void 0:j.id,expertId:null==j?void 0:j.partnerId,doctorId:null==j?void 0:j.doctorId,hospitalId:null==j?void 0:j.hospitalId,title:null==j?void 0:j.title,hasQuickBooking:ke,handleMakeAppointment:k,"data-testid":"name",isAnonymous:!!(null==N?void 0:N.isAnonymous),extendEle:R.default.createElement(Wl,{authorEmail:String(null==j?void 0:j.email),onDeletePost:g,shareUrl:se,post:N,className:"popover",onEditPost:f})},A))),R.default.createElement("a",{href:m?void 0:ie,className:"post-content-link-wrapper"},_&&R.default.createElement(r.Heading,{className:"post-content-title",as:"h2",tag:"h5",fontWeight:"bold","data-testid":"Title of the Post"},B.default(_)),R.default.createElement(ba,{className:"post-content-wrapper",description:q,disableShortenContent:p,mentions:V,"data-testid":"Content of the Post"})),R.default.createElement("span",null),R.default.createElement("span",null),R.default.createElement("div",{key:"tag-topic"},z&&z.length>0?R.default.createElement(de,{topics:z,className:"post-topics"}):null),R.default.createElement("div",{key:"social-preview"},(null==N?void 0:N.introUrl)?R.default.createElement("div",{className:"social-preview-wrapper "+((null==U?void 0:U.length)?"has-image":"")},R.default.createElement(_a,{url:N.introUrl,image:N.bannerImage})):null),R.default.createElement("div",{key:"image-preview"},(null==U?void 0:U.length)?R.default.createElement("div",{className:"image-preview-wrapper"},R.default.createElement(Ua,{images:U,authorName:null==j?void 0:j.name})):null),R.default.createElement("div",{key:"link-preview"},(null==N?void 0:N.introUrl)||(null==U?void 0:U.length)||!(null==G?void 0:G.url)?null:R.default.createElement("div",{className:"link-preview-wrapper"},R.default.createElement(X,{title:G.title,url:G.url,image:G.image}))),R.default.createElement(re,{isMarryBaby:J,type:te.post,loveCount:Z,replyCount:Q,className:"post-reaction "+((null==U?void 0:U.length)||(null==G?void 0:G.url)?"hide-top-border":""),liked:ue?!D:D,isReplied:$,onCommentClick:()=>ce((()=>{s?s():ne((e=>!e))})),onCommentCountClick:()=>{ce((()=>{J?ne(!0):d?d():!m&&(window.location.href=ie)}))},onShareClick:()=>{P(!0)},onLikeClick:()=>e.__awaiter(void 0,void 0,void 0,(function*(){if(K&&!ue){pe(!0);try{const t=yield(({id:t,locale:a})=>e.__awaiter(void 0,void 0,void 0,(function*(){if(t)return yield h.callApiWithAuth(h.getApiPath(h.PATHS.POST.LIKE,{id:t,_locale:a}),"GET")})))({id:K,locale:Y});1!==(null==t?void 0:t.status)?ae(rt(le)):T((e=>Object.assign(Object.assign({},e),{likesCount:(e.likesCount||0)+(e.liked?-1:1),liked:!e.liked})))}catch(e){ae(rt(le))}pe(!1)}})),showingMostEngaging:!(!i||!(null==L?void 0:L.id))}),oe&&R.default.createElement(ra,{isMainCmt:!w,onClose:()=>ne(!1),onPostSuccess:e=>{0!==Q||(null==L?void 0:L.id)||M(e),T((e=>Object.assign(Object.assign({},e),{commentsCount:e.commentsCount+1,commented:!0}))),u&&u(e)},post:N}),i&&(null==L?void 0:L.id)?R.default.createElement("div",{className:"most-engaging-wrapper",onClick:e=>{c?(e.stopPropagation(),c()):window.location.href=ie}},R.default.createElement(fo,{hasQuickBookingEnable:C,handleMakeAppointment:k,comment:L,post:N,onDeleteComment:()=>{Ae&&Ae(L)},className:"most-engaging-comment",type:"most-engaging",key:L.id,cardAuthorProps:A}),Q>1&&!n&&R.default.createElement(E.Button,{className:"see-more-comments",color:"ghost",size:"md"},le("comment.seeMoreComments",{count:Q-1}))):null,y))},exports.CardPostPopoverMore=Wl,exports.CardReactions=re,exports.CardReply=fo,exports.CardReplyPopover=Gl,exports.Close=V,exports.CreateNewPostContent=({className:n,style:u,onPostCreatedEdited:m,onClose:p,communities:b=[],forceSelectCommunity:x,forceSelectTopics:w,articleId:y,optionalTopic:C,editPostData:E,defaultCommunity:k,defaultTopics:A,noFetchTopic:N,hideTopicList:T,selectAskDoctor:S,showAskDoctorOptions:P,currentPageUrl:L})=>{const M=!!(null==E?void 0:E.id),{data:{locale:I,env:{isMarryBaby:z}},action:{pushNotifications:j,sanitizeFunction:F}}=t.useContext(h.TogetherComponentGlobalContext),{t:O}=o.useTranslations(),[D,U]=t.useState(!1),[V,_]=t.useState(S),[H,W]=t.useState(!1),[q,G]=t.useState(!1),[Z,Q]=t.useState(""),[X,K]=t.useState(""),[$,Y]=t.useState(x?{label:x.name,value:`${x.id||""}-${x.mappedCategoryId||""}`}:{label:O("community.choose"),value:""}),[J,ee]=t.useState([...w]||[]),[te,ae]=t.useState([]),[le,oe]=t.useState([]),ne=x||b.find((e=>`${e.id||""}-${e.mappedCategoryId||""}`===$.value)),ie=x?[x]:b.filter((e=>e.isActive)).sort(((e,t)=>e.name>t.name?1:e.name<t.name?-1:0)),[re,se]=t.useState(null),[de,ce]=t.useState([]),ue=Z&&B.default(X)&&(C||!C&&J.length>0)&&ne&&(!te||te.length<=h.MAX_IMAGE_UPLOADS)&&!(null==de?void 0:de.length)&&!q;t.useEffect((()=>{if(E){const e=E;Q(e.title||""),K(yt(wt(e.description||"","edit"),e.mentions)),Y({label:e.community.name,value:`${e.community.id||""}-${e.community.mappedCategoryId||""}`}),ee(e.topics||[]),ae(e.photos||[]),U(!!e.isAnonymous||!1),_(!!e.isAskDoctor||!1)}else k&&Y({label:k.name,value:`${k.id||""}-${k.mappedCategoryId||""}`}),A&&ee(A)}),[]);const me=()=>e.__awaiter(void 0,void 0,void 0,(function*(){var t,a,l,o,n,i,r,s,d;if(P&&void 0===V)return W(!0),!1;const c=yield(({title:t,description:a,communityId:l,imageFiles:o,previewUrl:n,topicIds:i,locale:r,sanitizeFunction:s,categoryCommunityId:d,categoryTopicIds:c,introUrl:u,bannerUrl:m,scheduleTime:p,isAnonymous:f,isAskDoctor:v})=>e.__awaiter(void 0,void 0,void 0,(function*(){const e=new FormData,b=At(a),x=At(t),w=Et(b);if(e.append("title",x),e.append("description",Nt(b,s)),d?e.append("category_community",String(d)):l&&e.append("community_id",String(l)),e.append("is_anonymous",f?"1":"0"),e.append("is_question",v?"1":"0"),(null==n?void 0:n.title)&&e.append("preview_title",n.title),(null==n?void 0:n.description)&&e.append("preview_description",n.description),(null==n?void 0:n.url)&&e.append("preview_link",g.safeEncodeURI(n.url)),(null==n?void 0:n.image)&&e.append("preview_image",g.safeEncodeURI(n.image)),null==i||i.forEach((t=>{e.append("topics[]",String(t||""))})),null==c||c.forEach((t=>{e.append("category_topics[]",String(t||""))})),null==o?void 0:o.length){const t=yield Promise.all(o.map(((e,t)=>new Promise((a=>{setTimeout((()=>{a(Lt(e,r))}),2e3*t)})))));null==t||t.filter(Boolean).slice(0,h.MAX_IMAGE_UPLOADS).forEach(((t,a)=>{e.append(`images[${a}]`,t)}))}else e.append("images","");return null==w||w.forEach((t=>{e.append("mention_ids[]",t)})),e.append("intro_url",u||""),e.append("banner",m||""),p&&(e.append("post_type","scheduled"),e.append("schedule_datetime",p)),e})))({title:Z,description:X,communityId:String((null==ne?void 0:ne.id)||""),imageFiles:te,previewUrl:re,topicIds:null==J?void 0:J.map((e=>String(e.id||""))).filter(Boolean),locale:I,sanitizeFunction:F,categoryCommunityId:String((null==ne?void 0:ne.mappedCategoryId)||""),categoryTopicIds:null==J?void 0:J.map((e=>String(e.mappedCategoryId||""))).filter(Boolean),isAnonymous:D?1:0,isAskDoctor:V?1:0});let u;y&&c.append("article_id",y),M?(null==E?void 0:E.id)&&(u=yield(({id:t,locale:a,formData:l})=>e.__awaiter(void 0,void 0,void 0,(function*(){return yield h.callApiWithAuth(h.getApiPath(h.PATHS.POST.UPDATE,{id:t,_locale:a}),"POST",{data:l})})))({id:E.id,formData:c,locale:I})):u=yield(({locale:t,formData:a,isArticleComment:l})=>e.__awaiter(void 0,void 0,void 0,(function*(){return yield h.callApiWithAuth(h.getApiPath(l?h.PATHS.POST.CREATE_ARTICLE_COMMENT:h.PATHS.POST.CREATE,{_locale:t}),"POST",{data:a})})))({formData:c,locale:I,isArticleComment:!(null==ne?void 0:ne.id)&&!!(null==ne?void 0:ne.mappedCategoryId)});const f=null==u?void 0:u.data;(null==f?void 0:f.id)&&!(null===(a=null===(t=null==u?void 0:u.messages)||void 0===t?void 0:t.moderation)||void 0===a?void 0:a.type)?(j({message:O("createPost.popup.success"),type:"success"}),(e=>{m&&m(v.formatPost(e),M),p&&p()})(f)):"banned"===(null===(o=null===(l=null==u?void 0:u.messages)||void 0===l?void 0:l.moderation)||void 0===o?void 0:o.type)?(j({title:O("notification.post.blocked.title"),message:O("notification.post.blocked.message"),type:"danger"}),u.messages.moderation.words&&oe(u.messages.moderation.words)):"suspect"===(null===(i=null===(n=null==u?void 0:u.messages)||void 0===n?void 0:n.moderation)||void 0===i?void 0:i.type)?(j({title:O("notification.post.suspect.title"),message:O("notification.post.suspect.message"),type:"warning"}),p&&p()):(null===(s=null===(r=null==u?void 0:u.messages)||void 0===r?void 0:r.find)||void 0===s?void 0:s.call(r,(e=>{var t;return!!(null===(t=null==e?void 0:e.includes)||void 0===t?void 0:t.call(e,"suspend"))})))?(j({message:O("notification.suspend.message"),type:"danger"}),p&&p()):j({message:(null===(d=null==u?void 0:u.messages)||void 0===d?void 0:d[0])||O("notification.failure"),type:"danger"})}));return R.default.createElement(Kt,{className:n,style:u},R.default.createElement("div",{className:"input-group-container"},R.default.createElement(Gt,{className:"input-group",bannedWords:le,value:Z,onChange:Q}),R.default.createElement(Ht,{className:"input-group",bannedWords:le,value:X,onChange:K,onPreviewUrlChange:se,onInvalidUrlsChange:ce,onImageFilesChange:ae,imageFiles:te}),P&&R.default.createElement($t,{"data-is-marry-baby":z},R.default.createElement("div",{className:"switch-label"},R.default.createElement(r.Ask,{isMarryBaby:z,size:z?32:24,color:i.theme.colors.primaryBase,className:"label-icon"}),R.default.createElement("span",{className:"label-txt"},O("createPost.askDoctor"))),R.default.createElement(f.BtnChoice,{value:V,choices:[{label:O("createPost.askDoctorChoice.yes"),value:!0,dataEventCategory:"Together",dataEventAction:"Write Post Click - Ask Doctor",dataEventLabel:L},{label:O("createPost.askDoctorChoice.no"),value:!1}],onChange:e=>{"boolean"==typeof e&&(W(!1),_(e))}})),H&&R.default.createElement(Yt,null,R.default.createElement(r.Info,{isSolid:!0,color:i.theme.colors.red700,size:14}),R.default.createElement(d.Text,{size:"p3",as:"span",color:i.theme.colors.red700},O("createPost.message.askDoctorRequire"))),R.default.createElement("div",{className:"input-group"},R.default.createElement(d.Text,{size:"p4",className:"input-group-label"},O("admin.community")),R.default.createElement(l.Dropdown,{options:(null==ie?void 0:ie.map((e=>({label:e.name,value:`${e.id||""}-${e.mappedCategoryId||""}`}))))||[],id:"community-picker",placeholder:O("community.choose"),value:$,dropdownLabelTrackingAttributes:{"data-event-category":"Together","data-event-action":"Write Post Click - Choose Community/Topic","data-event-label":L},onChange:e=>{Y({label:e.label,value:String(e.value)}),ee([])},disabled:!!x}),R.default.createElement(d.Text,{size:"sm",className:"warning",color:i.theme.colors.gray400},"* ",O("commentPopup.warning.newPost"))),!T&&R.default.createElement("div",{className:"input-group"},R.default.createElement(d.Text,{size:"p4",className:"input-group-label"},O("tab.topic")),R.default.createElement("div",{className:"input-notification"},R.default.createElement("img",{src:ne?"data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8 14.5C11.3137 14.5 14 11.8137 14 8.5C14 5.18629 11.3137 2.5 8 2.5C4.68629 2.5 2 5.18629 2 8.5C2 11.8137 4.68629 14.5 8 14.5Z' fill='%232D87F3'/%3e%3cpath d='M8 5.5V8.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M8 11.5H8.00708' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e":st}),R.default.createElement(d.Text,{size:"base",color:i.theme.colors.gray500},O(ne?"createPost.popup.primary":"createPost.popup.warning"))),ne&&R.default.createElement(Qt,{className:"tag-list",communityId:ne.id,forceTopics:w,onChange:ee,selectedTopics:J,noFetch:N,dataEventCategory:"Together",dataEventAction:"Write Post Click - Choose Community/Topic",dataEventLabel:L}))),R.default.createElement("div",{className:"form-action"},R.default.createElement("div",{className:"input-group"},R.default.createElement(a.Checkbox,{className:"swich-input-group",labelPosition:"left",name:"PostAnonymous",checked:D,color:z?"pink":void 0,"data-event-category":"Together","data-event-action":"Write Post Click - Incognito","data-event-label":L,label:R.default.createElement("div",{className:"switch-label"},R.default.createElement("img",{className:"label-icon",src:s.CommonGAssets.getAssetPath("anomyous-avatar.svg"),alt:"anomyous avatar",style:{marginRight:"10px",width:"24px"}}),R.default.createElement("span",{className:"label-txt"},O("createPost.postAnonymous"))),value:"Post Anonymous",onChange:e=>U(e.currentTarget.checked),styles:{body:{display:"flex",width:"100%",justifyContent:"space-between",alignItems:"center"},label:{display:"flex",alignItems:"center"}}})),R.default.createElement("div",{className:"input-group"},R.default.createElement(c.Button,{className:"submit-btn pointer-event-child-none",size:"lg","data-event-category":"Ask Doctor","data-event-action":"Submit Question","data-event-label":window.location.href,onClick:()=>e.__awaiter(void 0,void 0,void 0,(function*(){if(ue&&!q){G(!0);try{yield me()}catch(e){console.error(e),j(rt(O))}G(!1)}})),disabled:!ue,loading:q},O("createPost.popup.submit")))))},exports.CreatePostDescription=Ht,exports.CreatePostTitle=Gt,exports.ImagePreviewPopup=Na,exports.InputCommentBar=ra,exports.LabelPin=me,exports.LabelSortPin=ue,exports.LabelSorting=({onChange:e,className:a,style:l,leftLabel:o,rightLabel:n,color:i,value:r,choices:s})=>{const{data:{env:{isMarryBaby:d}}}=t.useContext(h.TogetherComponentGlobalContext);return R.default.createElement(ue,{label:o,rightLabel:R.default.createElement(fe,{position:"bottom",align:"end",data:{isShowheader:!1,type:"list",list:s.map((t=>({label:t.label,onClick:()=>e&&e(String(t.value)),selected:t.value===r,className:"bold-item"})))},toggleButtonContent:R.default.createElement("div",{style:{display:"flex"}},R.default.createElement(b.Text,{style:{display:"flex",alignItems:"center",fontWeight:"normal",marginRight:12},size:"p4"},n),R.default.createElement("img",{src:d?"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M8 14L12 18L16 14' stroke='%233E3F58' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e %3cpath d='M16 10L12 6L8 10' stroke='%233E3F58' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e %3c/svg%3e":"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M4.49992 7H11.4998C11.6352 7 11.7525 6.94506 11.8514 6.83509C11.9502 6.72515 11.9999 6.59496 11.9999 6.44449C11.9999 6.29402 11.9503 6.16389 11.8514 6.0538L8.35141 2.16491C8.25252 2.05509 8.13538 2 7.99988 2C7.86437 2 7.74723 2.05509 7.64826 2.16491L4.1483 6.0538C4.04932 6.16377 3.99988 6.29402 3.99988 6.44449C3.99988 6.59493 4.04932 6.72515 4.1483 6.83509C4.24738 6.94506 4.36452 7 4.49992 7Z' fill='%238C8C8C'/%3e%3cpath d='M11.4998 9H4.49992C4.36441 9 4.24727 9.05497 4.1483 9.16482C4.04932 9.2748 3.99988 9.40496 3.99988 9.55543C3.99988 9.7059 4.04932 9.83616 4.1483 9.94607L7.64826 13.835C7.74734 13.9449 7.86448 14 7.99988 14C8.13527 14 8.25252 13.9449 8.35141 13.835L11.8514 9.94604C11.9502 9.83616 11.9999 9.7059 11.9999 9.5554C11.9999 9.40496 11.9503 9.2748 11.8514 9.16479C11.7525 9.05485 11.6352 9 11.4998 9Z' fill='%238C8C8C'/%3e%3c/svg%3e",style:{width:16,height:16,alignSelf:"center"}}))}),color:"gray",className:a,style:l})},exports.Loading=Z,exports.PopoverMenu=he,exports.PopupDanger=oa,exports.PopupDoctor=De,exports.PopupExpert=Ge,exports.PopupFrame=la,exports.PopupHospital=$e,exports.PostContent=ba,exports.PostImagePreview=Ua,exports.PostSingleImageViewPopup=Ra,exports.ProfileDetail=Il,exports.ProfileDetailModal=at,exports.ShareBox=ca,exports.SharePopup=ua,exports.SkipQuestionOfExpertBtn=l=>{var{post:n,onSkip:i,btnText:r,currentPageUrl:s}=l,d=e.__rest(l,["post","onSkip","btnText","currentPageUrl"]);const{t:u}=o.useTranslations(),{data:{locale:m},action:{pushNotifications:p}}=t.useContext(h.TogetherComponentGlobalContext),[g,f]=t.useState(!1),[v,b]=t.useState(!1),x=a.useMantineTheme(),w=t.useCallback((()=>e.__awaiter(void 0,void 0,void 0,(function*(){var e;b(!0);const t=yield h.callApiWithAuth(h.getApiPath(h.PATHS.USER.SKIP_QUESTION,{_locale:m,id:null==n?void 0:n.id}),"PUT");1===(null==t?void 0:t.status)?(null==i||i({id:(null==n?void 0:n.id)||"",communityId:(null===(e=null==n?void 0:n.community)||void 0===e?void 0:e.id)||""}),f(!1),p({title:"",message:"Skip success",type:"success"})):p({title:"",message:null==t?void 0:t.messages,type:"danger"}),b(!1)}))),[]);return R.default.createElement(a.Popover,{width:327,withArrow:!0,shadow:"md",opened:g},R.default.createElement(a.Popover.Target,null,R.default.createElement("div",Object.assign({className:`${Bl} ${(null==d?void 0:d.className)||""}`,onClick:()=>f(!0)},d),r||u("profilePanel.questionNotClear"))),R.default.createElement(a.Popover.Dropdown,null,R.default.createElement("div",null,R.default.createElement("div",{className:zl},u("profilePanel.skipQuestion.heading")),R.default.createElement("div",{className:jl},u("profilePanel.skipQuestion.content")),R.default.createElement("div",{className:Fl},R.default.createElement(c.Button,{size:"md",variant:"secondary",leftIcon:R.default.createElement(C.Close,{color:x.fn.primaryColor(),size:24}),onClick:()=>f(!1),styles:()=>({leftIcon:{marginRight:0}})}),R.default.createElement(c.Button,{variant:"primary",size:"md",leftIcon:R.default.createElement(C.Check,{color:"white",size:24}),onClick:w,loading:v,"data-event-category":"Together","data-event-action":"Unclear Question Click","data-event-label":s,styles:()=>({leftIcon:{marginRight:0}})})))))},exports.SocialLinkPreview=_a,exports.SourceList=uo,exports.SubmitReportForm=ha,exports.TagTopic=de,exports.TogetherAuthConfigContext=_,exports.TogetherAuthConfigContextProvider=H,exports.TopicSelectList=Qt,exports.VerifiedTag=ho,exports.types=bo,exports.useTogetherAuthRequiredAction=W;
3079
+ `;var go="-dzIuHr";const ho=({userId:e,avatar:a,name:l,role:n,title:r,className:s})=>{const{t:d}=o.useTranslations(),[c,u]=t.useState(!1);return R.default.createElement(R.default.Fragment,null,R.default.createElement(E.Button,{className:`${go} ${s}`,color:"success",size:"xs",onClick:()=>u(!0),style:{padding:"5px 8px",marginBottom:"12px",borderRadius:"4px"}},R.default.createElement("span",{className:"text"},R.default.createElement(C.Icon.Endorse,{isSolid:!0,size:18,color:i.theme.colors.green800,className:"icon"}),d("cardReply.verifyBy",{name:`${l||""}`}))),R.default.createElement(at,{open:c,onClose:()=>u(!1),profileModalProps:{zIndex:1e3}},R.default.createElement(Il,{authorProps:{userId:e,avatar:a,name:l,role:n,title:r},hideQuestionTab:!0})))};const fo=({className:a,style:l,comment:n,type:i="comment",level:r=0,replyingId:s,onPostCommentSuccess:c,post:u,onDeleteComment:m,refetchComment:p,hasQuickBookingEnable:g,handleMakeAppointment:v,cardAuthorProps:b,maxChars:x=600,disableShortenContent:w})=>{var y,C,k,A,N,T,S,P,L,M,I,B;const{data:{locale:z,userInfo:j,env:{isMarryBaby:F}}}=t.useContext(h.TogetherComponentGlobalContext),{t:O}=o.useTranslations(),[D,U]=t.useState(n||null),{id:V,countLikes:_,content:q,replies:G=[],images:Z=[],author:Q,liked:K,link:$,mentionedUser:Y,mentions:J}=D,{text:ee,replyingTo:ae}=(e=>{try{const t=e.match(/\[@([^\]]+)\]/),a=t?t[0].replace("[@","").replace("]",""):"";return{text:e.replace(/\[@([^\]]+)\]/,"").trim(),replyingTo:a}}catch(e){}return{text:""}})(q),{authActionWrapper:le}=W({_joinCommunityIds:[null===(y=null==u?void 0:u.community)||void 0===y?void 0:y.id],_joinTopicIds:null===(C=null==u?void 0:u.topics)||void 0===C?void 0:C.map((e=>e.id))}),[oe,ne]=t.useState(4),ie=!!(null==j?void 0:j.id)&&(null==G?void 0:G.some((e=>e.author.id===j.id))),se=e=>{U((t=>{if(!t.replies.find((t=>t.id===e.id))){t.replies.unshift(e);const a=Object.assign(Object.assign({},t),{replies:t.replies.slice(),countReplies:t.countReplies+1});return p&&p(a),a}return t}))},[de,ce]=t.useState(!1),ue=t.useMemo((()=>"comment"===i&&G&&0!=G.length?G.sort(((e,t)=>{const a=new Date(e.createdAt).getTime(),l=new Date(t.createdAt).getTime();return a>l?-1:a<l?1:0})):G),[i,G]),me=(null==G?void 0:G.length)||0,pe=String(null==Q?void 0:Q.email)&&(null==j?void 0:j.email)&&String(null==Q?void 0:Q.email)===String(null==j?void 0:j.email),ge=(null==Q?void 0:Q.name)||(null==Q?void 0:Q.username)||"",he=(null==Q?void 0:Q.username)||(null==Q?void 0:Q.name)||"",fe=null==Q?void 0:Q.avatar,ve=(null==u?void 0:u.isAnonymous)||null==Q?void 0:Q.role,be=[...(null==u?void 0:u.isAnonymous)?[{id:(null===(k=null==u?void 0:u.author)||void 0===k?void 0:k.id)||0,name:O("cardPost.anonymous")}]:[],...J||[]],[xe,we]=t.useState(null),[ye,Ce]=t.useState(null);t.useEffect((()=>{if(null==Q?void 0:Q.hospitalId){const t=t=>e.__awaiter(void 0,void 0,void 0,(function*(){var e;const a=yield h.callApi(h.getCarePath(h.CARE_PATHS.GET_HOSPITAL_INFO,{hospital_branch_id:t,website_url:d.domainLocales[z]}),"get");(null===(e=null==a?void 0:a._data)||void 0===e?void 0:e.branch)&&we(null==a?void 0:a._data.branch)}));t(Q.hospitalId)}if(null==Q?void 0:Q.doctorId){const t=t=>e.__awaiter(void 0,void 0,void 0,(function*(){var e;const a=yield h.callApi(h.getCarePath(h.CARE_PATHS.GET_DOCTOR_INFO,{doctorId:t,website_url:d.domainLocales[z]}),"get");(null===(e=null==a?void 0:a._data)||void 0===e?void 0:e.doctor)&&Ce(null==a?void 0:a._data.doctor)}));t(Q.doctorId)}}),[Q.hospitalId,Q.doctorId]);const Ee=(null==ye?void 0:ye.valid_outpatient)||(null==ye?void 0:ye.valid_telemedicine),ke=((null==xe?void 0:xe.total_available_service)||(null==xe?void 0:xe.total_available_doctor))>0,Ae=g&&(Ee||ke),Ne="chatbot"===(null===(A=null==D?void 0:D.author)||void 0===A?void 0:A.type);return R.default.createElement(H,{defaultParams:{_joinCommunityIds:[null===(N=null==u?void 0:u.community)||void 0===N?void 0:N.id],_joinTopicIds:null===(T=null==u?void 0:u.topics)||void 0===T?void 0:T.map((e=>e.id))}},R.default.createElement(mo,{className:a,style:l,"data-is-reply":!!r,"data-is-marrybaby":F,"data-has-booking":Ae},"reply"===i&&R.default.createElement(f.Divider,{className:"top-divider",type:"solid"}),R.default.createElement("div",{style:{padding:"16px 16px 0"}},R.default.createElement(it,Object.assign({avatar:fe,name:ge,username:he,timeText:null==u?void 0:u.createdTime,community:null==u?void 0:u.community,className:"post-author "+(pe?"with-popover":""),type:i,userId:null==Q?void 0:Q.id,role:ve,expertId:null==Q?void 0:Q.partnerId,title:null==Q?void 0:Q.title,doctorId:null==Q?void 0:Q.doctorId,hospitalId:null==Q?void 0:Q.hospitalId,hasQuickBooking:Ae,handleMakeAppointment:v,isAnonymous:!!(null==u?void 0:u.isAnonymous),hideBackground:Ne,userType:null==Q?void 0:Q.type},b)),Boolean(null==D?void 0:D.isVerify)&&!Boolean(null==D?void 0:D.isOppose)&&R.default.createElement(ho,{title:null===(S=null==D?void 0:D.userVerify)||void 0===S?void 0:S.title,name:null===(P=null==D?void 0:D.userVerify)||void 0===P?void 0:P.name,userId:null===(L=null==D?void 0:D.userVerify)||void 0===L?void 0:L.id,role:null===(M=null==D?void 0:D.userVerify)||void 0===M?void 0:M.role,avatar:null===(I=null==D?void 0:D.userVerify)||void 0===I?void 0:I.avatar,className:"verify-tag"})),R.default.createElement(ba,{className:"post-content-wrapper",replyingTo:ae,mentionedUser:Y,description:ee,mentions:be,maxChars:x,disableShortenContent:w}),R.default.createElement("span",null),R.default.createElement("span",null),Z&&Z.length>0?R.default.createElement("div",{key:"image-preview",className:"image-preview-wrapper","data-is-reply":!0},R.default.createElement(Ua,{images:Z,authorName:null==Q?void 0:Q.username})):null,Z&&0!==Z.length||!$?null:R.default.createElement("div",{key:"link-preview",className:"link-preview-wrapper","data-is-reply":!0},R.default.createElement(X,{url:$})),"most-engaging"!==i?R.default.createElement(R.default.Fragment,null,Ne&&R.default.createElement(po,{listUrl:null==D?void 0:D.source,categorySlug:null==D?void 0:D.categorySlug}),R.default.createElement(re,{type:te.reply,loveCount:_,replyCount:me,className:"post-reaction",liked:K,isReplied:ie,hideCommentIcon:"reply"===i||Ne,hasShare:!1,onCommentClick:()=>le((()=>ce((e=>!e)))),onCommentCountClick:()=>le((()=>{ce(!0)})),onLikeClick:()=>le((()=>e.__awaiter(void 0,void 0,void 0,(function*(){if(V){const t=yield(({commentId:t,setLike:a=!1,locale:l})=>e.__awaiter(void 0,void 0,void 0,(function*(){return h.callApiWithAuth(h.getApiPath(a?h.PATHS.COMMENT.LIKE:h.PATHS.COMMENT.UNLIKE,{_locale:l,id:t}),"GET")})))({commentId:V,setLike:!K,locale:z});1===t.status&&U((e=>Object.assign(Object.assign({},e),{liked:!K,countLikes:e.countLikes+(K?-1:1)})))}}))))}),de&&R.default.createElement(ra,{replyingId:s||D.id,replyToName:ge,isReply:!0,onClose:()=>ce(!1),onPostSuccess:e=>{"reply"===i?c&&c(e):se(e)},post:u,replyingUser:Q}),"comment"===i&&G&&G.length>0?R.default.createElement("div",{className:"comment-reply-wrapper"},null===(B=null==ue?void 0:ue.slice(0,oe))||void 0===B?void 0:B.map((e=>R.default.createElement(fo,{key:e.id,comment:e,type:"reply",className:"comment-reply-item",level:r+1,replyingId:V,onPostCommentSuccess:se,post:u,onDeleteComment:()=>{U((t=>Object.assign(Object.assign({},t),{replies:t.replies.filter((t=>t.id!==e.id)),countReplies:t.countReplies-1})))},handleMakeAppointment:v,hasQuickBookingEnable:g}))),me>oe&&R.default.createElement(R.default.Fragment,null,R.default.createElement(f.Divider,{className:"top-divider",type:"solid"}),R.default.createElement(E.Button,{className:"more-cmt",size:"lg",color:"ghost",onClick:()=>ne((e=>e+4))},O("comment.seeMoreReplies",{count:me-oe}),R.default.createElement("img",{className:"chevron-right",src:"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M6 12L10 8L6 4' stroke='%232D87F3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e"})))):null):null,pe&&R.default.createElement(Gl,{onDeleteComment:m,className:"popover",commentId:D.id})))},vo=(t,a)=>e.__awaiter(void 0,void 0,void 0,(function*(){var e,l,o;const n=yield h.callApiWithOptionalAuth(h.getApiPath(h.PATHS.COMMENT.LIST,{postId:t,_locale:a,sort:"popularity",perPage:1,withoutReply:1}),"GET");return null===(o=null===(l=null===(e=null==n?void 0:n.data)||void 0===e?void 0:e.comments)||void 0===l?void 0:l.map(v.formatComment))||void 0===o?void 0:o[0]}));var bo=Object.freeze({__proto__:null});exports.CardAuthor=it,exports.CardLink=X,exports.CardPost=({className:a,style:l,hideViewMoreComment:n,showMostEngaging:i,onCommentClick:s,onCommentCountClick:d,onMostEngagingCommentClick:c,onPostCommentSuccess:u,disableCardLink:m,disableShortenContent:p,onDeletePost:g,onEditPost:f,post:v,mostEngagingComment:b,onDeleteComment:x,showInputComment:w,InlineCommentsComponent:y,hasQuickBookingEnable:C,handleMakeAppointment:k,cardAuthorProps:A})=>{const[N,T]=t.useState(v),[S,P]=t.useState(!1),[L,M]=t.useState(b),{community:I,topics:z,author:j,slug:F,isPin:O,liked:D,photos:U,mentions:V,title:_,description:q,previewUrl:G,likesCount:Z,commentsCount:Q,id:K,commented:$}=N,{data:{locale:Y,env:{isMarryBaby:J,togetherBasePath:ee}},action:{pushNotifications:ae}}=t.useContext(h.TogetherComponentGlobalContext),{t:le}=o.useTranslations(),[oe,ne]=t.useState(w),ie=`${ee}/${(null==I?void 0:I.slug)||"_"}/${F||""}`,se=`${h.getCurrentBaseUrl(Y)}${ie}`,{authActionWrapper:ce}=W((null==I?void 0:I.slug)?{_joinCommunityIds:[I.id],_joinTopicIds:null==z?void 0:z.map((e=>e.id))}:void 0),[ue,pe]=t.useState(!1);t.useEffect((()=>{ne(w)}),[w]);const ge=(null==j?void 0:j.name)||(null==j?void 0:j.username)||"",he=(null==j?void 0:j.username)||(null==j?void 0:j.name)||"",fe=null==j?void 0:j.avatar,ve=(null==N?void 0:N.isAnonymous)||null==j?void 0:j.role,[be,xe]=t.useState(null),[we,ye]=t.useState(null);t.useEffect((()=>{if(null==j?void 0:j.hospitalId){(t=>e.__awaiter(void 0,void 0,void 0,(function*(){var e;const a=yield h.callApi(h.getCarePath(h.CARE_PATHS.GET_HOSPITAL_INFO,{hospital_branch_id:t,website_url:h.domainLocales[Y]}),"get");(null===(e=null==a?void 0:a._data)||void 0===e?void 0:e.branch)&&xe(null==a?void 0:a._data.branch)})))(j.hospitalId)}if(null==j?void 0:j.doctorId){(t=>e.__awaiter(void 0,void 0,void 0,(function*(){var e;const a=yield h.callApi(h.getCarePath(h.CARE_PATHS.GET_DOCTOR_INFO,{doctorId:t,website_url:h.domainLocales[Y]}),"get");(null===(e=null==a?void 0:a._data)||void 0===e?void 0:e.doctor)&&ye(null==a?void 0:a._data.doctor)})))(j.doctorId)}}),[j.hospitalId,j.doctorId]);const Ce=(null==we?void 0:we.valid_outpatient)||(null==we?void 0:we.valid_telemedicine),Ee=((null==be?void 0:be.total_available_service)||(null==be?void 0:be.total_available_doctor))>0,ke=C&&(Ce||Ee);t.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){if(K&&Q&&i&&!(null==b?void 0:b.id)){const e=yield vo(K,Y);M(e)}}))}),[K,Y,Q,i,null==b?void 0:b.id]),t.useEffect((()=>{M(b)}),[null==b?void 0:b.id]);const Ae=t=>e.__awaiter(void 0,void 0,void 0,(function*(){if(Q>1&&(null==L?void 0:L.id)&&(null==L?void 0:L.id)===(null==t?void 0:t.id)){const e=yield vo(K,Y);M(e)}T((e=>Object.assign(Object.assign({},e),{commentsCount:e.commentsCount-1}))),x&&x(t)}));return R.default.createElement(H,{defaultParams:(null==I?void 0:I.slug)?{_joinCommunityIds:[I.id],_joinTopicIds:null==z?void 0:z.map((e=>e.id))}:void 0},S&&R.default.createElement(ua,{url:se,avatar:h.DEFAULT_IMG,text:_,onClose:()=>P(!1)}),R.default.createElement(ql,{className:a,style:l,"data-is-marrybaby":J},O?R.default.createElement(me,{className:"post-pin"}):null,R.default.createElement("div",{style:{position:"relative",padding:"1rem 1rem 0"}},R.default.createElement(it,Object.assign({avatar:fe,name:ge,username:he,url:m?void 0:ie,community:I,timeText:null==N?void 0:N.createdTime,className:"post-author",role:ve,userId:null==j?void 0:j.id,expertId:null==j?void 0:j.partnerId,doctorId:null==j?void 0:j.doctorId,hospitalId:null==j?void 0:j.hospitalId,title:null==j?void 0:j.title,hasQuickBooking:ke,handleMakeAppointment:k,"data-testid":"name",isAnonymous:!!(null==N?void 0:N.isAnonymous),extendEle:R.default.createElement(Wl,{authorEmail:String(null==j?void 0:j.email),onDeletePost:g,shareUrl:se,post:N,className:"popover",onEditPost:f})},A))),R.default.createElement("a",{href:m?void 0:ie,className:"post-content-link-wrapper"},_&&R.default.createElement(r.Heading,{className:"post-content-title",as:"h2",tag:"h5",fontWeight:"bold","data-testid":"Title of the Post"},B.default(_)),R.default.createElement(ba,{className:"post-content-wrapper",description:q,disableShortenContent:p,mentions:V,"data-testid":"Content of the Post"})),R.default.createElement("span",null),R.default.createElement("span",null),R.default.createElement("div",{key:"tag-topic"},z&&z.length>0?R.default.createElement(de,{topics:z,className:"post-topics"}):null),R.default.createElement("div",{key:"social-preview"},(null==N?void 0:N.introUrl)?R.default.createElement("div",{className:"social-preview-wrapper "+((null==U?void 0:U.length)?"has-image":"")},R.default.createElement(_a,{url:N.introUrl,image:N.bannerImage})):null),R.default.createElement("div",{key:"image-preview"},(null==U?void 0:U.length)?R.default.createElement("div",{className:"image-preview-wrapper"},R.default.createElement(Ua,{images:U,authorName:null==j?void 0:j.name})):null),R.default.createElement("div",{key:"link-preview"},(null==N?void 0:N.introUrl)||(null==U?void 0:U.length)||!(null==G?void 0:G.url)?null:R.default.createElement("div",{className:"link-preview-wrapper"},R.default.createElement(X,{title:G.title,url:G.url,image:G.image}))),R.default.createElement(re,{isMarryBaby:J,type:te.post,loveCount:Z,replyCount:Q,className:"post-reaction "+((null==U?void 0:U.length)||(null==G?void 0:G.url)?"hide-top-border":""),liked:ue?!D:D,isReplied:$,onCommentClick:()=>ce((()=>{s?s():ne((e=>!e))})),onCommentCountClick:()=>{ce((()=>{J?ne(!0):d?d():!m&&(window.location.href=ie)}))},onShareClick:()=>{P(!0)},onLikeClick:()=>e.__awaiter(void 0,void 0,void 0,(function*(){if(K&&!ue){pe(!0);try{const t=yield(({id:t,locale:a})=>e.__awaiter(void 0,void 0,void 0,(function*(){if(t)return yield h.callApiWithAuth(h.getApiPath(h.PATHS.POST.LIKE,{id:t,_locale:a}),"GET")})))({id:K,locale:Y});1!==(null==t?void 0:t.status)?ae(rt(le)):T((e=>Object.assign(Object.assign({},e),{likesCount:(e.likesCount||0)+(e.liked?-1:1),liked:!e.liked})))}catch(e){ae(rt(le))}pe(!1)}})),showingMostEngaging:!(!i||!(null==L?void 0:L.id))}),oe&&R.default.createElement(ra,{isMainCmt:!w,onClose:()=>ne(!1),onPostSuccess:e=>{0!==Q||(null==L?void 0:L.id)||M(e),T((e=>Object.assign(Object.assign({},e),{commentsCount:e.commentsCount+1,commented:!0}))),u&&u(e)},post:N}),i&&(null==L?void 0:L.id)?R.default.createElement("div",{className:"most-engaging-wrapper",onClick:e=>{c?(e.stopPropagation(),c()):window.location.href=ie}},R.default.createElement(fo,{hasQuickBookingEnable:C,handleMakeAppointment:k,comment:L,post:N,onDeleteComment:()=>{Ae&&Ae(L)},className:"most-engaging-comment",type:"most-engaging",key:L.id,cardAuthorProps:A}),Q>1&&!n&&R.default.createElement(E.Button,{className:"see-more-comments",color:"ghost",size:"md"},le("comment.seeMoreComments",{count:Q-1}))):null,y))},exports.CardPostPopoverMore=Wl,exports.CardReactions=re,exports.CardReply=fo,exports.CardReplyPopover=Gl,exports.Close=V,exports.CreateNewPostContent=({className:n,style:d,onPostCreatedEdited:m,onClose:p,communities:b=[],forceSelectCommunity:x,forceSelectTopics:w,articleId:y,optionalTopic:C,editPostData:E,defaultCommunity:k,defaultTopics:A,noFetchTopic:N,hideTopicList:T,selectAskDoctor:S,showAskDoctorOptions:P,currentPageUrl:L})=>{const M=!!(null==E?void 0:E.id),{data:{locale:I,env:{isMarryBaby:z}},action:{pushNotifications:j,sanitizeFunction:F}}=t.useContext(h.TogetherComponentGlobalContext),{t:O}=o.useTranslations(),[D,U]=t.useState(!1),[V,_]=t.useState(S),[H,W]=t.useState(!1),[q,G]=t.useState(!1),[Z,Q]=t.useState(""),[X,K]=t.useState(""),[$,Y]=t.useState(x?{label:x.name,value:`${x.id||""}-${x.mappedCategoryId||""}`}:{label:O("community.choose"),value:""}),[J,ee]=t.useState([...w]||[]),[te,ae]=t.useState([]),[le,oe]=t.useState([]),ne=x||b.find((e=>`${e.id||""}-${e.mappedCategoryId||""}`===$.value)),ie=x?[x]:b.filter((e=>e.isActive)).sort(((e,t)=>e.name>t.name?1:e.name<t.name?-1:0)),[re,se]=t.useState(null),[de,ce]=t.useState([]),ue=Z&&B.default(X)&&(C||!C&&J.length>0)&&ne&&(!te||te.length<=h.MAX_IMAGE_UPLOADS)&&!(null==de?void 0:de.length)&&!q;t.useEffect((()=>{if(E){const e=E;Q(e.title||""),K(yt(wt(e.description||"","edit"),e.mentions)),Y({label:e.community.name,value:`${e.community.id||""}-${e.community.mappedCategoryId||""}`}),ee(e.topics||[]),ae(e.photos||[]),U(!!e.isAnonymous||!1),_(!!e.isAskDoctor||!1)}else k&&Y({label:k.name,value:`${k.id||""}-${k.mappedCategoryId||""}`}),A&&ee(A)}),[]);const me=()=>e.__awaiter(void 0,void 0,void 0,(function*(){var t,a,l,o,n,i,r,s,d;if(P&&void 0===V)return W(!0),!1;const c=yield(({title:t,description:a,communityId:l,imageFiles:o,previewUrl:n,topicIds:i,locale:r,sanitizeFunction:s,categoryCommunityId:d,categoryTopicIds:c,introUrl:u,bannerUrl:m,scheduleTime:p,isAnonymous:f,isAskDoctor:v})=>e.__awaiter(void 0,void 0,void 0,(function*(){const e=new FormData,b=At(a),x=At(t),w=Et(b);if(e.append("title",x),e.append("description",Nt(b,s)),d?e.append("category_community",String(d)):l&&e.append("community_id",String(l)),e.append("is_anonymous",f?"1":"0"),e.append("is_question",v?"1":"0"),(null==n?void 0:n.title)&&e.append("preview_title",n.title),(null==n?void 0:n.description)&&e.append("preview_description",n.description),(null==n?void 0:n.url)&&e.append("preview_link",g.safeEncodeURI(n.url)),(null==n?void 0:n.image)&&e.append("preview_image",g.safeEncodeURI(n.image)),null==i||i.forEach((t=>{e.append("topics[]",String(t||""))})),null==c||c.forEach((t=>{e.append("category_topics[]",String(t||""))})),null==o?void 0:o.length){const t=yield Promise.all(o.map(((e,t)=>new Promise((a=>{setTimeout((()=>{a(Lt(e,r))}),2e3*t)})))));null==t||t.filter(Boolean).slice(0,h.MAX_IMAGE_UPLOADS).forEach(((t,a)=>{e.append(`images[${a}]`,t)}))}else e.append("images","");return null==w||w.forEach((t=>{e.append("mention_ids[]",t)})),e.append("intro_url",u||""),e.append("banner",m||""),p&&(e.append("post_type","scheduled"),e.append("schedule_datetime",p)),e})))({title:Z,description:X,communityId:String((null==ne?void 0:ne.id)||""),imageFiles:te,previewUrl:re,topicIds:null==J?void 0:J.map((e=>String(e.id||""))).filter(Boolean),locale:I,sanitizeFunction:F,categoryCommunityId:String((null==ne?void 0:ne.mappedCategoryId)||""),categoryTopicIds:null==J?void 0:J.map((e=>String(e.mappedCategoryId||""))).filter(Boolean),isAnonymous:D?1:0,isAskDoctor:V?1:0});let u;y&&c.append("article_id",y),M?(null==E?void 0:E.id)&&(u=yield(({id:t,locale:a,formData:l})=>e.__awaiter(void 0,void 0,void 0,(function*(){return yield h.callApiWithAuth(h.getApiPath(h.PATHS.POST.UPDATE,{id:t,_locale:a}),"POST",{data:l})})))({id:E.id,formData:c,locale:I})):u=yield(({locale:t,formData:a,isArticleComment:l})=>e.__awaiter(void 0,void 0,void 0,(function*(){return yield h.callApiWithAuth(h.getApiPath(l?h.PATHS.POST.CREATE_ARTICLE_COMMENT:h.PATHS.POST.CREATE,{_locale:t}),"POST",{data:a})})))({formData:c,locale:I,isArticleComment:!(null==ne?void 0:ne.id)&&!!(null==ne?void 0:ne.mappedCategoryId)});const f=null==u?void 0:u.data;(null==f?void 0:f.id)&&!(null===(a=null===(t=null==u?void 0:u.messages)||void 0===t?void 0:t.moderation)||void 0===a?void 0:a.type)?(j({message:O("createPost.popup.success"),type:"success"}),(e=>{m&&m(v.formatPost(e),M),p&&p()})(f)):"banned"===(null===(o=null===(l=null==u?void 0:u.messages)||void 0===l?void 0:l.moderation)||void 0===o?void 0:o.type)?(j({title:O("notification.post.blocked.title"),message:O("notification.post.blocked.message"),type:"danger"}),u.messages.moderation.words&&oe(u.messages.moderation.words)):"suspect"===(null===(i=null===(n=null==u?void 0:u.messages)||void 0===n?void 0:n.moderation)||void 0===i?void 0:i.type)?(j({title:O("notification.post.suspect.title"),message:O("notification.post.suspect.message"),type:"warning"}),p&&p()):(null===(s=null===(r=null==u?void 0:u.messages)||void 0===r?void 0:r.find)||void 0===s?void 0:s.call(r,(e=>{var t;return!!(null===(t=null==e?void 0:e.includes)||void 0===t?void 0:t.call(e,"suspend"))})))?(j({message:O("notification.suspend.message"),type:"danger"}),p&&p()):j({message:(null===(d=null==u?void 0:u.messages)||void 0===d?void 0:d[0])||O("notification.failure"),type:"danger"})}));return R.default.createElement(Kt,{className:n,style:d},R.default.createElement("div",{className:"input-group-container"},R.default.createElement(Gt,{className:"input-group",bannedWords:le,value:Z,onChange:Q}),R.default.createElement(Ht,{className:"input-group",bannedWords:le,value:X,onChange:K,onPreviewUrlChange:se,onInvalidUrlsChange:ce,onImageFilesChange:ae,imageFiles:te}),P&&R.default.createElement($t,{"data-is-marry-baby":z},R.default.createElement("div",{className:"switch-label"},R.default.createElement(r.Ask,{isMarryBaby:z,size:z?32:24,color:i.theme.colors.primaryBase,className:"label-icon"}),R.default.createElement("span",{className:"label-txt"},O("createPost.askDoctor"))),R.default.createElement(f.BtnChoice,{value:V,choices:[{label:O("createPost.askDoctorChoice.yes"),value:!0,dataEventCategory:"Together",dataEventAction:"Write Post Click - Ask Doctor",dataEventLabel:L},{label:O("createPost.askDoctorChoice.no"),value:!1}],onChange:e=>{"boolean"==typeof e&&(W(!1),_(e))}})),H&&R.default.createElement(Yt,null,R.default.createElement(r.Info,{isSolid:!0,color:i.theme.colors.red700,size:14}),R.default.createElement(c.Text,{size:"p3",as:"span",color:i.theme.colors.red700},O("createPost.message.askDoctorRequire"))),R.default.createElement("div",{className:"input-group"},R.default.createElement(c.Text,{size:"p4",className:"input-group-label"},O("admin.community")),R.default.createElement(l.Dropdown,{options:(null==ie?void 0:ie.map((e=>({label:e.name,value:`${e.id||""}-${e.mappedCategoryId||""}`}))))||[],id:"community-picker",placeholder:O("community.choose"),value:$,dropdownLabelTrackingAttributes:{"data-event-category":"Together","data-event-action":"Write Post Click - Choose Community/Topic","data-event-label":L},onChange:e=>{Y({label:e.label,value:String(e.value)}),ee([])},disabled:!!x}),R.default.createElement(c.Text,{size:"sm",className:"warning",color:i.theme.colors.gray400},"* ",O("commentPopup.warning.newPost"))),!T&&R.default.createElement("div",{className:"input-group"},R.default.createElement(c.Text,{size:"p4",className:"input-group-label"},O("tab.topic")),R.default.createElement("div",{className:"input-notification"},R.default.createElement("img",{src:ne?"data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8 14.5C11.3137 14.5 14 11.8137 14 8.5C14 5.18629 11.3137 2.5 8 2.5C4.68629 2.5 2 5.18629 2 8.5C2 11.8137 4.68629 14.5 8 14.5Z' fill='%232D87F3'/%3e%3cpath d='M8 5.5V8.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M8 11.5H8.00708' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e":st}),R.default.createElement(c.Text,{size:"base",color:i.theme.colors.gray500},O(ne?"createPost.popup.primary":"createPost.popup.warning"))),ne&&R.default.createElement(Qt,{className:"tag-list",communityId:ne.id,forceTopics:w,onChange:ee,selectedTopics:J,noFetch:N,dataEventCategory:"Together",dataEventAction:"Write Post Click - Choose Community/Topic",dataEventLabel:L}))),R.default.createElement("div",{className:"form-action"},R.default.createElement("div",{className:"input-group"},R.default.createElement(a.Checkbox,{className:"swich-input-group",labelPosition:"left",name:"PostAnonymous",checked:D,color:z?"pink":void 0,"data-event-category":"Together","data-event-action":"Write Post Click - Incognito","data-event-label":L,label:R.default.createElement("div",{className:"switch-label"},R.default.createElement("img",{className:"label-icon",src:s.CommonGAssets.getAssetPath("anomyous-avatar.svg"),alt:"anomyous avatar",style:{marginRight:"10px",width:"24px"}}),R.default.createElement("span",{className:"label-txt"},O("createPost.postAnonymous"))),value:"Post Anonymous",onChange:e=>U(e.currentTarget.checked),styles:{body:{display:"flex",width:"100%",justifyContent:"space-between",alignItems:"center"},label:{display:"flex",alignItems:"center"}}})),R.default.createElement("div",{className:"input-group"},R.default.createElement(u.Button,{className:"submit-btn pointer-event-child-none",size:"lg","data-event-category":"Ask Doctor","data-event-action":"Submit Question","data-event-label":window.location.href,onClick:()=>e.__awaiter(void 0,void 0,void 0,(function*(){if(ue&&!q){G(!0);try{yield me()}catch(e){console.error(e),j(rt(O))}G(!1)}})),disabled:!ue,loading:q},O("createPost.popup.submit")))))},exports.CreatePostDescription=Ht,exports.CreatePostTitle=Gt,exports.ImagePreviewPopup=Na,exports.InputCommentBar=ra,exports.LabelPin=me,exports.LabelSortPin=ue,exports.LabelSorting=({onChange:e,className:a,style:l,leftLabel:o,rightLabel:n,color:i,value:r,choices:s})=>{const{data:{env:{isMarryBaby:d}}}=t.useContext(h.TogetherComponentGlobalContext);return R.default.createElement(ue,{label:o,rightLabel:R.default.createElement(fe,{position:"bottom",align:"end",data:{isShowheader:!1,type:"list",list:s.map((t=>({label:t.label,onClick:()=>e&&e(String(t.value)),selected:t.value===r,className:"bold-item"})))},toggleButtonContent:R.default.createElement("div",{style:{display:"flex"}},R.default.createElement(b.Text,{style:{display:"flex",alignItems:"center",fontWeight:"normal",marginRight:12},size:"p4"},n),R.default.createElement("img",{src:d?"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M8 14L12 18L16 14' stroke='%233E3F58' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e %3cpath d='M16 10L12 6L8 10' stroke='%233E3F58' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e %3c/svg%3e":"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M4.49992 7H11.4998C11.6352 7 11.7525 6.94506 11.8514 6.83509C11.9502 6.72515 11.9999 6.59496 11.9999 6.44449C11.9999 6.29402 11.9503 6.16389 11.8514 6.0538L8.35141 2.16491C8.25252 2.05509 8.13538 2 7.99988 2C7.86437 2 7.74723 2.05509 7.64826 2.16491L4.1483 6.0538C4.04932 6.16377 3.99988 6.29402 3.99988 6.44449C3.99988 6.59493 4.04932 6.72515 4.1483 6.83509C4.24738 6.94506 4.36452 7 4.49992 7Z' fill='%238C8C8C'/%3e%3cpath d='M11.4998 9H4.49992C4.36441 9 4.24727 9.05497 4.1483 9.16482C4.04932 9.2748 3.99988 9.40496 3.99988 9.55543C3.99988 9.7059 4.04932 9.83616 4.1483 9.94607L7.64826 13.835C7.74734 13.9449 7.86448 14 7.99988 14C8.13527 14 8.25252 13.9449 8.35141 13.835L11.8514 9.94604C11.9502 9.83616 11.9999 9.7059 11.9999 9.5554C11.9999 9.40496 11.9503 9.2748 11.8514 9.16479C11.7525 9.05485 11.6352 9 11.4998 9Z' fill='%238C8C8C'/%3e%3c/svg%3e",style:{width:16,height:16,alignSelf:"center"}}))}),color:"gray",className:a,style:l})},exports.Loading=Z,exports.PopoverMenu=he,exports.PopupDanger=oa,exports.PopupDoctor=De,exports.PopupExpert=Ge,exports.PopupFrame=la,exports.PopupHospital=$e,exports.PostContent=ba,exports.PostImagePreview=Ua,exports.PostSingleImageViewPopup=Ra,exports.ProfileDetail=Il,exports.ProfileDetailModal=at,exports.ShareBox=ca,exports.SharePopup=ua,exports.SkipQuestionOfExpertBtn=l=>{var{post:n,onSkip:i,btnText:r,currentPageUrl:s}=l,d=e.__rest(l,["post","onSkip","btnText","currentPageUrl"]);const{t:c}=o.useTranslations(),{data:{locale:m},action:{pushNotifications:p}}=t.useContext(h.TogetherComponentGlobalContext),[g,f]=t.useState(!1),[v,b]=t.useState(!1),x=a.useMantineTheme(),w=t.useCallback((()=>e.__awaiter(void 0,void 0,void 0,(function*(){var e;b(!0);const t=yield h.callApiWithAuth(h.getApiPath(h.PATHS.USER.SKIP_QUESTION,{_locale:m,id:null==n?void 0:n.id}),"PUT");1===(null==t?void 0:t.status)?(null==i||i({id:(null==n?void 0:n.id)||"",communityId:(null===(e=null==n?void 0:n.community)||void 0===e?void 0:e.id)||""}),f(!1),p({title:"",message:"Skip success",type:"success"})):p({title:"",message:null==t?void 0:t.messages,type:"danger"}),b(!1)}))),[]);return R.default.createElement(a.Popover,{width:327,withArrow:!0,shadow:"md",opened:g},R.default.createElement(a.Popover.Target,null,R.default.createElement("div",Object.assign({className:`${Bl} ${(null==d?void 0:d.className)||""}`,onClick:()=>f(!0)},d),r||c("profilePanel.questionNotClear"))),R.default.createElement(a.Popover.Dropdown,null,R.default.createElement("div",null,R.default.createElement("div",{className:zl},c("profilePanel.skipQuestion.heading")),R.default.createElement("div",{className:jl},c("profilePanel.skipQuestion.content")),R.default.createElement("div",{className:Fl},R.default.createElement(u.Button,{size:"md",variant:"secondary",leftIcon:R.default.createElement(C.Close,{color:x.fn.primaryColor(),size:24}),onClick:()=>f(!1),styles:()=>({leftIcon:{marginRight:0}})}),R.default.createElement(u.Button,{variant:"primary",size:"md",leftIcon:R.default.createElement(C.Check,{color:"white",size:24}),onClick:w,loading:v,"data-event-category":"Together","data-event-action":"Unclear Question Click","data-event-label":s,styles:()=>({leftIcon:{marginRight:0}})})))))},exports.SocialLinkPreview=_a,exports.SourceList=uo,exports.SubmitReportForm=ha,exports.TagTopic=de,exports.TogetherAuthConfigContext=_,exports.TogetherAuthConfigContextProvider=H,exports.TopicSelectList=Qt,exports.VerifiedTag=ho,exports.types=bo,exports.useTogetherAuthRequiredAction=W;