@m3ui-vue/m3ui-vue 1.7.0 → 1.8.1

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 (87) hide show
  1. package/dist/API.md +579 -4
  2. package/dist/{MButton-CN3wYwIG.js → MButton-B6eZTfFV.js} +2 -2
  3. package/dist/{MButton-CN3wYwIG.js.map → MButton-B6eZTfFV.js.map} +1 -1
  4. package/dist/{MColorPickerModal-BKM1CHxr.js → MColorPickerModal-Dajjf6tH.js} +4 -4
  5. package/dist/{MColorPickerModal-BKM1CHxr.js.map → MColorPickerModal-Dajjf6tH.js.map} +1 -1
  6. package/dist/{MDialog-1LAk9WAO.js → MDialog-DQvE_JBv.js} +2 -2
  7. package/dist/{MDialog-1LAk9WAO.js.map → MDialog-DQvE_JBv.js.map} +1 -1
  8. package/dist/{MListItem-BU5KDRCB.js → MListItem-DiOAxaN7.js} +102 -102
  9. package/dist/{MListItem-BU5KDRCB.js.map → MListItem-DiOAxaN7.js.map} +1 -1
  10. package/dist/{MLoadingIndicator-RykOo5tf.js → MLoadingIndicator-CuTZYFFj.js} +2 -2
  11. package/dist/{MLoadingIndicator-RykOo5tf.js.map → MLoadingIndicator-CuTZYFFj.js.map} +1 -1
  12. package/dist/MPdfViewer-C5ngKPRM.js +1866 -0
  13. package/dist/MPdfViewer-C5ngKPRM.js.map +1 -0
  14. package/dist/{MSeekBar-B_Y3MpVz.js → MSeekBar-BCDQTx2t.js} +2 -2
  15. package/dist/{MSeekBar-B_Y3MpVz.js.map → MSeekBar-BCDQTx2t.js.map} +1 -1
  16. package/dist/{MSegmentedButton-CiOOY1-N.js → MSegmentedButton-BXzRsg1S.js} +2 -2
  17. package/dist/{MSegmentedButton-CiOOY1-N.js.map → MSegmentedButton-BXzRsg1S.js.map} +1 -1
  18. package/dist/MSignaturePad-CxOtelzE.js +140 -0
  19. package/dist/MSignaturePad-CxOtelzE.js.map +1 -0
  20. package/dist/{MSlider-BCeVIxcq.js → MSlider-D_O8J9YH.js} +3 -3
  21. package/dist/{MSlider-BCeVIxcq.js.map → MSlider-D_O8J9YH.js.map} +1 -1
  22. package/dist/{MSpinner-Cs03qoqE.js → MSpinner-UCdtSOHP.js} +2 -2
  23. package/dist/{MSpinner-Cs03qoqE.js.map → MSpinner-UCdtSOHP.js.map} +1 -1
  24. package/dist/{MTextField-NaFbMkjv.js → MTextField-CYk9yFvi.js} +3 -3
  25. package/dist/{MTextField-NaFbMkjv.js.map → MTextField-CYk9yFvi.js.map} +1 -1
  26. package/dist/{_useFieldValidation-Bz34IAQY.js → _useFieldValidation-B0B44M_t.js} +2 -2
  27. package/dist/{_useFieldValidation-Bz34IAQY.js.map → _useFieldValidation-B0B44M_t.js.map} +1 -1
  28. package/dist/api.json +1 -1
  29. package/dist/code-editor.js +2 -2
  30. package/dist/components/MFormBuilder.vue.d.ts +22 -0
  31. package/dist/components/MFormRenderer.vue.d.ts +151 -0
  32. package/dist/components/MMapRoute.vue.d.ts +13 -5
  33. package/dist/components/MPdfSigner.vue.d.ts +499 -0
  34. package/dist/components/MPdfViewer.vue.d.ts +12 -0
  35. package/dist/components/MPosKeypad.vue.d.ts +1 -1
  36. package/dist/components/MSpreadsheet.vue.d.ts +137 -0
  37. package/dist/components/MStack.vue.d.ts +1 -1
  38. package/dist/composables/pdfSign.d.ts +52 -0
  39. package/dist/composables/spreadsheetFormula.d.ts +55 -0
  40. package/dist/composables/useLocale.d.ts +154 -0
  41. package/dist/draw.js +2 -2
  42. package/dist/flow.js +1 -1
  43. package/dist/gantt.js +2 -2
  44. package/dist/index.d.ts +7 -0
  45. package/dist/locales/index.js +539 -0
  46. package/dist/locales/index.js.map +1 -1
  47. package/dist/m3ui-vue.css +1 -1
  48. package/dist/m3ui.js +16968 -15042
  49. package/dist/m3ui.js.map +1 -1
  50. package/dist/map.js +601 -585
  51. package/dist/map.js.map +1 -1
  52. package/dist/media.js +4 -4
  53. package/dist/pdf-sign.d.ts +3 -0
  54. package/dist/pdf-sign.js +548 -0
  55. package/dist/pdf-sign.js.map +1 -0
  56. package/dist/pdf.js +1 -1859
  57. package/dist/rich-text-editor.js +5 -5
  58. package/dist/styles.css +1 -1
  59. package/dist/{useLocale-Dh1xZZ8i.js → useLocale-DL96OFgr.js} +78 -1
  60. package/dist/useLocale-DL96OFgr.js.map +1 -0
  61. package/package.json +9 -1
  62. package/src/__tests__/MFormRenderer.test.ts +157 -0
  63. package/src/__tests__/MMapRoute.test.ts +34 -0
  64. package/src/__tests__/MPdfSigner.test.ts +175 -0
  65. package/src/__tests__/MSpreadsheet.test.ts +223 -0
  66. package/src/__tests__/spreadsheetFormula.test.ts +77 -0
  67. package/src/__tests__/ssr.test.ts +3 -0
  68. package/src/components/MFormBuilder.vue +417 -0
  69. package/src/components/MFormRenderer.vue +324 -0
  70. package/src/components/MMapRoute.vue +64 -11
  71. package/src/components/MPdfSigner.vue +433 -0
  72. package/src/components/MPdfViewer.vue +12 -0
  73. package/src/components/MSpreadsheet.vue +992 -0
  74. package/src/composables/pdfSign.ts +141 -0
  75. package/src/composables/spreadsheetFormula.ts +459 -0
  76. package/src/composables/useLocale.ts +231 -0
  77. package/src/index.ts +7 -0
  78. package/src/locales/de.ts +77 -0
  79. package/src/locales/es.ts +77 -0
  80. package/src/locales/fr.ts +77 -0
  81. package/src/locales/ja.ts +77 -0
  82. package/src/locales/ko.ts +77 -0
  83. package/src/locales/pt.ts +77 -0
  84. package/src/locales/zh.ts +77 -0
  85. package/src/pdf-sign.ts +5 -0
  86. package/dist/pdf.js.map +0 -1
  87. package/dist/useLocale-Dh1xZZ8i.js.map +0 -1
package/dist/map.js CHANGED
@@ -1,31 +1,31 @@
1
1
  import { t as e } from "./MIcon-DpajuUTJ.js";
2
2
  import { i as t } from "./motion-BcejVTeX.js";
3
3
  import { d as n, f as r, l as i, t as a, u as o } from "./MIconButton-BBggVwBV.js";
4
- import { i as s } from "./useLocale-Dh1xZZ8i.js";
4
+ import { i as s } from "./useLocale-DL96OFgr.js";
5
5
  import { o as c } from "./_storageKeys-C4W_4xK4.js";
6
6
  import { t as l } from "./useThemeTokens-DyAdPQB0.js";
7
- import { t as u } from "./MTextField-NaFbMkjv.js";
8
- import { t as d } from "./MSlider-BCeVIxcq.js";
7
+ import { t as u } from "./MTextField-CYk9yFvi.js";
8
+ import { t as d } from "./MSlider-D_O8J9YH.js";
9
9
  import { t as f } from "./MTooltip-CK39Zon4.js";
10
10
  import { n as p, r as m } from "./_popupPosition-nL8SVKPK.js";
11
- import { a as h, l as g, r as _, s as v, t as y } from "./MListItem-BU5KDRCB.js";
12
- import { t as b } from "./MSpinner-Cs03qoqE.js";
13
- import { n as x, t as S } from "./_useFieldValidation-Bz34IAQY.js";
14
- import { Fragment as C, Teleport as w, Transition as T, computed as E, createBlock as D, createCommentVNode as O, createElementBlock as k, createElementVNode as A, createSlots as j, createTextVNode as M, createVNode as N, defineComponent as P, getCurrentInstance as F, inject as I, markRaw as L, mergeProps as R, nextTick as ee, normalizeClass as z, normalizeStyle as te, onBeforeUnmount as ne, onMounted as B, onUnmounted as V, openBlock as H, provide as U, reactive as W, ref as G, renderList as re, renderSlot as K, shallowRef as q, toDisplayString as J, toValue as Y, unref as X, useId as ie, useSlots as ae, watch as Z, watchEffect as oe, withCtx as Q, withModifiers as se } from "vue";
11
+ import { a as h, l as g, n as _, s as v, t as y } from "./MListItem-DiOAxaN7.js";
12
+ import { t as b } from "./MSpinner-UCdtSOHP.js";
13
+ import { n as x, t as S } from "./_useFieldValidation-B0B44M_t.js";
14
+ import { Fragment as C, Teleport as w, Transition as T, computed as E, createBlock as D, createCommentVNode as O, createElementBlock as k, createElementVNode as A, createSlots as j, createTextVNode as M, createVNode as N, defineComponent as P, getCurrentInstance as F, inject as I, markRaw as L, mergeProps as R, nextTick as ee, normalizeClass as z, normalizeStyle as te, onBeforeUnmount as ne, onMounted as B, onUnmounted as re, openBlock as V, provide as H, reactive as U, ref as W, renderList as ie, renderSlot as G, shallowRef as K, toDisplayString as q, toValue as ae, unref as J, useId as oe, useSlots as se, watch as Y, watchEffect as X, withCtx as Z, withModifiers as ce } from "vue";
15
15
  // src/composables/useMap.ts
