@hhgtech/hhg-components 1.29.417-beta-3 → 1.29.417

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 (525) hide show
  1. package/build/{InputDate-a1ff6b6c.js → InputDate-860085e2.js} +20 -14
  2. package/build/{LastPeriod-95b19fbf.js → LastPeriod-7f6836ea.js} +1 -1
  3. package/build/{MobileBottomNavigationIcon-b2e8f671.js → MobileBottomNavigationIcon-b78060f8.js} +3 -3
  4. package/build/{Spinner-b3ae745a.js → Spinner-064d7887.js} +1 -1
  5. package/build/{WhatsApp-102f7e40.js → WhatsApp-ef2612f0.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/mantine/theme/input.d.ts +6 -7
  14. package/build/components/mantine/theme/text.d.ts +0 -51
  15. package/build/components.js +98 -98
  16. package/build/{constants-b3592f78.js → constants-918e7382.js} +1 -1
  17. package/build/constants.js +3 -3
  18. package/build/constantsDomainLocales.js +1 -1
  19. package/build/constantsRiskScreener.js +2 -2
  20. package/build/constantsSite.js +2 -2
  21. package/build/{core-9ffee9ea.js → core-9c6dc08d.js} +1 -1
  22. package/build/{dataTransform-eee363f6.js → dataTransform-083ecf10.js} +1 -1
  23. package/build/ecom.js +4 -4
  24. package/build/{editor-facacd44.js → editor-e3026e06.js} +11 -11
  25. package/build/embeddedHeathToolCards_babyGrowth.js +24 -24
  26. package/build/embeddedHeathToolCards_babyPoop.js +20 -20
  27. package/build/embeddedHeathToolCards_babyVaccine.js +23 -23
  28. package/build/embeddedHeathToolCards_bmi_bmi.js +26 -26
  29. package/build/embeddedHeathToolCards_bmrBmr.js +26 -26
  30. package/build/embeddedHeathToolCards_dueDate_dueDate.js +23 -23
  31. package/build/embeddedHeathToolCards_ovulation_ovulation.js +23 -23
  32. package/build/embeddedHeathToolCards_pwg_pwg.js +27 -27
  33. package/build/embeddedHeathToolCards_targetHeartRate.js +28 -28
  34. package/build/esm/{InputDate-0c5bd1af.js → InputDate-c6943232.js} +20 -14
  35. package/build/esm/{LastPeriod-e85ac14b.js → LastPeriod-553656af.js} +1 -1
  36. package/build/esm/{MobileBottomNavigationIcon-60ee2dcd.js → MobileBottomNavigationIcon-a3b0ac1a.js} +3 -3
  37. package/build/esm/{Spinner-19ca61e1.js → Spinner-cf3eef38.js} +1 -1
  38. package/build/esm/{WhatsApp-87bf8c1e.js → WhatsApp-0aa38272.js} +1 -1
  39. package/build/esm/adapters.js +20 -20
  40. package/build/esm/atoms.js +49 -49
  41. package/build/esm/babyGrowth.js +84 -84
  42. package/build/esm/cache.js +2 -2
  43. package/build/esm/care.js +17 -17
  44. package/build/esm/careBookingSearchBar.js +14 -14
  45. package/build/esm/careBookingSearchBarV2.js +15 -15
  46. package/build/esm/components/mantine/theme/input.d.ts +6 -7
  47. package/build/esm/components/mantine/theme/text.d.ts +0 -51
  48. package/build/esm/components.js +98 -98
  49. package/build/esm/{constants-0a82c2f7.js → constants-e746bea8.js} +1 -1
  50. package/build/esm/constants.js +3 -3
  51. package/build/esm/constantsDomainLocales.js +1 -1
  52. package/build/esm/constantsRiskScreener.js +2 -2
  53. package/build/esm/constantsSite.js +2 -2
  54. package/build/esm/{core-1c77485d.js → core-f0baba3f.js} +1 -1
  55. package/build/esm/{dataTransform-51a72b79.js → dataTransform-7263d90c.js} +1 -1
  56. package/build/esm/ecom.js +4 -4
  57. package/build/esm/{editor-1fd39c5f.js → editor-0a5d4ad8.js} +11 -11
  58. package/build/esm/embeddedHeathToolCards_babyGrowth.js +24 -24
  59. package/build/esm/embeddedHeathToolCards_babyPoop.js +20 -20
  60. package/build/esm/embeddedHeathToolCards_babyVaccine.js +23 -23
  61. package/build/esm/embeddedHeathToolCards_bmi_bmi.js +26 -26
  62. package/build/esm/embeddedHeathToolCards_bmrBmr.js +26 -26
  63. package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +23 -23
  64. package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +23 -23
  65. package/build/esm/embeddedHeathToolCards_pwg_pwg.js +27 -27
  66. package/build/esm/embeddedHeathToolCards_targetHeartRate.js +28 -28
  67. package/build/esm/footer.js +22 -22
  68. package/build/esm/gAssets.js +2 -2
  69. package/build/esm/{healthTools-9612877a.js → healthTools-d7818aab.js} +1 -1
  70. package/build/esm/healthToolsCardWrapper.js +19 -19
  71. package/build/esm/healthToolsForm.js +34 -34
  72. package/build/esm/hooks.js +13 -13
  73. package/build/esm/i18n.js +2 -2
  74. package/build/esm/i18nV2.js +2 -2
  75. package/build/esm/{index-53c3f6af.js → index-03420728.js} +6 -6
  76. package/build/esm/{index-f52737d8.js → index-0a488271.js} +17 -17
  77. package/build/esm/{index-1ff0f082.js → index-0b9544ce.js} +15 -15
  78. package/build/esm/{index-9c953e50.js → index-105374ed.js} +17 -17
  79. package/build/esm/{index-acd0f608.js → index-12af6e65.js} +3 -3
  80. package/build/esm/{index-9c0bea69.js → index-1af6a755.js} +4 -4
  81. package/build/esm/{index-bddcc6de.js → index-1eecf741.js} +13 -13
  82. package/build/esm/{index-04b5675c.js → index-2b0ae101.js} +15 -15
  83. package/build/esm/{index-a3f588c6.js → index-2e0bd0e8.js} +7 -7
  84. package/build/esm/{index-713a7862.js → index-3017681c.js} +1 -1
  85. package/build/esm/{index-90da5c58.js → index-3067c112.js} +3 -3
  86. package/build/esm/{index-3ad1fd61.js → index-30f799b6.js} +3 -3
  87. package/build/esm/{index-14b1ab9b.js → index-32c466ec.js} +15 -9
  88. package/build/esm/{index-d9fd39cf.js → index-335d9430.js} +2 -2
  89. package/build/esm/{index-9b19db5d.js → index-4210a277.js} +5 -5
  90. package/build/esm/{index-9bffe3b9.js → index-445da069.js} +1 -1
  91. package/build/esm/{index-2e388f54.js → index-4dae0bf7.js} +2 -2
  92. package/build/esm/{index-00bead35.js → index-5bdd1777.js} +24 -24
  93. package/build/esm/{index-657f19f9.js → index-5e2002e6.js} +3 -3
  94. package/build/esm/{index-4759f5b3.js → index-689b89e9.js} +30 -30
  95. package/build/esm/{index-f0ffb722.js → index-6d801ccc.js} +2 -2
  96. package/build/esm/{index-a2fd7fb1.js → index-74d772bb.js} +2 -2
  97. package/build/esm/{index-b6233057.js → index-76c6f413.js} +4 -4
  98. package/build/esm/{index-ad47616b.js → index-7a2d9628.js} +2 -2
  99. package/build/esm/{index-d9cdb8d8.js → index-7bb7b0ab.js} +2 -2
  100. package/build/esm/{index-fd90d033.js → index-7f07997b.js} +7 -7
  101. package/build/esm/{index-dfb60c5c.js → index-82f28c8a.js} +22 -22
  102. package/build/esm/{index-bdccd9b9.js → index-83666d2b.js} +17 -17
  103. package/build/esm/{index-f906bcfe.js → index-85ee209d.js} +32 -32
  104. package/build/esm/{index-b28575d7.js → index-86dba4d0.js} +6 -6
  105. package/build/esm/{index-7bfdbad3.js → index-87fc8947.js} +3 -3
  106. package/build/esm/{index-2ed9aef6.js → index-894a2bdc.js} +2 -2
  107. package/build/esm/{index-15f07bbc.js → index-8b97a08b.js} +2 -2
  108. package/build/esm/{index-07da3b18.js → index-8d4eb39a.js} +3 -3
  109. package/build/esm/{index-6ad72824.js → index-8deaa637.js} +13 -13
  110. package/build/esm/{index-3bf7a39d.js → index-90ec1324.js} +2 -2
  111. package/build/esm/{index-cf7ce781.js → index-9463eee4.js} +11 -11
  112. package/build/esm/{index-a08805ba.js → index-973fdd43.js} +1 -1
  113. package/build/esm/{index-31d4f531.js → index-99bb09af.js} +1 -1
  114. package/build/esm/{index-05fe8ca8.js → index-a0e81ada.js} +2 -2
  115. package/build/esm/{index-29bb91a4.js → index-a14bfdf0.js} +16 -16
  116. package/build/esm/{index-2679ee67.js → index-a427d65f.js} +2 -2
  117. package/build/esm/{index-eee1f458.js → index-a5c795a1.js} +2 -2
  118. package/build/esm/{index-84791872.js → index-a90ef289.js} +41 -21
  119. package/build/esm/{index-1b7cf829.js → index-aa5ca5b5.js} +32 -32
  120. package/build/esm/{index-a5211346.js → index-aeceb78e.js} +6 -6
  121. package/build/esm/{index-3e0f3bbe.js → index-b8828dea.js} +3 -3
  122. package/build/esm/{index-3618d717.js → index-b9dc63ec.js} +3 -3
  123. package/build/esm/{index-b360e783.js → index-baf1b7a5.js} +15 -15
  124. package/build/esm/{index-84e45115.js → index-bd1ec2b0.js} +5 -5
  125. package/build/esm/{index-04ec8419.js → index-c0d900a8.js} +2 -2
  126. package/build/esm/{index-921b5234.js → index-c63fce4c.js} +17 -17
  127. package/build/esm/{index-04c536cf.js → index-c6835427.js} +1 -1
  128. package/build/esm/{index-330e17bb.js → index-c8fa27f2.js} +13 -13
  129. package/build/esm/{index-e5f55c24.js → index-cb181cba.js} +16 -16
  130. package/build/esm/{index-6233a750.js → index-d1bf3e47.js} +2 -2
  131. package/build/esm/{index-dcbaf230.js → index-df6d1283.js} +10 -10
  132. package/build/esm/{index-bf0df733.js → index-ea472f22.js} +27 -18
  133. package/build/esm/{index-4a0ff7cb.js → index-eee9d14d.js} +2 -2
  134. package/build/esm/{index-0e4f52e3.js → index-ef717367.js} +1 -1
  135. package/build/esm/{index-3f6896d1.js → index-f141030c.js} +25 -25
  136. package/build/esm/{index-86f5dbdc.js → index-f1684864.js} +1 -1
  137. package/build/esm/{index-39d4c82d.js → index-f6f2c102.js} +13 -13
  138. package/build/esm/{index-181f4d4f.js → index-f764092b.js} +13 -13
  139. package/build/esm/{index-4590e3a3.js → index-f82c90ec.js} +6 -6
  140. package/build/esm/{index-623fedbe.js → index-fa5da20e.js} +1 -1
  141. package/build/esm/{index-deab884c.js → index-fe8e86e3.js} +13 -13
  142. package/build/esm/{index-d8d124b4.js → index-feb841f4.js} +6 -6
  143. package/build/esm/index.js +119 -119
  144. package/build/esm/{labelSorting-9cd36b08.js → labelSorting-1aed75c7.js} +4 -4
  145. package/build/esm/lead/LeadGen.helpers.d.ts +2 -2
  146. package/build/esm/lead/LeadGen.type.d.ts +3 -4
  147. package/build/esm/lead/LeadGenSubscriptionBox/LeadGenContext.d.ts +15 -21
  148. package/build/esm/lead/LeadGenSubscriptionBox/LeadGenSubscriptionBoxContainer.d.ts +3 -1
  149. package/build/esm/lead/index.d.ts +1 -5
  150. package/build/esm/lead/layouts/inline.d.ts +2 -3
  151. package/build/esm/lead/layouts/lightbox/fields/textField/index.d.ts +1 -2
  152. package/build/esm/lead/layouts/lightbox/index.d.ts +1 -2
  153. package/build/esm/lead/newLeadPopup.d.ts +1 -2
  154. package/build/esm/lead/services/index.d.ts +1 -5
  155. package/build/esm/lead/utils.d.ts +0 -18
  156. package/build/esm/lead.css +1 -1
  157. package/build/esm/lead.js +406 -525
  158. package/build/esm/{logoIcon-129b1be6.js → logoIcon-e30f9df0.js} +2 -2
  159. package/build/esm/mantine.js +26 -26
  160. package/build/esm/misc.js +18 -18
  161. package/build/esm/miscGetDynamicHealthTool.js +4 -4
  162. package/build/esm/miscGetSocialList.js +8 -8
  163. package/build/esm/miscScreenSizeContext.js +1 -1
  164. package/build/esm/mobileBottomNavigation.js +5 -5
  165. package/build/esm/mobileBottomNavigationIcon.js +5 -5
  166. package/build/esm/molecules.js +75 -75
  167. package/build/esm/moleculesArticleCard.js +6 -6
  168. package/build/esm/moleculesArticleCardV2.js +17 -17
  169. package/build/esm/navigation.js +47 -47
  170. package/build/esm/navigationLogoutPopup.js +11 -11
  171. package/build/esm/navigationProfileButton.js +27 -27
  172. package/build/esm/onboardingV2.js +30 -30
  173. package/build/esm/organisms.js +51 -51
  174. package/build/esm/{post-0a4ad955.js → post-a9a122e7.js} +2 -2
  175. package/build/esm/profileNavigation.js +20 -20
  176. package/build/esm/progressBar.js +1 -1
  177. package/build/esm/pwg.js +23 -23
  178. package/build/esm/ssoV2/api/featureFlag.d.ts +1 -2
  179. package/build/esm/ssoV2.js +41 -53
  180. package/build/esm/{store-8e428741.js → store-4444fd12.js} +3 -3
  181. package/build/esm/subot.js +37 -37
  182. package/build/esm/surveyOrPremiumBanner.js +34 -34
  183. package/build/esm/surveyQuestionCard.js +11 -11
  184. package/build/esm/{surveyThankyouCard-3b4c645c.js → surveyThankyouCard-2a147794.js} +5 -5
  185. package/build/esm/{text-c55b6aee.js → text-55617bb4.js} +10 -60
  186. package/build/esm/together.js +57 -57
  187. package/build/esm/togetherApiUtils.js +4 -4
  188. package/build/esm/togetherAtoms.js +31 -31
  189. package/build/esm/togetherComponentGlobalContext.js +4 -4
  190. package/build/esm/togetherMolecules.js +52 -52
  191. package/build/esm/togetherMoleculesCardAuthor.js +29 -29
  192. package/build/esm/togetherMoleculesPostImagePreview.js +11 -11
  193. package/build/esm/togetherMoleculesProfileDetail.js +40 -40
  194. package/build/esm/togetherOrganisms.js +51 -51
  195. package/build/esm/togetherRichTextEditor.js +18 -18
  196. package/build/esm/togetherShareBox.js +10 -10
  197. package/build/esm/{translationsProvider-0b00a188.js → translationsProvider-e65888b4.js} +1 -1
  198. package/build/esm/{treePopoverMenu-6fe03102.js → treePopoverMenu-ce056691.js} +19 -19
  199. package/build/esm/{types-561a3bc2.js → types-c46fe736.js} +2 -2
  200. package/build/esm/types.js +2 -2
  201. package/build/esm/{useCategory-89289ca5.js → useCategory-9dd41f60.js} +5 -5
  202. package/build/esm/{useHealthToolCache-13a49080.js → useHealthToolCache-0f9764d6.js} +1 -1
  203. package/build/esm/{usePlacesAutocomplete-679b3df2.js → usePlacesAutocomplete-ddef7ee5.js} +2 -2
  204. package/build/esm/useTogetherAuthRequiredAction.js +10 -10
  205. package/build/esm/{utils-ccc6239f.js → utils-2f5f0158.js} +2 -2
  206. package/build/esm/{utils-7be7b1de.js → utils-487c0653.js} +5 -5
  207. package/build/esm/{utils-4ff2c435.js → utils-6a4cbb99.js} +3 -3
  208. package/build/esm/{utils-aadd1fc5.js → utils-aadfa81c.js} +2 -2
  209. package/build/esm/vaccination.js +22 -22
  210. package/build/footer.js +22 -22
  211. package/build/gAssets.js +2 -2
  212. package/build/{healthTools-3c6dfa3a.js → healthTools-75fbc03c.js} +1 -1
  213. package/build/healthToolsCardWrapper.js +19 -19
  214. package/build/healthToolsForm.js +34 -34
  215. package/build/hooks.js +13 -13
  216. package/build/i18n.js +2 -2
  217. package/build/i18nV2.js +1 -1
  218. package/build/{index-57686af6.js → index-035c919f.js} +24 -24
  219. package/build/{index-10d14d9c.js → index-12a87524.js} +22 -22
  220. package/build/{index-867b0d1b.js → index-1421020e.js} +2 -2
  221. package/build/{index-f6aad5d0.js → index-1a7fa305.js} +3 -3
  222. package/build/{index-0d1acdf3.js → index-1e01216a.js} +32 -32
  223. package/build/{index-03566b36.js → index-1e132da3.js} +4 -4
  224. package/build/{index-72a2fce1.js → index-1ed83894.js} +1 -1
  225. package/build/{index-b5353d86.js → index-2493aad6.js} +16 -16
  226. package/build/{index-44e7918e.js → index-2594ec39.js} +6 -6
  227. package/build/{index-c2f05584.js → index-259ca1c8.js} +2 -2
  228. package/build/{index-d83b4150.js → index-287b02d9.js} +3 -3
  229. package/build/{index-bc87fcd6.js → index-32b4734b.js} +15 -9
  230. package/build/{index-7f24b37d.js → index-359cb049.js} +3 -3
  231. package/build/{index-8372a002.js → index-38fbd2be.js} +13 -13
  232. package/build/{index-21504c0c.js → index-3a35c0e9.js} +3 -3
  233. package/build/{index-e955c9bc.js → index-3f1411c6.js} +2 -2
  234. package/build/{index-ac27baa5.js → index-3f787da3.js} +1 -1
  235. package/build/{index-c295f404.js → index-42018b4e.js} +13 -13
  236. package/build/{index-42b9995e.js → index-42de05a9.js} +2 -2
  237. package/build/{index-a1755e13.js → index-490706a3.js} +16 -16
  238. package/build/{index-70ff4d69.js → index-4f5231ab.js} +3 -3
  239. package/build/{index-15be2265.js → index-512a081a.js} +1 -1
  240. package/build/{index-dcfdf38b.js → index-5d14881e.js} +7 -7
  241. package/build/{index-c9a626cf.js → index-6298ffae.js} +13 -13
  242. package/build/{index-35867122.js → index-6891ba5a.js} +17 -17
  243. package/build/{index-16e4130f.js → index-6d0a8f85.js} +7 -7
  244. package/build/{index-e96f37dd.js → index-72d0052e.js} +13 -13
  245. package/build/{index-942d7e55.js → index-7ad5ed5a.js} +2 -2
  246. package/build/{index-770a90c0.js → index-7f764976.js} +17 -17
  247. package/build/{index-cce655e5.js → index-81b0641b.js} +2 -2
  248. package/build/{index-ca6becfa.js → index-830968ca.js} +11 -11
  249. package/build/{index-5619d844.js → index-85c355b8.js} +17 -17
  250. package/build/{index-22b84aac.js → index-89f2ce47.js} +3 -3
  251. package/build/{index-6a0571d9.js → index-8f725ac2.js} +1 -1
  252. package/build/{index-0316b298.js → index-8fa166c4.js} +2 -2
  253. package/build/{index-424937a8.js → index-90335c2e.js} +41 -21
  254. package/build/{index-53217e00.js → index-95f37fed.js} +15 -15
  255. package/build/{index-a854eee5.js → index-969847e3.js} +3 -3
  256. package/build/{index-9beb0e50.js → index-97a427b9.js} +4 -4
  257. package/build/{index-f6463c04.js → index-9a257e60.js} +6 -6
  258. package/build/{index-4eb7ea1c.js → index-9cdc8a41.js} +2 -2
  259. package/build/{index-80a9232f.js → index-9eaa15d5.js} +10 -10
  260. package/build/{index-18d2feae.js → index-a234c228.js} +1 -1
  261. package/build/{index-a754338d.js → index-a4cd3f3a.js} +2 -2
  262. package/build/{index-ae319563.js → index-a7ff8e37.js} +2 -2
  263. package/build/{index-7af546d6.js → index-a885b9a3.js} +13 -13
  264. package/build/{index-10933d5d.js → index-b223e7de.js} +1 -1
  265. package/build/{index-3cb6422a.js → index-b52bba0a.js} +6 -6
  266. package/build/{index-23078faa.js → index-b6630b4f.js} +30 -30
  267. package/build/{index-5def441d.js → index-b7ef4cc2.js} +5 -5
  268. package/build/{index-c28a3938.js → index-ba9cd1ca.js} +25 -25
  269. package/build/{index-4050b64c.js → index-bb69232c.js} +15 -15
  270. package/build/{index-48a95722.js → index-bc34ab3c.js} +2 -2
  271. package/build/{index-c69ebe91.js → index-bf3fd014.js} +5 -5
  272. package/build/{index-b95af80c.js → index-c04c9aca.js} +2 -2
  273. package/build/{index-805fd455.js → index-c3a942ae.js} +15 -15
  274. package/build/{index-4f05cf73.js → index-d0d6dd15.js} +32 -32
  275. package/build/{index-9172bce8.js → index-d778b9e9.js} +2 -2
  276. package/build/{index-5d01177b.js → index-d9a882a5.js} +6 -6
  277. package/build/{index-78381a12.js → index-dc9684f8.js} +17 -17
  278. package/build/{index-b0f7b058.js → index-e33474fc.js} +6 -6
  279. package/build/{index-3cdac865.js → index-e8833c6f.js} +1 -1
  280. package/build/{index-2ff39b7b.js → index-ec936b1f.js} +27 -18
  281. package/build/{index-b1464037.js → index-edce8d6e.js} +3 -3
  282. package/build/{index-79ce6ed4.js → index-efdee7e0.js} +2 -2
  283. package/build/{index-bfe94c0e.js → index-f5dfaf06.js} +13 -13
  284. package/build/{index-5001f706.js → index-f7e7cdf6.js} +1 -1
  285. package/build/{index-0e14d7b6.js → index-f8b76b96.js} +2 -2
  286. package/build/index.js +119 -119
  287. package/build/{labelSorting-79347621.js → labelSorting-9604d205.js} +4 -4
  288. package/build/lead/LeadGen.helpers.d.ts +2 -2
  289. package/build/lead/LeadGen.type.d.ts +3 -4
  290. package/build/lead/LeadGenSubscriptionBox/LeadGenContext.d.ts +15 -21
  291. package/build/lead/LeadGenSubscriptionBox/LeadGenSubscriptionBoxContainer.d.ts +3 -1
  292. package/build/lead/index.d.ts +1 -5
  293. package/build/lead/layouts/inline.d.ts +2 -3
  294. package/build/lead/layouts/lightbox/fields/textField/index.d.ts +1 -2
  295. package/build/lead/layouts/lightbox/index.d.ts +1 -2
  296. package/build/lead/newLeadPopup.d.ts +1 -2
  297. package/build/lead/services/index.d.ts +1 -5
  298. package/build/lead/utils.d.ts +0 -18
  299. package/build/lead.css +1 -1
  300. package/build/lead.js +403 -524
  301. package/build/{logoIcon-596871d4.js → logoIcon-62493c3e.js} +2 -2
  302. package/build/mantine.js +24 -24
  303. package/build/misc.js +18 -18
  304. package/build/miscGetDynamicHealthTool.js +4 -4
  305. package/build/miscGetSocialList.js +8 -8
  306. package/build/miscScreenSizeContext.js +1 -1
  307. package/build/mobileBottomNavigation.js +5 -5
  308. package/build/mobileBottomNavigationIcon.js +5 -5
  309. package/build/molecules.js +75 -75
  310. package/build/moleculesArticleCard.js +6 -6
  311. package/build/moleculesArticleCardV2.js +17 -17
  312. package/build/navigation.js +47 -47
  313. package/build/navigationLogoutPopup.js +11 -11
  314. package/build/navigationProfileButton.js +27 -27
  315. package/build/onboardingV2.js +29 -29
  316. package/build/organisms.js +51 -51
  317. package/build/{post-521b3b77.js → post-95d2385c.js} +2 -2
  318. package/build/profileNavigation.js +20 -20
  319. package/build/progressBar.js +1 -1
  320. package/build/pwg.js +23 -23
  321. package/build/ssoV2/api/featureFlag.d.ts +1 -2
  322. package/build/ssoV2.js +39 -51
  323. package/build/{store-a077e5d6.js → store-01dd0c41.js} +3 -3
  324. package/build/subot.js +36 -36
  325. package/build/surveyOrPremiumBanner.js +34 -34
  326. package/build/surveyQuestionCard.js +11 -11
  327. package/build/{surveyThankyouCard-03b3af2e.js → surveyThankyouCard-5be8393b.js} +5 -5
  328. package/build/{text-f11838ac.js → text-2d269f79.js} +9 -60
  329. package/build/together.js +57 -57
  330. package/build/togetherApiUtils.js +4 -4
  331. package/build/togetherAtoms.js +31 -31
  332. package/build/togetherComponentGlobalContext.js +4 -4
  333. package/build/togetherMolecules.js +52 -52
  334. package/build/togetherMoleculesCardAuthor.js +29 -29
  335. package/build/togetherMoleculesPostImagePreview.js +11 -11
  336. package/build/togetherMoleculesProfileDetail.js +40 -40
  337. package/build/togetherOrganisms.js +51 -51
  338. package/build/togetherRichTextEditor.js +18 -18
  339. package/build/togetherShareBox.js +10 -10
  340. package/build/{translationsProvider-d9e28e05.js → translationsProvider-6faecca0.js} +1 -1
  341. package/build/{treePopoverMenu-04b47b33.js → treePopoverMenu-4db8a6e4.js} +19 -19
  342. package/build/{types-154f651d.js → types-2eb77d47.js} +2 -2
  343. package/build/types.js +2 -2
  344. package/build/{useCategory-e2c046b2.js → useCategory-6524c254.js} +5 -5
  345. package/build/{useHealthToolCache-059412f0.js → useHealthToolCache-6d09f7d7.js} +1 -1
  346. package/build/{usePlacesAutocomplete-20fbccc8.js → usePlacesAutocomplete-524152dc.js} +2 -2
  347. package/build/useTogetherAuthRequiredAction.js +10 -10
  348. package/build/{utils-953d0a7a.js → utils-185d0253.js} +3 -3
  349. package/build/{utils-ca2f7e58.js → utils-94885948.js} +5 -5
  350. package/build/{utils-c9f5e36f.js → utils-ea678be2.js} +2 -2
  351. package/build/{utils-73b5d6ae.js → utils-fdb9bbc3.js} +2 -2
  352. package/build/vaccination.js +22 -22
  353. package/package.json +1 -1
  354. package/build/components/atoms/icons/ErrorIcon.d.ts +0 -4
  355. package/build/components/mantine/styles.d.ts +0 -12
  356. package/build/esm/components/atoms/icons/ErrorIcon.d.ts +0 -4
  357. package/build/esm/components/mantine/styles.d.ts +0 -12
  358. package/build/esm/lead/LeadGenInline/LeadGenInline.d.ts +0 -8
  359. package/build/esm/lead/LeadGenInline/index.d.ts +0 -2
  360. package/build/esm/lead/services/index.type.d.ts +0 -5
  361. package/build/esm/misc/cachedSystem.d.ts +0 -5
  362. package/build/lead/LeadGenInline/LeadGenInline.d.ts +0 -8
  363. package/build/lead/LeadGenInline/index.d.ts +0 -2
  364. package/build/lead/services/index.type.d.ts +0 -5
  365. package/build/misc/cachedSystem.d.ts +0 -5
  366. /package/build/{BMI_BOYS.percentile.monthly-a395f805.js → BMI_BOYS.percentile.monthly-6cd85292.js} +0 -0
  367. /package/build/{BMI_BOYS.percentile.weekly-d3dd8c28.js → BMI_BOYS.percentile.weekly-24b3cfee.js} +0 -0
  368. /package/build/{BMI_BOYS.percentile.yearly-47eeeca6.js → BMI_BOYS.percentile.yearly-9afacd6a.js} +0 -0
  369. /package/build/{BMI_BOYS.zscore.monthly-462cfda7.js → BMI_BOYS.zscore.monthly-44a7ede7.js} +0 -0
  370. /package/build/{BMI_BOYS.zscore.weekly-a7887f70.js → BMI_BOYS.zscore.weekly-35da8dda.js} +0 -0
  371. /package/build/{BMI_BOYS.zscore.yearly-6f9c4949.js → BMI_BOYS.zscore.yearly-0ef69646.js} +0 -0
  372. /package/build/{BMI_GIRLS.percentile.monthly-a03da473.js → BMI_GIRLS.percentile.monthly-8600cce2.js} +0 -0
  373. /package/build/{BMI_GIRLS.percentile.weekly-5e7a6110.js → BMI_GIRLS.percentile.weekly-88b44cb7.js} +0 -0
  374. /package/build/{BMI_GIRLS.percentile.yearly-43a8a218.js → BMI_GIRLS.percentile.yearly-22a4846d.js} +0 -0
  375. /package/build/{BMI_GIRLS.zscore.monthly-90aba6f4.js → BMI_GIRLS.zscore.monthly-fb1bf424.js} +0 -0
  376. /package/build/{BMI_GIRLS.zscore.weekly-1d35b43f.js → BMI_GIRLS.zscore.weekly-52dc4c25.js} +0 -0
  377. /package/build/{BMI_GIRLS.zscore.yearly-b56a0308.js → BMI_GIRLS.zscore.yearly-231c4054.js} +0 -0
  378. /package/build/{ChevronDown-37a3cb3c.js → ChevronDown-2dfa26ff.js} +0 -0
  379. /package/build/{Close-b2b035c3.js → Close-4e480030.js} +0 -0
  380. /package/build/{Google-548f820e.js → Google-f55051be.js} +0 -0
  381. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-7387fc89.js → HEAD CIRCUM_BOYS.percentile.monthly-1494965f.js} +0 -0
  382. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-78ca2900.js → HEAD CIRCUM_BOYS.percentile.weekly-e0913ee2.js} +0 -0
  383. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-da1802c2.js → HEAD CIRCUM_BOYS.percentile.yearly-7c2b9787.js} +0 -0
  384. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-6c3caab7.js → HEAD CIRCUM_BOYS.zscore.monthly-b9c6fc8d.js} +0 -0
  385. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-c86b0e0e.js → HEAD CIRCUM_BOYS.zscore.weekly-b71f5ed2.js} +0 -0
  386. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-df5930bf.js → HEAD CIRCUM_BOYS.zscore.yearly-b2ebac1d.js} +0 -0
  387. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-e015cf0e.js → HEAD CIRCUM_GIRLS.percentile.monthly-21bb2b95.js} +0 -0
  388. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-33dfa032.js → HEAD CIRCUM_GIRLS.percentile.weekly-dcd6f7e6.js} +0 -0
  389. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-4f2918fb.js → HEAD CIRCUM_GIRLS.percentile.yearly-aa24e205.js} +0 -0
  390. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-915b1dbf.js → HEAD CIRCUM_GIRLS.zscore.monthly-1cd178f4.js} +0 -0
  391. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-1cf28f70.js → HEAD CIRCUM_GIRLS.zscore.weekly-7bc4fdc7.js} +0 -0
  392. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-b1e0f4a1.js → HEAD CIRCUM_GIRLS.zscore.yearly-51cfb94c.js} +0 -0
  393. /package/build/{HEIGHT_BOYS.percentile.monthly-fe261398.js → HEIGHT_BOYS.percentile.monthly-d70e2688.js} +0 -0
  394. /package/build/{HEIGHT_BOYS.percentile.weekly-d0bd934b.js → HEIGHT_BOYS.percentile.weekly-f31b7293.js} +0 -0
  395. /package/build/{HEIGHT_BOYS.percentile.yearly-8cd6cf3d.js → HEIGHT_BOYS.percentile.yearly-9cf55f7f.js} +0 -0
  396. /package/build/{HEIGHT_BOYS.zscore.monthly-14f945e3.js → HEIGHT_BOYS.zscore.monthly-1462dd76.js} +0 -0
  397. /package/build/{HEIGHT_BOYS.zscore.weekly-4821056e.js → HEIGHT_BOYS.zscore.weekly-cba56516.js} +0 -0
  398. /package/build/{HEIGHT_BOYS.zscore.yearly-da887025.js → HEIGHT_BOYS.zscore.yearly-618a9999.js} +0 -0
  399. /package/build/{HEIGHT_GIRLS.percentile.monthly-bff971d4.js → HEIGHT_GIRLS.percentile.monthly-4e938816.js} +0 -0
  400. /package/build/{HEIGHT_GIRLS.percentile.weekly-a56c04b3.js → HEIGHT_GIRLS.percentile.weekly-c597a8a4.js} +0 -0
  401. /package/build/{HEIGHT_GIRLS.percentile.yearly-45d27ae7.js → HEIGHT_GIRLS.percentile.yearly-e682e46f.js} +0 -0
  402. /package/build/{HEIGHT_GIRLS.zscore.monthly-f6311ed0.js → HEIGHT_GIRLS.zscore.monthly-14f95ac0.js} +0 -0
  403. /package/build/{HEIGHT_GIRLS.zscore.weekly-1365aff9.js → HEIGHT_GIRLS.zscore.weekly-f1462b99.js} +0 -0
  404. /package/build/{HEIGHT_GIRLS.zscore.yearly-2041dee6.js → HEIGHT_GIRLS.zscore.yearly-d65a3d45.js} +0 -0
  405. /package/build/{Locale-54ba6d01.js → Locale-a70f3018.js} +0 -0
  406. /package/build/{Visible-dd68b5dd.js → Visible-16372590.js} +0 -0
  407. /package/build/{WEIGHT_BOYS.percentile.monthly-5f9d4ea8.js → WEIGHT_BOYS.percentile.monthly-703127ea.js} +0 -0
  408. /package/build/{WEIGHT_BOYS.percentile.weekly-6017da2b.js → WEIGHT_BOYS.percentile.weekly-2e3530f2.js} +0 -0
  409. /package/build/{WEIGHT_BOYS.percentile.yearly-7f63a3c9.js → WEIGHT_BOYS.percentile.yearly-f8b0f900.js} +0 -0
  410. /package/build/{WEIGHT_BOYS.zscore.monthly-1a1e4c99.js → WEIGHT_BOYS.zscore.monthly-0a4ea821.js} +0 -0
  411. /package/build/{WEIGHT_BOYS.zscore.weekly-59d686d3.js → WEIGHT_BOYS.zscore.weekly-5eb764cc.js} +0 -0
  412. /package/build/{WEIGHT_BOYS.zscore.yearly-b6ec965f.js → WEIGHT_BOYS.zscore.yearly-d8dc154a.js} +0 -0
  413. /package/build/{WEIGHT_GIRLS.percentile.monthly-e07603ec.js → WEIGHT_GIRLS.percentile.monthly-f7ba3a8b.js} +0 -0
  414. /package/build/{WEIGHT_GIRLS.percentile.weekly-e6465384.js → WEIGHT_GIRLS.percentile.weekly-5cc644f2.js} +0 -0
  415. /package/build/{WEIGHT_GIRLS.percentile.yearly-59a58c0a.js → WEIGHT_GIRLS.percentile.yearly-1d6b2e04.js} +0 -0
  416. /package/build/{WEIGHT_GIRLS.zscore.monthly-f671c1a3.js → WEIGHT_GIRLS.zscore.monthly-5db3b65e.js} +0 -0
  417. /package/build/{WEIGHT_GIRLS.zscore.weekly-badcdaca.js → WEIGHT_GIRLS.zscore.weekly-c55f9501.js} +0 -0
  418. /package/build/{WEIGHT_GIRLS.zscore.yearly-f3d85d7e.js → WEIGHT_GIRLS.zscore.yearly-a147ef14.js} +0 -0
  419. /package/build/{animation-8cfdd7a2.js → animation-1049b28e.js} +0 -0
  420. /package/build/{constants-fd99656e.js → constants-06e52591.js} +0 -0
  421. /package/build/{constants-9d3b52fb.js → constants-454e1545.js} +0 -0
  422. /package/build/{constants-03292e67.js → constants-b3db85a3.js} +0 -0
  423. /package/build/{dataTransform-319d00fb.js → dataTransform-0be836ca.js} +0 -0
  424. /package/build/esm/{BMI_BOYS.percentile.monthly-b6570393.js → BMI_BOYS.percentile.monthly-00da0087.js} +0 -0
  425. /package/build/esm/{BMI_BOYS.percentile.weekly-ab4c8d25.js → BMI_BOYS.percentile.weekly-c1a894cd.js} +0 -0
  426. /package/build/esm/{BMI_BOYS.percentile.yearly-77d936ec.js → BMI_BOYS.percentile.yearly-e52331e4.js} +0 -0
  427. /package/build/esm/{BMI_BOYS.zscore.monthly-7921167a.js → BMI_BOYS.zscore.monthly-6afc9acd.js} +0 -0
  428. /package/build/esm/{BMI_BOYS.zscore.weekly-2115f4a0.js → BMI_BOYS.zscore.weekly-98433237.js} +0 -0
  429. /package/build/esm/{BMI_BOYS.zscore.yearly-26e26977.js → BMI_BOYS.zscore.yearly-eebae207.js} +0 -0
  430. /package/build/esm/{BMI_GIRLS.percentile.monthly-49d54599.js → BMI_GIRLS.percentile.monthly-d1d75e5a.js} +0 -0
  431. /package/build/esm/{BMI_GIRLS.percentile.weekly-9f8b840d.js → BMI_GIRLS.percentile.weekly-d084b37c.js} +0 -0
  432. /package/build/esm/{BMI_GIRLS.percentile.yearly-552a0036.js → BMI_GIRLS.percentile.yearly-cccd8fd5.js} +0 -0
  433. /package/build/esm/{BMI_GIRLS.zscore.monthly-fbef87c7.js → BMI_GIRLS.zscore.monthly-9ef3584b.js} +0 -0
  434. /package/build/esm/{BMI_GIRLS.zscore.weekly-526ae861.js → BMI_GIRLS.zscore.weekly-8d18e391.js} +0 -0
  435. /package/build/esm/{BMI_GIRLS.zscore.yearly-571845dc.js → BMI_GIRLS.zscore.yearly-483faa92.js} +0 -0
  436. /package/build/esm/{ChevronDown-fd8460cd.js → ChevronDown-72f353c4.js} +0 -0
  437. /package/build/esm/{Close-f371bf52.js → Close-7f696413.js} +0 -0
  438. /package/build/esm/{Google-55d4b9b8.js → Google-f0351cf7.js} +0 -0
  439. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-0b8c167d.js → HEAD CIRCUM_BOYS.percentile.monthly-02f07ece.js} +0 -0
  440. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-f392309f.js → HEAD CIRCUM_BOYS.percentile.weekly-b03af760.js} +0 -0
  441. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-00a722da.js → HEAD CIRCUM_BOYS.percentile.yearly-6ddb9f1b.js} +0 -0
  442. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-64b32458.js → HEAD CIRCUM_BOYS.zscore.monthly-2a047c13.js} +0 -0
  443. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-3d956705.js → HEAD CIRCUM_BOYS.zscore.weekly-0e13d9ae.js} +0 -0
  444. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-e03c79ec.js → HEAD CIRCUM_BOYS.zscore.yearly-3270018c.js} +0 -0
  445. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-b3ad637d.js → HEAD CIRCUM_GIRLS.percentile.monthly-3b183bbd.js} +0 -0
  446. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-f85cfcb9.js → HEAD CIRCUM_GIRLS.percentile.weekly-26a85036.js} +0 -0
  447. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-966c798e.js → HEAD CIRCUM_GIRLS.percentile.yearly-1ae4e888.js} +0 -0
  448. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-e0e22072.js → HEAD CIRCUM_GIRLS.zscore.monthly-0ae24819.js} +0 -0
  449. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-64c75386.js → HEAD CIRCUM_GIRLS.zscore.weekly-fe9f4e7e.js} +0 -0
  450. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-6abaf29e.js → HEAD CIRCUM_GIRLS.zscore.yearly-e1cc002a.js} +0 -0
  451. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-c887be23.js → HEIGHT_BOYS.percentile.monthly-c8d18fed.js} +0 -0
  452. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-10b59b2b.js → HEIGHT_BOYS.percentile.weekly-2ad839c2.js} +0 -0
  453. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-78db71fc.js → HEIGHT_BOYS.percentile.yearly-e9fbedf9.js} +0 -0
  454. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-2d1c6855.js → HEIGHT_BOYS.zscore.monthly-dda8b396.js} +0 -0
  455. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-a754eaf1.js → HEIGHT_BOYS.zscore.weekly-c9d9d4d0.js} +0 -0
  456. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-b705fa8f.js → HEIGHT_BOYS.zscore.yearly-7f3bb41a.js} +0 -0
  457. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-e9f51bdf.js → HEIGHT_GIRLS.percentile.monthly-adda6c91.js} +0 -0
  458. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-8e94842a.js → HEIGHT_GIRLS.percentile.weekly-6ec2aa86.js} +0 -0
  459. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-27eaeda7.js → HEIGHT_GIRLS.percentile.yearly-78203b9f.js} +0 -0
  460. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-92a48220.js → HEIGHT_GIRLS.zscore.monthly-f7cc6a4f.js} +0 -0
  461. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-225fd587.js → HEIGHT_GIRLS.zscore.weekly-e11c0e1a.js} +0 -0
  462. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-865a7dd6.js → HEIGHT_GIRLS.zscore.yearly-cb1f2588.js} +0 -0
  463. /package/build/esm/{Locale-9f899ca5.js → Locale-5460e729.js} +0 -0
  464. /package/build/esm/{Visible-5d7574a5.js → Visible-79ea5175.js} +0 -0
  465. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-59c5809b.js → WEIGHT_BOYS.percentile.monthly-6b23fa82.js} +0 -0
  466. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-b70dcfcc.js → WEIGHT_BOYS.percentile.weekly-b9220743.js} +0 -0
  467. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-306c72b4.js → WEIGHT_BOYS.percentile.yearly-917da5f3.js} +0 -0
  468. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-61420ce7.js → WEIGHT_BOYS.zscore.monthly-215e737e.js} +0 -0
  469. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-555c582c.js → WEIGHT_BOYS.zscore.weekly-07952bd1.js} +0 -0
  470. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-c102c07d.js → WEIGHT_BOYS.zscore.yearly-d5e15816.js} +0 -0
  471. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-920ad033.js → WEIGHT_GIRLS.percentile.monthly-cea4561a.js} +0 -0
  472. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-f1df6d69.js → WEIGHT_GIRLS.percentile.weekly-be28a920.js} +0 -0
  473. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-8b55e8c8.js → WEIGHT_GIRLS.percentile.yearly-eec8d549.js} +0 -0
  474. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-1a9bba5f.js → WEIGHT_GIRLS.zscore.monthly-d0d56506.js} +0 -0
  475. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-d8ebb3e2.js → WEIGHT_GIRLS.zscore.weekly-afc164b5.js} +0 -0
  476. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-84e11e34.js → WEIGHT_GIRLS.zscore.yearly-b8a698b5.js} +0 -0
  477. /package/build/esm/{animation-5fef196a.js → animation-bea85d42.js} +0 -0
  478. /package/build/esm/{constants-411f7870.js → constants-abdbe382.js} +0 -0
  479. /package/build/esm/{constants-06c5327b.js → constants-bff3251f.js} +0 -0
  480. /package/build/esm/{constants-22b78878.js → constants-ee67fd63.js} +0 -0
  481. /package/build/esm/{dataTransform-3ddd5411.js → dataTransform-391e4916.js} +0 -0
  482. /package/build/esm/{index-af00191c.js → index-15eb2ff8.js} +0 -0
  483. /package/build/esm/{index-f58870ce.js → index-2f9d4e82.js} +0 -0
  484. /package/build/esm/{index-f493a0ee.js → index-84bcb371.js} +0 -0
  485. /package/build/esm/{index-4b06dbce.js → index-8c22a18e.js} +0 -0
  486. /package/build/esm/{index-35a1f02e.js → index-9bfb1aef.js} +0 -0
  487. /package/build/esm/{index-e823e49f.js → index-a4efc829.js} +0 -0
  488. /package/build/esm/{index-2c8f523e.js → index-e6f7246e.js} +0 -0
  489. /package/build/esm/{index-3c02f7c6.js → index-f98a6cab.js} +0 -0
  490. /package/build/esm/{index.styles-c2f4e759.js → index.styles-f34ddcab.js} +0 -0
  491. /package/build/esm/{localizeNumberFormat-0ce28942.js → localizeNumberFormat-f1e8ac6b.js} +0 -0
  492. /package/build/esm/{normalizeLink-54a0ffaa.js → normalizeLink-ed68733d.js} +0 -0
  493. /package/build/esm/{number-8423cfd0.js → number-8f9b730f.js} +0 -0
  494. /package/build/esm/{paths-d01697e0.js → paths-76abc768.js} +0 -0
  495. /package/build/esm/{shared-8e790448.js → shared-92e33797.js} +0 -0
  496. /package/build/esm/{translationsContext-b21155db.js → translationsContext-62c6db41.js} +0 -0
  497. /package/build/esm/{tslib.es6-01ea2377.js → tslib.es6-f56963a6.js} +0 -0
  498. /package/build/esm/{types-50e1b7d8.js → types-8662f52e.js} +0 -0
  499. /package/build/esm/{useIsInit-8c918b96.js → useIsInit-740027d8.js} +0 -0
  500. /package/build/esm/{useOutsideClick-3019e2de.js → useOutsideClick-3b74014e.js} +0 -0
  501. /package/build/esm/{useScrollbarSize-193aba75.js → useScrollbarSize-d4181977.js} +0 -0
  502. /package/build/esm/{useUniqueId-270c9a9f.js → useUniqueId-78549510.js} +0 -0
  503. /package/build/esm/{utils-5a56a283.js → utils-ca546a43.js} +0 -0
  504. /package/build/{index-1beefddb.js → index-411ff63a.js} +0 -0
  505. /package/build/{index-2705aec2.js → index-479148db.js} +0 -0
  506. /package/build/{index-fa49995c.js → index-49e4941e.js} +0 -0
  507. /package/build/{index-f985b5c0.js → index-4cf3425b.js} +0 -0
  508. /package/build/{index-00ed9711.js → index-7a5470ca.js} +0 -0
  509. /package/build/{index-63203aed.js → index-96d8a1b4.js} +0 -0
  510. /package/build/{index-990c0bb3.js → index-9eb5924e.js} +0 -0
  511. /package/build/{index-aea82b06.js → index-dc805646.js} +0 -0
  512. /package/build/{index.styles-ede8df34.js → index.styles-58f3d2e6.js} +0 -0
  513. /package/build/{localizeNumberFormat-a5970d23.js → localizeNumberFormat-a9f01ec3.js} +0 -0
  514. /package/build/{normalizeLink-b158ac8d.js → normalizeLink-efc85ab4.js} +0 -0
  515. /package/build/{number-d1d8b642.js → number-4ca3b24c.js} +0 -0
  516. /package/build/{paths-2aeb1f12.js → paths-8a7a5ea9.js} +0 -0
  517. /package/build/{shared-2f2da3af.js → shared-357ef7eb.js} +0 -0
  518. /package/build/{translationsContext-0f2232e1.js → translationsContext-d7368ee5.js} +0 -0
  519. /package/build/{tslib.es6-a0832fdc.js → tslib.es6-77611d97.js} +0 -0
  520. /package/build/{types-16372895.js → types-b073cdd3.js} +0 -0
  521. /package/build/{useIsInit-80983abc.js → useIsInit-1e93a875.js} +0 -0
  522. /package/build/{useOutsideClick-2d2dabbf.js → useOutsideClick-a13e1843.js} +0 -0
  523. /package/build/{useScrollbarSize-c4bc3d63.js → useScrollbarSize-f04fff5f.js} +0 -0
  524. /package/build/{useUniqueId-3ed7ca22.js → useUniqueId-230a0871.js} +0 -0
  525. /package/build/{utils-bf10266a.js → utils-d0544a49.js} +0 -0
