@hhgtech/hhg-components 1.29.414 → 1.29.416-beta-1

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 (513) hide show
  1. package/build/{InputDate-2450cdc3.js → InputDate-cdba1a1a.js} +3 -3
  2. package/build/{LastPeriod-f7a00767.js → LastPeriod-f84d3d12.js} +1 -1
  3. package/build/{MobileBottomNavigationIcon-2c2925fa.js → MobileBottomNavigationIcon-c6690b1c.js} +3 -3
  4. package/build/{Spinner-2d6176f4.js → Spinner-b730fa1b.js} +1 -1
  5. package/build/{WhatsApp-b59cf4a4.js → WhatsApp-80f3faa2.js} +1 -1
  6. package/build/adapters.js +20 -20
  7. package/build/atoms.js +49 -49
  8. package/build/babyGrowth.js +84 -84
  9. package/build/cache.js +2 -2
  10. package/build/care.js +17 -17
  11. package/build/careBookingSearchBar.js +14 -14
  12. package/build/careBookingSearchBarV2.js +15 -15
  13. package/build/components.js +98 -98
  14. package/build/{constants-e73c3489.js → constants-1608c608.js} +5 -2
  15. package/build/constants.js +3 -3
  16. package/build/constantsDomainLocales.js +1 -1
  17. package/build/constantsRiskScreener.js +2 -2
  18. package/build/constantsSite.js +2 -2
  19. package/build/{core-142f47f1.js → core-b58b6ade.js} +1 -1
  20. package/build/{dataTransform-336e13af.js → dataTransform-21e9ae78.js} +1 -1
  21. package/build/ecom.js +4 -4
  22. package/build/{editor-34cb2766.js → editor-1201c05e.js} +11 -11
  23. package/build/embeddedHeathToolCards_babyGrowth.js +24 -24
  24. package/build/embeddedHeathToolCards_babyPoop.js +20 -20
  25. package/build/embeddedHeathToolCards_babyVaccine.js +23 -23
  26. package/build/embeddedHeathToolCards_bmi_bmi.js +26 -26
  27. package/build/embeddedHeathToolCards_bmrBmr.js +26 -26
  28. package/build/embeddedHeathToolCards_dueDate_dueDate.js +23 -23
  29. package/build/embeddedHeathToolCards_ovulation_ovulation.js +23 -23
  30. package/build/embeddedHeathToolCards_pwg_pwg.js +27 -27
  31. package/build/embeddedHeathToolCards_targetHeartRate.js +28 -28
  32. package/build/esm/{InputDate-d7a62dfe.js → InputDate-bf6a9363.js} +3 -3
  33. package/build/esm/{LastPeriod-ecf2b009.js → LastPeriod-08abd9e0.js} +1 -1
  34. package/build/esm/{MobileBottomNavigationIcon-9343f89b.js → MobileBottomNavigationIcon-f949a29e.js} +3 -3
  35. package/build/esm/{Spinner-bb8cf11c.js → Spinner-df4fdeb5.js} +1 -1
  36. package/build/esm/{WhatsApp-2b1acb81.js → WhatsApp-5b241d8e.js} +1 -1
  37. package/build/esm/adapters.js +20 -20
  38. package/build/esm/atoms.js +49 -49
  39. package/build/esm/babyGrowth.js +84 -84
  40. package/build/esm/cache.js +2 -2
  41. package/build/esm/care.js +17 -17
  42. package/build/esm/careBookingSearchBar.js +14 -14
  43. package/build/esm/careBookingSearchBarV2.js +15 -15
  44. package/build/esm/components.js +98 -98
  45. package/build/esm/{constants-c1f4a1a2.js → constants-4f6be0b0.js} +5 -2
  46. package/build/esm/constants.js +3 -3
  47. package/build/esm/constantsDomainLocales.js +1 -1
  48. package/build/esm/constantsRiskScreener.js +2 -2
  49. package/build/esm/constantsSite.js +2 -2
  50. package/build/esm/{core-4e16b9f7.js → core-ad50807e.js} +1 -1
  51. package/build/esm/{dataTransform-7a8ce18a.js → dataTransform-b5723a88.js} +1 -1
  52. package/build/esm/ecom.js +4 -4
  53. package/build/esm/{editor-0f2e51a6.js → editor-a8d53ac1.js} +11 -11
  54. package/build/esm/embeddedHeathToolCards_babyGrowth.js +24 -24
  55. package/build/esm/embeddedHeathToolCards_babyPoop.js +20 -20
  56. package/build/esm/embeddedHeathToolCards_babyVaccine.js +23 -23
  57. package/build/esm/embeddedHeathToolCards_bmi_bmi.js +26 -26
  58. package/build/esm/embeddedHeathToolCards_bmrBmr.js +26 -26
  59. package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +23 -23
  60. package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +23 -23
  61. package/build/esm/embeddedHeathToolCards_pwg_pwg.js +27 -27
  62. package/build/esm/embeddedHeathToolCards_targetHeartRate.js +28 -28
  63. package/build/esm/footer.js +22 -22
  64. package/build/esm/gAssets.js +2 -2
  65. package/build/esm/{healthTools-17e63b68.js → healthTools-84409e98.js} +1 -1
  66. package/build/esm/healthToolsCardWrapper.js +19 -19
  67. package/build/esm/healthToolsForm.js +34 -34
  68. package/build/esm/hooks/usePlacesAutocomplete.d.ts +1 -1
  69. package/build/esm/hooks.js +13 -13
  70. package/build/esm/i18n.js +2 -2
  71. package/build/esm/i18nV2.js +2 -2
  72. package/build/esm/{index-223dd26f.js → index-067e8885.js} +15 -15
  73. package/build/esm/{index-32350ec1.js → index-10e26d0d.js} +25 -25
  74. package/build/esm/{index-ee39db81.js → index-16f555a0.js} +6 -6
  75. package/build/esm/{index-b3dbab58.js → index-1c8c4563.js} +32 -32
  76. package/build/esm/{index-799489a8.js → index-2089f502.js} +2 -2
  77. package/build/esm/{index-664a450d.js → index-20eab504.js} +6 -6
  78. package/build/esm/{index-1215bc9f.js → index-25983827.js} +1 -1
  79. package/build/esm/{index-95bec2a3.js → index-32c0c36c.js} +3 -3
  80. package/build/esm/{index-4ddab84e.js → index-33d9cfb9.js} +3 -3
  81. package/build/esm/{index-6ae951d5.js → index-39c0105f.js} +8 -8
  82. package/build/esm/{index-80f8dfd1.js → index-3b49172b.js} +6 -6
  83. package/build/esm/{index-6e8d7d0b.js → index-477b8c7a.js} +11 -11
  84. package/build/esm/{index-0d505406.js → index-4851fad7.js} +17 -17
  85. package/build/esm/{index-d6ec7353.js → index-5234efcb.js} +2 -2
  86. package/build/esm/{index-a73bd578.js → index-547339b4.js} +2 -2
  87. package/build/esm/{index-4afdc75d.js → index-5747d34b.js} +16 -16
  88. package/build/esm/{index-20a5bb17.js → index-5a7a3c1a.js} +13 -13
  89. package/build/esm/{index-76e673c7.js → index-5ac13b18.js} +32 -32
  90. package/build/esm/{index-613a8cfa.js → index-5b071622.js} +2 -2
  91. package/build/esm/{index-3b56ed67.js → index-5bab57de.js} +6 -6
  92. package/build/esm/{index-ade3e4b4.js → index-6092ee9c.js} +13 -13
  93. package/build/esm/{index-a0a5a00b.js → index-6206ea8f.js} +1 -1
  94. package/build/esm/{index-eb241484.js → index-66adda7e.js} +24 -24
  95. package/build/esm/{index-2953a674.js → index-66f326a0.js} +2 -2
  96. package/build/esm/{index-cc3edb30.js → index-6a588d96.js} +2 -2
  97. package/build/esm/{index-4ed9d391.js → index-6b742e45.js} +17 -17
  98. package/build/esm/{index-a5768260.js → index-705da63f.js} +2 -2
  99. package/build/esm/{index-b79e3e8d.js → index-715d6532.js} +2 -2
  100. package/build/esm/{index-42f52871.js → index-726402d3.js} +2 -2
  101. package/build/esm/{index-aebb1ac3.js → index-7490f2c5.js} +6 -6
  102. package/build/esm/{index-18cf2cbc.js → index-77d1054c.js} +17 -17
  103. package/build/esm/{index-871dee36.js → index-77efae47.js} +3 -3
  104. package/build/esm/{index-908c9e0d.js → index-782ac143.js} +1 -1
  105. package/build/esm/{index-233138ba.js → index-792e681e.js} +2 -2
  106. package/build/esm/{index-6c6bf90f.js → index-7b525830.js} +3 -3
  107. package/build/esm/{index-71de2bcc.js → index-7dbb7127.js} +1 -1
  108. package/build/esm/{index-a3e2216d.js → index-819c04d5.js} +15 -15
  109. package/build/esm/{index-3d8ec525.js → index-8513ba9e.js} +1 -1
  110. package/build/esm/{index-8b39751d.js → index-85496ec5.js} +21 -41
  111. package/build/esm/{index-f8759bee.js → index-9116fbd2.js} +1 -1
  112. package/build/esm/{index-ef13fcdb.js → index-915c0a01.js} +13 -13
  113. package/build/esm/{index-6482e49b.js → index-92028dcb.js} +1 -1
  114. package/build/esm/{index-663490b0.js → index-92083a73.js} +4 -4
  115. package/build/esm/{index-6af0e302.js → index-9da3e23b.js} +22 -22
  116. package/build/esm/{index-ddb0580e.js → index-9e29d3e3.js} +30 -30
  117. package/build/esm/{index-42d152dd.js → index-a99ac287.js} +16 -16
  118. package/build/esm/{index-0a6fc41a.js → index-aabf118a.js} +2 -2
  119. package/build/esm/{index-2cbb6421.js → index-ae970044.js} +4 -4
  120. package/build/esm/{index-a807bf74.js → index-b45d145f.js} +17 -17
  121. package/build/esm/{index-c2e91e69.js → index-bc18ecff.js} +2 -2
  122. package/build/esm/{index-452051cb.js → index-bd9013de.js} +5 -5
  123. package/build/esm/{index-9220423b.js → index-c1f7b079.js} +5 -5
  124. package/build/esm/{index-7f1ed00b.js → index-c57988e9.js} +3 -3
  125. package/build/esm/{index-21b14232.js → index-c71cd1be.js} +10 -10
  126. package/build/esm/{index-92ed0334.js → index-ccfee79f.js} +3 -3
  127. package/build/esm/{index-77532f63.js → index-ce969d66.js} +3 -3
  128. package/build/esm/{index-420665a0.js → index-d0b17929.js} +7 -7
  129. package/build/esm/{index-e053201b.js → index-d588e6bb.js} +2 -2
  130. package/build/esm/{index-3559c4ea.js → index-db423d7b.js} +13 -13
  131. package/build/esm/{index-c0f27429.js → index-dea22586.js} +2 -2
  132. package/build/esm/{index-f880dc21.js → index-dfd9f7df.js} +2 -2
  133. package/build/esm/{index-6430b388.js → index-e1fe3a5b.js} +1 -1
  134. package/build/esm/{index-4d6ab67c.js → index-e2260ffa.js} +13 -13
  135. package/build/esm/{index-a3514fcc.js → index-f27d65ec.js} +15 -15
  136. package/build/esm/{index-2a289da8.js → index-f5335875.js} +9 -15
  137. package/build/esm/{index-b9b69385.js → index-f7979138.js} +3 -3
  138. package/build/esm/{index-1ba37571.js → index-fb2de7c3.js} +7 -7
  139. package/build/esm/{index-cf0a3778.js → index-fb3af40f.js} +13 -13
  140. package/build/esm/index.js +119 -119
  141. package/build/esm/{labelSorting-6a07a56f.js → labelSorting-edb2b18a.js} +4 -4
  142. package/build/esm/lead/LeadGen.helpers.d.ts +2 -2
  143. package/build/esm/lead/LeadGen.type.d.ts +3 -0
  144. package/build/esm/lead/LeadGenInline/LeadGenInline.d.ts +8 -0
  145. package/build/esm/lead/LeadGenInline/index.d.ts +2 -0
  146. package/build/esm/lead/LeadGenSubscriptionBox/LeadGenContext.d.ts +19 -12
  147. package/build/esm/lead/index.d.ts +5 -1
  148. package/build/esm/lead/layouts/inline.d.ts +3 -2
  149. package/build/esm/lead/layouts/lightbox/index.d.ts +2 -1
  150. package/build/esm/lead/newLeadPopup.d.ts +2 -1
  151. package/build/esm/lead/services/index.d.ts +4 -0
  152. package/build/esm/lead/services/index.type.d.ts +5 -0
  153. package/build/esm/lead/utils.d.ts +18 -0
  154. package/build/esm/lead.js +414 -314
  155. package/build/esm/{logoIcon-c2c6fe01.js → logoIcon-7646edff.js} +2 -2
  156. package/build/esm/mantine.js +26 -26
  157. package/build/esm/misc/cachedSystem.d.ts +5 -0
  158. package/build/esm/misc.js +18 -18
  159. package/build/esm/miscGetDynamicHealthTool.js +4 -4
  160. package/build/esm/miscGetSocialList.js +8 -8
  161. package/build/esm/miscScreenSizeContext.js +1 -1
  162. package/build/esm/mobileBottomNavigation.js +5 -5
  163. package/build/esm/mobileBottomNavigationIcon.js +5 -5
  164. package/build/esm/molecules.js +75 -75
  165. package/build/esm/moleculesArticleCard.js +6 -6
  166. package/build/esm/moleculesArticleCardV2.js +17 -17
  167. package/build/esm/navigation.js +47 -47
  168. package/build/esm/navigationLogoutPopup.js +11 -11
  169. package/build/esm/navigationProfileButton.js +27 -27
  170. package/build/esm/onboardingV2.js +30 -30
  171. package/build/esm/organisms.js +51 -51
  172. package/build/esm/{post-e546d5d4.js → post-8f42afbc.js} +2 -2
  173. package/build/esm/profileNavigation.js +20 -20
  174. package/build/esm/progressBar.js +1 -1
  175. package/build/esm/pwg.js +23 -23
  176. package/build/esm/ssoV2/api/featureFlag.d.ts +2 -1
  177. package/build/esm/ssoV2.js +53 -41
  178. package/build/esm/{store-b4a996e2.js → store-966ef305.js} +3 -3
  179. package/build/esm/subot.js +37 -37
  180. package/build/esm/surveyOrPremiumBanner.js +34 -34
  181. package/build/esm/surveyQuestionCard.js +11 -11
  182. package/build/esm/{surveyThankyouCard-55874e25.js → surveyThankyouCard-c20fa807.js} +5 -5
  183. package/build/esm/together.js +57 -57
  184. package/build/esm/togetherApiUtils.js +4 -4
  185. package/build/esm/togetherAtoms.js +31 -31
  186. package/build/esm/togetherComponentGlobalContext.js +4 -4
  187. package/build/esm/togetherMolecules.js +52 -52
  188. package/build/esm/togetherMoleculesCardAuthor.js +29 -29
  189. package/build/esm/togetherMoleculesPostImagePreview.js +11 -11
  190. package/build/esm/togetherMoleculesProfileDetail.js +40 -40
  191. package/build/esm/togetherOrganisms.js +51 -51
  192. package/build/esm/togetherRichTextEditor.js +18 -18
  193. package/build/esm/togetherShareBox.js +10 -10
  194. package/build/esm/{translationsProvider-83c169fa.js → translationsProvider-647a2db0.js} +1 -1
  195. package/build/esm/{treePopoverMenu-0ff56700.js → treePopoverMenu-8c561cb3.js} +19 -19
  196. package/build/esm/{types-d9fe3189.js → types-6bed1943.js} +2 -2
  197. package/build/esm/types.js +2 -2
  198. package/build/esm/{useCategory-3973a193.js → useCategory-69865f9d.js} +5 -5
  199. package/build/esm/{useHealthToolCache-c58ca506.js → useHealthToolCache-32e3d6d9.js} +1 -1
  200. package/build/esm/{usePlacesAutocomplete-dba4a9a1.js → usePlacesAutocomplete-4ec2c43f.js} +4 -2
  201. package/build/esm/useTogetherAuthRequiredAction.js +10 -10
  202. package/build/esm/{utils-ff9d08dd.js → utils-03be42a6.js} +2 -2
  203. package/build/esm/{utils-571711a7.js → utils-ab71b4b1.js} +2 -2
  204. package/build/esm/{utils-af71a160.js → utils-c729484a.js} +5 -5
  205. package/build/esm/{utils-88e98fd0.js → utils-f4d1c5fb.js} +3 -3
  206. package/build/esm/vaccination.js +22 -22
  207. package/build/footer.js +22 -22
  208. package/build/gAssets.js +2 -2
  209. package/build/{healthTools-8fcbf9cb.js → healthTools-85e5eb32.js} +1 -1
  210. package/build/healthToolsCardWrapper.js +19 -19
  211. package/build/healthToolsForm.js +34 -34
  212. package/build/hooks/usePlacesAutocomplete.d.ts +1 -1
  213. package/build/hooks.js +13 -13
  214. package/build/i18n.js +2 -2
  215. package/build/i18nV2.js +1 -1
  216. package/build/{index-7f031a12.js → index-02c87bc2.js} +1 -1
  217. package/build/{index-605988c9.js → index-0ca0f026.js} +2 -2
  218. package/build/{index-6c909f71.js → index-0ee812d6.js} +1 -1
  219. package/build/{index-32ff06ec.js → index-0f5669eb.js} +6 -6
  220. package/build/{index-dcddc40b.js → index-1055cd24.js} +7 -7
  221. package/build/{index-d52172cd.js → index-1a10efaa.js} +13 -13
  222. package/build/{index-b4ffee63.js → index-1ffd5b21.js} +17 -17
  223. package/build/{index-e9201988.js → index-2265eeea.js} +1 -1
  224. package/build/{index-097b73ee.js → index-24708627.js} +2 -2
  225. package/build/{index-ab0aecdf.js → index-268b532d.js} +13 -13
  226. package/build/{index-d75145b9.js → index-28cbbdf4.js} +13 -13
  227. package/build/{index-85aea174.js → index-296e15ed.js} +3 -3
  228. package/build/{index-7371e42a.js → index-2adbe7a3.js} +3 -3
  229. package/build/{index-3652c464.js → index-2cb14b4b.js} +1 -1
  230. package/build/{index-1c843fb8.js → index-30a19bc1.js} +3 -3
  231. package/build/{index-49973bc7.js → index-31b43caf.js} +5 -5
  232. package/build/{index-204a2ad8.js → index-32ed78c5.js} +6 -6
  233. package/build/{index-2f16facd.js → index-3867da1b.js} +11 -11
  234. package/build/{index-b9d7f71f.js → index-3c38a412.js} +32 -32
  235. package/build/{index-33e29259.js → index-415315a9.js} +3 -3
  236. package/build/{index-2b50e942.js → index-429c9b6b.js} +1 -1
  237. package/build/{index-d62fced9.js → index-4fa88469.js} +9 -15
  238. package/build/{index-b955105d.js → index-58937d75.js} +3 -3
  239. package/build/{index-98602f9c.js → index-5e659205.js} +2 -2
  240. package/build/{index-002cff3a.js → index-601b4ce2.js} +24 -24
  241. package/build/{index-050b9c5b.js → index-612cc9b9.js} +2 -2
  242. package/build/{index-02a489d8.js → index-63955802.js} +2 -2
  243. package/build/{index-3ca3ddbf.js → index-63ca536c.js} +15 -15
  244. package/build/{index-a167563e.js → index-6a8c7325.js} +3 -3
  245. package/build/{index-cd8dbd4b.js → index-6b87a7fc.js} +7 -7
  246. package/build/{index-a1ebbcf2.js → index-6c58b0da.js} +2 -2
  247. package/build/{index-0d874567.js → index-6ef7a536.js} +30 -30
  248. package/build/{index-e09c89e1.js → index-6fe359e8.js} +3 -3
  249. package/build/{index-68615221.js → index-72851afc.js} +2 -2
  250. package/build/{index-0c674f5d.js → index-756642cb.js} +13 -13
  251. package/build/{index-8d49789b.js → index-7bed6df2.js} +22 -22
  252. package/build/{index-18387a84.js → index-7fa743ce.js} +15 -15
  253. package/build/{index-9368aafc.js → index-8bbbf05b.js} +32 -32
  254. package/build/{index-632f001a.js → index-8de31573.js} +21 -41
  255. package/build/{index-7eca4986.js → index-9f47550e.js} +2 -2
  256. package/build/{index-992eb4a3.js → index-a4476544.js} +2 -2
  257. package/build/{index-a4d319f4.js → index-a7704a96.js} +4 -4
  258. package/build/{index-c7f729c9.js → index-aa0d5699.js} +6 -6
  259. package/build/{index-f985b319.js → index-af62f473.js} +25 -25
  260. package/build/{index-adb92a94.js → index-b27ddca8.js} +13 -13
  261. package/build/{index-f54ae3b8.js → index-b4632771.js} +6 -6
  262. package/build/{index-f29e9558.js → index-bd6f500a.js} +1 -1
  263. package/build/{index-72dfeaab.js → index-c370ee7b.js} +16 -16
  264. package/build/{index-3b64494c.js → index-c40d61a0.js} +1 -1
  265. package/build/{index-dbb95235.js → index-cbf09c07.js} +5 -5
  266. package/build/{index-e9faf187.js → index-cd2b1a11.js} +17 -17
  267. package/build/{index-40eae545.js → index-cd711b45.js} +17 -17
  268. package/build/{index-14d583f2.js → index-d0f4b4f2.js} +2 -2
  269. package/build/{index-f46f9b08.js → index-d6fc5f76.js} +10 -10
  270. package/build/{index-c3db379e.js → index-d76cd192.js} +2 -2
  271. package/build/{index-6a6f0306.js → index-d87e96bb.js} +13 -13
  272. package/build/{index-b823faed.js → index-d94aa2e3.js} +1 -1
  273. package/build/{index-3f4406de.js → index-daf4d41c.js} +16 -16
  274. package/build/{index-c5f6b721.js → index-db657b3c.js} +17 -17
  275. package/build/{index-6d3687b7.js → index-e43f9d13.js} +8 -8
  276. package/build/{index-f3a410ea.js → index-ef521b19.js} +3 -3
  277. package/build/{index-6526eafd.js → index-f51bb35f.js} +2 -2
  278. package/build/{index-e5454498.js → index-f5aea36a.js} +2 -2
  279. package/build/{index-e274b7a0.js → index-f714c7c6.js} +2 -2
  280. package/build/{index-84832bc4.js → index-f845e499.js} +15 -15
  281. package/build/{index-8c965662.js → index-fb56674a.js} +6 -6
  282. package/build/{index-df0bb039.js → index-fb9c6a3e.js} +4 -4
  283. package/build/{index-67d60135.js → index-fc658a63.js} +2 -2
  284. package/build/index.js +119 -119
  285. package/build/{labelSorting-cc600168.js → labelSorting-5efd4233.js} +4 -4
  286. package/build/lead/LeadGen.helpers.d.ts +2 -2
  287. package/build/lead/LeadGen.type.d.ts +3 -0
  288. package/build/lead/LeadGenInline/LeadGenInline.d.ts +8 -0
  289. package/build/lead/LeadGenInline/index.d.ts +2 -0
  290. package/build/lead/LeadGenSubscriptionBox/LeadGenContext.d.ts +19 -12
  291. package/build/lead/index.d.ts +5 -1
  292. package/build/lead/layouts/inline.d.ts +3 -2
  293. package/build/lead/layouts/lightbox/index.d.ts +2 -1
  294. package/build/lead/newLeadPopup.d.ts +2 -1
  295. package/build/lead/services/index.d.ts +4 -0
  296. package/build/lead/services/index.type.d.ts +5 -0
  297. package/build/lead/utils.d.ts +18 -0
  298. package/build/lead.js +414 -312
  299. package/build/{logoIcon-0a117d46.js → logoIcon-9f7c0032.js} +2 -2
  300. package/build/mantine.js +24 -24
  301. package/build/misc/cachedSystem.d.ts +5 -0
  302. package/build/misc.js +18 -18
  303. package/build/miscGetDynamicHealthTool.js +4 -4
  304. package/build/miscGetSocialList.js +8 -8
  305. package/build/miscScreenSizeContext.js +1 -1
  306. package/build/mobileBottomNavigation.js +5 -5
  307. package/build/mobileBottomNavigationIcon.js +5 -5
  308. package/build/molecules.js +75 -75
  309. package/build/moleculesArticleCard.js +6 -6
  310. package/build/moleculesArticleCardV2.js +17 -17
  311. package/build/navigation.js +47 -47
  312. package/build/navigationLogoutPopup.js +11 -11
  313. package/build/navigationProfileButton.js +27 -27
  314. package/build/onboardingV2.js +29 -29
  315. package/build/organisms.js +51 -51
  316. package/build/{post-52f54e2f.js → post-146fd5fe.js} +2 -2
  317. package/build/profileNavigation.js +20 -20
  318. package/build/progressBar.js +1 -1
  319. package/build/pwg.js +23 -23
  320. package/build/ssoV2/api/featureFlag.d.ts +2 -1
  321. package/build/ssoV2.js +51 -39
  322. package/build/{store-e689152a.js → store-ba505d6a.js} +3 -3
  323. package/build/subot.js +36 -36
  324. package/build/surveyOrPremiumBanner.js +34 -34
  325. package/build/surveyQuestionCard.js +11 -11
  326. package/build/{surveyThankyouCard-c43b12d8.js → surveyThankyouCard-9b26148e.js} +5 -5
  327. package/build/together.js +57 -57
  328. package/build/togetherApiUtils.js +4 -4
  329. package/build/togetherAtoms.js +31 -31
  330. package/build/togetherComponentGlobalContext.js +4 -4
  331. package/build/togetherMolecules.js +52 -52
  332. package/build/togetherMoleculesCardAuthor.js +29 -29
  333. package/build/togetherMoleculesPostImagePreview.js +11 -11
  334. package/build/togetherMoleculesProfileDetail.js +40 -40
  335. package/build/togetherOrganisms.js +51 -51
  336. package/build/togetherRichTextEditor.js +18 -18
  337. package/build/togetherShareBox.js +10 -10
  338. package/build/{translationsProvider-bc9d804c.js → translationsProvider-d88a150a.js} +1 -1
  339. package/build/{treePopoverMenu-3e0404a8.js → treePopoverMenu-4ff31bad.js} +19 -19
  340. package/build/{types-77be4eec.js → types-6113ffdf.js} +2 -2
  341. package/build/types.js +2 -2
  342. package/build/{useCategory-f29c91a5.js → useCategory-aa5f1b9e.js} +5 -5
  343. package/build/{useHealthToolCache-1c9fd3c3.js → useHealthToolCache-f3974059.js} +1 -1
  344. package/build/{usePlacesAutocomplete-f35d6e60.js → usePlacesAutocomplete-7bb8ea02.js} +4 -2
  345. package/build/useTogetherAuthRequiredAction.js +10 -10
  346. package/build/{utils-6bdfb61a.js → utils-15cf4bed.js} +3 -3
  347. package/build/{utils-9bc02405.js → utils-82bb3b31.js} +2 -2
  348. package/build/{utils-011c0e91.js → utils-b1712bb6.js} +2 -2
  349. package/build/{utils-83c71cbf.js → utils-feeb55f4.js} +5 -5
  350. package/build/vaccination.js +22 -22
  351. package/package.json +1 -1
  352. /package/build/{BMI_BOYS.percentile.monthly-b4faa860.js → BMI_BOYS.percentile.monthly-1d037709.js} +0 -0
  353. /package/build/{BMI_BOYS.percentile.weekly-3ba814df.js → BMI_BOYS.percentile.weekly-3bbb61f3.js} +0 -0
  354. /package/build/{BMI_BOYS.percentile.yearly-f4338b7a.js → BMI_BOYS.percentile.yearly-da2c6c1f.js} +0 -0
  355. /package/build/{BMI_BOYS.zscore.monthly-66d8b375.js → BMI_BOYS.zscore.monthly-fb0ece7d.js} +0 -0
  356. /package/build/{BMI_BOYS.zscore.weekly-137023bb.js → BMI_BOYS.zscore.weekly-8415733b.js} +0 -0
  357. /package/build/{BMI_BOYS.zscore.yearly-a9a22b26.js → BMI_BOYS.zscore.yearly-ccde3de8.js} +0 -0
  358. /package/build/{BMI_GIRLS.percentile.monthly-40d3eee1.js → BMI_GIRLS.percentile.monthly-8ce3df66.js} +0 -0
  359. /package/build/{BMI_GIRLS.percentile.weekly-9952207b.js → BMI_GIRLS.percentile.weekly-71b8f9cf.js} +0 -0
  360. /package/build/{BMI_GIRLS.percentile.yearly-15acf170.js → BMI_GIRLS.percentile.yearly-03be2266.js} +0 -0
  361. /package/build/{BMI_GIRLS.zscore.monthly-045a1f3f.js → BMI_GIRLS.zscore.monthly-c4964f7c.js} +0 -0
  362. /package/build/{BMI_GIRLS.zscore.weekly-e6706011.js → BMI_GIRLS.zscore.weekly-5d7413af.js} +0 -0
  363. /package/build/{BMI_GIRLS.zscore.yearly-59219080.js → BMI_GIRLS.zscore.yearly-243d5a3f.js} +0 -0
  364. /package/build/{ChevronDown-c0ebcad8.js → ChevronDown-d280dae8.js} +0 -0
  365. /package/build/{Close-8822588e.js → Close-0fa9f81b.js} +0 -0
  366. /package/build/{Google-52c1192f.js → Google-988168e0.js} +0 -0
  367. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-0c543b9e.js → HEAD CIRCUM_BOYS.percentile.monthly-5a50cdbb.js} +0 -0
  368. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-1454c62c.js → HEAD CIRCUM_BOYS.percentile.weekly-2f4858ec.js} +0 -0
  369. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-14221a61.js → HEAD CIRCUM_BOYS.percentile.yearly-b595af4a.js} +0 -0
  370. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-6adc1056.js → HEAD CIRCUM_BOYS.zscore.monthly-fd0a1e09.js} +0 -0
  371. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-f69c08eb.js → HEAD CIRCUM_BOYS.zscore.weekly-4e35b365.js} +0 -0
  372. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-f07b8bdb.js → HEAD CIRCUM_BOYS.zscore.yearly-d3ab7127.js} +0 -0
  373. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-c3184bd8.js → HEAD CIRCUM_GIRLS.percentile.monthly-7dc420e6.js} +0 -0
  374. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-e674d15d.js → HEAD CIRCUM_GIRLS.percentile.weekly-91e84da9.js} +0 -0
  375. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-18247323.js → HEAD CIRCUM_GIRLS.percentile.yearly-f487601a.js} +0 -0
  376. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-f8924dec.js → HEAD CIRCUM_GIRLS.zscore.monthly-6e2a47b4.js} +0 -0
  377. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-d20cce05.js → HEAD CIRCUM_GIRLS.zscore.weekly-195aa890.js} +0 -0
  378. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-e6426d54.js → HEAD CIRCUM_GIRLS.zscore.yearly-a4f042c7.js} +0 -0
  379. /package/build/{HEIGHT_BOYS.percentile.monthly-db562663.js → HEIGHT_BOYS.percentile.monthly-76acdffd.js} +0 -0
  380. /package/build/{HEIGHT_BOYS.percentile.weekly-3d57e461.js → HEIGHT_BOYS.percentile.weekly-62bd8963.js} +0 -0
  381. /package/build/{HEIGHT_BOYS.percentile.yearly-9603b0da.js → HEIGHT_BOYS.percentile.yearly-b005b618.js} +0 -0
  382. /package/build/{HEIGHT_BOYS.zscore.monthly-959d557c.js → HEIGHT_BOYS.zscore.monthly-9aa52f61.js} +0 -0
  383. /package/build/{HEIGHT_BOYS.zscore.weekly-41a88700.js → HEIGHT_BOYS.zscore.weekly-f0051e9d.js} +0 -0
  384. /package/build/{HEIGHT_BOYS.zscore.yearly-3cf74487.js → HEIGHT_BOYS.zscore.yearly-1b4ebed9.js} +0 -0
  385. /package/build/{HEIGHT_GIRLS.percentile.monthly-eb92e6fd.js → HEIGHT_GIRLS.percentile.monthly-171d9e8e.js} +0 -0
  386. /package/build/{HEIGHT_GIRLS.percentile.weekly-b96b7097.js → HEIGHT_GIRLS.percentile.weekly-6c0a1818.js} +0 -0
  387. /package/build/{HEIGHT_GIRLS.percentile.yearly-753f5811.js → HEIGHT_GIRLS.percentile.yearly-b08c1d43.js} +0 -0
  388. /package/build/{HEIGHT_GIRLS.zscore.monthly-109e9692.js → HEIGHT_GIRLS.zscore.monthly-93918315.js} +0 -0
  389. /package/build/{HEIGHT_GIRLS.zscore.weekly-cf668088.js → HEIGHT_GIRLS.zscore.weekly-a9838718.js} +0 -0
  390. /package/build/{HEIGHT_GIRLS.zscore.yearly-a455ca33.js → HEIGHT_GIRLS.zscore.yearly-750c9cec.js} +0 -0
  391. /package/build/{Locale-ad67764b.js → Locale-366643f6.js} +0 -0
  392. /package/build/{Visible-0900e756.js → Visible-6bf902c1.js} +0 -0
  393. /package/build/{WEIGHT_BOYS.percentile.monthly-244eee9a.js → WEIGHT_BOYS.percentile.monthly-75d893b1.js} +0 -0
  394. /package/build/{WEIGHT_BOYS.percentile.weekly-706bb6a9.js → WEIGHT_BOYS.percentile.weekly-21085ab5.js} +0 -0
  395. /package/build/{WEIGHT_BOYS.percentile.yearly-4ca0bb16.js → WEIGHT_BOYS.percentile.yearly-045c57ed.js} +0 -0
  396. /package/build/{WEIGHT_BOYS.zscore.monthly-7f4f6f1d.js → WEIGHT_BOYS.zscore.monthly-a389150a.js} +0 -0
  397. /package/build/{WEIGHT_BOYS.zscore.weekly-6ff91768.js → WEIGHT_BOYS.zscore.weekly-f5410a6b.js} +0 -0
  398. /package/build/{WEIGHT_BOYS.zscore.yearly-d8c91411.js → WEIGHT_BOYS.zscore.yearly-b215f167.js} +0 -0
  399. /package/build/{WEIGHT_GIRLS.percentile.monthly-93b3fcd1.js → WEIGHT_GIRLS.percentile.monthly-c1c9483f.js} +0 -0
  400. /package/build/{WEIGHT_GIRLS.percentile.weekly-50fc8295.js → WEIGHT_GIRLS.percentile.weekly-6174746a.js} +0 -0
  401. /package/build/{WEIGHT_GIRLS.percentile.yearly-a55e2dfb.js → WEIGHT_GIRLS.percentile.yearly-edad71dd.js} +0 -0
  402. /package/build/{WEIGHT_GIRLS.zscore.monthly-cfa8d179.js → WEIGHT_GIRLS.zscore.monthly-e735ee30.js} +0 -0
  403. /package/build/{WEIGHT_GIRLS.zscore.weekly-174529f1.js → WEIGHT_GIRLS.zscore.weekly-5d5f4171.js} +0 -0
  404. /package/build/{WEIGHT_GIRLS.zscore.yearly-472ee0b9.js → WEIGHT_GIRLS.zscore.yearly-a29f2713.js} +0 -0
  405. /package/build/{animation-f98f7be4.js → animation-cfe0ef22.js} +0 -0
  406. /package/build/{constants-5c7e7b94.js → constants-0ed23d09.js} +0 -0
  407. /package/build/{constants-9dfd8e58.js → constants-a8611a01.js} +0 -0
  408. /package/build/{constants-62a930d3.js → constants-c27a8035.js} +0 -0
  409. /package/build/{dataTransform-f3458ddb.js → dataTransform-138b7a3d.js} +0 -0
  410. /package/build/esm/{BMI_BOYS.percentile.monthly-d81faf37.js → BMI_BOYS.percentile.monthly-78d4a592.js} +0 -0
  411. /package/build/esm/{BMI_BOYS.percentile.weekly-c0a180c1.js → BMI_BOYS.percentile.weekly-ff9040ea.js} +0 -0
  412. /package/build/esm/{BMI_BOYS.percentile.yearly-2c71c69f.js → BMI_BOYS.percentile.yearly-fcbd5e66.js} +0 -0
  413. /package/build/esm/{BMI_BOYS.zscore.monthly-ab115475.js → BMI_BOYS.zscore.monthly-8a66782b.js} +0 -0
  414. /package/build/esm/{BMI_BOYS.zscore.weekly-72deeb0f.js → BMI_BOYS.zscore.weekly-4a6a951a.js} +0 -0
  415. /package/build/esm/{BMI_BOYS.zscore.yearly-4fc57689.js → BMI_BOYS.zscore.yearly-8557d199.js} +0 -0
  416. /package/build/esm/{BMI_GIRLS.percentile.monthly-d6c9fe58.js → BMI_GIRLS.percentile.monthly-eb78528f.js} +0 -0
  417. /package/build/esm/{BMI_GIRLS.percentile.weekly-f1658e86.js → BMI_GIRLS.percentile.weekly-4080e040.js} +0 -0
  418. /package/build/esm/{BMI_GIRLS.percentile.yearly-4826bd42.js → BMI_GIRLS.percentile.yearly-a756a0ad.js} +0 -0
  419. /package/build/esm/{BMI_GIRLS.zscore.monthly-3fbb7d97.js → BMI_GIRLS.zscore.monthly-0a2ccb7b.js} +0 -0
  420. /package/build/esm/{BMI_GIRLS.zscore.weekly-34fe7c5d.js → BMI_GIRLS.zscore.weekly-bec1efb4.js} +0 -0
  421. /package/build/esm/{BMI_GIRLS.zscore.yearly-b2382d89.js → BMI_GIRLS.zscore.yearly-4a122321.js} +0 -0
  422. /package/build/esm/{ChevronDown-d9fdd713.js → ChevronDown-9225a593.js} +0 -0
  423. /package/build/esm/{Close-de34c565.js → Close-f1da2174.js} +0 -0
  424. /package/build/esm/{Google-6dc0d9cd.js → Google-eec62a77.js} +0 -0
  425. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-c25cb829.js → HEAD CIRCUM_BOYS.percentile.monthly-51c1f16c.js} +0 -0
  426. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-4abc8ae1.js → HEAD CIRCUM_BOYS.percentile.weekly-5aad905b.js} +0 -0
  427. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-60cf9ae3.js → HEAD CIRCUM_BOYS.percentile.yearly-0644b75f.js} +0 -0
  428. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-84203fca.js → HEAD CIRCUM_BOYS.zscore.monthly-097e499d.js} +0 -0
  429. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-340ae55f.js → HEAD CIRCUM_BOYS.zscore.weekly-66f310ca.js} +0 -0
  430. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-5be3f3d1.js → HEAD CIRCUM_BOYS.zscore.yearly-79bf63ed.js} +0 -0
  431. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-52a92f61.js → HEAD CIRCUM_GIRLS.percentile.monthly-d51921b0.js} +0 -0
  432. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-ea4b4a9a.js → HEAD CIRCUM_GIRLS.percentile.weekly-16e7dd3c.js} +0 -0
  433. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-2a50c39c.js → HEAD CIRCUM_GIRLS.percentile.yearly-350d2c8d.js} +0 -0
  434. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-f1c6824c.js → HEAD CIRCUM_GIRLS.zscore.monthly-f75bd64f.js} +0 -0
  435. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-592f1db3.js → HEAD CIRCUM_GIRLS.zscore.weekly-820a263a.js} +0 -0
  436. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-a9b49454.js → HEAD CIRCUM_GIRLS.zscore.yearly-7786916e.js} +0 -0
  437. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-ce935278.js → HEIGHT_BOYS.percentile.monthly-25da1d57.js} +0 -0
  438. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-6f0721e0.js → HEIGHT_BOYS.percentile.weekly-b4eff898.js} +0 -0
  439. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-67ea9fb4.js → HEIGHT_BOYS.percentile.yearly-acddcb6b.js} +0 -0
  440. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-2e379bfe.js → HEIGHT_BOYS.zscore.monthly-405cd241.js} +0 -0
  441. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-5f9af3af.js → HEIGHT_BOYS.zscore.weekly-5a9e7d28.js} +0 -0
  442. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-40f25731.js → HEIGHT_BOYS.zscore.yearly-56fb7b3c.js} +0 -0
  443. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-207a9633.js → HEIGHT_GIRLS.percentile.monthly-14947ae8.js} +0 -0
  444. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-fc6f24cb.js → HEIGHT_GIRLS.percentile.weekly-85e09f7c.js} +0 -0
  445. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-e6677432.js → HEIGHT_GIRLS.percentile.yearly-4f645c5d.js} +0 -0
  446. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-18b548de.js → HEIGHT_GIRLS.zscore.monthly-f203b4d1.js} +0 -0
  447. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-537a04c5.js → HEIGHT_GIRLS.zscore.weekly-8bcaa5b2.js} +0 -0
  448. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-39d445ef.js → HEIGHT_GIRLS.zscore.yearly-78fa2691.js} +0 -0
  449. /package/build/esm/{Locale-f790f969.js → Locale-7c177439.js} +0 -0
  450. /package/build/esm/{Visible-c0655254.js → Visible-c1d4a1c9.js} +0 -0
  451. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-801e855e.js → WEIGHT_BOYS.percentile.monthly-f74ba58b.js} +0 -0
  452. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-2f98cfab.js → WEIGHT_BOYS.percentile.weekly-3a4fbb80.js} +0 -0
  453. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-36f6db78.js → WEIGHT_BOYS.percentile.yearly-c65a32e1.js} +0 -0
  454. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-ec5c45a4.js → WEIGHT_BOYS.zscore.monthly-3ed58d1d.js} +0 -0
  455. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-504be958.js → WEIGHT_BOYS.zscore.weekly-8c0fbbe8.js} +0 -0
  456. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-1b0759aa.js → WEIGHT_BOYS.zscore.yearly-aa696db8.js} +0 -0
  457. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-9ed383de.js → WEIGHT_GIRLS.percentile.monthly-cfda4fd3.js} +0 -0
  458. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-3ca3d5f0.js → WEIGHT_GIRLS.percentile.weekly-199c8d66.js} +0 -0
  459. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-1f50c118.js → WEIGHT_GIRLS.percentile.yearly-c1df4116.js} +0 -0
  460. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-8304350e.js → WEIGHT_GIRLS.zscore.monthly-005a50de.js} +0 -0
  461. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-7eaf74e7.js → WEIGHT_GIRLS.zscore.weekly-83f2d9a1.js} +0 -0
  462. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-dc124629.js → WEIGHT_GIRLS.zscore.yearly-9056f0e1.js} +0 -0
  463. /package/build/esm/{animation-6525a8ba.js → animation-46c77276.js} +0 -0
  464. /package/build/esm/{constants-a1998f96.js → constants-12c90134.js} +0 -0
  465. /package/build/esm/{constants-e83c4835.js → constants-290c3b11.js} +0 -0
  466. /package/build/esm/{constants-19687a3a.js → constants-f6a00864.js} +0 -0
  467. /package/build/esm/{dataTransform-a816c62f.js → dataTransform-99c4fd58.js} +0 -0
  468. /package/build/esm/{index-17b2e787.js → index-19f01623.js} +0 -0
  469. /package/build/esm/{index-75a8e1d9.js → index-31c06d2f.js} +0 -0
  470. /package/build/esm/{index-bbd26363.js → index-4220b8db.js} +0 -0
  471. /package/build/esm/{index-ab21e8cf.js → index-50b7813b.js} +0 -0
  472. /package/build/esm/{index-46de244d.js → index-5ce211bb.js} +0 -0
  473. /package/build/esm/{index-461f72c9.js → index-65955e1c.js} +0 -0
  474. /package/build/esm/{index-1d5359d8.js → index-65a121e5.js} +0 -0
  475. /package/build/esm/{index-73d49015.js → index-c635d501.js} +0 -0
  476. /package/build/esm/{index.styles-05fc133d.js → index.styles-e988de17.js} +0 -0
  477. /package/build/esm/{localizeNumberFormat-d6dc554a.js → localizeNumberFormat-12cf4023.js} +0 -0
  478. /package/build/esm/{normalizeLink-8db8cf91.js → normalizeLink-47a460df.js} +0 -0
  479. /package/build/esm/{number-16fb6967.js → number-59cca451.js} +0 -0
  480. /package/build/esm/{paths-9e2e6286.js → paths-047b41af.js} +0 -0
  481. /package/build/esm/{shared-887e5430.js → shared-0d99adda.js} +0 -0
  482. /package/build/esm/{text-48aef61b.js → text-76c3e90e.js} +0 -0
  483. /package/build/esm/{translationsContext-40d5537d.js → translationsContext-0c20459e.js} +0 -0
  484. /package/build/esm/{tslib.es6-107c23d7.js → tslib.es6-d2424a34.js} +0 -0
  485. /package/build/esm/{types-b3dd17dd.js → types-113c6d92.js} +0 -0
  486. /package/build/esm/{useIsInit-21e41918.js → useIsInit-35debeda.js} +0 -0
  487. /package/build/esm/{useOutsideClick-92a43854.js → useOutsideClick-5c2d5374.js} +0 -0
  488. /package/build/esm/{useScrollbarSize-83c6ab6a.js → useScrollbarSize-01efff12.js} +0 -0
  489. /package/build/esm/{useUniqueId-17d236b9.js → useUniqueId-a6170f09.js} +0 -0
  490. /package/build/esm/{utils-50ee2849.js → utils-369f3418.js} +0 -0
  491. /package/build/{index-785fe918.js → index-0a97a2ea.js} +0 -0
  492. /package/build/{index-3b6b4aac.js → index-1714fb71.js} +0 -0
  493. /package/build/{index-e54b95b0.js → index-25e01312.js} +0 -0
  494. /package/build/{index-914f1ae3.js → index-557376af.js} +0 -0
  495. /package/build/{index-034cefcd.js → index-7f7e3d7a.js} +0 -0
  496. /package/build/{index-80681439.js → index-a408be9a.js} +0 -0
  497. /package/build/{index-0b41df81.js → index-b40a3e58.js} +0 -0
  498. /package/build/{index-602e6169.js → index-c07f3b33.js} +0 -0
  499. /package/build/{index.styles-90997e57.js → index.styles-4197eb52.js} +0 -0
  500. /package/build/{localizeNumberFormat-1052a141.js → localizeNumberFormat-22971b14.js} +0 -0
  501. /package/build/{normalizeLink-935ea0d1.js → normalizeLink-6c154492.js} +0 -0
  502. /package/build/{number-61f6f307.js → number-e1ed6c68.js} +0 -0
  503. /package/build/{paths-bab694f2.js → paths-b26c7673.js} +0 -0
  504. /package/build/{shared-a2f1ce7d.js → shared-860a366c.js} +0 -0
  505. /package/build/{text-af5ab4c9.js → text-6dedba33.js} +0 -0
  506. /package/build/{translationsContext-a73ceb20.js → translationsContext-267f8dfd.js} +0 -0
  507. /package/build/{tslib.es6-5033cbef.js → tslib.es6-99840f8f.js} +0 -0
  508. /package/build/{types-4ce4f15d.js → types-5a5ba6e3.js} +0 -0
  509. /package/build/{useIsInit-6563d2c6.js → useIsInit-e9d11ec5.js} +0 -0
  510. /package/build/{useOutsideClick-12b7c9d2.js → useOutsideClick-daab3358.js} +0 -0
  511. /package/build/{useScrollbarSize-854ca661.js → useScrollbarSize-948f9e22.js} +0 -0
  512. /package/build/{useUniqueId-d1da65c9.js → useUniqueId-6ade25ea.js} +0 -0
  513. /package/build/{utils-8e23afe2.js → utils-b6a1148e.js} +0 -0
