@hhgtech/hhg-components 1.29.527 → 1.29.529-beta-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (579) hide show
  1. package/build/{InputDate-4723615c.js → InputDate-5e4a49ed.js} +5 -5
  2. package/build/{LastPeriod-73630d52.js → LastPeriod-ae6a6654.js} +1 -1
  3. package/build/{MobileBottomNavigationIcon-cc6f18e0.js → MobileBottomNavigationIcon-336e5400.js} +3 -3
  4. package/build/{SiteWideBanner-72c71636.js → SiteWideBanner-c790d1b1.js} +11 -11
  5. package/build/{Spinner-a6e3eb27.js → Spinner-cadbaad5.js} +1 -1
  6. package/build/{WhatsApp-5f603292.js → WhatsApp-d92a3699.js} +1 -1
  7. package/build/adapters.js +20 -20
  8. package/build/atoms.js +51 -51
  9. package/build/babyGrowth.js +86 -86
  10. package/build/cache.js +2 -2
  11. package/build/care/components/organisms/bookingSearchBarV2/SearchResultContent.d.ts +13 -0
  12. package/build/care/components/organisms/bookingSearchBarV2/index.d.ts +7 -1
  13. package/build/care/components/organisms/bookingSearchBarV2/searchInputs/ModalSearchResult.d.ts +8 -0
  14. package/build/care/components/organisms/bookingSearchBarV2/searchInputs/index.d.ts +8 -1
  15. package/build/care/components/organisms/bookingSearchBarV2/searchLocation/CustomSelectItem.d.ts +9 -0
  16. package/build/care/components/organisms/bookingSearchBarV2/searchLocation/index.d.ts +1 -1
  17. package/build/care/components/organisms/bookingSearchBarV2/searchResult/index.d.ts +2 -2
  18. package/build/care/components/organisms/bookingSearchBarV2/searchSpecialty/CustomSelectItem.d.ts +9 -0
  19. package/build/care/components/organisms/bookingSearchBarV2/searchSpecialty/index.d.ts +1 -1
  20. package/build/care/components/organisms/bookingSearchBarV3/SearchResultContent.d.ts +13 -0
  21. package/build/care/components/organisms/bookingSearchBarV3/constants.d.ts +4 -0
  22. package/build/care/components/organisms/bookingSearchBarV3/index.d.ts +42 -0
  23. package/build/care/components/organisms/bookingSearchBarV3/index.styled.d.ts +16 -0
  24. package/build/care/components/organisms/bookingSearchBarV3/reducer.d.ts +166 -0
  25. package/build/care/components/organisms/bookingSearchBarV3/searchInputs/ModalSearchResult.d.ts +8 -0
  26. package/build/care/components/organisms/bookingSearchBarV3/searchInputs/index.d.ts +35 -0
  27. package/build/care/components/organisms/bookingSearchBarV3/searchInputs/index.styled.d.ts +17 -0
  28. package/build/care/components/organisms/bookingSearchBarV3/searchLocation/CustomSelectItem.d.ts +9 -0
  29. package/build/care/components/organisms/bookingSearchBarV3/searchLocation/index.d.ts +16 -0
  30. package/build/care/components/organisms/bookingSearchBarV3/searchLocation/index.styled.d.ts +21 -0
  31. package/build/care/components/organisms/bookingSearchBarV3/searchResult/icons.d.ts +5 -0
  32. package/build/care/components/organisms/bookingSearchBarV3/searchResult/index.d.ts +22 -0
  33. package/build/care/components/organisms/bookingSearchBarV3/searchResult/index.styled.d.ts +21 -0
  34. package/build/care/components/organisms/bookingSearchBarV3/searchResultSpecialties/index.d.ts +12 -0
  35. package/build/care/components/organisms/bookingSearchBarV3/searchResultSpecialties/index.styled.d.ts +16 -0
  36. package/build/care/components/organisms/bookingSearchBarV3/searchSpecialty/CustomSelectItem.d.ts +9 -0
  37. package/build/care/components/organisms/bookingSearchBarV3/searchSpecialty/index.d.ts +15 -0
  38. package/build/care/components/organisms/bookingSearchBarV3/searchSpecialty/index.styled.d.ts +13 -0
  39. package/build/care/components/organisms/bookingSearchBarV3/searchTag/index.d.ts +17 -0
  40. package/build/care/components/organisms/bookingSearchBarV3/searchTag/index.styled.d.ts +13 -0
  41. package/build/care/components/organisms/bookingSearchBarV3/tabSearch/index.d.ts +11 -0
  42. package/build/care/components/organisms/bookingSearchBarV3/tabSearch/index.styled.d.ts +8 -0
  43. package/build/care/components/organisms/bookingSearchBarV3/types.d.ts +17 -0
  44. package/build/care/components/organisms/bookingSearchBarV3/useSearchBarApi.d.ts +21 -0
  45. package/build/care/index.d.ts +1 -0
  46. package/build/care.js +25 -18
  47. package/build/careBookingSearchBar.js +14 -14
  48. package/build/careBookingSearchBarV2.js +553 -258
  49. package/build/components/atoms/inputMB/index.styled.d.ts +3 -3
  50. package/build/components.js +106 -106
  51. package/build/{constants-8ddf9f14.js → constants-0edb49d2.js} +1 -1
  52. package/build/{constants-ec3816fe.js → constants-d11ea2c1.js} +2 -2
  53. package/build/constants.js +3 -3
  54. package/build/constantsDomainLocales.js +1 -1
  55. package/build/constantsRiskScreener.js +2 -2
  56. package/build/constantsSite.js +2 -2
  57. package/build/{core-1b4b5bb6.js → core-bbf3a6e6.js} +1 -1
  58. package/build/{dataTransform-f5d2e15b.js → dataTransform-7afee0f7.js} +1 -1
  59. package/build/ecom.js +5 -5
  60. package/build/{editor-1f3a4880.js → editor-c8d3fd95.js} +11 -11
  61. package/build/embeddedHeathToolCards_babyGrowth.js +25 -25
  62. package/build/embeddedHeathToolCards_babyPoop.js +22 -22
  63. package/build/embeddedHeathToolCards_babyVaccine.js +24 -24
  64. package/build/embeddedHeathToolCards_bmi_bmi.js +27 -27
  65. package/build/embeddedHeathToolCards_bmrBmr.js +27 -27
  66. package/build/embeddedHeathToolCards_dueDate_dueDate.js +24 -24
  67. package/build/embeddedHeathToolCards_ovulation_ovulation.js +24 -24
  68. package/build/embeddedHeathToolCards_pwg_pwg.js +28 -28
  69. package/build/embeddedHeathToolCards_targetHeartRate.js +29 -29
  70. package/build/esm/{InputDate-19558a4a.js → InputDate-ee44d874.js} +5 -5
  71. package/build/esm/{LastPeriod-36173ef3.js → LastPeriod-3f8bf079.js} +1 -1
  72. package/build/esm/{MobileBottomNavigationIcon-6c0c186f.js → MobileBottomNavigationIcon-689596bb.js} +3 -3
  73. package/build/esm/{SiteWideBanner-7010dc39.js → SiteWideBanner-a54f6112.js} +11 -11
  74. package/build/esm/{Spinner-432bb892.js → Spinner-493579cd.js} +1 -1
  75. package/build/esm/{WhatsApp-e843edd2.js → WhatsApp-7f209dbb.js} +1 -1
  76. package/build/esm/adapters.js +20 -20
  77. package/build/esm/atoms.js +51 -51
  78. package/build/esm/babyGrowth.js +86 -86
  79. package/build/esm/cache.js +2 -2
  80. package/build/esm/care/components/organisms/bookingSearchBarV2/SearchResultContent.d.ts +13 -0
  81. package/build/esm/care/components/organisms/bookingSearchBarV2/index.d.ts +7 -1
  82. package/build/esm/care/components/organisms/bookingSearchBarV2/searchInputs/ModalSearchResult.d.ts +8 -0
  83. package/build/esm/care/components/organisms/bookingSearchBarV2/searchInputs/index.d.ts +8 -1
  84. package/build/esm/care/components/organisms/bookingSearchBarV2/searchLocation/CustomSelectItem.d.ts +9 -0
  85. package/build/esm/care/components/organisms/bookingSearchBarV2/searchLocation/index.d.ts +1 -1
  86. package/build/esm/care/components/organisms/bookingSearchBarV2/searchResult/index.d.ts +2 -2
  87. package/build/esm/care/components/organisms/bookingSearchBarV2/searchSpecialty/CustomSelectItem.d.ts +9 -0
  88. package/build/esm/care/components/organisms/bookingSearchBarV2/searchSpecialty/index.d.ts +1 -1
  89. package/build/esm/care/components/organisms/bookingSearchBarV3/SearchResultContent.d.ts +13 -0
  90. package/build/esm/care/components/organisms/bookingSearchBarV3/constants.d.ts +4 -0
  91. package/build/esm/care/components/organisms/bookingSearchBarV3/index.d.ts +42 -0
  92. package/build/esm/care/components/organisms/bookingSearchBarV3/index.styled.d.ts +16 -0
  93. package/build/esm/care/components/organisms/bookingSearchBarV3/reducer.d.ts +166 -0
  94. package/build/esm/care/components/organisms/bookingSearchBarV3/searchInputs/ModalSearchResult.d.ts +8 -0
  95. package/build/esm/care/components/organisms/bookingSearchBarV3/searchInputs/index.d.ts +35 -0
  96. package/build/esm/care/components/organisms/bookingSearchBarV3/searchInputs/index.styled.d.ts +17 -0
  97. package/build/esm/care/components/organisms/bookingSearchBarV3/searchLocation/CustomSelectItem.d.ts +9 -0
  98. package/build/esm/care/components/organisms/bookingSearchBarV3/searchLocation/index.d.ts +16 -0
  99. package/build/esm/care/components/organisms/bookingSearchBarV3/searchLocation/index.styled.d.ts +21 -0
  100. package/build/esm/care/components/organisms/bookingSearchBarV3/searchResult/icons.d.ts +5 -0
  101. package/build/esm/care/components/organisms/bookingSearchBarV3/searchResult/index.d.ts +22 -0
  102. package/build/esm/care/components/organisms/bookingSearchBarV3/searchResult/index.styled.d.ts +21 -0
  103. package/build/esm/care/components/organisms/bookingSearchBarV3/searchResultSpecialties/index.d.ts +12 -0
  104. package/build/esm/care/components/organisms/bookingSearchBarV3/searchResultSpecialties/index.styled.d.ts +16 -0
  105. package/build/esm/care/components/organisms/bookingSearchBarV3/searchSpecialty/CustomSelectItem.d.ts +9 -0
  106. package/build/esm/care/components/organisms/bookingSearchBarV3/searchSpecialty/index.d.ts +15 -0
  107. package/build/esm/care/components/organisms/bookingSearchBarV3/searchSpecialty/index.styled.d.ts +13 -0
  108. package/build/esm/care/components/organisms/bookingSearchBarV3/searchTag/index.d.ts +17 -0
  109. package/build/esm/care/components/organisms/bookingSearchBarV3/searchTag/index.styled.d.ts +13 -0
  110. package/build/esm/care/components/organisms/bookingSearchBarV3/tabSearch/index.d.ts +11 -0
  111. package/build/esm/care/components/organisms/bookingSearchBarV3/tabSearch/index.styled.d.ts +8 -0
  112. package/build/esm/care/components/organisms/bookingSearchBarV3/types.d.ts +17 -0
  113. package/build/esm/care/components/organisms/bookingSearchBarV3/useSearchBarApi.d.ts +21 -0
  114. package/build/esm/care/index.d.ts +1 -0
  115. package/build/esm/care.js +24 -18
  116. package/build/esm/careBookingSearchBar.js +14 -14
  117. package/build/esm/careBookingSearchBarV2.js +555 -260
  118. package/build/esm/components/atoms/inputMB/index.styled.d.ts +3 -3
  119. package/build/esm/components.js +106 -106
  120. package/build/esm/{constants-5d94c1eb.js → constants-cbbcd60c.js} +1 -1
  121. package/build/esm/{constants-02ff2b9a.js → constants-d74221c3.js} +2 -2
  122. package/build/esm/constants.js +3 -3
  123. package/build/esm/constantsDomainLocales.js +1 -1
  124. package/build/esm/constantsRiskScreener.js +2 -2
  125. package/build/esm/constantsSite.js +2 -2
  126. package/build/esm/{core-28fc1feb.js → core-87d099fa.js} +1 -1
  127. package/build/esm/{dataTransform-18e7db46.js → dataTransform-c050b25e.js} +1 -1
  128. package/build/esm/ecom.js +5 -5
  129. package/build/esm/{editor-f39bd267.js → editor-ff27d44b.js} +11 -11
  130. package/build/esm/embeddedHeathToolCards_babyGrowth.js +25 -25
  131. package/build/esm/embeddedHeathToolCards_babyPoop.js +22 -22
  132. package/build/esm/embeddedHeathToolCards_babyVaccine.js +24 -24
  133. package/build/esm/embeddedHeathToolCards_bmi_bmi.js +27 -27
  134. package/build/esm/embeddedHeathToolCards_bmrBmr.js +27 -27
  135. package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +24 -24
  136. package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +24 -24
  137. package/build/esm/embeddedHeathToolCards_pwg_pwg.js +28 -28
  138. package/build/esm/embeddedHeathToolCards_targetHeartRate.js +29 -29
  139. package/build/esm/footer.js +22 -22
  140. package/build/esm/gAssets.js +2 -2
  141. package/build/esm/{healthTools-67f81a15.js → healthTools-2b645605.js} +1 -1
  142. package/build/esm/healthToolsCardWrapper.js +20 -20
  143. package/build/esm/healthToolsForm.js +35 -35
  144. package/build/esm/hooks.js +14 -14
  145. package/build/esm/i18n.js +2 -2
  146. package/build/esm/i18nV2.js +2 -2
  147. package/build/esm/{index-9783f70f.js → index-07473d09.js} +6 -6
  148. package/build/esm/{index-d8bffadf.js → index-07d60a5d.js} +3 -3
  149. package/build/esm/{index-41b75b06.js → index-098ab7be.js} +16 -16
  150. package/build/esm/{index-88ad09a2.js → index-0c431eee.js} +21 -21
  151. package/build/esm/{index-3dcbd5d8.js → index-135f4576.js} +13 -13
  152. package/build/esm/{index-00172803.js → index-139a2d50.js} +3 -3
  153. package/build/esm/{index-350c8057.js → index-1a2816df.js} +3 -3
  154. package/build/esm/{index-f25b49f4.js → index-1c630192.js} +2 -2
  155. package/build/esm/{index-89dfc455.js → index-1e35a5b6.js} +11 -11
  156. package/build/esm/{index-835cb1a4.js → index-20fffe6c.js} +4 -4
  157. package/build/esm/{index-d920a82c.js → index-25ae585e.js} +3 -3
  158. package/build/esm/{index-2757fc57.js → index-2d5e3a60.js} +13 -13
  159. package/build/esm/{index-4de26227.js → index-2dd50937.js} +32 -32
  160. package/build/esm/{index-6b81ef4b.js → index-2f8ce1f5.js} +32 -32
  161. package/build/esm/{index-592bba40.js → index-309f8ac2.js} +2 -2
  162. package/build/esm/{index-e29f4da3.js → index-344d7049.js} +8 -8
  163. package/build/esm/{index-9eb4ea68.js → index-35974708.js} +5 -5
  164. package/build/esm/{index-c262545f.js → index-39db7b82.js} +3 -3
  165. package/build/esm/{index-b34a19f4.js → index-484e72f5.js} +4 -4
  166. package/build/esm/index-4d68a1b9.js +1942 -0
  167. package/build/esm/{index-cf0997ce.js → index-50ad9f8f.js} +16 -16
  168. package/build/esm/{index-a38113ec.js → index-52468161.js} +24 -24
  169. package/build/esm/{index-d6d9926d.js → index-5612e5da.js} +16 -16
  170. package/build/esm/{index-9f3cf366.js → index-57886ee2.js} +3 -3
  171. package/build/esm/{index-0d2192e4.js → index-5af9940c.js} +15 -15
  172. package/build/esm/{index-17e22a49.js → index-5e68846a.js} +3 -3
  173. package/build/esm/{index-927ce49f.js → index-64c20666.js} +17 -17
  174. package/build/esm/{index-3bbfc9b7.js → index-64e29cd4.js} +1 -1
  175. package/build/esm/{index-ec874d7f.js → index-6656e3b2.js} +2 -2
  176. package/build/esm/{index-baeae593.js → index-67e15096.js} +6 -6
  177. package/build/esm/{index-83cdc404.js → index-6bf51980.js} +7 -7
  178. package/build/esm/{index-ed3537b8.js → index-6c01e06d.js} +2 -2
  179. package/build/esm/{index-baa344ea.js → index-6f519afd.js} +1 -1
  180. package/build/esm/{index-a0a5c82d.js → index-6fff10d6.js} +2 -2
  181. package/build/esm/{index-6d341978.js → index-70c23dec.js} +1 -1
  182. package/build/esm/{index-81417442.js → index-75584c58.js} +6 -6
  183. package/build/esm/{index-2f2b3118.js → index-7565bfca.js} +2 -2
  184. package/build/esm/{index-037ffb65.js → index-7b7cf8f7.js} +7 -7
  185. package/build/esm/{index-08a9819c.js → index-7c8ce1fa.js} +3 -3
  186. package/build/esm/{index-33b29944.js → index-7cdd0882.js} +9 -9
  187. package/build/esm/{index-c288d070.js → index-82effa1d.js} +25 -25
  188. package/build/esm/{index-5ce992e9.js → index-85d73edb.js} +16 -16
  189. package/build/esm/{index-71ef7de6.js → index-89fcee3b.js} +18 -18
  190. package/build/esm/{index-11f06411.js → index-907d254e.js} +3 -3
  191. package/build/esm/{index-21e8e383.js → index-90f1c2d6.js} +18 -18
  192. package/build/esm/{index-51164185.js → index-91731ad5.js} +2 -2
  193. package/build/esm/{index-c2162f76.js → index-9586308a.js} +6 -6
  194. package/build/esm/{index-039f30e3.js → index-98a32be1.js} +2 -2
  195. package/build/esm/{index-e772c903.js → index-998a49c6.js} +15 -15
  196. package/build/esm/{index-d5a0deff.js → index-9b79992b.js} +14 -14
  197. package/build/esm/{index-2b33f487.js → index-9ee90ed6.js} +2 -2
  198. package/build/esm/{index-b09ae67e.js → index-9eefff11.js} +22 -22
  199. package/build/esm/{index-13cc2584.js → index-a2e186e5.js} +2 -2
  200. package/build/esm/{index-d3de292b.js → index-a4e6cf4d.js} +19 -19
  201. package/build/esm/{index-132ec066.js → index-b460b125.js} +5 -5
  202. package/build/esm/{index-c11e3721.js → index-b6d67522.js} +15 -15
  203. package/build/esm/{index-848bd280.js → index-bb82e5de.js} +2 -2
  204. package/build/esm/{index-eb266a2f.js → index-be4d4296.js} +9 -9
  205. package/build/esm/{index-78e91f91.js → index-cae823f0.js} +1 -1
  206. package/build/esm/{index-14c5bc71.js → index-cca70b83.js} +33 -33
  207. package/build/esm/{index-d51a88aa.js → index-d15ebd48.js} +1 -1
  208. package/build/esm/{index-16b3f06c.js → index-d24c77b8.js} +1 -1
  209. package/build/esm/{index-625b13b0.js → index-d2df7404.js} +14 -14
  210. package/build/esm/{index-5416cd64.js → index-d2f5b100.js} +14 -14
  211. package/build/esm/{index-fb51821c.js → index-d9ef4499.js} +2 -2
  212. package/build/esm/{index-3b6525bf.js → index-e8ad0d1e.js} +3 -3
  213. package/build/esm/{index-b26c8202.js → index-eb9f4128.js} +2 -2
  214. package/build/esm/{index-40506630.js → index-eec6638d.js} +1 -1
  215. package/build/esm/{index-cac853ef.js → index-f6cd1e12.js} +2 -2
  216. package/build/esm/{index-d8b71ebe.js → index-fbbfd7bd.js} +2 -2
  217. package/build/esm/{index-6562a540.js → index-ffdfffa1.js} +2 -2
  218. package/build/esm/index.js +126 -126
  219. package/build/esm/{labelSorting-b86fc783.js → labelSorting-19277d51.js} +4 -4
  220. package/build/esm/lead.js +37 -37
  221. package/build/esm/{logoIcon-8589d465.js → logoIcon-07a87cc2.js} +2 -2
  222. package/build/esm/mantine.js +27 -27
  223. package/build/esm/misc.js +19 -19
  224. package/build/esm/miscGetDynamicHealthTool.js +4 -4
  225. package/build/esm/miscGetSocialList.js +8 -8
  226. package/build/esm/miscScreenSizeContext.js +1 -1
  227. package/build/esm/mobileBottomNavigation.js +5 -5
  228. package/build/esm/mobileBottomNavigationIcon.js +5 -5
  229. package/build/esm/molecules.js +79 -79
  230. package/build/esm/moleculesArticleCard.js +6 -6
  231. package/build/esm/moleculesArticleCardV2.js +17 -17
  232. package/build/esm/navigation.js +49 -49
  233. package/build/esm/navigationLogoutPopup.js +11 -11
  234. package/build/esm/navigationProfileButton.js +27 -27
  235. package/build/esm/onboardingV2.js +30 -30
  236. package/build/esm/organisms.js +62 -62
  237. package/build/esm/{paths-28205e0f.js → paths-82fdd769.js} +2 -2
  238. package/build/esm/{post-85d8faaa.js → post-7898c0ce.js} +2 -2
  239. package/build/esm/profileNavigation.js +20 -20
  240. package/build/esm/progressBar.js +1 -1
  241. package/build/esm/pwg.js +23 -23
  242. package/build/esm/ssoV2/screens/updateEmail.d.ts +4 -2
  243. package/build/esm/ssoV2/ssoStateManager/store.d.ts +1 -0
  244. package/build/esm/ssoV2.js +88 -70
  245. package/build/esm/{store-46ca3b02.js → store-364bb20c.js} +37 -28
  246. package/build/esm/subot.js +40 -40
  247. package/build/esm/surveyOrPremiumBanner.js +34 -34
  248. package/build/esm/surveyQuestionCard.js +11 -11
  249. package/build/esm/{surveyThankyouCard-fe5eb710.js → surveyThankyouCard-661ebcbf.js} +5 -5
  250. package/build/esm/together.js +57 -57
  251. package/build/esm/togetherApiUtils.js +6 -6
  252. package/build/esm/togetherAtoms.js +31 -31
  253. package/build/esm/togetherComponentGlobalContext.js +6 -6
  254. package/build/esm/togetherMolecules.js +52 -52
  255. package/build/esm/togetherMoleculesCardAuthor.js +29 -29
  256. package/build/esm/togetherMoleculesPostImagePreview.js +13 -13
  257. package/build/esm/togetherMoleculesProfileDetail.js +40 -40
  258. package/build/esm/togetherOrganisms.js +51 -51
  259. package/build/esm/togetherRichTextEditor.js +20 -20
  260. package/build/esm/togetherShareBox.js +12 -12
  261. package/build/esm/{transform-9e1ae172.js → transform-82803dcc.js} +27 -27
  262. package/build/esm/{translationsProvider-7112664a.js → translationsProvider-5d50108d.js} +1 -1
  263. package/build/esm/{treePopoverMenu-4534abf4.js → treePopoverMenu-f431287f.js} +19 -19
  264. package/build/esm/types.js +2 -2
  265. package/build/esm/{useCartCareService-dab2f9d4.js → useCartCareService-b00b5a1b.js} +1 -1
  266. package/build/esm/{useHealthToolCache-c6faed71.js → useHealthToolCache-b1ce9a17.js} +1 -1
  267. package/build/esm/{usePhoneValidator-6d70c013.js → usePhoneValidator-46de313d.js} +5 -5
  268. package/build/esm/{usePlacesAutocomplete-eb7786f7.js → usePlacesAutocomplete-2f4b50df.js} +1 -1
  269. package/build/esm/useTogetherAuthRequiredAction.js +10 -10
  270. package/build/esm/{utils-5d0e618d.js → utils-60af12e4.js} +2 -2
  271. package/build/esm/{utils-9a6c6029.js → utils-6b4b76c4.js} +3 -3
  272. package/build/esm/{utils-fb8bf638.js → utils-708d119e.js} +3 -3
  273. package/build/esm/{utils-a6dea16c.js → utils-92ef5518.js} +5 -5
  274. package/build/esm/{utils-5e210f54.js → utils-e2f50745.js} +2 -2
  275. package/build/esm/vaccination.js +22 -22
  276. package/build/footer.js +22 -22
  277. package/build/gAssets.js +2 -2
  278. package/build/{healthTools-83fac0a5.js → healthTools-48f77d98.js} +1 -1
  279. package/build/healthToolsCardWrapper.js +20 -20
  280. package/build/healthToolsForm.js +35 -35
  281. package/build/hooks.js +14 -14
  282. package/build/i18n.js +2 -2
  283. package/build/i18nV2.js +1 -1
  284. package/build/{index-d13c0da0.js → index-010294cf.js} +19 -19
  285. package/build/{index-c785a38f.js → index-09b98fc9.js} +33 -33
  286. package/build/{index-27670cc8.js → index-1774b0c0.js} +16 -16
  287. package/build/{index-73704e7a.js → index-1948737b.js} +25 -25
  288. package/build/{index-4270d6cf.js → index-19880ee5.js} +1 -1
  289. package/build/{index-4b9dcf37.js → index-19b006b0.js} +7 -7
  290. package/build/{index-78f5bf5c.js → index-1b33cbda.js} +2 -2
  291. package/build/{index-d664f4c8.js → index-1bd406ae.js} +2 -2
  292. package/build/{index-221ad3a7.js → index-1c206b60.js} +1 -1
  293. package/build/{index-768ce2e2.js → index-1d387ead.js} +3 -3
  294. package/build/{index-04d4d6d5.js → index-1d8cc34f.js} +8 -8
  295. package/build/{index-696cbd6a.js → index-2367c86a.js} +3 -3
  296. package/build/{index-e584f6b5.js → index-2831fb46.js} +3 -3
  297. package/build/{index-3d421c34.js → index-3036f9bc.js} +2 -2
  298. package/build/{index-048c359c.js → index-33b95133.js} +14 -14
  299. package/build/{index-881cfb0f.js → index-39540a70.js} +2 -2
  300. package/build/{index-2509613f.js → index-3da5eda4.js} +6 -6
  301. package/build/{index-67eb9b89.js → index-422a7df7.js} +15 -15
  302. package/build/{index-b5f92ca0.js → index-469e7ea3.js} +6 -6
  303. package/build/{index-22841a69.js → index-4a51ca80.js} +3 -3
  304. package/build/{index-08383fcf.js → index-4d537fcf.js} +1 -1
  305. package/build/{index-1e657b96.js → index-501739d7.js} +2 -2
  306. package/build/{index-40725e8b.js → index-5196bee4.js} +3 -3
  307. package/build/{index-c0824124.js → index-56f3e7a0.js} +21 -21
  308. package/build/{index-ce60142f.js → index-57efa012.js} +16 -16
  309. package/build/{index-8d5df576.js → index-5980c301.js} +16 -16
  310. package/build/{index-edfd48a3.js → index-5bd7f9a9.js} +2 -2
  311. package/build/{index-beae4bf5.js → index-6176d4e6.js} +1 -1
  312. package/build/{index-5c45ee6c.js → index-637a3d93.js} +2 -2
  313. package/build/{index-640597bc.js → index-639baa53.js} +5 -5
  314. package/build/{index-623aa44d.js → index-64cafdd2.js} +2 -2
  315. package/build/{index-2cc01292.js → index-64df4fd2.js} +16 -16
  316. package/build/{index-163d3814.js → index-6a76ec1e.js} +2 -2
  317. package/build/{index-b2840c48.js → index-6be2baca.js} +9 -9
  318. package/build/{index-4f5e23e0.js → index-6bec7e79.js} +1 -1
  319. package/build/{index-06008daa.js → index-6def05b7.js} +17 -17
  320. package/build/{index-6043692f.js → index-6fdd1a6c.js} +2 -2
  321. package/build/{index-8be9c1f5.js → index-774a374e.js} +24 -24
  322. package/build/{index-381e1575.js → index-78a2f151.js} +18 -18
  323. package/build/{index-22ab16d6.js → index-78c22135.js} +2 -2
  324. package/build/{index-eb070ff1.js → index-78ed5707.js} +14 -14
  325. package/build/{index-21bd3fc2.js → index-8142f1e6.js} +13 -13
  326. package/build/{index-ae61f98e.js → index-81ca34e8.js} +11 -11
  327. package/build/{index-88d16ec2.js → index-8f94dc82.js} +6 -6
  328. package/build/{index-40eb2a9e.js → index-9128fa90.js} +2 -2
  329. package/build/{index-f8c96c21.js → index-9701293d.js} +32 -32
  330. package/build/{index-627899a6.js → index-9b4600c7.js} +18 -18
  331. package/build/{index-fcb30055.js → index-a19d0a96.js} +2 -2
  332. package/build/{index-91a769d7.js → index-a37c2c7e.js} +32 -32
  333. package/build/{index-231a399f.js → index-a3887c32.js} +5 -5
  334. package/build/{index-9dcf2fa6.js → index-ac0b9f93.js} +9 -9
  335. package/build/{index-1d9bd91f.js → index-afb0154c.js} +3 -3
  336. package/build/{index-acb6aa58.js → index-b475a60a.js} +3 -3
  337. package/build/{index-0384d19d.js → index-b88d27ed.js} +1 -1
  338. package/build/{index-b5d72bcf.js → index-bb5f043f.js} +14 -14
  339. package/build/{index-d44486f8.js → index-bda467d6.js} +22 -22
  340. package/build/{index-fca34957.js → index-c4e313bc.js} +13 -13
  341. package/build/{index-c60704f1.js → index-c5ddd651.js} +15 -15
  342. package/build/{index-b75bbb36.js → index-d09c29d9.js} +2 -2
  343. package/build/{index-ede1d939.js → index-d439a18f.js} +2 -2
  344. package/build/{index-680b660f.js → index-dc9c29d8.js} +4 -4
  345. package/build/{index-2358141f.js → index-dce662fa.js} +4 -4
  346. package/build/{index-d469f7de.js → index-de37f553.js} +2 -2
  347. package/build/{index-0dabd635.js → index-e69ca49a.js} +7 -7
  348. package/build/{index-034d9ef4.js → index-ed691500.js} +3 -3
  349. package/build/{index-6439d793.js → index-f0fe3133.js} +1 -1
  350. package/build/{index-c935c8ae.js → index-f6e281f3.js} +3 -3
  351. package/build/{index-cc8ff3c0.js → index-f8b113a4.js} +3 -3
  352. package/build/{index-12897bdd.js → index-fa620c5b.js} +15 -15
  353. package/build/{index-e0e468cb.js → index-fbec091b.js} +6 -6
  354. package/build/index-ff09c525.js +1951 -0
  355. package/build/index.js +127 -126
  356. package/build/{labelSorting-c9cb020f.js → labelSorting-c3a79fcf.js} +4 -4
  357. package/build/lead.js +37 -37
  358. package/build/{logoIcon-8ce9a50c.js → logoIcon-c26486ef.js} +2 -2
  359. package/build/mantine.js +25 -25
  360. package/build/misc.js +19 -19
  361. package/build/miscGetDynamicHealthTool.js +4 -4
  362. package/build/miscGetSocialList.js +8 -8
  363. package/build/miscScreenSizeContext.js +1 -1
  364. package/build/mobileBottomNavigation.js +5 -5
  365. package/build/mobileBottomNavigationIcon.js +5 -5
  366. package/build/molecules.js +79 -79
  367. package/build/moleculesArticleCard.js +6 -6
  368. package/build/moleculesArticleCardV2.js +17 -17
  369. package/build/navigation.js +49 -49
  370. package/build/navigationLogoutPopup.js +11 -11
  371. package/build/navigationProfileButton.js +27 -27
  372. package/build/onboardingV2.js +29 -29
  373. package/build/organisms.js +62 -62
  374. package/build/{paths-07bb96ba.js → paths-a6867c36.js} +2 -2
  375. package/build/{post-e25c60f7.js → post-9f543b9f.js} +2 -2
  376. package/build/profileNavigation.js +20 -20
  377. package/build/progressBar.js +1 -1
  378. package/build/pwg.js +23 -23
  379. package/build/ssoV2/screens/updateEmail.d.ts +4 -2
  380. package/build/ssoV2/ssoStateManager/store.d.ts +1 -0
  381. package/build/ssoV2.js +86 -68
  382. package/build/{store-2a85405b.js → store-beb77ea3.js} +37 -28
  383. package/build/subot.js +39 -39
  384. package/build/surveyOrPremiumBanner.js +34 -34
  385. package/build/surveyQuestionCard.js +11 -11
  386. package/build/{surveyThankyouCard-61ed696c.js → surveyThankyouCard-94110a1b.js} +5 -5
  387. package/build/together.js +57 -57
  388. package/build/togetherApiUtils.js +6 -6
  389. package/build/togetherAtoms.js +31 -31
  390. package/build/togetherComponentGlobalContext.js +6 -6
  391. package/build/togetherMolecules.js +52 -52
  392. package/build/togetherMoleculesCardAuthor.js +29 -29
  393. package/build/togetherMoleculesPostImagePreview.js +13 -13
  394. package/build/togetherMoleculesProfileDetail.js +40 -40
  395. package/build/togetherOrganisms.js +51 -51
  396. package/build/togetherRichTextEditor.js +20 -20
  397. package/build/togetherShareBox.js +12 -12
  398. package/build/{transform-61680d8a.js → transform-d90a99c9.js} +27 -27
  399. package/build/{translationsProvider-636d7cb5.js → translationsProvider-044f9dc9.js} +1 -1
  400. package/build/{treePopoverMenu-45f06b81.js → treePopoverMenu-dc002bf6.js} +19 -19
  401. package/build/types.js +2 -2
  402. package/build/{useCartCareService-46731f77.js → useCartCareService-5367f9c3.js} +1 -1
  403. package/build/{useHealthToolCache-b9319885.js → useHealthToolCache-31035137.js} +1 -1
  404. package/build/{usePhoneValidator-5a391cbf.js → usePhoneValidator-875a9a57.js} +5 -5
  405. package/build/{usePlacesAutocomplete-4c51dc6b.js → usePlacesAutocomplete-55eb2441.js} +1 -1
  406. package/build/useTogetherAuthRequiredAction.js +10 -10
  407. package/build/{utils-68673897.js → utils-303cf747.js} +2 -2
  408. package/build/{utils-595db140.js → utils-6dfd62c4.js} +5 -5
  409. package/build/{utils-83aaaf9c.js → utils-c3ecaa84.js} +3 -3
  410. package/build/{utils-bb345cce.js → utils-c54268a3.js} +2 -2
  411. package/build/{utils-6fe19ced.js → utils-e6417103.js} +3 -3
  412. package/build/vaccination.js +22 -22
  413. package/package.json +1 -1
  414. package/build/esm/index-9f43c268.js +0 -31
  415. package/build/index-5968ea5b.js +0 -38
  416. /package/build/{BMI_BOYS.percentile.monthly-71706d34.js → BMI_BOYS.percentile.monthly-013ccb45.js} +0 -0
  417. /package/build/{BMI_BOYS.percentile.weekly-7347a0d7.js → BMI_BOYS.percentile.weekly-b82f86d0.js} +0 -0
  418. /package/build/{BMI_BOYS.percentile.yearly-a91f42b3.js → BMI_BOYS.percentile.yearly-b8cd1c8d.js} +0 -0
  419. /package/build/{BMI_BOYS.zscore.monthly-5a655570.js → BMI_BOYS.zscore.monthly-237ecba5.js} +0 -0
  420. /package/build/{BMI_BOYS.zscore.weekly-a9d33e3a.js → BMI_BOYS.zscore.weekly-3449e342.js} +0 -0
  421. /package/build/{BMI_BOYS.zscore.yearly-484752f7.js → BMI_BOYS.zscore.yearly-1d08efed.js} +0 -0
  422. /package/build/{BMI_GIRLS.percentile.monthly-bcc5b3c5.js → BMI_GIRLS.percentile.monthly-00823f72.js} +0 -0
  423. /package/build/{BMI_GIRLS.percentile.weekly-10944ec1.js → BMI_GIRLS.percentile.weekly-6aa31276.js} +0 -0
  424. /package/build/{BMI_GIRLS.percentile.yearly-4cb9b07b.js → BMI_GIRLS.percentile.yearly-8cbffb79.js} +0 -0
  425. /package/build/{BMI_GIRLS.zscore.monthly-c8509ebc.js → BMI_GIRLS.zscore.monthly-fddaf790.js} +0 -0
  426. /package/build/{BMI_GIRLS.zscore.weekly-0a45a2af.js → BMI_GIRLS.zscore.weekly-bb3760d3.js} +0 -0
  427. /package/build/{BMI_GIRLS.zscore.yearly-38fd0761.js → BMI_GIRLS.zscore.yearly-7a7b6b5d.js} +0 -0
  428. /package/build/{ChevronDown-daab0252.js → ChevronDown-3a089752.js} +0 -0
  429. /package/build/{Close-6bcd5612.js → Close-bb74b5c0.js} +0 -0
  430. /package/build/{Google-46ae3220.js → Google-8f9986d4.js} +0 -0
  431. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-acd7d0c0.js → HEAD CIRCUM_BOYS.percentile.monthly-717c6639.js} +0 -0
  432. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-0624ad4a.js → HEAD CIRCUM_BOYS.percentile.weekly-fee60bf3.js} +0 -0
  433. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-7f5e2f03.js → HEAD CIRCUM_BOYS.percentile.yearly-56ee28c2.js} +0 -0
  434. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-e24a3e66.js → HEAD CIRCUM_BOYS.zscore.monthly-c5b413f1.js} +0 -0
  435. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-f47af62d.js → HEAD CIRCUM_BOYS.zscore.weekly-d2b7a655.js} +0 -0
  436. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-b9a06fde.js → HEAD CIRCUM_BOYS.zscore.yearly-e809d1d4.js} +0 -0
  437. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-2a4e90ea.js → HEAD CIRCUM_GIRLS.percentile.monthly-d6fa5f70.js} +0 -0
  438. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-55b7b3ff.js → HEAD CIRCUM_GIRLS.percentile.weekly-6e7d0adb.js} +0 -0
  439. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-3072fb36.js → HEAD CIRCUM_GIRLS.percentile.yearly-577dba7d.js} +0 -0
  440. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-0d75efdc.js → HEAD CIRCUM_GIRLS.zscore.monthly-9cc4760a.js} +0 -0
  441. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-8cbb2c5b.js → HEAD CIRCUM_GIRLS.zscore.weekly-71bad006.js} +0 -0
  442. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-8d484ee7.js → HEAD CIRCUM_GIRLS.zscore.yearly-b3ce1651.js} +0 -0
  443. /package/build/{HEIGHT_BOYS.percentile.monthly-0ed745dc.js → HEIGHT_BOYS.percentile.monthly-97c16557.js} +0 -0
  444. /package/build/{HEIGHT_BOYS.percentile.weekly-83f4827d.js → HEIGHT_BOYS.percentile.weekly-34ec6517.js} +0 -0
  445. /package/build/{HEIGHT_BOYS.percentile.yearly-5010e8d8.js → HEIGHT_BOYS.percentile.yearly-c6e6be52.js} +0 -0
  446. /package/build/{HEIGHT_BOYS.zscore.monthly-3ea70741.js → HEIGHT_BOYS.zscore.monthly-cb80b7a6.js} +0 -0
  447. /package/build/{HEIGHT_BOYS.zscore.weekly-2e3eaa3f.js → HEIGHT_BOYS.zscore.weekly-85850c62.js} +0 -0
  448. /package/build/{HEIGHT_BOYS.zscore.yearly-2062c6ef.js → HEIGHT_BOYS.zscore.yearly-361f2d35.js} +0 -0
  449. /package/build/{HEIGHT_GIRLS.percentile.monthly-24046937.js → HEIGHT_GIRLS.percentile.monthly-15463120.js} +0 -0
  450. /package/build/{HEIGHT_GIRLS.percentile.weekly-5d48ca6c.js → HEIGHT_GIRLS.percentile.weekly-ca8c7bfb.js} +0 -0
  451. /package/build/{HEIGHT_GIRLS.percentile.yearly-93eeb025.js → HEIGHT_GIRLS.percentile.yearly-401d2863.js} +0 -0
  452. /package/build/{HEIGHT_GIRLS.zscore.monthly-b1d98e51.js → HEIGHT_GIRLS.zscore.monthly-ff7ab364.js} +0 -0
  453. /package/build/{HEIGHT_GIRLS.zscore.weekly-3ac2b96a.js → HEIGHT_GIRLS.zscore.weekly-aba2ece2.js} +0 -0
  454. /package/build/{HEIGHT_GIRLS.zscore.yearly-5e0b0bb8.js → HEIGHT_GIRLS.zscore.yearly-f46f3a7a.js} +0 -0
  455. /package/build/{Locale-a078bb23.js → Locale-2ad8ea20.js} +0 -0
  456. /package/build/{Visible-08c4be3d.js → Visible-88b9c33d.js} +0 -0
  457. /package/build/{WEIGHT_BOYS.percentile.monthly-78d2a6d0.js → WEIGHT_BOYS.percentile.monthly-cc1cd53a.js} +0 -0
  458. /package/build/{WEIGHT_BOYS.percentile.weekly-56168e21.js → WEIGHT_BOYS.percentile.weekly-60a1cb27.js} +0 -0
  459. /package/build/{WEIGHT_BOYS.percentile.yearly-80c8b72b.js → WEIGHT_BOYS.percentile.yearly-197a0edf.js} +0 -0
  460. /package/build/{WEIGHT_BOYS.zscore.monthly-e6e24158.js → WEIGHT_BOYS.zscore.monthly-f0e215a7.js} +0 -0
  461. /package/build/{WEIGHT_BOYS.zscore.weekly-ebcacfa3.js → WEIGHT_BOYS.zscore.weekly-5fb5c6f4.js} +0 -0
  462. /package/build/{WEIGHT_BOYS.zscore.yearly-cd0d70fa.js → WEIGHT_BOYS.zscore.yearly-0a044e45.js} +0 -0
  463. /package/build/{WEIGHT_GIRLS.percentile.monthly-131d256b.js → WEIGHT_GIRLS.percentile.monthly-de330329.js} +0 -0
  464. /package/build/{WEIGHT_GIRLS.percentile.weekly-21f14054.js → WEIGHT_GIRLS.percentile.weekly-2e4033fa.js} +0 -0
  465. /package/build/{WEIGHT_GIRLS.percentile.yearly-bd1f351e.js → WEIGHT_GIRLS.percentile.yearly-7903de3e.js} +0 -0
  466. /package/build/{WEIGHT_GIRLS.zscore.monthly-1aa42d0e.js → WEIGHT_GIRLS.zscore.monthly-ff5f391d.js} +0 -0
  467. /package/build/{WEIGHT_GIRLS.zscore.weekly-7c73bedc.js → WEIGHT_GIRLS.zscore.weekly-83c63d39.js} +0 -0
  468. /package/build/{WEIGHT_GIRLS.zscore.yearly-5f457f00.js → WEIGHT_GIRLS.zscore.yearly-d507528f.js} +0 -0
  469. /package/build/{ageGenerate-98e62464.js → ageGenerate-8ebb15fd.js} +0 -0
  470. /package/build/{animation-c1188035.js → animation-259918f0.js} +0 -0
  471. /package/build/{constants-8109eafd.js → constants-26fa8a00.js} +0 -0
  472. /package/build/{constants-1793f76d.js → constants-3ae32cc4.js} +0 -0
  473. /package/build/{context-df75dde3.js → context-12a694e0.js} +0 -0
  474. /package/build/{dataTransform-e60babbb.js → dataTransform-861d48d8.js} +0 -0
  475. /package/build/esm/{BMI_BOYS.percentile.monthly-2704f965.js → BMI_BOYS.percentile.monthly-e4fdaf1e.js} +0 -0
  476. /package/build/esm/{BMI_BOYS.percentile.weekly-cb98a634.js → BMI_BOYS.percentile.weekly-6412eb4e.js} +0 -0
  477. /package/build/esm/{BMI_BOYS.percentile.yearly-cf423a0a.js → BMI_BOYS.percentile.yearly-cea5a6e1.js} +0 -0
  478. /package/build/esm/{BMI_BOYS.zscore.monthly-685ba1c7.js → BMI_BOYS.zscore.monthly-577441e4.js} +0 -0
  479. /package/build/esm/{BMI_BOYS.zscore.weekly-f88a217b.js → BMI_BOYS.zscore.weekly-1c565943.js} +0 -0
  480. /package/build/esm/{BMI_BOYS.zscore.yearly-4112d011.js → BMI_BOYS.zscore.yearly-47de65c4.js} +0 -0
  481. /package/build/esm/{BMI_GIRLS.percentile.monthly-63c6d21c.js → BMI_GIRLS.percentile.monthly-4e2e91d0.js} +0 -0
  482. /package/build/esm/{BMI_GIRLS.percentile.weekly-447ff2e9.js → BMI_GIRLS.percentile.weekly-7d31f0fb.js} +0 -0
  483. /package/build/esm/{BMI_GIRLS.percentile.yearly-dd787daa.js → BMI_GIRLS.percentile.yearly-fef5e20d.js} +0 -0
  484. /package/build/esm/{BMI_GIRLS.zscore.monthly-3a9080d3.js → BMI_GIRLS.zscore.monthly-f2e27dc9.js} +0 -0
  485. /package/build/esm/{BMI_GIRLS.zscore.weekly-a6b58da1.js → BMI_GIRLS.zscore.weekly-a96cc896.js} +0 -0
  486. /package/build/esm/{BMI_GIRLS.zscore.yearly-efcd0984.js → BMI_GIRLS.zscore.yearly-a0b4a2a5.js} +0 -0
  487. /package/build/esm/{ChevronDown-13f6a5cf.js → ChevronDown-fcbcff06.js} +0 -0
  488. /package/build/esm/{Close-c1620eee.js → Close-365a2dc3.js} +0 -0
  489. /package/build/esm/{Google-9786875a.js → Google-96547fab.js} +0 -0
  490. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-582c90de.js → HEAD CIRCUM_BOYS.percentile.monthly-9cd6e5cc.js} +0 -0
  491. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-978bac8a.js → HEAD CIRCUM_BOYS.percentile.weekly-e176f965.js} +0 -0
  492. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-cf26e3d0.js → HEAD CIRCUM_BOYS.percentile.yearly-aab03611.js} +0 -0
  493. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-31de970e.js → HEAD CIRCUM_BOYS.zscore.monthly-1a7ca87e.js} +0 -0
  494. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-900f95f2.js → HEAD CIRCUM_BOYS.zscore.weekly-9cf04a9b.js} +0 -0
  495. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-409f8b98.js → HEAD CIRCUM_BOYS.zscore.yearly-b9dc3b94.js} +0 -0
  496. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-4231eb97.js → HEAD CIRCUM_GIRLS.percentile.monthly-e697b31c.js} +0 -0
  497. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-b02c363f.js → HEAD CIRCUM_GIRLS.percentile.weekly-d80f97f9.js} +0 -0
  498. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-78b34ff2.js → HEAD CIRCUM_GIRLS.percentile.yearly-9abd42f4.js} +0 -0
  499. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-0c7a31f7.js → HEAD CIRCUM_GIRLS.zscore.monthly-b6936801.js} +0 -0
  500. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-868bf312.js → HEAD CIRCUM_GIRLS.zscore.weekly-e0ec4f0b.js} +0 -0
  501. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-e76ac89e.js → HEAD CIRCUM_GIRLS.zscore.yearly-42274aa8.js} +0 -0
  502. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-20d42076.js → HEIGHT_BOYS.percentile.monthly-b0c84cb6.js} +0 -0
  503. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-a2798e49.js → HEIGHT_BOYS.percentile.weekly-7fc68853.js} +0 -0
  504. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-483306f2.js → HEIGHT_BOYS.percentile.yearly-77062365.js} +0 -0
  505. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-42784c9d.js → HEIGHT_BOYS.zscore.monthly-4bc3f790.js} +0 -0
  506. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-849fe5f4.js → HEIGHT_BOYS.zscore.weekly-369c6ae2.js} +0 -0
  507. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-548e7e60.js → HEIGHT_BOYS.zscore.yearly-aa09e24a.js} +0 -0
  508. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-c5b41a4d.js → HEIGHT_GIRLS.percentile.monthly-282f2aae.js} +0 -0
  509. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-430ad60a.js → HEIGHT_GIRLS.percentile.weekly-dc0c378f.js} +0 -0
  510. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-ea5d2cef.js → HEIGHT_GIRLS.percentile.yearly-61cc9ba0.js} +0 -0
  511. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-feabe2d8.js → HEIGHT_GIRLS.zscore.monthly-4b018477.js} +0 -0
  512. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-6b3584e2.js → HEIGHT_GIRLS.zscore.weekly-14f8a486.js} +0 -0
  513. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-0d4773d1.js → HEIGHT_GIRLS.zscore.yearly-20dff142.js} +0 -0
  514. /package/build/esm/{Locale-adfd207f.js → Locale-f39ad168.js} +0 -0
  515. /package/build/esm/{Visible-5b3e8bb2.js → Visible-74b38449.js} +0 -0
  516. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-79ea5ed5.js → WEIGHT_BOYS.percentile.monthly-d214fe4b.js} +0 -0
  517. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-df533c0b.js → WEIGHT_BOYS.percentile.weekly-acb3be61.js} +0 -0
  518. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-be9284bf.js → WEIGHT_BOYS.percentile.yearly-2a2ab3f4.js} +0 -0
  519. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-33696cff.js → WEIGHT_BOYS.zscore.monthly-19967e44.js} +0 -0
  520. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-7ce33291.js → WEIGHT_BOYS.zscore.weekly-5840e98d.js} +0 -0
  521. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-87bf3a6e.js → WEIGHT_BOYS.zscore.yearly-4acc4bc6.js} +0 -0
  522. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-02a28d8b.js → WEIGHT_GIRLS.percentile.monthly-6c3ae757.js} +0 -0
  523. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-1e556624.js → WEIGHT_GIRLS.percentile.weekly-83da9c3a.js} +0 -0
  524. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-a2a7e950.js → WEIGHT_GIRLS.percentile.yearly-6dbc9b58.js} +0 -0
  525. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-ca966e35.js → WEIGHT_GIRLS.zscore.monthly-63c00f8d.js} +0 -0
  526. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-995c55b4.js → WEIGHT_GIRLS.zscore.weekly-25a94d3a.js} +0 -0
  527. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-666e98e9.js → WEIGHT_GIRLS.zscore.yearly-1f305c82.js} +0 -0
  528. /package/build/esm/{ageGenerate-5820c481.js → ageGenerate-31ce7674.js} +0 -0
  529. /package/build/esm/{animation-d8cdf774.js → animation-925a6259.js} +0 -0
  530. /package/build/esm/{constants-1da5a50a.js → constants-655e384a.js} +0 -0
  531. /package/build/esm/{constants-ce5271a6.js → constants-bcce86bf.js} +0 -0
  532. /package/build/esm/{context-3ef9593e.js → context-d703ab29.js} +0 -0
  533. /package/build/esm/{dataTransform-cbeb5762.js → dataTransform-302b3bba.js} +0 -0
  534. /package/build/esm/{index-56e4d976.js → index-15d20abe.js} +0 -0
  535. /package/build/esm/{index-8166c45c.js → index-27131e44.js} +0 -0
  536. /package/build/esm/{index-ec96ed21.js → index-3ad17633.js} +0 -0
  537. /package/build/esm/{index-bef69cf0.js → index-44548783.js} +0 -0
  538. /package/build/esm/{index-e8324372.js → index-8e4b3940.js} +0 -0
  539. /package/build/esm/{index-a131e0d4.js → index-b1f7fde6.js} +0 -0
  540. /package/build/esm/{index-be67b7ae.js → index-bb7b263b.js} +0 -0
  541. /package/build/esm/{index-e6344e81.js → index-e1a9a22f.js} +0 -0
  542. /package/build/esm/{index-f488874b.js → index-e78b9ca8.js} +0 -0
  543. /package/build/esm/{index.styles-403f770f.js → index.styles-6465d6bb.js} +0 -0
  544. /package/build/esm/{localizeNumberFormat-88646ced.js → localizeNumberFormat-01ee3264.js} +0 -0
  545. /package/build/esm/{normalizeLink-5d0ac05d.js → normalizeLink-ffec6dc4.js} +0 -0
  546. /package/build/esm/{number-003a0b20.js → number-32750773.js} +0 -0
  547. /package/build/esm/{shared-f8354531.js → shared-0319a067.js} +0 -0
  548. /package/build/esm/{translationsContext-f5f75ec5.js → translationsContext-844e0548.js} +0 -0
  549. /package/build/esm/{tslib.es6-88ed8ad1.js → tslib.es6-05b7cc0f.js} +0 -0
  550. /package/build/esm/{types-1fa82904.js → types-635612fa.js} +0 -0
  551. /package/build/esm/{types-bb63b0f1.js → types-ebdb3527.js} +0 -0
  552. /package/build/esm/{useOutsideClick-8288aa4e.js → useOutsideClick-8871c23e.js} +0 -0
  553. /package/build/esm/{useScrollbarSize-84630ccb.js → useScrollbarSize-8fe7073b.js} +0 -0
  554. /package/build/esm/{useUniqueId-781519f9.js → useUniqueId-4a933ede.js} +0 -0
  555. /package/build/esm/{utils-308ca058.js → utils-30eaad0a.js} +0 -0
  556. /package/build/esm/{utils-e7b81bdc.js → utils-f6a039c9.js} +0 -0
  557. /package/build/{index-0c2bcd44.js → index-0e9f2341.js} +0 -0
  558. /package/build/{index-c92c0540.js → index-0f418bd4.js} +0 -0
  559. /package/build/{index-b262b1d4.js → index-1e6b4a87.js} +0 -0
  560. /package/build/{index-a2e16797.js → index-3b430792.js} +0 -0
  561. /package/build/{index-f74dab7a.js → index-41135ccc.js} +0 -0
  562. /package/build/{index-cf78f71e.js → index-7d41403f.js} +0 -0
  563. /package/build/{index-8f28b7cd.js → index-cee2c290.js} +0 -0
  564. /package/build/{index-4dcc592d.js → index-eee9fd4c.js} +0 -0
  565. /package/build/{index-858052e3.js → index-f0881ec4.js} +0 -0
  566. /package/build/{index.styles-eac100df.js → index.styles-74ff8ffd.js} +0 -0
  567. /package/build/{localizeNumberFormat-276f5621.js → localizeNumberFormat-09126b38.js} +0 -0
  568. /package/build/{normalizeLink-d947e46b.js → normalizeLink-8520a2c4.js} +0 -0
  569. /package/build/{number-50711ee8.js → number-33c4dc73.js} +0 -0
  570. /package/build/{shared-e6688092.js → shared-5981f43c.js} +0 -0
  571. /package/build/{translationsContext-a3ccdf71.js → translationsContext-19e0122e.js} +0 -0
  572. /package/build/{tslib.es6-96c97478.js → tslib.es6-d33594b5.js} +0 -0
  573. /package/build/{types-c613708f.js → types-dd1637a7.js} +0 -0
  574. /package/build/{types-b89d9486.js → types-fbaa732a.js} +0 -0
  575. /package/build/{useOutsideClick-de846086.js → useOutsideClick-76a3079d.js} +0 -0
  576. /package/build/{useScrollbarSize-fa69e3af.js → useScrollbarSize-3f4fdeb6.js} +0 -0
  577. /package/build/{useUniqueId-f936ca4e.js → useUniqueId-a15633b9.js} +0 -0
  578. /package/build/{utils-fe333e42.js → utils-9446bade.js} +0 -0
  579. /package/build/{utils-08509440.js → utils-e8a0bd68.js} +0 -0
