@alfadocs/ui-kit 0.31.0 → 0.31.3

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 (291) hide show
  1. package/dist/_chunks/{accordion-CNcodXuO.js → accordion-bSU21uTV.js} +3 -3
  2. package/dist/_chunks/{agenda-card-DO9_yogb.js → agenda-card-UJA6Arbs.js} +3 -3
  3. package/dist/_chunks/{agenda-tray-WLbfMip6.js → agenda-tray-1fAxNOMz.js} +4 -4
  4. package/dist/_chunks/{ai-prompt-input-BXlwNnWe.js → ai-prompt-input-C6sCr1Vi.js} +11 -10
  5. package/dist/_chunks/{alia-sidebar-C-232sD7.js → alia-sidebar-BEoMl6UL.js} +9 -9
  6. package/dist/_chunks/ar-CEpIJtcO.js +399 -0
  7. package/dist/_chunks/{audio-recorder-DL800PE_.js → audio-recorder-C1rhKhSN.js} +114 -114
  8. package/dist/_chunks/audio-visualiser-l6zPd0AG.js +162 -0
  9. package/dist/_chunks/{autocomplete-CUh0f7Dj.js → autocomplete-DIgdhCGJ.js} +2 -2
  10. package/dist/_chunks/{avatar-D_H4emLo.js → avatar-BNQNhoyL.js} +19 -18
  11. package/dist/_chunks/{badge-CIjQ1Us1.js → badge-CptERaHx.js} +2 -2
  12. package/dist/_chunks/{booking-Bhk9IYm3.js → booking-A4o9xI2n.js} +160 -149
  13. package/dist/_chunks/{breadcrumb--YI7lcHA.js → breadcrumb-CLlhx7qo.js} +2 -2
  14. package/dist/_chunks/{button-group-Bh2g_Ng-.js → button-group-Ciq6J4IW.js} +15 -14
  15. package/dist/_chunks/{calendar-WWNx448i.js → calendar-YHFknAGv.js} +22 -22
  16. package/dist/_chunks/{carousel.agent-C2Icc9_T.js → carousel.agent-DrX96W-1.js} +2 -2
  17. package/dist/_chunks/{chart-BLvFl169.js → chart-DLkVn_ex.js} +2 -2
  18. package/dist/_chunks/{chat-container-izziXViv.js → chat-container-ogB4OskO.js} +24 -23
  19. package/dist/_chunks/{chat-input-cyl_y9bh.js → chat-input-CQe7nR_v.js} +132 -118
  20. package/dist/_chunks/{chat-message-fg221-yx.js → chat-message-D53_fH2w.js} +2 -2
  21. package/dist/_chunks/{checkbox-Dgp_cfUr.js → checkbox-DRcOdmXv.js} +3 -3
  22. package/dist/_chunks/{checkbox-group-eVowqKcT.js → checkbox-group-CpUwlHug.js} +3 -3
  23. package/dist/_chunks/{collapsible-hHiyZp0b.js → collapsible-CERONory.js} +2 -2
  24. package/dist/_chunks/{color-picker-Bm-gzpsh.js → color-picker-9tL7pz5y.js} +192 -181
  25. package/dist/_chunks/{combobox-Da9eq00i.js → combobox-BC-DFx8G.js} +31 -30
  26. package/dist/_chunks/{command-palette-11BieSNq.js → command-palette-BiPAAno-.js} +125 -123
  27. package/dist/_chunks/{copy-field-BAF4mt9h.js → copy-field-CCq7j6Zc.js} +2 -2
  28. package/dist/_chunks/{date-picker-D0Ry1dMz.js → date-picker-B94HAV4A.js} +4 -4
  29. package/dist/_chunks/{date-range-picker-DYgHzMOo.js → date-range-picker-D4dgDlLU.js} +73 -73
  30. package/dist/_chunks/{date-time-picker-CGmGtcyc.js → date-time-picker-D1GEzf8p.js} +5 -5
  31. package/dist/_chunks/de-Dfbeau59.js +477 -0
  32. package/dist/_chunks/{description-list-CWjnaDGn.js → description-list-BEbK2g93.js} +2 -2
  33. package/dist/_chunks/{dialog-C-lTGVkB.js → dialog-Cee13rHU.js} +3 -3
  34. package/dist/_chunks/{dropdown-menu-DZxwF23X.js → dropdown-menu-BC5ZdOMo.js} +3 -3
  35. package/dist/_chunks/{editable-currency-cell-renderer-Od3Q-Y8J.js → editable-currency-cell-renderer-BpicmolK.js} +314 -317
  36. package/dist/_chunks/el-Dro3J7CP.js +373 -0
  37. package/dist/_chunks/{email-input-DvJ_kPKL.js → email-input-lQivsFrw.js} +3 -3
  38. package/dist/_chunks/es-Dvg8u70B.js +373 -0
  39. package/dist/_chunks/{file-upload-DxAQprcU.js → file-upload-CdozCPct.js} +226 -233
  40. package/dist/_chunks/fr-VOGjBSPP.js +338 -0
  41. package/dist/_chunks/{freemium-paywall-B9c8Ylww.js → freemium-paywall-D1N02Oam.js} +4 -4
  42. package/dist/_chunks/{header-DDj7uGD-.js → header-CTZWX-tm.js} +2 -2
  43. package/dist/_chunks/hi-BSDxWU_y.js +433 -0
  44. package/dist/_chunks/{icon-button-DPEqBKBQ.js → icon-button-CKEOrN37.js} +2 -2
  45. package/dist/_chunks/{icon-button-group-DeV3FpNY.js → icon-button-group-C48khLE0.js} +23 -22
  46. package/dist/_chunks/{isSameDay-DHG8Xade.js → isSameDay-DUEiAT0G.js} +2 -2
  47. package/dist/_chunks/isSameWeek-Dfzu29cW.js +14 -0
  48. package/dist/_chunks/it-CuonvcI_.js +401 -0
  49. package/dist/_chunks/ja-DO57gIOT.js +366 -0
  50. package/dist/_chunks/{key-value-pair-BvDY3zuc.js → key-value-pair-C8DaR3Xs.js} +2 -2
  51. package/dist/_chunks/{list-BdvDctBz.js → list-BOwqwy03.js} +44 -43
  52. package/dist/_chunks/{locale-picker-CY89MChR.js → locale-picker-D99UyZVJ.js} +4 -4
  53. package/dist/_chunks/{map-view-DyB8tr6c.js → map-view-WEWqXzof.js} +569 -557
  54. package/dist/_chunks/{message-card-D6iyPacd.js → message-card-BbRhZkDI.js} +3 -3
  55. package/dist/_chunks/{message-tray-Bh-0ra-Y.js → message-tray-B762TKuv.js} +11 -10
  56. package/dist/_chunks/{multi-select-dSe6Xtc4.js → multi-select-DOLO3K_z.js} +26 -25
  57. package/dist/_chunks/{navigation-menu-CyS1fBJ7.js → navigation-menu-C6lBYVv9.js} +3 -3
  58. package/dist/_chunks/nl-DjPaaWaW.js +326 -0
  59. package/dist/_chunks/{notification-card-vaMaA7Wa.js → notification-card-DMdO4g54.js} +2 -2
  60. package/dist/_chunks/{notification-tray-Cnum6LwM.js → notification-tray-Dl3FTleW.js} +17 -16
  61. package/dist/_chunks/{number-input-BZXu6bPY.js → number-input-Dj5L3pXK.js} +2 -2
  62. package/dist/_chunks/{otp-input-BDF_iNpa.js → otp-input-BEg_sn8A.js} +2 -2
  63. package/dist/_chunks/{pagination-BWaXF7W0.js → pagination-DQOgnxxw.js} +2 -2
  64. package/dist/_chunks/{parseISO-Dk4xa7q6.js → parseISO-DEpUNwxZ.js} +2 -2
  65. package/dist/_chunks/{patient-search-ZpHN-pgJ.js → patient-search-hFiYbqcl.js} +8 -8
  66. package/dist/_chunks/{patient-shell-CYaNkbA1.js → patient-shell-CDvMw_Nk.js} +6 -6
  67. package/dist/_chunks/{payment-form-Ds3rxvad.js → payment-form-D5rgnZu7.js} +2 -2
  68. package/dist/_chunks/{pdf-viewer-CIuaocnq.js → pdf-viewer-DvtEHcEP.js} +347 -320
  69. package/dist/_chunks/{phone-input-DKSHX7NQ.js → phone-input-DfZbPPvh.js} +217 -201
  70. package/dist/_chunks/pl-Cl4lOx2N.js +514 -0
  71. package/dist/_chunks/{popover-BfHSBEKq.js → popover-Devce-tT.js} +3 -3
  72. package/dist/_chunks/practice-results-RPL64j8E.js +1582 -0
  73. package/dist/_chunks/{privacy-lock-C6Ra5m3p.js → privacy-lock-DD-wHxBg.js} +3 -3
  74. package/dist/_chunks/{progress-B-PSO5OS.js → progress-kzIRcdaq.js} +11 -10
  75. package/dist/_chunks/pt-D7qO5CzD.js +370 -0
  76. package/dist/_chunks/{public-footer.agent-Bc99tE5Z.js → public-footer.agent-Bh0rnx4i.js} +21 -14
  77. package/dist/_chunks/{public-header.agent-B-B0WDAi.js → public-header.agent-B2dDg2_d.js} +3 -3
  78. package/dist/_chunks/{radio-i4ogu3cq.js → radio-TWf9Q-mp.js} +2 -2
  79. package/dist/_chunks/{radio-group-CTlGc36r.js → radio-group-BcF92GEF.js} +4 -4
  80. package/dist/_chunks/{react-day-picker-D3yzgvDB.js → react-day-picker-DsjfS7uI.js} +662 -615
  81. package/dist/_chunks/recaptcha-widget-CFYyLSEX.js +221 -0
  82. package/dist/_chunks/registry-nPAVE19X.js +21 -0
  83. package/dist/_chunks/{resizable-COV-cnth.js → resizable-3vzqDlg6.js} +29 -28
  84. package/dist/_chunks/{reviews-panel-bKEUKSic.js → reviews-panel-yanuBZs-.js} +4 -4
  85. package/dist/_chunks/{rich-text-editor-J-wAz9eN.js → rich-text-editor-CHmr9Bz8.js} +2 -2
  86. package/dist/_chunks/ro-CP2-VJ_O.js +361 -0
  87. package/dist/_chunks/ru-RPn9_Lpq.js +561 -0
  88. package/dist/_chunks/{scroll-area-DEDU-lp-.js → scroll-area-BWqCkEGz.js} +2 -2
  89. package/dist/_chunks/{search-bar-BRMW1-WG.js → search-bar-CP6wUJFY.js} +3 -3
  90. package/dist/_chunks/{search-input-CIA6pPfn.js → search-input-C1C3jQpD.js} +24 -23
  91. package/dist/_chunks/{select-C92AT_OZ.js → select-hsCaJSX3.js} +3 -3
  92. package/dist/_chunks/{sheet-D8Yl0nKR.js → sheet-BV-yuLE2.js} +3 -3
  93. package/dist/_chunks/{sidebar-DkyC6GvS.js → sidebar-BbR8f6oe.js} +3 -3
  94. package/dist/_chunks/{signature-capture-DjMlFOzS.js → signature-capture-C-fF71xI.js} +213 -205
  95. package/dist/_chunks/{slider-CfEzeseL.js → slider-BHWzXdjt.js} +3 -3
  96. package/dist/_chunks/{slot-grid-Q94gVmhn.js → slot-grid-Dz13dH82.js} +4 -4
  97. package/dist/_chunks/{sparkline-B5Ms55PZ.js → sparkline-DEROcSl0.js} +2 -2
  98. package/dist/_chunks/sq-AQvefouo.js +355 -0
  99. package/dist/_chunks/{stepper-progress-jFY8BSf7.js → stepper-progress-DDjq5nei.js} +16 -15
  100. package/dist/_chunks/streaming-text-GH07yIYh.js +127 -0
  101. package/dist/_chunks/sv-zkx9eBtD.js +376 -0
  102. package/dist/_chunks/{switch-D916VW86.js → switch-BJ6HD3Mn.js} +2 -2
  103. package/dist/_chunks/{tabs-aEQfQV3x.js → tabs-BpPYVme_.js} +4 -4
  104. package/dist/_chunks/{tag-bBPAvXyh.js → tag-CyoaEmf_.js} +2 -2
  105. package/dist/_chunks/{task-tray-6NlryfMJ.js → task-tray-DRK0b0Qb.js} +3 -3
  106. package/dist/_chunks/{text-area-D5GAe8pV.js → text-area-BIx0tZ05.js} +27 -26
  107. package/dist/_chunks/{text-input-CakysYnD.js → text-input-BaClJL8Y.js} +2 -2
  108. package/dist/_chunks/{theme-toggle-JoeMs_ws.js → theme-toggle-DpC28kt5.js} +6 -6
  109. package/dist/_chunks/{time-picker-DeVZkIY2.js → time-picker-B5umYwfv.js} +2 -2
  110. package/dist/_chunks/{timeline-CR7HjZCK.js → timeline-D0Wo7v_o.js} +3 -3
  111. package/dist/_chunks/{toast.agent-DVpKt38p.js → toast.agent-WHHfw5VX.js} +322 -320
  112. package/dist/_chunks/{tooltip-ClJd0ciy.js → tooltip-DvmfrNvB.js} +29 -20
  113. package/dist/_chunks/{tooth-scheme-3mITSXiZ.js → tooth-scheme-CxlsLjfN.js} +2 -2
  114. package/dist/_chunks/tr-Dmr412Ac.js +378 -0
  115. package/dist/_chunks/{transcript-panel-QUQ9XJmf.js → transcript-panel-DyhTpAP7.js} +21 -20
  116. package/dist/_chunks/{use-direction-D6rvvG9G.js → use-direction-Dp8h70PP.js} +7 -6
  117. package/dist/_chunks/use-isomorphic-layout-effect-BGfaCOP1.js +6 -0
  118. package/dist/_chunks/use-media-query-CcAx5SMM.js +16 -0
  119. package/dist/_chunks/{use-password-requirements-E0sSfx5X.js → use-password-requirements-DsgduV1x.js} +3 -3
  120. package/dist/_chunks/use-scroll-to-first-error-4Za-u5Nw.js +43 -0
  121. package/dist/_chunks/{workflow-map-DlWBJJBt.js → workflow-map-BSvQS3be.js} +6 -6
  122. package/dist/_chunks/zh-CN-DxVt64Zk.js +388 -0
  123. package/dist/agent/registry.d.ts +1 -6
  124. package/dist/agent-catalog.json +1 -1
  125. package/dist/components/_shared/date-locale.d.ts +7 -2
  126. package/dist/components/_shared/index.d.ts +1 -1
  127. package/dist/components/accordion/index.js +1 -1
  128. package/dist/components/agenda-card/index.js +1 -1
  129. package/dist/components/agenda-tray/index.js +1 -1
  130. package/dist/components/ai-prompt-input/index.js +1 -1
  131. package/dist/components/audio-recorder/index.js +1 -1
  132. package/dist/components/audio-visualiser/index.js +1 -1
  133. package/dist/components/autocomplete/index.js +1 -1
  134. package/dist/components/avatar/index.js +1 -1
  135. package/dist/components/badge/index.js +1 -1
  136. package/dist/components/booking/index.js +1 -1
  137. package/dist/components/breadcrumb/index.js +1 -1
  138. package/dist/components/button/index.js +1 -1
  139. package/dist/components/button-group/index.js +1 -1
  140. package/dist/components/calendar/index.js +1 -1
  141. package/dist/components/carousel/index.js +1 -1
  142. package/dist/components/chart/index.js +1 -1
  143. package/dist/components/chat-container/index.js +1 -1
  144. package/dist/components/chat-input/index.js +1 -1
  145. package/dist/components/chat-message/index.js +1 -1
  146. package/dist/components/checkbox/index.js +1 -1
  147. package/dist/components/checkbox-group/index.js +1 -1
  148. package/dist/components/collapsible/index.js +1 -1
  149. package/dist/components/color-picker/index.js +1 -1
  150. package/dist/components/combobox/index.js +1 -1
  151. package/dist/components/command-palette/index.js +1 -1
  152. package/dist/components/copy-field/index.js +1 -1
  153. package/dist/components/data-table/index.js +1 -1
  154. package/dist/components/date-picker/index.js +1 -1
  155. package/dist/components/date-range-picker/index.js +1 -1
  156. package/dist/components/date-time-picker/index.js +1 -1
  157. package/dist/components/description-list/index.js +1 -1
  158. package/dist/components/dialog/index.js +1 -1
  159. package/dist/components/dropdown-menu/index.js +1 -1
  160. package/dist/components/email-input/index.js +1 -1
  161. package/dist/components/file-upload/index.js +1 -1
  162. package/dist/components/freemium-paywall/index.js +1 -1
  163. package/dist/components/header/index.js +1 -1
  164. package/dist/components/header-settings/index.js +6 -6
  165. package/dist/components/icon-button/index.js +1 -1
  166. package/dist/components/icon-button-group/index.js +1 -1
  167. package/dist/components/key-value-pair/index.js +1 -1
  168. package/dist/components/list/index.js +1 -1
  169. package/dist/components/locale-picker/index.js +1 -1
  170. package/dist/components/map-view/index.js +1 -1
  171. package/dist/components/map-view/map-view.d.ts +10 -0
  172. package/dist/components/message-card/index.js +1 -1
  173. package/dist/components/message-tray/index.js +1 -1
  174. package/dist/components/multi-select/index.js +1 -1
  175. package/dist/components/navigation-menu/index.js +1 -1
  176. package/dist/components/notification-card/index.js +1 -1
  177. package/dist/components/notification-tray/index.js +1 -1
  178. package/dist/components/number-input/index.js +1 -1
  179. package/dist/components/otp-input/index.js +1 -1
  180. package/dist/components/pagination/index.js +1 -1
  181. package/dist/components/password-input/index.js +1 -1
  182. package/dist/components/patient-search/index.js +1 -1
  183. package/dist/components/payment-form/index.js +1 -1
  184. package/dist/components/pdf-viewer/index.js +1 -1
  185. package/dist/components/phone-input/index.js +1 -1
  186. package/dist/components/popover/index.js +1 -1
  187. package/dist/components/practice-results/index.js +1 -1
  188. package/dist/components/practice-results/practice-results.d.ts +23 -1
  189. package/dist/components/privacy-lock/index.js +1 -1
  190. package/dist/components/progress/index.js +1 -1
  191. package/dist/components/public-footer/index.js +1 -1
  192. package/dist/components/public-header/index.js +1 -1
  193. package/dist/components/radio/index.js +1 -1
  194. package/dist/components/radio-group/index.js +2 -2
  195. package/dist/components/recaptcha-widget/index.js +1 -1
  196. package/dist/components/resizable/index.js +1 -1
  197. package/dist/components/reviews-panel/index.js +1 -1
  198. package/dist/components/rich-text-editor/index.js +1 -1
  199. package/dist/components/scroll-area/index.js +1 -1
  200. package/dist/components/search-bar/index.js +1 -1
  201. package/dist/components/search-input/index.js +1 -1
  202. package/dist/components/select/index.js +1 -1
  203. package/dist/components/sheet/index.js +1 -1
  204. package/dist/components/sidebar/index.js +1 -1
  205. package/dist/components/signature-capture/index.js +1 -1
  206. package/dist/components/slider/index.js +1 -1
  207. package/dist/components/slot-grid/index.js +1 -1
  208. package/dist/components/sparkline/index.js +1 -1
  209. package/dist/components/stepper-progress/index.js +1 -1
  210. package/dist/components/streaming-text/index.js +1 -1
  211. package/dist/components/switch/index.js +1 -1
  212. package/dist/components/tabs/index.js +1 -1
  213. package/dist/components/tag/index.js +1 -1
  214. package/dist/components/task-tray/index.js +1 -1
  215. package/dist/components/text-area/index.js +1 -1
  216. package/dist/components/text-input/index.js +1 -1
  217. package/dist/components/theme-toggle/index.js +1 -1
  218. package/dist/components/time-picker/index.js +1 -1
  219. package/dist/components/timeline/index.js +1 -1
  220. package/dist/components/toast/index.js +1 -1
  221. package/dist/components/tooltip/index.js +1 -1
  222. package/dist/components/tooth-scheme/index.js +1 -1
  223. package/dist/components/transcript-panel/index.js +1 -1
  224. package/dist/components/workflow/index.js +1 -1
  225. package/dist/hooks/index.js +69 -66
  226. package/dist/i18n/locales/ar.d.ts +92 -0
  227. package/dist/i18n/locales/ar.js +82 -0
  228. package/dist/i18n/locales/de.d.ts +92 -0
  229. package/dist/i18n/locales/de.js +81 -0
  230. package/dist/i18n/locales/el.d.ts +92 -0
  231. package/dist/i18n/locales/el.js +82 -0
  232. package/dist/i18n/locales/en.d.ts +27 -0
  233. package/dist/i18n/locales/en.js +27 -0
  234. package/dist/i18n/locales/es.d.ts +92 -0
  235. package/dist/i18n/locales/es.js +81 -0
  236. package/dist/i18n/locales/fr.d.ts +92 -0
  237. package/dist/i18n/locales/fr.js +81 -0
  238. package/dist/i18n/locales/hi.d.ts +92 -0
  239. package/dist/i18n/locales/hi.js +82 -0
  240. package/dist/i18n/locales/it.d.ts +92 -0
  241. package/dist/i18n/locales/it.js +81 -0
  242. package/dist/i18n/locales/ja.d.ts +92 -0
  243. package/dist/i18n/locales/ja.js +82 -0
  244. package/dist/i18n/locales/nl.d.ts +92 -0
  245. package/dist/i18n/locales/nl.js +81 -0
  246. package/dist/i18n/locales/pl.d.ts +92 -0
  247. package/dist/i18n/locales/pl.js +82 -0
  248. package/dist/i18n/locales/pt.d.ts +92 -0
  249. package/dist/i18n/locales/pt.js +83 -0
  250. package/dist/i18n/locales/ro.d.ts +92 -0
  251. package/dist/i18n/locales/ro.js +82 -0
  252. package/dist/i18n/locales/ru.d.ts +92 -0
  253. package/dist/i18n/locales/ru.js +82 -0
  254. package/dist/i18n/locales/sq.d.ts +92 -0
  255. package/dist/i18n/locales/sq.js +82 -0
  256. package/dist/i18n/locales/sv.d.ts +92 -0
  257. package/dist/i18n/locales/sv.js +82 -0
  258. package/dist/i18n/locales/tr.d.ts +92 -0
  259. package/dist/i18n/locales/tr.js +82 -0
  260. package/dist/i18n/locales/zh.d.ts +92 -0
  261. package/dist/i18n/locales/zh.js +82 -0
  262. package/dist/index.js +541 -540
  263. package/dist/locales/ar.json +92 -0
  264. package/dist/locales/de.json +92 -0
  265. package/dist/locales/el.json +92 -0
  266. package/dist/locales/en.json +27 -0
  267. package/dist/locales/es.json +92 -0
  268. package/dist/locales/fr.json +92 -0
  269. package/dist/locales/hi.json +92 -0
  270. package/dist/locales/it.json +92 -0
  271. package/dist/locales/ja.json +92 -0
  272. package/dist/locales/nl.json +92 -0
  273. package/dist/locales/pl.json +92 -0
  274. package/dist/locales/pt.json +92 -0
  275. package/dist/locales/ro.json +92 -0
  276. package/dist/locales/ru.json +92 -0
  277. package/dist/locales/sq.json +92 -0
  278. package/dist/locales/sv.json +92 -0
  279. package/dist/locales/tr.json +92 -0
  280. package/dist/locales/zh.json +92 -0
  281. package/dist/patterns/alia-assistant/index.js +1 -1
  282. package/dist/patterns/patient-shell/index.js +1 -1
  283. package/dist/tokens.css +1 -1
  284. package/package.json +2 -2
  285. package/dist/_chunks/audio-visualiser-I-T4Z7EU.js +0 -145
  286. package/dist/_chunks/practice-results-CEKjwsgS.js +0 -1441
  287. package/dist/_chunks/recaptcha-widget-BtBNb6tB.js +0 -192
  288. package/dist/_chunks/registry-C9nwlNyL.js +0 -21
  289. package/dist/_chunks/smile-BSYLAHy6.js +0 -17
  290. package/dist/_chunks/streaming-text-BgjCTVOw.js +0 -105
  291. package/dist/_chunks/use-scroll-to-first-error-BrK7dKB_.js +0 -55
