@alfadocs/ui-kit-debug 1.117.0 → 1.119.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{address-autocomplete-Bnc9ieKO.js → address-autocomplete-zLygkxFc.js} +2 -2
- package/dist/_chunks/{address-autocomplete-Bnc9ieKO.js.map → address-autocomplete-zLygkxFc.js.map} +1 -1
- package/dist/_chunks/{address-fields-RIaGnpnm.js → address-fields-Dl1ALKhP.js} +2 -2
- package/dist/_chunks/{address-fields-RIaGnpnm.js.map → address-fields-Dl1ALKhP.js.map} +1 -1
- package/dist/_chunks/bill-line-table-DUMEHnQ4.js +1754 -0
- package/dist/_chunks/bill-line-table-DUMEHnQ4.js.map +1 -0
- package/dist/_chunks/{calendar-appointment-editor-dialog-BEmBcb61.js → calendar-appointment-editor-dialog-rw02sXGw.js} +4 -4
- package/dist/_chunks/{calendar-appointment-editor-dialog-BEmBcb61.js.map → calendar-appointment-editor-dialog-rw02sXGw.js.map} +1 -1
- package/dist/_chunks/{compact-editor-fields-6sTWRLtf.js → compact-editor-fields-cP6yh7xv.js} +3 -3
- package/dist/_chunks/{compact-editor-fields-6sTWRLtf.js.map → compact-editor-fields-cP6yh7xv.js.map} +1 -1
- package/dist/_chunks/counts-BXtzNv_G.js +92 -0
- package/dist/_chunks/counts-BXtzNv_G.js.map +1 -0
- package/dist/_chunks/{data-grid-DiBSbN2Y.js → data-grid-Bbf8t4z3.js} +2 -2
- package/dist/_chunks/{data-grid-DiBSbN2Y.js.map → data-grid-Bbf8t4z3.js.map} +1 -1
- package/dist/_chunks/{default-tabs-CD285u0C.js → default-tabs-Cxkw1Ws0.js} +332 -368
- package/dist/_chunks/default-tabs-Cxkw1Ws0.js.map +1 -0
- package/dist/_chunks/{document-scanner-5p-Uu8dy.js → document-scanner-CETscDea.js} +2 -2
- package/dist/_chunks/{document-scanner-5p-Uu8dy.js.map → document-scanner-CETscDea.js.map} +1 -1
- package/dist/_chunks/file-code-Cf-_gSzd.js +23 -0
- package/dist/_chunks/file-code-Cf-_gSzd.js.map +1 -0
- package/dist/_chunks/{file-manager-CV1_GtjC.js → file-manager-DNq-sEsy.js} +2 -2
- package/dist/_chunks/{file-manager-CV1_GtjC.js.map → file-manager-DNq-sEsy.js.map} +1 -1
- package/dist/_chunks/{file-upload-CxjCs7TX.js → file-upload-DQc0LsBM.js} +385 -311
- package/dist/_chunks/file-upload-DQc0LsBM.js.map +1 -0
- package/dist/_chunks/invoice-upload-list-CsFsRgbt.js +952 -0
- package/dist/_chunks/invoice-upload-list-CsFsRgbt.js.map +1 -0
- package/dist/_chunks/map-view-CHeGd94F.js +1443 -0
- package/dist/_chunks/map-view-CHeGd94F.js.map +1 -0
- package/dist/_chunks/maps-MpMxTBov.js +63 -0
- package/dist/_chunks/maps-MpMxTBov.js.map +1 -0
- package/dist/_chunks/{maps-core-gate-Dgs7jXxy.js → maps-core-gate-C4dyo1ic.js} +5 -5
- package/dist/_chunks/{maps-core-gate-Dgs7jXxy.js.map → maps-core-gate-C4dyo1ic.js.map} +1 -1
- package/dist/_chunks/{notes-panel-CHR-Jv6N.js → notes-panel-BOwlTz2-.js} +2 -2
- package/dist/_chunks/{notes-panel-CHR-Jv6N.js.map → notes-panel-BOwlTz2-.js.map} +1 -1
- package/dist/_chunks/package-plus-CTecQK3x.js +25 -0
- package/dist/_chunks/package-plus-CTecQK3x.js.map +1 -0
- package/dist/_chunks/{practice-results-CzHWprX4.js → practice-results-b3uchdBn.js} +40 -39
- package/dist/_chunks/practice-results-b3uchdBn.js.map +1 -0
- package/dist/_chunks/{public-footer-CB7ruuLI.js → public-footer-C8UIzqLJ.js} +326 -243
- package/dist/_chunks/public-footer-C8UIzqLJ.js.map +1 -0
- package/dist/_chunks/{radiograph-panel.agent-9jwXlOXB.js → radiograph-panel.agent-Dcv16n7u.js} +2 -2
- package/dist/_chunks/{radiograph-panel.agent-9jwXlOXB.js.map → radiograph-panel.agent-Dcv16n7u.js.map} +1 -1
- package/dist/_chunks/{reserved.agent-TaZfI3yj.js → reserved.agent-V2Eqoabh.js} +2 -2
- package/dist/_chunks/{reserved.agent-TaZfI3yj.js.map → reserved.agent-V2Eqoabh.js.map} +1 -1
- package/dist/_chunks/{rich-text-editor-CMPA5Wgy.js → rich-text-editor-BLEdXJ0l.js} +2 -2
- package/dist/_chunks/{rich-text-editor-CMPA5Wgy.js.map → rich-text-editor-BLEdXJ0l.js.map} +1 -1
- package/dist/_chunks/{signed-out-frame-bh7fn_Px.js → signed-out-frame-fUf7tqs3.js} +2 -2
- package/dist/_chunks/{signed-out-frame-bh7fn_Px.js.map → signed-out-frame-fUf7tqs3.js.map} +1 -1
- package/dist/_chunks/{task-editor-WdDCqbIL.js → task-editor-Czcx9B-3.js} +2 -2
- package/dist/_chunks/{task-editor-WdDCqbIL.js.map → task-editor-Czcx9B-3.js.map} +1 -1
- package/dist/_chunks/{toolbar-z8vXnpXz.js → toolbar-DoKcoE2q.js} +2 -2
- package/dist/_chunks/{toolbar-z8vXnpXz.js.map → toolbar-DoKcoE2q.js.map} +1 -1
- package/dist/_chunks/types-BrJRsnSG.js +291 -0
- package/dist/_chunks/types-BrJRsnSG.js.map +1 -0
- package/dist/_chunks/warehouse-load-summary-D88M4Ii7.js +255 -0
- package/dist/_chunks/warehouse-load-summary-D88M4Ii7.js.map +1 -0
- package/dist/agent-catalog.json +360 -14
- package/dist/agent-i18n/en.json +31 -2
- package/dist/browser-support.js +1 -1
- package/dist/components/_shared/warehouse-load/counts.d.ts +82 -0
- package/dist/components/_shared/warehouse-load/counts.d.ts.map +1 -0
- package/dist/components/_shared/warehouse-load/index.d.ts +4 -0
- package/dist/components/_shared/warehouse-load/index.d.ts.map +1 -0
- package/dist/components/_shared/warehouse-load/maps.d.ts +67 -0
- package/dist/components/_shared/warehouse-load/maps.d.ts.map +1 -0
- package/dist/components/_shared/warehouse-load/types.d.ts +18 -0
- package/dist/components/_shared/warehouse-load/types.d.ts.map +1 -0
- package/dist/components/address-autocomplete/index.js +1 -1
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/bill-line-table/bill-line-table.columns.d.ts +2 -0
- package/dist/components/bill-line-table/bill-line-table.columns.d.ts.map +1 -1
- package/dist/components/bill-line-table/bill-line-table.d.ts.map +1 -1
- package/dist/components/bill-line-table/bill-line-table.header.d.ts +7 -0
- package/dist/components/bill-line-table/bill-line-table.header.d.ts.map +1 -0
- package/dist/components/bill-line-table/bill-line-table.model.d.ts +10 -1
- package/dist/components/bill-line-table/bill-line-table.model.d.ts.map +1 -1
- package/dist/components/bill-line-table/bill-line-table.types.d.ts +66 -1
- package/dist/components/bill-line-table/bill-line-table.types.d.ts.map +1 -1
- package/dist/components/bill-line-table/bill-line-table.variants.d.ts +12 -0
- package/dist/components/bill-line-table/bill-line-table.variants.d.ts.map +1 -1
- package/dist/components/bill-line-table/index.d.ts +2 -2
- package/dist/components/bill-line-table/index.d.ts.map +1 -1
- package/dist/components/bill-line-table/index.js +10 -8
- package/dist/components/bill-table/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/data-grid/data-grid.variants.d.ts +1 -1
- package/dist/components/data-grid/index.js +2 -2
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/file-upload/file-upload.d.ts +30 -1
- package/dist/components/file-upload/file-upload.d.ts.map +1 -1
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/flag/flag-view.d.ts +1 -1
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/invoice-upload/index.d.ts +5 -0
- package/dist/components/invoice-upload/index.d.ts.map +1 -0
- package/dist/components/invoice-upload/index.js +7 -0
- package/dist/components/invoice-upload/index.js.map +1 -0
- package/dist/components/invoice-upload/invoice-upload.agent.d.ts +4 -0
- package/dist/components/invoice-upload/invoice-upload.agent.d.ts.map +1 -0
- package/dist/components/invoice-upload/invoice-upload.d.ts +3 -0
- package/dist/components/invoice-upload/invoice-upload.d.ts.map +1 -0
- package/dist/components/invoice-upload/types.d.ts +72 -0
- package/dist/components/invoice-upload/types.d.ts.map +1 -0
- package/dist/components/invoice-upload-list/cells.d.ts +36 -0
- package/dist/components/invoice-upload-list/cells.d.ts.map +1 -0
- package/dist/components/invoice-upload-list/columns.d.ts +14 -0
- package/dist/components/invoice-upload-list/columns.d.ts.map +1 -0
- package/dist/components/invoice-upload-list/handle.d.ts +18 -0
- package/dist/components/invoice-upload-list/handle.d.ts.map +1 -0
- package/dist/components/invoice-upload-list/index.d.ts +5 -0
- package/dist/components/invoice-upload-list/index.d.ts.map +1 -0
- package/dist/components/invoice-upload-list/index.js +10 -0
- package/dist/components/invoice-upload-list/index.js.map +1 -0
- package/dist/components/invoice-upload-list/invoice-upload-list.agent.d.ts +4 -0
- package/dist/components/invoice-upload-list/invoice-upload-list.agent.d.ts.map +1 -0
- package/dist/components/invoice-upload-list/invoice-upload-list.d.ts +10 -0
- package/dist/components/invoice-upload-list/invoice-upload-list.d.ts.map +1 -0
- package/dist/components/invoice-upload-list/invoice-upload-list.variants.d.ts +28 -0
- package/dist/components/invoice-upload-list/invoice-upload-list.variants.d.ts.map +1 -0
- package/dist/components/invoice-upload-list/model.d.ts +40 -0
- package/dist/components/invoice-upload-list/model.d.ts.map +1 -0
- package/dist/components/invoice-upload-list/types.d.ts +154 -0
- package/dist/components/invoice-upload-list/types.d.ts.map +1 -0
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/map-view/map-view-cluster.d.ts +42 -0
- package/dist/components/map-view/map-view-cluster.d.ts.map +1 -0
- package/dist/components/map-view/map-view.d.ts +39 -0
- package/dist/components/map-view/map-view.d.ts.map +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/practice-results/practice-results.d.ts.map +1 -1
- package/dist/components/public-footer/index.js +1 -1
- package/dist/components/public-footer/public-footer.d.ts +24 -0
- package/dist/components/public-footer/public-footer.d.ts.map +1 -1
- package/dist/components/public-header/public-header.d.ts +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/warehouse-load-summary/index.d.ts +4 -0
- package/dist/components/warehouse-load-summary/index.d.ts.map +1 -0
- package/dist/components/warehouse-load-summary/index.js +6 -0
- package/dist/components/warehouse-load-summary/index.js.map +1 -0
- package/dist/components/warehouse-load-summary/model.d.ts +8 -0
- package/dist/components/warehouse-load-summary/model.d.ts.map +1 -0
- package/dist/components/warehouse-load-summary/types.d.ts +50 -0
- package/dist/components/warehouse-load-summary/types.d.ts.map +1 -0
- package/dist/components/warehouse-load-summary/warehouse-load-summary.agent.d.ts +4 -0
- package/dist/components/warehouse-load-summary/warehouse-load-summary.agent.d.ts.map +1 -0
- package/dist/components/warehouse-load-summary/warehouse-load-summary.d.ts +7 -0
- package/dist/components/warehouse-load-summary/warehouse-load-summary.d.ts.map +1 -0
- package/dist/core.css +1 -1
- package/dist/i18n/locales/ar.d.ts +210 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +204 -4
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +210 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +208 -4
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +210 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +208 -4
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +210 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +210 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +210 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +206 -4
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +210 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +206 -4
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +210 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +204 -4
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +210 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +204 -4
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +210 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +204 -4
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +210 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +204 -4
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +210 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +204 -4
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +210 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +206 -4
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +210 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +204 -4
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +210 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +204 -4
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +210 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +206 -4
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +210 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +204 -4
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +210 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +204 -4
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +210 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +204 -4
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +1190 -1174
- package/dist/index.js.map +1 -1
- package/dist/locales/ar.json +214 -4
- package/dist/locales/de.json +214 -4
- package/dist/locales/el.json +214 -4
- package/dist/locales/en.json +210 -0
- package/dist/locales/es.json +214 -4
- package/dist/locales/fr.json +214 -4
- package/dist/locales/hi.json +214 -4
- package/dist/locales/it.json +214 -4
- package/dist/locales/ja.json +214 -4
- package/dist/locales/nl.json +214 -4
- package/dist/locales/pl.json +214 -4
- package/dist/locales/pt.json +214 -4
- package/dist/locales/ro.json +214 -4
- package/dist/locales/ru.json +214 -4
- package/dist/locales/sq.json +214 -4
- package/dist/locales/sv.json +214 -4
- package/dist/locales/tr.json +214 -4
- package/dist/locales/zh.json +214 -4
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/signed-out-frame/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +13 -1
- package/dist/_chunks/bill-line-table-vCnVo7_a.js +0 -1565
- package/dist/_chunks/bill-line-table-vCnVo7_a.js.map +0 -1
- package/dist/_chunks/default-tabs-CD285u0C.js.map +0 -1
- package/dist/_chunks/file-upload-CxjCs7TX.js.map +0 -1
- package/dist/_chunks/map-view-Frj8vE7n.js +0 -1105
- package/dist/_chunks/map-view-Frj8vE7n.js.map +0 -1
- package/dist/_chunks/practice-results-CzHWprX4.js.map +0 -1
- package/dist/_chunks/public-footer-CB7ruuLI.js.map +0 -1
|
@@ -1,1105 +0,0 @@
|
|
|
1
|
-
import { jsx as l, jsxs as M } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as Fe, useMemo as _, useRef as k, useId as we, useState as N, useEffect as z, useCallback as V, useImperativeHandle as qe, useLayoutEffect as ke } from "react";
|
|
3
|
-
import { createPortal as Be } from "react-dom";
|
|
4
|
-
import { c as G } from "./index-D2ZczOXr.js";
|
|
5
|
-
import { useTranslation as A } from "react-i18next";
|
|
6
|
-
import { M as Ue, A as Je, a as Xe, b as He, c as Ye, u as Me, d as B, e as Qe, P as me } from "./maps-core-gate-Dgs7jXxy.js";
|
|
7
|
-
import { B as ze } from "./button-DohK_Ak_.js";
|
|
8
|
-
import { S as et } from "./skeleton-tTWJpvAq.js";
|
|
9
|
-
import { V as Ee } from "./visually-hidden-BHxEUGyT.js";
|
|
10
|
-
import { E as tt } from "./error-boundary-tAn_GuCu.js";
|
|
11
|
-
import { u as nt } from "./registry-DvAUVLHh.js";
|
|
12
|
-
import { l as rt } from "./length-token-DwMnGEYT.js";
|
|
13
|
-
import { M as ot } from "./map-pin-BaY37-Km.js";
|
|
14
|
-
import { E as xe } from "./external-link-CY6zAXXU.js";
|
|
15
|
-
const st = {
|
|
16
|
-
id: "map-view",
|
|
17
|
-
// pan → scroll (viewport move); set_zoom → set_value; select_marker → pick
|
|
18
|
-
// (NON-persisting marker focus, no value state slot).
|
|
19
|
-
capabilities: ["scroll", "set_value", "pick"],
|
|
20
|
-
// Every action routes through the imperative bridge, which only exists
|
|
21
|
-
// once the map has loaded: consent granted (the default is
|
|
22
|
-
// `consentGranted={false}`) and Google Maps finished loading. Until then
|
|
23
|
-
// all three actions are silent no-ops. `consentGranted` says whether the
|
|
24
|
-
// gate is passed, and a null `center` after it means the map is still
|
|
25
|
-
// loading. `center` / `zoom` are read off the live
|
|
26
|
-
// map because Google clamps zoom and animates pans, so requested is not
|
|
27
|
-
// applied; `selectedMarkerId` is the only confirmation the host accepted
|
|
28
|
-
// a `select_marker` proposal.
|
|
29
|
-
//
|
|
30
|
-
// A9: marker ids only (`MapMarker.id` is a stable opaque id). Never
|
|
31
|
-
// `MapMarker.label`, never the `address` prop (consumer-supplied free
|
|
32
|
-
// text, PII in any patient-address deployment), never `apiKey`.
|
|
33
|
-
state: {
|
|
34
|
-
consentGranted: {
|
|
35
|
-
type: "boolean",
|
|
36
|
-
descriptionKey: "ui.agent.mapView.state.consentGranted",
|
|
37
|
-
description: "True when the GDPR consent gate has been passed. Read this FIRST: while it is false every action is a silent no-op against a placeholder, and nothing else in the surface says so. When it is true but `center` is still null, Google Maps is loading; wait for `center` before acting.",
|
|
38
|
-
read: (e) => e.isConsentGranted()
|
|
39
|
-
},
|
|
40
|
-
markerCount: {
|
|
41
|
-
type: "number",
|
|
42
|
-
descriptionKey: "ui.agent.mapView.state.markerCount",
|
|
43
|
-
description: "Number of markers the consumer passed. Zero means there is nothing for `select_marker` to select. A count only — no ids, labels or positions.",
|
|
44
|
-
read: (e) => e.getMarkerCount()
|
|
45
|
-
},
|
|
46
|
-
selectedMarkerId: {
|
|
47
|
-
type: "string | null",
|
|
48
|
-
descriptionKey: "ui.agent.mapView.state.selectedMarkerId",
|
|
49
|
-
description: "Id of the marker the host currently holds as selected, or null. Selection is fully controlled by the consumer, so `select_marker` only proposes — this slot is the only way to see whether the proposal was accepted.",
|
|
50
|
-
read: (e) => e.getSelectedMarkerId()
|
|
51
|
-
},
|
|
52
|
-
center: {
|
|
53
|
-
type: "{ lat: number; lng: number } | null",
|
|
54
|
-
descriptionKey: "ui.agent.mapView.state.center",
|
|
55
|
-
description: "Live map centre in lat/lng, or null until the map has loaded (consent not granted, or Google Maps still loading). The read-back for `pan_to`, and the sign that the map is ready.",
|
|
56
|
-
read: (e) => e.getCenter()
|
|
57
|
-
},
|
|
58
|
-
zoom: {
|
|
59
|
-
type: "number | null",
|
|
60
|
-
descriptionKey: "ui.agent.mapView.state.zoom",
|
|
61
|
-
description: "Live zoom level, or null until the map has loaded. Google clamps zoom to the map type's range, so this is not necessarily the value last passed to `set_zoom`.",
|
|
62
|
-
read: (e) => e.getZoom()
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
actions: {
|
|
66
|
-
pan_to: {
|
|
67
|
-
// Ephemeral viewport move, no data loss → read.
|
|
68
|
-
safety: "read",
|
|
69
|
-
argsType: "{ position: { lat: number; lng: number } }",
|
|
70
|
-
argsSchema: {
|
|
71
|
-
type: "object",
|
|
72
|
-
properties: {
|
|
73
|
-
position: {
|
|
74
|
-
type: "object",
|
|
75
|
-
properties: {
|
|
76
|
-
lat: { type: "number", description: "Latitude in degrees." },
|
|
77
|
-
lng: { type: "number", description: "Longitude in degrees." }
|
|
78
|
-
},
|
|
79
|
-
required: ["lat", "lng"]
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
required: ["position"]
|
|
83
|
-
},
|
|
84
|
-
idempotent: !0,
|
|
85
|
-
descriptionKey: "ui.agent.mapView.actions.panTo",
|
|
86
|
-
description: "Pan the map to a new centre without changing zoom. Read the `center` slot back to confirm — Google animates the pan, so the applied centre settles after the call.",
|
|
87
|
-
errors: [
|
|
88
|
-
"Silent no-op until the map has loaded: while `consentGranted` is false (only the consent placeholder shows) or while `center` is still null (Google Maps is loading)."
|
|
89
|
-
],
|
|
90
|
-
invoke: (e, t) => {
|
|
91
|
-
e.panTo(t.position);
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
set_zoom: {
|
|
95
|
-
// Ephemeral viewport zoom, no data loss → read.
|
|
96
|
-
safety: "read",
|
|
97
|
-
argsType: "{ zoom: number }",
|
|
98
|
-
argsSchema: {
|
|
99
|
-
type: "object",
|
|
100
|
-
properties: {
|
|
101
|
-
zoom: {
|
|
102
|
-
type: "number",
|
|
103
|
-
description: "Zoom level, typical range 1–20."
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
required: ["zoom"]
|
|
107
|
-
},
|
|
108
|
-
idempotent: !0,
|
|
109
|
-
descriptionKey: "ui.agent.mapView.actions.setZoom",
|
|
110
|
-
description: "Set the map zoom level (typical range 1–20). Read the `zoom` slot back — Google clamps the request to the map type’s supported range, so requested and applied can differ.",
|
|
111
|
-
errors: [
|
|
112
|
-
"Silent no-op until the map has loaded: while `consentGranted` is false (only the consent placeholder shows) or while `center` is still null (Google Maps is loading).",
|
|
113
|
-
"Requested zoom is clamped to the map type's range; `zoom` reports what was actually applied."
|
|
114
|
-
],
|
|
115
|
-
invoke: (e, t) => {
|
|
116
|
-
e.setZoom(t.zoom);
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
select_marker: {
|
|
120
|
-
// Ephemeral marker focus, no data loss → read.
|
|
121
|
-
safety: "read",
|
|
122
|
-
argsType: "{ id: string | null }",
|
|
123
|
-
argsSchema: {
|
|
124
|
-
type: "object",
|
|
125
|
-
properties: {
|
|
126
|
-
id: {
|
|
127
|
-
type: ["string", "null"],
|
|
128
|
-
description: "Marker id to select, or null to clear the selection."
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
required: ["id"]
|
|
132
|
-
},
|
|
133
|
-
idempotent: !0,
|
|
134
|
-
descriptionKey: "ui.agent.mapView.actions.selectMarker",
|
|
135
|
-
description: "Propose a marker selection by id, or pass null to clear it. Fires the host's `onMarkerClick`; selection is controlled by the host, so read the `selectedMarkerId` slot back to see whether it accepted.",
|
|
136
|
-
errors: [
|
|
137
|
-
"Silent no-op until the map has loaded: while `consentGranted` is false (only the consent placeholder shows) or while `center` is still null (Google Maps is loading).",
|
|
138
|
-
"The host owns `selectedMarkerId` and may ignore the proposal; `selectedMarkerId` is unchanged when it does."
|
|
139
|
-
],
|
|
140
|
-
invoke: (e, t) => {
|
|
141
|
-
e.selectMarker(t.id);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
domHooks: {
|
|
146
|
-
root: {
|
|
147
|
-
attr: "data-component",
|
|
148
|
-
value: "map-view",
|
|
149
|
-
description: "Marks the element as a kit MapView."
|
|
150
|
-
},
|
|
151
|
-
instanceId: {
|
|
152
|
-
attr: "data-component-id",
|
|
153
|
-
sourceProp: "id",
|
|
154
|
-
description: "Sourced from the id prop."
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
function fe(e) {
|
|
159
|
-
if (!(e instanceof Element)) return !1;
|
|
160
|
-
try {
|
|
161
|
-
return e.matches(":focus-visible");
|
|
162
|
-
} catch {
|
|
163
|
-
return !0;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
const at = G(
|
|
167
|
-
[
|
|
168
|
-
"ds:relative ds:overflow-hidden ds:block",
|
|
169
|
-
"ds:bg-[var(--muted)]",
|
|
170
|
-
// Focus lands on the region when the interactive map replaces its button.
|
|
171
|
-
"ds:focus-visible:outline-solid ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
|
|
172
|
-
].join(" "),
|
|
173
|
-
{
|
|
174
|
-
variants: {
|
|
175
|
-
size: {
|
|
176
|
-
sm: "ds:[--map-block-size:14rem]",
|
|
177
|
-
md: "ds:[--map-block-size:20rem]",
|
|
178
|
-
lg: "ds:[--map-block-size:28rem]",
|
|
179
|
-
// `fill` defers sizing to the parent. The outer takes
|
|
180
|
-
// `block-size: 100%` so the inner (also 100%) has something
|
|
181
|
-
// to inherit from. Use inside a viewport-locked column —
|
|
182
|
-
// `<PracticeResults variant="map-first">` wires this through
|
|
183
|
-
// automatically; standalone consumers must give the parent
|
|
184
|
-
// a constrained block-size or the map collapses to 0.
|
|
185
|
-
fill: "ds:[block-size:100%]"
|
|
186
|
-
},
|
|
187
|
-
surface: {
|
|
188
|
-
bordered: "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
|
|
189
|
-
elevated: "ds:rounded-[var(--radius-md)] ds:shadow-[var(--shadow-card)] ds:[:where(&)]:border-[length:var(--surface-border-width,var(--border-width-sm))] ds:border-[color:var(--card-border)]",
|
|
190
|
-
bare: "ds:rounded-none ds:border-0"
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
defaultVariants: { size: "md", surface: "bordered" }
|
|
194
|
-
}
|
|
195
|
-
), it = G("ds:block ds:w-full", {
|
|
196
|
-
variants: {
|
|
197
|
-
size: {
|
|
198
|
-
sm: "ds:[block-size:var(--map-block-size)]",
|
|
199
|
-
md: "ds:[block-size:var(--map-block-size)]",
|
|
200
|
-
lg: "ds:[block-size:var(--map-block-size)]",
|
|
201
|
-
fill: "ds:[block-size:100%]"
|
|
202
|
-
}
|
|
203
|
-
},
|
|
204
|
-
defaultVariants: { size: "md" }
|
|
205
|
-
}), lt = G(
|
|
206
|
-
[
|
|
207
|
-
"ds:absolute ds:inset-0",
|
|
208
|
-
"ds:flex ds:flex-col ds:items-center ds:justify-center",
|
|
209
|
-
"ds:gap-[var(--spacing-sm)]",
|
|
210
|
-
"ds:p-[var(--spacing-md)]",
|
|
211
|
-
"ds:bg-[var(--muted)] ds:text-[var(--foreground)]",
|
|
212
|
-
"ds:text-center"
|
|
213
|
-
].join(" ")
|
|
214
|
-
), ct = G("type-heading-3 ds:m-0"), he = G(
|
|
215
|
-
"type-body-sm ds:text-[var(--muted-foreground)] ds:[max-inline-size:28rem] ds:m-0"
|
|
216
|
-
);
|
|
217
|
-
function dt({
|
|
218
|
-
onHandleReady: e,
|
|
219
|
-
onMarkerSelect: t,
|
|
220
|
-
onCameraMove: r
|
|
221
|
-
}) {
|
|
222
|
-
const a = B();
|
|
223
|
-
return z(() => {
|
|
224
|
-
if (a)
|
|
225
|
-
return e({
|
|
226
|
-
panTo: (o) => {
|
|
227
|
-
r(), a.panTo(o);
|
|
228
|
-
},
|
|
229
|
-
setZoom: (o) => {
|
|
230
|
-
r(), a.setZoom(o);
|
|
231
|
-
},
|
|
232
|
-
jumpTo: (o, i) => {
|
|
233
|
-
r(), a.moveCamera({ center: o, zoom: i });
|
|
234
|
-
},
|
|
235
|
-
selectMarker: (o) => t(o),
|
|
236
|
-
// Read straight off the live map: Google clamps `setZoom` to the
|
|
237
|
-
// map type's range and animates `panTo`, so requested and applied
|
|
238
|
-
// are not the same value.
|
|
239
|
-
getCenter: () => {
|
|
240
|
-
var o;
|
|
241
|
-
return ((o = a.getCenter()) == null ? void 0 : o.toJSON()) ?? null;
|
|
242
|
-
},
|
|
243
|
-
getZoom: () => a.getZoom() ?? null
|
|
244
|
-
}), () => e(null);
|
|
245
|
-
}, [a, e, t, r]), null;
|
|
246
|
-
}
|
|
247
|
-
function ut({
|
|
248
|
-
onBoundsChange: e,
|
|
249
|
-
userInteraction: t
|
|
250
|
-
}) {
|
|
251
|
-
const r = B(), a = k(e);
|
|
252
|
-
return a.current = e, z(() => {
|
|
253
|
-
if (!r) return;
|
|
254
|
-
const o = r.getDiv();
|
|
255
|
-
let i = null;
|
|
256
|
-
const p = () => {
|
|
257
|
-
t.current = {
|
|
258
|
-
pendingInput: !1,
|
|
259
|
-
moved: !1,
|
|
260
|
-
programmatic: !1
|
|
261
|
-
};
|
|
262
|
-
};
|
|
263
|
-
p();
|
|
264
|
-
let m;
|
|
265
|
-
const c = /* @__PURE__ */ new Set(), d = (n) => {
|
|
266
|
-
if (n instanceof PointerEvent && n.pointerType === "touch" && (n.type === "pointerdown" && c.add(n.pointerId), n.type === "pointerup" || n.type === "pointercancel")) {
|
|
267
|
-
c.delete(n.pointerId);
|
|
268
|
-
return;
|
|
269
|
-
}
|
|
270
|
-
if (n instanceof PointerEvent && n.type === "pointermove" && n.buttons === 0 && n.pointerType !== "touch" || n instanceof KeyboardEvent && ![
|
|
271
|
-
"ArrowUp",
|
|
272
|
-
"ArrowDown",
|
|
273
|
-
"ArrowLeft",
|
|
274
|
-
"ArrowRight",
|
|
275
|
-
"+",
|
|
276
|
-
"=",
|
|
277
|
-
"-",
|
|
278
|
-
"_",
|
|
279
|
-
"Enter",
|
|
280
|
-
" ",
|
|
281
|
-
"PageUp",
|
|
282
|
-
"PageDown"
|
|
283
|
-
].includes(n.key))
|
|
284
|
-
return;
|
|
285
|
-
const h = document.fullscreenElement, w = !!(h && (h.contains(o) || o.contains(h)));
|
|
286
|
-
let y = n.type === "dblclick";
|
|
287
|
-
n instanceof PointerEvent && n.type === "pointermove" && (y = n.pointerType !== "touch" || c.size >= 2 || w), n.type === "touchmove" && (y = n.touches.length >= 2 || w), n instanceof KeyboardEvent && (y = n.key !== "Enter" && n.key !== " "), n instanceof WheelEvent && (y = n.ctrlKey || n.metaKey || w), n.type === "click" && (y = n.target instanceof Element && n.target.closest('button, [role="button"]') != null), y && (t.current.programmatic = !1), t.current.pendingInput = !0, clearTimeout(m), m = setTimeout(() => {
|
|
288
|
-
t.current.pendingInput = !1;
|
|
289
|
-
}, 250);
|
|
290
|
-
}, u = () => {
|
|
291
|
-
t.current.pendingInput && !t.current.programmatic && (t.current.moved = !0);
|
|
292
|
-
}, g = () => {
|
|
293
|
-
var O, j;
|
|
294
|
-
const n = (O = r.getBounds()) == null ? void 0 : O.toJSON(), h = (j = r.getCenter()) == null ? void 0 : j.toJSON(), w = r.getZoom(), y = t.current.moved;
|
|
295
|
-
if (p(), clearTimeout(m), !n || !h || w == null) return;
|
|
296
|
-
const E = !i || Object.keys(n).some(
|
|
297
|
-
(T) => n[T] !== i.bounds[T]
|
|
298
|
-
), S = i != null && (w !== i.zoom || h.lat !== i.center.lat || h.lng !== i.center.lng);
|
|
299
|
-
i = { bounds: n, center: h, zoom: w }, E && a.current(n, { userInteraction: y && S });
|
|
300
|
-
}, f = [
|
|
301
|
-
"pointerdown",
|
|
302
|
-
"pointermove",
|
|
303
|
-
"pointerup",
|
|
304
|
-
"pointercancel",
|
|
305
|
-
"touchstart",
|
|
306
|
-
"touchmove",
|
|
307
|
-
"click",
|
|
308
|
-
"dblclick",
|
|
309
|
-
"wheel",
|
|
310
|
-
"keydown"
|
|
311
|
-
];
|
|
312
|
-
f.forEach(
|
|
313
|
-
(n) => o.addEventListener(n, d, { capture: !0, passive: !0 })
|
|
314
|
-
);
|
|
315
|
-
const v = [
|
|
316
|
-
r.addListener("dragstart", () => {
|
|
317
|
-
t.current.programmatic = !1, t.current.moved = !0;
|
|
318
|
-
}),
|
|
319
|
-
r.addListener("center_changed", u),
|
|
320
|
-
r.addListener("zoom_changed", u),
|
|
321
|
-
r.addListener("idle", g)
|
|
322
|
-
];
|
|
323
|
-
return g(), () => {
|
|
324
|
-
v.forEach((n) => n.remove()), f.forEach(
|
|
325
|
-
(n) => o.removeEventListener(n, d, !0)
|
|
326
|
-
), clearTimeout(m), p();
|
|
327
|
-
};
|
|
328
|
-
}, [r, t]), null;
|
|
329
|
-
}
|
|
330
|
-
function pt(e, t) {
|
|
331
|
-
const r = B(), [a, o] = N(null), { lat: i, lng: p } = t;
|
|
332
|
-
return z(() => {
|
|
333
|
-
if (!r || typeof r.getCenter != "function") return;
|
|
334
|
-
const m = () => {
|
|
335
|
-
var h, w;
|
|
336
|
-
const d = (h = r.getCenter()) == null ? void 0 : h.toJSON(), u = r.getZoom(), g = (w = r.getDiv) == null ? void 0 : w.call(r);
|
|
337
|
-
if (!d || u == null || !g) {
|
|
338
|
-
o(null);
|
|
339
|
-
return;
|
|
340
|
-
}
|
|
341
|
-
const f = g.clientWidth, v = g.clientHeight, n = Le * 2 ** u;
|
|
342
|
-
o({
|
|
343
|
-
id: e,
|
|
344
|
-
width: f,
|
|
345
|
-
height: v,
|
|
346
|
-
x: f / 2 + (p - d.lng) / 360 * n,
|
|
347
|
-
y: v / 2 - (q(i) - q(d.lat)) * n / (2 * Math.PI)
|
|
348
|
-
});
|
|
349
|
-
};
|
|
350
|
-
m();
|
|
351
|
-
const c = ["bounds_changed", "zoom_changed", "center_changed", "idle"].flatMap(
|
|
352
|
-
(d) => typeof r.addListener == "function" ? [r.addListener(d, m)] : []
|
|
353
|
-
);
|
|
354
|
-
return () => c.forEach((d) => d.remove());
|
|
355
|
-
}, [r, e, i, p]), (a == null ? void 0 : a.id) === e ? a : null;
|
|
356
|
-
}
|
|
357
|
-
function mt({
|
|
358
|
-
marker: e,
|
|
359
|
-
frame: t,
|
|
360
|
-
direction: r,
|
|
361
|
-
children: a
|
|
362
|
-
}) {
|
|
363
|
-
const o = pt(e.id, e.position);
|
|
364
|
-
return !o || !t ? null : Be(
|
|
365
|
-
/* @__PURE__ */ l(gt, { anchor: o, direction: r, children: a }),
|
|
366
|
-
t
|
|
367
|
-
);
|
|
368
|
-
}
|
|
369
|
-
const ft = 52, ht = 12, F = 8;
|
|
370
|
-
function gt({
|
|
371
|
-
anchor: e,
|
|
372
|
-
children: t,
|
|
373
|
-
direction: r
|
|
374
|
-
}) {
|
|
375
|
-
const a = k(null), [o, i] = N(
|
|
376
|
-
null
|
|
377
|
-
);
|
|
378
|
-
if (ke(() => {
|
|
379
|
-
const n = a.current;
|
|
380
|
-
n && i(
|
|
381
|
-
(h) => (h == null ? void 0 : h.width) === n.offsetWidth && h.height === n.offsetHeight ? h : { width: n.offsetWidth, height: n.offsetHeight }
|
|
382
|
-
);
|
|
383
|
-
}, [t, e.id]), !(e.x >= 0 && e.x <= e.width && e.y >= 0 && e.y <= e.height)) return null;
|
|
384
|
-
const m = (o == null ? void 0 : o.width) ?? 0, c = (o == null ? void 0 : o.height) ?? 0, d = Math.max(F, e.width - m - F), u = Math.min(Math.max(e.x - m / 2, F), d), g = e.y - ft - c, f = g < F, v = f ? e.y + ht : g;
|
|
385
|
-
return (
|
|
386
|
-
// The layer is `ltr` because the map is geographic: x is always measured
|
|
387
|
-
// from the physical left. The card inside takes the page direction.
|
|
388
|
-
/* @__PURE__ */ l(
|
|
389
|
-
"div",
|
|
390
|
-
{
|
|
391
|
-
dir: "ltr",
|
|
392
|
-
"aria-hidden": "true",
|
|
393
|
-
"data-component": "map-view-marker-card-layer",
|
|
394
|
-
className: "ds:pointer-events-none ds:absolute ds:inset-0 ds:overflow-hidden",
|
|
395
|
-
children: /* @__PURE__ */ l(
|
|
396
|
-
"div",
|
|
397
|
-
{
|
|
398
|
-
ref: a,
|
|
399
|
-
"data-component": "map-view-marker-card",
|
|
400
|
-
"data-marker-id": e.id,
|
|
401
|
-
"data-placement": f ? "below" : "above",
|
|
402
|
-
style: {
|
|
403
|
-
"--marker-card-x": `${u}px`,
|
|
404
|
-
"--marker-card-y": `${v}px`
|
|
405
|
-
},
|
|
406
|
-
"data-measured": o ? "true" : "false",
|
|
407
|
-
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",
|
|
408
|
-
children: /* @__PURE__ */ l("div", { dir: r, children: t })
|
|
409
|
-
}
|
|
410
|
-
)
|
|
411
|
-
}
|
|
412
|
-
)
|
|
413
|
-
);
|
|
414
|
-
}
|
|
415
|
-
function ge(e) {
|
|
416
|
-
if (!e) return null;
|
|
417
|
-
if (e instanceof HTMLElement) return e;
|
|
418
|
-
const t = e.element;
|
|
419
|
-
return t instanceof HTMLElement ? t : null;
|
|
420
|
-
}
|
|
421
|
-
function vt({
|
|
422
|
-
marker: e,
|
|
423
|
-
label: t,
|
|
424
|
-
isSelected: r,
|
|
425
|
-
isHovered: a,
|
|
426
|
-
onSelect: o,
|
|
427
|
-
onHover: i
|
|
428
|
-
}) {
|
|
429
|
-
const [p, m] = N(null), { id: c } = e, d = k(!1);
|
|
430
|
-
return z(() => {
|
|
431
|
-
const u = ge(p);
|
|
432
|
-
if (!u || !i) return;
|
|
433
|
-
const g = (n) => {
|
|
434
|
-
fe(n.target) && i(c, !0, "focus");
|
|
435
|
-
}, f = (n) => {
|
|
436
|
-
u.contains(n.relatedTarget) || d.current || i(c, !1, "focus");
|
|
437
|
-
}, v = (n) => {
|
|
438
|
-
n.key === "Escape" && i(c, !1, "focus");
|
|
439
|
-
};
|
|
440
|
-
return u.addEventListener("focusin", g), u.addEventListener("focusout", f), u.addEventListener("keydown", v), () => {
|
|
441
|
-
u.removeEventListener("focusin", g), u.removeEventListener("focusout", f), u.removeEventListener("keydown", v);
|
|
442
|
-
};
|
|
443
|
-
}, [p, c, i]), /* @__PURE__ */ l(
|
|
444
|
-
Qe,
|
|
445
|
-
{
|
|
446
|
-
ref: m,
|
|
447
|
-
position: e.position,
|
|
448
|
-
title: t,
|
|
449
|
-
"aria-label": t,
|
|
450
|
-
"data-selected": r ? "true" : "false",
|
|
451
|
-
"data-hovered": a ? "true" : "false",
|
|
452
|
-
zIndex: a ? 1e3 : r ? 500 : void 0,
|
|
453
|
-
onClick: () => o(c),
|
|
454
|
-
onMouseEnter: i ? () => {
|
|
455
|
-
d.current = !0, i(c, !0, "pointer");
|
|
456
|
-
} : void 0,
|
|
457
|
-
onMouseLeave: i ? () => {
|
|
458
|
-
d.current = !1;
|
|
459
|
-
const u = ge(p), g = document.activeElement;
|
|
460
|
-
u && g && u.contains(g) && fe(g) || i(c, !1, "pointer");
|
|
461
|
-
} : void 0,
|
|
462
|
-
children: a ? (
|
|
463
|
-
// Hovered pin: larger, deep ink body with a white ring.
|
|
464
|
-
// Theme-invariant, because the tiles do not follow the kit theme: one
|
|
465
|
-
// of body and ring clears 3:1 on any map style. Not `--accent`, which
|
|
466
|
-
// failed contrast.
|
|
467
|
-
/* @__PURE__ */ l(
|
|
468
|
-
me,
|
|
469
|
-
{
|
|
470
|
-
scale: 1.4,
|
|
471
|
-
background: "var(--map-marker-hover-color)",
|
|
472
|
-
borderColor: "var(--map-marker-hover-ring)",
|
|
473
|
-
glyphColor: "var(--map-marker-hover-ring)"
|
|
474
|
-
}
|
|
475
|
-
)
|
|
476
|
-
) : /* @__PURE__ */ l(
|
|
477
|
-
me,
|
|
478
|
-
{
|
|
479
|
-
background: "var(--primary)",
|
|
480
|
-
borderColor: "var(--primary)",
|
|
481
|
-
glyphColor: "var(--primary-foreground)"
|
|
482
|
-
}
|
|
483
|
-
)
|
|
484
|
-
}
|
|
485
|
-
);
|
|
486
|
-
}
|
|
487
|
-
const Le = 256, bt = (e) => e * Math.PI / 180;
|
|
488
|
-
function q(e) {
|
|
489
|
-
const t = Math.min(Math.max(Math.sin(bt(e)), -0.9999), 0.9999);
|
|
490
|
-
return Math.log((1 + t) / (1 - t)) / 2;
|
|
491
|
-
}
|
|
492
|
-
const yt = (e) => Math.atan(Math.sinh(e)) * 180 / Math.PI;
|
|
493
|
-
function wt(e) {
|
|
494
|
-
let t = -90, r = 90, a = -180, o = 180;
|
|
495
|
-
for (const { lat: i, lng: p } of e)
|
|
496
|
-
t = Math.max(t, i), r = Math.min(r, i), a = Math.max(a, p), o = Math.min(o, p);
|
|
497
|
-
return { north: t, south: r, east: a, west: o };
|
|
498
|
-
}
|
|
499
|
-
function kt(e, t, r, a, o) {
|
|
500
|
-
const { north: i, south: p, east: m, west: c } = wt(e);
|
|
501
|
-
if (i === p && m === c)
|
|
502
|
-
return { center: { lat: i, lng: m }, zoom: o };
|
|
503
|
-
const d = q(i), u = q(p), g = {
|
|
504
|
-
lat: yt((d + u) / 2),
|
|
505
|
-
lng: (m + c) / 2
|
|
506
|
-
}, f = (n, h) => h > 0 ? Math.log2(Math.max(n, 1) / Le / h) : o, v = Math.min(
|
|
507
|
-
f(t - 2 * a, (m - c) / 360),
|
|
508
|
-
f(r - 2 * a, (d - u) / (2 * Math.PI)),
|
|
509
|
-
o
|
|
510
|
-
);
|
|
511
|
-
return { center: g, zoom: Math.max(0, Math.floor(v)) };
|
|
512
|
-
}
|
|
513
|
-
const Ie = ({ id: e, lat: t, lng: r }) => e != null ? `id:${e}` : `at:${t},${r}`;
|
|
514
|
-
function Mt({
|
|
515
|
-
points: e,
|
|
516
|
-
fitKey: t,
|
|
517
|
-
maxZoom: r,
|
|
518
|
-
onCameraMove: a
|
|
519
|
-
}) {
|
|
520
|
-
const o = B(), i = k(null), p = k(!1), m = k(null);
|
|
521
|
-
return z(() => {
|
|
522
|
-
if (!o) return;
|
|
523
|
-
const c = () => {
|
|
524
|
-
var n;
|
|
525
|
-
const u = m.current, g = (n = o.getCenter()) == null ? void 0 : n.toJSON(), f = o.getZoom();
|
|
526
|
-
u != null && f === u.zoom && g != null && Math.abs(g.lat - u.center.lat) < 1e-6 && Math.abs(g.lng - u.center.lng) < 1e-6 || (p.current = !0);
|
|
527
|
-
}, d = [
|
|
528
|
-
o.addListener("dragstart", () => {
|
|
529
|
-
p.current = !0;
|
|
530
|
-
}),
|
|
531
|
-
o.addListener("center_changed", c),
|
|
532
|
-
o.addListener("zoom_changed", c)
|
|
533
|
-
];
|
|
534
|
-
return () => d.forEach((u) => u.remove());
|
|
535
|
-
}, [o]), z(() => {
|
|
536
|
-
var w;
|
|
537
|
-
if (!o) return;
|
|
538
|
-
const c = ((w = i.current) == null ? void 0 : w.map) === o ? i.current : null;
|
|
539
|
-
if ((c == null ? void 0 : c.key) === t) return;
|
|
540
|
-
const d = new Set(e.map(Ie)), u = (y, E) => {
|
|
541
|
-
m.current = { center: y, zoom: E }, a(), o.moveCamera({ center: y, zoom: E }), p.current = !1;
|
|
542
|
-
};
|
|
543
|
-
if (e.length === 0) {
|
|
544
|
-
i.current = { map: o, key: t, points: d };
|
|
545
|
-
return;
|
|
546
|
-
}
|
|
547
|
-
if (c != null && c.points.size > 0 && [...c.points].every((y) => d.has(y)) && p.current) {
|
|
548
|
-
i.current = { map: o, key: t, points: d };
|
|
549
|
-
return;
|
|
550
|
-
}
|
|
551
|
-
const f = o.getDiv();
|
|
552
|
-
if (!(f instanceof Element)) return;
|
|
553
|
-
const v = () => {
|
|
554
|
-
i.current = { map: o, key: t, points: d };
|
|
555
|
-
const y = Math.min(
|
|
556
|
-
rt("--spacing-2xl", f, 48),
|
|
557
|
-
f.clientWidth / 4,
|
|
558
|
-
f.clientHeight / 4
|
|
559
|
-
), { center: E, zoom: S } = kt(
|
|
560
|
-
e,
|
|
561
|
-
f.clientWidth,
|
|
562
|
-
f.clientHeight,
|
|
563
|
-
y,
|
|
564
|
-
r
|
|
565
|
-
);
|
|
566
|
-
u(E, S);
|
|
567
|
-
}, n = () => f.clientWidth > 0 && f.clientHeight > 0;
|
|
568
|
-
if (n() || typeof ResizeObserver > "u") {
|
|
569
|
-
v();
|
|
570
|
-
return;
|
|
571
|
-
}
|
|
572
|
-
const h = new ResizeObserver(() => {
|
|
573
|
-
n() && (h.disconnect(), v());
|
|
574
|
-
});
|
|
575
|
-
return h.observe(f), () => h.disconnect();
|
|
576
|
-
}, [o, t, e, r, a]), null;
|
|
577
|
-
}
|
|
578
|
-
const Ce = (e) => {
|
|
579
|
-
var t, r;
|
|
580
|
-
return typeof ((r = (t = globalThis.google) == null ? void 0 : t.maps) == null ? void 0 : r[e]) == "function";
|
|
581
|
-
};
|
|
582
|
-
function ve() {
|
|
583
|
-
const { t: e } = A("ui");
|
|
584
|
-
return /* @__PURE__ */ M(
|
|
585
|
-
"div",
|
|
586
|
-
{
|
|
587
|
-
role: "status",
|
|
588
|
-
"data-testid": "map-view-loading",
|
|
589
|
-
className: "ds:[inline-size:100%] ds:[block-size:100%]",
|
|
590
|
-
children: [
|
|
591
|
-
/* @__PURE__ */ l(et, { variant: "rectangular", width: "100%", height: "100%" }),
|
|
592
|
-
/* @__PURE__ */ l(Ee, { children: e("common.loading") })
|
|
593
|
-
]
|
|
594
|
-
}
|
|
595
|
-
);
|
|
596
|
-
}
|
|
597
|
-
function be({
|
|
598
|
-
preview: e,
|
|
599
|
-
onError: t
|
|
600
|
-
}) {
|
|
601
|
-
const { t: r } = A("ui");
|
|
602
|
-
return /* @__PURE__ */ M(
|
|
603
|
-
"div",
|
|
604
|
-
{
|
|
605
|
-
"data-testid": "map-view-loading",
|
|
606
|
-
className: "ds:relative ds:[inline-size:100%] ds:[block-size:100%]",
|
|
607
|
-
children: [
|
|
608
|
-
/* @__PURE__ */ l(Ve, { preview: e, onError: t }),
|
|
609
|
-
/* @__PURE__ */ l("div", { role: "status", children: /* @__PURE__ */ l(Ee, { children: r("common.loading") }) })
|
|
610
|
-
]
|
|
611
|
-
}
|
|
612
|
-
);
|
|
613
|
-
}
|
|
614
|
-
function Ve({
|
|
615
|
-
preview: e,
|
|
616
|
-
onError: t
|
|
617
|
-
}) {
|
|
618
|
-
return /* @__PURE__ */ l(
|
|
619
|
-
"img",
|
|
620
|
-
{
|
|
621
|
-
src: e.src,
|
|
622
|
-
srcSet: e.srcSet,
|
|
623
|
-
alt: e.alt,
|
|
624
|
-
width: e.width,
|
|
625
|
-
height: e.height,
|
|
626
|
-
loading: "lazy",
|
|
627
|
-
decoding: "async",
|
|
628
|
-
onError: t,
|
|
629
|
-
"data-testid": "map-view-preview-image",
|
|
630
|
-
className: "ds:block ds:[inline-size:100%] ds:[block-size:100%] ds:[object-fit:contain]"
|
|
631
|
-
}
|
|
632
|
-
);
|
|
633
|
-
}
|
|
634
|
-
function zt({
|
|
635
|
-
children: e,
|
|
636
|
-
pending: t,
|
|
637
|
-
holdUntilLoaded: r = !1
|
|
638
|
-
}) {
|
|
639
|
-
const a = Ye();
|
|
640
|
-
return Me("maps") || Ce("Map") || !a && !r ? e : t;
|
|
641
|
-
}
|
|
642
|
-
function Et({ children: e }) {
|
|
643
|
-
return Me("marker") || Ce("Marker") ? e : null;
|
|
644
|
-
}
|
|
645
|
-
function Ne(e, t) {
|
|
646
|
-
ke(() => {
|
|
647
|
-
const r = e.current;
|
|
648
|
-
return () => {
|
|
649
|
-
t == null || t(!!(r && r.contains(document.activeElement)));
|
|
650
|
-
};
|
|
651
|
-
}, [e, t]);
|
|
652
|
-
}
|
|
653
|
-
function xt({
|
|
654
|
-
preview: e,
|
|
655
|
-
onLoadMap: t,
|
|
656
|
-
consentCta: r,
|
|
657
|
-
onImageError: a,
|
|
658
|
-
description: o,
|
|
659
|
-
openInGoogleMapsHref: i,
|
|
660
|
-
onUnmount: p
|
|
661
|
-
}) {
|
|
662
|
-
const { t: m } = A("ui"), c = we(), d = k(null);
|
|
663
|
-
return Ne(d, p), /* @__PURE__ */ M(
|
|
664
|
-
"div",
|
|
665
|
-
{
|
|
666
|
-
ref: d,
|
|
667
|
-
className: "ds:absolute ds:inset-0 ds:bg-[var(--muted)]",
|
|
668
|
-
"data-testid": "map-view-preview",
|
|
669
|
-
children: [
|
|
670
|
-
/* @__PURE__ */ l(Ve, { preview: e, onError: a }),
|
|
671
|
-
/* @__PURE__ */ l("div", { className: "ds:absolute ds:start-0 ds:end-0 ds:top-[var(--map-preview-inset-block-start,var(--spacing-md))] ds:flex ds:justify-center ds:px-[var(--spacing-md)]", children: /* @__PURE__ */ M(
|
|
672
|
-
"div",
|
|
673
|
-
{
|
|
674
|
-
"data-testid": "map-view-preview-plate",
|
|
675
|
-
className: "ds:flex ds:max-w-[24rem] ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)] ds:rounded-[var(--radius-lg)] ds:bg-[var(--background)] ds:p-[var(--spacing-sm)] ds:text-center ds:shadow-[var(--shadow-lg)]",
|
|
676
|
-
children: [
|
|
677
|
-
/* @__PURE__ */ l(
|
|
678
|
-
"p",
|
|
679
|
-
{
|
|
680
|
-
id: c,
|
|
681
|
-
className: "type-meta ds:m-0 ds:text-[var(--muted-foreground)]",
|
|
682
|
-
children: o
|
|
683
|
-
}
|
|
684
|
-
),
|
|
685
|
-
/* @__PURE__ */ M("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-center ds:gap-x-[var(--spacing-md)] ds:gap-y-[var(--spacing-xs)]", children: [
|
|
686
|
-
r ?? /* @__PURE__ */ l(
|
|
687
|
-
ze,
|
|
688
|
-
{
|
|
689
|
-
type: "button",
|
|
690
|
-
intent: "primary",
|
|
691
|
-
size: "lg",
|
|
692
|
-
onClick: t,
|
|
693
|
-
"aria-describedby": c,
|
|
694
|
-
"data-testid": "map-view-load-cta",
|
|
695
|
-
children: m("mapView.consentTitle")
|
|
696
|
-
}
|
|
697
|
-
),
|
|
698
|
-
/* @__PURE__ */ M(
|
|
699
|
-
"a",
|
|
700
|
-
{
|
|
701
|
-
href: i,
|
|
702
|
-
target: "_blank",
|
|
703
|
-
rel: "noopener noreferrer",
|
|
704
|
-
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",
|
|
705
|
-
children: [
|
|
706
|
-
m("mapView.openInGoogleMaps"),
|
|
707
|
-
/* @__PURE__ */ l(xe, { "aria-hidden": "true", className: "ds:size-3" })
|
|
708
|
-
]
|
|
709
|
-
}
|
|
710
|
-
)
|
|
711
|
-
] })
|
|
712
|
-
]
|
|
713
|
-
}
|
|
714
|
-
) })
|
|
715
|
-
]
|
|
716
|
-
}
|
|
717
|
-
);
|
|
718
|
-
}
|
|
719
|
-
function ye({
|
|
720
|
-
address: e,
|
|
721
|
-
contentLang: t,
|
|
722
|
-
description: r,
|
|
723
|
-
onLoadMap: a,
|
|
724
|
-
openInGoogleMapsHref: o,
|
|
725
|
-
consentCta: i,
|
|
726
|
-
onUnmount: p
|
|
727
|
-
}) {
|
|
728
|
-
const { t: m } = A("ui"), c = k(null);
|
|
729
|
-
return Ne(c, p), /* @__PURE__ */ M(
|
|
730
|
-
"div",
|
|
731
|
-
{
|
|
732
|
-
ref: c,
|
|
733
|
-
className: lt(),
|
|
734
|
-
"data-testid": "map-view-consent",
|
|
735
|
-
children: [
|
|
736
|
-
/* @__PURE__ */ l(
|
|
737
|
-
ot,
|
|
738
|
-
{
|
|
739
|
-
"aria-hidden": "true",
|
|
740
|
-
className: "ds:size-6 ds:text-[var(--muted-foreground)]"
|
|
741
|
-
}
|
|
742
|
-
),
|
|
743
|
-
/* @__PURE__ */ l("p", { className: ct(), children: m("mapView.consentTitle") }),
|
|
744
|
-
e ? /* @__PURE__ */ l(
|
|
745
|
-
"p",
|
|
746
|
-
{
|
|
747
|
-
className: he(),
|
|
748
|
-
"data-testid": "map-view-address",
|
|
749
|
-
lang: t,
|
|
750
|
-
children: e
|
|
751
|
-
}
|
|
752
|
-
) : null,
|
|
753
|
-
/* @__PURE__ */ l("p", { className: he(), children: r }),
|
|
754
|
-
/* @__PURE__ */ M(
|
|
755
|
-
"div",
|
|
756
|
-
{
|
|
757
|
-
className: "ds:flex ds:gap-[var(--spacing-sm)] ds:flex-wrap ds:items-center ds:justify-center",
|
|
758
|
-
"data-testid": "map-view-consent-actions",
|
|
759
|
-
children: [
|
|
760
|
-
i ?? /* @__PURE__ */ l(
|
|
761
|
-
ze,
|
|
762
|
-
{
|
|
763
|
-
type: "button",
|
|
764
|
-
intent: "primary",
|
|
765
|
-
size: "sm",
|
|
766
|
-
onClick: a,
|
|
767
|
-
"data-testid": "map-view-load-cta",
|
|
768
|
-
children: m("mapView.consentCta")
|
|
769
|
-
}
|
|
770
|
-
),
|
|
771
|
-
/* @__PURE__ */ M(
|
|
772
|
-
"a",
|
|
773
|
-
{
|
|
774
|
-
href: o,
|
|
775
|
-
target: "_blank",
|
|
776
|
-
rel: "noopener noreferrer",
|
|
777
|
-
className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)] ds:text-[var(--primary-readable)] ds:underline ds:underline-offset-2",
|
|
778
|
-
children: [
|
|
779
|
-
m("mapView.openInGoogleMaps"),
|
|
780
|
-
/* @__PURE__ */ l(xe, { "aria-hidden": "true", className: "ds:size-3" })
|
|
781
|
-
]
|
|
782
|
-
}
|
|
783
|
-
)
|
|
784
|
-
]
|
|
785
|
-
}
|
|
786
|
-
)
|
|
787
|
-
]
|
|
788
|
-
}
|
|
789
|
-
);
|
|
790
|
-
}
|
|
791
|
-
const Lt = Fe(
|
|
792
|
-
({
|
|
793
|
-
id: e,
|
|
794
|
-
apiKey: t,
|
|
795
|
-
center: r,
|
|
796
|
-
zoom: a = 15,
|
|
797
|
-
markers: o,
|
|
798
|
-
selectedMarkerId: i,
|
|
799
|
-
hoveredMarkerId: p,
|
|
800
|
-
renderMarkerCard: m,
|
|
801
|
-
onMarkerHover: c,
|
|
802
|
-
onMarkerClick: d,
|
|
803
|
-
onBoundsChange: u,
|
|
804
|
-
consentGranted: g = !1,
|
|
805
|
-
onConsentRequest: f,
|
|
806
|
-
staticPreview: v,
|
|
807
|
-
address: n,
|
|
808
|
-
contentLang: h,
|
|
809
|
-
consentDescription: w,
|
|
810
|
-
consentCta: y,
|
|
811
|
-
mapId: E,
|
|
812
|
-
size: S,
|
|
813
|
-
surface: O,
|
|
814
|
-
ariaLabel: j,
|
|
815
|
-
fitToPoints: T,
|
|
816
|
-
fitKey: ee,
|
|
817
|
-
fitMaxZoom: Se = 15,
|
|
818
|
-
className: Te,
|
|
819
|
-
..._e
|
|
820
|
-
}, Pe) => {
|
|
821
|
-
const { t: P, i18n: te } = A("ui"), Z = _(() => T ?? [], [T]), Re = _(
|
|
822
|
-
() => ee ?? Z.map((s) => `${Ie(s)}@${s.lat},${s.lng}`).sort().join("|"),
|
|
823
|
-
[ee, Z]
|
|
824
|
-
), L = Z.length > 0, ne = k(L), re = we(), Ge = _(
|
|
825
|
-
() => `map-${re.replace(/[^a-zA-Z0-9-_]/g, "")}`,
|
|
826
|
-
[re]
|
|
827
|
-
), [oe, Ae] = N(!1);
|
|
828
|
-
z(() => {
|
|
829
|
-
if (typeof window > "u") return;
|
|
830
|
-
const s = window.matchMedia("(prefers-reduced-motion: reduce)"), b = () => Ae(s.matches);
|
|
831
|
-
return b(), s.addEventListener("change", b), () => s.removeEventListener("change", b);
|
|
832
|
-
}, []);
|
|
833
|
-
const U = _(() => `https://www.google.com/maps/search/?api=1&query=${n ? encodeURIComponent(n) : `${r.lat},${r.lng}`}`, [n, r.lat, r.lng]), x = k(null), se = k({
|
|
834
|
-
pendingInput: !1,
|
|
835
|
-
moved: !1,
|
|
836
|
-
programmatic: !1
|
|
837
|
-
}), D = V(() => {
|
|
838
|
-
se.current = {
|
|
839
|
-
pendingInput: !1,
|
|
840
|
-
moved: !1,
|
|
841
|
-
programmatic: !0
|
|
842
|
-
};
|
|
843
|
-
}, []), $ = V(
|
|
844
|
-
(s) => {
|
|
845
|
-
D(), d == null || d(s);
|
|
846
|
-
},
|
|
847
|
-
[D, d]
|
|
848
|
-
), [Oe, je] = N(null), J = _(
|
|
849
|
-
() => p != null && m ? (o ?? []).find((s) => s.id === p) ?? null : null,
|
|
850
|
-
[p, m, o]
|
|
851
|
-
), Ze = V((s) => {
|
|
852
|
-
x.current = s;
|
|
853
|
-
}, []), ae = k(!1), ie = k(null), le = k(0), K = V(
|
|
854
|
-
() => ({
|
|
855
|
-
panTo: (s) => {
|
|
856
|
-
var b;
|
|
857
|
-
return (b = x.current) == null ? void 0 : b.panTo(s);
|
|
858
|
-
},
|
|
859
|
-
setZoom: (s) => {
|
|
860
|
-
var b;
|
|
861
|
-
return (b = x.current) == null ? void 0 : b.setZoom(s);
|
|
862
|
-
},
|
|
863
|
-
selectMarker: (s) => {
|
|
864
|
-
var b;
|
|
865
|
-
return (b = x.current) == null ? void 0 : b.selectMarker(s);
|
|
866
|
-
},
|
|
867
|
-
// Without `isConsentGranted` an agent has no way to learn that
|
|
868
|
-
// its pan / zoom / select was swallowed by the GDPR gate rather
|
|
869
|
-
// than applied: under the default (`consentGranted={false}`) the
|
|
870
|
-
// whole Maps subtree is unmounted and every action optional-chains
|
|
871
|
-
// into nothing.
|
|
872
|
-
isConsentGranted: () => ae.current,
|
|
873
|
-
getCenter: () => {
|
|
874
|
-
var s;
|
|
875
|
-
return ((s = x.current) == null ? void 0 : s.getCenter()) ?? null;
|
|
876
|
-
},
|
|
877
|
-
getZoom: () => {
|
|
878
|
-
var s;
|
|
879
|
-
return ((s = x.current) == null ? void 0 : s.getZoom()) ?? null;
|
|
880
|
-
},
|
|
881
|
-
getSelectedMarkerId: () => ie.current,
|
|
882
|
-
getMarkerCount: () => le.current
|
|
883
|
-
}),
|
|
884
|
-
[]
|
|
885
|
-
);
|
|
886
|
-
qe(Pe, K, [K]);
|
|
887
|
-
const De = _(
|
|
888
|
-
() => K(),
|
|
889
|
-
[K]
|
|
890
|
-
);
|
|
891
|
-
nt(st, De, e), z(() => {
|
|
892
|
-
var b, C;
|
|
893
|
-
const s = ne.current && !L;
|
|
894
|
-
if (ne.current = L, !L) {
|
|
895
|
-
if (s) {
|
|
896
|
-
(b = x.current) == null || b.jumpTo(r, a);
|
|
897
|
-
return;
|
|
898
|
-
}
|
|
899
|
-
oe || (C = x.current) == null || C.panTo(r);
|
|
900
|
-
}
|
|
901
|
-
}, [r.lat, r.lng, oe, L]), z(() => {
|
|
902
|
-
var s;
|
|
903
|
-
L || (s = x.current) == null || s.setZoom(a);
|
|
904
|
-
}, [a, L]);
|
|
905
|
-
const [$e, ce] = N(!1), W = g || $e;
|
|
906
|
-
ae.current = W, ie.current = i ?? null, le.current = (o ?? []).length;
|
|
907
|
-
const [Ke, We] = N(null), I = v && v.src !== Ke ? v : void 0, X = v == null ? void 0 : v.src, H = V(() => {
|
|
908
|
-
X && We(X);
|
|
909
|
-
}, [X]), de = k(null), Y = k(!1), Q = k(!1), ue = V((s) => {
|
|
910
|
-
Q.current = s;
|
|
911
|
-
}, []);
|
|
912
|
-
z(() => {
|
|
913
|
-
var R;
|
|
914
|
-
if (!W) return;
|
|
915
|
-
const s = document.activeElement, b = !s || s === document.body, C = Y.current || Q.current && b;
|
|
916
|
-
Y.current = !1, Q.current = !1, C && ((R = de.current) == null || R.focus({ preventScroll: !0 }));
|
|
917
|
-
}, [W]);
|
|
918
|
-
const pe = V(() => {
|
|
919
|
-
if (Y.current = !0, f) {
|
|
920
|
-
f(), ce(!0);
|
|
921
|
-
return;
|
|
922
|
-
}
|
|
923
|
-
ce(!0);
|
|
924
|
-
}, [f]);
|
|
925
|
-
return /* @__PURE__ */ l(
|
|
926
|
-
"div",
|
|
927
|
-
{
|
|
928
|
-
ref: de,
|
|
929
|
-
className: at({ size: S, surface: O, className: Te }),
|
|
930
|
-
"data-component": "map-view",
|
|
931
|
-
"data-component-id": e ?? Ge,
|
|
932
|
-
role: "region",
|
|
933
|
-
"aria-label": j ?? P("mapView.label"),
|
|
934
|
-
tabIndex: -1,
|
|
935
|
-
..._e,
|
|
936
|
-
children: /* @__PURE__ */ l(
|
|
937
|
-
"div",
|
|
938
|
-
{
|
|
939
|
-
ref: je,
|
|
940
|
-
className: it({ size: S, className: "ds:relative" }),
|
|
941
|
-
children: W ? (
|
|
942
|
-
// A provider failure shows the consent placeholder (its "Open in
|
|
943
|
-
// Google Maps" link needs no script) with "Load map" as the
|
|
944
|
-
// retry, instead of unmounting the host's React tree. The gate
|
|
945
|
-
// starts the provider only once Google's `core` and `maps`
|
|
946
|
-
// libraries have arrived.
|
|
947
|
-
/* @__PURE__ */ l(
|
|
948
|
-
tt,
|
|
949
|
-
{
|
|
950
|
-
fallback: ({ reset: s }) => /* @__PURE__ */ l(
|
|
951
|
-
ye,
|
|
952
|
-
{
|
|
953
|
-
address: n,
|
|
954
|
-
contentLang: h,
|
|
955
|
-
description: w ?? P("mapView.consentDescription"),
|
|
956
|
-
onLoadMap: s,
|
|
957
|
-
consentCta: void 0,
|
|
958
|
-
openInGoogleMapsHref: U
|
|
959
|
-
}
|
|
960
|
-
),
|
|
961
|
-
children: /* @__PURE__ */ l(
|
|
962
|
-
Ue,
|
|
963
|
-
{
|
|
964
|
-
libraries: ["maps"],
|
|
965
|
-
pending: I ? /* @__PURE__ */ l(
|
|
966
|
-
be,
|
|
967
|
-
{
|
|
968
|
-
preview: I,
|
|
969
|
-
onError: H
|
|
970
|
-
}
|
|
971
|
-
) : /* @__PURE__ */ l(ve, {}),
|
|
972
|
-
children: /* @__PURE__ */ l(
|
|
973
|
-
Je,
|
|
974
|
-
{
|
|
975
|
-
apiKey: t,
|
|
976
|
-
language: te.language,
|
|
977
|
-
children: /* @__PURE__ */ l(
|
|
978
|
-
zt,
|
|
979
|
-
{
|
|
980
|
-
holdUntilLoaded: !!I,
|
|
981
|
-
pending: I ? /* @__PURE__ */ l(
|
|
982
|
-
be,
|
|
983
|
-
{
|
|
984
|
-
preview: I,
|
|
985
|
-
onError: H
|
|
986
|
-
}
|
|
987
|
-
) : /* @__PURE__ */ l(ve, {}),
|
|
988
|
-
children: /* @__PURE__ */ M(
|
|
989
|
-
Xe,
|
|
990
|
-
{
|
|
991
|
-
defaultCenter: r,
|
|
992
|
-
defaultZoom: a,
|
|
993
|
-
mapId: E,
|
|
994
|
-
gestureHandling: "cooperative",
|
|
995
|
-
disableDefaultUI: !1,
|
|
996
|
-
onClick: () => $(null),
|
|
997
|
-
className: "ds:[inline-size:100%] ds:[block-size:100%]",
|
|
998
|
-
children: [
|
|
999
|
-
/* @__PURE__ */ l(
|
|
1000
|
-
dt,
|
|
1001
|
-
{
|
|
1002
|
-
onHandleReady: Ze,
|
|
1003
|
-
onMarkerSelect: $,
|
|
1004
|
-
onCameraMove: D
|
|
1005
|
-
}
|
|
1006
|
-
),
|
|
1007
|
-
u ? /* @__PURE__ */ l(
|
|
1008
|
-
ut,
|
|
1009
|
-
{
|
|
1010
|
-
onBoundsChange: u,
|
|
1011
|
-
userInteraction: se
|
|
1012
|
-
}
|
|
1013
|
-
) : null,
|
|
1014
|
-
T ? /* @__PURE__ */ l(
|
|
1015
|
-
Mt,
|
|
1016
|
-
{
|
|
1017
|
-
points: Z,
|
|
1018
|
-
fitKey: Re,
|
|
1019
|
-
maxZoom: Se,
|
|
1020
|
-
onCameraMove: D
|
|
1021
|
-
}
|
|
1022
|
-
) : null,
|
|
1023
|
-
J && m ? /* @__PURE__ */ l(
|
|
1024
|
-
mt,
|
|
1025
|
-
{
|
|
1026
|
-
marker: J,
|
|
1027
|
-
frame: Oe,
|
|
1028
|
-
direction: te.dir(),
|
|
1029
|
-
children: m(J.id)
|
|
1030
|
-
}
|
|
1031
|
-
) : null,
|
|
1032
|
-
/* @__PURE__ */ l(Et, { children: (o ?? []).map((s) => {
|
|
1033
|
-
const b = i != null && i === s.id, C = p != null && p === s.id, R = P("mapView.markerLabel", {
|
|
1034
|
-
label: s.label ?? s.id
|
|
1035
|
-
});
|
|
1036
|
-
return E ? /* @__PURE__ */ l(
|
|
1037
|
-
vt,
|
|
1038
|
-
{
|
|
1039
|
-
marker: s,
|
|
1040
|
-
label: R,
|
|
1041
|
-
isSelected: b,
|
|
1042
|
-
isHovered: C,
|
|
1043
|
-
onSelect: $,
|
|
1044
|
-
onHover: c
|
|
1045
|
-
},
|
|
1046
|
-
s.id
|
|
1047
|
-
) : /* @__PURE__ */ l(
|
|
1048
|
-
He,
|
|
1049
|
-
{
|
|
1050
|
-
position: s.position,
|
|
1051
|
-
title: R,
|
|
1052
|
-
zIndex: C ? 1e3 : b ? 500 : void 0,
|
|
1053
|
-
onClick: () => $(s.id),
|
|
1054
|
-
onMouseOver: c ? () => c(s.id, !0, "pointer") : void 0,
|
|
1055
|
-
onMouseOut: c ? () => c(s.id, !1, "pointer") : void 0
|
|
1056
|
-
},
|
|
1057
|
-
s.id
|
|
1058
|
-
);
|
|
1059
|
-
}) })
|
|
1060
|
-
]
|
|
1061
|
-
}
|
|
1062
|
-
)
|
|
1063
|
-
}
|
|
1064
|
-
)
|
|
1065
|
-
}
|
|
1066
|
-
)
|
|
1067
|
-
}
|
|
1068
|
-
)
|
|
1069
|
-
}
|
|
1070
|
-
)
|
|
1071
|
-
) : I ? /* @__PURE__ */ l(
|
|
1072
|
-
xt,
|
|
1073
|
-
{
|
|
1074
|
-
preview: I,
|
|
1075
|
-
onLoadMap: pe,
|
|
1076
|
-
consentCta: y,
|
|
1077
|
-
onImageError: H,
|
|
1078
|
-
description: w ?? P("mapView.consentDescription"),
|
|
1079
|
-
openInGoogleMapsHref: U,
|
|
1080
|
-
onUnmount: ue
|
|
1081
|
-
}
|
|
1082
|
-
) : /* @__PURE__ */ l(
|
|
1083
|
-
ye,
|
|
1084
|
-
{
|
|
1085
|
-
address: n,
|
|
1086
|
-
contentLang: h,
|
|
1087
|
-
description: w ?? P("mapView.consentDescription"),
|
|
1088
|
-
onLoadMap: pe,
|
|
1089
|
-
consentCta: y,
|
|
1090
|
-
openInGoogleMapsHref: U,
|
|
1091
|
-
onUnmount: ue
|
|
1092
|
-
}
|
|
1093
|
-
)
|
|
1094
|
-
}
|
|
1095
|
-
)
|
|
1096
|
-
}
|
|
1097
|
-
);
|
|
1098
|
-
}
|
|
1099
|
-
);
|
|
1100
|
-
Lt.displayName = "MapView";
|
|
1101
|
-
export {
|
|
1102
|
-
Lt as M,
|
|
1103
|
-
fe as i
|
|
1104
|
-
};
|
|
1105
|
-
//# sourceMappingURL=map-view-Frj8vE7n.js.map
|