@@ -1,22 +1,27 @@
1
- import React__default, { useMemo, useRef, useCallback, useState, useReducer, useEffect } from 'react';
2
- import { Skeleton, Input, ScrollArea, Divider, Tabs, Flex, Button } from '@mantine/core';
3
- import { i as checkMarkIconUrl, P as PinIcon, h as getApiPath, u as useGeolocation } from './utils-5e210f54.js';
4
- import { a as useOutsideClick } from './useOutsideClick-8288aa4e.js';
5
- import { u as useTranslations } from './index-78e91f91.js';
1
+ import React__default, { useMemo, forwardRef, useRef, useImperativeHandle, useCallback, useState, useReducer, useEffect } from 'react';
2
+ import { Search } from '@hhgtech/icons/core';
3
+ import { Skeleton, clsx, Text as Text$1, Select, rem, useMantineTheme, Input, Stack, Flex, Box, Divider, Tabs } from '@mantine/core';
4
+ import { useDisclosure } from '@mantine/hooks';
5
+ import { i as checkMarkIconUrl, P as PinIcon, h as getApiPath, u as useGeolocation } from './utils-e2f50745.js';
6
+ import { a as useOutsideClick } from './useOutsideClick-8871c23e.js';
7
+ import { u as useTranslations } from './index-cae823f0.js';
6
8
  import debounce from 'lodash/debounce';