@@ -0,0 +1,1582 @@
1
+ import { jsx as t, jsxs as p } from "react/jsx-runtime";
2
+ import { forwardRef as Ue, useState as me, useRef as A, useMemo as H, useImperativeHandle as qe, useCallback as K, useEffect as J } from "react";
3
+ import { c as G } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as w } from "react-i18next";
5
+ import { A as Y } from "./alert-ywPR59NE.js";
6
+ import { A as Re } from "./avatar-BNQNhoyL.js";
7
+ import { B as q } from "./button-DD_0Xdmr.js";
8
+ import { D as F } from "./dropdown-menu-BC5ZdOMo.js";
9
+ import { E as Ge } from "./empty-state-BLy7tigq.js";
10
+ import { M as Ze } from "./map-view-WEWqXzof.js";
11
+ import { R as ke } from "./rating-BRD7O74e.js";
12
+ import { S as _ } from "./sheet-BV-yuLE2.js";
13
+ import { S as Qe } from "./skeleton-CZbwyJAA.js";
14
+ import { S as Je } from "./spinner-CCByyvcb.js";
15
+ import { B as D } from "./badge-CptERaHx.js";
16
+ import { u as We } from "./use-media-query-CcAx5SMM.js";
17
+ import { u as Xe } from "./registry-nPAVE19X.js";
18
+ import { c as te } from "./createLucideIcon-CrFbzy84.js";
19
+ import { R as Ye } from "./refresh-cw-CC8jSKMr.js";
20
+ import { C as we } from "./chevron-down-BX_NP2Yh.js";
21
+ import { M as ne } from "./map-pin-B8STOPMJ.js";
22
+ import { C as Ce } from "./calendar-clock-CYkcqdwl.js";
23
+ /**
24
+ * @license lucide-react v1.8.0 - ISC
25
+ *
26
+ * This source code is licensed under the ISC license.
27
+ * See the LICENSE file in the root directory of this source tree.
28
+ */
29
+ const et = [
30
+ [
31
+ "path",
32
+ {
33
+ d: "M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",
34
+ key: "mvr1a0"
35
+ }
36
+ ]
37
+ ], Ne = te("heart", et);
38
+ /**
39
+ * @license lucide-react v1.8.0 - ISC
40
+ *
41
+ * This source code is licensed under the ISC license.
42
+ * See the LICENSE file in the root directory of this source tree.
43
+ */
44
+ const tt = [
45
+ ["path", { d: "m5 8 6 6", key: "1wu5hv" }],
46
+ ["path", { d: "m4 14 6-6 2-3", key: "1k1g8d" }],
47
+ ["path", { d: "M2 5h12", key: "or177f" }],
48
+ ["path", { d: "M7 2h1", key: "1t2jsx" }],
49
+ ["path", { d: "m22 22-5-10-5 10", key: "don7ne" }],
50
+ ["path", { d: "M14 18h6", key: "1m8k6r" }]
51
+ ], Se = te("languages", tt);
52
+ /**
53
+ * @license lucide-react v1.8.0 - ISC
54
+ *
55
+ * This source code is licensed under the ISC license.
56
+ * See the LICENSE file in the root directory of this source tree.
57
+ */
58
+ const nt = [
59
+ [
60
+ "path",
61
+ {
62
+ d: "M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",
63
+ key: "169xi5"
64
+ }
65
+ ],
66
+ ["path", { d: "M15 5.764v15", key: "1pn4in" }],
67
+ ["path", { d: "M9 3.236v15", key: "1uimfh" }]
68
+ ], at = te("map", nt);
69
+ /**
70
+ * @license lucide-react v1.8.0 - ISC
71
+ *
72
+ * This source code is licensed under the ISC license.
73
+ * See the LICENSE file in the root directory of this source tree.
74
+ */
75
+ const st = [
76
+ [
77
+ "path",
78
+ {
79
+ d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
80
+ key: "oel41y"
81
+ }
82
+ ],
83
+ ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
84
+ ], Pe = te("shield-check", st), it = {
85
+ id: "practice-results",
86
+ capabilities: ["navigate", "view_change"],
87
+ state: {
88
+ variant: {
89
+ type: "string",
90
+ descriptionKey: "ui.agent.practiceResults.state.variant",
91
+ description: "Active variant — one of `split-list-map`, `map-first`, `rich-cards`.",
92
+ read: (e) => e.getVariant()
93
+ }
94
+ },
95
+ actions: {
96
+ scroll_to_result: {
97
+ safety: "read",
98
+ argsType: "{ id: string }",
99
+ descriptionKey: "ui.agent.practiceResults.actions.scrollToResult",
100
+ description: "Scroll the result card with the given id into the visible viewport.",
101
+ invoke: (e, n) => {
102
+ e.scrollToResult(n.id);
103
+ }
104
+ },
105
+ focus_pin: {
106
+ safety: "read",
107
+ argsType: "{ id: string }",
108
+ descriptionKey: "ui.agent.practiceResults.actions.focusPin",
109
+ description: "Highlight the map pin for the given result id (no-op on rich-cards).",
110
+ invoke: (e, n) => {
111
+ e.focusPin(n.id);
112
+ }
113
+ }
114
+ },
115
+ domHooks: {
116
+ root: {
117
+ attr: "data-component",
118
+ value: "practice-results",
119
+ description: "Marks the PracticeResults root region."
120
+ },
121
+ instanceId: {
122
+ attr: "data-component-id",
123
+ sourceProp: "id",
124
+ description: "Sourced from the id prop."
125
+ }
126
+ }
127
+ }, rt = 13, lt = [
128
+ "distance",
129
+ "rating",
130
+ "next-available",
131
+ "relevance"
132
+ ];
133
+ function $(e, n) {
134
+ if (typeof window > "u") return;
135
+ const s = window.track;
136
+ try {
137
+ s == null || s(e, n);
138
+ } catch {
139
+ }
140
+ }
141
+ function W(e, n, s, o) {
142
+ const i = e.findIndex((d) => d.id === n);
143
+ if (i < 0) return;
144
+ const a = e[i];
145
+ a && ($("serp_result_clicked", { resultId: n, source: s, position: i }), o(a, s));
146
+ }
147
+ function ot(e, n) {
148
+ const o = (n.lat - e.lat) * Math.PI / 180, i = (n.lng - e.lng) * Math.PI / 180, a = e.lat * Math.PI / 180, d = n.lat * Math.PI / 180, u = Math.sin(o / 2), c = Math.sin(i / 2), g = u * u + Math.cos(a) * Math.cos(d) * c * c;
149
+ return 2 * 6371 * Math.asin(Math.min(1, Math.sqrt(g)));
150
+ }
151
+ function ct(e, n, s) {
152
+ return !n || Object.keys(n).length === 0 ? e : e.filter((o) => {
153
+ for (const i of s) {
154
+ const a = n[i.key];
155
+ if (!a || a.length === 0) continue;
156
+ if (i.options.length === 0) {
157
+ if (o[i.key] !== !0) return !1;
158
+ continue;
159
+ }
160
+ const d = i.key === "insurance" ? o.insurances : i.key === "language" ? o.languages : o[i.key];
161
+ if (!Array.isArray(d) || !(i.multi ? a.some((c) => d.includes(c)) : d.includes(a[0]))) return !1;
162
+ }
163
+ return !0;
164
+ });
165
+ }
166
+ function dt(e, n, s) {
167
+ const o = e.map((a) => {
168
+ const d = a.location ? a.location.distanceKm ?? (s ? ot(s, a.location) : void 0) : void 0;
169
+ return { result: a, distanceKm: d };
170
+ }), i = (a, d) => {
171
+ var u, c, g, l;
172
+ switch (n) {
173
+ case "distance":
174
+ return a.distanceKm == null && d.distanceKm == null ? 0 : a.distanceKm == null ? 1 : d.distanceKm == null ? -1 : a.distanceKm - d.distanceKm;
175
+ case "rating": {
176
+ const f = ((u = a.result.rating) == null ? void 0 : u.value) ?? -1;
177
+ return (((c = d.result.rating) == null ? void 0 : c.value) ?? -1) - f;
178
+ }
179
+ case "next-available": {
180
+ const f = ((g = a.result.nextAvailableSlot) == null ? void 0 : g.dateTime) ?? "", m = ((l = d.result.nextAvailableSlot) == null ? void 0 : l.dateTime) ?? "";
181
+ return !f && !m ? 0 : f ? m ? f.localeCompare(m) : -1 : 1;
182
+ }
183
+ case "relevance":
184
+ default:
185
+ return 0;
186
+ }
187
+ };
188
+ return [...o].sort(i).map(
189
+ ({ result: a, distanceKm: d }) => d != null && a.location ? {
190
+ ...a,
191
+ location: { ...a.location, distanceKm: d }
192
+ } : a
193
+ );
194
+ }
195
+ function be(e) {
196
+ let n = -1 / 0, s = 1 / 0, o = -1 / 0, i = 1 / 0, a = !1;
197
+ for (const d of e) {
198
+ if (!d.location) continue;
199
+ a = !0;
200
+ const { lat: u, lng: c } = d.location;
201
+ u > n && (n = u), u < s && (s = u), c > o && (o = c), c < i && (i = c);
202
+ }
203
+ if (a)
204
+ return { north: n, south: s, east: o, west: i };
205
+ }
206
+ const ut = G(
207
+ "ds:flex ds:w-full ds:flex-col ds:text-[var(--foreground)] ds:gap-[var(--spacing-md)]",
208
+ {
209
+ variants: {
210
+ variant: {
211
+ "split-list-map": "",
212
+ "map-first": "",
213
+ "rich-cards": ""
214
+ }
215
+ },
216
+ defaultVariants: { variant: "split-list-map" }
217
+ }
218
+ );
219
+ function Me({
220
+ heading: e,
221
+ intro: n,
222
+ totalCount: s,
223
+ searchCentreLabel: o
224
+ }) {
225
+ const { t: i } = w();
226
+ if (!e && !n && s == null) return null;
227
+ const a = s != null ? o ? i("practiceResults.results.heading", {
228
+ count: s,
229
+ place: o
230
+ }) : i("practiceResults.results.summary", { count: s }) : void 0;
231
+ return /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
232
+ e ? /* @__PURE__ */ t("h2", { className: "type-title-section ds:m-0 ds:text-[var(--foreground)]", children: e }) : null,
233
+ n ? /* @__PURE__ */ t("p", { className: "type-body ds:m-0 ds:text-[var(--muted-foreground)]", children: n }) : null,
234
+ a ? /* @__PURE__ */ t(
235
+ "p",
236
+ {
237
+ className: "type-body-sm ds:m-0 ds:text-[var(--muted-foreground)]",
238
+ "aria-live": "polite",
239
+ children: a
240
+ }
241
+ ) : null
242
+ ] });
243
+ }
244
+ const ee = G(
245
+ [
246
+ "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
247
+ "ds:min-h-[var(--min-target-size)]",
248
+ "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
249
+ "ds:pt-[var(--spacing-xs)] ds:pb-[var(--spacing-xs)]",
250
+ "ds:rounded-[var(--radius-full)]",
251
+ "type-label",
252
+ "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
253
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
254
+ "ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
255
+ "ds:forced-colors:focus-visible:outline-[CanvasText]"
256
+ ].join(" "),
257
+ {
258
+ variants: {
259
+ state: {
260
+ idle: "ds:bg-[var(--secondary)] ds:text-[var(--foreground)] ds:border ds:border-[color:var(--border)] ds:hover:bg-[color-mix(in_srgb,var(--primary)_8%,var(--secondary))]",
261
+ active: "ds:bg-[var(--primary)] ds:text-[var(--primary-foreground)] ds:border ds:border-transparent ds:font-[var(--font-weight-semibold)]"
262
+ }
263
+ },
264
+ defaultVariants: { state: "idle" }
265
+ }
266
+ ), mt = G(
267
+ "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
268
+ {
269
+ variants: {
270
+ placement: {
271
+ inline: "",
272
+ // Floating chrome on map-first: soft `--popover` surface so chips
273
+ // read over the map without losing contrast. Same surface as
274
+ // dropdowns / sheets — themed and forced-colors safe.
275
+ floating: [
276
+ "ds:rounded-[var(--radius-full)]",
277
+ "ds:bg-[var(--popover)] ds:shadow-[var(--shadow-md)]",
278
+ "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
279
+ "ds:pt-[var(--spacing-2xs)] ds:pb-[var(--spacing-2xs)]"
280
+ ].join(" ")
281
+ }
282
+ },
283
+ defaultVariants: { placement: "inline" }
284
+ }
285
+ ), pt = G(
286
+ [
287
+ "ds:ms-[var(--spacing-xs)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
288
+ "ds:min-h-[var(--min-target-size)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]",
289
+ "type-label ds:text-[color:var(--muted-foreground)]",
290
+ "ds:rounded-[var(--radius-sm)]",
291
+ "ds:hover:text-[color:var(--foreground)]",
292
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
293
+ "ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
294
+ ].join(" ")
295
+ );
296
+ function Ae({
297
+ facets: e,
298
+ value: n,
299
+ onChange: s,
300
+ floating: o
301
+ }) {
302
+ const { t: i } = w(), a = H(() => n ?? {}, [n]), d = H(
303
+ () => Object.values(a).some((l) => l && l.length > 0),
304
+ [a]
305
+ ), u = (l, f) => {
306
+ const m = { ...a };
307
+ f.length === 0 ? delete m[l] : m[l] = f, s(m), $("serp_filter_changed", { key: l, values: f });
308
+ }, c = (l) => {
309
+ var m;
310
+ const f = (((m = a[l]) == null ? void 0 : m.length) ?? 0) > 0;
311
+ u(l, f ? [] : ["true"]);
312
+ }, g = (l, f) => {
313
+ const m = a[l.key] ?? [], h = m.includes(f);
314
+ let x;
315
+ l.multi ? x = h ? m.filter((r) => r !== f) : [...m, f] : x = h ? [] : [f], u(l.key, x);
316
+ };
317
+ return e.length === 0 ? null : /* @__PURE__ */ p(
318
+ "div",
319
+ {
320
+ "data-component": "practice-results-filters",
321
+ role: "group",
322
+ "aria-label": i("practiceResults.filters.label"),
323
+ className: mt({
324
+ placement: o ? "floating" : "inline"
325
+ }),
326
+ children: [
327
+ e.map((l) => {
328
+ const f = l.options.length === 0, m = a[l.key] ?? [], h = m.length > 0;
329
+ if (f)
330
+ return /* @__PURE__ */ t(
331
+ "button",
332
+ {
333
+ type: "button",
334
+ "aria-pressed": h,
335
+ "aria-label": l.label,
336
+ onClick: () => c(l.key),
337
+ className: ee({
338
+ state: h ? "active" : "idle"
339
+ }),
340
+ children: /* @__PURE__ */ t("span", { children: l.label })
341
+ },
342
+ l.key
343
+ );
344
+ const x = h ? ` (${m.length})` : "";
345
+ return /* @__PURE__ */ p(F.Root, { children: [
346
+ /* @__PURE__ */ t(F.Trigger, { asChild: !0, children: /* @__PURE__ */ p(
347
+ "button",
348
+ {
349
+ type: "button",
350
+ "aria-label": `${l.label}${x}`,
351
+ className: ee({
352
+ state: h ? "active" : "idle"
353
+ }),
354
+ children: [
355
+ /* @__PURE__ */ p("span", { children: [
356
+ l.label,
357
+ x
358
+ ] }),
359
+ /* @__PURE__ */ t(
360
+ we,
361
+ {
362
+ "aria-hidden": "true",
363
+ className: "ds:size-3.5 ds:shrink-0"
364
+ }
365
+ )
366
+ ]
367
+ }
368
+ ) }),
369
+ /* @__PURE__ */ t(F.Content, { sideOffset: 8, align: "start", children: l.options.map((r) => /* @__PURE__ */ t(
370
+ F.CheckboxItem,
371
+ {
372
+ checked: m.includes(r.value),
373
+ onSelect: (y) => {
374
+ l.multi && y.preventDefault(), g(l, r.value);
375
+ },
376
+ children: r.label
377
+ },
378
+ r.value
379
+ )) })
380
+ ] }, l.key);
381
+ }),
382
+ d ? /* @__PURE__ */ t(
383
+ "button",
384
+ {
385
+ type: "button",
386
+ onClick: () => {
387
+ s({}), $("serp_filter_changed", { key: "*", values: [] });
388
+ },
389
+ className: pt(),
390
+ children: i("practiceResults.filters.clear")
391
+ }
392
+ ) : null
393
+ ]
394
+ }
395
+ );
396
+ }
397
+ function de({ value: e, onChange: n }) {
398
+ const { t: s } = w(), o = (i) => {
399
+ switch (i) {
400
+ case "distance":
401
+ return s("practiceResults.sort.distance");
402
+ case "rating":
403
+ return s("practiceResults.sort.rating");
404
+ case "next-available":
405
+ return s("practiceResults.sort.nextAvailable");
406
+ case "relevance":
407
+ default:
408
+ return s("practiceResults.sort.relevance");
409
+ }
410
+ };
411
+ return /* @__PURE__ */ p(F.Root, { children: [
412
+ /* @__PURE__ */ t(F.Trigger, { asChild: !0, children: /* @__PURE__ */ p(
413
+ "button",
414
+ {
415
+ type: "button",
416
+ "aria-label": `${s("practiceResults.sort.label")}: ${o(e)}`,
417
+ className: ee({ state: "idle" }),
418
+ children: [
419
+ /* @__PURE__ */ p("span", { children: [
420
+ s("practiceResults.sort.label"),
421
+ ": ",
422
+ o(e)
423
+ ] }),
424
+ /* @__PURE__ */ t(we, { "aria-hidden": "true", className: "ds:size-3.5 ds:shrink-0" })
425
+ ]
426
+ }
427
+ ) }),
428
+ /* @__PURE__ */ t(F.Content, { sideOffset: 8, align: "end", children: /* @__PURE__ */ t(
429
+ F.RadioGroup,
430
+ {
431
+ value: e,
432
+ onValueChange: (i) => {
433
+ const a = i;
434
+ a !== e && (n(a), $("serp_sort_changed", { sort: a }));
435
+ },
436
+ children: lt.map((i) => /* @__PURE__ */ t(F.RadioItem, { value: i, children: o(i) }, i))
437
+ }
438
+ ) })
439
+ ] });
440
+ }
441
+ function _e({ distanceKm: e }) {
442
+ const { t: n, i18n: s } = w(), o = H(() => {
443
+ if (e < 1) return n("practiceResults.distance.below");
444
+ const i = new Intl.NumberFormat(s.language, {
445
+ maximumFractionDigits: 1
446
+ }).format(e);
447
+ return n("practiceResults.distance.km", { distance: i });
448
+ }, [e, n, s.language]);
449
+ return /* @__PURE__ */ t(D, { variant: "neutral", leading: /* @__PURE__ */ t(ne, { "aria-hidden": "true" }), children: o });
450
+ }
451
+ const ye = G(
452
+ [
453
+ "ds:inline-size-[12rem] ds:block-size-[8rem] ds:shrink-0",
454
+ "ds:rounded-[var(--radius-md)] ds:overflow-hidden"
455
+ ].join(" "),
456
+ {
457
+ variants: {
458
+ state: {
459
+ // Tonal address-block placeholder — renders the MapPin glyph
460
+ // + address text on a `--muted` surface. Used when the consumer
461
+ // hasn't provided `googleMapsApiKey`; carries the spatial cue
462
+ // (location is here, even if we can't draw the map).
463
+ placeholder: "ds:flex ds:flex-col ds:items-start ds:justify-end ds:gap-[var(--spacing-2xs)] ds:bg-[var(--muted)] ds:text-[var(--muted-foreground)] ds:p-[var(--spacing-sm)]",
464
+ image: "ds:[object-fit:cover]"
465
+ }
466
+ },
467
+ defaultVariants: { state: "placeholder" }
468
+ }
469
+ );
470
+ function ft() {
471
+ if (typeof document > "u") return "4945a3";
472
+ const e = getComputedStyle(document.documentElement).getPropertyValue("--map-marker-color").trim(), n = /^#?([0-9a-fA-F]{6})$/.exec(e);
473
+ return n ? n[1] : "4945a3";
474
+ }
475
+ function ht({
476
+ apiKey: e,
477
+ center: n,
478
+ zoom: s = 14,
479
+ address: o
480
+ }) {
481
+ const { t: i } = w();
482
+ if (!e)
483
+ return /* @__PURE__ */ p(
484
+ "div",
485
+ {
486
+ "aria-hidden": o ? void 0 : "true",
487
+ className: ye({ state: "placeholder" }),
488
+ children: [
489
+ /* @__PURE__ */ t(ne, { "aria-hidden": "true", className: "ds:size-5 ds:shrink-0" }),
490
+ o ? /* @__PURE__ */ t("span", { className: "type-meta ds:[overflow-wrap:anywhere]", children: o }) : null
491
+ ]
492
+ }
493
+ );
494
+ const a = ft(), d = `https://maps.googleapis.com/maps/api/staticmap?center=${n.lat},${n.lng}&zoom=${s}&size=240x160&scale=2&markers=color:0x${a}%7C${n.lat},${n.lng}&key=${encodeURIComponent(e)}`;
495
+ return /* @__PURE__ */ t(
496
+ "img",
497
+ {
498
+ src: d,
499
+ alt: i("practiceResults.thumbnail.alt"),
500
+ loading: "lazy",
501
+ decoding: "async",
502
+ width: 240,
503
+ height: 160,
504
+ className: ye({ state: "image" })
505
+ }
506
+ );
507
+ }
508
+ const ze = G(
509
+ [
510
+ "ds:relative ds:flex ds:w-full ds:cursor-pointer",
511
+ "ds:rounded-[var(--radius-lg)]",
512
+ "ds:bg-[var(--card)] ds:text-[var(--card-foreground)]",
513
+ "ds:border ds:border-[color:var(--card-border)]",
514
+ "ds:p-[var(--spacing-md)]",
515
+ "ds:gap-[var(--spacing-md)]",
516
+ "ds:transition-[box-shadow,border-color] ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
517
+ "ds:hover:shadow-[var(--shadow-md)]",
518
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
519
+ "ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
520
+ "ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
521
+ // Use `data-highlighted` for the pin↔card sync visual so consumers
522
+ // can override (e.g. dim siblings) without fighting the kit.
523
+ "ds:data-[highlighted=true]:border-[color:var(--primary)]",
524
+ "ds:data-[highlighted=true]:shadow-[var(--shadow-md)]",
525
+ "ds:forced-colors:focus-visible:outline-[CanvasText]"
526
+ ].join(" "),
527
+ {
528
+ variants: {
529
+ density: {
530
+ compact: "",
531
+ rich: "ds:p-[var(--spacing-lg)] ds:gap-[var(--spacing-lg)]"
532
+ }
533
+ },
534
+ defaultVariants: { density: "compact" }
535
+ }
536
+ );
537
+ function gt({
538
+ result: e,
539
+ highlighted: n,
540
+ onSelect: s,
541
+ onOpenClick: o,
542
+ onHover: i,
543
+ density: a = "compact",
544
+ openLabel: d,
545
+ nextSlotText: u,
546
+ maxInsuranceChips: c = 3,
547
+ maxLanguageChips: g = 4,
548
+ children: l
549
+ }) {
550
+ var I, P, E, O, U, j;
551
+ const { t: f } = w(), m = e.rating, h = (I = e.location) == null ? void 0 : I.distanceKm, x = (((P = e.languages) == null ? void 0 : P.length) ?? 0) > 0, r = (((E = e.insurances) == null ? void 0 : E.length) ?? 0) > 0, y = e.specializedInFearPatients, N = x || r || y, S = (e.languages ?? []).slice(0, g), b = (((O = e.languages) == null ? void 0 : O.length) ?? 0) - S.length, M = (e.insurances ?? []).slice(0, c), z = (((U = e.insurances) == null ? void 0 : U.length) ?? 0) - M.length;
552
+ return (
553
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events -- card is role="group" by design (axe nested-interactive); click handler is mouse-only sync.
554
+ /* @__PURE__ */ p(
555
+ "div",
556
+ {
557
+ "data-component": "practice-result-card",
558
+ "data-result-id": e.id,
559
+ "data-highlighted": n ? "true" : "false",
560
+ role: "group",
561
+ "aria-labelledby": `practice-result-${e.id}-name`,
562
+ onClick: s,
563
+ onMouseEnter: i,
564
+ onFocus: i,
565
+ className: ze({ density: a }),
566
+ children: [
567
+ /* @__PURE__ */ t(Re, { src: e.imageUrl, name: e.name, size: "lg" }),
568
+ /* @__PURE__ */ p("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
569
+ /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
570
+ /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
571
+ /* @__PURE__ */ t(
572
+ "span",
573
+ {
574
+ id: `practice-result-${e.id}-name`,
575
+ className: "type-title-card ds:text-[var(--foreground)]",
576
+ children: e.name
577
+ }
578
+ ),
579
+ h != null ? /* @__PURE__ */ t(_e, { distanceKm: h }) : null
580
+ ] }),
581
+ e.subtitle ? /* @__PURE__ */ t("span", { className: "type-body-sm ds:text-[var(--muted-foreground)]", children: e.subtitle }) : null,
582
+ (j = e.location) != null && j.address ? /* @__PURE__ */ p("span", { className: "type-meta ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
583
+ /* @__PURE__ */ t(ne, { "aria-hidden": "true", className: "ds:size-3.5 ds:shrink-0" }),
584
+ e.location.address
585
+ ] }) : null
586
+ ] }),
587
+ m && m.count > 0 ? /* @__PURE__ */ t(
588
+ ke,
589
+ {
590
+ value: m.value,
591
+ reviews: { count: m.count },
592
+ size: "sm"
593
+ }
594
+ ) : null,
595
+ N ? /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
596
+ S.map((C) => /* @__PURE__ */ t(
597
+ D,
598
+ {
599
+ variant: "neutral",
600
+ leading: /* @__PURE__ */ t(Se, { "aria-hidden": "true" }),
601
+ children: C.toUpperCase()
602
+ },
603
+ `lang-${C}`
604
+ )),
605
+ b > 0 ? /* @__PURE__ */ t(D, { variant: "neutral", children: `+${b}` }) : null,
606
+ M.map((C) => /* @__PURE__ */ t(
607
+ D,
608
+ {
609
+ variant: "info",
610
+ leading: /* @__PURE__ */ t(Pe, { "aria-hidden": "true" }),
611
+ children: C
612
+ },
613
+ `ins-${C}`
614
+ )),
615
+ z > 0 ? /* @__PURE__ */ t(D, { variant: "neutral", children: `+${z}` }) : null,
616
+ y ? /* @__PURE__ */ t(D, { variant: "info", leading: /* @__PURE__ */ t(Ne, { "aria-hidden": "true" }), children: f("practiceResults.fearPatient.label") }) : null
617
+ ] }) : null,
618
+ e.nextAvailableSlot && u ? /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
619
+ /* @__PURE__ */ p("span", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
620
+ /* @__PURE__ */ t(
621
+ Ce,
622
+ {
623
+ "aria-hidden": "true",
624
+ className: "ds:size-4 ds:text-[var(--primary)]"
625
+ }
626
+ ),
627
+ f("practiceResults.nextSlot.summary", { time: u })
628
+ ] }),
629
+ /* @__PURE__ */ t(
630
+ q,
631
+ {
632
+ intent: "primary",
633
+ size: "sm",
634
+ asChild: !0,
635
+ onClick: (C) => {
636
+ C.stopPropagation();
637
+ },
638
+ children: /* @__PURE__ */ t(
639
+ "a",
640
+ {
641
+ href: e.nextAvailableSlot.bookingHref,
642
+ "data-component": "practice-result-next-slot-cta",
643
+ children: f("practiceResults.nextSlot.cta", { time: u })
644
+ }
645
+ )
646
+ }
647
+ )
648
+ ] }) : null,
649
+ l,
650
+ /* @__PURE__ */ t("div", { className: "ds:mt-[var(--spacing-xs)] ds:flex ds:justify-end", children: /* @__PURE__ */ t(
651
+ q,
652
+ {
653
+ intent: "secondary",
654
+ size: "sm",
655
+ asChild: !0,
656
+ onClick: (C) => {
657
+ C.stopPropagation(), o();
658
+ },
659
+ children: /* @__PURE__ */ t("a", { href: e.href, "data-component": "practice-result-open-cta", children: d })
660
+ }
661
+ ) })
662
+ ] })
663
+ ]
664
+ }
665
+ )
666
+ );
667
+ }
668
+ function vt({
669
+ result: e,
670
+ apiKey: n,
671
+ highlighted: s,
672
+ onSelect: o,
673
+ onOpenClick: i,
674
+ onHover: a,
675
+ openLabel: d
676
+ }) {
677
+ var r, y, N, S;
678
+ const { t: u, i18n: c } = w(), g = H(() => {
679
+ if (e.nextAvailableSlot)
680
+ try {
681
+ return new Intl.DateTimeFormat(c.language, {
682
+ weekday: "short",
683
+ hour: "numeric",
684
+ minute: "numeric"
685
+ }).format(new Date(e.nextAvailableSlot.dateTime));
686
+ } catch {
687
+ return e.nextAvailableSlot.dateTime;
688
+ }
689
+ }, [e.nextAvailableSlot, c.language]), l = (((r = e.languages) == null ? void 0 : r.length) ?? 0) > 0, f = (((y = e.insurances) == null ? void 0 : y.length) ?? 0) > 0, m = e.specializedInFearPatients, h = l || f || m, x = (N = e.location) == null ? void 0 : N.distanceKm;
690
+ return (
691
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events -- card is role="group" by design (axe nested-interactive); click handler is mouse-only sync.
692
+ /* @__PURE__ */ p(
693
+ "div",
694
+ {
695
+ "data-component": "practice-result-card",
696
+ "data-result-id": e.id,
697
+ "data-density": "rich",
698
+ "data-highlighted": s ? "true" : "false",
699
+ role: "group",
700
+ "aria-labelledby": `practice-result-${e.id}-name`,
701
+ onClick: o,
702
+ onMouseEnter: a,
703
+ onFocus: a,
704
+ className: ze({ density: "rich" }),
705
+ children: [
706
+ e.location ? /* @__PURE__ */ t(
707
+ ht,
708
+ {
709
+ apiKey: n,
710
+ center: {
711
+ lat: e.location.lat,
712
+ lng: e.location.lng
713
+ },
714
+ address: e.location.address
715
+ }
716
+ ) : null,
717
+ /* @__PURE__ */ p("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
718
+ /* @__PURE__ */ p("div", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-md)]", children: [
719
+ /* @__PURE__ */ t(Re, { src: e.imageUrl, name: e.name, size: "md" }),
720
+ /* @__PURE__ */ p("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
721
+ /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
722
+ /* @__PURE__ */ t(
723
+ "span",
724
+ {
725
+ id: `practice-result-${e.id}-name`,
726
+ className: "type-title-card ds:text-[var(--foreground)]",
727
+ children: e.name
728
+ }
729
+ ),
730
+ x != null ? /* @__PURE__ */ t(_e, { distanceKm: x }) : null
731
+ ] }),
732
+ e.subtitle ? /* @__PURE__ */ t("span", { className: "type-body-sm ds:text-[var(--muted-foreground)]", children: e.subtitle }) : null,
733
+ (S = e.location) != null && S.address ? /* @__PURE__ */ p("span", { className: "type-meta ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
734
+ /* @__PURE__ */ t(
735
+ ne,
736
+ {
737
+ "aria-hidden": "true",
738
+ className: "ds:size-3.5 ds:shrink-0"
739
+ }
740
+ ),
741
+ e.location.address
742
+ ] }) : null
743
+ ] }),
744
+ e.rating && e.rating.count > 0 ? /* @__PURE__ */ t(
745
+ ke,
746
+ {
747
+ value: e.rating.value,
748
+ reviews: { count: e.rating.count },
749
+ size: "md"
750
+ }
751
+ ) : null
752
+ ] }),
753
+ h ? /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
754
+ l ? (e.languages ?? []).map((b) => /* @__PURE__ */ t(
755
+ D,
756
+ {
757
+ variant: "neutral",
758
+ leading: /* @__PURE__ */ t(Se, { "aria-hidden": "true" }),
759
+ children: b.toUpperCase()
760
+ },
761
+ `lang-${b}`
762
+ )) : null,
763
+ f ? (e.insurances ?? []).map((b) => /* @__PURE__ */ t(
764
+ D,
765
+ {
766
+ variant: "info",
767
+ leading: /* @__PURE__ */ t(Pe, { "aria-hidden": "true" }),
768
+ children: b
769
+ },
770
+ `ins-${b}`
771
+ )) : null,
772
+ m ? /* @__PURE__ */ t(D, { variant: "info", leading: /* @__PURE__ */ t(Ne, { "aria-hidden": "true" }), children: u("practiceResults.fearPatient.label") }) : null
773
+ ] }) : null,
774
+ e.nextAvailableSlot && g ? /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
775
+ /* @__PURE__ */ p("span", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
776
+ /* @__PURE__ */ t(
777
+ Ce,
778
+ {
779
+ "aria-hidden": "true",
780
+ className: "ds:size-4 ds:text-[var(--primary)]"
781
+ }
782
+ ),
783
+ u("practiceResults.nextSlot.summary", { time: g })
784
+ ] }),
785
+ /* @__PURE__ */ t(
786
+ q,
787
+ {
788
+ intent: "primary",
789
+ size: "sm",
790
+ asChild: !0,
791
+ onClick: (b) => {
792
+ b.stopPropagation();
793
+ },
794
+ children: /* @__PURE__ */ t(
795
+ "a",
796
+ {
797
+ href: e.nextAvailableSlot.bookingHref,
798
+ "data-component": "practice-result-next-slot-cta",
799
+ children: u("practiceResults.nextSlot.cta", { time: g })
800
+ }
801
+ )
802
+ }
803
+ )
804
+ ] }) : null,
805
+ /* @__PURE__ */ t("div", { className: "ds:mt-[var(--spacing-xs)] ds:flex ds:justify-end", children: /* @__PURE__ */ t(
806
+ q,
807
+ {
808
+ intent: "secondary",
809
+ size: "sm",
810
+ asChild: !0,
811
+ onClick: (b) => {
812
+ b.stopPropagation(), i();
813
+ },
814
+ children: /* @__PURE__ */ t("a", { href: e.href, "data-component": "practice-result-open-cta", children: d })
815
+ }
816
+ ) })
817
+ ] })
818
+ ]
819
+ }
820
+ )
821
+ );
822
+ }
823
+ function pe({
824
+ results: e,
825
+ highlightedId: n,
826
+ onCardHover: s,
827
+ onCardSelect: o,
828
+ onCardOpenClick: i,
829
+ openLabel: a,
830
+ formatNextSlot: d,
831
+ onLoadMore: u,
832
+ loadingMore: c,
833
+ loadingSkeletons: g,
834
+ density: l = "compact",
835
+ apiKey: f,
836
+ containerRef: m
837
+ }) {
838
+ const { t: h } = w(), x = A(null);
839
+ return J(() => {
840
+ if (!u) return;
841
+ const r = x.current;
842
+ if (!r || typeof IntersectionObserver > "u") return;
843
+ const y = new IntersectionObserver(
844
+ (N) => {
845
+ for (const S of N)
846
+ S.isIntersecting && ($("serp_load_more", {
847
+ currentCount: e.length
848
+ }), u());
849
+ },
850
+ { root: null, rootMargin: "200px" }
851
+ );
852
+ return y.observe(r), () => y.disconnect();
853
+ }, [u, e.length]), g ? /* @__PURE__ */ t(
854
+ "div",
855
+ {
856
+ role: "status",
857
+ "aria-live": "polite",
858
+ "aria-label": h("practiceResults.loading"),
859
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
860
+ children: Array.from({ length: 4 }).map((r, y) => /* @__PURE__ */ t(
861
+ Qe,
862
+ {
863
+ variant: "rounded",
864
+ height: l === "rich" ? "11rem" : "7rem"
865
+ },
866
+ `pr-skel-${y}`
867
+ ))
868
+ }
869
+ ) : /* @__PURE__ */ p(
870
+ "div",
871
+ {
872
+ ref: m,
873
+ "data-component": "practice-results-list",
874
+ role: "list",
875
+ "aria-label": h("practiceResults.list.label"),
876
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:overflow-y-auto",
877
+ children: [
878
+ e.map((r) => /* @__PURE__ */ t("div", { role: "listitem", children: l === "rich" ? /* @__PURE__ */ t(
879
+ vt,
880
+ {
881
+ result: r,
882
+ apiKey: f,
883
+ highlighted: n === r.id,
884
+ onSelect: () => o(r.id),
885
+ onOpenClick: () => i(r.id),
886
+ onHover: () => s(r.id),
887
+ openLabel: a
888
+ }
889
+ ) : /* @__PURE__ */ t(
890
+ gt,
891
+ {
892
+ result: r,
893
+ highlighted: n === r.id,
894
+ onSelect: () => o(r.id),
895
+ onOpenClick: () => i(r.id),
896
+ onHover: () => s(r.id),
897
+ openLabel: a,
898
+ nextSlotText: d(r)
899
+ }
900
+ ) }, r.id)),
901
+ u ? /* @__PURE__ */ t(
902
+ "div",
903
+ {
904
+ ref: x,
905
+ "aria-hidden": "true",
906
+ className: "ds:flex ds:items-center ds:justify-center ds:py-[var(--spacing-md)]",
907
+ children: c ? /* @__PURE__ */ t(Je, { size: "md", variant: "pulse" }) : /* @__PURE__ */ t("span", { className: "ds:size-1" })
908
+ }
909
+ ) : null
910
+ ]
911
+ }
912
+ );
913
+ }
914
+ function ue({
915
+ results: e,
916
+ searchCentre: n,
917
+ zoom: s,
918
+ apiKey: o,
919
+ highlightedId: i,
920
+ onPinClick: a,
921
+ onPinHover: d,
922
+ onPinFirstInteract: u,
923
+ onBoundsChange: c,
924
+ consentGranted: g,
925
+ onConsentRequest: l,
926
+ mapHandleRef: f
927
+ }) {
928
+ const { t: m } = w(), h = H(
929
+ () => e.filter(
930
+ (r) => !!r.location
931
+ ).map((r) => ({
932
+ id: r.id,
933
+ position: {
934
+ lat: r.location.lat,
935
+ lng: r.location.lng
936
+ },
937
+ label: r.name
938
+ })),
939
+ [e]
940
+ ), x = H(() => {
941
+ if (n) return n;
942
+ const r = be(e);
943
+ return r ? {
944
+ lat: (r.north + r.south) / 2,
945
+ lng: (r.east + r.west) / 2
946
+ } : { lat: 45.4642, lng: 9.19 };
947
+ }, [e, n]);
948
+ return J(() => {
949
+ if (!c) return;
950
+ const r = be(e);
951
+ r && (c(r), $("serp_map_panned", { bounds: r }));
952
+ }, [e, c]), /* @__PURE__ */ t(
953
+ "div",
954
+ {
955
+ "data-component": "practice-results-map-panel",
956
+ className: "ds:relative ds:flex ds:size-full ds:min-h-[24rem] ds:flex-col",
957
+ children: /* @__PURE__ */ t(
958
+ Ze,
959
+ {
960
+ ref: f,
961
+ apiKey: o ?? "",
962
+ center: x,
963
+ zoom: s,
964
+ markers: h,
965
+ selectedMarkerId: i,
966
+ consentGranted: !!g,
967
+ onConsentRequest: l,
968
+ onMarkerClick: (r) => {
969
+ r != null && (d(r), u(r), a(r));
970
+ },
971
+ ariaLabel: m("practiceResults.map.label"),
972
+ size: "lg",
973
+ surface: "bordered",
974
+ className: "ds:size-full"
975
+ }
976
+ )
977
+ }
978
+ );
979
+ }
980
+ function Ie({
981
+ variantBodyProps: e
982
+ }) {
983
+ const { facets: n, value: s, onChange: o, heading: i, intro: a, totalCount: d, searchCentre: u } = e;
984
+ return /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
985
+ /* @__PURE__ */ t(
986
+ Me,
987
+ {
988
+ heading: i,
989
+ intro: a,
990
+ totalCount: d,
991
+ searchCentreLabel: u == null ? void 0 : u.label
992
+ }
993
+ ),
994
+ n.length > 0 ? /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
995
+ /* @__PURE__ */ t(
996
+ Ae,
997
+ {
998
+ facets: n,
999
+ value: s.facets,
1000
+ onChange: (c) => o({ ...s, facets: c })
1001
+ }
1002
+ ),
1003
+ /* @__PURE__ */ t(
1004
+ de,
1005
+ {
1006
+ value: s.sort ?? "relevance",
1007
+ onChange: (c) => o({ ...s, sort: c })
1008
+ }
1009
+ )
1010
+ ] }) : /* @__PURE__ */ t("div", { className: "ds:flex ds:justify-end", children: /* @__PURE__ */ t(
1011
+ de,
1012
+ {
1013
+ value: s.sort ?? "relevance",
1014
+ onChange: (c) => o({ ...s, sort: c })
1015
+ }
1016
+ ) })
1017
+ ] });
1018
+ }
1019
+ function fe() {
1020
+ const { t: e } = w();
1021
+ return /* @__PURE__ */ t(
1022
+ Ge,
1023
+ {
1024
+ variant: "no-results",
1025
+ title: e("practiceResults.empty.title"),
1026
+ description: e("practiceResults.empty.description")
1027
+ }
1028
+ );
1029
+ }
1030
+ function he({ onRetry: e }) {
1031
+ const { t: n } = w();
1032
+ return /* @__PURE__ */ p(Y, { variant: "error", children: [
1033
+ /* @__PURE__ */ t(Y.Title, { as: "h3", children: n("practiceResults.error.title") }),
1034
+ /* @__PURE__ */ t(Y.Description, { children: n("practiceResults.error.description") }),
1035
+ e ? /* @__PURE__ */ t(Y.Action, { children: /* @__PURE__ */ t(
1036
+ q,
1037
+ {
1038
+ intent: "secondary",
1039
+ size: "sm",
1040
+ startIcon: /* @__PURE__ */ t(Ye, { "aria-hidden": "true" }),
1041
+ onClick: e,
1042
+ children: n("practiceResults.error.retry")
1043
+ }
1044
+ ) }) : null
1045
+ ] });
1046
+ }
1047
+ function xt(e) {
1048
+ const {
1049
+ results: n,
1050
+ apiKey: s,
1051
+ zoom: o,
1052
+ searchCentre: i,
1053
+ onLoadMore: a,
1054
+ loadingMore: d,
1055
+ loadingSkeletons: u,
1056
+ emptyResultsSlot: c,
1057
+ errorSlot: g,
1058
+ error: l,
1059
+ onRetry: f,
1060
+ highlightedId: m,
1061
+ onCardHover: h,
1062
+ onPinClick: x,
1063
+ consentGranted: r,
1064
+ onConsentRequest: y,
1065
+ onBoundsChange: N,
1066
+ listContainerRef: S
1067
+ } = e, { t: b } = w(), [M, z] = me(!1), I = l ? g ?? /* @__PURE__ */ t(he, { onRetry: f }) : n.length === 0 && !u ? c ?? /* @__PURE__ */ t(fe, {}) : /* @__PURE__ */ t(
1068
+ pe,
1069
+ {
1070
+ results: n,
1071
+ highlightedId: m,
1072
+ onCardHover: h,
1073
+ onCardSelect: e.onCardSelect,
1074
+ onCardOpenClick: e.onCardOpenClick,
1075
+ openLabel: e.openLabel,
1076
+ formatNextSlot: e.formatNextSlot,
1077
+ onLoadMore: a,
1078
+ loadingMore: d,
1079
+ loadingSkeletons: u,
1080
+ density: "compact",
1081
+ containerRef: S
1082
+ }
1083
+ );
1084
+ return /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1085
+ /* @__PURE__ */ t(Ie, { variantBodyProps: e }),
1086
+ /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:lg:grid ds:lg:grid-cols-[55%_45%] ds:lg:gap-[var(--spacing-lg)] ds:lg:items-start", children: [
1087
+ /* @__PURE__ */ t("div", { className: "ds:min-w-0 ds:lg:max-h-[40rem] ds:lg:overflow-hidden", children: I }),
1088
+ /* @__PURE__ */ t("div", { className: "ds:hidden ds:lg:block ds:sticky ds:top-[var(--spacing-md)] ds:h-[40rem]", children: /* @__PURE__ */ t(
1089
+ ue,
1090
+ {
1091
+ results: n,
1092
+ searchCentre: i,
1093
+ zoom: o,
1094
+ apiKey: s,
1095
+ highlightedId: m,
1096
+ onPinClick: (P) => {
1097
+ W(n, P, "pin", e.onResultSelect), x(P);
1098
+ },
1099
+ onPinHover: h,
1100
+ onPinFirstInteract: e.onPinFirstInteract,
1101
+ onBoundsChange: N,
1102
+ consentGranted: r,
1103
+ onConsentRequest: y,
1104
+ mapHandleRef: e.mapHandleRef
1105
+ }
1106
+ ) })
1107
+ ] }),
1108
+ /* @__PURE__ */ t("div", { className: "ds:flex ds:lg:hidden ds:sticky ds:bottom-[var(--spacing-md)] ds:justify-center", children: /* @__PURE__ */ t(
1109
+ q,
1110
+ {
1111
+ intent: "primary",
1112
+ size: "md",
1113
+ startIcon: /* @__PURE__ */ t(at, { "aria-hidden": "true" }),
1114
+ onClick: () => z(!0),
1115
+ children: b("practiceResults.viewMap")
1116
+ }
1117
+ ) }),
1118
+ /* @__PURE__ */ t(_.Root, { open: M, onOpenChange: z, children: /* @__PURE__ */ p(_.Content, { side: "bottom", size: "lg", children: [
1119
+ /* @__PURE__ */ t(_.Header, { children: /* @__PURE__ */ t(_.Title, { children: b("practiceResults.map.label") }) }),
1120
+ /* @__PURE__ */ p(_.Body, { children: [
1121
+ /* @__PURE__ */ t(_.Description, { className: "ds:sr-only", children: b("practiceResults.sheet.description") }),
1122
+ /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1123
+ /* @__PURE__ */ t("div", { className: "ds:h-[20rem]", children: /* @__PURE__ */ t(
1124
+ ue,
1125
+ {
1126
+ results: n,
1127
+ searchCentre: i,
1128
+ zoom: o,
1129
+ apiKey: s,
1130
+ highlightedId: m,
1131
+ onPinClick: (P) => {
1132
+ W(n, P, "pin", e.onResultSelect), x(P);
1133
+ },
1134
+ onPinHover: h,
1135
+ onPinFirstInteract: e.onPinFirstInteract,
1136
+ onBoundsChange: N,
1137
+ consentGranted: r,
1138
+ onConsentRequest: y,
1139
+ mapHandleRef: e.mapHandleRef
1140
+ }
1141
+ ) }),
1142
+ I
1143
+ ] })
1144
+ ] })
1145
+ ] }) })
1146
+ ] });
1147
+ }
1148
+ const bt = {
1149
+ peek: "sm",
1150
+ half: "md",
1151
+ full: "lg"
1152
+ }, V = [
1153
+ "peek",
1154
+ "half",
1155
+ "full"
1156
+ ];
1157
+ function yt({ value: e, onChange: n }) {
1158
+ const { t: s, i18n: o } = w(), i = o.dir() === "rtl", a = A(
1159
+ /* @__PURE__ */ new Map()
1160
+ ), d = K((c) => {
1161
+ var g;
1162
+ (g = a.current.get(c)) == null || g.focus();
1163
+ }, []), u = K(
1164
+ (c, g) => {
1165
+ const l = V.indexOf(g), f = V.length, m = i ? "ArrowLeft" : "ArrowRight", h = i ? "ArrowRight" : "ArrowLeft";
1166
+ let x = null;
1167
+ switch (c.key) {
1168
+ case m:
1169
+ case "ArrowDown":
1170
+ x = V[(l + 1) % f];
1171
+ break;
1172
+ case h:
1173
+ case "ArrowUp":
1174
+ x = V[(l - 1 + f) % f];
1175
+ break;
1176
+ case "Home":
1177
+ x = V[0];
1178
+ break;
1179
+ case "End":
1180
+ x = V[f - 1];
1181
+ break;
1182
+ default:
1183
+ return;
1184
+ }
1185
+ c.preventDefault(), x && x !== g && n(x), x && d(x);
1186
+ },
1187
+ [d, i, n]
1188
+ );
1189
+ return /* @__PURE__ */ t(
1190
+ "div",
1191
+ {
1192
+ role: "radiogroup",
1193
+ "aria-label": s("practiceResults.sheet.snap.label"),
1194
+ className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]",
1195
+ children: V.map((c) => {
1196
+ const g = e === c;
1197
+ return /* @__PURE__ */ t(
1198
+ "button",
1199
+ {
1200
+ ref: (l) => {
1201
+ l ? a.current.set(c, l) : a.current.delete(c);
1202
+ },
1203
+ type: "button",
1204
+ role: "radio",
1205
+ "aria-checked": g,
1206
+ "aria-label": s(`practiceResults.sheet.snap.${c}`),
1207
+ tabIndex: g ? 0 : -1,
1208
+ onClick: () => n(c),
1209
+ onKeyDown: (l) => u(l, c),
1210
+ className: ee({
1211
+ state: g ? "active" : "idle"
1212
+ }),
1213
+ children: s(`practiceResults.sheet.snap.${c}`)
1214
+ },
1215
+ c
1216
+ );
1217
+ })
1218
+ }
1219
+ );
1220
+ }
1221
+ function Rt(e) {
1222
+ const {
1223
+ results: n,
1224
+ apiKey: s,
1225
+ zoom: o,
1226
+ searchCentre: i,
1227
+ onLoadMore: a,
1228
+ loadingMore: d,
1229
+ loadingSkeletons: u,
1230
+ emptyResultsSlot: c,
1231
+ errorSlot: g,
1232
+ error: l,
1233
+ onRetry: f,
1234
+ highlightedId: m,
1235
+ onCardHover: h,
1236
+ onPinClick: x,
1237
+ consentGranted: r,
1238
+ onConsentRequest: y,
1239
+ onBoundsChange: N,
1240
+ listContainerRef: S,
1241
+ facets: b,
1242
+ value: M,
1243
+ onChange: z
1244
+ } = e, { t: I } = w(), [P, E] = me("half"), O = bt[P], U = We("(min-width: 1024px)"), j = l ? g ?? /* @__PURE__ */ t(he, { onRetry: f }) : n.length === 0 && !u ? c ?? /* @__PURE__ */ t(fe, {}) : /* @__PURE__ */ t(
1245
+ pe,
1246
+ {
1247
+ results: n,
1248
+ highlightedId: m,
1249
+ onCardHover: h,
1250
+ onCardSelect: e.onCardSelect,
1251
+ onCardOpenClick: e.onCardOpenClick,
1252
+ openLabel: e.openLabel,
1253
+ formatNextSlot: e.formatNextSlot,
1254
+ onLoadMore: a,
1255
+ loadingMore: d,
1256
+ loadingSkeletons: u,
1257
+ density: "compact",
1258
+ apiKey: s,
1259
+ containerRef: S
1260
+ }
1261
+ ), C = /* @__PURE__ */ t(
1262
+ ue,
1263
+ {
1264
+ results: n,
1265
+ searchCentre: i,
1266
+ zoom: o,
1267
+ apiKey: s,
1268
+ highlightedId: m,
1269
+ onPinClick: (R) => {
1270
+ W(n, R, "pin", e.onResultSelect), x(R);
1271
+ },
1272
+ onPinHover: h,
1273
+ onPinFirstInteract: e.onPinFirstInteract,
1274
+ onBoundsChange: N,
1275
+ consentGranted: r,
1276
+ onConsentRequest: y,
1277
+ mapHandleRef: e.mapHandleRef
1278
+ }
1279
+ ), Z = b.length > 0 ? /* @__PURE__ */ t("div", { className: "ds:absolute ds:start-[var(--spacing-md)] ds:top-[var(--spacing-md)] ds:max-w-[calc(100%-var(--spacing-lg))]", children: /* @__PURE__ */ t(
1280
+ Ae,
1281
+ {
1282
+ facets: b,
1283
+ value: M.facets,
1284
+ onChange: (R) => z({ ...M, facets: R }),
1285
+ floating: !0
1286
+ }
1287
+ ) }) : null;
1288
+ return /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1289
+ /* @__PURE__ */ t(
1290
+ Me,
1291
+ {
1292
+ heading: e.heading,
1293
+ intro: e.intro,
1294
+ totalCount: e.totalCount,
1295
+ searchCentreLabel: i == null ? void 0 : i.label
1296
+ }
1297
+ ),
1298
+ U ? (
1299
+ // Desktop: 65/35 map left + scrollable card rail right. NO Sheet
1300
+ // (the Sheet would portal to body and occlude the desktop
1301
+ // layout regardless of the parent's `lg:hidden` class).
1302
+ /* @__PURE__ */ p("div", { className: "ds:grid ds:grid-cols-[65%_35%] ds:gap-[var(--spacing-lg)] ds:items-start", children: [
1303
+ /* @__PURE__ */ p("div", { className: "ds:relative ds:h-[40rem]", children: [
1304
+ C,
1305
+ Z
1306
+ ] }),
1307
+ /* @__PURE__ */ t("div", { className: "ds:min-w-0 ds:max-h-[40rem] ds:overflow-y-auto", children: j })
1308
+ ] })
1309
+ ) : (
1310
+ // Mobile: full-bleed map + persistent bottom sheet defaulting to
1311
+ // 'half' state. No X close button — the sheet is core to the
1312
+ // layout, not dismissible. Patient cycles peek / half / full
1313
+ // via the snap radiogroup at the top of the sheet body.
1314
+ /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1315
+ /* @__PURE__ */ p("div", { className: "ds:relative ds:h-[60vh] ds:min-h-[20rem]", children: [
1316
+ C,
1317
+ Z
1318
+ ] }),
1319
+ /* @__PURE__ */ t(_.Root, { open: !0, children: /* @__PURE__ */ t(
1320
+ _.Content,
1321
+ {
1322
+ side: "bottom",
1323
+ size: O,
1324
+ onEscapeKeyDown: (R) => R.preventDefault(),
1325
+ onPointerDownOutside: (R) => R.preventDefault(),
1326
+ onInteractOutside: (R) => R.preventDefault(),
1327
+ children: /* @__PURE__ */ p(_.Body, { children: [
1328
+ /* @__PURE__ */ t(_.Description, { className: "ds:sr-only", children: I("practiceResults.sheet.descriptionMapFirst") }),
1329
+ /* @__PURE__ */ p("div", { className: "ds:flex ds:items-start ds:justify-between ds:gap-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]", children: [
1330
+ /* @__PURE__ */ t(_.Title, { className: "type-title-card ds:m-0 ds:text-[var(--foreground)]", children: I("practiceResults.sheet.title", {
1331
+ count: e.totalCount ?? n.length
1332
+ }) }),
1333
+ /* @__PURE__ */ t(
1334
+ yt,
1335
+ {
1336
+ value: P,
1337
+ onChange: E
1338
+ }
1339
+ )
1340
+ ] }),
1341
+ /* @__PURE__ */ t("div", { className: "ds:pb-[var(--spacing-sm)]", children: /* @__PURE__ */ t(
1342
+ de,
1343
+ {
1344
+ value: M.sort ?? "relevance",
1345
+ onChange: (R) => z({ ...M, sort: R })
1346
+ }
1347
+ ) }),
1348
+ j
1349
+ ] })
1350
+ }
1351
+ ) })
1352
+ ] })
1353
+ )
1354
+ ] });
1355
+ }
1356
+ function kt(e) {
1357
+ const {
1358
+ results: n,
1359
+ apiKey: s,
1360
+ onLoadMore: o,
1361
+ loadingMore: i,
1362
+ loadingSkeletons: a,
1363
+ emptyResultsSlot: d,
1364
+ errorSlot: u,
1365
+ error: c,
1366
+ onRetry: g,
1367
+ highlightedId: l,
1368
+ onCardHover: f,
1369
+ listContainerRef: m
1370
+ } = e, h = c ? u ?? /* @__PURE__ */ t(he, { onRetry: g }) : n.length === 0 && !a ? d ?? /* @__PURE__ */ t(fe, {}) : /* @__PURE__ */ t(
1371
+ pe,
1372
+ {
1373
+ results: n,
1374
+ highlightedId: l,
1375
+ onCardHover: f,
1376
+ onCardSelect: e.onCardSelect,
1377
+ onCardOpenClick: e.onCardOpenClick,
1378
+ openLabel: e.openLabel,
1379
+ formatNextSlot: e.formatNextSlot,
1380
+ onLoadMore: o,
1381
+ loadingMore: i,
1382
+ loadingSkeletons: a,
1383
+ density: "rich",
1384
+ apiKey: s,
1385
+ containerRef: m
1386
+ }
1387
+ );
1388
+ return /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1389
+ /* @__PURE__ */ t(Ie, { variantBodyProps: e }),
1390
+ h
1391
+ ] });
1392
+ }
1393
+ const wt = Ue(function({
1394
+ variant: n = "split-list-map",
1395
+ results: s,
1396
+ totalCount: o,
1397
+ searchCentre: i,
1398
+ facets: a,
1399
+ googleMapsApiKey: d,
1400
+ defaultZoom: u = rt,
1401
+ onBoundsChange: c,
1402
+ consentGranted: g,
1403
+ onConsentRequest: l,
1404
+ onLoadMore: f,
1405
+ loadingMore: m,
1406
+ value: h,
1407
+ onChange: x,
1408
+ onResultSelect: r,
1409
+ loading: y,
1410
+ emptyResultsSlot: N,
1411
+ errorSlot: S,
1412
+ error: b,
1413
+ onRetry: M,
1414
+ heading: z,
1415
+ intro: I,
1416
+ cardOpenButtonLabel: P,
1417
+ "aria-label": E,
1418
+ id: O,
1419
+ className: U,
1420
+ ...j
1421
+ }, C) {
1422
+ const { t: Z, i18n: R } = w(), [Te, Q] = me(null), X = A(/* @__PURE__ */ new Set()), ae = A(/* @__PURE__ */ new Set()), $e = A(null), se = A(null), ie = H(
1423
+ () => ({
1424
+ getVariant: () => n,
1425
+ scrollToResult: (v) => {
1426
+ const T = se.current;
1427
+ if (!T) return;
1428
+ const k = T.querySelector(
1429
+ `[data-component="practice-result-card"][data-result-id="${CSS.escape(v)}"]`
1430
+ );
1431
+ k && (k.scrollIntoView({ behavior: "smooth", block: "nearest" }), Q(v));
1432
+ },
1433
+ focusPin: (v) => {
1434
+ Q(v);
1435
+ }
1436
+ }),
1437
+ [n]
1438
+ );
1439
+ qe(C, () => ie, [ie]), Xe(it, ie, O);
1440
+ const Fe = P ?? Z("practiceResults.card.open"), De = K(
1441
+ (v) => {
1442
+ if (v.nextAvailableSlot)
1443
+ try {
1444
+ return new Intl.DateTimeFormat(R.language, {
1445
+ weekday: "short",
1446
+ hour: "numeric",
1447
+ minute: "numeric"
1448
+ }).format(new Date(v.nextAvailableSlot.dateTime));
1449
+ } catch {
1450
+ return v.nextAvailableSlot.dateTime;
1451
+ }
1452
+ },
1453
+ [R.language]
1454
+ ), ge = A(null);
1455
+ J(() => {
1456
+ ge.current !== n && (ge.current = n, $("serp_variant_exposed", {
1457
+ variant: n,
1458
+ totalCount: o ?? s.length
1459
+ }), X.current = /* @__PURE__ */ new Set(), ae.current = /* @__PURE__ */ new Set());
1460
+ }, [n]);
1461
+ const re = A(!1), le = H(() => a ?? [], [a]), oe = h.sort ?? (i ? "distance" : "relevance"), L = H(() => {
1462
+ const v = ct(s, h.facets, le);
1463
+ return dt(v, oe, i);
1464
+ }, [s, h.facets, le, oe, i]);
1465
+ J(() => {
1466
+ const v = L.length === 0;
1467
+ v && !re.current ? ($("serp_empty_results", {
1468
+ appliedFacets: h.facets ?? {}
1469
+ }), re.current = !0) : v || (re.current = !1);
1470
+ }, [L.length, h.facets]);
1471
+ const B = A(null), ve = A(null);
1472
+ J(
1473
+ () => () => {
1474
+ B.current && clearTimeout(B.current);
1475
+ },
1476
+ []
1477
+ );
1478
+ const He = K((v) => {
1479
+ Q(v), !X.current.has(v) && (ve.current === v && B.current || (B.current && clearTimeout(B.current), ve.current = v, B.current = setTimeout(() => {
1480
+ X.current.has(v) || (X.current.add(v), $("serp_result_hovered_card", { resultId: v })), B.current = null;
1481
+ }, 500)));
1482
+ }, []), Oe = K((v) => {
1483
+ Q(v);
1484
+ const T = se.current;
1485
+ if (!T) return;
1486
+ const k = T.querySelector(
1487
+ `[data-component="practice-result-card"][data-result-id="${CSS.escape(v)}"]`
1488
+ );
1489
+ k == null || k.scrollIntoView({ behavior: "smooth", block: "nearest" });
1490
+ }, []), Le = K((v) => {
1491
+ ae.current.has(v) || (ae.current.add(v), $("serp_result_hovered_pin", { resultId: v }));
1492
+ }, []), xe = A(null), Ke = K(
1493
+ (v) => {
1494
+ Q(v);
1495
+ const T = L.find((k) => k.id === v);
1496
+ if (T) {
1497
+ if (T.location) {
1498
+ const k = xe.current;
1499
+ k == null || k.panTo({
1500
+ lat: T.location.lat,
1501
+ lng: T.location.lng
1502
+ }), k == null || k.setZoom(16);
1503
+ }
1504
+ W(L, v, "card", r);
1505
+ }
1506
+ },
1507
+ [L, r]
1508
+ ), je = K(
1509
+ (v) => {
1510
+ W(
1511
+ L,
1512
+ v,
1513
+ "open-button",
1514
+ r
1515
+ );
1516
+ },
1517
+ [L, r]
1518
+ ), Be = !!y && s.length === 0, ce = {
1519
+ results: L,
1520
+ totalCount: o,
1521
+ searchCentre: i,
1522
+ facets: le,
1523
+ value: { ...h, sort: oe },
1524
+ onChange: x,
1525
+ onResultSelect: r,
1526
+ onLoadMore: f,
1527
+ loadingMore: m,
1528
+ apiKey: d,
1529
+ zoom: u,
1530
+ consentGranted: g,
1531
+ onConsentRequest: l,
1532
+ onBoundsChange: c,
1533
+ loadingSkeletons: Be,
1534
+ emptyResultsSlot: N,
1535
+ errorSlot: S,
1536
+ error: b,
1537
+ onRetry: M,
1538
+ heading: z,
1539
+ intro: I,
1540
+ highlightedId: Te,
1541
+ onCardHover: He,
1542
+ onPinClick: Oe,
1543
+ onPinFirstInteract: Le,
1544
+ onCardSelect: Ke,
1545
+ onCardOpenClick: je,
1546
+ openLabel: Fe,
1547
+ formatNextSlot: De,
1548
+ listContainerRef: $e,
1549
+ mapHandleRef: xe
1550
+ }, Ve = (() => {
1551
+ switch (n) {
1552
+ case "map-first":
1553
+ return /* @__PURE__ */ t(Rt, { ...ce });
1554
+ case "rich-cards":
1555
+ return /* @__PURE__ */ t(kt, { ...ce });
1556
+ case "split-list-map":
1557
+ default:
1558
+ return /* @__PURE__ */ t(xt, { ...ce });
1559
+ }
1560
+ })(), Ee = E ?? Z("practiceResults.regionLabel");
1561
+ return /* @__PURE__ */ t(
1562
+ "div",
1563
+ {
1564
+ ref: se,
1565
+ role: "region",
1566
+ "aria-label": Ee,
1567
+ id: O,
1568
+ "data-component": "practice-results",
1569
+ "data-component-id": O,
1570
+ "data-variant": n,
1571
+ className: ut({ variant: n, className: U }),
1572
+ ...j,
1573
+ children: Ve
1574
+ }
1575
+ );
1576
+ });
1577
+ wt.displayName = "PracticeResults";
1578
+ export {
1579
+ wt as P,
1580
+ it as p
1581
+ };
1582
+ //# sourceMappingURL=practice-results-RPL64j8E.js.map