@hhgtech/hhg-components 1.27.2 → 1.27.4

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 (268) hide show
  1. package/build/babyGrowth.js +2 -2
  2. package/build/cache.js +1 -1
  3. package/build/care.js +1 -1
  4. package/build/components.js +1 -1
  5. package/build/constants.js +1 -1
  6. package/build/{core-d77aa5ba.js → core-1514f893.js} +1 -1
  7. package/build/{dataTransform-f3686487.js → dataTransform-071b0571.js} +1 -1
  8. package/build/ecom.js +1 -1
  9. package/build/esm/babyGrowth.js +2 -2
  10. package/build/esm/cache.js +1 -1
  11. package/build/esm/care.js +1 -1
  12. package/build/esm/components.js +1 -1
  13. package/build/esm/constants.js +1 -1
  14. package/build/esm/{core-29134dfb.js → core-ee62bba7.js} +1 -1
  15. package/build/esm/{dataTransform-7967d74c.js → dataTransform-bfe7c7ad.js} +1 -1
  16. package/build/esm/ecom.js +1 -1
  17. package/build/esm/{fixedBottomAdBlock-9c0a092f.js → fixedBottomAdBlock-089a4381.js} +1 -1
  18. package/build/esm/footer.js +1 -1
  19. package/build/esm/gAssets.js +1 -1
  20. package/build/esm/{getDynamicHealthTool-dbfb4dfe.js → getDynamicHealthTool-d8b0606e.js} +1 -1
  21. package/build/esm/{getSocialList-269eadf2.js → getSocialList-35505d5b.js} +1 -1
  22. package/build/esm/hooks.js +1 -1
  23. package/build/esm/i18n.js +1 -1
  24. package/build/esm/{index-22a5e66f.js → index-01378d83.js} +1 -1
  25. package/build/esm/{index-b72031bf.js → index-2865ff15.js} +1 -1
  26. package/build/esm/{index-f2cd7b8d.js → index-371a6c97.js} +1 -1
  27. package/build/esm/{index-a5f223f1.js → index-48bd7a2e.js} +1 -1
  28. package/build/esm/{index-46a8e50c.js → index-5b88bee8.js} +2 -2
  29. package/build/esm/{index-ed166d83.js → index-64c133ea.js} +1 -1
  30. package/build/esm/{index-63547109.js → index-66372340.js} +1 -1
  31. package/build/esm/{index-7404bef8.js → index-82b7be4e.js} +1 -1
  32. package/build/esm/{index-2ffccc47.js → index-85359a73.js} +1 -1
  33. package/build/esm/{index-264d643f.js → index-99f5c924.js} +1 -1
  34. package/build/esm/{index-558b8bdc.js → index-adce5b3b.js} +1 -1
  35. package/build/esm/index-ae9b5a73.js +1 -0
  36. package/build/esm/{index-d7dd0b6f.js → index-b9faf543.js} +1 -1
  37. package/build/esm/{index-f439bd78.js → index-bb948874.js} +1 -1
  38. package/build/esm/{index-83db08df.js → index-c24f700d.js} +1 -1
  39. package/build/esm/index-c83b26e4.js +1 -0
  40. package/build/esm/index-cde4332f.js +1 -0
  41. package/build/esm/{index-423ac2aa.js → index-d3c56d13.js} +1 -1
  42. package/build/esm/{index-28794dee.js → index-d995a60a.js} +1 -1
  43. package/build/esm/{index-e8d2cf42.js → index-e0d73f30.js} +1 -1
  44. package/build/esm/{index-747cdb54.js → index-e72602d7.js} +1 -1
  45. package/build/esm/{index-d7124a4a.js → index-e916f088.js} +1 -1
  46. package/build/esm/{index-38159d5e.js → index-ff888c37.js} +1 -1
  47. package/build/esm/index.js +1 -1
  48. package/build/esm/{index.styled-9697f06f.js → index.styled-3e9712d3.js} +5 -5
  49. package/build/esm/{index.styled-e68b6cbf.js → index.styled-50c0ded2.js} +1 -1
  50. package/build/esm/{index.styled-e8c35976.js → index.styled-7851936e.js} +1 -1
  51. package/build/esm/{index.styled-499dabe7.js → index.styled-a0e2a968.js} +3 -3
  52. package/build/esm/{index.styles-78397fce.js → index.styles-d77627b4.js} +1 -1
  53. package/build/esm/lead.js +1 -1
  54. package/build/esm/mantine.js +1 -1
  55. package/build/esm/misc.js +1 -1
  56. package/build/esm/navigation.js +1 -1
  57. package/build/esm/onboarding.js +1 -1
  58. package/build/esm/onboardingV2.js +1 -1
  59. package/build/esm/pwg.js +2 -2
  60. package/build/esm/{routing-38368a1a.js → routing-fce6b29a.js} +1 -1
  61. package/build/esm/{screenSizeContext-1656f461.js → screenSizeContext-4d85b8eb.js} +3 -3
  62. package/build/esm/together.js +1 -1
  63. package/build/esm/{translationsProvider-6178201d.js → translationsProvider-17b8d820.js} +1 -1
  64. package/build/esm/{types-f7f3af1a.js → types-36fcefc2.js} +38 -38
  65. package/build/esm/{types-c822b8b0.js → types-c097346e.js} +1 -1
  66. package/build/esm/types.js +1 -1
  67. package/build/esm/{useHealthToolCache-c8421672.js → useHealthToolCache-8c9b8331.js} +1 -1
  68. package/build/esm/{useRafState-c99bd7c4.js → useRafState-a5865c60.js} +1 -1
  69. package/build/esm/{useTranslations-7bfb0943.js → useTranslations-8bbe64a3.js} +1 -1
  70. package/build/esm/{utils-bca8306f.js → utils-4ff88b73.js} +3 -3
  71. package/build/esm/vaccination.js +4 -4
  72. package/build/{fixedBottomAdBlock-65916029.js → fixedBottomAdBlock-32c755c8.js} +1 -1
  73. package/build/footer.js +1 -1
  74. package/build/gAssets.js +1 -1
  75. package/build/{getDynamicHealthTool-b08b42c7.js → getDynamicHealthTool-e3a5fa07.js} +1 -1
  76. package/build/{getSocialList-0d097c5d.js → getSocialList-86e3aec7.js} +1 -1
  77. package/build/hooks.js +1 -1
  78. package/build/i18n.js +1 -1
  79. package/build/{index-74c75c98.js → index-04a4f9a2.js} +1 -1
  80. package/build/{index-2ba66b59.js → index-09912dc5.js} +1 -1
  81. package/build/index-0c291163.js +1 -0
  82. package/build/{index-59f36063.js → index-1fcad6a2.js} +1 -1
  83. package/build/{index-97ca0dbc.js → index-353ce5a9.js} +1 -1
  84. package/build/{index-d5ab46ab.js → index-3c30b48f.js} +1 -1
  85. package/build/{index-1fcfee84.js → index-42c8cf00.js} +6 -6
  86. package/build/{index-ca836e0a.js → index-6b570bc4.js} +1 -1
  87. package/build/{index-a3bde7c2.js → index-7b2da16b.js} +1 -1
  88. package/build/{index-256bf22f.js → index-81f3d150.js} +1 -1
  89. package/build/{index-87dd9313.js → index-8339734f.js} +1 -1
  90. package/build/{index-4c89bef7.js → index-8cfaca26.js} +1 -1
  91. package/build/{index-92aaadfc.js → index-8d78fed9.js} +1 -1
  92. package/build/{index-1f937608.js → index-92fde09c.js} +1 -1
  93. package/build/{index-45e23091.js → index-b6bea224.js} +1 -1
  94. package/build/{index-7b387e60.js → index-b6e36676.js} +1 -1
  95. package/build/{index-659bf3c7.js → index-bca85720.js} +1 -1
  96. package/build/{index-6ae82707.js → index-bf1f3f0f.js} +1 -1
  97. package/build/{index-a85233d1.js → index-bf5150a9.js} +1 -1
  98. package/build/index-c9906206.js +1 -0
  99. package/build/{index-4321cf6b.js → index-cefa7c6e.js} +1 -1
  100. package/build/{index-ef731f98.js → index-e24b7b39.js} +1 -1
  101. package/build/{index-a6b81ed3.js → index-f237998a.js} +1 -1
  102. package/build/index.js +1 -1
  103. package/build/{index.styled-962f8f10.js → index.styled-7c2fc0e1.js} +1 -1
  104. package/build/index.styled-ca257fb9.js +50 -0
  105. package/build/{index.styled-05f97434.js → index.styled-dc251144.js} +3 -3
  106. package/build/{index.styled-afe5ad9e.js → index.styled-e1e238a6.js} +1 -1
  107. package/build/{index.styles-fe252ee0.js → index.styles-f72e2607.js} +1 -1
  108. package/build/lead.js +1 -1
  109. package/build/mantine.js +1 -1
  110. package/build/misc.js +1 -1
  111. package/build/navigation.js +1 -1
  112. package/build/onboarding.js +1 -1
  113. package/build/onboardingV2.js +1 -1
  114. package/build/pwg.js +1 -1
  115. package/build/{routing-f2eac711.js → routing-b1e6b269.js} +1 -1
  116. package/build/{screenSizeContext-f7e0bfbd.js → screenSizeContext-ca65259e.js} +3 -3
  117. package/build/together.js +1 -1
  118. package/build/{translationsProvider-e08bd756.js → translationsProvider-1c4db6b3.js} +1 -1
  119. package/build/{types-26b303be.js → types-d7f30e5e.js} +4 -4
  120. package/build/{types-9f112463.js → types-eeab73c9.js} +1 -1
  121. package/build/types.js +1 -1
  122. package/build/useHealthToolCache-fe3bcc79.js +1 -0
  123. package/build/{useRafState-df8dccc5.js → useRafState-f16c6a01.js} +1 -1
  124. package/build/{useTranslations-ba3b3bff.js → useTranslations-ace1daae.js} +1 -1
  125. package/build/{utils-be83d100.js → utils-977ab134.js} +2 -2
  126. package/build/vaccination.js +1 -1
  127. package/package.json +1 -1
  128. package/build/esm/index-326b756e.js +0 -1
  129. package/build/esm/index-7c952ea5.js +0 -1
  130. package/build/esm/index-a30560eb.js +0 -1
  131. package/build/index-04d6bc49.js +0 -1
  132. package/build/index-49240e71.js +0 -1
  133. package/build/index.styled-7ad827c4.js +0 -50
  134. package/build/useHealthToolCache-cce3f74a.js +0 -1
  135. /package/build/{BMI_BOYS.percentile.monthly-4dd9d119.js → BMI_BOYS.percentile.monthly-48d7c533.js} +0 -0
  136. /package/build/{BMI_BOYS.percentile.weekly-dac77646.js → BMI_BOYS.percentile.weekly-ca42ff56.js} +0 -0
  137. /package/build/{BMI_BOYS.percentile.yearly-68dc851e.js → BMI_BOYS.percentile.yearly-7620623a.js} +0 -0
  138. /package/build/{BMI_BOYS.zscore.monthly-31b75009.js → BMI_BOYS.zscore.monthly-0bbb70fd.js} +0 -0
  139. /package/build/{BMI_BOYS.zscore.weekly-fcecee30.js → BMI_BOYS.zscore.weekly-807b759a.js} +0 -0
  140. /package/build/{BMI_BOYS.zscore.yearly-01ec1bfe.js → BMI_BOYS.zscore.yearly-dab556e4.js} +0 -0
  141. /package/build/{BMI_GIRLS.percentile.monthly-a0f0ca56.js → BMI_GIRLS.percentile.monthly-e0c687fe.js} +0 -0
  142. /package/build/{BMI_GIRLS.percentile.weekly-814e3a12.js → BMI_GIRLS.percentile.weekly-939317c9.js} +0 -0
  143. /package/build/{BMI_GIRLS.percentile.yearly-cfc940e4.js → BMI_GIRLS.percentile.yearly-b4473ca4.js} +0 -0
  144. /package/build/{BMI_GIRLS.zscore.monthly-812a6297.js → BMI_GIRLS.zscore.monthly-e5655963.js} +0 -0
  145. /package/build/{BMI_GIRLS.zscore.weekly-f615a469.js → BMI_GIRLS.zscore.weekly-db854c58.js} +0 -0
  146. /package/build/{BMI_GIRLS.zscore.yearly-74254303.js → BMI_GIRLS.zscore.yearly-b8be83c0.js} +0 -0
  147. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-1b63012e.js → HEAD CIRCUM_BOYS.percentile.monthly-4f1463c0.js} +0 -0
  148. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-fb189e8e.js → HEAD CIRCUM_BOYS.percentile.weekly-724af72a.js} +0 -0
  149. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-a0f4898c.js → HEAD CIRCUM_BOYS.percentile.yearly-b1e2c65d.js} +0 -0
  150. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-fc81d9a5.js → HEAD CIRCUM_BOYS.zscore.monthly-783aeb37.js} +0 -0
  151. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-050dd8c1.js → HEAD CIRCUM_BOYS.zscore.weekly-d65ed90b.js} +0 -0
  152. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-6d85a4d1.js → HEAD CIRCUM_BOYS.zscore.yearly-b763ba85.js} +0 -0
  153. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-e8f93b43.js → HEAD CIRCUM_GIRLS.percentile.monthly-9eaec47c.js} +0 -0
  154. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-96dcfb83.js → HEAD CIRCUM_GIRLS.percentile.weekly-6fe75477.js} +0 -0
  155. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-dc2d2653.js → HEAD CIRCUM_GIRLS.percentile.yearly-0968abb0.js} +0 -0
  156. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-89dd81f8.js → HEAD CIRCUM_GIRLS.zscore.monthly-43834c71.js} +0 -0
  157. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-d2ea1430.js → HEAD CIRCUM_GIRLS.zscore.weekly-4de34153.js} +0 -0
  158. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-d69d0da3.js → HEAD CIRCUM_GIRLS.zscore.yearly-d83f8887.js} +0 -0
  159. /package/build/{HEIGHT_BOYS.percentile.monthly-ea998ed0.js → HEIGHT_BOYS.percentile.monthly-6a80a334.js} +0 -0
  160. /package/build/{HEIGHT_BOYS.percentile.weekly-ceb18203.js → HEIGHT_BOYS.percentile.weekly-4e064e4b.js} +0 -0
  161. /package/build/{HEIGHT_BOYS.percentile.yearly-8da9365c.js → HEIGHT_BOYS.percentile.yearly-1b664cba.js} +0 -0
  162. /package/build/{HEIGHT_BOYS.zscore.monthly-e2d77e93.js → HEIGHT_BOYS.zscore.monthly-143b3337.js} +0 -0
  163. /package/build/{HEIGHT_BOYS.zscore.weekly-e3e596b7.js → HEIGHT_BOYS.zscore.weekly-1be2ccbd.js} +0 -0
  164. /package/build/{HEIGHT_BOYS.zscore.yearly-223fca1a.js → HEIGHT_BOYS.zscore.yearly-ac06fad3.js} +0 -0
  165. /package/build/{HEIGHT_GIRLS.percentile.monthly-7065da3a.js → HEIGHT_GIRLS.percentile.monthly-50e3ce2b.js} +0 -0
  166. /package/build/{HEIGHT_GIRLS.percentile.weekly-a3c73f8a.js → HEIGHT_GIRLS.percentile.weekly-346918bd.js} +0 -0
  167. /package/build/{HEIGHT_GIRLS.percentile.yearly-c3ff3216.js → HEIGHT_GIRLS.percentile.yearly-fd97454c.js} +0 -0
  168. /package/build/{HEIGHT_GIRLS.zscore.monthly-68dfda52.js → HEIGHT_GIRLS.zscore.monthly-cb7461af.js} +0 -0
  169. /package/build/{HEIGHT_GIRLS.zscore.weekly-703c72a3.js → HEIGHT_GIRLS.zscore.weekly-28f6e95e.js} +0 -0
  170. /package/build/{HEIGHT_GIRLS.zscore.yearly-038d4196.js → HEIGHT_GIRLS.zscore.yearly-c4218a4a.js} +0 -0
  171. /package/build/{Onboarding-afb62ae6.js → Onboarding-449b6bc9.js} +0 -0
  172. /package/build/{Visible-4462cb2b.js → Visible-3e77298c.js} +0 -0
  173. /package/build/{WEIGHT_BOYS.percentile.monthly-520ef5d1.js → WEIGHT_BOYS.percentile.monthly-18eac862.js} +0 -0
  174. /package/build/{WEIGHT_BOYS.percentile.weekly-e2937268.js → WEIGHT_BOYS.percentile.weekly-4e4b32e0.js} +0 -0
  175. /package/build/{WEIGHT_BOYS.percentile.yearly-5c437d79.js → WEIGHT_BOYS.percentile.yearly-8a901a0e.js} +0 -0
  176. /package/build/{WEIGHT_BOYS.zscore.monthly-21794c52.js → WEIGHT_BOYS.zscore.monthly-b4f1ee7e.js} +0 -0
  177. /package/build/{WEIGHT_BOYS.zscore.weekly-cfec4167.js → WEIGHT_BOYS.zscore.weekly-c1a999df.js} +0 -0
  178. /package/build/{WEIGHT_BOYS.zscore.yearly-5cede21b.js → WEIGHT_BOYS.zscore.yearly-39cb3417.js} +0 -0
  179. /package/build/{WEIGHT_GIRLS.percentile.monthly-3ca51a26.js → WEIGHT_GIRLS.percentile.monthly-905a7333.js} +0 -0
  180. /package/build/{WEIGHT_GIRLS.percentile.weekly-e756a0f1.js → WEIGHT_GIRLS.percentile.weekly-630b9e14.js} +0 -0
  181. /package/build/{WEIGHT_GIRLS.percentile.yearly-9c4394bf.js → WEIGHT_GIRLS.percentile.yearly-d0f3a48e.js} +0 -0
  182. /package/build/{WEIGHT_GIRLS.zscore.monthly-68ffa2f4.js → WEIGHT_GIRLS.zscore.monthly-0c04e11a.js} +0 -0
  183. /package/build/{WEIGHT_GIRLS.zscore.weekly-e71c6194.js → WEIGHT_GIRLS.zscore.weekly-8aa3cdcc.js} +0 -0
  184. /package/build/{WEIGHT_GIRLS.zscore.yearly-601dc024.js → WEIGHT_GIRLS.zscore.yearly-d2d7c16b.js} +0 -0
  185. /package/build/{constants-c0804654.js → constants-3f254549.js} +0 -0
  186. /package/build/{cookieHelper-f129e711.js → cookieHelper-d7295653.js} +0 -0
  187. /package/build/{dataTransform-deef6bfb.js → dataTransform-a1ead49e.js} +0 -0
  188. /package/build/esm/{BMI_BOYS.percentile.monthly-0ee4bd2c.js → BMI_BOYS.percentile.monthly-b45fbbb0.js} +0 -0
  189. /package/build/esm/{BMI_BOYS.percentile.weekly-977fb5d8.js → BMI_BOYS.percentile.weekly-29604edc.js} +0 -0
  190. /package/build/esm/{BMI_BOYS.percentile.yearly-ffa993e3.js → BMI_BOYS.percentile.yearly-a953cfad.js} +0 -0
  191. /package/build/esm/{BMI_BOYS.zscore.monthly-f11dbe3c.js → BMI_BOYS.zscore.monthly-6292c552.js} +0 -0
  192. /package/build/esm/{BMI_BOYS.zscore.weekly-2dc84551.js → BMI_BOYS.zscore.weekly-2fcb065a.js} +0 -0
  193. /package/build/esm/{BMI_BOYS.zscore.yearly-de92155b.js → BMI_BOYS.zscore.yearly-24f72076.js} +0 -0
  194. /package/build/esm/{BMI_GIRLS.percentile.monthly-095d17d4.js → BMI_GIRLS.percentile.monthly-7bde2450.js} +0 -0
  195. /package/build/esm/{BMI_GIRLS.percentile.weekly-d7ed3113.js → BMI_GIRLS.percentile.weekly-10240d03.js} +0 -0
  196. /package/build/esm/{BMI_GIRLS.percentile.yearly-791f9ae9.js → BMI_GIRLS.percentile.yearly-65fa0071.js} +0 -0
  197. /package/build/esm/{BMI_GIRLS.zscore.monthly-8cf97f56.js → BMI_GIRLS.zscore.monthly-afaa85b6.js} +0 -0
  198. /package/build/esm/{BMI_GIRLS.zscore.weekly-2a528e1e.js → BMI_GIRLS.zscore.weekly-f1391e9d.js} +0 -0
  199. /package/build/esm/{BMI_GIRLS.zscore.yearly-7beeaac5.js → BMI_GIRLS.zscore.yearly-ce46a80c.js} +0 -0
  200. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-82a4969f.js → HEAD CIRCUM_BOYS.percentile.monthly-25741c11.js} +0 -0
  201. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-aae0c37d.js → HEAD CIRCUM_BOYS.percentile.weekly-cb4141ed.js} +0 -0
  202. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-345424df.js → HEAD CIRCUM_BOYS.percentile.yearly-d6fab204.js} +0 -0
  203. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-a146abb4.js → HEAD CIRCUM_BOYS.zscore.monthly-3de02827.js} +0 -0
  204. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-b6d636c2.js → HEAD CIRCUM_BOYS.zscore.weekly-51eb45ae.js} +0 -0
  205. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-8a22e0a5.js → HEAD CIRCUM_BOYS.zscore.yearly-fb3e3a1f.js} +0 -0
  206. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-564b57d3.js → HEAD CIRCUM_GIRLS.percentile.monthly-317d4b3e.js} +0 -0
  207. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-3ea4ba91.js → HEAD CIRCUM_GIRLS.percentile.weekly-70dc9106.js} +0 -0
  208. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-8f4661a7.js → HEAD CIRCUM_GIRLS.percentile.yearly-5b94f851.js} +0 -0
  209. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-5294fd70.js → HEAD CIRCUM_GIRLS.zscore.monthly-42f0c23c.js} +0 -0
  210. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-1417bd00.js → HEAD CIRCUM_GIRLS.zscore.weekly-d08392b9.js} +0 -0
  211. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-cfee8a9f.js → HEAD CIRCUM_GIRLS.zscore.yearly-b8f3717a.js} +0 -0
  212. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-010f25cf.js → HEIGHT_BOYS.percentile.monthly-0f0ac240.js} +0 -0
  213. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-3db8df0b.js → HEIGHT_BOYS.percentile.weekly-bd8c6951.js} +0 -0
  214. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-dd4a2a07.js → HEIGHT_BOYS.percentile.yearly-a23cdfff.js} +0 -0
  215. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-bbb611b9.js → HEIGHT_BOYS.zscore.monthly-764f7cd6.js} +0 -0
  216. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-67386da7.js → HEIGHT_BOYS.zscore.weekly-1cb871a7.js} +0 -0
  217. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-5db1fc19.js → HEIGHT_BOYS.zscore.yearly-026ec294.js} +0 -0
  218. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-9e30288a.js → HEIGHT_GIRLS.percentile.monthly-b2700645.js} +0 -0
  219. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-f2aeddb7.js → HEIGHT_GIRLS.percentile.weekly-91a669f2.js} +0 -0
  220. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-789672b2.js → HEIGHT_GIRLS.percentile.yearly-7d618e4f.js} +0 -0
  221. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-d19c4c4c.js → HEIGHT_GIRLS.zscore.monthly-631ca24f.js} +0 -0
  222. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-32c8e75c.js → HEIGHT_GIRLS.zscore.weekly-213f8af5.js} +0 -0
  223. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-742a8b6c.js → HEIGHT_GIRLS.zscore.yearly-c86b4ff8.js} +0 -0
  224. /package/build/esm/{Onboarding-239aba3c.js → Onboarding-b52f1d63.js} +0 -0
  225. /package/build/esm/{Visible-b7cc63a7.js → Visible-030ea68d.js} +0 -0
  226. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-cf3ddb4f.js → WEIGHT_BOYS.percentile.monthly-a6f8a018.js} +0 -0
  227. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-ac120c49.js → WEIGHT_BOYS.percentile.weekly-f4c69680.js} +0 -0
  228. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-3f9a5b60.js → WEIGHT_BOYS.percentile.yearly-b4bc8b84.js} +0 -0
  229. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-25cc76ee.js → WEIGHT_BOYS.zscore.monthly-17ef2a4b.js} +0 -0
  230. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-7631517a.js → WEIGHT_BOYS.zscore.weekly-ee69874c.js} +0 -0
  231. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-7385486f.js → WEIGHT_BOYS.zscore.yearly-ce162777.js} +0 -0
  232. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-b80abd03.js → WEIGHT_GIRLS.percentile.monthly-753cb938.js} +0 -0
  233. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-8231e778.js → WEIGHT_GIRLS.percentile.weekly-37690aa4.js} +0 -0
  234. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-22872c89.js → WEIGHT_GIRLS.percentile.yearly-e4f9cee7.js} +0 -0
  235. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-6143004c.js → WEIGHT_GIRLS.zscore.monthly-36e90bda.js} +0 -0
  236. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-7878e0e1.js → WEIGHT_GIRLS.zscore.weekly-4f3756d0.js} +0 -0
  237. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-66569ae5.js → WEIGHT_GIRLS.zscore.yearly-7440f0bf.js} +0 -0
  238. /package/build/esm/{constants-c0faea4c.js → constants-454e0d3e.js} +0 -0
  239. /package/build/esm/{cookieHelper-b9bedf39.js → cookieHelper-4d180cc1.js} +0 -0
  240. /package/build/esm/{dataTransform-30fe36a8.js → dataTransform-b0ebeac1.js} +0 -0
  241. /package/build/esm/{index-fc367b3c.js → index-4f208030.js} +0 -0
  242. /package/build/esm/{index-51b9c6db.js → index-d8f61edd.js} +0 -0
  243. /package/build/esm/{isProduction-ae321791.js → isProduction-9e72c93c.js} +0 -0
  244. /package/build/esm/{localizeNumberFormat-c35af920.js → localizeNumberFormat-660af79e.js} +0 -0
  245. /package/build/esm/{normalizeLink-69da30c4.js → normalizeLink-8293707a.js} +0 -0
  246. /package/build/esm/{theme-71bbf201.js → theme-f57cea6c.js} +0 -0
  247. /package/build/esm/{translationsContext-47b847f3.js → translationsContext-d177c6d8.js} +0 -0
  248. /package/build/esm/{tslib.es6-92c43f45.js → tslib.es6-90f951e4.js} +0 -0
  249. /package/build/esm/{types-37933ca2.js → types-472c1e20.js} +0 -0
  250. /package/build/esm/{useIsInit-58eea1d5.js → useIsInit-594bc816.js} +0 -0
  251. /package/build/esm/{useOutsideClick-26aebbe1.js → useOutsideClick-dd6c33a1.js} +0 -0
  252. /package/build/esm/{useScrollbarSize-c3099c86.js → useScrollbarSize-79e3b57a.js} +0 -0
  253. /package/build/esm/{useUniqueId-8dfce4cb.js → useUniqueId-51fdfb9c.js} +0 -0
  254. /package/build/esm/{utils-53912db7.js → utils-4c345bed.js} +0 -0
  255. /package/build/{index-7eeeee7a.js → index-a2f7898a.js} +0 -0
  256. /package/build/{index-06a91ebf.js → index-edcaabeb.js} +0 -0
  257. /package/build/{isProduction-22794967.js → isProduction-5ac489ce.js} +0 -0
  258. /package/build/{localizeNumberFormat-22c14755.js → localizeNumberFormat-4fcdc06d.js} +0 -0
  259. /package/build/{normalizeLink-dff208e0.js → normalizeLink-642c9c5f.js} +0 -0
  260. /package/build/{theme-c3319057.js → theme-03c7ebd1.js} +0 -0
  261. /package/build/{translationsContext-7250bf86.js → translationsContext-8c63f332.js} +0 -0
  262. /package/build/{tslib.es6-6b1f019f.js → tslib.es6-332bd1e5.js} +0 -0
  263. /package/build/{types-b7741a4a.js → types-dd88766f.js} +0 -0
  264. /package/build/{useIsInit-3a2d125f.js → useIsInit-1d908a7c.js} +0 -0
  265. /package/build/{useOutsideClick-d7198b2c.js → useOutsideClick-341ae41c.js} +0 -0
  266. /package/build/{useScrollbarSize-76444e27.js → useScrollbarSize-6ff0b52b.js} +0 -0
  267. /package/build/{useUniqueId-b204c5a0.js → useUniqueId-942667d5.js} +0 -0
  268. /package/build/{utils-acff35db.js → utils-d28a886b.js} +0 -0
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("./tslib.es6-6b1f019f.js"),t=require("react"),a=require("./constants-c0804654.js"),i=require("./index-a85233d1.js"),o=require("./cookieHelper-f129e711.js"),n=require("./useTranslations-ba3b3bff.js"),s=require("lodash/debounce"),l=require("./index-ca836e0a.js"),r=require("styled-components"),c=require("./index-ef731f98.js"),d=require("./theme-c3319057.js"),u=require("react-loading-skeleton"),h=require("./utils-acff35db.js"),p=require("lodash/shuffle"),g=require("./useOutsideClick-d7198b2c.js"),f=require("string-format");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var C=m(t),b=m(s),y=m(r),v=m(u),E=m(p),L=m(f);const w=y.default.div``,x=y.default.div`
1
+ "use strict";var e=require("./tslib.es6-332bd1e5.js"),t=require("react"),a=require("./constants-3f254549.js"),i=require("./index-bf5150a9.js"),o=require("./cookieHelper-d7295653.js"),n=require("./useTranslations-ace1daae.js"),s=require("lodash/debounce"),l=require("./index-6b570bc4.js"),r=require("styled-components"),c=require("./index-e24b7b39.js"),d=require("./theme-03c7ebd1.js"),u=require("react-loading-skeleton"),h=require("./utils-d28a886b.js"),p=require("lodash/shuffle"),g=require("./useOutsideClick-341ae41c.js"),f=require("string-format");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var C=m(t),b=m(s),y=m(r),v=m(u),E=m(p),L=m(f);const w=y.default.div``,x=y.default.div`
2
2
  --searchbar-z-index: 305;
