@alfadocs/ui-kit 0.41.2 → 0.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. package/dist/_chunks/address-autocomplete-CSjMrBvu.js +358 -0
  2. package/dist/_chunks/{alia-sidebar-DXsYPinm.js → alia-sidebar-BpX4z_af.js} +2 -2
  3. package/dist/_chunks/{ar-Cn_NxqkN.js → ar-DEz65ZJW.js} +2 -2
  4. package/dist/_chunks/bmi-calculator-DuVSFDuw.js +259 -0
  5. package/dist/_chunks/{booking-4mCw3Mpl.js → booking-CtLwaxkK.js} +4 -4
  6. package/dist/_chunks/{breadcrumb-CLlhx7qo.js → breadcrumb-OTbaY70e.js} +4 -4
  7. package/dist/_chunks/{calculator-dialog-B74fqpFZ.js → calculator-dialog-DdexHrTP.js} +2 -2
  8. package/dist/_chunks/{chart-Cbt0_sKv.js → chart-Cg3e9EH9.js} +101 -99
  9. package/dist/_chunks/cycle-calculator-Dln-y1k_.js +192 -0
  10. package/dist/_chunks/{date-picker-CvQfs6Xh.js → date-picker-Bq7xhMA-.js} +109 -108
  11. package/dist/_chunks/date-picker-variants-DLi1Va_e.js +3238 -0
  12. package/dist/_chunks/{date-range-picker-U9fn1g9d.js → date-range-picker-DcXuI9y7.js} +20 -19
  13. package/dist/_chunks/{date-time-picker-Cva0ZCWw.js → date-time-picker-RimumeLR.js} +18 -17
  14. package/dist/_chunks/{de-BMM2H7Bs.js → de-bTBGdjPS.js} +2 -2
  15. package/dist/_chunks/{dialog-Cee13rHU.js → dialog-DOYgd75U.js} +46 -37
  16. package/dist/_chunks/{document-scanner-CqS_klIr.js → document-scanner-BqLsGs4Y.js} +7 -7
  17. package/dist/_chunks/{dropdown-menu-BC5ZdOMo.js → dropdown-menu-CUEXqKis.js} +2 -2
  18. package/dist/_chunks/{due-date-calculator-CUspKSTw.js → due-date-calculator-Cc4dRqTI.js} +62 -41
  19. package/dist/_chunks/{editable-currency-cell-renderer-DgkCIIcO.js → editable-currency-cell-renderer-9jqwDv5x.js} +3 -3
  20. package/dist/_chunks/{el-BYPonAaK.js → el-BWG5RXxa.js} +6 -6
  21. package/dist/_chunks/{es-CMkVCQ4F.js → es-DfO_G435.js} +2 -2
  22. package/dist/_chunks/{fr-BcuWxqft.js → fr-BTn24bs8.js} +2 -2
  23. package/dist/_chunks/{freemium-paywall-BAk3a6er.js → freemium-paywall-BLXESpH4.js} +2 -2
  24. package/dist/_chunks/{gestation-BXEgDGmP.js → gestation-mWF4AXea.js} +3 -3
  25. package/dist/_chunks/{gestational-age-calculator-CsQ05qDy.js → gestational-age-calculator-ZMSrzkRW.js} +59 -45
  26. package/dist/_chunks/{header-CTZWX-tm.js → header-Ce1Br27u.js} +70 -75
  27. package/dist/_chunks/{header-settings-CBLwUK6t.js → header-settings-Bx0Biimh.js} +2 -2
  28. package/dist/_chunks/{hi-wkq_rQAh.js → hi-Dj3oYd84.js} +2 -2
  29. package/dist/_chunks/index.modern-D2LGACWg.js +1529 -0
  30. package/dist/_chunks/insert-result-DisOY2G-.js +243 -0
  31. package/dist/_chunks/{isSameWeek-Bim5ftRd.js → isSameWeek-HfxKk6Lz.js} +2 -2
  32. package/dist/_chunks/{it-GiQrQ9p4.js → it-Y85ofIQQ.js} +7 -7
  33. package/dist/_chunks/{ja-qfYg3Rua.js → ja-CQ7J6YoA.js} +2 -2
  34. package/dist/_chunks/{kbd-Cglkd7CY.js → kbd-D855ZXIW.js} +2 -2
  35. package/dist/_chunks/map-view-Tb5VfK9Y.js +333 -0
  36. package/dist/_chunks/marketplace-app-shell-Dc5cTIt8.js +428 -0
  37. package/dist/_chunks/{nl-xOogO4sZ.js → nl-D9kHCmp3.js} +2 -2
  38. package/dist/_chunks/{patient-search-CBq62kmL.js → patient-search-DPe2ZYEL.js} +2 -2
  39. package/dist/_chunks/{patient-shell-DF81lALv.js → patient-shell-CnT4L8gn.js} +3 -3
  40. package/dist/_chunks/{payment-form-Dy3WIIsC.js → payment-form-BzVsG6Ks.js} +5 -5
  41. package/dist/_chunks/{pdf-viewer-Cy6Ul3hZ.js → pdf-viewer-B6MC6VTx.js} +139 -126
  42. package/dist/_chunks/{pl-GnOW6eGK.js → pl-B3Smqpkr.js} +3 -3
  43. package/dist/_chunks/{practice-results-C0d4IL5E.js → practice-results-CrLpEiiW.js} +4 -4
  44. package/dist/_chunks/pregnancy-weight-gain-zZL5Ir2-.js +224 -0
  45. package/dist/_chunks/{pt-_bV5b5RW.js → pt-D3J-1c_7.js} +6 -6
  46. package/dist/_chunks/{public-header.agent-B2dDg2_d.js → public-header.agent-BY6FH71R.js} +2 -2
  47. package/dist/_chunks/radio-group-CLjK-SlK.js +167 -0
  48. package/dist/_chunks/{rich-text-editor-DLbg2852.js → rich-text-editor-DhGIBd4a.js} +10 -10
  49. package/dist/_chunks/{ro-BEcyh5Nj.js → ro-BKAbbEA3.js} +2 -2
  50. package/dist/_chunks/{ru-Bi86hqMf.js → ru-BeG8f0Ep.js} +3 -3
  51. package/dist/_chunks/{sheet-BV-yuLE2.js → sheet-xbzu4YiY.js} +7 -7
  52. package/dist/_chunks/sign-document-B-3k_0LO.js +344 -0
  53. package/dist/_chunks/{signature-capture-DoiBd6i3.js → signature-capture-CpMBhqQ9.js} +6 -6
  54. package/dist/_chunks/{sq-BujHSAWu.js → sq-_hRPaeUy.js} +6 -6
  55. package/dist/_chunks/subDays-Dv7q9S7u.js +8 -0
  56. package/dist/_chunks/{sv-C8AeDrTA.js → sv-g009fSpe.js} +2 -2
  57. package/dist/_chunks/tab-bar-Xetknddo.js +105 -0
  58. package/dist/_chunks/{theme-toggle-DpC28kt5.js → theme-toggle-ClATnY4Q.js} +2 -2
  59. package/dist/_chunks/{toast.agent-WHHfw5VX.js → toast.agent-B0MCsvdZ.js} +2 -2
  60. package/dist/_chunks/{tr-CMSs_Vgf.js → tr-OKUOuhMW.js} +2 -2
  61. package/dist/_chunks/{unit-converter-EUwO6QYq.js → unit-converter-CuXCXJhK.js} +46 -40
  62. package/dist/_chunks/{workflow-map-C3gB0FvB.js → workflow-map-BFNpzTiw.js} +2 -2
  63. package/dist/_chunks/{zh-CN-eXB-PFu4.js → zh-CN-De4zwEhx.js} +3 -3
  64. package/dist/agent-catalog.json +1 -1
  65. package/dist/brand/product-lockup/product-lockup.d.ts +16 -0
  66. package/dist/components/_shared/calendar-class-names.d.ts +8 -0
  67. package/dist/components/_shared/index.d.ts +2 -0
  68. package/dist/components/_shared/insert-result.d.ts +78 -6
  69. package/dist/components/address-autocomplete/address-autocomplete.d.ts +77 -0
  70. package/dist/components/address-autocomplete/index.d.ts +4 -0
  71. package/dist/components/address-autocomplete/index.js +6 -0
  72. package/dist/components/address-autocomplete/parse-address.d.ts +52 -0
  73. package/dist/components/badge/badge.d.ts +1 -1
  74. package/dist/components/bmi-calculator/bmi-calculator.d.ts +11 -1
  75. package/dist/components/bmi-calculator/index.js +1 -1
  76. package/dist/components/booking/index.js +1 -1
  77. package/dist/components/breadcrumb/index.js +1 -1
  78. package/dist/components/calculator-dialog/index.js +1 -1
  79. package/dist/components/card/card.d.ts +1 -1
  80. package/dist/components/chart/chart.d.ts +10 -0
  81. package/dist/components/chart/index.js +1 -1
  82. package/dist/components/cycle-calculator/cycle-calculator.d.ts +12 -2
  83. package/dist/components/cycle-calculator/index.js +1 -1
  84. package/dist/components/data-table/index.js +1 -1
  85. package/dist/components/date-picker/date-picker.d.ts +0 -1
  86. package/dist/components/date-picker/index.js +1 -1
  87. package/dist/components/date-range-picker/date-range-picker.d.ts +0 -1
  88. package/dist/components/date-range-picker/index.js +1 -1
  89. package/dist/components/date-time-picker/date-time-picker.d.ts +0 -1
  90. package/dist/components/date-time-picker/index.js +1 -1
  91. package/dist/components/dialog/index.js +1 -1
  92. package/dist/components/document-scanner/index.js +1 -1
  93. package/dist/components/dropdown-menu/index.js +1 -1
  94. package/dist/components/due-date-calculator/due-date-calculator.d.ts +11 -1
  95. package/dist/components/due-date-calculator/index.js +2 -2
  96. package/dist/components/freemium-paywall/index.js +1 -1
  97. package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +12 -2
  98. package/dist/components/gestational-age-calculator/index.js +1 -1
  99. package/dist/components/header/header.d.ts +8 -0
  100. package/dist/components/header/index.js +1 -1
  101. package/dist/components/header-settings/index.js +1 -1
  102. package/dist/components/index.d.ts +3 -1
  103. package/dist/components/kbd/index.js +1 -1
  104. package/dist/components/map-view/index.js +1 -1
  105. package/dist/components/matrix-rain/matrix-rain.d.ts +1 -1
  106. package/dist/components/patient-search/index.js +1 -1
  107. package/dist/components/payment-form/index.js +1 -1
  108. package/dist/components/pdf-viewer/index.js +1 -1
  109. package/dist/components/practice-results/index.js +1 -1
  110. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  111. package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +12 -2
  112. package/dist/components/public-header/index.js +1 -1
  113. package/dist/components/public-header/public-header.d.ts +1 -1
  114. package/dist/components/radio-group/index.js +1 -1
  115. package/dist/components/rich-text-editor/index.js +1 -1
  116. package/dist/components/sheet/index.js +1 -1
  117. package/dist/components/sign-document/index.js +1 -1
  118. package/dist/components/sign-document/sign-document.d.ts +12 -0
  119. package/dist/components/signature-capture/index.js +1 -1
  120. package/dist/components/stat/stat.d.ts +1 -1
  121. package/dist/components/tab-bar/index.d.ts +3 -0
  122. package/dist/components/tab-bar/index.js +5 -0
  123. package/dist/components/tab-bar/tab-bar.d.ts +104 -0
  124. package/dist/components/theme-toggle/index.js +1 -1
  125. package/dist/components/toast/index.js +1 -1
  126. package/dist/components/unit-converter/index.js +1 -1
  127. package/dist/components/unit-converter/unit-converter.d.ts +11 -1
  128. package/dist/components/workflow/index.js +1 -1
  129. package/dist/i18n/locales/ar.d.ts +17 -0
  130. package/dist/i18n/locales/ar.js +18 -1
  131. package/dist/i18n/locales/de.d.ts +17 -0
  132. package/dist/i18n/locales/de.js +18 -1
  133. package/dist/i18n/locales/el.d.ts +17 -0
  134. package/dist/i18n/locales/el.js +18 -1
  135. package/dist/i18n/locales/en.d.ts +17 -0
  136. package/dist/i18n/locales/en.js +18 -1
  137. package/dist/i18n/locales/es.d.ts +17 -0
  138. package/dist/i18n/locales/es.js +18 -1
  139. package/dist/i18n/locales/fr.d.ts +17 -0
  140. package/dist/i18n/locales/fr.js +18 -1
  141. package/dist/i18n/locales/hi.d.ts +17 -0
  142. package/dist/i18n/locales/hi.js +18 -1
  143. package/dist/i18n/locales/it.d.ts +17 -0
  144. package/dist/i18n/locales/it.js +18 -1
  145. package/dist/i18n/locales/ja.d.ts +17 -0
  146. package/dist/i18n/locales/ja.js +18 -1
  147. package/dist/i18n/locales/nl.d.ts +17 -0
  148. package/dist/i18n/locales/nl.js +18 -1
  149. package/dist/i18n/locales/pl.d.ts +17 -0
  150. package/dist/i18n/locales/pl.js +18 -1
  151. package/dist/i18n/locales/pt.d.ts +17 -0
  152. package/dist/i18n/locales/pt.js +18 -1
  153. package/dist/i18n/locales/ro.d.ts +17 -0
  154. package/dist/i18n/locales/ro.js +18 -1
  155. package/dist/i18n/locales/ru.d.ts +17 -0
  156. package/dist/i18n/locales/ru.js +18 -1
  157. package/dist/i18n/locales/sq.d.ts +17 -0
  158. package/dist/i18n/locales/sq.js +18 -1
  159. package/dist/i18n/locales/sv.d.ts +17 -0
  160. package/dist/i18n/locales/sv.js +18 -1
  161. package/dist/i18n/locales/tr.d.ts +17 -0
  162. package/dist/i18n/locales/tr.js +18 -1
  163. package/dist/i18n/locales/zh.d.ts +17 -0
  164. package/dist/i18n/locales/zh.js +18 -1
  165. package/dist/index.js +605 -599
  166. package/dist/locales/ar.json +18 -1
  167. package/dist/locales/de.json +18 -1
  168. package/dist/locales/el.json +18 -1
  169. package/dist/locales/en.json +18 -1
  170. package/dist/locales/es.json +18 -1
  171. package/dist/locales/fr.json +18 -1
  172. package/dist/locales/hi.json +18 -1
  173. package/dist/locales/it.json +18 -1
  174. package/dist/locales/ja.json +18 -1
  175. package/dist/locales/nl.json +18 -1
  176. package/dist/locales/pl.json +18 -1
  177. package/dist/locales/pt.json +18 -1
  178. package/dist/locales/ro.json +18 -1
  179. package/dist/locales/ru.json +18 -1
  180. package/dist/locales/sq.json +18 -1
  181. package/dist/locales/sv.json +18 -1
  182. package/dist/locales/tr.json +18 -1
  183. package/dist/locales/zh.json +18 -1
  184. package/dist/patterns/alia-assistant/index.js +1 -1
  185. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  186. package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +87 -4
  187. package/dist/patterns/patient-shell/index.js +1 -1
  188. package/dist/tokens.css +1411 -2
  189. package/package.json +16 -1
  190. package/dist/_chunks/bmi-calculator-DnEr513I.js +0 -213
  191. package/dist/_chunks/cycle-calculator-B5Uj9QeT.js +0 -185
  192. package/dist/_chunks/insert-result-yJ0QavoN.js +0 -133
  193. package/dist/_chunks/map-view-qJLybrmN.js +0 -1850
  194. package/dist/_chunks/marketplace-app-shell-BlxVizU4.js +0 -296
  195. package/dist/_chunks/pregnancy-weight-gain-BCdi-JSv.js +0 -209
  196. package/dist/_chunks/radio-group-BcF92GEF.js +0 -152
  197. package/dist/_chunks/react-day-picker-CdtIiKjx.js +0 -3174
  198. package/dist/_chunks/sign-document-CpLDZ6Db.js +0 -316
  199. package/dist/_chunks/subDays-_T9YeKPX.js +0 -8
