@alfadocs/ui-kit-debug 1.107.0 → 1.109.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 (111) hide show
  1. package/dist/_chunks/{map-view-V7etHnyF.js → map-view-Dn7aXZJw.js} +187 -182
  2. package/dist/_chunks/map-view-Dn7aXZJw.js.map +1 -0
  3. package/dist/_chunks/{practice-results-BXz01sti.js → practice-results-BOpaPaav.js} +2 -2
  4. package/dist/_chunks/{practice-results-BXz01sti.js.map → practice-results-BOpaPaav.js.map} +1 -1
  5. package/dist/_chunks/{signature-request-DtLph5Z4.js → signature-request-opW0fQ5P.js} +1032 -1016
  6. package/dist/_chunks/signature-request-opW0fQ5P.js.map +1 -0
  7. package/dist/agent-catalog.json +2 -2
  8. package/dist/agent-i18n/en.json +1 -1
  9. package/dist/components/map-view/index.js +1 -1
  10. package/dist/components/map-view/map-view.d.ts +8 -0
  11. package/dist/components/map-view/map-view.d.ts.map +1 -1
  12. package/dist/components/practice-results/index.js +1 -1
  13. package/dist/i18n/locales/ar.d.ts +2 -0
  14. package/dist/i18n/locales/ar.d.ts.map +1 -1
  15. package/dist/i18n/locales/ar.js +2 -0
  16. package/dist/i18n/locales/ar.js.map +1 -1
  17. package/dist/i18n/locales/de.d.ts +2 -0
  18. package/dist/i18n/locales/de.d.ts.map +1 -1
  19. package/dist/i18n/locales/de.js +2 -0
  20. package/dist/i18n/locales/de.js.map +1 -1
  21. package/dist/i18n/locales/el.d.ts +2 -0
  22. package/dist/i18n/locales/el.d.ts.map +1 -1
  23. package/dist/i18n/locales/el.js +2 -0
  24. package/dist/i18n/locales/el.js.map +1 -1
  25. package/dist/i18n/locales/en.d.ts +2 -0
  26. package/dist/i18n/locales/en.d.ts.map +1 -1
  27. package/dist/i18n/locales/en.js +2 -0
  28. package/dist/i18n/locales/en.js.map +1 -1
  29. package/dist/i18n/locales/es.d.ts +2 -0
  30. package/dist/i18n/locales/es.d.ts.map +1 -1
  31. package/dist/i18n/locales/es.js +2 -0
  32. package/dist/i18n/locales/es.js.map +1 -1
  33. package/dist/i18n/locales/fr.d.ts +2 -0
  34. package/dist/i18n/locales/fr.d.ts.map +1 -1
  35. package/dist/i18n/locales/fr.js +2 -0
  36. package/dist/i18n/locales/fr.js.map +1 -1
  37. package/dist/i18n/locales/hi.d.ts +2 -0
  38. package/dist/i18n/locales/hi.d.ts.map +1 -1
  39. package/dist/i18n/locales/hi.js +2 -0
  40. package/dist/i18n/locales/hi.js.map +1 -1
  41. package/dist/i18n/locales/it.d.ts +2 -0
  42. package/dist/i18n/locales/it.d.ts.map +1 -1
  43. package/dist/i18n/locales/it.js +2 -0
  44. package/dist/i18n/locales/it.js.map +1 -1
  45. package/dist/i18n/locales/ja.d.ts +2 -0
  46. package/dist/i18n/locales/ja.d.ts.map +1 -1
  47. package/dist/i18n/locales/ja.js +2 -0
  48. package/dist/i18n/locales/ja.js.map +1 -1
  49. package/dist/i18n/locales/nl.d.ts +2 -0
  50. package/dist/i18n/locales/nl.d.ts.map +1 -1
  51. package/dist/i18n/locales/nl.js +2 -0
  52. package/dist/i18n/locales/nl.js.map +1 -1
  53. package/dist/i18n/locales/pl.d.ts +2 -0
  54. package/dist/i18n/locales/pl.d.ts.map +1 -1
  55. package/dist/i18n/locales/pl.js +2 -0
  56. package/dist/i18n/locales/pl.js.map +1 -1
  57. package/dist/i18n/locales/pt.d.ts +2 -0
  58. package/dist/i18n/locales/pt.d.ts.map +1 -1
  59. package/dist/i18n/locales/pt.js +2 -0
  60. package/dist/i18n/locales/pt.js.map +1 -1
  61. package/dist/i18n/locales/ro.d.ts +2 -0
  62. package/dist/i18n/locales/ro.d.ts.map +1 -1
  63. package/dist/i18n/locales/ro.js +2 -0
  64. package/dist/i18n/locales/ro.js.map +1 -1
  65. package/dist/i18n/locales/ru.d.ts +2 -0
  66. package/dist/i18n/locales/ru.d.ts.map +1 -1
  67. package/dist/i18n/locales/ru.js +2 -0
  68. package/dist/i18n/locales/ru.js.map +1 -1
  69. package/dist/i18n/locales/sq.d.ts +2 -0
  70. package/dist/i18n/locales/sq.d.ts.map +1 -1
  71. package/dist/i18n/locales/sq.js +2 -0
  72. package/dist/i18n/locales/sq.js.map +1 -1
  73. package/dist/i18n/locales/sv.d.ts +2 -0
  74. package/dist/i18n/locales/sv.d.ts.map +1 -1
  75. package/dist/i18n/locales/sv.js +2 -0
  76. package/dist/i18n/locales/sv.js.map +1 -1
  77. package/dist/i18n/locales/tr.d.ts +2 -0
  78. package/dist/i18n/locales/tr.d.ts.map +1 -1
  79. package/dist/i18n/locales/tr.js +2 -0
  80. package/dist/i18n/locales/tr.js.map +1 -1
  81. package/dist/i18n/locales/zh.d.ts +2 -0
  82. package/dist/i18n/locales/zh.d.ts.map +1 -1
  83. package/dist/i18n/locales/zh.js +2 -0
  84. package/dist/i18n/locales/zh.js.map +1 -1
  85. package/dist/index.js +3 -3
  86. package/dist/locales/ar.json +2 -0
  87. package/dist/locales/de.json +2 -0
  88. package/dist/locales/el.json +2 -0
  89. package/dist/locales/en.json +2 -0
  90. package/dist/locales/es.json +2 -0
  91. package/dist/locales/fr.json +2 -0
  92. package/dist/locales/hi.json +2 -0
  93. package/dist/locales/it.json +2 -0
  94. package/dist/locales/ja.json +2 -0
  95. package/dist/locales/nl.json +2 -0
  96. package/dist/locales/pl.json +2 -0
  97. package/dist/locales/pt.json +2 -0
  98. package/dist/locales/ro.json +2 -0
  99. package/dist/locales/ru.json +2 -0
  100. package/dist/locales/sq.json +2 -0
  101. package/dist/locales/sv.json +2 -0
  102. package/dist/locales/tr.json +2 -0
  103. package/dist/locales/zh.json +2 -0
  104. package/dist/patterns/signature-request/index.js +1 -1
  105. package/dist/patterns/signature-request/required-documents.d.ts +7 -3
  106. package/dist/patterns/signature-request/required-documents.d.ts.map +1 -1
  107. package/dist/patterns/signature-request/signature-request.d.ts +27 -21
  108. package/dist/patterns/signature-request/signature-request.d.ts.map +1 -1
  109. package/package.json +1 -1
  110. package/dist/_chunks/map-view-V7etHnyF.js.map +0 -1
  111. package/dist/_chunks/signature-request-DtLph5Z4.js.map +0 -1
