@hhgtech/hhg-components 1.29.481-beta-1 → 1.29.481-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 (593) hide show
  1. package/build/{InputDate-3636db90.js → InputDate-5d6c3b9c.js} +5 -5
  2. package/build/{LastPeriod-b174d087.js → LastPeriod-0f47ae00.js} +1 -1
  3. package/build/{MobileBottomNavigationIcon-3282e68d.js → MobileBottomNavigationIcon-88519180.js} +3 -3
  4. package/build/{Spinner-43a43219.js → Spinner-80b3d0b7.js} +1 -1
  5. package/build/{WhatsApp-4e8363c9.js → WhatsApp-fc7f619f.js} +1 -1
  6. package/build/adapters.js +20 -20
  7. package/build/atoms.js +50 -50
  8. package/build/babyGrowth.js +86 -86
  9. package/build/cache.js +2 -2
  10. package/build/care.js +18 -18
  11. package/build/careBookingSearchBar.js +14 -14
  12. package/build/careBookingSearchBarV2.js +15 -15
  13. package/build/components/atoms/imageUpload/ImageUpload.types.d.ts +1 -1
  14. package/build/components.js +104 -104
  15. package/build/{constants-57cacb02.js → constants-0d0cfdfc.js} +1 -1
  16. package/build/constants.js +3 -3
  17. package/build/constantsDomainLocales.js +1 -1
  18. package/build/constantsRiskScreener.js +2 -2
  19. package/build/constantsSite.js +2 -2
  20. package/build/{core-6e43ff94.js → core-68ed1dfb.js} +1 -1
  21. package/build/{dataTransform-44fe5a27.js → dataTransform-334e4dde.js} +1 -1
  22. package/build/ecom.js +5 -5
  23. package/build/{editor-27e8ed3a.js → editor-f953e0ba.js} +11 -11
  24. package/build/embeddedHeathToolCards_babyGrowth.js +25 -25
  25. package/build/embeddedHeathToolCards_babyPoop.js +22 -22
  26. package/build/embeddedHeathToolCards_babyVaccine.js +24 -24
  27. package/build/embeddedHeathToolCards_bmi_bmi.js +27 -27
  28. package/build/embeddedHeathToolCards_bmrBmr.js +27 -27
  29. package/build/embeddedHeathToolCards_dueDate_dueDate.js +24 -24
  30. package/build/embeddedHeathToolCards_ovulation_ovulation.js +24 -24
  31. package/build/embeddedHeathToolCards_pwg_pwg.js +28 -28
  32. package/build/embeddedHeathToolCards_targetHeartRate.js +29 -29
  33. package/build/esm/{InputDate-079946dd.js → InputDate-46b57231.js} +5 -5
  34. package/build/esm/{LastPeriod-10794941.js → LastPeriod-360928de.js} +1 -1
  35. package/build/esm/{MobileBottomNavigationIcon-9f87bc11.js → MobileBottomNavigationIcon-1f56751d.js} +3 -3
  36. package/build/esm/{Spinner-318c3595.js → Spinner-bcd7096b.js} +1 -1
  37. package/build/esm/{WhatsApp-9de799dd.js → WhatsApp-0bc03b19.js} +1 -1
  38. package/build/esm/adapters.js +20 -20
  39. package/build/esm/atoms.js +50 -50
  40. package/build/esm/babyGrowth.js +86 -86
  41. package/build/esm/cache.js +2 -2
  42. package/build/esm/care.js +18 -18
  43. package/build/esm/careBookingSearchBar.js +14 -14
  44. package/build/esm/careBookingSearchBarV2.js +15 -15
  45. package/build/esm/components/atoms/imageUpload/ImageUpload.types.d.ts +1 -1
  46. package/build/esm/components.js +104 -104
  47. package/build/esm/{constants-e7102a1f.js → constants-29cbc9b3.js} +1 -1
  48. package/build/esm/constants.js +3 -3
  49. package/build/esm/constantsDomainLocales.js +1 -1
  50. package/build/esm/constantsRiskScreener.js +2 -2
  51. package/build/esm/constantsSite.js +2 -2
  52. package/build/esm/{core-aaf7165a.js → core-f3682c81.js} +1 -1
  53. package/build/esm/{dataTransform-ef2b9b5e.js → dataTransform-6d2fe081.js} +1 -1
  54. package/build/esm/ecom.js +5 -5
  55. package/build/esm/{editor-8a8575fe.js → editor-ca708bab.js} +11 -11
  56. package/build/esm/embeddedHeathToolCards_babyGrowth.js +25 -25
  57. package/build/esm/embeddedHeathToolCards_babyPoop.js +22 -22
  58. package/build/esm/embeddedHeathToolCards_babyVaccine.js +24 -24
  59. package/build/esm/embeddedHeathToolCards_bmi_bmi.js +27 -27
  60. package/build/esm/embeddedHeathToolCards_bmrBmr.js +27 -27
  61. package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +24 -24
  62. package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +24 -24
  63. package/build/esm/embeddedHeathToolCards_pwg_pwg.js +28 -28
  64. package/build/esm/embeddedHeathToolCards_targetHeartRate.js +29 -29
  65. package/build/esm/footer.js +22 -22
  66. package/build/esm/gAssets.js +2 -2
  67. package/build/esm/{healthTools-5be0b7ab.js → healthTools-7c352a63.js} +1 -1
  68. package/build/esm/healthToolsCardWrapper.js +20 -20
  69. package/build/esm/healthToolsForm.js +35 -35
  70. package/build/esm/hooks.js +13 -13
  71. package/build/esm/i18n.js +2 -2
  72. package/build/esm/i18nV2.js +2 -2
  73. package/build/esm/{index-4970f0eb.js → index-02ce4526.js} +4 -4
  74. package/build/esm/{index-8014bad7.js → index-0483ec02.js} +6 -6
  75. package/build/esm/{index-b90d6623.js → index-0cab3a69.js} +10 -10
  76. package/build/esm/{index-fcaa6554.js → index-1216cf04.js} +14 -14
  77. package/build/esm/{index-710dbed9.js → index-1489e460.js} +1 -1
  78. package/build/esm/{index-6dd86cd9.js → index-1c1c0147.js} +2 -2
  79. package/build/esm/{index-b1d570a3.js → index-1c6791f1.js} +3 -3
  80. package/build/esm/{index-3048e729.js → index-1fe78953.js} +18 -18
  81. package/build/esm/{index-de47f2b2.js → index-2055bbe6.js} +2 -2
  82. package/build/esm/{index-9fea046c.js → index-28bbe37a.js} +2 -2
  83. package/build/esm/{index-1b504848.js → index-295b869e.js} +15 -15
  84. package/build/esm/{index-b7068c0c.js → index-2ce638ab.js} +9 -9
  85. package/build/esm/{index-1579fb4a.js → index-2ce9b4fa.js} +22 -22
  86. package/build/esm/{index-fd102d9a.js → index-36a16098.js} +14 -14
  87. package/build/esm/{index-efeea0c7.js → index-36b13499.js} +2 -2
  88. package/build/esm/{index-6fe71184.js → index-39c30081.js} +32 -32
  89. package/build/esm/{index-36762bfa.js → index-39dfbfc8.js} +25 -25
  90. package/build/esm/{index-c53f83d3.js → index-40037f5f.js} +13 -13
  91. package/build/esm/{index-30fe58af.js → index-400c00b3.js} +1 -1
  92. package/build/esm/{index-532adc6e.js → index-40e27c1d.js} +30 -30
  93. package/build/esm/{index-01317ff2.js → index-4679aec6.js} +2 -2
  94. package/build/esm/{index-1fef967e.js → index-511bd993.js} +2 -2
  95. package/build/esm/{index-cd3cd772.js → index-52681292.js} +6 -6
  96. package/build/esm/{index-9a48dac8.js → index-5940bcba.js} +1 -1
  97. package/build/esm/{index-b6ab7c48.js → index-5a002729.js} +2 -2
  98. package/build/esm/{index-de037937.js → index-6019b7a2.js} +2 -2
  99. package/build/esm/{index-d61477fa.js → index-604541b6.js} +32 -32
  100. package/build/esm/{index-376b6321.js → index-650f79fc.js} +1 -1
  101. package/build/esm/{index-1365ef94.js → index-656d43c6.js} +3 -3
  102. package/build/esm/{index-00f9a478.js → index-6602906b.js} +18 -18
  103. package/build/esm/{index-e706949e.js → index-68ab994d.js} +2 -2
  104. package/build/esm/{index-d31fc929.js → index-6ada036d.js} +3 -3
  105. package/build/esm/{index-1061cb45.js → index-6e126c9a.js} +2 -2
  106. package/build/esm/{index-35303540.js → index-7384fa1e.js} +3 -3
  107. package/build/esm/{index-b02a244f.js → index-73f1e57d.js} +2 -2
  108. package/build/esm/{index-feeab0f7.js → index-75394ce8.js} +6 -6
  109. package/build/esm/{index-a498fd7d.js → index-82de28c0.js} +2 -2
  110. package/build/esm/{index-5b3a19e7.js → index-8667a7e7.js} +2 -2
  111. package/build/esm/{index-8a11f382.js → index-87a770b7.js} +1 -1
  112. package/build/esm/{index-2300eb11.js → index-894333aa.js} +14 -14
  113. package/build/esm/{index-eb94a71a.js → index-8b68423c.js} +7 -7
  114. package/build/esm/{index-25f1014a.js → index-8be1c454.js} +7 -7
  115. package/build/esm/{index-86c4e157.js → index-8c85be76.js} +21 -21
  116. package/build/esm/{index-89005c6a.js → index-90a96b62.js} +21 -21
  117. package/build/esm/{index-b69cdfa7.js → index-90c5380b.js} +8 -8
  118. package/build/esm/{index-59bbc7ed.js → index-91075485.js} +2 -2
  119. package/build/esm/{index-1163c2a2.js → index-94b04ff9.js} +3 -3
  120. package/build/esm/{index-6d933a31.js → index-9e2c0cfe.js} +1 -1
  121. package/build/esm/{index-4e2cb08c.js → index-a78adcf4.js} +4 -4
  122. package/build/esm/{index-2969860a.js → index-aa9db786.js} +19 -19
  123. package/build/esm/{index-ff2de97f.js → index-adc6e050.js} +5 -5
  124. package/build/esm/{index-12f1afb0.js → index-b0930686.js} +6 -6
  125. package/build/esm/{index-cefc18e4.js → index-b15272b1.js} +11 -11
  126. package/build/esm/{index-60f23445.js → index-b3bce02f.js} +3 -3
  127. package/build/esm/{index-e66d5d69.js → index-bab47ecc.js} +1 -1
  128. package/build/esm/{index-1a606e96.js → index-bb4fc349.js} +3 -3
  129. package/build/esm/index-bc456312.js +16 -0
  130. package/build/esm/{index-11537c7e.js → index-c6ef73f3.js} +5 -5
  131. package/build/esm/{index-128ed9aa.js → index-c8fa323e.js} +3 -3
  132. package/build/esm/{index-de2af0b4.js → index-cf9e0602.js} +16 -16
  133. package/build/esm/{index-8a437344.js → index-d4bd4b91.js} +2 -2
  134. package/build/esm/{index-9838dcc4.js → index-d9592e4c.js} +13 -13
  135. package/build/esm/{index-085dc2ae.js → index-dc277e34.js} +2 -2
  136. package/build/esm/{index-6e7b983e.js → index-dd673e79.js} +17 -17
  137. package/build/esm/{index-bb5a4249.js → index-e62363da.js} +16 -16
  138. package/build/esm/{index-c9d4fec6.js → index-e7333fe9.js} +15 -15
  139. package/build/esm/{index-7f25e440.js → index-e812e6c2.js} +26 -26
  140. package/build/esm/{index-20327942.js → index-e9d318b1.js} +14 -14
  141. package/build/esm/{index-9074ab66.js → index-f3606e41.js} +8 -8
  142. package/build/esm/{index-28284662.js → index-f87c6092.js} +16 -16
  143. package/build/esm/{index-290f0108.js → index-fbfe354e.js} +2 -2
  144. package/build/esm/{index-e0495a88.js → index-fca74c76.js} +16 -16
  145. package/build/esm/index.js +124 -124
  146. package/build/esm/{labelSorting-275277e5.js → labelSorting-38a75353.js} +4 -4
  147. package/build/esm/lead/LeadGenTranslationContext.d.ts +13 -2
  148. package/build/esm/lead/index.d.ts +2 -0
  149. package/build/esm/lead.js +990 -977
  150. package/build/esm/{logoIcon-89c6ed30.js → logoIcon-3d1f01a0.js} +2 -2
  151. package/build/esm/mantine.js +29 -38
  152. package/build/esm/misc.js +19 -19
  153. package/build/esm/miscGetDynamicHealthTool.js +4 -4
  154. package/build/esm/miscGetSocialList.js +8 -8
  155. package/build/esm/miscScreenSizeContext.js +1 -1
  156. package/build/esm/mobileBottomNavigation.js +5 -5
  157. package/build/esm/mobileBottomNavigationIcon.js +5 -5
  158. package/build/esm/molecules.js +78 -78
  159. package/build/esm/moleculesArticleCard.js +6 -6
  160. package/build/esm/moleculesArticleCardV2.js +17 -17
  161. package/build/esm/navigation.js +47 -47
  162. package/build/esm/navigationLogoutPopup.js +11 -11
  163. package/build/esm/navigationProfileButton.js +27 -27
  164. package/build/esm/onboardingV2.js +30 -30
  165. package/build/esm/organisms.js +57 -57
  166. package/build/esm/{post-113ee38e.js → post-d87bd236.js} +2 -2
  167. package/build/esm/profileNavigation.js +20 -20
  168. package/build/esm/progressBar.js +1 -1
  169. package/build/esm/pwg.js +23 -23
  170. package/build/esm/ssoV2.js +31 -40
  171. package/build/esm/{store-2faecd11.js → store-26bc5b00.js} +3 -3
  172. package/build/esm/subot/hooks/useVerifyPhoneNumber.d.ts +1 -0
  173. package/build/esm/subot/index.d.ts +1 -0
  174. package/build/esm/subot/subotInline/assets/arrow-down.d.ts +3 -0
  175. package/build/esm/subot/subotInline/assets/arrow-left.d.ts +3 -0
  176. package/build/esm/subot/subotInline/assets/arrow-right.d.ts +3 -0
  177. package/build/esm/subot/subotInline/assets/arrow-up.d.ts +3 -0
  178. package/build/esm/subot/subotInline/assets/check.d.ts +3 -0
  179. package/build/esm/subot/subotInline/assets/checkbox.d.ts +3 -0
  180. package/build/esm/subot/subotInline/assets/chevronRightActive.d.ts +3 -0
  181. package/build/esm/subot/subotInline/assets/dislike-article.d.ts +3 -0
  182. package/build/esm/subot/subotInline/assets/index.d.ts +10 -0
  183. package/build/esm/subot/subotInline/assets/like-article.d.ts +3 -0
  184. package/build/esm/subot/subotInline/assets/rotate-left.d.ts +3 -0
  185. package/build/esm/subot/subotInline/index.d.ts +4 -0
  186. package/build/esm/subot/subotInline/index.styled.d.ts +67 -0
  187. package/build/esm/subot/subotInline/subotInline.config.d.ts +38 -0
  188. package/build/esm/subot/subotInline/subotInlineAction/index.d.ts +25 -0
  189. package/build/esm/subot/subotInline/subotInlineAction/subotInlineAction.d.ts +4 -0
  190. package/build/esm/subot/subotInline/subotInlineAction/subotInlineAction.styled.d.ts +54 -0
  191. package/build/esm/subot/subotInline/subotInlineFooter.d.ts +17 -0
  192. package/build/esm/subot/subotInline/subotInlineHeader.d.ts +3 -0
  193. package/build/esm/subot/subotInline/subotInlineIntent/index.d.ts +100 -0
  194. package/build/esm/subot/subotInline/subotInlineIntent/subotInlineIntent.d.ts +4 -0
  195. package/build/esm/subot/subotInline/subotInlineIntent/subotInlineIntent.styled.d.ts +159 -0
  196. package/build/esm/subot/subotInline/subotInlineIntent/subotInlineIntentFinal.d.ts +4 -0
  197. package/build/esm/subot/subotInline/subotInlineNode/SubotInlineNodeResultPoll.d.ts +4 -0
  198. package/build/esm/subot/subotInline/subotInlineNode/index.d.ts +15 -0
  199. package/build/esm/subot/subotInline/subotInlineNode/subotInlineNode.d.ts +5 -0
  200. package/build/esm/subot/subotInline/subotInlineNode/subotInlineNode.styled.d.ts +74 -0
  201. package/build/esm/subot/subotInline/subotInlineNode/subotInlineNodeFinal.d.ts +4 -0
  202. package/build/esm/subot/subotInline/subotInlineNode/subotInlineNodeFinalThankYou.d.ts +4 -0
  203. package/build/esm/subot/subotInline/subotInlineNode/subotInlineNodeForm.d.ts +4 -0
  204. package/build/esm/subot/subotInline/subotInlineNode/subotInlineNodeImage.d.ts +4 -0
  205. package/build/esm/subot/subotInline/subotInlineNode/subotInlineNodeMultiple.d.ts +4 -0
  206. package/build/esm/subot/subotInline/subotInlineNode/subotInlineNodeOTP.d.ts +4 -0
  207. package/build/esm/subot/subotInline/subotInlineNode/subotInlineNodePoll.d.ts +4 -0
  208. package/build/esm/subot/subotInline/subotInlineNode/subotInlineNodeRating.d.ts +4 -0
  209. package/build/esm/subot/subotInline/subotInlineNode/subotInlineNodeReaction.d.ts +4 -0
  210. package/build/esm/subot/subotInline/subotInlineNode/subotInlineNodeReview.d.ts +4 -0
  211. package/build/esm/subot/subotInline/subotInlineNode/subotInlineNodeSSO.d.ts +4 -0
  212. package/build/esm/subot/subotInline/subotInlineNode/subotInlineNodeStart.d.ts +4 -0
  213. package/build/esm/subot/subotInline/subotInlineNode/subotInlineNodeText.d.ts +4 -0
  214. package/build/esm/subot/subotInlineRevamp/context.d.ts +1 -1
  215. package/build/esm/subot/subotInlineRevamp/types.d.ts +2 -0
  216. package/build/esm/subot.js +3266 -112
  217. package/build/esm/surveyOrPremiumBanner.js +34 -34
  218. package/build/esm/surveyQuestionCard.js +11 -11
  219. package/build/esm/{surveyThankyouCard-b3dda5e9.js → surveyThankyouCard-d03b9441.js} +5 -5
  220. package/build/esm/together/togetherComponentGlobalContext.d.ts +2 -0
  221. package/build/esm/together.js +57 -57
  222. package/build/esm/togetherApiUtils.js +4 -4
  223. package/build/esm/togetherAtoms.js +31 -31
  224. package/build/esm/togetherComponentGlobalContext.js +4 -4
  225. package/build/esm/togetherMolecules.js +52 -52
  226. package/build/esm/togetherMoleculesCardAuthor.js +29 -29
  227. package/build/esm/togetherMoleculesPostImagePreview.js +11 -11
  228. package/build/esm/togetherMoleculesProfileDetail.js +40 -40
  229. package/build/esm/togetherOrganisms.js +51 -51
  230. package/build/esm/togetherRichTextEditor.js +18 -18
  231. package/build/esm/togetherShareBox.js +10 -10
  232. package/build/esm/{translationsProvider-3ef6cba4.js → translationsProvider-6246e072.js} +1 -1
  233. package/build/esm/{treePopoverMenu-d34b533f.js → treePopoverMenu-4e67b70b.js} +19 -19
  234. package/build/esm/types.js +2 -2
  235. package/build/esm/{useHealthToolCache-4628e2d9.js → useHealthToolCache-ae2a25b8.js} +1 -1
  236. package/build/esm/{usePhoneValidator-9a8713f4.js → usePhoneValidator-7887c178.js} +5 -5
  237. package/build/esm/{usePlacesAutocomplete-021fa87d.js → usePlacesAutocomplete-72edf861.js} +1 -1
  238. package/build/esm/useTogetherAuthRequiredAction.js +10 -10
  239. package/build/esm/{utils-3a1412da.js → utils-720650c0.js} +3 -3
  240. package/build/esm/{utils-da7ecec9.js → utils-b1503b1f.js} +2 -2
  241. package/build/esm/{utils-93d8e3fa.js → utils-ddb4b7d1.js} +2 -2
  242. package/build/esm/{utils-b5c1cfce.js → utils-f3885bbe.js} +5 -5
  243. package/build/esm/vaccination.js +22 -22
  244. package/build/footer.js +22 -22
  245. package/build/gAssets.js +2 -2
  246. package/build/{healthTools-eb1ccbaa.js → healthTools-fbd61d3e.js} +1 -1
  247. package/build/healthToolsCardWrapper.js +20 -20
  248. package/build/healthToolsForm.js +35 -35
  249. package/build/hooks.js +13 -13
  250. package/build/i18n.js +2 -2
  251. package/build/i18nV2.js +1 -1
  252. package/build/{index-61e566ec.js → index-10283fd3.js} +1 -1
  253. package/build/{index-a9a8c672.js → index-17e6ca5e.js} +13 -13
  254. package/build/{index-bccc21a1.js → index-1836f529.js} +16 -16
  255. package/build/{index-80a12b26.js → index-18df2f1f.js} +2 -2
  256. package/build/{index-3c04e011.js → index-2ee8d86a.js} +21 -21
  257. package/build/{index-0b3bce7a.js → index-30f3732b.js} +4 -4
  258. package/build/{index-9b546f20.js → index-341e22b8.js} +2 -2
  259. package/build/{index-62e5d1e3.js → index-34e22e6b.js} +2 -2
  260. package/build/{index-269e78e9.js → index-37fd20a9.js} +6 -6
  261. package/build/{index-791182a1.js → index-3b9accab.js} +3 -3
  262. package/build/{index-a2d51632.js → index-3cde9144.js} +2 -2
  263. package/build/{index-bb84cb93.js → index-3d3635ad.js} +3 -3
  264. package/build/{index-77e110f2.js → index-3dac5183.js} +3 -3
  265. package/build/{index-5f28a730.js → index-44448fe6.js} +6 -6
  266. package/build/{index-d261736c.js → index-4607cc62.js} +3 -3
  267. package/build/{index-0f673f3e.js → index-4736fd5d.js} +22 -22
  268. package/build/{index-64bd65c9.js → index-4840db09.js} +14 -14
  269. package/build/{index-85d181d3.js → index-4a22ccd9.js} +14 -14
  270. package/build/{index-6ea7e7e4.js → index-503d32ff.js} +3 -3
  271. package/build/{index-7ac974c0.js → index-51440a77.js} +14 -14
  272. package/build/{index-9e5ce0e6.js → index-5481814d.js} +15 -15
  273. package/build/{index-d0f41c3e.js → index-564847c4.js} +1 -1
  274. package/build/{index-b47ef442.js → index-5a85f9b0.js} +10 -10
  275. package/build/{index-9a380531.js → index-5c2f9672.js} +25 -25
  276. package/build/{index-84dd735a.js → index-5cf82446.js} +2 -2
  277. package/build/{index-ed1cc4e2.js → index-60ae0a1e.js} +19 -19
  278. package/build/{index-51ffa1f5.js → index-60fc65e2.js} +1 -1
  279. package/build/{index-56eb63a6.js → index-664ce4bb.js} +2 -2
  280. package/build/{index-1990eff6.js → index-66e8d5f4.js} +4 -4
  281. package/build/{index-12b629e2.js → index-6e506d3b.js} +16 -16
  282. package/build/{index-6ef4a34b.js → index-6f45c865.js} +2 -2
  283. package/build/{index-bc198dc9.js → index-76a46f5b.js} +32 -32
  284. package/build/{index-cd311f41.js → index-7a207672.js} +17 -17
  285. package/build/{index-93f25936.js → index-7fc178bb.js} +2 -2
  286. package/build/{index-0a414c91.js → index-7fde040d.js} +6 -6
  287. package/build/{index-cbbe9fd6.js → index-807b386b.js} +11 -11
  288. package/build/{index-53be3962.js → index-80ce68f4.js} +1 -1
  289. package/build/{index-6e698a28.js → index-82ce48bb.js} +2 -2
  290. package/build/{index-63bbd42f.js → index-837b20ce.js} +3 -3
  291. package/build/{index-557c5f8f.js → index-8a105f16.js} +5 -5
  292. package/build/{index-deef3fa2.js → index-90afb982.js} +26 -26
  293. package/build/{index-8e63f13c.js → index-969c634f.js} +18 -18
  294. package/build/{index-a5fe038e.js → index-96bbbeea.js} +18 -18
  295. package/build/{index-10510354.js → index-972250da.js} +2 -2
  296. package/build/{index-fb3512d4.js → index-9b47b2ee.js} +32 -32
  297. package/build/{index-fdf1f740.js → index-a1696b3b.js} +3 -3
  298. package/build/{index-d0a6e634.js → index-a4148029.js} +21 -21
  299. package/build/{index-d5152845.js → index-ad291b6e.js} +15 -15
  300. package/build/{index-d62a7634.js → index-b6098250.js} +2 -2
  301. package/build/{index-873b4bbd.js → index-b75dd31a.js} +6 -6
  302. package/build/{index-7ebed188.js → index-b9bbf733.js} +16 -16
  303. package/build/{index-cee44178.js → index-bd0551f2.js} +14 -14
  304. package/build/{index-bfe6ddd3.js → index-c0e45129.js} +16 -16
  305. package/build/{index-fa267608.js → index-c16cb840.js} +9 -9
  306. package/build/{index-bf71ce85.js → index-c21f216e.js} +1 -1
  307. package/build/{index-0912b470.js → index-c4b3da8b.js} +8 -8
  308. package/build/{index-5eca0f42.js → index-c5ee335b.js} +1 -1
  309. package/build/index-c64b59ff.js +22 -0
  310. package/build/{index-77d6cac2.js → index-c67dce04.js} +8 -8
  311. package/build/{index-cb712595.js → index-c7330eee.js} +7 -7
  312. package/build/{index-1fa4b47c.js → index-d2c1fe3a.js} +2 -2
  313. package/build/{index-9d556b03.js → index-d4ad8ed7.js} +13 -13
  314. package/build/{index-2de1864d.js → index-d67b8d65.js} +3 -3
  315. package/build/{index-cffc4281.js → index-db6d1907.js} +2 -2
  316. package/build/{index-d358b040.js → index-e1afc3e8.js} +2 -2
  317. package/build/{index-b5ecd965.js → index-e2265949.js} +30 -30
  318. package/build/{index-65c15d7a.js → index-ead0e366.js} +7 -7
  319. package/build/{index-5e40aac1.js → index-f2561628.js} +2 -2
  320. package/build/{index-ceb84907.js → index-f2f208cd.js} +2 -2
  321. package/build/{index-df13a45e.js → index-f4a172a1.js} +1 -1
  322. package/build/{index-cfd06798.js → index-f5bf6ba6.js} +5 -5
  323. package/build/{index-0c19cba5.js → index-f915d0e0.js} +2 -2
  324. package/build/index.js +124 -124
  325. package/build/{labelSorting-e6690d6d.js → labelSorting-4036b801.js} +4 -4
  326. package/build/lead/LeadGenTranslationContext.d.ts +13 -2
  327. package/build/lead/index.d.ts +2 -0
  328. package/build/lead.js +989 -976
  329. package/build/{logoIcon-db460765.js → logoIcon-966d0124.js} +2 -2
  330. package/build/mantine.js +40 -48
  331. package/build/misc.js +19 -19
  332. package/build/miscGetDynamicHealthTool.js +4 -4
  333. package/build/miscGetSocialList.js +8 -8
  334. package/build/miscScreenSizeContext.js +1 -1
  335. package/build/mobileBottomNavigation.js +5 -5
  336. package/build/mobileBottomNavigationIcon.js +5 -5
  337. package/build/molecules.js +78 -78
  338. package/build/moleculesArticleCard.js +6 -6
  339. package/build/moleculesArticleCardV2.js +17 -17
  340. package/build/navigation.js +47 -47
  341. package/build/navigationLogoutPopup.js +11 -11
  342. package/build/navigationProfileButton.js +27 -27
  343. package/build/onboardingV2.js +29 -29
  344. package/build/organisms.js +57 -57
  345. package/build/{post-4e7d1275.js → post-cf9e87af.js} +2 -2
  346. package/build/profileNavigation.js +20 -20
  347. package/build/progressBar.js +1 -1
  348. package/build/pwg.js +23 -23
  349. package/build/ssoV2.js +29 -38
  350. package/build/{store-c771d6e1.js → store-84501bd0.js} +3 -3
  351. package/build/subot/hooks/useVerifyPhoneNumber.d.ts +1 -0
  352. package/build/subot/index.d.ts +1 -0
  353. package/build/subot/subotInline/assets/arrow-down.d.ts +3 -0
  354. package/build/subot/subotInline/assets/arrow-left.d.ts +3 -0
  355. package/build/subot/subotInline/assets/arrow-right.d.ts +3 -0
  356. package/build/subot/subotInline/assets/arrow-up.d.ts +3 -0
  357. package/build/subot/subotInline/assets/check.d.ts +3 -0
  358. package/build/subot/subotInline/assets/checkbox.d.ts +3 -0
  359. package/build/subot/subotInline/assets/chevronRightActive.d.ts +3 -0
  360. package/build/subot/subotInline/assets/dislike-article.d.ts +3 -0
  361. package/build/subot/subotInline/assets/index.d.ts +10 -0
  362. package/build/subot/subotInline/assets/like-article.d.ts +3 -0
  363. package/build/subot/subotInline/assets/rotate-left.d.ts +3 -0
  364. package/build/subot/subotInline/index.d.ts +4 -0
  365. package/build/subot/subotInline/index.styled.d.ts +67 -0
  366. package/build/subot/subotInline/subotInline.config.d.ts +38 -0
  367. package/build/subot/subotInline/subotInlineAction/index.d.ts +25 -0
  368. package/build/subot/subotInline/subotInlineAction/subotInlineAction.d.ts +4 -0
  369. package/build/subot/subotInline/subotInlineAction/subotInlineAction.styled.d.ts +54 -0
  370. package/build/subot/subotInline/subotInlineFooter.d.ts +17 -0
  371. package/build/subot/subotInline/subotInlineHeader.d.ts +3 -0
  372. package/build/subot/subotInline/subotInlineIntent/index.d.ts +100 -0
  373. package/build/subot/subotInline/subotInlineIntent/subotInlineIntent.d.ts +4 -0
  374. package/build/subot/subotInline/subotInlineIntent/subotInlineIntent.styled.d.ts +159 -0
  375. package/build/subot/subotInline/subotInlineIntent/subotInlineIntentFinal.d.ts +4 -0
  376. package/build/subot/subotInline/subotInlineNode/SubotInlineNodeResultPoll.d.ts +4 -0
  377. package/build/subot/subotInline/subotInlineNode/index.d.ts +15 -0
  378. package/build/subot/subotInline/subotInlineNode/subotInlineNode.d.ts +5 -0
  379. package/build/subot/subotInline/subotInlineNode/subotInlineNode.styled.d.ts +74 -0
  380. package/build/subot/subotInline/subotInlineNode/subotInlineNodeFinal.d.ts +4 -0
  381. package/build/subot/subotInline/subotInlineNode/subotInlineNodeFinalThankYou.d.ts +4 -0
  382. package/build/subot/subotInline/subotInlineNode/subotInlineNodeForm.d.ts +4 -0
  383. package/build/subot/subotInline/subotInlineNode/subotInlineNodeImage.d.ts +4 -0
  384. package/build/subot/subotInline/subotInlineNode/subotInlineNodeMultiple.d.ts +4 -0
  385. package/build/subot/subotInline/subotInlineNode/subotInlineNodeOTP.d.ts +4 -0
  386. package/build/subot/subotInline/subotInlineNode/subotInlineNodePoll.d.ts +4 -0
  387. package/build/subot/subotInline/subotInlineNode/subotInlineNodeRating.d.ts +4 -0
  388. package/build/subot/subotInline/subotInlineNode/subotInlineNodeReaction.d.ts +4 -0
  389. package/build/subot/subotInline/subotInlineNode/subotInlineNodeReview.d.ts +4 -0
  390. package/build/subot/subotInline/subotInlineNode/subotInlineNodeSSO.d.ts +4 -0
  391. package/build/subot/subotInline/subotInlineNode/subotInlineNodeStart.d.ts +4 -0
  392. package/build/subot/subotInline/subotInlineNode/subotInlineNodeText.d.ts +4 -0
  393. package/build/subot/subotInlineRevamp/context.d.ts +1 -1
  394. package/build/subot/subotInlineRevamp/types.d.ts +2 -0
  395. package/build/subot.js +3269 -113
  396. package/build/surveyOrPremiumBanner.js +34 -34
  397. package/build/surveyQuestionCard.js +11 -11
  398. package/build/{surveyThankyouCard-4ac6cf84.js → surveyThankyouCard-b498f62e.js} +5 -5
  399. package/build/together/togetherComponentGlobalContext.d.ts +2 -0
  400. package/build/together.js +57 -57
  401. package/build/togetherApiUtils.js +4 -4
  402. package/build/togetherAtoms.js +31 -31
  403. package/build/togetherComponentGlobalContext.js +4 -4
  404. package/build/togetherMolecules.js +52 -52
  405. package/build/togetherMoleculesCardAuthor.js +29 -29
  406. package/build/togetherMoleculesPostImagePreview.js +11 -11
  407. package/build/togetherMoleculesProfileDetail.js +40 -40
  408. package/build/togetherOrganisms.js +51 -51
  409. package/build/togetherRichTextEditor.js +18 -18
  410. package/build/togetherShareBox.js +10 -10
  411. package/build/{translationsProvider-78861891.js → translationsProvider-786642a6.js} +1 -1
  412. package/build/{treePopoverMenu-021827a5.js → treePopoverMenu-dae09fa6.js} +19 -19
  413. package/build/types.js +2 -2
  414. package/build/{useHealthToolCache-76887e0f.js → useHealthToolCache-41648f12.js} +1 -1
  415. package/build/{usePhoneValidator-209692a1.js → usePhoneValidator-f7e0731a.js} +5 -5
  416. package/build/{usePlacesAutocomplete-f9c22817.js → usePlacesAutocomplete-704038e7.js} +1 -1
  417. package/build/useTogetherAuthRequiredAction.js +10 -10
  418. package/build/{utils-7e890074.js → utils-05aba639.js} +2 -2
  419. package/build/{utils-ef6e1a4f.js → utils-3a9dc91c.js} +2 -2
  420. package/build/{utils-08e02596.js → utils-a6c10d79.js} +3 -3
  421. package/build/{utils-dccb42b6.js → utils-e2a87f8c.js} +5 -5
  422. package/build/vaccination.js +22 -22
  423. package/package.json +3 -1
  424. /package/build/{BMI_BOYS.percentile.monthly-7a42f7c6.js → BMI_BOYS.percentile.monthly-87a10b8f.js} +0 -0
  425. /package/build/{BMI_BOYS.percentile.weekly-0c2078ef.js → BMI_BOYS.percentile.weekly-11f30493.js} +0 -0
  426. /package/build/{BMI_BOYS.percentile.yearly-7b9058c4.js → BMI_BOYS.percentile.yearly-2d5103d1.js} +0 -0
  427. /package/build/{BMI_BOYS.zscore.monthly-c115eaf8.js → BMI_BOYS.zscore.monthly-e9c8f996.js} +0 -0
  428. /package/build/{BMI_BOYS.zscore.weekly-bd2604a5.js → BMI_BOYS.zscore.weekly-8787cc8e.js} +0 -0
  429. /package/build/{BMI_BOYS.zscore.yearly-3442915f.js → BMI_BOYS.zscore.yearly-dbc467a4.js} +0 -0
  430. /package/build/{BMI_GIRLS.percentile.monthly-b8ecd44d.js → BMI_GIRLS.percentile.monthly-d3a0a20e.js} +0 -0
  431. /package/build/{BMI_GIRLS.percentile.weekly-ff61bc1d.js → BMI_GIRLS.percentile.weekly-fd09aef5.js} +0 -0
  432. /package/build/{BMI_GIRLS.percentile.yearly-48caca4c.js → BMI_GIRLS.percentile.yearly-3791fd18.js} +0 -0
  433. /package/build/{BMI_GIRLS.zscore.monthly-158aacd3.js → BMI_GIRLS.zscore.monthly-f2c4bf38.js} +0 -0
  434. /package/build/{BMI_GIRLS.zscore.weekly-b14e1993.js → BMI_GIRLS.zscore.weekly-edacc02c.js} +0 -0
  435. /package/build/{BMI_GIRLS.zscore.yearly-78fe37f7.js → BMI_GIRLS.zscore.yearly-b2b25fc3.js} +0 -0
  436. /package/build/{ChevronDown-48bf2241.js → ChevronDown-a4a03880.js} +0 -0
  437. /package/build/{Close-18464187.js → Close-3f7f9d2e.js} +0 -0
  438. /package/build/{Google-8938a6c8.js → Google-105436c4.js} +0 -0
  439. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-38d7fe79.js → HEAD CIRCUM_BOYS.percentile.monthly-755d271d.js} +0 -0
  440. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-a4f0b074.js → HEAD CIRCUM_BOYS.percentile.weekly-431e7c05.js} +0 -0
  441. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-5c77312c.js → HEAD CIRCUM_BOYS.percentile.yearly-9d0e2bb8.js} +0 -0
  442. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-98738b85.js → HEAD CIRCUM_BOYS.zscore.monthly-bcc83231.js} +0 -0
  443. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-6e85e67b.js → HEAD CIRCUM_BOYS.zscore.weekly-6c933aff.js} +0 -0
  444. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-a85cd385.js → HEAD CIRCUM_BOYS.zscore.yearly-52270048.js} +0 -0
  445. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-860f1545.js → HEAD CIRCUM_GIRLS.percentile.monthly-96839d9b.js} +0 -0
  446. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-f0e528d8.js → HEAD CIRCUM_GIRLS.percentile.weekly-7bed50af.js} +0 -0
  447. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-7e3bb555.js → HEAD CIRCUM_GIRLS.percentile.yearly-53d8aed3.js} +0 -0
  448. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-a8476ac9.js → HEAD CIRCUM_GIRLS.zscore.monthly-c61960da.js} +0 -0
  449. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-ea52934c.js → HEAD CIRCUM_GIRLS.zscore.weekly-c815e66d.js} +0 -0
  450. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-ddf19ca1.js → HEAD CIRCUM_GIRLS.zscore.yearly-3cc955e8.js} +0 -0
  451. /package/build/{HEIGHT_BOYS.percentile.monthly-ccad4084.js → HEIGHT_BOYS.percentile.monthly-3fb70ea4.js} +0 -0
  452. /package/build/{HEIGHT_BOYS.percentile.weekly-3daad9d1.js → HEIGHT_BOYS.percentile.weekly-340eae3c.js} +0 -0
  453. /package/build/{HEIGHT_BOYS.percentile.yearly-6b351b52.js → HEIGHT_BOYS.percentile.yearly-40eca76a.js} +0 -0
  454. /package/build/{HEIGHT_BOYS.zscore.monthly-9bc45bf2.js → HEIGHT_BOYS.zscore.monthly-0fb854e8.js} +0 -0
  455. /package/build/{HEIGHT_BOYS.zscore.weekly-36808d7c.js → HEIGHT_BOYS.zscore.weekly-0764415d.js} +0 -0
  456. /package/build/{HEIGHT_BOYS.zscore.yearly-d2e998cd.js → HEIGHT_BOYS.zscore.yearly-0e54289d.js} +0 -0
  457. /package/build/{HEIGHT_GIRLS.percentile.monthly-80d58108.js → HEIGHT_GIRLS.percentile.monthly-c74cad35.js} +0 -0
  458. /package/build/{HEIGHT_GIRLS.percentile.weekly-d428d580.js → HEIGHT_GIRLS.percentile.weekly-57f49250.js} +0 -0
  459. /package/build/{HEIGHT_GIRLS.percentile.yearly-d50f0227.js → HEIGHT_GIRLS.percentile.yearly-2355ce75.js} +0 -0
  460. /package/build/{HEIGHT_GIRLS.zscore.monthly-cf5f3cff.js → HEIGHT_GIRLS.zscore.monthly-30099387.js} +0 -0
  461. /package/build/{HEIGHT_GIRLS.zscore.weekly-52642f5f.js → HEIGHT_GIRLS.zscore.weekly-c76f5aa6.js} +0 -0
  462. /package/build/{HEIGHT_GIRLS.zscore.yearly-1cbf5e4b.js → HEIGHT_GIRLS.zscore.yearly-7f9abe14.js} +0 -0
  463. /package/build/{Locale-788d4cb6.js → Locale-f829e078.js} +0 -0
  464. /package/build/{Visible-ab0bedac.js → Visible-bd62389e.js} +0 -0
  465. /package/build/{WEIGHT_BOYS.percentile.monthly-f75e5880.js → WEIGHT_BOYS.percentile.monthly-158b01fd.js} +0 -0
  466. /package/build/{WEIGHT_BOYS.percentile.weekly-f4584c57.js → WEIGHT_BOYS.percentile.weekly-eab9d3be.js} +0 -0
  467. /package/build/{WEIGHT_BOYS.percentile.yearly-cd7c81a1.js → WEIGHT_BOYS.percentile.yearly-839c5bda.js} +0 -0
  468. /package/build/{WEIGHT_BOYS.zscore.monthly-ae9b238a.js → WEIGHT_BOYS.zscore.monthly-ed9f8a2a.js} +0 -0
  469. /package/build/{WEIGHT_BOYS.zscore.weekly-e5314ffe.js → WEIGHT_BOYS.zscore.weekly-40f2cb3c.js} +0 -0
  470. /package/build/{WEIGHT_BOYS.zscore.yearly-8da75668.js → WEIGHT_BOYS.zscore.yearly-8a21ffc6.js} +0 -0
  471. /package/build/{WEIGHT_GIRLS.percentile.monthly-0739c45f.js → WEIGHT_GIRLS.percentile.monthly-f1983673.js} +0 -0
  472. /package/build/{WEIGHT_GIRLS.percentile.weekly-a38f38ab.js → WEIGHT_GIRLS.percentile.weekly-51a0599d.js} +0 -0
  473. /package/build/{WEIGHT_GIRLS.percentile.yearly-4063d1f0.js → WEIGHT_GIRLS.percentile.yearly-72e4de4c.js} +0 -0
  474. /package/build/{WEIGHT_GIRLS.zscore.monthly-d11aa751.js → WEIGHT_GIRLS.zscore.monthly-ba3ae765.js} +0 -0
  475. /package/build/{WEIGHT_GIRLS.zscore.weekly-97f81100.js → WEIGHT_GIRLS.zscore.weekly-ab633368.js} +0 -0
  476. /package/build/{WEIGHT_GIRLS.zscore.yearly-8703b793.js → WEIGHT_GIRLS.zscore.yearly-94d2a7e7.js} +0 -0
  477. /package/build/{ageGenerate-49ac28aa.js → ageGenerate-ffd6c339.js} +0 -0
  478. /package/build/{animation-e2c6aae6.js → animation-36b04537.js} +0 -0
  479. /package/build/{constants-7b4d3f11.js → constants-67ccd8d6.js} +0 -0
  480. /package/build/{constants-eeab42f8.js → constants-69eb68cc.js} +0 -0
  481. /package/build/{constants-f3f906e9.js → constants-954ecd62.js} +0 -0
  482. /package/build/{context-c386f70b.js → context-eec0208f.js} +0 -0
  483. /package/build/{dataTransform-b6ef1192.js → dataTransform-1502b2da.js} +0 -0
  484. /package/build/esm/{BMI_BOYS.percentile.monthly-d69c97a5.js → BMI_BOYS.percentile.monthly-3e94d853.js} +0 -0
  485. /package/build/esm/{BMI_BOYS.percentile.weekly-d880bb94.js → BMI_BOYS.percentile.weekly-eb57335f.js} +0 -0
  486. /package/build/esm/{BMI_BOYS.percentile.yearly-6985598b.js → BMI_BOYS.percentile.yearly-d48b4240.js} +0 -0
  487. /package/build/esm/{BMI_BOYS.zscore.monthly-1c82c634.js → BMI_BOYS.zscore.monthly-9486f202.js} +0 -0
  488. /package/build/esm/{BMI_BOYS.zscore.weekly-2a87c990.js → BMI_BOYS.zscore.weekly-d0d826f3.js} +0 -0
  489. /package/build/esm/{BMI_BOYS.zscore.yearly-cd233bef.js → BMI_BOYS.zscore.yearly-5fff15dd.js} +0 -0
  490. /package/build/esm/{BMI_GIRLS.percentile.monthly-f2504662.js → BMI_GIRLS.percentile.monthly-a968b72a.js} +0 -0
  491. /package/build/esm/{BMI_GIRLS.percentile.weekly-34019918.js → BMI_GIRLS.percentile.weekly-2159c10a.js} +0 -0
  492. /package/build/esm/{BMI_GIRLS.percentile.yearly-11a6464f.js → BMI_GIRLS.percentile.yearly-e875556a.js} +0 -0
  493. /package/build/esm/{BMI_GIRLS.zscore.monthly-65a67db6.js → BMI_GIRLS.zscore.monthly-6b637963.js} +0 -0
  494. /package/build/esm/{BMI_GIRLS.zscore.weekly-3c93a54a.js → BMI_GIRLS.zscore.weekly-67a28b4d.js} +0 -0
  495. /package/build/esm/{BMI_GIRLS.zscore.yearly-5433b843.js → BMI_GIRLS.zscore.yearly-089ae256.js} +0 -0
  496. /package/build/esm/{ChevronDown-883c452f.js → ChevronDown-3e44dd73.js} +0 -0
  497. /package/build/esm/{Close-efe699a6.js → Close-58b767d3.js} +0 -0
  498. /package/build/esm/{Google-0832c5d4.js → Google-03f043ff.js} +0 -0
  499. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-3112c2be.js → HEAD CIRCUM_BOYS.percentile.monthly-72fe562a.js} +0 -0
  500. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-bd4a5801.js → HEAD CIRCUM_BOYS.percentile.weekly-039e1b19.js} +0 -0
  501. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-2585b962.js → HEAD CIRCUM_BOYS.percentile.yearly-0b8860b3.js} +0 -0
  502. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-8b701fb4.js → HEAD CIRCUM_BOYS.zscore.monthly-9b4f246b.js} +0 -0
  503. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-2cc16630.js → HEAD CIRCUM_BOYS.zscore.weekly-66055c2f.js} +0 -0
  504. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-4e864334.js → HEAD CIRCUM_BOYS.zscore.yearly-7a6bb05f.js} +0 -0
  505. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-c396888f.js → HEAD CIRCUM_GIRLS.percentile.monthly-99e0b7d6.js} +0 -0
  506. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-e7eeb9b0.js → HEAD CIRCUM_GIRLS.percentile.weekly-a6b01c0a.js} +0 -0
  507. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-ba72c3c8.js → HEAD CIRCUM_GIRLS.percentile.yearly-4732714d.js} +0 -0
  508. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-3bacb348.js → HEAD CIRCUM_GIRLS.zscore.monthly-2206c265.js} +0 -0
  509. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-01d712b5.js → HEAD CIRCUM_GIRLS.zscore.weekly-a32a6412.js} +0 -0
  510. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-7490aad8.js → HEAD CIRCUM_GIRLS.zscore.yearly-18b62729.js} +0 -0
  511. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-b28c1a73.js → HEIGHT_BOYS.percentile.monthly-5f64a336.js} +0 -0
  512. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-2b01a6f3.js → HEIGHT_BOYS.percentile.weekly-06defd32.js} +0 -0
  513. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-82040977.js → HEIGHT_BOYS.percentile.yearly-e018bbf0.js} +0 -0
  514. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-da729685.js → HEIGHT_BOYS.zscore.monthly-46ac9527.js} +0 -0
  515. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-acaab41d.js → HEIGHT_BOYS.zscore.weekly-930b63c4.js} +0 -0
  516. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-c0436733.js → HEIGHT_BOYS.zscore.yearly-95b54a07.js} +0 -0
  517. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-0f473194.js → HEIGHT_GIRLS.percentile.monthly-2d2a591b.js} +0 -0
  518. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-e89b1cd8.js → HEIGHT_GIRLS.percentile.weekly-7320aff9.js} +0 -0
  519. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-8c045db5.js → HEIGHT_GIRLS.percentile.yearly-3bbe143b.js} +0 -0
  520. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-6eea619e.js → HEIGHT_GIRLS.zscore.monthly-a0cb136e.js} +0 -0
  521. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-03715891.js → HEIGHT_GIRLS.zscore.weekly-d4edaa4a.js} +0 -0
  522. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-43cc003c.js → HEIGHT_GIRLS.zscore.yearly-d863937a.js} +0 -0
  523. /package/build/esm/{Locale-71e44b1f.js → Locale-c58c2b74.js} +0 -0
  524. /package/build/esm/{Visible-240571df.js → Visible-a560b459.js} +0 -0
  525. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-28514ce1.js → WEIGHT_BOYS.percentile.monthly-a19346b8.js} +0 -0
  526. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-6b4cb37d.js → WEIGHT_BOYS.percentile.weekly-e3451d52.js} +0 -0
  527. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-8bd68e16.js → WEIGHT_BOYS.percentile.yearly-73dea5e2.js} +0 -0
  528. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-94bb79a8.js → WEIGHT_BOYS.zscore.monthly-0ed0a289.js} +0 -0
  529. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-48230f02.js → WEIGHT_BOYS.zscore.weekly-54a80687.js} +0 -0
  530. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-5a36ec30.js → WEIGHT_BOYS.zscore.yearly-b6d3bfb4.js} +0 -0
  531. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-e6e4e1a0.js → WEIGHT_GIRLS.percentile.monthly-2de6b879.js} +0 -0
  532. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-d4217775.js → WEIGHT_GIRLS.percentile.weekly-940b9dad.js} +0 -0
  533. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-d116daa5.js → WEIGHT_GIRLS.percentile.yearly-6a621a03.js} +0 -0
  534. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-db2f5531.js → WEIGHT_GIRLS.zscore.monthly-1e853628.js} +0 -0
  535. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-4702bf9b.js → WEIGHT_GIRLS.zscore.weekly-d6b3a51d.js} +0 -0
  536. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-64666978.js → WEIGHT_GIRLS.zscore.yearly-caed7663.js} +0 -0
  537. /package/build/esm/{ageGenerate-5d2599eb.js → ageGenerate-b3f2d4c3.js} +0 -0
  538. /package/build/esm/{animation-3bf8617e.js → animation-2061711c.js} +0 -0
  539. /package/build/esm/{constants-0d9362f5.js → constants-50a0be26.js} +0 -0
  540. /package/build/esm/{constants-d86f8362.js → constants-5579b3a5.js} +0 -0
  541. /package/build/esm/{constants-27f6a360.js → constants-859885da.js} +0 -0
  542. /package/build/esm/{context-e6e1997a.js → context-721330a8.js} +0 -0
  543. /package/build/esm/{dataTransform-fc38fcab.js → dataTransform-0aff1db7.js} +0 -0
  544. /package/build/esm/{index-194242a3.js → index-0d71dec6.js} +0 -0
  545. /package/build/esm/{index-26e2a3bf.js → index-1247723e.js} +0 -0
  546. /package/build/esm/{index-89fc8db5.js → index-1c7bdca2.js} +0 -0
  547. /package/build/esm/{index-6a51131c.js → index-4bc073e2.js} +0 -0
  548. /package/build/esm/{index-d73f2d9c.js → index-5040b245.js} +0 -0
  549. /package/build/esm/{index-5ee684cf.js → index-7bbd0fad.js} +0 -0
  550. /package/build/esm/{index-3afa1d39.js → index-8608ade2.js} +0 -0
  551. /package/build/esm/{index-5220f93f.js → index-9f515877.js} +0 -0
  552. /package/build/esm/{index-150f8e29.js → index-e357d9e3.js} +0 -0
  553. /package/build/esm/{index.styles-810d632f.js → index.styles-b6fb30de.js} +0 -0
  554. /package/build/esm/{localizeNumberFormat-a1104278.js → localizeNumberFormat-6421578e.js} +0 -0
  555. /package/build/esm/{normalizeLink-93c61066.js → normalizeLink-c2ae5e81.js} +0 -0
  556. /package/build/esm/{number-a05bea6c.js → number-5a69ab2b.js} +0 -0
  557. /package/build/esm/{paths-b4b4b7d2.js → paths-1da37e5a.js} +0 -0
  558. /package/build/esm/{shared-598c2dfd.js → shared-1b7b36e0.js} +0 -0
  559. /package/build/esm/{translationsContext-a5aaee40.js → translationsContext-b17109f4.js} +0 -0
  560. /package/build/esm/{tslib.es6-04e47048.js → tslib.es6-0d380d14.js} +0 -0
  561. /package/build/esm/{types-39401c66.js → types-5b6f2005.js} +0 -0
  562. /package/build/esm/{types-f19b4f83.js → types-c1fc1da0.js} +0 -0
  563. /package/build/esm/{useIsInit-44ba789e.js → useIsInit-9acf0253.js} +0 -0
  564. /package/build/esm/{useOutsideClick-2507e9fb.js → useOutsideClick-8ff20b0b.js} +0 -0
  565. /package/build/esm/{useScrollbarSize-0dae8f67.js → useScrollbarSize-d66a9ae0.js} +0 -0
  566. /package/build/esm/{useUniqueId-43a93ec7.js → useUniqueId-f2ae6529.js} +0 -0
  567. /package/build/esm/{utils-f3ead128.js → utils-31f4dd0d.js} +0 -0
  568. /package/build/esm/{utils-063d5e54.js → utils-4d680bf5.js} +0 -0
  569. /package/build/{index-ccaeb9a0.js → index-009679d8.js} +0 -0
  570. /package/build/{index-6e83c8cd.js → index-0214fb52.js} +0 -0
  571. /package/build/{index-1029ee59.js → index-40005a01.js} +0 -0
  572. /package/build/{index-33dba9cd.js → index-54290d5c.js} +0 -0
  573. /package/build/{index-9fee1060.js → index-58998a93.js} +0 -0
  574. /package/build/{index-2bcb7fb6.js → index-75c1ab23.js} +0 -0
  575. /package/build/{index-be6985c5.js → index-b729423c.js} +0 -0
  576. /package/build/{index-259c2bc3.js → index-bc2a584b.js} +0 -0
  577. /package/build/{index-0b7364b2.js → index-d171db24.js} +0 -0
  578. /package/build/{index.styles-6ba02a76.js → index.styles-8b6121ea.js} +0 -0
  579. /package/build/{localizeNumberFormat-40733246.js → localizeNumberFormat-1374fde9.js} +0 -0
  580. /package/build/{normalizeLink-678e875a.js → normalizeLink-76076a74.js} +0 -0
  581. /package/build/{number-e84e29f2.js → number-2a180c11.js} +0 -0
  582. /package/build/{paths-4317aebf.js → paths-df558b0b.js} +0 -0
  583. /package/build/{shared-7eff181c.js → shared-2f4148b6.js} +0 -0
  584. /package/build/{translationsContext-d610fe38.js → translationsContext-f7fb2a75.js} +0 -0
  585. /package/build/{tslib.es6-4a797eff.js → tslib.es6-9fde802a.js} +0 -0
  586. /package/build/{types-af8700f0.js → types-3ba5eae0.js} +0 -0
  587. /package/build/{types-09ab809a.js → types-73ea37c1.js} +0 -0
  588. /package/build/{useIsInit-5f873666.js → useIsInit-9b4015d3.js} +0 -0
  589. /package/build/{useOutsideClick-d55910ca.js → useOutsideClick-1d4ae14f.js} +0 -0
  590. /package/build/{useScrollbarSize-30b48e8f.js → useScrollbarSize-8efaf76c.js} +0 -0
  591. /package/build/{useUniqueId-7fa06486.js → useUniqueId-1c78872a.js} +0 -0
  592. /package/build/{utils-a42d098a.js → utils-0afcf459.js} +0 -0
  593. /package/build/{utils-140b5e84.js → utils-b326229d.js} +0 -0