@@ -1,1850 +0,0 @@
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
- if (n === t) return !0;
16
- if (n && t && typeof n == "object" && typeof t == "object") {
17
- if (n.constructor !== t.constructor) return !1;
18
- var o, r, a;
19
- if (Array.isArray(n)) {
20
- if (o = n.length, o != t.length) return !1;
21
- for (r = o; r-- !== 0; )
22
- if (!e(n[r], t[r])) return !1;
23
- return !0;
24
- }
25
- if (n.constructor === RegExp) return n.source === t.source && n.flags === t.flags;
26
- if (n.valueOf !== Object.prototype.valueOf) return n.valueOf() === t.valueOf();
27
- if (n.toString !== Object.prototype.toString) return n.toString() === t.toString();
28
- if (a = Object.keys(n), o = a.length, o !== Object.keys(t).length) return !1;
29
- for (r = o; r-- !== 0; )
30
- if (!Object.prototype.hasOwnProperty.call(t, a[r])) return !1;
31
- for (r = o; r-- !== 0; ) {
32
- var i = a[r];
33
- if (!e(n[i], t[i])) return !1;
34
- }
35
- return !0;
36
- }
37
- return n !== n && t !== t;
38
- }), ge;
39
- }
40
- var cn = ln();
41
- const oe = /* @__PURE__ */ tn(cn), dn = "1.8.3";
42
- function z(e, n) {
43
- var t = {};
44
- for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && n.indexOf(o) < 0 && (t[o] = e[o]);
45
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
46
- for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
47
- n.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (t[o[r]] = e[o[r]]);
48
- return t;
49
- }
50
- function _e(e, n, t, o) {
51
- function r(a) {
52
- return a instanceof t ? a : new t(function(i) {
53
- i(a);
54
- });
55
- }
56
- return new (t || (t = Promise))(function(a, i) {
57
- function s(l) {
58
- try {
59
- c(o.next(l));
60
- } catch (m) {
61
- i(m);
62
- }
63
- }
64
- function g(l) {
65
- try {
66
- c(o.throw(l));
67
- } catch (m) {
68
- i(m);
69
- }
70
- }
71
- function c(l) {
72
- l.done ? a(l.value) : r(l.value).then(s, g);
73
- }
74
- c((o = o.apply(e, [])).next());
75
- });
76
- }
77
- function un(e, n) {
78
- e.src = n;
79
- }
80
- const gn = (e) => {
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
- var p;
83
- await (t = g.createElement("script")), u.set("libraries", [...f] + "");
84
- for (o in e)
85
- u.set(o.replace(/[A-Z]/g, (b) => "_" + b[0].toLowerCase()), e[o]);
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
- }));
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
- }, 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
- console.warn(`[@googlemaps/js-api-loader] ${e}`);
91
- } : () => {
92
- }, vn = Ue ? (e) => {
93
- console.info(`[@googlemaps/js-api-loader] ${e}`);
94
- } : () => {
95
- }, yn = process.env.NODE_ENV !== "production";
96
- let me = !1;
97
- function bn(e) {
98
- if (me) {
99
- Ee(fn(e));
100
- return;
101
- }
102
- Cn(e), me = !0;
103
- }
104
- async function En(e) {
105
- var n, t;
106
- if (me || Ee(pn), !((t = (n = window == null ? void 0 : window.google) == null ? void 0 : n.maps) != null && t.importLibrary))
107
- throw new Error("google.maps.importLibrary is not installed.");
108
- return await google.maps.importLibrary(e);
109
- }
110
- function Cn(e) {
111
- var t, o;
112
- const n = !!((o = (t = window.google) == null ? void 0 : t.maps) != null && o.importLibrary);
113
- n ? vn(mn(e)) : yn && document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]') && Ee(hn), n || gn(e);
114
- }
115
- const j = {
116
- NOT_LOADED: "NOT_LOADED",
117
- LOADING: "LOADING",
118
- LOADED: "LOADED",
119
- FAILED: "FAILED",
120
- AUTH_FAILURE: "AUTH_FAILURE"
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
- return { mapInstances: e, addMapInstance: (a, i = "default") => {
132
- n((s) => Object.assign(Object.assign({}, s), { [i]: a }));
133
- }, removeMapInstance: (a = "default") => {
134
- n((i) => {
135
- var s = a;
136
- i[s];
137
- var g = z(i, [typeof s == "symbol" ? s : s + ""]);
138
- return g;
139
- });
140
- }, clearMapInstances: () => {
141
- n({});
142
- } };
143
- }
144
- function wn() {
145
- const [e, n] = N({});
146
- return {
147
- map3dInstances: e,
148
- addMap3DInstance: (a, i = "default") => {
149
- n((s) => Object.assign(Object.assign({}, s), { [i]: a }));
150
- },
151
- removeMap3DInstance: (a = "default") => {
152
- n((i) => {
153
- var s = a;
154
- i[s];
155
- var g = z(i, [typeof s == "symbol" ? s : s + ""]);
156
- return g;
157
- });
158
- },
159
- clearMap3DInstances: () => {
160
- n({});
161
- }
162
- };
163
- }
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
- const b = {
167
- apiKey: o,
168
- version: r,
169
- libraries: a.join(","),
170
- region: i,
171
- language: s,
172
- authReferrerPolicy: g,
173
- channel: c,
174
- solutionChannel: l
175
- };
176
- return JSON.stringify(b);
177
- }, [
178
- o,
179
- r,
180
- a,
181
- i,
182
- s,
183
- g,
184
- c,
185
- l
186
- ]), p = ee((b) => _e(this, void 0, void 0, function* () {
187
- if (h[b])
188
- return h[b];
189
- const C = yield En(b);
190
- return y({ name: b, value: C }), C;
191
- }), [h]);
192
- return E(() => (pe.add(u), u(V), () => {
193
- pe.delete(u);
194
- }), []), E(
195
- () => {
196
- _e(this, void 0, void 0, function* () {
197
- var b, C;
198
- try {
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
- if (!((C = (b = window.google) === null || b === void 0 ? void 0 : b.maps) === null || C === void 0) && C.importLibrary) {
202
- ae || ie(j.LOADED), yield Promise.all(P.map((v) => p(v))), n && n();
203
- return;
204
- }
205
- if (V === j.LOADING || V === j.LOADED) {
206
- V === j.LOADED && n && n();
207
- return;
208
- }
209
- ae = d, ie(j.LOADING);
210
- const w = Object.fromEntries(Object.entries({
211
- key: o,
212
- v: r,
213
- libraries: a,
214
- region: i,
215
- language: s,
216
- authReferrerPolicy: g
217
- }).filter(([, v]) => v !== void 0));
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
- }
222
- });
223
- },
224
- // eslint-disable-next-line react-hooks/exhaustive-deps
225
- [d, n, t, p, a]
226
- ), E(() => {
227
- if (f !== j.LOADED)
228
- return;
229
- const b = google.maps.Settings.getInstance();
230
- m ? b.fetchAppCheckToken = m : b.fetchAppCheckToken && (b.fetchAppCheckToken = null);
231
- }, [f, m]), {
232
- status: f,
233
- loadedLibraries: h,
234
- importLibrary: p
235
- };
236
- }
237
- function Ln(e) {
238
- return T(() => e.disableUsageAttribution ? null : Mn, [e.disableUsageAttribution]);
239
- }
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
- mapInstances: o,
243
- addMapInstance: r,
244
- removeMapInstance: a,
245
- clearMapInstances: i,
246
- map3dInstances: s,
247
- addMap3DInstance: g,
248
- removeMap3DInstance: c,
249
- clearMap3DInstances: l,
250
- status: m,
251
- loadedLibraries: f,
252
- importLibrary: u,
253
- internalUsageAttributionIds: h
254
- }), [
255
- o,
256
- r,
257
- a,
258
- i,
259
- s,
260
- g,
261
- c,
262
- l,
263
- m,
264
- f,
265
- u,
266
- h
267
- ]);
268
- return L.createElement(X.Provider, { value: y }, n);
269
- };
270
- function Sn(e, n) {
271
- for (const t of Tn) {
272
- const o = n[t], r = He[t];
273
- E(() => {
274
- if (!e || !o)
275
- return;
276
- const a = google.maps.event.addListener(e, r, (i) => {
277
- o(In(r, e, i));
278
- });
279
- return () => a.remove();
280
- }, [e, r, o]);
281
- }
282
- }
283
- function In(e, n, t) {
284
- var o;
285
- const r = {
286
- type: e,
287
- map: n,
288
- detail: {},
289
- stoppable: !1,
290
- stop: () => {
291
- }
292
- };
293
- if (_n.includes(e)) {
294
- const a = r, i = n.getCenter(), s = n.getZoom(), g = n.getHeading() || 0, c = n.getTilt() || 0, l = n.getBounds();
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
- center: (i == null ? void 0 : i.toJSON()) || { lat: 0, lng: 0 },
297
- zoom: s || 0,
298
- heading: g,
299
- tilt: c,
300
- bounds: (l == null ? void 0 : l.toJSON()) || {
301
- north: 90,
302
- east: 180,
303
- south: -90,
304
- west: -180
305
- }
306
- }, a;
307
- } else if (kn.includes(e)) {
308
- if (!t)
309
- throw new Error("[createEvent] mouse events must provide a srcEvent");
310
- const a = r;
311
- return a.domEvent = t.domEvent, a.stoppable = !0, a.stop = () => t.stop(), a.detail = {
312
- latLng: ((o = t.latLng) === null || o === void 0 ? void 0 : o.toJSON()) || null,
313
- placeId: t.placeId
314
- }, a;
315
- }
316
- return r;
317
- }
318
- const He = {
319
- onBoundsChanged: "bounds_changed",
320
- onCenterChanged: "center_changed",
321
- onClick: "click",
322
- onContextmenu: "contextmenu",
323
- onDblclick: "dblclick",
324
- onDrag: "drag",
325
- onDragend: "dragend",
326
- onDragstart: "dragstart",
327
- onHeadingChanged: "heading_changed",
328
- onIdle: "idle",
329
- onIsFractionalZoomEnabledChanged: "isfractionalzoomenabled_changed",
330
- onMapCapabilitiesChanged: "mapcapabilities_changed",
331
- onMapTypeIdChanged: "maptypeid_changed",
332
- onMousemove: "mousemove",
333
- onMouseout: "mouseout",
334
- onMouseover: "mouseover",
335
- onProjectionChanged: "projection_changed",
336
- onRenderingTypeChanged: "renderingtype_changed",
337
- onTilesLoaded: "tilesloaded",
338
- onTiltChanged: "tilt_changed",
339
- onZoomChanged: "zoom_changed",
340
- // note: onCameraChanged is an alias for the bounds_changed event,
341
- // since that is going to be fired in every situation where the camera is
342
- // updated.
343
- onCameraChanged: "bounds_changed"
344
- }, _n = [
345
- "bounds_changed",
346
- "center_changed",
347
- "heading_changed",
348
- "tilt_changed",
349
- "zoom_changed"
350
- ], kn = [
351
- "click",
352
- "contextmenu",
353
- "dblclick",
354
- "mousemove",
355
- "mouseout",
356
- "mouseover"
357
- ], Tn = Object.keys(He);
358
- function re(e, n) {
359
- const t = F(e);
360
- return n(e, t.current) || (t.current = e), t.current;
361
- }
362
- function Nn(e, n, t) {
363
- E(e, [re(n, t)]);
364
- }
365
- function Ve(e, n) {
366
- Nn(e, n, oe);
367
- }
368
- const xn = /* @__PURE__ */ new Set([
369
- "backgroundColor",
370
- "clickableIcons",
371
- "controlSize",
372
- "disableDefaultUI",
373
- "disableDoubleClickZoom",
374
- "draggable",
375
- "draggableCursor",
376
- "draggingCursor",
377
- "fullscreenControl",
378
- "fullscreenControlOptions",
379
- "gestureHandling",
380
- "headingInteractionEnabled",
381
- "isFractionalZoomEnabled",
382
- "keyboardShortcuts",
383
- "mapTypeControl",
384
- "mapTypeControlOptions",
385
- "mapTypeId",
386
- "maxZoom",
387
- "minZoom",
388
- "noClear",
389
- "panControl",
390
- "panControlOptions",
391
- "restriction",
392
- "rotateControl",
393
- "rotateControlOptions",
394
- "scaleControl",
395
- "scaleControlOptions",
396
- "scrollwheel",
397
- "streetView",
398
- "streetViewControl",
399
- "streetViewControlOptions",
400
- "styles",
401
- "tiltInteractionEnabled",
402
- "zoomControl",
403
- "zoomControlOptions"
404
- ]);
405
- function Rn(e, n) {
406
- const t = {}, o = Object.keys(n);
407
- for (const r of o)
408
- xn.has(r) && (t[r] = n[r]);
409
- Ve(() => {
410
- e && e.setOptions(t);
411
- }, [t]);
412
- }
413
- function Ge() {
414
- var e;
415
- return ((e = B(X)) === null || e === void 0 ? void 0 : e.status) || j.NOT_LOADED;
416
- }
417
- function zn(e, n) {
418
- const { viewport: t, viewState: o } = n, r = !!t;
419
- return Y(() => {
420
- if (!e || !o)
421
- return;
422
- const { latitude: a, longitude: i, bearing: s, pitch: g, zoom: c } = o;
423
- e.moveCamera({
424
- center: { lat: a, lng: i },
425
- heading: s,
426
- tilt: g,
427
- zoom: c + 1
428
- });
429
- }, [e, o]), r;
430
- }
431
- function jn(e) {
432
- return !e || typeof e != "object" || !("lat" in e && "lng" in e) ? !1 : Number.isFinite(e.lat) && Number.isFinite(e.lng);
433
- }
434
- function Je(e, n) {
435
- if (!e || !n)
436
- return !1;
437
- const t = ce(e), o = ce(n);
438
- return !(t.lat !== o.lat || t.lng !== o.lng);
439
- }
440
- function ce(e) {
441
- return jn(e) ? e : e.toJSON();
442
- }
443
- function ke(e) {
444
- if ("north" in e && "south" in e && "east" in e && "west" in e)
445
- return e;
446
- const n = e.getNorthEast().toJSON(), t = e.getSouthWest().toJSON();
447
- return {
448
- north: n.lat,
449
- east: n.lng,
450
- south: t.lat,
451
- west: t.lng
452
- };
453
- }
454
- function Bn(e, n) {
455
- if (!e || !n)
456
- return !1;
457
- const t = ke(e), o = ke(n);
458
- return t.north === o.north && t.south === o.south && t.east === o.east && t.west === o.west;
459
- }
460
- function Ze(e, n) {
461
- if (!e || !n)
462
- return e === n;
463
- const t = "getArray" in n ? n.getArray() : n;
464
- if (e.length !== t.length)
465
- return !1;
466
- for (let o = 0; o < e.length; o++)
467
- if (!Je(e[o], t[o]))
468
- return !1;
469
- return !0;
470
- }
471
- function Fn(e, n) {
472
- if (!e || !n)
473
- return e === n;
474
- const t = "getArray" in n ? n.getArray().map((o) => o.getArray()) : n;
475
- if (e.length !== t.length)
476
- return !1;
477
- for (let o = 0; o < e.length; o++)
478
- if (!Ze(e[o], t[o]))
479
- return !1;
480
- return !0;
481
- }
482
- function Un(e, n, t) {
483
- const o = t.center ? ce(t.center) : null;
484
- let r = null, a = null;
485
- o && Number.isFinite(o.lat) && Number.isFinite(o.lng) && (r = o.lat, a = o.lng);
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
- Y(() => {
488
- if (!e)
489
- return;
490
- const c = {};
491
- let l = !1;
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
- });
494
- }
495
- const Hn = () => {
496
- const e = {
497
- position: "absolute",
498
- top: 0,
499
- left: 0,
500
- bottom: 0,
501
- right: 0,
502
- zIndex: 999,
503
- display: "flex",
504
- flexFlow: "column nowrap",
505
- textAlign: "center",
506
- justifyContent: "center",
507
- fontSize: ".8rem",
508
- color: "rgba(0,0,0,0.6)",
509
- background: "#dddddd",
510
- padding: "1rem 1.5rem"
511
- };
512
- return L.createElement(
513
- "div",
514
- { style: e },
515
- L.createElement("h2", null, "Error: AuthFailure"),
516
- L.createElement(
517
- "p",
518
- null,
519
- "A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",
520
- L.createElement("code", null, "APIProvider.apiKey"),
521
- " prop is correct. Check the error-message in the console for further details."
522
- )
523
- );
524
- };
525
- function he() {
526
- const [e, n] = N(null), t = ee((o) => n(o), [n]);
527
- return [e, t];
528
- }
529
- function $e() {
530
- return Ge() === j.LOADED;
531
- }
532
- function qe() {
533
- const [, e] = Be((n) => n + 1, 0);
534
- return e;
535
- }
536
- function Vn(e, n) {
537
- const t = e.getCenter(), o = e.getZoom(), r = e.getHeading() || 0, a = e.getTilt() || 0, i = e.getBounds();
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
- center: (t == null ? void 0 : t.toJSON()) || { lat: 0, lng: 0 },
540
- zoom: o || 0,
541
- heading: r,
542
- tilt: a
543
- });
544
- }
545
- function Gn(e) {
546
- const n = qe(), t = F({
547
- center: { lat: 0, lng: 0 },
548
- heading: 0,
549
- tilt: 0,
550
- zoom: 0
551
- });
552
- return E(() => {
553
- if (!e)
554
- return;
555
- const o = google.maps.event.addListener(e, "bounds_changed", () => {
556
- Vn(e, t), n();
557
- });
558
- return () => o.remove();
559
- }, [e, n]), t;
560
- }
561
- class le {
562
- static has(n) {
563
- return this.entries[n] && this.entries[n].length > 0;
564
- }
565
- static pop(n) {
566
- return this.entries[n] && this.entries[n].pop() || null;
567
- }
568
- static push(n, t) {
569
- this.entries[n] || (this.entries[n] = []), this.entries[n].push(t);
570
- }
571
- }
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
- !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 P = p.internalUsageAttributionIds;
577
- P == null ? p.internalUsageAttributionIds = n.internalUsageAttributionIds : p.internalUsageAttributionIds = [
578
- ...n.internalUsageAttributionIds || [],
579
- ...P
580
- ];
581
- for (const v of Object.keys(p))
582
- p[v] === void 0 && delete p[v];
583
- const w = F(void 0);
584
- return E(
585
- () => {
586
- if (!a || !t)
587
- return;
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
- } else (!b || !C) && x.fitBounds({ east: 180, west: -180, south: -90, north: 90 });
594
- if (w.current) {
595
- const { mapId: $, cameraState: q } = w.current;
596
- $ !== D && x.moveCamera(q);
597
- }
598
- return () => {
599
- w.current = {
600
- mapId: D,
601
- // eslint-disable-next-line react-hooks/exhaustive-deps
602
- cameraState: s.current
603
- }, M.remove(), h ? le.push(_, x) : google.maps.event.clearInstanceListeners(x), r(null), O(g);
604
- };
605
- },
606
- // some dependencies are ignored in the list below:
607
- // - defaultBounds and the default* camera props will only be used once, and
608
- // changes should be ignored
609
- // - mapOptions has special hooks that take care of updating the options
610
- // eslint-disable-next-line react-hooks/exhaustive-deps
611
- [
612
- a,
613
- t,
614
- g,
615
- // these props can't be changed after initialization and require a new
616
- // instance to be created
617
- e.mapId,
618
- e.renderingType,
619
- e.colorScheme
620
- ]
621
- ), [o, i, s];
622
- }
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
- if (!a)
626
- throw new Error("<Map> can only be used inside an <ApiProvider> component.");
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
- E(() => {
631
- if (s)
632
- return l && s.setOptions({ disableDefaultUI: !0 }), (l || m) && s.setOptions({
633
- gestureHandling: "none",
634
- keyboardShortcuts: !1
635
- }), () => {
636
- s.setOptions({
637
- gestureHandling: e.gestureHandling,
638
- keyboardShortcuts: e.keyboardShortcuts
639
- });
640
- };
641
- }, [
642
- s,
643
- l,
644
- m,
645
- e.gestureHandling,
646
- e.keyboardShortcuts
647
- ]);
648
- const f = e.center ? ce(e.center) : null;
649
- let u = null, h = null;
650
- f && Number.isFinite(f.lat) && Number.isFinite(f.lng) && (u = f.lat, h = f.lng);
651
- const y = T(() => {
652
- var b, C, P;
653
- return {
654
- center: { lat: u ?? 0, lng: h ?? 0 },
655
- zoom: (b = e.zoom) !== null && b !== void 0 ? b : 0,
656
- heading: (C = e.heading) !== null && C !== void 0 ? C : 0,
657
- tilt: (P = e.tilt) !== null && P !== void 0 ? P : 0
658
- };
659
- }, [u, h, e.zoom, e.heading, e.tilt]);
660
- Y(() => {
661
- if (!s || !m)
662
- return;
663
- s.moveCamera(y);
664
- const b = s.addListener("bounds_changed", () => {
665
- s.moveCamera(y);
666
- });
667
- return () => b.remove();
668
- }, [s, m, y]);
669
- const d = T(() => Object.assign({
670
- width: "100%",
671
- height: "100%",
672
- position: "relative",
673
- // when using deckgl, the map should be sent to the back
674
- zIndex: l ? -1 : 0
675
- }, r), [r, l]), p = T(() => ({ map: s }), [s]);
676
- return i === j.AUTH_FAILURE ? L.createElement(
677
- "div",
678
- { style: Object.assign({ position: "relative" }, o ? {} : d), className: o },
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
- };
682
- Ke.deckGLViewProps = !0;
683
- const Te = /* @__PURE__ */ new Set();
684
- function ne(...e) {
685
- const n = JSON.stringify(e);
686
- Te.has(n) || (Te.add(n), console.error(...e));
687
- }
688
- const J = (e = null) => {
689
- const n = B(X), { map: t } = B(We) || {};
690
- if (n === 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
- const { mapInstances: o } = n;
693
- return e !== null ? o[e] || null : t || o.default || null;
694
- };
695
- function Z(e) {
696
- const n = $e(), t = B(X);
697
- return E(() => {
698
- !n || !t || t.importLibrary(e);
699
- }, [n, t, e]), (t == null ? void 0 : t.loadedLibraries[e]) || null;
700
- }
701
- var fe;
702
- const { useLayoutEffect: Zn, useRef: $n } = je, qn = (fe = je.useInsertionEffect) !== null && fe !== void 0 ? fe : Zn;
703
- function Wn() {
704
- throw new Error("useEffectEvent: invalid call during rendering.");
705
- }
706
- function Kn(e) {
707
- const n = $n(Wn);
708
- return qn(() => {
709
- n.current = e;
710
- }, [e]), ((...t) => n.current(...t));
711
- }
712
- const Ye = Kn, Yn = () => {
713
- };
714
- function S(e, n, t) {
715
- const o = Ye(t ?? Yn), r = !!t;
716
- E(() => {
717
- if (!e || !n || !r)
718
- return;
719
- const a = google.maps.event.addListener(e, n, o);
720
- return () => a.remove();
721
- }, [e, n, r]);
722
- }
723
- function k(e, n, t) {
724
- E(() => {
725
- e && (e[n] = t);
726
- }, [e, n, t]);
727
- }
728
- const Xn = () => {
729
- };
730
- function ve(e, n, t) {
731
- const o = Ye(t ?? Xn), r = !!t;
732
- E(() => {
733
- if (!e || !n || !r)
734
- return;
735
- const a = o;
736
- return e.addEventListener(n, a), () => e.removeEventListener(n, a);
737
- }, [e, n, r]);
738
- }
739
- class Qn {
740
- constructor() {
741
- this.renderedStyles = /* @__PURE__ */ new Set(), this.styleElement = null;
742
- }
743
- getStyleElement() {
744
- return this.styleElement || (this.styleElement = document.createElement("style"), this.styleElement.setAttribute("data-rgm-anchor-styles", ""), document.head.appendChild(this.styleElement)), this.styleElement;
745
- }
746
- addAdvancedMarkerPointerEventsOverwrite() {
747
- if (this.renderedStyles.has("marker-pointer-events"))
748
- return;
749
- const n = this.getStyleElement();
750
- n.textContent += `
751
- gmp-advanced-marker[data-origin='rgm'] {
752
- pointer-events: none !important;
753
- }
754
- `, this.renderedStyles.add("marker-pointer-events");
755
- }
756
- cleanup() {
757
- this.styleElement && (this.styleElement.remove(), this.styleElement = null, this.renderedStyles.clear());
758
- }
759
- }
760
- const et = new Qn();
761
- function nt(e, n) {
762
- var t;
763
- if (!(!((t = google == null ? void 0 : google.maps) === null || t === void 0) && t.version))
764
- return;
765
- const o = google.maps.version.split("."), r = parseInt(o[0], 10), a = parseInt(o[1], 10);
766
- return r > e || r === e && a >= n;
767
- }
768
- const Ce = L.createContext(null), tt = {
769
- BOTTOM: ["50%", "100%"]
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
- });
774
- Xe.displayName = "AdvancedMarker";
775
- function ye(e) {
776
- return e.nodeType === Node.ELEMENT_NODE;
777
- }
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
- return E(() => {
782
- if (!a || !i)
783
- return;
784
- const _ = new i.AdvancedMarkerElement();
785
- _.map = a, t(_);
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
- };
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
- n && (p !== void 0 ? n.gmpDraggable = p : f || u || h ? n.gmpDraggable = !0 : n.gmpDraggable = !1);
794
- }, [n, p, f, h, u]), E(() => {
795
- if (!n)
796
- return;
797
- const _ = d !== void 0 ? d : !!g || !!l || !!m;
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
- }
801
- function at(e, n, t, o, r) {
802
- E(() => {
803
- if (!e || !r)
804
- return;
805
- const a = nt(3, 62), i = e.content;
806
- if (!(!i || !ye(i))) {
807
- if (t !== void 0 || o !== void 0) {
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
- return;
810
- }
811
- if (n !== void 0) {
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
- }
815
- }
816
- }, [e, n, t, o, r]);
817
- }
818
- function it(e) {
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 = 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
- return E(() => {
822
- if (!C) {
823
- C === void 0 && console.error("<Circle> has to be inside a Map component.");
824
- return;
825
- }
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
- };
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
- m(p == null ? void 0 : p.getCenter());
835
- } : null), E(() => {
836
- p && p.setOptions(P);
837
- }, [p, P]), E(() => {
838
- !p || !f || Je(f, p.getCenter()) || p.setCenter(f);
839
- }, [p, f]), E(() => {
840
- !p || h === void 0 || h !== p.getRadius() && p.setRadius(h);
841
- }, [p, h]), p;
842
- }
843
- const st = U((e, n) => {
844
- const t = it(e);
845
- return H(n, () => t, [t]), L.createElement(L.Fragment, null);
846
- });
847
- st.displayName = "Circle";
848
- function lt(e, n, t) {
849
- if (n != null && typeof n != "object")
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
- const o = e.style;
852
- if (t == null) {
853
- if (n == null)
854
- return;
855
- for (const r in n)
856
- n.hasOwnProperty(r) && Ne(o, r, n[r]);
857
- return;
858
- }
859
- for (const r in t)
860
- t.hasOwnProperty(r) && (n == null || !n.hasOwnProperty(r)) && (r.indexOf("--") === 0 ? o.setProperty(r, "") : r === "float" ? o.cssFloat = "" : o[r] = "");
861
- if (n != null)
862
- for (const r in n) {
863
- const a = n[r];
864
- n.hasOwnProperty(r) && t[r] !== a && Ne(o, r, a);
865
- }
866
- }
867
- function Ne(e, n, t) {
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 && !dt(n) ? e[n] = t + "px" : n === "float" ? e.cssFloat = t : e[n] = ("" + t).trim();
870
- }
871
- const ct = /* @__PURE__ */ new Set([
872
- "animationIterationCount",
873
- "aspectRatio",
874
- "borderImageOutset",
875
- "borderImageSlice",
876
- "borderImageWidth",
877
- "boxFlex",
878
- "boxFlexGroup",
879
- "boxOrdinalGroup",
880
- "columnCount",
881
- "columns",
882
- "flex",
883
- "flexGrow",
884
- "flexPositive",
885
- "flexShrink",
886
- "flexNegative",
887
- "flexOrder",
888
- "gridArea",
889
- "gridRow",
890
- "gridRowEnd",
891
- "gridRowSpan",
892
- "gridRowStart",
893
- "gridColumn",
894
- "gridColumnEnd",
895
- "gridColumnSpan",
896
- "gridColumnStart",
897
- "fontWeight",
898
- "lineClamp",
899
- "lineHeight",
900
- "opacity",
901
- "order",
902
- "orphans",
903
- "scale",
904
- "tabSize",
905
- "widows",
906
- "zIndex",
907
- "zoom",
908
- "fillOpacity",
909
- // SVG-related properties
910
- "floodOpacity",
911
- "stopOpacity",
912
- "strokeDasharray",
913
- "strokeDashoffset",
914
- "strokeMiterlimit",
915
- "strokeOpacity",
916
- "strokeWidth"
917
- ]);
918
- function dt(e) {
919
- return ct.has(e);
920
- }
921
- function xe(e) {
922
- const n = e.getPaths(), t = [];
923
- for (let o = 0; o < n.getLength(); o++)
924
- t.push(n.getAt(o).getArray());
925
- return t;
926
- }
927
- function ut(e) {
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 = 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
- return E(() => {
931
- if (!b) {
932
- b === void 0 && console.error("<Polygon> has to be inside a Map component.");
933
- return;
934
- }
935
- let v;
936
- if (m) {
937
- v = m;
938
- const O = u ?? h;
939
- O && Array.isArray(O) && v.setPaths(O), v.setOptions(w);
940
- } else {
941
- const O = u ?? h, D = Object.assign({}, w);
942
- O && Array.isArray(O) && (D.paths = O), v = new google.maps.Polygon(D);
943
- }
944
- return v.setMap(b), p(v), () => {
945
- v.setMap(null), p(null);
946
- };
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
- }), E(() => {
950
- if (!d || !l)
951
- return;
952
- const v = [], O = d.getPaths();
953
- if (typeof O.getLength != "function" || typeof O.getAt != "function")
954
- return;
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
- };
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
- };
969
- }, [
970
- d,
971
- l,
972
- u,
973
- f,
974
- w.editable,
975
- w.draggable
976
- ]), E(() => {
977
- d && d.setOptions(w);
978
- }, [d, w]), E(() => {
979
- if (!d || !u || !Array.isArray(u))
980
- return;
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
- }, [d, u]), E(() => {
984
- if (!d || !f || !C)
985
- return;
986
- P.current = !0;
987
- const v = f.map((O) => C.encoding.decodePath(O));
988
- d.setPaths(v), P.current = !1;
989
- }, [d, f, C]), d;
990
- }
991
- const gt = U((e, n) => {
992
- const t = ut(e);
993
- return H(n, () => t, [t]), L.createElement(L.Fragment, null);
994
- });
995
- gt.displayName = "Polygon";
996
- function ft(e) {
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 = 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
- return E(() => {
1000
- if (!b) {
1001
- b === void 0 && console.error("<Polyline> has to be inside a Map component.");
1002
- return;
1003
- }
1004
- let v;
1005
- if (m) {
1006
- v = m;
1007
- const O = u ?? h;
1008
- O && Array.isArray(O) && v.setPath(O), v.setOptions(w);
1009
- } else {
1010
- const O = u ?? h, D = Object.assign({}, w);
1011
- O && Array.isArray(O) && (D.path = O), v = new google.maps.Polyline(D);
1012
- }
1013
- return v.setMap(b), p(v), () => {
1014
- v.setMap(null), p(null);
1015
- };
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
- }), E(() => {
1019
- if (!d || !l)
1020
- return;
1021
- const v = d.getPath();
1022
- if (!v)
1023
- return;
1024
- const O = () => {
1025
- P.current || l(v.getArray());
1026
- }, D = [
1027
- google.maps.event.addListener(v, "insert_at", O),
1028
- google.maps.event.addListener(v, "remove_at", O),
1029
- google.maps.event.addListener(v, "set_at", O)
1030
- ];
1031
- return () => {
1032
- D.forEach((_) => _.remove());
1033
- };
1034
- }, [
1035
- d,
1036
- l,
1037
- u,
1038
- f,
1039
- w.editable,
1040
- w.draggable
1041
- ]), E(() => {
1042
- d && d.setOptions(w);
1043
- }, [d, w]), E(() => {
1044
- if (!d || !u)
1045
- return;
1046
- const v = d.getPath();
1047
- Ze(u, v) || (P.current = !0, d.setPath(u), P.current = !1);
1048
- }, [d, u]), E(() => {
1049
- if (!d || !f || !C)
1050
- return;
1051
- P.current = !0;
1052
- const v = C.encoding.decodePath(f);
1053
- d.setPath(v), P.current = !1;
1054
- }, [d, f, C]), d;
1055
- }
1056
- const mt = U((e, n) => {
1057
- const t = ft(e);
1058
- return H(n, () => t, [t]), L.createElement(L.Fragment, null);
1059
- });
1060
- mt.displayName = "Polyline";
1061
- const pt = {
1062
- center: { lat: 0, lng: 0, altitude: 0 },
1063
- range: 0,
1064
- heading: 0,
1065
- tilt: 0,
1066
- roll: 0
1067
- }, ht = ["center", "range", "heading", "tilt", "roll"];
1068
- function vt(e, n, t) {
1069
- const o = e[t];
1070
- if (o != null)
1071
- if (t === "center") {
1072
- const r = o;
1073
- n.current.center = r.toJSON ? r.toJSON() : r;
1074
- } else
1075
- n.current[t] = o;
1076
- }
1077
- function yt(e) {
1078
- const n = qe(), t = F(Object.assign({}, pt));
1079
- return E(() => {
1080
- if (!e)
1081
- return;
1082
- const o = [];
1083
- for (const r of ht) {
1084
- const a = `gmp-${r}change`, i = () => {
1085
- vt(e, t, r), n();
1086
- };
1087
- e.addEventListener(a, i), o.push(() => e.removeEventListener(a, i));
1088
- }
1089
- return () => {
1090
- for (const r of o)
1091
- r();
1092
- };
1093
- }, [e, n]), t;
1094
- }
1095
- function bt(e) {
1096
- const n = Z("maps3d"), [t, o] = N(!1), [, r] = he(), [a, i] = he(), s = yt(a);
1097
- return E(() => {
1098
- customElements.whenDefined("gmp-map-3d").then(() => {
1099
- o(!0);
1100
- });
1101
- }, []), E(
1102
- () => {
1103
- if (!a)
1104
- return;
1105
- const {
1106
- center: c,
1107
- heading: l,
1108
- tilt: m,
1109
- range: f,
1110
- roll: u,
1111
- defaultCenter: h,
1112
- defaultHeading: y,
1113
- defaultTilt: d,
1114
- defaultRange: p,
1115
- defaultRoll: b,
1116
- // Non-element props to exclude
1117
- id: C,
1118
- style: P,
1119
- className: w,
1120
- children: v,
1121
- onCenterChanged: O,
1122
- onHeadingChanged: D,
1123
- onTiltChanged: _,
1124
- onRangeChanged: M,
1125
- onRollChanged: x,
1126
- onCameraChanged: $,
1127
- onClick: q,
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
- },
1136
- // this effect should only run when the map3d element first becomes
1137
- // available, so we skip re-running it when other props change.
1138
- // eslint-disable-next-line react-hooks/exhaustive-deps
1139
- [a]
1140
- ), [a, r, i, s, !!n && t];
1141
- }
1142
- function Et(e) {
1143
- return e ? "toJSON" in e && typeof e.toJSON == "function" ? e.toJSON() : e : null;
1144
- }
1145
- function Ct(e, n, t) {
1146
- var o, r, a, i, s, g, c;
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
- var b;
1150
- if (!e)
1151
- return;
1152
- const C = n.current;
1153
- m !== null && f !== null && (C.center.lat !== m || C.center.lng !== f || u !== null && C.center.altitude !== u) && (e.center = {
1154
- lat: m,
1155
- lng: f,
1156
- altitude: (b = u ?? C.center.altitude) !== null && b !== void 0 ? b : 0
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
- });
1159
- }
1160
- const Re = [
1161
- "gmp-centerchange",
1162
- "gmp-headingchange",
1163
- "gmp-tiltchange",
1164
- "gmp-rangechange",
1165
- "gmp-rollchange"
1166
- ];
1167
- function K(e, n) {
1168
- const t = e.center;
1169
- let o;
1170
- return t && "toJSON" in t && typeof t.toJSON == "function" ? o = t.toJSON() : t ? o = t : o = { lat: 0, lng: 0, altitude: 0 }, {
1171
- type: n,
1172
- map3d: e,
1173
- detail: {
1174
- center: o,
1175
- range: e.range || 0,
1176
- heading: e.heading || 0,
1177
- tilt: e.tilt || 0,
1178
- roll: e.roll || 0
1179
- }
1180
- };
1181
- }
1182
- function Ot(e, n) {
1183
- const t = n;
1184
- return {
1185
- type: "gmp-click",
1186
- map3d: e,
1187
- detail: {
1188
- position: n.position || null,
1189
- placeId: t.placeId
1190
- }
1191
- };
1192
- }
1193
- function Mt(e, n) {
1194
- return {
1195
- type: "gmp-steadychange",
1196
- map3d: e,
1197
- detail: {
1198
- isSteady: n.isSteady
1199
- }
1200
- };
1201
- }
1202
- function Pt(e, n) {
1203
- const { onCenterChanged: t, onHeadingChanged: o, onTiltChanged: r, onRangeChanged: a, onRollChanged: i, onCameraChanged: s, onClick: g, onSteadyChange: c, onAnimationEnd: l, onError: m } = n;
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
- if (!e || !s)
1206
- return;
1207
- const f = () => {
1208
- s(K(e, "camerachange"));
1209
- };
1210
- for (const u of Re)
1211
- e.addEventListener(u, f);
1212
- return () => {
1213
- for (const u of Re)
1214
- e.removeEventListener(u, f);
1215
- };
1216
- }, [e, s]), E(() => {
1217
- if (!e || !g)
1218
- return;
1219
- const f = (u) => {
1220
- g(Ot(e, u));
1221
- };
1222
- return e.addEventListener("gmp-click", f), () => e.removeEventListener("gmp-click", f);
1223
- }, [e, g]), E(() => {
1224
- if (!e || !c)
1225
- return;
1226
- const f = (u) => {
1227
- c(Mt(e, u));
1228
- };
1229
- return e.addEventListener("gmp-steadychange", f), () => e.removeEventListener("gmp-steadychange", f);
1230
- }, [e, c]), G(e, "gmp-animationend", l, (f, u) => ({
1231
- type: u,
1232
- map3d: f
1233
- })), G(e, "gmp-error", m, (f, u) => ({
1234
- type: u,
1235
- map3d: f
1236
- }));
1237
- }
1238
- function G(e, n, t, o) {
1239
- E(() => {
1240
- if (!e || !t)
1241
- return;
1242
- const r = () => {
1243
- t(o(e, n));
1244
- };
1245
- return e.addEventListener(n, r), () => e.removeEventListener(n, r);
1246
- }, [e, n, t, o]);
1247
- }
1248
- const wt = /* @__PURE__ */ new Set([
1249
- "bounds",
1250
- "defaultUIHidden",
1251
- "gestureHandling",
1252
- "internalUsageAttributionIds",
1253
- "maxAltitude",
1254
- "maxHeading",
1255
- "maxTilt",
1256
- "minAltitude",
1257
- "minHeading",
1258
- "minTilt",
1259
- "mode"
1260
- ]);
1261
- function At(e, n) {
1262
- const t = T(() => {
1263
- const o = {}, r = Object.keys(n);
1264
- for (const a of r) {
1265
- if (!wt.has(a))
1266
- continue;
1267
- const i = n[a];
1268
- i !== void 0 && (o[a] = i);
1269
- }
1270
- return o;
1271
- }, [n]);
1272
- Ve(() => {
1273
- e && Object.assign(e, t);
1274
- }, [e, t]);
1275
- }
1276
- const Lt = L.createContext(null), Dt = {
1277
- width: "100%",
1278
- height: "100%",
1279
- position: "relative"
1280
- }, St = U((e, n) => {
1281
- const { children: t, id: o, className: r, style: a } = e, i = B(X);
1282
- if (!i)
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] = bt(e);
1285
- Ct(c, f, e), Pt(c, e), At(c, e), E(() => {
1286
- if (!c)
1287
- return;
1288
- const d = o ?? "default";
1289
- return s(c, d), () => {
1290
- g(d);
1291
- };
1292
- }, [c, o]), H(n, () => ({
1293
- map3d: c,
1294
- flyCameraAround: (d) => {
1295
- c == null || c.flyCameraAround(d);
1296
- },
1297
- flyCameraTo: (d) => {
1298
- c == null || c.flyCameraTo(d);
1299
- },
1300
- stopCameraAnimation: () => {
1301
- c == null || c.stopCameraAnimation();
1302
- }
1303
- }), [c]);
1304
- const h = T(() => Object.assign(Object.assign({}, Dt), a), [a]), y = T(() => ({ map3d: c }), [c]);
1305
- return u ? L.createElement(
1306
- "div",
1307
- 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
- });
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
- const v = document.createElement("div");
1315
- return v.style.display = "none", document.body.appendChild(v), v;
1316
- }, []);
1317
- E(() => () => C.remove(), [C]);
1318
- const P = ee((v) => {
1319
- d(v), typeof t == "function" ? t(v) : t && (t.current = v);
1320
- }, [t]);
1321
- ve(y, "gmp-click", r), Y(() => {
1322
- if (p || !y || !C)
1323
- return;
1324
- for (; y.firstChild; )
1325
- y.removeChild(y.firstChild);
1326
- const v = Array.from(C.childNodes);
1327
- for (const O of v) {
1328
- if (O.nodeType !== Node.ELEMENT_NODE)
1329
- continue;
1330
- const D = O, _ = D.tagName.toLowerCase();
1331
- if (_ === "img" || _ === "svg") {
1332
- const M = document.createElement("template");
1333
- M.content.appendChild(D.cloneNode(!0)), y.appendChild(M);
1334
- } else
1335
- y.appendChild(D.cloneNode(!0));
1336
- }
1337
- }, [y, C, o, p]);
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
- );
1345
- });
1346
- It.displayName = "Marker3D";
1347
- const _t = U(function(n, t) {
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] = 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
- const C = (o = l ?? m) !== null && o !== void 0 ? o : c;
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
- "gmp-popover",
1356
- { ref: p, className: s },
1357
- a && L.createElement("div", { slot: "header" }, a),
1358
- r
1359
- );
1360
- });
1361
- _t.displayName = "Popover";
1362
- function kt(e, n, t) {
1363
- const o = F(void 0), r = F(n);
1364
- E(() => {
1365
- r.current = n;
1366
- }, [n]), E(() => {
1367
- if (!e || !t)
1368
- return;
1369
- const a = new MutationObserver((i) => {
1370
- for (const s of i)
1371
- if (s.type === "attributes" && s.attributeName === "open") {
1372
- const g = e.hasAttribute("open");
1373
- o.current === !0 && !g && r.current !== !1 && t(), o.current = g;
1374
- }
1375
- });
1376
- return a.observe(e, {
1377
- attributes: !0,
1378
- attributeFilter: ["open"]
1379
- }), o.current = e.hasAttribute("open"), () => {
1380
- a.disconnect();
1381
- };
1382
- }, [e, t]);
1383
- }
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
- return E(() => {
1387
- if (!o) {
1388
- o === void 0 && console.error("<Marker> has to be inside a Map component.");
1389
- return;
1390
- }
1391
- const u = new google.maps.Marker(l);
1392
- return u.setMap(o), t(u), () => {
1393
- u.setMap(null), t(null);
1394
- };
1395
- }, [o]), E(() => {
1396
- if (!n)
1397
- return;
1398
- const u = n, h = google.maps.event;
1399
- return r && h.addListener(u, "click", r), a && h.addListener(u, "drag", a), i && h.addListener(u, "dragstart", i), s && h.addListener(u, "dragend", s), g && h.addListener(u, "mouseover", g), c && h.addListener(u, "mouseout", c), n.setDraggable(!!f), () => {
1400
- h.clearInstanceListeners(u);
1401
- };
1402
- }, [
1403
- n,
1404
- f,
1405
- r,
1406
- a,
1407
- i,
1408
- s,
1409
- g,
1410
- c
1411
- ]), E(() => {
1412
- n && l && n.setOptions(l);
1413
- }, [n, l]), E(() => {
1414
- f || !m || !n || n.setPosition(m);
1415
- }, [f, m, n]), n;
1416
- }
1417
- const Qe = U((e, n) => {
1418
- const t = Tt(e);
1419
- return H(n, () => t, [t]), L.createElement(L.Fragment, null);
1420
- });
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
- return E(() => {
1425
- if (r && a)
1426
- return a(!0), () => a(!1);
1427
- }, [r, a]), E(() => {
1428
- if (!r || !s)
1429
- return;
1430
- const g = Object.assign({}, e), c = new s.PinElement(g);
1431
- for (e.children && (c.glyph = i); r.firstChild; )
1432
- r.removeChild(r.firstChild);
1433
- return r.append(c), () => {
1434
- };
1435
- }, [r, s, i, e]), E(() => {
1436
- var g;
1437
- if (r)
1438
- return;
1439
- if (!o) {
1440
- o === void 0 && r === void 0 && console.error("The <Pin> component can only be used inside <AdvancedMarker> or <Marker3D>.");
1441
- return;
1442
- }
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
- const c = Object.assign({}, e), l = new google.maps.marker.PinElement(c);
1445
- e.children && (l.glyph = i);
1446
- const m = (g = o.content) === null || g === void 0 ? void 0 : g.firstChild;
1447
- for (; m != null && m.firstChild; )
1448
- m.removeChild(m.firstChild);
1449
- m && m.appendChild(l.element);
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
- return E(() => {
1454
- if (a && i)
1455
- return i(!0), () => i(!1);
1456
- }, [a, i]), E(() => {
1457
- if (!a || !g)
1458
- return;
1459
- const c = Object.assign({}, e), l = new g.PinElement(c);
1460
- for (n && l.appendChild(s); a.firstChild; )
1461
- a.removeChild(a.firstChild);
1462
- return a.appendChild(l), () => {
1463
- };
1464
- }, [a, g, s, n, e]), E(() => {
1465
- var c;
1466
- if (a)
1467
- return;
1468
- if (!r || !g) {
1469
- r === void 0 && a === void 0 && console.error("The <Pin> component can only be used inside <AdvancedMarker> or <Marker3D>.");
1470
- return;
1471
- }
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
- const l = Object.assign({}, e), m = new g.PinElement(l);
1474
- n && m.appendChild(s);
1475
- const f = (c = r.content) === null || c === void 0 ? void 0 : c.firstChild;
1476
- for (; f != null && f.firstChild; )
1477
- f.removeChild(f.firstChild);
1478
- f && f.appendChild(m);
1479
- }, [
1480
- r,
1481
- g,
1482
- s,
1483
- a,
1484
- n,
1485
- e
1486
- ]), de(n, s);
1487
- }, Rt = (e) => {
1488
- var n;
1489
- const t = Z("marker"), o = T(() => t ? typeof customElements < "u" && customElements.get("gmp-pin") !== void 0 : !1, [t]);
1490
- if (!t)
1491
- return null;
1492
- if (o) {
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
- } else {
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
- }
1499
- };
1500
- function zt(e) {
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 = 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
- return E(() => {
1504
- if (!d) {
1505
- d === void 0 && console.error("<Rectangle> has to be inside a Map component.");
1506
- return;
1507
- }
1508
- const b = new google.maps.Rectangle(Object.assign(Object.assign({}, p), { bounds: m ?? f }));
1509
- return b.setMap(d), y(b), () => {
1510
- b.setMap(null), y(null);
1511
- };
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
- l(h == null ? void 0 : h.getBounds());
1514
- } : null), E(() => {
1515
- h && h.setOptions(p);
1516
- }, [h, p]), E(() => {
1517
- !h || !m || Bn(m, h.getBounds()) || h.setBounds(m);
1518
- }, [h, m]), h;
1519
- }
1520
- const jt = U((e, n) => {
1521
- const t = zt(e);
1522
- return H(n, () => t, [
1523
- t
1524
- ]), L.createElement(L.Fragment, null);
1525
- });
1526
- jt.displayName = "Rectangle";
1527
- const Bt = {
1528
- id: "map-view",
1529
- capabilities: [],
1530
- state: {},
1531
- actions: {
1532
- pan_to: {
1533
- safety: "read",
1534
- argsType: "{ position: { lat: number; lng: number } }",
1535
- description: "Pan the map to a new centre without changing zoom.",
1536
- invoke: (e, n) => {
1537
- e.panTo(n.position);
1538
- }
1539
- },
1540
- set_zoom: {
1541
- safety: "read",
1542
- argsType: "{ zoom: number }",
1543
- description: "Set the map zoom level (typical range 1–20).",
1544
- invoke: (e, n) => {
1545
- e.setZoom(n.zoom);
1546
- }
1547
- },
1548
- select_marker: {
1549
- safety: "read",
1550
- argsType: "{ id: string | null }",
1551
- description: "Select a marker by id, or pass null to clear the selection.",
1552
- invoke: (e, n) => {
1553
- e.selectMarker(n.id);
1554
- }
1555
- }
1556
- },
1557
- domHooks: {
1558
- root: {
1559
- attr: "data-component",
1560
- value: "map-view",
1561
- description: "Marks the element as a kit MapView."
1562
- },
1563
- instanceId: {
1564
- attr: "data-component-id",
1565
- sourceProp: "id",
1566
- description: "Sourced from the id prop."
1567
- }
1568
- }
1569
- }, Ft = te(
1570
- ["ds:relative ds:overflow-hidden ds:block", "ds:bg-[var(--muted)]"].join(" "),
1571
- {
1572
- variants: {
1573
- size: {
1574
- sm: "ds:[--map-block-size:14rem]",
1575
- md: "ds:[--map-block-size:20rem]",
1576
- lg: "ds:[--map-block-size:28rem]",
1577
- // `fill` defers sizing to the parent. The outer takes
1578
- // `block-size: 100%` so the inner (also 100%) has something
1579
- // to inherit from. Use inside a viewport-locked column —
1580
- // `<PracticeResults variant="map-first">` wires this through
1581
- // automatically; standalone consumers must give the parent
1582
- // a constrained block-size or the map collapses to 0.
1583
- fill: "ds:[block-size:100%]"
1584
- },
1585
- surface: {
1586
- bordered: "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
1587
- elevated: "ds:rounded-[var(--radius-md)] ds:shadow-[var(--shadow-card)] ds:border ds:border-[color:var(--card-border)] ds:[.theme-accessible_&]:border-2",
1588
- bare: "ds:rounded-none ds:border-0"
1589
- }
1590
- },
1591
- defaultVariants: { size: "md", surface: "bordered" }
1592
- }
1593
- ), Ut = te("ds:block ds:inline-size-full", {
1594
- variants: {
1595
- size: {
1596
- sm: "ds:[block-size:var(--map-block-size)]",
1597
- md: "ds:[block-size:var(--map-block-size)]",
1598
- lg: "ds:[block-size:var(--map-block-size)]",
1599
- fill: "ds:[block-size:100%]"
1600
- }
1601
- },
1602
- defaultVariants: { size: "md" }
1603
- }), Ht = te(
1604
- [
1605
- "ds:absolute ds:inset-0",
1606
- "ds:flex ds:flex-col ds:items-center ds:justify-center",
1607
- "ds:gap-[var(--spacing-sm)]",
1608
- "ds:p-[var(--spacing-md)]",
1609
- "ds:bg-[var(--muted)] ds:text-[var(--foreground)]",
1610
- "ds:text-center"
1611
- ].join(" ")
1612
- ), Vt = te("type-heading-3 ds:m-0"), ze = te(
1613
- "type-body-sm ds:text-[var(--muted-foreground)] ds:max-inline-size-[28rem] ds:m-0"
1614
- );
1615
- function Gt({
1616
- onHandleReady: e,
1617
- onMarkerSelect: n
1618
- }) {
1619
- const t = J();
1620
- return E(() => {
1621
- t && e({
1622
- panTo: (o) => t.panTo(o),
1623
- setZoom: (o) => t.setZoom(o),
1624
- selectMarker: (o) => n(o)
1625
- });
1626
- }, [t, e, n]), null;
1627
- }
1628
- function Jt({
1629
- address: e,
1630
- description: n,
1631
- onLoadMap: t,
1632
- openInGoogleMapsHref: o,
1633
- consentCta: r
1634
- }) {
1635
- const { t: a } = Fe();
1636
- return /* @__PURE__ */ se("div", { className: Ht(), "data-testid": "map-view-consent", children: [
1637
- /* @__PURE__ */ R(
1638
- an,
1639
- {
1640
- "aria-hidden": "true",
1641
- className: "ds:size-6 ds:text-[var(--muted-foreground)]"
1642
- }
1643
- ),
1644
- /* @__PURE__ */ R("p", { className: Vt(), children: a("mapView.consentTitle") }),
1645
- e ? /* @__PURE__ */ R(
1646
- "p",
1647
- {
1648
- className: ze(),
1649
- "data-testid": "map-view-address",
1650
- children: e
1651
- }
1652
- ) : null,
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,
1657
- {
1658
- type: "button",
1659
- intent: "primary",
1660
- size: "sm",
1661
- onClick: t,
1662
- "data-testid": "map-view-load-cta",
1663
- children: a("mapView.consentCta")
1664
- }
1665
- ),
1666
- /* @__PURE__ */ se(
1667
- "a",
1668
- {
1669
- href: o,
1670
- target: "_blank",
1671
- rel: "noopener noreferrer",
1672
- className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)] ds:text-[var(--primary)] ds:underline ds:underline-offset-2",
1673
- children: [
1674
- a("mapView.openInGoogleMaps"),
1675
- /* @__PURE__ */ R(sn, { "aria-hidden": "true", className: "ds:size-3" })
1676
- ]
1677
- }
1678
- )
1679
- ] })
1680
- ] });
1681
- }
1682
- const Zt = U(
1683
- ({
1684
- id: e,
1685
- apiKey: n,
1686
- center: t,
1687
- zoom: o = 15,
1688
- markers: r,
1689
- selectedMarkerId: a,
1690
- onMarkerClick: i,
1691
- consentGranted: s = !1,
1692
- onConsentRequest: g,
1693
- address: c,
1694
- consentDescription: l,
1695
- consentCta: m,
1696
- mapId: f,
1697
- size: u,
1698
- surface: h,
1699
- ariaLabel: y,
1700
- className: d,
1701
- ...p
1702
- }, b) => {
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);
1707
- E(() => {
1708
- if (typeof window > "u") return;
1709
- const A = window.matchMedia("(prefers-reduced-motion: reduce)"), I = () => D(A.matches);
1710
- return I(), A.addEventListener("change", I), () => A.removeEventListener("change", I);
1711
- }, []);
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;
1714
- }, []);
1715
- H(
1716
- b,
1717
- () => ({
1718
- panTo: (A) => {
1719
- var I;
1720
- return (I = M.current) == null ? void 0 : I.panTo(A);
1721
- },
1722
- setZoom: (A) => {
1723
- var I;
1724
- return (I = M.current) == null ? void 0 : I.setZoom(A);
1725
- },
1726
- selectMarker: (A) => {
1727
- var I;
1728
- return (I = M.current) == null ? void 0 : I.selectMarker(A);
1729
- }
1730
- }),
1731
- []
1732
- );
1733
- const $ = T(
1734
- () => ({
1735
- panTo: (A) => {
1736
- var I;
1737
- return (I = M.current) == null ? void 0 : I.panTo(A);
1738
- },
1739
- setZoom: (A) => {
1740
- var I;
1741
- return (I = M.current) == null ? void 0 : I.setZoom(A);
1742
- },
1743
- selectMarker: (A) => {
1744
- var I;
1745
- return (I = M.current) == null ? void 0 : I.selectMarker(A);
1746
- }
1747
- }),
1748
- []
1749
- );
1750
- rn(Bt, $, e), E(() => {
1751
- var A;
1752
- O || (A = M.current) == null || A.panTo(t);
1753
- }, [t.lat, t.lng, O]), E(() => {
1754
- var A;
1755
- (A = M.current) == null || A.setZoom(o);
1756
- }, [o]);
1757
- const [q, ue] = N(!1), Me = s || q, Pe = ee(() => {
1758
- if (g) {
1759
- g(), ue(!0);
1760
- return;
1761
- }
1762
- ue(!0);
1763
- }, [g]);
1764
- return /* @__PURE__ */ R(
1765
- "div",
1766
- {
1767
- className: Ft({ size: u, surface: h, className: d }),
1768
- "data-component": "map-view",
1769
- "data-component-id": e ?? v,
1770
- role: "region",
1771
- "aria-label": y ?? C("mapView.label"),
1772
- ...p,
1773
- children: /* @__PURE__ */ R("div", { className: Ut({ size: u }), children: Me ? /* @__PURE__ */ R(
1774
- Dn,
1775
- {
1776
- apiKey: n,
1777
- language: P.language,
1778
- children: /* @__PURE__ */ se(
1779
- Ke,
1780
- {
1781
- defaultCenter: t,
1782
- defaultZoom: o,
1783
- mapId: f,
1784
- gestureHandling: "cooperative",
1785
- disableDefaultUI: !1,
1786
- onClick: () => i == null ? void 0 : i(null),
1787
- className: "ds:[inline-size:100%] ds:[block-size:100%]",
1788
- children: [
1789
- /* @__PURE__ */ R(
1790
- Gt,
1791
- {
1792
- onHandleReady: x,
1793
- onMarkerSelect: (A) => i == null ? void 0 : i(A)
1794
- }
1795
- ),
1796
- (r ?? []).map((A) => {
1797
- const I = a != null && a === A.id, Q = C("mapView.markerLabel", {
1798
- label: A.label ?? A.id
1799
- });
1800
- return f ? /* @__PURE__ */ R(
1801
- Xe,
1802
- {
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,
1810
- {
1811
- background: "var(--primary)",
1812
- borderColor: "var(--primary)",
1813
- glyphColor: "var(--primary-foreground)"
1814
- }
1815
- )
1816
- },
1817
- A.id
1818
- ) : /* @__PURE__ */ R(
1819
- Qe,
1820
- {
1821
- position: A.position,
1822
- title: Q,
1823
- onClick: () => i == null ? void 0 : i(A.id)
1824
- },
1825
- A.id
1826
- );
1827
- })
1828
- ]
1829
- }
1830
- )
1831
- }
1832
- ) : /* @__PURE__ */ R(
1833
- Jt,
1834
- {
1835
- address: c,
1836
- description: l ?? C("mapView.consentDescription"),
1837
- onLoadMap: Pe,
1838
- consentCta: m,
1839
- openInGoogleMapsHref: _
1840
- }
1841
- ) })
1842
- }
1843
- );
1844
- }
1845
- );
1846
- Zt.displayName = "MapView";
1847
- export {
1848
- Zt as M
1849
- };
1850
- //# sourceMappingURL=map-view-qJLybrmN.js.map