@alfadocs/ui-kit-debug 1.90.1 → 1.90.2

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 (151) hide show
  1. package/dist/_chunks/address-autocomplete-DR4Xn23Z.js +519 -0
  2. package/dist/_chunks/address-autocomplete-DR4Xn23Z.js.map +1 -0
  3. package/dist/_chunks/{address-fields-CfnXK8RT.js → address-fields-qxQkGwPf.js} +5 -5
  4. package/dist/_chunks/{address-fields-CfnXK8RT.js.map → address-fields-qxQkGwPf.js.map} +1 -1
  5. package/dist/_chunks/{ai-permission-notice-CoW22jx1.js → ai-permission-notice-VNh3W57L.js} +2 -2
  6. package/dist/_chunks/{ai-permission-notice-CoW22jx1.js.map → ai-permission-notice-VNh3W57L.js.map} +1 -1
  7. package/dist/_chunks/{anamnesis-summary-rows-fbEQwcuW.js → anamnesis-summary-rows-EKPfVCmh.js} +2 -2
  8. package/dist/_chunks/{anamnesis-summary-rows-fbEQwcuW.js.map → anamnesis-summary-rows-EKPfVCmh.js.map} +1 -1
  9. package/dist/_chunks/autocomplete-BXMcNoa3.js +562 -0
  10. package/dist/_chunks/autocomplete-BXMcNoa3.js.map +1 -0
  11. package/dist/_chunks/{balance-badge-cell-C4FYwmrZ.js → balance-badge-cell-D9VhFp0L.js} +3 -3
  12. package/dist/_chunks/{balance-badge-cell-C4FYwmrZ.js.map → balance-badge-cell-D9VhFp0L.js.map} +1 -1
  13. package/dist/_chunks/{booking-C0FoW8Yx.js → booking-CcE_oviI.js} +1896 -1859
  14. package/dist/_chunks/booking-CcE_oviI.js.map +1 -0
  15. package/dist/_chunks/{calendar-appointment-editor-dialog-C1v2MNE4.js → calendar-appointment-editor-dialog-CiAGAX2t.js} +7 -7
  16. package/dist/_chunks/{calendar-appointment-editor-dialog-C1v2MNE4.js.map → calendar-appointment-editor-dialog-CiAGAX2t.js.map} +1 -1
  17. package/dist/_chunks/{checkbox-BjDv-r3o.js → checkbox-a7Sh-dXb.js} +32 -31
  18. package/dist/_chunks/checkbox-a7Sh-dXb.js.map +1 -0
  19. package/dist/_chunks/{checkbox-group-Cw2H5qaq.js → checkbox-group-eGdv9fZc.js} +2 -2
  20. package/dist/_chunks/{checkbox-group-Cw2H5qaq.js.map → checkbox-group-eGdv9fZc.js.map} +1 -1
  21. package/dist/_chunks/{city-input-CJVGswxp.js → city-input-CA59CjnV.js} +2 -2
  22. package/dist/_chunks/{city-input-CJVGswxp.js.map → city-input-CA59CjnV.js.map} +1 -1
  23. package/dist/_chunks/{combobox-CDPm_n0p.js → combobox-D-gpgEDy.js} +314 -294
  24. package/dist/_chunks/combobox-D-gpgEDy.js.map +1 -0
  25. package/dist/_chunks/{country-select-DQ8q7ypA.js → country-select-BfmX9y5i.js} +2 -2
  26. package/dist/_chunks/{country-select-DQ8q7ypA.js.map → country-select-BfmX9y5i.js.map} +1 -1
  27. package/dist/_chunks/{data-table-B_IcS0Ke.js → data-table-CqQgoNsU.js} +2 -2
  28. package/dist/_chunks/{data-table-B_IcS0Ke.js.map → data-table-CqQgoNsU.js.map} +1 -1
  29. package/dist/_chunks/{face-scheme-BgJGFDTa.js → face-scheme-BKSE98bo.js} +2 -2
  30. package/dist/_chunks/{face-scheme-BgJGFDTa.js.map → face-scheme-BKSE98bo.js.map} +1 -1
  31. package/dist/_chunks/{file-manager-C9YOT-Dn.js → file-manager-BnI1ZWZu.js} +2 -2
  32. package/dist/_chunks/{file-manager-C9YOT-Dn.js.map → file-manager-BnI1ZWZu.js.map} +1 -1
  33. package/dist/_chunks/{header-settings-BVhjndtV.js → header-settings-BeA2fnol.js} +24 -23
  34. package/dist/_chunks/header-settings-BeA2fnol.js.map +1 -0
  35. package/dist/_chunks/{heatmap-HTz3Jvzy.js → heatmap-fCxwNz2o.js} +2 -2
  36. package/dist/_chunks/{heatmap-HTz3Jvzy.js.map → heatmap-fCxwNz2o.js.map} +1 -1
  37. package/dist/_chunks/{link-cell-renderer-C0ynDik7.js → link-cell-renderer-CnCgudvq.js} +3 -3
  38. package/dist/_chunks/{link-cell-renderer-C0ynDik7.js.map → link-cell-renderer-CnCgudvq.js.map} +1 -1
  39. package/dist/_chunks/{login-dev-card-DYwbL5sD.js → login-dev-card-BZBR58mu.js} +2 -2
  40. package/dist/_chunks/{login-dev-card-DYwbL5sD.js.map → login-dev-card-BZBR58mu.js.map} +1 -1
  41. package/dist/_chunks/{map-view-Bvi06RVh.js → map-view-UrNgxBy3.js} +260 -237
  42. package/dist/_chunks/map-view-UrNgxBy3.js.map +1 -0
  43. package/dist/_chunks/{index.modern-BeRXQVdc.js → maps-core-gate-DkNqGkm3.js} +360 -319
  44. package/dist/_chunks/maps-core-gate-DkNqGkm3.js.map +1 -0
  45. package/dist/_chunks/{marketplace-app-shell-x_abo_ye.js → marketplace-app-shell-CmZx0Oam.js} +2 -2
  46. package/dist/_chunks/{marketplace-app-shell-x_abo_ye.js.map → marketplace-app-shell-CmZx0Oam.js.map} +1 -1
  47. package/dist/_chunks/{notes-panel-CZO1qsD-.js → notes-panel-Dywo6R55.js} +2 -2
  48. package/dist/_chunks/{notes-panel-CZO1qsD-.js.map → notes-panel-Dywo6R55.js.map} +1 -1
  49. package/dist/_chunks/{patient-details-D0P5eog5.js → patient-details-BUr7Oemx.js} +2 -2
  50. package/dist/_chunks/{patient-details-D0P5eog5.js.map → patient-details-BUr7Oemx.js.map} +1 -1
  51. package/dist/_chunks/{patient-field-row-R73dZJY6.js → patient-field-row-bJk8Q_qr.js} +5 -5
  52. package/dist/_chunks/{patient-field-row-R73dZJY6.js.map → patient-field-row-bJk8Q_qr.js.map} +1 -1
  53. package/dist/_chunks/patient-search-Ca9j5cWb.js +1306 -0
  54. package/dist/_chunks/patient-search-Ca9j5cWb.js.map +1 -0
  55. package/dist/_chunks/{patient-summary-card-6U74-ivO.js → patient-summary-card-CCQZ8X37.js} +2 -2
  56. package/dist/_chunks/{patient-summary-card-6U74-ivO.js.map → patient-summary-card-CCQZ8X37.js.map} +1 -1
  57. package/dist/_chunks/{periodontal-diagnosis-B9YmmVmM.js → periodontal-diagnosis-DD3hrg9X.js} +2 -2
  58. package/dist/_chunks/{periodontal-diagnosis-B9YmmVmM.js.map → periodontal-diagnosis-DD3hrg9X.js.map} +1 -1
  59. package/dist/_chunks/{permission-matrix-BoQjENGV.js → permission-matrix-BJ6sg3Zp.js} +3 -3
  60. package/dist/_chunks/{permission-matrix-BoQjENGV.js.map → permission-matrix-BJ6sg3Zp.js.map} +1 -1
  61. package/dist/_chunks/{practice-results-B61krlwu.js → practice-results-DQuOfqej.js} +2 -2
  62. package/dist/_chunks/{practice-results-B61krlwu.js.map → practice-results-DQuOfqej.js.map} +1 -1
  63. package/dist/_chunks/{province-select-CPdTwEob.js → province-select-D64whw0m.js} +2 -2
  64. package/dist/_chunks/{province-select-CPdTwEob.js.map → province-select-D64whw0m.js.map} +1 -1
  65. package/dist/_chunks/{registration-form-DmP3YUfp.js → registration-form-CRm6DaB9.js} +2 -2
  66. package/dist/_chunks/{registration-form-DmP3YUfp.js.map → registration-form-CRm6DaB9.js.map} +1 -1
  67. package/dist/_chunks/{reviews-panel-UzQQLb-z.js → reviews-panel-B7InBORU.js} +42 -41
  68. package/dist/_chunks/reviews-panel-B7InBORU.js.map +1 -0
  69. package/dist/_chunks/{rich-text-editor-BZTyxQBd.js → rich-text-editor-BfEu57dk.js} +3 -3
  70. package/dist/_chunks/{rich-text-editor-BZTyxQBd.js.map → rich-text-editor-BfEu57dk.js.map} +1 -1
  71. package/dist/_chunks/{slot-grid-Bb13H9Rl.js → slot-grid-DrwynKeN.js} +91 -89
  72. package/dist/_chunks/{slot-grid-Bb13H9Rl.js.map → slot-grid-DrwynKeN.js.map} +1 -1
  73. package/dist/_chunks/{task-editor-BOETWbjU.js → task-editor-CI1SKUNc.js} +2 -2
  74. package/dist/_chunks/{task-editor-BOETWbjU.js.map → task-editor-CI1SKUNc.js.map} +1 -1
  75. package/dist/_chunks/{use-appointment-details-read-CWN-nJCZ.js → use-appointment-details-read-BytPq3Ux.js} +2 -2
  76. package/dist/_chunks/{use-appointment-details-read-CWN-nJCZ.js.map → use-appointment-details-read-BytPq3Ux.js.map} +1 -1
  77. package/dist/_chunks/{voice-control-panel-BziKE-KK.js → voice-control-panel-BP0otrID.js} +2 -2
  78. package/dist/_chunks/{voice-control-panel-BziKE-KK.js.map → voice-control-panel-BP0otrID.js.map} +1 -1
  79. package/dist/_chunks/{workflow-webhook-action-DulCpCRz.js → workflow-webhook-action-B_nBJ_ht.js} +2 -2
  80. package/dist/_chunks/{workflow-webhook-action-DulCpCRz.js.map → workflow-webhook-action-B_nBJ_ht.js.map} +1 -1
  81. package/dist/agent-catalog.json +2 -2
  82. package/dist/agent-i18n/en.json +1 -1
  83. package/dist/components/_shared/maps-core-gate.d.ts +18 -0
  84. package/dist/components/_shared/maps-core-gate.d.ts.map +1 -0
  85. package/dist/components/address-autocomplete/address-autocomplete.d.ts.map +1 -1
  86. package/dist/components/address-autocomplete/index.js +1 -1
  87. package/dist/components/address-fields/index.js +1 -1
  88. package/dist/components/ai-permission-notice/index.js +1 -1
  89. package/dist/components/appointment-details-panel/index.js +1 -1
  90. package/dist/components/autocomplete/autocomplete.agent.d.ts.map +1 -1
  91. package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
  92. package/dist/components/autocomplete/index.js +1 -1
  93. package/dist/components/booking/booking.d.ts.map +1 -1
  94. package/dist/components/booking/details-form.d.ts.map +1 -1
  95. package/dist/components/booking/index.js +1 -1
  96. package/dist/components/checkbox/checkbox.d.ts.map +1 -1
  97. package/dist/components/checkbox/index.js +1 -1
  98. package/dist/components/checkbox-group/index.js +1 -1
  99. package/dist/components/city-input/index.js +1 -1
  100. package/dist/components/combobox/combobox.d.ts.map +1 -1
  101. package/dist/components/combobox/index.js +1 -1
  102. package/dist/components/country-select/index.js +1 -1
  103. package/dist/components/data-table/index.js +2 -2
  104. package/dist/components/face-scheme/index.js +1 -1
  105. package/dist/components/file-manager/index.js +1 -1
  106. package/dist/components/header-settings/header-settings.d.ts +2 -1
  107. package/dist/components/header-settings/header-settings.d.ts.map +1 -1
  108. package/dist/components/header-settings/index.js +1 -1
  109. package/dist/components/heatmap/index.js +1 -1
  110. package/dist/components/map-view/index.js +1 -1
  111. package/dist/components/map-view/map-view.d.ts.map +1 -1
  112. package/dist/components/notes-panel/index.js +1 -1
  113. package/dist/components/patient-details/index.js +1 -1
  114. package/dist/components/patient-search/index.js +1 -1
  115. package/dist/components/patient-search/patient-search.d.ts.map +1 -1
  116. package/dist/components/patient-summary-card/index.js +1 -1
  117. package/dist/components/patient-table/index.js +1 -1
  118. package/dist/components/periodontal-diagnosis/index.js +1 -1
  119. package/dist/components/permission-matrix/index.js +1 -1
  120. package/dist/components/practice-results/index.js +1 -1
  121. package/dist/components/province-select/index.js +1 -1
  122. package/dist/components/reviews-panel/index.js +1 -1
  123. package/dist/components/reviews-panel/reviews-panel.d.ts.map +1 -1
  124. package/dist/components/rich-text-editor/index.js +1 -1
  125. package/dist/components/slot-grid/index.js +1 -1
  126. package/dist/components/slot-grid/slot-grid.d.ts.map +1 -1
  127. package/dist/components/task-editor/index.js +1 -1
  128. package/dist/components/voice-control-panel/index.js +1 -1
  129. package/dist/host-compat.css +1 -10
  130. package/dist/index.js +37 -37
  131. package/dist/patterns/anamnesis/index.js +1 -1
  132. package/dist/patterns/calendar/index.js +1 -1
  133. package/dist/patterns/login-form/index.js +1 -1
  134. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  135. package/dist/patterns/registration-form/index.js +1 -1
  136. package/dist/patterns/workflow-webhook-action/index.js +1 -1
  137. package/dist/tokens.css +1 -1
  138. package/package.json +1 -1
  139. package/dist/_chunks/address-autocomplete-bPR2mNBt.js +0 -498
  140. package/dist/_chunks/address-autocomplete-bPR2mNBt.js.map +0 -1
  141. package/dist/_chunks/autocomplete-CnB1mHGc.js +0 -539
  142. package/dist/_chunks/autocomplete-CnB1mHGc.js.map +0 -1
  143. package/dist/_chunks/booking-C0FoW8Yx.js.map +0 -1
  144. package/dist/_chunks/checkbox-BjDv-r3o.js.map +0 -1
  145. package/dist/_chunks/combobox-CDPm_n0p.js.map +0 -1
  146. package/dist/_chunks/header-settings-BVhjndtV.js.map +0 -1
  147. package/dist/_chunks/index.modern-BeRXQVdc.js.map +0 -1
  148. package/dist/_chunks/map-view-Bvi06RVh.js.map +0 -1
  149. package/dist/_chunks/patient-search-CCOUZABE.js +0 -1196
  150. package/dist/_chunks/patient-search-CCOUZABE.js.map +0 -1
  151. package/dist/_chunks/reviews-panel-UzQQLb-z.js.map +0 -1