@@ -1,76 +1,81 @@
1
- import React__default, { createContext, useContext, useRef, useState, useEffect, useCallback, useMemo, forwardRef, useImperativeHandle, memo } from 'react';
2
- import { d as NodeType, E as ELEMENT_CONTROL_INPUT_TYPE, f as NodeActionType, c as NodePosition, e as NodeFinalTypes, g as NodeMultipleOptions, N as NodeIntentType, F as FULL_KEY_ADDRESS, C as COMMON_DATE_TRANSLATE_KEY } from './index-9a48dac8.js';
3
- import { a as __awaiter, _ as __rest } from './tslib.es6-04e47048.js';
4
- import { b as basePath, G as GA_TOKEN_COOKIE, A as API_DATE_FORMAT, I as ISO_FORMAT, j as SSO_URL } from './index-8a437344.js';
1
+ import React__default, { createContext, useContext, useRef, useState, useEffect, useCallback, useMemo, forwardRef, useImperativeHandle, memo, useLayoutEffect } from 'react';
2
+ import { d as NodeType, E as ELEMENT_CONTROL_INPUT_TYPE, f as NodeActionType, c as NodePosition, e as NodeFinalTypes, g as NodeMultipleOptions, N as NodeIntentType, F as FULL_KEY_ADDRESS, C as COMMON_DATE_TRANSLATE_KEY, h as SubotType } from './index-5940bcba.js';
3
+ import { a as __awaiter, _ as __rest } from './tslib.es6-0d380d14.js';
4
+ import { b as basePath, G as GA_TOKEN_COOKIE, A as API_DATE_FORMAT, I as ISO_FORMAT, j as SSO_URL } from './index-d4bd4b91.js';
5
5
  import Cookies from 'js-cookie';
6
6
  import fd from 'fastdom';
7
7
  import fastdomPromised from 'fastdom/extensions/fastdom-promised';
8
- import { G as GlobalData, c as callApi, u as locale, T as TogetherComponentGlobalContext } from './utils-3a1412da.js';
8
+ import { G as GlobalData, c as callApi, u as locale, T as TogetherComponentGlobalContext } from './utils-720650c0.js';
9
9
  import formatString from 'string-format';
10
- import { a as getUserIdFromCookie, b as getSubotCookieId, c as getUserInfoFromCookie, d as getWindowId, o as overrideParamsByQuery, e as checkUntilFinished, g as getHelloSitesUrl, f as checkMobile, h as clickAndOpenInNewTab, i as formatUrlWithEncrypedGa, T as TIME_RESET_RESEND_OTP, j as isFakeEmail, s as ssoIntents, k as getHhgIdFromCookie } from './index-1a606e96.js';
11
- export { T as TIME_RESET_RESEND_OTP, f as checkMobile, e as checkUntilFinished, h as clickAndOpenInNewTab, i as formatUrlWithEncrypedGa, g as getHelloSitesUrl, k as getHhgIdFromCookie, b as getSubotCookieId, a as getUserIdFromCookie, c as getUserInfoFromCookie, d as getWindowId, j as isFakeEmail, o as overrideParamsByQuery, s as ssoIntents } from './index-1a606e96.js';
10
+ import { a as getUserIdFromCookie, b as getSubotCookieId, c as getUserInfoFromCookie, d as getWindowId, o as overrideParamsByQuery, e as checkUntilFinished, g as getHelloSitesUrl, f as checkMobile, h as clickAndOpenInNewTab, i as formatUrlWithEncrypedGa, T as TIME_RESET_RESEND_OTP, j as isFakeEmail, s as ssoIntents, k as getHhgIdFromCookie } from './index-bb4fc349.js';
11
+ export { T as TIME_RESET_RESEND_OTP, f as checkMobile, e as checkUntilFinished, h as clickAndOpenInNewTab, i as formatUrlWithEncrypedGa, g as getHelloSitesUrl, k as getHhgIdFromCookie, b as getSubotCookieId, a as getUserIdFromCookie, c as getUserInfoFromCookie, d as getWindowId, j as isFakeEmail, o as overrideParamsByQuery, s as ssoIntents } from './index-bb4fc349.js';
12
12
  import dayjs from 'dayjs';
13
13
  import { MAP_DOMAIN_BY_LOCALE, domainLocales } from './constantsDomainLocales.js';
14
14
  import classNames from 'classnames';
15
- import { C as Container$w } from './index-26e2a3bf.js';
16
- import { L as Loading } from './index-290f0108.js';
15
+ import { C as Container$w } from './index-1247723e.js';
16
+ import { L as Loading } from './index-fbfe354e.js';
17
17
  import { motion } from 'framer-motion';
18
18
  import styled from '@emotion/styled';
19
- import { M as MediaQueries } from './utils-063d5e54.js';
20
- import { B as Button } from './index-1365ef94.js';
19
+ import { M as MediaQueries } from './utils-4d680bf5.js';
20
+ import { B as Button } from './index-656d43c6.js';
21
21
  import { Remarkable } from 'remarkable';
22
- import { ArrowRight } from '@hhgtech/icons/other';
22
+ import { ArrowRight as ArrowRight$1 } from '@hhgtech/icons/other';
23
23
  import { useInView } from 'react-intersection-observer';
24
24
  import { Box, Textarea } from '@mantine/core';
25
- import { C as CommonGAssets } from './index-3afa1d39.js';
25
+ import { C as CommonGAssets } from './index-8608ade2.js';
26
26
  import isSameOrBefore from 'dayjs/plugin/isSameOrBefore';
27
- import { d as LEAD_TOKEN_COOKIE } from './constants-0d9362f5.js';
27
+ import { d as LEAD_TOKEN_COOKIE } from './constants-50a0be26.js';
28
28
  import { v4 } from 'uuid';
29
- import { T as Text } from './index-6dd86cd9.js';
29
+ import { T as Text } from './index-1c1c0147.js';
30
30
  import { theme } from './miscTheme.js';
31
31
  import { isProduction } from './constantsIsProduction.js';
32
- import { S as Select } from './index-b69cdfa7.js';
32
+ import { S as Select } from './index-90c5380b.js';
33
33
  import '@mantine/dates';
34
- import './index-9074ab66.js';
35
- import './index-5ee684cf.js';
36
- import './index.styles-810d632f.js';
37
- import './translationsContext-a5aaee40.js';
34
+ import './index-f3606e41.js';
35
+ import './index-7bbd0fad.js';
36
+ import './index.styles-b6fb30de.js';
37
+ import './translationsContext-b17109f4.js';
38
38
  import '@mantine/hooks';
39
- import './index-1163c2a2.js';
39
+ import './index-94b04ff9.js';
40
40
  import isEmpty from 'lodash/isEmpty';
41
41
  import { Controller, useForm } from 'react-hook-form';
42
42
  import PhoneInputBase, { getCountryCallingCode, isPossiblePhoneNumber, parsePhoneNumber } from 'react-phone-number-input';
43
43
  import { LoadScript } from '@react-google-maps/api';
44
- import { u as usePlacesAutocomplete, G as GOOGLE_API_KEY, a as GOOGLE_API_LANGUAGE } from './usePlacesAutocomplete-021fa87d.js';
44
+ import { u as usePlacesAutocomplete, G as GOOGLE_API_KEY, a as GOOGLE_API_LANGUAGE } from './usePlacesAutocomplete-72edf861.js';
45
45
  import { setDefaultClass } from './miscDefaultClassWrapper.js';
46
- import { L as LOCALE } from './Locale-71e44b1f.js';
47
- import { I as InputDate } from './InputDate-079946dd.js';
48
- import { B as Button$1 } from './index-b6ab7c48.js';
49
- import { D as Dropdown } from './index-d73f2d9c.js';
50
- import { u as useSSOV2Store, I as IS_SSOV2_ENABLED } from './store-2faecd11.js';
51
- import { g as getURLwithSSOTracking } from './utils-b5c1cfce.js';
46
+ import { L as LOCALE } from './Locale-c58c2b74.js';
47
+ import { I as InputDate } from './InputDate-46b57231.js';
48
+ import { B as Button$1 } from './index-5a002729.js';
49
+ import { D as Dropdown } from './index-5040b245.js';
50
+ import { u as useSSOV2Store, I as IS_SSOV2_ENABLED } from './store-26bc5b00.js';
51
+ import { g as getURLwithSSOTracking } from './utils-f3885bbe.js';
52
+ import { T as TextArea } from './index-bc456312.js';
53
+ import StarRatings from 'react-star-ratings';
54
+ import { ArticleCard } from './moleculesArticleCard.js';
55
+ import { T as Text$1 } from './index-d9592e4c.js';
56
+ import { H as Heading } from './index-6019b7a2.js';
52
57
  import 'date-fns/locale';
53
58
  import './constantsSite.js';
54
59
  import './constantsRiskScreener.js';
55
- import './index-6a51131c.js';
60
+ import './index-4bc073e2.js';
56
61
  import './miscCookieHelper.js';
57
62
  import 'slugify';
58
63
  import './togetherApiPaths.js';
59
- import './index-35303540.js';
60
- import './WhatsApp-9de799dd.js';
61
- import './Spinner-318c3595.js';
62
- import './index-e66d5d69.js';
63
- import './shared-598c2dfd.js';
64
- import './index-de47f2b2.js';
64
+ import './index-7384fa1e.js';
65
+ import './WhatsApp-0bc03b19.js';
66
+ import './Spinner-bcd7096b.js';
67
+ import './index-bab47ecc.js';
68
+ import './shared-1b7b36e0.js';
69
+ import './index-2055bbe6.js';
65
70
  import '@mantine/carousel';
66
- import './useUniqueId-43a93ec7.js';
71
+ import './useUniqueId-f2ae6529.js';
67
72
  import '@emotion/react';
68
73
  import '@hhgtech/icons/core';
69
74
  import '@mantine/notifications';
70
75
  import 'zustand';
71
- import './index-4e2cb08c.js';
72
- import './normalizeLink-93c61066.js';
73
- import './healthTools-5be0b7ab.js';
76
+ import './index-a78adcf4.js';
77
+ import './normalizeLink-c2ae5e81.js';
78
+ import './healthTools-7c352a63.js';
74
79
 
75
80
  // extend fastdom
76
81
  const fastdom = fd.extend(fastdomPromised);
@@ -152,7 +157,7 @@ const getSubotApiPath = (path, params) => {
152
157
  return apiUrl + formatString(path, Object.assign({}, params));
153
158
  };
154
159
  /** inline message */