package/build/esm/lead.js CHANGED
@@ -1,56 +1,56 @@
1
- import { a as __awaiter, _ as __rest } from './tslib.es6-01ea2377.js';
2
- import React__default, { createContext, useMemo, useEffect, useRef, useState, useContext, memo, useCallback, forwardRef, useImperativeHandle, useLayoutEffect } from 'react';
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, Flex, Portal, Transition, Overlay } from '@mantine/core';
1
+ import { _ as __rest, a as __awaiter } from './tslib.es6-f56963a6.js';
2
+ import React__default, { createContext, useMemo, useEffect, useRef, useState, useContext, useCallback, forwardRef, useImperativeHandle, memo, useLayoutEffect } from 'react';
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, 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-9c0bea69.js';
7
+ import { B as BEARER_TOKEN_COOKIE } from './index-1af6a755.js';
8
8
  import { getCookie, setCookie } from './miscCookieHelper.js';
9
- import { u as useTranslations } from './index-0e4f52e3.js';
10
- import { T as TranslationsContext } from './translationsContext-b21155db.js';
11
- import { M as MediaQueries, b as getWrapperDomWithSelector, a as getPopupWrapperDom } from './utils-5a56a283.js';
12
- import { T as Text } from './index-eee1f458.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-14b1ab9b.js';
14
- import { D as DatePicker } from './index-b28575d7.js';
15
- import { B as Button } from './index-657f19f9.js';
16
- import './index.styles-c2f4e759.js';
9
+ import { u as useTranslations } from './index-ef717367.js';
10
+ import { T as TranslationsContext } from './translationsContext-62c6db41.js';
11
+ import { M as MediaQueries, b as getWrapperDomWithSelector, a as getPopupWrapperDom } from './utils-ca546a43.js';
12
+ import { T as Text } from './index-a5c795a1.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-32c466ec.js';
14
+ import { D as DatePicker } from './index-86dba4d0.js';
15
+ import { B as Button } from './index-5e2002e6.js';
16
+ import './index.styles-f34ddcab.js';
17
17
  import { useIntersection, useClickOutside } from '@mantine/hooks';