16
- var ce;
17
- function le(e) {
18
- ce = e;
16
+ var le;
17
+ function ue(e) {
18
+ le = e;
19
19
  }
20
- function ue() {
21
- return ce;
20
+ function de() {
21
+ return le;
22
22
  }
23
- var de = Symbol("m3-map");
24
- function fe(e) {
25
- let t = I(de, null);
23
+ var fe = Symbol("m3-map");
24
+ function pe(e) {
25
+ let t = I(fe, null);
26
26
  if (t || e === void 0) return t;
27
27
  let n = E(() => {
28
- let t = Y(e);
28
+ let t = ae(e);
29
29
  return t ? "context" in t ? t.context : t : void 0;
30
30
  }), r = {
31
31
  map: E(() => n.value?.map.value),
@@ -43,17 +43,17 @@ function fe(e) {
43
43
  }
44
44
  })
45
45
  };
46
- return U(de, r), r;
46
+ return H(fe, r), r;
47
47
  }
48
- function pe(e) {
49
- let t = fe(e);
48
+ function me(e) {
49
+ let t = pe(e);
50
50
  if (!t) throw Error("useMap() must be called in a component inside <MMap>, or be given one");
51
51
  let n = [];
52
52
  F() && ne(() => n.splice(0).forEach((e) => e()));
53
53
  function r(e) {
54
54
  let r = () => {
55
55
  if (t.map.value && t.maplibre.value) return e(t.map.value, t.maplibre.value);
56
- let r = Z(t.map, (n) => {
56
+ let r = Y(t.map, (n) => {
57
57
  n && t.maplibre.value && (r(), e(n, t.maplibre.value));
58
58
  });
59
59
  n.push(r);
@@ -81,10 +81,10 @@ function pe(e) {
81
81
  };
82
82
  }
83
83
  // src/components/MMapControl.vue?vue&type=script&setup=true&lang.ts
84
- var me = { class: "hidden" }, he = {
84
+ var he = { class: "hidden" }, ge = {
85
85
  key: 0,
86
86
  class: "m3-map-control-panel-in"
87
- }, ge = /* @__PURE__ */ P({
87
+ }, _e = /* @__PURE__ */ P({
88
88
  inheritAttrs: !1,
89
89
  __name: "MMapControl",
90
90
  props: {
@@ -104,8 +104,8 @@ var me = { class: "hidden" }, he = {
104
104
  },
105
105
  emits: ["update:expanded"],
106
106
  setup(e, { emit: a }) {
107
- let s = e, c = a, l = ae(), u = G(), { onReady: d } = pe(), f = G(s.expanded);
108
- Z(() => s.expanded, (e) => {
107
+ let s = e, c = a, l = se(), u = W(), { onReady: d } = me(), f = W(s.expanded);
108
+ Y(() => s.expanded, (e) => {
109
109
  f.value = e;
110
110
  });
111
111
  let p = E(() => f.value && !!l.panel);
@@ -158,37 +158,37 @@ var me = { class: "hidden" }, he = {
158
158
  };
159
159
  b.onfinish = null, b.cancel(), b = null, y = t, D();
160
160
  }
161
- Z(p, M, { flush: "post" });
161
+ Y(p, M, { flush: "post" });
162
162
  let N, P = {
163
163
  onAdd: () => u.value,
164
164
  onRemove: () => u.value?.remove()
165
165
  };
166
166
  return d((e) => {
167
167
  N = e, u.value && e.addControl(P, s.position);
168
- }), Z(() => s.position, (e) => {
168
+ }), Y(() => s.position, (e) => {
169
169
  N && u.value && (N.removeControl(P), N.addControl(P, e));
170
170
  }), B(() => {
171
171
  document.addEventListener("pointerdown", _, !0), typeof ResizeObserver < "u" && u.value && (w = new ResizeObserver(D), w.observe(u.value));
172
172
  }), ne(() => {
173
173
  document.removeEventListener("pointerdown", _, !0), w?.disconnect(), b?.cancel(), N?.hasControl(P) && N.removeControl(P);
174
- }), (t, n) => (H(), k("div", me, [A("div", R({
174
+ }), (t, n) => (V(), k("div", he, [A("div", R({
175
175
  ref_key: "el",
176
176
  ref: u,
177
177
  class: ["maplibregl-ctrl m3-map-control", p.value ? "m3-map-control-panel" : e.group ? "maplibregl-ctrl-group" : ""]
178
- }, t.$attrs, { onKeydown: v }), [p.value ? (H(), k("div", he, [K(t.$slots, "panel", { close: g })])) : K(t.$slots, "default", {
178
+ }, t.$attrs, { onKeydown: v }), [p.value ? (V(), k("div", ge, [G(t.$slots, "panel", { close: g })])) : G(t.$slots, "default", {
179
179
  expanded: f.value,
180
180
  toggle: h
181
181
  }, void 0, void 0, 1)], 16)]));
182
182
  }
183
- }), _e = [
183
+ }), ve = [
184
184
  "title",
185
185
  "aria-label",
186
186
  "aria-expanded"
187
- ], ve = ["innerHTML"], ye = /* @__PURE__ */ P({
187
+ ], ye = ["innerHTML"], be = /* @__PURE__ */ P({
188
188
  __name: "_MMapAttribution",
189
189
  props: { position: {} },
190
190
  setup(t) {
191
- let n = t, r = s(), { on: i, onReady: a } = pe(), o = G([]), c = G(!0), l = G(0), u;
191
+ let n = t, r = s(), { on: i, onReady: a } = me(), o = W([]), c = W(!0), l = W(0), u;
192
192
  function d() {
193
193
  if (!u) return;
194
194
  let e = u.getStyle?.();
@@ -208,34 +208,34 @@ var me = { class: "hidden" }, he = {
208
208
  c.value = !1;
209
209
  });
210
210
  let f = E(() => o.value.join(" ")), p = E(() => n.position.endsWith("right"));
211
- return (n, i) => f.value ? (H(), D(ge, {
211
+ return (n, i) => f.value ? (V(), D(_e, {
212
212
  key: 0,
213
213
  position: t.position,
214
214
  group: !1,
215
215
  class: z(["m3-map-attrib", c.value ? "m3-map-attrib-open" : ""])
216
216
  }, {
217
- default: Q(() => [A("div", {
217
+ default: Z(() => [A("div", {
218
218
  class: z(["m3-map-attrib-row", p.value ? "flex-row-reverse" : ""]),
219
219
  style: te(l.value ? { maxWidth: `${l.value}px` } : void 0)
220
220
  }, [A("button", {
221
221
  type: "button",
222
222
  class: "m3-map-attrib-button",
223
- title: X(r).mapToggleAttribution,
224
- "aria-label": X(r).mapToggleAttribution,
223
+ title: J(r).mapToggleAttribution,
224
+ "aria-label": J(r).mapToggleAttribution,
225
225
  "aria-expanded": c.value,
226
226
  onClick: i[0] ||= (e) => c.value = !c.value
227
227
  }, [N(e, {
228
228
  name: "info",
229
229
  size: 20
230
- })], 8, _e), c.value ? (H(), k("div", {
230
+ })], 8, ve), c.value ? (V(), k("div", {
231
231
  key: 0,
232
232
  class: z(["m3-map-attrib-text", p.value ? "pl-3.5" : "pr-3.5"]),
233
233
  innerHTML: f.value
234
- }, null, 10, ve)) : O("", !0)], 6)]),
234
+ }, null, 10, ye)) : O("", !0)], 6)]),
235
235
  _: 1
236
236
  }, 8, ["position", "class"])) : O("", !0);
237
237
  }
238
- }), be = {
238
+ }), xe = {
239
239
  fill: ["fill-opacity"],
240
240
  line: ["line-opacity"],
241
241
  circle: ["circle-opacity", "circle-stroke-opacity"],
@@ -244,8 +244,8 @@ var me = { class: "hidden" }, he = {
244
244
  heatmap: ["heatmap-opacity"],
245
245
  "fill-extrusion": ["fill-extrusion-opacity"]
246
246
  };
247
- function xe() {
248
- return W({
247
+ function Q() {
248
+ return U({
249
249
  visible: {},
250
250
  opacity: {}
251
251
  });
@@ -256,13 +256,13 @@ function Se(e, t, n) {
256
256
  let n = t.getLayer(e.id);
257
257
  if (!n) continue;
258
258
  r[e.id] = t.getLayoutProperty(e.id, "visibility") !== "none";
259
- let a = be[n.type]?.[0], o = a ? t.getPaintProperty(e.id, a) : void 0;
259
+ let a = xe[n.type]?.[0], o = a ? t.getPaintProperty(e.id, a) : void 0;
260
260
  i[e.id] = typeof o == "number" ? o : 1;
261
261
  }
262
262
  e.visible = r, e.opacity = i;
263
263
  }
264
264
  function Ce(e) {
265
- let t = fe(e);
265
+ let t = pe(e);
266
266
  if (!t) throw Error("useMapLayers() must be called in a component inside <MMap>, or be given one");
267
267
  let { map: n, model: r, layerState: i } = t, a = E(() => r.value?.layers ?? []), o = E(() => new Map(a.value.map((e) => [e.id, e])));
268
268
  function s(e) {
@@ -281,7 +281,7 @@ function Ce(e) {
281
281
  }
282
282
  function d(e, t) {
283
283
  let r = n.value, a = r?.getLayer(e);
284
- if (a) for (let n of be[a.type] ?? []) r.setPaintProperty(e, n, t);
284
+ if (a) for (let n of xe[a.type] ?? []) r.setPaintProperty(e, n, t);
285
285
  i.opacity[e] = t;
286
286
  for (let n of o.value.get(e)?.children ?? []) d(n, t);
287
287
  }
@@ -383,15 +383,15 @@ var Te = 600, Ee = /* @__PURE__ */ P({
383
383
  "update:pitch"
384
384
  ],
385
385
  setup(e, { expose: t, emit: n }) {
386
- let r = e, i = n, a = G(), o = G(), l = q(), u = q(), d = G(0), f, p = q(), m = xe(), h = {
386
+ let r = e, i = n, a = W(), o = W(), l = K(), u = K(), d = W(0), f, p = K(), m = Q(), h = {
387
387
  map: l,
388
388
  maplibre: u,
389
389
  styleVersion: d,
390
390
  model: p,
391
391
  layerState: m,
392
- activeTool: G(null)
392
+ activeTool: W(null)
393
393
  };
394
- U(de, h);
394
+ H(fe, h);
395
395
  function g(e) {
396
396
  p.value = r.adapter ? r.adapter(e.getStyle(), { styleUrl: typeof r.mapStyle == "string" ? r.mapStyle : void 0 }) : void 0, Se(m, e, p.value);
397
397
  }
@@ -449,7 +449,7 @@ var Te = 600, Ee = /* @__PURE__ */ P({
449
449
  let o = x[e].create(n);
450
450
  t.addControl(o, a === !0 ? x[e].corner : a), S.set(e, o);
451
451
  }
452
- for (let e of Object.keys(x)) Z(() => r[e], () => C(e));
452
+ for (let e of Object.keys(x)) Y(() => r[e], () => C(e));
453
453
  function w() {
454
454
  return {
455
455
  "AttributionControl.ToggleAttribution": _.mapToggleAttribution,
@@ -469,7 +469,7 @@ var Te = 600, Ee = /* @__PURE__ */ P({
469
469
  "CooperativeGesturesHandler.MobileHelpText": _.mapTwoFingers
470
470
  };
471
471
  }
472
- let E = G(null), j, M;
472
+ let E = W(null), j, M;
473
473
  function P(e) {
474
474
  let t = e.getAttribute("title");
475
475
  t && e.closest(".maplibregl-ctrl") && (e.setAttribute("data-m3-tip", t), e.hasAttribute("aria-label") || e.setAttribute("aria-label", t), e.removeAttribute("title"));
@@ -493,11 +493,11 @@ var Te = 600, Ee = /* @__PURE__ */ P({
493
493
  let t = R(e);
494
494
  t && e.pointerType !== "touch" && (clearTimeout(j), j = setTimeout(() => F(t), Te));
495
495
  }
496
- function W(e) {
496
+ function U(e) {
497
497
  let t = R(e);
498
498
  t && !t.contains(e.relatedTarget) && I();
499
499
  }
500
- function re(e) {
500
+ function ie(e) {
501
501
  let t = R(e);
502
502
  t?.matches(":focus-visible") && F(t);
503
503
  }
@@ -516,11 +516,11 @@ var Te = 600, Ee = /* @__PURE__ */ P({
516
516
  }), ne(() => {
517
517
  M?.disconnect(), clearTimeout(j);
518
518
  });
519
- let Y = !1;
519
+ let ae = !1;
520
520
  B(async () => {
521
521
  let e = await import("maplibre-gl"), t = "Map" in e ? e : e.default;
522
- if (Y || !o.value) return;
523
- let n = r.workerUrl ?? ue();
522
+ if (ae || !o.value) return;
523
+ let n = r.workerUrl ?? de();
524
524
  n && t.setWorkerUrl(n);
525
525
  let a = y(), s = {
526
526
  center: a.center ?? r.center,
@@ -549,24 +549,24 @@ var Te = 600, Ee = /* @__PURE__ */ P({
549
549
  for (let e of Object.keys(x)) C(e);
550
550
  i("ready", c);
551
551
  });
552
- }), V(() => {
553
- Y = !0, l.value?.remove(), l.value = void 0;
552
+ }), re(() => {
553
+ ae = !0, l.value?.remove(), l.value = void 0;
554
554
  });
555
- let X = (e, t) => Math.abs(e - t) < 1e-9;
556
- return Z(() => r.center?.join(","), () => {
555
+ let J = (e, t) => Math.abs(e - t) < 1e-9;
556
+ return Y(() => r.center?.join(","), () => {
557
557
  let e = l.value;
558
558
  if (!e || !r.center) return;
559
559
  let t = e.getCenter();
560
- X(t.lng, r.center[0]) && X(t.lat, r.center[1]) || e.jumpTo({ center: r.center });
561
- }), Z(() => r.zoom, (e) => {
562
- l.value && e !== void 0 && !X(l.value.getZoom(), e) && l.value.jumpTo({ zoom: e });
563
- }), Z(() => r.bearing, (e) => {
564
- l.value && e !== void 0 && !X(l.value.getBearing(), e) && l.value.jumpTo({ bearing: e });
565
- }), Z(() => r.pitch, (e) => {
566
- l.value && e !== void 0 && !X(l.value.getPitch(), e) && l.value.jumpTo({ pitch: e });
567
- }), Z(() => r.adapter, () => {
560
+ J(t.lng, r.center[0]) && J(t.lat, r.center[1]) || e.jumpTo({ center: r.center });
561
+ }), Y(() => r.zoom, (e) => {
562
+ l.value && e !== void 0 && !J(l.value.getZoom(), e) && l.value.jumpTo({ zoom: e });
563
+ }), Y(() => r.bearing, (e) => {
564
+ l.value && e !== void 0 && !J(l.value.getBearing(), e) && l.value.jumpTo({ bearing: e });
565
+ }), Y(() => r.pitch, (e) => {
566
+ l.value && e !== void 0 && !J(l.value.getPitch(), e) && l.value.jumpTo({ pitch: e });
567
+ }), Y(() => r.adapter, () => {
568
568
  l.value && g(l.value);
569
- }), Z(() => r.mapStyle, (e) => l.value?.setStyle(e, {
569
+ }), Y(() => r.mapStyle, (e) => l.value?.setStyle(e, {
570
570
  diff: !1,
571
571
  transformStyle: (e, t) => {
572
572
  let n = f ?? $(void 0);
@@ -577,14 +577,14 @@ var Te = 600, Ee = /* @__PURE__ */ P({
577
577
  })), t({
578
578
  map: l,
579
579
  context: h
580
- }), (t, n) => (H(), k("div", {
580
+ }), (t, n) => (V(), k("div", {
581
581
  ref_key: "root",
582
582
  ref: a,
583
583
  class: "m3-map relative overflow-hidden",
584
584
  onPointerover: ee,
585
- onPointerout: W,
585
+ onPointerout: U,
586
586
  onPointerdown: I,
587
- onFocusin: re,
587
+ onFocusin: ie,
588
588
  onFocusout: I
589
589
  }, [
590
590
  A("div", {
@@ -592,18 +592,18 @@ var Te = 600, Ee = /* @__PURE__ */ P({
592
592
  ref: o,
593
593
  class: "h-full w-full"
594
594
  }, null, 512),
595
- l.value && e.attribution ? (H(), D(ye, {
595
+ l.value && e.attribution ? (V(), D(be, {
596
596
  key: 0,
597
597
  position: e.attribution === !0 ? "bottom-right" : e.attribution
598
598
  }, null, 8, ["position"])) : O("", !0),
599
- l.value ? K(t.$slots, "default", {}, void 0, void 0, 1) : O("", !0),
599
+ l.value ? G(t.$slots, "default", {}, void 0, void 0, 1) : O("", !0),
600
600
  N(T, {
601
601
  "enter-active-class": "transition-opacity duration-150",
602
602
  "enter-from-class": "opacity-0",
603
603
  "leave-active-class": "transition-opacity duration-100",
604
604
  "leave-to-class": "opacity-0"
605
605
  }, {
606
- default: Q(() => [E.value ? (H(), k("div", {
606
+ default: Z(() => [E.value ? (V(), k("div", {
607
607
  key: 0,
608
608
  role: "tooltip",
609
609
  class: z(["pointer-events-none absolute z-10 min-h-6 max-w-[200px] -translate-y-1/2 rounded bg-inverse-surface px-2 py-1 text-body-small whitespace-nowrap text-inverse-on-surface", E.value.left ? "-translate-x-full" : ""]),
@@ -611,7 +611,7 @@ var Te = 600, Ee = /* @__PURE__ */ P({
611
611
  left: `${E.value.x}px`,
612
612
  top: `${E.value.y}px`
613
613
  })
614
- }, J(E.value.text), 7)) : O("", !0)]),
614
+ }, q(E.value.text), 7)) : O("", !0)]),
615
615
  _: 1
616
616
  })
617
617
  ], 544));
@@ -642,7 +642,7 @@ var Te = 600, Ee = /* @__PURE__ */ P({
642
642
  },
643
643
  emits: ["update:lngLat", "click"],
644
644
  setup(e, { expose: t, emit: n }) {
645
- let r = e, i = n, a = ae(), o = G(), s = G(), { onReady: c } = pe(), l, u = !1;
645
+ let r = e, i = n, a = se(), o = W(), s = W(), { onReady: c } = me(), l, u = !1;
646
646
  c((e, t) => {
647
647
  u = !!a.default && !!o.value, l = new t.Marker({
648
648
  ...u ? { element: o.value } : { color: r.color ?? "currentColor" },
@@ -661,18 +661,18 @@ var Te = 600, Ee = /* @__PURE__ */ P({
661
661
  function d(e) {
662
662
  i("click", e);
663
663
  }
664
- return Z(() => r.lngLat.join(","), () => l?.setLngLat(r.lngLat)), Z(() => r.draggable, (e) => l?.setDraggable(e)), Z(() => r.rotation, (e) => l?.setRotation(e)), Z(() => r.offset?.join(","), () => l?.setOffset(r.offset ?? (u ? [0, 0] : ke))), ne(() => {
664
+ return Y(() => r.lngLat.join(","), () => l?.setLngLat(r.lngLat)), Y(() => r.draggable, (e) => l?.setDraggable(e)), Y(() => r.rotation, (e) => l?.setRotation(e)), Y(() => r.offset?.join(","), () => l?.setOffset(r.offset ?? (u ? [0, 0] : ke))), ne(() => {
665
665
  l?.getElement().removeEventListener("click", d), l?.getPopup()?.remove(), l?.remove();
666
- }), t({ marker: () => l }), (e, t) => (H(), k("div", je, [e.$slots.default ? (H(), k("div", R({
666
+ }), t({ marker: () => l }), (e, t) => (V(), k("div", je, [e.$slots.default ? (V(), k("div", R({
667
667
  key: 0,
668
668
  ref_key: "content",
669
669
  ref: o,
670
670
  class: "m3-map-marker"
671
- }, e.$attrs), [K(e.$slots, "default")], 16)) : O("", !0), e.$slots.popup ? (H(), k("div", {
671
+ }, e.$attrs), [G(e.$slots, "default")], 16)) : O("", !0), e.$slots.popup ? (V(), k("div", {
672
672
  key: 1,
673
673
  ref_key: "popupContent",
674
674
  ref: s
675
- }, [K(e.$slots, "popup")], 512)) : O("", !0)]));
675
+ }, [G(e.$slots, "popup")], 512)) : O("", !0)]));
676
676
  }
677
677
  }), Ne = { class: "hidden" }, Pe = /* @__PURE__ */ P({
678
678
  inheritAttrs: !1,
@@ -697,7 +697,7 @@ var Te = 600, Ee = /* @__PURE__ */ P({
697
697
  },
698
698
  emits: ["update:open"],
699
699
  setup(e, { expose: t, emit: n }) {
700
- let r = e, i = n, a = G(), { onReady: o } = pe(), s, c, l = !1;
700
+ let r = e, i = n, a = W(), { onReady: o } = me(), s, c, l = !1;
701
701
  function u() {
702
702
  s && c && !s.isOpen() && s.setLngLat(r.lngLat).addTo(c);
703
703
  }
@@ -713,14 +713,14 @@ var Te = 600, Ee = /* @__PURE__ */ P({
713
713
  }), a.value && s.setDOMContent(a.value), s.on("close", () => {
714
714
  l || i("update:open", !1);
715
715
  }), r.open && u();
716
- }), Z(() => r.open, (e) => {
716
+ }), Y(() => r.open, (e) => {
717
717
  e ? u() : s?.isOpen() && (l = !0, s.remove(), l = !1);
718
- }), Z(() => r.lngLat.join(","), () => s?.setLngLat(r.lngLat)), Z(() => r.maxWidth, (e) => s?.setMaxWidth(e)), Z(() => r.offset, (e) => s?.setOffset(e ?? 0)), ne(() => {
718
+ }), Y(() => r.lngLat.join(","), () => s?.setLngLat(r.lngLat)), Y(() => r.maxWidth, (e) => s?.setMaxWidth(e)), Y(() => r.offset, (e) => s?.setOffset(e ?? 0)), ne(() => {
719
719
  l = !0, s?.remove();
720
- }), t({ popup: () => s }), (e, t) => (H(), k("div", Ne, [A("div", R({
720
+ }), t({ popup: () => s }), (e, t) => (V(), k("div", Ne, [A("div", R({
721
721
  ref_key: "content",
722
722
  ref: a
723
- }, e.$attrs), [K(e.$slots, "default")], 16)]));
723
+ }, e.$attrs), [G(e.$slots, "default")], 16)]));
724
724
  }
725
725
  }), Fe = /* @__PURE__ */ P({
726
726
  inheritAttrs: !1,
@@ -738,7 +738,7 @@ var Te = 600, Ee = /* @__PURE__ */ P({
738
738
  },
739
739
  emits: ["click"],
740
740
  setup(e, { expose: t, emit: n }) {
741
- let r = e, i = n, a = r.id ?? `m3-geojson-${ie()}`, { onReady: o, styleVersion: s } = pe(), c = l(["primary", "surface"]), u = (...e) => [
741
+ let r = e, i = n, a = r.id ?? `m3-geojson-${oe()}`, { onReady: o, styleVersion: s } = me(), c = l(["primary", "surface"]), u = (...e) => [
742
742
  "match",
743
743
  ["geometry-type"],
744
744
  e,
@@ -807,7 +807,7 @@ var Te = 600, Ee = /* @__PURE__ */ P({
807
807
  }
808
808
  return o((e) => {
809
809
  p = e, b();
810
- }), Z(s, () => b()), Z(() => r.data, (e) => (p?.getSource(a))?.setData(e)), Z(() => JSON.stringify(f.value), () => y()), Z(() => r.before, () => y()), ne(() => {
810
+ }), Y(s, () => b()), Y(() => r.data, (e) => (p?.getSource(a))?.setData(e)), Y(() => JSON.stringify(f.value), () => y()), Y(() => r.before, () => y()), ne(() => {
811
811
  p &&= (v(), p.getSource(a) && p.removeSource(a), void 0);
812
812
  }), t({
813
813
  sourceId: a,
@@ -837,7 +837,7 @@ var Te = 600, Ee = /* @__PURE__ */ P({
837
837
  },
838
838
  emits: ["click", "cluster-click"],
839
839
  setup(e, { expose: t, emit: n }) {
840
- let r = e, i = n, a = r.id ?? `m3-cluster-${ie()}`, o = s(), { onReady: c, styleVersion: u } = pe(), d = l([
840
+ let r = e, i = n, a = r.id ?? `m3-cluster-${oe()}`, o = s(), { onReady: c, styleVersion: u } = me(), d = l([
841
841
  "primary",
842
842
  "secondary",
843
843
  "tertiary",
@@ -872,7 +872,7 @@ var Te = 600, Ee = /* @__PURE__ */ P({
872
872
  notation: "compact",
873
873
  maximumFractionDigits: 1
874
874
  });
875
- }), _, v, y = [], b = /* @__PURE__ */ new Map(), x = q([]), S = () => _?.getSource(a);
875
+ }), _, v, y = [], b = /* @__PURE__ */ new Map(), x = K([]), S = () => _?.getSource(a);
876
876
  function T(e, t, n) {
877
877
  return {
878
878
  id: e,
@@ -952,19 +952,19 @@ var Te = 600, Ee = /* @__PURE__ */ P({
952
952
  function B() {
953
953
  _ && (_.getSource(a) || (_.addSource(a, ee()), y = []), y.length && _.getLayer(y[0]) || R(), M());
954
954
  }
955
- function V() {
955
+ function re() {
956
956
  _ && (L(), _.getSource(a) && _.removeSource(a), B());
957
957
  }
958
958
  c((e, t) => {
959
959
  _ = e, v = t, B(), _.on("sourcedata", N), _.on("move", M), _.on("moveend", M);
960
- }), Z(u, () => B()), Z(() => r.data, (e) => {
960
+ }), Y(u, () => B()), Y(() => r.data, (e) => {
961
961
  S()?.setData(e), M();
962
- }), Z(() => [
962
+ }), Y(() => [
963
963
  r.radius,
964
964
  r.maxZoom,
965
965
  JSON.stringify(r.sourceOptions)
966
- ].join("|"), V), Z(() => JSON.stringify(p.value), () => R()), Z(() => r.before, () => R());
967
- function U(e) {
966
+ ].join("|"), re), Y(() => JSON.stringify(p.value), () => R()), Y(() => r.before, () => R());
967
+ function H(e) {
968
968
  let t = {
969
969
  id: e.id,
970
970
  count: e.count,
@@ -974,7 +974,7 @@ var Te = 600, Ee = /* @__PURE__ */ P({
974
974
  };
975
975
  i("cluster-click", t), r.zoomOnClick && e.zoomIn();
976
976
  }
977
- let W = (e) => o.mapClusterZoom.replace("{count}", String(e));
977
+ let U = (e) => o.mapClusterZoom.replace("{count}", String(e));
978
978
  return ne(() => {
979
979
  j && cancelAnimationFrame(j);
980
980
  for (let e of b.values()) e.marker.remove();
@@ -989,10 +989,10 @@ var Te = 600, Ee = /* @__PURE__ */ P({
989
989
  zoomIn: r,
990
990
  leaves: i
991
991
  }))
992
- }), (t, n) => (H(!0), k(C, null, re(x.value, (n) => (H(), D(w, {
992
+ }), (t, n) => (V(!0), k(C, null, ie(x.value, (n) => (V(), D(w, {
993
993
  key: n.id,
994
994
  to: n.el
995
- }, [K(t.$slots, "cluster", {
995
+ }, [G(t.$slots, "cluster", {
996
996
  id: n.id,
997
997
  count: n.count,
998
998
  label: g.value.format(n.count),
@@ -1006,9 +1006,9 @@ var Te = 600, Ee = /* @__PURE__ */ P({
1006
1006
  width: `${h(n.count)}px`,
1007
1007
  height: `${h(n.count)}px`
1008
1008
  }),
1009
- "aria-label": W(n.count),
1010
- onClick: se((e) => U(n), ["stop"])
1011
- }, J(g.value.format(n.count)), 15, Ie)])], 8, ["to"]))), 128));
1009
+ "aria-label": U(n.count),
1010
+ onClick: ce((e) => H(n), ["stop"])
1011
+ }, q(g.value.format(n.count)), 15, Ie)])], 8, ["to"]))), 128));
1012
1012
  }
1013
1013
  }), Re = 6371008.8, ze = Math.PI / 180;
1014
1014
  function Be(e, t) {
@@ -1127,7 +1127,7 @@ function tt(e) {
1127
1127
  return [[t, n], [r, i]];
1128
1128
  }
1129
1129
  // src/components/MMapRoute.vue?vue&type=script&setup=true&lang.ts
1130
- var nt = { class: "hidden" }, rt = ["aria-label", "title"], it = ["aria-label"], at = /* @__PURE__ */ P({
1130
+ var nt = { class: "hidden" }, rt = ["aria-label", "title"], it = ["aria-label"], at = { style: { transform: "rotate(0.01deg)" } }, ot = /* @__PURE__ */ P({
1131
1131
  inheritAttrs: !1,
1132
1132
  __name: "MMapRoute",
1133
1133
  props: {
@@ -1144,7 +1144,7 @@ var nt = { class: "hidden" }, rt = ["aria-label", "title"], it = ["aria-label"],
1144
1144
  type: Boolean,
1145
1145
  default: !0
1146
1146
  },
1147
- duration: { default: 1e3 },
1147
+ duration: { default: "auto" },
1148
1148
  fit: {
1149
1149
  type: Boolean,
1150
1150
  default: !0
@@ -1172,11 +1172,11 @@ var nt = { class: "hidden" }, rt = ["aria-label", "title"], it = ["aria-label"],
1172
1172
  "error"
1173
1173
  ],
1174
1174
  setup(t, { expose: n, emit: r }) {
1175
- let i = t, a = r, c = ae(), u = s(), d = i.id ?? `m3-route-${ie()}`, { onReady: f, styleVersion: p } = pe(), m = l([
1175
+ let i = t, a = r, c = se(), u = s(), d = i.id ?? `m3-route-${oe()}`, { onReady: f, styleVersion: p } = me(), m = l([
1176
1176
  "primary",
1177
1177
  "outline",
1178
1178
  "surface"
1179
- ]), h = q(null), g = E(() => i.path && i.path.length > 1 ? i.path : h.value && h.value.length > 1 ? h.value : i.stops.map((e) => e.lngLat)), _ = E(() => JSON.stringify(g.value)), v = E(() => qe(g.value)), y = E(() => v.value[v.value.length - 1] ?? 0), b = E(() => {
1179
+ ]), h = K(null), g = E(() => i.path && i.path.length > 1 ? i.path : h.value && h.value.length > 1 ? h.value : i.stops.map((e) => e.lngLat)), _ = E(() => JSON.stringify(g.value)), v = E(() => qe(g.value)), y = E(() => v.value[v.value.length - 1] ?? 0), b = E(() => {
1180
1180
  let e = 0;
1181
1181
  return i.stops.map((t) => e = et(g.value, v.value, t.lngLat, e, 0));
1182
1182
  }), x = null;
@@ -1187,8 +1187,8 @@ var nt = { class: "hidden" }, rt = ["aria-label", "title"], it = ["aria-label"],
1187
1187
  }
1188
1188
  return x = null, i.progress != null && Number.isFinite(i.progress) ? Math.min(Math.max(i.progress, 0), 1) * y.value : null;
1189
1189
  }
1190
- let w = G(S());
1191
- Z([
1190
+ let w = W(S());
1191
+ Y([
1192
1192
  () => i.vehicle?.join(","),
1193
1193
  () => i.progress,
1194
1194
  () => i.snap
@@ -1208,17 +1208,17 @@ var nt = { class: "hidden" }, rt = ["aria-label", "title"], it = ["aria-label"],
1208
1208
  e.signal.aborted || (h.value = null, a("error", t));
1209
1209
  }
1210
1210
  }
1211
- B(O), Z([
1211
+ B(O), Y([
1212
1212
  () => JSON.stringify(i.stops.map((e) => e.lngLat)),
1213
1213
  () => i.provider,
1214
1214
  () => !!(i.path && i.path.length > 1)
1215
1215
  ], () => O());
1216
- let P = 0, F = G(0), I = G(0), L = 0, R = (e) => i.stops[e]?.done ?? (w.value != null && F.value >= b.value[e] - 1), ee = E(() => i.color ?? m.value.primary), V, U, W = G(), Y = [
1216
+ let P = 0, F = W(0), I = W(0), L = 0, R = 0, ee = (e) => i.stops[e]?.done ?? (w.value != null && F.value >= b.value[e] - 1), re = E(() => i.color ?? m.value.primary), H, U, ae = W(), X = [
1217
1217
  `${d}-rest`,
1218
1218
  `${d}-casing`,
1219
1219
  `${d}-done`
1220
1220
  ];
1221
- function oe(e) {
1221
+ function ce(e) {
1222
1222
  let t = (e, t) => ({
1223
1223
  type: "Feature",
1224
1224
  properties: { part: t },
@@ -1232,14 +1232,14 @@ var nt = { class: "hidden" }, rt = ["aria-label", "title"], it = ["aria-label"],
1232
1232
  features: [t(g.value, "rest"), t(Qe(g.value, v.value, 0, e), "done")]
1233
1233
  };
1234
1234
  }
1235
- function se() {
1235
+ function le() {
1236
1236
  let e = i.width, t = {
1237
1237
  "line-cap": "round",
1238
1238
  "line-join": "round"
1239
1239
  };
1240
1240
  return [
1241
1241
  {
1242
- id: Y[0],
1242
+ id: X[0],
1243
1243
  type: "line",
1244
1244
  source: d,
1245
1245
  filter: [
@@ -1254,11 +1254,11 @@ var nt = { class: "hidden" }, rt = ["aria-label", "title"], it = ["aria-label"],
1254
1254
  paint: {
1255
1255
  "line-color": m.value.outline,
1256
1256
  "line-width": e * .8,
1257
- "line-dasharray": me(Math.max(_e, 0))
1257
+ "line-dasharray": ye(Math.max(Q, 0))
1258
1258
  }
1259
1259
  },
1260
1260
  {
1261
- id: Y[1],
1261
+ id: X[1],
1262
1262
  type: "line",
1263
1263
  source: d,
1264
1264
  filter: [
@@ -1273,7 +1273,7 @@ var nt = { class: "hidden" }, rt = ["aria-label", "title"], it = ["aria-label"],
1273
1273
  }
1274
1274
  },
1275
1275
  {
1276
- id: Y[2],
1276
+ id: X[2],
1277
1277
  type: "line",
1278
1278
  source: d,
1279
1279
  filter: [
@@ -1283,161 +1283,177 @@ var nt = { class: "hidden" }, rt = ["aria-label", "title"], it = ["aria-label"],
1283
1283
  ],
1284
1284
  layout: t,
1285
1285
  paint: {
1286
- "line-color": ee.value,
1286
+ "line-color": re.value,
1287
1287
  "line-width": e
1288
1288
  }
1289
1289
  }
1290
1290
  ];
1291
1291
  }
1292
- function ce() {
1293
- if (V) {
1294
- V.getSource(d) || V.addSource(d, {
1292
+ function ue() {
1293
+ if (H) {
1294
+ H.getSource(d) || H.addSource(d, {
1295
1295
  type: "geojson",
1296
- data: oe(P),
1296
+ data: ce(P),
1297
1297
  tolerance: 0
1298
1298
  });
1299
- for (let e of se()) V.getLayer(e.id) && V.removeLayer(e.id), V.addLayer(e, i.before && V.getLayer(i.before) ? i.before : void 0);
1299
+ for (let e of le()) H.getLayer(e.id) && H.removeLayer(e.id), H.addLayer(e, i.before && H.getLayer(i.before) ? i.before : void 0);
1300
1300
  }
1301
1301
  }
1302
- function le(e) {
1302
+ let de = -1, fe = null;
1303
+ function pe(e, t, n) {
1304
+ if (n || !H || de < 0 || !fe) return e !== de || de < 0;
1305
+ let r = H.project(t), i = H.project(fe);
1306
+ return Math.hypot(r.x - i.x, r.y - i.y) >= 2;
1307
+ }
1308
+ function he(e, t = !0) {
1303
1309
  P = e;
1304
- let { lngLat: t } = Xe(g.value, v.value, e), n = Ce(e);
1305
- (V?.getSource(d))?.setData(oe(e)), U?.setLngLat(t), $.value && U?.setRotation(n), I.value = n, n > 200 && n < 340 ? de.value = !0 : n > 20 && n < 160 && (de.value = !1), i.follow && V?.jumpTo({ center: t }), ue(e) !== ue(F.value) && (F.value = e);
1310
+ let { lngLat: n } = Xe(g.value, v.value, e), r = Ee(e);
1311
+ if (pe(e, n, t)) {
1312
+ let t = H?.getSource(d);
1313
+ t && (t.setData(ce(e)), de = e, fe = n);
1314
+ }
1315
+ U?.setLngLat(n), De.value && U?.setRotation(r), L = r, c.vehicle && (I.value = r), r > 200 && r < 340 ? _e.value = !0 : r > 20 && r < 160 && (_e.value = !1), i.follow && H?.jumpTo({ center: n }), ge(e) !== ge(F.value) && (F.value = e);
1306
1316
  }
1307
- let ue = (e) => b.value.filter((t) => e >= t - 1).length, de = G(!1), fe = 1.6;
1308
- function me(e) {
1317
+ let ge = (e) => b.value.filter((t) => e >= t - 1).length, _e = W(!1), ve = 1.6;
1318
+ function ye(e) {
1309
1319
  let t = 2.6, n = e / 16 * t;
1310
- return n <= fe ? [
1320
+ return n <= ve ? [
1311
1321
  0,
1312
1322
  n,
1313
1323
  1,
1314
- fe - n
1324
+ ve - n
1315
1325
  ] : [
1316
- n - fe,
1317
- fe,
1326
+ n - ve,
1327
+ ve,
1318
1328
  t - n,
1319
1329
  0
1320
1330
  ];
1321
1331
  }
1322
- let he = 0, ge = 0, _e = -1;
1323
- function ve(e) {
1324
- let t = 2.6 * i.width * .8, n = Math.floor((e - ge) / 1e3 * 16 / t * 16) % 16;
1325
- n !== _e && V?.getLayer(Y[0]) && (_e = n, V.setPaintProperty(Y[0], "line-dasharray", me(n))), he = requestAnimationFrame(ve);
1332
+ let be = 0, xe = 0, Q = -1;
1333
+ function Se(e) {
1334
+ let t = 2.6 * i.width * .8, n = Math.floor((e - xe) / 1e3 * 16 / t * 16) % 16;
1335
+ n !== Q && H?.getLayer(X[0]) && (Q = n, H.setPaintProperty(X[0], "line-dasharray", ye(n))), be = requestAnimationFrame(Se);
1326
1336
  }
1327
- let ye = !0, be;
1328
- function xe() {
1329
- !be && V && typeof IntersectionObserver < "u" && (be = new IntersectionObserver(([e]) => {
1337
+ let Ce = !0, $;
1338
+ function we() {
1339
+ !$ && H && typeof IntersectionObserver < "u" && ($ = new IntersectionObserver(([e]) => {
1330
1340
  let t = !!e?.isIntersecting;
1331
- t !== ye && (ye = t, Se());
1332
- }), be.observe(V.getContainer()));
1341
+ t !== Ce && (Ce = t, Te());
1342
+ }), $.observe(H.getContainer()));
1333
1343
  }
1334
- function Se() {
1335
- cancelAnimationFrame(he), _e = -1, xe(), (ye || !i.flow) && (i.flow && V && !o() ? (ge = performance.now(), he = requestAnimationFrame(ve)) : V?.getLayer(Y[0]) && V.setPaintProperty(Y[0], "line-dasharray", me(0)));
1344
+ function Te() {
1345
+ cancelAnimationFrame(be), Q = -1, we(), (Ce || !i.flow) && (i.flow && H && !o() ? (xe = performance.now(), be = requestAnimationFrame(Se)) : H?.getLayer(X[0]) && H.setPaintProperty(X[0], "line-dasharray", ye(0)));
1336
1346
  }
1337
- function Ce(e) {
1347
+ function Ee(e) {
1338
1348
  let t = Xe(g.value, v.value, Math.max(e - 10, 0)).lngLat, n = Xe(g.value, v.value, Math.min(e + 25, y.value)).lngLat;
1339
1349
  return t[0] === n[0] && t[1] === n[1] ? Xe(g.value, v.value, e).bearing : Je(t, n);
1340
1350
  }
1341
- let $ = E(() => i.rotateVehicle ?? (i.vehicleIcon === "navigation" && !c.vehicle));
1342
- function we(e) {
1343
- cancelAnimationFrame(L);
1344
- let t = P, n = o() ? 0 : i.duration;
1351
+ let De = E(() => i.rotateVehicle ?? (i.vehicleIcon === "navigation" && !c.vehicle)), Oe = 0, ke = 0;
1352
+ function Ae() {
1353
+ if (o()) return 0;
1354
+ if (i.duration !== "auto") return i.duration;
1355
+ let e = performance.now(), t = e - Oe;
1356
+ return Oe && t <= 5e3 && (ke = ke ? (ke + Math.max(t, 100)) / 2 : Math.max(t, 100)), Oe = e, ke || 1e3;
1357
+ }
1358
+ function je(e) {
1359
+ cancelAnimationFrame(R);
1360
+ let t = P, n = Ae();
1345
1361
  if (n <= 0 || t === e) {
1346
- le(e), F.value = e, Ee();
1362
+ he(e), F.value = e, Pe();
1347
1363
  return;
1348
1364
  }
1349
- let r = performance.now(), a = (i) => {
1350
- let o = Math.min(1, (i - r) / n);
1351
- le(t + (e - t) * o), o < 1 ? L = requestAnimationFrame(a) : (F.value = e, Ee());
1365
+ let r = performance.now(), i = (a) => {
1366
+ let o = Math.min(1, (a - r) / n);
1367
+ he(t + (e - t) * o, o >= 1), o < 1 ? R = requestAnimationFrame(i) : (F.value = e, Pe());
1352
1368
  };
1353
- L = requestAnimationFrame(a);
1369
+ R = requestAnimationFrame(i);
1354
1370
  }
1355
- let Te = !1;
1356
- function Ee() {
1371
+ let Ne = !1;
1372
+ function Pe() {
1357
1373
  let e = y.value > 0 && P >= y.value - 1;
1358
- e && !Te && a("arrive"), Te = e;
1374
+ e && !Ne && a("arrive"), Ne = e;
1359
1375
  }
1360
- function De() {
1361
- !V || g.value.length < 2 || V.fitBounds(tt(g.value), {
1376
+ function Fe() {
1377
+ !H || g.value.length < 2 || H.fitBounds(tt(g.value), {
1362
1378
  padding: i.padding,
1363
1379
  duration: o() ? 0 : 600
1364
1380
  });
1365
1381
  }
1366
- let Oe = E(() => i.showVehicle && w.value != null);
1382
+ let Ie = E(() => i.showVehicle && w.value != null);
1367
1383
  f((e, t) => {
1368
- V = e, P = w.value ?? 0, F.value = P, ce(), W.value && (U = new t.Marker({
1369
- element: W.value,
1370
- rotationAlignment: $.value ? "map" : "viewport",
1384
+ H = e, P = w.value ?? 0, F.value = P, ue(), ae.value && (U = new t.Marker({
1385
+ element: ae.value,
1386
+ rotationAlignment: De.value ? "map" : "viewport",
1371
1387
  subpixelPositioning: !0
1372
- }), Oe.value && U.setLngLat(Xe(g.value, v.value, P).lngLat).addTo(e)), le(P), Te = y.value > 0 && P >= y.value - 1, i.fit && De(), Se();
1373
- }), Z(() => i.flow, Se), Z(p, () => ce()), Z($, (e) => {
1374
- U?.setRotationAlignment(e ? "map" : "viewport"), U?.setRotation(e ? I.value : 0);
1375
- }), Z(w, (e) => {
1376
- e != null && V && we(e);
1377
- }), Z(Oe, (e) => {
1378
- V && U && (e ? U.setLngLat(Xe(g.value, v.value, P).lngLat).addTo(V) : U.remove());
1379
- }), Z(_, () => {
1380
- x = null, w.value = S(), V && (P = Math.min(w.value ?? 0, y.value), F.value = P, le(P), i.fit && De());
1381
- }), Z(() => [
1382
- ee.value,
1388
+ }), Ie.value && U.setLngLat(Xe(g.value, v.value, P).lngLat).addTo(e)), he(P), Ne = y.value > 0 && P >= y.value - 1, i.fit && Fe(), Te();
1389
+ }), Y(() => i.flow, Te), Y(p, () => ue()), Y(De, (e) => {
1390
+ U?.setRotationAlignment(e ? "map" : "viewport"), U?.setRotation(e ? L : 0);
1391
+ }), Y(w, (e) => {
1392
+ e == null ? Oe = ke = 0 : H && je(e);
1393
+ }), Y(Ie, (e) => {
1394
+ H && U && (e ? U.setLngLat(Xe(g.value, v.value, P).lngLat).addTo(H) : U.remove());
1395
+ }), Y(_, () => {
1396
+ x = null, de = -1, w.value = S(), H && (P = Math.min(w.value ?? 0, y.value), F.value = P, he(P), i.fit && Fe());
1397
+ }), Y(() => [
1398
+ re.value,
1383
1399
  m.value.outline,
1384
1400
  m.value.surface,
1385
1401
  i.width,
1386
1402
  i.before
1387
- ], () => ce()), ne(() => {
1388
- if (T?.abort(), cancelAnimationFrame(he), be?.disconnect(), cancelAnimationFrame(L), U?.remove(), V) {
1389
- for (let e of Y) V.getLayer(e) && V.removeLayer(e);
1390
- V.getSource(d) && V.removeSource(d);
1403
+ ], () => ue()), ne(() => {
1404
+ if (T?.abort(), cancelAnimationFrame(be), $?.disconnect(), cancelAnimationFrame(R), U?.remove(), H) {
1405
+ for (let e of X) H.getLayer(e) && H.removeLayer(e);
1406
+ H.getSource(d) && H.removeSource(d);
1391
1407
  }
1392
- V = void 0;
1408
+ H = void 0;
1393
1409
  });
1394
- let ke = (e, t) => e.icon ?? (t === i.stops.length - 1 ? "flag" : t === 0 ? "trip_origin" : void 0), Ae = (e, t) => e.label ?? `${u.mapRouteStop} ${t + 1}`;
1410
+ let Le = (e, t) => e.icon ?? (t === i.stops.length - 1 ? "flag" : t === 0 ? "trip_origin" : void 0), Re = (e, t) => e.label ?? `${u.mapRouteStop} ${t + 1}`;
1395
1411
  return n({
1396
- fit: De,
1412
+ fit: Fe,
1397
1413
  length: y,
1398
1414
  travelled: F,
1399
1415
  sourceId: d
1400
- }), (n, r) => (H(), k("div", nt, [(H(!0), k(C, null, re(t.stops, (r, i) => (H(), D(Me, {
1416
+ }), (n, r) => (V(), k("div", nt, [(V(!0), k(C, null, ie(t.stops, (r, i) => (V(), D(Me, {
1401
1417
  key: i,
1402
1418
  "lng-lat": r.lngLat,
1403
1419
  onClick: (e) => a("stop-click", r, i)
1404
1420
  }, j({
1405
- default: Q(() => [K(n.$slots, "stop", {
1421
+ default: Z(() => [G(n.$slots, "stop", {
1406
1422
  stop: r,
1407
1423
  index: i,
1408
- done: R(i)
1424
+ done: ee(i)
1409
1425
  }, () => [A("span", {
1410
1426
  role: "img",
1411
- "aria-label": Ae(r, i),
1412
- title: Ae(r, i),
1413
- class: z(["m3-map-route-stop flex h-7 w-7 items-center justify-center rounded-full border-2 text-label-medium font-medium shadow-elevation-1 transition-colors duration-300", R(i) ? "border-transparent bg-primary text-on-primary" : "border-primary bg-surface text-primary"]),
1414
- style: te(t.color ? R(i) ? { background: t.color } : {
1427
+ "aria-label": Re(r, i),
1428
+ title: Re(r, i),
1429
+ class: z(["m3-map-route-stop flex h-7 w-7 items-center justify-center rounded-full border-2 text-label-medium font-medium shadow-elevation-1 transition-colors duration-300", ee(i) ? "border-transparent bg-primary text-on-primary" : "border-primary bg-surface text-primary"]),
1430
+ style: te(t.color ? ee(i) ? { background: t.color } : {
1415
1431
  borderColor: t.color,
1416
1432
  color: t.color
1417
1433
  } : void 0)
1418
- }, [ke(r, i) ? (H(), D(e, {
1434
+ }, [Le(r, i) ? (V(), D(e, {
1419
1435
  key: 0,
1420
- name: ke(r, i),
1436
+ name: Le(r, i),
1421
1437
  size: 16
1422
- }, null, 8, ["name"])) : (H(), k(C, { key: 1 }, [M(J(i), 1)], 64))], 14, rt)])]),
1438
+ }, null, 8, ["name"])) : (V(), k(C, { key: 1 }, [M(q(i), 1)], 64))], 14, rt)])]),
1423
1439
  _: 2
1424
1440
  }, [n.$slots["stop-popup"] ? {
1425
1441
  name: "popup",
1426
- fn: Q(() => [K(n.$slots, "stop-popup", {
1442
+ fn: Z(() => [G(n.$slots, "stop-popup", {
1427
1443
  stop: r,
1428
1444
  index: i,
1429
- done: R(i)
1445
+ done: ee(i)
1430
1446
  })]),
1431
1447
  key: "0"
1432
1448
  } : void 0]), 1032, ["lng-lat", "onClick"]))), 128)), A("div", {
1433
1449
  ref_key: "vehicleEl",
1434
- ref: W,
1450
+ ref: ae,
1435
1451
  class: "m3-map-route-vehicle",
1436
- "aria-label": X(u).mapRouteVehicle,
1452
+ "aria-label": J(u).mapRouteVehicle,
1437
1453
  role: "img"
1438
- }, [K(n.$slots, "vehicle", {
1454
+ }, [A("div", at, [G(n.$slots, "vehicle", {
1439
1455
  bearing: I.value,
1440
- west: de.value
1456
+ west: _e.value
1441
1457
  }, () => [A("span", {
1442
1458
  class: "flex h-10 w-10 items-center justify-center rounded-full border-2 border-surface bg-primary text-on-primary shadow-elevation-2",
1443
1459
  style: te(t.color ? { background: t.color } : void 0)
@@ -1445,16 +1461,16 @@ var nt = { class: "hidden" }, rt = ["aria-label", "title"], it = ["aria-label"],
1445
1461
  name: t.vehicleIcon,
1446
1462
  size: 22,
1447
1463
  filled: t.vehicleIcon === "navigation",
1448
- style: te(!$.value && de.value ? { transform: "scaleX(-1)" } : void 0)
1464
+ style: te(!De.value && _e.value ? { transform: "scaleX(-1)" } : void 0)
1449
1465
  }, null, 8, [
1450
1466
  "name",
1451
1467
  "filled",
1452
1468
  "style"
1453
- ])], 4)])], 8, it)]));
1469
+ ])], 4)])])], 8, it)]));
1454
1470
  }
1455
1471
  });
1456
1472
  // src/composables/mapRouting.ts
1457
- function ot(e = {}) {
1473
+ function st(e = {}) {
1458
1474
  let t = (e.url ?? "https://router.project-osrm.org").replace(/\/$/, ""), n = e.profile ?? "driving";
1459
1475
  return async (r, { signal: i }) => {
1460
1476
  if (r.length < 2) return {
@@ -1478,19 +1494,19 @@ function ot(e = {}) {
1478
1494
  };
1479
1495
  }
1480
1496
  // src/components/_MMapLayerItem.vue?vue&type=script&setup=true&lang.ts
1481
- var st = { class: "flex min-w-0 flex-1 flex-col" }, ct = ["aria-label", "aria-pressed"], lt = { class: "flex min-w-0 flex-1 flex-col" }, ut = {
1497
+ var ct = { class: "flex min-w-0 flex-1 flex-col" }, lt = ["aria-label", "aria-pressed"], ut = { class: "flex min-w-0 flex-1 flex-col" }, dt = {
1482
1498
  key: 0,
1483
1499
  class: "truncate text-label-small text-on-surface-variant"
1484
- }, dt = {
1500
+ }, ft = {
1485
1501
  key: 0,
1486
1502
  class: "rounded-full bg-primary/8 px-2 py-0.5 text-label-small tabular-nums text-primary"
1487
- }, ft = { class: "min-h-0 overflow-hidden" }, pt = { class: "flex flex-col gap-3 px-3 pb-3" }, mt = {
1503
+ }, pt = { class: "min-h-0 overflow-hidden" }, mt = { class: "flex flex-col gap-3 px-3 pb-3" }, ht = {
1488
1504
  key: 0,
1489
1505
  class: "text-body-small text-on-surface-variant"
1490
- }, ht = { class: "flex items-center gap-2 rounded-2xl bg-surface-container-highest/60 px-3 py-1" }, gt = ["src"], _t = {
1506
+ }, gt = { class: "flex items-center gap-2 rounded-2xl bg-surface-container-highest/60 px-3 py-1" }, _t = ["src"], vt = {
1491
1507
  key: 2,
1492
1508
  class: "flex flex-wrap items-center gap-2"
1493
- }, vt = ["href"], yt = /* @__PURE__ */ P({
1509
+ }, yt = ["href"], bt = /* @__PURE__ */ P({
1494
1510
  __name: "_MMapLayerItem",
1495
1511
  props: {
1496
1512
  layer: {},
@@ -1499,22 +1515,22 @@ var st = { class: "flex min-w-0 flex-1 flex-col" }, ct = ["aria-label", "aria-pr
1499
1515
  emits: ["toggle-expanded"],
1500
1516
  setup(t, { emit: n }) {
1501
1517
  let r = n, i = s(), { isVisible: a, toggle: o, opacityOf: c, setOpacity: l } = Ce();
1502
- return (n, s) => (H(), k("div", { class: z(["flex overflow-hidden rounded-2xl bg-surface-container", X(a)(t.layer.id) ? "" : "opacity-75"]) }, [A("div", { class: z(["w-1 shrink-0 transition-colors duration-200", X(a)(t.layer.id) ? "bg-primary" : "bg-outline-variant"]) }, null, 2), A("div", st, [A("div", {
1518
+ return (n, s) => (V(), k("div", { class: z(["flex overflow-hidden rounded-2xl bg-surface-container", J(a)(t.layer.id) ? "" : "opacity-75"]) }, [A("div", { class: z(["w-1 shrink-0 transition-colors duration-200", J(a)(t.layer.id) ? "bg-primary" : "bg-outline-variant"]) }, null, 2), A("div", ct, [A("div", {
1503
1519
  class: "flex cursor-pointer items-center gap-2 px-3 py-2",
1504
1520
  onClick: s[1] ||= (e) => r("toggle-expanded")
1505
1521
  }, [
1506
1522
  A("button", {
1507
1523
  type: "button",
1508
- class: z(["grid size-8 shrink-0 cursor-pointer place-items-center rounded-full transition-colors duration-200", X(a)(t.layer.id) ? "bg-primary/12 text-primary" : "bg-on-surface/5 text-on-surface-variant"]),
1509
- "aria-label": X(a)(t.layer.id) ? X(i).mapHideLayer : X(i).mapShowLayer,
1510
- "aria-pressed": X(a)(t.layer.id),
1511
- onClick: s[0] ||= se((e) => X(o)(t.layer.id), ["stop"])
1524
+ class: z(["grid size-8 shrink-0 cursor-pointer place-items-center rounded-full transition-colors duration-200", J(a)(t.layer.id) ? "bg-primary/12 text-primary" : "bg-on-surface/5 text-on-surface-variant"]),
1525
+ "aria-label": J(a)(t.layer.id) ? J(i).mapHideLayer : J(i).mapShowLayer,
1526
+ "aria-pressed": J(a)(t.layer.id),
1527
+ onClick: s[0] ||= ce((e) => J(o)(t.layer.id), ["stop"])
1512
1528
  }, [N(e, {
1513
- name: X(a)(t.layer.id) ? "visibility" : "visibility_off",
1529
+ name: J(a)(t.layer.id) ? "visibility" : "visibility_off",
1514
1530
  size: 18
1515
- }, null, 8, ["name"])], 10, ct),
1516
- A("div", lt, [A("span", { class: z(["truncate text-body-medium", X(a)(t.layer.id) ? "text-on-surface" : "text-on-surface-variant"]) }, J(t.layer.title), 3), t.layer.description && !t.expanded ? (H(), k("span", ut, J(t.layer.description), 1)) : O("", !0)]),
1517
- X(a)(t.layer.id) && X(c)(t.layer.id) < 1 ? (H(), k("span", dt, J(Math.round(X(c)(t.layer.id) * 100)) + "% ", 1)) : O("", !0),
1531
+ }, null, 8, ["name"])], 10, lt),
1532
+ A("div", ut, [A("span", { class: z(["truncate text-body-medium", J(a)(t.layer.id) ? "text-on-surface" : "text-on-surface-variant"]) }, q(t.layer.title), 3), t.layer.description && !t.expanded ? (V(), k("span", dt, q(t.layer.description), 1)) : O("", !0)]),
1533
+ J(a)(t.layer.id) && J(c)(t.layer.id) < 1 ? (V(), k("span", ft, q(Math.round(J(c)(t.layer.id) * 100)) + "% ", 1)) : O("", !0),
1518
1534
  N(e, {
1519
1535
  name: "expand_more",
1520
1536
  size: 18,
@@ -1523,29 +1539,29 @@ var st = { class: "flex min-w-0 flex-1 flex-col" }, ct = ["aria-label", "aria-pr
1523
1539
  ]), A("div", {
1524
1540
  class: "grid transition-[grid-template-rows] duration-300 ease-[cubic-bezier(0.2,0,0,1)]",
1525
1541
  style: te({ gridTemplateRows: t.expanded ? "1fr" : "0fr" })
1526
- }, [A("div", ft, [A("div", pt, [
1527
- t.layer.description ? (H(), k("p", mt, J(t.layer.description), 1)) : O("", !0),
1528
- A("div", ht, [N(e, {
1542
+ }, [A("div", pt, [A("div", mt, [
1543
+ t.layer.description ? (V(), k("p", ht, q(t.layer.description), 1)) : O("", !0),
1544
+ A("div", gt, [N(e, {
1529
1545
  name: "opacity",
1530
1546
  size: 16,
1531
1547
  class: "shrink-0 text-on-surface-variant"
1532
1548
  }), N(d, {
1533
- "model-value": X(c)(t.layer.id),
1549
+ "model-value": J(c)(t.layer.id),
1534
1550
  min: 0,
1535
1551
  max: 1,
1536
1552
  step: .01,
1537
- label: X(i).mapOpacity,
1553
+ label: J(i).mapOpacity,
1538
1554
  class: "flex-1",
1539
- "onUpdate:modelValue": s[2] ||= (e) => X(l)(t.layer.id, Number(e))
1555
+ "onUpdate:modelValue": s[2] ||= (e) => J(l)(t.layer.id, Number(e))
1540
1556
  }, null, 8, ["model-value", "label"])]),
1541
- t.layer.legend ? (H(), k("img", {
1557
+ t.layer.legend ? (V(), k("img", {
1542
1558
  key: 1,
1543
1559
  src: t.layer.legend,
1544
1560
  alt: "",
1545
1561
  class: "max-w-full self-start",
1546
1562
  loading: "lazy"
1547
- }, null, 8, gt)) : O("", !0),
1548
- t.layer.download || n.$slots.actions ? (H(), k("div", _t, [t.layer.download ? (H(), k("a", {
1563
+ }, null, 8, _t)) : O("", !0),
1564
+ t.layer.download || n.$slots.actions ? (V(), k("div", vt, [t.layer.download ? (V(), k("a", {
1549
1565
  key: 0,
1550
1566
  href: t.layer.download,
1551
1567
  target: "_blank",
@@ -1555,23 +1571,23 @@ var st = { class: "flex min-w-0 flex-1 flex-col" }, ct = ["aria-label", "aria-pr
1555
1571
  }, [N(e, {
1556
1572
  name: "download",
1557
1573
  size: 18
1558
- }), M(" " + J(X(i).mapDownload), 1)], 8, vt)) : O("", !0), K(n.$slots, "actions", {
1574
+ }), M(" " + q(J(i).mapDownload), 1)], 8, yt)) : O("", !0), G(n.$slots, "actions", {
1559
1575
  layer: t.layer,
1560
- visible: X(a)(t.layer.id)
1576
+ visible: J(a)(t.layer.id)
1561
1577
  })])) : O("", !0)
1562
1578
  ])])], 4)])], 2));
1563
1579
  }
1564
- }), bt = { class: "flex flex-col gap-3" }, xt = ["onClick"], St = [
1580
+ }), xt = { class: "flex flex-col gap-3" }, St = ["onClick"], Ct = [
1565
1581
  "aria-label",
1566
1582
  "aria-pressed",
1567
1583
  "onClick"
1568
- ], Ct = { class: "flex-1 select-none truncate text-label-large text-on-surface" }, wt = { class: "rounded-full bg-surface-container-highest px-2 py-0.5 text-label-small tabular-nums text-on-surface-variant" }, Tt = {
1584
+ ], wt = { class: "flex-1 select-none truncate text-label-large text-on-surface" }, Tt = { class: "rounded-full bg-surface-container-highest px-2 py-0.5 text-label-small tabular-nums text-on-surface-variant" }, Et = {
1569
1585
  key: 1,
1570
1586
  class: "flex flex-col gap-1.5"
1571
- }, Et = {
1587
+ }, Dt = {
1572
1588
  key: 2,
1573
1589
  class: "flex flex-col items-center gap-3 py-8"
1574
- }, Dt = { class: "grid size-14 place-items-center rounded-full bg-surface-container-highest" }, Ot = { class: "text-body-medium text-on-surface-variant" }, kt = /* @__PURE__ */ P({
1590
+ }, Ot = { class: "grid size-14 place-items-center rounded-full bg-surface-container-highest" }, kt = { class: "text-body-medium text-on-surface-variant" }, At = /* @__PURE__ */ P({
1575
1591
  __name: "MMapLayers",
1576
1592
  props: {
1577
1593
  search: {
@@ -1585,32 +1601,32 @@ var st = { class: "flex min-w-0 flex-1 flex-col" }, ct = ["aria-label", "aria-pr
1585
1601
  map: {}
1586
1602
  },
1587
1603
  setup(t) {
1588
- let n = t, r = s(), { model: i, layersOf: a, isVisible: o, groupState: c, setGroupVisible: l } = Ce(() => n.map), d = G(""), f = (e) => !d.value || e.title.toLowerCase().includes(d.value.toLowerCase()), p = E(() => (i.value?.groups ?? []).map((e) => ({
1604
+ let n = t, r = s(), { model: i, layersOf: a, isVisible: o, groupState: c, setGroupVisible: l } = Ce(() => n.map), d = W(""), f = (e) => !d.value || e.title.toLowerCase().includes(d.value.toLowerCase()), p = E(() => (i.value?.groups ?? []).map((e) => ({
1589
1605
  ...e,
1590
1606
  all: a(e.name),
1591
1607
  layers: a(e.name).filter(f)
1592
- })).filter((e) => e.layers.length)), m = E(() => a(null).filter(f)), h = G(/* @__PURE__ */ new Set()), g = (e) => h.value.has(e) === n.collapsed;
1608
+ })).filter((e) => e.layers.length)), m = E(() => a(null).filter(f)), h = W(/* @__PURE__ */ new Set()), g = (e) => h.value.has(e) === n.collapsed;
1593
1609
  function _(e) {
1594
1610
  let t = new Set(h.value);
1595
1611
  t.delete(e) || t.add(e), h.value = t;
1596
1612
  }
1597
- let v = G(/* @__PURE__ */ new Set());
1613
+ let v = W(/* @__PURE__ */ new Set());
1598
1614
  function y(e) {
1599
1615
  let t = new Set(v.value);
1600
1616
  t.delete(e) || t.add(e), v.value = t;
1601
1617
  }
1602
1618
  let b = (e) => e.filter((e) => o(e.id)).length;
1603
- return (n, i) => (H(), k("div", bt, [
1604
- t.search ? (H(), D(u, {
1619
+ return (n, i) => (V(), k("div", xt, [
1620
+ t.search ? (V(), D(u, {
1605
1621
  key: 0,
1606
1622
  modelValue: d.value,
1607
1623
  "onUpdate:modelValue": i[0] ||= (e) => d.value = e,
1608
- label: X(r).mapSearchLayers,
1624
+ label: J(r).mapSearchLayers,
1609
1625
  "leading-icon": "search",
1610
1626
  variant: "outlined",
1611
1627
  clearable: ""
1612
1628
  }, null, 8, ["modelValue", "label"])) : O("", !0),
1613
- (H(!0), k(C, null, re(p.value, (t) => (H(), k("section", {
1629
+ (V(!0), k(C, null, ie(p.value, (t) => (V(), k("section", {
1614
1630
  key: t.name,
1615
1631
  class: "flex flex-col"
1616
1632
  }, [A("div", {
@@ -1619,64 +1635,64 @@ var st = { class: "flex min-w-0 flex-1 flex-col" }, ct = ["aria-label", "aria-pr
1619
1635
  }, [
1620
1636
  A("button", {
1621
1637
  type: "button",
1622
- class: z(["grid size-8 shrink-0 cursor-pointer place-items-center rounded-full transition-colors duration-200", X(c)(t.name) === "visible" ? "bg-primary-container text-on-primary-container" : X(c)(t.name) === "partial" ? "bg-secondary-container text-on-secondary-container" : "bg-on-surface/8 text-on-surface-variant"]),
1623
- "aria-label": X(c)(t.name) === "hidden" ? X(r).mapShowLayer : X(r).mapHideLayer,
1624
- "aria-pressed": X(c)(t.name) !== "hidden",
1625
- onClick: se((e) => X(l)(t.name, X(c)(t.name) !== "visible"), ["stop"])
1638
+ class: z(["grid size-8 shrink-0 cursor-pointer place-items-center rounded-full transition-colors duration-200", J(c)(t.name) === "visible" ? "bg-primary-container text-on-primary-container" : J(c)(t.name) === "partial" ? "bg-secondary-container text-on-secondary-container" : "bg-on-surface/8 text-on-surface-variant"]),
1639
+ "aria-label": J(c)(t.name) === "hidden" ? J(r).mapShowLayer : J(r).mapHideLayer,
1640
+ "aria-pressed": J(c)(t.name) !== "hidden",
1641
+ onClick: ce((e) => J(l)(t.name, J(c)(t.name) !== "visible"), ["stop"])
1626
1642
  }, [N(e, {
1627
- name: X(c)(t.name) === "hidden" ? "visibility_off" : "visibility",
1643
+ name: J(c)(t.name) === "hidden" ? "visibility_off" : "visibility",
1628
1644
  size: 18
1629
- }, null, 8, ["name"])], 10, St),
1630
- A("span", Ct, J(t.title), 1),
1631
- A("span", wt, J(b(t.all)) + "/" + J(t.all.length), 1),
1645
+ }, null, 8, ["name"])], 10, Ct),
1646
+ A("span", wt, q(t.title), 1),
1647
+ A("span", Tt, q(b(t.all)) + "/" + q(t.all.length), 1),
1632
1648
  N(e, {
1633
1649
  name: "expand_more",
1634
1650
  size: 18,
1635
1651
  class: z(["text-on-surface-variant transition-transform duration-300", g(t.name) ? "rotate-180" : ""])
1636
1652
  }, null, 8, ["class"])
1637
- ], 8, xt), A("div", {
1653
+ ], 8, St), A("div", {
1638
1654
  class: "grid transition-[grid-template-rows] duration-300 ease-[cubic-bezier(0.2,0,0,1)]",
1639
1655
  style: te({ gridTemplateRows: g(t.name) ? "1fr" : "0fr" })
1640
- }, [A("div", { class: z(["flex min-h-0 flex-col gap-1.5 overflow-hidden", g(t.name) ? "pt-1.5" : ""]) }, [(H(!0), k(C, null, re(t.layers, (e) => (H(), D(yt, {
1656
+ }, [A("div", { class: z(["flex min-h-0 flex-col gap-1.5 overflow-hidden", g(t.name) ? "pt-1.5" : ""]) }, [(V(!0), k(C, null, ie(t.layers, (e) => (V(), D(bt, {
1641
1657
  key: e.id,
1642
1658
  layer: e,
1643
1659
  expanded: v.value.has(e.id),
1644
1660
  onToggleExpanded: (t) => y(e.id)
1645
1661
  }, j({ _: 2 }, [n.$slots.actions ? {
1646
1662
  name: "actions",
1647
- fn: Q((e) => [K(n.$slots, "actions", R({ ref_for: !0 }, e))]),
1663
+ fn: Z((e) => [G(n.$slots, "actions", R({ ref_for: !0 }, e))]),
1648
1664
  key: "0"
1649
1665
  } : void 0]), 1032, [
1650
1666
  "layer",
1651
1667
  "expanded",
1652
1668
  "onToggleExpanded"
1653
1669
  ]))), 128))], 2)], 4)]))), 128)),
1654
- m.value.length ? (H(), k("div", Tt, [(H(!0), k(C, null, re(m.value, (e) => (H(), D(yt, {
1670
+ m.value.length ? (V(), k("div", Et, [(V(!0), k(C, null, ie(m.value, (e) => (V(), D(bt, {
1655
1671
  key: e.id,
1656
1672
  layer: e,
1657
1673
  expanded: v.value.has(e.id),
1658
1674
  onToggleExpanded: (t) => y(e.id)
1659
1675
  }, j({ _: 2 }, [n.$slots.actions ? {
1660
1676
  name: "actions",
1661
- fn: Q((e) => [K(n.$slots, "actions", R({ ref_for: !0 }, e))]),
1677
+ fn: Z((e) => [G(n.$slots, "actions", R({ ref_for: !0 }, e))]),
1662
1678
  key: "0"
1663
1679
  } : void 0]), 1032, [
1664
1680
  "layer",
1665
1681
  "expanded",
1666
1682
  "onToggleExpanded"
1667
1683
  ]))), 128))])) : O("", !0),
1668
- !p.value.length && !m.value.length ? (H(), k("div", Et, [A("div", Dt, [N(e, {
1684
+ !p.value.length && !m.value.length ? (V(), k("div", Dt, [A("div", Ot, [N(e, {
1669
1685
  name: "layers_clear",
1670
1686
  size: 28,
1671
1687
  class: "text-on-surface-variant"
1672
- })]), A("p", Ot, J(X(r).mapNoLayers), 1)])) : O("", !0)
1688
+ })]), A("p", kt, q(J(r).mapNoLayers), 1)])) : O("", !0)
1673
1689
  ]));
1674
1690
  }
1675
- }), At = [
1691
+ }), jt = [
1676
1692
  "aria-label",
1677
1693
  "aria-checked",
1678
1694
  "onClick"
1679
- ], jt = ["src"], Mt = ["aria-label", "aria-checked"], Nt = /* @__PURE__ */ P({
1695
+ ], Mt = ["src"], Nt = ["aria-label", "aria-checked"], Pt = /* @__PURE__ */ P({
1680
1696
  __name: "MMapBaseLayers",
1681
1697
  props: {
1682
1698
  imageBase: { default: "" },
@@ -1692,100 +1708,100 @@ var st = { class: "flex min-w-0 flex-1 flex-col" }, ct = ["aria-label", "aria-pr
1692
1708
  },
1693
1709
  setup(t) {
1694
1710
  let n = t, r = s(), { baseLayers: i, baseLayer: a, setBaseLayer: o } = Ce(() => n.map), c = (e, t) => /^(https?:|data:|\/\/)/.test(e) ? e : `${t}${e}`;
1695
- return (n, s) => (H(), k("div", {
1711
+ return (n, s) => (V(), k("div", {
1696
1712
  class: z(["flex gap-2", t.vertical ? "flex-col" : "flex-row flex-wrap"]),
1697
1713
  role: "radiogroup"
1698
- }, [(H(!0), k(C, null, re(X(i), (n) => (H(), D(f, {
1714
+ }, [(V(!0), k(C, null, ie(J(i), (n) => (V(), D(f, {
1699
1715
  key: n.id,
1700
1716
  text: n.title,
1701
1717
  placement: t.vertical ? "right" : "top"
1702
1718
  }, {
1703
- default: Q(() => [A("button", {
1719
+ default: Z(() => [A("button", {
1704
1720
  type: "button",
1705
1721
  role: "radio",
1706
- class: z(["m3-map-base grid size-12 shrink-0 cursor-pointer place-items-center overflow-hidden rounded-full border-2 bg-surface-variant transition-[border-color,transform] duration-150 hover:scale-110", X(a) === n.id ? "m3-map-base--active border-primary" : "border-transparent"]),
1722
+ class: z(["m3-map-base grid size-12 shrink-0 cursor-pointer place-items-center overflow-hidden rounded-full border-2 bg-surface-variant transition-[border-color,transform] duration-150 hover:scale-110", J(a) === n.id ? "m3-map-base--active border-primary" : "border-transparent"]),
1707
1723
  "aria-label": n.title,
1708
- "aria-checked": X(a) === n.id,
1709
- onClick: (e) => X(o)(n.id)
1710
- }, [n.base?.image ? (H(), k("img", {
1724
+ "aria-checked": J(a) === n.id,
1725
+ onClick: (e) => J(o)(n.id)
1726
+ }, [n.base?.image ? (V(), k("img", {
1711
1727
  key: 0,
1712
1728
  src: c(n.base.image, t.imageBase),
1713
1729
  alt: "",
1714
1730
  class: "size-full object-cover"
1715
- }, null, 8, jt)) : (H(), D(e, {
1731
+ }, null, 8, Mt)) : (V(), D(e, {
1716
1732
  key: 1,
1717
1733
  name: "map",
1718
1734
  size: 22,
1719
1735
  class: "text-on-surface-variant"
1720
- }))], 10, At)]),
1736
+ }))], 10, jt)]),
1721
1737
  _: 2
1722
- }, 1032, ["text", "placement"]))), 128)), t.none ? (H(), D(f, {
1738
+ }, 1032, ["text", "placement"]))), 128)), t.none ? (V(), D(f, {
1723
1739
  key: 0,
1724
- text: X(r).mapNoBaseLayer,
1740
+ text: J(r).mapNoBaseLayer,
1725
1741
  placement: t.vertical ? "right" : "top"
1726
1742
  }, {
1727
- default: Q(() => [A("button", {
1743
+ default: Z(() => [A("button", {
1728
1744
  type: "button",
1729
1745
  role: "radio",
1730
- class: z(["m3-map-base grid size-12 shrink-0 cursor-pointer place-items-center rounded-full border-2 bg-surface-variant transition-[border-color,transform] duration-150 hover:scale-110", X(a) === null ? "m3-map-base--active border-primary" : "border-transparent"]),
1731
- "aria-label": X(r).mapNoBaseLayer,
1732
- "aria-checked": X(a) === null,
1733
- onClick: s[0] ||= (e) => X(o)(null)
1746
+ class: z(["m3-map-base grid size-12 shrink-0 cursor-pointer place-items-center rounded-full border-2 bg-surface-variant transition-[border-color,transform] duration-150 hover:scale-110", J(a) === null ? "m3-map-base--active border-primary" : "border-transparent"]),
1747
+ "aria-label": J(r).mapNoBaseLayer,
1748
+ "aria-checked": J(a) === null,
1749
+ onClick: s[0] ||= (e) => J(o)(null)
1734
1750
  }, [N(e, {
1735
1751
  name: "layers_clear",
1736
1752
  size: 22,
1737
1753
  class: "text-on-surface-variant"
1738
- })], 10, Mt)]),
1754
+ })], 10, Nt)]),
1739
1755
  _: 1
1740
1756
  }, 8, ["text", "placement"])) : O("", !0)], 2));
1741
1757
  }
1742
- }), Pt = { class: "flex flex-col gap-2" }, Ft = { class: "flex items-center gap-2 bg-primary-container/40 px-4 py-2" }, It = { class: "text-label-large text-on-primary-container" }, Lt = { class: "flex flex-col px-4 py-1" }, Rt = { class: "text-label-small text-on-surface-variant" }, zt = { class: "text-body-medium text-on-surface" }, Bt = {
1758
+ }), Ft = { class: "flex flex-col gap-2" }, It = { class: "flex items-center gap-2 bg-primary-container/40 px-4 py-2" }, Lt = { class: "text-label-large text-on-primary-container" }, Rt = { class: "flex flex-col px-4 py-1" }, zt = { class: "text-label-small text-on-surface-variant" }, Bt = { class: "text-body-medium text-on-surface" }, Vt = {
1743
1759
  key: 0,
1744
1760
  class: "break-words"
1745
- }, Vt = {
1761
+ }, Ht = {
1746
1762
  key: 1,
1747
1763
  class: "text-body-small italic text-on-surface-variant"
1748
- }, Ht = /* @__PURE__ */ P({
1764
+ }, Ut = /* @__PURE__ */ P({
1749
1765
  __name: "MMapFeatureInfo",
1750
1766
  props: { results: {} },
1751
1767
  setup(t) {
1752
1768
  let n = s();
1753
- return (r, i) => (H(), k("div", Pt, [(H(!0), k(C, null, re(t.results, (t, i) => (H(), k("div", {
1769
+ return (r, i) => (V(), k("div", Ft, [(V(!0), k(C, null, ie(t.results, (t, i) => (V(), k("div", {
1754
1770
  key: i,
1755
1771
  class: "overflow-hidden rounded-2xl bg-surface-container"
1756
- }, [A("div", Ft, [N(e, {
1772
+ }, [A("div", It, [N(e, {
1757
1773
  name: "layers",
1758
1774
  size: 16,
1759
1775
  class: "text-on-primary-container"
1760
- }), A("span", It, J(t.layer.title), 1)]), A("dl", Lt, [(H(!0), k(C, null, re(t.fields, (e) => (H(), k("div", {
1776
+ }), A("span", Lt, q(t.layer.title), 1)]), A("dl", Rt, [(V(!0), k(C, null, ie(t.fields, (e) => (V(), k("div", {
1761
1777
  key: e.key,
1762
1778
  class: "flex flex-col gap-0.5 border-b border-outline-variant py-1.5 last:border-b-0"
1763
- }, [A("dt", Rt, J(e.label), 1), A("dd", zt, [K(r.$slots, "value", {
1779
+ }, [A("dt", zt, q(e.label), 1), A("dd", Bt, [G(r.$slots, "value", {
1764
1780
  field: e,
1765
1781
  result: t
1766
- }, () => [e.value ? (H(), k("span", Bt, J(e.value), 1)) : (H(), k("span", Vt, J(X(n).mapNoValue), 1))])])]))), 128))])]))), 128))]));
1782
+ }, () => [e.value ? (V(), k("span", Vt, q(e.value), 1)) : (V(), k("span", Ht, q(J(n).mapNoValue), 1))])])]))), 128))])]))), 128))]));
1767
1783
  }
1768
- }), Ut = (e) => e.metadata, Wt = /* @__PURE__ */ new Set([
1784
+ }), Wt = (e) => e.metadata, Gt = /* @__PURE__ */ new Set([
1769
1785
  "fill",
1770
1786
  "line",
1771
1787
  "circle",
1772
1788
  "symbol",
1773
1789
  "fill-extrusion",
1774
1790
  "heatmap"
1775
- ]), Gt = (e) => {
1776
- let t = e.layers.filter((e) => e.type !== "background"), n = (e) => e?.base === !0 || typeof e?.base == "object" && e.base !== null ? e : void 0, r = (e) => Array.isArray(e?.children) ? e.children : [], i = new Set(t.flatMap((e) => n(Ut(e)) ? r(Ut(e)) : []));
1791
+ ]), Kt = (e) => {
1792
+ let t = e.layers.filter((e) => e.type !== "background"), n = (e) => e?.base === !0 || typeof e?.base == "object" && e.base !== null ? e : void 0, r = (e) => Array.isArray(e?.children) ? e.children : [], i = new Set(t.flatMap((e) => n(Wt(e)) ? r(Wt(e)) : []));
1777
1793
  return {
1778
1794
  title: e.name,
1779
1795
  groups: [],
1780
1796
  layers: t.map((e) => {
1781
- let t = Ut(e), a = n(t);
1797
+ let t = Wt(e), a = n(t);
1782
1798
  return {
1783
1799
  id: e.id,
1784
1800
  title: t?.title ?? e.id,
1785
1801
  listed: !a && !i.has(e.id) && t?.listed !== !1,
1786
1802
  base: a ? { image: t.base.image ?? t.image } : void 0,
1787
1803
  children: r(t),
1788
- identify: Wt.has(e.type) && !a && !i.has(e.id) ? {
1804
+ identify: Gt.has(e.type) && !a && !i.has(e.id) ? {
1789
1805
  format: {},
1790
1806
  exclude: []
1791
1807
  } : !1,
@@ -1794,9 +1810,9 @@ var st = { class: "flex min-w-0 flex-1 flex-col" }, ct = ["aria-label", "aria-pr
1794
1810
  })
1795
1811
  };
1796
1812
  };
1797
- function Kt(e = {}) {
1813
+ function qt(e = {}) {
1798
1814
  let t = e.legend ?? ((e, t) => {
1799
- let n = Ut(e)?.legend;
1815
+ let n = Wt(e)?.legend;
1800
1816
  if (n?.show === !1) return;
1801
1817
  if (n?.wmslegend) return n.wmslegend;
1802
1818
  if (!t?.includes("/services/styles/")) return;
@@ -1812,7 +1828,7 @@ function Kt(e = {}) {
1812
1828
  title: e.alias ?? e.name
1813
1829
  })),
1814
1830
  layers: e.layers.filter((e) => e.type !== "background").map((e) => {
1815
- let r = Ut(e) ?? {}, i = { ...r.fields }, a = i.exclude ?? [];
1831
+ let r = Wt(e) ?? {}, i = { ...r.fields }, a = i.exclude ?? [];
1816
1832
  delete i.exclude;
1817
1833
  let o = {};
1818
1834
  for (let [e, t] of Object.entries(i)) o[e] = {
@@ -1849,10 +1865,10 @@ function Kt(e = {}) {
1849
1865
  };
1850
1866
  };
1851
1867
  }
1852
- function qt(e, t) {
1868
+ function Jt(e, t) {
1853
1869
  return t?.label ?? e.charAt(0).toUpperCase() + e.slice(1);
1854
1870
  }
1855
- function Jt(e, t) {
1871
+ function Yt(e, t) {
1856
1872
  if (e == null || String(e).trim() === "") return "";
1857
1873
  let n = String(e), r = typeof e == "number" ? e : Number(e);
1858
1874
  if (t?.mask && !Number.isNaN(r)) {
@@ -1865,23 +1881,23 @@ function Jt(e, t) {
1865
1881
  }
1866
1882
  return t?.prefix && (n = `${t.prefix} ${n}`), t?.suffix && (n = `${n} ${t.suffix}`), n;
1867
1883
  }
1868
- var Yt = /* @__PURE__ */ new Set([
1884
+ var Xt = /* @__PURE__ */ new Set([
1869
1885
  "coordinates",
1870
1886
  "mapCoordinates",
1871
1887
  "layerId",
1872
1888
  "__layerMetadata"
1873
1889
  ]);
1874
- function Xt(e, t, n) {
1890
+ function Zt(e, t, n) {
1875
1891
  let r = new Map((n?.layers ?? []).filter((t) => t.identify && e.getLayer(t.id)).map((e) => [e.id, e]));
1876
1892
  if (!r.size) return [];
1877
1893
  let i = [];
1878
1894
  for (let n of e.queryRenderedFeatures(t, { layers: [...r.keys()] })) {
1879
1895
  let e = r.get(n.layer.id);
1880
1896
  if (!e || !e.identify) continue;
1881
- let { format: t, exclude: a } = e.identify, o = Object.entries(n.properties ?? {}).filter(([e]) => !Yt.has(e) && !a.includes(e) && !t[e]?.hidden).map(([e, n]) => ({
1897
+ let { format: t, exclude: a } = e.identify, o = Object.entries(n.properties ?? {}).filter(([e]) => !Xt.has(e) && !a.includes(e) && !t[e]?.hidden).map(([e, n]) => ({
1882
1898
  key: e,
1883
- label: qt(e, t[e]),
1884
- value: Jt(n, t[e])
1899
+ label: Jt(e, t[e]),
1900
+ value: Yt(n, t[e])
1885
1901
  }));
1886
1902
  o.length && i.push({
1887
1903
  layer: e,
@@ -1892,7 +1908,7 @@ function Xt(e, t, n) {
1892
1908
  return i;
1893
1909
  }
1894
1910
  // src/components/MMapIdentify.vue?vue&type=script&setup=true&lang.ts
1895
- var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
1911
+ var Qt = { class: "hidden" }, $t = /* @__PURE__ */ P({
1896
1912
  inheritAttrs: !1,
1897
1913
  __name: "MMapIdentify",
1898
1914
  props: {
@@ -1911,16 +1927,16 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
1911
1927
  },
1912
1928
  emits: ["identify"],
1913
1929
  setup(e, { expose: t, emit: n }) {
1914
- let r = e, i = n, { on: a, onReady: o, activeTool: s } = pe(), { model: c } = Ce(), l = q([]), u = G([0, 0]), d = G(!1);
1930
+ let r = e, i = n, { on: a, onReady: o, activeTool: s } = me(), { model: c } = Ce(), l = K([]), u = W([0, 0]), d = W(!1);
1915
1931
  a("click", (e) => {
1916
1932
  if (!r.enabled || s.value) return;
1917
1933
  let t = e.target;
1918
- l.value = Xt(t, e.point, c.value), u.value = [e.lngLat.lng, e.lngLat.lat], d.value = l.value.length > 0, i("identify", l.value, u.value);
1934
+ l.value = Zt(t, e.point, c.value), u.value = [e.lngLat.lng, e.lngLat.lat], d.value = l.value.length > 0, i("identify", l.value, u.value);
1919
1935
  });
1920
1936
  function f() {
1921
1937
  d.value = !1;
1922
1938
  }
1923
- Z(() => r.enabled, (e) => {
1939
+ Y(() => r.enabled, (e) => {
1924
1940
  e || f();
1925
1941
  });
1926
1942
  let p, m = [], h = () => {
@@ -1937,26 +1953,26 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
1937
1953
  }
1938
1954
  return o((e) => {
1939
1955
  p = e, _();
1940
- }), Z(c, _), ne(() => {
1956
+ }), Y(c, _), ne(() => {
1941
1957
  m.forEach((e) => {
1942
1958
  p?.off("mouseenter", e, h), p?.off("mouseleave", e, g);
1943
1959
  });
1944
- }), t({ close: f }), (t, n) => (H(), k("div", Zt, [e.marker && d.value ? (H(), D(Me, {
1960
+ }), t({ close: f }), (t, n) => (V(), k("div", Qt, [e.marker && d.value ? (V(), D(Me, {
1945
1961
  key: 0,
1946
1962
  "lng-lat": u.value
1947
- }, null, 8, ["lng-lat"])) : O("", !0), e.popup && l.value.length ? (H(), D(Pe, {
1963
+ }, null, 8, ["lng-lat"])) : O("", !0), e.popup && l.value.length ? (V(), D(Pe, {
1948
1964
  key: 1,
1949
1965
  open: d.value,
1950
1966
  "onUpdate:open": n[0] ||= (e) => d.value = e,
1951
1967
  "lng-lat": u.value,
1952
1968
  "max-width": "360px",
1953
- offset: e.marker ? X(Ae) : void 0
1969
+ offset: e.marker ? J(Ae) : void 0
1954
1970
  }, {
1955
- default: Q(() => [A("div", R({ class: "max-h-80 overflow-y-auto" }, t.$attrs), [K(t.$slots, "default", {
1971
+ default: Z(() => [A("div", R({ class: "max-h-80 overflow-y-auto" }, t.$attrs), [G(t.$slots, "default", {
1956
1972
  results: l.value,
1957
1973
  lngLat: u.value,
1958
1974
  close: f
1959
- }, () => [N(Ht, { results: l.value }, null, 8, ["results"])])], 16)]),
1975
+ }, () => [N(Ut, { results: l.value }, null, 8, ["results"])])], 16)]),
1960
1976
  _: 3
1961
1977
  }, 8, [
1962
1978
  "open",
@@ -1964,11 +1980,11 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
1964
1980
  "offset"
1965
1981
  ])) : O("", !0)]));
1966
1982
  }
1967
- }), $t = { class: "hidden" }, en = [
1983
+ }), en = { class: "hidden" }, tn = [
1968
1984
  "title",
1969
1985
  "aria-label",
1970
1986
  "aria-pressed"
1971
- ], tn = { class: "-mx-4 -mt-3 mb-1 bg-primary-container px-3 py-1.5 text-label-medium text-on-primary-container" }, nn = { class: "flex flex-col" }, rn = { class: "text-label-small text-on-surface-variant" }, an = { class: "text-body-small text-on-surface" }, on = /* @__PURE__ */ P({
1987
+ ], nn = { class: "-mx-4 -mt-3 mb-1 bg-primary-container px-3 py-1.5 text-label-medium text-on-primary-container" }, rn = { class: "flex flex-col" }, an = { class: "text-label-small text-on-surface-variant" }, on = { class: "text-body-small text-on-surface" }, sn = /* @__PURE__ */ P({
1972
1988
  __name: "MMapHover",
1973
1989
  props: {
1974
1990
  modelValue: {
@@ -1982,7 +1998,7 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
1982
1998
  },
1983
1999
  emits: ["update:modelValue"],
1984
2000
  setup(t, { emit: n }) {
1985
- let r = t, i = n, a = s(), { onReady: o } = pe(), { model: c } = Ce(), l = E(() => (c.value?.layers ?? []).filter((e) => e.hover && e.hover.fields.length)), u = q(null), d = G([0, 0]), f = G(!1), p, m = [];
2001
+ let r = t, i = n, a = s(), { onReady: o } = me(), { model: c } = Ce(), l = E(() => (c.value?.layers ?? []).filter((e) => e.hover && e.hover.fields.length)), u = K(null), d = W([0, 0]), f = W(!1), p, m = [];
1986
2002
  function h(e) {
1987
2003
  let t = e.features?.[0], n = l.value.find((e) => e.id === t?.layer.id);
1988
2004
  if (!t || !n || !n.hover) return;
@@ -1991,8 +2007,8 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
1991
2007
  layer: n,
1992
2008
  fields: n.hover.fields.map((e) => ({
1993
2009
  key: e.key,
1994
- label: qt(e.key, e),
1995
- value: Jt(r[e.key], e)
2010
+ label: Jt(e.key, e),
2011
+ value: Yt(r[e.key], e)
1996
2012
  })).filter((e) => e.value)
1997
2013
  }, d.value = [e.lngLat.lng, e.lngLat.lat], f.value = !0;
1998
2014
  }
@@ -2009,27 +2025,27 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2009
2025
  }
2010
2026
  o((e) => {
2011
2027
  p = e, _();
2012
- }), Z([() => r.modelValue, l], _), ne(() => {
2028
+ }), Y([() => r.modelValue, l], _), ne(() => {
2013
2029
  for (let e of m) p?.off("mousemove", e, h), p?.off("mouseleave", e, g);
2014
2030
  });
2015
2031
  let v = E(() => r.control === !0 ? "top-right" : r.control || "top-right");
2016
- return (n, r) => (H(), k("div", $t, [t.control && l.value.length ? (H(), D(ge, {
2032
+ return (n, r) => (V(), k("div", en, [t.control && l.value.length ? (V(), D(_e, {
2017
2033
  key: 0,
2018
2034
  position: v.value
2019
2035
  }, {
2020
- default: Q(() => [A("button", {
2036
+ default: Z(() => [A("button", {
2021
2037
  type: "button",
2022
2038
  class: "grid place-items-center",
2023
- title: X(a).mapHoverInfo,
2024
- "aria-label": X(a).mapHoverInfo,
2039
+ title: J(a).mapHoverInfo,
2040
+ "aria-label": J(a).mapHoverInfo,
2025
2041
  "aria-pressed": t.modelValue,
2026
2042
  onClick: r[0] ||= (e) => i("update:modelValue", !t.modelValue)
2027
2043
  }, [N(e, {
2028
2044
  name: "ads_click",
2029
2045
  size: 20
2030
- })], 8, en)]),
2046
+ })], 8, tn)]),
2031
2047
  _: 1
2032
- }, 8, ["position"])) : O("", !0), u.value ? (H(), D(Pe, {
2048
+ }, 8, ["position"])) : O("", !0), u.value ? (V(), D(Pe, {
2033
2049
  key: 1,
2034
2050
  open: f.value,
2035
2051
  "onUpdate:open": r[1] ||= (e) => f.value = e,
@@ -2040,18 +2056,18 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2040
2056
  "max-width": "280px",
2041
2057
  class: "m3-map-hover"
2042
2058
  }, {
2043
- default: Q(() => [A("p", tn, J(u.value.layer.title), 1), A("dl", nn, [(H(!0), k(C, null, re(u.value.fields, (e) => (H(), k("div", {
2059
+ default: Z(() => [A("p", nn, q(u.value.layer.title), 1), A("dl", rn, [(V(!0), k(C, null, ie(u.value.fields, (e) => (V(), k("div", {
2044
2060
  key: e.key,
2045
2061
  class: "border-b border-outline-variant py-1 last:border-b-0"
2046
- }, [A("dt", rn, J(e.label), 1), A("dd", an, J(e.value), 1)]))), 128))])]),
2062
+ }, [A("dt", an, q(e.label), 1), A("dd", on, q(e.value), 1)]))), 128))])]),
2047
2063
  _: 1
2048
2064
  }, 8, ["open", "lng-lat"])) : O("", !0)]));
2049
2065
  }
2050
- }), sn = { class: "hidden" }, cn = ["title", "aria-pressed"], ln = ["title", "aria-pressed"], un = ["title", "disabled"], dn = [
2066
+ }), cn = { class: "hidden" }, ln = ["title", "aria-pressed"], un = ["title", "aria-pressed"], dn = ["title", "disabled"], fn = [
2051
2067
  "aria-label",
2052
2068
  "title",
2053
2069
  "onClick"
2054
- ], fn = /* @__PURE__ */ P({
2070
+ ], pn = /* @__PURE__ */ P({
2055
2071
  __name: "MMapMeasure",
2056
2072
  props: {
2057
2073
  modelValue: { default: null },
@@ -2062,11 +2078,11 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2062
2078
  },
2063
2079
  emits: ["update:modelValue", "change"],
2064
2080
  setup(t, { expose: n, emit: r }) {
2065
- let i = t, a = r, o = s(), { onReady: c, styleVersion: u, activeTool: d } = pe(), f = l(["primary", "surface"]), p = `m3-measure-${ie()}`, h = {
2081
+ let i = t, a = r, o = s(), { onReady: c, styleVersion: u, activeTool: d } = me(), f = l(["primary", "surface"]), p = `m3-measure-${oe()}`, h = {
2066
2082
  done: `${p}-done`,
2067
2083
  draft: `${p}-draft`,
2068
2084
  handles: `${p}-handles`
2069
- }, g = `${h.handles}-vertex`, _ = `${h.handles}-midpoint`, v = [], y = [], b = null, x = !1, S = null, w = 0, T, j = G(null), P = G(0), F = q([]), I = () => typeof document < "u" && document.documentElement.lang || void 0, L = (e, t) => new Intl.NumberFormat(I(), {
2085
+ }, g = `${h.handles}-vertex`, _ = `${h.handles}-midpoint`, v = [], y = [], b = null, x = !1, S = null, w = 0, T, j = W(null), P = W(0), F = K([]), I = () => typeof document < "u" && document.documentElement.lang || void 0, L = (e, t) => new Intl.NumberFormat(I(), {
2070
2086
  minimumFractionDigits: t,
2071
2087
  maximumFractionDigits: t
2072
2088
  }).format(e), R = (e) => e === 0 ? "" : e < 1e3 ? `${L(Math.round(e), 0)} m` : `${L(e / 1e3, 2)} km`, ee = (e) => e >= 1e6 ? `${L(e / 1e6, 2)} km²` : e >= 1e4 ? `${L(e / 1e4, 2)} ha` : `${L(Math.round(e), 0)} m²`, te = (e, t = {}) => ({
@@ -2137,17 +2153,17 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2137
2153
  labels: a
2138
2154
  };
2139
2155
  }
2140
- let V = (e) => ({
2156
+ let re = (e) => ({
2141
2157
  type: "FeatureCollection",
2142
2158
  features: e
2143
- }), U = (e, t) => (T?.getSource(e))?.setData(V(t));
2144
- function W() {
2159
+ }), H = (e, t) => (T?.getSource(e))?.setData(re(t));
2160
+ function U() {
2145
2161
  if (!T) return;
2146
2162
  let e = v.map((e, t) => B(e.points, e.mode, `m${t}`, t)), t = j.value && y.length ? B(b ? [...y, b] : y, j.value, "draft") : {
2147
2163
  features: [],
2148
2164
  labels: []
2149
2165
  };
2150
- U(h.done, e.flatMap((e) => e.features)), U(h.draft, t.features);
2166
+ H(h.done, e.flatMap((e) => e.features)), H(h.draft, t.features);
2151
2167
  let n = [];
2152
2168
  j.value || v.forEach((e, t) => {
2153
2169
  (e.closed ? e.points.slice(0, -1) : e.points).forEach((e, r) => n.push(te(e, {
@@ -2160,9 +2176,9 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2160
2176
  m: t,
2161
2177
  after: r
2162
2178
  }));
2163
- }), U(h.handles, n), F.value = [...e.flatMap((e) => e.labels), ...t.labels];
2179
+ }), H(h.handles, n), F.value = [...e.flatMap((e) => e.labels), ...t.labels];
2164
2180
  }
2165
- function K() {
2181
+ function G() {
2166
2182
  P.value = v.length, a("change", v.map((e) => ({
2167
2183
  mode: e.mode,
2168
2184
  points: e.points.map((e) => [...e]),
@@ -2171,12 +2187,12 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2171
2187
  ...e.mode === "area" || e.closed ? { area: Ue(e.points) } : {}
2172
2188
  })));
2173
2189
  }
2174
- let Y = (e) => [
2190
+ let ae = (e) => [
2175
2191
  "==",
2176
2192
  ["geometry-type"],
2177
2193
  e
2178
2194
  ];
2179
- function ae() {
2195
+ function se() {
2180
2196
  let { primary: e, surface: t } = f.value;
2181
2197
  return {
2182
2198
  fill: { "fill-color": e },
@@ -2187,20 +2203,20 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2187
2203
  }
2188
2204
  };
2189
2205
  }
2190
- function oe() {
2206
+ function X() {
2191
2207
  if (!T) return;
2192
2208
  for (let e of Object.values(h)) T.getSource(e) || T.addSource(e, {
2193
2209
  type: "geojson",
2194
- data: V([])
2210
+ data: re([])
2195
2211
  });
2196
- let e = ae(), t = (e) => {
2212
+ let e = se(), t = (e) => {
2197
2213
  T.getLayer(e.id) || T.addLayer(e);
2198
2214
  };
2199
2215
  for (let [n, r] of [[h.done, !1], [h.draft, !0]]) t({
2200
2216
  id: `${n}-fill`,
2201
2217
  type: "fill",
2202
2218
  source: n,
2203
- filter: Y("Polygon"),
2219
+ filter: ae("Polygon"),
2204
2220
  paint: {
2205
2221
  ...e.fill,
2206
2222
  "fill-opacity": r ? .15 : .2
@@ -2223,7 +2239,7 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2223
2239
  id: `${n}-points`,
2224
2240
  type: "circle",
2225
2241
  source: n,
2226
- filter: Y("Point"),
2242
+ filter: ae("Point"),
2227
2243
  paint: {
2228
2244
  ...e.vertices,
2229
2245
  "circle-radius": 5,
@@ -2261,63 +2277,63 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2261
2277
  }
2262
2278
  });
2263
2279
  }
2264
- Z(f, () => {
2280
+ Y(f, () => {
2265
2281
  if (!T) return;
2266
- let e = ae(), t = (e, t) => {
2282
+ let e = se(), t = (e, t) => {
2267
2283
  if (T.getLayer(e)) for (let [n, r] of Object.entries(t)) T.setPaintProperty(e, n, r);
2268
2284
  };
2269
2285
  for (let n of [h.done, h.draft]) t(`${n}-fill`, e.fill), t(`${n}-line`, e.line), t(`${n}-points`, e.vertices);
2270
2286
  t(_, e.vertices), t(g, e.vertices);
2271
2287
  });
2272
- let ce = (e) => [e.lngLat.lng, e.lngLat.lat];
2273
- function le(e) {
2288
+ let le = (e) => [e.lngLat.lng, e.lngLat.lat];
2289
+ function ue(e) {
2274
2290
  if (y.length >= 2) {
2275
2291
  let t = T.project(y[0]);
2276
2292
  if (Math.hypot(t.x - e.point.x, t.y - e.point.y) < 20) {
2277
- x = !0, xe();
2293
+ x = !0, Q();
2278
2294
  return;
2279
2295
  }
2280
2296
  }
2281
- y.push(ce(e)), W();
2297
+ y.push(le(e)), U();
2282
2298
  }
2283
- function ue(e) {
2284
- b = ce(e), w ||= requestAnimationFrame(() => {
2285
- w = 0, W();
2299
+ function de(e) {
2300
+ b = le(e), w ||= requestAnimationFrame(() => {
2301
+ w = 0, U();
2286
2302
  });
2287
2303
  }
2288
- function de(e) {
2304
+ function fe(e) {
2289
2305
  if (e.preventDefault(), y.length < 2) return;
2290
2306
  let t = T.project(y[y.length - 1]), n = T.project(y[y.length - 2]);
2291
- Math.hypot(t.x - n.x, t.y - n.y) < 10 && y.pop(), xe();
2292
- }
2293
- function fe(e) {
2294
- e.key === "Enter" && xe();
2307
+ Math.hypot(t.x - n.x, t.y - n.y) < 10 && y.pop(), Q();
2295
2308
  }
2296
- m(() => !!j.value, () => xe(!0));
2297
- let me = () => typeof navigator < "u" ? navigator.keyboard : void 0, he = !1;
2298
- function _e() {
2299
- j.value && document.fullscreenElement && me()?.lock && me().lock(["Escape"]).then(() => {
2300
- he = !0;
2301
- }, () => {});
2309
+ function pe(e) {
2310
+ e.key === "Enter" && Q();
2302
2311
  }
2312
+ m(() => !!j.value, () => Q(!0));
2313
+ let he = () => typeof navigator < "u" ? navigator.keyboard : void 0, ge = !1;
2303
2314
  function ve() {
2304
- j.value || (he && me()?.unlock?.(), he = !1);
2315
+ j.value && document.fullscreenElement && he()?.lock && he().lock(["Escape"]).then(() => {
2316
+ ge = !0;
2317
+ }, () => {});
2305
2318
  }
2306
2319
  function ye() {
2320
+ j.value || (ge && he()?.unlock?.(), ge = !1);
2321
+ }
2322
+ function be() {
2307
2323
  let e, t = () => {
2308
- document.removeEventListener("keyup", n, !0), clearTimeout(e), setTimeout(ve);
2324
+ document.removeEventListener("keyup", n, !0), clearTimeout(e), setTimeout(ye);
2309
2325
  }, n = (e) => {
2310
2326
  e.key === "Escape" && t();
2311
2327
  };
2312
2328
  document.addEventListener("keyup", n, !0), e = setTimeout(t, 1500);
2313
2329
  }
2314
- function be(e) {
2330
+ function xe(e) {
2315
2331
  if (T) {
2316
- if (j.value === e) return xe();
2317
- j.value && xe(), j.value = e, d.value = "measure", y = [], b = null, T.getCanvas().style.cursor = "crosshair", T.doubleClickZoom.disable(), T.on("click", le), T.on("mousemove", ue), T.on("dblclick", de), document.addEventListener("keydown", fe), document.addEventListener("fullscreenchange", _e), _e(), W(), i.modelValue !== e && a("update:modelValue", e);
2332
+ if (j.value === e) return Q();
2333
+ j.value && Q(), j.value = e, d.value = "measure", y = [], b = null, T.getCanvas().style.cursor = "crosshair", T.doubleClickZoom.disable(), T.on("click", ue), T.on("mousemove", de), T.on("dblclick", fe), document.addEventListener("keydown", pe), document.addEventListener("fullscreenchange", ve), ve(), U(), i.modelValue !== e && a("update:modelValue", e);
2318
2334
  }
2319
2335
  }
2320
- function xe(e = !1) {
2336
+ function Q(e = !1) {
2321
2337
  if (!T || !j.value) return;
2322
2338
  cancelAnimationFrame(w), w = 0;
2323
2339
  let t = y.length >= 3 && (x || j.value === "area");
@@ -2325,13 +2341,13 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2325
2341
  mode: j.value,
2326
2342
  points: t ? [...y, [...y[0]]] : y,
2327
2343
  closed: t
2328
- }), y = [], b = null, x = !1, j.value = null, d.value === "measure" && (d.value = null), T.getCanvas().style.cursor = "", T.doubleClickZoom.enable(), T.off("click", le), T.off("mousemove", ue), T.off("dblclick", de), document.removeEventListener("keydown", fe), document.removeEventListener("fullscreenchange", _e), e && he ? ye() : ve(), W(), K(), i.modelValue !== null && a("update:modelValue", null);
2344
+ }), y = [], b = null, x = !1, j.value = null, d.value === "measure" && (d.value = null), T.getCanvas().style.cursor = "", T.doubleClickZoom.enable(), T.off("click", ue), T.off("mousemove", de), T.off("dblclick", fe), document.removeEventListener("keydown", pe), document.removeEventListener("fullscreenchange", ve), e && ge ? be() : ye(), U(), G(), i.modelValue !== null && a("update:modelValue", null);
2329
2345
  }
2330
2346
  function Se(e) {
2331
- v[e] && (v.splice(e, 1), W(), K());
2347
+ v[e] && (v.splice(e, 1), U(), G());
2332
2348
  }
2333
2349
  function Ce() {
2334
- j.value && xe(), v.length = 0, W(), K();
2350
+ j.value && Q(), v.length = 0, U(), G();
2335
2351
  }
2336
2352
  function $(e) {
2337
2353
  let t = e.features?.[0];
@@ -2340,22 +2356,22 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2340
2356
  let n = t.properties.m, r = v[n];
2341
2357
  if (!r) return;
2342
2358
  let i = t.properties.v;
2343
- t.properties.handle === "midpoint" && (i = t.properties.after + 1, r.points.splice(i, 0, ce(e))), S = {
2359
+ t.properties.handle === "midpoint" && (i = t.properties.after + 1, r.points.splice(i, 0, le(e))), S = {
2344
2360
  m: n,
2345
2361
  v: i
2346
2362
  }, d.value = "measure", T.getCanvas().style.cursor = "grabbing";
2347
2363
  let a = e.type === "touchstart";
2348
- a && T.dragPan.disable(), T.on(a ? "touchmove" : "mousemove", we), T.once(a ? "touchend" : "mouseup", Te), W();
2364
+ a && T.dragPan.disable(), T.on(a ? "touchmove" : "mousemove", we), T.once(a ? "touchend" : "mouseup", Te), U();
2349
2365
  }
2350
2366
  function we(e) {
2351
2367
  if (!S) return;
2352
2368
  let t = v[S.m];
2353
2369
  if (!t) return;
2354
- let n = ce(e);
2355
- t.points[S.v] = n, t.closed && S.v === 0 && (t.points[t.points.length - 1] = n), W();
2370
+ let n = le(e);
2371
+ t.points[S.v] = n, t.closed && S.v === 0 && (t.points[t.points.length - 1] = n), U();
2356
2372
  }
2357
2373
  function Te() {
2358
- T && (S = null, T.off("mousemove", we), T.off("touchmove", we), T.dragPan.enable(), T.getCanvas().style.cursor = "", K(), setTimeout(() => {
2374
+ T && (S = null, T.off("mousemove", we), T.off("touchmove", we), T.dragPan.enable(), T.getCanvas().style.cursor = "", G(), setTimeout(() => {
2359
2375
  d.value === "measure" && !j.value && (d.value = null);
2360
2376
  }));
2361
2377
  }
@@ -2365,16 +2381,16 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2365
2381
  T && !S && !j.value && (T.getCanvas().style.cursor = "");
2366
2382
  };
2367
2383
  c((e) => {
2368
- T = e, oe();
2384
+ T = e, X();
2369
2385
  for (let t of [g, _]) e.on("mousedown", t, $), e.on("touchstart", t, $), e.on("mouseenter", t, Ee), e.on("mouseleave", t, De);
2370
- i.modelValue && be(i.modelValue);
2371
- }), Z(u, () => {
2372
- oe(), W();
2373
- }), Z(() => i.modelValue, (e) => {
2374
- e && e !== j.value ? be(e) : !e && j.value && xe();
2386
+ i.modelValue && xe(i.modelValue);
2387
+ }), Y(u, () => {
2388
+ X(), U();
2389
+ }), Y(() => i.modelValue, (e) => {
2390
+ e && e !== j.value ? xe(e) : !e && j.value && Q();
2375
2391
  }), ne(() => {
2376
2392
  if (!T) return;
2377
- j.value && xe();
2393
+ j.value && Q();
2378
2394
  for (let e of [g, _]) T.off("mousedown", e, $), T.off("touchstart", e, $), T.off("mouseenter", e, Ee), T.off("mouseleave", e, De);
2379
2395
  let e = [
2380
2396
  g,
@@ -2390,69 +2406,69 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2390
2406
  });
2391
2407
  let Oe = E(() => i.control === !0 ? "top-right" : i.control || "top-right");
2392
2408
  return n({
2393
- start: be,
2394
- finish: xe,
2409
+ start: xe,
2410
+ finish: Q,
2395
2411
  clear: Ce,
2396
2412
  remove: Se
2397
- }), (n, r) => (H(), k("div", sn, [t.control ? (H(), D(ge, {
2413
+ }), (n, r) => (V(), k("div", cn, [t.control ? (V(), D(_e, {
2398
2414
  key: 0,
2399
2415
  position: Oe.value
2400
2416
  }, {
2401
- default: Q(() => [
2417
+ default: Z(() => [
2402
2418
  A("button", {
2403
2419
  type: "button",
2404
2420
  class: "grid place-items-center",
2405
- title: X(o).mapMeasureDistance,
2421
+ title: J(o).mapMeasureDistance,
2406
2422
  "aria-pressed": j.value === "distance",
2407
- onClick: r[0] ||= (e) => be("distance")
2423
+ onClick: r[0] ||= (e) => xe("distance")
2408
2424
  }, [N(e, {
2409
2425
  name: "straighten",
2410
2426
  size: 20
2411
- })], 8, cn),
2427
+ })], 8, ln),
2412
2428
  A("button", {
2413
2429
  type: "button",
2414
2430
  class: "grid place-items-center",
2415
- title: X(o).mapMeasureArea,
2431
+ title: J(o).mapMeasureArea,
2416
2432
  "aria-pressed": j.value === "area",
2417
- onClick: r[1] ||= (e) => be("area")
2433
+ onClick: r[1] ||= (e) => xe("area")
2418
2434
  }, [N(e, {
2419
2435
  name: "square_foot",
2420
2436
  size: 20
2421
- })], 8, ln),
2437
+ })], 8, un),
2422
2438
  A("button", {
2423
2439
  type: "button",
2424
2440
  class: "grid place-items-center",
2425
- title: X(o).mapClearMeasurements,
2441
+ title: J(o).mapClearMeasurements,
2426
2442
  disabled: !P.value && !j.value,
2427
2443
  onClick: Ce
2428
2444
  }, [N(e, {
2429
2445
  name: "delete",
2430
2446
  size: 20
2431
- })], 8, un)
2447
+ })], 8, dn)
2432
2448
  ]),
2433
2449
  _: 1
2434
- }, 8, ["position"])) : O("", !0), (H(!0), k(C, null, re(F.value, (t) => (H(), D(Me, {
2450
+ }, 8, ["position"])) : O("", !0), (V(!0), k(C, null, ie(F.value, (t) => (V(), D(Me, {
2435
2451
  key: t.key,
2436
2452
  "lng-lat": t.at,
2437
2453
  anchor: t.kind === "area" ? "center" : "top",
2438
2454
  offset: t.kind === "area" ? [0, 0] : [0, 8],
2439
2455
  class: "pointer-events-none"
2440
2456
  }, {
2441
- default: Q(() => [A("span", { class: z(["flex items-center gap-1 whitespace-nowrap rounded-full py-0.5 shadow-elevation-1", [t.kind === "segment" ? "bg-surface-container-highest text-label-small text-on-surface" : "bg-primary text-label-medium text-on-primary", t.m === void 0 ? "px-2" : "pr-0.5 pl-2"]]) }, [M(J(t.text) + " ", 1), t.m === void 0 ? O("", !0) : (H(), k("button", {
2457
+ default: Z(() => [A("span", { class: z(["flex items-center gap-1 whitespace-nowrap rounded-full py-0.5 shadow-elevation-1", [t.kind === "segment" ? "bg-surface-container-highest text-label-small text-on-surface" : "bg-primary text-label-medium text-on-primary", t.m === void 0 ? "px-2" : "pr-0.5 pl-2"]]) }, [M(q(t.text) + " ", 1), t.m === void 0 ? O("", !0) : (V(), k("button", {
2442
2458
  key: 0,
2443
2459
  type: "button",
2444
2460
  class: "pointer-events-auto grid size-5 cursor-pointer place-items-center rounded-full hover:bg-on-primary/12 focus-visible:outline-2 focus-visible:outline-on-primary",
2445
- "aria-label": X(o).mapDeleteMeasurement,
2446
- title: X(o).mapDeleteMeasurement,
2447
- onClick: se((e) => Se(t.m), ["stop"]),
2448
- onPointerdown: r[2] ||= se(() => {}, ["stop"]),
2449
- onMousedown: r[3] ||= se(() => {}, ["stop"]),
2450
- onTouchstart: r[4] ||= se(() => {}, ["stop"]),
2451
- onDblclick: r[5] ||= se(() => {}, ["stop"])
2461
+ "aria-label": J(o).mapDeleteMeasurement,
2462
+ title: J(o).mapDeleteMeasurement,
2463
+ onClick: ce((e) => Se(t.m), ["stop"]),
2464
+ onPointerdown: r[2] ||= ce(() => {}, ["stop"]),
2465
+ onMousedown: r[3] ||= ce(() => {}, ["stop"]),
2466
+ onTouchstart: r[4] ||= ce(() => {}, ["stop"]),
2467
+ onDblclick: r[5] ||= ce(() => {}, ["stop"])
2452
2468
  }, [N(e, {
2453
2469
  name: "close",
2454
2470
  size: 14
2455
- })], 40, dn))], 2)]),
2471
+ })], 40, fn))], 2)]),
2456
2472
  _: 2
2457
2473
  }, 1032, [
2458
2474
  "lng-lat",
@@ -2460,16 +2476,16 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2460
2476
  "offset"
2461
2477
  ]))), 128))]));
2462
2478
  }
2463
- }), pn = { class: "hidden" }, mn = [
2479
+ }), mn = { class: "hidden" }, hn = [
2464
2480
  "title",
2465
2481
  "aria-label",
2466
2482
  "aria-pressed",
2467
2483
  "onClick"
2468
- ], hn = [
2484
+ ], gn = [
2469
2485
  "title",
2470
2486
  "aria-label",
2471
2487
  "disabled"
2472
- ], gn = "draw", _n = 6, vn = /* @__PURE__ */ P({
2488
+ ], _n = "draw", vn = 6, yn = /* @__PURE__ */ P({
2473
2489
  __name: "MMapDraw",
2474
2490
  props: {
2475
2491
  modelValue: {},
@@ -2495,12 +2511,12 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2495
2511
  "select"
2496
2512
  ],
2497
2513
  setup(t, { expose: n, emit: r }) {
2498
- let i = t, a = r, o = s(), { onReady: c, styleVersion: u, activeTool: d } = pe(), f = l([
2514
+ let i = t, a = r, o = s(), { onReady: c, styleVersion: u, activeTool: d } = me(), f = l([
2499
2515
  "primary",
2500
2516
  "secondary",
2501
2517
  "tertiary",
2502
2518
  "surface"
2503
- ]), p = `m3-draw-${ie()}`, h = {
2519
+ ]), p = `m3-draw-${oe()}`, h = {
2504
2520
  shapes: `${p}-shapes`,
2505
2521
  draft: `${p}-draft`,
2506
2522
  handles: `${p}-handles`
@@ -2508,10 +2524,10 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2508
2524
  `${h.shapes}-fill`,
2509
2525
  `${h.shapes}-line`,
2510
2526
  `${h.shapes}-point`
2511
- ], _ = `${h.handles}-vertex`, v = `${h.handles}-midpoint`, y = [], b = "", x = 1, S = [], w = null, T = null, A = 0, j, M = G(null), P = G(null), F = (e) => JSON.parse(JSON.stringify(e)), I = (e) => e === null ? void 0 : y.find((t) => t.id === e);
2527
+ ], _ = `${h.handles}-vertex`, v = `${h.handles}-midpoint`, y = [], b = "", x = 1, S = [], w = null, T = null, A = 0, j, M = W(null), P = W(null), F = (e) => JSON.parse(JSON.stringify(e)), I = (e) => e === null ? void 0 : y.find((t) => t.id === e);
2512
2528
  function L(e) {
2513
2529
  y = F(e?.features ?? []);
2514
- for (let e of y) (e.id === void 0 || e.id === null) && (e.id = xe());
2530
+ for (let e of y) (e.id === void 0 || e.id === null) && (e.id = Q());
2515
2531
  P.value !== null && !I(P.value) && (P.value = null);
2516
2532
  }
2517
2533
  function R() {
@@ -2541,13 +2557,13 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2541
2557
  coordinates: e
2542
2558
  },
2543
2559
  properties: t
2544
- }), V = (e) => ({
2560
+ }), re = (e) => ({
2545
2561
  type: "FeatureCollection",
2546
2562
  features: e
2547
- }), U = (e, t) => (j?.getSource(e))?.setData(V(t));
2548
- function W() {
2563
+ }), H = (e, t) => (j?.getSource(e))?.setData(re(t));
2564
+ function U() {
2549
2565
  if (!j) return;
2550
- U(h.shapes, y.map((e) => ({
2566
+ H(h.shapes, y.map((e) => ({
2551
2567
  type: "Feature",
2552
2568
  geometry: e.geometry,
2553
2569
  properties: {
@@ -2575,7 +2591,7 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2575
2591
  properties: {}
2576
2592
  });
2577
2593
  }
2578
- U(h.draft, e);
2594
+ H(h.draft, e);
2579
2595
  let t = [], n = I(P.value), r = n && !M.value && i.editable ? ee(n) : null;
2580
2596
  if (n && r && (r.forEach((e, n) => t.push(B(e, {
2581
2597
  handle: "vertex",
@@ -2587,32 +2603,32 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2587
2603
  after: n
2588
2604
  }));
2589
2605
  }
2590
- U(h.handles, t);
2606
+ H(h.handles, t);
2591
2607
  }
2592
- function K() {
2608
+ function G() {
2593
2609
  A ||= requestAnimationFrame(() => {
2594
- A = 0, W();
2610
+ A = 0, U();
2595
2611
  });
2596
2612
  }
2597
- let q = (...e) => [
2613
+ let K = (...e) => [
2598
2614
  "match",
2599
2615
  ["geometry-type"],
2600
2616
  e,
2601
2617
  !0,
2602
2618
  !1
2603
- ], J = [
2619
+ ], q = [
2604
2620
  "==",
2605
2621
  ["get", "__draw_selected"],
2606
2622
  !0
2607
2623
  ];
2608
- function Y() {
2624
+ function ae() {
2609
2625
  let e = f.value[i.color], t = f.value.surface;
2610
2626
  return {
2611
2627
  fill: {
2612
2628
  "fill-color": e,
2613
2629
  "fill-opacity": [
2614
2630
  "case",
2615
- J,
2631
+ q,
2616
2632
  .3,
2617
2633
  .18
2618
2634
  ]
@@ -2621,7 +2637,7 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2621
2637
  "line-color": e,
2622
2638
  "line-width": [
2623
2639
  "case",
2624
- J,
2640
+ q,
2625
2641
  4,
2626
2642
  2.5
2627
2643
  ]
@@ -2630,7 +2646,7 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2630
2646
  "circle-color": e,
2631
2647
  "circle-radius": [
2632
2648
  "case",
2633
- J,
2649
+ q,
2634
2650
  8,
2635
2651
  6
2636
2652
  ],
@@ -2648,44 +2664,44 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2648
2664
  }
2649
2665
  };
2650
2666
  }
2651
- function ae() {
2667
+ function se() {
2652
2668
  if (!j) return;
2653
2669
  for (let e of Object.values(h)) j.getSource(e) || j.addSource(e, {
2654
2670
  type: "geojson",
2655
- data: V([])
2671
+ data: re([])
2656
2672
  });
2657
- let e = Y(), t = (e) => {
2673
+ let e = ae(), t = (e) => {
2658
2674
  j.getLayer(e.id) || j.addLayer(e);
2659
2675
  };
2660
2676
  t({
2661
2677
  id: g[0],
2662
2678
  type: "fill",
2663
2679
  source: h.shapes,
2664
- filter: q("Polygon", "MultiPolygon"),
2680
+ filter: K("Polygon", "MultiPolygon"),
2665
2681
  paint: e.fill
2666
2682
  }), t({
2667
2683
  id: g[1],
2668
2684
  type: "line",
2669
2685
  source: h.shapes,
2670
- filter: q("LineString", "MultiLineString", "Polygon", "MultiPolygon"),
2686
+ filter: K("LineString", "MultiLineString", "Polygon", "MultiPolygon"),
2671
2687
  paint: e.line
2672
2688
  }), t({
2673
2689
  id: g[2],
2674
2690
  type: "circle",
2675
2691
  source: h.shapes,
2676
- filter: q("Point", "MultiPoint"),
2692
+ filter: K("Point", "MultiPoint"),
2677
2693
  paint: e.point
2678
2694
  }), t({
2679
2695
  id: `${h.draft}-fill`,
2680
2696
  type: "fill",
2681
2697
  source: h.draft,
2682
- filter: q("Polygon"),
2698
+ filter: K("Polygon"),
2683
2699
  paint: e.draftFill
2684
2700
  }), t({
2685
2701
  id: `${h.draft}-line`,
2686
2702
  type: "line",
2687
2703
  source: h.draft,
2688
- filter: q("LineString"),
2704
+ filter: K("LineString"),
2689
2705
  paint: {
2690
2706
  ...e.draftLine,
2691
2707
  "line-width": 2.5,
@@ -2695,7 +2711,7 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2695
2711
  id: `${h.draft}-point`,
2696
2712
  type: "circle",
2697
2713
  source: h.draft,
2698
- filter: q("Point"),
2714
+ filter: K("Point"),
2699
2715
  paint: {
2700
2716
  ...e.handle,
2701
2717
  "circle-radius": 5,
@@ -2732,76 +2748,76 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2732
2748
  }
2733
2749
  });
2734
2750
  }
2735
- Z([f, () => i.color], () => {
2751
+ Y([f, () => i.color], () => {
2736
2752
  if (!j) return;
2737
- let e = Y(), t = (e, t) => {
2753
+ let e = ae(), t = (e, t) => {
2738
2754
  if (j.getLayer(e)) for (let [n, r] of Object.entries(t)) j.setPaintProperty(e, n, r);
2739
2755
  };
2740
2756
  t(g[0], e.fill), t(g[1], e.line), t(g[2], e.point), t(`${h.draft}-fill`, e.draftFill), t(`${h.draft}-line`, e.draftLine), t(`${h.draft}-point`, e.handle), t(v, e.handle), t(_, e.handle);
2741
2757
  });
2742
- function oe(e) {
2758
+ function X(e) {
2743
2759
  if (e !== null && !I(e) && (e = null), P.value === e) return;
2744
- P.value = e, W();
2760
+ P.value = e, U();
2745
2761
  let t = I(e);
2746
2762
  a("select", t ? F(t) : null);
2747
2763
  }
2748
- function se(e = P.value) {
2764
+ function ce(e = P.value) {
2749
2765
  let t = y.findIndex((t) => t.id === e);
2750
- t < 0 || (y.splice(t, 1), P.value === e && (P.value = null, a("select", null)), W(), R());
2766
+ t < 0 || (y.splice(t, 1), P.value === e && (P.value = null, a("select", null)), U(), R());
2751
2767
  }
2752
- function ce() {
2753
- M.value && $(), y.length && (y = [], P.value !== null && (P.value = null, a("select", null)), W(), R());
2768
+ function le() {
2769
+ M.value && $(), y.length && (y = [], P.value !== null && (P.value = null, a("select", null)), U(), R());
2754
2770
  }
2755
- let le = (e) => [e.lngLat.lng, e.lngLat.lat];
2756
- function ue(e) {
2757
- if (M.value || !j || !i.editable || d.value && d.value !== gn) return;
2758
- let { x: t, y: n } = e.point, r = [[t - _n, n - _n], [t + _n, n + _n]], a = j.queryRenderedFeatures(r, { layers: g.filter((e) => j.getLayer(e)) })[0]?.properties?.__draw_id;
2759
- if (a === void 0) return oe(null);
2771
+ let ue = (e) => [e.lngLat.lng, e.lngLat.lat];
2772
+ function de(e) {
2773
+ if (M.value || !j || !i.editable || d.value && d.value !== _n) return;
2774
+ let { x: t, y: n } = e.point, r = [[t - vn, n - vn], [t + vn, n + vn]], a = j.queryRenderedFeatures(r, { layers: g.filter((e) => j.getLayer(e)) })[0]?.properties?.__draw_id;
2775
+ if (a === void 0) return X(null);
2760
2776
  let o = y.find((e) => String(e.id) === a);
2761
- oe(o ? o.id : null);
2777
+ X(o ? o.id : null);
2762
2778
  }
2763
- function de() {
2764
- M.value || !i.editable || d.value || (d.value = gn, setTimeout(() => {
2765
- d.value === gn && !M.value && !T && (d.value = null);
2779
+ function fe() {
2780
+ M.value || !i.editable || d.value || (d.value = _n, setTimeout(() => {
2781
+ d.value === _n && !M.value && !T && (d.value = null);
2766
2782
  }, 0));
2767
2783
  }
2768
- let fe = () => {
2784
+ let pe = () => {
2769
2785
  j && !M.value && !T && i.editable && (j.getCanvas().style.cursor = "pointer");
2770
- }, me = () => {
2786
+ }, he = () => {
2771
2787
  j && !M.value && !T && (j.getCanvas().style.cursor = "");
2772
2788
  };
2773
- function he(e) {
2789
+ function ge(e) {
2774
2790
  if (M.value && j) {
2775
2791
  if (M.value === "point") Se({
2776
2792
  type: "Point",
2777
- coordinates: le(e)
2793
+ coordinates: ue(e)
2778
2794
  }), $();
2779
2795
  else {
2780
2796
  if (M.value === "polygon" && S.length >= 3) {
2781
2797
  let t = j.project(S[0]);
2782
2798
  if (Math.hypot(t.x - e.point.x, t.y - e.point.y) < 20) return $();
2783
2799
  }
2784
- S.push(le(e)), W();
2800
+ S.push(ue(e)), U();
2785
2801
  }
2786
2802
  }
2787
2803
  }
2788
- function _e(e) {
2789
- w = le(e), K();
2790
- }
2791
2804
  function ve(e) {
2805
+ w = ue(e), G();
2806
+ }
2807
+ function ye(e) {
2792
2808
  if (e.preventDefault(), !j || S.length < 2) return;
2793
2809
  let t = j.project(S[S.length - 1]), n = j.project(S[S.length - 2]);
2794
2810
  Math.hypot(t.x - n.x, t.y - n.y) < 10 && S.pop(), $();
2795
2811
  }
2796
- function ye() {
2812
+ function be() {
2797
2813
  let e = document.activeElement;
2798
2814
  return !e || e === document.body ? !0 : j?.getContainer().contains(e) ? !(e instanceof HTMLElement && (e.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName))) : !1;
2799
2815
  }
2800
- function be(e) {
2801
- ye() && (M.value ? e.key === "Enter" ? (e.preventDefault(), $()) : e.key === "Backspace" && S.length && (e.preventDefault(), S.pop(), W()) : (e.key === "Delete" || e.key === "Backspace") && P.value !== null && i.editable && (e.preventDefault(), se()));
2816
+ function xe(e) {
2817
+ be() && (M.value ? e.key === "Enter" ? (e.preventDefault(), $()) : e.key === "Backspace" && S.length && (e.preventDefault(), S.pop(), U()) : (e.key === "Delete" || e.key === "Backspace") && P.value !== null && i.editable && (e.preventDefault(), ce()));
2802
2818
  }
2803
- m(() => !!M.value || P.value !== null, () => M.value ? $() : oe(null));
2804
- function xe() {
2819
+ m(() => !!M.value || P.value !== null, () => M.value ? $() : X(null));
2820
+ function Q() {
2805
2821
  let e = `shape-${x++}`;
2806
2822
  for (; y.some((t) => t.id === e);) e = `shape-${x++}`;
2807
2823
  return e;
@@ -2809,7 +2825,7 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2809
2825
  function Se(e) {
2810
2826
  let t = {
2811
2827
  type: "Feature",
2812
- id: xe(),
2828
+ id: Q(),
2813
2829
  geometry: e,
2814
2830
  properties: {}
2815
2831
  };
@@ -2818,20 +2834,20 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2818
2834
  function Ce(e) {
2819
2835
  if (j) {
2820
2836
  if (M.value === e) return $();
2821
- M.value && $(), P.value !== null && oe(null), M.value = e, d.value = gn, S = [], w = null, j.getCanvas().style.cursor = "crosshair", j.doubleClickZoom.disable(), j.on("click", he), j.on("mousemove", _e), j.on("dblclick", ve), W(), i.mode !== e && a("update:mode", e);
2837
+ M.value && $(), P.value !== null && X(null), M.value = e, d.value = _n, S = [], w = null, j.getCanvas().style.cursor = "crosshair", j.doubleClickZoom.disable(), j.on("click", ge), j.on("mousemove", ve), j.on("dblclick", ye), U(), i.mode !== e && a("update:mode", e);
2822
2838
  }
2823
2839
  }
2824
2840
  function $() {
2825
2841
  if (!j || !M.value) return;
2826
2842
  cancelAnimationFrame(A), A = 0;
2827
2843
  let e = M.value, t = S;
2828
- S = [], w = null, M.value = null, d.value === gn && (d.value = null), j.getCanvas().style.cursor = "", j.doubleClickZoom.enable(), j.off("click", he), j.off("mousemove", _e), j.off("dblclick", ve), e === "line" && t.length >= 2 ? Se({
2844
+ S = [], w = null, M.value = null, d.value === _n && (d.value = null), j.getCanvas().style.cursor = "", j.doubleClickZoom.enable(), j.off("click", ge), j.off("mousemove", ve), j.off("dblclick", ye), e === "line" && t.length >= 2 ? Se({
2829
2845
  type: "LineString",
2830
2846
  coordinates: t
2831
2847
  }) : e === "polygon" && t.length >= 3 && Se({
2832
2848
  type: "Polygon",
2833
2849
  coordinates: [[...t, [...t[0]]]]
2834
- }), W(), i.mode !== null && a("update:mode", null);
2850
+ }), U(), i.mode !== null && a("update:mode", null);
2835
2851
  }
2836
2852
  function we(e) {
2837
2853
  let t = e.features?.[0], n = I(P.value);
@@ -2840,23 +2856,23 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2840
2856
  if (!r) return;
2841
2857
  e.preventDefault();
2842
2858
  let a = t.properties.v;
2843
- t.properties.handle === "midpoint" && (a = t.properties.after + 1, r.splice(a, 0, le(e)), z(n, r)), T = {
2859
+ t.properties.handle === "midpoint" && (a = t.properties.after + 1, r.splice(a, 0, ue(e)), z(n, r)), T = {
2844
2860
  id: n.id,
2845
2861
  v: a,
2846
2862
  moved: t.properties.handle === "midpoint"
2847
- }, d.value = gn, j.getCanvas().style.cursor = "grabbing";
2863
+ }, d.value = _n, j.getCanvas().style.cursor = "grabbing";
2848
2864
  let o = e.type === "touchstart";
2849
- o && j.dragPan.disable(), j.on(o ? "touchmove" : "mousemove", Te), j.once(o ? "touchend" : "mouseup", Ee), W();
2865
+ o && j.dragPan.disable(), j.on(o ? "touchmove" : "mousemove", Te), j.once(o ? "touchend" : "mouseup", Ee), U();
2850
2866
  }
2851
2867
  function Te(e) {
2852
2868
  let t = T && I(T.id), n = t && ee(t);
2853
- T && t && n && (n[T.v] = le(e), z(t, n), T.moved = !0, K());
2869
+ T && t && n && (n[T.v] = ue(e), z(t, n), T.moved = !0, G());
2854
2870
  }
2855
2871
  function Ee() {
2856
2872
  if (!j) return;
2857
2873
  let e = T?.moved;
2858
- T = null, j.off("mousemove", Te), j.off("touchmove", Te), j.dragPan.enable(), j.getCanvas().style.cursor = "", W(), e && R(), setTimeout(() => {
2859
- d.value === gn && !M.value && (d.value = null);
2874
+ T = null, j.off("mousemove", Te), j.off("touchmove", Te), j.dragPan.enable(), j.getCanvas().style.cursor = "", U(), e && R(), setTimeout(() => {
2875
+ d.value === _n && !M.value && (d.value = null);
2860
2876
  });
2861
2877
  }
2862
2878
  function De(e) {
@@ -2864,7 +2880,7 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2864
2880
  if (!t || !n || M.value || !i.editable) return;
2865
2881
  e.preventDefault();
2866
2882
  let r = ee(n);
2867
- !r || r.length <= te(n) || (r.splice(t.properties.v, 1), z(n, r), W(), R());
2883
+ !r || r.length <= te(n) || (r.splice(t.properties.v, 1), z(n, r), U(), R());
2868
2884
  }
2869
2885
  let Oe = () => {
2870
2886
  j && !T && !M.value && (j.getCanvas().style.cursor = "grab");
@@ -2872,22 +2888,22 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2872
2888
  j && !T && !M.value && (j.getCanvas().style.cursor = "");
2873
2889
  };
2874
2890
  L(i.modelValue), b = JSON.stringify(y), c((e) => {
2875
- j = e, ae(), W(), e.on("click", ue);
2876
- for (let t of g) e.on("mousedown", t, de), e.on("touchstart", t, de), e.on("mouseenter", t, fe), e.on("mouseleave", t, me);
2891
+ j = e, se(), U(), e.on("click", de);
2892
+ for (let t of g) e.on("mousedown", t, fe), e.on("touchstart", t, fe), e.on("mouseenter", t, pe), e.on("mouseleave", t, he);
2877
2893
  for (let t of [_, v]) e.on("mousedown", t, we), e.on("touchstart", t, we), e.on("mouseenter", t, Oe), e.on("mouseleave", t, ke);
2878
- e.on("dblclick", _, De), document.addEventListener("keydown", be), i.mode && Ce(i.mode);
2879
- }), Z(u, () => {
2880
- ae(), W();
2881
- }), Z(() => i.modelValue, (e) => {
2882
- JSON.stringify(e?.features ?? []) !== b && (L(e), b = JSON.stringify(y), W());
2883
- }, { deep: !0 }), Z(() => i.mode, (e) => {
2894
+ e.on("dblclick", _, De), document.addEventListener("keydown", xe), i.mode && Ce(i.mode);
2895
+ }), Y(u, () => {
2896
+ se(), U();
2897
+ }), Y(() => i.modelValue, (e) => {
2898
+ JSON.stringify(e?.features ?? []) !== b && (L(e), b = JSON.stringify(y), U());
2899
+ }, { deep: !0 }), Y(() => i.mode, (e) => {
2884
2900
  e && e !== M.value ? Ce(e) : !e && M.value && $();
2885
- }), Z(() => i.editable, (e) => {
2886
- !e && P.value !== null && oe(null);
2901
+ }), Y(() => i.editable, (e) => {
2902
+ !e && P.value !== null && X(null);
2887
2903
  }), ne(() => {
2888
- if (document.removeEventListener("keydown", be), !j) return;
2889
- M.value && $(), cancelAnimationFrame(A), j.off("click", ue);
2890
- for (let e of g) j.off("mousedown", e, de), j.off("touchstart", e, de), j.off("mouseenter", e, fe), j.off("mouseleave", e, me);
2904
+ if (document.removeEventListener("keydown", xe), !j) return;
2905
+ M.value && $(), cancelAnimationFrame(A), j.off("click", de);
2906
+ for (let e of g) j.off("mousedown", e, fe), j.off("touchstart", e, fe), j.off("mouseenter", e, pe), j.off("mouseleave", e, he);
2891
2907
  for (let e of [_, v]) j.off("mousedown", e, we), j.off("touchstart", e, we), j.off("mouseenter", e, Oe), j.off("mouseleave", e, ke);
2892
2908
  j.off("dblclick", _, De);
2893
2909
  let e = [
@@ -2914,14 +2930,14 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2914
2930
  return n({
2915
2931
  start: Ce,
2916
2932
  finish: $,
2917
- select: oe,
2918
- remove: se,
2919
- clear: ce
2920
- }), (n, r) => (H(), k("div", pn, [t.control ? (H(), D(ge, {
2933
+ select: X,
2934
+ remove: ce,
2935
+ clear: le
2936
+ }), (n, r) => (V(), k("div", mn, [t.control ? (V(), D(_e, {
2921
2937
  key: 0,
2922
2938
  position: Ae.value
2923
2939
  }, {
2924
- default: Q(() => [(H(!0), k(C, null, re(t.modes, (t) => (H(), k("button", {
2940
+ default: Z(() => [(V(!0), k(C, null, ie(t.modes, (t) => (V(), k("button", {
2925
2941
  key: t,
2926
2942
  type: "button",
2927
2943
  class: "grid place-items-center",
@@ -2932,30 +2948,30 @@ var Zt = { class: "hidden" }, Qt = /* @__PURE__ */ P({
2932
2948
  }, [N(e, {
2933
2949
  name: je[t],
2934
2950
  size: 20
2935
- }, null, 8, ["name"])], 8, mn))), 128)), t.editable ? (H(), k("button", {
2951
+ }, null, 8, ["name"])], 8, hn))), 128)), t.editable ? (V(), k("button", {
2936
2952
  key: 0,
2937
2953
  type: "button",
2938
2954
  class: "grid place-items-center",
2939
- title: X(o).mapDeleteFeature,
2940
- "aria-label": X(o).mapDeleteFeature,
2955
+ title: J(o).mapDeleteFeature,
2956
+ "aria-label": J(o).mapDeleteFeature,
2941
2957
  disabled: P.value === null,
2942
- onClick: r[0] ||= (e) => se()
2958
+ onClick: r[0] ||= (e) => ce()
2943
2959
  }, [N(e, {
2944
2960
  name: "delete",
2945
2961
  size: 20
2946
- })], 8, hn)) : O("", !0)]),
2962
+ })], 8, gn)) : O("", !0)]),
2947
2963
  _: 1
2948
2964
  }, 8, ["position"])) : O("", !0)]));
2949
2965
  }
2950
- }), yn = /* @__PURE__ */ new WeakMap();
2951
- function bn(e) {
2952
- let t = fe(e);
2966
+ }), bn = /* @__PURE__ */ new WeakMap();
2967
+ function xn(e) {
2968
+ let t = pe(e);
2953
2969
  if (!t) throw Error("useMapFilter() must be called in a component inside <MMap>, or be given one");
2954
2970
  function n(e, n) {
2955
2971
  let r = t.map.value;
2956
2972
  if (!r?.getLayer(e)) return;
2957
- let i = yn.get(r);
2958
- i || yn.set(r, i = /* @__PURE__ */ new Map()), i.has(e) || i.set(e, r.getFilter(e) ?? void 0);
2973
+ let i = bn.get(r);
2974
+ i || bn.set(r, i = /* @__PURE__ */ new Map()), i.has(e) || i.set(e, r.getFilter(e) ?? void 0);
2959
2975
  let a = i.get(e);
2960
2976
  r.setFilter(e, n ? a ? [
2961
2977
  "all",
@@ -2979,7 +2995,7 @@ function bn(e) {
2979
2995
  };
2980
2996
  }
2981
2997
  // src/components/MMapFilter.vue?vue&type=script&setup=true&lang.ts
2982
- var xn = { class: "flex flex-wrap gap-2" }, Sn = /* @__PURE__ */ P({
2998
+ var Sn = { class: "flex flex-wrap gap-2" }, Cn = /* @__PURE__ */ P({
2983
2999
  __name: "MMapFilter",
2984
3000
  props: {
2985
3001
  layer: {},
@@ -2991,7 +3007,7 @@ var xn = { class: "flex flex-wrap gap-2" }, Sn = /* @__PURE__ */ P({
2991
3007
  },
2992
3008
  emits: ["update:modelValue"],
2993
3009
  setup(e, { emit: t }) {
2994
- let n = e, r = t, { onReady: i, styleVersion: a } = pe(() => n.map), { setFilter: o, valuesOf: s } = bn(() => n.map), c = G([]), l = E(() => n.values ?? c.value), u = G([]), d = E(() => n.modelValue ?? u.value);
3010
+ let n = e, r = t, { onReady: i, styleVersion: a } = me(() => n.map), { setFilter: o, valuesOf: s } = xn(() => n.map), c = W([]), l = E(() => n.values ?? c.value), u = W([]), d = E(() => n.modelValue ?? u.value);
2995
3011
  function f() {
2996
3012
  let e = d.value;
2997
3013
  o(n.layer, e.length ? [
@@ -3012,22 +3028,22 @@ var xn = { class: "flex flex-wrap gap-2" }, Sn = /* @__PURE__ */ P({
3012
3028
  }
3013
3029
  return i((e) => {
3014
3030
  m(e), f();
3015
- }), Z(d, f, { deep: !0 }), Z(a, () => f()), Z(() => [n.layer, n.property], ([e], [t]) => {
3031
+ }), Y(d, f, { deep: !0 }), Y(a, () => f()), Y(() => [n.layer, n.property], ([e], [t]) => {
3016
3032
  e !== t && o(t, null), f();
3017
- }), ne(() => o(n.layer, null)), (t, n) => (H(), k("div", xn, [(H(!0), k(C, null, re(l.value, (t) => (H(), D(h, {
3033
+ }), ne(() => o(n.layer, null)), (t, n) => (V(), k("div", Sn, [(V(!0), k(C, null, ie(l.value, (t) => (V(), D(h, {
3018
3034
  key: t,
3019
3035
  type: "filter",
3020
3036
  clickable: "",
3021
3037
  selected: d.value.includes(t),
3022
3038
  onClick: (e) => p(t)
3023
3039
  }, {
3024
- default: Q(() => [M(J(e.labels?.[String(t)] ?? t), 1)]),
3040
+ default: Z(() => [M(q(e.labels?.[String(t)] ?? t), 1)]),
3025
3041
  _: 2
3026
3042
  }, 1032, ["selected", "onClick"]))), 128))]));
3027
3043
  }
3028
3044
  });
3029
3045
  // src/composables/mapSearch.ts
3030
- function Cn(e = {}) {
3046
+ function wn(e = {}) {
3031
3047
  return async (t, n) => {
3032
3048
  let r = new URLSearchParams({
3033
3049
  format: "jsonv2",
@@ -3053,7 +3069,7 @@ function Cn(e = {}) {
3053
3069
  });
3054
3070
  };
3055
3071
  }
3056
- var wn = {
3072
+ var Tn = {
3057
3073
  city: "location_city",
3058
3074
  town: "location_city",
3059
3075
  village: "holiday_village",
@@ -3080,17 +3096,17 @@ var wn = {
3080
3096
  administrative: "map",
3081
3097
  country: "public",
3082
3098
  state: "map"
3083
- }, Tn = (e) => e && wn[e] || "location_on", En = { class: "hidden" }, Dn = [
3099
+ }, En = (e) => e && Tn[e] || "location_on", Dn = { class: "hidden" }, On = [
3084
3100
  "value",
3085
3101
  "placeholder",
3086
3102
  "aria-label"
3087
- ], On = {
3103
+ ], kn = {
3088
3104
  key: 0,
3089
3105
  class: "border-t border-outline-variant"
3090
- }, kn = {
3106
+ }, An = {
3091
3107
  key: 1,
3092
3108
  class: "flex flex-col items-center gap-2 py-6"
3093
- }, An = { class: "text-body-small text-on-surface-variant" }, jn = /* @__PURE__ */ P({
3109
+ }, jn = { class: "text-body-small text-on-surface-variant" }, Mn = /* @__PURE__ */ P({
3094
3110
  __name: "MMapSearch",
3095
3111
  props: {
3096
3112
  provider: {},
@@ -3108,7 +3124,7 @@ var wn = {
3108
3124
  },
3109
3125
  emits: ["select"],
3110
3126
  setup(t, { emit: n }) {
3111
- let r = t, i = n, o = s(), { map: c } = pe(), l = E(() => r.provider ?? Cn()), u = G(""), d = q([]), f = G(!1), p = G(!1), m = G(!1), h = q(null), g, x;
3127
+ let r = t, i = n, o = s(), { map: c } = me(), l = E(() => r.provider ?? wn()), u = W(""), d = K([]), f = W(!1), p = W(!1), m = W(!1), h = K(null), g, x;
3112
3128
  async function S() {
3113
3129
  let e = u.value.trim();
3114
3130
  if (!e) return;
@@ -3144,18 +3160,18 @@ var wn = {
3144
3160
  }
3145
3161
  return ne(() => {
3146
3162
  g?.abort(), clearTimeout(x);
3147
- }), (n, r) => (H(), k("div", En, [N(ge, {
3163
+ }), (n, r) => (V(), k("div", Dn, [N(_e, {
3148
3164
  position: t.position,
3149
3165
  group: !1
3150
3166
  }, {
3151
- default: Q(() => [N(v, {
3167
+ default: Z(() => [N(v, {
3152
3168
  variant: "elevated",
3153
3169
  class: "w-80 max-w-[calc(100vw-5rem)] overflow-hidden"
3154
3170
  }, {
3155
- default: Q(() => [A("form", {
3171
+ default: Z(() => [A("form", {
3156
3172
  class: "flex items-center gap-2 py-1 pr-1 pl-3",
3157
3173
  role: "search",
3158
- onSubmit: se(S, ["prevent"])
3174
+ onSubmit: ce(S, ["prevent"])
3159
3175
  }, [
3160
3176
  N(e, {
3161
3177
  name: "search",
@@ -3166,31 +3182,31 @@ var wn = {
3166
3182
  value: u.value,
3167
3183
  type: "search",
3168
3184
  enterkeyhint: "search",
3169
- placeholder: t.placeholder ?? X(o).mapSearchPlaces,
3170
- "aria-label": t.placeholder ?? X(o).mapSearchPlaces,
3185
+ placeholder: t.placeholder ?? J(o).mapSearchPlaces,
3186
+ "aria-label": t.placeholder ?? J(o).mapSearchPlaces,
3171
3187
  class: "min-w-0 flex-1 bg-transparent py-2 text-body-medium text-on-surface outline-none placeholder:text-on-surface-variant [&::-webkit-search-cancel-button]:hidden",
3172
3188
  onInput: r[0] ||= (e) => w(e.target.value),
3173
3189
  onFocus: r[1] ||= (e) => m.value = p.value && !h.value
3174
- }, null, 40, Dn),
3175
- f.value ? (H(), D(b, {
3190
+ }, null, 40, On),
3191
+ f.value ? (V(), D(b, {
3176
3192
  key: 0,
3177
3193
  size: 20,
3178
3194
  class: "mr-2 shrink-0"
3179
- })) : u.value ? (H(), D(a, {
3195
+ })) : u.value ? (V(), D(a, {
3180
3196
  key: 1,
3181
3197
  icon: "close",
3182
- label: X(o).clearSearch,
3198
+ label: J(o).clearSearch,
3183
3199
  size: "sm",
3184
3200
  onClick: j
3185
3201
  }, null, 8, ["label"])) : O("", !0)
3186
- ], 32), m.value && p.value && !f.value ? (H(), k("div", On, [d.value.length ? (H(), D(_, {
3202
+ ], 32), m.value && p.value && !f.value ? (V(), k("div", kn, [d.value.length ? (V(), D(_, {
3187
3203
  key: 0,
3188
3204
  class: "max-h-72 overflow-y-auto"
3189
3205
  }, {
3190
- default: Q(() => [(H(!0), k(C, null, re(d.value, (e, t) => (H(), D(y, {
3206
+ default: Z(() => [(V(!0), k(C, null, ie(d.value, (e, t) => (V(), D(y, {
3191
3207
  key: t,
3192
3208
  title: e.label,
3193
- icon: X(Tn)(e.type),
3209
+ icon: J(En)(e.type),
3194
3210
  leading: "icon",
3195
3211
  clickable: "",
3196
3212
  onClick: (t) => T(e)
@@ -3200,39 +3216,39 @@ var wn = {
3200
3216
  "onClick"
3201
3217
  ]))), 128))]),
3202
3218
  _: 1
3203
- })) : (H(), k("div", kn, [N(e, {
3219
+ })) : (V(), k("div", An, [N(e, {
3204
3220
  name: "search_off",
3205
3221
  size: 28,
3206
3222
  class: "text-on-surface-variant"
3207
- }), A("span", An, J(X(o).noResults), 1)]))])) : O("", !0)]),
3223
+ }), A("span", jn, q(J(o).noResults), 1)]))])) : O("", !0)]),
3208
3224
  _: 1
3209
3225
  })]),
3210
3226
  _: 1
3211
- }, 8, ["position"]), t.marker && h.value ? (H(), D(Me, {
3227
+ }, 8, ["position"]), t.marker && h.value ? (V(), D(Me, {
3212
3228
  key: 0,
3213
3229
  "lng-lat": h.value.lngLat
3214
3230
  }, null, 8, ["lng-lat"])) : O("", !0)]));
3215
3231
  }
3216
- }), Mn = ["aria-label"], Nn = {
3232
+ }), Nn = ["aria-label"], Pn = {
3217
3233
  key: 0,
3218
3234
  class: "flex items-center gap-3 px-4 py-3 text-body-medium text-on-surface-variant",
3219
3235
  role: "status"
3220
- }, Pn = {
3236
+ }, Fn = {
3221
3237
  key: 1,
3222
3238
  class: "flex items-center gap-3 px-4 py-3 text-body-medium text-on-surface-variant"
3223
- }, Fn = {
3239
+ }, In = {
3224
3240
  key: 2,
3225
3241
  class: "flex items-center gap-3 px-4 py-3 text-body-medium text-on-surface-variant",
3226
3242
  role: "status"
3227
- }, In = [
3243
+ }, Ln = [
3228
3244
  "id",
3229
3245
  "aria-selected",
3230
3246
  "onMousedown",
3231
3247
  "onMousemove"
3232
- ], Ln = { class: "flex min-w-0 flex-col" }, Rn = { class: "truncate text-body-large" }, zn = {
3248
+ ], Rn = { class: "flex min-w-0 flex-col" }, zn = { class: "truncate text-body-large" }, Bn = {
3233
3249
  key: 0,
3234
3250
  class: "truncate text-body-small text-on-surface-variant"
3235
- }, Bn = /* @__PURE__ */ P({
3251
+ }, Vn = /* @__PURE__ */ P({
3236
3252
  inheritAttrs: !1,
3237
3253
  __name: "MAddressField",
3238
3254
  props: {
@@ -3263,7 +3279,7 @@ var wn = {
3263
3279
  "blur"
3264
3280
  ],
3265
3281
  setup(t, { expose: n, emit: r }) {
3266
- let i = t, o = r, c = s(), l = ie(), d = `${l}-list`, f = (e) => `${l}-opt-${e}`, h = E(() => i.provider ?? Cn()), _ = G(i.modelValue?.label ?? ""), v = q([]), y = G(!1), T = G(!1), j = G(!1), P = G(!1), F = G(-1), I, L, B = G(), V = x({
3282
+ let i = t, o = r, c = s(), l = oe(), d = `${l}-list`, f = (e) => `${l}-opt-${e}`, h = E(() => i.provider ?? wn()), _ = W(i.modelValue?.label ?? ""), v = K([]), y = W(!1), T = W(!1), j = W(!1), P = W(!1), F = W(-1), I, L, B = W(), re = x({
3267
3283
  value: () => i.modelValue,
3268
3284
  rules: () => i.rules,
3269
3285
  required: () => i.required,
@@ -3274,15 +3290,15 @@ var wn = {
3274
3290
  validateDebounce: () => i.validateDebounce,
3275
3291
  disabled: () => i.disabled,
3276
3292
  focus: () => B.value?.focus(),
3277
- el: () => Y.value,
3293
+ el: () => ae.value,
3278
3294
  setValue: (e) => o("update:modelValue", e ?? null)
3279
- }), W = V.disabled, K = E(() => V.message.value || V.hasError.value);
3280
- U(S, null);
3281
- let Y = G(), ae = G(), ce = E(() => Y.value?.firstElementChild?.firstElementChild ?? null), le = G({}), ue = E(() => _.value.trim().length >= i.minLength), de = E(() => !i.instant && j.value && ue.value && !T.value && !y.value && !i.modelValue);
3282
- Z(() => i.modelValue, (e) => {
3295
+ }), U = re.disabled, G = E(() => re.message.value || re.hasError.value);
3296
+ H(S, null);
3297
+ let ae = W(), se = W(), le = E(() => ae.value?.firstElementChild?.firstElementChild ?? null), ue = W({}), de = E(() => _.value.trim().length >= i.minLength), fe = E(() => !i.instant && j.value && de.value && !T.value && !y.value && !i.modelValue);
3298
+ Y(() => i.modelValue, (e) => {
3283
3299
  e && e.label !== _.value ? _.value = e.label : !e && !j.value && (_.value = "");
3284
3300
  });
3285
- async function fe() {
3301
+ async function pe() {
3286
3302
  let e = _.value.trim();
3287
3303
  if (e.length < i.minLength) return;
3288
3304
  I?.abort(), clearTimeout(L), I = new AbortController();
@@ -3297,104 +3313,104 @@ var wn = {
3297
3313
  I === t && (y.value = !1, T.value = !0);
3298
3314
  }
3299
3315
  }
3300
- function pe(e) {
3301
- _.value = String(e), T.value = !1, v.value = [], F.value = -1, i.modelValue && o("update:modelValue", null), I?.abort(), y.value = !1, clearTimeout(L), ue.value ? (P.value = !i.instant, i.instant && (L = setTimeout(fe, i.debounce))) : P.value = !1;
3302
- }
3303
3316
  function me(e) {
3317
+ _.value = String(e), T.value = !1, v.value = [], F.value = -1, i.modelValue && o("update:modelValue", null), I?.abort(), y.value = !1, clearTimeout(L), de.value ? (P.value = !i.instant, i.instant && (L = setTimeout(pe, i.debounce))) : P.value = !1;
3318
+ }
3319
+ function he(e) {
3304
3320
  _.value = e.label, P.value = !1, v.value = [], T.value = !1, o("update:modelValue", e), o("select", e);
3305
3321
  }
3306
- function he() {
3322
+ function ge() {
3307
3323
  I?.abort(), clearTimeout(L), _.value = "", v.value = [], T.value = !1, y.value = !1, P.value = !1, i.modelValue && o("update:modelValue", null), B.value?.focus();
3308
3324
  }
3309
- function ge(e) {
3325
+ function _e(e) {
3310
3326
  if (e.key === "Enter") {
3311
3327
  e.preventDefault();
3312
3328
  let t = v.value[F.value];
3313
- P.value && t && T.value ? me(t) : fe();
3329
+ P.value && t && T.value ? he(t) : pe();
3314
3330
  } else if (e.key === "ArrowDown" || e.key === "ArrowUp") {
3315
3331
  if (!P.value || !v.value.length) return;
3316
3332
  e.preventDefault();
3317
3333
  let t = v.value.length;
3318
- F.value = (F.value + (e.key === "ArrowDown" ? 1 : -1) + t) % t, ee(() => ae.value?.querySelector(`#${CSS.escape(f(F.value))}`)?.scrollIntoView({ block: "nearest" }));
3334
+ F.value = (F.value + (e.key === "ArrowDown" ? 1 : -1) + t) % t, ee(() => se.value?.querySelector(`#${CSS.escape(f(F.value))}`)?.scrollIntoView({ block: "nearest" }));
3319
3335
  }
3320
3336
  }
3321
- function _e() {
3322
- j.value = !0, (T.value && v.value.length && !i.modelValue || de.value) && (P.value = !0);
3337
+ function ve() {
3338
+ j.value = !0, (T.value && v.value.length && !i.modelValue || fe.value) && (P.value = !0);
3323
3339
  }
3324
- function ve(e) {
3340
+ function ye(e) {
3325
3341
  let t = e.relatedTarget;
3326
- t && (Y.value?.contains(t) || ae.value?.contains(t)) || (j.value = !1, P.value = !1, V.onBlur(), o("blur"));
3342
+ t && (ae.value?.contains(t) || se.value?.contains(t)) || (j.value = !1, P.value = !1, re.onBlur(), o("blur"));
3327
3343
  }
3328
3344
  m(() => P.value, () => P.value = !1);
3329
- let ye = E(() => P.value && (y.value || T.value || de.value));
3330
- function be() {
3331
- let e = ce.value?.getBoundingClientRect(), t = ae.value;
3345
+ let be = E(() => P.value && (y.value || T.value || fe.value));
3346
+ function xe() {
3347
+ let e = le.value?.getBoundingClientRect(), t = se.value;
3332
3348
  if (!e || !t) return;
3333
3349
  let n = t.offsetHeight, r = p([e.bottom + 4, e.top - 4 - n], n, window.innerHeight, 8);
3334
- le.value = {
3350
+ ue.value = {
3335
3351
  top: `${r}px`,
3336
3352
  left: `${e.left}px`,
3337
3353
  width: `${e.width}px`
3338
3354
  };
3339
3355
  }
3340
- Z([
3341
- ye,
3356
+ Y([
3357
+ be,
3342
3358
  v,
3343
3359
  y
3344
- ], () => ee(be)), g({
3345
- open: () => ye.value,
3346
- anchor: ce,
3347
- popup: ae,
3348
- place: be,
3360
+ ], () => ee(xe)), g({
3361
+ open: () => be.value,
3362
+ anchor: le,
3363
+ popup: se,
3364
+ place: xe,
3349
3365
  close: () => P.value = !1
3350
- }), oe(() => {
3366
+ }), X(() => {
3351
3367
  let e = B.value?.inputEl;
3352
- e && (e.setAttribute("role", "combobox"), e.setAttribute("aria-autocomplete", "list"), e.setAttribute("aria-expanded", String(ye.value && v.value.length > 0)), e.setAttribute("aria-controls", d), e.setAttribute("enterkeyhint", "search"), ye.value && F.value >= 0 && v.value.length ? e.setAttribute("aria-activedescendant", f(F.value)) : e.removeAttribute("aria-activedescendant"));
3368
+ e && (e.setAttribute("role", "combobox"), e.setAttribute("aria-autocomplete", "list"), e.setAttribute("aria-expanded", String(be.value && v.value.length > 0)), e.setAttribute("aria-controls", d), e.setAttribute("enterkeyhint", "search"), be.value && F.value >= 0 && v.value.length ? e.setAttribute("aria-activedescendant", f(F.value)) : e.removeAttribute("aria-activedescendant"));
3353
3369
  }), ne(() => {
3354
3370
  I?.abort(), clearTimeout(L);
3355
3371
  });
3356
- function xe(e) {
3372
+ function Q(e) {
3357
3373
  let t = e.indexOf(", ");
3358
3374
  return t < 0 ? [e, ""] : [e.slice(0, t), e.slice(t + 2)];
3359
3375
  }
3360
3376
  return n({
3361
- search: fe,
3362
- clear: he,
3377
+ search: pe,
3378
+ clear: ge,
3363
3379
  focus: () => B.value?.focus(),
3364
- validate: V.validate,
3365
- resetValidation: V.resetValidation
3366
- }), (n, r) => (H(), k(C, null, [A("div", R({
3380
+ validate: re.validate,
3381
+ resetValidation: re.resetValidation
3382
+ }), (n, r) => (V(), k(C, null, [A("div", R({
3367
3383
  ref_key: "wrapEl",
3368
- ref: Y
3384
+ ref: ae
3369
3385
  }, n.$attrs, {
3370
- onFocusin: _e,
3371
- onFocusout: ve,
3372
- onKeydown: ge
3386
+ onFocusin: ve,
3387
+ onFocusout: ye,
3388
+ onKeydown: _e
3373
3389
  }), [N(u, {
3374
3390
  ref_key: "field",
3375
3391
  ref: B,
3376
3392
  "model-value": _.value,
3377
- label: t.label ?? X(c).mapAddress,
3393
+ label: t.label ?? J(c).mapAddress,
3378
3394
  variant: t.variant,
3379
3395
  "leading-icon": t.leadingIcon,
3380
3396
  hint: t.hint,
3381
- error: K.value,
3397
+ error: G.value,
3382
3398
  required: t.required,
3383
- disabled: X(W),
3399
+ disabled: J(U),
3384
3400
  autocomplete: "street-address",
3385
- "onUpdate:modelValue": pe
3401
+ "onUpdate:modelValue": me
3386
3402
  }, {
3387
- trailing: Q(() => [y.value ? (H(), D(b, {
3403
+ trailing: Z(() => [y.value ? (V(), D(b, {
3388
3404
  key: 0,
3389
3405
  size: 20,
3390
3406
  class: "m-2"
3391
- })) : _.value ? (H(), D(a, {
3407
+ })) : _.value ? (V(), D(a, {
3392
3408
  key: 1,
3393
3409
  icon: "close",
3394
- label: X(c).clearSearch,
3410
+ label: J(c).clearSearch,
3395
3411
  size: "sm",
3396
- disabled: X(W),
3397
- onClick: he
3412
+ disabled: J(U),
3413
+ onClick: ge
3398
3414
  }, null, 8, ["label", "disabled"])) : O("", !0)]),
3399
3415
  _: 1
3400
3416
  }, 8, [
@@ -3406,36 +3422,36 @@ var wn = {
3406
3422
  "error",
3407
3423
  "required",
3408
3424
  "disabled"
3409
- ])], 16), (H(), D(w, { to: "body" }, [ye.value ? (H(), k("div", {
3425
+ ])], 16), (V(), D(w, { to: "body" }, [be.value ? (V(), k("div", {
3410
3426
  key: 0,
3411
3427
  id: d,
3412
3428
  ref_key: "listEl",
3413
- ref: ae,
3429
+ ref: se,
3414
3430
  role: "listbox",
3415
- "aria-label": t.label ?? X(c).mapAddress,
3431
+ "aria-label": t.label ?? J(c).mapAddress,
3416
3432
  class: "fixed z-500 max-h-72 overflow-auto rounded-xs bg-surface-container py-1 shadow-elevation-2",
3417
- style: te(le.value)
3418
- }, [y.value ? (H(), k("div", Nn, [N(b, { size: 20 }), M(J(X(c).mapSearching), 1)])) : de.value ? (H(), k("div", Pn, [N(e, {
3433
+ style: te(ue.value)
3434
+ }, [y.value ? (V(), k("div", Pn, [N(b, { size: 20 }), M(q(J(c).mapSearching), 1)])) : fe.value ? (V(), k("div", Fn, [N(e, {
3419
3435
  name: "keyboard_return",
3420
3436
  size: 20
3421
- }), M(J(X(c).mapPressEnterToSearch), 1)])) : v.value.length ? (H(!0), k(C, { key: 3 }, re(v.value, (t, n) => (H(), k("div", {
3437
+ }), M(q(J(c).mapPressEnterToSearch), 1)])) : v.value.length ? (V(!0), k(C, { key: 3 }, ie(v.value, (t, n) => (V(), k("div", {
3422
3438
  id: f(n),
3423
3439
  key: n,
3424
3440
  role: "option",
3425
3441
  "aria-selected": n === F.value,
3426
3442
  class: z(["flex cursor-pointer items-center gap-3 px-4 py-2 text-on-surface hover:bg-on-surface/8", n === F.value ? "bg-on-surface/12" : ""]),
3427
- onMousedown: se((e) => me(t), ["prevent"]),
3443
+ onMousedown: ce((e) => he(t), ["prevent"]),
3428
3444
  onMousemove: (e) => F.value = n
3429
3445
  }, [N(e, {
3430
- name: X(Tn)(t.type),
3446
+ name: J(En)(t.type),
3431
3447
  size: 20,
3432
3448
  class: "shrink-0 text-on-surface-variant"
3433
- }, null, 8, ["name"]), A("span", Ln, [A("span", Rn, J(xe(t.label)[0]), 1), xe(t.label)[1] ? (H(), k("span", zn, J(xe(t.label)[1]), 1)) : O("", !0)])], 42, In))), 128)) : (H(), k("div", Fn, [N(e, {
3449
+ }, null, 8, ["name"]), A("span", Rn, [A("span", zn, q(Q(t.label)[0]), 1), Q(t.label)[1] ? (V(), k("span", Bn, q(Q(t.label)[1]), 1)) : O("", !0)])], 42, Ln))), 128)) : (V(), k("div", In, [N(e, {
3434
3450
  name: "search_off",
3435
3451
  size: 20
3436
- }), M(J(X(c).mapNoPlaces), 1)]))], 12, Mn)) : O("", !0)]))], 64));
3452
+ }), M(q(J(c).mapNoPlaces), 1)]))], 12, Nn)) : O("", !0)]))], 64));
3437
3453
  }
3438
3454
  });
3439
- export { Bn as MAddressField, Ee as MMap, Nt as MMapBaseLayers, Le as MMapCluster, ge as MMapControl, vn as MMapDraw, Ht as MMapFeatureInfo, Sn as MMapFilter, Fe as MMapGeoJson, on as MMapHover, Qt as MMapIdentify, kt as MMapLayers, Me as MMapMarker, fn as MMapMeasure, Pe as MMapPopup, at as MMapRoute, jn as MMapSearch, qt as fieldLabel, Jt as formatFieldValue, Gt as genericAdapter, Xt as identifyFeatures, Cn as nominatimProvider, Kt as orvianAdapter, ot as osrmRouteProvider, le as setMapWorker, pe as useMap, bn as useMapFilter, Ce as useMapLayers };
3455
+ export { Vn as MAddressField, Ee as MMap, Pt as MMapBaseLayers, Le as MMapCluster, _e as MMapControl, yn as MMapDraw, Ut as MMapFeatureInfo, Cn as MMapFilter, Fe as MMapGeoJson, sn as MMapHover, $t as MMapIdentify, At as MMapLayers, Me as MMapMarker, pn as MMapMeasure, Pe as MMapPopup, ot as MMapRoute, Mn as MMapSearch, Jt as fieldLabel, Yt as formatFieldValue, Kt as genericAdapter, Zt as identifyFeatures, wn as nominatimProvider, qt as orvianAdapter, st as osrmRouteProvider, ue as setMapWorker, me as useMap, xn as useMapFilter, Ce as useMapLayers };
3440
3456
 
3441
3457
  //# sourceMappingURL=map.js.map