@alfadocs/ui-kit 0.33.3 → 0.33.5

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.
@@ -1,17 +1,17 @@
1
- import { jsx as z, jsxs as le } from "react/jsx-runtime";
2
- import * as Fe from "react";
3
- import A, { useMemo as N, useContext as F, useEffect as E, useLayoutEffect as Q, forwardRef as H, useImperativeHandle as V, useState as k, useReducer as Ue, useCallback as ne, useRef as U, Children as Ce, createContext as tn, useId as on } from "react";
4
- import { c as oe } from "./index-D2ZczOXr.js";
5
- import { useTranslation as He } from "react-i18next";
6
- import { createPortal as ue } from "react-dom";
7
- import { g as rn } from "./_commonjsHelpers-DaMA6jEr.js";
8
- import { B as an } from "./button-DD_0Xdmr.js";
9
- import { u as sn } from "./registry-nPAVE19X.js";
10
- import { M as ln } from "./map-pin-B8STOPMJ.js";
11
- import { E as cn } from "./external-link-C6F25E6k.js";
12
- var fe, ke;
13
- function dn() {
14
- return ke || (ke = 1, fe = function e(n, t) {
1
+ import { jsx as R, jsxs as se } from "react/jsx-runtime";
2
+ import * as je from "react";
3
+ import L, { useMemo as T, useContext as B, useEffect as E, useLayoutEffect as Y, forwardRef as U, useImperativeHandle as H, useState as N, useReducer as Be, useCallback as ee, useRef as F, Children as be, createContext as en, useId as nn } from "react";
4
+ import { c as te } from "./index-D2ZczOXr.js";
5
+ import { useTranslation as Fe } from "react-i18next";
6
+ import { createPortal as de } from "react-dom";
7
+ import { g as tn } from "./_commonjsHelpers-DaMA6jEr.js";
8
+ import { B as on } from "./button-DD_0Xdmr.js";
9
+ import { u as rn } from "./registry-nPAVE19X.js";
10
+ import { M as an } from "./map-pin-B8STOPMJ.js";
11
+ import { E as sn } from "./external-link-C6F25E6k.js";
12
+ var ge, Ie;
13
+ function ln() {
14
+ return Ie || (Ie = 1, ge = function e(n, t) {
15
15
  if (n === t) return !0;
16
16
  if (n && t && typeof n == "object" && typeof t == "object") {
17
17
  if (n.constructor !== t.constructor) return !1;
@@ -35,11 +35,11 @@ function dn() {
35
35
  return !0;
36
36
  }
37
37
  return n !== n && t !== t;
38
- }), fe;
38
+ }), ge;
39
39
  }
40
- var un = dn();
41
- const re = /* @__PURE__ */ rn(un), gn = "1.8.3";
42
- function j(e, n) {
40
+ var cn = ln();
41
+ const oe = /* @__PURE__ */ tn(cn), dn = "1.8.3";
42
+ function z(e, n) {
43
43
  var t = {};
44
44
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && n.indexOf(o) < 0 && (t[o] = e[o]);
45
45
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
@@ -47,7 +47,7 @@ function j(e, n) {
47
47
  n.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (t[o[r]] = e[o[r]]);
48
48
  return t;
49
49
  }
50
- function Ie(e, n, t, o) {
50
+ function _e(e, n, t, o) {
51
51
  function r(a) {
52
52
  return a instanceof t ? a : new t(function(i) {
53
53
  i(a);
@@ -74,75 +74,75 @@ function Ie(e, n, t, o) {
74
74
  c((o = o.apply(e, [])).next());
75
75
  });
76
76
  }
77
- function fn(e, n) {
77
+ function un(e, n) {
78
78
  e.src = n;
79
79
  }
80
- const mn = (e) => {
80
+ const gn = (e) => {
81
81
  var n, t, o, r = "The Google Maps JavaScript API", a = "google", i = "importLibrary", s = "__ib__", g = document, c = window, l = c[a] || (c[a] = {}), m = l.maps || (l.maps = {}), f = /* @__PURE__ */ new Set(), u = new URLSearchParams(), h = () => n || (n = new Promise(async (y, d) => {
82
82
  var p;
83
83
  await (t = g.createElement("script")), u.set("libraries", [...f] + "");
84
84
  for (o in e)
85
85
  u.set(o.replace(/[A-Z]/g, (b) => "_" + b[0].toLowerCase()), e[o]);
86
- u.set("callback", a + ".maps." + s), fn(t, "https://maps.googleapis.com/maps/api/js?" + u), m[s] = y, t.onerror = () => n = d(Error(r + " could not load.")), t.nonce = ((p = g.querySelector("script[nonce]")) == null ? void 0 : p.nonce) || "", g.head.append(t);
86
+ u.set("callback", a + ".maps." + s), un(t, "https://maps.googleapis.com/maps/api/js?" + u), m[s] = y, t.onerror = () => n = d(Error(r + " could not load.")), t.nonce = ((p = g.querySelector("script[nonce]")) == null ? void 0 : p.nonce) || "", g.head.append(t);
87
87
  }));
88
88
  m[i] ? console.warn(r + " only loads once. Ignoring:", e) : m[i] = (y, ...d) => f.add(y) && h().then(() => m[i](y, ...d));
89
- }, pn = (e) => `The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(e)}) will be ignored.`, hn = (e) => `The google.maps.importLibrary() function is already defined, and @googlemaps/js-api-loader will use the existing function instead of overwriting it. The options passed to setOptions (${JSON.stringify(e)}) will be ignored.`, vn = "No options were set before calling importLibrary. Make sure to configure the loader using setOptions().", yn = "There already is a script loading the Google Maps JavaScript API, and no google.maps.importLibrary function is defined. @googlemaps/js-api-loader will proceed to bootstrap the API with the specified options, but the existing script might cause problems using the API. Make sure to remove the script loading the API.", Ve = process.env.NODE_ENV !== "production", Oe = Ve ? (e) => {
89
+ }, fn = (e) => `The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(e)}) will be ignored.`, mn = (e) => `The google.maps.importLibrary() function is already defined, and @googlemaps/js-api-loader will use the existing function instead of overwriting it. The options passed to setOptions (${JSON.stringify(e)}) will be ignored.`, pn = "No options were set before calling importLibrary. Make sure to configure the loader using setOptions().", hn = "There already is a script loading the Google Maps JavaScript API, and no google.maps.importLibrary function is defined. @googlemaps/js-api-loader will proceed to bootstrap the API with the specified options, but the existing script might cause problems using the API. Make sure to remove the script loading the API.", Ue = process.env.NODE_ENV !== "production", Ee = Ue ? (e) => {
90
90
  console.warn(`[@googlemaps/js-api-loader] ${e}`);
91
91
  } : () => {
92
- }, bn = Ve ? (e) => {
92
+ }, vn = Ue ? (e) => {
93
93
  console.info(`[@googlemaps/js-api-loader] ${e}`);
94
94
  } : () => {
95
- }, En = process.env.NODE_ENV !== "production";
96
- let he = !1;
97
- function Cn(e) {
98
- if (he) {
99
- Oe(pn(e));
95
+ }, yn = process.env.NODE_ENV !== "production";
96
+ let me = !1;
97
+ function bn(e) {
98
+ if (me) {
99
+ Ee(fn(e));
100
100
  return;
101
101
  }
102
- Mn(e), he = !0;
102
+ Cn(e), me = !0;
103
103
  }
104
- async function On(e) {
104
+ async function En(e) {
105
105
  var n, t;
106
- if (he || Oe(vn), !((t = (n = window == null ? void 0 : window.google) == null ? void 0 : n.maps) != null && t.importLibrary))
106
+ if (me || Ee(pn), !((t = (n = window == null ? void 0 : window.google) == null ? void 0 : n.maps) != null && t.importLibrary))
107
107
  throw new Error("google.maps.importLibrary is not installed.");
108
108
  return await google.maps.importLibrary(e);
109
109
  }
110
- function Mn(e) {
110
+ function Cn(e) {
111
111
  var t, o;
112
112
  const n = !!((o = (t = window.google) == null ? void 0 : t.maps) != null && o.importLibrary);
113
- n ? bn(hn(e)) : En && document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]') && Oe(yn), n || mn(e);
113
+ n ? vn(mn(e)) : yn && document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]') && Ee(hn), n || gn(e);
114
114
  }
115
- const B = {
115
+ const j = {
116
116
  NOT_LOADED: "NOT_LOADED",
117
117
  LOADING: "LOADING",
118
118
  LOADED: "LOADED",
119
119
  FAILED: "FAILED",
120
120
  AUTH_FAILURE: "AUTH_FAILURE"
121
- }, wn = "GMP_visgl_rgmlibrary_v1_default", Pn = [
122
- `gmp_visgl_reactgooglemaps_v${gn}`
123
- ], ee = A.createContext(null);
124
- let G = B.NOT_LOADED, ie;
125
- const ve = /* @__PURE__ */ new Set();
126
- function se(e) {
127
- e !== G && (G = e, ve.forEach((n) => n(G)));
128
- }
129
- function An() {
130
- const [e, n] = k({});
121
+ }, On = "GMP_visgl_rgmlibrary_v1_default", Mn = [
122
+ `gmp_visgl_reactgooglemaps_v${dn}`
123
+ ], X = L.createContext(null);
124
+ let V = j.NOT_LOADED, ae;
125
+ const pe = /* @__PURE__ */ new Set();
126
+ function ie(e) {
127
+ e !== V && (V = e, pe.forEach((n) => n(V)));
128
+ }
129
+ function Pn() {
130
+ const [e, n] = N({});
131
131
  return { mapInstances: e, addMapInstance: (a, i = "default") => {
132
132
  n((s) => Object.assign(Object.assign({}, s), { [i]: a }));
133
133
  }, removeMapInstance: (a = "default") => {
134
134
  n((i) => {
135
135
  var s = a;
136
136
  i[s];
137
- var g = j(i, [typeof s == "symbol" ? s : s + ""]);
137
+ var g = z(i, [typeof s == "symbol" ? s : s + ""]);
138
138
  return g;
139
139
  });
140
140
  }, clearMapInstances: () => {
141
141
  n({});
142
142
  } };
143
143
  }
144
- function Tn() {
145
- const [e, n] = k({});
144
+ function wn() {
145
+ const [e, n] = N({});
146
146
  return {
147
147
  map3dInstances: e,
148
148
  addMap3DInstance: (a, i = "default") => {
@@ -152,7 +152,7 @@ function Tn() {
152
152
  n((i) => {
153
153
  var s = a;
154
154
  i[s];
155
- var g = j(i, [typeof s == "symbol" ? s : s + ""]);
155
+ var g = z(i, [typeof s == "symbol" ? s : s + ""]);
156
156
  return g;
157
157
  });
158
158
  },
@@ -161,8 +161,8 @@ function Tn() {
161
161
  }
162
162
  };
163
163
  }
164
- function Ln(e) {
165
- const { onLoad: n, onError: t, apiKey: o, version: r, libraries: a = [], region: i, language: s, authReferrerPolicy: g, channel: c, solutionChannel: l, fetchAppCheckToken: m } = e, [f, u] = k(G), [h, y] = Ue((b, C) => b[C.name] ? b : Object.assign(Object.assign({}, b), { [C.name]: C.value }), {}), d = N(() => {
164
+ function An(e) {
165
+ const { onLoad: n, onError: t, apiKey: o, version: r, libraries: a = [], region: i, language: s, authReferrerPolicy: g, channel: c, solutionChannel: l, fetchAppCheckToken: m } = e, [f, u] = N(V), [h, y] = Be((b, C) => b[C.name] ? b : Object.assign(Object.assign({}, b), { [C.name]: C.value }), {}), d = T(() => {
166
166
  const b = {
167
167
  apiKey: o,
168
168
  version: r,
@@ -183,31 +183,31 @@ function Ln(e) {
183
183
  g,
184
184
  c,
185
185
  l
186
- ]), p = ne((b) => Ie(this, void 0, void 0, function* () {
186
+ ]), p = ee((b) => _e(this, void 0, void 0, function* () {
187
187
  if (h[b])
188
188
  return h[b];
189
- const C = yield On(b);
189
+ const C = yield En(b);
190
190
  return y({ name: b, value: C }), C;
191
191
  }), [h]);
192
- return E(() => (ve.add(u), u(G), () => {
193
- ve.delete(u);
192
+ return E(() => (pe.add(u), u(V), () => {
193
+ pe.delete(u);
194
194
  }), []), E(
195
195
  () => {
196
- Ie(this, void 0, void 0, function* () {
196
+ _e(this, void 0, void 0, function* () {
197
197
  var b, C;
198
198
  try {
199
- ie && ie !== d && console.warn("The Google Maps JavaScript API has already been loaded with different parameters. The new parameters will be ignored. If you need to use different parameters, please refresh the page.");
200
- const w = ["core", "maps", ...a];
199
+ ae && ae !== d && console.warn("The Google Maps JavaScript API has already been loaded with different parameters. The new parameters will be ignored. If you need to use different parameters, please refresh the page.");
200
+ const P = ["core", "maps", ...a];
201
201
  if (!((C = (b = window.google) === null || b === void 0 ? void 0 : b.maps) === null || C === void 0) && C.importLibrary) {
202
- ie || se(B.LOADED), yield Promise.all(w.map((v) => p(v))), n && n();
202
+ ae || ie(j.LOADED), yield Promise.all(P.map((v) => p(v))), n && n();
203
203
  return;
204
204
  }
205
- if (G === B.LOADING || G === B.LOADED) {
206
- G === B.LOADED && n && n();
205
+ if (V === j.LOADING || V === j.LOADED) {
206
+ V === j.LOADED && n && n();
207
207
  return;
208
208
  }
209
- ie = d, se(B.LOADING);
210
- const P = Object.fromEntries(Object.entries({
209
+ ae = d, ie(j.LOADING);
210
+ const w = Object.fromEntries(Object.entries({
211
211
  key: o,
212
212
  v: r,
213
213
  libraries: a,
@@ -215,16 +215,16 @@ function Ln(e) {
215
215
  language: s,
216
216
  authReferrerPolicy: g
217
217
  }).filter(([, v]) => v !== void 0));
218
- c !== void 0 && c >= 0 && c <= 999 && (P.channel = String(c)), l === void 0 ? P.solutionChannel = wn : l !== "" && (P.solutionChannel = l), Cn(P), yield Promise.all(w.map((v) => p(v))), se(B.LOADED), n && n();
219
- } catch (w) {
220
- se(B.FAILED), t ? t(w) : console.error("The Google Maps JavaScript API failed to load.", w);
218
+ c !== void 0 && c >= 0 && c <= 999 && (w.channel = String(c)), l === void 0 ? w.solutionChannel = On : l !== "" && (w.solutionChannel = l), bn(w), yield Promise.all(P.map((v) => p(v))), ie(j.LOADED), n && n();
219
+ } catch (P) {
220
+ ie(j.FAILED), t ? t(P) : console.error("The Google Maps JavaScript API failed to load.", P);
221
221
  }
222
222
  });
223
223
  },
224
224
  // eslint-disable-next-line react-hooks/exhaustive-deps
225
225
  [d, n, t, p, a]
226
226
  ), E(() => {
227
- if (f !== B.LOADED)
227
+ if (f !== j.LOADED)
228
228
  return;
229
229
  const b = google.maps.Settings.getInstance();
230
230
  m ? b.fetchAppCheckToken = m : b.fetchAppCheckToken && (b.fetchAppCheckToken = null);
@@ -234,11 +234,11 @@ function Ln(e) {
234
234
  importLibrary: p
235
235
  };
236
236
  }
237
- function Dn(e) {
238
- return N(() => e.disableUsageAttribution ? null : Pn, [e.disableUsageAttribution]);
237
+ function Ln(e) {
238
+ return T(() => e.disableUsageAttribution ? null : Mn, [e.disableUsageAttribution]);
239
239
  }
240
- const Sn = (e) => {
241
- const { children: n } = e, t = j(e, ["children"]), { mapInstances: o, addMapInstance: r, removeMapInstance: a, clearMapInstances: i } = An(), { map3dInstances: s, addMap3DInstance: g, removeMap3DInstance: c, clearMap3DInstances: l } = Tn(), { status: m, loadedLibraries: f, importLibrary: u } = Ln(t), h = Dn(t), y = N(() => ({
240
+ const Dn = (e) => {
241
+ const { children: n } = e, t = z(e, ["children"]), { mapInstances: o, addMapInstance: r, removeMapInstance: a, clearMapInstances: i } = Pn(), { map3dInstances: s, addMap3DInstance: g, removeMap3DInstance: c, clearMap3DInstances: l } = wn(), { status: m, loadedLibraries: f, importLibrary: u } = An(t), h = Ln(t), y = T(() => ({
242
242
  mapInstances: o,
243
243
  addMapInstance: r,
244
244
  removeMapInstance: a,
@@ -265,22 +265,22 @@ const Sn = (e) => {
265
265
  u,
266
266
  h
267
267
  ]);
268
- return A.createElement(ee.Provider, { value: y }, n);
268
+ return L.createElement(X.Provider, { value: y }, n);
269
269
  };
270
- function _n(e, n) {
271
- for (const t of xn) {
272
- const o = n[t], r = Ge[t];
270
+ function Sn(e, n) {
271
+ for (const t of Tn) {
272
+ const o = n[t], r = He[t];
273
273
  E(() => {
274
274
  if (!e || !o)
275
275
  return;
276
276
  const a = google.maps.event.addListener(e, r, (i) => {
277
- o(kn(r, e, i));
277
+ o(In(r, e, i));
278
278
  });
279
279
  return () => a.remove();
280
280
  }, [e, r, o]);
281
281
  }
282
282
  }
283
- function kn(e, n, t) {
283
+ function In(e, n, t) {
284
284
  var o;
285
285
  const r = {
286
286
  type: e,
@@ -290,7 +290,7 @@ function kn(e, n, t) {
290
290
  stop: () => {
291
291
  }
292
292
  };
293
- if (In.includes(e)) {
293
+ if (_n.includes(e)) {
294
294
  const a = r, i = n.getCenter(), s = n.getZoom(), g = n.getHeading() || 0, c = n.getTilt() || 0, l = n.getBounds();
295
295
  return (!i || !l || !Number.isFinite(s)) && console.warn("[createEvent] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"), a.detail = {
296
296
  center: (i == null ? void 0 : i.toJSON()) || { lat: 0, lng: 0 },
@@ -304,7 +304,7 @@ function kn(e, n, t) {
304
304
  west: -180
305
305
  }
306
306
  }, a;
307
- } else if (Nn.includes(e)) {
307
+ } else if (kn.includes(e)) {
308
308
  if (!t)
309
309
  throw new Error("[createEvent] mouse events must provide a srcEvent");
310
310
  const a = r;
@@ -315,7 +315,7 @@ function kn(e, n, t) {
315
315
  }
316
316
  return r;
317
317
  }
318
- const Ge = {
318
+ const He = {
319
319
  onBoundsChanged: "bounds_changed",
320
320
  onCenterChanged: "center_changed",
321
321
  onClick: "click",
@@ -341,31 +341,31 @@ const Ge = {
341
341
  // since that is going to be fired in every situation where the camera is
342
342
  // updated.
343
343
  onCameraChanged: "bounds_changed"
344
- }, In = [
344
+ }, _n = [
345
345
  "bounds_changed",
346
346
  "center_changed",
347
347
  "heading_changed",
348
348
  "tilt_changed",
349
349
  "zoom_changed"
350
- ], Nn = [
350
+ ], kn = [
351
351
  "click",
352
352
  "contextmenu",
353
353
  "dblclick",
354
354
  "mousemove",
355
355
  "mouseout",
356
356
  "mouseover"
357
- ], xn = Object.keys(Ge);
358
- function ae(e, n) {
359
- const t = U(e);
357
+ ], Tn = Object.keys(He);
358
+ function re(e, n) {
359
+ const t = F(e);
360
360
  return n(e, t.current) || (t.current = e), t.current;
361
361
  }
362
- function Rn(e, n, t) {
363
- E(e, [ae(n, t)]);
362
+ function Nn(e, n, t) {
363
+ E(e, [re(n, t)]);
364
364
  }
365
- function Je(e, n) {
366
- Rn(e, n, re);
365
+ function Ve(e, n) {
366
+ Nn(e, n, oe);
367
367
  }
368
- const zn = /* @__PURE__ */ new Set([
368
+ const xn = /* @__PURE__ */ new Set([
369
369
  "backgroundColor",
370
370
  "clickableIcons",
371
371
  "controlSize",
@@ -402,21 +402,21 @@ const zn = /* @__PURE__ */ new Set([
402
402
  "zoomControl",
403
403
  "zoomControlOptions"
404
404
  ]);
405
- function jn(e, n) {
405
+ function Rn(e, n) {
406
406
  const t = {}, o = Object.keys(n);
407
407
  for (const r of o)
408
- zn.has(r) && (t[r] = n[r]);
409
- Je(() => {
408
+ xn.has(r) && (t[r] = n[r]);
409
+ Ve(() => {
410
410
  e && e.setOptions(t);
411
411
  }, [t]);
412
412
  }
413
- function Ze() {
413
+ function Ge() {
414
414
  var e;
415
- return ((e = F(ee)) === null || e === void 0 ? void 0 : e.status) || B.NOT_LOADED;
415
+ return ((e = B(X)) === null || e === void 0 ? void 0 : e.status) || j.NOT_LOADED;
416
416
  }
417
- function Bn(e, n) {
417
+ function zn(e, n) {
418
418
  const { viewport: t, viewState: o } = n, r = !!t;
419
- return Q(() => {
419
+ return Y(() => {
420
420
  if (!e || !o)
421
421
  return;
422
422
  const { latitude: a, longitude: i, bearing: s, pitch: g, zoom: c } = o;
@@ -428,19 +428,19 @@ function Bn(e, n) {
428
428
  });
429
429
  }, [e, o]), r;
430
430
  }
431
- function Fn(e) {
431
+ function jn(e) {
432
432
  return !e || typeof e != "object" || !("lat" in e && "lng" in e) ? !1 : Number.isFinite(e.lat) && Number.isFinite(e.lng);
433
433
  }
434
- function $e(e, n) {
434
+ function Je(e, n) {
435
435
  if (!e || !n)
436
436
  return !1;
437
- const t = de(e), o = de(n);
437
+ const t = ce(e), o = ce(n);
438
438
  return !(t.lat !== o.lat || t.lng !== o.lng);
439
439
  }
440
- function de(e) {
441
- return Fn(e) ? e : e.toJSON();
440
+ function ce(e) {
441
+ return jn(e) ? e : e.toJSON();
442
442
  }
443
- function Ne(e) {
443
+ function ke(e) {
444
444
  if ("north" in e && "south" in e && "east" in e && "west" in e)
445
445
  return e;
446
446
  const n = e.getNorthEast().toJSON(), t = e.getSouthWest().toJSON();
@@ -451,40 +451,40 @@ function Ne(e) {
451
451
  west: t.lng
452
452
  };
453
453
  }
454
- function Un(e, n) {
454
+ function Bn(e, n) {
455
455
  if (!e || !n)
456
456
  return !1;
457
- const t = Ne(e), o = Ne(n);
457
+ const t = ke(e), o = ke(n);
458
458
  return t.north === o.north && t.south === o.south && t.east === o.east && t.west === o.west;
459
459
  }
460
- function qe(e, n) {
460
+ function Ze(e, n) {
461
461
  if (!e || !n)
462
462
  return e === n;
463
463
  const t = "getArray" in n ? n.getArray() : n;
464
464
  if (e.length !== t.length)
465
465
  return !1;
466
466
  for (let o = 0; o < e.length; o++)
467
- if (!$e(e[o], t[o]))
467
+ if (!Je(e[o], t[o]))
468
468
  return !1;
469
469
  return !0;
470
470
  }
471
- function Hn(e, n) {
471
+ function Fn(e, n) {
472
472
  if (!e || !n)
473
473
  return e === n;
474
474
  const t = "getArray" in n ? n.getArray().map((o) => o.getArray()) : n;
475
475
  if (e.length !== t.length)
476
476
  return !1;
477
477
  for (let o = 0; o < e.length; o++)
478
- if (!qe(e[o], t[o]))
478
+ if (!Ze(e[o], t[o]))
479
479
  return !1;
480
480
  return !0;
481
481
  }
482
- function Vn(e, n, t) {
483
- const o = t.center ? de(t.center) : null;
482
+ function Un(e, n, t) {
483
+ const o = t.center ? ce(t.center) : null;
484
484
  let r = null, a = null;
485
485
  o && Number.isFinite(o.lat) && Number.isFinite(o.lng) && (r = o.lat, a = o.lng);
486
486
  const i = Number.isFinite(t.zoom) ? t.zoom : null, s = Number.isFinite(t.heading) ? t.heading : null, g = Number.isFinite(t.tilt) ? t.tilt : null;
487
- Q(() => {
487
+ Y(() => {
488
488
  if (!e)
489
489
  return;
490
490
  const c = {};
@@ -492,7 +492,7 @@ function Vn(e, n, t) {
492
492
  r !== null && a !== null && (n.current.center.lat !== r || n.current.center.lng !== a) && (c.center = { lat: r, lng: a }, l = !0), i !== null && n.current.zoom !== i && (c.zoom = i, l = !0), s !== null && n.current.heading !== s && (c.heading = s, l = !0), g !== null && n.current.tilt !== g && (c.tilt = g, l = !0), l && e.moveCamera(c);
493
493
  });
494
494
  }
495
- const Gn = () => {
495
+ const Hn = () => {
496
496
  const e = {
497
497
  position: "absolute",
498
498
  top: 0,
@@ -509,31 +509,31 @@ const Gn = () => {
509
509
  background: "#dddddd",
510
510
  padding: "1rem 1.5rem"
511
511
  };
512
- return A.createElement(
512
+ return L.createElement(
513
513
  "div",
514
514
  { style: e },
515
- A.createElement("h2", null, "Error: AuthFailure"),
516
- A.createElement(
515
+ L.createElement("h2", null, "Error: AuthFailure"),
516
+ L.createElement(
517
517
  "p",
518
518
  null,
519
519
  "A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",
520
- A.createElement("code", null, "APIProvider.apiKey"),
520
+ L.createElement("code", null, "APIProvider.apiKey"),
521
521
  " prop is correct. Check the error-message in the console for further details."
522
522
  )
523
523
  );
524
524
  };
525
- function ye() {
526
- const [e, n] = k(null), t = ne((o) => n(o), [n]);
525
+ function he() {
526
+ const [e, n] = N(null), t = ee((o) => n(o), [n]);
527
527
  return [e, t];
528
528
  }
529
- function We() {
530
- return Ze() === B.LOADED;
529
+ function $e() {
530
+ return Ge() === j.LOADED;
531
531
  }
532
- function Ke() {
533
- const [, e] = Ue((n) => n + 1, 0);
532
+ function qe() {
533
+ const [, e] = Be((n) => n + 1, 0);
534
534
  return e;
535
535
  }
536
- function Jn(e, n) {
536
+ function Vn(e, n) {
537
537
  const t = e.getCenter(), o = e.getZoom(), r = e.getHeading() || 0, a = e.getTilt() || 0, i = e.getBounds();
538
538
  (!t || !i || !Number.isFinite(o)) && console.warn("[useTrackedCameraState] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"), Object.assign(n.current, {
539
539
  center: (t == null ? void 0 : t.toJSON()) || { lat: 0, lng: 0 },
@@ -542,8 +542,8 @@ function Jn(e, n) {
542
542
  tilt: a
543
543
  });
544
544
  }
545
- function Zn(e) {
546
- const n = Ke(), t = U({
545
+ function Gn(e) {
546
+ const n = qe(), t = F({
547
547
  center: { lat: 0, lng: 0 },
548
548
  heading: 0,
549
549
  tilt: 0,
@@ -553,12 +553,12 @@ function Zn(e) {
553
553
  if (!e)
554
554
  return;
555
555
  const o = google.maps.event.addListener(e, "bounds_changed", () => {
556
- Jn(e, t), n();
556
+ Vn(e, t), n();
557
557
  });
558
558
  return () => o.remove();
559
559
  }, [e, n]), t;
560
560
  }
561
- class ce {
561
+ class le {
562
562
  static has(n) {
563
563
  return this.entries[n] && this.entries[n].length > 0;
564
564
  }
@@ -569,38 +569,38 @@ class ce {
569
569
  this.entries[n] || (this.entries[n] = []), this.entries[n].push(t);
570
570
  }
571
571
  }
572
- ce.entries = {};
573
- function $n(e, n) {
574
- const t = We(), [o, r] = k(null), [a, i] = ye(), s = Zn(o), { id: g, defaultBounds: c, defaultCenter: l, defaultZoom: m, defaultHeading: f, defaultTilt: u, reuseMaps: h, renderingType: y, colorScheme: d } = e, p = j(e, ["id", "defaultBounds", "defaultCenter", "defaultZoom", "defaultHeading", "defaultTilt", "reuseMaps", "renderingType", "colorScheme"]), b = e.zoom !== void 0 || e.defaultZoom !== void 0, C = e.center !== void 0 || e.defaultCenter !== void 0;
572
+ le.entries = {};
573
+ function Jn(e, n) {
574
+ const t = $e(), [o, r] = N(null), [a, i] = he(), s = Gn(o), { id: g, defaultBounds: c, defaultCenter: l, defaultZoom: m, defaultHeading: f, defaultTilt: u, reuseMaps: h, renderingType: y, colorScheme: d } = e, p = z(e, ["id", "defaultBounds", "defaultCenter", "defaultZoom", "defaultHeading", "defaultTilt", "reuseMaps", "renderingType", "colorScheme"]), b = e.zoom !== void 0 || e.defaultZoom !== void 0, C = e.center !== void 0 || e.defaultCenter !== void 0;
575
575
  !c && (!b || !C) && console.warn("<Map> component is missing configuration. You have to provide zoom and center (via the `zoom`/`defaultZoom` and `center`/`defaultCenter` props) or specify the region to show using `defaultBounds`. See https://visgl.github.io/react-google-maps/docs/api-reference/components/map#required"), !p.center && l && (p.center = l), !p.zoom && Number.isFinite(m) && (p.zoom = m), !p.heading && Number.isFinite(f) && (p.heading = f), !p.tilt && Number.isFinite(u) && (p.tilt = u);
576
- const w = p.internalUsageAttributionIds;
577
- w == null ? p.internalUsageAttributionIds = n.internalUsageAttributionIds : p.internalUsageAttributionIds = [
576
+ const P = p.internalUsageAttributionIds;
577
+ P == null ? p.internalUsageAttributionIds = n.internalUsageAttributionIds : p.internalUsageAttributionIds = [
578
578
  ...n.internalUsageAttributionIds || [],
579
- ...w
579
+ ...P
580
580
  ];
581
581
  for (const v of Object.keys(p))
582
582
  p[v] === void 0 && delete p[v];
583
- const P = U(void 0);
583
+ const w = F(void 0);
584
584
  return E(
585
585
  () => {
586
586
  if (!a || !t)
587
587
  return;
588
- const { addMapInstance: v, removeMapInstance: O } = n, { mapId: L } = e, _ = `${L || "default"}:${y || "default"}:${d || "LIGHT"}`;
589
- let T, x;
590
- if (h && ce.has(_) ? (x = ce.pop(_), T = x.getDiv(), a.appendChild(T), x.setOptions(p), setTimeout(() => x.moveCamera({}), 0)) : (T = document.createElement("div"), T.style.height = "100%", a.appendChild(T), x = new google.maps.Map(T, Object.assign(Object.assign(Object.assign({}, p), y ? { renderingType: y } : {}), d ? { colorScheme: d } : {}))), r(x), v(x, g), c) {
591
- const { padding: R } = c, q = j(c, ["padding"]);
592
- x.fitBounds(q, R);
588
+ const { addMapInstance: v, removeMapInstance: O } = n, { mapId: D } = e, _ = `${D || "default"}:${y || "default"}:${d || "LIGHT"}`;
589
+ let M, x;
590
+ if (h && le.has(_) ? (x = le.pop(_), M = x.getDiv(), a.appendChild(M), x.setOptions(p), setTimeout(() => x.moveCamera({}), 0)) : (M = document.createElement("div"), M.style.height = "100%", a.appendChild(M), x = new google.maps.Map(M, Object.assign(Object.assign(Object.assign({}, p), y ? { renderingType: y } : {}), d ? { colorScheme: d } : {}))), r(x), v(x, g), c) {
591
+ const { padding: $ } = c, q = z(c, ["padding"]);
592
+ x.fitBounds(q, $);
593
593
  } else (!b || !C) && x.fitBounds({ east: 180, west: -180, south: -90, north: 90 });
594
- if (P.current) {
595
- const { mapId: R, cameraState: q } = P.current;
596
- R !== L && x.moveCamera(q);
594
+ if (w.current) {
595
+ const { mapId: $, cameraState: q } = w.current;
596
+ $ !== D && x.moveCamera(q);
597
597
  }
598
598
  return () => {
599
- P.current = {
600
- mapId: L,
599
+ w.current = {
600
+ mapId: D,
601
601
  // eslint-disable-next-line react-hooks/exhaustive-deps
602
602
  cameraState: s.current
603
- }, T.remove(), h ? ce.push(_, x) : google.maps.event.clearInstanceListeners(x), r(null), O(g);
603
+ }, M.remove(), h ? le.push(_, x) : google.maps.event.clearInstanceListeners(x), r(null), O(g);
604
604
  };
605
605
  },
606
606
  // some dependencies are ignored in the list below:
@@ -620,13 +620,13 @@ function $n(e, n) {
620
620
  ]
621
621
  ), [o, i, s];
622
622
  }
623
- const Ye = A.createContext(null), Xe = (e) => {
624
- const { children: n, id: t, className: o, style: r } = e, a = F(ee), i = Ze();
623
+ const We = L.createContext(null), Ke = (e) => {
624
+ const { children: n, id: t, className: o, style: r } = e, a = B(X), i = Ge();
625
625
  if (!a)
626
626
  throw new Error("<Map> can only be used inside an <ApiProvider> component.");
627
- const [s, g, c] = $n(e, a);
628
- Vn(s, c, e), _n(s, e), jn(s, e);
629
- const l = Bn(s, e), m = !!e.controlled;
627
+ const [s, g, c] = Jn(e, a);
628
+ Un(s, c, e), Sn(s, e), Rn(s, e);
629
+ const l = zn(s, e), m = !!e.controlled;
630
630
  E(() => {
631
631
  if (s)
632
632
  return l && s.setOptions({ disableDefaultUI: !0 }), (l || m) && s.setOptions({
@@ -645,19 +645,19 @@ const Ye = A.createContext(null), Xe = (e) => {
645
645
  e.gestureHandling,
646
646
  e.keyboardShortcuts
647
647
  ]);
648
- const f = e.center ? de(e.center) : null;
648
+ const f = e.center ? ce(e.center) : null;
649
649
  let u = null, h = null;
650
650
  f && Number.isFinite(f.lat) && Number.isFinite(f.lng) && (u = f.lat, h = f.lng);
651
- const y = N(() => {
652
- var b, C, w;
651
+ const y = T(() => {
652
+ var b, C, P;
653
653
  return {
654
654
  center: { lat: u ?? 0, lng: h ?? 0 },
655
655
  zoom: (b = e.zoom) !== null && b !== void 0 ? b : 0,
656
656
  heading: (C = e.heading) !== null && C !== void 0 ? C : 0,
657
- tilt: (w = e.tilt) !== null && w !== void 0 ? w : 0
657
+ tilt: (P = e.tilt) !== null && P !== void 0 ? P : 0
658
658
  };
659
659
  }, [u, h, e.zoom, e.heading, e.tilt]);
660
- Q(() => {
660
+ Y(() => {
661
661
  if (!s || !m)
662
662
  return;
663
663
  s.moveCamera(y);
@@ -666,53 +666,53 @@ const Ye = A.createContext(null), Xe = (e) => {
666
666
  });
667
667
  return () => b.remove();
668
668
  }, [s, m, y]);
669
- const d = N(() => Object.assign({
669
+ const d = T(() => Object.assign({
670
670
  width: "100%",
671
671
  height: "100%",
672
672
  position: "relative",
673
673
  // when using deckgl, the map should be sent to the back
674
674
  zIndex: l ? -1 : 0
675
- }, r), [r, l]), p = N(() => ({ map: s }), [s]);
676
- return i === B.AUTH_FAILURE ? A.createElement(
675
+ }, r), [r, l]), p = T(() => ({ map: s }), [s]);
676
+ return i === j.AUTH_FAILURE ? L.createElement(
677
677
  "div",
678
678
  { style: Object.assign({ position: "relative" }, o ? {} : d), className: o },
679
- A.createElement(Gn, null)
680
- ) : A.createElement("div", Object.assign({ ref: g, "data-testid": "map", style: o ? void 0 : d, className: o }, t ? { id: t } : {}), s ? A.createElement(Ye.Provider, { value: p }, n) : null);
679
+ L.createElement(Hn, null)
680
+ ) : L.createElement("div", Object.assign({ ref: g, "data-testid": "map", style: o ? void 0 : d, className: o }, t ? { id: t } : {}), s ? L.createElement(We.Provider, { value: p }, n) : null);
681
681
  };
682
- Xe.deckGLViewProps = !0;
683
- const xe = /* @__PURE__ */ new Set();
684
- function te(...e) {
682
+ Ke.deckGLViewProps = !0;
683
+ const Te = /* @__PURE__ */ new Set();
684
+ function ne(...e) {
685
685
  const n = JSON.stringify(e);
686
- xe.has(n) || (xe.add(n), console.error(...e));
686
+ Te.has(n) || (Te.add(n), console.error(...e));
687
687
  }
688
- const Z = (e = null) => {
689
- const n = F(ee), { map: t } = F(Ye) || {};
688
+ const J = (e = null) => {
689
+ const n = B(X), { map: t } = B(We) || {};
690
690
  if (n === null)
691
- return te("useMap(): failed to retrieve APIProviderContext. Make sure that the <APIProvider> component exists and that the component you are calling `useMap()` from is a sibling of the <APIProvider>."), null;
691
+ return ne("useMap(): failed to retrieve APIProviderContext. Make sure that the <APIProvider> component exists and that the component you are calling `useMap()` from is a sibling of the <APIProvider>."), null;
692
692
  const { mapInstances: o } = n;
693
693
  return e !== null ? o[e] || null : t || o.default || null;
694
694
  };
695
- function $(e) {
696
- const n = We(), t = F(ee);
695
+ function Z(e) {
696
+ const n = $e(), t = B(X);
697
697
  return E(() => {
698
698
  !n || !t || t.importLibrary(e);
699
699
  }, [n, t, e]), (t == null ? void 0 : t.loadedLibraries[e]) || null;
700
700
  }
701
- var me;
702
- const { useLayoutEffect: qn, useRef: Wn } = Fe, Kn = (me = Fe.useInsertionEffect) !== null && me !== void 0 ? me : qn;
703
- function Yn() {
701
+ var fe;
702
+ const { useLayoutEffect: Zn, useRef: $n } = je, qn = (fe = je.useInsertionEffect) !== null && fe !== void 0 ? fe : Zn;
703
+ function Wn() {
704
704
  throw new Error("useEffectEvent: invalid call during rendering.");
705
705
  }
706
- function Xn(e) {
707
- const n = Wn(Yn);
708
- return Kn(() => {
706
+ function Kn(e) {
707
+ const n = $n(Wn);
708
+ return qn(() => {
709
709
  n.current = e;
710
710
  }, [e]), ((...t) => n.current(...t));
711
711
  }
712
- const Qe = Xn, Qn = () => {
712
+ const Ye = Kn, Yn = () => {
713
713
  };
714
- function D(e, n, t) {
715
- const o = Qe(t ?? Qn), r = !!t;
714
+ function S(e, n, t) {
715
+ const o = Ye(t ?? Yn), r = !!t;
716
716
  E(() => {
717
717
  if (!e || !n || !r)
718
718
  return;
@@ -720,15 +720,15 @@ function D(e, n, t) {
720
720
  return () => a.remove();
721
721
  }, [e, n, r]);
722
722
  }
723
- function I(e, n, t) {
723
+ function k(e, n, t) {
724
724
  E(() => {
725
725
  e && (e[n] = t);
726
726
  }, [e, n, t]);
727
727
  }
728
- const et = () => {
728
+ const Xn = () => {
729
729
  };
730
- function be(e, n, t) {
731
- const o = Qe(t ?? et), r = !!t;
730
+ function ve(e, n, t) {
731
+ const o = Ye(t ?? Xn), r = !!t;
732
732
  E(() => {
733
733
  if (!e || !n || !r)
734
734
  return;
@@ -736,7 +736,7 @@ function be(e, n, t) {
736
736
  return e.addEventListener(n, a), () => e.removeEventListener(n, a);
737
737
  }, [e, n, r]);
738
738
  }
739
- class nt {
739
+ class Qn {
740
740
  constructor() {
741
741
  this.renderedStyles = /* @__PURE__ */ new Set(), this.styleElement = null;
742
742
  }
@@ -757,95 +757,95 @@ class nt {
757
757
  this.styleElement && (this.styleElement.remove(), this.styleElement = null, this.renderedStyles.clear());
758
758
  }
759
759
  }
760
- const tt = new nt();
761
- function ot(e, n) {
760
+ const et = new Qn();
761
+ function nt(e, n) {
762
762
  var t;
763
763
  if (!(!((t = google == null ? void 0 : google.maps) === null || t === void 0) && t.version))
764
764
  return;
765
765
  const o = google.maps.version.split("."), r = parseInt(o[0], 10), a = parseInt(o[1], 10);
766
766
  return r > e || r === e && a >= n;
767
767
  }
768
- const Me = A.createContext(null), rt = {
768
+ const Ce = L.createContext(null), tt = {
769
769
  BOTTOM: ["50%", "100%"]
770
- }, en = H((e, n) => {
771
- const { children: t, style: o, className: r, anchorPoint: a } = e, [i, s] = it(e), g = N(() => i ? { marker: i } : null, [i]);
772
- return V(n, () => i, [i]), s ? A.createElement(Me.Provider, { value: g }, ue(A.createElement(at, { anchorPoint: a, styles: o, className: r }, t), s)) : null;
770
+ }, Xe = U((e, n) => {
771
+ const { children: t, style: o, className: r, anchorPoint: a } = e, [i, s] = rt(e), g = T(() => i ? { marker: i } : null, [i]);
772
+ return H(n, () => i, [i]), s ? L.createElement(Ce.Provider, { value: g }, de(L.createElement(ot, { anchorPoint: a, styles: o, className: r }, t), s)) : null;
773
773
  });
774
- en.displayName = "AdvancedMarker";
775
- function Ee(e) {
774
+ Xe.displayName = "AdvancedMarker";
775
+ function ye(e) {
776
776
  return e.nodeType === Node.ELEMENT_NODE;
777
777
  }
778
- const at = ({ children: e, styles: n, className: t }) => A.createElement("div", { className: t, style: n }, e);
779
- function it(e) {
780
- const [n, t] = k(null), [o, r] = k(null), a = Z(), i = $("marker"), { children: s, onClick: g, className: c, onMouseEnter: l, onMouseLeave: m, onDrag: f, onDragStart: u, onDragEnd: h, collisionBehavior: y, clickable: d, draggable: p, position: b, title: C, zIndex: w, anchorPoint: P, anchorLeft: v, anchorTop: O } = e, L = Ce.count(s);
778
+ const ot = ({ children: e, styles: n, className: t }) => L.createElement("div", { className: t, style: n }, e);
779
+ function rt(e) {
780
+ const [n, t] = N(null), [o, r] = N(null), a = J(), i = Z("marker"), { children: s, onClick: g, className: c, onMouseEnter: l, onMouseLeave: m, onDrag: f, onDragStart: u, onDragEnd: h, collisionBehavior: y, clickable: d, draggable: p, position: b, title: C, zIndex: P, anchorPoint: w, anchorLeft: v, anchorTop: O } = e, D = be.count(s);
781
781
  return E(() => {
782
782
  if (!a || !i)
783
783
  return;
784
784
  const _ = new i.AdvancedMarkerElement();
785
785
  _.map = a, t(_);
786
- let T = null;
787
- return L > 0 && (T = document.createElement("div"), _.content = T, r(T)), () => {
788
- _.map = null, T == null || T.remove(), t(null), r(null);
786
+ let M = null;
787
+ return D > 0 && (M = document.createElement("div"), _.content = M, r(M)), () => {
788
+ _.map = null, M == null || M.remove(), t(null), r(null);
789
789
  };
790
- }, [a, i, L]), E(() => {
791
- !(n != null && n.content) || !Ee(n.content) || L > 0 || (n.content.className = c ?? "");
792
- }, [n, c, L]), st(n, P, v, O, L > 0), I(n, "position", b), I(n, "title", C ?? ""), I(n, "zIndex", w), I(n, "collisionBehavior", y), E(() => {
790
+ }, [a, i, D]), E(() => {
791
+ !(n != null && n.content) || !ye(n.content) || D > 0 || (n.content.className = c ?? "");
792
+ }, [n, c, D]), at(n, w, v, O, D > 0), k(n, "position", b), k(n, "title", C ?? ""), k(n, "zIndex", P), k(n, "collisionBehavior", y), E(() => {
793
793
  n && (p !== void 0 ? n.gmpDraggable = p : f || u || h ? n.gmpDraggable = !0 : n.gmpDraggable = !1);
794
794
  }, [n, p, f, h, u]), E(() => {
795
795
  if (!n)
796
796
  return;
797
797
  const _ = d !== void 0 ? d : !!g || !!l || !!m;
798
- n.gmpClickable = _, _ && (n != null && n.content) && Ee(n.content) && (n.content.style.pointerEvents = "all", g && (n.content.style.cursor = "pointer"));
799
- }, [n, d, g, l, m]), D(n, "click", g), D(n, "drag", f), D(n, "dragstart", u), D(n, "dragend", h), be(n == null ? void 0 : n.element, "mouseenter", l), be(n == null ? void 0 : n.element, "mouseleave", m), [n, o];
798
+ n.gmpClickable = _, _ && (n != null && n.content) && ye(n.content) && (n.content.style.pointerEvents = "all", g && (n.content.style.cursor = "pointer"));
799
+ }, [n, d, g, l, m]), S(n, "click", g), S(n, "drag", f), S(n, "dragstart", u), S(n, "dragend", h), ve(n == null ? void 0 : n.element, "mouseenter", l), ve(n == null ? void 0 : n.element, "mouseleave", m), [n, o];
800
800
  }
801
- function st(e, n, t, o, r) {
801
+ function at(e, n, t, o, r) {
802
802
  E(() => {
803
803
  if (!e || !r)
804
804
  return;
805
- const a = ot(3, 62), i = e.content;
806
- if (!(!i || !Ee(i))) {
805
+ const a = nt(3, 62), i = e.content;
806
+ if (!(!i || !ye(i))) {
807
807
  if (t !== void 0 || o !== void 0) {
808
808
  a || console.warn(`AdvancedMarker: The anchorLeft and anchorTop props are only supported in Google Maps API version 3.62 and above. The current version is ${google.maps.version}.`), e.anchorLeft = t, e.anchorTop = o, n !== void 0 && console.warn("AdvancedMarker: the anchorPoint prop is ignored when anchorLeft and/or anchorTop are set.");
809
809
  return;
810
810
  }
811
811
  if (n !== void 0) {
812
- const [s, g] = n ?? rt.BOTTOM, c = `calc(-1 * ${s})`, l = `calc(-1 * ${g})`;
813
- a ? (e.anchorLeft = c, e.anchorTop = l, i.style.transform = "") : (i.style.transform = `translate(50%, 100%) translate(${c}, ${l})`, e.dataset.origin = "rgm", tt.addAdvancedMarkerPointerEventsOverwrite());
812
+ const [s, g] = n ?? tt.BOTTOM, c = `calc(-1 * ${s})`, l = `calc(-1 * ${g})`;
813
+ a ? (e.anchorLeft = c, e.anchorTop = l, i.style.transform = "") : (i.style.transform = `translate(50%, 100%) translate(${c}, ${l})`, e.dataset.origin = "rgm", et.addAdvancedMarkerPointerEventsOverwrite());
814
814
  }
815
815
  }
816
816
  }, [e, n, t, o, r]);
817
817
  }
818
- function lt(e) {
818
+ function it(e) {
819
819
  var n, t, o;
820
- const { onClick: r, onDrag: a, onDragStart: i, onDragEnd: s, onMouseOver: g, onMouseOut: c, onRadiusChanged: l, onCenterChanged: m, center: f, defaultCenter: u, radius: h, defaultRadius: y } = e, d = j(e, ["onClick", "onDrag", "onDragStart", "onDragEnd", "onMouseOver", "onMouseOut", "onRadiusChanged", "onCenterChanged", "center", "defaultCenter", "radius", "defaultRadius"]), [p, b] = k(null), C = Z(), w = ae(Object.assign(Object.assign({}, d), { clickable: (n = d.clickable) !== null && n !== void 0 ? n : !!r, draggable: (t = d.draggable) !== null && t !== void 0 ? t : !!(a || i || s || m), editable: (o = d.editable) !== null && o !== void 0 ? o : !!l }), re);
820
+ const { onClick: r, onDrag: a, onDragStart: i, onDragEnd: s, onMouseOver: g, onMouseOut: c, onRadiusChanged: l, onCenterChanged: m, center: f, defaultCenter: u, radius: h, defaultRadius: y } = e, d = z(e, ["onClick", "onDrag", "onDragStart", "onDragEnd", "onMouseOver", "onMouseOut", "onRadiusChanged", "onCenterChanged", "center", "defaultCenter", "radius", "defaultRadius"]), [p, b] = N(null), C = J(), P = re(Object.assign(Object.assign({}, d), { clickable: (n = d.clickable) !== null && n !== void 0 ? n : !!r, draggable: (t = d.draggable) !== null && t !== void 0 ? t : !!(a || i || s || m), editable: (o = d.editable) !== null && o !== void 0 ? o : !!l }), oe);
821
821
  return E(() => {
822
822
  if (!C) {
823
823
  C === void 0 && console.error("<Circle> has to be inside a Map component.");
824
824
  return;
825
825
  }
826
- const P = new google.maps.Circle(Object.assign(Object.assign({}, w), { center: f ?? u, radius: h ?? y }));
827
- return P.setMap(C), b(P), () => {
828
- P.setMap(null), b(null);
826
+ const w = new google.maps.Circle(Object.assign(Object.assign({}, P), { center: f ?? u, radius: h ?? y }));
827
+ return w.setMap(C), b(w), () => {
828
+ w.setMap(null), b(null);
829
829
  };
830
- }, [C]), D(p, "click", r), D(p, "drag", a), D(p, "dragstart", i), D(p, "dragend", s), D(p, "mouseover", g), D(p, "mouseout", c), D(p, "radius_changed", l ? () => {
831
- const P = p == null ? void 0 : p.getRadius();
832
- P !== void 0 && l(P);
833
- } : null), D(p, "center_changed", m ? () => {
830
+ }, [C]), S(p, "click", r), S(p, "drag", a), S(p, "dragstart", i), S(p, "dragend", s), S(p, "mouseover", g), S(p, "mouseout", c), S(p, "radius_changed", l ? () => {
831
+ const w = p == null ? void 0 : p.getRadius();
832
+ w !== void 0 && l(w);
833
+ } : null), S(p, "center_changed", m ? () => {
834
834
  m(p == null ? void 0 : p.getCenter());
835
835
  } : null), E(() => {
836
- p && p.setOptions(w);
837
- }, [p, w]), E(() => {
838
- !p || !f || $e(f, p.getCenter()) || p.setCenter(f);
836
+ p && p.setOptions(P);
837
+ }, [p, P]), E(() => {
838
+ !p || !f || Je(f, p.getCenter()) || p.setCenter(f);
839
839
  }, [p, f]), E(() => {
840
840
  !p || h === void 0 || h !== p.getRadius() && p.setRadius(h);
841
841
  }, [p, h]), p;
842
842
  }
843
- const ct = H((e, n) => {
844
- const t = lt(e);
845
- return V(n, () => t, [t]), A.createElement(A.Fragment, null);
843
+ const st = U((e, n) => {
844
+ const t = it(e);
845
+ return H(n, () => t, [t]), L.createElement(L.Fragment, null);
846
846
  });
847
- ct.displayName = "Circle";
848
- function dt(e, n, t) {
847
+ st.displayName = "Circle";
848
+ function lt(e, n, t) {
849
849
  if (n != null && typeof n != "object")
850
850
  throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");
851
851
  const o = e.style;
@@ -853,7 +853,7 @@ function dt(e, n, t) {
853
853
  if (n == null)
854
854
  return;
855
855
  for (const r in n)
856
- n.hasOwnProperty(r) && Re(o, r, n[r]);
856
+ n.hasOwnProperty(r) && Ne(o, r, n[r]);
857
857
  return;
858
858
  }
859
859
  for (const r in t)
@@ -861,14 +861,14 @@ function dt(e, n, t) {
861
861
  if (n != null)
862
862
  for (const r in n) {
863
863
  const a = n[r];
864
- n.hasOwnProperty(r) && t[r] !== a && Re(o, r, a);
864
+ n.hasOwnProperty(r) && t[r] !== a && Ne(o, r, a);
865
865
  }
866
866
  }
867
- function Re(e, n, t) {
867
+ function Ne(e, n, t) {
868
868
  const o = n.indexOf("--") === 0;
869
- t == null || typeof t == "boolean" || t === "" ? o ? e.setProperty(n, "") : n === "float" ? e.cssFloat = "" : e[n] = "" : o ? e.setProperty(n, t) : typeof t == "number" && t !== 0 && !gt(n) ? e[n] = t + "px" : n === "float" ? e.cssFloat = t : e[n] = ("" + t).trim();
869
+ t == null || typeof t == "boolean" || t === "" ? o ? e.setProperty(n, "") : n === "float" ? e.cssFloat = "" : e[n] = "" : o ? e.setProperty(n, t) : typeof t == "number" && t !== 0 && !dt(n) ? e[n] = t + "px" : n === "float" ? e.cssFloat = t : e[n] = ("" + t).trim();
870
870
  }
871
- const ut = /* @__PURE__ */ new Set([
871
+ const ct = /* @__PURE__ */ new Set([
872
872
  "animationIterationCount",
873
873
  "aspectRatio",
874
874
  "borderImageOutset",
@@ -915,18 +915,18 @@ const ut = /* @__PURE__ */ new Set([
915
915
  "strokeOpacity",
916
916
  "strokeWidth"
917
917
  ]);
918
- function gt(e) {
919
- return ut.has(e);
918
+ function dt(e) {
919
+ return ct.has(e);
920
920
  }
921
- function ze(e) {
921
+ function xe(e) {
922
922
  const n = e.getPaths(), t = [];
923
923
  for (let o = 0; o < n.getLength(); o++)
924
924
  t.push(n.getAt(o).getArray());
925
925
  return t;
926
926
  }
927
- function ft(e) {
927
+ function ut(e) {
928
928
  var n, t, o;
929
- const { onClick: r, onDrag: a, onDragStart: i, onDragEnd: s, onMouseOver: g, onMouseOut: c, onPathsChanged: l, polygon: m, encodedPaths: f, paths: u, defaultPaths: h } = e, y = j(e, ["onClick", "onDrag", "onDragStart", "onDragEnd", "onMouseOver", "onMouseOut", "onPathsChanged", "polygon", "encodedPaths", "paths", "defaultPaths"]), [d, p] = k(null), b = Z(), C = $("geometry"), w = U(!1), P = ae(Object.assign(Object.assign({}, y), { clickable: (n = y.clickable) !== null && n !== void 0 ? n : !!r, draggable: (t = y.draggable) !== null && t !== void 0 ? t : !!(a || i || s || l), editable: (o = y.editable) !== null && o !== void 0 ? o : !!l }), re);
929
+ const { onClick: r, onDrag: a, onDragStart: i, onDragEnd: s, onMouseOver: g, onMouseOut: c, onPathsChanged: l, polygon: m, encodedPaths: f, paths: u, defaultPaths: h } = e, y = z(e, ["onClick", "onDrag", "onDragStart", "onDragEnd", "onMouseOver", "onMouseOut", "onPathsChanged", "polygon", "encodedPaths", "paths", "defaultPaths"]), [d, p] = N(null), b = J(), C = Z("geometry"), P = F(!1), w = re(Object.assign(Object.assign({}, y), { clickable: (n = y.clickable) !== null && n !== void 0 ? n : !!r, draggable: (t = y.draggable) !== null && t !== void 0 ? t : !!(a || i || s || l), editable: (o = y.editable) !== null && o !== void 0 ? o : !!l }), oe);
930
930
  return E(() => {
931
931
  if (!b) {
932
932
  b === void 0 && console.error("<Polygon> has to be inside a Map component.");
@@ -936,66 +936,66 @@ function ft(e) {
936
936
  if (m) {
937
937
  v = m;
938
938
  const O = u ?? h;
939
- O && Array.isArray(O) && v.setPaths(O), v.setOptions(P);
939
+ O && Array.isArray(O) && v.setPaths(O), v.setOptions(w);
940
940
  } else {
941
- const O = u ?? h, L = Object.assign({}, P);
942
- O && Array.isArray(O) && (L.paths = O), v = new google.maps.Polygon(L);
941
+ const O = u ?? h, D = Object.assign({}, w);
942
+ O && Array.isArray(O) && (D.paths = O), v = new google.maps.Polygon(D);
943
943
  }
944
944
  return v.setMap(b), p(v), () => {
945
945
  v.setMap(null), p(null);
946
946
  };
947
- }, [b, m]), D(d, "click", r), D(d, "drag", a), D(d, "dragstart", i), D(d, "mouseover", g), D(d, "mouseout", c), D(d, "dragend", (v) => {
948
- s == null || s(v), l && d && !w.current && l(ze(d));
947
+ }, [b, m]), S(d, "click", r), S(d, "drag", a), S(d, "dragstart", i), S(d, "mouseover", g), S(d, "mouseout", c), S(d, "dragend", (v) => {
948
+ s == null || s(v), l && d && !P.current && l(xe(d));
949
949
  }), E(() => {
950
950
  if (!d || !l)
951
951
  return;
952
952
  const v = [], O = d.getPaths();
953
953
  if (typeof O.getLength != "function" || typeof O.getAt != "function")
954
954
  return;
955
- const L = () => {
956
- w.current || l(ze(d));
957
- }, _ = (T) => {
958
- v.push(google.maps.event.addListener(T, "insert_at", L)), v.push(google.maps.event.addListener(T, "remove_at", L)), v.push(google.maps.event.addListener(T, "set_at", L));
955
+ const D = () => {
956
+ P.current || l(xe(d));
957
+ }, _ = (M) => {
958
+ v.push(google.maps.event.addListener(M, "insert_at", D)), v.push(google.maps.event.addListener(M, "remove_at", D)), v.push(google.maps.event.addListener(M, "set_at", D));
959
959
  };
960
- for (let T = 0; T < O.getLength(); T++)
961
- _(O.getAt(T));
962
- return v.push(google.maps.event.addListener(O, "insert_at", (T) => {
963
- _(O.getAt(T)), L();
964
- })), v.push(google.maps.event.addListener(O, "set_at", (T) => {
965
- _(O.getAt(T)), L();
966
- })), v.push(google.maps.event.addListener(O, "remove_at", L)), () => {
967
- v.forEach((T) => T.remove());
960
+ for (let M = 0; M < O.getLength(); M++)
961
+ _(O.getAt(M));
962
+ return v.push(google.maps.event.addListener(O, "insert_at", (M) => {
963
+ _(O.getAt(M)), D();
964
+ })), v.push(google.maps.event.addListener(O, "set_at", (M) => {
965
+ _(O.getAt(M)), D();
966
+ })), v.push(google.maps.event.addListener(O, "remove_at", D)), () => {
967
+ v.forEach((M) => M.remove());
968
968
  };
969
969
  }, [
970
970
  d,
971
971
  l,
972
972
  u,
973
973
  f,
974
- P.editable,
975
- P.draggable
974
+ w.editable,
975
+ w.draggable
976
976
  ]), E(() => {
977
- d && d.setOptions(P);
978
- }, [d, P]), E(() => {
977
+ d && d.setOptions(w);
978
+ }, [d, w]), E(() => {
979
979
  if (!d || !u || !Array.isArray(u))
980
980
  return;
981
- const v = u[0], O = Array.isArray(v) ? u : [u], L = d.getPaths();
982
- Hn(O, L) || (w.current = !0, d.setPaths(u), w.current = !1);
981
+ const v = u[0], O = Array.isArray(v) ? u : [u], D = d.getPaths();
982
+ Fn(O, D) || (P.current = !0, d.setPaths(u), P.current = !1);
983
983
  }, [d, u]), E(() => {
984
984
  if (!d || !f || !C)
985
985
  return;
986
- w.current = !0;
986
+ P.current = !0;
987
987
  const v = f.map((O) => C.encoding.decodePath(O));
988
- d.setPaths(v), w.current = !1;
988
+ d.setPaths(v), P.current = !1;
989
989
  }, [d, f, C]), d;
990
990
  }
991
- const mt = H((e, n) => {
992
- const t = ft(e);
993
- return V(n, () => t, [t]), A.createElement(A.Fragment, null);
991
+ const gt = U((e, n) => {
992
+ const t = ut(e);
993
+ return H(n, () => t, [t]), L.createElement(L.Fragment, null);
994
994
  });
995
- mt.displayName = "Polygon";
996
- function pt(e) {
995
+ gt.displayName = "Polygon";
996
+ function ft(e) {
997
997
  var n, t, o;
998
- const { onClick: r, onDrag: a, onDragStart: i, onDragEnd: s, onMouseOver: g, onMouseOut: c, onPathChanged: l, polyline: m, encodedPath: f, path: u, defaultPath: h } = e, y = j(e, ["onClick", "onDrag", "onDragStart", "onDragEnd", "onMouseOver", "onMouseOut", "onPathChanged", "polyline", "encodedPath", "path", "defaultPath"]), [d, p] = k(null), b = Z(), C = $("geometry"), w = U(!1), P = ae(Object.assign(Object.assign({}, y), { clickable: (n = y.clickable) !== null && n !== void 0 ? n : !!r, draggable: (t = y.draggable) !== null && t !== void 0 ? t : !!(a || i || s || l), editable: (o = y.editable) !== null && o !== void 0 ? o : !!l }), re);
998
+ const { onClick: r, onDrag: a, onDragStart: i, onDragEnd: s, onMouseOver: g, onMouseOut: c, onPathChanged: l, polyline: m, encodedPath: f, path: u, defaultPath: h } = e, y = z(e, ["onClick", "onDrag", "onDragStart", "onDragEnd", "onMouseOver", "onMouseOut", "onPathChanged", "polyline", "encodedPath", "path", "defaultPath"]), [d, p] = N(null), b = J(), C = Z("geometry"), P = F(!1), w = re(Object.assign(Object.assign({}, y), { clickable: (n = y.clickable) !== null && n !== void 0 ? n : !!r, draggable: (t = y.draggable) !== null && t !== void 0 ? t : !!(a || i || s || l), editable: (o = y.editable) !== null && o !== void 0 ? o : !!l }), oe);
999
999
  return E(() => {
1000
1000
  if (!b) {
1001
1001
  b === void 0 && console.error("<Polyline> has to be inside a Map component.");
@@ -1005,16 +1005,16 @@ function pt(e) {
1005
1005
  if (m) {
1006
1006
  v = m;
1007
1007
  const O = u ?? h;
1008
- O && Array.isArray(O) && v.setPath(O), v.setOptions(P);
1008
+ O && Array.isArray(O) && v.setPath(O), v.setOptions(w);
1009
1009
  } else {
1010
- const O = u ?? h, L = Object.assign({}, P);
1011
- O && Array.isArray(O) && (L.path = O), v = new google.maps.Polyline(L);
1010
+ const O = u ?? h, D = Object.assign({}, w);
1011
+ O && Array.isArray(O) && (D.path = O), v = new google.maps.Polyline(D);
1012
1012
  }
1013
1013
  return v.setMap(b), p(v), () => {
1014
1014
  v.setMap(null), p(null);
1015
1015
  };
1016
- }, [b, m]), D(d, "click", r), D(d, "drag", a), D(d, "dragstart", i), D(d, "mouseover", g), D(d, "mouseout", c), D(d, "dragend", (v) => {
1017
- s == null || s(v), l && d && !w.current && l(d.getPath().getArray());
1016
+ }, [b, m]), S(d, "click", r), S(d, "drag", a), S(d, "dragstart", i), S(d, "mouseover", g), S(d, "mouseout", c), S(d, "dragend", (v) => {
1017
+ s == null || s(v), l && d && !P.current && l(d.getPath().getArray());
1018
1018
  }), E(() => {
1019
1019
  if (!d || !l)
1020
1020
  return;
@@ -1022,50 +1022,50 @@ function pt(e) {
1022
1022
  if (!v)
1023
1023
  return;
1024
1024
  const O = () => {
1025
- w.current || l(v.getArray());
1026
- }, L = [
1025
+ P.current || l(v.getArray());
1026
+ }, D = [
1027
1027
  google.maps.event.addListener(v, "insert_at", O),
1028
1028
  google.maps.event.addListener(v, "remove_at", O),
1029
1029
  google.maps.event.addListener(v, "set_at", O)
1030
1030
  ];
1031
1031
  return () => {
1032
- L.forEach((_) => _.remove());
1032
+ D.forEach((_) => _.remove());
1033
1033
  };
1034
1034
  }, [
1035
1035
  d,
1036
1036
  l,
1037
1037
  u,
1038
1038
  f,
1039
- P.editable,
1040
- P.draggable
1039
+ w.editable,
1040
+ w.draggable
1041
1041
  ]), E(() => {
1042
- d && d.setOptions(P);
1043
- }, [d, P]), E(() => {
1042
+ d && d.setOptions(w);
1043
+ }, [d, w]), E(() => {
1044
1044
  if (!d || !u)
1045
1045
  return;
1046
1046
  const v = d.getPath();
1047
- qe(u, v) || (w.current = !0, d.setPath(u), w.current = !1);
1047
+ Ze(u, v) || (P.current = !0, d.setPath(u), P.current = !1);
1048
1048
  }, [d, u]), E(() => {
1049
1049
  if (!d || !f || !C)
1050
1050
  return;
1051
- w.current = !0;
1051
+ P.current = !0;
1052
1052
  const v = C.encoding.decodePath(f);
1053
- d.setPath(v), w.current = !1;
1053
+ d.setPath(v), P.current = !1;
1054
1054
  }, [d, f, C]), d;
1055
1055
  }
1056
- const ht = H((e, n) => {
1057
- const t = pt(e);
1058
- return V(n, () => t, [t]), A.createElement(A.Fragment, null);
1056
+ const mt = U((e, n) => {
1057
+ const t = ft(e);
1058
+ return H(n, () => t, [t]), L.createElement(L.Fragment, null);
1059
1059
  });
1060
- ht.displayName = "Polyline";
1061
- const vt = {
1060
+ mt.displayName = "Polyline";
1061
+ const pt = {
1062
1062
  center: { lat: 0, lng: 0, altitude: 0 },
1063
1063
  range: 0,
1064
1064
  heading: 0,
1065
1065
  tilt: 0,
1066
1066
  roll: 0
1067
- }, yt = ["center", "range", "heading", "tilt", "roll"];
1068
- function bt(e, n, t) {
1067
+ }, ht = ["center", "range", "heading", "tilt", "roll"];
1068
+ function vt(e, n, t) {
1069
1069
  const o = e[t];
1070
1070
  if (o != null)
1071
1071
  if (t === "center") {
@@ -1074,15 +1074,15 @@ function bt(e, n, t) {
1074
1074
  } else
1075
1075
  n.current[t] = o;
1076
1076
  }
1077
- function Et(e) {
1078
- const n = Ke(), t = U(Object.assign({}, vt));
1077
+ function yt(e) {
1078
+ const n = qe(), t = F(Object.assign({}, pt));
1079
1079
  return E(() => {
1080
1080
  if (!e)
1081
1081
  return;
1082
1082
  const o = [];
1083
- for (const r of yt) {
1083
+ for (const r of ht) {
1084
1084
  const a = `gmp-${r}change`, i = () => {
1085
- bt(e, t, r), n();
1085
+ vt(e, t, r), n();
1086
1086
  };
1087
1087
  e.addEventListener(a, i), o.push(() => e.removeEventListener(a, i));
1088
1088
  }
@@ -1092,8 +1092,8 @@ function Et(e) {
1092
1092
  };
1093
1093
  }, [e, n]), t;
1094
1094
  }
1095
- function Ct(e) {
1096
- const n = $("maps3d"), [t, o] = k(!1), [, r] = ye(), [a, i] = ye(), s = Et(a);
1095
+ function bt(e) {
1096
+ const n = Z("maps3d"), [t, o] = N(!1), [, r] = he(), [a, i] = he(), s = yt(a);
1097
1097
  return E(() => {
1098
1098
  customElements.whenDefined("gmp-map-3d").then(() => {
1099
1099
  o(!0);
@@ -1115,23 +1115,23 @@ function Ct(e) {
1115
1115
  defaultRoll: b,
1116
1116
  // Non-element props to exclude
1117
1117
  id: C,
1118
- style: w,
1119
- className: P,
1118
+ style: P,
1119
+ className: w,
1120
1120
  children: v,
1121
1121
  onCenterChanged: O,
1122
- onHeadingChanged: L,
1122
+ onHeadingChanged: D,
1123
1123
  onTiltChanged: _,
1124
- onRangeChanged: T,
1124
+ onRangeChanged: M,
1125
1125
  onRollChanged: x,
1126
- onCameraChanged: R,
1126
+ onCameraChanged: $,
1127
1127
  onClick: q,
1128
- onSteadyChange: Pe,
1129
- onAnimationEnd: Ae,
1130
- onError: ge,
1131
- mode: Te,
1132
- gestureHandling: Le
1133
- } = e, M = j(e, ["center", "heading", "tilt", "range", "roll", "defaultCenter", "defaultHeading", "defaultTilt", "defaultRange", "defaultRoll", "id", "style", "className", "children", "onCenterChanged", "onHeadingChanged", "onTiltChanged", "onRangeChanged", "onRollChanged", "onCameraChanged", "onClick", "onSteadyChange", "onAnimationEnd", "onError", "mode", "gestureHandling"]), S = c ?? h, W = l ?? y, De = m ?? d, Se = f ?? p, _e = u ?? b, K = Object.assign({}, M);
1134
- S && (K.center = S), W !== void 0 && (K.heading = W), De !== void 0 && (K.tilt = De), Se !== void 0 && (K.range = Se), _e !== void 0 && (K.roll = _e), Object.assign(a, K);
1128
+ onSteadyChange: ue,
1129
+ onAnimationEnd: Me,
1130
+ onError: Pe,
1131
+ mode: A,
1132
+ gestureHandling: I
1133
+ } = e, Q = z(e, ["center", "heading", "tilt", "range", "roll", "defaultCenter", "defaultHeading", "defaultTilt", "defaultRange", "defaultRoll", "id", "style", "className", "children", "onCenterChanged", "onHeadingChanged", "onTiltChanged", "onRangeChanged", "onRollChanged", "onCameraChanged", "onClick", "onSteadyChange", "onAnimationEnd", "onError", "mode", "gestureHandling"]), we = c ?? h, Ae = l ?? y, Le = m ?? d, De = f ?? p, Se = u ?? b, W = Object.assign({}, Q);
1134
+ we && (W.center = we), Ae !== void 0 && (W.heading = Ae), Le !== void 0 && (W.tilt = Le), De !== void 0 && (W.range = De), Se !== void 0 && (W.roll = Se), Object.assign(a, W);
1135
1135
  },
1136
1136
  // this effect should only run when the map3d element first becomes
1137
1137
  // available, so we skip re-running it when other props change.
@@ -1139,13 +1139,13 @@ function Ct(e) {
1139
1139
  [a]
1140
1140
  ), [a, r, i, s, !!n && t];
1141
1141
  }
1142
- function Ot(e) {
1142
+ function Et(e) {
1143
1143
  return e ? "toJSON" in e && typeof e.toJSON == "function" ? e.toJSON() : e : null;
1144
1144
  }
1145
- function Mt(e, n, t) {
1145
+ function Ct(e, n, t) {
1146
1146
  var o, r, a, i, s, g, c;
1147
- const l = Ot(t.center), m = (o = l == null ? void 0 : l.lat) !== null && o !== void 0 ? o : null, f = (r = l == null ? void 0 : l.lng) !== null && r !== void 0 ? r : null, u = (a = l == null ? void 0 : l.altitude) !== null && a !== void 0 ? a : null, h = (i = t.range) !== null && i !== void 0 ? i : null, y = (s = t.heading) !== null && s !== void 0 ? s : null, d = (g = t.tilt) !== null && g !== void 0 ? g : null, p = (c = t.roll) !== null && c !== void 0 ? c : null;
1148
- Q(() => {
1147
+ const l = Et(t.center), m = (o = l == null ? void 0 : l.lat) !== null && o !== void 0 ? o : null, f = (r = l == null ? void 0 : l.lng) !== null && r !== void 0 ? r : null, u = (a = l == null ? void 0 : l.altitude) !== null && a !== void 0 ? a : null, h = (i = t.range) !== null && i !== void 0 ? i : null, y = (s = t.heading) !== null && s !== void 0 ? s : null, d = (g = t.tilt) !== null && g !== void 0 ? g : null, p = (c = t.roll) !== null && c !== void 0 ? c : null;
1148
+ Y(() => {
1149
1149
  var b;
1150
1150
  if (!e)
1151
1151
  return;
@@ -1157,14 +1157,14 @@ function Mt(e, n, t) {
1157
1157
  }), h !== null && C.range !== h && (e.range = h), y !== null && C.heading !== y && (e.heading = y), d !== null && C.tilt !== d && (e.tilt = d), p !== null && C.roll !== p && (e.roll = p);
1158
1158
  });
1159
1159
  }
1160
- const je = [
1160
+ const Re = [
1161
1161
  "gmp-centerchange",
1162
1162
  "gmp-headingchange",
1163
1163
  "gmp-tiltchange",
1164
1164
  "gmp-rangechange",
1165
1165
  "gmp-rollchange"
1166
1166
  ];
1167
- function Y(e, n) {
1167
+ function K(e, n) {
1168
1168
  const t = e.center;
1169
1169
  let o;
1170
1170
  return t && "toJSON" in t && typeof t.toJSON == "function" ? o = t.toJSON() : t ? o = t : o = { lat: 0, lng: 0, altitude: 0 }, {
@@ -1179,7 +1179,7 @@ function Y(e, n) {
1179
1179
  }
1180
1180
  };
1181
1181
  }
1182
- function wt(e, n) {
1182
+ function Ot(e, n) {
1183
1183
  const t = n;
1184
1184
  return {
1185
1185
  type: "gmp-click",
@@ -1190,7 +1190,7 @@ function wt(e, n) {
1190
1190
  }
1191
1191
  };
1192
1192
  }
1193
- function Pt(e, n) {
1193
+ function Mt(e, n) {
1194
1194
  return {
1195
1195
  type: "gmp-steadychange",
1196
1196
  map3d: e,
@@ -1199,43 +1199,43 @@ function Pt(e, n) {
1199
1199
  }
1200
1200
  };
1201
1201
  }
1202
- function At(e, n) {
1202
+ function Pt(e, n) {
1203
1203
  const { onCenterChanged: t, onHeadingChanged: o, onTiltChanged: r, onRangeChanged: a, onRollChanged: i, onCameraChanged: s, onClick: g, onSteadyChange: c, onAnimationEnd: l, onError: m } = n;
1204
- J(e, "gmp-centerchange", t, Y), J(e, "gmp-headingchange", o, Y), J(e, "gmp-tiltchange", r, Y), J(e, "gmp-rangechange", a, Y), J(e, "gmp-rollchange", i, Y), E(() => {
1204
+ G(e, "gmp-centerchange", t, K), G(e, "gmp-headingchange", o, K), G(e, "gmp-tiltchange", r, K), G(e, "gmp-rangechange", a, K), G(e, "gmp-rollchange", i, K), E(() => {
1205
1205
  if (!e || !s)
1206
1206
  return;
1207
1207
  const f = () => {
1208
- s(Y(e, "camerachange"));
1208
+ s(K(e, "camerachange"));
1209
1209
  };
1210
- for (const u of je)
1210
+ for (const u of Re)
1211
1211
  e.addEventListener(u, f);
1212
1212
  return () => {
1213
- for (const u of je)
1213
+ for (const u of Re)
1214
1214
  e.removeEventListener(u, f);
1215
1215
  };
1216
1216
  }, [e, s]), E(() => {
1217
1217
  if (!e || !g)
1218
1218
  return;
1219
1219
  const f = (u) => {
1220
- g(wt(e, u));
1220
+ g(Ot(e, u));
1221
1221
  };
1222
1222
  return e.addEventListener("gmp-click", f), () => e.removeEventListener("gmp-click", f);
1223
1223
  }, [e, g]), E(() => {
1224
1224
  if (!e || !c)
1225
1225
  return;
1226
1226
  const f = (u) => {
1227
- c(Pt(e, u));
1227
+ c(Mt(e, u));
1228
1228
  };
1229
1229
  return e.addEventListener("gmp-steadychange", f), () => e.removeEventListener("gmp-steadychange", f);
1230
- }, [e, c]), J(e, "gmp-animationend", l, (f, u) => ({
1230
+ }, [e, c]), G(e, "gmp-animationend", l, (f, u) => ({
1231
1231
  type: u,
1232
1232
  map3d: f
1233
- })), J(e, "gmp-error", m, (f, u) => ({
1233
+ })), G(e, "gmp-error", m, (f, u) => ({
1234
1234
  type: u,
1235
1235
  map3d: f
1236
1236
  }));
1237
1237
  }
1238
- function J(e, n, t, o) {
1238
+ function G(e, n, t, o) {
1239
1239
  E(() => {
1240
1240
  if (!e || !t)
1241
1241
  return;
@@ -1245,7 +1245,7 @@ function J(e, n, t, o) {
1245
1245
  return e.addEventListener(n, r), () => e.removeEventListener(n, r);
1246
1246
  }, [e, n, t, o]);
1247
1247
  }
1248
- const Tt = /* @__PURE__ */ new Set([
1248
+ const wt = /* @__PURE__ */ new Set([
1249
1249
  "bounds",
1250
1250
  "defaultUIHidden",
1251
1251
  "gestureHandling",
@@ -1258,38 +1258,38 @@ const Tt = /* @__PURE__ */ new Set([
1258
1258
  "minTilt",
1259
1259
  "mode"
1260
1260
  ]);
1261
- function Lt(e, n) {
1262
- const t = N(() => {
1261
+ function At(e, n) {
1262
+ const t = T(() => {
1263
1263
  const o = {}, r = Object.keys(n);
1264
1264
  for (const a of r) {
1265
- if (!Tt.has(a))
1265
+ if (!wt.has(a))
1266
1266
  continue;
1267
1267
  const i = n[a];
1268
1268
  i !== void 0 && (o[a] = i);
1269
1269
  }
1270
1270
  return o;
1271
1271
  }, [n]);
1272
- Je(() => {
1272
+ Ve(() => {
1273
1273
  e && Object.assign(e, t);
1274
1274
  }, [e, t]);
1275
1275
  }
1276
- const Dt = A.createContext(null), St = {
1276
+ const Lt = L.createContext(null), Dt = {
1277
1277
  width: "100%",
1278
1278
  height: "100%",
1279
1279
  position: "relative"
1280
- }, _t = H((e, n) => {
1281
- const { children: t, id: o, className: r, style: a } = e, i = F(ee);
1280
+ }, St = U((e, n) => {
1281
+ const { children: t, id: o, className: r, style: a } = e, i = B(X);
1282
1282
  if (!i)
1283
1283
  throw new Error("<Map3D> can only be used inside an <APIProvider> component.");
1284
- const { addMap3DInstance: s, removeMap3DInstance: g } = i, [c, l, m, f, u] = Ct(e);
1285
- Mt(c, f, e), At(c, e), Lt(c, e), E(() => {
1284
+ const { addMap3DInstance: s, removeMap3DInstance: g } = i, [c, l, m, f, u] = bt(e);
1285
+ Ct(c, f, e), Pt(c, e), At(c, e), E(() => {
1286
1286
  if (!c)
1287
1287
  return;
1288
1288
  const d = o ?? "default";
1289
1289
  return s(c, d), () => {
1290
1290
  g(d);
1291
1291
  };
1292
- }, [c, o]), V(n, () => ({
1292
+ }, [c, o]), H(n, () => ({
1293
1293
  map3d: c,
1294
1294
  flyCameraAround: (d) => {
1295
1295
  c == null || c.flyCameraAround(d);
@@ -1301,24 +1301,24 @@ const Dt = A.createContext(null), St = {
1301
1301
  c == null || c.stopCameraAnimation();
1302
1302
  }
1303
1303
  }), [c]);
1304
- const h = N(() => Object.assign(Object.assign({}, St), a), [a]), y = N(() => ({ map3d: c }), [c]);
1305
- return u ? A.createElement(
1304
+ const h = T(() => Object.assign(Object.assign({}, Dt), a), [a]), y = T(() => ({ map3d: c }), [c]);
1305
+ return u ? L.createElement(
1306
1306
  "div",
1307
1307
  Object.assign({ ref: l, "data-testid": "map-3d", style: r ? void 0 : h, className: r }, o ? { id: o } : {}),
1308
- A.createElement("gmp-map-3d", { ref: m, style: { width: "100%", height: "100%" } }, c && A.createElement(Dt.Provider, { value: y }, t))
1309
- ) : A.createElement("div", Object.assign({ ref: l, "data-testid": "map-3d", style: r ? void 0 : h, className: r }, o ? { id: o } : {}));
1308
+ L.createElement("gmp-map-3d", { ref: m, style: { width: "100%", height: "100%" } }, c && L.createElement(Lt.Provider, { value: y }, t))
1309
+ ) : L.createElement("div", Object.assign({ ref: l, "data-testid": "map-3d", style: r ? void 0 : h, className: r }, o ? { id: o } : {}));
1310
1310
  });
1311
- _t.displayName = "Map3D";
1312
- const we = tn(null), kt = H(function(n, t) {
1313
- const { children: o, onClick: r, position: a, altitudeMode: i, collisionBehavior: s, drawsWhenOccluded: g, extruded: c, label: l, sizePreserved: m, zIndex: f, title: u } = n, h = !!r, [y, d] = k(null), [p, b] = k(!1), C = N(() => {
1311
+ St.displayName = "Map3D";
1312
+ const Oe = en(null), It = U(function(n, t) {
1313
+ const { children: o, onClick: r, position: a, altitudeMode: i, collisionBehavior: s, drawsWhenOccluded: g, extruded: c, label: l, sizePreserved: m, zIndex: f, title: u } = n, h = !!r, [y, d] = N(null), [p, b] = N(!1), C = T(() => {
1314
1314
  const v = document.createElement("div");
1315
1315
  return v.style.display = "none", document.body.appendChild(v), v;
1316
1316
  }, []);
1317
1317
  E(() => () => C.remove(), [C]);
1318
- const w = ne((v) => {
1318
+ const P = ee((v) => {
1319
1319
  d(v), typeof t == "function" ? t(v) : t && (t.current = v);
1320
1320
  }, [t]);
1321
- be(y, "gmp-click", r), Q(() => {
1321
+ ve(y, "gmp-click", r), Y(() => {
1322
1322
  if (p || !y || !C)
1323
1323
  return;
1324
1324
  for (; y.firstChild; )
@@ -1327,40 +1327,40 @@ const we = tn(null), kt = H(function(n, t) {
1327
1327
  for (const O of v) {
1328
1328
  if (O.nodeType !== Node.ELEMENT_NODE)
1329
1329
  continue;
1330
- const L = O, _ = L.tagName.toLowerCase();
1330
+ const D = O, _ = D.tagName.toLowerCase();
1331
1331
  if (_ === "img" || _ === "svg") {
1332
- const T = document.createElement("template");
1333
- T.content.appendChild(L.cloneNode(!0)), y.appendChild(T);
1332
+ const M = document.createElement("template");
1333
+ M.content.appendChild(D.cloneNode(!0)), y.appendChild(M);
1334
1334
  } else
1335
- y.appendChild(L.cloneNode(!0));
1335
+ y.appendChild(D.cloneNode(!0));
1336
1336
  }
1337
1337
  }, [y, C, o, p]);
1338
- const P = N(() => ({ marker: y, setContentHandledExternally: b }), [y]);
1339
- return I(y, "position", a), I(y, "altitudeMode", i), I(y, "collisionBehavior", s), I(y, "drawsWhenOccluded", g), I(y, "extruded", c), I(y, "label", l), I(y, "sizePreserved", m), I(y, "zIndex", f), I(y, "title", u ?? ""), A.createElement(
1340
- we.Provider,
1341
- { value: P },
1342
- h ? A.createElement("gmp-marker-3d-interactive", { ref: w }) : A.createElement("gmp-marker-3d", { ref: w }),
1343
- ue(o, C)
1338
+ const w = T(() => ({ marker: y, setContentHandledExternally: b }), [y]);
1339
+ return k(y, "position", a), k(y, "altitudeMode", i), k(y, "collisionBehavior", s), k(y, "drawsWhenOccluded", g), k(y, "extruded", c), k(y, "label", l), k(y, "sizePreserved", m), k(y, "zIndex", f), k(y, "title", u ?? ""), L.createElement(
1340
+ Oe.Provider,
1341
+ { value: w },
1342
+ h ? L.createElement("gmp-marker-3d-interactive", { ref: P }) : L.createElement("gmp-marker-3d", { ref: P }),
1343
+ de(o, C)
1344
1344
  );
1345
1345
  });
1346
- kt.displayName = "Marker3D";
1347
- const It = H(function(n, t) {
1346
+ It.displayName = "Marker3D";
1347
+ const _t = U(function(n, t) {
1348
1348
  var o;
1349
- const { children: r, headerContent: a, style: i, className: s, open: g = !0, position: c, anchor: l, anchorId: m, altitudeMode: f, lightDismissDisabled: u, autoPanDisabled: h, onClose: y } = n, [d, p] = k(null), b = U(null);
1350
- V(t, () => d, [d]), Nt(d, g, y), I(d, "open", g ?? !1), I(d, "altitudeMode", f), I(d, "lightDismissDisabled", u), I(d, "autoPanDisabled", h);
1349
+ const { children: r, headerContent: a, style: i, className: s, open: g = !0, position: c, anchor: l, anchorId: m, altitudeMode: f, lightDismissDisabled: u, autoPanDisabled: h, onClose: y } = n, [d, p] = N(null), b = F(null);
1350
+ H(t, () => d, [d]), kt(d, g, y), k(d, "open", g ?? !1), k(d, "altitudeMode", f), k(d, "lightDismissDisabled", u), k(d, "autoPanDisabled", h);
1351
1351
  const C = (o = l ?? m) !== null && o !== void 0 ? o : c;
1352
- return I(d, "positionAnchor", C), Q(() => {
1353
- d && (dt(d, i || null, b.current), b.current = i || null);
1354
- }, [d, i]), A.createElement(
1352
+ return k(d, "positionAnchor", C), Y(() => {
1353
+ d && (lt(d, i || null, b.current), b.current = i || null);
1354
+ }, [d, i]), L.createElement(
1355
1355
  "gmp-popover",
1356
1356
  { ref: p, className: s },
1357
- a && A.createElement("div", { slot: "header" }, a),
1357
+ a && L.createElement("div", { slot: "header" }, a),
1358
1358
  r
1359
1359
  );
1360
1360
  });
1361
- It.displayName = "Popover";
1362
- function Nt(e, n, t) {
1363
- const o = U(void 0), r = U(n);
1361
+ _t.displayName = "Popover";
1362
+ function kt(e, n, t) {
1363
+ const o = F(void 0), r = F(n);
1364
1364
  E(() => {
1365
1365
  r.current = n;
1366
1366
  }, [n]), E(() => {
@@ -1381,8 +1381,8 @@ function Nt(e, n, t) {
1381
1381
  };
1382
1382
  }, [e, t]);
1383
1383
  }
1384
- function xt(e) {
1385
- const [n, t] = k(null), o = Z(), { onClick: r, onDrag: a, onDragStart: i, onDragEnd: s, onMouseOver: g, onMouseOut: c } = e, l = j(e, ["onClick", "onDrag", "onDragStart", "onDragEnd", "onMouseOver", "onMouseOut"]), { position: m, draggable: f } = l;
1384
+ function Tt(e) {
1385
+ const [n, t] = N(null), o = J(), { onClick: r, onDrag: a, onDragStart: i, onDragEnd: s, onMouseOver: g, onMouseOut: c } = e, l = z(e, ["onClick", "onDrag", "onDragStart", "onDragEnd", "onMouseOver", "onMouseOut"]), { position: m, draggable: f } = l;
1386
1386
  return E(() => {
1387
1387
  if (!o) {
1388
1388
  o === void 0 && console.error("<Marker> has to be inside a Map component.");
@@ -1414,13 +1414,13 @@ function xt(e) {
1414
1414
  f || !m || !n || n.setPosition(m);
1415
1415
  }, [f, m, n]), n;
1416
1416
  }
1417
- const nn = H((e, n) => {
1418
- const t = xt(e);
1419
- return V(n, () => t, [t]), A.createElement(A.Fragment, null);
1417
+ const Qe = U((e, n) => {
1418
+ const t = Tt(e);
1419
+ return H(n, () => t, [t]), L.createElement(L.Fragment, null);
1420
1420
  });
1421
- nn.displayName = "Marker";
1422
- const Rt = (e) => {
1423
- const n = F(Me), t = F(we), o = n == null ? void 0 : n.marker, r = t == null ? void 0 : t.marker, a = t == null ? void 0 : t.setContentHandledExternally, i = N(() => document.createElement("div"), []), s = $("marker");
1421
+ Qe.displayName = "Marker";
1422
+ const Nt = (e) => {
1423
+ const n = B(Ce), t = B(Oe), o = n == null ? void 0 : n.marker, r = t == null ? void 0 : t.marker, a = t == null ? void 0 : t.setContentHandledExternally, i = T(() => document.createElement("div"), []), s = Z("marker");
1424
1424
  return E(() => {
1425
1425
  if (r && a)
1426
1426
  return a(!0), () => a(!1);
@@ -1440,16 +1440,16 @@ const Rt = (e) => {
1440
1440
  o === void 0 && r === void 0 && console.error("The <Pin> component can only be used inside <AdvancedMarker> or <Marker3D>.");
1441
1441
  return;
1442
1442
  }
1443
- e.glyph && e.children && te("The <Pin> component only uses children to render the glyph if both the glyph property and children are present."), Ce.count(e.children) > 1 && te("Passing multiple children to the <Pin> component might lead to unexpected results.");
1443
+ e.glyph && e.children && ne("The <Pin> component only uses children to render the glyph if both the glyph property and children are present."), be.count(e.children) > 1 && ne("Passing multiple children to the <Pin> component might lead to unexpected results.");
1444
1444
  const c = Object.assign({}, e), l = new google.maps.marker.PinElement(c);
1445
1445
  e.children && (l.glyph = i);
1446
1446
  const m = (g = o.content) === null || g === void 0 ? void 0 : g.firstChild;
1447
1447
  for (; m != null && m.firstChild; )
1448
1448
  m.removeChild(m.firstChild);
1449
1449
  m && m.appendChild(l.element);
1450
- }, [o, i, r, e]), ue(e.children, i);
1451
- }, zt = (e) => {
1452
- const { children: n } = e, t = F(Me), o = F(we), r = t == null ? void 0 : t.marker, a = o == null ? void 0 : o.marker, i = o == null ? void 0 : o.setContentHandledExternally, s = N(() => document.createElement("div"), []), g = $("marker");
1450
+ }, [o, i, r, e]), de(e.children, i);
1451
+ }, xt = (e) => {
1452
+ const { children: n } = e, t = B(Ce), o = B(Oe), r = t == null ? void 0 : t.marker, a = o == null ? void 0 : o.marker, i = o == null ? void 0 : o.setContentHandledExternally, s = T(() => document.createElement("div"), []), g = Z("marker");
1453
1453
  return E(() => {
1454
1454
  if (a && i)
1455
1455
  return i(!0), () => i(!1);
@@ -1469,7 +1469,7 @@ const Rt = (e) => {
1469
1469
  r === void 0 && a === void 0 && console.error("The <Pin> component can only be used inside <AdvancedMarker> or <Marker3D>.");
1470
1470
  return;
1471
1471
  }
1472
- (e.glyphSrc || e.glyphText) && n && te("The <Pin> component only uses children to render the glyph if both glyphSrc/glyphText and children are present."), Ce.count(n) > 1 && te("Passing multiple children to the <Pin> component might lead to unexpected results.");
1472
+ (e.glyphSrc || e.glyphText) && n && ne("The <Pin> component only uses children to render the glyph if both glyphSrc/glyphText and children are present."), be.count(n) > 1 && ne("Passing multiple children to the <Pin> component might lead to unexpected results.");
1473
1473
  const l = Object.assign({}, e), m = new g.PinElement(l);
1474
1474
  n && m.appendChild(s);
1475
1475
  const f = (c = r.content) === null || c === void 0 ? void 0 : c.firstChild;
@@ -1483,23 +1483,23 @@ const Rt = (e) => {
1483
1483
  a,
1484
1484
  n,
1485
1485
  e
1486
- ]), ue(n, s);
1487
- }, jt = (e) => {
1486
+ ]), de(n, s);
1487
+ }, Rt = (e) => {
1488
1488
  var n;
1489
- const t = $("marker"), o = N(() => t ? typeof customElements < "u" && customElements.get("gmp-pin") !== void 0 : !1, [t]);
1489
+ const t = Z("marker"), o = T(() => t ? typeof customElements < "u" && customElements.get("gmp-pin") !== void 0 : !1, [t]);
1490
1490
  if (!t)
1491
1491
  return null;
1492
1492
  if (o) {
1493
- const { glyph: r, glyphSrc: a, glyphText: i } = e, s = j(e, ["glyph", "glyphSrc", "glyphText"]), g = r instanceof URL || typeof r == "string" && r.startsWith("http"), c = i ?? (typeof r == "string" && !g ? r : void 0), l = a ?? (g ? String(r) : void 0);
1494
- return A.createElement(zt, Object.assign({}, s, { glyphText: c, glyphSrc: l }));
1493
+ const { glyph: r, glyphSrc: a, glyphText: i } = e, s = z(e, ["glyph", "glyphSrc", "glyphText"]), g = r instanceof URL || typeof r == "string" && r.startsWith("http"), c = i ?? (typeof r == "string" && !g ? r : void 0), l = a ?? (g ? String(r) : void 0);
1494
+ return L.createElement(xt, Object.assign({}, s, { glyphText: c, glyphSrc: l }));
1495
1495
  } else {
1496
- const { glyph: r, glyphSrc: a, glyphText: i } = e, s = j(e, ["glyph", "glyphSrc", "glyphText"]), g = (n = r ?? a) !== null && n !== void 0 ? n : i;
1497
- return A.createElement(Rt, Object.assign({}, s, { glyph: g }));
1496
+ const { glyph: r, glyphSrc: a, glyphText: i } = e, s = z(e, ["glyph", "glyphSrc", "glyphText"]), g = (n = r ?? a) !== null && n !== void 0 ? n : i;
1497
+ return L.createElement(Nt, Object.assign({}, s, { glyph: g }));
1498
1498
  }
1499
1499
  };
1500
- function Bt(e) {
1500
+ function zt(e) {
1501
1501
  var n, t, o;
1502
- const { onClick: r, onDrag: a, onDragStart: i, onDragEnd: s, onMouseOver: g, onMouseOut: c, onBoundsChanged: l, bounds: m, defaultBounds: f } = e, u = j(e, ["onClick", "onDrag", "onDragStart", "onDragEnd", "onMouseOver", "onMouseOut", "onBoundsChanged", "bounds", "defaultBounds"]), [h, y] = k(null), d = Z(), p = ae(Object.assign(Object.assign({}, u), { clickable: (n = u.clickable) !== null && n !== void 0 ? n : !!r, draggable: (t = u.draggable) !== null && t !== void 0 ? t : !!(a || i || s || l), editable: (o = u.editable) !== null && o !== void 0 ? o : !!l }), re);
1502
+ const { onClick: r, onDrag: a, onDragStart: i, onDragEnd: s, onMouseOver: g, onMouseOut: c, onBoundsChanged: l, bounds: m, defaultBounds: f } = e, u = z(e, ["onClick", "onDrag", "onDragStart", "onDragEnd", "onMouseOver", "onMouseOut", "onBoundsChanged", "bounds", "defaultBounds"]), [h, y] = N(null), d = J(), p = re(Object.assign(Object.assign({}, u), { clickable: (n = u.clickable) !== null && n !== void 0 ? n : !!r, draggable: (t = u.draggable) !== null && t !== void 0 ? t : !!(a || i || s || l), editable: (o = u.editable) !== null && o !== void 0 ? o : !!l }), oe);
1503
1503
  return E(() => {
1504
1504
  if (!d) {
1505
1505
  d === void 0 && console.error("<Rectangle> has to be inside a Map component.");
@@ -1509,131 +1509,22 @@ function Bt(e) {
1509
1509
  return b.setMap(d), y(b), () => {
1510
1510
  b.setMap(null), y(null);
1511
1511
  };
1512
- }, [d]), D(h, "click", r), D(h, "drag", a), D(h, "dragstart", i), D(h, "dragend", s), D(h, "mouseover", g), D(h, "mouseout", c), D(h, "bounds_changed", l ? () => {
1512
+ }, [d]), S(h, "click", r), S(h, "drag", a), S(h, "dragstart", i), S(h, "dragend", s), S(h, "mouseover", g), S(h, "mouseout", c), S(h, "bounds_changed", l ? () => {
1513
1513
  l(h == null ? void 0 : h.getBounds());
1514
1514
  } : null), E(() => {
1515
1515
  h && h.setOptions(p);
1516
1516
  }, [h, p]), E(() => {
1517
- !h || !m || Un(m, h.getBounds()) || h.setBounds(m);
1517
+ !h || !m || Bn(m, h.getBounds()) || h.setBounds(m);
1518
1518
  }, [h, m]), h;
1519
1519
  }
1520
- const Ft = H((e, n) => {
1521
- const t = Bt(e);
1522
- return V(n, () => t, [
1520
+ const jt = U((e, n) => {
1521
+ const t = zt(e);
1522
+ return H(n, () => t, [
1523
1523
  t
1524
- ]), A.createElement(A.Fragment, null);
1524
+ ]), L.createElement(L.Fragment, null);
1525
1525
  });
1526
- Ft.displayName = "Rectangle";
1527
- function X(e) {
1528
- return typeof document > "u" ? "" : getComputedStyle(document.documentElement).getPropertyValue(e).trim();
1529
- }
1530
- function pe() {
1531
- const e = X("--background"), n = X("--foreground"), t = X("--border"), o = X("--muted"), r = X("--muted-foreground"), a = X("--primary");
1532
- return [
1533
- // Hide business POIs — clinical-listing UIs don't want Google's
1534
- // restaurants / shops bleeding into the practice-location card.
1535
- {
1536
- featureType: "poi.business",
1537
- stylers: [{ visibility: "off" }]
1538
- },
1539
- // Canvas / paper colour. `--background` is the surface the kit
1540
- // itself paints on, so the map blends with the card chrome.
1541
- {
1542
- elementType: "geometry",
1543
- stylers: [{ color: e || "" }]
1544
- },
1545
- // All label text → kit foreground.
1546
- {
1547
- elementType: "labels.text.fill",
1548
- stylers: [{ color: n || "" }]
1549
- },
1550
- // Label outlines / strokes pulled from the muted surface so text
1551
- // stays legible without painting solid white halos in dark themes.
1552
- {
1553
- elementType: "labels.text.stroke",
1554
- stylers: [{ color: o || "" }]
1555
- },
1556
- // Roads + administrative boundaries → border token. This is the
1557
- // strongest visual cue tying map geometry to kit chrome.
1558
- {
1559
- featureType: "administrative",
1560
- elementType: "geometry",
1561
- stylers: [{ color: t || "" }]
1562
- },
1563
- {
1564
- featureType: "road",
1565
- elementType: "geometry",
1566
- stylers: [{ color: r || "" }]
1567
- },
1568
- {
1569
- featureType: "road",
1570
- elementType: "labels.text.fill",
1571
- stylers: [{ color: n || "" }]
1572
- },
1573
- // Highways get a slight emphasis via the primary accent — a
1574
- // single-pixel cue that helps the eye when zoomed out.
1575
- {
1576
- featureType: "road.highway",
1577
- elementType: "geometry.stroke",
1578
- // Empty-string fallback (consistent with the other rules) so a
1579
- // consumer with a non-violet brand doesn't get violet bleeding
1580
- // into highway / transit strokes. Google Maps treats empty as
1581
- // "use the default".
1582
- stylers: [{ color: a || "" }]
1583
- },
1584
- // Water → muted surface (subtle, doesn't overpower the marker).
1585
- {
1586
- featureType: "water",
1587
- elementType: "geometry",
1588
- stylers: [{ color: o || "" }]
1589
- },
1590
- // Parks → muted-foreground at low opacity feel via a softer
1591
- // tint; same family as the border so the palette stays tight.
1592
- {
1593
- featureType: "poi.park",
1594
- elementType: "geometry",
1595
- stylers: [{ color: t || "" }]
1596
- },
1597
- // Transit lines (rail, bus) — kit primary, subtle.
1598
- {
1599
- featureType: "transit",
1600
- elementType: "geometry",
1601
- // Empty-string fallback (consistent with the other rules) so a
1602
- // consumer with a non-violet brand doesn't get violet bleeding
1603
- // into highway / transit strokes. Google Maps treats empty as
1604
- // "use the default".
1605
- stylers: [{ color: a || "" }]
1606
- },
1607
- // Landscape geometry — Google's default is a pale tan that fights
1608
- // kit dark themes hard. Painting it `--muted` keeps the canvas
1609
- // tonally coherent in all four themes.
1610
- {
1611
- featureType: "landscape",
1612
- elementType: "geometry",
1613
- stylers: [{ color: o || "" }]
1614
- },
1615
- // Highway fill — without this, Google's default pale-yellow
1616
- // highway shells clash with kit dark backgrounds. `--muted` keeps
1617
- // them subdued; the highway STROKE rule above is what does the
1618
- // brand-accent emphasis.
1619
- {
1620
- featureType: "road.highway",
1621
- elementType: "geometry.fill",
1622
- stylers: [{ color: o || "" }]
1623
- },
1624
- // POI label fills — scoped to `--muted-foreground` so business /
1625
- // POI labels (the few that survive after `poi.business` is
1626
- // hidden — schools, hospitals, transit stations) stay readable
1627
- // against the geometry tint without overriding the road-label
1628
- // rule above.
1629
- {
1630
- featureType: "poi",
1631
- elementType: "labels.text.fill",
1632
- stylers: [{ color: r || "" }]
1633
- }
1634
- ];
1635
- }
1636
- const Ut = {
1526
+ jt.displayName = "Rectangle";
1527
+ const Bt = {
1637
1528
  id: "map-view",
1638
1529
  capabilities: [],
1639
1530
  state: {},
@@ -1675,7 +1566,7 @@ const Ut = {
1675
1566
  description: "Sourced from the id prop."
1676
1567
  }
1677
1568
  }
1678
- }, Ht = oe(
1569
+ }, Ft = te(
1679
1570
  ["ds:relative ds:overflow-hidden ds:block", "ds:bg-[var(--muted)]"].join(" "),
1680
1571
  {
1681
1572
  variants: {
@@ -1699,7 +1590,7 @@ const Ut = {
1699
1590
  },
1700
1591
  defaultVariants: { size: "md", surface: "bordered" }
1701
1592
  }
1702
- ), Vt = oe("ds:block ds:inline-size-full", {
1593
+ ), Ut = te("ds:block ds:inline-size-full", {
1703
1594
  variants: {
1704
1595
  size: {
1705
1596
  sm: "ds:[block-size:var(--map-block-size)]",
@@ -1709,7 +1600,7 @@ const Ut = {
1709
1600
  }
1710
1601
  },
1711
1602
  defaultVariants: { size: "md" }
1712
- }), Gt = oe(
1603
+ }), Ht = te(
1713
1604
  [
1714
1605
  "ds:absolute ds:inset-0",
1715
1606
  "ds:flex ds:flex-col ds:items-center ds:justify-center",
@@ -1718,14 +1609,14 @@ const Ut = {
1718
1609
  "ds:bg-[var(--muted)] ds:text-[var(--foreground)]",
1719
1610
  "ds:text-center"
1720
1611
  ].join(" ")
1721
- ), Jt = oe("type-heading-3 ds:m-0"), Be = oe(
1612
+ ), Vt = te("type-heading-3 ds:m-0"), ze = te(
1722
1613
  "type-body-sm ds:text-[var(--muted-foreground)] ds:max-inline-size-[28rem] ds:m-0"
1723
1614
  );
1724
- function Zt({
1615
+ function Gt({
1725
1616
  onHandleReady: e,
1726
1617
  onMarkerSelect: n
1727
1618
  }) {
1728
- const t = Z();
1619
+ const t = J();
1729
1620
  return E(() => {
1730
1621
  t && e({
1731
1622
  panTo: (o) => t.panTo(o),
@@ -1734,35 +1625,35 @@ function Zt({
1734
1625
  });
1735
1626
  }, [t, e, n]), null;
1736
1627
  }
1737
- function $t({
1628
+ function Jt({
1738
1629
  address: e,
1739
1630
  description: n,
1740
1631
  onLoadMap: t,
1741
1632
  openInGoogleMapsHref: o,
1742
1633
  consentCta: r
1743
1634
  }) {
1744
- const { t: a } = He();
1745
- return /* @__PURE__ */ le("div", { className: Gt(), "data-testid": "map-view-consent", children: [
1746
- /* @__PURE__ */ z(
1747
- ln,
1635
+ const { t: a } = Fe();
1636
+ return /* @__PURE__ */ se("div", { className: Ht(), "data-testid": "map-view-consent", children: [
1637
+ /* @__PURE__ */ R(
1638
+ an,
1748
1639
  {
1749
1640
  "aria-hidden": "true",
1750
1641
  className: "ds:size-6 ds:text-[var(--muted-foreground)]"
1751
1642
  }
1752
1643
  ),
1753
- /* @__PURE__ */ z("p", { className: Jt(), children: a("mapView.consentTitle") }),
1754
- e ? /* @__PURE__ */ z(
1644
+ /* @__PURE__ */ R("p", { className: Vt(), children: a("mapView.consentTitle") }),
1645
+ e ? /* @__PURE__ */ R(
1755
1646
  "p",
1756
1647
  {
1757
- className: Be(),
1648
+ className: ze(),
1758
1649
  "data-testid": "map-view-address",
1759
1650
  children: e
1760
1651
  }
1761
1652
  ) : null,
1762
- /* @__PURE__ */ z("p", { className: Be(), children: n }),
1763
- /* @__PURE__ */ le("div", { className: "ds:flex ds:gap-[var(--spacing-sm)] ds:flex-wrap ds:items-center ds:justify-center", children: [
1764
- r ?? /* @__PURE__ */ z(
1765
- an,
1653
+ /* @__PURE__ */ R("p", { className: ze(), children: n }),
1654
+ /* @__PURE__ */ se("div", { className: "ds:flex ds:gap-[var(--spacing-sm)] ds:flex-wrap ds:items-center ds:justify-center", children: [
1655
+ r ?? /* @__PURE__ */ R(
1656
+ on,
1766
1657
  {
1767
1658
  type: "button",
1768
1659
  intent: "primary",
@@ -1772,7 +1663,7 @@ function $t({
1772
1663
  children: a("mapView.consentCta")
1773
1664
  }
1774
1665
  ),
1775
- /* @__PURE__ */ le(
1666
+ /* @__PURE__ */ se(
1776
1667
  "a",
1777
1668
  {
1778
1669
  href: o,
@@ -1781,14 +1672,14 @@ function $t({
1781
1672
  className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)] ds:text-[var(--primary)] ds:underline ds:underline-offset-2",
1782
1673
  children: [
1783
1674
  a("mapView.openInGoogleMaps"),
1784
- /* @__PURE__ */ z(cn, { "aria-hidden": "true", className: "ds:size-3" })
1675
+ /* @__PURE__ */ R(sn, { "aria-hidden": "true", className: "ds:size-3" })
1785
1676
  ]
1786
1677
  }
1787
1678
  )
1788
1679
  ] })
1789
1680
  ] });
1790
1681
  }
1791
- const qt = H(
1682
+ const Zt = U(
1792
1683
  ({
1793
1684
  id: e,
1794
1685
  apiKey: n,
@@ -1809,128 +1700,113 @@ const qt = H(
1809
1700
  className: d,
1810
1701
  ...p
1811
1702
  }, b) => {
1812
- const { t: C, i18n: w } = He(), P = on(), v = N(
1813
- () => `map-${P.replace(/[^a-zA-Z0-9-_]/g, "")}`,
1814
- [P]
1815
- ), [O, L] = k(!1);
1703
+ const { t: C, i18n: P } = Fe(), w = nn(), v = T(
1704
+ () => `map-${w.replace(/[^a-zA-Z0-9-_]/g, "")}`,
1705
+ [w]
1706
+ ), [O, D] = N(!1);
1816
1707
  E(() => {
1817
1708
  if (typeof window > "u") return;
1818
- const M = window.matchMedia("(prefers-reduced-motion: reduce)"), S = () => L(M.matches);
1819
- return S(), M.addEventListener("change", S), () => M.removeEventListener("change", S);
1709
+ const A = window.matchMedia("(prefers-reduced-motion: reduce)"), I = () => D(A.matches);
1710
+ return I(), A.addEventListener("change", I), () => A.removeEventListener("change", I);
1820
1711
  }, []);
1821
- const _ = N(() => `https://www.google.com/maps/search/?api=1&query=${c ? encodeURIComponent(c) : `${t.lat},${t.lng}`}`, [c, t.lat, t.lng]), [T, x] = k(
1822
- () => f ? [] : pe()
1823
- );
1824
- E(() => {
1825
- if (f || typeof document > "u") return;
1826
- x(pe());
1827
- const M = new MutationObserver(() => {
1828
- x(pe());
1829
- });
1830
- return M.observe(document.documentElement, {
1831
- attributes: !0,
1832
- attributeFilter: ["class"]
1833
- }), () => M.disconnect();
1834
- }, [f]);
1835
- const R = U(null), q = ne((M) => {
1836
- R.current = M;
1712
+ const _ = T(() => `https://www.google.com/maps/search/?api=1&query=${c ? encodeURIComponent(c) : `${t.lat},${t.lng}`}`, [c, t.lat, t.lng]), M = F(null), x = ee((A) => {
1713
+ M.current = A;
1837
1714
  }, []);
1838
- V(
1715
+ H(
1839
1716
  b,
1840
1717
  () => ({
1841
- panTo: (M) => {
1842
- var S;
1843
- return (S = R.current) == null ? void 0 : S.panTo(M);
1718
+ panTo: (A) => {
1719
+ var I;
1720
+ return (I = M.current) == null ? void 0 : I.panTo(A);
1844
1721
  },
1845
- setZoom: (M) => {
1846
- var S;
1847
- return (S = R.current) == null ? void 0 : S.setZoom(M);
1722
+ setZoom: (A) => {
1723
+ var I;
1724
+ return (I = M.current) == null ? void 0 : I.setZoom(A);
1848
1725
  },
1849
- selectMarker: (M) => {
1850
- var S;
1851
- return (S = R.current) == null ? void 0 : S.selectMarker(M);
1726
+ selectMarker: (A) => {
1727
+ var I;
1728
+ return (I = M.current) == null ? void 0 : I.selectMarker(A);
1852
1729
  }
1853
1730
  }),
1854
1731
  []
1855
1732
  );
1856
- const Pe = N(
1733
+ const $ = T(
1857
1734
  () => ({
1858
- panTo: (M) => {
1859
- var S;
1860
- return (S = R.current) == null ? void 0 : S.panTo(M);
1735
+ panTo: (A) => {
1736
+ var I;
1737
+ return (I = M.current) == null ? void 0 : I.panTo(A);
1861
1738
  },
1862
- setZoom: (M) => {
1863
- var S;
1864
- return (S = R.current) == null ? void 0 : S.setZoom(M);
1739
+ setZoom: (A) => {
1740
+ var I;
1741
+ return (I = M.current) == null ? void 0 : I.setZoom(A);
1865
1742
  },
1866
- selectMarker: (M) => {
1867
- var S;
1868
- return (S = R.current) == null ? void 0 : S.selectMarker(M);
1743
+ selectMarker: (A) => {
1744
+ var I;
1745
+ return (I = M.current) == null ? void 0 : I.selectMarker(A);
1869
1746
  }
1870
1747
  }),
1871
1748
  []
1872
1749
  );
1873
- sn(Ut, Pe, e), E(() => {
1874
- var M;
1875
- O || (M = R.current) == null || M.panTo(t);
1750
+ rn(Bt, $, e), E(() => {
1751
+ var A;
1752
+ O || (A = M.current) == null || A.panTo(t);
1876
1753
  }, [t.lat, t.lng, O]), E(() => {
1877
- var M;
1878
- (M = R.current) == null || M.setZoom(o);
1754
+ var A;
1755
+ (A = M.current) == null || A.setZoom(o);
1879
1756
  }, [o]);
1880
- const [Ae, ge] = k(!1), Te = s || Ae, Le = ne(() => {
1757
+ const [q, ue] = N(!1), Me = s || q, Pe = ee(() => {
1881
1758
  if (g) {
1882
- g(), ge(!0);
1759
+ g(), ue(!0);
1883
1760
  return;
1884
1761
  }
1885
- ge(!0);
1762
+ ue(!0);
1886
1763
  }, [g]);
1887
- return /* @__PURE__ */ z(
1764
+ return /* @__PURE__ */ R(
1888
1765
  "div",
1889
1766
  {
1890
- className: Ht({ size: u, surface: h, className: d }),
1767
+ className: Ft({ size: u, surface: h, className: d }),
1891
1768
  "data-component": "map-view",
1892
1769
  "data-component-id": e ?? v,
1893
1770
  role: "region",
1894
1771
  "aria-label": y ?? C("mapView.label"),
1895
1772
  ...p,
1896
- children: /* @__PURE__ */ z("div", { className: Vt({ size: u }), children: Te ? /* @__PURE__ */ z(
1897
- Sn,
1773
+ children: /* @__PURE__ */ R("div", { className: Ut({ size: u }), children: Me ? /* @__PURE__ */ R(
1774
+ Dn,
1898
1775
  {
1899
1776
  apiKey: n,
1900
- language: w.language,
1901
- children: /* @__PURE__ */ le(
1902
- Xe,
1777
+ language: P.language,
1778
+ children: /* @__PURE__ */ se(
1779
+ Ke,
1903
1780
  {
1904
1781
  defaultCenter: t,
1905
1782
  defaultZoom: o,
1906
1783
  mapId: f,
1907
- styles: f ? void 0 : T,
1908
1784
  gestureHandling: "cooperative",
1909
1785
  disableDefaultUI: !1,
1910
1786
  onClick: () => i == null ? void 0 : i(null),
1911
1787
  className: "ds:[inline-size:100%] ds:[block-size:100%]",
1912
1788
  children: [
1913
- /* @__PURE__ */ z(
1914
- Zt,
1789
+ /* @__PURE__ */ R(
1790
+ Gt,
1915
1791
  {
1916
- onHandleReady: q,
1917
- onMarkerSelect: (M) => i == null ? void 0 : i(M)
1792
+ onHandleReady: x,
1793
+ onMarkerSelect: (A) => i == null ? void 0 : i(A)
1918
1794
  }
1919
1795
  ),
1920
- (r ?? []).map((M) => {
1921
- const S = a != null && a === M.id, W = C("mapView.markerLabel", {
1922
- label: M.label ?? M.id
1796
+ (r ?? []).map((A) => {
1797
+ const I = a != null && a === A.id, Q = C("mapView.markerLabel", {
1798
+ label: A.label ?? A.id
1923
1799
  });
1924
- return f ? /* @__PURE__ */ z(
1925
- en,
1800
+ return f ? /* @__PURE__ */ R(
1801
+ Xe,
1926
1802
  {
1927
- position: M.position,
1928
- title: W,
1929
- "aria-label": W,
1930
- "data-selected": S ? "true" : "false",
1931
- onClick: () => i == null ? void 0 : i(M.id),
1932
- children: /* @__PURE__ */ z(
1933
- jt,
1803
+ position: A.position,
1804
+ title: Q,
1805
+ "aria-label": Q,
1806
+ "data-selected": I ? "true" : "false",
1807
+ onClick: () => i == null ? void 0 : i(A.id),
1808
+ children: /* @__PURE__ */ R(
1809
+ Rt,
1934
1810
  {
1935
1811
  background: "var(--primary)",
1936
1812
  borderColor: "var(--primary)",
@@ -1938,27 +1814,27 @@ const qt = H(
1938
1814
  }
1939
1815
  )
1940
1816
  },
1941
- M.id
1942
- ) : /* @__PURE__ */ z(
1943
- nn,
1817
+ A.id
1818
+ ) : /* @__PURE__ */ R(
1819
+ Qe,
1944
1820
  {
1945
- position: M.position,
1946
- title: W,
1947
- onClick: () => i == null ? void 0 : i(M.id)
1821
+ position: A.position,
1822
+ title: Q,
1823
+ onClick: () => i == null ? void 0 : i(A.id)
1948
1824
  },
1949
- M.id
1825
+ A.id
1950
1826
  );
1951
1827
  })
1952
1828
  ]
1953
1829
  }
1954
1830
  )
1955
1831
  }
1956
- ) : /* @__PURE__ */ z(
1957
- $t,
1832
+ ) : /* @__PURE__ */ R(
1833
+ Jt,
1958
1834
  {
1959
1835
  address: c,
1960
1836
  description: l ?? C("mapView.consentDescription"),
1961
- onLoadMap: Le,
1837
+ onLoadMap: Pe,
1962
1838
  consentCta: m,
1963
1839
  openInGoogleMapsHref: _
1964
1840
  }
@@ -1967,8 +1843,8 @@ const qt = H(
1967
1843
  );
1968
1844
  }
1969
1845
  );
1970
- qt.displayName = "MapView";
1846
+ Zt.displayName = "MapView";
1971
1847
  export {
1972
- qt as M
1848
+ Zt as M
1973
1849
  };
1974
- //# sourceMappingURL=map-view-ZgbhfRqy.js.map
1850
+ //# sourceMappingURL=map-view-vD5pvWs9.js.map