@@ -1,17 +1,17 @@
1
1
  import { jsx as l, jsxs as S } from "react/jsx-runtime";
2
- import { forwardRef as he, useMemo as E, useRef as k, useId as ge, useState as Y, useEffect as L, useCallback as T, useImperativeHandle as fe } from "react";
2
+ import { forwardRef as ge, useMemo as E, useRef as k, useId as fe, useState as Y, useEffect as C, useCallback as T, useImperativeHandle as be } from "react";
3
3
  import { c as x } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as A } from "react-i18next";
5
- import { M as be, A as ye, a as we, b as ve, P as ke, c as Me, u as ze, d as ne, e as K } from "./maps-core-gate-DkNqGkm3.js";
6
- import { B as Ve } from "./button-DohK_Ak_.js";
7
- import { S as Le } from "./skeleton-tTWJpvAq.js";
8
- import { V as Ce } from "./visually-hidden-BHxEUGyT.js";
9
- import { E as Ie } from "./error-boundary-tAn_GuCu.js";
10
- import { u as Ee } from "./registry-DvAUVLHh.js";
11
- import { l as Te } from "./length-token-DwMnGEYT.js";
12
- import { M as Se } from "./map-pin-BaY37-Km.js";
13
- import { E as xe } from "./external-link-CY6zAXXU.js";
14
- const Pe = {
5
+ import { M as ye, A as we, a as ve, b as ke, P as Me, c as ze, u as Ve, d as ne, e as K } from "./maps-core-gate-DkNqGkm3.js";
6
+ import { B as Ce } from "./button-DohK_Ak_.js";
7
+ import { S as Ie } from "./skeleton-tTWJpvAq.js";
8
+ import { V as Le } from "./visually-hidden-BHxEUGyT.js";
9
+ import { E as Ee } from "./error-boundary-tAn_GuCu.js";
10
+ import { u as Te } from "./registry-DvAUVLHh.js";
11
+ import { l as Se } from "./length-token-DwMnGEYT.js";
12
+ import { M as xe } from "./map-pin-BaY37-Km.js";
13
+ import { E as Pe } from "./external-link-CY6zAXXU.js";
14
+ const Ge = {
15
15
  id: "map-view",
16
16
  // pan → scroll (viewport move); set_zoom → set_value; select_marker → pick
17
17
  // (NON-persisting marker focus, no value state slot).
@@ -153,7 +153,7 @@ const Pe = {
153
153
  description: "Sourced from the id prop."
154
154
  }
155
155
  }
156
- }, Ge = x(
156
+ }, Ne = x(
157
157
  ["ds:relative ds:overflow-hidden ds:block", "ds:bg-[var(--muted)]"].join(" "),
158
158
  {
159
159
  variants: {
@@ -177,7 +177,7 @@ const Pe = {
177
177
  },
178
178
  defaultVariants: { size: "md", surface: "bordered" }
179
179
  }
180
- ), Ne = x("ds:block ds:w-full", {
180
+ ), Re = x("ds:block ds:w-full", {
181
181
  variants: {
182
182
  size: {
183
183
  sm: "ds:[block-size:var(--map-block-size)]",
@@ -187,7 +187,7 @@ const Pe = {
187
187
  }
188
188
  },
189
189
  defaultVariants: { size: "md" }
190
- }), Re = x(
190
+ }), Ze = x(
191
191
  [
192
192
  "ds:absolute ds:inset-0",
193
193
  "ds:flex ds:flex-col ds:items-center ds:justify-center",
@@ -196,16 +196,16 @@ const Pe = {
196
196
  "ds:bg-[var(--muted)] ds:text-[var(--foreground)]",
197
197
  "ds:text-center"
198
198
  ].join(" ")
199
- ), Ze = x("type-heading-3 ds:m-0"), Q = x(
199
+ ), _e = x("type-heading-3 ds:m-0"), Q = x(
200
200
  "type-body-sm ds:text-[var(--muted-foreground)] ds:[max-inline-size:28rem] ds:m-0"
201
201
  );
202
- function _e({
202
+ function je({
203
203
  onHandleReady: e,
204
204
  onMarkerSelect: n,
205
205
  onCameraMove: o
206
206
  }) {
207
207
  const i = K();
208
- return L(() => {
208
+ return C(() => {
209
209
  if (i)
210
210
  return e({
211
211
  panTo: (r) => {
@@ -229,27 +229,27 @@ function _e({
229
229
  }), () => e(null);
230
230
  }, [i, e, n, o]), null;
231
231
  }
232
- function je({
232
+ function Oe({
233
233
  onBoundsChange: e,
234
234
  userInteraction: n
235
235
  }) {
236
236
  const o = K(), i = k(e);
237
- return i.current = e, L(() => {
237
+ return i.current = e, C(() => {
238
238
  if (!o) return;
239
239
  const r = o.getDiv();
240
240
  let a = null;
241
- const d = () => {
241
+ const c = () => {
242
242
  n.current = {
243
243
  pendingInput: !1,
244
244
  moved: !1,
245
245
  programmatic: !1
246
246
  };
247
247
  };
248
- d();
248
+ c();
249
249
  let b;
250
- const p = /* @__PURE__ */ new Set(), f = (t) => {
251
- if (t instanceof PointerEvent && t.pointerType === "touch" && (t.type === "pointerdown" && p.add(t.pointerId), t.type === "pointerup" || t.type === "pointercancel")) {
252
- p.delete(t.pointerId);
250
+ const u = /* @__PURE__ */ new Set(), f = (t) => {
251
+ if (t instanceof PointerEvent && t.pointerType === "touch" && (t.type === "pointerdown" && u.add(t.pointerId), t.type === "pointerup" || t.type === "pointercancel")) {
252
+ u.delete(t.pointerId);
253
253
  return;
254
254
  }
255
255
  if (t instanceof PointerEvent && t.type === "pointermove" && t.buttons === 0 && t.pointerType !== "touch" || t instanceof KeyboardEvent && ![
@@ -267,22 +267,22 @@ function je({
267
267
  "PageDown"
268
268
  ].includes(t.key))
269
269
  return;
270
- const h = document.fullscreenElement, w = !!(h && (h.contains(r) || r.contains(h)));
271
- let m = t.type === "dblclick";
272
- t instanceof PointerEvent && t.type === "pointermove" && (m = t.pointerType !== "touch" || p.size >= 2 || w), t.type === "touchmove" && (m = t.touches.length >= 2 || w), t instanceof KeyboardEvent && (m = t.key !== "Enter" && t.key !== " "), t instanceof WheelEvent && (m = t.ctrlKey || t.metaKey || w), t.type === "click" && (m = t.target instanceof Element && t.target.closest('button, [role="button"]') != null), m && (n.current.programmatic = !1), n.current.pendingInput = !0, clearTimeout(b), b = setTimeout(() => {
270
+ const m = document.fullscreenElement, w = !!(m && (m.contains(r) || r.contains(m)));
271
+ let h = t.type === "dblclick";
272
+ t instanceof PointerEvent && t.type === "pointermove" && (h = t.pointerType !== "touch" || u.size >= 2 || w), t.type === "touchmove" && (h = t.touches.length >= 2 || w), t instanceof KeyboardEvent && (h = t.key !== "Enter" && t.key !== " "), t instanceof WheelEvent && (h = t.ctrlKey || t.metaKey || w), t.type === "click" && (h = t.target instanceof Element && t.target.closest('button, [role="button"]') != null), h && (n.current.programmatic = !1), n.current.pendingInput = !0, clearTimeout(b), b = setTimeout(() => {
273
273
  n.current.pendingInput = !1;
274
274
  }, 250);
275
- }, c = () => {
275
+ }, d = () => {
276
276
  n.current.pendingInput && !n.current.programmatic && (n.current.moved = !0);
277
277
  }, y = () => {
278
278
  var P, G;
279
- const t = (P = o.getBounds()) == null ? void 0 : P.toJSON(), h = (G = o.getCenter()) == null ? void 0 : G.toJSON(), w = o.getZoom(), m = n.current.moved;
280
- if (d(), clearTimeout(b), !t || !h || w == null) return;
281
- const M = !a || Object.keys(t).some(
279
+ const t = (P = o.getBounds()) == null ? void 0 : P.toJSON(), m = (G = o.getCenter()) == null ? void 0 : G.toJSON(), w = o.getZoom(), h = n.current.moved;
280
+ if (c(), clearTimeout(b), !t || !m || w == null) return;
281
+ const v = !a || Object.keys(t).some(
282
282
  (N) => t[N] !== a.bounds[N]
283
- ), I = a != null && (w !== a.zoom || h.lat !== a.center.lat || h.lng !== a.center.lng);
284
- a = { bounds: t, center: h, zoom: w }, M && i.current(t, { userInteraction: m && I });
285
- }, u = [
283
+ ), I = a != null && (w !== a.zoom || m.lat !== a.center.lat || m.lng !== a.center.lng);
284
+ a = { bounds: t, center: m, zoom: w }, v && i.current(t, { userInteraction: h && I });
285
+ }, p = [
286
286
  "pointerdown",
287
287
  "pointermove",
288
288
  "pointerup",
@@ -294,113 +294,113 @@ function je({
294
294
  "wheel",
295
295
  "keydown"
296
296
  ];
297
- u.forEach(
297
+ p.forEach(
298
298
  (t) => r.addEventListener(t, f, { capture: !0, passive: !0 })
299
299
  );
300
- const v = [
300
+ const M = [
301
301
  o.addListener("dragstart", () => {
302
302
  n.current.programmatic = !1, n.current.moved = !0;
303
303
  }),
304
- o.addListener("center_changed", c),
305
- o.addListener("zoom_changed", c),
304
+ o.addListener("center_changed", d),
305
+ o.addListener("zoom_changed", d),
306
306
  o.addListener("idle", y)
307
307
  ];
308
308
  return y(), () => {
309
- v.forEach((t) => t.remove()), u.forEach(
309
+ M.forEach((t) => t.remove()), p.forEach(
310
310
  (t) => r.removeEventListener(t, f, !0)
311
- ), clearTimeout(b), d();
311
+ ), clearTimeout(b), c();
312
312
  };
313
313
  }, [o, n]), null;
314
314
  }
315
- const Oe = 256, Ae = (e) => e * Math.PI / 180;
315
+ const Ae = 256, Ke = (e) => e * Math.PI / 180;
316
316
  function ee(e) {
317
- const n = Math.min(Math.max(Math.sin(Ae(e)), -0.9999), 0.9999);
317
+ const n = Math.min(Math.max(Math.sin(Ke(e)), -0.9999), 0.9999);
318
318
  return Math.log((1 + n) / (1 - n)) / 2;
319
319
  }
320
- const Ke = (e) => Math.atan(Math.sinh(e)) * 180 / Math.PI;
321
- function $e(e) {
320
+ const $e = (e) => Math.atan(Math.sinh(e)) * 180 / Math.PI;
321
+ function qe(e) {
322
322
  let n = -90, o = 90, i = -180, r = 180;
323
- for (const { lat: a, lng: d } of e)
324
- n = Math.max(n, a), o = Math.min(o, a), i = Math.max(i, d), r = Math.min(r, d);
323
+ for (const { lat: a, lng: c } of e)
324
+ n = Math.max(n, a), o = Math.min(o, a), i = Math.max(i, c), r = Math.min(r, c);
325
325
  return { north: n, south: o, east: i, west: r };
326
326
  }
327
- function qe(e, n, o, i, r) {
328
- const { north: a, south: d, east: b, west: p } = $e(e);
329
- if (a === d && b === p)
327
+ function De(e, n, o, i, r) {
328
+ const { north: a, south: c, east: b, west: u } = qe(e);
329
+ if (a === c && b === u)
330
330
  return { center: { lat: a, lng: b }, zoom: r };
331
- const f = ee(a), c = ee(d), y = {
332
- lat: Ke((f + c) / 2),
333
- lng: (b + p) / 2
334
- }, u = (t, h) => h > 0 ? Math.log2(Math.max(t, 1) / Oe / h) : r, v = Math.min(
335
- u(n - 2 * i, (b - p) / 360),
336
- u(o - 2 * i, (f - c) / (2 * Math.PI)),
331
+ const f = ee(a), d = ee(c), y = {
332
+ lat: $e((f + d) / 2),
333
+ lng: (b + u) / 2
334
+ }, p = (t, m) => m > 0 ? Math.log2(Math.max(t, 1) / Ae / m) : r, M = Math.min(
335
+ p(n - 2 * i, (b - u) / 360),
336
+ p(o - 2 * i, (f - d) / (2 * Math.PI)),
337
337
  r
338
338
  );
339
- return { center: y, zoom: Math.max(0, Math.floor(v)) };
339
+ return { center: y, zoom: Math.max(0, Math.floor(M)) };
340
340
  }
341
341
  const re = ({ id: e, lat: n, lng: o }) => e != null ? `id:${e}` : `at:${n},${o}`;
342
- function De({
342
+ function He({
343
343
  points: e,
344
344
  fitKey: n,
345
345
  maxZoom: o,
346
346
  onCameraMove: i
347
347
  }) {
348
- const r = K(), a = k(null), d = k(!1), b = k(null);
349
- return L(() => {
348
+ const r = K(), a = k(null), c = k(!1), b = k(null);
349
+ return C(() => {
350
350
  if (!r) return;
351
- const p = () => {
351
+ const u = () => {
352
352
  var t;
353
- const c = b.current, y = (t = r.getCenter()) == null ? void 0 : t.toJSON(), u = r.getZoom();
354
- c != null && u === c.zoom && y != null && Math.abs(y.lat - c.center.lat) < 1e-6 && Math.abs(y.lng - c.center.lng) < 1e-6 || (d.current = !0);
353
+ const d = b.current, y = (t = r.getCenter()) == null ? void 0 : t.toJSON(), p = r.getZoom();
354
+ d != null && p === d.zoom && y != null && Math.abs(y.lat - d.center.lat) < 1e-6 && Math.abs(y.lng - d.center.lng) < 1e-6 || (c.current = !0);
355
355
  }, f = [
356
356
  r.addListener("dragstart", () => {
357
- d.current = !0;
357
+ c.current = !0;
358
358
  }),
359
- r.addListener("center_changed", p),
360
- r.addListener("zoom_changed", p)
359
+ r.addListener("center_changed", u),
360
+ r.addListener("zoom_changed", u)
361
361
  ];
362
- return () => f.forEach((c) => c.remove());
363
- }, [r]), L(() => {
362
+ return () => f.forEach((d) => d.remove());
363
+ }, [r]), C(() => {
364
364
  var w;
365
365
  if (!r) return;
366
- const p = ((w = a.current) == null ? void 0 : w.map) === r ? a.current : null;
367
- if ((p == null ? void 0 : p.key) === n) return;
368
- const f = new Set(e.map(re)), c = (m, M) => {
369
- b.current = { center: m, zoom: M }, i(), r.moveCamera({ center: m, zoom: M }), d.current = !1;
366
+ const u = ((w = a.current) == null ? void 0 : w.map) === r ? a.current : null;
367
+ if ((u == null ? void 0 : u.key) === n) return;
368
+ const f = new Set(e.map(re)), d = (h, v) => {
369
+ b.current = { center: h, zoom: v }, i(), r.moveCamera({ center: h, zoom: v }), c.current = !1;
370
370
  };
371
371
  if (e.length === 0) {
372
372
  a.current = { map: r, key: n, points: f };
373
373
  return;
374
374
  }
375
- if (p != null && p.points.size > 0 && [...p.points].every((m) => f.has(m)) && d.current) {
375
+ if (u != null && u.points.size > 0 && [...u.points].every((h) => f.has(h)) && c.current) {
376
376
  a.current = { map: r, key: n, points: f };
377
377
  return;
378
378
  }
379
- const u = r.getDiv();
380
- if (!(u instanceof Element)) return;
381
- const v = () => {
379
+ const p = r.getDiv();
380
+ if (!(p instanceof Element)) return;
381
+ const M = () => {
382
382
  a.current = { map: r, key: n, points: f };
383
- const m = Math.min(
384
- Te("--spacing-2xl", u, 48),
385
- u.clientWidth / 4,
386
- u.clientHeight / 4
387
- ), { center: M, zoom: I } = qe(
383
+ const h = Math.min(
384
+ Se("--spacing-2xl", p, 48),
385
+ p.clientWidth / 4,
386
+ p.clientHeight / 4
387
+ ), { center: v, zoom: I } = De(
388
388
  e,
389
- u.clientWidth,
390
- u.clientHeight,
391
- m,
389
+ p.clientWidth,
390
+ p.clientHeight,
391
+ h,
392
392
  o
393
393
  );
394
- c(M, I);
395
- }, t = () => u.clientWidth > 0 && u.clientHeight > 0;
394
+ d(v, I);
395
+ }, t = () => p.clientWidth > 0 && p.clientHeight > 0;
396
396
  if (t() || typeof ResizeObserver > "u") {
397
- v();
397
+ M();
398
398
  return;
399
399
  }
400
- const h = new ResizeObserver(() => {
401
- t() && (h.disconnect(), v());
400
+ const m = new ResizeObserver(() => {
401
+ t() && (m.disconnect(), M());
402
402
  });
403
- return h.observe(u), () => h.disconnect();
403
+ return m.observe(p), () => m.disconnect();
404
404
  }, [r, n, e, o, i]), null;
405
405
  }
406
406
  const oe = (e) => {
@@ -416,74 +416,76 @@ function se() {
416
416
  "data-testid": "map-view-loading",
417
417
  className: "ds:[inline-size:100%] ds:[block-size:100%]",
418
418
  children: [
419
- /* @__PURE__ */ l(Le, { variant: "rectangular", width: "100%", height: "100%" }),
420
- /* @__PURE__ */ l(Ce, { children: e("common.loading") })
419
+ /* @__PURE__ */ l(Ie, { variant: "rectangular", width: "100%", height: "100%" }),
420
+ /* @__PURE__ */ l(Le, { children: e("common.loading") })
421
421
  ]
422
422
  }
423
423
  );
424
424
  }
425
- function He({ children: e }) {
426
- const n = ze();
425
+ function Be({ children: e }) {
426
+ const n = Ve();
427
427
  return ne("maps") || !n || oe("Map") ? e : /* @__PURE__ */ l(se, {});
428
428
  }
429
- function Be({ children: e }) {
429
+ function Fe({ children: e }) {
430
430
  return ne("marker") || oe("Marker") ? e : null;
431
431
  }
432
432
  function te({
433
433
  address: e,
434
- description: n,
435
- onLoadMap: o,
436
- openInGoogleMapsHref: i,
437
- consentCta: r
434
+ contentLang: n,
435
+ description: o,
436
+ onLoadMap: i,
437
+ openInGoogleMapsHref: r,
438
+ consentCta: a
438
439
  }) {
439
- const { t: a } = A("ui");
440
- return /* @__PURE__ */ S("div", { className: Re(), "data-testid": "map-view-consent", children: [
440
+ const { t: c } = A("ui");
441
+ return /* @__PURE__ */ S("div", { className: Ze(), "data-testid": "map-view-consent", children: [
441
442
  /* @__PURE__ */ l(
442
- Se,
443
+ xe,
443
444
  {
444
445
  "aria-hidden": "true",
445
446
  className: "ds:size-6 ds:text-[var(--muted-foreground)]"
446
447
  }
447
448
  ),
448
- /* @__PURE__ */ l("p", { className: Ze(), children: a("mapView.consentTitle") }),
449
+ /* @__PURE__ */ l("p", { className: _e(), children: c("mapView.consentTitle") }),
449
450
  e ? /* @__PURE__ */ l(
450
451
  "p",
451
452
  {
452
453
  className: Q(),
453
454
  "data-testid": "map-view-address",
455
+ lang: n,
454
456
  children: e
455
457
  }
456
458
  ) : null,
457
- /* @__PURE__ */ l("p", { className: Q(), children: n }),
459
+ /* @__PURE__ */ l("p", { className: Q(), children: o }),
458
460
  /* @__PURE__ */ S("div", { className: "ds:flex ds:gap-[var(--spacing-sm)] ds:flex-wrap ds:items-center ds:justify-center", children: [
459
- r ?? /* @__PURE__ */ l(
460
- Ve,
461
+ a ?? /* @__PURE__ */ l(
462
+ Ce,
461
463
  {
462
464
  type: "button",
463
465
  intent: "primary",
464
466
  size: "sm",
465
- onClick: o,
467
+ onClick: i,
466
468
  "data-testid": "map-view-load-cta",
467
- children: a("mapView.consentCta")
469
+ children: c("mapView.consentCta")
468
470
  }
469
471
  ),
470
472
  /* @__PURE__ */ S(
471
473
  "a",
472
474
  {
473
- href: i,
475
+ href: r,
474
476
  target: "_blank",
475
477
  rel: "noopener noreferrer",
476
478
  className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)] ds:text-[var(--primary-readable)] ds:underline ds:underline-offset-2",
477
479
  children: [
478
- a("mapView.openInGoogleMaps"),
479
- /* @__PURE__ */ l(xe, { "aria-hidden": "true", className: "ds:size-3" })
480
+ c("mapView.openInGoogleMaps"),
481
+ /* @__PURE__ */ l(Pe, { "aria-hidden": "true", className: "ds:size-3" })
480
482
  ]
481
483
  }
482
484
  )
483
485
  ] })
484
486
  ] });
485
487
  }
486
- const Fe = he(
488
+ const We = ge(
487
489
  ({
488
490
  id: e,
489
491
  apiKey: n,
@@ -491,36 +493,37 @@ const Fe = he(
491
493
  zoom: i = 15,
492
494
  markers: r,
493
495
  selectedMarkerId: a,
494
- onMarkerClick: d,
496
+ onMarkerClick: c,
495
497
  onBoundsChange: b,
496
- consentGranted: p = !1,
498
+ consentGranted: u = !1,
497
499
  onConsentRequest: f,
498
- address: c,
499
- consentDescription: y,
500
- consentCta: u,
501
- mapId: v,
502
- size: t,
503
- surface: h,
504
- ariaLabel: w,
505
- fitToPoints: m,
506
- fitKey: M,
507
- fitMaxZoom: I = 15,
508
- className: P,
509
- ...G
510
- }, N) => {
511
- const { t: R, i18n: ae } = A("ui"), Z = E(() => m ?? [], [m]), ie = E(
512
- () => M ?? Z.map((s) => `${re(s)}@${s.lat},${s.lng}`).sort().join("|"),
513
- [M, Z]
514
- ), V = Z.length > 0, $ = k(V), q = ge(), le = E(
500
+ address: d,
501
+ contentLang: y,
502
+ consentDescription: p,
503
+ consentCta: M,
504
+ mapId: t,
505
+ size: m,
506
+ surface: w,
507
+ ariaLabel: h,
508
+ fitToPoints: v,
509
+ fitKey: I,
510
+ fitMaxZoom: P = 15,
511
+ className: G,
512
+ ...N
513
+ }, ae) => {
514
+ const { t: R, i18n: ie } = A("ui"), Z = E(() => v ?? [], [v]), le = E(
515
+ () => I ?? Z.map((s) => `${re(s)}@${s.lat},${s.lng}`).sort().join("|"),
516
+ [I, Z]
517
+ ), V = Z.length > 0, $ = k(V), q = fe(), ce = E(
515
518
  () => `map-${q.replace(/[^a-zA-Z0-9-_]/g, "")}`,
516
519
  [q]
517
- ), [D, ce] = Y(!1);
518
- L(() => {
520
+ ), [D, de] = Y(!1);
521
+ C(() => {
519
522
  if (typeof window > "u") return;
520
- const s = window.matchMedia("(prefers-reduced-motion: reduce)"), g = () => ce(s.matches);
523
+ const s = window.matchMedia("(prefers-reduced-motion: reduce)"), g = () => de(s.matches);
521
524
  return g(), s.addEventListener("change", g), () => s.removeEventListener("change", g);
522
525
  }, []);
523
- const H = E(() => `https://www.google.com/maps/search/?api=1&query=${c ? encodeURIComponent(c) : `${o.lat},${o.lng}`}`, [c, o.lat, o.lng]), z = k(null), B = k({
526
+ const H = E(() => `https://www.google.com/maps/search/?api=1&query=${d ? encodeURIComponent(d) : `${o.lat},${o.lng}`}`, [d, o.lat, o.lng]), z = k(null), B = k({
524
527
  pendingInput: !1,
525
528
  moved: !1,
526
529
  programmatic: !1
@@ -532,10 +535,10 @@ const Fe = he(
532
535
  };
533
536
  }, []), j = T(
534
537
  (s) => {
535
- _(), d == null || d(s);
538
+ _(), c == null || c(s);
536
539
  },
537
- [_, d]
538
- ), de = T((s) => {
540
+ [_, c]
541
+ ), pe = T((s) => {
539
542
  z.current = s;
540
543
  }, []), F = k(!1), W = k(null), J = k(0), O = T(
541
544
  () => ({
@@ -570,28 +573,28 @@ const Fe = he(
570
573
  }),
571
574
  []
572
575
  );
573
- fe(N, O, [O]);
574
- const pe = E(
576
+ be(ae, O, [O]);
577
+ const ue = E(
575
578
  () => O(),
576
579
  [O]
577
580
  );
578
- Ee(Pe, pe, e), L(() => {
579
- var g, C;
581
+ Te(Ge, ue, e), C(() => {
582
+ var g, L;
580
583
  const s = $.current && !V;
581
584
  if ($.current = V, !V) {
582
585
  if (s) {
583
586
  (g = z.current) == null || g.jumpTo(o, i);
584
587
  return;
585
588
  }
586
- D || (C = z.current) == null || C.panTo(o);
589
+ D || (L = z.current) == null || L.panTo(o);
587
590
  }
588
- }, [o.lat, o.lng, D, V]), L(() => {
591
+ }, [o.lat, o.lng, D, V]), C(() => {
589
592
  var s;
590
593
  V || (s = z.current) == null || s.setZoom(i);
591
594
  }, [i, V]);
592
- const [ue, U] = Y(!1), X = p || ue;
595
+ const [me, U] = Y(!1), X = u || me;
593
596
  F.current = X, W.current = a ?? null, J.current = (r ?? []).length;
594
- const me = T(() => {
597
+ const he = T(() => {
595
598
  if (f) {
596
599
  f(), U(!0);
597
600
  return;
@@ -601,85 +604,86 @@ const Fe = he(
601
604
  return /* @__PURE__ */ l(
602
605
  "div",
603
606
  {
604
- className: Ge({ size: t, surface: h, className: P }),
607
+ className: Ne({ size: m, surface: w, className: G }),
605
608
  "data-component": "map-view",
606
- "data-component-id": e ?? le,
609
+ "data-component-id": e ?? ce,
607
610
  role: "region",
608
- "aria-label": w ?? R("mapView.label"),
609
- ...G,
610
- children: /* @__PURE__ */ l("div", { className: Ne({ size: t }), children: X ? (
611
+ "aria-label": h ?? R("mapView.label"),
612
+ ...N,
613
+ children: /* @__PURE__ */ l("div", { className: Re({ size: m }), children: X ? (
611
614
  // A provider failure shows the consent placeholder (its "Open in
612
615
  // Google Maps" link needs no script) with "Load map" as the
613
616
  // retry, instead of unmounting the host's React tree. The gate
614
617
  // starts the provider only once Google's `core` and `maps`
615
618
  // libraries have arrived.
616
619
  /* @__PURE__ */ l(
617
- Ie,
620
+ Ee,
618
621
  {
619
622
  fallback: ({ reset: s }) => /* @__PURE__ */ l(
620
623
  te,
621
624
  {
622
- address: c,
623
- description: y ?? R("mapView.consentDescription"),
625
+ address: d,
626
+ contentLang: y,
627
+ description: p ?? R("mapView.consentDescription"),
624
628
  onLoadMap: s,
625
629
  consentCta: void 0,
626
630
  openInGoogleMapsHref: H
627
631
  }
628
632
  ),
629
- children: /* @__PURE__ */ l(be, { libraries: ["maps"], pending: /* @__PURE__ */ l(se, {}), children: /* @__PURE__ */ l(
630
- ye,
633
+ children: /* @__PURE__ */ l(ye, { libraries: ["maps"], pending: /* @__PURE__ */ l(se, {}), children: /* @__PURE__ */ l(
634
+ we,
631
635
  {
632
636
  apiKey: n,
633
- language: ae.language,
634
- children: /* @__PURE__ */ l(He, { children: /* @__PURE__ */ S(
635
- we,
637
+ language: ie.language,
638
+ children: /* @__PURE__ */ l(Be, { children: /* @__PURE__ */ S(
639
+ ve,
636
640
  {
637
641
  defaultCenter: o,
638
642
  defaultZoom: i,
639
- mapId: v,
643
+ mapId: t,
640
644
  gestureHandling: "cooperative",
641
645
  disableDefaultUI: !1,
642
646
  onClick: () => j(null),
643
647
  className: "ds:[inline-size:100%] ds:[block-size:100%]",
644
648
  children: [
645
649
  /* @__PURE__ */ l(
646
- _e,
650
+ je,
647
651
  {
648
- onHandleReady: de,
652
+ onHandleReady: pe,
649
653
  onMarkerSelect: j,
650
654
  onCameraMove: _
651
655
  }
652
656
  ),
653
657
  b ? /* @__PURE__ */ l(
654
- je,
658
+ Oe,
655
659
  {
656
660
  onBoundsChange: b,
657
661
  userInteraction: B
658
662
  }
659
663
  ) : null,
660
- m ? /* @__PURE__ */ l(
661
- De,
664
+ v ? /* @__PURE__ */ l(
665
+ He,
662
666
  {
663
667
  points: Z,
664
- fitKey: ie,
665
- maxZoom: I,
668
+ fitKey: le,
669
+ maxZoom: P,
666
670
  onCameraMove: _
667
671
  }
668
672
  ) : null,
669
- /* @__PURE__ */ l(Be, { children: (r ?? []).map((s) => {
670
- const g = a != null && a === s.id, C = R("mapView.markerLabel", {
673
+ /* @__PURE__ */ l(Fe, { children: (r ?? []).map((s) => {
674
+ const g = a != null && a === s.id, L = R("mapView.markerLabel", {
671
675
  label: s.label ?? s.id
672
676
  });
673
- return v ? /* @__PURE__ */ l(
674
- ve,
677
+ return t ? /* @__PURE__ */ l(
678
+ ke,
675
679
  {
676
680
  position: s.position,
677
- title: C,
678
- "aria-label": C,
681
+ title: L,
682
+ "aria-label": L,
679
683
  "data-selected": g ? "true" : "false",
680
684
  onClick: () => j(s.id),
681
685
  children: /* @__PURE__ */ l(
682
- ke,
686
+ Me,
683
687
  {
684
688
  background: "var(--primary)",
685
689
  borderColor: "var(--primary)",
@@ -689,10 +693,10 @@ const Fe = he(
689
693
  },
690
694
  s.id
691
695
  ) : /* @__PURE__ */ l(
692
- Me,
696
+ ze,
693
697
  {
694
698
  position: s.position,
695
- title: C,
699
+ title: L,
696
700
  onClick: () => j(s.id)
697
701
  },
698
702
  s.id
@@ -708,10 +712,11 @@ const Fe = he(
708
712
  ) : /* @__PURE__ */ l(
709
713
  te,
710
714
  {
711
- address: c,
712
- description: y ?? R("mapView.consentDescription"),
713
- onLoadMap: me,
714
- consentCta: u,
715
+ address: d,
716
+ contentLang: y,
717
+ description: p ?? R("mapView.consentDescription"),
718
+ onLoadMap: he,
719
+ consentCta: M,
715
720
  openInGoogleMapsHref: H
716
721
  }
717
722
  ) })
@@ -719,8 +724,8 @@ const Fe = he(
719
724
  );
720
725
  }
721
726
  );
722
- Fe.displayName = "MapView";
727
+ We.displayName = "MapView";
723
728
  export {
724
- Fe as M
729
+ We as M
725
730
  };
726
- //# sourceMappingURL=map-view-V7etHnyF.js.map
731
+ //# sourceMappingURL=map-view-Dn7aXZJw.js.map