@hhgtech/hhg-components 1.28.62 → 1.28.63

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 (278) hide show
  1. package/build/{Plus-604516f4.js → Plus-ae3f1f1c.js} +1 -1
  2. package/build/{WhatsApp-f1d6b14e.js → WhatsApp-9c647c87.js} +1 -1
  3. package/build/babyGrowth.js +2 -2
  4. package/build/cache.js +1 -1
  5. package/build/care.js +1 -1
  6. package/build/components.js +1 -1
  7. package/build/{constants-bb162521.js → constants-d09c9d40.js} +1 -1
  8. package/build/{constants-415311f2.js → constants-dc97041d.js} +1 -1
  9. package/build/constants.js +1 -1
  10. package/build/{core-bd3b4346.js → core-ceb177b7.js} +1 -1
  11. package/build/{dataTransform-2a34e3b5.js → dataTransform-6589809b.js} +1 -1
  12. package/build/ecom.js +1 -1
  13. package/build/esm/{Plus-de7131f8.js → Plus-f9baa442.js} +1 -1
  14. package/build/esm/{WhatsApp-7f4b19b1.js → WhatsApp-fa4f9c9a.js} +1 -1
  15. package/build/esm/babyGrowth.js +4 -4
  16. package/build/esm/cache.js +1 -1
  17. package/build/esm/care.js +1 -1
  18. package/build/esm/components.js +1 -1
  19. package/build/esm/{constants-901cc927.js → constants-7f4574f8.js} +1 -1
  20. package/build/esm/{constants-b0eef95d.js → constants-b5618857.js} +1 -1
  21. package/build/esm/constants.js +1 -1
  22. package/build/esm/{core-7b295697.js → core-bbffde52.js} +1 -1
  23. package/build/esm/{dataTransform-153b0415.js → dataTransform-baac9e3c.js} +1 -1
  24. package/build/esm/ecom.js +1 -1
  25. package/build/esm/footer.js +1 -1
  26. package/build/esm/gAssets.js +1 -1
  27. package/build/esm/getDynamicHealthTool-c475fbf1.js +1 -0
  28. package/build/esm/{getSocialList-c03b6d02.js → getSocialList-3a45d82e.js} +1 -1
  29. package/build/esm/hooks.js +1 -1
  30. package/build/esm/i18n.js +1 -1
  31. package/build/esm/i18nV2.js +1 -1
  32. package/build/esm/{index-69fe47fc.js → index-0298e7d5.js} +5 -5
  33. package/build/esm/{index-daa02c08.js → index-0c53b603.js} +1 -1
  34. package/build/esm/{index-59996cf7.js → index-0d75a9cd.js} +2 -2
  35. package/build/esm/{index-b9ec0fe0.js → index-25c7e6d3.js} +1 -1
  36. package/build/esm/{index-9c612b46.js → index-2c1e3436.js} +1 -1
  37. package/build/esm/{index-7f709461.js → index-2d727db7.js} +13 -13
  38. package/build/esm/index-2ed10a0e.js +1 -0
  39. package/build/esm/{index-1af07d9c.js → index-38ef8472.js} +1 -1
  40. package/build/esm/{index-91a6562c.js → index-4661402d.js} +1 -1
  41. package/build/esm/index-493554d0.js +1 -0
  42. package/build/esm/index-498fc282.js +1 -0
  43. package/build/esm/{index-d9a9aa1f.js → index-4f722c15.js} +1 -1
  44. package/build/esm/index-51bfcbb2.js +1 -0
  45. package/build/esm/{index-caec98f9.js → index-605281ba.js} +1 -1
  46. package/build/esm/{index-4012f8e2.js → index-62e617ca.js} +1 -1
  47. package/build/esm/{index-b3cc51da.js → index-7fd69a08.js} +1 -1
  48. package/build/esm/{index-86b52a2c.js → index-ae2e10d3.js} +1 -1
  49. package/build/esm/index-b30afac1.js +1 -0
  50. package/build/esm/{index-cc381bc4.js → index-b3a4e983.js} +1 -1
  51. package/build/esm/{index-1058ab05.js → index-c04854ca.js} +1 -1
  52. package/build/esm/index-e7376795.js +1 -0
  53. package/build/esm/{index-8fbbf717.js → index-ed172b37.js} +4 -4
  54. package/build/esm/{index-03a17874.js → index-f1daae70.js} +1 -1
  55. package/build/esm/index.js +1 -1
  56. package/build/esm/{index.styled-8e599c48.js → index.styled-3e90a056.js} +1 -1
  57. package/build/esm/{index.styles-9931a6ae.js → index.styles-b54bd8c1.js} +1 -1
  58. package/build/esm/lead.js +1 -1
  59. package/build/esm/mantine.js +1 -1
  60. package/build/esm/misc.js +1 -1
  61. package/build/esm/navigation.js +1 -1
  62. package/build/esm/onboardingV2.js +5 -5
  63. package/build/esm/pwg.js +2 -2
  64. package/build/esm/{routing-f0695fda.js → routing-b25f56a7.js} +1 -1
  65. package/build/esm/subot.js +4 -4
  66. package/build/esm/together.js +1 -1
  67. package/build/esm/{types-fcdfea25.js → types-72e00020.js} +1 -1
  68. package/build/esm/{types-872087bd.js → types-ccefb5e5.js} +1 -1
  69. package/build/esm/types.js +1 -1
  70. package/build/esm/{useCategory-5c852aa2.js → useCategory-4cd6dfaf.js} +1 -1
  71. package/build/esm/{useHealthToolCache-43e8e8f9.js → useHealthToolCache-8b6e1132.js} +1 -1
  72. package/build/esm/{usePlacesAutocomplete-90deab26.js → usePlacesAutocomplete-72c9f622.js} +1 -1
  73. package/build/esm/{useTranslations-d3fe4d57.js → useTranslations-0bb35954.js} +1 -1
  74. package/build/esm/{utils-5c800314.js → utils-2b792e4e.js} +2 -2
  75. package/build/esm/{utils-20c841cf.js → utils-b9d39124.js} +1 -1
  76. package/build/esm/{utils-310ee32d.js → utils-d5233d16.js} +1 -1
  77. package/build/esm/vaccination.js +11 -11
  78. package/build/footer.js +1 -1
  79. package/build/gAssets.js +1 -1
  80. package/build/{getDynamicHealthTool-bc55248a.js → getDynamicHealthTool-ae96b303.js} +1 -1
  81. package/build/{getSocialList-c6e3d542.js → getSocialList-e7c280a8.js} +1 -1
  82. package/build/hooks.js +1 -1
  83. package/build/i18n.js +1 -1
  84. package/build/i18nV2.js +1 -1
  85. package/build/{index-239adc41.js → index-14762a87.js} +1 -1
  86. package/build/{index-2af4652a.js → index-180724c1.js} +4 -4
  87. package/build/{index-44cde1cb.js → index-1abb8f88.js} +1 -1
  88. package/build/{index-8728ee32.js → index-3382263b.js} +2 -2
  89. package/build/{index-28c95254.js → index-36fc1e59.js} +1 -1
  90. package/build/{index-a85994ad.js → index-3e70ce5b.js} +1 -1
  91. package/build/{index-78f49c14.js → index-4c97e71b.js} +1 -1
  92. package/build/{index-26e2258d.js → index-54a7debd.js} +1 -1
  93. package/build/{index-2cbfcb5f.js → index-562409e6.js} +1 -1
  94. package/build/{index-c8909641.js → index-792d8012.js} +1 -1
  95. package/build/{index-307d7dff.js → index-79e6fda5.js} +1 -1
  96. package/build/{index-6cf34cb9.js → index-84bceb91.js} +1 -1
  97. package/build/{index-af999763.js → index-8a1ab578.js} +1 -1
  98. package/build/{index-60ee6b9b.js → index-9c3a324e.js} +1 -1
  99. package/build/index-a0adc072.js +1 -0
  100. package/build/{index-936719bb.js → index-a607ab1d.js} +1 -1
  101. package/build/{index-817f8fa1.js → index-aec13cfc.js} +1 -1
  102. package/build/{index-83c139a1.js → index-bc58ea87.js} +1 -1
  103. package/build/{index-bd2b578c.js → index-be13ca0c.js} +1 -1
  104. package/build/{index-3d997052.js → index-bf4de588.js} +1 -1
  105. package/build/{index-02d3d16c.js → index-dc6d1d9a.js} +1 -1
  106. package/build/{index-e5a02049.js → index-f236c6ce.js} +1 -1
  107. package/build/index-f2ffd65d.js +1 -0
  108. package/build/index.js +1 -1
  109. package/build/{index.styled-a5d71af4.js → index.styled-54e422d1.js} +1 -1
  110. package/build/{index.styles-75680e35.js → index.styles-db50e54a.js} +1 -1
  111. package/build/lead.js +1 -1
  112. package/build/mantine.js +1 -1
  113. package/build/misc.js +1 -1
  114. package/build/navigation.js +1 -1
  115. package/build/onboardingV2.js +1 -1
  116. package/build/pwg.js +1 -1
  117. package/build/{routing-c4813a3e.js → routing-1640409f.js} +1 -1
  118. package/build/subot.js +4 -4
  119. package/build/together.js +1 -1
  120. package/build/{types-dd525096.js → types-5bd287ac.js} +1 -1
  121. package/build/{types-637880d1.js → types-e554c5c4.js} +1 -1
  122. package/build/types.js +1 -1
  123. package/build/{useCategory-51b86a53.js → useCategory-e4dfcb8a.js} +1 -1
  124. package/build/{useHealthToolCache-f2fa636c.js → useHealthToolCache-b26a7cf9.js} +1 -1
  125. package/build/{usePlacesAutocomplete-4a353bb8.js → usePlacesAutocomplete-0ec84410.js} +1 -1
  126. package/build/{useTranslations-ea594f2b.js → useTranslations-048502c3.js} +1 -1
  127. package/build/{utils-daaf711a.js → utils-18176c91.js} +1 -1
  128. package/build/{utils-fd656785.js → utils-3423e2dc.js} +1 -1
  129. package/build/{utils-a2d1259c.js → utils-8795aba5.js} +1 -1
  130. package/build/vaccination.js +1 -1
  131. package/package.json +1 -1
  132. package/build/esm/getDynamicHealthTool-537d729a.js +0 -1
  133. package/build/esm/index-1e807f75.js +0 -1
  134. package/build/esm/index-2fa5855e.js +0 -1
  135. package/build/esm/index-3725cdc6.js +0 -1
  136. package/build/esm/index-a53d934d.js +0 -1
  137. package/build/esm/index-e9275a06.js +0 -1
  138. package/build/esm/index-fc3adf89.js +0 -1
  139. package/build/index-51e2c6f1.js +0 -1
  140. package/build/index-72d3e24c.js +0 -1
  141. /package/build/{BMI_BOYS.percentile.monthly-91879f17.js → BMI_BOYS.percentile.monthly-91736295.js} +0 -0
  142. /package/build/{BMI_BOYS.percentile.weekly-b7c97457.js → BMI_BOYS.percentile.weekly-7daa3f43.js} +0 -0
  143. /package/build/{BMI_BOYS.percentile.yearly-af9ec85d.js → BMI_BOYS.percentile.yearly-e1a194ed.js} +0 -0
  144. /package/build/{BMI_BOYS.zscore.monthly-bdd0ca91.js → BMI_BOYS.zscore.monthly-dc557672.js} +0 -0
  145. /package/build/{BMI_BOYS.zscore.weekly-868299a4.js → BMI_BOYS.zscore.weekly-4236c342.js} +0 -0
  146. /package/build/{BMI_BOYS.zscore.yearly-5f89953f.js → BMI_BOYS.zscore.yearly-93119dc0.js} +0 -0
  147. /package/build/{BMI_GIRLS.percentile.monthly-4f7e96ef.js → BMI_GIRLS.percentile.monthly-4e19faea.js} +0 -0
  148. /package/build/{BMI_GIRLS.percentile.weekly-29a9ca25.js → BMI_GIRLS.percentile.weekly-4d61bb8f.js} +0 -0
  149. /package/build/{BMI_GIRLS.percentile.yearly-30482b74.js → BMI_GIRLS.percentile.yearly-536a1834.js} +0 -0
  150. /package/build/{BMI_GIRLS.zscore.monthly-b0f291b8.js → BMI_GIRLS.zscore.monthly-df08f573.js} +0 -0
  151. /package/build/{BMI_GIRLS.zscore.weekly-7a2a9d63.js → BMI_GIRLS.zscore.weekly-aba2b3cb.js} +0 -0
  152. /package/build/{BMI_GIRLS.zscore.yearly-a696d690.js → BMI_GIRLS.zscore.yearly-6e156a08.js} +0 -0
  153. /package/build/{ChevronDown-5f8f0c72.js → ChevronDown-5665d3a9.js} +0 -0
  154. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-f17f696a.js → HEAD CIRCUM_BOYS.percentile.monthly-32d6c29a.js} +0 -0
  155. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-3073af11.js → HEAD CIRCUM_BOYS.percentile.weekly-9e8ba5f2.js} +0 -0
  156. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-fa373553.js → HEAD CIRCUM_BOYS.percentile.yearly-98d70e74.js} +0 -0
  157. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-bd4c1a07.js → HEAD CIRCUM_BOYS.zscore.monthly-549098ac.js} +0 -0
  158. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-0642163a.js → HEAD CIRCUM_BOYS.zscore.weekly-32b3a232.js} +0 -0
  159. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-39e55c5d.js → HEAD CIRCUM_BOYS.zscore.yearly-e99db18a.js} +0 -0
  160. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-8d30efa1.js → HEAD CIRCUM_GIRLS.percentile.monthly-a342d1d0.js} +0 -0
  161. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-aef68e2e.js → HEAD CIRCUM_GIRLS.percentile.weekly-e5b7ce81.js} +0 -0
  162. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-59c53c3a.js → HEAD CIRCUM_GIRLS.percentile.yearly-41a19f44.js} +0 -0
  163. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-062a5b64.js → HEAD CIRCUM_GIRLS.zscore.monthly-6ae8b224.js} +0 -0
  164. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-6944bd4b.js → HEAD CIRCUM_GIRLS.zscore.weekly-f6da7e3b.js} +0 -0
  165. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-ecec062f.js → HEAD CIRCUM_GIRLS.zscore.yearly-b1fa7d33.js} +0 -0
  166. /package/build/{HEIGHT_BOYS.percentile.monthly-728d5989.js → HEIGHT_BOYS.percentile.monthly-3bb95ea8.js} +0 -0
  167. /package/build/{HEIGHT_BOYS.percentile.weekly-e6e06816.js → HEIGHT_BOYS.percentile.weekly-9db86f8e.js} +0 -0
  168. /package/build/{HEIGHT_BOYS.percentile.yearly-d4fad20a.js → HEIGHT_BOYS.percentile.yearly-f2286be8.js} +0 -0
  169. /package/build/{HEIGHT_BOYS.zscore.monthly-0beb7dbe.js → HEIGHT_BOYS.zscore.monthly-930c7ee5.js} +0 -0
  170. /package/build/{HEIGHT_BOYS.zscore.weekly-8ca86553.js → HEIGHT_BOYS.zscore.weekly-71b8b008.js} +0 -0
  171. /package/build/{HEIGHT_BOYS.zscore.yearly-4f6b24fe.js → HEIGHT_BOYS.zscore.yearly-1a3198a2.js} +0 -0
  172. /package/build/{HEIGHT_GIRLS.percentile.monthly-d1ab6259.js → HEIGHT_GIRLS.percentile.monthly-061c62e1.js} +0 -0
  173. /package/build/{HEIGHT_GIRLS.percentile.weekly-f73159c1.js → HEIGHT_GIRLS.percentile.weekly-d5d01d57.js} +0 -0
  174. /package/build/{HEIGHT_GIRLS.percentile.yearly-4f15d1b3.js → HEIGHT_GIRLS.percentile.yearly-026c20ce.js} +0 -0
  175. /package/build/{HEIGHT_GIRLS.zscore.monthly-20d6b0db.js → HEIGHT_GIRLS.zscore.monthly-a3124ea8.js} +0 -0
  176. /package/build/{HEIGHT_GIRLS.zscore.weekly-de6c980d.js → HEIGHT_GIRLS.zscore.weekly-627056f9.js} +0 -0
  177. /package/build/{HEIGHT_GIRLS.zscore.yearly-ec74caf6.js → HEIGHT_GIRLS.zscore.yearly-37df79df.js} +0 -0
  178. /package/build/{Subot-143686ec.js → Subot-e6872850.js} +0 -0
  179. /package/build/{Visible-f012c649.js → Visible-6aa69048.js} +0 -0
  180. /package/build/{WEIGHT_BOYS.percentile.monthly-7ba7d852.js → WEIGHT_BOYS.percentile.monthly-a38f00d2.js} +0 -0
  181. /package/build/{WEIGHT_BOYS.percentile.weekly-f29380a4.js → WEIGHT_BOYS.percentile.weekly-be120ac2.js} +0 -0
  182. /package/build/{WEIGHT_BOYS.percentile.yearly-71aa679f.js → WEIGHT_BOYS.percentile.yearly-f6753964.js} +0 -0
  183. /package/build/{WEIGHT_BOYS.zscore.monthly-1782ea7b.js → WEIGHT_BOYS.zscore.monthly-2014191f.js} +0 -0
  184. /package/build/{WEIGHT_BOYS.zscore.weekly-fd93fd9d.js → WEIGHT_BOYS.zscore.weekly-7f8356a0.js} +0 -0
  185. /package/build/{WEIGHT_BOYS.zscore.yearly-01d000bb.js → WEIGHT_BOYS.zscore.yearly-63366da9.js} +0 -0
  186. /package/build/{WEIGHT_GIRLS.percentile.monthly-af7c166c.js → WEIGHT_GIRLS.percentile.monthly-4bba1508.js} +0 -0
  187. /package/build/{WEIGHT_GIRLS.percentile.weekly-b0e59949.js → WEIGHT_GIRLS.percentile.weekly-f319703a.js} +0 -0
  188. /package/build/{WEIGHT_GIRLS.percentile.yearly-04ecd1a3.js → WEIGHT_GIRLS.percentile.yearly-4f67e080.js} +0 -0
  189. /package/build/{WEIGHT_GIRLS.zscore.monthly-1f357197.js → WEIGHT_GIRLS.zscore.monthly-18f02e99.js} +0 -0
  190. /package/build/{WEIGHT_GIRLS.zscore.weekly-1b182249.js → WEIGHT_GIRLS.zscore.weekly-2cfd7b20.js} +0 -0
  191. /package/build/{WEIGHT_GIRLS.zscore.yearly-0d1f0581.js → WEIGHT_GIRLS.zscore.yearly-80d8a567.js} +0 -0
  192. /package/build/{animation-20581243.js → animation-f9bf49c2.js} +0 -0
  193. /package/build/{cookieHelper-373906e4.js → cookieHelper-ef7d953a.js} +0 -0
  194. /package/build/esm/{BMI_BOYS.percentile.monthly-8a2cfc06.js → BMI_BOYS.percentile.monthly-ddb48063.js} +0 -0
  195. /package/build/esm/{BMI_BOYS.percentile.weekly-7508c88d.js → BMI_BOYS.percentile.weekly-c0648245.js} +0 -0
  196. /package/build/esm/{BMI_BOYS.percentile.yearly-c0c198e1.js → BMI_BOYS.percentile.yearly-7ff90e19.js} +0 -0
  197. /package/build/esm/{BMI_BOYS.zscore.monthly-0762b9fa.js → BMI_BOYS.zscore.monthly-1a391aa0.js} +0 -0
  198. /package/build/esm/{BMI_BOYS.zscore.weekly-e4410b26.js → BMI_BOYS.zscore.weekly-87c07f97.js} +0 -0
  199. /package/build/esm/{BMI_BOYS.zscore.yearly-43e71415.js → BMI_BOYS.zscore.yearly-8096818b.js} +0 -0
  200. /package/build/esm/{BMI_GIRLS.percentile.monthly-d5d59e17.js → BMI_GIRLS.percentile.monthly-cf77c289.js} +0 -0
  201. /package/build/esm/{BMI_GIRLS.percentile.weekly-bab5db9b.js → BMI_GIRLS.percentile.weekly-873165af.js} +0 -0
  202. /package/build/esm/{BMI_GIRLS.percentile.yearly-c8c8ac68.js → BMI_GIRLS.percentile.yearly-5faf3c3c.js} +0 -0
  203. /package/build/esm/{BMI_GIRLS.zscore.monthly-b831e939.js → BMI_GIRLS.zscore.monthly-f1702f43.js} +0 -0
  204. /package/build/esm/{BMI_GIRLS.zscore.weekly-464bc4e0.js → BMI_GIRLS.zscore.weekly-30ea07c3.js} +0 -0
  205. /package/build/esm/{BMI_GIRLS.zscore.yearly-a20db236.js → BMI_GIRLS.zscore.yearly-19075227.js} +0 -0
  206. /package/build/esm/{ChevronDown-6f4503d4.js → ChevronDown-66f1b917.js} +0 -0
  207. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-9c7d3ef6.js → HEAD CIRCUM_BOYS.percentile.monthly-631ecc2d.js} +0 -0
  208. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-051d5464.js → HEAD CIRCUM_BOYS.percentile.weekly-04c837f8.js} +0 -0
  209. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-6e70a5bf.js → HEAD CIRCUM_BOYS.percentile.yearly-d7ede8cf.js} +0 -0
  210. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-92904253.js → HEAD CIRCUM_BOYS.zscore.monthly-2d92e608.js} +0 -0
  211. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-6cca65cb.js → HEAD CIRCUM_BOYS.zscore.weekly-546dbe8a.js} +0 -0
  212. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-b946c213.js → HEAD CIRCUM_BOYS.zscore.yearly-ec70d56e.js} +0 -0
  213. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-c0ffffac.js → HEAD CIRCUM_GIRLS.percentile.monthly-11befe30.js} +0 -0
  214. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-ee77c7e0.js → HEAD CIRCUM_GIRLS.percentile.weekly-3bbe3128.js} +0 -0
  215. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-40c1cc09.js → HEAD CIRCUM_GIRLS.percentile.yearly-8b2c3da7.js} +0 -0
  216. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-16084891.js → HEAD CIRCUM_GIRLS.zscore.monthly-4418244b.js} +0 -0
  217. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-a48e5e27.js → HEAD CIRCUM_GIRLS.zscore.weekly-6915d31f.js} +0 -0
  218. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-25f60ca3.js → HEAD CIRCUM_GIRLS.zscore.yearly-025805ed.js} +0 -0
  219. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-ac7ecba0.js → HEIGHT_BOYS.percentile.monthly-7f7afc76.js} +0 -0
  220. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-d6fd590e.js → HEIGHT_BOYS.percentile.weekly-78c4cabc.js} +0 -0
  221. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-63457955.js → HEIGHT_BOYS.percentile.yearly-02d04b6a.js} +0 -0
  222. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-258348fd.js → HEIGHT_BOYS.zscore.monthly-bfbf5622.js} +0 -0
  223. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-07e91e5b.js → HEIGHT_BOYS.zscore.weekly-e38e4796.js} +0 -0
  224. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-547ce422.js → HEIGHT_BOYS.zscore.yearly-9cc84666.js} +0 -0
  225. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-4950327f.js → HEIGHT_GIRLS.percentile.monthly-a986e7f0.js} +0 -0
  226. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-33c532f4.js → HEIGHT_GIRLS.percentile.weekly-11d7c175.js} +0 -0
  227. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-13a4a903.js → HEIGHT_GIRLS.percentile.yearly-b25e4a9c.js} +0 -0
  228. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-ec739839.js → HEIGHT_GIRLS.zscore.monthly-4487afd2.js} +0 -0
  229. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-7f3a86a4.js → HEIGHT_GIRLS.zscore.weekly-785a4d30.js} +0 -0
  230. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-fb36113c.js → HEIGHT_GIRLS.zscore.yearly-daab73f1.js} +0 -0
  231. /package/build/esm/{Subot-7999ad6e.js → Subot-ae88fa88.js} +0 -0
  232. /package/build/esm/{Visible-e9ec4456.js → Visible-3434e154.js} +0 -0
  233. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-60f7caf6.js → WEIGHT_BOYS.percentile.monthly-4c9cce58.js} +0 -0
  234. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-f3e5aafd.js → WEIGHT_BOYS.percentile.weekly-438354dd.js} +0 -0
  235. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-fb1228c5.js → WEIGHT_BOYS.percentile.yearly-6800346f.js} +0 -0
  236. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-f22f79c7.js → WEIGHT_BOYS.zscore.monthly-bfbc201e.js} +0 -0
  237. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-0d4dcd68.js → WEIGHT_BOYS.zscore.weekly-3251f2f5.js} +0 -0
  238. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-a1eadbc3.js → WEIGHT_BOYS.zscore.yearly-123ef8c6.js} +0 -0
  239. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-bb237c3d.js → WEIGHT_GIRLS.percentile.monthly-089ed7e3.js} +0 -0
  240. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-baf1c8d4.js → WEIGHT_GIRLS.percentile.weekly-7d5db947.js} +0 -0
  241. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-caa434cd.js → WEIGHT_GIRLS.percentile.yearly-03f5e773.js} +0 -0
  242. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-06327e26.js → WEIGHT_GIRLS.zscore.monthly-3eb5d8b7.js} +0 -0
  243. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-d24b3bf3.js → WEIGHT_GIRLS.zscore.weekly-34fd0aa9.js} +0 -0
  244. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-226fa6ae.js → WEIGHT_GIRLS.zscore.yearly-808f27c4.js} +0 -0
  245. /package/build/esm/{animation-ca214256.js → animation-4417ca20.js} +0 -0
  246. /package/build/esm/{cookieHelper-98938238.js → cookieHelper-ed3b7d86.js} +0 -0
  247. /package/build/esm/{index-a5b48867.js → index-a560a5aa.js} +0 -0
  248. /package/build/esm/{index-c6013396.js → index-ac44db10.js} +0 -0
  249. /package/build/esm/{index-ee9f2801.js → index-f998d6e1.js} +0 -0
  250. /package/build/esm/{isProduction-cddd37e8.js → isProduction-d523789a.js} +0 -0
  251. /package/build/esm/{localizeNumberFormat-a4a3d77c.js → localizeNumberFormat-81df3d98.js} +0 -0
  252. /package/build/esm/{normalizeLink-749bc2d3.js → normalizeLink-c5577ba3.js} +0 -0
  253. /package/build/esm/{number-93f55e6b.js → number-82cebac3.js} +0 -0
  254. /package/build/esm/{paths-fc50949c.js → paths-30fd4a63.js} +0 -0
  255. /package/build/esm/{theme-75976adf.js → theme-99eb2455.js} +0 -0
  256. /package/build/esm/{translationsContext-3fcad9db.js → translationsContext-4cf58baa.js} +0 -0
  257. /package/build/esm/{tslib.es6-d2e63c2c.js → tslib.es6-b1e43fda.js} +0 -0
  258. /package/build/esm/{types-59584a1b.js → types-2ea48d96.js} +0 -0
  259. /package/build/esm/{useIsInit-42b0fd9d.js → useIsInit-8b39989a.js} +0 -0
  260. /package/build/esm/{useOutsideClick-11fa2147.js → useOutsideClick-b485b2e7.js} +0 -0
  261. /package/build/esm/{useScrollbarSize-99a6d12c.js → useScrollbarSize-146cf043.js} +0 -0
  262. /package/build/esm/{utils-f9f05267.js → utils-f9036688.js} +0 -0
  263. /package/build/{index-6479f2e3.js → index-0a1cca85.js} +0 -0
  264. /package/build/{index-b3d93572.js → index-aa048810.js} +0 -0
  265. /package/build/{index-a9d22e63.js → index-b7501b94.js} +0 -0
  266. /package/build/{isProduction-c131ac6d.js → isProduction-fce4c411.js} +0 -0
  267. /package/build/{localizeNumberFormat-e9289a8d.js → localizeNumberFormat-d7e05dd7.js} +0 -0
  268. /package/build/{normalizeLink-9186a29d.js → normalizeLink-b6635fa0.js} +0 -0
  269. /package/build/{number-adca7871.js → number-ddaf812a.js} +0 -0
  270. /package/build/{paths-96308e55.js → paths-c422db6f.js} +0 -0
  271. /package/build/{theme-642223e9.js → theme-1e27b9db.js} +0 -0
  272. /package/build/{translationsContext-7536ee11.js → translationsContext-c8376758.js} +0 -0
  273. /package/build/{tslib.es6-77ffe29f.js → tslib.es6-f581f504.js} +0 -0
  274. /package/build/{types-ee160eb3.js → types-09c003bf.js} +0 -0
  275. /package/build/{useIsInit-a9fb1d1f.js → useIsInit-79bacc2e.js} +0 -0
  276. /package/build/{useOutsideClick-2d095eba.js → useOutsideClick-2c2b4a08.js} +0 -0
  277. /package/build/{useScrollbarSize-7706add7.js → useScrollbarSize-dabf7fd9.js} +0 -0
  278. /package/build/{utils-460cc1b1.js → utils-97861e62.js} +0 -0
