@alfadocs/ui-kit-debug 1.121.0 → 1.122.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/addDays-CuE8wLqb.js +9 -0
- package/dist/_chunks/addDays-CuE8wLqb.js.map +1 -0
- package/dist/_chunks/{anamnesis-summary-rows-BbAREK-3.js → anamnesis-summary-rows-CtcULkvc.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-BbAREK-3.js.map → anamnesis-summary-rows-CtcULkvc.js.map} +1 -1
- package/dist/_chunks/{antenatal-schedule-timeline-86YVlMYJ.js → antenatal-schedule-timeline-XHbig8On.js} +3 -3
- package/dist/_chunks/{antenatal-schedule-timeline-86YVlMYJ.js.map → antenatal-schedule-timeline-XHbig8On.js.map} +1 -1
- package/dist/_chunks/{appointment-timeline-CC7nmBOH.js → appointment-timeline-Czd4PBkF.js} +2 -2
- package/dist/_chunks/{appointment-timeline-CC7nmBOH.js.map → appointment-timeline-Czd4PBkF.js.map} +1 -1
- package/dist/_chunks/{balance-badge-cell-DPjab0eJ.js → balance-badge-cell-DtxbGJcA.js} +2 -2
- package/dist/_chunks/{balance-badge-cell-DPjab0eJ.js.map → balance-badge-cell-DtxbGJcA.js.map} +1 -1
- package/dist/_chunks/{bill-line-table-DUMEHnQ4.js → bill-line-table-HrynB7ND.js} +2 -2
- package/dist/_chunks/{bill-line-table-DUMEHnQ4.js.map → bill-line-table-HrynB7ND.js.map} +1 -1
- package/dist/_chunks/{calendar-appointment-editor-dialog-rw02sXGw.js → calendar-appointment-editor-dialog-CiCmsBCH.js} +5 -5
- package/dist/_chunks/{calendar-appointment-editor-dialog-rw02sXGw.js.map → calendar-appointment-editor-dialog-CiCmsBCH.js.map} +1 -1
- package/dist/_chunks/{cycle-calculator-C8nWAeTk.js → cycle-calculator-WFhMfJHt.js} +4 -3
- package/dist/_chunks/{cycle-calculator-C8nWAeTk.js.map → cycle-calculator-WFhMfJHt.js.map} +1 -1
- package/dist/_chunks/{data-grid-Bbf8t4z3.js → data-grid-C71BhGDw.js} +2 -2
- package/dist/_chunks/{data-grid-Bbf8t4z3.js.map → data-grid-C71BhGDw.js.map} +1 -1
- package/dist/_chunks/{date-picker-DBVTj6lO.js → date-picker-BmVBVpVu.js} +3 -3
- package/dist/_chunks/{date-picker-DBVTj6lO.js.map → date-picker-BmVBVpVu.js.map} +1 -1
- package/dist/_chunks/{date-picker-variants-J1EeAhIH.js → date-picker-variants-DmfVRNDB.js} +184 -188
- package/dist/_chunks/date-picker-variants-DmfVRNDB.js.map +1 -0
- package/dist/_chunks/{date-range-panel-CT6nXjRM.js → date-range-panel-CT9Pk-HF.js} +2 -2
- package/dist/_chunks/{date-range-panel-CT6nXjRM.js.map → date-range-panel-CT9Pk-HF.js.map} +1 -1
- package/dist/_chunks/{date-range-picker-PTRpDkXT.js → date-range-picker-2Up_FRrM.js} +40 -39
- package/dist/_chunks/{date-range-picker-PTRpDkXT.js.map → date-range-picker-2Up_FRrM.js.map} +1 -1
- package/dist/_chunks/{date-time-picker-CJnqiQoT.js → date-time-picker-C6b_Vymc.js} +2 -2
- package/dist/_chunks/{date-time-picker-CJnqiQoT.js.map → date-time-picker-C6b_Vymc.js.map} +1 -1
- package/dist/_chunks/{default-tabs-Cxkw1Ws0.js → default-tabs-RvCI5uN0.js} +3 -3
- package/dist/_chunks/{default-tabs-Cxkw1Ws0.js.map → default-tabs-RvCI5uN0.js.map} +1 -1
- package/dist/_chunks/{due-date-calculator-c1NJPw9F.js → due-date-calculator-CALlODZe.js} +4 -4
- package/dist/_chunks/{due-date-calculator-c1NJPw9F.js.map → due-date-calculator-CALlODZe.js.map} +1 -1
- package/dist/_chunks/{gestational-age-calculator-Cg4Gq42R.js → gestational-age-calculator-mB6brTlp.js} +5 -5
- package/dist/_chunks/{gestational-age-calculator-Cg4Gq42R.js.map → gestational-age-calculator-mB6brTlp.js.map} +1 -1
- package/dist/_chunks/{hcg-doubling-BjTa_77t.js → hcg-doubling-Dhdt3Jyd.js} +3 -3
- package/dist/_chunks/{hcg-doubling-BjTa_77t.js.map → hcg-doubling-Dhdt3Jyd.js.map} +1 -1
- package/dist/_chunks/{invoice-upload-list-CsFsRgbt.js → invoice-upload-list-C95s5Q7m.js} +3 -3
- package/dist/_chunks/{invoice-upload-list-CsFsRgbt.js.map → invoice-upload-list-C95s5Q7m.js.map} +1 -1
- package/dist/_chunks/{kit-extensions-C3oL0WTp.js → kit-extensions-DUaIYyMD.js} +4 -4
- package/dist/_chunks/{kit-extensions-C3oL0WTp.js.map → kit-extensions-DUaIYyMD.js.map} +1 -1
- package/dist/_chunks/{link-cell-renderer-NFNGdAGt.js → link-cell-renderer-BEaLczk2.js} +2 -2
- package/dist/_chunks/{link-cell-renderer-NFNGdAGt.js.map → link-cell-renderer-BEaLczk2.js.map} +1 -1
- package/dist/_chunks/{map-view-h6ngp2xi.js → map-view-QWdQLHi9.js} +543 -495
- package/dist/_chunks/map-view-QWdQLHi9.js.map +1 -0
- package/dist/_chunks/{parse-BLBWPIgE.js → parse-BFur8Byx.js} +2 -2
- package/dist/_chunks/{parse-BLBWPIgE.js.map → parse-BFur8Byx.js.map} +1 -1
- package/dist/_chunks/{patient-details-C4dHR4iu.js → patient-details-Cba9HQj_.js} +2 -2
- package/dist/_chunks/{patient-details-C4dHR4iu.js.map → patient-details-Cba9HQj_.js.map} +1 -1
- package/dist/_chunks/{patient-field-row-0QP8KCVp.js → patient-field-row-CtDihADs.js} +2 -2
- package/dist/_chunks/{patient-field-row-0QP8KCVp.js.map → patient-field-row-CtDihADs.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-x0-AhCyC.js → patient-summary-card-DnLdbtsw.js} +2 -2
- package/dist/_chunks/{patient-summary-card-x0-AhCyC.js.map → patient-summary-card-DnLdbtsw.js.map} +1 -1
- package/dist/_chunks/practice-results-BCLqPdgn.js +2683 -0
- package/dist/_chunks/practice-results-BCLqPdgn.js.map +1 -0
- package/dist/_chunks/{pregnancy-dating-BO6diQMZ.js → pregnancy-dating-BNI32qNw.js} +5 -5
- package/dist/_chunks/{pregnancy-dating-BO6diQMZ.js.map → pregnancy-dating-BNI32qNw.js.map} +1 -1
- package/dist/_chunks/{radiograph-panel.agent-Dcv16n7u.js → radiograph-panel.agent-B-r3BoqU.js} +3 -3
- package/dist/_chunks/{radiograph-panel.agent-Dcv16n7u.js.map → radiograph-panel.agent-B-r3BoqU.js.map} +1 -1
- package/dist/_chunks/{reserved.agent-DRSZ8UcL.js → reserved.agent-CCwsOb3M.js} +8 -7
- package/dist/_chunks/{reserved.agent-DRSZ8UcL.js.map → reserved.agent-CCwsOb3M.js.map} +1 -1
- package/dist/_chunks/{send-registration-link-form-DuZQuKnI.js → send-registration-link-form-BjkXr0TD.js} +3 -3
- package/dist/_chunks/{send-registration-link-form-DuZQuKnI.js.map → send-registration-link-form-BjkXr0TD.js.map} +1 -1
- package/dist/_chunks/{slot-grid-b4eZXokb.js → slot-grid-DEZRB4Yb.js} +234 -207
- package/dist/_chunks/slot-grid-DEZRB4Yb.js.map +1 -0
- package/dist/_chunks/subDays-DC99JK7a.js +8 -0
- package/dist/_chunks/{subDays-Bsoy023P.js.map → subDays-DC99JK7a.js.map} +1 -1
- package/dist/_chunks/{task-editor-Czcx9B-3.js → task-editor-C05yx7JJ.js} +2 -2
- package/dist/_chunks/{task-editor-Czcx9B-3.js.map → task-editor-C05yx7JJ.js.map} +1 -1
- package/dist/_chunks/{toolbar-DoKcoE2q.js → toolbar-Dznu_Dou.js} +2 -2
- package/dist/_chunks/{toolbar-DoKcoE2q.js.map → toolbar-Dznu_Dou.js.map} +1 -1
- package/dist/_chunks/{use-appointment-details-read-B-SXnszJ.js → use-appointment-details-read-Bm408XzX.js} +2 -2
- package/dist/_chunks/{use-appointment-details-read-B-SXnszJ.js.map → use-appointment-details-read-Bm408XzX.js.map} +1 -1
- package/dist/agent-catalog.json +3 -3
- package/dist/agent-i18n/en.json +1 -1
- package/dist/browser-support.js +1 -1
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/bill-line-table/index.js +1 -1
- package/dist/components/bill-table/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-grid/index.js +2 -2
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/invoice-upload-list/index.js +1 -1
- package/dist/components/map-view/index.d.ts +1 -1
- package/dist/components/map-view/index.d.ts.map +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/map-view/map-view.d.ts +18 -0
- package/dist/components/map-view/map-view.d.ts.map +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/practice-results/practice-results-slot-card.d.ts +38 -0
- package/dist/components/practice-results/practice-results-slot-card.d.ts.map +1 -0
- package/dist/components/practice-results/practice-results.d.ts +32 -2
- package/dist/components/practice-results/practice-results.d.ts.map +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/slot-grid/slot-grid.d.ts +19 -0
- package/dist/components/slot-grid/slot-grid.d.ts.map +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/core.css +1 -1
- package/dist/host-compat.css +9 -1
- package/dist/i18n/locales/ar.d.ts +5 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +6 -1
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +5 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +6 -1
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +5 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +6 -1
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +5 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +5 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +5 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +6 -1
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +5 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +6 -1
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +5 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +6 -1
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +5 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +6 -1
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +5 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +6 -1
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +5 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +6 -1
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +5 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +6 -1
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +5 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +6 -1
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +5 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +6 -1
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +5 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +6 -1
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +5 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +6 -1
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +5 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +6 -1
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +5 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +6 -1
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +5 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +6 -1
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +30 -30
- package/dist/locales/ar.json +6 -1
- package/dist/locales/de.json +6 -1
- package/dist/locales/el.json +6 -1
- package/dist/locales/en.json +5 -0
- package/dist/locales/es.json +6 -1
- package/dist/locales/fr.json +6 -1
- package/dist/locales/hi.json +6 -1
- package/dist/locales/it.json +6 -1
- package/dist/locales/ja.json +6 -1
- package/dist/locales/nl.json +6 -1
- package/dist/locales/pl.json +6 -1
- package/dist/locales/pt.json +6 -1
- package/dist/locales/ro.json +6 -1
- package/dist/locales/ru.json +6 -1
- package/dist/locales/sq.json +6 -1
- package/dist/locales/sv.json +6 -1
- package/dist/locales/tr.json +6 -1
- package/dist/locales/zh.json +6 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/send-registration-link-form/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/date-picker-variants-J1EeAhIH.js.map +0 -1
- package/dist/_chunks/map-view-h6ngp2xi.js.map +0 -1
- package/dist/_chunks/practice-results-yCresv86.js +0 -2326
- package/dist/_chunks/practice-results-yCresv86.js.map +0 -1
- package/dist/_chunks/slot-grid-b4eZXokb.js.map +0 -1
- package/dist/_chunks/subDays-Bsoy023P.js +0 -8
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as gt, useRef as
|
|
3
|
-
import { createPortal as
|
|
1
|
+
import { jsx as m, jsxs as N, Fragment as ht } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as gt, useRef as k, useMemo as R, useId as Oe, useState as C, useEffect as $, useCallback as D, useImperativeHandle as vt, useContext as Ge, useLayoutEffect as ce, createContext as bt } from "react";
|
|
3
|
+
import { createPortal as je } from "react-dom";
|
|
4
4
|
import { c as J } from "./index-D2ZczOXr.js";
|
|
5
5
|
import { useTranslation as B } from "react-i18next";
|
|
6
|
-
import { M as
|
|
6
|
+
import { M as wt, A as yt, a as kt, b as Mt, u as De, c as W, d as Ze, e as Fe } from "./maps-core-gate-DKx96CC_.js";
|
|
7
7
|
import { B as Ue } from "./button-DohK_Ak_.js";
|
|
8
8
|
import { S as xt } from "./skeleton-tTWJpvAq.js";
|
|
9
9
|
import { V as We } from "./visually-hidden-BHxEUGyT.js";
|
|
10
|
-
import { E as
|
|
11
|
-
import { u as
|
|
12
|
-
import { l as
|
|
13
|
-
import { M as
|
|
10
|
+
import { E as zt } from "./error-boundary-tAn_GuCu.js";
|
|
11
|
+
import { u as Et } from "./registry-DvAUVLHh.js";
|
|
12
|
+
import { l as ge } from "./length-token-DwMnGEYT.js";
|
|
13
|
+
import { M as _t } from "./map-pin-BaY37-Km.js";
|
|
14
14
|
import { E as Be } from "./external-link-CY6zAXXU.js";
|
|
15
15
|
const St = {
|
|
16
16
|
id: "map-view",
|
|
@@ -198,7 +198,7 @@ const St = {
|
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
], $t = (e) => Object.entries(e).map(([t, n]) => `${t}="${n}"`).join(" ");
|
|
201
|
-
function
|
|
201
|
+
function It(e, t, n, r = {
|
|
202
202
|
width: q,
|
|
203
203
|
height: X
|
|
204
204
|
}) {
|
|
@@ -207,21 +207,21 @@ function Lt(e, t, n, r = {
|
|
|
207
207
|
).join("");
|
|
208
208
|
return `<svg xmlns="http://www.w3.org/2000/svg" width="${r.width}" height="${r.height}" viewBox="0 0 ${q} ${X}"><path d="${ie}" fill="none" stroke="${n}" stroke-width="${He}" stroke-linejoin="round"/><path d="${ie}" fill="${e}" stroke="${t}" stroke-width="${Ke}" stroke-linejoin="round"/><g fill="${t}" transform="${qe}">${o}</g></svg>`;
|
|
209
209
|
}
|
|
210
|
-
const Je = 1.4,
|
|
210
|
+
const Je = 1.4, Ct = [
|
|
211
211
|
"ds:[gmp-advanced-marker:focus-visible_&]:outline-[length:var(--focus-ring-width)]",
|
|
212
212
|
"ds:[gmp-advanced-marker:focus-visible_&]:outline-solid",
|
|
213
213
|
"ds:[gmp-advanced-marker:focus-visible_&]:outline-[color:var(--map-marker-hover-color)]",
|
|
214
214
|
"ds:[gmp-advanced-marker:focus-visible_&]:outline-offset-[length:var(--focus-ring-offset)]",
|
|
215
215
|
"ds:[gmp-advanced-marker:focus-visible_&]:forced-colors:outline-[CanvasText]"
|
|
216
216
|
].join(" ");
|
|
217
|
-
function
|
|
217
|
+
function Lt({ hovered: e }) {
|
|
218
218
|
const t = e ? Je : 1, n = e ? "ds:fill-[var(--map-marker-hover-color)]" : "ds:fill-[var(--map-marker-color)]";
|
|
219
|
-
return /* @__PURE__ */
|
|
219
|
+
return /* @__PURE__ */ m(
|
|
220
220
|
"span",
|
|
221
221
|
{
|
|
222
222
|
"data-component": "map-view-pin",
|
|
223
223
|
className: "ds:flex ds:items-end ds:justify-center ds:[min-inline-size:var(--min-target-size)] ds:[min-block-size:var(--min-target-size)]",
|
|
224
|
-
children: /* @__PURE__ */
|
|
224
|
+
children: /* @__PURE__ */ N(
|
|
225
225
|
"svg",
|
|
226
226
|
{
|
|
227
227
|
"aria-hidden": "true",
|
|
@@ -230,9 +230,9 @@ function Ct({ hovered: e }) {
|
|
|
230
230
|
width: q * t,
|
|
231
231
|
height: X * t,
|
|
232
232
|
viewBox: `0 0 ${q} ${X}`,
|
|
233
|
-
className: `ds:block ds:fill-[var(--map-marker-hover-ring)] ds:forced-colors:fill-[Canvas] ${
|
|
233
|
+
className: `ds:block ds:fill-[var(--map-marker-hover-ring)] ds:forced-colors:fill-[Canvas] ${Ct}`,
|
|
234
234
|
children: [
|
|
235
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ m(
|
|
236
236
|
"path",
|
|
237
237
|
{
|
|
238
238
|
d: ie,
|
|
@@ -242,7 +242,7 @@ function Ct({ hovered: e }) {
|
|
|
242
242
|
className: "ds:stroke-[color:var(--map-marker-hover-color)] ds:forced-colors:stroke-[ButtonText]"
|
|
243
243
|
}
|
|
244
244
|
),
|
|
245
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ m(
|
|
246
246
|
"path",
|
|
247
247
|
{
|
|
248
248
|
d: ie,
|
|
@@ -251,8 +251,8 @@ function Ct({ hovered: e }) {
|
|
|
251
251
|
className: `${n} ds:stroke-[color:var(--map-marker-hover-ring)] ds:forced-colors:fill-[ButtonText] ds:forced-colors:stroke-[Canvas]`
|
|
252
252
|
}
|
|
253
253
|
),
|
|
254
|
-
/* @__PURE__ */
|
|
255
|
-
({ tag: r, attrs: o }, s) => r === "path" ? /* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ m("g", { transform: qe, children: Xe.map(
|
|
255
|
+
({ tag: r, attrs: o }, s) => r === "path" ? /* @__PURE__ */ m("path", { d: o.d }, s) : /* @__PURE__ */ m(
|
|
256
256
|
"rect",
|
|
257
257
|
{
|
|
258
258
|
x: o.x,
|
|
@@ -272,68 +272,68 @@ function Ct({ hovered: e }) {
|
|
|
272
272
|
}
|
|
273
273
|
);
|
|
274
274
|
}
|
|
275
|
-
const
|
|
276
|
-
function
|
|
277
|
-
const r = Pt * 2 ** n, o = Math.min(Math.max(Math.sin(
|
|
275
|
+
const Nt = 30, Tt = 56, he = 17, Pt = 256, Rt = (e) => e * Math.PI / 180;
|
|
276
|
+
function At(e, t, n) {
|
|
277
|
+
const r = Pt * 2 ** n, o = Math.min(Math.max(Math.sin(Rt(e)), -0.9999), 0.9999), s = Math.log((1 + o) / (1 - o)) / 2;
|
|
278
278
|
return {
|
|
279
279
|
x: (t + 180) / 360 * r,
|
|
280
280
|
y: (0.5 - s / (2 * Math.PI)) * r
|
|
281
281
|
};
|
|
282
282
|
}
|
|
283
283
|
function Vt(e, t) {
|
|
284
|
-
return e === "auto" ? t >
|
|
284
|
+
return e === "auto" ? t > Nt : e && t > 1;
|
|
285
285
|
}
|
|
286
|
-
function Ot(e, t, n =
|
|
287
|
-
if (t >=
|
|
286
|
+
function Ot(e, t, n = Tt) {
|
|
287
|
+
if (t >= he || e.length < 2)
|
|
288
288
|
return { singles: [...e], clusters: [] };
|
|
289
289
|
const r = e.map((a) => ({
|
|
290
290
|
marker: a,
|
|
291
|
-
...
|
|
291
|
+
...At(a.position.lat, a.position.lng, t)
|
|
292
292
|
})).sort(
|
|
293
293
|
(a, l) => a.x - l.x || a.y - l.y || (a.marker.id < l.marker.id ? -1 : 1)
|
|
294
|
-
), o = [], s = /* @__PURE__ */ new Map(), i = (a) => Math.floor(a / n),
|
|
294
|
+
), o = [], s = /* @__PURE__ */ new Map(), i = (a) => Math.floor(a / n), u = n * n;
|
|
295
295
|
for (const a of r) {
|
|
296
296
|
const l = i(a.x), f = i(a.y);
|
|
297
|
-
let
|
|
298
|
-
for (let
|
|
299
|
-
for (let
|
|
300
|
-
for (const b of s.get(`${l +
|
|
301
|
-
const
|
|
302
|
-
|
|
297
|
+
let g = null, c = u;
|
|
298
|
+
for (let h = -1; h <= 1; h += 1)
|
|
299
|
+
for (let w = -1; w <= 1; w += 1)
|
|
300
|
+
for (const b of s.get(`${l + h}:${f + w}`) ?? []) {
|
|
301
|
+
const M = (b.x - a.x) ** 2 + (b.y - a.y) ** 2;
|
|
302
|
+
M <= c && (g = b, c = M);
|
|
303
303
|
}
|
|
304
|
-
if (
|
|
305
|
-
const
|
|
306
|
-
|
|
307
|
-
const b = `${i(
|
|
308
|
-
if (
|
|
309
|
-
const
|
|
310
|
-
|
|
311
|
-
const
|
|
312
|
-
|
|
304
|
+
if (g) {
|
|
305
|
+
const h = g.members.length, w = `${i(g.x)}:${i(g.y)}`;
|
|
306
|
+
g.x = (g.x * h + a.x) / (h + 1), g.y = (g.y * h + a.y) / (h + 1), g.lat = (g.lat * h + a.marker.position.lat) / (h + 1), g.lng = (g.lng * h + a.marker.position.lng) / (h + 1), g.members.push(a.marker);
|
|
307
|
+
const b = `${i(g.x)}:${i(g.y)}`;
|
|
308
|
+
if (w !== b) {
|
|
309
|
+
const M = s.get(w);
|
|
310
|
+
M && M.splice(M.indexOf(g), 1);
|
|
311
|
+
const L = s.get(b);
|
|
312
|
+
L ? L.push(g) : s.set(b, [g]);
|
|
313
313
|
}
|
|
314
314
|
} else {
|
|
315
|
-
const
|
|
315
|
+
const h = {
|
|
316
316
|
x: a.x,
|
|
317
317
|
y: a.y,
|
|
318
318
|
members: [a.marker],
|
|
319
319
|
lat: a.marker.position.lat,
|
|
320
320
|
lng: a.marker.position.lng
|
|
321
321
|
};
|
|
322
|
-
o.push(
|
|
323
|
-
const
|
|
324
|
-
b ? b.push(
|
|
322
|
+
o.push(h);
|
|
323
|
+
const w = `${l}:${f}`, b = s.get(w);
|
|
324
|
+
b ? b.push(h) : s.set(w, [h]);
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
|
-
const
|
|
327
|
+
const p = [], d = [];
|
|
328
328
|
for (const a of o)
|
|
329
|
-
a.members.length === 1 ?
|
|
329
|
+
a.members.length === 1 ? p.push(a.members[0]) : d.push({
|
|
330
330
|
id: a.members[0].id,
|
|
331
331
|
position: { lat: a.lat, lng: a.lng },
|
|
332
332
|
members: a.members
|
|
333
333
|
});
|
|
334
|
-
return { singles:
|
|
334
|
+
return { singles: p, clusters: d };
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function Ne(e) {
|
|
337
337
|
if (!(e instanceof Element)) return !1;
|
|
338
338
|
try {
|
|
339
339
|
return e.matches(":focus-visible");
|
|
@@ -341,7 +341,40 @@ function Ce(e) {
|
|
|
341
341
|
return !0;
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
|
-
const
|
|
344
|
+
const Gt = 0.08;
|
|
345
|
+
function jt(e, t) {
|
|
346
|
+
let n = 0;
|
|
347
|
+
for (let r = 1; r < e.length; r += 1)
|
|
348
|
+
Math.abs(e[r] - t) < Math.abs(e[n] - t) && (n = r);
|
|
349
|
+
return n;
|
|
350
|
+
}
|
|
351
|
+
function Dt(e, t) {
|
|
352
|
+
const [n, r] = C(null), o = (e ?? []).map((s) => `${s.width}x${s.height}`).join();
|
|
353
|
+
return ce(() => {
|
|
354
|
+
const s = t.current, i = o ? o.split(",").map((d) => {
|
|
355
|
+
const [a, l] = d.split("x").map(Number);
|
|
356
|
+
return Math.log(a / l);
|
|
357
|
+
}) : [];
|
|
358
|
+
if (!s || i.length === 0 || i.some((d) => !isFinite(d))) {
|
|
359
|
+
r(null);
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
r(null);
|
|
363
|
+
const u = (d) => {
|
|
364
|
+
const { width: a, height: l } = s.getBoundingClientRect();
|
|
365
|
+
if (!(a > 0 && l > 0)) {
|
|
366
|
+
d && r(null);
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
const f = Math.log(a / l), g = jt(i, f);
|
|
370
|
+
r((c) => c === null || c >= i.length || Math.abs(i[c] - f) - Math.abs(i[g] - f) > Gt ? g : c);
|
|
371
|
+
};
|
|
372
|
+
if (u(!0), typeof ResizeObserver > "u") return;
|
|
373
|
+
const p = new ResizeObserver(() => u(!1));
|
|
374
|
+
return p.observe(s), () => p.disconnect();
|
|
375
|
+
}, [t, o]), n;
|
|
376
|
+
}
|
|
377
|
+
const Zt = J(
|
|
345
378
|
[
|
|
346
379
|
"ds:relative ds:overflow-hidden ds:block",
|
|
347
380
|
"ds:bg-[var(--muted)]",
|
|
@@ -370,7 +403,7 @@ const jt = J(
|
|
|
370
403
|
},
|
|
371
404
|
defaultVariants: { size: "md", surface: "bordered" }
|
|
372
405
|
}
|
|
373
|
-
),
|
|
406
|
+
), Ft = J("ds:block ds:w-full", {
|
|
374
407
|
variants: {
|
|
375
408
|
size: {
|
|
376
409
|
sm: "ds:[block-size:var(--map-block-size)]",
|
|
@@ -380,7 +413,7 @@ const jt = J(
|
|
|
380
413
|
}
|
|
381
414
|
},
|
|
382
415
|
defaultVariants: { size: "md" }
|
|
383
|
-
}),
|
|
416
|
+
}), Ut = J(
|
|
384
417
|
[
|
|
385
418
|
"ds:absolute ds:inset-0",
|
|
386
419
|
"ds:flex ds:flex-col ds:items-center ds:justify-center",
|
|
@@ -389,10 +422,10 @@ const jt = J(
|
|
|
389
422
|
"ds:bg-[var(--muted)] ds:text-[var(--foreground)]",
|
|
390
423
|
"ds:text-center"
|
|
391
424
|
].join(" ")
|
|
392
|
-
),
|
|
425
|
+
), Wt = J("type-heading-3 ds:m-0"), Te = J(
|
|
393
426
|
"type-body-sm ds:text-[var(--muted-foreground)] ds:[max-inline-size:28rem] ds:m-0"
|
|
394
427
|
);
|
|
395
|
-
function
|
|
428
|
+
function Bt({
|
|
396
429
|
onHandleReady: e,
|
|
397
430
|
onMarkerSelect: t,
|
|
398
431
|
onCameraMove: n
|
|
@@ -422,11 +455,11 @@ function Ft({
|
|
|
422
455
|
}), () => e(null);
|
|
423
456
|
}, [r, e, t, n]), null;
|
|
424
457
|
}
|
|
425
|
-
function
|
|
458
|
+
function Kt({
|
|
426
459
|
onBoundsChange: e,
|
|
427
460
|
userInteraction: t
|
|
428
461
|
}) {
|
|
429
|
-
const n = W(), r =
|
|
462
|
+
const n = W(), r = k(e);
|
|
430
463
|
return r.current = e, $(() => {
|
|
431
464
|
if (!n) return;
|
|
432
465
|
const o = n.getDiv();
|
|
@@ -439,10 +472,10 @@ function Ut({
|
|
|
439
472
|
};
|
|
440
473
|
};
|
|
441
474
|
i();
|
|
442
|
-
let
|
|
443
|
-
const
|
|
444
|
-
if (c instanceof PointerEvent && c.pointerType === "touch" && (c.type === "pointerdown" &&
|
|
445
|
-
|
|
475
|
+
let u;
|
|
476
|
+
const p = /* @__PURE__ */ new Set(), d = (c) => {
|
|
477
|
+
if (c instanceof PointerEvent && c.pointerType === "touch" && (c.type === "pointerdown" && p.add(c.pointerId), c.type === "pointerup" || c.type === "pointercancel")) {
|
|
478
|
+
p.delete(c.pointerId);
|
|
446
479
|
return;
|
|
447
480
|
}
|
|
448
481
|
if (c instanceof PointerEvent && c.type === "pointermove" && c.buttons === 0 && c.pointerType !== "touch" || c instanceof KeyboardEvent && ![
|
|
@@ -460,21 +493,21 @@ function Ut({
|
|
|
460
493
|
"PageDown"
|
|
461
494
|
].includes(c.key))
|
|
462
495
|
return;
|
|
463
|
-
const
|
|
496
|
+
const h = document.fullscreenElement, w = !!(h && (h.contains(o) || o.contains(h)));
|
|
464
497
|
let b = c.type === "dblclick";
|
|
465
|
-
c instanceof PointerEvent && c.type === "pointermove" && (b = c.pointerType !== "touch" ||
|
|
498
|
+
c instanceof PointerEvent && c.type === "pointermove" && (b = c.pointerType !== "touch" || p.size >= 2 || w), c.type === "touchmove" && (b = c.touches.length >= 2 || w), c instanceof KeyboardEvent && (b = c.key !== "Enter" && c.key !== " "), c instanceof WheelEvent && (b = c.ctrlKey || c.metaKey || w), c.type === "click" && (b = c.target instanceof Element && c.target.closest('button, [role="button"]') != null), b && (t.current.programmatic = !1), t.current.pendingInput = !0, clearTimeout(u), u = setTimeout(() => {
|
|
466
499
|
t.current.pendingInput = !1;
|
|
467
500
|
}, 250);
|
|
468
501
|
}, a = () => {
|
|
469
502
|
t.current.pendingInput && !t.current.programmatic && (t.current.moved = !0);
|
|
470
503
|
}, l = () => {
|
|
471
|
-
var
|
|
472
|
-
const c = (
|
|
473
|
-
if (i(), clearTimeout(
|
|
474
|
-
const
|
|
475
|
-
(
|
|
476
|
-
),
|
|
477
|
-
s = { bounds: c, center:
|
|
504
|
+
var A, G;
|
|
505
|
+
const c = (A = n.getBounds()) == null ? void 0 : A.toJSON(), h = (G = n.getCenter()) == null ? void 0 : G.toJSON(), w = n.getZoom(), b = t.current.moved;
|
|
506
|
+
if (i(), clearTimeout(u), !c || !h || w == null) return;
|
|
507
|
+
const M = !s || Object.keys(c).some(
|
|
508
|
+
(j) => c[j] !== s.bounds[j]
|
|
509
|
+
), L = s != null && (w !== s.zoom || h.lat !== s.center.lat || h.lng !== s.center.lng);
|
|
510
|
+
s = { bounds: c, center: h, zoom: w }, M && r.current(c, { userInteraction: b && L });
|
|
478
511
|
}, f = [
|
|
479
512
|
"pointerdown",
|
|
480
513
|
"pointermove",
|
|
@@ -488,9 +521,9 @@ function Ut({
|
|
|
488
521
|
"keydown"
|
|
489
522
|
];
|
|
490
523
|
f.forEach(
|
|
491
|
-
(c) => o.addEventListener(c,
|
|
524
|
+
(c) => o.addEventListener(c, d, { capture: !0, passive: !0 })
|
|
492
525
|
);
|
|
493
|
-
const
|
|
526
|
+
const g = [
|
|
494
527
|
n.addListener("dragstart", () => {
|
|
495
528
|
t.current.programmatic = !1, t.current.moved = !0;
|
|
496
529
|
}),
|
|
@@ -499,78 +532,78 @@ function Ut({
|
|
|
499
532
|
n.addListener("idle", l)
|
|
500
533
|
];
|
|
501
534
|
return l(), () => {
|
|
502
|
-
|
|
503
|
-
(c) => o.removeEventListener(c,
|
|
504
|
-
), clearTimeout(
|
|
535
|
+
g.forEach((c) => c.remove()), f.forEach(
|
|
536
|
+
(c) => o.removeEventListener(c, d, !0)
|
|
537
|
+
), clearTimeout(u), i();
|
|
505
538
|
};
|
|
506
539
|
}, [n, t]), null;
|
|
507
540
|
}
|
|
508
|
-
function
|
|
509
|
-
const n = W(), [r, o] =
|
|
541
|
+
function Ht(e, t) {
|
|
542
|
+
const n = W(), [r, o] = C(null), { lat: s, lng: i } = t;
|
|
510
543
|
return $(() => {
|
|
511
544
|
if (!n || typeof n.getCenter != "function") return;
|
|
512
|
-
const
|
|
513
|
-
var
|
|
514
|
-
const
|
|
515
|
-
if (!
|
|
545
|
+
const u = () => {
|
|
546
|
+
var h, w;
|
|
547
|
+
const d = (h = n.getCenter()) == null ? void 0 : h.toJSON(), a = n.getZoom(), l = (w = n.getDiv) == null ? void 0 : w.call(n);
|
|
548
|
+
if (!d || a == null || !l) {
|
|
516
549
|
o(null);
|
|
517
550
|
return;
|
|
518
551
|
}
|
|
519
|
-
const f = l.clientWidth,
|
|
552
|
+
const f = l.clientWidth, g = l.clientHeight, c = Ye * 2 ** a;
|
|
520
553
|
o({
|
|
521
554
|
id: e,
|
|
522
555
|
width: f,
|
|
523
|
-
height:
|
|
524
|
-
x: f / 2 + (i -
|
|
525
|
-
y:
|
|
556
|
+
height: g,
|
|
557
|
+
x: f / 2 + (i - d.lng) / 360 * c,
|
|
558
|
+
y: g / 2 - (ae(s) - ae(d.lat)) * c / (2 * Math.PI)
|
|
526
559
|
});
|
|
527
560
|
};
|
|
528
|
-
|
|
529
|
-
const
|
|
530
|
-
(
|
|
561
|
+
u();
|
|
562
|
+
const p = ["bounds_changed", "zoom_changed", "center_changed", "idle"].flatMap(
|
|
563
|
+
(d) => typeof n.addListener == "function" ? [n.addListener(d, u)] : []
|
|
531
564
|
);
|
|
532
|
-
return () =>
|
|
565
|
+
return () => p.forEach((d) => d.remove());
|
|
533
566
|
}, [n, e, s, i]), (r == null ? void 0 : r.id) === e ? r : null;
|
|
534
567
|
}
|
|
535
|
-
function
|
|
568
|
+
function qt({
|
|
536
569
|
marker: e,
|
|
537
570
|
frame: t,
|
|
538
571
|
direction: n,
|
|
539
572
|
children: r
|
|
540
573
|
}) {
|
|
541
|
-
const o =
|
|
542
|
-
return !o || !t ? null :
|
|
543
|
-
/* @__PURE__ */
|
|
574
|
+
const o = Ht(e.id, e.position);
|
|
575
|
+
return !o || !t ? null : je(
|
|
576
|
+
/* @__PURE__ */ m(Yt, { anchor: o, direction: n, children: r }),
|
|
544
577
|
t
|
|
545
578
|
);
|
|
546
579
|
}
|
|
547
|
-
const
|
|
548
|
-
function
|
|
580
|
+
const Xt = 52, Jt = 12, oe = 8;
|
|
581
|
+
function Yt({
|
|
549
582
|
anchor: e,
|
|
550
583
|
children: t,
|
|
551
584
|
direction: n
|
|
552
585
|
}) {
|
|
553
|
-
const r =
|
|
586
|
+
const r = k(null), [o, s] = C(
|
|
554
587
|
null
|
|
555
588
|
);
|
|
556
|
-
if (
|
|
589
|
+
if (ce(() => {
|
|
557
590
|
const c = r.current;
|
|
558
591
|
c && s(
|
|
559
|
-
(
|
|
592
|
+
(h) => (h == null ? void 0 : h.width) === c.offsetWidth && h.height === c.offsetHeight ? h : { width: c.offsetWidth, height: c.offsetHeight }
|
|
560
593
|
);
|
|
561
594
|
}, [t, e.id]), !(e.x >= 0 && e.x <= e.width && e.y >= 0 && e.y <= e.height)) return null;
|
|
562
|
-
const
|
|
595
|
+
const u = (o == null ? void 0 : o.width) ?? 0, p = (o == null ? void 0 : o.height) ?? 0, d = Math.max(oe, e.width - u - oe), a = Math.min(Math.max(e.x - u / 2, oe), d), l = e.y - Xt - p, f = l < oe, g = f ? e.y + Jt : l;
|
|
563
596
|
return (
|
|
564
597
|
// The layer is `ltr` because the map is geographic: x is always measured
|
|
565
598
|
// from the physical left. The card inside takes the page direction.
|
|
566
|
-
/* @__PURE__ */
|
|
599
|
+
/* @__PURE__ */ m(
|
|
567
600
|
"div",
|
|
568
601
|
{
|
|
569
602
|
dir: "ltr",
|
|
570
603
|
"aria-hidden": "true",
|
|
571
604
|
"data-component": "map-view-marker-card-layer",
|
|
572
605
|
className: "ds:pointer-events-none ds:absolute ds:inset-0 ds:overflow-hidden",
|
|
573
|
-
children: /* @__PURE__ */
|
|
606
|
+
children: /* @__PURE__ */ m(
|
|
574
607
|
"div",
|
|
575
608
|
{
|
|
576
609
|
ref: r,
|
|
@@ -579,11 +612,11 @@ function qt({
|
|
|
579
612
|
"data-placement": f ? "below" : "above",
|
|
580
613
|
style: {
|
|
581
614
|
"--marker-card-x": `${a}px`,
|
|
582
|
-
"--marker-card-y": `${
|
|
615
|
+
"--marker-card-y": `${g}px`
|
|
583
616
|
},
|
|
584
617
|
"data-measured": o ? "true" : "false",
|
|
585
618
|
className: "ds:absolute ds:[inset-inline-start:var(--marker-card-x)] ds:[inset-block-start:var(--marker-card-y)] ds:[inline-size:max-content] ds:[max-inline-size:calc(100%-var(--spacing-md))] ds:data-[measured=false]:invisible",
|
|
586
|
-
children: /* @__PURE__ */
|
|
619
|
+
children: /* @__PURE__ */ m("div", { dir: n, children: t })
|
|
587
620
|
}
|
|
588
621
|
)
|
|
589
622
|
}
|
|
@@ -596,7 +629,7 @@ function re(e) {
|
|
|
596
629
|
const t = e.element;
|
|
597
630
|
return t instanceof HTMLElement ? t : null;
|
|
598
631
|
}
|
|
599
|
-
function
|
|
632
|
+
function Qt({
|
|
600
633
|
marker: e,
|
|
601
634
|
label: t,
|
|
602
635
|
isSelected: n,
|
|
@@ -605,144 +638,144 @@ function Xt({
|
|
|
605
638
|
onHover: s,
|
|
606
639
|
elements: i
|
|
607
640
|
}) {
|
|
608
|
-
const [
|
|
641
|
+
const [u, p] = C(null), { id: d } = e, a = k(!1);
|
|
609
642
|
return $(() => {
|
|
610
|
-
const l = re(
|
|
643
|
+
const l = re(u);
|
|
611
644
|
if (l && (l.style.outline = "none"), !l || !i) return;
|
|
612
645
|
const f = i.current;
|
|
613
646
|
return f.set(`pin:${e.id}`, l), () => {
|
|
614
647
|
f.delete(`pin:${e.id}`);
|
|
615
648
|
};
|
|
616
|
-
}, [
|
|
617
|
-
const l = re(
|
|
649
|
+
}, [u, i, e.id]), $(() => {
|
|
650
|
+
const l = re(u);
|
|
618
651
|
if (!l || !s) return;
|
|
619
|
-
const f = (
|
|
620
|
-
|
|
621
|
-
},
|
|
622
|
-
l.contains(
|
|
623
|
-
}, c = (
|
|
624
|
-
|
|
652
|
+
const f = (h) => {
|
|
653
|
+
Ne(h.target) && s(d, !0, "focus");
|
|
654
|
+
}, g = (h) => {
|
|
655
|
+
l.contains(h.relatedTarget) || a.current || s(d, !1, "focus");
|
|
656
|
+
}, c = (h) => {
|
|
657
|
+
h.key === "Escape" && s(d, !1, "focus");
|
|
625
658
|
};
|
|
626
|
-
return l.addEventListener("focusin", f), l.addEventListener("focusout",
|
|
627
|
-
l.removeEventListener("focusin", f), l.removeEventListener("focusout",
|
|
659
|
+
return l.addEventListener("focusin", f), l.addEventListener("focusout", g), l.addEventListener("keydown", c), () => {
|
|
660
|
+
l.removeEventListener("focusin", f), l.removeEventListener("focusout", g), l.removeEventListener("keydown", c);
|
|
628
661
|
};
|
|
629
|
-
}, [
|
|
662
|
+
}, [u, d, s]), /* @__PURE__ */ m(
|
|
630
663
|
Ze,
|
|
631
664
|
{
|
|
632
|
-
ref:
|
|
665
|
+
ref: p,
|
|
633
666
|
position: e.position,
|
|
634
667
|
title: t,
|
|
635
668
|
"aria-label": t,
|
|
636
669
|
"data-selected": n ? "true" : "false",
|
|
637
670
|
"data-hovered": r ? "true" : "false",
|
|
638
671
|
zIndex: r ? 1e3 : n ? 500 : void 0,
|
|
639
|
-
onClick: () => o(
|
|
672
|
+
onClick: () => o(d),
|
|
640
673
|
onMouseEnter: s ? () => {
|
|
641
|
-
a.current = !0, s(
|
|
674
|
+
a.current = !0, s(d, !0, "pointer");
|
|
642
675
|
} : void 0,
|
|
643
676
|
onMouseLeave: s ? () => {
|
|
644
677
|
a.current = !1;
|
|
645
|
-
const l = re(
|
|
646
|
-
l && f && l.contains(f) &&
|
|
678
|
+
const l = re(u), f = document.activeElement;
|
|
679
|
+
l && f && l.contains(f) && Ne(f) || s(d, !1, "pointer");
|
|
647
680
|
} : void 0,
|
|
648
|
-
children: /* @__PURE__ */
|
|
681
|
+
children: /* @__PURE__ */ m(Lt, { hovered: r })
|
|
649
682
|
}
|
|
650
683
|
);
|
|
651
684
|
}
|
|
652
|
-
const Ye = 256,
|
|
685
|
+
const Ye = 256, en = (e) => e * Math.PI / 180;
|
|
653
686
|
function ae(e) {
|
|
654
|
-
const t = Math.min(Math.max(Math.sin(
|
|
687
|
+
const t = Math.min(Math.max(Math.sin(en(e)), -0.9999), 0.9999);
|
|
655
688
|
return Math.log((1 + t) / (1 - t)) / 2;
|
|
656
689
|
}
|
|
657
|
-
const
|
|
658
|
-
function
|
|
690
|
+
const tn = (e) => Math.atan(Math.sinh(e)) * 180 / Math.PI;
|
|
691
|
+
function nn(e) {
|
|
659
692
|
let t = -90, n = 90, r = -180, o = 180;
|
|
660
693
|
for (const { lat: s, lng: i } of e)
|
|
661
694
|
t = Math.max(t, s), n = Math.min(n, s), r = Math.max(r, i), o = Math.min(o, i);
|
|
662
695
|
return { north: t, south: n, east: r, west: o };
|
|
663
696
|
}
|
|
664
697
|
function Qe(e, t, n, r, o) {
|
|
665
|
-
const { north: s, south: i, east:
|
|
666
|
-
if (s === i &&
|
|
667
|
-
return { center: { lat: s, lng:
|
|
668
|
-
const
|
|
669
|
-
lat:
|
|
670
|
-
lng: (
|
|
671
|
-
}, f = (c,
|
|
672
|
-
f(t - 2 * r, (
|
|
673
|
-
f(n - 2 * r, (
|
|
698
|
+
const { north: s, south: i, east: u, west: p } = nn(e);
|
|
699
|
+
if (s === i && u === p)
|
|
700
|
+
return { center: { lat: s, lng: u }, zoom: o };
|
|
701
|
+
const d = ae(s), a = ae(i), l = {
|
|
702
|
+
lat: tn((d + a) / 2),
|
|
703
|
+
lng: (u + p) / 2
|
|
704
|
+
}, f = (c, h) => h > 0 ? Math.log2(Math.max(c, 1) / Ye / h) : o, g = Math.min(
|
|
705
|
+
f(t - 2 * r, (u - p) / 360),
|
|
706
|
+
f(n - 2 * r, (d - a) / (2 * Math.PI)),
|
|
674
707
|
o
|
|
675
708
|
);
|
|
676
|
-
return { center: l, zoom: Math.max(0, Math.floor(
|
|
709
|
+
return { center: l, zoom: Math.max(0, Math.floor(g)) };
|
|
677
710
|
}
|
|
678
711
|
const et = ({ id: e, lat: t, lng: n }) => e != null ? `id:${e}` : `at:${t},${n}`;
|
|
679
|
-
function
|
|
712
|
+
function on({
|
|
680
713
|
points: e,
|
|
681
714
|
fitKey: t,
|
|
682
715
|
maxZoom: n,
|
|
683
716
|
onCameraMove: r
|
|
684
717
|
}) {
|
|
685
|
-
const o = W(), s =
|
|
718
|
+
const o = W(), s = k(null), i = k(!1), u = k(null);
|
|
686
719
|
return $(() => {
|
|
687
720
|
if (!o) return;
|
|
688
|
-
const
|
|
721
|
+
const p = () => {
|
|
689
722
|
var c;
|
|
690
|
-
const a =
|
|
723
|
+
const a = u.current, l = (c = o.getCenter()) == null ? void 0 : c.toJSON(), f = o.getZoom();
|
|
691
724
|
a != null && f === a.zoom && l != null && Math.abs(l.lat - a.center.lat) < 1e-6 && Math.abs(l.lng - a.center.lng) < 1e-6 || (i.current = !0);
|
|
692
|
-
},
|
|
725
|
+
}, d = [
|
|
693
726
|
o.addListener("dragstart", () => {
|
|
694
727
|
i.current = !0;
|
|
695
728
|
}),
|
|
696
|
-
o.addListener("center_changed",
|
|
697
|
-
o.addListener("zoom_changed",
|
|
729
|
+
o.addListener("center_changed", p),
|
|
730
|
+
o.addListener("zoom_changed", p)
|
|
698
731
|
];
|
|
699
|
-
return () =>
|
|
732
|
+
return () => d.forEach((a) => a.remove());
|
|
700
733
|
}, [o]), $(() => {
|
|
701
|
-
var
|
|
734
|
+
var w;
|
|
702
735
|
if (!o) return;
|
|
703
|
-
const
|
|
704
|
-
if ((
|
|
705
|
-
const
|
|
706
|
-
|
|
736
|
+
const p = ((w = s.current) == null ? void 0 : w.map) === o ? s.current : null;
|
|
737
|
+
if ((p == null ? void 0 : p.key) === t) return;
|
|
738
|
+
const d = new Set(e.map(et)), a = (b, M) => {
|
|
739
|
+
u.current = { center: b, zoom: M }, r(), o.moveCamera({ center: b, zoom: M }), i.current = !1;
|
|
707
740
|
};
|
|
708
741
|
if (e.length === 0) {
|
|
709
|
-
s.current = { map: o, key: t, points:
|
|
742
|
+
s.current = { map: o, key: t, points: d };
|
|
710
743
|
return;
|
|
711
744
|
}
|
|
712
|
-
if (
|
|
713
|
-
s.current = { map: o, key: t, points:
|
|
745
|
+
if (p != null && p.points.size > 0 && [...p.points].every((b) => d.has(b)) && i.current) {
|
|
746
|
+
s.current = { map: o, key: t, points: d };
|
|
714
747
|
return;
|
|
715
748
|
}
|
|
716
749
|
const f = o.getDiv();
|
|
717
750
|
if (!(f instanceof Element)) return;
|
|
718
|
-
const
|
|
719
|
-
s.current = { map: o, key: t, points:
|
|
751
|
+
const g = () => {
|
|
752
|
+
s.current = { map: o, key: t, points: d };
|
|
720
753
|
const b = Math.min(
|
|
721
|
-
|
|
754
|
+
ge("--spacing-2xl", f, 48),
|
|
722
755
|
f.clientWidth / 4,
|
|
723
756
|
f.clientHeight / 4
|
|
724
|
-
), { center:
|
|
757
|
+
), { center: M, zoom: L } = Qe(
|
|
725
758
|
e,
|
|
726
759
|
f.clientWidth,
|
|
727
760
|
f.clientHeight,
|
|
728
761
|
b,
|
|
729
762
|
n
|
|
730
763
|
);
|
|
731
|
-
a(
|
|
764
|
+
a(M, L);
|
|
732
765
|
}, c = () => f.clientWidth > 0 && f.clientHeight > 0;
|
|
733
766
|
if (c() || typeof ResizeObserver > "u") {
|
|
734
|
-
|
|
767
|
+
g();
|
|
735
768
|
return;
|
|
736
769
|
}
|
|
737
|
-
const
|
|
738
|
-
c() && (
|
|
770
|
+
const h = new ResizeObserver(() => {
|
|
771
|
+
c() && (h.disconnect(), g());
|
|
739
772
|
});
|
|
740
|
-
return
|
|
773
|
+
return h.observe(f), () => h.disconnect();
|
|
741
774
|
}, [o, t, e, n, r]), null;
|
|
742
775
|
}
|
|
743
|
-
const
|
|
744
|
-
function
|
|
745
|
-
const t = W(), [n, r] =
|
|
776
|
+
const Pe = 10;
|
|
777
|
+
function sn(e) {
|
|
778
|
+
const t = W(), [n, r] = C(e);
|
|
746
779
|
return $(() => {
|
|
747
780
|
if (!t || typeof t.addListener != "function" || typeof t.getZoom != "function")
|
|
748
781
|
return;
|
|
@@ -757,7 +790,7 @@ function tn(e) {
|
|
|
757
790
|
return () => s.forEach((i) => i.remove());
|
|
758
791
|
}, [t]), n;
|
|
759
792
|
}
|
|
760
|
-
const
|
|
793
|
+
const rn = [
|
|
761
794
|
"ds:inline-flex ds:items-center ds:justify-center",
|
|
762
795
|
// 44 px, 48 px in the accessible themes, with room for a long count.
|
|
763
796
|
"ds:[min-inline-size:var(--min-target-size)] ds:[min-block-size:var(--min-target-size)]",
|
|
@@ -777,14 +810,14 @@ const nn = [
|
|
|
777
810
|
"ds:[gmp-advanced-marker:focus-visible_&]:outline-[length:var(--focus-ring-width)] ds:[gmp-advanced-marker:focus-visible_&]:outline-solid ds:[gmp-advanced-marker:focus-visible_&]:outline-[color:var(--map-marker-hover-color)] ds:[gmp-advanced-marker:focus-visible_&]:outline-offset-[length:var(--focus-ring-offset)]",
|
|
778
811
|
"ds:[gmp-advanced-marker:focus-visible_&]:forced-colors:outline-[CanvasText]"
|
|
779
812
|
].join(" ");
|
|
780
|
-
function
|
|
781
|
-
return /* @__PURE__ */
|
|
813
|
+
function an({ count: e }) {
|
|
814
|
+
return /* @__PURE__ */ m(
|
|
782
815
|
"span",
|
|
783
816
|
{
|
|
784
817
|
"aria-hidden": "true",
|
|
785
818
|
"data-component": "map-view-cluster",
|
|
786
819
|
"data-count": e,
|
|
787
|
-
className:
|
|
820
|
+
className: rn,
|
|
788
821
|
children: e
|
|
789
822
|
}
|
|
790
823
|
);
|
|
@@ -795,8 +828,8 @@ function se(e, t) {
|
|
|
795
828
|
const r = getComputedStyle(n).color;
|
|
796
829
|
return n.remove(), r || "currentColor";
|
|
797
830
|
}
|
|
798
|
-
function
|
|
799
|
-
const t = W(), [n, r] =
|
|
831
|
+
function cn(e) {
|
|
832
|
+
const t = W(), [n, r] = C(null);
|
|
800
833
|
return $(() => {
|
|
801
834
|
var a;
|
|
802
835
|
if (!e || !t) return;
|
|
@@ -806,52 +839,52 @@ function sn(e) {
|
|
|
806
839
|
ink: se("--map-marker-hover-ring", s),
|
|
807
840
|
ring: se("--map-marker-hover-ring", s),
|
|
808
841
|
hover: se("--map-marker-hover-color", s),
|
|
809
|
-
target:
|
|
842
|
+
target: ge("--min-target-size", s, 44)
|
|
810
843
|
};
|
|
811
844
|
r(
|
|
812
845
|
(f) => f && f.fill === l.fill && f.ink === l.ink && f.ring === l.ring && f.hover === l.hover && f.target === l.target ? f : l
|
|
813
846
|
);
|
|
814
847
|
};
|
|
815
848
|
i();
|
|
816
|
-
const
|
|
849
|
+
const u = new MutationObserver(i), p = {
|
|
817
850
|
attributes: !0,
|
|
818
851
|
attributeFilter: ["class", "data-theme"]
|
|
819
852
|
};
|
|
820
|
-
|
|
821
|
-
const
|
|
822
|
-
return
|
|
853
|
+
u.observe(document.documentElement, p);
|
|
854
|
+
const d = s.closest('[data-component="theme-root"]');
|
|
855
|
+
return d && u.observe(d, p), () => u.disconnect();
|
|
823
856
|
}, [t, e]), n;
|
|
824
857
|
}
|
|
825
|
-
function
|
|
858
|
+
function ln(e, { fill: t, ink: n, ring: r, hover: o, target: s }) {
|
|
826
859
|
var l;
|
|
827
|
-
const i = Math.max(s, 20 + String(e).length * 12),
|
|
860
|
+
const i = Math.max(s, 20 + String(e).length * 12), u = `x="2" y="2" width="${i - 4}" height="${s - 4}" rx="${s / 2}"`, p = `<svg xmlns="http://www.w3.org/2000/svg" width="${i}" height="${s}"><rect ${u} fill="none" stroke="${o}" stroke-width="4"/><rect ${u} fill="${t}" stroke="${r}" stroke-width="2"/></svg>`, d = (l = globalThis.google) == null ? void 0 : l.maps;
|
|
828
861
|
return {
|
|
829
862
|
icon: {
|
|
830
|
-
url: `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(
|
|
831
|
-
scaledSize:
|
|
832
|
-
anchor:
|
|
863
|
+
url: `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(p)}`,
|
|
864
|
+
scaledSize: d ? new d.Size(i, s) : void 0,
|
|
865
|
+
anchor: d ? new d.Point(i / 2, s / 2) : void 0
|
|
833
866
|
},
|
|
834
867
|
label: { text: String(e), color: n, fontWeight: "600" }
|
|
835
868
|
};
|
|
836
869
|
}
|
|
837
|
-
const
|
|
838
|
-
function
|
|
870
|
+
const ve = bt(null);
|
|
871
|
+
function dn({
|
|
839
872
|
enabled: e,
|
|
840
873
|
children: t
|
|
841
874
|
}) {
|
|
842
|
-
const n =
|
|
843
|
-
return /* @__PURE__ */
|
|
875
|
+
const n = cn(e);
|
|
876
|
+
return /* @__PURE__ */ m(ve.Provider, { value: n, children: t });
|
|
844
877
|
}
|
|
845
|
-
function
|
|
846
|
-
var
|
|
847
|
-
const o = r ? Je : 1, s = q * o, i = X * o,
|
|
878
|
+
function un({ fill: e, ring: t, hover: n }, r) {
|
|
879
|
+
var d;
|
|
880
|
+
const o = r ? Je : 1, s = q * o, i = X * o, u = It(r ? n : e, t, n, { width: s, height: i }), p = (d = globalThis.google) == null ? void 0 : d.maps;
|
|
848
881
|
return {
|
|
849
|
-
url: `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(
|
|
850
|
-
scaledSize:
|
|
851
|
-
anchor:
|
|
882
|
+
url: `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(u)}`,
|
|
883
|
+
scaledSize: p ? new p.Size(s, i) : void 0,
|
|
884
|
+
anchor: p ? new p.Point(s / 2, i) : void 0
|
|
852
885
|
};
|
|
853
886
|
}
|
|
854
|
-
function
|
|
887
|
+
function mn({
|
|
855
888
|
marker: e,
|
|
856
889
|
label: t,
|
|
857
890
|
isSelected: n,
|
|
@@ -859,16 +892,16 @@ function ln({
|
|
|
859
892
|
onSelect: o,
|
|
860
893
|
onHover: s
|
|
861
894
|
}) {
|
|
862
|
-
const i =
|
|
863
|
-
() => i ?
|
|
895
|
+
const i = Ge(ve), u = R(
|
|
896
|
+
() => i ? un(i, r) : void 0,
|
|
864
897
|
[i, r]
|
|
865
898
|
);
|
|
866
|
-
return
|
|
899
|
+
return u ? /* @__PURE__ */ m(
|
|
867
900
|
Fe,
|
|
868
901
|
{
|
|
869
902
|
position: e.position,
|
|
870
903
|
title: t,
|
|
871
|
-
icon:
|
|
904
|
+
icon: u,
|
|
872
905
|
zIndex: r ? 1e3 : n ? 500 : void 0,
|
|
873
906
|
onClick: () => o(e.id),
|
|
874
907
|
onMouseOver: s ? () => s(e.id, !0, "pointer") : void 0,
|
|
@@ -876,7 +909,7 @@ function ln({
|
|
|
876
909
|
}
|
|
877
910
|
) : null;
|
|
878
911
|
}
|
|
879
|
-
function
|
|
912
|
+
function pn({
|
|
880
913
|
cluster: e,
|
|
881
914
|
label: t,
|
|
882
915
|
mapId: n,
|
|
@@ -884,45 +917,45 @@ function dn({
|
|
|
884
917
|
elements: o,
|
|
885
918
|
onActivate: s
|
|
886
919
|
}) {
|
|
887
|
-
const [i,
|
|
920
|
+
const [i, u] = C(null), p = `cluster:${e.id}`;
|
|
888
921
|
$(() => {
|
|
889
922
|
const l = re(i);
|
|
890
923
|
if (!l) return;
|
|
891
924
|
const f = o.current;
|
|
892
|
-
return f.set(
|
|
893
|
-
f.delete(
|
|
925
|
+
return f.set(p, l), l.style.outline = "none", () => {
|
|
926
|
+
f.delete(p);
|
|
894
927
|
};
|
|
895
|
-
}, [i, o,
|
|
896
|
-
const
|
|
897
|
-
() => n || !r ? null :
|
|
898
|
-
[n,
|
|
928
|
+
}, [i, o, p]);
|
|
929
|
+
const d = e.members.length, a = R(
|
|
930
|
+
() => n || !r ? null : ln(d, r),
|
|
931
|
+
[n, d, r]
|
|
899
932
|
);
|
|
900
|
-
return n ? /* @__PURE__ */
|
|
933
|
+
return n ? /* @__PURE__ */ m(
|
|
901
934
|
Ze,
|
|
902
935
|
{
|
|
903
|
-
ref:
|
|
936
|
+
ref: u,
|
|
904
937
|
position: e.position,
|
|
905
938
|
title: t,
|
|
906
939
|
"aria-label": t,
|
|
907
|
-
zIndex:
|
|
940
|
+
zIndex: Pe,
|
|
908
941
|
anchorPoint: ["50%", "50%"],
|
|
909
942
|
onClick: () => s(e),
|
|
910
|
-
children: /* @__PURE__ */
|
|
943
|
+
children: /* @__PURE__ */ m(an, { count: d })
|
|
911
944
|
}
|
|
912
|
-
) : /* @__PURE__ */
|
|
945
|
+
) : /* @__PURE__ */ m(
|
|
913
946
|
Fe,
|
|
914
947
|
{
|
|
915
948
|
position: e.position,
|
|
916
949
|
title: t,
|
|
917
|
-
zIndex:
|
|
950
|
+
zIndex: Pe,
|
|
918
951
|
icon: a == null ? void 0 : a.icon,
|
|
919
952
|
label: a == null ? void 0 : a.label,
|
|
920
953
|
onClick: () => s(e)
|
|
921
954
|
}
|
|
922
955
|
);
|
|
923
956
|
}
|
|
924
|
-
const
|
|
925
|
-
function
|
|
957
|
+
const fn = 100, hn = 30;
|
|
958
|
+
function gn({
|
|
926
959
|
markers: e,
|
|
927
960
|
fallbackZoom: t,
|
|
928
961
|
selectedMarkerId: n,
|
|
@@ -930,98 +963,98 @@ function pn({
|
|
|
930
963
|
renderMarker: o,
|
|
931
964
|
mapId: s,
|
|
932
965
|
frame: i,
|
|
933
|
-
elements:
|
|
934
|
-
labelFor:
|
|
935
|
-
onCameraMove:
|
|
966
|
+
elements: u,
|
|
967
|
+
labelFor: p,
|
|
968
|
+
onCameraMove: d,
|
|
936
969
|
onClusterClick: a
|
|
937
970
|
}) {
|
|
938
|
-
const l = W(), { t: f } = B("ui"),
|
|
939
|
-
() => Ot(e,
|
|
940
|
-
[e,
|
|
941
|
-
), { singles:
|
|
942
|
-
const
|
|
943
|
-
for (const
|
|
944
|
-
const P =
|
|
945
|
-
|
|
971
|
+
const l = W(), { t: f } = B("ui"), g = sn(t), c = Ge(ve), h = R(
|
|
972
|
+
() => Ot(e, g),
|
|
973
|
+
[e, g]
|
|
974
|
+
), { singles: w, clusters: b } = R(() => {
|
|
975
|
+
const y = (z) => z.id === n || z.id === r, E = h.singles.slice(), V = [];
|
|
976
|
+
for (const z of h.clusters) {
|
|
977
|
+
const P = z.members.filter((I) => !y(I));
|
|
978
|
+
E.push(...z.members.filter(y)), P.length > 1 ? V.push({ ...z, members: P }) : E.push(...P);
|
|
946
979
|
}
|
|
947
|
-
return { singles:
|
|
948
|
-
}, [
|
|
949
|
-
$(() => () => clearTimeout(
|
|
950
|
-
const
|
|
951
|
-
var
|
|
952
|
-
const
|
|
953
|
-
if (!l || !(
|
|
980
|
+
return { singles: E, clusters: V };
|
|
981
|
+
}, [h, n, r]), [M, L] = C(""), A = k(null), G = k(void 0);
|
|
982
|
+
$(() => () => clearTimeout(G.current), []);
|
|
983
|
+
const j = (y) => {
|
|
984
|
+
var _;
|
|
985
|
+
const E = (_ = l == null ? void 0 : l.getDiv) == null ? void 0 : _.call(l);
|
|
986
|
+
if (!l || !(E instanceof Element)) return;
|
|
954
987
|
const V = Math.min(
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
),
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
988
|
+
ge("--spacing-2xl", E, 48),
|
|
989
|
+
E.clientWidth / 4,
|
|
990
|
+
E.clientHeight / 4
|
|
991
|
+
), z = Qe(
|
|
992
|
+
y.members.map((S) => S.position),
|
|
993
|
+
E.clientWidth,
|
|
994
|
+
E.clientHeight,
|
|
962
995
|
V,
|
|
963
|
-
|
|
964
|
-
), P = l.getZoom() ??
|
|
965
|
-
|
|
966
|
-
Math.max(
|
|
967
|
-
),
|
|
968
|
-
|
|
969
|
-
ids: new Set(
|
|
970
|
-
centre:
|
|
971
|
-
},
|
|
972
|
-
() =>
|
|
973
|
-
|
|
974
|
-
),
|
|
975
|
-
count:
|
|
976
|
-
markerIds:
|
|
977
|
-
}), l.moveCamera({ center:
|
|
996
|
+
he
|
|
997
|
+
), P = l.getZoom() ?? g, I = Math.min(
|
|
998
|
+
he,
|
|
999
|
+
Math.max(z.zoom, Math.ceil(P + 1))
|
|
1000
|
+
), T = y.members.length;
|
|
1001
|
+
A.current = {
|
|
1002
|
+
ids: new Set(y.members.map((S) => S.id)),
|
|
1003
|
+
centre: y.position
|
|
1004
|
+
}, L(""), clearTimeout(G.current), G.current = setTimeout(
|
|
1005
|
+
() => L(f("mapView.clusterZoomed", { label: p(T) })),
|
|
1006
|
+
fn
|
|
1007
|
+
), d(), a == null || a({
|
|
1008
|
+
count: T,
|
|
1009
|
+
markerIds: y.members.map((S) => S.id)
|
|
1010
|
+
}), l.moveCamera({ center: z.center, zoom: I });
|
|
978
1011
|
};
|
|
979
1012
|
return $(() => {
|
|
980
|
-
const
|
|
981
|
-
if (!
|
|
982
|
-
let
|
|
983
|
-
const
|
|
984
|
-
let
|
|
985
|
-
for (const
|
|
986
|
-
if (!
|
|
1013
|
+
const y = A.current;
|
|
1014
|
+
if (!y) return;
|
|
1015
|
+
let E = 0, V = 0;
|
|
1016
|
+
const z = () => {
|
|
1017
|
+
let I = null;
|
|
1018
|
+
for (const _ of b) {
|
|
1019
|
+
if (!_.members.some((Y) => y.ids.has(Y.id)))
|
|
987
1020
|
continue;
|
|
988
|
-
const S = (
|
|
989
|
-
(!
|
|
1021
|
+
const S = (_.position.lat - y.centre.lat) ** 2 + (_.position.lng - y.centre.lng) ** 2;
|
|
1022
|
+
(!I || S < I.distance) && (I = { key: `cluster:${_.id}`, distance: S });
|
|
990
1023
|
}
|
|
991
|
-
if (
|
|
992
|
-
const
|
|
993
|
-
return
|
|
1024
|
+
if (I) return I.key;
|
|
1025
|
+
const T = w.find((_) => y.ids.has(_.id));
|
|
1026
|
+
return T ? `pin:${T.id}` : null;
|
|
994
1027
|
}, P = () => {
|
|
995
|
-
const
|
|
996
|
-
if (
|
|
997
|
-
|
|
1028
|
+
const I = z(), T = I ? u.current.get(I) : null;
|
|
1029
|
+
if (T && (T.focus({ preventScroll: !0 }), T.contains(document.activeElement))) {
|
|
1030
|
+
A.current = null;
|
|
998
1031
|
return;
|
|
999
1032
|
}
|
|
1000
|
-
if (V += 1, V <
|
|
1001
|
-
|
|
1033
|
+
if (V += 1, V < hn && s) {
|
|
1034
|
+
E = requestAnimationFrame(P);
|
|
1002
1035
|
return;
|
|
1003
1036
|
}
|
|
1004
|
-
|
|
1005
|
-
const
|
|
1006
|
-
|
|
1037
|
+
A.current = null;
|
|
1038
|
+
const _ = i == null ? void 0 : i.closest('[data-component="map-view"]');
|
|
1039
|
+
_ && (_.hasAttribute("tabindex") || _.setAttribute("tabindex", "-1"), _.focus({ preventScroll: !0 }));
|
|
1007
1040
|
};
|
|
1008
|
-
return
|
|
1009
|
-
}, [b,
|
|
1010
|
-
|
|
1011
|
-
b.map((
|
|
1012
|
-
|
|
1041
|
+
return E = requestAnimationFrame(P), () => cancelAnimationFrame(E);
|
|
1042
|
+
}, [b, w, u, i, s]), /* @__PURE__ */ N(ht, { children: [
|
|
1043
|
+
w.map(o),
|
|
1044
|
+
b.map((y) => /* @__PURE__ */ m(
|
|
1045
|
+
pn,
|
|
1013
1046
|
{
|
|
1014
|
-
cluster:
|
|
1015
|
-
label:
|
|
1047
|
+
cluster: y,
|
|
1048
|
+
label: p(y.members.length),
|
|
1016
1049
|
mapId: s,
|
|
1017
1050
|
iconTheme: c,
|
|
1018
|
-
elements:
|
|
1019
|
-
onActivate:
|
|
1051
|
+
elements: u,
|
|
1052
|
+
onActivate: j
|
|
1020
1053
|
},
|
|
1021
|
-
`${Math.floor(
|
|
1054
|
+
`${Math.floor(g)}:${y.id}`
|
|
1022
1055
|
)),
|
|
1023
|
-
i ?
|
|
1024
|
-
/* @__PURE__ */
|
|
1056
|
+
i ? je(
|
|
1057
|
+
/* @__PURE__ */ m("div", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: M }),
|
|
1025
1058
|
i
|
|
1026
1059
|
) : null
|
|
1027
1060
|
] });
|
|
@@ -1030,17 +1063,17 @@ const tt = (e) => {
|
|
|
1030
1063
|
var t, n;
|
|
1031
1064
|
return typeof ((n = (t = globalThis.google) == null ? void 0 : t.maps) == null ? void 0 : n[e]) == "function";
|
|
1032
1065
|
};
|
|
1033
|
-
function
|
|
1066
|
+
function Re() {
|
|
1034
1067
|
const { t: e } = B("ui");
|
|
1035
|
-
return /* @__PURE__ */
|
|
1068
|
+
return /* @__PURE__ */ N(
|
|
1036
1069
|
"div",
|
|
1037
1070
|
{
|
|
1038
1071
|
role: "status",
|
|
1039
1072
|
"data-testid": "map-view-loading",
|
|
1040
1073
|
className: "ds:[inline-size:100%] ds:[block-size:100%]",
|
|
1041
1074
|
children: [
|
|
1042
|
-
/* @__PURE__ */
|
|
1043
|
-
/* @__PURE__ */
|
|
1075
|
+
/* @__PURE__ */ m(xt, { variant: "rectangular", width: "100%", height: "100%" }),
|
|
1076
|
+
/* @__PURE__ */ m(We, { children: e("common.loading") })
|
|
1044
1077
|
]
|
|
1045
1078
|
}
|
|
1046
1079
|
);
|
|
@@ -1050,14 +1083,14 @@ function Ae({
|
|
|
1050
1083
|
onError: t
|
|
1051
1084
|
}) {
|
|
1052
1085
|
const { t: n } = B("ui");
|
|
1053
|
-
return /* @__PURE__ */
|
|
1086
|
+
return /* @__PURE__ */ N(
|
|
1054
1087
|
"div",
|
|
1055
1088
|
{
|
|
1056
1089
|
"data-testid": "map-view-loading",
|
|
1057
1090
|
className: "ds:relative ds:[inline-size:100%] ds:[block-size:100%]",
|
|
1058
1091
|
children: [
|
|
1059
|
-
/* @__PURE__ */
|
|
1060
|
-
/* @__PURE__ */
|
|
1092
|
+
/* @__PURE__ */ m(nt, { preview: e, onError: t }),
|
|
1093
|
+
/* @__PURE__ */ m("div", { role: "status", children: /* @__PURE__ */ m(We, { children: n("common.loading") }) })
|
|
1061
1094
|
]
|
|
1062
1095
|
}
|
|
1063
1096
|
);
|
|
@@ -1066,14 +1099,19 @@ function nt({
|
|
|
1066
1099
|
preview: e,
|
|
1067
1100
|
onError: t
|
|
1068
1101
|
}) {
|
|
1069
|
-
|
|
1102
|
+
var d, a;
|
|
1103
|
+
const n = (((d = e.sources) == null ? void 0 : d.length) ?? 0) > 0, r = k(null), o = Dt(e.sources, r), [s, i] = C(!n);
|
|
1104
|
+
ce(() => {
|
|
1105
|
+
i(!0);
|
|
1106
|
+
}, []);
|
|
1107
|
+
const u = (o !== null ? (a = e.sources) == null ? void 0 : a[o] : void 0) ?? e, p = /* @__PURE__ */ m(
|
|
1070
1108
|
"img",
|
|
1071
1109
|
{
|
|
1072
|
-
src:
|
|
1073
|
-
srcSet:
|
|
1110
|
+
src: u.src,
|
|
1111
|
+
srcSet: u.srcSet,
|
|
1074
1112
|
alt: e.alt,
|
|
1075
|
-
width:
|
|
1076
|
-
height:
|
|
1113
|
+
width: u.width,
|
|
1114
|
+
height: u.height,
|
|
1077
1115
|
loading: "lazy",
|
|
1078
1116
|
decoding: "async",
|
|
1079
1117
|
onError: t,
|
|
@@ -1081,8 +1119,17 @@ function nt({
|
|
|
1081
1119
|
className: "ds:block ds:[inline-size:100%] ds:[block-size:100%] ds:[object-fit:contain]"
|
|
1082
1120
|
}
|
|
1083
1121
|
);
|
|
1122
|
+
return n ? /* @__PURE__ */ m(
|
|
1123
|
+
"div",
|
|
1124
|
+
{
|
|
1125
|
+
ref: r,
|
|
1126
|
+
"data-testid": "map-view-preview-area",
|
|
1127
|
+
className: "ds:absolute ds:inset-0",
|
|
1128
|
+
children: s ? p : null
|
|
1129
|
+
}
|
|
1130
|
+
) : p;
|
|
1084
1131
|
}
|
|
1085
|
-
function
|
|
1132
|
+
function vn({
|
|
1086
1133
|
children: e,
|
|
1087
1134
|
pending: t,
|
|
1088
1135
|
holdUntilLoaded: n = !1
|
|
@@ -1090,18 +1137,18 @@ function fn({
|
|
|
1090
1137
|
const r = Mt();
|
|
1091
1138
|
return De("maps") || tt("Map") || !r && !n ? e : t;
|
|
1092
1139
|
}
|
|
1093
|
-
function
|
|
1140
|
+
function bn({ children: e }) {
|
|
1094
1141
|
return De("marker") || tt("Marker") ? e : null;
|
|
1095
1142
|
}
|
|
1096
1143
|
function ot(e, t) {
|
|
1097
|
-
|
|
1144
|
+
ce(() => {
|
|
1098
1145
|
const n = e.current;
|
|
1099
1146
|
return () => {
|
|
1100
1147
|
t == null || t(!!(n && n.contains(document.activeElement)));
|
|
1101
1148
|
};
|
|
1102
1149
|
}, [e, t]);
|
|
1103
1150
|
}
|
|
1104
|
-
function
|
|
1151
|
+
function wn({
|
|
1105
1152
|
preview: e,
|
|
1106
1153
|
onLoadMap: t,
|
|
1107
1154
|
consentCta: n,
|
|
@@ -1110,52 +1157,53 @@ function gn({
|
|
|
1110
1157
|
openInGoogleMapsHref: s,
|
|
1111
1158
|
onUnmount: i
|
|
1112
1159
|
}) {
|
|
1113
|
-
const { t:
|
|
1114
|
-
return ot(
|
|
1160
|
+
const { t: u } = B("ui"), p = Oe(), d = k(null);
|
|
1161
|
+
return ot(d, i), /* @__PURE__ */ N(
|
|
1115
1162
|
"div",
|
|
1116
1163
|
{
|
|
1117
|
-
ref:
|
|
1118
|
-
className: "ds:absolute ds:inset-0 ds:bg-[var(--muted)]",
|
|
1164
|
+
ref: d,
|
|
1165
|
+
className: "ds:absolute ds:inset-0 ds:@container/mapbar ds:bg-[var(--muted)]",
|
|
1119
1166
|
"data-testid": "map-view-preview",
|
|
1120
1167
|
children: [
|
|
1121
|
-
/* @__PURE__ */
|
|
1122
|
-
/* @__PURE__ */
|
|
1168
|
+
/* @__PURE__ */ m(nt, { preview: e, onError: r }),
|
|
1169
|
+
/* @__PURE__ */ m("div", { className: "ds:absolute ds:start-0 ds:end-0 ds:top-[var(--map-preview-inset-block-start,var(--spacing-sm))] ds:px-[var(--spacing-sm)]", children: /* @__PURE__ */ N(
|
|
1123
1170
|
"div",
|
|
1124
1171
|
{
|
|
1125
1172
|
"data-testid": "map-view-preview-plate",
|
|
1126
|
-
className: "ds:flex ds:
|
|
1173
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:rounded-[var(--radius-md)] ds:bg-[color-mix(in_srgb,var(--popover)_calc(100%-(100%-var(--glass-surface-alpha,85%))*0.27),transparent)] ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-sm)] ds:backdrop-blur-md ds:contrast-more:bg-[var(--popover)] ds:[@media(prefers-reduced-transparency:reduce)]:bg-[var(--popover)] ds:forced-colors:bg-[Canvas] ds:[:where(&)]:border-[length:var(--surface-border-width,var(--border-width-sm))] ds:border-[color:var(--border)] ds:shadow-[var(--shadow-sm)] ds:@[640px]/mapbar:flex-row ds:@[640px]/mapbar:items-center ds:@[640px]/mapbar:gap-[var(--spacing-md)]",
|
|
1127
1174
|
children: [
|
|
1128
|
-
/* @__PURE__ */
|
|
1175
|
+
/* @__PURE__ */ m(
|
|
1129
1176
|
"p",
|
|
1130
1177
|
{
|
|
1131
|
-
id:
|
|
1132
|
-
className: "type-meta ds:m-0 ds:text-[var(--
|
|
1178
|
+
id: p,
|
|
1179
|
+
className: "type-meta ds:m-0 ds:min-w-0 ds:flex-1 ds:text-[var(--foreground)]",
|
|
1133
1180
|
children: o
|
|
1134
1181
|
}
|
|
1135
1182
|
),
|
|
1136
|
-
/* @__PURE__ */
|
|
1137
|
-
n ?? /* @__PURE__ */
|
|
1183
|
+
/* @__PURE__ */ N("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-sm)] ds:gap-y-[var(--spacing-2xs)]", children: [
|
|
1184
|
+
n ?? /* @__PURE__ */ m(
|
|
1138
1185
|
Ue,
|
|
1139
1186
|
{
|
|
1140
1187
|
type: "button",
|
|
1141
|
-
intent: "
|
|
1142
|
-
size: "
|
|
1188
|
+
intent: "secondary",
|
|
1189
|
+
size: "sm",
|
|
1190
|
+
className: "ds:min-h-[var(--min-target-size)] ds:sm:min-h-[var(--min-target-size)]",
|
|
1143
1191
|
onClick: t,
|
|
1144
|
-
"aria-describedby":
|
|
1192
|
+
"aria-describedby": p,
|
|
1145
1193
|
"data-testid": "map-view-load-cta",
|
|
1146
|
-
children:
|
|
1194
|
+
children: u("mapView.consentTitle")
|
|
1147
1195
|
}
|
|
1148
1196
|
),
|
|
1149
|
-
/* @__PURE__ */
|
|
1197
|
+
/* @__PURE__ */ N(
|
|
1150
1198
|
"a",
|
|
1151
1199
|
{
|
|
1152
1200
|
href: s,
|
|
1153
1201
|
target: "_blank",
|
|
1154
1202
|
rel: "noopener noreferrer",
|
|
1155
|
-
className: "ds:inline-flex ds:min-h-[var(--min-target-size)] ds:items-center ds:gap-[var(--spacing-2xs)] ds:text-[var(--primary-readable)] ds:underline ds:underline-offset-2",
|
|
1203
|
+
className: "ds:ms-auto ds:inline-flex ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)] ds:items-center ds:justify-center ds:gap-[var(--spacing-2xs)] ds:rounded-[var(--radius-sm)] ds:text-[var(--primary-readable)] ds:underline ds:underline-offset-2 ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
1156
1204
|
children: [
|
|
1157
|
-
m("mapView.openInGoogleMaps"),
|
|
1158
|
-
/* @__PURE__ */
|
|
1205
|
+
/* @__PURE__ */ m("span", { className: "ds:sr-only ds:@[640px]/mapbar:not-sr-only", children: u("mapView.openInGoogleMaps") }),
|
|
1206
|
+
/* @__PURE__ */ m(Be, { "aria-hidden": "true", className: "ds:size-4" })
|
|
1159
1207
|
]
|
|
1160
1208
|
}
|
|
1161
1209
|
)
|
|
@@ -1167,7 +1215,7 @@ function gn({
|
|
|
1167
1215
|
}
|
|
1168
1216
|
);
|
|
1169
1217
|
}
|
|
1170
|
-
function
|
|
1218
|
+
function Ve({
|
|
1171
1219
|
address: e,
|
|
1172
1220
|
contentLang: t,
|
|
1173
1221
|
description: n,
|
|
@@ -1176,39 +1224,39 @@ function Re({
|
|
|
1176
1224
|
consentCta: s,
|
|
1177
1225
|
onUnmount: i
|
|
1178
1226
|
}) {
|
|
1179
|
-
const { t:
|
|
1180
|
-
return ot(
|
|
1227
|
+
const { t: u } = B("ui"), p = k(null);
|
|
1228
|
+
return ot(p, i), /* @__PURE__ */ N(
|
|
1181
1229
|
"div",
|
|
1182
1230
|
{
|
|
1183
|
-
ref:
|
|
1184
|
-
className:
|
|
1231
|
+
ref: p,
|
|
1232
|
+
className: Ut(),
|
|
1185
1233
|
"data-testid": "map-view-consent",
|
|
1186
1234
|
children: [
|
|
1187
|
-
/* @__PURE__ */
|
|
1188
|
-
|
|
1235
|
+
/* @__PURE__ */ m(
|
|
1236
|
+
_t,
|
|
1189
1237
|
{
|
|
1190
1238
|
"aria-hidden": "true",
|
|
1191
1239
|
className: "ds:size-6 ds:text-[var(--muted-foreground)]"
|
|
1192
1240
|
}
|
|
1193
1241
|
),
|
|
1194
|
-
/* @__PURE__ */
|
|
1195
|
-
e ? /* @__PURE__ */
|
|
1242
|
+
/* @__PURE__ */ m("p", { className: Wt(), children: u("mapView.consentTitle") }),
|
|
1243
|
+
e ? /* @__PURE__ */ m(
|
|
1196
1244
|
"p",
|
|
1197
1245
|
{
|
|
1198
|
-
className:
|
|
1246
|
+
className: Te(),
|
|
1199
1247
|
"data-testid": "map-view-address",
|
|
1200
1248
|
lang: t,
|
|
1201
1249
|
children: e
|
|
1202
1250
|
}
|
|
1203
1251
|
) : null,
|
|
1204
|
-
/* @__PURE__ */
|
|
1205
|
-
/* @__PURE__ */
|
|
1252
|
+
/* @__PURE__ */ m("p", { className: Te(), children: n }),
|
|
1253
|
+
/* @__PURE__ */ N(
|
|
1206
1254
|
"div",
|
|
1207
1255
|
{
|
|
1208
1256
|
className: "ds:flex ds:gap-[var(--spacing-sm)] ds:flex-wrap ds:items-center ds:justify-center",
|
|
1209
1257
|
"data-testid": "map-view-consent-actions",
|
|
1210
1258
|
children: [
|
|
1211
|
-
s ?? /* @__PURE__ */
|
|
1259
|
+
s ?? /* @__PURE__ */ m(
|
|
1212
1260
|
Ue,
|
|
1213
1261
|
{
|
|
1214
1262
|
type: "button",
|
|
@@ -1216,10 +1264,10 @@ function Re({
|
|
|
1216
1264
|
size: "sm",
|
|
1217
1265
|
onClick: r,
|
|
1218
1266
|
"data-testid": "map-view-load-cta",
|
|
1219
|
-
children:
|
|
1267
|
+
children: u("mapView.consentCta")
|
|
1220
1268
|
}
|
|
1221
1269
|
),
|
|
1222
|
-
/* @__PURE__ */
|
|
1270
|
+
/* @__PURE__ */ N(
|
|
1223
1271
|
"a",
|
|
1224
1272
|
{
|
|
1225
1273
|
href: o,
|
|
@@ -1227,8 +1275,8 @@ function Re({
|
|
|
1227
1275
|
rel: "noopener noreferrer",
|
|
1228
1276
|
className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)] ds:text-[var(--primary-readable)] ds:underline ds:underline-offset-2",
|
|
1229
1277
|
children: [
|
|
1230
|
-
|
|
1231
|
-
/* @__PURE__ */
|
|
1278
|
+
u("mapView.openInGoogleMaps"),
|
|
1279
|
+
/* @__PURE__ */ m(Be, { "aria-hidden": "true", className: "ds:size-3" })
|
|
1232
1280
|
]
|
|
1233
1281
|
}
|
|
1234
1282
|
)
|
|
@@ -1239,7 +1287,7 @@ function Re({
|
|
|
1239
1287
|
}
|
|
1240
1288
|
);
|
|
1241
1289
|
}
|
|
1242
|
-
const
|
|
1290
|
+
const yn = gt(
|
|
1243
1291
|
({
|
|
1244
1292
|
id: e,
|
|
1245
1293
|
apiKey: t,
|
|
@@ -1248,288 +1296,288 @@ const vn = gt(
|
|
|
1248
1296
|
markers: o,
|
|
1249
1297
|
selectedMarkerId: s,
|
|
1250
1298
|
hoveredMarkerId: i,
|
|
1251
|
-
renderMarkerCard:
|
|
1252
|
-
onMarkerHover:
|
|
1253
|
-
onMarkerClick:
|
|
1299
|
+
renderMarkerCard: u,
|
|
1300
|
+
onMarkerHover: p,
|
|
1301
|
+
onMarkerClick: d,
|
|
1254
1302
|
onBoundsChange: a,
|
|
1255
1303
|
consentGranted: l = !1,
|
|
1256
1304
|
onConsentRequest: f,
|
|
1257
|
-
staticPreview:
|
|
1305
|
+
staticPreview: g,
|
|
1258
1306
|
address: c,
|
|
1259
|
-
contentLang:
|
|
1260
|
-
consentDescription:
|
|
1307
|
+
contentLang: h,
|
|
1308
|
+
consentDescription: w,
|
|
1261
1309
|
consentCta: b,
|
|
1262
|
-
mapId:
|
|
1263
|
-
size:
|
|
1264
|
-
surface:
|
|
1265
|
-
ariaLabel:
|
|
1266
|
-
fitToPoints:
|
|
1267
|
-
fitKey:
|
|
1268
|
-
fitMaxZoom:
|
|
1310
|
+
mapId: M,
|
|
1311
|
+
size: L,
|
|
1312
|
+
surface: A,
|
|
1313
|
+
ariaLabel: G,
|
|
1314
|
+
fitToPoints: j,
|
|
1315
|
+
fitKey: y,
|
|
1316
|
+
fitMaxZoom: E = 15,
|
|
1269
1317
|
clusterMarkers: V = "auto",
|
|
1270
|
-
clusterLabel:
|
|
1318
|
+
clusterLabel: z,
|
|
1271
1319
|
onClusterClick: P,
|
|
1272
|
-
className:
|
|
1273
|
-
...
|
|
1274
|
-
},
|
|
1275
|
-
const { t: S, i18n: Y } = B("ui"),
|
|
1276
|
-
() =>
|
|
1277
|
-
[
|
|
1278
|
-
), Z = Q.length > 0,
|
|
1320
|
+
className: I,
|
|
1321
|
+
...T
|
|
1322
|
+
}, _) => {
|
|
1323
|
+
const { t: S, i18n: Y } = B("ui"), be = k(/* @__PURE__ */ new Map()), Q = R(() => j ?? [], [j]), st = R(
|
|
1324
|
+
() => y ?? Q.map((v) => `${et(v)}@${v.lat},${v.lng}`).sort().join("|"),
|
|
1325
|
+
[y, Q]
|
|
1326
|
+
), Z = Q.length > 0, we = k(Z), ye = Oe(), rt = R(
|
|
1279
1327
|
() => `map-${ye.replace(/[^a-zA-Z0-9-_]/g, "")}`,
|
|
1280
1328
|
[ye]
|
|
1281
|
-
), [
|
|
1329
|
+
), [ke, it] = C(!1);
|
|
1282
1330
|
$(() => {
|
|
1283
1331
|
if (typeof window > "u") return;
|
|
1284
|
-
const
|
|
1285
|
-
return
|
|
1332
|
+
const v = window.matchMedia("(prefers-reduced-motion: reduce)"), x = () => it(v.matches);
|
|
1333
|
+
return x(), v.addEventListener("change", x), () => v.removeEventListener("change", x);
|
|
1286
1334
|
}, []);
|
|
1287
|
-
const
|
|
1335
|
+
const le = R(() => `https://www.google.com/maps/search/?api=1&query=${c ? encodeURIComponent(c) : `${n.lat},${n.lng}`}`, [c, n.lat, n.lng]), O = k(null), Me = k({
|
|
1288
1336
|
pendingInput: !1,
|
|
1289
1337
|
moved: !1,
|
|
1290
1338
|
programmatic: !1
|
|
1291
1339
|
}), K = D(() => {
|
|
1292
|
-
|
|
1340
|
+
Me.current = {
|
|
1293
1341
|
pendingInput: !1,
|
|
1294
1342
|
moved: !1,
|
|
1295
1343
|
programmatic: !0
|
|
1296
1344
|
};
|
|
1297
1345
|
}, []), ee = D(
|
|
1298
|
-
(
|
|
1299
|
-
K(),
|
|
1346
|
+
(v) => {
|
|
1347
|
+
K(), d == null || d(v);
|
|
1300
1348
|
},
|
|
1301
|
-
[K,
|
|
1302
|
-
), [
|
|
1303
|
-
() => i != null &&
|
|
1304
|
-
[i,
|
|
1305
|
-
), ct = D((
|
|
1306
|
-
O.current =
|
|
1307
|
-
}, []),
|
|
1349
|
+
[K, d]
|
|
1350
|
+
), [xe, at] = C(null), de = R(
|
|
1351
|
+
() => i != null && u ? (o ?? []).find((v) => v.id === i) ?? null : null,
|
|
1352
|
+
[i, u, o]
|
|
1353
|
+
), ct = D((v) => {
|
|
1354
|
+
O.current = v;
|
|
1355
|
+
}, []), ze = k(!1), Ee = k(null), _e = k(0), te = D(
|
|
1308
1356
|
() => ({
|
|
1309
|
-
panTo: (
|
|
1310
|
-
var
|
|
1311
|
-
return (
|
|
1357
|
+
panTo: (v) => {
|
|
1358
|
+
var x;
|
|
1359
|
+
return (x = O.current) == null ? void 0 : x.panTo(v);
|
|
1312
1360
|
},
|
|
1313
|
-
setZoom: (
|
|
1314
|
-
var
|
|
1315
|
-
return (
|
|
1361
|
+
setZoom: (v) => {
|
|
1362
|
+
var x;
|
|
1363
|
+
return (x = O.current) == null ? void 0 : x.setZoom(v);
|
|
1316
1364
|
},
|
|
1317
|
-
selectMarker: (
|
|
1318
|
-
var
|
|
1319
|
-
return (
|
|
1365
|
+
selectMarker: (v) => {
|
|
1366
|
+
var x;
|
|
1367
|
+
return (x = O.current) == null ? void 0 : x.selectMarker(v);
|
|
1320
1368
|
},
|
|
1321
1369
|
// Without `isConsentGranted` an agent has no way to learn that
|
|
1322
1370
|
// its pan / zoom / select was swallowed by the GDPR gate rather
|
|
1323
1371
|
// than applied: under the default (`consentGranted={false}`) the
|
|
1324
1372
|
// whole Maps subtree is unmounted and every action optional-chains
|
|
1325
1373
|
// into nothing.
|
|
1326
|
-
isConsentGranted: () =>
|
|
1374
|
+
isConsentGranted: () => ze.current,
|
|
1327
1375
|
getCenter: () => {
|
|
1328
|
-
var
|
|
1329
|
-
return ((
|
|
1376
|
+
var v;
|
|
1377
|
+
return ((v = O.current) == null ? void 0 : v.getCenter()) ?? null;
|
|
1330
1378
|
},
|
|
1331
1379
|
getZoom: () => {
|
|
1332
|
-
var
|
|
1333
|
-
return ((
|
|
1380
|
+
var v;
|
|
1381
|
+
return ((v = O.current) == null ? void 0 : v.getZoom()) ?? null;
|
|
1334
1382
|
},
|
|
1335
1383
|
getSelectedMarkerId: () => Ee.current,
|
|
1336
1384
|
getMarkerCount: () => _e.current
|
|
1337
1385
|
}),
|
|
1338
1386
|
[]
|
|
1339
1387
|
);
|
|
1340
|
-
vt(
|
|
1341
|
-
const lt =
|
|
1388
|
+
vt(_, te, [te]);
|
|
1389
|
+
const lt = R(
|
|
1342
1390
|
() => te(),
|
|
1343
1391
|
[te]
|
|
1344
1392
|
);
|
|
1345
|
-
|
|
1346
|
-
var
|
|
1347
|
-
const
|
|
1348
|
-
if (
|
|
1349
|
-
if (
|
|
1350
|
-
(
|
|
1393
|
+
Et(St, lt, e), $(() => {
|
|
1394
|
+
var x, U;
|
|
1395
|
+
const v = we.current && !Z;
|
|
1396
|
+
if (we.current = Z, !Z) {
|
|
1397
|
+
if (v) {
|
|
1398
|
+
(x = O.current) == null || x.jumpTo(n, r);
|
|
1351
1399
|
return;
|
|
1352
1400
|
}
|
|
1353
|
-
|
|
1401
|
+
ke || (U = O.current) == null || U.panTo(n);
|
|
1354
1402
|
}
|
|
1355
|
-
}, [n.lat, n.lng,
|
|
1356
|
-
var
|
|
1357
|
-
Z || (
|
|
1403
|
+
}, [n.lat, n.lng, ke, Z]), $(() => {
|
|
1404
|
+
var v;
|
|
1405
|
+
Z || (v = O.current) == null || v.setZoom(r);
|
|
1358
1406
|
}, [r, Z]);
|
|
1359
|
-
const [dt,
|
|
1360
|
-
|
|
1361
|
-
const [ut, mt] =
|
|
1362
|
-
|
|
1363
|
-
}, [
|
|
1364
|
-
|
|
1407
|
+
const [dt, Se] = C(!1), ne = l || dt;
|
|
1408
|
+
ze.current = ne, Ee.current = s ?? null, _e.current = (o ?? []).length;
|
|
1409
|
+
const [ut, mt] = C(null), F = g && g.src !== ut ? g : void 0, ue = g == null ? void 0 : g.src, me = D(() => {
|
|
1410
|
+
ue && mt(ue);
|
|
1411
|
+
}, [ue]), $e = k(null), pe = k(!1), fe = k(!1), Ie = D((v) => {
|
|
1412
|
+
fe.current = v;
|
|
1365
1413
|
}, []);
|
|
1366
1414
|
$(() => {
|
|
1367
1415
|
var H;
|
|
1368
1416
|
if (!ne) return;
|
|
1369
|
-
const
|
|
1370
|
-
|
|
1417
|
+
const v = document.activeElement, x = !v || v === document.body, U = pe.current || fe.current && x;
|
|
1418
|
+
pe.current = !1, fe.current = !1, U && ((H = $e.current) == null || H.focus({ preventScroll: !0 }));
|
|
1371
1419
|
}, [ne]);
|
|
1372
|
-
const
|
|
1373
|
-
if (
|
|
1374
|
-
f(),
|
|
1420
|
+
const Ce = D(() => {
|
|
1421
|
+
if (pe.current = !0, f) {
|
|
1422
|
+
f(), Se(!0);
|
|
1375
1423
|
return;
|
|
1376
1424
|
}
|
|
1377
|
-
|
|
1378
|
-
}, [f]),
|
|
1379
|
-
const
|
|
1380
|
-
label:
|
|
1425
|
+
Se(!0);
|
|
1426
|
+
}, [f]), Le = (v) => {
|
|
1427
|
+
const x = s != null && s === v.id, U = i != null && i === v.id, H = S("mapView.markerLabel", {
|
|
1428
|
+
label: v.label ?? v.id
|
|
1381
1429
|
});
|
|
1382
|
-
return
|
|
1383
|
-
|
|
1430
|
+
return M ? /* @__PURE__ */ m(
|
|
1431
|
+
Qt,
|
|
1384
1432
|
{
|
|
1385
|
-
marker:
|
|
1433
|
+
marker: v,
|
|
1386
1434
|
label: H,
|
|
1387
|
-
isSelected:
|
|
1435
|
+
isSelected: x,
|
|
1388
1436
|
isHovered: U,
|
|
1389
1437
|
onSelect: ee,
|
|
1390
|
-
onHover:
|
|
1391
|
-
elements:
|
|
1438
|
+
onHover: p,
|
|
1439
|
+
elements: be
|
|
1392
1440
|
},
|
|
1393
|
-
|
|
1394
|
-
) : /* @__PURE__ */
|
|
1395
|
-
|
|
1441
|
+
v.id
|
|
1442
|
+
) : /* @__PURE__ */ m(
|
|
1443
|
+
mn,
|
|
1396
1444
|
{
|
|
1397
|
-
marker:
|
|
1445
|
+
marker: v,
|
|
1398
1446
|
label: H,
|
|
1399
|
-
isSelected:
|
|
1447
|
+
isSelected: x,
|
|
1400
1448
|
isHovered: U,
|
|
1401
1449
|
onSelect: ee,
|
|
1402
|
-
onHover:
|
|
1450
|
+
onHover: p
|
|
1403
1451
|
},
|
|
1404
|
-
|
|
1452
|
+
v.id
|
|
1405
1453
|
);
|
|
1406
1454
|
}, pt = D(
|
|
1407
|
-
(
|
|
1408
|
-
[
|
|
1455
|
+
(v) => typeof z == "function" ? z(v) : typeof z == "string" ? z.replaceAll("{count}", String(v)) : S("mapView.clusterLabel", { count: v }),
|
|
1456
|
+
[z, S]
|
|
1409
1457
|
), ft = Vt(V, (o ?? []).length);
|
|
1410
|
-
return /* @__PURE__ */
|
|
1458
|
+
return /* @__PURE__ */ m(
|
|
1411
1459
|
"div",
|
|
1412
1460
|
{
|
|
1413
|
-
ref:
|
|
1414
|
-
className:
|
|
1461
|
+
ref: $e,
|
|
1462
|
+
className: Zt({ size: L, surface: A, className: I }),
|
|
1415
1463
|
"data-component": "map-view",
|
|
1416
1464
|
"data-component-id": e ?? rt,
|
|
1417
1465
|
role: "region",
|
|
1418
|
-
"aria-label":
|
|
1466
|
+
"aria-label": G ?? S("mapView.label"),
|
|
1419
1467
|
tabIndex: -1,
|
|
1420
|
-
...
|
|
1421
|
-
children: /* @__PURE__ */
|
|
1468
|
+
...T,
|
|
1469
|
+
children: /* @__PURE__ */ m(
|
|
1422
1470
|
"div",
|
|
1423
1471
|
{
|
|
1424
1472
|
ref: at,
|
|
1425
|
-
className:
|
|
1473
|
+
className: Ft({ size: L, className: "ds:relative" }),
|
|
1426
1474
|
children: ne ? (
|
|
1427
1475
|
// A provider failure shows the consent placeholder (its "Open in
|
|
1428
1476
|
// Google Maps" link needs no script) with "Load map" as the
|
|
1429
1477
|
// retry, instead of unmounting the host's React tree. The gate
|
|
1430
1478
|
// starts the provider only once Google's `core` and `maps`
|
|
1431
1479
|
// libraries have arrived.
|
|
1432
|
-
/* @__PURE__ */
|
|
1433
|
-
|
|
1480
|
+
/* @__PURE__ */ m(
|
|
1481
|
+
zt,
|
|
1434
1482
|
{
|
|
1435
|
-
fallback: ({ reset:
|
|
1436
|
-
|
|
1483
|
+
fallback: ({ reset: v }) => /* @__PURE__ */ m(
|
|
1484
|
+
Ve,
|
|
1437
1485
|
{
|
|
1438
1486
|
address: c,
|
|
1439
|
-
contentLang:
|
|
1440
|
-
description:
|
|
1441
|
-
onLoadMap:
|
|
1487
|
+
contentLang: h,
|
|
1488
|
+
description: w ?? S("mapView.consentDescription"),
|
|
1489
|
+
onLoadMap: v,
|
|
1442
1490
|
consentCta: void 0,
|
|
1443
|
-
openInGoogleMapsHref:
|
|
1491
|
+
openInGoogleMapsHref: le
|
|
1444
1492
|
}
|
|
1445
1493
|
),
|
|
1446
|
-
children: /* @__PURE__ */
|
|
1447
|
-
|
|
1494
|
+
children: /* @__PURE__ */ m(
|
|
1495
|
+
wt,
|
|
1448
1496
|
{
|
|
1449
1497
|
libraries: ["maps"],
|
|
1450
|
-
pending: F ? /* @__PURE__ */
|
|
1498
|
+
pending: F ? /* @__PURE__ */ m(
|
|
1451
1499
|
Ae,
|
|
1452
1500
|
{
|
|
1453
1501
|
preview: F,
|
|
1454
|
-
onError:
|
|
1502
|
+
onError: me
|
|
1455
1503
|
}
|
|
1456
|
-
) : /* @__PURE__ */
|
|
1457
|
-
children: /* @__PURE__ */
|
|
1458
|
-
|
|
1504
|
+
) : /* @__PURE__ */ m(Re, {}),
|
|
1505
|
+
children: /* @__PURE__ */ m(
|
|
1506
|
+
yt,
|
|
1459
1507
|
{
|
|
1460
1508
|
apiKey: t,
|
|
1461
1509
|
language: Y.language,
|
|
1462
|
-
children: /* @__PURE__ */
|
|
1463
|
-
|
|
1510
|
+
children: /* @__PURE__ */ m(
|
|
1511
|
+
vn,
|
|
1464
1512
|
{
|
|
1465
1513
|
holdUntilLoaded: !!F,
|
|
1466
|
-
pending: F ? /* @__PURE__ */
|
|
1514
|
+
pending: F ? /* @__PURE__ */ m(
|
|
1467
1515
|
Ae,
|
|
1468
1516
|
{
|
|
1469
1517
|
preview: F,
|
|
1470
|
-
onError:
|
|
1518
|
+
onError: me
|
|
1471
1519
|
}
|
|
1472
|
-
) : /* @__PURE__ */
|
|
1473
|
-
children: /* @__PURE__ */
|
|
1520
|
+
) : /* @__PURE__ */ m(Re, {}),
|
|
1521
|
+
children: /* @__PURE__ */ N(
|
|
1474
1522
|
kt,
|
|
1475
1523
|
{
|
|
1476
1524
|
defaultCenter: n,
|
|
1477
1525
|
defaultZoom: r,
|
|
1478
|
-
mapId:
|
|
1526
|
+
mapId: M,
|
|
1479
1527
|
gestureHandling: "cooperative",
|
|
1480
1528
|
disableDefaultUI: !1,
|
|
1481
1529
|
onClick: () => ee(null),
|
|
1482
1530
|
className: "ds:[inline-size:100%] ds:[block-size:100%]",
|
|
1483
1531
|
children: [
|
|
1484
|
-
/* @__PURE__ */
|
|
1485
|
-
|
|
1532
|
+
/* @__PURE__ */ m(
|
|
1533
|
+
Bt,
|
|
1486
1534
|
{
|
|
1487
1535
|
onHandleReady: ct,
|
|
1488
1536
|
onMarkerSelect: ee,
|
|
1489
1537
|
onCameraMove: K
|
|
1490
1538
|
}
|
|
1491
1539
|
),
|
|
1492
|
-
a ? /* @__PURE__ */
|
|
1493
|
-
|
|
1540
|
+
a ? /* @__PURE__ */ m(
|
|
1541
|
+
Kt,
|
|
1494
1542
|
{
|
|
1495
1543
|
onBoundsChange: a,
|
|
1496
|
-
userInteraction:
|
|
1544
|
+
userInteraction: Me
|
|
1497
1545
|
}
|
|
1498
1546
|
) : null,
|
|
1499
|
-
|
|
1500
|
-
|
|
1547
|
+
j ? /* @__PURE__ */ m(
|
|
1548
|
+
on,
|
|
1501
1549
|
{
|
|
1502
1550
|
points: Q,
|
|
1503
1551
|
fitKey: st,
|
|
1504
|
-
maxZoom:
|
|
1552
|
+
maxZoom: E,
|
|
1505
1553
|
onCameraMove: K
|
|
1506
1554
|
}
|
|
1507
1555
|
) : null,
|
|
1508
|
-
|
|
1509
|
-
|
|
1556
|
+
de && u ? /* @__PURE__ */ m(
|
|
1557
|
+
qt,
|
|
1510
1558
|
{
|
|
1511
|
-
marker:
|
|
1512
|
-
frame:
|
|
1559
|
+
marker: de,
|
|
1560
|
+
frame: xe,
|
|
1513
1561
|
direction: Y.dir(),
|
|
1514
|
-
children:
|
|
1562
|
+
children: u(de.id)
|
|
1515
1563
|
}
|
|
1516
1564
|
) : null,
|
|
1517
|
-
/* @__PURE__ */
|
|
1518
|
-
|
|
1565
|
+
/* @__PURE__ */ m(bn, { children: /* @__PURE__ */ m(dn, { enabled: !M, children: ft ? /* @__PURE__ */ m(
|
|
1566
|
+
gn,
|
|
1519
1567
|
{
|
|
1520
1568
|
markers: o ?? [],
|
|
1521
1569
|
fallbackZoom: r,
|
|
1522
1570
|
selectedMarkerId: s ?? null,
|
|
1523
1571
|
hoveredMarkerId: i ?? null,
|
|
1524
|
-
renderMarker:
|
|
1525
|
-
mapId: !!
|
|
1526
|
-
frame:
|
|
1527
|
-
elements:
|
|
1572
|
+
renderMarker: Le,
|
|
1573
|
+
mapId: !!M,
|
|
1574
|
+
frame: xe,
|
|
1575
|
+
elements: be,
|
|
1528
1576
|
labelFor: pt,
|
|
1529
1577
|
onCameraMove: K,
|
|
1530
1578
|
onClusterClick: P
|
|
1531
1579
|
}
|
|
1532
|
-
) : (o ?? []).map(
|
|
1580
|
+
) : (o ?? []).map(Le) }) })
|
|
1533
1581
|
]
|
|
1534
1582
|
}
|
|
1535
1583
|
)
|
|
@@ -1541,27 +1589,27 @@ const vn = gt(
|
|
|
1541
1589
|
)
|
|
1542
1590
|
}
|
|
1543
1591
|
)
|
|
1544
|
-
) : F ? /* @__PURE__ */
|
|
1545
|
-
|
|
1592
|
+
) : F ? /* @__PURE__ */ m(
|
|
1593
|
+
wn,
|
|
1546
1594
|
{
|
|
1547
1595
|
preview: F,
|
|
1548
|
-
onLoadMap:
|
|
1596
|
+
onLoadMap: Ce,
|
|
1549
1597
|
consentCta: b,
|
|
1550
|
-
onImageError:
|
|
1551
|
-
description:
|
|
1552
|
-
openInGoogleMapsHref:
|
|
1553
|
-
onUnmount:
|
|
1598
|
+
onImageError: me,
|
|
1599
|
+
description: w ?? S("mapView.consentDescription"),
|
|
1600
|
+
openInGoogleMapsHref: le,
|
|
1601
|
+
onUnmount: Ie
|
|
1554
1602
|
}
|
|
1555
|
-
) : /* @__PURE__ */
|
|
1556
|
-
|
|
1603
|
+
) : /* @__PURE__ */ m(
|
|
1604
|
+
Ve,
|
|
1557
1605
|
{
|
|
1558
1606
|
address: c,
|
|
1559
|
-
contentLang:
|
|
1560
|
-
description:
|
|
1561
|
-
onLoadMap:
|
|
1607
|
+
contentLang: h,
|
|
1608
|
+
description: w ?? S("mapView.consentDescription"),
|
|
1609
|
+
onLoadMap: Ce,
|
|
1562
1610
|
consentCta: b,
|
|
1563
|
-
openInGoogleMapsHref:
|
|
1564
|
-
onUnmount:
|
|
1611
|
+
openInGoogleMapsHref: le,
|
|
1612
|
+
onUnmount: Ie
|
|
1565
1613
|
}
|
|
1566
1614
|
)
|
|
1567
1615
|
}
|
|
@@ -1570,9 +1618,9 @@ const vn = gt(
|
|
|
1570
1618
|
);
|
|
1571
1619
|
}
|
|
1572
1620
|
);
|
|
1573
|
-
|
|
1621
|
+
yn.displayName = "MapView";
|
|
1574
1622
|
export {
|
|
1575
|
-
|
|
1576
|
-
|
|
1623
|
+
yn as M,
|
|
1624
|
+
Ne as i
|
|
1577
1625
|
};
|
|
1578
|
-
//# sourceMappingURL=map-view-
|
|
1626
|
+
//# sourceMappingURL=map-view-QWdQLHi9.js.map
|