package/build/esm/lead.js CHANGED
@@ -1,56 +1,56 @@
1
- import { _ as __rest, a as __awaiter } from './tslib.es6-107c23d7.js';
2
- import React__default, { createContext, useMemo, useEffect, useRef, useState, useContext, useCallback, forwardRef, useImperativeHandle, memo, useLayoutEffect } from 'react';
1
+ import { a as __awaiter, _ as __rest } from './tslib.es6-d2424a34.js';
2
+ import React__default, { createContext, useMemo, useEffect, useRef, useState, useContext, memo, useCallback, forwardRef, useImperativeHandle, useLayoutEffect } from 'react';
3
3
  import { createStyles, Box, Button as Button$1, Input as Input$1, Autocomplete, clsx, Checkbox as Checkbox$1, Radio as Radio$1, Select as Select$1, TextInput, NumberInput as NumberInput$1, useMantineTheme, Portal, Transition, Overlay } from '@mantine/core';
4
4
  import debounce from 'lodash/debounce';
5
5
  import { createFormContext, useForm } from '@mantine/form';
6
6
  import dayjs from 'dayjs';
7
- import { B as BEARER_TOKEN_COOKIE } from './index-663490b0.js';
7
+ import { B as BEARER_TOKEN_COOKIE } from './index-92083a73.js';
8
8
  import { getCookie, setCookie } from './miscCookieHelper.js';