7
- import { a as ID_OPTION_CURRENT_LOCATION, M as MAPPING_CLIENT_WITH_SLUG, L as LOCALIZED_SLUGS, I as ID_OPTION_ALL_LOCATION, S as SLUG_VACIN_ID, C as CLIENT_KEY } from './constants-1da5a50a.js';
9
+ import { a as ID_OPTION_CURRENT_LOCATION, L as LOCALIZED_SLUGS, I as ID_OPTION_ALL_LOCATION, S as SLUG_VACIN_ID, C as CLIENT_KEY, M as MAPPING_CLIENT_WITH_SLUG } from './constants-655e384a.js';
8
10
  import styled from '@emotion/styled';
9
11
  import { theme } from './miscTheme.js';
10
- import { M as MediaQueries } from './utils-308ca058.js';
11
- import { C as Container } from './index-a131e0d4.js';
12
- import { Search } from '@hhgtech/icons/core';
13
- import { T as Text } from './index-6562a540.js';
14
- import { C as ChevronDown } from './ChevronDown-13f6a5cf.js';
15
- import { P as PATHS } from './paths-28205e0f.js';
16
- import './index-2b33f487.js';
12
+ import { M as MediaQueries } from './utils-30eaad0a.js';
13
+ import { C as Container } from './index-b1f7fde6.js';
14
+ import { T as Text } from './index-ffdfffa1.js';
15
+ import { C as ChevronDown } from './ChevronDown-fcbcff06.js';
16
+ import { _ as __rest } from './tslib.es6-05b7cc0f.js';
17
+ import { ArrowLeft } from '@hhgtech/icons/arrow';
18
+ import { M as Modal } from './index-7565bfca.js';
19
+ import { P as PATHS } from './paths-82fdd769.js';
20
+ import { B as Button } from './index-07d60a5d.js';
21
+ import './index-9ee90ed6.js';
17
22
  import 'date-fns/locale';