155
- const subotInlineMessage = (data) => __awaiter(void 0, void 0, void 0, function* () {
160
+ const subotInlineMessage$1 = (data) => __awaiter(void 0, void 0, void 0, function* () {
156
161
  try {
157
162
  return yield callApi(getSubotApiPath(PATHS$1.GET_INLINE_MESSAGE), 'POST', {
158
163
  data,
@@ -160,7 +165,7 @@ const subotInlineMessage = (data) => __awaiter(void 0, void 0, void 0, function*
160
165
  }
161
166
  catch (error) { }
162
167
  });
163
- const computeExtraSettingsForBot = (data) => {
168
+ const computeExtraSettingsForBot$1 = (data) => {
164
169
  var _a;
165
170
  if ((data === null || data === void 0 ? void 0 : data._status) === 1 && ((_a = data === null || data === void 0 ? void 0 : data._data) === null || _a === void 0 ? void 0 : _a.extra_settings)) {
166
171
  try {
@@ -183,11 +188,11 @@ const computeExtraSettingsForBot = (data) => {
183
188
  return data;
184
189
  };
185
190
  /** inline first node */
186
- const subotInlineFirstNode = (id) => __awaiter(void 0, void 0, void 0, function* () {
191
+ const subotInlineFirstNode$1 = (id) => __awaiter(void 0, void 0, void 0, function* () {
187
192
  try {
188
193
  const data = yield CachedSystem.withCached('SubotInlineFirstNode/' + id, () => __awaiter(void 0, void 0, void 0, function* () {
189
194
  const response = yield callApi(getSubotApiPath(PATHS$1.GET_INLINE_FIRST_NODE) + `/${id}`, 'GET');
190
- computeExtraSettingsForBot(response);
195
+ computeExtraSettingsForBot$1(response);
191
196
  return response;
192
197
  }));
193
198
  return data;
@@ -197,7 +202,7 @@ const subotInlineFirstNode = (id) => __awaiter(void 0, void 0, void 0, function*
197
202
  }
198
203
  });
199
204
  /** inline click */
200
- const subotInlineClick = (data) => __awaiter(void 0, void 0, void 0, function* () {
205
+ const subotInlineClick$1 = (data) => __awaiter(void 0, void 0, void 0, function* () {
201
206
  try {
202
207
  return yield callApi(getSubotApiPath(PATHS$1.GET_INLINE_CLICK), 'POST', {
203
208
  data,
@@ -206,7 +211,7 @@ const subotInlineClick = (data) => __awaiter(void 0, void 0, void 0, function* (
206
211
  catch (error) { }
207
212
  });
208
213
  /** inline impression */
209
- const subotInlineImpression = (data) => __awaiter(void 0, void 0, void 0, function* () {
214
+ const subotInlineImpression$1 = (data) => __awaiter(void 0, void 0, void 0, function* () {
210
215
  try {
211
216
  return yield callApi(getSubotApiPath(PATHS$1.GET_INLINE_IMPRESSION), 'POST', {
212
217
  data,
@@ -805,7 +810,7 @@ const detectToSkipNodeStart = (botItem, currentActiveId, currentListNodes) => {
805
810
  return [currentActiveId, currentListNodes];
806
811
  };
807
812
 
808
- const SubotInlineContext = createContext({
813
+ const SubotInlineContext$1 = createContext({
809
814
  activeId: '',
810
815
  params: {},
811
816
  listNodes: [],
@@ -821,7 +826,7 @@ const SubotInlineContext = createContext({
821
826
  setLoading: () => null,
822
827
  userInfo: null,
823
828
  });
824
- const SubotInlineProvider = ({ children, articleLink, subotId, isFullContainer, bgColor: _bgColor, primaryColor: _primaryColor, textColor, textButtonColor, bgContentColor, bgImgFullContainer, isDisabledAnimationOnMobile, onCloseMobile, userInfo, typeFormProps, isMobile, locale, }) => {
829
+ const SubotInlineProvider = ({ children, articleLink, subotId, isFullContainer, bgColor: _bgColor, primaryColor: _primaryColor, textColor, textButtonColor, bgContentColor, bgImgFullContainer, isDisabledAnimationOnMobile, onCloseMobile, userInfo, typeFormProps, customUrl, isMobile, locale, }) => {
825
830
  const { formatMessage: f, action: { pushNotifications }, } = useContext(TogetherComponentGlobalContext);
826
831
  const ref = useRef(null);
827
832
  // const { formatMessage: f } = useIntl()
@@ -868,8 +873,7 @@ const SubotInlineProvider = ({ children, articleLink, subotId, isFullContainer,
868
873
  /** Get Params */
869
874
  const getParams = useCallback(() => {
870
875
  const gaData = window.gaData;
871
- const url = window.location.origin +
872
- basePath +
876
+ const url = (customUrl || window.location.origin + basePath) +
873
877
  ((GlobalData === null || GlobalData === void 0 ? void 0 : GlobalData.locale) === 'tl-PH'
874
878
  ? articleLink.replace('fil/', '')
875
879
  : articleLink);
@@ -918,7 +922,7 @@ const SubotInlineProvider = ({ children, articleLink, subotId, isFullContainer,
918
922
  let newActiveId = '';
919
923
  let nodes = [];
920
924
  setLoading(true);
921
- const resFirst = yield subotInlineFirstNode(params.bot_id);
925
+ const resFirst = yield subotInlineFirstNode$1(params.bot_id);
922
926
  if ((resFirst === null || resFirst === void 0 ? void 0 : resFirst._status) === 1) {
923
927
  newActiveId = resFirst === null || resFirst === void 0 ? void 0 : resFirst._data.id.toString();
924
928
  nodes.push(resFirst === null || resFirst === void 0 ? void 0 : resFirst._data, resFirst === null || resFirst === void 0 ? void 0 : resFirst._data.first_node);
@@ -936,7 +940,7 @@ const SubotInlineProvider = ({ children, articleLink, subotId, isFullContainer,
936
940
  if (previousState &&
937
941
  previousState.params.action_id &&
938
942
  previousState.params.action_value) {
939
- const resResultInline = yield subotInlineMessage(previousState.params);
943
+ const resResultInline = yield subotInlineMessage$1(previousState.params);
940
944
  if ((resResultInline === null || resResultInline === void 0 ? void 0 : resResultInline._status) === 1 && (resResultInline === null || resResultInline === void 0 ? void 0 : resResultInline._data.node)) {
941
945
  newActiveId = resResultInline === null || resResultInline === void 0 ? void 0 : resResultInline._data.node.id;
942
946
  nodes = previousState.listNodes;
@@ -1005,7 +1009,7 @@ const SubotInlineProvider = ({ children, articleLink, subotId, isFullContainer,
1005
1009
  const onNext = useCallback((messageParams) => __awaiter(void 0, void 0, void 0, function* () {
1006
1010
  if (messageParams === null || messageParams === void 0 ? void 0 : messageParams.node_id) {
1007
1011
  const newMessage = Object.assign(Object.assign({}, messageParams), getCurrentTotalDynamicScore(listNodes, activeId, messageParams.action_id));
1008
- const res = yield subotInlineMessage(newMessage);
1012
+ const res = yield subotInlineMessage$1(newMessage);
1009
1013
  setLoading(false);
1010
1014
  if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
1011
1015
  const _b = res === null || res === void 0 ? void 0 : res._data, { node } = _b, restData = __rest(_b, ["node"]);
@@ -1153,7 +1157,7 @@ const SubotInlineProvider = ({ children, articleLink, subotId, isFullContainer,
1153
1157
  if (!listNodes.length) {
1154
1158
  return null;
1155
1159
  }
1156
- return (React__default.createElement(SubotInlineContext.Provider, { value: value },
1160
+ return (React__default.createElement(SubotInlineContext$1.Provider, { value: value },
1157
1161
  React__default.createElement("div", { ref: ref }, children)));
1158
1162
  };
1159
1163
 
@@ -1657,7 +1661,7 @@ const Container$u = () => {
1657
1661
  var _a, _b, _c;
1658
1662
  const { formatMessage: f, action: { pushNotifications }, } = useContext(TogetherComponentGlobalContext);
1659
1663
  const currentUrl = useCurrentUrl();
1660
- const { listNodes, activeId, isShowFooter, onNext, onPrev, params, onStartOver, loading, } = useContext(SubotInlineContext);
1664
+ const { listNodes, activeId, isShowFooter, onNext, onPrev, params, onStartOver, loading, } = useContext(SubotInlineContext$1);
1661
1665
  const { value } = useContext(NodeContext);
1662
1666
  const validation = useValidationMultiOption();
1663
1667
  const botItem = listNodes[0];
@@ -2049,7 +2053,7 @@ const Container$s = ({ node, onClickStart }) => {
2049
2053
  const refImpression = useRef(false);
2050
2054
  const { ref, inView } = useInView();
2051
2055
  const currentUrl = useCurrentUrl();
2052
- const { params, getParams, onNext, setIsShowFooter, listNodes } = useContext(SubotInlineContext);
2056
+ const { params, getParams, onNext, setIsShowFooter, listNodes } = useContext(SubotInlineContext$1);
2053
2057
  const botItem = listNodes[0];
2054
2058
  const botType = (_a = botItem === null || botItem === void 0 ? void 0 : botItem.extra_settings) === null || _a === void 0 ? void 0 : _a.subot_type;
2055
2059
  useMemo(() => {
@@ -2059,14 +2063,14 @@ const Container$s = ({ node, onClickStart }) => {
2059
2063
  if (!inView || refImpression.current) {
2060
2064
  return;
2061
2065
  }
2062
- subotInlineImpression(getParams());
2066
+ subotInlineImpression$1(getParams());
2063
2067
  refImpression.current = true;
2064
2068
  }, [inView]);
2065
2069
  const handleClickStart = () => {
2066
2070
  // 1. Tracking Event Click
2067
2071
  const params = getParams();
2068
2072
  params.device_id = checkMobile(window.navigator.userAgent) ? 2 : 1;
2069
- subotInlineClick(params);
2073
+ subotInlineClick$1(params);
2070
2074
  // 2. Call API to fetch next node
2071
2075
  onNext();
2072
2076
  onClickStart === null || onClickStart === void 0 ? void 0 : onClickStart();
@@ -2080,7 +2084,7 @@ const Container$s = ({ node, onClickStart }) => {
2080
2084
  email: '',
2081
2085
  voucherName: '',
2082
2086
  } })),
2083
- React__default.createElement(Button, { onClick: handleClickStart, "data-event-category": "Service Connection", "data-event-action": "Risk Screening Start", "data-event-label": currentUrl, "data-bot-id": params.bot_id, rightIcon: React__default.createElement(ArrowRight, { color: "var(--subot-inline-text-button-color, #fff)" }), styles: {
2087
+ React__default.createElement(Button, { onClick: handleClickStart, "data-event-category": "Service Connection", "data-event-action": "Risk Screening Start", "data-event-label": currentUrl, "data-bot-id": params.bot_id, rightIcon: React__default.createElement(ArrowRight$1, { color: "var(--subot-inline-text-button-color, #fff)" }), styles: {
2084
2088
  root: {
2085
2089
  backgroundColor: 'var(--subot-inline-primary-color) !important',
2086
2090
  '&:hover': {
@@ -2345,7 +2349,7 @@ const handleFrisoRedirecition = (listNode) => {
2345
2349
 
2346
2350
  const Container$r = ({ intent }) => {
2347
2351
  var _a;
2348
- const { listNodes } = useContext(SubotInlineContext);
2352
+ const { listNodes } = useContext(SubotInlineContext$1);
2349
2353
  const handleOnClick = () => {
2350
2354
  var _a;
2351
2355
  if ((_a = intent.url) === null || _a === void 0 ? void 0 : _a.includes('{{.frisoRedirectUrl}}')) {
@@ -2401,7 +2405,7 @@ const Container$q = ({ intent }) => {
2401
2405
  Container$q.displayName = 'SubotInlineIntentBotImage';
2402
2406
 
2403
2407
  const Container$p = ({ intent, indexNumber }) => {
2404
- const { listNodes } = useContext(SubotInlineContext);
2408
+ const { listNodes } = useContext(SubotInlineContext$1);
2405
2409
  const isShowLabel = ![NodeIntentType.SSO_INTENT].includes(intent === null || intent === void 0 ? void 0 : intent.type);
2406
2410
  const isText = [
2407
2411
  NodeIntentType.BOT_TEXT,
@@ -2435,7 +2439,7 @@ Container$p.displayName = 'SubotInlineIntentBotTitle';
2435
2439
 
2436
2440
  const Container$o = ({ intent }) => {
2437
2441
  const currentUrl = useCurrentUrl();
2438
- const { listNodes, activeId, params } = useContext(SubotInlineContext);
2442
+ const { listNodes, activeId, params } = useContext(SubotInlineContext$1);
2439
2443
  const foundNode = listNodes.find((n) => n.id == activeId);
2440
2444
  if (!intent.label || !foundNode) {
2441
2445
  return null;
@@ -2776,7 +2780,7 @@ const StyledWrap$e = styled.div `
2776
2780
  `;
2777
2781
 
2778
2782
  const Container$k = ({ intent }) => {
2779
- const { listNodes } = useContext(SubotInlineContext);
2783
+ const { listNodes } = useContext(SubotInlineContext$1);
2780
2784
  if (!(intent === null || intent === void 0 ? void 0 : intent.label)) {
2781
2785
  return null;
2782
2786
  }
@@ -2837,15 +2841,15 @@ const Container$j = ({ intent }) => {
2837
2841
  };
2838
2842
  Container$j.displayName = 'SubotInlineIntentSSO';
2839
2843
 
2840
- var _a$1;
2841
- const SubotInlineIntentCol = styled.div `
2844
+ var _a$2;
2845
+ const SubotInlineIntentCol$1 = styled.div `
2842
2846
  width: ${({ width }) => width || '100%'};
2843
2847
  padding: 4px;
2844
2848
  ${MediaQueries.mbDown} {
2845
2849
  width: 100%;
2846
2850
  }
2847
2851
  `;
2848
- const SubotInlineIntentUrlContainer = styled.div `
2852
+ const SubotInlineIntentUrlContainer$1 = styled.div `
2849
2853
  display: flex;
2850
2854
  .feature {
2851
2855
  width: 30%;
@@ -2873,7 +2877,7 @@ const SubotInlineIntentUrlContainer = styled.div `
2873
2877
  margin-left: 10px;
2874
2878
  line-height: 1.5;
2875
2879
  a {
2876
- color: ${((_a$1 = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _a$1 === void 0 ? void 0 : _a$1.gray800) || '#262626'};
2880
+ color: ${((_a$2 = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _a$2 === void 0 ? void 0 : _a$2.gray800) || '#262626'};
2877
2881
  text-decoration: none;
2878
2882
  }
2879
2883
  }
@@ -2883,8 +2887,8 @@ const Container$i = ({ intent, }) => {
2883
2887
  const article = useMemo(() => intent.label.includes('{')
2884
2888
  ? JSON.parse(intent.label)
2885
2889
  : {}, [intent.label]);
2886
- return (React__default.createElement(React__default.Fragment, null, !!Object.keys(article).length && (React__default.createElement(SubotInlineIntentCol, null,
2887
- React__default.createElement(SubotInlineIntentUrlContainer, null,
2890
+ return (React__default.createElement(React__default.Fragment, null, !!Object.keys(article).length && (React__default.createElement(SubotInlineIntentCol$1, null,
2891
+ React__default.createElement(SubotInlineIntentUrlContainer$1, null,
2888
2892
  React__default.createElement("div", { className: "feature" },
2889
2893
  React__default.createElement("a", { href: article === null || article === void 0 ? void 0 : article.url, className: "feature-wrapper" },
2890
2894
  React__default.createElement("img", { loading: "lazy", src: article === null || article === void 0 ? void 0 : article.thumbnail, alt: article === null || article === void 0 ? void 0 : article.title, className: "feature-img" }))),
@@ -2921,7 +2925,7 @@ const SubotInlineIntentBaseTarget = {
2921
2925
  /** intents fake for sso block */
2922
2926
  [NodeIntentType.SSO_INTENT]: Container$j,
2923
2927
  };
2924
- const SubotInlineIntentBase = new Proxy(SubotInlineIntentBaseTarget, {
2928
+ const SubotInlineIntentBase$1 = new Proxy(SubotInlineIntentBaseTarget, {
2925
2929
  get(_, prop) {
2926
2930
  const UnknowComponent = () => {
2927
2931
  if (isProduction)
@@ -2948,7 +2952,7 @@ const Container$h = ({ intents: intentsProp, indexNumber, }) => {
2948
2952
  const intentType = (intent === null || intent === void 0 ? void 0 : intent.type) || '';
2949
2953
  if (excludeIntents.includes(intentType))
2950
2954
  return null;
2951
- const NodeIntent = SubotInlineIntentBase[intentType];
2955
+ const NodeIntent = SubotInlineIntentBase$1[intentType];
2952
2956
  return NodeIntent && React__default.createElement(NodeIntent, { key: intent.id, intent: intent });
2953
2957
  })))));
2954
2958
  };
@@ -2956,7 +2960,7 @@ Container$h.displayName = 'SubotInlineIntent';
2956
2960
 
2957
2961
  const Container$g = ({ node }) => {
2958
2962
  var _a, _b;
2959
- const { setIsShowFooter, listNodes } = useContext(SubotInlineContext);
2963
+ const { setIsShowFooter, listNodes } = useContext(SubotInlineContext$1);
2960
2964
  const botItem = listNodes[0];
2961
2965
  useMemo(() => {
2962
2966
  setIsShowFooter(true);
@@ -3147,7 +3151,7 @@ const SubInlineIntent = ({ subIntents }) => {
3147
3151
  React__default.createElement(ChevronDown, { className: "si-chevron-down" })),
3148
3152
  React__default.createElement(motion.div, { className: "si-sub-intent-expand", animate: isShow ? { height: 'auto' } : { height: 0 }, transition: { duration: 0.3 }, "data-show": isShow }, restSubIntents.map((intent) => {
3149
3153
  const intentType = (intent === null || intent === void 0 ? void 0 : intent.type) || '';
3150
- const NodeIntent = SubotInlineIntentBase[intentType];
3154
+ const NodeIntent = SubotInlineIntentBase$1[intentType];
3151
3155
  return NodeIntent && React__default.createElement(NodeIntent, { key: intent.id, intent: intent });
3152
3156
  }))));
3153
3157
  };
@@ -3158,7 +3162,7 @@ const Container$f = ({ node }) => {
3158
3162
  // const isMobile = useGetIsMobile(true)
3159
3163
  const refMainIntents = useRef(null);
3160
3164
  const { formatMessage: f } = useContext(TogetherComponentGlobalContext);
3161
- const { setIsShowFooter, listNodes } = useContext(SubotInlineContext);
3165
+ const { setIsShowFooter, listNodes } = useContext(SubotInlineContext$1);
3162
3166
  const [isShowMore, setIsShowMore] = useState(false);
3163
3167
  useEffect(() => {
3164
3168
  var _a;
@@ -3263,11 +3267,11 @@ const Container$f = ({ node }) => {
3263
3267
  defaultMessage: 'See more',
3264
3268
  }))),
3265
3269
  React__default.createElement("div", { className: "wrap-main-button-intent" }, (_a = [...mainButtonIntents, ...bookingButtonIntents]) === null || _a === void 0 ? void 0 : _a.map((intent) => {
3266
- const NodeIntent = SubotInlineIntentBase[intent.type || ''];
3270
+ const NodeIntent = SubotInlineIntentBase$1[intent.type || ''];
3267
3271
  return NodeIntent && React__default.createElement(NodeIntent, { key: intent.id, intent: intent });
3268
3272
  })),
3269
3273
  (suggestedServiceIntents === null || suggestedServiceIntents === void 0 ? void 0 : suggestedServiceIntents.length) > 0 && (React__default.createElement("div", null, suggestedServiceIntents.map((intent) => {
3270
- const NodeIntent = SubotInlineIntentBase[intent.type || ''];
3274
+ const NodeIntent = SubotInlineIntentBase$1[intent.type || ''];
3271
3275
  return NodeIntent && React__default.createElement(NodeIntent, { key: intent.id, intent: intent });
3272
3276
  }))),
3273
3277
  (relatedArticleIntents === null || relatedArticleIntents === void 0 ? void 0 : relatedArticleIntents.length) > 0 && (React__default.createElement("div", { style: { marginTop: 24 } },
@@ -3276,7 +3280,7 @@ const Container$f = ({ node }) => {
3276
3280
  defaultMessage: 'Related Articles',
3277
3281
  })),
3278
3282
  React__default.createElement("div", { style: { padding: '8px 0' } }, relatedArticleIntents.map((intent) => {
3279
- const NodeIntent = SubotInlineIntentBase[intent.type || ''];
3283
+ const NodeIntent = SubotInlineIntentBase$1[intent.type || ''];
3280
3284
  return (NodeIntent && React__default.createElement(NodeIntent, { key: intent.id, intent: intent }));
3281
3285
  })))),
3282
3286
  React__default.createElement(SubInlineIntent, { subIntents: subIntents })));
@@ -3290,7 +3294,7 @@ const StyledWrap$b = styled.div `
3290
3294
  `;
3291
3295
 
3292
3296
  const Container$e = ({ node }) => {
3293
- const { params, onNext, setIsShowFooter } = useContext(SubotInlineContext);
3297
+ const { params, onNext, setIsShowFooter } = useContext(SubotInlineContext$1);
3294
3298
  useMemo(() => {
3295
3299
  setIsShowFooter(true);
3296
3300
  }, []);
@@ -3702,7 +3706,7 @@ const CountDown = ({ onFinish, onClick, isFinished, resendLabel, className }, re
3702
3706
  };
3703
3707
  var CountDown$1 = forwardRef(CountDown);
3704
3708
 
3705
- styled.div `
3709
+ const StyledUserInfoFormContainer$1 = styled.div `
3706
3710
  margin: 0 auto;
3707
3711
  background: #f7f9fc;
3708
3712
  border-radius: ${theme.borderRadius};
@@ -4634,7 +4638,7 @@ const OTP_VERIFIED_MSG_CODE = {
4634
4638
  },
4635
4639
  };
4636
4640
 
4637
- var _a, _b, _c, _d, _e;
4641
+ var _a$1, _b$1, _c$1, _d$1, _e$1;
4638
4642
  const StyledPhoneCode = styled.div `
4639
4643
  display: flex;
4640
4644
  align-items: center;
@@ -4646,21 +4650,21 @@ const StyledPhoneCode = styled.div `
4646
4650
  border-radius: 2px;
4647
4651
  }
4648
4652
  > div {
4649
- color: ${((_a = theme.colors) === null || _a === void 0 ? void 0 : _a.gray800) || ''};
4653
+ color: ${((_a$1 = theme.colors) === null || _a$1 === void 0 ? void 0 : _a$1.gray800) || ''};
4650
4654
  white-space: nowrap;
4651
4655
  }
4652
4656
  `;
4653
4657
  styled(PhoneInputBase) `
4654
4658
  display: flex;
4655
- border: 1px solid ${((_b = theme.colors) === null || _b === void 0 ? void 0 : _b.gray200) || ''};
4659
+ border: 1px solid ${((_b$1 = theme.colors) === null || _b$1 === void 0 ? void 0 : _b$1.gray200) || ''};
4656
4660
  border-radius: ${theme === null || theme === void 0 ? void 0 : theme.borderRadius};
4657
4661
  .PhoneInputCountry {
4658
4662
  position: relative;
4659
4663
  padding: 12px 8px 12px 16px;
4660
- border-right: 1px solid ${((_c = theme.colors) === null || _c === void 0 ? void 0 : _c.gray200) || ''};
4661
- background-color: ${((_d = theme.colors) === null || _d === void 0 ? void 0 : _d.gray100) || ''};
4664
+ border-right: 1px solid ${((_c$1 = theme.colors) === null || _c$1 === void 0 ? void 0 : _c$1.gray200) || ''};
4665
+ background-color: ${((_d$1 = theme.colors) === null || _d$1 === void 0 ? void 0 : _d$1.gray100) || ''};
4662
4666
  border-radius: 6px 0 0 6px;
4663
- color: ${((_e = theme.colors) === null || _e === void 0 ? void 0 : _e.gray800) || ''};
4667
+ color: ${((_e$1 = theme.colors) === null || _e$1 === void 0 ? void 0 : _e$1.gray800) || ''};
4664
4668
  .PhoneInputCountrySelect {
4665
4669
  position: absolute;
4666
4670
  top: 0;
@@ -5497,14 +5501,14 @@ const StyledWrap$a = styled.div `
5497
5501
  const Container$d = ({ node, indexNumber }) => {
5498
5502
  var _a;
5499
5503
  const locale = GlobalData === null || GlobalData === void 0 ? void 0 : GlobalData.locale;
5500
- const { params, listNodes, activeId, onSubmit, setIsShowFooter } = useContext(SubotInlineContext);
5504
+ const { params, listNodes, activeId, onSubmit, setIsShowFooter } = useContext(SubotInlineContext$1);
5501
5505
  useMemo(() => {
5502
5506
  setIsShowFooter(true);
5503
5507
  }, []);
5504
5508
  const handleSubmit = (data) => __awaiter(void 0, void 0, void 0, function* () {
5505
5509
  checkSyncDataOnFrisoCampaign(listNodes[0], data.form_submit_meta);
5506
5510
  const _message = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, params), node._message), data), getCurrentTotalDynamicScore(listNodes, activeId, data.action_id, data.form_submit_meta)), { node_id: node.id });
5507
- const res = yield subotInlineMessage(_message);
5511
+ const res = yield subotInlineMessage$1(_message);
5508
5512
  // asking
5509
5513
  if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
5510
5514
  const _b = res === null || res === void 0 ? void 0 : res._data, { node: _node } = _b, restData = __rest(_b, ["node"]);
@@ -5669,7 +5673,7 @@ const StyledWrap$7 = styled.div `
5669
5673
  `;
5670
5674
  const Container$c = ({ action, active, onChange, htmlType, }) => {
5671
5675
  const currentUrl = useCurrentUrl();
5672
- const { params } = useContext(SubotInlineContext);
5676
+ const { params } = useContext(SubotInlineContext$1);
5673
5677
  return (React__default.createElement(StyledWrap$7, { className: "si-action-img-choice", onClick: () => onChange && onChange(action), active: !!active, "data-event-category": "Service Connection", "data-event-action": "Risk Screening Answer Click", "data-event-label": currentUrl, "data-bot-id": params.bot_id },
5674
5678
  React__default.createElement("div", { className: "si-action-image-wrap" },
5675
5679
  React__default.createElement("img", { loading: "lazy", src: action === null || action === void 0 ? void 0 : action.url, alt: action === null || action === void 0 ? void 0 : action.label })),
@@ -5685,7 +5689,7 @@ const StyledWrap$6 = styled.div `
5685
5689
  `;
5686
5690
  const Container$b = ({ action, onChange }) => {
5687
5691
  const currentUrl = useCurrentUrl();
5688
- const { params, activeId } = useContext(SubotInlineContext);
5692
+ const { params, activeId } = useContext(SubotInlineContext$1);
5689
5693
  return (React__default.createElement(StyledWrap$6, null,
5690
5694
  React__default.createElement(Button, { onClick: () => onChange && onChange(action), size: "lg", "data-event-category": "Service Connection", "data-event-action": "Risk Screening Sign Up for Result", "data-event-label": currentUrl, "data-bot-id": params.bot_id, "data-event-question-id": activeId, styles: {
5691
5695
  root: {
@@ -5747,7 +5751,7 @@ const Container$a = ({ action, onChange, active, htmlType, formSubmitMeta, }) =>
5747
5751
  const currentUrl = useCurrentUrl();
5748
5752
  const inputRef = useRef(null);
5749
5753
  const [otherText, setOtherText] = useState('');
5750
- const { params } = useContext(SubotInlineContext);
5754
+ const { params } = useContext(SubotInlineContext$1);
5751
5755
  const isActionPollWithOther = (action === null || action === void 0 ? void 0 : action.type) === NodeActionType.POLL_CHOICE_TEXT_BY_INPUT;
5752
5756
  const isActionSelectWithOther = (action === null || action === void 0 ? void 0 : action.type) === NodeActionType.USER_CHOICE_TEXT_BY_INPUT ||
5753
5757
  isActionPollWithOther;
@@ -5831,7 +5835,7 @@ const SubotInlineActionBaseTarget = {
5831
5835
  // [NodeActionType.RESULT_BUTTON]: SubotInlineActionTextChoice,
5832
5836
  // [NodeActionType.POLL_RESULT]: SubotInlinePollResult,
5833
5837
  };
5834
- const SubotInlineActionBase = new Proxy(SubotInlineActionBaseTarget, {
5838
+ const SubotInlineActionBase$1 = new Proxy(SubotInlineActionBaseTarget, {
5835
5839
  get(_, prop) {
5836
5840
  const UnknowComponent = () => {
5837
5841
  if (isProduction)
@@ -5862,14 +5866,14 @@ const Container$7 = ({ actions, value, onChange, htmlType, node_type, formSubmit
5862
5866
  const actionType = action.type;
5863
5867
  if (excludeActions.includes(actionType))
5864
5868
  return null;
5865
- const NodeAction = SubotInlineActionBase[action.type];
5869
+ const NodeAction = SubotInlineActionBase$1[action.type];
5866
5870
  return (NodeAction && (React__default.createElement(NodeAction, { key: action.id, action: action, onChange: onChange, active: value === null || value === void 0 ? void 0 : value.includes(action.id), htmlType: htmlType, formSubmitMeta: formSubmitMeta })));
5867
5871
  })));
5868
5872
  };
5869
5873
  Container$7.displayName = 'SubotInlineAction';
5870
5874
 
5871
5875
  const Container$6 = ({ node, indexNumber }) => {
5872
- const { params, listNodes, activeId, onSubmit, setIsShowFooter, setLoading } = useContext(SubotInlineContext);
5876
+ const { params, listNodes, activeId, onSubmit, setIsShowFooter, setLoading } = useContext(SubotInlineContext$1);
5873
5877
  const { value, setValue } = useContext(NodeContext);
5874
5878
  useMemo(() => {
5875
5879
  setIsShowFooter(true);
@@ -5884,7 +5888,7 @@ const Container$6 = ({ node, indexNumber }) => {
5884
5888
  setValue(Object.assign(Object.assign({}, value), { action_id: action === null || action === void 0 ? void 0 : action.id, action_value: action === null || action === void 0 ? void 0 : action.key }));
5885
5889
  const newParams = Object.assign(Object.assign(Object.assign(Object.assign({}, params), value), { node_id: node.id, action_id: action === null || action === void 0 ? void 0 : action.id, action_value: action === null || action === void 0 ? void 0 : action.key }), getCurrentTotalDynamicScore(listNodes, activeId, action.id));
5886
5890
  setLoading(true);
5887
- const res = yield subotInlineMessage(newParams);
5891
+ const res = yield subotInlineMessage$1(newParams);
5888
5892
  setLoading(false);
5889
5893
  if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
5890
5894
  const _a = res === null || res === void 0 ? void 0 : res._data, { node } = _a, restData = __rest(_a, ["node"]);
@@ -5909,7 +5913,7 @@ const StyledWrap$3 = styled.div `
5909
5913
 
5910
5914
  const Container$5 = ({ node, indexNumber }) => {
5911
5915
  var _a;
5912
- const { setIsShowFooter, onChange } = useContext(SubotInlineContext);
5916
+ const { setIsShowFooter, onChange } = useContext(SubotInlineContext$1);
5913
5917
  const { value, setValue } = useContext(NodeContext);
5914
5918
  useMemo(() => {
5915
5919
  setIsShowFooter(true);
@@ -6021,7 +6025,7 @@ const StyledWrap$2 = styled.div `
6021
6025
  `;
6022
6026
 
6023
6027
  const Container$4 = ({ node, indexNumber }) => {
6024
- const { onChange, setIsShowFooter } = useContext(SubotInlineContext);
6028
+ const { onChange, setIsShowFooter } = useContext(SubotInlineContext$1);
6025
6029
  const { value, setValue } = useContext(NodeContext);
6026
6030
  const descriptionNode = useDescriptionPollNode({ node });
6027
6031
  useMemo(() => {
@@ -6096,7 +6100,7 @@ const StyledWrap$1 = styled.div ``;
6096
6100
  const Container$3 = ({ node }) => {
6097
6101
  const refIsTrigger = useRef(false);
6098
6102
  const { formatMessage: f, data: { userInfo }, } = useContext(TogetherComponentGlobalContext);
6099
- const { params, setIsShowFooter, listNodes, activeId } = useContext(SubotInlineContext);
6103
+ const { params, setIsShowFooter, listNodes, activeId } = useContext(SubotInlineContext$1);
6100
6104
  useMemo(() => {
6101
6105
  setIsShowFooter(true);
6102
6106
  }, []);
@@ -6158,7 +6162,7 @@ const StyledWrap = styled.div `
6158
6162
  `;
6159
6163
 
6160
6164
  const Container$2 = ({ node, indexNumber }) => {
6161
- const { params, onSubmit, setIsShowFooter, listNodes, activeId, setLoading, onChange, } = useContext(SubotInlineContext);
6165
+ const { params, onSubmit, setIsShowFooter, listNodes, activeId, setLoading, onChange, } = useContext(SubotInlineContext$1);
6162
6166
  const { value, setValue } = useContext(NodeContext);
6163
6167
  useMemo(() => {
6164
6168
  setIsShowFooter(true);
@@ -6174,7 +6178,7 @@ const Container$2 = ({ node, indexNumber }) => {
6174
6178
  const handleOnChangeNormal = (action) => __awaiter(void 0, void 0, void 0, function* () {
6175
6179
  const newParams = Object.assign(Object.assign(Object.assign(Object.assign({}, params), value), { node_id: node.id, action_id: action === null || action === void 0 ? void 0 : action.id, action_value: action === null || action === void 0 ? void 0 : action.key, form_submit_meta: undefined }), getCurrentTotalDynamicScore(listNodes, activeId, action.id));
6176
6180
  setLoading(true);
6177
- const res = yield subotInlineMessage(newParams);
6181
+ const res = yield subotInlineMessage$1(newParams);
6178
6182
  setLoading(false);
6179
6183
  if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
6180
6184
  const _a = res === null || res === void 0 ? void 0 : res._data, { node } = _a, restData = __rest(_a, ["node"]);
@@ -6222,7 +6226,7 @@ const SubotInlineNodeBaseTarget = {
6222
6226
  // RESULT_RATING = 12,
6223
6227
  // RESULT_REACTION = 13,
6224
6228
  };
6225
- const SubotInlineNodeBase = new Proxy(SubotInlineNodeBaseTarget, {
6229
+ const SubotInlineNodeBase$1 = new Proxy(SubotInlineNodeBaseTarget, {
6226
6230
  get(_, prop) {
6227
6231
  const UnknowComponent = () => {
6228
6232
  if (isProduction)
@@ -6237,7 +6241,7 @@ const SubotInlineNodeBase = new Proxy(SubotInlineNodeBaseTarget, {
6237
6241
 
6238
6242
  const Container$1 = ({ onClickStart }) => {
6239
6243
  var _a;
6240
- const { listNodes, activeId, isDisabledAnimationOnMobile } = useContext(SubotInlineContext);
6244
+ const { listNodes, activeId, isDisabledAnimationOnMobile } = useContext(SubotInlineContext$1);
6241
6245
  const foundIdx = useMemo(() => {
6242
6246
  return listNodes.findIndex((n) => n.id == activeId);
6243
6247
  }, [listNodes, activeId]);
@@ -6258,10 +6262,10 @@ const Container$1 = ({ onClickStart }) => {
6258
6262
  const nodeType = NodeType[node.type].valueOf();
6259
6263
  const nodeTypeSSO = (_a = NodePosition[node.position]) === null || _a === void 0 ? void 0 : _a.valueOf();
6260
6264
  let NodeComponent = node.position === NodePosition.SSO
6261
- ? SubotInlineNodeBase[nodeTypeSSO]
6262
- : SubotInlineNodeBase[nodeType];
6265
+ ? SubotInlineNodeBase$1[nodeTypeSSO]
6266
+ : SubotInlineNodeBase$1[nodeType];
6263
6267
  if (node.is_multi_select && node.type !== NodeType.POLL) {
6264
- NodeComponent = SubotInlineNodeBase['MULTIPLE'];
6268
+ NodeComponent = SubotInlineNodeBase$1['MULTIPLE'];
6265
6269
  }
6266
6270
  return (React__default.createElement(motion.div, { key: node.id, initial: { opacity: 1, y: -300 }, animate: { opacity: 1, y: 0 }, transition: {
6267
6271
  y: { type: 'spring', stiffness: 300, damping: 30 },
@@ -6299,7 +6303,7 @@ const View = ({ loading, backgroundImage, isShowFooter, isFullContainer, isDisab
6299
6303
  backgroundRepeat: 'no-repeat',
6300
6304
  backgroundPosition: 'center',
6301
6305
  }), [backgroundImage]);
6302
- const { isMobile, locale } = useContext(SubotInlineContext);
6306
+ const { isMobile, locale } = useContext(SubotInlineContext$1);
6303
6307
  const [isDisplayFullMobile, setIsDisplayFullMobile] = useState(false);
6304
6308
  useEffect(() => {
6305
6309
  if (isDisplayFullMobile) {
@@ -6362,7 +6366,7 @@ const ViewWithMemo = memo(View);
6362
6366
  ViewWithMemo.displayName = 'SubotInlineRevampView';
6363
6367
 
6364
6368
  const Container = () => {
6365
- const { loading, listNodes, isShowFooter, activeId, isFullContainer, isDisabledAnimationOnMobile, onCloseMobile, userInfo, bgImgFullContainer, typeFormProps, } = useContext(SubotInlineContext);
6369
+ const { loading, listNodes, isShowFooter, activeId, isFullContainer, isDisabledAnimationOnMobile, onCloseMobile, userInfo, bgImgFullContainer, typeFormProps, } = useContext(SubotInlineContext$1);
6366
6370
  const backgroundImage = useMemo(() => {
6367
6371
  var _a, _b;
6368
6372
  const foundNode = listNodes.find((n) => n.id == activeId);
@@ -6419,6 +6423,3155 @@ const SubotInlineRevampWithTheme = (props) => {
6419
6423
  return (React__default.createElement(ContainerWithProvider, Object.assign({}, props, { primaryColor: (_b = (_a = botData.extra_settings) === null || _a === void 0 ? void 0 : _a.inline_styles) === null || _b === void 0 ? void 0 : _b.primary_color, textColor: (_d = (_c = botData.extra_settings) === null || _c === void 0 ? void 0 : _c.inline_styles) === null || _d === void 0 ? void 0 : _d.text_color, textButtonColor: (_f = (_e = botData.extra_settings) === null || _e === void 0 ? void 0 : _e.inline_styles) === null || _f === void 0 ? void 0 : _f.text_button_color, bgColor: (_h = (_g = botData.extra_settings) === null || _g === void 0 ? void 0 : _g.inline_styles) === null || _h === void 0 ? void 0 : _h.container_bg_color, bgContentColor: (_k = (_j = botData.extra_settings) === null || _j === void 0 ? void 0 : _j.inline_styles) === null || _k === void 0 ? void 0 : _k.content_bg_color, bgImgFullContainer: (_m = (_l = botData.extra_settings) === null || _l === void 0 ? void 0 : _l.inline_styles) === null || _m === void 0 ? void 0 : _m.container_bg_image })));
6420
6424
  };
6421
6425
 
6426
+ const SubotInlineContext = createContext({
6427
+ activeId: '',
6428
+ params: {},
6429
+ nodes: [],
6430
+ getParams: () => ({}),
6431
+ trackingCommonInline: {},
6432
+ });
6433
+ /** inline click */
6434
+ const subotInlineClick = (data) => __awaiter(void 0, void 0, void 0, function* () {
6435
+ try {
6436
+ return yield callApi(getSubotApiPath(PATHS$1.GET_INLINE_CLICK), 'POST', {
6437
+ data,
6438
+ });
6439
+ }
6440
+ catch (error) { }
6441
+ });
6442
+ /** inline impression */
6443
+ const subotInlineImpression = (data) => __awaiter(void 0, void 0, void 0, function* () {
6444
+ try {
6445
+ return yield callApi(getSubotApiPath(PATHS$1.GET_INLINE_IMPRESSION), 'POST', {
6446
+ data,
6447
+ });
6448
+ }
6449
+ catch (error) { }
6450
+ });
6451
+ /** inline message */
6452
+ const subotInlineMessage = (data) => __awaiter(void 0, void 0, void 0, function* () {
6453
+ try {
6454
+ return yield callApi(getSubotApiPath(PATHS$1.GET_INLINE_MESSAGE), 'POST', {
6455
+ data,
6456
+ });
6457
+ }
6458
+ catch (error) { }
6459
+ });
6460
+ const computeExtraSettingsForBot = (data) => {
6461
+ var _a;
6462
+ if ((data === null || data === void 0 ? void 0 : data._status) === 1 && ((_a = data === null || data === void 0 ? void 0 : data._data) === null || _a === void 0 ? void 0 : _a.extra_settings)) {
6463
+ try {
6464
+ const extraSettingsObj = JSON.parse(data._data.extra_settings);
6465
+ if (typeof extraSettingsObj === 'object') {
6466
+ data._data.extra_settings = extraSettingsObj;
6467
+ }
6468
+ else {
6469
+ data._data.extra_settings = {
6470
+ sync_data_friso_campaign: false,
6471
+ };
6472
+ }
6473
+ }
6474
+ catch (err) {
6475
+ data._data.extra_settings = {
6476
+ sync_data_friso_campaign: false,
6477
+ };
6478
+ }
6479
+ }
6480
+ return data;
6481
+ };
6482
+ /** inline first node */
6483
+ const subotInlineFirstNode = (id) => __awaiter(void 0, void 0, void 0, function* () {
6484
+ try {
6485
+ const data = yield callApi(getSubotApiPath(PATHS$1.GET_INLINE_FIRST_NODE) + `/${id}`, 'GET');
6486
+ computeExtraSettingsForBot(data);
6487
+ return data;
6488
+ }
6489
+ catch (error) { }
6490
+ });
6491
+
6492
+ const SubotInlineFormContainer = styled.div `
6493
+ margin-top: 2rem;
6494
+ .form {
6495
+ background-color: ${theme.colors.white || '#fff'};
6496
+ }
6497
+ `;
6498
+ const SubotInlineIntentContainer = styled.div ``;
6499
+ const SubotInlineActionContainer = styled.div `
6500
+ margin-top: 1.25rem;
6501
+ `;
6502
+ const SubotInlineReviewContainer = styled.div `
6503
+ margin-bottom: 1rem;
6504
+ `;
6505
+ const SubotInlineDescription$1 = styled.div `
6506
+ font-weight: 400;
6507
+ font-size: 16px;
6508
+ line-height: 24px;
6509
+ color: #595959;
6510
+ font-style: italic;
6511
+ `;
6512
+ const SubotInlineFinalButton = styled(Button$1) `
6513
+ position: relative;
6514
+ min-width: 180px;
6515
+ svg {
6516
+ path {
6517
+ stroke: currentColor;
6518
+ }
6519
+ }
6520
+ &:hover {
6521
+ svg {
6522
+ path {
6523
+ stroke: currentColor;
6524
+ }
6525
+ }
6526
+ }
6527
+ `;
6528
+ const SubotInlineFinalMoreContainer = styled.div `
6529
+ display: flex;
6530
+ align-items: center;
6531
+ justify-content: center;
6532
+ `;
6533
+ const SubotInlineFinalWrapper = styled.div `
6534
+ position: relative;
6535
+ overflow: ${({ isMore }) => (isMore ? 'unset' : 'hidden')};
6536
+ max-height: ${({ maxHeight }) => (maxHeight ? maxHeight + 'px' : 'auto')};
6537
+ margin-bottom: 8px;
6538
+ transition: 0.25s all linear;
6539
+ &:before {
6540
+ position: absolute;
6541
+ z-index: 1;
6542
+ top: 50%;
6543
+ right: 0;
6544
+ bottom: 0;
6545
+ left: 0;
6546
+ background-image: linear-gradient(
6547
+ to top,
6548
+ ${theme.colors.neutral50 || '#F7F9FC'} 0%,
6549
+ transparent 100%
6550
+ );
6551
+ content: '';
6552
+ pointer-events: none;
6553
+ ${({ isMore }) => isMore && `opacity: 0;`}
6554
+ }
6555
+ `;
6556
+ const SubotInlineFinalContainer = styled.div `
6557
+ position: relative;
6558
+ padding: 32px 32px 16px;
6559
+ background-color: ${theme.colors.neutral50 || '#F7F9FC'};
6560
+ border-radius: ${theme.borderRadius};
6561
+ ${MediaQueries.tdDown} {
6562
+ padding: 24px 24px 16px;
6563
+ }
6564
+ ${MediaQueries.mbDown} {
6565
+ padding: 16px;
6566
+ border-radius: 0px;
6567
+ }
6568
+ `;
6569
+ const SubotInlineWrapper$1 = styled.div `
6570
+ padding: 12px 32px 32px;
6571
+ ${MediaQueries.tdDown} {
6572
+ padding: 12px 24px 24px;
6573
+ }
6574
+ ${MediaQueries.mbDown} {
6575
+ padding: 12px 16px 16px;
6576
+ }
6577
+ `;
6578
+ const SubotInlineContainer$1 = styled.div `
6579
+ border: 1px solid ${theme.colors.neutral100 || '#E4E8EC'};
6580
+ background-color: ${theme.colors.neutral50 || '#F7F9FC'};
6581
+ border-radius: ${theme.borderRadius};
6582
+ ${MediaQueries.mbDown} {
6583
+ border: none;
6584
+ }
6585
+ `;
6586
+
6587
+ const CheckboxIcon = (props) => (React__default.createElement("svg", Object.assign({ width: "22", height: "22", viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
6588
+ React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11 21C16.5228 21 21 16.5228 21 11C21 5.47715 16.5228 1 11 1C5.47715 1 1 5.47715 1 11C1 16.5228 5.47715 21 11 21Z", fill: "#2D87F3", stroke: "#2D87F3", strokeWidth: "2" }),
6589
+ React__default.createElement("path", { d: "M15.5714 8L9.67857 14L7 11.2727", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })));
6590
+
6591
+ const CheckIcon = (props) => (React__default.createElement("svg", Object.assign({ width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
6592
+ React__default.createElement("path", { d: "M13.3346 4L6.0013 11.3333L2.66797 8", stroke: "#737373", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })));
6593
+
6594
+ const LikeIcon = (props) => (React__default.createElement("svg", Object.assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
6595
+ React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.0521 5.70293L11.8834 2L12.6635 2.03149C12.6635 2.03149 13.5407 2.05593 14.4487 2.51311C15.3568 2.9703 16.375 4.04935 16.375 5.69552C16.375 6.76085 16.1102 7.83874 15.8458 8.67047H20.125C21.1497 8.67047 22 9.53063 22 10.5673V12.8847C22 13.1046 21.9497 13.3294 21.8462 13.533L18.6437 19.9571C18.3261 20.5939 17.6767 21 16.9701 21H8.875C7.85025 21 7 20.1398 7 19.1031V10.0579C7 9.50164 7.24299 8.97147 7.66284 8.61119L11.0521 5.70293ZM13.4432 4.15712C13.4125 4.15279 13.3784 4.14799 13.3263 4.1321L12.7422 6.73842L8.875 10.0579V19.1031H16.9701L20.125 12.7717V10.5673H13.0864L13.6357 9.25027C13.6357 9.25027 14.5 7.01241 14.5 5.69552C14.5 4.74112 14.1119 4.46257 13.6138 4.21176C13.5294 4.16929 13.4902 4.16376 13.4432 4.15712Z", fill: "#595959" }),
6596
+ React__default.createElement("path", { d: "M2 10.5C2 9.672 2.672 9 3.5 9C4.328 9 5 9.672 5 10.5V19.5C5 20.328 4.328 21 3.5 21C2.672 21 2 20.328 2 19.5V10.5Z", fill: "#595959" })));
6597
+
6598
+ const DislikeIcon = (props) => (React__default.createElement("svg", Object.assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
6599
+ React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.0521 17.2971L11.8834 21L12.6635 20.9685C12.6635 20.9685 13.5407 20.9441 14.4487 20.4869C15.3568 20.0297 16.375 18.9507 16.375 17.3045C16.375 16.2391 16.1102 15.1613 15.8458 14.3295H20.125C21.1497 14.3295 22 13.4694 22 12.4327V10.1153C22 9.89545 21.9497 9.6706 21.8462 9.467L18.6437 3.0429C18.3261 2.40607 17.6767 2 16.9701 2H8.875C7.85025 2 7 2.86016 7 3.89685V12.9421C7 13.4984 7.24299 14.0285 7.66284 14.3888L11.0521 17.2971ZM13.4432 18.8429C13.4125 18.8472 13.3784 18.852 13.3263 18.8679L12.7422 16.2616L8.875 12.9421V3.89685H16.9701L20.125 10.2283V12.4327H13.0864L13.6357 13.7497C13.6357 13.7497 14.5 15.9876 14.5 17.3045C14.5 18.2589 14.1119 18.5374 13.6138 18.7882C13.5294 18.8307 13.4902 18.8362 13.4432 18.8429Z", fill: "#595959" }),
6600
+ React__default.createElement("path", { d: "M2 12.5C2 13.328 2.672 14 3.5 14C4.328 14 5 13.328 5 12.5V3.5C5 2.672 4.328 2 3.5 2C2.672 2 2 2.672 2 3.5V12.5Z", fill: "#595959" })));
6601
+
6602
+ const ArrowDown = (props) => (React__default.createElement("svg", Object.assign({ width: "10", height: "6", viewBox: "0 0 10 6", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
6603
+ React__default.createElement("path", { d: "M1 1L5 5L9 1", stroke: "#595959", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round" })));
6604
+
6605
+ const ArrowLeft = (props) => (React__default.createElement("svg", Object.assign({ width: "7", height: "10", viewBox: "0 0 7 10", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
6606
+ React__default.createElement("path", { d: "M5.5 9L1.5 5L5.5 1", stroke: "#2D87F3", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round" })));
6607
+
6608
+ const ArrowRight = (props) => (React__default.createElement("svg", Object.assign({ width: "7", height: "10", viewBox: "0 0 7 10", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
6609
+ React__default.createElement("path", { d: "M1.5 9L5.5 5L1.5 1", stroke: "#2D87F3", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round" })));
6610
+
6611
+ const ArrowUp = (props) => (React__default.createElement("svg", Object.assign({ width: "10", height: "6", viewBox: "0 0 10 6", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
6612
+ React__default.createElement("path", { d: "M1 5L5 1L9 5", stroke: "#FC5D9A", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round" })));
6613
+
6614
+ const ChevronRightActive = (props) => (React__default.createElement("svg", Object.assign({ width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
6615
+ React__default.createElement("path", { d: "M6 12L10 8L6 4", stroke: "#2D87F3", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })));
6616
+
6617
+ const RotateLeft = (props) => (React__default.createElement("svg", Object.assign({ width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
6618
+ React__default.createElement("g", { clipPath: "url(#clip0)" },
6619
+ React__default.createElement("path", { d: "M0.666626 2.6665V6.6665H4.66663", stroke: "#737373", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round" }),
6620
+ React__default.createElement("path", { d: "M2.33996 10.0001C2.77222 11.227 3.59152 12.2802 4.6744 13.001C5.75728 13.7218 7.04508 14.0712 8.34377 13.9964C9.64246 13.9217 10.8817 13.4269 11.8747 12.5866C12.8677 11.7464 13.5608 10.6061 13.8494 9.3377C14.1381 8.06929 14.0067 6.74143 13.475 5.55419C12.9434 4.36696 12.0403 3.38466 10.9018 2.7553C9.76339 2.12595 8.45123 1.88364 7.16308 2.06487C5.87493 2.24611 4.68057 2.84108 3.75996 3.76013L0.666626 6.6668", stroke: "#737373", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round" })),
6621
+ React__default.createElement("defs", null,
6622
+ React__default.createElement("clipPath", { id: "clip0" },
6623
+ React__default.createElement("rect", { width: "16", height: "16", fill: "white" })))));
6624
+
6625
+ var _a, _b, _c, _d, _e, _f, _g;
6626
+ const SubotInlineButtonReaction = styled.div `
6627
+ display: flex;
6628
+ align-items: center;
6629
+ justify-content: center;
6630
+ padding: 12px 24px;
6631
+ border: 1px solid ${theme.colors.neutral100 || '#E4E8EC'};
6632
+ background-color: ${theme.colors.white || 'white'};
6633
+ border-radius: 32px;
6634
+ cursor: pointer;
6635
+ transition: 0.25s all linear;
6636
+ svg {
6637
+ height: 16px;
6638
+ margin-right: 3px;
6639
+ }
6640
+ &:hover {
6641
+ background-color: ${theme.colors.neutral100};
6642
+ }
6643
+ &.active {
6644
+ background-color: ${theme.colors.primaryActive};
6645
+ color: ${theme.colors.white || '#fff'};
6646
+ svg {
6647
+ stroke: ${theme.colors.white || '#fff'};
6648
+ }
6649
+ }
6650
+ `;
6651
+ const SubotInlineButtonReview = styled.div `
6652
+ padding: 12px 24px;
6653
+ border: 1px solid ${theme.colors.neutral100 || '#E4E8EC'};
6654
+ background-color: ${theme.colors.white || 'white'};
6655
+ border-radius: 32px;
6656
+ cursor: pointer;
6657
+ transition: 0.25s all linear;
6658
+ &.active {
6659
+ background-color: ${(_a = theme.colors) === null || _a === void 0 ? void 0 : _a.primaryActive};
6660
+ color: ${theme.colors.white || '#fff'};
6661
+ svg {
6662
+ stroke: ${theme.colors.white || '#fff'};
6663
+ }
6664
+ }
6665
+ `;
6666
+ const SubotInlineActionText = styled.div `
6667
+ display: flex;
6668
+ align-items: center;
6669
+ padding: 16px 24px;
6670
+ border: 1px solid
6671
+ ${({ active }) => active
6672
+ ? theme.colors.primaryBase || '#2685F1'
6673
+ : theme.colors.white || '#fff'};
6674
+ background-color: ${theme.colors.white || '#fff'};
6675
+ border-radius: ${theme.borderRadius};
6676
+ cursor: pointer;
6677
+ transition: 0.25s all linear;
6678
+ .label {
6679
+ flex: 1;
6680
+ }
6681
+ .icon {
6682
+ position: relative;
6683
+ z-index: 0;
6684
+ display: flex;
6685
+ width: 24px;
6686
+ height: 24px;
6687
+ align-items: center;
6688
+ justify-content: center;
6689
+ padding: 1px;
6690
+ transition: 0.2s linear all;
6691
+ .icon-checkbox {
6692
+ width: 100%;
6693
+ height: 100%;
6694
+ opacity: 0;
6695
+ ${({ active }) => active && `opacity: 1`};
6696
+ transition: 0.25s all linear;
6697
+ }
6698
+ &:before {
6699
+ position: absolute;
6700
+ top: 50%;
6701
+ left: 50%;
6702
+ width: 22px;
6703
+ height: 22px;
6704
+ border: 2px solid
6705
+ ${({ active }) => active
6706
+ ? theme.colors.primaryBase || '#2685F1'
6707
+ : theme.colors.gray600 || '#595959'};
6708
+ border-radius: 50%;
6709
+ content: '';
6710
+ transform: translate(-50%, -50%);
6711
+ transition: 0.25s all linear;
6712
+ }
6713
+ &:after {
6714
+ position: absolute;
6715
+ z-index: -1;
6716
+ top: 50%;
6717
+ left: 50%;
6718
+ width: 10px;
6719
+ height: 10px;
6720
+ background-color: ${theme.colors.primaryBase || '#2685F1'};
6721
+ border-radius: 50%;
6722
+ content: '';
6723
+ opacity: 0;
6724
+ ${({ active }) => active && `opacity: 1`};
6725
+ transform: translate(-50%, -50%);
6726
+ transition: 0.25s all linear;
6727
+ }
6728
+ }
6729
+ &:hover {
6730
+ border-color: ${((_b = theme.colors) === null || _b === void 0 ? void 0 : _b.primaryBase) || '#2685F1'};
6731
+ .icon {
6732
+ &:before {
6733
+ border-color: ${((_c = theme.colors) === null || _c === void 0 ? void 0 : _c.primaryBase) || '#2685F1'};
6734
+ transition: 0.2s linear all;
6735
+ }
6736
+ }
6737
+ }
6738
+ ${MediaQueries.tdDown} {
6739
+ padding: 16px 20px;
6740
+ }
6741
+ `;
6742
+ const SubotInlineActionImage = styled(SubotInlineActionText) `
6743
+ position: relative;
6744
+ flex-wrap: wrap;
6745
+ padding: 16px;
6746
+ background-color: ${((_d = theme.colors) === null || _d === void 0 ? void 0 : _d.white) || '#fff'};
6747
+ .image-container {
6748
+ position: relative;
6749
+ overflow: hidden;
6750
+ width: 100%;
6751
+ padding-top: 67%;
6752
+ border-radius: 10px;
6753
+ .image {
6754
+ position: absolute;
6755
+ top: 50%;
6756
+ left: 50%;
6757
+ width: 100%;
6758
+ min-width: 100%;
6759
+ height: auto;
6760
+ min-height: 100%;
6761
+ transform: translate(-50%, -50%);
6762
+ }
6763
+ }
6764
+ .label {
6765
+ margin-top: 16px;
6766
+ }
6767
+ .icon {
6768
+ position: absolute;
6769
+ top: 1.75rem;
6770
+ right: 1.75rem;
6771
+ &:before {
6772
+ z-index: -1;
6773
+ background-color: #fff;
6774
+ }
6775
+ }
6776
+ ${MediaQueries.tdDown} {
6777
+ padding: 12px;
6778
+ .label {
6779
+ margin-top: 12px;
6780
+ }
6781
+ .icon {
6782
+ top: 1.3rem;
6783
+ right: 1.3rem;
6784
+ }
6785
+ }
6786
+ ${MediaQueries.tdDown} {
6787
+ padding: 8px;
6788
+ .label {
6789
+ margin-top: 8px;
6790
+ }
6791
+ .icon {
6792
+ top: 0.9rem;
6793
+ right: 0.9rem;
6794
+ }
6795
+ }
6796
+ `;
6797
+ const SubotInlineActionRatingStartContainer = styled.div `
6798
+ display: flex;
6799
+ align-items: center;
6800
+ justify-content: flex-start;
6801
+ ${MediaQueries.tdDown} {
6802
+ justify-content: center;
6803
+ }
6804
+ `;
6805
+ const SubotInlineActionRatingDescriptionContainer = styled.div `
6806
+ textarea {
6807
+ background-color: ${((_e = theme.colors) === null || _e === void 0 ? void 0 : _e.white) || '#fff'};
6808
+ }
6809
+ `;
6810
+ const SubotInlineActionPollResult = styled.div `
6811
+ margin-top: 20px;
6812
+ color: ${((_f = theme.colors) === null || _f === void 0 ? void 0 : _f.gray500) || '#737373'};
6813
+ font-weight: 600;
6814
+ `;
6815
+ const SubotInlineActionPollChoiceResult = styled.div `
6816
+ position: relative;
6817
+ z-index: 0;
6818
+ display: flex;
6819
+ overflow: hidden;
6820
+ align-items: center;
6821
+ padding: 16px 20px;
6822
+ border-radius: ${theme.borderRadius};
6823
+ .number {
6824
+ width: 32px;
6825
+ margin-right: 14px;
6826
+ font-weight: 600;
6827
+ }
6828
+ .content {
6829
+ flex: 1;
6830
+ }
6831
+ .icon {
6832
+ width: 16px;
6833
+ margin-left: 8px;
6834
+ }
6835
+ &:before {
6836
+ position: absolute;
6837
+ z-index: -1;
6838
+ top: 0;
6839
+ right: ${({ percent }) => (percent ? `${100 - percent}%` : '100%')};
6840
+ bottom: 0;
6841
+ left: 0;
6842
+ background-color: ${({ is_chosen }) => is_chosen
6843
+ ? theme.colors.primary50 || '#E3F2FF'
6844
+ : theme.colors.neutral100 || '#E4E8EC'};
6845
+ content: '';
6846
+ transition: 0.3s all linear;
6847
+ }
6848
+ &:after {
6849
+ position: absolute;
6850
+ z-index: -2;
6851
+ top: 0;
6852
+ right: 0;
6853
+ bottom: 0;
6854
+ left: 0;
6855
+ background-color: ${((_g = theme.colors) === null || _g === void 0 ? void 0 : _g.white) || '#fff'};
6856
+ content: '';
6857
+ }
6858
+ ${MediaQueries.mbDown} {
6859
+ padding: 6px 16px;
6860
+ }
6861
+ `;
6862
+ const SubotInlineActionItemContainer = styled.div `
6863
+ width: ${({ width }) => width || '100%'};
6864
+ padding: 4px;
6865
+ &.item-image-container {
6866
+ padding: 16px;
6867
+ ${MediaQueries.tdDown} {
6868
+ padding: 7.5px;
6869
+ }
6870
+ ${MediaQueries.mbDown} {
6871
+ width: 50%;
6872
+ }
6873
+ }
6874
+ `;
6875
+ const SubotInlineActionListContainer = styled.div `
6876
+ display: flex;
6877
+ flex-wrap: wrap;
6878
+ align-items: flex-start;
6879
+ justify-content: center;
6880
+ margin: -4px;
6881
+
6882
+ &.list-container {
6883
+ margin: -16px;
6884
+ ${MediaQueries.tdDown} {
6885
+ margin: -7.5px;
6886
+ }
6887
+ }
6888
+
6889
+ &.review-container {
6890
+ margin: -8px;
6891
+ > div {
6892
+ padding: 8px;
6893
+ }
6894
+ }
6895
+ `;
6896
+
6897
+ const SubotInlineAction = ({ actions, value, onChange, htmlType, node_type, formSubmitMeta, }) => {
6898
+ const className = useMemo(() => {
6899
+ switch (node_type) {
6900
+ case NodeType.IMAGE:
6901
+ case NodeType.REACTION:
6902
+ return 'list-container';
6903
+ default:
6904
+ return '';
6905
+ }
6906
+ }, [node_type]);
6907
+ return (React__default.createElement(React__default.Fragment, null, actions && !!(actions === null || actions === void 0 ? void 0 : actions.length) && (React__default.createElement(SubotInlineActionListContainer, { className: className }, actions === null || actions === void 0 ? void 0 : actions.map((action) => {
6908
+ const NodeAction = SubotInlineActionBase[action === null || action === void 0 ? void 0 : action.type];
6909
+ return (NodeAction && (React__default.createElement(NodeAction, { key: action.id, action: action, onChange: onChange, active: value === null || value === void 0 ? void 0 : value.includes(action.id), htmlType: htmlType, formSubmitMeta: formSubmitMeta })));
6910
+ })))));
6911
+ };
6912
+
6913
+ const ButtonStyled = styled(Button$1) `
6914
+ &:disabled {
6915
+ background-color: rgb(242, 242, 242);
6916
+ color: rgb(140, 140, 140);
6917
+
6918
+ &:hover {
6919
+ border: 0;
6920
+ }
6921
+ }
6922
+ svg {
6923
+ path {
6924
+ stroke: currentColor;
6925
+ }
6926
+ }
6927
+ `;
6928
+ const ButtonBackStyled = styled(ButtonStyled) `
6929
+ &:disabled {
6930
+ background-color: rgb(242, 242, 242);
6931
+ color: rgb(140, 140, 140);
6932
+ &:hover {
6933
+ border: 0;
6934
+ }
6935
+ }
6936
+ svg {
6937
+ path {
6938
+ stroke: currentColor;
6939
+ }
6940
+ }
6941
+ `;
6942
+ const SubotInlineFooterStyled = styled.div `
6943
+ display: flex;
6944
+ align-items: center;
6945
+ justify-content: flex-end;
6946
+ padding: 16px 32px;
6947
+ border-top: 4px solid ${theme.colors.neutral100 || '#E4E8EC'};
6948
+ .mantine-Button-root {
6949
+ + .mantine-Button-root {
6950
+ margin-left: 8px;
6951
+ }
6952
+ }
6953
+ ${MediaQueries.tdDown} {
6954
+ padding: 12px 24px;
6955
+ }
6956
+ ${MediaQueries.mbDown} {
6957
+ padding: 12px 16px;
6958
+ }
6959
+ `;
6960
+
6961
+ const SubotInlineActionTextChoice = ({ action, onChange, active, htmlType, formSubmitMeta, }) => {
6962
+ const { trackingCommonInline } = useContext(SubotInlineContext);
6963
+ const inputRef = useRef(null);
6964
+ const [otherText, setOtherText] = useState('');
6965
+ const isActionPollWithOther = (action === null || action === void 0 ? void 0 : action.type) === NodeActionType.POLL_CHOICE_TEXT_BY_INPUT;
6966
+ const isActionSelectWithOther = (action === null || action === void 0 ? void 0 : action.type) === NodeActionType.USER_CHOICE_TEXT_BY_INPUT ||
6967
+ isActionPollWithOther;
6968
+ const onChangeTextArea = (evt) => {
6969
+ setOtherText(evt.target.value);
6970
+ if (isActionSelectWithOther) {
6971
+ onChange === null || onChange === void 0 ? void 0 : onChange(action, [
6972
+ {
6973
+ key: KEY_OF_TEXT_CHOICE_WITH_OTHER_FIELD,
6974
+ control: ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type] || 'text',
6975
+ value: evt.target.value,
6976
+ action_id: action.id,
6977
+ },
6978
+ ]);
6979
+ }
6980
+ };
6981
+ useEffect(() => {
6982
+ var _a, _b;
6983
+ if (active) {
6984
+ setOtherText(((_a = formSubmitMeta === null || formSubmitMeta === void 0 ? void 0 : formSubmitMeta.find((f) => f.key === KEY_OF_TEXT_CHOICE_WITH_OTHER_FIELD)) === null || _a === void 0 ? void 0 : _a.value) || '');
6985
+ (_b = inputRef.current) === null || _b === void 0 ? void 0 : _b.focus();
6986
+ }
6987
+ }, [active, formSubmitMeta]);
6988
+ return (React__default.createElement(SubotInlineActionItemContainer, null,
6989
+ React__default.createElement(SubotInlineActionText, Object.assign({ active: !!active, onClick: () => onChange === null || onChange === void 0 ? void 0 : onChange(action), className: "pointer-event-child-none" }, trackingCommonInline, { "data-response-id": action === null || action === void 0 ? void 0 : action.id, "data-event-action": "Answer Click" }),
6990
+ React__default.createElement("div", { className: "label" },
6991
+ React__default.createElement(Markdown, null, action === null || action === void 0 ? void 0 : action.label)),
6992
+ React__default.createElement("div", { className: "icon" }, htmlType === 'checkbox' && (React__default.createElement(CheckboxIcon, { className: "icon-checkbox", viewBox: "0 0 22 22" })))),
6993
+ isActionSelectWithOther && active && (React__default.createElement(Box, { mt: "6px", style: { textAlign: 'right' } },
6994
+ React__default.createElement(Textarea, { ref: inputRef, placeholder: action === null || action === void 0 ? void 0 : action.label, styles: {
6995
+ input: {
6996
+ paddingLeft: '24px',
6997
+ paddingRight: '24px',
6998
+ boxShadow: 'none',
6999
+ ':focus': { boxShadow: 'none' },
7000
+ },
7001
+ }, value: otherText, onChange: onChangeTextArea, maxLength: 360 })))));
7002
+ };
7003
+ const SubotInlineActionImageChoice = ({ action, onChange, active, htmlType, }) => {
7004
+ const { trackingCommonInline } = useContext(SubotInlineContext);
7005
+ return (React__default.createElement(SubotInlineActionItemContainer, { width: "45%", className: 'item-image-container' },
7006
+ React__default.createElement(SubotInlineActionImage, Object.assign({ onClick: () => onChange && onChange(action), active: !!active }, trackingCommonInline, { "data-response-id": action === null || action === void 0 ? void 0 : action.id, "data-event-action": "Answer Click" }),
7007
+ React__default.createElement("div", { className: "image-container" },
7008
+ React__default.createElement("img", { loading: "lazy", src: action === null || action === void 0 ? void 0 : action.url, alt: action === null || action === void 0 ? void 0 : action.label, className: "image" })),
7009
+ (action === null || action === void 0 ? void 0 : action.label) && (React__default.createElement("div", { className: "label" },
7010
+ React__default.createElement(Markdown, null, action === null || action === void 0 ? void 0 : action.label))),
7011
+ React__default.createElement("div", { className: "icon" }, htmlType === 'checkbox' && (React__default.createElement(CheckboxIcon, { className: "icon-checkbox", viewBox: "0 0 22 22" }))))));
7012
+ };
7013
+ const SubotInlineActionSSO = ({ action, onChange, }) => {
7014
+ const { trackingCommonInline } = useContext(SubotInlineContext);
7015
+ return (React__default.createElement(SubotInlineActionItemContainer, { width: "50%", style: { alignSelf: 'center' } },
7016
+ React__default.createElement(ButtonStyled, Object.assign({ onClick: () => onChange && onChange(action), size: "lg", isBlock: true }, trackingCommonInline, { className: "pointer-event-child-none", "data-event-action": "Login Click", "data-response-id": action === null || action === void 0 ? void 0 : action.id }),
7017
+ React__default.createElement(Markdown, null, action === null || action === void 0 ? void 0 : action.label))));
7018
+ };
7019
+ const SubotInlinePollChoice = ({ active, action, onChange, htmlType, node_type, }) => {
7020
+ const handleOnChange = (action) => {
7021
+ if (action)
7022
+ onChange &&
7023
+ onChange({
7024
+ key: (action === null || action === void 0 ? void 0 : action.key) || '',
7025
+ control: ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type],
7026
+ value: '',
7027
+ action_id: action === null || action === void 0 ? void 0 : action.id,
7028
+ });
7029
+ };
7030
+ if (node_type === NodeType.RESULT_POLL)
7031
+ return (React__default.createElement(SubotInlineActionItemContainer, null,
7032
+ React__default.createElement(SubotInlineActionPollChoiceResult, { percent: (action === null || action === void 0 ? void 0 : action.percent) || 0, is_chosen: action === null || action === void 0 ? void 0 : action.is_chosen },
7033
+ React__default.createElement("div", { className: "number" }, action === null || action === void 0 ? void 0 :
7034
+ action.percent,
7035
+ "%"),
7036
+ React__default.createElement("div", { className: "content" }, action === null || action === void 0 ? void 0 : action.label),
7037
+ React__default.createElement("div", { className: "icon" }, (action === null || action === void 0 ? void 0 : action.is_chosen) && React__default.createElement(CheckIcon, { viewBox: "0 0 16 16" })))));
7038
+ return (React__default.createElement(SubotInlineActionTextChoice, { active: !!active, action: action, onChange: handleOnChange, htmlType: htmlType }));
7039
+ };
7040
+ const SubotInlinePollChoiceImage = ({ active, action, onChange, htmlType, node_type, }) => {
7041
+ const handleOnChange = (action) => {
7042
+ if (action)
7043
+ onChange &&
7044
+ onChange({
7045
+ key: action === null || action === void 0 ? void 0 : action.key,
7046
+ control: ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type],
7047
+ value: '',
7048
+ action_id: action === null || action === void 0 ? void 0 : action.id,
7049
+ });
7050
+ };
7051
+ if (node_type === NodeType.RESULT_POLL)
7052
+ // TODO: Update layout result poll image
7053
+ return (React__default.createElement(SubotInlineActionItemContainer, null,
7054
+ React__default.createElement(SubotInlineActionPollChoiceResult, { percent: (action === null || action === void 0 ? void 0 : action.percent) || 0, is_chosen: action === null || action === void 0 ? void 0 : action.is_chosen },
7055
+ React__default.createElement("div", { className: "number" }, action === null || action === void 0 ? void 0 :
7056
+ action.percent,
7057
+ "%"),
7058
+ React__default.createElement("div", { className: "content" }, action === null || action === void 0 ? void 0 : action.label),
7059
+ React__default.createElement("div", { className: "icon" }, (action === null || action === void 0 ? void 0 : action.is_chosen) && React__default.createElement(CheckIcon, { viewBox: "0 0 16 16" })))));
7060
+ return (React__default.createElement(SubotInlineActionImageChoice, { active: !!active, action: action, onChange: handleOnChange, htmlType: htmlType }));
7061
+ };
7062
+ const SubotInlineRatingStar = ({ action, value, onChange, }) => {
7063
+ var _a, _b;
7064
+ return (React__default.createElement(SubotInlineActionItemContainer, null,
7065
+ React__default.createElement(SubotInlineActionRatingStartContainer, null,
7066
+ React__default.createElement(StarRatings, { rating: value && typeof value !== 'string' && (value === null || value === void 0 ? void 0 : value.value)
7067
+ ? parseInt(value === null || value === void 0 ? void 0 : value.value)
7068
+ : 0, changeRating: (star) => {
7069
+ const _value = {
7070
+ key: action === null || action === void 0 ? void 0 : action.key,
7071
+ control: ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type],
7072
+ value: star.toString(),
7073
+ action_id: action === null || action === void 0 ? void 0 : action.id,
7074
+ };
7075
+ onChange && onChange(_value);
7076
+ }, starHoverColor: (_a = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _a === void 0 ? void 0 : _a.yellow600, starRatedColor: (_b = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _b === void 0 ? void 0 : _b.yellow600, starDimension: "48" }))));
7077
+ };
7078
+ const SubotInlineTextArea = ({ action, value, onChange, }) => {
7079
+ return (React__default.createElement(SubotInlineActionItemContainer, null,
7080
+ React__default.createElement(SubotInlineActionRatingDescriptionContainer, null,
7081
+ React__default.createElement(TextArea, { placeholder: action === null || action === void 0 ? void 0 : action.label, value: value && typeof value !== 'string' && (value === null || value === void 0 ? void 0 : value.value)
7082
+ ? value === null || value === void 0 ? void 0 : value.value
7083
+ : '', onChange: (evt) => {
7084
+ const _value = {
7085
+ key: action === null || action === void 0 ? void 0 : action.key,
7086
+ control: ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type],
7087
+ value: evt.target.value,
7088
+ action_id: action === null || action === void 0 ? void 0 : action.id,
7089
+ };
7090
+ onChange && onChange(_value);
7091
+ } }))));
7092
+ };
7093
+ const SubotInlineLikeChoice = ({ action, active, onChange, }) => {
7094
+ return (React__default.createElement(SubotInlineActionItemContainer, { width: "40%", className: 'item-image-container' },
7095
+ React__default.createElement(SubotInlineButtonReaction, { className: classNames(!!active && 'active'), onClick: () => onChange && onChange(action) },
7096
+ React__default.createElement(LikeIcon, { viewBox: "0 0 24 24" }),
7097
+ React__default.createElement(Markdown, null, action === null || action === void 0 ? void 0 : action.label))));
7098
+ };
7099
+ const SubotInlineDislikeChoice = ({ action, active, onChange, }) => {
7100
+ return (React__default.createElement(SubotInlineActionItemContainer, { width: "40%", className: 'item-image-container' },
7101
+ React__default.createElement(SubotInlineButtonReaction, { className: classNames(!!active && 'active'), onClick: () => onChange && onChange(action) },
7102
+ React__default.createElement(DislikeIcon, { viewBox: "0 0 24 24" }),
7103
+ React__default.createElement(Markdown, null, action === null || action === void 0 ? void 0 : action.label))));
7104
+ };
7105
+ const SubotInlineReviewChoice = ({ active, action, onChange, }) => (React__default.createElement(SubotInlineActionItemContainer, { width: "auto", className: "review-choice" },
7106
+ React__default.createElement(SubotInlineButtonReview, { className: classNames(!!active && 'active'), onClick: () => onChange &&
7107
+ onChange({
7108
+ key: action === null || action === void 0 ? void 0 : action.key,
7109
+ control: ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type],
7110
+ value: '',
7111
+ action_id: action === null || action === void 0 ? void 0 : action.id,
7112
+ }) },
7113
+ React__default.createElement(Markdown, null, action === null || action === void 0 ? void 0 : action.label))));
7114
+ const SubotInlinePollResult = ({ action, }) => (React__default.createElement(SubotInlineActionItemContainer, null,
7115
+ React__default.createElement(SubotInlineActionPollResult, null, action === null || action === void 0 ? void 0 : action.label)));
7116
+ const SubotInlineActionBase = {
7117
+ 'user-image': SubotInlineActionImageChoice,
7118
+ [NodeActionType.USER_CHOICE_TEXT]: SubotInlineActionTextChoice,
7119
+ [NodeActionType.USER_CHOICE_TEXT_BY_INPUT]: SubotInlineActionTextChoice,
7120
+ [NodeActionType.USER_CHOICE_IMAGE]: SubotInlineActionImageChoice,
7121
+ [NodeActionType.ACTION_SSO_REDIRECT]: SubotInlineActionSSO,
7122
+ [NodeActionType.POLL_CHOICE]: SubotInlinePollChoice,
7123
+ [NodeActionType.POLL_CHOICE_TEXT_BY_INPUT]: SubotInlineActionTextChoice,
7124
+ [NodeActionType.POLL_CHOICE_IMAGE]: SubotInlinePollChoiceImage,
7125
+ [NodeActionType.RATING_STAR]: SubotInlineRatingStar,
7126
+ [NodeActionType.RATING_DESCRIPTION]: SubotInlineTextArea,
7127
+ [NodeActionType.LIKE_CHOICE]: SubotInlineLikeChoice,
7128
+ [NodeActionType.DISLIKE_CHOICE]: SubotInlineDislikeChoice,
7129
+ [NodeActionType.REVIEW_CHOICE]: SubotInlineReviewChoice,
7130
+ [NodeActionType.REVIEW_DESCRIPTION]: SubotInlineTextArea,
7131
+ [NodeActionType.RESULT_BUTTON]: SubotInlineActionTextChoice,
7132
+ [NodeActionType.POLL_RESULT]: SubotInlinePollResult,
7133
+ };
7134
+
7135
+ const SubotInlineFooter = ({ onBack, onNext: onSubmit, hideBack, hideNext, nextText, backProps, nextProps, }) => {
7136
+ var _a, _b, _c;
7137
+ const { formatMessage: f } = useContext(TogetherComponentGlobalContext);
7138
+ const { nodes: listNodes, activeId, params, onNext, trackingCommonInline, } = useContext(SubotInlineContext);
7139
+ const nodeMessage = listNodes.find((nodeItem) => nodeItem.id == activeId);
7140
+ const actionNextChoice = (_a = nodeMessage === null || nodeMessage === void 0 ? void 0 : nodeMessage.actions) === null || _a === void 0 ? void 0 : _a.find((act) => act.type === NodeActionType.USER_CHOICE_NEXT);
7141
+ const handleNextChoice = () => {
7142
+ if (nodeMessage && actionNextChoice) {
7143
+ const nextValue = {
7144
+ node_id: nodeMessage.id,
7145
+ action_id: actionNextChoice === null || actionNextChoice === void 0 ? void 0 : actionNextChoice.id,
7146
+ action_value: actionNextChoice === null || actionNextChoice === void 0 ? void 0 : actionNextChoice.key,
7147
+ };
7148
+ onNext === null || onNext === void 0 ? void 0 : onNext(Object.assign(Object.assign(Object.assign({}, params), nextValue), nodeMessage._message));
7149
+ }
7150
+ };
7151
+ const actionSubmitMultiple = (_b = nodeMessage === null || nodeMessage === void 0 ? void 0 : nodeMessage.actions) === null || _b === void 0 ? void 0 : _b.find((act) => act.type === NodeActionType.ACTION_MULTIPLE_BUTTON);
7152
+ return (React__default.createElement(SubotInlineFooterStyled, null,
7153
+ !hideBack && (React__default.createElement(ButtonBackStyled, Object.assign({ size: "md", color: "secondary", onClick: onBack }, backProps, { className: classNames('pointer-event-child-none', backProps === null || backProps === void 0 ? void 0 : backProps.className) }, trackingCommonInline, { "data-event-action": "Back Click" }),
7154
+ React__default.createElement(ArrowLeft, { style: { marginRight: 10 } }),
7155
+ f({
7156
+ id: 'riskScreener.back',
7157
+ defaultMessage: 'Back',
7158
+ }))),
7159
+ !hideNext && (React__default.createElement(ButtonStyled, Object.assign({ size: "md", color: "primary", onClick: actionNextChoice ? handleNextChoice : onSubmit }, nextProps, { className: classNames('pointer-event-child-none', nextProps === null || nextProps === void 0 ? void 0 : nextProps.className) }, trackingCommonInline, { "data-event-action": "Answer Click", "data-response-id": (actionSubmitMultiple === null || actionSubmitMultiple === void 0 ? void 0 : actionSubmitMultiple.id) ||
7160
+ (actionNextChoice === null || actionNextChoice === void 0 ? void 0 : actionNextChoice.id) ||
7161
+ ((_c = nodeMessage === null || nodeMessage === void 0 ? void 0 : nodeMessage._message) === null || _c === void 0 ? void 0 : _c.action_id) }),
7162
+ !nextText
7163
+ ? f({
7164
+ id: 'riskScreener.next',
7165
+ defaultMessage: 'Next',
7166
+ })
7167
+ : nextText,
7168
+ React__default.createElement(ArrowRight, { style: { marginLeft: 10 } })))));
7169
+ };
7170
+ var SubotInlineFooter$1 = memo(SubotInlineFooter);
7171
+
7172
+ const SubotInlineHeadline = styled.h4 `
7173
+ padding: 32px 0px 12px;
7174
+ border-bottom: 1px solid ${theme.colors.neutral100 || '#E4E8EC'};
7175
+ margin: 0px 32px;
7176
+ color: ${theme.colors.gray500 || '#737373'};
7177
+ font-size: 14px;
7178
+ font-weight: 700;
7179
+ line-height: 1.5;
7180
+ ${MediaQueries.tdDown} {
7181
+ padding: 24px 0px 12px;
7182
+ margin: 0px 24px;
7183
+ }
7184
+ ${MediaQueries.mbDown} {
7185
+ padding: 16px 0px 12px;
7186
+ margin: 0px 16px;
7187
+ }
7188
+ `;
7189
+ const SubotInlineHeader = () => {
7190
+ const { formatMessage: f } = useContext(TogetherComponentGlobalContext);
7191
+ const { nodes } = useContext(SubotInlineContext);
7192
+ const headline = useMemo(() => { var _a; return (_a = nodes[0]) === null || _a === void 0 ? void 0 : _a.inline_headline; }, [nodes]);
7193
+ return (React__default.createElement(SubotInlineHeadline, null, headline ||
7194
+ f({
7195
+ id: 'subotInline.quote',
7196
+ defaultMessage: 'HAVE TIME FOR A QUICK QUESTION?',
7197
+ })));
7198
+ };
7199
+ var SubotInlineHeader$1 = memo(SubotInlineHeader);
7200
+
7201
+ const SubotInlineIntentTitle = styled.h3 `
7202
+ margin-bottom: 0px;
7203
+ font-size: 22px;
7204
+ font-weight: bold;
7205
+ line-height: 1.45;
7206
+ ${MediaQueries.tdDown} {
7207
+ font-size: 20px;
7208
+ }
7209
+ `;
7210
+ const SubotInlineRecalculateButton = styled(Button$1) `
7211
+ &.bot-recalculate {
7212
+ svg {
7213
+ path {
7214
+ stroke: ${theme.colors.primaryBase || '#2685F1'} !important;
7215
+ }
7216
+ }
7217
+ &:hover {
7218
+ svg {
7219
+ path {
7220
+ stroke: #fff !important;
7221
+ }
7222
+ }
7223
+ }
7224
+ }
7225
+ `;
7226
+ const SubotInlineIntentButton = styled(Button$1) `
7227
+ border: 2px solid transparent;
7228
+ `;
7229
+ const SubotInlineItemIcon = styled.div `
7230
+ display: flex;
7231
+ padding-top: 10px;
7232
+ padding-bottom: 10px;
7233
+ .icon {
7234
+ width: 64px;
7235
+ height: 64px;
7236
+ margin-right: 16px;
7237
+ object-fit: contain;
7238
+ object-position: center;
7239
+ }
7240
+ .content {
7241
+ flex: 1;
7242
+ .title {
7243
+ margin-top: 0;
7244
+ margin-bottom: 0;
7245
+ font-size: inherit;
7246
+ font-weight: 700;
7247
+ line-height: 1.4;
7248
+ }
7249
+ .description {
7250
+ color: ${theme.colors.gray700 || '#404040'};
7251
+ line-height: 1.4;
7252
+ }
7253
+ }
7254
+ ${MediaQueries.mbDown} {
7255
+ .icon {
7256
+ width: 47px;
7257
+ height: 47px;
7258
+ margin-right: 16px;
7259
+ }
7260
+ .content {
7261
+ .title {
7262
+ font-size: 14px;
7263
+ }
7264
+ .description {
7265
+ font-size: 14px;
7266
+ }
7267
+ }
7268
+ }
7269
+ `;
7270
+ styled(Button$1) ``;
7271
+ const SubotInlineIntentFirstTextWrapper = styled.div `
7272
+ display: flex;
7273
+ align-items: flex-start;
7274
+ color: ${theme.colors.gray800 || '#262626'};
7275
+ font-size: 22px;
7276
+ font-weight: 700;
7277
+ letter-space: -0.6px;
7278
+ line-height: 1.45;
7279
+ .number {
7280
+ margin-right: 3px;
7281
+ }
7282
+ .title {
7283
+ flex: 1;
7284
+ }
7285
+ ${MediaQueries.tdDown} {
7286
+ font-size: 20px;
7287
+ }
7288
+ ${MediaQueries.mbDown} {
7289
+ font-size: 18px;
7290
+ }
7291
+ `;
7292
+ const SubotInlineIntentFirstImageWrapper = styled.div `
7293
+ display: flex;
7294
+ justify-content: center;
7295
+ `;
7296
+ const SubotInlineIntentFirstTextContainer = styled.div ``;
7297
+ const SubotInlineIntentTextContainer = styled.div `
7298
+ padding: 12px 16px;
7299
+ border: 1px solid ${theme.colors.gray200 || '#D9D9D9'};
7300
+ background-color: ${theme.colors.white || '#fff'};
7301
+ border-radius: ${theme.borderRadius};
7302
+ line-height: 1.5;
7303
+ `;
7304
+ const SubotInlineIntentImageContainer = styled.div `
7305
+ border: ${theme.colors.gray200 || '#D9D9D9'};
7306
+ background-color: ${theme.colors.white || '#FFF'};
7307
+ border-radius: ${theme.borderRadius};
7308
+ .intent-img {
7309
+ border-radius: ${theme.borderRadius};
7310
+ &.has-label {
7311
+ border-bottom-left-radius: 0px;
7312
+ border-bottom-right-radius: 0px;
7313
+ }
7314
+ }
7315
+ .intent-img-label {
7316
+ padding: 5px 10px;
7317
+ font-size: 0.8em;
7318
+ font-style: italic;
7319
+ font-weight: 400;
7320
+ }
7321
+ `;
7322
+ const SubotInlineIntentUrlContainer = styled.div `
7323
+ display: flex;
7324
+ .feature {
7325
+ width: 30%;
7326
+ .feature-wrapper {
7327
+ position: relative;
7328
+ display: block;
7329
+ overflow: hidden;
7330
+ width: 100%;
7331
+ padding-top: 66%;
7332
+ border-radius: ${theme.borderRadius};
7333
+ .feature-img {
7334
+ position: absolute;
7335
+ top: 50%;
7336
+ left: 50%;
7337
+ width: 100%;
7338
+ min-width: 100%;
7339
+ height: auto;
7340
+ min-height: 100%;
7341
+ transform: translate(-50%, -50%);
7342
+ }
7343
+ }
7344
+ }
7345
+ .body {
7346
+ flex: 1;
7347
+ margin-left: 10px;
7348
+ line-height: 1.5;
7349
+ a {
7350
+ color: ${theme.colors.gray800 || '#262626'};
7351
+ text-decoration: none;
7352
+ }
7353
+ }
7354
+ `;
7355
+ const SubotInlineIntentRiskScreenerContainer = styled.div `
7356
+ display: flex;
7357
+ align-items: center;
7358
+ justify-content: space-between;
7359
+ padding: 20px 40px 20px 16px;
7360
+ background-color: #fff;
7361
+ border-radius: ${theme.borderRadius};
7362
+ box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.04), 0px 0px 2px rgba(0, 0, 0, 0.06),
7363
+ 0px 0px 1px rgba(0, 0, 0, 0.04);
7364
+ .feature {
7365
+ display: block;
7366
+ overflow: hidden;
7367
+ width: 72px;
7368
+ height: 72px;
7369
+ margin-right: 16px;
7370
+ border-radius: ${theme.borderRadius};
7371
+ img {
7372
+ width: 100%;
7373
+ height: 100%;
7374
+ object-fit: cover;
7375
+ object-position: center;
7376
+ }
7377
+ }
7378
+ .title-container {
7379
+ display: flex;
7380
+ flex: 1;
7381
+ align-items: center;
7382
+ justify-content: space-between;
7383
+ a {
7384
+ font-size: 16px;
7385
+ line-height: 1.5em;
7386
+ text-decoration: none;
7387
+ .title {
7388
+ padding: 0;
7389
+ color: #262626;
7390
+ font-size: inherit;
7391
+ line-height: inherit;
7392
+ }
7393
+ &.link {
7394
+ display: flex;
7395
+ align-items: center;
7396
+ justify-content: center;
7397
+ margin-left: 20px;
7398
+ color: #2d87f3;
7399
+ font-weight: 700;
7400
+ }
7401
+ }
7402
+ }
7403
+ @media screen and (max-width: 769px) {
7404
+ padding: 16px 12px;
7405
+ .feature {
7406
+ width: 50px;
7407
+ height: 50px;
7408
+ }
7409
+ .title-container {
7410
+ a {
7411
+ font-size: 13px;
7412
+ line-height: 20px;
7413
+ &.link {
7414
+ margin-left: 10px;
7415
+ }
7416
+ }
7417
+ }
7418
+ }
7419
+ `;
7420
+ const SubotInlineIntentFinalButtonContainer = styled.div `
7421
+ display: flex;
7422
+ align-items: center;
7423
+ justify-content: center;
7424
+ `;
7425
+ styled.div `
7426
+ padding: 16px;
7427
+ margin-top: 32px;
7428
+ margin-bottom: 32px;
7429
+ background-color: ${theme.colors.primary50 || ''};
7430
+ border-radius: ${theme.borderRadius};
7431
+ .item-grid {
7432
+ > div {
7433
+ box-shadow: none;
7434
+ }
7435
+ }
7436
+ .lp--affiliate-product {
7437
+ .arrow-left {
7438
+ left: -20px;
7439
+ }
7440
+ .arrow-right {
7441
+ right: -16px;
7442
+ }
7443
+ }
7444
+ .bullet-nav {
7445
+ bottom: -10px;
7446
+ }
7447
+ `;
7448
+ const SubotInlineIntentFinalCol = styled.div `
7449
+ width: ${({ width }) => width || '100%'};
7450
+ padding: 8px;
7451
+ ${MediaQueries.mbDown} {
7452
+ width: 100%;
7453
+ }
7454
+ `;
7455
+ const SubotInlineIntentFinalRow = styled.div `
7456
+ display: flex;
7457
+ flex-wrap: wrap;
7458
+ align-items: flex-start;
7459
+ justify-content: center;
7460
+ margin: 0 -8px;
7461
+ `;
7462
+ const SubotInlineIntentCol = styled.div `
7463
+ width: ${({ width }) => width || '100%'};
7464
+ padding: 4px;
7465
+ ${MediaQueries.mbDown} {
7466
+ width: 100%;
7467
+ }
7468
+ `;
7469
+ const SubotInlineIntentRow = styled.div `
7470
+ display: flex;
7471
+ flex-wrap: wrap;
7472
+ align-items: flex-start;
7473
+ justify-content: center;
7474
+ margin: 0 -4px;
7475
+ `;
7476
+ const SubotInlineIntentList = styled.div `
7477
+ margin-top: 20px;
7478
+ `;
7479
+
7480
+ const SubotInlineIntent = ({ intents, indexNumber, }) => {
7481
+ var _a, _b;
7482
+ const title = useMemo(() => {
7483
+ const _title = intents && intents[0];
7484
+ if (_title)
7485
+ return _title;
7486
+ return null;
7487
+ }, []);
7488
+ if (!intents.length)
7489
+ return React__default.createElement(SubotInlineIntentBotTitle, { indexNumber: indexNumber });
7490
+ return (React__default.createElement(React__default.Fragment, null,
7491
+ title && (React__default.createElement(SubotInlineIntentBotTitle, { intent: title, indexNumber: indexNumber })),
7492
+ !!((_a = intents.slice(1)) === null || _a === void 0 ? void 0 : _a.length) && (React__default.createElement(SubotInlineIntentList, null,
7493
+ React__default.createElement(SubotInlineIntentRow, null, (_b = intents.slice(1)) === null || _b === void 0 ? void 0 : _b.map((intent) => {
7494
+ const NodeIntent = SubotInlineIntentBase[intent === null || intent === void 0 ? void 0 : intent.type];
7495
+ return (NodeIntent && React__default.createElement(NodeIntent, { key: intent.id, intent: intent }));
7496
+ }))))));
7497
+ };
7498
+
7499
+ const SubotInlineIntentFinal = ({ intents: intentsProps, }) => {
7500
+ const intents = useMemo(() => {
7501
+ const mainIntents = [];
7502
+ const subIntents = [];
7503
+ const rest = [];
7504
+ intentsProps === null || intentsProps === void 0 ? void 0 : intentsProps.map((intent) => {
7505
+ switch (intent === null || intent === void 0 ? void 0 : intent.type) {
7506
+ case NodeIntentType.BOT_MAIN_IMAGE:
7507
+ mainIntents.push(intent);
7508
+ break;
7509
+ case NodeIntentType.BOT_MAIN_TITLE:
7510
+ mainIntents.push(intent);
7511
+ break;
7512
+ case NodeIntentType.BOT_MAIN_BODY:
7513
+ mainIntents.push(intent);
7514
+ break;
7515
+ case NodeIntentType.BOT_MAIN_BUTTON:
7516
+ mainIntents.push(intent);
7517
+ break;
7518
+ case NodeIntentType.BOT_RECALCULATE:
7519
+ mainIntents.push(intent);
7520
+ break;
7521
+ case NodeIntentType.BOT_SUB_TITLE:
7522
+ subIntents.push(intent);
7523
+ break;
7524
+ case NodeIntentType.BOT_SUB_BODY:
7525
+ subIntents.push(intent);
7526
+ break;
7527
+ default:
7528
+ rest.push(intent);
7529
+ break;
7530
+ }
7531
+ });
7532
+ return {
7533
+ mainIntents,
7534
+ subIntents,
7535
+ intents: rest,
7536
+ };
7537
+ }, []);
7538
+ if (!(intentsProps === null || intentsProps === void 0 ? void 0 : intentsProps.length)) {
7539
+ return null;
7540
+ }
7541
+ function renderIntent(intent) {
7542
+ const NodeIntent = SubotInlineIntentBase[intent === null || intent === void 0 ? void 0 : intent.type];
7543
+ if (!NodeIntent) {
7544
+ return null;
7545
+ }
7546
+ return React__default.createElement(NodeIntent, { key: intent.id, intent: intent });
7547
+ }
7548
+ return (React__default.createElement(SubotInlineIntentRow, null,
7549
+ React__default.createElement(SubotInlineIntentCol, null,
7550
+ React__default.createElement(SubotInlineIntentFinalRow, null,
7551
+ intents.mainIntents.map(renderIntent),
7552
+ intents.subIntents.map(renderIntent),
7553
+ intents.intents.map(renderIntent)))));
7554
+ };
7555
+
7556
+ /*******************************************************************************/
7557
+ /*************************** NodeIntentType: 'bot-text' ************************/
7558
+ //#region
7559
+ const SubotInlineIntentBotText = ({ intent, }) => {
7560
+ if (!(intent === null || intent === void 0 ? void 0 : intent.label))
7561
+ return React__default.createElement(React__default.Fragment, null);
7562
+ return (React__default.createElement(SubotInlineIntentCol, null,
7563
+ React__default.createElement(SubotInlineIntentTextContainer, null,
7564
+ React__default.createElement(Markdown, null, intent === null || intent === void 0 ? void 0 : intent.label))));
7565
+ };
7566
+ //#endregion
7567
+ /*************************** END - NodeIntentType: 'bot-text' ******************/
7568
+ /*******************************************************************************/
7569
+ /*******************************************************************************/
7570
+ /*************************** NodeIntentType: 'bot-image' ***********************/
7571
+ //#region
7572
+ const SubotInlineIntentBotImage = ({ intent, }) => {
7573
+ if (!intent.url)
7574
+ return React__default.createElement(React__default.Fragment, null);
7575
+ const isObject = (() => {
7576
+ try {
7577
+ return Boolean(JSON.parse((intent === null || intent === void 0 ? void 0 : intent.label) || ''));
7578
+ }
7579
+ catch (err) {
7580
+ return false;
7581
+ }
7582
+ })();
7583
+ return (React__default.createElement(SubotInlineIntentCol, { width: "50%" },
7584
+ React__default.createElement(SubotInlineIntentImageContainer, null,
7585
+ React__default.createElement("img", { loading: "lazy", src: intent.url, alt: intent.label, className: `intent-img ${intent.label && 'has-label'}` }),
7586
+ isObject && (React__default.createElement("h4", { className: "intent-img-label" },
7587
+ React__default.createElement(Markdown, null, intent.label))))));
7588
+ };
7589
+ //#endregion
7590
+ /*************************** END - NodeIntentType: 'bot-image' *****************/
7591
+ /*******************************************************************************/
7592
+ /*******************************************************************************/
7593
+ /*************************** NodeIntentType: 'bot-button' **********************/
7594
+ //#region
7595
+ const SubotInlineIntentBotButton = ({ intent, }) => {
7596
+ const { trackingCommonInline } = useContext(SubotInlineContext);
7597
+ const handleOnClick = () => {
7598
+ window.location.href = intent.url;
7599
+ };
7600
+ if (!(intent === null || intent === void 0 ? void 0 : intent.label))
7601
+ return React__default.createElement(React__default.Fragment, null);
7602
+ return (React__default.createElement(SubotInlineIntentCol, { width: "60%" },
7603
+ React__default.createElement(SubotInlineIntentButton, Object.assign({ size: "lg", color: "primary", onClick: handleOnClick, isBlock: true }, trackingCommonInline, { "data-event-action": "Click CTA", "data-response-id": intent.id }),
7604
+ React__default.createElement(Markdown, null, intent === null || intent === void 0 ? void 0 : intent.label))));
7605
+ };
7606
+ //#endregion
7607
+ /*************************** END - NodeIntentType: 'bot-button' ****************/
7608
+ /*******************************************************************************/
7609
+ /*******************************************************************************/
7610
+ /*************************** NodeIntentType: 'bot-url' *************************/
7611
+ //#region
7612
+ const SubotInlineIntentUrl = ({ intent, }) => {
7613
+ const article = useMemo(() => intent.label.includes('{')
7614
+ ? JSON.parse(intent.label)
7615
+ : {}, [intent.label]);
7616
+ return (React__default.createElement(React__default.Fragment, null, !!Object.keys(article).length && (React__default.createElement(SubotInlineIntentCol, null,
7617
+ React__default.createElement(SubotInlineIntentUrlContainer, null,
7618
+ React__default.createElement("div", { className: "feature" },
7619
+ React__default.createElement("a", { href: article === null || article === void 0 ? void 0 : article.url, className: "feature-wrapper" },
7620
+ React__default.createElement("img", { loading: "lazy", src: article === null || article === void 0 ? void 0 : article.thumbnail, alt: article === null || article === void 0 ? void 0 : article.title, className: "feature-img" }))),
7621
+ React__default.createElement("div", { className: "body" },
7622
+ React__default.createElement("a", { href: article === null || article === void 0 ? void 0 : article.url },
7623
+ React__default.createElement("h5", { className: "title" },
7624
+ React__default.createElement(Markdown, null, article === null || article === void 0 ? void 0 : article.title)))))))));
7625
+ };
7626
+ //#endregion
7627
+ /*************************** END - NodeIntentType: 'bot-url' *******************/
7628
+ /*******************************************************************************/
7629
+ /*******************************************************************************/
7630
+ /*************************** NodeIntentType: 'sso-intent' *************************/
7631
+ //#region
7632
+ const SubotInlineIntentSSO = ({ intent, }) => {
7633
+ const info = (() => {
7634
+ try {
7635
+ return (intent === null || intent === void 0 ? void 0 : intent.label) ? JSON.parse(intent === null || intent === void 0 ? void 0 : intent.label) : {};
7636
+ }
7637
+ catch (err) {
7638
+ return {};
7639
+ }
7640
+ })();
7641
+ if (!info || !info.title)
7642
+ return React__default.createElement(React__default.Fragment, null);
7643
+ return (React__default.createElement(SubotInlineIntentCol, null,
7644
+ React__default.createElement(SubotInlineItemIcon, null,
7645
+ React__default.createElement("img", { loading: "lazy", src: intent === null || intent === void 0 ? void 0 : intent.url, className: "icon", alt: "" }),
7646
+ React__default.createElement("div", { className: "content" },
7647
+ React__default.createElement("h3", { className: "title" }, info.title),
7648
+ React__default.createElement("div", { className: "description" }, info === null || info === void 0 ? void 0 : info.description)))));
7649
+ };
7650
+ //#endregion
7651
+ /*************************** END - NodeIntentType: 'sso-intent' *******************/
7652
+ /*******************************************************************************/
7653
+ /*******************************************************************************/
7654
+ /*************************** NodeIntentType: 'bot-title' ***********************/
7655
+ //#region
7656
+ const SubotInlineIntentBotTitle = ({ intent, indexNumber, }) => {
7657
+ const isShowLabel = ![NodeIntentType.SSO_INTENT].includes(intent === null || intent === void 0 ? void 0 : intent.type);
7658
+ return (React__default.createElement(SubotInlineIntentFirstTextContainer, null,
7659
+ React__default.createElement(SubotInlineIntentFirstTextWrapper, null,
7660
+ indexNumber && (React__default.createElement("div", { className: "number" },
7661
+ indexNumber < 10 ? `0${indexNumber}` : indexNumber,
7662
+ ".")),
7663
+ isShowLabel &&
7664
+ intent &&
7665
+ [NodeIntentType.BOT_TEXT, NodeIntentType.BOT_BUTTON].includes(intent === null || intent === void 0 ? void 0 : intent.type) && React__default.createElement(Markdown, { className: "title" }, intent.label)),
7666
+ intent &&
7667
+ [NodeIntentType.BOT_IMAGE].includes(intent === null || intent === void 0 ? void 0 : intent.type) && (React__default.createElement(SubotInlineIntentFirstImageWrapper, null,
7668
+ React__default.createElement(SubotInlineIntentBotImage, { intent: intent })))));
7669
+ };
7670
+ //#endregion
7671
+ /*************************** END - NodeIntentType: 'bot-title' *****************/
7672
+ /*******************************************************************************/
7673
+ /*******************************************************************************/
7674
+ /*************************** NodeIntentType: 'bot-main-title' ******************/
7675
+ //#region
7676
+ const SubotInlineIntentBotMainTitle = ({ intent, }) => {
7677
+ if (!intent.label ||
7678
+ intent.label === 'Sub title' ||
7679
+ intent.label === 'Main title') {
7680
+ return null;
7681
+ }
7682
+ return (React__default.createElement(SubotInlineIntentFinalCol, null,
7683
+ React__default.createElement(SubotInlineIntentTitle, null,
7684
+ React__default.createElement(Markdown, null, intent.label))));
7685
+ };
7686
+ //#endregion
7687
+ /*************************** END - NodeIntentType: 'bot-main-title' ************/
7688
+ /*******************************************************************************/
7689
+ /*******************************************************************************/
7690
+ /*************************** NodeIntentType: 'bot-main-image' ******************/
7691
+ //#region
7692
+ const SubotInlineIntentBotMainImage = ({ intent, }) => {
7693
+ if (!intent.url)
7694
+ return React__default.createElement(React__default.Fragment, null);
7695
+ return (React__default.createElement(SubotInlineIntentFinalCol, null,
7696
+ React__default.createElement(SubotInlineIntentImageContainer, null,
7697
+ React__default.createElement("img", { loading: "lazy", src: intent.url, alt: intent.label, className: `intent-img ${intent.label && 'has-label'}` }),
7698
+ intent.label && (React__default.createElement("h4", { className: "intent-img-label" },
7699
+ React__default.createElement(Markdown, null, intent.label))))));
7700
+ };
7701
+ //#endregion
7702
+ /*************************** END - NodeIntentType: 'bot-main-image' ************/
7703
+ /*******************************************************************************/
7704
+ /*******************************************************************************/
7705
+ /*************************** NodeIntentType: 'bot-main-body' ******************/
7706
+ //#region
7707
+ const SubotInlineIntentBotMainBody = ({ intent, }) => {
7708
+ if (!intent.label ||
7709
+ intent.label === 'Main body' ||
7710
+ intent.label === 'Sub body') {
7711
+ return null;
7712
+ }
7713
+ return (React__default.createElement(SubotInlineIntentFinalCol, null,
7714
+ React__default.createElement("div", { className: "intents__item markdown" },
7715
+ React__default.createElement(Markdown, null, intent.label))));
7716
+ };
7717
+ //#endregion
7718
+ /*************************** END - NodeIntentType: 'bot-main-body' ************/
7719
+ /*******************************************************************************/
7720
+ /*******************************************************************************/
7721
+ /*************************** NodeIntentType: 'bot-main-button' *****************/
7722
+ //#region
7723
+ const SubotInlineIntentBotMainButton = ({ intent, }) => {
7724
+ const { trackingCommonInline } = useContext(SubotInlineContext);
7725
+ const handleOnClick = () => {
7726
+ window.location.href = intent.url;
7727
+ };
7728
+ if (!intent.label)
7729
+ return React__default.createElement(React__default.Fragment, null);
7730
+ return (React__default.createElement(SubotInlineIntentCol, { width: "auto" },
7731
+ React__default.createElement(SubotInlineIntentFinalButtonContainer, null,
7732
+ React__default.createElement(SubotInlineIntentButton, Object.assign({ size: "lg", color: "primary", onClick: handleOnClick, className: "pointer-event-child-none" }, trackingCommonInline, { "data-event-action": "Click CTA", "data-response-id": intent.id }),
7733
+ React__default.createElement(Markdown, null, intent === null || intent === void 0 ? void 0 : intent.label)))));
7734
+ };
7735
+ //#endregion
7736
+ /*************************** END - NodeIntentType: 'bot-main-button' ***********/
7737
+ /*******************************************************************************/
7738
+ /*******************************************************************************/
7739
+ /*************************** NodeIntentType: 'bot-recalculate' *****************/
7740
+ //#region
7741
+ const SubotInlineIntentBotRecalculate = ({ intent }) => {
7742
+ const { onReset } = useContext(SubotInlineContext);
7743
+ const handleOnClick = () => {
7744
+ onReset && onReset();
7745
+ };
7746
+ if (!(intent === null || intent === void 0 ? void 0 : intent.label))
7747
+ return React__default.createElement(React__default.Fragment, null);
7748
+ return (React__default.createElement(SubotInlineIntentCol, { width: "auto", style: { justifyContent: 'center', display: 'flex' } },
7749
+ React__default.createElement(SubotInlineRecalculateButton, { size: "lg", color: "secondary", onClick: handleOnClick, icon: React__default.createElement(RotateLeft, null), className: "bot-recalculate" },
7750
+ React__default.createElement(Markdown, null, intent === null || intent === void 0 ? void 0 : intent.label))));
7751
+ };
7752
+ //#endregion
7753
+ /*************************** END - NodeIntentType: 'bot-recalculate' ***********/
7754
+ /*******************************************************************************/
7755
+ /*******************************************************************************/
7756
+ /*************************** NodeIntentType: 'bot-risk-screener' ***************/
7757
+ //#region
7758
+ const SubotInlineIntentBotRiskScreener = ({ intent }) => {
7759
+ const { formatMessage: f } = useContext(TogetherComponentGlobalContext);
7760
+ const article = useMemo(() => {
7761
+ if (intent.label && intent.label.includes('{')) {
7762
+ return JSON.parse(intent.label);
7763
+ }
7764
+ return {};
7765
+ }, [intent, intent === null || intent === void 0 ? void 0 : intent.label]);
7766
+ return (React__default.createElement(React__default.Fragment, null, !!(article === null || article === void 0 ? void 0 : article.title) && !!(article === null || article === void 0 ? void 0 : article.thumbnail) && !!(article === null || article === void 0 ? void 0 : article.url) && (React__default.createElement(SubotInlineIntentFinalCol, null,
7767
+ React__default.createElement(SubotInlineIntentRiskScreenerContainer, null,
7768
+ React__default.createElement("a", { href: article === null || article === void 0 ? void 0 : article.url, className: "feature" },
7769
+ React__default.createElement("img", { loading: "lazy", src: article === null || article === void 0 ? void 0 : article.thumbnail, alt: article === null || article === void 0 ? void 0 : article.title })),
7770
+ React__default.createElement("div", { className: "title-container" },
7771
+ React__default.createElement("a", { href: article === null || article === void 0 ? void 0 : article.url },
7772
+ React__default.createElement("h5", { className: "title" }, article === null || article === void 0 ? void 0 : article.title)),
7773
+ React__default.createElement("a", { href: article === null || article === void 0 ? void 0 : article.url, className: "link" },
7774
+ f({
7775
+ id: 'riskScreener.start',
7776
+ defaultMessage: 'Start',
7777
+ }),
7778
+ React__default.createElement(ChevronRightActive, { style: { marginLeft: 10 } }))))))));
7779
+ };
7780
+ //#endregion
7781
+ /*************************** END - NodeIntentType: 'bot-risk-screener' *********/
7782
+ /*******************************************************************************/
7783
+ /*******************************************************************************/
7784
+ /*************************** NodeIntentType: 'bot-related-article' *************/
7785
+ //#region
7786
+ const SubotInlineIntentBotRelatedArticle = ({ intent }) => {
7787
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
7788
+ const article = useMemo(() => {
7789
+ if (intent.label && intent.label.includes('{')) {
7790
+ const _article = JSON.parse(intent.label);
7791
+ if (_article.meta) {
7792
+ const tmp = {};
7793
+ _article.meta.map(({ key, value }) => {
7794
+ if (key && value)
7795
+ tmp[key] = value;
7796
+ });
7797
+ _article.meta = Object.assign({}, tmp);
7798
+ }
7799
+ return Object.assign({}, _article);
7800
+ }
7801
+ return {};
7802
+ }, [intent, intent === null || intent === void 0 ? void 0 : intent.label]);
7803
+ return (React__default.createElement(React__default.Fragment, null, !!(article === null || article === void 0 ? void 0 : article.title) &&
7804
+ !!(article === null || article === void 0 ? void 0 : article.thumbnail) &&
7805
+ !!(article === null || article === void 0 ? void 0 : article.url) &&
7806
+ !!(article === null || article === void 0 ? void 0 : article.meta) &&
7807
+ !!((_a = article === null || article === void 0 ? void 0 : article.meta) === null || _a === void 0 ? void 0 : _a.post_modified) &&
7808
+ !!((_b = article === null || article === void 0 ? void 0 : article.meta) === null || _b === void 0 ? void 0 : _b.reviewed_display_name) &&
7809
+ !!((_c = article === null || article === void 0 ? void 0 : article.meta) === null || _c === void 0 ? void 0 : _c.reviewed_url) &&
7810
+ !!((_d = article === null || article === void 0 ? void 0 : article.meta) === null || _d === void 0 ? void 0 : _d.reviewed_avatar_thumbnail) &&
7811
+ !!((_e = article === null || article === void 0 ? void 0 : article.meta) === null || _e === void 0 ? void 0 : _e.category_url) &&
7812
+ !!((_f = article === null || article === void 0 ? void 0 : article.meta) === null || _f === void 0 ? void 0 : _f.category_name) && (React__default.createElement(SubotInlineIntentFinalCol, { width: "40%" },
7813
+ React__default.createElement(ArticleCard, { title: article === null || article === void 0 ? void 0 : article.title, uploadTime: dayjs((_g = article === null || article === void 0 ? void 0 : article.meta) === null || _g === void 0 ? void 0 : _g.post_modified).format('DD/MM/YYYY'), authorName: (_h = article === null || article === void 0 ? void 0 : article.meta) === null || _h === void 0 ? void 0 : _h.reviewed_display_name, authorLink: (_j = article === null || article === void 0 ? void 0 : article.meta) === null || _j === void 0 ? void 0 : _j.reviewed_url, avatarImg: React__default.createElement("img", { loading: "lazy", src: (_k = article === null || article === void 0 ? void 0 : article.meta) === null || _k === void 0 ? void 0 : _k.reviewed_avatar_thumbnail, alt: (_l = article === null || article === void 0 ? void 0 : article.meta) === null || _l === void 0 ? void 0 : _l.reviewed_display_name }), categoryLink: (_m = article === null || article === void 0 ? void 0 : article.meta) === null || _m === void 0 ? void 0 : _m.category_url, categoryName: (_o = article === null || article === void 0 ? void 0 : article.meta) === null || _o === void 0 ? void 0 : _o.category_name, banner: React__default.createElement("img", { loading: "lazy", src: article === null || article === void 0 ? void 0 : article.thumbnail, alt: article === null || article === void 0 ? void 0 : article.title }), text: "", size: "sm", direction: "vertical" })))));
7814
+ };
7815
+ //#endregion
7816
+ /*************************** END - NodeIntentType: 'bot-related-article' *******/
7817
+ /*******************************************************************************/
7818
+ /*******************************************************************************/
7819
+ /*************************** NodeIntentType: 'thank-you-image' *****************/
7820
+ //#region
7821
+ const SubotInlineIntentThankYouImage = ({ intent, }) => {
7822
+ if (!intent.url)
7823
+ return React__default.createElement(React__default.Fragment, null);
7824
+ return (React__default.createElement(SubotInlineIntentFinalCol, null,
7825
+ React__default.createElement(SubotInlineIntentImageContainer, null,
7826
+ React__default.createElement("img", { loading: "lazy", src: intent.url, alt: intent.label, className: `intent-img ${intent.label && 'has-label'}` }),
7827
+ intent.label && (React__default.createElement("h4", { className: "intent-img-label" },
7828
+ React__default.createElement(Markdown, null, intent.label))))));
7829
+ };
7830
+ //#endregion
7831
+ /*************************** END - NodeIntentType: 'thank-you-image' ***********/
7832
+ /*******************************************************************************/
7833
+ /*******************************************************************************/
7834
+ /*************************** NodeIntentType: 'thank-you-title' *****************/
7835
+ //#region
7836
+ const SubotInlineIntentThankYouTitle = ({ intent, }) => {
7837
+ if (!intent.label)
7838
+ return React__default.createElement(React__default.Fragment, null);
7839
+ return (React__default.createElement(SubotInlineIntentFinalCol, null,
7840
+ React__default.createElement(SubotInlineIntentTitle, null,
7841
+ React__default.createElement(Markdown, null, intent.label))));
7842
+ };
7843
+ //#endregion
7844
+ /*************************** END - NodeIntentType: 'thank-you-title' ***********/
7845
+ /*******************************************************************************/
7846
+ /*******************************************************************************/
7847
+ /*************************** NodeIntentType: 'thank-you-body' ******************/
7848
+ //#region
7849
+ const SubotInlineIntentThankYouBody = ({ intent, }) => {
7850
+ if (!intent.label)
7851
+ return React__default.createElement(React__default.Fragment, null);
7852
+ return (React__default.createElement(SubotInlineIntentFinalCol, null,
7853
+ React__default.createElement("div", { className: "intents__item markdown" },
7854
+ React__default.createElement(Markdown, null, intent.label))));
7855
+ };
7856
+ //#endregion
7857
+ /*************************** END - NodeIntentType: 'thank-you-body' ************/
7858
+ /*******************************************************************************/
7859
+ const SubotInlineIntentBase = {
7860
+ [NodeIntentType.BOT_TEXT]: SubotInlineIntentBotText,
7861
+ [NodeIntentType.BOT_IMAGE]: SubotInlineIntentBotImage,
7862
+ [NodeIntentType.BOT_BUTTON]: SubotInlineIntentBotButton,
7863
+ [NodeIntentType.BOT_URL]: SubotInlineIntentUrl,
7864
+ [NodeIntentType.BOT_RECALCULATE]: SubotInlineIntentBotRecalculate,
7865
+ [NodeIntentType.BOT_MAIN_TITLE]: SubotInlineIntentBotMainTitle,
7866
+ [NodeIntentType.BOT_MAIN_IMAGE]: SubotInlineIntentBotMainImage,
7867
+ [NodeIntentType.BOT_MAIN_BODY]: SubotInlineIntentBotMainBody,
7868
+ [NodeIntentType.BOT_MAIN_BUTTON]: SubotInlineIntentBotMainButton,
7869
+ [NodeIntentType.BOT_SUB_TITLE]: SubotInlineIntentBotMainTitle,
7870
+ [NodeIntentType.BOT_SUB_BODY]: SubotInlineIntentBotMainBody,
7871
+ [NodeIntentType.BOT_LANDING_PAGE_URL]: SubotInlineIntentBotText,
7872
+ [NodeIntentType.BOT_LANDING_PAGE_BUTTON]: SubotInlineIntentBotText,
7873
+ [NodeIntentType.BOT_RISK_SCREEN]: SubotInlineIntentBotRiskScreener,
7874
+ [NodeIntentType.BOT_RELATED_ARTICLE]: SubotInlineIntentBotRelatedArticle,
7875
+ [NodeIntentType.THANK_YOU_IMAGE]: SubotInlineIntentThankYouImage,
7876
+ [NodeIntentType.THANK_YOU_TITLE]: SubotInlineIntentThankYouTitle,
7877
+ [NodeIntentType.THANK_YOU_BODY]: SubotInlineIntentThankYouBody,
7878
+ /** intents fake for sso block */
7879
+ [NodeIntentType.SSO_INTENT]: SubotInlineIntentSSO,
7880
+ };
7881
+
7882
+ /***************** type: TEXT, IMAGE ***************/
7883
+ const SubotInlineNode = ({ node, indexNumber, }) => {
7884
+ const { formatMessage: f, action: { pushNotifications }, } = useContext(TogetherComponentGlobalContext);
7885
+ const { params, onChange, onSubmit, onPrev, onNext, nodes, activeId } = useContext(SubotInlineContext);
7886
+ const [value, setValue] = useState((node === null || node === void 0 ? void 0 : node._message) || {});
7887
+ const handleOnChangeNormal = (action) => __awaiter(void 0, void 0, void 0, function* () {
7888
+ const _message = Object.assign(Object.assign(Object.assign(Object.assign({}, params), value), { action_id: action === null || action === void 0 ? void 0 : action.id, action_value: action === null || action === void 0 ? void 0 : action.key }), getCurrentTotalDynamicScore(nodes, activeId, action.id));
7889
+ delete _message.form_submit_meta;
7890
+ const res = yield subotInlineMessage(_message);
7891
+ if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
7892
+ const _a = res === null || res === void 0 ? void 0 : res._data, { node: _node } = _a, restData = __rest(_a, ["node"]);
7893
+ const _nextNode = Object.assign(Object.assign({}, _node), { _message: Object.assign(Object.assign({}, restData), { node_id: _node.id }) });
7894
+ delete _nextNode._message.form_submit_meta;
7895
+ onSubmit && onSubmit(_nextNode, _message);
7896
+ }
7897
+ });
7898
+ const handleOnChange = (action, formSubmitMeta) => __awaiter(void 0, void 0, void 0, function* () {
7899
+ if (!action)
7900
+ return;
7901
+ const actionWithOther = (action === null || action === void 0 ? void 0 : action.type) === NodeActionType.USER_CHOICE_TEXT_BY_INPUT ||
7902
+ (action === null || action === void 0 ? void 0 : action.type) === NodeActionType.POLL_CHOICE_TEXT_BY_INPUT;
7903
+ const newValue = Object.assign(Object.assign({}, value), { action_id: action === null || action === void 0 ? void 0 : action.id, action_value: action === null || action === void 0 ? void 0 : action.key, form_submit_meta: formSubmitMeta });
7904
+ if (actionWithOther) {
7905
+ setValue(newValue);
7906
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
7907
+ return;
7908
+ }
7909
+ delete newValue.form_submit_meta;
7910
+ setValue(newValue);
7911
+ handleOnChangeNormal(action);
7912
+ });
7913
+ const handleOnNext = () => {
7914
+ const newMessage = JSON.parse(JSON.stringify(Object.assign(Object.assign(Object.assign({}, params), node === null || node === void 0 ? void 0 : node._message), value)));
7915
+ if ((value === null || value === void 0 ? void 0 : value.action_id) &&
7916
+ (value === null || value === void 0 ? void 0 : value.action_value) === KEY_OF_TEXT_CHOICE_WITH_OTHER_FIELD) {
7917
+ onNext === null || onNext === void 0 ? void 0 : onNext(newMessage);
7918
+ return;
7919
+ }
7920
+ if (!(value === null || value === void 0 ? void 0 : value.action_id) || !(value === null || value === void 0 ? void 0 : value.action_value)) {
7921
+ pushNotifications({
7922
+ title: '',
7923
+ message: f({
7924
+ id: 'multiSelectError.required',
7925
+ defaultMessage: `There is no answer!`,
7926
+ }),
7927
+ type: 'warning', // "success" | "danger" | "info" | "warning"
7928
+ });
7929
+ }
7930
+ else {
7931
+ delete newMessage.form_submit_meta;
7932
+ onNext === null || onNext === void 0 ? void 0 : onNext(newMessage);
7933
+ }
7934
+ };
7935
+ return (React__default.createElement(SubotInlineContainer$1, null,
7936
+ React__default.createElement(SubotInlineHeader$1, null),
7937
+ React__default.createElement(SubotInlineWrapper$1, null,
7938
+ React__default.createElement(SubotInlineIntentContainer, null,
7939
+ React__default.createElement(SubotInlineIntent, { intents: (node === null || node === void 0 ? void 0 : node.intents) || [], indexNumber: indexNumber })),
7940
+ React__default.createElement(SubotInlineActionContainer, null,
7941
+ React__default.createElement(SubotInlineAction, { value: (value === null || value === void 0 ? void 0 : value.action_id) ? [value === null || value === void 0 ? void 0 : value.action_id] : [], actions: node === null || node === void 0 ? void 0 : node.actions, onChange: handleOnChange, formSubmitMeta: value === null || value === void 0 ? void 0 : value.form_submit_meta }))),
7942
+ React__default.createElement(SubotInlineFooter$1, { onBack: () => onPrev && onPrev(), backProps: { isDisabled: !!(indexNumber === 1) }, onNext: handleOnNext })));
7943
+ };
7944
+
7945
+ const SubotInlineNodeFinal = ({ node, }) => {
7946
+ var _a, _b;
7947
+ const fixHeight = 350;
7948
+ const { nodes } = useContext(SubotInlineContext);
7949
+ const { formatMessage: f } = useContext(TogetherComponentGlobalContext);
7950
+ const flag = useRef(null);
7951
+ const wrapper = useRef(null);
7952
+ const [height, setHeight] = useState(fixHeight);
7953
+ const [showMore, setShowMore] = useState(true);
7954
+ const [isMore, setIsMore] = useState(false);
7955
+ const handleOnClick = useCallback(() => {
7956
+ fastdom.measure(() => {
7957
+ var _a;
7958
+ if (wrapper.current) {
7959
+ const wrapperHeight = (_a = wrapper.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().height;
7960
+ if (height && height < wrapperHeight) {
7961
+ setHeight(wrapperHeight);
7962
+ setIsMore(true);
7963
+ }
7964
+ else {
7965
+ setHeight(fixHeight);
7966
+ setIsMore(false);
7967
+ }
7968
+ flag.current &&
7969
+ flag.current.scrollIntoView({
7970
+ behavior: 'smooth',
7971
+ block: 'start',
7972
+ inline: 'start',
7973
+ });
7974
+ }
7975
+ });
7976
+ }, [height]);
7977
+ useLayoutEffect(() => {
7978
+ fastdom.measure(() => {
7979
+ if (wrapper.current) {
7980
+ setTimeout(() => {
7981
+ var _a;
7982
+ const wrapperHeight = (_a = wrapper.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().height;
7983
+ if (wrapperHeight && height > wrapperHeight) {
7984
+ setShowMore(false);
7985
+ setIsMore(false);
7986
+ }
7987
+ }, 400);
7988
+ }
7989
+ });
7990
+ }, []);
7991
+ const botItem = nodes[0];
7992
+ const botType = (_a = botItem === null || botItem === void 0 ? void 0 : botItem.extra_settings) === null || _a === void 0 ? void 0 : _a.subot_type;
7993
+ const suggestedServiceIntents = useMemo(() => {
7994
+ var _a;
7995
+ return (((_a = node === null || node === void 0 ? void 0 : node.intents) === null || _a === void 0 ? void 0 : _a.filter((i) => i.type === NodeIntentType.BOT_SUGGESTED_SERVICE)) || []);
7996
+ }, []);
7997
+ return (React__default.createElement(SubotInlineFinalContainer, null,
7998
+ React__default.createElement("div", { ref: flag, className: "hhg-flag", style: {
7999
+ position: 'absolute',
8000
+ top: -100,
8001
+ left: 0,
8002
+ pointerEvents: 'none',
8003
+ } }),
8004
+ React__default.createElement(SubotInlineFinalWrapper, { maxHeight: height, isMore: isMore },
8005
+ React__default.createElement("div", { ref: wrapper },
8006
+ React__default.createElement(SubotInlineIntentFinal, { intents: (node === null || node === void 0 ? void 0 : node.intents) || [] }),
8007
+ suggestedServiceIntents.length > 0 && (React__default.createElement("div", null, suggestedServiceIntents.map((intent) => {
8008
+ const NodeIntent = SubotInlineIntentBase$1[intent.type || ''];
8009
+ return (NodeIntent && React__default.createElement(NodeIntent, { key: intent.id, intent: intent }));
8010
+ }))))),
8011
+ showMore && (React__default.createElement(SubotInlineFinalMoreContainer, null,
8012
+ React__default.createElement(SubotInlineFinalButton, { size: "md", color: "secondary", onClick: handleOnClick }, !isMore ? (React__default.createElement(React__default.Fragment, null,
8013
+ f({ id: 'subotInline.showMore', defaultMessage: 'Show more' }),
8014
+ React__default.createElement(ArrowDown, { style: { marginLeft: 10 } }))) : (React__default.createElement(React__default.Fragment, null,
8015
+ f({ id: 'subotInline.showLess', defaultMessage: 'Show less' }),
8016
+ React__default.createElement(ArrowUp, { style: { marginLeft: 10 } })))))),
8017
+ botType === SubotType.voucherAcuvue && (React__default.createElement(SubotInlineVoucherLeftUI, { clientId: (_b = botItem.extra_settings) === null || _b === void 0 ? void 0 : _b.client_id, voucherAnswers: extractVoucherAnswers(nodes, botItem) }))));
8018
+ };
8019
+
8020
+ const SubotInlineResultButton = styled.span `
8021
+ display: inline-block;
8022
+ margin-top: 20px;
8023
+ color: ${theme.colors.primaryBase || '#2D87F3'};
8024
+ cursor: pointer;
8025
+ transition: 0.3 all ease;
8026
+ &:hover {
8027
+ color: ${theme.colors.primaryHover || '#2D87F3'};
8028
+ }
8029
+ ${MediaQueries.tdDown} {
8030
+ margin-top: 16px;
8031
+ }
8032
+ ${MediaQueries.mbDown} {
8033
+ margin-top: 12px;
8034
+ }
8035
+ `;
8036
+ const SubotInlineWrapper = styled.div `
8037
+ max-width: 430px;
8038
+ margin-right: auto;
8039
+ margin-left: auto;
8040
+ `;
8041
+ const SubotInlineContainer = styled.div `
8042
+ padding: 44px 16px 32px;
8043
+ background-color: ${theme.colors.neutral50 || '#F7F9FC'};
8044
+ border-radius: ${theme.borderRadius};
8045
+ position: relative;
8046
+ text-align: center;
8047
+ ${MediaQueries.tdDown} {
8048
+ padding: 36px 16px 24px;
8049
+ }
8050
+ ${MediaQueries.mbDown} {
8051
+ padding: 16px;
8052
+ border-radius: 0px;
8053
+ }
8054
+ `;
8055
+ const SubotInlineNodeFinalThankYou = ({ node, }) => {
8056
+ var _a;
8057
+ const { params, onNext } = useContext(SubotInlineContext);
8058
+ const resultButton = useMemo(() => {
8059
+ var _a;
8060
+ const _resultButton = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type === NodeActionType.RESULT_BUTTON);
8061
+ if (_resultButton)
8062
+ return _resultButton;
8063
+ return null;
8064
+ }, [node === null || node === void 0 ? void 0 : node.actions]);
8065
+ const handleOnNext = useCallback(() => {
8066
+ onNext &&
8067
+ onNext(Object.assign(Object.assign(Object.assign({}, params), node === null || node === void 0 ? void 0 : node._message), { action_id: resultButton === null || resultButton === void 0 ? void 0 : resultButton.id, action_value: resultButton === null || resultButton === void 0 ? void 0 : resultButton.key }));
8068
+ }, [resultButton]);
8069
+ return (React__default.createElement(SubotInlineContainer, null,
8070
+ React__default.createElement(SubotInlineWrapper, null, (_a = node === null || node === void 0 ? void 0 : node.intents) === null || _a === void 0 ? void 0 :
8071
+ _a.map((intent) => {
8072
+ const NodeIntent = SubotInlineIntentBase[intent === null || intent === void 0 ? void 0 : intent.type];
8073
+ return NodeIntent && React__default.createElement(NodeIntent, { key: intent.id, intent: intent });
8074
+ }),
8075
+ resultButton && (React__default.createElement(SubotInlineResultButton, { onClick: handleOnNext }, resultButton === null || resultButton === void 0 ? void 0 : resultButton.label)))));
8076
+ };
8077
+
8078
+ const SubotInlineNodeForm = ({ node, indexNumber, }) => {
8079
+ var _a;
8080
+ const { data: { locale }, } = useContext(TogetherComponentGlobalContext);
8081
+ const { params, onPrev, onSubmit, trackingCommonInline, nodes, activeId } = useContext(SubotInlineContext);
8082
+ const handleSubmit = (data) => __awaiter(void 0, void 0, void 0, function* () {
8083
+ const res = yield subotInlineMessage(Object.assign(Object.assign(Object.assign(Object.assign({}, params), node._message), data), getCurrentTotalDynamicScore(nodes, activeId, data.action_id, data.form_submit_meta)));
8084
+ if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
8085
+ const _b = res === null || res === void 0 ? void 0 : res._data, { node: _node } = _b, restData = __rest(_b, ["node"]);
8086
+ const _nextNode = Object.assign(Object.assign({}, _node), { _message: Object.assign(Object.assign({}, restData), { node_id: _node.id }) });
8087
+ onSubmit && onSubmit(_nextNode, Object.assign(Object.assign({}, node._message), data));
8088
+ }
8089
+ });
8090
+ return (React__default.createElement(SubotInlineContainer$1, null,
8091
+ React__default.createElement(SubotInlineHeader$1, null),
8092
+ React__default.createElement(SubotInlineWrapper$1, null,
8093
+ React__default.createElement(SubotInlineIntentContainer, null,
8094
+ React__default.createElement(SubotInlineIntent, { intents: (node === null || node === void 0 ? void 0 : node.intents) || [], indexNumber: indexNumber })),
8095
+ React__default.createElement(SubotInlineFormContainer, null,
8096
+ React__default.createElement(UserInfoForm, { botId: params.bot_id, nodeId: String(node === null || node === void 0 ? void 0 : node.id), className: "form", actions: (node === null || node === void 0 ? void 0 : node.actions) || [], formSubmitMeta: ((_a = node === null || node === void 0 ? void 0 : node._message) === null || _a === void 0 ? void 0 : _a.form_submit_meta) || null, callBack: handleSubmit, countryCode: (locale === null || locale === void 0 ? void 0 : locale.split('-')[1]) || 'PH', trackingSubmitBtn: Object.assign(Object.assign({}, trackingCommonInline), { 'data-event-action': 'Submit' }) }))),
8097
+ React__default.createElement(SubotInlineFooter$1, { onBack: () => onPrev && onPrev(), backProps: { isDisabled: !!(indexNumber === 1) }, hideNext: true })));
8098
+ };
8099
+
8100
+ const SubotInlineNodeImage = ({ node, indexNumber, }) => {
8101
+ const { formatMessage: f, action: { pushNotifications }, } = useContext(TogetherComponentGlobalContext);
8102
+ const { params, onSubmit, onPrev, onNext } = useContext(SubotInlineContext);
8103
+ const [value, setValue] = useState((node === null || node === void 0 ? void 0 : node._message) || {});
8104
+ const handleOnChange = (action) => __awaiter(void 0, void 0, void 0, function* () {
8105
+ if (action) {
8106
+ setValue(Object.assign(Object.assign({}, value), { action_id: action === null || action === void 0 ? void 0 : action.id, action_value: action === null || action === void 0 ? void 0 : action.key }));
8107
+ const _message = Object.assign(Object.assign(Object.assign({}, params), value), { node_id: node.id, action_id: action === null || action === void 0 ? void 0 : action.id, action_value: action === null || action === void 0 ? void 0 : action.key });
8108
+ const res = yield subotInlineMessage(_message);
8109
+ if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
8110
+ const _a = res === null || res === void 0 ? void 0 : res._data, { node: _node } = _a, restData = __rest(_a, ["node"]);
8111
+ const _nextNode = Object.assign(Object.assign({}, _node), { _message: Object.assign(Object.assign({}, restData), { node_id: _node.id }) });
8112
+ onSubmit && onSubmit(_nextNode, _message);
8113
+ }
8114
+ }
8115
+ });
8116
+ const handleOnNext = () => {
8117
+ var _a;
8118
+ if (!(node === null || node === void 0 ? void 0 : node._message) || !((_a = node._message) === null || _a === void 0 ? void 0 : _a.action_id)) {
8119
+ pushNotifications({
8120
+ title: '',
8121
+ message: f({
8122
+ id: 'multiSelectError.required',
8123
+ defaultMessage: `There is no answer!`,
8124
+ }),
8125
+ type: 'warning', // "success" | "danger" | "info" | "warning"
8126
+ });
8127
+ }
8128
+ else {
8129
+ onNext && onNext(Object.assign(Object.assign(Object.assign({}, params), value), node === null || node === void 0 ? void 0 : node._message));
8130
+ }
8131
+ };
8132
+ return (React__default.createElement(SubotInlineContainer$1, null,
8133
+ React__default.createElement(SubotInlineHeader$1, null),
8134
+ React__default.createElement(SubotInlineWrapper$1, null,
8135
+ React__default.createElement(SubotInlineIntentContainer, null,
8136
+ React__default.createElement(SubotInlineIntent, { intents: (node === null || node === void 0 ? void 0 : node.intents) || [], indexNumber: indexNumber })),
8137
+ React__default.createElement(SubotInlineActionContainer, null,
8138
+ React__default.createElement(SubotInlineAction, { node_type: node === null || node === void 0 ? void 0 : node.type, value: (value === null || value === void 0 ? void 0 : value.action_id) ? [value === null || value === void 0 ? void 0 : value.action_id] : [], actions: node === null || node === void 0 ? void 0 : node.actions, onChange: handleOnChange }))),
8139
+ React__default.createElement(SubotInlineFooter$1, { onBack: () => onPrev && onPrev(), backProps: { isDisabled: !!(indexNumber === 1) }, onNext: handleOnNext })));
8140
+ };
8141
+
8142
+ const SubotInlineNodeMultiple = ({ node, indexNumber, }) => {
8143
+ const { params, onChange, onPrev, onNext } = useContext(SubotInlineContext);
8144
+ const { formatMessage: f, action: { pushNotifications }, } = useContext(TogetherComponentGlobalContext);
8145
+ const [value, setValue] = useState((node === null || node === void 0 ? void 0 : node._message) || {});
8146
+ const submitButton = useMemo(() => {
8147
+ var _a;
8148
+ const _submitButton = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type == NodeActionType.ACTION_MULTIPLE_BUTTON);
8149
+ if (_submitButton)
8150
+ return _submitButton;
8151
+ return null;
8152
+ }, [node === null || node === void 0 ? void 0 : node.actions]);
8153
+ const activeActions = useMemo(() => {
8154
+ if (value === null || value === void 0 ? void 0 : value.selected_actions) {
8155
+ return Object.keys(value === null || value === void 0 ? void 0 : value.selected_actions);
8156
+ }
8157
+ return [];
8158
+ }, [value, value === null || value === void 0 ? void 0 : value.selected_actions]);
8159
+ const validateSelectActions = (selected_actions, callBack) => {
8160
+ const activeActions = Object.keys(selected_actions);
8161
+ if (!activeActions.length) {
8162
+ pushNotifications({
8163
+ title: '',
8164
+ message: f({
8165
+ id: 'multiSelectError.required',
8166
+ defaultMessage: `There is no answer!`,
8167
+ }),
8168
+ type: 'warning', // "success" | "danger" | "info" | "warning"
8169
+ });
8170
+ return;
8171
+ }
8172
+ else if ((node === null || node === void 0 ? void 0 : node.multi_select_option) === NodeMultipleOptions.RANGE &&
8173
+ activeActions.length < (node === null || node === void 0 ? void 0 : node.from)) {
8174
+ pushNotifications({
8175
+ title: '',
8176
+ message: f({
8177
+ id: 'multiSelectError.range',
8178
+ defaultMessage: 'You must choose from {from} to {to} answers (Ex: You must choose from 3 to 5 answers)',
8179
+ }, {
8180
+ from: node.from,
8181
+ to: node.to,
8182
+ }),
8183
+ type: 'warning', // "success" | "danger" | "info" | "warning"
8184
+ });
8185
+ return;
8186
+ }
8187
+ else if ((node === null || node === void 0 ? void 0 : node.multi_select_option) === NodeMultipleOptions.EXACT_NUMBER &&
8188
+ activeActions.length !== (node === null || node === void 0 ? void 0 : node.from)) {
8189
+ pushNotifications({
8190
+ message: f({
8191
+ id: 'multiSelectError.exactNumber',
8192
+ defaultMessage: 'You must choose {from} answers.',
8193
+ }, {
8194
+ from: node.from,
8195
+ }),
8196
+ type: 'warning', // "success" | "danger" | "info" | "warning"
8197
+ });
8198
+ return;
8199
+ }
8200
+ else {
8201
+ callBack();
8202
+ }
8203
+ };
8204
+ const handleOnClick = (action, formSubmitMeta) => __awaiter(void 0, void 0, void 0, function* () {
8205
+ var _a, _b;
8206
+ if (action) {
8207
+ const _value = JSON.parse(JSON.stringify(Object.assign(Object.assign({}, value), { action_id: submitButton === null || submitButton === void 0 ? void 0 : submitButton.id, action_value: submitButton === null || submitButton === void 0 ? void 0 : submitButton.key, selected_actions: Object.assign({}, value === null || value === void 0 ? void 0 : value.selected_actions) })));
8208
+ if ((action === null || action === void 0 ? void 0 : action.type) === NodeActionType.POLL_CHOICE_TEXT_BY_INPUT ||
8209
+ (action === null || action === void 0 ? void 0 : action.type) === NodeActionType.USER_CHOICE_TEXT_BY_INPUT) {
8210
+ const isExistedPoll = (_value === null || _value === void 0 ? void 0 : _value.selected_actions) && action.id in _value.selected_actions;
8211
+ if (isExistedPoll) {
8212
+ if (formSubmitMeta) {
8213
+ _value.form_submit_meta = formSubmitMeta;
8214
+ }
8215
+ else {
8216
+ delete _value.form_submit_meta;
8217
+ (_a = _value.selected_actions) === null || _a === void 0 ? true : delete _a[action.id];
8218
+ }
8219
+ }
8220
+ else {
8221
+ if (action === null || action === void 0 ? void 0 : action.id) {
8222
+ _value.selected_actions = Object.assign(Object.assign({}, _value.selected_actions), { [action.id]: action.key || '' });
8223
+ }
8224
+ }
8225
+ setValue(_value);
8226
+ onChange === null || onChange === void 0 ? void 0 : onChange(_value);
8227
+ return;
8228
+ }
8229
+ if (!((_b = _value.selected_actions) === null || _b === void 0 ? void 0 : _b[action.id])) {
8230
+ _value.selected_actions = Object.assign(Object.assign({}, _value.selected_actions), { [action.id]: action.key || '' });
8231
+ onChange && onChange(_value);
8232
+ setValue(_value);
8233
+ return;
8234
+ }
8235
+ if (_value.selected_actions[action.id]) {
8236
+ delete _value.selected_actions[action.id];
8237
+ onChange && onChange(_value);
8238
+ setValue(_value);
8239
+ return;
8240
+ }
8241
+ }
8242
+ });
8243
+ const handleOnNext = useCallback(() => {
8244
+ validateSelectActions((value === null || value === void 0 ? void 0 : value.selected_actions) || {}, () => {
8245
+ onNext &&
8246
+ onNext(Object.assign(Object.assign(Object.assign(Object.assign({}, params), node === null || node === void 0 ? void 0 : node._message), value), { node_id: node.id }));
8247
+ });
8248
+ }, [value, value === null || value === void 0 ? void 0 : value.selected_actions, onNext]);
8249
+ return (React__default.createElement(SubotInlineContainer$1, null,
8250
+ React__default.createElement(SubotInlineHeader$1, null),
8251
+ React__default.createElement(SubotInlineWrapper$1, null,
8252
+ React__default.createElement(SubotInlineIntentContainer, null,
8253
+ React__default.createElement(SubotInlineIntent, { intents: (node === null || node === void 0 ? void 0 : node.intents) || [], indexNumber: indexNumber })),
8254
+ React__default.createElement(SubotInlineActionContainer, null,
8255
+ React__default.createElement(SubotInlineAction, { value: activeActions, actions: node === null || node === void 0 ? void 0 : node.actions, onChange: handleOnClick, htmlType: "checkbox", formSubmitMeta: value === null || value === void 0 ? void 0 : value.form_submit_meta }))),
8256
+ React__default.createElement(SubotInlineFooter$1, { onBack: () => onPrev && onPrev(), backProps: { isDisabled: !!(indexNumber === 1) }, nextText: submitButton ? submitButton === null || submitButton === void 0 ? void 0 : submitButton.label : '', onNext: handleOnNext })));
8257
+ };
8258
+
8259
+ const OTPInfoForm = ({ className, style, actions, countryCode, phoneNumber, areaCode,
8260
+ // verified,
8261
+ callBack, }) => {
8262
+ const countRef = useRef();
8263
+ const [isFinishedCountDown, setIsFinishedCountDown] = useState(false);
8264
+ const [isLoading, setIsLoading] = useState(false);
8265
+ const [isLoadingVerify, setIsLoadingVerify] = useState(false);
8266
+ const [sentOTP, setSentOTP] = useState(false);
8267
+ const { register, formState: { errors }, control, trigger, getValues, setValue, } = useForm();
8268
+ const { formatMessage: f, action: { pushNotifications }, } = useContext(TogetherComponentGlobalContext);
8269
+ // useEffect(() => {
8270
+ // const actionPhone = actions.find(
8271
+ // (action) => action.type === NodeActionType.USER_SUBMIT_PHONE,
8272
+ // )
8273
+ // actionPhone?.key && setValue(actionPhone.key, '+84343261825')
8274
+ // setSentOTP(true)
8275
+ // }, [])
8276
+ // const placeholderPhone = useMemo(() => {
8277
+ // return actions.find(({ type }) => type === NodeActionType.USER_SUBMIT_PHONE)
8278
+ // ?.label
8279
+ // }, [actions])
8280
+ // const placeholderOtp = useMemo(() => {
8281
+ // return actions.find(
8282
+ // ({ type }) => type === NodeActionType.USER_SUBMIT_NUMBER,
8283
+ // )?.label
8284
+ // }, [actions])
8285
+ // const labelBtnSendOtp = 'Gửi mã OTP'
8286
+ // const labelBtnVerifyOtp = useMemo(() => {
8287
+ // return (
8288
+ // actions.find(({ type }) => type === NodeActionType.USER_SUBMIT_SEND)
8289
+ // ?.label || 'Xác minh mã OTP'
8290
+ // )
8291
+ // }, [actions])
8292
+ // const labelBtnResendOtp = useMemo(() => {
8293
+ // return (
8294
+ // actions.find(({ type }) => type === NodeActionType.USER_SUBMIT_RESEND)
8295
+ // ?.label || 'Gửi lại mã OTP'
8296
+ // )
8297
+ // }, [actions])
8298
+ const handleSendOTP = (event) => __awaiter(void 0, void 0, void 0, function* () {
8299
+ var _a;
8300
+ event.preventDefault();
8301
+ const data = getValues();
8302
+ const parsedPhone = parsePhoneNumber(data.phone || '');
8303
+ if (!(parsedPhone === null || parsedPhone === void 0 ? void 0 : parsedPhone.nationalNumber) || !(parsedPhone === null || parsedPhone === void 0 ? void 0 : parsedPhone.countryCallingCode)) {
8304
+ return;
8305
+ }
8306
+ setIsLoading(true);
8307
+ try {
8308
+ const result = yield callApi(getSubotApiPath(PATHS$1.POST_SEND_OTP), 'POST', {
8309
+ data: {
8310
+ phone_number: parsedPhone.nationalNumber,
8311
+ area_code: `+${parsedPhone.countryCallingCode}`,
8312
+ },
8313
+ });
8314
+ setIsLoading(false);
8315
+ if ((result === null || result === void 0 ? void 0 : result._status) === 1) {
8316
+ if (sentOTP) {
8317
+ setIsFinishedCountDown(false);
8318
+ countRef.current.reset();
8319
+ }
8320
+ setSentOTP(true);
8321
+ setTimeout(() => {
8322
+ const input = document.querySelector('.input-otp-code');
8323
+ if (input) {
8324
+ input.focus();
8325
+ input.scrollIntoView({ block: 'center' });
8326
+ }
8327
+ }, 100);
8328
+ return;
8329
+ }
8330
+ if ((result === null || result === void 0 ? void 0 : result._status) === 0 &&
8331
+ ((_a = result === null || result === void 0 ? void 0 : result._messages) === null || _a === void 0 ? void 0 : _a[0]) === 'This phone number was verified') {
8332
+ // const { _messages } = result
8333
+ if (countRef.current) {
8334
+ countRef.current.cancel();
8335
+ }
8336
+ pushNotifications({
8337
+ title: '',
8338
+ message: 'Số điện thoại này đã được xác minh.',
8339
+ type: 'success',
8340
+ });
8341
+ const action = actions.find((action) => action.type === NodeActionType.USER_SUBMIT_SEND);
8342
+ action && callBack(action, data.phone);
8343
+ return;
8344
+ }
8345
+ throw new Error();
8346
+ }
8347
+ catch (error) {
8348
+ setIsLoading(false);
8349
+ if (countRef.current) {
8350
+ countRef.current.cancel();
8351
+ }
8352
+ showMessageSomethingWrong();
8353
+ }
8354
+ });
8355
+ const handleOnVerify = (event, action) => __awaiter(void 0, void 0, void 0, function* () {
8356
+ event.preventDefault();
8357
+ setIsLoadingVerify(true);
8358
+ yield trigger();
8359
+ if (isEmpty(errors)) {
8360
+ const data = getValues();
8361
+ const { number } = data;
8362
+ const parsedPhone = parsePhoneNumber(data.phone || '');
8363
+ if (!(parsedPhone === null || parsedPhone === void 0 ? void 0 : parsedPhone.nationalNumber) || !(parsedPhone === null || parsedPhone === void 0 ? void 0 : parsedPhone.countryCallingCode)) {
8364
+ return;
8365
+ }
8366
+ try {
8367
+ const result = yield callApi(getSubotApiPath(PATHS$1.POST_VERIFY_OTP), 'POST', {
8368
+ data: {
8369
+ phone_number: parsedPhone.nationalNumber,
8370
+ area_code: `+${parsedPhone.countryCallingCode}`,
8371
+ code: number,
8372
+ },
8373
+ });
8374
+ setIsLoadingVerify(false);
8375
+ if ((result === null || result === void 0 ? void 0 : result._status) === 1) {
8376
+ pushNotifications({
8377
+ title: '',
8378
+ message: f({ id: 'subot.verifyOTP.success.message' }),
8379
+ type: 'success',
8380
+ });
8381
+ callBack(action, data.phone);
8382
+ return;
8383
+ }
8384
+ throw new Error();
8385
+ }
8386
+ catch (error) {
8387
+ pushNotifications({
8388
+ title: '',
8389
+ message: f({ id: 'validation.error.validOTP' }),
8390
+ type: 'danger',
8391
+ });
8392
+ setIsLoadingVerify(false);
8393
+ }
8394
+ }
8395
+ else {
8396
+ setIsLoadingVerify(false);
8397
+ }
8398
+ });
8399
+ const showMessageSomethingWrong = () => {
8400
+ pushNotifications({
8401
+ title: '',
8402
+ message: f({ id: 'notification.comment.somethingWrong' }),
8403
+ type: 'danger',
8404
+ });
8405
+ };
8406
+ const renderFormInput = (action) => {
8407
+ if (!action.key) {
8408
+ return null;
8409
+ }
8410
+ switch (action.type) {
8411
+ case NodeActionType.USER_SUBMIT_PHONE:
8412
+ return (React__default.createElement("div", { className: "input-row", key: action.id },
8413
+ React__default.createElement("label", { htmlFor: action.key }, action.label),
8414
+ React__default.createElement(Controller, { name: action.key, control: control, rules: {
8415
+ required: true,
8416
+ validate: (value) => isPossiblePhoneNumber(value),
8417
+ }, render: ({ field: { onChange, value } }) => {
8418
+ const disabledPhone = (!isFinishedCountDown && sentOTP) || isLoading;
8419
+ return (React__default.createElement(StyleWrapperPhoneInput, null,
8420
+ React__default.createElement(PhoneInputWithCode, { value: value, defaultValue: phoneNumber, onChange: onChange, defaultCountry: countryCode, id: action.id, className: `input-row ${action.id}`, name: action.key, disabled: disabledPhone, flagComponent: FlagComponent, placeholder: action.label }),
8421
+ disabledPhone && (React__default.createElement(IconEdit, { viewBox: "0 0 24 24", className: "icon-edit-phone", onClick: () => {
8422
+ var _a;
8423
+ onChange('');
8424
+ setSentOTP(false);
8425
+ setIsLoadingVerify(false);
8426
+ (_a = countRef.current) === null || _a === void 0 ? void 0 : _a.cancel();
8427
+ } })),
8428
+ action.key && errors[action.key] && (React__default.createElement("p", { className: "error-message" }, f({
8429
+ id: 'validation.error.validNumber',
8430
+ defaultMessage: 'Please enter a valid number.',
8431
+ }))),
8432
+ React__default.createElement("div", { className: "submit-btn-row", key: action.id },
8433
+ React__default.createElement(Button$1, { className: "submit-btn", size: "lg", onClick: handleSendOTP, isDisabled: (!isFinishedCountDown && sentOTP) || isLoading, isLoading: isLoading }, sentOTP ? (React__default.createElement(CountDown$1, { ref: countRef, isFinished: isFinishedCountDown, onFinish: setIsFinishedCountDown })) : (React__default.createElement("span", null, f({
8434
+ id: 'subot.sendOTP.button',
8435
+ defaultMessage: 'Send OTP',
8436
+ })))))));
8437
+ } })));
8438
+ case NodeActionType.USER_SUBMIT_NUMBER:
8439
+ if (!sentOTP) {
8440
+ return '';
8441
+ }
8442
+ return (React__default.createElement("div", { className: "input-row", key: action.id },
8443
+ React__default.createElement("label", { htmlFor: action.key }, action.label),
8444
+ React__default.createElement("input", Object.assign({ type: "tel", id: action.id, placeholder: action.label }, register(action.key, {
8445
+ required: true,
8446
+ pattern: /^[0-9]{0,6}$/,
8447
+ }), { className: "input-otp-code" })),
8448
+ errors[action.key] && (React__default.createElement("p", { className: "error-message" }, f({
8449
+ id: 'validation.error.validOTP',
8450
+ defaultMessage: 'Invalid OTP provided',
8451
+ })))));
8452
+ default:
8453
+ return '';
8454
+ }
8455
+ };
8456
+ const renderFormSubmitAndTerms = (action) => {
8457
+ switch (action.type) {
8458
+ case NodeActionType.USER_SUBMIT_SEND:
8459
+ if (!sentOTP)
8460
+ return '';
8461
+ return (React__default.createElement("div", { className: "submit-btn-row", key: action.id },
8462
+ React__default.createElement(Button$1, { className: "submit-btn", size: "lg", isDisabled: isLoadingVerify, isLoading: isLoadingVerify, onClick: (event) => handleOnVerify(event, action) }, action.label)));
8463
+ default:
8464
+ return '';
8465
+ }
8466
+ };
8467
+ useEffect(() => {
8468
+ if (phoneNumber) {
8469
+ const action = actions.find((action) => action.type === NodeActionType.USER_SUBMIT_PHONE);
8470
+ if (action && action.key) {
8471
+ setValue(action.key, `+${areaCode}${phoneNumber}`);
8472
+ }
8473
+ }
8474
+ }, [phoneNumber, areaCode]);
8475
+ return (React__default.createElement(StyledUserInfoFormContainer$1, { className: className, style: style },
8476
+ React__default.createElement("form", { className: "user-info-form" },
8477
+ actions.map((action) => renderFormInput(action)),
8478
+ actions.map((action) => renderFormSubmitAndTerms(action)))));
8479
+ };
8480
+
8481
+ const useVerifyPhoneNumber = () => {
8482
+ const userInfo = GlobalData === null || GlobalData === void 0 ? void 0 : GlobalData.userInfo;
8483
+ const [verifiedPhone, setVerifiedPhone] = useState(false);
8484
+ useEffect(() => {
8485
+ if (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone) {
8486
+ if (userInfo.phone_verified_at && userInfo.verify_phone_code) {
8487
+ setVerifiedPhone(true);
8488
+ }
8489
+ }
8490
+ }, [userInfo]);
8491
+ return verifiedPhone;
8492
+ };
8493
+
8494
+ const SubotInlineNodeOTP = ({ node, indexNumber, }) => {
8495
+ const { params, onPrev, onNext } = useContext(SubotInlineContext);
8496
+ const userInfo = GlobalData === null || GlobalData === void 0 ? void 0 : GlobalData.userInfo;
8497
+ const locale = GlobalData === null || GlobalData === void 0 ? void 0 : GlobalData.locale;
8498
+ const [value, setValue] = useState((node === null || node === void 0 ? void 0 : node._message) || {});
8499
+ const verifiedPhone = useVerifyPhoneNumber();
8500
+ const handleOnVerify = (action, phoneNumber) => {
8501
+ var _a;
8502
+ const actionPhone = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type === NodeActionType.USER_SUBMIT_PHONE);
8503
+ if (!action || !actionPhone) {
8504
+ return;
8505
+ }
8506
+ const form_submit_meta = [
8507
+ {
8508
+ key: String(actionPhone.key),
8509
+ control: ELEMENT_CONTROL_INPUT_TYPE[NodeActionType.USER_SUBMIT_PHONE],
8510
+ value: phoneNumber,
8511
+ },
8512
+ ];
8513
+ const newValue = Object.assign(Object.assign({}, value), { form_submit_meta, action_id: action === null || action === void 0 ? void 0 : action.id, action_value: action === null || action === void 0 ? void 0 : action.key });
8514
+ setValue(newValue);
8515
+ onNext && onNext(Object.assign(Object.assign(Object.assign({}, params), newValue), node === null || node === void 0 ? void 0 : node._message));
8516
+ };
8517
+ return (React__default.createElement(SubotInlineContainer$1, null,
8518
+ React__default.createElement(SubotInlineHeader$1, null),
8519
+ React__default.createElement(SubotInlineWrapper$1, null,
8520
+ React__default.createElement(SubotInlineIntentContainer, null,
8521
+ React__default.createElement(SubotInlineIntent, { intents: (node === null || node === void 0 ? void 0 : node.intents) || [], indexNumber: indexNumber })),
8522
+ React__default.createElement(SubotInlineActionContainer, null,
8523
+ React__default.createElement(OTPInfoForm, { phoneNumber: userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone, verified: verifiedPhone, areaCode: userInfo === null || userInfo === void 0 ? void 0 : userInfo.area_code, callBack: handleOnVerify, actions: (node === null || node === void 0 ? void 0 : node.actions) || [], countryCode: (locale === null || locale === void 0 ? void 0 : locale.split('-')[1]) || 'PH' }))),
8524
+ React__default.createElement(SubotInlineFooter$1, { onBack: () => onPrev && onPrev(), backProps: { isDisabled: !!(indexNumber === 1) }, hideNext: true })));
8525
+ };
8526
+
8527
+ // Poll Message
8528
+ // {
8529
+ // form_meta: [
8530
+ // { key: "poll4", control: "formmeta", value: "", action_id: "action.id" },
8531
+ // { key: "poll2", control: "formmeta", value: "", action_id: "action.id" },
8532
+ // { key: "poll3", control: "formmeta", value: "", action_id: "action.id" },
8533
+ // { key: 'attribite-description', control:"formmeta-description", value: '', action_id: "action.id"}
8534
+ // ],
8535
+ // action_id: "button_id",
8536
+ // action_value: "button_attribute"
8537
+ // }
8538
+ const SubotInlineNodePoll = ({ node, indexNumber, }) => {
8539
+ var _a, _b;
8540
+ const { params, onChange, onPrev, onNext } = useContext(SubotInlineContext);
8541
+ const [value, setValue] = useState((node === null || node === void 0 ? void 0 : node._message) || {});
8542
+ const validation = useValidationMultiOption();
8543
+ const descriptionNode = useDescriptionPollNode({ node });
8544
+ const submitButton = useMemo(() => {
8545
+ var _a;
8546
+ const _submitButton = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type == NodeActionType.POLL_BUTTON);
8547
+ if (_submitButton)
8548
+ return _submitButton;
8549
+ return null;
8550
+ }, [node === null || node === void 0 ? void 0 : node.actions]);
8551
+ const handleOnChange = (action, formSubmitMeta) => {
8552
+ var _a, _b, _c, _d, _e, _f, _g;
8553
+ const newValue = JSON.parse(JSON.stringify(Object.assign(Object.assign({}, value), { node_id: node.id, action_id: submitButton === null || submitButton === void 0 ? void 0 : submitButton.id, action_value: submitButton === null || submitButton === void 0 ? void 0 : submitButton.key, form_submit_meta: [...((value === null || value === void 0 ? void 0 : value.form_submit_meta) || [])] })));
8554
+ if ((action === null || action === void 0 ? void 0 : action.type) === NodeActionType.POLL_CHOICE_TEXT_BY_INPUT ||
8555
+ (action === null || action === void 0 ? void 0 : action.type) === NodeActionType.USER_CHOICE_TEXT_BY_INPUT) {
8556
+ const isExistedPoll = (_a = newValue.form_submit_meta) === null || _a === void 0 ? void 0 : _a.some(({ action_id }) => action_id === action.id);
8557
+ if (isExistedPoll) {
8558
+ newValue.form_submit_meta =
8559
+ typeof formSubmitMeta === 'undefined'
8560
+ ? (_b = newValue.form_submit_meta) === null || _b === void 0 ? void 0 : _b.filter(({ action_id }) => action_id !== action.id)
8561
+ : (_c = newValue.form_submit_meta) === null || _c === void 0 ? void 0 : _c.filter(({ action_id }) => action_id !== action.id).concat(formSubmitMeta);
8562
+ }
8563
+ else {
8564
+ newValue.form_submit_meta = (_d = newValue.form_submit_meta) === null || _d === void 0 ? void 0 : _d.concat([
8565
+ {
8566
+ key: action === null || action === void 0 ? void 0 : action.key,
8567
+ control: ELEMENT_CONTROL_INPUT_TYPE[action === null || action === void 0 ? void 0 : action.type] || 'text',
8568
+ value: '',
8569
+ action_id: action === null || action === void 0 ? void 0 : action.id,
8570
+ },
8571
+ ]);
8572
+ }
8573
+ setValue(newValue);
8574
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
8575
+ return;
8576
+ }
8577
+ const isPoll = (_e = newValue.form_submit_meta) === null || _e === void 0 ? void 0 : _e.some(({ action_id }) => action_id === (action === null || action === void 0 ? void 0 : action.action_id));
8578
+ if (isPoll) {
8579
+ newValue.form_submit_meta = (_f = newValue.form_submit_meta) === null || _f === void 0 ? void 0 : _f.filter(({ action_id }) => action_id !== (action === null || action === void 0 ? void 0 : action.action_id));
8580
+ }
8581
+ else {
8582
+ newValue.form_submit_meta = (_g = newValue.form_submit_meta) === null || _g === void 0 ? void 0 : _g.concat([action]);
8583
+ }
8584
+ setValue(newValue);
8585
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
8586
+ };
8587
+ const activeActions = useMemo(() => {
8588
+ if (value === null || value === void 0 ? void 0 : value.form_submit_meta) {
8589
+ return value === null || value === void 0 ? void 0 : value.form_submit_meta.map(({ action_id }) => action_id);
8590
+ }
8591
+ return [];
8592
+ }, [value, value === null || value === void 0 ? void 0 : value.form_submit_meta]);
8593
+ const handleOnNext = () => {
8594
+ const tmp = {};
8595
+ if (value.form_submit_meta && value.form_submit_meta.length) {
8596
+ tmp[node.id] = value.form_submit_meta.map((_v) => _v.action_id);
8597
+ }
8598
+ const newValue = Object.assign(Object.assign({}, value), { current_polls: tmp });
8599
+ validation.validateSelectActions(activeActions, node, () => {
8600
+ onNext && onNext(Object.assign(Object.assign(Object.assign({}, params), node === null || node === void 0 ? void 0 : node._message), newValue));
8601
+ });
8602
+ };
8603
+ return (React__default.createElement(SubotInlineContainer$1, null,
8604
+ React__default.createElement(SubotInlineHeader$1, null),
8605
+ React__default.createElement(SubotInlineWrapper$1, null,
8606
+ React__default.createElement(SubotInlineIntentContainer, null,
8607
+ React__default.createElement(SubotInlineIntent, { intents: (node === null || node === void 0 ? void 0 : node.intents) || [], indexNumber: indexNumber })),
8608
+ React__default.createElement(SubotInlineDescription$1, null, descriptionNode),
8609
+ React__default.createElement(SubotInlineActionContainer, null, (node === null || node === void 0 ? void 0 : node.actions) && !!((_a = node.actions) === null || _a === void 0 ? void 0 : _a.length) && (React__default.createElement(SubotInlineActionListContainer, null, (_b = node === null || node === void 0 ? void 0 : node.actions.filter(({ type }) => type !== NodeActionType.POLL_BUTTON)) === null || _b === void 0 ? void 0 : _b.map((action) => {
8610
+ const NodeAction = SubotInlineActionBase[action === null || action === void 0 ? void 0 : action.type];
8611
+ return (NodeAction && (React__default.createElement(NodeAction, { key: action.id, active: activeActions.includes(action.id), action: action, onChange: handleOnChange, htmlType: "checkbox", formSubmitMeta: value === null || value === void 0 ? void 0 : value.form_submit_meta })));
8612
+ }))))),
8613
+ React__default.createElement(SubotInlineFooter$1, { onBack: () => onPrev && onPrev(), backProps: { isDisabled: !!(indexNumber === 1) }, nextText: submitButton ? submitButton === null || submitButton === void 0 ? void 0 : submitButton.label : '', onNext: handleOnNext })));
8614
+ };
8615
+
8616
+ // Rating Message
8617
+ // {
8618
+ // form_meta: [
8619
+ // { key: "action.key", control: "star", value: "", action_id: 'action.id' },
8620
+ // { key: 'action.key', control: "text", value: '', action_id: 'action.id' }
8621
+ // ],
8622
+ // action_id: "button_id",
8623
+ // action_value: "button_attribute"
8624
+ // }
8625
+ const SubotInlineNodeRating = ({ node, indexNumber, }) => {
8626
+ var _a, _b;
8627
+ const { formatMessage: f, action: { pushNotifications }, } = useContext(TogetherComponentGlobalContext);
8628
+ const { params, onChange, onSubmit, onPrev, onNext } = useContext(SubotInlineContext);
8629
+ const [value, setValue] = useState((node === null || node === void 0 ? void 0 : node._message) || {});
8630
+ const [isSubmit, setIsSubmit] = useState(false);
8631
+ const ratingStarValue = useMemo(() => {
8632
+ var _a;
8633
+ const _ratingStar = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type === NodeActionType.RATING_STAR);
8634
+ if (value.form_submit_meta && _ratingStar) {
8635
+ const formIndex = value === null || value === void 0 ? void 0 : value.form_submit_meta.findIndex(({ action_id }) => action_id === (_ratingStar === null || _ratingStar === void 0 ? void 0 : _ratingStar.id));
8636
+ if (formIndex !== -1)
8637
+ return parseInt(value === null || value === void 0 ? void 0 : value.form_submit_meta[formIndex].value);
8638
+ }
8639
+ return 0;
8640
+ }, [value === null || value === void 0 ? void 0 : value.form_submit_meta]);
8641
+ const submitButton = useMemo(() => {
8642
+ var _a;
8643
+ const _submitButton = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type == NodeActionType.RATING_BUTTON);
8644
+ if (_submitButton)
8645
+ return _submitButton;
8646
+ return null;
8647
+ }, []);
8648
+ const handleOnChange = (formValue) => __awaiter(void 0, void 0, void 0, function* () {
8649
+ if (formValue) {
8650
+ const _message = Object.assign(Object.assign(Object.assign({}, params), value), { node_id: node.id, action_id: submitButton === null || submitButton === void 0 ? void 0 : submitButton.id, action_value: submitButton === null || submitButton === void 0 ? void 0 : submitButton.key, form_submit_meta: (value === null || value === void 0 ? void 0 : value.form_submit_meta)
8651
+ ? [...value === null || value === void 0 ? void 0 : value.form_submit_meta]
8652
+ : [] });
8653
+ const tmpFormSubmitMeta = [
8654
+ ..._message === null || _message === void 0 ? void 0 : _message.form_submit_meta,
8655
+ ];
8656
+ const formUpdateIndex = tmpFormSubmitMeta.findIndex(({ action_id }) => action_id === formValue.action_id);
8657
+ if (formUpdateIndex !== -1)
8658
+ tmpFormSubmitMeta[formUpdateIndex] = Object.assign({}, formValue);
8659
+ else
8660
+ tmpFormSubmitMeta.push(formValue);
8661
+ _message.form_submit_meta = [...tmpFormSubmitMeta];
8662
+ setValue(_message);
8663
+ onChange && onChange(_message);
8664
+ }
8665
+ });
8666
+ const handleOnNext = () => __awaiter(void 0, void 0, void 0, function* () {
8667
+ if (!value.form_submit_meta || ratingStarValue === 0) {
8668
+ pushNotifications({
8669
+ title: '',
8670
+ message: f({
8671
+ id: 'multiSelectError.required',
8672
+ defaultMessage: `There is no answer!`,
8673
+ }),
8674
+ type: 'warning', // "success" | "danger" | "info" | "warning"
8675
+ });
8676
+ return;
8677
+ }
8678
+ if (!isSubmit) {
8679
+ const _message = Object.assign(Object.assign(Object.assign({}, params), node === null || node === void 0 ? void 0 : node._message), value);
8680
+ const res = yield subotInlineMessage(_message);
8681
+ if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
8682
+ const _c = res === null || res === void 0 ? void 0 : res._data, { node: _node } = _c, restData = __rest(_c, ["node"]);
8683
+ const _nextNode = Object.assign(Object.assign({}, _node), { _message: Object.assign(Object.assign({}, restData), { node_id: _node.id }) });
8684
+ onSubmit && onSubmit(_nextNode, _message);
8685
+ setIsSubmit(true);
8686
+ }
8687
+ }
8688
+ else {
8689
+ onNext && onNext(Object.assign(Object.assign(Object.assign({}, params), value), node === null || node === void 0 ? void 0 : node._message));
8690
+ }
8691
+ });
8692
+ return (React__default.createElement(SubotInlineContainer$1, null,
8693
+ React__default.createElement(SubotInlineHeader$1, null),
8694
+ React__default.createElement(SubotInlineWrapper$1, null,
8695
+ React__default.createElement(SubotInlineIntentContainer, null,
8696
+ React__default.createElement(SubotInlineIntent, { intents: (node === null || node === void 0 ? void 0 : node.intents) || [], indexNumber: indexNumber })),
8697
+ React__default.createElement(SubotInlineActionContainer, null, (node === null || node === void 0 ? void 0 : node.actions) && !!((_a = node.actions) === null || _a === void 0 ? void 0 : _a.length) && (React__default.createElement(SubotInlineActionListContainer, null, (_b = node === null || node === void 0 ? void 0 : node.actions.filter(({ type }) => type !== NodeActionType.RATING_BUTTON)) === null || _b === void 0 ? void 0 : _b.map((action) => {
8698
+ var _a;
8699
+ const NodeAction = SubotInlineActionBase[action === null || action === void 0 ? void 0 : action.type];
8700
+ return (NodeAction && (React__default.createElement(NodeAction, { key: action.id, action: action, onChange: handleOnChange, value: (value &&
8701
+ (value === null || value === void 0 ? void 0 : value.form_submit_meta) &&
8702
+ ((_a = value.form_submit_meta) === null || _a === void 0 ? void 0 : _a.find(({ action_id }) => action_id === action.id))) })));
8703
+ }))))),
8704
+ React__default.createElement(SubotInlineFooter$1, { onBack: () => onPrev && onPrev(), backProps: { isDisabled: !!(indexNumber === 1) }, nextText: submitButton ? submitButton === null || submitButton === void 0 ? void 0 : submitButton.label : '', onNext: handleOnNext })));
8705
+ };
8706
+
8707
+ const SubotInlineNodeReaction = ({ node, indexNumber, }) => {
8708
+ const { formatMessage: f, action: { pushNotifications }, } = useContext(TogetherComponentGlobalContext);
8709
+ const { params, onSubmit, onPrev, onNext } = useContext(SubotInlineContext);
8710
+ const [value, setValue] = useState((node === null || node === void 0 ? void 0 : node._message) || {});
8711
+ const handleOnChange = (action) => __awaiter(void 0, void 0, void 0, function* () {
8712
+ if (action) {
8713
+ setValue(Object.assign(Object.assign({}, value), { action_id: action === null || action === void 0 ? void 0 : action.id, action_value: action === null || action === void 0 ? void 0 : action.key }));
8714
+ const _message = Object.assign(Object.assign(Object.assign({}, params), value), { node_id: node.id, action_id: action === null || action === void 0 ? void 0 : action.id, action_value: action === null || action === void 0 ? void 0 : action.key });
8715
+ const res = yield subotInlineMessage(_message);
8716
+ if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
8717
+ const _a = res === null || res === void 0 ? void 0 : res._data, { node: _node } = _a, restData = __rest(_a, ["node"]);
8718
+ const _nextNode = Object.assign(Object.assign({}, _node), { _message: Object.assign(Object.assign({}, restData), { node_id: _node.id }) });
8719
+ onSubmit && onSubmit(_nextNode, _message);
8720
+ }
8721
+ }
8722
+ });
8723
+ const handleOnNext = () => {
8724
+ var _a;
8725
+ if (!(node === null || node === void 0 ? void 0 : node._message) || !((_a = node._message) === null || _a === void 0 ? void 0 : _a.action_id)) {
8726
+ pushNotifications({
8727
+ title: '',
8728
+ message: f({
8729
+ id: 'multiSelectError.required',
8730
+ defaultMessage: `There is no answer!`,
8731
+ }),
8732
+ type: 'warning', // "success" | "danger" | "info" | "warning"
8733
+ });
8734
+ }
8735
+ else {
8736
+ onNext && onNext(Object.assign(Object.assign(Object.assign({}, params), value), node === null || node === void 0 ? void 0 : node._message));
8737
+ }
8738
+ };
8739
+ return (React__default.createElement(SubotInlineContainer$1, null,
8740
+ React__default.createElement(SubotInlineHeader$1, null),
8741
+ React__default.createElement(SubotInlineWrapper$1, null,
8742
+ React__default.createElement(SubotInlineIntentContainer, null,
8743
+ React__default.createElement(SubotInlineIntent, { intents: (node === null || node === void 0 ? void 0 : node.intents) || [], indexNumber: indexNumber })),
8744
+ React__default.createElement(SubotInlineActionContainer, null,
8745
+ React__default.createElement(SubotInlineAction, { value: (value === null || value === void 0 ? void 0 : value.action_id) ? [value === null || value === void 0 ? void 0 : value.action_id] : [], actions: (node === null || node === void 0 ? void 0 : node.actions) || [], onChange: handleOnChange }))),
8746
+ React__default.createElement(SubotInlineFooter$1, { onBack: () => onPrev && onPrev(), backProps: { isDisabled: !!(indexNumber === 1) }, onNext: handleOnNext })));
8747
+ };
8748
+
8749
+ const SubotInlineNodeResultPoll = ({ node, }) => {
8750
+ var _a, _b;
8751
+ return (React__default.createElement(SubotInlineContainer$1, null,
8752
+ React__default.createElement(SubotInlineHeader$1, null),
8753
+ React__default.createElement(SubotInlineWrapper$1, null,
8754
+ React__default.createElement(SubotInlineIntentContainer, null,
8755
+ React__default.createElement(SubotInlineIntent, { intents: (node === null || node === void 0 ? void 0 : node.intents) || [] })),
8756
+ React__default.createElement(SubotInlineActionContainer, null, (node === null || node === void 0 ? void 0 : node.actions) && !!((_a = node.actions) === null || _a === void 0 ? void 0 : _a.length) && (React__default.createElement(SubotInlineActionListContainer, null, (_b = node === null || node === void 0 ? void 0 : node.actions.filter(({ type }) => type !== NodeActionType.POLL_BUTTON)) === null || _b === void 0 ? void 0 : _b.map((action) => {
8757
+ const NodeAction = SubotInlineActionBase[action === null || action === void 0 ? void 0 : action.type];
8758
+ return (NodeAction && (React__default.createElement(NodeAction, { key: action.id, action: action, htmlType: "checkbox", node_type: node === null || node === void 0 ? void 0 : node.type })));
8759
+ })))))));
8760
+ };
8761
+
8762
+ // Review Message
8763
+ // {
8764
+ // form_meta: [
8765
+ // { key: "review1", control: "formmeta", value: '', action_id: "action.id" },
8766
+ // { key: "review2", control: "formmeta", value: '', action_id: "action.id" },
8767
+ // { key: "review3", control: "formmeta", value: "" },
8768
+ // { key: "review4", control: "formmeta", value: "" },
8769
+ // { key: "review5", control: "formmeta", value: "" },
8770
+ // {key: 'attribite-description', control:"formmeta-description", value: ''}
8771
+ // ],
8772
+ // action_id: "button_id",
8773
+ // action_value: "button_attribute"
8774
+ // }
8775
+ const SubotInlineNodeReview = ({ node, indexNumber, }) => {
8776
+ const { formatMessage: f, action: { pushNotifications }, } = useContext(TogetherComponentGlobalContext);
8777
+ const { params, onChange, onSubmit, onPrev, onNext } = useContext(SubotInlineContext);
8778
+ const [value, setValue] = useState((node === null || node === void 0 ? void 0 : node._message) || {});
8779
+ const [isSubmit, setIsSubmit] = useState(false);
8780
+ const reviewChoices = useMemo(() => {
8781
+ var _a;
8782
+ return ((_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.filter(({ type }) => type === NodeActionType.REVIEW_CHOICE)) || [];
8783
+ }, [node === null || node === void 0 ? void 0 : node.actions]);
8784
+ const reviewDescriptions = useMemo(() => {
8785
+ var _a;
8786
+ return ((_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.filter(({ type }) => type === NodeActionType.REVIEW_DESCRIPTION)) || [];
8787
+ }, [node === null || node === void 0 ? void 0 : node.actions]);
8788
+ const submitButton = useMemo(() => {
8789
+ var _a;
8790
+ const _submitButton = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find(({ type }) => type == NodeActionType.REVIEW_BUTTON);
8791
+ if (_submitButton)
8792
+ return _submitButton;
8793
+ return null;
8794
+ }, [node === null || node === void 0 ? void 0 : node.actions]);
8795
+ const activeActions = useMemo(() => {
8796
+ if (value === null || value === void 0 ? void 0 : value.form_submit_meta) {
8797
+ return value === null || value === void 0 ? void 0 : value.form_submit_meta.map(({ action_id }) => action_id).filter((action_id) => !!(reviewChoices === null || reviewChoices === void 0 ? void 0 : reviewChoices.map(({ id }) => id).includes(action_id)));
8798
+ }
8799
+ return [];
8800
+ }, [value, value === null || value === void 0 ? void 0 : value.form_submit_meta]);
8801
+ const handleOnClick = (formValue) => {
8802
+ if (formValue) {
8803
+ const _message = Object.assign(Object.assign(Object.assign({}, params), value), { node_id: node.id, action_id: submitButton === null || submitButton === void 0 ? void 0 : submitButton.id, action_value: submitButton === null || submitButton === void 0 ? void 0 : submitButton.key, form_submit_meta: (value === null || value === void 0 ? void 0 : value.form_submit_meta)
8804
+ ? [...value === null || value === void 0 ? void 0 : value.form_submit_meta]
8805
+ : [] });
8806
+ let tmpFormSubmitMeta = [
8807
+ ..._message === null || _message === void 0 ? void 0 : _message.form_submit_meta,
8808
+ ];
8809
+ const formUpdateIndex = tmpFormSubmitMeta.findIndex(({ action_id }) => action_id === formValue.action_id);
8810
+ if (formUpdateIndex !== -1)
8811
+ tmpFormSubmitMeta = [
8812
+ ...tmpFormSubmitMeta.slice(0, formUpdateIndex),
8813
+ ...tmpFormSubmitMeta.slice(formUpdateIndex + 1),
8814
+ ];
8815
+ else
8816
+ tmpFormSubmitMeta.push(formValue);
8817
+ _message.form_submit_meta = [...tmpFormSubmitMeta];
8818
+ setValue(_message);
8819
+ setIsSubmit(false);
8820
+ onChange && onChange(_message);
8821
+ }
8822
+ };
8823
+ const handleOnChange = (formValue) => {
8824
+ if (formValue) {
8825
+ const _message = Object.assign(Object.assign(Object.assign({}, params), value), { node_id: node.id, action_id: submitButton === null || submitButton === void 0 ? void 0 : submitButton.id, action_value: submitButton === null || submitButton === void 0 ? void 0 : submitButton.key, form_submit_meta: (value === null || value === void 0 ? void 0 : value.form_submit_meta)
8826
+ ? [...value === null || value === void 0 ? void 0 : value.form_submit_meta]
8827
+ : [] });
8828
+ const tmpFormSubmitMeta = [
8829
+ ..._message === null || _message === void 0 ? void 0 : _message.form_submit_meta,
8830
+ ];
8831
+ const formUpdateIndex = tmpFormSubmitMeta.findIndex(({ action_id }) => action_id === formValue.action_id);
8832
+ if (formUpdateIndex !== -1)
8833
+ tmpFormSubmitMeta[formUpdateIndex] = Object.assign({}, formValue);
8834
+ else
8835
+ tmpFormSubmitMeta.push(formValue);
8836
+ _message.form_submit_meta = [...tmpFormSubmitMeta];
8837
+ setValue(_message);
8838
+ setIsSubmit(false);
8839
+ onChange && onChange(_message);
8840
+ }
8841
+ };
8842
+ const handleOnNext = () => __awaiter(void 0, void 0, void 0, function* () {
8843
+ var _a;
8844
+ if (!((_a = node === null || node === void 0 ? void 0 : node._message) === null || _a === void 0 ? void 0 : _a.form_submit_meta) || !activeActions.length) {
8845
+ pushNotifications({
8846
+ title: '',
8847
+ message: f({
8848
+ id: 'multiSelectError.required',
8849
+ defaultMessage: `There is no answer!`,
8850
+ }),
8851
+ type: 'warning', // "success" | "danger" | "info" | "warning"
8852
+ });
8853
+ return;
8854
+ }
8855
+ if (!isSubmit) {
8856
+ const _message = Object.assign(Object.assign(Object.assign({}, params), node === null || node === void 0 ? void 0 : node._message), value);
8857
+ const res = yield subotInlineMessage(_message);
8858
+ if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
8859
+ const _b = res === null || res === void 0 ? void 0 : res._data, { node: _node } = _b, restData = __rest(_b, ["node"]);
8860
+ const _nextNode = Object.assign(Object.assign({}, _node), { _message: Object.assign(Object.assign({}, restData), { node_id: _node.id }) });
8861
+ onSubmit && onSubmit(_nextNode, _message);
8862
+ setIsSubmit(true);
8863
+ }
8864
+ }
8865
+ else {
8866
+ onNext && onNext(Object.assign(Object.assign(Object.assign({}, params), value), node === null || node === void 0 ? void 0 : node._message));
8867
+ }
8868
+ });
8869
+ return (React__default.createElement(SubotInlineContainer$1, null,
8870
+ React__default.createElement(SubotInlineHeader$1, null),
8871
+ React__default.createElement(SubotInlineWrapper$1, null,
8872
+ React__default.createElement(SubotInlineIntentContainer, null,
8873
+ React__default.createElement(SubotInlineIntent, { intents: (node === null || node === void 0 ? void 0 : node.intents) || [], indexNumber: indexNumber })),
8874
+ React__default.createElement(SubotInlineActionContainer, null,
8875
+ !!reviewChoices.length && (React__default.createElement(SubotInlineReviewContainer, null,
8876
+ React__default.createElement(SubotInlineActionListContainer, { className: "review-container" }, reviewChoices.map((action) => {
8877
+ var _a;
8878
+ const NodeAction = SubotInlineActionBase[action === null || action === void 0 ? void 0 : action.type];
8879
+ return (NodeAction && (React__default.createElement(NodeAction, { key: action.id, action: action, onChange: handleOnClick, active: (value &&
8880
+ !!((_a = value === null || value === void 0 ? void 0 : value.form_submit_meta) === null || _a === void 0 ? void 0 : _a.find(({ action_id }) => action_id === action.id))) ||
8881
+ false })));
8882
+ })))),
8883
+ !!(reviewDescriptions === null || reviewDescriptions === void 0 ? void 0 : reviewDescriptions.length) && (React__default.createElement(SubotInlineActionListContainer, null, reviewDescriptions.map((action) => {
8884
+ var _a;
8885
+ const NodeAction = SubotInlineActionBase[action === null || action === void 0 ? void 0 : action.type];
8886
+ return (NodeAction && (React__default.createElement(NodeAction, { key: action.id, action: action, onChange: handleOnChange, value: (value &&
8887
+ (value === null || value === void 0 ? void 0 : value.form_submit_meta) &&
8888
+ ((_a = value.form_submit_meta) === null || _a === void 0 ? void 0 : _a.find(({ action_id }) => action_id === action.id))) })));
8889
+ }))))),
8890
+ React__default.createElement(SubotInlineFooter$1, { onBack: () => onPrev && onPrev(), backProps: { isDisabled: !!(indexNumber === 1) }, nextText: submitButton ? submitButton === null || submitButton === void 0 ? void 0 : submitButton.label : '', onNext: handleOnNext })));
8891
+ };
8892
+
8893
+ const SubotInlineNodeSSO = ({ node, indexNumber, }) => {
8894
+ const refIsTrigger = useRef(false);
8895
+ const { params, onPrev, nodes, activeId, userInfo } = useContext(SubotInlineContext);
8896
+ useEffect(() => {
8897
+ var _a;
8898
+ const actionSSO = (_a = node === null || node === void 0 ? void 0 : node.actions) === null || _a === void 0 ? void 0 : _a.find((act) => act.type === NodeActionType.ACTION_SSO_REDIRECT);
8899
+ if ((userInfo === null || userInfo === void 0 ? void 0 : userInfo.id) && actionSSO && !refIsTrigger.current) {
8900
+ refIsTrigger.current = true;
8901
+ handleOnChange(actionSSO);
8902
+ }
8903
+ }, [userInfo === null || userInfo === void 0 ? void 0 : userInfo.id]);
8904
+ const { formatMessage: f } = useContext(TogetherComponentGlobalContext);
8905
+ const handleOnChange = (action) => {
8906
+ if (action && action.type === NodeActionType.ACTION_SSO_REDIRECT) {
8907
+ const currentState = {
8908
+ params: Object.assign(Object.assign(Object.assign({}, params), node === null || node === void 0 ? void 0 : node._message), { action_id: action === null || action === void 0 ? void 0 : action.id, action_value: action === null || action === void 0 ? void 0 : action.key, mode: 'inline' }),
8909
+ listNodes: nodes,
8910
+ activeId,
8911
+ createdAt: new Date().getTime(),
8912
+ botId: params.bot_id,
8913
+ };
8914
+ localStorage.setItem(STATE_SUBOT_INLINE_KEY, JSON.stringify(currentState));
8915
+ const urlObj = getURLwithSSOTracking(window.location.href, {
8916
+ botItem: nodes[0],
8917
+ });
8918
+ urlObj.searchParams.set('bot_id', String(params.bot_id));
8919
+ urlObj.searchParams.set('mode', 'inline');
8920
+ urlObj.searchParams.set('source', 'subot-inline');
8921
+ const returnUrl = urlObj.href;
8922
+ if (IS_SSOV2_ENABLED()) {
8923
+ useSSOV2Store.getState().triggerLogin({
8924
+ returnUrl,
8925
+ source: `subot-inline`,
8926
+ });
8927
+ }
8928
+ else {
8929
+ window.location.href = `${SSO_URL}?returnUrl=${encodeURIComponent(returnUrl)}`;
8930
+ }
8931
+ }
8932
+ };
8933
+ return (React__default.createElement(SubotInlineContainer$1, null,
8934
+ React__default.createElement(SubotInlineHeader$1, null),
8935
+ React__default.createElement(SubotInlineWrapper$1, null,
8936
+ React__default.createElement(SubotInlineIntentContainer, null,
8937
+ React__default.createElement(SubotInlineIntent, { intents: [
8938
+ ...((node === null || node === void 0 ? void 0 : node.intents) || []),
8939
+ ...ssoIntents(f),
8940
+ ], indexNumber: indexNumber })),
8941
+ React__default.createElement(SubotInlineActionContainer, null,
8942
+ React__default.createElement(SubotInlineAction, { actions: node === null || node === void 0 ? void 0 : node.actions, onChange: handleOnChange }))),
8943
+ React__default.createElement(SubotInlineFooter$1, { onBack: () => onPrev && onPrev(), backProps: { isDisabled: !!(indexNumber === 1) }, hideNext: true })));
8944
+ };
8945
+
8946
+ const SubotInlineNodeText = ({ node, indexNumber, }) => {
8947
+ const { formatMessage: f, action: { pushNotifications }, } = useContext(TogetherComponentGlobalContext);
8948
+ const { nodes, activeId, params, onSubmit, onPrev, onNext, onChange } = useContext(SubotInlineContext);
8949
+ const [value, setValue] = useState((node === null || node === void 0 ? void 0 : node._message) || {});
8950
+ const handleOnChangeNormal = (action) => __awaiter(void 0, void 0, void 0, function* () {
8951
+ const _message = Object.assign(Object.assign(Object.assign(Object.assign({}, params), value), { node_id: node.id, action_id: action === null || action === void 0 ? void 0 : action.id, action_value: action === null || action === void 0 ? void 0 : action.key }), getCurrentTotalDynamicScore(nodes, activeId, action.id));
8952
+ delete _message.form_submit_meta;
8953
+ const res = yield subotInlineMessage(_message);
8954
+ if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
8955
+ const _a = res === null || res === void 0 ? void 0 : res._data, { node: _node } = _a, restData = __rest(_a, ["node"]);
8956
+ const _nextNode = Object.assign(Object.assign({}, _node), { _message: Object.assign(Object.assign({}, restData), { node_id: _node.id }) });
8957
+ onSubmit && onSubmit(_nextNode, _message);
8958
+ }
8959
+ });
8960
+ const handleOnChange = (action, formSubmitMeta) => __awaiter(void 0, void 0, void 0, function* () {
8961
+ if (!action)
8962
+ return;
8963
+ const actionWithOther = (action === null || action === void 0 ? void 0 : action.type) === NodeActionType.USER_CHOICE_TEXT_BY_INPUT ||
8964
+ (action === null || action === void 0 ? void 0 : action.type) === NodeActionType.POLL_CHOICE_TEXT_BY_INPUT;
8965
+ const newValue = Object.assign(Object.assign({}, value), { action_id: action === null || action === void 0 ? void 0 : action.id, action_value: action === null || action === void 0 ? void 0 : action.key, form_submit_meta: formSubmitMeta });
8966
+ if (actionWithOther) {
8967
+ setValue(newValue);
8968
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
8969
+ return;
8970
+ }
8971
+ delete newValue.form_submit_meta;
8972
+ setValue(newValue);
8973
+ handleOnChangeNormal(action);
8974
+ });
8975
+ const handleOnNext = () => {
8976
+ const newMessage = JSON.parse(JSON.stringify(Object.assign(Object.assign(Object.assign({}, params), node === null || node === void 0 ? void 0 : node._message), value)));
8977
+ if ((value === null || value === void 0 ? void 0 : value.action_id) &&
8978
+ (value === null || value === void 0 ? void 0 : value.action_value) === KEY_OF_TEXT_CHOICE_WITH_OTHER_FIELD) {
8979
+ onNext === null || onNext === void 0 ? void 0 : onNext(newMessage);
8980
+ return;
8981
+ }
8982
+ if (!(value === null || value === void 0 ? void 0 : value.action_id) || !(value === null || value === void 0 ? void 0 : value.action_value)) {
8983
+ pushNotifications({
8984
+ title: '',
8985
+ message: f({
8986
+ id: 'multiSelectError.required',
8987
+ defaultMessage: `There is no answer!`,
8988
+ }),
8989
+ type: 'warning', // "success" | "danger" | "info" | "warning"
8990
+ });
8991
+ }
8992
+ else {
8993
+ delete newMessage.form_submit_meta;
8994
+ onNext === null || onNext === void 0 ? void 0 : onNext(newMessage);
8995
+ }
8996
+ };
8997
+ return (React__default.createElement(SubotInlineContainer$1, null,
8998
+ React__default.createElement(SubotInlineHeader$1, null),
8999
+ React__default.createElement(SubotInlineWrapper$1, null,
9000
+ React__default.createElement(SubotInlineIntentContainer, null,
9001
+ React__default.createElement(SubotInlineIntent, { intents: (node === null || node === void 0 ? void 0 : node.intents) || [], indexNumber: indexNumber })),
9002
+ React__default.createElement(SubotInlineActionContainer, null,
9003
+ React__default.createElement(SubotInlineAction, { value: (value === null || value === void 0 ? void 0 : value.action_id) ? [value === null || value === void 0 ? void 0 : value.action_id] : [], actions: node === null || node === void 0 ? void 0 : node.actions, onChange: handleOnChange, formSubmitMeta: value === null || value === void 0 ? void 0 : value.form_submit_meta }))),
9004
+ React__default.createElement(SubotInlineFooter$1, { onBack: () => onPrev && onPrev(), backProps: { isDisabled: !!(indexNumber === 1) }, onNext: handleOnNext })));
9005
+ };
9006
+
9007
+ const SubotInlineNodeBase = {
9008
+ TEXT: SubotInlineNodeText,
9009
+ IMAGE: SubotInlineNodeImage,
9010
+ FORM: SubotInlineNodeForm,
9011
+ CONDITION: SubotInlineNode,
9012
+ FINAL_STANDARD: SubotInlineNodeFinal,
9013
+ FINAL: SubotInlineNodeFinal,
9014
+ FINAL_THANK_YOU: SubotInlineNodeFinalThankYou,
9015
+ SSO: SubotInlineNodeSSO,
9016
+ MULTIPLE: SubotInlineNodeMultiple,
9017
+ POLL: SubotInlineNodePoll,
9018
+ RATING: SubotInlineNodeRating,
9019
+ REACTION: SubotInlineNodeReaction,
9020
+ REVIEW: SubotInlineNodeReview,
9021
+ RESULT_POLL: SubotInlineNodeResultPoll,
9022
+ OTP: SubotInlineNodeOTP,
9023
+ // RESULT_RATING = 12,
9024
+ // RESULT_REACTION = 13,
9025
+ };
9026
+
9027
+ const SubotInlineButton = styled(Button$1) `
9028
+ margin-top: 24px;
9029
+ ${MediaQueries.mbUp} {
9030
+ margin-top: 16px;
9031
+ }
9032
+ `;
9033
+ const SubotInlineDescription = styled.div `
9034
+ margin-top: 24px;
9035
+ `;
9036
+ const SubotInlineReview = styled(Text$1) `
9037
+ text-align: center;
9038
+ ${MediaQueries.mbUp} {
9039
+ text-align: left;
9040
+ }
9041
+ `;
9042
+ const SubotInlineTitle = styled(Heading) `
9043
+ text-align: center;
9044
+ margin-bottom: 8px;
9045
+
9046
+ ${MediaQueries.mbUp} {
9047
+ margin-bottom: 0;
9048
+ text-align: left;
9049
+ }
9050
+ `;
9051
+ const SubotInlineImage = styled.div `
9052
+ background-color: #ffffff;
9053
+ border-radius: 50%;
9054
+ width: 120px;
9055
+ height: 120px;
9056
+ object-fit: contain;
9057
+ overflow: hidden;
9058
+ flex-shrink: 0;
9059
+
9060
+ img {
9061
+ width: 100%;
9062
+ height: 100%;
9063
+ object-fit: cover;
9064
+ }
9065
+ `;
9066
+ const SubotInlineContent = styled.div `
9067
+ flex-grow: 1;
9068
+ ${MediaQueries.tdDown} {
9069
+ width: 100%;
9070
+ margin-left: 0;
9071
+ }
9072
+ `;
9073
+ const SubotInlineStartWrapper = styled.div `
9074
+ position: relative;
9075
+ display: flex;
9076
+ gap: 24px;
9077
+ ${MediaQueries.mbDown} {
9078
+ flex-wrap: wrap;
9079
+ justify-content: center;
9080
+ }
9081
+ `;
9082
+ const SubotInlineStartContainer = styled.div `
9083
+ position: relative;
9084
+ overflow: hidden;
9085
+ background-color: ${theme.colors.primary50};
9086
+ padding: 32px;
9087
+ border-radius: ${theme.borderRadius};
9088
+ background-image: url('/images/subot-bg-transparent.png');
9089
+ background-size: contain;
9090
+ background-repeat: repeat-y;
9091
+ ${MediaQueries.mbDown} {
9092
+ padding: 24px;
9093
+ }
9094
+ `;
9095
+ const SubotInlineNodeStart = ({ node, setLoading, }) => {
9096
+ const startRef = useRef({
9097
+ impress: false,
9098
+ });
9099
+ const userInfo = GlobalData === null || GlobalData === void 0 ? void 0 : GlobalData.userInfo;
9100
+ const { params, onNext, trackingCommonInline, isMobile } = useContext(SubotInlineContext);
9101
+ const handleOnClick = (isCountClick = true) => () => {
9102
+ if (isCountClick) {
9103
+ const queryParams = {
9104
+ cookie_id: params.cookie_id,
9105
+ window_id: params.window_id,
9106
+ bot_id: params.bot_id,
9107
+ title_url: params.title_url,
9108
+ url: params.url,
9109
+ gtm_id: params.gtm_id,
9110
+ ga_client_id: params.ga_client_id,
9111
+ device_id: checkMobile(window.navigator.userAgent) ? 2 : 1,
9112
+ account_id: params.account_id || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.id) || null,
9113
+ };
9114
+ subotInlineClick(queryParams);
9115
+ }
9116
+ onNext && onNext();
9117
+ };
9118
+ useEffect(() => {
9119
+ const inViewport = (element, callback, options = {}) => {
9120
+ if (!!window.IntersectionObserver && !startRef.current.impress) {
9121
+ const observer = new IntersectionObserver((entries, observer) => {
9122
+ entries.forEach((entry) => callback(entry, observer));
9123
+ }, options);
9124
+ observer.observe(element);
9125
+ }
9126
+ };
9127
+ const eventScrollImpress = () => {
9128
+ if (startRef.current.element) {
9129
+ inViewport(startRef.current.element, (element, observer) => {
9130
+ /** Not in viewport */
9131
+ if (!element.isIntersecting) {
9132
+ if (startRef.current.impress) {
9133
+ startRef.current.impress = false;
9134
+ }
9135
+ return;
9136
+ }
9137
+ if (!startRef.current.impress) {
9138
+ startRef.current.impress = true;
9139
+ if (startRef.current.debounce) {
9140
+ clearTimeout(startRef.current.debounce);
9141
+ }
9142
+ if (!(node === null || node === void 0 ? void 0 : node.inline_start_button)) {
9143
+ setLoading(true);
9144
+ }
9145
+ startRef.current.debounce = setTimeout(() => {
9146
+ const queryParams = {
9147
+ cookie_id: params.cookie_id,
9148
+ window_id: params.window_id,
9149
+ bot_id: params.bot_id,
9150
+ title_url: params.title_url,
9151
+ url: params.url,
9152
+ gtm_id: params.gtm_id,
9153
+ ga_client_id: params.ga_client_id,
9154
+ device_id: checkMobile(window.navigator.userAgent) ? 2 : 1,
9155
+ account_id: params.account_id || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.id) || null,
9156
+ };
9157
+ queryParams && subotInlineImpression(queryParams);
9158
+ /** Auto skip the starting node in the case
9159
+ * CTA Start value is not contributed on Subot Admin */
9160
+ if (!(node === null || node === void 0 ? void 0 : node.inline_start_button)) {
9161
+ handleOnClick(false)();
9162
+ }
9163
+ }, 400);
9164
+ startRef.current.element &&
9165
+ (observer === null || observer === void 0 ? void 0 : observer.unobserve(startRef.current.element));
9166
+ }
9167
+ }, {
9168
+ rootMargin: '1000px',
9169
+ });
9170
+ }
9171
+ };
9172
+ eventScrollImpress();
9173
+ window.addEventListener('scroll', eventScrollImpress, { passive: true });
9174
+ return () => window.removeEventListener('scroll', eventScrollImpress);
9175
+ }, [onNext]);
9176
+ if (!node)
9177
+ return null;
9178
+ return (React__default.createElement(SubotInlineStartContainer, null,
9179
+ React__default.createElement(SubotInlineStartWrapper, { ref: (ref) => (startRef.current.element = ref) },
9180
+ node.inline_image && (React__default.createElement(SubotInlineImage, null,
9181
+ React__default.createElement("img", { loading: "lazy", src: node.inline_image, alt: "" }))),
9182
+ React__default.createElement(SubotInlineContent, null,
9183
+ node.inline_title || node.inline_headline ? (React__default.createElement(SubotInlineTitle, { tag: "h3", fontWeight: "bold", color: theme.colors.secondaryBase },
9184
+ React__default.createElement(Markdown, null, node.inline_title || node.inline_headline))) : null,
9185
+ node.inline_review && (React__default.createElement(SubotInlineReview, { size: "s4", color: theme.colors.gray600,
9186
+ // fix error html, div is not allowed as child of p
9187
+ as: 'div' },
9188
+ React__default.createElement(Markdown, null, node.inline_review))),
9189
+ node.inline_start_button && (React__default.createElement(SubotInlineButton, Object.assign({ size: "md", isBlock: isMobile, onClick: handleOnClick(true), className: "pointer-event-child-none" }, trackingCommonInline, { "data-event-action": "Start" }), node.inline_start_button)))),
9190
+ React__default.createElement(SubotInlineDescription, null,
9191
+ React__default.createElement(Markdown, null, node.inline_description))));
9192
+ };
9193
+
9194
+ const SubotInlineLoading = styled.div `
9195
+ position: absolute;
9196
+ z-index: 2;
9197
+ top: 0;
9198
+ right: 0;
9199
+ bottom: 0;
9200
+ left: 0;
9201
+ display: flex;
9202
+ flex-direction: column;
9203
+ align-items: center;
9204
+ justify-content: center;
9205
+ color: ${theme.colors.gray800};
9206
+ opacity: 0;
9207
+ pointer-events: none;
9208
+ &:before {
9209
+ position: absolute;
9210
+ z-index: -1;
9211
+ top: 0;
9212
+ right: 0;
9213
+ bottom: 0;
9214
+ left: 0;
9215
+ background-color: ${theme.colors.neutral50 || '#F7F9FC'};
9216
+ content: '';
9217
+ opacity: 1;
9218
+ }
9219
+ ${({ isLoading }) => isLoading && ` opacity: 1; pointer-events: auto; `};
9220
+ `;
9221
+ const SubotInlineLoadingContainer = styled.div `
9222
+ position: relative;
9223
+ z-index: 1;
9224
+ line-height: 1.5;
9225
+ transition: 0.25s all linear;
9226
+ margin-block: 16px;
9227
+ content-visibility: auto;
9228
+ contain-intrinsic-size: 500px;
9229
+ &.hhg-subot-style {
9230
+ min-height: 100px;
9231
+ }
9232
+ ${MediaQueries.mbDown} {
9233
+ margin-right: -1rem;
9234
+ margin-left: -1rem;
9235
+ }
9236
+ `;
9237
+ const SubotInline = ({ id, isMobile, articleLink, customUrl, }) => {
9238
+ const currentUrl = useCurrentUrl();
9239
+ const refAccountIdFromLogs = useRef(null);
9240
+ const flag = useRef(null);
9241
+ const [loading, setLoading] = useState(true);
9242
+ const [state, setState] = useState({
9243
+ activeId: '',
9244
+ params: {},
9245
+ nodes: [],
9246
+ getParams: () => ({}),
9247
+ });
9248
+ const userInfo = GlobalData === null || GlobalData === void 0 ? void 0 : GlobalData.userInfo;
9249
+ const currentNode = useMemo(() => {
9250
+ return state.nodes.find((n) => n.id == state.activeId);
9251
+ }, [state.nodes, state.activeId]);
9252
+ const trackingCommonInline = useMemo(() => ({
9253
+ 'data-event-category': 'Subot',
9254
+ 'data-event-label': currentUrl,
9255
+ 'data-bot-id': state.params.bot_id,
9256
+ 'data-bot-type': 'Inline',
9257
+ 'data-question-id': typeof (currentNode === null || currentNode === void 0 ? void 0 : currentNode.id) === 'string' ? currentNode === null || currentNode === void 0 ? void 0 : currentNode.id : null,
9258
+ }), [currentNode, currentUrl, state.params.bot_id]);
9259
+ /** Get Params */
9260
+ const getParams = useCallback(() => {
9261
+ var _a, _b, _c, _d;
9262
+ const gaData = window.gaData;
9263
+ const _url = (customUrl || window.location.origin + basePath) +
9264
+ (GlobalData.locale === 'tl-PH'
9265
+ ? articleLink.replace('fil/', '')
9266
+ : articleLink);
9267
+ const params = {
9268
+ bot_id: id,
9269
+ account_id: ((_a = getUserInfoFromCookie()) === null || _a === void 0 ? void 0 : _a.id) || null,
9270
+ action_id: '',
9271
+ action_value: '',
9272
+ cookie_id: getSubotCookieId((_c = (_b = GlobalData === null || GlobalData === void 0 ? void 0 : GlobalData.router) === null || _b === void 0 ? void 0 : _b.query) === null || _c === void 0 ? void 0 : _c.cookie_id),
9273
+ current_score: 0,
9274
+ current_keys: [],
9275
+ current_selected: [],
9276
+ form_submit_meta: [],
9277
+ gtm_id: gaData ? Object.keys(gaData)[0] : '',
9278
+ ga_client_id: Cookies.get('_ga') || '',
9279
+ is_new: false,
9280
+ mode: 'inline',
9281
+ node_id: '',
9282
+ selected_actions: {},
9283
+ title_url: document.title || '',
9284
+ // url: _url,
9285
+ // Keep this commnent line to test on local
9286
+ url: _url
9287
+ .replace('http://localhost', 'https://discover.hellobacsi.com')
9288
+ .replace('dev.', 'discover.'),
9289
+ window_id: getWindowId(),
9290
+ };
9291
+ return overrideParamsByQuery(params, (_d = GlobalData === null || GlobalData === void 0 ? void 0 : GlobalData.router) === null || _d === void 0 ? void 0 : _d.query);
9292
+ }, []);
9293
+ const elementScrollIntoView = () => {
9294
+ flag.current &&
9295
+ flag.current.scrollIntoView({
9296
+ behavior: 'smooth',
9297
+ block: 'start',
9298
+ inline: 'start',
9299
+ });
9300
+ };
9301
+ const onChange = (message) => {
9302
+ setState((state) => {
9303
+ var _a;
9304
+ if (message && (message === null || message === void 0 ? void 0 : message.node_id) && (message === null || message === void 0 ? void 0 : message.node_id) == (state === null || state === void 0 ? void 0 : state.activeId)) {
9305
+ const nodeActiveIndex = state.nodes.findIndex(({ id }) => id == (state === null || state === void 0 ? void 0 : state.activeId));
9306
+ if (nodeActiveIndex !== -1) {
9307
+ const tmpNode = Object.assign(Object.assign({}, state.nodes[nodeActiveIndex]), { _message: Object.assign(Object.assign({}, (_a = state.nodes[nodeActiveIndex]) === null || _a === void 0 ? void 0 : _a._message), message) });
9308
+ state.nodes[nodeActiveIndex] = tmpNode;
9309
+ }
9310
+ }
9311
+ return Object.assign({}, state);
9312
+ });
9313
+ };
9314
+ const onSubmit = (nextNode, message) => __awaiter(void 0, void 0, void 0, function* () {
9315
+ /**
9316
+ * Skip the OTP Node if user's phone number is verified.
9317
+ */
9318
+ // if (nextNode) {
9319
+ // const isNextNodeOTP = nextNode.type === NodeType.OTP
9320
+ // if (isNextNodeOTP && verifiedPhone) {
9321
+ // const actionOTPSubmit = nextNode.actions?.find(
9322
+ // (action) => action.type === NodeActionType.USER_SUBMIT_SEND,
9323
+ // )
9324
+ // const blockOTPMessage: SubotMessage = {
9325
+ // ...state.params,
9326
+ // node_id: nextNode.id,
9327
+ // action_id: actionOTPSubmit?.id,
9328
+ // action_value: actionOTPSubmit?.key,
9329
+ // }
9330
+ // const res = await subotInlineMessage(blockOTPMessage)
9331
+ // if (res?._status === 1) {
9332
+ // const { node: _node, ...restData } = res?._data
9333
+ // const nextNodeAfterOTP = {
9334
+ // ..._node,
9335
+ // _message: { ...restData, node_id: _node.id },
9336
+ // }
9337
+ // onSubmit && onSubmit(nextNodeAfterOTP, message)
9338
+ // return
9339
+ // }
9340
+ // pushNotifications({
9341
+ // title: '',
9342
+ // message: f({ id: 'notification.comment.somethingWrong' }),
9343
+ // type: 'danger',
9344
+ // })
9345
+ // return
9346
+ // }
9347
+ // }
9348
+ const _state = Object.assign(Object.assign({}, state), { nodes: [...state.nodes] });
9349
+ if (message && (message === null || message === void 0 ? void 0 : message.node_id)) {
9350
+ const updateNodeIndex = _state.nodes.findIndex(({ id }) => id == message.node_id);
9351
+ if (updateNodeIndex !== -1) {
9352
+ _state.nodes[updateNodeIndex]._message = Object.assign(Object.assign({}, _state.nodes[updateNodeIndex]._message), message);
9353
+ _state.nodes = [..._state.nodes.slice(0, updateNodeIndex + 1)];
9354
+ }
9355
+ }
9356
+ setLoading(true);
9357
+ if (nextNode) {
9358
+ const nextNodeFindIndex = _state.nodes.findIndex(({ id }) => id == (nextNode === null || nextNode === void 0 ? void 0 : nextNode.id));
9359
+ if (nextNodeFindIndex === -1) {
9360
+ _state.nodes = [..._state.nodes, Object.assign({}, nextNode)];
9361
+ }
9362
+ else {
9363
+ const tmpNode = Object.assign(Object.assign(Object.assign({}, _state.nodes[nextNodeFindIndex]), nextNode), { _message: Object.assign(Object.assign({}, _state.nodes[nextNodeFindIndex]._message), nextNode === null || nextNode === void 0 ? void 0 : nextNode._message) });
9364
+ _state.nodes = [
9365
+ ..._state.nodes.slice(0, nextNodeFindIndex),
9366
+ Object.assign({}, tmpNode),
9367
+ ..._state.nodes.slice(nextNodeFindIndex + 1),
9368
+ ];
9369
+ }
9370
+ _state.activeId = nextNode.id;
9371
+ }
9372
+ setTimeout(() => {
9373
+ setState(_state);
9374
+ setLoading(false);
9375
+ _state.activeId &&
9376
+ saveSubotInlineLogs({
9377
+ nodes: _state.nodes,
9378
+ activeId: _state.activeId,
9379
+ params: _state.params,
9380
+ accountIdFromLogs: refAccountIdFromLogs.current,
9381
+ });
9382
+ }, 250);
9383
+ elementScrollIntoView();
9384
+ });
9385
+ const onPrev = () => {
9386
+ var _a;
9387
+ const _state = Object.assign({}, state);
9388
+ const nodeActiveIndex = (_a = _state === null || _state === void 0 ? void 0 : _state.nodes) === null || _a === void 0 ? void 0 : _a.findIndex(({ id }) => id == (_state === null || _state === void 0 ? void 0 : _state.activeId));
9389
+ if (nodeActiveIndex && nodeActiveIndex !== -1 && nodeActiveIndex > 1) {
9390
+ const prevNode = _state.nodes[nodeActiveIndex - 1];
9391
+ if (prevNode)
9392
+ _state.activeId = prevNode.id;
9393
+ }
9394
+ elementScrollIntoView();
9395
+ setState(Object.assign({}, _state));
9396
+ _state.activeId &&
9397
+ saveSubotInlineLogs({
9398
+ nodes: _state.nodes,
9399
+ activeId: _state.activeId,
9400
+ params: _state.params,
9401
+ accountIdFromLogs: refAccountIdFromLogs.current,
9402
+ });
9403
+ };
9404
+ const onNext = (message) => __awaiter(void 0, void 0, void 0, function* () {
9405
+ if (message && (message === null || message === void 0 ? void 0 : message.node_id)) {
9406
+ const newMessage = Object.assign(Object.assign({}, message), getCurrentTotalDynamicScore(state.nodes, state.activeId, message.action_id));
9407
+ const res = yield subotInlineMessage(newMessage);
9408
+ setLoading(false);
9409
+ if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
9410
+ const _a = res === null || res === void 0 ? void 0 : res._data, { node: _node } = _a, restData = __rest(_a, ["node"]);
9411
+ const _nextNode = Object.assign(Object.assign({}, _node), { _message: Object.assign(Object.assign({}, restData), { node_id: _node.id }) });
9412
+ const nextNodeFindIndex = state.nodes.findIndex(({ id }) => id === _nextNode.id);
9413
+ if (nextNodeFindIndex !== -1) {
9414
+ onSubmit(_nextNode);
9415
+ }
9416
+ else {
9417
+ onSubmit(_nextNode, message);
9418
+ }
9419
+ return;
9420
+ }
9421
+ }
9422
+ const nodeActive = state.nodes.find(({ id }) => id == (state === null || state === void 0 ? void 0 : state.activeId));
9423
+ if (nodeActive && !nodeActive.hasOwnProperty('type')) {
9424
+ setLoading(true);
9425
+ if (state.nodes[0].id == (state === null || state === void 0 ? void 0 : state.activeId)) {
9426
+ // elementScrollIntoView()
9427
+ setTimeout(() => {
9428
+ setState(Object.assign(Object.assign({}, state), { activeId: state.nodes[1].id.toString() }));
9429
+ setLoading(false);
9430
+ saveSubotInlineLogs({
9431
+ nodes: state.nodes,
9432
+ activeId: state.nodes[1].id.toString(),
9433
+ params: getParams(),
9434
+ accountIdFromLogs: refAccountIdFromLogs.current,
9435
+ });
9436
+ }, 250);
9437
+ }
9438
+ }
9439
+ });
9440
+ const onReset = () => {
9441
+ setLoading(true);
9442
+ setState((state) => {
9443
+ state.nodes = state.nodes.slice(0, 2);
9444
+ state.nodes[1] = Object.assign(Object.assign({}, state.nodes[1]), { _message: undefined });
9445
+ state.activeId = state.nodes[0].id.toString();
9446
+ return Object.assign({}, state);
9447
+ });
9448
+ setTimeout(() => {
9449
+ setLoading(false);
9450
+ }, 250);
9451
+ elementScrollIntoView();
9452
+ };
9453
+ const getFirstAPI = (params) => __awaiter(void 0, void 0, void 0, function* () {
9454
+ var _b;
9455
+ if ((params === null || params === void 0 ? void 0 : params.url) && (params === null || params === void 0 ? void 0 : params.bot_id)) {
9456
+ let activeId = '';
9457
+ let nodes = [];
9458
+ setLoading(true);
9459
+ const resFirst = yield subotInlineFirstNode(params.bot_id);
9460
+ if ((resFirst === null || resFirst === void 0 ? void 0 : resFirst._status) === 1) {
9461
+ activeId = resFirst === null || resFirst === void 0 ? void 0 : resFirst._data.id.toString();
9462
+ nodes.push(resFirst === null || resFirst === void 0 ? void 0 : resFirst._data, resFirst === null || resFirst === void 0 ? void 0 : resFirst._data.first_node);
9463
+ }
9464
+ const subotLogs = yield getSubotInlineLogs(nodes[0]);
9465
+ if (subotLogs) {
9466
+ const lastNode = subotLogs.nodes[subotLogs.nodes.length - 1];
9467
+ const isComplete = [
9468
+ NodeType.FINAL,
9469
+ NodeType.FINAL_THANK_YOU,
9470
+ NodeType.FINAL_STANDARD,
9471
+ ].includes(lastNode.type);
9472
+ if (!isComplete) {
9473
+ nodes = subotLogs.nodes;
9474
+ activeId = subotLogs.activeId;
9475
+ refAccountIdFromLogs.current = ((_b = subotLogs.params) === null || _b === void 0 ? void 0 : _b.account_id) || 0;
9476
+ }
9477
+ }
9478
+ /** [Subot Inline] Show result page after redirect from SSO */
9479
+ const previousState = getPreviousStateFromStorage(params.bot_id, {
9480
+ getParams,
9481
+ });
9482
+ if (previousState &&
9483
+ previousState.params.action_id &&
9484
+ previousState.params.action_value) {
9485
+ const resResultInline = yield subotInlineMessage(previousState.params);
9486
+ if ((resResultInline === null || resResultInline === void 0 ? void 0 : resResultInline._status) === 1 && (resResultInline === null || resResultInline === void 0 ? void 0 : resResultInline._data.node)) {
9487
+ activeId = resResultInline === null || resResultInline === void 0 ? void 0 : resResultInline._data.node.id;
9488
+ nodes = previousState.listNodes;
9489
+ nodes[nodes.length - 1] = resResultInline === null || resResultInline === void 0 ? void 0 : resResultInline._data.node;
9490
+ saveSubotInlineLogs({
9491
+ nodes,
9492
+ activeId: activeId,
9493
+ params: previousState.params,
9494
+ accountIdFromLogs: refAccountIdFromLogs.current,
9495
+ });
9496
+ setTimeout(() => {
9497
+ elementScrollIntoView();
9498
+ }, 100);
9499
+ }
9500
+ }
9501
+ const newParams = (previousState === null || previousState === void 0 ? void 0 : previousState.params) || (subotLogs === null || subotLogs === void 0 ? void 0 : subotLogs.params) || params;
9502
+ const _state = Object.assign(Object.assign({}, state), { params: newParams, activeId, nodes: nodes });
9503
+ setLoading(false);
9504
+ setState(_state);
9505
+ }
9506
+ });
9507
+ useEffect(() => {
9508
+ var _a;
9509
+ if (!!((_a = state === null || state === void 0 ? void 0 : state.nodes) === null || _a === void 0 ? void 0 : _a.length)) {
9510
+ console.log('Subot Already Loaded');
9511
+ return () => undefined;
9512
+ }
9513
+ if (!Cookies.get(GA_TOKEN_COOKIE)) {
9514
+ checkUntilFinished({
9515
+ condition: () => Boolean(Cookies.get(GA_TOKEN_COOKIE)),
9516
+ finished: () => {
9517
+ const params = getParams();
9518
+ getFirstAPI(params);
9519
+ },
9520
+ });
9521
+ }
9522
+ else {
9523
+ const params = getParams();
9524
+ getFirstAPI(params);
9525
+ }
9526
+ }, []);
9527
+ if (state.nodes.length && !state.nodes[0].inline_active) {
9528
+ return null;
9529
+ }
9530
+ return (React__default.createElement(SubotInlineContext.Provider, { value: Object.assign(Object.assign({}, state), { isMobile,
9531
+ getParams,
9532
+ onChange,
9533
+ onSubmit,
9534
+ onPrev,
9535
+ onNext,
9536
+ onReset,
9537
+ trackingCommonInline,
9538
+ userInfo }) },
9539
+ React__default.createElement(SubotInlineLoadingContainer, { className: classNames('hhg-subot', `hhg-subot-${id}`, !!state.nodes.length && 'hhg-subot-style') }, !!state.nodes.length && (React__default.createElement(React__default.Fragment, null,
9540
+ React__default.createElement("div", { ref: flag, className: "hhg-flag", style: {
9541
+ position: 'absolute',
9542
+ top: -150,
9543
+ left: 0,
9544
+ pointerEvents: 'none',
9545
+ } }),
9546
+ React__default.createElement(SubotInlineLoading, { isLoading: !!loading },
9547
+ React__default.createElement(Loading, null),
9548
+ "Verifying..."),
9549
+ state.nodes.map((node, index) => {
9550
+ if (node.id.toString() === (state === null || state === void 0 ? void 0 : state.activeId)) {
9551
+ if (node.hasOwnProperty('type')) {
9552
+ let NodeComponent;
9553
+ switch (node === null || node === void 0 ? void 0 : node.position) {
9554
+ case NodePosition.SSO:
9555
+ NodeComponent =
9556
+ SubotInlineNodeBase[NodePosition[node === null || node === void 0 ? void 0 : node.position].valueOf()];
9557
+ break;
9558
+ default:
9559
+ NodeComponent =
9560
+ SubotInlineNodeBase[NodeType[node === null || node === void 0 ? void 0 : node.type].valueOf()];
9561
+ }
9562
+ if (node.is_multi_select &&
9563
+ node.type !== NodeType.POLL)
9564
+ NodeComponent = SubotInlineNodeBase['MULTIPLE'];
9565
+ return (NodeComponent && (React__default.createElement(NodeComponent, { key: index.toString(), indexNumber: index, node: node })));
9566
+ }
9567
+ else {
9568
+ return (React__default.createElement(SubotInlineNodeStart, { key: index.toString(), node: node, setLoading: setLoading }));
9569
+ }
9570
+ }
9571
+ return null;
9572
+ }))))));
9573
+ };
9574
+
6422
9575
  // subot.sendOTP.button
6423
9576
  // subot.resendOTP.button
6424
9577
  // subot.verifyOTP.button
@@ -6458,6 +9611,7 @@ var index = /*#__PURE__*/Object.freeze({
6458
9611
  Markdown: Markdown,
6459
9612
  hexRgb: hexRgb,
6460
9613
  SubotInlineVoucherLeftUI: SubotInlineVoucherLeftUI,
9614
+ SubotInline: SubotInline,
6461
9615
  overrideParamsByQuery: overrideParamsByQuery,
6462
9616
  ssoIntents: ssoIntents,
6463
9617
  checkUntilFinished: checkUntilFinished,
@@ -6473,11 +9627,11 @@ var index = /*#__PURE__*/Object.freeze({
6473
9627
  isFakeEmail: isFakeEmail,
6474
9628
  formatUrlWithEncrypedGa: formatUrlWithEncrypedGa,
6475
9629
  getSubotApiPath: getSubotApiPath,
6476
- subotInlineMessage: subotInlineMessage,
6477
- computeExtraSettingsForBot: computeExtraSettingsForBot,
6478
- subotInlineFirstNode: subotInlineFirstNode,
6479
- subotInlineClick: subotInlineClick,
6480
- subotInlineImpression: subotInlineImpression,
9630
+ subotInlineMessage: subotInlineMessage$1,
9631
+ computeExtraSettingsForBot: computeExtraSettingsForBot$1,
9632
+ subotInlineFirstNode: subotInlineFirstNode$1,
9633
+ subotInlineClick: subotInlineClick$1,
9634
+ subotInlineImpression: subotInlineImpression$1,
6481
9635
  PATHS: PATHS$1,
6482
9636
  getPreviousStateFromStorage: getPreviousStateFromStorage,
6483
9637
  getSubotInlineLogs: getSubotInlineLogs,
@@ -6488,7 +9642,7 @@ var index = /*#__PURE__*/Object.freeze({
6488
9642
  detectToSkipNodeStart: detectToSkipNodeStart,
6489
9643
  KEY_OF_TEXT_CHOICE_WITH_OTHER_FIELD: KEY_OF_TEXT_CHOICE_WITH_OTHER_FIELD,
6490
9644
  SubotInlineIntentBaseTarget: SubotInlineIntentBaseTarget,
6491
- SubotInlineIntentBase: SubotInlineIntentBase,
9645
+ SubotInlineIntentBase: SubotInlineIntentBase$1,
6492
9646
  checkSyncDataOnFrisoCampaign: checkSyncDataOnFrisoCampaign,
6493
9647
  handleFrisoRedirecition: handleFrisoRedirecition,
6494
9648
  getDynamicScore: getDynamicScore,
@@ -6496,4 +9650,4 @@ var index = /*#__PURE__*/Object.freeze({
6496
9650
  replaceTextWithVariables: replaceTextWithVariables
6497
9651
  });
6498
9652
 
6499
- export { KEY_OF_TEXT_CHOICE_WITH_OTHER_FIELD, Markdown, PATHS$1 as PATHS, SubotInlineIntentBase, SubotInlineIntentBaseTarget, SubotInlineRevampWithTheme, SubotInlineVoucherLeftUI, UserInfoForm, checkSyncDataOnFrisoCampaign, computeExtraSettingsForBot, ContainerWithProvider as default, detectToSkipNodeStart, extractUnifiedAnswers, extractVoucherAnswers, getColorWithOpacity, getCurrentTotalDynamicScore, getDynamicScore, getPreviousStateFromStorage, getSubotApiPath, getSubotInlineLogs, handleFrisoRedirecition, hexRgb, replaceTextWithVariables, saveSubotInlineLogs, subotInlineClick, subotInlineFirstNode, subotInlineImpression, subotInlineMessage };
9653
+ export { KEY_OF_TEXT_CHOICE_WITH_OTHER_FIELD, Markdown, PATHS$1 as PATHS, SubotInline, SubotInlineIntentBase$1 as SubotInlineIntentBase, SubotInlineIntentBaseTarget, SubotInlineRevampWithTheme, SubotInlineVoucherLeftUI, UserInfoForm, checkSyncDataOnFrisoCampaign, computeExtraSettingsForBot$1 as computeExtraSettingsForBot, ContainerWithProvider as default, detectToSkipNodeStart, extractUnifiedAnswers, extractVoucherAnswers, getColorWithOpacity, getCurrentTotalDynamicScore, getDynamicScore, getPreviousStateFromStorage, getSubotApiPath, getSubotInlineLogs, handleFrisoRedirecition, hexRgb, replaceTextWithVariables, saveSubotInlineLogs, subotInlineClick$1 as subotInlineClick, subotInlineFirstNode$1 as subotInlineFirstNode, subotInlineImpression$1 as subotInlineImpression, subotInlineMessage$1 as subotInlineMessage };