@hhgtech/hhg-components 1.29.255 → 1.29.256

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 (531) hide show
  1. package/build/{LastPeriod-647877c3.js → LastPeriod-a77f1009.js} +1 -1
  2. package/build/{MobileBottomNavigationIcon-c72c94b1.js → MobileBottomNavigationIcon-f4048c67.js} +3 -3
  3. package/build/{Spinner-2ef57315.js → Spinner-f3a3136a.js} +1 -1
  4. package/build/{WhatsApp-83a20850.js → WhatsApp-4e7e382a.js} +1 -1
  5. package/build/adapters.js +19 -19
  6. package/build/atoms.js +46 -46
  7. package/build/babyGrowth.js +83 -83
  8. package/build/cache.js +2 -2
  9. package/build/care.js +17 -17
  10. package/build/careBookingSearchBar.js +14 -14
  11. package/build/careBookingSearchBarV2.js +15 -15
  12. package/build/components.js +90 -90
  13. package/build/{constants-1cc36328.js → constants-45708ef6.js} +1 -1
  14. package/build/constants.js +3 -3
  15. package/build/constantsDomainLocales.js +1 -1
  16. package/build/constantsRiskScreener.js +2 -2
  17. package/build/constantsSite.js +2 -2
  18. package/build/{core-8ca9bc0c.js → core-5121ede4.js} +1 -1
  19. package/build/{dataTransform-0d78fcff.js → dataTransform-36545d86.js} +1 -1
  20. package/build/ecom.js +4 -4
  21. package/build/{editor-4442a163.js → editor-01f4f8b6.js} +30 -19
  22. package/build/embeddedHeathToolCards_babyGrowth.js +23 -23
  23. package/build/embeddedHeathToolCards_babyPoop.js +19 -19
  24. package/build/embeddedHeathToolCards_babyVaccine.js +22 -22
  25. package/build/embeddedHeathToolCards_bmi_bmi.js +25 -25
  26. package/build/embeddedHeathToolCards_bmrBmr.js +25 -25
  27. package/build/embeddedHeathToolCards_dueDate_dueDate.js +22 -22
  28. package/build/embeddedHeathToolCards_ovulation_ovulation.js +22 -22
  29. package/build/embeddedHeathToolCards_pwg_pwg.js +26 -26
  30. package/build/embeddedHeathToolCards_targetHeartRate.js +27 -27
  31. package/build/esm/{LastPeriod-3db09d18.js → LastPeriod-177e283e.js} +1 -1
  32. package/build/esm/{MobileBottomNavigationIcon-ffb0633f.js → MobileBottomNavigationIcon-b6d68e67.js} +3 -3
  33. package/build/esm/{Spinner-a3e64cf2.js → Spinner-b3fccadb.js} +1 -1
  34. package/build/esm/{WhatsApp-f8ec28ce.js → WhatsApp-7dced466.js} +1 -1
  35. package/build/esm/adapters.js +19 -19
  36. package/build/esm/atoms.js +46 -46
  37. package/build/esm/babyGrowth.js +83 -83
  38. package/build/esm/cache.js +2 -2
  39. package/build/esm/care.js +17 -17
  40. package/build/esm/careBookingSearchBar.js +14 -14
  41. package/build/esm/careBookingSearchBarV2.js +15 -15
  42. package/build/esm/components.js +90 -90
  43. package/build/esm/{constants-e9677ee3.js → constants-49df0e2d.js} +1 -1
  44. package/build/esm/constants.js +3 -3
  45. package/build/esm/constantsDomainLocales.js +1 -1
  46. package/build/esm/constantsRiskScreener.js +2 -2
  47. package/build/esm/constantsSite.js +2 -2
  48. package/build/esm/{core-27cd7727.js → core-0a98b079.js} +1 -1
  49. package/build/esm/{dataTransform-a19ddc8d.js → dataTransform-615494aa.js} +1 -1
  50. package/build/esm/ecom.js +4 -4
  51. package/build/esm/{editor-d7addd70.js → editor-925a478d.js} +30 -19
  52. package/build/esm/embeddedHeathToolCards_babyGrowth.js +23 -23
  53. package/build/esm/embeddedHeathToolCards_babyPoop.js +19 -19
  54. package/build/esm/embeddedHeathToolCards_babyVaccine.js +22 -22
  55. package/build/esm/embeddedHeathToolCards_bmi_bmi.js +25 -25
  56. package/build/esm/embeddedHeathToolCards_bmrBmr.js +25 -25
  57. package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +22 -22
  58. package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +22 -22
  59. package/build/esm/embeddedHeathToolCards_pwg_pwg.js +26 -26
  60. package/build/esm/embeddedHeathToolCards_targetHeartRate.js +27 -27
  61. package/build/esm/{fixedBottomAdBlock-15e7537b.js → fixedBottomAdBlock-7ad52683.js} +23 -23
  62. package/build/esm/footer.js +21 -21
  63. package/build/esm/gAssets.js +2 -2
  64. package/build/esm/healthToolsCardWrapper.js +18 -18
  65. package/build/esm/healthToolsForm.js +33 -33
  66. package/build/esm/hooks/usePreview.d.ts +16 -0
  67. package/build/esm/hooks.js +13 -13
  68. package/build/esm/i18n/translationKeys.d.ts +1 -1
  69. package/build/esm/i18n-values/en-PH.js +14 -0
  70. package/build/esm/i18n-values/hi-IN.js +14 -0
  71. package/build/esm/i18n-values/id-ID.js +14 -0
  72. package/build/esm/i18n-values/km-KH.js +14 -0
  73. package/build/esm/i18n-values/ms-MY.js +14 -0
  74. package/build/esm/i18n-values/my-MM.js +14 -0
  75. package/build/esm/i18n-values/th-TH.js +14 -0
  76. package/build/esm/i18n-values/tl-PH.js +14 -0
  77. package/build/esm/i18n-values/vi-VN.js +16 -1
  78. package/build/esm/i18n-values/vi-VN_MB.js +16 -1
  79. package/build/esm/i18n-values/zh-TW.js +14 -0
  80. package/build/esm/i18n.js +2 -2
  81. package/build/esm/i18nV2.js +2 -2
  82. package/build/esm/{index-8bbc889d.js → index-02c36138.js} +16 -16
  83. package/build/esm/{index-47b7b478.js → index-0633ed49.js} +10 -10
  84. package/build/esm/{index-4132d697.js → index-07c4df11.js} +6 -6
  85. package/build/esm/{index-56ddfba6.js → index-16f7d8ec.js} +21 -21
  86. package/build/esm/{index-e014aa13.js → index-1999e28c.js} +2 -2
  87. package/build/esm/{index-f3c6f5f7.js → index-22b9cea0.js} +7 -7
  88. package/build/esm/{index-494fb244.js → index-2eb690cc.js} +2 -2
  89. package/build/esm/{index-cbb715a1.js → index-30200c88.js} +13 -13
  90. package/build/esm/{index-f4d04773.js → index-32a935f8.js} +3 -3
  91. package/build/esm/{index-17c2ddd0.js → index-39d26e66.js} +15 -15
  92. package/build/esm/{index-9c1e9fee.js → index-4127c29c.js} +13 -13
  93. package/build/esm/index-47140907.js +1578 -0
  94. package/build/esm/{index-1880f8a3.js → index-47d348d2.js} +2 -2
  95. package/build/esm/{index-9c37d508.js → index-4dd9b3e4.js} +1 -1
  96. package/build/esm/{index-2e565b13.js → index-4e35b926.js} +1 -1
  97. package/build/esm/{index-f7368d5b.js → index-51648dcd.js} +16 -16
  98. package/build/esm/{index-ef8af124.js → index-51c8c313.js} +1 -1
  99. package/build/esm/{index-48ebe2e7.js → index-539d0e6d.js} +30 -30
  100. package/build/esm/{index-35872353.js → index-57222cf2.js} +1 -1
  101. package/build/esm/{index-244707e4.js → index-611d9342.js} +7 -7
  102. package/build/esm/{index-bcfb1c9e.js → index-684f030b.js} +24 -24
  103. package/build/esm/{index-434e586a.js → index-6bfd7234.js} +2 -2
  104. package/build/esm/{index-6b1e8f6c.js → index-6ee74c2a.js} +2 -2
  105. package/build/esm/{index-7acc7acc.js → index-7236e5c9.js} +13 -13
  106. package/build/esm/{index-7c38f120.js → index-7e7a3adf.js} +6 -6
  107. package/build/esm/{index-2eb679bb.js → index-81878476.js} +2 -2
  108. package/build/esm/{index-65da8c34.js → index-8553a111.js} +2 -2
  109. package/build/esm/{index-1d8c2957.js → index-8638e3a8.js} +2 -2
  110. package/build/esm/{index-131e2b6b.js → index-89145929.js} +6 -6
  111. package/build/esm/{index-79b55d37.js → index-93ffecac.js} +2 -2
  112. package/build/esm/{index-839346be.js → index-9caa1d9d.js} +2 -2
  113. package/build/esm/{index-4eb6c756.js → index-a02d53cb.js} +17 -17
  114. package/build/esm/{index-862f8eaf.js → index-a39898d0.js} +18 -18
  115. package/build/esm/{index-1185b1e5.js → index-a3b361f3.js} +17 -17
  116. package/build/esm/{index-36c08add.js → index-a7c8ba65.js} +20 -20
  117. package/build/esm/{index-2a523664.js → index-ab250bc6.js} +3 -3
  118. package/build/esm/{index-1ae4801b.js → index-b174afc3.js} +6 -6
  119. package/build/esm/{index-3fddc4d8.js → index-b85cd2ee.js} +1 -1
  120. package/build/esm/{index-6c944fe8.js → index-b9716d9c.js} +2 -2
  121. package/build/esm/{index-b26e51ec.js → index-bdb230df.js} +16 -16
  122. package/build/esm/{index-e06b730e.js → index-bfce0e07.js} +15 -15
  123. package/build/esm/{index-aef27e71.js → index-c3bad623.js} +32 -32
  124. package/build/esm/{index-09649328.js → index-c9748dcf.js} +1 -1
  125. package/build/esm/{index-ea3c14eb.js → index-cc540ee0.js} +1 -1
  126. package/build/esm/{index-47452bf8.js → index-d1a5215b.js} +3 -3
  127. package/build/esm/{index-f245a430.js → index-d65dafce.js} +1 -1
  128. package/build/esm/{index-2f0b80a1.js → index-da79d55e.js} +2 -2
  129. package/build/esm/{index-03ff44b3.js → index-dc6f4733.js} +13 -13
  130. package/build/esm/{index-a064b97a.js → index-dd5e8962.js} +1 -1
  131. package/build/esm/{index-4eb0527a.js → index-dd991b1a.js} +16 -16
  132. package/build/esm/{index-ae0c384e.js → index-de07fc9b.js} +12 -12
  133. package/build/esm/{index-f0bf0eed.js → index-e0465545.js} +5 -5
  134. package/build/esm/{index-daaf5d70.js → index-e4124774.js} +3 -3
  135. package/build/esm/{index-76ce4ed7.js → index-e4f4c9bd.js} +1 -1
  136. package/build/esm/{index-6a3c2aae.js → index-e898faae.js} +5 -5
  137. package/build/esm/{index-9ed4be6b.js → index-eaa45bf9.js} +3 -3
  138. package/build/esm/{index-36dea16b.js → index-ef3406bf.js} +3 -3
  139. package/build/esm/{index-5182fa9d.js → index-f14dff1f.js} +4 -4
  140. package/build/esm/{index-f2b11138.js → index-f4a4eb46.js} +146 -146
  141. package/build/esm/{index-f6ef9854.js → index-f7e56b20.js} +3 -3
  142. package/build/esm/{index-c96910dd.js → index-fa2cebd8.js} +17 -17
  143. package/build/esm/index.js +112 -112
  144. package/build/esm/{index.styles-08e39b53.js → index.styles-a97291e2.js} +1 -1
  145. package/build/esm/interfaces/types/index.d.ts +1 -1
  146. package/build/esm/{labelSorting-ec1bf6da.js → labelSorting-e62252ac.js} +4 -4
  147. package/build/esm/lead.js +24 -24
  148. package/build/esm/{logoIcon-15b6e029.js → logoIcon-ab48868e.js} +2 -2
  149. package/build/esm/mantine.js +25 -25
  150. package/build/esm/misc.js +16 -16
  151. package/build/esm/miscGetDynamicHealthTool.js +4 -4
  152. package/build/esm/miscGetSocialList.js +8 -8
  153. package/build/esm/miscScreenSizeContext.js +1 -1
  154. package/build/esm/mobileBottomNavigation.js +5 -5
  155. package/build/esm/mobileBottomNavigationIcon.js +5 -5
  156. package/build/esm/molecules.js +69 -69
  157. package/build/esm/moleculesArticleCard.js +6 -6
  158. package/build/esm/moleculesArticleCardV2.js +16 -16
  159. package/build/esm/navigation.js +40 -40
  160. package/build/esm/navigationLogoutPopup.js +9 -9
  161. package/build/esm/navigationProfileButton.js +23 -23
  162. package/build/esm/onboardingV2.js +29 -29
  163. package/build/esm/organisms.js +44 -44
  164. package/build/esm/{post-5d0b96db.js → post-2a3e7515.js} +3 -3
  165. package/build/esm/profileNavigation.js +19 -19
  166. package/build/esm/progressBar.js +1 -1
  167. package/build/esm/pwg.js +22 -22
  168. package/build/esm/ssoV2.js +26 -26
  169. package/build/esm/{store-2c4a73fd.js → store-99c9a650.js} +3 -3
  170. package/build/esm/subot.js +33 -33
  171. package/build/esm/surveyOrPremiumBanner.js +31 -31
  172. package/build/esm/surveyQuestionCard.js +10 -10
  173. package/build/esm/{surveyThankyouCard-ceeeaf75.js → surveyThankyouCard-68b00028.js} +5 -5
  174. package/build/esm/together/assets/icons/Ask.d.ts +7 -0
  175. package/build/esm/together/components/molecules/createNewPostContent/index.d.ts +6 -2
  176. package/build/esm/together/components/molecules/createNewPostContent/index.styled.d.ts +4 -0
  177. package/build/esm/together/components/molecules/createNewPostContent/type.d.ts +4 -0
  178. package/build/esm/together/components/molecules/createPostCommunity/index.d.ts +25 -0
  179. package/build/esm/together/components/molecules/createPostCommunity/index.styled.d.ts +9 -0
  180. package/build/esm/together/components/molecules/createPostCommunity/index.styles.d.ts +12 -0
  181. package/build/esm/together/components/molecules/createPostDescription/index.d.ts +2 -1
  182. package/build/esm/together/components/molecules/createPostPhotos/index.d.ts +7 -0
  183. package/build/esm/together/components/molecules/createPostVideo/index.d.ts +8 -0
  184. package/build/esm/together/components/molecules/createPostVideo/socialLinkPopup/index.d.ts +12 -0
  185. package/build/esm/together/components/molecules/createPostVideo/socialLinkPopup/index.styled.d.ts +15 -0
  186. package/build/esm/together/components/molecules/postPhotosReview/index.d.ts +8 -0
  187. package/build/esm/together/components/molecules/postPhotosReview/index.styled.d.ts +5 -0
  188. package/build/esm/together/components/molecules/postPhotosReview/index.styles.d.ts +12 -0
  189. package/build/esm/together/components/molecules/postVideoReview/index.d.ts +10 -0
  190. package/build/esm/together/components/molecules/postVideoReview/index.styled.d.ts +5 -0
  191. package/build/esm/together/components/molecules/postVideoReview/index.styles.d.ts +12 -0
  192. package/build/esm/together.js +53 -52
  193. package/build/esm/togetherApiUtils.js +4 -4
  194. package/build/esm/togetherAtoms.js +30 -30
  195. package/build/esm/togetherComponentGlobalContext.js +4 -4
  196. package/build/esm/togetherMolecules.js +48 -47
  197. package/build/esm/togetherMoleculesCardAuthor.js +27 -27
  198. package/build/esm/togetherMoleculesPostImagePreview.js +11 -11
  199. package/build/esm/togetherMoleculesProfileDetail.js +37 -37
  200. package/build/esm/togetherOrganisms.js +47 -47
  201. package/build/esm/togetherRichTextEditor.js +17 -17
  202. package/build/esm/togetherShareBox.js +10 -10
  203. package/build/esm/{treePopoverMenu-b1f48071.js → treePopoverMenu-844bda01.js} +18 -18
  204. package/build/esm/{types-e3de1646.js → types-e54f0009.js} +2 -2
  205. package/build/esm/types.js +2 -2
  206. package/build/esm/{useCategory-ab47c91e.js → useCategory-9c5e718c.js} +5 -5
  207. package/build/esm/{useHealthToolCache-2ec381e3.js → useHealthToolCache-e8f86658.js} +1 -1
  208. package/build/esm/{useMantineLocale-6d8b743c.js → useMantineLocale-9f95d45b.js} +5 -5
  209. package/build/esm/{usePlacesAutocomplete-b883fb59.js → usePlacesAutocomplete-8f475490.js} +1 -1
  210. package/build/esm/useTogetherAuthRequiredAction.js +9 -9
  211. package/build/esm/{utils-5a12e69e.js → utils-28a0cbdf.js} +4 -4
  212. package/build/esm/{utils-23094e0e.js → utils-52691669.js} +2 -2
  213. package/build/esm/{utils-f8b3581f.js → utils-5b8b6d7d.js} +2 -2
  214. package/build/esm/vaccination.js +21 -21
  215. package/build/{fixedBottomAdBlock-245489f3.js → fixedBottomAdBlock-fb03a63c.js} +23 -23
  216. package/build/footer.js +21 -21
  217. package/build/gAssets.js +2 -2
  218. package/build/healthToolsCardWrapper.js +18 -18
  219. package/build/healthToolsForm.js +33 -33
  220. package/build/hooks/usePreview.d.ts +16 -0
  221. package/build/hooks.js +13 -13
  222. package/build/i18n/translationKeys.d.ts +1 -1
  223. package/build/i18n-values/en-PH.js +14 -0
  224. package/build/i18n-values/hi-IN.js +14 -0
  225. package/build/i18n-values/id-ID.js +14 -0
  226. package/build/i18n-values/km-KH.js +14 -0
  227. package/build/i18n-values/ms-MY.js +14 -0
  228. package/build/i18n-values/my-MM.js +14 -0
  229. package/build/i18n-values/th-TH.js +14 -0
  230. package/build/i18n-values/tl-PH.js +14 -0
  231. package/build/i18n-values/vi-VN.js +16 -1
  232. package/build/i18n-values/vi-VN_MB.js +16 -1
  233. package/build/i18n-values/zh-TW.js +14 -0
  234. package/build/i18n.js +1 -1
  235. package/build/i18nV2.js +1 -1
  236. package/build/{index-69132b09.js → index-01d03c78.js} +17 -17
  237. package/build/{index-e929edea.js → index-0297d55b.js} +1 -1
  238. package/build/{index-6335af8c.js → index-03761f54.js} +2 -2
  239. package/build/{index-15b83521.js → index-07175853.js} +1 -1
  240. package/build/{index-b72f9bff.js → index-08d2f3a6.js} +18 -18
  241. package/build/{index-2696743a.js → index-0b4cbc58.js} +3 -3
  242. package/build/index-0d6cf0c0.js +1592 -0
  243. package/build/{index-664f2b18.js → index-1154bc1c.js} +1 -1
  244. package/build/{index-a03b58f0.js → index-18010713.js} +2 -2
  245. package/build/{index-6c60c508.js → index-1eb29d0d.js} +6 -6
  246. package/build/{index-c7a827cb.js → index-1f85ca1f.js} +6 -6
  247. package/build/{index-17494419.js → index-2d0359bd.js} +3 -3
  248. package/build/{index-b02ac86d.js → index-2d4aab4b.js} +32 -32
  249. package/build/{index-82080e24.js → index-2f40c377.js} +2 -2
  250. package/build/{index-9519a5fd.js → index-3629b9a7.js} +3 -3
  251. package/build/{index-bfe67266.js → index-3729527f.js} +2 -2
  252. package/build/{index-b7d15577.js → index-3b00d7ad.js} +21 -21
  253. package/build/{index-b7c7906c.js → index-3b6c389a.js} +7 -7
  254. package/build/{index-195b7b4c.js → index-3f7f9045.js} +2 -2
  255. package/build/{index-a14e421b.js → index-4eb8e40b.js} +2 -2
  256. package/build/{index-4f0dd547.js → index-56072838.js} +16 -16
  257. package/build/{index-0732378e.js → index-561da9f9.js} +2 -2
  258. package/build/{index-6968f65d.js → index-589e63ad.js} +4 -4
  259. package/build/{index-875a6c7e.js → index-5d429dcc.js} +3 -3
  260. package/build/{index-f3236d5a.js → index-5ed863a4.js} +7 -7
  261. package/build/{index-934d23cd.js → index-602a7bf0.js} +13 -13
  262. package/build/{index-274b902f.js → index-616100c8.js} +17 -17
  263. package/build/{index-b7324289.js → index-6176fb0a.js} +2 -2
  264. package/build/{index-63c15184.js → index-638a7b98.js} +13 -13
  265. package/build/{index-8ecc4b05.js → index-75f16e01.js} +2 -2
  266. package/build/{index-ab8e6171.js → index-79ecc46c.js} +13 -13
  267. package/build/{index-a12e742e.js → index-7b1d5fbb.js} +1 -1
  268. package/build/{index-8fdebfd3.js → index-814740f0.js} +1 -1
  269. package/build/{index-644c08bb.js → index-81c8323f.js} +1 -1
  270. package/build/{index-fbd6df2e.js → index-840f1374.js} +146 -146
  271. package/build/{index-ad540dfe.js → index-858e33fa.js} +3 -3
  272. package/build/{index-299140fb.js → index-88c3cd61.js} +1 -1
  273. package/build/{index-a3cbebe1.js → index-8bc4e8d4.js} +2 -2
  274. package/build/{index-138cbcd6.js → index-919d82e9.js} +5 -5
  275. package/build/{index-3cb6d701.js → index-93736cf7.js} +12 -12
  276. package/build/{index-c5042444.js → index-9754e07e.js} +1 -1
  277. package/build/{index-b37ae53d.js → index-99c5d8f9.js} +1 -1
  278. package/build/{index-ca06b50c.js → index-9eebb05a.js} +5 -5
  279. package/build/{index-4a4120eb.js → index-a71e231b.js} +15 -15
  280. package/build/{index-ce282721.js → index-b887ccb8.js} +13 -13
  281. package/build/{index-f6c1b74e.js → index-bcfabe17.js} +6 -6
  282. package/build/{index-85abf965.js → index-bf3bea09.js} +3 -3
  283. package/build/{index-04e2ac6e.js → index-ce3b5c1a.js} +10 -10
  284. package/build/{index-2522a49d.js → index-ced540d3.js} +20 -20
  285. package/build/{index-1f1435d9.js → index-d4cb3acc.js} +6 -6
  286. package/build/{index-9bcf2f6e.js → index-d7016fc0.js} +30 -30
  287. package/build/{index-17122bdb.js → index-db69ad54.js} +24 -24
  288. package/build/{index-a2263587.js → index-db86dbef.js} +3 -3
  289. package/build/{index-46f868a5.js → index-def05cca.js} +2 -2
  290. package/build/{index-a1f8763b.js → index-e01f14a5.js} +17 -17
  291. package/build/{index-4dfbfe3c.js → index-e1e8c808.js} +16 -16
  292. package/build/{index-ee186536.js → index-ef1d8a75.js} +16 -16
  293. package/build/{index-adf15e38.js → index-fc0e0e77.js} +1 -1
  294. package/build/{index-06775ce7.js → index-fc9f36ca.js} +15 -15
  295. package/build/{index-118bcd6b.js → index-fcf3d738.js} +16 -16
  296. package/build/{index-78754361.js → index-fd203e15.js} +2 -2
  297. package/build/index.js +112 -112
  298. package/build/{index.styles-5731896a.js → index.styles-5f80f7d5.js} +1 -1
  299. package/build/interfaces/types/index.d.ts +1 -1
  300. package/build/{labelSorting-1eb76308.js → labelSorting-fcfeb00e.js} +4 -4
  301. package/build/lead.js +24 -24
  302. package/build/{logoIcon-b499558c.js → logoIcon-40e732ba.js} +2 -2
  303. package/build/mantine.js +22 -22
  304. package/build/misc.js +16 -16
  305. package/build/miscGetDynamicHealthTool.js +4 -4
  306. package/build/miscGetSocialList.js +8 -8
  307. package/build/miscScreenSizeContext.js +1 -1
  308. package/build/mobileBottomNavigation.js +5 -5
  309. package/build/mobileBottomNavigationIcon.js +5 -5
  310. package/build/molecules.js +69 -69
  311. package/build/moleculesArticleCard.js +6 -6
  312. package/build/moleculesArticleCardV2.js +16 -16
  313. package/build/navigation.js +40 -40
  314. package/build/navigationLogoutPopup.js +9 -9
  315. package/build/navigationProfileButton.js +23 -23
  316. package/build/onboardingV2.js +28 -28
  317. package/build/organisms.js +44 -44
  318. package/build/{post-a74ba975.js → post-22e3ade0.js} +2 -2
  319. package/build/profileNavigation.js +19 -19
  320. package/build/progressBar.js +1 -1
  321. package/build/pwg.js +22 -22
  322. package/build/ssoV2.js +25 -25
  323. package/build/{store-df580b27.js → store-05578b13.js} +3 -3
  324. package/build/subot.js +32 -32
  325. package/build/surveyOrPremiumBanner.js +31 -31
  326. package/build/surveyQuestionCard.js +10 -10
  327. package/build/{surveyThankyouCard-b602fa84.js → surveyThankyouCard-35086685.js} +5 -5
  328. package/build/together/assets/icons/Ask.d.ts +7 -0
  329. package/build/together/components/molecules/createNewPostContent/index.d.ts +6 -2
  330. package/build/together/components/molecules/createNewPostContent/index.styled.d.ts +4 -0
  331. package/build/together/components/molecules/createNewPostContent/type.d.ts +4 -0
  332. package/build/together/components/molecules/createPostCommunity/index.d.ts +25 -0
  333. package/build/together/components/molecules/createPostCommunity/index.styled.d.ts +9 -0
  334. package/build/together/components/molecules/createPostCommunity/index.styles.d.ts +12 -0
  335. package/build/together/components/molecules/createPostDescription/index.d.ts +2 -1
  336. package/build/together/components/molecules/createPostPhotos/index.d.ts +7 -0
  337. package/build/together/components/molecules/createPostVideo/index.d.ts +8 -0
  338. package/build/together/components/molecules/createPostVideo/socialLinkPopup/index.d.ts +12 -0
  339. package/build/together/components/molecules/createPostVideo/socialLinkPopup/index.styled.d.ts +15 -0
  340. package/build/together/components/molecules/postPhotosReview/index.d.ts +8 -0
  341. package/build/together/components/molecules/postPhotosReview/index.styled.d.ts +5 -0
  342. package/build/together/components/molecules/postPhotosReview/index.styles.d.ts +12 -0
  343. package/build/together/components/molecules/postVideoReview/index.d.ts +10 -0
  344. package/build/together/components/molecules/postVideoReview/index.styled.d.ts +5 -0
  345. package/build/together/components/molecules/postVideoReview/index.styles.d.ts +12 -0
  346. package/build/together.js +53 -52
  347. package/build/togetherApiUtils.js +4 -4
  348. package/build/togetherAtoms.js +30 -30
  349. package/build/togetherComponentGlobalContext.js +4 -4
  350. package/build/togetherMolecules.js +48 -47
  351. package/build/togetherMoleculesCardAuthor.js +27 -27
  352. package/build/togetherMoleculesPostImagePreview.js +11 -11
  353. package/build/togetherMoleculesProfileDetail.js +37 -37
  354. package/build/togetherOrganisms.js +47 -47
  355. package/build/togetherRichTextEditor.js +17 -17
  356. package/build/togetherShareBox.js +10 -10
  357. package/build/{treePopoverMenu-4135e5cb.js → treePopoverMenu-5ba1aa67.js} +18 -18
  358. package/build/{types-ee77bf59.js → types-3458f421.js} +2 -2
  359. package/build/types.js +2 -2
  360. package/build/{useCategory-2173d365.js → useCategory-61a78578.js} +5 -5
  361. package/build/{useHealthToolCache-8fd7bf92.js → useHealthToolCache-730cd303.js} +1 -1
  362. package/build/{useMantineLocale-234052de.js → useMantineLocale-2124518f.js} +5 -5
  363. package/build/{usePlacesAutocomplete-0f7477ef.js → usePlacesAutocomplete-1773a76b.js} +1 -1
  364. package/build/useTogetherAuthRequiredAction.js +9 -9
  365. package/build/{utils-93342687.js → utils-9b13ebc0.js} +2 -2
  366. package/build/{utils-b072c91b.js → utils-aef580ab.js} +3 -3
  367. package/build/{utils-61af8020.js → utils-b3ffe408.js} +2 -2
  368. package/build/vaccination.js +21 -21
  369. package/package.json +1 -1
  370. package/build/esm/index-fad75d62.js +0 -913
  371. package/build/index-6da374f3.js +0 -927
  372. /package/build/{BMI_BOYS.percentile.monthly-c09efa33.js → BMI_BOYS.percentile.monthly-87029987.js} +0 -0
  373. /package/build/{BMI_BOYS.percentile.weekly-ef50b0f6.js → BMI_BOYS.percentile.weekly-fcf57849.js} +0 -0
  374. /package/build/{BMI_BOYS.percentile.yearly-9c8d197d.js → BMI_BOYS.percentile.yearly-d4e03a13.js} +0 -0
  375. /package/build/{BMI_BOYS.zscore.monthly-411cf7a2.js → BMI_BOYS.zscore.monthly-194e08fa.js} +0 -0
  376. /package/build/{BMI_BOYS.zscore.weekly-8581710c.js → BMI_BOYS.zscore.weekly-49f7118f.js} +0 -0
  377. /package/build/{BMI_BOYS.zscore.yearly-a6c82356.js → BMI_BOYS.zscore.yearly-299b89f5.js} +0 -0
  378. /package/build/{BMI_GIRLS.percentile.monthly-59c005a9.js → BMI_GIRLS.percentile.monthly-2cdc5948.js} +0 -0
  379. /package/build/{BMI_GIRLS.percentile.weekly-a68142d1.js → BMI_GIRLS.percentile.weekly-8f9d891c.js} +0 -0
  380. /package/build/{BMI_GIRLS.percentile.yearly-e052180a.js → BMI_GIRLS.percentile.yearly-07fc4045.js} +0 -0
  381. /package/build/{BMI_GIRLS.zscore.monthly-9cef049d.js → BMI_GIRLS.zscore.monthly-ffb73930.js} +0 -0
  382. /package/build/{BMI_GIRLS.zscore.weekly-bbf4adf5.js → BMI_GIRLS.zscore.weekly-5163c7b6.js} +0 -0
  383. /package/build/{BMI_GIRLS.zscore.yearly-d5bf9d4e.js → BMI_GIRLS.zscore.yearly-76141512.js} +0 -0
  384. /package/build/{ChevronDown-fbafaed7.js → ChevronDown-4ac61b7b.js} +0 -0
  385. /package/build/{Close-f39f0374.js → Close-fee596da.js} +0 -0
  386. /package/build/{Google-8d688c1d.js → Google-79ef2daa.js} +0 -0
  387. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-f27ca68e.js → HEAD CIRCUM_BOYS.percentile.monthly-e310b715.js} +0 -0
  388. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-07391ddb.js → HEAD CIRCUM_BOYS.percentile.weekly-e914da0a.js} +0 -0
  389. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-13f534e1.js → HEAD CIRCUM_BOYS.percentile.yearly-4a11f49a.js} +0 -0
  390. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-e2ebe212.js → HEAD CIRCUM_BOYS.zscore.monthly-3cc41e34.js} +0 -0
  391. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-f413f37c.js → HEAD CIRCUM_BOYS.zscore.weekly-cbc761bb.js} +0 -0
  392. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-4d96f947.js → HEAD CIRCUM_BOYS.zscore.yearly-328523aa.js} +0 -0
  393. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-2fd46b6f.js → HEAD CIRCUM_GIRLS.percentile.monthly-7e0e38e8.js} +0 -0
  394. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-6eb33338.js → HEAD CIRCUM_GIRLS.percentile.weekly-15ee9e6f.js} +0 -0
  395. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-0462deb7.js → HEAD CIRCUM_GIRLS.percentile.yearly-1c0bcef8.js} +0 -0
  396. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-76d6f310.js → HEAD CIRCUM_GIRLS.zscore.monthly-829d1e36.js} +0 -0
  397. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-9fb77076.js → HEAD CIRCUM_GIRLS.zscore.weekly-27c08a1f.js} +0 -0
  398. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-6a05f1a7.js → HEAD CIRCUM_GIRLS.zscore.yearly-9781a082.js} +0 -0
  399. /package/build/{HEIGHT_BOYS.percentile.monthly-065f56b9.js → HEIGHT_BOYS.percentile.monthly-60dcec59.js} +0 -0
  400. /package/build/{HEIGHT_BOYS.percentile.weekly-500ea40a.js → HEIGHT_BOYS.percentile.weekly-a5e3f043.js} +0 -0
  401. /package/build/{HEIGHT_BOYS.percentile.yearly-e3a69d7d.js → HEIGHT_BOYS.percentile.yearly-e3282c91.js} +0 -0
  402. /package/build/{HEIGHT_BOYS.zscore.monthly-b00ecfa5.js → HEIGHT_BOYS.zscore.monthly-77b2f6c9.js} +0 -0
  403. /package/build/{HEIGHT_BOYS.zscore.weekly-f5633da4.js → HEIGHT_BOYS.zscore.weekly-a0dc2367.js} +0 -0
  404. /package/build/{HEIGHT_BOYS.zscore.yearly-4f6423de.js → HEIGHT_BOYS.zscore.yearly-02ddda07.js} +0 -0
  405. /package/build/{HEIGHT_GIRLS.percentile.monthly-46f228f1.js → HEIGHT_GIRLS.percentile.monthly-379b450b.js} +0 -0
  406. /package/build/{HEIGHT_GIRLS.percentile.weekly-a4c00d92.js → HEIGHT_GIRLS.percentile.weekly-ce665f7f.js} +0 -0
  407. /package/build/{HEIGHT_GIRLS.percentile.yearly-84eaa7c1.js → HEIGHT_GIRLS.percentile.yearly-38e7f0af.js} +0 -0
  408. /package/build/{HEIGHT_GIRLS.zscore.monthly-24df323c.js → HEIGHT_GIRLS.zscore.monthly-0021f876.js} +0 -0
  409. /package/build/{HEIGHT_GIRLS.zscore.weekly-463192bb.js → HEIGHT_GIRLS.zscore.weekly-d4b5fa65.js} +0 -0
  410. /package/build/{HEIGHT_GIRLS.zscore.yearly-ddba7973.js → HEIGHT_GIRLS.zscore.yearly-335e9299.js} +0 -0
  411. /package/build/{Locale-7729f820.js → Locale-646c6410.js} +0 -0
  412. /package/build/{Visible-d59d1865.js → Visible-7f6e4ff4.js} +0 -0
  413. /package/build/{WEIGHT_BOYS.percentile.monthly-2b40cb5a.js → WEIGHT_BOYS.percentile.monthly-8c2bdf48.js} +0 -0
  414. /package/build/{WEIGHT_BOYS.percentile.weekly-c5eb3a0a.js → WEIGHT_BOYS.percentile.weekly-8daafa87.js} +0 -0
  415. /package/build/{WEIGHT_BOYS.percentile.yearly-36d11a43.js → WEIGHT_BOYS.percentile.yearly-1e0475d1.js} +0 -0
  416. /package/build/{WEIGHT_BOYS.zscore.monthly-817857ec.js → WEIGHT_BOYS.zscore.monthly-197e8dd0.js} +0 -0
  417. /package/build/{WEIGHT_BOYS.zscore.weekly-046b4d60.js → WEIGHT_BOYS.zscore.weekly-301bdfd9.js} +0 -0
  418. /package/build/{WEIGHT_BOYS.zscore.yearly-8b824bb6.js → WEIGHT_BOYS.zscore.yearly-ab3af855.js} +0 -0
  419. /package/build/{WEIGHT_GIRLS.percentile.monthly-3ba15cd9.js → WEIGHT_GIRLS.percentile.monthly-6924f2a7.js} +0 -0
  420. /package/build/{WEIGHT_GIRLS.percentile.weekly-ba07938a.js → WEIGHT_GIRLS.percentile.weekly-d97e1f66.js} +0 -0
  421. /package/build/{WEIGHT_GIRLS.percentile.yearly-7a3bc369.js → WEIGHT_GIRLS.percentile.yearly-6e952b11.js} +0 -0
  422. /package/build/{WEIGHT_GIRLS.zscore.monthly-026bf8ff.js → WEIGHT_GIRLS.zscore.monthly-ee4604d5.js} +0 -0
  423. /package/build/{WEIGHT_GIRLS.zscore.weekly-b3761c45.js → WEIGHT_GIRLS.zscore.weekly-588c4450.js} +0 -0
  424. /package/build/{WEIGHT_GIRLS.zscore.yearly-241642df.js → WEIGHT_GIRLS.zscore.yearly-6022ad31.js} +0 -0
  425. /package/build/{animation-eea33b50.js → animation-bb5e8673.js} +0 -0
  426. /package/build/{constants-e05edfd4.js → constants-814487a2.js} +0 -0
  427. /package/build/{constants-2a9ec4cd.js → constants-8d6116b5.js} +0 -0
  428. /package/build/{constants-23150110.js → constants-a9db52c4.js} +0 -0
  429. /package/build/{dataTransform-377a8abc.js → dataTransform-7d00bda0.js} +0 -0
  430. /package/build/{doctor-1e66ff11.js → doctor-faa691d8.js} +0 -0
  431. /package/build/esm/{BMI_BOYS.percentile.monthly-c33d5a51.js → BMI_BOYS.percentile.monthly-4f6dabf5.js} +0 -0
  432. /package/build/esm/{BMI_BOYS.percentile.weekly-2142f77b.js → BMI_BOYS.percentile.weekly-25ead335.js} +0 -0
  433. /package/build/esm/{BMI_BOYS.percentile.yearly-6159ffb5.js → BMI_BOYS.percentile.yearly-d2cbbc53.js} +0 -0
  434. /package/build/esm/{BMI_BOYS.zscore.monthly-ada09181.js → BMI_BOYS.zscore.monthly-823576c3.js} +0 -0
  435. /package/build/esm/{BMI_BOYS.zscore.weekly-edc422ed.js → BMI_BOYS.zscore.weekly-636cd293.js} +0 -0
  436. /package/build/esm/{BMI_BOYS.zscore.yearly-ae47e229.js → BMI_BOYS.zscore.yearly-9e298666.js} +0 -0
  437. /package/build/esm/{BMI_GIRLS.percentile.monthly-37f28356.js → BMI_GIRLS.percentile.monthly-bdb948af.js} +0 -0
  438. /package/build/esm/{BMI_GIRLS.percentile.weekly-13e3215d.js → BMI_GIRLS.percentile.weekly-29e2eb94.js} +0 -0
  439. /package/build/esm/{BMI_GIRLS.percentile.yearly-6f7f31e6.js → BMI_GIRLS.percentile.yearly-bb854357.js} +0 -0
  440. /package/build/esm/{BMI_GIRLS.zscore.monthly-eb7c31da.js → BMI_GIRLS.zscore.monthly-b0d64ee6.js} +0 -0
  441. /package/build/esm/{BMI_GIRLS.zscore.weekly-13003bd8.js → BMI_GIRLS.zscore.weekly-3f00ccbf.js} +0 -0
  442. /package/build/esm/{BMI_GIRLS.zscore.yearly-619f74e2.js → BMI_GIRLS.zscore.yearly-7f806c29.js} +0 -0
  443. /package/build/esm/{ChevronDown-366f4c97.js → ChevronDown-53ef78f8.js} +0 -0
  444. /package/build/esm/{Close-6c262379.js → Close-c15a8230.js} +0 -0
  445. /package/build/esm/{Google-002b53ae.js → Google-eca96467.js} +0 -0
  446. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-3b62bf9a.js → HEAD CIRCUM_BOYS.percentile.monthly-42ceabd9.js} +0 -0
  447. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-d4738364.js → HEAD CIRCUM_BOYS.percentile.weekly-470e1c3d.js} +0 -0
  448. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-af36b0e0.js → HEAD CIRCUM_BOYS.percentile.yearly-ed70e5f6.js} +0 -0
  449. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-1bae9d8f.js → HEAD CIRCUM_BOYS.zscore.monthly-affed2f5.js} +0 -0
  450. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-73984bb0.js → HEAD CIRCUM_BOYS.zscore.weekly-77aa726e.js} +0 -0
  451. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-b4aac2ba.js → HEAD CIRCUM_BOYS.zscore.yearly-409ca491.js} +0 -0
  452. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-a144d28e.js → HEAD CIRCUM_GIRLS.percentile.monthly-e0c51ad2.js} +0 -0
  453. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-af2964c5.js → HEAD CIRCUM_GIRLS.percentile.weekly-e7ae98c3.js} +0 -0
  454. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-f6ddce97.js → HEAD CIRCUM_GIRLS.percentile.yearly-e1a50870.js} +0 -0
  455. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-69eaaad1.js → HEAD CIRCUM_GIRLS.zscore.monthly-aaa29331.js} +0 -0
  456. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-a7bceb85.js → HEAD CIRCUM_GIRLS.zscore.weekly-277af8eb.js} +0 -0
  457. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-46951905.js → HEAD CIRCUM_GIRLS.zscore.yearly-def87b91.js} +0 -0
  458. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-69b2d8bb.js → HEIGHT_BOYS.percentile.monthly-f9d5abb4.js} +0 -0
  459. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-15458540.js → HEIGHT_BOYS.percentile.weekly-6d8ae1d7.js} +0 -0
  460. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-757eaf11.js → HEIGHT_BOYS.percentile.yearly-66b096af.js} +0 -0
  461. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-571040c1.js → HEIGHT_BOYS.zscore.monthly-82162c18.js} +0 -0
  462. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-5e49391a.js → HEIGHT_BOYS.zscore.weekly-a433b55b.js} +0 -0
  463. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-b9fbd523.js → HEIGHT_BOYS.zscore.yearly-099ded08.js} +0 -0
  464. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-739c2a3d.js → HEIGHT_GIRLS.percentile.monthly-4abc4bc2.js} +0 -0
  465. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-a03af2e0.js → HEIGHT_GIRLS.percentile.weekly-bb5a0d93.js} +0 -0
  466. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-f0e03ef9.js → HEIGHT_GIRLS.percentile.yearly-4db87e9c.js} +0 -0
  467. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-8857382a.js → HEIGHT_GIRLS.zscore.monthly-67430d7b.js} +0 -0
  468. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-3bd4ab5f.js → HEIGHT_GIRLS.zscore.weekly-50b029b2.js} +0 -0
  469. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-22a4334c.js → HEIGHT_GIRLS.zscore.yearly-7e3e6b64.js} +0 -0
  470. /package/build/esm/{Locale-bb619c10.js → Locale-ea07a034.js} +0 -0
  471. /package/build/esm/{Visible-f6f456d9.js → Visible-321342de.js} +0 -0
  472. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-170c241a.js → WEIGHT_BOYS.percentile.monthly-c9951b11.js} +0 -0
  473. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-77bed609.js → WEIGHT_BOYS.percentile.weekly-3c8137d7.js} +0 -0
  474. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-96a88255.js → WEIGHT_BOYS.percentile.yearly-6711ec3c.js} +0 -0
  475. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-423f6fb4.js → WEIGHT_BOYS.zscore.monthly-936ca695.js} +0 -0
  476. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-d0e58b42.js → WEIGHT_BOYS.zscore.weekly-41ecc705.js} +0 -0
  477. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-8e8396c0.js → WEIGHT_BOYS.zscore.yearly-aad2c98e.js} +0 -0
  478. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-98149138.js → WEIGHT_GIRLS.percentile.monthly-bd580c43.js} +0 -0
  479. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-fb6c3e90.js → WEIGHT_GIRLS.percentile.weekly-98264cad.js} +0 -0
  480. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-dfc9fe50.js → WEIGHT_GIRLS.percentile.yearly-1a4667a3.js} +0 -0
  481. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-89c1f8a6.js → WEIGHT_GIRLS.zscore.monthly-e124d92a.js} +0 -0
  482. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-2b2db79a.js → WEIGHT_GIRLS.zscore.weekly-c0d6ac18.js} +0 -0
  483. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-25bc1891.js → WEIGHT_GIRLS.zscore.yearly-7f64006c.js} +0 -0
  484. /package/build/esm/{animation-b4b8edac.js → animation-86caa8d1.js} +0 -0
  485. /package/build/esm/{constants-8e018757.js → constants-134e08ba.js} +0 -0
  486. /package/build/esm/{constants-abbe915a.js → constants-156d8492.js} +0 -0
  487. /package/build/esm/{constants-cb5a7fd0.js → constants-34653367.js} +0 -0
  488. /package/build/esm/{dataTransform-581f339a.js → dataTransform-f92fa974.js} +0 -0
  489. /package/build/esm/{doctor-c6cb7f68.js → doctor-69ef2b3d.js} +0 -0
  490. /package/build/esm/{index-988d51c5.js → index-010c8221.js} +0 -0
  491. /package/build/esm/{index-b617f14d.js → index-5b0973bd.js} +0 -0
  492. /package/build/esm/{index-e42ffb21.js → index-76bf9941.js} +0 -0
  493. /package/build/esm/{index-ebfe74f0.js → index-975ed8d4.js} +0 -0
  494. /package/build/esm/{index-0cfc4fb4.js → index-9be6c39a.js} +0 -0
  495. /package/build/esm/{index-0a379e78.js → index-b2079214.js} +0 -0
  496. /package/build/esm/{index-e942c2ea.js → index-b68e5eea.js} +0 -0
  497. /package/build/esm/{index-29d81893.js → index-cbc0f007.js} +0 -0
  498. /package/build/esm/{index-7be97cef.js → index-f7d3cdec.js} +0 -0
  499. /package/build/esm/{localizeNumberFormat-d7d000f5.js → localizeNumberFormat-3245853d.js} +0 -0
  500. /package/build/esm/{normalizeLink-30ad82cf.js → normalizeLink-85e76e60.js} +0 -0
  501. /package/build/esm/{other-3575130c.js → other-9978577a.js} +0 -0
  502. /package/build/esm/{paths-b73fd913.js → paths-e717ac7e.js} +0 -0
  503. /package/build/esm/{translationsContext-1cd2e30a.js → translationsContext-2035d058.js} +0 -0
  504. /package/build/esm/{tslib.es6-52958ee8.js → tslib.es6-853b6f09.js} +0 -0
  505. /package/build/esm/{types-0df2293f.js → types-63abbbae.js} +0 -0
  506. /package/build/esm/{useIsInit-ab5fe172.js → useIsInit-949d4626.js} +0 -0
  507. /package/build/esm/{useOutsideClick-d6e790bc.js → useOutsideClick-a9d54bef.js} +0 -0
  508. /package/build/esm/{useScrollbarSize-04abc36a.js → useScrollbarSize-829e8561.js} +0 -0
  509. /package/build/esm/{useUniqueId-550be503.js → useUniqueId-806188e2.js} +0 -0
  510. /package/build/esm/{utils-da43426c.js → utils-67521d1b.js} +0 -0
  511. /package/build/{index-be852417.js → index-186a4f1c.js} +0 -0
  512. /package/build/{index-bdcc04ee.js → index-1f62efb7.js} +0 -0
  513. /package/build/{index-0a95712f.js → index-3e4226a4.js} +0 -0
  514. /package/build/{index-f720a8e7.js → index-5029653b.js} +0 -0
  515. /package/build/{index-33986637.js → index-689f0874.js} +0 -0
  516. /package/build/{index-943be1e0.js → index-69269ea3.js} +0 -0
  517. /package/build/{index-31448e57.js → index-be74f7c9.js} +0 -0
  518. /package/build/{index-57b22ff5.js → index-d283c726.js} +0 -0
  519. /package/build/{index-152b5d6d.js → index-e82f929d.js} +0 -0
  520. /package/build/{localizeNumberFormat-29cc719b.js → localizeNumberFormat-52f09941.js} +0 -0
  521. /package/build/{normalizeLink-4d1d066d.js → normalizeLink-a1e163cc.js} +0 -0
  522. /package/build/{other-a38f566b.js → other-a83374bf.js} +0 -0
  523. /package/build/{paths-a1512163.js → paths-61c4d060.js} +0 -0
  524. /package/build/{translationsContext-4dc20069.js → translationsContext-838dd4f0.js} +0 -0
  525. /package/build/{tslib.es6-e8964004.js → tslib.es6-a337f3c7.js} +0 -0
  526. /package/build/{types-9ea371d5.js → types-c5fd9b54.js} +0 -0
  527. /package/build/{useIsInit-accb74ec.js → useIsInit-91548c0a.js} +0 -0
  528. /package/build/{useOutsideClick-b892ea47.js → useOutsideClick-199a171f.js} +0 -0
  529. /package/build/{useScrollbarSize-e3d9da0b.js → useScrollbarSize-249e07cc.js} +0 -0
  530. /package/build/{useUniqueId-707f278a.js → useUniqueId-54940592.js} +0 -0
  531. /package/build/{utils-2f182098.js → utils-33e7b5fc.js} +0 -0