18
- import './index-6d341978.js';
19
- import './Locale-adfd207f.js';
23
+ import './index-70c23dec.js';
24
+ import './Locale-f39ad168.js';
20
25
  import './constantsSite.js';
21
26
  import './constantsDomainLocales.js';
22
27
  import './constantsRiskScreener.js';
@@ -24,9 +29,10 @@ import './constantsIsProduction.js';
24
29
  import './miscCookieHelper.js';
25
30
  import 'react-loading-skeleton';
26
31
  import 'string-format';
27
- import './translationsContext-f5f75ec5.js';
28
- import './tslib.es6-88ed8ad1.js';
29
- import './index-56e4d976.js';
32
+ import './translationsContext-844e0548.js';
33
+ import './index-15d20abe.js';
34
+ import './index.styles-6465d6bb.js';
35
+ import './shared-0319a067.js';
30
36
 
31
37
  const StyledSearchBarWrapper = styled.div ``;
32
38
  const StyleWrapperContainer = styled.div `
@@ -215,9 +221,9 @@ function reducer(state, action) {
215
221
  case ActionTypes.ClearInputSearch:
216
222
  return Object.assign(Object.assign({}, state), { focused: 'search', searchKeywords: '' });
217
223
  case ActionTypes.SelectLocation:
218
- return Object.assign(Object.assign({}, state), { focused: 'none', selectedLocation: action.payload, searchLocationKeywords: action.payload.name });
224
+ return Object.assign(Object.assign({}, state), { focused: 'none', selectedLocation: action.payload, searchLocationKeywords: action.payload.name, searchResults: {} });
219
225
  case ActionTypes.SelectSpecialty:
220
- return Object.assign(Object.assign({}, state), { focused: 'none', selectedSpecialty: action.payload });
226
+ return Object.assign(Object.assign({}, state), { focused: 'none', selectedSpecialty: action.payload, searchResults: {} });
221
227
  case ActionTypes.SelectSearchResult:
222
228
  return Object.assign(Object.assign({}, state), { searchKeywords: action.payload.name, isMobileModalOpened: false, focused: 'none', navigateTo: action.payload.url });
223
229
  case ActionTypes.FetchCitiesStart:
@@ -295,7 +301,7 @@ const StyleSearchInputsWrapper = styled.div `
295
301
  gap: 12px;
296
302
  }
297
303
  `;
298
- const StyleResultWrapper$2 = styled.div `
304
+ const StyleResultWrapper = styled.div `
299
305
  position: absolute;
300
306
  top: calc(100% + 2px);
301
307
  width: 100%;
@@ -311,7 +317,7 @@ const StyleResultWrapper$2 = styled.div `
311
317
  `;
312
318
 
313
319
  const StyledSearchResultWrapper = styled.div ``;
314
- const StyleResultHeader = styled.div `
320
+ styled.div `
315
321
  display: flex;
316
322
  justify-content: space-between;
317
323
  align-item: center;
@@ -343,9 +349,12 @@ const StyleResultItem = styled.div `
343
349
  align-items: center;
344
350
  cursor: pointer;
345
351
 