9
- import { u as useTranslations } from './index-1215bc9f.js';
10
- import { T as TranslationsContext } from './translationsContext-40d5537d.js';
11
- import { M as MediaQueries, b as getWrapperDomWithSelector, a as getPopupWrapperDom } from './utils-50ee2849.js';
12
- import { T as Text } from './index-a5768260.js';
13
- import { S as Select, d as Checkbox, I as Input, R as Radio, P as Phone, N as NumberInput, O as OTP } from './index-2a289da8.js';
14
- import { D as DatePicker } from './index-ee39db81.js';
15
- import { B as Button } from './index-92ed0334.js';
16
- import './index.styles-05fc133d.js';
9
+ import { u as useTranslations } from './index-25983827.js';
10
+ import { T as TranslationsContext } from './translationsContext-0c20459e.js';
11
+ import { M as MediaQueries, b as getWrapperDomWithSelector, a as getPopupWrapperDom } from './utils-369f3418.js';
12
+ import { T as Text } from './index-705da63f.js';
13
+ import { S as Select, d as Checkbox, I as Input, R as Radio, P as Phone, N as NumberInput, O as OTP } from './index-f5335875.js';
14
+ import { D as DatePicker } from './index-16f555a0.js';
15
+ import { B as Button } from './index-ccfee79f.js';
16
+ import './index.styles-e988de17.js';
17
17
  import { useIntersection, useClickOutside } from '@mantine/hooks';
