@alfadocs/ui-kit 0.31.3 → 0.31.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{practice-results-RPL64j8E.js → practice-results-dOlljaAK.js} +346 -329
- package/dist/agent-catalog.json +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/practice-results/practice-results.d.ts +19 -0
- package/dist/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as t, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as qe, useState as me, useRef as A, useMemo as H, useImperativeHandle as Ge, useCallback as K, useEffect as Q } from "react";
|
|
3
3
|
import { c as G } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as
|
|
4
|
+
import { useTranslation as k } from "react-i18next";
|
|
5
5
|
import { A as Y } from "./alert-ywPR59NE.js";
|
|
6
|
-
import { A as
|
|
6
|
+
import { A as we } from "./avatar-BNQNhoyL.js";
|
|
7
7
|
import { B as q } from "./button-DD_0Xdmr.js";
|
|
8
8
|
import { D as F } from "./dropdown-menu-BC5ZdOMo.js";
|
|
9
|
-
import { E as
|
|
10
|
-
import { M as
|
|
9
|
+
import { E as Ze } from "./empty-state-BLy7tigq.js";
|
|
10
|
+
import { M as Qe } from "./map-view-WEWqXzof.js";
|
|
11
11
|
import { R as ke } from "./rating-BRD7O74e.js";
|
|
12
12
|
import { S as _ } from "./sheet-BV-yuLE2.js";
|
|
13
|
-
import { S as
|
|
14
|
-
import { S as
|
|
13
|
+
import { S as Je } from "./skeleton-CZbwyJAA.js";
|
|
14
|
+
import { S as We } from "./spinner-CCByyvcb.js";
|
|
15
15
|
import { B as D } from "./badge-CptERaHx.js";
|
|
16
|
-
import { u as
|
|
17
|
-
import { u as
|
|
16
|
+
import { u as Xe } from "./use-media-query-CcAx5SMM.js";
|
|
17
|
+
import { u as Ye } from "./registry-nPAVE19X.js";
|
|
18
18
|
import { c as te } from "./createLucideIcon-CrFbzy84.js";
|
|
19
|
-
import { R as
|
|
20
|
-
import { C as
|
|
19
|
+
import { R as et } from "./refresh-cw-CC8jSKMr.js";
|
|
20
|
+
import { C as Ce } from "./chevron-down-BX_NP2Yh.js";
|
|
21
21
|
import { M as ne } from "./map-pin-B8STOPMJ.js";
|
|
22
|
-
import { C as
|
|
22
|
+
import { C as Ne } from "./calendar-clock-CYkcqdwl.js";
|
|
23
23
|
/**
|
|
24
24
|
* @license lucide-react v1.8.0 - ISC
|
|
25
25
|
*
|
|
26
26
|
* This source code is licensed under the ISC license.
|
|
27
27
|
* See the LICENSE file in the root directory of this source tree.
|
|
28
28
|
*/
|
|
29
|
-
const
|
|
29
|
+
const tt = [
|
|
30
30
|
[
|
|
31
31
|
"path",
|
|
32
32
|
{
|
|
@@ -34,28 +34,28 @@ const et = [
|
|
|
34
34
|
key: "mvr1a0"
|
|
35
35
|
}
|
|
36
36
|
]
|
|
37
|
-
],
|
|
37
|
+
], Se = te("heart", tt);
|
|
38
38
|
/**
|
|
39
39
|
* @license lucide-react v1.8.0 - ISC
|
|
40
40
|
*
|
|
41
41
|
* This source code is licensed under the ISC license.
|
|
42
42
|
* See the LICENSE file in the root directory of this source tree.
|
|
43
43
|
*/
|
|
44
|
-
const
|
|
44
|
+
const nt = [
|
|
45
45
|
["path", { d: "m5 8 6 6", key: "1wu5hv" }],
|
|
46
46
|
["path", { d: "m4 14 6-6 2-3", key: "1k1g8d" }],
|
|
47
47
|
["path", { d: "M2 5h12", key: "or177f" }],
|
|
48
48
|
["path", { d: "M7 2h1", key: "1t2jsx" }],
|
|
49
49
|
["path", { d: "m22 22-5-10-5 10", key: "don7ne" }],
|
|
50
50
|
["path", { d: "M14 18h6", key: "1m8k6r" }]
|
|
51
|
-
],
|
|
51
|
+
], Pe = te("languages", nt);
|
|
52
52
|
/**
|
|
53
53
|
* @license lucide-react v1.8.0 - ISC
|
|
54
54
|
*
|
|
55
55
|
* This source code is licensed under the ISC license.
|
|
56
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
57
57
|
*/
|
|
58
|
-
const
|
|
58
|
+
const at = [
|
|
59
59
|
[
|
|
60
60
|
"path",
|
|
61
61
|
{
|
|
@@ -65,14 +65,14 @@ const nt = [
|
|
|
65
65
|
],
|
|
66
66
|
["path", { d: "M15 5.764v15", key: "1pn4in" }],
|
|
67
67
|
["path", { d: "M9 3.236v15", key: "1uimfh" }]
|
|
68
|
-
],
|
|
68
|
+
], st = te("map", at);
|
|
69
69
|
/**
|
|
70
70
|
* @license lucide-react v1.8.0 - ISC
|
|
71
71
|
*
|
|
72
72
|
* This source code is licensed under the ISC license.
|
|
73
73
|
* See the LICENSE file in the root directory of this source tree.
|
|
74
74
|
*/
|
|
75
|
-
const
|
|
75
|
+
const it = [
|
|
76
76
|
[
|
|
77
77
|
"path",
|
|
78
78
|
{
|
|
@@ -81,7 +81,7 @@ const st = [
|
|
|
81
81
|
}
|
|
82
82
|
],
|
|
83
83
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
84
|
-
],
|
|
84
|
+
], Me = te("shield-check", it), rt = {
|
|
85
85
|
id: "practice-results",
|
|
86
86
|
capabilities: ["navigate", "view_change"],
|
|
87
87
|
state: {
|
|
@@ -124,7 +124,7 @@ const st = [
|
|
|
124
124
|
description: "Sourced from the id prop."
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
},
|
|
127
|
+
}, lt = 13, ot = [
|
|
128
128
|
"distance",
|
|
129
129
|
"rating",
|
|
130
130
|
"next-available",
|
|
@@ -138,17 +138,17 @@ function $(e, n) {
|
|
|
138
138
|
} catch {
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function J(e, n, s, o) {
|
|
142
142
|
const i = e.findIndex((d) => d.id === n);
|
|
143
143
|
if (i < 0) return;
|
|
144
144
|
const a = e[i];
|
|
145
145
|
a && ($("serp_result_clicked", { resultId: n, source: s, position: i }), o(a, s));
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function ct(e, n) {
|
|
148
148
|
const o = (n.lat - e.lat) * Math.PI / 180, i = (n.lng - e.lng) * Math.PI / 180, a = e.lat * Math.PI / 180, d = n.lat * Math.PI / 180, u = Math.sin(o / 2), c = Math.sin(i / 2), g = u * u + Math.cos(a) * Math.cos(d) * c * c;
|
|
149
149
|
return 2 * 6371 * Math.asin(Math.min(1, Math.sqrt(g)));
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function dt(e, n, s) {
|
|
152
152
|
return !n || Object.keys(n).length === 0 ? e : e.filter((o) => {
|
|
153
153
|
for (const i of s) {
|
|
154
154
|
const a = n[i.key];
|
|
@@ -163,9 +163,9 @@ function ct(e, n, s) {
|
|
|
163
163
|
return !0;
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function ut(e, n, s) {
|
|
167
167
|
const o = e.map((a) => {
|
|
168
|
-
const d = a.location ? a.location.distanceKm ?? (s ?
|
|
168
|
+
const d = a.location ? a.location.distanceKm ?? (s ? ct(s, a.location) : void 0) : void 0;
|
|
169
169
|
return { result: a, distanceKm: d };
|
|
170
170
|
}), i = (a, d) => {
|
|
171
171
|
var u, c, g, l;
|
|
@@ -173,12 +173,12 @@ function dt(e, n, s) {
|
|
|
173
173
|
case "distance":
|
|
174
174
|
return a.distanceKm == null && d.distanceKm == null ? 0 : a.distanceKm == null ? 1 : d.distanceKm == null ? -1 : a.distanceKm - d.distanceKm;
|
|
175
175
|
case "rating": {
|
|
176
|
-
const
|
|
177
|
-
return (((c = d.result.rating) == null ? void 0 : c.value) ?? -1) -
|
|
176
|
+
const p = ((u = a.result.rating) == null ? void 0 : u.value) ?? -1;
|
|
177
|
+
return (((c = d.result.rating) == null ? void 0 : c.value) ?? -1) - p;
|
|
178
178
|
}
|
|
179
179
|
case "next-available": {
|
|
180
|
-
const
|
|
181
|
-
return !
|
|
180
|
+
const p = ((g = a.result.nextAvailableSlot) == null ? void 0 : g.dateTime) ?? "", m = ((l = d.result.nextAvailableSlot) == null ? void 0 : l.dateTime) ?? "";
|
|
181
|
+
return !p && !m ? 0 : p ? m ? p.localeCompare(m) : -1 : 1;
|
|
182
182
|
}
|
|
183
183
|
case "relevance":
|
|
184
184
|
default:
|
|
@@ -192,7 +192,7 @@ function dt(e, n, s) {
|
|
|
192
192
|
} : a
|
|
193
193
|
);
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function ye(e) {
|
|
196
196
|
let n = -1 / 0, s = 1 / 0, o = -1 / 0, i = 1 / 0, a = !1;
|
|
197
197
|
for (const d of e) {
|
|
198
198
|
if (!d.location) continue;
|
|
@@ -203,7 +203,7 @@ function be(e) {
|
|
|
203
203
|
if (a)
|
|
204
204
|
return { north: n, south: s, east: o, west: i };
|
|
205
205
|
}
|
|
206
|
-
const
|
|
206
|
+
const mt = G(
|
|
207
207
|
"ds:flex ds:w-full ds:flex-col ds:text-[var(--foreground)] ds:gap-[var(--spacing-md)]",
|
|
208
208
|
{
|
|
209
209
|
variants: {
|
|
@@ -216,19 +216,19 @@ const ut = G(
|
|
|
216
216
|
defaultVariants: { variant: "split-list-map" }
|
|
217
217
|
}
|
|
218
218
|
);
|
|
219
|
-
function
|
|
219
|
+
function Ae({
|
|
220
220
|
heading: e,
|
|
221
221
|
intro: n,
|
|
222
222
|
totalCount: s,
|
|
223
223
|
searchCentreLabel: o
|
|
224
224
|
}) {
|
|
225
|
-
const { t: i } =
|
|
225
|
+
const { t: i } = k();
|
|
226
226
|
if (!e && !n && s == null) return null;
|
|
227
227
|
const a = s != null ? o ? i("practiceResults.results.heading", {
|
|
228
228
|
count: s,
|
|
229
229
|
place: o
|
|
230
230
|
}) : i("practiceResults.results.summary", { count: s }) : void 0;
|
|
231
|
-
return /* @__PURE__ */
|
|
231
|
+
return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
232
232
|
e ? /* @__PURE__ */ t("h2", { className: "type-title-section ds:m-0 ds:text-[var(--foreground)]", children: e }) : null,
|
|
233
233
|
n ? /* @__PURE__ */ t("p", { className: "type-body ds:m-0 ds:text-[var(--muted-foreground)]", children: n }) : null,
|
|
234
234
|
a ? /* @__PURE__ */ t(
|
|
@@ -263,7 +263,7 @@ const ee = G(
|
|
|
263
263
|
},
|
|
264
264
|
defaultVariants: { state: "idle" }
|
|
265
265
|
}
|
|
266
|
-
),
|
|
266
|
+
), pt = G(
|
|
267
267
|
"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
268
268
|
{
|
|
269
269
|
variants: {
|
|
@@ -282,7 +282,7 @@ const ee = G(
|
|
|
282
282
|
},
|
|
283
283
|
defaultVariants: { placement: "inline" }
|
|
284
284
|
}
|
|
285
|
-
),
|
|
285
|
+
), ft = G(
|
|
286
286
|
[
|
|
287
287
|
"ds:ms-[var(--spacing-xs)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
288
288
|
"ds:min-h-[var(--min-target-size)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]",
|
|
@@ -293,71 +293,71 @@ const ee = G(
|
|
|
293
293
|
"ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
|
|
294
294
|
].join(" ")
|
|
295
295
|
);
|
|
296
|
-
function
|
|
296
|
+
function _e({
|
|
297
297
|
facets: e,
|
|
298
298
|
value: n,
|
|
299
299
|
onChange: s,
|
|
300
300
|
floating: o
|
|
301
301
|
}) {
|
|
302
|
-
const { t: i } =
|
|
302
|
+
const { t: i } = k(), a = H(() => n ?? {}, [n]), d = H(
|
|
303
303
|
() => Object.values(a).some((l) => l && l.length > 0),
|
|
304
304
|
[a]
|
|
305
|
-
), u = (l,
|
|
305
|
+
), u = (l, p) => {
|
|
306
306
|
const m = { ...a };
|
|
307
|
-
|
|
307
|
+
p.length === 0 ? delete m[l] : m[l] = p, s(m), $("serp_filter_changed", { key: l, values: p });
|
|
308
308
|
}, c = (l) => {
|
|
309
309
|
var m;
|
|
310
|
-
const
|
|
311
|
-
u(l,
|
|
312
|
-
}, g = (l,
|
|
313
|
-
const m = a[l.key] ?? [],
|
|
314
|
-
let
|
|
315
|
-
l.multi ?
|
|
310
|
+
const p = (((m = a[l]) == null ? void 0 : m.length) ?? 0) > 0;
|
|
311
|
+
u(l, p ? [] : ["true"]);
|
|
312
|
+
}, g = (l, p) => {
|
|
313
|
+
const m = a[l.key] ?? [], x = m.includes(p);
|
|
314
|
+
let h;
|
|
315
|
+
l.multi ? h = x ? m.filter((r) => r !== p) : [...m, p] : h = x ? [] : [p], u(l.key, h);
|
|
316
316
|
};
|
|
317
|
-
return e.length === 0 ? null : /* @__PURE__ */
|
|
317
|
+
return e.length === 0 ? null : /* @__PURE__ */ f(
|
|
318
318
|
"div",
|
|
319
319
|
{
|
|
320
320
|
"data-component": "practice-results-filters",
|
|
321
321
|
role: "group",
|
|
322
322
|
"aria-label": i("practiceResults.filters.label"),
|
|
323
|
-
className:
|
|
323
|
+
className: pt({
|
|
324
324
|
placement: o ? "floating" : "inline"
|
|
325
325
|
}),
|
|
326
326
|
children: [
|
|
327
327
|
e.map((l) => {
|
|
328
|
-
const
|
|
329
|
-
if (
|
|
328
|
+
const p = l.options.length === 0, m = a[l.key] ?? [], x = m.length > 0;
|
|
329
|
+
if (p)
|
|
330
330
|
return /* @__PURE__ */ t(
|
|
331
331
|
"button",
|
|
332
332
|
{
|
|
333
333
|
type: "button",
|
|
334
|
-
"aria-pressed":
|
|
334
|
+
"aria-pressed": x,
|
|
335
335
|
"aria-label": l.label,
|
|
336
336
|
onClick: () => c(l.key),
|
|
337
337
|
className: ee({
|
|
338
|
-
state:
|
|
338
|
+
state: x ? "active" : "idle"
|
|
339
339
|
}),
|
|
340
340
|
children: /* @__PURE__ */ t("span", { children: l.label })
|
|
341
341
|
},
|
|
342
342
|
l.key
|
|
343
343
|
);
|
|
344
|
-
const
|
|
345
|
-
return /* @__PURE__ */
|
|
346
|
-
/* @__PURE__ */ t(F.Trigger, { asChild: !0, children: /* @__PURE__ */
|
|
344
|
+
const h = x ? ` (${m.length})` : "";
|
|
345
|
+
return /* @__PURE__ */ f(F.Root, { children: [
|
|
346
|
+
/* @__PURE__ */ t(F.Trigger, { asChild: !0, children: /* @__PURE__ */ f(
|
|
347
347
|
"button",
|
|
348
348
|
{
|
|
349
349
|
type: "button",
|
|
350
|
-
"aria-label": `${l.label}${
|
|
350
|
+
"aria-label": `${l.label}${h}`,
|
|
351
351
|
className: ee({
|
|
352
|
-
state:
|
|
352
|
+
state: x ? "active" : "idle"
|
|
353
353
|
}),
|
|
354
354
|
children: [
|
|
355
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ f("span", { children: [
|
|
356
356
|
l.label,
|
|
357
|
-
|
|
357
|
+
h
|
|
358
358
|
] }),
|
|
359
359
|
/* @__PURE__ */ t(
|
|
360
|
-
|
|
360
|
+
Ce,
|
|
361
361
|
{
|
|
362
362
|
"aria-hidden": "true",
|
|
363
363
|
className: "ds:size-3.5 ds:shrink-0"
|
|
@@ -370,8 +370,8 @@ function Ae({
|
|
|
370
370
|
F.CheckboxItem,
|
|
371
371
|
{
|
|
372
372
|
checked: m.includes(r.value),
|
|
373
|
-
onSelect: (
|
|
374
|
-
l.multi &&
|
|
373
|
+
onSelect: (b) => {
|
|
374
|
+
l.multi && b.preventDefault(), g(l, r.value);
|
|
375
375
|
},
|
|
376
376
|
children: r.label
|
|
377
377
|
},
|
|
@@ -386,7 +386,7 @@ function Ae({
|
|
|
386
386
|
onClick: () => {
|
|
387
387
|
s({}), $("serp_filter_changed", { key: "*", values: [] });
|
|
388
388
|
},
|
|
389
|
-
className:
|
|
389
|
+
className: ft(),
|
|
390
390
|
children: i("practiceResults.filters.clear")
|
|
391
391
|
}
|
|
392
392
|
) : null
|
|
@@ -395,7 +395,7 @@ function Ae({
|
|
|
395
395
|
);
|
|
396
396
|
}
|
|
397
397
|
function de({ value: e, onChange: n }) {
|
|
398
|
-
const { t: s } =
|
|
398
|
+
const { t: s } = k(), o = (i) => {
|
|
399
399
|
switch (i) {
|
|
400
400
|
case "distance":
|
|
401
401
|
return s("practiceResults.sort.distance");
|
|
@@ -408,20 +408,20 @@ function de({ value: e, onChange: n }) {
|
|
|
408
408
|
return s("practiceResults.sort.relevance");
|
|
409
409
|
}
|
|
410
410
|
};
|
|
411
|
-
return /* @__PURE__ */
|
|
412
|
-
/* @__PURE__ */ t(F.Trigger, { asChild: !0, children: /* @__PURE__ */
|
|
411
|
+
return /* @__PURE__ */ f(F.Root, { children: [
|
|
412
|
+
/* @__PURE__ */ t(F.Trigger, { asChild: !0, children: /* @__PURE__ */ f(
|
|
413
413
|
"button",
|
|
414
414
|
{
|
|
415
415
|
type: "button",
|
|
416
416
|
"aria-label": `${s("practiceResults.sort.label")}: ${o(e)}`,
|
|
417
417
|
className: ee({ state: "idle" }),
|
|
418
418
|
children: [
|
|
419
|
-
/* @__PURE__ */
|
|
419
|
+
/* @__PURE__ */ f("span", { children: [
|
|
420
420
|
s("practiceResults.sort.label"),
|
|
421
421
|
": ",
|
|
422
422
|
o(e)
|
|
423
423
|
] }),
|
|
424
|
-
/* @__PURE__ */ t(
|
|
424
|
+
/* @__PURE__ */ t(Ce, { "aria-hidden": "true", className: "ds:size-3.5 ds:shrink-0" })
|
|
425
425
|
]
|
|
426
426
|
}
|
|
427
427
|
) }),
|
|
@@ -433,13 +433,13 @@ function de({ value: e, onChange: n }) {
|
|
|
433
433
|
const a = i;
|
|
434
434
|
a !== e && (n(a), $("serp_sort_changed", { sort: a }));
|
|
435
435
|
},
|
|
436
|
-
children:
|
|
436
|
+
children: ot.map((i) => /* @__PURE__ */ t(F.RadioItem, { value: i, children: o(i) }, i))
|
|
437
437
|
}
|
|
438
438
|
) })
|
|
439
439
|
] });
|
|
440
440
|
}
|
|
441
|
-
function
|
|
442
|
-
const { t: n, i18n: s } =
|
|
441
|
+
function ze({ distanceKm: e }) {
|
|
442
|
+
const { t: n, i18n: s } = k(), o = H(() => {
|
|
443
443
|
if (e < 1) return n("practiceResults.distance.below");
|
|
444
444
|
const i = new Intl.NumberFormat(s.language, {
|
|
445
445
|
maximumFractionDigits: 1
|
|
@@ -448,7 +448,7 @@ function _e({ distanceKm: e }) {
|
|
|
448
448
|
}, [e, n, s.language]);
|
|
449
449
|
return /* @__PURE__ */ t(D, { variant: "neutral", leading: /* @__PURE__ */ t(ne, { "aria-hidden": "true" }), children: o });
|
|
450
450
|
}
|
|
451
|
-
const
|
|
451
|
+
const Re = G(
|
|
452
452
|
[
|
|
453
453
|
"ds:inline-size-[12rem] ds:block-size-[8rem] ds:shrink-0",
|
|
454
454
|
"ds:rounded-[var(--radius-md)] ds:overflow-hidden"
|
|
@@ -467,31 +467,31 @@ const ye = G(
|
|
|
467
467
|
defaultVariants: { state: "placeholder" }
|
|
468
468
|
}
|
|
469
469
|
);
|
|
470
|
-
function
|
|
470
|
+
function ht() {
|
|
471
471
|
if (typeof document > "u") return "4945a3";
|
|
472
472
|
const e = getComputedStyle(document.documentElement).getPropertyValue("--map-marker-color").trim(), n = /^#?([0-9a-fA-F]{6})$/.exec(e);
|
|
473
473
|
return n ? n[1] : "4945a3";
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function gt({
|
|
476
476
|
apiKey: e,
|
|
477
477
|
center: n,
|
|
478
478
|
zoom: s = 14,
|
|
479
479
|
address: o
|
|
480
480
|
}) {
|
|
481
|
-
const { t: i } =
|
|
481
|
+
const { t: i } = k();
|
|
482
482
|
if (!e)
|
|
483
|
-
return /* @__PURE__ */
|
|
483
|
+
return /* @__PURE__ */ f(
|
|
484
484
|
"div",
|
|
485
485
|
{
|
|
486
486
|
"aria-hidden": o ? void 0 : "true",
|
|
487
|
-
className:
|
|
487
|
+
className: Re({ state: "placeholder" }),
|
|
488
488
|
children: [
|
|
489
489
|
/* @__PURE__ */ t(ne, { "aria-hidden": "true", className: "ds:size-5 ds:shrink-0" }),
|
|
490
490
|
o ? /* @__PURE__ */ t("span", { className: "type-meta ds:[overflow-wrap:anywhere]", children: o }) : null
|
|
491
491
|
]
|
|
492
492
|
}
|
|
493
493
|
);
|
|
494
|
-
const a =
|
|
494
|
+
const a = ht(), d = `https://maps.googleapis.com/maps/api/staticmap?center=${n.lat},${n.lng}&zoom=${s}&size=240x160&scale=2&markers=color:0x${a}%7C${n.lat},${n.lng}&key=${encodeURIComponent(e)}`;
|
|
495
495
|
return /* @__PURE__ */ t(
|
|
496
496
|
"img",
|
|
497
497
|
{
|
|
@@ -501,11 +501,11 @@ function ht({
|
|
|
501
501
|
decoding: "async",
|
|
502
502
|
width: 240,
|
|
503
503
|
height: 160,
|
|
504
|
-
className:
|
|
504
|
+
className: Re({ state: "image" })
|
|
505
505
|
}
|
|
506
506
|
);
|
|
507
507
|
}
|
|
508
|
-
const
|
|
508
|
+
const Ie = G(
|
|
509
509
|
[
|
|
510
510
|
"ds:relative ds:flex ds:w-full ds:cursor-pointer",
|
|
511
511
|
"ds:rounded-[var(--radius-lg)]",
|
|
@@ -534,7 +534,7 @@ const ze = G(
|
|
|
534
534
|
defaultVariants: { density: "compact" }
|
|
535
535
|
}
|
|
536
536
|
);
|
|
537
|
-
function
|
|
537
|
+
function vt({
|
|
538
538
|
result: e,
|
|
539
539
|
highlighted: n,
|
|
540
540
|
onSelect: s,
|
|
@@ -547,11 +547,11 @@ function gt({
|
|
|
547
547
|
maxLanguageChips: g = 4,
|
|
548
548
|
children: l
|
|
549
549
|
}) {
|
|
550
|
-
var I, P, E,
|
|
551
|
-
const { t:
|
|
550
|
+
var I, P, E, U, O, j;
|
|
551
|
+
const { t: p } = k(), m = e.rating, x = (I = e.location) == null ? void 0 : I.distanceKm, h = (((P = e.languages) == null ? void 0 : P.length) ?? 0) > 0, r = (((E = e.insurances) == null ? void 0 : E.length) ?? 0) > 0, b = e.specializedInFearPatients, N = h || r || b, S = (e.languages ?? []).slice(0, g), y = (((U = e.languages) == null ? void 0 : U.length) ?? 0) - S.length, M = (e.insurances ?? []).slice(0, c), z = (((O = e.insurances) == null ? void 0 : O.length) ?? 0) - M.length;
|
|
552
552
|
return (
|
|
553
553
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events -- card is role="group" by design (axe nested-interactive); click handler is mouse-only sync.
|
|
554
|
-
/* @__PURE__ */
|
|
554
|
+
/* @__PURE__ */ f(
|
|
555
555
|
"div",
|
|
556
556
|
{
|
|
557
557
|
"data-component": "practice-result-card",
|
|
@@ -562,12 +562,12 @@ function gt({
|
|
|
562
562
|
onClick: s,
|
|
563
563
|
onMouseEnter: i,
|
|
564
564
|
onFocus: i,
|
|
565
|
-
className:
|
|
565
|
+
className: Ie({ density: a }),
|
|
566
566
|
children: [
|
|
567
|
-
/* @__PURE__ */ t(
|
|
568
|
-
/* @__PURE__ */
|
|
569
|
-
/* @__PURE__ */
|
|
570
|
-
/* @__PURE__ */
|
|
567
|
+
/* @__PURE__ */ t(we, { src: e.imageUrl, name: e.name, size: "lg" }),
|
|
568
|
+
/* @__PURE__ */ f("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
569
|
+
/* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
570
|
+
/* @__PURE__ */ f("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
571
571
|
/* @__PURE__ */ t(
|
|
572
572
|
"span",
|
|
573
573
|
{
|
|
@@ -576,10 +576,10 @@ function gt({
|
|
|
576
576
|
children: e.name
|
|
577
577
|
}
|
|
578
578
|
),
|
|
579
|
-
|
|
579
|
+
x != null ? /* @__PURE__ */ t(ze, { distanceKm: x }) : null
|
|
580
580
|
] }),
|
|
581
581
|
e.subtitle ? /* @__PURE__ */ t("span", { className: "type-body-sm ds:text-[var(--muted-foreground)]", children: e.subtitle }) : null,
|
|
582
|
-
(j = e.location) != null && j.address ? /* @__PURE__ */
|
|
582
|
+
(j = e.location) != null && j.address ? /* @__PURE__ */ f("span", { className: "type-meta ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
583
583
|
/* @__PURE__ */ t(ne, { "aria-hidden": "true", className: "ds:size-3.5 ds:shrink-0" }),
|
|
584
584
|
e.location.address
|
|
585
585
|
] }) : null
|
|
@@ -592,39 +592,39 @@ function gt({
|
|
|
592
592
|
size: "sm"
|
|
593
593
|
}
|
|
594
594
|
) : null,
|
|
595
|
-
N ? /* @__PURE__ */
|
|
595
|
+
N ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
596
596
|
S.map((C) => /* @__PURE__ */ t(
|
|
597
597
|
D,
|
|
598
598
|
{
|
|
599
599
|
variant: "neutral",
|
|
600
|
-
leading: /* @__PURE__ */ t(
|
|
600
|
+
leading: /* @__PURE__ */ t(Pe, { "aria-hidden": "true" }),
|
|
601
601
|
children: C.toUpperCase()
|
|
602
602
|
},
|
|
603
603
|
`lang-${C}`
|
|
604
604
|
)),
|
|
605
|
-
|
|
605
|
+
y > 0 ? /* @__PURE__ */ t(D, { variant: "neutral", children: `+${y}` }) : null,
|
|
606
606
|
M.map((C) => /* @__PURE__ */ t(
|
|
607
607
|
D,
|
|
608
608
|
{
|
|
609
609
|
variant: "info",
|
|
610
|
-
leading: /* @__PURE__ */ t(
|
|
610
|
+
leading: /* @__PURE__ */ t(Me, { "aria-hidden": "true" }),
|
|
611
611
|
children: C
|
|
612
612
|
},
|
|
613
613
|
`ins-${C}`
|
|
614
614
|
)),
|
|
615
615
|
z > 0 ? /* @__PURE__ */ t(D, { variant: "neutral", children: `+${z}` }) : null,
|
|
616
|
-
|
|
616
|
+
b ? /* @__PURE__ */ t(D, { variant: "info", leading: /* @__PURE__ */ t(Se, { "aria-hidden": "true" }), children: p("practiceResults.fearPatient.label") }) : null
|
|
617
617
|
] }) : null,
|
|
618
|
-
e.nextAvailableSlot && u ? /* @__PURE__ */
|
|
619
|
-
/* @__PURE__ */
|
|
618
|
+
e.nextAvailableSlot && u ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
619
|
+
/* @__PURE__ */ f("span", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
620
620
|
/* @__PURE__ */ t(
|
|
621
|
-
|
|
621
|
+
Ne,
|
|
622
622
|
{
|
|
623
623
|
"aria-hidden": "true",
|
|
624
624
|
className: "ds:size-4 ds:text-[var(--primary)]"
|
|
625
625
|
}
|
|
626
626
|
),
|
|
627
|
-
|
|
627
|
+
p("practiceResults.nextSlot.summary", { time: u })
|
|
628
628
|
] }),
|
|
629
629
|
/* @__PURE__ */ t(
|
|
630
630
|
q,
|
|
@@ -640,7 +640,7 @@ function gt({
|
|
|
640
640
|
{
|
|
641
641
|
href: e.nextAvailableSlot.bookingHref,
|
|
642
642
|
"data-component": "practice-result-next-slot-cta",
|
|
643
|
-
children:
|
|
643
|
+
children: p("practiceResults.nextSlot.cta", { time: u })
|
|
644
644
|
}
|
|
645
645
|
)
|
|
646
646
|
}
|
|
@@ -665,7 +665,7 @@ function gt({
|
|
|
665
665
|
)
|
|
666
666
|
);
|
|
667
667
|
}
|
|
668
|
-
function
|
|
668
|
+
function xt({
|
|
669
669
|
result: e,
|
|
670
670
|
apiKey: n,
|
|
671
671
|
highlighted: s,
|
|
@@ -674,8 +674,8 @@ function vt({
|
|
|
674
674
|
onHover: a,
|
|
675
675
|
openLabel: d
|
|
676
676
|
}) {
|
|
677
|
-
var r,
|
|
678
|
-
const { t: u, i18n: c } =
|
|
677
|
+
var r, b, N, S;
|
|
678
|
+
const { t: u, i18n: c } = k(), g = H(() => {
|
|
679
679
|
if (e.nextAvailableSlot)
|
|
680
680
|
try {
|
|
681
681
|
return new Intl.DateTimeFormat(c.language, {
|
|
@@ -686,10 +686,10 @@ function vt({
|
|
|
686
686
|
} catch {
|
|
687
687
|
return e.nextAvailableSlot.dateTime;
|
|
688
688
|
}
|
|
689
|
-
}, [e.nextAvailableSlot, c.language]), l = (((r = e.languages) == null ? void 0 : r.length) ?? 0) > 0,
|
|
689
|
+
}, [e.nextAvailableSlot, c.language]), l = (((r = e.languages) == null ? void 0 : r.length) ?? 0) > 0, p = (((b = e.insurances) == null ? void 0 : b.length) ?? 0) > 0, m = e.specializedInFearPatients, x = l || p || m, h = (N = e.location) == null ? void 0 : N.distanceKm;
|
|
690
690
|
return (
|
|
691
691
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events -- card is role="group" by design (axe nested-interactive); click handler is mouse-only sync.
|
|
692
|
-
/* @__PURE__ */
|
|
692
|
+
/* @__PURE__ */ f(
|
|
693
693
|
"div",
|
|
694
694
|
{
|
|
695
695
|
"data-component": "practice-result-card",
|
|
@@ -701,10 +701,10 @@ function vt({
|
|
|
701
701
|
onClick: o,
|
|
702
702
|
onMouseEnter: a,
|
|
703
703
|
onFocus: a,
|
|
704
|
-
className:
|
|
704
|
+
className: Ie({ density: "rich" }),
|
|
705
705
|
children: [
|
|
706
706
|
e.location ? /* @__PURE__ */ t(
|
|
707
|
-
|
|
707
|
+
gt,
|
|
708
708
|
{
|
|
709
709
|
apiKey: n,
|
|
710
710
|
center: {
|
|
@@ -714,11 +714,11 @@ function vt({
|
|
|
714
714
|
address: e.location.address
|
|
715
715
|
}
|
|
716
716
|
) : null,
|
|
717
|
-
/* @__PURE__ */
|
|
718
|
-
/* @__PURE__ */
|
|
719
|
-
/* @__PURE__ */ t(
|
|
720
|
-
/* @__PURE__ */
|
|
721
|
-
/* @__PURE__ */
|
|
717
|
+
/* @__PURE__ */ f("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
718
|
+
/* @__PURE__ */ f("div", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-md)]", children: [
|
|
719
|
+
/* @__PURE__ */ t(we, { src: e.imageUrl, name: e.name, size: "md" }),
|
|
720
|
+
/* @__PURE__ */ f("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
721
|
+
/* @__PURE__ */ f("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
722
722
|
/* @__PURE__ */ t(
|
|
723
723
|
"span",
|
|
724
724
|
{
|
|
@@ -727,10 +727,10 @@ function vt({
|
|
|
727
727
|
children: e.name
|
|
728
728
|
}
|
|
729
729
|
),
|
|
730
|
-
|
|
730
|
+
h != null ? /* @__PURE__ */ t(ze, { distanceKm: h }) : null
|
|
731
731
|
] }),
|
|
732
732
|
e.subtitle ? /* @__PURE__ */ t("span", { className: "type-body-sm ds:text-[var(--muted-foreground)]", children: e.subtitle }) : null,
|
|
733
|
-
(S = e.location) != null && S.address ? /* @__PURE__ */
|
|
733
|
+
(S = e.location) != null && S.address ? /* @__PURE__ */ f("span", { className: "type-meta ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
734
734
|
/* @__PURE__ */ t(
|
|
735
735
|
ne,
|
|
736
736
|
{
|
|
@@ -750,31 +750,31 @@ function vt({
|
|
|
750
750
|
}
|
|
751
751
|
) : null
|
|
752
752
|
] }),
|
|
753
|
-
|
|
754
|
-
l ? (e.languages ?? []).map((
|
|
753
|
+
x ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
754
|
+
l ? (e.languages ?? []).map((y) => /* @__PURE__ */ t(
|
|
755
755
|
D,
|
|
756
756
|
{
|
|
757
757
|
variant: "neutral",
|
|
758
|
-
leading: /* @__PURE__ */ t(
|
|
759
|
-
children:
|
|
758
|
+
leading: /* @__PURE__ */ t(Pe, { "aria-hidden": "true" }),
|
|
759
|
+
children: y.toUpperCase()
|
|
760
760
|
},
|
|
761
|
-
`lang-${
|
|
761
|
+
`lang-${y}`
|
|
762
762
|
)) : null,
|
|
763
|
-
|
|
763
|
+
p ? (e.insurances ?? []).map((y) => /* @__PURE__ */ t(
|
|
764
764
|
D,
|
|
765
765
|
{
|
|
766
766
|
variant: "info",
|
|
767
|
-
leading: /* @__PURE__ */ t(
|
|
768
|
-
children:
|
|
767
|
+
leading: /* @__PURE__ */ t(Me, { "aria-hidden": "true" }),
|
|
768
|
+
children: y
|
|
769
769
|
},
|
|
770
|
-
`ins-${
|
|
770
|
+
`ins-${y}`
|
|
771
771
|
)) : null,
|
|
772
|
-
m ? /* @__PURE__ */ t(D, { variant: "info", leading: /* @__PURE__ */ t(
|
|
772
|
+
m ? /* @__PURE__ */ t(D, { variant: "info", leading: /* @__PURE__ */ t(Se, { "aria-hidden": "true" }), children: u("practiceResults.fearPatient.label") }) : null
|
|
773
773
|
] }) : null,
|
|
774
|
-
e.nextAvailableSlot && g ? /* @__PURE__ */
|
|
775
|
-
/* @__PURE__ */
|
|
774
|
+
e.nextAvailableSlot && g ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
775
|
+
/* @__PURE__ */ f("span", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
776
776
|
/* @__PURE__ */ t(
|
|
777
|
-
|
|
777
|
+
Ne,
|
|
778
778
|
{
|
|
779
779
|
"aria-hidden": "true",
|
|
780
780
|
className: "ds:size-4 ds:text-[var(--primary)]"
|
|
@@ -788,8 +788,8 @@ function vt({
|
|
|
788
788
|
intent: "primary",
|
|
789
789
|
size: "sm",
|
|
790
790
|
asChild: !0,
|
|
791
|
-
onClick: (
|
|
792
|
-
|
|
791
|
+
onClick: (y) => {
|
|
792
|
+
y.stopPropagation();
|
|
793
793
|
},
|
|
794
794
|
children: /* @__PURE__ */ t(
|
|
795
795
|
"a",
|
|
@@ -808,8 +808,8 @@ function vt({
|
|
|
808
808
|
intent: "secondary",
|
|
809
809
|
size: "sm",
|
|
810
810
|
asChild: !0,
|
|
811
|
-
onClick: (
|
|
812
|
-
|
|
811
|
+
onClick: (y) => {
|
|
812
|
+
y.stopPropagation(), i();
|
|
813
813
|
},
|
|
814
814
|
children: /* @__PURE__ */ t("a", { href: e.href, "data-component": "practice-result-open-cta", children: d })
|
|
815
815
|
}
|
|
@@ -832,15 +832,15 @@ function pe({
|
|
|
832
832
|
loadingMore: c,
|
|
833
833
|
loadingSkeletons: g,
|
|
834
834
|
density: l = "compact",
|
|
835
|
-
apiKey:
|
|
835
|
+
apiKey: p,
|
|
836
836
|
containerRef: m
|
|
837
837
|
}) {
|
|
838
|
-
const { t:
|
|
839
|
-
return
|
|
838
|
+
const { t: x } = k(), h = A(null);
|
|
839
|
+
return Q(() => {
|
|
840
840
|
if (!u) return;
|
|
841
|
-
const r =
|
|
841
|
+
const r = h.current;
|
|
842
842
|
if (!r || typeof IntersectionObserver > "u") return;
|
|
843
|
-
const
|
|
843
|
+
const b = new IntersectionObserver(
|
|
844
844
|
(N) => {
|
|
845
845
|
for (const S of N)
|
|
846
846
|
S.isIntersecting && ($("serp_load_more", {
|
|
@@ -849,37 +849,37 @@ function pe({
|
|
|
849
849
|
},
|
|
850
850
|
{ root: null, rootMargin: "200px" }
|
|
851
851
|
);
|
|
852
|
-
return
|
|
852
|
+
return b.observe(r), () => b.disconnect();
|
|
853
853
|
}, [u, e.length]), g ? /* @__PURE__ */ t(
|
|
854
854
|
"div",
|
|
855
855
|
{
|
|
856
856
|
role: "status",
|
|
857
857
|
"aria-live": "polite",
|
|
858
|
-
"aria-label":
|
|
858
|
+
"aria-label": x("practiceResults.loading"),
|
|
859
859
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
860
|
-
children: Array.from({ length: 4 }).map((r,
|
|
861
|
-
|
|
860
|
+
children: Array.from({ length: 4 }).map((r, b) => /* @__PURE__ */ t(
|
|
861
|
+
Je,
|
|
862
862
|
{
|
|
863
863
|
variant: "rounded",
|
|
864
864
|
height: l === "rich" ? "11rem" : "7rem"
|
|
865
865
|
},
|
|
866
|
-
`pr-skel-${
|
|
866
|
+
`pr-skel-${b}`
|
|
867
867
|
))
|
|
868
868
|
}
|
|
869
|
-
) : /* @__PURE__ */
|
|
869
|
+
) : /* @__PURE__ */ f(
|
|
870
870
|
"div",
|
|
871
871
|
{
|
|
872
872
|
ref: m,
|
|
873
873
|
"data-component": "practice-results-list",
|
|
874
874
|
role: "list",
|
|
875
|
-
"aria-label":
|
|
875
|
+
"aria-label": x("practiceResults.list.label"),
|
|
876
876
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:overflow-y-auto",
|
|
877
877
|
children: [
|
|
878
878
|
e.map((r) => /* @__PURE__ */ t("div", { role: "listitem", children: l === "rich" ? /* @__PURE__ */ t(
|
|
879
|
-
|
|
879
|
+
xt,
|
|
880
880
|
{
|
|
881
881
|
result: r,
|
|
882
|
-
apiKey:
|
|
882
|
+
apiKey: p,
|
|
883
883
|
highlighted: n === r.id,
|
|
884
884
|
onSelect: () => o(r.id),
|
|
885
885
|
onOpenClick: () => i(r.id),
|
|
@@ -887,7 +887,7 @@ function pe({
|
|
|
887
887
|
openLabel: a
|
|
888
888
|
}
|
|
889
889
|
) : /* @__PURE__ */ t(
|
|
890
|
-
|
|
890
|
+
vt,
|
|
891
891
|
{
|
|
892
892
|
result: r,
|
|
893
893
|
highlighted: n === r.id,
|
|
@@ -901,10 +901,10 @@ function pe({
|
|
|
901
901
|
u ? /* @__PURE__ */ t(
|
|
902
902
|
"div",
|
|
903
903
|
{
|
|
904
|
-
ref:
|
|
904
|
+
ref: h,
|
|
905
905
|
"aria-hidden": "true",
|
|
906
906
|
className: "ds:flex ds:items-center ds:justify-center ds:py-[var(--spacing-md)]",
|
|
907
|
-
children: c ? /* @__PURE__ */ t(
|
|
907
|
+
children: c ? /* @__PURE__ */ t(We, { size: "md", variant: "pulse" }) : /* @__PURE__ */ t("span", { className: "ds:size-1" })
|
|
908
908
|
}
|
|
909
909
|
) : null
|
|
910
910
|
]
|
|
@@ -923,9 +923,9 @@ function ue({
|
|
|
923
923
|
onBoundsChange: c,
|
|
924
924
|
consentGranted: g,
|
|
925
925
|
onConsentRequest: l,
|
|
926
|
-
mapHandleRef:
|
|
926
|
+
mapHandleRef: p
|
|
927
927
|
}) {
|
|
928
|
-
const { t: m } =
|
|
928
|
+
const { t: m } = k(), x = H(
|
|
929
929
|
() => e.filter(
|
|
930
930
|
(r) => !!r.location
|
|
931
931
|
).map((r) => ({
|
|
@@ -937,17 +937,17 @@ function ue({
|
|
|
937
937
|
label: r.name
|
|
938
938
|
})),
|
|
939
939
|
[e]
|
|
940
|
-
),
|
|
940
|
+
), h = H(() => {
|
|
941
941
|
if (n) return n;
|
|
942
|
-
const r =
|
|
942
|
+
const r = ye(e);
|
|
943
943
|
return r ? {
|
|
944
944
|
lat: (r.north + r.south) / 2,
|
|
945
945
|
lng: (r.east + r.west) / 2
|
|
946
946
|
} : { lat: 45.4642, lng: 9.19 };
|
|
947
947
|
}, [e, n]);
|
|
948
|
-
return
|
|
948
|
+
return Q(() => {
|
|
949
949
|
if (!c) return;
|
|
950
|
-
const r =
|
|
950
|
+
const r = ye(e);
|
|
951
951
|
r && (c(r), $("serp_map_panned", { bounds: r }));
|
|
952
952
|
}, [e, c]), /* @__PURE__ */ t(
|
|
953
953
|
"div",
|
|
@@ -955,13 +955,13 @@ function ue({
|
|
|
955
955
|
"data-component": "practice-results-map-panel",
|
|
956
956
|
className: "ds:relative ds:flex ds:size-full ds:min-h-[24rem] ds:flex-col",
|
|
957
957
|
children: /* @__PURE__ */ t(
|
|
958
|
-
|
|
958
|
+
Qe,
|
|
959
959
|
{
|
|
960
|
-
ref:
|
|
960
|
+
ref: p,
|
|
961
961
|
apiKey: o ?? "",
|
|
962
|
-
center:
|
|
962
|
+
center: h,
|
|
963
963
|
zoom: s,
|
|
964
|
-
markers:
|
|
964
|
+
markers: x,
|
|
965
965
|
selectedMarkerId: i,
|
|
966
966
|
consentGranted: !!g,
|
|
967
967
|
onConsentRequest: l,
|
|
@@ -977,13 +977,13 @@ function ue({
|
|
|
977
977
|
}
|
|
978
978
|
);
|
|
979
979
|
}
|
|
980
|
-
function
|
|
980
|
+
function Te({
|
|
981
981
|
variantBodyProps: e
|
|
982
982
|
}) {
|
|
983
983
|
const { facets: n, value: s, onChange: o, heading: i, intro: a, totalCount: d, searchCentre: u } = e;
|
|
984
|
-
return /* @__PURE__ */
|
|
984
|
+
return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
985
985
|
/* @__PURE__ */ t(
|
|
986
|
-
|
|
986
|
+
Ae,
|
|
987
987
|
{
|
|
988
988
|
heading: i,
|
|
989
989
|
intro: a,
|
|
@@ -991,9 +991,9 @@ function Ie({
|
|
|
991
991
|
searchCentreLabel: u == null ? void 0 : u.label
|
|
992
992
|
}
|
|
993
993
|
),
|
|
994
|
-
n.length > 0 ? /* @__PURE__ */
|
|
994
|
+
n.length > 0 ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
995
995
|
/* @__PURE__ */ t(
|
|
996
|
-
|
|
996
|
+
_e,
|
|
997
997
|
{
|
|
998
998
|
facets: n,
|
|
999
999
|
value: s.facets,
|
|
@@ -1017,9 +1017,9 @@ function Ie({
|
|
|
1017
1017
|
] });
|
|
1018
1018
|
}
|
|
1019
1019
|
function fe() {
|
|
1020
|
-
const { t: e } =
|
|
1020
|
+
const { t: e } = k();
|
|
1021
1021
|
return /* @__PURE__ */ t(
|
|
1022
|
-
|
|
1022
|
+
Ze,
|
|
1023
1023
|
{
|
|
1024
1024
|
variant: "no-results",
|
|
1025
1025
|
title: e("practiceResults.empty.title"),
|
|
@@ -1028,8 +1028,8 @@ function fe() {
|
|
|
1028
1028
|
);
|
|
1029
1029
|
}
|
|
1030
1030
|
function he({ onRetry: e }) {
|
|
1031
|
-
const { t: n } =
|
|
1032
|
-
return /* @__PURE__ */
|
|
1031
|
+
const { t: n } = k();
|
|
1032
|
+
return /* @__PURE__ */ f(Y, { variant: "error", children: [
|
|
1033
1033
|
/* @__PURE__ */ t(Y.Title, { as: "h3", children: n("practiceResults.error.title") }),
|
|
1034
1034
|
/* @__PURE__ */ t(Y.Description, { children: n("practiceResults.error.description") }),
|
|
1035
1035
|
e ? /* @__PURE__ */ t(Y.Action, { children: /* @__PURE__ */ t(
|
|
@@ -1037,14 +1037,14 @@ function he({ onRetry: e }) {
|
|
|
1037
1037
|
{
|
|
1038
1038
|
intent: "secondary",
|
|
1039
1039
|
size: "sm",
|
|
1040
|
-
startIcon: /* @__PURE__ */ t(
|
|
1040
|
+
startIcon: /* @__PURE__ */ t(et, { "aria-hidden": "true" }),
|
|
1041
1041
|
onClick: e,
|
|
1042
1042
|
children: n("practiceResults.error.retry")
|
|
1043
1043
|
}
|
|
1044
1044
|
) }) : null
|
|
1045
1045
|
] });
|
|
1046
1046
|
}
|
|
1047
|
-
function
|
|
1047
|
+
function bt(e) {
|
|
1048
1048
|
const {
|
|
1049
1049
|
results: n,
|
|
1050
1050
|
apiKey: s,
|
|
@@ -1056,20 +1056,20 @@ function xt(e) {
|
|
|
1056
1056
|
emptyResultsSlot: c,
|
|
1057
1057
|
errorSlot: g,
|
|
1058
1058
|
error: l,
|
|
1059
|
-
onRetry:
|
|
1059
|
+
onRetry: p,
|
|
1060
1060
|
highlightedId: m,
|
|
1061
|
-
onCardHover:
|
|
1062
|
-
onPinClick:
|
|
1061
|
+
onCardHover: x,
|
|
1062
|
+
onPinClick: h,
|
|
1063
1063
|
consentGranted: r,
|
|
1064
|
-
onConsentRequest:
|
|
1064
|
+
onConsentRequest: b,
|
|
1065
1065
|
onBoundsChange: N,
|
|
1066
1066
|
listContainerRef: S
|
|
1067
|
-
} = e, { t:
|
|
1067
|
+
} = e, { t: y } = k(), [M, z] = me(!1), I = l ? g ?? /* @__PURE__ */ t(he, { onRetry: p }) : n.length === 0 && !u ? c ?? /* @__PURE__ */ t(fe, {}) : /* @__PURE__ */ t(
|
|
1068
1068
|
pe,
|
|
1069
1069
|
{
|
|
1070
1070
|
results: n,
|
|
1071
1071
|
highlightedId: m,
|
|
1072
|
-
onCardHover:
|
|
1072
|
+
onCardHover: x,
|
|
1073
1073
|
onCardSelect: e.onCardSelect,
|
|
1074
1074
|
onCardOpenClick: e.onCardOpenClick,
|
|
1075
1075
|
openLabel: e.openLabel,
|
|
@@ -1081,10 +1081,10 @@ function xt(e) {
|
|
|
1081
1081
|
containerRef: S
|
|
1082
1082
|
}
|
|
1083
1083
|
);
|
|
1084
|
-
return /* @__PURE__ */
|
|
1085
|
-
/* @__PURE__ */ t(
|
|
1086
|
-
/* @__PURE__ */
|
|
1087
|
-
/* @__PURE__ */ t("div", { className: "ds:min-w-0 ds:lg:max-h-[40rem] ds:lg:overflow-
|
|
1084
|
+
return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1085
|
+
/* @__PURE__ */ t(Te, { variantBodyProps: e }),
|
|
1086
|
+
/* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:lg:grid ds:lg:grid-cols-[55%_45%] ds:lg:gap-[var(--spacing-lg)] ds:lg:items-start", children: [
|
|
1087
|
+
/* @__PURE__ */ t("div", { className: "ds:min-w-0 ds:lg:max-h-[40rem] ds:lg:overflow-y-auto", children: I }),
|
|
1088
1088
|
/* @__PURE__ */ t("div", { className: "ds:hidden ds:lg:block ds:sticky ds:top-[var(--spacing-md)] ds:h-[40rem]", children: /* @__PURE__ */ t(
|
|
1089
1089
|
ue,
|
|
1090
1090
|
{
|
|
@@ -1094,13 +1094,13 @@ function xt(e) {
|
|
|
1094
1094
|
apiKey: s,
|
|
1095
1095
|
highlightedId: m,
|
|
1096
1096
|
onPinClick: (P) => {
|
|
1097
|
-
|
|
1097
|
+
J(n, P, "pin", e.onResultSelect), h(P);
|
|
1098
1098
|
},
|
|
1099
|
-
onPinHover:
|
|
1099
|
+
onPinHover: x,
|
|
1100
1100
|
onPinFirstInteract: e.onPinFirstInteract,
|
|
1101
1101
|
onBoundsChange: N,
|
|
1102
1102
|
consentGranted: r,
|
|
1103
|
-
onConsentRequest:
|
|
1103
|
+
onConsentRequest: b,
|
|
1104
1104
|
mapHandleRef: e.mapHandleRef
|
|
1105
1105
|
}
|
|
1106
1106
|
) })
|
|
@@ -1110,16 +1110,16 @@ function xt(e) {
|
|
|
1110
1110
|
{
|
|
1111
1111
|
intent: "primary",
|
|
1112
1112
|
size: "md",
|
|
1113
|
-
startIcon: /* @__PURE__ */ t(
|
|
1113
|
+
startIcon: /* @__PURE__ */ t(st, { "aria-hidden": "true" }),
|
|
1114
1114
|
onClick: () => z(!0),
|
|
1115
|
-
children:
|
|
1115
|
+
children: y("practiceResults.viewMap")
|
|
1116
1116
|
}
|
|
1117
1117
|
) }),
|
|
1118
|
-
/* @__PURE__ */ t(_.Root, { open: M, onOpenChange: z, children: /* @__PURE__ */
|
|
1119
|
-
/* @__PURE__ */ t(_.Header, { children: /* @__PURE__ */ t(_.Title, { children:
|
|
1120
|
-
/* @__PURE__ */
|
|
1121
|
-
/* @__PURE__ */ t(_.Description, { className: "ds:sr-only", children:
|
|
1122
|
-
/* @__PURE__ */
|
|
1118
|
+
/* @__PURE__ */ t(_.Root, { open: M, onOpenChange: z, children: /* @__PURE__ */ f(_.Content, { side: "bottom", size: "lg", children: [
|
|
1119
|
+
/* @__PURE__ */ t(_.Header, { children: /* @__PURE__ */ t(_.Title, { children: y("practiceResults.map.label") }) }),
|
|
1120
|
+
/* @__PURE__ */ f(_.Body, { children: [
|
|
1121
|
+
/* @__PURE__ */ t(_.Description, { className: "ds:sr-only", children: y("practiceResults.sheet.description") }),
|
|
1122
|
+
/* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1123
1123
|
/* @__PURE__ */ t("div", { className: "ds:h-[20rem]", children: /* @__PURE__ */ t(
|
|
1124
1124
|
ue,
|
|
1125
1125
|
{
|
|
@@ -1129,13 +1129,13 @@ function xt(e) {
|
|
|
1129
1129
|
apiKey: s,
|
|
1130
1130
|
highlightedId: m,
|
|
1131
1131
|
onPinClick: (P) => {
|
|
1132
|
-
|
|
1132
|
+
J(n, P, "pin", e.onResultSelect), h(P);
|
|
1133
1133
|
},
|
|
1134
|
-
onPinHover:
|
|
1134
|
+
onPinHover: x,
|
|
1135
1135
|
onPinFirstInteract: e.onPinFirstInteract,
|
|
1136
1136
|
onBoundsChange: N,
|
|
1137
1137
|
consentGranted: r,
|
|
1138
|
-
onConsentRequest:
|
|
1138
|
+
onConsentRequest: b,
|
|
1139
1139
|
mapHandleRef: e.mapHandleRef
|
|
1140
1140
|
}
|
|
1141
1141
|
) }),
|
|
@@ -1145,7 +1145,7 @@ function xt(e) {
|
|
|
1145
1145
|
] }) })
|
|
1146
1146
|
] });
|
|
1147
1147
|
}
|
|
1148
|
-
const
|
|
1148
|
+
const yt = {
|
|
1149
1149
|
peek: "sm",
|
|
1150
1150
|
half: "md",
|
|
1151
1151
|
full: "lg"
|
|
@@ -1154,35 +1154,35 @@ const bt = {
|
|
|
1154
1154
|
"half",
|
|
1155
1155
|
"full"
|
|
1156
1156
|
];
|
|
1157
|
-
function
|
|
1158
|
-
const { t: s, i18n: o } =
|
|
1157
|
+
function Rt({ value: e, onChange: n }) {
|
|
1158
|
+
const { t: s, i18n: o } = k(), i = o.dir() === "rtl", a = A(
|
|
1159
1159
|
/* @__PURE__ */ new Map()
|
|
1160
1160
|
), d = K((c) => {
|
|
1161
1161
|
var g;
|
|
1162
1162
|
(g = a.current.get(c)) == null || g.focus();
|
|
1163
1163
|
}, []), u = K(
|
|
1164
1164
|
(c, g) => {
|
|
1165
|
-
const l = V.indexOf(g),
|
|
1166
|
-
let
|
|
1165
|
+
const l = V.indexOf(g), p = V.length, m = i ? "ArrowLeft" : "ArrowRight", x = i ? "ArrowRight" : "ArrowLeft";
|
|
1166
|
+
let h = null;
|
|
1167
1167
|
switch (c.key) {
|
|
1168
1168
|
case m:
|
|
1169
1169
|
case "ArrowDown":
|
|
1170
|
-
|
|
1170
|
+
h = V[(l + 1) % p];
|
|
1171
1171
|
break;
|
|
1172
|
-
case
|
|
1172
|
+
case x:
|
|
1173
1173
|
case "ArrowUp":
|
|
1174
|
-
|
|
1174
|
+
h = V[(l - 1 + p) % p];
|
|
1175
1175
|
break;
|
|
1176
1176
|
case "Home":
|
|
1177
|
-
|
|
1177
|
+
h = V[0];
|
|
1178
1178
|
break;
|
|
1179
1179
|
case "End":
|
|
1180
|
-
|
|
1180
|
+
h = V[p - 1];
|
|
1181
1181
|
break;
|
|
1182
1182
|
default:
|
|
1183
1183
|
return;
|
|
1184
1184
|
}
|
|
1185
|
-
c.preventDefault(),
|
|
1185
|
+
c.preventDefault(), h && h !== g && n(h), h && d(h);
|
|
1186
1186
|
},
|
|
1187
1187
|
[d, i, n]
|
|
1188
1188
|
);
|
|
@@ -1218,7 +1218,7 @@ function yt({ value: e, onChange: n }) {
|
|
|
1218
1218
|
}
|
|
1219
1219
|
);
|
|
1220
1220
|
}
|
|
1221
|
-
function
|
|
1221
|
+
function wt(e) {
|
|
1222
1222
|
const {
|
|
1223
1223
|
results: n,
|
|
1224
1224
|
apiKey: s,
|
|
@@ -1230,23 +1230,23 @@ function Rt(e) {
|
|
|
1230
1230
|
emptyResultsSlot: c,
|
|
1231
1231
|
errorSlot: g,
|
|
1232
1232
|
error: l,
|
|
1233
|
-
onRetry:
|
|
1233
|
+
onRetry: p,
|
|
1234
1234
|
highlightedId: m,
|
|
1235
|
-
onCardHover:
|
|
1236
|
-
onPinClick:
|
|
1235
|
+
onCardHover: x,
|
|
1236
|
+
onPinClick: h,
|
|
1237
1237
|
consentGranted: r,
|
|
1238
|
-
onConsentRequest:
|
|
1238
|
+
onConsentRequest: b,
|
|
1239
1239
|
onBoundsChange: N,
|
|
1240
1240
|
listContainerRef: S,
|
|
1241
|
-
facets:
|
|
1241
|
+
facets: y,
|
|
1242
1242
|
value: M,
|
|
1243
1243
|
onChange: z
|
|
1244
|
-
} = e, { t: I } =
|
|
1244
|
+
} = e, { t: I } = k(), [P, E] = me("half"), U = yt[P], O = Xe("(min-width: 1024px)"), j = l ? g ?? /* @__PURE__ */ t(he, { onRetry: p }) : n.length === 0 && !u ? c ?? /* @__PURE__ */ t(fe, {}) : /* @__PURE__ */ t(
|
|
1245
1245
|
pe,
|
|
1246
1246
|
{
|
|
1247
1247
|
results: n,
|
|
1248
1248
|
highlightedId: m,
|
|
1249
|
-
onCardHover:
|
|
1249
|
+
onCardHover: x,
|
|
1250
1250
|
onCardSelect: e.onCardSelect,
|
|
1251
1251
|
onCardOpenClick: e.onCardOpenClick,
|
|
1252
1252
|
openLabel: e.openLabel,
|
|
@@ -1267,27 +1267,27 @@ function Rt(e) {
|
|
|
1267
1267
|
apiKey: s,
|
|
1268
1268
|
highlightedId: m,
|
|
1269
1269
|
onPinClick: (R) => {
|
|
1270
|
-
|
|
1270
|
+
J(n, R, "pin", e.onResultSelect), h(R);
|
|
1271
1271
|
},
|
|
1272
|
-
onPinHover:
|
|
1272
|
+
onPinHover: x,
|
|
1273
1273
|
onPinFirstInteract: e.onPinFirstInteract,
|
|
1274
1274
|
onBoundsChange: N,
|
|
1275
1275
|
consentGranted: r,
|
|
1276
|
-
onConsentRequest:
|
|
1276
|
+
onConsentRequest: b,
|
|
1277
1277
|
mapHandleRef: e.mapHandleRef
|
|
1278
1278
|
}
|
|
1279
|
-
),
|
|
1280
|
-
|
|
1279
|
+
), W = y.length > 0 ? /* @__PURE__ */ t("div", { className: "ds:absolute ds:start-[var(--spacing-md)] ds:top-[var(--spacing-md)] ds:max-w-[calc(100%-var(--spacing-lg))]", children: /* @__PURE__ */ t(
|
|
1280
|
+
_e,
|
|
1281
1281
|
{
|
|
1282
|
-
facets:
|
|
1282
|
+
facets: y,
|
|
1283
1283
|
value: M.facets,
|
|
1284
1284
|
onChange: (R) => z({ ...M, facets: R }),
|
|
1285
1285
|
floating: !0
|
|
1286
1286
|
}
|
|
1287
1287
|
) }) : null;
|
|
1288
|
-
return /* @__PURE__ */
|
|
1288
|
+
return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1289
1289
|
/* @__PURE__ */ t(
|
|
1290
|
-
|
|
1290
|
+
Ae,
|
|
1291
1291
|
{
|
|
1292
1292
|
heading: e.heading,
|
|
1293
1293
|
intro: e.intro,
|
|
@@ -1295,43 +1295,54 @@ function Rt(e) {
|
|
|
1295
1295
|
searchCentreLabel: i == null ? void 0 : i.label
|
|
1296
1296
|
}
|
|
1297
1297
|
),
|
|
1298
|
-
|
|
1298
|
+
O ? (
|
|
1299
1299
|
// Desktop: 65/35 map left + scrollable card rail right. NO Sheet
|
|
1300
1300
|
// (the Sheet would portal to body and occlude the desktop
|
|
1301
1301
|
// layout regardless of the parent's `lg:hidden` class).
|
|
1302
|
-
|
|
1303
|
-
|
|
1302
|
+
//
|
|
1303
|
+
// 0.31.4: map + rail cells fill the viewport (`calc(100dvh -
|
|
1304
|
+
// var(--practice-results-chrome, 8rem))`) instead of a fixed
|
|
1305
|
+
// 40rem. Map-first is a viewport-dominant variant — the map
|
|
1306
|
+
// should command the visible canvas, not float as a 640px
|
|
1307
|
+
// block in the middle of the page. Consumers with a different
|
|
1308
|
+
// page chrome height override via the CSS custom property:
|
|
1309
|
+
// .my-page-wrapper { --practice-results-chrome: 4rem; }
|
|
1310
|
+
// The default 8rem approximates a typical sticky header.
|
|
1311
|
+
// `dvh` (dynamic viewport height) plays nice with mobile-
|
|
1312
|
+
// chrome show/hide.
|
|
1313
|
+
/* @__PURE__ */ f("div", { className: "ds:grid ds:grid-cols-[65%_35%] ds:gap-[var(--spacing-lg)] ds:items-start", children: [
|
|
1314
|
+
/* @__PURE__ */ f("div", { className: "ds:relative ds:h-[calc(100dvh-var(--practice-results-chrome,8rem))] ds:min-h-[40rem]", children: [
|
|
1304
1315
|
C,
|
|
1305
|
-
|
|
1316
|
+
W
|
|
1306
1317
|
] }),
|
|
1307
|
-
/* @__PURE__ */ t("div", { className: "ds:min-w-0 ds:
|
|
1318
|
+
/* @__PURE__ */ t("div", { className: "ds:min-w-0 ds:h-[calc(100dvh-var(--practice-results-chrome,8rem))] ds:min-h-[40rem] ds:overflow-y-auto", children: j })
|
|
1308
1319
|
] })
|
|
1309
1320
|
) : (
|
|
1310
1321
|
// Mobile: full-bleed map + persistent bottom sheet defaulting to
|
|
1311
1322
|
// 'half' state. No X close button — the sheet is core to the
|
|
1312
1323
|
// layout, not dismissible. Patient cycles peek / half / full
|
|
1313
1324
|
// via the snap radiogroup at the top of the sheet body.
|
|
1314
|
-
/* @__PURE__ */
|
|
1315
|
-
/* @__PURE__ */
|
|
1325
|
+
/* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1326
|
+
/* @__PURE__ */ f("div", { className: "ds:relative ds:h-[60vh] ds:min-h-[20rem]", children: [
|
|
1316
1327
|
C,
|
|
1317
|
-
|
|
1328
|
+
W
|
|
1318
1329
|
] }),
|
|
1319
1330
|
/* @__PURE__ */ t(_.Root, { open: !0, children: /* @__PURE__ */ t(
|
|
1320
1331
|
_.Content,
|
|
1321
1332
|
{
|
|
1322
1333
|
side: "bottom",
|
|
1323
|
-
size:
|
|
1334
|
+
size: U,
|
|
1324
1335
|
onEscapeKeyDown: (R) => R.preventDefault(),
|
|
1325
1336
|
onPointerDownOutside: (R) => R.preventDefault(),
|
|
1326
1337
|
onInteractOutside: (R) => R.preventDefault(),
|
|
1327
|
-
children: /* @__PURE__ */
|
|
1338
|
+
children: /* @__PURE__ */ f(_.Body, { children: [
|
|
1328
1339
|
/* @__PURE__ */ t(_.Description, { className: "ds:sr-only", children: I("practiceResults.sheet.descriptionMapFirst") }),
|
|
1329
|
-
/* @__PURE__ */
|
|
1340
|
+
/* @__PURE__ */ f("div", { className: "ds:flex ds:items-start ds:justify-between ds:gap-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]", children: [
|
|
1330
1341
|
/* @__PURE__ */ t(_.Title, { className: "type-title-card ds:m-0 ds:text-[var(--foreground)]", children: I("practiceResults.sheet.title", {
|
|
1331
1342
|
count: e.totalCount ?? n.length
|
|
1332
1343
|
}) }),
|
|
1333
1344
|
/* @__PURE__ */ t(
|
|
1334
|
-
|
|
1345
|
+
Rt,
|
|
1335
1346
|
{
|
|
1336
1347
|
value: P,
|
|
1337
1348
|
onChange: E
|
|
@@ -1365,14 +1376,14 @@ function kt(e) {
|
|
|
1365
1376
|
error: c,
|
|
1366
1377
|
onRetry: g,
|
|
1367
1378
|
highlightedId: l,
|
|
1368
|
-
onCardHover:
|
|
1379
|
+
onCardHover: p,
|
|
1369
1380
|
listContainerRef: m
|
|
1370
|
-
} = e,
|
|
1381
|
+
} = e, x = c ? u ?? /* @__PURE__ */ t(he, { onRetry: g }) : n.length === 0 && !a ? d ?? /* @__PURE__ */ t(fe, {}) : /* @__PURE__ */ t(
|
|
1371
1382
|
pe,
|
|
1372
1383
|
{
|
|
1373
1384
|
results: n,
|
|
1374
1385
|
highlightedId: l,
|
|
1375
|
-
onCardHover:
|
|
1386
|
+
onCardHover: p,
|
|
1376
1387
|
onCardSelect: e.onCardSelect,
|
|
1377
1388
|
onCardOpenClick: e.onCardOpenClick,
|
|
1378
1389
|
openLabel: e.openLabel,
|
|
@@ -1385,63 +1396,64 @@ function kt(e) {
|
|
|
1385
1396
|
containerRef: m
|
|
1386
1397
|
}
|
|
1387
1398
|
);
|
|
1388
|
-
return /* @__PURE__ */
|
|
1389
|
-
/* @__PURE__ */ t(
|
|
1390
|
-
|
|
1399
|
+
return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1400
|
+
/* @__PURE__ */ t(Te, { variantBodyProps: e }),
|
|
1401
|
+
x
|
|
1391
1402
|
] });
|
|
1392
1403
|
}
|
|
1393
|
-
const
|
|
1404
|
+
const Ct = qe(function({
|
|
1394
1405
|
variant: n = "split-list-map",
|
|
1395
1406
|
results: s,
|
|
1396
1407
|
totalCount: o,
|
|
1397
1408
|
searchCentre: i,
|
|
1398
1409
|
facets: a,
|
|
1399
1410
|
googleMapsApiKey: d,
|
|
1400
|
-
defaultZoom: u =
|
|
1411
|
+
defaultZoom: u = lt,
|
|
1401
1412
|
onBoundsChange: c,
|
|
1402
1413
|
consentGranted: g,
|
|
1403
1414
|
onConsentRequest: l,
|
|
1404
|
-
|
|
1405
|
-
|
|
1415
|
+
skipConsentGate: p = !1,
|
|
1416
|
+
onLoadMore: m,
|
|
1417
|
+
loadingMore: x,
|
|
1406
1418
|
value: h,
|
|
1407
|
-
onChange:
|
|
1408
|
-
onResultSelect:
|
|
1409
|
-
loading:
|
|
1410
|
-
emptyResultsSlot:
|
|
1411
|
-
errorSlot:
|
|
1412
|
-
error:
|
|
1413
|
-
onRetry:
|
|
1414
|
-
heading:
|
|
1415
|
-
intro:
|
|
1416
|
-
cardOpenButtonLabel:
|
|
1417
|
-
"aria-label":
|
|
1419
|
+
onChange: r,
|
|
1420
|
+
onResultSelect: b,
|
|
1421
|
+
loading: N,
|
|
1422
|
+
emptyResultsSlot: S,
|
|
1423
|
+
errorSlot: y,
|
|
1424
|
+
error: M,
|
|
1425
|
+
onRetry: z,
|
|
1426
|
+
heading: I,
|
|
1427
|
+
intro: P,
|
|
1428
|
+
cardOpenButtonLabel: E,
|
|
1429
|
+
"aria-label": U,
|
|
1418
1430
|
id: O,
|
|
1419
|
-
className:
|
|
1420
|
-
...
|
|
1421
|
-
},
|
|
1422
|
-
const { t:
|
|
1431
|
+
className: j,
|
|
1432
|
+
...C
|
|
1433
|
+
}, W) {
|
|
1434
|
+
const { t: R, i18n: ge } = k(), [$e, Z] = me(null), X = A(/* @__PURE__ */ new Set()), ae = A(/* @__PURE__ */ new Set()), Fe = A(null), se = A(null), ie = H(
|
|
1423
1435
|
() => ({
|
|
1424
1436
|
getVariant: () => n,
|
|
1425
1437
|
scrollToResult: (v) => {
|
|
1426
1438
|
const T = se.current;
|
|
1427
1439
|
if (!T) return;
|
|
1428
|
-
const
|
|
1440
|
+
const w = T.querySelector(
|
|
1429
1441
|
`[data-component="practice-result-card"][data-result-id="${CSS.escape(v)}"]`
|
|
1430
1442
|
);
|
|
1431
|
-
|
|
1443
|
+
w && (w.scrollIntoView({ behavior: "smooth", block: "nearest" }), Z(v));
|
|
1432
1444
|
},
|
|
1433
1445
|
focusPin: (v) => {
|
|
1434
|
-
|
|
1446
|
+
Z(v);
|
|
1435
1447
|
}
|
|
1436
1448
|
}),
|
|
1437
1449
|
[n]
|
|
1438
1450
|
);
|
|
1439
|
-
|
|
1440
|
-
const
|
|
1451
|
+
Ge(W, () => ie, [ie]), Ye(rt, ie, O);
|
|
1452
|
+
const De = E ?? R("practiceResults.card.open"), He = K(
|
|
1441
1453
|
(v) => {
|
|
1442
1454
|
if (v.nextAvailableSlot)
|
|
1443
1455
|
try {
|
|
1444
|
-
return new Intl.DateTimeFormat(
|
|
1456
|
+
return new Intl.DateTimeFormat(ge.language, {
|
|
1445
1457
|
weekday: "short",
|
|
1446
1458
|
hour: "numeric",
|
|
1447
1459
|
minute: "numeric"
|
|
@@ -1450,133 +1462,138 @@ const wt = Ue(function({
|
|
|
1450
1462
|
return v.nextAvailableSlot.dateTime;
|
|
1451
1463
|
}
|
|
1452
1464
|
},
|
|
1453
|
-
[
|
|
1454
|
-
),
|
|
1455
|
-
|
|
1456
|
-
|
|
1465
|
+
[ge.language]
|
|
1466
|
+
), ve = A(null);
|
|
1467
|
+
Q(() => {
|
|
1468
|
+
ve.current !== n && (ve.current = n, $("serp_variant_exposed", {
|
|
1457
1469
|
variant: n,
|
|
1458
1470
|
totalCount: o ?? s.length
|
|
1459
1471
|
}), X.current = /* @__PURE__ */ new Set(), ae.current = /* @__PURE__ */ new Set());
|
|
1460
1472
|
}, [n]);
|
|
1461
1473
|
const re = A(!1), le = H(() => a ?? [], [a]), oe = h.sort ?? (i ? "distance" : "relevance"), L = H(() => {
|
|
1462
|
-
const v =
|
|
1463
|
-
return
|
|
1474
|
+
const v = dt(s, h.facets, le);
|
|
1475
|
+
return ut(v, oe, i);
|
|
1464
1476
|
}, [s, h.facets, le, oe, i]);
|
|
1465
|
-
|
|
1477
|
+
Q(() => {
|
|
1466
1478
|
const v = L.length === 0;
|
|
1467
1479
|
v && !re.current ? ($("serp_empty_results", {
|
|
1468
1480
|
appliedFacets: h.facets ?? {}
|
|
1469
1481
|
}), re.current = !0) : v || (re.current = !1);
|
|
1470
1482
|
}, [L.length, h.facets]);
|
|
1471
|
-
const B = A(null),
|
|
1472
|
-
|
|
1483
|
+
const B = A(null), xe = A(null);
|
|
1484
|
+
Q(
|
|
1473
1485
|
() => () => {
|
|
1474
1486
|
B.current && clearTimeout(B.current);
|
|
1475
1487
|
},
|
|
1476
1488
|
[]
|
|
1477
1489
|
);
|
|
1478
|
-
const
|
|
1479
|
-
|
|
1490
|
+
const Oe = K((v) => {
|
|
1491
|
+
Z(v), !X.current.has(v) && (xe.current === v && B.current || (B.current && clearTimeout(B.current), xe.current = v, B.current = setTimeout(() => {
|
|
1480
1492
|
X.current.has(v) || (X.current.add(v), $("serp_result_hovered_card", { resultId: v })), B.current = null;
|
|
1481
1493
|
}, 500)));
|
|
1482
|
-
}, []),
|
|
1483
|
-
|
|
1494
|
+
}, []), Le = K((v) => {
|
|
1495
|
+
Z(v);
|
|
1484
1496
|
const T = se.current;
|
|
1485
1497
|
if (!T) return;
|
|
1486
|
-
const
|
|
1498
|
+
const w = T.querySelector(
|
|
1487
1499
|
`[data-component="practice-result-card"][data-result-id="${CSS.escape(v)}"]`
|
|
1488
1500
|
);
|
|
1489
|
-
|
|
1490
|
-
}, []),
|
|
1501
|
+
w == null || w.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
1502
|
+
}, []), Ke = K((v) => {
|
|
1491
1503
|
ae.current.has(v) || (ae.current.add(v), $("serp_result_hovered_pin", { resultId: v }));
|
|
1492
|
-
}, []),
|
|
1504
|
+
}, []), be = A(null), je = K(
|
|
1493
1505
|
(v) => {
|
|
1494
|
-
|
|
1495
|
-
const T = L.find((
|
|
1506
|
+
Z(v);
|
|
1507
|
+
const T = L.find((w) => w.id === v);
|
|
1496
1508
|
if (T) {
|
|
1497
1509
|
if (T.location) {
|
|
1498
|
-
const
|
|
1499
|
-
|
|
1510
|
+
const w = be.current;
|
|
1511
|
+
w == null || w.panTo({
|
|
1500
1512
|
lat: T.location.lat,
|
|
1501
1513
|
lng: T.location.lng
|
|
1502
|
-
}),
|
|
1514
|
+
}), w == null || w.setZoom(16);
|
|
1503
1515
|
}
|
|
1504
|
-
|
|
1516
|
+
J(L, v, "card", b);
|
|
1505
1517
|
}
|
|
1506
1518
|
},
|
|
1507
|
-
[L,
|
|
1508
|
-
),
|
|
1519
|
+
[L, b]
|
|
1520
|
+
), Be = K(
|
|
1509
1521
|
(v) => {
|
|
1510
|
-
|
|
1522
|
+
J(
|
|
1511
1523
|
L,
|
|
1512
1524
|
v,
|
|
1513
1525
|
"open-button",
|
|
1514
|
-
|
|
1526
|
+
b
|
|
1515
1527
|
);
|
|
1516
1528
|
},
|
|
1517
|
-
[L,
|
|
1518
|
-
),
|
|
1529
|
+
[L, b]
|
|
1530
|
+
), Ve = !!N && s.length === 0, ce = {
|
|
1519
1531
|
results: L,
|
|
1520
1532
|
totalCount: o,
|
|
1521
1533
|
searchCentre: i,
|
|
1522
1534
|
facets: le,
|
|
1523
1535
|
value: { ...h, sort: oe },
|
|
1524
|
-
onChange:
|
|
1525
|
-
onResultSelect:
|
|
1526
|
-
onLoadMore:
|
|
1527
|
-
loadingMore:
|
|
1536
|
+
onChange: r,
|
|
1537
|
+
onResultSelect: b,
|
|
1538
|
+
onLoadMore: m,
|
|
1539
|
+
loadingMore: x,
|
|
1528
1540
|
apiKey: d,
|
|
1529
1541
|
zoom: u,
|
|
1530
|
-
|
|
1531
|
-
|
|
1542
|
+
// 0.31.4: when `skipConsentGate` is true the kit synthesises
|
|
1543
|
+
// `consentGranted=true` for every internal MapView; the consumer's
|
|
1544
|
+
// CMP at the page level is responsible for whether the Google Maps
|
|
1545
|
+
// loader script is present at all. `onConsentRequest` is dropped
|
|
1546
|
+
// because no placeholder renders — nothing to fire it from.
|
|
1547
|
+
consentGranted: p ? !0 : g,
|
|
1548
|
+
onConsentRequest: p ? void 0 : l,
|
|
1532
1549
|
onBoundsChange: c,
|
|
1533
|
-
loadingSkeletons:
|
|
1534
|
-
emptyResultsSlot:
|
|
1535
|
-
errorSlot:
|
|
1536
|
-
error:
|
|
1537
|
-
onRetry:
|
|
1538
|
-
heading:
|
|
1539
|
-
intro:
|
|
1540
|
-
highlightedId:
|
|
1541
|
-
onCardHover:
|
|
1542
|
-
onPinClick:
|
|
1543
|
-
onPinFirstInteract:
|
|
1544
|
-
onCardSelect:
|
|
1545
|
-
onCardOpenClick:
|
|
1546
|
-
openLabel:
|
|
1547
|
-
formatNextSlot:
|
|
1548
|
-
listContainerRef:
|
|
1549
|
-
mapHandleRef:
|
|
1550
|
-
},
|
|
1550
|
+
loadingSkeletons: Ve,
|
|
1551
|
+
emptyResultsSlot: S,
|
|
1552
|
+
errorSlot: y,
|
|
1553
|
+
error: M,
|
|
1554
|
+
onRetry: z,
|
|
1555
|
+
heading: I,
|
|
1556
|
+
intro: P,
|
|
1557
|
+
highlightedId: $e,
|
|
1558
|
+
onCardHover: Oe,
|
|
1559
|
+
onPinClick: Le,
|
|
1560
|
+
onPinFirstInteract: Ke,
|
|
1561
|
+
onCardSelect: je,
|
|
1562
|
+
onCardOpenClick: Be,
|
|
1563
|
+
openLabel: De,
|
|
1564
|
+
formatNextSlot: He,
|
|
1565
|
+
listContainerRef: Fe,
|
|
1566
|
+
mapHandleRef: be
|
|
1567
|
+
}, Ee = (() => {
|
|
1551
1568
|
switch (n) {
|
|
1552
1569
|
case "map-first":
|
|
1553
|
-
return /* @__PURE__ */ t(
|
|
1570
|
+
return /* @__PURE__ */ t(wt, { ...ce });
|
|
1554
1571
|
case "rich-cards":
|
|
1555
1572
|
return /* @__PURE__ */ t(kt, { ...ce });
|
|
1556
1573
|
case "split-list-map":
|
|
1557
1574
|
default:
|
|
1558
|
-
return /* @__PURE__ */ t(
|
|
1575
|
+
return /* @__PURE__ */ t(bt, { ...ce });
|
|
1559
1576
|
}
|
|
1560
|
-
})(),
|
|
1577
|
+
})(), Ue = U ?? R("practiceResults.regionLabel");
|
|
1561
1578
|
return /* @__PURE__ */ t(
|
|
1562
1579
|
"div",
|
|
1563
1580
|
{
|
|
1564
1581
|
ref: se,
|
|
1565
1582
|
role: "region",
|
|
1566
|
-
"aria-label":
|
|
1583
|
+
"aria-label": Ue,
|
|
1567
1584
|
id: O,
|
|
1568
1585
|
"data-component": "practice-results",
|
|
1569
1586
|
"data-component-id": O,
|
|
1570
1587
|
"data-variant": n,
|
|
1571
|
-
className:
|
|
1572
|
-
...
|
|
1573
|
-
children:
|
|
1588
|
+
className: mt({ variant: n, className: j }),
|
|
1589
|
+
...C,
|
|
1590
|
+
children: Ee
|
|
1574
1591
|
}
|
|
1575
1592
|
);
|
|
1576
1593
|
});
|
|
1577
|
-
|
|
1594
|
+
Ct.displayName = "PracticeResults";
|
|
1578
1595
|
export {
|
|
1579
|
-
|
|
1580
|
-
|
|
1596
|
+
Ct as P,
|
|
1597
|
+
rt as p
|
|
1581
1598
|
};
|
|
1582
|
-
//# sourceMappingURL=practice-results-
|
|
1599
|
+
//# sourceMappingURL=practice-results-dOlljaAK.js.map
|