@hhgtech/hhg-components 1.28.65 → 1.28.67

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 (461) hide show
  1. package/build/adapters.js +1 -1
  2. package/build/babyGrowth.js +24 -24
  3. package/build/cache.js +1 -1
  4. package/build/care.js +1 -1
  5. package/build/components/atoms/icons/index.d.ts +0 -58
  6. package/build/components.js +1 -1
  7. package/build/{constants-2a4ad19a.js → constants-00e06f68.js} +1 -1
  8. package/build/{constants-2af7a634.js → constants-51251306.js} +1 -1
  9. package/build/constants.js +1 -1
  10. package/build/{core-a23c80d2.js → core-ba3af3e2.js} +1 -1
  11. package/build/{dataTransform-2ab3c90d.js → dataTransform-1805eae3.js} +1 -1
  12. package/build/ecom.js +1 -1
  13. package/build/esm/adapters.js +1 -1
  14. package/build/esm/babyGrowth.js +24 -24
  15. package/build/esm/cache.js +1 -1
  16. package/build/esm/care.js +1 -1
  17. package/build/esm/components/atoms/icons/index.d.ts +0 -58
  18. package/build/esm/components.js +1 -1
  19. package/build/esm/{constants-36c1648d.js → constants-6ecfa77c.js} +1 -1
  20. package/build/esm/{constants-ed8abdff.js → constants-f7c80032.js} +1 -1
  21. package/build/esm/constants.js +1 -1
  22. package/build/esm/{core-cdfc811a.js → core-80112758.js} +1 -1
  23. package/build/esm/{dataTransform-10fecdbe.js → dataTransform-0fa341bb.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-a4c9d6dd.js +1 -0
  28. package/build/esm/{getSocialList-558fc075.js → getSocialList-4e48deba.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-13dc1f44.js +1 -0
  33. package/build/esm/{index-0d9821e3.js → index-13e62563.js} +2 -2
  34. package/build/esm/index-24557f2b.js +1 -0
  35. package/build/esm/{index-7e4d8533.js → index-252cb964.js} +1 -1
  36. package/build/esm/{index-01efa9be.js → index-2e99f941.js} +1 -1
  37. package/build/esm/{index-18ff3f75.js → index-3452fed2.js} +1 -1
  38. package/build/esm/index-3aff939b.js +1 -0
  39. package/build/esm/index-459e0362.js +1 -0
  40. package/build/esm/index-45dcd965.js +1 -0
  41. package/build/esm/{index-8f4b4a7f.js → index-486b71cd.js} +1 -1
  42. package/build/esm/{index-8c1e2ce6.js → index-5408f5a4.js} +15 -15
  43. package/build/esm/{index-c6fcc250.js → index-5e1af23a.js} +1 -1
  44. package/build/esm/{index-5f52d2b1.js → index-79ef3a30.js} +1 -1
  45. package/build/esm/{index-89127303.js → index-7c77273a.js} +1 -1
  46. package/build/esm/{index-557e3a42.js → index-823fd7c0.js} +1 -1
  47. package/build/esm/{index-16d9b234.js → index-93e5b4f3.js} +1 -1
  48. package/build/esm/{index-5ef00905.js → index-9c7b9011.js} +133 -133
  49. package/build/esm/{index-05214244.js → index-9e5956c2.js} +1 -1
  50. package/build/esm/{index-c2e4449d.js → index-a83aad1c.js} +13 -13
  51. package/build/esm/index-b7cc3ca2.js +1 -0
  52. package/build/esm/{index-661f66bf.js → index-bf11f9e9.js} +1 -1
  53. package/build/esm/index-ce3d38fd.js +1 -0
  54. package/build/esm/index-d27a0e25.js +1 -0
  55. package/build/esm/index-f9514788.js +177 -0
  56. package/build/esm/{index-f03e0f09.js → index-fd04ccb7.js} +89 -89
  57. package/build/esm/index.js +1 -1
  58. package/build/esm/{index.styled-c2100f19.js → index.styled-14b65c9e.js} +3 -3
  59. package/build/esm/{index.styles-d3334c25.js → index.styles-94af560f.js} +1 -1
  60. package/build/esm/lead.js +1 -1
  61. package/build/esm/mantine.js +1 -1
  62. package/build/esm/misc.js +1 -1
  63. package/build/esm/navigation.js +1 -1
  64. package/build/esm/onboardingV2.js +9 -9
  65. package/build/esm/pwg.js +3 -3
  66. package/build/esm/{routing-a6c8f9f9.js → routing-2b284b30.js} +1 -1
  67. package/build/esm/subot.js +4 -4
  68. package/build/esm/together.js +1 -1
  69. package/build/esm/types-6d397125.js +3004 -0
  70. package/build/esm/{types-202e947a.js → types-850814a7.js} +34 -34
  71. package/build/esm/types.js +1 -1
  72. package/build/esm/{useCategory-3045fde3.js → useCategory-f5f74749.js} +1 -1
  73. package/build/esm/useHealthToolCache-f1488032.js +1 -0
  74. package/build/esm/usePlacesAutocomplete-0733ec49.js +1 -0
  75. package/build/esm/useTranslations-df1b3bb8.js +1 -0
  76. package/build/esm/{utils-508d45bb.js → utils-3d2e3f0f.js} +1 -1
  77. package/build/esm/utils-970ce0c0.js +8 -0
  78. package/build/esm/{utils-c6a7729e.js → utils-b87ec473.js} +1 -1
  79. package/build/esm/vaccination.js +7 -7
  80. package/build/footer.js +1 -1
  81. package/build/gAssets.js +1 -1
  82. package/build/{getDynamicHealthTool-ba27b7ff.js → getDynamicHealthTool-31f44ca1.js} +1 -1
  83. package/build/{getSocialList-50dc70b7.js → getSocialList-29c0a6e8.js} +1 -1
  84. package/build/hooks.js +1 -1
  85. package/build/i18n.js +1 -1
  86. package/build/i18nV2.js +1 -1
  87. package/build/index-1714c81c.js +2748 -0
  88. package/build/{index-7b33ac50.js → index-238813a4.js} +1 -1
  89. package/build/{index-e1263b2f.js → index-2438163d.js} +68 -68
  90. package/build/{index-1305e723.js → index-29d302f4.js} +1 -1
  91. package/build/{index-166c60e5.js → index-3184ae4e.js} +1 -1
  92. package/build/{index-76d08581.js → index-35192783.js} +1 -1
  93. package/build/{index-d5e1c0b8.js → index-41d684a8.js} +1 -1
  94. package/build/{index-9770314e.js → index-4a8c8ce6.js} +1 -1
  95. package/build/index-64d2f812.js +1 -0
  96. package/build/index-85c621a2.js +113 -0
  97. package/build/{index-a35a2780.js → index-90f4bc02.js} +1 -1
  98. package/build/{index-0553b781.js → index-9a845847.js} +1 -1
  99. package/build/index-9ed509d1.js +1 -0
  100. package/build/{index-7ad5f191.js → index-aa495d24.js} +1 -1
  101. package/build/{index-499c23d5.js → index-ad5cf64d.js} +1 -1
  102. package/build/{index-6bff2cc3.js → index-b21a1d96.js} +1 -1
  103. package/build/index-b320255d.js +1 -0
  104. package/build/index-b9af15da.js +1 -0
  105. package/build/{index-856f5069.js → index-bd4b31bf.js} +1 -1
  106. package/build/{index-b21da1ea.js → index-bf81cb71.js} +1 -1
  107. package/build/index-c3cbb8f3.js +1 -0
  108. package/build/index-d25afe2f.js +1 -0
  109. package/build/index-e7c1ff53.js +177 -0
  110. package/build/index-f6217f73.js +1 -0
  111. package/build/{index-25e39319.js → index-f7088d57.js} +1 -1
  112. package/build/index.js +1 -1
  113. package/build/{index.styled-b45c0dd2.js → index.styled-0a1fb891.js} +1 -1
  114. package/build/{index.styles-ce777fa6.js → index.styles-2ecb9c85.js} +4 -4
  115. package/build/lead.js +1 -1
  116. package/build/mantine.js +1 -1
  117. package/build/misc.js +1 -1
  118. package/build/navigation.js +1 -1
  119. package/build/onboardingV2.js +1 -1
  120. package/build/pwg.js +3 -3
  121. package/build/{routing-d3de5002.js → routing-f2edd0d0.js} +1 -1
  122. package/build/subot.js +4 -4
  123. package/build/together.js +1 -1
  124. package/build/{types-61b2a9ef.js → types-49f0543a.js} +2 -2
  125. package/build/{types-d8cdfbc7.js → types-bfd12e24.js} +202 -202
  126. package/build/types.js +1 -1
  127. package/build/{useCategory-7bd8370b.js → useCategory-94d60dab.js} +1 -1
  128. package/build/{useHealthToolCache-79d56870.js → useHealthToolCache-7307d240.js} +1 -1
  129. package/build/{usePlacesAutocomplete-c4bd074d.js → usePlacesAutocomplete-6ab0181b.js} +1 -1
  130. package/build/{useTranslations-e2b22984.js → useTranslations-233c68bc.js} +1 -1
  131. package/build/utils-13ea4f2f.js +8 -0
  132. package/build/{utils-c3b0bf92.js → utils-bee8be92.js} +2 -2
  133. package/build/{utils-7a63c632.js → utils-d5766c73.js} +1 -1
  134. package/build/vaccination.js +5 -5
  135. package/package.json +4 -2
  136. package/build/Plus-1389822c.js +0 -1
  137. package/build/WhatsApp-b1f3496a.js +0 -1
  138. package/build/components/atoms/icons/ACharacter.d.ts +0 -4
  139. package/build/components/atoms/icons/Activities.d.ts +0 -4
  140. package/build/components/atoms/icons/ArrowDown.d.ts +0 -4
  141. package/build/components/atoms/icons/ArrowLeft.d.ts +0 -4
  142. package/build/components/atoms/icons/ArrowRight.d.ts +0 -4
  143. package/build/components/atoms/icons/Article.d.ts +0 -4
  144. package/build/components/atoms/icons/Ask.d.ts +0 -4
  145. package/build/components/atoms/icons/BabyBoyMB.d.ts +0 -4
  146. package/build/components/atoms/icons/BabyGirlMB.d.ts +0 -4
  147. package/build/components/atoms/icons/BarChart.d.ts +0 -4
  148. package/build/components/atoms/icons/Booking.d.ts +0 -4
  149. package/build/components/atoms/icons/Bookmark.d.ts +0 -4
  150. package/build/components/atoms/icons/Boy.d.ts +0 -4
  151. package/build/components/atoms/icons/Business.d.ts +0 -4
  152. package/build/components/atoms/icons/Calendar.d.ts +0 -4
  153. package/build/components/atoms/icons/CalendarMB.d.ts +0 -4
  154. package/build/components/atoms/icons/CameraCircle.d.ts +0 -4
  155. package/build/components/atoms/icons/Chat.d.ts +0 -4
  156. package/build/components/atoms/icons/Check.d.ts +0 -4
  157. package/build/components/atoms/icons/CheckActiveMB.d.ts +0 -4
  158. package/build/components/atoms/icons/CircleBorder.d.ts +0 -4
  159. package/build/components/atoms/icons/Clickable.d.ts +0 -4
  160. package/build/components/atoms/icons/ClinicPin.d.ts +0 -4
  161. package/build/components/atoms/icons/Close.d.ts +0 -4
  162. package/build/components/atoms/icons/Comment.d.ts +0 -4
  163. package/build/components/atoms/icons/Community.d.ts +0 -4
  164. package/build/components/atoms/icons/CrossLogo.d.ts +0 -4
  165. package/build/components/atoms/icons/Current.d.ts +0 -4
  166. package/build/components/atoms/icons/EditSpecial.d.ts +0 -4
  167. package/build/components/atoms/icons/Endorse.d.ts +0 -4
  168. package/build/components/atoms/icons/Envelop.d.ts +0 -4
  169. package/build/components/atoms/icons/Family.d.ts +0 -4
  170. package/build/components/atoms/icons/Font.d.ts +0 -4
  171. package/build/components/atoms/icons/FullScreen.d.ts +0 -4
  172. package/build/components/atoms/icons/GenderBoy.d.ts +0 -4
  173. package/build/components/atoms/icons/GenderChooseBoy.d.ts +0 -4
  174. package/build/components/atoms/icons/GenderChooseGirl.d.ts +0 -4
  175. package/build/components/atoms/icons/GenderGirl.d.ts +0 -4
  176. package/build/components/atoms/icons/Girl.d.ts +0 -4
  177. package/build/components/atoms/icons/GroupPeople.d.ts +0 -4
  178. package/build/components/atoms/icons/GroupPeopleSolid.d.ts +0 -4
  179. package/build/components/atoms/icons/Heart.d.ts +0 -4
  180. package/build/components/atoms/icons/Home.d.ts +0 -4
  181. package/build/components/atoms/icons/Hospital.d.ts +0 -4
  182. package/build/components/atoms/icons/Info.d.ts +0 -4
  183. package/build/components/atoms/icons/Kebab.d.ts +0 -4
  184. package/build/components/atoms/icons/Like.d.ts +0 -4
  185. package/build/components/atoms/icons/Link.d.ts +0 -4
  186. package/build/components/atoms/icons/Minus.d.ts +0 -4
  187. package/build/components/atoms/icons/Missed.d.ts +0 -4
  188. package/build/components/atoms/icons/MyCommunity.d.ts +0 -4
  189. package/build/components/atoms/icons/MyHealth.d.ts +0 -4
  190. package/build/components/atoms/icons/Oppose.d.ts +0 -4
  191. package/build/components/atoms/icons/Parents.d.ts +0 -4
  192. package/build/components/atoms/icons/Plus.d.ts +0 -4
  193. package/build/components/atoms/icons/PlusSpecial.d.ts +0 -4
  194. package/build/components/atoms/icons/Post.d.ts +0 -4
  195. package/build/components/atoms/icons/Recalculate.d.ts +0 -4
  196. package/build/components/atoms/icons/Reply.d.ts +0 -4
  197. package/build/components/atoms/icons/Scale.d.ts +0 -4
  198. package/build/components/atoms/icons/Screener.d.ts +0 -4
  199. package/build/components/atoms/icons/Search.d.ts +0 -4
  200. package/build/components/atoms/icons/ShieldCheck.d.ts +0 -4
  201. package/build/components/atoms/icons/Smile.d.ts +0 -4
  202. package/build/components/atoms/icons/Sparkle.d.ts +0 -4
  203. package/build/components/atoms/icons/Star.d.ts +0 -4
  204. package/build/components/atoms/icons/Stethoscope.d.ts +0 -4
  205. package/build/components/atoms/icons/StethoscopeActive.d.ts +0 -4
  206. package/build/components/atoms/icons/ToggleOff.d.ts +0 -4
  207. package/build/components/atoms/icons/ToggleOn.d.ts +0 -4
  208. package/build/components/atoms/icons/Trash.d.ts +0 -4
  209. package/build/components/atoms/icons/Upcoming.d.ts +0 -4
  210. package/build/components/atoms/icons/User.d.ts +0 -4
  211. package/build/components/atoms/icons/UserCheck.d.ts +0 -4
  212. package/build/components/atoms/icons/Vaccinated.d.ts +0 -4
  213. package/build/components/atoms/icons/Video.d.ts +0 -4
  214. package/build/components/atoms/icons/VideoCall.d.ts +0 -4
  215. package/build/components/atoms/icons/Woman.d.ts +0 -4
  216. package/build/components/navigationV2/components/atoms/SearchIcon.d.ts +0 -2
  217. package/build/esm/Plus-61592057.js +0 -1
  218. package/build/esm/WhatsApp-5a6ef99f.js +0 -1
  219. package/build/esm/components/atoms/icons/ACharacter.d.ts +0 -4
  220. package/build/esm/components/atoms/icons/Activities.d.ts +0 -4
  221. package/build/esm/components/atoms/icons/ArrowDown.d.ts +0 -4
  222. package/build/esm/components/atoms/icons/ArrowLeft.d.ts +0 -4
  223. package/build/esm/components/atoms/icons/ArrowRight.d.ts +0 -4
  224. package/build/esm/components/atoms/icons/Article.d.ts +0 -4
  225. package/build/esm/components/atoms/icons/Ask.d.ts +0 -4
  226. package/build/esm/components/atoms/icons/BabyBoyMB.d.ts +0 -4
  227. package/build/esm/components/atoms/icons/BabyGirlMB.d.ts +0 -4
  228. package/build/esm/components/atoms/icons/BarChart.d.ts +0 -4
  229. package/build/esm/components/atoms/icons/Booking.d.ts +0 -4
  230. package/build/esm/components/atoms/icons/Bookmark.d.ts +0 -4
  231. package/build/esm/components/atoms/icons/Boy.d.ts +0 -4
  232. package/build/esm/components/atoms/icons/Business.d.ts +0 -4
  233. package/build/esm/components/atoms/icons/Calendar.d.ts +0 -4
  234. package/build/esm/components/atoms/icons/CalendarMB.d.ts +0 -4
  235. package/build/esm/components/atoms/icons/CameraCircle.d.ts +0 -4
  236. package/build/esm/components/atoms/icons/Chat.d.ts +0 -4
  237. package/build/esm/components/atoms/icons/Check.d.ts +0 -4
  238. package/build/esm/components/atoms/icons/CheckActiveMB.d.ts +0 -4
  239. package/build/esm/components/atoms/icons/CircleBorder.d.ts +0 -4
  240. package/build/esm/components/atoms/icons/Clickable.d.ts +0 -4
  241. package/build/esm/components/atoms/icons/ClinicPin.d.ts +0 -4
  242. package/build/esm/components/atoms/icons/Close.d.ts +0 -4
  243. package/build/esm/components/atoms/icons/Comment.d.ts +0 -4
  244. package/build/esm/components/atoms/icons/Community.d.ts +0 -4
  245. package/build/esm/components/atoms/icons/CrossLogo.d.ts +0 -4
  246. package/build/esm/components/atoms/icons/Current.d.ts +0 -4
  247. package/build/esm/components/atoms/icons/EditSpecial.d.ts +0 -4
  248. package/build/esm/components/atoms/icons/Endorse.d.ts +0 -4
  249. package/build/esm/components/atoms/icons/Envelop.d.ts +0 -4
  250. package/build/esm/components/atoms/icons/Family.d.ts +0 -4
  251. package/build/esm/components/atoms/icons/Font.d.ts +0 -4
  252. package/build/esm/components/atoms/icons/FullScreen.d.ts +0 -4
  253. package/build/esm/components/atoms/icons/GenderBoy.d.ts +0 -4
  254. package/build/esm/components/atoms/icons/GenderChooseBoy.d.ts +0 -4
  255. package/build/esm/components/atoms/icons/GenderChooseGirl.d.ts +0 -4
  256. package/build/esm/components/atoms/icons/GenderGirl.d.ts +0 -4
  257. package/build/esm/components/atoms/icons/Girl.d.ts +0 -4
  258. package/build/esm/components/atoms/icons/GroupPeople.d.ts +0 -4
  259. package/build/esm/components/atoms/icons/GroupPeopleSolid.d.ts +0 -4
  260. package/build/esm/components/atoms/icons/Heart.d.ts +0 -4
  261. package/build/esm/components/atoms/icons/Home.d.ts +0 -4
  262. package/build/esm/components/atoms/icons/Hospital.d.ts +0 -4
  263. package/build/esm/components/atoms/icons/Info.d.ts +0 -4
  264. package/build/esm/components/atoms/icons/Kebab.d.ts +0 -4
  265. package/build/esm/components/atoms/icons/Like.d.ts +0 -4
  266. package/build/esm/components/atoms/icons/Link.d.ts +0 -4
  267. package/build/esm/components/atoms/icons/Minus.d.ts +0 -4
  268. package/build/esm/components/atoms/icons/Missed.d.ts +0 -4
  269. package/build/esm/components/atoms/icons/MyCommunity.d.ts +0 -4
  270. package/build/esm/components/atoms/icons/MyHealth.d.ts +0 -4
  271. package/build/esm/components/atoms/icons/Oppose.d.ts +0 -4
  272. package/build/esm/components/atoms/icons/Parents.d.ts +0 -4
  273. package/build/esm/components/atoms/icons/Plus.d.ts +0 -4
  274. package/build/esm/components/atoms/icons/PlusSpecial.d.ts +0 -4
  275. package/build/esm/components/atoms/icons/Post.d.ts +0 -4
  276. package/build/esm/components/atoms/icons/Recalculate.d.ts +0 -4
  277. package/build/esm/components/atoms/icons/Reply.d.ts +0 -4
  278. package/build/esm/components/atoms/icons/Scale.d.ts +0 -4
  279. package/build/esm/components/atoms/icons/Screener.d.ts +0 -4
  280. package/build/esm/components/atoms/icons/Search.d.ts +0 -4
  281. package/build/esm/components/atoms/icons/ShieldCheck.d.ts +0 -4
  282. package/build/esm/components/atoms/icons/Smile.d.ts +0 -4
  283. package/build/esm/components/atoms/icons/Sparkle.d.ts +0 -4
  284. package/build/esm/components/atoms/icons/Star.d.ts +0 -4
  285. package/build/esm/components/atoms/icons/Stethoscope.d.ts +0 -4
  286. package/build/esm/components/atoms/icons/StethoscopeActive.d.ts +0 -4
  287. package/build/esm/components/atoms/icons/ToggleOff.d.ts +0 -4
  288. package/build/esm/components/atoms/icons/ToggleOn.d.ts +0 -4
  289. package/build/esm/components/atoms/icons/Trash.d.ts +0 -4
  290. package/build/esm/components/atoms/icons/Upcoming.d.ts +0 -4
  291. package/build/esm/components/atoms/icons/User.d.ts +0 -4
  292. package/build/esm/components/atoms/icons/UserCheck.d.ts +0 -4
  293. package/build/esm/components/atoms/icons/Vaccinated.d.ts +0 -4
  294. package/build/esm/components/atoms/icons/Video.d.ts +0 -4
  295. package/build/esm/components/atoms/icons/VideoCall.d.ts +0 -4
  296. package/build/esm/components/atoms/icons/Woman.d.ts +0 -4
  297. package/build/esm/components/navigationV2/components/atoms/SearchIcon.d.ts +0 -2
  298. package/build/esm/getDynamicHealthTool-94a90aa0.js +0 -1
  299. package/build/esm/index-04f183b8.js +0 -1
  300. package/build/esm/index-07905741.js +0 -1
  301. package/build/esm/index-1f2316ca.js +0 -1
  302. package/build/esm/index-200ec6b1.js +0 -1
  303. package/build/esm/index-418f072b.js +0 -1
  304. package/build/esm/index-a9cbaabd.js +0 -1
  305. package/build/esm/index-ebd9ace0.js +0 -1
  306. package/build/esm/index-ed71bf72.js +0 -177
  307. package/build/esm/types-d7d54442.js +0 -3004
  308. package/build/esm/useHealthToolCache-73b62210.js +0 -1
  309. package/build/esm/usePlacesAutocomplete-ff204ea8.js +0 -1
  310. package/build/esm/useTranslations-cce18e33.js +0 -1
  311. package/build/esm/utils-e3640c23.js +0 -7
  312. package/build/index-01eb2479.js +0 -177
  313. package/build/index-0242b079.js +0 -1
  314. package/build/index-04da6493.js +0 -1
  315. package/build/index-0a9fa2c4.js +0 -2748
  316. package/build/index-0cecb118.js +0 -1
  317. package/build/index-1c7247cc.js +0 -113
  318. package/build/index-d85d7a99.js +0 -1
  319. package/build/index-e05e160d.js +0 -1
  320. package/build/index-f4c55cce.js +0 -1
  321. package/build/utils-5ea654b8.js +0 -1
  322. /package/build/{BMI_BOYS.percentile.monthly-5cd79b25.js → BMI_BOYS.percentile.monthly-c56b0165.js} +0 -0
  323. /package/build/{BMI_BOYS.percentile.weekly-fc72eb47.js → BMI_BOYS.percentile.weekly-64287e04.js} +0 -0
  324. /package/build/{BMI_BOYS.percentile.yearly-9f13a908.js → BMI_BOYS.percentile.yearly-8db65d54.js} +0 -0
  325. /package/build/{BMI_BOYS.zscore.monthly-f306d58d.js → BMI_BOYS.zscore.monthly-f12389cd.js} +0 -0
  326. /package/build/{BMI_BOYS.zscore.weekly-9d80c0e2.js → BMI_BOYS.zscore.weekly-fff37a57.js} +0 -0
  327. /package/build/{BMI_BOYS.zscore.yearly-9ade76a5.js → BMI_BOYS.zscore.yearly-a19b57eb.js} +0 -0
  328. /package/build/{BMI_GIRLS.percentile.monthly-0318da9f.js → BMI_GIRLS.percentile.monthly-a4b36d7d.js} +0 -0
  329. /package/build/{BMI_GIRLS.percentile.weekly-1f566aaa.js → BMI_GIRLS.percentile.weekly-b6089202.js} +0 -0
  330. /package/build/{BMI_GIRLS.percentile.yearly-215b3cba.js → BMI_GIRLS.percentile.yearly-0d340818.js} +0 -0
  331. /package/build/{BMI_GIRLS.zscore.monthly-bae848b2.js → BMI_GIRLS.zscore.monthly-fd5b57c0.js} +0 -0
  332. /package/build/{BMI_GIRLS.zscore.weekly-2371a64f.js → BMI_GIRLS.zscore.weekly-d4577f50.js} +0 -0
  333. /package/build/{BMI_GIRLS.zscore.yearly-9ecfbccb.js → BMI_GIRLS.zscore.yearly-e40b8a7d.js} +0 -0
  334. /package/build/{ChevronDown-9a823643.js → ChevronDown-602ce39e.js} +0 -0
  335. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-0d2ab2e7.js → HEAD CIRCUM_BOYS.percentile.monthly-2e4c5776.js} +0 -0
  336. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-27bac0cb.js → HEAD CIRCUM_BOYS.percentile.weekly-fc5728a5.js} +0 -0
  337. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-b175db79.js → HEAD CIRCUM_BOYS.percentile.yearly-6bfab277.js} +0 -0
  338. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-f5c6bdd6.js → HEAD CIRCUM_BOYS.zscore.monthly-6af7ce44.js} +0 -0
  339. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-bfdc4392.js → HEAD CIRCUM_BOYS.zscore.weekly-9adb819b.js} +0 -0
  340. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-14f0889d.js → HEAD CIRCUM_BOYS.zscore.yearly-9a6cdbcf.js} +0 -0
  341. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-903e7189.js → HEAD CIRCUM_GIRLS.percentile.monthly-e7bfe9c6.js} +0 -0
  342. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-748869a7.js → HEAD CIRCUM_GIRLS.percentile.weekly-9f17e019.js} +0 -0
  343. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-2a680f48.js → HEAD CIRCUM_GIRLS.percentile.yearly-8a59f541.js} +0 -0
  344. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-e054510e.js → HEAD CIRCUM_GIRLS.zscore.monthly-b7ddb16c.js} +0 -0
  345. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-eb025087.js → HEAD CIRCUM_GIRLS.zscore.weekly-72701c55.js} +0 -0
  346. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-011649a2.js → HEAD CIRCUM_GIRLS.zscore.yearly-dd94bded.js} +0 -0
  347. /package/build/{HEIGHT_BOYS.percentile.monthly-7e9898ff.js → HEIGHT_BOYS.percentile.monthly-b890068c.js} +0 -0
  348. /package/build/{HEIGHT_BOYS.percentile.weekly-a7df6826.js → HEIGHT_BOYS.percentile.weekly-a1aa5130.js} +0 -0
  349. /package/build/{HEIGHT_BOYS.percentile.yearly-7f716f35.js → HEIGHT_BOYS.percentile.yearly-5727d920.js} +0 -0
  350. /package/build/{HEIGHT_BOYS.zscore.monthly-a180ab2d.js → HEIGHT_BOYS.zscore.monthly-13b70aa6.js} +0 -0
  351. /package/build/{HEIGHT_BOYS.zscore.weekly-92934eaa.js → HEIGHT_BOYS.zscore.weekly-3e1d7f23.js} +0 -0
  352. /package/build/{HEIGHT_BOYS.zscore.yearly-bd2cf58f.js → HEIGHT_BOYS.zscore.yearly-a956102d.js} +0 -0
  353. /package/build/{HEIGHT_GIRLS.percentile.monthly-a90a6654.js → HEIGHT_GIRLS.percentile.monthly-da5ec01b.js} +0 -0
  354. /package/build/{HEIGHT_GIRLS.percentile.weekly-b89741cd.js → HEIGHT_GIRLS.percentile.weekly-e6205d32.js} +0 -0
  355. /package/build/{HEIGHT_GIRLS.percentile.yearly-03631447.js → HEIGHT_GIRLS.percentile.yearly-caefa502.js} +0 -0
  356. /package/build/{HEIGHT_GIRLS.zscore.monthly-aac24454.js → HEIGHT_GIRLS.zscore.monthly-102ba473.js} +0 -0
  357. /package/build/{HEIGHT_GIRLS.zscore.weekly-2869cc02.js → HEIGHT_GIRLS.zscore.weekly-db4f710b.js} +0 -0
  358. /package/build/{HEIGHT_GIRLS.zscore.yearly-fc370322.js → HEIGHT_GIRLS.zscore.yearly-36465920.js} +0 -0
  359. /package/build/{Subot-6f44f7d1.js → Subot-4751194d.js} +0 -0
  360. /package/build/{Visible-e3703df9.js → Visible-9497c463.js} +0 -0
  361. /package/build/{WEIGHT_BOYS.percentile.monthly-975193d0.js → WEIGHT_BOYS.percentile.monthly-554d0361.js} +0 -0
  362. /package/build/{WEIGHT_BOYS.percentile.weekly-b5c38df2.js → WEIGHT_BOYS.percentile.weekly-8e5334b8.js} +0 -0
  363. /package/build/{WEIGHT_BOYS.percentile.yearly-240ed2c9.js → WEIGHT_BOYS.percentile.yearly-536e1ccb.js} +0 -0
  364. /package/build/{WEIGHT_BOYS.zscore.monthly-fa43b6c3.js → WEIGHT_BOYS.zscore.monthly-01eccee1.js} +0 -0
  365. /package/build/{WEIGHT_BOYS.zscore.weekly-046b9f1b.js → WEIGHT_BOYS.zscore.weekly-ee8f2c6b.js} +0 -0
  366. /package/build/{WEIGHT_BOYS.zscore.yearly-ae9412de.js → WEIGHT_BOYS.zscore.yearly-0aea2749.js} +0 -0
  367. /package/build/{WEIGHT_GIRLS.percentile.monthly-6d56fb24.js → WEIGHT_GIRLS.percentile.monthly-7abf9d06.js} +0 -0
  368. /package/build/{WEIGHT_GIRLS.percentile.weekly-f9e08e94.js → WEIGHT_GIRLS.percentile.weekly-f9b6e963.js} +0 -0
  369. /package/build/{WEIGHT_GIRLS.percentile.yearly-980c7b20.js → WEIGHT_GIRLS.percentile.yearly-254865a5.js} +0 -0
  370. /package/build/{WEIGHT_GIRLS.zscore.monthly-f27b0da0.js → WEIGHT_GIRLS.zscore.monthly-909f7417.js} +0 -0
  371. /package/build/{WEIGHT_GIRLS.zscore.weekly-666d490e.js → WEIGHT_GIRLS.zscore.weekly-e62cd084.js} +0 -0
  372. /package/build/{WEIGHT_GIRLS.zscore.yearly-5f28002e.js → WEIGHT_GIRLS.zscore.yearly-8d6e5405.js} +0 -0
  373. /package/build/{animation-e73dc040.js → animation-d5d9ef32.js} +0 -0
  374. /package/build/{cookieHelper-3b9ceb4e.js → cookieHelper-7d519a72.js} +0 -0
  375. /package/build/esm/{BMI_BOYS.percentile.monthly-5245a76e.js → BMI_BOYS.percentile.monthly-6272f835.js} +0 -0
  376. /package/build/esm/{BMI_BOYS.percentile.weekly-69f6d409.js → BMI_BOYS.percentile.weekly-80d18f47.js} +0 -0
  377. /package/build/esm/{BMI_BOYS.percentile.yearly-6b7c67a5.js → BMI_BOYS.percentile.yearly-a7e5b5f6.js} +0 -0
  378. /package/build/esm/{BMI_BOYS.zscore.monthly-54f7384d.js → BMI_BOYS.zscore.monthly-d3658f97.js} +0 -0
  379. /package/build/esm/{BMI_BOYS.zscore.weekly-208ea2d6.js → BMI_BOYS.zscore.weekly-6e6708dc.js} +0 -0
  380. /package/build/esm/{BMI_BOYS.zscore.yearly-95fb8846.js → BMI_BOYS.zscore.yearly-b8400c9d.js} +0 -0
  381. /package/build/esm/{BMI_GIRLS.percentile.monthly-ffd9ffc6.js → BMI_GIRLS.percentile.monthly-98586b46.js} +0 -0
  382. /package/build/esm/{BMI_GIRLS.percentile.weekly-ca8fcfee.js → BMI_GIRLS.percentile.weekly-7c1511b0.js} +0 -0
  383. /package/build/esm/{BMI_GIRLS.percentile.yearly-b30eb957.js → BMI_GIRLS.percentile.yearly-ea667f90.js} +0 -0
  384. /package/build/esm/{BMI_GIRLS.zscore.monthly-4fd0f8f1.js → BMI_GIRLS.zscore.monthly-3a4fd1a6.js} +0 -0
  385. /package/build/esm/{BMI_GIRLS.zscore.weekly-d6b98de6.js → BMI_GIRLS.zscore.weekly-cc1de097.js} +0 -0
  386. /package/build/esm/{BMI_GIRLS.zscore.yearly-fbb5ee44.js → BMI_GIRLS.zscore.yearly-6dd1a364.js} +0 -0
  387. /package/build/esm/{ChevronDown-8452962e.js → ChevronDown-4e59cac6.js} +0 -0
  388. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-09c89acf.js → HEAD CIRCUM_BOYS.percentile.monthly-bd0965ae.js} +0 -0
  389. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-a15b9bbb.js → HEAD CIRCUM_BOYS.percentile.weekly-db1053f7.js} +0 -0
  390. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-c6feccdc.js → HEAD CIRCUM_BOYS.percentile.yearly-cd38b622.js} +0 -0
  391. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-591fe4e6.js → HEAD CIRCUM_BOYS.zscore.monthly-d7f88a95.js} +0 -0
  392. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-6e915af3.js → HEAD CIRCUM_BOYS.zscore.weekly-76f7db79.js} +0 -0
  393. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-59e4bfc4.js → HEAD CIRCUM_BOYS.zscore.yearly-3ce70f8e.js} +0 -0
  394. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-303fa4d4.js → HEAD CIRCUM_GIRLS.percentile.monthly-b2e678ae.js} +0 -0
  395. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-740b13f4.js → HEAD CIRCUM_GIRLS.percentile.weekly-8e2664bb.js} +0 -0
  396. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-d0589d47.js → HEAD CIRCUM_GIRLS.percentile.yearly-f5c075a9.js} +0 -0
  397. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-5d8fda84.js → HEAD CIRCUM_GIRLS.zscore.monthly-6f87849e.js} +0 -0
  398. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-a8c3171f.js → HEAD CIRCUM_GIRLS.zscore.weekly-48da0aaa.js} +0 -0
  399. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-95746ad3.js → HEAD CIRCUM_GIRLS.zscore.yearly-4eea437b.js} +0 -0
  400. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-63abb64c.js → HEIGHT_BOYS.percentile.monthly-d1a8cc8e.js} +0 -0
  401. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-e084fc63.js → HEIGHT_BOYS.percentile.weekly-2b6cfe6c.js} +0 -0
  402. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-fe73951b.js → HEIGHT_BOYS.percentile.yearly-9e78afc3.js} +0 -0
  403. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-cd438afc.js → HEIGHT_BOYS.zscore.monthly-5292d78a.js} +0 -0
  404. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-654e6872.js → HEIGHT_BOYS.zscore.weekly-fbdee645.js} +0 -0
  405. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-f93b88e1.js → HEIGHT_BOYS.zscore.yearly-c11a8f1b.js} +0 -0
  406. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-a7fceb4a.js → HEIGHT_GIRLS.percentile.monthly-8e11e2dc.js} +0 -0
  407. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-0ffd736b.js → HEIGHT_GIRLS.percentile.weekly-dc3965cb.js} +0 -0
  408. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-bc5ba895.js → HEIGHT_GIRLS.percentile.yearly-490f7b4e.js} +0 -0
  409. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-a527f6b5.js → HEIGHT_GIRLS.zscore.monthly-e3531c32.js} +0 -0
  410. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-0432321b.js → HEIGHT_GIRLS.zscore.weekly-36a16a66.js} +0 -0
  411. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-580f5550.js → HEIGHT_GIRLS.zscore.yearly-61736bba.js} +0 -0
  412. /package/build/esm/{Subot-ade21804.js → Subot-4642c5bf.js} +0 -0
  413. /package/build/esm/{Visible-39f22e26.js → Visible-ff7d225c.js} +0 -0
  414. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-f146d4b0.js → WEIGHT_BOYS.percentile.monthly-0cfe7ecd.js} +0 -0
  415. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-b90291b2.js → WEIGHT_BOYS.percentile.weekly-89802113.js} +0 -0
  416. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-1c5bc721.js → WEIGHT_BOYS.percentile.yearly-0eb40972.js} +0 -0
  417. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-e7f77bb7.js → WEIGHT_BOYS.zscore.monthly-7f8c5a15.js} +0 -0
  418. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-a964f7fe.js → WEIGHT_BOYS.zscore.weekly-3dcfa8ce.js} +0 -0
  419. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-0cd3170e.js → WEIGHT_BOYS.zscore.yearly-98ce1ea0.js} +0 -0
  420. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-963226db.js → WEIGHT_GIRLS.percentile.monthly-df98e335.js} +0 -0
  421. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-137218b5.js → WEIGHT_GIRLS.percentile.weekly-63fff42a.js} +0 -0
  422. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-ec29d8fe.js → WEIGHT_GIRLS.percentile.yearly-8db8cdd0.js} +0 -0
  423. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-14843702.js → WEIGHT_GIRLS.zscore.monthly-15c83c6d.js} +0 -0
  424. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-43d4a42b.js → WEIGHT_GIRLS.zscore.weekly-747a55ec.js} +0 -0
  425. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-878837ef.js → WEIGHT_GIRLS.zscore.yearly-197dc52d.js} +0 -0
  426. /package/build/esm/{animation-1d694586.js → animation-0340efb3.js} +0 -0
  427. /package/build/esm/{cookieHelper-3fe8fdf3.js → cookieHelper-4f089e3c.js} +0 -0
  428. /package/build/esm/{index-9a776a7f.js → index-1e7ad007.js} +0 -0
  429. /package/build/esm/{index-761ce6cc.js → index-8c77d7e0.js} +0 -0
  430. /package/build/esm/{index-8cf56535.js → index-e21276e3.js} +0 -0
  431. /package/build/esm/{isProduction-8ae381c3.js → isProduction-00695d80.js} +0 -0
  432. /package/build/esm/{localizeNumberFormat-5846bb60.js → localizeNumberFormat-8355a44f.js} +0 -0
  433. /package/build/esm/{normalizeLink-cfd22388.js → normalizeLink-1c194268.js} +0 -0
  434. /package/build/esm/{number-c9fbe4ab.js → number-1347eb7b.js} +0 -0
  435. /package/build/esm/{paths-dfd6bdd2.js → paths-749b4b53.js} +0 -0
  436. /package/build/esm/{theme-2f0d6367.js → theme-3db3c9a8.js} +0 -0
  437. /package/build/esm/{translationsContext-d3dc4282.js → translationsContext-6d2efd65.js} +0 -0
  438. /package/build/esm/{tslib.es6-4a7efa3e.js → tslib.es6-266309d1.js} +0 -0
  439. /package/build/esm/{types-0d3813ec.js → types-d3da37d2.js} +0 -0
  440. /package/build/esm/{useIsInit-8d70a700.js → useIsInit-9661c5f5.js} +0 -0
  441. /package/build/esm/{useOutsideClick-7826d461.js → useOutsideClick-0704b383.js} +0 -0
  442. /package/build/esm/{useScrollbarSize-7519cdcf.js → useScrollbarSize-90b179a5.js} +0 -0
  443. /package/build/esm/{useUniqueId-463b8d94.js → useUniqueId-03fbaecd.js} +0 -0
  444. /package/build/esm/{utils-597f4846.js → utils-5b4e60da.js} +0 -0
  445. /package/build/{index-4da2b598.js → index-34b6bd24.js} +0 -0
  446. /package/build/{index-c2ff8b54.js → index-58e0d49f.js} +0 -0
  447. /package/build/{index-56b73a7a.js → index-ed8656f9.js} +0 -0
  448. /package/build/{isProduction-822a7286.js → isProduction-28d96804.js} +0 -0
  449. /package/build/{localizeNumberFormat-f54c1770.js → localizeNumberFormat-22b2d7aa.js} +0 -0
  450. /package/build/{normalizeLink-f9713014.js → normalizeLink-594ccff1.js} +0 -0
  451. /package/build/{number-3835f480.js → number-cf06dcc0.js} +0 -0
  452. /package/build/{paths-0bb9c960.js → paths-ed72ecb8.js} +0 -0
  453. /package/build/{theme-b5bd9d5b.js → theme-f2b8aad7.js} +0 -0
  454. /package/build/{translationsContext-4202bcac.js → translationsContext-4c4c33c4.js} +0 -0
  455. /package/build/{tslib.es6-94d9fc9f.js → tslib.es6-ceb091fd.js} +0 -0
  456. /package/build/{types-baa14b03.js → types-5b303b71.js} +0 -0
  457. /package/build/{useIsInit-8be51b79.js → useIsInit-c3cf1925.js} +0 -0
  458. /package/build/{useOutsideClick-b08de0a8.js → useOutsideClick-15fef824.js} +0 -0
  459. /package/build/{useScrollbarSize-f6774988.js → useScrollbarSize-ab332673.js} +0 -0
  460. /package/build/{useUniqueId-ff7774a5.js → useUniqueId-46834e18.js} +0 -0
  461. /package/build/{utils-82e9e1c2.js → utils-45e691a3.js} +0 -0
