@hhgtech/hhg-components 1.29.412-beta-1 → 1.29.412-beta-2

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 (505) hide show
  1. package/build/{InputDate-221e2b86.js → InputDate-ed79b015.js} +3 -3
  2. package/build/{LastPeriod-fde2c68b.js → LastPeriod-42816b8b.js} +1 -1
  3. package/build/{MobileBottomNavigationIcon-13c8c89d.js → MobileBottomNavigationIcon-8619c39e.js} +3 -3
  4. package/build/{Spinner-85394f00.js → Spinner-0a0906dc.js} +1 -1
  5. package/build/{WhatsApp-06865b68.js → WhatsApp-edbf66f7.js} +1 -1
  6. package/build/adapters.js +19 -19
  7. package/build/atoms.js +48 -48
  8. package/build/babyGrowth.js +83 -83
  9. package/build/cache.js +2 -2
  10. package/build/care.js +17 -17
  11. package/build/careBookingSearchBar.js +14 -14
  12. package/build/careBookingSearchBarV2.js +15 -15
  13. package/build/components.js +97 -97
  14. package/build/{constants-679ec3d4.js → constants-0aaecc73.js} +1 -1
  15. package/build/constants.js +3 -3
  16. package/build/constantsDomainLocales.js +1 -1
  17. package/build/constantsRiskScreener.js +2 -2
  18. package/build/constantsSite.js +2 -2
  19. package/build/{core-0adece9a.js → core-3c79cf8b.js} +1 -1
  20. package/build/{dataTransform-4cf25f6e.js → dataTransform-ca295670.js} +1 -1
  21. package/build/ecom.js +4 -4
  22. package/build/{editor-6cf08c63.js → editor-678d906b.js} +11 -11
  23. package/build/embeddedHeathToolCards_babyGrowth.js +23 -23
  24. package/build/embeddedHeathToolCards_babyPoop.js +19 -19
  25. package/build/embeddedHeathToolCards_babyVaccine.js +22 -22
  26. package/build/embeddedHeathToolCards_bmi_bmi.js +25 -25
  27. package/build/embeddedHeathToolCards_bmrBmr.js +25 -25
  28. package/build/embeddedHeathToolCards_dueDate_dueDate.js +22 -22
  29. package/build/embeddedHeathToolCards_ovulation_ovulation.js +22 -22
  30. package/build/embeddedHeathToolCards_pwg_pwg.js +26 -26
  31. package/build/embeddedHeathToolCards_targetHeartRate.js +27 -27
  32. package/build/esm/{InputDate-8f77e635.js → InputDate-0bbec559.js} +3 -3
  33. package/build/esm/{LastPeriod-704d0b80.js → LastPeriod-3dd9d643.js} +1 -1
  34. package/build/esm/{MobileBottomNavigationIcon-52be3505.js → MobileBottomNavigationIcon-20ec3809.js} +3 -3
  35. package/build/esm/{Spinner-dfb125ae.js → Spinner-240948a1.js} +1 -1
  36. package/build/esm/{WhatsApp-f58d851d.js → WhatsApp-1d0093d1.js} +1 -1
  37. package/build/esm/adapters.js +19 -19
  38. package/build/esm/atoms.js +48 -48
  39. package/build/esm/babyGrowth.js +83 -83
  40. package/build/esm/cache.js +2 -2
  41. package/build/esm/care.js +17 -17
  42. package/build/esm/careBookingSearchBar.js +14 -14
  43. package/build/esm/careBookingSearchBarV2.js +15 -15
  44. package/build/esm/components.js +97 -97
  45. package/build/esm/{constants-eed5bd19.js → constants-22bf5acc.js} +1 -1
  46. package/build/esm/constants.js +3 -3
  47. package/build/esm/constantsDomainLocales.js +1 -1
  48. package/build/esm/constantsRiskScreener.js +2 -2
  49. package/build/esm/constantsSite.js +2 -2
  50. package/build/esm/{core-60660373.js → core-6ab12e45.js} +1 -1
  51. package/build/esm/{dataTransform-ad893090.js → dataTransform-387ab1df.js} +1 -1
  52. package/build/esm/ecom.js +4 -4
  53. package/build/esm/{editor-388d45eb.js → editor-93f4cca9.js} +11 -11
  54. package/build/esm/embeddedHeathToolCards_babyGrowth.js +23 -23
  55. package/build/esm/embeddedHeathToolCards_babyPoop.js +19 -19
  56. package/build/esm/embeddedHeathToolCards_babyVaccine.js +22 -22
  57. package/build/esm/embeddedHeathToolCards_bmi_bmi.js +25 -25
  58. package/build/esm/embeddedHeathToolCards_bmrBmr.js +25 -25
  59. package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +22 -22
  60. package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +22 -22
  61. package/build/esm/embeddedHeathToolCards_pwg_pwg.js +26 -26
  62. package/build/esm/embeddedHeathToolCards_targetHeartRate.js +27 -27
  63. package/build/esm/footer.js +21 -21
  64. package/build/esm/gAssets.js +2 -2
  65. package/build/esm/{healthTools-9d2ad5ee.js → healthTools-a6938099.js} +1 -1
  66. package/build/esm/healthToolsCardWrapper.js +18 -18
  67. package/build/esm/healthToolsForm.js +33 -33
  68. package/build/esm/hooks.js +13 -13
  69. package/build/esm/i18n.js +2 -2
  70. package/build/esm/i18nV2.js +2 -2
  71. package/build/esm/{index-f6bc4615.js → index-0061ed46.js} +2 -2
  72. package/build/esm/{index-c238e4a1.js → index-01add604.js} +1 -1
  73. package/build/esm/{index-62ec54fa.js → index-07b00729.js} +16 -16
  74. package/build/esm/{index-2dfb2ce4.js → index-09f17ac2.js} +3 -3
  75. package/build/esm/{index-ea40d288.js → index-1293880c.js} +17 -17
  76. package/build/esm/{index-8f6acd0e.js → index-18509ee4.js} +16 -16
  77. package/build/esm/{index-4c252dd1.js → index-193f73db.js} +24 -24
  78. package/build/esm/{index-79697bda.js → index-24ff1b39.js} +16 -16
  79. package/build/esm/{index-091703b2.js → index-25a90043.js} +2 -2
  80. package/build/esm/{index-0c8e97cd.js → index-31c505ff.js} +2 -2
  81. package/build/esm/{index-bea7f3ae.js → index-323122ff.js} +2 -2
  82. package/build/esm/{index-5893777b.js → index-3293b6d7.js} +4 -4
  83. package/build/esm/{index-8d957966.js → index-3a63c163.js} +13 -13
  84. package/build/esm/{index-9e5c3723.js → index-3d6fe6ea.js} +30 -30
  85. package/build/esm/{index-e3236e06.js → index-40eaa481.js} +2 -2
  86. package/build/esm/{index-ef9cae30.js → index-40ed5b08.js} +10 -10
  87. package/build/esm/{index-537c6e2b.js → index-43b49421.js} +1 -1
  88. package/build/esm/{index-be2f672b.js → index-457d76c7.js} +3 -3
  89. package/build/esm/{index-9083955c.js → index-46576e24.js} +2 -2
  90. package/build/esm/{index-57bb0d84.js → index-49547dd9.js} +6 -6
  91. package/build/esm/{index-1a286f35.js → index-4e1b366e.js} +2 -2
  92. package/build/esm/{index-9f29d2d8.js → index-505bf495.js} +3 -3
  93. package/build/esm/{index-2e752219.js → index-552328f5.js} +6 -6
  94. package/build/esm/{index-ac2a0bb3.js → index-57832acf.js} +6 -6
  95. package/build/esm/{index-308b90bf.js → index-5786325f.js} +2 -2
  96. package/build/esm/{index-fcc4e920.js → index-651960be.js} +17 -17
  97. package/build/esm/{index-214d883d.js → index-6c1d5e44.js} +13 -13
  98. package/build/esm/{index-b71cbec5.js → index-6e6d1bb0.js} +31 -31
  99. package/build/esm/{index-3acb3f81.js → index-6f3f14b8.js} +2 -2
  100. package/build/esm/{index-7d4b066f.js → index-70883c59.js} +5 -5
  101. package/build/esm/{index-669d1dd2.js → index-71dd6c95.js} +17 -17
  102. package/build/esm/{index-5eda1acd.js → index-73be0d60.js} +5 -5
  103. package/build/esm/{index-e75d1126.js → index-7bc4f0c5.js} +11 -11
  104. package/build/esm/{index-eed29ea1.js → index-7d2dae6f.js} +7 -7
  105. package/build/esm/{index-5eda6556.js → index-7e81d925.js} +15 -15
  106. package/build/esm/{index-bcf6d430.js → index-84262003.js} +11 -11
  107. package/build/esm/{index-83a8c707.js → index-8866edcb.js} +32 -32
  108. package/build/esm/{index-ad567dcb.js → index-98411bb0.js} +6 -6
  109. package/build/esm/{index-9eae613b.js → index-998bba67.js} +7 -7
  110. package/build/esm/{index-3872ab78.js → index-9c2fb6cc.js} +2 -2
  111. package/build/esm/{index-d12bff7a.js → index-9fff2952.js} +2 -2
  112. package/build/esm/{index-347be638.js → index-a0e9affe.js} +18 -18
  113. package/build/esm/{index-448048b2.js → index-a2cc229f.js} +1 -1
  114. package/build/esm/{index-ffad5b23.js → index-a2d6d225.js} +4 -4
  115. package/build/esm/{index-b987ac0b.js → index-ac5c3e73.js} +1 -1
  116. package/build/esm/{index-e38a7e9a.js → index-ad67e887.js} +2 -2
  117. package/build/esm/{index-9f20b0e9.js → index-adeaf5df.js} +25 -25
  118. package/build/esm/{index-fad614a0.js → index-ae969513.js} +1 -1
  119. package/build/esm/{index-ccecaf4a.js → index-af45a977.js} +18 -18
  120. package/build/esm/{index-f5a69ea2.js → index-bc04fec2.js} +6 -6
  121. package/build/esm/{index-21e1017a.js → index-bf147454.js} +1 -1
  122. package/build/esm/{index-30926a97.js → index-bff29283.js} +1 -1
  123. package/build/esm/{index-cec74350.js → index-c9d5f51d.js} +13 -13
  124. package/build/esm/{index-dbff968f.js → index-cbc20386.js} +22 -22
  125. package/build/esm/{index-c06f4c8e.js → index-d5e632ad.js} +21 -21
  126. package/build/esm/{index-67c40927.js → index-d8ae332d.js} +3 -3
  127. package/build/esm/{index-bac05ae2.js → index-e0d12d52.js} +2 -2
  128. package/build/esm/{index-d1c0b6a4.js → index-e6f48688.js} +16 -16
  129. package/build/esm/{index-4a488339.js → index-ea97eb49.js} +3 -3
  130. package/build/esm/{index-d63a420f.js → index-eb01d17e.js} +1 -1
  131. package/build/esm/{index-81dd9dce.js → index-ee85c770.js} +2 -2
  132. package/build/esm/{index-bc0ca346.js → index-f4c0a637.js} +1 -1
  133. package/build/esm/{index-f10de9ac.js → index-f7dcf2b7.js} +17 -17
  134. package/build/esm/{index-0ed9c3e1.js → index-fa4ece5a.js} +3 -3
  135. package/build/esm/{index-0e213b54.js → index-fb80c0d3.js} +13 -13
  136. package/build/esm/index.js +118 -118
  137. package/build/esm/{labelSorting-208be748.js → labelSorting-d32e85e1.js} +4 -4
  138. package/build/esm/lead/LeadGen.helpers.d.ts +2 -2
  139. package/build/esm/lead/LeadGen.type.d.ts +3 -0
  140. package/build/esm/lead/LeadGenInline/LeadGenInline.d.ts +8 -0
  141. package/build/esm/lead/LeadGenInline/index.d.ts +2 -0
  142. package/build/esm/lead/LeadGenSubscriptionBox/LeadGenContext.d.ts +19 -12
  143. package/build/esm/lead/index.d.ts +5 -1
  144. package/build/esm/lead/layouts/inline.d.ts +3 -2
  145. package/build/esm/lead/layouts/lightbox/index.d.ts +2 -1
  146. package/build/esm/lead/newLeadPopup.d.ts +2 -1
  147. package/build/esm/lead/services/index.d.ts +4 -0
  148. package/build/esm/lead/services/index.type.d.ts +5 -0
  149. package/build/esm/lead/utils.d.ts +18 -0
  150. package/build/esm/lead.js +409 -308
  151. package/build/esm/{logoIcon-19b5b651.js → logoIcon-bf16bc9e.js} +2 -2
  152. package/build/esm/mantine.js +25 -25
  153. package/build/esm/misc/cachedSystem.d.ts +5 -0
  154. package/build/esm/misc.js +17 -17
  155. package/build/esm/miscGetDynamicHealthTool.js +4 -4
  156. package/build/esm/miscGetSocialList.js +8 -8
  157. package/build/esm/miscScreenSizeContext.js +1 -1
  158. package/build/esm/mobileBottomNavigation.js +5 -5
  159. package/build/esm/mobileBottomNavigationIcon.js +5 -5
  160. package/build/esm/molecules.js +74 -74
  161. package/build/esm/moleculesArticleCard.js +6 -6
  162. package/build/esm/moleculesArticleCardV2.js +16 -16
  163. package/build/esm/navigation.js +46 -46
  164. package/build/esm/navigationLogoutPopup.js +9 -9
  165. package/build/esm/navigationProfileButton.js +26 -26
  166. package/build/esm/onboardingV2.js +29 -29
  167. package/build/esm/organisms.js +50 -50
  168. package/build/esm/{post-27cfe9de.js → post-a4c5a627.js} +2 -2
  169. package/build/esm/profileNavigation.js +19 -19
  170. package/build/esm/progressBar.js +1 -1
  171. package/build/esm/pwg.js +22 -22
  172. package/build/esm/ssoV2.js +30 -30
  173. package/build/esm/{store-16a4940a.js → store-d6c8b226.js} +3 -3
  174. package/build/esm/subot.js +36 -36
  175. package/build/esm/surveyOrPremiumBanner.js +33 -33
  176. package/build/esm/surveyQuestionCard.js +10 -10
  177. package/build/esm/{surveyThankyouCard-709a21db.js → surveyThankyouCard-fe8a9feb.js} +5 -5
  178. package/build/esm/together.js +56 -56
  179. package/build/esm/togetherApiUtils.js +4 -4
  180. package/build/esm/togetherAtoms.js +30 -30
  181. package/build/esm/togetherComponentGlobalContext.js +4 -4
  182. package/build/esm/togetherMolecules.js +51 -51
  183. package/build/esm/togetherMoleculesCardAuthor.js +28 -28
  184. package/build/esm/togetherMoleculesPostImagePreview.js +11 -11
  185. package/build/esm/togetherMoleculesProfileDetail.js +39 -39
  186. package/build/esm/togetherOrganisms.js +50 -50
  187. package/build/esm/togetherRichTextEditor.js +17 -17
  188. package/build/esm/togetherShareBox.js +10 -10
  189. package/build/esm/{translationsProvider-62ea3de4.js → translationsProvider-e069443f.js} +1 -1
  190. package/build/esm/{treePopoverMenu-f37dcdeb.js → treePopoverMenu-bfdf959e.js} +19 -19
  191. package/build/esm/{types-7e43d807.js → types-69c5efb6.js} +2 -2
  192. package/build/esm/types.js +2 -2
  193. package/build/esm/{useCategory-60b56fd9.js → useCategory-f873a41b.js} +5 -5
  194. package/build/esm/{useHealthToolCache-22bda60e.js → useHealthToolCache-991d03b0.js} +1 -1
  195. package/build/esm/{useMantineLocale-dcc2ae17.js → useMantineLocale-67d4f2b9.js} +6 -6
  196. package/build/esm/{usePlacesAutocomplete-9456bd65.js → usePlacesAutocomplete-9317e0ff.js} +1 -1
  197. package/build/esm/{useScreenSize-56424798.js → useScreenSize-4385d138.js} +2 -2
  198. package/build/esm/useTogetherAuthRequiredAction.js +10 -10
  199. package/build/esm/{utils-bf62717c.js → utils-4f20ccfb.js} +3 -3
  200. package/build/esm/{utils-712baac3.js → utils-7af182bc.js} +2 -2
  201. package/build/esm/{utils-a1edf3ab.js → utils-ad82bf19.js} +5 -5
  202. package/build/esm/{utils-44361e9a.js → utils-b2e5e5ad.js} +2 -2
  203. package/build/esm/vaccination.js +21 -21
  204. package/build/footer.js +21 -21
  205. package/build/gAssets.js +2 -2
  206. package/build/{healthTools-b8ef1d92.js → healthTools-a92bd8b2.js} +1 -1
  207. package/build/healthToolsCardWrapper.js +18 -18
  208. package/build/healthToolsForm.js +33 -33
  209. package/build/hooks.js +13 -13
  210. package/build/i18n.js +2 -2
  211. package/build/i18nV2.js +1 -1
  212. package/build/{index-c7482872.js → index-00ffa650.js} +1 -1
  213. package/build/{index-e6ed66f7.js → index-01000f4b.js} +2 -2
  214. package/build/{index-c2952244.js → index-05199167.js} +1 -1
  215. package/build/{index-30bfa99c.js → index-0a71128d.js} +17 -17
  216. package/build/{index-7d4fe52b.js → index-0c06baa2.js} +3 -3
  217. package/build/{index-2068bad3.js → index-0c1ca66b.js} +24 -24
  218. package/build/{index-339928b4.js → index-0e2e9008.js} +16 -16
  219. package/build/{index-7799ffb8.js → index-12cc92e9.js} +1 -1
  220. package/build/{index-ee3e9ef9.js → index-13cd06ea.js} +2 -2
  221. package/build/{index-f248e1d3.js → index-176486c9.js} +16 -16
  222. package/build/{index-5bc29df8.js → index-19b0b4b8.js} +17 -17
  223. package/build/{index-e582ec81.js → index-213df21d.js} +17 -17
  224. package/build/{index-cbeb8056.js → index-256fe4f5.js} +16 -16
  225. package/build/{index-bdbc67ee.js → index-3a2acb2b.js} +3 -3
  226. package/build/{index-0d150b8e.js → index-3d895c07.js} +18 -18
  227. package/build/{index-71a120fe.js → index-3dddfe93.js} +13 -13
  228. package/build/{index-b9bec3a2.js → index-410b848b.js} +7 -7
  229. package/build/{index-791a18ec.js → index-514e4159.js} +16 -16
  230. package/build/{index-348c8d22.js → index-57c64d51.js} +6 -6
  231. package/build/{index-5a93efad.js → index-5a7bdf69.js} +2 -2
  232. package/build/{index-571ee09e.js → index-5c730c6b.js} +10 -10
  233. package/build/{index-2ef8bcd4.js → index-5d53ab0d.js} +6 -6
  234. package/build/{index-fb04b623.js → index-609cb1a5.js} +6 -6
  235. package/build/{index-b5727e06.js → index-739a497b.js} +2 -2
  236. package/build/{index-cf2ced78.js → index-768587ff.js} +11 -11
  237. package/build/{index-abda7d9e.js → index-775b5a8c.js} +2 -2
  238. package/build/{index-ede1c838.js → index-7c8d88f3.js} +1 -1
  239. package/build/{index-b7a2372a.js → index-83340a9a.js} +2 -2
  240. package/build/{index-e2b21e2d.js → index-871bf383.js} +11 -11
  241. package/build/{index-9ff7d1bf.js → index-8a2f123e.js} +4 -4
  242. package/build/{index-afa65890.js → index-8b43b3c7.js} +3 -3
  243. package/build/{index-5e8e5e2a.js → index-8cd6aa6b.js} +1 -1
  244. package/build/{index-5d160856.js → index-8fb6f679.js} +5 -5
  245. package/build/{index-4ea25c95.js → index-996f8d94.js} +2 -2
  246. package/build/{index-2494ce46.js → index-9c0b2dfe.js} +22 -22
  247. package/build/{index-51928c35.js → index-a4ff28b4.js} +6 -6
  248. package/build/{index-33d3d0f8.js → index-a5edd727.js} +32 -32
  249. package/build/{index-2f2631b6.js → index-aaf7d20f.js} +2 -2
  250. package/build/{index-80fb8936.js → index-ac11f7ce.js} +18 -18
  251. package/build/{index-edd0129a.js → index-afafc12f.js} +21 -21
  252. package/build/{index-91f00101.js → index-b41934c6.js} +7 -7
  253. package/build/{index-2d5e3ecb.js → index-b421ebe7.js} +13 -13
  254. package/build/{index-3fad50cb.js → index-bd53408d.js} +3 -3
  255. package/build/{index-c60e149a.js → index-becae264.js} +2 -2
  256. package/build/{index-8a436adf.js → index-c5630247.js} +6 -6
  257. package/build/{index-1efc5601.js → index-c750e792.js} +1 -1
  258. package/build/{index-9387d155.js → index-c957b7d7.js} +13 -13
  259. package/build/{index-f7faed62.js → index-c96695aa.js} +15 -15
  260. package/build/{index-53d3bfbd.js → index-ca3f0ba8.js} +31 -31
  261. package/build/{index-cc60e49a.js → index-d7fdb813.js} +5 -5
  262. package/build/{index-97408968.js → index-d8dbfd8f.js} +25 -25
  263. package/build/{index-b8f82ea1.js → index-db76af5d.js} +2 -2
  264. package/build/{index-6fa1a041.js → index-dbb1f91e.js} +1 -1
  265. package/build/{index-04d2e554.js → index-dc5ced87.js} +2 -2
  266. package/build/{index-b140725f.js → index-e029c70d.js} +4 -4
  267. package/build/{index-67f15154.js → index-e1336821.js} +2 -2
  268. package/build/{index-9adfe99f.js → index-e787aa67.js} +2 -2
  269. package/build/{index-a44e246d.js → index-e8e77e72.js} +17 -17
  270. package/build/{index-74150260.js → index-e9125e2f.js} +30 -30
  271. package/build/{index-d3c9269b.js → index-ec6df9a6.js} +2 -2
  272. package/build/{index-768c8abe.js → index-eca3fc01.js} +1 -1
  273. package/build/{index-36413a92.js → index-ee0fc7a1.js} +13 -13
  274. package/build/{index-885f7a6b.js → index-eef792eb.js} +3 -3
  275. package/build/{index-b581e889.js → index-f17a3d3c.js} +1 -1
  276. package/build/{index-f0ef5812.js → index-f90805e0.js} +3 -3
  277. package/build/index.js +118 -118
  278. package/build/{labelSorting-ede3ef97.js → labelSorting-ba40954c.js} +4 -4
  279. package/build/lead/LeadGen.helpers.d.ts +2 -2
  280. package/build/lead/LeadGen.type.d.ts +3 -0
  281. package/build/lead/LeadGenInline/LeadGenInline.d.ts +8 -0
  282. package/build/lead/LeadGenInline/index.d.ts +2 -0
  283. package/build/lead/LeadGenSubscriptionBox/LeadGenContext.d.ts +19 -12
  284. package/build/lead/index.d.ts +5 -1
  285. package/build/lead/layouts/inline.d.ts +3 -2
  286. package/build/lead/layouts/lightbox/index.d.ts +2 -1
  287. package/build/lead/newLeadPopup.d.ts +2 -1
  288. package/build/lead/services/index.d.ts +4 -0
  289. package/build/lead/services/index.type.d.ts +5 -0
  290. package/build/lead/utils.d.ts +18 -0
  291. package/build/lead.js +409 -306
  292. package/build/{logoIcon-c4277355.js → logoIcon-839ec647.js} +2 -2
  293. package/build/mantine.js +22 -22
  294. package/build/misc/cachedSystem.d.ts +5 -0
  295. package/build/misc.js +17 -17
  296. package/build/miscGetDynamicHealthTool.js +4 -4
  297. package/build/miscGetSocialList.js +8 -8
  298. package/build/miscScreenSizeContext.js +1 -1
  299. package/build/mobileBottomNavigation.js +5 -5
  300. package/build/mobileBottomNavigationIcon.js +5 -5
  301. package/build/molecules.js +74 -74
  302. package/build/moleculesArticleCard.js +6 -6
  303. package/build/moleculesArticleCardV2.js +16 -16
  304. package/build/navigation.js +46 -46
  305. package/build/navigationLogoutPopup.js +9 -9
  306. package/build/navigationProfileButton.js +26 -26
  307. package/build/onboardingV2.js +28 -28
  308. package/build/organisms.js +50 -50
  309. package/build/{post-c40665a6.js → post-ad9d4cd8.js} +2 -2
  310. package/build/profileNavigation.js +19 -19
  311. package/build/progressBar.js +1 -1
  312. package/build/pwg.js +22 -22
  313. package/build/ssoV2.js +28 -28
  314. package/build/{store-a627a4e9.js → store-e15ac771.js} +3 -3
  315. package/build/subot.js +35 -35
  316. package/build/surveyOrPremiumBanner.js +33 -33
  317. package/build/surveyQuestionCard.js +10 -10
  318. package/build/{surveyThankyouCard-eb799d40.js → surveyThankyouCard-9fd2e394.js} +5 -5
  319. package/build/together.js +56 -56
  320. package/build/togetherApiUtils.js +4 -4
  321. package/build/togetherAtoms.js +30 -30
  322. package/build/togetherComponentGlobalContext.js +4 -4
  323. package/build/togetherMolecules.js +51 -51
  324. package/build/togetherMoleculesCardAuthor.js +28 -28
  325. package/build/togetherMoleculesPostImagePreview.js +11 -11
  326. package/build/togetherMoleculesProfileDetail.js +39 -39
  327. package/build/togetherOrganisms.js +50 -50
  328. package/build/togetherRichTextEditor.js +17 -17
  329. package/build/togetherShareBox.js +10 -10
  330. package/build/{translationsProvider-55107f63.js → translationsProvider-9e02aca0.js} +1 -1
  331. package/build/{treePopoverMenu-dba1fa44.js → treePopoverMenu-3039725f.js} +19 -19
  332. package/build/{types-a2685ea0.js → types-e1d556ba.js} +2 -2
  333. package/build/types.js +2 -2
  334. package/build/{useCategory-a409293b.js → useCategory-84daabf6.js} +5 -5
  335. package/build/{useHealthToolCache-a789e251.js → useHealthToolCache-dc226c20.js} +1 -1
  336. package/build/{useMantineLocale-f016eea3.js → useMantineLocale-41665618.js} +6 -6
  337. package/build/{usePlacesAutocomplete-c0f01602.js → usePlacesAutocomplete-1fdd7997.js} +1 -1
  338. package/build/{useScreenSize-3baa3b53.js → useScreenSize-903a492c.js} +2 -2
  339. package/build/useTogetherAuthRequiredAction.js +10 -10
  340. package/build/{utils-c4dd75e2.js → utils-7ea786dd.js} +3 -3
  341. package/build/{utils-43ed33b6.js → utils-a3659307.js} +2 -2
  342. package/build/{utils-efac6bcf.js → utils-c700f985.js} +2 -2
  343. package/build/{utils-067759d4.js → utils-c91e08b4.js} +5 -5
  344. package/build/vaccination.js +21 -21
  345. package/package.json +1 -1
  346. /package/build/{BMI_BOYS.percentile.monthly-593b64c4.js → BMI_BOYS.percentile.monthly-74992e75.js} +0 -0
  347. /package/build/{BMI_BOYS.percentile.weekly-fb1ca489.js → BMI_BOYS.percentile.weekly-582ef7a6.js} +0 -0
  348. /package/build/{BMI_BOYS.percentile.yearly-df3f2a64.js → BMI_BOYS.percentile.yearly-460165ca.js} +0 -0
  349. /package/build/{BMI_BOYS.zscore.monthly-ae4966b1.js → BMI_BOYS.zscore.monthly-a01bcf2d.js} +0 -0
  350. /package/build/{BMI_BOYS.zscore.weekly-f25d7ce5.js → BMI_BOYS.zscore.weekly-de430b2a.js} +0 -0
  351. /package/build/{BMI_BOYS.zscore.yearly-de0731f6.js → BMI_BOYS.zscore.yearly-b0bc4bdf.js} +0 -0
  352. /package/build/{BMI_GIRLS.percentile.monthly-9df85da0.js → BMI_GIRLS.percentile.monthly-55ae7f36.js} +0 -0
  353. /package/build/{BMI_GIRLS.percentile.weekly-98387f17.js → BMI_GIRLS.percentile.weekly-98c30f99.js} +0 -0
  354. /package/build/{BMI_GIRLS.percentile.yearly-5b20b90e.js → BMI_GIRLS.percentile.yearly-1b06aacd.js} +0 -0
  355. /package/build/{BMI_GIRLS.zscore.monthly-ae826ebb.js → BMI_GIRLS.zscore.monthly-5ce4888b.js} +0 -0
  356. /package/build/{BMI_GIRLS.zscore.weekly-9e592f84.js → BMI_GIRLS.zscore.weekly-dddf08f7.js} +0 -0
  357. /package/build/{BMI_GIRLS.zscore.yearly-cd31294d.js → BMI_GIRLS.zscore.yearly-08731830.js} +0 -0
  358. /package/build/{ChevronDown-ce3e07fe.js → ChevronDown-f9205b1d.js} +0 -0
  359. /package/build/{Close-fd183cac.js → Close-59b9c491.js} +0 -0
  360. /package/build/{Google-03c45ab8.js → Google-89065f38.js} +0 -0
  361. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-716845ac.js → HEAD CIRCUM_BOYS.percentile.monthly-2790e28c.js} +0 -0
  362. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-04a3ccf2.js → HEAD CIRCUM_BOYS.percentile.weekly-19ce6a75.js} +0 -0
  363. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-9de20d9f.js → HEAD CIRCUM_BOYS.percentile.yearly-c98aa498.js} +0 -0
  364. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-17cb92f9.js → HEAD CIRCUM_BOYS.zscore.monthly-352ae196.js} +0 -0
  365. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-98447677.js → HEAD CIRCUM_BOYS.zscore.weekly-2c9ee27d.js} +0 -0
  366. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-6a33e90c.js → HEAD CIRCUM_BOYS.zscore.yearly-e6f6fffb.js} +0 -0
  367. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-e0bd657e.js → HEAD CIRCUM_GIRLS.percentile.monthly-ddba165a.js} +0 -0
  368. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-4853c867.js → HEAD CIRCUM_GIRLS.percentile.weekly-1264b883.js} +0 -0
  369. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-9d11d78f.js → HEAD CIRCUM_GIRLS.percentile.yearly-83ab5bca.js} +0 -0
  370. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-bb279f29.js → HEAD CIRCUM_GIRLS.zscore.monthly-f8ae4c1e.js} +0 -0
  371. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-5b06e9db.js → HEAD CIRCUM_GIRLS.zscore.weekly-4d5e3970.js} +0 -0
  372. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-01aee633.js → HEAD CIRCUM_GIRLS.zscore.yearly-d5c4400f.js} +0 -0
  373. /package/build/{HEIGHT_BOYS.percentile.monthly-9da8bdb6.js → HEIGHT_BOYS.percentile.monthly-40cfbf9a.js} +0 -0
  374. /package/build/{HEIGHT_BOYS.percentile.weekly-2f833fe6.js → HEIGHT_BOYS.percentile.weekly-4cfb9809.js} +0 -0
  375. /package/build/{HEIGHT_BOYS.percentile.yearly-de55a69e.js → HEIGHT_BOYS.percentile.yearly-c6c3da07.js} +0 -0
  376. /package/build/{HEIGHT_BOYS.zscore.monthly-d31b6cab.js → HEIGHT_BOYS.zscore.monthly-60edad28.js} +0 -0
  377. /package/build/{HEIGHT_BOYS.zscore.weekly-d077f3e5.js → HEIGHT_BOYS.zscore.weekly-bc2fbc48.js} +0 -0
  378. /package/build/{HEIGHT_BOYS.zscore.yearly-e9bf65bf.js → HEIGHT_BOYS.zscore.yearly-86c1dde5.js} +0 -0
  379. /package/build/{HEIGHT_GIRLS.percentile.monthly-c062ee11.js → HEIGHT_GIRLS.percentile.monthly-44704c06.js} +0 -0
  380. /package/build/{HEIGHT_GIRLS.percentile.weekly-c81d7e9e.js → HEIGHT_GIRLS.percentile.weekly-61ee7bd8.js} +0 -0
  381. /package/build/{HEIGHT_GIRLS.percentile.yearly-a687ad14.js → HEIGHT_GIRLS.percentile.yearly-1befcb61.js} +0 -0
  382. /package/build/{HEIGHT_GIRLS.zscore.monthly-a65a6a5c.js → HEIGHT_GIRLS.zscore.monthly-1de060e1.js} +0 -0
  383. /package/build/{HEIGHT_GIRLS.zscore.weekly-4fcc852a.js → HEIGHT_GIRLS.zscore.weekly-41ce21f7.js} +0 -0
  384. /package/build/{HEIGHT_GIRLS.zscore.yearly-8ac7d674.js → HEIGHT_GIRLS.zscore.yearly-0b86ad95.js} +0 -0
  385. /package/build/{Locale-f9e8faf2.js → Locale-a20bc2bb.js} +0 -0
  386. /package/build/{Visible-c7975500.js → Visible-00a88ea6.js} +0 -0
  387. /package/build/{WEIGHT_BOYS.percentile.monthly-dec944a2.js → WEIGHT_BOYS.percentile.monthly-214aacdd.js} +0 -0
  388. /package/build/{WEIGHT_BOYS.percentile.weekly-ea79e647.js → WEIGHT_BOYS.percentile.weekly-36921182.js} +0 -0
  389. /package/build/{WEIGHT_BOYS.percentile.yearly-482c3e07.js → WEIGHT_BOYS.percentile.yearly-1f1bbcfb.js} +0 -0
  390. /package/build/{WEIGHT_BOYS.zscore.monthly-c024d492.js → WEIGHT_BOYS.zscore.monthly-dfdded5b.js} +0 -0
  391. /package/build/{WEIGHT_BOYS.zscore.weekly-301d8d27.js → WEIGHT_BOYS.zscore.weekly-de0c7c94.js} +0 -0
  392. /package/build/{WEIGHT_BOYS.zscore.yearly-8a1dc699.js → WEIGHT_BOYS.zscore.yearly-180c2581.js} +0 -0
  393. /package/build/{WEIGHT_GIRLS.percentile.monthly-3dc085b1.js → WEIGHT_GIRLS.percentile.monthly-61aec809.js} +0 -0
  394. /package/build/{WEIGHT_GIRLS.percentile.weekly-d071124c.js → WEIGHT_GIRLS.percentile.weekly-bbd9e34c.js} +0 -0
  395. /package/build/{WEIGHT_GIRLS.percentile.yearly-4276ce75.js → WEIGHT_GIRLS.percentile.yearly-5f3f741e.js} +0 -0
  396. /package/build/{WEIGHT_GIRLS.zscore.monthly-8f96362b.js → WEIGHT_GIRLS.zscore.monthly-ebd17dec.js} +0 -0
  397. /package/build/{WEIGHT_GIRLS.zscore.weekly-aa98602c.js → WEIGHT_GIRLS.zscore.weekly-0dd2e885.js} +0 -0
  398. /package/build/{WEIGHT_GIRLS.zscore.yearly-9acd790b.js → WEIGHT_GIRLS.zscore.yearly-2bc83e67.js} +0 -0
  399. /package/build/{animation-20644432.js → animation-d7bbfd05.js} +0 -0
  400. /package/build/{constants-1820752f.js → constants-0d7afde6.js} +0 -0
  401. /package/build/{constants-60cd5ad8.js → constants-4ae51090.js} +0 -0
  402. /package/build/{constants-3c25d63c.js → constants-bba20592.js} +0 -0
  403. /package/build/{dataTransform-b56598ac.js → dataTransform-c6ded749.js} +0 -0
  404. /package/build/esm/{BMI_BOYS.percentile.monthly-6171123b.js → BMI_BOYS.percentile.monthly-db18d48a.js} +0 -0
  405. /package/build/esm/{BMI_BOYS.percentile.weekly-2572a643.js → BMI_BOYS.percentile.weekly-9125f743.js} +0 -0
  406. /package/build/esm/{BMI_BOYS.percentile.yearly-4f2c765e.js → BMI_BOYS.percentile.yearly-94192a1b.js} +0 -0
  407. /package/build/esm/{BMI_BOYS.zscore.monthly-759c5a62.js → BMI_BOYS.zscore.monthly-666c6d56.js} +0 -0
  408. /package/build/esm/{BMI_BOYS.zscore.weekly-909983cc.js → BMI_BOYS.zscore.weekly-b9fd6593.js} +0 -0
  409. /package/build/esm/{BMI_BOYS.zscore.yearly-199d45ec.js → BMI_BOYS.zscore.yearly-6388cef4.js} +0 -0
  410. /package/build/esm/{BMI_GIRLS.percentile.monthly-b591580d.js → BMI_GIRLS.percentile.monthly-7effde6f.js} +0 -0
  411. /package/build/esm/{BMI_GIRLS.percentile.weekly-9c683d9d.js → BMI_GIRLS.percentile.weekly-f913327d.js} +0 -0
  412. /package/build/esm/{BMI_GIRLS.percentile.yearly-5eb77ca3.js → BMI_GIRLS.percentile.yearly-88a7bdf9.js} +0 -0
  413. /package/build/esm/{BMI_GIRLS.zscore.monthly-dbff4d81.js → BMI_GIRLS.zscore.monthly-bec30098.js} +0 -0
  414. /package/build/esm/{BMI_GIRLS.zscore.weekly-d5fa3237.js → BMI_GIRLS.zscore.weekly-573384f3.js} +0 -0
  415. /package/build/esm/{BMI_GIRLS.zscore.yearly-3d244441.js → BMI_GIRLS.zscore.yearly-22f3b1f1.js} +0 -0
  416. /package/build/esm/{ChevronDown-6807be97.js → ChevronDown-150a1256.js} +0 -0
  417. /package/build/esm/{Close-536dbdcb.js → Close-39dfda08.js} +0 -0
  418. /package/build/esm/{Google-27903bc6.js → Google-b11fe21a.js} +0 -0
  419. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-50b709e4.js → HEAD CIRCUM_BOYS.percentile.monthly-f614c6fc.js} +0 -0
  420. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-266ce0b3.js → HEAD CIRCUM_BOYS.percentile.weekly-9eb6bfbe.js} +0 -0
  421. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-5c849741.js → HEAD CIRCUM_BOYS.percentile.yearly-e3b8abc0.js} +0 -0
  422. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-3c5b1bfb.js → HEAD CIRCUM_BOYS.zscore.monthly-f32bfabb.js} +0 -0
  423. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-00f3a3cb.js → HEAD CIRCUM_BOYS.zscore.weekly-fba22281.js} +0 -0
  424. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-e55303f9.js → HEAD CIRCUM_BOYS.zscore.yearly-f6721740.js} +0 -0
  425. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-b6bf295c.js → HEAD CIRCUM_GIRLS.percentile.monthly-f8725b7c.js} +0 -0
  426. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-ef254798.js → HEAD CIRCUM_GIRLS.percentile.weekly-97387772.js} +0 -0
  427. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-9504ed63.js → HEAD CIRCUM_GIRLS.percentile.yearly-c2dedbdc.js} +0 -0
  428. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-5a1d13b0.js → HEAD CIRCUM_GIRLS.zscore.monthly-7c689a78.js} +0 -0
  429. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-6c150091.js → HEAD CIRCUM_GIRLS.zscore.weekly-bc100ec7.js} +0 -0
  430. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-f9ea6e4e.js → HEAD CIRCUM_GIRLS.zscore.yearly-6113b2c7.js} +0 -0
  431. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-de807c91.js → HEIGHT_BOYS.percentile.monthly-e5678958.js} +0 -0
  432. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-5a52bd92.js → HEIGHT_BOYS.percentile.weekly-913a0b50.js} +0 -0
  433. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-7c7b1f37.js → HEIGHT_BOYS.percentile.yearly-18af7378.js} +0 -0
  434. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-0deca42a.js → HEIGHT_BOYS.zscore.monthly-8284876a.js} +0 -0
  435. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-fa7d1c4f.js → HEIGHT_BOYS.zscore.weekly-6a87c59c.js} +0 -0
  436. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-7e29864e.js → HEIGHT_BOYS.zscore.yearly-b48ee328.js} +0 -0
  437. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-ca1a7897.js → HEIGHT_GIRLS.percentile.monthly-ebc399f1.js} +0 -0
  438. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-1ea566e1.js → HEIGHT_GIRLS.percentile.weekly-47580eaa.js} +0 -0
  439. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-cb2e8cb2.js → HEIGHT_GIRLS.percentile.yearly-951d639b.js} +0 -0
  440. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-ea2ddc56.js → HEIGHT_GIRLS.zscore.monthly-0640f32b.js} +0 -0
  441. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-816a70d6.js → HEIGHT_GIRLS.zscore.weekly-ac6176b9.js} +0 -0
  442. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-239d64e4.js → HEIGHT_GIRLS.zscore.yearly-767a1454.js} +0 -0
  443. /package/build/esm/{Locale-0c821293.js → Locale-7e8c3193.js} +0 -0
  444. /package/build/esm/{Visible-a73c5922.js → Visible-26c970af.js} +0 -0
  445. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-3d0feadb.js → WEIGHT_BOYS.percentile.monthly-d542e6af.js} +0 -0
  446. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-dc9ad85c.js → WEIGHT_BOYS.percentile.weekly-36e32ce3.js} +0 -0
  447. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-a29977e0.js → WEIGHT_BOYS.percentile.yearly-7fb16b1d.js} +0 -0
  448. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-f75125b2.js → WEIGHT_BOYS.zscore.monthly-adbdfdd1.js} +0 -0
  449. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-bffc7be4.js → WEIGHT_BOYS.zscore.weekly-3f1f6b51.js} +0 -0
  450. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-61a0785f.js → WEIGHT_BOYS.zscore.yearly-8d1b094f.js} +0 -0
  451. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-d9177105.js → WEIGHT_GIRLS.percentile.monthly-1518c4b2.js} +0 -0
  452. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-3fcb39b0.js → WEIGHT_GIRLS.percentile.weekly-4647e8b7.js} +0 -0
  453. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-87e8b0d3.js → WEIGHT_GIRLS.percentile.yearly-75c03fa2.js} +0 -0
  454. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-fa0e486d.js → WEIGHT_GIRLS.zscore.monthly-208c2b04.js} +0 -0
  455. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-431436d1.js → WEIGHT_GIRLS.zscore.weekly-82bd4d43.js} +0 -0
  456. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-483691a2.js → WEIGHT_GIRLS.zscore.yearly-e979ffc3.js} +0 -0
  457. /package/build/esm/{animation-c0181551.js → animation-9f88ebc3.js} +0 -0
  458. /package/build/esm/{constants-08597bdf.js → constants-69692e4e.js} +0 -0
  459. /package/build/esm/{constants-47f10362.js → constants-74cdf592.js} +0 -0
  460. /package/build/esm/{constants-69e61314.js → constants-cc8260ef.js} +0 -0
  461. /package/build/esm/{dataTransform-e927aefa.js → dataTransform-bb7c1b26.js} +0 -0
  462. /package/build/esm/{index-4b2116a0.js → index-0fce55ff.js} +0 -0
  463. /package/build/esm/{index-2782c95d.js → index-3dd16ecf.js} +0 -0
  464. /package/build/esm/{index-58b5d002.js → index-4f2dc29a.js} +0 -0
  465. /package/build/esm/{index-0bd47863.js → index-93e56e81.js} +0 -0
  466. /package/build/esm/{index-b5cb5b81.js → index-bd7ec512.js} +0 -0
  467. /package/build/esm/{index-6dd1430d.js → index-d8a842a1.js} +0 -0
  468. /package/build/esm/{index-9c504963.js → index-e07488f1.js} +0 -0
  469. /package/build/esm/{index-6798e261.js → index-e3e99d15.js} +0 -0
  470. /package/build/esm/{index.styles-75f3e84f.js → index.styles-084c59ef.js} +0 -0
  471. /package/build/esm/{localizeNumberFormat-d74c77ae.js → localizeNumberFormat-f4b6c47a.js} +0 -0
  472. /package/build/esm/{normalizeLink-6ad0ca76.js → normalizeLink-936d90eb.js} +0 -0
  473. /package/build/esm/{number-3d2fdea2.js → number-224a42c3.js} +0 -0
  474. /package/build/esm/{other-523db075.js → other-ecd44617.js} +0 -0
  475. /package/build/esm/{paths-b6e92888.js → paths-579d0032.js} +0 -0
  476. /package/build/esm/{translationsContext-bf069750.js → translationsContext-1f3f9575.js} +0 -0
  477. /package/build/esm/{tslib.es6-dc19c6ce.js → tslib.es6-ab554322.js} +0 -0
  478. /package/build/esm/{types-1d49e037.js → types-2d4d27c5.js} +0 -0
  479. /package/build/esm/{useIsInit-70b5cabb.js → useIsInit-ea8b816c.js} +0 -0
  480. /package/build/esm/{useOutsideClick-a86a9aba.js → useOutsideClick-c4e5a727.js} +0 -0
  481. /package/build/esm/{useScrollbarSize-92f96cce.js → useScrollbarSize-eca6089a.js} +0 -0
  482. /package/build/esm/{useUniqueId-bb31c05c.js → useUniqueId-7d263389.js} +0 -0
  483. /package/build/esm/{utils-eb11219c.js → utils-1e5d7b0f.js} +0 -0
  484. /package/build/{index-53c975ea.js → index-1c7d1db5.js} +0 -0
  485. /package/build/{index-d165c159.js → index-20c4211d.js} +0 -0
  486. /package/build/{index-54fef9ff.js → index-5987ef8d.js} +0 -0
  487. /package/build/{index-c6519b65.js → index-76b35a39.js} +0 -0
  488. /package/build/{index-83ac92ed.js → index-9ec91ab1.js} +0 -0
  489. /package/build/{index-f8162273.js → index-d6720486.js} +0 -0
  490. /package/build/{index-ad83e699.js → index-e93bb180.js} +0 -0
  491. /package/build/{index-9441a0c4.js → index-fe50d571.js} +0 -0
  492. /package/build/{index.styles-d996c0fb.js → index.styles-1627ae94.js} +0 -0
  493. /package/build/{localizeNumberFormat-bb5ef584.js → localizeNumberFormat-2e6de276.js} +0 -0
  494. /package/build/{normalizeLink-3705c4b5.js → normalizeLink-f5a31cb7.js} +0 -0
  495. /package/build/{number-08a50ee7.js → number-df5f349e.js} +0 -0
  496. /package/build/{other-08a12a1f.js → other-0dadd1e0.js} +0 -0
  497. /package/build/{paths-c746d199.js → paths-88b3a03a.js} +0 -0
  498. /package/build/{translationsContext-e608f3b2.js → translationsContext-b427e34a.js} +0 -0
  499. /package/build/{tslib.es6-050f114c.js → tslib.es6-80cd01ec.js} +0 -0
  500. /package/build/{types-9b093aff.js → types-4dc6d77a.js} +0 -0
  501. /package/build/{useIsInit-c843b91c.js → useIsInit-048d2d0e.js} +0 -0
  502. /package/build/{useOutsideClick-a7615b69.js → useOutsideClick-4b24cb4a.js} +0 -0
  503. /package/build/{useScrollbarSize-6f524084.js → useScrollbarSize-276c45bd.js} +0 -0
  504. /package/build/{useUniqueId-6af81f9b.js → useUniqueId-9af8c712.js} +0 -0
  505. /package/build/{utils-1c8daf1b.js → utils-f6f80ca7.js} +0 -0