18
- import './index-6ae951d5.js';
19
- import { C as CustomStylesType } from './text-48aef61b.js';
20
- import './index-7f1ed00b.js';
21
- import { M as MAPPED_LOCALE } from './utils-ff9d08dd.js';
18
+ import './index-39c0105f.js';
19
+ import { C as CustomStylesType } from './text-76c3e90e.js';
20
+ import './index-c57988e9.js';
21
+ import { M as MAPPED_LOCALE } from './utils-03be42a6.js';
22
22
  import { DateInput } from '@mantine/dates';
23
- import { L as LOCALE_SPECS, Z as ZINDEX_SSO, I as ISO_FORMAT } from './index-e053201b.js';
24
- import { C as COMMON_DATE_TRANSLATE_KEY } from './index-6482e49b.js';
25
- import './index-461f72c9.js';
26
- import { u as usePlacesAutocomplete, G as GOOGLE_API_KEY } from './usePlacesAutocomplete-dba4a9a1.js';
27
- import { H as Heading$1 } from './index-2953a674.js';
28
- import { t as translationsMap$1 } from './translationsProvider-83c169fa.js';
29
- import { L as LOCALE } from './Locale-f790f969.js';
23
+ import { L as LOCALE_SPECS, Z as ZINDEX_SSO, I as ISO_FORMAT } from './index-d588e6bb.js';
24
+ import { C as COMMON_DATE_TRANSLATE_KEY } from './index-92028dcb.js';
25
+ import './index-65955e1c.js';
26
+ import { u as usePlacesAutocomplete, G as GOOGLE_API_KEY } from './usePlacesAutocomplete-4ec2c43f.js';
27
+ import { H as Heading$1 } from './index-66f326a0.js';
28
+ import { t as translationsMap$1 } from './translationsProvider-647a2db0.js';
29
+ import { L as LOCALE } from './Locale-7c177439.js';
30
30
  import { v1 } from 'uuid';
31
31
  import { domainLocales } from './constantsDomainLocales.js';
32
32
  import { parsePhoneNumber } from 'react-phone-number-input';
33
33
  import styled from '@emotion/styled';
34
34
  import { theme } from './miscTheme.js';
35
35
  import { css } from '@emotion/react';
36
- import { T as TogetherComponentGlobalContext } from './utils-88e98fd0.js';
37
- import { M as MantineProvider } from './index-b9b69385.js';
38
- import { i as isVideo } from './index-1d5359d8.js';
39
- import { u as useScreenSize } from './index-f880dc21.js';
36
+ import { T as TogetherComponentGlobalContext } from './utils-f4d1c5fb.js';
37
+ import { M as MantineProvider } from './index-f7979138.js';
38
+ import { i as isVideo } from './index-65a121e5.js';
39
+ import { u as useScreenSize } from './index-dfd9f7df.js';
40
40
  import { motion } from 'framer-motion';
41
41
  import { createPortal } from 'react-dom';
42
- import { I as InputDate } from './InputDate-d7a62dfe.js';
43
- import { D as DrawerComponent } from './index-b79e3e8d.js';
44
- import { C as Close } from './Close-de34c565.js';
42
+ import { I as InputDate } from './InputDate-bf6a9363.js';
43
+ import { D as DrawerComponent } from './index-715d6532.js';
44
+ import { C as Close } from './Close-f1da2174.js';
45
45
  import './constantsIsProduction.js';
46
- import './normalizeLink-8db8cf91.js';
46
+ import './normalizeLink-47a460df.js';
47
47
  import '@hhgtech/icons/other';
48
48
  import '@mantine/carousel';
49
49
  import 'classnames';
50
- import './useUniqueId-17d236b9.js';
50
+ import './useUniqueId-a6170f09.js';
51
51
  import './constantsSite.js';
52
52
  import '@hhgtech/icons/core';
53
- import './shared-887e5430.js';
53
+ import './shared-0d99adda.js';
54
54
  import '@mantine/notifications';
55
55
  import 'date-fns/locale';
56
56
  import './constantsRiskScreener.js';
