@alfadocs/ui-kit-debug 1.92.0 → 1.93.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/map-view--c9bJDRw.js +726 -0
- package/dist/_chunks/map-view--c9bJDRw.js.map +1 -0
- package/dist/_chunks/{practice-results-Bls-mygM.js → practice-results-BWX9y6mS.js} +376 -374
- package/dist/_chunks/practice-results-BWX9y6mS.js.map +1 -0
- package/dist/agent-catalog.json +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.d.ts +17 -0
- 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 +1 -1
- package/dist/components/practice-results/practice-results.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/dist/_chunks/map-view-UrNgxBy3.js +0 -606
- package/dist/_chunks/map-view-UrNgxBy3.js.map +0 -1
- package/dist/_chunks/practice-results-Bls-mygM.js.map +0 -1
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { jsx as t, jsxs as h, Fragment as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as t, jsxs as h, Fragment as at } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as it, useState as me, useRef as F, useMemo as M, useImperativeHandle as st, useCallback as z, useEffect as Y } from "react";
|
|
3
3
|
import { c as O } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as C } from "react-i18next";
|
|
5
|
-
import { A as
|
|
6
|
-
import { A as
|
|
5
|
+
import { A as X } from "./alert-9kEwDza3.js";
|
|
6
|
+
import { A as Se } from "./avatar-a6042Ox2.js";
|
|
7
7
|
import { B as ee } from "./button-DohK_Ak_.js";
|
|
8
8
|
import { D } from "./dropdown-menu-D1we7oAY.js";
|
|
9
|
-
import { E as
|
|
10
|
-
import { M as
|
|
11
|
-
import { R as
|
|
9
|
+
import { E as rt } from "./empty-state-DwJ5YNzz.js";
|
|
10
|
+
import { M as ot } from "./map-view--c9bJDRw.js";
|
|
11
|
+
import { R as Le } from "./rating-CGYpg5dj.js";
|
|
12
12
|
import { S as I } from "./sheet-uZZXaO_S.js";
|
|
13
|
-
import { S as
|
|
14
|
-
import { S as
|
|
15
|
-
import { B as
|
|
16
|
-
import { u as
|
|
17
|
-
import { b as
|
|
18
|
-
import { u as
|
|
19
|
-
import { c as
|
|
20
|
-
import { R as
|
|
21
|
-
import { C as
|
|
22
|
-
import { L as
|
|
23
|
-
import { S as
|
|
24
|
-
import { H as
|
|
13
|
+
import { S as ct } from "./skeleton-tTWJpvAq.js";
|
|
14
|
+
import { S as lt } from "./spinner-CoflYlEx.js";
|
|
15
|
+
import { B as $ } from "./badge-BUk4RjTS.js";
|
|
16
|
+
import { u as dt } from "./use-media-query-CcAx5SMM.js";
|
|
17
|
+
import { b as ut, a as Ce } from "./format-price-BcFBa-WP.js";
|
|
18
|
+
import { u as mt } from "./registry-DvAUVLHh.js";
|
|
19
|
+
import { c as ft } from "./createLucideIcon-DhHxpK9K.js";
|
|
20
|
+
import { R as pt } from "./refresh-cw-DnI0cLFC.js";
|
|
21
|
+
import { C as Pe } from "./chevron-down-DWE7GSq9.js";
|
|
22
|
+
import { L as Ae } from "./languages-CGLX6Qpe.js";
|
|
23
|
+
import { S as Me } from "./shield-check-DCJALLVh.js";
|
|
24
|
+
import { H as Fe } from "./heart--qCA4ffe.js";
|
|
25
25
|
import { M as fe } from "./map-pin-BaY37-Km.js";
|
|
26
|
-
import { C as
|
|
27
|
-
import { C as
|
|
26
|
+
import { C as ht } from "./calendar-clock-hbObjfGY.js";
|
|
27
|
+
import { C as gt } from "./calendar-plus-BFrIRE4r.js";
|
|
28
28
|
/**
|
|
29
29
|
* @license lucide-react v1.22.0 - ISC
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the ISC license.
|
|
32
32
|
* See the LICENSE file in the root directory of this source tree.
|
|
33
33
|
*/
|
|
34
|
-
const
|
|
34
|
+
const vt = [
|
|
35
35
|
[
|
|
36
36
|
"path",
|
|
37
37
|
{
|
|
@@ -41,7 +41,7 @@ const bt = [
|
|
|
41
41
|
],
|
|
42
42
|
["path", { d: "M15 5.764v15", key: "1pn4in" }],
|
|
43
43
|
["path", { d: "M9 3.236v15", key: "1uimfh" }]
|
|
44
|
-
],
|
|
44
|
+
], bt = ft("map", vt), xt = {
|
|
45
45
|
id: "practice-results",
|
|
46
46
|
// `scroll` backs scroll_to_result; `pick` backs focus_pin (a non-persisting
|
|
47
47
|
// pin highlight). The active variant is consumer-owned via props, so there is
|
|
@@ -120,18 +120,18 @@ const bt = [
|
|
|
120
120
|
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", 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).'
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
},
|
|
123
|
+
}, yt = 13, wt = [
|
|
124
124
|
"distance",
|
|
125
125
|
"rating",
|
|
126
126
|
"next-available",
|
|
127
127
|
"price",
|
|
128
128
|
"relevance"
|
|
129
129
|
];
|
|
130
|
-
function
|
|
130
|
+
function Ie(e, n, i) {
|
|
131
131
|
const s = `languages.${e}`;
|
|
132
132
|
return i.exists(s) ? n(s) : e.toUpperCase();
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function B(e, n) {
|
|
135
135
|
if (typeof window > "u") return;
|
|
136
136
|
const i = window.track;
|
|
137
137
|
try {
|
|
@@ -143,24 +143,24 @@ function Z(e, n, i, s) {
|
|
|
143
143
|
const r = e.findIndex((l) => l.id === n);
|
|
144
144
|
if (r < 0) return;
|
|
145
145
|
const a = e[r];
|
|
146
|
-
a && (
|
|
146
|
+
a && (B("serp_result_clicked", { resultId: n, source: i, position: r }), s(a, i));
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
const s = (n.lat - e.lat) * Math.PI / 180, r = (n.lng - e.lng) * Math.PI / 180, a = e.lat * Math.PI / 180, l = n.lat * Math.PI / 180,
|
|
148
|
+
function kt(e, n) {
|
|
149
|
+
const s = (n.lat - e.lat) * Math.PI / 180, r = (n.lng - e.lng) * Math.PI / 180, a = e.lat * Math.PI / 180, l = n.lat * Math.PI / 180, d = Math.sin(s / 2), o = Math.sin(r / 2), p = d * d + Math.cos(a) * Math.cos(l) * o * o;
|
|
150
150
|
return 2 * 6371 * Math.asin(Math.min(1, Math.sqrt(p)));
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function Ct(e, n, i) {
|
|
153
153
|
var r;
|
|
154
154
|
const s = [];
|
|
155
155
|
for (const a of e) {
|
|
156
|
-
const l = a.field ?? a.key,
|
|
156
|
+
const l = a.field ?? a.key, d = (((r = i == null ? void 0 : i[a.key]) == null ? void 0 : r.length) ?? 0) > 0, o = a.type === "boolean" || a.type !== "options" && a.options.length === 0 && (d || n.some(
|
|
157
157
|
(p) => typeof p[l] == "boolean"
|
|
158
158
|
));
|
|
159
159
|
!o && a.options.length === 0 || s.push({ ...a, boolean: o, booleanField: l });
|
|
160
160
|
}
|
|
161
161
|
return s;
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function Rt(e, n, i) {
|
|
164
164
|
return !n || Object.keys(n).length === 0 ? e : e.filter((s) => {
|
|
165
165
|
for (const r of i) {
|
|
166
166
|
const a = n[r.key];
|
|
@@ -175,41 +175,41 @@ function Nt(e, n, i) {
|
|
|
175
175
|
return !0;
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function Nt(e) {
|
|
179
179
|
const n = e.firstVisitPrice && Number.isFinite(e.firstVisitPrice.minCents) ? e.firstVisitPrice.minCents : e.firstVisitPriceCents;
|
|
180
180
|
return n != null && Number.isFinite(n) && n >= 0 ? n : 1 / 0;
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function St(e) {
|
|
183
183
|
return e.firstVisitPrice && Number.isFinite(e.firstVisitPrice.minCents) ? e.firstVisitPrice.kind === "fixed" : !0;
|
|
184
184
|
}
|
|
185
185
|
function Re(e, n) {
|
|
186
186
|
return e == null && n == null ? 0 : e == null ? 1 : n == null ? -1 : e - n;
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function Lt(e, n, i) {
|
|
189
189
|
const s = e.map((a) => {
|
|
190
|
-
const l = a.location ? a.location.distanceKm ?? (i ?
|
|
190
|
+
const l = a.location ? a.location.distanceKm ?? (i ? kt(i, a.location) : void 0) : void 0;
|
|
191
191
|
return {
|
|
192
192
|
result: a,
|
|
193
193
|
distanceKm: l,
|
|
194
|
-
price: n === "price" ?
|
|
195
|
-
fixed: n === "price" ?
|
|
194
|
+
price: n === "price" ? Nt(a) : void 0,
|
|
195
|
+
fixed: n === "price" ? St(a) : !1
|
|
196
196
|
};
|
|
197
197
|
}), r = (a, l) => {
|
|
198
|
-
var
|
|
198
|
+
var d, o, p, c;
|
|
199
199
|
switch (n) {
|
|
200
200
|
case "distance":
|
|
201
201
|
return Re(a.distanceKm, l.distanceKm);
|
|
202
202
|
case "price": {
|
|
203
|
-
const
|
|
204
|
-
return
|
|
203
|
+
const u = a.price ?? 1 / 0, f = l.price ?? 1 / 0;
|
|
204
|
+
return u !== f ? u - f : u !== 1 / 0 && a.fixed !== l.fixed ? a.fixed ? -1 : 1 : Re(a.distanceKm, l.distanceKm);
|
|
205
205
|
}
|
|
206
206
|
case "rating": {
|
|
207
|
-
const
|
|
208
|
-
return (((o = l.result.rating) == null ? void 0 : o.value) ?? -1) -
|
|
207
|
+
const u = ((d = a.result.rating) == null ? void 0 : d.value) ?? -1;
|
|
208
|
+
return (((o = l.result.rating) == null ? void 0 : o.value) ?? -1) - u;
|
|
209
209
|
}
|
|
210
210
|
case "next-available": {
|
|
211
|
-
const
|
|
212
|
-
return !
|
|
211
|
+
const u = ((p = a.result.nextAvailableSlot) == null ? void 0 : p.dateTime) ?? "", f = ((c = l.result.nextAvailableSlot) == null ? void 0 : c.dateTime) ?? "";
|
|
212
|
+
return !u && !f ? 0 : u ? f ? u.localeCompare(f) : -1 : 1;
|
|
213
213
|
}
|
|
214
214
|
case "relevance":
|
|
215
215
|
default:
|
|
@@ -223,13 +223,13 @@ function Pt(e, n, i) {
|
|
|
223
223
|
} : a
|
|
224
224
|
);
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function Pt(e) {
|
|
227
227
|
let n = -1 / 0, i = 1 / 0, s = -1 / 0, r = 1 / 0, a = !1;
|
|
228
228
|
for (const l of e) {
|
|
229
229
|
if (!l.location) continue;
|
|
230
230
|
a = !0;
|
|
231
|
-
const { lat:
|
|
232
|
-
|
|
231
|
+
const { lat: d, lng: o } = l.location;
|
|
232
|
+
d > n && (n = d), d < i && (i = d), o > s && (s = o), o < r && (r = o);
|
|
233
233
|
}
|
|
234
234
|
if (a)
|
|
235
235
|
return { north: n, south: i, east: s, west: r };
|
|
@@ -247,7 +247,7 @@ const At = O(
|
|
|
247
247
|
defaultVariants: { variant: "split-list-map" }
|
|
248
248
|
}
|
|
249
249
|
);
|
|
250
|
-
function
|
|
250
|
+
function Te({
|
|
251
251
|
heading: e,
|
|
252
252
|
headingLevel: n,
|
|
253
253
|
intro: i,
|
|
@@ -256,19 +256,19 @@ function _e({
|
|
|
256
256
|
}) {
|
|
257
257
|
const { t: a } = C("ui"), l = `h${n}`;
|
|
258
258
|
if (!e && !i && s == null) return null;
|
|
259
|
-
const
|
|
259
|
+
const d = s != null ? r ? a("practiceResults.results.heading", {
|
|
260
260
|
count: s,
|
|
261
261
|
place: r
|
|
262
262
|
}) : a("practiceResults.results.summary", { count: s }) : void 0;
|
|
263
263
|
return /* @__PURE__ */ h("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
264
264
|
e ? /* @__PURE__ */ t(l, { className: "type-title-section ds:m-0 ds:text-[var(--foreground)]", children: e }) : null,
|
|
265
265
|
i ? /* @__PURE__ */ t("p", { className: "type-body ds:m-0 ds:text-[var(--muted-foreground)]", children: i }) : null,
|
|
266
|
-
|
|
266
|
+
d ? /* @__PURE__ */ t(
|
|
267
267
|
"p",
|
|
268
268
|
{
|
|
269
269
|
className: "type-body-sm ds:m-0 ds:text-[var(--muted-foreground)]",
|
|
270
270
|
"aria-live": "polite",
|
|
271
|
-
children:
|
|
271
|
+
children: d
|
|
272
272
|
}
|
|
273
273
|
) : null
|
|
274
274
|
] });
|
|
@@ -325,7 +325,7 @@ const te = O(
|
|
|
325
325
|
"ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
|
|
326
326
|
].join(" ")
|
|
327
327
|
);
|
|
328
|
-
function
|
|
328
|
+
function _e({
|
|
329
329
|
facets: e,
|
|
330
330
|
value: n,
|
|
331
331
|
onChange: i,
|
|
@@ -334,17 +334,17 @@ function Ve({
|
|
|
334
334
|
const { t: r } = C("ui"), a = M(() => n ?? {}, [n]), l = M(
|
|
335
335
|
() => Object.values(a).some((c) => c && c.length > 0),
|
|
336
336
|
[a]
|
|
337
|
-
),
|
|
337
|
+
), d = (c, u) => {
|
|
338
338
|
const f = { ...a };
|
|
339
|
-
|
|
339
|
+
u.length === 0 ? delete f[c] : f[c] = u, i(f), B("serp_filter_changed", { key: c, values: u });
|
|
340
340
|
}, o = (c) => {
|
|
341
341
|
var f;
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
}, p = (c,
|
|
345
|
-
const f = a[c.key] ?? [],
|
|
342
|
+
const u = (((f = a[c]) == null ? void 0 : f.length) ?? 0) > 0;
|
|
343
|
+
d(c, u ? [] : ["true"]);
|
|
344
|
+
}, p = (c, u) => {
|
|
345
|
+
const f = a[c.key] ?? [], x = f.includes(u);
|
|
346
346
|
let g;
|
|
347
|
-
c.multi ? g =
|
|
347
|
+
c.multi ? g = x ? f.filter((y) => y !== u) : [...f, u] : g = x ? [] : [u], d(c.key, g);
|
|
348
348
|
};
|
|
349
349
|
return e.length === 0 ? null : /* @__PURE__ */ h(
|
|
350
350
|
"div",
|
|
@@ -357,23 +357,23 @@ function Ve({
|
|
|
357
357
|
}),
|
|
358
358
|
children: [
|
|
359
359
|
e.map((c) => {
|
|
360
|
-
const
|
|
361
|
-
if (
|
|
360
|
+
const u = c.boolean, f = a[c.key] ?? [], x = f.length > 0;
|
|
361
|
+
if (u)
|
|
362
362
|
return /* @__PURE__ */ t(
|
|
363
363
|
"button",
|
|
364
364
|
{
|
|
365
365
|
type: "button",
|
|
366
|
-
"aria-pressed":
|
|
366
|
+
"aria-pressed": x,
|
|
367
367
|
"aria-label": c.label,
|
|
368
368
|
onClick: () => o(c.key),
|
|
369
369
|
className: te({
|
|
370
|
-
state:
|
|
370
|
+
state: x ? "active" : "idle"
|
|
371
371
|
}),
|
|
372
372
|
children: /* @__PURE__ */ t("span", { children: c.label })
|
|
373
373
|
},
|
|
374
374
|
c.key
|
|
375
375
|
);
|
|
376
|
-
const g =
|
|
376
|
+
const g = x ? ` (${f.length})` : "";
|
|
377
377
|
return /* @__PURE__ */ h(D.Root, { children: [
|
|
378
378
|
/* @__PURE__ */ t(D.Trigger, { asChild: !0, children: /* @__PURE__ */ h(
|
|
379
379
|
"button",
|
|
@@ -381,7 +381,7 @@ function Ve({
|
|
|
381
381
|
type: "button",
|
|
382
382
|
"aria-label": `${c.label}${g}`,
|
|
383
383
|
className: te({
|
|
384
|
-
state:
|
|
384
|
+
state: x ? "active" : "idle"
|
|
385
385
|
}),
|
|
386
386
|
children: [
|
|
387
387
|
/* @__PURE__ */ h("span", { children: [
|
|
@@ -389,7 +389,7 @@ function Ve({
|
|
|
389
389
|
g
|
|
390
390
|
] }),
|
|
391
391
|
/* @__PURE__ */ t(
|
|
392
|
-
|
|
392
|
+
Pe,
|
|
393
393
|
{
|
|
394
394
|
"aria-hidden": "true",
|
|
395
395
|
className: "ds:size-3.5 ds:shrink-0"
|
|
@@ -398,16 +398,16 @@ function Ve({
|
|
|
398
398
|
]
|
|
399
399
|
}
|
|
400
400
|
) }),
|
|
401
|
-
/* @__PURE__ */ t(D.Content, { sideOffset: 8, align: "start", children: c.options.map((
|
|
401
|
+
/* @__PURE__ */ t(D.Content, { sideOffset: 8, align: "start", children: c.options.map((y) => /* @__PURE__ */ t(
|
|
402
402
|
D.CheckboxItem,
|
|
403
403
|
{
|
|
404
|
-
checked: f.includes(
|
|
404
|
+
checked: f.includes(y.value),
|
|
405
405
|
onSelect: (k) => {
|
|
406
|
-
c.multi && k.preventDefault(), p(c,
|
|
406
|
+
c.multi && k.preventDefault(), p(c, y.value);
|
|
407
407
|
},
|
|
408
|
-
children:
|
|
408
|
+
children: y.label
|
|
409
409
|
},
|
|
410
|
-
|
|
410
|
+
y.value
|
|
411
411
|
)) })
|
|
412
412
|
] }, c.key);
|
|
413
413
|
}),
|
|
@@ -416,7 +416,7 @@ function Ve({
|
|
|
416
416
|
{
|
|
417
417
|
type: "button",
|
|
418
418
|
onClick: () => {
|
|
419
|
-
i({}),
|
|
419
|
+
i({}), B("serp_filter_changed", { key: "*", values: [] });
|
|
420
420
|
},
|
|
421
421
|
className: Ft(),
|
|
422
422
|
children: r("practiceResults.filters.clear")
|
|
@@ -455,7 +455,7 @@ function de({ value: e, onChange: n }) {
|
|
|
455
455
|
": ",
|
|
456
456
|
s(e)
|
|
457
457
|
] }),
|
|
458
|
-
/* @__PURE__ */ t(
|
|
458
|
+
/* @__PURE__ */ t(Pe, { "aria-hidden": "true", className: "ds:size-3.5 ds:shrink-0" })
|
|
459
459
|
]
|
|
460
460
|
}
|
|
461
461
|
) }),
|
|
@@ -465,9 +465,9 @@ function de({ value: e, onChange: n }) {
|
|
|
465
465
|
value: e,
|
|
466
466
|
onValueChange: (r) => {
|
|
467
467
|
const a = r;
|
|
468
|
-
a !== e && (n(a),
|
|
468
|
+
a !== e && (n(a), B("serp_sort_changed", { sort: a }));
|
|
469
469
|
},
|
|
470
|
-
children:
|
|
470
|
+
children: wt.map((r) => /* @__PURE__ */ t(D.RadioItem, { value: r, children: s(r) }, r))
|
|
471
471
|
}
|
|
472
472
|
) })
|
|
473
473
|
] });
|
|
@@ -480,9 +480,9 @@ function It({ distanceKm: e }) {
|
|
|
480
480
|
}).format(e);
|
|
481
481
|
return n("practiceResults.distance.km", { distance: r });
|
|
482
482
|
}, [e, n, i.language]);
|
|
483
|
-
return /* @__PURE__ */ t(
|
|
483
|
+
return /* @__PURE__ */ t($, { variant: "neutral", leading: /* @__PURE__ */ t(fe, { "aria-hidden": "true" }), children: s });
|
|
484
484
|
}
|
|
485
|
-
const
|
|
485
|
+
const Ne = O(
|
|
486
486
|
[
|
|
487
487
|
"ds:inline-size-[12rem] ds:block-size-[8rem] ds:shrink-0",
|
|
488
488
|
"ds:rounded-[var(--radius-md)] ds:overflow-hidden"
|
|
@@ -518,7 +518,7 @@ function _t({
|
|
|
518
518
|
"div",
|
|
519
519
|
{
|
|
520
520
|
"aria-hidden": s ? void 0 : "true",
|
|
521
|
-
className:
|
|
521
|
+
className: Ne({ state: "placeholder" }),
|
|
522
522
|
children: [
|
|
523
523
|
/* @__PURE__ */ t(fe, { "aria-hidden": "true", className: "ds:size-5 ds:shrink-0" }),
|
|
524
524
|
s ? /* @__PURE__ */ t("span", { dir: "auto", className: "type-meta ds:[overflow-wrap:anywhere]", children: s }) : null
|
|
@@ -535,7 +535,7 @@ function _t({
|
|
|
535
535
|
decoding: "async",
|
|
536
536
|
width: 240,
|
|
537
537
|
height: 160,
|
|
538
|
-
className:
|
|
538
|
+
className: Ne({ state: "image" })
|
|
539
539
|
}
|
|
540
540
|
);
|
|
541
541
|
}
|
|
@@ -562,7 +562,7 @@ const Ht = O(
|
|
|
562
562
|
defaultVariants: { density: "compact" }
|
|
563
563
|
}
|
|
564
564
|
);
|
|
565
|
-
function
|
|
565
|
+
function Ve({
|
|
566
566
|
description: e,
|
|
567
567
|
density: n
|
|
568
568
|
}) {
|
|
@@ -578,7 +578,7 @@ function He({
|
|
|
578
578
|
}
|
|
579
579
|
function zt(e, n, i, s) {
|
|
580
580
|
if (e.kind === "fixed")
|
|
581
|
-
return
|
|
581
|
+
return ut(
|
|
582
582
|
e.minCents,
|
|
583
583
|
n,
|
|
584
584
|
i,
|
|
@@ -604,17 +604,17 @@ function Bt({
|
|
|
604
604
|
currencyCode: i = "EUR"
|
|
605
605
|
}) {
|
|
606
606
|
var f;
|
|
607
|
-
const { t: s, i18n: r } = C("ui"), a = e && Number.isFinite(e.minCents) ? e : void 0, l = (a == null ? void 0 : a.kind) ?? "fixed",
|
|
608
|
-
() =>
|
|
609
|
-
{ kind: l, minCents:
|
|
607
|
+
const { t: s, i18n: r } = C("ui"), a = e && Number.isFinite(e.minCents) ? e : void 0, l = (a == null ? void 0 : a.kind) ?? "fixed", d = (a == null ? void 0 : a.minCents) ?? n, o = a == null ? void 0 : a.maxCents, p = M(
|
|
608
|
+
() => d == null ? void 0 : zt(
|
|
609
|
+
{ kind: l, minCents: d, maxCents: o },
|
|
610
610
|
i,
|
|
611
611
|
r.language ?? "en",
|
|
612
612
|
s
|
|
613
613
|
),
|
|
614
|
-
[l,
|
|
614
|
+
[l, d, o, i, r.language, s]
|
|
615
615
|
);
|
|
616
616
|
if (p === void 0) return null;
|
|
617
|
-
const c = (f = a == null ? void 0 : a.label) == null ? void 0 : f.trim().replace(/:$/, "").trim(),
|
|
617
|
+
const c = (f = a == null ? void 0 : a.label) == null ? void 0 : f.trim().replace(/:$/, "").trim(), u = c || s("practiceResults.card.firstVisitPrice");
|
|
618
618
|
return /* @__PURE__ */ h(
|
|
619
619
|
"span",
|
|
620
620
|
{
|
|
@@ -625,16 +625,16 @@ function Bt({
|
|
|
625
625
|
"span",
|
|
626
626
|
{
|
|
627
627
|
dir: "auto",
|
|
628
|
-
title:
|
|
628
|
+
title: u,
|
|
629
629
|
className: $t({
|
|
630
630
|
practiceWritten: !!c
|
|
631
631
|
}),
|
|
632
|
-
children:
|
|
632
|
+
children: u
|
|
633
633
|
}
|
|
634
634
|
),
|
|
635
635
|
/* @__PURE__ */ t("span", { className: "ds:sr-only", children: ": " }),
|
|
636
636
|
/* @__PURE__ */ t(
|
|
637
|
-
|
|
637
|
+
$,
|
|
638
638
|
{
|
|
639
639
|
variant: "accentSoft",
|
|
640
640
|
size: "lg",
|
|
@@ -647,11 +647,11 @@ function Bt({
|
|
|
647
647
|
}
|
|
648
648
|
);
|
|
649
649
|
}
|
|
650
|
-
function
|
|
650
|
+
function He({ time: e }) {
|
|
651
651
|
const { t: n } = C("ui");
|
|
652
652
|
return /* @__PURE__ */ h("span", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
653
653
|
/* @__PURE__ */ t(
|
|
654
|
-
|
|
654
|
+
ht,
|
|
655
655
|
{
|
|
656
656
|
"aria-hidden": "true",
|
|
657
657
|
className: "ds:size-4 ds:text-[var(--primary)]"
|
|
@@ -660,7 +660,7 @@ function ze({ time: e }) {
|
|
|
660
660
|
n("practiceResults.nextSlot.summary", { time: e })
|
|
661
661
|
] });
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function ze({
|
|
664
664
|
result: e,
|
|
665
665
|
openLabel: n,
|
|
666
666
|
bookLabel: i,
|
|
@@ -668,7 +668,7 @@ function $e({
|
|
|
668
668
|
onOpenClick: r,
|
|
669
669
|
onBookClick: a
|
|
670
670
|
}) {
|
|
671
|
-
const { t: l } = C("ui"),
|
|
671
|
+
const { t: l } = C("ui"), d = e.nextAvailableSlot, o = (d == null ? void 0 : d.bookingHref) ?? e.bookingHref ?? e.href, p = d && s ? l("practiceResults.nextSlot.cta", { time: s }) : i;
|
|
672
672
|
return /* @__PURE__ */ h("div", { className: "ds:mt-[var(--spacing-xs)] ds:flex ds:flex-wrap ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)]", children: [
|
|
673
673
|
n !== void 0 ? /* @__PURE__ */ t(ee, { intent: "secondary", size: "sm", asChild: !0, onClick: r, children: /* @__PURE__ */ h("a", { href: e.href, "data-component": "practice-result-open-cta", children: [
|
|
674
674
|
n,
|
|
@@ -681,14 +681,14 @@ function $e({
|
|
|
681
681
|
intent: "primary",
|
|
682
682
|
size: "sm",
|
|
683
683
|
asChild: !0,
|
|
684
|
-
startIcon: /* @__PURE__ */ t(
|
|
684
|
+
startIcon: /* @__PURE__ */ t(gt, { "aria-hidden": "true" }),
|
|
685
685
|
onClick: a,
|
|
686
686
|
children: /* @__PURE__ */ h(
|
|
687
687
|
"a",
|
|
688
688
|
{
|
|
689
689
|
href: o,
|
|
690
690
|
"data-component": "practice-result-book-cta",
|
|
691
|
-
"data-slot-aware":
|
|
691
|
+
"data-slot-aware": d ? "true" : void 0,
|
|
692
692
|
children: [
|
|
693
693
|
p,
|
|
694
694
|
" ",
|
|
@@ -700,7 +700,7 @@ function $e({
|
|
|
700
700
|
)
|
|
701
701
|
] });
|
|
702
702
|
}
|
|
703
|
-
const
|
|
703
|
+
const $e = O(
|
|
704
704
|
[
|
|
705
705
|
"ds:@container/result-card ds:relative ds:flex ds:w-full ds:cursor-pointer",
|
|
706
706
|
"ds:rounded-[var(--radius-lg)]",
|
|
@@ -759,7 +759,7 @@ function Ot({
|
|
|
759
759
|
}
|
|
760
760
|
);
|
|
761
761
|
}
|
|
762
|
-
function
|
|
762
|
+
function Be({
|
|
763
763
|
result: e,
|
|
764
764
|
headingLevel: n
|
|
765
765
|
}) {
|
|
@@ -808,7 +808,7 @@ function De({
|
|
|
808
808
|
}
|
|
809
809
|
);
|
|
810
810
|
}
|
|
811
|
-
function
|
|
811
|
+
function De(e) {
|
|
812
812
|
const n = e.target.closest(
|
|
813
813
|
'a, button, [role="button"], input, select, textarea, label'
|
|
814
814
|
);
|
|
@@ -822,16 +822,16 @@ function Et({
|
|
|
822
822
|
onOpenClick: r,
|
|
823
823
|
onHover: a,
|
|
824
824
|
density: l = "compact",
|
|
825
|
-
openLabel:
|
|
825
|
+
openLabel: d,
|
|
826
826
|
bookLabel: o,
|
|
827
827
|
onBookClick: p,
|
|
828
828
|
nextSlotText: c,
|
|
829
|
-
maxInsuranceChips:
|
|
829
|
+
maxInsuranceChips: u = 3,
|
|
830
830
|
maxLanguageChips: f = 4,
|
|
831
|
-
children:
|
|
831
|
+
children: x
|
|
832
832
|
}) {
|
|
833
833
|
var q, U, G, E;
|
|
834
|
-
const { t: g, i18n:
|
|
834
|
+
const { t: g, i18n: y } = C("ui"), k = e.rating, w = (((q = e.languages) == null ? void 0 : q.length) ?? 0) > 0, b = (((U = e.insurances) == null ? void 0 : U.length) ?? 0) > 0, m = e.specializedInFearPatients, N = w || b || m, L = (e.languages ?? []).slice(0, f), T = (((G = e.languages) == null ? void 0 : G.length) ?? 0) - L.length, _ = (e.insurances ?? []).slice(0, u), P = (((E = e.insurances) == null ? void 0 : E.length) ?? 0) - _.length;
|
|
835
835
|
return (
|
|
836
836
|
// 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.
|
|
837
837
|
/* @__PURE__ */ h(
|
|
@@ -843,14 +843,14 @@ function Et({
|
|
|
843
843
|
role: "group",
|
|
844
844
|
"aria-labelledby": `practice-result-${e.id}-name`,
|
|
845
845
|
onClick: (A) => {
|
|
846
|
-
|
|
846
|
+
De(A) || s();
|
|
847
847
|
},
|
|
848
848
|
onMouseEnter: a,
|
|
849
849
|
onFocus: a,
|
|
850
|
-
className:
|
|
850
|
+
className: $e({ density: l }),
|
|
851
851
|
children: [
|
|
852
852
|
/* @__PURE__ */ t(
|
|
853
|
-
|
|
853
|
+
Se,
|
|
854
854
|
{
|
|
855
855
|
src: e.imageUrl,
|
|
856
856
|
alt: e.imageAlt,
|
|
@@ -861,46 +861,46 @@ function Et({
|
|
|
861
861
|
}
|
|
862
862
|
),
|
|
863
863
|
/* @__PURE__ */ h("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
864
|
-
/* @__PURE__ */ t(
|
|
864
|
+
/* @__PURE__ */ t(Be, { result: e, headingLevel: n }),
|
|
865
865
|
k && k.count > 0 ? /* @__PURE__ */ t(
|
|
866
|
-
|
|
866
|
+
Le,
|
|
867
867
|
{
|
|
868
868
|
value: k.value,
|
|
869
869
|
reviews: { count: k.count },
|
|
870
870
|
size: "sm"
|
|
871
871
|
}
|
|
872
872
|
) : null,
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
873
|
+
N ? /* @__PURE__ */ h("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
874
|
+
L.map((A) => /* @__PURE__ */ t(
|
|
875
|
+
$,
|
|
876
876
|
{
|
|
877
877
|
variant: "neutral",
|
|
878
|
-
leading: /* @__PURE__ */ t(
|
|
879
|
-
children:
|
|
878
|
+
leading: /* @__PURE__ */ t(Ae, { "aria-hidden": "true" }),
|
|
879
|
+
children: Ie(A, g, y)
|
|
880
880
|
},
|
|
881
881
|
`lang-${A}`
|
|
882
882
|
)),
|
|
883
|
-
T > 0 ? /* @__PURE__ */ t(
|
|
883
|
+
T > 0 ? /* @__PURE__ */ t($, { variant: "neutral", children: `+${T}` }) : null,
|
|
884
884
|
_.map((A) => /* @__PURE__ */ t(
|
|
885
|
-
|
|
885
|
+
$,
|
|
886
886
|
{
|
|
887
887
|
variant: "info",
|
|
888
|
-
leading: /* @__PURE__ */ t(
|
|
888
|
+
leading: /* @__PURE__ */ t(Me, { "aria-hidden": "true" }),
|
|
889
889
|
children: A
|
|
890
890
|
},
|
|
891
891
|
`ins-${A}`
|
|
892
892
|
)),
|
|
893
|
-
|
|
894
|
-
|
|
893
|
+
P > 0 ? /* @__PURE__ */ t($, { variant: "neutral", children: `+${P}` }) : null,
|
|
894
|
+
m ? /* @__PURE__ */ t($, { variant: "info", leading: /* @__PURE__ */ t(Fe, { "aria-hidden": "true" }), children: g("practiceResults.fearPatient.label") }) : null
|
|
895
895
|
] }) : null,
|
|
896
|
-
/* @__PURE__ */ t(
|
|
897
|
-
e.nextAvailableSlot && c ? /* @__PURE__ */ t(
|
|
898
|
-
|
|
896
|
+
/* @__PURE__ */ t(Ve, { description: e.description, density: "compact" }),
|
|
897
|
+
e.nextAvailableSlot && c ? /* @__PURE__ */ t(He, { time: c }) : null,
|
|
898
|
+
x,
|
|
899
899
|
/* @__PURE__ */ t(
|
|
900
|
-
|
|
900
|
+
ze,
|
|
901
901
|
{
|
|
902
902
|
result: e,
|
|
903
|
-
openLabel:
|
|
903
|
+
openLabel: d,
|
|
904
904
|
bookLabel: o,
|
|
905
905
|
nextSlotText: c,
|
|
906
906
|
onOpenClick: r,
|
|
@@ -921,15 +921,15 @@ function jt({
|
|
|
921
921
|
onSelect: r,
|
|
922
922
|
onOpenClick: a,
|
|
923
923
|
onBookClick: l,
|
|
924
|
-
onHover:
|
|
924
|
+
onHover: d,
|
|
925
925
|
openLabel: o,
|
|
926
926
|
bookLabel: p
|
|
927
927
|
}) {
|
|
928
|
-
var
|
|
929
|
-
const { t: c, i18n:
|
|
928
|
+
var w, b;
|
|
929
|
+
const { t: c, i18n: u } = C("ui"), f = M(() => {
|
|
930
930
|
if (e.nextAvailableSlot)
|
|
931
931
|
try {
|
|
932
|
-
return new Intl.DateTimeFormat(
|
|
932
|
+
return new Intl.DateTimeFormat(u.language, {
|
|
933
933
|
weekday: "short",
|
|
934
934
|
hour: "numeric",
|
|
935
935
|
minute: "numeric"
|
|
@@ -937,7 +937,7 @@ function jt({
|
|
|
937
937
|
} catch {
|
|
938
938
|
return e.nextAvailableSlot.dateTime;
|
|
939
939
|
}
|
|
940
|
-
}, [e.nextAvailableSlot,
|
|
940
|
+
}, [e.nextAvailableSlot, u.language]), x = (((w = e.languages) == null ? void 0 : w.length) ?? 0) > 0, g = (((b = e.insurances) == null ? void 0 : b.length) ?? 0) > 0, y = e.specializedInFearPatients, k = x || g || y;
|
|
941
941
|
return (
|
|
942
942
|
// 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.
|
|
943
943
|
/* @__PURE__ */ h(
|
|
@@ -949,12 +949,12 @@ function jt({
|
|
|
949
949
|
"data-highlighted": s ? "true" : "false",
|
|
950
950
|
role: "group",
|
|
951
951
|
"aria-labelledby": `practice-result-${e.id}-name`,
|
|
952
|
-
onClick: (
|
|
953
|
-
|
|
952
|
+
onClick: (m) => {
|
|
953
|
+
De(m) || r();
|
|
954
954
|
},
|
|
955
|
-
onMouseEnter:
|
|
956
|
-
onFocus:
|
|
957
|
-
className:
|
|
955
|
+
onMouseEnter: d,
|
|
956
|
+
onFocus: d,
|
|
957
|
+
className: $e({ density: "rich" }),
|
|
958
958
|
children: [
|
|
959
959
|
e.location ? /* @__PURE__ */ t("div", { className: "ds:hidden ds:@min-[640px]/result-card:block", children: /* @__PURE__ */ t(
|
|
960
960
|
_t,
|
|
@@ -970,7 +970,7 @@ function jt({
|
|
|
970
970
|
/* @__PURE__ */ h("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
971
971
|
/* @__PURE__ */ h("div", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-md)]", children: [
|
|
972
972
|
/* @__PURE__ */ t(
|
|
973
|
-
|
|
973
|
+
Se,
|
|
974
974
|
{
|
|
975
975
|
src: e.imageUrl,
|
|
976
976
|
alt: e.imageAlt,
|
|
@@ -980,10 +980,10 @@ function jt({
|
|
|
980
980
|
ratio: "4:3"
|
|
981
981
|
}
|
|
982
982
|
),
|
|
983
|
-
/* @__PURE__ */ t(
|
|
983
|
+
/* @__PURE__ */ t(Be, { result: e, headingLevel: n })
|
|
984
984
|
] }),
|
|
985
985
|
e.rating && e.rating.count > 0 ? /* @__PURE__ */ t(
|
|
986
|
-
|
|
986
|
+
Le,
|
|
987
987
|
{
|
|
988
988
|
value: e.rating.value,
|
|
989
989
|
reviews: { count: e.rating.count },
|
|
@@ -991,30 +991,30 @@ function jt({
|
|
|
991
991
|
}
|
|
992
992
|
) : null,
|
|
993
993
|
k ? /* @__PURE__ */ h("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
994
|
-
|
|
995
|
-
|
|
994
|
+
x ? (e.languages ?? []).map((m) => /* @__PURE__ */ t(
|
|
995
|
+
$,
|
|
996
996
|
{
|
|
997
997
|
variant: "neutral",
|
|
998
|
-
leading: /* @__PURE__ */ t(
|
|
999
|
-
children:
|
|
998
|
+
leading: /* @__PURE__ */ t(Ae, { "aria-hidden": "true" }),
|
|
999
|
+
children: Ie(m, c, u)
|
|
1000
1000
|
},
|
|
1001
|
-
`lang-${
|
|
1001
|
+
`lang-${m}`
|
|
1002
1002
|
)) : null,
|
|
1003
|
-
g ? (e.insurances ?? []).map((
|
|
1004
|
-
|
|
1003
|
+
g ? (e.insurances ?? []).map((m) => /* @__PURE__ */ t(
|
|
1004
|
+
$,
|
|
1005
1005
|
{
|
|
1006
1006
|
variant: "info",
|
|
1007
|
-
leading: /* @__PURE__ */ t(
|
|
1008
|
-
children:
|
|
1007
|
+
leading: /* @__PURE__ */ t(Me, { "aria-hidden": "true" }),
|
|
1008
|
+
children: m
|
|
1009
1009
|
},
|
|
1010
|
-
`ins-${
|
|
1010
|
+
`ins-${m}`
|
|
1011
1011
|
)) : null,
|
|
1012
|
-
|
|
1012
|
+
y ? /* @__PURE__ */ t($, { variant: "info", leading: /* @__PURE__ */ t(Fe, { "aria-hidden": "true" }), children: c("practiceResults.fearPatient.label") }) : null
|
|
1013
1013
|
] }) : null,
|
|
1014
|
-
/* @__PURE__ */ t(
|
|
1015
|
-
e.nextAvailableSlot && f ? /* @__PURE__ */ t(
|
|
1014
|
+
/* @__PURE__ */ t(Ve, { description: e.description, density: "rich" }),
|
|
1015
|
+
e.nextAvailableSlot && f ? /* @__PURE__ */ t(He, { time: f }) : null,
|
|
1016
1016
|
/* @__PURE__ */ t(
|
|
1017
|
-
|
|
1017
|
+
ze,
|
|
1018
1018
|
{
|
|
1019
1019
|
result: e,
|
|
1020
1020
|
openLabel: o,
|
|
@@ -1038,31 +1038,31 @@ function pe({
|
|
|
1038
1038
|
onCardSelect: r,
|
|
1039
1039
|
onCardOpenClick: a,
|
|
1040
1040
|
onCardBookClick: l,
|
|
1041
|
-
openLabel:
|
|
1041
|
+
openLabel: d,
|
|
1042
1042
|
bookLabel: o,
|
|
1043
1043
|
formatNextSlot: p,
|
|
1044
1044
|
onLoadMore: c,
|
|
1045
|
-
loadingMore:
|
|
1045
|
+
loadingMore: u,
|
|
1046
1046
|
loadingSkeletons: f,
|
|
1047
|
-
density:
|
|
1047
|
+
density: x = "compact",
|
|
1048
1048
|
apiKey: g,
|
|
1049
|
-
containerRef:
|
|
1049
|
+
containerRef: y
|
|
1050
1050
|
}) {
|
|
1051
|
-
const { t: k } = C("ui"),
|
|
1052
|
-
return
|
|
1051
|
+
const { t: k } = C("ui"), w = F(null);
|
|
1052
|
+
return Y(() => {
|
|
1053
1053
|
if (!c) return;
|
|
1054
|
-
const
|
|
1055
|
-
if (!
|
|
1056
|
-
const
|
|
1057
|
-
(
|
|
1058
|
-
for (const
|
|
1059
|
-
|
|
1054
|
+
const b = w.current;
|
|
1055
|
+
if (!b || typeof IntersectionObserver > "u") return;
|
|
1056
|
+
const m = new IntersectionObserver(
|
|
1057
|
+
(N) => {
|
|
1058
|
+
for (const L of N)
|
|
1059
|
+
L.isIntersecting && (B("serp_load_more", {
|
|
1060
1060
|
currentCount: e.length
|
|
1061
1061
|
}), c());
|
|
1062
1062
|
},
|
|
1063
1063
|
{ root: null, rootMargin: "200px" }
|
|
1064
1064
|
);
|
|
1065
|
-
return
|
|
1065
|
+
return m.observe(b), () => m.disconnect();
|
|
1066
1066
|
}, [c, e.length]), f ? /* @__PURE__ */ t(
|
|
1067
1067
|
"div",
|
|
1068
1068
|
{
|
|
@@ -1070,60 +1070,60 @@ function pe({
|
|
|
1070
1070
|
"aria-live": "polite",
|
|
1071
1071
|
"aria-label": k("practiceResults.loading"),
|
|
1072
1072
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
1073
|
-
children: Array.from({ length: 4 }).map((
|
|
1074
|
-
|
|
1073
|
+
children: Array.from({ length: 4 }).map((b, m) => /* @__PURE__ */ t(
|
|
1074
|
+
ct,
|
|
1075
1075
|
{
|
|
1076
1076
|
variant: "rounded",
|
|
1077
|
-
height:
|
|
1077
|
+
height: x === "rich" ? "11rem" : "7rem"
|
|
1078
1078
|
},
|
|
1079
|
-
`pr-skel-${
|
|
1079
|
+
`pr-skel-${m}`
|
|
1080
1080
|
))
|
|
1081
1081
|
}
|
|
1082
1082
|
) : /* @__PURE__ */ h(
|
|
1083
1083
|
"div",
|
|
1084
1084
|
{
|
|
1085
|
-
ref:
|
|
1085
|
+
ref: y,
|
|
1086
1086
|
"data-component": "practice-results-list",
|
|
1087
1087
|
role: "list",
|
|
1088
1088
|
"aria-label": k("practiceResults.list.label"),
|
|
1089
1089
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:overflow-y-auto",
|
|
1090
1090
|
children: [
|
|
1091
|
-
e.map((
|
|
1091
|
+
e.map((b) => /* @__PURE__ */ t("div", { role: "listitem", children: x === "rich" ? /* @__PURE__ */ t(
|
|
1092
1092
|
jt,
|
|
1093
1093
|
{
|
|
1094
|
-
result:
|
|
1094
|
+
result: b,
|
|
1095
1095
|
headingLevel: n,
|
|
1096
1096
|
apiKey: g,
|
|
1097
|
-
highlighted: i ===
|
|
1098
|
-
onSelect: () => r(
|
|
1099
|
-
onOpenClick: () => a(
|
|
1100
|
-
onBookClick: () => l(
|
|
1101
|
-
onHover: () => s(
|
|
1102
|
-
openLabel:
|
|
1097
|
+
highlighted: i === b.id,
|
|
1098
|
+
onSelect: () => r(b.id),
|
|
1099
|
+
onOpenClick: () => a(b.id),
|
|
1100
|
+
onBookClick: () => l(b.id),
|
|
1101
|
+
onHover: () => s(b.id),
|
|
1102
|
+
openLabel: d,
|
|
1103
1103
|
bookLabel: o
|
|
1104
1104
|
}
|
|
1105
1105
|
) : /* @__PURE__ */ t(
|
|
1106
1106
|
Et,
|
|
1107
1107
|
{
|
|
1108
|
-
result:
|
|
1108
|
+
result: b,
|
|
1109
1109
|
headingLevel: n,
|
|
1110
|
-
highlighted: i ===
|
|
1111
|
-
onSelect: () => r(
|
|
1112
|
-
onOpenClick: () => a(
|
|
1113
|
-
onBookClick: () => l(
|
|
1114
|
-
onHover: () => s(
|
|
1115
|
-
openLabel:
|
|
1110
|
+
highlighted: i === b.id,
|
|
1111
|
+
onSelect: () => r(b.id),
|
|
1112
|
+
onOpenClick: () => a(b.id),
|
|
1113
|
+
onBookClick: () => l(b.id),
|
|
1114
|
+
onHover: () => s(b.id),
|
|
1115
|
+
openLabel: d,
|
|
1116
1116
|
bookLabel: o,
|
|
1117
|
-
nextSlotText: p(
|
|
1117
|
+
nextSlotText: p(b)
|
|
1118
1118
|
}
|
|
1119
|
-
) },
|
|
1119
|
+
) }, b.id)),
|
|
1120
1120
|
c ? /* @__PURE__ */ t(
|
|
1121
1121
|
"div",
|
|
1122
1122
|
{
|
|
1123
|
-
ref:
|
|
1123
|
+
ref: w,
|
|
1124
1124
|
"aria-hidden": "true",
|
|
1125
1125
|
className: "ds:flex ds:items-center ds:justify-center ds:py-[var(--spacing-md)]",
|
|
1126
|
-
children:
|
|
1126
|
+
children: u ? /* @__PURE__ */ t(lt, { size: "md", variant: "pulse" }) : /* @__PURE__ */ t("span", { className: "ds:size-1" })
|
|
1127
1127
|
}
|
|
1128
1128
|
) : null
|
|
1129
1129
|
]
|
|
@@ -1138,66 +1138,68 @@ function ue({
|
|
|
1138
1138
|
mapId: r,
|
|
1139
1139
|
highlightedId: a,
|
|
1140
1140
|
onPinClick: l,
|
|
1141
|
-
onPinHover:
|
|
1141
|
+
onPinHover: d,
|
|
1142
1142
|
onPinFirstInteract: o,
|
|
1143
1143
|
onBoundsChange: p,
|
|
1144
1144
|
consentGranted: c,
|
|
1145
|
-
onConsentRequest:
|
|
1145
|
+
onConsentRequest: u,
|
|
1146
1146
|
mapHandleRef: f
|
|
1147
1147
|
}) {
|
|
1148
|
-
const { t:
|
|
1148
|
+
const { t: x } = C("ui"), g = M(
|
|
1149
1149
|
() => e.filter(
|
|
1150
|
-
(
|
|
1151
|
-
).map((
|
|
1152
|
-
id:
|
|
1150
|
+
(m) => !!m.location
|
|
1151
|
+
).map((m) => ({
|
|
1152
|
+
id: m.id,
|
|
1153
1153
|
position: {
|
|
1154
|
-
lat:
|
|
1155
|
-
lng:
|
|
1154
|
+
lat: m.location.lat,
|
|
1155
|
+
lng: m.location.lng
|
|
1156
1156
|
},
|
|
1157
|
-
label:
|
|
1157
|
+
label: m.name
|
|
1158
1158
|
})),
|
|
1159
1159
|
[e]
|
|
1160
|
-
),
|
|
1161
|
-
() => g.map((
|
|
1160
|
+
), y = M(
|
|
1161
|
+
() => g.map((m) => ({ ...m.position, id: m.id })),
|
|
1162
1162
|
[g]
|
|
1163
1163
|
), k = M(
|
|
1164
|
-
() => g.map((
|
|
1164
|
+
() => g.map((m) => m.id).sort().join("|"),
|
|
1165
1165
|
[g]
|
|
1166
|
-
),
|
|
1166
|
+
), w = M(() => {
|
|
1167
1167
|
if (n) return n;
|
|
1168
|
-
const
|
|
1169
|
-
return
|
|
1170
|
-
lat: (
|
|
1171
|
-
lng: (
|
|
1168
|
+
const m = Pt(e);
|
|
1169
|
+
return m ? {
|
|
1170
|
+
lat: (m.north + m.south) / 2,
|
|
1171
|
+
lng: (m.east + m.west) / 2
|
|
1172
1172
|
} : { lat: 45.4642, lng: 9.19 };
|
|
1173
|
-
}, [e, n])
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1173
|
+
}, [e, n]), b = z(
|
|
1174
|
+
(m, { userInteraction: N }) => {
|
|
1175
|
+
p == null || p(m), N && B("serp_map_panned", { bounds: m });
|
|
1176
|
+
},
|
|
1177
|
+
[p]
|
|
1178
|
+
);
|
|
1179
|
+
return /* @__PURE__ */ t(
|
|
1179
1180
|
"div",
|
|
1180
1181
|
{
|
|
1181
1182
|
"data-component": "practice-results-map-panel",
|
|
1182
1183
|
className: "ds:relative ds:flex ds:size-full ds:min-h-[24rem] ds:flex-col",
|
|
1183
1184
|
children: /* @__PURE__ */ t(
|
|
1184
|
-
|
|
1185
|
+
ot,
|
|
1185
1186
|
{
|
|
1186
1187
|
ref: f,
|
|
1187
1188
|
apiKey: s ?? "",
|
|
1188
1189
|
mapId: r,
|
|
1189
|
-
center:
|
|
1190
|
+
center: w,
|
|
1190
1191
|
zoom: i,
|
|
1191
1192
|
markers: g,
|
|
1192
|
-
fitToPoints:
|
|
1193
|
+
fitToPoints: y,
|
|
1193
1194
|
fitKey: k,
|
|
1194
1195
|
selectedMarkerId: a,
|
|
1195
1196
|
consentGranted: !!c,
|
|
1196
|
-
onConsentRequest:
|
|
1197
|
-
|
|
1198
|
-
|
|
1197
|
+
onConsentRequest: u,
|
|
1198
|
+
onBoundsChange: b,
|
|
1199
|
+
onMarkerClick: (m) => {
|
|
1200
|
+
m != null && (d(m), o(m), l(m));
|
|
1199
1201
|
},
|
|
1200
|
-
ariaLabel:
|
|
1202
|
+
ariaLabel: x("practiceResults.map.label"),
|
|
1201
1203
|
size: "fill",
|
|
1202
1204
|
surface: "bordered",
|
|
1203
1205
|
className: "ds:size-full"
|
|
@@ -1209,21 +1211,21 @@ function ue({
|
|
|
1209
1211
|
function he({
|
|
1210
1212
|
variantBodyProps: e
|
|
1211
1213
|
}) {
|
|
1212
|
-
const { facets: n, value: i, onChange: s, heading: r, intro: a, totalCount: l, searchCentre:
|
|
1214
|
+
const { facets: n, value: i, onChange: s, heading: r, intro: a, totalCount: l, searchCentre: d } = e;
|
|
1213
1215
|
return /* @__PURE__ */ h("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
1214
1216
|
/* @__PURE__ */ t(
|
|
1215
|
-
|
|
1217
|
+
Te,
|
|
1216
1218
|
{
|
|
1217
1219
|
heading: r,
|
|
1218
1220
|
headingLevel: e.headingLevel,
|
|
1219
1221
|
intro: a,
|
|
1220
1222
|
totalCount: l,
|
|
1221
|
-
searchCentreLabel:
|
|
1223
|
+
searchCentreLabel: d == null ? void 0 : d.label
|
|
1222
1224
|
}
|
|
1223
1225
|
),
|
|
1224
1226
|
n.length > 0 ? /* @__PURE__ */ h("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
1225
1227
|
/* @__PURE__ */ t(
|
|
1226
|
-
|
|
1228
|
+
_e,
|
|
1227
1229
|
{
|
|
1228
1230
|
facets: n,
|
|
1229
1231
|
value: i.facets,
|
|
@@ -1254,7 +1256,7 @@ function ve({
|
|
|
1254
1256
|
}) {
|
|
1255
1257
|
const { t: n } = C("ui");
|
|
1256
1258
|
return /* @__PURE__ */ t(
|
|
1257
|
-
|
|
1259
|
+
rt,
|
|
1258
1260
|
{
|
|
1259
1261
|
variant: "no-results",
|
|
1260
1262
|
headingLevel: ge(e),
|
|
@@ -1268,15 +1270,15 @@ function be({
|
|
|
1268
1270
|
headingLevel: n
|
|
1269
1271
|
}) {
|
|
1270
1272
|
const { t: i } = C("ui"), s = ge(n);
|
|
1271
|
-
return /* @__PURE__ */ h(
|
|
1272
|
-
/* @__PURE__ */ t(
|
|
1273
|
-
/* @__PURE__ */ t(
|
|
1274
|
-
e ? /* @__PURE__ */ t(
|
|
1273
|
+
return /* @__PURE__ */ h(X, { variant: "error", children: [
|
|
1274
|
+
/* @__PURE__ */ t(X.Title, { as: `h${s}`, children: i("practiceResults.error.title") }),
|
|
1275
|
+
/* @__PURE__ */ t(X.Description, { children: i("practiceResults.error.description") }),
|
|
1276
|
+
e ? /* @__PURE__ */ t(X.Action, { children: /* @__PURE__ */ t(
|
|
1275
1277
|
ee,
|
|
1276
1278
|
{
|
|
1277
1279
|
intent: "secondary",
|
|
1278
1280
|
size: "sm",
|
|
1279
|
-
startIcon: /* @__PURE__ */ t(
|
|
1281
|
+
startIcon: /* @__PURE__ */ t(pt, { "aria-hidden": "true" }),
|
|
1280
1282
|
onClick: e,
|
|
1281
1283
|
children: i("practiceResults.error.retry")
|
|
1282
1284
|
}
|
|
@@ -1291,25 +1293,25 @@ function Kt(e) {
|
|
|
1291
1293
|
zoom: r,
|
|
1292
1294
|
searchCentre: a,
|
|
1293
1295
|
onLoadMore: l,
|
|
1294
|
-
loadingMore:
|
|
1296
|
+
loadingMore: d,
|
|
1295
1297
|
loadingSkeletons: o,
|
|
1296
1298
|
emptyResultsSlot: p,
|
|
1297
1299
|
errorSlot: c,
|
|
1298
|
-
error:
|
|
1300
|
+
error: u,
|
|
1299
1301
|
onRetry: f,
|
|
1300
|
-
highlightedId:
|
|
1302
|
+
highlightedId: x,
|
|
1301
1303
|
onCardHover: g,
|
|
1302
|
-
onPinClick:
|
|
1304
|
+
onPinClick: y,
|
|
1303
1305
|
consentGranted: k,
|
|
1304
|
-
onConsentRequest:
|
|
1305
|
-
onBoundsChange:
|
|
1306
|
-
listContainerRef:
|
|
1307
|
-
} = e, { t:
|
|
1306
|
+
onConsentRequest: w,
|
|
1307
|
+
onBoundsChange: b,
|
|
1308
|
+
listContainerRef: m
|
|
1309
|
+
} = e, { t: N } = C("ui"), [L, T] = me(!1), _ = u ? c ?? /* @__PURE__ */ t(be, { onRetry: f, headingLevel: e.headingLevel }) : n.length === 0 && !o ? p ?? /* @__PURE__ */ t(ve, { headingLevel: e.headingLevel }) : /* @__PURE__ */ t(
|
|
1308
1310
|
pe,
|
|
1309
1311
|
{
|
|
1310
1312
|
results: n,
|
|
1311
1313
|
headingLevel: e.headingLevel,
|
|
1312
|
-
highlightedId:
|
|
1314
|
+
highlightedId: x,
|
|
1313
1315
|
onCardHover: g,
|
|
1314
1316
|
onCardSelect: e.onCardSelect,
|
|
1315
1317
|
onCardOpenClick: e.onCardOpenClick,
|
|
@@ -1318,10 +1320,10 @@ function Kt(e) {
|
|
|
1318
1320
|
bookLabel: e.bookLabel,
|
|
1319
1321
|
formatNextSlot: e.formatNextSlot,
|
|
1320
1322
|
onLoadMore: l,
|
|
1321
|
-
loadingMore:
|
|
1323
|
+
loadingMore: d,
|
|
1322
1324
|
loadingSkeletons: o,
|
|
1323
1325
|
density: "compact",
|
|
1324
|
-
containerRef:
|
|
1326
|
+
containerRef: m
|
|
1325
1327
|
}
|
|
1326
1328
|
);
|
|
1327
1329
|
return /* @__PURE__ */ h("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
@@ -1336,15 +1338,15 @@ function Kt(e) {
|
|
|
1336
1338
|
zoom: r,
|
|
1337
1339
|
apiKey: i,
|
|
1338
1340
|
mapId: s,
|
|
1339
|
-
highlightedId:
|
|
1340
|
-
onPinClick: (
|
|
1341
|
-
Z(n,
|
|
1341
|
+
highlightedId: x,
|
|
1342
|
+
onPinClick: (P) => {
|
|
1343
|
+
Z(n, P, "pin", e.onResultSelect), y(P);
|
|
1342
1344
|
},
|
|
1343
1345
|
onPinHover: g,
|
|
1344
1346
|
onPinFirstInteract: e.onPinFirstInteract,
|
|
1345
|
-
onBoundsChange:
|
|
1347
|
+
onBoundsChange: b,
|
|
1346
1348
|
consentGranted: k,
|
|
1347
|
-
onConsentRequest:
|
|
1349
|
+
onConsentRequest: w,
|
|
1348
1350
|
mapHandleRef: e.mapHandleRef
|
|
1349
1351
|
}
|
|
1350
1352
|
) })
|
|
@@ -1354,15 +1356,15 @@ function Kt(e) {
|
|
|
1354
1356
|
{
|
|
1355
1357
|
intent: "primary",
|
|
1356
1358
|
size: "md",
|
|
1357
|
-
startIcon: /* @__PURE__ */ t(
|
|
1359
|
+
startIcon: /* @__PURE__ */ t(bt, { "aria-hidden": "true" }),
|
|
1358
1360
|
onClick: () => T(!0),
|
|
1359
|
-
children:
|
|
1361
|
+
children: N("practiceResults.viewMap")
|
|
1360
1362
|
}
|
|
1361
1363
|
) }),
|
|
1362
|
-
/* @__PURE__ */ t(I.Root, { open:
|
|
1363
|
-
/* @__PURE__ */ t(I.Header, { children: /* @__PURE__ */ t(I.Title, { children:
|
|
1364
|
+
/* @__PURE__ */ t(I.Root, { open: L, onOpenChange: T, children: /* @__PURE__ */ h(I.Content, { side: "bottom", size: "lg", children: [
|
|
1365
|
+
/* @__PURE__ */ t(I.Header, { children: /* @__PURE__ */ t(I.Title, { children: N("practiceResults.map.label") }) }),
|
|
1364
1366
|
/* @__PURE__ */ h(I.Body, { children: [
|
|
1365
|
-
/* @__PURE__ */ t(I.Description, { className: "ds:sr-only", children:
|
|
1367
|
+
/* @__PURE__ */ t(I.Description, { className: "ds:sr-only", children: N("practiceResults.sheet.description") }),
|
|
1366
1368
|
/* @__PURE__ */ h("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1367
1369
|
/* @__PURE__ */ t("div", { className: "ds:h-[20rem]", children: /* @__PURE__ */ t(
|
|
1368
1370
|
ue,
|
|
@@ -1372,15 +1374,15 @@ function Kt(e) {
|
|
|
1372
1374
|
zoom: r,
|
|
1373
1375
|
apiKey: i,
|
|
1374
1376
|
mapId: s,
|
|
1375
|
-
highlightedId:
|
|
1376
|
-
onPinClick: (
|
|
1377
|
-
Z(n,
|
|
1377
|
+
highlightedId: x,
|
|
1378
|
+
onPinClick: (P) => {
|
|
1379
|
+
Z(n, P, "pin", e.onResultSelect), y(P);
|
|
1378
1380
|
},
|
|
1379
1381
|
onPinHover: g,
|
|
1380
1382
|
onPinFirstInteract: e.onPinFirstInteract,
|
|
1381
|
-
onBoundsChange:
|
|
1383
|
+
onBoundsChange: b,
|
|
1382
1384
|
consentGranted: k,
|
|
1383
|
-
onConsentRequest:
|
|
1385
|
+
onConsentRequest: w,
|
|
1384
1386
|
mapHandleRef: e.mapHandleRef
|
|
1385
1387
|
}
|
|
1386
1388
|
) }),
|
|
@@ -1402,27 +1404,27 @@ const qt = {
|
|
|
1402
1404
|
function Ut({ value: e, onChange: n }) {
|
|
1403
1405
|
const { t: i, i18n: s } = C("ui"), r = s.dir() === "rtl", a = F(
|
|
1404
1406
|
/* @__PURE__ */ new Map()
|
|
1405
|
-
), l =
|
|
1407
|
+
), l = z((o) => {
|
|
1406
1408
|
var p;
|
|
1407
1409
|
(p = a.current.get(o)) == null || p.focus();
|
|
1408
|
-
}, []),
|
|
1410
|
+
}, []), d = z(
|
|
1409
1411
|
(o, p) => {
|
|
1410
|
-
const c = K.indexOf(p),
|
|
1412
|
+
const c = K.indexOf(p), u = K.length, f = r ? "ArrowLeft" : "ArrowRight", x = r ? "ArrowRight" : "ArrowLeft";
|
|
1411
1413
|
let g = null;
|
|
1412
1414
|
switch (o.key) {
|
|
1413
1415
|
case f:
|
|
1414
1416
|
case "ArrowDown":
|
|
1415
|
-
g = K[(c + 1) %
|
|
1417
|
+
g = K[(c + 1) % u];
|
|
1416
1418
|
break;
|
|
1417
|
-
case
|
|
1419
|
+
case x:
|
|
1418
1420
|
case "ArrowUp":
|
|
1419
|
-
g = K[(c - 1 +
|
|
1421
|
+
g = K[(c - 1 + u) % u];
|
|
1420
1422
|
break;
|
|
1421
1423
|
case "Home":
|
|
1422
1424
|
g = K[0];
|
|
1423
1425
|
break;
|
|
1424
1426
|
case "End":
|
|
1425
|
-
g = K[
|
|
1427
|
+
g = K[u - 1];
|
|
1426
1428
|
break;
|
|
1427
1429
|
default:
|
|
1428
1430
|
return;
|
|
@@ -1451,7 +1453,7 @@ function Ut({ value: e, onChange: n }) {
|
|
|
1451
1453
|
"aria-label": i(`practiceResults.sheet.snap.${o}`),
|
|
1452
1454
|
tabIndex: p ? 0 : -1,
|
|
1453
1455
|
onClick: () => n(o),
|
|
1454
|
-
onKeyDown: (c) =>
|
|
1456
|
+
onKeyDown: (c) => d(c, o),
|
|
1455
1457
|
className: te({
|
|
1456
1458
|
state: p ? "active" : "idle"
|
|
1457
1459
|
}),
|
|
@@ -1471,28 +1473,28 @@ function Gt(e) {
|
|
|
1471
1473
|
zoom: r,
|
|
1472
1474
|
searchCentre: a,
|
|
1473
1475
|
onLoadMore: l,
|
|
1474
|
-
loadingMore:
|
|
1476
|
+
loadingMore: d,
|
|
1475
1477
|
loadingSkeletons: o,
|
|
1476
1478
|
emptyResultsSlot: p,
|
|
1477
1479
|
errorSlot: c,
|
|
1478
|
-
error:
|
|
1480
|
+
error: u,
|
|
1479
1481
|
onRetry: f,
|
|
1480
|
-
highlightedId:
|
|
1482
|
+
highlightedId: x,
|
|
1481
1483
|
onCardHover: g,
|
|
1482
|
-
onPinClick:
|
|
1484
|
+
onPinClick: y,
|
|
1483
1485
|
consentGranted: k,
|
|
1484
|
-
onConsentRequest:
|
|
1485
|
-
onBoundsChange:
|
|
1486
|
-
listContainerRef:
|
|
1487
|
-
facets:
|
|
1488
|
-
value:
|
|
1486
|
+
onConsentRequest: w,
|
|
1487
|
+
onBoundsChange: b,
|
|
1488
|
+
listContainerRef: m,
|
|
1489
|
+
facets: N,
|
|
1490
|
+
value: L,
|
|
1489
1491
|
onChange: T
|
|
1490
|
-
} = e, { t: _ } = C("ui"), [
|
|
1492
|
+
} = e, { t: _ } = C("ui"), [P, q] = me("half"), U = qt[P], G = dt("(min-width: 1024px)"), E = u ? c ?? /* @__PURE__ */ t(be, { onRetry: f, headingLevel: e.headingLevel }) : n.length === 0 && !o ? p ?? /* @__PURE__ */ t(ve, { headingLevel: e.headingLevel }) : /* @__PURE__ */ t(
|
|
1491
1493
|
pe,
|
|
1492
1494
|
{
|
|
1493
1495
|
results: n,
|
|
1494
1496
|
headingLevel: e.headingLevel,
|
|
1495
|
-
highlightedId:
|
|
1497
|
+
highlightedId: x,
|
|
1496
1498
|
onCardHover: g,
|
|
1497
1499
|
onCardSelect: e.onCardSelect,
|
|
1498
1500
|
onCardOpenClick: e.onCardOpenClick,
|
|
@@ -1501,11 +1503,11 @@ function Gt(e) {
|
|
|
1501
1503
|
bookLabel: e.bookLabel,
|
|
1502
1504
|
formatNextSlot: e.formatNextSlot,
|
|
1503
1505
|
onLoadMore: l,
|
|
1504
|
-
loadingMore:
|
|
1506
|
+
loadingMore: d,
|
|
1505
1507
|
loadingSkeletons: o,
|
|
1506
1508
|
density: "compact",
|
|
1507
1509
|
apiKey: i,
|
|
1508
|
-
containerRef:
|
|
1510
|
+
containerRef: m
|
|
1509
1511
|
}
|
|
1510
1512
|
), A = /* @__PURE__ */ t(
|
|
1511
1513
|
ue,
|
|
@@ -1515,23 +1517,23 @@ function Gt(e) {
|
|
|
1515
1517
|
zoom: r,
|
|
1516
1518
|
apiKey: i,
|
|
1517
1519
|
mapId: s,
|
|
1518
|
-
highlightedId:
|
|
1519
|
-
onPinClick: (
|
|
1520
|
-
Z(n,
|
|
1520
|
+
highlightedId: x,
|
|
1521
|
+
onPinClick: (S) => {
|
|
1522
|
+
Z(n, S, "pin", e.onResultSelect), y(S);
|
|
1521
1523
|
},
|
|
1522
1524
|
onPinHover: g,
|
|
1523
1525
|
onPinFirstInteract: e.onPinFirstInteract,
|
|
1524
|
-
onBoundsChange:
|
|
1526
|
+
onBoundsChange: b,
|
|
1525
1527
|
consentGranted: k,
|
|
1526
|
-
onConsentRequest:
|
|
1528
|
+
onConsentRequest: w,
|
|
1527
1529
|
mapHandleRef: e.mapHandleRef
|
|
1528
1530
|
}
|
|
1529
|
-
), W =
|
|
1530
|
-
|
|
1531
|
+
), W = N.length > 0 ? /* @__PURE__ */ t("div", { className: "ds:absolute ds:start-[var(--spacing-md)] ds:top-[var(--spacing-md)] ds:max-w-[calc(100%-var(--spacing-lg))]", children: /* @__PURE__ */ t(
|
|
1532
|
+
_e,
|
|
1531
1533
|
{
|
|
1532
|
-
facets:
|
|
1533
|
-
value:
|
|
1534
|
-
onChange: (
|
|
1534
|
+
facets: N,
|
|
1535
|
+
value: L.facets,
|
|
1536
|
+
onChange: (S) => T({ ...L, facets: S }),
|
|
1535
1537
|
floating: !0
|
|
1536
1538
|
}
|
|
1537
1539
|
) }) : null;
|
|
@@ -1553,7 +1555,7 @@ function Gt(e) {
|
|
|
1553
1555
|
// the map column is `lg:sticky lg:h-[44rem]` (stays visible
|
|
1554
1556
|
// as the patient scrolls cards) and the rail renders at
|
|
1555
1557
|
// natural height. Single page scroll.
|
|
1556
|
-
/* @__PURE__ */ h(
|
|
1558
|
+
/* @__PURE__ */ h(at, { children: [
|
|
1557
1559
|
/* @__PURE__ */ t(he, { variantBodyProps: e }),
|
|
1558
1560
|
/* @__PURE__ */ h("div", { className: "ds:grid ds:grid-cols-[65fr_35fr] ds:gap-[var(--spacing-lg)] ds:items-start", children: [
|
|
1559
1561
|
/* @__PURE__ */ t("div", { className: "ds:sticky ds:top-[var(--spacing-md)] ds:h-[44rem]", children: A }),
|
|
@@ -1569,7 +1571,7 @@ function Gt(e) {
|
|
|
1569
1571
|
// chrome, so floating chips are the only place for them.
|
|
1570
1572
|
/* @__PURE__ */ h("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1571
1573
|
/* @__PURE__ */ t(
|
|
1572
|
-
|
|
1574
|
+
Te,
|
|
1573
1575
|
{
|
|
1574
1576
|
heading: e.heading,
|
|
1575
1577
|
headingLevel: e.headingLevel,
|
|
@@ -1587,9 +1589,9 @@ function Gt(e) {
|
|
|
1587
1589
|
{
|
|
1588
1590
|
side: "bottom",
|
|
1589
1591
|
size: U,
|
|
1590
|
-
onEscapeKeyDown: (
|
|
1591
|
-
onPointerDownOutside: (
|
|
1592
|
-
onInteractOutside: (
|
|
1592
|
+
onEscapeKeyDown: (S) => S.preventDefault(),
|
|
1593
|
+
onPointerDownOutside: (S) => S.preventDefault(),
|
|
1594
|
+
onInteractOutside: (S) => S.preventDefault(),
|
|
1593
1595
|
children: /* @__PURE__ */ h(I.Body, { children: [
|
|
1594
1596
|
/* @__PURE__ */ t(I.Description, { className: "ds:sr-only", children: _("practiceResults.sheet.descriptionMapFirst") }),
|
|
1595
1597
|
/* @__PURE__ */ h("div", { className: "ds:flex ds:items-start ds:justify-between ds:gap-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]", children: [
|
|
@@ -1599,7 +1601,7 @@ function Gt(e) {
|
|
|
1599
1601
|
/* @__PURE__ */ t(
|
|
1600
1602
|
Ut,
|
|
1601
1603
|
{
|
|
1602
|
-
value:
|
|
1604
|
+
value: P,
|
|
1603
1605
|
onChange: q
|
|
1604
1606
|
}
|
|
1605
1607
|
)
|
|
@@ -1607,8 +1609,8 @@ function Gt(e) {
|
|
|
1607
1609
|
/* @__PURE__ */ t("div", { className: "ds:pb-[var(--spacing-sm)]", children: /* @__PURE__ */ t(
|
|
1608
1610
|
de,
|
|
1609
1611
|
{
|
|
1610
|
-
value:
|
|
1611
|
-
onChange: (
|
|
1612
|
+
value: L.sort ?? "relevance",
|
|
1613
|
+
onChange: (S) => T({ ...L, sort: S })
|
|
1612
1614
|
}
|
|
1613
1615
|
) }),
|
|
1614
1616
|
E
|
|
@@ -1626,19 +1628,19 @@ function Zt(e) {
|
|
|
1626
1628
|
loadingMore: r,
|
|
1627
1629
|
loadingSkeletons: a,
|
|
1628
1630
|
emptyResultsSlot: l,
|
|
1629
|
-
errorSlot:
|
|
1631
|
+
errorSlot: d,
|
|
1630
1632
|
error: o,
|
|
1631
1633
|
onRetry: p,
|
|
1632
1634
|
highlightedId: c,
|
|
1633
|
-
onCardHover:
|
|
1635
|
+
onCardHover: u,
|
|
1634
1636
|
listContainerRef: f
|
|
1635
|
-
} = e,
|
|
1637
|
+
} = e, x = o ? d ?? /* @__PURE__ */ t(be, { onRetry: p, headingLevel: e.headingLevel }) : n.length === 0 && !a ? l ?? /* @__PURE__ */ t(ve, { headingLevel: e.headingLevel }) : /* @__PURE__ */ t(
|
|
1636
1638
|
pe,
|
|
1637
1639
|
{
|
|
1638
1640
|
results: n,
|
|
1639
1641
|
headingLevel: e.headingLevel,
|
|
1640
1642
|
highlightedId: c,
|
|
1641
|
-
onCardHover:
|
|
1643
|
+
onCardHover: u,
|
|
1642
1644
|
onCardSelect: e.onCardSelect,
|
|
1643
1645
|
onCardOpenClick: e.onCardOpenClick,
|
|
1644
1646
|
onCardBookClick: e.onCardBookClick,
|
|
@@ -1655,44 +1657,44 @@ function Zt(e) {
|
|
|
1655
1657
|
);
|
|
1656
1658
|
return /* @__PURE__ */ h("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1657
1659
|
/* @__PURE__ */ t(he, { variantBodyProps: e }),
|
|
1658
|
-
|
|
1660
|
+
x
|
|
1659
1661
|
] });
|
|
1660
1662
|
}
|
|
1661
|
-
const Wt =
|
|
1663
|
+
const Wt = it(function({
|
|
1662
1664
|
variant: n = "split-list-map",
|
|
1663
1665
|
results: i,
|
|
1664
1666
|
totalCount: s,
|
|
1665
1667
|
searchCentre: r,
|
|
1666
1668
|
facets: a,
|
|
1667
1669
|
googleMapsApiKey: l,
|
|
1668
|
-
mapId:
|
|
1669
|
-
defaultZoom: o =
|
|
1670
|
+
mapId: d,
|
|
1671
|
+
defaultZoom: o = yt,
|
|
1670
1672
|
onBoundsChange: p,
|
|
1671
1673
|
consentGranted: c,
|
|
1672
|
-
onConsentRequest:
|
|
1674
|
+
onConsentRequest: u,
|
|
1673
1675
|
skipConsentGate: f = !1,
|
|
1674
|
-
onLoadMore:
|
|
1676
|
+
onLoadMore: x,
|
|
1675
1677
|
loadingMore: g,
|
|
1676
|
-
value:
|
|
1678
|
+
value: y,
|
|
1677
1679
|
onChange: k,
|
|
1678
|
-
onResultSelect:
|
|
1679
|
-
loading:
|
|
1680
|
-
emptyResultsSlot:
|
|
1681
|
-
errorSlot:
|
|
1682
|
-
error:
|
|
1680
|
+
onResultSelect: w,
|
|
1681
|
+
loading: b,
|
|
1682
|
+
emptyResultsSlot: m,
|
|
1683
|
+
errorSlot: N,
|
|
1684
|
+
error: L,
|
|
1683
1685
|
onRetry: T,
|
|
1684
1686
|
heading: _,
|
|
1685
|
-
headingLevel:
|
|
1687
|
+
headingLevel: P = 2,
|
|
1686
1688
|
intro: q,
|
|
1687
1689
|
cardOpenButtonLabel: U,
|
|
1688
1690
|
cardBookButtonLabel: G,
|
|
1689
1691
|
showCardOpenButton: E = !0,
|
|
1690
1692
|
"aria-label": A,
|
|
1691
1693
|
id: W,
|
|
1692
|
-
className:
|
|
1693
|
-
...
|
|
1694
|
-
},
|
|
1695
|
-
const { t: ne, i18n: xe } = C("ui"), [
|
|
1694
|
+
className: S,
|
|
1695
|
+
...Oe
|
|
1696
|
+
}, Ee) {
|
|
1697
|
+
const { t: ne, i18n: xe } = C("ui"), [je, Q] = me(null), J = F(/* @__PURE__ */ new Set()), ae = F(/* @__PURE__ */ new Set()), Ke = F(null), ie = F(null), se = M(
|
|
1696
1698
|
() => ({
|
|
1697
1699
|
getVariant: () => n,
|
|
1698
1700
|
scrollToResult: (v) => {
|
|
@@ -1709,8 +1711,8 @@ const Wt = st(function({
|
|
|
1709
1711
|
}),
|
|
1710
1712
|
[n]
|
|
1711
1713
|
);
|
|
1712
|
-
|
|
1713
|
-
const
|
|
1714
|
+
st(Ee, () => se, [se]), mt(xt, se, W);
|
|
1715
|
+
const qe = E ? U ?? ne("practiceResults.card.open") : void 0, Ue = G ?? ne("practiceResults.card.book"), Ge = z(
|
|
1714
1716
|
(v) => {
|
|
1715
1717
|
if (v.nextAvailableSlot)
|
|
1716
1718
|
try {
|
|
@@ -1725,37 +1727,37 @@ const Wt = st(function({
|
|
|
1725
1727
|
},
|
|
1726
1728
|
[xe.language]
|
|
1727
1729
|
), ye = F(null);
|
|
1728
|
-
|
|
1729
|
-
ye.current !== n && (ye.current = n,
|
|
1730
|
+
Y(() => {
|
|
1731
|
+
ye.current !== n && (ye.current = n, B("serp_variant_exposed", {
|
|
1730
1732
|
variant: n,
|
|
1731
1733
|
totalCount: s ?? i.length
|
|
1732
|
-
}),
|
|
1734
|
+
}), J.current = /* @__PURE__ */ new Set(), ae.current = /* @__PURE__ */ new Set());
|
|
1733
1735
|
}, [n]);
|
|
1734
1736
|
const re = F(!1), oe = M(
|
|
1735
|
-
() =>
|
|
1736
|
-
[a, i,
|
|
1737
|
-
), ce =
|
|
1738
|
-
const v =
|
|
1739
|
-
return
|
|
1740
|
-
}, [i,
|
|
1741
|
-
|
|
1737
|
+
() => Ct(a ?? [], i, y.facets),
|
|
1738
|
+
[a, i, y.facets]
|
|
1739
|
+
), ce = y.sort ?? (r ? "distance" : "relevance"), V = M(() => {
|
|
1740
|
+
const v = Rt(i, y.facets, oe);
|
|
1741
|
+
return Lt(v, ce, r);
|
|
1742
|
+
}, [i, y.facets, oe, ce, r]);
|
|
1743
|
+
Y(() => {
|
|
1742
1744
|
const v = V.length === 0;
|
|
1743
|
-
v && !re.current ? (
|
|
1744
|
-
appliedFacets:
|
|
1745
|
+
v && !re.current ? (B("serp_empty_results", {
|
|
1746
|
+
appliedFacets: y.facets ?? {}
|
|
1745
1747
|
}), re.current = !0) : v || (re.current = !1);
|
|
1746
|
-
}, [V.length,
|
|
1748
|
+
}, [V.length, y.facets]);
|
|
1747
1749
|
const j = F(null), we = F(null);
|
|
1748
|
-
|
|
1750
|
+
Y(
|
|
1749
1751
|
() => () => {
|
|
1750
1752
|
j.current && clearTimeout(j.current);
|
|
1751
1753
|
},
|
|
1752
1754
|
[]
|
|
1753
1755
|
);
|
|
1754
|
-
const
|
|
1755
|
-
Q(v), !
|
|
1756
|
-
|
|
1756
|
+
const Ze = z((v) => {
|
|
1757
|
+
Q(v), !J.current.has(v) && (we.current === v && j.current || (j.current && clearTimeout(j.current), we.current = v, j.current = setTimeout(() => {
|
|
1758
|
+
J.current.has(v) || (J.current.add(v), B("serp_result_hovered_card", { resultId: v })), j.current = null;
|
|
1757
1759
|
}, 500)));
|
|
1758
|
-
}, []),
|
|
1760
|
+
}, []), We = z((v) => {
|
|
1759
1761
|
Q(v);
|
|
1760
1762
|
const H = ie.current;
|
|
1761
1763
|
if (!H) return;
|
|
@@ -1763,9 +1765,9 @@ const Wt = st(function({
|
|
|
1763
1765
|
`[data-component="practice-result-card"][data-result-id="${CSS.escape(v)}"]`
|
|
1764
1766
|
);
|
|
1765
1767
|
R == null || R.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
1766
|
-
}, []),
|
|
1767
|
-
ae.current.has(v) || (ae.current.add(v),
|
|
1768
|
-
}, []), ke = F(null),
|
|
1768
|
+
}, []), Qe = z((v) => {
|
|
1769
|
+
ae.current.has(v) || (ae.current.add(v), B("serp_result_hovered_pin", { resultId: v }));
|
|
1770
|
+
}, []), ke = F(null), Je = z(
|
|
1769
1771
|
(v) => {
|
|
1770
1772
|
Q(v);
|
|
1771
1773
|
const H = V.find((R) => R.id === v);
|
|
@@ -1777,42 +1779,42 @@ const Wt = st(function({
|
|
|
1777
1779
|
lng: H.location.lng
|
|
1778
1780
|
}), R == null || R.setZoom(16);
|
|
1779
1781
|
}
|
|
1780
|
-
Z(V, v, "card",
|
|
1782
|
+
Z(V, v, "card", w);
|
|
1781
1783
|
}
|
|
1782
1784
|
},
|
|
1783
|
-
[V,
|
|
1784
|
-
),
|
|
1785
|
+
[V, w]
|
|
1786
|
+
), Xe = z(
|
|
1785
1787
|
(v) => {
|
|
1786
1788
|
Z(
|
|
1787
1789
|
V,
|
|
1788
1790
|
v,
|
|
1789
1791
|
"open-button",
|
|
1790
|
-
|
|
1792
|
+
w
|
|
1791
1793
|
);
|
|
1792
1794
|
},
|
|
1793
|
-
[V,
|
|
1794
|
-
),
|
|
1795
|
+
[V, w]
|
|
1796
|
+
), Ye = z(
|
|
1795
1797
|
(v) => {
|
|
1796
1798
|
Z(
|
|
1797
1799
|
V,
|
|
1798
1800
|
v,
|
|
1799
1801
|
"book-button",
|
|
1800
|
-
|
|
1802
|
+
w
|
|
1801
1803
|
);
|
|
1802
1804
|
},
|
|
1803
|
-
[V,
|
|
1804
|
-
),
|
|
1805
|
+
[V, w]
|
|
1806
|
+
), et = !!b && i.length === 0, le = {
|
|
1805
1807
|
results: V,
|
|
1806
1808
|
totalCount: s,
|
|
1807
1809
|
searchCentre: r,
|
|
1808
1810
|
facets: oe,
|
|
1809
|
-
value: { ...
|
|
1811
|
+
value: { ...y, sort: ce },
|
|
1810
1812
|
onChange: k,
|
|
1811
|
-
onResultSelect:
|
|
1812
|
-
onLoadMore:
|
|
1813
|
+
onResultSelect: w,
|
|
1814
|
+
onLoadMore: x,
|
|
1813
1815
|
loadingMore: g,
|
|
1814
1816
|
apiKey: l,
|
|
1815
|
-
mapId:
|
|
1817
|
+
mapId: d,
|
|
1816
1818
|
zoom: o,
|
|
1817
1819
|
// 0.31.4: when `skipConsentGate` is true the kit synthesises
|
|
1818
1820
|
// `consentGranted=true` for every internal MapView; the consumer's
|
|
@@ -1820,29 +1822,29 @@ const Wt = st(function({
|
|
|
1820
1822
|
// loader script is present at all. `onConsentRequest` is dropped
|
|
1821
1823
|
// because no placeholder renders — nothing to fire it from.
|
|
1822
1824
|
consentGranted: f ? !0 : c,
|
|
1823
|
-
onConsentRequest: f ? void 0 :
|
|
1825
|
+
onConsentRequest: f ? void 0 : u,
|
|
1824
1826
|
onBoundsChange: p,
|
|
1825
|
-
loadingSkeletons:
|
|
1826
|
-
emptyResultsSlot:
|
|
1827
|
-
errorSlot:
|
|
1828
|
-
error:
|
|
1827
|
+
loadingSkeletons: et,
|
|
1828
|
+
emptyResultsSlot: m,
|
|
1829
|
+
errorSlot: N,
|
|
1830
|
+
error: L,
|
|
1829
1831
|
onRetry: T,
|
|
1830
1832
|
heading: _,
|
|
1831
|
-
headingLevel:
|
|
1833
|
+
headingLevel: P,
|
|
1832
1834
|
intro: q,
|
|
1833
|
-
highlightedId:
|
|
1834
|
-
onCardHover:
|
|
1835
|
-
onPinClick:
|
|
1836
|
-
onPinFirstInteract:
|
|
1837
|
-
onCardSelect:
|
|
1838
|
-
onCardOpenClick:
|
|
1839
|
-
onCardBookClick:
|
|
1840
|
-
openLabel:
|
|
1841
|
-
bookLabel:
|
|
1842
|
-
formatNextSlot:
|
|
1843
|
-
listContainerRef:
|
|
1835
|
+
highlightedId: je,
|
|
1836
|
+
onCardHover: Ze,
|
|
1837
|
+
onPinClick: We,
|
|
1838
|
+
onPinFirstInteract: Qe,
|
|
1839
|
+
onCardSelect: Je,
|
|
1840
|
+
onCardOpenClick: Xe,
|
|
1841
|
+
onCardBookClick: Ye,
|
|
1842
|
+
openLabel: qe,
|
|
1843
|
+
bookLabel: Ue,
|
|
1844
|
+
formatNextSlot: Ge,
|
|
1845
|
+
listContainerRef: Ke,
|
|
1844
1846
|
mapHandleRef: ke
|
|
1845
|
-
},
|
|
1847
|
+
}, tt = (() => {
|
|
1846
1848
|
switch (n) {
|
|
1847
1849
|
case "map-first":
|
|
1848
1850
|
return /* @__PURE__ */ t(Gt, { ...le });
|
|
@@ -1852,26 +1854,26 @@ const Wt = st(function({
|
|
|
1852
1854
|
default:
|
|
1853
1855
|
return /* @__PURE__ */ t(Kt, { ...le });
|
|
1854
1856
|
}
|
|
1855
|
-
})(),
|
|
1857
|
+
})(), nt = A ?? ne("practiceResults.regionLabel");
|
|
1856
1858
|
return /* @__PURE__ */ t(
|
|
1857
1859
|
"div",
|
|
1858
1860
|
{
|
|
1859
1861
|
ref: ie,
|
|
1860
1862
|
role: "region",
|
|
1861
|
-
"aria-label":
|
|
1863
|
+
"aria-label": nt,
|
|
1862
1864
|
id: W,
|
|
1863
1865
|
"data-component": "practice-results",
|
|
1864
1866
|
"data-component-id": W,
|
|
1865
1867
|
"data-variant": n,
|
|
1866
|
-
className: At({ variant: n, className:
|
|
1867
|
-
...
|
|
1868
|
-
children:
|
|
1868
|
+
className: At({ variant: n, className: S }),
|
|
1869
|
+
...Oe,
|
|
1870
|
+
children: tt
|
|
1869
1871
|
}
|
|
1870
1872
|
);
|
|
1871
1873
|
});
|
|
1872
1874
|
Wt.displayName = "PracticeResults";
|
|
1873
1875
|
export {
|
|
1874
1876
|
Wt as P,
|
|
1875
|
-
|
|
1877
|
+
xt as p
|
|
1876
1878
|
};
|
|
1877
|
-
//# sourceMappingURL=practice-results-
|
|
1879
|
+
//# sourceMappingURL=practice-results-BWX9y6mS.js.map
|