@@ -1,4 +1,4 @@
1
- import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle as o,useState as a,useRef as i,useEffect as l,useMemo as s,Fragment as m}from"react";import{Box as d,Input as c,Grid as p,Title as u,Container as g,Flex as h,rem as b,Stack as E,AspectRatio as f}from"@mantine/core";import{P as L,d as v,R as y,O as C,e as x,u as w,B as S}from"./index-8c1e2ce6.js";import"@mantine/dates";import{L as j}from"./index-05214244.js";import"./Subot-ade21804.js";import{C as P}from"./index-01efa9be.js";import{T as O}from"./Plus-61592057.js";import{t as k}from"./theme-2f0d6367.js";import"./translationsContext-d3dc4282.js";import"string-format";import{useInterval as F,useCounter as B}from"@mantine/hooks";import{M as z,a as N}from"./utils-597f4846.js";import{M as T,h as I}from"./utils-c6a7729e.js";export{M as MAPPED_LOCALE}from"./utils-c6a7729e.js";import{createFormContext as D,yupResolver as A}from"@mantine/form";import Z from"styled-components";import{_,a as q}from"./tslib.es6-4a7efa3e.js";import"./index.styles-d3334c25.js";import{H as V}from"./index-a9cbaabd.js";import"./constants-ed8abdff.js";import{L as $}from"./utils-508d45bb.js";import{u as H}from"./useTranslations-cce18e33.js";import"./WhatsApp-5a6ef99f.js";import"./index.styled-c2100f19.js";import"./index-761ce6cc.js";import"./utils-e3640c23.js";import*as W from"yup";import{D as U}from"./index-16d9b234.js";import{A as Y}from"./index-1f2316ca.js";import{V as R}from"./Visible-39f22e26.js";import{createPortal as G}from"react-dom";import{I as K}from"./index-04f183b8.js";import J from"lodash/throttle";import{B as Q}from"./index-18ff3f75.js";import{T as X}from"./index-418f072b.js";import{format as ee}from"date-fns";import te from"react-keyed-flatten-children";import"dayjs";import"@mantine/carousel";import"classnames";import"./useUniqueId-463b8d94.js";import"date-fns/locale";import"./isProduction-8ae381c3.js";import"./animation-1d694586.js";import"./cookieHelper-3fe8fdf3.js";import"slugify";const ne=t({currentStep:0,setCurrentStep:()=>!1,setMaxStep:()=>!1,nextStep:()=>!1,prevStep:()=>!1,isMarryBaby:!1,siteType:"helloSites",sharedData:{},setSharedData:()=>!1}),[re,oe,ae]=D(),ie=Z(d)`
1
+ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle as o,useState as a,useRef as i,useEffect as l,useMemo as s,Fragment as m}from"react";import{Box as d,Input as c,Grid as p,Title as u,Container as g,Flex as h,rem as b,Stack as E,AspectRatio as f}from"@mantine/core";import{P as L,c as v,R as y,O as C,d as x,u as w,B as S}from"./index-5408f5a4.js";import"@mantine/dates";import{L as j}from"./index-9e5956c2.js";import"./Subot-4642c5bf.js";import{C as P}from"./index-2e99f941.js";import{T as O}from"./index-d27a0e25.js";import{t as k}from"./theme-3db3c9a8.js";import"./translationsContext-6d2efd65.js";import"string-format";import{useInterval as F,useCounter as B}from"@mantine/hooks";import{M as z,a as N}from"./utils-5b4e60da.js";import{M as T,h as I}from"./utils-b87ec473.js";export{M as MAPPED_LOCALE}from"./utils-b87ec473.js";import{createFormContext as D,yupResolver as A}from"@mantine/form";import Z from"styled-components";import{_,a as q}from"./tslib.es6-266309d1.js";import"./index.styles-94af560f.js";import{H as V}from"./index-24557f2b.js";import"./constants-f7c80032.js";import{L as $}from"./utils-3d2e3f0f.js";import{u as H}from"./useTranslations-df1b3bb8.js";import"./utils-970ce0c0.js";import"./index.styled-14b65c9e.js";import"./index-8c77d7e0.js";import*as U from"yup";import{D as W}from"./index-93e5b4f3.js";import{A as Y}from"./index-45dcd965.js";import{V as R}from"./Visible-ff7d225c.js";import{createPortal as G}from"react-dom";import{I as K}from"./index-13dc1f44.js";import J from"lodash/throttle";import{B as Q}from"./index-3452fed2.js";import{T as X}from"./index-459e0362.js";import{format as ee}from"date-fns";import te from"react-keyed-flatten-children";import"@hhgtech/icons/other";import"dayjs";import"@mantine/carousel";import"classnames";import"./useUniqueId-03fbaecd.js";import"@hhgtech/icons/core";import"date-fns/locale";import"./isProduction-00695d80.js";import"./animation-0340efb3.js";import"./cookieHelper-4f089e3c.js";import"slugify";const ne=t({currentStep:0,setCurrentStep:()=>!1,setMaxStep:()=>!1,nextStep:()=>!1,prevStep:()=>!1,isMarryBaby:!1,siteType:"helloSites",sharedData:{},setSharedData:()=>!1}),[re,oe,ae]=D(),ie=Z(d)`
2
2
  .phone-input {
3
3
  width: 100%;
4
4
  margin-bottom: 32px;
@@ -15,7 +15,7 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
15
15
  border-radius: 0 4px 4px 0;
16
16
  }
17
17
  }