18
- import './index-bf0df733.js';
19
- import { C as CustomStylesType, G as GlobalTextStyleNew } from './text-c55b6aee.js';
20
- import './index-3e0f3bbe.js';
21
- import { M as MAPPED_LOCALE } from './utils-aadd1fc5.js';
18
+ import './index-ea472f22.js';
19
+ import { C as CustomStylesType } from './text-55617bb4.js';
20
+ import './index-b8828dea.js';
21
+ import { M as MAPPED_LOCALE } from './utils-aadfa81c.js';
22
22
  import { DateInput } from '@mantine/dates';
23
- import { L as LOCALE_SPECS, Z as ZINDEX_SSO, I as ISO_FORMAT } from './index-a2fd7fb1.js';
24
- import { C as COMMON_DATE_TRANSLATE_KEY } from './index-31d4f531.js';
25
- import './index-2c8f523e.js';
26
- import { u as usePlacesAutocomplete, G as GOOGLE_API_KEY } from './usePlacesAutocomplete-679b3df2.js';
27
- import { H as Heading$1 } from './index-15f07bbc.js';
28
- import { t as translationsMap$1 } from './translationsProvider-0b00a188.js';
29
- import { L as LOCALE } from './Locale-9f899ca5.js';
23
+ import { L as LOCALE_SPECS, Z as ZINDEX_SSO, I as ISO_FORMAT } from './index-74d772bb.js';
24
+ import { C as COMMON_DATE_TRANSLATE_KEY } from './index-99bb09af.js';
25
+ import './index-e6f7246e.js';
26
+ import { u as usePlacesAutocomplete, G as GOOGLE_API_KEY } from './usePlacesAutocomplete-ddef7ee5.js';
27
+ import { H as Heading$1 } from './index-8b97a08b.js';
28
+ import { t as translationsMap$1 } from './translationsProvider-e65888b4.js';
29
+ import { L as LOCALE } from './Locale-5460e729.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-4ff2c435.js';
37
- import { M as MantineProvider } from './index-90da5c58.js';
38
- import { i as isVideo } from './index-af00191c.js';
39
- import { u as useScreenSize } from './index-f0ffb722.js';
36
+ import { T as TogetherComponentGlobalContext } from './utils-6a4cbb99.js';
37
+ import { M as MantineProvider } from './index-3067c112.js';
38
+ import { i as isVideo } from './index-15eb2ff8.js';
39
+ import { u as useScreenSize } from './index-6d801ccc.js';
40
40
  import { motion } from 'framer-motion';
