@hhgtech/hhg-components 1.25.45 → 1.25.57

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 (447) hide show
  1. package/build/babyGrowth.js +22 -18
  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/btnChoice/index.d.ts +2 -1
  6. package/build/components/atoms/customReferenceDot/index.d.ts +1 -1
  7. package/build/components/atoms/icons/ACharacter.d.ts +4 -0
  8. package/build/components/atoms/icons/CameraCircle.d.ts +4 -0
  9. package/build/components/atoms/icons/CircleBorder.d.ts +4 -0
  10. package/build/components/atoms/icons/Post.d.ts +4 -0
  11. package/build/components/atoms/icons/Smile.d.ts +4 -0
  12. package/build/components/atoms/icons/Video.d.ts +4 -0
  13. package/build/components/atoms/icons/index.d.ts +6 -0
  14. package/build/components/atoms/imageWithHandler/index.d.ts +1 -1
  15. package/build/components/atoms/index.d.ts +2 -0
  16. package/build/components/babyGrowth/babyGrowthChooseProfileDrawer/index.d.ts +3 -1
  17. package/build/components/mantine/anchor/index.styles.d.ts +4 -2
  18. package/build/components/mantine/breadcrumbs/index.d.ts +3 -2
  19. package/build/components/mantine/breadcrumbs/index.styled.d.ts +1 -1
  20. package/build/components/mantine/breadcrumbs/item.d.ts +1 -1
  21. package/build/components/mantine/button/index.d.ts +3 -3
  22. package/build/components/mantine/button/index.styles.d.ts +6 -2
  23. package/build/components/mantine/datepicker/index.d.ts +4 -8
  24. package/build/components/mantine/index.d.ts +2 -1
  25. package/build/components/mantine/indicator/index.d.ts +1 -1
  26. package/build/components/mantine/input/number.d.ts +2 -2
  27. package/build/components/mantine/loadingOverlay/useLockBodyScroll.d.ts +1 -0
  28. package/build/components/mantine/modal/index.d.ts +1 -1
  29. package/build/components/mantine/modal/index.styles.d.ts +15 -0
  30. package/build/components/mantine/otp/index.d.ts +2 -2
  31. package/build/components/mantine/phone/index.d.ts +1 -1
  32. package/build/components/mantine/tabs/index.styles.d.ts +4 -2
  33. package/build/components/mantine/text/index.d.ts +1 -1
  34. package/build/components/mantine/text/index.styles.d.ts +4 -2
  35. package/build/components/mantine/theme/heading.d.ts +7 -0
  36. package/build/components/mantine/theme/index.d.ts +2 -0
  37. package/build/components/mantine/theme/input.d.ts +4 -3
  38. package/build/components/mantine/theme/other.d.ts +2 -2
  39. package/build/components/mantine/theme/radio.d.ts +1 -13
  40. package/build/components/mantine/theme/text.d.ts +38 -38
  41. package/build/components/molecules/adBlock/fixedBottomAdBlock.d.ts +16 -0
  42. package/build/components/molecules/adBlock/index.d.ts +45 -0
  43. package/build/components/molecules/adBlock/index.styled.d.ts +4 -0
  44. package/build/components/molecules/bmiForm/index.styled.d.ts +2 -2
  45. package/build/components/molecules/bmrForm/index.styled.d.ts +2 -2
  46. package/build/components/molecules/embeddedHeathToolCards/baby-poop/index.d.ts +4 -3
  47. package/build/components/molecules/embeddedHeathToolCards/baby-poop/index.styles.d.ts +20 -0
  48. package/build/components/molecules/index.d.ts +4 -0
  49. package/build/components/molecules/tabs/index.d.ts +1 -1
  50. package/build/components/molecules/tabs/index.styles.d.ts +8 -2
  51. package/build/components/molecules/thrForm/index.styled.d.ts +2 -2
  52. package/build/components/{organisms/navigationV2 → navigationV2}/components/atoms/ItemNav/index.d.ts +4 -0
  53. package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/Categories/index.d.ts +1 -1
  54. package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/menuCareList/Item/index.d.ts +1 -1
  55. package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/menuCareList/careSpotlights.d.ts +1 -1
  56. package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/menuCareList/index.d.ts +1 -1
  57. package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/menuCommunitiesList/communitySpotlights.d.ts +1 -1
  58. package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/menuCommunitiesList/index.d.ts +1 -1
  59. package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/navigationBar/hamburgerMenu/index.d.ts +1 -1
  60. package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/navigationBar/index.d.ts +1 -1
  61. package/build/components/{organisms/navigationV2 → navigationV2}/hooks/useNavConfig.d.ts +1 -1
  62. package/build/components/{organisms/navigationV2 → navigationV2}/index.d.ts +1 -1
  63. package/build/components/{organisms/navigationV2 → navigationV2}/types.d.ts +1 -0
  64. package/build/components/onboarding/onboardingForm/index.d.ts +1 -0
  65. package/build/components/organisms/index.d.ts +1 -1
  66. package/build/components/pregnancyWeightGain/pregnancyWeightGainChart/components/chart.d.ts +1 -1
  67. package/build/components/pregnancyWeightGain/pregnancyWeightGainChart/components/chartLegend.d.ts +1 -1
  68. package/build/components/pregnancyWeightGain/pregnancyWeightGainChart/index.d.ts +1 -1
  69. package/build/components/ui/cardAuthor/index.d.ts +2 -1
  70. package/build/components/vaccination/helpers.d.ts +4 -1
  71. package/build/components/vaccination/shared/dose.d.ts +3 -1
  72. package/build/components/vaccination/vaccinationFilter/index.d.ts +1 -2
  73. package/build/components/vaccination/vaccineCard/immunization.d.ts +3 -0
  74. package/build/components/vaccination/vaccineCard/index.d.ts +10 -3
  75. package/build/components/vaccination/vaccineCard/modal.d.ts +1 -1
  76. package/build/components/vaccination/vaccineCard/timeline.d.ts +1 -1
  77. package/build/components/vaccination/vaccineDetailPopup/{form.d.ts → default.d.ts} +5 -4
  78. package/build/components/vaccination/vaccineDetailPopup/immunization.d.ts +14 -0
  79. package/build/components/vaccination/vaccineDetailPopup/index.d.ts +6 -3
  80. package/build/components/vaccination/vaccineImmunization/header.d.ts +7 -2
  81. package/build/components/vaccination/vaccineRecordsByAgeGroup/index.d.ts +8 -1
  82. package/build/components/vaccination/vaccineRecordsByAgeGroup/scheduleTimeline.d.ts +2 -1
  83. package/build/components/vaccination/vaccineTimelineBanner/index.d.ts +2 -1
  84. package/build/components.js +1 -1
  85. package/build/constants.js +1 -1
  86. package/build/core-d9f96c6a.js +1 -0
  87. package/build/{dataTransform-a757793a.js → dataTransform-fa65027d.js} +1 -1
  88. package/build/ecom.js +1 -1
  89. package/build/esm/babyGrowth.js +10 -6
  90. package/build/esm/cache.js +1 -1
  91. package/build/esm/care.js +1 -1
  92. package/build/esm/components.js +1 -1
  93. package/build/esm/constants.js +1 -1
  94. package/build/esm/{core-95706543.js → core-6aca234b.js} +1 -1
  95. package/build/esm/{dataTransform-cf0fb9c7.js → dataTransform-f0b20c52.js} +1 -1
  96. package/build/esm/ecom.js +1 -1
  97. package/build/esm/fixedBottomAdBlock-4186a1b3.js +1 -0
  98. package/build/esm/footer.js +1 -1
  99. package/build/esm/gAssets.js +1 -1
  100. package/build/esm/getDynamicHealthTool-166b41ad.js +1 -0
  101. package/build/esm/{getSocialList-85aef4f0.js → getSocialList-a0e2abab.js} +1 -1
  102. package/build/esm/hooks.js +1 -1
  103. package/build/esm/i18n.js +1 -1
  104. package/build/esm/{index.styled-d258e31d.js → index-07b43ec9.js} +397 -498
  105. package/build/esm/index-25f89f9a.js +1 -0
  106. package/build/esm/index-2b1c04b6.js +1 -0
  107. package/build/esm/{index-8ab1eb7f.js → index-2c16e4ce.js} +1 -1
  108. package/build/esm/index-3aa67b79.js +1 -0
  109. package/build/esm/index-403e15b0.js +1 -0
  110. package/build/esm/index-4c924334.js +1 -0
  111. package/build/esm/index-4ff4ad08.js +1 -0
  112. package/build/esm/{index-b62c82fc.js → index-50bf97c0.js} +1 -1
  113. package/build/esm/index-639b52f7.js +1 -0
  114. package/build/esm/index-67ac025d.js +1 -0
  115. package/build/esm/{index-3b0fce57.js → index-7ed95870.js} +1 -1
  116. package/build/esm/{index-f77ce838.js → index-833a8c3f.js} +1 -1
  117. package/build/esm/{index-2afe444d.js → index-9a3842f5.js} +1 -1
  118. package/build/esm/index-a9cb1435.js +1 -0
  119. package/build/esm/{index-29debda3.js → index-a9f54377.js} +1 -1
  120. package/build/esm/{index-7a7118d3.js → index-bb9dafcf.js} +1 -1
  121. package/build/esm/{index-a0c63c57.js → index-bf3a4367.js} +1 -1
  122. package/build/esm/{index-15131177.js → index-da233326.js} +1 -1
  123. package/build/esm/index-e6051fb1.js +112 -0
  124. package/build/esm/{index-f4b06d8f.js → index-ef658ac8.js} +2 -2
  125. package/build/esm/index-f55060fd.js +1 -0
  126. package/build/esm/{index-a0d011f1.js → index-f643ff94.js} +1 -1
  127. package/build/esm/{index-9661adcc.js → index-f958f081.js} +1 -1
  128. package/build/esm/index.css +1 -1
  129. package/build/esm/index.js +1 -1
  130. package/build/esm/{index.styled-8a4b4ddf.js → index.styled-0de03bf5.js} +6 -6
  131. package/build/esm/index.styled-5b95b0fa.js +1249 -0
  132. package/build/esm/{index.styled-25364fb7.js → index.styled-942b236f.js} +1 -1
  133. package/build/esm/{index.styled-454ee66b.js → index.styled-e699b40f.js} +687 -676
  134. package/build/esm/lead.js +1 -1
  135. package/build/esm/mantine.js +1 -1
  136. package/build/esm/misc.js +1 -1
  137. package/build/esm/navigation.js +1 -1
  138. package/build/esm/onboarding.js +1 -1
  139. package/build/esm/pwg.js +3 -3
  140. package/build/esm/{routing-afa553c2.js → routing-d5d0943b.js} +1 -1
  141. package/build/esm/{screenSizeContext-69c1b801.js → screenSizeContext-f1ed7d16.js} +1 -1
  142. package/build/esm/together.js +1 -1
  143. package/build/esm/translationsContext-847f0e27.js +1 -0
  144. package/build/esm/translationsProvider-7ddb7375.js +1 -0
  145. package/build/esm/{types-ac16d6ba.js → types-5244a7e4.js} +1 -1
  146. package/build/esm/types-912a9d14.js +3079 -0
  147. package/build/esm/types.js +1 -1
  148. package/build/esm/unifyEnv.js +1 -1
  149. package/build/esm/useHealthToolCache-2607d952.js +1 -0
  150. package/build/esm/{useRafState-3cbcace7.js → useRafState-3e0f61cc.js} +1 -1
  151. package/build/esm/useTranslations-f64ca572.js +1 -0
  152. package/build/esm/utils-c139be0c.js +166 -0
  153. package/build/esm/vaccination.js +63 -43
  154. package/build/fixedBottomAdBlock-e877754b.js +1 -0
  155. package/build/footer.js +1 -1
  156. package/build/gAssets.js +1 -1
  157. package/build/{getDynamicHealthTool-ce438188.js → getDynamicHealthTool-b3a9e649.js} +1 -1
  158. package/build/{getSocialList-59ef47c1.js → getSocialList-584af62c.js} +1 -1
  159. package/build/hooks.js +1 -1
  160. package/build/i18n.js +1 -1
  161. package/build/{index-83ff3e29.js → index-05217952.js} +1 -1
  162. package/build/{index-5d53b0d7.js → index-10c6d3be.js} +1 -1
  163. package/build/{index-a5449716.js → index-18010e95.js} +1 -1
  164. package/build/{index-bb2251e5.js → index-221dccaf.js} +1 -1
  165. package/build/index-24ebf0b7.js +112 -0
  166. package/build/index-3bfb5929.js +1 -0
  167. package/build/{index-a82a107e.js → index-3df20add.js} +1 -1
  168. package/build/{index-4bb962f2.js → index-3f125166.js} +1 -1
  169. package/build/index-6c804adb.js +1 -0
  170. package/build/{index-c7be2d69.js → index-70fe3bc5.js} +1 -1
  171. package/build/index-76e04636.js +1 -0
  172. package/build/{index-ebf0cc32.js → index-7c43b23b.js} +1 -1
  173. package/build/{index-71c533ab.js → index-9408d632.js} +1 -1
  174. package/build/{index.styled-5d3ffb36.js → index-97cca6d5.js} +297 -398
  175. package/build/index-9a51525b.js +1 -0
  176. package/build/index-a3d869c3.js +1 -0
  177. package/build/{index-f7bfded7.js → index-af942077.js} +1 -1
  178. package/build/index-b0ecb439.js +1 -0
  179. package/build/{index-b00ed3b1.js → index-d0e6dec3.js} +1 -1
  180. package/build/index-d55bdf58.js +1 -0
  181. package/build/index-dc848204.js +1 -0
  182. package/build/{index-7c67b504.js → index-eb12c43f.js} +1 -1
  183. package/build/{index-1644ad70.js → index-ee3318d8.js} +1 -1
  184. package/build/{index-30f67564.js → index-ffc2b4fe.js} +1 -1
  185. package/build/index.css +1 -1
  186. package/build/index.js +1 -1
  187. package/build/index.styled-309fe10c.js +1249 -0
  188. package/build/{index.styled-fd333b18.js → index.styled-6de79d1e.js} +666 -655
  189. package/build/{index.styled-2eda571c.js → index.styled-9cfb5478.js} +5 -5
  190. package/build/{index.styled-1727d883.js → index.styled-e7a24c86.js} +1 -1
  191. package/build/interfaces/constants/index.d.ts +2 -0
  192. package/build/interfaces/types/BabyVaccination.d.ts +4 -0
  193. package/build/lead.js +1 -1
  194. package/build/mantine.js +1 -1
  195. package/build/misc/callApi/helpers.d.ts +4 -0
  196. package/build/misc/callApi/index.d.ts +24 -0
  197. package/build/misc/callApi/instance.d.ts +11 -0
  198. package/build/misc/callApi/interceptors.d.ts +6 -0
  199. package/build/misc/noop.d.ts +1 -0
  200. package/build/misc/unifyEnv.d.ts +4 -1
  201. package/build/misc.js +1 -1
  202. package/build/navigation.js +1 -1
  203. package/build/onboarding.js +1 -1
  204. package/build/pwg.js +1 -1
  205. package/build/{routing-99530bda.js → routing-fcdfce19.js} +1 -1
  206. package/build/screenSizeContext-c4a1c827.js +81 -0
  207. package/build/together/components/atoms/tagTopic/index.d.ts +6 -2
  208. package/build/together/components/molecules/cardAuthor/index.d.ts +2 -2
  209. package/build/together/components/molecules/cardAuthor/index.styles.d.ts +5 -2
  210. package/build/together/components/molecules/createNewPostContent/index.d.ts +2 -1
  211. package/build/together/components/molecules/postContent/index.d.ts +2 -1
  212. package/build/together/components/molecules/postContent/index.styles.d.ts +4 -2
  213. package/build/together/components/molecules/profileDetail/context.d.ts +2 -1
  214. package/build/together/components/molecules/profileDetail/index.d.ts +2 -1
  215. package/build/together/components/molecules/skipQuestionOfExpertBtn/index.d.ts +2 -1
  216. package/build/together/components/molecules/topicSelectList/index.d.ts +3 -2
  217. package/build/together/components/organisms/cardReply/index.styled.d.ts +1 -1
  218. package/build/together/components/organisms/sourceList/index.d.ts +2 -1
  219. package/build/together/interfaces/types.d.ts +1 -16
  220. package/build/together.js +1 -1
  221. package/build/translationsContext-ca842755.js +1 -0
  222. package/build/translationsProvider-e50b87e4.js +1 -0
  223. package/build/types-7d927e08.js +3079 -0
  224. package/build/{types-8a958d33.js → types-d0943884.js} +1 -1
  225. package/build/types.js +1 -1
  226. package/build/unifyEnv.js +1 -1
  227. package/build/useHealthToolCache-c8147646.js +1 -0
  228. package/build/{useRafState-612232ad.js → useRafState-ef70e2c8.js} +1 -1
  229. package/build/{useTranslations-67ff5fd7.js → useTranslations-e241e21a.js} +1 -1
  230. package/build/utils-82043344.js +166 -0
  231. package/build/vaccination.js +58 -38
  232. package/package.json +13 -17
  233. package/build/components/atoms/icons/Alert.d.ts +0 -4
  234. package/build/components/mantine/datepicker/index.styled.d.ts +0 -3
  235. package/build/components/mantine/datepicker/range.d.ts +0 -5
  236. package/build/components/mantine/modal/index.styled.d.ts +0 -2
  237. package/build/components/molecules/embeddedHeathToolCards/baby-poop/index.styled.d.ts +0 -21
  238. package/build/core-7964667c.js +0 -1
  239. package/build/esm/getDynamicHealthTool-cd374f61.js +0 -1
  240. package/build/esm/index-054b8e5b.js +0 -1
  241. package/build/esm/index-21246326.js +0 -1
  242. package/build/esm/index-444c54e8.js +0 -1
  243. package/build/esm/index-504a1112.js +0 -1
  244. package/build/esm/index-5085e79e.js +0 -1
  245. package/build/esm/index-51475f98.js +0 -1
  246. package/build/esm/index-6deffafa.js +0 -1
  247. package/build/esm/index-75c2a8af.js +0 -1
  248. package/build/esm/index-9f42b4de.js +0 -115
  249. package/build/esm/index-ca96531f.js +0 -1
  250. package/build/esm/index-e857a5ac.js +0 -1
  251. package/build/esm/index.styled-0e438444.js +0 -1249
  252. package/build/esm/translationsContext-064bb38b.js +0 -1
  253. package/build/esm/translationsProvider-8b00bf7c.js +0 -1
  254. package/build/esm/types-b57be08b.js +0 -3078
  255. package/build/esm/useHealthToolCache-d6d7b5bf.js +0 -1
  256. package/build/esm/useScreenSize-a091dd7c.js +0 -1
  257. package/build/esm/useTranslations-28bde0c8.js +0 -1
  258. package/build/esm/utils-8c3a1c96.js +0 -166
  259. package/build/index-2c4c22e7.js +0 -1
  260. package/build/index-563ae4f7.js +0 -115
  261. package/build/index-7d36a8ef.js +0 -1
  262. package/build/index-8dfa98a1.js +0 -1
  263. package/build/index-96f7fe82.js +0 -1
  264. package/build/index-a925c09d.js +0 -1
  265. package/build/index-c91de6e1.js +0 -1
  266. package/build/index-dd72272b.js +0 -1
  267. package/build/index-e1a7969c.js +0 -1
  268. package/build/index.styled-b140e328.js +0 -1249
  269. package/build/screenSizeContext-7fb4a1fc.js +0 -81
  270. package/build/translationsContext-a6d61cf7.js +0 -1
  271. package/build/translationsProvider-f3f088d3.js +0 -1
  272. package/build/types-6cf6df68.js +0 -3078
  273. package/build/useHealthToolCache-854f8c61.js +0 -1
  274. package/build/useScreenSize-7cf50bd3.js +0 -1
  275. package/build/utils-baba8178.js +0 -166
  276. /package/build/{BMI_BOYS.percentile.monthly-7a282aba.js → BMI_BOYS.percentile.monthly-de91e806.js} +0 -0
  277. /package/build/{BMI_BOYS.percentile.weekly-10e04207.js → BMI_BOYS.percentile.weekly-810def48.js} +0 -0
  278. /package/build/{BMI_BOYS.percentile.yearly-c4046843.js → BMI_BOYS.percentile.yearly-50355acd.js} +0 -0
  279. /package/build/{BMI_BOYS.zscore.monthly-f1e330d5.js → BMI_BOYS.zscore.monthly-d72fb8f6.js} +0 -0
  280. /package/build/{BMI_BOYS.zscore.weekly-4abfc857.js → BMI_BOYS.zscore.weekly-8fc6be69.js} +0 -0
  281. /package/build/{BMI_BOYS.zscore.yearly-305e1648.js → BMI_BOYS.zscore.yearly-644c2d8d.js} +0 -0
  282. /package/build/{BMI_GIRLS.percentile.monthly-5abf0c52.js → BMI_GIRLS.percentile.monthly-4019be93.js} +0 -0
  283. /package/build/{BMI_GIRLS.percentile.weekly-25ca97f1.js → BMI_GIRLS.percentile.weekly-854852bf.js} +0 -0
  284. /package/build/{BMI_GIRLS.percentile.yearly-40014298.js → BMI_GIRLS.percentile.yearly-c0ddde1d.js} +0 -0
  285. /package/build/{BMI_GIRLS.zscore.monthly-48bee52f.js → BMI_GIRLS.zscore.monthly-50e9e93c.js} +0 -0
  286. /package/build/{BMI_GIRLS.zscore.weekly-dd142cd1.js → BMI_GIRLS.zscore.weekly-a5d035f0.js} +0 -0
  287. /package/build/{BMI_GIRLS.zscore.yearly-05198a56.js → BMI_GIRLS.zscore.yearly-b186c1a5.js} +0 -0
  288. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-fd09613b.js → HEAD CIRCUM_BOYS.percentile.monthly-6608b832.js} +0 -0
  289. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-e0ac72aa.js → HEAD CIRCUM_BOYS.percentile.weekly-9c8eac7e.js} +0 -0
  290. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-48d4a960.js → HEAD CIRCUM_BOYS.percentile.yearly-193efcdf.js} +0 -0
  291. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-be348b6f.js → HEAD CIRCUM_BOYS.zscore.monthly-d4b0ecff.js} +0 -0
  292. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-8736363c.js → HEAD CIRCUM_BOYS.zscore.weekly-fecff98e.js} +0 -0
  293. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-04fd06a7.js → HEAD CIRCUM_BOYS.zscore.yearly-edb240ef.js} +0 -0
  294. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-87c64350.js → HEAD CIRCUM_GIRLS.percentile.monthly-8af837c2.js} +0 -0
  295. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-c85177d2.js → HEAD CIRCUM_GIRLS.percentile.weekly-f89a721e.js} +0 -0
  296. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-818f3db0.js → HEAD CIRCUM_GIRLS.percentile.yearly-880b2d08.js} +0 -0
  297. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-84b2fca9.js → HEAD CIRCUM_GIRLS.zscore.monthly-7e898436.js} +0 -0
  298. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-1e65a0ae.js → HEAD CIRCUM_GIRLS.zscore.weekly-a28ed42c.js} +0 -0
  299. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-946f07ec.js → HEAD CIRCUM_GIRLS.zscore.yearly-918e3543.js} +0 -0
  300. /package/build/{HEIGHT_BOYS.percentile.monthly-b9a3c3f2.js → HEIGHT_BOYS.percentile.monthly-86e93644.js} +0 -0
  301. /package/build/{HEIGHT_BOYS.percentile.weekly-f63d2676.js → HEIGHT_BOYS.percentile.weekly-583a8f12.js} +0 -0
  302. /package/build/{HEIGHT_BOYS.percentile.yearly-a8f01915.js → HEIGHT_BOYS.percentile.yearly-ea3c1503.js} +0 -0
  303. /package/build/{HEIGHT_BOYS.zscore.monthly-2a27f4f4.js → HEIGHT_BOYS.zscore.monthly-14711619.js} +0 -0
  304. /package/build/{HEIGHT_BOYS.zscore.weekly-abc37373.js → HEIGHT_BOYS.zscore.weekly-4adeea59.js} +0 -0
  305. /package/build/{HEIGHT_BOYS.zscore.yearly-28f09a84.js → HEIGHT_BOYS.zscore.yearly-11513a76.js} +0 -0
  306. /package/build/{HEIGHT_GIRLS.percentile.monthly-999072a7.js → HEIGHT_GIRLS.percentile.monthly-6c6b0024.js} +0 -0
  307. /package/build/{HEIGHT_GIRLS.percentile.weekly-e8633792.js → HEIGHT_GIRLS.percentile.weekly-04de7259.js} +0 -0
  308. /package/build/{HEIGHT_GIRLS.percentile.yearly-772dfd42.js → HEIGHT_GIRLS.percentile.yearly-d290b60f.js} +0 -0
  309. /package/build/{HEIGHT_GIRLS.zscore.monthly-3aa8c643.js → HEIGHT_GIRLS.zscore.monthly-af444d64.js} +0 -0
  310. /package/build/{HEIGHT_GIRLS.zscore.weekly-8ed92387.js → HEIGHT_GIRLS.zscore.weekly-382f704e.js} +0 -0
  311. /package/build/{HEIGHT_GIRLS.zscore.yearly-c7e8d790.js → HEIGHT_GIRLS.zscore.yearly-1d6f27a4.js} +0 -0
  312. /package/build/{Onboarding-a9752a1e.js → Onboarding-3623ec04.js} +0 -0
  313. /package/build/{Visible-b40d9424.js → Visible-ee82fd46.js} +0 -0
  314. /package/build/{WEIGHT_BOYS.percentile.monthly-e419807d.js → WEIGHT_BOYS.percentile.monthly-ce84fb34.js} +0 -0
  315. /package/build/{WEIGHT_BOYS.percentile.weekly-7c63d748.js → WEIGHT_BOYS.percentile.weekly-3fab9bb5.js} +0 -0
  316. /package/build/{WEIGHT_BOYS.percentile.yearly-c8c5b4a4.js → WEIGHT_BOYS.percentile.yearly-71c9c082.js} +0 -0
  317. /package/build/{WEIGHT_BOYS.zscore.monthly-a65cfe7d.js → WEIGHT_BOYS.zscore.monthly-28ec774a.js} +0 -0
  318. /package/build/{WEIGHT_BOYS.zscore.weekly-49ed1268.js → WEIGHT_BOYS.zscore.weekly-b5914ab1.js} +0 -0
  319. /package/build/{WEIGHT_BOYS.zscore.yearly-529ab7a9.js → WEIGHT_BOYS.zscore.yearly-a39a7b59.js} +0 -0
  320. /package/build/{WEIGHT_GIRLS.percentile.monthly-d8c7ca39.js → WEIGHT_GIRLS.percentile.monthly-483b0563.js} +0 -0
  321. /package/build/{WEIGHT_GIRLS.percentile.weekly-bbfe747c.js → WEIGHT_GIRLS.percentile.weekly-d230ef8e.js} +0 -0
  322. /package/build/{WEIGHT_GIRLS.percentile.yearly-e8cf12f5.js → WEIGHT_GIRLS.percentile.yearly-a56eccd8.js} +0 -0
  323. /package/build/{WEIGHT_GIRLS.zscore.monthly-fcd8eef8.js → WEIGHT_GIRLS.zscore.monthly-fd518d7d.js} +0 -0
  324. /package/build/{WEIGHT_GIRLS.zscore.weekly-af37518c.js → WEIGHT_GIRLS.zscore.weekly-74f1cb9d.js} +0 -0
  325. /package/build/{WEIGHT_GIRLS.zscore.yearly-cbea054d.js → WEIGHT_GIRLS.zscore.yearly-efd33c7e.js} +0 -0
  326. /package/build/components/{organisms/navigationV2 → navigationV2}/components/atoms/ArrowLeftPopupIcon.d.ts +0 -0
  327. /package/build/components/{organisms/navigationV2 → navigationV2}/components/atoms/ClosePopupIcon.d.ts +0 -0
  328. /package/build/components/{organisms/navigationV2 → navigationV2}/components/atoms/HamburgerIcon.d.ts +0 -0
  329. /package/build/components/{organisms/navigationV2 → navigationV2}/components/atoms/PopupWrapper/btnClosePopup.d.ts +0 -0
  330. /package/build/components/{organisms/navigationV2 → navigationV2}/components/atoms/PopupWrapper/index.d.ts +0 -0
  331. /package/build/components/{organisms/navigationV2 → navigationV2}/components/atoms/SearchIcon.d.ts +0 -0
  332. /package/build/components/{organisms/navigationV2 → navigationV2}/components/atoms/searchInput/index.d.ts +0 -0
  333. /package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/Categories/index.styled.d.ts +0 -0
  334. /package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/Spotlights/index.d.ts +0 -0
  335. /package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/Spotlights/index.styled.d.ts +0 -0
  336. /package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/menuCareList/Item/index.styled.d.ts +0 -0
  337. /package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/menuCareList/index.styled.d.ts +0 -0
  338. /package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/menuCategoriesList/Item/index.d.ts +0 -0
  339. /package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/menuCategoriesList/Item/index.styled.d.ts +0 -0
  340. /package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/menuCategoriesList/categorySpotlights.d.ts +0 -0
  341. /package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/menuCategoriesList/index.d.ts +0 -0
  342. /package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/menuCategoriesList/index.styled.d.ts +0 -0
  343. /package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/menuCommunitiesList/Item/index.d.ts +0 -0
  344. /package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/menuCommunitiesList/Item/index.styled.d.ts +0 -0
  345. /package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/menuCommunitiesList/index.styled.d.ts +0 -0
  346. /package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/menuHealthToolsList/Item/index.d.ts +0 -0
  347. /package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/menuHealthToolsList/Item/index.styled.d.ts +0 -0
  348. /package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/menuHealthToolsList/ItemMarryBaby/index.d.ts +0 -0
  349. /package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/menuHealthToolsList/ItemMarryBaby/index.styled.d.ts +0 -0
  350. /package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/menuHealthToolsList/index.d.ts +0 -0
  351. /package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/menuHealthToolsList/index.styled.d.ts +0 -0
  352. /package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/menuHealthToolsList/toolSpotlights.d.ts +0 -0
  353. /package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/menuServiceList/index.d.ts +0 -0
  354. /package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/menuServiceList/index.styled.d.ts +0 -0
  355. /package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/navigationBar/bookingButton/index.d.ts +0 -0
  356. /package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/navigationBar/index.styled.d.ts +0 -0
  357. /package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/spotlightNoData/index.d.ts +0 -0
  358. /package/build/components/{organisms/navigationV2 → navigationV2}/components/molecules/spotlightNoData/index.styled.d.ts +0 -0
  359. /package/build/components/{organisms/navigationV2 → navigationV2}/constants.d.ts +0 -0
  360. /package/build/components/{organisms/navigationV2 → navigationV2}/hooks/useHeaderHeight.d.ts +0 -0
  361. /package/build/components/{organisms/navigationV2 → navigationV2}/hooks/useInsider.d.ts +0 -0
  362. /package/build/components/{organisms/navigationV2 → navigationV2}/hooks/useNavServices.d.ts +0 -0
  363. /package/build/components/{organisms/navigationV2 → navigationV2}/index.styled.d.ts +0 -0
  364. /package/build/components/{organisms/navigationV2 → navigationV2}/navigationContext.d.ts +0 -0
  365. /package/build/components/{organisms/navigationV2 → navigationV2}/utils.d.ts +0 -0
  366. /package/build/{constants-8e23acc5.js → constants-9b8da9ca.js} +0 -0
  367. /package/build/{cookieHelper-1befca91.js → cookieHelper-c911bc96.js} +0 -0
  368. /package/build/{dataTransform-9322331d.js → dataTransform-05311344.js} +0 -0
  369. /package/build/esm/{BMI_BOYS.percentile.monthly-86b96db8.js → BMI_BOYS.percentile.monthly-9137fba5.js} +0 -0
  370. /package/build/esm/{BMI_BOYS.percentile.weekly-b939453e.js → BMI_BOYS.percentile.weekly-e892e2c1.js} +0 -0
  371. /package/build/esm/{BMI_BOYS.percentile.yearly-bd93079e.js → BMI_BOYS.percentile.yearly-dcedc68d.js} +0 -0
  372. /package/build/esm/{BMI_BOYS.zscore.monthly-b03fd08e.js → BMI_BOYS.zscore.monthly-89d4ecda.js} +0 -0
  373. /package/build/esm/{BMI_BOYS.zscore.weekly-1a79e155.js → BMI_BOYS.zscore.weekly-eb24bc29.js} +0 -0
  374. /package/build/esm/{BMI_BOYS.zscore.yearly-4dc31e3f.js → BMI_BOYS.zscore.yearly-96bcbb54.js} +0 -0
  375. /package/build/esm/{BMI_GIRLS.percentile.monthly-271d5073.js → BMI_GIRLS.percentile.monthly-6a391a62.js} +0 -0
  376. /package/build/esm/{BMI_GIRLS.percentile.weekly-ffd121bb.js → BMI_GIRLS.percentile.weekly-cc9ace02.js} +0 -0
  377. /package/build/esm/{BMI_GIRLS.percentile.yearly-abcee9d5.js → BMI_GIRLS.percentile.yearly-72d1907f.js} +0 -0
  378. /package/build/esm/{BMI_GIRLS.zscore.monthly-843ab3cd.js → BMI_GIRLS.zscore.monthly-757e2731.js} +0 -0
  379. /package/build/esm/{BMI_GIRLS.zscore.weekly-48d06da6.js → BMI_GIRLS.zscore.weekly-d4794d60.js} +0 -0
  380. /package/build/esm/{BMI_GIRLS.zscore.yearly-20eaf754.js → BMI_GIRLS.zscore.yearly-c44aa342.js} +0 -0
  381. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-5c45d40c.js → HEAD CIRCUM_BOYS.percentile.monthly-447a9a4d.js} +0 -0
  382. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-12ba59be.js → HEAD CIRCUM_BOYS.percentile.weekly-fb0e3872.js} +0 -0
  383. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-cb961cb1.js → HEAD CIRCUM_BOYS.percentile.yearly-db004cb7.js} +0 -0
  384. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-317f7dda.js → HEAD CIRCUM_BOYS.zscore.monthly-14e654b5.js} +0 -0
  385. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-b3b499d2.js → HEAD CIRCUM_BOYS.zscore.weekly-21b7772b.js} +0 -0
  386. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-f8ce17c4.js → HEAD CIRCUM_BOYS.zscore.yearly-67869ebf.js} +0 -0
  387. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-955c6ba6.js → HEAD CIRCUM_GIRLS.percentile.monthly-2d86d11a.js} +0 -0
  388. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-cd74a2b6.js → HEAD CIRCUM_GIRLS.percentile.weekly-eae959c5.js} +0 -0
  389. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-811eaae5.js → HEAD CIRCUM_GIRLS.percentile.yearly-2958a4f5.js} +0 -0
  390. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-2bf5508c.js → HEAD CIRCUM_GIRLS.zscore.monthly-45802598.js} +0 -0
  391. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-14dc2d19.js → HEAD CIRCUM_GIRLS.zscore.weekly-e81cf4e1.js} +0 -0
  392. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-1a17b378.js → HEAD CIRCUM_GIRLS.zscore.yearly-8a51af78.js} +0 -0
  393. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-17b2a528.js → HEIGHT_BOYS.percentile.monthly-1faef801.js} +0 -0
  394. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-65bb52d1.js → HEIGHT_BOYS.percentile.weekly-053b4ffa.js} +0 -0
  395. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-01a3883f.js → HEIGHT_BOYS.percentile.yearly-6e56f0ec.js} +0 -0
  396. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-9e5a22b0.js → HEIGHT_BOYS.zscore.monthly-52daf5bf.js} +0 -0
  397. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-d4595085.js → HEIGHT_BOYS.zscore.weekly-4b7485c2.js} +0 -0
  398. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-8d86e8a0.js → HEIGHT_BOYS.zscore.yearly-aea8faec.js} +0 -0
  399. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-ee22285f.js → HEIGHT_GIRLS.percentile.monthly-034269c0.js} +0 -0
  400. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-bcda10c0.js → HEIGHT_GIRLS.percentile.weekly-ee765a49.js} +0 -0
  401. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-21ac9d8e.js → HEIGHT_GIRLS.percentile.yearly-c2391a8a.js} +0 -0
  402. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-e0856df4.js → HEIGHT_GIRLS.zscore.monthly-3142ee0d.js} +0 -0
  403. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-c8596758.js → HEIGHT_GIRLS.zscore.weekly-7921b8d8.js} +0 -0
  404. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-d5c8b679.js → HEIGHT_GIRLS.zscore.yearly-8d628c57.js} +0 -0
  405. /package/build/esm/{Onboarding-bde86be4.js → Onboarding-edd90346.js} +0 -0
  406. /package/build/esm/{Visible-716a3d0f.js → Visible-b784a437.js} +0 -0
  407. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-4ef18180.js → WEIGHT_BOYS.percentile.monthly-d03728b2.js} +0 -0
  408. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-9e97af18.js → WEIGHT_BOYS.percentile.weekly-338755a2.js} +0 -0
  409. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-a6150b62.js → WEIGHT_BOYS.percentile.yearly-76b5b1b3.js} +0 -0
  410. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-31204a88.js → WEIGHT_BOYS.zscore.monthly-401f0904.js} +0 -0
  411. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-633742b9.js → WEIGHT_BOYS.zscore.weekly-3c087e83.js} +0 -0
  412. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-c0b6e3d6.js → WEIGHT_BOYS.zscore.yearly-daa822fc.js} +0 -0
  413. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-110b9c27.js → WEIGHT_GIRLS.percentile.monthly-5cebf07b.js} +0 -0
  414. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-f79942bd.js → WEIGHT_GIRLS.percentile.weekly-76638fc7.js} +0 -0
  415. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-a45065c7.js → WEIGHT_GIRLS.percentile.yearly-b73802c6.js} +0 -0
  416. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-0fa98783.js → WEIGHT_GIRLS.zscore.monthly-2d4d5df9.js} +0 -0
  417. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-639d8255.js → WEIGHT_GIRLS.zscore.weekly-72619a34.js} +0 -0
  418. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-7dacffad.js → WEIGHT_GIRLS.zscore.yearly-d890ace2.js} +0 -0
  419. /package/build/esm/{constants-bcc51f42.js → constants-08000e14.js} +0 -0
  420. /package/build/esm/{cookieHelper-bc585df3.js → cookieHelper-71d9b25d.js} +0 -0
  421. /package/build/esm/{dataTransform-2b345cfe.js → dataTransform-9a91ff47.js} +0 -0
  422. /package/build/esm/{index-bc497df5.js → index-762a0cac.js} +0 -0
  423. /package/build/esm/{index-45115c11.js → index-ef3b5990.js} +0 -0
  424. /package/build/esm/{isProduction-c9c12dc4.js → isProduction-2f5b17a9.js} +0 -0
  425. /package/build/esm/{localizeNumberFormat-61cdaf7e.js → localizeNumberFormat-e5cf0365.js} +0 -0
  426. /package/build/esm/{normalizeLink-591c4857.js → normalizeLink-b88810dd.js} +0 -0
  427. /package/build/esm/{theme-5dc1721d.js → theme-09b5027a.js} +0 -0
  428. /package/build/esm/{tslib.es6-f47375bf.js → tslib.es6-5507553a.js} +0 -0
  429. /package/build/esm/{types-cacceee6.js → types-d98a9662.js} +0 -0
  430. /package/build/esm/{useIsInit-73a227f7.js → useIsInit-297b332c.js} +0 -0
  431. /package/build/esm/{useOutsideClick-39d12d1d.js → useOutsideClick-6f6a50fd.js} +0 -0
  432. /package/build/esm/{useScrollbarSize-675cb98e.js → useScrollbarSize-966d1d2c.js} +0 -0
  433. /package/build/esm/{useUniqueId-47cb1a07.js → useUniqueId-9985f6b8.js} +0 -0
  434. /package/build/esm/{utils-8267fbe3.js → utils-2554a96d.js} +0 -0
  435. /package/build/{index-908f8d03.js → index-6684512f.js} +0 -0
  436. /package/build/{index-80036992.js → index-bd764537.js} +0 -0
  437. /package/build/{isProduction-92a16cc8.js → isProduction-4f943370.js} +0 -0
  438. /package/build/{localizeNumberFormat-1d4c79c3.js → localizeNumberFormat-1d70eacf.js} +0 -0
  439. /package/build/{normalizeLink-4a79e40d.js → normalizeLink-049dd7a4.js} +0 -0
  440. /package/build/{theme-9f4ef46a.js → theme-2cb6485a.js} +0 -0
  441. /package/build/{tslib.es6-4592208b.js → tslib.es6-01a734a9.js} +0 -0
  442. /package/build/{types-12567394.js → types-7f927b9f.js} +0 -0
  443. /package/build/{useIsInit-0334145e.js → useIsInit-6f805bcb.js} +0 -0
  444. /package/build/{useOutsideClick-9494c75a.js → useOutsideClick-56ef539b.js} +0 -0
  445. /package/build/{useScrollbarSize-a4b77979.js → useScrollbarSize-7eadc7e9.js} +0 -0
  446. /package/build/{useUniqueId-cc919dcd.js → useUniqueId-d52efb9f.js} +0 -0
  447. /package/build/{utils-d83c1891.js → utils-37e02909.js} +0 -0
@@ -1,3078 +0,0 @@
1
- "use strict";var e=require("./tslib.es6-4592208b.js"),t=require("react"),a=require("@mantine/core"),l=require("./index-c7be2d69.js"),o=require("./index-f7bfded7.js"),n=require("./index.styled-5d3ffb36.js"),i=require("./useTranslations-67ff5fd7.js"),r=require("innertext"),s=require("./theme-9f4ef46a.js"),d=require("./index.styled-b140e328.js"),c=require("./gAssets.js"),u=require("./index.styled-fd333b18.js"),m=require("./index-2c4c22e7.js"),p=require("./dataTransform-a757793a.js"),g=require("./index-71c533ab.js"),f=require("lodash/debounce"),h=require("react-contenteditable"),v=require("./index-5d53b0d7.js"),b=require("./index-563ae4f7.js"),x=require("dayjs");require("./screenSizeContext-7fb4a1fc.js");var w=require("styled-components"),y=require("./index-bb2251e5.js"),C=require("./utils-d83c1891.js");require("./isProduction-92a16cc8.js"),require("./Onboarding-a9752a1e.js");var E=require("./index-dd72272b.js");require("./index-1644ad70.js"),require("@mantine/hooks");var k=require("./index-8dfa98a1.js"),A=require("./cookieHelper-1befca91.js"),N=require("react-dom");require("./index-a5449716.js"),require("./index-7c67b504.js"),require("./index.styled-1727d883.js"),require("./index-80036992.js"),require("date-fns"),require("react-day-picker/DayPickerInput"),require("./index-83ff3e29.js"),require("lodash/throttle"),require("keen-slider/react"),require("./types-12567394.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-2eda571c.js"),require("string-format");var T=require("dayjs/plugin/relativeTime"),S=require("./index-c91de6e1.js"),P=require("./useUniqueId-cc919dcd.js");require("./translationsContext-a6d61cf7.js");var L=require("./routing-99530bda.js");function M(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function I(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 R=I(t),B=M(t),z=M(r),j=M(f),F=M(h),O=M(x),V=M(w),D=I(N),U=M(T);const _=e=>R.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),R.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"})),H=t.createContext({}),W=({children:e,defaultParams:t})=>B.default.createElement(H.Provider,{value:{defaultParams:t}},e),q=e=>{const{data:{userInfo:a,env:{togetherBasePath:l}}}=t.useContext(u.TogetherComponentGlobalContext),{defaultParams:o}=t.useContext(H)||{},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||A.deleteCookie(u.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=u.getUrlToSignUp(e,r,l),null}return t&&t()},params:Object.assign(Object.assign({},o),e)}},Z=V.default.div`
2
- display: flex;
3
- align-items: center;
4
- justify-content: center;
5
- padding: 1em;
6
- button {
7
- position: relative;
8
- }
9
- `,G=w.keyframes`
10
- 0% {
11
- transform: rotate(0deg);
12
- }
13
- 100% {
14
- transform: rotate(360deg);
15
- }
16
- `;V.default.div`
17
- display: flex;
18
- width: fit-content;
19
- width: -moz-fit-content;
20
- flex-direction: column;
21
- align-items: center;
22
- justify-content: center;
23
- padding: 1rem 2rem;
24
- background: white;
25
- border-radius: ${e=>e.theme.borderRadius};
26
- box-shadow: -1px 1px 2px rgba(67, 70, 74, 0.0001),
27
- -2px 2px 5px rgba(67, 86, 100, 0.123689);
28
- .loading-spinner {
29
- width: 24px;
30
- height: 24px;
31
- margin-bottom: 0.5rem;
32
- animation: ${G} 1.2s linear infinite;
33
- }
34
- &[data-is-marrybaby='true'] {
35
- box-shadow: none;
36
- }
37
- `;const Q=({className:e,size:t="md"})=>{const{t:a}=i.useTranslations();return B.default.createElement(Z,{className:e},B.default.createElement(l.Button,{size:t,color:"transparent",isLoading:!0},a("loading")))},X=V.default.div`
38
- .link-info-container {
39
- padding: 0.5rem 1rem;
40
- background: ${e=>e.color||"#f4faff"};
41
- }
42
- .link-image-wrapper {
43
- position: relative;
44
- overflow: hidden;
45
- width: 100%;
46
- padding-top: min(280px, 56.25%);
47
- .link-image-blur {
48
- position: absolute;
49
- top: 50%;
50
- left: 50%;
51
- width: 110%;
52
- height: 110%;
53
- /* Add the blur effect */
54
- -webkit-filter: blur(8px);
55
- filter: blur(8px);
56
- object-fit: cover;
57
- object-position: center;
58
- opacity: 0.8;
59
- transform: translate(-50%, -50%);
60
- }
61
- .link-image {
62
- position: absolute;
63
- top: 0;
64
- left: 0;
65
- width: 100%;
66
- height: 100%;
67
- object-fit: contain;
68
- object-position: center;
69
- }
70
- }
71
- a {
72
- text-decoration: none;
73
- }
74
- &[data-is-marrybaby='true'] {
75
- overflow: hidden;
76
- border-radius: 1rem;
77
- .link-info-container {
78
- padding-bottom: 1rem;
79
- p {
80
- color: #2661ad;
81
- }
82
- .link-logo {
83
- max-width: 2rem;
84
- height: 13px;
85
- margin-right: 4px;
86
- object-fit: contain;
87
- vertical-align: middle;
88
- }
89
- }
90
- .link-image-wrapper {
91
- padding-top: min(360px, 56.25%);
92
- .link-image {
93
- object-fit: cover;
94
- }
95
- }
96
- }
97
- `,K=({title:l,url:n,image:i,logo:r,className:s,style:d,noRefetch:c})=>{const{data:{locale:m,env:{isMarryBaby:p}}}=t.useContext(u.TogetherComponentGlobalContext),[g,f]=t.useState(!1),h=a.useMantineTheme(),v=t.useRef(c);v.current=c;const[b,x]=t.useState(null);t.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){if(!v.current){if(!n)return x(null);x((e=>Object.assign(Object.assign({},e),{isFetching:!0}))),u.callApi(u.getApiPath(u.PATHS.FETCH_PREVIEW,{_locale:m}),"POST",{data:{link:n},headers:{"Content-Type":"application/json"}}).then((e=>{var t,a,l;f(!1),x({title:null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.title,url:n,image:(null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.image)||(null===(l=null==e?void 0:e.data)||void 0===l?void 0:l.logo)})})).catch((()=>{x(null)}))}}))}),[n]);const w=(null==b?void 0:b.image)||i,y=(null==b?void 0:b.title)||l,C=(null==b?void 0:b.logo)||r,E=(null==b?void 0:b.url)||n,A=E.replace("http://","").replace("https://","").split(/[/?#]/)[0],N=t.useRef(!1);return B.default.createElement(X,{"data-is-marrybaby":p,className:`${s} no-replace-click`,style:d,color:h.colors[h.primaryColor][0]},B.default.createElement("a",{href:E,target:"_blank",rel:"noreferrer"},w&&B.default.createElement("div",{className:"link-image-wrapper"},!p&&B.default.createElement("img",{className:"link-image-blur",src:w,onError:e=>{N.current||(N.current=!0,e.currentTarget.src=u.DEFAULT_IMG)}}),B.default.createElement("img",{className:"link-image",src:w,onError:e=>{N.current||(N.current=!0,e.currentTarget.src=u.DEFAULT_IMG)}})),B.default.createElement("div",{className:"link-info-container"},B.default.createElement(o.Text,{size:"n1"},p&&C&&!g&&B.default.createElement("img",{className:"link-logo",src:C,onError:()=>f(!0)}),A),B.default.createElement(k.Heading,{tag:"h6"},y))))},$=t.createContext({});var Y="vvR-m49";const J=({children:e,className:a=""})=>{const{isReplied:l,trackingCategory:o,trackingLabel:n,onLikeClick:i}=t.useContext($);return B.default.createElement("div",{className:`${Y} ${a}`,"data-event-category":o,"data-event-action":l?"Like Comment Click":"Like Post Click","data-event-label":n,onClick:()=>{null==i||i()}},e)},ee=({children:e,className:a=""})=>{const{trackingCategory:l,trackingLabel:o,onShareClick:n}=t.useContext($);return B.default.createElement("div",{className:`${Y} ${a}`,onClick:()=>{null==n||n()},"data-event-category":l,"data-event-action":"Share Icon Click","data-event-label":o},e)},te=({children:e,className:a=""})=>{const{isReplied:l,trackingCategory:o,trackingLabel:n,onCommentClick:i}=t.useContext($);return B.default.createElement("div",{className:`${Y} ${a}`,"data-event-category":o,"data-event-action":l?"Reply Comment Click":"Comment Text Click","data-event-label":n,onClick:e=>{e.preventDefault(),e.stopPropagation(),null==i||i()}},e)};var ae,le="UhiT4m5",oe="oEfeTkV",ne="OlbikxJ",ie="_9GXHCn3",re="MV3lNuh";!function(e){e[e.post=1]="post",e[e.reply=2]="reply"}(ae||(ae={}));const se=a=>{var{type:l,loveCount:n=0,replyCount:r=0,replyPadding:c,liked:m,isReplied:p,onCommentClick:g,onLikeClick:f,onShareClick:h,className:b,style:x,hideCommentIcon:w,showingMostEngaging:y,isMarryBaby:C,hasShare:E=!0,hasCountLike:k=!0,trackingCategory:A="Together",trackingLabel:N="",children:T}=a,S=e.__rest(a,["type","loveCount","replyCount","replyPadding","liked","isReplied","onCommentClick","onLikeClick","onShareClick","className","style","hideCommentIcon","showingMostEngaging","isMarryBaby","hasShare","hasCountLike","trackingCategory","trackingLabel","children"]);const{data:{env:{isMarryBaby:P}}}=t.useContext(u.TogetherComponentGlobalContext),L=Boolean(C)?C:P,{t:M}=i.useTranslations();return B.default.createElement($.Provider,{value:{liked:m,loveCount:n,trackingCategory:A,trackingLabel:N,isReplied:p,onLikeClick:f,onShareClick:h,onCommentClick:g}},T||B.default.createElement("div",Object.assign({className:`${le} ${b}`,"data-show-most-engaging":y,"data-type":l===ae.post?"post":"reply","data-reply-padding":l===ae.reply&&c,"data-is-marrybaby":L,style:x},S),B.default.createElement("div",{className:oe},B.default.createElement("div",{className:ne},B.default.createElement(J,null,B.default.createElement(o.Text,{className:ie,style:{marginRight:"25px"},size:"p3",as:"div"},B.default.createElement(d.Heart,{className:"txt-icon",isMarryBaby:L,isSolid:m,color:m?L?s.theme.mbColors.pink:s.theme.colors.red800:"#737373"}),k&&B.default.createElement("div",{className:re},n))),E&&B.default.createElement(ee,null,B.default.createElement(o.Text,{size:"p3",className:ie,as:"div"},B.default.createElement(v.Icon.Share,{isMarryBaby:L})))),!w&&B.default.createElement(te,null,B.default.createElement(o.Text,{size:"p3",className:ie,as:"div"},p?B.default.createElement(v.Icon.Reply,{className:"txt-icon"}):B.default.createElement(v.Icon.Comment,{className:"txt-icon",isMarryBaby:L}),p?M("cardReactions.reply"):B.default.createElement("div",{className:re},M("post.commentCount",{count:r})))))))};se.LikeWrapper=J,se.ShareWrapper=ee,se.CommentWrapper=te;const de=a.createStyles((e=>({wrapper:{display:"flex",width:"100%",padding:"0.5rem 0",cursor:"grab",overflowX:"auto","::-webkit-scrollbar":{width:0},"&.sliding":{cursor:"grabbing",userSelect:"none",a:{pointerEvents:"none"}}},item:{position:"relative",whiteSpace:"nowrap",padding:"5px 12px",background:e.colors.gray[0],borderRadius:"2rem",cursor:"pointer","-webkit-user-drag":"none",userSelect:"none",textDecoration:"none",marginLeft:"0.5rem","*":{pointerEvents:"none"},"&:first-child":{marginLeft:0}},text:{}}))),ce=a=>{var{topics:l,onClick:n,className:i,style:r,trackingCategory:s="Together",locale:d,classNames:c,styles:m,unstyled:p}=a,g=e.__rest(a,["topics","onClick","className","style","trackingCategory","locale","classNames","styles","unstyled"]);const{classes:f}=de(void 0,{name:"TagTopic",classNames:c,styles:m,unstyled:p}),{sliding:h,mouseDownHandler:v,sliderRef:b}=(()=>{const[e,a]=t.useState(!1),l=t.useRef(null),o=t.useRef(null),n=t.useRef();return{sliding:e,mouseDownHandler:function(e){if(l.current){n.current=setTimeout((()=>{a(!0)}),500),o.current={left:l.current.scrollLeft,x:e.clientX};const t=function(e){const t=o.current;if(t){const a=e.clientX-t.x;l.current&&(l.current.scrollLeft=t.left-a)}},i=function(){n.current&&(clearTimeout(n.current),n.current=void 0),a(!1),document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",i)};document.addEventListener("mousemove",t,{passive:!0}),document.addEventListener("mouseup",i,{passive:!0})}},sliderRef:l,pos:o}})(),{data:{env:{togetherBasePath:x}},action:{sanitizeFunction:w}}=t.useContext(u.TogetherComponentGlobalContext);return B.default.createElement("div",Object.assign({ref:b,onClick:n,onMouseDown:e=>v(e),className:`${f.wrapper} ${i} ${h?"sliding":""}`,style:r},g),l.map(((e,t)=>B.default.createElement("a",{className:f.item,key:t,"data-event-category":s,"data-event-action":"Topic in Post Click","data-event-label":`${u.getCurrentBaseUrl(d)}${x}${e.url}`,href:e.isActive&&!e.isHidden?`${x}${e.url}`:void 0},B.default.createElement(o.Text,{size:"p4"},B.default.createElement("span",{dangerouslySetInnerHTML:{__html:(null==w?void 0:w(e.name))||e.name}}))))))},ue=V.default.div`
98
- display: flex;
99
- align-items: center;
100
- justify-content: space-between;
101
- padding: 16px;
102
- cursor: pointer;
103
- &[data-color='gray'] {
104
- background: ${e=>e.theme.colors.neutral50};
105
- }
106
- &[data-color='white'] {
107
- border-bottom: 1px solid #e4e8ec;
108
- background: ${e=>e.theme.colors.white};
109
- }
110
-
111
- .popover-menu__btn {
112
- display: flex;
113
- min-width: 2rem;
114
- height: 2rem;
115
- align-items: center;
116
- padding: 8px 0 !important;
117
- border: none;
118
- margin-left: 0.5rem;
119
- background: transparent;
120
- > span {
121
- display: flex;
122
- align-items: center;
123
- }
124
-
125
- &:hover {
126
- background: transparent !important;
127
- }
128
- }
129
-
130
- &.label-pinned {
131
- border-radius: ${e=>e.theme.borderRadius} 6px 0 0;
132
- .label-sort-pin-icon {
133
- width: 16px;
134
- height: 16px;
135
- vertical-align: middle;
136
- }
137
- }
138
-
139
- &[data-is-marrybaby='true'] {
140
- padding: 0.75rem 1rem;
141
- border-radius: 16px 16px 0px 0px;
142
- &[data-color='white'] {
143
- border-bottom: none;
144
- }
145
- &[data-color='gray'] {
146
- background: #f3f3f3;
147
- }
148
- .popover-menu__btn {
149
- width: unset;
150
- }
151
-
152
- &.label-pinned {
153
- border-bottom: none;
154
- background: #fff9eb;
155
- border-radius: 1rem 1rem 0 0;
156
- .label-sort-pin-icon {
157
- margin-right: 8px;
158
- }
159
- .label-sort-pin-heading {
160
- color: #fb8c00;
161
- }
162
- }
163
- &.label-sorting {
164
- ${C.MediaQueries.tdUp} {
165
- padding-bottom: 1.5rem;
166
- margin-bottom: -0.75rem;
167
- }
168
- }
169
- }
170
- `,me=({label:e,rightLabel:a,onClick:l,color:n,className:i,style:r})=>{const{data:{env:{isMarryBaby:s}}}=t.useContext(u.TogetherComponentGlobalContext);return B.default.createElement(ue,{"data-is-marrybaby":s,"data-color":n,onClick:l,className:i,style:r},B.default.createElement(o.Text,{className:"label-sort-pin-heading",size:s?"p4":"p3",type:"bold"},e),a)};const pe=({onClick:e,color:a,className:l,style:o})=>{const{data:{env:{isMarryBaby:n}}}=t.useContext(u.TogetherComponentGlobalContext),{t:r}=i.useTranslations();return B.default.createElement(me,{label:B.default.createElement(B.default.Fragment,null,n&&B.default.createElement("img",{className:"label-sort-pin-icon",src:"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='M3.5 19.9999L7.87 15.6299' stroke='%23FB8C00' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e %3cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.95634 11.294C4.56534 11.685 4.56534 12.318 4.95634 12.708L7.87434 15.626L10.7923 18.544C11.1833 18.935 11.8163 18.935 12.2063 18.544L13.3813 17.369C13.5693 17.181 13.6743 16.927 13.6743 16.662V12.726L16.5743 9.82597L18.8833 9.94897C19.1663 9.96397 19.4433 9.85797 19.6433 9.65797L20.2173 9.08397C20.6083 8.69297 20.6083 8.05997 20.2173 7.66997L15.8313 3.28397C15.4403 2.89297 14.8073 2.89297 14.4173 3.28397L13.8433 3.85797C13.6423 4.05897 13.5363 4.33497 13.5523 4.61797L13.6753 6.92697L10.7753 9.82697H6.83834C6.57334 9.82697 6.31834 9.93197 6.13134 10.12L4.95634 11.294V11.294Z' stroke='%23FB8C00' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e %3cpath d='M16.5699 9.83018L13.6699 6.93018' stroke='%23FB8C00' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e %3c/svg%3e"})," ",r("label.pinnedPost")),rightLabel:!n&&B.default.createElement("img",{className:"label-sort-pin-icon",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%3cline x1='7.18605' y1='7.68219' x2='3.68219' y2='13.8139' stroke='%23FEA21E' stroke-linecap='round'/%3e%3cpath d='M3.24591 7.78426C3.21275 7.84168 3.20376 7.90993 3.22092 7.97398C3.23808 8.03803 3.27998 8.09264 3.3374 8.12579L8.78429 11.2706C8.90385 11.3396 9.05674 11.2986 9.12578 11.1791C9.71191 10.1641 9.71348 8.97262 9.23682 7.99339L10.8583 5.18521C11.5115 5.00603 12.0982 4.57973 12.4638 3.94629C12.5328 3.82672 12.4919 3.67383 12.3723 3.6048L8.18237 1.18584C8.12494 1.15268 8.0567 1.1437 7.99265 1.16086C7.92861 1.17803 7.874 1.21993 7.84086 1.27736C7.47521 1.91077 7.39934 2.63194 7.57065 3.28723L5.94919 6.09545C4.86323 6.1723 3.83201 6.76934 3.24591 7.78426Z' fill='%23FEA21E' stroke='%23FEA21E' stroke-width='0.5' stroke-linejoin='round'/%3e%3c/svg%3e"}),onClick:e,color:"white",className:`label-pinned ${l}`,style:o})};const ge=V.default.div`
171
- position: relative;
172
- display: content;
173
-
174
- .popover-menu__btn {
175
- /* position: relative; */
176
- > span {
177
- width: 100%;
178
- height: 100%;
179
- > img {
180
- width: 100%;
181
- height: 100%;
182
- }
183
- }
184
- }
185
-
186
- .popover-menu__content {
187
- position: absolute;
188
- z-index: 10;
189
- width: 320px;
190
- padding: 8px;
191
- border: none;
192
- background: #fff;
193
- border-radius: 8px;
194
- box-shadow: 3px 3px 20px rgba(0, 0, 0, 0.1);
195
-
196
- &::before {
197
- position: absolute;
198
- width: 16px;
199
- height: 8px;
200
- background: #fff;
201
- content: '';
202
- }
203
-
204
- &.--position {
205
- &-top {
206
- bottom: calc(100% + 8px);
207
-
208
- &.--align {
209
- &-start {
210
- left: 0;
211
-
212
- &::before {
213
- top: 100%;
214
- left: 16px;
215
- clip-path: polygon(0 0, 50% 100%, 100% 0);
216
- }
217
- }
218
-
219
- &-end {
220
- left: 100%;
221
- transform: translateX(calc(-100% + 1rem));
222
-
223
- &::before {
224
- top: 100%;
225
- right: 16px;
226
- clip-path: polygon(0 0, 50% 100%, 100% 0);
227
- }
228
- }
229
- }
230
- }
231
-
232
- &-right {
233
- left: calc(100% + 8px);
234
-
235
- &.--align {
236
- &-start {
237
- top: 0;
238
-
239
- &::before {
240
- top: 16px;
241
- left: 0;
242
- width: 8px;
243
- height: 16px;
244
- clip-path: polygon(0 50%, 100% 0%, 100% 100%);
245
- transform: translateX(-100%);
246
- }
247
- }
248
-
249
- &-end {
250
- top: 100%;
251
- transform: translateX(calc(-100% + 1rem));
252
-
253
- &::before {
254
- bottom: 16px;
255
- left: 0;
256
- width: 8px;
257
- height: 16px;
258
- clip-path: polygon(0 50%, 100% 0%, 100% 100%);
259
- transform: translateX(-100%);
260
- }
261
- }
262
- }
263
- }
264
-
265
- &-bottom {
266
- top: calc(100% + 8px);
267
-
268
- &.--align {
269
- &-start {
270
- left: 0;
271
-
272
- &::before {
273
- bottom: 100%;
274
- left: 16px;
275
- clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
276
- }
277
- }
278
-
279
- &-end {
280
- left: 100%;
281
- transform: translateX(calc(-100% + 1rem));
282
-
283
- &::before {
284
- right: 16px;
285
- bottom: 100%;
286
- clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
287
- }
288
- }
289
- }
290
- }
291
-
292
- &-left {
293
- left: -8px;
294
- transform: translateX(-100%);
295
-
296
- &.--align {
297
- &-start {
298
- top: 0;
299
-
300
- &::before {
301
- top: 16px;
302
- left: 100%;
303
- width: 8px;
304
- height: 16px;
305
- clip-path: polygon(0 0%, 100% 50%, 0% 100%);
306
- transform: translateX(0);
307
- }
308
- }
309
-
310
- &-end {
311
- bottom: 0;
312
-
313
- &::before {
314
- bottom: 16px;
315
- left: 100%;
316
- width: 8px;
317
- height: 16px;
318
- clip-path: polygon(0 0%, 100% 50%, 0% 100%);
319
- transform: translateX(0);
320
- }
321
- }
322
- }
323
- }
324
- }
325
- }
326
-
327
- &[data-is-marrybaby='true'] {
328
- .popover-menu__content {
329
- padding: 0;
330
- border-radius: 12px;
331
- /* &::before {
332
- display: none;
333
- } */
334
- }
335
- }
336
- `,fe=V.default.div`
337
- display: flex;
338
- /* max-height: 300px; */
339
- flex-direction: column;
340
- cursor: default;
341
-
342
- .__header {
343
- position: relative;
344
- display: flex;
345
- align-items: center;
346
- justify-content: center;
347
- padding: 1rem 0;
348
- margin-bottom: 8px;
349
-
350
- .__back-btn {
351
- position: absolute;
352
- top: 50%;
353
- left: 8px;
354
- width: 16px;
355
- height: 16px;
356
- cursor: pointer;
357
- transform: translateY(-50%);
358
- }
359
- }
360
-
361
- .tree-text-description {
362
- padding-right: 8px;
363
- padding-left: 8px;
364
- margin-top: -8px;
365
- margin-bottom: 8px;
366
- font-size: 14px;
367
- font-weight: 400;
368
- line-height: 22px;
369
- text-align: left;
370
- }
371
-
372
- .__content {
373
- overflow: auto;
374
- flex: 1;
375
- }
376
-
377
- .__list {
378
- .__item {
379
- position: relative;
380
- &.bold-item {
381
- font-weight: 700;
382
- }
383
- &:last-child {
384
- .__btn {
385
- margin-bottom: 0;
386
- }
387
- }
388
-
389
- .__btn {
390
- position: relative;
391
- display: flex;
392
- width: 100%;
393
- height: 40px;
394
- align-items: center;
395
- padding: 0 1rem;
396
- border: none;
397
- margin-bottom: 8px;
398
- color: ${e=>e.theme.colors.gray800};
399
- cursor: pointer;
400
- text-align: left;
401
- transition: background 0.3s;
402
-
403
- /* for better gtm tracking result */
404
- * {
405
- pointer-events: none;
406
- }
407
- &.--checked {
408
- color: ${e=>e.theme.colors.gray500};
409
- pointer-events: none;
410
- }
411
-
412
- &:hover {
413
- background: ${e=>e.theme.colors.gray100};
414
- }
415
-
416
- .__icon {
417
- width: 16px;
418
- height: 16px;
419
- margin-right: 0.4rem;
420
- }
421
-
422
- & > span {
423
- position: relative;
424
-
425
- & > img {
426
- width: 16px;
427
- height: 16px;
428
- margin-right: 0.4rem;
429
- }
430
- }
431
- }
432
-
433
- .__toggle {
434
- position: absolute;
435
- top: 50%;
436
- right: 16px;
437
- width: 16px;
438
- height: 16px;
439
- pointer-events: none;
440
- transform: translateY(-50%);
441
- }
442
- }
443
- }
444
- &[data-is-marrybaby='true'] {
445
- .__header {
446
- padding: 1rem;
447
- }
448
- .tree-text-description {
449
- padding: 0 1rem;
450
- }
451
- .__list {
452
- .__item {
453
- &:first-child {
454
- .__btn {
455
- border-top-left-radius: 12px;
456
- border-top-right-radius: 12px;
457
- }
458
- }
459
- &:last-child {
460
- .__btn {
461
- border-bottom-left-radius: 12px;
462
- border-bottom-right-radius: 12px;
463
- }
464
- }
465
- .__btn {
466
- height: unset;
467
- padding: 1rem;
468
- margin-bottom: 0;
469
- &:hover {
470
- background: ${e=>e.theme.mbColors.lightPink};
471
- }
472
- }
473
- }
474
- }
475
- }
476
- `,he=({className:e,style:a,toggleButtonContent:o,position:n="bottom",align:i="end",children:r,buttonProps:s})=>{const{data:{env:{isMarryBaby:d}}}=t.useContext(u.TogetherComponentGlobalContext),[c,m]=t.useState(!1),p=t.useRef(null),g=t.useRef(c);return t.useEffect((()=>{var e;g.current=c,c&&(null===(e=p.current)||void 0===e||e.focus())}),[c]),t.useEffect((()=>{const e=e=>{var t;!(null===(t=p.current)||void 0===t?void 0:t.contains(e.target))&&g.current&&m(!1)};return window.addEventListener("click",e,{passive:!0}),()=>{window.removeEventListener("click",e)}}),[]),B.default.createElement(ge,{"data-is-marrybaby":d,className:e,style:a},B.default.createElement(l.Button,Object.assign({theme:d?"marryBaby":"helloSites",className:"popover-menu__btn",size:"md",color:"transparent",onClick:()=>m((e=>!e))},s),o),c?B.default.createElement("div",{ref:p,className:`popover-menu__content --position-${n} --align-${i}`,tabIndex:0,onClick:e=>e.stopPropagation()},"function"==typeof r?r({setShow:m}):r):null)};const ve=t=>{var{data:a}=t,l=e.__rest(t,["data"]);return B.default.createElement(he,Object.assign({},l),(({setShow:e})=>B.default.createElement(be,{data:a,setShow:e})))},be=({data:e,setShow:a})=>{var l;const[n,i]=t.useState(""),r=t.useMemo((()=>e&&((e,t)=>{const a=t.split(".");let l=e;return a.forEach((e=>{var t,a;e&&l&&"list"===(null==l?void 0:l.type)&&(l=null===(a=null===(t=null==l?void 0:l.list)||void 0===t?void 0:t[Number(e)])||void 0===a?void 0:a.subTree)})),l})(e,n)),[e,n]);if(!e)return null;if(!r)return null;return B.default.createElement(fe,null,r.isShowheader?B.default.createElement("div",{className:"__header"},n?B.default.createElement("img",{className:"__back-btn",src:"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='M15 18L9 12L15 6' stroke='%23262626' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",onClick:()=>i((e=>e.split(".").slice(0,-1).join(".")))}):null,r.title?B.default.createElement(k.Heading,{className:"__title",tag:"h6"},r.title):null):null,r.description?B.default.createElement(o.Text,{className:"tree-text-description",color:s.theme.colors.gray600,size:"p3",type:"regular"},r.description):null,B.default.createElement("div",{className:"__content"},"jsx"===r.type?null===(l=null==r?void 0:r.jsxRenderer)||void 0===l?void 0:l.call(r,a):null,"list"===r.type?B.default.createElement("ul",{className:"__list"},Array.isArray(r.list)?r.list.map(((e,t)=>B.default.createElement("li",{key:t,style:e.style,className:`__item ${e.className}`}," ",B.default.createElement("div",{className:"__btn "+(e.selected?"--checked":""),onClick:()=>((e,{subTree:t,onClick:l=(()=>null)})=>{l&&l(),t?i((t=>t.split(".").concat(String(e)).join("."))):a&&a(!1)})(t,e),"data-event-category":e.dataEventCategory,"data-event-action":e.dataEventAction,"data-event-label":e.dataEventLabel},e.icon&&B.default.createElement("img",{className:"__icon",src:e.icon}),B.default.createElement("span",null,e.label)),e.subTree?B.default.createElement("img",{className:"__toggle",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='%23595959' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e"}):null,e.selected?B.default.createElement("img",{className:"__toggle",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='M13.3334 4L6.00002 11.3333L2.66669 8' stroke='%238C8C8C' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e"}):null))):null):null))};var xe;!function(e){e.latest="latest",e.oldest="oldest",e.popular="popular"}(xe||(xe={}));const we=t=>{var{size:a=15}=t,l=e.__rest(t,["size"]);return B.default.createElement("svg",Object.assign({width:a,height:a,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l),B.default.createElement("path",{d:"M7.43701 14C11.0614 14 13.9995 11.0619 13.9995 7.4375C13.9995 3.81313 11.0614 0.875 7.43701 0.875C3.81264 0.875 0.874512 3.81313 0.874512 7.4375C0.874512 11.0619 3.81264 14 7.43701 14Z",fill:"white",stroke:"#E4E8EC",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),B.default.createElement("path",{d:"M8.53125 6.34375V4.15625H6.34375V6.34375H4.15625V8.53125H6.34375V10.7188H8.53125V8.53125H10.7188V6.34375H8.53125Z",fill:"#FF5331"}))};var ye="dZWeHns",Ce="tMiOKib",Ee="uDcqD-2",ke="pDlsows",Ae="m-HVXw1";const Ne=({children:e,className:t=""})=>B.default.createElement("div",{className:`${Ce} ${t}`},e),Te=({children:e,className:t=""})=>B.default.createElement("div",{className:`${Ee} ${t}`},e);var Se="sTU4T4I",Pe="tCql9Je",Le="_3j7uYhH",Me="PHABgoT";const Ie=({avatarProps:e,title:t,subTitle:a,children:l,className:o="",style:n,onAvatarClick:i,avatarIcon:r})=>B.default.createElement("div",{className:`${Se} ${o}`,style:n},B.default.createElement("div",{className:Le,onClick:i},B.default.createElement(u.UserAvatar,Object.assign({},e)),r&&B.default.createElement("div",{className:Me},r)),B.default.createElement("div",{className:`${Pe} ${o}`},l||B.default.createElement(B.default.Fragment,null,t&&B.default.createElement(Ne,null,t),a&&B.default.createElement(Te,null,a))));Ie.MainText=Ne,Ie.SubText=Te,Ie.SubDivider=({className:e=""})=>B.default.createElement("span",{className:`${Ae} ${e}`}),Ie.Row=({children:e,className:t=""})=>B.default.createElement("div",{className:`${ye} ${t} row`},e),Ie.ColLeft=({children:e,className:t=""})=>B.default.createElement("div",{className:`${t} col-left`},e),Ie.ColRight=({children:e,className:t=""})=>B.default.createElement("div",{className:`${t} col-right`},e),Ie.SubTextRow=({children:e,className:t=""})=>B.default.createElement("div",{className:`${ke} ${t}`},e);var Re=a.createStyles((()=>({root:{},authorBadge:{background:"yellow"}})));const Be=a=>{var{fallbackSrc:l=c.CommonGAssets.getAssetPath("avatar.jpg")}=a,o=e.__rest(a,["fallbackSrc"]);const n=t.useRef(null),i=o.src||l||"",r=t.useRef(!1);t.useEffect((()=>{i!==l&&n.current&&(n.current.src=i)}),[]),t.useEffect((()=>{r.current=!1}),[i]);return B.default.createElement("img",Object.assign({ref:n},o,{src:i,onError:e=>{var t;r.current||(e.currentTarget.src=l||"",r.current=!0),null===(t=o.onError)||void 0===t||t.call(o,e)}}))},ze=V.default.div`
477
- position: fixed;
478
- left: 50%;
479
- width: 343px;
480
- background-color: ${e=>e.theme.colors.white};
481
- border-radius: ${e=>e.theme.borderRadius};
482
- box-shadow: 0px 0px 4px ${e=>e.theme.colors.gray200};
483
- transform: translate(-50%, -50%);
484
- transition: all 0.5s ease-in-out;
485
-
486
- ${C.MediaQueries.tdUp} {
487
- width: 750px;
488
- }
489
-
490
- &[data-animation='true'] {
491
- transition: all 0.5s ease-in-out;
492
- }
493
-
494
- &[data-open='true'] {
495
- z-index: 400;
496
- top: 50%;
497
- opacity: 1;
498
- visibility: visible;
499
- }
500
-
501
- &[data-open='false'] {
502
- top: -50%;
503
- }
504
-
505
- .popup-content {
506
- ${C.MediaQueries.mbDown} {
507
- display: block;
508
- }
509
- display: flex;
510
- position: relative;
511
- z-index: 111;
512
- height: 100%;
513
- .button-see-more {
514
- margin: 32px 0;
515
- padding: 0;
516
- > * {
517
- display: inline-block;
518
- }
519
- }
520
- .close-button {
521
- position: absolute;
522
- z-index: 100;
523
- top: 10px;
524
- right: 10px;
525
- cursor: pointer;
526
- width: unset;
527
- height: unset;
528
- img {
529
- width: 100%;
530
- height: 100%;
531
- border-radius: 50%;
532
- }
533
- }
534
- }
535
-
536
- .main-info {
537
- padding-bottom: 32px;
538
- background-color: ${e=>e.theme.colors.primary50};
539
- border-radius: ${e=>e.theme.borderRadius};
540
- .btn-booking {
541
- display: flex;
542
- margin: 12px auto;
543
- }
544
- .avatar-title {
545
- position: relative;
546
- width: 100%;
547
- padding-top: 46px;
548
- text-align: center;
549
- }
550
- }
551
- `,je=V.default.div`
552
- position: fixed;
553
- z-index: 110;
554
- top: 0;
555
- left: 0;
556
- width: 100%;
557
- height: 100%;
558
- align-items: center;
559
- background: rgba(38, 38, 38, 0.3);
560
-
561
- &[data-open='false'] {
562
- display: none;
563
- }
564
- `,Fe=V.default.div`
565
- .image-container {
566
- .badge-avatar {
567
- position: absolute;
568
- right: 0;
569
- bottom: 0;
570
- top: 0;
571
- }
572
- }
573
- display: flex;
574
- justify-content: center;
575
- padding-bottom: 15px;
576
- text-align: center;
577
- .profile-image {
578
- width: 100px;
579
- min-width: 100px;
580
- height: 100px;
581
- min-height: 100px;
582
- border-radius: 50%;
583
- object-fit: cover;
584
- }
585
- .badge-avatar {
586
- width: 24px;
587
- height: 24px;
588
- }
589
- `,Oe=V.default.div`
590
- position: relative;
591
- z-index: 9;
592
- .specialty {
593
- display: flex;
594
- flex-wrap: wrap;
595
- justify-content: center;
596
- }
597
-
598
- padding: 0px 16px;
599
- text-align: center;
600
- .specialty {
601
- justify-content: center;
602
- }
603
-
604
- .experience {
605
- padding: 16px 0px 32px;
606
- text-align: left;
607
- .btn-wrapper {
608
- margin-top: 24px;
609
- }
610
- }
611
- p {
612
- max-width: 100%;
613
- -webkit-line-clamp: 4;
614
- -webkit-box-orient: vertical;
615
- text-overflow: ellipsis;
616
- overflow: hidden;
617
- }
618
- `;V.default.span`
619
- display: flex;
620
- flex-direction: column;
621
- justify-content: center;
622
- margin: 0 0.4em;
623
- color: ${e=>e.theme.colors.neutral300};
624
- `,V.default.div`
625
- display: inline-block;
626
- width: 3px;
627
- height: 3px;
628
- margin: 0;
629
- background-color: ${e=>e.theme.colors.gray400};
630
- border-radius: 50%;
631
- `,V.default.div`
632
- display: flex;
633
- margin-top: 8px;
634
-
635
- .bullet-point {
636
- width: 24px;
637
- height: 24px;
638
- }
639
- `;const Ve=V.default.ul`
640
- padding-left: 18px;
641
- li {
642
- list-style-type: disc;
643
- }
644
- `;var De="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='M18 6L6 18' stroke='%23262626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M6 6L18 18' stroke='%23262626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",Ue="data:image/svg+xml,%3csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M9 16.9998C13.4183 16.9998 17 13.418 17 8.99976C17 4.58148 13.4183 0.999756 9 0.999756C4.58172 0.999756 1 4.58148 1 8.99976C1 13.418 4.58172 16.9998 9 16.9998Z' fill='white' stroke='%23E4E8EC' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M10.3333 7.66679V5.00012H7.66667V7.66679H5V10.3335H7.66667V13.0001H10.3333V10.3335H13V7.66679H10.3333Z' fill='%23FF5331'/%3e%3c/svg%3e";const _e=({isOpen:e=!0,onClose:a,enableAnimation:n=!0,doctorId:r,locale:d,isMobile:m,overwriteProfileProps:p,avatarFallback:g=c.CommonGAssets.getAssetPath("avatar.jpg"),trackingCategory:f="Together"})=>{var h,v,b;const{t:x}=i.useTranslations(),[w,y]=t.useState(null),[C,E]=t.useState(!1);t.useEffect((()=>{if(e&&r&&String(null==w?void 0:w.id)!==String(r)){E(!0);try{y(null),u.callApi(u.getCarePath(u.CARE_PATHS.GET_DOCTOR_INFO,{doctorId:r,website_url:u.domainLocales[d]}),"get").then((e=>{y(Object.assign(Object.assign({},null==e?void 0:e._data.doctor),p))}))}catch(e){console.error(e)}E(!1)}}),[e,r,null==w?void 0:w.id]);const k=(null==w?void 0:w.experiences)||[],A=((null==w?void 0:w.specialties)||[]).map((e=>(null==e?void 0:e.name)||e)).join(" • "),N=k.map((e=>{try{return JSON.parse(e.description)}catch(t){return e.description}})).filter((e=>e.content));return B.default.createElement(B.default.Fragment,null,B.default.createElement(ze,{"data-open":e,"data-animation":n,onClick:e=>e.stopPropagation()},C||!w?B.default.createElement(Q,null):B.default.createElement("div",{className:"popup-content"},B.default.createElement("div",{className:"close-button",onClick:a},B.default.createElement("img",{src:De,style:{width:20,height:20},alt:"close-icon"})),B.default.createElement("div",{className:"main-info"},B.default.createElement("div",{className:"border-banner"}),B.default.createElement("div",{className:"avatar-title"},B.default.createElement(Fe,null,B.default.createElement("div",{className:"image-container"},B.default.createElement("div",{style:{position:"relative"}},B.default.createElement(Be,{src:null==w?void 0:w.avatar,fallbackSrc:g,className:"profile-image",alt:"avatar"}),B.default.createElement("img",{className:"badge-avatar",src:Ue,alt:"badge"})))),B.default.createElement(Oe,null,B.default.createElement(o.Text,{size:"s3",type:"semiBold",className:"full-name"},null==w?void 0:w.name),B.default.createElement("div",{className:"specialty"},A&&B.default.createElement(B.default.Fragment,null,B.default.createElement(o.Text,{size:"p4",color:s.theme.colors.gray800},A," • ")),B.default.createElement("a",{href:u.getCareHospitalUrl({id:null===(h=null==w?void 0:w.organization)||void 0===h?void 0:h.id,name:null===(v=null==w?void 0:w.organization)||void 0===v?void 0:v.name,slug:null===(b=null==w?void 0:w.organization)||void 0===b?void 0:b.slug,locale:d}),className:"organisation",target:"_blank",rel:"noreferrer"},B.default.createElement(o.Text,{size:"p4",className:"organisation",color:s.theme.colors.gray800,style:{textDecoration:"underline"}},null==w?void 0:w.organization.name))))),!m&&B.default.createElement("div",{className:"btn-wrapper"},B.default.createElement("a",{href:u.getCareDoctorUrl({name:w.name,id:w.id,locale:d})},B.default.createElement(l.Button,{color:"primary",size:"md",className:"btn-booking"},x("careBooking.bookAnAppointment"))))),N&&B.default.createElement(Oe,null,B.default.createElement("div",{className:"experience"},B.default.createElement(o.Text,{type:"bold",size:"s3",color:s.theme.colors.gray800,style:{paddingBottom:16}},x("expert.content.description").toUpperCase()),B.default.createElement(Ve,null,N.map(((e,t)=>B.default.createElement("li",{key:t},B.default.createElement(o.Text,{size:"p2"},(e=>(null==e?void 0:e.year)?`${e.year} ${null==e?void 0:e.content}`:(null==e?void 0:e.content)?e.content:"string"==typeof e?e:"")(e)))))),m?B.default.createElement("div",{className:"btn-wrapper"},B.default.createElement("a",{href:u.getCareDoctorUrl({name:w.name,id:w.id,locale:d})},B.default.createElement(l.Button,{color:"primary",size:"md",className:"btn-booking"},x("careBooking.bookAnAppointment")))):B.default.createElement("a",{href:u.getCareDoctorUrl({name:w.name,id:w.id,locale:d})},B.default.createElement(o.Text,{size:"s4",color:"#2D87F3",style:{paddingTop:24},"data-event-category":f,"data-event-action":"See Full Doctor Profile","data-event-label":u.getCurrentBaseUrl(d)+u.getCareDoctorUrl({name:w.name,id:w.id,locale:d})},x("home.seeExpert"))))))),B.default.createElement(je,{"data-open":e,onClick:e=>{e.stopPropagation(),a()}}))},He=V.default.div`
645
- position: fixed;
646
- left: 50%;
647
- width: 343px;
648
- background-color: ${e=>e.theme.colors.white};
649
- border-radius: ${e=>e.theme.borderRadius};
650
- box-shadow: 0px 0px 4px ${e=>e.theme.colors.gray200};
651
- transform: translate(-50%, -50%);
652
- transition: all 0.5s ease-in-out;
653
-
654
- ${C.MediaQueries.tdUp} {
655
- width: 750px;
656
- }
657
-
658
- &[data-animation='true'] {
659
- transition: all 0.5s ease-in-out;
660
- }
661
-
662
- &[data-open='true'] {
663
- z-index: 400;
664
- top: 50%;
665
- opacity: 1;
666
- visibility: visible;
667
- }
668
-
669
- &[data-open='false'] {
670
- top: -50%;
671
- }
672
-
673
- .popup-content {
674
- ${C.MediaQueries.mbDown} {
675
- display: block;
676
- }
677
- display: flex;
678
- position: relative;
679
- z-index: 111;
680
- height: 100%;
681
- .button-see-more {
682
- margin: 32px 0;
683
- padding: 0;
684
- > * {
685
- display: inline-block;
686
- }
687
- }
688
- .close-button {
689
- position: absolute;
690
- z-index: 100;
691
- top: 10px;
692
- right: 10px;
693
- cursor: pointer;
694
- width: unset;
695
- height: unset;
696
- img {
697
- width: 100%;
698
- height: 100%;
699
- border-radius: 50%;
700
- }
701
- }
702
- }
703
-
704
- .main-info {
705
- padding-bottom: 32px;
706
- background-color: ${e=>e.theme.colors.primary50};
707
- border-radius: ${e=>e.theme.borderRadius};
708
-
709
- .avatar-title {
710
- position: relative;
711
- width: 100%;
712
- padding-top: 46px;
713
- text-align: center;
714
- }
715
- }
716
- `,We=V.default.div`
717
- position: fixed;
718
- z-index: 110;
719
- top: 0;
720
- left: 0;
721
- width: 100%;
722
- height: 100%;
723
- align-items: center;
724
- background: rgba(38, 38, 38, 0.3);
725
-
726
- &[data-open='false'] {
727
- display: none;
728
- }
729
- `,qe=V.default.div`
730
- .image-container {
731
- .badge-avatar {
732
- position: absolute;
733
- right: 0;
734
- bottom: 0;
735
- top: 0;
736
- }
737
- }
738
- display: flex;
739
- justify-content: center;
740
- padding-bottom: 15px;
741
- text-align: center;
742
- .profile-image {
743
- width: 100px;
744
- min-width: 100px;
745
- height: 100px;
746
- min-height: 100px;
747
- border-radius: 50%;
748
- object-fit: cover;
749
- }
750
- .badge-avatar {
751
- width: 24px;
752
- height: 24px;
753
- }
754
- `,Ze=V.default.div`
755
- position: relative;
756
- z-index: 9;
757
- .specialty {
758
- display: flex;
759
- flex-wrap: wrap;
760
- justify-content: center;
761
- }
762
-
763
- padding: 0px 16px;
764
- text-align: center;
765
- .specialty {
766
- justify-content: center;
767
- }
768
-
769
- .experience {
770
- padding: 16px 0px 32px;
771
- text-align: left;
772
- .btn-wrapper {
773
- margin-top: 24px;
774
- }
775
- }
776
- p {
777
- max-width: 100%;
778
- -webkit-line-clamp: 4;
779
- -webkit-box-orient: vertical;
780
- text-overflow: ellipsis;
781
- overflow: hidden;
782
- }
783
- `;V.default.span`
784
- display: flex;
785
- flex-direction: column;
786
- justify-content: center;
787
- margin: 0 0.4em;
788
- color: ${e=>e.theme.colors.neutral300};
789
- `,V.default.div`
790
- display: inline-block;
791
- width: 3px;
792
- height: 3px;
793
- margin: 0;
794
- background-color: ${e=>e.theme.colors.gray400};
795
- border-radius: 50%;
796
- `;const Ge=V.default.div`
797
- display: flex;
798
- margin-top: 8px;
799
-
800
- .bullet-point {
801
- width: 24px;
802
- height: 24px;
803
- }
804
- `;const Qe={author:"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='M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24Z' fill='%2345A4FF'/%3e%3cpath d='M23.9998 11.9995C23.9998 11.4024 23.9561 10.8154 23.8719 10.2417L18.7952 5.16504L5.04102 18.9585L9.89867 23.8162C10.5809 23.9366 11.283 23.9995 11.9998 23.9995C18.6272 23.9995 23.9998 18.6269 23.9998 11.9995Z' fill='%232D87F3'/%3e%3cpath d='M9.01377 17.824L5.04102 18.9591L6.17609 14.9863L8.54445 15.4556L9.01377 17.824Z' fill='white'/%3e%3cpath d='M8.54399 15.4561L5.04102 18.9591L9.01321 17.824L8.54399 15.4561Z' fill='%23F7F9FC'/%3e%3cpath d='M6.46714 18.5518L5.4485 17.5332L5.04102 18.9593L6.46714 18.5518Z' fill='%23E4E8EC'/%3e%3cpath d='M5.95747 18.043L5.04102 18.9595L6.46659 18.5521L5.95747 18.043Z' fill='%23D2D6DC'/%3e%3cpath d='M15.8281 5.33105L18.6654 8.16829L9.01365 17.82L6.17641 14.9828L15.8281 5.33105Z' fill='%23FFD658'/%3e%3cpath d='M7.59375 16.4043L17.2455 6.75259L18.6638 8.17094L9.0121 17.8226L7.59375 16.4043Z' fill='%23FFC326'/%3e%3cpath d='M18.3123 8.52499L15.4746 5.68737L16.5983 4.56359C17.0386 4.12334 17.7524 4.12334 18.1927 4.56359L19.436 5.8069C19.8763 6.24715 19.8763 6.96096 19.436 7.40121L18.3123 8.52499Z' fill='%23FF5331'/%3e%3cpath d='M18.8155 5.18555L16.8945 7.10648L18.3131 8.52497L19.4368 7.40119C19.877 6.96094 19.877 6.24713 19.4368 5.80688L18.8155 5.18555Z' fill='%23F44D2C'/%3e%3c/svg%3e",edtior:"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='M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24Z' fill='%2345A4FF'/%3e%3cpath d='M23.9998 11.9995C23.9998 11.4024 23.9561 10.8154 23.8719 10.2417L18.7952 5.16504L5.04102 18.9585L9.89867 23.8162C10.5809 23.9366 11.283 23.9995 11.9998 23.9995C18.6272 23.9995 23.9998 18.6269 23.9998 11.9995Z' fill='%232D87F3'/%3e%3cpath d='M9.01377 17.824L5.04102 18.9591L6.17609 14.9863L8.54445 15.4556L9.01377 17.824Z' fill='white'/%3e%3cpath d='M8.54399 15.4561L5.04102 18.9591L9.01321 17.824L8.54399 15.4561Z' fill='%23F7F9FC'/%3e%3cpath d='M6.46714 18.5518L5.4485 17.5332L5.04102 18.9593L6.46714 18.5518Z' fill='%23E4E8EC'/%3e%3cpath d='M5.95747 18.043L5.04102 18.9595L6.46659 18.5521L5.95747 18.043Z' fill='%23D2D6DC'/%3e%3cpath d='M15.8281 5.33105L18.6654 8.16829L9.01365 17.82L6.17641 14.9828L15.8281 5.33105Z' fill='%23FFD658'/%3e%3cpath d='M7.59375 16.4043L17.2455 6.75259L18.6638 8.17094L9.0121 17.8226L7.59375 16.4043Z' fill='%23FFC326'/%3e%3cpath d='M18.3123 8.52499L15.4746 5.68737L16.5983 4.56359C17.0386 4.12334 17.7524 4.12334 18.1927 4.56359L19.436 5.8069C19.8763 6.24715 19.8763 6.96096 19.436 7.40121L18.3123 8.52499Z' fill='%23FF5331'/%3e%3cpath d='M18.8155 5.18555L16.8945 7.10648L18.3131 8.52497L19.4368 7.40119C19.877 6.96094 19.877 6.24713 19.4368 5.80688L18.8155 5.18555Z' fill='%23F44D2C'/%3e%3c/svg%3e",expert:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='12' cy='12' r='12' fill='%23FFCB37'/%3e%3ccircle cx='12' cy='12' r='10.5' fill='%23FE921D'/%3e%3cpath d='M11.443 5.13654C11.6446 4.63466 12.355 4.63466 12.5566 5.13654L13.9931 8.71375C14.0789 8.92747 14.2795 9.0732 14.5093 9.08878L18.3553 9.34957C18.8949 9.38615 19.1145 10.0619 18.6994 10.4086L15.7412 12.8802C15.5645 13.0279 15.4878 13.2637 15.544 13.4871L16.4845 17.2254C16.6164 17.7499 16.0417 18.1676 15.5836 17.88L12.3188 15.8303C12.1238 15.7079 11.8758 15.7079 11.6808 15.8303L8.41599 17.88C7.95794 18.1676 7.38314 17.7499 7.51509 17.2254L8.45556 13.4871C8.51175 13.2637 8.43513 13.0279 8.25839 12.8802L5.30017 10.4086C4.88514 10.0619 5.10469 9.38615 5.64429 9.34957L9.49031 9.08878C9.7201 9.0732 9.92068 8.92747 10.0065 8.71375L11.443 5.13654Z' fill='white'/%3e%3c/svg%3e","fact-check":"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='M8 16C12.4183 16 16 12.4183 16 8C16 3.58172 12.4183 0 8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16Z' fill='%2300C076'/%3e%3cpath d='M11.9456 5.46631L6.66562 10.2663L4.26562 8.08449' stroke='white' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",medical:Ue},Xe=({trackingCategory:e="Together",locale:a,isOpen:l=!0,onClose:n,enableAnimation:r=!0,expertId:d,overwriteProfileProps:m,avatarFallback:p=c.CommonGAssets.getAssetPath("avatar.jpg")})=>{const{t:g}=i.useTranslations(),[f,h]=t.useState(null),[v,b]=t.useState(!1);return t.useEffect((()=>{if(l&&d&&String(null==f?void 0:f.user_id)!==String(d)){b(!0);try{h(null),u.callApi(u.getDiscoverApiPath(u.DISCOVER_PATHS.GET_EXPERT_BY_ID,{id:d}),"get").then((e=>{h(Object.assign(Object.assign({},null==e?void 0:e.data),m))}))}catch(e){console.error(e)}b(!1)}}),[l,d,null==f?void 0:f.user_id]),B.default.createElement(B.default.Fragment,null,B.default.createElement(He,{"data-open":l,"data-animation":r,onClick:e=>e.stopPropagation()},v||!f?B.default.createElement(Q,null):B.default.createElement("div",{className:"popup-content"},B.default.createElement("div",{className:"close-button",onClick:n},B.default.createElement("img",{src:De,style:{width:20,height:20},alt:"close-icon"})),B.default.createElement("div",{className:"main-info"},B.default.createElement("div",{className:"border-banner"}),B.default.createElement("div",{className:"avatar-title"},B.default.createElement(qe,null,B.default.createElement("div",{className:"image-container"},B.default.createElement("div",{style:{position:"relative"}},B.default.createElement(Be,{src:null==f?void 0:f.avatar,className:"profile-image",alt:"avatar",fallbackSrc:p}),B.default.createElement("img",{className:"badge-avatar",src:Qe[null==f?void 0:f.role],alt:"badge"})))),B.default.createElement(Ze,null,B.default.createElement(o.Text,{size:"s3",className:"full-name",type:"semiBold"},null==f?void 0:f.display_name),B.default.createElement("div",null,B.default.createElement(o.Text,{size:"p4",color:s.theme.colors.gray800},null==f?void 0:f.specialty," • "),B.default.createElement("a",{href:null==f?void 0:f.organisation_url,className:"organisation",target:"_blank",rel:"noreferrer"},B.default.createElement(o.Text,{size:"p4",className:"organisation",color:s.theme.colors.gray800,style:{textDecoration:"underline"}},null==f?void 0:f.organisation)))))),B.default.createElement(Ze,null,B.default.createElement("div",{className:"experience"},B.default.createElement(o.Text,{type:"bold",size:"p4",color:s.theme.colors.gray800,style:{paddingBottom:16}},g("expert.content.description").toUpperCase()),B.default.createElement("div",{className:"list-items"},!!(null==f?void 0:f.experiences)&&f.experiences.filter((e=>!(!e||!e.title&&!e.organization))).slice(0,3).map(((e,t)=>B.default.createElement(Ge,{key:t},B.default.createElement("img",{className:"bullet-point",src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='12' cy='12' r='2' fill='%232D87F3'/%3e%3c/svg%3e",alt:"point"}),B.default.createElement("div",{className:"text-contain"},B.default.createElement(k.Heading,{tag:"h6",color:s.theme.colors.gray800},null==e?void 0:e.title),B.default.createElement(o.Text,{size:"p2",color:s.theme.colors.gray500},null==e?void 0:e.organization)))))),B.default.createElement("a",{href:null==f?void 0:f.profile_url,style:{display:"inline-block",paddingTop:24}},B.default.createElement(o.Text,{as:"span",size:"s4",color:"#2D87F3","data-event-category":e,"data-event-action":"See Full Doctor Profile","data-event-label":u.getCurrentBaseUrl(a)+(null==f?void 0:f.profile_url)},g("home.seeExpert"))))))),B.default.createElement(We,{"data-open":l,onClick:e=>{e.stopPropagation(),n()}}))},Ke=V.default.div`
805
- position: fixed;
806
- left: 50%;
807
- width: 343px;
808
- background-color: ${e=>e.theme.colors.white};
809
- border-radius: ${e=>e.theme.borderRadius};
810
- box-shadow: 0px 0px 4px ${e=>e.theme.colors.gray200};
811
- transform: translate(-50%, -50%);
812
- transition: all 0.5s ease-in-out;
813
-
814
- ${C.MediaQueries.tdUp} {
815
- width: 750px;
816
- }
817
-
818
- &[data-animation='true'] {
819
- transition: all 0.5s ease-in-out;
820
- }
821
-
822
- &[data-open='true'] {
823
- z-index: 400;
824
- top: 50%;
825
- opacity: 1;
826
- visibility: visible;
827
- }
828
-
829
- &[data-open='false'] {
830
- top: -50%;
831
- }
832
-
833
- .popup-content {
834
- ${C.MediaQueries.mbDown} {
835
- display: block;
836
- }
837
- display: flex;
838
- position: relative;
839
- z-index: 111;
840
- height: 100%;
841
- .button-see-more {
842
- margin: 32px 0;
843
- padding: 0;
844
- > * {
845
- display: inline-block;
846
- }
847
- }
848
- .close-button {
849
- position: absolute;
850
- z-index: 100;
851
- top: 10px;
852
- right: 10px;
853
- cursor: pointer;
854
- width: unset;
855
- height: unset;
856
- img {
857
- width: 100%;
858
- height: 100%;
859
- border-radius: 50%;
860
- }
861
- }
862
- }
863
-
864
- .main-info {
865
- padding-bottom: 32px;
866
- background-color: ${e=>e.theme.colors.primary50};
867
- border-radius: ${e=>e.theme.borderRadius};
868
- .btn-booking {
869
- display: flex;
870
- margin: 12px auto;
871
- }
872
- .avatar-title {
873
- position: relative;
874
- width: 100%;
875
- padding-top: 46px;
876
- text-align: center;
877
- }
878
- }
879
- `,$e=V.default.div`
880
- position: fixed;
881
- z-index: 110;
882
- top: 0;
883
- left: 0;
884
- width: 100%;
885
- height: 100%;
886
- align-items: center;
887
- background: rgba(38, 38, 38, 0.3);
888
-
889
- &[data-open='false'] {
890
- display: none;
891
- }
892
- `,Ye=V.default.div`
893
- .image-container {
894
- .badge-avatar {
895
- position: absolute;
896
- right: 0;
897
- bottom: 0;
898
- top: 0;
899
- }
900
- }
901
- display: flex;
902
- justify-content: center;
903
- padding-bottom: 15px;
904
- text-align: center;
905
- .profile-image {
906
- width: 100px;
907
- min-width: 100px;
908
- height: 100px;
909
- min-height: 100px;
910
- border-radius: 50%;
911
- object-fit: cover;
912
- }
913
- .badge-avatar {
914
- width: 24px;
915
- height: 24px;
916
- }
917
- `,Je=V.default.div`
918
- position: relative;
919
- z-index: 9;
920
- .specialty {
921
- display: block;
922
- min-width: 240px;
923
- }
924
-
925
- padding: 0px 16px;
926
- text-align: center;
927
- .specialty {
928
- justify-content: center;
929
- }
930
-
931
- .experience {
932
- padding: 16px 0px 32px;
933
- text-align: left;
934
- .btn-wrapper {
935
- margin-top: 24px;
936
- }
937
- }
938
- p {
939
- max-width: 100%;
940
- }
941
- `;V.default.span`
942
- display: flex;
943
- flex-direction: column;
944
- justify-content: center;
945
- margin: 0 0.4em;
946
- color: ${e=>e.theme.colors.neutral300};
947
- `,V.default.div`
948
- display: inline-block;
949
- width: 3px;
950
- height: 3px;
951
- margin: 0;
952
- background-color: ${e=>e.theme.colors.gray400};
953
- border-radius: 50%;
954
- `,V.default.div`
955
- display: flex;
956
- margin-top: 8px;
957
-
958
- .bullet-point {
959
- width: 24px;
960
- height: 24px;
961
- }
962
- `;const et=({isOpen:e=!0,onClose:a,enableAnimation:n=!0,hospitalId:r,locale:d,isMobile:m,overwriteProfileProps:p,avatarFallback:g=c.CommonGAssets.getAssetPath("avatar.jpg"),trackingCategory:f="Together"})=>{const{t:h}=i.useTranslations(),[v,b]=t.useState(null),[x,w]=t.useState(!1);t.useEffect((()=>{if(e&&r&&String(null==v?void 0:v.id)!==String(r)){w(!0);try{b(null),u.callApi(u.getCarePath(u.CARE_PATHS.GET_HOSPITAL_INFO,{hospital_branch_id:r,website_url:u.domainLocales[d]}),"get").then((e=>{b(Object.assign(Object.assign({},null==e?void 0:e._data.branch),p))}))}catch(e){console.error(e)}w(!1)}}),[e,r,null==v?void 0:v.id]);const y=(null==v?void 0:v.specialties)||[],C=t.useMemo((()=>y.map((e=>e.name))),[y]);return B.default.createElement(B.default.Fragment,null,B.default.createElement(Ke,{"data-open":e,"data-animation":n,onClick:e=>e.stopPropagation()},x||!v?B.default.createElement(Q,null):B.default.createElement("div",{className:"popup-content"},B.default.createElement("div",{className:"close-button",onClick:a},B.default.createElement("img",{src:De,style:{width:20,height:20},alt:"close-icon"})),B.default.createElement("div",{className:"main-info"},B.default.createElement("div",{className:"border-banner"}),B.default.createElement("div",{className:"avatar-title"},B.default.createElement(Ye,null,B.default.createElement("div",{className:"image-container"},B.default.createElement("div",{style:{position:"relative"}},B.default.createElement(Be,{src:null==v?void 0:v.logo,className:"profile-image",alt:"avatar",fallbackSrc:g}),B.default.createElement("img",{className:"badge-avatar",src:Ue,alt:"badge"})))),B.default.createElement(Je,null,B.default.createElement(o.Text,{size:"s3",type:"semiBold",className:"full-name"},null==v?void 0:v.name),B.default.createElement("div",{className:"specialty"},y&&B.default.createElement(o.Text,{size:"p4",color:s.theme.colors.gray800},C.join(" • "),"•"),B.default.createElement("a",{href:u.getCareHospitalUrl({id:v.id,name:v.name,slug:v.slug,locale:d}),className:"organisation",target:"_blank",rel:"noreferrer"},B.default.createElement(o.Text,{size:"p4",className:"organisation",color:s.theme.colors.gray800,style:{textDecoration:"underline"}},null==v?void 0:v.name))))),!m&&B.default.createElement("a",{href:u.getCareHospitalUrl({id:v.id,name:v.name,slug:v.slug,locale:d})},B.default.createElement("div",{className:"btn-wrapper"},B.default.createElement(l.Button,{color:"primary",size:"md",className:"btn-booking"},h("careBooking.bookAnAppointment"))))),B.default.createElement(Je,null,B.default.createElement("div",{className:"experience"},B.default.createElement(o.Text,{type:"bold",size:"s3",color:s.theme.colors.gray800,style:{paddingBottom:16}},h("hospital.content.description").toUpperCase()),B.default.createElement(o.Text,{size:"p2",color:s.theme.colors.gray500},v.about),m?B.default.createElement("a",{href:u.getCareHospitalUrl({id:v.id,name:v.name,slug:v.slug,locale:d})},B.default.createElement("div",{className:"btn-wrapper"},B.default.createElement(l.Button,{color:"primary",size:"md",className:"btn-booking"},h("careBooking.bookAnAppointment")))):B.default.createElement("a",{href:u.getCareHospitalUrl({id:v.id,name:v.name,slug:v.slug,locale:d})},B.default.createElement(o.Text,{size:"s4",color:"#2D87F3",as:"span","data-event-category":f,"data-event-action":"See Full Hospital Profile","data-event-label":u.getCurrentBaseUrl(d)+u.getCareHospitalUrl({id:v.id,name:v.name,slug:v.slug,locale:d})},h("home.seeHospital"))))))),B.default.createElement($e,{"data-open":e,onClick:e=>{e.stopPropagation(),a()}}))};var tt="_2UKyiK1",at="E5ga-tI",lt="_8Y2nWXX",ot="d0T7kSP";const nt=({open:e,onClose:t,children:a,profileModalProps:l})=>{const{t:o}=i.useTranslations();return B.default.createElement(S.Modal,Object.assign({className:tt,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),B.default.createElement("div",{className:at},B.default.createElement("div",{className:lt},o("profilePanel.modal.heading")),B.default.createElement("div",{className:ot,onClick:t},B.default.createElement(_,null))),a)};O.default.extend(U.default);const it=t.createContext({}),rt=({siteType:e})=>{const{t:a}=i.useTranslations(),{handleMakeAppointment:o,doctorId:n,hospitalId:r,currentUrl:s}=t.useContext(it);return B.default.createElement(l.Button,{theme:e,color:"primary",size:"xs",onClick:e=>{null==o||o(n,r),e.stopPropagation()},dataEventCategory:"Care",dataEventAction:"Comment - Quick Booking",dataEventLabel:s,icon:B.default.createElement(d.ArrowRight,{className:"buttonIcon",size:18}),iconPosition:"right",style:{whiteSpace:"nowrap"}},B.default.createElement("span",null,a("careBooking.bookAnAppointment")))},st=e=>{const{className:l="",community:o,name:n,username:r,url:p,avatar:g,role:f,title:h,userType:v="user",expertId:b,isMarryBaby:x,doctorId:w,hospitalId:E,hasQuickBooking:k,handleMakeAppointment:A,communityTrackingAttr:N,isAnonymous:T,showDetailPopup:S,subLine:P,authActionWrapper:L,profileProps:M,profileModalProps:I,extendEle:R,avatarProps:z,hideInfo:j,timeText:F,onCloseFromPost:O,avatarIcon:V,badgeIconSize:D,hideBackground:U,children:_,styles:H}=e,{data:{locale:W,router:q,env:{isMarryBaby:Z,togetherBasePath:G}}}=t.useContext(u.TogetherComponentGlobalContext),{t:Q}=i.useTranslations(),{classes:X}=Re(void 0,{name:"CardAuthor",styles:H}),K="boolean"==typeof x?x:Z,$=K?"marryBaby":"helloSites",Y=T?Q("cardPost.anonymous"):n||r||"",J=T?c.CommonGAssets.getAssetPath("avatar.jpg"):g,ee=T?void 0:f,[te,ae]=t.useState(!1),{asPath:le}=q||{},oe=`https://${y.domainLocales[W]}${le}`,ne=()=>{if(T||"chatbot"===v)return!1;S?re(!0):p&&(window.location.href=p)};t.useEffect((()=>{C.toggleNoScroll(te)}),[te]);const[ie,re]=t.useState(!1),se="expert"===(null==e?void 0:e.role),[de,ce]=t.useState(null);return t.useEffect((()=>{ie&&!de&&Promise.resolve().then((function(){return jl})).then((e=>{ce((()=>e.ProfileDetail))}))}),[ie]),B.default.createElement(it.Provider,{value:{handleMakeAppointment:A,doctorId:w,hospitalId:E,currentUrl:oe}},B.default.createElement(nt,{open:ie,onClose:()=>re(!1),profileModalProps:I},de&&B.default.createElement(de,Object.assign({authorProps:{userId:null==e?void 0:e.userId,avatar:J,name:null==e?void 0:e.name,role:null==e?void 0:e.role,title:null==e?void 0:e.title},authActionWrapper:L,onCloseFromPost:()=>{re(!1),null==O||O()}},M))),"expert"===ee&&b?B.default.createElement(Xe,{isOpen:te,onClose:()=>ae(!1),expertId:b}):null,"expert"===ee&&w?B.default.createElement(_e,{isOpen:te,onClose:()=>ae(!1),doctorId:w,locale:W}):null,"expert"===ee&&E?B.default.createElement(et,{isOpen:te,onClose:()=>ae(!1),hospitalId:E,locale:W}):null,B.default.createElement("div",{className:`hhg-card-author ${X.root} ${l} ${se?"expert-author":""}`,"data-background":!U&&se,"data-is-marrybaby":K},B.default.createElement(Ie,{onAvatarClick:ne,avatarProps:Object.assign(Object.assign({avatar:T?c.CommonGAssets.getAssetPath(K?"anomyous-avatar-1.svg":"anomyous-avatar.svg"):J,username:Y},z),{style:{cursor:T||!p&&!S?"default":"pointer"}}),avatarIcon:V||se&&B.default.createElement(we,{size:D||15})},_?B.default.createElement("div",{onClick:ne},_):!j&&B.default.createElement(Ie.Row,null,B.default.createElement(Ie.ColLeft,null,B.default.createElement(a.Flex,{align:"center",onClick:ne},B.default.createElement(Ie.MainText,{onClick:ne},Y,"chatbot"===v?B.default.createElement(B.default.Fragment,null," ",B.default.createElement(d.ShieldCheck,{color:s.theme.colors.primaryBase,size:16,style:{display:"inline-block",transform:"translate(0, 2px)"}})):ee&&B.default.createElement(m.AuthorBadge,{className:X.authorBadge,siteType:$,role:ee,title:h,style:{verticalAlign:"bottom"}}))),P||B.default.createElement(Ie.SubTextRow,null,(null==o?void 0:o.name)&&B.default.createElement(Ie.SubText,null,B.default.createElement("a",Object.assign({href:(null==o?void 0:o.slug)&&o.isActive&&!o.isHidden?`${G}/${null==o?void 0:o.slug}`:void 0,className:"author-community-name"},N),`${null==o?void 0:o.name}`)),F&&B.default.createElement(B.default.Fragment,null,B.default.createElement(Ie.SubDivider,null),B.default.createElement(Ie.SubText,{className:"time-text"},F)))),k&&B.default.createElement(Ie.ColRight,null,B.default.createElement(rt,{siteType:$})))),R&&R))};st.BookingBtn=rt,st.MainText=Ie.MainText,st.SubText=Ie.SubText,st.SubTextRow=Ie.SubTextRow,st.SubDivider=Ie.SubDivider;const dt=e=>({message:e("notification.failure"),type:"danger"}),ct=V.default.div`
963
- position: relative;
964
- display: flex;
965
- height: 100%;
966
- flex-direction: column;
967
- padding: 16px 24px;
968
-
969
- .input-group-container {
970
- flex: 1;
971
- padding-right: 2px;
972
- padding-left: 2px;
973
- margin-bottom: 0.5rem;
974
- -ms-overflow-style: none; /* IE and Edge */
975
- overflow-y: auto;
976
- scrollbar-width: none; /* Firefox */
977
- &::-webkit-scrollbar {
978
- display: none;
979
- }
980
- }
981
-
982
- .input-group {
983
- :not(:last-child) {
984
- margin-bottom: 0.6rem;
985
- }
986
-
987
- input:focus,
988
- textarea:focus,
989
- [contenteditable='true'] {
990
- outline: none;
991
- }
992
-
993
- label {
994
- margin-bottom: 5px;
995
- color: ${e=>e.theme.colors.gray600};
996
- /* font-family: 'Open Sans', sans-serif; */
997
- font-size: 13px;
998
- font-weight: bold;
999
- }
1000
-
1001
- .input-group-label {
1002
- margin-bottom: 5px;
1003
- color: ${e=>e.theme.colors.gray600};
1004
- /* font-family: 'Open Sans', sans-serif; */
1005
- font-size: 13px;
1006
- font-weight: bold;
1007
- }
1008
-
1009
- .input-notification {
1010
- display: flex;
1011
-
1012
- & > img {
1013
- width: 16px;
1014
- height: 16px;
1015
- margin-top: 1.5px;
1016
- margin-right: 8px;
1017
- }
1018
- }
1019
-
1020
- .tag-list {
1021
- }
1022
- }
1023
-
1024
- .warning {
1025
- margin-top: 16px;
1026
- }
1027
-
1028
- .submit-btn {
1029
- width: 100%;
1030
- }
1031
-
1032
- .switch-label {
1033
- display: flex;
1034
- align-items: center;
1035
- }
1036
-
1037
- .swich-input-group {
1038
- padding: 12px 16px;
1039
- border-radius: 8px;
1040
- background: ${s.theme.colors.neutral50};
1041
-
1042
- &.askdoctor-switch {
1043
- background: ${s.theme.colors.primary50};
1044
- &.mb-color {
1045
- background: ${s.theme.mbColors.tonePink};
1046
- }
1047
-
1048
-
1049
- .mantine-Switch-labelWrapper {
1050
- flex-grow: 1;
1051
- }
1052
- .mantine-Checkbox-body {
1053
- display: flex;
1054
- width: 100%;
1055
- align-items: center;
1056
- justify-content: space-between;
1057
- }
1058
- .mantine-Switch-track {
1059
- margin-bottom: 0;
1060
- }
1061
- .label-txt {
1062
- font-weight: normal;
1063
- font-size: 14px;
1064
- color: ${s.theme.colors.gray800};
1065
- margin-left: 10px;
1066
- }
1067
- }
1068
- `,ut=V.default.div`
1069
- display: flex;
1070
- width: 100%;
1071
- align-items: center;
1072
- justify-content: space-between;
1073
- padding: 12px 16px;
1074
- border-radius: 8px;
1075
- background: ${s.theme.colors.primary50};
1076
-
1077
- &[data-is-marry-baby='true'] {
1078
- background: ${s.theme.mbColors.tonePink};
1079
- }
1080
- .switch-label {
1081
- display: flex;
1082
- align-items: center;
1083
- gap: 12px;
1084
- }
1085
- margin-bottom: 12px;
1086
- `,mt=V.default.div`
1087
- margin-bottom: 12px;
1088
- color: ${s.theme.colors.red700};
1089
- svg {
1090
- margin-right: 5px;
1091
- }
1092
- svg,
1093
- span {
1094
- display: inline-block;
1095
- vertical-align: middle;
1096
- }
1097
- `,pt=t=>{var{size:a,color:l}=t,o=e.__rest(t,["size","color"]);return B.default.createElement("svg",Object.assign({width:a,height:a,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),B.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.99967 1.33331C4.31967 1.33331 1.33301 4.31998 1.33301 7.99998C1.33301 11.68 4.31967 14.6666 7.99967 14.6666C11.6797 14.6666 14.6663 11.68 14.6663 7.99998C14.6663 4.31998 11.6797 1.33331 7.99967 1.33331ZM7.99967 8.66665C7.63301 8.66665 7.33301 8.36665 7.33301 7.99998V5.33331C7.33301 4.96665 7.63301 4.66665 7.99967 4.66665C8.36634 4.66665 8.66634 4.96665 8.66634 5.33331V7.99998C8.66634 8.36665 8.36634 8.66665 7.99967 8.66665ZM7.33301 9.99998V11.3333H8.66634V9.99998H7.33301Z",fill:l}))};pt.defaultProps={size:24,color:s.theme.colors.gray600};var gt="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 ft=/<mocka ([^>]*)data-url="true"[^<>]*>(.*?)<\/mocka>/gim,ht=/((?:=")|(?:data-url="true">)|)(https?:\/\/(www\.)?(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))/gim,vt=/\[a\+href="([^<"]+)"(?:\+text=\"([^<"]+)")?\]/gim,bt=/<mention [^>]*data-id="([^<"]+)"[^>]*>([^<]+)<\/mention>/gim,xt=/<mention [^>]*data-id="([^<"]+)" [^\>]*data-name="([^<"]+)"[^>]*>([^<]+)<\/mention>/gim,wt=/\[mention\+id="([^<"]+)"([^\]]*)\]/gim,yt=/^(https?:\/\/(www\.)?(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))$/gim,Ct=/^((https?:\/\/)?(www\.)?(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))$/gim,Et=/<a [^>]*href="([^>"]+)"[^>]*>([^<]+)<\/a>/gim,kt=/<mocka [^\>]*data-bad-word="[^\"]*" [^\>]*data-error="true"[^\>]*>(.*?)<\/mocka>/gim,At=({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},Nt=(e,t)=>e.replace(vt,((e,a,l)=>At({text:l||a,url:a,method:t}))).replace(Et,((e,a,l)=>At({text:l||a,url:a,method:t}))),Tt=(e,t=[])=>e.replace(wt,((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>`})),St=e=>{const t=[];return e.replace(/(\&amp;)+/g,"&").replace(ht,((e,a,l)=>('="'!==a&&'data-url="true">'!==a&&t.push(l),e))),t},Pt=(e,t)=>{const a=[];return e.replace(bt,((e,t)=>(a.push(t),e))).replace(wt,((e,t)=>(a.push(t),e))),t?a:Array.from(new Set(a)).slice(0,30)},Lt=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Mt=e=>e.replace(kt,"$1"),It=(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(ht,((e,t,a)=>'="'!==t&&'data-url="true">'!==t?`<a href="${a}" target="_blank">${a}</a>`:e)).replace(ft,((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(bt,((e,t,a)=>`[mention+id="${t}"+name="${a}"]`)))(Mt(e)),t),Rt=["hellobacsi.com","hellosehat.com","hellodoktor.com","hellokrupet.com","hellodoctor.com.ph","hellokhunmor.com","hellosayarwon.com","helloyishi.com.tw","helloswasthya.com","marrybaby.vn"],Bt=e=>e.match(Ct)?e.startsWith("https://")||e.startsWith("http://")?e:`https://${e}`:"",zt=(e,t)=>{const a=t.filter(Boolean);if(e&&a.length>0){return Mt(e).replace(new RegExp(`\\b(${a.map((e=>Lt(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},jt=(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 I(require("browser-image-compression"))})),a=yield e.default(t,{maxSizeMB:.4,maxWidthOrHeight:1536,useWebWorker:!0});o.append("image",a)}const n=l?u.callApiWithAdminAuth:u.callApiWithAuth,i=yield n(u.getApiPath(l?u.ADMIN_PATHS.COMMENT.IMAGE_UPLOAD:u.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)||""})),Ft=(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}},Ot=V.default.div`
1098
- input:focus,
1099
- textarea:focus,
1100
- [contenteditable='true'] {
1101
- outline: none;
1102
- }
1103
-
1104
- .textarea-control {
1105
- position: relative;
1106
- border: 1px solid ${e=>e.theme.colors.gray200};
1107
- border-radius: ${e=>e.theme.borderRadius};
1108
- &.--focus {
1109
- border-color: ${e=>e.theme.colors.primaryBase};
1110
- box-shadow: 0px 0px 2px 2px
1111
- ${e=>e.theme.colors.primary200};
1112
- }
1113
-
1114
- .textarea-wrapper {
1115
- width: 100%;
1116
- height: 200px;
1117
- }
1118
-
1119
- .control-tool {
1120
- position: absolute;
1121
- bottom: 0;
1122
- left: 0;
1123
- display: flex;
1124
- width: calc(100% - 2rem);
1125
- height: 40px;
1126
- align-items: center;
1127
- justify-content: flex-end;
1128
- border-top: 1px solid ${e=>e.theme.colors.gray200};
1129
- margin: 0 1rem;
1130
-
1131
- .tool-button {
1132
- display: flex;
1133
- width: 2rem;
1134
- height: 2rem;
1135
- align-items: center;
1136
- justify-content: center;
1137
- background: transparent;
1138
- cursor: pointer;
1139
- }
1140
- .image-icon {
1141
- vertical-align: middle;
1142
- }
1143
- }
1144
- }
1145
-
1146
- .link-preview-wrapper {
1147
- position: relative;
1148
- .icon-close {
1149
- position: absolute;
1150
- top: 5px;
1151
- right: 5px;
1152
- width: 24px;
1153
- height: 24px;
1154
- cursor: pointer;
1155
- }
1156
- }
1157
-
1158
- .image-gallery {
1159
- margin-bottom: 1rem;
1160
-
1161
- .image-item {
1162
- position: relative;
1163
- overflow: hidden;
1164
- width: 100%;
1165
- height: 0;
1166
- padding-top: 67%;
1167
- margin-top: 1rem;
1168
- border-radius: ${e=>e.theme.borderRadius};
1169
-
1170
- & > img {
1171
- position: absolute;
1172
- top: 0;
1173
- left: 0;
1174
- width: 100%;
1175
- height: 100%;
1176
- object-fit: cover;
1177
- }
1178
-
1179
- .close-btn {
1180
- position: absolute;
1181
- top: 8px;
1182
- right: 8px;
1183
- left: unset;
1184
- width: 24px;
1185
- height: 24px;
1186
- cursor: pointer;
1187
- }
1188
- }
1189
- }
1190
-
1191
- .description-label {
1192
- margin-bottom: 5px;
1193
- color: ${e=>e.theme.colors.gray600};
1194
- /* font-family: 'Open Sans', sans-serif; */
1195
- font-size: 13px;
1196
- font-weight: bold;
1197
- }
1198
-
1199
- .count-string {
1200
- margin-top: 5px;
1201
- color: ${e=>e.theme.colors.gray500};
1202
- font-size: 11px;
1203
- text-align: right;
1204
- }
1205
-
1206
- .input-notification {
1207
- display: flex;
1208
-
1209
- & > img {
1210
- width: 16px;
1211
- height: 16px;
1212
- margin-top: 1.5px;
1213
- margin-right: 8px;
1214
- }
1215
- }
1216
- `,Vt=V.default.div`
1217
- height: 100%;
1218
- position: relative;
1219
- width: 100%;
1220
- display: flex;
1221
- flex-direction: column;
1222
- .ql-toolbar.ql-snow {
1223
- top: 0;
1224
- width: 100%;
1225
- position: sticky;
1226
- z-index: 3;
1227
- border: none;
1228
- border-bottom: 1px solid #ccc;
1229
- background: white;
1230
- .ql-formats {
1231
- display: inline-flex;
1232
- align-items: center;
1233
- margin-right: 0.5rem;
1234
- .link-tool-wrapper {
1235
- .popover-menu__content {
1236
- padding: 0.5rem;
1237
- transform: translateX(calc(-50% - 1rem));
1238
- max-width: calc(100vw - 4rem);
1239
- ::before {
1240
- right: calc(50% - 8px);
1241
- }
1242
- .link-tool-popover {
1243
- input {
1244
- padding-left: 1rem;
1245
- }
1246
- .link-input-url {
1247
- margin-bottom: 0.5rem;
1248
- }
1249
- .link-input-text {
1250
- margin-bottom: 0.5rem;
1251
- }
1252
- label {
1253
- display: inline-block;
1254
- margin-bottom: 0.2rem;
1255
- }
1256
- .link-input-button-wrapper {
1257
- &[data-is-marrybaby='true'] {
1258
- .link-input-button {
1259
- border: solid 2px
1260
- ${e=>e.theme.mbColors.pink};
1261
- background-color: ${e=>e.theme.mbColors.pink};
1262
- &:hover:not(:disabled) {
1263
- border: solid 2px
1264
- ${e=>e.theme.mbColors.pink};
1265
- background-color: ${e=>e.theme.colors.white};
1266
- color: ${e=>e.theme.mbColors.pink};
1267
- }
1268
- }
1269
- }
1270
- }
1271
- .link-input-button {
1272
- width: auto;
1273
- height: auto;
1274
- padding: 0.4rem 1rem;
1275
- background-color: ${e=>e.theme.colors.primaryBase};
1276
-
1277
- &:disabled {
1278
- border-color: #bfbfbf;
1279
- background-color: #bfbfbf;
1280
- color: #fff;
1281
- cursor: not-allowed;
1282
- }
1283
- &:hover:not(:disabled) {
1284
- background-color: ${e=>e.theme.colors.primaryHover};
1285
- }
1286
- }
1287
- .error-text {
1288
- padding: 0;
1289
- margin-bottom: 0.5rem;
1290
- font-weight: 600;
1291
- color: ${e=>e.theme.colors.red700};
1292
- }
1293
- }
1294
- }
1295
- }
1296
- }
1297
- @media (max-width: 450px) {
1298
- position: relative;
1299
- .ql-formats {
1300
- .link-tool-wrapper {
1301
- position: unset;
1302
- .popover-menu__content {
1303
- left: 0;
1304
- transform: unset;
1305
- max-width: 100%;
1306
- }
1307
- }
1308
- }
1309
- }
1310
- }
1311
- .quill {
1312
- flex: 1;
1313
- overflow-y: hidden;
1314
- .ql-container {
1315
- display: inline-block;
1316
- width: 100%;
1317
- min-height: 100%;
1318
- /* padding: 14px 16px; */
1319
- border: none;
1320
- border-radius: ${e=>e.theme.borderRadius};
1321
- color: ${e=>e.theme.colors.gray800};
1322
- font-size: 1rem;
1323
- line-height: 1.5;
1324
- resize: none;
1325
- white-space: break-spaces;
1326
- .ql-editor {
1327
- word-break: break-word;
1328
- overflow-wrap: break-word;
1329
- /* -ms-overflow-style: none;
1330
- scrollbar-width: none;
1331
- &::-webkit-scrollbar {
1332
- display: none;
1333
- } */
1334
- }
1335
- mocka {
1336
- padding: 2px 6px;
1337
- border-radius: 1rem;
1338
- &[data-url='true'] {
1339
- /* background-color: #eeeeff; */
1340
- font-style: italic;
1341
- color: #1890ff;
1342
- cursor: pointer;
1343
- outline: none;
1344
- text-decoration: underline;
1345
- }
1346
- &[data-error='true'] {
1347
- background-color: #ffeeee;
1348
- color: red;
1349
- text-decoration: underline;
1350
- font-style: bold;
1351
- }
1352
- }
1353
- mention {
1354
- padding: 2px 6px;
1355
- border-radius: 1rem;
1356
- background-color: #eeeeff;
1357
- color: #1890ff;
1358
- cursor: pointer;
1359
- outline: none;
1360
- text-decoration: none;
1361
- }
1362
- ol,
1363
- ul {
1364
- padding-left: 1rem;
1365
- }
1366
- }
1367
- }
1368
- .mention-search-container {
1369
- position: absolute;
1370
- background: white;
1371
- border-radius: ${e=>e.theme.borderRadius};
1372
- filter: drop-shadow(0px 10px 16px rgba(0, 0, 0, 0.04))
1373
- drop-shadow(0px 2px 8px rgba(0, 0, 0, 0.04))
1374
- drop-shadow(0px 0px 1px rgba(0, 0, 0, 0.04));
1375
- overflow-y: scroll;
1376
- z-index: 99;
1377
- ::-webkit-scrollbar {
1378
- -webkit-appearance: none;
1379
- }
1380
- ::-webkit-scrollbar:vertical {
1381
- width: 14px;
1382
- }
1383
- ::-webkit-scrollbar-thumb {
1384
- border-radius: ${e=>e.theme.borderRadius};
1385
- background-color: #d9d9d9;
1386
- @supports (background-clip: padding-box) {
1387
- border: 3px solid rgba(0, 0, 0, 0);
1388
- background-clip: padding-box;
1389
- }
1390
- @supports not (background-clip: padding-box) {
1391
- border: 3px solid white;
1392
- }
1393
- }
1394
- ::-webkit-scrollbar-track {
1395
- background-color: #fff;
1396
- border-radius: 0 6px 6px 0;
1397
- border-left: 1px solid #f2f2f2;
1398
- }
1399
- .mention-search-item {
1400
- cursor: pointer;
1401
- padding: 12px 1rem;
1402
- display: flex;
1403
- align-items: center;
1404
- &.item-selected {
1405
- background-color: ${e=>e.theme.colors.gray100};
1406
- }
1407
- .search-avatar {
1408
- width: 40px;
1409
- height: 40px;
1410
- font-size: 20px;
1411
- margin-right: 20px;
1412
- }
1413
- }
1414
- }
1415
- `;let Dt=null;function Ut(e){var t,a;let l=-1;if(void 0!==window.getSelection){const o=window.getSelection();if((null==o?void 0:o.rangeCount)&&(null==o?void 0:o.rangeCount)>0){const o=null===(t=window.getSelection())||void 0===t?void 0:t.getRangeAt(0);if(o){const t=o.cloneRange();t.selectNodeContents(e),t.setEnd(o.endContainer,o.endOffset),l=_t(t.cloneContents().childNodes,l);const n=null===(a=o.endContainer.parentElement)||void 0===a?void 0:a.closest("mocka"),i=o.endContainer.nodeValue||o.endContainer.outerHTML;n&&(null==i?void 0:i.length)&&(l=l-o.endOffset+(n.outerHTML.length-(null==n?void 0:n.outerHTML.lastIndexOf(i))))}}}return l}function _t(e,t){return e.forEach(((a,l)=>{const o=l+1===e.length;if(a.nodeType===Node.ELEMENT_NODE){const e=a.outerHTML;if(!o)return void(t+=e.length);t+=e.indexOf(">")+1,t=_t(a.childNodes,t)}else a.nodeType===Node.TEXT_NODE&&(t+=(a.nodeValue||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").length)})),t}e.__awaiter(void 0,void 0,void 0,(function*(){if("undefined"==typeof window)return;const e=yield Promise.resolve().then((function(){return I(require("react-quill"))}));Dt=e.default;const t=e.Quill||Dt.Quill;t.register("modules/preserveWhiteSpace",class{constructor(e,t){this.quill=e,this.options=t,e.container.style.whiteSpace="pre-line"}});const a=t.import("blots/inline");class l extends a{static create(e){if(!e)return super.create(!1);const t=super.create(e);return l.setNodeConfigurations(t,e),t}static formats(e){return!(!e.innerText||!(e.getAttribute("data-href")||e.getAttribute("data-url")||e.getAttribute("data-error")||e.getAttribute("data-bad-word")))&&{"data-bad-word":e.getAttribute("data-bad-word"),"data-error":e.getAttribute("data-error"),"data-href":e.getAttribute("data-href"),"data-url":e.getAttribute("data-url"),"data-text":e.innerText||e.getAttribute("data-href")}}static setNodeConfigurations(e,t){var a,l;t&&(null===(l=null===(a=null==t?void 0:t["data-text"])||void 0===a?void 0:a.replace(/(\&nbsp;)+/g," "))||void 0===l?void 0:l.replace(/(\u200c|&zwnj;)+/g,""))&&(t["data-bad-word"]&&e.setAttribute("data-bad-word",t["data-bad-word"]),t["data-href"]&&e.setAttribute("data-href",t["data-href"]),t["data-error"]&&e.setAttribute("data-error",t["data-error"]),t["data-url"]&&e.setAttribute("data-url",t["data-url"]))}}l.blotName="mocka1",l.tagName="mocka",t.register(l);class o extends a{static create(e){if(!e)return super.create(!1);const t=super.create(e);return o.setNodeConfigurations(t,e),t}static formats(e){return!(!e.getAttribute("data-name")||!e.getAttribute("data-id"))&&{"data-name":e.getAttribute("data-name"),"data-id":e.getAttribute("data-id")}}static setNodeConfigurations(e,t){var a,l;t&&t["data-id"]&&(null===(l=null===(a=null==t?void 0:t["data-name"])||void 0===a?void 0:a.replace(/(\&nbsp;)+/g," "))||void 0===l?void 0:l.replace(/(\u200c|&zwnj;)+/g,""))&&(t["data-id"]&&e.setAttribute("data-id",t["data-id"]),t["data-name"]&&e.setAttribute("data-name",t["data-name"]))}}o.blotName="mention",o.tagName="mention",t.register(o)}));const Ht=(e,t)=>{var a;const{formatUrl:l,bannedWords:o=[]}=t||{},n=e.replace(/<font [^\>]*>(.+)<\/font>/gim,((e,t)=>t.replace(/<u[^\>]*>(.+)<\/u>/gim,"$1"))).replace(xt,((e,t,a,l)=>{if(l!==a){const e=a.split(" "),o=e.findIndex(((t,a)=>{const o=e.slice(0,a+1).join(" ");return!l.startsWith(o)}));if(0===o)return`@${l}`;{const a=(o<0?e:e.slice(0,o)).join(" "),n=l.slice(a.length).trim();return console.log(o,a,n),`<mention data-id="${t}" data-name="${a}">${a}</mention> ${n} `}}return e}));if(!l)return{value:zt(n,o)};let i=(e=>e.replace(kt,((e,t)=>{const a=document.createElement("div");a.innerHTML=e;const l=a.firstChild;return(null==l?void 0:l.innerText)!==(null==l?void 0:l.getAttribute("data-bad-word"))?t:e})))((e=>{var t,a;return null===(a=null===(t=e.replace(/(\&nbsp;)+/g," "))||void 0===t?void 0:t.replace(/(\u200c|&zwnj;)+/g,""))||void 0===a?void 0:a.replace(ft,((e,t,a)=>{var l;const o=null===(l=t.match(/data-href="([^"]*)"/im))||void 0===l?void 0:l[1];return!o||o===a||a.match(yt)?a:o?`<a href="${o}">${a}</a>`:`<a href="${a}">${a}</a>`})).replace(ht,((e,t,a)=>{if('="'!==t&&'data-url="true">'!==t){const e=a.toLowerCase(),t=`${e.startsWith("http")?"":" https://"}${e}`;return At({text:t,url:t,method:"edit"})}return e})).replace(Et,((e,t,a)=>At({text:a||t,url:t,method:"edit"})))})(n));const r=(e=>{var t;return[...St(e),...(null===(t=e.match(ft))||void 0===t?void 0:t.map((e=>{var t,a;const l=null===(t=e.match(/data-href="([^"]*)"/im))||void 0===t?void 0:t[1],o=null===(a=e.match(/>(.*?)<\/mocka>/im))||void 0===a?void 0:a[1];return l||o})))||[]].filter((e=>!!e))})(n);if(r){const e=[];let t="";return r.forEach((t=>{if(t)try{const a=new URL(t);Rt.some((e=>a.origin.endsWith(e)))||e.push(t)}catch(a){e.push(t)}})),e.length>0&&(i=i.replace(new RegExp(`data-url="true">(${e.map(Lt).join("|")})<`,"gi"),'data-error="true" data-url="true">$1<').replace(new RegExp(`data-href="(${e.map(Lt).join("|")})" data-url="true">`,"gi"),'data-href="$1" data-error="true" data-url="true">')),t=null===(a=r.filter((t=>-1===e.indexOf(t))))||void 0===a?void 0:a[0],{invalidUrls:e,previewUrl:t,value:zt(i,o)}}return{value:zt(i,o)}},Wt=({html:a,onChange:l,className:n,style:i,onImagePickerClick:r,bannedWords:s=[],onInvalidUrlsChange:d,onPreviewUrlChange:c,setEditorRef:m,isReplying:p})=>{var g,f,h,v;const b=t.useRef([]);b.current=s;const[x,w]=t.useState([]),[y,C]=t.useState(null),{data:{locale:E}}=t.useContext(u.TogetherComponentGlobalContext),k=(null==s?void 0:s.join(","))||"";t.useEffect((()=>{var e,t;const a=null===(t=null===(e=z.current)||void 0===e?void 0:e.getEditor())||void 0===t?void 0:t.root.innerHTML;S(a)}),[k]);const N=e=>{y&&y.url===e||(C({url:e,isFetching:!0}),u.callApi(u.getApiPath(u.PATHS.FETCH_PREVIEW,{_locale:E}),"POST",{data:{link:e}}).then((t=>{var a,l,o,n;C({title:null===(a=null==t?void 0:t.data)||void 0===a?void 0:a.title,description:null===(l=null==t?void 0:t.data)||void 0===l?void 0:l.description,image:(null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.image)||(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.logo),url:e})})).catch((()=>{C(null)})))},T=t.useRef(N);T.current=N;const S=t.useCallback(j.default((e=>{if(e){const t=Ht(e,{bannedWords:b.current,formatUrl:!0}),{invalidUrls:a,previewUrl:o,value:n}=t;a&&w(a),o?T.current(o):C(null),n!==e&&(null==l||l(n))}}),500),[]);t.useEffect((()=>{d&&d(x)}),[x]),t.useEffect((()=>{c&&((null==y?void 0:y.url)?c({title:y.title||"",url:y.url||"",image:y.image||"",description:y.description||""}):c(null))}),[y]);const L=t.useRef(r);L.current=r;const M=P.useUniqueId(),I=t.useRef({toolbar:{handlers:{image:()=>{var e;return null===(e=L.current)||void 0===e?void 0:e.call(L)},link:()=>!1},container:"#toolbar-"+M},preserveWhiteSpace:!0}),R=t.useRef(-1),z=t.useRef(null);m&&(null===(f=null===(g=z.current)||void 0===g?void 0:g.getEditor())||void 0===f?void 0:f.root)&&m(null===(v=null===(h=z.current)||void 0===h?void 0:h.getEditor())||void 0===v?void 0:v.root);const F=()=>{var e,t,a,l,o,n,i,r;if(null===(t=null===(e=z.current)||void 0===e?void 0:e.getEditor())||void 0===t?void 0:t.root){const e=Ut(null===(l=null===(a=z.current)||void 0===a?void 0:a.getEditor())||void 0===l?void 0:l.root),t=null===(n=null===(o=z.current)||void 0===o?void 0:o.getEditor())||void 0===n?void 0:n.root.innerHTML;if(e>=0&&e<t.length){if(Pt(t,!0).length<30-(p?1:0)){const e=function(e){var t,a;let l=null;if(void 0!==window.getSelection){const o=window.getSelection();if((null==o?void 0:o.rangeCount)&&(null==o?void 0:o.rangeCount)>0){const o=null===(t=window.getSelection())||void 0===t?void 0:t.getRangeAt(0);if(o){const t=o.cloneRange();t.selectNodeContents(e),t.setEnd(o.endContainer,o.endOffset);const n=(t.endContainer.nodeValue||"").substring(0,o.endOffset),i=n.lastIndexOf("@");if(i+1<n.length&&(0===i||" @"===n.slice(i-1,i+1))){const e=null===(a=n.slice(i+1))||void 0===a?void 0:a.trim();if(e){t.setStart(o.endContainer,i);const a=t.cloneRange();a.setStart(a.endContainer,i),l={name:e,rect:t.getBoundingClientRect(),replaceRange:a}}}}}}return l}(null===(r=null===(i=z.current)||void 0===i?void 0:i.getEditor())||void 0===r?void 0:r.root);e?(_(e.name,e.rect),q.current=e.replaceRange):(q.current=null,_("",null))}else q.current=null,_("",null);R.current=e}}else V([])},[O,V]=t.useState([]),[D,U]=t.useState({top:0,left:0}),_=t.useCallback(j.default(((t,a,l)=>e.__awaiter(void 0,void 0,void 0,(function*(){var e,o,n,i;if(!t||!DOMRect)return V([]);const r=yield((null===(e=A.getCookie(u.BEARER_TOKEN_COOKIE))||void 0===e?void 0:e.length)||0)>0?u.callApiWithAuth(u.getApiPath(u.PATHS.SEARCH_USER,{_locale:E,name:t}),"get"):u.callApiWithAdminAuth(u.getApiPath(u.ADMIN_PATHS.SEARCH_USER,{_locale:E,name:t}),"get");Q(0),V(null===(n=null===(o=null==r?void 0:r.data)||void 0===o?void 0:o.users)||void 0===n?void 0:n.filter((e=>!(null==l?void 0:l.includes(String(e.id))))));const s=a,d=null===(i=W.current)||void 0===i?void 0:i.getBoundingClientRect();if(s&&d){const e=343,t=256,a={top:s.bottom-d.top,width:"min(343px, 100%)",maxHeight:t};d.width-(s.left-d.left)<e?a.right=0:a.left=s.left-d.left,U(a)}}))),500),[]),H=(e,t)=>{var a,l,o;if(q.current){q.current.deleteContents();const n=document.createElement("mention");n.setAttribute("data-id",e),n.setAttribute("data-name",t),n.innerText=t;const i=document.createTextNode(" ");q.current.insertNode(i),q.current.insertNode(n);(null===(l=null===(a=z.current)||void 0===a?void 0:a.getEditor())||void 0===l?void 0:l.root).focus();const r=null===(o=window.getSelection())||void 0===o?void 0:o.getRangeAt(0);null==r||r.setStart(q.current.endContainer,q.current.endOffset),null==r||r.setEnd(q.current.endContainer,q.current.endOffset)}V([])},W=t.useRef(null),q=t.useRef(null),Z=t.useRef(null),[G,Q]=t.useState(0);return t.useEffect((()=>{if(Z.current){const e=Z.current,t=e.children.item(G);if(t){const a=e.getBoundingClientRect(),l=t.getBoundingClientRect();t.offsetTop<e.scrollTop?e.scrollTop=t.offsetTop:t.offsetTop+l.height>e.scrollTop+a.height&&(e.scrollTop=t.offsetTop-a.height+l.height)}}}),[G]),t.useEffect((()=>{const e=function(e){var t;(null===(t=W.current)||void 0===t?void 0:t.contains(e.target))||V([])};return window.addEventListener("click",e,{passive:!0}),()=>{window.removeEventListener("click",e)}}),[]),B.default.createElement(Vt,{ref:W,className:n,style:i,onKeyDownCapture:e=>{if(null==O?void 0:O.length){let t=!1;if("ArrowDown"===e.key)t=!0,Q((e=>e+1>=O.length?0:e+1));else if("Escape"===e.key)t=!0,Q(0),V([]);else if("ArrowUp"===e.key)t=!0,Q((e=>e-1<0?O.length-1:e-1));else if("Enter"===e.key||"Tab"===e.key){const e=O[G];e&&(t=!0,H(e.id,e.name))}if(t)return e.preventDefault(),!1}}},B.default.createElement(qt,{id:M,onAddLink:(e,t)=>{var a,o;const n=R.current+1,i=null===(o=null===(a=z.current)||void 0===a?void 0:a.getEditor())||void 0===o?void 0:o.root.innerHTML,r=((null==i?void 0:i.substring(0,n))||"")+`<mocka data-href="${t}" data-url="true">${e}</mocka> `+((null==i?void 0:i.substring(n))||"");null==l||l(r),S(r)}}),Dt&&B.default.createElement(Dt,{ref:z,theme:"snow",value:a,onChange:e=>{null==l||l(e),S(e),F()},onChangeSelection:()=>{F()},modules:I.current,formats:["mocka1","mention","id","key","bold","italic","underline","list","bullet"]}),!!(null==O?void 0:O.length)&&B.default.createElement("div",{ref:Z,className:"mention-search-container",style:D},O.map(((e,t)=>B.default.createElement("div",{className:"mention-search-item "+(G===t?"item-selected":""),key:e.id,onClick:t=>{t.preventDefault(),t.stopPropagation(),H(e.id,e.name)},onMouseEnter:()=>{Q(t)}},B.default.createElement(u.UserAvatar,{className:"search-avatar",username:e.name,avatar:e.avatar}),B.default.createElement("div",null,B.default.createElement(o.Text,{size:"p2"},e.name),B.default.createElement(o.Text,{size:"p4",color:"#595959"},"@",e.username)))))))},qt=({onAddLink:e,id:t})=>B.default.createElement("div",{id:"toolbar-"+t,onClick:e=>{e.preventDefault(),e.stopPropagation()}},B.default.createElement("span",{className:"ql-formats"},B.default.createElement("button",{className:"ql-bold",type:"button"}),B.default.createElement("button",{className:"ql-italic",type:"button"}),B.default.createElement("button",{className:"ql-underline",type:"button"})),B.default.createElement("span",{className:"ql-formats"},B.default.createElement("button",{className:"ql-list",value:"ordered",type:"button"}),B.default.createElement("button",{className:"ql-list",value:"bullet",type:"button"})),B.default.createElement("span",{className:"ql-formats"},B.default.createElement("button",{className:"ql-image",type:"button"}),e&&B.default.createElement(he,{className:"link-tool-wrapper",toggleButtonContent:B.default.createElement("img",{className:"link-icon",src:"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='M9.54545 16H7.09091C6.55368 16 6.02172 15.8965 5.52539 15.6955C5.02905 15.4945 4.57808 15.1999 4.1982 14.8284C3.43101 14.0783 3 13.0609 3 12C3 10.9391 3.43101 9.92172 4.1982 9.17157C4.96539 8.42143 6.00593 8 7.09091 8H9.54545M13.9256 8H16.9091C17.4463 8 17.9783 8.10346 18.4746 8.30448C18.9709 8.5055 19.4219 8.80014 19.8018 9.17157C20.1817 9.54301 20.483 9.98396 20.6886 10.4693C20.8942 10.9546 21 11.4747 21 12C21 12.5253 20.8942 13.0454 20.6886 13.5307C20.483 14.016 20.1817 14.457 19.8018 14.8284C19.4219 15.1999 18.9709 15.4945 18.4746 15.6955C17.9783 15.8965 17.4463 16 16.9091 16H13.9256' stroke='%23737373' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M9 12H15' stroke='%23737373' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e"}),buttonProps:{size:"md",color:"transparent"},align:"end"},(({setShow:t})=>B.default.createElement(Gt,{onAddUrl:e,setShow:t}))))),Zt=["notification.limitUrlDomain","notification.urlWrongFormat"],Gt=({onAddUrl:e,setShow:a})=>{const{data:{env:{isMarryBaby:n}}}=t.useContext(u.TogetherComponentGlobalContext),{t:r}=i.useTranslations(),[s,d]=t.useState(""),[c,m]=t.useState(""),[p,f]=t.useState(-1),h=s.trim()&&c.trim()&&p<0;return B.default.createElement("div",{className:"link-tool-popover"},B.default.createElement(g.Input,{name:"url",value:s,size:"md",label:"URL",placeholder:r("placeholder.enterUrlHere"),type:"text",className:"link-input-url",onChange:e=>{d(e),(e=>{const t=Bt(e.trim());try{const e=new URL(t);return e.protocol.startsWith("http")?Rt.some((t=>e.origin.endsWith("/"+t)||e.origin.endsWith("."+t)))?(f(-1),!0):(f(0),!1):(f(1),!1)}catch(e){return f(1),!1}})(e)}}),p>=0&&B.default.createElement(o.Text,{size:"c2",className:"error-text"},r(Zt[p])),B.default.createElement(g.Input,{name:"text",value:c,size:"md",label:r("createPost.urlText"),placeholder:r("placeholder.enterUrlTextHere"),type:"text",className:"link-input-text",onChange:e=>m(e)}),B.default.createElement("div",{"data-is-marrybaby":n,className:"link-input-button-wrapper"},B.default.createElement(l.Button,{theme:n?"marryBaby":"helloSites",size:"sm",color:"primary",className:"link-input-button",onClick:()=>{h&&(e(c.trim(),Bt(s.trim())),a&&a(!1))},isDisabled:!h},r("insert"))))};var Qt="data:image/svg+xml,%3csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 22.9844C17.5228 22.9844 22 18.5072 22 12.9844C22 7.46153 17.5228 2.98438 12 2.98438C6.47715 2.98438 2 7.46153 2 12.9844C2 18.5072 6.47715 22.9844 12 22.9844Z' fill='%23262626'/%3e%3cpath d='M14.8281 10.1562L9.17127 15.8131' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M9.17188 10.1562L14.8287 15.8131' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";const Xt=({className:e,style:a,bannedWords:l=[],value:n,onChange:r,onPreviewUrlChange:d,onInvalidUrlsChange:c,onImageFilesChange:m,imageFiles:p,isReplying:g})=>{const{t:f}=i.useTranslations(),[h,v]=t.useState(null),b=t.useRef(null),{onSelectImages:x,onRemoveImage:w,imageSrcs:y}=Ft(p,m);return t.useEffect((()=>{d&&((null==h?void 0:h.url)?d({title:h.title||"",url:h.url||"",image:h.image||"",description:h.description||""}):d(null))}),[h]),B.default.createElement(Ot,{className:e,style:a},B.default.createElement(o.Text,{size:"p4",className:"description-label"},f("createPost.popup.description")),B.default.createElement("div",{className:"textarea-control"},B.default.createElement("div",{className:"textarea-wrapper"},B.default.createElement(Wt,{html:n||"",onChange:r,bannedWords:l,onImagePickerClick:()=>{var e;return null===(e=b.current)||void 0===e?void 0:e.click()},onPreviewUrlChange:v,onInvalidUrlsChange:c,isReplying:g}))),B.default.createElement(o.Text,{size:"p4",className:"count-string"},f("character"),": ",z.default(n||"").length),(!y||0===y.length)&&h&&B.default.createElement("div",{className:"link-preview-wrapper"},h.isFetching?B.default.createElement(Q,null):B.default.createElement(B.default.Fragment,null,B.default.createElement(K,{title:h.title,url:h.url||"#",image:h.image,noRefetch:!0}),B.default.createElement("img",{src:Qt,className:"icon-close",onClick:()=>v(null)}))),B.default.createElement("input",{ref:b,type:"file",accept:"image/png, image/gif, image/jpeg",multiple:!0,style:{display:"none"},onChange:x}),y.length>u.MAX_IMAGE_UPLOADS?B.default.createElement("div",{className:"input-notification"},B.default.createElement("img",{src:gt}),B.default.createElement(o.Text,{size:"p4",color:s.theme.colors.alertWarning},f("createPost.popup.warningImage"))):null,y.length>0&&B.default.createElement("div",{className:"image-gallery"},y.map(((e,t)=>B.default.createElement("div",{key:t,className:"image-item"},B.default.createElement("img",{src:e}),B.default.createElement("img",{className:"close-btn",src:Qt,onClick:()=>w(t)}))))))},Kt=V.default.div`
1416
- input:focus,
1417
- textarea:focus,
1418
- [contenteditable='true'] {
1419
- outline: none;
1420
- }
1421
-
1422
- .title-input {
1423
- overflow: hidden;
1424
- width: 100%;
1425
- padding: 12px 16px;
1426
- border: solid 1px #d9d9d9;
1427
- border-radius: ${e=>e.theme.borderRadius};
1428
- font-size: 16px;
1429
- line-height: 1.2;
1430
- white-space: nowrap;
1431
- :focus {
1432
- border-color: ${e=>e.theme.colors.primaryBase};
1433
- box-shadow: 0px 0px 2px 2px
1434
- ${e=>e.theme.colors.primary200};
1435
- }
1436
- br {
1437
- display: none;
1438
- }
1439
- * {
1440
- display: inline;
1441
- white-space: nowrap;
1442
- }
1443
- mocka {
1444
- padding: 2px 6px;
1445
- border-radius: 1rem;
1446
- &[data-error='true'] {
1447
- background-color: #ffeeee;
1448
- color: red;
1449
- text-decoration: underline;
1450
- font-style: bold;
1451
- }
1452
- }
1453
- ol,
1454
- ul {
1455
- padding-left: 1rem;
1456
- }
1457
- }
1458
-
1459
- label {
1460
- display: block;
1461
- margin-bottom: 5px;
1462
- color: ${e=>e.theme.colors.gray600};
1463
- font-size: 13px;
1464
- font-weight: bold;
1465
- }
1466
-
1467
- .count-string {
1468
- margin-top: 5px;
1469
- color: ${e=>e.theme.colors.gray500};
1470
- font-size: 11px;
1471
- text-align: right;
1472
- }
1473
- `,$t=(e,t)=>{if(!t)return e;const{limit:a,bannedWords:l=[]}=t,o="number"==typeof a&&a>=0?e.substring(0,a):e;return zt(o,l)},Yt=({className:e,style:a,bannedWords:l=[],value:n,onChange:r})=>{var s;const{t:d}=i.useTranslations(),[c,u]=t.useState(""),m=t.useRef(null);t.useEffect((()=>{if(m.current){const e=e=>{var t;e.preventDefault();const a=null===(t=e.clipboardData)||void 0===t?void 0:t.getData("text/plain");document.execCommand("insertHTML",!1,a)},t=m.current;return t.addEventListener("paste",e,{passive:!0}),()=>t.removeEventListener("paste",e)}}),[m]);const p=(null==l?void 0:l.join(","))||"";t.useEffect((()=>{var e;if(p){const t=null===(e=m.current)||void 0===e?void 0:e.innerText;if(t){const e=zt(t,l);e!==t&&(r&&r(e),u(e))}}}),[p]);const f=t.useCallback(j.default((()=>{if(m.current){const e=$t(m.current.innerText,{limit:120,bannedWords:l});r&&r(e),u(e)}}),300),[]);return t.useEffect((()=>{setTimeout((()=>{var e;null===(e=m.current)||void 0===e||e.focus()}),500)}),[]),B.default.createElement(Kt,{className:e,style:a},B.default.createElement(g.Input,{name:"title",value:n||c,size:"md",label:d("createPost.title"),CustomInput:B.default.createElement(F.default,{innerRef:m,html:n||c,onChange:()=>{if(m.current&&m.current.innerText!==(n||c)){const e=$t(m.current.innerText,{bannedWords:l});r&&r(e),u(e),f()}},className:"title-input"})}),B.default.createElement(o.Text,{size:"p4",className:"count-string"},d("createPost.popup.wordCount",{count:(null===(s=m.current)||void 0===s?void 0:s.innerText.length)||0,max:120})))},Jt=V.default.div`
1474
- display: flex;
1475
- width: 100%;
1476
- flex-wrap: wrap;
1477
- margin-top: 1rem;
1478
-
1479
- .tag-item {
1480
- min-height: 32px;
1481
- padding: 5px 12px;
1482
- border: 1px solid ${e=>e.theme.colors.neutral100};
1483
- margin-right: 1rem;
1484
- margin-bottom: 8px;
1485
- border-radius: 1rem;
1486
- color: ${e=>e.theme.colors.gray800};
1487
- cursor: pointer;
1488
- font-size: 13px;
1489
- line-height: 22px;
1490
- transition: all 0.2s;
1491
-
1492
- &.--active {
1493
- border-color: ${e=>e.theme.colors.primary50};
1494
- background: ${e=>e.theme.colors.primary50};
1495
- color: ${e=>e.theme.colors.primaryBase};
1496
- }
1497
- &[data-disabled='true'] {
1498
- background: ${e=>e.theme.colors.gray100};
1499
- color: ${e=>e.theme.colors.gray800};
1500
- }
1501
- }
1502
- .topic-spinner {
1503
- margin-right: auto;
1504
- margin-left: auto;
1505
- & > button {
1506
- width: 24px;
1507
- height: 24px;
1508
- }
1509
- }
1510
- &[data-is-marrybaby='true'] {
1511
- .tag-item {
1512
- border-color: transparent;
1513
- background: #f3f3f3;
1514
- color: #3e3f58;
1515
- &.--active {
1516
- border-color: #b6cdff;
1517
- background: #e0e9fb;
1518
- color: #3e3f58;
1519
- }
1520
- }
1521
- }
1522
- `,ea=({className:a,style:l,topics:o,communityId:n,onChange:i,isLoading:r,disabled:s,forceTopics:d,selectedTopics:c,noFetch:m})=>{const{data:{locale:g,env:{isMarryBaby:f}}}=t.useContext(u.TogetherComponentGlobalContext),[h,v]=t.useState(o?[...o]:[]),[b,x]=t.useState(c?[...c]:[]),[w,y]=t.useState(!1),C=t.useRef(o);C.current=o,t.useEffect((()=>{var t;!n||m||(null===(t=C.current)||void 0===t?void 0:t.length)||(v([]),y(!0),e.__awaiter(void 0,void 0,void 0,(function*(){var e;try{const t=yield u.callApi(u.getApiPath(u.PATHS.TOPIC.LIST,{communityId:n,_locale:g}),"GET"),a=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.topics;Array.isArray(a)&&v((()=>(null==a?void 0:a.map(p.formatTopic).sort(((e,t)=>(e.order||0)-(t.order||0))))||[]))}catch(e){console.log(e),y(!1)}y(!1)})))}),[n,m]);const E=null==o?void 0:o.map((e=>e.id)).join("-"),k=null==h?void 0:h.map((e=>e.id)).join("-"),A=null==d?void 0:d.map((e=>e.id)).join("-");t.useEffect((()=>{o&&void 0!==E&&E!==k&&v(o)}),[o,E,k]);const N=t.useMemo((()=>h.filter((e=>!(null==d?void 0:d.some((t=>t.id&&t.id===e.id||t.mappedCategoryId&&t.mappedCategoryId===e.mappedCategoryId)))))),[k,A]);return B.default.createElement(Jt,{"data-is-marrybaby":f,className:a,style:l},d.map((e=>B.default.createElement(ta,{key:`${e.id}-${e.mappedCategoryId}`,topic:e,disabled:!0,selected:!0}))),N.map((e=>B.default.createElement(ta,{key:`${e.id}-${e.mappedCategoryId}`,topic:e,disabled:s,selected:(c||b).some((t=>t.id&&t.id===e.id||t.mappedCategoryId&&t.mappedCategoryId===e.mappedCategoryId)),onClick:()=>{const t=c||b,a=t.findIndex((t=>t.id&&t.id===e.id||t.mappedCategoryId&&t.mappedCategoryId===e.mappedCategoryId));-1!==a?t.splice(a,1):t.push(e),i&&c?i(t.slice()):(i&&i(t.slice()),x(t.slice()))}}))),(r||w)&&B.default.createElement(Q,{className:"topic-spinner"}))},ta=({topic:e,disabled:t,selected:a,onClick:l})=>B.default.createElement("div",{className:"tag-item"+(a?" --active":""),"data-disabled":t,onClick:t?void 0:l},e.name),aa=V.default.div`
1523
- [data-type='confirm'] {
1524
- width: min(360px, 100%);
1525
- height: auto;
1526
- &[data-open='false'] {
1527
- top: calc(-100% - 500px);
1528
- }
1529
- }
1530
- z-index: 600;
1531
-
1532
- .header {
1533
- display: none !important;
1534
- }
1535
-
1536
- .confirm-dialog {
1537
- position: relative;
1538
- overflow: auto;
1539
- width: 100%;
1540
- padding-top: 44px;
1541
- background: #fff;
1542
- border-radius: ${e=>e.theme.borderRadius};
1543
-
1544
- .confirm-content {
1545
- display: flex;
1546
- flex-direction: column;
1547
- align-items: center;
1548
- padding: 0 16px 16px;
1549
- text-align: center;
1550
-
1551
- .title {
1552
- margin-bottom: 8px;
1553
- font-size: 24px;
1554
- line-height: 32px;
1555
- word-break: break-word;
1556
- overflow-wrap: break-word;
1557
- }
1558
-
1559
- .desc {
1560
- margin-bottom: 24px;
1561
- color: ${e=>e.theme.colors.gray500};
1562
- font-size: 18px;
1563
- line-height: 24px;
1564
- text-align: center;
1565
- word-break: break-word;
1566
- overflow-wrap: break-word;
1567
- }
1568
-
1569
- .btn-group {
1570
- display: flex;
1571
- flex-wrap: wrap;
1572
- align-items: center;
1573
- justify-content: center;
1574
-
1575
- button {
1576
- margin: 0 4px 0.5rem;
1577
- }
1578
- }
1579
- }
1580
- }
1581
- .thumbnail-container {
1582
- width: 80px;
1583
- height: 80px;
1584
- margin-bottom: 32px;
1585
- .thumbnail {
1586
- width: 100%;
1587
- height: 100%;
1588
- }
1589
- &.is-icon {
1590
- display: flex;
1591
- align-items: center;
1592
- justify-content: center;
1593
- background: #e0e9fc;
1594
- border-radius: 1rem;
1595
- .thumbnail {
1596
- width: 40px;
1597
- height: 40px;
1598
- }
1599
- }
1600
- }
1601
- &[data-is-marrybaby='true'] {
1602
- .popup-frame {
1603
- > div:first-child {
1604
- overflow: hidden;
1605
- border-radius: 1rem;
1606
- &[data-open='true'] {
1607
- ${C.MediaQueries.mbDown} {
1608
- top: 100%;
1609
- transform: translate(-50%, -100%);
1610
- max-width: unset;
1611
- width: 100%;
1612
- background: unset;
1613
- overflow: unset;
1614
- }
1615
- }
1616
- }
1617
- .popup-content {
1618
- .close-button {
1619
- ${C.MediaQueries.mbDown} {
1620
- display: none;
1621
- }
1622
- }
1623
- .confirm-dialog {
1624
- ${C.MediaQueries.mbDown} {
1625
- background: unset;
1626
- position: relative;
1627
- overflow-x: hidden;
1628
- &::before {
1629
- content: '';
1630
- width: 200%;
1631
- background: #fff;
1632
- position: absolute;
1633
- left: 50%;
1634
- top: 0;
1635
- transform: translateX(-50%);
1636
- z-index: -1;
1637
- height: 100%;
1638
- border-top-left-radius: 100%;
1639
- border-top-right-radius: 100%;
1640
- }
1641
- }
1642
- .confirm-content {
1643
- padding: 0 40px 40px;
1644
- ${C.MediaQueries.mbDown} {
1645
- padding-left: 1.5rem;
1646
- padding-right: 1.5rem;
1647
- }
1648
- .btn-group {
1649
- width: 100%;
1650
- justify-content: space-between;
1651
- button {
1652
- flex: 1;
1653
- margin: 0;
1654
- &:first-child {
1655
- margin-right: 0.5rem;
1656
- }
1657
- }
1658
- }
1659
- }
1660
- }
1661
- }
1662
- .thumbnail-container {
1663
- ${C.MediaQueries.mbDown} {
1664
- display: none;
1665
- }
1666
- &.is-icon {
1667
- background: #ffeaf1;
1668
- border-radius: 24px;
1669
- }
1670
- &.is-mobile {
1671
- position: absolute;
1672
- top: 0;
1673
- left: 50%;
1674
- display: none;
1675
- width: 48px;
1676
- height: 48px;
1677
- transform: translate(-50%, -50%);
1678
- &.is-icon {
1679
- border-radius: 1rem;
1680
- .thumbnail {
1681
- width: 24px;
1682
- height: 24px;
1683
- }
1684
- }
1685
- ${C.MediaQueries.mbDown} {
1686
- display: flex;
1687
- }
1688
- }
1689
- }
1690
- }
1691
- }
1692
- `,la=V.default.div`
1693
- [data-type='confirm'] {
1694
- max-width: 468px;
1695
- height: 486px;
1696
- padding: 0;
1697
-
1698
- .popup-content {
1699
- display: flex;
1700
- flex-direction: column;
1701
- padding: 0;
1702
-
1703
- .close-button {
1704
- top: 16px;
1705
- right: 16px;
1706
- width: 24px;
1707
- height: 24px;
1708
- z-index: 5;
1709
- }
1710
-
1711
- .header {
1712
- display: flex;
1713
- height: 56px;
1714
- align-items: center;
1715
- padding: 16px 56px 16px 32px;
1716
- border-bottom: 1px solid ${e=>e.theme.colors.neutral100};
1717
- font-weight: 900;
1718
- width: 100%;
1719
- justify-content: space-between;
1720
- }
1721
-
1722
- .content {
1723
- overflow: auto;
1724
- flex: 1;
1725
- .topic-list-wrapper {
1726
- padding: 1rem;
1727
- }
1728
- }
1729
- }
1730
- }
1731
-
1732
- > div&[data-open='true'] {
1733
- z-index: 250;
1734
- &:last-child {
1735
- z-index: 200;
1736
- }
1737
- }
1738
-
1739
- ${e=>e.isExpand&&w.css`
1740
- & > div[data-open] {
1741
- width: 100%;
1742
- height: 100%;
1743
- max-width: none;
1744
- max-height: none;
1745
- }
1746
- `}
1747
-
1748
- ${e=>e.hasFullscreen&&w.css`
1749
- & > div[data-open] {
1750
- transition: all 0.5s ease-in-out, width 0s, height 0s;
1751
- }
1752
- `}
1753
- `,oa=V.default.div`
1754
- cursor: pointer;
1755
- display: flex;
1756
- align-items: center;
1757
- `;var na="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='M18 6L6 18' stroke='%23262626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M6 6L18 18' stroke='%23262626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";const ia=({className:e,style:a,closeIcon:l,heading:o="",children:n,isOpen:i=!1,hasFullscreen:r=!1,onClose:s=(()=>null)})=>{const[c,u]=t.useState(!1);return B.default.createElement(la,{className:e,style:a,isExpand:c,hasFullscreen:r},B.default.createElement(p.Popup,{type:"confirm",onClose:s,isOpen:i,closeIcon:l||B.default.createElement("img",{src:na}),enableAnimation:!r},B.default.createElement("div",{className:"header"},B.default.createElement(k.Heading,{tag:"h5"},o),r&&B.default.createElement(oa,{onClick:()=>u(!c)},B.default.createElement(d.FullScreen,{size:14,isExpand:c}))),B.default.createElement("div",{className:"content"},"function"==typeof n?n(c):n)))},ra=({className:e,isMarryBaby:a,style:n,title:i,description:r,acceptText:s,cancelText:d,onAccept:c,onCancel:m,thumbnail:p,isThumbnailIcon:g,onClose:f,acceptBtnTracking:h,acceptBtnProps:v,cancelBtnProps:b})=>{const{data:{env:{isMarryBaby:x}}}=t.useContext(u.TogetherComponentGlobalContext),w="boolean"==typeof a?a:x,[y,E]=t.useState(!1);return t.useEffect((()=>(C.toggleNoScroll(!0),setTimeout((()=>E(!0)),0),()=>C.toggleNoScroll(!1))),[]),"undefined"==typeof window?null:D.createPortal(B.default.createElement(aa,{"data-is-marrybaby":w,className:e,style:n,"data-open":y},B.default.createElement(ia,{className:"popup-frame",isOpen:y,onClose:f},B.default.createElement("div",{className:"confirm-dialog",onClick:e=>e.stopPropagation()},B.default.createElement("div",{className:"confirm-content"},p&&B.default.createElement("div",{className:"thumbnail-container "+(g?"is-icon":"")},B.default.createElement("img",{className:"thumbnail",src:p})),B.default.createElement(k.Heading,{className:"title",tag:"h2"},i),B.default.createElement(o.Text,{className:"desc",size:"lg"},r),B.default.createElement("div",{className:"btn-group"},B.default.createElement(l.Button,Object.assign({theme:w?"marryBaby":"helloSites",size:"md",color:"tertiary",onClick:()=>{null==c||c(),null==f||f()}},v,h),s),B.default.createElement(l.Button,Object.assign({theme:w?"marryBaby":"helloSites",size:"md",onClick:()=>{null==m||m(),null==f||f()}},b),d)))),w&&p&&B.default.createElement("div",{className:"thumbnail-container is-mobile "+(g?"is-icon":"")},B.default.createElement("img",{className:"thumbnail",src:p})))),C.getPopupWrapperDom())},sa=V.default.div`
1758
- padding: 1rem;
1759
- border-top: 1px solid #f2f2f2;
1760
- &[data-is-reply='true'] {
1761
- padding-right: 0;
1762
- padding-left: 0;
1763
- border-top: 1px solid #e4e8ec;
1764
- margin-right: 1rem;
1765
- margin-left: 1rem;
1766
- }
1767
- .error-text {
1768
- padding: 1rem;
1769
- color: ${e=>e.theme.colors.red700};
1770
- }
1771
- .reply-to-container {
1772
- display: flex;
1773
- justify-content: space-between;
1774
- padding-bottom: 0.75rem;
1775
- margin-top: -0.25rem;
1776
- .icon-close-comment {
1777
- width: 16px;
1778
- height: 16px;
1779
- cursor: pointer;
1780
- }
1781
- a {
1782
- text-decoration: none;
1783
- }
1784
- }
1785
- .input-container {
1786
- display: flex;
1787
- align-items: center;
1788
- .avatar-wrapper {
1789
- display: flex;
1790
- flex-shrink: 0;
1791
- align-items: center;
1792
- margin-right: 0.5rem;
1793
- &.avatar-wrapper-reply {
1794
- width: 32px;
1795
- height: 32px;
1796
- .avatar {
1797
- width: 32px;
1798
- height: 32px;
1799
- }
1800
- }
1801
- }
1802
- .input-wrapper {
1803
- margin-right: 0.5rem;
1804
- &[data-has-error] {
1805
- .as-input {
1806
- border-color: ${e=>e.theme.colors.red700};
1807
- }
1808
- }
1809
-
1810
- .as-input {
1811
- .textarea {
1812
- width: 100%;
1813
- max-height: 225px;
1814
- min-height: 75px;
1815
- .ql-toolbar {
1816
- padding: 0;
1817
- }
1818
- .ql-editor {
1819
- padding-left: 0;
1820
- padding-right: 0;
1821
- }
1822
- .quill {
1823
- height: 0;
1824
- }
1825
- }
1826
- width: 100%;
1827
- padding: 12px 16px;
1828
- border: solid 1px ${e=>e.theme.colors.gray200};
1829
- border-radius: ${e=>e.theme.borderRadius};
1830
-
1831
- &:active,
1832
- &:focus {
1833
- border-color: ${e=>e.theme.colors.primaryBase};
1834
- box-shadow: 0px 0px 2px 2px
1835
- ${e=>e.theme.colors.primary200};
1836
- }
1837
-
1838
- &:disabled {
1839
- background-color: ${e=>e.theme.colors.gray100};
1840
- cursor: not-allowed;
1841
- }
1842
-
1843
- span {
1844
- &[data-error='true'] {
1845
- color: red;
1846
- text-decoration: underline;
1847
- }
1848
- }
1849
- }
1850
-
1851
- &[data-has-action-icon] {
1852
- .as-input {
1853
- padding: 12px 48px 12px 16px;
1854
- }
1855
- }
1856
- &[data-has-display-icon] {
1857
- .as-input {
1858
- padding: 12px 16px 12px 48px;
1859
- }
1860
- }
1861
-
1862
- &[data-has-action-icon][data-has-display-icon] {
1863
- .as-input {
1864
- padding: 12px 48px;
1865
- }
1866
- }
1867
-
1868
- &[data-size='lg'] {
1869
- .as-input {
1870
- font-size: 16px;
1871
- font-weight: ${e=>e.theme.sizes.fwRegular};
1872
- ${C.MediaQueries.mbDown} {
1873
- font-size: 22px;
1874
- line-height: 1.2;
1875
- }
1876
-
1877
- ${C.MediaQueries.mbUp} {
1878
- font-size: 26px;
1879
- line-height: 1.2;
1880
- }
1881
- }
1882
- }
1883
- &[data-size='md'] {
1884
- .as-input {
1885
- font-weight: ${e=>e.theme.sizes.fwRegular};
1886
- line-height: 22px;
1887
- ${C.MediaQueries.mbDown} {
1888
- font-size: 14px;
1889
- line-height: 1.2;
1890
- }
1891
-
1892
- ${C.MediaQueries.mbUp} {
1893
- font-size: 16px;
1894
- line-height: 1.2;
1895
- }
1896
- }
1897
- }
1898
- &[data-size='sm'] {
1899
- .as-input {
1900
- font-weight: ${e=>e.theme.sizes.fwRegular};
1901
- line-height: 20px;
1902
- ${C.MediaQueries.mbDown} {
1903
- font-size: 13px;
1904
- line-height: 1.5;
1905
- }
1906
-
1907
- ${C.MediaQueries.mbUp} {
1908
- font-size: 13px;
1909
- line-height: 1.5;
1910
- }
1911
- }
1912
- }
1913
- }
1914
- .images-input-label {
1915
- height: 100%;
1916
- cursor: pointer;
1917
- .icon-images-input {
1918
- width: 24px;
1919
- height: 24px;
1920
- vertical-align: middle;
1921
- }
1922
- }
1923
- .send-button {
1924
- display: flex;
1925
- width: 40px;
1926
- height: 40px;
1927
- flex-shrink: 0;
1928
- align-items: center;
1929
- justify-content: center;
1930
- padding: 0;
1931
- border: none;
1932
- &.send-button-post {
1933
- background: ${e=>e.theme.colors.neutral100};
1934
- border-radius: 50%;
1935
- }
1936
- .icon-enter {
1937
- width: 20px;
1938
- height: 20px;
1939
- vertical-align: middle;
1940
- }
1941
- &[data-is-loading='true'] {
1942
- > div {
1943
- display: flex;
1944
- align-items: center;
1945
- justify-content: center;
1946
- }
1947
- }
1948
- }
1949
- }
1950
- .preview-images-container {
1951
- margin-top: 1rem;
1952
- .image-src-wrapper {
1953
- position: relative;
1954
- width: 100%;
1955
- padding-top: 66.67%;
1956
- &:not(:last-child) {
1957
- margin-bottom: 1rem;
1958
- }
1959
- .preview-image {
1960
- position: absolute;
1961
- top: 0;
1962
- left: 0;
1963
- width: 100%;
1964
- height: 100%;
1965
- object-fit: cover;
1966
- }
1967
- .icon-close-circle {
1968
- position: absolute;
1969
- top: 10px;
1970
- right: 10px;
1971
- width: 20px;
1972
- height: 20px;
1973
- cursor: pointer;
1974
- }
1975
- }
1976
- }
1977
- `,da=t.createContext({});const ca=({isReply:a,className:n,onClose:r,replyToName:s,style:d,replyingId:c,replyingUser:m,onPostSuccess:f,post:h,isMarryBaby:v})=>{const{action:{pushNotifications:b,sanitizeFunction:x},data:{userInfo:w,locale:y,env:{isMarryBaby:C}}}=t.useContext(u.TogetherComponentGlobalContext),E="boolean"==typeof v?v:C,{t:k}=i.useTranslations(),{onSelectImages:A,onRemoveImage:N,imageSrcs:T,onRemoveAllImages:S,imageFiles:P}=Ft(),[L,M]=t.useState(""),{trigger:I}=t.useContext(da),[R,z]=t.useState(!1),j=t.useRef(null),F=t.useRef(null),O=t.useRef(null),[V,D]=t.useState([]),[U,_]=t.useState([]),[H,W]=t.useState(null);return t.useEffect((()=>{var e;null===(e=O.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout((()=>{var e;null===(e=F.current)||void 0===e||e.focus()}),400)}),[I]),B.default.createElement(sa,{"data-is-reply":a,className:n,style:d},a&&B.default.createElement("div",{className:"reply-to-container"},B.default.createElement(o.Text,{size:"p4"},B.default.createElement("span",{dangerouslySetInnerHTML:{__html:k("inputComment.replyTo",{name:`<span style="color: #2D87F3; cursor: pointer">@${s||""}</span>`})}})),B.default.createElement("img",{src:"data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8.00016' cy='8.50004' r='6.66667' fill='white' stroke='%23404040'/%3e%3cpath d='M10 6.5L6 10.5' stroke='%23404040' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M6 6.5L10 10.5' stroke='%23404040' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",className:"icon-close-comment",onClick:()=>r&&r()})),B.default.createElement("div",{className:"input-container",ref:O},B.default.createElement(u.UserAvatar,{className:"avatar-wrapper "+(a?"avatar-wrapper-reply":""),avatar:(null==w?void 0:w.id)?w.avatar:u.DEFAULT_AVATAR_IMG,username:(null==w?void 0:w.name)||(null==w?void 0:w.username)}),B.default.createElement("input",{ref:j,onChange:A,type:"file",multiple:!0,accept:"image/png,image/jpeg",name:"images",style:{display:"none"}}),B.default.createElement(g.Input,{value:L,name:"input",size:"md",className:"input-wrapper",displayIcon:B.default.createElement("img",{src:"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='M10.7543 4.85352H4.49227C4.01776 4.85352 3.56268 5.04201 3.22715 5.37754C2.89162 5.71307 2.70313 6.16815 2.70312 6.64266V19.1667C2.70313 19.6412 2.89162 20.0963 3.22715 20.4318C3.56268 20.7673 4.01776 20.9558 4.49227 20.9558H17.0163C17.4908 20.9558 17.9459 20.7673 18.2814 20.4318C18.6169 20.0963 18.8054 19.6412 18.8054 19.1667V12.9047' stroke='%232D87F3' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M17.4633 3.51187C17.8192 3.15599 18.3019 2.95605 18.8052 2.95605C19.3085 2.95605 19.7912 3.15599 20.147 3.51187C20.5029 3.86775 20.7029 4.35044 20.7029 4.85373C20.7029 5.35702 20.5029 5.83971 20.147 6.19559L11.6486 14.694L8.07031 15.5886L8.96489 12.0103L17.4633 3.51187Z' stroke='%232D87F3' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e"}),CustomInput:B.default.createElement("div",{className:"as-input"},B.default.createElement(Wt,{className:"textarea",html:L,onChange:M,onImagePickerClick:()=>{var e;return null===(e=j.current)||void 0===e?void 0:e.click()},bannedWords:U,onPreviewUrlChange:W,onInvalidUrlsChange:D,setEditorRef:e=>F.current=e,isReplying:a}))}),B.default.createElement(l.Button,{theme:E?"marryBaby":"helloSites",className:"send-button",size:"sm",onClick:()=>e.__awaiter(void 0,void 0,void 0,(function*(){var t,l,o,n,i,s,d,g,v;if((null==h?void 0:h.id)&&!R){z(!0);try{const w=e=>{M(""),S(),r&&r();const t=p.formatComment(e.data);"string"==typeof t.images&&(t.images=JSON.parse(t.images)),f&&f(t)},C=yield(({postId:t,message:a,photos:l,link:o,locale:n,sanitizeFunction:i,replyingUserId:r,replyingUserName:s,replyingId:d})=>e.__awaiter(void 0,void 0,void 0,(function*(){const e=new FormData;let c=It(a.replace(/(\&nbsp;)+/g," "),i);const m=Pt(c);return l&&l.length>0&&(yield Promise.all(null==l?void 0:l.map((e=>jt(e,n))))).filter(Boolean).slice(0,u.MAX_IMAGE_UPLOADS).forEach((t=>{e.append("images[]",t)})),o&&e.append("link",o),null==m||m.forEach((t=>{e.append("mention_ids[]",t)})),e.append("post_id",t),d&&e.append("parent_id",d),r&&(m.unshift(r),c=`[mention+id="${r}"+name="${(s||"").replace('"',"'")}"]${c}`,e.append("parent_user_id",String(r))),e.append("content",c),e.append("content",c),e})))(Object.assign({message:L,photos:P,postId:String(h.id),link:null==H?void 0:H.url,sanitizeFunction:x,locale:y},a&&c?{replyingUserId:String((null==m?void 0:m.id)||(null===(t=null==h?void 0:h.author)||void 0===t?void 0:t.id)||""),replyingId:c,replyingUserName:(null==m?void 0:m.name)||(null==m?void 0:m.username)||""}:{})),E=yield a&&c?((t,a)=>e.__awaiter(void 0,void 0,void 0,(function*(){return u.callApiWithAuth(u.getApiPath(u.PATHS.COMMENT.REPLY,{_locale:a}),"POST",{data:t})})))(C,y):((t,a)=>e.__awaiter(void 0,void 0,void 0,(function*(){return u.callApiWithAuth(u.getApiPath(u.PATHS.COMMENT.CREATE,{_locale:a}),"POST",{data:t})})))(C,y),A=null==E?void 0:E.data;(null==A?void 0:A.id)&&!(null===(o=null===(l=null==E?void 0:E.messages)||void 0===l?void 0:l.moderation)||void 0===o?void 0:o.type)?w(E):"banned"===(null===(i=null===(n=null==E?void 0:E.messages)||void 0===n?void 0:n.moderation)||void 0===i?void 0:i.type)?(b({title:k("notification.comment.blocked.title"),message:k("notification.comment.blocked.message"),type:"danger"}),E.messages.moderation.words&&_(E.messages.moderation.words)):"suspect"===(null===(d=null===(s=null==E?void 0:E.messages)||void 0===s?void 0:s.moderation)||void 0===d?void 0:d.type)?(b({title:k("notification.comment.suspect.title"),message:k("notification.comment.suspect.message"),type:"warning"}),M(""),S(),r&&r()):(null===(g=null==E?void 0:E.messages)||void 0===g?void 0:g.find((e=>{var t;return!!(null===(t=null==e?void 0:e.includes)||void 0===t?void 0:t.call(e,"suspend"))})))?(b({message:k("notification.suspend.message"),type:"warning"}),M(""),S(),r&&r()):b({title:"",message:(null===(v=null==E?void 0:E.messages)||void 0===v?void 0:v[0])||k("notification.comment.somethingWrong"),type:"danger"})}catch(e){b({title:"",message:k("notification.comment.somethingWrong"),type:"danger"})}z(!1)}})),isLoading:R,isDisabled:!!(null==V?void 0:V.length)||R||!L||(null==L?void 0:L.length)<2||!L.trim()},B.default.createElement("img",{src:"data:image/svg+xml,%3csvg width='20' height='21' viewBox='0 0 20 21' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M7.5 9.73438L3.75 13.4844L7.5 17.2344' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M16.25 4.73438L16.25 10.3026C16.25 11.1464 15.9208 11.9557 15.3347 12.5524C14.7487 13.1491 13.9538 13.4844 13.125 13.4844L3.75 13.4844' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",className:"icon-enter"}))),(null==V?void 0:V.length)?B.default.createElement("div",{className:"error-text"},k("notification.limitUrlDomain")):null,(!T||0===T.length)&&H&&B.default.createElement("div",{className:"link-preview-wrapper"},H.isFetching?B.default.createElement(Q,null):B.default.createElement(B.default.Fragment,null,B.default.createElement(K,{title:H.title,url:H.url||"#",image:H.image,noRefetch:!0}),B.default.createElement("img",{src:Qt,className:"icon-close",onClick:()=>W(null)}))),T&&T.length>0&&B.default.createElement("div",{className:"preview-images-container"},T.map(((e,t)=>B.default.createElement("div",{key:t,className:"image-src-wrapper"},B.default.createElement("img",{className:"preview-image",src:e}),B.default.createElement("img",{src:Qt,className:"icon-close-circle",onClick:()=>N(t)}))))))},ua=V.default.a`
1978
- * {
1979
- pointer-events: none;
1980
- }
1981
- `,ma=V.default.div`
1982
- padding: 1rem;
1983
- .share__social {
1984
- display: flex;
1985
- width: 100%;
1986
- align-items: center;
1987
- justify-content: center;
1988
-
1989
- & > ${ua} {
1990
- margin: 0 7px;
1991
-
1992
- & > img {
1993
- width: 32px;
1994
- height: 32px;
1995
- }
1996
- .__label {
1997
- display: none;
1998
- }
1999
- }
2000
- }
2001
-
2002
- .share__copy-link {
2003
- position: relative;
2004
- padding: 1rem 0.5rem 0;
2005
-
2006
- margin-top: 16px;
2007
- &::before {
2008
- position: absolute;
2009
- top: 0;
2010
- left: 0;
2011
- width: calc(100% + 2rem);
2012
- border-top: 1px solid
2013
- ${e=>e.theme.colors.neutral100};
2014
- margin-left: -1rem;
2015
- content: '';
2016
- }
2017
- .__label {
2018
- margin-bottom: 8px;
2019
- font-size: 11px;
2020
- font-weight: 400;
2021
- line-height: 17px;
2022
- text-align: left;
2023
- }
2024
-
2025
- .__input-group {
2026
- position: relative;
2027
- overflow: hidden;
2028
- width: 100%;
2029
- height: 40px;
2030
- border: 1px solid ${e=>e.theme.colors.gray200};
2031
- background: #fff;
2032
- border-radius: ${e=>e.theme.borderRadius};
2033
-
2034
- & > input {
2035
- width: 100%;
2036
- height: 100%;
2037
- padding: 0 16px;
2038
- border: none;
2039
- background: transparent;
2040
- color: ${e=>e.theme.colors.gray800};
2041
-
2042
- &:focus {
2043
- outline: none;
2044
- }
2045
- }
2046
-
2047
- .__copy {
2048
- position: absolute;
2049
- top: 0;
2050
- right: 0;
2051
- width: 71px;
2052
- height: 100%;
2053
- padding-left: 12px;
2054
- background: linear-gradient(
2055
- 90deg,
2056
- rgba(255, 255, 255, 0.1) 0%,
2057
- #fff 17%,
2058
- #fff 100%
2059
- );
2060
- color: ${e=>e.theme.colors.primaryBase};
2061
- cursor: pointer;
2062
- font-size: 14px;
2063
- font-weight: 400;
2064
- }
2065
- }
2066
- }
2067
-
2068
- &[data-is-marrybaby='true'] {
2069
- ${C.MediaQueries.mbDown} {
2070
- padding: 0.5rem;
2071
- }
2072
- .share__social {
2073
- justify-content: space-between;
2074
- & > a {
2075
- display: flex;
2076
- flex-direction: column;
2077
- align-items: center;
2078
- justify-content: center;
2079
- text-align: center;
2080
- ${C.MediaQueries.mbDown} {
2081
- margin: 0;
2082
- }
2083
- & > img {
2084
- margin-bottom: 0.8rem;
2085
- }
2086
- .__label {
2087
- display: initial;
2088
- }
2089
- }
2090
- }
2091
- .share__copy-link {
2092
- padding: 0;
2093
- &::before {
2094
- display: none;
2095
- }
2096
- .__label {
2097
- display: none;
2098
- }
2099
- .__input-group {
2100
- height: unset;
2101
- background-color: rgb(243, 243, 243);
2102
- border-radius: 16px;
2103
- & > input {
2104
- padding: 1rem;
2105
- }
2106
- .__copy {
2107
- background: linear-gradient(
2108
- 90deg,
2109
- rgba(255, 255, 255, 0.1) 0%,
2110
- #f3f3f3 17%,
2111
- #f3f3f3 100%
2112
- );
2113
- }
2114
- }
2115
- }
2116
- }
2117
- `;const pa=({className:e,trackingCategory:a="Together",style:l,shareUrl:n,title:r})=>{const{action:{pushNotifications:d},data:{env:{isMarryBaby:c}}}=t.useContext(u.TogetherComponentGlobalContext),{t:m}=i.useTranslations(),p=t.useRef(null),[g,f]=t.useState(!1),h=()=>{if(!(null==p?void 0:p.current))return;const e=document.createElement("textarea");e.value=p.current.value,document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e),p.current.focus(),f(!0),d({title:"",message:m("share.linkCopied"),type:"success"})};t.useEffect((()=>{h(),navigator.share&&navigator.share({title:r||"Read This Post",url:n}).then((()=>{d({title:"",message:m("share.linkShared"),type:"success"})})).catch(console.error)}),[]);const v=((e,t)=>t?[{icon:"data:image/svg+xml,%3csvg width='40' height='40' viewBox='0 0 40 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M35 9.58333V30.4167C35 32.9417 32.9417 35 30.4167 35H25.8333V23.3333H28.85C29.275 23.3333 29.6333 23.0167 29.6833 22.6L29.9917 20.1C30.025 19.8667 29.95 19.625 29.7917 19.45C29.6333 19.2667 29.4083 19.1667 29.1667 19.1667H25.8333V16.25C25.8333 15.3333 26.5833 14.5833 27.5 14.5833H29.1667C29.625 14.5833 30 14.2083 30 13.75V10.9333C30 10.5083 29.6667 10.15 29.2417 10.1083C29.1917 10.1 28.0167 10 26.525 10C22.8583 10 20.8333 12.1833 20.8333 16.1417V19.1667H17.5C17.0417 19.1667 16.6667 19.5417 16.6667 20V22.5C16.6667 22.9583 17.0417 23.3333 17.5 23.3333H20.8333V35H9.58333C7.05833 35 5 32.9417 5 30.4167V9.58333C5 7.05833 7.05833 5 9.58333 5H30.4167C32.9417 5 35 7.05833 35 9.58333Z' fill='url(%23paint0_linear)'/%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='20' y1='5' x2='20' y2='35' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%234DABF7'/%3e%3cstop offset='1' stop-color='%232668DA'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",name:"Facebook",href:`https://www.facebook.com/sharer.php?u=${e}`},{icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAACXBIWXMAACxLAAAsSwGlPZapAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAzTSURBVHgB7Z0JdFTVGce/776ZCQkBElLCksga9kU2FQQRSlGo1AYUKwpuVA91xdZqtVTx1ONyrIpKBesC1AO1WHsiPQcsoIig1oNgEEEMKonsIQkhk2WWd+/X+96YTEK2+2beSJJ5v3Nyst25c9/3v/f7vru8NwAODg4ODg4ODg4ODg4ODvEEgt0sohTwQbb86VJZ+0gQ1Ft+Tzm7WNeOIJZeA/ya0eCGlkspIuYTQC5xvk3TtBz5eynYiH0CLJSGBrEICG9syOC1GZ4BYt0CgAHdgEFrA3GVbPSjhjBgA9ELYPR4PzwCRItUil82GPzrbgV3h3at0Pi1YIhLpQj3QpREJ4DZ62ErgPm9WeaMAv2NW0BzazFwfeeGfCnElGhGQ+S98FYaCRaMf+X54Ft5E7A2ZHyD3oJoa4BMW0REZMaw2POHdAf+yf3AkhPalPFrE/FIiHQEKBs/NQnEOwvbtPENzJFARClWX2hdgN/Qc6rGBwJ6dg5A3y5t2vjV9JZfj4BFrBnGdD10SLX45UNA/88doGkYFwKYSFfUx4orsjgCxBLVkjLNFM/PAYwn4xsIIZTS8WrUBTDyfZCTLEXmjgXq3xU0iDcQb7QSC9QFCC0vKOFiQH+cEV89vxYpnHNlW1lwQWKyasnZI0HPTG3dM91oQE27VLWsupEQz1ctuviKuO39JmhhYqYugDDTrGYZ0BX40O7ggjiGQM1WBhZGACgFloWTpFQOMQjCapXR1EHx7X6sYqsAQzNAHxbn7scqtgpw5QjH/V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EW3y5ASReB7W9rP06GLrhgh9SM/nyk9QPxvSBVYck06A2tqzhfJpTZ8+YBHra0FLzU8RmiK1y4dIQBejpG5GltSWdsrypeuZAhEQ2WLcCml8DrMiFoF5XJTUVcYrbAsP+csnkraw4Pdr86N+iE89uE/GhCIZE3hrjQmhnh+h8Q2iW442RsIKlH6PnodI0Npp1C5NjoLW546MgEsVMCoa4xvY/UFuSywtV1QTrOToKzKeI9SyRwJCqVxhWQ2CLY3W8OEq7abmowzFZBloz2/sowzrEagIoL+oZe0dGAYnY2ENc+Ug3QZeyIGcPsornQ4ODg4ODg4ODg4ODg4ODmfzfz5w/2ZW/n9aAAAAAElFTkSuQmCC",name:"Zalo",href:`https://sp.zalo.me/share?href=${e}`},{icon:"data:image/svg+xml,%3csvg width='40' height='40' viewBox='0 0 40 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M35 30.8333C35 33.135 33.1342 35 30.8333 35H9.16667C6.865 35 5 33.135 5 30.8333V9.16667C5 6.865 6.865 5 9.16667 5H30.8333C33.1342 5 35 6.865 35 9.16667V30.8333Z' fill='%2303A9F4'/%3e%3cpath d='M30 14.2667C29.265 14.5925 28.3342 14.8983 27.5 15C28.3483 14.4967 29.6942 13.4483 30 12.5C29.2075 12.9658 27.7742 13.4633 26.8392 13.6433C26.0925 12.8517 25.0275 12.5 23.8475 12.5C21.5808 12.5 20 14.4208 20 16.6667V18.3333C16.6667 18.3333 13.4167 15.7942 11.3942 13.3333C11.0383 13.9342 10.8383 14.6375 10.8383 15.3808C10.8383 16.8967 12.2308 18.435 13.3333 19.1667C12.6608 19.1458 11.3875 18.6325 10.8333 18.3333C10.8333 18.3467 10.8333 18.3633 10.8333 18.3808C10.8333 20.3533 12.2175 21.6925 14.0933 22.0658C13.7508 22.16 13.3333 22.5 11.7267 22.5C12.2483 24.1125 14.8708 24.965 16.6667 25C15.2617 26.0892 12.7567 26.6667 10.8333 26.6667C10.5008 26.6667 10.3208 26.685 10 26.6475C11.815 27.7975 14.35 28.3333 16.6667 28.3333C24.2142 28.3333 28.3333 22.5683 28.3333 17.1917C28.3333 17.015 28.3275 16.4233 28.3183 16.25C29.125 15.6817 29.4517 15.0867 30 14.2667Z' fill='white'/%3e%3c/svg%3e",name:"Twitter",href:`https://twitter.com/intent/tweet?url=${e}`},{icon:"data:image/svg+xml,%3csvg width='41' height='40' viewBox='0 0 41 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M35.5 30.8333C35.5 33.135 33.635 35 31.3333 35H9.66667C7.36583 35 5.5 33.135 5.5 30.8333V9.16667C5.5 6.865 7.36583 5 9.66667 5H31.3333C33.635 5 35.5 6.865 35.5 9.16667V30.8333Z' fill='%230078D4'/%3e%3cpath opacity='0.05' d='M25.4993 30.8327V22.4168C25.4993 21.0093 24.8168 20.1685 23.6727 20.1685C22.9935 20.1685 22.4943 20.551 22.1902 21.3052C22.176 21.3585 22.156 21.576 22.1643 22.2335L22.166 30.8327H16.3327V14.9993H22.166V15.8835C23.0177 15.296 24.0618 14.9993 25.281 14.9993C29.0702 14.9993 31.3318 17.5768 31.3318 21.8943L31.3327 30.8327H25.4993ZM9.66602 30.8327V14.9993H12.5468C10.8777 14.9993 9.66602 13.7727 9.66602 12.0818C9.66602 10.3927 10.8977 9.16602 12.5943 9.16602C14.271 9.16602 15.4652 10.3585 15.4993 12.0652C15.4993 13.7685 14.2668 14.9993 12.5702 14.9993H15.4993V30.8327H9.66602Z' fill='black'/%3e%3cpath opacity='0.07' d='M25.9173 30.4173V22.4182C25.9173 20.774 25.0582 19.7532 23.674 19.7532C22.5948 19.7532 22.0615 20.5132 21.8048 21.1507C21.7365 21.3165 21.7457 21.9748 21.749 22.2557L21.7507 30.4173H16.7507V15.4173H21.7507V16.7823C22.4132 16.0965 23.4798 15.4173 25.2823 15.4173C28.8098 15.4173 30.9165 17.839 30.9165 21.8957L30.9173 30.4173H25.9173ZM10.084 30.4173V15.4173H15.084V30.4173H10.084ZM12.5482 14.584C11.1207 14.584 10.084 13.5323 10.084 12.0832C10.084 10.6348 11.1407 9.58398 12.5957 9.58398C14.0323 9.58398 15.0548 10.6082 15.084 12.0748C15.084 13.5323 14.0273 14.584 12.5715 14.584H12.5482Z' fill='black'/%3e%3cpath d='M10.5 15.8333H14.6667V30H10.5V15.8333ZM12.5708 14.1667H12.5475C11.3042 14.1667 10.5 13.24 10.5 12.0825C10.5 10.9 11.3292 10 12.595 10C13.8625 10 14.6433 10.9 14.6667 12.0825C14.6667 13.2392 13.8625 14.1667 12.5708 14.1667ZM30.5 30H26.3333V22.4175C26.3333 20.5858 25.3125 19.3358 23.6733 19.3358C22.4225 19.3358 21.7458 20.1792 21.4175 20.9942C21.2975 21.2858 21.3333 22.0925 21.3333 22.5V30H17.1667V15.8333H21.3333V18.0133C21.9342 17.0833 22.875 15.8333 25.2817 15.8333C28.2633 15.8333 30.4992 17.7083 30.4992 21.895L30.5 30Z' fill='white'/%3e%3c/svg%3e",name:"LinkedIn",href:`https://www.linkedin.com/sharing/share-offsite/?url=${e}`},{icon:"data:image/svg+xml,%3csvg width='40' height='40' viewBox='0 0 40 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M36.6673 19.584C36.6673 28.559 29.209 35.834 20.0007 35.834C18.6248 35.834 17.2923 35.6723 16.014 35.364C15.6265 35.2707 15.2215 35.3065 14.8648 35.4848L11.2173 37.309C10.2757 37.7798 9.16732 37.0948 9.16732 36.0415V32.6873C9.16732 32.2082 8.95315 31.7615 8.59982 31.4382C5.35482 28.4715 3.33398 24.259 3.33398 19.584C3.33398 10.609 10.7923 3.33398 20.0007 3.33398C29.209 3.33398 36.6673 10.609 36.6673 19.584Z' fill='url(%23paint0_radial)'/%3e%3cpath opacity='0.05' d='M29.16 14.4102C28.8033 14.4102 28.4575 14.5285 28.16 14.7527L23.415 18.2652C23.3041 18.3485 23.1816 18.3902 23.0525 18.3902C22.9275 18.3902 22.81 18.351 22.7108 18.2768L19.4008 15.7852C18.7275 15.2843 17.9341 15.0202 17.1033 15.0202C15.79 15.0202 14.5825 15.6793 13.8733 16.7835L12.8641 18.3593L9.43081 23.9385C9.10414 24.4502 9.07914 25.0818 9.37164 25.6168C9.66998 26.1618 10.2333 26.5002 10.8416 26.5002C11.1983 26.5002 11.5441 26.3818 11.8416 26.1577L16.5866 22.6452C16.6975 22.5618 16.82 22.5202 16.9491 22.5202C17.0741 22.5202 17.1916 22.5593 17.2908 22.6335L20.6008 25.1252C21.275 25.6268 22.0675 25.8902 22.8983 25.8902C24.2116 25.8902 25.4191 25.231 26.1283 24.1268L27.1375 22.551L30.5708 16.9718C30.8975 16.4602 30.9225 15.8285 30.63 15.2935C30.3316 14.7485 29.7683 14.4102 29.16 14.4102Z' fill='black'/%3e%3cpath opacity='0.07' d='M29.161 14.8262C28.8952 14.8262 28.636 14.9153 28.4118 15.0845L23.6643 18.5995C23.4843 18.7353 23.2743 18.8062 23.0543 18.8062C22.8385 18.8062 22.6343 18.7378 22.4627 18.6095L19.1518 16.117C18.5527 15.6712 17.8452 15.4362 17.1043 15.4362C15.9335 15.4362 14.8577 16.0237 14.2252 17.0087L13.2168 18.5845L9.78766 24.1578C9.54016 24.5453 9.52099 25.0187 9.73933 25.417C9.96099 25.822 10.3952 26.0837 10.8435 26.0837C11.1093 26.0837 11.3685 25.9945 11.5927 25.8253L16.3402 22.3103C16.5202 22.1745 16.7302 22.1037 16.9502 22.1037C17.166 22.1037 17.3702 22.172 17.5418 22.3003L20.8527 24.7928C21.4518 25.2387 22.1593 25.4737 22.9002 25.4737C24.071 25.4737 25.1468 24.8862 25.7793 23.9012L26.7877 22.3253L30.2168 16.752C30.4643 16.3645 30.4835 15.8912 30.2652 15.4928C30.0435 15.0878 29.6102 14.8262 29.161 14.8262Z' fill='black'/%3e%3cpath d='M28.6625 15.4168L23.9125 18.9334C23.4042 19.3168 22.7125 19.3168 22.2125 18.9418L18.9008 16.4493C17.5008 15.4076 15.5175 15.7659 14.5758 17.2326L13.5675 18.8076L10.1425 24.3743C9.64248 25.1576 10.6008 26.0493 11.3425 25.4909L16.0925 21.9743C16.6008 21.5909 17.2925 21.5909 17.7925 21.9659L21.1041 24.4584C22.5041 25.5001 24.4875 25.1418 25.4291 23.6751L26.4375 22.1001L29.8625 16.5334C30.3625 15.7501 29.4042 14.8584 28.6625 15.4168Z' fill='white'/%3e%3cdefs%3e%3cradialGradient id='paint0_radial' cx='0' cy='0' r='1' gradientUnits='userSpaceOnUse' gradientTransform='translate(9.23982 35.8157) scale(39.6767)'%3e%3cstop stop-color='%231292FF'/%3e%3cstop offset='0.079' stop-color='%232982FF'/%3e%3cstop offset='0.23' stop-color='%234E69FF'/%3e%3cstop offset='0.351' stop-color='%236559FF'/%3e%3cstop offset='0.428' stop-color='%236D53FF'/%3e%3cstop offset='0.754' stop-color='%23DF47AA'/%3e%3cstop offset='0.946' stop-color='%23FF6257'/%3e%3c/radialGradient%3e%3c/defs%3e%3c/svg%3e",name:"Messenger",href:`https://www.facebook.com/sharer.php?u=${e}`}]:[{icon:"data:image/svg+xml,%3csvg width='33' height='32' viewBox='0 0 33 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M30.7336 6.21933e-10H2.2536C1.28305 0.00703318 0.499975 0.795821 0.5 1.7664V30.2464C0.507033 31.217 1.29582 32 2.2664 32H17.5944V19.6256H13.4344V14.7808H17.5944V11.216C17.5944 7.0848 20.1192 4.832 23.8056 4.832C25.0498 4.8267 26.2933 4.8908 27.5304 5.024V9.344H24.9896C22.9832 9.344 22.5928 10.304 22.5928 11.696V14.7808H27.38L26.74 19.6256H22.58V32H30.7336C31.7092 32 32.5 31.2092 32.5 30.2336V1.7536C32.493 0.783047 31.7042 -2.54822e-05 30.7336 6.21933e-10Z' fill='%233B5998'/%3e%3c/svg%3e",name:"Facebook",href:`https://www.facebook.com/sharer.php?u=${e}`},{icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKoAAACqCAMAAAAKqCSwAAAC/VBMVEUAAAD////3+fwAc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E/KY8ItuJNil5XVLqlYniYkcA6G0jadKFyuICmsWzm7Ov+S3I8Hl+MNHdUUptPPPv/4+N7OzEIcgdEOtVCGPU4QG5e5bjxVef7OidiwXR9x1Xdw3HVMfvzO+VmnlgcIwdJFbwT4stIfqXAG/gaMVKEHOexx3ZhxpXHn8dhj4CpqzKGjggAw0enrdy7zPYQSSwmUgxDsC3T1iZ5RsTin+cKJWBHcF9RfYOGRNDzwQlfj6nme5Y/Z28k8LAmw6f2kPwrlf5IDisPBg29X57tpZdGs3ObW47G2PBZTi3PIVp2467eDs/dlgX3qcZ4rPefGFdVfmdWeW1Ma2uZny+XqvCxpYq4ote14WdeNhtmLs+JmRPukp0kkCWA7pWRPOviicfWLq4o7m+8cb/OTirgMqAdFfRL6amz8kRd3fFjaffPmze7DH+5oCQ2MBfvDmTR2GM0UuIvCJiTHH5l6uKu2Zv3BpnWNHY3rmg6ur6nt6p56pFceDncMqRGHjvqmuqNKoQpYTCZv0qRJPJ47jyeV8nhMagM7/fUZ5C53d3gyWD01yc8v1c+P/Al8Qi5qBH/00y01n/bjN+EqZgrVUf29VXut9bUFPJLa6qexcBQInj8k/a3zSaGv9EMFzSqFOk4DVetGtLgPqs81UHH1Q43VAxUgrkJUx9EG12kNVLHWrnuYARgNquZz2FH1f35Q9aqtYd8fNKyjDa5rarp+D4vOeJNihWEVWnUcdDaD6lb/h0VzNMyqhQqCiiF1uv9z+FHNB5srR9VgD9AIUK/d/7x4S01WCpU060TgqwZF/VvrcfHoKE1WasYaoILUGrAa0FmvaXKhOl5t8MOboGcNMysqBDANZddbp3W93QK978UW5uRQpUGj1a1rWi+MoMTRfg3HW3C8ArAOv7veuvX3tdP3AYlH4stNjJzV8hFNoUb8ehtLo3+3VR/pSH5plJG+iks80l9wZnSwJOggsBxjiQUUKC2toV9xiOvi/A/lszrbhFX1MAAAAABJRU5ErkJggg==",name:"Zalo",href:`https://sp.zalo.me/share?href=${e}`},{icon:"data:image/svg+xml,%3csvg width='33' height='32' viewBox='0 0 33 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect x='0.5' width='32' height='32' rx='4' fill='%231FA1F3'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M16.2304 13.2349L16.2709 13.8692L15.5965 13.7916C13.1417 13.4938 10.9972 12.484 9.17636 10.788L8.28615 9.94646L8.05688 10.5679C7.57128 11.9532 7.88154 13.4161 8.8931 14.4001C9.43262 14.9438 9.3112 15.0215 8.38057 14.6978C8.05688 14.5943 7.77362 14.5166 7.74662 14.5554C7.6522 14.646 7.97596 15.8241 8.23222 16.2902C8.58291 16.9376 9.29771 17.5719 10.08 17.9474L10.7409 18.2452L9.95865 18.2581C9.20329 18.2581 9.17636 18.271 9.25728 18.5429C9.52704 19.3844 10.5925 20.2777 11.7795 20.6661L12.6157 20.938L11.8873 21.3523C10.8084 21.9478 9.54054 22.2844 8.27265 22.3103C7.6657 22.3232 7.16667 22.375 7.16667 22.4139C7.16667 22.5433 8.81217 23.2684 9.76981 23.5531C12.6427 24.3947 16.0551 24.0322 18.6177 22.5951C20.4385 21.5724 22.2594 19.5398 23.1091 17.5719C23.5677 16.5232 24.0263 14.6072 24.0263 13.688C24.0263 13.0925 24.0667 13.0148 24.8221 12.3027C25.2671 11.8885 25.6853 11.4353 25.7662 11.3059C25.9011 11.0598 25.8876 11.0598 25.1997 11.28C24.0532 11.6683 23.8914 11.6166 24.4579 11.034C24.876 10.6197 25.375 9.86879 25.375 9.64873C25.375 9.60987 25.1727 9.67458 24.9434 9.79112C24.7007 9.92061 24.1612 10.1148 23.7565 10.2313L23.0282 10.4514L22.3673 10.0241C22.0031 9.79112 21.4906 9.53219 21.2208 9.45452C20.533 9.27327 19.4809 9.29918 18.8605 9.50628C17.1745 10.0889 16.109 11.5907 16.2304 13.2349Z' fill='white'/%3e%3c/svg%3e",name:"Twitter",href:`https://twitter.com/intent/tweet?url=${e}`},{icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKsAAACqCAMAAAD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ey3eiIkIcxBAuvbKVW86tACTD0FnoVZSrHE8UMYmowVjxsZ3oHLTZ5QvAtm7bK7X0XtdgY3C2QtSArHYJ/FuTojMpCeHkWoowC6aOpEQd1k0aKqKGwQqPGJFZ43EZ63xgmtNhBmrxPqhMqjgyFU+oAVlxxfolx72B8lymZbVH42pT0TTFrJ+2BDIfF81EqA07k2aBxVBDZD3qC55VUaoV9c6gqmgFkWWTrFhQqj29kmIWYY0LFX1qKkgaTs8ULNcioawQqCADZ2/SbSqiCOM5AlzFHI/0iirNq9woI6Vy7c7AbBqXpBhqSKy7cIJ1JhLP1U47gws7UMr5yFUsZofbnUwhXYkQmPxgcKnBGYUVgRBJaPVHYzCLLundLX783PuYhokEgZ4PoD4No4ycDx05uEm2bCjNKvBasipIEgFeB5XhJSElV9odu7qp2UMaJuvjo9VWztKdieQUKHJGqCiuUwuFAvBeDOp/z9oHRcuyisVhXz8f9SZgBjc1u6SIGl6uL+v1cVXTkJO2bqPN0NyGdG64Di8Aa5p2AlKUE1uabcaqAe+Cmfq4h+STYYg0EgSlnJ62dMibZEHipWA7iVXjg/Qe92XA2Dc4ERSEuC4vJUaBl5pdN1r9sM7o+4jBwvBzOJGW4kZwuqHAi240h84K3y6OdAsohgui0w1FvVfuoH0f5/X+tAEwTh/dNCkjugP2/rze//XJzff5urKCQnMA/a/uDE4ACGEgyAV8Swryew1YwKUGC7D2AxEuiZxfN9NAliXvHTMCvN+qHbcOUsy4MqmHxSObrLd+AjSKHdhm5HHl7IwLhFtsoQ8vL2hYYXXUNLfrUcPWVQqQMMOW6mr1xVKTCwMhDbLDQurisJiQ4+n94C90WdwggZwrgVw2TryTCBeOIzQaUWMojTiOKyyELW4k5ShuO+IgzsBNp97FeC7xv4vxBUzFmCaxFDSrAAAAAElFTkSuQmCC",name:"WhatsApp",href:`https://wa.me/?text=${e}`},{icon:"data:image/svg+xml,%3csvg width='33' height='32' viewBox='0 0 33 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect x='0.5' width='32' height='32' rx='4' fill='%230077B5'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.3571 9.07077C11.3349 7.97643 10.6126 7.14288 9.43969 7.14288C8.26679 7.14288 7.5 7.97643 7.5 9.07077C7.5 10.1425 8.24415 11 9.39516 11H9.4171C10.6126 11 11.3571 10.1425 11.3571 9.07077ZM11.3571 12.286H7.5V23.8574H11.3571V12.286ZM20.651 12.286C23.4224 12.286 25.5 13.9022 25.5 17.3748L25.4999 23.8571H21.2885V17.8086C21.2885 16.2894 20.6791 15.2526 19.1545 15.2526C17.991 15.2526 17.2979 15.9515 16.9935 16.6265C16.8822 16.8685 16.8548 17.2056 16.8548 17.5435V23.8574H12.6429C12.6429 23.8574 12.6984 13.6127 12.6429 12.5518H16.8548V14.1531C17.4138 13.3834 18.415 12.286 20.651 12.286Z' fill='white'/%3e%3c/svg%3e",name:"LinkedIn",href:`https://www.linkedin.com/sharing/share-offsite/?url=${e}`}])(n||"",c);return B.default.createElement(ma,{"data-is-marrybaby":c,className:e,style:l},B.default.createElement("div",{className:"share__social"},v.map(((e,t)=>B.default.createElement(ua,{key:t,"data-event-category":a,"data-event-action":`Social Share - ${e.name}`,"data-event-label":n,href:e.href,target:"_blank",rel:"noreferrer"},B.default.createElement("img",{src:e.icon}),B.default.createElement(o.Text,{className:"__label",size:"label2",type:"regular"},e.name))))),B.default.createElement("div",{className:"share__copy-link"},B.default.createElement(o.Text,{className:"__label",color:s.theme.colors.gray500,size:"p4",type:"regular"},m("orCopyLink")),B.default.createElement("div",{className:"__input-group"},B.default.createElement("input",{ref:p,type:"text",value:n,readOnly:!0,onFocus:e=>e.target.select()}),B.default.createElement("button",{className:"__copy",onClick:()=>h()},c?B.default.createElement("img",{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' xmlns:v='https://vecta.io/nano'%3e%3cg fill='%233e3f58'%3e%3cpath d='M19.726 8.537l-.632.151.632-.151zm0 4.65l-.632-.151.632.151zm-9.097-8.918l.146.633-.146-.633zm4.744 0l-.146.633.146-.633zm1.303 11.983a.65.65 0 1 0 .649 1.126l-.649-1.126zM6.041 7.23a.65.65 0 0 0 1.182.541L6.041 7.23zm13.053 1.459c.342 1.43.342 2.918 0 4.348l1.264.303c.39-1.629.39-3.324 0-4.953l-1.264.303zm-8.32-3.786a9.94 9.94 0 0 1 4.452 0l.291-1.267a11.24 11.24 0 0 0-5.035 0l.291 1.267zm4.452 0c1.925.443 3.419 1.913 3.867 3.786l1.264-.303c-.566-2.363-2.445-4.199-4.84-4.75l-.291 1.267zm2.099 12.476c1.505-.868 2.62-2.314 3.033-4.04l-1.264-.303c-.327 1.368-1.213 2.521-2.418 3.217l.649 1.126zM10.482 3.636c-1.988.457-3.62 1.799-4.442 3.594l1.182.541c.652-1.425 1.954-2.501 3.551-2.868l-.291-1.267z'/%3e%3cpath d='M3.274 16.187l-.632.151.632-.151zm0-4.65l-.632-.151.632.151zm13.451 0l-.632.151.632-.151zm0 4.65l.632.151-.632-.151zm-4.354 4.268l-.146-.633.146.633zm-4.744 0l-.146.634.146-.634zm0-13.186l.146.633-.146-.633zm4.744 0l-.146.633.146-.633zm-8.465 8.767c-.342-1.43-.342-2.918 0-4.348l-1.264-.303c-.39 1.629-.39 3.324 0 4.953l1.264-.303zm12.187-4.348c.342 1.43.342 2.918 0 4.348l1.264.303c.39-1.629.39-3.324 0-4.953l-1.264.303zm-3.867 8.133a9.94 9.94 0 0 1-4.452 0l-.291 1.267a11.24 11.24 0 0 0 5.035 0l-.291-1.267zM7.774 7.903a9.94 9.94 0 0 1 4.452 0l.291-1.267a11.24 11.24 0 0 0-5.035 0l.291 1.267zm0 11.919c-1.925-.443-3.419-1.913-3.867-3.786l-1.264.303c.565 2.363 2.445 4.199 4.84 4.75l.291-1.267zm4.744 1.267c2.395-.551 4.275-2.387 4.84-4.75l-1.264-.303c-.448 1.872-1.942 3.343-3.867 3.786l.291 1.267zm-.291-13.186c1.925.443 3.419 1.913 3.867 3.785l1.264-.303c-.566-2.363-2.445-4.199-4.84-4.75l-.291 1.267zM7.482 6.636c-2.395.551-4.275 2.387-4.84 4.75l1.264.303c.448-1.872 1.942-3.343 3.867-3.785l-.291-1.267zM12.268 21l.083-2.523c.079-.573.221-.867.433-1.075l-.91-.928c-.499.489-.712 1.104-.811 1.827-.096.702-.095 1.596-.095 2.699h1.3zm4.205-5.409c-1.126 0-2.035-.001-2.748.093-.731.096-1.354.303-1.85.79l.91.928c.214-.21.519-.352 1.11-.43.609-.08 1.416-.082 2.579-.082v-1.3z'/%3e%3c/g%3e%3cpath d='M7 11h3m-3 3h5' stroke='%233e3f58' stroke-width='1.3' stroke-linecap='round'/%3e%3c/svg%3e"}):m(g?"copied":"copy")))))},ga=({trackingCategory:e,className:l,style:n,url:r,avatar:s,text:d,onClose:c})=>{const{data:{env:{isMarryBaby:m}}}=t.useContext(u.TogetherComponentGlobalContext),{t:p}=i.useTranslations(),[g,f]=t.useState(!1);return t.useEffect((()=>(C.toggleNoScroll(!0),setTimeout((()=>f(!0)),0),()=>C.toggleNoScroll(!1))),[]),B.default.createElement(a.Portal,null,B.default.createElement(fa,{"data-is-marrybaby":m,className:l,style:n},B.default.createElement(ia,{className:"share-popup",isOpen:g,onClose:c,heading:p("bottomBar.share")},m?B.default.createElement(o.Text,{className:"share-mb-text",size:"sm"},p("article.shareOn")):B.default.createElement("div",{className:"custom-share__header"},s&&B.default.createElement("div",{className:"custom-share__header-image"},B.default.createElement("img",{src:s})),B.default.createElement("div",{className:"custom-share__header-info"},B.default.createElement(k.Heading,{tag:"h4"},d),B.default.createElement(o.Text,{className:"desc",size:"md"},r))),g&&B.default.createElement(pa,{trackingCategory:e,shareUrl:r||("undefined"!=typeof window?window.location.href:""),title:d}))))},fa=V.default.div`
2118
- .share-popup {
2119
- > div:first-child {
2120
- height: unset;
2121
- }
2122
- .close-button {
2123
- display: none;
2124
- }
2125
- .popup-content .header {
2126
- display: none;
2127
- }
2128
- }
2129
- .custom-share__header {
2130
- display: flex;
2131
- flex-wrap: no-wrap;
2132
- align-items: center;
2133
- padding: 1rem;
2134
- border-bottom: 1px solid
2135
- ${e=>e.theme.colors.neutral100};
2136
- margin-bottom: 16px;
2137
-
2138
- .custom-share__header-image {
2139
- width: 38px;
2140
- height: 38px;
2141
- flex-shrink: 0;
2142
- & > img {
2143
- width: 100%;
2144
- height: 100%;
2145
- object-fit: cover;
2146
- object-position: center;
2147
- }
2148
- }
2149
-
2150
- .custom-share__header-info {
2151
- flex: 1;
2152
- padding: 0 8px;
2153
- word-break: break-word;
2154
-
2155
- [data-tag='h4'] {
2156
- margin-bottom: 8px;
2157
- font-size: 14px;
2158
- font-weight: bold;
2159
- line-height: 14px;
2160
- }
2161
-
2162
- [data-size='md'] {
2163
- color: #a5a5a5;
2164
- font-size: 14px;
2165
- line-height: 14px;
2166
- }
2167
- }
2168
- }
2169
-
2170
- &[data-is-marrybaby='true'] {
2171
- .share-popup {
2172
- > div:first-child {
2173
- overflow: hidden;
2174
- border-radius: 1rem;
2175
- &[data-open='true'] {
2176
- ${C.MediaQueries.mbDown} {
2177
- max-width: unset;
2178
- width: 100%;
2179
- top: 100%;
2180
- transform: translate(-50%, -100%);
2181
- border-bottom-left-radius: 0;
2182
- border-bottom-right-radius: 0;
2183
- }
2184
- }
2185
- }
2186
- .close-button {
2187
- display: block;
2188
- }
2189
- .popup-content {
2190
- .header {
2191
- display: block;
2192
- padding: 1rem;
2193
- background-color: rgb(243, 243, 243);
2194
- }
2195
- .content {
2196
- padding-bottom: 1rem;
2197
- }
2198
- }
2199
- .share-mb-text {
2200
- margin: 1rem 1rem 0.5rem;
2201
- }
2202
- }
2203
- }
2204
- `,ha=V.default.div`
2205
- padding: 0 8px;
2206
- margin-top: 18px;
2207
-
2208
- .report-list {
2209
- margin-bottom: 18px;
2210
-
2211
- .report-item {
2212
- display: flex;
2213
- align-items: center;
2214
- margin-bottom: 10px;
2215
- font-weight: 600;
2216
-
2217
- & > img {
2218
- width: 12px;
2219
- height: 12px;
2220
- margin-right: 8px;
2221
- }
2222
-
2223
- .__label {
2224
- font-size: 14px;
2225
- }
2226
- }
2227
- }
2228
-
2229
- .report-submit {
2230
- width: 100%;
2231
- }
2232
- &[data-is-marrybaby='true'] {
2233
- padding: 0 1rem 1rem;
2234
- }
2235
- `;var va="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='M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14Z' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M8 5V8' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M8 11H8.00708' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";const ba=({className:a,style:n,reason:r,reasonText:d,onClose:c,postId:m})=>{const{data:{locale:p,env:{isMarryBaby:g}},action:{pushNotifications:f}}=t.useContext(u.TogetherComponentGlobalContext),{t:h}=i.useTranslations(),[v,b]=t.useState(!1);return B.default.createElement(ha,{"data-is-marrybaby":g,className:a,style:n},B.default.createElement("ul",{className:"report-list"},B.default.createElement("li",{className:"report-item"},B.default.createElement("img",{src:va}),B.default.createElement(o.Text,{className:"__label",color:s.theme.colors.gray800,size:"p4"},d))),B.default.createElement(l.Button,{theme:g?"marryBaby":"helloSites",className:"report-submit",size:"lg",color:"primary",isLoading:v,onClick:()=>e.__awaiter(void 0,void 0,void 0,(function*(){if(m&&!v){b(!0);try{const e=yield(({id:e,reason:t,locale:a})=>{const l=new FormData;return l.append("reason",t),u.callApiWithAuth(u.getApiPath(u.PATHS.POST.REPORT,{_locale:a,id:e}),"POST",{data:l})})({id:m,reason:r,locale:p});1===(null==e?void 0:e.status)&&(f({message:"Post reported",type:"success"}),c&&c())}catch(e){}b(!1)}}))},h("submit")))},xa=V.default.div`
2236
- padding: 0.5rem 1rem 1rem;
2237
- line-height: 1.5;
2238
- word-break: break-word;
2239
- .post-content-replying {
2240
- margin-right: 5px;
2241
- cursor: pointer;
2242
- display: inline-block;
2243
- &.tag-only {
2244
- margin-right: 0;
2245
- }
2246
- }
2247
- .post-content {
2248
- display: inline;
2249
- white-space: pre-wrap;
2250
- /* > *:first-child, */
2251
- > mention:first-child ~ * {
2252
- &:not(ul),
2253
- &:not(ol) {
2254
- display: inline-block;
2255
- }
2256
- }
2257
- > mention:first-child {
2258
- margin-right: 5px;
2259
- }
2260
- &.has-see-more {
2261
- *:last-child {
2262
- &:not(ul),
2263
- &:not(ol) {
2264
- display: inline;
2265
- }
2266
- }
2267
- }
2268
- img {
2269
- width: 100%;
2270
- height: unset;
2271
- }
2272
- ul,
2273
- ol {
2274
- list-style-position: inside;
2275
- padding-left: 1rem;
2276
- display: block;
2277
- }
2278
- ol {
2279
- list-style-type: decimal;
2280
- }
2281
- ul {
2282
- list-style-type: disc;
2283
- }
2284
- mention {
2285
- color: ${e=>e.mentionColor||"#1890ff"};
2286
- padding-right: 4px;
2287
- :hover {
2288
- text-decoration: underline;
2289
- }
2290
- }
2291
- }
2292
- `;var wa=a.createStyles((e=>({root:{mention:{color:e.fn.primaryColor()},a:{"&,&:visited,&:focus":{color:e.fn.primaryColor()}}}})));const ya=l=>{var{trackingCategory:o,url:n,className:r,style:s,replyingTo:d,mentionedUser:c,description:m,disableShortenContent:p,mentions:g=[],maxChars:f=1e3,hideShowAllBtn:h,styles:v}=l,b=e.__rest(l,["trackingCategory","url","className","style","replyingTo","mentionedUser","description","disableShortenContent","mentions","maxChars","hideShowAllBtn","styles"]);const{classes:x,theme:w}=wa(void 0,{name:"PostContent",styles:v}),[y,C]=t.useState(!1),{t:E}=i.useTranslations(),{authActionWrapper:k}=q(),[A,N]=t.useState(!1),T=Tt(Nt(m||"","display"),g),{action:{sanitizeFunction:S}}=t.useContext(u.TogetherComponentGlobalContext),P=t.useMemo((()=>{const e=S(T||"");if(p||y)return{showContent:e,hasSeeMore:!1};const t=e.slice(0,f),a=f-27*((t.match(/<\/div>/g)||[]).length-1),l=(t||"").slice(0,a<40?40:a),o=S(l.replace(/(<|<\/)( +|[a-zA-Z]*)$/gi,"")),n=o.length<e.length-10;return{showContent:n?o:e,hasSeeMore:n}}),[p,y,T]),L=(null==c?void 0:c.name)||d,M="expert"===(null==c?void 0:c.role)&&!!(null==c?void 0:c.partnerId);return B.default.createElement(B.default.Fragment,null,M&&B.default.createElement(Xe,{isOpen:A,onClose:()=>N(!1),expertId:String(null==c?void 0:c.partnerId)}),B.default.createElement(xa,Object.assign({className:`${x.root} ${r} no-replace-click`,style:s,mentionColor:w.fn.primaryColor()},b),L&&B.default.createElement(a.Anchor,{onClick:()=>M&&N(!0),className:"post-content-replying"},"@",L),(null==m?void 0:m.startsWith("[mention+id="))&&B.default.createElement("span",{className:"post-content-replying tag-only",style:{color:w.fn.primaryColor()}},"@"),B.default.createElement("span",{dangerouslySetInnerHTML:{__html:P.showContent},className:"post-content "+(P.hasSeeMore?"has-see-more":"")}),P.hasSeeMore&&!y&&B.default.createElement("span",null,"... ",!h&&B.default.createElement(a.Anchor,Object.assign({onClick:e=>{e.preventDefault(),e.stopPropagation(),k((()=>C(!0)))},className:"see-more-text"},o?{"data-event-category":o,"data-event-action":"See More Post Click","data-event-label":n}:{}),E("post.seeMore")))))},Ca=V.default.div`
2293
- padding: 14px 16px 14px 17px;
2294
- background: ${e=>e.bgColor};
2295
- border-left: 3px solid ${e=>e.highlight};
2296
-
2297
- ${C.MediaQueries.mbUp} {
2298
- padding: 12px 12px 12px 17px;
2299
- }
2300
- `,Ea=V.default.div`
2301
- display: flex;
2302
- `,ka=V.default.div`
2303
- font-size: 12px;
2304
- line-height: 18px;
2305
-
2306
- &[data-has-icon='true'] {
2307
- margin-left: 10px;
2308
- }
2309
- `,Aa=V.default.div`
2310
- flex-shrink: 0;
2311
- `,Na=V.default.div`
2312
- display: grid;
2313
- grid-gap: 3px;
2314
- grid-template-columns: 1fr 1fr;
2315
- grid-template-rows: auto;
2316
-
2317
- .img-wrapper {
2318
- position: relative;
2319
- overflow: hidden;
2320
- width: 100%;
2321
- padding-top: 56.25%;
2322
- grid-column: auto;
2323
-
2324
- & > img {
2325
- cursor: zoom-in;
2326
- }
2327
-
2328
- .img-preview-blur {
2329
- position: absolute;
2330
- top: 50%;
2331
- left: 50%;
2332
- width: 110%;
2333
- height: 110%;
2334
- /* Add the blur effect */
2335
- -webkit-filter: blur(8px);
2336
- filter: blur(8px);
2337
- object-fit: cover;
2338
- object-position: center;
2339
- opacity: 0.8;
2340
- transform: translate(-50%, -50%);
2341
- }
2342
- .img-preview {
2343
- position: absolute;
2344
- top: 0;
2345
- left: 0;
2346
- width: 100%;
2347
- height: 100%;
2348
- object-fit: contain;
2349
- object-position: center;
2350
- }
2351
- .img-more-overlay {
2352
- position: absolute;
2353
- top: 0;
2354
- left: 0;
2355
- display: flex;
2356
- width: 100%;
2357
- height: 100%;
2358
- align-items: center;
2359
- justify-content: center;
2360
- background: rgba(0, 0, 0, 0.5);
2361
- z-index: 4;
2362
- }
2363
- }
2364
- &[data-image-count='1'] {
2365
- .img-wrapper {
2366
- /* padding-top: 100%; */
2367
- grid-column: 1/3;
2368
- }
2369
- }
2370
- &[data-image-count='2'] {
2371
- .img-wrapper {
2372
- /* padding-top: 100%; */
2373
- }
2374
- }
2375
- &[data-image-count='3'] {
2376
- .img-wrapper {
2377
- &:first-child {
2378
- grid-column: 1/3;
2379
- }
2380
- }
2381
- }
2382
- &[data-image-count='4'] {
2383
- .img-wrapper {
2384
- /* padding-top: 100%; */
2385
- }
2386
- }
2387
- &[data-image-count='5'] {
2388
- grid-template-columns: repeat(6, 1fr);
2389
- .img-wrapper {
2390
- /* padding-top: 100%; */
2391
- grid-column: auto/ span 2;
2392
-
2393
- &:first-child {
2394
- padding-top: 56.25%;
2395
- grid-column: 1/4;
2396
- }
2397
- &:nth-child(2) {
2398
- padding-top: 56.25%;
2399
- grid-column: 4/7;
2400
- }
2401
- }
2402
- }
2403
-
2404
- &[data-is-marrybaby='true'] {
2405
- grid-gap: 8px;
2406
- .img-wrapper {
2407
- padding-top: 66.66%;
2408
- border-radius: 1rem;
2409
- .img-preview {
2410
- object-fit: cover;
2411
- }
2412
- }
2413
- &[data-image-count='3'] {
2414
- grid-template-columns: 1fr 1fr 1fr;
2415
- .img-wrapper {
2416
- &:first-child {
2417
- padding-top: 100%;
2418
- grid-column: 1/3;
2419
- grid-row: 1/3;
2420
- }
2421
- }
2422
- }
2423
- }
2424
- `,Ta=V.default.div`
2425
- position: fixed;
2426
- z-index: 999;
2427
- top: 0;
2428
- left: 0;
2429
- display: flex;
2430
- overflow: hidden;
2431
- width: 100vw;
2432
- height: 100vh;
2433
- flex-direction: column;
2434
- background: white;
2435
- opacity: 0;
2436
- pointer-events: none;
2437
- transition: opacity 0.2s linear;
2438
- &[data-open='true'] {
2439
- opacity: 1;
2440
- pointer-events: auto;
2441
- }
2442
- .top-bar {
2443
- position: relative;
2444
- padding: 20px 40px;
2445
- .icon-arrow-left {
2446
- position: absolute;
2447
- top: 50%;
2448
- left: 20px;
2449
- height: 24px;
2450
- width: 24px;
2451
- cursor: pointer;
2452
- transform: translateY(-50%);
2453
- }
2454
- }
2455
- .container {
2456
- flex: 1;
2457
- overflow-y: auto;
2458
- .img-preview {
2459
- width: 100%;
2460
- min-width: 100%;
2461
- margin-bottom: 0.5rem;
2462
- cursor: pointer;
2463
- max-height: 100%;
2464
- object-fit: cover;
2465
- }
2466
- }
2467
- `,Sa=V.default((t=>{var{icon:a,bgColor:l=s.theme.colors.yellow50,highlightColor:o=s.theme.colors.yellow800,message:n}=t,i=e.__rest(t,["icon","bgColor","highlightColor","message"]);return B.default.createElement(Ca,Object.assign({bgColor:l,highlight:o},i),B.default.createElement(Ea,null,a&&B.default.createElement(Aa,null,a),B.default.createElement(ka,{"data-has-icon":Boolean(a)},n)))}))`
2468
- margin-bottom: 16px;
2469
- `;const Pa=({className:e,style:l,authorName:n,images:r,onClose:s,onOpenSingleView:d})=>{const{t:c}=i.useTranslations(),[u,m]=t.useState(!1);return t.useEffect((()=>{setTimeout((()=>{m(!0)}),0)}),[]),B.default.createElement(a.Portal,null,B.default.createElement(Ta,{className:e,style:l,"data-open":u},B.default.createElement("div",{className:"top-bar"},B.default.createElement("img",{className:"icon-arrow-left",src:"data:image/svg+xml,%3csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M10.0508 18.0607L4.00078 12.0367L10.0508 6.01172' stroke='%23262626' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M4.00195 12.0352L19.002 12.0352' stroke='%23262626' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",onClick:s,alt:"go back"}),B.default.createElement(o.Text,{size:"p2",type:"bold",style:{textAlign:"center"}},c("previewPhotos.title",{name:n}))),B.default.createElement("div",{className:"container"},r.map(((e,t)=>B.default.createElement("img",{className:"img-preview",key:t,src:e,onClick:()=>null==d?void 0:d(t),alt:"post img"}))))),",")},La=V.default.div`
2470
- position: fixed;
2471
- z-index: 999;
2472
- top: 0;
2473
- left: 0;
2474
- display: flex;
2475
- width: 100%;
2476
- height: 100%;
2477
- flex-direction: column;
2478
- background: black;
2479
- opacity: 0;
2480
- pointer-events: none;
2481
- transition: opacity 0.2s linear;
2482
- &[data-open='true'] {
2483
- opacity: 1;
2484
- pointer-events: auto;
2485
- }
2486
- `,Ma=V.default.div`
2487
- padding: 1rem;
2488
- background: white;
2489
- .icon-close {
2490
- width: 26px;
2491
- height: 26px;
2492
- cursor: pointer;
2493
- }
2494
- `,Ia=V.default.div`
2495
- position: relative;
2496
- flex: 1;
2497
- overflow: hidden;
2498
- > img {
2499
- height: 100%;
2500
- width: 100%;
2501
- object-fit: contain;
2502
- object-position: center;
2503
- }
2504
- `,Ra=V.default.div`
2505
- --inner-padding: max(16px, 20%);
2506
- height: 100%;
2507
- position: absolute;
2508
- left: 0;
2509
- padding: 8px;
2510
- padding-right: var(--inner-padding);
2511
- display: flex;
2512
- align-items: center;
2513
- top: 0;
2514
- cursor: pointer;
2515
- &[data-right] {
2516
- padding-right: 8px;
2517
- padding-left: var(--inner-padding);
2518
- left: unset;
2519
- right: 0;
2520
- }
2521
- &[data-disabled='true'] {
2522
- cursor: not-allowed;
2523
- }
2524
- `,Ba=V.default.div`
2525
- border-radius: 50%;
2526
- background: rgba(0, 0, 0, 0.3);
2527
- display: flex;
2528
- align-items: center;
2529
- justify-content: center;
2530
- padding: 4px;
2531
- > img {
2532
- width: 16px;
2533
- height: 16px;
2534
- &[data-disabled='true'] {
2535
- opacity: 0.5;
2536
- }
2537
- }
2538
- ${C.MediaQueries.tdUp} {
2539
- padding: 8px;
2540
- > img {
2541
- width: 30px;
2542
- height: 30px;
2543
- }
2544
- }
2545
- `;var za="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='M6 12.8125L10 8.8125L6 4.8125' stroke='white' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";const ja=({initialViewIndex:e,images:l,onClose:o})=>{const[n,i]=t.useState(e),[r,s]=t.useState(!1);t.useEffect((()=>{setTimeout((()=>{s(!0)}),0)}),[]);const d=null==l?void 0:l[n],c=0===n,u=!(null==l?void 0:l.length)||n===(null==l?void 0:l.length)-1;return B.default.createElement(a.Portal,null,B.default.createElement(La,{"data-open":r&&!!d},B.default.createElement(Ma,null,B.default.createElement("img",{src:na,className:"icon-close",onClick:o,alt:"close"})),d&&n>=0&&B.default.createElement(B.default.Fragment,null,B.default.createElement(Ia,null,B.default.createElement("img",{className:"img-preview",src:d,alt:"post img open"}),B.default.createElement(Ra,{"data-disabled":c,onClick:()=>!c&&i(n-1)},B.default.createElement(Ba,null,B.default.createElement("img",{src:za,style:{transform:"rotate(180deg)"},alt:"left arrow","data-disabled":c}))),B.default.createElement(Ra,{"data-right":!0,"data-disabled":u,onClick:()=>!u&&i(n+1)},B.default.createElement(Ba,null,B.default.createElement("img",{src:za,alt:"right arrow","data-disabled":u})))))))},Fa=V.default.div`
2546
- position: absolute;
2547
- top: 0;
2548
- right: 0;
2549
- left: 0;
2550
- bottom: 0;
2551
- background: rgba(0, 0, 0, 0.4);
2552
- color: white;
2553
- display: flex;
2554
- align-items: center;
2555
- justify-content: center;
2556
- cursor: pointer;
2557
- `,Oa="hhgcomp-sensitivemask-inner",Va=d.getDefaultClassWrapper(Fa,Oa),Da=V.default.div``,Ua=V.default.div`
2558
- position: absolute;
2559
- bottom: 0;
2560
- left: 0;
2561
- width: 100%;
2562
- height: 100%;
2563
- z-index: 3;
2564
- background: white;
2565
- cursor: pointer;
2566
-
2567
- &,
2568
- * {
2569
- // transition: all 300ms;
2570
- transform-origin: bottom left;
2571
- }
2572
-
2573
- img {
2574
- transition: none;
2575
- }
2576
- .img-preview {
2577
- width: 100%;
2578
- }
2579
- &[data-is-blurred='true'] {
2580
- .img-preview {
2581
- /* Add the blur effect */
2582
- -webkit-filter: blur(24px);
2583
- filter: blur(24px);
2584
- }
2585
- }
2586
-
2587
- &[data-is-blurred='false'] {
2588
- background: transparent;
2589
- cursor: zoom-in;
2590
-
2591
- .${Oa} {
2592
- top: auto;
2593
- right: auto;
2594
- left: 8px;
2595
- bottom: 8px;
2596
- background: rgba(0, 0, 0, 0);
2597
- align-items: flex-end;
2598
- justify-content: flex-start;
2599
- }
2600
- }
2601
- `,_a=({image:e,showIcon:a=!0})=>{const[l,o]=t.useState(!0);return B.default.createElement(Ua,{"data-is-blurred":l,onClick:e=>l&&e.stopPropagation()},B.default.createElement("img",{loading:"lazy",className:"img-preview",src:e}),B.default.createElement(Va,{onClick:e=>{e.stopPropagation(),o(!l)}},a&&B.default.createElement(Da,null,l?B.default.createElement("svg",{width:"22",height:"20",viewBox:"0 0 22 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},B.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.71 2.5399C1.32 2.1499 1.32 1.5199 1.71 1.1299C2.1 0.739902 2.74 0.739902 3.13 1.1299L19.44 17.4599C19.83 17.8499 19.83 18.4799 19.44 18.8699C19.05 19.2599 18.42 19.2599 18.03 18.8699L15.31 16.1499C13.97 16.6699 12.52 16.9699 11 16.9699C6 16.9699 1.73 13.8599 0 9.4699C0.77 7.4999 2.06 5.7999 3.68 4.5099L1.71 2.5399ZM16 9.4699C16 6.7099 13.76 4.4699 11 4.4699C10.49 4.4699 10 4.5699 9.53 4.7099L7.36 2.5399C8.51 2.1699 9.73 1.9699 11 1.9699C16 1.9699 20.27 5.0799 22 9.4599C21.31 11.2199 20.21 12.7599 18.82 13.9899L15.76 10.9299C15.9 10.4699 16 9.9799 16 9.4699ZM11 14.4699C8.24 14.4699 6 12.2299 6 9.4699C6 8.6999 6.18 7.9699 6.49 7.3299L8.06 8.8999C8.03 9.0799 8 9.2699 8 9.4699C8 11.1299 9.34 12.4699 11 12.4699C11.2 12.4699 11.38 12.4399 11.57 12.3999L13.14 13.9699C12.49 14.2899 11.77 14.4699 11 14.4699ZM13.97 9.1399C13.82 7.7399 12.72 6.6499 11.33 6.4999L13.97 9.1399Z",fill:"white"})):B.default.createElement("svg",{width:"23",height:"16",viewBox:"0 0 23 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},B.default.createElement("path",{d:"M11.9999 0C5.14188 0 1.88558 5.87864 1.09558 7.55664C0.963582 7.83664 0.963582 8.16141 1.09558 8.44141C1.88558 10.1204 5.14188 16 11.9999 16C18.8339 16 22.0924 10.1629 22.8964 8.46094C23.0344 8.16794 23.0344 7.83206 22.8964 7.53906C22.0924 5.83706 18.8339 0 11.9999 0ZM11.9999 3C14.7609 3 16.9999 5.239 16.9999 8C16.9999 10.761 14.7609 13 11.9999 13C9.23888 13 6.99988 10.761 6.99988 8C6.99988 5.239 9.23888 3 11.9999 3ZM11.9999 5C11.2042 5 10.4412 5.31607 9.87856 5.87868C9.31595 6.44129 8.99988 7.20435 8.99988 8C8.99988 8.79565 9.31595 9.55871 9.87856 10.1213C10.4412 10.6839 11.2042 11 11.9999 11C12.7955 11 13.5586 10.6839 14.1212 10.1213C14.6838 9.55871 14.9999 8.79565 14.9999 8C14.9999 7.20435 14.6838 6.44129 14.1212 5.87868C13.5586 5.31607 12.7955 5 11.9999 5Z",fill:"#2D87F3"})))))},Ha=({className:e,images:a=[],style:l,authorName:o,isSensitive:n=!1})=>{const{data:{env:{isMarryBaby:r}}}=t.useContext(u.TogetherComponentGlobalContext),{t:s}=i.useTranslations(),d="+ "+((a.length||0)-4),[c,m]=t.useState(!1),[p,g]=t.useState(-1),f=a.length>5,h=t.useRef(!1);return t.useEffect((()=>()=>{h.current&&C.toggleNoScroll(!1)}),[]),t.useEffect((()=>{c||p>=0?(C.toggleNoScroll(!0),h.current=!0):(C.toggleNoScroll(!1),h.current=!1)}),[c,p]),B.default.createElement(B.default.Fragment,null,n&&B.default.createElement(Sa,{message:s("sensitiveMask.contentWarningDescription"),icon:B.default.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},B.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.00002 0.666748C4.40002 0.666748 0.666687 4.40008 0.666687 9.00008C0.666687 13.6001 4.40002 17.3334 9.00002 17.3334C13.6 17.3334 17.3334 13.6001 17.3334 9.00008C17.3334 4.40008 13.6 0.666748 9.00002 0.666748ZM9.00002 9.83341C8.54169 9.83341 8.16669 9.45841 8.16669 9.00008V5.66675C8.16669 5.20842 8.54169 4.83342 9.00002 4.83342C9.45835 4.83342 9.83335 5.20842 9.83335 5.66675V9.00008C9.83335 9.45841 9.45835 9.83341 9.00002 9.83341ZM8.16669 11.5001V13.1667H9.83335V11.5001H8.16669Z",fill:"#FE921D"}))}),B.default.createElement(Na,{className:e,style:l,"data-image-count":f?5:a.length||0,"data-is-marrybaby":r,"data-cursor-pointer":!n},null==a?void 0:a.slice(0,5).map(((e,t)=>{const a=4===t&&f;return B.default.createElement("div",{className:"img-wrapper",key:t,onClick:()=>{t>=4&&f?m(!0):g(t)}},n&&B.default.createElement(_a,{image:e,showIcon:!a}),!r&&B.default.createElement("img",{loading:"lazy",className:"img-preview-blur",src:e}),B.default.createElement("img",{loading:"lazy",className:"img-preview",src:e}),a&&B.default.createElement("div",{className:"img-more-overlay"},B.default.createElement(k.Heading,{tag:"h1",as:"h2",color:"white"},d)))}))),c&&B.default.createElement(Pa,{authorName:o||"",images:a,onClose:()=>m(!1),onOpenSingleView:g}),p>=0&&B.default.createElement(ja,{images:a,initialViewIndex:p,onClose:()=>g(-1)}))},Wa=V.default.div`
2602
- .link-info-container {
2603
- padding: 0.5rem 1rem;
2604
- background: ${e=>e.color||"#f4faff"};
2605
- }
2606
- .link-image-wrapper {
2607
- position: relative;
2608
- overflow: hidden;
2609
- width: 100%;
2610
- padding-top: 56.25%;
2611
- &.fetching {
2612
- background: lightgray;
2613
- }
2614
- .loading-spinner {
2615
- position: absolute;
2616
- top: 50%;
2617
- left: 50%;
2618
- transform: translate(-50%, -50%);
2619
- }
2620
- .link-image {
2621
- position: absolute;
2622
- top: 0;
2623
- left: 0;
2624
- width: 100%;
2625
- height: 100%;
2626
- object-fit: cover;
2627
- object-position: center;
2628
- }
2629
- }
2630
- a {
2631
- text-decoration: none;
2632
- }
2633
- &[data-is-marrybaby='true'] {
2634
- overflow: hidden;
2635
- border-radius: 1rem;
2636
- }
2637
- `,qa=({url:l,image:o,className:n,style:i,autoPlay:r=!0})=>{const{data:{locale:s}}=t.useContext(u.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}))),u.callApi(u.getApiPath(u.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 m=o||(null==d?void 0:d.image),p=(null==d?void 0:d.url)||l,g=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])||""})(p)),[p]),f=t.useMemo((()=>p.includes("facebook.com")||p.includes("fb.watch")),[p]),h=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&&(!h.current||Math.abs((h.current-t.width)/(null==t?void 0:t.width))>.2)&&(h.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 B.default.createElement(Wa,{className:`${n} no-replace-click`,style:i,ref:w,color:C.colors[C.primaryColor][0]},o||!g&&!f?B.default.createElement("a",{href:p,target:"_blank",rel:"noreferrer"},B.default.createElement("div",{className:"link-image-wrapper "+((null==d?void 0:d.isFetching)?"fetching":"")},(null==d?void 0:d.isFetching)?B.default.createElement(Q,{className:"loading-spinner"}):B.default.createElement("img",{className:"link-image",src:m||u.DEFAULT_IMG,onError:e=>{y.current||(y.current=!0,e.currentTarget.src=u.DEFAULT_IMG)}}))):B.default.createElement("div",{className:"link-image-wrapper"},g?B.default.createElement("iframe",{width:"100%",height:"100%",src:`https://www.youtube.com/embed/${g}?&autoplay=${r?1:0}&mute=1&enablejsapi=1`,frameBorder:"0",allowFullScreen:!0,style:{position:"absolute",top:0,left:0,border:"none",overflow:"hidden"}}):f?B.default.createElement("iframe",{key:String(b),src:`https://www.facebook.com/plugins/video.php?href=${encodeURIComponent(p)}&autoplay=${r?1:0}&show_text=false&t=0&width=${h.current}&height=${v.current}`,style:{position:"absolute",top:"50%",left:"50%",border:"none",overflow:"hidden",height:v.current,width:h.current,transform:"translate(-50%, -50%)"},scrolling:"no",frameBorder:"0",allowFullScreen:!0,allow:"autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"}):null))};var Za="PD6nRZX";const Ga=({className:e,size:t="md"})=>{const{t:a}=i.useTranslations();return B.default.createElement("div",{className:`${Za} ${e}`},B.default.createElement(l.Button,{size:t,color:"transparent",isLoading:!0},a("loading")))};var Qa="l5fL1xL",Xa="L-aGKo7";const Ka=({children:e,className:t=""})=>B.default.createElement("div",{className:`${Qa} ${t}`},e),$a=({children:e,className:t=""})=>B.default.createElement("div",{className:`${Xa} ${t}`},e);var Ya="eaR8ATZ",Ja="xM-7K0a",el="DZmf3s7";const tl=({src:e,defaultSrc:t=c.CommonGAssets.getAssetPath("logo/logomark.png"),ratio:a=1,size:l=80,radius:o=8,alt:n,className:i=""})=>B.default.createElement("div",{className:i},B.default.createElement("div",{className:el,style:{width:`${l}px`,height:l*a+"px",borderRadius:`${o}px`}},B.default.createElement(Be,{src:e,fallbackSrc:t,alt:n}))),al=({category:e,title:t,src:a,children:l,className:o=""})=>B.default.createElement("div",{className:`${Ya} ${o}`},B.default.createElement(tl,{src:a}),B.default.createElement("div",{className:Ja},l||B.default.createElement("div",null,e&&B.default.createElement(Ka,null,e),t&&B.default.createElement($a,null,t))));al.CategoryText=Ka,al.Title=$a;const ll=({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 B.default.createElement(al,{src:e,className:n},B.default.createElement(B.default.Fragment,null,B.default.createElement(al.CategoryText,null,null===(i=null==l?void 0:l[0])||void 0===i?void 0:i.name),B.default.createElement(al.Title,null,t),B.default.createElement(Ie,{avatarProps:Object.assign(Object.assign({},a),{size:32}),subTitle:B.default.createElement(B.default.Fragment,null,r,B.default.createElement(Ie.SubDivider,null),"Dec 12, 2022")})))};var ol={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 nl=t.createContext({}),il=({className:e=""})=>{var l,o,n,r,u;const{t:m}=i.useTranslations(),{info:p,isMarryBaby:g}=t.useContext(nl),f=null==p?void 0:p.data,h=[{type:"linkedin",icon:c.CommonGAssets.getAssetPath("linkedin.svg"),url:null===(l=null==p?void 0:p.contact)||void 0===l?void 0:l.linkedin},{type:"instagram",icon:c.CommonGAssets.getAssetPath("instagram.svg"),url:null===(o=null==p?void 0:p.contact)||void 0===o?void 0:o.instagram},{type:"facebook",icon:c.CommonGAssets.getAssetPath("facebook.svg"),url:null===(n=null==p?void 0:p.contact)||void 0===n?void 0:n.facebook},{type:"youtube",icon:c.CommonGAssets.getAssetPath("youtube.svg"),url:null===(r=null==p?void 0:p.contact)||void 0===r?void 0:r.youtube},{type:"tiktok",icon:c.CommonGAssets.getAssetPath("tiktok.svg"),url:null===(u=null==p?void 0:p.contact)||void 0===u?void 0:u.tiktok}],v=[...((null==p?void 0:p.experiences)||[]).length>0?[{key:"experience",heading:m("profilePanel.experience"),iconSrc:c.CommonGAssets.getAssetPath(g?"award-doc-mb.svg":"award-doc.svg"),panel:B.default.createElement("div",{className:ol.accBodyGroup},null==p?void 0:p.experiences.map(((e,t)=>B.default.createElement("div",{className:ol.accBodyGroupItem,key:String(t)},B.default.createElement("div",{className:ol.accBodyGroupTitle},e.title),B.default.createElement("div",{className:ol.accBodyGroupDesc},B.default.createElement("p",null,e.organization),B.default.createElement("p",null,e.duration))))))}]:[],...((null==p?void 0:p.educations)||[]).length>0?[{key:"education",heading:m("profilePanel.education"),iconSrc:c.CommonGAssets.getAssetPath(g?"book-mb.svg":"book.svg"),panel:B.default.createElement("div",{className:ol.accBodyGroup},null==p?void 0:p.educations.map(((e,t)=>B.default.createElement("div",{className:ol.accBodyGroupItem,key:String(t)},B.default.createElement("div",{className:ol.accBodyGroupTitle},e.schoolName),B.default.createElement("div",{className:ol.accBodyGroupDesc},B.default.createElement("p",null,e.study),B.default.createElement("p",null,e.completedYear))))))}]:[],...((null==p?void 0:p.awards)||[]).length>0?[{key:"awards",heading:m("profilePanel.awards"),iconSrc:c.CommonGAssets.getAssetPath(g?"award-mb.svg":"award.svg"),panel:B.default.createElement("div",{className:ol.accBodyGroup},null==p?void 0:p.awards.map(((e,t)=>B.default.createElement("div",{className:ol.accBodyGroupTitle,key:t},e.title))))}]:[]],b=(null==p?void 0:p.relatedPosts)||[],x=h.filter((e=>e.url));return B.default.createElement("div",{className:`${ol.container} ${e}`,"data-is-marrybaby":g},v.length>0&&B.default.createElement(a.Accordion,{defaultValue:v[0].key,chevron:g?B.default.createElement("div",{className:ol.mbChevronWrapper},B.default.createElement(d.Plus,{size:12,color:s.theme.mbColors.midGray})):B.default.createElement(d.Plus,{color:s.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"}}}},v.map((e=>B.default.createElement(a.Accordion.Item,{key:e.key,value:e.key},B.default.createElement(a.Accordion.Control,null,B.default.createElement("div",{className:ol.header},B.default.createElement("div",{className:ol.headingIcon},B.default.createElement("img",{src:e.iconSrc})),B.default.createElement("div",{className:ol.heading},e.heading))),B.default.createElement(a.Accordion.Panel,null,e.panel))))),b.length>0&&B.default.createElement("div",{className:ol.group},B.default.createElement("div",{className:ol.subTitle},B.default.createElement("img",{className:ol.subIcon,src:c.CommonGAssets.getAssetPath(g?"mb-logo.svg":"logo/circle-solid.svg")}),m("profilePanel.publishedArticles")),B.default.createElement("div",{className:`${ol.relatedList}`},null==p?void 0:p.relatedPosts.map((e=>B.default.createElement("a",{key:String(e.id),href:`${window.location.origin}${null==e?void 0:e.permalink}`,className:ol.articleCardLink},B.default.createElement(ll,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}))))))),x.length>0&&B.default.createElement("div",{className:ol.group},B.default.createElement("div",{className:ol.subTitle},B.default.createElement("img",{className:ol.subIcon,src:c.CommonGAssets.getAssetPath(g?"social-mb.svg":"social.svg")}),m("profilePanel.socialLinks")),B.default.createElement("div",{className:ol.groupBody},B.default.createElement(a.Flex,null,h.map(((e,t)=>e.url&&B.default.createElement("div",{className:ol.socialItem,key:t},B.default.createElement("a",{href:e.url,target:"_blank",rel:"noreferrer"},B.default.createElement("img",{src:e.icon,loading:"lazy",width:"32px"})))))))))};var rl={container:"GYUElSy",question:"_3C6QpT1",questionTitle:"_9M9VYL6",community:"_1RuSyv3",questionCard:"_1IG-eEp"};const sl=({post:e,className:a=""})=>{var l,o,n,r,s,d,c,m;const{t:p}=i.useTranslations(),{data:{userInfo:g,env:{togetherBasePath:f}}}=t.useContext(u.TogetherComponentGlobalContext),{authActionWrapper:h,authorProps:v}=t.useContext(nl),x=`${window.location.origin}${f}/${null===(l=null==e?void 0:e.community)||void 0===l?void 0:l.slug}/${null==e?void 0:e.slug}`;return B.default.createElement("div",{className:`${rl.container} ${a}`},B.default.createElement("div",{className:rl.header},B.default.createElement("div",{className:rl.question},p("profilePanel.question")," ",B.default.createElement(b.Anchor,{className:rl.questionTitle,href:"#",onClick:()=>{(null==g?void 0:g.id)||null==h||h((()=>window.location.href=x))}},"#",null==e?void 0:e.title)),B.default.createElement("div",{className:rl.community},null===(o=null==e?void 0:e.community)||void 0===o?void 0:o.name," - ",null==e?void 0:e.createdTime)),B.default.createElement("div",{className:rl.questionCard},B.default.createElement(st,Object.assign({className:"card-author"},v,{role:"user",avatarIcon:B.default.createElement(we,null),subLine:B.default.createElement(st.SubTextRow,null,B.default.createElement(st.SubText,null,null===(s=null===(r=null===(n=null==e?void 0:e.expertAnswer)||void 0===n?void 0:n.answer)||void 0===r?void 0:r[0])||void 0===s?void 0:s.createdTime))})),B.default.createElement(ya,{className:"post-content-wrapper",description:(null===(m=null===(c=null===(d=null==e?void 0:e.expertAnswer)||void 0===d?void 0:d.answer)||void 0===c?void 0:c[0])||void 0===m?void 0:m.content)||"",mentions:null==e?void 0:e.mentions,"data-testid":"Content of the Post"})),B.default.createElement(E.Button,{size:"md",onClick:()=>{(null==g?void 0:g.id)?window.location.href=x:null==h||h((()=>window.location.href=x))}},p("profilePanel.anserwing.viewFull")))};var dl="MrdoES3",cl="_8fd7YMs",ul="DomiQfw",ml="-b2qnfL";const pl=({message:e,buttonTxt:a,imgSrc:o,onBtnClick:n})=>{const{siteType:i,isMarryBaby:r}=t.useContext(nl);return B.default.createElement("div",{className:cl},B.default.createElement("div",{className:ul},B.default.createElement("img",{src:o||c.CommonGAssets.getAssetPath(r?"comments-mb.svg":"comments.svg")})),e&&B.default.createElement("div",{className:ml},e),a&&B.default.createElement(l.Button,{size:"md",theme:i,color:"secondary",onClick:n},a))},gl=({id:a})=>{const{t:l}=i.useTranslations(),{data:{locale:o}}=t.useContext(u.TogetherComponentGlobalContext),{authorProps:n}=t.useContext(nl),[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 u.callApi(u.getApiPath(u.PATHS.USER.LIST_ANSWERS,{_locale:o,id:a}),"GET"),l=((null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.replies)||[]).map(p.formatPost);s(l),c(!1)}))}),[]),B.default.createElement("div",{className:dl},d?B.default.createElement(Ga,null):null!==r&&(r.length>0?r.map((e=>B.default.createElement(sl,{className:"post-card",key:e.id,post:e}))):B.default.createElement(pl,{message:l("profilePanel.emptyPostMess.content",{name:(null==n?void 0:n.name)||(null==n?void 0:n.username)})})))},fl=t=>{var{size:a,color:l}=t,o=e.__rest(t,["size","color"]);return B.default.createElement("svg",Object.assign({width:a,height:a,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),B.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}))};fl.defaultProps={size:24,color:s.theme.colors.gray600};var hl="toEutn7",vl="drdisHs";const bl=a=>{var l,o,n,i,{post:r}=a,s=e.__rest(a,["post"]);const{data:{env:{togetherBasePath:d}}}=t.useContext(u.TogetherComponentGlobalContext);return B.default.createElement(B.default.Fragment,null,B.default.createElement("div",Object.assign({},s,{className:`${hl} ${(null==s?void 0:s.className)||""}`}),B.default.createElement(st,{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:B.default.createElement(st.SubTextRow,null,B.default.createElement(st.SubText,null,null==r?void 0:r.createdTime))}),B.default.createElement(b.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:vl,rel:"noreferrer"},null==r?void 0:r.title)))};var xl={accordion:"I-uIJ6E",header:"_41WRsj2",heading:"AcOGL93",headingIcon:"JD3dWJN",panel:"dKAgnS8",chevron:"L2Q9T6m",container:"h-pSmhX"};const wl=()=>{var l,o;const{t:n}=i.useTranslations(),{data:{locale:r,userInfo:d}}=t.useContext(u.TogetherComponentGlobalContext),{onSkipQuestion:m,countValues:g,setCountValues:f}=t.useContext(nl),[h,v]=t.useState(),[b,x]=t.useState([]),[w,y]=t.useState(!1),C=null==d?void 0:d.id;t.useEffect((()=>{C&&e.__awaiter(void 0,void 0,void 0,(function*(){var e;y(!0);const t=yield u.callApiWithAuth(u.getApiPath(u.PATHS.USER.LIST_QUESTION_NEED_REPLY,{_locale:r}),"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(p.formatPost),delete e.question,a.push(p.formatCommunity(e))})),x(a),v(l),y(!1)}))}),[]);const E=({id:e,communityId:t})=>{if(e&&t&&h){const a=Object.assign(Object.assign({},h),{[t]:[...((null==h?void 0:h[t])||[]).filter((t=>t.id!==e))]});let l=0;Object.keys(a).map((e=>l+=a[e].length||0)),v(a),f(Object.assign(Object.assign({},g),{total_question:l})),null==m||m(l)}};return B.default.createElement("div",{className:xl.container},w?B.default.createElement(Ga,null):(null==g?void 0:g.total_question)>0?b.length>0&&B.default.createElement(a.Accordion,{className:xl.accordion,defaultValue:String((null===(o=b[null===(l=Object.keys(b))||void 0===l?void 0:l[0]])||void 0===o?void 0:o.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:B.default.createElement("div",{className:xl.chevron},B.default.createElement(fl,{color:s.theme.colors.gray600,size:20}))},b.map((e=>{const t=h&&(null==h?void 0:h[e.id])||[];return t.length>0&&B.default.createElement(a.Accordion.Item,{key:e.id,value:String(e.id)},B.default.createElement(a.Accordion.Control,null,B.default.createElement("div",{className:xl.header},B.default.createElement("div",{className:xl.headingIcon},B.default.createElement("img",{src:e.thumbnail})),B.default.createElement("div",{className:xl.heading},e.name))),B.default.createElement(a.Accordion.Panel,null,B.default.createElement("div",{className:xl.body},t.map((e=>B.default.createElement(bl,{className:"question-card",key:e.id,post:e,onSkip:E}))))))}))):B.default.createElement(pl,{message:n("profilePanel.emptyCareMess.content"),imgSrc:c.CommonGAssets.getAssetPath("questions.svg")}))};var yl="GA-zc-O",Cl="A18McWD",El="IB049vj",kl="_8I--vEV";const Al=({post:e,className:a=""})=>{var l;const{data:{userInfo:o,env:{togetherBasePath:n}}}=t.useContext(u.TogetherComponentGlobalContext),{authActionWrapper:i,authorProps:r}=t.useContext(nl),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 B.default.createElement("div",{className:`${yl} ${a}`},B.default.createElement("div",{className:El},B.default.createElement("a",{className:kl,href:s,onClick:e=>{(null==o?void 0:o.id)||(e.preventDefault(),null==i||i((()=>window.location.href=s)))}}),B.default.createElement(Ie,{className:"card-author",avatarProps:{avatar:null==r?void 0:r.avatar,size:32}},B.default.createElement(st.MainText,{className:Cl},null==e?void 0:e.title),B.default.createElement(st.SubTextRow,null,B.default.createElement(st.SubText,null,null==e?void 0:e.createdTime))),B.default.createElement(ya,{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 Nl="TSMHoEM";const Tl=()=>{const{t:a}=i.useTranslations(),{data:{locale:l}}=t.useContext(u.TogetherComponentGlobalContext),{authorId:o,authorProps:n,isAuthorLogin:r,onCloseFromPost:s}=t.useContext(nl),[d,c]=t.useState(null),[m,g]=t.useState(!1);return t.useEffect((()=>{o&&e.__awaiter(void 0,void 0,void 0,(function*(){var e;g(!0);const t=yield u.callApi(u.getApiPath(u.PATHS.USER.LIST_POST,{_locale:l,id:o,isAnonymous:0}),"GET"),a=((null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.posts)||[]).map(p.formatPost);c(a),g(!1)}))}),[o]),B.default.createElement("div",{className:Nl},m?B.default.createElement(Ga,null):null!==d&&(d.length>0?d.map((e=>B.default.createElement(Al,{className:"post-card",key:e.id,post:e}))):B.default.createElement(pl,{message:a("profilePanel.emptyPostMess.content",{name:(null==n?void 0:n.name)||(null==n?void 0:n.username)||""}),buttonTxt:r&&a("profilePanel.createPost"),onBtnClick:()=>{null==s||s()}})))};var Sl="_4Vekw96",Pl="DIJdGcB",Ll="aQSt4-Q";const Ml=e=>e?{title:null==e?void 0:e.title,organization:null==e?void 0:e.organization,duration:e.duration}:{},Il=e=>e?{completedYear:null==e?void 0:e.completed_year,schoolName:e.school_name,study:e.study}:{};var Rl,Bl;exports.TabName=void 0,(Rl=exports.TabName||(exports.TabName={}))[Rl.About=0]="About",Rl[Rl.Care=1]="Care",Rl[Rl.Answer=2]="Answer",Rl[Rl.Posts=3]="Posts",function(e){e[e.Expert=0]="Expert",e[e.User=1]="User"}(Bl||(Bl={}));const zl=a=>{var l,o,{authorProps:n,selectedTab:r,authActionWrapper:s,onSkipQuestion:d,onCloseFromPost:c,hideQuestionTab:g,hideAnswerTab:f,showSkipQuestionTag:h,rolesToShowQuestionsTab:v=["expert"]}=a,b=e.__rest(a,["authorProps","selectedTab","authActionWrapper","onSkipQuestion","onCloseFromPost","hideQuestionTab","hideAnswerTab","showSkipQuestionTag","rolesToShowQuestionsTab"]);const{data:{locale:x,userInfo:w,env:{isMarryBaby:y}}}=t.useContext(u.TogetherComponentGlobalContext),{t:C}=i.useTranslations(),E=null==n?void 0:n.role,k=null==w?void 0:w.role,A=String(null==n?void 0:n.userId),[N,T]=t.useState(),[S,P]=t.useState(!1),[L,M]=t.useState(),I=(null==w?void 0:w._togetherUserId)===(null==n?void 0:n.userId),R=[...-1!==v.indexOf(E)?[{key:exports.TabName.About,name:C("profilePanel.tabs.highlight"),component:B.default.createElement(il,{id:A,info:L})}]:[{key:exports.TabName.Posts,name:C("profilePanel.tabs.posts"),component:B.default.createElement(Tl,null),hasCountResult:!0,keyOfCountApi:"post",keyOfResult:"total_post"}],...g||-1===v.indexOf(k)||(null==w?void 0:w._togetherUserId)!==(null==n?void 0:n.userId)?[]:[{key:exports.TabName.Care,name:`${C("profilePanel.tabs.care")}`,component:B.default.createElement(wl,null),hasCountResult:!0,keyOfCountApi:"question",keyOfResult:"total_question"}],...f||-1===v.indexOf(E)?[]:[{key:exports.TabName.Answer,name:`${C("profilePanel.tabs.expertAnswer")}`,component:B.default.createElement(gl,{id:A}),hasCountResult:!0,keyOfCountApi:"reply",keyOfResult:"total_reply"}]],[z,j]=t.useState(null),[F,V]=t.useState(null),D={initialTab:F,tabContent:z,onChange:e=>V(e),styles:e=>({label:{fontSize:e.fontSizes.sm,fontWeight:600}})},U=null==R?void 0:R.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;P(!0);const c=yield Promise.all([u.callApi(u.getApiPath(u.PATHS.USER.DETAIL,{_locale:x,id:A}),"GET"),...U.map((e=>u.callApi(u.getApiPath(u.PATHS.USER.COUNT_TABS,{_locale:x,id:A,[e.keyOfCountApi]:1}),"GET")))]),[m]=c,g={data:null==m?void 0:m.data,experiences:((null===(t=null===(e=null==m?void 0:m.data)||void 0===e?void 0:e.fields)||void 0===t?void 0:t.experiences)||[]).map(Ml),relatedPosts:((null===(a=null==m?void 0:m.data)||void 0===a?void 0:a.related_post)||[]).map((e=>p.formatArticle(e.post))),educations:((null===(o=null===(l=null==m?void 0:m.data)||void 0===l?void 0:l.fields)||void 0===o?void 0:o.educations)||[]).map(Il),awards:(null===(i=null===(n=null==m?void 0:m.data)||void 0===n?void 0:n.fields)||void 0===i?void 0:i.awards_accreditations)||[],contact:(null===(d=null===(s=null==m?void 0:m.data)||void 0===s?void 0:s.fields)||void 0===d?void 0:d.contact)||{}};1===(null==m?void 0:m.status)&&M(g);const f=(null==g?void 0:g.relatedPosts)||[],h=Object.keys(g.contact).map((e=>{var t;return""!==(null===(t=null==g?void 0:g.contact)||void 0===t?void 0:t[e])})),v=[...(null==g?void 0:g.experiences)||[],...(null==g?void 0:g.educations)||[],...(null==g?void 0:g.awards)||[]],b=f.length>0||h.length>0||v.length>0,w={},y=U.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?(w[e.keyOfResult]=n,e):-1!==[exports.TabName.Care,exports.TabName.Posts].indexOf(e.key)?e:void 0})).filter(Boolean).map((e=>e.key)),C=R.map((e=>{const t=Object.assign(Object.assign({},e),{name:e.name+(e.keyOfResult?` (${(null==w?void 0:w[e.keyOfResult])||"0"})`:"")});return t.hasCountResult?-1!==y.indexOf(t.key)?t:void 0:t.key===exports.TabName.About?b&&t:t})).filter(Boolean);j(C),V((()=>{if(!r)return 0;const e=null==C?void 0:C.findIndex((e=>e.key===r));return-1!==e?e:0})()),T(w),P(!1)}))}),[]);const _=null==L?void 0:L.data;return B.default.createElement(nl.Provider,{value:{isMarryBaby:y,siteType:y?"marryBaby":"helloSites",authorId:String((null==n?void 0:n.userId)||""),authActionWrapper:s,onSkipQuestion:d,info:L,authorProps:n,onCloseFromPost:c,countValues:N,setCountValues:T,isAuthorLogin:I,showSkipQuestionTag:h}},B.default.createElement("div",Object.assign({},b,{className:`${Sl} ${(null==b?void 0:b.className)||""}`,"data-is-marrybaby":y}),S?B.default.createElement(Ga,null):B.default.createElement(B.default.Fragment,null,B.default.createElement(st,Object.assign({},n,{className:"card-author",showDetailPopup:!1,subLine:"expert"===(null==n?void 0:n.role)?(null==_?void 0:_.specialty)&&(null==_?void 0:_.organisation)&&B.default.createElement(st.SubTextRow,null,(null==_?void 0:_.specialty)&&B.default.createElement(B.default.Fragment,null,B.default.createElement(st.SubText,null,null==_?void 0:_.specialty),B.default.createElement(st.SubDivider,null)),B.default.createElement(st.SubText,null,null==_?void 0:_.organisation)):(null==_?void 0:_.created_at)&&B.default.createElement(st.SubTextRow,null,B.default.createElement(st.SubText,null,C("profilePanel.joined")," ",O.default(null==_?void 0:_.created_at).toNow(!0)))})),"expert"===E&&B.default.createElement("div",{className:Pl,dangerouslySetInnerHTML:{__html:null===(l=null==L?void 0:L.data)||void 0===l?void 0:l.description}}),null!==z&&null!==F&&(z.length>0?B.default.createElement("div",{className:Ll},B.default.createElement(m.Tabs,Object.assign({},D)),null===(o=null==z?void 0:z[F])||void 0===o?void 0:o.component):B.default.createElement(pl,{message:C("profilePanel.emptyPostMess.content",{name:(null==n?void 0:n.name)||(null==n?void 0:n.username)||""})})))))};var jl=Object.freeze({__proto__:null,get TabName(){return exports.TabName},get UserType(){return Bl},TabDataInit:{experiences:[],relatedPosts:[],educations:[],awards:[],contact:{},data:{}},ProfileDetail:zl}),Fl="KsWg8i6",Ol="_9tS0EUN",Vl="kyyRKlb",Dl="-Uqqka-";var Ul="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",_l="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",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='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",Wl="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",ql="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",Zl="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 Gl=({authorEmail:a,onDeletePost:l,shareUrl:o,post:n,className:r="",popoverClassName:s="",onBookmark:d,onRemoveBookmark:m,onEditPost:p})=>{const{data:{locale:g,userInfo:f,togetherUserId:h,env:{isMarryBaby:v}},action:{pushNotifications:b}}=t.useContext(u.TogetherComponentGlobalContext),{t:x}=i.useTranslations(),[w,y]=t.useState(!1),[C,E]=t.useState(!1),[k,A]=t.useState(!1),{authActionWrapper:N}=q(),T=a&&(null==f?void 0:f.email)&&a===String(null==f?void 0:f.email);return B.default.createElement("div",{className:r,onClick:e=>{e.preventDefault(),e.stopPropagation()}},k&&B.default.createElement(ga,{url:o,text:null==n?void 0:n.title,onClose:()=>A(!1)}),C&&B.default.createElement(ra,{thumbnail:c.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==n?void 0:n.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 u.callApiWithAuth(u.getApiPath(u.PATHS.POST.DELETE,{id:t,_locale:a}),"DELETE")})))({id:n.id,locale:g});1===(null==t?void 0:t.status)&&(null==l||l())}catch(e){}y(!1)}})),onClose:()=>E(!1)}),B.default.createElement(ve,{className:s,toggleButtonContent:B.default.createElement("img",{src:v?Ul:Wl}),position:"bottom",align:"end",buttonProps:{isLoading:w},data:T?{isShowheader:!1,type:"list",list:[{icon:ql,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:p},{icon:Zl,label:x("actionPopover.delete"),onClick:()=>{N((()=>E(!0)))}}]}:{isShowheader:!1,type:"list",list:[{icon:ql,label:x("morePopover.share"),onClick:()=>A(!0)},{icon:(null==n?void 0:n.bookmarked)?_l:Hl,label:(null==n?void 0:n.bookmarked)?x("morePopover.unsavePost"):x("morePopover.savePost"),onClick:()=>{N((()=>e.__awaiter(void 0,void 0,void 0,(function*(){if((null==f?void 0:f.id)&&(null==n?void 0:n.id))if(null==n?void 0:n.bookmarked){const e=yield u.callApiWithAuth(u.getApiPath(u.PATHS.BOOKMARK.DELETE,{_locale:g}),"DELETE",{data:{post_id:String(n.id)}});1===(null==e?void 0:e.status)?(b({title:"",message:"Removed saved post",type:"success",displayIcon:Hl}),m&&m()):b({title:"",message:"Remove failed",type:"danger",displayIcon:Hl})}else{const e=yield u.callApiWithAuth(u.getApiPath(u.PATHS.BOOKMARK.CREATE,{_locale:g}),"POST",{data:{user_id:h||f.id,post_id:n.id}});1===(null==e?void 0:e.status)?(b({title:"",message:"Post saved",type:"success",displayIcon:_l}),d&&d()):b({title:"",message:"Post saved failed",type:"danger",displayIcon:Hl})}}))))}},{icon:va,label:x("morePopover.report"),subTree:{title:x("morePopover.report.title"),description:x("morePopover.report.description"),isShowheader:!0,type:"list",list:Object.keys(u.REPORT_REASON_MAP).map((e=>({label:u.REPORT_REASON_MAP[e].label,reason:u.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=>B.default.createElement(ba,{reason:e.reasonValue,reasonText:x(e.reason),postId:null==n?void 0:n.id,onClose:()=>t&&t(!1)})}})))}}]}}))},Ql=V.default.div`
2638
- position: relative;
2639
- margin-bottom: 24px;
2640
- background: white;
2641
- border-radius: ${e=>e.theme.borderRadius};
2642
-
2643
- a {
2644
- text-decoration: none;
2645
- }
2646
-
2647
- ${C.MediaQueries.mbDown} {
2648
- margin-bottom: 8px;
2649
- }
2650
- &.flat-top {
2651
- border-top-left-radius: 0;
2652
- border-top-right-radius: 0;
2653
- }
2654
-
2655
- .post-pin {
2656
- padding: 0.5rem 1rem;
2657
- border-radius: ${e=>e.theme.borderRadius} 6px 0 0;
2658
- }
2659
- .post-author {
2660
- display: flex;
2661
- align-items: center;
2662
- justify-content: space-between;
2663
- &.comment {
2664
- padding-right: 2.6rem;
2665
- }
2666
- .author-avatar-wrapper {
2667
- width: 40px;
2668
- height: 40px;
2669
- font-size: 20px;
2670
- ${C.MediaQueries.mbDown} {
2671
- width: 32px;
2672
- height: 32px;
2673
- font-size: 16px;
2674
- }
2675
- }
2676
- }
2677
- .post-content-link-wrapper {
2678
- color: inherit;
2679
- cursor: pointer;
2680
- .post-content-title {
2681
- padding: 1rem 1rem 0;
2682
- word-break: break-word;
2683
- }
2684
- }
2685
- .social-preview-wrapper.has-image {
2686
- margin-bottom: 5px;
2687
- }
2688
- .social-preview-wrapper,
2689
- .image-preview-wrapper,
2690
- .link-preview-wrapper {
2691
- width: 100%;
2692
- &[data-is-reply='true'] {
2693
- padding-right: 1rem;
2694
- padding-left: 1rem;
2695
- }
2696
- }
2697
- .post-topics {
2698
- padding: 0 1rem;
2699
- }
2700
-
2701
- .post-reaction {
2702
- background: none;
2703
- border-radius: 0 0 6px 6px;
2704
- &.hide-top-border {
2705
- ::before {
2706
- display: none;
2707
- }
2708
- }
2709
- }
2710
- .most-engaging-wrapper {
2711
- padding: 1rem;
2712
- cursor: pointer;
2713
- .author-avatar-wrapper {
2714
- width: 2rem;
2715
- height: 2rem;
2716
- font-size: 1rem;
2717
- }
2718
- .see-more-comments {
2719
- width: 100%;
2720
- padding: 12px 0 0;
2721
- text-align: unset;
2722
- }
2723
- }
2724
- &[data-most-engaging='true'] {
2725
- border: none;
2726
- ${C.MediaQueries.mbDown} {
2727
- margin: 1rem;
2728
- border: 1px solid #e4e8ec;
2729
- }
2730
- }
2731
- .top-divider {
2732
- border-color: #e4e8ec;
2733
- }
2734
- .popover {
2735
- .popover-menu__btn {
2736
- display: flex;
2737
- width: 1.5rem;
2738
- height: 1rem;
2739
- align-items: center;
2740
- justify-content: center;
2741
- padding: 0;
2742
- background: transparent;
2743
-
2744
- &:hover {
2745
- background-color: transparent;
2746
- }
2747
- }
2748
- .popover-menu__content {
2749
- &.--position-bottom {
2750
- &.--align-end {
2751
- &::before {
2752
- right: 12.5px;
2753
- }
2754
- }
2755
- }
2756
- }
2757
- }
2758
-
2759
- &[data-is-marrybaby='true'] {
2760
- border: 1px solid #f3f3f3;
2761
- border-radius: 1rem;
2762
- /* shadow */
2763
-
2764
- box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.08);
2765
- .image-preview-wrapper,
2766
- .link-preview-wrapper {
2767
- padding-right: 1rem;
2768
- padding-left: 1rem;
2769
- }
2770
- .popover {
2771
- .popover-menu__btn {
2772
- width: 24px;
2773
- height: 24px;
2774
- ${C.MediaQueries.mbDown} {
2775
- width: 18px;
2776
- height: 18px;
2777
- }
2778
- }
2779
- .popover-menu__content {
2780
- &.--position-bottom {
2781
- &.--align-end {
2782
- &::before {
2783
- right: 1rem;
2784
- }
2785
- width: 350px;
2786
- ${C.MediaQueries.mbDown} {
2787
- max-width: calc(320px - 2rem);
2788
- }
2789
- }
2790
- }
2791
- }
2792
- }
2793
- .most-engaging-wrapper {
2794
- position: relative;
2795
- padding: 0;
2796
- &::before {
2797
- position: absolute;
2798
- z-index: 5;
2799
- top: 0;
2800
- left: 50%;
2801
- width: calc(100% - 2rem);
2802
- height: 1px;
2803
- background: #f3f3f3;
2804
- content: ' ';
2805
- transform: translateX(-50%);
2806
- }
2807
- }
2808
- ${C.MediaQueries.mbDown} {
2809
- margin-bottom: 12px;
2810
- }
2811
- }
2812
- `;const Xl=({onDeleteComment:a,commentId:l,className:o="",popoverClassName:n=""})=>{const{data:{env:{isMarryBaby:r},locale:s},action:{pushNotifications:d}}=t.useContext(u.TogetherComponentGlobalContext),{t:c}=i.useTranslations(),[m,p]=t.useState(!1),{authActionWrapper:g}=q();return B.default.createElement("div",{className:o,onClick:e=>{e.preventDefault(),e.stopPropagation()}},m&&B.default.createElement(ra,{thumbnail:"data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0)'%3e%3cpath d='M2 4.00781H3.33333H14' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M5.33337 4.00846V2.67513C5.33337 2.32151 5.47385 1.98237 5.7239 1.73232C5.97395 1.48227 6.31309 1.3418 6.66671 1.3418H9.33337C9.687 1.3418 10.0261 1.48227 10.2762 1.73232C10.5262 1.98237 10.6667 2.32151 10.6667 2.67513V4.00846M12.6667 4.00846V13.3418C12.6667 13.6954 12.5262 14.0346 12.2762 14.2846C12.0261 14.5347 11.687 14.6751 11.3334 14.6751H4.66671C4.31309 14.6751 3.97395 14.5347 3.7239 14.2846C3.47385 14.0346 3.33337 13.6954 3.33337 13.3418V4.00846H12.6667Z' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M6.66663 7.3418V11.3418' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M9.33337 7.3418V11.3418' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0'%3e%3crect width='16' height='16' fill='white' transform='translate(0 0.0078125)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",isThumbnailIcon:!0,title:c("popup.deleteComment.title"),description:c("popup.deleteComment.description"),acceptText:c("popup.deletePost.accept"),cancelText:c("popup.deletePost.cancel"),onAccept:()=>e.__awaiter(void 0,void 0,void 0,(function*(){var e;if(!l)return;const t=yield(({id:e,locale:t})=>u.callApiWithAuth(u.getApiPath(u.PATHS.COMMENT.DELETE,{_locale:t,id:e}),"DELETE"))({id:l,locale:s});1===(null==t?void 0:t.status)?(a&&a(),d({title:"",message:c("notification.success"),type:"success"})):d({title:"",message:(null===(e=null==t?void 0:t.messages)||void 0===e?void 0:e[0])||c("notification.failure"),type:"danger"})})),onClose:()=>p(!1)}),B.default.createElement(ve,{position:"bottom",align:"end",data:{isShowheader:!1,type:"list",list:[{icon:Zl,label:c("actionPopover.delete"),onClick:()=>{g((()=>{p(!0)}))}}]},className:n,toggleButtonContent:B.default.createElement("img",{src:r?Ul:Wl}),buttonProps:{}}))},Kl=V.default.div`
2813
- .add-link {
2814
- color: ${s.theme.colors.primaryBase};
2815
- }
2816
- `,$l=V.default.div`
2817
- margin: 16px 0;
2818
- background: ${s.theme.colors.yellow50};
2819
- padding: 5px 10px;
2820
- border-radius: 2px;
2821
-
2822
- .icon {
2823
- display: inline-block;
2824
- vertical-align: middle;
2825
- margin-right: 6px;
2826
- }
2827
- `,Yl=V.default.div`
2828
- display: flex;
2829
- align-items: center;
2830
- gap: 8px;
2831
- `,Jl=V.default.div`
2832
- padding: 8px 16px;
2833
- `,eo=V.default.div`
2834
- margin-bottom: 12px;
2835
- width: 100%;
2836
- `,to=V.default.div``,ao=V.default.div`
2837
- margin-bottom: 16px;
2838
- `,lo=V.default.div`
2839
- display: flex;
2840
- flex-wrap: wrap;
2841
- row-gap: 16px;
2842
- ${C.MediaQueries.tdUp} {
2843
- align-items: center;
2844
- column-gap: 24px;
2845
- }
2846
- `,oo=V.default.a`
2847
- display: flex;
2848
- align-items: center;
2849
- gap: 16px;
2850
- ${C.MediaQueries.mbDown} {
2851
- width: 100%;
2852
- justify-content: space-between;
2853
- }
2854
- `,no=V.default.div`
2855
- display: flex;
2856
- align-items: center;
2857
- gap: 16px;
2858
- `,io=V.default.div`
2859
- border-radius: ${e=>e.theme.borderRadius};
2860
- overflow: hidden;
2861
- width: 48px;
2862
- height: 48px;
2863
- img {
2864
- object-fit: cover;
2865
- width: 100%;
2866
- height: 100%;
2867
- }
2868
- `,ro=({categories:e})=>{const{t:a}=i.useTranslations(),{data:{locale:l,env:{isMarryBaby:n}}}=t.useContext(u.TogetherComponentGlobalContext),r=L.getCurrentBaseUrl(l,n);return B.default.createElement(to,null,B.default.createElement(ao,null,B.default.createElement(k.Heading,{tag:"h6",as:"h5"},a("cardReply.recommentCategories.heading"))),B.default.createElement(lo,null,e.map((e=>B.default.createElement(oo,{href:r+e.permalink,key:String(e.termId),target:"_blank"},B.default.createElement(no,null,B.default.createElement(io,null,B.default.createElement("img",{src:e.featureImage||c.CommonGAssets.getAssetPath(n?"mb-logo.svg":"/logo/logomark.png"),alt:e.displayName})),B.default.createElement(o.Text,{size:"s3",type:"bold"},e.displayName)),B.default.createElement(v.Icon.ArrowRight,{size:20,color:s.theme.colors.gray400}))))))},so=V.default.a`
2869
- padding: 12px 0;
2870
- display: flex;
2871
- flex-direction: column;
2872
- gap: 8px;
2873
- border-top: 1px solid ${s.theme.colors.neutral100};
2874
- text-decoration: none;
2875
-
2876
- &:first-child {
2877
- border-top: 0;
2878
- }
2879
- `,co=V.default.div``,uo=({postTitle:e,articleReviewed:t,modifiedTime:a,href:l})=>{const{t:n}=i.useTranslations(),r=(()=>{const{expert:e,editor:a,is_author:l}=t;if(e){const t={name:e.display_name,role:"expert",avatar:e.avatar};return l?Object.assign({title:n("articleAuthor.title.written-by")},t):"expert"===e.role?Object.assign({title:n("articleAuthor.title.expert")},t):Object.assign({title:n("articleAuthor.title.medical")},t)}if(a)return{title:n("articleAuthor.title.fact-check"),name:a.display_name,avatar:a.avatar}})();return B.default.createElement(so,{href:l,title:e,target:"_blank"},B.default.createElement(o.Text,{size:"s3",as:"h5",type:"bold"},e),B.default.createElement(co,null,B.default.createElement(st,{avatar:null==r?void 0:r.avatar,avatarProps:{size:32},name:null==r?void 0:r.name,role:null==r?void 0:r.role,hideBackground:!0},B.default.createElement(st.SubTextRow,null,B.default.createElement(st.SubText,null,null==r?void 0:r.title," ",B.default.createElement("span",{style:{color:s.theme.colors.gray800}},null==r?void 0:r.name)),B.default.createElement(st.SubDivider,null),B.default.createElement(st.SubText,null,a)))))};var mo="F4mmgSy",po="A7QrQ7A";const go=n=>{var{listUrl:r,categorySlug:d,editMode:m,onListChange:f}=n,h=e.__rest(n,["listUrl","categorySlug","editMode","onListChange"]);const{t:b}=i.useTranslations(),[x,w]=t.useState(r||[]),[y,C]=t.useState([]),[E,A]=t.useState([]),[N,T]=t.useState(!1);t.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){T(!0);const e=x.map((e=>{const t=new URL(e),a=String(t.pathname).split("/").filter((e=>""!=e));return{isMarrySite:-1!==t.origin.search("marrybaby.vn"),path:a[a.length-1],href:e}})),t=[...e.map((e=>u.callApi(e.isMarrySite?u.getMarryBabyApiPath(u.DISCOVER_PATHS.GET_PREVIEW_ARTICLE,{fullSlug:e.path},!0):u.getDiscoverApiPath(u.DISCOVER_PATHS.GET_PREVIEW_ARTICLE,{fullSlug:e.path},!0),"GET")))],a=yield Promise.all(t);C(a.map(((t,a)=>{var l,o;return(null===(l=null==t?void 0:t.data)||void 0===l?void 0:l.post)&&Object.assign(Object.assign({},p.formatArticle(null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.post)),{href:e[a].href})})).filter(Boolean)),T(!1)}))}),[]),t.useEffect((()=>{0===(null==y?void 0:y.length)&&d&&e.__awaiter(void 0,void 0,void 0,(function*(){var e;const t=yield u.callApi(u.getDiscoverApiPath(u.DISCOVER_PATHS.GET_CATEGORY_OR_ARTICLE_DETAIL,{fullSlug:d},!0),"GET");(null==t?void 0:t.data)&&A([p.formatCategory(null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.category)])}))}),[y]);return t.useEffect((()=>{null==f||f(x)}),[x]),B.default.createElement("div",Object.assign({},h),!m&&B.default.createElement($l,null,B.default.createElement("img",{className:"icon",src:c.CommonGAssets.getAssetPath("warning.svg"),alt:"warning",style:{marginBottom:"3px",width:"18px"}}),B.default.createElement(o.Text,{size:"s3",as:"span",dangerouslySetInnerHTML:{__html:b("cardReply.disclaimer")}})),N?B.default.createElement(Q,null):y.length>0||m?B.default.createElement(Kl,null,B.default.createElement(a.Accordion,{defaultValue:"accordion",styles:{control:{padding:"16px",border:`1px solid ${s.theme.colors.neutral100}`,borderTopLeftRadius:"8px",borderTopRightRadius:"8px",'&[aria-expanded="false"]':{borderBottom:0}},chevron:{width:"32px",height:"32px"},content:{padding:0,border:`1px solid ${s.theme.colors.neutral100}`,borderTop:0,borderBottom:0},item:{marginBottom:"16px"}},chevron:B.default.createElement("div",{className:po},B.default.createElement(fl,{color:s.theme.colors.gray600,size:20}))},B.default.createElement(a.Accordion.Item,{value:"accordion"},B.default.createElement(a.Accordion.Control,null,B.default.createElement("div",{className:mo},B.default.createElement(k.Heading,{as:"h4",tag:"h6"},b("cardReply.source")))),B.default.createElement(a.Accordion.Panel,null,B.default.createElement(Jl,null,(y||[]).map(((e,t)=>B.default.createElement(Yl,{key:String(t)},"object"==typeof e?B.default.createElement(uo,Object.assign({},e)):B.default.createElement(eo,null,B.default.createElement(g.Input,{style:{width:"100%"},name:"source-list",value:e||"",size:"sm",onChange:e=>{w((a=>{const l=[...a];return l[t]=e,l})),C((a=>{const l=[...a];return l[t]=e,l}))}})),m&&B.default.createElement(l.Button,{size:"md",color:"transparent",icon:B.default.createElement(v.Icon.Trash,null),onClick:()=>(e=>{w((t=>{const a=[...t];return a.splice(e,1),a})),C((t=>{const a=[...t];return a.splice(e,1),a}))})(t)})))),m&&B.default.createElement(l.Button,{className:"add-link",color:"transparent",size:"md",icon:B.default.createElement(v.Icon.Plus,{color:s.theme.colors.primaryBase,size:18}),onClick:()=>{w((e=>[...e,""])),C((e=>[...e,""]))}},"Add source")))))):B.default.createElement(ro,{categories:E}))},fo=V.default.div`
2880
- position: relative;
2881
- margin-bottom: 0;
2882
- background: white;
2883
- border-radius: ${e=>e.theme.borderRadius};
2884
-
2885
- .verify-tag {
2886
- margin-top: 12px;
2887
- }
2888
-
2889
- .post-author {
2890
- &.with-popover {
2891
- padding-right: 2.6rem;
2892
- }
2893
- .author-avatar-wrapper {
2894
- width: 40px;
2895
- height: 40px;
2896
- font-size: 20px;
2897
- ${C.MediaQueries.mbDown} {
2898
- width: 32px;
2899
- height: 32px;
2900
- font-size: 16px;
2901
- }
2902
- }
2903
- }
2904
- .image-preview-wrapper,
2905
- .link-preview-wrapper {
2906
- width: 100%;
2907
- &[data-is-reply='true'] {
2908
- padding-right: 1rem;
2909
- padding-left: 1rem;
2910
- }
2911
- }
2912
- .post-reaction {
2913
- background: none;
2914
- border-radius: 0 0 6px 6px;
2915
- }
2916
- &[data-is-reply='true'] {
2917
- > .post-author .author-avatar-wrapper {
2918
- width: 20px;
2919
- height: 20px;
2920
- font-size: 10px;
2921
- }
2922
- }
2923
- &[data-is-reply='false'] {
2924
- border: 1px solid #e4e8ec;
2925
- }
2926
- .expert-wrapper {
2927
- width: 100%;
2928
- }
2929
- &[data-has-booking='true'] {
2930
- display: grid;
2931
- .post-author {
2932
- background-color: ${e=>e.theme.colors.primary50};
2933
- }
2934
- .btn-wrapper {
2935
- padding: 0 16px;
2936
- .btn-booking {
2937
- width: 100%;
2938
- margin: 12px 0;
2939
- }
2940
- }
2941
- }
2942
-
2943
- .comment-reply-wrapper {
2944
- padding: 0 1rem;
2945
- .more-cmt {
2946
- .chevron-right {
2947
- height: 1rem;
2948
- width: 1rem;
2949
- vertical-align: middle;
2950
- }
2951
- }
2952
- }
2953
- .top-divider {
2954
- border-color: #e4e8ec;
2955
- }
2956
- .popover {
2957
- position: absolute;
2958
- top: 1.5rem;
2959
- right: 1rem;
2960
- .popover-menu__btn {
2961
- display: flex;
2962
- width: 1rem;
2963
- height: 1rem;
2964
- align-items: center;
2965
- justify-content: center;
2966
- padding: 0;
2967
- background: transparent;
2968
-
2969
- &:hover {
2970
- background-color: transparent;
2971
- }
2972
-
2973
- .popover-menu__content {
2974
- &.--position-bottom {
2975
- &.--align-end {
2976
- &::before {
2977
- right: 12.5px;
2978
- }
2979
- }
2980
- }
2981
- }
2982
- }
2983
- }
2984
-
2985
- &[data-is-marrybaby='true'] {
2986
- &[data-is-reply='false'] {
2987
- border: none;
2988
- }
2989
- .image-preview-wrapper,
2990
- .link-preview-wrapper {
2991
- padding-right: 1rem;
2992
- padding-left: 1rem;
2993
- }
2994
- .popover {
2995
- .popover-menu__btn {
2996
- width: 24px;
2997
- height: 24px;
2998
- }
2999
- }
3000
-
3001
- margin-left: 56px;
3002
- ${C.MediaQueries.mbDown} {
3003
- margin-left: 40px;
3004
- }
3005
- > .post-author {
3006
- margin-left: -56px;
3007
- ${C.MediaQueries.mbDown} {
3008
- margin-left: -40px;
3009
- }
3010
- .author-info {
3011
- align-items: center;
3012
- display: flex;
3013
- align-items: center;
3014
- .author-info-top {
3015
- width: 100%;
3016
- }
3017
- .author-info-text-wrapper {
3018
- justify-content: space-between;
3019
- }
3020
- }
3021
- .author-avatar-wrapper {
3022
- width: 40px;
3023
- height: 40px;
3024
- font-size: 20px;
3025
- ${C.MediaQueries.mbDown} {
3026
- width: 24px;
3027
- height: 24px;
3028
- font-size: 12px;
3029
- }
3030
- }
3031
- }
3032
- &[data-is-reply] {
3033
- > .post-author {
3034
- .author-avatar-wrapper {
3035
- width: 40px;
3036
- height: 40px;
3037
- font-size: 20px;
3038
- ${C.MediaQueries.mbDown} {
3039
- width: 24px;
3040
- height: 24px;
3041
- font-size: 12px;
3042
- }
3043
- }
3044
- }
3045
- }
3046
-
3047
- .comment-reply-wrapper {
3048
- padding-right: 0;
3049
- padding-left: 0;
3050
- }
3051
- .post-reaction {
3052
- &::after {
3053
- position: absolute;
3054
- bottom: 0;
3055
- left: 50%;
3056
- width: calc(100% - 2rem);
3057
- height: 1px;
3058
- background: #f3f3f3;
3059
- content: ' ';
3060
- transform: translateX(-50%);
3061
- }
3062
- }
3063
- .post-content-wrapper {
3064
- padding-top: 0;
3065
- padding-bottom: 0;
3066
- ${C.MediaQueries.mbDown} {
3067
- padding-left: 0.5rem;
3068
- }
3069
- }
3070
-
3071
- ${C.MediaQueries.mbDown} {
3072
- margin-bottom: 12px;
3073
- }
3074
- }
3075
- `,ho=V.default(go)`
3076
- margin-top: 12px;
3077
- padding: 0.5rem 1rem 1rem;
3078
- `;var vo="-dzIuHr";const bo=({userId:e,avatar:a,name:o,role:n,title:r,className:d})=>{const{t:c}=i.useTranslations(),[u,m]=t.useState(!1);return B.default.createElement(B.default.Fragment,null,B.default.createElement(l.Button,{className:`${vo} ${d}`,color:"success",size:"xs",onClick:()=>m(!0),style:{padding:"5px 8px",marginBottom:"12px",borderRadius:"4px"}},B.default.createElement("span",{className:"text"},B.default.createElement(v.Icon.Endorse,{isSolid:!0,size:18,color:s.theme.colors.green800,className:"icon"}),c("cardReply.verifyBy",{name:`${o||""}`}))),B.default.createElement(nt,{open:u,onClose:()=>m(!1),profileModalProps:{zIndex:1e3}},B.default.createElement(zl,{authorProps:{userId:e,avatar:a,name:o,role:n,title:r},hideQuestionTab:!0})))};const xo=({className:a,style:o,comment:n,type:r="comment",level:s=0,replyingId:d,onPostCommentSuccess:c,post:p,onDeleteComment:g,refetchComment:f,hasQuickBookingEnable:h,handleMakeAppointment:v,cardAuthorProps:b,maxChars:x=600,disableShortenContent:w})=>{var C,E,k,A,N,T,S,P,L,M,I,R;const{data:{locale:z,userInfo:j,env:{isMarryBaby:F}}}=t.useContext(u.TogetherComponentGlobalContext),{t:O}=i.useTranslations(),[V,D]=t.useState(n||null),{id:U,countLikes:_,content:H,replies:Z=[],images:G=[],author:Q,liked:X,link:$,mentionedUser:Y,mentions:J}=V,{text:ee,replyingTo:te}=(e=>{try{const t=e.match(/\[@([^\]]+)\]/),a=t?t[0].replace("[@","").replace("]",""):"";return{text:e.replace(/\[@([^\]]+)\]/,"").trim(),replyingTo:a}}catch(e){}return{text:""}})(H),{authActionWrapper:le}=q({_joinCommunityIds:[null===(C=null==p?void 0:p.community)||void 0===C?void 0:C.id],_joinTopicIds:null===(E=null==p?void 0:p.topics)||void 0===E?void 0:E.map((e=>e.id))}),[oe,ne]=t.useState(4),ie=!!(null==j?void 0:j.id)&&(null==Z?void 0:Z.some((e=>e.author.id===j.id))),re=e=>{D((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 f&&f(a),a}return t}))},[de,ce]=t.useState(!1),ue=t.useMemo((()=>"comment"===r&&Z&&0!=Z.length?Z.sort(((e,t)=>{const a=new Date(e.createdAt).getTime(),l=new Date(t.createdAt).getTime();return a>l?-1:a<l?1:0})):Z),[r,Z]),me=(null==Z?void 0:Z.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)||"",fe=(null==Q?void 0:Q.username)||(null==Q?void 0:Q.name)||"",he=null==Q?void 0:Q.avatar,ve=(null==p?void 0:p.isAnonymous)||null==Q?void 0:Q.role,be=[...(null==p?void 0:p.isAnonymous)?[{id:(null===(k=null==p?void 0:p.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 u.callApi(u.getCarePath(u.CARE_PATHS.GET_HOSPITAL_INFO,{hospital_branch_id:t,website_url:y.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 u.callApi(u.getCarePath(u.CARE_PATHS.GET_DOCTOR_INFO,{doctorId:t,website_url:y.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=h&&(Ee||ke),Ne="chatbot"===(null===(A=null==V?void 0:V.author)||void 0===A?void 0:A.type);return B.default.createElement(W,{defaultParams:{_joinCommunityIds:[null===(N=null==p?void 0:p.community)||void 0===N?void 0:N.id],_joinTopicIds:null===(T=null==p?void 0:p.topics)||void 0===T?void 0:T.map((e=>e.id))}},B.default.createElement(fo,{className:a,style:o,"data-is-reply":!!s,"data-is-marrybaby":F,"data-has-booking":Ae},"reply"===r&&B.default.createElement(m.Divider,{className:"top-divider",type:"solid"}),B.default.createElement("div",{style:{padding:"16px 16px 0"}},B.default.createElement(st,Object.assign({avatar:he,name:ge,username:fe,timeText:null==p?void 0:p.createdTime,community:null==p?void 0:p.community,className:"post-author "+(pe?"with-popover":""),type:r,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==p?void 0:p.isAnonymous),hideBackground:Ne,userType:null==Q?void 0:Q.type},b)),Boolean(null==V?void 0:V.isVerify)&&!Boolean(null==V?void 0:V.isOppose)&&B.default.createElement(bo,{title:null===(S=null==V?void 0:V.userVerify)||void 0===S?void 0:S.title,name:null===(P=null==V?void 0:V.userVerify)||void 0===P?void 0:P.name,userId:null===(L=null==V?void 0:V.userVerify)||void 0===L?void 0:L.id,role:null===(M=null==V?void 0:V.userVerify)||void 0===M?void 0:M.role,avatar:null===(I=null==V?void 0:V.userVerify)||void 0===I?void 0:I.avatar,className:"verify-tag"})),B.default.createElement(ya,{className:"post-content-wrapper",replyingTo:te,mentionedUser:Y,description:ee,mentions:be,maxChars:x,disableShortenContent:w}),B.default.createElement("span",null),B.default.createElement("span",null),G&&G.length>0?B.default.createElement("div",{key:"image-preview",className:"image-preview-wrapper","data-is-reply":!0},B.default.createElement(Ha,{images:G,authorName:null==Q?void 0:Q.username})):null,G&&0!==G.length||!$?null:B.default.createElement("div",{key:"link-preview",className:"link-preview-wrapper","data-is-reply":!0},B.default.createElement(K,{url:$})),"most-engaging"!==r?B.default.createElement(B.default.Fragment,null,Ne&&B.default.createElement(ho,{listUrl:null==V?void 0:V.source,categorySlug:null==V?void 0:V.categorySlug}),B.default.createElement(se,{type:ae.reply,loveCount:_,replyCount:me,className:"post-reaction",liked:X,isReplied:ie,hideCommentIcon:"reply"===r||Ne,hasShare:!1,onCommentClick:()=>le((()=>ce((e=>!e)))),onCommentCountClick:()=>le((()=>{ce(!0)})),onLikeClick:()=>le((()=>e.__awaiter(void 0,void 0,void 0,(function*(){if(U){const t=yield(({commentId:t,setLike:a=!1,locale:l})=>e.__awaiter(void 0,void 0,void 0,(function*(){return u.callApiWithAuth(u.getApiPath(a?u.PATHS.COMMENT.LIKE:u.PATHS.COMMENT.UNLIKE,{_locale:l,id:t}),"GET")})))({commentId:U,setLike:!X,locale:z});1===t.status&&D((e=>Object.assign(Object.assign({},e),{liked:!X,countLikes:e.countLikes+(X?-1:1)})))}}))))}),de&&B.default.createElement(ca,{replyingId:d||V.id,replyToName:ge,isReply:!0,onClose:()=>ce(!1),onPostSuccess:e=>{"reply"===r?c&&c(e):re(e)},post:p,replyingUser:Q}),"comment"===r&&Z&&Z.length>0?B.default.createElement("div",{className:"comment-reply-wrapper"},null===(R=null==ue?void 0:ue.slice(0,oe))||void 0===R?void 0:R.map((e=>B.default.createElement(xo,{key:e.id,comment:e,type:"reply",className:"comment-reply-item",level:s+1,replyingId:U,onPostCommentSuccess:re,post:p,onDeleteComment:()=>{D((t=>Object.assign(Object.assign({},t),{replies:t.replies.filter((t=>t.id!==e.id)),countReplies:t.countReplies-1})))},handleMakeAppointment:v,hasQuickBookingEnable:h}))),me>oe&&B.default.createElement(B.default.Fragment,null,B.default.createElement(m.Divider,{className:"top-divider",type:"solid"}),B.default.createElement(l.Button,{className:"more-cmt",size:"lg",color:"ghost",onClick:()=>ne((e=>e+4))},O("comment.seeMoreReplies",{count:me-oe}),B.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&&B.default.createElement(Xl,{onDeleteComment:g,className:"popover",commentId:V.id})))},wo=(t,a)=>e.__awaiter(void 0,void 0,void 0,(function*(){var e,l,o;const n=yield u.callApiWithOptionalAuth(u.getApiPath(u.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(p.formatComment))||void 0===o?void 0:o[0]}));var yo=Object.freeze({__proto__:null});exports.CardAuthor=st,exports.CardLink=K,exports.CardPost=({className:a,style:o,hideViewMoreComment:n,showMostEngaging:r,onCommentClick:s,onCommentCountClick:d,onMostEngagingCommentClick:c,onPostCommentSuccess:m,disableCardLink:p,disableShortenContent:g,onDeletePost:f,onEditPost:h,post:v,mostEngagingComment:b,onDeleteComment:x,showInputComment:w,InlineCommentsComponent:y,hasQuickBookingEnable:C,handleMakeAppointment:E,cardAuthorProps:A})=>{const[N,T]=t.useState(v),[S,P]=t.useState(!1),[L,M]=t.useState(b),{community:I,topics:R,author:j,slug:F,isPin:O,liked:V,photos:D,mentions:U,title:_,description:H,previewUrl:Z,likesCount:G,commentsCount:Q,id:X,commented:$}=N,{data:{locale:Y,env:{isMarryBaby:J,togetherBasePath:ee}},action:{pushNotifications:te}}=t.useContext(u.TogetherComponentGlobalContext),{t:le}=i.useTranslations(),[oe,ne]=t.useState(w),ie=`${ee}/${(null==I?void 0:I.slug)||"_"}/${F||""}`,re=`${u.getCurrentBaseUrl(Y)}${ie}`,{authActionWrapper:de}=q((null==I?void 0:I.slug)?{_joinCommunityIds:[I.id],_joinTopicIds:null==R?void 0:R.map((e=>e.id))}:void 0),[ue,me]=t.useState(!1);t.useEffect((()=>{ne(w)}),[w]);const ge=(null==j?void 0:j.name)||(null==j?void 0:j.username)||"",fe=(null==j?void 0:j.username)||(null==j?void 0:j.name)||"",he=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 u.callApi(u.getCarePath(u.CARE_PATHS.GET_HOSPITAL_INFO,{hospital_branch_id:t,website_url:u.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 u.callApi(u.getCarePath(u.CARE_PATHS.GET_DOCTOR_INFO,{doctorId:t,website_url:u.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(X&&Q&&r&&!(null==b?void 0:b.id)){const e=yield wo(X,Y);M(e)}}))}),[X,Y,Q,r,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 wo(X,Y);M(e)}T((e=>Object.assign(Object.assign({},e),{commentsCount:e.commentsCount-1}))),x&&x(t)}));return B.default.createElement(W,{defaultParams:(null==I?void 0:I.slug)?{_joinCommunityIds:[I.id],_joinTopicIds:null==R?void 0:R.map((e=>e.id))}:void 0},S&&B.default.createElement(ga,{url:re,avatar:u.DEFAULT_IMG,text:_,onClose:()=>P(!1)}),B.default.createElement(Ql,{className:a,style:o,"data-is-marrybaby":J},O?B.default.createElement(pe,{className:"post-pin"}):null,B.default.createElement("div",{style:{position:"relative",padding:"1rem 1rem 0"}},B.default.createElement(st,Object.assign({avatar:he,name:ge,username:fe,url:p?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:E,"data-testid":"name",isAnonymous:!!(null==N?void 0:N.isAnonymous),extendEle:B.default.createElement(Gl,{authorEmail:String(null==j?void 0:j.email),onDeletePost:f,shareUrl:re,post:N,className:"popover",onEditPost:h})},A))),B.default.createElement("a",{href:p?void 0:ie,className:"post-content-link-wrapper"},_&&B.default.createElement(k.Heading,{className:"post-content-title",as:"h2",tag:"h5",fontWeight:"bold","data-testid":"Title of the Post"},z.default(_)),B.default.createElement(ya,{className:"post-content-wrapper",description:H,disableShortenContent:g,mentions:U,"data-testid":"Content of the Post"})),B.default.createElement("span",null),B.default.createElement("span",null),B.default.createElement("div",{key:"tag-topic"},R&&R.length>0?B.default.createElement(ce,{topics:R,className:"post-topics"}):null),B.default.createElement("div",{key:"social-preview"},(null==N?void 0:N.introUrl)?B.default.createElement("div",{className:"social-preview-wrapper "+((null==D?void 0:D.length)?"has-image":"")},B.default.createElement(qa,{url:N.introUrl,image:N.bannerImage})):null),B.default.createElement("div",{key:"image-preview"},(null==D?void 0:D.length)?B.default.createElement("div",{className:"image-preview-wrapper"},B.default.createElement(Ha,{images:D,authorName:null==j?void 0:j.name})):null),B.default.createElement("div",{key:"link-preview"},(null==N?void 0:N.introUrl)||(null==D?void 0:D.length)||!(null==Z?void 0:Z.url)?null:B.default.createElement("div",{className:"link-preview-wrapper"},B.default.createElement(K,{title:Z.title,url:Z.url,image:Z.image}))),B.default.createElement(se,{isMarryBaby:J,type:ae.post,loveCount:G,replyCount:Q,className:"post-reaction "+((null==D?void 0:D.length)||(null==Z?void 0:Z.url)?"hide-top-border":""),liked:ue?!V:V,isReplied:$,onCommentClick:()=>de((()=>{s?s():ne((e=>!e))})),onCommentCountClick:()=>{de((()=>{J?ne(!0):d?d():!p&&(window.location.href=ie)}))},onShareClick:()=>{P(!0)},onLikeClick:()=>e.__awaiter(void 0,void 0,void 0,(function*(){if(X&&!ue){me(!0);try{const t=yield(({id:t,locale:a})=>e.__awaiter(void 0,void 0,void 0,(function*(){if(t)return yield u.callApiWithAuth(u.getApiPath(u.PATHS.POST.LIKE,{id:t,_locale:a}),"GET")})))({id:X,locale:Y});1!==(null==t?void 0:t.status)?te(dt(le)):T((e=>Object.assign(Object.assign({},e),{likesCount:(e.likesCount||0)+(e.liked?-1:1),liked:!e.liked})))}catch(e){te(dt(le))}me(!1)}})),showingMostEngaging:!(!r||!(null==L?void 0:L.id))}),oe&&B.default.createElement(ca,{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}))),m&&m(e)},post:N}),r&&(null==L?void 0:L.id)?B.default.createElement("div",{className:"most-engaging-wrapper",onClick:e=>{c?(e.stopPropagation(),c()):window.location.href=ie}},B.default.createElement(xo,{hasQuickBookingEnable:C,handleMakeAppointment:E,comment:L,post:N,onDeleteComment:()=>{Ae&&Ae(L)},className:"most-engaging-comment",type:"most-engaging",key:L.id,cardAuthorProps:A}),Q>1&&!n&&B.default.createElement(l.Button,{className:"see-more-comments",color:"ghost",size:"md"},le("comment.seeMoreComments",{count:Q-1}))):null,y))},exports.CardPostPopoverMore=Gl,exports.CardReactions=se,exports.CardReply=xo,exports.CardReplyPopover=Xl,exports.Close=_,exports.CreateNewPostContent=({className:r,style:g,onPostCreatedEdited:f,onClose:h,communities:v=[],forceSelectCommunity:b,forceSelectTopics:x,articleId:w,optionalTopic:y,editPostData:E,defaultCommunity:k,defaultTopics:A,noFetchTopic:N,hideTopicList:T,selectAskDoctor:S,showAskDoctorOptions:P})=>{const L=!!(null==E?void 0:E.id),{data:{locale:M,env:{isMarryBaby:I}},action:{pushNotifications:R,sanitizeFunction:j}}=t.useContext(u.TogetherComponentGlobalContext),{t:F}=i.useTranslations(),[O,V]=t.useState(!1),[D,U]=t.useState(S),[_,H]=t.useState(!1),[W,q]=t.useState(!1),[Z,G]=t.useState(""),[Q,X]=t.useState(""),[K,$]=t.useState(b?{label:b.name,value:`${b.id||""}-${b.mappedCategoryId||""}`}:{label:F("community.choose"),value:""}),[Y,J]=t.useState([...x]||[]),[ee,te]=t.useState([]),[ae,le]=t.useState([]),oe=b||v.find((e=>`${e.id||""}-${e.mappedCategoryId||""}`===K.value)),ne=b?[b]:v.filter((e=>e.isActive)).sort(((e,t)=>e.name>t.name?1:e.name<t.name?-1:0)),[ie,re]=t.useState(null),[se,de]=t.useState([]),ce=Z&&z.default(Q)&&(y||!y&&Y.length>0)&&oe&&(!ee||ee.length<=u.MAX_IMAGE_UPLOADS)&&!(null==se?void 0:se.length)&&!W;t.useEffect((()=>{if(E){const e=E;G(e.title||""),X(Tt(Nt(e.description||"","edit"),e.mentions)),$({label:e.community.name,value:`${e.community.id||""}-${e.community.mappedCategoryId||""}`}),J(e.topics||[]),te(e.photos||[]),V(!!e.isAnonymous||!1),U(!!e.isAskDoctor||!1)}else k&&$({label:k.name,value:`${k.id||""}-${k.mappedCategoryId||""}`}),A&&J(A)}),[]);const ue=()=>e.__awaiter(void 0,void 0,void 0,(function*(){var t,a,l,o,n,i,r,s,d;if(P&&void 0===D)return H(!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:m,bannerUrl:p,scheduleTime:g,isAnonymous:f,isAskDoctor:h})=>e.__awaiter(void 0,void 0,void 0,(function*(){const e=new FormData,v=Mt(a),b=Mt(t),x=Pt(v);if(e.append("title",b),e.append("description",It(v,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",h?"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",C.safeEncodeURI(n.url)),(null==n?void 0:n.image)&&e.append("preview_image",C.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(jt(e,r))}),2e3*t)})))));null==t||t.filter(Boolean).slice(0,u.MAX_IMAGE_UPLOADS).forEach(((t,a)=>{e.append(`images[${a}]`,t)}))}else e.append("images","");return null==x||x.forEach((t=>{e.append("mention_ids[]",t)})),e.append("intro_url",m||""),e.append("banner",p||""),g&&(e.append("post_type","scheduled"),e.append("schedule_datetime",g)),e})))({title:Z,description:Q,communityId:String((null==oe?void 0:oe.id)||""),imageFiles:ee,previewUrl:ie,topicIds:null==Y?void 0:Y.map((e=>String(e.id||""))).filter(Boolean),locale:M,sanitizeFunction:j,categoryCommunityId:String((null==oe?void 0:oe.mappedCategoryId)||""),categoryTopicIds:null==Y?void 0:Y.map((e=>String(e.mappedCategoryId||""))).filter(Boolean),isAnonymous:O?1:0,isAskDoctor:D?1:0});let m;w&&c.append("article_id",w),L?(null==E?void 0:E.id)&&(m=yield(({id:t,locale:a,formData:l})=>e.__awaiter(void 0,void 0,void 0,(function*(){return yield u.callApiWithAuth(u.getApiPath(u.PATHS.POST.UPDATE,{id:t,_locale:a}),"POST",{data:l})})))({id:E.id,formData:c,locale:M})):m=yield(({locale:t,formData:a,isArticleComment:l})=>e.__awaiter(void 0,void 0,void 0,(function*(){return yield u.callApiWithAuth(u.getApiPath(l?u.PATHS.POST.CREATE_ARTICLE_COMMENT:u.PATHS.POST.CREATE,{_locale:t}),"POST",{data:a})})))({formData:c,locale:M,isArticleComment:!(null==oe?void 0:oe.id)&&!!(null==oe?void 0:oe.mappedCategoryId)});const g=null==m?void 0:m.data;(null==g?void 0:g.id)&&!(null===(a=null===(t=null==m?void 0:m.messages)||void 0===t?void 0:t.moderation)||void 0===a?void 0:a.type)?(R({message:F("createPost.popup.success"),type:"success"}),(e=>{f&&f(p.formatPost(e),L),h&&h()})(g)):"banned"===(null===(o=null===(l=null==m?void 0:m.messages)||void 0===l?void 0:l.moderation)||void 0===o?void 0:o.type)?(R({title:F("notification.post.blocked.title"),message:F("notification.post.blocked.message"),type:"danger"}),m.messages.moderation.words&&le(m.messages.moderation.words)):"suspect"===(null===(i=null===(n=null==m?void 0:m.messages)||void 0===n?void 0:n.moderation)||void 0===i?void 0:i.type)?(R({title:F("notification.post.suspect.title"),message:F("notification.post.suspect.message"),type:"warning"}),h&&h()):(null===(s=null===(r=null==m?void 0:m.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"))})))?(R({message:F("notification.suspend.message"),type:"danger"}),h&&h()):R({message:(null===(d=null==m?void 0:m.messages)||void 0===d?void 0:d[0])||F("notification.failure"),type:"danger"})}));return B.default.createElement(ct,{className:r,style:g},B.default.createElement("div",{className:"input-group-container"},B.default.createElement(Yt,{className:"input-group",bannedWords:ae,value:Z,onChange:G}),B.default.createElement(Xt,{className:"input-group",bannedWords:ae,value:Q,onChange:X,onPreviewUrlChange:re,onInvalidUrlsChange:de,onImageFilesChange:te,imageFiles:ee}),P&&B.default.createElement(ut,{"data-is-marry-baby":I},B.default.createElement("div",{className:"switch-label"},B.default.createElement(d.Ask,{isMarryBaby:I,size:I?32:24,color:s.theme.colors.primaryBase,className:"label-icon"}),B.default.createElement("span",{className:"label-txt"},F("createPost.askDoctor"))),B.default.createElement(m.BtnChoice,{value:D,choices:[{label:F("createPost.askDoctorChoice.yes"),value:!0},{label:F("createPost.askDoctorChoice.no"),value:!1}],onChange:e=>{"boolean"==typeof e&&(H(!1),U(e))}})),_&&B.default.createElement(mt,null,B.default.createElement(pt,{color:s.theme.colors.red700,size:14}),B.default.createElement(o.Text,{size:"p3",as:"span",color:s.theme.colors.red700},F("createPost.message.askDoctorRequire"))),B.default.createElement("div",{className:"input-group"},B.default.createElement(o.Text,{size:"p4",className:"input-group-label"},F("admin.community")),B.default.createElement(n.Dropdown,{options:(null==ne?void 0:ne.map((e=>({label:e.name,value:`${e.id||""}-${e.mappedCategoryId||""}`}))))||[],id:"community-picker",placeholder:F("community.choose"),value:K,onChange:e=>{$({label:e.label,value:String(e.value)}),J([])},disabled:!!b}),B.default.createElement(o.Text,{size:"sm",className:"warning",color:s.theme.colors.gray400},"* ",F("commentPopup.warning.newPost"))),!T&&B.default.createElement("div",{className:"input-group"},B.default.createElement(o.Text,{size:"p4",className:"input-group-label"},F("tab.topic")),B.default.createElement("div",{className:"input-notification"},B.default.createElement("img",{src:oe?"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":gt}),B.default.createElement(o.Text,{size:"base",color:s.theme.colors.gray500},F(oe?"createPost.popup.primary":"createPost.popup.warning"))),oe&&B.default.createElement(ea,{className:"tag-list",communityId:oe.id,forceTopics:x,onChange:J,selectedTopics:Y,noFetch:N}))),B.default.createElement("div",{className:"form-action"},B.default.createElement("div",{className:"input-group"},B.default.createElement(a.Checkbox,{className:"swich-input-group",labelPosition:"left",name:"PostAnonymous",checked:O,color:I?"pink":void 0,label:B.default.createElement("div",{className:"switch-label"},B.default.createElement("img",{className:"label-icon",src:c.CommonGAssets.getAssetPath("anomyous-avatar.svg"),alt:"anomyous avatar",style:{marginRight:"10px",width:"24px"}}),B.default.createElement("span",{className:"label-txt"},F("createPost.postAnonymous"))),value:"Post Anonymous",onChange:e=>V(e.currentTarget.checked),styles:{body:{display:"flex",width:"100%",justifyContent:"space-between",alignItems:"center"},label:{display:"flex",alignItems:"center"}}})),B.default.createElement("div",{className:"input-group"},B.default.createElement(l.Button,{theme:I?"marryBaby":"helloSites",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(ce&&!W){q(!0);try{yield ue()}catch(e){console.error(e),R(dt(F))}q(!1)}})),isDisabled:!ce,isLoading:W},F("createPost.popup.submit")))))},exports.CreatePostDescription=Xt,exports.CreatePostTitle=Yt,exports.ImagePreviewPopup=Pa,exports.InputCommentBar=ca,exports.LabelPin=pe,exports.LabelSortPin=me,exports.LabelSorting=({onChange:e,className:a,style:l,leftLabel:n,rightLabel:i,color:r,value:s,choices:d})=>{const{data:{env:{isMarryBaby:c}}}=t.useContext(u.TogetherComponentGlobalContext);return B.default.createElement(me,{label:n,rightLabel:B.default.createElement(ve,{position:"bottom",align:"end",data:{isShowheader:!1,type:"list",list:d.map((t=>({label:t.label,onClick:()=>e&&e(String(t.value)),selected:t.value===s,className:"bold-item"})))},toggleButtonContent:B.default.createElement("div",{style:{display:"flex"}},B.default.createElement(o.Text,{style:{display:"flex",alignItems:"center",fontWeight:"normal",marginRight:12},size:"p4"},i),B.default.createElement("img",{src:c?"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=Q,exports.PopoverMenu=he,exports.PopupDanger=ra,exports.PopupDoctor=_e,exports.PopupExpert=Xe,exports.PopupFrame=ia,exports.PopupHospital=et,exports.PostContent=ya,exports.PostImagePreview=Ha,exports.PostSingleImageViewPopup=ja,exports.ProfileDetail=zl,exports.ProfileDetailModal=nt,exports.ShareBox=pa,exports.SharePopup=ga,exports.SkipQuestionOfExpertBtn=l=>{var{post:o,onSkip:n,btnText:r}=l,s=e.__rest(l,["post","onSkip","btnText"]);const{t:d}=i.useTranslations(),{data:{locale:c},action:{pushNotifications:m}}=t.useContext(u.TogetherComponentGlobalContext),[p,g]=t.useState(!1),[f,h]=t.useState(!1),b=a.useMantineTheme(),x=t.useCallback((()=>e.__awaiter(void 0,void 0,void 0,(function*(){var e;h(!0);const t=yield u.callApiWithAuth(u.getApiPath(u.PATHS.USER.SKIP_QUESTION,{_locale:c,id:null==o?void 0:o.id}),"PUT");1===(null==t?void 0:t.status)?(null==n||n({id:(null==o?void 0:o.id)||"",communityId:(null===(e=null==o?void 0:o.community)||void 0===e?void 0:e.id)||""}),g(!1),m({title:"",message:"Skip success",type:"success"})):m({title:"",message:null==t?void 0:t.messages,type:"danger"}),h(!1)}))),[]);return B.default.createElement(a.Popover,{width:327,withArrow:!0,shadow:"md",opened:p},B.default.createElement(a.Popover.Target,null,B.default.createElement("div",Object.assign({className:`${Fl} ${(null==s?void 0:s.className)||""}`,onClick:()=>g(!0)},s),r||d("profilePanel.questionNotClear"))),B.default.createElement(a.Popover.Dropdown,null,B.default.createElement("div",null,B.default.createElement("div",{className:Ol},d("profilePanel.skipQuestion.heading")),B.default.createElement("div",{className:Vl},d("profilePanel.skipQuestion.content")),B.default.createElement("div",{className:Dl},B.default.createElement(E.Button,{size:"md",variant:"secondary",leftIcon:B.default.createElement(v.Close,{color:b.fn.primaryColor(),size:24}),onClick:()=>g(!1),styles:()=>({leftIcon:{marginRight:0}})}),B.default.createElement(E.Button,{variant:"primary",size:"md",leftIcon:B.default.createElement(v.Check,{color:"white",size:24}),onClick:x,loading:f,styles:()=>({leftIcon:{marginRight:0}})})))))},exports.SocialLinkPreview=qa,exports.SourceList=go,exports.SubmitReportForm=ba,exports.TagTopic=ce,exports.TogetherAuthConfigContext=H,exports.TogetherAuthConfigContextProvider=W,exports.TopicSelectList=ea,exports.VerifiedTag=bo,exports.types=yo,exports.useTogetherAuthRequiredAction=q;