3
3
  &[data-is-modal='true'] {
4
4
  position: fixed;
@@ -124,7 +124,7 @@
124
124
  &:first-child {
125
125
  padding-top: 18px;
126
126
  }
127
- `,H=({cities:e,isLoading:t,onLocationClick:i,onCurrentLocationClick:o,geoLocationPermission:s="unset",isLocationLoading:l,selectedLocation:r,isOptionAllLocation:u})=>{const{t:h,locale:p}=n.useTranslations(),g="denied"===s,f=()=>C.default.createElement(D,{role:"button",tabIndex:0,onClick:e=>{g||(e.nativeEvent.stopImmediatePropagation(),l||o())},"data-is-denied":g},g?C.default.createElement(c.Text,{color:"var(--gray600)",size:"md"},"x"):l?C.default.createElement(v.default,{height:20,width:20}):C.default.createElement(M,{color:d.theme.colors.primaryBase}),C.default.createElement("div",null,g?C.default.createElement(c.Text,{color:"var(--gray600)",size:"sm",style:{lineHeight:1.5}},h("booking.searchBar.grantLocation")):l?C.default.createElement(v.default,{height:20,style:{width:"calc(100% - 16px)"}}):C.default.createElement(c.Text,{size:"md"},h("booking.searchBar.useCurrentLocation"))));return C.default.createElement(P,{"data-testid":"location-search-results"},C.default.createElement(F,null,t?C.default.createElement(B,{count:5}):!e||e.length<1?C.default.createElement(C.default.Fragment,null,f(),C.default.createElement(D,{"data-is-denied":"true"},C.default.createElement(c.Text,{size:"sm",color:"#ccc"},h("booking.searchBar.noResults")))):C.default.createElement(C.default.Fragment,null,u&&C.default.createElement(D,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{var e;i&&i({name:h("booking.searchBar.allLocations"),id:a.ID_OPTION_ALL_LOCATION,slug:null===(e=a.LOCALIZED_SLUGS[p])||void 0===e?void 0:e.ALL})}},C.default.createElement(_,{color:d.theme.colors.neutral400}),C.default.createElement(c.Text,{size:"md"},h("booking.searchBar.allLocations"))),f(),e.map((e=>C.default.createElement(D,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),i&&i(e)},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==r?void 0:r.id)===e.id},C.default.createElement(_,{color:d.theme.colors.neutral400}),C.default.createElement(c.Text,{size:"md"},e.name)))))))},V="TYPE_CHARACTER",$="REMOVE_CHARACTER",z="REMOVE_ALL",K="REMOVE_LAST_VISIBLE_NODE",Z="PAUSE_FOR",G="CHANGE_DELETE_SPEED",U="CHANGE_DELAY",q="PASTE_STRING",Q=(e,t)=>Math.floor(Math.random()*(t-e+1))+e,W="TEXT_NODE";class Y{constructor(e){this.state={lastFrameTime:null,pauseUntil:null,eventQueue:[],eventLoop:null,eventLoopPaused:!1,reverseCalledEvents:[],calledEvents:[],visibleNodes:[],initialOptions:null},this.options={strings:null,delay:"natural",pauseFor:1500,deleteSpeed:"natural",loop:!1,autoStart:!1,stringSplitter:null,onCreateTextNode:null,onRemoveNode:null},this.start=()=>(this.state.eventLoopPaused=!1,this.runEventLoop(),this),this.pause=()=>(this.state.eventLoopPaused=!0,this),this.stop=()=>(this.state.eventLoop&&(window.cancelAnimationFrame(this.state.eventLoop),this.state.eventLoop=null),this),this.pauseFor=e=>(this.addEventToQueue(Z,{ms:e}),this),this.typeOutAllStrings=()=>"string"==typeof this.options.strings?(this.typeString(this.options.strings).pauseFor(this.options.pauseFor),this):(this.options.strings.forEach((e=>{this.typeString(e).pauseFor(this.options.pauseFor).deleteAll(this.options.deleteSpeed)})),this),this.typeString=(e,t=null)=>{if(e){const{stringSplitter:a}=this.options||{},i="function"==typeof a?a(e):e.split("");this.typeCharacters(i,t)}return this},this.pasteString=(e,t=null)=>(e&&this.addEventToQueue(q,{character:e,node:t}),this),this.deleteAll=(e="natural")=>(this.addEventToQueue(z,{speed:e}),this),this.changeDeleteSpeed=e=>{if(!e)throw new Error("Must provide new delete speed");return this.addEventToQueue(G,{speed:e}),this},this.changeDelay=e=>{if(!e)throw new Error("Must provide new delay");return this.addEventToQueue(U,{delay:e}),this},this.deleteChars=e=>{if(!e)throw new Error("Must provide amount of characters to delete");for(let t=0;t<e;t++)this.addEventToQueue($);return this},this.typeCharacters=(e,t=null)=>{if(!e||!Array.isArray(e))throw new Error("Characters must be an array");return e.forEach((e=>{this.addEventToQueue(V,{character:e,node:t})})),this},this.removeCharacters=e=>{if(!e||!Array.isArray(e))throw new Error("Characters must be an array");return e.forEach((()=>{this.addEventToQueue($)})),this},this.addEventToQueue=(e,t,a=!1)=>this.addEventToStateProperty(e,t,a,"eventQueue"),this.addReverseCalledEvent=(e,t,a=!1)=>{const{loop:i}=this.options;return i?this.addEventToStateProperty(e,t,a,"reverseCalledEvents"):this},this.addEventToStateProperty=(e,t,a=!1,i)=>{const o={eventName:e,eventArgs:t||{}};return this.state[i]=a?[o,...this.state[i]]:[...this.state[i],o],this},this.runEventLoop=()=>{this.state.lastFrameTime||(this.state.lastFrameTime=Date.now());const e=Date.now(),t=e-this.state.lastFrameTime;if(!this.state.eventQueue.length){if(!this.options.loop)return;this.state.eventQueue=[...this.state.calledEvents],this.state.calledEvents=[],this.options=Object.assign({},this.state.initialOptions)}if(this.state.eventLoop=window.requestAnimationFrame(this.runEventLoop),this.state.eventLoopPaused)return;if(this.state.pauseUntil){if(e<this.state.pauseUntil)return;this.state.pauseUntil=null}const a=[...this.state.eventQueue],i=a.shift();let o=0;if(o=i.eventName===K||i.eventName===$?"natural"===this.options.deleteSpeed?Q(40,80):this.options.deleteSpeed:"natural"===this.options.delay?Q(120,160):this.options.delay,t<=o)return;const{eventName:n,eventArgs:s}=i;switch(n){case q:case V:{const{character:e}=s,t=document.createTextNode(e);let a=t;this.options.onCreateTextNode&&"function"==typeof this.options.onCreateTextNode&&(a=this.options.onCreateTextNode(e,t)),this.state.visibleNodes=[...this.state.visibleNodes,{type:W,character:e,node:a}];break}case $:a.unshift({eventName:K,eventArgs:{removingCharacterNode:!0}});break;case Z:{const{ms:e}=i.eventArgs;this.state.pauseUntil=Date.now()+parseInt(e);break}case z:{const{visibleNodes:e}=this.state,{speed:t}=s,i=[];t&&i.push({eventName:G,eventArgs:{speed:t,temp:!0}});for(let t=0,a=e.length;t<a;t++)i.push({eventName:K,eventArgs:{removingCharacterNode:!1}});t&&i.push({eventName:G,eventArgs:{speed:this.options.deleteSpeed,temp:!0}}),a.unshift(...i);break}case K:if(this.state.visibleNodes.length){const{node:e,character:t}=this.state.visibleNodes.pop();this.options.onRemoveNode&&"function"==typeof this.options.onRemoveNode&&this.options.onRemoveNode({node:e,character:t}),e&&e.parentNode.removeChild(e)}break;case G:this.options.deleteSpeed=i.eventArgs.speed;break;case U:this.options.delay=i.eventArgs.delay}this.options.loop&&(i.eventName===K||i.eventArgs&&i.eventArgs.temp||(this.state.calledEvents=[...this.state.calledEvents,i])),this.state.eventQueue=a,this.state.lastFrameTime=e},e&&(this.options=Object.assign(Object.assign({},this.options),e)),this.state.initialOptions=Object.assign({},this.options),this.init()}init(){this.addEventToQueue(z,null,!0),!0===this.options.autoStart&&this.options.strings&&this.typeOutAllStrings().start()}}function J({inputRef:e,wrapperRef:a,disabled:i}){const{t:o,locale:s}=n.useTranslations(),l=t.useMemo((()=>{if(i)return[];const e=["booking.searchBar.placeholder.hospital","booking.searchBar.placeholder.doctor"];return"zh-TW"!==s&&e.push("booking.searchBar.placeholder.specialty","booking.searchBar.placeholder.service"),E.default(e).map((e=>o(e)))}),[o,s]);function r(e){const t=d();return t&&(t.placeholder=t.placeholder+e),null}function c(){const e=d();e&&(e.placeholder=e.placeholder.slice(0,-1))}function d(){return e&&e.current?e.current:a&&a.current&&a.current.querySelector("input")||null}t.useEffect((()=>{if(i)return;const e=d();e&&(e.placeholder="",new Y({strings:l,autoStart:!0,loop:!0,delay:32,deleteSpeed:32,pauseFor:1500,onCreateTextNode:r,onRemoveNode:c}))}),[e,a])}const X=y.default.div`
127
+ `,H=({cities:e,isLoading:t,onLocationClick:i,onCurrentLocationClick:o,geoLocationPermission:s="unset",isLocationLoading:l,selectedLocation:r,isOptionAllLocation:u})=>{const{t:h,locale:p}=n.useTranslations(),g="denied"===s,f=()=>C.default.createElement(D,{role:"button",tabIndex:0,onClick:e=>{g||(e.nativeEvent.stopImmediatePropagation(),l||o())},"data-is-denied":g},g?C.default.createElement(c.Text,{color:"var(--gray600)",size:"md"},"x"):l?C.default.createElement(v.default,{height:20,width:20}):C.default.createElement(M,{color:d.theme.colors.primaryBase}),C.default.createElement("div",null,g?C.default.createElement(c.Text,{color:"var(--gray600)",size:"sm",style:{lineHeight:1.5}},h("booking.searchBar.grantLocation")):l?C.default.createElement(v.default,{height:20,style:{width:"calc(100% - 16px)"}}):C.default.createElement(c.Text,{size:"md"},h("booking.searchBar.useCurrentLocation"))));return C.default.createElement(P,{"data-testid":"location-search-results"},C.default.createElement(F,null,t?C.default.createElement(B,{count:5}):!e||e.length<1?C.default.createElement(C.default.Fragment,null,f(),C.default.createElement(D,{"data-is-denied":"true"},C.default.createElement(c.Text,{size:"sm",color:"#ccc"},h("booking.searchBar.noResults")))):C.default.createElement(C.default.Fragment,null,u&&C.default.createElement(D,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{var e;i&&i({name:h("booking.searchBar.allLocations"),id:a.ID_OPTION_ALL_LOCATION,slug:null===(e=a.LOCALIZED_SLUGS[p])||void 0===e?void 0:e.ALL})}},C.default.createElement(_,{color:d.theme.colors.neutral400}),C.default.createElement(c.Text,{size:"md"},h("booking.searchBar.allLocations"))),f(),e.map((e=>C.default.createElement(D,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),i&&i(e)},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==r?void 0:r.id)===e.id},C.default.createElement(_,{color:d.theme.colors.neutral400}),C.default.createElement(c.Text,{size:"md"},e.name)))))))},V="TYPE_CHARACTER",$="REMOVE_CHARACTER",z="REMOVE_ALL",K="REMOVE_LAST_VISIBLE_NODE",Z="PAUSE_FOR",G="CHANGE_DELETE_SPEED",U="CHANGE_DELAY",q="PASTE_STRING",Q=(e,t)=>Math.floor(Math.random()*(t-e+1))+e,Y="TEXT_NODE";class W{constructor(e){this.state={lastFrameTime:null,pauseUntil:null,eventQueue:[],eventLoop:null,eventLoopPaused:!1,reverseCalledEvents:[],calledEvents:[],visibleNodes:[],initialOptions:null},this.options={strings:null,delay:"natural",pauseFor:1500,deleteSpeed:"natural",loop:!1,autoStart:!1,stringSplitter:null,onCreateTextNode:null,onRemoveNode:null},this.start=()=>(this.state.eventLoopPaused=!1,this.runEventLoop(),this),this.pause=()=>(this.state.eventLoopPaused=!0,this),this.stop=()=>(this.state.eventLoop&&(window.cancelAnimationFrame(this.state.eventLoop),this.state.eventLoop=null),this),this.pauseFor=e=>(this.addEventToQueue(Z,{ms:e}),this),this.typeOutAllStrings=()=>"string"==typeof this.options.strings?(this.typeString(this.options.strings).pauseFor(this.options.pauseFor),this):(this.options.strings.forEach((e=>{this.typeString(e).pauseFor(this.options.pauseFor).deleteAll(this.options.deleteSpeed)})),this),this.typeString=(e,t=null)=>{if(e){const{stringSplitter:a}=this.options||{},i="function"==typeof a?a(e):e.split("");this.typeCharacters(i,t)}return this},this.pasteString=(e,t=null)=>(e&&this.addEventToQueue(q,{character:e,node:t}),this),this.deleteAll=(e="natural")=>(this.addEventToQueue(z,{speed:e}),this),this.changeDeleteSpeed=e=>{if(!e)throw new Error("Must provide new delete speed");return this.addEventToQueue(G,{speed:e}),this},this.changeDelay=e=>{if(!e)throw new Error("Must provide new delay");return this.addEventToQueue(U,{delay:e}),this},this.deleteChars=e=>{if(!e)throw new Error("Must provide amount of characters to delete");for(let t=0;t<e;t++)this.addEventToQueue($);return this},this.typeCharacters=(e,t=null)=>{if(!e||!Array.isArray(e))throw new Error("Characters must be an array");return e.forEach((e=>{this.addEventToQueue(V,{character:e,node:t})})),this},this.removeCharacters=e=>{if(!e||!Array.isArray(e))throw new Error("Characters must be an array");return e.forEach((()=>{this.addEventToQueue($)})),this},this.addEventToQueue=(e,t,a=!1)=>this.addEventToStateProperty(e,t,a,"eventQueue"),this.addReverseCalledEvent=(e,t,a=!1)=>{const{loop:i}=this.options;return i?this.addEventToStateProperty(e,t,a,"reverseCalledEvents"):this},this.addEventToStateProperty=(e,t,a=!1,i)=>{const o={eventName:e,eventArgs:t||{}};return this.state[i]=a?[o,...this.state[i]]:[...this.state[i],o],this},this.runEventLoop=()=>{this.state.lastFrameTime||(this.state.lastFrameTime=Date.now());const e=Date.now(),t=e-this.state.lastFrameTime;if(!this.state.eventQueue.length){if(!this.options.loop)return;this.state.eventQueue=[...this.state.calledEvents],this.state.calledEvents=[],this.options=Object.assign({},this.state.initialOptions)}if(this.state.eventLoop=window.requestAnimationFrame(this.runEventLoop),this.state.eventLoopPaused)return;if(this.state.pauseUntil){if(e<this.state.pauseUntil)return;this.state.pauseUntil=null}const a=[...this.state.eventQueue],i=a.shift();let o=0;if(o=i.eventName===K||i.eventName===$?"natural"===this.options.deleteSpeed?Q(40,80):this.options.deleteSpeed:"natural"===this.options.delay?Q(120,160):this.options.delay,t<=o)return;const{eventName:n,eventArgs:s}=i;switch(n){case q:case V:{const{character:e}=s,t=document.createTextNode(e);let a=t;this.options.onCreateTextNode&&"function"==typeof this.options.onCreateTextNode&&(a=this.options.onCreateTextNode(e,t)),this.state.visibleNodes=[...this.state.visibleNodes,{type:Y,character:e,node:a}];break}case $:a.unshift({eventName:K,eventArgs:{removingCharacterNode:!0}});break;case Z:{const{ms:e}=i.eventArgs;this.state.pauseUntil=Date.now()+parseInt(e);break}case z:{const{visibleNodes:e}=this.state,{speed:t}=s,i=[];t&&i.push({eventName:G,eventArgs:{speed:t,temp:!0}});for(let t=0,a=e.length;t<a;t++)i.push({eventName:K,eventArgs:{removingCharacterNode:!1}});t&&i.push({eventName:G,eventArgs:{speed:this.options.deleteSpeed,temp:!0}}),a.unshift(...i);break}case K:if(this.state.visibleNodes.length){const{node:e,character:t}=this.state.visibleNodes.pop();this.options.onRemoveNode&&"function"==typeof this.options.onRemoveNode&&this.options.onRemoveNode({node:e,character:t}),e&&e.parentNode.removeChild(e)}break;case G:this.options.deleteSpeed=i.eventArgs.speed;break;case U:this.options.delay=i.eventArgs.delay}this.options.loop&&(i.eventName===K||i.eventArgs&&i.eventArgs.temp||(this.state.calledEvents=[...this.state.calledEvents,i])),this.state.eventQueue=a,this.state.lastFrameTime=e},e&&(this.options=Object.assign(Object.assign({},this.options),e)),this.state.initialOptions=Object.assign({},this.options),this.init()}init(){this.addEventToQueue(z,null,!0),!0===this.options.autoStart&&this.options.strings&&this.typeOutAllStrings().start()}}function J({inputRef:e,wrapperRef:a,disabled:i}){const{t:o,locale:s}=n.useTranslations(),l=t.useMemo((()=>{if(i)return[];const e=["booking.searchBar.placeholder.hospital","booking.searchBar.placeholder.doctor"];return"zh-TW"!==s&&e.push("booking.searchBar.placeholder.specialty","booking.searchBar.placeholder.service"),E.default(e).map((e=>o(e)))}),[o,s]);function r(e){const t=d();return t&&(t.placeholder=t.placeholder+e),null}function c(){const e=d();e&&(e.placeholder=e.placeholder.slice(0,-1))}function d(){return e&&e.current?e.current:a&&a.current&&a.current.querySelector("input")||null}t.useEffect((()=>{if(i)return;const e=d();e&&(e.placeholder="",new W({strings:l,autoStart:!0,loop:!0,delay:32,deleteSpeed:32,pauseFor:1500,onCreateTextNode:r,onRemoveNode:c}))}),[e,a])}const X=y.default.div`
128
128
  user-select: none;
129
129
  input {
130
130
  pointer-events: none;
@@ -158,7 +158,7 @@
158
158
  `,ne=y.default(c.Text)`
159
159
  color: ${d.theme.colors.secondaryDark};
160
160
  text-align: start;
161
- `,se=({className:e,onLeftClick:t,headingText:a,onRightClick:i,iconLeft:o,textRight:n})=>C.default.createElement(te,{className:e},C.default.createElement(ie,{onClick:t},o||C.default.createElement(T,{color:d.theme.colors.gray800})),C.default.createElement(oe,null,C.default.createElement(ne,{size:"md",type:"bold"},a)),C.default.createElement(ae,{onClick:i},n&&C.default.createElement("p",null,n))),le={"en-PH":3,"tl-PH":2,"id-ID":3,"vi-VN":2,"zh-TW":0,"ms-MY":3},re={isMobile:!1,isDebug:!1,navigateTo:null,geoLocationPermission:"unset",geoLocationCoordinates:null,focused:"none",searchLocationKeywords:"",searchKeywords:"",selectedLocation:null,defaultCity:null,initialCities:[],cities:[],searchResults:[],initialSearchResults:[],isLoadingCities:!1,isLoadingSearchResults:!1,isMobileModalOpened:!1,initialSelectedCity:null,autoCompleteDisabled:!1,inputSearchPlaceholder:"",locale:"vi-VN"};var ce;function de(e){const{selectedLocation:t,searchLocationKeywords:a}=e;return t&&a!==t.name?Object.assign(Object.assign({},e),{searchLocationKeywords:t.name}):e}function ue(e,t){var i;switch(e.isDebug&&console.log("bookingSearchBar",{action:t,state:e}),t.type){case ce.NavigateTo:return Object.assign(Object.assign({},e),{navigateTo:t.payload,focused:"none",isMobileModalOpened:!1});case ce.ClickOutsideInputLocation:return e.isMobile||"location"!==e.focused?e:de(Object.assign(Object.assign({},e),{focused:"none"}));case ce.ClickOutsideInputSearch:return e.isMobile||"search"!==e.focused?e:Object.assign(Object.assign({},e),{focused:"none"});case ce.FocusInputLocation:{const t=Object.assign(Object.assign({},e),{focused:"location"});return(null===(i=e.selectedLocation)||void 0===i?void 0:i.id)===a.ID_OPTION_CURRENT_LOCATION&&(t.searchLocationKeywords=""),t}case ce.FocusInputSearch:const o=Object.assign(Object.assign({},e),{focused:"search"});return e.isMobile?de(o):o;case ce.ChangeInputLocation:return Object.assign(Object.assign({},e),{searchLocationKeywords:t.payload});case ce.ChangeInputSearch:{const a=t.payload;return Object.assign(Object.assign({},e),{searchKeywords:a,isLoadingSearchResults:a.trim().length>le[e.locale]})}case ce.SelectCurrentLocation:return Object.assign(Object.assign({},e),{focused:"none",selectedLocation:t.payload,searchLocationKeywords:t.payload.name});case ce.ClearInputLocation:return Object.assign(Object.assign({},e),{focused:"location",cities:e.initialCities,searchLocationKeywords:""});case ce.ClearInputSearch:return Object.assign(Object.assign({},e),{focused:"search",searchKeywords:""});case ce.SelectLocation:return Object.assign(Object.assign({},e),{focused:"none",selectedLocation:t.payload,searchLocationKeywords:t.payload.name});case ce.SelectSearchResult:return Object.assign(Object.assign({},e),{searchKeywords:t.payload.name,isMobileModalOpened:!1,focused:"none",navigateTo:t.payload.url});case ce.FetchCitiesStart:return Object.assign(Object.assign({},e),{isLoadingCities:!0});case ce.FetchCitiesFinish:return Object.assign(Object.assign({},e),{isLoadingCities:!1});case ce.FetchSearchResultsStart:return Object.assign(Object.assign({},e),{isLoadingSearchResults:!0});case ce.FetchSearchResultsFinish:return Object.assign(Object.assign({},e),{isLoadingSearchResults:!1});case ce.FetchSearchResultsComplete:{const a=Object.assign(Object.assign({},e),{searchResults:t.payload});return 0===e.initialSearchResults.length&&(a.initialSearchResults=t.payload),a}case ce.FetchCitiesByGeoIpComplete:{let{cities:a}=t.payload;const{default:i}=t.payload;a=a.filter((e=>e.id!==i.id)),a.unshift(i),e.initialSelectedCity&&!a.find((t=>t.id===e.initialSelectedCity.id))&&a.unshift(e.initialSelectedCity);const o=Object.assign(Object.assign({},e),{defaultCity:i,initialCities:a,cities:a});return"denied"!==e.geoLocationPermission||e.initialSelectedCity||(o.selectedLocation=i,o.searchLocationKeywords=i.name),o}case ce.FetchCitiesByKeywordComplete:return Object.assign(Object.assign({},e),{cities:t.payload});case ce.DisplayInitialCities:return Object.assign(Object.assign({},e),{cities:e.initialCities});case ce.DisplayInitialSearchResults:return Object.assign(Object.assign({},e),{searchResults:e.initialSearchResults,isLoadingSearchResults:!1});case ce.GrantGeoLocationPermission:return Object.assign(Object.assign({},e),{geoLocationPermission:"granted",geoLocationCoordinates:t.payload});case ce.DenyGeoLocationPermission:return Object.assign(Object.assign({},e),{geoLocationPermission:"denied",geoLocationCoordinates:null});case ce.OpenMobileModal:return Object.assign(Object.assign({},e),{isMobileModalOpened:!0});case ce.CloseMobileModal:return Object.assign(Object.assign({},e),{isMobileModalOpened:!1});case ce.UpdateInitialSearchValue:return Object.assign(Object.assign({},e),{searchKeywords:t.payload});case ce.SetInputSearchPlaceholder:return Object.assign(Object.assign({},e),{inputSearchPlaceholder:t.payload});default:return e}}!function(e){e.NavigateTo="navigate to url",e.ClickOutsideInputLocation="click outside input location",e.ClickOutsideInputSearch="click outside input search",e.SelectCurrentLocation="select current location",e.FocusInputLocation="focus input location",e.FocusInputSearch="focus input search",e.ChangeInputLocation="change input location",e.ChangeInputSearch="change input search",e.ClearInputLocation="clear input location",e.ClearInputSearch="clear input search",e.SelectLocation="select location",e.FetchCitiesStart="fetch cities start",e.FetchCitiesFinish="fetch cities finish",e.FetchSearchResultsStart="fetch search results start",e.FetchSearchResultsComplete="fetch search results complete",e.FetchSearchResultsFinish="fetch search results finish",e.FetchCitiesByGeoIpComplete="fetch cities by geo IP finish",e.FetchCitiesByKeywordComplete="fetch cities by keyword finish",e.DisplayInitialCities="display initial cities",e.DisplayInitialSearchResults="display initial search results",e.GrantGeoLocationPermission="grant geolocation permission",e.DenyGeoLocationPermission="deny geolocation permission",e.OpenMobileModal="open mobile modal",e.CloseMobileModal="close mobile modal",e.UpdateInitialSearchValue="update initial search value",e.SelectSearchResult="select search result",e.SetInputSearchPlaceholder="set input search placeholder"}(ce||(ce={}));const he=y.default.div`
161
+ `,se=({className:e,onLeftClick:t,headingText:a,onRightClick:i,iconLeft:o,textRight:n})=>C.default.createElement(te,{className:e},C.default.createElement(ie,{onClick:t},o||C.default.createElement(T,{color:d.theme.colors.gray800})),C.default.createElement(oe,null,C.default.createElement(ne,{size:"md",type:"bold"},a)),C.default.createElement(ae,{onClick:i},n&&C.default.createElement("p",null,n))),le={"en-PH":3,"tl-PH":2,"id-ID":3,"vi-VN":2,"zh-TW":0,"ms-MY":2},re={isMobile:!1,isDebug:!1,navigateTo:null,geoLocationPermission:"unset",geoLocationCoordinates:null,focused:"none",searchLocationKeywords:"",searchKeywords:"",selectedLocation:null,defaultCity:null,initialCities:[],cities:[],searchResults:[],initialSearchResults:[],isLoadingCities:!1,isLoadingSearchResults:!1,isMobileModalOpened:!1,initialSelectedCity:null,autoCompleteDisabled:!1,inputSearchPlaceholder:"",locale:"vi-VN"};var ce;function de(e){const{selectedLocation:t,searchLocationKeywords:a}=e;return t&&a!==t.name?Object.assign(Object.assign({},e),{searchLocationKeywords:t.name}):e}function ue(e,t){var i;switch(e.isDebug&&console.log("bookingSearchBar",{action:t,state:e}),t.type){case ce.NavigateTo:return Object.assign(Object.assign({},e),{navigateTo:t.payload,focused:"none",isMobileModalOpened:!1});case ce.ClickOutsideInputLocation:return e.isMobile||"location"!==e.focused?e:de(Object.assign(Object.assign({},e),{focused:"none"}));case ce.ClickOutsideInputSearch:return e.isMobile||"search"!==e.focused?e:Object.assign(Object.assign({},e),{focused:"none"});case ce.FocusInputLocation:{const t=Object.assign(Object.assign({},e),{focused:"location"});return(null===(i=e.selectedLocation)||void 0===i?void 0:i.id)===a.ID_OPTION_CURRENT_LOCATION&&(t.searchLocationKeywords=""),t}case ce.FocusInputSearch:const o=Object.assign(Object.assign({},e),{focused:"search"});return e.isMobile?de(o):o;case ce.ChangeInputLocation:return Object.assign(Object.assign({},e),{searchLocationKeywords:t.payload});case ce.ChangeInputSearch:{const a=t.payload;return Object.assign(Object.assign({},e),{searchKeywords:a,isLoadingSearchResults:a.trim().length>le[e.locale]})}case ce.SelectCurrentLocation:return Object.assign(Object.assign({},e),{focused:"none",selectedLocation:t.payload,searchLocationKeywords:t.payload.name});case ce.ClearInputLocation:return Object.assign(Object.assign({},e),{focused:"location",cities:e.initialCities,searchLocationKeywords:""});case ce.ClearInputSearch:return Object.assign(Object.assign({},e),{focused:"search",searchKeywords:""});case ce.SelectLocation:return Object.assign(Object.assign({},e),{focused:"none",selectedLocation:t.payload,searchLocationKeywords:t.payload.name});case ce.SelectSearchResult:return Object.assign(Object.assign({},e),{searchKeywords:t.payload.name,isMobileModalOpened:!1,focused:"none",navigateTo:t.payload.url});case ce.FetchCitiesStart:return Object.assign(Object.assign({},e),{isLoadingCities:!0});case ce.FetchCitiesFinish:return Object.assign(Object.assign({},e),{isLoadingCities:!1});case ce.FetchSearchResultsStart:return Object.assign(Object.assign({},e),{isLoadingSearchResults:!0});case ce.FetchSearchResultsFinish:return Object.assign(Object.assign({},e),{isLoadingSearchResults:!1});case ce.FetchSearchResultsComplete:{const a=Object.assign(Object.assign({},e),{searchResults:t.payload});return 0===e.initialSearchResults.length&&(a.initialSearchResults=t.payload),a}case ce.FetchCitiesByGeoIpComplete:{let{cities:a}=t.payload;const{default:i}=t.payload;a=a.filter((e=>e.id!==i.id)),a.unshift(i),e.initialSelectedCity&&!a.find((t=>t.id===e.initialSelectedCity.id))&&a.unshift(e.initialSelectedCity);const o=Object.assign(Object.assign({},e),{defaultCity:i,initialCities:a,cities:a});return"denied"!==e.geoLocationPermission||e.initialSelectedCity||(o.selectedLocation=i,o.searchLocationKeywords=i.name),o}case ce.FetchCitiesByKeywordComplete:return Object.assign(Object.assign({},e),{cities:t.payload});case ce.DisplayInitialCities:return Object.assign(Object.assign({},e),{cities:e.initialCities});case ce.DisplayInitialSearchResults:return Object.assign(Object.assign({},e),{searchResults:e.initialSearchResults,isLoadingSearchResults:!1});case ce.GrantGeoLocationPermission:return Object.assign(Object.assign({},e),{geoLocationPermission:"granted",geoLocationCoordinates:t.payload});case ce.DenyGeoLocationPermission:return Object.assign(Object.assign({},e),{geoLocationPermission:"denied",geoLocationCoordinates:null});case ce.OpenMobileModal:return Object.assign(Object.assign({},e),{isMobileModalOpened:!0});case ce.CloseMobileModal:return Object.assign(Object.assign({},e),{isMobileModalOpened:!1});case ce.UpdateInitialSearchValue:return Object.assign(Object.assign({},e),{searchKeywords:t.payload});case ce.SetInputSearchPlaceholder:return Object.assign(Object.assign({},e),{inputSearchPlaceholder:t.payload});default:return e}}!function(e){e.NavigateTo="navigate to url",e.ClickOutsideInputLocation="click outside input location",e.ClickOutsideInputSearch="click outside input search",e.SelectCurrentLocation="select current location",e.FocusInputLocation="focus input location",e.FocusInputSearch="focus input search",e.ChangeInputLocation="change input location",e.ChangeInputSearch="change input search",e.ClearInputLocation="clear input location",e.ClearInputSearch="clear input search",e.SelectLocation="select location",e.FetchCitiesStart="fetch cities start",e.FetchCitiesFinish="fetch cities finish",e.FetchSearchResultsStart="fetch search results start",e.FetchSearchResultsComplete="fetch search results complete",e.FetchSearchResultsFinish="fetch search results finish",e.FetchCitiesByGeoIpComplete="fetch cities by geo IP finish",e.FetchCitiesByKeywordComplete="fetch cities by keyword finish",e.DisplayInitialCities="display initial cities",e.DisplayInitialSearchResults="display initial search results",e.GrantGeoLocationPermission="grant geolocation permission",e.DenyGeoLocationPermission="deny geolocation permission",e.OpenMobileModal="open mobile modal",e.CloseMobileModal="close mobile modal",e.UpdateInitialSearchValue="update initial search value",e.SelectSearchResult="select search result",e.SetInputSearchPlaceholder="set input search placeholder"}(ce||(ce={}));const he=y.default.div`
162
162
  display: flex;
163
163
  gap: 16px;
164
164
  ${h.MediaQueries.mbDown} {
@@ -336,4 +336,4 @@
336
336
  0px 16px 24px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04),
337
337
  0px 0px 1px rgba(0, 0, 0, 0.04);
338
338
  }
339
- `,ze=({data:e,state:t,dispatch:a,isMobile:i,isLoading:o,keyword:n,hideResults:s,isNavResultItem:l})=>C.default.createElement($e,null,e&&e.map((e=>s&&s.includes(e.type)?C.default.createElement(C.default.Fragment,null):C.default.createElement(Ve,{type:e.type,state:t,dispatch:a,itemsToShow:2,itemsToShowDesktop:4,key:e.type,data:e.results,isMobile:i,isLoading:o,keyword:n,isNavResultItem:l})))),Ke="api/lists/cities?keyword={keyword}&country_id={countryId}&site={domain}&_nopaging={noPaging}",Ze="api/v2/search/?site={domain}&type={searchType}&keyword={keyword}&city_id={city}&latitude={lat}&longitude={lng}",Ge="api/geobyip?site={domain}&latitude={lat}&longitude={lng}&_nopaging={noPaging}",Ue=(e,t,a)=>L.default(e,Object.assign(Object.assign({},t),{domain:i.domainLocales[a||"en-PH"]}));var qe;!function(e){e[e.SPECIALTY=1]="SPECIALTY",e[e.DOCTOR=2]="DOCTOR",e[e.CLINIC=3]="CLINIC",e[e.SERVICE=4]="SERVICE"}(qe||(qe={}));var Qe=Object.freeze({__proto__:null,get RedirectType(){return qe}});exports.BookingSearchBar=({isMobile:s,careApiDomain:l,geoLocationPermission:r,geoLocationCoordinates:c,initialSelectedCity:d,initialSearchValue:u="",careFrontDomain:h="/care",isDebug:p=!1,askForGeolocationPermission:g=!1,gaTrackingSearchBar:f,gaTrackingLocationSearch:m,autoCompleteDisabled:y=!1,inputSearchPlaceholder:v="",isOptionAllLocation:E=!1,hideResults:L=[],isNavResultItem:k=!0,routerPush:T,onGeoLocationPermissionChange:R,onSearch:M,onChangeLocation:N})=>{const{t:A,locale:j}=n.useTranslations(),P=t.useRef(null),F=t.useRef(null),[_,D]=t.useState(void 0),{geoLocationPermission:B,geoLocationCoordinates:V,requestGeoLocation:$}=function(){const[e,a]=t.useState((()=>{if("undefined"==typeof window)return"unset";if(o.getCookie(i.USER_GEOLOCATION_COORDINATES_COOKIE))return"granted";const e=!location.protocol.includes("https")&&"localhost"!==location.hostname;return!navigator.geolocation||e?"denied":"unset"})),[n,s]=t.useState((()=>{if("undefined"==typeof window)return null;const e=o.getCookie(i.USER_GEOLOCATION_COORDINATES_COOKIE);if(e)try{return JSON.parse(e)}catch(e){console.log(e)}return null})),l=t.useCallback((function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition((e=>{const t={lat:""+Math.round(1e7*e.coords.latitude)/1e7,lng:""+Math.round(1e7*e.coords.longitude)/1e7};o.setCookie(i.USER_GEOLOCATION_COORDINATES_COOKIE,JSON.stringify(t),{minutes:15}),s(t),a("granted")}),(()=>{o.deleteCookie(i.USER_GEOLOCATION_COORDINATES_COOKIE),a("denied")}))}),[]);return t.useMemo((()=>({geoLocationPermission:e,geoLocationCoordinates:n,requestGeoLocation:l})),[e,n])}(),[z,K]=t.useReducer(ue,re,(e=>Object.assign(Object.assign({},e),{isDebug:p,isMobile:s,geoLocationPermission:r||B||"unset",geoLocationCoordinates:c||V||null,searchKeywords:u,initialSelectedCity:d||null,selectedLocation:d||e.selectedLocation||null,searchLocationKeywords:(null==d?void 0:d.name)||e.searchLocationKeywords,autoCompleteDisabled:y,inputSearchPlaceholder:v,locale:j}))),{navigateTo:Z,focused:G,isLoadingCities:U,cities:q,searchKeywords:Q,geoLocationPermission:W,selectedLocation:Y,initialSelectedCity:J,defaultCity:X,searchResults:te,isLoadingSearchResults:ae,isMobileModalOpened:ie,inputSearchPlaceholder:oe}=z,{fetchCitiesByLocation:ne,fetchCitiesByKeyword:de,fetchSearchResults:he}=function({dispatch:e,careApiDomain:i,locale:o="vi-VN"}){const n=t.useCallback((function(t,a={}){const n=`${i}${t}`;return e({type:ce.FetchCitiesStart}),fetch(Ue(n,a,o),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:ce.FetchCitiesFinish})))}),[o]);return{fetchCitiesByLocation:t.useCallback((function({coordinates:t}){let a={};const i={};t&&(a={lat:t.lat,lng:t.lng}),"ms-MY"===o&&(i.noPaging=1);const s=[n(Ge,Object.assign(Object.assign({},a),i))];return"zh-TW"===o&&s.push(n(Ke,{noPaging:1})),Promise.all(s).then((([t,a])=>{const i=Object.assign({},t);if(a){const e=i.cities.map((e=>e.id));i.cities=i.cities.concat(a.cities.filter((t=>!e.includes(t.id))))}e({type:ce.FetchCitiesByGeoIpComplete,payload:i})})).catch((e=>console.error("error loading cities by location",e)))}),[o,i,e]),fetchCitiesByKeyword:t.useCallback((function(t){return n(Ke,{keyword:t}).then((t=>{e({type:ce.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[o,i,e]),fetchSearchResults:t.useCallback((function(t,n){const s=`${i}${Ze}`;e({type:ce.FetchSearchResultsStart});const{defaultCity:l,selectedLocation:r,geoLocationCoordinates:c}=n;let d="";if(!r||!l)return void e({type:ce.FetchSearchResultsFinish});r.id===a.ID_OPTION_CURRENT_LOCATION?c||(d=l.id):d=r.id===a.ID_OPTION_ALL_LOCATION?"":r.id;const u=(null==c?void 0:c.lat)||"",h=(null==c?void 0:c.lng)||"";return fetch(Ue(s,{domain:i,searchType:"global",keyword:t.trim().length>le[o]?t.trim():"",city:d===a.ID_OPTION_CURRENT_LOCATION?"":d,lat:u,lng:h},o),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>e({type:ce.FetchSearchResultsComplete,payload:t}))).catch((e=>{console.log("error loading search results",{url:s,error:e})})).finally((()=>e({type:ce.FetchSearchResultsFinish})))}),[o,i,e])}}({dispatch:K,locale:j,careApiDomain:l}),pe=t.useMemo((()=>{var e;return{id:a.ID_OPTION_CURRENT_LOCATION,name:A("booking.searchBar.currentLocation"),slug:null===(e=a.LOCALIZED_SLUGS[j])||void 0===e?void 0:e.CURRENT}}),[A,j]),ge=t.useMemo((()=>b.default(de,400)),[de]),fe=t.useMemo((()=>b.default(he,400)),[he]);t.useEffect((()=>{""!==u&&u!==z.searchKeywords&&K({type:ce.UpdateInitialSearchValue,payload:u})}),[u]),t.useEffect((()=>{g&&(null==Y?void 0:Y.id)===a.ID_OPTION_CURRENT_LOCATION&&"unset"===W&&$()}),[g,Y,W]),t.useEffect((()=>{r||W===B||("granted"===B&&V?K({type:ce.GrantGeoLocationPermission,payload:V}):"denied"===B&&K({type:ce.DenyGeoLocationPermission}))}),[W,B,V,r]),t.useEffect((()=>{Z&&(T?T(Z):window.location.href=`${h}${Z}`)}),[Z]);const me=t.useCallback((function(){K({type:ce.SelectCurrentLocation,payload:pe})}),[A,K]);t.useEffect((()=>{"denied"===W||J||me(),R&&R(W,z.geoLocationCoordinates),s&&"granted"===W&&Y&&K({type:ce.FocusInputSearch}),ne({coordinates:z.geoLocationCoordinates})}),[W]),t.useEffect((()=>{Y&&X&&he(z.searchKeywords,z)}),[Y,X]),t.useEffect((()=>{v!==oe&&K({type:ce.SetInputSearchPlaceholder,payload:v})}),[v,oe]),t.useEffect((()=>{ie?document.body.classList.add("care-popup-open"):document.body.classList.remove("care-popup-open")}),[ie]);const Ce=t.useCallback((function(e){K({type:ce.SelectLocation,payload:e}),Le(),N&&N(e)}),[A,K]);function be(){s&&"granted"!==z.geoLocationPermission?$():(me(),Le())}function ye(){var e;P.current&&(null===(e=P.current.querySelector('input[name="search-location"]'))||void 0===e||e.focus())}function Le(){var e;P.current&&(null===(e=P.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}function we(){K({type:ce.CloseMobileModal})}function xe(){return"location"!==G?null:C.default.createElement(H,{isLoading:U,cities:q,onLocationClick:Ce,onCurrentLocationClick:be,isLocationLoading:U,geoLocationPermission:W,selectedLocation:Y,isOptionAllLocation:E})}function Se(){return"search"!==G?null:z.autoCompleteDisabled?s?C.default.createElement(ve,{onClick:()=>{M({cityId:z.selectedLocation.id,keyword:Q}),we()}}):null:C.default.createElement(ze,{data:te,state:z,dispatch:K,isMobile:!1,keyword:Q,isLoading:ae,hideResults:L,isNavResultItem:k})}function Oe(){return C.default.createElement(Ee,{isMobile:s,state:z,dispatch:K,debouncedFetchCitiesByKeyword:ge,debouncedFetchSearchResults:fe,focusLocationInput:ye,focusSearchInput:Le,renderLocationResults:xe,renderSearchResults:Se,trackingAttributes:f,locationTrackingAttributes:m,onSearch:M,initalSearchValue:u})}return t.useEffect((()=>{if(window.visualViewport){const e=e=>{const t=e.target;D(null==t?void 0:t.height)};return window.visualViewport.addEventListener("resize",e,{passive:!0}),()=>{window.visualViewport.removeEventListener("resize",e)}}}),[D]),s?C.default.createElement(C.default.Fragment,null,C.default.createElement(I,null),C.default.createElement(O,{ref:F}),C.default.createElement(x,{id:"booking-search-bar",ref:P,"data-is-modal":s&&ie,style:{"--mobile-care-searchbar-height":ie&&_?`${_}px`:"100%"}},ie?C.default.createElement(C.default.Fragment,null,C.default.createElement(S,null,C.default.createElement(se,{headingText:A("booking.searchBar.searchButton"),onLeftClick:we}),Oe()),xe(),Se()):C.default.createElement(ee,{onClick:function(){var t;return e.__awaiter(this,void 0,void 0,(function*(){F.current&&F.current.focus(),K({type:ce.OpenMobileModal}),yield Promise.resolve(),P.current&&(null===(t=P.current.querySelector('input[name="search-location"]'))||void 0===t||t.focus())}))},focused:G,value:Q,trackingAttributes:f,inputSearchPlaceholder:v}))):C.default.createElement(w,{id:"booking-search-bar",ref:P},Oe())},exports.types=Qe;
339
+ `,ze=({data:e,state:t,dispatch:a,isMobile:i,isLoading:o,keyword:n,hideResults:s,isNavResultItem:l})=>C.default.createElement($e,null,e&&e.map((e=>s&&s.includes(e.type)?C.default.createElement(C.default.Fragment,null):C.default.createElement(Ve,{type:e.type,state:t,dispatch:a,itemsToShow:2,itemsToShowDesktop:4,key:e.type,data:e.results,isMobile:i,isLoading:o,keyword:n,isNavResultItem:l})))),Ke="api/lists/cities?keyword={keyword}&country_id={countryId}&site={domain}&_nopaging={noPaging}",Ze="api/v2/search/?site={domain}&type={searchType}&keyword={keyword}&city_id={city}&latitude={lat}&longitude={lng}",Ge="api/geobyip?site={domain}&latitude={lat}&longitude={lng}&_nopaging={noPaging}",Ue=(e,t,a)=>L.default(e,Object.assign(Object.assign({},t),{domain:i.domainLocales[a||"en-PH"]}));var qe;!function(e){e[e.SPECIALTY=1]="SPECIALTY",e[e.DOCTOR=2]="DOCTOR",e[e.CLINIC=3]="CLINIC",e[e.SERVICE=4]="SERVICE"}(qe||(qe={}));var Qe=Object.freeze({__proto__:null,get RedirectType(){return qe}});exports.BookingSearchBar=({isMobile:s,careApiDomain:l,geoLocationPermission:r,geoLocationCoordinates:c,initialSelectedCity:d,initialSearchValue:u="",careFrontDomain:h="/care",isDebug:p=!1,askForGeolocationPermission:g=!1,gaTrackingSearchBar:f,gaTrackingLocationSearch:m,autoCompleteDisabled:y=!1,inputSearchPlaceholder:v="",isOptionAllLocation:E=!1,hideResults:L=[],isNavResultItem:k=!0,routerPush:T,onGeoLocationPermissionChange:R,onSearch:M,onChangeLocation:N})=>{const{t:A,locale:j}=n.useTranslations(),P=t.useRef(null),F=t.useRef(null),[_,D]=t.useState(void 0),[B,V]=t.useState(!1),{geoLocationPermission:$,geoLocationCoordinates:z,requestGeoLocation:K}=function(){const[e,a]=t.useState((()=>{if("undefined"==typeof window)return"unset";if(o.getCookie(i.USER_GEOLOCATION_COORDINATES_COOKIE))return"granted";const e=!location.protocol.includes("https")&&"localhost"!==location.hostname;return!navigator.geolocation||e?"denied":"unset"})),[n,s]=t.useState((()=>{if("undefined"==typeof window)return null;const e=o.getCookie(i.USER_GEOLOCATION_COORDINATES_COOKIE);if(e)try{return JSON.parse(e)}catch(e){console.log(e)}return null})),l=t.useCallback((function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition((e=>{const t={lat:""+Math.round(1e7*e.coords.latitude)/1e7,lng:""+Math.round(1e7*e.coords.longitude)/1e7};o.setCookie(i.USER_GEOLOCATION_COORDINATES_COOKIE,JSON.stringify(t),{minutes:15}),s(t),a("granted")}),(()=>{o.deleteCookie(i.USER_GEOLOCATION_COORDINATES_COOKIE),a("denied")}))}),[]);return t.useMemo((()=>({geoLocationPermission:e,geoLocationCoordinates:n,requestGeoLocation:l})),[e,n])}(),[Z,G]=t.useReducer(ue,re,(e=>Object.assign(Object.assign({},e),{isDebug:p,isMobile:s,geoLocationPermission:r||$||"unset",geoLocationCoordinates:c||z||null,searchKeywords:u,initialSelectedCity:d||null,selectedLocation:d||e.selectedLocation||null,searchLocationKeywords:(null==d?void 0:d.name)||e.searchLocationKeywords,autoCompleteDisabled:y,inputSearchPlaceholder:v,locale:j}))),{navigateTo:U,focused:q,isLoadingCities:Q,cities:Y,searchKeywords:W,geoLocationPermission:J,selectedLocation:X,initialSelectedCity:te,defaultCity:ae,searchResults:ie,isLoadingSearchResults:oe,isMobileModalOpened:ne,inputSearchPlaceholder:de}=Z,{fetchCitiesByLocation:he,fetchCitiesByKeyword:pe,fetchSearchResults:ge}=function({dispatch:e,careApiDomain:i,locale:o="vi-VN"}){const n=t.useCallback((function(t,a={}){const n=`${i}${t}`;return e({type:ce.FetchCitiesStart}),fetch(Ue(n,a,o),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:ce.FetchCitiesFinish})))}),[o]);return{fetchCitiesByLocation:t.useCallback((function({coordinates:t}){let a={};const i={};t&&(a={lat:t.lat,lng:t.lng}),"ms-MY"===o&&(i.noPaging=1);const s=[n(Ge,Object.assign(Object.assign({},a),i))];return"zh-TW"===o&&s.push(n(Ke,{noPaging:1})),Promise.all(s).then((([t,a])=>{const i=Object.assign({},t);if(a){const e=i.cities.map((e=>e.id));i.cities=i.cities.concat(a.cities.filter((t=>!e.includes(t.id))))}e({type:ce.FetchCitiesByGeoIpComplete,payload:i})})).catch((e=>console.error("error loading cities by location",e)))}),[o,i,e]),fetchCitiesByKeyword:t.useCallback((function(t){return n(Ke,{keyword:t}).then((t=>{e({type:ce.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[o,i,e]),fetchSearchResults:t.useCallback((function(t,n){const s=`${i}${Ze}`;e({type:ce.FetchSearchResultsStart});const{defaultCity:l,selectedLocation:r,geoLocationCoordinates:c}=n;let d="";if(!r||!l)return void e({type:ce.FetchSearchResultsFinish});r.id===a.ID_OPTION_CURRENT_LOCATION?c||(d=l.id):d=r.id===a.ID_OPTION_ALL_LOCATION?"":r.id;const u=(null==c?void 0:c.lat)||"",h=(null==c?void 0:c.lng)||"";return fetch(Ue(s,{domain:i,searchType:"global",keyword:t.trim().length>le[o]?t.trim():"",city:d===a.ID_OPTION_CURRENT_LOCATION?"":d,lat:u,lng:h},o),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>e({type:ce.FetchSearchResultsComplete,payload:t}))).catch((e=>{console.log("error loading search results",{url:s,error:e})})).finally((()=>e({type:ce.FetchSearchResultsFinish})))}),[o,i,e])}}({dispatch:G,locale:j,careApiDomain:l}),fe=t.useMemo((()=>{var e;return{id:a.ID_OPTION_CURRENT_LOCATION,name:A("booking.searchBar.currentLocation"),slug:null===(e=a.LOCALIZED_SLUGS[j])||void 0===e?void 0:e.CURRENT}}),[A,j]),me=t.useMemo((()=>b.default(pe,400)),[pe]),Ce=t.useMemo((()=>b.default(ge,400)),[ge]);t.useEffect((()=>{""!==u&&u!==Z.searchKeywords&&G({type:ce.UpdateInitialSearchValue,payload:u})}),[u]),t.useEffect((()=>{g&&(null==X?void 0:X.id)===a.ID_OPTION_CURRENT_LOCATION&&"unset"===J&&K()}),[g,X,J]),t.useEffect((()=>{r||J===$||("granted"===$&&z?G({type:ce.GrantGeoLocationPermission,payload:z}):"denied"===$&&G({type:ce.DenyGeoLocationPermission}))}),[J,$,z,r]),t.useEffect((()=>{U&&(T?T(U):window.location.href=`${h}${U}`)}),[U]);const be=t.useCallback((function(){G({type:ce.SelectCurrentLocation,payload:fe})}),[A,G]);t.useEffect((()=>{"denied"===J||te||be(),R&&R(J,Z.geoLocationCoordinates),s&&"granted"===J&&X&&G({type:ce.FocusInputSearch}),he({coordinates:Z.geoLocationCoordinates})}),[J]),t.useEffect((()=>{X&&ae&&ge(Z.searchKeywords,Z)}),[X,ae]),t.useEffect((()=>{v!==de&&G({type:ce.SetInputSearchPlaceholder,payload:v})}),[v,de]),t.useEffect((()=>{ne?document.body.classList.add("care-popup-open"):document.body.classList.remove("care-popup-open")}),[ne]);const ye=t.useCallback((function(e){"ms-MY"===j&&V(!0),G({type:ce.SelectLocation,payload:e}),xe(),N&&N(e)}),[A,G]);function Le(){"ms-MY"===j&&V(!0),s&&"granted"!==Z.geoLocationPermission?K():(be(),xe())}function we(){var e;P.current&&(null===(e=P.current.querySelector('input[name="search-location"]'))||void 0===e||e.focus())}function xe(){var e;P.current&&(null===(e=P.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}function Se(){G({type:ce.CloseMobileModal})}function Oe(){return"location"!==q?null:C.default.createElement(H,{isLoading:Q,cities:Y,onLocationClick:ye,onCurrentLocationClick:Le,isLocationLoading:Q,geoLocationPermission:J,selectedLocation:X,isOptionAllLocation:E})}function ke(){return"search"!==q?null:Z.autoCompleteDisabled?s?C.default.createElement(ve,{onClick:()=>{M({cityId:Z.selectedLocation.id,keyword:W}),Se()}}):null:C.default.createElement(ze,{data:ie,state:Z,dispatch:G,isMobile:!1,keyword:W,isLoading:oe,hideResults:L,isNavResultItem:k})}function Ie(){return C.default.createElement(Ee,{isMobile:s,state:Z,dispatch:G,debouncedFetchCitiesByKeyword:me,debouncedFetchSearchResults:Ce,focusLocationInput:we,focusSearchInput:xe,renderLocationResults:Oe,renderSearchResults:ke,trackingAttributes:f,locationTrackingAttributes:m,onSearch:M,initalSearchValue:u})}return t.useEffect((()=>{if(window.visualViewport){const e=e=>{const t=e.target;D(null==t?void 0:t.height)};return window.visualViewport.addEventListener("resize",e,{passive:!0}),()=>{window.visualViewport.removeEventListener("resize",e)}}}),[D]),t.useEffect((()=>{if(X&&B&&"ms-MY"===j){const e=`/${X.slug}/hospital`;G({type:ce.NavigateTo,payload:e}),V(!1)}}),[B,j,X]),s?C.default.createElement(C.default.Fragment,null,C.default.createElement(I,null),C.default.createElement(O,{ref:F}),C.default.createElement(x,{id:"booking-search-bar",ref:P,"data-is-modal":s&&ne,style:{"--mobile-care-searchbar-height":ne&&_?`${_}px`:"100%"}},ne?C.default.createElement(C.default.Fragment,null,C.default.createElement(S,null,C.default.createElement(se,{headingText:A("booking.searchBar.searchButton"),onLeftClick:Se}),Ie()),Oe(),ke()):C.default.createElement(ee,{onClick:function(){var t;return e.__awaiter(this,void 0,void 0,(function*(){F.current&&F.current.focus(),G({type:ce.OpenMobileModal}),yield Promise.resolve(),P.current&&(null===(t=P.current.querySelector('input[name="search-location"]'))||void 0===t||t.focus())}))},focused:q,value:W,trackingAttributes:f,inputSearchPlaceholder:v}))):C.default.createElement(w,{id:"booking-search-bar",ref:P},Ie())},exports.types=Qe;
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("./tslib.es6-6b1f019f.js"),t=require("react"),a=require("@mantine/core"),l=require("./index-97ca0dbc.js"),o=require("./useTranslations-ba3b3bff.js"),n=require("innertext"),i=require("./theme-c3319057.js"),r=require("./index.styles-fe252ee0.js"),s=require("./gAssets.js");require("@mantine/dates");var d=require("./index-a85233d1.js");require("./Onboarding-afb62ae6.js");var c=require("./index-1fcfee84.js"),u=require("dayjs");require("./screenSizeContext-f7e0bfbd.js");var m=require("styled-components"),p=require("./utils-acff35db.js");require("./isProduction-22794967.js"),require("./index-d5ab46ab.js"),require("@mantine/hooks");var g=require("./index.styled-962f8f10.js"),h=require("./index-49240e71.js"),f=require("./dataTransform-f3686487.js"),v=require("./index-ef731f98.js"),b=require("./index-ca836e0a.js"),x=require("lodash/debounce"),w=require("react-contenteditable"),y=require("./index-4c89bef7.js"),C=require("./cookieHelper-f129e711.js"),E=require("react-dom");require("./index-a3bde7c2.js"),require("./index-659bf3c7.js"),require("./index.styled-afe5ad9e.js"),require("./index-06a91ebf.js");var k=require("date-fns");require("react-day-picker/DayPickerInput"),require("./index-7b387e60.js"),require("lodash/throttle"),require("keen-slider/react"),require("./types-b7741a4a.js"),require("react-hook-form"),require("date-fns/locale/en-US"),require("date-fns/locale/id"),require("date-fns/locale/vi"),require("date-fns/locale/zh-TW"),require("./index.styled-7ad827c4.js"),require("uuid"),require("string-format");var A=require("dayjs/plugin/relativeTime"),N=require("./index-74c75c98.js"),T=require("./useUniqueId-b204c5a0.js");require("./translationsContext-7250bf86.js");var S=require("./routing-f2eac711.js");function P(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function L(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,l.get?l:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var M=L(t),I=P(t),B=P(n),R=P(u),z=P(m),j=P(x),F=P(w),O=L(E),D=P(A);const U=e=>M.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),M.createElement("path",{d:"M3.99403 3.32695C3.86141 3.32698 3.73181 3.36657 3.62181 3.44065C3.5118 3.51472 3.42638 3.61992 3.37648 3.7428C3.32658 3.86567 3.31445 4.00064 3.34165 4.13044C3.36885 4.26024 3.43415 4.37898 3.52919 4.47148L7.05784 8.00013L3.52919 11.5288C3.46521 11.5902 3.41413 11.6638 3.37894 11.7452C3.34375 11.8266 3.32516 11.9142 3.32425 12.0029C3.32335 12.0916 3.34015 12.1796 3.37368 12.2617C3.40721 12.3438 3.45678 12.4185 3.5195 12.4812C3.58222 12.5439 3.65682 12.5935 3.73894 12.627C3.82106 12.6605 3.90904 12.6773 3.99774 12.6764C4.08643 12.6755 4.17405 12.6569 4.25547 12.6217C4.33689 12.5865 4.41047 12.5355 4.4719 12.4715L8.00054 8.94283L11.5292 12.4715C11.5906 12.5355 11.6642 12.5865 11.7456 12.6217C11.827 12.6569 11.9147 12.6755 12.0034 12.6764C12.092 12.6773 12.18 12.6605 12.2621 12.627C12.3443 12.5935 12.4189 12.5439 12.4816 12.4812C12.5443 12.4185 12.5939 12.3439 12.6274 12.2617C12.6609 12.1796 12.6777 12.0916 12.6768 12.0029C12.6759 11.9142 12.6573 11.8266 12.6222 11.7452C12.587 11.6638 12.5359 11.5902 12.4719 11.5288L8.94325 8.00013L12.4719 4.47148C12.5682 4.37784 12.634 4.25728 12.6607 4.1256C12.6873 3.99392 12.6735 3.85726 12.6212 3.73354C12.5688 3.60982 12.4803 3.5048 12.3672 3.43224C12.2542 3.35969 12.1218 3.32299 11.9875 3.32695C11.8143 3.33211 11.6499 3.4045 11.5292 3.52877L8.00054 7.05742L4.4719 3.52877C4.40977 3.46491 4.33548 3.41415 4.2534 3.37948C4.17132 3.34482 4.08313 3.32696 3.99403 3.32695Z"})),V=t.createContext({}),_=({children:e,defaultParams:t})=>I.default.createElement(V.Provider,{value:{defaultParams:t}},e),H=e=>{const{data:{userInfo:a,env:{togetherBasePath:l}}}=t.useContext(g.TogetherComponentGlobalContext),{defaultParams:o}=t.useContext(V)||{},n=null==a?void 0:a.id,i=a&&"number"==typeof a.communities_interacted&&0===a.communities_interacted;return{authActionWrapper:(t,a)=>{const r=Object.assign(Object.assign(Object.assign({},o),e),a);if(!n||i){n||C.deleteCookie(g.BEARER_TOKEN_COOKIE),(null==r?void 0:r._joinCommunityIds)&&(localStorage.setItem("to_join_community_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_community_ids")||"[]")||[]).concat(r._joinCommunityIds).filter(Boolean))))),null==r||delete r._joinCommunityIds),(null==r?void 0:r._joinTopicIds)&&(localStorage.setItem("to_join_topic_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_topic_ids")||"[]")||[]).concat(r._joinTopicIds).filter(Boolean))))),null==r||delete r._joinTopicIds);const e=(null==r?void 0:r._location)||window.location.href;return null==r||delete r._location,window.location.href=g.getUrlToSignUp(e,r,l),null}return t&&t()},params:Object.assign(Object.assign({},o),e)}},W=z.default.div`
1
+ "use strict";var e=require("./tslib.es6-332bd1e5.js"),t=require("react"),a=require("@mantine/core"),l=require("./index-353ce5a9.js"),o=require("./useTranslations-ace1daae.js"),n=require("innertext"),i=require("./theme-03c7ebd1.js"),r=require("./index.styles-f72e2607.js"),s=require("./gAssets.js");require("@mantine/dates");var d=require("./index-bf5150a9.js");require("./Onboarding-449b6bc9.js");var c=require("./index-42c8cf00.js"),u=require("dayjs");require("./screenSizeContext-ca65259e.js");var m=require("styled-components"),p=require("./utils-d28a886b.js");require("./isProduction-5ac489ce.js"),require("./index-3c30b48f.js"),require("@mantine/hooks");var g=require("./index.styled-7c2fc0e1.js"),h=require("./index-0c291163.js"),f=require("./dataTransform-071b0571.js"),v=require("./index-e24b7b39.js"),b=require("./index-6b570bc4.js"),x=require("lodash/debounce"),w=require("react-contenteditable"),y=require("./index-8cfaca26.js"),C=require("./cookieHelper-d7295653.js"),E=require("react-dom");require("./index-7b2da16b.js"),require("./index-bca85720.js"),require("./index.styled-e1e238a6.js"),require("./index-edcaabeb.js");var k=require("date-fns");require("react-day-picker/DayPickerInput"),require("./index-b6e36676.js"),require("lodash/throttle"),require("keen-slider/react"),require("./types-dd88766f.js"),require("react-hook-form"),require("date-fns/locale/en-US"),require("date-fns/locale/id"),require("date-fns/locale/vi"),require("date-fns/locale/zh-TW"),require("./index.styled-ca257fb9.js"),require("uuid"),require("string-format");var A=require("dayjs/plugin/relativeTime"),N=require("./index-04a4f9a2.js"),T=require("./useUniqueId-942667d5.js");require("./translationsContext-8c63f332.js");var S=require("./routing-b1e6b269.js");function P(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function L(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,l.get?l:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var M=L(t),I=P(t),B=P(n),R=P(u),z=P(m),j=P(x),F=P(w),O=L(E),D=P(A);const U=e=>M.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),M.createElement("path",{d:"M3.99403 3.32695C3.86141 3.32698 3.73181 3.36657 3.62181 3.44065C3.5118 3.51472 3.42638 3.61992 3.37648 3.7428C3.32658 3.86567 3.31445 4.00064 3.34165 4.13044C3.36885 4.26024 3.43415 4.37898 3.52919 4.47148L7.05784 8.00013L3.52919 11.5288C3.46521 11.5902 3.41413 11.6638 3.37894 11.7452C3.34375 11.8266 3.32516 11.9142 3.32425 12.0029C3.32335 12.0916 3.34015 12.1796 3.37368 12.2617C3.40721 12.3438 3.45678 12.4185 3.5195 12.4812C3.58222 12.5439 3.65682 12.5935 3.73894 12.627C3.82106 12.6605 3.90904 12.6773 3.99774 12.6764C4.08643 12.6755 4.17405 12.6569 4.25547 12.6217C4.33689 12.5865 4.41047 12.5355 4.4719 12.4715L8.00054 8.94283L11.5292 12.4715C11.5906 12.5355 11.6642 12.5865 11.7456 12.6217C11.827 12.6569 11.9147 12.6755 12.0034 12.6764C12.092 12.6773 12.18 12.6605 12.2621 12.627C12.3443 12.5935 12.4189 12.5439 12.4816 12.4812C12.5443 12.4185 12.5939 12.3439 12.6274 12.2617C12.6609 12.1796 12.6777 12.0916 12.6768 12.0029C12.6759 11.9142 12.6573 11.8266 12.6222 11.7452C12.587 11.6638 12.5359 11.5902 12.4719 11.5288L8.94325 8.00013L12.4719 4.47148C12.5682 4.37784 12.634 4.25728 12.6607 4.1256C12.6873 3.99392 12.6735 3.85726 12.6212 3.73354C12.5688 3.60982 12.4803 3.5048 12.3672 3.43224C12.2542 3.35969 12.1218 3.32299 11.9875 3.32695C11.8143 3.33211 11.6499 3.4045 11.5292 3.52877L8.00054 7.05742L4.4719 3.52877C4.40977 3.46491 4.33548 3.41415 4.2534 3.37948C4.17132 3.34482 4.08313 3.32696 3.99403 3.32695Z"})),V=t.createContext({}),_=({children:e,defaultParams:t})=>I.default.createElement(V.Provider,{value:{defaultParams:t}},e),H=e=>{const{data:{userInfo:a,env:{togetherBasePath:l}}}=t.useContext(g.TogetherComponentGlobalContext),{defaultParams:o}=t.useContext(V)||{},n=null==a?void 0:a.id,i=a&&"number"==typeof a.communities_interacted&&0===a.communities_interacted;return{authActionWrapper:(t,a)=>{const r=Object.assign(Object.assign(Object.assign({},o),e),a);if(!n||i){n||C.deleteCookie(g.BEARER_TOKEN_COOKIE),(null==r?void 0:r._joinCommunityIds)&&(localStorage.setItem("to_join_community_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_community_ids")||"[]")||[]).concat(r._joinCommunityIds).filter(Boolean))))),null==r||delete r._joinCommunityIds),(null==r?void 0:r._joinTopicIds)&&(localStorage.setItem("to_join_topic_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_topic_ids")||"[]")||[]).concat(r._joinTopicIds).filter(Boolean))))),null==r||delete r._joinTopicIds);const e=(null==r?void 0:r._location)||window.location.href;return null==r||delete r._location,window.location.href=g.getUrlToSignUp(e,r,l),null}return t&&t()},params:Object.assign(Object.assign({},o),e)}},W=z.default.div`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  justify-content: center;
package/build/types.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Onboarding-afb62ae6.js");Object.defineProperty(exports,"BabyGrowthChartDuration",{enumerable:!0,get:function(){return e.BabyGrowthChartDuration}}),Object.defineProperty(exports,"BabyGrowthChartType",{enumerable:!0,get:function(){return e.BabyGrowthChartType}}),Object.defineProperty(exports,"BabyGrowthResultTab",{enumerable:!0,get:function(){return e.BabyGrowthResultTab}}),Object.defineProperty(exports,"Gender",{enumerable:!0,get:function(){return e.Gender}}),Object.defineProperty(exports,"LOCALE",{enumerable:!0,get:function(){return e.LOCALE}}),Object.defineProperty(exports,"OnboardingStep",{enumerable:!0,get:function(){return e.OnboardingStep}});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Onboarding-449b6bc9.js");Object.defineProperty(exports,"BabyGrowthChartDuration",{enumerable:!0,get:function(){return e.BabyGrowthChartDuration}}),Object.defineProperty(exports,"BabyGrowthChartType",{enumerable:!0,get:function(){return e.BabyGrowthChartType}}),Object.defineProperty(exports,"BabyGrowthResultTab",{enumerable:!0,get:function(){return e.BabyGrowthResultTab}}),Object.defineProperty(exports,"Gender",{enumerable:!0,get:function(){return e.Gender}}),Object.defineProperty(exports,"LOCALE",{enumerable:!0,get:function(){return e.LOCALE}}),Object.defineProperty(exports,"OnboardingStep",{enumerable:!0,get:function(){return e.OnboardingStep}});
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./tslib.es6-332bd1e5.js"),t=require("react"),a=require("./getDynamicHealthTool-e3a5fa07.js");exports.useHealthToolsCache=o=>{const[i,l]=t.useState([]);t.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){const e=yield a.getDynamicHealthToolWithCache(o);l(e)}))}),[a.getDynamicHealthToolWithCache,o]);const r=t.useCallback((e=>{var t;return(null===(t=i.find((t=>t.template===e)))||void 0===t?void 0:t.link)||""}),[i]);return{allTools:i,getHealthToolLink:r}};
@@ -1 +1 @@
1
- "use strict";var e=require("./tslib.es6-6b1f019f.js"),t=require("react"),r=require("./cookieHelper-f129e711.js"),n=require("./useUniqueId-b204c5a0.js");function i(e){const t=(new TextEncoder).encode(e.trim().toLowerCase());return crypto.subtle.digest("SHA-256",t).then((e=>Array.from(new Uint8Array(e)).map((e=>e.toString(16).padStart(2,"0"))).join("")))}exports.useFbDataLayer=n=>{const a=t.useRef("");t.useEffect((()=>(e.__awaiter(void 0,void 0,void 0,(function*(){var e,t,o,u,l;if(!a.current){let e=yield fetch("https://api.ipify.org").then((e=>e.text()));e||(e=yield fetch("https://icanhazip.com").then((e=>e.text()))),a.current=e}if(null===(t=null===(e=window.localStorage)||void 0===e?void 0:e.setItem)||void 0===t||t.call(e,"fbClientIp",JSON.stringify({client_ip_address:(null===(o=a.current)||void 0===o?void 0:o.replace("\n",""))||"",client_user_agent:navigator.userAgent||""})),null==n?void 0:n.id){const[e,t,a,o,c,s]=yield Promise.all([n.email?i(n.email):null,n.phone?i(n.phone):null,n.birthday?i(n.birthday.split("-").join("")):null,n.gender?"m":"f",n.city_name?i(n.city_name).then((e=>e.replace(/\s/g,""))):null,n.name?i(n.name):null]);r.getCookie("_fbc"),r.getCookie("_fbp");const d={user_id:n.id};s&&(d.fn=s),e&&(d.em=e),t&&(d.ph=t),a&&(d.db=a),c&&(d.ct=c),null===(l=null===(u=window.localStorage)||void 0===u?void 0:u.setItem)||void 0===l||l.call(u,"fbDataLayer_userInfo",JSON.stringify(d))}})),()=>{})),[n])},exports.usePrevious=e=>{const r=t.useRef(),i=t.useRef(e);return n.useInitialMount()||i.current===e||(r.current=i.current,i.current=e),r.current},exports.useRafState=e=>{const[r,n]=t.useState(e),i=t.useRef(0),a=t.useCallback((e=>{cancelAnimationFrame(i.current),i.current=requestAnimationFrame((()=>{n(e)}))}),[]);return t.useEffect((()=>()=>cancelAnimationFrame(i.current))),[r,a]};
1
+ "use strict";var e=require("./tslib.es6-332bd1e5.js"),t=require("react"),r=require("./cookieHelper-d7295653.js"),n=require("./useUniqueId-942667d5.js");function i(e){const t=(new TextEncoder).encode(e.trim().toLowerCase());return crypto.subtle.digest("SHA-256",t).then((e=>Array.from(new Uint8Array(e)).map((e=>e.toString(16).padStart(2,"0"))).join("")))}exports.useFbDataLayer=n=>{const o=t.useRef("");t.useEffect((()=>(e.__awaiter(void 0,void 0,void 0,(function*(){var e,t,a,u,l;if(!o.current){let e=yield fetch("https://api.ipify.org").then((e=>e.text()));e||(e=yield fetch("https://icanhazip.com").then((e=>e.text()))),o.current=e}if(null===(t=null===(e=window.localStorage)||void 0===e?void 0:e.setItem)||void 0===t||t.call(e,"fbClientIp",JSON.stringify({client_ip_address:(null===(a=o.current)||void 0===a?void 0:a.replace("\n",""))||"",client_user_agent:navigator.userAgent||""})),null==n?void 0:n.id){const[e,t,o,a,s,c]=yield Promise.all([n.email?i(n.email):null,n.phone?i(n.phone):null,n.birthday?i(n.birthday.split("-").join("")):null,n.gender?"m":"f",n.city_name?i(n.city_name).then((e=>e.replace(/\s/g,""))):null,n.name?i(n.name):null]);r.getCookie("_fbc"),r.getCookie("_fbp");const d={user_id:n.id};c&&(d.fn=c),e&&(d.em=e),t&&(d.ph=t),o&&(d.db=o),s&&(d.ct=s),null===(l=null===(u=window.localStorage)||void 0===u?void 0:u.setItem)||void 0===l||l.call(u,"fbDataLayer_userInfo",JSON.stringify(d))}})),()=>{})),[n])},exports.usePrevious=e=>{const r=t.useRef(),i=t.useRef(e);return n.useInitialMount()||i.current===e||(r.current=i.current,i.current=e),r.current},exports.useRafState=e=>{const[r,n]=t.useState(e),i=t.useRef(0),o=t.useCallback((e=>{cancelAnimationFrame(i.current),i.current=requestAnimationFrame((()=>{n(e)}))}),[]);return t.useEffect((()=>()=>cancelAnimationFrame(i.current))),[r,o]};
@@ -1 +1 @@
1
- "use strict";var e=require("react"),t=require("./translationsContext-7250bf86.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=a(require("string-format"));exports.useTranslations=function(){const{values:a,locale:o}=e.useContext(t.TranslationsContext)||{locale:"en-PH"};return e.useMemo((()=>({t:(e,r)=>a?a[e]?r?n.default(a[e]||e,r):a[e]||e:(console.warn(`[useTranslations] Missing translation for key ${e} and locale ${o}`),r?n.default(t.defaultTranslations[e]||e,r):t.defaultTranslations[e]||e):(console.error("[useTranslations] t method called before translation values are loaded"),e),locale:o})),[a,o])};
1
+ "use strict";var e=require("react"),t=require("./translationsContext-8c63f332.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=a(require("string-format"));exports.useTranslations=function(){const{values:a,locale:o}=e.useContext(t.TranslationsContext)||{locale:"en-PH"};return e.useMemo((()=>({t:(e,r)=>a?a[e]?r?n.default(a[e]||e,r):a[e]||e:(console.warn(`[useTranslations] Missing translation for key ${e} and locale ${o}`),r?n.default(t.defaultTranslations[e]||e,r):t.defaultTranslations[e]||e):(console.error("[useTranslations] t method called before translation values are loaded"),e),locale:o})),[a,o])};
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("./tslib.es6-6b1f019f.js"),r=require("react"),t=require("@mantine/core"),i=require("./index-659bf3c7.js");require("./gAssets.js"),require("@mantine/dates");var n=require("./index-a85233d1.js"),a=require("./Onboarding-afb62ae6.js"),o=require("./index-1fcfee84.js");require("./index.styles-fe252ee0.js"),require("dayjs"),require("./screenSizeContext-f7e0bfbd.js");var s=require("styled-components"),d=require("./theme-c3319057.js"),l=require("./utils-acff35db.js");require("./isProduction-22794967.js"),require("./translationsContext-7250bf86.js"),require("string-format"),require("./index-d5ab46ab.js"),require("@mantine/hooks");var c=require("@mantine/form");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=m(r),p=m(s);const g=r.createContext({}),[f,x,h]=c.createFormContext(),b=p.default.div`
1
+ "use strict";var e=require("./tslib.es6-332bd1e5.js"),r=require("react"),t=require("@mantine/core"),i=require("./index-bca85720.js");require("./gAssets.js"),require("@mantine/dates");var n=require("./index-bf5150a9.js"),a=require("./Onboarding-449b6bc9.js"),o=require("./index-42c8cf00.js");require("./index.styles-f72e2607.js"),require("dayjs"),require("./screenSizeContext-ca65259e.js");var s=require("styled-components"),c=require("./theme-03c7ebd1.js"),l=require("./utils-d28a886b.js");require("./isProduction-5ac489ce.js"),require("./translationsContext-8c63f332.js"),require("string-format"),require("./index-3c30b48f.js"),require("@mantine/hooks");var d=require("@mantine/form");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=m(r),p=m(s);const g=r.createContext({}),[x,f,h]=d.createFormContext(),b=p.default.div`
2
2
  margin-top: 70px;
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -50,4 +50,4 @@
50
50
  }
51
51
  `,E=p.default.img`
52
52
  margin-bottom: 38px;
53
- `,C={[a.LOCALE.Vietnam]:"VN",[a.LOCALE.Cambodia]:"KH",[a.LOCALE.Indonesia]:"ID",[a.LOCALE.Malaysia]:"MY",[a.LOCALE.PhilippinesEnglish]:"PH",[a.LOCALE.PhilippinesTagalog]:"PH",[a.LOCALE.Taiwan]:"TW",[a.LOCALE.Thailand]:"TH",[a.LOCALE.Myanmar]:"MM"};exports.FormProvider=f,exports.MAPPED_LOCALE=C,exports.Onboarding=a=>{var s,{heading:l,description:c,children:m,className:p,imgSrc:f,hiddenLogo:x=!1}=a,h=e.__rest(a,["heading","description","children","className","imgSrc","hiddenLogo"]);const{isMarryBaby:C,siteType:q}=r.useContext(g);return u.default.createElement(L,Object.assign({},h,{className:`hhg-comp-onboarding-container ${p}`,size:"sm"}),!x&&u.default.createElement(i.LogoIcon,{type:C?q:(null===(s=n.LOCALE_SPECS[process.env.UNIFY_LOCALE])||void 0===s?void 0:s.LOGO_TYPE)||"hellobacsi"}),u.default.createElement(b,{className:x?"similac":""},f&&u.default.createElement(E,{src:f,loading:"lazy"}),u.default.createElement("div",{className:"header"},u.default.createElement(t.Title,{order:3},l),u.default.createElement(o.Text,{size:"p3",mt:8,color:d.theme.colors.gray600},c)),m))},exports.OnboardingContext=g,exports.hiddenEmailChar=(e="")=>{const r=e.indexOf("@"),t=e.substring(0,r),i=t.length>3?3:t.length;return e.replace(e.substring(i,r),e.slice(i,r).replace(/./g,"x"))},exports.useForm=h,exports.useFormContext=x;
53
+ `,C={[a.LOCALE.Vietnam]:"VN",[a.LOCALE.Cambodia]:"KH",[a.LOCALE.Indonesia]:"ID",[a.LOCALE.Malaysia]:"MY",[a.LOCALE.PhilippinesEnglish]:"PH",[a.LOCALE.PhilippinesTagalog]:"PH",[a.LOCALE.Taiwan]:"TW",[a.LOCALE.Thailand]:"TH",[a.LOCALE.Myanmar]:"MM"};exports.FormProvider=x,exports.MAPPED_LOCALE=C,exports.Onboarding=a=>{var s,{heading:l,description:d,children:m,className:p,imgSrc:x,hiddenLogo:f=!1}=a,h=e.__rest(a,["heading","description","children","className","imgSrc","hiddenLogo"]);const{isMarryBaby:C,siteType:q}=r.useContext(g);return u.default.createElement(L,Object.assign({},h,{className:`hhg-comp-onboarding-container ${p}`,size:"sm"}),!f&&u.default.createElement(i.LogoIcon,{type:C?q:(null===(s=n.LOCALE_SPECS[process.env.UNIFY_LOCALE])||void 0===s?void 0:s.LOGO_TYPE)||"hellobacsi"}),u.default.createElement(b,{className:f?"similac":""},x&&u.default.createElement(E,{src:x,loading:"lazy"}),u.default.createElement("div",{className:"header"},u.default.createElement(t.Title,{order:3},l),u.default.createElement(o.Text,{size:"p3",mt:8,color:c.theme.colors.gray600},d)),m))},exports.OnboardingContext=g,exports.hiddenEmailChar=(e="")=>{const r=e.indexOf("@"),t=e.substring(0,r),i=t.length>3?3:t.length;return e.replace(e.substring(i,r),e.slice(i,r).replace(/./g,"x"))},exports.useForm=h,exports.useFormContext=f;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./tslib.es6-6b1f019f.js"),t=require("react"),a=require("@mantine/core");require("./gAssets.js"),require("@mantine/dates"),require("./index-a85233d1.js");var l=require("./Onboarding-afb62ae6.js"),n=require("./index-1fcfee84.js"),r=require("dayjs");require("./screenSizeContext-f7e0bfbd.js");var i=require("styled-components"),o=require("./theme-c3319057.js"),c=require("./utils-acff35db.js");require("./isProduction-22794967.js");var s=require("./useTranslations-ba3b3bff.js");require("./index-d5ab46ab.js");var d=require("@mantine/hooks");require("lodash/debounce");var u=require("./index.styles-fe252ee0.js"),m=require("./index-7eeeee7a.js");require("./translationsContext-7250bf86.js"),require("string-format"),require("./index-a3bde7c2.js"),require("./index-659bf3c7.js"),require("./index.styled-afe5ad9e.js"),require("./index-06a91ebf.js");var f=require("./index-74c75c98.js"),C=require("@mantine/form"),p=require("dayjs/plugin/customParseFormat"),g=require("./index-a6b81ed3.js");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("date-fns/locale"),require("@mantine/carousel"),require("lodash/throttle"),require("./index-ef731f98.js"),require("./useUniqueId-b204c5a0.js");var b=h(t),x=h(r),E=h(i),v=h(p);const y=E.default.div`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./tslib.es6-332bd1e5.js"),t=require("react"),a=require("@mantine/core");require("./gAssets.js"),require("@mantine/dates"),require("./index-bf5150a9.js");var l=require("./Onboarding-449b6bc9.js"),n=require("./index-42c8cf00.js"),r=require("dayjs");require("./screenSizeContext-ca65259e.js");var i=require("styled-components"),o=require("./theme-03c7ebd1.js"),c=require("./utils-d28a886b.js");require("./isProduction-5ac489ce.js");var s=require("./useTranslations-ace1daae.js");require("./index-3c30b48f.js");var d=require("@mantine/hooks");require("lodash/debounce");var u=require("./index.styles-f72e2607.js"),m=require("./index-a2f7898a.js");require("./translationsContext-8c63f332.js"),require("string-format"),require("./index-7b2da16b.js"),require("./index-bca85720.js"),require("./index.styled-e1e238a6.js"),require("./index-edcaabeb.js");var f=require("./index-04a4f9a2.js"),C=require("@mantine/form"),p=require("dayjs/plugin/customParseFormat"),g=require("./index-f237998a.js");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("date-fns/locale"),require("@mantine/carousel"),require("lodash/throttle"),require("./index-e24b7b39.js"),require("./useUniqueId-942667d5.js");var b=h(t),x=h(r),E=h(i),v=h(p);const y=E.default.div`
2
2
  position: relative;
3
3
  padding: 16px;
4
4
  min-height: 110px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hhgtech/hhg-components",
3
- "version": "1.27.2",
3
+ "version": "1.27.4",
4
4
  "main": "build/index.js",
5
5
  "module": "build/esm/index.js",
6
6
  "files": [
@@ -1 +0,0 @@
1
- import{_ as e}from"./tslib.es6-92c43f45.js";import t from"react";import{Image as r}from"@mantine/core";import{DatePickerInput as o}from"@mantine/dates";import{I as s}from"./index-d7dd0b6f.js";import{L as a}from"./Onboarding-239aba3c.js";import{CommonGAssets as i}from"./gAssets.js";import{m as n}from"./index-e8d2cf42.js";const l=l=>{var m,{value:c,fullWidth:d=!0}=l,p=e(l,["value","fullWidth"]);return t.createElement(o,Object.assign({locale:n[process.env.UNIFY_LOCALE||a.Vietnam],valueFormat:null===(m=s[process.env.UNIFY_LOCALE||a.Vietnam])||void 0===m?void 0:m.dateFormat,size:"md",clearable:!1,popoverProps:d?{styles:{dropdown:{minWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"}}}:{},styles:{root:{position:"relative"},rightSection:{pointerEvents:"none",cursor:"default"}},rightSection:t.createElement(r,{src:i.getAssetPath(p.isMB?"MB-calendar.svg":"OutlineCalendar.svg"),width:16,height:16}),value:c},p,{className:`input-control ${(null==p?void 0:p.className)||""}`}))};export{l as D};
@@ -1 +0,0 @@
1
- import e,{useState as t,useRef as a,useEffect as o}from"react";import{u as c}from"./useTranslations-7bfb0943.js";import{t as d}from"./theme-71bbf201.js";import{L as l,I as r}from"./index.styles-78397fce.js";import{I as s}from"./index-a5f223f1.js";import{M as n}from"./index-63547109.js";import{T as m}from"./index-f2cd7b8d.js";import{u as i}from"./useScrollbarSize-c3099c86.js";import{createPortal as h}from"react-dom";import{S as p,a as u,b as y}from"./index-46a8e50c.js";const b=({isActive:t,onChange:a,value:o="",onInputChange:i,siteType:h})=>{const{t:p}=c(),u="marryBaby"===h;return e.createElement(l,{onClick:()=>a("new"),"data-is-mb":u,"data-isActive":u&&t},"marryBaby"===h?e.createElement("div",{className:"title"},e.createElement(n,{type:"bodytext-1",color:d.colors.gray800},p("chooseBaby.new")),e.createElement("div",{className:t?"radio active":"radio"},t&&e.createElement(r.CheckActiveMB,{size:26}))):e.createElement("div",{className:"title"},e.createElement(m,{size:"p2",color:d.colors.gray800},p("chooseBaby.new")),e.createElement("div",{className:t?"radio active":"radio"})),e.createElement(s,{name:"name",value:o,size:"md",placeholder:p("chooseBaby.placeholder"),type:"text",onChange:i}))},v="hhg-modals",f=()=>{document.querySelectorAll('.hhg-modal[data-open="true"]').length<1&&document.body.classList.remove("hhc-modal-show")},g=()=>{document.querySelectorAll('.hhg-modal[data-open="true"]').length<1&&(document.body.style.overflow="",document.body.style.paddingRight="",document.body.classList.remove("hhc-disabled-scroll"))},E=({type:c="lead",closeIcon:d,isOpen:l=!0,onClose:r,children:s,className:n="",animationType:m="slideTop",isStaticBackdrop:b=!1,siteType:E})=>{const[C,N]=t(!1),_=a(null),{width:j}=i();if(!_.current&&C&&(_.current=document.createElement("div")),o((()=>(N(!0),()=>{N(!1),f(),g()})),[]),o((()=>{if(C){const e=(()=>{let e=document.getElementById(v);return e||(e=document.createElement("div"),e.setAttribute("id",v),document.body.append(e)),e})();return e.appendChild(_.current),()=>{e.removeChild(_.current)}}}),[C]),o((()=>{l?document.body.classList.add("hhc-modal-show"):f()}),[l]),o((()=>{l?(document.body.style.overflow="hidden",document.body.style.paddingRight=j+"px",document.body.classList.add("hhc-disabled-scroll")):g()}),[l,j]),!C)return null;const w=["hhg-modal__wrapper",n,m].filter((e=>e)).join(" ");return h(e.createElement(p,{className:w,"data-open":l,"data-type":c},!b&&e.createElement(u,{"data-open":l,onClick:r,"data-type":c}),!b&&"video"===c&&!!d&&e.createElement("div",{className:"hhg-modal__close",onClick:r},d),e.createElement(y,{className:"hhg-modal","data-open":l,"data-site-type":E},e.createElement("div",{className:"video"===c?"hhg-modal__video":"hhg-modal__content"},!!d&&"video"!==c&&e.createElement("div",{className:"hhg-modal__close",onClick:r},d),s))),_.current)};export{E as M,b as N};
@@ -1 +0,0 @@
1
- import{_ as t}from"./tslib.es6-92c43f45.js";import o from"react";import{Indicator as s}from"@mantine/core";import"dayjs";import"./screenSizeContext-1656f461.js";import"styled-components";import{t as r}from"./theme-71bbf201.js";import"./index-d7dd0b6f.js";import"./utils-53912db7.js";import"./isProduction-ae321791.js";import"./Onboarding-239aba3c.js";import"./gAssets.js";const e=e=>{var{styles:i,color:n=r.colors.red700}=e,m=t(e,["styles","color"]);return o.createElement(s,Object.assign({inline:!0,position:"top-end",offset:4,styles:Object.assign({processing:{animationDirection:"alternate"}},i),color:n},m))};export{e as I};
@@ -1 +0,0 @@
1
- "use strict";var e=require("./tslib.es6-6b1f019f.js"),r=require("react"),t=require("@mantine/core");require("dayjs"),require("./screenSizeContext-f7e0bfbd.js"),require("styled-components");var s=require("./theme-c3319057.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("./index-a85233d1.js"),require("./utils-acff35db.js"),require("./isProduction-22794967.js"),require("./Onboarding-afb62ae6.js"),require("./gAssets.js");var n=i(r);exports.Indicator=r=>{var{styles:i,color:o=s.theme.colors.red700}=r,a=e.__rest(r,["styles","color"]);return n.default.createElement(t.Indicator,Object.assign({inline:!0,position:"top-end",offset:4,styles:Object.assign({processing:{animationDirection:"alternate"}},i),color:o},a))};
@@ -1 +0,0 @@
1
- "use strict";var e=require("react"),r=require("./index.styles-fe252ee0.js"),t=require("./tslib.es6-6b1f019f.js"),a=require("./useTranslations-ba3b3bff.js"),s=require("./index-1fcfee84.js"),n=require("@mantine/core");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=l(e);const c={admin:"cardAuthor.admin",moderator:"cardAuthor.moderator",ambassador:"cardAuthor.ambassador",expert:"cardAuthor.expert",sponsor:"cardAuthor.sponsor",guide:"cardAuthor.guide",influencer:"cardAuthor.influencer"};var o="Dudns9-";exports.AuthorBadge=e=>{var{siteType:s,role:n,title:l,styles:o,className:i}=e,d=t.__rest(e,["siteType","role","title","styles","className"]);const{t:f}=a.useTranslations(),m=n?(e=>["admin","moderator","ambassador","expert","sponsor","guide","influencer"].find((r=>r===e)))(n):"",{classes:v,cx:y}=r.useStyles(void 0,{name:"AuthorBadge",styles:o});return m&&c[m]?u.default.createElement("div",Object.assign({className:y(v.root,i),"data-label-type":m,"data-is-marrybaby":"marryBaby"===s},d),l||f(c[m])):null},exports.BtnChoice=({value:r,choices:t,onChange:a})=>{const[n,l]=e.useState(r);return e.useEffect((()=>{l(r)}),[r]),u.default.createElement("div",{className:o},t.map(((e,r)=>u.default.createElement(s.Button,{dataEventCategory:e.dataEventCategory,dataEventAction:e.dataEventAction,dataEventLabel:e.dataEventLabel,size:"sm",variant:e.value===n?"primary":"tertiary",key:r,onClick:()=>{l(e.value),null==a||a(e.value)}},e.label||""))))},exports.Divider=({type:e="solid",className:t,style:a})=>u.default.createElement(r.StyledDivider,{style:a,className:t,"data-diver-type":e,dividerType:e}),exports.ImageWithHandler=r=>{var{fallbackSrc:a}=r,s=t.__rest(r,["fallbackSrc"]);const{other:l}=n.useMantineTheme(),c=e.useRef(null),o=a||l.defaultImage,i=s.src||o||"",d=e.useRef(!1);e.useEffect((()=>{i!==o&&c.current&&(c.current.src=i)}),[]),e.useEffect((()=>{d.current=!1}),[i]);return u.default.createElement("img",Object.assign({ref:c},s,{src:i,onError:e=>{var r;d.current||(e.currentTarget.src=o||"",d.current=!0),null===(r=s.onError)||void 0===r||r.call(s,e)}}))};
@@ -1,50 +0,0 @@
1
- "use strict";var e=require("./tslib.es6-6b1f019f.js"),t=require("react"),n=require("./Onboarding-afb62ae6.js"),r=require("./gAssets.js"),a=require("./theme-c3319057.js"),o=require("styled-components"),i=require("./index-ef731f98.js"),l=require("./index-d5ab46ab.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=s(t),c=s(o);const u=c.default.div`
2
- display: inline-flex;
3
- overflow: hidden;
4
- width: ${e=>e.size}px;
5
- height: ${e=>e.size}px;
6
- box-sizing: border-box;
7
- align-items: center;
8
- justify-content: center;
9
-
10
- border: 1px solid #e4e8ec;
11
- background-color: ${e=>e.backgroundColor||a.theme.colors.white};
12
- border-radius: ${e=>e.borderRadius||"50%"};
13
- & > * {
14
- width: ${e=>e.iconSize}px;
15
- height: ${e=>e.iconSize}px;
16
- }
17
- `,p=c.default.div`
18
- display: inline-block;
19
- height: 108px;
20
- background-color: ${e=>e.theme.colors.white};
21
- border-radius: 60px;
22
- cursor: pointer;
23
- &.selected-week-pill {
24
- background-color: ${e=>e.theme.colors.pink100};
25
- }
26
-
27
- & > div:first-child {
28
- margin: 4px 4px 0;
29
- }
30
-
31
- & > p {
32
- margin-top: 8px;
33
- text-align: center;
34
- }
35
-
36
- & > * {
37
- pointer-events: none;
38
- }
39
- `,b=[n.LOCALE.Myanmar,n.LOCALE.Taiwan],g=c.default((n=>{var{icon:o,name:l,className:s,locale:c="en-PH",dataEventCategory:g,dataEventAction:x,dataEventLabel:m,onSelect:f}=n,h=e.__rest(n,["icon","name","className","locale","dataEventCategory","dataEventAction","dataEventLabel","onSelect"]);const v=t.useMemo((()=>null==s?void 0:s.includes("selected-week-pill")),[s]);return d.default.createElement(p,Object.assign({onClick:f,className:s?"week-pill".concat(" non-pointer-event-child ",s):"week-pill non-pointer-event-child","data-event-category":g,"data-event-action":x,"data-event-label":m},h),d.default.createElement(u,{size:64,iconSize:40,backgroundColor:a.theme.colors.white},d.default.createElement("img",{src:o||r.CommonGAssets.getAssetPath("week_default.png"),alt:""})),v?d.default.createElement(i.Text,Object.assign({type:"semiBold",size:"n1",color:a.theme.colors.gray800},b.includes(c)&&{style:{fontSize:"10px"}}),l):d.default.createElement(i.Text,Object.assign({size:"n1",color:a.theme.colors.gray600},b.includes(c)&&{style:{fontSize:"10px"}}),l))}))`
40
- box-shadow: 0px 0px 24px rgba(0, 0, 0, 0.08);
41
- `,x=c.default(l.CentralCarousel.Slide)`
42
- cursor: pointer;
43
- > div * {
44
- pointer-events: none;
45
- }
46
- `,m=c.default(l.CentralCarousel)`
47
- .centerred-pill-wrapper {
48
- padding: 16px 0;
49
- }
50
- `;exports.StyledCarousel=m,exports.StyledPill=g,exports.StyledSlide=x;
@@ -1 +0,0 @@
1
- "use strict";var e=require("./tslib.es6-6b1f019f.js"),t=require("react"),o=require("./getDynamicHealthTool-b08b42c7.js");exports.useHealthToolsCache=a=>{const[i,l]=t.useState([]);t.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){const e=yield o.getDynamicHealthToolWithCache(a);l(e)}))}),[o.getDynamicHealthToolWithCache,a]);const r=t.useCallback((e=>{var t;return(null===(t=i.find((t=>t.template===e)))||void 0===t?void 0:t.link)||""}),[i]);return{allTools:i,getHealthToolLink:r}};