41
41
  import { createPortal } from 'react-dom';
42
- import { I as InputDate } from './InputDate-0c5bd1af.js';
43
- import { D as DrawerComponent } from './index-ad47616b.js';
44
- import { C as Close } from './Close-f371bf52.js';
42
+ import { I as InputDate } from './InputDate-c6943232.js';
43
+ import { D as DrawerComponent } from './index-7a2d9628.js';
44
+ import { C as Close } from './Close-7f696413.js';
45
45
  import './constantsIsProduction.js';
46
- import './normalizeLink-54a0ffaa.js';
46
+ import './normalizeLink-ed68733d.js';
47
47
  import '@hhgtech/icons/other';
48
48
  import '@mantine/carousel';
49
49
  import 'classnames';
50
- import './useUniqueId-270c9a9f.js';
50
+ import './useUniqueId-78549510.js';
51
51
  import './constantsSite.js';
52
52
  import '@hhgtech/icons/core';
53
- import './shared-8e790448.js';
53
+ import './shared-92e33797.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-e823e49f.js';
69
+ import './index-a4efc829.js';
70
70
  import 'slugify';
71
71
  import 'string-format';
72
72
  import './togetherApiPaths.js';
73
- import './constants-411f7870.js';
73
+ import './constants-abdbe382.js';
74
74
  import 'vaul';