@@ -66,11 +66,11 @@ import './i18n-values/vi-VN.js';
66
66
  import './i18n-values/vi-VN_MB.js';
67
67
  import './i18n-values/zh-SG.js';
68
68
  import './i18n-values/zh-TW.js';
69
- import './index-bbd26363.js';
69
+ import './index-4220b8db.js';
70
70
  import 'slugify';
71
71
  import 'string-format';
72
72
  import './togetherApiPaths.js';
73
- import './constants-19687a3a.js';
73
+ import './constants-f6a00864.js';
74
74
  import 'vaul';
75
75
 
76
76
  const LeadGenComponentContext = createContext({});
@@ -123,33 +123,6 @@ const LEADGEN_BLOCK_INPUT = [
123
123
  LEADGEN_BLOCK.CheckboxBlock,
124
124
  LEADGEN_BLOCK.TncBlock,
125
125
  ];
126
- const leadGenFieldNamePhone = (listBlockAdded) => {
127
- return listBlockAdded
128
- .filter(({ name }) => [
129
- LEADGEN_BLOCK.PhoneBlock,
130
- LEADGEN_BLOCK.PhoneOtpBlock,
131
- LEADGEN_BLOCK.WhatsappOtpBlock,
132
- LEADGEN_BLOCK.ZaloOtpBlock,
133
- ].includes(name))
134
- .map(({ data }) => data.value);
135
- };
136
- const leadGenFieldRequired = (blocks) => {
137
- if (!(blocks === null || blocks === void 0 ? void 0 : blocks.length)) {
138
- return [];
139
- }
140
- return blocks
141
- .map(({ data, name, id }) => {
142
- const { required, value } = data;
143
- if (name === LEADGEN_BLOCK.TncBlock && id && required) {
144
- return `TNC-${id}`;
145
- }
146
- if (required) {
147
- return value;
148
- }
149
- return;
150
- })
151
- .filter(Boolean);
152
- };
153
126
  const SSO_MAP_LEAD = ['name', 'email', 'birthday', 'phone', 'gender'];