package/build/esm/lead.js CHANGED
@@ -1,52 +1,52 @@
1
- import { _ as __rest, a as __awaiter } from './tslib.es6-dc19c6ce.js';
2
- import React__default, { createContext, useMemo, useEffect, useRef, useState, useContext, useCallback, forwardRef, useImperativeHandle, memo, useLayoutEffect } from 'react';
1
+ import { a as __awaiter, _ as __rest } from './tslib.es6-ab554322.js';
2
+ import React__default, { createContext, useMemo, useEffect, useRef, useState, useContext, memo, useCallback, forwardRef, useImperativeHandle, useLayoutEffect } from 'react';
3
3
  import { createStyles, Box, Button as Button$1, Input as Input$1, Autocomplete, clsx, Checkbox as Checkbox$1, Radio as Radio$1, Select as Select$1, TextInput, NumberInput as NumberInput$1, 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-ffad5b23.js';
7
+ import { B as BEARER_TOKEN_COOKIE } from './index-a2d6d225.js';
8
8
  import { getCookie, setCookie } from './miscCookieHelper.js';
9
- import { u as useTranslations } from './index-b987ac0b.js';
10
- import { T as TranslationsContext } from './translationsContext-bf069750.js';
11
- import { M as MediaQueries, b as getWrapperDomWithSelector, a as getPopupWrapperDom } from './utils-eb11219c.js';
12
- import { T as Text } from './index-1a286f35.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-e75d1126.js';
14
- import { D as DatePicker } from './index-57bb0d84.js';
15
- import { B as Button } from './index-fad614a0.js';
16
- import './index.styles-75f3e84f.js';
9
+ import { u as useTranslations } from './index-ac5c3e73.js';
10
+ import { T as TranslationsContext } from './translationsContext-1f3f9575.js';
11
+ import { M as MediaQueries, b as getWrapperDomWithSelector, a as getPopupWrapperDom } from './utils-1e5d7b0f.js';
12
+ import { T as Text } from './index-4e1b366e.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-7bc4f0c5.js';
14
+ import { D as DatePicker } from './index-49547dd9.js';
15
+ import { B as Button } from './index-ae969513.js';
16
+ import './index.styles-084c59ef.js';
17
17
  import { useIntersection, useClickOutside } from '@mantine/hooks';
18
- import './useMantineLocale-dcc2ae17.js';
19
- import { C as COMMON_DATE_TRANSLATE_KEY } from './index-bc0ca346.js';
20
- import './index-6dd1430d.js';
21
- import { L as LOCALE_SPECS, Z as ZINDEX_SSO, I as ISO_FORMAT } from './index-9083955c.js';
22
- import './other-523db075.js';
23
- import './index-2dfb2ce4.js';
24
- import { M as MAPPED_LOCALE } from './utils-712baac3.js';
18
+ import './useMantineLocale-67d4f2b9.js';
19
+ import { C as COMMON_DATE_TRANSLATE_KEY } from './index-f4c0a637.js';
20
+ import './index-d8a842a1.js';
21
+ import { L as LOCALE_SPECS, Z as ZINDEX_SSO, I as ISO_FORMAT } from './index-46576e24.js';
22
+ import './other-ecd44617.js';
23
+ import './index-09f17ac2.js';
24
+ import { M as MAPPED_LOCALE } from './utils-7af182bc.js';
25
25
  import { DateInput } from '@mantine/dates';
26
- import { u as usePlacesAutocomplete, G as GOOGLE_API_KEY } from './usePlacesAutocomplete-9456bd65.js';
27
- import { H as Heading$1 } from './index-3872ab78.js';
28
- import { t as translationsMap$1 } from './translationsProvider-62ea3de4.js';
29
- import { L as LOCALE } from './Locale-0c821293.js';
26
+ import { u as usePlacesAutocomplete, G as GOOGLE_API_KEY } from './usePlacesAutocomplete-9317e0ff.js';
27
+ import { H as Heading$1 } from './index-9c2fb6cc.js';
28
+ import { t as translationsMap$1 } from './translationsProvider-e069443f.js';
29
+ import { L as LOCALE } from './Locale-7e8c3193.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-bf62717c.js';
37
- import { i as isVideo } from './index-4b2116a0.js';
38
- import { u as useScreenSize } from './useScreenSize-56424798.js';
36
+ import { T as TogetherComponentGlobalContext } from './utils-4f20ccfb.js';
37
+ import { i as isVideo } from './index-0fce55ff.js';
38
+ import { u as useScreenSize } from './useScreenSize-4385d138.js';
39
39
  import { motion } from 'framer-motion';
40
40
  import { createPortal } from 'react-dom';
41
- import { I as InputDate } from './InputDate-8f77e635.js';
42
- import { D as DrawerComponent } from './index-0c8e97cd.js';
43
- import { C as Close } from './Close-536dbdcb.js';
41
+ import { I as InputDate } from './InputDate-0bbec559.js';
42
+ import { D as DrawerComponent } from './index-31c505ff.js';
43
+ import { C as Close } from './Close-39dfda08.js';
44
44
  import './constantsIsProduction.js';
45
- import './normalizeLink-6ad0ca76.js';
45
+ import './normalizeLink-936d90eb.js';
46
46
  import '@hhgtech/icons/other';
47
47
  import '@mantine/carousel';
48
48
  import 'classnames';
49
- import './useUniqueId-bb31c05c.js';
49
+ import './useUniqueId-7d263389.js';
50
50
  import './constantsSite.js';
51
51
  import '@hhgtech/icons/core';
52
52
  import '@mantine/notifications';
@@ -64,11 +64,11 @@ import './i18n-values/vi-VN.js';
64
64
  import './i18n-values/vi-VN_MB.js';
65
65
  import './i18n-values/zh-SG.js';
66
66
  import './i18n-values/zh-TW.js';
67
- import './index-b5cb5b81.js';
67
+ import './index-bd7ec512.js';
68
68
  import 'slugify';
69
69
  import 'string-format';
70
70
  import './togetherApiPaths.js';
71
- import './constants-08597bdf.js';
71
+ import './constants-69692e4e.js';
72
72
  import 'vaul';
73
73
 
74
74
  const LeadGenComponentContext = createContext({});
@@ -121,33 +121,6 @@ const LEADGEN_BLOCK_INPUT = [
121
121
  LEADGEN_BLOCK.CheckboxBlock,
122
122
  LEADGEN_BLOCK.TncBlock,
123
123
  ];
124
- const leadGenFieldNamePhone = (listBlockAdded) => {
125
- return listBlockAdded
126
- .filter(({ name }) => [
127
- LEADGEN_BLOCK.PhoneBlock,
128
- LEADGEN_BLOCK.PhoneOtpBlock,
129
- LEADGEN_BLOCK.WhatsappOtpBlock,
130
- LEADGEN_BLOCK.ZaloOtpBlock,
131
- ].includes(name))
132
- .map(({ data }) => data.value);
133
- };
134
- const leadGenFieldRequired = (blocks) => {
135
- if (!(blocks === null || blocks === void 0 ? void 0 : blocks.length)) {
136
- return [];
137
- }
138
- return blocks
139
- .map(({ data, name, id }) => {
140
- const { required, value } = data;
141
- if (name === LEADGEN_BLOCK.TncBlock && id && required) {
142
- return `TNC-${id}`;
143
- }
144
- if (required) {
145
- return value;
146
- }
147
- return;
148
- })
149
- .filter(Boolean);
150
- };
151
124
  const SSO_MAP_LEAD = ['name', 'email', 'birthday', 'phone', 'gender'];
152
125
  const LEAD_LOCALE_DATA$1 = {
153
126
  'vi-VN': {
@@ -230,6 +203,33 @@ const mappingSSOToLead = (userInfoProps) => {
230
203
  return;
231
204
  }
232
205
  };
206
+ const leadGenFieldNamePhone = (listBlockAdded) => {
207
+ return listBlockAdded
208
+ .filter(({ name }) => [
209
+ LEADGEN_BLOCK.PhoneBlock,
210
+ LEADGEN_BLOCK.PhoneOtpBlock,
211
+ LEADGEN_BLOCK.WhatsappOtpBlock,
212
+ LEADGEN_BLOCK.ZaloOtpBlock,
213
+ ].includes(name))
214
+ .map(({ data }) => data.value);
215
+ };
216
+ const leadGenFieldRequired = (blocks) => {
217
+ if (!(blocks === null || blocks === void 0 ? void 0 : blocks.length)) {
218
+ return [];
219
+ }
220
+ return blocks
221
+ .map(({ data, name, id }) => {
222
+ const { required, value } = data;
223
+ if (name === LEADGEN_BLOCK.TncBlock && id && required) {
224
+ return `TNC-${id}`;
225
+ }
226
+ if (required) {
227
+ return value;
228
+ }
229
+ return;
230
+ })
231
+ .filter(Boolean);
232
+ };
233
233
  const formatCampaignDetail = (campaign) => {
234
234
  if (!campaign) {
235
235
  return {};
@@ -376,6 +376,55 @@ const formatLeadGenFormValue = (values = {}, blocks) => {
376
376
  return newValues;
377
377
  };
378
378
 
379
+ const TIMEOUT = 30 * 60 * 1000;
380
+ const WAITING_FIRST_RESP = 'waitingTheFirstResponse';
381
+ const CachedSystem = {
382
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
383
+ cached: {},
384
+ clearCached: (prefix) => {
385
+ console.log(CachedSystem.cached);
386
+ Object.keys(CachedSystem.cached)
387
+ .filter((k) => k.startsWith(prefix))
388
+ .forEach((key) => {
389
+ console.log(key);
390
+ CachedSystem.cached[key] = undefined;
391
+ });
392
+ },
393
+ withCached: (key, fnResponse, timeout = TIMEOUT) => __awaiter(void 0, void 0, void 0, function* () {
394
+ if (CachedSystem.cached[key] === WAITING_FIRST_RESP) {
395
+ return new Promise((resolve) => {
396
+ const startDate = new Date().getTime();
397
+ const intervalId = setInterval(() => {
398
+ const currentDate = new Date().getTime();
399
+ if (currentDate - startDate > 3000) {
400
+ clearInterval(intervalId);
401
+ }
402
+ if (typeof CachedSystem.cached[key] === 'object') {
403
+ resolve(CachedSystem.cached[key]);
404
+ clearInterval(intervalId);
405
+ }
406
+ }, 100);
407
+ });
408
+ }
409
+ if (typeof CachedSystem.cached[key] === 'object') {
410
+ return CachedSystem.cached[key];
411
+ }
412
+ CachedSystem.cached[key] = 'waitingTheFirstResponse';
413
+ try {
414
+ const result = yield fnResponse();
415
+ CachedSystem.cached[key] = result;
416
+ setTimeout(() => {
417
+ CachedSystem.cached[key] = undefined;
418
+ }, timeout);
419
+ return result;
420
+ }
421
+ catch (err) {
422
+ CachedSystem.cached[key] = undefined;
423
+ return Promise.reject(err);
424
+ }
425
+ }),
426
+ };
427
+
379
428
  class Store {
380
429
  constructor() {
381
430
  this.apiSsoUrl = 'https://staging-id.hellobacsi.com/';
@@ -385,6 +434,8 @@ class Store {
385
434
  }
386
435
  const leadStore = new Store();
387
436
 
437
+ const LEADGEN_CACHE_KEY = 'LeadGen_';
438
+ const LEADGEN_CACHE_TIME = 5 * 60 * 1000; // 5 minutes
388
439
  const METHOD = {
389
440
  GET: 'get',
390
441
  POST: 'POST',
@@ -571,7 +622,24 @@ const trackingSubscription = (data) => {
571
622
  data,
572
623
  });
573
624
  };
625
+ function getCampaigns({ url: urlProps, siteId, apiLeadUrl, }) {
626
+ let url = urlProps || '';
627
+ if (typeof window !== 'undefined') {
628
+ const { location } = window;
629
+ url = url || location.href.toLowerCase();
630
+ }
631
+ const ga_client_id = getCookie('_ga') || null;
632
+ const AS_PATH = `${apiLeadUrl || leadStore.apiLeadUrl}api/campaign/${siteId}`;
633
+ return CachedSystem.withCached(LEADGEN_CACHE_KEY + AS_PATH, () => fetch(AS_PATH, {
634
+ method: 'POST',
635
+ headers: { 'Content-Type': 'application/json' },
636
+ body: JSON.stringify({ url, ga_client_id }),
637
+ })
638
+ .then((res) => res.json())
639
+ .then(({ _data }) => (_data === null || _data === void 0 ? void 0 : _data.campaigns) || []), LEADGEN_CACHE_TIME);
640
+ }
574
641
  const Service = {
642
+ getCampaigns,
575
643
  campaignGetById,
576
644
  getCampaignByCode,
577
645
  getSubscriptionBoxInfo,
@@ -1624,12 +1692,6 @@ const getTranslations = (locale) => {
1624
1692
  return translationsMap['en-PH'];
1625
1693
  };
1626
1694
 
1627
- const LeadGenTranslationProvider = (props) => {
1628
- const { locale, children } = props;
1629
- const translationContextValue = useMemo(() => ({ locale, values: getTranslations(locale) }), [locale]);
1630
- return (React__default.createElement(TranslationsContext.Provider, { value: translationContextValue }, children));
1631
- };
1632
-
1633
1695
  // import mockLeadData from './mockLeadData'
1634
1696
  const listCampaignScheduled = [];
1635
1697
  const listCampaignScheduledToActivated = [];
@@ -1805,167 +1867,163 @@ function clearPassiveEvent() {
1805
1867
  LEAD_SCROLL_EVENT = null;
1806
1868
  }
1807
1869
  }
1808
- function checkShowPopup({ leadApi, leadSiteId, leadDomain, onShowPopup, DEBUG_URL, }) {
1809
- // clear previous passive event, check for new condition
1810
- clearPassiveEvent();
1811
- const leadCurrentUrl = DEBUG_URL ||
1812
- ('https://' +
1813
- location.hostname +
1814
- location.pathname +
1815
- location.search).toLowerCase();
1816
- fetch(leadApi + 'api/campaign/' + leadSiteId, {
1817
- method: 'POST',
1818
- headers: {
1819
- 'Content-Type': 'application/json',
1820
- },
1821
- body: JSON.stringify({
1822
- url: leadCurrentUrl,
1823
- ga_client_id: getCookie('_ga') || null,
1824
- }),
1825
- })
1826
- .then((response) => {
1827
- return response.json();
1828
- // return mockLeadData || response.json()
1829
- })
1830
- .then((data) => {
1831
- var _a, _b, _c, _d;
1832
- LeadLog('List campagin: ', data);
1833
- LEAD_RESET_VAR();
1834
- if (data._status == 1) {
1835
- 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);
1836
- if (!getCookie('hhg-id')) {
1837
- setCookie('hhg-id', v1(), {
1838
- domain: '.' + leadDomain,
1839
- path: '/',
1840
- });
1841
- LeadLog('😍 Set HHG ID cookie');
1842
- }
1843
- // getCookie('hhg-id')
1844
- // TODO: HP-534 Filter desktop
1845
- let campaignsDevice = [];
1846
- if (isMobile()) {
1847
- campaignsDevice = campaigns.filter((c) => c.device_types.some((d) => d.id == LEAD_DEVICE_TYPE.MOBILE));
1870
+ function getCurrentCampaign({ campaigns, leadDomain, leadCurrentUrl, }) {
1871
+ if (!getCookie('hhg-id')) {
1872
+ setCookie('hhg-id', v1(), { domain: `.${leadDomain}`, path: '/' });
1873
+ LeadLog('😍 Set HHG ID cookie');
1874
+ }
1875
+ // TODO: HP-534 Filter desktop
1876
+ let campaignsDevice = [];
1877
+ if (isMobile()) {
1878
+ campaignsDevice = campaigns.filter((c) => c.device_types.some((d) => d.id == LEAD_DEVICE_TYPE.MOBILE));
1879
+ }
1880
+ else {
1881
+ campaignsDevice = campaigns.filter((c) => c.device_types.some((d) => d.id == LEAD_DEVICE_TYPE.DESKTOP));
1882
+ }
1883
+ LeadLog(`👓 campaignsDevice`, campaignsDevice);
1884
+ LeadLog('--listCampaignScheduled', listCampaignScheduled);
1885
+ LeadLog('--listCampaignScheduledToActivated', listCampaignScheduledToActivated);
1886
+ LeadLog('--listCampaignActiveButExpired', listCampaignActiveButExpired);
1887
+ LeadLog('--listCampaignExcludeSonsored', listCampaignExcludeSonsored);
1888
+ LeadLog('--listCampaignDifferentSponsor', listCampaignDifferentSponsor);
1889
+ LeadLog('--listCampaignNotDisplayInRangeOfTime', listCampaignNotDisplayInRangeOfTime);
1890
+ // Check links
1891
+ let listLinksObj = campaignsDevice
1892
+ .map((i, index) => i.targets
1893
+ .filter((i) => i.type == CAMPAIGN_TARGET_TYPE.LINKS)
1894
+ .map((i) => (Object.assign(Object.assign({}, i), { campaignIndex: index }))))
1895
+ .flat(1);
1896
+ // Check list link match current href
1897
+ listLinksObj = listLinksObj.filter((i) => {
1898
+ var _a;
1899
+ const target = new URL(String(i.target).toLowerCase());
1900
+ if (i.option == 'exact_match')
1901
+ // FOR TEST LOCAL:
1902
+ // return Boolean(location.pathname === target.pathname)
1903
+ return Boolean(leadCurrentUrl === ((_a = target.href) === null || _a === void 0 ? void 0 : _a.toLowerCase()));
1904
+ if (i.option == 'start_with') {
1905
+ // FOR TEST LOCAL:
1906
+ // if (location.pathname.includes(target.pathname)) {
1907
+ if (leadCurrentUrl.includes(String(i.target).toLowerCase())) {
1908
+ const listExcluding = i.sub_target
1909
+ .filter((i) => i.option == 'excluding')
1910
+ .map((i) => { var _a; return (_a = i.value) === null || _a === void 0 ? void 0 : _a.toLowerCase(); });
1911
+ return !listExcluding.includes(leadCurrentUrl.split('?')[0]);
1848
1912
  }
1849
1913
  else {
1850
- campaignsDevice = campaigns.filter((c) => c.device_types.some((d) => d.id == LEAD_DEVICE_TYPE.DESKTOP));
1851
- }
1852
- LeadLog(`👓 campaignsDevice`, campaignsDevice);
1853
- LeadLog('--listCampaignScheduled', listCampaignScheduled);
1854
- LeadLog('--listCampaignScheduledToActivated', listCampaignScheduledToActivated);
1855
- LeadLog('--listCampaignActiveButExpired', listCampaignActiveButExpired);
1856
- LeadLog('--listCampaignExcludeSonsored', listCampaignExcludeSonsored);
1857
- LeadLog('--listCampaignDifferentSponsor', listCampaignDifferentSponsor);
1858
- LeadLog('--listCampaignNotDisplayInRangeOfTime', listCampaignNotDisplayInRangeOfTime);
1859
- // Check links
1860
- let listLinksObj = campaignsDevice
1861
- .map((i, index) => i.targets
1862
- .filter((i) => i.type == CAMPAIGN_TARGET_TYPE.LINKS)
1863
- .map((i) => (Object.assign(Object.assign({}, i), { campaignIndex: index }))))
1864
- .flat(1);
1865
- // Check list link match current href
1866
- listLinksObj = listLinksObj.filter((i) => {
1867
- var _a;
1868
- const target = new URL(String(i.target).toLowerCase());
1869
- if (i.option == 'exact_match')
1870
- // FOR TEST LOCAL:
1871
- // return Boolean(location.pathname === target.pathname)
1872
- return Boolean(leadCurrentUrl === ((_a = target.href) === null || _a === void 0 ? void 0 : _a.toLowerCase()));
1873
- if (i.option == 'start_with') {
1874
- // FOR TEST LOCAL:
1875
- // if (location.pathname.includes(target.pathname)) {
1876
- if (leadCurrentUrl.includes(String(i.target).toLowerCase())) {
1877
- const listExcluding = i.sub_target
1878
- .filter((i) => i.option == 'excluding')
1879
- .map((i) => { var _a; return (_a = i.value) === null || _a === void 0 ? void 0 : _a.toLowerCase(); });
1880
- return !listExcluding.includes(leadCurrentUrl.split('?')[0]);
1881
- }
1882
- else {
1883
- return false;
1884
- }
1885
- }
1886
- });
1887
- // Check tags
1888
- const listMetaTag = Array.from(document.getElementsByTagName('META')).filter((i) => i.getAttribute('property') == 'article:tag');
1889
- const listTags = listMetaTag.map((i) => i.content);
1890
- let listCampaignHasTag = [];
1891
- let listTagsObj = [];
1892
- if (listTags && listTags.length) {
1893
- listCampaignHasTag = campaignsDevice
1894
- .map((i, index) => i.targets
1895
- .filter((i) => i.type == CAMPAIGN_TARGET_TYPE.TAGS)
1896
- .map((i) => (Object.assign(Object.assign({}, i), { campaignIndex: index }))))
1897
- .flat(1);
1898
- listTagsObj = listCampaignHasTag.filter((i) => listTags.includes(i.target));
1914
+ return false;
1899
1915
  }
1900
- const listCampaginsMatch = [...listLinksObj, ...listTagsObj];
1901
- const cookieKeys = document.cookie
1902
- .split('; ')
1903
- .map((i) => i.split('=')[0]);
1904
- const listCampaignCodeSubmited = cookieKeys.filter((i) => i.includes('lead_submited'));
1905
- LeadLog(`--listCampaignCodeSubmited`, listCampaignCodeSubmited);
1906
- const listCampaignCodeClosed = cookieKeys.filter((i) => i.includes('lead_closed'));
1907
- LeadLog(`--listCampaignCodeClosed`, listCampaignCodeClosed);
1908
- const listCampaignSubmitedClosed = [
1909
- ...listCampaignCodeSubmited,
1910
- ...listCampaignCodeClosed,
1911
- ];
1912
- const listCampaignNoSubmitedClosed = listCampaginsMatch.filter((i) => {
1913
- const hasSubmited = listCampaignSubmitedClosed.some((k) => k.includes(campaignsDevice[i.campaignIndex].code));
1914
- return !hasSubmited;
1915
- });
1916
- const listCampaignValid = getShuffleArray(listCampaignNoSubmitedClosed);
1917
- // .sort(
1918
- // (a, b) =>
1919
- // (listCampaignValid[a.campaignIndex]?.score || 0) -
1920
- // (listCampaignValid[b.campaignIndex]?.score || 0),
1921
- // )
1922
- LeadLog('--listCampaignValid : ', listCampaignValid);
1923
- if (listCampaignValid && listCampaignValid.length) {
1924
- const CAMPAIGN_SHOW = campaignsDevice[listCampaignValid[0].campaignIndex];
1925
- LeadLog(`CAMPAIGN_SHOW`, CAMPAIGN_SHOW);
1926
- const { rules } = CAMPAIGN_SHOW;
1927
- // CHECK RULE TRIGGER POPUP
1928
- const timeoutRule = Number((_c = rules.find((i) => i.rule == 'time')) === null || _c === void 0 ? void 0 : _c.value);
1929
- LeadLog(`timeoutRule`, timeoutRule);
1930
- const scrollRule = Number((_d = rules.find((i) => i.rule == 'scroll')) === null || _d === void 0 ? void 0 : _d.value);
1931
- LeadLog(`scrollRule`, scrollRule);
1932
- let impressionAction = 'TIME';
1933
- if (Number.isInteger(timeoutRule)) {
1934
- impressionAction = 'TIME';
1935
- LeadLog(' SHOW AWESOME POPUP AFTER: ', timeoutRule, ' seconds');
1936
- timeoutRef = setTimeout(() => {
1937
- onShowPopup === null || onShowPopup === void 0 ? void 0 : onShowPopup(CAMPAIGN_SHOW, impressionAction);
1938
- }, timeoutRule * 1000);
1939
- }
1940
- if (Number.isInteger(scrollRule)) {
1941
- impressionAction = 'SCROLL';
1942
- LeadLog('✨ SHOW AWESOME AFTER: SCROLL', scrollRule, ' %');
1943
- const $p = document.querySelector(`[data-url="${location.pathname}"]`) ||
1944
- document.querySelector('body');
1945
- const pct = $p.getBoundingClientRect().top;
1946
- const pb = $p.offsetHeight;
1947
- LeadLog(`👓 Element check scroll: `, $p);
1948
- LEAD_SCROLL_EVENT = function leadScollCheckHandler() {
1949
- const wt = window.pageYOffset || document.documentElement.scrollTop;
1950
- let percent = 0;
1951
- if (wt >= pct) {
1952
- percent = Math.round(((wt - pct) / (pb - innerHeight)) * 100);
1953
- }
1954
- LeadLog('---Scroll', percent, scrollRule);
1955
- // TODO: CHECK FOOTER HEIGHT
1956
- if (percent >= scrollRule) {
1957
- window.removeEventListener('scroll', LEAD_SCROLL_EVENT);
1958
- onShowPopup === null || onShowPopup === void 0 ? void 0 : onShowPopup(CAMPAIGN_SHOW, impressionAction);
1959
- }
1960
- };
1961
- window.addEventListener('scroll', LEAD_SCROLL_EVENT, {
1962
- passive: true,
1963
- });
1964
- }
1916
+ }
1917
+ });
1918
+ // Check tags
1919
+ const listMetaTag = Array.from(document.getElementsByTagName('META')).filter((i) => i.getAttribute('property') == 'article:tag');
1920
+ const listTags = listMetaTag.map((i) => i.content);
1921
+ let listCampaignHasTag = [];
1922
+ let listTagsObj = [];
1923
+ if (listTags && listTags.length) {
1924
+ listCampaignHasTag = campaignsDevice
1925
+ .map((i, index) => i.targets
1926
+ .filter((i) => i.type == CAMPAIGN_TARGET_TYPE.TAGS)
1927
+ .map((i) => (Object.assign(Object.assign({}, i), { campaignIndex: index }))))
1928
+ .flat(1);
1929
+ listTagsObj = listCampaignHasTag.filter((i) => listTags.includes(i.target));
1930
+ }
1931
+ const listCampaginsMatch = [...listLinksObj, ...listTagsObj];
1932
+ const cookieKeys = document.cookie.split('; ').map((i) => i.split('=')[0]);
1933
+ const listCampaignCodeSubmited = cookieKeys.filter((i) => i.includes('lead_submited'));
1934
+ LeadLog(`--listCampaignCodeSubmited`, listCampaignCodeSubmited);
1935
+ const listCampaignCodeClosed = cookieKeys.filter((i) => i.includes('lead_closed'));
1936
+ LeadLog(`--listCampaignCodeClosed`, listCampaignCodeClosed);
1937
+ const listCampaignSubmitedClosed = [
1938
+ ...listCampaignCodeSubmited,
1939
+ ...listCampaignCodeClosed,
1940
+ ];
1941
+ const listCampaignNoSubmitedClosed = listCampaginsMatch.filter((i) => {
1942
+ const hasSubmited = listCampaignSubmitedClosed.some((k) => k.includes(campaignsDevice[i.campaignIndex].code));
1943
+ return !hasSubmited;
1944
+ });
1945
+ const listCampaignValid = getShuffleArray(listCampaignNoSubmitedClosed);
1946
+ // .sort(
1947
+ // (a, b) =>
1948
+ // (listCampaignValid[a.campaignIndex]?.score || 0) -
1949
+ // (listCampaignValid[b.campaignIndex]?.score || 0),
1950
+ // )
1951
+ LeadLog('--listCampaignValid : ', listCampaignValid);
1952
+ if (listCampaignValid && listCampaignValid.length) {
1953
+ const CAMPAIGN_SHOW = campaignsDevice[listCampaignValid[0].campaignIndex];
1954
+ return CAMPAIGN_SHOW;
1955
+ }
1956
+ else {
1957
+ LeadLog('🚧 No lead campaigns on current URL, tags');
1958
+ return null;
1959
+ }
1960
+ }
1961
+ function addEventShowCurrentCampaign({ campaign: CAMPAIGN_SHOW, onShowPopup, }) {
1962
+ var _a, _b;
1963
+ LeadLog(`CAMPAIGN_SHOW`, CAMPAIGN_SHOW);
1964
+ const { rules } = CAMPAIGN_SHOW;
1965
+ // CHECK RULE TRIGGER POPUP
1966
+ const timeoutRule = Number((_a = rules.find((i) => i.rule == 'time')) === null || _a === void 0 ? void 0 : _a.value);
1967
+ LeadLog(`timeoutRule`, timeoutRule);
1968
+ const scrollRule = Number((_b = rules.find((i) => i.rule == 'scroll')) === null || _b === void 0 ? void 0 : _b.value);
1969
+ LeadLog(`scrollRule`, scrollRule);
1970
+ let impressionAction = 'TIME';
1971
+ if (Number.isInteger(timeoutRule)) {
1972
+ impressionAction = 'TIME';
1973
+ LeadLog('✨ SHOW AWESOME POPUP AFTER: ', timeoutRule, ' seconds');
1974
+ timeoutRef = setTimeout(() => {
1975
+ onShowPopup === null || onShowPopup === void 0 ? void 0 : onShowPopup(CAMPAIGN_SHOW, impressionAction);
1976
+ }, timeoutRule * 1000);
1977
+ return { campaign: CAMPAIGN_SHOW, action: impressionAction };
1978
+ }
1979
+ if (Number.isInteger(scrollRule)) {
1980
+ impressionAction = 'SCROLL';
1981
+ LeadLog('✨ SHOW AWESOME AFTER: SCROLL', scrollRule, ' %');
1982
+ const $p = document.querySelector(`[data-url="${location.pathname}"]`) ||
1983
+ document.querySelector('body');
1984
+ const pct = $p.getBoundingClientRect().top;
1985
+ const pb = $p.offsetHeight;
1986
+ LeadLog(`👓 Element check scroll: `, $p);
1987
+ LEAD_SCROLL_EVENT = function leadScollCheckHandler() {
1988
+ const wt = window.pageYOffset || document.documentElement.scrollTop;
1989
+ let percent = 0;
1990
+ if (wt >= pct) {
1991
+ percent = Math.round(((wt - pct) / (pb - innerHeight)) * 100);
1965
1992
  }
1966
- else {
1967
- LeadLog('🚧 No lead campaigns on current URL, tags');
1993
+ LeadLog('---Scroll', percent, scrollRule);
1994
+ // TODO: CHECK FOOTER HEIGHT
1995
+ if (percent >= scrollRule) {
1996
+ window.removeEventListener('scroll', LEAD_SCROLL_EVENT);
1997
+ onShowPopup === null || onShowPopup === void 0 ? void 0 : onShowPopup(CAMPAIGN_SHOW, impressionAction);
1968
1998
  }
1999
+ };
2000
+ window.addEventListener('scroll', LEAD_SCROLL_EVENT, {
2001
+ passive: true,
2002
+ });
2003
+ }
2004
+ }
2005
+ function checkShowPopup({ leadApi, leadSiteId, leadDomain, onShowPopup, DEBUG_URL, }) {
2006
+ // clear previous passive event, check for new condition
2007
+ clearPassiveEvent();
2008
+ const leadCurrentUrl = DEBUG_URL;
2009
+ Service.getCampaigns({
2010
+ url: DEBUG_URL,
2011
+ siteId: leadSiteId,
2012
+ apiLeadUrl: leadApi,
2013
+ })
2014
+ .then((campRes) => {
2015
+ LeadLog('List campagin: ', campRes);
2016
+ LEAD_RESET_VAR();
2017
+ const campaigns = (campRes || [])
2018
+ .filter(filterFnCampaign)
2019
+ .filter(fillterApprearanceTimeCampaign);
2020
+ const campaign = getCurrentCampaign({
2021
+ campaigns,
2022
+ leadCurrentUrl,
2023
+ leadDomain,
2024
+ });
2025
+ if (campaign) {
2026
+ addEventShowCurrentCampaign({ campaign, onShowPopup });
1969
2027
  }
1970
2028
  })
1971
2029
  .catch((err) => {
@@ -1982,31 +2040,71 @@ const LeadLog = (...params) => {
1982
2040
  }
1983
2041
  };
1984
2042
 
2043
+ const LeadGenInlineWithoutMemo = (props) => {
2044
+ const [campaign, setCampaign] = useState();
2045
+ const { forceCampaign, apiUrl, apiLeadUrl, siteId, siteDomain, DEBUG_URL } = props;
2046
+ useEffect(() => {
2047
+ if (forceCampaign) {
2048
+ setCampaign(forceCampaign);
2049
+ return;
2050
+ }
2051
+ (() => __awaiter(void 0, void 0, void 0, function* () {
2052
+ const campaign = yield leadGenInlineGetCampaign({
2053
+ siteId,
2054
+ siteDomain,
2055
+ apiLeadUrl: apiUrl || apiLeadUrl || '',
2056
+ url: DEBUG_URL,
2057
+ });
2058
+ if (campaign) {
2059
+ setCampaign(campaign);
2060
+ }
2061
+ }))();
2062
+ }, [forceCampaign, DEBUG_URL, apiUrl, apiLeadUrl, siteId, siteDomain]);
2063
+ if (!campaign || !(campaign === null || campaign === void 0 ? void 0 : campaign.id)) {
2064
+ return null;
2065
+ }
2066
+ return (React__default.createElement(LeadGen, Object.assign({}, props, { forceCampaign: campaign, apiUrl: apiUrl || apiLeadUrl, flatComponent: true })));
2067
+ };
2068
+ const LeadGenInline = memo(LeadGenInlineWithoutMemo);
2069
+ function leadGenInlineGetCampaign(props) {
2070
+ return __awaiter(this, void 0, void 0, function* () {
2071
+ const { url, apiLeadUrl, siteId, siteDomain } = props;
2072
+ const campaigns = yield Service.getCampaigns({ url, apiLeadUrl, siteId });
2073
+ const campaignsInline = campaigns.filter(({ extra_fields }) => {
2074
+ const { currentLayout } = extra_fields || {};
2075
+ return currentLayout.includes('Inline');
2076
+ });
2077
+ return getCurrentCampaign({
2078
+ campaigns: campaignsInline,
2079
+ leadCurrentUrl: url,
2080
+ leadDomain: siteDomain,
2081
+ });
2082
+ });
2083
+ }
2084
+
2085
+ const LeadGenTranslationProvider = (props) => {
2086
+ const { locale, children } = props;
2087
+ const translationContextValue = useMemo(() => ({ locale, values: getTranslations(locale) }), [locale]);
2088
+ return (React__default.createElement(TranslationsContext.Provider, { value: translationContextValue }, children));
2089
+ };
2090
+
1985
2091
  const LeadGenContext = createContext({
1986
- submit(value) {
2092
+ onSubmit(value) {
1987
2093
  /** Init for FAKING function */
1988
2094
  LeadLog('** LeadGen Submit : ', value);
1989
2095
  return Promise.reject(value);
1990
2096
  },
1991
- submitSubscriptionBox(value) {
2097
+ onImpression(value) {
1992
2098
  /** Init for FAKING function */
1993
- LeadLog('** LeadGen SubmitSubscriptionBox : ', value);
1994
- return Promise.reject(value);
1995
- },
1996
- impression(type) {
1997
- /** Init for FAKING function */
1998
- LeadLog('** LeadGen Impression : ', type);
2099
+ LeadLog('** LeadGen Impression : ', value);
1999
2100
  return Promise.reject();
2000
2101
  },
2001
- /** For Subscription Box */
2002
- subscriptionIcon: '',
2003
- subscriptionTitle: '',
2004
- subscriptionPhoneType: '',
2005
2102
  });
2006
2103
  const LeadGenContextProvider = (props) => {
2007
- const { campaign_code: campaignCodeProps, apiSsoUrl, apiLeadUrl, apiSubotUrl, locale: localeProps, forceCampaign: forceCampaignProps, extraValues, articleId = 1, categoryId = 1, siteDomain: site_domain, children, userInfo } = props, restProps = __rest(props, ["campaign_code", "apiSsoUrl", "apiLeadUrl", "apiSubotUrl", "locale", "forceCampaign", "extraValues", "articleId", "categoryId", "siteDomain", "children", "userInfo"]);
2104
+ 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"]);
2008
2105
  const { t } = useTranslations();
2009
- const [forceCampaign, setForceCampaign] = useState(forceCampaignProps);
2106
+ const [rawForceCampaign, setRawForceCampaign] = useState(forceCampaignProps);
2107
+ const [forceCampaign, setForceCampaign] = useState(() => formatCampaignDetail(forceCampaignProps));
2010
2108
  const [subscriptionInfo, setSubscriptionInfo] = useState({
2011
2109
  subscriptionIcon: '',
2012
2110
  subscriptionTitle: '',
@@ -2016,98 +2114,65 @@ const LeadGenContextProvider = (props) => {
2016
2114
  const locale = useMemo(() => {
2017
2115
  return localeProps || LOCALE['PhilippinesEnglish'];
2018
2116
  }, [localeProps]);
2019
- const { url, campaign_id, cookie_id, ga_client_id, category_id, article_id, article_title, category_name, } = useMemo(() => ({
2020
- url: location.href.toLowerCase() || '',
2021
- cookie_id: getCookie('hhg-id') || null,
2022
- ga_client_id: getCookie('_ga'),
2023
- campaign_id: forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.id,
2024
- campaign_code: campaignCodeProps || (forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.code),
2025
- category_id: categoryId,
2026
- article_id: articleId,
2027
- article_title: (extraValues === null || extraValues === void 0 ? void 0 : extraValues.article_title) || document.title || '',
2028
- category_name: (extraValues === null || extraValues === void 0 ? void 0 : extraValues.category_name) || '',
2029
- }), [
2030
- campaignCodeProps,
2031
- articleId,
2032
- categoryId,
2033
- forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.id,
2034
- extraValues === null || extraValues === void 0 ? void 0 : extraValues.article_title,
2035
- extraValues === null || extraValues === void 0 ? void 0 : extraValues.category_name,
2036
- ]);
2037
- // const fetchCampaign = useCallback(
2038
- // (campaign_code: string) => {
2039
- // Service.getCampaignByCode(campaign_code).then((res) => {
2040
- // const { _data } = res || {}
2041
- // const { campaigns } = _data || {}
2042
- // LeadLog('** LeadGen Campaign : ', campaigns)
2043
- // setForceCampaign(formatCampaignDetail(campaigns))
2044
- // })
2045
- // },
2046
- // [campaignCodeProps],
2047
- // )
2048
2117
  // TODO : Update form for LeadGen
2049
- const submit = useCallback((data) => {
2118
+ const onSubmit = useCallback((data) => {
2050
2119
  return Service.postSubscriptionBoxLead({ data });
2120
+ }, [forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.blocks]);
2121
+ const onImpression = useCallback((value) => {
2122
+ //
2123
+ console.log('** RYAN LeadGenContext.tsx 188 value : ', value);
2124
+ return Promise.resolve('dfdfdf');
2051
2125
  }, []);
2052
2126
  const submitSubscriptionBox = useCallback((value) => {
2053
2127
  const data = Object.assign(Object.assign(Object.assign(Object.assign({}, value), {
2054
2128
  // campaign_id,
2055
- site_domain, url: (value === null || value === void 0 ? void 0 : value.url) || url, cookie_id, ga_client_id: (value === null || value === void 0 ? void 0 : value.ga_client_id) || ga_client_id }), extraValues), { article_id,
2056
- category_id,
2057
- article_title });
2129
+ 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
2130
  return Service.postSubscriptionBoxLead({ data });
2059
2131
  }, [
2060
2132
  extraValues,
2061
- site_domain,
2062
- campaign_id,
2063
- article_id,
2064
- article_title,
2065
- category_id,
2066
- url,
2067
- cookie_id,
2068
- ga_client_id,
2133
+ extraValues === null || extraValues === void 0 ? void 0 : extraValues.article_title,
2134
+ siteDomain,
2135
+ articleId,
2136
+ categoryId,
2069
2137
  ]);
2070
- const impression = useCallback((type) => {
2071
- const gaCookie = getCookie('_ga') || null;
2138
+ const impressionSubscriptionBox = useCallback((type) => {
2072
2139
  const impression = {
2073
2140
  subscription_title: subscriptionInfo.subscriptionTitle,
2074
2141
  name: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) || '',
2075
2142
  area_code: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.area_code) || '',
2076
2143
  phone_number: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone) || '',
2077
- site_domain: domainLocales[locale],
2144
+ site_domain: siteDomain,
2078
2145
  url: location.href.toLowerCase(),
2079
2146
  cookie_id: getCookie('hhg-id'),
2080
- ga_client_id: gaCookie,
2081
- article_title,
2082
- article_id,
2083
- category_id,
2084
- category_name,
2147
+ ga_client_id: getCookie('_ga') || null,
2148
+ article_title: (extraValues === null || extraValues === void 0 ? void 0 : extraValues.article_title) || document.title || '',
2149
+ article_id: articleId,
2150
+ category_id: categoryId,
2151
+ category_name: (extraValues === null || extraValues === void 0 ? void 0 : extraValues.category_name) || '',
2085
2152
  type,
2086
2153
  };
2087
2154
  return Service.trackingSubscription(impression);
2088
2155
  }, [
2089
- campaign_id,
2090
- url,
2091
- article_title,
2092
- cookie_id,
2093
- ga_client_id,
2156
+ articleId,
2094
2157
  categoryId,
2095
- article_id,
2096
2158
  subscriptionInfo.subscriptionTitle,
2159
+ extraValues === null || extraValues === void 0 ? void 0 : extraValues.category_name,
2097
2160
  userInfo === null || userInfo === void 0 ? void 0 : userInfo.name,
2098
2161
  userInfo === null || userInfo === void 0 ? void 0 : userInfo.area_code,
2099
2162
  userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone,
2100
2163
  ]);
2101
2164
  useEffect(() => {
2165
+ /** Force Campaign */
2102
2166
  if (forceCampaignProps) {
2103
2167
  setForceCampaign(formatCampaignDetail(forceCampaignProps));
2168
+ setRawForceCampaign(forceCampaignProps);
2104
2169
  return;
2105
2170
  }
2106
2171
  /** For Subscription Box */
2107
2172
  if (categoryId) {
2108
2173
  Service.getSubscriptionBoxInfo({
2109
2174
  category: categoryId,
2110
- site: site_domain,
2175
+ site: siteDomain,
2111
2176
  slug: location === null || location === void 0 ? void 0 : location.pathname,
2112
2177
  }).then((res) => {
2113
2178
  const { _data } = res || {};
@@ -2240,10 +2305,39 @@ const LeadGenContextProvider = (props) => {
2240
2305
  });
2241
2306
  return;
2242
2307
  }
2243
- // if (campaignCodeProps) {
2244
- // fetchCampaign(campaignCodeProps)
2308
+ if (campaignCodeProps) {
2309
+ Service.getCampaignByCode(campaignCodeProps).then((res) => {
2310
+ const { _data } = res || {};
2311
+ const { campaigns } = _data || {};
2312
+ LeadLog('** LeadGen Campaign : ', campaigns);
2313
+ setForceCampaign(formatCampaignDetail(campaigns));
2314
+ setRawForceCampaign(campaigns);
2315
+ });
2316
+ return;
2317
+ }
2318
+ // /** For LeadGen */
2319
+ // if (!leadStore.campaigns?.length) {
2320
+ // checkShowPopup({
2321
+ // leadApi: apiLeadUrl,
2322
+ // leadDomain: siteDomain,
2323
+ // leadSiteId: siteId,
2324
+ // onShowPopup(campaign: any, action: string) {
2325
+ // console.log('** RYAN LeadGenContext.tsx 421 action : ', action)
2326
+ // setForceCampaign(formatCampaignDetail(campaign))
2327
+ // setRawForceCampaign(campaign)
2328
+ // },
2329
+ // DEBUG_URL,
2330
+ // })
2245
2331
  // }
2246
- }, [forceCampaignProps, campaignCodeProps, categoryId]);
2332
+ }, [
2333
+ forceCampaignProps,
2334
+ campaignCodeProps,
2335
+ categoryId,
2336
+ siteId,
2337
+ siteDomain,
2338
+ apiLeadUrl,
2339
+ DEBUG_URL,
2340
+ ]);
2247
2341
  useEffect(() => {
2248
2342
  leadStore.apiSsoUrl = apiSsoUrl;
2249
2343
  leadStore.apiLeadUrl = apiLeadUrl;
@@ -2256,10 +2350,14 @@ const LeadGenContextProvider = (props) => {
2256
2350
  apiLeadUrl,
2257
2351
  apiSubotUrl, locale: localeProps, extraValues,
2258
2352
  articleId,
2259
- categoryId, siteDomain: site_domain, forceCampaign,
2260
- submit,
2353
+ categoryId,
2354
+ siteDomain,
2355
+ forceCampaign,
2356
+ rawForceCampaign,
2357
+ onSubmit,
2358
+ onImpression,
2261
2359
  submitSubscriptionBox,
2262
- impression }) },
2360
+ impressionSubscriptionBox }) },
2263
2361
  React__default.createElement(LeadGenTranslationProvider, { locale: locale }, children)));
2264
2362
  };
2265
2363
  const useLeadGenContext = () => {
@@ -3296,7 +3394,7 @@ const LeadGenSubscriptionBoxWithoutMemo = ({ locale, userInfo, forceCampaign, ca
3296
3394
  const { image, extra_fields, id: campaign_id, bot_id: campaign_subot_id = [], ThankYouBlock, } = forceCampaign || {};
3297
3395
  const { textBlocks, listBlockAdded, actionBlocks } = extra_fields || {};
3298
3396
  const { submitBlock } = actionBlocks || {};
3299
- const { apiLeadUrl, subscriptionIcon, subscriptionTitle, subscriptionPhoneType, submitSubscriptionBox, onFinish, impression, } = useLeadGenContext();
3397
+ const { apiLeadUrl, subscriptionIcon, subscriptionTitle, subscriptionPhoneType, submitSubscriptionBox, onFinish, impressionSubscriptionBox, } = useLeadGenContext();
3300
3398
  const { t } = useTranslations();
3301
3399
  const { action: { pushNotifications }, } = useContext(TogetherComponentGlobalContext);
3302
3400
  const [loading, setLoading] = useState(false);
@@ -3356,7 +3454,7 @@ const LeadGenSubscriptionBoxWithoutMemo = ({ locale, userInfo, forceCampaign, ca
3356
3454
  const reqValues = Object.assign(Object.assign({}, newValues), ssoValues);
3357
3455
  const [res] = yield Promise.all([
3358
3456
  submitSubscriptionBox(reqValues),
3359
- impression('submit_form'),
3457
+ impressionSubscriptionBox('submit_form'),
3360
3458
  ]);
3361
3459
  const { _data } = res || {};
3362
3460
  const { model } = _data || {};
@@ -3402,7 +3500,7 @@ const LeadGenSubscriptionBoxWithoutMemo = ({ locale, userInfo, forceCampaign, ca
3402
3500
  userInfo === null || userInfo === void 0 ? void 0 : userInfo.uid,
3403
3501
  userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone,
3404
3502
  ]);
3405
- return (React__default.createElement(ImpressionTrackingWrapper, { dependency: categoryId, onImpression: () => impression('impression') },
3503
+ return (React__default.createElement(ImpressionTrackingWrapper, { dependency: categoryId, onImpression: () => impressionSubscriptionBox('impression') },
3406
3504
  React__default.createElement(StyledLeadGenSubscriptionBox, { "data-phone-type": subscriptionPhoneType, "data-type": "subscription_box_A" },
3407
3505
  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 })),
3408
3506
  !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 })))));
@@ -4136,7 +4234,7 @@ const ThankyouPopup = ({ title, titleAlign, subtitle, subtitleAlign, link, linkN
4136
4234
  React__default.createElement(Button, { className: `lead-modal__btn ${LEAD_CLASS}`, color: primaryColor }, linkText)))))));
4137
4235
  };
4138
4236
 
4139
- const InlineLayout = ({ content, inlinePosition, doImpression, }) => {
4237
+ const InlineLayout = ({ flatComponent, content, inlinePosition, doImpression, }) => {
4140
4238
  const target = useMemo(() => {
4141
4239
  if (!inlinePosition)
4142
4240
  return null;
@@ -4241,6 +4339,9 @@ const InlineLayout = ({ content, inlinePosition, doImpression, }) => {
4241
4339
  }
4242
4340
  }
4243
4341
  }, [inlinePosition]);
4342
+ if (!!flatComponent) {
4343
+ return (React__default.createElement(ImpressionTrackingWrapper, { onImpression: () => __awaiter(void 0, void 0, void 0, function* () { return yield doImpression(); }) }, content));
4344
+ }
4244
4345
  if (!inlinePosition || !target)
4245
4346
  return null;
4246
4347
  return createPortal(React__default.createElement(ImpressionTrackingWrapper, { onImpression: () => __awaiter(void 0, void 0, void 0, function* () { return yield doImpression(); }) }, content), target);
@@ -5013,7 +5114,7 @@ const LEADGEN_SHOW_HEADER = [
5013
5114
  ];
5014
5115
  // const CAMPAGE_CODE_LIST_APPLY_NEW_UI = ['ri3lkoxcetjoj39', 'u0adw7hw8kw7t89']
5015
5116
  const CAMPAGE_CODE_LIST_APPLY_NEW_UI = ['ri3lkoxcetjoj39'];
5016
- 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
+ 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, }) => {
5017
5118
  var _a, _b;
5018
5119
  const { primaryColor } = useContext(LeadGenContext$1);
5019
5120
  const { isMobile } = useScreenSize();
@@ -5413,7 +5514,7 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
5413
5514
  return React__default.createElement(SideBarLayout, { content: PopupContainer });
5414
5515
  }
5415
5516
  else if (isInline) {
5416
- return (React__default.createElement(InlineLayout, { action: action, content: PopupContainer, campaignCode: campaignCode, inlinePosition: extraFields.popupInlinePosition, doImpression: handleDoImpression }));
5517
+ return (React__default.createElement(InlineLayout, { flatComponent: flatComponent, action: action, content: PopupContainer, campaignCode: campaignCode, inlinePosition: extraFields.popupInlinePosition, doImpression: handleDoImpression }));
5417
5518
  }
5418
5519
  return null;
5419
5520
  };
@@ -5506,7 +5607,7 @@ function getCategoryLevel(t = 'Xin chao {{category_2}} extra') {
5506
5607
  return null;
5507
5608
  }
5508
5609
  }
5509
- const NewLeadPopup = ({ campaign, action, onSubmit, onClose, onUnmount, doImpression, showThankyou, locale, showEmpty, setShowEmpty, userInfo, }) => {
5610
+ const NewLeadPopup = ({ flatComponent, campaign, action, onSubmit, onClose, onUnmount, doImpression, showThankyou, locale, showEmpty, setShowEmpty, userInfo, }) => {
5510
5611
  var _a, _b;
5511
5612
  const { apiUrl, siteDomain } = useContext(LeadGenContext$1);
5512
5613
  const { extra_fields, image, image_desktop, code, image_background, image_overlay_mobile, image_overlay_desktop, } = campaign || {};
@@ -5609,7 +5710,7 @@ const NewLeadPopup = ({ campaign, action, onSubmit, onClose, onUnmount, doImpres
5609
5710
  currentLayout == 'Fullscreen' ||
5610
5711
  currentLayout == 'Sidebar' ||
5611
5712
  currentLayout == 'Slider') {
5612
- 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
+ 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 }));
5613
5714
  }
5614
5715
  else if (currentLayout.includes('Skin')) {
5615
5716
  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 }));
@@ -5701,7 +5802,7 @@ const formatTrackingData = (params) => {
5701
5802
  };
5702
5803
 
5703
5804
  // mount css
5704
- const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor, apiSubotUrl, DEBUG_URL, forceCampaign, children, extraPayloadValues = [], excludeExitRulesHandler, userInfo, onClose: onCloseProps, onSubmit: onSubmitProps, }) => {
5805
+ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor, apiSubotUrl, DEBUG_URL, forceCampaign, children, extraPayloadValues = [], excludeExitRulesHandler, userInfo, onClose: onCloseProps, onSubmit: onSubmitProps, flatComponent, }) => {
5705
5806
  var _a, _b;
5706
5807
  const scrollEventHandlerRef = useRef();
5707
5808
  const leadStartTimeRef = useRef(Date.now());
@@ -6040,7 +6141,7 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor
6040
6141
  !!currentLayout &&
6041
6142
  !currentLayout.includes('Inline') &&
6042
6143
  !currentLayout.includes('Sidebar') && (React__default.createElement(Overlay, { color: "#000", opacity: 0.6, center: true, zIndex: 400, pos: 'fixed', onClick: () => onClose() })),
6043
- 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 })))));
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 })))));
6044
6145
  })))))));
6045
6146
  };
6046
6147
  const LeadGen = _LeadGen;
@@ -6051,4 +6152,4 @@ LeadGen.Thankyou = Thankyou;
6051
6152
  LeadGen.OtpForm = OtpBlock$1;
6052
6153
  LeadGen.Close = Close;
6053
6154
 
6054
- export { LeadGen, LeadGenSubscriptionBox };
6155
+ export { LeadGen, LeadGenInline, LeadGenSubscriptionBox, leadGenInlineGetCampaign };