@@ -0,0 +1,1578 @@
1
+ import { a as __awaiter, _ as __rest } from './tslib.es6-853b6f09.js';
2
+ import React__default, { useState, useRef, useEffect, useCallback, useContext, useMemo } from 'react';
3
+ import { Info } from '@hhgtech/icons/other';
4
+ import { D as Dropdown } from './index-f7d3cdec.js';
5
+ import { u as useTranslations } from './index-dd5e8962.js';
6
+ import innertext from 'innertext';
7
+ import { theme } from './miscTheme.js';
8
+ import { I as Input$1 } from './index-de07fc9b.js';
9
+ import { useMantineTheme, Popover } from '@mantine/core';
10
+ import '@mantine/dates';
11
+ import './index-93ffecac.js';
12
+ import './index-b85cd2ee.js';
13
+ import './index-010c8221.js';
14
+ import './useMantineLocale-9f95d45b.js';
15
+ import { T as Text } from './index-1999e28c.js';
16
+ import { B as Button } from './index-e4f4c9bd.js';
17
+ import './index.styles-a97291e2.js';
18
+ import '@mantine/hooks';
19
+ import { M as MediaQueries } from './utils-67521d1b.js';
20
+ import './other-9978577a.js';
21
+ import './index-f7e56b20.js';
22
+ import { u as useImagePicker, a as PopupFrame, d as IconCloseCircle, g as getDefaultFailNoti, e as getPostFormData, f as editPost, h as createPost } from './index-f4a4eb46.js';
23
+ import { T as TogetherComponentGlobalContext, c as callApi, d as getApiPath, p as getCurrentHref, b as callApiWithAuth } from './utils-28a0cbdf.js';
24
+ import styled from '@emotion/styled';
25
+ import { b as formatPost, c as formatTopic } from './dataTransform-615494aa.js';
26
+ import { M as MAX_IMAGE_UPLOADS } from './constants-156d8492.js';
27
+ import { h as highlightBadWords, f as fixMalformedMention, r as removeFontFormat, a as removeEdittedBannedWord, w as wrapAnchorAroundUrls, g as getUrlsFromEditorString, A as ALLOW_DOMAIN_URL, e as escapeRegExp, d as decodeMention, b as decodePostUrl } from './post-2a3e7515.js';
28
+ import { C as CardAuthor, L as Loading$1 } from './index-dd991b1a.js';
29
+ import { S as StyledCreatePostDescription, R as RichTextEditor } from './editor-925a478d.js';
30
+ import { I as Input } from './index-47d348d2.js';
31
+ import debounce from 'lodash/debounce';
32
+ import ContentEditable from 'react-contenteditable';
33
+ import { PATHS } from './togetherApiPaths.js';
34
+ import { L as Loading } from './index-9caa1d9d.js';
35
+ import { C as CardLink } from './index-e0465545.js';
36
+ import { B as BtnChoice } from './index-51c8c313.js';
37
+ import { Close, Check } from '@hhgtech/icons/core';
38
+
39
+ const Ask = ({ size }) => {
40
+ return (React__default.createElement("svg", { width: size, height: size, viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
41
+ React__default.createElement("g", { filter: "url(#filter0_i_4664_166540)" },
42
+ React__default.createElement("circle", { cx: "11.9967", cy: "11.9999", r: "10.2857", fill: "#2D87F3" }),
43
+ React__default.createElement("circle", { cx: "11.9967", cy: "11.9999", r: "10.2857", fill: "url(#paint0_radial_4664_166540)" }),
44
+ React__default.createElement("circle", { cx: "11.9967", cy: "11.9999", r: "10.2857", fill: "url(#paint1_radial_4664_166540)" }),
45
+ React__default.createElement("circle", { cx: "11.9967", cy: "11.9999", r: "10.2857", fill: "url(#paint2_radial_4664_166540)" }),
46
+ React__default.createElement("circle", { cx: "11.9967", cy: "11.9999", r: "10.2857", fill: "url(#paint3_radial_4664_166540)" })),
47
+ React__default.createElement("mask", { id: "path-2-inside-1_4664_166540", fill: "white" },
48
+ React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.7157 18.4674C12.7317 18.7466 13.0316 18.914 13.2709 18.7693C14.5525 17.9944 15.6319 16.9936 16.509 15.767C17.503 14.378 18 12.8301 18 11.1232C18 10.2884 17.8438 9.50974 17.5313 8.78711C17.2188 8.06448 16.7908 7.43231 16.2473 6.89059C15.7033 6.34837 15.0688 5.92152 14.3438 5.61004C13.6188 5.29856 12.8375 5.14282 12 5.14282C10.325 5.14282 8.90625 5.72217 7.74375 6.88087C6.58125 8.03956 6 9.45367 6 11.1232C6 12.7927 6.58125 14.2068 7.74375 15.3655C8.90625 16.5242 10.325 17.1036 12 17.1036H12.2761C12.4789 17.1036 12.6466 17.2619 12.6582 17.4644L12.7157 18.4674ZM11.7825 13.2206C11.9205 13.5131 12.3366 13.5131 12.4747 13.2206L12.9337 12.2483C12.9718 12.1678 13.0367 12.103 13.1173 12.0652L14.0898 11.6091C14.3834 11.4714 14.3834 11.0538 14.0898 10.916L13.1173 10.4599C13.0367 10.4221 12.9718 10.3573 12.9337 10.2768L12.4747 9.30447C12.3366 9.01202 11.9205 9.01202 11.7825 9.30447L11.3234 10.2768C11.2854 10.3573 11.2204 10.4221 11.1398 10.4599L10.1673 10.916C9.87373 11.0538 9.87373 11.4714 10.1673 11.6091L11.1398 12.0652C11.2204 12.103 11.2854 12.1678 11.3234 12.2483L11.7825 13.2206Z" })),
49
+ React__default.createElement("g", { filter: "url(#filter1_i_4664_166540)" },
50
+ React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.7157 18.4674C12.7317 18.7466 13.0316 18.914 13.2709 18.7693C14.5525 17.9944 15.6319 16.9936 16.509 15.767C17.503 14.378 18 12.8301 18 11.1232C18 10.2884 17.8438 9.50974 17.5313 8.78711C17.2188 8.06448 16.7908 7.43231 16.2473 6.89059C15.7033 6.34837 15.0688 5.92152 14.3438 5.61004C13.6188 5.29856 12.8375 5.14282 12 5.14282C10.325 5.14282 8.90625 5.72217 7.74375 6.88087C6.58125 8.03956 6 9.45367 6 11.1232C6 12.7927 6.58125 14.2068 7.74375 15.3655C8.90625 16.5242 10.325 17.1036 12 17.1036H12.2761C12.4789 17.1036 12.6466 17.2619 12.6582 17.4644L12.7157 18.4674ZM11.7825 13.2206C11.9205 13.5131 12.3366 13.5131 12.4747 13.2206L12.9337 12.2483C12.9718 12.1678 13.0367 12.103 13.1173 12.0652L14.0898 11.6091C14.3834 11.4714 14.3834 11.0538 14.0898 10.916L13.1173 10.4599C13.0367 10.4221 12.9718 10.3573 12.9337 10.2768L12.4747 9.30447C12.3366 9.01202 11.9205 9.01202 11.7825 9.30447L11.3234 10.2768C11.2854 10.3573 11.2204 10.4221 11.1398 10.4599L10.1673 10.916C9.87373 11.0538 9.87373 11.4714 10.1673 11.6091L11.1398 12.0652C11.2204 12.103 11.2854 12.1678 11.3234 12.2483L11.7825 13.2206Z", fill: "white" })),
51
+ React__default.createElement("path", { d: "M13.2709 18.7693L13.2214 18.6874L13.2709 18.7693ZM12.7157 18.4674L12.6202 18.4729L12.7157 18.4674ZM16.509 15.767L16.4312 15.7113L16.4312 15.7113L16.509 15.767ZM17.5313 8.78711L17.4434 8.82509L17.5313 8.78711ZM16.2473 6.89059L16.1797 6.95836L16.2473 6.89059ZM14.3438 5.61004L14.306 5.69795H14.306L14.3438 5.61004ZM7.74375 6.88087L7.6762 6.8131L7.74375 6.88087ZM7.74375 15.3655L7.8113 15.2977L7.74375 15.3655ZM12.6582 17.4644L12.7537 17.4589L12.6582 17.4644ZM12.4747 13.2206L12.5612 13.2615L12.4747 13.2206ZM11.7825 13.2206L11.869 13.1798L11.7825 13.2206ZM12.9337 12.2483L13.0203 12.2892L12.9337 12.2483ZM13.1173 12.0652L13.1579 12.1518L13.1173 12.0652ZM14.0898 11.6091L14.0491 11.5224L14.0898 11.6091ZM14.0898 10.916L14.1304 10.8294H14.1304L14.0898 10.916ZM13.1173 10.4599L13.1579 10.3733H13.1579L13.1173 10.4599ZM12.9337 10.2768L12.8472 10.3176L12.9337 10.2768ZM12.4747 9.30447L12.5612 9.26361L12.4747 9.30447ZM11.7825 9.30447L11.6959 9.26361V9.26361L11.7825 9.30447ZM11.3234 10.2768L11.4099 10.3176L11.3234 10.2768ZM11.1398 10.4599L11.0992 10.3733L11.1398 10.4599ZM10.1673 10.916L10.1267 10.8294L10.1673 10.916ZM10.1673 11.6091L10.208 11.5224L10.1673 11.6091ZM11.1398 12.0652L11.0992 12.1518L11.1398 12.0652ZM11.3234 12.2483L11.4099 12.2075L11.3234 12.2483ZM13.2214 18.6874C13.0474 18.7926 12.8233 18.6734 12.8112 18.4619L12.6202 18.4729C12.64 18.8198 13.0159 19.0353 13.3204 18.8512L13.2214 18.6874ZM16.4312 15.7113C15.5616 16.9274 14.4918 17.9193 13.2214 18.6874L13.3204 18.8512C14.6133 18.0695 15.7022 17.0598 16.5868 15.8226L16.4312 15.7113ZM17.9043 11.1232C17.9043 12.8101 17.4136 14.3386 16.4312 15.7113L16.5868 15.8226C17.5924 14.4175 18.0957 12.8501 18.0957 11.1232H17.9043ZM17.4434 8.82509C17.7504 9.53501 17.9043 10.3007 17.9043 11.1232H18.0957C18.0957 10.2762 17.9371 9.48446 17.6191 8.74913L17.4434 8.82509ZM16.1797 6.95836C16.7144 7.4913 17.1356 8.11329 17.4434 8.82509L17.6191 8.74913C17.3019 8.01567 16.8671 7.37332 16.3148 6.82281L16.1797 6.95836ZM14.306 5.69795C15.0202 6.00479 15.6445 6.42491 16.1797 6.95836L16.3148 6.82281C15.762 6.27182 15.1173 5.83824 14.3815 5.52212L14.306 5.69795ZM12 5.23851C12.8253 5.23851 13.5936 5.39191 14.306 5.69795L14.3815 5.52212C13.6439 5.20521 12.8497 5.04714 12 5.04714V5.23851ZM7.8113 6.94864C8.95546 5.80823 10.3497 5.23851 12 5.23851V5.04714C10.3003 5.04714 8.85704 5.63612 7.6762 6.8131L7.8113 6.94864ZM6.09569 11.1232C6.09569 9.47861 6.66716 8.08904 7.8113 6.94864L7.6762 6.8131C6.49534 7.99009 5.90431 9.42873 5.90431 11.1232H6.09569ZM7.8113 15.2977C6.66716 14.1573 6.09569 12.7678 6.09569 11.1232H5.90431C5.90431 12.8177 6.49534 14.2563 7.6762 15.4333L7.8113 15.2977ZM12 17.0079C10.3497 17.0079 8.95546 16.4382 7.8113 15.2977L7.6762 15.4333C8.85704 16.6103 10.3003 17.1993 12 17.1993V17.0079ZM12.2761 17.0079H12V17.1993H12.2761V17.0079ZM12.7537 17.4589C12.7392 17.2057 12.5297 17.0079 12.2761 17.0079V17.1993C12.4282 17.1993 12.5539 17.318 12.5627 17.4699L12.7537 17.4589ZM12.8112 18.4619L12.7537 17.4589L12.5627 17.4699L12.6202 18.4729L12.8112 18.4619ZM12.3881 13.1798C12.2846 13.3991 11.9725 13.3991 11.869 13.1798L11.6959 13.2615C11.8685 13.627 12.3886 13.627 12.5612 13.2615L12.3881 13.1798ZM12.8472 12.2075L12.3881 13.1798L12.5612 13.2615L13.0203 12.2892L12.8472 12.2075ZM13.0767 11.9786C12.9759 12.0259 12.8947 12.1068 12.8472 12.2075L13.0203 12.2892C13.0488 12.2288 13.0975 12.1802 13.1579 12.1518L13.0767 11.9786ZM14.0491 11.5224L13.0767 11.9786L13.1579 12.1518L14.1304 11.6957L14.0491 11.5224ZM14.0491 11.0027C14.2694 11.106 14.2694 11.4192 14.0491 11.5224L14.1304 11.6957C14.4974 11.5236 14.4974 11.0016 14.1304 10.8294L14.0491 11.0027ZM13.0767 10.5465L14.0491 11.0027L14.1304 10.8294L13.1579 10.3733L13.0767 10.5465ZM12.8472 10.3176C12.8947 10.4183 12.9759 10.4992 13.0767 10.5465L13.1579 10.3733C13.0975 10.3449 13.0488 10.2963 13.0203 10.2359L12.8472 10.3176ZM12.3881 9.34532L12.8472 10.3176L13.0203 10.2359L12.5612 9.26361L12.3881 9.34532ZM11.869 9.34532C11.9725 9.12598 12.2846 9.12598 12.3881 9.34532L12.5612 9.26361C12.3886 8.89806 11.8685 8.89806 11.6959 9.26361L11.869 9.34532ZM11.4099 10.3176L11.869 9.34532L11.6959 9.26361L11.2369 10.2359L11.4099 10.3176ZM11.1805 10.5465C11.2812 10.4992 11.3624 10.4183 11.4099 10.3176L11.2369 10.2359C11.2083 10.2963 11.1597 10.3449 11.0992 10.3733L11.1805 10.5465ZM10.208 11.0027L11.1805 10.5465L11.0992 10.3733L10.1267 10.8294L10.208 11.0027ZM10.208 11.5224C9.98777 11.4192 9.98776 11.106 10.208 11.0027L10.1267 10.8294C9.75969 11.0016 9.75969 11.5236 10.1267 11.6957L10.208 11.5224ZM11.1805 11.9786L10.208 11.5224L10.1267 11.6957L11.0992 12.1518L11.1805 11.9786ZM11.4099 12.2075C11.3624 12.1068 11.2812 12.0259 11.1805 11.9786L11.0992 12.1518C11.1597 12.1802 11.2083 12.2288 11.2369 12.2892L11.4099 12.2075ZM11.869 13.1798L11.4099 12.2075L11.2369 12.2892L11.6959 13.2615L11.869 13.1798Z", fill: "url(#paint4_linear_4664_166540)", mask: "url(#path-2-inside-1_4664_166540)" }),
52
+ React__default.createElement("g", { filter: "url(#filter2_i_4664_166540)" },
53
+ React__default.createElement("path", { d: "M22.0963 4.65404L22.3807 5.27459C22.5111 5.55904 22.9153 5.55904 23.0456 5.27459L23.33 4.65404C23.3666 4.57438 23.4305 4.51048 23.5101 4.47396L24.1307 4.18955C24.4151 4.05918 24.4151 3.65501 24.1307 3.52463L23.5101 3.24022C23.4305 3.20371 23.3666 3.1398 23.33 3.06014L23.0456 2.43959C22.9153 2.15514 22.5111 2.15514 22.3807 2.43959L22.0963 3.06014C22.0598 3.1398 21.9959 3.20371 21.9162 3.24022L21.2957 3.52463C21.0112 3.65501 21.0112 4.05917 21.2957 4.18955L21.9162 4.47396C21.9959 4.51048 22.0598 4.57438 22.0963 4.65404Z", fill: "#2D87F3" })),
54
+ React__default.createElement("defs", null,
55
+ React__default.createElement("filter", { id: "filter0_i_4664_166540", x: "1.71094", y: "1.71423", width: "22.5703", height: "24.5714", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB" },
56
+ React__default.createElement("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
57
+ React__default.createElement("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
58
+ React__default.createElement("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }),
59
+ React__default.createElement("feOffset", { dx: "2", dy: "4" }),
60
+ React__default.createElement("feGaussianBlur", { stdDeviation: "8" }),
61
+ React__default.createElement("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: "-1", k3: "1" }),
62
+ React__default.createElement("feColorMatrix", { type: "matrix", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.25 0" }),
63
+ React__default.createElement("feBlend", { mode: "normal", in2: "shape", result: "effect1_innerShadow_4664_166540" })),
64
+ React__default.createElement("filter", { id: "filter1_i_4664_166540", x: "6", y: "5.14282", width: "12.7655", height: "14.4451", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB" },
65
+ React__default.createElement("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
66
+ React__default.createElement("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
67
+ React__default.createElement("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }),
68
+ React__default.createElement("feOffset", { dx: "0.765488", dy: "0.765488" }),
69
+ React__default.createElement("feGaussianBlur", { stdDeviation: "0.765488" }),
70
+ React__default.createElement("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: "-1", k3: "1" }),
71
+ React__default.createElement("feColorMatrix", { type: "matrix", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.25 0" }),
72
+ React__default.createElement("feBlend", { mode: "normal", in2: "shape", result: "effect1_innerShadow_4664_166540" })),
73
+ React__default.createElement("filter", { id: "filter2_i_4664_166540", x: "21.0859", y: "2.2262", width: "3.98924", height: "3.99315", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB" },
74
+ React__default.createElement("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
75
+ React__default.createElement("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
76
+ React__default.createElement("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }),
77
+ React__default.createElement("feOffset", { dx: "0.731427", dy: "0.731427" }),
78
+ React__default.createElement("feGaussianBlur", { stdDeviation: "0.731427" }),
79
+ React__default.createElement("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: "-1", k3: "1" }),
80
+ React__default.createElement("feColorMatrix", { type: "matrix", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.25 0" }),
81
+ React__default.createElement("feBlend", { mode: "normal", in2: "shape", result: "effect1_innerShadow_4664_166540" })),
82
+ React__default.createElement("radialGradient", { id: "paint0_radial_4664_166540", cx: "0", cy: "0", r: "1", gradientUnits: "userSpaceOnUse", gradientTransform: "translate(24.0421 -0.4454) rotate(130.991) scale(30.1148 29.3127)" },
83
+ React__default.createElement("stop", { stopColor: "#3D6CFD" }),
84
+ React__default.createElement("stop", { offset: "1", stopColor: "#3C6BFD", stopOpacity: "0" })),
85
+ React__default.createElement("radialGradient", { id: "paint1_radial_4664_166540", cx: "0", cy: "0", r: "1", gradientUnits: "userSpaceOnUse", gradientTransform: "translate(0.893037 -8.6813) rotate(65.1606) scale(37.2296 21.2343)" },
86
+ React__default.createElement("stop", { stopColor: "#A3F1FF" }),
87
+ React__default.createElement("stop", { offset: "1", stopColor: "#AEF3FF", stopOpacity: "0" })),
88
+ React__default.createElement("radialGradient", { id: "paint2_radial_4664_166540", cx: "0", cy: "0", r: "1", gradientUnits: "userSpaceOnUse", gradientTransform: "translate(3.31808 22.2857) rotate(-45) scale(8.6368 7.70429)" },
89
+ React__default.createElement("stop", { stopColor: "#9EFF3F" }),
90
+ React__default.createElement("stop", { offset: "0.963398", stopColor: "#93FF3E", stopOpacity: "0" })),
91
+ React__default.createElement("radialGradient", { id: "paint3_radial_4664_166540", cx: "0", cy: "0", r: "1", gradientUnits: "userSpaceOnUse", gradientTransform: "translate(24.4386 32.3518) rotate(-119.24) scale(35.1115 12.2522)" },
92
+ React__default.createElement("stop", { stopColor: "#02FAF8" }),
93
+ React__default.createElement("stop", { offset: "1", stopColor: "#01FCFC", stopOpacity: "0" })),
94
+ React__default.createElement("linearGradient", { id: "paint4_linear_4664_166540", x1: "12", y1: "4.93885", x2: "12", y2: "19.0338", gradientUnits: "userSpaceOnUse" },
95
+ React__default.createElement("stop", { stopColor: "white" }),
96
+ React__default.createElement("stop", { offset: "0.0965062", stopColor: "white", stopOpacity: "0" }),
97
+ React__default.createElement("stop", { offset: "0.706019", stopColor: "white", stopOpacity: "0.53" }),
98
+ React__default.createElement("stop", { offset: "1", stopColor: "white", stopOpacity: "0" })))));
99
+ };
100
+
101
+ const StyledCreateNewPost = styled.div `
102
+ position: relative;
103
+ display: flex;
104
+ height: 100%;
105
+ flex-direction: column;
106
+ padding: 16px 24px;
107
+
108
+ ${MediaQueries.mbDown} {
109
+ padding: 16px 16px;
110
+ }
111
+
112
+ .input-group-container {
113
+ flex: 1;
114
+ padding-right: 2px;
115
+ padding-left: 2px;
116
+ margin-bottom: 24px;
117
+ -ms-overflow-style: none; /* IE and Edge */
118
+ overflow-y: auto;
119
+ scrollbar-width: none; /* Firefox */
120
+ &::-webkit-scrollbar {
121
+ display: none;
122
+ }
123
+ }
124
+
125
+ .input-group {
126
+ :not(:last-child) {
127
+ margin-bottom: 0.6rem;
128
+ }
129
+
130
+ input:focus,
131
+ textarea:focus,
132
+ [contenteditable='true'] {
133
+ outline: none;
134
+ }
135
+
136
+ label {
137
+ margin-bottom: 5px;
138
+ color: ${theme.colors.gray600};
139
+ /* font-family: 'Open Sans', sans-serif; */
140
+ font-size: 13px;
141
+ font-weight: bold;
142
+ }
143
+
144
+ .input-group-label {
145
+ margin-bottom: 5px;
146
+ color: ${theme.colors.gray600};
147
+ /* font-family: 'Open Sans', sans-serif; */
148
+ font-size: 13px;
149
+ font-weight: bold;
150
+ }
151
+
152
+ .input-notification {
153
+ display: flex;
154
+
155
+ & > img {
156
+ width: 16px;
157
+ height: 16px;
158
+ margin-top: 1.5px;
159
+ margin-right: 8px;
160
+ }
161
+ }
162
+
163
+ .tag-list {
164
+ }
165
+ }
166
+
167
+ .warning {
168
+ margin-top: 16px;
169
+ }
170
+
171
+ .submit-btn {
172
+ width: 100%;
173
+ }
174
+
175
+ .switch-label {
176
+ display: flex;
177
+ align-items: center;
178
+ }
179
+
180
+ .swich-input-group {
181
+ padding: 12px 16px;
182
+ border-radius: 8px;
183
+ background: ${theme.colors.neutral50};
184
+
185
+ &.askdoctor-switch {
186
+ background: ${theme.colors.primary50};
187
+ &.mb-color {
188
+ background: ${theme.mbColors.tonePink};
189
+ }
190
+ }
191
+
192
+ .mantine-Switch-labelWrapper {
193
+ flex-grow: 1;
194
+ }
195
+ .mantine-Checkbox-body {
196
+ display: flex;
197
+ width: 100%;
198
+ align-items: center;
199
+ justify-content: space-between;
200
+ }
201
+ .mantine-Switch-track {
202
+ margin-bottom: 0;
203
+ }
204
+ .label-txt {
205
+ font-weight: normal;
206
+ font-size: 14px;
207
+ color: ${theme.colors.gray800};
208
+ margin-left: 10px;
209
+ }
210
+ }
211
+ `;
212
+ const StyledIsQuestion = styled.div `
213
+ display: flex;
214
+ width: 100%;
215
+ align-items: center;
216
+ justify-content: space-between;
217
+ padding: 8px 12px;
218
+ border-radius: 0 0 8px 8px;
219
+ background: ${theme.colors.neutral50};
220
+ border: 1px solid ${theme.colors.gray200};
221
+ gap: 12px;
222
+
223
+ &.has-error {
224
+ border: 1px solid ${theme.colors.red600};
225
+ }
226
+ &.error-description {
227
+ border: 1px solid ${theme.colors.red600};
228
+ border-top: none;
229
+ }
230
+
231
+ &[data-is-marry-baby='true'] {
232
+ background: ${theme.mbColors.tonePink};
233
+ }
234
+
235
+ .switch-label {
236
+ display: flex;
237
+ gap: 4px;
238
+ align-items: flex-start;
239
+
240
+ svg {
241
+ margin-top: 2px;
242
+ }
243
+
244
+ .wrapper-text {
245
+ .label-txt {
246
+ color: ${theme.colors.gray800};
247
+ font-size: 14px;
248
+ font-weight: 600;
249
+ line-height: 22px;
250
+ }
251
+ .description-txt {
252
+ color: ${theme.colors.gray700};
253
+ font-size: 12px;
254
+ font-weight: 400;
255
+ line-height: 18px;
256
+ }
257
+ }
258
+ }
259
+
260
+ button {
261
+ height: 40px;
262
+ &:hover,
263
+ &.primary {
264
+ border-radius: 4px;
265
+ border: 1px solid ${theme.colors.blue100};
266
+ background: ${theme.colors.blue50};
267
+ color: ${theme.colors.primaryBase};
268
+ }
269
+ }
270
+ `;
271
+ const StyledError = styled.div `
272
+ margin-bottom: 12px;
273
+ color: ${theme.colors.red700};
274
+ svg {
275
+ margin-right: 5px;
276
+ }
277
+ svg,
278
+ span {
279
+ vertical-align: middle;
280
+ }
281
+ `;
282
+ const StyledFormGroupInner = styled.div `
283
+ .swich-input-group {
284
+ padding: 12px 16px;
285
+ border-radius: 8px;
286
+ background: ${theme.colors.neutral50};
287
+
288
+ &.askdoctor-switch {
289
+ background: ${theme.colors.blue50};
290
+ }
291
+
292
+ .switch-label {
293
+ display: flex;
294
+ align-items: center;
295
+ }
296
+ .mantine-Switch-labelWrapper {
297
+ flex-grow: 1;
298
+ }
299
+ .mantine-Checkbox-body {
300
+ display: flex;
301
+ width: 100%;
302
+ align-items: center;
303
+ justify-content: space-between;
304
+ }
305
+ .mantine-Switch-track {
306
+ margin-bottom: 0;
307
+ }
308
+ .label-txt {
309
+ font-weight: normal;
310
+ font-size: 14px;
311
+ color: ${theme.colors.gray800};
312
+ margin-left: 14px;
313
+ }
314
+ }
315
+ `;
316
+ const StylePostAction = styled.div `
317
+ display: flex;
318
+ gap: 12px;
319
+ .avatar {
320
+ width: 40px;
321
+ height: 40px;
322
+ border-radius: 100%;
323
+
324
+ img {
325
+ border-radius: 100%;
326
+ }
327
+
328
+ .author-avatar {
329
+ .col-left {
330
+ display: none;
331
+ }
332
+ }
333
+ }
334
+
335
+ .post-action-form {
336
+ display: flex;
337
+ flex-direction: column;
338
+ gap: 4px;
339
+ }
340
+
341
+ .post-action-by {
342
+ color: ${theme.colors.gray800};
343
+ font-size: 16px;
344
+ font-weight: 600;
345
+ line-height: 24px;
346
+ }
347
+
348
+ .post-action-result {
349
+ display: flex;
350
+ position: relative;
351
+ &:after {
352
+ content: '';
353
+ display: inline-block;
354
+ width: 5px;
355
+ height: 5px;
356
+ background-color: ${theme.colors.error};
357
+ border-radius: 100%;
358
+ position: absolute;
359
+ right: 7px;
360
+ }
361
+ }
362
+
363
+ .dropdown-post-action {
364
+ background: ${theme.colors.white} !important;
365
+ border-radius: 2px;
366
+ border: 1px solid ${theme.colors.neutral200} !important;
367
+
368
+ > div {
369
+ padding: 3px 8px;
370
+ }
371
+
372
+ span {
373
+ flex: 1;
374
+ color: ${theme.colors.gray600};
375
+ font-size: 12px;
376
+ font-weight: 600;
377
+ line-height: 18px;
378
+ }
379
+
380
+ ul {
381
+ width: 130px;
382
+ li {
383
+ img {
384
+ flex: 0 0 16px;
385
+ width: 16px;
386
+ }
387
+ }
388
+ }
389
+ }
390
+ `;
391
+ const StyleSessionRow = styled.div `
392
+ display: inline-flex;
393
+ gap: 8px;
394
+ align-items: center;
395
+ cursor: pointer;
396
+
397
+ .session-title {
398
+ color: ${theme.colors.gray700};
399
+ font-size: 14px;
400
+ font-weight: 400;
401
+ line-height: 22px;
402
+ flex: 1;
403
+ }
404
+ `;
405
+
406
+ var img$5 = "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 fill-rule='evenodd' clip-rule='evenodd' d='M4.61638 3.56867C4.84773 2.87459 5.49727 2.40642 6.2289 2.40642C6.67971 2.40642 7.11204 2.58549 7.43084 2.90429L8.0013 3.47475L8.57177 2.90429C8.89056 2.58549 9.32289 2.40642 9.7737 2.40642C10.5053 2.40642 11.1549 2.8746 11.3862 3.56868L12.3331 6.40934H3.66948L4.61638 3.56867ZM15.3346 6.40934H13.4644L12.4043 3.22931C12.0269 2.09701 10.9673 1.33325 9.7737 1.33325C9.12365 1.33325 8.49715 1.56149 8.0013 1.97363C7.50546 1.56149 6.87895 1.33325 6.2289 1.33325C5.03534 1.33325 3.9757 2.09702 3.59828 3.22931L2.53825 6.40934H0.667969V6.94592C0.667969 8.17681 1.6658 9.17465 2.89669 9.17465H13.1059C14.3368 9.17465 15.3346 8.17681 15.3346 6.94592V6.40934ZM2.89669 8.10148C2.45219 8.10148 2.0663 7.85049 1.87301 7.48251H14.1296C13.9363 7.85049 13.5504 8.10148 13.1059 8.10148H2.89669ZM5.0398 13.178C4.17021 13.178 3.46467 12.4742 3.46252 11.6046L3.46239 11.5528C4.48802 11.2233 5.59156 11.2232 6.61724 11.5526L6.61704 11.6065C6.61386 12.4753 5.90864 13.178 5.0398 13.178ZM7.25616 10.6398C5.82875 10.0967 4.25135 10.0966 2.82397 10.6398L1.6558 10.6397L1.65577 11.7129L2.39168 11.7129C2.45056 13.1251 3.61394 14.2511 5.0398 14.2511C6.46547 14.2511 7.62898 13.1253 7.68788 11.7129H8.31416C8.37305 13.1251 9.53643 14.2511 10.9623 14.2511C12.388 14.2511 13.5515 13.1253 13.6104 11.7129L14.3468 11.7129L14.3468 10.6397L13.1786 10.6398C11.7512 10.0966 10.1738 10.0966 8.74644 10.6398H7.25616ZM10.9623 13.178C10.0927 13.178 9.38716 12.4742 9.385 11.6046L9.38487 11.5528C10.4105 11.2233 11.514 11.2232 12.5397 11.5526L12.5395 11.6065C12.5363 12.4753 11.8311 13.178 10.9623 13.178Z' fill='%23404040'/%3e%3c/svg%3e";
407
+ var IconAnonymous = img$5;
408
+
409
+ var img$4 = "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 fill-rule='evenodd' clip-rule='evenodd' d='M6.67419 2.06156C4.13645 2.62563 2.1956 4.77487 1.94427 7.41667H4.77719C4.91981 5.4892 5.5776 3.64052 6.67419 2.06156ZM9.32581 2.06156C10.4224 3.64052 11.0802 5.4892 11.2228 7.41667H14.0557C13.8044 4.77487 11.8636 2.62563 9.32581 2.06156ZM10.0526 7.41667C9.89538 5.52352 9.18073 3.71931 8 2.23244C6.81927 3.71931 6.10463 5.52352 5.94744 7.41667H10.0526ZM10.0526 8.58333C9.89547 10.4766 9.18081 12.281 8 13.7679C6.81919 12.281 6.10453 10.4766 5.94741 8.58333H10.0526ZM4.77717 8.58333H1.94427C2.19559 11.225 4.13629 13.3742 6.6739 13.9384C5.57741 12.3594 4.91971 10.5108 4.77717 8.58333ZM9.32611 13.9384C10.4226 12.3594 11.0803 10.5108 11.2228 8.58333H14.0557C13.8044 11.225 11.8637 13.3742 9.32611 13.9384ZM8 15.25C12.0041 15.25 15.25 12.0041 15.25 8C15.25 3.99594 12.0041 0.75 8 0.75C3.99594 0.75 0.75 3.99594 0.75 8C0.75 12.0041 3.99594 15.25 8 15.25Z' fill='%23404040'/%3e%3c/svg%3e";
410
+ var IconPublic = img$4;
411
+
412
+ styled.div `
413
+ background-color: white;
414
+ z-index: 1000;
415
+ top: 0;
416
+ left: 0;
417
+ height: 100%;
418
+ position: absolute;
419
+ width: 100%;
420
+
421
+ .drawer-header {
422
+ display: flex;
423
+ gap: 12px;
424
+ align-items: center;
425
+ padding: 12px 16px;
426
+ border-bottom: 1px solid ${theme.colors.gray200};
427
+
428
+ .input-group-label {
429
+ flex: 1;
430
+ }
431
+
432
+ img {
433
+ cursor: pointer;
434
+ }
435
+
436
+ p {
437
+ flex: 1;
438
+ }
439
+ }
440
+
441
+ .drawer-content {
442
+ padding: 16px;
443
+ display: flex;
444
+ flex-direction: column;
445
+ gap: 16px;
446
+ overflow-y: auto;
447
+ height: calc(100% - 49px);
448
+
449
+ .input-field-label {
450
+ margin-bottom: 8px;
451
+ }
452
+
453
+ &.drawer-content-full-screen {
454
+ max-width: 680px;
455
+ margin: 0 auto;
456
+ padding: 16px 24px;
457
+ }
458
+ }
459
+ `;
460
+ const StyleCommunityReivew = styled.div `
461
+ display: flex;
462
+ flex-direction: column;
463
+ gap: 8px;
464
+ margin-top: 8px;
465
+
466
+ .topic-review {
467
+ display: flex;
468
+ gap: 4px;
469
+ flex-wrap: wrap;
470
+ }
471
+
472
+ .community-review {
473
+ .tag-item {
474
+ background-color: ${theme.colors.neutral50};
475
+
476
+ img {
477
+ border-radius: 50%;
478
+ margin-right: 8px;
479
+ }
480
+ }
481
+ }
482
+ `;
483
+
484
+ var img$3 = "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 fill-rule='evenodd' clip-rule='evenodd' d='M4.86019 13.3957C4.98735 13.5229 5.14492 13.5865 5.33291 13.5865H13.3233L15.9771 16.2403V5.91343C15.9771 5.72546 15.9135 5.56789 15.7864 5.44072C15.6592 5.31356 15.5016 5.24998 15.3136 5.24998H14.1887V12.036L13.9507 11.798H4.66944V12.923C4.66944 13.111 4.73302 13.2686 4.86019 13.3957ZM2.01562 3.28847V12.9519L4.66944 10.298H12.0252C12.2132 10.298 12.3708 10.2345 12.4979 10.1073C12.6251 9.98014 12.6887 9.82257 12.6887 9.63459V3.28847C12.6887 3.10048 12.6251 2.94291 12.4979 2.81574C12.3708 2.68858 12.2132 2.625 12.0252 2.625H2.67909C2.49111 2.625 2.33353 2.68858 2.20637 2.81574C2.07921 2.94291 2.01562 3.10048 2.01562 3.28847Z' fill='%232D87F3'/%3e%3c/svg%3e";
485
+ var IconCommunity = img$3;
486
+
487
+ const PostCommunityReview = ({ selectedTopics, currentCommunity }) => {
488
+ return (React__default.createElement(StyleCommunityReivew, null,
489
+ React__default.createElement("div", { className: "community-review" },
490
+ React__default.createElement(Button, { skipHover: true, size: "md", radius: "xl", className: "tag-item", variant: "tertiary" },
491
+ React__default.createElement(Text, { size: "p4", as: "span", color: "inherit" }, currentCommunity.name))),
492
+ React__default.createElement("div", { className: "topic-review" }, selectedTopics.map((topic) => {
493
+ return (React__default.createElement(Button, { skipHover: true, size: "sm", radius: "xl", className: "tag-item", key: topic.id, variant: "tertiary" },
494
+ React__default.createElement(Text, { size: "p4", as: "span", color: "inherit" }, topic.name)));
495
+ }))));
496
+ };
497
+ const CreatePostCommunity = ({ communitiesList, currentCommunity, selectedTopics, forceTopics, communityValue,
498
+ // error,
499
+ isFullscreen, isInEditMode, setSelectedTopics, setCommunityValue, removeKeyError, }) => {
500
+ const { t } = useTranslations();
501
+ const props = {
502
+ communitiesList,
503
+ currentCommunity,
504
+ selectedTopics,
505
+ communityValue,
506
+ isFullscreen,
507
+ isInEditMode,
508
+ forceTopics,
509
+ setSelectedTopics,
510
+ setCommunityValue,
511
+ removeKeyError,
512
+ };
513
+ console.log(props);
514
+ return (React__default.createElement("div", { className: "input-group" },
515
+ React__default.createElement(StyleSessionRow, null,
516
+ React__default.createElement("img", { alt: "anonymous-icon", src: IconCommunity, style: {
517
+ width: '18px',
518
+ height: '18px',
519
+ objectFit: 'contain',
520
+ marginLeft: 'auto',
521
+ } }),
522
+ React__default.createElement("div", { className: "session-title" }, t('createPost.communityAndTopic'))),
523
+ React__default.createElement(PostCommunityReview, { selectedTopics: selectedTopics, currentCommunity: currentCommunity })));
524
+ };
525
+
526
+ const CreatePostDescription = ({ className, style, bannedWords = [], value, onChange, onPreviewUrlChange, onInvalidUrlsChange,
527
+ // onImageFilesChange,
528
+ // imageFiles: imageFilesProp,
529
+ isReplying, footerEditor, }) => {
530
+ const { t } = useTranslations();
531
+ const [previewUrl, setPreviewUrl] = useState(null);
532
+ const imagePicker = useRef(null);
533
+ // const {
534
+ // onSelectImages,
535
+ // onRemoveImage,
536
+ // imageSrcs,
537
+ // // imageFiles,
538
+ // } = useImagePicker(imageFilesProp, onImageFilesChange)
539
+ useEffect(() => {
540
+ if (onPreviewUrlChange) {
541
+ if (previewUrl === null || previewUrl === void 0 ? void 0 : previewUrl.url)
542
+ onPreviewUrlChange({
543
+ title: previewUrl.title || '',
544
+ url: previewUrl.url || '',
545
+ image: previewUrl.image || '',
546
+ description: previewUrl.description || '',
547
+ });
548
+ else
549
+ onPreviewUrlChange(null);
550
+ }
551
+ }, [previewUrl]);
552
+ return (React__default.createElement(StyledCreatePostDescription, { className: className, style: style },
553
+ React__default.createElement(Text, { size: "p4", className: "description-label" }, t('createPost.popup.description')),
554
+ React__default.createElement("div", { className: `textarea-control` },
555
+ React__default.createElement("div", { className: "textarea-wrapper" },
556
+ React__default.createElement(RichTextEditor, { html: value || '', onChange: onChange, bannedWords: bannedWords, onImagePickerClick: () => { var _a; return (_a = imagePicker.current) === null || _a === void 0 ? void 0 : _a.click(); }, onPreviewUrlChange: setPreviewUrl, onInvalidUrlsChange: onInvalidUrlsChange, isReplying: isReplying }))),
557
+ footerEditor,
558
+ React__default.createElement(Text, { size: "p4", className: "count-string" },
559
+ t('character'),
560
+ ": ",
561
+ innertext(value || '').length)));
562
+ };
563
+
564
+ var img$2 = "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 fill-rule='evenodd' clip-rule='evenodd' d='M3.01875 14.9812C3.28125 15.2437 3.60193 15.375 3.98078 15.375H14.0192C14.398 15.375 14.7187 15.2437 14.9812 14.9812C15.2437 14.7187 15.375 14.398 15.375 14.0192V3.98078C15.375 3.60193 15.2437 3.28125 14.9812 3.01875C14.7187 2.75625 14.398 2.625 14.0192 2.625H3.98078C3.60193 2.625 3.28125 2.75625 3.01875 3.01875C2.75625 3.28125 2.625 3.60193 2.625 3.98078V14.0192C2.625 14.398 2.75625 14.7187 3.01875 14.9812ZM12.3173 12.5625H5.74041C5.60483 12.5625 5.50435 12.5009 5.43896 12.3779C5.37358 12.2548 5.38608 12.1355 5.47646 12.0202L6.65914 10.4466C6.72933 10.3563 6.81851 10.3111 6.92668 10.3111C7.03486 10.3111 7.12404 10.3538 7.19423 10.4394L8.42306 12.0144L10.2577 9.62453C10.3279 9.53414 10.4182 9.48894 10.5288 9.48894C10.6394 9.48894 10.7298 9.53414 10.8 9.62453L12.5884 12.0202C12.674 12.1355 12.6841 12.2548 12.6187 12.3779C12.5533 12.5009 12.4528 12.5625 12.3173 12.5625Z' fill='%2300B16A'/%3e%3c/svg%3e";
565
+ var IconPhone = img$2;
566
+
567
+ const CreatePostPhotos = ({ imageFiles: imageFilesInit, setImageFiles, }) => {
568
+ const imageRef = useRef(null);
569
+ const { t } = useTranslations();
570
+ const { onSelectImages } = useImagePicker(imageFilesInit, setImageFiles);
571
+ const handleClick = () => {
572
+ var _a;
573
+ (_a = imageRef === null || imageRef === void 0 ? void 0 : imageRef.current) === null || _a === void 0 ? void 0 : _a.click();
574
+ };
575
+ return (React__default.createElement("div", { className: "input-group" },
576
+ React__default.createElement(StyleSessionRow, { onClick: handleClick },
577
+ React__default.createElement("img", { alt: "anonymous-icon", src: IconPhone, style: {
578
+ width: '18px',
579
+ height: '18px',
580
+ objectFit: 'contain',
581
+ marginLeft: 'auto',
582
+ } }),
583
+ React__default.createElement("div", { className: "session-title" }, t('createPost.photos'))),
584
+ React__default.createElement("input", { ref: imageRef, type: "file", accept: "image/png, image/gif, image/jpeg", multiple: true, style: { display: 'none' }, onChange: (e) => onSelectImages(e) })));
585
+ };
586
+
587
+ const StyledCreatePostTitle = styled.div `
588
+ input:focus,
589
+ textarea:focus,
590
+ [contenteditable='true'] {
591
+ outline: none;
592
+ }
593
+
594
+ .title-input {
595
+ overflow: hidden;
596
+ width: 100%;
597
+ padding: 12px 16px;
598
+ border: solid 1px #d9d9d9;
599
+ border-radius: ${theme.borderRadius};
600
+ font-size: 16px;
601
+ line-height: 1.2;
602
+ white-space: nowrap;
603
+ :focus {
604
+ border-color: ${theme.colors.primaryBase};
605
+ box-shadow: 0px 0px 2px 2px ${theme.colors.primary200};
606
+ }
607
+ br {
608
+ display: none;
609
+ }
610
+ * {
611
+ display: inline;
612
+ white-space: nowrap;
613
+ }
614
+ mocka {
615
+ padding: 2px 6px;
616
+ border-radius: 1rem;
617
+ &[data-error='true'] {
618
+ background-color: #ffeeee;
619
+ color: red;
620
+ text-decoration: underline;
621
+ font-style: bold;
622
+ }
623
+ }
624
+ ol,
625
+ ul {
626
+ padding-left: 1rem;
627
+ }
628
+ }
629
+
630
+ label {
631
+ display: block;
632
+ margin-bottom: 5px;
633
+ color: ${theme.colors.gray600};
634
+ font-size: 13px;
635
+ font-weight: bold;
636
+ }
637
+
638
+ .count-string {
639
+ margin-top: 5px;
640
+ color: ${theme.colors.gray500};
641
+ font-size: 11px;
642
+ text-align: right;
643
+ }
644
+ `;
645
+
646
+ const TITLE_LIMIT = 120;
647
+ const inputModify$1 = (value, opts) => {
648
+ if (!opts)
649
+ return value;
650
+ const { limit, bannedWords = [] } = opts;
651
+ const shorten = typeof limit === 'number' && limit >= 0 ? value.substring(0, limit) : value;
652
+ const processedValue = highlightBadWords(shorten, bannedWords);
653
+ return processedValue;
654
+ };
655
+ const CreatePostTitle = ({ className, style, bannedWords = [], value, onChange, }) => {
656
+ var _a;
657
+ const { t } = useTranslations();
658
+ const [titleValue, setTitleValue] = useState('');
659
+ const titleRef = useRef(null);
660
+ useEffect(() => {
661
+ if (titleRef.current) {
662
+ const pasteHandler = (e) => {
663
+ var _a;
664
+ e.preventDefault();
665
+ const text = (_a = e.clipboardData) === null || _a === void 0 ? void 0 : _a.getData('text/plain');
666
+ document.execCommand('insertHTML', false, text);
667
+ };
668
+ const contentDiv = titleRef.current;
669
+ contentDiv.addEventListener('paste', pasteHandler, {
670
+ passive: true,
671
+ });
672
+ return () => contentDiv.removeEventListener('paste', pasteHandler);
673
+ }
674
+ }, [titleRef]);
675
+ const bannedString = (bannedWords === null || bannedWords === void 0 ? void 0 : bannedWords.join(',')) || '';
676
+ useEffect(() => {
677
+ var _a;
678
+ if (bannedString) {
679
+ const titleText = (_a = titleRef.current) === null || _a === void 0 ? void 0 : _a.innerText;
680
+ if (titleText) {
681
+ const titleValueWithBanned = highlightBadWords(titleText, bannedWords);
682
+ if (titleValueWithBanned !== titleText) {
683
+ onChange && onChange(titleValueWithBanned);
684
+ setTitleValue(titleValueWithBanned);
685
+ }
686
+ }
687
+ }
688
+ }, [bannedString]);
689
+ const debounceInputModify = useCallback(debounce(() => {
690
+ if (titleRef.current) {
691
+ const shortenString = inputModify$1(titleRef.current.innerText, {
692
+ limit: TITLE_LIMIT,
693
+ bannedWords,
694
+ });
695
+ onChange && onChange(shortenString);
696
+ setTitleValue(shortenString);
697
+ }
698
+ }, 300), []);
699
+ useEffect(() => {
700
+ setTimeout(() => {
701
+ var _a;
702
+ (_a = titleRef.current) === null || _a === void 0 ? void 0 : _a.focus();
703
+ }, 500);
704
+ }, []);
705
+ return (React__default.createElement(StyledCreatePostTitle, { className: className, style: style },
706
+ React__default.createElement(Input, { name: "title", value: value || titleValue, size: "md", label: t('createPost.title'), CustomInput: React__default.createElement(ContentEditable, { innerRef: titleRef, html: value || titleValue, onChange: () => {
707
+ if (titleRef.current &&
708
+ titleRef.current.innerText !== (value || titleValue)) {
709
+ const initialValue = inputModify$1(titleRef.current.innerText, {
710
+ bannedWords,
711
+ });
712
+ onChange && onChange(initialValue);
713
+ setTitleValue(initialValue);
714
+ debounceInputModify();
715
+ }
716
+ }, className: "title-input" }) }),
717
+ React__default.createElement(Text, { size: "p4", className: "count-string" }, t('createPost.popup.wordCount', {
718
+ count: ((_a = titleRef.current) === null || _a === void 0 ? void 0 : _a.innerText.length) || 0,
719
+ max: TITLE_LIMIT,
720
+ }))));
721
+ };
722
+
723
+ const StyledPopupFrame = styled(PopupFrame) `
724
+ & > div[data-open]:first-child {
725
+ z-index: 1000;
726
+ height: auto;
727
+ max-width: 448px;
728
+ }
729
+ .custom-media-dialog {
730
+ padding: 1rem;
731
+ .image-gallery {
732
+ display: none;
733
+ .image-item {
734
+ &.no-image {
735
+ cursor: pointer;
736
+ }
737
+ .camera-btn {
738
+ position: absolute;
739
+ top: calc(100% - 32px);
740
+ right: 8px;
741
+ left: unset;
742
+ width: 24px;
743
+ height: 24px;
744
+ }
745
+ }
746
+ }
747
+ .custom-media-add-btn {
748
+ margin-left: auto;
749
+ display: block;
750
+ }
751
+ }
752
+ `;
753
+ const StyledInput = styled(Input$1) `
754
+ margin-bottom: 10px;
755
+ `;
756
+ const StyleWrapperInfo = styled.div `
757
+ display: flex;
758
+ gap: 4px;
759
+ align-items: flex-start;
760
+ margin-bottom: 14px;
761
+
762
+ img {
763
+ margin-top: 2px;
764
+ }
765
+ `;
766
+
767
+ var img$1 = "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.0026 1.33334C4.3206 1.33334 1.33594 4.31801 1.33594 8.00001C1.33594 11.682 4.3206 14.6667 8.0026 14.6667C11.6846 14.6667 14.6693 11.682 14.6693 8.00001C14.6693 4.31801 11.6846 1.33334 8.0026 1.33334ZM8.0026 11.3333C7.6346 11.3333 7.33594 11.0347 7.33594 10.6667V8.00001C7.33594 7.63201 7.6346 7.33334 8.0026 7.33334C8.3706 7.33334 8.66927 7.63201 8.66927 8.00001V10.6667C8.66927 11.0347 8.3706 11.3333 8.0026 11.3333ZM8.33594 6.00001H7.66927C7.48527 6.00001 7.33594 5.85068 7.33594 5.66668V5.00001C7.33594 4.81601 7.48527 4.66668 7.66927 4.66668H8.33594C8.51994 4.66668 8.66927 4.81601 8.66927 5.00001V5.66668C8.66927 5.85068 8.51994 6.00001 8.33594 6.00001Z' fill='%232D87F3'/%3e%3c/svg%3e";
768
+ var IconInfo = img$1;
769
+
770
+ const SocialLinkPopup = ({ isOpen, onClose, onSocialLinkChanged, socialLinkData, }) => {
771
+ const { t } = useTranslations();
772
+ const imagePickerRef = useRef(null);
773
+ const [socialLink, setSocialLinkUrl] = useState('');
774
+ const { onSelectImages, onRemoveImage, imageSrcs, imageFiles } = useImagePicker();
775
+ useEffect(() => {
776
+ if (isOpen) {
777
+ setSocialLinkUrl((socialLinkData === null || socialLinkData === void 0 ? void 0 : socialLinkData.url) || '');
778
+ }
779
+ }, [isOpen]);
780
+ const isAcceptedLink = socialLink.includes('youtu.be') ||
781
+ socialLink.includes('youtube.com') ||
782
+ socialLink.includes('facebook.com') ||
783
+ socialLink.includes('fb.watch') ||
784
+ socialLink.includes('tiktok.com');
785
+ const isValid = !!socialLink && isAcceptedLink;
786
+ return (React__default.createElement(React__default.Fragment, null,
787
+ React__default.createElement("input", { ref: imagePickerRef, type: "file", accept: "image/png, image/gif, image/jpeg", style: { display: 'none' }, onChange: onSelectImages }),
788
+ React__default.createElement(StyledPopupFrame, { isOpen: isOpen, onClose: onClose, heading: "Insert", style: {
789
+ zIndex: 3,
790
+ } },
791
+ React__default.createElement("div", { className: "custom-media-dialog", onClick: (e) => e.stopPropagation() },
792
+ React__default.createElement(StyledInput, { size: "md", name: "custom-media-url", placeholder: "URL", value: socialLink, onChange: (v) => setSocialLinkUrl(v), label: "" }),
793
+ React__default.createElement(StyleWrapperInfo, null,
794
+ React__default.createElement("img", { src: IconInfo, alt: "" }),
795
+ React__default.createElement(Text, { size: "c2", color: "#737373" }, t('editor.addSocialLink.warningDomain'))),
796
+ !imageSrcs[0] ? (React__default.createElement("div", { className: "image-gallery" },
797
+ React__default.createElement("div", { className: "image-item no-image", onClick: () => { var _a; return (_a = imagePickerRef.current) === null || _a === void 0 ? void 0 : _a.click(); } }))) : (React__default.createElement("div", { className: "image-gallery" },
798
+ React__default.createElement("div", { className: "image-item" },
799
+ React__default.createElement("img", { src: imageSrcs[0], alt: "" }),
800
+ React__default.createElement("img", { className: "close-btn", alt: "", onClick: () => onRemoveImage(0) })))),
801
+ React__default.createElement(Button, { color: "primary", size: "md", variant: "primary", type: "button", className: "custom-media-add-btn", onClick: (e) => {
802
+ e === null || e === void 0 ? void 0 : e.preventDefault();
803
+ e === null || e === void 0 ? void 0 : e.stopPropagation();
804
+ if (isValid) {
805
+ onSocialLinkChanged === null || onSocialLinkChanged === void 0 ? void 0 : onSocialLinkChanged({
806
+ url: !socialLink.includes('http')
807
+ ? 'https://' + socialLink
808
+ : socialLink,
809
+ banner: imageFiles[0],
810
+ });
811
+ onClose === null || onClose === void 0 ? void 0 : onClose();
812
+ }
813
+ }, disabled: !isValid }, t('editor.addSocialLink.addLink'))))));
814
+ };
815
+
816
+ var img = "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 fill-rule='evenodd' clip-rule='evenodd' d='M3.23078 14.625C2.85193 14.625 2.53125 14.4937 2.26875 14.2312C2.00625 13.9687 1.875 13.648 1.875 13.2692V4.73078C1.875 4.35193 2.00625 4.03125 2.26875 3.76875C2.53125 3.50625 2.85193 3.375 3.23078 3.375H14.7692C15.148 3.375 15.4687 3.50625 15.7312 3.76875C15.9937 4.03125 16.125 4.35193 16.125 4.73078V10.315C15.8029 10.1922 15.4534 10.125 15.0882 10.125H11.9117C10.3036 10.125 8.99998 11.4286 8.99998 13.0368C8.99998 13.6227 9.17304 14.1682 9.47085 14.625H3.23078ZM7.83606 11.6899L11.5846 9.28988C11.6875 9.21969 11.7389 9.12306 11.7389 8.99998C11.7389 8.87691 11.6875 8.78028 11.5846 8.71009L7.83606 6.31011C7.72067 6.23222 7.60456 6.22597 7.48774 6.29136C7.37091 6.35673 7.3125 6.45721 7.3125 6.59278V11.4072C7.3125 11.5428 7.37091 11.6432 7.48774 11.7086C7.60456 11.774 7.72067 11.7677 7.83606 11.6899ZM10.7181 14.6953C11.1136 15.0907 11.5889 15.2884 12.1442 15.2884H12.8099C12.9325 15.2884 13.0352 15.247 13.1182 15.1642C13.2011 15.0813 13.2426 14.9786 13.2426 14.856C13.2426 14.7333 13.2011 14.6305 13.1182 14.5475C13.0352 14.4646 12.9325 14.4231 12.8099 14.4231H12.1442C11.8269 14.4231 11.5553 14.3101 11.3293 14.0841C11.1033 13.8582 10.9903 13.5865 10.9903 13.2692C10.9903 12.9519 11.1033 12.6803 11.3293 12.4543C11.5553 12.2284 11.8269 12.1154 12.1442 12.1154H12.8099C12.9325 12.1154 13.0352 12.074 13.1182 11.9911C13.2011 11.9083 13.2426 11.8055 13.2426 11.6829C13.2426 11.5602 13.2011 11.4574 13.1182 11.3745C13.0352 11.2915 12.9325 11.25 12.8099 11.25H12.1442C11.5889 11.25 11.1136 11.4477 10.7181 11.8432C10.3227 12.2386 10.125 12.7139 10.125 13.2692C10.125 13.8245 10.3227 14.2999 10.7181 14.6953ZM12.2686 13.5775C12.3515 13.6604 12.4543 13.7019 12.5769 13.7019H15.1731C15.2957 13.7019 15.3984 13.6605 15.4814 13.5776C15.5643 13.4948 15.6058 13.3921 15.6058 13.2694C15.6058 13.1468 15.5643 13.044 15.4814 12.961C15.3984 12.878 15.2957 12.8365 15.1731 12.8365H12.5769C12.4543 12.8365 12.3515 12.878 12.2686 12.9608C12.1857 13.0436 12.1442 13.1464 12.1442 13.269C12.1442 13.3917 12.1857 13.4945 12.2686 13.5775ZM14.9401 15.2884H15.6058C16.161 15.2884 16.6364 15.0911 17.0318 14.6966C17.4273 14.3019 17.625 13.8268 17.625 13.271C17.625 12.7068 17.4273 12.2289 17.0318 11.8374C16.6364 11.4458 16.161 11.25 15.6058 11.25H14.9401C14.8175 11.25 14.7147 11.2914 14.6318 11.3743C14.5488 11.4571 14.5074 11.5598 14.5074 11.6825C14.5074 11.8051 14.5488 11.908 14.6318 11.9909C14.7147 12.0739 14.8175 12.1154 14.9401 12.1154H15.6058C15.9231 12.1154 16.1947 12.2284 16.4207 12.4543C16.6466 12.6803 16.7596 12.9519 16.7596 13.2692C16.7596 13.5865 16.6466 13.8582 16.4207 14.0841C16.1947 14.3101 15.9231 14.4231 15.6058 14.4231H14.9401C14.8175 14.4231 14.7147 14.4645 14.6318 14.5473C14.5488 14.6302 14.5074 14.7329 14.5074 14.8556C14.5074 14.9782 14.5488 15.081 14.6318 15.164C14.7147 15.247 14.8175 15.2884 14.9401 15.2884Z' fill='%23F44D2C'/%3e%3c/svg%3e";
817
+ var IconVideo = img;
818
+
819
+ const CreatePostVideo = ({ socialLinkData, setSocialLinkData, }) => {
820
+ const { t } = useTranslations();
821
+ const [activeModal, setActiveModal] = useState(false);
822
+ const handleClick = () => {
823
+ setActiveModal(true);
824
+ };
825
+ return (React__default.createElement("div", { className: "input-group" },
826
+ React__default.createElement(StyleSessionRow, { onClick: handleClick },
827
+ React__default.createElement("img", { alt: "anonymous-icon", src: IconVideo, style: {
828
+ width: '18px',
829
+ height: '18px',
830
+ objectFit: 'contain',
831
+ marginLeft: 'auto',
832
+ } }),
833
+ React__default.createElement("div", { className: "session-title" }, t('createPost.videoOrLink'))),
834
+ React__default.createElement(SocialLinkPopup, { isOpen: activeModal, onClose: () => setActiveModal(false), onSocialLinkChanged: setSocialLinkData, socialLinkData: socialLinkData })));
835
+ };
836
+
837
+ const StyleReviewPhoto = styled.div `
838
+ .mantine-Text-root {
839
+ margin-bottom: 4px;
840
+ }
841
+ .preview-images-container {
842
+ display: flex;
843
+ gap: 8px;
844
+ overflow-x: auto;
845
+ overflow-y: hidden;
846
+ .image-src-wrapper {
847
+ flex: 0 0 140px;
848
+ width: 140px;
849
+ height: 96px;
850
+ border-radius: 4px;
851
+ position: relative;
852
+ img {
853
+ border-radius: 4px;
854
+ }
855
+ .icon-close {
856
+ position: absolute;
857
+ top: 6px;
858
+ right: 6px;
859
+ cursor: pointer;
860
+ z-index: 10;
861
+ }
862
+ }
863
+ }
864
+ `;
865
+
866
+ const PostPhotosReview = ({ error, imageFiles: imageFilesInit, setImageFiles, removeKeyError, }) => {
867
+ const { t } = useTranslations();
868
+ const { imageSrcs, onRemoveImage } = useImagePicker(imageFilesInit, setImageFiles);
869
+ return (React__default.createElement(StyleReviewPhoto, { className: "input-group" },
870
+ React__default.createElement(Text, { size: "p5", weight: "semiBold" }, t('createPost.photos')),
871
+ React__default.createElement("div", { className: "preview-images-container" }, imageSrcs === null || imageSrcs === void 0 ? void 0 : imageSrcs.map((src, index) => {
872
+ return (React__default.createElement("div", { className: "image-src-wrapper", key: index },
873
+ React__default.createElement("img", { src: src, className: "preview-image", alt: "", style: {
874
+ width: '100%',
875
+ height: '100%',
876
+ objectFit: 'cover',
877
+ } }),
878
+ React__default.createElement("img", { alt: "", className: "icon-close", src: IconCloseCircle, onClick: () => {
879
+ removeKeyError && removeKeyError('photos');
880
+ onRemoveImage(index);
881
+ } })));
882
+ })),
883
+ error && (error === null || error === void 0 ? void 0 : error.photos) && (React__default.createElement(StyledError, null,
884
+ React__default.createElement(Text, { size: "p5", color: theme.colors.red600 }, error.photos)))));
885
+ };
886
+
887
+ const inputModify = (value, opts) => {
888
+ var _a;
889
+ const { formatUrl, bannedWords = [] } = opts || {};
890
+ const removedFormat = fixMalformedMention(removeFontFormat(value));
891
+ if (!formatUrl)
892
+ return {
893
+ value: highlightBadWords(removedFormat, bannedWords),
894
+ };
895
+ let descriptionWithWrappedAnchor = removeEdittedBannedWord(wrapAnchorAroundUrls(removedFormat));
896
+ const urls = getUrlsFromEditorString(removedFormat);
897
+ if (urls) {
898
+ const invalidUrls = [];
899
+ let previewUrl = '';
900
+ urls.forEach((url) => {
901
+ if (!url)
902
+ return;
903
+ try {
904
+ const jsUrl = new URL(url);
905
+ // Check url has must into domain hellohealthgroup
906
+ if (!ALLOW_DOMAIN_URL.some((o) => jsUrl.origin.endsWith(o))) {
907
+ invalidUrls.push('notification.limitUrlDomain');
908
+ return;
909
+ }
910
+ // Check url have special character
911
+ if (url.endsWith('&')) {
912
+ invalidUrls.push('notification.urlWrongFormat');
913
+ return;
914
+ }
915
+ }
916
+ catch (_a) {
917
+ invalidUrls.push(url);
918
+ }
919
+ });
920
+ if (invalidUrls.length > 0) {
921
+ descriptionWithWrappedAnchor = descriptionWithWrappedAnchor
922
+ .replace(new RegExp(`data-url="true">(${invalidUrls.map(escapeRegExp).join('|')})<`, 'gi'), 'data-error="true" data-url="true">$1<')
923
+ .replace(new RegExp(`data-href="(${invalidUrls
924
+ .map(escapeRegExp)
925
+ .join('|')})" data-url="true">`, 'gi'), 'data-href="$1" data-error="true" data-url="true">');
926
+ }
927
+ previewUrl = (_a = urls.filter((u) => invalidUrls.indexOf(u) === -1)) === null || _a === void 0 ? void 0 : _a[0];
928
+ return {
929
+ invalidUrls,
930
+ previewUrl,
931
+ value: highlightBadWords(descriptionWithWrappedAnchor, bannedWords),
932
+ };
933
+ }
934
+ return {
935
+ value: highlightBadWords(descriptionWithWrappedAnchor, bannedWords),
936
+ };
937
+ };
938
+ const usePreviewUrl = (bannedWords, onChange) => {
939
+ const { data: { locale }, } = useContext(TogetherComponentGlobalContext);
940
+ const [previewUrl, setPreviewUrl] = useState(null);
941
+ const bannedWordsRef = useRef([]);
942
+ bannedWordsRef.current = bannedWords;
943
+ const fetchPreviewData = (url) => {
944
+ if (!previewUrl || previewUrl.url !== url) {
945
+ setPreviewUrl === null || setPreviewUrl === void 0 ? void 0 : setPreviewUrl({
946
+ url,
947
+ isFetching: true,
948
+ });
949
+ callApi(getApiPath(PATHS.FETCH_PREVIEW, {
950
+ _locale: locale,
951
+ }), 'POST', {
952
+ data: {
953
+ link: url,
954
+ },
955
+ headers: {
956
+ 'Content-Type': 'application/json',
957
+ },
958
+ })
959
+ .then((res) => {
960
+ var _a, _b, _c, _d;
961
+ setPreviewUrl === null || setPreviewUrl === void 0 ? void 0 : setPreviewUrl({
962
+ title: (_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.title,
963
+ description: (_b = res === null || res === void 0 ? void 0 : res.data) === null || _b === void 0 ? void 0 : _b.description,
964
+ image: ((_c = res === null || res === void 0 ? void 0 : res.data) === null || _c === void 0 ? void 0 : _c.image) || ((_d = res === null || res === void 0 ? void 0 : res.data) === null || _d === void 0 ? void 0 : _d.logo),
965
+ url,
966
+ });
967
+ })
968
+ .catch(() => {
969
+ setPreviewUrl === null || setPreviewUrl === void 0 ? void 0 : setPreviewUrl(null);
970
+ });
971
+ }
972
+ };
973
+ const fetchPreviewDataRef = useRef(fetchPreviewData);
974
+ fetchPreviewDataRef.current = fetchPreviewData;
975
+ const [invalidUrls, setInvalidUrls] = useState([]);
976
+ const debounceInputModify = useCallback(debounce((v) => {
977
+ if (v) {
978
+ const processedInput = inputModify(v, {
979
+ bannedWords: bannedWordsRef.current,
980
+ formatUrl: true,
981
+ });
982
+ const { invalidUrls: _invalidUrls, previewUrl: _previewUrl, value, } = processedInput;
983
+ if (_invalidUrls && (_invalidUrls === null || _invalidUrls === void 0 ? void 0 : _invalidUrls.length)) {
984
+ setInvalidUrls(_invalidUrls);
985
+ setPreviewUrl === null || setPreviewUrl === void 0 ? void 0 : setPreviewUrl(null);
986
+ }
987
+ else {
988
+ setInvalidUrls([]);
989
+ if (_previewUrl) {
990
+ fetchPreviewDataRef.current(_previewUrl);
991
+ }
992
+ else
993
+ setPreviewUrl === null || setPreviewUrl === void 0 ? void 0 : setPreviewUrl(null);
994
+ if (value !== v) {
995
+ onChange === null || onChange === void 0 ? void 0 : onChange(value);
996
+ }
997
+ }
998
+ }
999
+ }, 500), []);
1000
+ return {
1001
+ previewUrl,
1002
+ setPreviewUrl,
1003
+ invalidUrls,
1004
+ debounceInputModify,
1005
+ fetchPreviewData,
1006
+ };
1007
+ };
1008
+
1009
+ const StyleReviewVideo = styled.div `
1010
+ .link-preview-wrapper {
1011
+ position: relative;
1012
+ .icon-close {
1013
+ position: absolute;
1014
+ top: 6px;
1015
+ right: 6px;
1016
+ cursor: pointer;
1017
+ z-index: 10;
1018
+ }
1019
+ }
1020
+ .mantine-Text-root {
1021
+ margin-bottom: 4px;
1022
+ }
1023
+ `;
1024
+
1025
+ const PostVideoReview = ({ socialLinkData, bannedWords, onChange, onInvalidUrlsChange, onSocialLinkChanged, }) => {
1026
+ const { t } = useTranslations();
1027
+ const { invalidUrls, previewUrl, fetchPreviewData, setPreviewUrl } = usePreviewUrl(bannedWords || [], onChange);
1028
+ useEffect(() => {
1029
+ if (socialLinkData && socialLinkData.url) {
1030
+ fetchPreviewData(socialLinkData.url);
1031
+ }
1032
+ }, [socialLinkData, fetchPreviewData]);
1033
+ useEffect(() => {
1034
+ if (invalidUrls) {
1035
+ onInvalidUrlsChange === null || onInvalidUrlsChange === void 0 ? void 0 : onInvalidUrlsChange(invalidUrls);
1036
+ }
1037
+ }, [invalidUrls]);
1038
+ return (React__default.createElement(StyleReviewVideo, { className: "input-group" },
1039
+ React__default.createElement(Text, { size: "p5", weight: "semiBold" }, t('createPost.video')),
1040
+ React__default.createElement("div", { className: "link-preview-wrapper" }, (socialLinkData === null || socialLinkData === void 0 ? void 0 : socialLinkData.url) && previewUrl && (React__default.createElement("div", { className: "link-preview-wrapper" }, previewUrl.isFetching ? (React__default.createElement(Loading, null)) : (React__default.createElement(React__default.Fragment, null,
1041
+ React__default.createElement(CardLink, { title: previewUrl.title, url: previewUrl.url || '#', image: previewUrl.image, noRefetch: true }),
1042
+ React__default.createElement("img", { alt: "", src: IconCloseCircle, className: "icon-close", onClick: () => {
1043
+ setPreviewUrl(null);
1044
+ onSocialLinkChanged && onSocialLinkChanged(null);
1045
+ } }))))))));
1046
+ };
1047
+
1048
+ const MAX_SIZE_FILE_UPLOAD = 10 * 1024 * 1024;
1049
+ const CreateNewPostContent = ({ className, style, onPostCreatedEdited, onClose, communities = [], forceSelectCommunity, forceSelectTopics, articleId, optionalTopic, editPostData, defaultCommunity, defaultTopics, selectAskDoctor, showAskDoctorOptions, userInfo, }) => {
1050
+ const isInEditMode = !!(editPostData === null || editPostData === void 0 ? void 0 : editPostData.id);
1051
+ const { data: { locale, router, env: { togetherBasePath }, }, action: { pushNotifications, sanitizeFunction }, } = useContext(TogetherComponentGlobalContext);
1052
+ const { asPath } = router || {};
1053
+ const { t } = useTranslations();
1054
+ // const [isAnonymous, setIsAnonymous] = useState<boolean>(false)
1055
+ const [isAskDoctor, setIsAskDoctor] = useState(selectAskDoctor);
1056
+ const [specialCharErr, setspecialCharErr] = useState(false);
1057
+ const [isSubmitting, setIsSubmitting] = useState(false);
1058
+ const [titleValue, setTitleValue] = useState('');
1059
+ const [descriptionValue, setDescriptionValue] = useState('');
1060
+ const [communityValue, setCommunityValue] = useState(forceSelectCommunity
1061
+ ? {
1062
+ label: forceSelectCommunity.name,
1063
+ value: `${forceSelectCommunity.id || ''}-${forceSelectCommunity.mappedCategoryId || ''}`,
1064
+ }
1065
+ : {
1066
+ label: t('community.choose'),
1067
+ value: '',
1068
+ });
1069
+ const [selectedTopics, setSelectedTopics] = useState([...forceSelectTopics] || []);
1070
+ const [socialLinkData, setSocialLinkData] = useState();
1071
+ const [error, setError] = useState({});
1072
+ const [imageFiles, setImageFiles] = useState([]);
1073
+ const [bannedWords, setBannedWords] = useState([]);
1074
+ const [postActionValue, setPostActionValue] = useState({
1075
+ label: t('cardPost.public'),
1076
+ value: 'public',
1077
+ });
1078
+ const { imageSrcs = [] } = useImagePicker(imageFiles);
1079
+ const currentCommunity = forceSelectCommunity ||
1080
+ communities.find((c) => `${c.id || ''}-${c.mappedCategoryId || ''}` === communityValue.value);
1081
+ const communitiesList = forceSelectCommunity
1082
+ ? [forceSelectCommunity]
1083
+ : communities
1084
+ .filter((c) => c.isActive)
1085
+ .sort((a, b) => {
1086
+ if (a.name > b.name)
1087
+ return 1;
1088
+ if (a.name < b.name)
1089
+ return -1;
1090
+ return 0;
1091
+ });
1092
+ const [previewUrl, setPreviewUrl] = useState(null);
1093
+ const [invalidUrls, setInvalidUrls] = useState([]);
1094
+ const isReadyToSubmit = titleValue &&
1095
+ !specialCharErr &&
1096
+ innertext(descriptionValue) &&
1097
+ (optionalTopic || (!optionalTopic && selectedTopics.length > 0)) &&
1098
+ currentCommunity &&
1099
+ (!imageFiles || imageFiles.length <= MAX_IMAGE_UPLOADS) &&
1100
+ !(invalidUrls === null || invalidUrls === void 0 ? void 0 : invalidUrls.length) &&
1101
+ !isSubmitting;
1102
+ const postActionType = [
1103
+ {
1104
+ label: t('cardPost.public'),
1105
+ value: 'public',
1106
+ icon: (React__default.createElement("img", { alt: "anonymous-icon", src: IconPublic, style: {
1107
+ width: '100%',
1108
+ height: '100%',
1109
+ objectFit: 'contain',
1110
+ marginLeft: 'auto',
1111
+ } })),
1112
+ },
1113
+ {
1114
+ label: t('cardPost.anonymous'),
1115
+ value: 'anonymous',
1116
+ icon: (React__default.createElement("img", { alt: "anonymous-icon", src: IconAnonymous, style: {
1117
+ width: '100%',
1118
+ height: '100%',
1119
+ objectFit: 'contain',
1120
+ marginLeft: 'auto',
1121
+ } })),
1122
+ },
1123
+ ];
1124
+ // HANDLE etra action when OPEN AND CLOSE
1125
+ useEffect(() => {
1126
+ if (editPostData) {
1127
+ const post = editPostData;
1128
+ setTitleValue(post.title || '');
1129
+ setDescriptionValue(decodeMention(decodePostUrl(post.description || '', 'edit'), post.mentions));
1130
+ setCommunityValue({
1131
+ label: post.community.name,
1132
+ value: `${post.community.id || ''}-${post.community.mappedCategoryId || ''}`,
1133
+ });
1134
+ setSelectedTopics(post.topics || []);
1135
+ setImageFiles(post.photos || []);
1136
+ // setIsAnonymous(!!post.isAnonymous || false)
1137
+ setIsAskDoctor(!!post.isAskDoctor || false);
1138
+ }
1139
+ else {
1140
+ if (defaultCommunity) {
1141
+ setCommunityValue({
1142
+ label: defaultCommunity.name,
1143
+ value: `${defaultCommunity.id || ''}-${defaultCommunity.mappedCategoryId || ''}`,
1144
+ });
1145
+ }
1146
+ if (defaultTopics) {
1147
+ setSelectedTopics(defaultTopics);
1148
+ }
1149
+ }
1150
+ }, []);
1151
+ useEffect(() => {
1152
+ setspecialCharErr(titleValue !== '' && !/[a-zA-Z]/.test(titleValue));
1153
+ setError({});
1154
+ }, [titleValue]);
1155
+ const onCreateEditSuccess = (res) => {
1156
+ if (onPostCreatedEdited) {
1157
+ onPostCreatedEdited(formatPost(res), isInEditMode);
1158
+ }
1159
+ onClose && onClose();
1160
+ };
1161
+ const validationUploadPhoto = (files) => {
1162
+ const errorMessage = Object.assign({}, error);
1163
+ if (files && files.length > 10) {
1164
+ errorMessage.photos = t('createPost.message.photoMaxium');
1165
+ }
1166
+ if (files && files.length) {
1167
+ const inValidSizeFile = files.some((file) => (file === null || file === void 0 ? void 0 : file.size) > MAX_SIZE_FILE_UPLOAD);
1168
+ if (inValidSizeFile) {
1169
+ errorMessage.photos = t('createPost.message.photoSize');
1170
+ }
1171
+ }
1172
+ setError(errorMessage);
1173
+ };
1174
+ const validationPost = () => {
1175
+ let hasError = false;
1176
+ const errorMessage = {};
1177
+ const description = innertext(descriptionValue);
1178
+ if (!description) {
1179
+ errorMessage.description = t('createPost.message.requiredDescription');
1180
+ hasError = true;
1181
+ }
1182
+ if (isInEditMode && !titleValue) {
1183
+ errorMessage.title = t('createPost.message.requiredTitle');
1184
+ hasError = true;
1185
+ }
1186
+ if (description && description.split(' ').length < 10) {
1187
+ errorMessage.description = t('createPost.message.lengthDescription');
1188
+ hasError = true;
1189
+ }
1190
+ if (showAskDoctorOptions &&
1191
+ !(errorMessage === null || errorMessage === void 0 ? void 0 : errorMessage.description) &&
1192
+ typeof isAskDoctor === 'undefined') {
1193
+ errorMessage.askDoctor = t('createPost.message.askDoctorRequireMess');
1194
+ hasError = true;
1195
+ }
1196
+ if (imageFiles && imageFiles.length > 10) {
1197
+ errorMessage.photos = t('createPost.message.photoMaxium');
1198
+ hasError = true;
1199
+ }
1200
+ if (imageFiles && imageFiles.length) {
1201
+ const inValidSizeFile = imageFiles.some((file) => (file === null || file === void 0 ? void 0 : file.size) > MAX_SIZE_FILE_UPLOAD);
1202
+ if (inValidSizeFile) {
1203
+ errorMessage.photos = t('createPost.message.photoSize');
1204
+ hasError = true;
1205
+ }
1206
+ }
1207
+ if (invalidUrls && invalidUrls.length) {
1208
+ errorMessage.video = 'Invalid video url';
1209
+ hasError = true;
1210
+ }
1211
+ setError(errorMessage);
1212
+ return hasError;
1213
+ };
1214
+ const removeKeyError = (deleteKey) => {
1215
+ if (error[deleteKey]) {
1216
+ const _a = Object.assign({}, error), _b = `${deleteKey}`, value = _a[_b], rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + ""]);
1217
+ setError(rest);
1218
+ console.log(value);
1219
+ }
1220
+ };
1221
+ const submitPost = () => __awaiter(void 0, void 0, void 0, function* () {
1222
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1223
+ const isError = validationPost();
1224
+ if (isError)
1225
+ return;
1226
+ const bodyFormData = yield getPostFormData({
1227
+ title: titleValue,
1228
+ description: descriptionValue,
1229
+ communityId: String((currentCommunity === null || currentCommunity === void 0 ? void 0 : currentCommunity.id) || ''),
1230
+ imageFiles,
1231
+ previewUrl,
1232
+ topicIds: selectedTopics === null || selectedTopics === void 0 ? void 0 : selectedTopics.map((topic) => String(topic.id || '')).filter(Boolean),
1233
+ locale,
1234
+ sanitizeFunction,
1235
+ categoryCommunityId: String((currentCommunity === null || currentCommunity === void 0 ? void 0 : currentCommunity.mappedCategoryId) || ''),
1236
+ categoryTopicIds: selectedTopics === null || selectedTopics === void 0 ? void 0 : selectedTopics.map((topic) => String((topic === null || topic === void 0 ? void 0 : topic.mappedCategoryId) || '')).filter(Boolean),
1237
+ isAnonymous: (postActionValue === null || postActionValue === void 0 ? void 0 : postActionValue.value) === 'anonymous' ? 1 : 0,
1238
+ isAskDoctor: isAskDoctor ? 1 : 0,
1239
+ });
1240
+ if (articleId) {
1241
+ bodyFormData.append('article_id', articleId);
1242
+ }
1243
+ let res;
1244
+ if (isInEditMode) {
1245
+ if (editPostData === null || editPostData === void 0 ? void 0 : editPostData.id) {
1246
+ res = yield editPost({
1247
+ id: editPostData.id,
1248
+ formData: bodyFormData,
1249
+ locale,
1250
+ });
1251
+ }
1252
+ }
1253
+ else {
1254
+ res = yield createPost({
1255
+ formData: bodyFormData,
1256
+ locale,
1257
+ isArticleComment: !(currentCommunity === null || currentCommunity === void 0 ? void 0 : currentCommunity.id) && !!(currentCommunity === null || currentCommunity === void 0 ? void 0 : currentCommunity.mappedCategoryId),
1258
+ });
1259
+ }
1260
+ const resData = res === null || res === void 0 ? void 0 : res.data;
1261
+ if ((resData === null || resData === void 0 ? void 0 : resData.id) && !((_b = (_a = res === null || res === void 0 ? void 0 : res.messages) === null || _a === void 0 ? void 0 : _a.moderation) === null || _b === void 0 ? void 0 : _b.type)) {
1262
+ pushNotifications({
1263
+ message: t('createPost.popup.success'),
1264
+ type: 'success',
1265
+ });
1266
+ onCreateEditSuccess(resData);
1267
+ }
1268
+ else {
1269
+ if (((_d = (_c = res === null || res === void 0 ? void 0 : res.messages) === null || _c === void 0 ? void 0 : _c.moderation) === null || _d === void 0 ? void 0 : _d.type) === 'banned') {
1270
+ pushNotifications({
1271
+ title: t('notification.post.blocked.title'),
1272
+ message: t('notification.post.blocked.message'),
1273
+ type: 'danger',
1274
+ });
1275
+ if (res.messages.moderation.words) {
1276
+ setBannedWords(res.messages.moderation.words);
1277
+ }
1278
+ }
1279
+ else if (((_f = (_e = res === null || res === void 0 ? void 0 : res.messages) === null || _e === void 0 ? void 0 : _e.moderation) === null || _f === void 0 ? void 0 : _f.type) === 'suspect') {
1280
+ pushNotifications({
1281
+ title: t('notification.post.suspect.title'),
1282
+ message: t('notification.post.suspect.message'),
1283
+ type: 'warning',
1284
+ });
1285
+ onClose && onClose();
1286
+ }
1287
+ else if ((_h = (_g = res === null || res === void 0 ? void 0 : res.messages) === null || _g === void 0 ? void 0 : _g.find) === null || _h === void 0 ? void 0 : _h.call(_g, (m) => { var _a; return !!((_a = m === null || m === void 0 ? void 0 : m.includes) === null || _a === void 0 ? void 0 : _a.call(m, 'suspend')); })) {
1288
+ pushNotifications({
1289
+ message: t('notification.suspend.message'),
1290
+ type: 'danger',
1291
+ });
1292
+ onClose && onClose();
1293
+ }
1294
+ else {
1295
+ pushNotifications({
1296
+ message: ((_j = res === null || res === void 0 ? void 0 : res.messages) === null || _j === void 0 ? void 0 : _j[0]) || t('notification.failure'),
1297
+ type: 'danger',
1298
+ });
1299
+ }
1300
+ }
1301
+ });
1302
+ return (React__default.createElement(StyledCreateNewPost, { className: `${className} create-post-popup-frame`, style: style },
1303
+ React__default.createElement("div", { className: "input-group-container" },
1304
+ React__default.createElement(StyledFormGroupInner, null,
1305
+ React__default.createElement("div", { className: "input-group" },
1306
+ React__default.createElement(StylePostAction, null,
1307
+ React__default.createElement("div", { className: "avatar" }, (userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) ? (React__default.createElement("img", { alt: "avatar-icon", src: userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar, style: {
1308
+ width: '100%',
1309
+ height: '100%',
1310
+ objectFit: 'contain',
1311
+ marginLeft: 'auto',
1312
+ } })) : (React__default.createElement(CardAuthor, { showDetailPopup: false, avatar: "", avatarProps: { size: 40 }, name: userInfo === null || userInfo === void 0 ? void 0 : userInfo.name, userId: userInfo === null || userInfo === void 0 ? void 0 : userInfo.userId, className: "author-avatar" }))),
1313
+ React__default.createElement("div", { className: "post-action-form" },
1314
+ React__default.createElement("div", { className: "post-action-by" }, (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) || ''),
1315
+ React__default.createElement(Dropdown, { disabled: isInEditMode, options: postActionType, id: "post-action-type", size: "sm", className: "dropdown-post-action", placeholder: t('community.choose'), value: postActionValue, onChange: (option) => {
1316
+ setPostActionValue({
1317
+ label: option.label,
1318
+ value: String(option.value),
1319
+ });
1320
+ }, placeholderIcon: React__default.createElement("div", { className: "post-action-result" }, postActionValue.value === 'public' ? (React__default.createElement("img", { alt: "public-icon", src: IconPublic, style: {
1321
+ width: '100%',
1322
+ height: '100%',
1323
+ objectFit: 'contain',
1324
+ marginLeft: 'auto',
1325
+ } })) : (React__default.createElement("img", { alt: "anonymous-icon", src: IconAnonymous, style: {
1326
+ width: '100%',
1327
+ height: '100%',
1328
+ objectFit: 'contain',
1329
+ marginLeft: 'auto',
1330
+ } }))), style: {
1331
+ zIndex: 10,
1332
+ width: 'calc(100% + 20px)',
1333
+ } })))),
1334
+ React__default.createElement(CreatePostTitle, { className: "input-group", bannedWords: bannedWords, value: titleValue, onChange: setTitleValue }),
1335
+ specialCharErr && (React__default.createElement(StyledError, null,
1336
+ React__default.createElement(Info, { isSolid: true, color: theme.colors.red700, size: 14 }),
1337
+ React__default.createElement(Text, { size: "p3", as: "span", color: theme.colors.red700 }, t('createPost.popup.specialCharErr')))),
1338
+ React__default.createElement("div", { className: "input-group" },
1339
+ React__default.createElement(CreatePostDescription, { bannedWords: bannedWords, value: descriptionValue, onChange: (v) => {
1340
+ setDescriptionValue(v);
1341
+ removeKeyError('description');
1342
+ }, onPreviewUrlChange: setPreviewUrl, onInvalidUrlsChange: setInvalidUrls, onImageFilesChange: setImageFiles, imageFiles: imageFiles, className: `${error && (error === null || error === void 0 ? void 0 : error.description) ? 'error-description' : ''} ${showAskDoctorOptions ? 'has-ask-doctor-option' : ''}`, footerEditor: React__default.createElement(React__default.Fragment, null,
1343
+ showAskDoctorOptions && (React__default.createElement(StyledIsQuestion, { color: "", className: `${error && (error === null || error === void 0 ? void 0 : error.askDoctor) ? 'has-error' : ''} ${error && (error === null || error === void 0 ? void 0 : error.description) ? 'error-description' : ''}` },
1344
+ React__default.createElement("div", { className: "switch-label" },
1345
+ React__default.createElement(Ask, { size: 24 }),
1346
+ React__default.createElement("div", { className: "wrapper-text" },
1347
+ React__default.createElement("div", { className: "label-txt" }, t('createPost.askDoctor')),
1348
+ React__default.createElement("div", { className: "description-txt" }, t('createPost.askDoctor.description')))),
1349
+ React__default.createElement(BtnChoice, { value: isAskDoctor, choices: [
1350
+ {
1351
+ label: t('createPost.askDoctorChoice.yes'),
1352
+ value: true,
1353
+ dataEventCategory: 'Together',
1354
+ dataEventAction: 'Write Post Click - Ask Doctor',
1355
+ dataEventLabel: getCurrentHref(locale, togetherBasePath, asPath),
1356
+ },
1357
+ {
1358
+ label: t('createPost.askDoctorChoice.no'),
1359
+ value: false,
1360
+ },
1361
+ ], onChange: (v) => {
1362
+ if (typeof v === 'boolean') {
1363
+ setIsAskDoctor(v);
1364
+ removeKeyError('askDoctor');
1365
+ }
1366
+ } }))),
1367
+ error && (error === null || error === void 0 ? void 0 : error.askDoctor) && (React__default.createElement(StyledError, { style: { margin: '4px 0 0' } },
1368
+ React__default.createElement(Text, { size: "p5", as: "span", color: theme.colors.red600 }, error.askDoctor))),
1369
+ error && (error === null || error === void 0 ? void 0 : error.description) && (React__default.createElement(StyledError, { style: { margin: '4px 0 0' } },
1370
+ React__default.createElement(Text, { size: "p5", as: "span", color: theme.colors.red600 }, error.description)))) })),
1371
+ imageSrcs.length > 0 && (React__default.createElement(PostPhotosReview, { imageFiles: imageFiles, error: error, setImageFiles: setImageFiles, removeKeyError: removeKeyError })),
1372
+ socialLinkData && (React__default.createElement(PostVideoReview, { bannedWords: bannedWords, socialLinkData: socialLinkData, onSocialLinkChanged: setSocialLinkData, onInvalidUrlsChange: setInvalidUrls, onChange: (v) => {
1373
+ setDescriptionValue(v);
1374
+ } })),
1375
+ React__default.createElement(CreatePostCommunity, { communitiesList: communitiesList, currentCommunity: currentCommunity, selectedTopics: selectedTopics, forceTopics: forceSelectTopics, communityValue: communityValue, error: error, isFullscreen: false, isInEditMode: isInEditMode, setSelectedTopics: setSelectedTopics, setCommunityValue: setCommunityValue }),
1376
+ React__default.createElement(CreatePostPhotos, { imageFiles: imageFiles, setImageFiles: (data) => {
1377
+ setImageFiles(data);
1378
+ validationUploadPhoto(data);
1379
+ } }),
1380
+ React__default.createElement(CreatePostVideo, { socialLinkData: socialLinkData, setSocialLinkData: setSocialLinkData }))),
1381
+ React__default.createElement("div", { className: "form-action" },
1382
+ React__default.createElement("div", { className: "input-group" },
1383
+ React__default.createElement(Button, { className: "submit-btn pointer-event-child-none", size: "lg", "data-event-category": "Ask Doctor", "data-event-action": "Submit Question", "data-event-label": window.location.href, onClick: () => __awaiter(void 0, void 0, void 0, function* () {
1384
+ if (isReadyToSubmit && !isSubmitting) {
1385
+ setIsSubmitting(true);
1386
+ try {
1387
+ yield submitPost();
1388
+ }
1389
+ catch (e) {
1390
+ console.error(e);
1391
+ pushNotifications(getDefaultFailNoti(t));
1392
+ }
1393
+ setIsSubmitting(false);
1394
+ }
1395
+ }), disabled: !isReadyToSubmit, loading: isSubmitting }, t('createPost.popup.submit'))))));
1396
+ };
1397
+
1398
+ const StyledTopicSelectList = styled.div `
1399
+ display: flex;
1400
+ width: 100%;
1401
+ flex-wrap: wrap;
1402
+ margin-top: 1rem;
1403
+
1404
+ .tag-item {
1405
+ min-height: 32px;
1406
+ padding: 5px 12px;
1407
+ border: 1px solid ${theme.colors.neutral100};
1408
+ margin-right: 1rem;
1409
+ margin-bottom: 8px;
1410
+ border-radius: 1rem;
1411
+ color: ${theme.colors.gray800};
1412
+ cursor: pointer;
1413
+ font-size: 13px;
1414
+ line-height: 22px;
1415
+ transition: all 0.2s;
1416
+
1417
+ &.--active {
1418
+ border-color: ${theme.colors.primary50};
1419
+ background: ${theme.colors.primary50};
1420
+ color: ${theme.colors.primaryBase};
1421
+ }
1422
+ &[data-disabled='true'] {
1423
+ background: ${theme.colors.gray100};
1424
+ color: ${theme.colors.gray800};
1425
+ }
1426
+ }
1427
+ .topic-spinner {
1428
+ margin-right: auto;
1429
+ margin-left: auto;
1430
+ & > button {
1431
+ width: 24px;
1432
+ height: 24px;
1433
+ }
1434
+ }
1435
+ &[data-is-marrybaby='true'] {
1436
+ .tag-item {
1437
+ border-color: transparent;
1438
+ background: #f3f3f3;
1439
+ color: #3e3f58;
1440
+ &.--active {
1441
+ border-color: #b6cdff;
1442
+ background: #e0e9fb;
1443
+ color: #3e3f58;
1444
+ }
1445
+ }
1446
+ }
1447
+ `;
1448
+
1449
+ const TopicSelectList = ({ className, style, topics: topicsProp, communityId, onChange, isLoading, disabled, forceTopics, selectedTopics: selectedTopicsProp, noFetch, dataEventCategory, dataEventAction, dataEventLabel, }) => {
1450
+ const { data: { locale, env: { isMarryBaby }, }, } = useContext(TogetherComponentGlobalContext);
1451
+ const [topics, setTopics] = useState(topicsProp ? [...topicsProp] : []);
1452
+ const [selectedTopics, setSelectedTopics] = useState(selectedTopicsProp ? [...selectedTopicsProp] : []);
1453
+ const [isLoadingTopics, setIsLoadingTopics] = useState(false);
1454
+ const topicsPropRef = useRef(topicsProp);
1455
+ topicsPropRef.current = topicsProp;
1456
+ useEffect(() => {
1457
+ var _a;
1458
+ if (communityId && !noFetch && !((_a = topicsPropRef.current) === null || _a === void 0 ? void 0 : _a.length)) {
1459
+ setTopics([]);
1460
+ setIsLoadingTopics(true);
1461
+ (() => __awaiter(void 0, void 0, void 0, function* () {
1462
+ var _b;
1463
+ try {
1464
+ const res = yield callApi(getApiPath(PATHS.TOPIC.LIST, {
1465
+ communityId: communityId,
1466
+ _locale: locale,
1467
+ }), 'GET');
1468
+ const topicRes = (_b = res === null || res === void 0 ? void 0 : res.data) === null || _b === void 0 ? void 0 : _b.topics;
1469
+ if (Array.isArray(topicRes)) {
1470
+ setTopics(() => (topicRes === null || topicRes === void 0 ? void 0 : topicRes.map(formatTopic).sort((t1, t2) => (t1.order || 0) - (t2.order || 0))) || []);
1471
+ }
1472
+ }
1473
+ catch (e) {
1474
+ console.log(e);
1475
+ setIsLoadingTopics(false);
1476
+ }
1477
+ setIsLoadingTopics(false);
1478
+ }))();
1479
+ }
1480
+ }, [communityId, noFetch]);
1481
+ const topicsPropString = topicsProp === null || topicsProp === void 0 ? void 0 : topicsProp.map((t) => t.id).join('-');
1482
+ const topicsStateString = topics === null || topics === void 0 ? void 0 : topics.map((t) => t.id).join('-');
1483
+ const forceTopicsPropString = forceTopics === null || forceTopics === void 0 ? void 0 : forceTopics.map((t) => t.id).join('-');
1484
+ useEffect(() => {
1485
+ if (topicsProp &&
1486
+ typeof topicsPropString !== 'undefined' &&
1487
+ topicsPropString !== topicsStateString) {
1488
+ setTopics(topicsProp);
1489
+ }
1490
+ }, [topicsProp, topicsPropString, topicsStateString]);
1491
+ const topicsWithoutForced = useMemo(() => topics.filter((t) => !(forceTopics === null || forceTopics === void 0 ? void 0 : forceTopics.some((ft) => (ft.id && ft.id === t.id) ||
1492
+ (ft.mappedCategoryId &&
1493
+ ft.mappedCategoryId === t.mappedCategoryId)))), [topicsStateString, forceTopicsPropString]);
1494
+ return (React__default.createElement(StyledTopicSelectList, { "data-is-marrybaby": isMarryBaby, className: className, style: style },
1495
+ forceTopics.map((topic) => (React__default.createElement(TopicItem, { key: `${topic.id}-${topic.mappedCategoryId}`, topic: topic, disabled: true, selected: true, dataEventAction: dataEventAction, dataEventCategory: dataEventCategory, dataEventLabel: dataEventLabel }))),
1496
+ topicsWithoutForced.map((topic) => (React__default.createElement(TopicItem, { key: `${topic.id}-${topic.mappedCategoryId}`, topic: topic, disabled: disabled, selected: (selectedTopicsProp || selectedTopics).some((t) => (t.id && t.id === topic.id) ||
1497
+ (t.mappedCategoryId &&
1498
+ t.mappedCategoryId === topic.mappedCategoryId)), onClick: () => {
1499
+ const _selected = selectedTopicsProp || selectedTopics;
1500
+ const foundIndex = _selected.findIndex((_selected) => (_selected.id && _selected.id === topic.id) ||
1501
+ (_selected.mappedCategoryId &&
1502
+ _selected.mappedCategoryId === topic.mappedCategoryId));
1503
+ if (foundIndex !== -1) {
1504
+ _selected.splice(foundIndex, 1);
1505
+ }
1506
+ else {
1507
+ _selected.push(topic);
1508
+ }
1509
+ if (onChange && selectedTopicsProp) {
1510
+ onChange(_selected.slice());
1511
+ }
1512
+ else {
1513
+ onChange && onChange(_selected.slice());
1514
+ setSelectedTopics(_selected.slice());
1515
+ }
1516
+ }, dataEventAction: dataEventAction, dataEventCategory: dataEventCategory, dataEventLabel: dataEventLabel }))),
1517
+ (isLoading || isLoadingTopics) && React__default.createElement(Loading$1, { className: "topic-spinner" })));
1518
+ };
1519
+ const TopicItem = (_a) => {
1520
+ var { topic, disabled, selected, onClick } = _a, rest = __rest(_a, ["topic", "disabled", "selected", "onClick"]);
1521
+ return (React__default.createElement("div", Object.assign({ className: 'tag-item' + (selected ? ' --active' : ''), "data-disabled": disabled, onClick: !disabled ? onClick : undefined }, rest), topic.name));
1522
+ };
1523
+
1524
+ var styles = {"skipBtn":"KsWg8i6","alertHeading":"_9tS0EUN","alertDesc":"kyyRKlb","alertAction":"-Uqqka-"};
1525
+
1526
+ const SkipQuestionOfExpertBtn = (_a) => {
1527
+ var { post, onSkip, btnText, currentPageUrl } = _a, rest = __rest(_a, ["post", "onSkip", "btnText", "currentPageUrl"]);
1528
+ const { t } = useTranslations();
1529
+ const { data: { locale }, action: { pushNotifications }, } = useContext(TogetherComponentGlobalContext);
1530
+ const [showAlert, setShowAlert] = useState(false);
1531
+ const [loading, setLoading] = useState(false);
1532
+ const _theme = useMantineTheme();
1533
+ const handleSkip = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
1534
+ var _b;
1535
+ setLoading(true);
1536
+ const res = yield callApiWithAuth(getApiPath(PATHS.USER.SKIP_QUESTION, {
1537
+ _locale: locale,
1538
+ id: post === null || post === void 0 ? void 0 : post.id,
1539
+ }), 'PUT');
1540
+ if ((res === null || res === void 0 ? void 0 : res.status) === 1) {
1541
+ onSkip === null || onSkip === void 0 ? void 0 : onSkip({ id: (post === null || post === void 0 ? void 0 : post.id) || '', communityId: ((_b = post === null || post === void 0 ? void 0 : post.community) === null || _b === void 0 ? void 0 : _b.id) || '' });
1542
+ setShowAlert(false);
1543
+ pushNotifications({
1544
+ title: '',
1545
+ message: 'Skip success',
1546
+ type: 'success',
1547
+ });
1548
+ }
1549
+ else {
1550
+ pushNotifications({
1551
+ title: '',
1552
+ message: res === null || res === void 0 ? void 0 : res.messages,
1553
+ type: 'danger',
1554
+ });
1555
+ }
1556
+ setLoading(false);
1557
+ }), []);
1558
+ return (React__default.createElement(Popover, { width: 327, withArrow: true, shadow: "md", opened: showAlert },
1559
+ React__default.createElement(Popover.Target, null,
1560
+ React__default.createElement("div", Object.assign({ className: `${styles.skipBtn} ${(rest === null || rest === void 0 ? void 0 : rest.className) || ''}`, onClick: () => setShowAlert(true) }, rest), btnText || t('profilePanel.questionNotClear'))),
1561
+ React__default.createElement(Popover.Dropdown, null,
1562
+ React__default.createElement("div", null,
1563
+ React__default.createElement("div", { className: styles.alertHeading }, t('profilePanel.skipQuestion.heading')),
1564
+ React__default.createElement("div", { className: styles.alertDesc }, t('profilePanel.skipQuestion.content')),
1565
+ React__default.createElement("div", { className: styles.alertAction },
1566
+ React__default.createElement(Button, { size: "md", variant: "secondary", leftIcon: React__default.createElement(Close, { color: _theme.fn.primaryColor(), size: 24 }), onClick: () => setShowAlert(false), styles: () => ({
1567
+ leftIcon: {
1568
+ marginRight: 0,
1569
+ },
1570
+ }) }),
1571
+ React__default.createElement(Button, { variant: "primary", size: "md", leftIcon: React__default.createElement(Check, { color: 'white', size: 24 }), onClick: handleSkip, loading: loading, "data-event-category": "Together", "data-event-action": "Unclear Question Click", "data-event-label": currentPageUrl, styles: () => ({
1572
+ leftIcon: {
1573
+ marginRight: 0,
1574
+ },
1575
+ }) }))))));
1576
+ };
1577
+
1578
+ export { CreateNewPostContent as C, SkipQuestionOfExpertBtn as S, TopicSelectList as T, CreatePostDescription as a, CreatePostTitle as b };