75
75
 
76
76
  const LeadGenComponentContext = createContext({});
@@ -123,6 +123,33 @@ 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
+ };
126
153
  const SSO_MAP_LEAD = ['name', 'email', 'birthday', 'phone', 'gender'];
127
154
  const LEAD_LOCALE_DATA$1 = {
128
155
  'vi-VN': {
@@ -205,33 +232,6 @@ const mappingSSOToLead = (userInfoProps) => {
205
232
  return;
206
233
  }
207
234
  };
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,55 +378,6 @@ 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
-
430
381
  class Store {
431
382
  constructor() {
432
383
  this.apiSsoUrl = 'https://staging-id.hellobacsi.com/';
@@ -436,8 +387,6 @@ class Store {
436
387
  }
437
388
  const leadStore = new Store();
438
389
 
439
- const LEADGEN_CACHE_KEY = 'LeadGen_';
440
- const LEADGEN_CACHE_TIME = 5 * 60 * 1000; // 5 minutes
441
390
  const METHOD = {
442
391
  GET: 'get',
443
392
  POST: 'POST',
@@ -624,19 +573,7 @@ const trackingSubscription = (data) => {
624
573
  data,
625
574
  });
626
575
  };
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
- }
638
576
  const Service = {
639
- getCampaigns,
640
577
  campaignGetById,
641
578
  getCampaignByCode,
642
579
  getSubscriptionBoxInfo,
@@ -1689,6 +1626,12 @@ const getTranslations = (locale) => {
1689
1626
  return translationsMap['en-PH'];
1690
1627
  };
1691
1628
 
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
+
1692
1635
  // import mockLeadData from './mockLeadData'
1693
1636
  const listCampaignScheduled = [];
1694
1637
  const listCampaignScheduledToActivated = [];
@@ -1864,167 +1807,167 @@ function clearPassiveEvent() {
1864
1807
  LEAD_SCROLL_EVENT = null;
1865
1808
  }
1866
1809
  }
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]);
1909
- }
1910
- else {
1911
- return false;
1912
- }
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);
1989
- }
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);
1995
- }
1996
- };
1997
- window.addEventListener('scroll', LEAD_SCROLL_EVENT, {
1998
- passive: true,
1999
- });
2000
- }
2001
- }
2002
1810
  function checkShowPopup({ leadApi, leadSiteId, leadDomain, onShowPopup, DEBUG_URL, }) {
2003
1811
  // clear previous passive event, check for new condition
2004
1812
  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,
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()
2014
1831
  })
2015
- .then((campRes) => {
2016
- LeadLog('List campagin: ', campRes);
1832
+ .then((data) => {
1833
+ var _a, _b, _c, _d;
1834
+ LeadLog('List campagin: ', data);
2017
1835
  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 });
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));
1850
+ }
1851
+ 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));
1901
+ }
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
+ }
1967
+ }
1968
+ else {
1969
+ LeadLog('🚧 No lead campaigns on current URL, tags');
1970
+ }
2028
1971
  }
2029
1972
  })