@@ -1,16 +1,17 @@
1
- import { jsx as i, jsxs as L } from "react/jsx-runtime";
2
- import { forwardRef as le, useMemo as x, useRef as y, useId as de, useState as E, useEffect as I, useCallback as R, useImperativeHandle as ce } from "react";
1
+ import { jsx as r, jsxs as x } from "react/jsx-runtime";
2
+ import { forwardRef as ce, useMemo as L, useRef as y, useId as pe, useState as D, useEffect as I, useCallback as R, useImperativeHandle as ue } from "react";
3
3
  import { c as G } from "./index-D2ZczOXr.js";
4
- import { useTranslation as Z } from "react-i18next";
5
- import { A as pe, M as ue, a as me, P as he, b as ge, u as fe, c as K, d as W } from "./index.modern-BeRXQVdc.js";
6
- import { B as be } from "./button-DohK_Ak_.js";
7
- import { S as ve } from "./skeleton-tTWJpvAq.js";
8
- import { V as ye } from "./visually-hidden-BHxEUGyT.js";
9
- import { u as we } from "./registry-DvAUVLHh.js";
10
- import { l as Me } from "./length-token-DwMnGEYT.js";
11
- import { M as ze } from "./map-pin-BaY37-Km.js";
12
- import { E as Ve } from "./external-link-CY6zAXXU.js";
13
- const ke = {
4
+ import { useTranslation as C } from "react-i18next";
5
+ import { M as me, A as he, a as ge, b as fe, P as be, c as ve, u as ye, d as B, e as J } from "./maps-core-gate-DkNqGkm3.js";
6
+ import { B as we } from "./button-DohK_Ak_.js";
7
+ import { S as Me } from "./skeleton-tTWJpvAq.js";
8
+ import { V as ze } from "./visually-hidden-BHxEUGyT.js";
9
+ import { E as Ve } from "./error-boundary-tAn_GuCu.js";
10
+ import { u as ke } from "./registry-DvAUVLHh.js";
11
+ import { l as Ie } from "./length-token-DwMnGEYT.js";
12
+ import { M as Le } from "./map-pin-BaY37-Km.js";
13
+ import { E as xe } from "./external-link-CY6zAXXU.js";
14
+ const Ge = {
14
15
  id: "map-view",
15
16
  // pan → scroll (viewport move); set_zoom → set_value; select_marker → pick
16
17
  // (NON-persisting marker focus, no value state slot).
@@ -152,7 +153,7 @@ const ke = {
152
153
  description: "Sourced from the id prop."
153
154
  }
154
155
  }
155
- }, Ie = G(
156
+ }, Se = G(
156
157
  ["ds:relative ds:overflow-hidden ds:block", "ds:bg-[var(--muted)]"].join(" "),
157
158
  {
158
159
  variants: {
@@ -176,7 +177,7 @@ const ke = {
176
177
  },
177
178
  defaultVariants: { size: "md", surface: "bordered" }
178
179
  }
179
- ), xe = G("ds:block ds:inline-size-full", {
180
+ ), Te = G("ds:block ds:inline-size-full", {
180
181
  variants: {
181
182
  size: {
182
183
  sm: "ds:[block-size:var(--map-block-size)]",
@@ -186,7 +187,7 @@ const ke = {
186
187
  }
187
188
  },
188
189
  defaultVariants: { size: "md" }
189
- }), Le = G(
190
+ }), Ne = G(
190
191
  [
191
192
  "ds:absolute ds:inset-0",
192
193
  "ds:flex ds:flex-col ds:items-center ds:justify-center",
@@ -195,173 +196,173 @@ const ke = {
195
196
  "ds:bg-[var(--muted)] ds:text-[var(--foreground)]",
196
197
  "ds:text-center"
197
198
  ].join(" ")
198
- ), Ge = G("type-heading-3 ds:m-0"), D = G(
199
+ ), Pe = G("type-heading-3 ds:m-0"), F = G(
199
200
  "type-body-sm ds:text-[var(--muted-foreground)] ds:[max-inline-size:28rem] ds:m-0"
200
201
  );
201
- function Se({
202
+ function Re({
202
203
  onHandleReady: e,
203
204
  onMarkerSelect: s
204
205
  }) {
205
- const o = W();
206
+ const o = J();
206
207
  return I(() => {
207
208
  if (o)
208
209
  return e({
209
- panTo: (t) => o.panTo(t),
210
- setZoom: (t) => o.setZoom(t),
211
- jumpTo: (t, a) => o.moveCamera({ center: t, zoom: a }),
212
- selectMarker: (t) => s(t),
210
+ panTo: (n) => o.panTo(n),
211
+ setZoom: (n) => o.setZoom(n),
212
+ jumpTo: (n, i) => o.moveCamera({ center: n, zoom: i }),
213
+ selectMarker: (n) => s(n),
213
214
  // Read straight off the live map: Google clamps `setZoom` to the
214
215
  // map type's range and animates `panTo`, so requested and applied
215
216
  // are not the same value.
216
217
  getCenter: () => {
217
- var t;
218
- return ((t = o.getCenter()) == null ? void 0 : t.toJSON()) ?? null;
218
+ var n;
219
+ return ((n = o.getCenter()) == null ? void 0 : n.toJSON()) ?? null;
219
220
  },
220
221
  getZoom: () => o.getZoom() ?? null
221
222
  }), () => e(null);
222
223
  }, [o, e, s]), null;
223
224
  }
224
- const Te = 256, Ne = (e) => e * Math.PI / 180;
225
- function F(e) {
226
- const s = Math.min(Math.max(Math.sin(Ne(e)), -0.9999), 0.9999);
225
+ const Ce = 256, Ze = (e) => e * Math.PI / 180;
226
+ function K(e) {
227
+ const s = Math.min(Math.max(Math.sin(Ze(e)), -0.9999), 0.9999);
227
228
  return Math.log((1 + s) / (1 - s)) / 2;
228
229
  }
229
- const Pe = (e) => Math.atan(Math.sinh(e)) * 180 / Math.PI;
230
- function Re(e) {
231
- let s = -90, o = 90, t = -180, a = 180;
232
- for (const { lat: l, lng: r } of e)
233
- s = Math.max(s, l), o = Math.min(o, l), t = Math.max(t, r), a = Math.min(a, r);
234
- return { north: s, south: o, east: t, west: a };
230
+ const je = (e) => Math.atan(Math.sinh(e)) * 180 / Math.PI;
231
+ function _e(e) {
232
+ let s = -90, o = 90, n = -180, i = 180;
233
+ for (const { lat: l, lng: a } of e)
234
+ s = Math.max(s, l), o = Math.min(o, l), n = Math.max(n, a), i = Math.min(i, a);
235
+ return { north: s, south: o, east: n, west: i };
235
236
  }
236
- function Ze(e, s, o, t, a) {
237
- const { north: l, south: r, east: c, west: m } = Re(e);
238
- if (l === r && c === m)
239
- return { center: { lat: l, lng: c }, zoom: a };
240
- const p = F(l), f = F(r), u = {
241
- lat: Pe((p + f) / 2),
242
- lng: (c + m) / 2
243
- }, b = (w, M) => M > 0 ? Math.log2(Math.max(w, 1) / Te / M) : a, h = Math.min(
244
- b(s - 2 * t, (c - m) / 360),
245
- b(o - 2 * t, (p - f) / (2 * Math.PI)),
246
- a
237
+ function Ee(e, s, o, n, i) {
238
+ const { north: l, south: a, east: p, west: m } = _e(e);
239
+ if (l === a && p === m)
240
+ return { center: { lat: l, lng: p }, zoom: i };
241
+ const d = K(l), h = K(a), u = {
242
+ lat: je((d + h) / 2),
243
+ lng: (p + m) / 2
244
+ }, b = (w, M) => M > 0 ? Math.log2(Math.max(w, 1) / Ce / M) : i, g = Math.min(
245
+ b(s - 2 * n, (p - m) / 360),
246
+ b(o - 2 * n, (d - h) / (2 * Math.PI)),
247
+ i
247
248
  );
248
- return { center: u, zoom: Math.max(0, Math.floor(h)) };
249
+ return { center: u, zoom: Math.max(0, Math.floor(g)) };
249
250
  }
250
- const B = ({ id: e, lat: s, lng: o }) => e != null ? `id:${e}` : `at:${s},${o}`;
251
- function je({ points: e, fitKey: s, maxZoom: o }) {
252
- const t = W(), a = y(null), l = y(!1), r = y(null);
251
+ const U = ({ id: e, lat: s, lng: o }) => e != null ? `id:${e}` : `at:${s},${o}`;
252
+ function Oe({ points: e, fitKey: s, maxZoom: o }) {
253
+ const n = J(), i = y(null), l = y(!1), a = y(null);
253
254
  return I(() => {
254
- if (!t) return;
255
- const c = () => {
256
- var h;
257
- const p = r.current, f = (h = t.getCenter()) == null ? void 0 : h.toJSON(), u = t.getZoom();
258
- p != null && u === p.zoom && f != null && Math.abs(f.lat - p.center.lat) < 1e-6 && Math.abs(f.lng - p.center.lng) < 1e-6 || (l.current = !0);
255
+ if (!n) return;
256
+ const p = () => {
257
+ var g;
258
+ const d = a.current, h = (g = n.getCenter()) == null ? void 0 : g.toJSON(), u = n.getZoom();
259
+ d != null && u === d.zoom && h != null && Math.abs(h.lat - d.center.lat) < 1e-6 && Math.abs(h.lng - d.center.lng) < 1e-6 || (l.current = !0);
259
260
  }, m = [
260
- t.addListener("dragstart", () => {
261
+ n.addListener("dragstart", () => {
261
262
  l.current = !0;
262
263
  }),
263
- t.addListener("center_changed", c),
264
- t.addListener("zoom_changed", c)
264
+ n.addListener("center_changed", p),
265
+ n.addListener("zoom_changed", p)
265
266
  ];
266
- return () => m.forEach((p) => p.remove());
267
- }, [t]), I(() => {
267
+ return () => m.forEach((d) => d.remove());
268
+ }, [n]), I(() => {
268
269
  var M;
269
- if (!t) return;
270
- const c = ((M = a.current) == null ? void 0 : M.map) === t ? a.current : null;
271
- if ((c == null ? void 0 : c.key) === s) return;
272
- const m = new Set(e.map(B)), p = (g, z) => {
273
- r.current = { center: g, zoom: z }, t.moveCamera({ center: g, zoom: z }), l.current = !1;
270
+ if (!n) return;
271
+ const p = ((M = i.current) == null ? void 0 : M.map) === n ? i.current : null;
272
+ if ((p == null ? void 0 : p.key) === s) return;
273
+ const m = new Set(e.map(U)), d = (f, z) => {
274
+ a.current = { center: f, zoom: z }, n.moveCamera({ center: f, zoom: z }), l.current = !1;
274
275
  };
275
276
  if (e.length === 0) {
276
- a.current = { map: t, key: s, points: m };
277
+ i.current = { map: n, key: s, points: m };
277
278
  return;
278
279
  }
279
- if (c != null && c.points.size > 0 && [...c.points].every((g) => m.has(g)) && l.current) {
280
- a.current = { map: t, key: s, points: m };
280
+ if (p != null && p.points.size > 0 && [...p.points].every((f) => m.has(f)) && l.current) {
281
+ i.current = { map: n, key: s, points: m };
281
282
  return;
282
283
  }
283
- const u = t.getDiv();
284
+ const u = n.getDiv();
284
285
  if (!(u instanceof Element)) return;
285
286
  const b = () => {
286
- a.current = { map: t, key: s, points: m };
287
- const g = Math.min(
288
- Me("--spacing-2xl", u, 48),
287
+ i.current = { map: n, key: s, points: m };
288
+ const f = Math.min(
289
+ Ie("--spacing-2xl", u, 48),
289
290
  u.clientWidth / 4,
290
291
  u.clientHeight / 4
291
- ), { center: z, zoom: N } = Ze(
292
+ ), { center: z, zoom: P } = Ee(
292
293
  e,
293
294
  u.clientWidth,
294
295
  u.clientHeight,
295
- g,
296
+ f,
296
297
  o
297
298
  );
298
- p(z, N);
299
- }, h = () => u.clientWidth > 0 && u.clientHeight > 0;
300
- if (h() || typeof ResizeObserver > "u") {
299
+ d(z, P);
300
+ }, g = () => u.clientWidth > 0 && u.clientHeight > 0;
301
+ if (g() || typeof ResizeObserver > "u") {
301
302
  b();
302
303
  return;
303
304
  }
304
305
  const w = new ResizeObserver(() => {
305
- h() && (w.disconnect(), b());
306
+ g() && (w.disconnect(), b());
306
307
  });
307
308
  return w.observe(u), () => w.disconnect();
308
- }, [t, s, e, o]), null;
309
+ }, [n, s, e, o]), null;
309
310
  }
310
- const J = (e) => {
311
+ const X = (e) => {
311
312
  var s, o;
312
313
  return typeof ((o = (s = globalThis.google) == null ? void 0 : s.maps) == null ? void 0 : o[e]) == "function";
313
314
  };
314
- function Ce() {
315
- const { t: e } = Z("ui");
316
- return /* @__PURE__ */ L(
315
+ function Y() {
316
+ const { t: e } = C("ui");
317
+ return /* @__PURE__ */ x(
317
318
  "div",
318
319
  {
319
320
  role: "status",
320
321
  "data-testid": "map-view-loading",
321
322
  className: "ds:[inline-size:100%] ds:[block-size:100%]",
322
323
  children: [
323
- /* @__PURE__ */ i(ve, { variant: "rectangular", width: "100%", height: "100%" }),
324
- /* @__PURE__ */ i(ye, { children: e("common.loading") })
324
+ /* @__PURE__ */ r(Me, { variant: "rectangular", width: "100%", height: "100%" }),
325
+ /* @__PURE__ */ r(ze, { children: e("common.loading") })
325
326
  ]
326
327
  }
327
328
  );
328
329
  }
329
- function _e({ children: e }) {
330
- const s = fe();
331
- return K("maps") || !s || J("Map") ? e : /* @__PURE__ */ i(Ce, {});
330
+ function $e({ children: e }) {
331
+ const s = ye();
332
+ return B("maps") || !s || X("Map") ? e : /* @__PURE__ */ r(Y, {});
332
333
  }
333
- function Oe({ children: e }) {
334
- return K("marker") || J("Marker") ? e : null;
334
+ function qe({ children: e }) {
335
+ return B("marker") || X("Marker") ? e : null;
335
336
  }
336
- function $e({
337
+ function W({
337
338
  address: e,
338
339
  description: s,
339
340
  onLoadMap: o,
340
- openInGoogleMapsHref: t,
341
- consentCta: a
341
+ openInGoogleMapsHref: n,
342
+ consentCta: i
342
343
  }) {
343
- const { t: l } = Z("ui");
344
- return /* @__PURE__ */ L("div", { className: Le(), "data-testid": "map-view-consent", children: [
345
- /* @__PURE__ */ i(
346
- ze,
344
+ const { t: l } = C("ui");
345
+ return /* @__PURE__ */ x("div", { className: Ne(), "data-testid": "map-view-consent", children: [
346
+ /* @__PURE__ */ r(
347
+ Le,
347
348
  {
348
349
  "aria-hidden": "true",
349
350
  className: "ds:size-6 ds:text-[var(--muted-foreground)]"
350
351
  }
351
352
  ),
352
- /* @__PURE__ */ i("p", { className: Ge(), children: l("mapView.consentTitle") }),
353
- e ? /* @__PURE__ */ i(
353
+ /* @__PURE__ */ r("p", { className: Pe(), children: l("mapView.consentTitle") }),
354
+ e ? /* @__PURE__ */ r(
354
355
  "p",
355
356
  {
356
- className: D(),
357
+ className: F(),
357
358
  "data-testid": "map-view-address",
358
359
  children: e
359
360
  }
360
361
  ) : null,
361
- /* @__PURE__ */ i("p", { className: D(), children: s }),
362
- /* @__PURE__ */ L("div", { className: "ds:flex ds:gap-[var(--spacing-sm)] ds:flex-wrap ds:items-center ds:justify-center", children: [
363
- a ?? /* @__PURE__ */ i(
364
- be,
362
+ /* @__PURE__ */ r("p", { className: F(), children: s }),
363
+ /* @__PURE__ */ x("div", { className: "ds:flex ds:gap-[var(--spacing-sm)] ds:flex-wrap ds:items-center ds:justify-center", children: [
364
+ i ?? /* @__PURE__ */ r(
365
+ we,
365
366
  {
366
367
  type: "button",
367
368
  intent: "primary",
@@ -371,73 +372,73 @@ function $e({
371
372
  children: l("mapView.consentCta")
372
373
  }
373
374
  ),
374
- /* @__PURE__ */ L(
375
+ /* @__PURE__ */ x(
375
376
  "a",
376
377
  {
377
- href: t,
378
+ href: n,
378
379
  target: "_blank",
379
380
  rel: "noopener noreferrer",
380
381
  className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)] ds:text-[var(--primary-readable)] ds:underline ds:underline-offset-2",
381
382
  children: [
382
383
  l("mapView.openInGoogleMaps"),
383
- /* @__PURE__ */ i(Ve, { "aria-hidden": "true", className: "ds:size-3" })
384
+ /* @__PURE__ */ r(xe, { "aria-hidden": "true", className: "ds:size-3" })
384
385
  ]
385
386
  }
386
387
  )
387
388
  ] })
388
389
  ] });
389
390
  }
390
- const qe = le(
391
+ const He = ce(
391
392
  ({
392
393
  id: e,
393
394
  apiKey: s,
394
395
  center: o,
395
- zoom: t = 15,
396
- markers: a,
396
+ zoom: n = 15,
397
+ markers: i,
397
398
  selectedMarkerId: l,
398
- onMarkerClick: r,
399
- consentGranted: c = !1,
399
+ onMarkerClick: a,
400
+ consentGranted: p = !1,
400
401
  onConsentRequest: m,
401
- address: p,
402
- consentDescription: f,
402
+ address: d,
403
+ consentDescription: h,
403
404
  consentCta: u,
404
405
  mapId: b,
405
- size: h,
406
+ size: g,
406
407
  surface: w,
407
408
  ariaLabel: M,
408
- fitToPoints: g,
409
+ fitToPoints: f,
409
410
  fitKey: z,
410
- fitMaxZoom: N = 15,
411
- className: U,
412
- ...X
413
- }, Y) => {
414
- const { t: P, i18n: Q } = Z("ui"), S = x(() => g ?? [], [g]), ee = x(
415
- () => z ?? S.map((n) => `${B(n)}@${n.lat},${n.lng}`).sort().join("|"),
416
- [z, S]
417
- ), V = S.length > 0, j = y(V), C = de(), te = x(
418
- () => `map-${C.replace(/[^a-zA-Z0-9-_]/g, "")}`,
419
- [C]
420
- ), [_, ne] = E(!1);
411
+ fitMaxZoom: P = 15,
412
+ className: Q,
413
+ ...ee
414
+ }, te) => {
415
+ const { t: S, i18n: ne } = C("ui"), T = L(() => f ?? [], [f]), se = L(
416
+ () => z ?? T.map((t) => `${U(t)}@${t.lat},${t.lng}`).sort().join("|"),
417
+ [z, T]
418
+ ), V = T.length > 0, Z = y(V), j = pe(), oe = L(
419
+ () => `map-${j.replace(/[^a-zA-Z0-9-_]/g, "")}`,
420
+ [j]
421
+ ), [_, re] = D(!1);
421
422
  I(() => {
422
423
  if (typeof window > "u") return;
423
- const n = window.matchMedia("(prefers-reduced-motion: reduce)"), d = () => ne(n.matches);
424
- return d(), n.addEventListener("change", d), () => n.removeEventListener("change", d);
424
+ const t = window.matchMedia("(prefers-reduced-motion: reduce)"), c = () => re(t.matches);
425
+ return c(), t.addEventListener("change", c), () => t.removeEventListener("change", c);
425
426
  }, []);
426
- const se = x(() => `https://www.google.com/maps/search/?api=1&query=${p ? encodeURIComponent(p) : `${o.lat},${o.lng}`}`, [p, o.lat, o.lng]), v = y(null), oe = R((n) => {
427
- v.current = n;
428
- }, []), O = y(!1), $ = y(null), q = y(0), T = R(
427
+ const E = L(() => `https://www.google.com/maps/search/?api=1&query=${d ? encodeURIComponent(d) : `${o.lat},${o.lng}`}`, [d, o.lat, o.lng]), v = y(null), ae = R((t) => {
428
+ v.current = t;
429
+ }, []), O = y(!1), $ = y(null), q = y(0), N = R(
429
430
  () => ({
430
- panTo: (n) => {
431
- var d;
432
- return (d = v.current) == null ? void 0 : d.panTo(n);
431
+ panTo: (t) => {
432
+ var c;
433
+ return (c = v.current) == null ? void 0 : c.panTo(t);
433
434
  },
434
- setZoom: (n) => {
435
- var d;
436
- return (d = v.current) == null ? void 0 : d.setZoom(n);
435
+ setZoom: (t) => {
436
+ var c;
437
+ return (c = v.current) == null ? void 0 : c.setZoom(t);
437
438
  },
438
- selectMarker: (n) => {
439
- var d;
440
- return (d = v.current) == null ? void 0 : d.selectMarker(n);
439
+ selectMarker: (t) => {
440
+ var c;
441
+ return (c = v.current) == null ? void 0 : c.selectMarker(t);
441
442
  },
442
443
  // Without `isConsentGranted` an agent has no way to learn that
443
444
  // its pan / zoom / select was swallowed by the GDPR gate rather
@@ -446,138 +447,160 @@ const qe = le(
446
447
  // into nothing.
447
448
  isConsentGranted: () => O.current,
448
449
  getCenter: () => {
449
- var n;
450
- return ((n = v.current) == null ? void 0 : n.getCenter()) ?? null;
450
+ var t;
451
+ return ((t = v.current) == null ? void 0 : t.getCenter()) ?? null;
451
452
  },
452
453
  getZoom: () => {
453
- var n;
454
- return ((n = v.current) == null ? void 0 : n.getZoom()) ?? null;
454
+ var t;
455
+ return ((t = v.current) == null ? void 0 : t.getZoom()) ?? null;
455
456
  },
456
457
  getSelectedMarkerId: () => $.current,
457
458
  getMarkerCount: () => q.current
458
459
  }),
459
460
  []
460
461
  );
461
- ce(Y, T, [T]);
462
- const re = x(
463
- () => T(),
464
- [T]
462
+ ue(te, N, [N]);
463
+ const ie = L(
464
+ () => N(),
465
+ [N]
465
466
  );
466
- we(ke, re, e), I(() => {
467
- var d, k;
468
- const n = j.current && !V;
469
- if (j.current = V, !V) {
470
- if (n) {
471
- (d = v.current) == null || d.jumpTo(o, t);
467
+ ke(Ge, ie, e), I(() => {
468
+ var c, k;
469
+ const t = Z.current && !V;
470
+ if (Z.current = V, !V) {
471
+ if (t) {
472
+ (c = v.current) == null || c.jumpTo(o, n);
472
473
  return;
473
474
  }
474
475
  _ || (k = v.current) == null || k.panTo(o);
475
476
  }
476
477
  }, [o.lat, o.lng, _, V]), I(() => {
477
- var n;
478
- V || (n = v.current) == null || n.setZoom(t);
479
- }, [t, V]);
480
- const [ae, H] = E(!1), A = c || ae;
481
- O.current = A, $.current = l ?? null, q.current = (a ?? []).length;
482
- const ie = R(() => {
478
+ var t;
479
+ V || (t = v.current) == null || t.setZoom(n);
480
+ }, [n, V]);
481
+ const [le, H] = D(!1), A = p || le;
482
+ O.current = A, $.current = l ?? null, q.current = (i ?? []).length;
483
+ const de = R(() => {
483
484
  if (m) {
484
485
  m(), H(!0);
485
486
  return;
486
487
  }
487
488
  H(!0);
488
489
  }, [m]);
489
- return /* @__PURE__ */ i(
490
+ return /* @__PURE__ */ r(
490
491
  "div",
491
492
  {
492
- className: Ie({ size: h, surface: w, className: U }),
493
+ className: Se({ size: g, surface: w, className: Q }),
493
494
  "data-component": "map-view",
494
- "data-component-id": e ?? te,
495
+ "data-component-id": e ?? oe,
495
496
  role: "region",
496
- "aria-label": M ?? P("mapView.label"),
497
- ...X,
498
- children: /* @__PURE__ */ i("div", { className: xe({ size: h }), children: A ? /* @__PURE__ */ i(
499
- pe,
500
- {
501
- apiKey: s,
502
- language: Q.language,
503
- children: /* @__PURE__ */ i(_e, { children: /* @__PURE__ */ L(
504
- ue,
505
- {
506
- defaultCenter: o,
507
- defaultZoom: t,
508
- mapId: b,
509
- gestureHandling: "cooperative",
510
- disableDefaultUI: !1,
511
- onClick: () => r == null ? void 0 : r(null),
512
- className: "ds:[inline-size:100%] ds:[block-size:100%]",
513
- children: [
514
- /* @__PURE__ */ i(
515
- Se,
497
+ "aria-label": M ?? S("mapView.label"),
498
+ ...ee,
499
+ children: /* @__PURE__ */ r("div", { className: Te({ size: g }), children: A ? (
500
+ // A provider failure shows the consent placeholder (its "Open in
501
+ // Google Maps" link needs no script) with "Load map" as the
502
+ // retry, instead of unmounting the host's React tree. The gate
503
+ // starts the provider only once Google's `core` and `maps`
504
+ // libraries have arrived.
505
+ /* @__PURE__ */ r(
506
+ Ve,
507
+ {
508
+ fallback: ({ reset: t }) => /* @__PURE__ */ r(
509
+ W,
510
+ {
511
+ address: d,
512
+ description: h ?? S("mapView.consentDescription"),
513
+ onLoadMap: t,
514
+ consentCta: void 0,
515
+ openInGoogleMapsHref: E
516
+ }
517
+ ),
518
+ children: /* @__PURE__ */ r(me, { libraries: ["maps"], pending: /* @__PURE__ */ r(Y, {}), children: /* @__PURE__ */ r(
519
+ he,
520
+ {
521
+ apiKey: s,
522
+ language: ne.language,
523
+ children: /* @__PURE__ */ r($e, { children: /* @__PURE__ */ x(
524
+ ge,
516
525
  {
517
- onHandleReady: oe,
518
- onMarkerSelect: (n) => r == null ? void 0 : r(n)
519
- }
520
- ),
521
- g ? /* @__PURE__ */ i(
522
- je,
523
- {
524
- points: S,
525
- fitKey: ee,
526
- maxZoom: N
527
- }
528
- ) : null,
529
- /* @__PURE__ */ i(Oe, { children: (a ?? []).map((n) => {
530
- const d = l != null && l === n.id, k = P("mapView.markerLabel", {
531
- label: n.label ?? n.id
532
- });
533
- return b ? /* @__PURE__ */ i(
534
- me,
535
- {
536
- position: n.position,
537
- title: k,
538
- "aria-label": k,
539
- "data-selected": d ? "true" : "false",
540
- onClick: () => r == null ? void 0 : r(n.id),
541
- children: /* @__PURE__ */ i(
542
- he,
526
+ defaultCenter: o,
527
+ defaultZoom: n,
528
+ mapId: b,
529
+ gestureHandling: "cooperative",
530
+ disableDefaultUI: !1,
531
+ onClick: () => a == null ? void 0 : a(null),
532
+ className: "ds:[inline-size:100%] ds:[block-size:100%]",
533
+ children: [
534
+ /* @__PURE__ */ r(
535
+ Re,
543
536
  {
544
- background: "var(--primary)",
545
- borderColor: "var(--primary)",
546
- glyphColor: "var(--primary-foreground)"
537
+ onHandleReady: ae,
538
+ onMarkerSelect: (t) => a == null ? void 0 : a(t)
547
539
  }
548
- )
549
- },
550
- n.id
551
- ) : /* @__PURE__ */ i(
552
- ge,
553
- {
554
- position: n.position,
555
- title: k,
556
- onClick: () => r == null ? void 0 : r(n.id)
557
- },
558
- n.id
559
- );
560
- }) })
561
- ]
562
- }
563
- ) })
564
- }
565
- ) : /* @__PURE__ */ i(
566
- $e,
540
+ ),
541
+ f ? /* @__PURE__ */ r(
542
+ Oe,
543
+ {
544
+ points: T,
545
+ fitKey: se,
546
+ maxZoom: P
547
+ }
548
+ ) : null,
549
+ /* @__PURE__ */ r(qe, { children: (i ?? []).map((t) => {
550
+ const c = l != null && l === t.id, k = S("mapView.markerLabel", {
551
+ label: t.label ?? t.id
552
+ });
553
+ return b ? /* @__PURE__ */ r(
554
+ fe,
555
+ {
556
+ position: t.position,
557
+ title: k,
558
+ "aria-label": k,
559
+ "data-selected": c ? "true" : "false",
560
+ onClick: () => a == null ? void 0 : a(t.id),
561
+ children: /* @__PURE__ */ r(
562
+ be,
563
+ {
564
+ background: "var(--primary)",
565
+ borderColor: "var(--primary)",
566
+ glyphColor: "var(--primary-foreground)"
567
+ }
568
+ )
569
+ },
570
+ t.id
571
+ ) : /* @__PURE__ */ r(
572
+ ve,
573
+ {
574
+ position: t.position,
575
+ title: k,
576
+ onClick: () => a == null ? void 0 : a(t.id)
577
+ },
578
+ t.id
579
+ );
580
+ }) })
581
+ ]
582
+ }
583
+ ) })
584
+ }
585
+ ) })
586
+ }
587
+ )
588
+ ) : /* @__PURE__ */ r(
589
+ W,
567
590
  {
568
- address: p,
569
- description: f ?? P("mapView.consentDescription"),
570
- onLoadMap: ie,
591
+ address: d,
592
+ description: h ?? S("mapView.consentDescription"),
593
+ onLoadMap: de,
571
594
  consentCta: u,
572
- openInGoogleMapsHref: se
595
+ openInGoogleMapsHref: E
573
596
  }
574
597
  ) })
575
598
  }
576
599
  );
577
600
  }
578
601
  );
579
- qe.displayName = "MapView";
602
+ He.displayName = "MapView";
580
603
  export {
581
- qe as M
604
+ He as M
582
605
  };
583
- //# sourceMappingURL=map-view-Bvi06RVh.js.map
606
+ //# sourceMappingURL=map-view-UrNgxBy3.js.map