@alfadocs/ui-kit-debug 1.131.0 → 1.132.0
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.
- package/dist/_chunks/{address-autocomplete-D2uNpxcE.js → address-autocomplete-yDLqg43e.js} +2 -2
- package/dist/_chunks/{address-autocomplete-D2uNpxcE.js.map → address-autocomplete-yDLqg43e.js.map} +1 -1
- package/dist/_chunks/{address-fields-BU65pA-V.js → address-fields-DvSWdeR0.js} +2 -2
- package/dist/_chunks/{address-fields-BU65pA-V.js.map → address-fields-DvSWdeR0.js.map} +1 -1
- package/dist/_chunks/map-view-Cm69dCnY.js +1794 -0
- package/dist/_chunks/map-view-Cm69dCnY.js.map +1 -0
- package/dist/_chunks/{maps-core-gate-DKx96CC_.js → maps-core-gate-CP8SEHH1.js} +97 -93
- package/dist/_chunks/{maps-core-gate-DKx96CC_.js.map → maps-core-gate-CP8SEHH1.js.map} +1 -1
- package/dist/_chunks/{practice-results-M5A9-X9y.js → practice-results-DaxGw9_f.js} +762 -748
- package/dist/_chunks/practice-results-DaxGw9_f.js.map +1 -0
- package/dist/_chunks/{reserved.agent-BBuWWtYb.js → reserved.agent-W8mR179D.js} +2 -2
- package/dist/_chunks/{reserved.agent-BBuWWtYb.js.map → reserved.agent-W8mR179D.js.map} +1 -1
- package/dist/agent-catalog.json +25 -2
- package/dist/agent-i18n/en.json +3 -1
- package/dist/browser-support.js +1 -1
- package/dist/components/address-autocomplete/index.js +1 -1
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/map-view/index.d.ts +1 -1
- package/dist/components/map-view/index.d.ts.map +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/map-view/map-view.agent.d.ts.map +1 -1
- package/dist/components/map-view/map-view.d.ts +42 -1
- package/dist/components/map-view/map-view.d.ts.map +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/practice-results/practice-results.d.ts +12 -1
- package/dist/components/practice-results/practice-results.d.ts.map +1 -1
- package/dist/core.css +1 -1
- package/dist/host-compat.css +4 -1
- package/dist/i18n/locales/ar.d.ts +2 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +3 -1
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +2 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +3 -1
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +2 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +3 -1
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +2 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +3 -1
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +2 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +3 -1
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +2 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +3 -1
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +2 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +3 -1
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +2 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +3 -1
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +2 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +3 -1
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +2 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +3 -1
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +2 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +3 -1
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +2 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +3 -1
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +2 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +3 -1
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +2 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +3 -1
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +2 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +3 -1
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +2 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +3 -1
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +2 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +3 -1
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +2 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +3 -1
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/locales/ar.json +3 -1
- package/dist/locales/de.json +3 -1
- package/dist/locales/el.json +3 -1
- package/dist/locales/en.json +3 -1
- package/dist/locales/es.json +3 -1
- package/dist/locales/fr.json +3 -1
- package/dist/locales/hi.json +3 -1
- package/dist/locales/it.json +3 -1
- package/dist/locales/ja.json +3 -1
- package/dist/locales/nl.json +3 -1
- package/dist/locales/pl.json +3 -1
- package/dist/locales/pt.json +3 -1
- package/dist/locales/ro.json +3 -1
- package/dist/locales/ru.json +3 -1
- package/dist/locales/sq.json +3 -1
- package/dist/locales/sv.json +3 -1
- package/dist/locales/tr.json +3 -1
- package/dist/locales/zh.json +3 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/map-view-DkL58SRp.js +0 -1613
- package/dist/_chunks/map-view-DkL58SRp.js.map +0 -1
- package/dist/_chunks/practice-results-M5A9-X9y.js.map +0 -1
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { c as
|
|
1
|
+
import { jsxs as y, jsx as n, Fragment as Ze } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as on, useRef as T, useState as Y, useEffect as G, useCallback as B, forwardRef as cn, useMemo as K, useImperativeHandle as ln, useContext as xt } from "react";
|
|
3
|
+
import { c as de } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as _ } from "react-i18next";
|
|
5
|
-
import { A as
|
|
6
|
-
import { A as
|
|
5
|
+
import { A as Re } from "./alert-C4WKViaS.js";
|
|
6
|
+
import { A as Xe } from "./avatar-Dp5apm1d.js";
|
|
7
7
|
import { B as ve } from "./button-DohK_Ak_.js";
|
|
8
|
-
import { D as
|
|
9
|
-
import { E as
|
|
10
|
-
import { M as
|
|
11
|
-
import { R as
|
|
12
|
-
import { S as
|
|
13
|
-
import { S as
|
|
14
|
-
import { S as
|
|
15
|
-
import { B as
|
|
16
|
-
import { u as
|
|
17
|
-
import { u as
|
|
18
|
-
import { m as
|
|
19
|
-
import { l as
|
|
20
|
-
import { b as
|
|
21
|
-
import { u as
|
|
22
|
-
import { S as
|
|
23
|
-
import { s as
|
|
24
|
-
import { a as
|
|
25
|
-
import { p as
|
|
26
|
-
import { c as
|
|
27
|
-
import { R as
|
|
28
|
-
import { C as
|
|
29
|
-
import { L as
|
|
30
|
-
import { S as
|
|
31
|
-
import { H as
|
|
32
|
-
import { M as
|
|
33
|
-
import { C as
|
|
34
|
-
import { C as
|
|
8
|
+
import { D as le } from "./dropdown-menu-DBWaW4pq.js";
|
|
9
|
+
import { E as dn } from "./empty-state-DwJ5YNzz.js";
|
|
10
|
+
import { M as un, i as Ye } from "./map-view-Cm69dCnY.js";
|
|
11
|
+
import { R as Qe } from "./rating-CGYpg5dj.js";
|
|
12
|
+
import { S as re } from "./sheet-BdhYeQQT.js";
|
|
13
|
+
import { S as mn } from "./skeleton-tTWJpvAq.js";
|
|
14
|
+
import { S as fn } from "./spinner-CoflYlEx.js";
|
|
15
|
+
import { B as oe } from "./badge-BUk4RjTS.js";
|
|
16
|
+
import { u as Je } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
17
|
+
import { u as Ie } from "./use-media-query-CcAx5SMM.js";
|
|
18
|
+
import { m as pn } from "./motion-is-off-BvAuNV5O.js";
|
|
19
|
+
import { l as ft } from "./length-token-DwMnGEYT.js";
|
|
20
|
+
import { b as wt, a as pt } from "./format-price-CIX0YJZn.js";
|
|
21
|
+
import { u as hn } from "./registry-DvAUVLHh.js";
|
|
22
|
+
import { S as gn } from "./slot-grid-CfA5zeMv.js";
|
|
23
|
+
import { s as ht, f as Ne, d as vn } from "./format-ql5WTsYT.js";
|
|
24
|
+
import { a as qe } from "./addDays-CuE8wLqb.js";
|
|
25
|
+
import { p as be } from "./parseISO-Dl4T9peU.js";
|
|
26
|
+
import { c as yn } from "./createLucideIcon-DhHxpK9K.js";
|
|
27
|
+
import { R as bn } from "./refresh-cw-DnI0cLFC.js";
|
|
28
|
+
import { C as kt } from "./chevron-down-DWE7GSq9.js";
|
|
29
|
+
import { L as Ct } from "./languages-CGLX6Qpe.js";
|
|
30
|
+
import { S as Rt } from "./shield-check-DCJALLVh.js";
|
|
31
|
+
import { H as St } from "./heart--qCA4ffe.js";
|
|
32
|
+
import { M as Me } from "./map-pin-BaY37-Km.js";
|
|
33
|
+
import { C as xn } from "./calendar-clock-hbObjfGY.js";
|
|
34
|
+
import { C as wn } from "./calendar-plus-BFrIRE4r.js";
|
|
35
35
|
/**
|
|
36
36
|
* @license lucide-react v1.22.0 - ISC
|
|
37
37
|
*
|
|
38
38
|
* This source code is licensed under the ISC license.
|
|
39
39
|
* See the LICENSE file in the root directory of this source tree.
|
|
40
40
|
*/
|
|
41
|
-
const
|
|
41
|
+
const kn = [
|
|
42
42
|
[
|
|
43
43
|
"path",
|
|
44
44
|
{
|
|
@@ -48,7 +48,7 @@ const xn = [
|
|
|
48
48
|
],
|
|
49
49
|
["path", { d: "M15 5.764v15", key: "1pn4in" }],
|
|
50
50
|
["path", { d: "M9 3.236v15", key: "1uimfh" }]
|
|
51
|
-
],
|
|
51
|
+
], Cn = yn("map", kn), Rn = {
|
|
52
52
|
id: "practice-results",
|
|
53
53
|
// `scroll` backs scroll_to_result (light highlight, no selection). focus_pin
|
|
54
54
|
// follows the pin-click rules: on a map variant at `lg` and up it chooses the
|
|
@@ -132,42 +132,42 @@ const xn = [
|
|
|
132
132
|
description: 'Stable result id emitted on each rendered result card. Used by scroll_to_result / focus_pin to address a single result. The non-focusable card group is labelled by the practice-result-{id}-name heading, which contains data-component="practice-result-name-link": a visible link to result.href that navigates without firing onResultSelect or click telemetry. Each card also carries up to two CTA anchors: data-component="practice-result-open-cta" (practice page; absent when the consumer sets showCardOpenButton=false) and data-component="practice-result-book-cta" (booking flow; data-slot-aware="true" when it deep-links to a next slot). Card content carries its own read-only hooks: data-component="practice-result-tagline", data-component="practice-result-description", data-component="practice-result-latest-review" (the newest approved review as one truncated line under the rating, from latestReview; its text span carries the language of the review as lang; absent without latestReview), and data-component="practice-result-price" (the kit-formatted first-visit cost: firstVisitPrice supports fixed, from and range amounts plus an optional practice-written label; it takes precedence over the older firstVisitPriceCents fixed-price field. Absent when neither price is set). In the slot-cards variant a card with firstVisit also carries data-component="practice-result-first-visit" (the service and its price) and data-component="practice-result-slots" (the booking grid; its time buttons carry data-slot-id and can be clicked directly), and the card root has data-slot-cards="true".'
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
-
},
|
|
135
|
+
}, Se = 4, Sn = 90, Nn = "400px 0px", et = on(
|
|
136
136
|
null
|
|
137
137
|
);
|
|
138
|
-
function
|
|
139
|
-
return
|
|
140
|
-
typeof e == "string" ?
|
|
138
|
+
function Mn(e) {
|
|
139
|
+
return Ne(
|
|
140
|
+
typeof e == "string" ? be(e) : e,
|
|
141
141
|
"yyyy-MM-dd"
|
|
142
142
|
);
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function Ln(e, t, a) {
|
|
145
145
|
const r = /* @__PURE__ */ new Map();
|
|
146
146
|
for (const i of Array.isArray(e) ? e : [])
|
|
147
|
-
r.set(
|
|
147
|
+
r.set(Mn(i.date), i);
|
|
148
148
|
return Array.from({ length: a }, (i, s) => {
|
|
149
|
-
const c =
|
|
149
|
+
const c = qe(t, s), l = r.get(Ne(c, "yyyy-MM-dd"));
|
|
150
150
|
return l ? { ...l, slots: Array.isArray(l.slots) ? l.slots : [] } : { date: c, slots: [] };
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function Pn({
|
|
154
154
|
firstVisit: e,
|
|
155
155
|
currencyCode: t = "EUR"
|
|
156
156
|
}) {
|
|
157
|
-
const { t: a, i18n: r } = _("ui"), i = e.priceCents != null && Number.isFinite(e.priceCents) ?
|
|
157
|
+
const { t: a, i18n: r } = _("ui"), i = e.priceCents != null && Number.isFinite(e.priceCents) ? wt(
|
|
158
158
|
e.priceCents,
|
|
159
159
|
t,
|
|
160
160
|
r.language ?? "en",
|
|
161
161
|
a("common.freeOfCharge")
|
|
162
162
|
) : void 0;
|
|
163
|
-
return /* @__PURE__ */
|
|
163
|
+
return /* @__PURE__ */ y(
|
|
164
164
|
"p",
|
|
165
165
|
{
|
|
166
166
|
"data-component": "practice-result-first-visit",
|
|
167
167
|
className: "type-body-sm ds:m-0 ds:flex ds:flex-wrap ds:items-baseline ds:gap-x-[var(--spacing-xs)] ds:text-[var(--foreground)]",
|
|
168
168
|
children: [
|
|
169
169
|
/* @__PURE__ */ n("span", { dir: "auto", className: "ds:font-[var(--font-weight-semibold)]", children: e.label }),
|
|
170
|
-
i ? /* @__PURE__ */
|
|
170
|
+
i ? /* @__PURE__ */ y(Ze, { children: [
|
|
171
171
|
/* @__PURE__ */ n("span", { className: "ds:sr-only", children: ": " }),
|
|
172
172
|
/* @__PURE__ */ n("span", { className: "ds:text-[var(--muted-foreground)]", children: i })
|
|
173
173
|
] }) : null
|
|
@@ -175,159 +175,159 @@ function Mn({
|
|
|
175
175
|
}
|
|
176
176
|
);
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function In({
|
|
179
179
|
result: e,
|
|
180
180
|
nameHeadingLevel: t,
|
|
181
181
|
context: a,
|
|
182
182
|
children: r
|
|
183
183
|
}) {
|
|
184
|
-
const { t: i, i18n: s } = _("ui"), c = s.language ?? "en", l =
|
|
184
|
+
const { t: i, i18n: s } = _("ui"), c = s.language ?? "en", l = T(null), o = Ie("(min-width: 640px)") ? 5 : 3, [d, g] = Y(() => ht(/* @__PURE__ */ new Date())), [p, w] = Y(0), [b, k] = Y(!1), [S, E] = Y(
|
|
185
185
|
() => typeof IntersectionObserver > "u"
|
|
186
|
-
), [
|
|
186
|
+
), [O, F] = Y(
|
|
187
187
|
() => a.cache.get(e.id) ?? {}
|
|
188
|
-
),
|
|
188
|
+
), H = T(
|
|
189
189
|
new Map(
|
|
190
190
|
Object.keys(a.cache.get(e.id) ?? {}).map((u) => [
|
|
191
191
|
u,
|
|
192
192
|
"done"
|
|
193
193
|
])
|
|
194
194
|
)
|
|
195
|
-
),
|
|
196
|
-
|
|
195
|
+
), M = T(!0), h = T({ result: e, context: a });
|
|
196
|
+
G(() => {
|
|
197
197
|
h.current = { result: e, context: a };
|
|
198
|
-
}),
|
|
199
|
-
|
|
200
|
-
}), []),
|
|
198
|
+
}), G(() => (M.current = !0, () => {
|
|
199
|
+
M.current = !1;
|
|
200
|
+
}), []), G(() => {
|
|
201
201
|
if (S) return;
|
|
202
202
|
const u = l.current;
|
|
203
203
|
if (!u) return;
|
|
204
|
-
const
|
|
205
|
-
(
|
|
206
|
-
|
|
204
|
+
const R = new IntersectionObserver(
|
|
205
|
+
(A) => {
|
|
206
|
+
A.some((ie) => ie.isIntersecting) && (E(!0), R.disconnect());
|
|
207
207
|
},
|
|
208
|
-
{ root: null, rootMargin:
|
|
208
|
+
{ root: null, rootMargin: Nn }
|
|
209
209
|
);
|
|
210
|
-
return
|
|
210
|
+
return R.observe(u), () => R.disconnect();
|
|
211
211
|
}, [S]);
|
|
212
|
-
const
|
|
213
|
-
(u,
|
|
214
|
-
const
|
|
215
|
-
return { from:
|
|
212
|
+
const C = B(
|
|
213
|
+
(u, R) => {
|
|
214
|
+
const A = qe(d, u);
|
|
215
|
+
return { from: A, key: `${Ne(A, "yyyy-MM-dd")}|${R}`, days: R };
|
|
216
216
|
},
|
|
217
217
|
[d]
|
|
218
|
-
),
|
|
219
|
-
(u,
|
|
220
|
-
const
|
|
221
|
-
if (
|
|
222
|
-
|
|
223
|
-
const { result:
|
|
218
|
+
), P = B(
|
|
219
|
+
(u, R) => {
|
|
220
|
+
const A = H.current.get(u.key);
|
|
221
|
+
if (A === "pending" || A === "done" || A === "error" && !R) return;
|
|
222
|
+
H.current.set(u.key, "pending"), F((V) => ({ ...V, [u.key]: { status: "loading" } }));
|
|
223
|
+
const { result: ie, context: W } = h.current;
|
|
224
224
|
Promise.resolve().then(
|
|
225
|
-
() => W.loadResultSlots(
|
|
226
|
-
from:
|
|
225
|
+
() => W.loadResultSlots(ie, {
|
|
226
|
+
from: Ne(u.from, "yyyy-MM-dd"),
|
|
227
227
|
days: u.days
|
|
228
228
|
})
|
|
229
|
-
).then((
|
|
230
|
-
const
|
|
231
|
-
return
|
|
232
|
-
...W.cache.get(
|
|
233
|
-
[u.key]: { status: "ready", days:
|
|
234
|
-
}), { status: "ready", days:
|
|
235
|
-
}).catch(() => (
|
|
236
|
-
|
|
229
|
+
).then((V) => {
|
|
230
|
+
const Q = Ln(V, u.from, u.days);
|
|
231
|
+
return H.current.set(u.key, "done"), W.cache.set(ie.id, {
|
|
232
|
+
...W.cache.get(ie.id),
|
|
233
|
+
[u.key]: { status: "ready", days: Q }
|
|
234
|
+
}), { status: "ready", days: Q };
|
|
235
|
+
}).catch(() => (H.current.set(u.key, "error"), { status: "error" })).then((V) => {
|
|
236
|
+
M.current && F((Q) => ({ ...Q, [u.key]: V }));
|
|
237
237
|
});
|
|
238
238
|
},
|
|
239
239
|
[]
|
|
240
|
-
),
|
|
241
|
-
const u =
|
|
240
|
+
), I = C(p, o), D = C(0, o), j = B(() => {
|
|
241
|
+
const u = ht(/* @__PURE__ */ new Date());
|
|
242
242
|
return u.getTime() === d.getTime() ? !1 : (g(u), w(0), k(!1), !0);
|
|
243
243
|
}, [d]);
|
|
244
|
-
|
|
244
|
+
G(() => {
|
|
245
245
|
if (!S) return;
|
|
246
246
|
const u = () => {
|
|
247
|
-
document.visibilityState === "visible" &&
|
|
247
|
+
document.visibilityState === "visible" && j();
|
|
248
248
|
};
|
|
249
249
|
return document.addEventListener("visibilitychange", u), () => document.removeEventListener("visibilitychange", u);
|
|
250
|
-
}, [S,
|
|
251
|
-
!S ||
|
|
252
|
-
}, [S,
|
|
253
|
-
S && p > 0 &&
|
|
254
|
-
}, [S,
|
|
255
|
-
const
|
|
256
|
-
const
|
|
257
|
-
|
|
258
|
-
kind:
|
|
259
|
-
key:
|
|
260
|
-
}, w(
|
|
261
|
-
},
|
|
262
|
-
|
|
263
|
-
var
|
|
264
|
-
const u =
|
|
265
|
-
if (!u || !
|
|
266
|
-
|
|
267
|
-
const
|
|
268
|
-
if (
|
|
250
|
+
}, [S, j]), G(() => {
|
|
251
|
+
!S || j() || P(D, !1);
|
|
252
|
+
}, [S, D.key, P]), G(() => {
|
|
253
|
+
S && p > 0 && P(I, !1);
|
|
254
|
+
}, [S, I.key, P]);
|
|
255
|
+
const $ = T(null), U = T(null), ae = (u, R) => {
|
|
256
|
+
const A = Math.max(0, u);
|
|
257
|
+
U.current = {
|
|
258
|
+
kind: R,
|
|
259
|
+
key: C(A, o).key
|
|
260
|
+
}, w(A), k(!1), P(C(A, o), !0);
|
|
261
|
+
}, v = O[I.key], L = !S || !v || v.status === "loading", se = (v == null ? void 0 : v.status) === "error";
|
|
262
|
+
G(() => {
|
|
263
|
+
var q;
|
|
264
|
+
const u = $.current, R = U.current;
|
|
265
|
+
if (!u || !R || L || R.key !== void 0 && R.key !== I.key) return;
|
|
266
|
+
U.current = null;
|
|
267
|
+
const A = R.kind;
|
|
268
|
+
if (A === "more") {
|
|
269
269
|
const Z = Array.from(
|
|
270
270
|
u.querySelectorAll('[role="group"]')
|
|
271
271
|
).find(
|
|
272
|
-
(
|
|
272
|
+
(ue) => ue.querySelectorAll("button").length > Se
|
|
273
273
|
);
|
|
274
|
-
(
|
|
274
|
+
(q = Z == null ? void 0 : Z.querySelectorAll("button")[Se]) == null || q.focus();
|
|
275
275
|
return;
|
|
276
276
|
}
|
|
277
|
-
const
|
|
278
|
-
`button[aria-label="${CSS.escape(
|
|
279
|
-
),
|
|
277
|
+
const ie = (Z) => i(Z === "next" ? "slotGrid.nextDays" : "slotGrid.previousDays"), W = (Z) => u.querySelector(
|
|
278
|
+
`button[aria-label="${CSS.escape(ie(Z))}"]`
|
|
279
|
+
), V = W(A), Q = W(A === "next" ? "previous" : "next"), J = V && !V.disabled ? V : Q;
|
|
280
280
|
requestAnimationFrame(() => {
|
|
281
281
|
const Z = document.activeElement;
|
|
282
|
-
Z && Z !== document.body && !u.contains(Z) ||
|
|
282
|
+
Z && Z !== document.body && !u.contains(Z) || J == null || J.focus();
|
|
283
283
|
});
|
|
284
|
-
}, [
|
|
285
|
-
const he = (u,
|
|
286
|
-
const
|
|
287
|
-
let W = u.label ?? "",
|
|
284
|
+
}, [L, I.key, b, i]);
|
|
285
|
+
const he = (u, R) => {
|
|
286
|
+
const A = typeof u.start == "string" ? be(u.start) : u.start, ie = typeof R.date == "string" ? be(R.date) : R.date;
|
|
287
|
+
let W = u.label ?? "", V = R.label ?? "";
|
|
288
288
|
try {
|
|
289
289
|
if (!W) {
|
|
290
|
-
const
|
|
290
|
+
const Q = new Intl.DateTimeFormat(c, {
|
|
291
291
|
hour: "numeric",
|
|
292
292
|
minute: "2-digit"
|
|
293
|
-
}),
|
|
294
|
-
W =
|
|
293
|
+
}), J = typeof u.end == "string" ? be(u.end) : u.end;
|
|
294
|
+
W = J && typeof Q.formatRange == "function" ? Q.formatRange(A, J) : Q.format(A);
|
|
295
295
|
}
|
|
296
|
-
|
|
296
|
+
V || (V = new Intl.DateTimeFormat(c, {
|
|
297
297
|
weekday: "long",
|
|
298
298
|
day: "numeric",
|
|
299
299
|
month: "long"
|
|
300
|
-
}).format(
|
|
300
|
+
}).format(ie));
|
|
301
301
|
} catch {
|
|
302
|
-
W = W || String(u.start),
|
|
302
|
+
W = W || String(u.start), V = V || String(R.date);
|
|
303
303
|
}
|
|
304
304
|
return i("practiceResults.slotCards.slotLabel", {
|
|
305
305
|
practice: e.name,
|
|
306
|
-
day:
|
|
306
|
+
day: V,
|
|
307
307
|
time: W
|
|
308
308
|
});
|
|
309
309
|
};
|
|
310
|
-
let
|
|
311
|
-
|
|
312
|
-
date:
|
|
310
|
+
let ce, me = 0;
|
|
311
|
+
L ? ce = Array.from({ length: o }, (u, R) => ({
|
|
312
|
+
date: qe(I.from, R),
|
|
313
313
|
slots: []
|
|
314
|
-
})) :
|
|
315
|
-
const
|
|
316
|
-
...
|
|
317
|
-
ariaLabel:
|
|
314
|
+
})) : se || !v || v.status !== "ready" ? ce = [] : ce = v.days.map((u) => {
|
|
315
|
+
const R = u.slots.map((A) => ({
|
|
316
|
+
...A,
|
|
317
|
+
ariaLabel: A.ariaLabel ?? he(A, u)
|
|
318
318
|
}));
|
|
319
|
-
return b ? { ...u, slots:
|
|
319
|
+
return b ? { ...u, slots: R } : (me += Math.max(0, R.length - Se), { ...u, slots: R.slice(0, Se) });
|
|
320
320
|
});
|
|
321
|
-
const
|
|
321
|
+
const ye = /* @__PURE__ */ y(
|
|
322
322
|
"div",
|
|
323
323
|
{
|
|
324
324
|
ref: (u) => {
|
|
325
|
-
l.current = u,
|
|
325
|
+
l.current = u, $.current = u;
|
|
326
326
|
},
|
|
327
327
|
"data-component": "practice-result-slots",
|
|
328
328
|
className: "ds:flex ds:min-h-[16rem] ds:min-w-0 ds:basis-full ds:flex-col ds:gap-[var(--spacing-xs)] ds:@min-[800px]/result-card:basis-[28rem] ds:@min-[800px]/result-card:shrink-0",
|
|
329
329
|
children: [
|
|
330
|
-
|
|
330
|
+
se ? /* @__PURE__ */ y(
|
|
331
331
|
"div",
|
|
332
332
|
{
|
|
333
333
|
role: "alert",
|
|
@@ -340,7 +340,7 @@ function Ln({
|
|
|
340
340
|
intent: "secondary",
|
|
341
341
|
size: "sm",
|
|
342
342
|
onClick: () => {
|
|
343
|
-
|
|
343
|
+
U.current = null, P(I, !0);
|
|
344
344
|
},
|
|
345
345
|
children: i("practiceResults.error.retry")
|
|
346
346
|
}
|
|
@@ -348,7 +348,7 @@ function Ln({
|
|
|
348
348
|
]
|
|
349
349
|
}
|
|
350
350
|
) : /* @__PURE__ */ n(
|
|
351
|
-
|
|
351
|
+
gn,
|
|
352
352
|
{
|
|
353
353
|
role: "group",
|
|
354
354
|
size: "sm",
|
|
@@ -357,25 +357,25 @@ function Ln({
|
|
|
357
357
|
ariaLabel: i("practiceResults.slotCards.gridLabel", {
|
|
358
358
|
practice: e.name
|
|
359
359
|
}),
|
|
360
|
-
days:
|
|
361
|
-
state:
|
|
360
|
+
days: ce,
|
|
361
|
+
state: L ? "loading" : "default",
|
|
362
362
|
dayHeadingLevel: Math.min(6, Math.max(3, t + 1)),
|
|
363
363
|
maxInitialSlotsPerDay: Number.MAX_SAFE_INTEGER,
|
|
364
364
|
hasPrevious: p > 0,
|
|
365
|
-
hasNext: p + o <
|
|
366
|
-
onPreviousDays: () =>
|
|
367
|
-
onNextDays: () =>
|
|
368
|
-
onSlotSelect: (u,
|
|
365
|
+
hasNext: p + o < Sn,
|
|
366
|
+
onPreviousDays: () => ae(p - o, "previous"),
|
|
367
|
+
onNextDays: () => ae(p + o, "next"),
|
|
368
|
+
onSlotSelect: (u, R) => a.onSlotSelect(e, u, R)
|
|
369
369
|
}
|
|
370
370
|
),
|
|
371
|
-
|
|
371
|
+
me > 0 ? /* @__PURE__ */ n(
|
|
372
372
|
ve,
|
|
373
373
|
{
|
|
374
374
|
intent: "ghost",
|
|
375
375
|
size: "sm",
|
|
376
376
|
className: "ds:self-start",
|
|
377
377
|
onClick: () => {
|
|
378
|
-
|
|
378
|
+
U.current = { kind: "more" }, k(!0);
|
|
379
379
|
},
|
|
380
380
|
children: i("practiceResults.slotCards.showMoreTimes")
|
|
381
381
|
}
|
|
@@ -383,16 +383,16 @@ function Ln({
|
|
|
383
383
|
]
|
|
384
384
|
}
|
|
385
385
|
);
|
|
386
|
-
return /* @__PURE__ */ n(
|
|
386
|
+
return /* @__PURE__ */ n(Ze, { children: r(ye) });
|
|
387
387
|
}
|
|
388
|
-
const
|
|
388
|
+
const An = 13, gt = [
|
|
389
389
|
"distance",
|
|
390
390
|
"rating",
|
|
391
391
|
"next-available",
|
|
392
392
|
"price",
|
|
393
393
|
"relevance"
|
|
394
394
|
];
|
|
395
|
-
function
|
|
395
|
+
function Nt(e, t, a) {
|
|
396
396
|
const r = `languages.${e}`;
|
|
397
397
|
return a.exists(r) ? t(r) : e.toUpperCase();
|
|
398
398
|
}
|
|
@@ -410,11 +410,11 @@ function ge(e, t, a, r) {
|
|
|
410
410
|
const s = e[i];
|
|
411
411
|
s && (ne("serp_result_clicked", { resultId: t, source: a, position: i }), r(s, a));
|
|
412
412
|
}
|
|
413
|
-
function
|
|
413
|
+
function Tn(e, t) {
|
|
414
414
|
const r = (t.lat - e.lat) * Math.PI / 180, i = (t.lng - e.lng) * Math.PI / 180, s = e.lat * Math.PI / 180, c = t.lat * Math.PI / 180, l = Math.sin(r / 2), f = Math.sin(i / 2), o = l * l + Math.cos(s) * Math.cos(c) * f * f;
|
|
415
415
|
return 2 * 6371 * Math.asin(Math.min(1, Math.sqrt(o)));
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function Fn(e, t, a) {
|
|
418
418
|
var i;
|
|
419
419
|
const r = [];
|
|
420
420
|
for (const s of e) {
|
|
@@ -425,7 +425,7 @@ function An(e, t, a) {
|
|
|
425
425
|
}
|
|
426
426
|
return r;
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function _n(e, t, a) {
|
|
429
429
|
return !t || Object.keys(t).length === 0 ? e : e.filter((r) => {
|
|
430
430
|
for (const i of a) {
|
|
431
431
|
const s = t[i.key];
|
|
@@ -440,33 +440,33 @@ function Fn(e, t, a) {
|
|
|
440
440
|
return !0;
|
|
441
441
|
});
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function Hn(e) {
|
|
444
444
|
const t = e.firstVisitPrice && Number.isFinite(e.firstVisitPrice.minCents) ? e.firstVisitPrice.minCents : e.firstVisitPriceCents;
|
|
445
445
|
return t != null && Number.isFinite(t) && t >= 0 ? t : 1 / 0;
|
|
446
446
|
}
|
|
447
|
-
function
|
|
447
|
+
function Dn(e) {
|
|
448
448
|
return e.firstVisitPrice && Number.isFinite(e.firstVisitPrice.minCents) ? e.firstVisitPrice.kind === "fixed" : !0;
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function vt(e, t) {
|
|
451
451
|
return e == null && t == null ? 0 : e == null ? 1 : t == null ? -1 : e - t;
|
|
452
452
|
}
|
|
453
|
-
function
|
|
453
|
+
function En(e, t, a) {
|
|
454
454
|
const r = e.map((s) => {
|
|
455
|
-
const c = s.location ? s.location.distanceKm ?? (a ?
|
|
455
|
+
const c = s.location ? s.location.distanceKm ?? (a ? Tn(a, s.location) : void 0) : void 0;
|
|
456
456
|
return {
|
|
457
457
|
result: s,
|
|
458
458
|
distanceKm: c,
|
|
459
|
-
price: t === "price" ?
|
|
460
|
-
fixed: t === "price" ?
|
|
459
|
+
price: t === "price" ? Hn(s) : void 0,
|
|
460
|
+
fixed: t === "price" ? Dn(s) : !1
|
|
461
461
|
};
|
|
462
462
|
}), i = (s, c) => {
|
|
463
463
|
var l, f, o, d;
|
|
464
464
|
switch (t) {
|
|
465
465
|
case "distance":
|
|
466
|
-
return
|
|
466
|
+
return vt(s.distanceKm, c.distanceKm);
|
|
467
467
|
case "price": {
|
|
468
468
|
const g = s.price ?? 1 / 0, p = c.price ?? 1 / 0;
|
|
469
|
-
return g !== p ? g - p : g !== 1 / 0 && s.fixed !== c.fixed ? s.fixed ? -1 : 1 :
|
|
469
|
+
return g !== p ? g - p : g !== 1 / 0 && s.fixed !== c.fixed ? s.fixed ? -1 : 1 : vt(s.distanceKm, c.distanceKm);
|
|
470
470
|
}
|
|
471
471
|
case "rating": {
|
|
472
472
|
const g = ((l = s.result.rating) == null ? void 0 : l.value) ?? -1;
|
|
@@ -488,7 +488,7 @@ function Hn(e, t, a) {
|
|
|
488
488
|
} : s
|
|
489
489
|
);
|
|
490
490
|
}
|
|
491
|
-
function
|
|
491
|
+
function On(e) {
|
|
492
492
|
let t = -1 / 0, a = 1 / 0, r = -1 / 0, i = 1 / 0, s = !1;
|
|
493
493
|
for (const c of e) {
|
|
494
494
|
if (!c.location) continue;
|
|
@@ -499,7 +499,7 @@ function Dn(e) {
|
|
|
499
499
|
if (s)
|
|
500
500
|
return { north: t, south: a, east: r, west: i };
|
|
501
501
|
}
|
|
502
|
-
const
|
|
502
|
+
const Vn = de(
|
|
503
503
|
"ds:flex ds:w-full ds:flex-col ds:text-[var(--foreground)] ds:gap-[var(--spacing-md)]",
|
|
504
504
|
{
|
|
505
505
|
variants: {
|
|
@@ -513,7 +513,7 @@ const On = le(
|
|
|
513
513
|
defaultVariants: { variant: "split-list-map" }
|
|
514
514
|
}
|
|
515
515
|
);
|
|
516
|
-
function
|
|
516
|
+
function Mt({
|
|
517
517
|
heading: e,
|
|
518
518
|
headingLevel: t,
|
|
519
519
|
intro: a,
|
|
@@ -526,7 +526,7 @@ function St({
|
|
|
526
526
|
count: r,
|
|
527
527
|
place: i
|
|
528
528
|
}) : s("practiceResults.results.summary", { count: r }) : void 0;
|
|
529
|
-
return /* @__PURE__ */
|
|
529
|
+
return /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
530
530
|
e ? /* @__PURE__ */ n(c, { className: "type-title-section ds:m-0 ds:text-[var(--foreground)]", children: e }) : null,
|
|
531
531
|
a ? /* @__PURE__ */ n("p", { className: "type-body ds:m-0 ds:text-[var(--muted-foreground)]", children: a }) : null,
|
|
532
532
|
l ? /* @__PURE__ */ n(
|
|
@@ -539,7 +539,7 @@ function St({
|
|
|
539
539
|
) : null
|
|
540
540
|
] });
|
|
541
541
|
}
|
|
542
|
-
const
|
|
542
|
+
const Le = de(
|
|
543
543
|
[
|
|
544
544
|
"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
545
545
|
"ds:min-h-[var(--min-target-size)]",
|
|
@@ -561,7 +561,7 @@ const Me = le(
|
|
|
561
561
|
},
|
|
562
562
|
defaultVariants: { state: "idle" }
|
|
563
563
|
}
|
|
564
|
-
),
|
|
564
|
+
), Bn = de(
|
|
565
565
|
"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
566
566
|
{
|
|
567
567
|
variants: {
|
|
@@ -580,7 +580,7 @@ const Me = le(
|
|
|
580
580
|
},
|
|
581
581
|
defaultVariants: { placement: "inline" }
|
|
582
582
|
}
|
|
583
|
-
),
|
|
583
|
+
), $n = de(
|
|
584
584
|
[
|
|
585
585
|
"ds:ms-[var(--spacing-xs)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
586
586
|
"ds:min-h-[var(--min-target-size)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]",
|
|
@@ -591,13 +591,13 @@ const Me = le(
|
|
|
591
591
|
"ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
|
|
592
592
|
].join(" ")
|
|
593
593
|
);
|
|
594
|
-
function
|
|
594
|
+
function Lt({
|
|
595
595
|
facets: e,
|
|
596
596
|
value: t,
|
|
597
597
|
onChange: a,
|
|
598
598
|
floating: r
|
|
599
599
|
}) {
|
|
600
|
-
const { t: i } = _("ui"), s =
|
|
600
|
+
const { t: i } = _("ui"), s = K(() => t ?? {}, [t]), c = K(
|
|
601
601
|
() => Object.values(s).some((d) => d && d.length > 0),
|
|
602
602
|
[s]
|
|
603
603
|
), l = (d, g) => {
|
|
@@ -612,13 +612,13 @@ function Nt({
|
|
|
612
612
|
let b;
|
|
613
613
|
d.multi ? b = w ? p.filter((k) => k !== g) : [...p, g] : b = w ? [] : [g], l(d.key, b);
|
|
614
614
|
};
|
|
615
|
-
return e.length === 0 ? null : /* @__PURE__ */
|
|
615
|
+
return e.length === 0 ? null : /* @__PURE__ */ y(
|
|
616
616
|
"div",
|
|
617
617
|
{
|
|
618
618
|
"data-component": "practice-results-filters",
|
|
619
619
|
role: "group",
|
|
620
620
|
"aria-label": i("practiceResults.filters.label"),
|
|
621
|
-
className:
|
|
621
|
+
className: Bn({
|
|
622
622
|
placement: r ? "floating" : "inline"
|
|
623
623
|
}),
|
|
624
624
|
children: [
|
|
@@ -632,7 +632,7 @@ function Nt({
|
|
|
632
632
|
"aria-pressed": w,
|
|
633
633
|
"aria-label": d.label,
|
|
634
634
|
onClick: () => f(d.key),
|
|
635
|
-
className:
|
|
635
|
+
className: Le({
|
|
636
636
|
state: w ? "active" : "idle"
|
|
637
637
|
}),
|
|
638
638
|
children: /* @__PURE__ */ n("span", { children: d.label })
|
|
@@ -640,22 +640,22 @@ function Nt({
|
|
|
640
640
|
d.key
|
|
641
641
|
);
|
|
642
642
|
const b = w ? ` (${p.length})` : "";
|
|
643
|
-
return /* @__PURE__ */
|
|
644
|
-
/* @__PURE__ */ n(
|
|
643
|
+
return /* @__PURE__ */ y(le.Root, { children: [
|
|
644
|
+
/* @__PURE__ */ n(le.Trigger, { asChild: !0, children: /* @__PURE__ */ y(
|
|
645
645
|
"button",
|
|
646
646
|
{
|
|
647
647
|
type: "button",
|
|
648
648
|
"aria-label": `${d.label}${b}`,
|
|
649
|
-
className:
|
|
649
|
+
className: Le({
|
|
650
650
|
state: w ? "active" : "idle"
|
|
651
651
|
}),
|
|
652
652
|
children: [
|
|
653
|
-
/* @__PURE__ */
|
|
653
|
+
/* @__PURE__ */ y("span", { children: [
|
|
654
654
|
d.label,
|
|
655
655
|
b
|
|
656
656
|
] }),
|
|
657
657
|
/* @__PURE__ */ n(
|
|
658
|
-
|
|
658
|
+
kt,
|
|
659
659
|
{
|
|
660
660
|
"aria-hidden": "true",
|
|
661
661
|
className: "ds:size-3.5 ds:shrink-0"
|
|
@@ -664,8 +664,8 @@ function Nt({
|
|
|
664
664
|
]
|
|
665
665
|
}
|
|
666
666
|
) }),
|
|
667
|
-
/* @__PURE__ */ n(
|
|
668
|
-
|
|
667
|
+
/* @__PURE__ */ n(le.Content, { sideOffset: 8, align: "start", children: d.options.map((k) => /* @__PURE__ */ n(
|
|
668
|
+
le.CheckboxItem,
|
|
669
669
|
{
|
|
670
670
|
checked: p.includes(k.value),
|
|
671
671
|
onSelect: (S) => {
|
|
@@ -684,7 +684,7 @@ function Nt({
|
|
|
684
684
|
onClick: () => {
|
|
685
685
|
a({}), ne("serp_filter_changed", { key: "*", values: [] });
|
|
686
686
|
},
|
|
687
|
-
className:
|
|
687
|
+
className: $n(),
|
|
688
688
|
children: i("practiceResults.filters.clear")
|
|
689
689
|
}
|
|
690
690
|
) : null
|
|
@@ -692,7 +692,7 @@ function Nt({
|
|
|
692
692
|
}
|
|
693
693
|
);
|
|
694
694
|
}
|
|
695
|
-
function
|
|
695
|
+
function Ge({ value: e, options: t, onChange: a }) {
|
|
696
696
|
const { t: r } = _("ui"), i = (s) => {
|
|
697
697
|
switch (s) {
|
|
698
698
|
case "distance":
|
|
@@ -708,47 +708,47 @@ function je({ value: e, options: t, onChange: a }) {
|
|
|
708
708
|
return r("practiceResults.sort.relevance");
|
|
709
709
|
}
|
|
710
710
|
};
|
|
711
|
-
return /* @__PURE__ */
|
|
712
|
-
/* @__PURE__ */ n(
|
|
711
|
+
return /* @__PURE__ */ y(le.Root, { children: [
|
|
712
|
+
/* @__PURE__ */ n(le.Trigger, { asChild: !0, children: /* @__PURE__ */ y(
|
|
713
713
|
"button",
|
|
714
714
|
{
|
|
715
715
|
type: "button",
|
|
716
716
|
"aria-label": `${r("practiceResults.sort.label")}: ${i(e)}`,
|
|
717
|
-
className:
|
|
717
|
+
className: Le({ state: "idle" }),
|
|
718
718
|
children: [
|
|
719
|
-
/* @__PURE__ */
|
|
719
|
+
/* @__PURE__ */ y("span", { children: [
|
|
720
720
|
r("practiceResults.sort.label"),
|
|
721
721
|
": ",
|
|
722
722
|
i(e)
|
|
723
723
|
] }),
|
|
724
|
-
/* @__PURE__ */ n(
|
|
724
|
+
/* @__PURE__ */ n(kt, { "aria-hidden": "true", className: "ds:size-3.5 ds:shrink-0" })
|
|
725
725
|
]
|
|
726
726
|
}
|
|
727
727
|
) }),
|
|
728
|
-
/* @__PURE__ */ n(
|
|
729
|
-
|
|
728
|
+
/* @__PURE__ */ n(le.Content, { sideOffset: 8, align: "end", children: /* @__PURE__ */ n(
|
|
729
|
+
le.RadioGroup,
|
|
730
730
|
{
|
|
731
731
|
value: e,
|
|
732
732
|
onValueChange: (s) => {
|
|
733
733
|
const c = s;
|
|
734
734
|
c !== e && (a(c), ne("serp_sort_changed", { sort: c }));
|
|
735
735
|
},
|
|
736
|
-
children: t.map((s) => /* @__PURE__ */ n(
|
|
736
|
+
children: t.map((s) => /* @__PURE__ */ n(le.RadioItem, { value: s, children: i(s) }, s))
|
|
737
737
|
}
|
|
738
738
|
) })
|
|
739
739
|
] });
|
|
740
740
|
}
|
|
741
|
-
function
|
|
742
|
-
const { t, i18n: a } = _("ui"), r =
|
|
741
|
+
function zn({ distanceKm: e }) {
|
|
742
|
+
const { t, i18n: a } = _("ui"), r = K(() => {
|
|
743
743
|
if (e < 1) return t("practiceResults.distance.below");
|
|
744
744
|
const i = new Intl.NumberFormat(a.language, {
|
|
745
745
|
maximumFractionDigits: 1
|
|
746
746
|
}).format(e);
|
|
747
747
|
return t("practiceResults.distance.km", { distance: i });
|
|
748
748
|
}, [e, t, a.language]);
|
|
749
|
-
return /* @__PURE__ */ n(
|
|
749
|
+
return /* @__PURE__ */ n(oe, { variant: "neutral", leading: /* @__PURE__ */ n(Me, { "aria-hidden": "true" }), children: r });
|
|
750
750
|
}
|
|
751
|
-
const
|
|
751
|
+
const Ue = de(
|
|
752
752
|
[
|
|
753
753
|
"ds:w-[12rem] ds:h-[8rem] ds:shrink-0",
|
|
754
754
|
"ds:rounded-[var(--radius-md)] ds:overflow-hidden"
|
|
@@ -767,22 +767,22 @@ const qe = le(
|
|
|
767
767
|
defaultVariants: { state: "placeholder" }
|
|
768
768
|
}
|
|
769
769
|
);
|
|
770
|
-
function
|
|
770
|
+
function Kn() {
|
|
771
771
|
if (typeof document > "u") return "6761e5";
|
|
772
772
|
const e = getComputedStyle(document.documentElement).getPropertyValue("--map-marker-color").trim(), t = /^#?([0-9a-fA-F]{6})$/.exec(e);
|
|
773
773
|
return t ? t[1] : "6761e5";
|
|
774
774
|
}
|
|
775
|
-
function
|
|
775
|
+
function yt({
|
|
776
776
|
address: e,
|
|
777
777
|
addressLang: t
|
|
778
778
|
}) {
|
|
779
|
-
return /* @__PURE__ */
|
|
779
|
+
return /* @__PURE__ */ y(
|
|
780
780
|
"div",
|
|
781
781
|
{
|
|
782
782
|
"aria-hidden": e ? void 0 : "true",
|
|
783
|
-
className:
|
|
783
|
+
className: Ue({ state: "placeholder" }),
|
|
784
784
|
children: [
|
|
785
|
-
/* @__PURE__ */ n(
|
|
785
|
+
/* @__PURE__ */ n(Me, { "aria-hidden": "true", className: "ds:size-5 ds:shrink-0" }),
|
|
786
786
|
e ? /* @__PURE__ */ n(
|
|
787
787
|
"span",
|
|
788
788
|
{
|
|
@@ -796,7 +796,7 @@ function gt({
|
|
|
796
796
|
}
|
|
797
797
|
);
|
|
798
798
|
}
|
|
799
|
-
function
|
|
799
|
+
function jn({
|
|
800
800
|
image: e,
|
|
801
801
|
apiKey: t,
|
|
802
802
|
center: a,
|
|
@@ -804,7 +804,7 @@ function zn({
|
|
|
804
804
|
address: i,
|
|
805
805
|
addressLang: s
|
|
806
806
|
}) {
|
|
807
|
-
const { t: c } = _("ui"), [l, f] =
|
|
807
|
+
const { t: c } = _("ui"), [l, f] = Y(null);
|
|
808
808
|
if (e && l !== e.src)
|
|
809
809
|
return /* @__PURE__ */ n(
|
|
810
810
|
"img",
|
|
@@ -817,14 +817,14 @@ function zn({
|
|
|
817
817
|
width: 240,
|
|
818
818
|
height: 160,
|
|
819
819
|
onError: () => f(e.src),
|
|
820
|
-
className:
|
|
820
|
+
className: Ue({ state: "image" })
|
|
821
821
|
}
|
|
822
822
|
);
|
|
823
823
|
if (e)
|
|
824
|
-
return /* @__PURE__ */ n(
|
|
824
|
+
return /* @__PURE__ */ n(yt, { address: i, addressLang: s });
|
|
825
825
|
if (!t)
|
|
826
|
-
return /* @__PURE__ */ n(
|
|
827
|
-
const o =
|
|
826
|
+
return /* @__PURE__ */ n(yt, { address: i, addressLang: s });
|
|
827
|
+
const o = Kn(), d = `https://maps.googleapis.com/maps/api/staticmap?center=${a.lat},${a.lng}&zoom=${r}&size=240x160&scale=2&markers=color:0x${o}%7C${a.lat},${a.lng}&key=${encodeURIComponent(t)}`;
|
|
828
828
|
return /* @__PURE__ */ n(
|
|
829
829
|
"img",
|
|
830
830
|
{
|
|
@@ -834,11 +834,11 @@ function zn({
|
|
|
834
834
|
decoding: "async",
|
|
835
835
|
width: 240,
|
|
836
836
|
height: 160,
|
|
837
|
-
className:
|
|
837
|
+
className: Ue({ state: "image" })
|
|
838
838
|
}
|
|
839
839
|
);
|
|
840
840
|
}
|
|
841
|
-
function
|
|
841
|
+
function qn({ tagline: e, lang: t }) {
|
|
842
842
|
return e ? /* @__PURE__ */ n(
|
|
843
843
|
"span",
|
|
844
844
|
{
|
|
@@ -850,7 +850,7 @@ function Kn({ tagline: e, lang: t }) {
|
|
|
850
850
|
}
|
|
851
851
|
) : null;
|
|
852
852
|
}
|
|
853
|
-
function
|
|
853
|
+
function Gn(e) {
|
|
854
854
|
if (typeof e != "string") return;
|
|
855
855
|
const t = e.trim().replace(/_/g, "-");
|
|
856
856
|
if (t)
|
|
@@ -860,11 +860,11 @@ function jn(e) {
|
|
|
860
860
|
return;
|
|
861
861
|
}
|
|
862
862
|
}
|
|
863
|
-
function
|
|
863
|
+
function Pt({
|
|
864
864
|
review: e
|
|
865
865
|
}) {
|
|
866
866
|
const { t } = _("ui"), a = typeof (e == null ? void 0 : e.text) == "string" ? e.text.trim() : "";
|
|
867
|
-
return !e || !a ? null : /* @__PURE__ */
|
|
867
|
+
return !e || !a ? null : /* @__PURE__ */ y(
|
|
868
868
|
"p",
|
|
869
869
|
{
|
|
870
870
|
"data-component": "practice-result-latest-review",
|
|
@@ -875,7 +875,7 @@ function Mt({
|
|
|
875
875
|
/* @__PURE__ */ n(
|
|
876
876
|
"span",
|
|
877
877
|
{
|
|
878
|
-
lang:
|
|
878
|
+
lang: Gn(e.lang),
|
|
879
879
|
dir: "auto",
|
|
880
880
|
className: "ds:min-w-0 ds:truncate",
|
|
881
881
|
children: a
|
|
@@ -885,7 +885,7 @@ function Mt({
|
|
|
885
885
|
}
|
|
886
886
|
);
|
|
887
887
|
}
|
|
888
|
-
const
|
|
888
|
+
const Un = de(
|
|
889
889
|
"type-body-sm ds:m-0 ds:text-[var(--muted-foreground)] ds:whitespace-pre-line ds:break-words",
|
|
890
890
|
{
|
|
891
891
|
variants: {
|
|
@@ -897,7 +897,7 @@ const qn = le(
|
|
|
897
897
|
defaultVariants: { density: "compact" }
|
|
898
898
|
}
|
|
899
899
|
);
|
|
900
|
-
function
|
|
900
|
+
function It({
|
|
901
901
|
description: e,
|
|
902
902
|
density: t,
|
|
903
903
|
lang: a
|
|
@@ -908,26 +908,26 @@ function Lt({
|
|
|
908
908
|
"data-component": "practice-result-description",
|
|
909
909
|
lang: a,
|
|
910
910
|
dir: "auto",
|
|
911
|
-
className:
|
|
911
|
+
className: Un({ density: t }),
|
|
912
912
|
children: e
|
|
913
913
|
}
|
|
914
914
|
) : null;
|
|
915
915
|
}
|
|
916
|
-
function
|
|
916
|
+
function Wn(e, t, a, r) {
|
|
917
917
|
if (e.kind === "fixed")
|
|
918
|
-
return
|
|
918
|
+
return wt(
|
|
919
919
|
e.minCents,
|
|
920
920
|
t,
|
|
921
921
|
a,
|
|
922
922
|
r("common.freeOfCharge")
|
|
923
923
|
);
|
|
924
|
-
const i =
|
|
924
|
+
const i = pt(e.minCents, t, a);
|
|
925
925
|
return e.kind === "range" && e.maxCents != null && Number.isFinite(e.maxCents) && e.maxCents > e.minCents ? r("practiceResults.card.priceRange", {
|
|
926
926
|
min: i,
|
|
927
|
-
max:
|
|
927
|
+
max: pt(e.maxCents, t, a)
|
|
928
928
|
}) : r("practiceResults.card.priceFrom", { price: i });
|
|
929
929
|
}
|
|
930
|
-
const
|
|
930
|
+
const Zn = de(
|
|
931
931
|
"ds:min-w-0 ds:max-w-full ds:[overflow-wrap:anywhere]",
|
|
932
932
|
{
|
|
933
933
|
variants: {
|
|
@@ -935,14 +935,14 @@ const Un = le(
|
|
|
935
935
|
}
|
|
936
936
|
}
|
|
937
937
|
);
|
|
938
|
-
function
|
|
938
|
+
function Xn({
|
|
939
939
|
price: e,
|
|
940
940
|
cents: t,
|
|
941
941
|
currencyCode: a = "EUR"
|
|
942
942
|
}) {
|
|
943
943
|
var p;
|
|
944
|
-
const { t: r, i18n: i } = _("ui"), s = e && Number.isFinite(e.minCents) ? e : void 0, c = (s == null ? void 0 : s.kind) ?? "fixed", l = (s == null ? void 0 : s.minCents) ?? t, f = s == null ? void 0 : s.maxCents, o =
|
|
945
|
-
() => l == null ? void 0 :
|
|
944
|
+
const { t: r, i18n: i } = _("ui"), s = e && Number.isFinite(e.minCents) ? e : void 0, c = (s == null ? void 0 : s.kind) ?? "fixed", l = (s == null ? void 0 : s.minCents) ?? t, f = s == null ? void 0 : s.maxCents, o = K(
|
|
945
|
+
() => l == null ? void 0 : Wn(
|
|
946
946
|
{ kind: c, minCents: l, maxCents: f },
|
|
947
947
|
a,
|
|
948
948
|
i.language ?? "en",
|
|
@@ -952,7 +952,7 @@ function Wn({
|
|
|
952
952
|
);
|
|
953
953
|
if (o === void 0) return null;
|
|
954
954
|
const d = (p = s == null ? void 0 : s.label) == null ? void 0 : p.trim().replace(/:$/, "").trim(), g = d || r("practiceResults.card.firstVisitPrice");
|
|
955
|
-
return /* @__PURE__ */
|
|
955
|
+
return /* @__PURE__ */ y(
|
|
956
956
|
"span",
|
|
957
957
|
{
|
|
958
958
|
"data-component": "practice-result-price",
|
|
@@ -963,7 +963,7 @@ function Wn({
|
|
|
963
963
|
{
|
|
964
964
|
dir: "auto",
|
|
965
965
|
title: g,
|
|
966
|
-
className:
|
|
966
|
+
className: Zn({
|
|
967
967
|
practiceWritten: !!d
|
|
968
968
|
}),
|
|
969
969
|
children: g
|
|
@@ -971,7 +971,7 @@ function Wn({
|
|
|
971
971
|
),
|
|
972
972
|
/* @__PURE__ */ n("span", { className: "ds:sr-only", children: ": " }),
|
|
973
973
|
/* @__PURE__ */ n(
|
|
974
|
-
|
|
974
|
+
oe,
|
|
975
975
|
{
|
|
976
976
|
variant: "accentSoft",
|
|
977
977
|
size: "lg",
|
|
@@ -984,11 +984,11 @@ function Wn({
|
|
|
984
984
|
}
|
|
985
985
|
);
|
|
986
986
|
}
|
|
987
|
-
function
|
|
987
|
+
function tt({ time: e }) {
|
|
988
988
|
const { t } = _("ui");
|
|
989
|
-
return /* @__PURE__ */
|
|
989
|
+
return /* @__PURE__ */ y("span", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
990
990
|
/* @__PURE__ */ n(
|
|
991
|
-
|
|
991
|
+
xn,
|
|
992
992
|
{
|
|
993
993
|
"aria-hidden": "true",
|
|
994
994
|
className: "ds:size-4 ds:text-[var(--primary)]"
|
|
@@ -997,7 +997,7 @@ function Je({ time: e }) {
|
|
|
997
997
|
t("practiceResults.nextSlot.summary", { time: e })
|
|
998
998
|
] });
|
|
999
999
|
}
|
|
1000
|
-
function
|
|
1000
|
+
function At({
|
|
1001
1001
|
result: e,
|
|
1002
1002
|
openLabel: t,
|
|
1003
1003
|
bookLabel: a,
|
|
@@ -1006,8 +1006,8 @@ function Pt({
|
|
|
1006
1006
|
onBookClick: s
|
|
1007
1007
|
}) {
|
|
1008
1008
|
const { t: c } = _("ui"), l = e.nextAvailableSlot, f = (l == null ? void 0 : l.bookingHref) ?? e.bookingHref ?? e.href, o = l && r ? c("practiceResults.nextSlot.cta", { time: r }) : a;
|
|
1009
|
-
return /* @__PURE__ */
|
|
1010
|
-
t !== void 0 ? /* @__PURE__ */ n(ve, { intent: "secondary", size: "sm", asChild: !0, onClick: i, children: /* @__PURE__ */
|
|
1009
|
+
return /* @__PURE__ */ y("div", { className: "ds:mt-[var(--spacing-xs)] ds:flex ds:flex-wrap ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)]", children: [
|
|
1010
|
+
t !== void 0 ? /* @__PURE__ */ n(ve, { intent: "secondary", size: "sm", asChild: !0, onClick: i, children: /* @__PURE__ */ y("a", { href: e.href, "data-component": "practice-result-open-cta", children: [
|
|
1011
1011
|
t,
|
|
1012
1012
|
" ",
|
|
1013
1013
|
/* @__PURE__ */ n("span", { className: "ds:sr-only", children: e.name })
|
|
@@ -1018,9 +1018,9 @@ function Pt({
|
|
|
1018
1018
|
intent: "primary",
|
|
1019
1019
|
size: "sm",
|
|
1020
1020
|
asChild: !0,
|
|
1021
|
-
startIcon: /* @__PURE__ */ n(
|
|
1021
|
+
startIcon: /* @__PURE__ */ n(wn, { "aria-hidden": "true" }),
|
|
1022
1022
|
onClick: s,
|
|
1023
|
-
children: /* @__PURE__ */
|
|
1023
|
+
children: /* @__PURE__ */ y(
|
|
1024
1024
|
"a",
|
|
1025
1025
|
{
|
|
1026
1026
|
href: f,
|
|
@@ -1037,7 +1037,7 @@ function Pt({
|
|
|
1037
1037
|
)
|
|
1038
1038
|
] });
|
|
1039
1039
|
}
|
|
1040
|
-
const
|
|
1040
|
+
const Tt = de(
|
|
1041
1041
|
[
|
|
1042
1042
|
"ds:@container/result-card ds:relative ds:flex ds:w-full ds:cursor-pointer",
|
|
1043
1043
|
"ds:rounded-[var(--radius-lg)]",
|
|
@@ -1077,18 +1077,18 @@ const It = le(
|
|
|
1077
1077
|
},
|
|
1078
1078
|
defaultVariants: { density: "compact" }
|
|
1079
1079
|
}
|
|
1080
|
-
),
|
|
1080
|
+
), Yn = de([
|
|
1081
1081
|
"ds:text-[var(--foreground)] ds:no-underline ds:hover:underline",
|
|
1082
1082
|
"ds:rounded-[var(--radius-xs)]",
|
|
1083
1083
|
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
1084
1084
|
"ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
1085
1085
|
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
1086
1086
|
]);
|
|
1087
|
-
function
|
|
1087
|
+
function Qn({
|
|
1088
1088
|
result: e,
|
|
1089
1089
|
headingLevel: t
|
|
1090
1090
|
}) {
|
|
1091
|
-
const a = `h${
|
|
1091
|
+
const a = `h${Ae(t)}`;
|
|
1092
1092
|
return /* @__PURE__ */ n(
|
|
1093
1093
|
a,
|
|
1094
1094
|
{
|
|
@@ -1101,14 +1101,14 @@ function Xn({
|
|
|
1101
1101
|
href: e.href,
|
|
1102
1102
|
dir: "auto",
|
|
1103
1103
|
"data-component": "practice-result-name-link",
|
|
1104
|
-
className:
|
|
1104
|
+
className: Yn(),
|
|
1105
1105
|
children: e.name
|
|
1106
1106
|
}
|
|
1107
1107
|
)
|
|
1108
1108
|
}
|
|
1109
1109
|
);
|
|
1110
1110
|
}
|
|
1111
|
-
function
|
|
1111
|
+
function Ft({
|
|
1112
1112
|
result: e,
|
|
1113
1113
|
headingLevel: t,
|
|
1114
1114
|
selected: a = !1
|
|
@@ -1120,30 +1120,30 @@ function At({
|
|
|
1120
1120
|
{
|
|
1121
1121
|
"data-component": "practice-result-heading",
|
|
1122
1122
|
className: "ds:@container/result-heading ds:min-w-0 ds:flex-1",
|
|
1123
|
-
children: /* @__PURE__ */
|
|
1124
|
-
/* @__PURE__ */
|
|
1125
|
-
/* @__PURE__ */
|
|
1126
|
-
/* @__PURE__ */ n(
|
|
1127
|
-
((i = e.location) == null ? void 0 : i.distanceKm) != null ? /* @__PURE__ */ n(
|
|
1123
|
+
children: /* @__PURE__ */ y("div", { className: "ds:flex ds:min-w-0 ds:flex-col ds:items-start ds:gap-[var(--spacing-xs)] ds:sm:@min-[280px]/result-heading:flex-row ds:sm:@min-[280px]/result-heading:gap-[var(--spacing-md)]", children: [
|
|
1124
|
+
/* @__PURE__ */ y("div", { className: "ds:flex ds:min-w-0 ds:w-full ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
1125
|
+
/* @__PURE__ */ y("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
1126
|
+
/* @__PURE__ */ n(Qn, { result: e, headingLevel: t }),
|
|
1127
|
+
((i = e.location) == null ? void 0 : i.distanceKm) != null ? /* @__PURE__ */ n(zn, { distanceKm: e.location.distanceKm }) : null,
|
|
1128
1128
|
a ? /* @__PURE__ */ n(
|
|
1129
|
-
|
|
1129
|
+
oe,
|
|
1130
1130
|
{
|
|
1131
1131
|
variant: "brand",
|
|
1132
1132
|
"data-component": "practice-result-selected-tag",
|
|
1133
|
-
leading: /* @__PURE__ */ n(
|
|
1133
|
+
leading: /* @__PURE__ */ n(Me, { "aria-hidden": "true" }),
|
|
1134
1134
|
children: r("practiceResults.selectedOnMap")
|
|
1135
1135
|
}
|
|
1136
1136
|
) : null
|
|
1137
1137
|
] }),
|
|
1138
1138
|
e.subtitle ? /* @__PURE__ */ n("span", { className: "type-body-sm ds:text-[var(--muted-foreground)]", children: e.subtitle }) : null,
|
|
1139
|
-
/* @__PURE__ */ n(
|
|
1140
|
-
(s = e.location) != null && s.address ? /* @__PURE__ */
|
|
1139
|
+
/* @__PURE__ */ n(qn, { tagline: e.tagline, lang: e.contentLang }),
|
|
1140
|
+
(s = e.location) != null && s.address ? /* @__PURE__ */ y(
|
|
1141
1141
|
"span",
|
|
1142
1142
|
{
|
|
1143
1143
|
"data-component": "practice-result-address",
|
|
1144
1144
|
className: "type-meta ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]",
|
|
1145
1145
|
children: [
|
|
1146
|
-
/* @__PURE__ */ n(
|
|
1146
|
+
/* @__PURE__ */ n(Me, { "aria-hidden": "true", className: "ds:size-3.5 ds:shrink-0" }),
|
|
1147
1147
|
/* @__PURE__ */ n(
|
|
1148
1148
|
"span",
|
|
1149
1149
|
{
|
|
@@ -1158,7 +1158,7 @@ function At({
|
|
|
1158
1158
|
) : null
|
|
1159
1159
|
] }),
|
|
1160
1160
|
/* @__PURE__ */ n(
|
|
1161
|
-
|
|
1161
|
+
Xn,
|
|
1162
1162
|
{
|
|
1163
1163
|
price: e.firstVisitPrice,
|
|
1164
1164
|
cents: e.firstVisitPriceCents,
|
|
@@ -1169,29 +1169,29 @@ function At({
|
|
|
1169
1169
|
}
|
|
1170
1170
|
);
|
|
1171
1171
|
}
|
|
1172
|
-
function
|
|
1172
|
+
function _t(e) {
|
|
1173
1173
|
const t = e.target.closest(
|
|
1174
1174
|
'a, button, [role="button"], input, select, textarea, label'
|
|
1175
1175
|
);
|
|
1176
1176
|
return t !== null && t !== e.currentTarget && e.currentTarget.contains(t);
|
|
1177
1177
|
}
|
|
1178
|
-
function
|
|
1178
|
+
function Pe() {
|
|
1179
1179
|
return !(typeof window.matchMedia == "function" && !window.matchMedia("(hover: hover)").matches);
|
|
1180
1180
|
}
|
|
1181
|
-
function
|
|
1181
|
+
function Ht(e) {
|
|
1182
1182
|
if (e)
|
|
1183
1183
|
return (t) => {
|
|
1184
1184
|
const a = document.activeElement;
|
|
1185
|
-
a && t.currentTarget.contains(a) &&
|
|
1185
|
+
a && t.currentTarget.contains(a) && Ye(a) || e();
|
|
1186
1186
|
};
|
|
1187
1187
|
}
|
|
1188
|
-
function
|
|
1188
|
+
function Dt(e) {
|
|
1189
1189
|
if (e)
|
|
1190
1190
|
return (t) => {
|
|
1191
1191
|
t.currentTarget.contains(t.relatedTarget) || e();
|
|
1192
1192
|
};
|
|
1193
1193
|
}
|
|
1194
|
-
function
|
|
1194
|
+
function bt({
|
|
1195
1195
|
result: e,
|
|
1196
1196
|
headingLevel: t,
|
|
1197
1197
|
highlighted: a,
|
|
@@ -1210,11 +1210,11 @@ function vt({
|
|
|
1210
1210
|
slotsPanel: k,
|
|
1211
1211
|
children: S
|
|
1212
1212
|
}) {
|
|
1213
|
-
var
|
|
1214
|
-
const { t:
|
|
1213
|
+
var $, U, ae, v;
|
|
1214
|
+
const { t: E, i18n: O } = _("ui"), F = e.rating, H = ((($ = e.languages) == null ? void 0 : $.length) ?? 0) > 0, M = (((U = e.insurances) == null ? void 0 : U.length) ?? 0) > 0, h = e.specializedInFearPatients, C = H || M || h, P = (e.languages ?? []).slice(0, b), I = (((ae = e.languages) == null ? void 0 : ae.length) ?? 0) - P.length, D = (e.insurances ?? []).slice(0, w), j = (((v = e.insurances) == null ? void 0 : v.length) ?? 0) - D.length;
|
|
1215
1215
|
return (
|
|
1216
1216
|
// 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.
|
|
1217
|
-
/* @__PURE__ */
|
|
1217
|
+
/* @__PURE__ */ y(
|
|
1218
1218
|
"div",
|
|
1219
1219
|
{
|
|
1220
1220
|
"data-component": "practice-result-card",
|
|
@@ -1223,18 +1223,18 @@ function vt({
|
|
|
1223
1223
|
"data-selected": r ? "true" : "false",
|
|
1224
1224
|
role: "group",
|
|
1225
1225
|
"aria-labelledby": `practice-result-${e.id}-name`,
|
|
1226
|
-
onClick: (
|
|
1227
|
-
|
|
1226
|
+
onClick: (L) => {
|
|
1227
|
+
_t(L) || i();
|
|
1228
1228
|
},
|
|
1229
|
-
onMouseEnter: () => c(
|
|
1230
|
-
onFocus: (
|
|
1231
|
-
onMouseLeave:
|
|
1232
|
-
onBlur:
|
|
1233
|
-
className:
|
|
1229
|
+
onMouseEnter: () => c(Pe()),
|
|
1230
|
+
onFocus: (L) => c(Ye(L.target)),
|
|
1231
|
+
onMouseLeave: Ht(l),
|
|
1232
|
+
onBlur: Dt(l),
|
|
1233
|
+
className: Tt({ density: f }),
|
|
1234
1234
|
"data-slot-cards": k ? "true" : void 0,
|
|
1235
1235
|
children: [
|
|
1236
1236
|
/* @__PURE__ */ n(
|
|
1237
|
-
|
|
1237
|
+
Xe,
|
|
1238
1238
|
{
|
|
1239
1239
|
src: e.imageUrl,
|
|
1240
1240
|
alt: e.imageAlt,
|
|
@@ -1246,59 +1246,59 @@ function vt({
|
|
|
1246
1246
|
height: 48
|
|
1247
1247
|
}
|
|
1248
1248
|
),
|
|
1249
|
-
/* @__PURE__ */
|
|
1249
|
+
/* @__PURE__ */ y("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
1250
1250
|
/* @__PURE__ */ n(
|
|
1251
|
-
|
|
1251
|
+
Ft,
|
|
1252
1252
|
{
|
|
1253
1253
|
result: e,
|
|
1254
1254
|
headingLevel: t,
|
|
1255
1255
|
selected: r
|
|
1256
1256
|
}
|
|
1257
1257
|
),
|
|
1258
|
-
|
|
1259
|
-
|
|
1258
|
+
F && F.count > 0 ? /* @__PURE__ */ n(
|
|
1259
|
+
Qe,
|
|
1260
1260
|
{
|
|
1261
|
-
value:
|
|
1262
|
-
reviews: { count:
|
|
1261
|
+
value: F.value,
|
|
1262
|
+
reviews: { count: F.count },
|
|
1263
1263
|
size: "sm"
|
|
1264
1264
|
}
|
|
1265
1265
|
) : null,
|
|
1266
|
-
/* @__PURE__ */ n(
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1266
|
+
/* @__PURE__ */ n(Pt, { review: e.latestReview }),
|
|
1267
|
+
C ? /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
1268
|
+
P.map((L) => /* @__PURE__ */ n(
|
|
1269
|
+
oe,
|
|
1270
1270
|
{
|
|
1271
1271
|
variant: "neutral",
|
|
1272
|
-
leading: /* @__PURE__ */ n(
|
|
1273
|
-
children:
|
|
1272
|
+
leading: /* @__PURE__ */ n(Ct, { "aria-hidden": "true" }),
|
|
1273
|
+
children: Nt(L, E, O)
|
|
1274
1274
|
},
|
|
1275
|
-
`lang-${
|
|
1275
|
+
`lang-${L}`
|
|
1276
1276
|
)),
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1277
|
+
I > 0 ? /* @__PURE__ */ n(oe, { variant: "neutral", children: `+${I}` }) : null,
|
|
1278
|
+
D.map((L) => /* @__PURE__ */ n(
|
|
1279
|
+
oe,
|
|
1280
1280
|
{
|
|
1281
1281
|
variant: "info",
|
|
1282
|
-
leading: /* @__PURE__ */ n(
|
|
1283
|
-
children:
|
|
1282
|
+
leading: /* @__PURE__ */ n(Rt, { "aria-hidden": "true" }),
|
|
1283
|
+
children: L
|
|
1284
1284
|
},
|
|
1285
|
-
`ins-${
|
|
1285
|
+
`ins-${L}`
|
|
1286
1286
|
)),
|
|
1287
|
-
|
|
1288
|
-
h ? /* @__PURE__ */ n(
|
|
1287
|
+
j > 0 ? /* @__PURE__ */ n(oe, { variant: "neutral", children: `+${j}` }) : null,
|
|
1288
|
+
h ? /* @__PURE__ */ n(oe, { variant: "info", leading: /* @__PURE__ */ n(St, { "aria-hidden": "true" }), children: E("practiceResults.fearPatient.label") }) : null
|
|
1289
1289
|
] }) : null,
|
|
1290
1290
|
/* @__PURE__ */ n(
|
|
1291
|
-
|
|
1291
|
+
It,
|
|
1292
1292
|
{
|
|
1293
1293
|
description: e.description,
|
|
1294
1294
|
density: "compact",
|
|
1295
1295
|
lang: e.contentLang
|
|
1296
1296
|
}
|
|
1297
1297
|
),
|
|
1298
|
-
e.nextAvailableSlot && p ? /* @__PURE__ */ n(
|
|
1298
|
+
e.nextAvailableSlot && p ? /* @__PURE__ */ n(tt, { time: p }) : null,
|
|
1299
1299
|
S,
|
|
1300
1300
|
/* @__PURE__ */ n(
|
|
1301
|
-
|
|
1301
|
+
At,
|
|
1302
1302
|
{
|
|
1303
1303
|
result: e,
|
|
1304
1304
|
openLabel: o,
|
|
@@ -1315,7 +1315,7 @@ function vt({
|
|
|
1315
1315
|
)
|
|
1316
1316
|
);
|
|
1317
1317
|
}
|
|
1318
|
-
function
|
|
1318
|
+
function Jn({
|
|
1319
1319
|
result: e,
|
|
1320
1320
|
headingLevel: t,
|
|
1321
1321
|
apiKey: a,
|
|
@@ -1329,8 +1329,8 @@ function Yn({
|
|
|
1329
1329
|
openLabel: d,
|
|
1330
1330
|
bookLabel: g
|
|
1331
1331
|
}) {
|
|
1332
|
-
var
|
|
1333
|
-
const { t: p, i18n: w } = _("ui"), b =
|
|
1332
|
+
var F, H;
|
|
1333
|
+
const { t: p, i18n: w } = _("ui"), b = K(() => {
|
|
1334
1334
|
if (e.nextAvailableSlot)
|
|
1335
1335
|
try {
|
|
1336
1336
|
return new Intl.DateTimeFormat(w.language, {
|
|
@@ -1341,10 +1341,10 @@ function Yn({
|
|
|
1341
1341
|
} catch {
|
|
1342
1342
|
return e.nextAvailableSlot.dateTime;
|
|
1343
1343
|
}
|
|
1344
|
-
}, [e.nextAvailableSlot, w.language]), k = (((
|
|
1344
|
+
}, [e.nextAvailableSlot, w.language]), k = (((F = e.languages) == null ? void 0 : F.length) ?? 0) > 0, S = (((H = e.insurances) == null ? void 0 : H.length) ?? 0) > 0, E = e.specializedInFearPatients, O = k || S || E;
|
|
1345
1345
|
return (
|
|
1346
1346
|
// 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.
|
|
1347
|
-
/* @__PURE__ */
|
|
1347
|
+
/* @__PURE__ */ y(
|
|
1348
1348
|
"div",
|
|
1349
1349
|
{
|
|
1350
1350
|
"data-component": "practice-result-card",
|
|
@@ -1354,17 +1354,17 @@ function Yn({
|
|
|
1354
1354
|
"data-selected": i ? "true" : "false",
|
|
1355
1355
|
role: "group",
|
|
1356
1356
|
"aria-labelledby": `practice-result-${e.id}-name`,
|
|
1357
|
-
onClick: (
|
|
1358
|
-
|
|
1357
|
+
onClick: (M) => {
|
|
1358
|
+
_t(M) || s();
|
|
1359
1359
|
},
|
|
1360
|
-
onMouseEnter: () => f(
|
|
1361
|
-
onFocus: (
|
|
1362
|
-
onMouseLeave:
|
|
1363
|
-
onBlur:
|
|
1364
|
-
className:
|
|
1360
|
+
onMouseEnter: () => f(Pe()),
|
|
1361
|
+
onFocus: (M) => f(Ye(M.target)),
|
|
1362
|
+
onMouseLeave: Ht(o),
|
|
1363
|
+
onBlur: Dt(o),
|
|
1364
|
+
className: Tt({ density: "rich" }),
|
|
1365
1365
|
children: [
|
|
1366
1366
|
e.location ? /* @__PURE__ */ n("div", { className: "ds:hidden ds:@min-[640px]/result-card:block", children: /* @__PURE__ */ n(
|
|
1367
|
-
|
|
1367
|
+
jn,
|
|
1368
1368
|
{
|
|
1369
1369
|
image: e.mapImage,
|
|
1370
1370
|
apiKey: a,
|
|
@@ -1376,10 +1376,10 @@ function Yn({
|
|
|
1376
1376
|
addressLang: e.contentLang
|
|
1377
1377
|
}
|
|
1378
1378
|
) }) : null,
|
|
1379
|
-
/* @__PURE__ */
|
|
1380
|
-
/* @__PURE__ */
|
|
1379
|
+
/* @__PURE__ */ y("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
1380
|
+
/* @__PURE__ */ y("div", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-md)]", children: [
|
|
1381
1381
|
/* @__PURE__ */ n(
|
|
1382
|
-
|
|
1382
|
+
Xe,
|
|
1383
1383
|
{
|
|
1384
1384
|
src: e.imageUrl,
|
|
1385
1385
|
alt: e.imageAlt,
|
|
@@ -1392,7 +1392,7 @@ function Yn({
|
|
|
1392
1392
|
}
|
|
1393
1393
|
),
|
|
1394
1394
|
/* @__PURE__ */ n(
|
|
1395
|
-
|
|
1395
|
+
Ft,
|
|
1396
1396
|
{
|
|
1397
1397
|
result: e,
|
|
1398
1398
|
headingLevel: t,
|
|
@@ -1401,46 +1401,46 @@ function Yn({
|
|
|
1401
1401
|
)
|
|
1402
1402
|
] }),
|
|
1403
1403
|
e.rating && e.rating.count > 0 ? /* @__PURE__ */ n(
|
|
1404
|
-
|
|
1404
|
+
Qe,
|
|
1405
1405
|
{
|
|
1406
1406
|
value: e.rating.value,
|
|
1407
1407
|
reviews: { count: e.rating.count },
|
|
1408
1408
|
size: "md"
|
|
1409
1409
|
}
|
|
1410
1410
|
) : null,
|
|
1411
|
-
/* @__PURE__ */ n(
|
|
1412
|
-
|
|
1413
|
-
k ? (e.languages ?? []).map((
|
|
1414
|
-
|
|
1411
|
+
/* @__PURE__ */ n(Pt, { review: e.latestReview }),
|
|
1412
|
+
O ? /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
1413
|
+
k ? (e.languages ?? []).map((M) => /* @__PURE__ */ n(
|
|
1414
|
+
oe,
|
|
1415
1415
|
{
|
|
1416
1416
|
variant: "neutral",
|
|
1417
|
-
leading: /* @__PURE__ */ n(
|
|
1418
|
-
children:
|
|
1417
|
+
leading: /* @__PURE__ */ n(Ct, { "aria-hidden": "true" }),
|
|
1418
|
+
children: Nt(M, p, w)
|
|
1419
1419
|
},
|
|
1420
|
-
`lang-${
|
|
1420
|
+
`lang-${M}`
|
|
1421
1421
|
)) : null,
|
|
1422
|
-
S ? (e.insurances ?? []).map((
|
|
1423
|
-
|
|
1422
|
+
S ? (e.insurances ?? []).map((M) => /* @__PURE__ */ n(
|
|
1423
|
+
oe,
|
|
1424
1424
|
{
|
|
1425
1425
|
variant: "info",
|
|
1426
|
-
leading: /* @__PURE__ */ n(
|
|
1427
|
-
children:
|
|
1426
|
+
leading: /* @__PURE__ */ n(Rt, { "aria-hidden": "true" }),
|
|
1427
|
+
children: M
|
|
1428
1428
|
},
|
|
1429
|
-
`ins-${
|
|
1429
|
+
`ins-${M}`
|
|
1430
1430
|
)) : null,
|
|
1431
|
-
|
|
1431
|
+
E ? /* @__PURE__ */ n(oe, { variant: "info", leading: /* @__PURE__ */ n(St, { "aria-hidden": "true" }), children: p("practiceResults.fearPatient.label") }) : null
|
|
1432
1432
|
] }) : null,
|
|
1433
1433
|
/* @__PURE__ */ n(
|
|
1434
|
-
|
|
1434
|
+
It,
|
|
1435
1435
|
{
|
|
1436
1436
|
description: e.description,
|
|
1437
1437
|
density: "rich",
|
|
1438
1438
|
lang: e.contentLang
|
|
1439
1439
|
}
|
|
1440
1440
|
),
|
|
1441
|
-
e.nextAvailableSlot && b ? /* @__PURE__ */ n(
|
|
1441
|
+
e.nextAvailableSlot && b ? /* @__PURE__ */ n(tt, { time: b }) : null,
|
|
1442
1442
|
/* @__PURE__ */ n(
|
|
1443
|
-
|
|
1443
|
+
At,
|
|
1444
1444
|
{
|
|
1445
1445
|
result: e,
|
|
1446
1446
|
openLabel: d,
|
|
@@ -1456,7 +1456,7 @@ function Yn({
|
|
|
1456
1456
|
)
|
|
1457
1457
|
);
|
|
1458
1458
|
}
|
|
1459
|
-
function
|
|
1459
|
+
function nt({
|
|
1460
1460
|
results: e,
|
|
1461
1461
|
headingLevel: t,
|
|
1462
1462
|
hoveredId: a,
|
|
@@ -1474,73 +1474,73 @@ function et({
|
|
|
1474
1474
|
loadingMore: b,
|
|
1475
1475
|
loadingSkeletons: k,
|
|
1476
1476
|
density: S = "compact",
|
|
1477
|
-
apiKey:
|
|
1478
|
-
containerRef:
|
|
1477
|
+
apiKey: E,
|
|
1478
|
+
containerRef: O
|
|
1479
1479
|
}) {
|
|
1480
|
-
const { t:
|
|
1481
|
-
return
|
|
1480
|
+
const { t: F } = _("ui"), H = xt(et), M = T(null);
|
|
1481
|
+
return G(() => {
|
|
1482
1482
|
if (!w) return;
|
|
1483
|
-
const h =
|
|
1483
|
+
const h = M.current;
|
|
1484
1484
|
if (!h || typeof IntersectionObserver > "u") return;
|
|
1485
|
-
const
|
|
1486
|
-
(
|
|
1487
|
-
for (const
|
|
1488
|
-
|
|
1485
|
+
const C = new IntersectionObserver(
|
|
1486
|
+
(P) => {
|
|
1487
|
+
for (const I of P)
|
|
1488
|
+
I.isIntersecting && (ne("serp_load_more", {
|
|
1489
1489
|
currentCount: e.length
|
|
1490
1490
|
}), w());
|
|
1491
1491
|
},
|
|
1492
1492
|
{ root: null, rootMargin: "200px" }
|
|
1493
1493
|
);
|
|
1494
|
-
return
|
|
1494
|
+
return C.observe(h), () => C.disconnect();
|
|
1495
1495
|
}, [w, e.length]), k ? /* @__PURE__ */ n(
|
|
1496
1496
|
"div",
|
|
1497
1497
|
{
|
|
1498
1498
|
role: "status",
|
|
1499
1499
|
"aria-live": "polite",
|
|
1500
|
-
"aria-label":
|
|
1500
|
+
"aria-label": F("practiceResults.loading"),
|
|
1501
1501
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
1502
|
-
children: Array.from({ length: 4 }).map((h,
|
|
1503
|
-
|
|
1502
|
+
children: Array.from({ length: 4 }).map((h, C) => /* @__PURE__ */ n(
|
|
1503
|
+
mn,
|
|
1504
1504
|
{
|
|
1505
1505
|
variant: "rounded",
|
|
1506
1506
|
height: S === "rich" ? "11rem" : "7rem"
|
|
1507
1507
|
},
|
|
1508
|
-
`pr-skel-${
|
|
1508
|
+
`pr-skel-${C}`
|
|
1509
1509
|
))
|
|
1510
1510
|
}
|
|
1511
|
-
) : /* @__PURE__ */
|
|
1511
|
+
) : /* @__PURE__ */ y(
|
|
1512
1512
|
"div",
|
|
1513
1513
|
{
|
|
1514
|
-
ref:
|
|
1514
|
+
ref: O,
|
|
1515
1515
|
"data-component": "practice-results-list",
|
|
1516
1516
|
role: "list",
|
|
1517
|
-
"aria-label":
|
|
1517
|
+
"aria-label": F("practiceResults.list.label"),
|
|
1518
1518
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:overflow-y-auto",
|
|
1519
1519
|
children: [
|
|
1520
1520
|
e.map((h) => /* @__PURE__ */ n("div", { role: "listitem", children: S === "rich" ? /* @__PURE__ */ n(
|
|
1521
|
-
|
|
1521
|
+
Jn,
|
|
1522
1522
|
{
|
|
1523
1523
|
result: h,
|
|
1524
1524
|
headingLevel: t,
|
|
1525
|
-
apiKey:
|
|
1525
|
+
apiKey: E,
|
|
1526
1526
|
highlighted: a === h.id || r === h.id || i === h.id,
|
|
1527
1527
|
selected: r === h.id,
|
|
1528
1528
|
onSelect: () => l(h.id),
|
|
1529
1529
|
onOpenClick: () => f(h.id),
|
|
1530
1530
|
onBookClick: () => o(h.id),
|
|
1531
|
-
onHover: (
|
|
1531
|
+
onHover: (C) => s(h.id, C),
|
|
1532
1532
|
onLeave: c,
|
|
1533
1533
|
openLabel: d,
|
|
1534
1534
|
bookLabel: g
|
|
1535
1535
|
}
|
|
1536
|
-
) :
|
|
1537
|
-
|
|
1536
|
+
) : H && h.firstVisit ? /* @__PURE__ */ n(
|
|
1537
|
+
In,
|
|
1538
1538
|
{
|
|
1539
1539
|
result: h,
|
|
1540
|
-
nameHeadingLevel:
|
|
1541
|
-
context:
|
|
1542
|
-
children: (
|
|
1543
|
-
|
|
1540
|
+
nameHeadingLevel: Ae(t),
|
|
1541
|
+
context: H,
|
|
1542
|
+
children: (C) => /* @__PURE__ */ n(
|
|
1543
|
+
bt,
|
|
1544
1544
|
{
|
|
1545
1545
|
result: h,
|
|
1546
1546
|
headingLevel: t,
|
|
@@ -1549,14 +1549,14 @@ function et({
|
|
|
1549
1549
|
onSelect: () => l(h.id),
|
|
1550
1550
|
onOpenClick: () => f(h.id),
|
|
1551
1551
|
onBookClick: () => o(h.id),
|
|
1552
|
-
onHover: (
|
|
1552
|
+
onHover: (P) => s(h.id, P),
|
|
1553
1553
|
onLeave: c,
|
|
1554
1554
|
openLabel: d,
|
|
1555
1555
|
bookLabel: g,
|
|
1556
1556
|
nextSlotText: p(h),
|
|
1557
|
-
slotsPanel:
|
|
1557
|
+
slotsPanel: C,
|
|
1558
1558
|
children: h.firstVisit ? /* @__PURE__ */ n(
|
|
1559
|
-
|
|
1559
|
+
Pn,
|
|
1560
1560
|
{
|
|
1561
1561
|
firstVisit: h.firstVisit,
|
|
1562
1562
|
currencyCode: h.currencyCode
|
|
@@ -1566,7 +1566,7 @@ function et({
|
|
|
1566
1566
|
)
|
|
1567
1567
|
}
|
|
1568
1568
|
) : /* @__PURE__ */ n(
|
|
1569
|
-
|
|
1569
|
+
bt,
|
|
1570
1570
|
{
|
|
1571
1571
|
result: h,
|
|
1572
1572
|
headingLevel: t,
|
|
@@ -1575,7 +1575,7 @@ function et({
|
|
|
1575
1575
|
onSelect: () => l(h.id),
|
|
1576
1576
|
onOpenClick: () => f(h.id),
|
|
1577
1577
|
onBookClick: () => o(h.id),
|
|
1578
|
-
onHover: (
|
|
1578
|
+
onHover: (C) => s(h.id, C),
|
|
1579
1579
|
onLeave: c,
|
|
1580
1580
|
openLabel: d,
|
|
1581
1581
|
bookLabel: g,
|
|
@@ -1585,29 +1585,29 @@ function et({
|
|
|
1585
1585
|
w ? /* @__PURE__ */ n(
|
|
1586
1586
|
"div",
|
|
1587
1587
|
{
|
|
1588
|
-
ref:
|
|
1588
|
+
ref: M,
|
|
1589
1589
|
"aria-hidden": "true",
|
|
1590
1590
|
className: "ds:flex ds:items-center ds:justify-center ds:py-[var(--spacing-md)]",
|
|
1591
|
-
children: b ? /* @__PURE__ */ n(
|
|
1591
|
+
children: b ? /* @__PURE__ */ n(fn, { size: "md", variant: "pulse" }) : /* @__PURE__ */ n("span", { className: "ds:size-1" })
|
|
1592
1592
|
}
|
|
1593
1593
|
) : null
|
|
1594
1594
|
]
|
|
1595
1595
|
}
|
|
1596
1596
|
);
|
|
1597
1597
|
}
|
|
1598
|
-
function
|
|
1598
|
+
function ea({
|
|
1599
1599
|
result: e,
|
|
1600
1600
|
nextSlotText: t
|
|
1601
1601
|
}) {
|
|
1602
1602
|
const a = e.rating;
|
|
1603
|
-
return /* @__PURE__ */
|
|
1603
|
+
return /* @__PURE__ */ y(
|
|
1604
1604
|
"div",
|
|
1605
1605
|
{
|
|
1606
1606
|
"data-component": "practice-result-map-card",
|
|
1607
1607
|
className: "ds:flex ds:[inline-size:16rem] ds:max-w-full ds:items-center ds:gap-[var(--spacing-sm)] ds:rounded-[var(--radius-lg)] ds:border ds:border-[color:var(--card-border)] ds:bg-[var(--card)] ds:p-[var(--spacing-sm)] ds:text-[var(--card-foreground)] ds:shadow-[var(--shadow-lg)]",
|
|
1608
1608
|
children: [
|
|
1609
1609
|
/* @__PURE__ */ n(
|
|
1610
|
-
|
|
1610
|
+
Xe,
|
|
1611
1611
|
{
|
|
1612
1612
|
src: e.imageUrl,
|
|
1613
1613
|
name: e.name,
|
|
@@ -1618,7 +1618,7 @@ function Qn({
|
|
|
1618
1618
|
height: 48
|
|
1619
1619
|
}
|
|
1620
1620
|
),
|
|
1621
|
-
/* @__PURE__ */
|
|
1621
|
+
/* @__PURE__ */ y("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
1622
1622
|
/* @__PURE__ */ n(
|
|
1623
1623
|
"span",
|
|
1624
1624
|
{
|
|
@@ -1628,20 +1628,20 @@ function Qn({
|
|
|
1628
1628
|
}
|
|
1629
1629
|
),
|
|
1630
1630
|
a && a.count > 0 ? /* @__PURE__ */ n(
|
|
1631
|
-
|
|
1631
|
+
Qe,
|
|
1632
1632
|
{
|
|
1633
1633
|
value: a.value,
|
|
1634
1634
|
reviews: { count: a.count },
|
|
1635
1635
|
size: "sm"
|
|
1636
1636
|
}
|
|
1637
1637
|
) : null,
|
|
1638
|
-
e.nextAvailableSlot && t ? /* @__PURE__ */ n(
|
|
1638
|
+
e.nextAvailableSlot && t ? /* @__PURE__ */ n(tt, { time: t }) : null
|
|
1639
1639
|
] })
|
|
1640
1640
|
]
|
|
1641
1641
|
}
|
|
1642
1642
|
);
|
|
1643
1643
|
}
|
|
1644
|
-
function
|
|
1644
|
+
function We({
|
|
1645
1645
|
results: e,
|
|
1646
1646
|
searchCentre: t,
|
|
1647
1647
|
zoom: a,
|
|
@@ -1659,55 +1659,57 @@ function Ge({
|
|
|
1659
1659
|
onPinFirstInteract: b,
|
|
1660
1660
|
onBoundsChange: k,
|
|
1661
1661
|
consentGranted: S,
|
|
1662
|
-
onConsentRequest:
|
|
1663
|
-
staticPreview:
|
|
1664
|
-
|
|
1665
|
-
|
|
1662
|
+
onConsentRequest: E,
|
|
1663
|
+
staticPreview: O,
|
|
1664
|
+
loadTimeoutMs: F,
|
|
1665
|
+
onLoadError: H,
|
|
1666
|
+
fitResultIds: M,
|
|
1667
|
+
mapHandleRef: h
|
|
1666
1668
|
}) {
|
|
1667
|
-
const { t: C } = _("ui"),
|
|
1669
|
+
const { t: C } = _("ui"), P = K(
|
|
1668
1670
|
() => e.filter(
|
|
1669
|
-
(
|
|
1670
|
-
).map((
|
|
1671
|
-
id:
|
|
1671
|
+
(v) => !!v.location
|
|
1672
|
+
).map((v) => ({
|
|
1673
|
+
id: v.id,
|
|
1672
1674
|
position: {
|
|
1673
|
-
lat:
|
|
1674
|
-
lng:
|
|
1675
|
+
lat: v.location.lat,
|
|
1676
|
+
lng: v.location.lng
|
|
1675
1677
|
},
|
|
1676
|
-
label:
|
|
1678
|
+
label: v.name
|
|
1677
1679
|
})),
|
|
1678
1680
|
[e]
|
|
1679
|
-
),
|
|
1680
|
-
if (!(
|
|
1681
|
-
const
|
|
1682
|
-
return
|
|
1683
|
-
}, [
|
|
1684
|
-
() =>
|
|
1685
|
-
[
|
|
1686
|
-
),
|
|
1687
|
-
() =>
|
|
1688
|
-
[
|
|
1689
|
-
),
|
|
1681
|
+
), I = K(() => {
|
|
1682
|
+
if (!(M != null && M.length)) return P;
|
|
1683
|
+
const v = new Set(M), L = P.filter((se) => v.has(se.id));
|
|
1684
|
+
return L.length > 0 ? L : P;
|
|
1685
|
+
}, [P, M]), D = K(
|
|
1686
|
+
() => I.map((v) => ({ ...v.position, id: v.id })),
|
|
1687
|
+
[I]
|
|
1688
|
+
), j = K(
|
|
1689
|
+
() => I.map((v) => v.id).sort().join("|"),
|
|
1690
|
+
[I]
|
|
1691
|
+
), $ = K(() => {
|
|
1690
1692
|
if (t) return t;
|
|
1691
|
-
const
|
|
1692
|
-
return
|
|
1693
|
-
lat: (
|
|
1694
|
-
lng: (
|
|
1693
|
+
const v = On(e);
|
|
1694
|
+
return v ? {
|
|
1695
|
+
lat: (v.north + v.south) / 2,
|
|
1696
|
+
lng: (v.east + v.west) / 2
|
|
1695
1697
|
} : { lat: 45.4642, lng: 9.19 };
|
|
1696
|
-
}, [e, t]),
|
|
1697
|
-
() => o ? (
|
|
1698
|
-
const
|
|
1699
|
-
return
|
|
1700
|
-
|
|
1698
|
+
}, [e, t]), U = K(
|
|
1699
|
+
() => o ? (v) => {
|
|
1700
|
+
const L = e.find((se) => se.id === v);
|
|
1701
|
+
return L ? /* @__PURE__ */ n(
|
|
1702
|
+
ea,
|
|
1701
1703
|
{
|
|
1702
|
-
result:
|
|
1703
|
-
nextSlotText: d == null ? void 0 : d(
|
|
1704
|
+
result: L,
|
|
1705
|
+
nextSlotText: d == null ? void 0 : d(L)
|
|
1704
1706
|
}
|
|
1705
1707
|
) : null;
|
|
1706
1708
|
} : void 0,
|
|
1707
1709
|
[o, d, e]
|
|
1708
|
-
),
|
|
1709
|
-
(
|
|
1710
|
-
k == null || k(
|
|
1710
|
+
), ae = B(
|
|
1711
|
+
(v, { userInteraction: L }) => {
|
|
1712
|
+
k == null || k(v), L && ne("serp_map_panned", { bounds: v });
|
|
1711
1713
|
},
|
|
1712
1714
|
[k]
|
|
1713
1715
|
);
|
|
@@ -1717,32 +1719,34 @@ function Ge({
|
|
|
1717
1719
|
"data-component": "practice-results-map-panel",
|
|
1718
1720
|
className: "ds:relative ds:flex ds:size-full ds:min-h-[24rem] ds:flex-col",
|
|
1719
1721
|
children: /* @__PURE__ */ n(
|
|
1720
|
-
|
|
1722
|
+
un,
|
|
1721
1723
|
{
|
|
1722
|
-
ref:
|
|
1724
|
+
ref: h,
|
|
1723
1725
|
apiKey: r ?? "",
|
|
1724
1726
|
mapId: i,
|
|
1725
1727
|
clusterMarkers: s,
|
|
1726
|
-
center:
|
|
1728
|
+
center: $,
|
|
1727
1729
|
zoom: a,
|
|
1728
|
-
markers:
|
|
1729
|
-
fitToPoints:
|
|
1730
|
-
fitKey:
|
|
1730
|
+
markers: P,
|
|
1731
|
+
fitToPoints: D,
|
|
1732
|
+
fitKey: j,
|
|
1731
1733
|
selectedMarkerId: l,
|
|
1732
1734
|
hoveredMarkerId: c,
|
|
1733
|
-
renderMarkerCard:
|
|
1735
|
+
renderMarkerCard: U,
|
|
1734
1736
|
onMarkerHover: o ? g : void 0,
|
|
1735
1737
|
consentGranted: !!S,
|
|
1736
|
-
staticPreview:
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1738
|
+
staticPreview: O,
|
|
1739
|
+
loadTimeoutMs: F,
|
|
1740
|
+
onLoadError: H,
|
|
1741
|
+
onConsentRequest: E,
|
|
1742
|
+
onBoundsChange: ae,
|
|
1743
|
+
onClusterClick: ({ count: v }) => ne("serp_map_cluster_clicked", { count: v }),
|
|
1744
|
+
onMarkerClick: (v) => {
|
|
1745
|
+
if (v == null) {
|
|
1742
1746
|
f();
|
|
1743
1747
|
return;
|
|
1744
1748
|
}
|
|
1745
|
-
w(
|
|
1749
|
+
w(v), b(v), p(v);
|
|
1746
1750
|
},
|
|
1747
1751
|
ariaLabel: C("practiceResults.map.label"),
|
|
1748
1752
|
size: "fill",
|
|
@@ -1753,7 +1757,7 @@ function Ge({
|
|
|
1753
1757
|
}
|
|
1754
1758
|
);
|
|
1755
1759
|
}
|
|
1756
|
-
function
|
|
1760
|
+
function at({
|
|
1757
1761
|
variantBodyProps: e
|
|
1758
1762
|
}) {
|
|
1759
1763
|
const {
|
|
@@ -1766,9 +1770,9 @@ function tt({
|
|
|
1766
1770
|
totalCount: l,
|
|
1767
1771
|
searchCentre: f
|
|
1768
1772
|
} = e;
|
|
1769
|
-
return !s && !c && l == null && t.length === 0 && r.length === 0 ? null : /* @__PURE__ */
|
|
1773
|
+
return !s && !c && l == null && t.length === 0 && r.length === 0 ? null : /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
1770
1774
|
/* @__PURE__ */ n(
|
|
1771
|
-
|
|
1775
|
+
Mt,
|
|
1772
1776
|
{
|
|
1773
1777
|
heading: s,
|
|
1774
1778
|
headingLevel: e.headingLevel,
|
|
@@ -1777,9 +1781,9 @@ function tt({
|
|
|
1777
1781
|
searchCentreLabel: f == null ? void 0 : f.label
|
|
1778
1782
|
}
|
|
1779
1783
|
),
|
|
1780
|
-
t.length > 0 ? /* @__PURE__ */
|
|
1784
|
+
t.length > 0 ? /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
1781
1785
|
/* @__PURE__ */ n(
|
|
1782
|
-
|
|
1786
|
+
Lt,
|
|
1783
1787
|
{
|
|
1784
1788
|
facets: t,
|
|
1785
1789
|
value: a.facets,
|
|
@@ -1787,7 +1791,7 @@ function tt({
|
|
|
1787
1791
|
}
|
|
1788
1792
|
),
|
|
1789
1793
|
r.length > 0 ? /* @__PURE__ */ n(
|
|
1790
|
-
|
|
1794
|
+
Ge,
|
|
1791
1795
|
{
|
|
1792
1796
|
options: r,
|
|
1793
1797
|
value: a.sort ?? "relevance",
|
|
@@ -1795,7 +1799,7 @@ function tt({
|
|
|
1795
1799
|
}
|
|
1796
1800
|
) : null
|
|
1797
1801
|
] }) : r.length > 0 ? /* @__PURE__ */ n("div", { className: "ds:flex ds:justify-end", children: /* @__PURE__ */ n(
|
|
1798
|
-
|
|
1802
|
+
Ge,
|
|
1799
1803
|
{
|
|
1800
1804
|
options: r,
|
|
1801
1805
|
value: a.sort ?? "relevance",
|
|
@@ -1804,44 +1808,44 @@ function tt({
|
|
|
1804
1808
|
) }) : null
|
|
1805
1809
|
] });
|
|
1806
1810
|
}
|
|
1807
|
-
function
|
|
1811
|
+
function Ae(e) {
|
|
1808
1812
|
return Math.min(e + 1, 6);
|
|
1809
1813
|
}
|
|
1810
|
-
function
|
|
1814
|
+
function st({
|
|
1811
1815
|
headingLevel: e
|
|
1812
1816
|
}) {
|
|
1813
1817
|
const { t } = _("ui");
|
|
1814
1818
|
return /* @__PURE__ */ n(
|
|
1815
|
-
|
|
1819
|
+
dn,
|
|
1816
1820
|
{
|
|
1817
1821
|
variant: "no-results",
|
|
1818
|
-
headingLevel:
|
|
1822
|
+
headingLevel: Ae(e),
|
|
1819
1823
|
title: t("practiceResults.empty.title"),
|
|
1820
1824
|
description: t("practiceResults.empty.description")
|
|
1821
1825
|
}
|
|
1822
1826
|
);
|
|
1823
1827
|
}
|
|
1824
|
-
function
|
|
1828
|
+
function it({
|
|
1825
1829
|
onRetry: e,
|
|
1826
1830
|
headingLevel: t
|
|
1827
1831
|
}) {
|
|
1828
|
-
const { t: a } = _("ui"), r =
|
|
1829
|
-
return /* @__PURE__ */
|
|
1830
|
-
/* @__PURE__ */ n(
|
|
1831
|
-
/* @__PURE__ */ n(
|
|
1832
|
-
e ? /* @__PURE__ */ n(
|
|
1832
|
+
const { t: a } = _("ui"), r = Ae(t);
|
|
1833
|
+
return /* @__PURE__ */ y(Re, { variant: "error", children: [
|
|
1834
|
+
/* @__PURE__ */ n(Re.Title, { as: `h${r}`, children: a("practiceResults.error.title") }),
|
|
1835
|
+
/* @__PURE__ */ n(Re.Description, { children: a("practiceResults.error.description") }),
|
|
1836
|
+
e ? /* @__PURE__ */ n(Re.Action, { children: /* @__PURE__ */ n(
|
|
1833
1837
|
ve,
|
|
1834
1838
|
{
|
|
1835
1839
|
intent: "secondary",
|
|
1836
1840
|
size: "sm",
|
|
1837
|
-
startIcon: /* @__PURE__ */ n(
|
|
1841
|
+
startIcon: /* @__PURE__ */ n(bn, { "aria-hidden": "true" }),
|
|
1838
1842
|
onClick: e,
|
|
1839
1843
|
children: a("practiceResults.error.retry")
|
|
1840
1844
|
}
|
|
1841
1845
|
) }) : null
|
|
1842
1846
|
] });
|
|
1843
1847
|
}
|
|
1844
|
-
function
|
|
1848
|
+
function ta(e) {
|
|
1845
1849
|
const {
|
|
1846
1850
|
results: t,
|
|
1847
1851
|
apiKey: a,
|
|
@@ -1859,13 +1863,13 @@ function Jn(e) {
|
|
|
1859
1863
|
hoveredId: b,
|
|
1860
1864
|
selectedId: k,
|
|
1861
1865
|
onCardHover: S,
|
|
1862
|
-
onPinClick:
|
|
1863
|
-
consentGranted:
|
|
1864
|
-
onConsentRequest:
|
|
1865
|
-
onBoundsChange:
|
|
1866
|
-
listContainerRef:
|
|
1867
|
-
} = e, { t: h } = _("ui"), [
|
|
1868
|
-
|
|
1866
|
+
onPinClick: E,
|
|
1867
|
+
consentGranted: O,
|
|
1868
|
+
onConsentRequest: F,
|
|
1869
|
+
onBoundsChange: H,
|
|
1870
|
+
listContainerRef: M
|
|
1871
|
+
} = e, { t: h } = _("ui"), [C, P] = Y(!1), I = Ie("(min-width: 1024px)"), D = xt(et) !== null, j = p ? g ?? /* @__PURE__ */ n(it, { onRetry: w, headingLevel: e.headingLevel }) : t.length === 0 && !o ? d ?? /* @__PURE__ */ n(st, { headingLevel: e.headingLevel }) : /* @__PURE__ */ n(
|
|
1872
|
+
nt,
|
|
1869
1873
|
{
|
|
1870
1874
|
results: t,
|
|
1871
1875
|
headingLevel: e.headingLevel,
|
|
@@ -1884,19 +1888,19 @@ function Jn(e) {
|
|
|
1884
1888
|
loadingMore: f,
|
|
1885
1889
|
loadingSkeletons: o,
|
|
1886
1890
|
density: "compact",
|
|
1887
|
-
containerRef:
|
|
1891
|
+
containerRef: M
|
|
1888
1892
|
}
|
|
1889
1893
|
);
|
|
1890
|
-
return /* @__PURE__ */
|
|
1891
|
-
/* @__PURE__ */ n(
|
|
1892
|
-
/* @__PURE__ */
|
|
1894
|
+
return /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1895
|
+
/* @__PURE__ */ n(at, { variantBodyProps: e }),
|
|
1896
|
+
/* @__PURE__ */ y(
|
|
1893
1897
|
"div",
|
|
1894
1898
|
{
|
|
1895
|
-
className: `ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:lg:grid ds:lg:gap-[var(--spacing-lg)] ds:lg:items-start ${
|
|
1899
|
+
className: `ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:lg:grid ds:lg:gap-[var(--spacing-lg)] ds:lg:items-start ${D ? "ds:lg:grid-cols-[2fr_1fr]" : "ds:lg:grid-cols-[55fr_45fr]"}`,
|
|
1896
1900
|
children: [
|
|
1897
|
-
/* @__PURE__ */ n("div", { className: "ds:min-w-0", children:
|
|
1901
|
+
/* @__PURE__ */ n("div", { className: "ds:min-w-0", children: j }),
|
|
1898
1902
|
/* @__PURE__ */ n("div", { className: "ds:hidden ds:lg:block ds:sticky ds:top-[var(--spacing-md)] ds:h-[40rem]", children: /* @__PURE__ */ n(
|
|
1899
|
-
|
|
1903
|
+
We,
|
|
1900
1904
|
{
|
|
1901
1905
|
results: t,
|
|
1902
1906
|
searchCentre: c,
|
|
@@ -1907,19 +1911,21 @@ function Jn(e) {
|
|
|
1907
1911
|
hoveredId: e.mapHoveredId,
|
|
1908
1912
|
selectedId: e.mapSelectedId,
|
|
1909
1913
|
onMapClick: e.onMapClick,
|
|
1910
|
-
showMarkerCard:
|
|
1914
|
+
showMarkerCard: I,
|
|
1911
1915
|
formatNextSlot: e.formatNextSlot,
|
|
1912
1916
|
onPinHoverChange: e.onPinHoverChange,
|
|
1913
|
-
onPinClick: (
|
|
1914
|
-
ge(t,
|
|
1917
|
+
onPinClick: ($) => {
|
|
1918
|
+
ge(t, $, "pin", e.onResultSelect), E($);
|
|
1915
1919
|
},
|
|
1916
1920
|
onPinHover: e.onPinHover,
|
|
1917
1921
|
onPinFirstInteract: e.onPinFirstInteract,
|
|
1918
|
-
onBoundsChange:
|
|
1919
|
-
consentGranted:
|
|
1922
|
+
onBoundsChange: H,
|
|
1923
|
+
consentGranted: O,
|
|
1920
1924
|
staticPreview: e.mapPreview,
|
|
1925
|
+
loadTimeoutMs: e.mapLoadTimeoutMs,
|
|
1926
|
+
onLoadError: e.onMapLoadError,
|
|
1921
1927
|
fitResultIds: e.mapFitResultIds,
|
|
1922
|
-
onConsentRequest:
|
|
1928
|
+
onConsentRequest: F,
|
|
1923
1929
|
mapHandleRef: e.mapHandleRef
|
|
1924
1930
|
}
|
|
1925
1931
|
) })
|
|
@@ -1931,18 +1937,18 @@ function Jn(e) {
|
|
|
1931
1937
|
{
|
|
1932
1938
|
intent: "primary",
|
|
1933
1939
|
size: "md",
|
|
1934
|
-
startIcon: /* @__PURE__ */ n(
|
|
1935
|
-
onClick: () =>
|
|
1940
|
+
startIcon: /* @__PURE__ */ n(Cn, { "aria-hidden": "true" }),
|
|
1941
|
+
onClick: () => P(!0),
|
|
1936
1942
|
children: h("practiceResults.viewMap")
|
|
1937
1943
|
}
|
|
1938
1944
|
) }),
|
|
1939
|
-
/* @__PURE__ */ n(
|
|
1940
|
-
/* @__PURE__ */ n(
|
|
1941
|
-
/* @__PURE__ */
|
|
1942
|
-
/* @__PURE__ */ n(
|
|
1943
|
-
/* @__PURE__ */
|
|
1945
|
+
/* @__PURE__ */ n(re.Root, { open: C, onOpenChange: P, children: /* @__PURE__ */ y(re.Content, { side: "bottom", size: "lg", children: [
|
|
1946
|
+
/* @__PURE__ */ n(re.Header, { children: /* @__PURE__ */ n(re.Title, { children: h("practiceResults.map.label") }) }),
|
|
1947
|
+
/* @__PURE__ */ y(re.Body, { children: [
|
|
1948
|
+
/* @__PURE__ */ n(re.Description, { className: "ds:sr-only", children: h("practiceResults.sheet.description") }),
|
|
1949
|
+
/* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1944
1950
|
/* @__PURE__ */ n("div", { className: "ds:h-[24rem]", children: /* @__PURE__ */ n(
|
|
1945
|
-
|
|
1951
|
+
We,
|
|
1946
1952
|
{
|
|
1947
1953
|
results: t,
|
|
1948
1954
|
searchCentre: c,
|
|
@@ -1953,26 +1959,28 @@ function Jn(e) {
|
|
|
1953
1959
|
hoveredId: e.mapHoveredId,
|
|
1954
1960
|
selectedId: e.mapSelectedId,
|
|
1955
1961
|
onMapClick: e.onMapClick,
|
|
1956
|
-
onPinClick: (
|
|
1957
|
-
ge(t,
|
|
1962
|
+
onPinClick: ($) => {
|
|
1963
|
+
ge(t, $, "pin", e.onResultSelect), E($);
|
|
1958
1964
|
},
|
|
1959
1965
|
onPinHover: e.onPinHover,
|
|
1960
1966
|
onPinFirstInteract: e.onPinFirstInteract,
|
|
1961
|
-
onBoundsChange:
|
|
1962
|
-
consentGranted:
|
|
1967
|
+
onBoundsChange: H,
|
|
1968
|
+
consentGranted: O,
|
|
1963
1969
|
staticPreview: e.mapPreview,
|
|
1970
|
+
loadTimeoutMs: e.mapLoadTimeoutMs,
|
|
1971
|
+
onLoadError: e.onMapLoadError,
|
|
1964
1972
|
fitResultIds: e.mapFitResultIds,
|
|
1965
|
-
onConsentRequest:
|
|
1973
|
+
onConsentRequest: F,
|
|
1966
1974
|
mapHandleRef: e.mapHandleRef
|
|
1967
1975
|
}
|
|
1968
1976
|
) }),
|
|
1969
|
-
|
|
1977
|
+
j
|
|
1970
1978
|
] })
|
|
1971
1979
|
] })
|
|
1972
1980
|
] }) })
|
|
1973
1981
|
] });
|
|
1974
1982
|
}
|
|
1975
|
-
const
|
|
1983
|
+
const na = {
|
|
1976
1984
|
peek: "sm",
|
|
1977
1985
|
half: "md",
|
|
1978
1986
|
full: "lg"
|
|
@@ -1981,13 +1989,13 @@ const ea = {
|
|
|
1981
1989
|
"half",
|
|
1982
1990
|
"full"
|
|
1983
1991
|
];
|
|
1984
|
-
function
|
|
1985
|
-
const { t: a, i18n: r } = _("ui"), i = r.dir() === "rtl", s =
|
|
1992
|
+
function aa({ value: e, onChange: t }) {
|
|
1993
|
+
const { t: a, i18n: r } = _("ui"), i = r.dir() === "rtl", s = T(
|
|
1986
1994
|
/* @__PURE__ */ new Map()
|
|
1987
|
-
), c =
|
|
1995
|
+
), c = B((f) => {
|
|
1988
1996
|
var o;
|
|
1989
1997
|
(o = s.current.get(f)) == null || o.focus();
|
|
1990
|
-
}, []), l =
|
|
1998
|
+
}, []), l = B(
|
|
1991
1999
|
(f, o) => {
|
|
1992
2000
|
const d = pe.indexOf(o), g = pe.length, p = i ? "ArrowLeft" : "ArrowRight", w = i ? "ArrowRight" : "ArrowLeft";
|
|
1993
2001
|
let b = null;
|
|
@@ -2034,7 +2042,7 @@ function ta({ value: e, onChange: t }) {
|
|
|
2034
2042
|
tabIndex: o ? 0 : -1,
|
|
2035
2043
|
onClick: () => t(f),
|
|
2036
2044
|
onKeyDown: (d) => l(d, f),
|
|
2037
|
-
className:
|
|
2045
|
+
className: Le({
|
|
2038
2046
|
state: o ? "active" : "idle"
|
|
2039
2047
|
}),
|
|
2040
2048
|
children: a(`practiceResults.sheet.snap.${f}`)
|
|
@@ -2045,9 +2053,9 @@ function ta({ value: e, onChange: t }) {
|
|
|
2045
2053
|
}
|
|
2046
2054
|
);
|
|
2047
2055
|
}
|
|
2048
|
-
function
|
|
2049
|
-
const [r, i] =
|
|
2050
|
-
return
|
|
2056
|
+
function sa(e, t, a) {
|
|
2057
|
+
const [r, i] = Y(null), [s, c] = Y(null);
|
|
2058
|
+
return Je(() => {
|
|
2051
2059
|
const l = e.current;
|
|
2052
2060
|
if (!a || !l || typeof window > "u") {
|
|
2053
2061
|
i(null), c(null);
|
|
@@ -2071,11 +2079,11 @@ function na(e, t, a) {
|
|
|
2071
2079
|
c(null);
|
|
2072
2080
|
return;
|
|
2073
2081
|
}
|
|
2074
|
-
const
|
|
2082
|
+
const E = window.innerHeight - S - ft("--spacing-sm", l, 8);
|
|
2075
2083
|
c(
|
|
2076
2084
|
Math.max(
|
|
2077
|
-
Math.round(
|
|
2078
|
-
|
|
2085
|
+
Math.round(E),
|
|
2086
|
+
ft("--min-target-size", l, 44) * 2
|
|
2079
2087
|
)
|
|
2080
2088
|
);
|
|
2081
2089
|
}, p = () => {
|
|
@@ -2095,7 +2103,7 @@ function na(e, t, a) {
|
|
|
2095
2103
|
}
|
|
2096
2104
|
} : {};
|
|
2097
2105
|
}
|
|
2098
|
-
function
|
|
2106
|
+
function ia(e) {
|
|
2099
2107
|
const {
|
|
2100
2108
|
results: t,
|
|
2101
2109
|
apiKey: a,
|
|
@@ -2113,28 +2121,28 @@ function aa(e) {
|
|
|
2113
2121
|
hoveredId: b,
|
|
2114
2122
|
selectedId: k,
|
|
2115
2123
|
onCardHover: S,
|
|
2116
|
-
onPinClick:
|
|
2117
|
-
consentGranted:
|
|
2118
|
-
onConsentRequest:
|
|
2119
|
-
onBoundsChange:
|
|
2120
|
-
listContainerRef:
|
|
2124
|
+
onPinClick: E,
|
|
2125
|
+
consentGranted: O,
|
|
2126
|
+
onConsentRequest: F,
|
|
2127
|
+
onBoundsChange: H,
|
|
2128
|
+
listContainerRef: M,
|
|
2121
2129
|
facets: h,
|
|
2122
|
-
value:
|
|
2123
|
-
onChange:
|
|
2124
|
-
} = e, { t:
|
|
2125
|
-
() => e.mapPreview && !
|
|
2126
|
-
),
|
|
2127
|
-
|
|
2130
|
+
value: C,
|
|
2131
|
+
onChange: P
|
|
2132
|
+
} = e, { t: I } = _("ui"), [D, j] = Y(
|
|
2133
|
+
() => e.mapPreview && !O ? "peek" : "half"
|
|
2134
|
+
), $ = T(!1), U = B((u) => {
|
|
2135
|
+
$.current = !0, j(u);
|
|
2128
2136
|
}, []);
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
}, [
|
|
2132
|
-
const
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
!
|
|
2136
|
-
),
|
|
2137
|
-
|
|
2137
|
+
Je(() => {
|
|
2138
|
+
O && !$.current && j((u) => u === "peek" ? "half" : u);
|
|
2139
|
+
}, [O]);
|
|
2140
|
+
const ae = na[D], v = Ie("(min-width: 1024px)"), L = T(null), se = T(null), he = sa(
|
|
2141
|
+
L,
|
|
2142
|
+
se,
|
|
2143
|
+
!v && !!e.mapPreview
|
|
2144
|
+
), ce = p ? g ?? /* @__PURE__ */ n(it, { onRetry: w, headingLevel: e.headingLevel }) : t.length === 0 && !o ? d ?? /* @__PURE__ */ n(st, { headingLevel: e.headingLevel }) : /* @__PURE__ */ n(
|
|
2145
|
+
nt,
|
|
2138
2146
|
{
|
|
2139
2147
|
results: t,
|
|
2140
2148
|
headingLevel: e.headingLevel,
|
|
@@ -2154,10 +2162,10 @@ function aa(e) {
|
|
|
2154
2162
|
loadingSkeletons: o,
|
|
2155
2163
|
density: "compact",
|
|
2156
2164
|
apiKey: a,
|
|
2157
|
-
containerRef:
|
|
2165
|
+
containerRef: M
|
|
2158
2166
|
}
|
|
2159
|
-
),
|
|
2160
|
-
|
|
2167
|
+
), me = /* @__PURE__ */ n(
|
|
2168
|
+
We,
|
|
2161
2169
|
{
|
|
2162
2170
|
results: t,
|
|
2163
2171
|
searchCentre: c,
|
|
@@ -2168,38 +2176,40 @@ function aa(e) {
|
|
|
2168
2176
|
hoveredId: e.mapHoveredId,
|
|
2169
2177
|
selectedId: e.mapSelectedId,
|
|
2170
2178
|
onMapClick: e.onMapClick,
|
|
2171
|
-
showMarkerCard:
|
|
2179
|
+
showMarkerCard: v,
|
|
2172
2180
|
formatNextSlot: e.formatNextSlot,
|
|
2173
2181
|
onPinHoverChange: e.onPinHoverChange,
|
|
2174
2182
|
onPinClick: (u) => {
|
|
2175
|
-
ge(t, u, "pin", e.onResultSelect),
|
|
2183
|
+
ge(t, u, "pin", e.onResultSelect), E(u);
|
|
2176
2184
|
},
|
|
2177
2185
|
onPinHover: e.onPinHover,
|
|
2178
2186
|
onPinFirstInteract: e.onPinFirstInteract,
|
|
2179
|
-
onBoundsChange:
|
|
2180
|
-
consentGranted:
|
|
2187
|
+
onBoundsChange: H,
|
|
2188
|
+
consentGranted: O,
|
|
2181
2189
|
staticPreview: e.mapPreview,
|
|
2190
|
+
loadTimeoutMs: e.mapLoadTimeoutMs,
|
|
2191
|
+
onLoadError: e.onMapLoadError,
|
|
2182
2192
|
fitResultIds: e.mapFitResultIds,
|
|
2183
|
-
onConsentRequest:
|
|
2193
|
+
onConsentRequest: F,
|
|
2184
2194
|
mapHandleRef: e.mapHandleRef
|
|
2185
2195
|
}
|
|
2186
|
-
),
|
|
2196
|
+
), ye = h.length > 0 ? /* @__PURE__ */ n(
|
|
2187
2197
|
"div",
|
|
2188
2198
|
{
|
|
2189
|
-
ref:
|
|
2199
|
+
ref: se,
|
|
2190
2200
|
className: "ds:absolute ds:start-[var(--spacing-md)] ds:top-[var(--spacing-md)] ds:max-w-[calc(100%-var(--spacing-lg))]",
|
|
2191
2201
|
children: /* @__PURE__ */ n(
|
|
2192
|
-
|
|
2202
|
+
Lt,
|
|
2193
2203
|
{
|
|
2194
2204
|
facets: h,
|
|
2195
|
-
value:
|
|
2196
|
-
onChange: (u) =>
|
|
2205
|
+
value: C.facets,
|
|
2206
|
+
onChange: (u) => P({ ...C, facets: u }),
|
|
2197
2207
|
floating: !0
|
|
2198
2208
|
}
|
|
2199
2209
|
)
|
|
2200
2210
|
}
|
|
2201
2211
|
) : null;
|
|
2202
|
-
return /* @__PURE__ */ n("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children:
|
|
2212
|
+
return /* @__PURE__ */ n("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: v ? (
|
|
2203
2213
|
// Desktop: 65/35 map left + cards rail right. NO Sheet (the
|
|
2204
2214
|
// Sheet would portal to body and occlude the desktop layout
|
|
2205
2215
|
// regardless of the parent's `lg:hidden` class).
|
|
@@ -2217,11 +2227,11 @@ function aa(e) {
|
|
|
2217
2227
|
// the map column is `lg:sticky lg:h-[44rem]` (stays visible
|
|
2218
2228
|
// as the patient scrolls cards) and the rail renders at
|
|
2219
2229
|
// natural height. Single page scroll.
|
|
2220
|
-
/* @__PURE__ */
|
|
2221
|
-
/* @__PURE__ */ n(
|
|
2222
|
-
/* @__PURE__ */
|
|
2223
|
-
/* @__PURE__ */ n("div", { className: "ds:sticky ds:top-[var(--spacing-md)] ds:h-[44rem]", children:
|
|
2224
|
-
/* @__PURE__ */ n("div", { className: "ds:min-w-0", children:
|
|
2230
|
+
/* @__PURE__ */ y(Ze, { children: [
|
|
2231
|
+
/* @__PURE__ */ n(at, { variantBodyProps: e }),
|
|
2232
|
+
/* @__PURE__ */ y("div", { className: "ds:grid ds:grid-cols-[65fr_35fr] ds:gap-[var(--spacing-lg)] ds:items-start", children: [
|
|
2233
|
+
/* @__PURE__ */ n("div", { className: "ds:sticky ds:top-[var(--spacing-md)] ds:h-[44rem]", children: me }),
|
|
2234
|
+
/* @__PURE__ */ n("div", { className: "ds:min-w-0", children: ce })
|
|
2225
2235
|
] })
|
|
2226
2236
|
] })
|
|
2227
2237
|
) : (
|
|
@@ -2231,9 +2241,9 @@ function aa(e) {
|
|
|
2231
2241
|
// via the snap radiogroup at the top of the sheet body. Filters
|
|
2232
2242
|
// stay floating on mobile — the full-bleed map IS the viewport
|
|
2233
2243
|
// chrome, so floating chips are the only place for them.
|
|
2234
|
-
/* @__PURE__ */
|
|
2244
|
+
/* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
2235
2245
|
/* @__PURE__ */ n(
|
|
2236
|
-
|
|
2246
|
+
Mt,
|
|
2237
2247
|
{
|
|
2238
2248
|
heading: e.heading,
|
|
2239
2249
|
headingLevel: e.headingLevel,
|
|
@@ -2242,59 +2252,59 @@ function aa(e) {
|
|
|
2242
2252
|
searchCentreLabel: c == null ? void 0 : c.label
|
|
2243
2253
|
}
|
|
2244
2254
|
),
|
|
2245
|
-
/* @__PURE__ */
|
|
2255
|
+
/* @__PURE__ */ y(
|
|
2246
2256
|
"div",
|
|
2247
2257
|
{
|
|
2248
|
-
ref:
|
|
2258
|
+
ref: L,
|
|
2249
2259
|
className: "ds:relative ds:h-[60vh] ds:min-h-[20rem]",
|
|
2250
2260
|
style: he.mapStyle,
|
|
2251
2261
|
children: [
|
|
2252
|
-
|
|
2253
|
-
|
|
2262
|
+
me,
|
|
2263
|
+
ye
|
|
2254
2264
|
]
|
|
2255
2265
|
}
|
|
2256
2266
|
),
|
|
2257
|
-
/* @__PURE__ */ n(
|
|
2258
|
-
|
|
2267
|
+
/* @__PURE__ */ n(re.Root, { open: !0, modal: !1, children: /* @__PURE__ */ n(
|
|
2268
|
+
re.Content,
|
|
2259
2269
|
{
|
|
2260
2270
|
side: "bottom",
|
|
2261
|
-
size:
|
|
2271
|
+
size: ae,
|
|
2262
2272
|
className: "ds:max-h-[var(--map-first-sheet-max-block-size,100dvh)] ds:[&_[data-radix-scroll-area-viewport]]:overscroll-contain",
|
|
2263
2273
|
style: he.sheetStyle,
|
|
2264
2274
|
onEscapeKeyDown: (u) => u.preventDefault(),
|
|
2265
2275
|
onPointerDownOutside: (u) => u.preventDefault(),
|
|
2266
2276
|
onInteractOutside: (u) => u.preventDefault(),
|
|
2267
2277
|
onOpenAutoFocus: (u) => u.preventDefault(),
|
|
2268
|
-
children: /* @__PURE__ */
|
|
2269
|
-
/* @__PURE__ */ n(
|
|
2270
|
-
/* @__PURE__ */
|
|
2271
|
-
/* @__PURE__ */ n(
|
|
2278
|
+
children: /* @__PURE__ */ y(re.Body, { children: [
|
|
2279
|
+
/* @__PURE__ */ n(re.Description, { className: "ds:sr-only", children: I("practiceResults.sheet.descriptionMapFirst") }),
|
|
2280
|
+
/* @__PURE__ */ y("div", { className: "ds:flex ds:items-start ds:justify-between ds:gap-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]", children: [
|
|
2281
|
+
/* @__PURE__ */ n(re.Title, { className: "type-title-card ds:m-0 ds:text-[var(--foreground)]", children: I("practiceResults.sheet.title", {
|
|
2272
2282
|
count: e.totalCount ?? t.length
|
|
2273
2283
|
}) }),
|
|
2274
2284
|
/* @__PURE__ */ n(
|
|
2275
|
-
|
|
2285
|
+
aa,
|
|
2276
2286
|
{
|
|
2277
|
-
value:
|
|
2278
|
-
onChange:
|
|
2287
|
+
value: D,
|
|
2288
|
+
onChange: U
|
|
2279
2289
|
}
|
|
2280
2290
|
)
|
|
2281
2291
|
] }),
|
|
2282
2292
|
e.sortOptions.length > 0 ? /* @__PURE__ */ n("div", { className: "ds:pb-[var(--spacing-sm)]", children: /* @__PURE__ */ n(
|
|
2283
|
-
|
|
2293
|
+
Ge,
|
|
2284
2294
|
{
|
|
2285
2295
|
options: e.sortOptions,
|
|
2286
|
-
value:
|
|
2287
|
-
onChange: (u) =>
|
|
2296
|
+
value: C.sort ?? "relevance",
|
|
2297
|
+
onChange: (u) => P({ ...C, sort: u })
|
|
2288
2298
|
}
|
|
2289
2299
|
) }) : null,
|
|
2290
|
-
|
|
2300
|
+
ce
|
|
2291
2301
|
] })
|
|
2292
2302
|
}
|
|
2293
2303
|
) })
|
|
2294
2304
|
] })
|
|
2295
2305
|
) });
|
|
2296
2306
|
}
|
|
2297
|
-
function
|
|
2307
|
+
function ra(e) {
|
|
2298
2308
|
const {
|
|
2299
2309
|
results: t,
|
|
2300
2310
|
apiKey: a,
|
|
@@ -2309,8 +2319,8 @@ function sa(e) {
|
|
|
2309
2319
|
selectedId: g,
|
|
2310
2320
|
onCardHover: p,
|
|
2311
2321
|
listContainerRef: w
|
|
2312
|
-
} = e, b = f ? l ?? /* @__PURE__ */ n(
|
|
2313
|
-
|
|
2322
|
+
} = e, b = f ? l ?? /* @__PURE__ */ n(it, { onRetry: o, headingLevel: e.headingLevel }) : t.length === 0 && !s ? c ?? /* @__PURE__ */ n(st, { headingLevel: e.headingLevel }) : /* @__PURE__ */ n(
|
|
2323
|
+
nt,
|
|
2314
2324
|
{
|
|
2315
2325
|
results: t,
|
|
2316
2326
|
headingLevel: e.headingLevel,
|
|
@@ -2333,12 +2343,12 @@ function sa(e) {
|
|
|
2333
2343
|
containerRef: w
|
|
2334
2344
|
}
|
|
2335
2345
|
);
|
|
2336
|
-
return /* @__PURE__ */
|
|
2337
|
-
/* @__PURE__ */ n(
|
|
2346
|
+
return /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
2347
|
+
/* @__PURE__ */ n(at, { variantBodyProps: e }),
|
|
2338
2348
|
b
|
|
2339
2349
|
] });
|
|
2340
2350
|
}
|
|
2341
|
-
const
|
|
2351
|
+
const oa = cn(function({
|
|
2342
2352
|
variant: t = "split-list-map",
|
|
2343
2353
|
loadResultSlots: a,
|
|
2344
2354
|
onResultSlotSelect: r,
|
|
@@ -2350,58 +2360,60 @@ const ia = rn(function({
|
|
|
2350
2360
|
googleMapsApiKey: o,
|
|
2351
2361
|
mapId: d,
|
|
2352
2362
|
clusterMarkers: g = "auto",
|
|
2353
|
-
defaultZoom: p =
|
|
2363
|
+
defaultZoom: p = An,
|
|
2354
2364
|
onBoundsChange: w,
|
|
2355
2365
|
consentGranted: b,
|
|
2356
2366
|
onConsentRequest: k,
|
|
2357
2367
|
skipConsentGate: S = !1,
|
|
2358
|
-
mapPreview:
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2368
|
+
mapPreview: E,
|
|
2369
|
+
mapLoadTimeoutMs: O,
|
|
2370
|
+
onMapLoadError: F,
|
|
2371
|
+
mapFitResultIds: H,
|
|
2372
|
+
onLoadMore: M,
|
|
2373
|
+
loadingMore: h,
|
|
2362
2374
|
value: C,
|
|
2363
|
-
onChange:
|
|
2364
|
-
sortOptions:
|
|
2365
|
-
onResultSelect:
|
|
2366
|
-
loading:
|
|
2367
|
-
emptyResultsSlot:
|
|
2368
|
-
errorSlot:
|
|
2369
|
-
error:
|
|
2370
|
-
onRetry:
|
|
2371
|
-
heading:
|
|
2372
|
-
headingLevel:
|
|
2373
|
-
intro:
|
|
2374
|
-
cardOpenButtonLabel:
|
|
2375
|
-
cardBookButtonLabel:
|
|
2376
|
-
showCardOpenButton:
|
|
2377
|
-
"aria-label":
|
|
2378
|
-
id:
|
|
2379
|
-
className:
|
|
2380
|
-
...
|
|
2381
|
-
},
|
|
2382
|
-
const { t:
|
|
2375
|
+
onChange: P,
|
|
2376
|
+
sortOptions: I,
|
|
2377
|
+
onResultSelect: D,
|
|
2378
|
+
loading: j,
|
|
2379
|
+
emptyResultsSlot: $,
|
|
2380
|
+
errorSlot: U,
|
|
2381
|
+
error: ae,
|
|
2382
|
+
onRetry: v,
|
|
2383
|
+
heading: L,
|
|
2384
|
+
headingLevel: se = 2,
|
|
2385
|
+
intro: he,
|
|
2386
|
+
cardOpenButtonLabel: ce,
|
|
2387
|
+
cardBookButtonLabel: me,
|
|
2388
|
+
showCardOpenButton: ye = !0,
|
|
2389
|
+
"aria-label": u,
|
|
2390
|
+
id: R,
|
|
2391
|
+
className: A,
|
|
2392
|
+
...ie
|
|
2393
|
+
}, W) {
|
|
2394
|
+
const { t: V, i18n: Q } = _("ui"), [J, q] = Y(null), [Z, ue] = Y(null), [Te, ee] = Y(null), [Fe, Et] = Y(null), X = Ie("(min-width: 1024px)"), xe = T(/* @__PURE__ */ new Set()), _e = T(/* @__PURE__ */ new Set()), Ot = T(null), we = T(null), He = K(
|
|
2383
2395
|
() => ({
|
|
2384
2396
|
getVariant: () => t,
|
|
2385
2397
|
scrollToResult: (m) => {
|
|
2386
|
-
const
|
|
2387
|
-
if (!
|
|
2388
|
-
const x =
|
|
2398
|
+
const N = we.current;
|
|
2399
|
+
if (!N) return;
|
|
2400
|
+
const x = N.querySelector(
|
|
2389
2401
|
`[data-component="practice-result-card"][data-result-id="${CSS.escape(m)}"]`
|
|
2390
2402
|
);
|
|
2391
|
-
x && (x.scrollIntoView({ behavior: "smooth", block: "nearest" }),
|
|
2403
|
+
x && (x.scrollIntoView({ behavior: "smooth", block: "nearest" }), X || q(null), ee(m));
|
|
2392
2404
|
},
|
|
2393
2405
|
focusPin: (m) => {
|
|
2394
|
-
|
|
2406
|
+
X && t !== "rich-cards" ? (ee(null), ue(m)) : (X || q(null), ee(m));
|
|
2395
2407
|
}
|
|
2396
2408
|
}),
|
|
2397
|
-
[t,
|
|
2409
|
+
[t, X]
|
|
2398
2410
|
);
|
|
2399
|
-
|
|
2400
|
-
const
|
|
2411
|
+
ln(W, () => He, [He]), hn(Rn, He, R);
|
|
2412
|
+
const Vt = ye ? ce ?? V("practiceResults.card.open") : void 0, Bt = me ?? V("practiceResults.card.book"), $t = B(
|
|
2401
2413
|
(m) => {
|
|
2402
2414
|
if (m.nextAvailableSlot)
|
|
2403
2415
|
try {
|
|
2404
|
-
return new Intl.DateTimeFormat(
|
|
2416
|
+
return new Intl.DateTimeFormat(Q.language, {
|
|
2405
2417
|
weekday: "short",
|
|
2406
2418
|
hour: "numeric",
|
|
2407
2419
|
minute: "numeric"
|
|
@@ -2410,158 +2422,158 @@ const ia = rn(function({
|
|
|
2410
2422
|
return m.nextAvailableSlot.dateTime;
|
|
2411
2423
|
}
|
|
2412
2424
|
},
|
|
2413
|
-
[
|
|
2414
|
-
),
|
|
2415
|
-
|
|
2416
|
-
|
|
2425
|
+
[Q.language]
|
|
2426
|
+
), rt = T(null);
|
|
2427
|
+
G(() => {
|
|
2428
|
+
rt.current !== t && (rt.current = t, ne("serp_variant_exposed", {
|
|
2417
2429
|
variant: t,
|
|
2418
2430
|
totalCount: c ?? i.length
|
|
2419
|
-
}),
|
|
2431
|
+
}), xe.current = /* @__PURE__ */ new Set(), _e.current = /* @__PURE__ */ new Set());
|
|
2420
2432
|
}, [t]);
|
|
2421
|
-
const
|
|
2422
|
-
() =>
|
|
2433
|
+
const De = T(!1), Ee = K(
|
|
2434
|
+
() => Fn(f ?? [], i, C.facets),
|
|
2423
2435
|
[f, i, C.facets]
|
|
2424
|
-
),
|
|
2425
|
-
() =>
|
|
2426
|
-
[
|
|
2427
|
-
),
|
|
2428
|
-
const m =
|
|
2429
|
-
return
|
|
2430
|
-
}, [i, C.facets,
|
|
2431
|
-
() => s ?
|
|
2436
|
+
), ke = K(
|
|
2437
|
+
() => I ? gt.filter((m) => I.includes(m)) : gt,
|
|
2438
|
+
[I]
|
|
2439
|
+
), Ce = l ? "distance" : "relevance", ot = C.sort ?? Ce, Oe = ke.includes(ot) ? ot : ke.includes(Ce) ? Ce : ke[0] ?? Ce, z = K(() => {
|
|
2440
|
+
const m = _n(i, C.facets, Ee);
|
|
2441
|
+
return En(m, Oe, l);
|
|
2442
|
+
}, [i, C.facets, Ee, Oe, l]), Ve = K(
|
|
2443
|
+
() => s ? z.map(
|
|
2432
2444
|
(m) => m.contentLang ? m : { ...m, contentLang: s }
|
|
2433
|
-
) :
|
|
2434
|
-
[
|
|
2445
|
+
) : z,
|
|
2446
|
+
[z, s]
|
|
2435
2447
|
);
|
|
2436
|
-
|
|
2437
|
-
const m =
|
|
2438
|
-
m && !
|
|
2448
|
+
G(() => {
|
|
2449
|
+
const m = z.length === 0;
|
|
2450
|
+
m && !De.current ? (ne("serp_empty_results", {
|
|
2439
2451
|
appliedFacets: C.facets ?? {}
|
|
2440
|
-
}),
|
|
2441
|
-
}, [
|
|
2442
|
-
const m = new Set(
|
|
2443
|
-
|
|
2444
|
-
}, [
|
|
2445
|
-
|
|
2452
|
+
}), De.current = !0) : m || (De.current = !1);
|
|
2453
|
+
}, [z.length, C.facets]), G(() => {
|
|
2454
|
+
const m = new Set(z.map((x) => x.id)), N = (x) => x !== null && m.has(x) ? x : null;
|
|
2455
|
+
q(N), ue(N), ee(N);
|
|
2456
|
+
}, [z]), G(() => {
|
|
2457
|
+
q(null), ue(null), ee(null);
|
|
2446
2458
|
}, [t]);
|
|
2447
|
-
const fe =
|
|
2448
|
-
|
|
2459
|
+
const fe = T(null), ct = T(null);
|
|
2460
|
+
G(
|
|
2449
2461
|
() => () => {
|
|
2450
2462
|
fe.current && clearTimeout(fe.current);
|
|
2451
2463
|
},
|
|
2452
2464
|
[]
|
|
2453
2465
|
);
|
|
2454
|
-
const
|
|
2455
|
-
|
|
2456
|
-
|
|
2466
|
+
const Be = B((m) => {
|
|
2467
|
+
xe.current.has(m) || ct.current === m && fe.current || (fe.current && clearTimeout(fe.current), ct.current = m, fe.current = setTimeout(() => {
|
|
2468
|
+
xe.current.has(m) || (xe.current.add(m), ne("serp_result_hovered_card", { resultId: m })), fe.current = null;
|
|
2457
2469
|
}, 500));
|
|
2458
|
-
}, []),
|
|
2459
|
-
(m,
|
|
2460
|
-
|
|
2470
|
+
}, []), zt = B(
|
|
2471
|
+
(m, N) => {
|
|
2472
|
+
Be(m), N && (q(m), ee(null));
|
|
2461
2473
|
},
|
|
2462
|
-
[
|
|
2463
|
-
),
|
|
2464
|
-
|
|
2465
|
-
if (
|
|
2466
|
-
const m = (
|
|
2467
|
-
|
|
2474
|
+
[Be]
|
|
2475
|
+
), Kt = B(() => q(null), []);
|
|
2476
|
+
G(() => {
|
|
2477
|
+
if (J === null) return;
|
|
2478
|
+
const m = (N) => {
|
|
2479
|
+
N.key === "Escape" && q(null);
|
|
2468
2480
|
};
|
|
2469
2481
|
return document.addEventListener("keydown", m), () => document.removeEventListener("keydown", m);
|
|
2470
|
-
}, [
|
|
2471
|
-
const
|
|
2472
|
-
(m,
|
|
2473
|
-
if (!
|
|
2474
|
-
|
|
2482
|
+
}, [J]);
|
|
2483
|
+
const jt = B(
|
|
2484
|
+
(m, N, x) => {
|
|
2485
|
+
if (!N) {
|
|
2486
|
+
q((te) => te === m ? null : te);
|
|
2475
2487
|
return;
|
|
2476
2488
|
}
|
|
2477
|
-
|
|
2489
|
+
X && (x === "pointer" && !Pe() || (q(m), ee(null)));
|
|
2478
2490
|
},
|
|
2479
|
-
[
|
|
2480
|
-
),
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
}, [
|
|
2484
|
-
const
|
|
2485
|
-
|
|
2486
|
-
}, []),
|
|
2491
|
+
[X]
|
|
2492
|
+
), lt = T(X);
|
|
2493
|
+
G(() => {
|
|
2494
|
+
lt.current && !X && q(null), lt.current = X;
|
|
2495
|
+
}, [X]);
|
|
2496
|
+
const qt = B(() => {
|
|
2497
|
+
ue(null), ee(null);
|
|
2498
|
+
}, []), Gt = B(
|
|
2487
2499
|
(m) => {
|
|
2488
|
-
var
|
|
2489
|
-
if (!
|
|
2490
|
-
const x = (
|
|
2500
|
+
var N;
|
|
2501
|
+
if (!X) {
|
|
2502
|
+
const x = (N = we.current) == null ? void 0 : N.querySelector(
|
|
2491
2503
|
`[data-component="practice-result-card"][data-result-id="${CSS.escape(m)}"]`
|
|
2492
2504
|
);
|
|
2493
|
-
|
|
2505
|
+
q(null), ee(m), x == null || x.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
2494
2506
|
return;
|
|
2495
2507
|
}
|
|
2496
|
-
|
|
2508
|
+
ee(null), ue(m), Et((x) => ({ id: m, n: ((x == null ? void 0 : x.n) ?? 0) + 1 }));
|
|
2497
2509
|
},
|
|
2498
|
-
[
|
|
2510
|
+
[X]
|
|
2499
2511
|
);
|
|
2500
|
-
|
|
2501
|
-
if (!
|
|
2502
|
-
const m =
|
|
2503
|
-
`[data-component="practice-result-card"][data-result-id="${CSS.escape(
|
|
2512
|
+
Je(() => {
|
|
2513
|
+
if (!Fe) return;
|
|
2514
|
+
const m = we.current, N = m == null ? void 0 : m.querySelector(
|
|
2515
|
+
`[data-component="practice-result-card"][data-result-id="${CSS.escape(Fe.id)}"]`
|
|
2504
2516
|
);
|
|
2505
|
-
|
|
2506
|
-
behavior:
|
|
2517
|
+
N == null || N.scrollIntoView({
|
|
2518
|
+
behavior: pn(N) ? "instant" : "smooth",
|
|
2507
2519
|
block: "start"
|
|
2508
2520
|
});
|
|
2509
|
-
}, [
|
|
2510
|
-
const
|
|
2511
|
-
|
|
2512
|
-
}, []),
|
|
2521
|
+
}, [Fe]);
|
|
2522
|
+
const Ut = B((m) => {
|
|
2523
|
+
_e.current.has(m) || (_e.current.add(m), ne("serp_result_hovered_pin", { resultId: m }));
|
|
2524
|
+
}, []), dt = T(null), Wt = B(
|
|
2513
2525
|
(m) => {
|
|
2514
|
-
|
|
2515
|
-
const
|
|
2516
|
-
if (
|
|
2517
|
-
if (
|
|
2518
|
-
const x =
|
|
2526
|
+
ue(null), Pe() ? (ee(null), q(m)) : (q(null), ee(m));
|
|
2527
|
+
const N = z.find((x) => x.id === m);
|
|
2528
|
+
if (N) {
|
|
2529
|
+
if (N.location) {
|
|
2530
|
+
const x = dt.current;
|
|
2519
2531
|
x == null || x.panTo({
|
|
2520
|
-
lat:
|
|
2521
|
-
lng:
|
|
2532
|
+
lat: N.location.lat,
|
|
2533
|
+
lng: N.location.lng
|
|
2522
2534
|
}), x == null || x.setZoom(16);
|
|
2523
2535
|
}
|
|
2524
|
-
ge(
|
|
2536
|
+
ge(z, m, "card", D);
|
|
2525
2537
|
}
|
|
2526
2538
|
},
|
|
2527
|
-
[
|
|
2528
|
-
),
|
|
2539
|
+
[z, D]
|
|
2540
|
+
), Zt = B(
|
|
2529
2541
|
(m) => {
|
|
2530
2542
|
ge(
|
|
2531
|
-
|
|
2543
|
+
z,
|
|
2532
2544
|
m,
|
|
2533
2545
|
"open-button",
|
|
2534
|
-
|
|
2546
|
+
D
|
|
2535
2547
|
);
|
|
2536
2548
|
},
|
|
2537
|
-
[
|
|
2538
|
-
),
|
|
2549
|
+
[z, D]
|
|
2550
|
+
), Xt = B(
|
|
2539
2551
|
(m) => {
|
|
2540
2552
|
ge(
|
|
2541
|
-
|
|
2553
|
+
z,
|
|
2542
2554
|
m,
|
|
2543
2555
|
"book-button",
|
|
2544
|
-
|
|
2556
|
+
D
|
|
2545
2557
|
);
|
|
2546
2558
|
},
|
|
2547
|
-
[
|
|
2548
|
-
),
|
|
2549
|
-
(m,
|
|
2550
|
-
const x =
|
|
2551
|
-
|
|
2559
|
+
[z, D]
|
|
2560
|
+
), Yt = !!j && i.length === 0, Qt = B(
|
|
2561
|
+
(m, N) => {
|
|
2562
|
+
const x = z.find((te) => te.id === m.id);
|
|
2563
|
+
D(x ?? m, N);
|
|
2552
2564
|
},
|
|
2553
|
-
[
|
|
2554
|
-
),
|
|
2555
|
-
results:
|
|
2565
|
+
[z, D]
|
|
2566
|
+
), $e = {
|
|
2567
|
+
results: Ve,
|
|
2556
2568
|
totalCount: c,
|
|
2557
2569
|
searchCentre: l,
|
|
2558
|
-
facets:
|
|
2559
|
-
value: { ...C, sort:
|
|
2560
|
-
sortOptions:
|
|
2561
|
-
onChange:
|
|
2562
|
-
onResultSelect:
|
|
2563
|
-
onLoadMore:
|
|
2564
|
-
loadingMore:
|
|
2570
|
+
facets: Ee,
|
|
2571
|
+
value: { ...C, sort: Oe },
|
|
2572
|
+
sortOptions: ke,
|
|
2573
|
+
onChange: P,
|
|
2574
|
+
onResultSelect: Qt,
|
|
2575
|
+
onLoadMore: M,
|
|
2576
|
+
loadingMore: h,
|
|
2565
2577
|
apiKey: o,
|
|
2566
2578
|
mapId: d,
|
|
2567
2579
|
clusterMarkers: g,
|
|
@@ -2573,111 +2585,113 @@ const ia = rn(function({
|
|
|
2573
2585
|
// because no placeholder renders — nothing to fire it from.
|
|
2574
2586
|
consentGranted: S ? !0 : b,
|
|
2575
2587
|
onConsentRequest: S ? void 0 : k,
|
|
2576
|
-
mapPreview:
|
|
2577
|
-
|
|
2588
|
+
mapPreview: E,
|
|
2589
|
+
mapLoadTimeoutMs: O,
|
|
2590
|
+
onMapLoadError: F,
|
|
2591
|
+
mapFitResultIds: H,
|
|
2578
2592
|
onBoundsChange: w,
|
|
2579
|
-
loadingSkeletons:
|
|
2580
|
-
emptyResultsSlot:
|
|
2581
|
-
errorSlot:
|
|
2582
|
-
error:
|
|
2583
|
-
onRetry:
|
|
2584
|
-
heading:
|
|
2585
|
-
headingLevel:
|
|
2586
|
-
intro:
|
|
2587
|
-
hoveredId:
|
|
2588
|
-
selectedId:
|
|
2589
|
-
softId:
|
|
2590
|
-
mapHoveredId:
|
|
2591
|
-
mapSelectedId:
|
|
2592
|
-
onCardHover:
|
|
2593
|
-
onCardLeave:
|
|
2594
|
-
onPinHover:
|
|
2595
|
-
onPinHoverChange:
|
|
2596
|
-
onMapClick:
|
|
2597
|
-
onPinClick:
|
|
2598
|
-
onPinFirstInteract:
|
|
2599
|
-
onCardSelect:
|
|
2600
|
-
onCardOpenClick:
|
|
2601
|
-
onCardBookClick:
|
|
2602
|
-
openLabel:
|
|
2603
|
-
bookLabel:
|
|
2604
|
-
formatNextSlot:
|
|
2605
|
-
listContainerRef:
|
|
2606
|
-
mapHandleRef:
|
|
2607
|
-
},
|
|
2593
|
+
loadingSkeletons: Yt,
|
|
2594
|
+
emptyResultsSlot: $,
|
|
2595
|
+
errorSlot: U,
|
|
2596
|
+
error: ae,
|
|
2597
|
+
onRetry: v,
|
|
2598
|
+
heading: L,
|
|
2599
|
+
headingLevel: se,
|
|
2600
|
+
intro: he,
|
|
2601
|
+
hoveredId: J,
|
|
2602
|
+
selectedId: Z,
|
|
2603
|
+
softId: Te,
|
|
2604
|
+
mapHoveredId: X ? J : null,
|
|
2605
|
+
mapSelectedId: X ? Z ?? Te : J ?? Te,
|
|
2606
|
+
onCardHover: zt,
|
|
2607
|
+
onCardLeave: Kt,
|
|
2608
|
+
onPinHover: Be,
|
|
2609
|
+
onPinHoverChange: jt,
|
|
2610
|
+
onMapClick: qt,
|
|
2611
|
+
onPinClick: Gt,
|
|
2612
|
+
onPinFirstInteract: Ut,
|
|
2613
|
+
onCardSelect: Wt,
|
|
2614
|
+
onCardOpenClick: Zt,
|
|
2615
|
+
onCardBookClick: Xt,
|
|
2616
|
+
openLabel: Vt,
|
|
2617
|
+
bookLabel: Bt,
|
|
2618
|
+
formatNextSlot: $t,
|
|
2619
|
+
listContainerRef: Ot,
|
|
2620
|
+
mapHandleRef: dt
|
|
2621
|
+
}, ze = T({
|
|
2608
2622
|
loadResultSlots: a,
|
|
2609
2623
|
onResultSlotSelect: r,
|
|
2610
|
-
displayResults:
|
|
2611
|
-
processedResults:
|
|
2624
|
+
displayResults: Ve,
|
|
2625
|
+
processedResults: z
|
|
2612
2626
|
});
|
|
2613
|
-
|
|
2614
|
-
|
|
2627
|
+
G(() => {
|
|
2628
|
+
ze.current = {
|
|
2615
2629
|
loadResultSlots: a,
|
|
2616
2630
|
onResultSlotSelect: r,
|
|
2617
|
-
displayResults:
|
|
2618
|
-
processedResults:
|
|
2631
|
+
displayResults: Ve,
|
|
2632
|
+
processedResults: z
|
|
2619
2633
|
};
|
|
2620
2634
|
});
|
|
2621
|
-
const
|
|
2622
|
-
() => t === "slot-cards" &&
|
|
2623
|
-
cache:
|
|
2624
|
-
loadResultSlots: (m,
|
|
2625
|
-
const x =
|
|
2626
|
-
(
|
|
2635
|
+
const Jt = T(/* @__PURE__ */ new Map()), ut = !!a, en = K(
|
|
2636
|
+
() => t === "slot-cards" && ut ? {
|
|
2637
|
+
cache: Jt.current,
|
|
2638
|
+
loadResultSlots: (m, N) => {
|
|
2639
|
+
const x = ze.current, te = x.processedResults.find(
|
|
2640
|
+
(Ke) => Ke.id === m.id
|
|
2627
2641
|
);
|
|
2628
|
-
return x.loadResultSlots(te ?? m,
|
|
2642
|
+
return x.loadResultSlots(te ?? m, N);
|
|
2629
2643
|
},
|
|
2630
|
-
onSlotSelect: (m,
|
|
2631
|
-
var
|
|
2632
|
-
const te =
|
|
2633
|
-
(
|
|
2634
|
-
),
|
|
2644
|
+
onSlotSelect: (m, N, x) => {
|
|
2645
|
+
var mt;
|
|
2646
|
+
const te = ze.current, Ke = te.displayResults.findIndex(
|
|
2647
|
+
(je) => je.id === m.id
|
|
2648
|
+
), an = typeof x.date == "string" ? be(x.date) : x.date, sn = Math.max(
|
|
2635
2649
|
0,
|
|
2636
|
-
|
|
2650
|
+
vn(an, /* @__PURE__ */ new Date())
|
|
2637
2651
|
);
|
|
2638
2652
|
ne("serp_slot_selected", {
|
|
2639
2653
|
resultId: m.id,
|
|
2640
|
-
position:
|
|
2641
|
-
daysAhead:
|
|
2654
|
+
position: Ke,
|
|
2655
|
+
daysAhead: sn
|
|
2642
2656
|
});
|
|
2643
|
-
const
|
|
2644
|
-
(
|
|
2657
|
+
const rn = te.processedResults.find(
|
|
2658
|
+
(je) => je.id === m.id
|
|
2645
2659
|
);
|
|
2646
|
-
(
|
|
2660
|
+
(mt = te.onResultSlotSelect) == null || mt.call(te, rn ?? m, N, x);
|
|
2647
2661
|
}
|
|
2648
2662
|
} : null,
|
|
2649
|
-
[t,
|
|
2650
|
-
),
|
|
2663
|
+
[t, ut]
|
|
2664
|
+
), tn = (() => {
|
|
2651
2665
|
switch (t) {
|
|
2652
2666
|
case "map-first":
|
|
2653
|
-
return /* @__PURE__ */ n(
|
|
2667
|
+
return /* @__PURE__ */ n(ia, { ...$e });
|
|
2654
2668
|
case "rich-cards":
|
|
2655
|
-
return /* @__PURE__ */ n(
|
|
2669
|
+
return /* @__PURE__ */ n(ra, { ...$e });
|
|
2656
2670
|
case "slot-cards":
|
|
2657
2671
|
case "split-list-map":
|
|
2658
2672
|
default:
|
|
2659
|
-
return /* @__PURE__ */ n(
|
|
2673
|
+
return /* @__PURE__ */ n(ta, { ...$e });
|
|
2660
2674
|
}
|
|
2661
|
-
})(),
|
|
2675
|
+
})(), nn = u ?? V("practiceResults.regionLabel");
|
|
2662
2676
|
return /* @__PURE__ */ n(
|
|
2663
2677
|
"div",
|
|
2664
2678
|
{
|
|
2665
|
-
ref:
|
|
2679
|
+
ref: we,
|
|
2666
2680
|
role: "region",
|
|
2667
|
-
"aria-label":
|
|
2668
|
-
id:
|
|
2681
|
+
"aria-label": nn,
|
|
2682
|
+
id: R,
|
|
2669
2683
|
"data-component": "practice-results",
|
|
2670
|
-
"data-component-id":
|
|
2684
|
+
"data-component-id": R,
|
|
2671
2685
|
"data-variant": t,
|
|
2672
|
-
className:
|
|
2673
|
-
...
|
|
2674
|
-
children: /* @__PURE__ */ n(
|
|
2686
|
+
className: Vn({ variant: t, className: A }),
|
|
2687
|
+
...ie,
|
|
2688
|
+
children: /* @__PURE__ */ n(et.Provider, { value: en, children: tn })
|
|
2675
2689
|
}
|
|
2676
2690
|
);
|
|
2677
2691
|
});
|
|
2678
|
-
|
|
2692
|
+
oa.displayName = "PracticeResults";
|
|
2679
2693
|
export {
|
|
2680
|
-
|
|
2681
|
-
|
|
2694
|
+
oa as P,
|
|
2695
|
+
Rn as p
|
|
2682
2696
|
};
|
|
2683
|
-
//# sourceMappingURL=practice-results-
|
|
2697
|
+
//# sourceMappingURL=practice-results-DaxGw9_f.js.map
|