2030
1973
  .catch((err) => {
@@ -2041,149 +1984,147 @@ const LeadLog = (...params) => {
2041
1984
  }
2042
1985
  };
2043
1986
 
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
-
2093
1987
  const LeadGenContext = createContext({
2094
- onSubmit(value) {
1988
+ submit(value) {
2095
1989
  /** Init for FAKING function */
2096
1990
  LeadLog('** LeadGen Submit : ', value);
2097
1991
  return Promise.reject(value);
2098
1992
  },
2099
- onImpression(value) {
1993
+ submitSubscriptionBox(value) {
2100
1994
  /** Init for FAKING function */
2101
- LeadLog('** LeadGen Impression : ', value);
1995
+ LeadLog('** LeadGen SubmitSubscriptionBox : ', value);
1996
+ return Promise.reject(value);
1997
+ },
1998
+ impression(type) {
1999
+ /** Init for FAKING function */
2000
+ LeadLog('** LeadGen Impression : ', type);
2102
2001
  return Promise.reject();
2103
2002
  },
2003
+ /** For Subscription Box */
2004
+ subscriptionIcon: '',
2005
+ subscriptionTitle: '',
2006
+ subscriptionPhoneType: '',
2104
2007
  });
2105
2008
  const LeadGenContextProvider = (props) => {
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"]);
2009
+ const { campaign_code: campaignCodeProps, apiSsoUrl, apiLeadUrl, apiSubotUrl, locale: localeProps, forceCampaign: forceCampaignProps, extraValues, articleId = 1, categoryList, siteDomain: site_domain, children, userInfo } = props, restProps = __rest(props, ["campaign_code", "apiSsoUrl", "apiLeadUrl", "apiSubotUrl", "locale", "forceCampaign", "extraValues", "articleId", "categoryList", "siteDomain", "children", "userInfo"]);
2107
2010
  const { t } = useTranslations();
2108
- const [rawForceCampaign, setRawForceCampaign] = useState(forceCampaignProps);
2109
- const [forceCampaign, setForceCampaign] = useState(() => formatCampaignDetail(forceCampaignProps));
2011
+ const [forceCampaign, setForceCampaign] = useState(forceCampaignProps);
2110
2012
  const [subscriptionInfo, setSubscriptionInfo] = useState({
2111
2013
  subscriptionIcon: '',
2112
2014
  subscriptionTitle: '',
2113
2015
  subscriptionType: 'TypeA',
2114
2016
  subscriptionPhoneType: '',
2017
+ subcriptionCateId: '',
2018
+ subcriptionCateName: '',
2115
2019
  });
2116
2020
  const locale = useMemo(() => {
2117
2021
  return localeProps || LOCALE['PhilippinesEnglish'];
2118
2022
  }, [localeProps]);
2023
+ const { url, campaign_id, cookie_id, ga_client_id, category_list, article_id, article_title, } = useMemo(() => ({
2024
+ url: location.href.toLowerCase() || '',
2025
+ cookie_id: getCookie('hhg-id') || null,
2026
+ ga_client_id: getCookie('_ga'),
2027
+ campaign_id: forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.id,
2028
+ campaign_code: campaignCodeProps || (forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.code),
2029
+ category_list: categoryList,
2030
+ article_id: articleId,
2031
+ article_title: (extraValues === null || extraValues === void 0 ? void 0 : extraValues.article_title) || document.title || '',
2032
+ }), [
2033
+ campaignCodeProps,
2034
+ articleId,
2035
+ categoryList,
2036
+ forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.id,
2037
+ extraValues === null || extraValues === void 0 ? void 0 : extraValues.article_title,
2038
+ subscriptionInfo === null || subscriptionInfo === void 0 ? void 0 : subscriptionInfo.subcriptionCateName,
2039
+ ]);
2040
+ // const fetchCampaign = useCallback(
2041
+ // (campaign_code: string) => {
2042
+ // Service.getCampaignByCode(campaign_code).then((res) => {
2043
+ // const { _data } = res || {}
2044
+ // const { campaigns } = _data || {}
2045
+ // LeadLog('** LeadGen Campaign : ', campaigns)
2046
+ // setForceCampaign(formatCampaignDetail(campaigns))
2047
+ // })
2048
+ // },
2049
+ // [campaignCodeProps],
2050
+ // )
2119
2051
  // TODO : Update form for LeadGen
2120
- const onSubmit = useCallback((data) => {
2052
+ const submit = useCallback((data) => {
2121
2053
  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');
2127
2054
  }, []);
2128
2055
  const submitSubscriptionBox = useCallback((value) => {
2129
- const data = Object.assign(Object.assign(Object.assign(Object.assign({}, value), {
2056
+ const data = Object.assign(Object.assign({}, value), {
2130
2057
  // campaign_id,
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 || '' });
2058
+ 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,
2059
+ // ...extraValues,
2060
+ article_id, category_id: subscriptionInfo.subcriptionCateId, category_name: subscriptionInfo.subcriptionCateName, article_title });
2132
2061
  return Service.postSubscriptionBoxLead({ data });
2133
2062
  }, [
2134
2063
  extraValues,
2135
- extraValues === null || extraValues === void 0 ? void 0 : extraValues.article_title,
2136
- siteDomain,
2137
- articleId,
2138
- categoryId,
2064
+ site_domain,
2065
+ campaign_id,
2066
+ article_id,
2067
+ article_title,
2068
+ subscriptionInfo.subcriptionCateId,
2069
+ subscriptionInfo.subcriptionCateName,
2070
+ url,
2071
+ cookie_id,
2072
+ ga_client_id,
2139
2073
  ]);
2140
- const impressionSubscriptionBox = useCallback((type) => {
2074
+ const impression = useCallback((type) => {
2075
+ const gaCookie = getCookie('_ga') || null;
2141
2076
  const impression = {
2142
2077
  subscription_title: subscriptionInfo.subscriptionTitle,
2143
2078
  name: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) || '',
2144
2079
  area_code: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.area_code) || '',
2145
2080
  phone_number: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone) || '',
2146
- site_domain: siteDomain,
2081
+ site_domain: domainLocales[locale],
2147
2082
  url: location.href.toLowerCase(),
2148
2083
  cookie_id: getCookie('hhg-id'),
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) || '',
2084
+ ga_client_id: gaCookie,
2085
+ article_title,
2086
+ article_id,
2087
+ category_id: subscriptionInfo.subcriptionCateId,
2088
+ category_name: subscriptionInfo.subcriptionCateName,
2154
2089
  type,
2155
2090
  };
2156
2091
  return Service.trackingSubscription(impression);
2157
2092
  }, [
2158
- articleId,
2159
- categoryId,
2093
+ campaign_id,
2094
+ url,
2095
+ article_title,
2096
+ cookie_id,
2097
+ ga_client_id,
2098
+ subscriptionInfo.subcriptionCateId,
2099
+ subscriptionInfo.subcriptionCateName,
2160
2100
  subscriptionInfo.subscriptionTitle,
2161
- extraValues === null || extraValues === void 0 ? void 0 : extraValues.category_name,
2101
+ article_id,
2162
2102
  userInfo === null || userInfo === void 0 ? void 0 : userInfo.name,
2163
2103
  userInfo === null || userInfo === void 0 ? void 0 : userInfo.area_code,
2164
2104
  userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone,
2165
2105
  ]);
2166
2106
  useEffect(() => {
2167
- /** Force Campaign */
2168
2107
  if (forceCampaignProps) {
2169
2108
  setForceCampaign(formatCampaignDetail(forceCampaignProps));
2170
- setRawForceCampaign(forceCampaignProps);
2171
2109
  return;
2172
2110
  }
2173
2111
  /** For Subscription Box */
2174
- if (categoryId) {
2112
+ if (category_list) {
2175
2113
  Service.getSubscriptionBoxInfo({
2176
- category: categoryId,
2177
- site: siteDomain,
2114
+ category: category_list.map((i) => i.termId).join(','),
2115
+ site: site_domain,
2178
2116
  slug: location === null || location === void 0 ? void 0 : location.pathname,
2179
2117
  }).then((res) => {
2118
+ var _a;
2180
2119
  const { _data } = res || {};
2181
- const { item, campaign_code, btn_type = 'zalo' } = _data || {};
2182
- const { icon, content } = item || {};
2183
- LeadLog('** LeadGen SubscriptionBox campaign_code : ', campaign_code);
2120
+ const { item = [], btn_type = 'zalo' } = _data || {};
2121
+ const { icon, content, cate_id } = ((_a = item.filter((i) => i.cate_id !== 'default')) === null || _a === void 0 ? void 0 : _a[0]) || {};
2184
2122
  LeadLog('** LeadGen SubscriptionBox subscription_icon : ', icon);
2185
2123
  LeadLog('** LeadGen SubscriptionBox subscription_title : ', content);
2186
- setSubscriptionInfo((prev) => (Object.assign(Object.assign({}, prev), { subscriptionIcon: icon, subscriptionTitle: content, subscriptionPhoneType: btn_type })));
2124
+ setSubscriptionInfo((prev) => {
2125
+ var _a, _b;
2126
+ return (Object.assign(Object.assign({}, prev), { subscriptionIcon: icon, subscriptionTitle: content, subscriptionPhoneType: btn_type, subcriptionCateId: cate_id, subcriptionCateName: (_b = (_a = category_list.filter((i) => i.termId == cate_id)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.name }));
2127
+ });
2187
2128
  setForceCampaign(formatCampaignDetail({
2188
2129
  id: 6993,
2189
2130
  name: '',
@@ -2307,39 +2248,10 @@ const LeadGenContextProvider = (props) => {
2307
2248
  });
2308
2249
  return;
2309
2250
  }
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
- // })
2251
+ // if (campaignCodeProps) {
2252
+ // fetchCampaign(campaignCodeProps)
2333
2253
  // }
2334
- }, [
2335
- forceCampaignProps,
2336
- campaignCodeProps,
2337
- categoryId,
2338
- siteId,
2339
- siteDomain,
2340
- apiLeadUrl,
2341
- DEBUG_URL,
2342
- ]);
2254
+ }, [forceCampaignProps, campaignCodeProps, category_list]);
2343
2255
  useEffect(() => {
2344
2256
  leadStore.apiSsoUrl = apiSsoUrl;
2345
2257
  leadStore.apiLeadUrl = apiLeadUrl;
@@ -2350,16 +2262,10 @@ const LeadGenContextProvider = (props) => {
2350
2262
  }
2351
2263
  return (React__default.createElement(LeadGenContext.Provider, { value: Object.assign(Object.assign(Object.assign({}, restProps), subscriptionInfo), { userInfo, campaign_code: campaignCodeProps, apiSsoUrl,
2352
2264
  apiLeadUrl,
2353
- apiSubotUrl, locale: localeProps, extraValues,
2354
- articleId,
2355
- categoryId,
2356
- siteDomain,
2357
- forceCampaign,
2358
- rawForceCampaign,
2359
- onSubmit,
2360
- onImpression,
2265
+ apiSubotUrl, locale: localeProps, articleId, categoryId: subscriptionInfo.subcriptionCateId, siteDomain: site_domain, forceCampaign,
2266
+ submit,
2361
2267
  submitSubscriptionBox,
2362
- impressionSubscriptionBox }) },
2268
+ impression }) },
2363
2269
  React__default.createElement(LeadGenTranslationProvider, { locale: locale }, children)));
2364
2270
  };
2365
2271
  const useLeadGenContext = () => {
@@ -2947,7 +2853,7 @@ const cssWrapperInputNotShrink$1 = css `
2947
2853
  const cssWrapperInputShrink$1 = css `
2948
2854
  height: auto;
2949
2855
  min-height: var(--container-height, 56px);
2950
- padding-block: var(--space-y-shrink, 6px);
2856
+ padding-block: var(--space-y-shrink, 7px);
2951
2857
  cursor: text;
2952
2858
  pointer-events: auto;
2953
2859
  `;
@@ -2959,7 +2865,7 @@ const cssInputWrapperError$1 = css `
2959
2865
  const StyledTextFieldContainer$1 = styled.div `
2960
2866
  --space-x: 16px;
2961
2867
  --space-y-not-shrink: 15px;
2962
- --space-y-shrink: 6px;
2868
+ --space-y-shrink: 7px;
2963
2869
  --container-height: 56px;
2964
2870
  --label-not-shrink: 16px;
2965
2871
  --label-shrink: 12px;
@@ -3372,7 +3278,7 @@ const LeadGenSubscriptionBoxWithoutMemo = ({ locale, userInfo, forceCampaign, ca
3372
3278
  const { image, extra_fields, id: campaign_id, bot_id: campaign_subot_id = [], ThankYouBlock, } = forceCampaign || {};
3373
3279
  const { textBlocks, listBlockAdded, actionBlocks } = extra_fields || {};
3374
3280
  const { submitBlock } = actionBlocks || {};
3375
- const { apiLeadUrl, subscriptionIcon, subscriptionTitle, subscriptionPhoneType, submitSubscriptionBox, onFinish, impressionSubscriptionBox, } = useLeadGenContext();
3281
+ const { apiLeadUrl, subscriptionIcon, subscriptionTitle, subscriptionPhoneType, submitSubscriptionBox, onFinish, impression, } = useLeadGenContext();
3376
3282
  const { t } = useTranslations();
3377
3283
  const { action: { pushNotifications }, } = useContext(TogetherComponentGlobalContext);
3378
3284
  const [loading, setLoading] = useState(false);
@@ -3432,7 +3338,7 @@ const LeadGenSubscriptionBoxWithoutMemo = ({ locale, userInfo, forceCampaign, ca
3432
3338
  const reqValues = Object.assign(Object.assign({}, newValues), ssoValues);
3433
3339
  const [res] = yield Promise.all([
3434
3340
  submitSubscriptionBox(reqValues),
3435
- impressionSubscriptionBox('submit_form'),
3341
+ impression('submit_form'),
3436
3342
  ]);
3437
3343
  const { _data } = res || {};
3438
3344
  const { model } = _data || {};
@@ -3478,7 +3384,7 @@ const LeadGenSubscriptionBoxWithoutMemo = ({ locale, userInfo, forceCampaign, ca
3478
3384
  userInfo === null || userInfo === void 0 ? void 0 : userInfo.uid,
3479
3385
  userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone,
3480
3386
  ]);
3481
- return (React__default.createElement(ImpressionTrackingWrapper, { dependency: categoryId, onImpression: () => impressionSubscriptionBox('impression') },
3387
+ return (React__default.createElement(ImpressionTrackingWrapper, { dependency: categoryId, onImpression: () => impression('impression') },
3482
3388
  React__default.createElement(StyledLeadGenSubscriptionBox, { "data-phone-type": subscriptionPhoneType, "data-type": "subscription_box_A" },
3483
3389
  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 })),
3484
3390
  !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 })))));
@@ -3487,11 +3393,8 @@ const LeadGenSubscriptionBox$1 = memo(LeadGenSubscriptionBoxWithoutMemo);
3487
3393
 
3488
3394
  const Container = () => {
3489
3395
  const context = useContext(LeadGenContext);
3490
- const { campaign_code, locale, siteId, siteDomain, userInfo, forceCampaign } = context;
3491
- if (!forceCampaign || !(forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.id)) {
3492
- return null;
3493
- }
3494
- return (React__default.createElement(LeadGenSubscriptionBox$1, { locale: locale, siteId: siteId, siteDomain: siteDomain, userInfo: userInfo, forceCampaign: forceCampaign, campaign_code: campaign_code }));
3396
+ const { campaign_code, locale, siteId, siteDomain, userInfo, forceCampaign, subscriptionTitle, } = context;
3397
+ return subscriptionTitle ? (React__default.createElement(LeadGenSubscriptionBox$1, { locale: locale, siteId: siteId, siteDomain: siteDomain, userInfo: userInfo, forceCampaign: forceCampaign, campaign_code: campaign_code })) : null;
3495
3398
  };
3496
3399
  Container.displayName = 'LeadGenSubscriptionBox';
3497
3400
  const ALLOW_LOCALE = [LOCALE.Vietnam, LOCALE.Malaysia, LOCALE.Indonesia];
@@ -4213,7 +4116,7 @@ const ThankyouPopup = ({ title, titleAlign, subtitle, subtitleAlign, link, linkN
4213
4116
  React__default.createElement(Button, { className: `lead-modal__btn ${LEAD_CLASS}`, color: primaryColor }, linkText)))))));
4214
4117
  };
4215
4118
 
4216
- const InlineLayout = ({ flatComponent, content, inlinePosition, doImpression, }) => {
4119
+ const InlineLayout = ({ content, inlinePosition, doImpression, }) => {
4217
4120
  const target = useMemo(() => {
4218
4121
  if (!inlinePosition)
4219
4122
  return null;
@@ -4318,9 +4221,6 @@ const InlineLayout = ({ flatComponent, content, inlinePosition, doImpression, })
4318
4221
  }
4319
4222
  }
4320
4223
  }, [inlinePosition]);
4321
- if (!!flatComponent) {
4322
- return (React__default.createElement(ImpressionTrackingWrapper, { onImpression: () => __awaiter(void 0, void 0, void 0, function* () { return yield doImpression(); }) }, content));
4323
- }
4324
4224
  if (!inlinePosition || !target)
4325
4225
  return null;
4326
4226
  return createPortal(React__default.createElement(ImpressionTrackingWrapper, { onImpression: () => __awaiter(void 0, void 0, void 0, function* () { return yield doImpression(); }) }, content), target);
@@ -4361,28 +4261,15 @@ const EmptyComponent = ({ onClose, onContinue, }) => {
4361
4261
  React__default.createElement(Button$1, { onClick: onContinue, size: "lg", variant: "filled", fullWidth: false, className: "leadgen-btn leadgen-btn_empty_again" }, t('lead.empty.submitAgain')))));
4362
4262
  };
4363
4263
 
4364
- var useTextStyles = createStyles((theme) => {
4365
- return GlobalTextStyleNew(theme)[CustomStylesType.LEADGEN];
4366
- });
4367
-
4368
- const ErrorIcon = (_a) => {
4369
- var { size } = _a, rest = __rest(_a, ["size"]);
4370
- const props = Object.assign({ width: size, height: size }, rest);
4371
- return (React__default.createElement("svg", Object.assign({ width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
4372
- React__default.createElement("path", { d: "M5.996 6.513q.163 0 .282-.12a.38.38 0 0 0 .118-.28V3.937q0-.15-.118-.268a.4.4 0 0 0-.282-.119.4.4 0 0 0-.281.12.38.38 0 0 0-.119.28v2.175q0 .15.119.269.12.119.281.119m0 1.862a.43.43 0 0 0 .3-.112.4.4 0 0 0 .125-.313.4.4 0 0 0-.125-.3.4.4 0 0 0-.3-.125.4.4 0 0 0-.3.125.4.4 0 0 0-.125.3.4.4 0 0 0 .125.313.43.43 0 0 0 .3.112m0 2.375a4.6 4.6 0 0 1-1.856-.375 4.8 4.8 0 0 1-1.506-1.012A4.8 4.8 0 0 1 1.62 7.857 4.6 4.6 0 0 1 1.246 6q0-.987.375-1.856t1.013-1.506A4.8 4.8 0 0 1 4.14 1.625a4.6 4.6 0 0 1 1.856-.375q.988 0 1.857.375Q8.72 2 9.359 2.638q.637.637 1.012 1.506T10.747 6t-.375 1.857A4.8 4.8 0 0 1 9.36 9.363a4.8 4.8 0 0 1-1.506 1.012q-.87.375-1.857.375", fill: "#F44D2C" })));
4373
- };
4374
- ErrorIcon.defaultProps = {
4375
- size: 18,
4376
- color: theme.colors.gray600,
4377
- activeColor: theme.colors.primaryBase,
4378
- };
4379
-
4380
4264
  const SubtitleBlock = ({ children, align, }) => (React__default.createElement("p", { className: `lead-modal__description ${'le-text-align-' + (align || '')} ${LEAD_CLASS}` }, children));
4381
4265
 
4382
4266
  const cssInputNotShrink = css `
4383
4267
  height: 100% !important;
4384
4268
  min-height: calc(var(--container-height, 56px) * 24 / 56);
4269
+ color: ${theme.colors.gray800};
4270
+ font-size: var(--input, 15px);
4385
4271
  line-height: calc(var(--container-height, 56px) * 24 / 56);
4272
+ letter-spacing: -0.3px;
4386
4273
  border: none !important;
4387
4274
  border-radius: 0 !important;
4388
4275
  outline: none !important;
@@ -4405,6 +4292,11 @@ const cssLabelNotShrink = css `
4405
4292
  position: absolute;
4406
4293
  top: calc(var(--container-height) / 2);
4407
4294
  left: var(--space-x, 16px);
4295
+ color: ${theme.colors.gray400};
4296
+ font-size: var(--label-not-shrink, 15px);
4297
+ font-weight: 500;
4298
+ line-height: calc(var(--container-height, 56px) * 24 / 56);
4299
+ letter-spacing: -0.3px;
4408
4300
  margin: 0;
4409
4301
  z-index: 1;
4410
4302
  cursor: pointer;
@@ -4412,7 +4304,11 @@ const cssLabelNotShrink = css `
4412
4304
  transition: 0.125s ease-in all;
4413
4305
  `;
4414
4306
  const cssLabelShrink = css `
4415
- top: var(--space-y-shrink, 6px);
4307
+ color: ${theme.colors.gray400};
4308
+ font-size: var(--label-shrink, 12px);
4309
+ line-height: calc(var(--container-height, 56px) * 18 / 56);
4310
+ letter-spacing: -0.2px;
4311
+ top: calc(var(--container-height) * 7 / 56);
4416
4312
  transform: none;
4417
4313
  transition: 0.125s ease-out all;
4418
4314
  `;
@@ -4443,7 +4339,7 @@ const cssWrapperInputNotShrink = css `
4443
4339
  const cssWrapperInputShrink = css `
4444
4340
  height: auto;
4445
4341
  min-height: var(--container-height, 56px);
4446
- padding-block: var(--space-y-shrink, 6px);
4342
+ padding-block: var(--space-y-shrink, 7px);
4447
4343
  cursor: text;
4448
4344
  pointer-events: auto;
4449
4345
  `;
@@ -4455,7 +4351,7 @@ const cssInputWrapperError = css `
4455
4351
  const StyledTextFieldContainer = styled.div `
4456
4352
  --space-x: 16px;
4457
4353
  --space-y-not-shrink: 15px;
4458
- --space-y-shrink: 6px;
4354
+ --space-y-shrink: 7px;
4459
4355
  --container-height: 56px;
4460
4356
  --label-not-shrink: 16px;
4461
4357
  --label-shrink: 12px;
@@ -4682,7 +4578,7 @@ const TextField = (props) => {
4682
4578
  setShrink(shrinkProps);
4683
4579
  }, [shrinkProps]);
4684
4580
  return (React__default.createElement(StyledTextFieldContainer, Object.assign({ shrink: shrink, className: clsx(className, 'textField', { textField_shrink: !!shrink }) }, restProps),
4685
- React__default.createElement("div", { ref: containerRef, onClick: onClick, className: "textField_wrapper" }, typeof children === 'function' ? children(shrink) : children)));
4581
+ React__default.createElement("div", { ref: containerRef, onClick: onClick, className: "textField_wrapper" }, children)));
4686
4582
  };
4687
4583
  const ChoiceField = (props) => {
4688
4584
  const { children, className } = props, restProps = __rest(props, ["children", "className"]);
@@ -4693,7 +4589,6 @@ const TitleBlock = ({ children, align, }) => (React__default.createElement("h2",
4693
4589
 
4694
4590
  const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmit, }) => {
4695
4591
  const { t } = useTranslations();
4696
- const { classes } = useTextStyles();
4697
4592
  const form = useLeadFormContext();
4698
4593
  const formValues = form.values;
4699
4594
  const labelTuples = useMemo(() => {
@@ -4713,44 +4608,24 @@ const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmi
4713
4608
  case 'SubtitleBlock':
4714
4609
  return (React__default.createElement(SubtitleBlock, { key: index, align: align }, value));
4715
4610
  case 'TextBlock':
4716
- return (React__default.createElement(TextField, { key: index, shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" }, (shrink) => (React__default.createElement(TextInput, Object.assign({ withAsterisk: required, spellCheck: false, type: "text", placeholder: " ",
4717
- // className="lead-modal__form-control leadgen-form_field"
4718
- // onChangeRaw={(e) => inputOnChange('text', e)}
4719
- label: React__default.createElement(Text, { size: shrink ? 'p3' : 'p2', variant: "secondary", weight: "halfBold" }, label), "data-control": "text", "data-lead-control": name, "data-is-required": required, inputWrapperOrder: [
4720
- 'label',
4721
- 'input',
4722
- 'description',
4723
- 'error',
4724
- ] }, form.getInputProps(value), { name: value, error: form.errors[value] && (React__default.createElement(Flex, { align: 'center', gap: 4 },
4725
- React__default.createElement(ErrorIcon, { size: 12 }),
4726
- React__default.createElement(Text, { size: "c1", variant: "error" }, form.errors[value]))) })))));
4611
+ return (React__default.createElement(TextField, { key: index, shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
4612
+ React__default.createElement(TextInput, Object.assign({ withAsterisk: required, spellCheck: false, type: "text", placeholder: " ",
4613
+ // className="lead-modal__form-control leadgen-form_field"
4614
+ // onChangeRaw={(e) => inputOnChange('text', e)}
4615
+ label: label, "data-control": "text", "data-lead-control": name, "data-is-required": required, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value), { name: value }))));
4727
4616
  case 'NumberBlock':
4728
- return (React__default.createElement(TextField, { key: index, shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" }, (shrink) => (React__default.createElement(NumberInput$1, Object.assign({ withAsterisk: required, spellCheck: false, type: "number", placeholder: " ",
4729
- // className="lead-modal__form-control leadgen-form_field"
4730
- // onChange={(e) => inputOnChange('number', e)}
4731
- label: React__default.createElement(Text, { size: shrink ? 'p3' : 'p2', variant: "secondary", weight: "halfBold" }, label), "data-control": "number", "data-lead-control": name, "data-is-required": required, name: value, inputWrapperOrder: [
4732
- 'label',
4733
- 'input',
4734
- 'description',
4735
- 'error',
4736
- ] }, form.getInputProps(value), { error: form.errors[value] && (React__default.createElement(Flex, { align: 'center', gap: 4 },
4737
- React__default.createElement(ErrorIcon, { size: 12 }),
4738
- React__default.createElement(Text, { size: "c1", variant: "error" }, form.errors[value]))) })))));
4617
+ return (React__default.createElement(TextField, { key: index, shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
4618
+ React__default.createElement(NumberInput$1, Object.assign({ withAsterisk: required, spellCheck: false, type: "number", placeholder: " ",
4619
+ // className="lead-modal__form-control leadgen-form_field"
4620
+ // onChange={(e) => inputOnChange('number', e)}
4621
+ label: label, "data-control": "number", "data-lead-control": name, "data-is-required": required, name: value, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
4739
4622
  case 'EmailBlock':
4740
- return (React__default.createElement(TextField, { key: index, shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" }, (shrink) => (React__default.createElement(TextInput, Object.assign({ withAsterisk: required, spellCheck: false,
4741
- // type="email"
4742
- placeholder: " ",
4743
- // className="lead-modal__form-control leadgen-form_field"
4744
- label: React__default.createElement(Text, { size: shrink ? 'p3' : 'p2', variant: "secondary", weight: "halfBold" }, label), "data-control": "email", "data-lead-control": name, "data-is-required": required, name: value, inputWrapperOrder: [
4745
- 'label',
4746
- 'input',
4747
- 'description',
4748
- 'error',
4749
- ] }, form.getInputProps(value), { error: form.errors[value] && (React__default.createElement(Flex, { align: 'center', gap: 4 },
4750
- React__default.createElement(ErrorIcon, { size: 12 }),
4751
- React__default.createElement(Text, { size: "c1", variant: "error" }, form.errors[value]))), styles: (theme) => ({
4752
- input: GlobalTextStyleNew(theme)[CustomStylesType.LEADGEN].p2,
4753
- }) })))));
4623
+ return (React__default.createElement(TextField, { key: index, shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
4624
+ React__default.createElement(TextInput, Object.assign({ withAsterisk: required, spellCheck: false,
4625
+ // type="email"
4626
+ placeholder: " ",
4627
+ // className="lead-modal__form-control leadgen-form_field"
4628
+ label: label, "data-control": "email", "data-lead-control": name, "data-is-required": required, name: value, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
4754
4629
  case 'PhoneOtpBlock':
4755
4630
  case 'WhatsappOtpBlock':
4756
4631
  case 'ZaloOtpBlock':
@@ -4759,30 +4634,20 @@ const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmi
4759
4634
  const _b = form.getInputProps(value), { error } = _b, formPhoneInputWrapper = __rest(_b, ["error"]);
4760
4635
  return (React__default.createElement(TextField, { key: index, shrink: !!formValue, className: clsx('lead-modal__form-control leadgen-form_field', {
4761
4636
  'leadgen-form_field_error': !!error,
4762
- }) }, (shrink) => (React__default.createElement(Input$1.Wrapper, { size: "md", withAsterisk: required, label: React__default.createElement(Text, { size: shrink ? 'p3' : 'p2', variant: "secondary", weight: "halfBold" }, label), "data-invalid": !!error, labelProps: { htmlFor: htmlForId }, inputWrapperOrder: [
4763
- 'label',
4764
- 'input',
4765
- 'description',
4766
- 'error',
4767
- ], error: error },
4768
- React__default.createElement("div", { className: "mantine-Input-wrapper" },
4769
- React__default.createElement(Phone, Object.assign({ className: `mantine-Input-input ${classes.p2}`, name: value, spellCheck: false, type: "tel", placeholder: " ",
4770
- // onBlur={(e) => inputOnBlur('tel', e)}
4771
- id: htmlForId, defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), "data-control": "tel", "data-lead-control": name, "data-is-required": required }, formPhoneInputWrapper)))))));
4637
+ }) },
4638
+ React__default.createElement(Input$1.Wrapper, { size: "md", withAsterisk: required, label: label, "data-invalid": !!error, labelProps: { htmlFor: htmlForId }, inputWrapperOrder: ['label', 'input', 'description', 'error'], error: error },
4639
+ React__default.createElement("div", { className: "mantine-Input-wrapper" },
4640
+ React__default.createElement(Phone, Object.assign({ className: "mantine-Input-input", name: value, spellCheck: false, type: "tel", placeholder: " ",
4641
+ // onBlur={(e) => inputOnBlur('tel', e)}
4642
+ id: htmlForId, defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), "data-control": "tel", "data-lead-control": name, "data-is-required": required }, formPhoneInputWrapper))))));
4772
4643
  }
4773
4644
  case 'LocationBlock': {
4774
- return (React__default.createElement(TextField, { key: index, shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" }, (shrink) => (React__default.createElement(GoogleLocationBlock, Object.assign({ withAsterisk: required, name: value, placeholder: " ", label: React__default.createElement(Text, { size: shrink ? 'p3' : 'p2', variant: "secondary", weight: "halfBold" }, label), "data-control": "text", "data-lead-control": name, "data-is-required": required, locale: locale, inputWrapperOrder: [
4775
- 'label',
4776
- 'input',
4777
- 'description',
4778
- 'error',
4779
- ] }, form.getInputProps(value))))));
4645
+ return (React__default.createElement(TextField, { key: index, shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
4646
+ React__default.createElement(GoogleLocationBlock, Object.assign({ withAsterisk: required, name: value, placeholder: " ", label: label, "data-control": "text", "data-lead-control": name, "data-is-required": required, locale: locale, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
4780
4647
  }
4781
4648
  case 'DateBlock': {
4782
4649
  const _c = form.getInputProps(value), { error } = _c, formInputProps = __rest(_c, ["error"]);
4783
- return (React__default.createElement(Input$1.Wrapper, { key: index, size: "md", withAsterisk: required, label: React__default.createElement(Text, { size: "p2", variant: "primary" }, label), "data-invalid": !!error, inputWrapperOrder: ['label', 'input', 'description', 'error'], error: form.errors[value] && (React__default.createElement(Flex, { align: 'center', gap: 4 },
4784
- React__default.createElement(ErrorIcon, { size: 12 }),
4785
- React__default.createElement(Text, { size: "c1", variant: "error" }, form.errors[value]))), className: "lead-modal__form-control leadgen-form_field" },
4650
+ return (React__default.createElement(Input$1.Wrapper, { key: index, size: "md", withAsterisk: required, label: label, "data-invalid": !!error, inputWrapperOrder: ['label', 'input', 'description', 'error'], error: error, className: "lead-modal__form-control leadgen-form_field" },
4786
4651
  React__default.createElement(InputDate, Object.assign({ name: value, error: Boolean(error), locale: locale, "data-extra": true, "data-name": value, "data-control": "date", "data-lead-control": name, "data-is-required": required, className: "leadgen-form_field_date", labelTuples: labelTuples }, formInputProps))));
4787
4652
  }
4788
4653
  case 'LinkButtonBlock':
@@ -4799,7 +4664,7 @@ const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmi
4799
4664
  }, "data-name": value + '-mailchimp' })),
4800
4665
  React__default.createElement(Checkbox.Group, Object.assign({ withAsterisk: required,
4801
4666
  // className="lead-modal__form-control leadgen-form_field"
4802
- label: React__default.createElement(Text, { size: "p2", variant: "primary" }, label), size: "md", sx: {
4667
+ label: label, size: "md", sx: {
4803
4668
  display: 'flex',
4804
4669
  flexDirection: 'column',
4805
4670
  flexWrap: 'wrap',
@@ -4812,22 +4677,20 @@ const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmi
4812
4677
  isSendMailChimp && (React__default.createElement(Input$1, { type: "hidden", name: value + '-mailchimp', value: isSendMailChimp })),
4813
4678
  React__default.createElement(Radio.Group, Object.assign({ withAsterisk: required,
4814
4679
  // className="lead-modal__form-control leadgen-form_field"
4815
- label: React__default.createElement(Text, { size: "p2", variant: "primary" }, label), size: "md", inputWrapperOrder: ['label', 'input', 'description', 'error'], inputContainer: (children) => {
4680
+ label: label, size: "md", inputWrapperOrder: ['label', 'input', 'description', 'error'], inputContainer: (children) => {
4816
4681
  return (React__default.createElement("div", { className: "leadgen-choiceContainer" }, children));
4817
4682
  } }, form.getInputProps(value)), listQuestion.map((l, _index) => (React__default.createElement(Radio, { name: value, key: _index, value: l.value, label: l.placeholder, "data-control": "radio", "data-lead-control": name, "data-is-required": required }))))));
4818
4683
  case 'DropdownBlock':
4819
- return (React__default.createElement(TextField, { shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field DropdownBlock", key: index }, (shrink) => (React__default.createElement(React__default.Fragment, null,
4684
+ return (React__default.createElement(TextField, { shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field DropdownBlock", key: index },
4820
4685
  React__default.createElement("div", { style: { display: 'none' }, "data-extra": true, "data-name": value, "data-control": 'dropdown', "data-lead-control": name, "data-is-required": required }),
4821
4686
  React__default.createElement(Select
4822
4687
  // className="lead-modal__form-control leadgen-form_field"
4823
4688
  , Object.assign({
4824
4689
  // className="lead-modal__form-control leadgen-form_field"
4825
- label: React__default.createElement(Text, { size: shrink ? 'p3' : 'p2', variant: "secondary", weight: "halfBold" }, label), placeholder: " ", searchable: true, withAsterisk: required, name: value, data: listQuestion.map((l) => ({
4690
+ label: label, placeholder: " ", searchable: true, withAsterisk: required, name: value, data: listQuestion.map((l) => ({
4826
4691
  value: l.value,
4827
4692
  label: l.placeholder,
4828
- })), nothingFound: React__default.createElement(NoData, null), error: form.errors[value] && (React__default.createElement(Flex, { align: 'center', gap: 4 },
4829
- React__default.createElement(ErrorIcon, { size: 12 }),
4830
- React__default.createElement(Text, { size: "c1", variant: "error" }, form.errors[value]))), styles: {
4693
+ })), nothingFound: React__default.createElement(NoData, null), styles: {
4831
4694
  item: {
4832
4695
  paddingBlock: 12,
4833
4696
  paddingInline: 10,
@@ -4848,19 +4711,20 @@ const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmi
4848
4711
  paddingInline: 0,
4849
4712
  },
4850
4713
  },
4851
- }, maxDropdownHeight: 192 }, form.getInputProps(value)))))));
4714
+ }, maxDropdownHeight: 192 }, form.getInputProps(value)))));
4852
4715
  case 'TncBlock':
4853
4716
  const _d = form.getInputProps(`TNC-${id}`), { error } = _d, tncInputProps = __rest(_d, ["error"]);
4854
4717
  return (React__default.createElement(ChoiceField, { className: "leadgen-form_checkbox", key: id },
4855
4718
  React__default.createElement(Input$1.Wrapper, { error: error },
4856
- 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
+ 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) => ({
4857
4720
  root: {
4858
4721
  a: {
4859
- textDecoration: 'underline',
4722
+ textDecoration: 'underline !important',
4860
4723
  textUnderlineOffset: '3px',
4724
+ color: `${theme.colors.gray[7]} !important`,
4861
4725
  },
4862
4726
  },
4863
- } }), className: "tnc-block", "data-control": "checkbox", "data-lead-control": name, "data-is-required": required }, tncInputProps)))));
4727
+ }) }), className: "tnc-block", "data-control": "checkbox", "data-lead-control": name, "data-is-required": required }, tncInputProps)))));
4864
4728
  }