18
- `,le=t=>{var{inputOrder:n=["phone"],withSimilac:r=!1,customTerms:o="",formContext:a}=t,i=_(t,["inputOrder","withSimilac","customTerms","formContext"]);const{t:l}=H(),s=a||oe(),m={phone:t=>{var{label:n,name:o="phone"}=t,a=_(t,["label","name"]);return e.createElement(c.Wrapper,{className:r?"input-control":"phone-input",withAsterisk:!0,label:n||r?e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.similac.input.phone")):void 0},e.createElement(L,Object.assign({defaultCountry:T[process.env.UNIFY_LOCALE]||"VN"},s.getInputProps(o),a)),e.createElement(c.Error,{size:"md"},s.errors.phone))},full_name:t=>{var{label:n,name:r="name"}=t,o=_(t,["label","name"]);return e.createElement(v,Object.assign({label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.formEmail.yourName")),withAsterisk:!0},s.getInputProps(r),o))},email:t=>{var{label:n,name:r="email"}=t,o=_(t,["label","name"]);return e.createElement(v,Object.assign({label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.formEmail.yourEmail")),withAsterisk:!0},s.getInputProps(r),o))},dob:t=>{var{label:n,name:r="dob"}=t,o=_(t,["label","name"]);return e.createElement(U,Object.assign({label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.formEmail.yourBirthday")),placeholder:"DD/MM/YYYY"},s.getInputProps(r),o))},gender:t=>{var{label:n,name:r="gender"}=t,o=_(t,["label","name"]);return e.createElement(y.Group,Object.assign({className:"radio-group",label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},n||l("tools.selectGender"))},s.getInputProps(r),o),e.createElement(y,{value:"0",label:l("onboarding.formEmail.genderMale")}),e.createElement(y,{value:"1",label:l("onboarding.formEmail.genderFemale")}))},otp:({name:t="otp"})=>e.createElement("div",{className:"otp-input"},e.createElement(C,Object.assign({enterKeyHint:void 0,nonce:void 0},s.getInputProps(t))),e.createElement(c.Error,null,s.errors.otp)),password:({label:t,name:n="password"})=>e.createElement(v.Password,Object.assign({label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},t||l("onboarding.updatePassword.password")),withAsterisk:!0,rightSection:e.createElement(R,null)},s.getInputProps(n))),confirm_password:({label:t,name:n="confirmPassword"})=>e.createElement(v.Password,Object.assign({label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},t||l("onboarding.updatePassword.confirmPassword")),withAsterisk:!0,rightSection:e.createElement(R,null)},s.getInputProps(n))),term:({name:t="term",className:n=""})=>o?e.createElement("div",{style:{marginBottom:16},className:n},e.createElement(x,Object.assign({label:e.createElement(O,{size:"p4",as:"span",sx:{a:{color:"#2d87f3",fontWeight:"bold",letterSpacing:0}}},o)},s.getInputProps(t,{type:"checkbox"}),{error:null})),e.createElement(c.Error,{size:"md"},s.getInputProps("term",{type:"checkbox"}).error)):null,address:t=>{var{label:n,className:r="",name:o="address"}=t,a=_(t,["label","className","name"]);return e.createElement(Y,Object.assign({className:`${r} input-control`,label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.similac.input.address"))},s.getInputProps(o),a))}},d=n.map((e=>{var t;const n="string"==typeof e?{inputType:e}:e;return null===(t=m[n.inputType])||void 0===t?void 0:t.call(m,n)}));return e.createElement(ie,Object.assign({},i),d)},se=e=>W.object().shape({phone:W.string().required(e("onboarding.updatePhone.error")).default(""),name:W.string().required(e("onboarding.errorMessage.requiredName")),email:W.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),address:W.mixed().required(e("onboarding.similac.address.error")),term:W.bool().oneOf([!0],e("onboarding.similac.term.error"))});var me=n(((t,n)=>{var{inputOrder:a,onSubmit:i,validateSchema:l,defaultValues:s,isActive:m,customTerms:c,customFormTexts:p}=t,u=_(t,["inputOrder","onSubmit","validateSchema","defaultValues","isActive","customTerms","customFormTexts"]);const{nextStep:g,setSharedData:h,sharedData:b}=r(ne),{t:E}=H(),f=ae({initialValues:{term:!1,phone:(null==b?void 0:b.phone)||(null==s?void 0:s.phone)||"",email:(null==b?void 0:b.email)||(null==s?void 0:s.email)||"",name:(null==b?void 0:b.name)||(null==s?void 0:s.name)||""},validate:l||A(se(E))}),L=e=>q(void 0,void 0,void 0,(function*(){try{yield null==i?void 0:i(e),h((t=>Object.assign(Object.assign({},t),{phone:e.phone,email:e.email,name:e.name}))),g()}catch(e){console.error(e)}})),v=e=>{console.log(e)},y=()=>{var e;return null===(e=f.onSubmit(L,v))||void 0===e?void 0:e()};return o(n,(()=>({submitForm:y}))),e.createElement(d,Object.assign({"data-active":m},u),e.createElement(d,{sx:e=>({display:"flex",flexDirection:"column",gap:"16px",[e.fn.largerThan("md")]:{gap:"24px"}})},e.createElement(d,{sx:{textAlign:"center"}},e.createElement(V,{tag:"h4",as:"h2"},null==p?void 0:p.heading),e.createElement(O,{size:"p3"},null==p?void 0:p.description)),e.createElement(re,{form:f},e.createElement("form",{className:"friso-form",style:{width:"100%"},onSubmit:f.onSubmit(L,v)},e.createElement(d,{sx:{".friso-form":{display:"flex",flexWrap:"wrap",gap:"8px",".input-control":{width:"100%",marginBottom:0},".phone-input":{marginBottom:"0 !important",".PhoneInput":{marginBottom:"0 !important"}}}}},e.createElement(le,{inputOrder:a,customTerms:c,className:"friso-form"}))))))}));const de=Z.div`
18
+ `,le=t=>{var{inputOrder:n=["phone"],withSimilac:r=!1,customTerms:o="",formContext:a}=t,i=_(t,["inputOrder","withSimilac","customTerms","formContext"]);const{t:l}=H(),s=a||oe(),m={phone:t=>{var{label:n,name:o="phone"}=t,a=_(t,["label","name"]);return e.createElement(c.Wrapper,{className:r?"input-control":"phone-input",withAsterisk:!0,label:n||r?e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.similac.input.phone")):void 0},e.createElement(L,Object.assign({defaultCountry:T[process.env.UNIFY_LOCALE]||"VN"},s.getInputProps(o),a)),e.createElement(c.Error,{size:"md"},s.errors.phone))},full_name:t=>{var{label:n,name:r="name"}=t,o=_(t,["label","name"]);return e.createElement(v,Object.assign({label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.formEmail.yourName")),withAsterisk:!0},s.getInputProps(r),o))},email:t=>{var{label:n,name:r="email"}=t,o=_(t,["label","name"]);return e.createElement(v,Object.assign({label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.formEmail.yourEmail")),withAsterisk:!0},s.getInputProps(r),o))},dob:t=>{var{label:n,name:r="dob"}=t,o=_(t,["label","name"]);return e.createElement(W,Object.assign({label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.formEmail.yourBirthday")),placeholder:"DD/MM/YYYY"},s.getInputProps(r),o))},gender:t=>{var{label:n,name:r="gender"}=t,o=_(t,["label","name"]);return e.createElement(y.Group,Object.assign({className:"radio-group",label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},n||l("tools.selectGender"))},s.getInputProps(r),o),e.createElement(y,{value:"0",label:l("onboarding.formEmail.genderMale")}),e.createElement(y,{value:"1",label:l("onboarding.formEmail.genderFemale")}))},otp:({name:t="otp"})=>e.createElement("div",{className:"otp-input"},e.createElement(C,Object.assign({enterKeyHint:void 0,nonce:void 0},s.getInputProps(t))),e.createElement(c.Error,null,s.errors.otp)),password:({label:t,name:n="password"})=>e.createElement(v.Password,Object.assign({label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},t||l("onboarding.updatePassword.password")),withAsterisk:!0,rightSection:e.createElement(R,null)},s.getInputProps(n))),confirm_password:({label:t,name:n="confirmPassword"})=>e.createElement(v.Password,Object.assign({label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},t||l("onboarding.updatePassword.confirmPassword")),withAsterisk:!0,rightSection:e.createElement(R,null)},s.getInputProps(n))),term:({name:t="term",className:n=""})=>o?e.createElement("div",{style:{marginBottom:16},className:n},e.createElement(x,Object.assign({label:e.createElement(O,{size:"p4",as:"span",sx:{a:{color:"#2d87f3",fontWeight:"bold",letterSpacing:0}}},o)},s.getInputProps(t,{type:"checkbox"}),{error:null})),e.createElement(c.Error,{size:"md"},s.getInputProps("term",{type:"checkbox"}).error)):null,address:t=>{var{label:n,className:r="",name:o="address"}=t,a=_(t,["label","className","name"]);return e.createElement(Y,Object.assign({className:`${r} input-control`,label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.similac.input.address"))},s.getInputProps(o),a))}},d=n.map((e=>{var t;const n="string"==typeof e?{inputType:e}:e;return null===(t=m[n.inputType])||void 0===t?void 0:t.call(m,n)}));return e.createElement(ie,Object.assign({},i),d)},se=e=>U.object().shape({phone:U.string().required(e("onboarding.updatePhone.error")).default(""),name:U.string().required(e("onboarding.errorMessage.requiredName")),email:U.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),address:U.mixed().required(e("onboarding.similac.address.error")),term:U.bool().oneOf([!0],e("onboarding.similac.term.error"))});var me=n(((t,n)=>{var{inputOrder:a,onSubmit:i,validateSchema:l,defaultValues:s,isActive:m,customTerms:c,customFormTexts:p}=t,u=_(t,["inputOrder","onSubmit","validateSchema","defaultValues","isActive","customTerms","customFormTexts"]);const{nextStep:g,setSharedData:h,sharedData:b}=r(ne),{t:E}=H(),f=ae({initialValues:{term:!1,phone:(null==b?void 0:b.phone)||(null==s?void 0:s.phone)||"",email:(null==b?void 0:b.email)||(null==s?void 0:s.email)||"",name:(null==b?void 0:b.name)||(null==s?void 0:s.name)||""},validate:l||A(se(E))}),L=e=>q(void 0,void 0,void 0,(function*(){try{yield null==i?void 0:i(e),h((t=>Object.assign(Object.assign({},t),{phone:e.phone,email:e.email,name:e.name}))),g()}catch(e){console.error(e)}})),v=e=>{console.log(e)},y=()=>{var e;return null===(e=f.onSubmit(L,v))||void 0===e?void 0:e()};return o(n,(()=>({submitForm:y}))),e.createElement(d,Object.assign({"data-active":m},u),e.createElement(d,{sx:e=>({display:"flex",flexDirection:"column",gap:"16px",[e.fn.largerThan("md")]:{gap:"24px"}})},e.createElement(d,{sx:{textAlign:"center"}},e.createElement(V,{tag:"h4",as:"h2"},null==p?void 0:p.heading),e.createElement(O,{size:"p3"},null==p?void 0:p.description)),e.createElement(re,{form:f},e.createElement("form",{className:"friso-form",style:{width:"100%"},onSubmit:f.onSubmit(L,v)},e.createElement(d,{sx:{".friso-form":{display:"flex",flexWrap:"wrap",gap:"8px",".input-control":{width:"100%",marginBottom:0},".phone-input":{marginBottom:"0 !important",".PhoneInput":{marginBottom:"0 !important"}}}}},e.createElement(le,{inputOrder:a,customTerms:c,className:"friso-form"}))))))}));const de=Z.div`
19
19
  position: fixed;
20
20
  inset: 0;
21
21
  z-index: 1000;
@@ -157,7 +157,7 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
157
157
  &:not([data-active='true']) {
158
158
  display: none !important;
159
159
  }