package/build/subot.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("./Subot-143686ec.js"),i=require("./tslib.es6-77ffe29f.js"),n=require("./index-78f49c14.js"),o=require("js-cookie"),a=require("fastdom"),l=require("fastdom/extensions/fastdom-promised"),r=require("string-format"),s=require("./utils-fd656785.js"),d=require("uuid"),c=require("./isProduction-c131ac6d.js"),u=require("hex-rgb"),m=require("classnames"),p=require("./index-a9d22e63.js"),f=require("./index-2cbfcb5f.js"),v=require("framer-motion"),g=require("./utils-460cc1b1.js"),b=require("styled-components"),h=require("./index-44cde1cb.js"),_=require("remarkable"),y=require("react-intersection-observer"),E=require("@mantine/core"),x=require("./index-936719bb.js"),N=require("./index-3d997052.js"),T=require("dayjs"),w=require("dayjs/plugin/isSameOrBefore"),I=require("./Plus-604516f4.js"),S=require("./theme-642223e9.js");require("@mantine/dates"),require("./translationsContext-7536ee11.js"),require("@mantine/hooks");var O=require("lodash/isEmpty"),k=require("react-hook-form"),C=require("react-phone-number-input"),M=require("@react-google-maps/api"),A=require("./usePlacesAutocomplete-4a353bb8.js"),P=require("./index-a85994ad.js"),R=require("./index-8728ee32.js");function U(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("date-fns/locale"),require("./cookieHelper-373906e4.js"),require("slugify"),require("./useTranslations-ea594f2b.js"),require("date-fns"),require("react-day-picker/DayPickerInput"),require("@mantine/carousel"),require("./WhatsApp-f1d6b14e.js");var B=U(e),L=U(o),j=U(a),D=U(l),q=U(r),F=U(u),$=U(m),G=U(b),z=U(T),H=U(w),Y=U(O),V=U(C);const Q=j.default.extend(D.default),K={POST_VERIFY_SMS_OTP:"sms/update-phone",POST_SEND_OTP:"sms/otp",POST_SEND_OTP_WHATSAPP:"whatsapp/otp",POST_VERIFY_OTP:"sms/verify",POST_VERIFY_OTP_WHATSAPP:"sms/verify-whatsapp",GET_LANDING_PAGE_FIRST_NODE:"landing_page/bot",GET_LANDING_PAGE_NEXT_NODE:"landing_page/messages",POST_LANDING_PAGE_IMPRESSION:"landing_page/impressions",POST_LANDING_PAGE_CLICK:"landing_page/clicks",GET_INLINE_FIRST_NODE:"bots",GET_INLINE_MESSAGE:"inline/messages",GET_INLINE_IMPRESSION:"inline/impressions",GET_INLINE_CLICK:"inline/clicks",GET_SUBOT_LOG:"log/bot/{botId}/{cookieId}/{accountId}?type={type}",POST_SUBOT_CREATE_LOG:"log/bot",FETCH_URL_DATA:"preview",GET_VOUCHER_QUANTITY:"vouchers/total_quantity?search={search}&client_id={clientId}"},W={cached:{},clearCached:e=>{console.log(W.cached),Object.keys(W.cached).filter((t=>t.startsWith(e))).forEach((e=>{console.log(e),W.cached[e]=void 0}))},withCached:(e,t)=>i.__awaiter(void 0,void 0,void 0,(function*(){if("waitingTheFirstResponse"===W.cached[e])return new Promise((t=>{const i=(new Date).getTime(),n=setInterval((()=>{(new Date).getTime()-i>3e3&&clearInterval(n),"object"==typeof W.cached[e]&&(t(W.cached[e]),clearInterval(n))}),100)}));if("object"==typeof W.cached[e])return W.cached[e];W.cached[e]="waitingTheFirstResponse";try{const i=yield t();return W.cached[e]=i,setTimeout((()=>{W.cached[e]=void 0}),18e5),i}catch(t){return W.cached[e]=void 0,Promise.reject(t)}}))},X=(e,t)=>{const{subotApiUrl:i}=null===s.GlobalData||void 0===s.GlobalData?void 0:s.GlobalData.env;return(i.endsWith("frontend/api/")?i:i+"frontend/api/")+q.default(e,Object.assign({},t))},J=e=>i.__awaiter(void 0,void 0,void 0,(function*(){try{return yield s.callApi(X(K.GET_INLINE_MESSAGE),"POST",{data:e})}catch(e){}})),Z=e=>{var t;if(1===(null==e?void 0:e._status)&&(null===(t=null==e?void 0:e._data)||void 0===t?void 0:t.extra_settings))try{const t=JSON.parse(e._data.extra_settings);e._data.extra_settings="object"==typeof t?t:{sync_data_friso_campaign:!1}}catch(t){e._data.extra_settings={sync_data_friso_campaign:!1}}return e},ee=e=>i.__awaiter(void 0,void 0,void 0,(function*(){try{return yield W.withCached("SubotInlineFirstNode/"+e,(()=>i.__awaiter(void 0,void 0,void 0,(function*(){const t=yield s.callApi(X(K.GET_INLINE_FIRST_NODE)+`/${e}`,"GET");return Z(t),t}))))}catch(e){return null}})),te=e=>i.__awaiter(void 0,void 0,void 0,(function*(){try{return yield s.callApi(X(K.GET_INLINE_CLICK),"POST",{data:e})}catch(e){}})),ie=e=>i.__awaiter(void 0,void 0,void 0,(function*(){try{return yield s.callApi(X(K.GET_INLINE_IMPRESSION),"POST",{data:e})}catch(e){}})),ne=["form_submit_meta","selected_actions","current_selected","current_keys","current_polls"],oe=["bot_id","node_id","action_id","action_value","current_score","gtm_id","ga_client_id","is_new","title_url","url","window_id",...ne],ae=(e,t)=>(Object.keys(t).map((i=>{const n=t[i];if("source"!==i){if(oe.includes(i))if(ne.includes(i))try{e[i]=JSON.parse(n)}catch(e){}else e[i]="account_id"!==i&&"current_score"!==i&&"bot_id"!==i?n:parseInt(n)}else e.is_new="first_login"===n})),e),le=e=>[{id:d.v4(),label:JSON.stringify({title:"",description:""}),type:t.NodeIntentType.SSO_INTENT,url:""},{id:d.v4(),label:JSON.stringify({title:e({id:"subot.myHealth.title",defaultMessage:"My Health"}),description:e({id:"subot.myHealth.description",defaultMessage:"Personal identifiers (like your name) will always be removed to protect your privacy. "})}),type:t.NodeIntentType.SSO_INTENT,url:"/images/subot/my-health.svg"},{id:d.v4(),label:JSON.stringify({title:e({id:"subot.saveData.title",defaultMessage:"Save Data"}),description:e({id:"subot.saveData.description",defaultMessage:"Hellobacsi would like to learn from your data to provide better healthcare for you"})}),type:t.NodeIntentType.SSO_INTENT,url:"/images/subot/file-storage.svg"},{id:d.v4(),label:JSON.stringify({title:e({id:"subot.productYourIdentifiers.title",defaultMessage:"Protect your identifiers"}),description:e({id:"subot.productYourIdentifiers.description",defaultMessage:"Personal identifiers (like your name) will always be removed to protect your privacy. "})}),type:t.NodeIntentType.SSO_INTENT,url:"/images/subot/shield.svg"}];function re(e){const t=e.condition,i=e.finished,n=e.timeout||3e3,o=(new Date).getTime(),a=setInterval((()=>{((new Date).getTime()-o>n||t())&&(clearInterval(a),i())}),300)}const se=e=>s.cookie.parse(e||"")["hhg-id"]||L.default.get("hhg-id")||"",de=e=>{if(e)return L.default.set("hhg-id",e),e;const t=se();if(t)return t;const i=d.v4();return L.default.set("hhg-id",i),i},ce=e=>{const t=s.cookie.parse(e||"")[n.BEARER_TOKEN_COOKIE]||L.default.get(n.BEARER_TOKEN_COOKIE)||"";try{const e=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));return JSON.parse(i).sub}catch(e){return""}},ue=e=>{const t=s.cookie.parse(e||"")[n.BEARER_TOKEN_COOKIE]||L.default.get(n.BEARER_TOKEN_COOKIE)||"";try{const e=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join("")),n=JSON.parse(i);return{email:n.email,id:n.sub}}catch(e){return{email:"",id:0}}},me=d.v4(),pe=()=>me,fe=(e,t)=>!t&&("undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname))?"http://localhost":`https://${c.isProduction?"":"discover."}${n.domainLocales[e]}`,ve=e=>{const t=e||("undefined"==typeof navigator?"":navigator.userAgent);return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substring(0,4)))},ge=e=>{const t=document.createElement("a");t.href=e,t.target="_blank",t.click()},be=e=>{try{return e.dynamic_score||{}}catch(e){return{}}},he=(e,i,n,o)=>{const a=be(e[0]);if(!i)return{};const l=e.findIndex((e=>e.id==i)),r=e.reduce(((e,r,s)=>{var d,c;if(s>l)return e;const u=r,m=n&&u.id===i?{action_id:n}:u._message;let p=0;const f=null===(d=u.actions)||void 0===d?void 0:d.find((e=>e.id===(null==m?void 0:m.action_id)));p+=(null==f?void 0:f.score)||0;const v=void 0!==a[u.id],g=n&&u.id===i?o:null==m?void 0:m.form_submit_meta;if(v&&u.type===t.NodeType.FORM&&g){const e=a[u.id].action_id,t=null===(c=u.actions)||void 0===c?void 0:c.find((t=>t.id===e)),i=null==t?void 0:t.key,n=g.find((e=>e.key===i&&"number"===e.control));if(a[u.id].number&&["+","-","x","/"].includes(a[u.id].operator)&&(null==n?void 0:n.value)&&Number(n.value)){const e=Number(n.value),t=a[u.id].operator,i=a[u.id].number;let o=0;"+"===t&&(o=e+i),"-"===t&&(o=e-i),"x"===t&&(o=e*i),"/"===t&&(o=e/i),isNaN(o)||(p+=o)}}return e+p}),0);return{current_total_dynamic_score:r}},_e=(e,i)=>{const n=be(i[0]);if(0===Object.keys(n).length)return e;const o=i.filter((e=>e.type===t.NodeType.FORM));return Object.keys(n).forEach((t=>{var i,a,l;const r=o.find((e=>e.id===t)),s=null===(i=null==r?void 0:r.actions)||void 0===i?void 0:i.find((e=>{var i;return e.id===(null===(i=n[t])||void 0===i?void 0:i.action_id)})),d=null==s?void 0:s.key,c=null===(l=null===(a=null==r?void 0:r._message)||void 0===a?void 0:a.form_submit_meta)||void 0===l?void 0:l.find((e=>e.key===d&&"number"===e.control));if(n[t].number&&["+","-","x","/"].includes(n[t].operator)&&(null==c?void 0:c.value)&&Number(c.value)){const i=Number(c.value),o=n[t].operator,a=n[t].number;let l=0;if("+"===o&&(l=i+a),"-"===o&&(l=i-a),"x"===o&&(l=i*a),"/"===o&&(l=i/a),e.includes(`{{var:${d}}}`)){const t=new RegExp(`{{var:${d}}}`,"g");e=e.replace(t,String(Math.floor(100*l)/100))}}})),e},ye="other",Ee="stateInlineSSO",xe=()=>{try{const e=window.next.router.components["/[...slug]"].props.pageProps;return"services-connection"===e.template?{project_id:"care-path",user_funnel:e.spotlight.additionalSlugActive||"",audience_name:e.spotlight.groupIdActive||""}:{}}catch(e){return{}}},Ne=e=>{const i=e.filter((e=>"Unified Questions"===e.name)).reduce(((e,i)=>{var n,o,a,l,r,s,d,c,u,m,p,f,v,g,b,h,_,y,E,x,N;if(i.actions&&(null===(n=i._message)||void 0===n?void 0:n.action_id)&&(null===(o=i._message)||void 0===o?void 0:o.action_value)){const n=i._message.action_value;if(i.type===t.NodeType.FORM){const t=["address","province","district","commune"],n=((null===(a=i._message)||void 0===a?void 0:a.form_submit_meta)||[]).filter((e=>!t.includes(e.control))),o=((null===(l=i._message)||void 0===l?void 0:l.form_submit_meta)||[]).filter((e=>t.includes(e.control))).reduce(((e,t)=>(e[t.control]=t,e)),{}),p=[null===(r=o.address)||void 0===r?void 0:r.value,null===(s=o.commune)||void 0===s?void 0:s.value,null===(d=o.district)||void 0===d?void 0:d.value,null===(c=o.province)||void 0===c?void 0:c.value].filter(Boolean).join(", ");p&&o.address?e.push({attribute:o.address.key,value:p,label_question:(null===(m=null===(u=i.intents)||void 0===u?void 0:u[0])||void 0===m?void 0:m.label)||""}):n.forEach((t=>{var n,o;e.push({attribute:t.key,value:t.value,label_question:(null===(o=null===(n=i.intents)||void 0===n?void 0:n[0])||void 0===o?void 0:o.label)||""})}))}if(i.type===t.NodeType.TEXT)if(i.is_multi_select){const t=Object.keys(i._message.selected_actions||{}),n=i.actions.filter((e=>e.label&&t.includes(e.id))).map((e=>e.label));t.length&&e.push({attribute:i.actions[0].key||"",value:n,label_question:(null===(f=null===(p=i.intents)||void 0===p?void 0:p[0])||void 0===f?void 0:f.label)||""})}else{const o=i._message.action_id,a=i.actions.find((e=>e.id===o)),l=null==a?void 0:a.label,r=null===(b=null===(g=null===(v=i._message)||void 0===v?void 0:v.form_submit_meta)||void 0===g?void 0:g.find((e=>e.key===ye)))||void 0===b?void 0:b.value,s=(null==a?void 0:a.type)===t.NodeActionType.USER_CHOICE_TEXT_BY_INPUT;l&&o&&e.push({attribute:n,value:s&&r?r:l,label_question:(null===(_=null===(h=i.intents)||void 0===h?void 0:h[0])||void 0===_?void 0:_.label)||""})}if(i.type===t.NodeType.POLL){const t=i.id,n=(null===(E=null===(y=i._message)||void 0===y?void 0:y.current_polls)||void 0===E?void 0:E[t])||[],o=i.actions.filter((e=>e.label&&n.includes(e.id))).map((e=>e.label));n.length&&e.push({attribute:i.actions[0].key||"",value:o,label_question:(null===(N=null===(x=i.intents)||void 0===x?void 0:x[0])||void 0===N?void 0:N.label)||""})}}return e}),[]);return i},Te=(e,i)=>{var n;try{if("ACUVUE"!==(null===(n=i.extra_settings)||void 0===n?void 0:n.subot_type))return;let o="",a="",l="",r=ue().email;if((e||[]).forEach((e=>{var i,n,s;const d=e._message;if(!d)return;const c=null===(i=e.actions)||void 0===i?void 0:i.find((e=>e.id===d.action_id));if("voucher_product"===d.action_value?o=(null==c?void 0:c.label)||"":"voucher_color"===d.action_value&&(a=(null==c?void 0:c.label)||""),e.type===t.NodeType.FORM){const e=null===(n=d.form_submit_meta)||void 0===n?void 0:n.find((e=>"voucher_size"===e.key)),t=null===(s=d.form_submit_meta)||void 0===s?void 0:s.find((e=>"email"===e.control));e&&(l=e.value),t&&(r=t.value)}})),"ACUVUE® OASYS (1-DAY) WITH HYDRALUXE®"===o&&r)return{email:r,voucherName:o};if(o&&a&&l&&r)return{email:r,voucherName:`${o}|${a}|${l}`}}catch(e){console.log("ExtractVoucherAnswer",e)}},we=({nodes:e,activeId:o,params:a,accountIdFromLogs:l})=>i.__awaiter(void 0,void 0,void 0,(function*(){try{let i="in_progress";const r=e[e.length-1];(null==r?void 0:r.type)&&t.NodeFinalTypes.includes(r.type)&&(i="complete");const d=e.slice(1),c={activeId:o,params:a,nodes:d,tracking:Object.assign(Object.assign({},xe()),{full_url:window.location.href}),unifiedAnswers:Ne(d),voucherAnswers:Te(d,e[0])},u={cookie_id:de(),account_id:l||ce()||null,bot_id:e[0].id,flow_uuid:e[0].flow_uuid,data:JSON.stringify(c),status:i,type:"inline",market:n.MAP_DOMAIN_BY_LOCALE[s.locale]};yield s.callApi(X(K.POST_SUBOT_CREATE_LOG),"POST",{data:u})}catch(e){}})),Ie=(e,t)=>{try{const[i,n,o]=F.default(e,{format:"array"});return`rgba(${i}, ${n}, ${o}, ${t})`}catch(e){return}},Se=e.createContext({activeId:"",params:{},listNodes:[],loading:!0,getParams:()=>({}),onNext:()=>null,onPrev:()=>null,onSubmit:()=>null,onStartOver:()=>null,onChange:()=>null,isShowFooter:!1,setIsShowFooter:()=>null,setLoading:()=>null,userInfo:null}),Oe=({children:o,articleLink:a,subotId:l,isFullContainer:r,bgColor:d,primaryColor:c,textColor:u,textButtonColor:m,bgContentColor:p,bgImgFullContainer:f,isDisabledAnimationOnMobile:v,onCloseMobile:g,userInfo:b})=>{const{formatMessage:h,action:{pushNotifications:_}}=e.useContext(s.TogetherComponentGlobalContext),y=e.useRef(null),E=e.useRef(null),[x,N]=e.useState(!0),[T,w]=e.useState(""),[I,S]=e.useState([]),[O,k]=e.useState(!1),[C,M]=e.useState({});e.useEffect((()=>{const e=d||"#e3f2ff",t=c||"#2d87f3",i=(new Date).getTime(),n=setInterval((()=>{const o=y.current,a=(new Date).getTime();o&&(Q.mutate((()=>{o.style.setProperty("--subot-inline-bg-color",e),o.style.setProperty("--subot-inline-primary-color",t),o.style.setProperty("--subot-inline-primary-color-hover",Ie(t,.9)||t),o.style.setProperty("--subot-inline-primary-color-100",Ie(t,.1)||"#e3f2ff"),o.style.setProperty("--subot-inline-primary-color-300",Ie(t,.3)||"#bcdeff"),u&&o.style.setProperty("--subot-inline-text-color",u),m&&o.style.setProperty("--subot-inline-text-button-color",m),p&&o.style.setProperty("--subot-inline-bg-content-color",p)})),clearInterval(n)),a-i>18e4&&clearInterval(n)}),100);return()=>{clearInterval(n)}}),[d,c,u,m,p]);const A=e.useCallback((()=>{const e=window.gaData,t=window.location.origin+n.basePath+("tl-PH"===(null===s.GlobalData||void 0===s.GlobalData?void 0:s.GlobalData.locale)?a.replace("fil/",""):a),i={bot_id:l,account_id:ce()||null,action_id:"",action_value:"",cookie_id:de(),current_score:0,current_keys:[],current_selected:[],form_submit_meta:[],gtm_id:e?Object.keys(e)[0]:"",ga_client_id:L.default.get("_ga")||"",is_new:!1,mode:"inline",node_id:"",selected_actions:{},title_url:document.title||"",url:t.replace("http://localhost:6006","https://discover.hellobacsi.com").replace("http://localhost","https://discover.hellobacsi.com").replace("dev.","discover.").replace("staging.hellohealthgroup.com","discover.hellodoctor.com.ph").replace("https://hellohealthgroup.com","https://hellodoctor.com.ph"),window_id:pe()};return ae(i,null===s.GlobalData||void 0===s.GlobalData?void 0:s.GlobalData.router.query)}),[]),P=e.useCallback((()=>{var e;null===(e=y.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start",inline:"center"})}),[]),R=e.useCallback(((e,n=!0)=>i.__awaiter(void 0,void 0,void 0,(function*(){var o;if(!e||!e.url||!e.bot_id)return;let a="",l=[];N(!0);const r=yield ee(e.bot_id);1===(null==r?void 0:r._status)&&(a=null==r?void 0:r._data.id.toString(),l.push(null==r?void 0:r._data,null==r?void 0:r._data.first_node));const d=n?yield(c=l[0],i.__awaiter(void 0,void 0,void 0,(function*(){var e,t;try{if(!c)return null;const i=yield s.callApi(X(K.GET_SUBOT_LOG,{botId:c.id,cookieId:de(),accountId:ce()||"",type:"inline"}),"GET");if(!(null===(e=null==i?void 0:i._data)||void 0===e?void 0:e.data)||"inline"!==(null===(t=null==i?void 0:i._data)||void 0===t?void 0:t.type))return null;const n=JSON.parse(i._data.data),o=n.nodes,a="in_progress"===i._data.status,l="complete"===i._data.status;return a||l?{nodes:[c,...o],activeId:n.activeId,params:Object.assign(Object.assign({},n.params),{account_id:ce()||n.params.account_id||null})}:null}catch(e){return null}}))):null;var c;d&&(l=d.nodes,a=d.activeId,E.current=(null===(o=d.params)||void 0===o?void 0:o.account_id)||0);const u=((e,{getParams:i})=>{try{if(!ce())return null;const n=JSON.parse(localStorage.getItem(Ee)||""),o=18e5;return(null==n?void 0:n.botId)===e&&n.listNodes&&n.activeId&&n.createdAt+o>Date.now()&&(localStorage.removeItem(Ee),n.listNodes.slice(-1)[0].position===t.NodePosition.SSO)?{listNodes:n.listNodes,activeId:n.activeId,params:Object.assign(Object.assign(Object.assign({},i()),n.params),{account_id:ce()||null,cookie_id:de(n.params.cookie_id)})}:null}catch(e){return null}})(e.bot_id,{getParams:A});if(u&&u.params.action_id&&u.params.action_value){const e=yield J(u.params);1===(null==e?void 0:e._status)&&(null==e?void 0:e._data.node)&&(a=null==e?void 0:e._data.node.id,l=u.listNodes,l[l.length-1]=null==e?void 0:e._data.node,we({nodes:l,activeId:a,params:u.params,accountIdFromLogs:E.current}),setTimeout((()=>{P()}),100))}const m=(null==u?void 0:u.params)||(null==d?void 0:d.params)||e,[p,f]=((e,t,i)=>{if(!(null==e?void 0:e.subot_field_type))return[t,i];const n=i.find((e=>e.id==t));return n&&n.hasOwnProperty("first_node")&&i.length>1?[i[1].id,i]:[t,i]})(l[0],a,l);N(!1),w(p),S(f),M(Object.assign(Object.assign({},e),m))}))),[]),U=e.useCallback(((e,t)=>{const i=document.querySelector(`.si-revamp-event-submission[data-bot-id="${l}"]`);i&&i.click();let n=T,o=[...I];if(null==t?void 0:t.node_id){const e=o.findIndex((({id:e})=>e==t.node_id));-1!==e&&(o[e]._message=Object.assign(Object.assign({},o[e]._message),t),o=[...o.slice(0,e+1)])}if(N(!0),e){const t=o.findIndex((({id:t})=>t==(null==e?void 0:e.id)));if(-1===t)o=[...o,Object.assign({},e)];else{const i=Object.assign(Object.assign(Object.assign({},o[t]),e),{_message:Object.assign(Object.assign({},o[t]._message),null==e?void 0:e._message)});o=[...o.slice(0,t),Object.assign({},i),...o.slice(t+1)]}n=e.id}setTimeout((()=>{S(o),w(n),N(!1),we({nodes:o,activeId:n,params:C,accountIdFromLogs:E.current})}),250)}),[I,T]),j=e.useCallback((e=>i.__awaiter(void 0,void 0,void 0,(function*(){if(null==e?void 0:e.node_id){const t=Object.assign(Object.assign({},e),he(I,T,e.action_id)),n=yield J(t);if(N(!1),1===(null==n?void 0:n._status)){const e=null==n?void 0:n._data,{node:o}=e,a=i.__rest(e,["node"]),l=Object.assign(Object.assign({},o),{_message:Object.assign(Object.assign({},a),{node_id:o.id})});return void(-1!==I.findIndex((e=>e.id===l.id))?U(l):U(l,t))}_({title:h({id:"notification.comment.somethingWrong"}),message:"",type:"danger"})}const t=I.find((e=>e.id==T));t&&t.hasOwnProperty("first_node")&&(w(I[1].id.toString()),we({nodes:I,activeId:I[1].id.toString(),params:A(),accountIdFromLogs:E.current}))}))),[U,I]),D=e.useCallback((()=>{const e=I.findIndex((({id:e})=>e==T));if(e&&-1!==e&&e>1){const t=I[e-1];w(t.id),we({nodes:I,activeId:t.id,params:C,accountIdFromLogs:E.current})}}),[I,T]),q=e.useCallback((()=>{const e=A();R(e,!1);const t=I[0],i=I[1];we({nodes:[t,i],activeId:String(t.id),params:e,accountIdFromLogs:E.current})}),[A,R,I]),F=e.useCallback((e=>{S((t=>e&&(null==e?void 0:e.node_id)&&(null==e?void 0:e.node_id)==T?t.map((t=>{const i=t;return i.id===T?Object.assign(Object.assign({},t),{_message:i._message?Object.assign(Object.assign({},i._message),e):e}):t})):t))}),[T]);e.useEffect((()=>{if(L.default.get(n.GA_TOKEN_COOKIE)){const e=A();R(e)}else re({condition:()=>Boolean(L.default.get(n.GA_TOKEN_COOKIE)),finished:()=>{const e=A();R(e)}})}),[]),e.useEffect((()=>{if(!I.length)return;I.find((e=>e.id==T))&&T||w(l+"")}),[T,I]);const $=e.useMemo((()=>({activeId:T,params:C,listNodes:I,loading:x,setLoading:N,getParams:A,onNext:j,onPrev:D,onSubmit:U,onStartOver:q,onChange:F,isShowFooter:O,setIsShowFooter:k,isFullContainer:r,bgImgFullContainer:f,isDisabledAnimationOnMobile:v,onCloseMobile:g,userInfo:b})),[T,j,D,U,F,q,O,C,I,x,N,A,r,v,g,b,f]);return I.length?B.default.createElement(Se.Provider,{value:$},B.default.createElement("div",{ref:y},o)):null},ke=e=>B.default.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),B.default.createElement("path",{d:"M5.991 4.99a1 1 0 0 0-.697 1.717L10.587 12l-5.293 5.293a1 1 0 1 0 1.414 1.415L12 13.415l5.293 5.293a1 1 0 1 0 1.414-1.415L13.415 12l5.293-5.293a1 1 0 1 0-1.414-1.414L12 10.586 6.708 5.293a1 1 0 0 0-.717-.302",fill:"#595959"})),Ce="480px",Me=G.default.div`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("./Subot-e6872850.js"),i=require("./tslib.es6-f581f504.js"),n=require("./index-4c97e71b.js"),o=require("js-cookie"),a=require("fastdom"),l=require("fastdom/extensions/fastdom-promised"),r=require("string-format"),s=require("./utils-3423e2dc.js"),d=require("uuid"),c=require("./isProduction-fce4c411.js"),u=require("hex-rgb"),m=require("classnames"),p=require("./index-b7501b94.js"),f=require("./index-562409e6.js"),v=require("framer-motion"),g=require("./utils-97861e62.js"),b=require("styled-components"),h=require("./index-1abb8f88.js"),_=require("remarkable"),y=require("react-intersection-observer"),E=require("@mantine/core"),x=require("./index-a607ab1d.js"),N=require("./index-bf4de588.js"),T=require("dayjs"),w=require("dayjs/plugin/isSameOrBefore"),I=require("./Plus-ae3f1f1c.js"),S=require("./theme-1e27b9db.js");require("@mantine/dates"),require("./translationsContext-c8376758.js"),require("@mantine/hooks");var O=require("lodash/isEmpty"),k=require("react-hook-form"),C=require("react-phone-number-input"),M=require("@react-google-maps/api"),A=require("./usePlacesAutocomplete-0ec84410.js"),P=require("./index-3e70ce5b.js"),R=require("./index-3382263b.js");function U(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("date-fns/locale"),require("./cookieHelper-ef7d953a.js"),require("slugify"),require("./useTranslations-048502c3.js"),require("date-fns"),require("react-day-picker/DayPickerInput"),require("@mantine/carousel"),require("./WhatsApp-9c647c87.js");var B=U(e),L=U(o),j=U(a),D=U(l),q=U(r),F=U(u),$=U(m),G=U(b),z=U(T),H=U(w),Y=U(O),V=U(C);const Q=j.default.extend(D.default),K={POST_VERIFY_SMS_OTP:"sms/update-phone",POST_SEND_OTP:"sms/otp",POST_SEND_OTP_WHATSAPP:"whatsapp/otp",POST_VERIFY_OTP:"sms/verify",POST_VERIFY_OTP_WHATSAPP:"sms/verify-whatsapp",GET_LANDING_PAGE_FIRST_NODE:"landing_page/bot",GET_LANDING_PAGE_NEXT_NODE:"landing_page/messages",POST_LANDING_PAGE_IMPRESSION:"landing_page/impressions",POST_LANDING_PAGE_CLICK:"landing_page/clicks",GET_INLINE_FIRST_NODE:"bots",GET_INLINE_MESSAGE:"inline/messages",GET_INLINE_IMPRESSION:"inline/impressions",GET_INLINE_CLICK:"inline/clicks",GET_SUBOT_LOG:"log/bot/{botId}/{cookieId}/{accountId}?type={type}",POST_SUBOT_CREATE_LOG:"log/bot",FETCH_URL_DATA:"preview",GET_VOUCHER_QUANTITY:"vouchers/total_quantity?search={search}&client_id={clientId}"},W={cached:{},clearCached:e=>{console.log(W.cached),Object.keys(W.cached).filter((t=>t.startsWith(e))).forEach((e=>{console.log(e),W.cached[e]=void 0}))},withCached:(e,t)=>i.__awaiter(void 0,void 0,void 0,(function*(){if("waitingTheFirstResponse"===W.cached[e])return new Promise((t=>{const i=(new Date).getTime(),n=setInterval((()=>{(new Date).getTime()-i>3e3&&clearInterval(n),"object"==typeof W.cached[e]&&(t(W.cached[e]),clearInterval(n))}),100)}));if("object"==typeof W.cached[e])return W.cached[e];W.cached[e]="waitingTheFirstResponse";try{const i=yield t();return W.cached[e]=i,setTimeout((()=>{W.cached[e]=void 0}),18e5),i}catch(t){return W.cached[e]=void 0,Promise.reject(t)}}))},X=(e,t)=>{const{subotApiUrl:i}=null===s.GlobalData||void 0===s.GlobalData?void 0:s.GlobalData.env;return(i.endsWith("frontend/api/")?i:i+"frontend/api/")+q.default(e,Object.assign({},t))},J=e=>i.__awaiter(void 0,void 0,void 0,(function*(){try{return yield s.callApi(X(K.GET_INLINE_MESSAGE),"POST",{data:e})}catch(e){}})),Z=e=>{var t;if(1===(null==e?void 0:e._status)&&(null===(t=null==e?void 0:e._data)||void 0===t?void 0:t.extra_settings))try{const t=JSON.parse(e._data.extra_settings);e._data.extra_settings="object"==typeof t?t:{sync_data_friso_campaign:!1}}catch(t){e._data.extra_settings={sync_data_friso_campaign:!1}}return e},ee=e=>i.__awaiter(void 0,void 0,void 0,(function*(){try{return yield W.withCached("SubotInlineFirstNode/"+e,(()=>i.__awaiter(void 0,void 0,void 0,(function*(){const t=yield s.callApi(X(K.GET_INLINE_FIRST_NODE)+`/${e}`,"GET");return Z(t),t}))))}catch(e){return null}})),te=e=>i.__awaiter(void 0,void 0,void 0,(function*(){try{return yield s.callApi(X(K.GET_INLINE_CLICK),"POST",{data:e})}catch(e){}})),ie=e=>i.__awaiter(void 0,void 0,void 0,(function*(){try{return yield s.callApi(X(K.GET_INLINE_IMPRESSION),"POST",{data:e})}catch(e){}})),ne=["form_submit_meta","selected_actions","current_selected","current_keys","current_polls"],oe=["bot_id","node_id","action_id","action_value","current_score","gtm_id","ga_client_id","is_new","title_url","url","window_id",...ne],ae=(e,t)=>(Object.keys(t).map((i=>{const n=t[i];if("source"!==i){if(oe.includes(i))if(ne.includes(i))try{e[i]=JSON.parse(n)}catch(e){}else e[i]="account_id"!==i&&"current_score"!==i&&"bot_id"!==i?n:parseInt(n)}else e.is_new="first_login"===n})),e),le=e=>[{id:d.v4(),label:JSON.stringify({title:"",description:""}),type:t.NodeIntentType.SSO_INTENT,url:""},{id:d.v4(),label:JSON.stringify({title:e({id:"subot.myHealth.title",defaultMessage:"My Health"}),description:e({id:"subot.myHealth.description",defaultMessage:"Personal identifiers (like your name) will always be removed to protect your privacy. "})}),type:t.NodeIntentType.SSO_INTENT,url:"/images/subot/my-health.svg"},{id:d.v4(),label:JSON.stringify({title:e({id:"subot.saveData.title",defaultMessage:"Save Data"}),description:e({id:"subot.saveData.description",defaultMessage:"Hellobacsi would like to learn from your data to provide better healthcare for you"})}),type:t.NodeIntentType.SSO_INTENT,url:"/images/subot/file-storage.svg"},{id:d.v4(),label:JSON.stringify({title:e({id:"subot.productYourIdentifiers.title",defaultMessage:"Protect your identifiers"}),description:e({id:"subot.productYourIdentifiers.description",defaultMessage:"Personal identifiers (like your name) will always be removed to protect your privacy. "})}),type:t.NodeIntentType.SSO_INTENT,url:"/images/subot/shield.svg"}];function re(e){const t=e.condition,i=e.finished,n=e.timeout||3e3,o=(new Date).getTime(),a=setInterval((()=>{((new Date).getTime()-o>n||t())&&(clearInterval(a),i())}),300)}const se=e=>s.cookie.parse(e||"")["hhg-id"]||L.default.get("hhg-id")||"",de=e=>{if(e)return L.default.set("hhg-id",e),e;const t=se();if(t)return t;const i=d.v4();return L.default.set("hhg-id",i),i},ce=e=>{const t=s.cookie.parse(e||"")[n.BEARER_TOKEN_COOKIE]||L.default.get(n.BEARER_TOKEN_COOKIE)||"";try{const e=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));return JSON.parse(i).sub}catch(e){return""}},ue=e=>{const t=s.cookie.parse(e||"")[n.BEARER_TOKEN_COOKIE]||L.default.get(n.BEARER_TOKEN_COOKIE)||"";try{const e=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join("")),n=JSON.parse(i);return{email:n.email,id:n.sub}}catch(e){return{email:"",id:0}}},me=d.v4(),pe=()=>me,fe=(e,t)=>!t&&("undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname))?"http://localhost":`https://${c.isProduction?"":"discover."}${n.domainLocales[e]}`,ve=e=>{const t=e||("undefined"==typeof navigator?"":navigator.userAgent);return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substring(0,4)))},ge=e=>{const t=document.createElement("a");t.href=e,t.target="_blank",t.click()},be=e=>{try{return e.dynamic_score||{}}catch(e){return{}}},he=(e,i,n,o)=>{const a=be(e[0]);if(!i)return{};const l=e.findIndex((e=>e.id==i)),r=e.reduce(((e,r,s)=>{var d,c;if(s>l)return e;const u=r,m=n&&u.id===i?{action_id:n}:u._message;let p=0;const f=null===(d=u.actions)||void 0===d?void 0:d.find((e=>e.id===(null==m?void 0:m.action_id)));p+=(null==f?void 0:f.score)||0;const v=void 0!==a[u.id],g=n&&u.id===i?o:null==m?void 0:m.form_submit_meta;if(v&&u.type===t.NodeType.FORM&&g){const e=a[u.id].action_id,t=null===(c=u.actions)||void 0===c?void 0:c.find((t=>t.id===e)),i=null==t?void 0:t.key,n=g.find((e=>e.key===i&&"number"===e.control));if(a[u.id].number&&["+","-","x","/"].includes(a[u.id].operator)&&(null==n?void 0:n.value)&&Number(n.value)){const e=Number(n.value),t=a[u.id].operator,i=a[u.id].number;let o=0;"+"===t&&(o=e+i),"-"===t&&(o=e-i),"x"===t&&(o=e*i),"/"===t&&(o=e/i),isNaN(o)||(p+=o)}}return e+p}),0);return{current_total_dynamic_score:r}},_e=(e,i)=>{const n=be(i[0]);if(0===Object.keys(n).length)return e;const o=i.filter((e=>e.type===t.NodeType.FORM));return Object.keys(n).forEach((t=>{var i,a,l;const r=o.find((e=>e.id===t)),s=null===(i=null==r?void 0:r.actions)||void 0===i?void 0:i.find((e=>{var i;return e.id===(null===(i=n[t])||void 0===i?void 0:i.action_id)})),d=null==s?void 0:s.key,c=null===(l=null===(a=null==r?void 0:r._message)||void 0===a?void 0:a.form_submit_meta)||void 0===l?void 0:l.find((e=>e.key===d&&"number"===e.control));if(n[t].number&&["+","-","x","/"].includes(n[t].operator)&&(null==c?void 0:c.value)&&Number(c.value)){const i=Number(c.value),o=n[t].operator,a=n[t].number;let l=0;if("+"===o&&(l=i+a),"-"===o&&(l=i-a),"x"===o&&(l=i*a),"/"===o&&(l=i/a),e.includes(`{{var:${d}}}`)){const t=new RegExp(`{{var:${d}}}`,"g");e=e.replace(t,String(Math.floor(100*l)/100))}}})),e},ye="other",Ee="stateInlineSSO",xe=()=>{try{const e=window.next.router.components["/[...slug]"].props.pageProps;return"services-connection"===e.template?{project_id:"care-path",user_funnel:e.spotlight.additionalSlugActive||"",audience_name:e.spotlight.groupIdActive||""}:{}}catch(e){return{}}},Ne=e=>{const i=e.filter((e=>"Unified Questions"===e.name)).reduce(((e,i)=>{var n,o,a,l,r,s,d,c,u,m,p,f,v,g,b,h,_,y,E,x,N;if(i.actions&&(null===(n=i._message)||void 0===n?void 0:n.action_id)&&(null===(o=i._message)||void 0===o?void 0:o.action_value)){const n=i._message.action_value;if(i.type===t.NodeType.FORM){const t=["address","province","district","commune"],n=((null===(a=i._message)||void 0===a?void 0:a.form_submit_meta)||[]).filter((e=>!t.includes(e.control))),o=((null===(l=i._message)||void 0===l?void 0:l.form_submit_meta)||[]).filter((e=>t.includes(e.control))).reduce(((e,t)=>(e[t.control]=t,e)),{}),p=[null===(r=o.address)||void 0===r?void 0:r.value,null===(s=o.commune)||void 0===s?void 0:s.value,null===(d=o.district)||void 0===d?void 0:d.value,null===(c=o.province)||void 0===c?void 0:c.value].filter(Boolean).join(", ");p&&o.address?e.push({attribute:o.address.key,value:p,label_question:(null===(m=null===(u=i.intents)||void 0===u?void 0:u[0])||void 0===m?void 0:m.label)||""}):n.forEach((t=>{var n,o;e.push({attribute:t.key,value:t.value,label_question:(null===(o=null===(n=i.intents)||void 0===n?void 0:n[0])||void 0===o?void 0:o.label)||""})}))}if(i.type===t.NodeType.TEXT)if(i.is_multi_select){const t=Object.keys(i._message.selected_actions||{}),n=i.actions.filter((e=>e.label&&t.includes(e.id))).map((e=>e.label));t.length&&e.push({attribute:i.actions[0].key||"",value:n,label_question:(null===(f=null===(p=i.intents)||void 0===p?void 0:p[0])||void 0===f?void 0:f.label)||""})}else{const o=i._message.action_id,a=i.actions.find((e=>e.id===o)),l=null==a?void 0:a.label,r=null===(b=null===(g=null===(v=i._message)||void 0===v?void 0:v.form_submit_meta)||void 0===g?void 0:g.find((e=>e.key===ye)))||void 0===b?void 0:b.value,s=(null==a?void 0:a.type)===t.NodeActionType.USER_CHOICE_TEXT_BY_INPUT;l&&o&&e.push({attribute:n,value:s&&r?r:l,label_question:(null===(_=null===(h=i.intents)||void 0===h?void 0:h[0])||void 0===_?void 0:_.label)||""})}if(i.type===t.NodeType.POLL){const t=i.id,n=(null===(E=null===(y=i._message)||void 0===y?void 0:y.current_polls)||void 0===E?void 0:E[t])||[],o=i.actions.filter((e=>e.label&&n.includes(e.id))).map((e=>e.label));n.length&&e.push({attribute:i.actions[0].key||"",value:o,label_question:(null===(N=null===(x=i.intents)||void 0===x?void 0:x[0])||void 0===N?void 0:N.label)||""})}}return e}),[]);return i},Te=(e,i)=>{var n;try{if("ACUVUE"!==(null===(n=i.extra_settings)||void 0===n?void 0:n.subot_type))return;let o="",a="",l="",r=ue().email;if((e||[]).forEach((e=>{var i,n,s;const d=e._message;if(!d)return;const c=null===(i=e.actions)||void 0===i?void 0:i.find((e=>e.id===d.action_id));if("voucher_product"===d.action_value?o=(null==c?void 0:c.label)||"":"voucher_color"===d.action_value&&(a=(null==c?void 0:c.label)||""),e.type===t.NodeType.FORM){const e=null===(n=d.form_submit_meta)||void 0===n?void 0:n.find((e=>"voucher_size"===e.key)),t=null===(s=d.form_submit_meta)||void 0===s?void 0:s.find((e=>"email"===e.control));e&&(l=e.value),t&&(r=t.value)}})),"ACUVUE® OASYS (1-DAY) WITH HYDRALUXE®"===o&&r)return{email:r,voucherName:o};if(o&&a&&l&&r)return{email:r,voucherName:`${o}|${a}|${l}`}}catch(e){console.log("ExtractVoucherAnswer",e)}},we=({nodes:e,activeId:o,params:a,accountIdFromLogs:l})=>i.__awaiter(void 0,void 0,void 0,(function*(){try{let i="in_progress";const r=e[e.length-1];(null==r?void 0:r.type)&&t.NodeFinalTypes.includes(r.type)&&(i="complete");const d=e.slice(1),c={activeId:o,params:a,nodes:d,tracking:Object.assign(Object.assign({},xe()),{full_url:window.location.href}),unifiedAnswers:Ne(d),voucherAnswers:Te(d,e[0])},u={cookie_id:de(),account_id:l||ce()||null,bot_id:e[0].id,flow_uuid:e[0].flow_uuid,data:JSON.stringify(c),status:i,type:"inline",market:n.MAP_DOMAIN_BY_LOCALE[s.locale]};yield s.callApi(X(K.POST_SUBOT_CREATE_LOG),"POST",{data:u})}catch(e){}})),Ie=(e,t)=>{try{const[i,n,o]=F.default(e,{format:"array"});return`rgba(${i}, ${n}, ${o}, ${t})`}catch(e){return}},Se=e.createContext({activeId:"",params:{},listNodes:[],loading:!0,getParams:()=>({}),onNext:()=>null,onPrev:()=>null,onSubmit:()=>null,onStartOver:()=>null,onChange:()=>null,isShowFooter:!1,setIsShowFooter:()=>null,setLoading:()=>null,userInfo:null}),Oe=({children:o,articleLink:a,subotId:l,isFullContainer:r,bgColor:d,primaryColor:c,textColor:u,textButtonColor:m,bgContentColor:p,bgImgFullContainer:f,isDisabledAnimationOnMobile:v,onCloseMobile:g,userInfo:b})=>{const{formatMessage:h,action:{pushNotifications:_}}=e.useContext(s.TogetherComponentGlobalContext),y=e.useRef(null),E=e.useRef(null),[x,N]=e.useState(!0),[T,w]=e.useState(""),[I,S]=e.useState([]),[O,k]=e.useState(!1),[C,M]=e.useState({});e.useEffect((()=>{const e=d||"#e3f2ff",t=c||"#2d87f3",i=(new Date).getTime(),n=setInterval((()=>{const o=y.current,a=(new Date).getTime();o&&(Q.mutate((()=>{o.style.setProperty("--subot-inline-bg-color",e),o.style.setProperty("--subot-inline-primary-color",t),o.style.setProperty("--subot-inline-primary-color-hover",Ie(t,.9)||t),o.style.setProperty("--subot-inline-primary-color-100",Ie(t,.1)||"#e3f2ff"),o.style.setProperty("--subot-inline-primary-color-300",Ie(t,.3)||"#bcdeff"),u&&o.style.setProperty("--subot-inline-text-color",u),m&&o.style.setProperty("--subot-inline-text-button-color",m),p&&o.style.setProperty("--subot-inline-bg-content-color",p)})),clearInterval(n)),a-i>18e4&&clearInterval(n)}),100);return()=>{clearInterval(n)}}),[d,c,u,m,p]);const A=e.useCallback((()=>{const e=window.gaData,t=window.location.origin+n.basePath+("tl-PH"===(null===s.GlobalData||void 0===s.GlobalData?void 0:s.GlobalData.locale)?a.replace("fil/",""):a),i={bot_id:l,account_id:ce()||null,action_id:"",action_value:"",cookie_id:de(),current_score:0,current_keys:[],current_selected:[],form_submit_meta:[],gtm_id:e?Object.keys(e)[0]:"",ga_client_id:L.default.get("_ga")||"",is_new:!1,mode:"inline",node_id:"",selected_actions:{},title_url:document.title||"",url:t.replace("http://localhost:6006","https://discover.hellobacsi.com").replace("http://localhost","https://discover.hellobacsi.com").replace("dev.","discover.").replace("staging.hellohealthgroup.com","discover.hellodoctor.com.ph").replace("https://hellohealthgroup.com","https://hellodoctor.com.ph"),window_id:pe()};return ae(i,null===s.GlobalData||void 0===s.GlobalData?void 0:s.GlobalData.router.query)}),[]),P=e.useCallback((()=>{var e;null===(e=y.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start",inline:"center"})}),[]),R=e.useCallback(((e,n=!0)=>i.__awaiter(void 0,void 0,void 0,(function*(){var o;if(!e||!e.url||!e.bot_id)return;let a="",l=[];N(!0);const r=yield ee(e.bot_id);1===(null==r?void 0:r._status)&&(a=null==r?void 0:r._data.id.toString(),l.push(null==r?void 0:r._data,null==r?void 0:r._data.first_node));const d=n?yield(c=l[0],i.__awaiter(void 0,void 0,void 0,(function*(){var e,t;try{if(!c)return null;const i=yield s.callApi(X(K.GET_SUBOT_LOG,{botId:c.id,cookieId:de(),accountId:ce()||"",type:"inline"}),"GET");if(!(null===(e=null==i?void 0:i._data)||void 0===e?void 0:e.data)||"inline"!==(null===(t=null==i?void 0:i._data)||void 0===t?void 0:t.type))return null;const n=JSON.parse(i._data.data),o=n.nodes,a="in_progress"===i._data.status,l="complete"===i._data.status;return a||l?{nodes:[c,...o],activeId:n.activeId,params:Object.assign(Object.assign({},n.params),{account_id:ce()||n.params.account_id||null})}:null}catch(e){return null}}))):null;var c;d&&(l=d.nodes,a=d.activeId,E.current=(null===(o=d.params)||void 0===o?void 0:o.account_id)||0);const u=((e,{getParams:i})=>{try{if(!ce())return null;const n=JSON.parse(localStorage.getItem(Ee)||""),o=18e5;return(null==n?void 0:n.botId)===e&&n.listNodes&&n.activeId&&n.createdAt+o>Date.now()&&(localStorage.removeItem(Ee),n.listNodes.slice(-1)[0].position===t.NodePosition.SSO)?{listNodes:n.listNodes,activeId:n.activeId,params:Object.assign(Object.assign(Object.assign({},i()),n.params),{account_id:ce()||null,cookie_id:de(n.params.cookie_id)})}:null}catch(e){return null}})(e.bot_id,{getParams:A});if(u&&u.params.action_id&&u.params.action_value){const e=yield J(u.params);1===(null==e?void 0:e._status)&&(null==e?void 0:e._data.node)&&(a=null==e?void 0:e._data.node.id,l=u.listNodes,l[l.length-1]=null==e?void 0:e._data.node,we({nodes:l,activeId:a,params:u.params,accountIdFromLogs:E.current}),setTimeout((()=>{P()}),100))}const m=(null==u?void 0:u.params)||(null==d?void 0:d.params)||e,[p,f]=((e,t,i)=>{if(!(null==e?void 0:e.subot_field_type))return[t,i];const n=i.find((e=>e.id==t));return n&&n.hasOwnProperty("first_node")&&i.length>1?[i[1].id,i]:[t,i]})(l[0],a,l);N(!1),w(p),S(f),M(Object.assign(Object.assign({},e),m))}))),[]),U=e.useCallback(((e,t)=>{const i=document.querySelector(`.si-revamp-event-submission[data-bot-id="${l}"]`);i&&i.click();let n=T,o=[...I];if(null==t?void 0:t.node_id){const e=o.findIndex((({id:e})=>e==t.node_id));-1!==e&&(o[e]._message=Object.assign(Object.assign({},o[e]._message),t),o=[...o.slice(0,e+1)])}if(N(!0),e){const t=o.findIndex((({id:t})=>t==(null==e?void 0:e.id)));if(-1===t)o=[...o,Object.assign({},e)];else{const i=Object.assign(Object.assign(Object.assign({},o[t]),e),{_message:Object.assign(Object.assign({},o[t]._message),null==e?void 0:e._message)});o=[...o.slice(0,t),Object.assign({},i),...o.slice(t+1)]}n=e.id}setTimeout((()=>{S(o),w(n),N(!1),we({nodes:o,activeId:n,params:C,accountIdFromLogs:E.current})}),250)}),[I,T]),j=e.useCallback((e=>i.__awaiter(void 0,void 0,void 0,(function*(){if(null==e?void 0:e.node_id){const t=Object.assign(Object.assign({},e),he(I,T,e.action_id)),n=yield J(t);if(N(!1),1===(null==n?void 0:n._status)){const e=null==n?void 0:n._data,{node:o}=e,a=i.__rest(e,["node"]),l=Object.assign(Object.assign({},o),{_message:Object.assign(Object.assign({},a),{node_id:o.id})});return void(-1!==I.findIndex((e=>e.id===l.id))?U(l):U(l,t))}_({title:h({id:"notification.comment.somethingWrong"}),message:"",type:"danger"})}const t=I.find((e=>e.id==T));t&&t.hasOwnProperty("first_node")&&(w(I[1].id.toString()),we({nodes:I,activeId:I[1].id.toString(),params:A(),accountIdFromLogs:E.current}))}))),[U,I]),D=e.useCallback((()=>{const e=I.findIndex((({id:e})=>e==T));if(e&&-1!==e&&e>1){const t=I[e-1];w(t.id),we({nodes:I,activeId:t.id,params:C,accountIdFromLogs:E.current})}}),[I,T]),q=e.useCallback((()=>{const e=A();R(e,!1);const t=I[0],i=I[1];we({nodes:[t,i],activeId:String(t.id),params:e,accountIdFromLogs:E.current})}),[A,R,I]),F=e.useCallback((e=>{S((t=>e&&(null==e?void 0:e.node_id)&&(null==e?void 0:e.node_id)==T?t.map((t=>{const i=t;return i.id===T?Object.assign(Object.assign({},t),{_message:i._message?Object.assign(Object.assign({},i._message),e):e}):t})):t))}),[T]);e.useEffect((()=>{if(L.default.get(n.GA_TOKEN_COOKIE)){const e=A();R(e)}else re({condition:()=>Boolean(L.default.get(n.GA_TOKEN_COOKIE)),finished:()=>{const e=A();R(e)}})}),[]),e.useEffect((()=>{if(!I.length)return;I.find((e=>e.id==T))&&T||w(l+"")}),[T,I]);const $=e.useMemo((()=>({activeId:T,params:C,listNodes:I,loading:x,setLoading:N,getParams:A,onNext:j,onPrev:D,onSubmit:U,onStartOver:q,onChange:F,isShowFooter:O,setIsShowFooter:k,isFullContainer:r,bgImgFullContainer:f,isDisabledAnimationOnMobile:v,onCloseMobile:g,userInfo:b})),[T,j,D,U,F,q,O,C,I,x,N,A,r,v,g,b,f]);return I.length?B.default.createElement(Se.Provider,{value:$},B.default.createElement("div",{ref:y},o)):null},ke=e=>B.default.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),B.default.createElement("path",{d:"M5.991 4.99a1 1 0 0 0-.697 1.717L10.587 12l-5.293 5.293a1 1 0 1 0 1.414 1.415L12 13.415l5.293 5.293a1 1 0 1 0 1.414-1.415L13.415 12l5.293-5.293a1 1 0 1 0-1.414-1.414L12 10.586 6.708 5.293a1 1 0 0 0-.717-.302",fill:"#595959"})),Ce="480px",Me=G.default.div`
2
2
  position: relative;
3
3
 
4
4
  .si-inline-revamp-container {
@@ -639,7 +639,7 @@
639
639
  padding-left: 32px;
640
640
  margin-top: 4px;
641
641
  }
642
- `,_t=[t.LOCALE.Thailand,t.LOCALE.Vietnam,t.LOCALE.Indonesia,t.LOCALE.Malaysia],yt=({text:t})=>{const[i,n]=e.useState(!1),{formatMessage:o}=e.useContext(s.TogetherComponentGlobalContext),a=null===s.GlobalData||void 0===s.GlobalData?void 0:s.GlobalData.locale;return t&&_t.includes(a)?B.default.createElement(ht,null,B.default.createElement("div",{className:"si-disclaimer",onClick:()=>n(!i)},B.default.createElement(Ue,{className:"si-disclaimer-info-svg"}),B.default.createElement("span",{className:"si-disclaimer-desc"},o({id:"tools.disclaimer",defaultMessage:"Miễn trừ trách nhiệm"})),B.default.createElement(Re,{className:"si-disclaimer-down"})),B.default.createElement(v.motion.div,{className:"si-disclaimer-expanded",animate:i?{height:"auto"}:{height:0},transition:{duration:.3}},t)):null};yt.displayName="SubotInlineDisclaimer";const Et=({intent:t})=>{var i;const{formatMessage:n}=e.useContext(s.TogetherComponentGlobalContext),o=e.useMemo((()=>{try{return JSON.parse(t.label||"")||[]}catch(e){return[]}}),[null==t?void 0:t.label]),a=null===(i=o[0])||void 0===i?void 0:i.disclaimer;return t.label&&o.length?B.default.createElement(bt,null,B.default.createElement(I.Text,{size:"lg",weight:"semiBold",className:"si-title",color:"#262626"},n({id:"tools.suggestedServices",defaultMessage:"Suggested services"})+":"),B.default.createElement("div",{className:"si-list-services"},o.map(((e,t)=>B.default.createElement("div",{onClick:()=>(e=>{e.url&&e.url&&ge(e.url)})(e),key:t,className:"image-wrapper",role:"presentation"},B.default.createElement("img",{loading:"lazy",src:e.feature,alt:e.feature,key:t}))))),a&&B.default.createElement(yt,{text:a})):null};Et.displayName="SubotInlineIntentBotSuggestedService";const xt=G.default.div`
642
+ `,_t=[t.LOCALE.Thailand,t.LOCALE.Vietnam,t.LOCALE.Indonesia,t.LOCALE.Malaysia],yt=({text:t})=>{const[i,n]=e.useState(!1),{formatMessage:o}=e.useContext(s.TogetherComponentGlobalContext),a=null===s.GlobalData||void 0===s.GlobalData?void 0:s.GlobalData.locale;return t&&_t.includes(a)?B.default.createElement(ht,null,B.default.createElement("div",{className:"si-disclaimer",onClick:()=>n(!i)},B.default.createElement(Ue,{className:"si-disclaimer-info-svg"}),B.default.createElement("span",{className:"si-disclaimer-desc"},o({id:"tools.disclaimer",defaultMessage:"Miễn trừ trách nhiệm"})),B.default.createElement(Re,{className:"si-disclaimer-down"})),B.default.createElement(v.motion.div,{className:"si-disclaimer-expanded",animate:i?{height:"auto"}:{height:0},transition:{duration:.3}},t)):null};yt.displayName="SubotInlineDisclaimer";const Et=({intent:t})=>{var i;const{formatMessage:n}=e.useContext(s.TogetherComponentGlobalContext),o=e.useMemo((()=>{try{return JSON.parse(t.label||"")||[]}catch(e){return[]}}),[null==t?void 0:t.label]),a=null===(i=o[0])||void 0===i?void 0:i.disclaimer;return t.label&&o.length?B.default.createElement(bt,null,B.default.createElement(I.Text,{size:"lg",weight:"semiBold",className:"si-title",color:"var(--subot-inline-text-color, #262626)"},n({id:"tools.suggestedServices",defaultMessage:"Suggested services"})+":"),B.default.createElement("div",{className:"si-list-services"},o.map(((e,t)=>B.default.createElement("div",{onClick:()=>(e=>{e.url&&e.url&&ge(e.url)})(e),key:t,className:"image-wrapper",role:"presentation"},B.default.createElement("img",{loading:"lazy",src:e.feature,alt:e.feature,key:t}))))),a&&B.default.createElement(yt,{text:a})):null};Et.displayName="SubotInlineIntentBotSuggestedService";const xt=G.default.div`
643
643
  font-size: 16px;
644
644
  line-height: 24px;
645
645
  color: var(--subot-inline-text-color, #595959);
@@ -747,8 +747,8 @@
747
747
  }
748
748
 
749
749
  .see-more-intent {
750
- color: #6cbef0;
751
- /* color: var(--subot-inline-primary-color, #6cbef0); */
750
+ /* color: #6cbef0; */
751
+ color: var(--subot-inline-text-color, #6cbef0);
752
752
  font-size: 16px;
753
753
  line-height: 24px;
754
754
  font-weight: 600;
package/build/together.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./types-637880d1.js"),r=require("./index-c8909641.js"),t=require("./utils-fd656785.js");require("react"),require("./Plus-604516f4.js"),require("./tslib.es6-77ffe29f.js"),require("@mantine/core"),require("./theme-642223e9.js"),require("./translationsContext-7536ee11.js"),require("string-format"),require("./index-8728ee32.js"),require("styled-components"),require("./useTranslations-ea594f2b.js"),require("innertext"),require("./index-3d997052.js"),require("./WhatsApp-f1d6b14e.js"),require("./index-44cde1cb.js"),require("@mantine/hooks"),require("./index-936719bb.js"),require("./index-78f49c14.js"),require("date-fns/locale"),require("./Subot-143686ec.js"),require("./isProduction-c131ac6d.js"),require("dayjs"),require("./utils-460cc1b1.js"),require("@mantine/carousel"),require("classnames"),require("@mantine/dates"),require("./index-307d7dff.js"),require("./index.styles-75680e35.js"),require("./constants-bb162521.js"),require("./animation-20581243.js"),require("react-keyed-flatten-children"),require("./paths-96308e55.js"),require("./index-60ee6b9b.js"),require("lodash/debounce"),require("react-contenteditable"),require("./index-a85994ad.js"),require("./cookieHelper-373906e4.js"),require("react-dom"),require("./number-adca7871.js"),require("date-fns"),require("dayjs/plugin/relativeTime"),require("./index-02d3d16c.js"),require("./routing-c4813a3e.js"),require("./utils-daaf711a.js"),require("./index.styled-a5d71af4.js"),require("./index-b3d93572.js"),require("slugify"),exports.CardAuthor=e.CardAuthor,exports.CardLink=e.CardLink,exports.CardPost=e.CardPost,exports.CardPostPopoverMore=e.CardPostPopoverMore,exports.CardReactions=e.CardReactions,exports.CardReply=e.CardReply,exports.CardReplyPopover=e.CardReplyPopover,exports.CreateNewPostContent=e.CreateNewPostContent,exports.CreatePostDescription=e.CreatePostDescription,exports.CreatePostTitle=e.CreatePostTitle,exports.ImagePreviewPopup=e.ImagePreviewPopup,exports.InputCommentBar=e.InputCommentBar,exports.LabelPin=e.LabelPin,exports.LabelSortPin=e.LabelSortPin,exports.LabelSorting=e.LabelSorting,exports.PopoverMenu=e.PopoverMenu,exports.PopupDanger=e.PopupDanger,exports.PopupDoctor=e.PopupDoctor,exports.PopupExpert=e.PopupExpert,exports.PopupFrame=e.PopupFrame,exports.PopupHospital=e.PopupHospital,exports.PostContent=e.PostContent,exports.PostImagePreview=e.PostImagePreview,exports.PostSingleImageViewPopup=e.PostSingleImageViewPopup,exports.ProfileDetail=e.ProfileDetail,exports.ProfileDetailModal=e.ProfileDetailModal,exports.ShareBox=e.ShareBox,exports.SharePopup=e.SharePopup,exports.SkipQuestionOfExpertBtn=e.SkipQuestionOfExpertBtn,exports.SocialLinkPreview=e.SocialLinkPreview,exports.SourceList=e.SourceList,exports.SubmitReportForm=e.SubmitReportForm,Object.defineProperty(exports,"TabNameInProfileDetail",{enumerable:!0,get:function(){return e.TabName}}),exports.TagTopic=e.TagTopic,exports.TogetherAuthConfigContext=e.TogetherAuthConfigContext,exports.TogetherAuthConfigContextProvider=e.TogetherAuthConfigContextProvider,exports.TogetherTypes=e.types,exports.TopicSelectList=e.TopicSelectList,exports.VerifiedTag=e.VerifiedTag,exports.useTogetherAuthRequiredAction=e.useTogetherAuthRequiredAction,exports.TogetherDataTransforms=r.dataTransform,exports.UserAvatar=r.UserAvatar,exports.DefaultComponentGlobalContextData=t.DefaultComponentGlobalContextData,Object.defineProperty(exports,"GlobalData",{enumerable:!0,get:function(){return t.GlobalData}}),exports.TogetherComponentGlobalContext=t.TogetherComponentGlobalContext,exports.TogetherComponentGlobalContextProvider=t.TogetherComponentGlobalContextProvider,exports.TogetherConstants=t.constants;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./types-e554c5c4.js"),r=require("./index-792d8012.js"),t=require("./utils-3423e2dc.js");require("react"),require("./Plus-ae3f1f1c.js"),require("./tslib.es6-f581f504.js"),require("@mantine/core"),require("./theme-1e27b9db.js"),require("./translationsContext-c8376758.js"),require("string-format"),require("./index-3382263b.js"),require("styled-components"),require("./useTranslations-048502c3.js"),require("innertext"),require("./index-bf4de588.js"),require("./WhatsApp-9c647c87.js"),require("./index-1abb8f88.js"),require("@mantine/hooks"),require("./index-a607ab1d.js"),require("./index-4c97e71b.js"),require("date-fns/locale"),require("./Subot-e6872850.js"),require("./isProduction-fce4c411.js"),require("dayjs"),require("./utils-97861e62.js"),require("@mantine/carousel"),require("classnames"),require("@mantine/dates"),require("./index-79e6fda5.js"),require("./index.styles-db50e54a.js"),require("./constants-d09c9d40.js"),require("./animation-f9bf49c2.js"),require("react-keyed-flatten-children"),require("./paths-c422db6f.js"),require("./index-9c3a324e.js"),require("lodash/debounce"),require("react-contenteditable"),require("./index-3e70ce5b.js"),require("./cookieHelper-ef7d953a.js"),require("react-dom"),require("./number-ddaf812a.js"),require("date-fns"),require("dayjs/plugin/relativeTime"),require("./index-dc6d1d9a.js"),require("./routing-1640409f.js"),require("./utils-18176c91.js"),require("./index.styled-54e422d1.js"),require("./index-aa048810.js"),require("slugify"),exports.CardAuthor=e.CardAuthor,exports.CardLink=e.CardLink,exports.CardPost=e.CardPost,exports.CardPostPopoverMore=e.CardPostPopoverMore,exports.CardReactions=e.CardReactions,exports.CardReply=e.CardReply,exports.CardReplyPopover=e.CardReplyPopover,exports.CreateNewPostContent=e.CreateNewPostContent,exports.CreatePostDescription=e.CreatePostDescription,exports.CreatePostTitle=e.CreatePostTitle,exports.ImagePreviewPopup=e.ImagePreviewPopup,exports.InputCommentBar=e.InputCommentBar,exports.LabelPin=e.LabelPin,exports.LabelSortPin=e.LabelSortPin,exports.LabelSorting=e.LabelSorting,exports.PopoverMenu=e.PopoverMenu,exports.PopupDanger=e.PopupDanger,exports.PopupDoctor=e.PopupDoctor,exports.PopupExpert=e.PopupExpert,exports.PopupFrame=e.PopupFrame,exports.PopupHospital=e.PopupHospital,exports.PostContent=e.PostContent,exports.PostImagePreview=e.PostImagePreview,exports.PostSingleImageViewPopup=e.PostSingleImageViewPopup,exports.ProfileDetail=e.ProfileDetail,exports.ProfileDetailModal=e.ProfileDetailModal,exports.ShareBox=e.ShareBox,exports.SharePopup=e.SharePopup,exports.SkipQuestionOfExpertBtn=e.SkipQuestionOfExpertBtn,exports.SocialLinkPreview=e.SocialLinkPreview,exports.SourceList=e.SourceList,exports.SubmitReportForm=e.SubmitReportForm,Object.defineProperty(exports,"TabNameInProfileDetail",{enumerable:!0,get:function(){return e.TabName}}),exports.TagTopic=e.TagTopic,exports.TogetherAuthConfigContext=e.TogetherAuthConfigContext,exports.TogetherAuthConfigContextProvider=e.TogetherAuthConfigContextProvider,exports.TogetherTypes=e.types,exports.TopicSelectList=e.TopicSelectList,exports.VerifiedTag=e.VerifiedTag,exports.useTogetherAuthRequiredAction=e.useTogetherAuthRequiredAction,exports.TogetherDataTransforms=r.dataTransform,exports.UserAvatar=r.UserAvatar,exports.DefaultComponentGlobalContextData=t.DefaultComponentGlobalContextData,Object.defineProperty(exports,"GlobalData",{enumerable:!0,get:function(){return t.GlobalData}}),exports.TogetherComponentGlobalContext=t.TogetherComponentGlobalContext,exports.TogetherComponentGlobalContextProvider=t.TogetherComponentGlobalContextProvider,exports.TogetherConstants=t.constants;
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("./tslib.es6-77ffe29f.js"),t=require("react"),a=require("./useTranslations-ea594f2b.js"),i=require("lodash/debounce"),o=require("./constants-bb162521.js"),l=require("./index-60ee6b9b.js"),n=require("styled-components"),s=require("./Plus-604516f4.js"),r=require("./theme-642223e9.js"),c=require("lodash/shuffle"),d=require("./useOutsideClick-2d095eba.js"),u=require("./utils-460cc1b1.js"),p=require("react-loading-skeleton"),h=require("./paths-96308e55.js"),g=require("@mantine/core"),f=require("./index-78f49c14.js"),m=require("./cookieHelper-373906e4.js"),C=require("./index-a9d22e63.js"),b=require("./index-3d997052.js"),y=require("./ChevronDown-5f8f0c72.js"),v=require("string-format");function x(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var E=x(t),S=x(i),L=x(n),w=x(c),O=x(p),k=x(v);function I(){const[e,a]=t.useState((()=>{if("undefined"==typeof window)return"unset";if(m.getCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE))return"granted";const e=!location.protocol.includes("https")&&"localhost"!==location.hostname;return!navigator.geolocation||e?"denied":"unset"})),[i,o]=t.useState((()=>{if("undefined"==typeof window)return null;const e=m.getCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE);if(e)try{return JSON.parse(e)}catch(e){console.log(e)}return null})),l=t.useCallback((function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition((e=>{const t={lat:""+Math.round(1e7*e.coords.latitude)/1e7,lng:""+Math.round(1e7*e.coords.longitude)/1e7};m.setCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE,JSON.stringify(t),{minutes:15}),o(t),a("granted")}),(()=>{m.deleteCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE),a("denied")}))}),[]);return t.useMemo((()=>({geoLocationPermission:e,geoLocationCoordinates:i,requestGeoLocation:l})),[e,i])}const T=L.default.div``,j=L.default.div`
1
+ "use strict";var e=require("./tslib.es6-f581f504.js"),t=require("react"),a=require("./useTranslations-048502c3.js"),i=require("lodash/debounce"),o=require("./constants-d09c9d40.js"),l=require("./index-9c3a324e.js"),n=require("styled-components"),s=require("./Plus-ae3f1f1c.js"),r=require("./theme-1e27b9db.js"),c=require("lodash/shuffle"),d=require("./useOutsideClick-2c2b4a08.js"),u=require("./utils-97861e62.js"),p=require("react-loading-skeleton"),h=require("./paths-c422db6f.js"),g=require("@mantine/core"),f=require("./index-4c97e71b.js"),m=require("./cookieHelper-ef7d953a.js"),C=require("./index-b7501b94.js"),b=require("./index-bf4de588.js"),y=require("./ChevronDown-5665d3a9.js"),v=require("string-format");function x(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var E=x(t),S=x(i),L=x(n),w=x(c),O=x(p),k=x(v);function I(){const[e,a]=t.useState((()=>{if("undefined"==typeof window)return"unset";if(m.getCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE))return"granted";const e=!location.protocol.includes("https")&&"localhost"!==location.hostname;return!navigator.geolocation||e?"denied":"unset"})),[i,o]=t.useState((()=>{if("undefined"==typeof window)return null;const e=m.getCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE);if(e)try{return JSON.parse(e)}catch(e){console.log(e)}return null})),l=t.useCallback((function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition((e=>{const t={lat:""+Math.round(1e7*e.coords.latitude)/1e7,lng:""+Math.round(1e7*e.coords.longitude)/1e7};m.setCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE,JSON.stringify(t),{minutes:15}),o(t),a("granted")}),(()=>{m.deleteCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE),a("denied")}))}),[]);return t.useMemo((()=>({geoLocationPermission:e,geoLocationCoordinates:i,requestGeoLocation:l})),[e,i])}const T=L.default.div``,j=L.default.div`
2
2
  --searchbar-z-index: 305;