4865
4729
  return null;
4866
4730
  })));
@@ -5113,7 +4977,7 @@ const LEADGEN_SHOW_HEADER = [
5113
4977
  ];
5114
4978
  // const CAMPAGE_CODE_LIST_APPLY_NEW_UI = ['ri3lkoxcetjoj39', 'u0adw7hw8kw7t89']
5115
4979
  const CAMPAGE_CODE_LIST_APPLY_NEW_UI = ['ri3lkoxcetjoj39'];
5116
- 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
+ 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, }) => {
5117
4981
  var _a, _b;
5118
4982
  const { primaryColor } = useContext(LeadGenContext$1);
5119
4983
  const { isMobile } = useScreenSize();
@@ -5513,7 +5377,7 @@ const LightboxLayout = ({ flatComponent, popupId, extraFields, onClose: onCloseP
5513
5377
  return React__default.createElement(SideBarLayout, { content: PopupContainer });
5514
5378
  }
5515
5379
  else if (isInline) {
5516
- return (React__default.createElement(InlineLayout, { flatComponent: flatComponent, action: action, content: PopupContainer, campaignCode: campaignCode, inlinePosition: extraFields.popupInlinePosition, doImpression: handleDoImpression }));
5380
+ return (React__default.createElement(InlineLayout, { action: action, content: PopupContainer, campaignCode: campaignCode, inlinePosition: extraFields.popupInlinePosition, doImpression: handleDoImpression }));
5517
5381
  }
5518
5382
  return null;
5519
5383
  };
@@ -5606,7 +5470,7 @@ function getCategoryLevel(t = 'Xin chao {{category_2}} extra') {
5606
5470
  return null;
5607
5471
  }
5608
5472
  }