346
- &:hover {
347
- background-color: ${theme.colors.blue50};
352
+ ${MediaQueries.mbUp} {
353
+ &:hover {
354
+ background-color: ${theme.colors.blue50};
355
+ }
348
356
  }
357
+
349
358
  .image-item {
350
359
  flex: 0 0 48px;
351
360
  width: 48px;
@@ -412,8 +421,12 @@ styled.div `
412
421
  }
413
422
  `;
414
423
 
415
- const SearchResult = ({ state, type, results, location, isLoading, typeInformation, clientSlug = '', dispatch, }) => {
416
- const { locale, t } = useTranslations();
424
+ const SearchResult = ({ state, type, results,
425
+ // location,
426
+ isLoading, typeInformation,
427
+ // clientSlug = '',
428
+ dispatch, }) => {
429
+ const { t } = useTranslations();
417
430
  const { selectedLocation } = state;
418
431
  const typeSlug = useMemo(() => typeInformation[type].slug, [typeInformation, type]);
419
432
  const handleOnClick = (item) => {
@@ -434,40 +447,37 @@ const SearchResult = ({ state, type, results, location, isLoading, typeInformati
434
447
  });
435
448
  }
436
449
  };
437
- const handleSeeAll = () => {
438
- let url = `/${selectedLocation.slug}/${typeSlug}`;
439
- const slugClientUrl = MAPPING_CLIENT_WITH_SLUG[locale][clientSlug];
440
- if (slugClientUrl) {
441
- url += `/${slugClientUrl}`;
442
- }
443
- if ((type === 'doctor' || type === 'hospital') &&
444
- state.selectedSpecialty.id > 0) {
445
- url += `?specialtyId=${state.selectedSpecialty.id}`;
446
- }
447
- if (url) {
448
- dispatch({ type: ActionTypes.NavigateTo, payload: url });
449
- }
450
- };
450
+ // const handleSeeAll = () => {
451
+ // let url = `/${selectedLocation.slug}/${typeSlug}`
452
+ // const slugClientUrl = MAPPING_CLIENT_WITH_SLUG[locale][clientSlug]
453
+ // if (slugClientUrl) {
454
+ // url += `/${slugClientUrl}`
455
+ // }
456
+ // if (
457
+ // (type === 'doctor' || type === 'hospital') &&
458
+ // state.selectedSpecialty.id > 0
459
+ // ) {
460
+ // url += `?specialtyId=${state.selectedSpecialty.id}`
461
+ // }
462
+ // if (url) {
463
+ // dispatch({ type: ActionTypes.NavigateTo, payload: url })
464
+ // }
465
+ // }
466
+ if (results === null)
467
+ return null;
451
468
  return (React__default.createElement(StyledSearchResultWrapper, null,
452
- React__default.createElement(StyleResultHeader, null,
453
- React__default.createElement("div", { className: "title" }, t('booking.searchResult.description', {
454
- search_type: typeInformation[type].name,
455
- search_location: location,
456
- })),
457
- results.length > 0 && (React__default.createElement("div", { className: "btn-see-all", onClick: handleSeeAll }, t('home.seeAll')))),
458
- React__default.createElement(StyleResultBody, null,
459
- isLoading &&
460
- Array(3)
461
- .fill(undefined)
462
- .map((_, i) => (React__default.createElement(StyleResultItem, { key: type + 'loading' + i, className: i === 2 ? 'last-item' : '' },
463
- React__default.createElement("div", { className: "image-item" },
464
- React__default.createElement(Skeleton, { height: 48, circle: true, mb: "xl", animate: true })),
465
- React__default.createElement("div", { className: "infor" },
466
- React__default.createElement("div", { className: "title" },
467
- React__default.createElement(Skeleton, { height: 8, mt: 10, radius: "xl", animate: true })),
468
- React__default.createElement("div", { className: "description" },
469
- React__default.createElement("div", { className: "sub-description" },
470
- React__default.createElement(Skeleton, { height: 8, mt: 10, radius: "xl", width: "80%", animate: true }))))))),
469
+ React__default.createElement(StyleResultBody, { className: "search-results__body" },
470
+ isLoading && (React__default.createElement("div", { className: "skeleton-result" }, Array(3)
471
+ .fill(undefined)
472
+ .map((_, i) => (React__default.createElement(StyleResultItem, { key: type + 'loading' + i, className: i === 2 ? 'last-item' : '' },
473
+ React__default.createElement("div", { className: "image-item" },
474
+ React__default.createElement(Skeleton, { height: 48, circle: true, mb: "xl", animate: true })),
475
+ React__default.createElement("div", { className: "infor" },
476
+ React__default.createElement("div", { className: "title" },
477
+ React__default.createElement(Skeleton, { height: 8, mt: 10, radius: "xl", animate: true })),
478
+ React__default.createElement("div", { className: "description" },
479
+ React__default.createElement("div", { className: "sub-description" },
480
+ React__default.createElement(Skeleton, { height: 8, mt: 10, radius: "xl", width: "80%", animate: true }))))))))),
471
481
  !isLoading && results && results.length > 0 && (React__default.createElement(React__default.Fragment, null, results.map((item, index) => {
472
482
  var _a, _b;
473
483
  const isLastItem = (results.length > 4 && index === 3) ||
@@ -485,7 +495,7 @@ const SearchResult = ({ state, type, results, location, isLoading, typeInformati
485
495
  if (index >= 4) {
486
496
  return React__default.createElement(React__default.Fragment, null);
487
497
  }
488
- return (React__default.createElement(StyleResultItem, { key: item.id, className: isLastItem ? 'last-item' : '', onClick: () => handleOnClick(item) },
498
+ return (React__default.createElement(StyleResultItem, { key: item.id, className: clsx(isLastItem ? 'last-item' : '', 'result-item'), onClick: () => handleOnClick(item) },
489
499
  React__default.createElement("div", { className: "image-item" },
490
500
  React__default.createElement("img", { src: item.logo || item.avatar, alt: item.name })),
491
501
  React__default.createElement("div", { className: "infor" },
@@ -494,7 +504,14 @@ const SearchResult = ({ state, type, results, location, isLoading, typeInformati
494
504
  typeInformation[type].icon,
495
505
  React__default.createElement("div", { className: "sub-description" }, subDescription)))));
496
506
  }))),
497
- !isLoading && (results === null || results === void 0 ? void 0 : results.length) === 0 && (React__default.createElement(Text, { size: "sm", color: theme.colors.gray400 }, t('booking.searchBar.noResults'))))));
507
+ !isLoading && (results === null || results === void 0 ? void 0 : results.length) === 0 && (React__default.createElement(Text, { size: "sm", color: theme.colors.gray400, className: "noresult-block" }, t('booking.searchBar.noResults'))))));
508
+ };
509
+
510
+ const SearchResultContent = ({ state, type, isLoading, clientSlug, typeInformation, dispatch, }) => {
511
+ var _a;
512
+ if (state.focused !== 'search')
513
+ return null;
514
+ return (React__default.createElement(SearchResult, { type: type, state: state, results: ((_a = state.searchResults) === null || _a === void 0 ? void 0 : _a[type]) || null, location: state.selectedLocation.name, dispatch: dispatch, isLoading: isLoading, typeInformation: typeInformation, clientSlug: clientSlug }));
498
515
  };
499
516
 
500
517
  const StyleSearchSpecialtyWrapper = styled.div `
@@ -507,7 +524,7 @@ const StyleSearchSpecialtyWrapper = styled.div `
507
524
  gap: 12px;
508
525
  }
509
526
  `;
510
- const StyleResultWrapper$1 = styled.div `
527
+ styled.div `
511
528
  position: absolute;
512
529
  top: calc(100% + 2px);
513
530
  width: calc(100% + 100px);
@@ -589,97 +606,182 @@ const StyledSpecialtyItem = styled.li `
589
606
  }
590
607
  `;
591
608
 
592
- const DoctorIcon = () => (React__default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
593
- React__default.createElement("path", { d: "M8.983 14.333q-1.666 0-2.833-1.166Q4.983 12 4.983 10.333v-.366a3.48 3.48 0 0 1-2.258-1.2 3.57 3.57 0 0 1-.909-2.434V3.1a.58.58 0 0 1 .175-.425.58.58 0 0 1 .425-.175h1.4v-.167a.486.486 0 0 1 .5-.5q.217 0 .36.142a.5.5 0 0 1 .14.358v1.334a.485.485 0 0 1-.5.5.484.484 0 0 1-.5-.5V3.5h-1v2.833q0 1.1.784 1.884Q4.383 9 5.483 9t1.883-.783.784-1.884V3.5h-1v.167a.485.485 0 0 1-.5.5.484.484 0 0 1-.5-.5V2.333a.486.486 0 0 1 .5-.5q.217 0 .358.142a.5.5 0 0 1 .142.358V2.5h1.4a.58.58 0 0 1 .425.175.58.58 0 0 1 .175.425v3.233q0 1.4-.908 2.434a3.5 3.5 0 0 1-2.259 1.2v.366q0 1.25.875 2.126a2.9 2.9 0 0 0 2.125.874q1.25 0 2.125-.874a2.9 2.9 0 0 0 .875-2.126V9.25a1.74 1.74 0 0 1-.858-.609 1.6 1.6 0 0 1-.342-1.008q0-.716.5-1.216t1.2-.5q.716 0 1.217.5.5.5.5 1.216 0 .567-.342 1.008t-.875.609v1.083q0 1.667-1.167 2.834-1.166 1.166-2.833 1.166m3.5-6q.3 0 .509-.208a.67.67 0 0 0 .208-.492q0-.3-.208-.508a.7.7 0 0 0-.509-.208q-.3 0-.5.208a.7.7 0 0 0-.2.508q0 .284.2.492t.5.208", fill: "#595959" })));
594
- const ServiceIcon = () => (React__default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
595
- React__default.createElement("path", { d: "M6.868 9.265v.974q0 .405.284.69.284.283.69.283t.69-.284.284-.69v-.973h.973q.405 0 .69-.284a.94.94 0 0 0 .284-.689.94.94 0 0 0-.284-.69.94.94 0 0 0-.69-.284h-.973v-.974a.94.94 0 0 0-.284-.69.94.94 0 0 0-.69-.284.94.94 0 0 0-.689.284.94.94 0 0 0-.285.69v.974h-.973a.94.94 0 0 0-.69.283.94.94 0 0 0-.284.69q0 .405.284.69.285.284.69.284zm-3.46 4.868q-.581 0-.994-.413A1.36 1.36 0 0 1 2 12.725v-6.65a1.4 1.4 0 0 1 .563-1.127l4.434-3.333q.369-.282.844-.282.474 0 .846.282l4.434 3.333q.264.193.413.493.15.3.15.633v6.651q0 .58-.414.995a1.36 1.36 0 0 1-.994.413zm0-1.168h8.868q.105 0 .172-.068a.23.23 0 0 0 .068-.172v-6.65a.2.2 0 0 0-.027-.11.3.3 0 0 0-.07-.085L7.983 2.554a.2.2 0 0 0-.142-.052.2.2 0 0 0-.142.052L3.266 5.88a.3.3 0 0 0-.071.086.2.2 0 0 0-.027.108v6.651q0 .105.068.172a.23.23 0 0 0 .172.068", fill: "#595959" })));
596
- const HospitalIcon = () => (React__default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
597
- React__default.createElement("path", { d: "M8 8q.55 0 .941-.392.393-.391.392-.941 0-.55-.392-.942A1.28 1.28 0 0 0 8 5.333q-.55 0-.942.392a1.28 1.28 0 0 0-.391.942q0 .55.391.941Q7.45 8 8 8m0 4.9q2.032-1.866 3.017-3.392Q12 7.983 12 6.8q0-1.817-1.158-2.975Q9.682 2.667 8 2.667T5.158 3.825Q4 4.983 4 6.8q0 1.184.983 2.708Q5.966 11.034 8 12.9m0 1.517a.8.8 0 0 1-.5-.183q-2.433-2.151-3.633-3.992T2.667 6.8q0-2.5 1.608-3.983Q5.883 1.332 8 1.333q2.116 0 3.725 1.484T13.333 6.8q0 1.6-1.2 3.442-1.2 1.841-3.633 3.991a.8.8 0 0 1-.5.184", fill: "#8C8C8C" })));
598
- const SpecialtyIcon = () => (React__default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16" },
599
- React__default.createElement("path", { d: "M3.833.5a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667M10.5.5c-.92 0-1.667.746-1.667 1.667V5.5c0 .92.746 1.667 1.667 1.667h3.333c.921 0 1.667-.746 1.667-1.667V2.167C15.5 1.246 14.754.5 13.833.5zM3.833 8.833a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667m8.334 0a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667", fill: "#9AA2AC" })));
600
-
601
- const SearchSpecialty = ({ state, isMobile, debouncedFetchSearchResults, selectedLocation, onSpecialtyClick, dispatch, }) => {
602
- var _a;
609
+ const CustomSelectItem$1 = forwardRef((_a, ref) => {
610
+ var { label, value, specialty } = _a, others = __rest(_a, ["label", "value", "specialty"]);
611
+ return (React__default.createElement("div", Object.assign({ ref: ref }, others),
612
+ React__default.createElement(StyledSpecialtyItem, { key: value,
613
+ // onClick={(evt) => {
614
+ // evt.nativeEvent.stopImmediatePropagation()
615
+ // if (onSpecialtyClick) {
616
+ // onSpecialtyClick({
617
+ // ...specialty,
618
+ // total_doctor: 0,
619
+ // })
620
+ // }
621
+ // }}
622
+ role: "button", tabIndex: 0, "aria-label": `Select ${label} as location` },
623
+ React__default.createElement("div", { className: "image-item" },
624
+ React__default.createElement("img", { src: specialty.thumbnail, alt: label })),
625
+ React__default.createElement(Text$1, { size: "md" }, label))));
626
+ });
627
+
628
+ const SearchSpecialty = ({ state,
629
+ // debouncedFetchSearchResults,
630
+ onSpecialtyClick, dispatch, }) => {
603
631
  const { t, locale } = useTranslations();
604
632
  const inputSpecialtyWrapperRef = useRef(null);
605
633
  const slugs = useMemo(() => LOCALIZED_SLUGS[locale], [locale]);
606
- const styleSpecialties = useMemo(() => {
607
- return {
608
- wrapper: {
609
- '&:after': {
610
- content: '""',
611
- width: '1px',
612
- height: '20px',
613
- backgroundColor: '#E4E8EC',
614
- position: 'absolute',
615
- right: 0,
616
- top: '13px',
617
- },
618
- },
619
- input: {
620
- border: isMobile ? 'border: 1px solid #d9d9d9' : 'none',
621
- height: isMobile ? '40px' : '46px !important',
622
- paddingRight: '30px',
623
- '&:focus': {
624
- boxShadow: isMobile ? 'box-shadow: 0px 0px 0px 2px #91caff' : 'none',
625
- },
626
- },
627
- rightSection: {
628
- width: '30px',
629
- svg: {
630
- fontSize: '20px',
631
- },
632
- },
633
- };
634
- }, [isMobile]);
635
- const handleSearchSpecialtyInputChange = useCallback(function handleSearchSpecialtyInputChange(value) {
636
- // dispatch({ type: ActionTypes.ChangeInputLocation, payload: value })
637
- // if (value.trim().length > SEARCH_KEYWORD_MIN_LENGTH[state.locale]) {
638
- // debouncedFetchSearchResults(value.trim())
639
- // } else {
640
- // debouncedFetchSearchResults.cancel()
641
- // dispatch({ type: ActionTypes.DisplayInitialCities })
642
- // }
643
- console.log(value);
644
- }, [debouncedFetchSearchResults, dispatch]);
634
+ // const styleSpecialties = useMemo(() => {
635
+ // return {
636
+ // wrapper: {
637
+ // '&:after': {
638
+ // content: '""',
639
+ // width: '1px',
640
+ // height: '20px',
641
+ // backgroundColor: '#E4E8EC',
642
+ // position: 'absolute',
643
+ // right: 0,
644
+ // top: '13px',
645
+ // },
646
+ // },
647
+ // input: {
648
+ // border: isMobile ? 'border: 1px solid #d9d9d9' : 'none',
649
+ // height: isMobile ? '40px' : '46px !important',
650
+ // paddingRight: '30px',
651
+ // '&:focus': {
652
+ // boxShadow: isMobile ? 'box-shadow: 0px 0px 0px 2px #91caff' : 'none',
653
+ // },
654
+ // },
655
+ // rightSection: {
656
+ // width: '30px',
657
+ // svg: {
658
+ // fontSize: '20px',
659
+ // },
660
+ // },
661
+ // } as any
662
+ // }, [isMobile])
663
+ // const handleSearchSpecialtyInputChange = useCallback(
664
+ // function handleSearchSpecialtyInputChange(value: string) {
665
+ // // dispatch({ type: ActionTypes.ChangeInputLocation, payload: value })
666
+ // // if (value.trim().length > SEARCH_KEYWORD_MIN_LENGTH[state.locale]) {
667
+ // // debouncedFetchSearchResults(value.trim())
668
+ // // } else {
669
+ // // debouncedFetchSearchResults.cancel()
670
+ // // dispatch({ type: ActionTypes.DisplayInitialCities })
671
+ // // }
672
+ // console.log(value)
673
+ // },
674
+ // [debouncedFetchSearchResults, dispatch],
675
+ // )
645
676
  useOutsideClick(inputSpecialtyWrapperRef, () => {
646
677
  dispatch({ type: ActionTypes.ClickOutsideInputSpecialty });
647
678
  });
679
+ const specialtyData = [
680
+ {
681
+ name: t('booking.searchBar.allSpecialties'),
682
+ id: -1,
683
+ thumbnail: '',
684
+ total_doctor: 0,
685
+ slug: slugs.SPECIALTIES,
686
+ },
687
+ ...state.allSpecialties,
688
+ ];
689
+ const selectValue = state.selectedSpecialty && typeof state.selectedSpecialty.id === 'number'
690
+ ? String(state.selectedSpecialty.id)
691
+ : null;
648
692
  return (React__default.createElement(StyleSearchSpecialtyWrapper, { ref: inputSpecialtyWrapperRef },
649
- React__default.createElement(Input.Wrapper, null,
650
- React__default.createElement(Input, { size: isMobile ? 'md' : 'lg', placeholder: t('booking.searchPopup.specialties'), value: ((_a = state === null || state === void 0 ? void 0 : state.selectedSpecialty) === null || _a === void 0 ? void 0 : _a.name) || '', rightSection: React__default.createElement(ChevronDown, null), styles: styleSpecialties, onFocus: () => dispatch({ type: ActionTypes.FocusInputSpecialty }), onChange: (event) => {
651
- handleSearchSpecialtyInputChange(event.target.value);
652
- } })),
653
- state.focused === 'specialty' && (React__default.createElement(StyleResultWrapper$1, null,
654
- React__default.createElement(StyledSpecialtyItem, { key: "all-location", role: "button", tabIndex: 0, onClick: () => {
655
- if (onSpecialtyClick) {
656
- onSpecialtyClick({
657
- name: t('booking.searchBar.allSpecialties'),
658
- id: -1,
659
- thumbnail: '',
660
- total_doctor: 0,
661
- slug: slugs.SPECIALTIES,
662
- });
663
- }
664
- } },
665
- React__default.createElement("div", { className: "image-item" },
666
- React__default.createElement(SpecialtyIcon, null)),
667
- React__default.createElement(Text, { size: "md" }, t('booking.searchBar.allSpecialties'))),
668
- state.allSpecialties.map((specialty) => (React__default.createElement(StyledSpecialtyItem, { key: specialty.id, onClick: (evt) => {
669
- evt.nativeEvent.stopImmediatePropagation();
670
- if (onSpecialtyClick) {
671
- onSpecialtyClick(Object.assign(Object.assign({}, specialty), { total_doctor: 0 }));
672
- }
673
- }, role: "button", tabIndex: 0, "aria-label": `Select ${specialty.name} as location`, isSelected: (selectedLocation === null || selectedLocation === void 0 ? void 0 : selectedLocation.id) === specialty.id },
674
- React__default.createElement("div", { className: "image-item" },
675
- React__default.createElement("img", { src: specialty.thumbnail, alt: specialty.name })),
676
- React__default.createElement(Text, { size: "md" }, specialty.name))))))));
693
+ React__default.createElement(Select, { value: selectValue, placeholder: t('booking.searchPopup.specialties'), searchable: true, nothingFound: t('common.noResult'), maxDropdownHeight: 340, dropdownPosition: "bottom", data: specialtyData.map((specialty) => ({
694
+ value: String(specialty.id),
695
+ label: specialty.name,
696
+ specialty,
697
+ })), rightSection: React__default.createElement(ChevronDown, { style: { width: 20, height: 20 } }), styles: (theme) => ({
698
+ dropdown: {
699
+ left: '0 !important',
700
+ border: 0,
701
+ marginTop: -7,
702
+ borderRadius: 0,
703
+ '& [data-mantine-scrollbar]': {
704
+ '&[data-orientation="vertical"]': {
705
+ width: '6px',
706
+ },
707
+ },
708
+ [theme.fn.largerThan('sm')]: {
709
+ minWidth: 264,
710
+ width: `264px !important`,
711
+ },
712
+ },
713
+ item: {
714
+ padding: 0,
715
+ '&[data-selected]': {
716
+ '&, &:hover': {
717
+ backgroundColor: 'transparent',
718
+ color: 'inherit',
719
+ },
720
+ },
721
+ '&[data-hovered]': {
722
+ backgroundColor: 'transparent',
723
+ },
724
+ },
725
+ input: {
726
+ '&:not(.mantine-Textarea-input)': {
727
+ height: 40,
728
+ fontSize: rem(14),
729
+ paddingLeft: 14,
730
+ paddingRight: 14,
731
+ [theme.fn.largerThan('sm')]: {
732
+ height: 46,
733
+ fontSize: rem(16),
734
+ paddingLeft: 16,
735
+ paddingRight: 16,
736
+ borderColor: 'transparent',
737
+ },
738
+ '&:focus, &:focus-within': {
739
+ outline: 'none',
740
+ boxShadow: 'none',
741
+ },
742
+ },
743
+ },
744
+ itemsWrapper: {
745
+ padding: 0,
746
+ },
747
+ wrapper: {
748
+ [theme.fn.largerThan('sm')]: {
749
+ position: 'relative',
750
+ '&:after': {
751
+ content: '""',
752
+ width: '1px',
753
+ height: '20px',
754
+ backgroundColor: '#E4E8EC',
755
+ position: 'absolute',
756
+ right: 0,
757
+ top: '13px',
758
+ },
759
+ },
760
+ },
761
+ }), itemComponent: CustomSelectItem$1, filter: (value, item) => item.label.toLowerCase().includes(value.toLowerCase().trim()), onChange: (value) => {
762
+ if (value == null)
763
+ return;
764
+ const specialty = specialtyData.find((i) => String(i.id) === value);
765
+ if (!specialty)
766
+ return;
767
+ onSpecialtyClick(Object.assign(Object.assign(Object.assign({}, specialty), { thumbnail: specialty.thumbnail || '' }), (Number(value) !== -1 && {
768
+ total_doctor: 0,
769
+ })));
770
+ } })));
677
771
  };
678
772
 
679
- const SearchInputs = ({ state, type, isMobile, isLoading, initalSearchValue, typeInformation, debouncedFetchSearchResults, trackingAttributes, hideSpecialtySelection = false, clientSlug = '', focusSearchInput, onSearch, onEnterSearch, dispatch, }) => {
680
- var _a;
773
+ const SearchInputs = forwardRef(({ state, type, isMobile, isLoading, initalSearchValue, typeInformation, debouncedFetchSearchResults, trackingAttributes, hideSpecialtySelection = false, clientSlug = '', onSearch, onFocusInput, onEnterSearch, dispatch, onlyShowSearchBox, onChangeSpecialty, }, ref) => {
681
774
  const { t } = useTranslations();
775
+ const theme = useMantineTheme();
682
776
  const inputSearchWrapperRef = useRef(null);
777
+ const internalInputRef = useRef(null);
778
+ useImperativeHandle(ref, () => ({
779
+ focus: () => {
780
+ var _a;
781
+ (_a = internalInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
782
+ },
783
+ }));
784
+ const hasSearchIcon = !onlyShowSearchBox;
683
785
  const gaAttributes = useMemo(() => {
684
786
  if (trackingAttributes) {
685
787
  return {
@@ -693,20 +795,16 @@ const SearchInputs = ({ state, type, isMobile, isLoading, initalSearchValue, typ
693
795
  }
694
796
  }, [trackingAttributes]);
695
797
  const placeholderSearch = useMemo(() => {
696
- if (type === 'doctor') {
798
+ if (type === 'doctor')
697
799
  return t('booking.searchBar.placeholder.doctor');
698
- }
699
- if (type === 'service') {
800
+ if (type === 'service')
700
801
  return t('booking.searchBar.placeholder.service');
701
- }
702
- if (type === 'hospital') {
802
+ if (type === 'hospital')
703
803
  return t('booking.searchBar.placeholder.hospital');
704
- }
705
- if (type === 'specialty') {
804
+ if (type === 'specialty')
706
805
  return t('booking.searchBar.placeholder.specialty');
707
- }
708
806
  return '';
709
- }, [type]);
807
+ }, [type, t]);
710
808
  const styleInputWrapper = useMemo(() => {
711
809
  return {
712
810
  root: {
@@ -716,7 +814,11 @@ const SearchInputs = ({ state, type, isMobile, isLoading, initalSearchValue, typ
716
814
  display: 'none',
717
815
  },
718
816
  input: {
719
- paddingLeft: '48px',
817
+ paddingLeft: hasSearchIcon ? 48 : 16,
818
+ [theme.fn.smallerThan('sm')]: {
819
+ height: 40,
820
+ fontSize: rem(14),
821
+ },
720
822
  },
721
823
  '.mantine-Input-icon': {
722
824
  left: '0',
@@ -724,22 +826,22 @@ const SearchInputs = ({ state, type, isMobile, isLoading, initalSearchValue, typ
724
826
  },
725
827
  },
726
828
  };
727
- }, []);
829
+ }, [hasSearchIcon, theme]);
728
830
  const styleInput = useMemo(() => {
729
831
  return {
730
832
  icon: {
731
- left: '165px',
833
+ left: '205px',
732
834
  },
733
835
  input: {
734
836
  color: '#262626',
735
837
  '&[data-with-icon="true"]': {
736
- paddingLeft: '205px',
838
+ paddingLeft: '245px',
737
839
  paddingRight: '16px',
738
840
  },
739
841
  },
740
842
  rightSection: {
741
843
  left: 0,
742
- width: '165px',
844
+ width: '205px',
743
845
  padding: '1px',
744
846
  },
745
847
  };
@@ -752,7 +854,7 @@ const SearchInputs = ({ state, type, isMobile, isLoading, initalSearchValue, typ
752
854
  };
753
855
  }, []);
754
856
  useOutsideClick(inputSearchWrapperRef, () => {
755
- dispatch({ type: ActionTypes.ClickOutsideInputSearch });
857
+ !isMobile && dispatch({ type: ActionTypes.ClickOutsideInputSearch });
756
858
  });
757
859
  const handleSearchInputChange = useCallback(function handleSearchInputChange(value) {
758
860
  dispatch({ type: ActionTypes.ChangeInputSearch, payload: value });
@@ -764,40 +866,84 @@ const SearchInputs = ({ state, type, isMobile, isLoading, initalSearchValue, typ
764
866
  value.trim().length === 0) {
765
867
  debouncedFetchSearchResults(value.trim(), state, type, clientSlug);
766
868
  }
767
- else {
768
- debouncedFetchSearchResults.cancel();
769
- dispatch({ type: ActionTypes.DisplayInitialSearchResults });
770
- }
771
- }, [dispatch, state, type]);
869
+ }, [
870
+ dispatch,
871
+ state,
872
+ type,
873
+ initalSearchValue,
874
+ debouncedFetchSearchResults,
875
+ clientSlug,
876
+ onSearch,
877
+ ]);
772
878
  const handleSpecialtyClick = useCallback(function handleSpecialtyClick(specialty) {
879
+ var _a;
773
880
  dispatch({ type: ActionTypes.SelectSpecialty, payload: specialty });
774
- focusSearchInput();
775
- }, [dispatch]);
881
+ onChangeSpecialty === null || onChangeSpecialty === void 0 ? void 0 : onChangeSpecialty(specialty);
882
+ !isMobile && ((_a = internalInputRef.current) === null || _a === void 0 ? void 0 : _a.focus());
883
+ }, [dispatch, onChangeSpecialty]);
776
884
  const inputOnKeyDown = useCallback((e) => {
777
- if (e.keyCode === 13) {
885
+ if (e.key === 'Enter') {
778
886
  e.stopPropagation();
779
887
  e.preventDefault();
780
888
  onEnterSearch && onEnterSearch();
781
889
  }
782
890
  }, [onEnterSearch]);
783
891
  return (React__default.createElement(StyleSearchInputsWrapper, { ref: inputSearchWrapperRef }, type === 'specialty' ? (React__default.createElement(Input.Wrapper, { styles: styleInputWrapper },
784
- React__default.createElement(Input, { icon: React__default.createElement(Search, null), size: isMobile ? 'md' : 'lg', placeholder: placeholderSearch, styles: styleInputSpecialties, value: state.searchKeywords, onFocus: () => dispatch({ type: ActionTypes.FocusInputSearchSpecialty }), onChange: (event) => {
892
+ React__default.createElement(Input, { ref: internalInputRef, icon: hasSearchIcon && React__default.createElement(Search, null), size: isMobile ? 'md' : 'lg', placeholder: placeholderSearch, styles: styleInputSpecialties, value: state.searchKeywords, onFocus: () => dispatch({ type: ActionTypes.FocusInputSearchSpecialty }), onChange: (event) => {
785
893
  handleSearchInputChange(event.target.value);
786
894
  }, onKeyDown: inputOnKeyDown }))) : (React__default.createElement(React__default.Fragment, null,
787
895
  type === 'service' ? (React__default.createElement(Input.Wrapper, { styles: styleInputWrapper },
788
- React__default.createElement(Input, { icon: React__default.createElement(Search, null), size: isMobile ? 'md' : 'lg', name: "search-results", placeholder: placeholderSearch, onFocus: () => dispatch({ type: ActionTypes.FocusInputSearch }), value: state.searchKeywords, onChange: (event) => {
896
+ React__default.createElement(Input, { ref: internalInputRef, icon: hasSearchIcon && React__default.createElement(Search, null), size: isMobile ? 'md' : 'lg', name: "search-results", placeholder: placeholderSearch, onFocus: () => {
897
+ dispatch({ type: ActionTypes.FocusInputSearch });
898
+ onFocusInput === null || onFocusInput === void 0 ? void 0 : onFocusInput();
899
+ }, value: state.searchKeywords, onChange: (event) => {
789
900
  handleSearchInputChange(event.target.value);
790
901
  }, onKeyDown: inputOnKeyDown }))) : (React__default.createElement(React__default.Fragment, null, isMobile && !hideSpecialtySelection ? (React__default.createElement(React__default.Fragment, null,
791
- React__default.createElement(SearchSpecialty, { state: state, isMobile: isMobile, dispatch: dispatch, debouncedFetchSearchResults: debouncedFetchSearchResults, onSpecialtyClick: handleSpecialtyClick }),
902
+ !onlyShowSearchBox && (React__default.createElement(SearchSpecialty, { state: state, isMobile: isMobile, dispatch: dispatch, debouncedFetchSearchResults: debouncedFetchSearchResults, onSpecialtyClick: handleSpecialtyClick })),
792
903
  React__default.createElement(Input.Wrapper, { styles: styleInputWrapper },
793
- React__default.createElement(Input, { icon: React__default.createElement(Search, null), size: "md", placeholder: placeholderSearch, value: state.searchKeywords, name: "search-results", onFocus: () => dispatch({ type: ActionTypes.FocusInputSearch }), onChange: (event) => {
904
+ React__default.createElement(Input, { ref: internalInputRef, icon: hasSearchIcon && React__default.createElement(Search, null), size: "md", placeholder: placeholderSearch, value: state.searchKeywords, name: "search-results", onFocus: () => {
905
+ dispatch({ type: ActionTypes.FocusInputSearch });
906
+ onFocusInput === null || onFocusInput === void 0 ? void 0 : onFocusInput();
907
+ }, onChange: (event) => {
794
908
  handleSearchInputChange(event.target.value);
795
909
  }, onKeyDown: inputOnKeyDown })))) : (React__default.createElement(Input.Wrapper, { styles: styleInputWrapper, className: hideSpecialtySelection ? 'hide-specialty-selection' : '' },
796
- React__default.createElement(Input, Object.assign({ icon: React__default.createElement(Search, null), size: "lg", placeholder: placeholderSearch, styles: styleInput, name: "search-results", autoComplete: "off", value: state.searchKeywords, onChange: (event) => {
910
+ React__default.createElement(Input, Object.assign({ ref: internalInputRef, icon: hasSearchIcon && React__default.createElement(Search, null), size: "lg", placeholder: placeholderSearch, styles: styleInput, name: "search-results", autoComplete: "off", value: state.searchKeywords, onChange: (event) => {
797
911
  handleSearchInputChange(event.target.value);
798
- }, onFocus: () => dispatch({ type: ActionTypes.FocusInputSearch }), onKeyDown: inputOnKeyDown }, gaAttributes, { rightSection: hideSpecialtySelection ? (React__default.createElement(React__default.Fragment, null)) : (React__default.createElement(SearchSpecialty, { state: state, isMobile: isMobile, dispatch: dispatch, debouncedFetchSearchResults: debouncedFetchSearchResults, onSpecialtyClick: handleSpecialtyClick })) })))))),
799
- state.focused === 'search' && (React__default.createElement(StyleResultWrapper$2, null,
800
- React__default.createElement(SearchResult, { type: type, state: state, results: ((_a = state.searchResults) === null || _a === void 0 ? void 0 : _a[type]) || [], location: state.selectedLocation.name, dispatch: dispatch, isLoading: isLoading, typeInformation: typeInformation, clientSlug: clientSlug })))))));
912
+ }, onFocus: () => {
913
+ dispatch({ type: ActionTypes.FocusInputSearch });
914
+ onFocusInput === null || onFocusInput === void 0 ? void 0 : onFocusInput();
915
+ }, onKeyDown: inputOnKeyDown }, gaAttributes, { rightSection: hideSpecialtySelection ? (React__default.createElement(React__default.Fragment, null)) : (!onlyShowSearchBox && (React__default.createElement(SearchSpecialty, { state: state, isMobile: isMobile, dispatch: dispatch, debouncedFetchSearchResults: debouncedFetchSearchResults, onSpecialtyClick: handleSpecialtyClick }))) })))))),
916
+ !isMobile && (React__default.createElement(StyleResultWrapper, null,
917
+ React__default.createElement(SearchResultContent, { type: type, state: state, dispatch: dispatch, isLoading: isLoading, typeInformation: typeInformation, clientSlug: clientSlug })))))));
918
+ });
919
+ SearchInputs.displayName = 'SearchInputs';
920
+
921
+ const ModalSearchResult = (_a) => {
922
+ var { searchInputEle, closeModal, children } = _a, props = __rest(_a, ["searchInputEle", "closeModal", "children"]);
923
+ const theme = useMantineTheme();
924
+ return (React__default.createElement(Modal, Object.assign({}, props, { zIndex: 310, fullScreen: true, styles: {
925
+ content: {
926
+ borderRadius: 0,
927
+ height: '100%',
928
+ '.search-results__body': { padding: 0 },
929
+ '.result-item': {
930
+ paddingLeft: 16,
931
+ paddingRight: 16,
932
+ },
933
+ '.noresult-block': {
934
+ padding: 16,
935
+ },
936
+ '.skeleton-result': {
937
+ padding: 16,
938
+ },
939
+ },
940
+ header: { display: 'none' },
941
+ } }),
942
+ React__default.createElement(Stack, { spacing: 16, sx: { paddingTop: 16 } },
943
+ React__default.createElement(Flex, { align: 'center', gap: 12 },
944
+ React__default.createElement(ArrowLeft, { size: 28, onClick: closeModal, color: theme.fn.primaryColor() }),
945
+ React__default.createElement(Box, { sx: { width: '100%' } }, searchInputEle)),
946
+ children)));
801
947
  };
802
948
 
803
949
  const StyleSearchLocationWrapper = styled.div `
@@ -810,7 +956,7 @@ const StyleSearchLocationWrapper = styled.div `
810
956
  gap: 12px;
811
957
  }
812
958
  `;
813
- const StyleResultWrapper = styled.div `
959
+ styled.div `
814
960
  position: absolute;
815
961
  top: calc(100% + 2px);
816
962
  width: 100%;
@@ -833,17 +979,6 @@ const StyledLocationItem = styled.div `
833
979
  gap: 14px;
834
980
  overflow: hidden;
835
981
 
836
- ${({ isSelected }) => isSelected &&
837
- `
838
- &::after {
839
- content: ${checkMarkIconUrl};
840
- top: 50%;
841
- right: 18px;
842
- position: absolute;
843
- transform: translateY(-50%);
844
- }
845
- `}
846
-
847
982
  & + li::before {
848
983
  content: '';
849
984
  position: absolute;
@@ -878,9 +1013,29 @@ const StyledPinIcon = styled(PinIcon) `
878
1013
  flex: 0 0 12px;
879
1014
  `;
880
1015
 
881
- const SearchLocation = ({ state, isMobile, debouncedFetchCitiesByKeyword, selectedLocation, trackingAttributes, onLocationClick, dispatch, }) => {
1016
+ const CustomSelectItem = forwardRef((_a, ref) => {
1017
+ var { label, value } = _a, others = __rest(_a, ["label", "value"]);
1018
+ return (React__default.createElement("div", Object.assign({ ref: ref }, others),
1019
+ React__default.createElement(StyledLocationItem, { key: value, role: "button", tabIndex: 0, "aria-label": `Select ${label} as location`, className: "location-item" },
1020
+ React__default.createElement(StyledPinIcon, { color: theme.colors.neutral400 }),
1021
+ React__default.createElement(Text$1, { size: "md" }, label))));
1022
+ });
1023
+
1024
+ const SearchLocation = ({ state, debouncedFetchCitiesByKeyword, selectedLocation, trackingAttributes, onLocationClick, dispatch, }) => {
1025
+ var _a;
882
1026
  const { t, locale } = useTranslations();
883
1027
  const inputLocationWrapperRef = useRef(null);
1028
+ const citiesData = useMemo(() => {
1029
+ var _a;
1030
+ return [
1031
+ {
1032
+ name: t('booking.searchBar.allLocations'),
1033
+ id: ID_OPTION_ALL_LOCATION,
1034
+ slug: (_a = LOCALIZED_SLUGS[locale]) === null || _a === void 0 ? void 0 : _a.ALL,
1035
+ },
1036
+ ...state.cities,
1037
+ ];
1038
+ }, [state.cities, t, locale]);
884
1039
  const gaAttributes = useMemo(() => {
885
1040
  if (trackingAttributes) {
886
1041
  return {
@@ -889,9 +1044,7 @@ const SearchLocation = ({ state, isMobile, debouncedFetchCitiesByKeyword, select
889
1044
  'data-event-label': trackingAttributes.dataEventLabel,
890
1045
  };
891
1046
  }
892
- else {
893
- return {};
894
- }
1047
+ return {};
895
1048
  }, [trackingAttributes]);
896
1049
  const handleSearchLocationInputChange = useCallback(function handleSearchLocationInputChange(value) {
897
1050
  dispatch({ type: ActionTypes.ChangeInputLocation, payload: value });
@@ -902,39 +1055,101 @@ const SearchLocation = ({ state, isMobile, debouncedFetchCitiesByKeyword, select
902
1055
  debouncedFetchCitiesByKeyword.cancel();
903
1056
  dispatch({ type: ActionTypes.DisplayInitialCities });
904
1057
  }
905
- }, [debouncedFetchCitiesByKeyword, dispatch]);
1058
+ }, [debouncedFetchCitiesByKeyword, dispatch, state.locale]);
906
1059
  useOutsideClick(inputLocationWrapperRef, () => {
907
1060
  dispatch({ type: ActionTypes.ClickOutsideInputLocation });
908
1061
  });
1062
+ const stateValue = (_a = selectedLocation === null || selectedLocation === void 0 ? void 0 : selectedLocation.id) !== null && _a !== void 0 ? _a : null;
1063
+ const defaultValue = stateValue === null ? undefined : String(stateValue);
909
1064
  return (React__default.createElement(StyleSearchLocationWrapper, { ref: inputLocationWrapperRef },
910
- React__default.createElement(Input.Wrapper, null,
911
- React__default.createElement(Input, Object.assign({ size: isMobile ? 'md' : 'lg', placeholder: "Search location", value: state.searchLocationKeywords, onFocus: () => dispatch({ type: ActionTypes.FocusInputLocation }), onChange: (event) => {
912
- handleSearchLocationInputChange(event.target.value);
913
- } }, gaAttributes))),
914
- state.focused === 'location' && (React__default.createElement(StyleResultWrapper, null,
915
- React__default.createElement(ScrollArea, { scrollbarSize: 6, styles: { viewport: { maxHeight: 400 } } },
916
- React__default.createElement(StyledLocationItem, { key: "all-location", role: "button", tabIndex: 0, onClick: () => {
917
- var _a;
918
- if (onLocationClick) {
919
- onLocationClick({
920
- name: t('booking.searchBar.allLocations'),
921
- id: ID_OPTION_ALL_LOCATION,
922
- slug: (_a = LOCALIZED_SLUGS[locale]) === null || _a === void 0 ? void 0 : _a.ALL,
923
- });
924
- }
925
- } },
926
- React__default.createElement(StyledPinIcon, { color: theme.colors.neutral400 }),
927
- React__default.createElement(Text, { size: "md" }, t('booking.searchBar.allLocations'))),
928
- state.cities.map((city) => (React__default.createElement(StyledLocationItem, { key: city.id, onClick: (evt) => {
929
- evt.nativeEvent.stopImmediatePropagation();
930
- if (onLocationClick) {
931
- onLocationClick(city);
932
- }
933
- }, role: "button", tabIndex: 0, "aria-label": `Select ${city.name} as location`, isSelected: (selectedLocation === null || selectedLocation === void 0 ? void 0 : selectedLocation.id) === city.id },
934
- React__default.createElement(StyledPinIcon, { color: theme.colors.neutral400 }),
935
- React__default.createElement(Text, { size: "md" }, city.name)))))))));
1065
+ React__default.createElement(Select, Object.assign({ key: defaultValue !== null && defaultValue !== void 0 ? defaultValue : 'no-selected-location', defaultValue: defaultValue, placeholder: t('booking.searchBar.allLocations'), searchable: true, onSearchChange: (value) => {
1066
+ handleSearchLocationInputChange(value);
1067
+ }, onFocus: () => {
1068
+ dispatch({ type: ActionTypes.DisplayInitialCities });
1069
+ }, onDropdownClose: () => {
1070
+ debouncedFetchCitiesByKeyword.cancel();
1071
+ dispatch({ type: ActionTypes.DisplayInitialCities });
1072
+ }, nothingFound: t('common.noResult'), maxDropdownHeight: 340, dropdownPosition: "bottom", data: citiesData.map((city) => ({
1073
+ value: String(city.id),
1074
+ label: city.name,
1075
+ city,
1076
+ })), rightSection: React__default.createElement(React__default.Fragment, null) }, gaAttributes, { styles: (theme) => ({
1077
+ item: {
1078
+ padding: 0,
1079
+ '&[data-selected]': {
1080
+ '&, &:hover': {
1081
+ backgroundColor: 'transparent',
1082
+ color: 'inherit',
1083
+ },
1084
+ '.location-item': {
1085
+ '&::after': {
1086
+ content: checkMarkIconUrl,
1087
+ top: '50%',
1088
+ right: 19,
1089
+ position: 'absolute',
1090
+ transform: 'translateY(-50%)',
1091
+ },
1092
+ },
1093
+ },
1094
+ '&[data-hovered]': {
1095
+ backgroundColor: 'transparent',
1096
+ },
1097
+ },
1098
+ input: {
1099
+ '&:not(.mantine-Textarea-input)': {
1100
+ height: 48,
1101
+ fontSize: rem(16),
1102
+ paddingLeft: 16,
1103
+ paddingRight: 16,
1104
+ [theme.fn.smallerThan('sm')]: {
1105
+ height: 40,
1106
+ fontSize: rem(14),
1107
+ paddingLeft: 14,
1108
+ paddingRight: 14,
1109
+ },
1110
+ },
1111
+ },
1112
+ itemsWrapper: {
1113
+ padding: 0,
1114
+ },
1115
+ dropdown: {
1116
+ left: '0 !important',
1117
+ border: 0,
1118
+ marginTop: -7,
1119
+ borderRadius: 0,
1120
+ '& ::-webkit-scrollbar': {
1121
+ width: '6px',
1122
+ height: '6px',
1123
+ },
1124
+ },
1125
+ }), itemComponent: CustomSelectItem,
1126
+ // 3. Logic quan trọng nhất: Luôn trả về true để bỏ qua bộ lọc mặc định của Mantine
1127
+ // Vì chúng ta fetch data từ API hoặc dùng toàn bộ list ban đầu
1128
+ filter: () => true, onChange: (value) => {
1129
+ if (value == null)
1130
+ return;
1131
+ const city = citiesData.find((i) => String(i.id) === value);
1132
+ if (!city)
1133
+ return;
1134
+ onLocationClick(city);
1135
+ debouncedFetchCitiesByKeyword.cancel();
1136
+ dispatch({ type: ActionTypes.DisplayInitialCities });
1137
+ setTimeout(() => {
1138
+ var _a, _b;
1139
+ (_b = (_a = inputLocationWrapperRef.current) === null || _a === void 0 ? void 0 : _a.querySelector('input')) === null || _b === void 0 ? void 0 : _b.blur();
1140
+ }, 0);
1141
+ } }))));
936
1142
  };
937
1143
 
1144
+ const DoctorIcon = () => (React__default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
1145
+ React__default.createElement("path", { d: "M8.983 14.333q-1.666 0-2.833-1.166Q4.983 12 4.983 10.333v-.366a3.48 3.48 0 0 1-2.258-1.2 3.57 3.57 0 0 1-.909-2.434V3.1a.58.58 0 0 1 .175-.425.58.58 0 0 1 .425-.175h1.4v-.167a.486.486 0 0 1 .5-.5q.217 0 .36.142a.5.5 0 0 1 .14.358v1.334a.485.485 0 0 1-.5.5.484.484 0 0 1-.5-.5V3.5h-1v2.833q0 1.1.784 1.884Q4.383 9 5.483 9t1.883-.783.784-1.884V3.5h-1v.167a.485.485 0 0 1-.5.5.484.484 0 0 1-.5-.5V2.333a.486.486 0 0 1 .5-.5q.217 0 .358.142a.5.5 0 0 1 .142.358V2.5h1.4a.58.58 0 0 1 .425.175.58.58 0 0 1 .175.425v3.233q0 1.4-.908 2.434a3.5 3.5 0 0 1-2.259 1.2v.366q0 1.25.875 2.126a2.9 2.9 0 0 0 2.125.874q1.25 0 2.125-.874a2.9 2.9 0 0 0 .875-2.126V9.25a1.74 1.74 0 0 1-.858-.609 1.6 1.6 0 0 1-.342-1.008q0-.716.5-1.216t1.2-.5q.716 0 1.217.5.5.5.5 1.216 0 .567-.342 1.008t-.875.609v1.083q0 1.667-1.167 2.834-1.166 1.166-2.833 1.166m3.5-6q.3 0 .509-.208a.67.67 0 0 0 .208-.492q0-.3-.208-.508a.7.7 0 0 0-.509-.208q-.3 0-.5.208a.7.7 0 0 0-.2.508q0 .284.2.492t.5.208", fill: "#595959" })));
1146
+ const ServiceIcon = () => (React__default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
1147
+ React__default.createElement("path", { d: "M6.868 9.265v.974q0 .405.284.69.284.283.69.283t.69-.284.284-.69v-.973h.973q.405 0 .69-.284a.94.94 0 0 0 .284-.689.94.94 0 0 0-.284-.69.94.94 0 0 0-.69-.284h-.973v-.974a.94.94 0 0 0-.284-.69.94.94 0 0 0-.69-.284.94.94 0 0 0-.689.284.94.94 0 0 0-.285.69v.974h-.973a.94.94 0 0 0-.69.283.94.94 0 0 0-.284.69q0 .405.284.69.285.284.69.284zm-3.46 4.868q-.581 0-.994-.413A1.36 1.36 0 0 1 2 12.725v-6.65a1.4 1.4 0 0 1 .563-1.127l4.434-3.333q.369-.282.844-.282.474 0 .846.282l4.434 3.333q.264.193.413.493.15.3.15.633v6.651q0 .58-.414.995a1.36 1.36 0 0 1-.994.413zm0-1.168h8.868q.105 0 .172-.068a.23.23 0 0 0 .068-.172v-6.65a.2.2 0 0 0-.027-.11.3.3 0 0 0-.07-.085L7.983 2.554a.2.2 0 0 0-.142-.052.2.2 0 0 0-.142.052L3.266 5.88a.3.3 0 0 0-.071.086.2.2 0 0 0-.027.108v6.651q0 .105.068.172a.23.23 0 0 0 .172.068", fill: "#595959" })));
1148
+ const HospitalIcon = () => (React__default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
1149
+ React__default.createElement("path", { d: "M8 8q.55 0 .941-.392.393-.391.392-.941 0-.55-.392-.942A1.28 1.28 0 0 0 8 5.333q-.55 0-.942.392a1.28 1.28 0 0 0-.391.942q0 .55.391.941Q7.45 8 8 8m0 4.9q2.032-1.866 3.017-3.392Q12 7.983 12 6.8q0-1.817-1.158-2.975Q9.682 2.667 8 2.667T5.158 3.825Q4 4.983 4 6.8q0 1.184.983 2.708Q5.966 11.034 8 12.9m0 1.517a.8.8 0 0 1-.5-.183q-2.433-2.151-3.633-3.992T2.667 6.8q0-2.5 1.608-3.983Q5.883 1.332 8 1.333q2.116 0 3.725 1.484T13.333 6.8q0 1.6-1.2 3.442-1.2 1.841-3.633 3.991a.8.8 0 0 1-.5.184", fill: "#8C8C8C" })));
1150
+ const SpecialtyIcon = () => (React__default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16" },
1151
+ React__default.createElement("path", { d: "M3.833.5a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667M10.5.5c-.92 0-1.667.746-1.667 1.667V5.5c0 .92.746 1.667 1.667 1.667h3.333c.921 0 1.667-.746 1.667-1.667V2.167C15.5 1.246 14.754.5 13.833.5zM3.833 8.833a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667m8.334 0a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667", fill: "#9AA2AC" })));
1152
+
938
1153
  const StyleSpecialtiesWrapper = styled.div `
939
1154
  display: flex;
940
1155
  flex-wrap: wrap;
@@ -1308,16 +1523,20 @@ function useSearchBarApi({ dispatch, careApiDomain, locale = 'vi-VN', client = '
1308
1523
  moreParams.noPaging = 1;
1309
1524
  }
1310
1525
  const requests = [
1311
- fetchCitiesApi(PATHS.GET_CITY_BY_IP, Object.assign(Object.assign(Object.assign({}, params), moreParams), { client: CLIENT_KEY.MSD === client ? '' : client })),
1526
+ fetchCitiesApi(PATHS.GET_CITY_BY_IP, Object.assign(Object.assign(Object.assign({}, params), moreParams), { hospitalActive: 1, client: CLIENT_KEY.MSD === client ? '' : client })),
1312
1527
  ];
1313
1528
  if (locale === 'zh-TW') {
1314
1529
  requests.push(fetchCitiesApi(PATHS.GET_CITIES_LIST, {
1315
1530
  noPaging: 1,
1531
+ hospitalActive: 1,
1316
1532
  client: CLIENT_KEY.MSD === client ? '' : client,
1317
1533
  }));
1318
1534
  }
1319
1535
  else {
1320
- requests.push(fetchCitiesApi(PATHS.GET_CITIES_LIST));
1536
+ requests.push(fetchCitiesApi(PATHS.GET_CITIES_LIST, {
1537
+ noPaging: 1,
1538
+ hospitalActive: 1,
1539
+ }));
1321
1540
  }
1322
1541
  return Promise.all(requests)
1323
1542
  .then(([data1, data2]) => {
@@ -1497,11 +1716,14 @@ gaTrackingSearchBar, gaTrackingLocationSearch, autoCompleteDisabled = false, inp
1497
1716
  // isOptionAllLocation = false,
1498
1717
  // hideResults = [],
1499
1718
  // isNavResultItem = true,
1500
- routerPush, onGeoLocationPermissionChange,
1719
+ triggerSearchWhenChangeFilter, routerPush, onGeoLocationPermissionChange,
1501
1720
  // onSearch,
1502
1721
  onChangeLocation, }) => {
1722
+ var _a;
1503
1723
  const { locale, t } = useTranslations();
1504
1724
  const wrapperRef = useRef(null);
1725
+ const searchInputDesktopRef = useRef(null);
1726
+ const searchInputMobileRef = useRef(null);
1505
1727
  const inputSearchSpecialtyWrapperRef = useRef(null);
1506
1728
  const [currentTab, setCurrentTab] = useState(initTypeSearch);
1507
1729
  const { geoLocationPermission: geoLocationPermissionFromHook, geoLocationCoordinates: geoLocationCoordinatesFromHook, } = useGeolocation();
@@ -1516,7 +1738,9 @@ onChangeLocation, }) => {
1516
1738
  const { navigateTo, focusedSpecialty,
1517
1739
  // isLoadingCities,
1518
1740
  // cities,
1519
- searchKeywords, geoLocationPermission, selectedLocation, selectedSpecialty, initialSelectedCity,
1741
+ searchKeywords, geoLocationPermission, selectedLocation,
1742
+ // selectedSpecialty,
1743
+ initialSelectedCity,
1520
1744
  // defaultCity,
1521
1745
  searchResults, isLoadingSearchResults,
1522
1746
  // isMobileModalOpened,
@@ -1530,6 +1754,7 @@ onChangeLocation, }) => {
1530
1754
  client: clientSlug,
1531
1755
  });
1532
1756
  const slugs = useMemo(() => LOCALIZED_SLUGS[locale], [locale]);
1757
+ const [opened, { close, open }] = useDisclosure(false);
1533
1758
  const typeInformation = useMemo(() => {
1534
1759
  return Object.assign({ doctor: {
1535
1760
  name: t('booking.searchPopup.doctors'),
@@ -1553,34 +1778,31 @@ onChangeLocation, }) => {
1553
1778
  }, [currentTab]);
1554
1779
  const debouncedFetchCitiesByKeyword = useMemo(() => debounce(fetchCitiesByKeyword, 400), [fetchCitiesByKeyword]);
1555
1780
  const debouncedFetchSearchResults = useMemo(() => debounce(fetchSearchResults, 400), [fetchSearchResults]);
1556
- const handleLocationClick = useCallback(function handleLocationClick(city) {
1557
- dispatch({ type: ActionTypes.SelectLocation, payload: city });
1558
- focusSearchInput();
1559
- if (onChangeLocation) {
1560
- onChangeLocation(city);
1561
- }
1562
- }, [t, dispatch]);
1563
- function focusSearchInput() {
1781
+ // function focusSearchInput() {
1782
+ // if (wrapperRef.current) {
1783
+ // wrapperRef.current
1784
+ // .querySelector<HTMLInputElement>('input[name="search-results"]')
1785
+ // ?.focus()
1786
+ // }
1787
+ // }
1788
+ const onClickSearchByKeyword = useCallback(function onClickSearchByKeyword({ locationSlug, specialtyId, } = {}) {
1564
1789
  var _a;
1565
- if (wrapperRef.current) {
1566
- (_a = wrapperRef.current
1567
- .querySelector('input[name="search-results"]')) === null || _a === void 0 ? void 0 : _a.focus();
1568
- }
1569
- }
1570
- function onClickSearchByKeyword() {
1790
+ close();
1571
1791
  let url = '';
1572
1792
  const { slug: typeSlug } = typeInformation[currentTab];
1573
1793
  let moreParams = '';
1574
1794
  const slugClientUrl = MAPPING_CLIENT_WITH_SLUG[locale][clientSlug];
1795
+ const selectedSpecialtyId = specialtyId || ((_a = state.selectedSpecialty) === null || _a === void 0 ? void 0 : _a.id) || -1;
1796
+ const selectedLocationSlug = locationSlug || (selectedLocation === null || selectedLocation === void 0 ? void 0 : selectedLocation.slug) || '';
1575
1797
  if ((currentTab === 'doctor' || currentTab === 'hospital') &&
1576
- state.selectedSpecialty.id > 0) {
1577
- moreParams = `&specialtyId=${state.selectedSpecialty.id}`;
1798
+ selectedSpecialtyId > 0) {
1799
+ moreParams = `&specialtyId=${selectedSpecialtyId}`;
1578
1800
  }
1579
1801
  if (currentTab === 'specialty') {
1580
1802
  url = `/${typeSlug}`;
1581
1803
  }
1582
1804
  else {
1583
- url = `/${selectedLocation.slug}/${typeSlug}`;
1805
+ url = `/${selectedLocationSlug}/${typeSlug}`;
1584
1806
  }
1585
1807
  if (slugClientUrl) {
1586
1808
  url += `/${slugClientUrl}`;
@@ -1589,9 +1811,34 @@ onChangeLocation, }) => {
1589
1811
  if (url) {
1590
1812
  dispatch({ type: ActionTypes.NavigateTo, payload: url });
1591
1813
  }
1592
- }
1814
+ }, [
1815
+ clientSlug,
1816
+ close,
1817
+ currentTab,
1818
+ dispatch,
1819
+ locale,
1820
+ searchKeywords,
1821
+ selectedLocation === null || selectedLocation === void 0 ? void 0 : selectedLocation.slug,
1822
+ (_a = state.selectedSpecialty) === null || _a === void 0 ? void 0 : _a.id,
1823
+ typeInformation,
1824
+ ]);
1825
+ const handleLocationClick = useCallback(function handleLocationClick(city) {
1826
+ triggerSearchWhenChangeFilter &&
1827
+ onClickSearchByKeyword({ locationSlug: city.slug });
1828
+ dispatch({ type: ActionTypes.SelectLocation, payload: city });
1829
+ if (onChangeLocation) {
1830
+ onChangeLocation(city);
1831
+ }
1832
+ }, [
1833
+ dispatch,
1834
+ isMobile,
1835
+ onChangeLocation,
1836
+ onClickSearchByKeyword,
1837
+ triggerSearchWhenChangeFilter,
1838
+ ]);
1593
1839
  useOutsideClick(inputSearchSpecialtyWrapperRef, () => {
1594
- dispatch({ type: ActionTypes.ClickOutsideInputSearchSpecialty });
1840
+ !isMobile &&
1841
+ dispatch({ type: ActionTypes.ClickOutsideInputSearchSpecialty });
1595
1842
  });
1596
1843
  useEffect(() => {
1597
1844
  var _a;
@@ -1614,6 +1861,7 @@ onChangeLocation, }) => {
1614
1861
  fetchCitiesByLocation({ coordinates: state.geoLocationCoordinates });
1615
1862
  }, [geoLocationPermission]);
1616
1863
  useEffect(() => {
1864
+ var _a;
1617
1865
  const defaultSpecialty = initSpecialty
1618
1866
  ? initSpecialty
1619
1867
  : {
@@ -1623,13 +1871,23 @@ onChangeLocation, }) => {
1623
1871
  total_doctor: 0,
1624
1872
  slug: slugs.SPECIALTIES,
1625
1873
  };
1626
- if (!state.selectedSpecialty) {
1874
+ if (initSpecialty) {
1875
+ if (((_a = state.selectedSpecialty) === null || _a === void 0 ? void 0 : _a.id) !== initSpecialty.id) {
1876
+ dispatch({
1877
+ type: ActionTypes.SelectSpecialty,
1878
+ payload: initSpecialty,
1879
+ });
1880
+ }
1881
+ return;
1882
+ }
1883
+ if (!state.selectedSpecialty ||
1884
+ state.selectedSpecialty.id !== defaultSpecialty.id) {
1627
1885
  dispatch({
1628
1886
  type: ActionTypes.SelectSpecialty,
1629
1887
  payload: defaultSpecialty,
1630
1888
  });
1631
1889
  }
1632
- }, [initSpecialty, state.selectedSpecialty]);
1890
+ }, [initSpecialty, slugs.SPECIALTIES, t]);
1633
1891
  useEffect(() => {
1634
1892
  fetchAllSpecialties();
1635
1893
  }, []);
@@ -1648,25 +1906,62 @@ onChangeLocation, }) => {
1648
1906
  }, [navigateTo]);