160
- `,Ce=e=>W.object().shape({phone:W.string().required(e("onboarding.updatePhone.error")).default("")}),xe=Z(ve)`
160
+ `,Ce=e=>U.object().shape({phone:U.string().required(e("onboarding.updatePhone.error")).default("")}),xe=Z(ve)`
161
161
  .otp-input {
162
162
  margin-bottom: 36px;
163
163
  ${z.mbDown} {
@@ -190,7 +190,7 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
190
190
  margin-bottom: 3px;
191
191
  margin-left: 3px;
192
192
  }
193
- `,we=e=>W.object().shape({otp:W.string().required(e("onboarding.otpForm.error")).length(6,e("onboarding.otpForm.error")).default("")}),Se=e=>W.object().shape({email:W.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),name:W.string().required(e("onboarding.errorMessage.requiredName"))}),je=Z.div`
193
+ `,we=e=>U.object().shape({otp:U.string().required(e("onboarding.otpForm.error")).length(6,e("onboarding.otpForm.error")).default("")}),Se=e=>U.object().shape({email:U.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),name:U.string().required(e("onboarding.errorMessage.requiredName"))}),je=Z.div`
194
194
  margin-top: 70px;
195
195
  display: flex;
196
196
  flex-direction: column;
@@ -199,7 +199,7 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
199
199
  &.similac {
200
200
  margin-top: 16px;
201
201
  }
202
- `,Pe=Z(g)`
202
+ `,Me=Z(g)`
203
203
  &.hhg-comp-onboarding-container.hhg-comp-onboarding-container {
204
204
  display: flex;
205
205
  flex-direction: column;
@@ -240,9 +240,9 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
240
240
  .form-button {
241
241
  width: 100%;
242
242
  }
243
- `,Me=Z.img`
243
+ `,Pe=Z.img`
244
244
  margin-bottom: 38px;
245
- `,Oe=t=>{var n,{heading:o,description:a,children:i,className:l,imgSrc:s,hiddenLogo:m=!1}=t,d=_(t,["heading","description","children","className","imgSrc","hiddenLogo"]);const{isMarryBaby:c,siteType:p}=r(ne);return e.createElement(Pe,Object.assign({},d,{className:`hhg-comp-onboarding-container ${l}`,size:"sm"}),!m&&e.createElement($,{type:c?p:(null===(n=j[process.env.UNIFY_LOCALE])||void 0===n?void 0:n.LOGO_TYPE)||"hellobacsi"}),e.createElement(je,{className:m?"similac":""},s&&e.createElement(Me,{src:s,loading:"lazy"}),e.createElement("div",{className:"header"},e.createElement(u,{order:3},o),e.createElement(O,{size:"p3",mt:8,color:k.colors.gray600},a)),i))},ke=Z(ve)`
245
+ `,Oe=t=>{var n,{heading:o,description:a,children:i,className:l,imgSrc:s,hiddenLogo:m=!1}=t,d=_(t,["heading","description","children","className","imgSrc","hiddenLogo"]);const{isMarryBaby:c,siteType:p}=r(ne);return e.createElement(Me,Object.assign({},d,{className:`hhg-comp-onboarding-container ${l}`,size:"sm"}),!m&&e.createElement($,{type:c?p:(null===(n=j[process.env.UNIFY_LOCALE])||void 0===n?void 0:n.LOGO_TYPE)||"hellobacsi"}),e.createElement(je,{className:m?"similac":""},s&&e.createElement(Pe,{src:s,loading:"lazy"}),e.createElement("div",{className:"header"},e.createElement(u,{order:3},o),e.createElement(O,{size:"p3",mt:8,color:k.colors.gray600},a)),i))},ke=Z(ve)`
246
246
  .phone-input {
247
247
  width: 100%;
248
248
  margin-bottom: 32px;
@@ -262,7 +262,7 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
262
262
  &:not([data-active='true']) {
263
263
  display: none !important;
264
264
  }
265
- `,Fe=(e,t)=>W.object().shape({phone:W.string().required(e("onboarding.updatePhone.error")).default(""),name:W.string().required(e("onboarding.errorMessage.requiredName")),email:W.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),address:W.mixed().required(e("onboarding.similac.address.error")),term:t?W.bool():W.bool().oneOf([!0],e("onboarding.similac.term.error"))}),Be=Z(ve)`
265
+ `,Fe=(e,t)=>U.object().shape({phone:U.string().required(e("onboarding.updatePhone.error")).default(""),name:U.string().required(e("onboarding.errorMessage.requiredName")),email:U.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),address:U.mixed().required(e("onboarding.similac.address.error")),term:t?U.bool():U.bool().oneOf([!0],e("onboarding.similac.term.error"))}),Be=Z(ve)`
266
266
  .phone-input {
267
267
  width: 100%;
268
268
  margin-bottom: 32px;
@@ -282,4 +282,4 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
282
282
  &:not([data-active='true']) {
283
283
  display: none !important;
284
284
  }
285
- `,ze=e=>W.object().shape({password:W.string().required(e("onboarding.errorMessage.requiredPassword")).min(8,e("onboarding.errorMessage.minLength",{length:8})).matches(/.*[A-Z].*/,e("onboarding.errorMessage.passWithPattern")).default(""),confirmPassword:W.string().required(e("onboarding.errorMessage.requiredConfirmPassword")).oneOf([W.ref("password"),null],e("onboarding.errorMessage.passNotMatch")).default("")}),Ne={Provider:({children:t,siteType:n,setSharedData:r})=>{const[o,i]=a(0),[s,m]=a(0),[d,c]=a({});return l((()=>{null==r||r(d)}),[d,r]),e.createElement(ne.Provider,{value:{currentStep:o,setCurrentStep:i,setMaxStep:m,nextStep:()=>o+1<=s&&i(o+1),prevStep:()=>o-1>=0&&i(o-1),siteType:n,isMarryBaby:"marryBaby"===n,sharedData:d,setSharedData:c}},t)},Modal:t=>{var{children:n,withSimilac:o,banner:a,withPortal:i}=t,l=_(t,["children","withSimilac","banner","withPortal"]);const{isMobile:s}=w(),{isMarryBaby:m}=r(ne),{t:d}=H();if(i&&"undefined"==typeof window)return null;const c=e.createElement(de,Object.assign({},l),e.createElement(ce,null,e.createElement(p,{sx:{[z.mbDown]:{margin:0},".mantine-Grid-col":{[z.mbDown]:{padding:0}}}},e.createElement(p.Col,{span:"object"!=typeof a&&!o||s?12:6,order:o?2:1,orderMd:o?1:2,sx:{zIndex:o?99:void 0}},e.createElement(pe,{"data-similac":o,"data-has-banner":"object"==typeof a},n)),a&&"object"==typeof a&&!o&&e.createElement(p.Col,{span:s?12:6,order:1,orderMd:2},e.createElement(ue,null,e.createElement(ge,{"data-is-marry-baby":m},e.createElement(he,null,a.heading&&e.createElement(u,{order:1,mb:24},a.heading),a.description&&e.createElement(O,{size:"p1",color:k.colors.gray800},d("onboarding.welcomeScreen.content"))),e.createElement(be,null,a.imgSrc?e.createElement("img",{src:a.imgSrc,loading:"lazy"}):a.imgComponent?a.imgComponent:null)))),a&&"object"==typeof a&&o&&(a.imgSrc||a.imgComponent)&&e.createElement(p.Col,{span:"auto",order:1,orderMd:2},e.createElement(be,{className:"similac"},a.imgSrc?e.createElement("img",{src:a.imgSrc,loading:"lazy"}):a.imgComponent?a.imgComponent:null)))));return i?G(c,N()):c},Form:({onClose:t,onSubmit:n,canSkip:o=!0,customFormTexts:a,isActive:i,submitProps:l,submitLabel:s,skipProps:m,isWhatsApp:d})=>{const{t:c}=H(),{sharedData:p,setSharedData:u,nextStep:g}=r(ne),h=ae({initialValues:{phone:(null==p?void 0:p.phone)||""},validate:A(Ce(c))});return e.createElement(ye,{heading:(null==a?void 0:a.heading)||c("onboarding.updatePhone.heading"),description:(null==a?void 0:a.description)||c(d?"onboarding.updateWhatsapp.description":"onboarding.updatePhone.description"),"data-active":i},e.createElement(re,{form:h},e.createElement("form",{onSubmit:h.onSubmit((e=>q(void 0,void 0,void 0,(function*(){try{u((t=>Object.assign(Object.assign({},t),{phone:e.phone}))),yield null==n?void 0:n(e.phone),g()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(le,{inputOrder:["phone"]}),e.createElement(S,Object.assign({variant:"primary",fullWidth:!0,size:"lg"},d&&{leftIcon:e.createElement(K.WhatsApp,{size:18,useCurrentColor:!0})},l,{type:"submit","data-event-category":d?"OTP":"Sign Up","data-event-action":d?"Whatsapp - Fill phone and continue Click":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"}),s||c(d?"onboarding.updateWhatsapp.submitLabel":"onboarding.button.continue")),o&&e.createElement(S,Object.assign({variant:"ghost",fullWidth:!0,size:"lg"},d&&{dataEventCategory:"OTP",dataEventAction:"Whatsapp - Skip fill phone Click",dataEventLabel:"undefined"!=typeof window?window.location.href:""},m,{onClick:t,type:"button"}),c("onboarding.button.skip")))))},OtpForm:{Email:({onSubmit:t,email:n,onResendCode:o,otpError:m,onClose:d,loading:c,canSkip:p})=>{const{sharedData:{email:u,retryEmailCount:g},setSharedData:h,prevStep:b,siteType:E,isMarryBaby:f,nextStep:L}=r(ne),v=n||u||"",[y,C]=a(30),x=F((()=>C((e=>e-1))),1e3),[w,S]=B(0,{min:0,max:3}),j=i(!0),{t:P}=H();l((()=>(x.start(),x.stop)),[]),l((()=>{0===y&&(x.stop(),j.current=!1)}),[y]);const M=ae({initialValues:{otp:""},validate:A(we(P))});l((()=>{m&&M.setFieldError("otp",m)}),[m]);const O=s((()=>J((()=>{j.current||(S.increment(),C(30),null==o||o(v),x.start(),j.current=!0)}),1e3,{trailing:!1})),[v,o,x]),z=g>=2;return e.createElement(xe,{heading:P("onboarding.otpForm.heading"),description:e.createElement(e.Fragment,null,e.createElement("span",{dangerouslySetInnerHTML:{__html:P("onboarding.otpForm.descriptionEmail",{email:`<b style="color:${k.colors.gray800}">${I(v)}</b>`})}}),!z&&e.createElement("svg",{onClick:()=>{g>=2||(h((e=>Object.assign(Object.assign({},e),{retryEmailCount:e.retryEmailCount+1}))),b())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"otp-description-edit-icon"},e.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},e.createElement(re,{form:M},e.createElement("form",{onSubmit:M.onSubmit((e=>q(void 0,void 0,void 0,(function*(){try{S.increment();!(yield null==t?void 0:t(e.otp))&&L()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(le,{inputOrder:["otp"]}),e.createElement("div",{className:"resend"},e.createElement(X,{size:"p4",color:k.colors.gray400},P("onboarding.otpForm.notReceiveOTP")),e.createElement(X,{as:"a",size:"p4",color:f?k.mbColors.pink:k.colors.primaryBase,onClick:O},P("onboarding.otpForm.resendCode",{seconds:y}))),e.createElement(Q,{theme:E,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:c,disabled:c,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},P("onboarding.button.continue")),p&&w>=3&&e.createElement(Q,{theme:E,color:"ghost",isBlock:!0,size:"lg",onClick:d,type:"button"},P("onboarding.button.skip")))))},Phone:({onSubmit:t,phone:n,onResendCode:o,otpError:m,onClose:d,loading:c,canSkip:p,isWhatsApp:u})=>{const{sharedData:{phone:g,retryPhoneCount:E},setSharedData:f,prevStep:L,siteType:v,isMarryBaby:y,nextStep:C}=r(ne),x=n||g||"",[w,S]=a(30),j=F((()=>S((e=>e-1))),1e3),[M,z]=B(0,{min:0,max:3}),N=i(!0),{t:T}=H();l((()=>(j.start(),j.stop)),[]),l((()=>{0===w&&(j.stop(),N.current=!1)}),[w]);const I=ae({initialValues:{otp:""},validate:A(we(T))});l((()=>{m&&I.setFieldError("otp",m)}),[m]);const D=s((()=>J((()=>{N.current||(z.increment(),S(30),null==o||o(x),j.start(),N.current=!0)}),1e3,{trailing:!1})),[x,o,j]),Z=E>=2,_=`<b style="color:${k.colors.gray800}">${x.slice(0,-3).replace(/./g,"x").concat(x.slice(-3))}</b>`;return e.createElement(xe,{heading:u?e.createElement(h,{align:"center",justify:"center",gap:b(8)},e.createElement("img",{style:{width:b(24)},loading:"lazy",src:P.getAssetPath("whatsapp.svg"),alt:"whatsapp"}),e.createElement("span",null,T("onboarding.otpWhatsapps.heading"))):T("onboarding.otpForm.heading"),description:e.createElement(e.Fragment,null,e.createElement("span",{dangerouslySetInnerHTML:{__html:T(u?"onboarding.otpWhatsapps.description":"onboarding.otpForm.description",{phone:_})}}),!Z&&e.createElement("svg",{onClick:()=>{E>=2||(f((e=>Object.assign(Object.assign({},e),{retryPhoneCount:e.retryPhoneCount+1}))),L())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"otp-description-edit-icon"},e.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},e.createElement(re,{form:I},e.createElement("form",{onSubmit:I.onSubmit((e=>q(void 0,void 0,void 0,(function*(){try{z.increment();!(yield null==t?void 0:t(e.otp))&&C()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(le,{inputOrder:["otp"]}),e.createElement("div",{className:"resend"},e.createElement(O,{size:"p4",color:k.colors.gray400},T("onboarding.otpForm.notReceiveOTP")),e.createElement(O,{as:"a",size:"p4",color:y?k.mbColors.pink:k.colors.primaryBase,onClick:D},T("onboarding.otpForm.resendCode",{seconds:w}))),e.createElement(Q,{theme:v,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:c,disabled:c,"data-event-category":u?"OTP":"Sign Up","data-event-action":u?"Whatsapp - OTP verified Click":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},T("onboarding.button.continue")),p&&M>=3&&e.createElement(Q,{theme:v,color:"ghost",isBlock:!0,size:"lg",onClick:d,type:"button"},T("onboarding.button.skip")))))}},PersonalInfoForm:({onClose:t,onSubmit:n,canSkip:o,loading:a,errorMessage:i,initialData:s})=>{const{t:m,locale:d}=H(),{siteType:c,isMarryBaby:p,setSharedData:u,nextStep:g}=r(ne),h=ae({validate:A(Se(m))});return l((()=>{h.setValues(Object.assign(Object.assign({gender:"0"},s),(null==s?void 0:s.birthday)&&{birthday:new Date(s.birthday)}))}),[s]),l((()=>{i&&h.setFieldError("email",i)}),[i]),e.createElement(Oe,{heading:m("onboarding.formEmail.heading"),description:m("onboarding.formEmail.description",{site:p?"Marry Baby":j[d].SITE_NAME_FORMATTED})},e.createElement(re,{form:h},e.createElement("form",{className:"form",onSubmit:h.onSubmit((e=>q(void 0,void 0,void 0,(function*(){u((t=>Object.assign(Object.assign({},t),e)));!(yield null==n?void 0:n(Object.assign(Object.assign({},e),{birthday:e.birthday&&ee(e.birthday,"yyyy-MM-dd")})))&&g()}))),(e=>{console.log({fieldErrors:e})}))},e.createElement(le,{inputOrder:["full_name","email","dob","gender"]}),e.createElement(Q,{color:"primary",isBlock:!0,size:"lg",type:"submit",theme:c,isLoading:a,disabled:a},m("onboarding.button.continue")),o&&e.createElement(Q,{theme:c,color:"ghost",isBlock:!0,size:"lg",onClick:t,type:"button"},m("onboarding.button.skip")))))},ResultScreen:t=>{var{onClose:n}=t,o=_(t,["onClose"]);const{t:a}=H(),{siteType:i}=r(ne);return e.createElement(Oe,Object.assign({},o),e.createElement(Q,{theme:i,size:"lg",onClick:n,className:"form-button"},a("onboarding.button.continue")))},SimilacForm:t=>{var{onClose:n,onSubmit:o,canSkip:a=!0,customFormTexts:i,customTerms:l,defaultValues:s,isActive:m}=t,d=_(t,["onClose","onSubmit","canSkip","customFormTexts","customTerms","defaultValues","isActive"]);const{t:c}=H(),{nextStep:p,setSharedData:u,sharedData:g}=r(ne),{isMobile:h}=w(),b=ae({initialValues:{term:!1,phone:(null==g?void 0:g.phone)||(null==s?void 0:s.phone)||"",email:(null==g?void 0:g.email)||(null==s?void 0:s.email)||"",name:(null==g?void 0:g.name)||(null==s?void 0:s.name)||""},validate:A(Fe(c,!l))}),E=(null==s?void 0:s.email)?["full_name","phone","address","term"]:["full_name","email","phone","address","term"];return e.createElement(ke,Object.assign({heading:(null==i?void 0:i.heading)||c("onboarding.updatePhone.heading"),description:(null==i?void 0:i.description)||c("onboarding.updatePhone.description"),hiddenLogo:h,"data-active":m},d),e.createElement(re,{form:b},e.createElement("form",{style:{width:"100%"},onSubmit:b.onSubmit((e=>q(void 0,void 0,void 0,(function*(){try{yield null==o?void 0:o(e),u((t=>Object.assign(Object.assign({},t),{phone:e.phone,email:e.email,name:e.name}))),p()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(le,{inputOrder:E,withSimilac:!0,customTerms:l}),e.createElement(S,{fullWidth:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},c("onboarding.button.continue")),a&&e.createElement(S,{variant:"ghost",fullWidth:!0,size:"lg",onClick:n,type:"button"},c("onboarding.button.skip")))))},FrisoForm:me,UpdatePasswordForm:({onClose:t,onSubmit:n,canSkip:o,errorMessage:a,loading:i})=>{const{t:l}=H(),{nextStep:s}=r(ne),m=ae({initialValues:{password:"",confirmPassword:""},validate:A(ze(l))});return e.createElement(Oe,{heading:l("onboarding.updatePassword.heading"),description:l("onboarding.updatePassword.description")},e.createElement(re,{form:m},e.createElement("form",{className:"form",onSubmit:m.onSubmit((e=>q(void 0,void 0,void 0,(function*(){yield n((null==e?void 0:e.password)||""),!a&&s()}))),(e=>{console.log({fieldErrors:e})}))},e.createElement(le,{inputOrder:["password","confirm_password"]}),e.createElement(Q,{color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:i,disabled:i},l("onboarding.button.continue")),o&&e.createElement(Q,{color:"ghost",isBlock:!0,size:"lg",onClick:t},l("onboarding.button.skip")),a&&e.createElement(c.Error,{className:"form-error"},a))))},StepRenderer:({children:t,onStepChange:n})=>{const{currentStep:o,setMaxStep:a}=r(ne),i=e.Children.count(t);return l((()=>{null==n||n(o)}),[o]),l((()=>{a(i-1)}),[i]),e.createElement(e.Fragment,null,te(t).map(((t,n)=>{const r=n===o;return e.createElement(m,{key:n},e.isValidElement(t)?t.props.alwaysRender||r?e.cloneElement(t,{isActive:n===o,stepIndex:n}):null:r?t:null)})))},ThankYou:t=>{var{onClose:n,thanksPageInfo:r,isActive:o}=t,a=_(t,["onClose","thanksPageInfo","isActive"]);const{t:i}=H(),{isMobile:l}=w();return e.createElement(Be,Object.assign({heading:"",description:"",hiddenLogo:l,"data-active":o},a),e.createElement(g,{fluid:!0},e.createElement(E,{align:"center",spacing:8,w:"100%",ta:"center"},e.createElement(f,{ratio:1,w:{base:120,md:160}},e.createElement("svg",{width:"160",height:"160",viewBox:"0 0 160 160",fill:"none"},e.createElement("mask",{id:"mask0_4580_96805",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"160",height:"160"},e.createElement("circle",{cx:"80",cy:"80",r:"80",fill:"url(#paint0_radial_4580_96805)"})),e.createElement("g",{mask:"url(#mask0_4580_96805)"},e.createElement("path",{d:"M71.5938 0.45906L76.9763 38.1373C77.0115 38.1373 77.0819 38.1373 77.1171 38.102L82.3589 75.0033L87.5656 38.0666C87.6008 38.0666 87.636 38.0666 87.636 38.0666L92.8426 1.02406C88.6562 0.353123 84.3642 0 80.0018 0C77.1522 0 74.3378 0.141249 71.5938 0.45906Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M131.15 18.5391C125.733 14.0191 119.682 10.1701 113.173 7.20386L97.8699 41.0683C97.9051 41.0683 97.9403 41.1037 97.9403 41.1037L82.4609 75.2859L131.15 18.5391Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M46.4386 64.8334L82.1114 75.3212H81.9707L82.3225 75.4271H82.3577L82.3928 75.3918L82.428 75.4271H82.3928L82.428 75.4624H82.4632L82.6039 75.5331L82.4984 75.4624L118.347 85.9855C118.347 86.0208 118.347 86.0208 118.312 86.0561L158.101 97.8151C159.332 92.2005 160.001 86.3386 160.001 80.3355C160.001 78.6758 159.93 76.9809 159.86 75.3565H119.825C119.825 75.3918 119.825 75.3918 119.825 75.4271L82.4632 75.4624V75.4271L82.6391 75.3918L82.4984 75.4624L82.815 75.3565H82.6391L155.497 53.6394C153.07 46.7182 149.728 40.2208 145.612 34.2883L82.6391 75.2859H82.4984L82.5687 75.2152L82.4632 75.2859L82.4984 75.074L82.428 75.2152V75.2506L82.3928 75.2859V75.2506H82.3225V75.2152L82.2521 75.074L82.2873 75.2506L82.2169 75.2152L82.2521 75.2506H82.1114L15.7614 32.4167C11.2231 38.5258 7.52917 45.341 4.85547 52.6154L46.4386 64.8334ZM82.3225 75.3918V75.4271L82.2169 75.3565L82.3225 75.3918Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M57.8032 46.9301L82.2887 75.2506L66.7741 41.1036L50.556 5.61475C43.6607 8.33379 37.2579 12.0063 31.4531 16.4556L57.8032 46.9301Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M113.877 95.8023L82.5312 75.5684L106.982 103.854C106.946 103.854 106.946 103.889 106.911 103.889L136.005 137.647C141.529 132.209 146.243 125.994 150.042 119.179L113.877 95.8023Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.3203 75.427V75.4627H82.356L82.3203 75.427H82.356H82.3203Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.2857 75.4623L82.321 75.427H82.2857L82.1445 75.4976L82.2857 75.4623Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.2164 75.5684L50.9411 95.9436C50.906 95.9082 50.906 95.8729 50.8708 95.8376L11.3281 121.51C15.4794 128.501 20.6861 134.787 26.7019 140.19L62.5858 98.4507L82.2164 75.5684Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M46.438 86.0559L82.2867 75.3916L0.140721 75.4975C0.0351803 77.0866 0 78.6756 0 80.3C0 86.7975 0.773967 93.1184 2.21636 99.1921L46.438 86.0559C46.438 86.0912 46.438 86.0912 46.438 86.0559Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.2507 75.7095L47 153.467C54.2823 156.786 62.1275 159.011 70.3949 160L82.2507 75.7095Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.4609 75.7095L94.3519 159.329C102.373 157.881 109.972 155.233 116.938 151.56L82.4609 75.7095Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.3203 75.5684L82.3556 75.8509L82.4262 75.5684L82.3556 75.4978L82.3203 75.5684Z",fill:"#E0F8EE"})),e.createElement("path",{d:"M124.694 61.2L124.986 62.1726C125.083 62.6589 125.472 62.9507 125.959 63.1452L126.931 63.437L125.959 63.8261C125.569 63.9234 125.18 64.3124 125.083 64.7015L124.694 65.7714L124.305 64.7015C124.111 64.3124 123.819 64.0206 123.43 63.8261L122.457 63.5343L123.43 63.2425C123.819 63.1452 124.111 62.7562 124.305 62.3671L124.694 61.2Z",fill:"#2D87F3"}),e.createElement("path",{d:"M104.744 34.2856L104.915 34.8571C104.973 35.1428 105.201 35.3142 105.487 35.4285L106.058 35.5999L105.487 35.8285C105.258 35.8856 105.03 36.1142 104.973 36.3428L104.744 36.9714L104.515 36.3428C104.401 36.1142 104.23 35.9428 104.001 35.8285L103.43 35.6571L104.001 35.4856C104.23 35.4285 104.401 35.1999 104.515 34.9714L104.744 34.2856Z",fill:"#00B16A"}),e.createElement("path",{d:"M118.345 38L119.088 40.4C119.431 41.4857 120.288 42.3429 121.317 42.6286L123.717 43.3714L121.259 44.2286C120.231 44.5714 119.488 45.3714 119.145 46.3429L118.288 48.8L117.317 46.2286C116.974 45.2571 116.174 44.5143 115.202 44.1714L112.859 43.3714L115.145 42.5714C116.117 42.2286 116.859 41.4857 117.259 40.5714L118.345 38Z",fill:"#FFB521"}),e.createElement("path",{d:"M41.8846 98.8572L42.056 99.4286C42.1132 99.7143 42.3417 99.8857 42.6275 100L43.1989 100.171L42.6275 100.4C42.3989 100.457 42.1703 100.686 42.1132 100.914L41.8846 101.543L41.656 100.914C41.5417 100.686 41.3703 100.514 41.1417 100.4L40.5703 100.229L41.1417 100.057C41.3703 100 41.5417 99.7715 41.656 99.5429L41.8846 98.8572Z",fill:"#00B16A"}),e.createElement("path",{d:"M64.5717 125.314L65.3145 127.714C65.6574 128.8 66.5145 129.657 67.5431 129.943L69.9431 130.686L67.4859 131.543C66.4574 131.886 65.7145 132.686 65.3717 133.657L64.5145 136.114L63.5431 133.543C63.2002 132.571 62.4002 131.828 61.4288 131.486L59.0859 130.686L61.3717 129.886C62.3431 129.543 63.0859 128.8 63.4859 127.886L64.5717 125.314Z",fill:"#FFB521"}),e.createElement("path",{d:"M80.9708 120.343L81.2565 121.314C81.3708 121.771 81.7708 122.114 82.1708 122.228L83.1993 122.514L82.1708 122.857C81.7708 122.971 81.4279 123.314 81.3136 123.714L80.9708 124.743L80.5708 123.657C80.3993 123.257 80.1136 122.914 79.7136 122.8L78.7422 122.457L79.7136 122.114C80.1136 122 80.3993 121.657 80.5708 121.314L80.9708 120.343Z",fill:"#2D87F3"}),e.createElement("path",{d:"M130.307 98.2856L130.529 99.0426C130.619 99.3988 130.93 99.666 131.242 99.755L132.043 99.9777L131.242 100.245C130.93 100.334 130.663 100.601 130.574 100.913L130.307 101.714L129.995 100.868C129.862 100.557 129.639 100.289 129.327 100.2L128.57 99.9331L129.327 99.666C129.639 99.5769 129.862 99.3098 129.995 99.0426L130.307 98.2856Z",fill:"#00B16A"}),e.createElement("path",{d:"M36.592 64L36.8147 64.757C36.9037 65.1132 37.2154 65.3803 37.5271 65.4694L38.3286 65.692L37.5271 65.9592C37.2154 66.0482 36.9482 66.3154 36.8592 66.6271L36.592 67.4286L36.2803 66.5826C36.1467 66.2709 35.9241 66.0037 35.6124 65.9147L34.8555 65.6475L35.6124 65.3803C35.9241 65.2913 36.1467 65.0241 36.2803 64.757L36.592 64Z",fill:"#FFB521"}),e.createElement("path",{d:"M67.3816 26.8572L67.6734 27.8298C67.7707 28.3161 68.1597 28.6079 68.646 28.8025L69.6187 29.0942L68.646 29.4833C68.257 29.5806 67.8679 29.9696 67.7707 30.3587L67.3816 31.4286L66.9926 30.3587C66.798 29.9696 66.5062 29.6778 66.1172 29.4833L65.1445 29.1915L66.1172 28.8997C66.5062 28.8025 66.798 28.4134 66.9926 28.0243L67.3816 26.8572Z",fill:"#2D87F3"}),e.createElement("path",{d:"M80.0011 108.572C95.7807 108.572 108.573 95.7797 108.573 80.0001C108.573 64.2206 95.7807 51.4287 80.0011 51.4287C64.2216 51.4287 51.4297 64.2206 51.4297 80.0001C51.4297 95.7797 64.2216 108.572 80.0011 108.572Z",fill:"#00B16A"}),e.createElement("path",{d:"M78.5808 89.1451C77.3597 89.147 76.1503 88.908 75.0217 88.4418C73.8932 87.9757 72.8677 87.2914 72.0039 86.4283L68.6389 83.0617C68.1939 82.6009 67.9477 81.9838 67.9532 81.3432C67.9588 80.7027 68.2157 80.0899 68.6687 79.6369C69.1217 79.1839 69.7344 78.927 70.375 78.9214C71.0156 78.9159 71.6327 79.1621 72.0935 79.6071L75.4585 82.9738C75.8649 83.3802 76.3473 83.7025 76.8783 83.9225C77.4093 84.1424 77.9784 84.2556 78.5531 84.2556C79.1278 84.2556 79.6969 84.1424 80.2279 83.9225C80.7589 83.7025 81.2413 83.3802 81.6477 82.9738L102.984 63.6911C103.468 63.2745 104.095 63.0635 104.732 63.1034C105.369 63.1433 105.965 63.4308 106.392 63.9044C106.82 64.3781 107.046 65.0003 107.02 65.6379C106.995 66.2756 106.722 66.8781 106.258 67.3166L85.0046 86.513C84.1599 87.3531 83.1576 88.0181 82.0552 88.4698C80.9528 88.9215 79.7721 89.151 78.5808 89.1451Z",fill:"white"}),e.createElement("defs",null,e.createElement("radialGradient",{id:"paint0_radial_4580_96805",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(80 80) rotate(90) scale(80)"},e.createElement("stop",{stopColor:"#C4C4C4"}),e.createElement("stop",{offset:"1",stopColor:"#C4C4C4",stopOpacity:"0"}))))),e.createElement(V,{tag:"h3"},null==r?void 0:r.title),e.createElement(O,{size:"p3",color:"gray.6"},null==r?void 0:r.description),e.createElement(S,{mt:{base:16,md:24},fullWidth:l,size:"lg",onClick:n},i("similac.thankYou.done")))))}};export{le as DynamicForm,Ne as Onboarding,ne as OnboardingContext};
285
+ `,ze=e=>U.object().shape({password:U.string().required(e("onboarding.errorMessage.requiredPassword")).min(8,e("onboarding.errorMessage.minLength",{length:8})).matches(/.*[A-Z].*/,e("onboarding.errorMessage.passWithPattern")).default(""),confirmPassword:U.string().required(e("onboarding.errorMessage.requiredConfirmPassword")).oneOf([U.ref("password"),null],e("onboarding.errorMessage.passNotMatch")).default("")}),Ne={Provider:({children:t,siteType:n,setSharedData:r})=>{const[o,i]=a(0),[s,m]=a(0),[d,c]=a({});return l((()=>{null==r||r(d)}),[d,r]),e.createElement(ne.Provider,{value:{currentStep:o,setCurrentStep:i,setMaxStep:m,nextStep:()=>o+1<=s&&i(o+1),prevStep:()=>o-1>=0&&i(o-1),siteType:n,isMarryBaby:"marryBaby"===n,sharedData:d,setSharedData:c}},t)},Modal:t=>{var{children:n,withSimilac:o,banner:a,withPortal:i}=t,l=_(t,["children","withSimilac","banner","withPortal"]);const{isMobile:s}=w(),{isMarryBaby:m}=r(ne),{t:d}=H();if(i&&"undefined"==typeof window)return null;const c=e.createElement(de,Object.assign({},l),e.createElement(ce,null,e.createElement(p,{sx:{[z.mbDown]:{margin:0},".mantine-Grid-col":{[z.mbDown]:{padding:0}}}},e.createElement(p.Col,{span:"object"!=typeof a&&!o||s?12:6,order:o?2:1,orderMd:o?1:2,sx:{zIndex:o?99:void 0}},e.createElement(pe,{"data-similac":o,"data-has-banner":"object"==typeof a},n)),a&&"object"==typeof a&&!o&&e.createElement(p.Col,{span:s?12:6,order:1,orderMd:2},e.createElement(ue,null,e.createElement(ge,{"data-is-marry-baby":m},e.createElement(he,null,a.heading&&e.createElement(u,{order:1,mb:24},a.heading),a.description&&e.createElement(O,{size:"p1",color:k.colors.gray800},d("onboarding.welcomeScreen.content"))),e.createElement(be,null,a.imgSrc?e.createElement("img",{src:a.imgSrc,loading:"lazy"}):a.imgComponent?a.imgComponent:null)))),a&&"object"==typeof a&&o&&(a.imgSrc||a.imgComponent)&&e.createElement(p.Col,{span:"auto",order:1,orderMd:2},e.createElement(be,{className:"similac"},a.imgSrc?e.createElement("img",{src:a.imgSrc,loading:"lazy"}):a.imgComponent?a.imgComponent:null)))));return i?G(c,N()):c},Form:({onClose:t,onSubmit:n,canSkip:o=!0,customFormTexts:a,isActive:i,submitProps:l,submitLabel:s,skipProps:m,isWhatsApp:d})=>{const{t:c}=H(),{sharedData:p,setSharedData:u,nextStep:g}=r(ne),h=ae({initialValues:{phone:(null==p?void 0:p.phone)||""},validate:A(Ce(c))});return e.createElement(ye,{heading:(null==a?void 0:a.heading)||c("onboarding.updatePhone.heading"),description:(null==a?void 0:a.description)||c(d?"onboarding.updateWhatsapp.description":"onboarding.updatePhone.description"),"data-active":i},e.createElement(re,{form:h},e.createElement("form",{onSubmit:h.onSubmit((e=>q(void 0,void 0,void 0,(function*(){try{u((t=>Object.assign(Object.assign({},t),{phone:e.phone}))),yield null==n?void 0:n(e.phone),g()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(le,{inputOrder:["phone"]}),e.createElement(S,Object.assign({variant:"primary",fullWidth:!0,size:"lg"},d&&{leftIcon:e.createElement(K.WhatsApp,{size:18,useCurrentColor:!0})},l,{type:"submit","data-event-category":d?"OTP":"Sign Up","data-event-action":d?"Whatsapp - Fill phone and continue Click":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"}),s||c(d?"onboarding.updateWhatsapp.submitLabel":"onboarding.button.continue")),o&&e.createElement(S,Object.assign({variant:"ghost",fullWidth:!0,size:"lg"},d&&{dataEventCategory:"OTP",dataEventAction:"Whatsapp - Skip fill phone Click",dataEventLabel:"undefined"!=typeof window?window.location.href:""},m,{onClick:t,type:"button"}),c("onboarding.button.skip")))))},OtpForm:{Email:({onSubmit:t,email:n,onResendCode:o,otpError:m,onClose:d,loading:c,canSkip:p})=>{const{sharedData:{email:u,retryEmailCount:g},setSharedData:h,prevStep:b,siteType:E,isMarryBaby:f,nextStep:L}=r(ne),v=n||u||"",[y,C]=a(30),x=F((()=>C((e=>e-1))),1e3),[w,S]=B(0,{min:0,max:3}),j=i(!0),{t:M}=H();l((()=>(x.start(),x.stop)),[]),l((()=>{0===y&&(x.stop(),j.current=!1)}),[y]);const P=ae({initialValues:{otp:""},validate:A(we(M))});l((()=>{m&&P.setFieldError("otp",m)}),[m]);const O=s((()=>J((()=>{j.current||(S.increment(),C(30),null==o||o(v),x.start(),j.current=!0)}),1e3,{trailing:!1})),[v,o,x]),z=g>=2;return e.createElement(xe,{heading:M("onboarding.otpForm.heading"),description:e.createElement(e.Fragment,null,e.createElement("span",{dangerouslySetInnerHTML:{__html:M("onboarding.otpForm.descriptionEmail",{email:`<b style="color:${k.colors.gray800}">${I(v)}</b>`})}}),!z&&e.createElement("svg",{onClick:()=>{g>=2||(h((e=>Object.assign(Object.assign({},e),{retryEmailCount:e.retryEmailCount+1}))),b())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"otp-description-edit-icon"},e.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},e.createElement(re,{form:P},e.createElement("form",{onSubmit:P.onSubmit((e=>q(void 0,void 0,void 0,(function*(){try{S.increment();!(yield null==t?void 0:t(e.otp))&&L()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(le,{inputOrder:["otp"]}),e.createElement("div",{className:"resend"},e.createElement(X,{size:"p4",color:k.colors.gray400},M("onboarding.otpForm.notReceiveOTP")),e.createElement(X,{as:"a",size:"p4",color:f?k.mbColors.pink:k.colors.primaryBase,onClick:O},M("onboarding.otpForm.resendCode",{seconds:y}))),e.createElement(Q,{theme:E,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:c,disabled:c,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},M("onboarding.button.continue")),p&&w>=3&&e.createElement(Q,{theme:E,color:"ghost",isBlock:!0,size:"lg",onClick:d,type:"button"},M("onboarding.button.skip")))))},Phone:({onSubmit:t,phone:n,onResendCode:o,otpError:m,onClose:d,loading:c,canSkip:p,isWhatsApp:u})=>{const{sharedData:{phone:g,retryPhoneCount:E},setSharedData:f,prevStep:L,siteType:v,isMarryBaby:y,nextStep:C}=r(ne),x=n||g||"",[w,S]=a(30),j=F((()=>S((e=>e-1))),1e3),[M,z]=B(0,{min:0,max:3}),N=i(!0),{t:T}=H();l((()=>(j.start(),j.stop)),[]),l((()=>{0===w&&(j.stop(),N.current=!1)}),[w]);const I=ae({initialValues:{otp:""},validate:A(we(T))});l((()=>{m&&I.setFieldError("otp",m)}),[m]);const D=s((()=>J((()=>{N.current||(z.increment(),S(30),null==o||o(x),j.start(),N.current=!0)}),1e3,{trailing:!1})),[x,o,j]),Z=E>=2,_=`<b style="color:${k.colors.gray800}">${x.slice(0,-3).replace(/./g,"x").concat(x.slice(-3))}</b>`;return e.createElement(xe,{heading:u?e.createElement(h,{align:"center",justify:"center",gap:b(8)},e.createElement("img",{style:{width:b(24)},loading:"lazy",src:P.getAssetPath("whatsapp.svg"),alt:"whatsapp"}),e.createElement("span",null,T("onboarding.otpWhatsapps.heading"))):T("onboarding.otpForm.heading"),description:e.createElement(e.Fragment,null,e.createElement("span",{dangerouslySetInnerHTML:{__html:T(u?"onboarding.otpWhatsapps.description":"onboarding.otpForm.description",{phone:_})}}),!Z&&e.createElement("svg",{onClick:()=>{E>=2||(f((e=>Object.assign(Object.assign({},e),{retryPhoneCount:e.retryPhoneCount+1}))),L())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"otp-description-edit-icon"},e.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},e.createElement(re,{form:I},e.createElement("form",{onSubmit:I.onSubmit((e=>q(void 0,void 0,void 0,(function*(){try{z.increment();!(yield null==t?void 0:t(e.otp))&&C()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(le,{inputOrder:["otp"]}),e.createElement("div",{className:"resend"},e.createElement(O,{size:"p4",color:k.colors.gray400},T("onboarding.otpForm.notReceiveOTP")),e.createElement(O,{as:"a",size:"p4",color:y?k.mbColors.pink:k.colors.primaryBase,onClick:D},T("onboarding.otpForm.resendCode",{seconds:w}))),e.createElement(Q,{theme:v,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:c,disabled:c,"data-event-category":u?"OTP":"Sign Up","data-event-action":u?"Whatsapp - OTP verified Click":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},T("onboarding.button.continue")),p&&M>=3&&e.createElement(Q,{theme:v,color:"ghost",isBlock:!0,size:"lg",onClick:d,type:"button"},T("onboarding.button.skip")))))}},PersonalInfoForm:({onClose:t,onSubmit:n,canSkip:o,loading:a,errorMessage:i,initialData:s})=>{const{t:m,locale:d}=H(),{siteType:c,isMarryBaby:p,setSharedData:u,nextStep:g}=r(ne),h=ae({validate:A(Se(m))});return l((()=>{h.setValues(Object.assign(Object.assign({gender:"0"},s),(null==s?void 0:s.birthday)&&{birthday:new Date(s.birthday)}))}),[s]),l((()=>{i&&h.setFieldError("email",i)}),[i]),e.createElement(Oe,{heading:m("onboarding.formEmail.heading"),description:m("onboarding.formEmail.description",{site:p?"Marry Baby":j[d].SITE_NAME_FORMATTED})},e.createElement(re,{form:h},e.createElement("form",{className:"form",onSubmit:h.onSubmit((e=>q(void 0,void 0,void 0,(function*(){u((t=>Object.assign(Object.assign({},t),e)));!(yield null==n?void 0:n(Object.assign(Object.assign({},e),{birthday:e.birthday&&ee(e.birthday,"yyyy-MM-dd")})))&&g()}))),(e=>{console.log({fieldErrors:e})}))},e.createElement(le,{inputOrder:["full_name","email","dob","gender"]}),e.createElement(Q,{color:"primary",isBlock:!0,size:"lg",type:"submit",theme:c,isLoading:a,disabled:a},m("onboarding.button.continue")),o&&e.createElement(Q,{theme:c,color:"ghost",isBlock:!0,size:"lg",onClick:t,type:"button"},m("onboarding.button.skip")))))},ResultScreen:t=>{var{onClose:n}=t,o=_(t,["onClose"]);const{t:a}=H(),{siteType:i}=r(ne);return e.createElement(Oe,Object.assign({},o),e.createElement(Q,{theme:i,size:"lg",onClick:n,className:"form-button"},a("onboarding.button.continue")))},SimilacForm:t=>{var{onClose:n,onSubmit:o,canSkip:a=!0,customFormTexts:i,customTerms:l,defaultValues:s,isActive:m}=t,d=_(t,["onClose","onSubmit","canSkip","customFormTexts","customTerms","defaultValues","isActive"]);const{t:c}=H(),{nextStep:p,setSharedData:u,sharedData:g}=r(ne),{isMobile:h}=w(),b=ae({initialValues:{term:!1,phone:(null==g?void 0:g.phone)||(null==s?void 0:s.phone)||"",email:(null==g?void 0:g.email)||(null==s?void 0:s.email)||"",name:(null==g?void 0:g.name)||(null==s?void 0:s.name)||""},validate:A(Fe(c,!l))}),E=(null==s?void 0:s.email)?["full_name","phone","address","term"]:["full_name","email","phone","address","term"];return e.createElement(ke,Object.assign({heading:(null==i?void 0:i.heading)||c("onboarding.updatePhone.heading"),description:(null==i?void 0:i.description)||c("onboarding.updatePhone.description"),hiddenLogo:h,"data-active":m},d),e.createElement(re,{form:b},e.createElement("form",{style:{width:"100%"},onSubmit:b.onSubmit((e=>q(void 0,void 0,void 0,(function*(){try{yield null==o?void 0:o(e),u((t=>Object.assign(Object.assign({},t),{phone:e.phone,email:e.email,name:e.name}))),p()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(le,{inputOrder:E,withSimilac:!0,customTerms:l}),e.createElement(S,{fullWidth:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},c("onboarding.button.continue")),a&&e.createElement(S,{variant:"ghost",fullWidth:!0,size:"lg",onClick:n,type:"button"},c("onboarding.button.skip")))))},FrisoForm:me,UpdatePasswordForm:({onClose:t,onSubmit:n,canSkip:o,errorMessage:a,loading:i})=>{const{t:l}=H(),{nextStep:s}=r(ne),m=ae({initialValues:{password:"",confirmPassword:""},validate:A(ze(l))});return e.createElement(Oe,{heading:l("onboarding.updatePassword.heading"),description:l("onboarding.updatePassword.description")},e.createElement(re,{form:m},e.createElement("form",{className:"form",onSubmit:m.onSubmit((e=>q(void 0,void 0,void 0,(function*(){yield n((null==e?void 0:e.password)||""),!a&&s()}))),(e=>{console.log({fieldErrors:e})}))},e.createElement(le,{inputOrder:["password","confirm_password"]}),e.createElement(Q,{color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:i,disabled:i},l("onboarding.button.continue")),o&&e.createElement(Q,{color:"ghost",isBlock:!0,size:"lg",onClick:t},l("onboarding.button.skip")),a&&e.createElement(c.Error,{className:"form-error"},a))))},StepRenderer:({children:t,onStepChange:n})=>{const{currentStep:o,setMaxStep:a}=r(ne),i=e.Children.count(t);return l((()=>{null==n||n(o)}),[o]),l((()=>{a(i-1)}),[i]),e.createElement(e.Fragment,null,te(t).map(((t,n)=>{const r=n===o;return e.createElement(m,{key:n},e.isValidElement(t)?t.props.alwaysRender||r?e.cloneElement(t,{isActive:n===o,stepIndex:n}):null:r?t:null)})))},ThankYou:t=>{var{onClose:n,thanksPageInfo:r,isActive:o}=t,a=_(t,["onClose","thanksPageInfo","isActive"]);const{t:i}=H(),{isMobile:l}=w();return e.createElement(Be,Object.assign({heading:"",description:"",hiddenLogo:l,"data-active":o},a),e.createElement(g,{fluid:!0},e.createElement(E,{align:"center",spacing:8,w:"100%",ta:"center"},e.createElement(f,{ratio:1,w:{base:120,md:160}},e.createElement("svg",{width:"160",height:"160",viewBox:"0 0 160 160",fill:"none"},e.createElement("mask",{id:"mask0_4580_96805",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"160",height:"160"},e.createElement("circle",{cx:"80",cy:"80",r:"80",fill:"url(#paint0_radial_4580_96805)"})),e.createElement("g",{mask:"url(#mask0_4580_96805)"},e.createElement("path",{d:"M71.5938 0.45906L76.9763 38.1373C77.0115 38.1373 77.0819 38.1373 77.1171 38.102L82.3589 75.0033L87.5656 38.0666C87.6008 38.0666 87.636 38.0666 87.636 38.0666L92.8426 1.02406C88.6562 0.353123 84.3642 0 80.0018 0C77.1522 0 74.3378 0.141249 71.5938 0.45906Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M131.15 18.5391C125.733 14.0191 119.682 10.1701 113.173 7.20386L97.8699 41.0683C97.9051 41.0683 97.9403 41.1037 97.9403 41.1037L82.4609 75.2859L131.15 18.5391Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M46.4386 64.8334L82.1114 75.3212H81.9707L82.3225 75.4271H82.3577L82.3928 75.3918L82.428 75.4271H82.3928L82.428 75.4624H82.4632L82.6039 75.5331L82.4984 75.4624L118.347 85.9855C118.347 86.0208 118.347 86.0208 118.312 86.0561L158.101 97.8151C159.332 92.2005 160.001 86.3386 160.001 80.3355C160.001 78.6758 159.93 76.9809 159.86 75.3565H119.825C119.825 75.3918 119.825 75.3918 119.825 75.4271L82.4632 75.4624V75.4271L82.6391 75.3918L82.4984 75.4624L82.815 75.3565H82.6391L155.497 53.6394C153.07 46.7182 149.728 40.2208 145.612 34.2883L82.6391 75.2859H82.4984L82.5687 75.2152L82.4632 75.2859L82.4984 75.074L82.428 75.2152V75.2506L82.3928 75.2859V75.2506H82.3225V75.2152L82.2521 75.074L82.2873 75.2506L82.2169 75.2152L82.2521 75.2506H82.1114L15.7614 32.4167C11.2231 38.5258 7.52917 45.341 4.85547 52.6154L46.4386 64.8334ZM82.3225 75.3918V75.4271L82.2169 75.3565L82.3225 75.3918Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M57.8032 46.9301L82.2887 75.2506L66.7741 41.1036L50.556 5.61475C43.6607 8.33379 37.2579 12.0063 31.4531 16.4556L57.8032 46.9301Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M113.877 95.8023L82.5312 75.5684L106.982 103.854C106.946 103.854 106.946 103.889 106.911 103.889L136.005 137.647C141.529 132.209 146.243 125.994 150.042 119.179L113.877 95.8023Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.3203 75.427V75.4627H82.356L82.3203 75.427H82.356H82.3203Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.2857 75.4623L82.321 75.427H82.2857L82.1445 75.4976L82.2857 75.4623Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.2164 75.5684L50.9411 95.9436C50.906 95.9082 50.906 95.8729 50.8708 95.8376L11.3281 121.51C15.4794 128.501 20.6861 134.787 26.7019 140.19L62.5858 98.4507L82.2164 75.5684Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M46.438 86.0559L82.2867 75.3916L0.140721 75.4975C0.0351803 77.0866 0 78.6756 0 80.3C0 86.7975 0.773967 93.1184 2.21636 99.1921L46.438 86.0559C46.438 86.0912 46.438 86.0912 46.438 86.0559Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.2507 75.7095L47 153.467C54.2823 156.786 62.1275 159.011 70.3949 160L82.2507 75.7095Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.4609 75.7095L94.3519 159.329C102.373 157.881 109.972 155.233 116.938 151.56L82.4609 75.7095Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.3203 75.5684L82.3556 75.8509L82.4262 75.5684L82.3556 75.4978L82.3203 75.5684Z",fill:"#E0F8EE"})),e.createElement("path",{d:"M124.694 61.2L124.986 62.1726C125.083 62.6589 125.472 62.9507 125.959 63.1452L126.931 63.437L125.959 63.8261C125.569 63.9234 125.18 64.3124 125.083 64.7015L124.694 65.7714L124.305 64.7015C124.111 64.3124 123.819 64.0206 123.43 63.8261L122.457 63.5343L123.43 63.2425C123.819 63.1452 124.111 62.7562 124.305 62.3671L124.694 61.2Z",fill:"#2D87F3"}),e.createElement("path",{d:"M104.744 34.2856L104.915 34.8571C104.973 35.1428 105.201 35.3142 105.487 35.4285L106.058 35.5999L105.487 35.8285C105.258 35.8856 105.03 36.1142 104.973 36.3428L104.744 36.9714L104.515 36.3428C104.401 36.1142 104.23 35.9428 104.001 35.8285L103.43 35.6571L104.001 35.4856C104.23 35.4285 104.401 35.1999 104.515 34.9714L104.744 34.2856Z",fill:"#00B16A"}),e.createElement("path",{d:"M118.345 38L119.088 40.4C119.431 41.4857 120.288 42.3429 121.317 42.6286L123.717 43.3714L121.259 44.2286C120.231 44.5714 119.488 45.3714 119.145 46.3429L118.288 48.8L117.317 46.2286C116.974 45.2571 116.174 44.5143 115.202 44.1714L112.859 43.3714L115.145 42.5714C116.117 42.2286 116.859 41.4857 117.259 40.5714L118.345 38Z",fill:"#FFB521"}),e.createElement("path",{d:"M41.8846 98.8572L42.056 99.4286C42.1132 99.7143 42.3417 99.8857 42.6275 100L43.1989 100.171L42.6275 100.4C42.3989 100.457 42.1703 100.686 42.1132 100.914L41.8846 101.543L41.656 100.914C41.5417 100.686 41.3703 100.514 41.1417 100.4L40.5703 100.229L41.1417 100.057C41.3703 100 41.5417 99.7715 41.656 99.5429L41.8846 98.8572Z",fill:"#00B16A"}),e.createElement("path",{d:"M64.5717 125.314L65.3145 127.714C65.6574 128.8 66.5145 129.657 67.5431 129.943L69.9431 130.686L67.4859 131.543C66.4574 131.886 65.7145 132.686 65.3717 133.657L64.5145 136.114L63.5431 133.543C63.2002 132.571 62.4002 131.828 61.4288 131.486L59.0859 130.686L61.3717 129.886C62.3431 129.543 63.0859 128.8 63.4859 127.886L64.5717 125.314Z",fill:"#FFB521"}),e.createElement("path",{d:"M80.9708 120.343L81.2565 121.314C81.3708 121.771 81.7708 122.114 82.1708 122.228L83.1993 122.514L82.1708 122.857C81.7708 122.971 81.4279 123.314 81.3136 123.714L80.9708 124.743L80.5708 123.657C80.3993 123.257 80.1136 122.914 79.7136 122.8L78.7422 122.457L79.7136 122.114C80.1136 122 80.3993 121.657 80.5708 121.314L80.9708 120.343Z",fill:"#2D87F3"}),e.createElement("path",{d:"M130.307 98.2856L130.529 99.0426C130.619 99.3988 130.93 99.666 131.242 99.755L132.043 99.9777L131.242 100.245C130.93 100.334 130.663 100.601 130.574 100.913L130.307 101.714L129.995 100.868C129.862 100.557 129.639 100.289 129.327 100.2L128.57 99.9331L129.327 99.666C129.639 99.5769 129.862 99.3098 129.995 99.0426L130.307 98.2856Z",fill:"#00B16A"}),e.createElement("path",{d:"M36.592 64L36.8147 64.757C36.9037 65.1132 37.2154 65.3803 37.5271 65.4694L38.3286 65.692L37.5271 65.9592C37.2154 66.0482 36.9482 66.3154 36.8592 66.6271L36.592 67.4286L36.2803 66.5826C36.1467 66.2709 35.9241 66.0037 35.6124 65.9147L34.8555 65.6475L35.6124 65.3803C35.9241 65.2913 36.1467 65.0241 36.2803 64.757L36.592 64Z",fill:"#FFB521"}),e.createElement("path",{d:"M67.3816 26.8572L67.6734 27.8298C67.7707 28.3161 68.1597 28.6079 68.646 28.8025L69.6187 29.0942L68.646 29.4833C68.257 29.5806 67.8679 29.9696 67.7707 30.3587L67.3816 31.4286L66.9926 30.3587C66.798 29.9696 66.5062 29.6778 66.1172 29.4833L65.1445 29.1915L66.1172 28.8997C66.5062 28.8025 66.798 28.4134 66.9926 28.0243L67.3816 26.8572Z",fill:"#2D87F3"}),e.createElement("path",{d:"M80.0011 108.572C95.7807 108.572 108.573 95.7797 108.573 80.0001C108.573 64.2206 95.7807 51.4287 80.0011 51.4287C64.2216 51.4287 51.4297 64.2206 51.4297 80.0001C51.4297 95.7797 64.2216 108.572 80.0011 108.572Z",fill:"#00B16A"}),e.createElement("path",{d:"M78.5808 89.1451C77.3597 89.147 76.1503 88.908 75.0217 88.4418C73.8932 87.9757 72.8677 87.2914 72.0039 86.4283L68.6389 83.0617C68.1939 82.6009 67.9477 81.9838 67.9532 81.3432C67.9588 80.7027 68.2157 80.0899 68.6687 79.6369C69.1217 79.1839 69.7344 78.927 70.375 78.9214C71.0156 78.9159 71.6327 79.1621 72.0935 79.6071L75.4585 82.9738C75.8649 83.3802 76.3473 83.7025 76.8783 83.9225C77.4093 84.1424 77.9784 84.2556 78.5531 84.2556C79.1278 84.2556 79.6969 84.1424 80.2279 83.9225C80.7589 83.7025 81.2413 83.3802 81.6477 82.9738L102.984 63.6911C103.468 63.2745 104.095 63.0635 104.732 63.1034C105.369 63.1433 105.965 63.4308 106.392 63.9044C106.82 64.3781 107.046 65.0003 107.02 65.6379C106.995 66.2756 106.722 66.8781 106.258 67.3166L85.0046 86.513C84.1599 87.3531 83.1576 88.0181 82.0552 88.4698C80.9528 88.9215 79.7721 89.151 78.5808 89.1451Z",fill:"white"}),e.createElement("defs",null,e.createElement("radialGradient",{id:"paint0_radial_4580_96805",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(80 80) rotate(90) scale(80)"},e.createElement("stop",{stopColor:"#C4C4C4"}),e.createElement("stop",{offset:"1",stopColor:"#C4C4C4",stopOpacity:"0"}))))),e.createElement(V,{tag:"h3"},null==r?void 0:r.title),e.createElement(O,{size:"p3",color:"gray.6"},null==r?void 0:r.description),e.createElement(S,{mt:{base:16,md:24},fullWidth:l,size:"lg",onClick:n},i("similac.thankYou.done")))))}};export{le as DynamicForm,Ne as Onboarding,ne as OnboardingContext};
package/build/esm/pwg.js CHANGED
@@ -1,4 +1,4 @@
1
- import e,{useMemo as t,useState as r,useRef as a}from"react";import{M as l,a as o}from"./index-89127303.js";import{T as n}from"./Plus-61592057.js";import{P as i}from"./index-661f66bf.js";import{u as s}from"./useTranslations-cce18e33.js";import{t as c}from"./theme-2f0d6367.js";import{ResponsiveContainer as m,AreaChart as d,CartesianGrid as p,Tooltip as g,XAxis as u,YAxis as y,Area as b,ReferenceDot as h}from"recharts";import{C as f}from"./index-761ce6cc.js";import{a as x}from"./useOutsideClick-7826d461.js";import E from"styled-components";import{_ as k}from"./tslib.es6-4a7efa3e.js";import"./index.styled-c2100f19.js";import"@mantine/core";import"./Subot-ade21804.js";import"./index-01efa9be.js";import"./index-05214244.js";import"date-fns/locale";import"./isProduction-8ae381c3.js";import"./index-8c1e2ce6.js";import"@mantine/hooks";import"dayjs";import"./utils-597f4846.js";import"@mantine/carousel";import"classnames";import"./useUniqueId-463b8d94.js";import"./index-418f072b.js";import"@mantine/dates";import"./translationsContext-d3dc4282.js";import"string-format";const w=t=>{const{x:r,y:a,payload:l,activeWeek:o}=t;return o===l.value?e.createElement("g",{transform:`translate(${r},${a})`},e.createElement("circle",{r:12,fill:"marryBaby"===t.siteType?c.mbColors.pink:c.colors.primaryBase}),e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:c.colors.white,fontFamily:"Inter",fontWeight:"600",fontSize:"12px"},l.value)):e.createElement("g",{transform:`translate(${r},${a})`},e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:c.colors.gray600,fontFamily:"Inter",fontWeight:"400",fontSize:"12px"},l.value))},v=E.div`
1
+ import e,{useMemo as t,useState as r,useRef as o}from"react";import{M as a,a as l}from"./index-7c77273a.js";import{T as n}from"./index-d27a0e25.js";import{P as i}from"./index-bf11f9e9.js";import{u as s}from"./useTranslations-df1b3bb8.js";import{t as c}from"./theme-3db3c9a8.js";import{ResponsiveContainer as m,AreaChart as d,CartesianGrid as p,Tooltip as g,XAxis as u,YAxis as y,Area as b,ReferenceDot as h}from"recharts";import{C as f}from"./index-8c77d7e0.js";import{a as x}from"./useOutsideClick-0704b383.js";import E from"styled-components";import{_ as k}from"./tslib.es6-266309d1.js";import"./index.styled-14b65c9e.js";import"@mantine/core";import"./Subot-4642c5bf.js";import"./index-2e99f941.js";import"./index-9e5956c2.js";import"date-fns/locale";import"./isProduction-00695d80.js";import"./index-5408f5a4.js";import"@hhgtech/icons/other";import"@mantine/hooks";import"dayjs";import"./utils-5b4e60da.js";import"@mantine/carousel";import"classnames";import"./useUniqueId-03fbaecd.js";import"@hhgtech/icons/core";import"./index-459e0362.js";import"@mantine/dates";import"./translationsContext-6d2efd65.js";import"string-format";const w=t=>{const{x:r,y:o,payload:a,activeWeek:l}=t;return l===a.value?e.createElement("g",{transform:`translate(${r},${o})`},e.createElement("circle",{r:12,fill:"marryBaby"===t.siteType?c.mbColors.pink:c.colors.primaryBase}),e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:c.colors.white,fontFamily:"Inter",fontWeight:"600",fontSize:"12px"},a.value)):e.createElement("g",{transform:`translate(${r},${o})`},e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:c.colors.gray600,fontFamily:"Inter",fontWeight:"400",fontSize:"12px"},a.value))},v=E.div`
2
2
  /* position: absolute; */
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -55,7 +55,7 @@ import e,{useMemo as t,useState as r,useRef as a}from"react";import{M as l,a as
55
55
  align-items: center;
56
56
  gap: 4px;
57
57
  }
58
- `,T=[{name:"overweight",backgroundColor:c.colors.yellow50,color:c.colors.yellow900},{name:"underweight",backgroundColor:c.colors.yellow50,color:c.colors.yellow900},{name:"healthy",backgroundColor:c.colors.green50,color:c.colors.green900}],B=r=>{var a,l,o,i,s;const{payload:m,active:d}=r,p=null===(a=null==m?void 0:m[0])||void 0===a?void 0:a.payload;if(!p||!p.toolTipLabel||!d)return null;const{backgroundColor:g,color:u}=t((()=>T.find((e=>e.name===p.status))),[null==p?void 0:p.status]);return e.createElement(v,null,e.createElement("div",null,null===(l=p.toolTipLabel)||void 0===l?void 0:l[0]," ",null===(o=p.toolTipLabel)||void 0===o?void 0:o[1]),e.createElement("div",null,(null===(i=p.toolTipLabel)||void 0===i?void 0:i[2])&&e.createElement(n,{as:"span",size:"s3",color:c.colors.gray800,weight:"semiBold"},null===(s=p.toolTipLabel)||void 0===s?void 0:s[2]),e.createElement("div",{className:"risk",style:{backgroundColor:g}},e.createElement(n,{size:"n1",color:u},p.translatedStatus))))},W=({weightByWeek:e,weightBefore:t,toolTipLabel:r,status:a,activeWeek:l,t:o})=>{const n=o(`bmi.result.${a}`);return e.map((e=>Object.assign({name:e.week,min:t+e.min,difference:e.max-e.min,max:t+e.max},e.week===l?{toolTipLabel:r,translatedStatus:n,status:a}:{})))},S=({weightBefore:o,weightByWeek:i,activeWeek:E,currentWeight:k,toolTipLabel:v=[],status:C,withLine:T=!1,siteType:S})=>{const{t:z}=s(),L="marryBaby"===S,I=t((()=>W({weightByWeek:i,weightBefore:o,toolTipLabel:v,status:C,activeWeek:E,t:z})),[i,o,v,C,E]),[F,M]=r(!1),N=a(null);return x(N,(()=>M(!1))),e.createElement(j,null,L?e.createElement(l,{type:"bodytext-3",color:c.mbColors.dark}," ",z("babyGrowth.weight")," ",z("pregnancyWeightGain.weightInput.desc")):e.createElement(n,{size:"n1",color:c.colors.gray500},z("babyGrowth.weight")," ",z("pregnancyWeightGain.weightInput.desc")),Array.isArray(I)&&I.length>0&&e.createElement(j,null,e.createElement(m,{height:388,className:"chart"},e.createElement(d,{data:I,margin:{top:16,right:0,left:0}},e.createElement(p,{stroke:c.colors.neutral100}),e.createElement(g,{trigger:"click",content:t=>e.createElement(B,Object.assign({active:!T&&F&&void 0!==E&&void 0!==k},t))}),e.createElement(u,{type:"number",scale:"linear",ticks:Array.from({length:40},((e,t)=>t+1)),dataKey:"name",tickLine:!1,tickMargin:12,tick:t=>e.createElement(w,Object.assign({},t,{activeWeek:E,siteType:S})),domain:["dataMin","dataMax"],interval:"preserveStartEnd",tickCount:1,allowDecimals:!1}),e.createElement(y,{domain:[e=>Math.max(e,o-10||e),e=>Math.max(e,o+20||e)],type:"number",scale:"auto",interval:"preserveStartEnd",tickLine:!1,tickMargin:7,width:45,tickCount:10,allowDecimals:!0,tickFormatter:e=>String(Math.round(100*(e+Number.EPSILON))/100),tick:{fontFamily:"Inter",fontWeight:400,fontSize:12,color:c.colors.gray600}}),e.createElement(b,{connectNulls:!0,type:"monotone",dataKey:"min",stackId:"1",stroke:"transparent",fill:"transparent"}),e.createElement(b,{connectNulls:!0,type:"monotone",dataKey:"difference",stackId:"1",stroke:"transparent",fill:L?c.mbColors.tonePink:c.colors.primary100}),void 0!==E&&void 0!==k&&e.createElement(h,{onClick:()=>M(!0),x:0===E?1:E,y:k,r:4,shape:e.createElement(f,{ref:N,r:4}),fill:L?c.mbColors.pink:c.colors.primaryBase,stroke:L?c.mbColors.pink:c.colors.primaryBase}))),e.createElement("div",{className:"custom-chart-label"},e.createElement("i",null),L?e.createElement(l,{type:"bodytext-3",color:c.mbColors.dark},z("pregnancy.week")):e.createElement(n,{size:"n1",color:c.colors.gray500},z("pregnancy.week")))))},z=t=>{var{color:r}=t,a=k(t,["color"]);return e.createElement("svg",Object.assign({width:"8",height:"8",viewBox:"0 0 8 8",fill:"none"},a),e.createElement("circle",{cx:"4",cy:"4",r:"4",fill:r||c.colors.primaryBase}))},L=({idealWeight:t,siteType:r})=>{const{t:a}=s(),o="marryBaby"===r;return e.createElement(C,null,e.createElement("div",null,o?e.createElement(e.Fragment,null,e.createElement(z,{color:c.mbColors.lightPink}),e.createElement(l,{type:"bodytext-3",color:c.mbColors.dark},a("pregnancyTool.weightSuggested")," ",e.createElement(n,{size:"n1",color:c.colors.gray800,weight:"bold",as:"span"},t))):e.createElement(e.Fragment,null,e.createElement(z,{color:c.colors.primary100}),e.createElement(n,{size:"n1",color:c.colors.gray600},e.createElement(n,{size:"n1",as:"span"},a("pregnancyTool.weightSuggested")," "),e.createElement(n,{size:"n1",color:c.colors.gray800,weight:"bold",as:"span"},t)))),e.createElement("div",null,o?e.createElement(e.Fragment,null,e.createElement(z,{color:c.mbColors.pink}),e.createElement(l,{type:"bodytext-3",color:c.mbColors.dark},a("pwg.placeholder.weight"))):e.createElement(e.Fragment,null,e.createElement(z,null),e.createElement(n,{size:"n1",color:c.colors.gray600},a("pwg.placeholder.weight")))))},I=E.div`
58
+ `,T=[{name:"overweight",backgroundColor:c.colors.yellow50,color:c.colors.yellow900},{name:"underweight",backgroundColor:c.colors.yellow50,color:c.colors.yellow900},{name:"healthy",backgroundColor:c.colors.green50,color:c.colors.green900}],B=r=>{var o,a,l,i,s;const{payload:m,active:d}=r,p=null===(o=null==m?void 0:m[0])||void 0===o?void 0:o.payload;if(!p||!p.toolTipLabel||!d)return null;const{backgroundColor:g,color:u}=t((()=>T.find((e=>e.name===p.status))),[null==p?void 0:p.status]);return e.createElement(v,null,e.createElement("div",null,null===(a=p.toolTipLabel)||void 0===a?void 0:a[0]," ",null===(l=p.toolTipLabel)||void 0===l?void 0:l[1]),e.createElement("div",null,(null===(i=p.toolTipLabel)||void 0===i?void 0:i[2])&&e.createElement(n,{as:"span",size:"s3",color:c.colors.gray800,weight:"semiBold"},null===(s=p.toolTipLabel)||void 0===s?void 0:s[2]),e.createElement("div",{className:"risk",style:{backgroundColor:g}},e.createElement(n,{size:"n1",color:u},p.translatedStatus))))},W=({weightByWeek:e,weightBefore:t,toolTipLabel:r,status:o,activeWeek:a,t:l})=>{const n=l(`bmi.result.${o}`);return e.map((e=>Object.assign({name:e.week,min:t+e.min,difference:e.max-e.min,max:t+e.max},e.week===a?{toolTipLabel:r,translatedStatus:n,status:o}:{})))},S=({weightBefore:l,weightByWeek:i,activeWeek:E,currentWeight:k,toolTipLabel:v=[],status:C,withLine:T=!1,siteType:S})=>{const{t:z}=s(),L="marryBaby"===S,I=t((()=>W({weightByWeek:i,weightBefore:l,toolTipLabel:v,status:C,activeWeek:E,t:z})),[i,l,v,C,E]),[F,M]=r(!1),N=o(null);return x(N,(()=>M(!1))),e.createElement(j,null,L?e.createElement(a,{type:"bodytext-3",color:c.mbColors.dark}," ",z("babyGrowth.weight")," ",z("pregnancyWeightGain.weightInput.desc")):e.createElement(n,{size:"n1",color:c.colors.gray500},z("babyGrowth.weight")," ",z("pregnancyWeightGain.weightInput.desc")),Array.isArray(I)&&I.length>0&&e.createElement(j,null,e.createElement(m,{height:388,className:"chart"},e.createElement(d,{data:I,margin:{top:16,right:0,left:0}},e.createElement(p,{stroke:c.colors.neutral100}),e.createElement(g,{trigger:"click",content:t=>e.createElement(B,Object.assign({active:!T&&F&&void 0!==E&&void 0!==k},t))}),e.createElement(u,{type:"number",scale:"linear",ticks:Array.from({length:40},((e,t)=>t+1)),dataKey:"name",tickLine:!1,tickMargin:12,tick:t=>e.createElement(w,Object.assign({},t,{activeWeek:E,siteType:S})),domain:["dataMin","dataMax"],interval:"preserveStartEnd",tickCount:1,allowDecimals:!1}),e.createElement(y,{domain:[e=>Math.max(e,l-10||e),e=>Math.max(e,l+20||e)],type:"number",scale:"auto",interval:"preserveStartEnd",tickLine:!1,tickMargin:7,width:45,tickCount:10,allowDecimals:!0,tickFormatter:e=>String(Math.round(100*(e+Number.EPSILON))/100),tick:{fontFamily:"Inter",fontWeight:400,fontSize:12,color:c.colors.gray600}}),e.createElement(b,{connectNulls:!0,type:"monotone",dataKey:"min",stackId:"1",stroke:"transparent",fill:"transparent"}),e.createElement(b,{connectNulls:!0,type:"monotone",dataKey:"difference",stackId:"1",stroke:"transparent",fill:L?c.mbColors.tonePink:c.colors.primary100}),void 0!==E&&void 0!==k&&e.createElement(h,{onClick:()=>M(!0),x:0===E?1:E,y:k,r:4,shape:e.createElement(f,{ref:N,r:4}),fill:L?c.mbColors.pink:c.colors.primaryBase,stroke:L?c.mbColors.pink:c.colors.primaryBase}))),e.createElement("div",{className:"custom-chart-label"},e.createElement("i",null),L?e.createElement(a,{type:"bodytext-3",color:c.mbColors.dark},z("pregnancy.week")):e.createElement(n,{size:"n1",color:c.colors.gray500},z("pregnancy.week")))))},z=t=>{var{color:r}=t,o=k(t,["color"]);return e.createElement("svg",Object.assign({width:"8",height:"8",viewBox:"0 0 8 8",fill:"none"},o),e.createElement("circle",{cx:"4",cy:"4",r:"4",fill:r||c.colors.primaryBase}))},L=({idealWeight:t,siteType:r})=>{const{t:o}=s(),l="marryBaby"===r;return e.createElement(C,null,e.createElement("div",null,l?e.createElement(e.Fragment,null,e.createElement(z,{color:c.mbColors.lightPink}),e.createElement(a,{type:"bodytext-3",color:c.mbColors.dark},o("pregnancyTool.weightSuggested")," ",e.createElement(n,{size:"n1",color:c.colors.gray800,weight:"bold",as:"span"},t))):e.createElement(e.Fragment,null,e.createElement(z,{color:c.colors.primary100}),e.createElement(n,{size:"n1",color:c.colors.gray600},e.createElement(n,{size:"n1",as:"span"},o("pregnancyTool.weightSuggested")," "),e.createElement(n,{size:"n1",color:c.colors.gray800,weight:"bold",as:"span"},t)))),e.createElement("div",null,l?e.createElement(e.Fragment,null,e.createElement(z,{color:c.mbColors.pink}),e.createElement(a,{type:"bodytext-3",color:c.mbColors.dark},o("pwg.placeholder.weight"))):e.createElement(e.Fragment,null,e.createElement(z,null),e.createElement(n,{size:"n1",color:c.colors.gray600},o("pwg.placeholder.weight")))))},I=E.div`
59
59
  display: flex;
60
60
  flex-direction: column;
61
61
  align-items: center;
@@ -70,4 +70,4 @@ import e,{useMemo as t,useState as r,useRef as a}from"react";import{M as l,a as
70
70
  > div {
71
71
  width: 100%;
72
72
  }
73
- `,F=({chartProps:t,pillCarouselProps:r,idealWeight:a,description:l,siteType:m})=>{const{t:d}=s(),p="marryBaby"===m;return e.createElement(I,null,e.createElement("div",{className:"chart-header"},p?e.createElement(o,{type:"h3",color:c.mbColors.dark},d("pregnancyTool.weightSuggested")):e.createElement(n,{size:"s1",weight:"semiBold",color:c.colors.gray800},d("pregnancyTool.weightSuggested")),l&&l),e.createElement(i,Object.assign({},r)),e.createElement("div",null,e.createElement(L,{idealWeight:a,siteType:m}),e.createElement(S,Object.assign({},t,{siteType:m}))))};export{F as PregnancyWeightGainChart};
73
+ `,F=({chartProps:t,pillCarouselProps:r,idealWeight:o,description:a,siteType:m})=>{const{t:d}=s(),p="marryBaby"===m;return e.createElement(I,null,e.createElement("div",{className:"chart-header"},p?e.createElement(l,{type:"h3",color:c.mbColors.dark},d("pregnancyTool.weightSuggested")):e.createElement(n,{size:"s1",weight:"semiBold",color:c.colors.gray800},d("pregnancyTool.weightSuggested")),a&&a),e.createElement(i,Object.assign({},r)),e.createElement("div",null,e.createElement(L,{idealWeight:o,siteType:m}),e.createElement(S,Object.assign({},t,{siteType:m}))))};export{F as PregnancyWeightGainChart};
@@ -1 +1 @@
1
- import{d as e}from"./index-05214244.js";import{i as s}from"./isProduction-8ae381c3.js";const t=(t,o)=>{if("undefined"!=typeof window)return window.location.origin;const r="development"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return r?"http://localhost:3000":`https://${!r&&!s?o?"fe.":"discover.":o?"www.":""}${e[o?"vi-VN_MB":t]}`},o=(t,o)=>process.env.UNIFY_SSO_API||`https://${s?"id.":"staging-id."}${e[o?"vi-VN_MB":t]}`,r=()=>process.env.UNIFY_INTERNAL_TOGETHER_API||process.env.UNIFY_TOGETHER_API||`https://${s?"together.":"staging-together."}hellohealthgroup.com`,n=t=>process.env.UNIFY_DISCOVER_API||`https://${s?"wp.":"staging."}${e[t]}`,i=()=>process.env.UNIFY_INTERNAL_CARE_API||process.env.UNIFY_CARE_API||`https://${s?"health-care.":"service-health-care."}hellohealthgroup.com`;export{o as a,r as b,n as c,i as d,t as g};
1
+ import{d as e}from"./index-9e5956c2.js";import{i as s}from"./isProduction-00695d80.js";const t=(t,o)=>{if("undefined"!=typeof window)return window.location.origin;const r="development"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return r?"http://localhost:3000":`https://${!r&&!s?o?"fe.":"discover.":o?"www.":""}${e[o?"vi-VN_MB":t]}`},o=(t,o)=>process.env.UNIFY_SSO_API||`https://${s?"id.":"staging-id."}${e[o?"vi-VN_MB":t]}`,r=()=>process.env.UNIFY_INTERNAL_TOGETHER_API||process.env.UNIFY_TOGETHER_API||`https://${s?"together.":"staging-together."}hellohealthgroup.com`,n=t=>process.env.UNIFY_DISCOVER_API||`https://${s?"wp.":"staging."}${e[t]}`,i=()=>process.env.UNIFY_INTERNAL_CARE_API||process.env.UNIFY_CARE_API||`https://${s?"health-care.":"service-health-care."}hellohealthgroup.com`;export{o as a,r as b,n as c,i as d,t as g};
@@ -1,4 +1,4 @@
1
- import e,{createContext as t,useContext as i,useRef as n,useState as o,useEffect as a,useCallback as l,useMemo as r,forwardRef as s,memo as d,useImperativeHandle as c}from"react";import{e as u,c as m,N as p,d as v,f as g,g as b,E as h,L as f,F as y}from"./Subot-ade21804.js";import{a as _,_ as x}from"./tslib.es6-4a7efa3e.js";import{B as E,d as w,M as S,e as k,G as I,h as N,A as O,f as T}from"./index-05214244.js";import C from"js-cookie";import M from"fastdom";import P from"fastdom/extensions/fastdom-promised";import U from"string-format";import{G as B,b as j,x as R,y as A,T as L,L as D}from"./utils-e3640c23.js";import{v4 as $}from"uuid";import{i as F}from"./isProduction-8ae381c3.js";import q from"hex-rgb";import z from"classnames";import{C as H}from"./index-9a776a7f.js";import{D as G,L as V}from"./index-c2e4449d.js";import{motion as Y}from"framer-motion";import{M as W}from"./utils-597f4846.js";import X from"styled-components";import{B as K,S as J}from"./index-8c1e2ce6.js";import{Remarkable as Q}from"remarkable";import{useInView as Z}from"react-intersection-observer";import{Box as ee,Textarea as te}from"@mantine/core";import{C as ie}from"./index-01efa9be.js";import{I as ne}from"./index-04f183b8.js";import oe from"dayjs";import ae from"dayjs/plugin/isSameOrBefore";import{T as le}from"./Plus-61592057.js";import{t as re}from"./theme-2f0d6367.js";import"@mantine/dates";import"./translationsContext-d3dc4282.js";import"@mantine/hooks";import se from"lodash/isEmpty";import{Controller as de,useForm as ce}from"react-hook-form";import ue,{getCountryCallingCode as me,isPossiblePhoneNumber as pe,parsePhoneNumber as ve}from"react-phone-number-input";import{LoadScript as ge}from"@react-google-maps/api";import{u as be,G as he,a as fe}from"./usePlacesAutocomplete-ff204ea8.js";import{D as ye}from"./index-0d9821e3.js";import{B as _e}from"./index-18ff3f75.js";import"date-fns/locale";import"./cookieHelper-3fe8fdf3.js";import"slugify";import"./useTranslations-cce18e33.js";import"date-fns";import"react-day-picker/DayPickerInput";import"@mantine/carousel";import"./useUniqueId-463b8d94.js";import"./WhatsApp-5a6ef99f.js";const xe=M.extend(P),Ee={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}"},we={cached:{},clearCached:e=>{console.log(we.cached),Object.keys(we.cached).filter((t=>t.startsWith(e))).forEach((e=>{console.log(e),we.cached[e]=void 0}))},withCached:(e,t)=>_(void 0,void 0,void 0,(function*(){if("waitingTheFirstResponse"===we.cached[e])return new Promise((t=>{const i=(new Date).getTime(),n=setInterval((()=>{(new Date).getTime()-i>3e3&&clearInterval(n),"object"==typeof we.cached[e]&&(t(we.cached[e]),clearInterval(n))}),100)}));if("object"==typeof we.cached[e])return we.cached[e];we.cached[e]="waitingTheFirstResponse";try{const i=yield t();return we.cached[e]=i,setTimeout((()=>{we.cached[e]=void 0}),18e5),i}catch(t){return we.cached[e]=void 0,Promise.reject(t)}}))},Se=(e,t)=>{const{subotApiUrl:i}=null==B?void 0:B.env;return(i.endsWith("frontend/api/")?i:i+"frontend/api/")+U(e,Object.assign({},t))},ke=e=>_(void 0,void 0,void 0,(function*(){try{return yield j(Se(Ee.GET_INLINE_MESSAGE),"POST",{data:e})}catch(e){}})),Ie=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},Ne=e=>_(void 0,void 0,void 0,(function*(){try{return yield we.withCached("SubotInlineFirstNode/"+e,(()=>_(void 0,void 0,void 0,(function*(){const t=yield j(Se(Ee.GET_INLINE_FIRST_NODE)+`/${e}`,"GET");return Ie(t),t}))))}catch(e){return null}})),Oe=e=>_(void 0,void 0,void 0,(function*(){try{return yield j(Se(Ee.GET_INLINE_CLICK),"POST",{data:e})}catch(e){}})),Te=e=>_(void 0,void 0,void 0,(function*(){try{return yield j(Se(Ee.GET_INLINE_IMPRESSION),"POST",{data:e})}catch(e){}})),Ce=["form_submit_meta","selected_actions","current_selected","current_keys","current_polls"],Me=["bot_id","node_id","action_id","action_value","current_score","gtm_id","ga_client_id","is_new","title_url","url","window_id",...Ce],Pe=(e,t)=>(Object.keys(t).map((i=>{const n=t[i];if("source"!==i){if(Me.includes(i))if(Ce.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),Ue=e=>[{id:$(),label:JSON.stringify({title:"",description:""}),type:u.SSO_INTENT,url:""},{id:$(),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:u.SSO_INTENT,url:"/images/subot/my-health.svg"},{id:$(),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:u.SSO_INTENT,url:"/images/subot/file-storage.svg"},{id:$(),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:u.SSO_INTENT,url:"/images/subot/shield.svg"}];function Be(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 je=e=>R.parse(e||"")["hhg-id"]||C.get("hhg-id")||"",Re=e=>{if(e)return C.set("hhg-id",e),e;const t=je();if(t)return t;const i=$();return C.set("hhg-id",i),i},Ae=e=>{const t=R.parse(e||"")[E]||C.get(E)||"";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""}},Le=e=>{const t=R.parse(e||"")[E]||C.get(E)||"";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}}},De=$(),$e=()=>De,Fe=(e,t)=>!t&&("undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname))?"http://localhost":`https://${F?"":"discover."}${w[e]}`,qe=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)))},ze=e=>{const t=document.createElement("a");t.href=e,t.target="_blank",t.click()},He=30,Ge=e=>{try{return e.dynamic_score||{}}catch(e){return{}}},Ve=(e,t,i,n)=>{const o=Ge(e[0]);if(!t)return{};const a=e.findIndex((e=>e.id==t)),l=e.reduce(((e,l,r)=>{var s,d;if(r>a)return e;const c=l,u=i&&c.id===t?{action_id:i}:c._message;let p=0;const v=null===(s=c.actions)||void 0===s?void 0:s.find((e=>e.id===(null==u?void 0:u.action_id)));p+=(null==v?void 0:v.score)||0;const g=void 0!==o[c.id],b=i&&c.id===t?n:null==u?void 0:u.form_submit_meta;if(g&&c.type===m.FORM&&b){const e=o[c.id].action_id,t=null===(d=c.actions)||void 0===d?void 0:d.find((t=>t.id===e)),i=null==t?void 0:t.key,n=b.find((e=>e.key===i&&"number"===e.control));if(o[c.id].number&&["+","-","x","/"].includes(o[c.id].operator)&&(null==n?void 0:n.value)&&Number(n.value)){const e=Number(n.value),t=o[c.id].operator,i=o[c.id].number;let a=0;"+"===t&&(a=e+i),"-"===t&&(a=e-i),"x"===t&&(a=e*i),"/"===t&&(a=e/i),isNaN(a)||(p+=a)}}return e+p}),0);return{current_total_dynamic_score:l}},Ye=(e,t)=>{const i=Ge(t[0]);if(0===Object.keys(i).length)return e;const n=t.filter((e=>e.type===m.FORM));return Object.keys(i).forEach((t=>{var o,a,l;const r=n.find((e=>e.id===t)),s=null===(o=null==r?void 0:r.actions)||void 0===o?void 0:o.find((e=>{var n;return e.id===(null===(n=i[t])||void 0===n?void 0:n.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(i[t].number&&["+","-","x","/"].includes(i[t].operator)&&(null==c?void 0:c.value)&&Number(c.value)){const n=Number(c.value),o=i[t].operator,a=i[t].number;let l=0;if("+"===o&&(l=n+a),"-"===o&&(l=n-a),"x"===o&&(l=n*a),"/"===o&&(l=n/a),e.includes(`{{var:${d}}}`)){const t=new RegExp(`{{var:${d}}}`,"g");e=e.replace(t,String(Math.floor(100*l)/100))}}})),e},We="other",Xe="stateInlineSSO",Ke=()=>{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{}}},Je=e=>{const t=e.filter((e=>"Unified Questions"===e.name)).reduce(((e,t)=>{var i,n,o,a,l,r,s,d,c,u,p,v,b,h,f,y,_,x,E,w,S;if(t.actions&&(null===(i=t._message)||void 0===i?void 0:i.action_id)&&(null===(n=t._message)||void 0===n?void 0:n.action_value)){const i=t._message.action_value;if(t.type===m.FORM){const i=["address","province","district","commune"],n=((null===(o=t._message)||void 0===o?void 0:o.form_submit_meta)||[]).filter((e=>!i.includes(e.control))),m=((null===(a=t._message)||void 0===a?void 0:a.form_submit_meta)||[]).filter((e=>i.includes(e.control))).reduce(((e,t)=>(e[t.control]=t,e)),{}),p=[null===(l=m.address)||void 0===l?void 0:l.value,null===(r=m.commune)||void 0===r?void 0:r.value,null===(s=m.district)||void 0===s?void 0:s.value,null===(d=m.province)||void 0===d?void 0:d.value].filter(Boolean).join(", ");p&&m.address?e.push({attribute:m.address.key,value:p,label_question:(null===(u=null===(c=t.intents)||void 0===c?void 0:c[0])||void 0===u?void 0:u.label)||""}):n.forEach((i=>{var n,o;e.push({attribute:i.key,value:i.value,label_question:(null===(o=null===(n=t.intents)||void 0===n?void 0:n[0])||void 0===o?void 0:o.label)||""})}))}if(t.type===m.TEXT)if(t.is_multi_select){const i=Object.keys(t._message.selected_actions||{}),n=t.actions.filter((e=>e.label&&i.includes(e.id))).map((e=>e.label));i.length&&e.push({attribute:t.actions[0].key||"",value:n,label_question:(null===(v=null===(p=t.intents)||void 0===p?void 0:p[0])||void 0===v?void 0:v.label)||""})}else{const n=t._message.action_id,o=t.actions.find((e=>e.id===n)),a=null==o?void 0:o.label,l=null===(f=null===(h=null===(b=t._message)||void 0===b?void 0:b.form_submit_meta)||void 0===h?void 0:h.find((e=>e.key===We)))||void 0===f?void 0:f.value,r=(null==o?void 0:o.type)===g.USER_CHOICE_TEXT_BY_INPUT;a&&n&&e.push({attribute:i,value:r&&l?l:a,label_question:(null===(_=null===(y=t.intents)||void 0===y?void 0:y[0])||void 0===_?void 0:_.label)||""})}if(t.type===m.POLL){const i=t.id,n=(null===(E=null===(x=t._message)||void 0===x?void 0:x.current_polls)||void 0===E?void 0:E[i])||[],o=t.actions.filter((e=>e.label&&n.includes(e.id))).map((e=>e.label));n.length&&e.push({attribute:t.actions[0].key||"",value:o,label_question:(null===(S=null===(w=t.intents)||void 0===w?void 0:w[0])||void 0===S?void 0:S.label)||""})}}return e}),[]);return t},Qe=(e,t)=>{var i;try{if("ACUVUE"!==(null===(i=t.extra_settings)||void 0===i?void 0:i.subot_type))return;let n="",o="",a="",l=Le().email;if((e||[]).forEach((e=>{var t,i,r;const s=e._message;if(!s)return;const d=null===(t=e.actions)||void 0===t?void 0:t.find((e=>e.id===s.action_id));if("voucher_product"===s.action_value?n=(null==d?void 0:d.label)||"":"voucher_color"===s.action_value&&(o=(null==d?void 0:d.label)||""),e.type===m.FORM){const e=null===(i=s.form_submit_meta)||void 0===i?void 0:i.find((e=>"voucher_size"===e.key)),t=null===(r=s.form_submit_meta)||void 0===r?void 0:r.find((e=>"email"===e.control));e&&(a=e.value),t&&(l=t.value)}})),"ACUVUE® OASYS (1-DAY) WITH HYDRALUXE®"===n&&l)return{email:l,voucherName:n};if(n&&o&&a&&l)return{email:l,voucherName:`${n}|${o}|${a}`}}catch(e){console.log("ExtractVoucherAnswer",e)}},Ze=({nodes:e,activeId:t,params:i,accountIdFromLogs:n})=>_(void 0,void 0,void 0,(function*(){try{let o="in_progress";const a=e[e.length-1];(null==a?void 0:a.type)&&v.includes(a.type)&&(o="complete");const l=e.slice(1),r={activeId:t,params:i,nodes:l,tracking:Object.assign(Object.assign({},Ke()),{full_url:window.location.href}),unifiedAnswers:Je(l),voucherAnswers:Qe(l,e[0])},s={cookie_id:Re(),account_id:n||Ae()||null,bot_id:e[0].id,flow_uuid:e[0].flow_uuid,data:JSON.stringify(r),status:o,type:"inline",market:S[A]};yield j(Se(Ee.POST_SUBOT_CREATE_LOG),"POST",{data:s})}catch(e){}})),et=(e,t)=>{try{const[i,n,o]=q(e,{format:"array"});return`rgba(${i}, ${n}, ${o}, ${t})`}catch(e){return}},tt=t({activeId:"",params:{},listNodes:[],loading:!0,getParams:()=>({}),onNext:()=>null,onPrev:()=>null,onSubmit:()=>null,onStartOver:()=>null,onChange:()=>null,isShowFooter:!1,setIsShowFooter:()=>null,setLoading:()=>null,userInfo:null}),it=({children:t,articleLink:s,subotId:d,isFullContainer:c,bgColor:u,primaryColor:m,textColor:v,textButtonColor:g,bgContentColor:b,bgImgFullContainer:h,isDisabledAnimationOnMobile:f,onCloseMobile:y,userInfo:E})=>{const{formatMessage:w,action:{pushNotifications:S}}=i(L),N=n(null),O=n(null),[T,M]=o(!0),[P,U]=o(""),[R,A]=o([]),[D,$]=o(!1),[F,q]=o({});a((()=>{const e=u||"#e3f2ff",t=m||"#2d87f3",i=(new Date).getTime(),n=setInterval((()=>{const o=N.current,a=(new Date).getTime();o&&(xe.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",et(t,.9)||t),o.style.setProperty("--subot-inline-primary-color-100",et(t,.1)||"#e3f2ff"),o.style.setProperty("--subot-inline-primary-color-300",et(t,.3)||"#bcdeff"),v&&o.style.setProperty("--subot-inline-text-color",v),g&&o.style.setProperty("--subot-inline-text-button-color",g),b&&o.style.setProperty("--subot-inline-bg-content-color",b)})),clearInterval(n)),a-i>18e4&&clearInterval(n)}),100);return()=>{clearInterval(n)}}),[u,m,v,g,b]);const z=l((()=>{const e=window.gaData,t=window.location.origin+k+("tl-PH"===(null==B?void 0:B.locale)?s.replace("fil/",""):s),i={bot_id:d,account_id:Ae()||null,action_id:"",action_value:"",cookie_id:Re(),current_score:0,current_keys:[],current_selected:[],form_submit_meta:[],gtm_id:e?Object.keys(e)[0]:"",ga_client_id:C.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:$e()};return Pe(i,null==B?void 0:B.router.query)}),[]),H=l((()=>{var e;null===(e=N.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start",inline:"center"})}),[]),G=l(((e,t=!0)=>_(void 0,void 0,void 0,(function*(){var i;if(!e||!e.url||!e.bot_id)return;let n="",o=[];M(!0);const a=yield Ne(e.bot_id);1===(null==a?void 0:a._status)&&(n=null==a?void 0:a._data.id.toString(),o.push(null==a?void 0:a._data,null==a?void 0:a._data.first_node));const l=t?yield(r=o[0],_(void 0,void 0,void 0,(function*(){var e,t;try{if(!r)return null;const i=yield j(Se(Ee.GET_SUBOT_LOG,{botId:r.id,cookieId:Re(),accountId:Ae()||"",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:[r,...o],activeId:n.activeId,params:Object.assign(Object.assign({},n.params),{account_id:Ae()||n.params.account_id||null})}:null}catch(e){return null}}))):null;var r;l&&(o=l.nodes,n=l.activeId,O.current=(null===(i=l.params)||void 0===i?void 0:i.account_id)||0);const s=((e,{getParams:t})=>{try{if(!Ae())return null;const i=JSON.parse(localStorage.getItem(Xe)||""),n=18e5;return(null==i?void 0:i.botId)===e&&i.listNodes&&i.activeId&&i.createdAt+n>Date.now()&&(localStorage.removeItem(Xe),i.listNodes.slice(-1)[0].position===p.SSO)?{listNodes:i.listNodes,activeId:i.activeId,params:Object.assign(Object.assign(Object.assign({},t()),i.params),{account_id:Ae()||null,cookie_id:Re(i.params.cookie_id)})}:null}catch(e){return null}})(e.bot_id,{getParams:z});if(s&&s.params.action_id&&s.params.action_value){const e=yield ke(s.params);1===(null==e?void 0:e._status)&&(null==e?void 0:e._data.node)&&(n=null==e?void 0:e._data.node.id,o=s.listNodes,o[o.length-1]=null==e?void 0:e._data.node,Ze({nodes:o,activeId:n,params:s.params,accountIdFromLogs:O.current}),setTimeout((()=>{H()}),100))}const d=(null==s?void 0:s.params)||(null==l?void 0:l.params)||e,[c,u]=((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]})(o[0],n,o);M(!1),U(c),A(u),q(Object.assign(Object.assign({},e),d))}))),[]),V=l(((e,t)=>{const i=document.querySelector(`.si-revamp-event-submission[data-bot-id="${d}"]`);i&&i.click();let n=P,o=[...R];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(M(!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((()=>{A(o),U(n),M(!1),Ze({nodes:o,activeId:n,params:F,accountIdFromLogs:O.current})}),250)}),[R,P]),Y=l((e=>_(void 0,void 0,void 0,(function*(){if(null==e?void 0:e.node_id){const t=Object.assign(Object.assign({},e),Ve(R,P,e.action_id)),i=yield ke(t);if(M(!1),1===(null==i?void 0:i._status)){const e=null==i?void 0:i._data,{node:n}=e,o=x(e,["node"]),a=Object.assign(Object.assign({},n),{_message:Object.assign(Object.assign({},o),{node_id:n.id})});return void(-1!==R.findIndex((e=>e.id===a.id))?V(a):V(a,t))}S({title:w({id:"notification.comment.somethingWrong"}),message:"",type:"danger"})}const t=R.find((e=>e.id==P));t&&t.hasOwnProperty("first_node")&&(U(R[1].id.toString()),Ze({nodes:R,activeId:R[1].id.toString(),params:z(),accountIdFromLogs:O.current}))}))),[V,R]),W=l((()=>{const e=R.findIndex((({id:e})=>e==P));if(e&&-1!==e&&e>1){const t=R[e-1];U(t.id),Ze({nodes:R,activeId:t.id,params:F,accountIdFromLogs:O.current})}}),[R,P]),X=l((()=>{const e=z();G(e,!1);const t=R[0],i=R[1];Ze({nodes:[t,i],activeId:String(t.id),params:e,accountIdFromLogs:O.current})}),[z,G,R]),K=l((e=>{A((t=>e&&(null==e?void 0:e.node_id)&&(null==e?void 0:e.node_id)==P?t.map((t=>{const i=t;return i.id===P?Object.assign(Object.assign({},t),{_message:i._message?Object.assign(Object.assign({},i._message),e):e}):t})):t))}),[P]);a((()=>{if(C.get(I)){const e=z();G(e)}else Be({condition:()=>Boolean(C.get(I)),finished:()=>{const e=z();G(e)}})}),[]),a((()=>{if(!R.length)return;R.find((e=>e.id==P))&&P||U(d+"")}),[P,R]);const J=r((()=>({activeId:P,params:F,listNodes:R,loading:T,setLoading:M,getParams:z,onNext:Y,onPrev:W,onSubmit:V,onStartOver:X,onChange:K,isShowFooter:D,setIsShowFooter:$,isFullContainer:c,bgImgFullContainer:h,isDisabledAnimationOnMobile:f,onCloseMobile:y,userInfo:E})),[P,Y,W,V,K,X,D,F,R,T,M,z,c,f,y,E,h]);return R.length?e.createElement(tt.Provider,{value:J},e.createElement("div",{ref:N},t)):null},nt=t=>e.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),e.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"})),ot="480px",at=X.div`
1
+ import e,{createContext as t,useContext as i,useRef as n,useState as o,useEffect as a,useCallback as l,useMemo as r,forwardRef as s,memo as d,useImperativeHandle as c}from"react";import{e as u,c as m,N as p,d as v,f as g,g as b,E as h,L as f,F as y}from"./Subot-4642c5bf.js";import{a as _,_ as x}from"./tslib.es6-266309d1.js";import{B as E,d as w,M as S,e as k,G as I,h as N,A as O,f as T}from"./index-9e5956c2.js";import C from"js-cookie";import M from"fastdom";import P from"fastdom/extensions/fastdom-promised";import U from"string-format";import{G as B,b as j,y as R,z as A,T as L,L as D}from"./utils-970ce0c0.js";import{v4 as $}from"uuid";import{i as F}from"./isProduction-00695d80.js";import q from"hex-rgb";import z from"classnames";import{C as H}from"./index-1e7ad007.js";import{D as G,L as V}from"./index-a83aad1c.js";import{motion as Y}from"framer-motion";import{M as W}from"./utils-5b4e60da.js";import X from"styled-components";import{B as K,S as J}from"./index-5408f5a4.js";import{Remarkable as Q}from"remarkable";import{ArrowRight as Z}from"@hhgtech/icons/other";import{useInView as ee}from"react-intersection-observer";import{Box as te,Textarea as ie}from"@mantine/core";import{C as ne}from"./index-2e99f941.js";import oe from"dayjs";import ae from"dayjs/plugin/isSameOrBefore";import{T as le}from"./index-d27a0e25.js";import{t as re}from"./theme-3db3c9a8.js";import"@mantine/dates";import"./translationsContext-6d2efd65.js";import"@mantine/hooks";import se from"lodash/isEmpty";import{Controller as de,useForm as ce}from"react-hook-form";import ue,{getCountryCallingCode as me,isPossiblePhoneNumber as pe,parsePhoneNumber as ve}from"react-phone-number-input";import{LoadScript as ge}from"@react-google-maps/api";import{u as be,G as he,a as fe}from"./usePlacesAutocomplete-0733ec49.js";import{D as ye}from"./index-13e62563.js";import{B as _e}from"./index-3452fed2.js";import"date-fns/locale";import"./cookieHelper-4f089e3c.js";import"slugify";import"./index-13dc1f44.js";import"./useTranslations-df1b3bb8.js";import"date-fns";import"react-day-picker/DayPickerInput";import"@mantine/carousel";import"./useUniqueId-03fbaecd.js";import"@hhgtech/icons/core";const xe=M.extend(P),Ee={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}"},we={cached:{},clearCached:e=>{console.log(we.cached),Object.keys(we.cached).filter((t=>t.startsWith(e))).forEach((e=>{console.log(e),we.cached[e]=void 0}))},withCached:(e,t)=>_(void 0,void 0,void 0,(function*(){if("waitingTheFirstResponse"===we.cached[e])return new Promise((t=>{const i=(new Date).getTime(),n=setInterval((()=>{(new Date).getTime()-i>3e3&&clearInterval(n),"object"==typeof we.cached[e]&&(t(we.cached[e]),clearInterval(n))}),100)}));if("object"==typeof we.cached[e])return we.cached[e];we.cached[e]="waitingTheFirstResponse";try{const i=yield t();return we.cached[e]=i,setTimeout((()=>{we.cached[e]=void 0}),18e5),i}catch(t){return we.cached[e]=void 0,Promise.reject(t)}}))},Se=(e,t)=>{const{subotApiUrl:i}=null==B?void 0:B.env;return(i.endsWith("frontend/api/")?i:i+"frontend/api/")+U(e,Object.assign({},t))},ke=e=>_(void 0,void 0,void 0,(function*(){try{return yield j(Se(Ee.GET_INLINE_MESSAGE),"POST",{data:e})}catch(e){}})),Ie=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},Ne=e=>_(void 0,void 0,void 0,(function*(){try{return yield we.withCached("SubotInlineFirstNode/"+e,(()=>_(void 0,void 0,void 0,(function*(){const t=yield j(Se(Ee.GET_INLINE_FIRST_NODE)+`/${e}`,"GET");return Ie(t),t}))))}catch(e){return null}})),Oe=e=>_(void 0,void 0,void 0,(function*(){try{return yield j(Se(Ee.GET_INLINE_CLICK),"POST",{data:e})}catch(e){}})),Te=e=>_(void 0,void 0,void 0,(function*(){try{return yield j(Se(Ee.GET_INLINE_IMPRESSION),"POST",{data:e})}catch(e){}})),Ce=["form_submit_meta","selected_actions","current_selected","current_keys","current_polls"],Me=["bot_id","node_id","action_id","action_value","current_score","gtm_id","ga_client_id","is_new","title_url","url","window_id",...Ce],Pe=(e,t)=>(Object.keys(t).map((i=>{const n=t[i];if("source"!==i){if(Me.includes(i))if(Ce.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),Ue=e=>[{id:$(),label:JSON.stringify({title:"",description:""}),type:u.SSO_INTENT,url:""},{id:$(),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:u.SSO_INTENT,url:"/images/subot/my-health.svg"},{id:$(),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:u.SSO_INTENT,url:"/images/subot/file-storage.svg"},{id:$(),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:u.SSO_INTENT,url:"/images/subot/shield.svg"}];function Be(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 je=e=>R.parse(e||"")["hhg-id"]||C.get("hhg-id")||"",Re=e=>{if(e)return C.set("hhg-id",e),e;const t=je();if(t)return t;const i=$();return C.set("hhg-id",i),i},Ae=e=>{const t=R.parse(e||"")[E]||C.get(E)||"";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""}},Le=e=>{const t=R.parse(e||"")[E]||C.get(E)||"";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}}},De=$(),$e=()=>De,Fe=(e,t)=>!t&&("undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname))?"http://localhost":`https://${F?"":"discover."}${w[e]}`,qe=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)))},ze=e=>{const t=document.createElement("a");t.href=e,t.target="_blank",t.click()},He=30,Ge=e=>{try{return e.dynamic_score||{}}catch(e){return{}}},Ve=(e,t,i,n)=>{const o=Ge(e[0]);if(!t)return{};const a=e.findIndex((e=>e.id==t)),l=e.reduce(((e,l,r)=>{var s,d;if(r>a)return e;const c=l,u=i&&c.id===t?{action_id:i}:c._message;let p=0;const v=null===(s=c.actions)||void 0===s?void 0:s.find((e=>e.id===(null==u?void 0:u.action_id)));p+=(null==v?void 0:v.score)||0;const g=void 0!==o[c.id],b=i&&c.id===t?n:null==u?void 0:u.form_submit_meta;if(g&&c.type===m.FORM&&b){const e=o[c.id].action_id,t=null===(d=c.actions)||void 0===d?void 0:d.find((t=>t.id===e)),i=null==t?void 0:t.key,n=b.find((e=>e.key===i&&"number"===e.control));if(o[c.id].number&&["+","-","x","/"].includes(o[c.id].operator)&&(null==n?void 0:n.value)&&Number(n.value)){const e=Number(n.value),t=o[c.id].operator,i=o[c.id].number;let a=0;"+"===t&&(a=e+i),"-"===t&&(a=e-i),"x"===t&&(a=e*i),"/"===t&&(a=e/i),isNaN(a)||(p+=a)}}return e+p}),0);return{current_total_dynamic_score:l}},Ye=(e,t)=>{const i=Ge(t[0]);if(0===Object.keys(i).length)return e;const n=t.filter((e=>e.type===m.FORM));return Object.keys(i).forEach((t=>{var o,a,l;const r=n.find((e=>e.id===t)),s=null===(o=null==r?void 0:r.actions)||void 0===o?void 0:o.find((e=>{var n;return e.id===(null===(n=i[t])||void 0===n?void 0:n.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(i[t].number&&["+","-","x","/"].includes(i[t].operator)&&(null==c?void 0:c.value)&&Number(c.value)){const n=Number(c.value),o=i[t].operator,a=i[t].number;let l=0;if("+"===o&&(l=n+a),"-"===o&&(l=n-a),"x"===o&&(l=n*a),"/"===o&&(l=n/a),e.includes(`{{var:${d}}}`)){const t=new RegExp(`{{var:${d}}}`,"g");e=e.replace(t,String(Math.floor(100*l)/100))}}})),e},We="other",Xe="stateInlineSSO",Ke=()=>{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{}}},Je=e=>{const t=e.filter((e=>"Unified Questions"===e.name)).reduce(((e,t)=>{var i,n,o,a,l,r,s,d,c,u,p,v,b,h,f,y,_,x,E,w,S;if(t.actions&&(null===(i=t._message)||void 0===i?void 0:i.action_id)&&(null===(n=t._message)||void 0===n?void 0:n.action_value)){const i=t._message.action_value;if(t.type===m.FORM){const i=["address","province","district","commune"],n=((null===(o=t._message)||void 0===o?void 0:o.form_submit_meta)||[]).filter((e=>!i.includes(e.control))),m=((null===(a=t._message)||void 0===a?void 0:a.form_submit_meta)||[]).filter((e=>i.includes(e.control))).reduce(((e,t)=>(e[t.control]=t,e)),{}),p=[null===(l=m.address)||void 0===l?void 0:l.value,null===(r=m.commune)||void 0===r?void 0:r.value,null===(s=m.district)||void 0===s?void 0:s.value,null===(d=m.province)||void 0===d?void 0:d.value].filter(Boolean).join(", ");p&&m.address?e.push({attribute:m.address.key,value:p,label_question:(null===(u=null===(c=t.intents)||void 0===c?void 0:c[0])||void 0===u?void 0:u.label)||""}):n.forEach((i=>{var n,o;e.push({attribute:i.key,value:i.value,label_question:(null===(o=null===(n=t.intents)||void 0===n?void 0:n[0])||void 0===o?void 0:o.label)||""})}))}if(t.type===m.TEXT)if(t.is_multi_select){const i=Object.keys(t._message.selected_actions||{}),n=t.actions.filter((e=>e.label&&i.includes(e.id))).map((e=>e.label));i.length&&e.push({attribute:t.actions[0].key||"",value:n,label_question:(null===(v=null===(p=t.intents)||void 0===p?void 0:p[0])||void 0===v?void 0:v.label)||""})}else{const n=t._message.action_id,o=t.actions.find((e=>e.id===n)),a=null==o?void 0:o.label,l=null===(f=null===(h=null===(b=t._message)||void 0===b?void 0:b.form_submit_meta)||void 0===h?void 0:h.find((e=>e.key===We)))||void 0===f?void 0:f.value,r=(null==o?void 0:o.type)===g.USER_CHOICE_TEXT_BY_INPUT;a&&n&&e.push({attribute:i,value:r&&l?l:a,label_question:(null===(_=null===(y=t.intents)||void 0===y?void 0:y[0])||void 0===_?void 0:_.label)||""})}if(t.type===m.POLL){const i=t.id,n=(null===(E=null===(x=t._message)||void 0===x?void 0:x.current_polls)||void 0===E?void 0:E[i])||[],o=t.actions.filter((e=>e.label&&n.includes(e.id))).map((e=>e.label));n.length&&e.push({attribute:t.actions[0].key||"",value:o,label_question:(null===(S=null===(w=t.intents)||void 0===w?void 0:w[0])||void 0===S?void 0:S.label)||""})}}return e}),[]);return t},Qe=(e,t)=>{var i;try{if("ACUVUE"!==(null===(i=t.extra_settings)||void 0===i?void 0:i.subot_type))return;let n="",o="",a="",l=Le().email;if((e||[]).forEach((e=>{var t,i,r;const s=e._message;if(!s)return;const d=null===(t=e.actions)||void 0===t?void 0:t.find((e=>e.id===s.action_id));if("voucher_product"===s.action_value?n=(null==d?void 0:d.label)||"":"voucher_color"===s.action_value&&(o=(null==d?void 0:d.label)||""),e.type===m.FORM){const e=null===(i=s.form_submit_meta)||void 0===i?void 0:i.find((e=>"voucher_size"===e.key)),t=null===(r=s.form_submit_meta)||void 0===r?void 0:r.find((e=>"email"===e.control));e&&(a=e.value),t&&(l=t.value)}})),"ACUVUE® OASYS (1-DAY) WITH HYDRALUXE®"===n&&l)return{email:l,voucherName:n};if(n&&o&&a&&l)return{email:l,voucherName:`${n}|${o}|${a}`}}catch(e){console.log("ExtractVoucherAnswer",e)}},Ze=({nodes:e,activeId:t,params:i,accountIdFromLogs:n})=>_(void 0,void 0,void 0,(function*(){try{let o="in_progress";const a=e[e.length-1];(null==a?void 0:a.type)&&v.includes(a.type)&&(o="complete");const l=e.slice(1),r={activeId:t,params:i,nodes:l,tracking:Object.assign(Object.assign({},Ke()),{full_url:window.location.href}),unifiedAnswers:Je(l),voucherAnswers:Qe(l,e[0])},s={cookie_id:Re(),account_id:n||Ae()||null,bot_id:e[0].id,flow_uuid:e[0].flow_uuid,data:JSON.stringify(r),status:o,type:"inline",market:S[A]};yield j(Se(Ee.POST_SUBOT_CREATE_LOG),"POST",{data:s})}catch(e){}})),et=(e,t)=>{try{const[i,n,o]=q(e,{format:"array"});return`rgba(${i}, ${n}, ${o}, ${t})`}catch(e){return}},tt=t({activeId:"",params:{},listNodes:[],loading:!0,getParams:()=>({}),onNext:()=>null,onPrev:()=>null,onSubmit:()=>null,onStartOver:()=>null,onChange:()=>null,isShowFooter:!1,setIsShowFooter:()=>null,setLoading:()=>null,userInfo:null}),it=({children:t,articleLink:s,subotId:d,isFullContainer:c,bgColor:u,primaryColor:m,textColor:v,textButtonColor:g,bgContentColor:b,bgImgFullContainer:h,isDisabledAnimationOnMobile:f,onCloseMobile:y,userInfo:E})=>{const{formatMessage:w,action:{pushNotifications:S}}=i(L),N=n(null),O=n(null),[T,M]=o(!0),[P,U]=o(""),[R,A]=o([]),[D,$]=o(!1),[F,q]=o({});a((()=>{const e=u||"#e3f2ff",t=m||"#2d87f3",i=(new Date).getTime(),n=setInterval((()=>{const o=N.current,a=(new Date).getTime();o&&(xe.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",et(t,.9)||t),o.style.setProperty("--subot-inline-primary-color-100",et(t,.1)||"#e3f2ff"),o.style.setProperty("--subot-inline-primary-color-300",et(t,.3)||"#bcdeff"),v&&o.style.setProperty("--subot-inline-text-color",v),g&&o.style.setProperty("--subot-inline-text-button-color",g),b&&o.style.setProperty("--subot-inline-bg-content-color",b)})),clearInterval(n)),a-i>18e4&&clearInterval(n)}),100);return()=>{clearInterval(n)}}),[u,m,v,g,b]);const z=l((()=>{const e=window.gaData,t=window.location.origin+k+("tl-PH"===(null==B?void 0:B.locale)?s.replace("fil/",""):s),i={bot_id:d,account_id:Ae()||null,action_id:"",action_value:"",cookie_id:Re(),current_score:0,current_keys:[],current_selected:[],form_submit_meta:[],gtm_id:e?Object.keys(e)[0]:"",ga_client_id:C.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:$e()};return Pe(i,null==B?void 0:B.router.query)}),[]),H=l((()=>{var e;null===(e=N.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start",inline:"center"})}),[]),G=l(((e,t=!0)=>_(void 0,void 0,void 0,(function*(){var i;if(!e||!e.url||!e.bot_id)return;let n="",o=[];M(!0);const a=yield Ne(e.bot_id);1===(null==a?void 0:a._status)&&(n=null==a?void 0:a._data.id.toString(),o.push(null==a?void 0:a._data,null==a?void 0:a._data.first_node));const l=t?yield(r=o[0],_(void 0,void 0,void 0,(function*(){var e,t;try{if(!r)return null;const i=yield j(Se(Ee.GET_SUBOT_LOG,{botId:r.id,cookieId:Re(),accountId:Ae()||"",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:[r,...o],activeId:n.activeId,params:Object.assign(Object.assign({},n.params),{account_id:Ae()||n.params.account_id||null})}:null}catch(e){return null}}))):null;var r;l&&(o=l.nodes,n=l.activeId,O.current=(null===(i=l.params)||void 0===i?void 0:i.account_id)||0);const s=((e,{getParams:t})=>{try{if(!Ae())return null;const i=JSON.parse(localStorage.getItem(Xe)||""),n=18e5;return(null==i?void 0:i.botId)===e&&i.listNodes&&i.activeId&&i.createdAt+n>Date.now()&&(localStorage.removeItem(Xe),i.listNodes.slice(-1)[0].position===p.SSO)?{listNodes:i.listNodes,activeId:i.activeId,params:Object.assign(Object.assign(Object.assign({},t()),i.params),{account_id:Ae()||null,cookie_id:Re(i.params.cookie_id)})}:null}catch(e){return null}})(e.bot_id,{getParams:z});if(s&&s.params.action_id&&s.params.action_value){const e=yield ke(s.params);1===(null==e?void 0:e._status)&&(null==e?void 0:e._data.node)&&(n=null==e?void 0:e._data.node.id,o=s.listNodes,o[o.length-1]=null==e?void 0:e._data.node,Ze({nodes:o,activeId:n,params:s.params,accountIdFromLogs:O.current}),setTimeout((()=>{H()}),100))}const d=(null==s?void 0:s.params)||(null==l?void 0:l.params)||e,[c,u]=((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]})(o[0],n,o);M(!1),U(c),A(u),q(Object.assign(Object.assign({},e),d))}))),[]),V=l(((e,t)=>{const i=document.querySelector(`.si-revamp-event-submission[data-bot-id="${d}"]`);i&&i.click();let n=P,o=[...R];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(M(!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((()=>{A(o),U(n),M(!1),Ze({nodes:o,activeId:n,params:F,accountIdFromLogs:O.current})}),250)}),[R,P]),Y=l((e=>_(void 0,void 0,void 0,(function*(){if(null==e?void 0:e.node_id){const t=Object.assign(Object.assign({},e),Ve(R,P,e.action_id)),i=yield ke(t);if(M(!1),1===(null==i?void 0:i._status)){const e=null==i?void 0:i._data,{node:n}=e,o=x(e,["node"]),a=Object.assign(Object.assign({},n),{_message:Object.assign(Object.assign({},o),{node_id:n.id})});return void(-1!==R.findIndex((e=>e.id===a.id))?V(a):V(a,t))}S({title:w({id:"notification.comment.somethingWrong"}),message:"",type:"danger"})}const t=R.find((e=>e.id==P));t&&t.hasOwnProperty("first_node")&&(U(R[1].id.toString()),Ze({nodes:R,activeId:R[1].id.toString(),params:z(),accountIdFromLogs:O.current}))}))),[V,R]),W=l((()=>{const e=R.findIndex((({id:e})=>e==P));if(e&&-1!==e&&e>1){const t=R[e-1];U(t.id),Ze({nodes:R,activeId:t.id,params:F,accountIdFromLogs:O.current})}}),[R,P]),X=l((()=>{const e=z();G(e,!1);const t=R[0],i=R[1];Ze({nodes:[t,i],activeId:String(t.id),params:e,accountIdFromLogs:O.current})}),[z,G,R]),K=l((e=>{A((t=>e&&(null==e?void 0:e.node_id)&&(null==e?void 0:e.node_id)==P?t.map((t=>{const i=t;return i.id===P?Object.assign(Object.assign({},t),{_message:i._message?Object.assign(Object.assign({},i._message),e):e}):t})):t))}),[P]);a((()=>{if(C.get(I)){const e=z();G(e)}else Be({condition:()=>Boolean(C.get(I)),finished:()=>{const e=z();G(e)}})}),[]),a((()=>{if(!R.length)return;R.find((e=>e.id==P))&&P||U(d+"")}),[P,R]);const J=r((()=>({activeId:P,params:F,listNodes:R,loading:T,setLoading:M,getParams:z,onNext:Y,onPrev:W,onSubmit:V,onStartOver:X,onChange:K,isShowFooter:D,setIsShowFooter:$,isFullContainer:c,bgImgFullContainer:h,isDisabledAnimationOnMobile:f,onCloseMobile:y,userInfo:E})),[P,Y,W,V,K,X,D,F,R,T,M,z,c,f,y,E,h]);return R.length?e.createElement(tt.Provider,{value:J},e.createElement("div",{ref:N},t)):null},nt=t=>e.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),e.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"})),ot="480px",at=X.div`
2
2
  position: relative;
3
3
 
4
4
  .si-inline-revamp-container {
@@ -495,7 +495,7 @@ import e,{createContext as t,useContext as i,useRef as n,useState as o,useEffect
495
495
  background-color: #2d87f3;
496
496
  }
497
497
  }
498
- `,Ot=({clientId:t,voucherAnswers:i})=>{const[n,l]=o(0),[r,s]=o(0);a((()=>{j(Se(Ee.GET_VOUCHER_QUANTITY,{search:(null==i?void 0:i.voucherName.split("|")[0])||"",clientId:t}),"GET").then((e=>{const t=null==e?void 0:e._data[0];t.total_quantity&&(l(t.total_quantity),s(t.total_in_stock))}))}),[null==i?void 0:i.voucherName]);const d=n?r/n*100:0;return n?e.createElement(Nt,{className:"si-voucher-left-ui"},e.createElement("img",{src:ie.getAssetPath("subot/voucher_bg.png"),alt:"",loading:"eager",className:"si-voucher-bg"}),e.createElement("img",{src:ie.getAssetPath("subot/voucher_icon.png"),alt:"",loading:"eager",className:"si-voucher-item"}),e.createElement(ee,{className:"si-voucher-in-stock"},e.createElement("h3",null,r),e.createElement("img",{src:ie.getAssetPath("subot/voucher_icon_small.png"),alt:"",loading:"eager"})),e.createElement(ee,{className:"si-voucher-progress"},e.createElement(ee,{className:"si-voucher-progress--inner",style:{width:`${d}%`}}))):null},Tt=({node:t,onClickStart:o})=>{var l,s;const d=n(!1),{ref:c,inView:u}=Z(),m=ut(),{params:p,getParams:v,onNext:g,setIsShowFooter:b,listNodes:h}=i(tt),f=h[0],y=null===(l=null==f?void 0:f.extra_settings)||void 0===l?void 0:l.subot_type;r((()=>{b(!1)}),[]),a((()=>{u&&!d.current&&(Te(v()),d.current=!0)}),[u]);return e.createElement(It,{ref:c,className:z({"si-acuvue-wrap":"ACUVUE"===y})},e.createElement("h2",null,t.inline_title),e.createElement("div",{className:"si-node-start-desc"},e.createElement(wt,null,t.inline_description)),"ACUVUE"===y&&e.createElement(Ot,{clientId:null===(s=f.extra_settings)||void 0===s?void 0:s.client_id,voucherAnswers:{email:"",voucherName:""}}),e.createElement(K,{onClick:()=>{const e=v();e.device_id=qe(window.navigator.userAgent)?2:1,Oe(e),g(),null==o||o()},"data-event-category":"Service Connection","data-event-action":"Risk Screening Start","data-event-label":m,"data-bot-id":p.bot_id,rightIcon:e.createElement(ne.ArrowRight,{color:"var(--subot-inline-text-button-color, #fff)"}),styles:{root:{backgroundColor:"var(--subot-inline-primary-color) !important","&:hover":{backgroundColor:"var(--subot-inline-primary-color-hover) !important"},color:"var(--subot-inline-text-button-color, #fff) !important"}}},t.inline_start_button))};Tt.displayName="SubotInlineNodeStartContainer";const Ct=X.div``,Mt=X.div`
498
+ `,Ot=({clientId:t,voucherAnswers:i})=>{const[n,l]=o(0),[r,s]=o(0);a((()=>{j(Se(Ee.GET_VOUCHER_QUANTITY,{search:(null==i?void 0:i.voucherName.split("|")[0])||"",clientId:t}),"GET").then((e=>{const t=null==e?void 0:e._data[0];t.total_quantity&&(l(t.total_quantity),s(t.total_in_stock))}))}),[null==i?void 0:i.voucherName]);const d=n?r/n*100:0;return n?e.createElement(Nt,{className:"si-voucher-left-ui"},e.createElement("img",{src:ne.getAssetPath("subot/voucher_bg.png"),alt:"",loading:"eager",className:"si-voucher-bg"}),e.createElement("img",{src:ne.getAssetPath("subot/voucher_icon.png"),alt:"",loading:"eager",className:"si-voucher-item"}),e.createElement(te,{className:"si-voucher-in-stock"},e.createElement("h3",null,r),e.createElement("img",{src:ne.getAssetPath("subot/voucher_icon_small.png"),alt:"",loading:"eager"})),e.createElement(te,{className:"si-voucher-progress"},e.createElement(te,{className:"si-voucher-progress--inner",style:{width:`${d}%`}}))):null},Tt=({node:t,onClickStart:o})=>{var l,s;const d=n(!1),{ref:c,inView:u}=ee(),m=ut(),{params:p,getParams:v,onNext:g,setIsShowFooter:b,listNodes:h}=i(tt),f=h[0],y=null===(l=null==f?void 0:f.extra_settings)||void 0===l?void 0:l.subot_type;r((()=>{b(!1)}),[]),a((()=>{u&&!d.current&&(Te(v()),d.current=!0)}),[u]);return e.createElement(It,{ref:c,className:z({"si-acuvue-wrap":"ACUVUE"===y})},e.createElement("h2",null,t.inline_title),e.createElement("div",{className:"si-node-start-desc"},e.createElement(wt,null,t.inline_description)),"ACUVUE"===y&&e.createElement(Ot,{clientId:null===(s=f.extra_settings)||void 0===s?void 0:s.client_id,voucherAnswers:{email:"",voucherName:""}}),e.createElement(K,{onClick:()=>{const e=v();e.device_id=qe(window.navigator.userAgent)?2:1,Oe(e),g(),null==o||o()},"data-event-category":"Service Connection","data-event-action":"Risk Screening Start","data-event-label":m,"data-bot-id":p.bot_id,rightIcon:e.createElement(Z,{color:"var(--subot-inline-text-button-color, #fff)"}),styles:{root:{backgroundColor:"var(--subot-inline-primary-color) !important","&:hover":{backgroundColor:"var(--subot-inline-primary-color-hover) !important"},color:"var(--subot-inline-text-button-color, #fff) !important"}}},t.inline_start_button))};Tt.displayName="SubotInlineNodeStartContainer";const Ct=X.div``,Mt=X.div`
499
499
  .si-intent-list {
500
500
  display: flex;
501
501
  gap: 12px;
@@ -550,7 +550,7 @@ import e,{createContext as t,useContext as i,useRef as n,useState as o,useEffect
550
550
  button {
551
551
  min-width: 230px;
552
552
  }
553
- `,At="campaign/{campaignCode}/lead";oe.extend(ae);const Lt=e=>_(void 0,void 0,void 0,(function*(){const{first_name:t,last_name:i,address:n,dob:o,email:a,phone:l}=e||{};return yield(r=((e,t)=>{const{leadApiUrl:i}=null==B?void 0:B.env;return i+U(e,Object.assign({},t))})(At,{campaignCode:process.env.NEXT_PUBLIC_FRISO_COMPAIGN_CODE||"wufl4mh2vunsklq"}),s="POST",d={data:{url:window.location.href,title_article:document.title,referrer:"hlbs",meta:[{key:"first_name",value:t||"",control:"text"},{key:"last_name",value:i||"",control:"text"},{key:"due_date_dob",value:o,control:"due_date_dob"},{key:"province",value:((null==n?void 0:n.selectedProvince)||"").replace("Tỉnh ","").replace("Thành phố ",""),control:"province"},{key:"email",value:a||"",control:"email"},{key:"phone",value:l||"",control:"tel"},{key:"address",value:n?[(null==n?void 0:n.selectedProvince)||"",(null==n?void 0:n.selectedDistrict)||"",(null==n?void 0:n.selectedWard)||"",(null==n?void 0:n.extraInfo)||""].join("; "):"",control:"text"}]}},_(void 0,void 0,void 0,(function*(){if(null==d?void 0:d.data){let e=C.get(D);const t=C.get(I);if(!e){const t=$();e=t,C.set(D,t)}d.data.cookie_id=e,d.data.ga_client_id=t||""}return j(r,s,d)})));var r,s,d})),Dt=e=>{const{foundPhone:t,foundDate:i}=(e=>{let t="",i="";return e.forEach((e=>{var n,o,a,l,r,s;const d=e,c=(null===(a=null===(o=null===(n=null==d?void 0:d._message)||void 0===n?void 0:n.form_submit_meta)||void 0===o?void 0:o.find((e=>e.control===h[g.USER_SUBMIT_OTP]||e.control===h[g.USER_SUBMIT_PHONE])))||void 0===a?void 0:a.value)||"",u=(null===(s=null===(r=null===(l=null==d?void 0:d._message)||void 0===l?void 0:l.form_submit_meta)||void 0===r?void 0:r.find((e=>e.control===h[g.USER_SUBMIT_DATE])))||void 0===s?void 0:s.value)||"";c&&u&&(t=c,i=u)})),{foundPhone:t,foundDate:i}})(e);if(!t||!i)return;const n=oe(i),o=t.replace("+84","0"),a=n.isSameOrBefore(oe()),l=n.format("YYYY-MM-DD");window.location.href=U(process.env.NEXT_PUBLIC_FRISO_MINI_GAME_URL||"",Object.assign({phone:o},a?{dob:l}:{edd:l}))},$t=({intent:t})=>{const{listNodes:n}=i(tt),o=r((()=>t.url&&t.label&&(null==t?void 0:t.type)===u.BOT_MAIN_BUTTON?{"data-event-category":"Service Connection","data-event-action":`Risk Screening - ${t.label}`,"data-event-label":t.url}:{}),[t]);return(null==t?void 0:t.label)?e.createElement(Rt,null,e.createElement(K,Object.assign({size:"md",color:"primary",onClick:()=>{var e;(null===(e=t.url)||void 0===e?void 0:e.includes("{{.frisoRedirectUrl}}"))?Dt(n):t.url&&ze(t.url)}},o,{styles:{root:{backgroundColor:"var(--subot-inline-primary-color) !important","&:hover":{backgroundColor:"var(--subot-inline-primary-color-hover) !important"},color:"var(--subot-inline-text-button-color, #fff) !important"}}}),e.createElement(wt,null,t.label))):null};$t.displayName="SubotInlineIntentBotButton";const Ft=({intent:t})=>{const n=ut(),{listNodes:o,activeId:a,params:l}=i(tt),r=o.find((e=>e.id==a));if(!t.label||!r)return null;const s={"data-event-category":"Service Connection","data-event-action":t.label,"data-event-label":n,"data-bot-id":l.bot_id,"data-question-id":r.id};return e.createElement(ee,{style:{position:"absolute",zIndex:-1}},e.createElement("button",Object.assign({className:"si-revamp-event-submission"},s)))};Ft.displayName="SubotInlineIntentBotEventSubmission";const qt=X.div`
553
+ `,At="campaign/{campaignCode}/lead";oe.extend(ae);const Lt=e=>_(void 0,void 0,void 0,(function*(){const{first_name:t,last_name:i,address:n,dob:o,email:a,phone:l}=e||{};return yield(r=((e,t)=>{const{leadApiUrl:i}=null==B?void 0:B.env;return i+U(e,Object.assign({},t))})(At,{campaignCode:process.env.NEXT_PUBLIC_FRISO_COMPAIGN_CODE||"wufl4mh2vunsklq"}),s="POST",d={data:{url:window.location.href,title_article:document.title,referrer:"hlbs",meta:[{key:"first_name",value:t||"",control:"text"},{key:"last_name",value:i||"",control:"text"},{key:"due_date_dob",value:o,control:"due_date_dob"},{key:"province",value:((null==n?void 0:n.selectedProvince)||"").replace("Tỉnh ","").replace("Thành phố ",""),control:"province"},{key:"email",value:a||"",control:"email"},{key:"phone",value:l||"",control:"tel"},{key:"address",value:n?[(null==n?void 0:n.selectedProvince)||"",(null==n?void 0:n.selectedDistrict)||"",(null==n?void 0:n.selectedWard)||"",(null==n?void 0:n.extraInfo)||""].join("; "):"",control:"text"}]}},_(void 0,void 0,void 0,(function*(){if(null==d?void 0:d.data){let e=C.get(D);const t=C.get(I);if(!e){const t=$();e=t,C.set(D,t)}d.data.cookie_id=e,d.data.ga_client_id=t||""}return j(r,s,d)})));var r,s,d})),Dt=e=>{const{foundPhone:t,foundDate:i}=(e=>{let t="",i="";return e.forEach((e=>{var n,o,a,l,r,s;const d=e,c=(null===(a=null===(o=null===(n=null==d?void 0:d._message)||void 0===n?void 0:n.form_submit_meta)||void 0===o?void 0:o.find((e=>e.control===h[g.USER_SUBMIT_OTP]||e.control===h[g.USER_SUBMIT_PHONE])))||void 0===a?void 0:a.value)||"",u=(null===(s=null===(r=null===(l=null==d?void 0:d._message)||void 0===l?void 0:l.form_submit_meta)||void 0===r?void 0:r.find((e=>e.control===h[g.USER_SUBMIT_DATE])))||void 0===s?void 0:s.value)||"";c&&u&&(t=c,i=u)})),{foundPhone:t,foundDate:i}})(e);if(!t||!i)return;const n=oe(i),o=t.replace("+84","0"),a=n.isSameOrBefore(oe()),l=n.format("YYYY-MM-DD");window.location.href=U(process.env.NEXT_PUBLIC_FRISO_MINI_GAME_URL||"",Object.assign({phone:o},a?{dob:l}:{edd:l}))},$t=({intent:t})=>{const{listNodes:n}=i(tt),o=r((()=>t.url&&t.label&&(null==t?void 0:t.type)===u.BOT_MAIN_BUTTON?{"data-event-category":"Service Connection","data-event-action":`Risk Screening - ${t.label}`,"data-event-label":t.url}:{}),[t]);return(null==t?void 0:t.label)?e.createElement(Rt,null,e.createElement(K,Object.assign({size:"md",color:"primary",onClick:()=>{var e;(null===(e=t.url)||void 0===e?void 0:e.includes("{{.frisoRedirectUrl}}"))?Dt(n):t.url&&ze(t.url)}},o,{styles:{root:{backgroundColor:"var(--subot-inline-primary-color) !important","&:hover":{backgroundColor:"var(--subot-inline-primary-color-hover) !important"},color:"var(--subot-inline-text-button-color, #fff) !important"}}}),e.createElement(wt,null,t.label))):null};$t.displayName="SubotInlineIntentBotButton";const Ft=({intent:t})=>{const n=ut(),{listNodes:o,activeId:a,params:l}=i(tt),r=o.find((e=>e.id==a));if(!t.label||!r)return null;const s={"data-event-category":"Service Connection","data-event-action":t.label,"data-event-label":n,"data-bot-id":l.bot_id,"data-question-id":r.id};return e.createElement(te,{style:{position:"absolute",zIndex:-1}},e.createElement("button",Object.assign({className:"si-revamp-event-submission"},s)))};Ft.displayName="SubotInlineIntentBotEventSubmission";const qt=X.div`
554
554
  display: flex;
555
555
  padding: 8px 0;
556
556
 
@@ -1710,7 +1710,7 @@ import e,{createContext as t,useContext as i,useRef as n,useState as o,useEffect
1710
1710
  letter-spacing: -0.16px;
1711
1711
  color: var(--subot-inline-text-color, #262626);
1712
1712
  }
1713
- `,un={input:{"&:focus":{borderColor:"var(--subot-inline-primary-color) !important",boxShadow:"0px 0px 0px 2px var(--subot-inline-primary-color-300) !important"}}},mn={root:{":not(:disabled)":{backgroundColor:"var(--subot-inline-primary-color) !important","&:hover":{backgroundColor:"var(--subot-inline-primary-color-hover) !important"}}}},pn=({action:t,onChange:l,active:r,htmlType:s,formSubmitMeta:d})=>{const{formatMessage:c}=i(L),u=ut(),m=n(null),[p,v]=o(""),{params:b}=i(tt),h=(null==t?void 0:t.type)===g.USER_CHOICE_TEXT_BY_INPUT;a((()=>{var e,t;r&&(v((null===(e=null==d?void 0:d.find((e=>e.key===We)))||void 0===e?void 0:e.value)||""),null===(t=m.current)||void 0===t||t.focus())}),[r,d]);return e.createElement(e.Fragment,null,e.createElement(cn,{id:"si-action-text-choice",active:!!r,onClick:()=>l&&l(t),"data-event-category":"Service Connection","data-event-action":"Risk Screening Answer Click","data-event-label":u,"data-bot-id":b.bot_id},e.createElement(an,{active:!!r},"checkbox"===s&&e.createElement(on,{className:"icon-checkbox",viewBox:"0 0 22 22"})),e.createElement("div",{className:"label"},null==t?void 0:t.label)),h&&r&&e.createElement(ee,{px:"2px",style:{textAlign:"right"}},e.createElement(te,{ref:m,placeholder:null==t?void 0:t.label,styles:un,value:p,onChange:e=>v(e.target.value),maxLength:360}),e.createElement(K,{size:"sm",mt:"5px",styles:mn,disabled:!p,onClick:()=>{p&&l&&l(t,[{key:We,control:"text",value:p}])}},c({id:"feedback.submit",defaultMessage:"Submit"}))))};pn.displayName="SubotInlineActionTextChoice";const vn=X.div``,gn=({action:t,onChange:i,active:n,htmlType:o})=>e.createElement(vn,null,e.createElement(pn,{active:!!n,action:t,onChange:e=>{e&&i&&i({key:null==e?void 0:e.key,control:h[null==e?void 0:e.type],value:"",action_id:null==e?void 0:e.id})},htmlType:o}));gn.displayName="SubotInlinePollChoice";const bn=({action:t,onChange:i,active:n,htmlType:o})=>e.createElement(rn,{active:!!n,action:t,onChange:e=>{e&&i&&i({key:null==e?void 0:e.key,control:h[null==e?void 0:e.type],value:"",action_id:null==e?void 0:e.id})},htmlType:o});bn.displayName="SubotInlinePollChoiceImage";const hn={[g.USER_CHOICE_TEXT]:pn,[g.USER_CHOICE_TEXT_BY_INPUT]:pn,[g.USER_CHOICE_IMAGE]:rn,[g.ACTION_SSO_REDIRECT]:dn,[g.POLL_CHOICE]:gn,[g.POLL_BUTTON]:()=>null,[g.POLL_CHOICE_IMAGE]:bn},fn=new Proxy(hn,{get:(t,i)=>hn[i]||(()=>F?null:e.createElement("p",null,"SubotInlineRevampActionBase ",i))}),yn=[g.USER_CHOICE_NEXT],_n=({actions:t,value:i,onChange:n,htmlType:o,node_type:a,formSubmitMeta:l})=>{const s=r((()=>!!(null==t?void 0:t.find((e=>e.type===g.POLL_CHOICE_IMAGE)))),[t]),d=r((()=>{switch(a){case m.IMAGE:case m.REACTION:return"si-two-columns";default:return s?"si-two-columns":""}}),[a]);return(null==t?void 0:t.length)?e.createElement(nn,{id:"si-action",className:d},null==t?void 0:t.map((t=>{const a=t.type;if(yn.includes(a))return null;const r=fn[t.type];return r&&e.createElement(r,{key:t.id,action:t,onChange:n,active:null==i?void 0:i.includes(t.id),htmlType:o,formSubmitMeta:l})}))):null};_n.displayName="SubotInlineAction";const xn=({node:t,indexNumber:n})=>{const{params:o,listNodes:l,activeId:s,onSubmit:d,setIsShowFooter:c,setLoading:u}=i(tt),{value:m,setValue:p}=i(bt);r((()=>{c(!0)}),[]),a((()=>{p((null==t?void 0:t._message)||{})}),[]);return t?e.createElement(tn,{id:"si-node-final"},e.createElement(ri,{intents:t.intents||[],indexNumber:n}),e.createElement(_n,{node_type:null==t?void 0:t.type,value:(null==m?void 0:m.action_id)?[null==m?void 0:m.action_id]:[],actions:null==t?void 0:t.actions,onChange:e=>_(void 0,void 0,void 0,(function*(){if(!e)return;p(Object.assign(Object.assign({},m),{action_id:null==e?void 0:e.id,action_value:null==e?void 0:e.key}));const i=Object.assign(Object.assign(Object.assign(Object.assign({},o),m),{node_id:t.id,action_id:null==e?void 0:e.id,action_value:null==e?void 0:e.key}),Ve(l,s,e.id));u(!0);const n=yield ke(i);if(u(!1),1===(null==n?void 0:n._status)){const e=null==n?void 0:n._data,{node:t}=e,o=x(e,["node"]),a=Object.assign(Object.assign({},t),{_message:Object.assign(Object.assign({},o),{node_id:t.id})});d(a,i)}}))})):null};xn.displayName="SubotinlineNodeImage";const En=X.div`
1713
+ `,un={input:{"&:focus":{borderColor:"var(--subot-inline-primary-color) !important",boxShadow:"0px 0px 0px 2px var(--subot-inline-primary-color-300) !important"}}},mn={root:{":not(:disabled)":{backgroundColor:"var(--subot-inline-primary-color) !important","&:hover":{backgroundColor:"var(--subot-inline-primary-color-hover) !important"}}}},pn=({action:t,onChange:l,active:r,htmlType:s,formSubmitMeta:d})=>{const{formatMessage:c}=i(L),u=ut(),m=n(null),[p,v]=o(""),{params:b}=i(tt),h=(null==t?void 0:t.type)===g.USER_CHOICE_TEXT_BY_INPUT;a((()=>{var e,t;r&&(v((null===(e=null==d?void 0:d.find((e=>e.key===We)))||void 0===e?void 0:e.value)||""),null===(t=m.current)||void 0===t||t.focus())}),[r,d]);return e.createElement(e.Fragment,null,e.createElement(cn,{id:"si-action-text-choice",active:!!r,onClick:()=>l&&l(t),"data-event-category":"Service Connection","data-event-action":"Risk Screening Answer Click","data-event-label":u,"data-bot-id":b.bot_id},e.createElement(an,{active:!!r},"checkbox"===s&&e.createElement(on,{className:"icon-checkbox",viewBox:"0 0 22 22"})),e.createElement("div",{className:"label"},null==t?void 0:t.label)),h&&r&&e.createElement(te,{px:"2px",style:{textAlign:"right"}},e.createElement(ie,{ref:m,placeholder:null==t?void 0:t.label,styles:un,value:p,onChange:e=>v(e.target.value),maxLength:360}),e.createElement(K,{size:"sm",mt:"5px",styles:mn,disabled:!p,onClick:()=>{p&&l&&l(t,[{key:We,control:"text",value:p}])}},c({id:"feedback.submit",defaultMessage:"Submit"}))))};pn.displayName="SubotInlineActionTextChoice";const vn=X.div``,gn=({action:t,onChange:i,active:n,htmlType:o})=>e.createElement(vn,null,e.createElement(pn,{active:!!n,action:t,onChange:e=>{e&&i&&i({key:null==e?void 0:e.key,control:h[null==e?void 0:e.type],value:"",action_id:null==e?void 0:e.id})},htmlType:o}));gn.displayName="SubotInlinePollChoice";const bn=({action:t,onChange:i,active:n,htmlType:o})=>e.createElement(rn,{active:!!n,action:t,onChange:e=>{e&&i&&i({key:null==e?void 0:e.key,control:h[null==e?void 0:e.type],value:"",action_id:null==e?void 0:e.id})},htmlType:o});bn.displayName="SubotInlinePollChoiceImage";const hn={[g.USER_CHOICE_TEXT]:pn,[g.USER_CHOICE_TEXT_BY_INPUT]:pn,[g.USER_CHOICE_IMAGE]:rn,[g.ACTION_SSO_REDIRECT]:dn,[g.POLL_CHOICE]:gn,[g.POLL_BUTTON]:()=>null,[g.POLL_CHOICE_IMAGE]:bn},fn=new Proxy(hn,{get:(t,i)=>hn[i]||(()=>F?null:e.createElement("p",null,"SubotInlineRevampActionBase ",i))}),yn=[g.USER_CHOICE_NEXT],_n=({actions:t,value:i,onChange:n,htmlType:o,node_type:a,formSubmitMeta:l})=>{const s=r((()=>!!(null==t?void 0:t.find((e=>e.type===g.POLL_CHOICE_IMAGE)))),[t]),d=r((()=>{switch(a){case m.IMAGE:case m.REACTION:return"si-two-columns";default:return s?"si-two-columns":""}}),[a]);return(null==t?void 0:t.length)?e.createElement(nn,{id:"si-action",className:d},null==t?void 0:t.map((t=>{const a=t.type;if(yn.includes(a))return null;const r=fn[t.type];return r&&e.createElement(r,{key:t.id,action:t,onChange:n,active:null==i?void 0:i.includes(t.id),htmlType:o,formSubmitMeta:l})}))):null};_n.displayName="SubotInlineAction";const xn=({node:t,indexNumber:n})=>{const{params:o,listNodes:l,activeId:s,onSubmit:d,setIsShowFooter:c,setLoading:u}=i(tt),{value:m,setValue:p}=i(bt);r((()=>{c(!0)}),[]),a((()=>{p((null==t?void 0:t._message)||{})}),[]);return t?e.createElement(tn,{id:"si-node-final"},e.createElement(ri,{intents:t.intents||[],indexNumber:n}),e.createElement(_n,{node_type:null==t?void 0:t.type,value:(null==m?void 0:m.action_id)?[null==m?void 0:m.action_id]:[],actions:null==t?void 0:t.actions,onChange:e=>_(void 0,void 0,void 0,(function*(){if(!e)return;p(Object.assign(Object.assign({},m),{action_id:null==e?void 0:e.id,action_value:null==e?void 0:e.key}));const i=Object.assign(Object.assign(Object.assign(Object.assign({},o),m),{node_id:t.id,action_id:null==e?void 0:e.id,action_value:null==e?void 0:e.key}),Ve(l,s,e.id));u(!0);const n=yield ke(i);if(u(!1),1===(null==n?void 0:n._status)){const e=null==n?void 0:n._data,{node:t}=e,o=x(e,["node"]),a=Object.assign(Object.assign({},t),{_message:Object.assign(Object.assign({},o),{node_id:t.id})});d(a,i)}}))})):null};xn.displayName="SubotinlineNodeImage";const En=X.div`
1714
1714
  display: flex;
1715
1715
  flex-direction: column;
1716
1716
  padding-bottom: 16px;
@@ -1 +1 @@
1
- export{f as CardAuthor,C as CardLink,B as CardPost,D as CardPostPopoverMore,b as CardReactions,E as CardReply,F as CardReplyPopover,g as CreateNewPostContent,h as CreatePostDescription,i as CreatePostTitle,r as ImagePreviewPopup,I as InputCommentBar,d as LabelPin,L as LabelSortPin,e as LabelSorting,G as PopoverMenu,P as PopupDanger,k as PopupDoctor,j as PopupExpert,n as PopupFrame,l as PopupHospital,q as PostContent,v as PostImagePreview,s as PostSingleImageViewPopup,y as ProfileDetail,x as ProfileDetailModal,p as ShareBox,S as SharePopup,A as SkipQuestionOfExpertBtn,w as SocialLinkPreview,H as SourceList,o as SubmitReportForm,z as TabNameInProfileDetail,c as TagTopic,T as TogetherAuthConfigContext,a as TogetherAuthConfigContextProvider,t as TogetherTypes,m as TopicSelectList,V as VerifiedTag,u as useTogetherAuthRequiredAction}from"./types-d7d54442.js";export{d as TogetherDataTransforms,U as UserAvatar}from"./index-557e3a42.js";export{D as DefaultComponentGlobalContextData,G as GlobalData,T as TogetherComponentGlobalContext,a as TogetherComponentGlobalContextProvider,c as TogetherConstants}from"./utils-e3640c23.js";import"react";import"./Plus-61592057.js";import"./tslib.es6-4a7efa3e.js";import"@mantine/core";import"./theme-2f0d6367.js";import"./translationsContext-d3dc4282.js";import"string-format";import"./index-0d9821e3.js";import"styled-components";import"./useTranslations-cce18e33.js";import"innertext";import"./index-04f183b8.js";import"./WhatsApp-5a6ef99f.js";import"./useUniqueId-463b8d94.js";import"./index-8c1e2ce6.js";import"@mantine/hooks";import"./index-01efa9be.js";import"./index-05214244.js";import"date-fns/locale";import"./Subot-ade21804.js";import"./isProduction-8ae381c3.js";import"dayjs";import"./utils-597f4846.js";import"@mantine/carousel";import"classnames";import"@mantine/dates";import"./index-5f52d2b1.js";import"./index.styles-d3334c25.js";import"./constants-ed8abdff.js";import"./animation-1d694586.js";import"react-keyed-flatten-children";import"./paths-dfd6bdd2.js";import"./index-c6fcc250.js";import"lodash/debounce";import"react-contenteditable";import"./index-18ff3f75.js";import"./index-a9cbaabd.js";import"./cookieHelper-3fe8fdf3.js";import"react-dom";import"./number-c9fbe4ab.js";import"date-fns";import"dayjs/plugin/relativeTime";import"./index-07905741.js";import"./routing-a6c8f9f9.js";import"./utils-508d45bb.js";import"./index.styled-c2100f19.js";import"./index-761ce6cc.js";import"slugify";
1
+ export{f as CardAuthor,C as CardLink,B as CardPost,D as CardPostPopoverMore,b as CardReactions,E as CardReply,F as CardReplyPopover,g as CreateNewPostContent,h as CreatePostDescription,i as CreatePostTitle,r as ImagePreviewPopup,I as InputCommentBar,d as LabelPin,L as LabelSortPin,e as LabelSorting,G as PopoverMenu,P as PopupDanger,k as PopupDoctor,j as PopupExpert,n as PopupFrame,l as PopupHospital,q as PostContent,v as PostImagePreview,s as PostSingleImageViewPopup,y as ProfileDetail,x as ProfileDetailModal,p as ShareBox,S as SharePopup,A as SkipQuestionOfExpertBtn,w as SocialLinkPreview,H as SourceList,o as SubmitReportForm,z as TabNameInProfileDetail,c as TagTopic,T as TogetherAuthConfigContext,a as TogetherAuthConfigContextProvider,t as TogetherTypes,m as TopicSelectList,V as VerifiedTag,u as useTogetherAuthRequiredAction}from"./types-6d397125.js";export{d as TogetherDataTransforms,U as UserAvatar}from"./index-823fd7c0.js";export{D as DefaultComponentGlobalContextData,G as GlobalData,T as TogetherComponentGlobalContext,a as TogetherComponentGlobalContextProvider,c as TogetherConstants}from"./utils-970ce0c0.js";import"react";import"./index-d27a0e25.js";import"./tslib.es6-266309d1.js";import"@mantine/core";import"./translationsContext-6d2efd65.js";import"string-format";import"@hhgtech/icons/other";import"./index-13e62563.js";import"./theme-3db3c9a8.js";import"styled-components";import"./useTranslations-df1b3bb8.js";import"innertext";import"./index-5408f5a4.js";import"@mantine/hooks";import"./index-2e99f941.js";import"./index-9e5956c2.js";import"date-fns/locale";import"./Subot-4642c5bf.js";import"./isProduction-00695d80.js";import"dayjs";import"./utils-5b4e60da.js";import"@mantine/carousel";import"classnames";import"./useUniqueId-03fbaecd.js";import"@hhgtech/icons/core";import"@mantine/dates";import"./index-79ef3a30.js";import"./index.styles-94af560f.js";import"./constants-f7c80032.js";import"./animation-0340efb3.js";import"react-keyed-flatten-children";import"./paths-749b4b53.js";import"./index-5e1af23a.js";import"lodash/debounce";import"react-contenteditable";import"./index-3452fed2.js";import"./index-24557f2b.js";import"./cookieHelper-4f089e3c.js";import"react-dom";import"./index-13dc1f44.js";import"./number-1347eb7b.js";import"date-fns";import"dayjs/plugin/relativeTime";import"./index-3aff939b.js";import"./routing-2b284b30.js";import"./utils-3d2e3f0f.js";import"./index.styled-14b65c9e.js";import"./index-8c77d7e0.js";import"slugify";