5609
- const NewLeadPopup = ({ flatComponent, campaign, action, onSubmit, onClose, onUnmount, doImpression, showThankyou, locale, showEmpty, setShowEmpty, userInfo, }) => {
5473
+ const NewLeadPopup = ({ campaign, action, onSubmit, onClose, onUnmount, doImpression, showThankyou, locale, showEmpty, setShowEmpty, userInfo, }) => {
5610
5474
  var _a, _b;
5611
5475
  const { apiUrl, siteDomain } = useContext(LeadGenContext$1);
5612
5476
  const { extra_fields, image, image_desktop, code, image_background, image_overlay_mobile, image_overlay_desktop, } = campaign || {};
@@ -5709,7 +5573,7 @@ const NewLeadPopup = ({ flatComponent, campaign, action, onSubmit, onClose, onUn
5709
5573
  currentLayout == 'Fullscreen' ||
5710
5574
  currentLayout == 'Sidebar' ||
5711
5575
  currentLayout == 'Slider') {
5712
- 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
+ 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 }));
5713
5577
  }
5714
5578
  else if (currentLayout.includes('Skin')) {
5715
5579
  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 }));
@@ -5801,7 +5665,7 @@ const formatTrackingData = (params) => {
5801
5665
  };
5802
5666
 
5803
5667
  // mount css
5804
- const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor, apiSubotUrl, DEBUG_URL, forceCampaign, children, extraPayloadValues = [], excludeExitRulesHandler, userInfo, onClose: onCloseProps, onSubmit: onSubmitProps, flatComponent, }) => {
5668
+ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor, apiSubotUrl, DEBUG_URL, forceCampaign, children, extraPayloadValues = [], excludeExitRulesHandler, userInfo, onClose: onCloseProps, onSubmit: onSubmitProps, }) => {
5805
5669
  var _a, _b;
5806
5670
  const scrollEventHandlerRef = useRef();
5807
5671
  const leadStartTimeRef = useRef(Date.now());
@@ -5913,10 +5777,12 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor
5913
5777
  const { listBlockAdded = [] } = params || {};
5914
5778
  if (!TEMPLATE_ALLOW_NEWTRACKING.includes(currentLayout))
5915
5779
  return;
5780
+ const gaCookie = getCookie('_ga') || null;
5781
+ const cookieId = getCookie('hhg-id') || '';
5916
5782
  const data = formatTrackingData({
5917
5783
  commonData: {
5918
- cookie_id: getCookie('hhg-id') || '',
5919
- ga_client_id: getCookie('_ga') || null,
5784
+ cookie_id: cookieId,
5785
+ ga_client_id: gaCookie,
5920
5786
  country_code: locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN',
5921
5787
  status: 'in_progress',
5922
5788
  campaign_id: showCampaign === null || showCampaign === void 0 ? void 0 : showCampaign.id,
@@ -5926,13 +5792,28 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor
5926
5792
  currentLayout,
5927
5793
  formParams: Object.assign(Object.assign({}, params), { listBlockAdded, formValues: [] }),
5928
5794
  });
5929
- return fetch(`${apiUrl}api/collection/tracking-completion`, {
5930
- method: 'POST',
5931
- headers: {
5932
- 'Content-Type': 'application/json',
5933
- },
5934
- body: JSON.stringify(data),
5935
- });
5795
+ return Promise.all([
5796
+ fetch(`${apiUrl}api/collection/tracking-completion`, {
5797
+ method: 'POST',
5798
+ headers: {
5799
+ 'Content-Type': 'application/json',
5800
+ },
5801
+ body: JSON.stringify(data),
5802
+ }),
5803
+ fetch(`${apiUrl}api/campaign/${showCampaign.code}/impression`, {
5804
+ method: 'POST',
5805
+ headers: {
5806
+ 'Content-Type': 'application/json',
5807
+ },
5808
+ body: JSON.stringify({
5809
+ action,
5810
+ url: location.href.toLowerCase(),
5811
+ title_article: document.title,
5812
+ cookie_id: getCookie('hhg-id'),
5813
+ ga_client_id: gaCookie,
5814
+ }),
5815
+ }),
5816
+ ]);
5936
5817
  };
5937
5818
  useEffect(() => {
5938
5819
  if (forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.code)
@@ -6141,7 +6022,7 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor
6141
6022
  !!currentLayout &&
6142
6023
  !currentLayout.includes('Inline') &&
6143
6024
  !currentLayout.includes('Sidebar') && (React__default.createElement(Overlay, { color: "#000", opacity: 0.6, center: true, zIndex: 400, pos: 'fixed', onClick: () => onClose() })),
6144
- 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 })))));
6025
+ 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 })))));
6145
6026
  }))))))));
6146
6027
  };
6147
6028
  const LeadGen = _LeadGen;
@@ -6152,4 +6033,4 @@ LeadGen.Thankyou = Thankyou;
6152
6033
  LeadGen.OtpForm = OtpBlock$1;
6153
6034
  LeadGen.Close = Close;
6154
6035
 
6155
- export { LeadGen, LeadGenInline, LeadGenSubscriptionBox, leadGenInlineGetCampaign };
6036
+ export { LeadGen, LeadGenSubscriptionBox };