154
127
  const LEAD_LOCALE_DATA$1 = {
155
128
  'vi-VN': {
@@ -232,6 +205,33 @@ const mappingSSOToLead = (userInfoProps) => {
232
205
  return;
233
206
  }
234
207
  };
208
+ const leadGenFieldNamePhone = (listBlockAdded) => {
209
+ return listBlockAdded
210
+ .filter(({ name }) => [
211
+ LEADGEN_BLOCK.PhoneBlock,
212
+ LEADGEN_BLOCK.PhoneOtpBlock,
213
+ LEADGEN_BLOCK.WhatsappOtpBlock,
214
+ LEADGEN_BLOCK.ZaloOtpBlock,
215
+ ].includes(name))
216
+ .map(({ data }) => data.value);
217
+ };
218
+ const leadGenFieldRequired = (blocks) => {
219
+ if (!(blocks === null || blocks === void 0 ? void 0 : blocks.length)) {
220
+ return [];
221
+ }
222
+ return blocks
223
+ .map(({ data, name, id }) => {
224
+ const { required, value } = data;
225
+ if (name === LEADGEN_BLOCK.TncBlock && id && required) {
226
+ return `TNC-${id}`;
227
+ }
228
+ if (required) {
229
+ return value;
230
+ }
231
+ return;
232
+ })
233
+ .filter(Boolean);
234
+ };
235
235
  const formatCampaignDetail = (campaign) => {
236
236
  if (!campaign) {
237
237
  return {};
@@ -378,6 +378,55 @@ const formatLeadGenFormValue = (values = {}, blocks) => {
378
378
  return newValues;
379
379
  };
380
380
 
381
+ const TIMEOUT = 30 * 60 * 1000;
382
+ const WAITING_FIRST_RESP = 'waitingTheFirstResponse';
383
+ const CachedSystem = {
384
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
385
+ cached: {},
386
+ clearCached: (prefix) => {
387
+ console.log(CachedSystem.cached);
388
+ Object.keys(CachedSystem.cached)
389
+ .filter((k) => k.startsWith(prefix))
390
+ .forEach((key) => {
391
+ console.log(key);
392
+ CachedSystem.cached[key] = undefined;
393
+ });
394
+ },
395
+ withCached: (key, fnResponse, timeout = TIMEOUT) => __awaiter(void 0, void 0, void 0, function* () {
396
+ if (CachedSystem.cached[key] === WAITING_FIRST_RESP) {
397
+ return new Promise((resolve) => {
398
+ const startDate = new Date().getTime();
399
+ const intervalId = setInterval(() => {
400
+ const currentDate = new Date().getTime();
401
+ if (currentDate - startDate > 3000) {
402
+ clearInterval(intervalId);
403
+ }
404
+ if (typeof CachedSystem.cached[key] === 'object') {
405
+ resolve(CachedSystem.cached[key]);
406
+ clearInterval(intervalId);
407
+ }
408
+ }, 100);
409
+ });
410
+ }
411
+ if (typeof CachedSystem.cached[key] === 'object') {
412
+ return CachedSystem.cached[key];
413
+ }
414
+ CachedSystem.cached[key] = 'waitingTheFirstResponse';
415
+ try {
416
+ const result = yield fnResponse();
417
+ CachedSystem.cached[key] = result;
418
+ setTimeout(() => {
419
+ CachedSystem.cached[key] = undefined;
420
+ }, timeout);
421
+ return result;
422
+ }
423
+ catch (err) {
424
+ CachedSystem.cached[key] = undefined;
425
+ return Promise.reject(err);
426
+ }
427
+ }),
428
+ };
429
+
381
430
  class Store {
382
431
  constructor() {
383
432
  this.apiSsoUrl = 'https://staging-id.hellobacsi.com/';
@@ -387,6 +436,8 @@ class Store {
387
436
  }
388
437
  const leadStore = new Store();
389
438
 
439
+ const LEADGEN_CACHE_KEY = 'LeadGen_';
440
+ const LEADGEN_CACHE_TIME = 5 * 60 * 1000; // 5 minutes
390
441
  const METHOD = {
391
442
  GET: 'get',
392
443
  POST: 'POST',
@@ -573,7 +624,19 @@ const trackingSubscription = (data) => {
573
624
  data,
574
625
  });
575
626
  };
627
+ function getCampaigns({ url, siteId, apiLeadUrl, }) {
628
+ const ga_client_id = getCookie('_ga') || null;
629
+ const AS_PATH = `${apiLeadUrl || leadStore.apiLeadUrl}api/campaign/${siteId}`;
630
+ return CachedSystem.withCached(LEADGEN_CACHE_KEY + AS_PATH, () => fetch(AS_PATH, {
631
+ method: 'POST',
632
+ headers: { 'Content-Type': 'application/json' },
633
+ body: JSON.stringify({ url, ga_client_id }),
634
+ })
635
+ .then((res) => res.json())
636
+ .then(({ _data }) => (_data === null || _data === void 0 ? void 0 : _data.campaigns) || []), LEADGEN_CACHE_TIME);
637
+ }
576
638
  const Service = {
639
+ getCampaigns,
577
640
  campaignGetById,
578
641
  getCampaignByCode,
579
642
  getSubscriptionBoxInfo,
@@ -1626,12 +1689,6 @@ const getTranslations = (locale) => {
1626
1689
  return translationsMap['en-PH'];
1627
1690
  };
1628
1691
 
1629
- const LeadGenTranslationProvider = (props) => {
1630
- const { locale, children } = props;
1631
- const translationContextValue = useMemo(() => ({ locale, values: getTranslations(locale) }), [locale]);
1632
- return (React__default.createElement(TranslationsContext.Provider, { value: translationContextValue }, children));
1633
- };
1634
-
1635
1692
  // import mockLeadData from './mockLeadData'
1636
1693
  const listCampaignScheduled = [];
1637
1694
  const listCampaignScheduledToActivated = [];
@@ -1807,167 +1864,167 @@ function clearPassiveEvent() {
1807
1864
  LEAD_SCROLL_EVENT = null;
1808
1865
  }
1809
1866
  }
1810
- function checkShowPopup({ leadApi, leadSiteId, leadDomain, onShowPopup, DEBUG_URL, }) {
1811
- // clear previous passive event, check for new condition
1812
- clearPassiveEvent();
1813
- const leadCurrentUrl = DEBUG_URL ||
1814
- ('https://' +
1815
- location.hostname +
1816
- location.pathname +
1817
- location.search).toLowerCase();
1818
- fetch(leadApi + 'api/campaign/' + leadSiteId, {
1819
- method: 'POST',
1820
- headers: {
1821
- 'Content-Type': 'application/json',
1822
- },
1823
- body: JSON.stringify({
1824
- url: leadCurrentUrl,
1825
- ga_client_id: getCookie('_ga') || null,
1826
- }),
1827
- })
1828
- .then((response) => {
1829
- return response.json();
1830
- // return mockLeadData || response.json()
1831
- })
1832
- .then((data) => {
1833
- var _a, _b, _c, _d;
1834
- LeadLog('List campagin: ', data);
1835
- LEAD_RESET_VAR();
1836
- if (data._status == 1) {
1837
- const campaigns = (((_b = (_a = data._data) === null || _a === void 0 ? void 0 : _a.campaigns) === null || _b === void 0 ? void 0 : _b.filter(filterFnCampaign)) || []).filter(fillterApprearanceTimeCampaign);
1838
- if (!getCookie('hhg-id')) {
1839
- setCookie('hhg-id', v1(), {
1840
- domain: '.' + leadDomain,
1841
- path: '/',
1842
- });
1843
- LeadLog('😍 Set HHG ID cookie');
1844
- }
1845
- // getCookie('hhg-id')
1846
- // TODO: HP-534 Filter desktop
1847
- let campaignsDevice = [];
1848
- if (isMobile()) {
1849
- campaignsDevice = campaigns.filter((c) => c.device_types.some((d) => d.id == LEAD_DEVICE_TYPE.MOBILE));
1867
+ function getCurrentCampaign({ campaigns = [], leadDomain, leadCurrentUrl, }) {
1868
+ if (!getCookie('hhg-id')) {
1869
+ setCookie('hhg-id', v1(), { domain: `.${leadDomain}`, path: '/' });
1870
+ LeadLog('😍 Set HHG ID cookie');
1871
+ }
1872
+ // TODO: HP-534 Filter desktop
1873
+ let campaignsDevice = [];
1874
+ if (isMobile()) {
1875
+ campaignsDevice = campaigns.filter((c) => c.device_types.some((d) => d.id == LEAD_DEVICE_TYPE.MOBILE));
1876
+ }
1877
+ else {
1878
+ campaignsDevice = campaigns.filter((c) => c.device_types.some((d) => d.id == LEAD_DEVICE_TYPE.DESKTOP));
1879
+ }
1880
+ LeadLog(`👓 campaignsDevice`, campaignsDevice);
1881
+ LeadLog('--listCampaignScheduled', listCampaignScheduled);
1882
+ LeadLog('--listCampaignScheduledToActivated', listCampaignScheduledToActivated);
1883
+ LeadLog('--listCampaignActiveButExpired', listCampaignActiveButExpired);
1884
+ LeadLog('--listCampaignExcludeSonsored', listCampaignExcludeSonsored);
1885
+ LeadLog('--listCampaignDifferentSponsor', listCampaignDifferentSponsor);
1886
+ LeadLog('--listCampaignNotDisplayInRangeOfTime', listCampaignNotDisplayInRangeOfTime);
1887
+ // Check links
1888
+ let listLinksObj = campaignsDevice
1889
+ .map((i, index) => i.targets
1890
+ .filter((i) => i.type == CAMPAIGN_TARGET_TYPE.LINKS)
1891
+ .map((i) => (Object.assign(Object.assign({}, i), { campaignIndex: index }))))
1892
+ .flat(1) || [];
1893
+ // Check list link match current href
1894
+ listLinksObj = listLinksObj.filter((i) => {
1895
+ var _a;
1896
+ const target = new URL(String(i.target).toLowerCase());
1897
+ if (i.option == 'exact_match')
1898
+ // FOR TEST LOCAL:
1899
+ // return Boolean(location.pathname === target.pathname)
1900
+ return Boolean(leadCurrentUrl === ((_a = target.href) === null || _a === void 0 ? void 0 : _a.toLowerCase()));
1901
+ if (i.option == 'start_with') {
1902
+ // FOR TEST LOCAL:
1903
+ // if (location.pathname.includes(target.pathname)) {
1904
+ if (leadCurrentUrl.includes(String(i.target).toLowerCase())) {
1905
+ const listExcluding = i.sub_target
1906
+ .filter((i) => i.option == 'excluding')
1907
+ .map((i) => { var _a; return (_a = i.value) === null || _a === void 0 ? void 0 : _a.toLowerCase(); });
1908
+ return !listExcluding.includes(leadCurrentUrl.split('?')[0]);
1850
1909
  }
1851
1910
  else {
1852
- campaignsDevice = campaigns.filter((c) => c.device_types.some((d) => d.id == LEAD_DEVICE_TYPE.DESKTOP));
1853
- }
1854
- LeadLog(`👓 campaignsDevice`, campaignsDevice);
1855
- LeadLog('--listCampaignScheduled', listCampaignScheduled);
1856
- LeadLog('--listCampaignScheduledToActivated', listCampaignScheduledToActivated);
1857
- LeadLog('--listCampaignActiveButExpired', listCampaignActiveButExpired);
1858
- LeadLog('--listCampaignExcludeSonsored', listCampaignExcludeSonsored);
1859
- LeadLog('--listCampaignDifferentSponsor', listCampaignDifferentSponsor);
1860
- LeadLog('--listCampaignNotDisplayInRangeOfTime', listCampaignNotDisplayInRangeOfTime);
1861
- // Check links
1862
- let listLinksObj = campaignsDevice
1863
- .map((i, index) => i.targets
1864
- .filter((i) => i.type == CAMPAIGN_TARGET_TYPE.LINKS)
1865
- .map((i) => (Object.assign(Object.assign({}, i), { campaignIndex: index }))))
1866
- .flat(1);
1867
- // Check list link match current href
1868
- listLinksObj = listLinksObj.filter((i) => {
1869
- var _a;
1870
- const target = new URL(String(i.target).toLowerCase());
1871
- if (i.option == 'exact_match')
1872
- // FOR TEST LOCAL:
1873
- // return Boolean(location.pathname === target.pathname)
1874
- return Boolean(leadCurrentUrl === ((_a = target.href) === null || _a === void 0 ? void 0 : _a.toLowerCase()));
1875
- if (i.option == 'start_with') {
1876
- // FOR TEST LOCAL:
1877
- // if (location.pathname.includes(target.pathname)) {
1878
- if (leadCurrentUrl.includes(String(i.target).toLowerCase())) {
1879
- const listExcluding = i.sub_target
1880
- .filter((i) => i.option == 'excluding')
1881
- .map((i) => { var _a; return (_a = i.value) === null || _a === void 0 ? void 0 : _a.toLowerCase(); });
1882
- return !listExcluding.includes(leadCurrentUrl.split('?')[0]);
1883
- }
1884
- else {
1885
- return false;
1886
- }
1887
- }
1888
- });
1889
- // Check tags
1890
- const listMetaTag = Array.from(document.getElementsByTagName('META')).filter((i) => i.getAttribute('property') == 'article:tag');
1891
- const listTags = listMetaTag.map((i) => i.content);
1892
- let listCampaignHasTag = [];
1893
- let listTagsObj = [];
1894
- if (listTags && listTags.length) {
1895
- listCampaignHasTag = campaignsDevice
1896
- .map((i, index) => i.targets
1897
- .filter((i) => i.type == CAMPAIGN_TARGET_TYPE.TAGS)
1898
- .map((i) => (Object.assign(Object.assign({}, i), { campaignIndex: index }))))
1899
- .flat(1);
1900
- listTagsObj = listCampaignHasTag.filter((i) => listTags.includes(i.target));
1911
+ return false;
1901
1912
  }
1902
- const listCampaginsMatch = [...listLinksObj, ...listTagsObj];
1903
- const cookieKeys = document.cookie
1904
- .split('; ')
1905
- .map((i) => i.split('=')[0]);
1906
- const listCampaignCodeSubmited = cookieKeys.filter((i) => i.includes('lead_submited'));
1907
- LeadLog(`--listCampaignCodeSubmited`, listCampaignCodeSubmited);
1908
- const listCampaignCodeClosed = cookieKeys.filter((i) => i.includes('lead_closed'));
1909
- LeadLog(`--listCampaignCodeClosed`, listCampaignCodeClosed);
1910
- const listCampaignSubmitedClosed = [
1911
- ...listCampaignCodeSubmited,
1912
- ...listCampaignCodeClosed,
1913
- ];
1914
- const listCampaignNoSubmitedClosed = listCampaginsMatch.filter((i) => {
1915
- const hasSubmited = listCampaignSubmitedClosed.some((k) => k.includes(campaignsDevice[i.campaignIndex].code));
1916
- return !hasSubmited;
1917
- });
1918
- const listCampaignValid = getShuffleArray(listCampaignNoSubmitedClosed);
1919
- // .sort(
1920
- // (a, b) =>
1921
- // (listCampaignValid[a.campaignIndex]?.score || 0) -
1922
- // (listCampaignValid[b.campaignIndex]?.score || 0),
1923
- // )
1924
- LeadLog('--listCampaignValid : ', listCampaignValid);
1925
- if (listCampaignValid && listCampaignValid.length) {
1926
- const CAMPAIGN_SHOW = campaignsDevice[listCampaignValid[0].campaignIndex];
1927
- LeadLog(`CAMPAIGN_SHOW`, CAMPAIGN_SHOW);
1928
- const { rules } = CAMPAIGN_SHOW;
1929
- // CHECK RULE TRIGGER POPUP
1930
- const timeoutRule = Number((_c = rules.find((i) => i.rule == 'time')) === null || _c === void 0 ? void 0 : _c.value);
1931
- LeadLog(`timeoutRule`, timeoutRule);
1932
- const scrollRule = Number((_d = rules.find((i) => i.rule == 'scroll')) === null || _d === void 0 ? void 0 : _d.value);
1933
- LeadLog(`scrollRule`, scrollRule);
1934
- let impressionAction = 'TIME';
1935
- if (Number.isInteger(timeoutRule)) {
1936
- impressionAction = 'TIME';
1937
- LeadLog(' SHOW AWESOME POPUP AFTER: ', timeoutRule, ' seconds');
1938
- timeoutRef = setTimeout(() => {
1939
- onShowPopup === null || onShowPopup === void 0 ? void 0 : onShowPopup(CAMPAIGN_SHOW, impressionAction);
1940
- }, timeoutRule * 1000);
1941
- }
1942
- if (Number.isInteger(scrollRule)) {
1943
- impressionAction = 'SCROLL';
1944
- LeadLog('✨ SHOW AWESOME AFTER: SCROLL', scrollRule, ' %');
1945
- const $p = document.querySelector(`[data-url="${location.pathname}"]`) ||
1946
- document.querySelector('body');
1947
- const pct = $p.getBoundingClientRect().top;
1948
- const pb = $p.offsetHeight;
1949
- LeadLog(`👓 Element check scroll: `, $p);
1950
- LEAD_SCROLL_EVENT = function leadScollCheckHandler() {
1951
- const wt = window.pageYOffset || document.documentElement.scrollTop;
1952
- let percent = 0;
1953
- if (wt >= pct) {
1954
- percent = Math.round(((wt - pct) / (pb - innerHeight)) * 100);
1955
- }
1956
- LeadLog('---Scroll', percent, scrollRule);
1957
- // TODO: CHECK FOOTER HEIGHT
1958
- if (percent >= scrollRule) {
1959
- window.removeEventListener('scroll', LEAD_SCROLL_EVENT);
1960
- onShowPopup === null || onShowPopup === void 0 ? void 0 : onShowPopup(CAMPAIGN_SHOW, impressionAction);
1961
- }
1962
- };
1963
- window.addEventListener('scroll', LEAD_SCROLL_EVENT, {
1964
- passive: true,
1965
- });
1966
- }
1913
+ }
1914
+ });
1915
+ // Check tags
1916
+ const listMetaTag = Array.from(document.getElementsByTagName('META')).filter((i) => i.getAttribute('property') == 'article:tag');
1917
+ const listTags = listMetaTag.map((i) => i.content);
1918
+ let listCampaignHasTag = [];
1919
+ let listTagsObj = [];
1920
+ if (listTags && listTags.length) {
1921
+ listCampaignHasTag = campaignsDevice
1922
+ .map((i, index) => i.targets
1923
+ .filter((i) => i.type == CAMPAIGN_TARGET_TYPE.TAGS)
1924
+ .map((i) => (Object.assign(Object.assign({}, i), { campaignIndex: index }))))
1925
+ .flat(1);
1926
+ listTagsObj = listCampaignHasTag.filter((i) => listTags.includes(i.target));
1927
+ }
1928
+ const listCampaginsMatch = [...listLinksObj, ...listTagsObj];
1929
+ const cookieKeys = document.cookie.split('; ').map((i) => i.split('=')[0]);
1930
+ const listCampaignCodeSubmited = cookieKeys.filter((i) => i.includes('lead_submited'));
1931
+ LeadLog(`--listCampaignCodeSubmited`, listCampaignCodeSubmited);
1932
+ const listCampaignCodeClosed = cookieKeys.filter((i) => i.includes('lead_closed'));
1933
+ LeadLog(`--listCampaignCodeClosed`, listCampaignCodeClosed);
1934
+ const listCampaignSubmitedClosed = [
1935
+ ...listCampaignCodeSubmited,
1936
+ ...listCampaignCodeClosed,
1937
+ ];
1938
+ const listCampaignNoSubmitedClosed = listCampaginsMatch.filter((i) => {
1939
+ const hasSubmited = listCampaignSubmitedClosed.some((k) => k.includes(campaignsDevice[i.campaignIndex].code));
1940
+ return !hasSubmited;
1941
+ });
1942
+ const listCampaignValid = getShuffleArray(listCampaignNoSubmitedClosed);
1943
+ // .sort(
1944
+ // (a, b) =>
1945
+ // (listCampaignValid[a.campaignIndex]?.score || 0) -
1946
+ // (listCampaignValid[b.campaignIndex]?.score || 0),
1947
+ // )
1948
+ LeadLog('--listCampaignValid : ', listCampaignValid);
1949
+ if (listCampaignValid && listCampaignValid.length) {
1950
+ const CAMPAIGN_SHOW = campaignsDevice[listCampaignValid[0].campaignIndex];
1951
+ return CAMPAIGN_SHOW;
1952
+ }
1953
+ else {
1954
+ LeadLog('🚧 No lead campaigns on current URL, tags');
1955
+ return null;
1956
+ }
1957
+ }
1958
+ function addEventShowCurrentCampaign({ campaign: CAMPAIGN_SHOW, onShowPopup, }) {
1959
+ var _a, _b;
1960
+ LeadLog(`CAMPAIGN_SHOW`, CAMPAIGN_SHOW);
1961
+ const { rules } = CAMPAIGN_SHOW;
1962
+ // CHECK RULE TRIGGER POPUP
1963
+ const timeoutRule = Number((_a = rules.find((i) => i.rule == 'time')) === null || _a === void 0 ? void 0 : _a.value);
1964
+ LeadLog(`timeoutRule`, timeoutRule);
1965
+ const scrollRule = Number((_b = rules.find((i) => i.rule == 'scroll')) === null || _b === void 0 ? void 0 : _b.value);
1966
+ LeadLog(`scrollRule`, scrollRule);
1967
+ let impressionAction = 'TIME';
1968
+ if (Number.isInteger(timeoutRule)) {
1969
+ impressionAction = 'TIME';
1970
+ LeadLog('✨ SHOW AWESOME POPUP AFTER: ', timeoutRule, ' seconds');
1971
+ timeoutRef = setTimeout(() => {
1972
+ onShowPopup === null || onShowPopup === void 0 ? void 0 : onShowPopup(CAMPAIGN_SHOW, impressionAction);
1973
+ }, timeoutRule * 1000);
1974
+ return { campaign: CAMPAIGN_SHOW, action: impressionAction };
1975
+ }
1976
+ if (Number.isInteger(scrollRule)) {
1977
+ impressionAction = 'SCROLL';
1978
+ LeadLog('✨ SHOW AWESOME AFTER: SCROLL', scrollRule, ' %');
1979
+ const $p = document.querySelector(`[data-url="${location.pathname}"]`) ||
1980
+ document.querySelector('body');
1981
+ const pct = $p.getBoundingClientRect().top;
1982
+ const pb = $p.offsetHeight;
1983
+ LeadLog(`👓 Element check scroll: `, $p);
1984
+ LEAD_SCROLL_EVENT = function leadScollCheckHandler() {
1985
+ const wt = window.pageYOffset || document.documentElement.scrollTop;
1986
+ let percent = 0;
1987
+ if (wt >= pct) {
1988
+ percent = Math.round(((wt - pct) / (pb - innerHeight)) * 100);
1967
1989
  }
1968
- else {
1969
- LeadLog('🚧 No lead campaigns on current URL, tags');
1990
+ LeadLog('---Scroll', percent, scrollRule);
1991
+ // TODO: CHECK FOOTER HEIGHT
1992
+ if (percent >= scrollRule) {
1993
+ window.removeEventListener('scroll', LEAD_SCROLL_EVENT);
1994
+ onShowPopup === null || onShowPopup === void 0 ? void 0 : onShowPopup(CAMPAIGN_SHOW, impressionAction);
1970
1995
  }
1996
+ };
1997
+ window.addEventListener('scroll', LEAD_SCROLL_EVENT, {
1998
+ passive: true,
1999
+ });
2000
+ }
2001
+ }
2002
+ function checkShowPopup({ leadApi, leadSiteId, leadDomain, onShowPopup, DEBUG_URL, }) {
2003
+ // clear previous passive event, check for new condition
2004
+ clearPassiveEvent();
2005
+ let leadCurrentUrl = DEBUG_URL;
2006
+ if (typeof window !== 'undefined') {
2007
+ const { location } = window;
2008
+ leadCurrentUrl = leadCurrentUrl || location.href.toLowerCase();
2009
+ }
2010
+ Service.getCampaigns({
2011
+ url: leadCurrentUrl,
2012
+ siteId: leadSiteId,
2013
+ apiLeadUrl: leadApi,
2014
+ })
2015
+ .then((campRes) => {
2016
+ LeadLog('List campagin: ', campRes);
2017
+ LEAD_RESET_VAR();
2018
+ const campaigns = (campRes || [])
2019
+ .filter(filterFnCampaign)
2020
+ .filter(fillterApprearanceTimeCampaign);
2021
+ const campaign = getCurrentCampaign({
2022
+ campaigns,
2023
+ leadCurrentUrl,
2024
+ leadDomain,
2025
+ });
2026
+ if (campaign && (campaign === null || campaign === void 0 ? void 0 : campaign.id)) {
2027
+ addEventShowCurrentCampaign({ campaign, onShowPopup });
1971
2028
  }
1972
2029
  })
1973
2030
  .catch((err) => {
@@ -1984,31 +2041,72 @@ const LeadLog = (...params) => {
1984
2041
  }
1985
2042
  };
1986
2043
 
2044
+ const LeadGenInlineWithoutMemo = (props) => {
2045
+ const [campaign, setCampaign] = useState();
2046
+ const { forceCampaign, apiUrl, apiLeadUrl, siteId, siteDomain, DEBUG_URL } = props;
2047
+ useEffect(() => {
2048
+ if (forceCampaign) {
2049
+ setCampaign(forceCampaign);
2050
+ return;
2051
+ }
2052
+ (() => __awaiter(void 0, void 0, void 0, function* () {
2053
+ const campaign = yield leadGenInlineGetCampaign({
2054
+ siteId,
2055
+ siteDomain,
2056
+ apiLeadUrl: apiUrl || apiLeadUrl || '',
2057
+ url: DEBUG_URL,
2058
+ });
2059
+ if (campaign) {
2060
+ setCampaign(campaign);
2061
+ }
2062
+ }))();
2063
+ }, [forceCampaign, DEBUG_URL, apiUrl, apiLeadUrl, siteId, siteDomain]);
2064
+ if (!campaign || !(campaign === null || campaign === void 0 ? void 0 : campaign.id)) {
2065
+ return null;
2066
+ }
2067
+ return (React__default.createElement(LeadGen, Object.assign({}, props, { forceCampaign: campaign, apiUrl: apiUrl || apiLeadUrl, flatComponent: true })));
2068
+ };
2069
+ const LeadGenInline = memo(LeadGenInlineWithoutMemo);
2070
+ function leadGenInlineGetCampaign(props) {
2071
+ var _a;
2072
+ return __awaiter(this, void 0, void 0, function* () {
2073
+ const { url, apiLeadUrl, siteId, siteDomain } = props;
2074
+ const campaigns = yield Service.getCampaigns({ url, apiLeadUrl, siteId });
2075
+ const campaignsInline = (_a = (campaigns || [])) === null || _a === void 0 ? void 0 : _a.filter(({ extra_fields }) => {
2076
+ const { currentLayout } = extra_fields || {};
2077
+ return currentLayout === null || currentLayout === void 0 ? void 0 : currentLayout.includes('Inline');
2078
+ });
2079
+ return getCurrentCampaign({
2080
+ campaigns: campaignsInline,
2081
+ leadCurrentUrl: url,
2082
+ leadDomain: siteDomain,
2083
+ });
2084
+ });
2085
+ }
2086
+
2087
+ const LeadGenTranslationProvider = (props) => {
2088
+ const { locale, children } = props;
2089
+ const translationContextValue = useMemo(() => ({ locale, values: getTranslations(locale) }), [locale]);
2090
+ return (React__default.createElement(TranslationsContext.Provider, { value: translationContextValue }, children));
2091
+ };
2092
+
1987
2093
  const LeadGenContext = createContext({
1988
- submit(value) {
2094
+ onSubmit(value) {
1989
2095
  /** Init for FAKING function */
1990
2096
  LeadLog('** LeadGen Submit : ', value);
1991
2097
  return Promise.reject(value);
1992
2098
  },
1993
- submitSubscriptionBox(value) {
2099
+ onImpression(value) {
1994
2100
  /** Init for FAKING function */
1995
- LeadLog('** LeadGen SubmitSubscriptionBox : ', value);
1996
- return Promise.reject(value);
1997
- },
1998
- impression(type) {
1999
- /** Init for FAKING function */
2000
- LeadLog('** LeadGen Impression : ', type);
2101
+ LeadLog('** LeadGen Impression : ', value);
2001
2102
  return Promise.reject();
2002
2103
  },
2003
- /** For Subscription Box */
2004
- subscriptionIcon: '',
2005
- subscriptionTitle: '',
2006
- subscriptionPhoneType: '',
2007
2104
  });
2008
2105
  const LeadGenContextProvider = (props) => {
2009
- const { campaign_code: campaignCodeProps, apiSsoUrl, apiLeadUrl, apiSubotUrl, locale: localeProps, forceCampaign: forceCampaignProps, extraValues, articleId = 1, categoryId = 1, siteDomain: site_domain, children, userInfo } = props, restProps = __rest(props, ["campaign_code", "apiSsoUrl", "apiLeadUrl", "apiSubotUrl", "locale", "forceCampaign", "extraValues", "articleId", "categoryId", "siteDomain", "children", "userInfo"]);
2106
+ const { campaign_code: campaignCodeProps, apiSsoUrl, apiLeadUrl, apiSubotUrl, locale: localeProps, forceCampaign: forceCampaignProps, extraValues, siteId, siteDomain, DEBUG_URL = '', children, articleId, categoryId, userInfo } = props, restProps = __rest(props, ["campaign_code", "apiSsoUrl", "apiLeadUrl", "apiSubotUrl", "locale", "forceCampaign", "extraValues", "siteId", "siteDomain", "DEBUG_URL", "children", "articleId", "categoryId", "userInfo"]);
2010
2107
  const { t } = useTranslations();
2011
- const [forceCampaign, setForceCampaign] = useState(forceCampaignProps);
2108
+ const [rawForceCampaign, setRawForceCampaign] = useState(forceCampaignProps);
2109
+ const [forceCampaign, setForceCampaign] = useState(() => formatCampaignDetail(forceCampaignProps));
2012
2110
  const [subscriptionInfo, setSubscriptionInfo] = useState({
2013
2111
  subscriptionIcon: '',
2014
2112
  subscriptionTitle: '',
@@ -2018,98 +2116,65 @@ const LeadGenContextProvider = (props) => {
2018
2116
  const locale = useMemo(() => {
2019
2117
  return localeProps || LOCALE['PhilippinesEnglish'];
2020
2118
  }, [localeProps]);
2021
- const { url, campaign_id, cookie_id, ga_client_id, category_id, article_id, article_title, category_name, } = useMemo(() => ({
2022
- url: location.href.toLowerCase() || '',
2023
- cookie_id: getCookie('hhg-id') || null,
2024
- ga_client_id: getCookie('_ga'),
2025
- campaign_id: forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.id,
2026
- campaign_code: campaignCodeProps || (forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.code),
2027
- category_id: categoryId,
2028
- article_id: articleId,
2029
- article_title: (extraValues === null || extraValues === void 0 ? void 0 : extraValues.article_title) || document.title || '',
2030
- category_name: (extraValues === null || extraValues === void 0 ? void 0 : extraValues.category_name) || '',
2031
- }), [
2032
- campaignCodeProps,
2033
- articleId,
2034
- categoryId,
2035
- forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.id,
2036
- extraValues === null || extraValues === void 0 ? void 0 : extraValues.article_title,
2037
- extraValues === null || extraValues === void 0 ? void 0 : extraValues.category_name,
2038
- ]);
2039
- // const fetchCampaign = useCallback(
2040
- // (campaign_code: string) => {
2041
- // Service.getCampaignByCode(campaign_code).then((res) => {
2042
- // const { _data } = res || {}
2043
- // const { campaigns } = _data || {}
2044
- // LeadLog('** LeadGen Campaign : ', campaigns)
2045
- // setForceCampaign(formatCampaignDetail(campaigns))
2046
- // })
2047
- // },
2048
- // [campaignCodeProps],
2049
- // )
2050
2119
  // TODO : Update form for LeadGen
2051
- const submit = useCallback((data) => {
2120
+ const onSubmit = useCallback((data) => {
2052
2121
  return Service.postSubscriptionBoxLead({ data });
2122
+ }, [forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.blocks]);
2123
+ const onImpression = useCallback((value) => {
2124
+ //
2125
+ console.log('** RYAN LeadGenContext.tsx 188 value : ', value);
2126
+ return Promise.resolve('dfdfdf');
2053
2127
  }, []);
2054
2128
  const submitSubscriptionBox = useCallback((value) => {
2055
2129
  const data = Object.assign(Object.assign(Object.assign(Object.assign({}, value), {
2056
2130
  // campaign_id,
2057
- site_domain, url: (value === null || value === void 0 ? void 0 : value.url) || url, cookie_id, ga_client_id: (value === null || value === void 0 ? void 0 : value.ga_client_id) || ga_client_id }), extraValues), { article_id,
2058
- category_id,
2059
- article_title });
2131
+ site_domain: siteDomain, url: (value === null || value === void 0 ? void 0 : value.url) || location.href.toLowerCase() || '', cookie_id: getCookie('hhg-id') || null, ga_client_id: getCookie('_ga') }), extraValues), { article_id: articleId, category_id: categoryId, article_title: (extraValues === null || extraValues === void 0 ? void 0 : extraValues.article_title) || document.title || '' });
2060
2132
  return Service.postSubscriptionBoxLead({ data });
2061
2133
  }, [
2062
2134
  extraValues,
2063
- site_domain,
2064
- campaign_id,
2065
- article_id,
2066
- article_title,
2067
- category_id,
2068
- url,
2069
- cookie_id,
2070
- ga_client_id,
2135
+ extraValues === null || extraValues === void 0 ? void 0 : extraValues.article_title,
2136
+ siteDomain,
2137
+ articleId,
2138
+ categoryId,
2071
2139
  ]);
2072
- const impression = useCallback((type) => {
2073
- const gaCookie = getCookie('_ga') || null;
2140
+ const impressionSubscriptionBox = useCallback((type) => {
2074
2141
  const impression = {
2075
2142
  subscription_title: subscriptionInfo.subscriptionTitle,
2076
2143
  name: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) || '',
2077
2144
  area_code: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.area_code) || '',
2078
2145
  phone_number: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone) || '',
2079
- site_domain: domainLocales[locale],
2146
+ site_domain: siteDomain,
2080
2147
  url: location.href.toLowerCase(),
2081
2148
  cookie_id: getCookie('hhg-id'),
2082
- ga_client_id: gaCookie,
2083
- article_title,
2084
- article_id,
2085
- category_id,
2086
- category_name,
2149
+ ga_client_id: getCookie('_ga') || null,
2150
+ article_title: (extraValues === null || extraValues === void 0 ? void 0 : extraValues.article_title) || document.title || '',
2151
+ article_id: articleId,
2152
+ category_id: categoryId,
2153
+ category_name: (extraValues === null || extraValues === void 0 ? void 0 : extraValues.category_name) || '',
2087
2154
  type,
2088
2155
  };
2089
2156
  return Service.trackingSubscription(impression);
2090
2157
  }, [
2091
- campaign_id,
2092
- url,
2093
- article_title,
2094
- cookie_id,
2095
- ga_client_id,
2158
+ articleId,
2096
2159
  categoryId,
2097
- article_id,
2098
2160
  subscriptionInfo.subscriptionTitle,
2161
+ extraValues === null || extraValues === void 0 ? void 0 : extraValues.category_name,
2099
2162
  userInfo === null || userInfo === void 0 ? void 0 : userInfo.name,
2100
2163
  userInfo === null || userInfo === void 0 ? void 0 : userInfo.area_code,
2101
2164
  userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone,
2102
2165
  ]);
2103
2166
  useEffect(() => {
2167
+ /** Force Campaign */
2104
2168
  if (forceCampaignProps) {
2105
2169
  setForceCampaign(formatCampaignDetail(forceCampaignProps));
2170
+ setRawForceCampaign(forceCampaignProps);
2106
2171
  return;
2107
2172
  }
2108
2173
  /** For Subscription Box */
2109
2174
  if (categoryId) {
2110
2175
  Service.getSubscriptionBoxInfo({
2111
2176
  category: categoryId,
2112
- site: site_domain,
2177
+ site: siteDomain,
2113
2178
  slug: location === null || location === void 0 ? void 0 : location.pathname,
2114
2179
  }).then((res) => {
2115
2180
  const { _data } = res || {};
@@ -2242,10 +2307,39 @@ const LeadGenContextProvider = (props) => {
2242
2307
  });
2243
2308
  return;
2244
2309
  }
2245
- // if (campaignCodeProps) {
2246
- // fetchCampaign(campaignCodeProps)
2310
+ if (campaignCodeProps) {
2311
+ Service.getCampaignByCode(campaignCodeProps).then((res) => {
2312
+ const { _data } = res || {};
2313
+ const { campaigns } = _data || {};
2314
+ LeadLog('** LeadGen Campaign : ', campaigns);
2315
+ setForceCampaign(formatCampaignDetail(campaigns));
2316
+ setRawForceCampaign(campaigns);
2317
+ });
2318
+ return;
2319
+ }
2320
+ // /** For LeadGen */
2321
+ // if (!leadStore.campaigns?.length) {
2322
+ // checkShowPopup({
2323
+ // leadApi: apiLeadUrl,
2324
+ // leadDomain: siteDomain,
2325
+ // leadSiteId: siteId,
2326
+ // onShowPopup(campaign: any, action: string) {
2327
+ // console.log('** RYAN LeadGenContext.tsx 421 action : ', action)
2328
+ // setForceCampaign(formatCampaignDetail(campaign))
2329
+ // setRawForceCampaign(campaign)
2330
+ // },
2331
+ // DEBUG_URL,
2332
+ // })
2247
2333
  // }
2248
- }, [forceCampaignProps, campaignCodeProps, categoryId]);
2334
+ }, [
2335
+ forceCampaignProps,
2336
+ campaignCodeProps,
2337
+ categoryId,
2338
+ siteId,
2339
+ siteDomain,
2340
+ apiLeadUrl,
2341
+ DEBUG_URL,
2342
+ ]);
2249
2343
  useEffect(() => {
2250
2344
  leadStore.apiSsoUrl = apiSsoUrl;
2251
2345
  leadStore.apiLeadUrl = apiLeadUrl;
@@ -2258,10 +2352,14 @@ const LeadGenContextProvider = (props) => {
2258
2352
  apiLeadUrl,
2259
2353
  apiSubotUrl, locale: localeProps, extraValues,
2260
2354
  articleId,
2261
- categoryId, siteDomain: site_domain, forceCampaign,
2262
- submit,
2355
+ categoryId,
2356
+ siteDomain,
2357
+ forceCampaign,
2358
+ rawForceCampaign,
2359
+ onSubmit,
2360
+ onImpression,
2263
2361
  submitSubscriptionBox,
2264
- impression }) },
2362
+ impressionSubscriptionBox }) },
2265
2363
  React__default.createElement(LeadGenTranslationProvider, { locale: locale }, children)));
2266
2364
  };
2267
2365
  const useLeadGenContext = () => {
@@ -3274,7 +3372,7 @@ const LeadGenSubscriptionBoxWithoutMemo = ({ locale, userInfo, forceCampaign, ca
3274
3372
  const { image, extra_fields, id: campaign_id, bot_id: campaign_subot_id = [], ThankYouBlock, } = forceCampaign || {};
3275
3373
  const { textBlocks, listBlockAdded, actionBlocks } = extra_fields || {};
3276
3374
  const { submitBlock } = actionBlocks || {};
3277
- const { apiLeadUrl, subscriptionIcon, subscriptionTitle, subscriptionPhoneType, submitSubscriptionBox, onFinish, impression, } = useLeadGenContext();
3375
+ const { apiLeadUrl, subscriptionIcon, subscriptionTitle, subscriptionPhoneType, submitSubscriptionBox, onFinish, impressionSubscriptionBox, } = useLeadGenContext();
3278
3376
  const { t } = useTranslations();
3279
3377
  const { action: { pushNotifications }, } = useContext(TogetherComponentGlobalContext);
3280
3378
  const [loading, setLoading] = useState(false);
@@ -3334,7 +3432,7 @@ const LeadGenSubscriptionBoxWithoutMemo = ({ locale, userInfo, forceCampaign, ca
3334
3432
  const reqValues = Object.assign(Object.assign({}, newValues), ssoValues);
3335
3433
  const [res] = yield Promise.all([
3336
3434
  submitSubscriptionBox(reqValues),
3337
- impression('submit_form'),
3435
+ impressionSubscriptionBox('submit_form'),
3338
3436
  ]);
3339
3437
  const { _data } = res || {};
3340
3438
  const { model } = _data || {};
@@ -3380,7 +3478,7 @@ const LeadGenSubscriptionBoxWithoutMemo = ({ locale, userInfo, forceCampaign, ca
3380
3478
  userInfo === null || userInfo === void 0 ? void 0 : userInfo.uid,
3381
3479
  userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone,
3382
3480
  ]);
3383
- return (React__default.createElement(ImpressionTrackingWrapper, { dependency: categoryId, onImpression: () => impression('impression') },
3481
+ return (React__default.createElement(ImpressionTrackingWrapper, { dependency: categoryId, onImpression: () => impressionSubscriptionBox('impression') },
3384
3482
  React__default.createElement(StyledLeadGenSubscriptionBox, { "data-phone-type": subscriptionPhoneType, "data-type": "subscription_box_A" },
3385
3483
  showThankyou && (React__default.createElement(LeadGenThankYou, { image: Object.assign(Object.assign({}, thankyouImage), { src: thankyouImage.src || `${apiLeadUrl}admin/img/thanksyou.png` }), title: thankyouTitle, description: thankyouDescription, button: thankyouButton })),
3386
3484
  !showThankyou && (React__default.createElement(LeadGenSubscriptionBoxA, { loading: loading, image: subscriptionIcon || image, title: subscription_title, submitText: (_c = submitBlock === null || submitBlock === void 0 ? void 0 : submitBlock.data) === null || _c === void 0 ? void 0 : _c.value, blocks: listBlockAdded, locale: locale, form: form, rules: validateObj, onFinish: middlewareOnSubmit })))));
@@ -4115,7 +4213,7 @@ const ThankyouPopup = ({ title, titleAlign, subtitle, subtitleAlign, link, linkN
4115
4213
  React__default.createElement(Button, { className: `lead-modal__btn ${LEAD_CLASS}`, color: primaryColor }, linkText)))))));
4116
4214
  };
4117
4215
 
4118
- const InlineLayout = ({ content, inlinePosition, doImpression, }) => {
4216
+ const InlineLayout = ({ flatComponent, content, inlinePosition, doImpression, }) => {
4119
4217
  const target = useMemo(() => {
4120
4218
  if (!inlinePosition)
4121
4219
  return null;
@@ -4220,6 +4318,9 @@ const InlineLayout = ({ content, inlinePosition, doImpression, }) => {
4220
4318
  }
4221
4319
  }
4222
4320
  }, [inlinePosition]);
4321
+ if (!!flatComponent) {
4322
+ return (React__default.createElement(ImpressionTrackingWrapper, { onImpression: () => __awaiter(void 0, void 0, void 0, function* () { return yield doImpression(); }) }, content));
4323
+ }
4223
4324
  if (!inlinePosition || !target)
4224
4325
  return null;
4225
4326
  return createPortal(React__default.createElement(ImpressionTrackingWrapper, { onImpression: () => __awaiter(void 0, void 0, void 0, function* () { return yield doImpression(); }) }, content), target);
@@ -4715,15 +4816,14 @@ const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmi
4715
4816
  const _d = form.getInputProps(`TNC-${id}`), { error } = _d, tncInputProps = __rest(_d, ["error"]);
4716
4817
  return (React__default.createElement(ChoiceField, { className: "leadgen-form_checkbox", key: id },
4717
4818
  React__default.createElement(Input$1.Wrapper, { error: error },
4718
- React__default.createElement(Checkbox, Object.assign({ name: 'TNC-' + id, label: React__default.createElement(Text, { as: "span", size: "c1", variant: "secondary", dangerouslySetInnerHTML: { __html: data.valueHTML }, styles: (theme) => ({
4819
+ React__default.createElement(Checkbox, Object.assign({ name: 'TNC-' + id, label: React__default.createElement(Text, { as: "span", size: "c1", variant: "secondary", dangerouslySetInnerHTML: { __html: data.valueHTML }, styles: {
4719
4820
  root: {
4720
4821
  a: {
4721
- textDecoration: 'underline !important',
4822
+ textDecoration: 'underline',
4722
4823
  textUnderlineOffset: '3px',
4723
- color: `${theme.colors.gray[7]} !important`,
4724
4824
  },
4725
4825
  },
4726
- }) }), className: "tnc-block", "data-control": "checkbox", "data-lead-control": name, "data-is-required": required }, tncInputProps)))));
4826
+ } }), className: "tnc-block", "data-control": "checkbox", "data-lead-control": name, "data-is-required": required }, tncInputProps)))));
4727
4827
  }
4728
4828
  return null;
4729
4829
  })));
@@ -4976,7 +5076,7 @@ const LEADGEN_SHOW_HEADER = [
4976
5076
  ];
4977
5077
  // const CAMPAGE_CODE_LIST_APPLY_NEW_UI = ['ri3lkoxcetjoj39', 'u0adw7hw8kw7t89']
4978
5078
  const CAMPAGE_CODE_LIST_APPLY_NEW_UI = ['ri3lkoxcetjoj39'];
4979
- const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSubmit, imageMobile, imageDesktop, imageOverlayMobile, imageOverlayDesktop, imageBackground, currentLayout, title, onSubmit, onUnmount, doImpression, showThankyou, campaignId, campaignCode, campaign_subot_id, locale, showEmpty, setShowEmpty, userInfo, action, }) => {
5079
+ const LightboxLayout = ({ flatComponent, popupId, extraFields, onClose: onCloseProp, onOtherSubmit, imageMobile, imageDesktop, imageOverlayMobile, imageOverlayDesktop, imageBackground, currentLayout, title, onSubmit, onUnmount, doImpression, showThankyou, campaignId, campaignCode, campaign_subot_id, locale, showEmpty, setShowEmpty, userInfo, action, }) => {
4980
5080
  var _a, _b;
4981
5081
  const { primaryColor } = useContext(LeadGenContext$1);
4982
5082
  const { isMobile } = useScreenSize();
@@ -5376,7 +5476,7 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
5376
5476
  return React__default.createElement(SideBarLayout, { content: PopupContainer });
5377
5477
  }
5378
5478
  else if (isInline) {
5379
- return (React__default.createElement(InlineLayout, { action: action, content: PopupContainer, campaignCode: campaignCode, inlinePosition: extraFields.popupInlinePosition, doImpression: handleDoImpression }));
5479
+ return (React__default.createElement(InlineLayout, { flatComponent: flatComponent, action: action, content: PopupContainer, campaignCode: campaignCode, inlinePosition: extraFields.popupInlinePosition, doImpression: handleDoImpression }));
5380
5480
  }
5381
5481
  return null;
5382
5482
  };
@@ -5469,7 +5569,7 @@ function getCategoryLevel(t = 'Xin chao {{category_2}} extra') {
5469
5569
  return null;
5470
5570
  }
5471
5571
  }
5472
- const NewLeadPopup = ({ campaign, action, onSubmit, onClose, onUnmount, doImpression, showThankyou, locale, showEmpty, setShowEmpty, userInfo, }) => {
5572
+ const NewLeadPopup = ({ flatComponent, campaign, action, onSubmit, onClose, onUnmount, doImpression, showThankyou, locale, showEmpty, setShowEmpty, userInfo, }) => {
5473
5573
  var _a, _b;
5474
5574
  const { apiUrl, siteDomain } = useContext(LeadGenContext$1);
5475
5575
  const { extra_fields, image, image_desktop, code, image_background, image_overlay_mobile, image_overlay_desktop, } = campaign || {};
@@ -5572,7 +5672,7 @@ const NewLeadPopup = ({ campaign, action, onSubmit, onClose, onUnmount, doImpres
5572
5672
  currentLayout == 'Fullscreen' ||
5573
5673
  currentLayout == 'Sidebar' ||
5574
5674
  currentLayout == 'Slider') {
5575
- return (React__default.createElement(LightboxLayout, { popupId: popupIdRef.current, extraFields: extra_fields, onClose: onClose, onOtherSubmit: onOtherSubmit, onUnmount: onUnmount, doImpression: doImpression, imageMobile: image, imageDesktop: image_desktop, imageBackground: image_background, currentLayout: currentLayout, title: titleText, onSubmit: (params) => onSubmit(params, categoryLevel, categoryData), key: currentLayout, imageOverlayDesktop: image_overlay_desktop, imageOverlayMobile: image_overlay_mobile, showThankyou: showThankyou, campaignId: campaign.id, campaignCode: campaign.code, campaign_subot_id: campaign.bot_id || [], locale: locale, showEmpty: showEmpty, setShowEmpty: setShowEmpty, userInfo: userInfo, action: action }));
5675
+ return (React__default.createElement(LightboxLayout, { flatComponent: flatComponent, popupId: popupIdRef.current, extraFields: extra_fields, onClose: onClose, onOtherSubmit: onOtherSubmit, onUnmount: onUnmount, doImpression: doImpression, imageMobile: image, imageDesktop: image_desktop, imageBackground: image_background, currentLayout: currentLayout, title: titleText, onSubmit: (params) => onSubmit(params, categoryLevel, categoryData), key: currentLayout, imageOverlayDesktop: image_overlay_desktop, imageOverlayMobile: image_overlay_mobile, showThankyou: showThankyou, campaignId: campaign.id, campaignCode: campaign.code, campaign_subot_id: campaign.bot_id || [], locale: locale, showEmpty: showEmpty, setShowEmpty: setShowEmpty, userInfo: userInfo, action: action }));
5576
5676
  }
5577
5677
  else if (currentLayout.includes('Skin')) {
5578
5678
  return (React__default.createElement(SkinLayout, { popupId: popupIdRef.current, link: actionBlocks.linkButtonBlock.data.url, linkNewTab: !!actionBlocks.linkButtonBlock.data.newtab, linkText: actionBlocks.linkButtonBlock.data.value, onClose: onClose, onOtherSubmit: onOtherSubmit, imageMobile: image, imageDesktop: image_desktop, currentLayout: currentLayout }));
@@ -5664,7 +5764,7 @@ const formatTrackingData = (params) => {
5664
5764
  };
5665
5765
 
5666
5766
  // mount css
5667
- const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor, apiSubotUrl, DEBUG_URL, forceCampaign, children, extraPayloadValues = [], excludeExitRulesHandler, userInfo, onClose: onCloseProps, onSubmit: onSubmitProps, }) => {
5767
+ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor, apiSubotUrl, DEBUG_URL, forceCampaign, children, extraPayloadValues = [], excludeExitRulesHandler, userInfo, onClose: onCloseProps, onSubmit: onSubmitProps, flatComponent, }) => {
5668
5768
  var _a, _b;
5669
5769
  const theme = useMantineTheme();
5670
5770
  console.log({ theme });
@@ -6006,7 +6106,7 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor
6006
6106
  !!currentLayout &&
6007
6107
  !currentLayout.includes('Inline') &&
6008
6108
  !currentLayout.includes('Sidebar') && (React__default.createElement(Overlay, { color: "#000", opacity: 0.6, center: true, zIndex: 400, pos: 'fixed', onClick: () => onClose() })),
6009
- React__default.createElement(NewLeadPopup, { campaign: showCampaign, action: action, onSubmit: onSubmit, onClose: onClose, onUnmount: onUnmount, doImpression: doImpression, showThankyou: showThankyou, locale: locale, showEmpty: showEmpty, setShowEmpty: setShowEmpty, userInfo: userInfo })))));
6109
+ React__default.createElement(NewLeadPopup, { flatComponent: flatComponent, campaign: showCampaign, action: action, onSubmit: onSubmit, onClose: onClose, onUnmount: onUnmount, doImpression: doImpression, showThankyou: showThankyou, locale: locale, showEmpty: showEmpty, setShowEmpty: setShowEmpty, userInfo: userInfo })))));
6010
6110
  }))))))));
6011
6111
  };
6012
6112
  const LeadGen = _LeadGen;
@@ -6017,4 +6117,4 @@ LeadGen.Thankyou = Thankyou;
6017
6117
  LeadGen.OtpForm = OtpBlock$1;
6018
6118
  LeadGen.Close = Close;
6019
6119
 
6020
- export { LeadGen, LeadGenSubscriptionBox };
6120
+ export { LeadGen, LeadGenInline, LeadGenSubscriptionBox, leadGenInlineGetCampaign };