3
3
  &[data-is-modal='true'] {
4
4
  position: fixed;
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("react"),t=require("./Plus-604516f4.js");require("./translationsContext-7536ee11.js"),require("string-format");var a=require("./utils-fd656785.js"),l=require("./tslib.es6-77ffe29f.js"),o=require("@mantine/core"),n=require("./index-8728ee32.js"),i=require("./useTranslations-ea594f2b.js"),r=require("innertext"),s=require("./theme-642223e9.js"),d=require("./index-3d997052.js"),c=require("./WhatsApp-f1d6b14e.js"),u=require("./index-44cde1cb.js");require("@mantine/dates");var m=require("./index-78f49c14.js"),p=require("./Subot-143686ec.js"),g=require("./index-936719bb.js");require("@mantine/hooks");var h=require("./utils-460cc1b1.js"),f=require("./index-307d7dff.js"),v=require("./index-c8909641.js"),b=require("./index-60ee6b9b.js"),x=require("lodash/debounce"),y=require("react-contenteditable"),w=require("./index-a85994ad.js"),C=require("./index.styles-75680e35.js"),E=require("./cookieHelper-373906e4.js"),k=require("react-dom"),A=require("styled-components"),N=require("./number-adca7871.js"),T=require("date-fns"),S=require("dayjs"),P=require("dayjs/plugin/relativeTime"),I=require("./index-02d3d16c.js"),M=require("./routing-c4813a3e.js");function z(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function L(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,l.get?l:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}require("./constants-bb162521.js"),require("./utils-daaf711a.js"),require("./index.styled-a5d71af4.js"),require("./index-b3d93572.js");var B=L(e),R=z(e),j=z(r),O=z(x),F=z(y),D=L(k),V=z(A),U=z(S),_=z(P);const H=e=>B.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},e),B.createElement("path",{d:"M3.99403 3.32695C3.86141 3.32698 3.73181 3.36657 3.62181 3.44065C3.5118 3.51472 3.42638 3.61992 3.37648 3.7428C3.32658 3.86567 3.31445 4.00064 3.34165 4.13044C3.36885 4.26024 3.43415 4.37898 3.52919 4.47148L7.05784 8.00013L3.52919 11.5288C3.46521 11.5902 3.41413 11.6638 3.37894 11.7452C3.34375 11.8266 3.32516 11.9142 3.32425 12.0029C3.32335 12.0916 3.34015 12.1796 3.37368 12.2617C3.40721 12.3438 3.45678 12.4185 3.5195 12.4812C3.58222 12.5439 3.65682 12.5935 3.73894 12.627C3.82106 12.6605 3.90904 12.6773 3.99774 12.6764C4.08643 12.6755 4.17405 12.6569 4.25547 12.6217C4.33689 12.5865 4.41047 12.5355 4.4719 12.4715L8.00054 8.94283L11.5292 12.4715C11.5906 12.5355 11.6642 12.5865 11.7456 12.6217C11.827 12.6569 11.9147 12.6755 12.0034 12.6764C12.092 12.6773 12.18 12.6605 12.2621 12.627C12.3443 12.5935 12.4189 12.5439 12.4816 12.4812C12.5443 12.4185 12.5939 12.3439 12.6274 12.2617C12.6609 12.1796 12.6777 12.0916 12.6768 12.0029C12.6759 11.9142 12.6573 11.8266 12.6222 11.7452C12.587 11.6638 12.5359 11.5902 12.4719 11.5288L8.94325 8.00013L12.4719 4.47148C12.5682 4.37784 12.634 4.25728 12.6607 4.1256C12.6873 3.99392 12.6735 3.85726 12.6212 3.73354C12.5688 3.60982 12.4803 3.5048 12.3672 3.43224C12.2542 3.35969 12.1218 3.32299 11.9875 3.32695C11.8143 3.33211 11.6499 3.4045 11.5292 3.52877L8.00054 7.05742L4.4719 3.52877C4.40977 3.46491 4.33548 3.41415 4.2534 3.37948C4.17132 3.34482 4.08313 3.32696 3.99403 3.32695Z"})),W=e.createContext({}),q=({children:e,defaultParams:t})=>R.default.createElement(W.Provider,{value:{defaultParams:t}},e),G=t=>{const{data:{userInfo:l,env:{togetherBasePath:o}}}=e.useContext(a.TogetherComponentGlobalContext),{defaultParams:n}=e.useContext(W)||{},i=null==l?void 0:l.id,r=l&&"number"==typeof l.communities_interacted&&0===l.communities_interacted;return{authActionWrapper:(e,l)=>{const s=Object.assign(Object.assign(Object.assign({},n),t),l);if(!i||r){i||E.deleteCookie(a.BEARER_TOKEN_COOKIE),(null==s?void 0:s._joinCommunityIds)&&(localStorage.setItem("to_join_community_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_community_ids")||"[]")||[]).concat(s._joinCommunityIds).filter(Boolean))))),null==s||delete s._joinCommunityIds),(null==s?void 0:s._joinTopicIds)&&(localStorage.setItem("to_join_topic_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_topic_ids")||"[]")||[]).concat(s._joinTopicIds).filter(Boolean))))),null==s||delete s._joinTopicIds);const e=(null==s?void 0:s._location)||window.location.href;return null==s||delete s._location,window.location.href=a.getUrlToSignUp(e,s,o),null}return e&&e()},params:Object.assign(Object.assign({},n),t)}},Z=V.default.div`
1
+ "use strict";var e=require("react"),t=require("./Plus-ae3f1f1c.js");require("./translationsContext-c8376758.js"),require("string-format");var a=require("./utils-3423e2dc.js"),l=require("./tslib.es6-f581f504.js"),o=require("@mantine/core"),n=require("./index-3382263b.js"),i=require("./useTranslations-048502c3.js"),r=require("innertext"),s=require("./theme-1e27b9db.js"),d=require("./index-bf4de588.js"),c=require("./WhatsApp-9c647c87.js"),u=require("./index-1abb8f88.js");require("@mantine/dates");var m=require("./index-4c97e71b.js"),p=require("./Subot-e6872850.js"),g=require("./index-a607ab1d.js");require("@mantine/hooks");var h=require("./utils-97861e62.js"),f=require("./index-79e6fda5.js"),v=require("./index-792d8012.js"),b=require("./index-9c3a324e.js"),x=require("lodash/debounce"),y=require("react-contenteditable"),w=require("./index-3e70ce5b.js"),C=require("./index.styles-db50e54a.js"),E=require("./cookieHelper-ef7d953a.js"),k=require("react-dom"),A=require("styled-components"),N=require("./number-ddaf812a.js"),T=require("date-fns"),S=require("dayjs"),P=require("dayjs/plugin/relativeTime"),I=require("./index-dc6d1d9a.js"),M=require("./routing-1640409f.js");function z(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function L(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,l.get?l:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}require("./constants-d09c9d40.js"),require("./utils-18176c91.js"),require("./index.styled-54e422d1.js"),require("./index-aa048810.js");var B=L(e),R=z(e),j=z(r),O=z(x),F=z(y),D=L(k),V=z(A),U=z(S),_=z(P);const H=e=>B.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},e),B.createElement("path",{d:"M3.99403 3.32695C3.86141 3.32698 3.73181 3.36657 3.62181 3.44065C3.5118 3.51472 3.42638 3.61992 3.37648 3.7428C3.32658 3.86567 3.31445 4.00064 3.34165 4.13044C3.36885 4.26024 3.43415 4.37898 3.52919 4.47148L7.05784 8.00013L3.52919 11.5288C3.46521 11.5902 3.41413 11.6638 3.37894 11.7452C3.34375 11.8266 3.32516 11.9142 3.32425 12.0029C3.32335 12.0916 3.34015 12.1796 3.37368 12.2617C3.40721 12.3438 3.45678 12.4185 3.5195 12.4812C3.58222 12.5439 3.65682 12.5935 3.73894 12.627C3.82106 12.6605 3.90904 12.6773 3.99774 12.6764C4.08643 12.6755 4.17405 12.6569 4.25547 12.6217C4.33689 12.5865 4.41047 12.5355 4.4719 12.4715L8.00054 8.94283L11.5292 12.4715C11.5906 12.5355 11.6642 12.5865 11.7456 12.6217C11.827 12.6569 11.9147 12.6755 12.0034 12.6764C12.092 12.6773 12.18 12.6605 12.2621 12.627C12.3443 12.5935 12.4189 12.5439 12.4816 12.4812C12.5443 12.4185 12.5939 12.3439 12.6274 12.2617C12.6609 12.1796 12.6777 12.0916 12.6768 12.0029C12.6759 11.9142 12.6573 11.8266 12.6222 11.7452C12.587 11.6638 12.5359 11.5902 12.4719 11.5288L8.94325 8.00013L12.4719 4.47148C12.5682 4.37784 12.634 4.25728 12.6607 4.1256C12.6873 3.99392 12.6735 3.85726 12.6212 3.73354C12.5688 3.60982 12.4803 3.5048 12.3672 3.43224C12.2542 3.35969 12.1218 3.32299 11.9875 3.32695C11.8143 3.33211 11.6499 3.4045 11.5292 3.52877L8.00054 7.05742L4.4719 3.52877C4.40977 3.46491 4.33548 3.41415 4.2534 3.37948C4.17132 3.34482 4.08313 3.32696 3.99403 3.32695Z"})),W=e.createContext({}),q=({children:e,defaultParams:t})=>R.default.createElement(W.Provider,{value:{defaultParams:t}},e),G=t=>{const{data:{userInfo:l,env:{togetherBasePath:o}}}=e.useContext(a.TogetherComponentGlobalContext),{defaultParams:n}=e.useContext(W)||{},i=null==l?void 0:l.id,r=l&&"number"==typeof l.communities_interacted&&0===l.communities_interacted;return{authActionWrapper:(e,l)=>{const s=Object.assign(Object.assign(Object.assign({},n),t),l);if(!i||r){i||E.deleteCookie(a.BEARER_TOKEN_COOKIE),(null==s?void 0:s._joinCommunityIds)&&(localStorage.setItem("to_join_community_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_community_ids")||"[]")||[]).concat(s._joinCommunityIds).filter(Boolean))))),null==s||delete s._joinCommunityIds),(null==s?void 0:s._joinTopicIds)&&(localStorage.setItem("to_join_topic_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_topic_ids")||"[]")||[]).concat(s._joinTopicIds).filter(Boolean))))),null==s||delete s._joinTopicIds);const e=(null==s?void 0:s._location)||window.location.href;return null==s||delete s._location,window.location.href=a.getUrlToSignUp(e,s,o),null}return e&&e()},params:Object.assign(Object.assign({},n),t)}},Z=V.default.div`
2
2
  .link-info-container {
3
3
  padding: 0.5rem 1rem;
4
4
  background: ${e=>e.color||"#f4faff"};
package/build/types.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Subot-143686ec.js");Object.defineProperty(exports,"BabyGrowthChartDuration",{enumerable:!0,get:function(){return e.BabyGrowthChartDuration}}),Object.defineProperty(exports,"BabyGrowthChartType",{enumerable:!0,get:function(){return e.BabyGrowthChartType}}),Object.defineProperty(exports,"BabyGrowthResultTab",{enumerable:!0,get:function(){return e.BabyGrowthResultTab}}),exports.ELEMENT_CONTROL_INPUT_TYPE=e.ELEMENT_CONTROL_INPUT_TYPE,exports.FULL_KEY_ADDRESS=e.FULL_KEY_ADDRESS,Object.defineProperty(exports,"Gender",{enumerable:!0,get:function(){return e.Gender}}),Object.defineProperty(exports,"LOCALE",{enumerable:!0,get:function(){return e.LOCALE}}),Object.defineProperty(exports,"NodeActionType",{enumerable:!0,get:function(){return e.NodeActionType}}),exports.NodeFinalTypes=e.NodeFinalTypes,Object.defineProperty(exports,"NodeIntentType",{enumerable:!0,get:function(){return e.NodeIntentType}}),Object.defineProperty(exports,"NodeMultipleOptions",{enumerable:!0,get:function(){return e.NodeMultipleOptions}}),Object.defineProperty(exports,"NodePosition",{enumerable:!0,get:function(){return e.NodePosition}}),Object.defineProperty(exports,"NodeType",{enumerable:!0,get:function(){return e.NodeType}}),Object.defineProperty(exports,"OnboardingStep",{enumerable:!0,get:function(){return e.OnboardingStep}}),exports.SubotType=e.SubotType;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Subot-e6872850.js");Object.defineProperty(exports,"BabyGrowthChartDuration",{enumerable:!0,get:function(){return e.BabyGrowthChartDuration}}),Object.defineProperty(exports,"BabyGrowthChartType",{enumerable:!0,get:function(){return e.BabyGrowthChartType}}),Object.defineProperty(exports,"BabyGrowthResultTab",{enumerable:!0,get:function(){return e.BabyGrowthResultTab}}),exports.ELEMENT_CONTROL_INPUT_TYPE=e.ELEMENT_CONTROL_INPUT_TYPE,exports.FULL_KEY_ADDRESS=e.FULL_KEY_ADDRESS,Object.defineProperty(exports,"Gender",{enumerable:!0,get:function(){return e.Gender}}),Object.defineProperty(exports,"LOCALE",{enumerable:!0,get:function(){return e.LOCALE}}),Object.defineProperty(exports,"NodeActionType",{enumerable:!0,get:function(){return e.NodeActionType}}),exports.NodeFinalTypes=e.NodeFinalTypes,Object.defineProperty(exports,"NodeIntentType",{enumerable:!0,get:function(){return e.NodeIntentType}}),Object.defineProperty(exports,"NodeMultipleOptions",{enumerable:!0,get:function(){return e.NodeMultipleOptions}}),Object.defineProperty(exports,"NodePosition",{enumerable:!0,get:function(){return e.NodePosition}}),Object.defineProperty(exports,"NodeType",{enumerable:!0,get:function(){return e.NodeType}}),Object.defineProperty(exports,"OnboardingStep",{enumerable:!0,get:function(){return e.OnboardingStep}}),exports.SubotType=e.SubotType;
@@ -1 +1 @@
1
- "use strict";var e=require("./tslib.es6-77ffe29f.js"),a=require("react"),n=require("./cookieHelper-373906e4.js"),t=require("./useTranslations-ea594f2b.js"),i=require("./Subot-143686ec.js");function s(e){const a=(new TextEncoder).encode(e.trim().toLowerCase());return crypto.subtle.digest("SHA-256",a).then((e=>Array.from(new Uint8Array(e)).map((e=>e.toString(16).padStart(2,"0"))).join("")))}const l={"vi-VN":"mang-thai","id-ID":"kehamilan","ms-MY":"kehamilan","km-KH":"ពពោះ","en-PH":"pregnancy","tl-PH":"pregnancy","th-TH":"การตั้งครรภ์","my-MM":"pregnancy","zh-TW":"pregnancy","hi-IN":"pregnancy"},r={[i.LOCALE.Vietnam]:{sexualWellness:"suc-khoe-tinh-duc",health:"suc-khoe",healthyEating:"an-uong-lanh-manh",skinHealth:"da-lieu",healthyHabit:"thoi-quen-lanh-manh",drug:"thuoc",womensHealth:"suc-khoe-phu-nu",fitness:"the-duc-the-thao",pregnancy:"mang-thai",parenting:"nuoi-day-con",diabetes:"tieu-duong-dai-thao-duong",healthyMind:"tam-ly-tam-than"},[i.LOCALE.Indonesia]:{pregnancy:"kehamilan",parenting:"parenting",health:"sehat",diabetes:"diabetes",womensHealth:"wanita",drug:"obat-suplemen",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Malaysia]:{pregnancy:"kehamilan",parenting:"keibubapaan",health:"kesihatan",diabetes:"kencing-manis",womensHealth:"kesihatan-wanita",drug:"ubat",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Cambodia]:{pregnancy:"%e1%9e%96%e1%9e%96%e1%9f%84%e1%9f%87",parenting:"%e1%9e%85%e1%9e%b7%e1%9e%89%e1%9f%92%e1%9e%85%e1%9e%b9%e1%9e%98%e1%9e%80%e1%9e%bc%e1%9e%93",health:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%91%e1%9e%bc%e1%9e%91%e1%9f%85",diabetes:"%e1%9e%87%e1%9f%86%e1%9e%84%e1%9e%ba%e1%9e%91%e1%9e%b9%e1%9e%80%e1%9e%93%e1%9f%84%e1%9e%98%e1%9e%95%e1%9f%92%e1%9e%a2%e1%9f%82%e1%9e%98",womensHealth:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%9f%e1%9f%92%e1%9e%8f%e1%9f%92%e1%9e%9a%e1%9e%b8",drug:"%e1%9e%b1%e1%9e%9f%e1%9e%90%e1%9e%93%e1%9e%b7%e1%9e%84%e1%9e%a2%e1%9e%b6%e1%9e%a0%e1%9e%b6%e1%9e%9a%e1%9e%94%e1%9f%86%e1%9e%94%e1%9f%89%e1%9e%93",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.PhilippinesEnglish]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.PhilippinesTagalog]:{pregnancy:"pagbubuntis",parenting:"pagiging-magulang",health:"kalusugan",diabetes:"diabetes-fil",womensHealth:"kalusugan-kababaihan",drug:"drugs-at-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Thailand]:{pregnancy:"%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87%e0%b8%84%e0%b8%a3%e0%b8%a3%e0%b8%a0%e0%b9%8c",parenting:"%e0%b8%9e%e0%b9%88%e0%b8%ad%e0%b9%81%e0%b8%a1%e0%b9%88%e0%b9%80%e0%b8%a5%e0%b8%b5%e0%b9%89%e0%b8%a2%e0%b8%87%e0%b8%a5%e0%b8%b9%e0%b8%81",health:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e",diabetes:"%e0%b9%82%e0%b8%a3%e0%b8%84%e0%b9%80%e0%b8%9a%e0%b8%b2%e0%b8%ab%e0%b8%a7%e0%b8%b2%e0%b8%99",womensHealth:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e%e0%b8%ab%e0%b8%8d%e0%b8%b4%e0%b8%87",drug:"%e0%b8%a2%e0%b8%b2%e0%b9%81%e0%b8%a5%e0%b8%b0%e0%b8%ad%e0%b8%b2%e0%b8%ab%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%aa%e0%b8%a3%e0%b8%b4%e0%b8%a1",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Myanmar]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-az",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Taiwan]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplement",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.India]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",diabetesEn:"en-diabetes",drug:"dawaai",sexualWellness:"",healthyEating:"",skinHealth:""}};exports.MAPPED_CATEGORY_SLUGS=r,exports.PREGNANCY_SLUG=l,exports.useCategory=e=>{const{locale:n}=t.useTranslations();return{isPregnancy:a.useMemo((()=>decodeURI(e.replace(/\//gi,"")).includes(l[n])),[]),isParenting:a.useMemo((()=>{var a;return decodeURI(e.replace(/\//gi,"")).includes(null===(a=r[n])||void 0===a?void 0:a.parenting)}),[]),type:a.useMemo((()=>function(e,a){const n=e.split("/");for(const e in a){const t=a[e];if(n.includes(t))return e}return null}(e,r[n])),[e,n])}},exports.useFbDataLayer=t=>{const i=a.useRef("");a.useEffect((()=>(e.__awaiter(void 0,void 0,void 0,(function*(){var e,a,l,r,b;if(!i.current){let e=yield fetch("https://api.ipify.org").then((e=>e.text()));e||(e=yield fetch("https://icanhazip.com").then((e=>e.text()))),i.current=e}if(null===(a=null===(e=window.localStorage)||void 0===e?void 0:e.setItem)||void 0===a||a.call(e,"fbClientIp",JSON.stringify({client_ip_address:(null===(l=i.current)||void 0===l?void 0:l.replace("\n",""))||"",client_user_agent:navigator.userAgent||""})),null==t?void 0:t.id){const[e,a,i,l,h,u]=yield Promise.all([t.email?s(t.email):null,t.phone?s(t.phone):null,t.birthday?s(t.birthday.split("-").join("")):null,t.gender?"m":"f",t.city_name?s(t.city_name).then((e=>e.replace(/\s/g,""))):null,t.name?s(t.name):null]);n.getCookie("_fbc"),n.getCookie("_fbp");const o={user_id:t.id};u&&(o.fn=u),e&&(o.em=e),a&&(o.ph=a),i&&(o.db=i),h&&(o.ct=h),null===(b=null===(r=window.localStorage)||void 0===r?void 0:r.setItem)||void 0===b||b.call(r,"fbDataLayer_userInfo",JSON.stringify(o))}})),()=>{})),[t])},exports.usePrevious=e=>{const n=a.useRef(),i=a.useRef(e);return t.useInitialMount()||i.current===e||(n.current=i.current,i.current=e),n.current},exports.useRafState=e=>{const[n,t]=a.useState(e),i=a.useRef(0),s=a.useCallback((e=>{cancelAnimationFrame(i.current),i.current=requestAnimationFrame((()=>{t(e)}))}),[]);return a.useEffect((()=>()=>cancelAnimationFrame(i.current))),[n,s]};
1
+ "use strict";var e=require("./tslib.es6-f581f504.js"),a=require("react"),n=require("./cookieHelper-ef7d953a.js"),t=require("./useTranslations-048502c3.js"),i=require("./Subot-e6872850.js");function s(e){const a=(new TextEncoder).encode(e.trim().toLowerCase());return crypto.subtle.digest("SHA-256",a).then((e=>Array.from(new Uint8Array(e)).map((e=>e.toString(16).padStart(2,"0"))).join("")))}const l={"vi-VN":"mang-thai","id-ID":"kehamilan","ms-MY":"kehamilan","km-KH":"ពពោះ","en-PH":"pregnancy","tl-PH":"pregnancy","th-TH":"การตั้งครรภ์","my-MM":"pregnancy","zh-TW":"pregnancy","hi-IN":"pregnancy"},r={[i.LOCALE.Vietnam]:{sexualWellness:"suc-khoe-tinh-duc",health:"suc-khoe",healthyEating:"an-uong-lanh-manh",skinHealth:"da-lieu",healthyHabit:"thoi-quen-lanh-manh",drug:"thuoc",womensHealth:"suc-khoe-phu-nu",fitness:"the-duc-the-thao",pregnancy:"mang-thai",parenting:"nuoi-day-con",diabetes:"tieu-duong-dai-thao-duong",healthyMind:"tam-ly-tam-than"},[i.LOCALE.Indonesia]:{pregnancy:"kehamilan",parenting:"parenting",health:"sehat",diabetes:"diabetes",womensHealth:"wanita",drug:"obat-suplemen",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Malaysia]:{pregnancy:"kehamilan",parenting:"keibubapaan",health:"kesihatan",diabetes:"kencing-manis",womensHealth:"kesihatan-wanita",drug:"ubat",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Cambodia]:{pregnancy:"%e1%9e%96%e1%9e%96%e1%9f%84%e1%9f%87",parenting:"%e1%9e%85%e1%9e%b7%e1%9e%89%e1%9f%92%e1%9e%85%e1%9e%b9%e1%9e%98%e1%9e%80%e1%9e%bc%e1%9e%93",health:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%91%e1%9e%bc%e1%9e%91%e1%9f%85",diabetes:"%e1%9e%87%e1%9f%86%e1%9e%84%e1%9e%ba%e1%9e%91%e1%9e%b9%e1%9e%80%e1%9e%93%e1%9f%84%e1%9e%98%e1%9e%95%e1%9f%92%e1%9e%a2%e1%9f%82%e1%9e%98",womensHealth:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%9f%e1%9f%92%e1%9e%8f%e1%9f%92%e1%9e%9a%e1%9e%b8",drug:"%e1%9e%b1%e1%9e%9f%e1%9e%90%e1%9e%93%e1%9e%b7%e1%9e%84%e1%9e%a2%e1%9e%b6%e1%9e%a0%e1%9e%b6%e1%9e%9a%e1%9e%94%e1%9f%86%e1%9e%94%e1%9f%89%e1%9e%93",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.PhilippinesEnglish]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.PhilippinesTagalog]:{pregnancy:"pagbubuntis",parenting:"pagiging-magulang",health:"kalusugan",diabetes:"diabetes-fil",womensHealth:"kalusugan-kababaihan",drug:"drugs-at-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Thailand]:{pregnancy:"%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87%e0%b8%84%e0%b8%a3%e0%b8%a3%e0%b8%a0%e0%b9%8c",parenting:"%e0%b8%9e%e0%b9%88%e0%b8%ad%e0%b9%81%e0%b8%a1%e0%b9%88%e0%b9%80%e0%b8%a5%e0%b8%b5%e0%b9%89%e0%b8%a2%e0%b8%87%e0%b8%a5%e0%b8%b9%e0%b8%81",health:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e",diabetes:"%e0%b9%82%e0%b8%a3%e0%b8%84%e0%b9%80%e0%b8%9a%e0%b8%b2%e0%b8%ab%e0%b8%a7%e0%b8%b2%e0%b8%99",womensHealth:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e%e0%b8%ab%e0%b8%8d%e0%b8%b4%e0%b8%87",drug:"%e0%b8%a2%e0%b8%b2%e0%b9%81%e0%b8%a5%e0%b8%b0%e0%b8%ad%e0%b8%b2%e0%b8%ab%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%aa%e0%b8%a3%e0%b8%b4%e0%b8%a1",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Myanmar]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-az",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Taiwan]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplement",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.India]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",diabetesEn:"en-diabetes",drug:"dawaai",sexualWellness:"",healthyEating:"",skinHealth:""}};exports.MAPPED_CATEGORY_SLUGS=r,exports.PREGNANCY_SLUG=l,exports.useCategory=e=>{const{locale:n}=t.useTranslations();return{isPregnancy:a.useMemo((()=>decodeURI(e.replace(/\//gi,"")).includes(l[n])),[]),isParenting:a.useMemo((()=>{var a;return decodeURI(e.replace(/\//gi,"")).includes(null===(a=r[n])||void 0===a?void 0:a.parenting)}),[]),type:a.useMemo((()=>function(e,a){const n=e.split("/");for(const e in a){const t=a[e];if(n.includes(t))return e}return null}(e,r[n])),[e,n])}},exports.useFbDataLayer=t=>{const i=a.useRef("");a.useEffect((()=>(e.__awaiter(void 0,void 0,void 0,(function*(){var e,a,l,r,b;if(!i.current){let e=yield fetch("https://api.ipify.org").then((e=>e.text()));e||(e=yield fetch("https://icanhazip.com").then((e=>e.text()))),i.current=e}if(null===(a=null===(e=window.localStorage)||void 0===e?void 0:e.setItem)||void 0===a||a.call(e,"fbClientIp",JSON.stringify({client_ip_address:(null===(l=i.current)||void 0===l?void 0:l.replace("\n",""))||"",client_user_agent:navigator.userAgent||""})),null==t?void 0:t.id){const[e,a,i,l,h,u]=yield Promise.all([t.email?s(t.email):null,t.phone?s(t.phone):null,t.birthday?s(t.birthday.split("-").join("")):null,t.gender?"m":"f",t.city_name?s(t.city_name).then((e=>e.replace(/\s/g,""))):null,t.name?s(t.name):null]);n.getCookie("_fbc"),n.getCookie("_fbp");const o={user_id:t.id};u&&(o.fn=u),e&&(o.em=e),a&&(o.ph=a),i&&(o.db=i),h&&(o.ct=h),null===(b=null===(r=window.localStorage)||void 0===r?void 0:r.setItem)||void 0===b||b.call(r,"fbDataLayer_userInfo",JSON.stringify(o))}})),()=>{})),[t])},exports.usePrevious=e=>{const n=a.useRef(),i=a.useRef(e);return t.useInitialMount()||i.current===e||(n.current=i.current,i.current=e),n.current},exports.useRafState=e=>{const[n,t]=a.useState(e),i=a.useRef(0),s=a.useCallback((e=>{cancelAnimationFrame(i.current),i.current=requestAnimationFrame((()=>{t(e)}))}),[]);return a.useEffect((()=>()=>cancelAnimationFrame(i.current))),[n,s]};
@@ -1 +1 @@
1
- "use strict";var e=require("./tslib.es6-77ffe29f.js"),t=require("react"),a=require("./getDynamicHealthTool-bc55248a.js");exports.useHealthToolsCache=o=>{const[i,l]=t.useState([]);t.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){const e=yield a.getDynamicHealthToolWithCache(o);l(e)}))}),[a.getDynamicHealthToolWithCache,o]);const r=t.useCallback((e=>{var t;return(null===(t=i.find((t=>t.template===e)))||void 0===t?void 0:t.link)||""}),[i]);return{allTools:i,getHealthToolLink:r}};
1
+ "use strict";var e=require("./tslib.es6-f581f504.js"),t=require("react"),a=require("./getDynamicHealthTool-ae96b303.js");exports.useHealthToolsCache=o=>{const[i,l]=t.useState([]);t.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){const e=yield a.getDynamicHealthToolWithCache(o);l(e)}))}),[a.getDynamicHealthToolWithCache,o]);const r=t.useCallback((e=>{var t;return(null===(t=i.find((t=>t.template===e)))||void 0===t?void 0:t.link)||""}),[i]);return{allTools:i,getHealthToolLink:r}};
@@ -1 +1 @@
1
- "use strict";var e=require("./tslib.es6-77ffe29f.js"),t=require("react");const i="undefined"==typeof window,o={VN:"vi",ID:"id",TH:"th",MY:"ms",TW:"zh-TW",KH:"km",MM:"my",IN:"hi",PH:"en"};exports.GOOGLE_API_KEY="AIzaSyD9AbNa4AFwr8eNVs90G1YhQLhfWJ6KncU",exports.GOOGLE_API_LANGUAGE=o,exports.usePlacesAutocomplete=(n="",r="",s="",c=500)=>{const[a,d]=t.useState([]),[u,l]=t.useState(!1);return t.useEffect((()=>{let t;return n?t=window.setTimeout((()=>e.__awaiter(void 0,void 0,void 0,(function*(){var t;if(n)try{l(!0);const c=yield((t="",n="",r="vi")=>e.__awaiter(void 0,void 0,void 0,(function*(){return new Promise(((e,s)=>{if(!t)return s("Need valid text input");if(i)return s("Need valid window object");try{(new window.google.maps.places.AutocompleteService).getPlacePredictions(Object.assign(Object.assign({input:t},n?{componentRestrictions:{country:n}}:{}),{language:o[r]}),e)}catch(e){s(e)}}))})))(n,r,s);d(!(t=c)||t.length<1?[]:t.map((e=>({placeId:e.place_id,description:e.description}))))}catch(e){console.error(e)}finally{l(!1)}else d([])}))),c):a.length&&d([]),()=>{window.clearTimeout(t)}}),[n,c,r]),{isLoading:u,predictions:a}};
1
+ "use strict";var e=require("./tslib.es6-f581f504.js"),t=require("react");const i="undefined"==typeof window,o={VN:"vi",ID:"id",TH:"th",MY:"ms",TW:"zh-TW",KH:"km",MM:"my",IN:"hi",PH:"en"};exports.GOOGLE_API_KEY="AIzaSyD9AbNa4AFwr8eNVs90G1YhQLhfWJ6KncU",exports.GOOGLE_API_LANGUAGE=o,exports.usePlacesAutocomplete=(n="",r="",s="",c=500)=>{const[a,d]=t.useState([]),[u,l]=t.useState(!1);return t.useEffect((()=>{let t;return n?t=window.setTimeout((()=>e.__awaiter(void 0,void 0,void 0,(function*(){var t;if(n)try{l(!0);const c=yield((t="",n="",r="vi")=>e.__awaiter(void 0,void 0,void 0,(function*(){return new Promise(((e,s)=>{if(!t)return s("Need valid text input");if(i)return s("Need valid window object");try{(new window.google.maps.places.AutocompleteService).getPlacePredictions(Object.assign(Object.assign({input:t},n?{componentRestrictions:{country:n}}:{}),{language:o[r]}),e)}catch(e){s(e)}}))})))(n,r,s);d(!(t=c)||t.length<1?[]:t.map((e=>({placeId:e.place_id,description:e.description}))))}catch(e){console.error(e)}finally{l(!1)}else d([])}))),c):a.length&&d([]),()=>{window.clearTimeout(t)}}),[n,c,r]),{isLoading:u,predictions:a}};
@@ -1 +1 @@
1
- "use strict";var e=require("react"),t=require("./translationsContext-7536ee11.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(require("string-format"));const s=()=>{const t=e.useRef(!0);return!!t.current&&(t.current=!1,!0)};let o=0;exports.useInitialMount=s,exports.useTranslations=function(){const{values:n,locale:s}=e.useContext(t.TranslationsContext)||{locale:"en-PH"};return e.useMemo((()=>({t:(e,t)=>n?n[e]?t?r.default(n[e]||e,t):n[e]||e:(console.warn(`[useTranslations] Missing translation for key ${e} and locale ${s}`),t?r.default(e,t):e):(console.error("[useTranslations] t method called before translation values are loaded"),e),locale:s})),[n,s])},exports.useUniqueId=()=>{const t=e.useRef("");return s()&&(o+=1,t.current=`hhg-gen-id${o}`),t.current};
1
+ "use strict";var e=require("react"),t=require("./translationsContext-c8376758.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(require("string-format"));const s=()=>{const t=e.useRef(!0);return!!t.current&&(t.current=!1,!0)};let o=0;exports.useInitialMount=s,exports.useTranslations=function(){const{values:n,locale:s}=e.useContext(t.TranslationsContext)||{locale:"en-PH"};return e.useMemo((()=>({t:(e,t)=>n?n[e]?t?r.default(n[e]||e,t):n[e]||e:(console.warn(`[useTranslations] Missing translation for key ${e} and locale ${s}`),t?r.default(e,t):e):(console.error("[useTranslations] t method called before translation values are loaded"),e),locale:s})),[n,s])},exports.useUniqueId=()=>{const t=e.useRef("");return s()&&(o+=1,t.current=`hhg-gen-id${o}`),t.current};
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("./utils-460cc1b1.js"),t=require("styled-components"),o=require("react"),s=require("./index-936719bb.js"),a=require("./index-44cde1cb.js"),n=require("./Subot-143686ec.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=r(t),h=r(o);const g=l.default.div`
1
+ "use strict";var e=require("./utils-97861e62.js"),t=require("styled-components"),o=require("react"),s=require("./index-a607ab1d.js"),a=require("./index-1abb8f88.js"),n=require("./Subot-e6872850.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=r(t),h=r(o);const g=l.default.div`
2
2
  position: relative;
3
3
  display: inline-flex;
4
4
  align-items: center;
@@ -1 +1 @@
1
- "use strict";var e=require("./tslib.es6-77ffe29f.js"),t=require("./cookieHelper-373906e4.js"),o=require("slugify");require("./index-78f49c14.js");var r=require("string-format"),a=require("react"),i=require("./isProduction-c131ac6d.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=l(o),n=l(r),_=l(a),u=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");var o={},r=(t||{}).decode||E,a=0;for(;a<e.length;){var i=e.indexOf("=",a);if(-1===i)break;var l=e.indexOf(";",a);if(-1===l)l=e.length;else if(l<i){a=e.lastIndexOf(";",i-1)+1;continue}var s=e.slice(a,i).trim();if(void 0===o[s]){var n=e.slice(i+1,l).trim();34===n.charCodeAt(0)&&(n=n.slice(1,-1)),o[s]=m(n,r)}a=l+1}return o},c=function(e,t,o){var r=o||{},a=r.encode||T;if("function"!=typeof a)throw new TypeError("option encode is invalid");if(!d.test(e))throw new TypeError("argument name is invalid");var i=a(t);if(i&&!d.test(i))throw new TypeError("argument val is invalid");var l=e+"="+i;if(null!=r.maxAge){var s=r.maxAge-0;if(isNaN(s)||!isFinite(s))throw new TypeError("option maxAge is invalid");l+="; Max-Age="+Math.floor(s)}if(r.domain){if(!d.test(r.domain))throw new TypeError("option domain is invalid");l+="; Domain="+r.domain}if(r.path){if(!d.test(r.path))throw new TypeError("option path is invalid");l+="; Path="+r.path}if(r.expires){var n=r.expires;if(!function(e){return"[object Date]"===p.call(e)||e instanceof Date}(n)||isNaN(n.valueOf()))throw new TypeError("option expires is invalid");l+="; Expires="+n.toUTCString()}r.httpOnly&&(l+="; HttpOnly");r.secure&&(l+="; Secure");if(r.priority){switch("string"==typeof r.priority?r.priority.toLowerCase():r.priority){case"low":l+="; Priority=Low";break;case"medium":l+="; Priority=Medium";break;case"high":l+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"strict":l+="; SameSite=Strict";break;case"none":l+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return l},p=Object.prototype.toString,d=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function E(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function T(e){return encodeURIComponent(e)}function m(e,t){try{return t(e)}catch(t){return e}}var A={parse:u,serialize:c};const b={BASE_API_PATH:"/",PROFILE:"profile?website_url={website_url}",SEARCH_USER:"profile/search?website_url={website_url}&name={name}",FETCH_PREVIEW:"fetch/preview?website_url={website_url}",FETCH_POST_OR_TOPIC:"fetch/{slug}?website_url={website_url}&community_slug={communitySlug}",POST:{LIST:"post?website_url={website_url}&slug={slug}&pin={pin}&page={page}&community_id={communityId}&topic_id={topicId}&sort_by={sort}&id={id}",DETAIL_BY_ID_OR_SLUG:"post/{idSlug}?website_url={website_url}",CREATE:"post/create?website_url={website_url}",LIKE:"post/{id}/like?website_url={website_url}",DELETE:"post/{id}/delete?website_url={website_url}",REPORT:"post/{id}/report?website_url={website_url}",UPDATE:"post/{id}/update?website_url={website_url}",FOLLOW:"post/{id}/follow?website_url={website_url}",CREATE_ARTICLE_COMMENT:"article-comment/create?website_url={website_url}"},COMMENT:{LIST:"comment?website_url={website_url}&post_id={postId}&page={page}&sort_by={sort}&items_per_page={perPage}&_without_reply={withoutReply}",CREATE:"comment/create?website_url={website_url}",REPLY:"comment/reply?website_url={website_url}",DELETE:"comment/{id}/delete?website_url={website_url}",LIKE:"comment/{id}/like?website_url={website_url}",UNLIKE:"comment/{id}/unlike?website_url={website_url}",IMAGE_UPLOAD:"comment/image/upload?website_url={website_url}"},COMMUNITY:{LIST:"community?website_url={website_url}&page={page}",DETAIL_BY_ID_OR_SLUG:"community/{idSlug}?website_url={website_url}",JOIN:"community/join?website_url={website_url}",LEAVE:"community/leave?website_url={website_url}"},TOPIC:{LIST:"topic?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}&page={page}",DETAIL_BY_ID_OR_SLUG:"topic/{idSlug}?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}",HEALTH_TOOLS:"tools?topic_id={topicId}&website_url={website_url}",SUBOTS:"subots?topic_id={topicId}&website_url={website_url}",SUGGESTED_POSTS:"suggested-posts?topic_id={topicId}&website_url={website_url}&page={page}",JOIN:"topic/join?website_url={website_url}",LEAVE:"topic/leave?website_url={website_url}"},BOOKMARK:{LIST:"bookmark?user_id={userId}&website_url={website_url}",CREATE:"bookmark/create?website_url={website_url}",DELETE:"bookmark/delete?website_url={website_url}"},UPLOAD_IMAGE:"auth/comment/image/upload?website_url={website_url}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info",USER:{DETAIL:"profile/user/detail?website_url={website_url}&user_id={id}",COUNT_TABS:"profile/user/counting?website_url={website_url}&user_id={id}&total_post={post}&total_comment={comment}&total_community={community}&total_reply={reply}&total_question={question}",LIST_POST:"profile/user/posts?website_url={website_url}&user_id={id}&is_anonymous={isAnonymous}&paging=none",LIST_QUESTION_NEED_REPLY:"questions/no-reply?website_url={website_url}",LIST_QUESTION:"question/{id}?website_url={website_url}&is_reply={isReply}&is_question={isQuestion}&is_ignore={isIgnore}&group_by={groupBy}",SKIP_QUESTION:"questions/ignore?website_url={website_url}&question_id={id}",LIST_ANSWERS:"replied/{id}?website_url={website_url}&paging=1&items_per_page={pageSize}"},HEALTH_TOOL:{CREATE:"health-profile/{type}/create?website_url={website_url}",GET_STATUS:"health-profile/get-status-for-user?website_url={website_url}"}},O={locale:"vi-VN",env:{isMarryBaby:!1,togetherBasePath:"/community"},router:{basePath:"",asPath:"/"}},h=a.createContext({data:O,action:{pushNotifications:e=>e,sanitizeFunction:e=>e},formatMessage:()=>null});exports.GlobalData=O;const g="DD/MM/YYYY",v="/images/avatar.jpg",I="/images/default-image.jpg",L={DUE_DATE:"DUE_DATE",BMI:"BMI",BMR:"BMR",OVULATION:"OVULATION",IFRAME:"IFRAME",PWG:"PWG",THR:"THR",BGC:"BGC"},S={"id-ID":{"kalkulator-bmi":L.BMI,"kebutuhan-kalori":L.BMR,"kalkulator-hari-perkiraan-lahir":L.DUE_DATE,"kalkulator-masa-subur-2":L.OVULATION,"kalkulator-kenaikan-berat-badan-ibu-hamil":L.PWG,"kalkulator-detak-jantung-saat-olahraga":L.THR},"ms-MY":{"kalkulator-bmi":L.BMI,"kalkulator-bmr":L.BMR,"kalkulator-tarikh-bersalin":L.DUE_DATE,"kalkulator-kesuburan":L.OVULATION,"kalkulator-tambah-berat-badan-hamil":L.PWG,"target-heart-rate-calculator":L.THR},"vi-VN":{"cach-tinh-chi-so-bmi":L.BMI,"tinh-chi-so-bmr":L.BMR,"cong-cu-tinh-ngay-du-sinh":L.DUE_DATE,"tinh-ngay-rung-trung":L.OVULATION,"cong-cu-tinh-can-nang-khi-mang-thai":L.PWG,"cong-cu-do-nhip-tim":L.THR},"zh-TW":{"bmi-calculator":L.BMI,"bmr-calculator":L.BMR,"due-date-calculator":L.DUE_DATE,"ovulation-calculator":L.OVULATION,"pregnancy-weight-gain-calculator":L.PWG,"target-heart-rate-calculator":L.THR},"en-PH":{"bmi-calculator":L.BMI,"bmr-calculator":L.BMR,"due-date-calculator":L.DUE_DATE,"ovulation-calculator":L.OVULATION,"pregnancy-weight-gain-calculator":L.PWG,"target-heart-rate-calculator":L.THR},"th-TH":{"เครื่องคำนวณหา-ค่าดัชนี":L.BMI,"เครื่องคำนวณอัตราการเผาผลาญพลังงาน-bmr":L.BMR,"เครื่องมือคำนวณกำหนดคลอด":L.DUE_DATE,"เครื่องคำนวณการตกไข่-ovulation-calculat":L.OVULATION,"เครื่องคำนวณน้ำหนักตัว":L.PWG,"เครื่องวัดอัตราการเต้น":L.THR},"hi-IN":{"bmi-calculator-en":L.BMI,"bmi-calculator":L.BMI,"bmr-calculator":L.BMR,"delivery-date-calculator":L.DUE_DATE,"ovulation-calculator":L.OVULATION,"pregnancy-weight-gain-calculator":L.PWG,"target-heart-rate-calculator":L.THR},"km-KH":{"គណនា-bmi":L.BMI,"គណនា-bmr":L.BMR,"គណនាថ្ងៃសម្រាលកូន":L.DUE_DATE,"គណនាថ្ងៃមេជីវិតញីទុំធ្លាក់":L.OVULATION,"គណនាទម្ងន់ស្ត្រីពពោះ":L.PWG,"គណនារកចង្វាក់បេះដូងល្អ":L.THR},"my-MM":{"bmi-calculator":L.BMI,"bmr-calculator":L.BMR,"due-date-calendar":L.DUE_DATE,"ovulation-calculator":L.OVULATION,"pregnaancy-weight-calculator":L.PWG,"target-heartrate":L.THR,"pregnancy-weight-calculator":L.PWG,"target-heart-rate":L.THR}},R="hhg_user_token",w="together_admin_token",f={adBlock:48,articleAdContainer:47,headerContainerHome:99,headerContainerPopup:200,headerContainerPopupSUbLevel:300,menuSearchInputPopup:5,menuSearchInputDisplayIcon:6,menuSearchPopup:200},y="hhg-id",D={report_scam:{label:"morePopover.report.scam",reportReasonText:"morePopover.report.scam"},report_sex:{label:"morePopover.report.sex",reportReasonText:"morePopover.report.sex"},report_offensive:{label:"morePopover.report.offensive",reportReasonText:"morePopover.report.offensive"},report_violence:{label:"morePopover.report.violence",reportReasonText:"morePopover.report.violence"},report_prohibited:{label:"morePopover.report.prohibited",reportReasonText:"morePopover.report.prohibited"},report_spam:{label:"morePopover.report.spam",reportReasonText:"morePopover.report.spam"},report_falseNews:{label:"morePopover.report.falseNews",reportReasonText:"morePopover.report.falseNews"},report_other:{label:"morePopover.report.other",reportReasonText:"morePopover.report.other"}},P={"en-PH":{ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location"},"vi-VN":{ALL:"tat-ca",HOSPITAL:"benh-vien",SERVICE:"dich-vu",DOCTOR:"bac-si",SEARCH:"tim-kiem",SPECIALTIES:"chuyen-khoa",CURRENT:"vi-tri-hien-tai"},"id-ID":{ALL:"semua",HOSPITAL:"rumah-sakit",SERVICE:"layanan",DOCTOR:"dokter",SEARCH:"cari",SPECIALTIES:"spesialisasi",CURRENT:"posisi-saya-saat-ini"}};var G=Object.freeze({__proto__:null,POST_DATE_FORMAT:"dd/MM/yyyy",NORMAL_DATE_FORMAT:"YYYY-MM-DD",DUE_DATE_FORMAT:g,DEFAULT_AVATAR_IMG:v,DEFAULT_RESULT_IMG:"/images/default.png",DEFAULT_IMG:I,BMI_LEVELS:["underweight","healthy","overweight","obese_level_1","obese_level_2"],BMR_LEVELS:["low","normal","high"],CORAL_TOKEN_COOKE:"coral_together_user_token",HEALTH_TOOL_TYPE:L,LOCALE_HEALTH_TOOLS:S,BEARER_TOKEN_COOKIE:R,TOGETHER_DISCLAIMER_COOKIE:"hhg_together_disclaimer",BEARER_ADMIN_TOKEN_COOKIE:w,Z_INDEX:f,BmrActiveLevels:[{value:"sedentary",icon:"bmr-sedentary",name:"bmr.activeLevel.sedentary",description:"bmr.activeLevel.sedentary.description"},{value:"lightly-active",icon:"bmr-light",name:"bmr.activeLevel.lightlyActive",description:"bmr.activeLevel.lightlyActive.description"},{value:"moderately-active",icon:"bmr-moderately",name:"bmr.activeLevel.moderatelyActive",description:"bmr.activeLevel.moderatelyActive.description"},{value:"intensely-active",icon:"bmr-intensively",name:"bmr.activeLevel.intenselyActive",description:"bmr.activeLevel.intenselyActive.description"},{value:"extremely-active",icon:"bmr-extremely",name:"bmr.activeLevel.extremelyActive",description:"bmr.activeLevel.extremelyActive.description"}],LEAD_CAMPAIGN_CODE:"lmoct7xfr5sv4fv",LEAD_TOKEN_COOKIE:y,GA_TOKEN_COOKIE:"_ga",GOOGLE_CALENDAR_AUTH_CLIENT_ID:"1038242799566-esoq4ij201ve5qfp266nbca44scpo3c6.apps.googleusercontent.com",FIND_CARE_IFRAME_URL:"https://www.appsheet.com/start/4ba34ebe-3cb6-4c16-8dd4-d074025a5bb6#appName=DependentDropdowns-2711103&group=%5B%5D&page=card&sort=%5B%5D&table=Menu&view=Menu",REPORT_REASON_MAP:D,MB_SOCIAL_LINKS:{LINKEDIN:"https://www.linkedin.com/company/hello-health-group/",FACEBOOK:"https://www.facebook.com/marry.baby.vn",INSTAGRAM:"https://www.instagram.com/marrybaby.vn/",TWITTER:"",YOUTUBE:"https://www.youtube.com/channel/UCeZybTkY1VzJ3N7LvPGdKbg",ZALO:"http://zalo.me/806483414530291942"},INTERNAL_ROLES:["admin","moderator","local-admin"],EXTERNAL_ROLES:["ambassador","expert","sponsor","guide","influencer"],INTERNAL_PROFILE_ROLES:["moderator","local-admin"],EXTERNAL_PROFILE_ROLES:["expert","ambassador","sponsor"],RoleDataMap:{moderator:{text:"Moderator",fid:"cardAuthor.moderator",background:"#fe921d"},admin:{text:"Admin",fid:"cardAuthor.admin",background:"#2b62cd"},"local-admin":{text:"Local admin",fid:"cardAuthor.localAdmin",background:"#2b62cd"},expert:{text:"Expert",fid:"cardAuthor.expert",background:"#ff6f4d"},sponsor:{text:"Sponsor",fid:"cardAuthor.sponsor",background:"#00c7e6"},ambassador:{text:"Ambassador",fid:"cardAuthor.ambassador",background:"#00CB8A"}},MAX_IMAGE_UPLOADS:20,LOCALISED_SLUGS:P});const N={"vi-VN":"hellobacsi.com","id-ID":"hellosehat.com","ms-MY":"hellodoktor.com","km-KH":"hellokrupet.com","en-PH":"hellodoctor.com.ph","th-TH":"hellokhunmor.com","my-MM":"hellosayarwon.com","zh-TW":"helloyishi.com.tw","hi-IN":"helloswasthya.com"},C={"vi-VN":"marrybaby.vn"},x=process.env.NEXT_PUBLIC_DEPLOY_LOCALE||"vi-VN",M=e=>{const{env:{isMarryBaby:t}}=exports.GlobalData;return`https://${t?C[e]:N[e]}`},U=e=>{const t=e.indexOf("?");return t>=0?e.slice(0,t+1)+e.slice(t+1).replace(/[^=&]+=(&|$)/g,"").replace(/&$/,""):e},k=(e,t,o,r)=>{let a="";o&&(a=Object.keys(o).map((e=>e+"="+o[e])).join("&"));const{togetherBaseApiUrl:i=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};let l=n.default(e,Object.assign(Object.assign({},(null==t?void 0:t._locale)?{website_url:M(String(t._locale))}:{}),t));l+=`${l.includes("?")?"&":"?"}${a}`;return(r||i)+"api/v1/"+U(l)},B=e=>((null==e?void 0:e.data)&&(e.data instanceof FormData?e.body=e.data:"object"==typeof e.data&&(e.body=JSON.stringify(e.data)),delete e.data),e),H=(t,o,r,a=!1)=>e.__awaiter(void 0,void 0,void 0,(function*(){var e,i,l,s;try{const e=yield fetch(a?t:(s=t,encodeURI(s).replace(/%5B/g,"[").replace(/%5D/g,"]")),Object.assign(Object.assign({method:o},B(r)),{headers:Object.assign({},null==r?void 0:r.headers)})).then((e=>e.json()));if(e)return e}catch(o){return console.log(o),console.log({url:t,status:null===(e=null==o?void 0:o.response)||void 0===e?void 0:e.status,statusText:null===(i=null==o?void 0:o.response)||void 0===i?void 0:i.statusText}),(null===(l=null==o?void 0:o.response)||void 0===l?void 0:l.data)||null}return null})),F=(o,r,a,i)=>e.__awaiter(void 0,void 0,void 0,(function*(){try{const e=A.parse(i||""),l=e[R]||t.getCookie(R);if(l&&l.length){const e=yield fetch(o,Object.assign(Object.assign({method:r},B(a)),{headers:Object.assign({Authorization:"Bearer "+l},null==a?void 0:a.headers)})).then((e=>e.json()));if(e)return e}}catch(e){return null}return null}));function j(e,t,o){const r=new RegExp("([?&])"+t+"=.*?(&|$)","i"),a=-1!==e.indexOf("?")?"&":"?";return e.match(r)?e.replace(r,"$1"+t+"="+o+"$2"):e+a+t+"="+o}const K=(e,t,o,r)=>o&&t?`${o}-${t}`:`${s.default(e||"",{lower:!0,locale:r||x})}-${t}`;exports.ADMIN_PATHS={SEARCH_USER:"admin/profile/search?website_url={website_url}&name={name}",COMMENT:{IMAGE_UPLOAD:"admin/comment/image/upload?website_url={website_url}"}},exports.BEARER_TOKEN_COOKIE=R,exports.CARE_PATHS={GET_DOCTOR_INFO:"api/doctors/{doctorId}?site={website_url}",GET_HOSPITAL_INFO:"api/hospital/branch/{hospital_branch_id}?site={website_url}"},exports.DEFAULT_AVATAR_IMG=v,exports.DEFAULT_IMG=I,exports.DISCOVER_PATHS={BASE_API_PATH:"/",GET_SEARCH_ARTICLES:"search?s={keyword}&page={page}",GET_ALL_CATEGORIES:"categories?type=all",GET_HOMEPAGE_POSTS:"home/trending-post?type={type}",GET_HOMEPAGE_LATEST_POSTS:"articles?page=1&_islatest=1",GET_ARTICLE_DETAIL:"article/{slug}?skip_ids={skipIds}&_isrelated={isRelated}",GET_CATEGORY_DETAIL:"category/{slug}",GET_CATEGORY_OR_ARTICLE_DETAIL:"fetch/{fullSlug}",GET_PREVIEW_ARTICLE:"fetch/{fullSlug}?preview_nonce={nonce}&preview=true",GET_ARTICLE_OF_CATEGORY:"articles?category_id={categoryId}&page={currentPage}",GET_PAGE_STATIC:"page/{slug}",GET_ALL_HEALTH_TOOLS:"healthtools",GET_ALL_MARRYBABY_HEALTH_TOOLS:"health-tools",GET_HEALTH_TOOLS_BY_CATEGORY:"healthtools?_hasgroup=1",GET_AUTHOR:"author/{slug}",GET_ALL_EXPERTS:"experts",GET_ALL_EXPERTS_PAGING:"experts?page={page}",GET_EXPERT:"expert/{slug}",GET_EXPERT_POST:"expert/article?page={page}",POST_ARTICLE_FEEDBACK:"article/feedback/{id}",GET_AZ_DRUGS:"category/a-z/{category}",GET_HOMEPAGE_MEDICAL_REVIEWED:"home/medical-reviewed",GET_ARTICLES_BY_IDS:"articles?ids={ids}",GET_ARTICLE_OF_CATEGORY_NO_EXPLAINERS:"articles?category_id={categoryId}&page={currentPage}&skip_ids={ids}",GET_EXPERT_OF_CATEGORY:"category/expert/?id={id}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info",GET_DUE_DATE_ALL_WEEKS:"health-tools/due-date-calculator/all",GET_DUE_DATE_SUGGESTED_ARTICLES:"health-tools/due-date-calculator/result?from_week={from}&to_week={to}",GET_PROFILE:"user/profile",GET_ADMIN_PROFILE:"GET_ADMIN_PROFILE",GET_FEATURE:"feature",POST_NEW_FEATURE:"feature/update",CREATE_BOOKMARK:"bookmark/create",DELETE_BOOKMARK:"bookmark/delete",DELETE_ALL_BOOKMARK:"bookmark/delete-all",GET_ALL_BOOKMARK:"bookmark",SSO_USER_PROFILE:"user",SSO_USER_BOOKMARKS:"user/bookmarks",SSO_USER_PASSWORD:"user/settings/password",SSO_USER_EMAIL:"user/settings/update-email",SSO_CLOSE_ACCOUNT:"user/settings/close-account",SSO_HELP:"user/settings/help",GET_HEALTH_TOOL_OVULATION_INFO:"health-tools/ovulation-calculator/info",GET_HEALTH_TOOL_OVULATION_SUGGESTED_ARTICLES:"health-tools/ovulation-calculator/result?method={method}",GET_HEALTH_TOOL_BMI_INFO:"health-tools/bmi-calculator/info",GET_HEALTH_TOOL_BMI_RESULT:"health-tools/bmi-calculator/result?gender={gender}&bmi={bmi}&age={age}",GET_HEALTH_TOOL_BMR_INFO:"health-tools/bmr-calculator/info",GET_HEALTH_TOOL_BMR_RESULT:"health-tools/bmr-calculator/result?kcals={kcals}&gender={gender}&age={age}",GET_HEALTH_TOOL_PWG_INFO:"health-tools/preweight-gain-calculator/info",GET_HEALTH_TOOL_THR_INFO:"health-tools/target-heart-rate/info",GET_HEALTH_TOOL_BABY_GROWTH_INFO:"health-tools/baby-growth-tracking/info",POST_UPDATE_LOCATION:"tracking/geo/",GET_SIDIS_DUE_DATE:"frontend/tools/due_date",GET_SIDIS_OVULATION:"frontend/tools/ovulation",GET_SIDIS_BMI:"frontend/tools/bmi",GET_SIDIS_BMR:"frontend/tools/bmr",POST_LOGOUT:"user/logout",OVULATION_CREATE_EVENT:"ovulation/event?method={method}&day={day}&cycle={cycle}&period={period}&token={token}&user_id={user_id}",GET_ALL_SPOTLIGHT:"spotlights?per_page={perPage}&order_by={orderBy}",SSO_UPDATE_FIRST_TIME_BOOKMARK:"bookmark/update-first-time",POST_COMMENT_NOTIFICATION:"comment/notification",GET_ABOUT_US_DATA:"about",POST_LEAD_IMPRESSION:"campaign/{campaignCode}/impression",POST_LEAD_POPUP_EXIT:"campaign/{campaignCode}/popup_exit",POST_LEAD_LEAD:"campaign/{campaignCode}/lead",POST_SSO_VERIFY_TOKEN:"verify-id-token",GET_LANDING_PAGE_FIRST_NODE:"landing_page/bot",GET_LANDING_PAGE_NEXT_NODE:"landing_page/messages",POST_LANDING_PAGE_IMPRESSION:"landing_page/impressions",POST_LANDING_PAGE_CLICK:"landing_page/clicks",FETCH_URL_DATA:"preview",GET_SPOTLIGHT_LANDING:"spotlight/{slug}",GET_FOOTER_INFO:"footer",CHECK_SSO_EMAIL:"member/check-email",GET_HOMEPAGE_SITEWIDE_BANNER:"home/sitewide-banner",GET_DYNAMIC_FOOTER:"menu/footer",GET_EXPERTS:"experts?page={page}&number={perPage}&s={search}",GET_EXPERT_BY_ID:"expert/{id}"},exports.DUE_DATE_FORMAT=g,exports.DefaultComponentGlobalContextData=O,exports.HEALTH_TOOL_TYPE=L,exports.LEAD_TOKEN_COOKIE=y,exports.MAX_IMAGE_UPLOADS=20,exports.PATHS=b,exports.REPORT_REASON_MAP=D,exports.TogetherComponentGlobalContext=h,exports.TogetherComponentGlobalContextProvider=({locale:e="vi-VN",children:t,userInfo:o,router:r,env:i={isMarryBaby:!1,togetherBasePath:"/community"},sanitizeFunction:l=(e=>e),pushNotifications:s=(()=>!1),formatMessage:n})=>{const[u,c]=a.useState();return exports.GlobalData={userInfo:o,locale:e,togetherUserId:u,router:r,env:i},a.useEffect((()=>{(null==o?void 0:o.id)&&F(k(b.PROFILE,{_locale:e}),"GET").then((e=>{var t;c(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)}))}),[null==o?void 0:o.id]),_.default.createElement(h.Provider,{value:{data:{userInfo:o,locale:e,togetherUserId:u,router:r,env:i},action:{pushNotifications:s,sanitizeFunction:l},formatMessage:n}},t)},exports.Z_INDEX=f,exports.callApi=H,exports.callApiWithAdminAuth=(o,r,a,i)=>e.__awaiter(void 0,void 0,void 0,(function*(){try{const e=A.parse(i||""),l=e[w]||t.getCookie(w);if(l&&l.length){const e=yield fetch(o,Object.assign(Object.assign({method:r},B(a)),{headers:Object.assign({Authorization:"Bearer "+l},null==a?void 0:a.headers)})).then((e=>e.json()));if(e)return e}}catch(e){return null}return null})),exports.callApiWithAuth=F,exports.callApiWithOptionalAuth=(o,r="GET",a,i)=>e.__awaiter(void 0,void 0,void 0,(function*(){var e,l,s,n,_,u;try{const n="string"==typeof o?o:o.url,_="string"==typeof o?o:o.backupUrl,u=A.parse(i||""),c=u[R]||t.getCookie(R);if(!c||!c.length)return H(_||n,r,a);try{const t=yield fetch(n,Object.assign(Object.assign({method:r},B(a)),{headers:Object.assign({Authorization:"Bearer "+c},null==a?void 0:a.headers)})).then((e=>e.json()));if(null===(e=null==t?void 0:t.messages)||void 0===e?void 0:e.find((e=>"Unauthenticated"===(null==e?void 0:e.toLowerCase()))))return H(_||n,r,a);if(t)return t}catch(e){return console.log({status:null===(l=null==e?void 0:e.response)||void 0===l?void 0:l.status,statusText:null===(s=null==e?void 0:e.response)||void 0===s?void 0:s.statusText}),H(_||n,r,a)}}catch(e){return console.log({status:null===(n=null==e?void 0:e.response)||void 0===n?void 0:n.status,statusText:null===(_=null==e?void 0:e.response)||void 0===_?void 0:_.statusText}),(null===(u=null==e?void 0:e.response)||void 0===u?void 0:u.data)||null}return null})),exports.constants=G,exports.cookie=A,exports.domainLocales=N,exports.domainLocalesMarryBaby=C,exports.getApiPath=k,exports.getCareDoctorUrl=({name:e,id:t,locale:o})=>{var r;return`/care/${null===(r=P[o||"vi-VN"])||void 0===r?void 0:r.DOCTOR}/${K(e,t)}`},exports.getCareHospitalUrl=({name:e,id:t,slug:o,locale:r})=>{var a;return`/care/${null===(a=P[r||"vi-VN"])||void 0===a?void 0:a.HOSPITAL}/${K(e,t,o)}`},exports.getCarePath=(e,t)=>{const{careBaseApiUrl:o=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};return(o||"https://service-health-care.hellohealthgroup.com/")+U(n.default(e,Object.assign({},t)))},exports.getCurrentBaseUrl=e=>{const{env:{isMarryBaby:t}}=exports.GlobalData;if("undefined"!=typeof window)return window.location.origin;const o="staging"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return"development"===process.env.NEXT_PUBLIC_DEPLOY_ENV?"http://localhost:3000":`https://${o?t?"fe.":"discover.":t?"www.":""}${N[e]}`},exports.getDiscoverApiPath=(e,t,o)=>{const{discoverBaseApiUrl:r="",discoverBaseProdApiUrl:a=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};return(!i.isProduction&&o?a:r)+"wp-json/api/"+U(n.default(e,Object.assign({},t)))},exports.getMarryBabyApiPath=(e,t,o)=>{const{marryBabyApiUrl:r="",marryBabyProdApiUrl:a=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};return(o&&!i.isProduction?a:r)+"wp-json/api/"+U(n.default(e,Object.assign({},t)))},exports.getPremiumApiPath=(e,t)=>{const{premiumBaseApiUrl:o=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};return(o||"https://premium-content-stag.hellohealthgroup.com/")+U(n.default(e,Object.assign({},t)))},exports.getSsoApiPath=(e,t)=>{const{publicSSO:o=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};return(o||"https://staging-id.hellobacsi.com/")+"api/"+U(n.default(e,Object.assign({},t)))},exports.getUrlToSignUp=(e,t,o="/community")=>{const r=e||("undefined"!=typeof window?window.location.href:"/");let a="undefined"!=typeof window?window.location.origin:"";a||e&&(e.startsWith("http://")||e.startsWith("https://"))&&(a=e.split("/").slice(0,3).join("/"));return((e,t)=>{const{publicSSO:o}=exports.GlobalData.env,r=e||window.location.href;return t&&Object.keys(t).map((e=>{j(r,e,t[e])})),j(r,"source","communities"),o?`${o}?returnUrl=${encodeURIComponent(r.toString())}`:r})(`${a}${o}/on-boarding?return=${encodeURIComponent(r)}`,t)},exports.getWebsiteUrlApi=M,exports.locale=x;
1
+ "use strict";var e=require("./tslib.es6-f581f504.js"),t=require("./cookieHelper-ef7d953a.js"),o=require("slugify");require("./index-4c97e71b.js");var r=require("string-format"),a=require("react"),i=require("./isProduction-fce4c411.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=l(o),n=l(r),_=l(a),u=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");var o={},r=(t||{}).decode||E,a=0;for(;a<e.length;){var i=e.indexOf("=",a);if(-1===i)break;var l=e.indexOf(";",a);if(-1===l)l=e.length;else if(l<i){a=e.lastIndexOf(";",i-1)+1;continue}var s=e.slice(a,i).trim();if(void 0===o[s]){var n=e.slice(i+1,l).trim();34===n.charCodeAt(0)&&(n=n.slice(1,-1)),o[s]=m(n,r)}a=l+1}return o},c=function(e,t,o){var r=o||{},a=r.encode||T;if("function"!=typeof a)throw new TypeError("option encode is invalid");if(!d.test(e))throw new TypeError("argument name is invalid");var i=a(t);if(i&&!d.test(i))throw new TypeError("argument val is invalid");var l=e+"="+i;if(null!=r.maxAge){var s=r.maxAge-0;if(isNaN(s)||!isFinite(s))throw new TypeError("option maxAge is invalid");l+="; Max-Age="+Math.floor(s)}if(r.domain){if(!d.test(r.domain))throw new TypeError("option domain is invalid");l+="; Domain="+r.domain}if(r.path){if(!d.test(r.path))throw new TypeError("option path is invalid");l+="; Path="+r.path}if(r.expires){var n=r.expires;if(!function(e){return"[object Date]"===p.call(e)||e instanceof Date}(n)||isNaN(n.valueOf()))throw new TypeError("option expires is invalid");l+="; Expires="+n.toUTCString()}r.httpOnly&&(l+="; HttpOnly");r.secure&&(l+="; Secure");if(r.priority){switch("string"==typeof r.priority?r.priority.toLowerCase():r.priority){case"low":l+="; Priority=Low";break;case"medium":l+="; Priority=Medium";break;case"high":l+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"strict":l+="; SameSite=Strict";break;case"none":l+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return l},p=Object.prototype.toString,d=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function E(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function T(e){return encodeURIComponent(e)}function m(e,t){try{return t(e)}catch(t){return e}}var b={parse:u,serialize:c};const A={BASE_API_PATH:"/",PROFILE:"profile?website_url={website_url}",SEARCH_USER:"profile/search?website_url={website_url}&name={name}",FETCH_PREVIEW:"fetch/preview?website_url={website_url}",FETCH_POST_OR_TOPIC:"fetch/{slug}?website_url={website_url}&community_slug={communitySlug}",POST:{LIST:"post?website_url={website_url}&slug={slug}&pin={pin}&page={page}&community_id={communityId}&topic_id={topicId}&sort_by={sort}&id={id}",DETAIL_BY_ID_OR_SLUG:"post/{idSlug}?website_url={website_url}",CREATE:"post/create?website_url={website_url}",LIKE:"post/{id}/like?website_url={website_url}",DELETE:"post/{id}/delete?website_url={website_url}",REPORT:"post/{id}/report?website_url={website_url}",UPDATE:"post/{id}/update?website_url={website_url}",FOLLOW:"post/{id}/follow?website_url={website_url}",CREATE_ARTICLE_COMMENT:"article-comment/create?website_url={website_url}"},COMMENT:{LIST:"comment?website_url={website_url}&post_id={postId}&page={page}&sort_by={sort}&items_per_page={perPage}&_without_reply={withoutReply}",CREATE:"comment/create?website_url={website_url}",REPLY:"comment/reply?website_url={website_url}",DELETE:"comment/{id}/delete?website_url={website_url}",LIKE:"comment/{id}/like?website_url={website_url}",UNLIKE:"comment/{id}/unlike?website_url={website_url}",IMAGE_UPLOAD:"comment/image/upload?website_url={website_url}"},COMMUNITY:{LIST:"community?website_url={website_url}&page={page}",DETAIL_BY_ID_OR_SLUG:"community/{idSlug}?website_url={website_url}",JOIN:"community/join?website_url={website_url}",LEAVE:"community/leave?website_url={website_url}"},TOPIC:{LIST:"topic?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}&page={page}",DETAIL_BY_ID_OR_SLUG:"topic/{idSlug}?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}",HEALTH_TOOLS:"tools?topic_id={topicId}&website_url={website_url}",SUBOTS:"subots?topic_id={topicId}&website_url={website_url}",SUGGESTED_POSTS:"suggested-posts?topic_id={topicId}&website_url={website_url}&page={page}",JOIN:"topic/join?website_url={website_url}",LEAVE:"topic/leave?website_url={website_url}"},BOOKMARK:{LIST:"bookmark?user_id={userId}&website_url={website_url}",CREATE:"bookmark/create?website_url={website_url}",DELETE:"bookmark/delete?website_url={website_url}"},UPLOAD_IMAGE:"auth/comment/image/upload?website_url={website_url}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info",USER:{DETAIL:"profile/user/detail?website_url={website_url}&user_id={id}",COUNT_TABS:"profile/user/counting?website_url={website_url}&user_id={id}&total_post={post}&total_comment={comment}&total_community={community}&total_reply={reply}&total_question={question}",LIST_POST:"profile/user/posts?website_url={website_url}&user_id={id}&is_anonymous={isAnonymous}&paging=none",LIST_QUESTION_NEED_REPLY:"questions/no-reply?website_url={website_url}",LIST_QUESTION:"question/{id}?website_url={website_url}&is_reply={isReply}&is_question={isQuestion}&is_ignore={isIgnore}&group_by={groupBy}",SKIP_QUESTION:"questions/ignore?website_url={website_url}&question_id={id}",LIST_ANSWERS:"replied/{id}?website_url={website_url}&paging=1&items_per_page={pageSize}"},HEALTH_TOOL:{CREATE:"health-profile/{type}/create?website_url={website_url}",GET_STATUS:"health-profile/get-status-for-user?website_url={website_url}"}},O={locale:"vi-VN",env:{isMarryBaby:!1,togetherBasePath:"/community"},router:{basePath:"",asPath:"/"}},h=a.createContext({data:O,action:{pushNotifications:e=>e,sanitizeFunction:e=>e},formatMessage:()=>null});exports.GlobalData=O;const g="DD/MM/YYYY",v="/images/avatar.jpg",I="/images/default-image.jpg",L={DUE_DATE:"DUE_DATE",BMI:"BMI",BMR:"BMR",OVULATION:"OVULATION",IFRAME:"IFRAME",PWG:"PWG",THR:"THR",BGC:"BGC"},S={"id-ID":{"kalkulator-bmi":L.BMI,"kebutuhan-kalori":L.BMR,"kalkulator-hari-perkiraan-lahir":L.DUE_DATE,"kalkulator-masa-subur-2":L.OVULATION,"kalkulator-kenaikan-berat-badan-ibu-hamil":L.PWG,"kalkulator-detak-jantung-saat-olahraga":L.THR},"ms-MY":{"kalkulator-bmi":L.BMI,"kalkulator-bmr":L.BMR,"kalkulator-tarikh-bersalin":L.DUE_DATE,"kalkulator-kesuburan":L.OVULATION,"kalkulator-tambah-berat-badan-hamil":L.PWG,"target-heart-rate-calculator":L.THR},"vi-VN":{"cach-tinh-chi-so-bmi":L.BMI,"tinh-chi-so-bmr":L.BMR,"cong-cu-tinh-ngay-du-sinh":L.DUE_DATE,"tinh-ngay-rung-trung":L.OVULATION,"cong-cu-tinh-can-nang-khi-mang-thai":L.PWG,"cong-cu-do-nhip-tim":L.THR},"zh-TW":{"bmi-calculator":L.BMI,"bmr-calculator":L.BMR,"due-date-calculator":L.DUE_DATE,"ovulation-calculator":L.OVULATION,"pregnancy-weight-gain-calculator":L.PWG,"target-heart-rate-calculator":L.THR},"en-PH":{"bmi-calculator":L.BMI,"bmr-calculator":L.BMR,"due-date-calculator":L.DUE_DATE,"ovulation-calculator":L.OVULATION,"pregnancy-weight-gain-calculator":L.PWG,"target-heart-rate-calculator":L.THR},"th-TH":{"เครื่องคำนวณหา-ค่าดัชนี":L.BMI,"เครื่องคำนวณอัตราการเผาผลาญพลังงาน-bmr":L.BMR,"เครื่องมือคำนวณกำหนดคลอด":L.DUE_DATE,"เครื่องคำนวณการตกไข่-ovulation-calculat":L.OVULATION,"เครื่องคำนวณน้ำหนักตัว":L.PWG,"เครื่องวัดอัตราการเต้น":L.THR},"hi-IN":{"bmi-calculator-en":L.BMI,"bmi-calculator":L.BMI,"bmr-calculator":L.BMR,"delivery-date-calculator":L.DUE_DATE,"ovulation-calculator":L.OVULATION,"pregnancy-weight-gain-calculator":L.PWG,"target-heart-rate-calculator":L.THR},"km-KH":{"គណនា-bmi":L.BMI,"គណនា-bmr":L.BMR,"គណនាថ្ងៃសម្រាលកូន":L.DUE_DATE,"គណនាថ្ងៃមេជីវិតញីទុំធ្លាក់":L.OVULATION,"គណនាទម្ងន់ស្ត្រីពពោះ":L.PWG,"គណនារកចង្វាក់បេះដូងល្អ":L.THR},"my-MM":{"bmi-calculator":L.BMI,"bmr-calculator":L.BMR,"due-date-calendar":L.DUE_DATE,"ovulation-calculator":L.OVULATION,"pregnaancy-weight-calculator":L.PWG,"target-heartrate":L.THR,"pregnancy-weight-calculator":L.PWG,"target-heart-rate":L.THR}},R="hhg_user_token",w="together_admin_token",f={adBlock:48,articleAdContainer:47,headerContainerHome:99,headerContainerPopup:200,headerContainerPopupSUbLevel:300,menuSearchInputPopup:5,menuSearchInputDisplayIcon:6,menuSearchPopup:200},y="hhg-id",D={report_scam:{label:"morePopover.report.scam",reportReasonText:"morePopover.report.scam"},report_sex:{label:"morePopover.report.sex",reportReasonText:"morePopover.report.sex"},report_offensive:{label:"morePopover.report.offensive",reportReasonText:"morePopover.report.offensive"},report_violence:{label:"morePopover.report.violence",reportReasonText:"morePopover.report.violence"},report_prohibited:{label:"morePopover.report.prohibited",reportReasonText:"morePopover.report.prohibited"},report_spam:{label:"morePopover.report.spam",reportReasonText:"morePopover.report.spam"},report_falseNews:{label:"morePopover.report.falseNews",reportReasonText:"morePopover.report.falseNews"},report_other:{label:"morePopover.report.other",reportReasonText:"morePopover.report.other"}},P={"en-PH":{ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location"},"vi-VN":{ALL:"tat-ca",HOSPITAL:"benh-vien",SERVICE:"dich-vu",DOCTOR:"bac-si",SEARCH:"tim-kiem",SPECIALTIES:"chuyen-khoa",CURRENT:"vi-tri-hien-tai"},"id-ID":{ALL:"semua",HOSPITAL:"rumah-sakit",SERVICE:"layanan",DOCTOR:"dokter",SEARCH:"cari",SPECIALTIES:"spesialisasi",CURRENT:"posisi-saya-saat-ini"}};var G=Object.freeze({__proto__:null,POST_DATE_FORMAT:"dd/MM/yyyy",NORMAL_DATE_FORMAT:"YYYY-MM-DD",DUE_DATE_FORMAT:g,DEFAULT_AVATAR_IMG:v,DEFAULT_RESULT_IMG:"/images/default.png",DEFAULT_IMG:I,BMI_LEVELS:["underweight","healthy","overweight","obese_level_1","obese_level_2"],BMR_LEVELS:["low","normal","high"],CORAL_TOKEN_COOKE:"coral_together_user_token",HEALTH_TOOL_TYPE:L,LOCALE_HEALTH_TOOLS:S,BEARER_TOKEN_COOKIE:R,TOGETHER_DISCLAIMER_COOKIE:"hhg_together_disclaimer",BEARER_ADMIN_TOKEN_COOKIE:w,Z_INDEX:f,BmrActiveLevels:[{value:"sedentary",icon:"bmr-sedentary",name:"bmr.activeLevel.sedentary",description:"bmr.activeLevel.sedentary.description"},{value:"lightly-active",icon:"bmr-light",name:"bmr.activeLevel.lightlyActive",description:"bmr.activeLevel.lightlyActive.description"},{value:"moderately-active",icon:"bmr-moderately",name:"bmr.activeLevel.moderatelyActive",description:"bmr.activeLevel.moderatelyActive.description"},{value:"intensely-active",icon:"bmr-intensively",name:"bmr.activeLevel.intenselyActive",description:"bmr.activeLevel.intenselyActive.description"},{value:"extremely-active",icon:"bmr-extremely",name:"bmr.activeLevel.extremelyActive",description:"bmr.activeLevel.extremelyActive.description"}],LEAD_CAMPAIGN_CODE:"lmoct7xfr5sv4fv",LEAD_TOKEN_COOKIE:y,GA_TOKEN_COOKIE:"_ga",GOOGLE_CALENDAR_AUTH_CLIENT_ID:"1038242799566-esoq4ij201ve5qfp266nbca44scpo3c6.apps.googleusercontent.com",FIND_CARE_IFRAME_URL:"https://www.appsheet.com/start/4ba34ebe-3cb6-4c16-8dd4-d074025a5bb6#appName=DependentDropdowns-2711103&group=%5B%5D&page=card&sort=%5B%5D&table=Menu&view=Menu",REPORT_REASON_MAP:D,MB_SOCIAL_LINKS:{LINKEDIN:"https://www.linkedin.com/company/hello-health-group/",FACEBOOK:"https://www.facebook.com/marry.baby.vn",INSTAGRAM:"https://www.instagram.com/marrybaby.vn/",TWITTER:"",YOUTUBE:"https://www.youtube.com/channel/UCeZybTkY1VzJ3N7LvPGdKbg",ZALO:"http://zalo.me/806483414530291942"},INTERNAL_ROLES:["admin","moderator","local-admin"],EXTERNAL_ROLES:["ambassador","expert","sponsor","guide","influencer"],INTERNAL_PROFILE_ROLES:["moderator","local-admin"],EXTERNAL_PROFILE_ROLES:["expert","ambassador","sponsor"],RoleDataMap:{moderator:{text:"Moderator",fid:"cardAuthor.moderator",background:"#fe921d"},admin:{text:"Admin",fid:"cardAuthor.admin",background:"#2b62cd"},"local-admin":{text:"Local admin",fid:"cardAuthor.localAdmin",background:"#2b62cd"},expert:{text:"Expert",fid:"cardAuthor.expert",background:"#ff6f4d"},sponsor:{text:"Sponsor",fid:"cardAuthor.sponsor",background:"#00c7e6"},ambassador:{text:"Ambassador",fid:"cardAuthor.ambassador",background:"#00CB8A"}},MAX_IMAGE_UPLOADS:20,LOCALISED_SLUGS:P});const N={"vi-VN":"hellobacsi.com","id-ID":"hellosehat.com","ms-MY":"hellodoktor.com","km-KH":"hellokrupet.com","en-PH":"hellodoctor.com.ph","th-TH":"hellokhunmor.com","my-MM":"hellosayarwon.com","zh-TW":"helloyishi.com.tw","hi-IN":"helloswasthya.com"},C={"vi-VN":"marrybaby.vn"},x=process.env.NEXT_PUBLIC_DEPLOY_LOCALE||"vi-VN",M=e=>{const{env:{isMarryBaby:t}}=exports.GlobalData;return`https://${t?C[e]:N[e]}`},U=e=>{const t=e.indexOf("?");return t>=0?e.slice(0,t+1)+e.slice(t+1).replace(/[^=&]+=(&|$)/g,"").replace(/&$/,""):e},k=(e,t,o,r)=>{let a="";o&&(a=Object.keys(o).map((e=>e+"="+o[e])).join("&"));const{togetherBaseApiUrl:i=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};let l=n.default(e,Object.assign(Object.assign({},(null==t?void 0:t._locale)?{website_url:M(String(t._locale))}:{}),t));l+=`${l.includes("?")?"&":"?"}${a}`;return(r||i)+"api/v1/"+U(l)},B=e=>((null==e?void 0:e.data)&&(e.data instanceof FormData?e.body=e.data:"object"==typeof e.data&&(e.body=JSON.stringify(e.data)),delete e.data),e),H=(t,o,r,a=!1)=>e.__awaiter(void 0,void 0,void 0,(function*(){var e,i,l,s;try{const e=yield fetch(a?t:(s=t,encodeURI(s).replace(/%5B/g,"[").replace(/%5D/g,"]")),Object.assign(Object.assign({method:o},B(r)),{headers:Object.assign({},null==r?void 0:r.headers)})).then((e=>e.json()));if(e)return e}catch(o){return console.log(o),console.log({url:t,status:null===(e=null==o?void 0:o.response)||void 0===e?void 0:e.status,statusText:null===(i=null==o?void 0:o.response)||void 0===i?void 0:i.statusText}),(null===(l=null==o?void 0:o.response)||void 0===l?void 0:l.data)||null}return null})),F=(o,r,a,i)=>e.__awaiter(void 0,void 0,void 0,(function*(){try{const e=b.parse(i||""),l=e[R]||t.getCookie(R);if(l&&l.length){const e=yield fetch(o,Object.assign(Object.assign({method:r},B(a)),{headers:Object.assign({Authorization:"Bearer "+l},null==a?void 0:a.headers)})).then((e=>e.json()));if(e)return e}}catch(e){return null}return null}));function j(e,t,o){const r=new RegExp("([?&])"+t+"=.*?(&|$)","i"),a=-1!==e.indexOf("?")?"&":"?";return e.match(r)?e.replace(r,"$1"+t+"="+o+"$2"):e+a+t+"="+o}const K=(e,t,o,r)=>o&&t?`${o}-${t}`:`${s.default(e||"",{lower:!0,locale:r||x})}-${t}`;exports.ADMIN_PATHS={SEARCH_USER:"admin/profile/search?website_url={website_url}&name={name}",COMMENT:{IMAGE_UPLOAD:"admin/comment/image/upload?website_url={website_url}"}},exports.BEARER_TOKEN_COOKIE=R,exports.CARE_PATHS={GET_DOCTOR_INFO:"api/doctors/{doctorId}?site={website_url}",GET_HOSPITAL_INFO:"api/hospital/branch/{hospital_branch_id}?site={website_url}"},exports.DEFAULT_AVATAR_IMG=v,exports.DEFAULT_IMG=I,exports.DISCOVER_PATHS={BASE_API_PATH:"/",GET_SEARCH_ARTICLES:"search?s={keyword}&page={page}",GET_ALL_CATEGORIES:"categories?type=all",GET_HOMEPAGE_POSTS:"home/trending-post?type={type}",GET_HOMEPAGE_LATEST_POSTS:"articles?page=1&_islatest=1",GET_ARTICLE_DETAIL:"article/{slug}?skip_ids={skipIds}&_isrelated={isRelated}",GET_CATEGORY_DETAIL:"category/{slug}",GET_CATEGORY_OR_ARTICLE_DETAIL:"fetch/{fullSlug}",GET_PREVIEW_ARTICLE:"fetch/{fullSlug}?preview_nonce={nonce}&preview=true",GET_ARTICLE_OF_CATEGORY:"articles?category_id={categoryId}&page={currentPage}",GET_PAGE_STATIC:"page/{slug}",GET_ALL_HEALTH_TOOLS:"healthtools",GET_ALL_MARRYBABY_HEALTH_TOOLS:"health-tools",GET_HEALTH_TOOLS_BY_CATEGORY:"healthtools?_hasgroup=1",GET_AUTHOR:"author/{slug}",GET_ALL_EXPERTS:"experts",GET_ALL_EXPERTS_PAGING:"experts?page={page}",GET_EXPERT:"expert/{slug}",GET_EXPERT_POST:"expert/article?page={page}",POST_ARTICLE_FEEDBACK:"article/feedback/{id}",GET_AZ_DRUGS:"category/a-z/{category}",GET_HOMEPAGE_MEDICAL_REVIEWED:"home/medical-reviewed",GET_ARTICLES_BY_IDS:"articles?ids={ids}",GET_ARTICLE_OF_CATEGORY_NO_EXPLAINERS:"articles?category_id={categoryId}&page={currentPage}&skip_ids={ids}",GET_EXPERT_OF_CATEGORY:"category/expert/?id={id}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info",GET_DUE_DATE_ALL_WEEKS:"health-tools/due-date-calculator/all",GET_DUE_DATE_SUGGESTED_ARTICLES:"health-tools/due-date-calculator/result?from_week={from}&to_week={to}",GET_PROFILE:"user/profile",GET_ADMIN_PROFILE:"GET_ADMIN_PROFILE",GET_FEATURE:"feature",POST_NEW_FEATURE:"feature/update",CREATE_BOOKMARK:"bookmark/create",DELETE_BOOKMARK:"bookmark/delete",DELETE_ALL_BOOKMARK:"bookmark/delete-all",GET_ALL_BOOKMARK:"bookmark",SSO_USER_PROFILE:"user",SSO_USER_BOOKMARKS:"user/bookmarks",SSO_USER_PASSWORD:"user/settings/password",SSO_USER_EMAIL:"user/settings/update-email",SSO_CLOSE_ACCOUNT:"user/settings/close-account",SSO_HELP:"user/settings/help",GET_HEALTH_TOOL_OVULATION_INFO:"health-tools/ovulation-calculator/info",GET_HEALTH_TOOL_OVULATION_SUGGESTED_ARTICLES:"health-tools/ovulation-calculator/result?method={method}",GET_HEALTH_TOOL_BMI_INFO:"health-tools/bmi-calculator/info",GET_HEALTH_TOOL_BMI_RESULT:"health-tools/bmi-calculator/result?gender={gender}&bmi={bmi}&age={age}",GET_HEALTH_TOOL_BMR_INFO:"health-tools/bmr-calculator/info",GET_HEALTH_TOOL_BMR_RESULT:"health-tools/bmr-calculator/result?kcals={kcals}&gender={gender}&age={age}",GET_HEALTH_TOOL_PWG_INFO:"health-tools/preweight-gain-calculator/info",GET_HEALTH_TOOL_THR_INFO:"health-tools/target-heart-rate/info",GET_HEALTH_TOOL_BABY_GROWTH_INFO:"health-tools/baby-growth-tracking/info",POST_UPDATE_LOCATION:"tracking/geo/",GET_SIDIS_DUE_DATE:"frontend/tools/due_date",GET_SIDIS_OVULATION:"frontend/tools/ovulation",GET_SIDIS_BMI:"frontend/tools/bmi",GET_SIDIS_BMR:"frontend/tools/bmr",POST_LOGOUT:"user/logout",OVULATION_CREATE_EVENT:"ovulation/event?method={method}&day={day}&cycle={cycle}&period={period}&token={token}&user_id={user_id}",GET_ALL_SPOTLIGHT:"spotlights?per_page={perPage}&order_by={orderBy}",SSO_UPDATE_FIRST_TIME_BOOKMARK:"bookmark/update-first-time",POST_COMMENT_NOTIFICATION:"comment/notification",GET_ABOUT_US_DATA:"about",POST_LEAD_IMPRESSION:"campaign/{campaignCode}/impression",POST_LEAD_POPUP_EXIT:"campaign/{campaignCode}/popup_exit",POST_LEAD_LEAD:"campaign/{campaignCode}/lead",POST_SSO_VERIFY_TOKEN:"verify-id-token",GET_LANDING_PAGE_FIRST_NODE:"landing_page/bot",GET_LANDING_PAGE_NEXT_NODE:"landing_page/messages",POST_LANDING_PAGE_IMPRESSION:"landing_page/impressions",POST_LANDING_PAGE_CLICK:"landing_page/clicks",FETCH_URL_DATA:"preview",GET_SPOTLIGHT_LANDING:"spotlight/{slug}",GET_FOOTER_INFO:"footer",CHECK_SSO_EMAIL:"member/check-email",GET_HOMEPAGE_SITEWIDE_BANNER:"home/sitewide-banner",GET_DYNAMIC_FOOTER:"menu/footer",GET_EXPERTS:"experts?page={page}&number={perPage}&s={search}",GET_EXPERT_BY_ID:"expert/{id}"},exports.DUE_DATE_FORMAT=g,exports.DefaultComponentGlobalContextData=O,exports.HEALTH_TOOL_TYPE=L,exports.LEAD_TOKEN_COOKIE=y,exports.MAX_IMAGE_UPLOADS=20,exports.PATHS=A,exports.REPORT_REASON_MAP=D,exports.TogetherComponentGlobalContext=h,exports.TogetherComponentGlobalContextProvider=({locale:e="vi-VN",children:t,userInfo:o,router:r,env:i={isMarryBaby:!1,togetherBasePath:"/community"},sanitizeFunction:l=(e=>e),pushNotifications:s=(()=>!1),formatMessage:n})=>{const[u,c]=a.useState();return exports.GlobalData={userInfo:o,locale:e,togetherUserId:u,router:r,env:i},a.useEffect((()=>{(null==o?void 0:o.id)&&F(k(A.PROFILE,{_locale:e}),"GET").then((e=>{var t;c(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)}))}),[null==o?void 0:o.id]),_.default.createElement(h.Provider,{value:{data:{userInfo:o,locale:e,togetherUserId:u,router:r,env:i},action:{pushNotifications:s,sanitizeFunction:l},formatMessage:n}},t)},exports.Z_INDEX=f,exports.callApi=H,exports.callApiWithAdminAuth=(o,r,a,i)=>e.__awaiter(void 0,void 0,void 0,(function*(){try{const e=b.parse(i||""),l=e[w]||t.getCookie(w);if(l&&l.length){const e=yield fetch(o,Object.assign(Object.assign({method:r},B(a)),{headers:Object.assign({Authorization:"Bearer "+l},null==a?void 0:a.headers)})).then((e=>e.json()));if(e)return e}}catch(e){return null}return null})),exports.callApiWithAuth=F,exports.callApiWithOptionalAuth=(o,r="GET",a,i)=>e.__awaiter(void 0,void 0,void 0,(function*(){var e,l,s,n,_,u;try{const n="string"==typeof o?o:o.url,_="string"==typeof o?o:o.backupUrl,u=b.parse(i||""),c=u[R]||t.getCookie(R);if(!c||!c.length)return H(_||n,r,a);try{const t=yield fetch(n,Object.assign(Object.assign({method:r},B(a)),{headers:Object.assign({Authorization:"Bearer "+c},null==a?void 0:a.headers)})).then((e=>e.json()));if(null===(e=null==t?void 0:t.messages)||void 0===e?void 0:e.find((e=>"Unauthenticated"===(null==e?void 0:e.toLowerCase()))))return H(_||n,r,a);if(t)return t}catch(e){return console.log({status:null===(l=null==e?void 0:e.response)||void 0===l?void 0:l.status,statusText:null===(s=null==e?void 0:e.response)||void 0===s?void 0:s.statusText}),H(_||n,r,a)}}catch(e){return console.log({status:null===(n=null==e?void 0:e.response)||void 0===n?void 0:n.status,statusText:null===(_=null==e?void 0:e.response)||void 0===_?void 0:_.statusText}),(null===(u=null==e?void 0:e.response)||void 0===u?void 0:u.data)||null}return null})),exports.constants=G,exports.cookie=b,exports.domainLocales=N,exports.domainLocalesMarryBaby=C,exports.getApiPath=k,exports.getCareDoctorUrl=({name:e,id:t,locale:o})=>{var r;return`/care/${null===(r=P[o||"vi-VN"])||void 0===r?void 0:r.DOCTOR}/${K(e,t)}`},exports.getCareHospitalUrl=({name:e,id:t,slug:o,locale:r})=>{var a;return`/care/${null===(a=P[r||"vi-VN"])||void 0===a?void 0:a.HOSPITAL}/${K(e,t,o)}`},exports.getCarePath=(e,t)=>{const{careBaseApiUrl:o=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};return(o||"https://service-health-care.hellohealthgroup.com/")+U(n.default(e,Object.assign({},t)))},exports.getCurrentBaseUrl=e=>{const{env:{isMarryBaby:t}}=exports.GlobalData;if("undefined"!=typeof window)return window.location.origin;const o="staging"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return"development"===process.env.NEXT_PUBLIC_DEPLOY_ENV?"http://localhost:3000":`https://${o?t?"fe.":"discover.":t?"www.":""}${N[e]}`},exports.getDiscoverApiPath=(e,t,o)=>{const{discoverBaseApiUrl:r="",discoverBaseProdApiUrl:a=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};return(!i.isProduction&&o?a:r)+"wp-json/api/"+U(n.default(e,Object.assign({},t)))},exports.getMarryBabyApiPath=(e,t,o)=>{const{marryBabyApiUrl:r="",marryBabyProdApiUrl:a=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};return(o&&!i.isProduction?a:r)+"wp-json/api/"+U(n.default(e,Object.assign({},t)))},exports.getPremiumApiPath=(e,t)=>{const{premiumBaseApiUrl:o=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};return(o||"https://premium-content-stag.hellohealthgroup.com/")+U(n.default(e,Object.assign({},t)))},exports.getSsoApiPath=(e,t)=>{const{publicSSO:o=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};return(o||"https://staging-id.hellobacsi.com/")+"api/"+U(n.default(e,Object.assign({},t)))},exports.getUrlToSignUp=(e,t,o="/community")=>{const r=e||("undefined"!=typeof window?window.location.href:"/");let a="undefined"!=typeof window?window.location.origin:"";a||e&&(e.startsWith("http://")||e.startsWith("https://"))&&(a=e.split("/").slice(0,3).join("/"));return((e,t)=>{const{publicSSO:o}=exports.GlobalData.env,r=e||window.location.href;return t&&Object.keys(t).map((e=>{j(r,e,t[e])})),j(r,"source","communities"),o?`${o}?returnUrl=${encodeURIComponent(r.toString())}`:r})(`${a}${o}/on-boarding?return=${encodeURIComponent(r)}`,t)},exports.getWebsiteUrlApi=M,exports.locale=x;
@@ -1 +1 @@
1
- "use strict";var i=require("./Subot-143686ec.js");const a={[i.LOCALE.Vietnam]:"VN",[i.LOCALE.Cambodia]:"KH",[i.LOCALE.Indonesia]:"ID",[i.LOCALE.Malaysia]:"MY",[i.LOCALE.PhilippinesEnglish]:"PH",[i.LOCALE.PhilippinesTagalog]:"PH",[i.LOCALE.Taiwan]:"TW",[i.LOCALE.Thailand]:"TH",[i.LOCALE.Myanmar]:"MM"};exports.MAPPED_LOCALE=a,exports.hiddenEmailChar=(i="")=>{const a=i.indexOf("@"),e=i.substring(0,a),L=e.length>3?3:e.length;return i.replace(i.substring(L,a),i.slice(L,a).replace(/./g,"x"))};
1
+ "use strict";var i=require("./Subot-e6872850.js");const a={[i.LOCALE.Vietnam]:"VN",[i.LOCALE.Cambodia]:"KH",[i.LOCALE.Indonesia]:"ID",[i.LOCALE.Malaysia]:"MY",[i.LOCALE.PhilippinesEnglish]:"PH",[i.LOCALE.PhilippinesTagalog]:"PH",[i.LOCALE.Taiwan]:"TW",[i.LOCALE.Thailand]:"TH",[i.LOCALE.Myanmar]:"MM"};exports.MAPPED_LOCALE=a,exports.hiddenEmailChar=(i="")=>{const a=i.indexOf("@"),e=i.substring(0,a),L=e.length>3?3:e.length;return i.replace(i.substring(L,a),i.slice(L,a).replace(/./g,"x"))};
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./tslib.es6-77ffe29f.js"),t=require("react"),a=require("@mantine/core"),l=require("./index-44cde1cb.js");require("@mantine/dates"),require("./index-78f49c14.js");var n=require("./Subot-143686ec.js");require("./index-936719bb.js");var r=require("./Plus-604516f4.js"),i=require("./theme-642223e9.js"),o=require("./useTranslations-ea594f2b.js"),c=require("@mantine/hooks"),s=require("styled-components"),d=require("./utils-460cc1b1.js"),u=require("./index-6479f2e3.js");require("./translationsContext-7536ee11.js"),require("string-format");var m=require("./index.styles-75680e35.js");require("./constants-bb162521.js"),require("./utils-daaf711a.js");var C=require("./index-3d997052.js");require("./index.styled-a5d71af4.js"),require("./index-b3d93572.js"),require("./utils-fd656785.js");var f=require("./index-02d3d16c.js"),p=require("@mantine/form"),g=require("dayjs"),h=require("dayjs/plugin/customParseFormat"),b=require("./index-83c139a1.js");function E(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("./WhatsApp-f1d6b14e.js"),require("@mantine/carousel"),require("classnames"),require("date-fns/locale"),require("./isProduction-c131ac6d.js"),require("./animation-20581243.js"),require("react-keyed-flatten-children"),require("./cookieHelper-373906e4.js"),require("slugify");var x=E(t),v=E(s),y=E(g),T=E(h);const w=v.default.div`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./tslib.es6-f581f504.js"),t=require("react"),a=require("@mantine/core"),l=require("./index-1abb8f88.js");require("@mantine/dates"),require("./index-4c97e71b.js");var n=require("./Subot-e6872850.js");require("./index-a607ab1d.js");var r=require("./Plus-ae3f1f1c.js"),i=require("./theme-1e27b9db.js"),o=require("./useTranslations-048502c3.js"),c=require("@mantine/hooks"),s=require("styled-components"),d=require("./utils-97861e62.js"),u=require("./index-0a1cca85.js");require("./translationsContext-c8376758.js"),require("string-format");var m=require("./index.styles-db50e54a.js");require("./constants-d09c9d40.js"),require("./utils-18176c91.js");var C=require("./index-bf4de588.js");require("./index.styled-54e422d1.js"),require("./index-aa048810.js"),require("./utils-3423e2dc.js");var f=require("./index-dc6d1d9a.js"),p=require("@mantine/form"),g=require("dayjs"),h=require("dayjs/plugin/customParseFormat"),b=require("./index-bc58ea87.js");function E(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("./WhatsApp-9c647c87.js"),require("@mantine/carousel"),require("classnames"),require("date-fns/locale"),require("./isProduction-fce4c411.js"),require("./animation-f9bf49c2.js"),require("react-keyed-flatten-children"),require("./cookieHelper-ef7d953a.js"),require("slugify");var x=E(t),v=E(s),y=E(g),T=E(h);const w=v.default.div`
2
2
  position: relative;
3
3
  padding: 16px;
4
4
  min-height: 110px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hhgtech/hhg-components",
3
- "version": "1.28.62",
3
+ "version": "1.28.63",
4
4
  "main": "build/index.js",
5
5
  "module": "build/esm/index.js",
6
6
  "files": [
@@ -1 +0,0 @@
1
- import{a as t}from"./tslib.es6-d2e63c2c.js";import{n as o}from"./normalizeLink-749bc2d3.js";import{c as i}from"./routing-f0695fda.js";import{g as l}from"./core-7b295697.js";const n=(t,o)=>{var i,l;if(!t)return{};const n="tl-PH"===o?"/fil":"";return{id:t.id,isSubot:t.is_subot,template:t.template,icon:t.icon,link:(null===(i=t.link)||void 0===i?void 0:i.startsWith("http"))?t.link:`${n}/health-tools`+(null===(l=t.link)||void 0===l?void 0:l.replace(`${n}/`,"/")),subtitle:t.subtitle,title:t.title}},e=l=>t(void 0,void 0,void 0,(function*(){var t,e;try{const s="tl-PH"===l?"lang=fil":"";let a=[];try{const r=yield fetch(o(`${i(l)}/wp-json/api/healthtools?ismenu=0${s?"&"+s:""}`)).then((t=>t.json()));a=(null===(e=null===(t=null==r?void 0:r.data)||void 0===t?void 0:t.map)||void 0===e?void 0:e.call(t,(t=>n(t,l))))||[]}catch(t){}return a}catch(t){console.error(t)}})),s=o=>t(void 0,void 0,void 0,(function*(){return(yield l("all-health-tools",(()=>e(o||"en-PH")),(t=>!!(null==t?void 0:t.length)),6e4))||[]}));export{s as a,n as f,e as g};
@@ -1 +0,0 @@
1
- import{_ as e}from"./tslib.es6-d2e63c2c.js";import t,{useState as n,useEffect as o}from"react";import{useDebouncedValue as a}from"@mantine/hooks";import{D as i,h as s,B as r,i as l}from"./index-91a6562c.js";const c=c=>{var{color:m,withControl:h,onChange:d,value:u,min:g,max:k,isStatic:p,containerClassName:v,containerStyle:C}=c,x=e(c,["color","withControl","onChange","value","min","max","isStatic","containerClassName","containerStyle"]);const[E,w]=n(u||g||0),[b]=a(E,i);return o((()=>{null==d||d(b)}),[b]),o((()=>{w(u)}),[u]),t.createElement(s,{className:v,style:C},h&&t.createElement(r,{type:"button",size:"sm",color:"ghost",onClick:()=>{w((e=>g&&e===g?e:e-1))}},t.createElement("svg",{width:"10",height:"10",fill:"none",viewBox:"0 0 12 3"},t.createElement("path",{d:"M1 1.004h8",stroke:m,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))),t.createElement(l,Object.assign({thumbSize:21,labelAlwaysOn:!0,radius:"xl",color:m,value:E,onChange:p?()=>null:w,min:g,max:k},x,{className:"hhg-mantine-slider "+(x.className||"")})),h&&t.createElement(r,{type:"button",size:"sm",variant:"ghost",onClick:()=>{w((e=>k&&e===k?e:e+1))}},t.createElement("svg",{width:"16",height:"20",fill:"none",viewBox:"0 0 16 16"},t.createElement("path",{d:"M8 4v8M4 8h8",stroke:m,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))))};export{c as S};
@@ -1 +0,0 @@
1
- import o,{useState as a,useEffect as e,useMemo as t,useCallback as l}from"react";import{v as i,w as d}from"./index.styles-9931a6ae.js";import{_ as s,a as n}from"./tslib.es6-d2e63c2c.js";import{u as r}from"./useTranslations-d3fe4d57.js";import{B as c}from"./index-91a6562c.js";import{P as v}from"./paths-fc50949c.js";import{a as u}from"./constants-901cc927.js";import{d as m}from"./index-b9ec0fe0.js";import{b as p,h as g}from"./utils-5c800314.js";import{i as y}from"./isProduction-cddd37e8.js";const b=({type:a="solid",className:e,style:t})=>o.createElement(i,{style:t,className:e,"data-diver-type":a,dividerType:a}),E={admin:"cardAuthor.admin",moderator:"cardAuthor.moderator",ambassador:"cardAuthor.ambassador",expert:"cardAuthor.expert",sponsor:"cardAuthor.sponsor",guide:"cardAuthor.guide",influencer:"cardAuthor.influencer"},f=a=>{var{siteType:e,role:t,title:l,styles:i,className:n}=a,c=s(a,["siteType","role","title","styles","className"]);const{t:v}=r(),u=t?(o=>["admin","moderator","ambassador","expert","sponsor","guide","influencer"].find((a=>a===o)))(t):"",{classes:m,cx:p}=d(void 0,{name:"AuthorBadge",styles:i});return u&&E[u]?o.createElement("div",Object.assign({className:p(m.root,n),"data-label-type":u,"data-is-marrybaby":"marryBaby"===e},c),l||v(E[u])):null};var h="Dudns9-";const A=({value:t,choices:l,onChange:i})=>{const[d,s]=a(t);return e((()=>{s(t)}),[t]),o.createElement("div",{className:h},l.map(((a,e)=>o.createElement(c,{dataEventCategory:a.dataEventCategory,dataEventAction:a.dataEventAction,dataEventLabel:a.dataEventLabel,size:"sm",variant:a.value===d?"primary":"tertiary",key:e,onClick:()=>{s(a.value),null==i||i(a.value)}},a.label||""))))},T=e=>{var{label:i,bookingId:d,bookingType:b="doctor",locale:E="vi-VN"}=e,f=s(e,["label","bookingId","bookingType","locale"]);const{t:h}=r(),[A,T]=a(!1),_=t((()=>"undefined"!=typeof window?window.location.href:""),[]),C=l((()=>n(void 0,void 0,void 0,(function*(){var o,a,e,t,l,i,s,n,r,c,f,h,A,_,C;const j="doctor"===b?v.GET_DOCTOR_DETAIL:"hospital"===b?v.GET_HOSPITAL_DETAIL:"service"===b?v.GET_SERVICE_DETAIL:"";try{T(!0);const v=yield p(g(j,{id:d,site:m[E]}),"get");if(1===(null==v?void 0:v._status)){const d="doctor"===b?{id:null===(a=null===(o=null==v?void 0:v._data)||void 0===o?void 0:o.doctor)||void 0===a?void 0:a.id,slug:null===(t=null===(e=null==v?void 0:v._data)||void 0===e?void 0:e.doctor)||void 0===t?void 0:t.slug,localSlug:null===(l=u[E])||void 0===l?void 0:l.DOCTOR}:"hospital"===b?{id:null===(s=null===(i=null==v?void 0:v._data)||void 0===i?void 0:i.branch)||void 0===s?void 0:s.id,slug:null===(r=null===(n=null==v?void 0:v._data)||void 0===n?void 0:n.branch)||void 0===r?void 0:r.slug,localSlug:null===(c=u[E])||void 0===c?void 0:c.HOSPITAL}:{id:null===(h=null===(f=null==v?void 0:v._data)||void 0===f?void 0:f.service)||void 0===h?void 0:h.id,slug:null===(_=null===(A=null==v?void 0:v._data)||void 0===A?void 0:A.service)||void 0===_?void 0:_.slug,localSlug:null===(C=u[E])||void 0===C?void 0:C.SERVICE};window.location.href=`https://${y?"":"discover."}${m[E]}/care/${d.localSlug}/${d.slug}-${d.id}/`}else T(!1)}catch(o){console.log(o),T(!1)}}))),[]);return d&&b?o.createElement(c,Object.assign({dataEventCategory:"Care",dataEventAction:"Comment - Quick Booking",dataEventLabel:_,onClick:C,loading:A},f),i||h("careBooking.bookAnAppointment")):null};export{f as A,A as B,b as D,T as a};
@@ -1 +0,0 @@
1
- import{_ as t}from"./tslib.es6-d2e63c2c.js";import a from"react";import{B as o}from"./index-91a6562c.js";const d=d=>{var{size:e,color:i="primary",isDisabled:r,isBlock:c,title:n,onClick:l,icon:s,iconPosition:u="left",children:p,isLoading:P=!1,loadingText:g,dataEventCategory:v,dataEventAction:m,dataEventLabel:y,dataProductChannel:b,dataProductSku:C,dataProductBrand:h,dataProductName:k,dataProductPrice:E,dataProductCategory:f,dataProductPosition:B,type:x}=d,L=t(d,["size","color","isDisabled","isBlock","title","onClick","icon","iconPosition","children","isLoading","loadingText","dataEventCategory","dataEventAction","dataEventLabel","dataProductChannel","dataProductSku","dataProductBrand","dataProductName","dataProductPrice","dataProductCategory","dataProductPosition","type"]);const j={"data-event-category":v,"data-event-action":m,"data-event-label":y,"data-product-channel":b,"data-product-sku":C,"data-product-brand":h,"data-product-name":k,"data-product-price":E,"data-product-category":f,"data-product-position":B};return a.createElement(o,Object.assign({},j,{size:e,variant:"transparent"===i?"white":"danger"===i?"error":i,disabled:r,onClick:t=>{!P&&!r&&l&&l(t)},title:n,loading:P,type:x,leftIcon:"left"===u?s:void 0,rightIcon:"right"===u?s:void 0,w:c?"100%":void 0,p:c?"12px auto":void 0},L),P&&g||p)};export{d as B};
@@ -1 +0,0 @@
1
- import{a as e,_ as t}from"./tslib.es6-d2e63c2c.js";import s,{useReducer as a,useState as r,useEffect as i}from"react";import{Stack as n,Input as c}from"@mantine/core";import{d as o,S as d}from"./index-91a6562c.js";import"@mantine/dates";import{c as l}from"./index-b9ec0fe0.js";import{L as p}from"./Subot-7999ad6e.js";import"./index-4012f8e2.js";import"./Plus-de7131f8.js";import"./theme-75976adf.js";import{u as v}from"./useTranslations-d3fe4d57.js";import"@mantine/hooks";import"./utils-f9f05267.js";import{M as m}from"./utils-310ee32d.js";const u={provinceByName:{},provinces:[],districts:[],wards:[],selectedProvince:"",selectedDistrict:"",selectedWard:""},h=(e,t)=>{switch(t.type){case"SET_DATA":return Object.assign(Object.assign({},e),t.payload);case"SET_DISTRICTS":return Object.assign(Object.assign({},e),{districts:t.payload});case"SET_WARDS":return Object.assign(Object.assign({},e),{wards:t.payload});case"SELECT_PROVINCE":return Object.assign(Object.assign({},e),{selectedProvince:t.payload,selectedDistrict:"",selectedWard:""});case"SELECT_DISTRICT":return Object.assign(Object.assign({},e),{selectedDistrict:t.payload,selectedWard:""});case"SELECT_WARD":return Object.assign(Object.assign({},e),{selectedWard:t.payload});default:return e}},y=({provinces:t})=>{const[s,n]=a(h,u),{provinceByName:c,provinces:o,districts:d,wards:v,selectedProvince:y,selectedDistrict:b,selectedWard:E}=s,[g,j]=r();i((()=>{e(void 0,void 0,void 0,(function*(){var e,s,a,r;try{const i=yield fetch((r=process.env.UNIFY_LOCALE||p.Vietnam,`${l}/cities-data-${m[r]}.json`)).then((e=>e.json()));j(i);const{list:c}=i,o=t?((e,t)=>{const s={};for(const[,e]of Object.entries(t)){const{id:t}=e;t&&(s[t]=e)}const a={};return e.map((e=>{a[e.name]=s[e.id]})),a})(t,c):c,d=Object.keys(o),v=Object.keys((null===(e=c[d[0]])||void 0===e?void 0:e.list)||{}),u=Object.keys((null===(a=null===(s=c[d[0]])||void 0===s?void 0:s[v[0]])||void 0===a?void 0:a.list)||{});n({type:"SET_DATA",payload:{provinceByName:o,provinces:d,districts:v,wards:u}})}catch(e){console.error("Error fetching address data:",e)}}))}),[process.env.UNIFY_LOCALE]);return{provinces:o,districts:d,wards:v,selectedProvince:y,selectedDistrict:b,selectedWard:E,handleProvinceChange:e=>{var t;const s=Object.keys((null===(t=c[e])||void 0===t?void 0:t.list)||{});n({type:"SET_DISTRICTS",payload:s}),n({type:"SET_WARDS",payload:[]}),n({type:"SELECT_PROVINCE",payload:e})},handleDistrictChange:e=>{var t,s;const a=Object.keys((null===(s=null===(t=c[y])||void 0===t?void 0:t.list[e])||void 0===s?void 0:s.list)||{});n({type:"SET_WARDS",payload:a}),n({type:"SELECT_DISTRICT",payload:e})},handleWardChange:e=>{n({type:"SELECT_WARD",payload:e})}}},b=e=>{var{error:a,provinces:l,placeholder:p}=e,m=t(e,["error","provinces","placeholder"]);const{t:u}=v(),{provinces:h,districts:b,wards:E,selectedProvince:g,selectedDistrict:j,selectedWard:C,handleProvinceChange:S,handleDistrictChange:T,handleWardChange:O}=y({provinces:l}),[f,D]=r("");return i((()=>{g&&j&&C&&f?m.onChange({selectedProvince:g,selectedDistrict:j,selectedWard:C,extraInfo:f}):m.onChange(null)}),[g,j,C,f]),s.createElement(o.Wrapper,Object.assign({withAsterisk:!0},m),s.createElement(n,null,s.createElement(d,{placeholder:(null==p?void 0:p.province)||u("onboarding.similac.input.city"),data:l?h:h.sort(),searchable:!0,onChange:S,value:g}),s.createElement(d,{placeholder:(null==p?void 0:p.district)||u("onboarding.similac.input.district"),data:b.sort(),searchable:!0,onChange:T,value:j,disabled:!g}),s.createElement(d,{placeholder:(null==p?void 0:p.ward)||u("onboarding.similac.input.ward"),searchable:!0,data:E.sort(),value:C,onChange:O,disabled:!g||!j}),s.createElement(o,{placeholder:(null==p?void 0:p.address)||u("onboarding.similac.input.no"),disabled:!g||!j||!C,value:f,onChange:D,style:{marginBottom:0}})),s.createElement(c.Error,{size:"md"},a))};export{b as A};
@@ -1 +0,0 @@
1
- import{_ as t}from"./tslib.es6-d2e63c2c.js";import e from"react";import"./index-91a6562c.js";import"@mantine/core";import"@mantine/dates";import"./index-b9ec0fe0.js";import"./Subot-7999ad6e.js";import"./index-4012f8e2.js";import{T as i}from"./Plus-de7131f8.js";import"./theme-75976adf.js";import"./translationsContext-3fcad9db.js";import"string-format";import"@mantine/hooks";import"./utils-f9f05267.js";const r=r=>{var{size:o="base",type:s="regular"}=r,m=t(r,["size","type"]);return e.createElement(i,Object.assign({size:o,weight:"caption"===s?"bold":s},m))};export{r as T};
@@ -1 +0,0 @@
1
- import{_ as o}from"./tslib.es6-d2e63c2c.js";import t from"react";import{Indicator as e}from"@mantine/core";import{t as r}from"./theme-75976adf.js";const s=s=>{var{styles:i,color:n=r.colors.red700}=s,a=o(s,["styles","color"]);return t.createElement(e,Object.assign({inline:!0,position:"top-end",offset:4,styles:Object.assign({processing:{animationDirection:"alternate"}},i),color:n},a))};export{s as I};
@@ -1 +0,0 @@
1
- "use strict";var e=require("./tslib.es6-77ffe29f.js"),r=require("react");require("./index-44cde1cb.js"),require("@mantine/core"),require("@mantine/dates"),require("./index-78f49c14.js"),require("./Subot-143686ec.js"),require("./index-936719bb.js");var t=require("./Plus-604516f4.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("./theme-642223e9.js"),require("./translationsContext-7536ee11.js"),require("string-format"),require("@mantine/hooks"),require("./utils-460cc1b1.js");var s=i(r);exports.Text=r=>{var{size:i="base",type:u="regular"}=r,n=e.__rest(r,["size","type"]);return s.default.createElement(t.Text,Object.assign({size:i,weight:"caption"===u?"bold":u},n))};
@@ -1 +0,0 @@
1
- "use strict";var e=require("./tslib.es6-77ffe29f.js"),t=require("react"),s=require("@mantine/core"),r=require("./index-44cde1cb.js");require("@mantine/dates");var a=require("./index-78f49c14.js"),i=require("./Subot-143686ec.js");require("./index-936719bb.js"),require("./Plus-604516f4.js"),require("./theme-642223e9.js");var n=require("./useTranslations-ea594f2b.js");require("@mantine/hooks"),require("./utils-460cc1b1.js");var c=require("./utils-a2d1259c.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=d(t);const o={provinceByName:{},provinces:[],districts:[],wards:[],selectedProvince:"",selectedDistrict:"",selectedWard:""},u=(e,t)=>{switch(t.type){case"SET_DATA":return Object.assign(Object.assign({},e),t.payload);case"SET_DISTRICTS":return Object.assign(Object.assign({},e),{districts:t.payload});case"SET_WARDS":return Object.assign(Object.assign({},e),{wards:t.payload});case"SELECT_PROVINCE":return Object.assign(Object.assign({},e),{selectedProvince:t.payload,selectedDistrict:"",selectedWard:""});case"SELECT_DISTRICT":return Object.assign(Object.assign({},e),{selectedDistrict:t.payload,selectedWard:""});case"SELECT_WARD":return Object.assign(Object.assign({},e),{selectedWard:t.payload});default:return e}},p=({provinces:s})=>{const[r,n]=t.useReducer(u,o),{provinceByName:d,provinces:l,districts:p,wards:v,selectedProvince:E,selectedDistrict:b,selectedWard:h}=r,[y,j]=t.useState();t.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){var e,t,r,d;try{const l=yield fetch((d=process.env.UNIFY_LOCALE||i.LOCALE.Vietnam,`${a.CDN_ADDRESS}/cities-data-${c.MAPPED_LOCALE[d]}.json`)).then((e=>e.json()));j(l);const{list:o}=l,u=s?((e,t)=>{const s={};for(const[,e]of Object.entries(t)){const{id:t}=e;t&&(s[t]=e)}const r={};return e.map((e=>{r[e.name]=s[e.id]})),r})(s,o):o,p=Object.keys(u),v=Object.keys((null===(e=o[p[0]])||void 0===e?void 0:e.list)||{}),E=Object.keys((null===(r=null===(t=o[p[0]])||void 0===t?void 0:t[v[0]])||void 0===r?void 0:r.list)||{});n({type:"SET_DATA",payload:{provinceByName:u,provinces:p,districts:v,wards:E}})}catch(e){console.error("Error fetching address data:",e)}}))}),[process.env.UNIFY_LOCALE]);return{provinces:l,districts:p,wards:v,selectedProvince:E,selectedDistrict:b,selectedWard:h,handleProvinceChange:e=>{var t;const s=Object.keys((null===(t=d[e])||void 0===t?void 0:t.list)||{});n({type:"SET_DISTRICTS",payload:s}),n({type:"SET_WARDS",payload:[]}),n({type:"SELECT_PROVINCE",payload:e})},handleDistrictChange:e=>{var t,s;const r=Object.keys((null===(s=null===(t=d[E])||void 0===t?void 0:t.list[e])||void 0===s?void 0:s.list)||{});n({type:"SET_WARDS",payload:r}),n({type:"SELECT_DISTRICT",payload:e})},handleWardChange:e=>{n({type:"SELECT_WARD",payload:e})}}};exports.AddressInput=a=>{var{error:i,provinces:c,placeholder:d}=a,o=e.__rest(a,["error","provinces","placeholder"]);const{t:u}=n.useTranslations(),{provinces:v,districts:E,wards:b,selectedProvince:h,selectedDistrict:y,selectedWard:j,handleProvinceChange:g,handleDistrictChange:S,handleWardChange:C}=p({provinces:c}),[f,O]=t.useState("");return t.useEffect((()=>{h&&y&&j&&f?o.onChange({selectedProvince:h,selectedDistrict:y,selectedWard:j,extraInfo:f}):o.onChange(null)}),[h,y,j,f]),l.default.createElement(r.Input.Wrapper,Object.assign({withAsterisk:!0},o),l.default.createElement(s.Stack,null,l.default.createElement(r.Select,{placeholder:(null==d?void 0:d.province)||u("onboarding.similac.input.city"),data:c?v:v.sort(),searchable:!0,onChange:g,value:h}),l.default.createElement(r.Select,{placeholder:(null==d?void 0:d.district)||u("onboarding.similac.input.district"),data:E.sort(),searchable:!0,onChange:S,value:y,disabled:!h}),l.default.createElement(r.Select,{placeholder:(null==d?void 0:d.ward)||u("onboarding.similac.input.ward"),searchable:!0,data:b.sort(),value:j,onChange:C,disabled:!h||!y}),l.default.createElement(r.Input,{placeholder:(null==d?void 0:d.address)||u("onboarding.similac.input.no"),disabled:!h||!y||!j,value:f,onChange:O,style:{marginBottom:0}})),l.default.createElement(s.Input.Error,{size:"md"},i))};