1649
1907
  useEffect(() => {
1650
1908
  fetchSearchResults(state.searchKeywords, state, currentTab, clientSlug, true);
1651
- }, [selectedLocation, selectedSpecialty, currentTab]);
1652
- return (React__default.createElement(StyledSearchBarWrapper, { ref: wrapperRef },
1653
- React__default.createElement(TabSearch, { currentTab: currentTab, setCurrentTab: setCurrentTab, isMobile: isMobile, hideTabBookingSearch: hideTabBookingSearch, hideSpecialtyTab: hideSpecialtyTab }),
1654
- React__default.createElement(StyleWrapperContainer, { className: "booking-search-container" },
1655
- React__default.createElement(StyleSearchInputContainer, null,
1656
- React__default.createElement(StyleSearchContent, { className: "booking-search-content" },
1657
- React__default.createElement("div", { ref: inputSearchSpecialtyWrapperRef },
1658
- React__default.createElement(Flex, { gap: "12px", justify: "space-between", align: "center", direction: isMobile ? 'column' : 'row', className: "flex-search-input" },
1659
- currentTab !== 'specialty' && (React__default.createElement(SearchLocation, { state: state, isMobile: isMobile, dispatch: dispatch, debouncedFetchCitiesByKeyword: debouncedFetchCitiesByKeyword, selectedLocation: selectedLocation, onLocationClick: handleLocationClick, trackingAttributes: gaTrackingLocationSearch })),
1660
- React__default.createElement(SearchInputs, { type: currentTab, isMobile: isMobile, state: state, dispatch: dispatch, debouncedFetchSearchResults: debouncedFetchSearchResults, initalSearchValue: initialSearchValue, focusSearchInput: focusSearchInput, onEnterSearch: onClickSearchByKeyword, typeInformation: typeInformation, trackingAttributes: gaTrackingSearchBar, isLoading: isLoadingSearchResults, hideSpecialtySelection: hideSpecialtySelection || hideSpecialtyTab, clientSlug: clientSlug }),
1661
- React__default.createElement(Button, { size: isMobile ? 'md' : 'lg', color: "#2D87F3", fullWidth: isMobile, variant: "filled", onClick: onClickSearchByKeyword, styles: {
1662
- root: {
1663
- height: isMobile ? '40px' : '48px',
1664
- },
1665
- } }, t('booking.searchBar.searchButton'))),
1666
- !hidePopularSearchKeys &&
1667
- currentTab !== 'specialty' &&
1668
- state.popularKeys.length > 0 && (React__default.createElement(SearchTag, { type: currentTab, state: state, typeInformation: typeInformation, dispatch: dispatch })),
1669
- currentTab === 'specialty' && focusedSpecialty === 'search' && (React__default.createElement(SearchResultSpecialties, { state: state, isMobile: isMobile, dispatch: dispatch, specialties: (searchResults === null || searchResults === void 0 ? void 0 : searchResults.specialty) || [], isLoading: isLoadingSearchResults }))))))));
1909
+ }, [currentTab]);
1910
+ useEffect(() => {
1911
+ if (opened && isMobile) {
1912
+ const timer = setTimeout(() => {
1913
+ var _a;
1914
+ (_a = searchInputMobileRef.current) === null || _a === void 0 ? void 0 : _a.focus();
1915
+ }, 150);
1916
+ return () => clearTimeout(timer);
1917
+ }
1918
+ }, [opened, isMobile]);
1919
+ const searchInputsProps = {
1920
+ type: currentTab,
1921
+ isMobile: isMobile,
1922
+ state: state,
1923
+ dispatch: dispatch,
1924
+ debouncedFetchSearchResults: debouncedFetchSearchResults,
1925
+ initalSearchValue: initialSearchValue,
1926
+ // focusSearchInput: focusSearchInput,
1927
+ onEnterSearch: onClickSearchByKeyword,
1928
+ typeInformation: typeInformation,
1929
+ trackingAttributes: gaTrackingSearchBar,
1930
+ isLoading: isLoadingSearchResults,
1931
+ hideSpecialtySelection: hideSpecialtySelection || hideSpecialtyTab,
1932
+ clientSlug: clientSlug,
1933
+ triggerSearchWhenChangeFilter,
1934
+ onChangeSpecialty: (specialty) => triggerSearchWhenChangeFilter &&
1935
+ onClickSearchByKeyword({ specialtyId: specialty.id }),
1936
+ };
1937
+ return (React__default.createElement(React__default.Fragment, null,
1938
+ React__default.createElement(StyledSearchBarWrapper, { ref: wrapperRef },
1939
+ React__default.createElement(TabSearch, { currentTab: currentTab, setCurrentTab: setCurrentTab, isMobile: isMobile, hideTabBookingSearch: hideTabBookingSearch, hideSpecialtyTab: hideSpecialtyTab }),
1940
+ React__default.createElement(StyleWrapperContainer, { className: "booking-search-container" },
1941
+ React__default.createElement(StyleSearchInputContainer, null,
1942
+ React__default.createElement(StyleSearchContent, { className: "booking-search-content" },
1943
+ React__default.createElement("div", { ref: inputSearchSpecialtyWrapperRef },
1944
+ React__default.createElement(Flex, { gap: "12px", justify: "space-between", align: "center", direction: isMobile ? 'column' : 'row', className: "flex-search-input" },
1945
+ currentTab !== 'specialty' && (React__default.createElement(SearchLocation, { state: state, isMobile: isMobile, dispatch: dispatch, debouncedFetchCitiesByKeyword: debouncedFetchCitiesByKeyword, selectedLocation: selectedLocation, onLocationClick: handleLocationClick, trackingAttributes: gaTrackingLocationSearch })),
1946
+ React__default.createElement(SearchInputs, Object.assign({}, searchInputsProps, { ref: searchInputDesktopRef, onFocusInput: () => isMobile && open() })),
1947
+ React__default.createElement(Button, { size: isMobile ? 'md' : 'lg', fullWidth: isMobile, variant: "primary", onClick: () => onClickSearchByKeyword(), styles: {
1948
+ root: {
1949
+ height: isMobile ? '40px' : '48px',
1950
+ },
1951
+ } }, t('booking.searchBar.searchButton'))),
1952
+ !hidePopularSearchKeys &&
1953
+ currentTab !== 'specialty' &&
1954
+ state.popularKeys.length > 0 && (React__default.createElement(SearchTag, { type: currentTab, state: state, typeInformation: typeInformation, dispatch: dispatch })),
1955
+ currentTab === 'specialty' &&
1956
+ focusedSpecialty === 'search' && (React__default.createElement(SearchResultSpecialties, { state: state, isMobile: isMobile, dispatch: dispatch, specialties: (searchResults === null || searchResults === void 0 ? void 0 : searchResults.specialty) || [], isLoading: isLoadingSearchResults }))))))),
1957
+ isMobile && (React__default.createElement(ModalSearchResult, { keepMounted: true, opened: opened, onClose: close, closeModal: close, searchInputEle: React__default.createElement(Flex, { align: 'center', gap: 8 },
1958
+ React__default.createElement(SearchInputs, Object.assign({}, searchInputsProps, { onlyShowSearchBox: true, ref: searchInputMobileRef })),
1959
+ React__default.createElement(Button, { variant: "primary", leftIcon: React__default.createElement(Search, { size: 20, color: '#fff' }), onClick: () => onClickSearchByKeyword() })) },
1960
+ React__default.createElement(Box, { sx: {
1961
+ marginLeft: -16,
1962
+ marginRight: -16,
1963
+ } },
1964
+ React__default.createElement(SearchResultContent, { type: currentTab, state: state, dispatch: dispatch, isLoading: isLoadingSearchResults, typeInformation: typeInformation, clientSlug: clientSlug }))))));
1670
1965
  };
1671
1966
 
1672
1967
  export { BookingSearchBarV2 };