@opengis/gis 0.2.128 → 0.2.130

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 (25) hide show
  1. package/dist/{CardIcon-DgpYeKbG.js → CardIcon-BeZkp0PF.js} +1 -1
  2. package/dist/{EntityTablePage-DNdVavT4.js → EntityTablePage-A1oEJgB4.js} +1 -1
  3. package/dist/{ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-DQnIBCpE.js → ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-Wr8oJ-ni.js} +24 -22
  4. package/dist/{HeaderActions.vue_vue_type_script_setup_true_lang-Cg2y4sIa.js → HeaderActions.vue_vue_type_script_setup_true_lang-6BnXldBs.js} +345 -321
  5. package/dist/{MapSettings-CHF3VpUu.js → MapSettings-EmXkXJ90.js} +12 -12
  6. package/dist/{RastersTablePage-Ci3P3r4c.js → RastersTablePage-Cgecxbky.js} +1 -1
  7. package/dist/cartocss-C29B9mz3.js +1024 -0
  8. package/dist/{import-utils-ElncWVJV.js → import-utils-CFjQD50e.js} +1 -1
  9. package/dist/{index-UGx54M0Q.js → index-1vaLWtnh.js} +377 -386
  10. package/dist/index.css +1 -1
  11. package/dist/index.js +4 -4
  12. package/dist/index.umd.cjs +41 -41
  13. package/dist/raster-DFuH49fc.js +792 -0
  14. package/dist/{register-BfNUPbey.js → register-COO0Y_MS.js} +3 -3
  15. package/dist/{service-DsykdHry.js → service-DagZaIev.js} +911 -879
  16. package/dist/{vs-datatable-D6g7tjZo.js → vs-datatable-BaMRTZVi.js} +1 -1
  17. package/package.json +2 -2
  18. package/server/routes/gis/cartocss/get.cartocss.js +11 -2
  19. package/server/routes/gis/registers/add.registry.js +3 -4
  20. package/server/routes/gis/registers/funcs/columns.js +2 -4
  21. package/server/routes/mapnik/controllers/pretile.js +6 -7
  22. package/server/routes/mapnik/controllers/rasterInfo.js +5 -1
  23. package/server/routes/mapnik/functions/cartoBounds.js +6 -2
  24. package/dist/cartocss-BsaIlSRb.js +0 -894
  25. package/dist/raster-BDWEafwx.js +0 -663
@@ -1,7 +1,7 @@
1
- import { defineComponent as he, useSlots as tr, computed as B, openBlock as o, createBlock as fe, resolveDynamicComponent as qn, createSlots as Co, renderList as ve, unref as oe, withCtx as St, renderSlot as gn, normalizeProps as nr, guardReactiveProps as or, defineAsyncComponent as Ge, createElementVNode as e, normalizeClass as Ce, toDisplayString as G, createElementBlock as g, createVNode as pe, ref as N, onMounted as Be, watch as de, createCommentVNode as K, Fragment as ee, withModifiers as Je, Teleport as Mt, createTextVNode as ke, normalizeStyle as rt, withDirectives as et, withKeys as no, vModelText as $t, nextTick as Xe, shallowRef as Lo, onUnmounted as So, provide as rr, inject as sr, getCurrentInstance as Gt, onBeforeUnmount as De, reactive as bt, createStaticVNode as Eo, Transition as Wn, vShow as pn, vModelRadio as lr } from "vue";
2
- import { useRoute as At, useRouter as Dt } from "vue-router";
3
- import { Loader2 as Mo, Code as ar, Layers as ir, ClipboardCopy as ur, ChevronRight as cr, Search as Ao, X as on, Plus as Zn, SquarePen as dr, Check as fr, ChevronDown as To, EyeOff as pr, Contrast as gr, ChevronUp as vr, ArrowLeft as oo, ArrowRight as ro, House as mr, MapPin as Sn, ArrowUpLeft as hr, Trash2 as Po, Circle as zo, Info as Ln, Ruler as Fo, ClipboardPaste as yr, Pen as Un, Undo2 as br, Pentagon as so, Download as xr, Minus as wr, Square as _r, PaintBucket as kr, Eraser as $r } from "lucide-vue-next";
4
- import { VsPagination as Cr, notify as yt } from "@opengis/core";
1
+ import { defineComponent as he, useSlots as tr, computed as B, openBlock as o, createBlock as fe, resolveDynamicComponent as qn, createSlots as Co, renderList as ve, unref as oe, withCtx as St, renderSlot as gn, normalizeProps as nr, guardReactiveProps as or, defineAsyncComponent as Ge, createElementVNode as e, normalizeClass as Ce, toDisplayString as G, createElementBlock as g, createVNode as pe, ref as N, onMounted as Be, watch as de, createCommentVNode as K, Fragment as ee, withModifiers as Je, Teleport as Mt, createTextVNode as ke, normalizeStyle as rt, withDirectives as et, withKeys as no, vModelText as kt, nextTick as Xe, shallowRef as Lo, onUnmounted as So, provide as rr, inject as sr, getCurrentInstance as Gt, onBeforeUnmount as De, reactive as yt, createStaticVNode as Eo, Transition as Wn, vShow as pn, vModelRadio as lr } from "vue";
2
+ import { useRoute as At, useRouter as Ot } from "vue-router";
3
+ import { Loader2 as Mo, Code as ar, Layers as ir, ClipboardCopy as ur, ChevronRight as cr, Search as Ao, X as nn, Plus as Zn, SquarePen as dr, Check as fr, ChevronDown as To, EyeOff as pr, Contrast as gr, ChevronUp as vr, ArrowLeft as oo, ArrowRight as ro, House as mr, MapPin as Sn, ArrowUpLeft as hr, Trash2 as Po, Circle as zo, Info as Ln, Ruler as Fo, ClipboardPaste as yr, Pen as Un, Undo2 as br, Pentagon as so, Download as xr, Minus as wr, Square as _r, PaintBucket as kr, Eraser as $r } from "lucide-vue-next";
4
+ import { VsPagination as Cr, notify as _t } from "@opengis/core";
5
5
  import { VsInputMask as Lr } from "@opengis/form";
6
6
  const vn = /* @__PURE__ */ he({
7
7
  __name: "BaseEntityWrapper",
@@ -35,12 +35,12 @@ const vn = /* @__PURE__ */ he({
35
35
  __name: "RegistersWrapper",
36
36
  setup(n) {
37
37
  const t = Ge(
38
- () => import("./EntityTablePage-DNdVavT4.js")
38
+ () => import("./EntityTablePage-A1oEJgB4.js")
39
39
  ), a = Ge(
40
40
  () => import("./EntityCreatePage-Da8XgBKU.js")
41
41
  ), l = Ge(
42
42
  () => import("./EntityEditPage-QktKEAxz.js")
43
- ), x = Ge(() => import("./register-BfNUPbey.js")), f = {
43
+ ), x = Ge(() => import("./register-COO0Y_MS.js")), f = {
44
44
  table: t,
45
45
  create: a,
46
46
  edit: l,
@@ -86,12 +86,12 @@ const vn = /* @__PURE__ */ he({
86
86
  __name: "DatasetsWrapper",
87
87
  setup(n) {
88
88
  const t = Ge(
89
- () => import("./EntityTablePage-DNdVavT4.js")
89
+ () => import("./EntityTablePage-A1oEJgB4.js")
90
90
  ), a = Ge(
91
91
  () => import("./EntityCreatePage-Da8XgBKU.js")
92
92
  ), l = Ge(
93
93
  () => import("./EntityEditPage-QktKEAxz.js")
94
- ), x = Ge(() => import("./service-DsykdHry.js")), f = {
94
+ ), x = Ge(() => import("./service-DagZaIev.js")), f = {
95
95
  table: t,
96
96
  create: a,
97
97
  edit: l,
@@ -154,12 +154,12 @@ const vn = /* @__PURE__ */ he({
154
154
  __name: "RastersWrapper",
155
155
  setup(n) {
156
156
  const t = Ge(
157
- () => import("./RastersTablePage-Ci3P3r4c.js")
157
+ () => import("./RastersTablePage-Cgecxbky.js")
158
158
  ), a = Ge(
159
159
  () => import("./EntityCreatePage-Da8XgBKU.js")
160
160
  ), l = Ge(
161
161
  () => import("./EntityEditPage-QktKEAxz.js")
162
- ), x = Ge(() => import("./raster-BDWEafwx.js")), f = {
162
+ ), x = Ge(() => import("./raster-DFuH49fc.js")), f = {
163
163
  table: t,
164
164
  create: a,
165
165
  edit: l,
@@ -211,12 +211,12 @@ const vn = /* @__PURE__ */ he({
211
211
  __name: "CartocssWrapper",
212
212
  setup(n) {
213
213
  const t = Ge(
214
- () => import("./EntityTablePage-DNdVavT4.js")
214
+ () => import("./EntityTablePage-A1oEJgB4.js")
215
215
  ), a = Ge(
216
216
  () => import("./EntityCreatePage-Da8XgBKU.js")
217
217
  ), l = Ge(
218
218
  () => import("./EntityEditPage-QktKEAxz.js")
219
- ), x = Ge(() => import("./cartocss-BsaIlSRb.js")), f = {
219
+ ), x = Ge(() => import("./cartocss-C29B9mz3.js")), f = {
220
220
  table: t,
221
221
  create: a,
222
222
  edit: l,
@@ -321,12 +321,12 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
321
321
  __name: "MapsWrapper",
322
322
  setup(n) {
323
323
  const t = Ge(
324
- () => import("./EntityTablePage-DNdVavT4.js")
324
+ () => import("./EntityTablePage-A1oEJgB4.js")
325
325
  ), a = Ge(
326
326
  () => import("./EntityCreatePage-Da8XgBKU.js")
327
327
  ), l = Ge(
328
328
  () => import("./EntityEditPage-QktKEAxz.js")
329
- ), x = Ge(() => import("./MapSettings-CHF3VpUu.js")), f = {
329
+ ), x = Ge(() => import("./MapSettings-EmXkXJ90.js")), f = {
330
330
  table: t,
331
331
  create: a,
332
332
  edit: l,
@@ -418,7 +418,7 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
418
418
  },
419
419
  emits: ["update:counts"],
420
420
  setup(n, { expose: t, emit: a }) {
421
- const l = n, x = a, f = Dt(), v = At(), p = N(Number(v.query.page) || 1), P = N(!1), E = N(0), A = N([]), c = B(() => {
421
+ const l = n, x = a, f = Ot(), v = At(), p = N(Number(v.query.page) || 1), P = N(!1), E = N(0), A = N([]), c = B(() => {
422
422
  const w = (p.value - 1) * Rn, T = w + Rn;
423
423
  return A.value.slice(w, T);
424
424
  }), b = N(!0), r = N(null), u = N(null);
@@ -643,7 +643,7 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
643
643
  class: "absolute top-1/2 -translate-y-1/2 right-3 cursor-pointer text-gray-400 hover:text-gray-600",
644
644
  onClick: p[1] || (p[1] = (P) => v.$emit("update:modelValue", ""))
645
645
  }, [
646
- pe(oe(on), {
646
+ pe(oe(nn), {
647
647
  width: 14,
648
648
  height: 14,
649
649
  "stroke-width": 2
@@ -786,7 +786,7 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
786
786
  }, Us = ["disabled"], Vs = ["disabled"], qs = { class: "flex items-center gap-3" }, Ws = { class: "bg-white rounded-lg shadow-sm border border-gray-200 p-4 mb-4" }, Zs = { class: "relative max-w-md" }, Hs = { class: "vs-form-text relative w-full border-transparent text-sm focus:bg-white focus:border-blue-500 focus:ring-blue-500 rounded-sm" }, Gs = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3" }, Ys = /* @__PURE__ */ he({
787
787
  __name: "DictionaryDetails",
788
788
  setup(n) {
789
- const t = Dt(), a = At(), l = B(() => a.params.name), x = N(!1), f = N(null), v = N(null), p = N(""), P = N(""), E = N(""), A = N(!1), c = N(!1), b = N(null), r = async () => {
789
+ const t = Ot(), a = At(), l = B(() => a.params.name), x = N(!1), f = N(null), v = N(null), p = N(""), P = N(""), E = N(""), A = N(!1), c = N(!1), b = N(null), r = async () => {
790
790
  var L;
791
791
  try {
792
792
  const $ = await fetch(
@@ -869,7 +869,7 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
869
869
  ],
870
870
  placeholder: "Введіть опис"
871
871
  }, null, 544), [
872
- [$t, E.value]
872
+ [kt, E.value]
873
873
  ]),
874
874
  e("button", {
875
875
  onClick: d,
@@ -887,7 +887,7 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
887
887
  disabled: c.value,
888
888
  class: "p-1.5 text-gray-400 hover:text-red-500 hover:bg-red-50 rounded transition-colors"
889
889
  }, [
890
- pe(oe(on), {
890
+ pe(oe(nn), {
891
891
  width: 18,
892
892
  height: 18,
893
893
  "stroke-width": 2
@@ -945,7 +945,7 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
945
945
  placeholder: "Пошук за назвою або описом...",
946
946
  class: "pl-9 bg-white h-[38px] min-w-[100px] py-2 px-3 block w-full border border-solid placeholder:text-nowrap border-stone-200 text-sm text-stone-800 placeholder:text-stone-400 focus:border-2 focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500 rounded-lg"
947
947
  }, null, 512), [
948
- [$t, p.value]
948
+ [kt, p.value]
949
949
  ])
950
950
  ])
951
951
  ])
@@ -1217,13 +1217,13 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
1217
1217
  headers: { "Content-Type": "application/json" },
1218
1218
  body: JSON.stringify(r)
1219
1219
  }).then((d) => d.json()).then((d) => {
1220
- yt({
1220
+ _t({
1221
1221
  title: "Успіх",
1222
1222
  message: "Доступ успішно збережено",
1223
1223
  type: "success"
1224
1224
  });
1225
1225
  }).catch((d) => {
1226
- yt({ title: "Помилка", message: d.message, type: "error" });
1226
+ _t({ title: "Помилка", message: d.message, type: "error" });
1227
1227
  });
1228
1228
  };
1229
1229
  return Be(A), (b, r) => (o(), g("div", bl, [
@@ -1235,7 +1235,7 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
1235
1235
  placeholder: "Пошук...",
1236
1236
  class: "w-full pl-3 pr-4 py-2 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
1237
1237
  }, null, 512), [
1238
- [$t, a.value]
1238
+ [kt, a.value]
1239
1239
  ])
1240
1240
  ]),
1241
1241
  e("button", {
@@ -1258,7 +1258,7 @@ const Nr = /* @__PURE__ */ Ue(Rr, [["render", jr]]), Or = { class: "gap-2 inline
1258
1258
  ]));
1259
1259
  }
1260
1260
  });
1261
- function en(n) {
1261
+ function Qt(n) {
1262
1262
  if (n == null) return null;
1263
1263
  const t = Number(typeof n == "string" ? n.trim() : n);
1264
1264
  return Number.isFinite(t) ? t : null;
@@ -1266,7 +1266,7 @@ function en(n) {
1266
1266
  function Ht(n) {
1267
1267
  if (!n) return null;
1268
1268
  if (Array.isArray(n) && n.length >= 2) {
1269
- const t = en(n[0]), a = en(n[1]);
1269
+ const t = Qt(n[0]), a = Qt(n[1]);
1270
1270
  return t != null && a != null ? [t, a] : null;
1271
1271
  }
1272
1272
  if (typeof n == "object") {
@@ -1275,13 +1275,13 @@ function Ht(n) {
1275
1275
  return Ht(t.coordinates);
1276
1276
  const a = t.lng ?? t.lon ?? t.long ?? t.longitude ?? t.x, l = t.lat ?? t.latitude ?? t.y;
1277
1277
  if (a != null && l != null) {
1278
- const x = en(a), f = en(l);
1278
+ const x = Qt(a), f = Qt(l);
1279
1279
  if (x != null && f != null)
1280
1280
  return [x, f];
1281
1281
  }
1282
1282
  }
1283
1283
  if (typeof n == "string" && n.includes(",")) {
1284
- const [t, a] = n.split(","), l = en(t), x = en(a);
1284
+ const [t, a] = n.split(","), l = Qt(t), x = Qt(a);
1285
1285
  return l != null && x != null ? [l, x] : null;
1286
1286
  }
1287
1287
  return null;
@@ -1561,7 +1561,7 @@ function zl(n, t = {}) {
1561
1561
  const ie = Pl(t.filter, t.excludeClusters);
1562
1562
  return ie && (Y.filter = ie), [Y];
1563
1563
  }
1564
- const nn = "#9ca3af";
1564
+ const tn = "#9ca3af";
1565
1565
  function Fl(n) {
1566
1566
  return !n || typeof n != "object" || Array.isArray(n) ? null : { ...n };
1567
1567
  }
@@ -1573,7 +1573,7 @@ function Gn(n) {
1573
1573
  "match",
1574
1574
  ["get", n.colorAttr],
1575
1575
  ...t,
1576
- nn
1576
+ tn
1577
1577
  // default color
1578
1578
  ];
1579
1579
  }
@@ -1595,7 +1595,7 @@ function Rl(n) {
1595
1595
  n.icon
1596
1596
  ];
1597
1597
  }
1598
- function tn(n, t) {
1598
+ function en(n, t) {
1599
1599
  t && (Array.isArray(t) ? n.push(...t) : n.push(t));
1600
1600
  }
1601
1601
  function Il(n, t) {
@@ -1673,7 +1673,7 @@ function io(n, t) {
1673
1673
  paint: {
1674
1674
  "circle-stroke-color": (n == null ? void 0 : n.stroke) || "#fff",
1675
1675
  "circle-opacity": n.opacity || 1,
1676
- "circle-color": a || n.color || nn,
1676
+ "circle-color": a || n.color || tn,
1677
1677
  "circle-stroke-width": n.width || 1,
1678
1678
  "circle-radius": n.radius || 5
1679
1679
  }
@@ -1686,9 +1686,9 @@ function jl(n) {
1686
1686
  type: "fill",
1687
1687
  minzoom: n.pointZoom || 0,
1688
1688
  paint: {
1689
- "fill-color": t || n.color || nn,
1689
+ "fill-color": t || n.color || tn,
1690
1690
  "fill-opacity": n.opacity || 0.3,
1691
- "fill-outline-color": n.stroke || nn
1691
+ "fill-outline-color": n.stroke || tn
1692
1692
  }
1693
1693
  };
1694
1694
  }
@@ -1696,7 +1696,7 @@ function Nl(n) {
1696
1696
  return {
1697
1697
  type: "line",
1698
1698
  paint: {
1699
- "line-color": Gn(n) || n.color || nn,
1699
+ "line-color": Gn(n) || n.color || tn,
1700
1700
  "line-opacity": n.opacity || 1,
1701
1701
  "line-width": n.width || 1.5
1702
1702
  }
@@ -1719,13 +1719,13 @@ function uo(n, t = {}) {
1719
1719
  if (!n) return [];
1720
1720
  if (!Dl(n)) return [];
1721
1721
  const a = [];
1722
- n.icon && tn(a, Ol(n)), n.pointZoom && tn(a, io(n, n.pointZoom)), n.type === "polygon" ? tn(a, jl(n)) : n.type === "line" ? tn(a, Nl(n)) : tn(a, io(n));
1722
+ n.icon && en(a, Ol(n)), n.pointZoom && en(a, io(n, n.pointZoom)), n.type === "polygon" ? en(a, jl(n)) : n.type === "line" ? en(a, Nl(n)) : en(a, io(n));
1723
1723
  const x = t.sourceType !== "raster" ? zl(n, {
1724
1724
  geometry: n.type || "point",
1725
1725
  filter: n.filter,
1726
1726
  excludeClusters: !!n.clusterZoom
1727
1727
  }) : [];
1728
- return tn(a, x), a.filter(Boolean);
1728
+ return en(a, x), a.filter(Boolean);
1729
1729
  }
1730
1730
  function Dl(n) {
1731
1731
  return n ? !!((/* @__PURE__ */ new Set(["point", "line", "polygon"])).has(n.type) || n.icon || n.attrType || n.color || n.stroke || n.radius || n.width || n.colorAttr && n.colors && typeof n.colors == "object" && Object.keys(n.colors).length > 0) : !1;
@@ -1739,7 +1739,7 @@ function co(n, {
1739
1739
  if (x && a && (x.filter = a), x)
1740
1740
  return uo(x, { sourceType: t });
1741
1741
  if (l && ["vector", "geojson"].includes(t || "")) {
1742
- const f = { type: "point", color: nn };
1742
+ const f = { type: "point", color: tn };
1743
1743
  return a && (f.filter = a), uo(f, { sourceType: t });
1744
1744
  }
1745
1745
  return [];
@@ -1781,11 +1781,11 @@ function Oe(n, t, a) {
1781
1781
  p.point && (p.source = Bl(p.point)), !p.layer && ((ie = p.source) == null ? void 0 : ie.type) === "raster" && (p.layer = { id: v, type: "raster", source: v }), p.layer && !p.layer.source && Object.assign(p.layer, { source: v });
1782
1782
  let P = !1, E = !1;
1783
1783
  const A = () => {
1784
- var J, te, W, F, S, R, y, m, M, D;
1784
+ var J, te, q, F, S, R, y, m, M, D;
1785
1785
  if (!(E || !l.value)) {
1786
1786
  if (p.source && !l.value.getSource(v) && l.value.addSource(v, p.source), !l.value.getLayer(f)) {
1787
1787
  const X = p.beforeId === 0 ? (te = (J = l.value.getStyle().layers) == null ? void 0 : J[0]) == null ? void 0 : te.id : p.beforeId;
1788
- (F = (W = p.layer) == null ? void 0 : W.style) != null && F.icon && fo(l.value, p.layer.style.icon, p.layer.style.colors);
1788
+ (F = (q = p.layer) == null ? void 0 : q.style) != null && F.icon && fo(l.value, p.layer.style.icon, p.layer.style.colors);
1789
1789
  const re = ((S = p.source) == null ? void 0 : S.type) || ((R = p.layer) == null ? void 0 : R.type), ue = p.layer && (p.layer.type || p.layer.ref) ? p.layer : null, ge = (y = p.layer) == null ? void 0 : y.style, Se = ((m = p.layer) == null ? void 0 : m["source-layer"]) || ((M = p.source) == null ? void 0 : M["source-layer"]) || p.sourceLayer || v, we = p.style || ge, Ae = co(we, {
1790
1790
  sourceType: re,
1791
1791
  filter: (D = p.layer) == null ? void 0 : D.filter,
@@ -1812,27 +1812,27 @@ function Oe(n, t, a) {
1812
1812
  };
1813
1813
  x().then(A);
1814
1814
  const c = (J, te) => l.value ? (l.value.on(J, f, te), () => {
1815
- var W;
1816
- return (W = l.value) == null ? void 0 : W.off(J, f, te);
1815
+ var q;
1816
+ return (q = l.value) == null ? void 0 : q.off(J, f, te);
1817
1817
  }) : () => {
1818
1818
  }, b = (J) => {
1819
1819
  const te = l.value;
1820
1820
  if (!te) return;
1821
- const W = te.getStyle(), F = W == null ? void 0 : W.layers;
1821
+ const q = te.getStyle(), F = q == null ? void 0 : q.layers;
1822
1822
  F != null && F.length && F.filter((S) => S.source === f).forEach((S) => {
1823
1823
  te.setLayoutProperty(S.id, "visibility", J ? "visible" : "none");
1824
1824
  });
1825
1825
  }, r = (J = !0) => {
1826
- var W, F, S;
1826
+ var q, F, S;
1827
1827
  if (!l.value) return;
1828
- (((S = (F = (W = l.value).getStyle) == null ? void 0 : F.call(W)) == null ? void 0 : S.layers) ?? []).filter((R) => R.source === f).forEach((R) => {
1828
+ (((S = (F = (q = l.value).getStyle) == null ? void 0 : F.call(q)) == null ? void 0 : S.layers) ?? []).filter((R) => R.source === f).forEach((R) => {
1829
1829
  l.value.removeLayer(R.id);
1830
1830
  }), E = !0, p.source && J && l.value.getSource(v) && l.value.removeSource(v);
1831
1831
  }, u = async (J) => {
1832
1832
  var S, R, y, m, M;
1833
1833
  if (!l.value) return;
1834
1834
  J != null && J.icon && fo(l.value, J.icon, J.colors);
1835
- const te = ((S = p.source) == null ? void 0 : S.type) || ((R = p.layer) == null ? void 0 : R.type), W = ((y = p.layer) == null ? void 0 : y["source-layer"]) || ((m = p.source) == null ? void 0 : m["source-layer"]) || p.sourceLayer || v, F = co(J, {
1835
+ const te = ((S = p.source) == null ? void 0 : S.type) || ((R = p.layer) == null ? void 0 : R.type), q = ((y = p.layer) == null ? void 0 : y["source-layer"]) || ((m = p.source) == null ? void 0 : m["source-layer"]) || p.sourceLayer || v, F = co(J, {
1836
1836
  sourceType: te,
1837
1837
  filter: (M = p.layer) == null ? void 0 : M.filter,
1838
1838
  allowFallback: !0
@@ -1844,30 +1844,30 @@ function Oe(n, t, a) {
1844
1844
  id: `${f}${X}`,
1845
1845
  source: ((ue = p.layer) == null ? void 0 : ue.source) || v
1846
1846
  };
1847
- te === "vector" && W && (re["source-layer"] = re["source-layer"] || W), l.value.addLayer(re);
1847
+ te === "vector" && q && (re["source-layer"] = re["source-layer"] || q), l.value.addLayer(re);
1848
1848
  });
1849
1849
  }, _ = (J) => {
1850
- l.value && Object.entries(J).forEach(([te, W]) => {
1851
- l.value.setPaintProperty(f, te, W);
1850
+ l.value && Object.entries(J).forEach(([te, q]) => {
1851
+ l.value.setPaintProperty(f, te, q);
1852
1852
  });
1853
- }, d = (J, te, W) => {
1853
+ }, d = (J, te, q) => {
1854
1854
  const F = l.value;
1855
1855
  if (F)
1856
1856
  switch (te) {
1857
1857
  case "raster":
1858
- F.setPaintProperty(J, "raster-opacity", W);
1858
+ F.setPaintProperty(J, "raster-opacity", q);
1859
1859
  break;
1860
1860
  case "fill":
1861
- F.setPaintProperty(J, "fill-opacity", W);
1861
+ F.setPaintProperty(J, "fill-opacity", q);
1862
1862
  break;
1863
1863
  case "line":
1864
- F.setPaintProperty(J, "line-opacity", W);
1864
+ F.setPaintProperty(J, "line-opacity", q);
1865
1865
  break;
1866
1866
  case "circle":
1867
- F.setPaintProperty(J, "circle-opacity", W);
1867
+ F.setPaintProperty(J, "circle-opacity", q);
1868
1868
  break;
1869
1869
  case "symbol":
1870
- F.setPaintProperty(J, "icon-opacity", W), F.setPaintProperty(J, "text-opacity", W);
1870
+ F.setPaintProperty(J, "icon-opacity", q), F.setPaintProperty(J, "text-opacity", q);
1871
1871
  break;
1872
1872
  }
1873
1873
  }, z = {
@@ -1879,8 +1879,8 @@ function Oe(n, t, a) {
1879
1879
  setVisible: b,
1880
1880
  updatePaint: _,
1881
1881
  updateLayout: (J) => {
1882
- l.value && Object.entries(J).forEach(([te, W]) => {
1883
- l.value.setLayoutProperty(f, te, W);
1882
+ l.value && Object.entries(J).forEach(([te, q]) => {
1883
+ l.value.setLayoutProperty(f, te, q);
1884
1884
  });
1885
1885
  },
1886
1886
  updateFilter: (J) => {
@@ -1889,13 +1889,13 @@ function Oe(n, t, a) {
1889
1889
  setOpacity: (J) => {
1890
1890
  var F;
1891
1891
  if (!l.value) return;
1892
- const W = (((F = l.value.getStyle()) == null ? void 0 : F.layers) || []).filter((S) => S.source === v);
1893
- if (!W.length) {
1892
+ const q = (((F = l.value.getStyle()) == null ? void 0 : F.layers) || []).filter((S) => S.source === v);
1893
+ if (!q.length) {
1894
1894
  const S = l.value.getLayer(f);
1895
1895
  S && d(f, S.type, J);
1896
1896
  return;
1897
1897
  }
1898
- W.forEach((S) => d(S.id, S.type, J));
1898
+ q.forEach((S) => d(S.id, S.type, J));
1899
1899
  },
1900
1900
  setData: (J) => {
1901
1901
  if (!l.value) return;
@@ -1909,10 +1909,10 @@ function Oe(n, t, a) {
1909
1909
  },
1910
1910
  setStyle: u,
1911
1911
  setFilter: (J) => {
1912
- var W, F;
1912
+ var q, F;
1913
1913
  if (!l.value) return;
1914
1914
  const te = l.value.getSource(v);
1915
- if (te && "setTiles" in te && ((F = (W = p.source) == null ? void 0 : W.tiles) != null && F[0])) {
1915
+ if (te && "setTiles" in te && ((F = (q = p.source) == null ? void 0 : q.tiles) != null && F[0])) {
1916
1916
  const S = p.source.tiles[0];
1917
1917
  te.setTiles([`${S}${S.includes("?") ? "&" : "?"}filter=${J}`]);
1918
1918
  }
@@ -1972,7 +1972,7 @@ const Ul = { class: "flex flex-row gap-x-3 z-10 relative widget" }, Vl = ["onCli
1972
1972
  C = `${$}-${w}`, w += 1;
1973
1973
  return C;
1974
1974
  }
1975
- const f = Gt(), v = (i = f == null ? void 0 : f.appContext.config.globalProperties) == null ? void 0 : i.$settings, p = v == null ? void 0 : v.map, P = At(), E = Dt();
1975
+ const f = Gt(), v = (i = f == null ? void 0 : f.appContext.config.globalProperties) == null ? void 0 : i.$settings, p = v == null ? void 0 : v.map, P = At(), E = Ot();
1976
1976
  function A() {
1977
1977
  const $ = P == null ? void 0 : P.query;
1978
1978
  return !$ || typeof $ != "object" ? null : typeof $.basemap == "string" ? $.basemap : null;
@@ -2063,7 +2063,7 @@ const Ul = { class: "flex flex-row gap-x-3 z-10 relative widget" }, Vl = ["onCli
2063
2063
  items: {}
2064
2064
  },
2065
2065
  setup(n, { expose: t }) {
2066
- const a = n, l = bt({ open: !1, top: 0, left: 0, transform: "translateX(-50%)" }), x = N(null), f = N(null);
2066
+ const a = n, l = yt({ open: !1, top: 0, left: 0, transform: "translateX(-50%)" }), x = N(null), f = N(null);
2067
2067
  let v = null;
2068
2068
  const p = B(() => l.open ? {
2069
2069
  position: "absolute",
@@ -2182,7 +2182,7 @@ const Ul = { class: "flex flex-row gap-x-3 z-10 relative widget" }, Vl = ["onCli
2182
2182
  },
2183
2183
  setup(n) {
2184
2184
  const t = n, a = N(null), l = N(!1), x = N(null), f = N(null), v = N({ top: 0, left: 0 });
2185
- Dt();
2185
+ Ot();
2186
2186
  const p = N(!0), P = N(!1), E = B(() => Array.isArray(t.links) ? t.links.filter(($) => ($ == null ? void 0 : $.name) && ($ == null ? void 0 : $.slug)) : []), A = B(() => ({
2187
2187
  top: `${v.value.top}px`,
2188
2188
  left: `${v.value.left}px`
@@ -2488,7 +2488,7 @@ const sa = { class: "map-filter" }, la = { class: "map-filter__header" }, aa = {
2488
2488
  count: {},
2489
2489
  layer: {},
2490
2490
  catalogAnchor: {},
2491
- disabled: { type: Boolean }
2491
+ disabled: { type: Boolean, default: !1 }
2492
2492
  },
2493
2493
  setup(n) {
2494
2494
  const t = Ge(() => import("@opengis/filter")), a = n, l = B(() => {
@@ -2498,9 +2498,9 @@ const sa = { class: "map-filter" }, la = { class: "map-filter__header" }, aa = {
2498
2498
  isOpen: f,
2499
2499
  close: v,
2500
2500
  toggle: p
2501
- } = ra(x), P = bt({ top: 0, left: 0, transform: "translateX(-50%)" }), E = N(null), A = N(null);
2501
+ } = ra(x), P = yt({ top: 0, left: 0, transform: "translateX(-50%)" }), E = N(null), A = N(null);
2502
2502
  let c = null;
2503
- const b = N({}), r = bt({
2503
+ const b = N({}), r = yt({
2504
2504
  visible: !1,
2505
2505
  text: "Спочатку активуйте шар, щоб застосувати фільтр",
2506
2506
  top: 0,
@@ -2594,7 +2594,7 @@ const sa = { class: "map-filter" }, la = { class: "map-filter__header" }, aa = {
2594
2594
  const M = m.getBoundingClientRect();
2595
2595
  r.left = M.left + M.width / 2 + window.scrollX, r.top = M.bottom + 8 + window.scrollY, r.visible = !0;
2596
2596
  }
2597
- function W() {
2597
+ function q() {
2598
2598
  r.visible = !1;
2599
2599
  }
2600
2600
  Be(() => {
@@ -2624,9 +2624,9 @@ const sa = { class: "map-filter" }, la = { class: "map-filter__header" }, aa = {
2624
2624
  href: "#",
2625
2625
  onClick: Je(ne, ["prevent", "stop"]),
2626
2626
  onMouseenter: te,
2627
- onMouseleave: W,
2627
+ onMouseleave: q,
2628
2628
  onFocus: te,
2629
- onBlur: W
2629
+ onBlur: q
2630
2630
  }, [...m[2] || (m[2] = [
2631
2631
  e("div", { class: "mapLayer-filter__icon" }, [
2632
2632
  e("svg", {
@@ -2665,7 +2665,7 @@ const sa = { class: "map-filter" }, la = { class: "map-filter__header" }, aa = {
2665
2665
  onClick: T
2666
2666
  }, [
2667
2667
  e("span", ia, [
2668
- pe(oe(on), { class: "h-4 w-4" })
2668
+ pe(oe(nn), { class: "h-4 w-4" })
2669
2669
  ]),
2670
2670
  m[3] || (m[3] = e("span", { class: "sr-only" }, "Закрити", -1))
2671
2671
  ])
@@ -2693,13 +2693,13 @@ const sa = { class: "map-filter" }, la = { class: "map-filter__header" }, aa = {
2693
2693
  ]))
2694
2694
  ], 512)) : K("", !0);
2695
2695
  }
2696
- }), En = /* @__PURE__ */ Ue(ua, [["__scopeId", "data-v-cc1f0579"]]), ca = { class: "opacity-popover__content" }, da = { class: "opacity-popover__value" }, fa = /* @__PURE__ */ he({
2696
+ }), En = /* @__PURE__ */ Ue(ua, [["__scopeId", "data-v-32948852"]]), ca = { class: "opacity-popover__content" }, da = { class: "opacity-popover__value" }, fa = /* @__PURE__ */ he({
2697
2697
  __name: "LayerOpacityPopover",
2698
2698
  props: {
2699
2699
  layerId: {}
2700
2700
  },
2701
2701
  setup(n) {
2702
- const t = n, a = N(!1), l = N(100), x = N(null), f = N(null), v = bt({ top: 0, left: 0 });
2702
+ const t = n, a = N(!1), l = N(100), x = N(null), f = N(null), v = yt({ top: 0, left: 0 });
2703
2703
  function p() {
2704
2704
  var I;
2705
2705
  const c = (I = f.value) == null ? void 0 : I.querySelector("button");
@@ -2782,7 +2782,7 @@ const sa = { class: "map-filter" }, la = { class: "map-filter__header" }, aa = {
2782
2782
  class: "opacity-popover__range",
2783
2783
  onInput: E
2784
2784
  }, null, 544), [
2785
- [$t, l.value]
2785
+ [kt, l.value]
2786
2786
  ]),
2787
2787
  e("span", da, G(l.value) + "%", 1)
2788
2788
  ])
@@ -3058,7 +3058,7 @@ const sa = { class: "map-filter" }, la = { class: "map-filter__header" }, aa = {
3058
3058
  const m = Array.isArray(y == null ? void 0 : y.legend) ? y.legend[0] : y == null ? void 0 : y.legend, M = J(m);
3059
3059
  return M || J(y == null ? void 0 : y.style) || Ta;
3060
3060
  }
3061
- function W(y) {
3061
+ function q(y) {
3062
3062
  return {
3063
3063
  "--layers-panel-checkbox-color": te(y)
3064
3064
  };
@@ -3158,7 +3158,7 @@ const sa = { class: "map-filter" }, la = { class: "map-filter__header" }, aa = {
3158
3158
  type: "checkbox",
3159
3159
  class: "layers-panel__checkbox",
3160
3160
  checked: $(M.id),
3161
- style: rt(W(M)),
3161
+ style: rt(q(M)),
3162
3162
  onChange: (X) => z(M, X)
3163
3163
  }, null, 44, ka),
3164
3164
  e("div", $a, [
@@ -3305,8 +3305,8 @@ const Fa = { class: "min-w-[200px] max-w-[280px] rounded-lg border border-slate-
3305
3305
  }, k = ((R = (S = f.value) == null ? void 0 : S.getContainer) == null ? void 0 : R.call(S)) || void 0, L = (k == null ? void 0 : k.getBoundingClientRect()) ?? i, $ = L.left - i.left, I = L.top - i.top, C = _.offsetWidth || 0, w = _.offsetHeight || 0, T = 12, z = 8, [H, Y] = t.value;
3306
3306
  let ne = $ + H + T, ie = I + Y + T;
3307
3307
  ne + C + z > i.width && (ne = $ + H - C - T), ie + w + z > i.height && (ie = I + Y - w - T);
3308
- const J = z, te = z, W = Math.max(z, i.width - C - z), F = Math.max(z, i.height - w - z);
3309
- ne = Math.min(Math.max(ne, J), W), ie = Math.min(Math.max(ie, te), F), p.value = { left: `${ne}px`, top: `${ie}px` };
3308
+ const J = z, te = z, q = Math.max(z, i.width - C - z), F = Math.max(z, i.height - w - z);
3309
+ ne = Math.min(Math.max(ne, J), q), ie = Math.min(Math.max(ie, te), F), p.value = { left: `${ne}px`, top: `${ie}px` };
3310
3310
  }
3311
3311
  return de([t, r], () => {
3312
3312
  Xe(() => u());
@@ -3336,7 +3336,7 @@ const Fa = { class: "min-w-[200px] max-w-[280px] rounded-lg border border-slate-
3336
3336
  }
3337
3337
  });
3338
3338
  function Oa() {
3339
- const n = At(), t = Dt(), a = N(null), l = N(null), x = N(null), f = N(!1), v = N([]), p = N(0), P = B(() => v.value.length), E = B(() => f.value || !!a.value || !!x.value);
3339
+ const n = At(), t = Ot(), a = N(null), l = N(null), x = N(null), f = N(!1), v = N([]), p = N(0), P = B(() => v.value.length), E = B(() => f.value || !!a.value || !!x.value);
3340
3340
  let A = !1;
3341
3341
  function c() {
3342
3342
  a.value = null, l.value = null, x.value = null, f.value = !1, v.value = [], p.value = 0;
@@ -3369,9 +3369,9 @@ function Oa() {
3369
3369
  const H = Array.isArray(T) && T.length > 0;
3370
3370
  f.value = H, x.value = null, a.value = null, l.value = w || null;
3371
3371
  try {
3372
- const W = await fetch(`/api/map-format?${z.toString()}`);
3373
- if (!W.ok) throw new Error(`Failed (${W.status})`);
3374
- const F = await W.json(), S = Array.isArray(F.columns) ? F.columns : [], R = Array.isArray(T) ? T : [];
3372
+ const q = await fetch(`/api/map-format?${z.toString()}`);
3373
+ if (!q.ok) throw new Error(`Failed (${q.status})`);
3374
+ const F = await q.json(), S = Array.isArray(F.columns) ? F.columns : [], R = Array.isArray(T) ? T : [];
3375
3375
  if (!S.length && !R.length) {
3376
3376
  console.error("Configure layer in admin"), i();
3377
3377
  return;
@@ -3396,8 +3396,8 @@ function Oa() {
3396
3396
  }
3397
3397
  });
3398
3398
  }
3399
- } catch (W) {
3400
- console.error("Failed to load feature card:", W), i();
3399
+ } catch (q) {
3400
+ console.error("Failed to load feature card:", q), i();
3401
3401
  } finally {
3402
3402
  f.value = !1;
3403
3403
  }
@@ -3559,10 +3559,10 @@ function Da() {
3559
3559
  return Be(async () => {
3560
3560
  await t(), n.value && (w = async (T) => {
3561
3561
  const { lng: z, lat: H } = T.lngLat, Y = Oe(), ie = Object.entries(Y).map(([J, te]) => {
3562
- var W, F, S, R;
3562
+ var q, F, S, R;
3563
3563
  return {
3564
3564
  id: J,
3565
- service: ((W = te == null ? void 0 : te.opts) == null ? void 0 : W.service) ?? ((S = (F = te == null ? void 0 : te.opts) == null ? void 0 : F.source) == null ? void 0 : S.service) ?? null,
3565
+ service: ((q = te == null ? void 0 : te.opts) == null ? void 0 : q.service) ?? ((S = (F = te == null ? void 0 : te.opts) == null ? void 0 : F.source) == null ? void 0 : S.service) ?? null,
3566
3566
  count: ((R = te == null ? void 0 : te.opts) == null ? void 0 : R.count) ?? null,
3567
3567
  visible: (() => {
3568
3568
  var y;
@@ -3679,7 +3679,7 @@ const mo = /* @__PURE__ */ he({
3679
3679
  mapId: {}
3680
3680
  },
3681
3681
  setup(n) {
3682
- const t = n, a = Oa(), l = Da(), x = Dt(), f = N([]), v = N(0), p = B(() => f.value[v.value] || null), P = B(() => {
3682
+ const t = n, a = Oa(), l = Da(), x = Ot(), f = N([]), v = N(0), p = B(() => f.value[v.value] || null), P = B(() => {
3683
3683
  var s;
3684
3684
  return ((s = p.value) == null ? void 0 : s.type) === "external" ? p.value : null;
3685
3685
  }), E = B(() => f.value.length > 0), A = B(() => {
@@ -3786,7 +3786,7 @@ const mo = /* @__PURE__ */ he({
3786
3786
  var s, h;
3787
3787
  return ((h = (s = ie.value) == null ? void 0 : s.map) == null ? void 0 : h.cardHideEmpty) ?? null;
3788
3788
  }), te = At(), {
3789
- activateTemporaryLayer: W,
3789
+ activateTemporaryLayer: q,
3790
3790
  deactivateTemporaryLayer: F,
3791
3791
  clearTemporaryLayers: S,
3792
3792
  isTemporaryLayerActive: R
@@ -3849,7 +3849,7 @@ const mo = /* @__PURE__ */ he({
3849
3849
  const [O, Q, ae, be] = h;
3850
3850
  return [O, Q, ae, be].every((xe) => Number.isFinite(xe)) ? [O, Q, ae, be] : null;
3851
3851
  }
3852
- function rn(s) {
3852
+ function on(s) {
3853
3853
  if (!s) return null;
3854
3854
  const h = s.trim();
3855
3855
  if (!h.length) return null;
@@ -3883,7 +3883,7 @@ const mo = /* @__PURE__ */ he({
3883
3883
  const h = Number(s);
3884
3884
  return Number.isFinite(h) ? h : void 0;
3885
3885
  }
3886
- function Nt(s) {
3886
+ function Dt(s) {
3887
3887
  if (typeof s != "string" || !s.length) return [];
3888
3888
  const h = [], O = /<LayerSwitcher\b([^>]*)>([\s\S]*?)<\/LayerSwitcher>/gi;
3889
3889
  let Q = 0, ae;
@@ -3899,18 +3899,18 @@ const mo = /* @__PURE__ */ he({
3899
3899
  const to = s.slice(Q, Ne);
3900
3900
  to.trim().length && h.push({ type: "html", content: to });
3901
3901
  }
3902
- const nt = Yt(We), pt = gt(nt, ["title"]) || "Тимчасовий шар", Ot = Ve(gt(nt, ["url"]));
3903
- if (!Ot) {
3902
+ const nt = Yt(We), pt = gt(nt, ["title"]) || "Тимчасовий шар", Nt = Ve(gt(nt, ["url"]));
3903
+ if (!Nt) {
3904
3904
  h.push({ type: "html", content: ze }), Q = Ne + ze.length;
3905
3905
  continue;
3906
3906
  }
3907
- const un = gt(nt, ["id"]), Pn = gt(nt, ["button-text", "buttonText", "show", "show-label", "showLabel"]), Ho = Et(gt(nt, ["tile-size", "tileSize"])), Go = Et(gt(nt, ["minzoom", "minZoom"])), Yo = Et(gt(nt, ["maxzoom", "maxZoom"])), Xo = Et(gt(nt, ["opacity"])), Jo = rn(gt(nt, ["bounds", "data-bounds", "bbox"])), Ko = un || ot(`${pt}-${Ot}`) || ot(pt), Qn = xe(Ko || `layer-${h.length + 1}`), zn = Ke.trim(), eo = /<[^>]+>/.test(zn), Qo = eo ? zn : null, Fn = eo ? null : zn, er = Pn && Pn.trim().length ? Pn.trim() : Fn && Fn.trim().length ? Fn.trim() : void 0;
3907
+ const un = gt(nt, ["id"]), Pn = gt(nt, ["button-text", "buttonText", "show", "show-label", "showLabel"]), Ho = Et(gt(nt, ["tile-size", "tileSize"])), Go = Et(gt(nt, ["minzoom", "minZoom"])), Yo = Et(gt(nt, ["maxzoom", "maxZoom"])), Xo = Et(gt(nt, ["opacity"])), Jo = on(gt(nt, ["bounds", "data-bounds", "bbox"])), Ko = un || ot(`${pt}-${Nt}`) || ot(pt), Qn = xe(Ko || `layer-${h.length + 1}`), zn = Ke.trim(), eo = /<[^>]+>/.test(zn), Qo = eo ? zn : null, Fn = eo ? null : zn, er = Pn && Pn.trim().length ? Pn.trim() : Fn && Fn.trim().length ? Fn.trim() : void 0;
3908
3908
  h.push({
3909
3909
  type: "layer",
3910
3910
  spec: {
3911
3911
  id: Qn,
3912
3912
  title: pt,
3913
- url: Ot,
3913
+ url: Nt,
3914
3914
  tileSize: Ho,
3915
3915
  minzoom: Go,
3916
3916
  maxzoom: Yo,
@@ -3919,7 +3919,7 @@ const mo = /* @__PURE__ */ he({
3919
3919
  },
3920
3920
  componentProps: {
3921
3921
  title: pt,
3922
- url: Ot,
3922
+ url: Nt,
3923
3923
  id: Qn,
3924
3924
  buttonText: er
3925
3925
  },
@@ -3946,12 +3946,12 @@ const mo = /* @__PURE__ */ he({
3946
3946
  bounds: s.bounds
3947
3947
  };
3948
3948
  }
3949
- const xt = B(() => {
3949
+ const bt = B(() => {
3950
3950
  if (w.value && l.current.value)
3951
3951
  return l.current.value.data ?? {};
3952
3952
  const s = a.card.value;
3953
3953
  return (s == null ? void 0 : s.rows) ?? {};
3954
- }), wt = B(() => {
3954
+ }), xt = B(() => {
3955
3955
  if (w.value && l.current.value) {
3956
3956
  const Q = l.current.value, ae = Array.isArray(Q.columns) ? Q.columns : [];
3957
3957
  return ae.length ? ae : Q.fields ?? [];
@@ -3960,10 +3960,10 @@ const mo = /* @__PURE__ */ he({
3960
3960
  if (!s) return [];
3961
3961
  const h = Array.isArray(s.columns) ? s.columns : [];
3962
3962
  return h.length ? h : Array.isArray(s.fields) ? s.fields : [];
3963
- }), Ct = B(() => {
3964
- const s = wt.value;
3963
+ }), $t = B(() => {
3964
+ const s = xt.value;
3965
3965
  if (!s.length) return [];
3966
- const h = xt.value;
3966
+ const h = bt.value;
3967
3967
  return s.map((O) => ({
3968
3968
  key: O.name,
3969
3969
  label: O.ua || O.label || O.title || O.name,
@@ -3971,7 +3971,7 @@ const mo = /* @__PURE__ */ he({
3971
3971
  format: O.format || "text"
3972
3972
  }));
3973
3973
  }), Bt = /* @__PURE__ */ new Set(["—", "-", "–", "−"]);
3974
- function Xt(s) {
3974
+ function rn(s) {
3975
3975
  const h = s.match(/^(\d{4})-(\d{2})-(\d{2})$/);
3976
3976
  if (!h) return s;
3977
3977
  const [, O, Q, ae] = h;
@@ -3993,7 +3993,7 @@ const mo = /* @__PURE__ */ he({
3993
3993
  const O = s.trim();
3994
3994
  if (!O.length) return "—";
3995
3995
  if (/^\d{4}-\d{2}-\d{2}$/.test(O))
3996
- return Xt(O);
3996
+ return rn(O);
3997
3997
  if (/^-?\d+(?:\.\d+)?$/.test(O)) {
3998
3998
  const Q = Number(O);
3999
3999
  return Number.isFinite(Q) ? Ut(Q) : O;
@@ -4010,7 +4010,7 @@ const mo = /* @__PURE__ */ he({
4010
4010
  }
4011
4011
  return !1;
4012
4012
  }
4013
- function Jt(s) {
4013
+ function Xt(s) {
4014
4014
  if (!s) return [];
4015
4015
  if (Array.isArray(s)) return s;
4016
4016
  if (typeof s == "string") {
@@ -4022,14 +4022,14 @@ const mo = /* @__PURE__ */ he({
4022
4022
  }
4023
4023
  return [];
4024
4024
  }
4025
- const _t = N(!1), Lt = N(!0), q = N((() => {
4025
+ const Ct = N(!1), Lt = N(!0), W = N((() => {
4026
4026
  var s, h;
4027
4027
  return typeof window > "u" ? null : ((h = (s = window.localStorage) == null ? void 0 : s.getItem) == null ? void 0 : h.call(s, yo)) ?? null;
4028
4028
  })()), V = (s) => {
4029
4029
  const h = typeof s == "string" && s.toLowerCase() === "true";
4030
- _t.value = h, Lt.value = !h;
4030
+ Ct.value = h, Lt.value = !h;
4031
4031
  }, ce = (s) => {
4032
- q.value = s;
4032
+ W.value = s;
4033
4033
  };
4034
4034
  if (typeof window < "u") {
4035
4035
  const s = (h) => {
@@ -4039,9 +4039,9 @@ const mo = /* @__PURE__ */ he({
4039
4039
  window.removeEventListener("storage", s);
4040
4040
  });
4041
4041
  }
4042
- const me = B(() => typeof q.value == "string");
4042
+ const me = B(() => typeof W.value == "string");
4043
4043
  de(
4044
- q,
4044
+ W,
4045
4045
  (s) => {
4046
4046
  V(typeof s == "string" ? s : J.value);
4047
4047
  },
@@ -4054,8 +4054,8 @@ const mo = /* @__PURE__ */ he({
4054
4054
  { immediate: !0 }
4055
4055
  );
4056
4056
  const $e = B(
4057
- () => Ct.value.filter((s) => Vt(s.value)).length
4058
- ), Fe = B(() => _t.value && !Lt.value ? Ct.value.filter((s) => !Vt(s.value)) : Ct.value);
4057
+ () => $t.value.filter((s) => Vt(s.value)).length
4058
+ ), Fe = B(() => Ct.value && !Lt.value ? $t.value.filter((s) => !Vt(s.value)) : $t.value);
4059
4059
  function Ee(s) {
4060
4060
  const h = typeof s == "string" ? s : "";
4061
4061
  if (!h.length) return { sanitized: "", hiddenCount: 0 };
@@ -4072,13 +4072,13 @@ const mo = /* @__PURE__ */ he({
4072
4072
  }
4073
4073
  }), { sanitized: Q.body.innerHTML, hiddenCount: ae };
4074
4074
  }
4075
- const ut = B(() => Ee(Y.value)), kt = B(() => Y.value ? ut.value.hiddenCount : 0), ct = B(() => $e.value + kt.value), Pt = B(
4075
+ const ut = B(() => Ee(Y.value)), wt = B(() => Y.value ? ut.value.hiddenCount : 0), ct = B(() => $e.value + wt.value), Pt = B(
4076
4076
  () => {
4077
4077
  var s;
4078
- return _t.value && !Lt.value && !!((s = Y.value) != null && s.trim());
4078
+ return Ct.value && !Lt.value && !!((s = Y.value) != null && s.trim());
4079
4079
  }
4080
- ), Kt = B(
4081
- () => _t.value && ct.value > 0
4080
+ ), Jt = B(
4081
+ () => Ct.value && ct.value > 0
4082
4082
  ), Mn = B(
4083
4083
  () => Lt.value ? "Приховати пусті значення" : "Показати пусті значення"
4084
4084
  ), An = B(() => Lt.value ? vr : To);
@@ -4087,9 +4087,9 @@ const mo = /* @__PURE__ */ he({
4087
4087
  }
4088
4088
  const qt = B(() => {
4089
4089
  const s = Pt.value ? ut.value.sanitized : Y.value ?? "";
4090
- return Nt(s);
4090
+ return Dt(s);
4091
4091
  }), zt = B(() => qt.value.filter((s) => s.type === "layer"));
4092
- function Qt(s) {
4092
+ function Kt(s) {
4093
4093
  return Array.isArray(s) ? s.map((h, O) => {
4094
4094
  const Q = Ve(typeof (h == null ? void 0 : h.url) == "string" ? h.url : ""), ae = typeof (h == null ? void 0 : h.geohub) == "string" && h.geohub.trim().length ? `/api-hub/tms/${h.geohub.trim()}/ua/{z}/{x}/{y}.png` : "", be = ((h == null ? void 0 : h.name) || (h == null ? void 0 : h.title) || (h == null ? void 0 : h.label) || `Шар ${O + 1}`).toString(), xe = (h == null ? void 0 : h.id) != null ? String(h.id) : ot(`${be}-${O + 1}`), ze = (h == null ? void 0 : h.buttonText) || (h == null ? void 0 : h.button_text) || null, We = (h == null ? void 0 : h.description) || (h == null ? void 0 : h.subtitle) || null, Ke = Q || Ve(ae) || "";
4095
4095
  if (!Ke) return null;
@@ -4114,13 +4114,13 @@ const mo = /* @__PURE__ */ he({
4114
4114
  h == null ? void 0 : h.layers
4115
4115
  ];
4116
4116
  for (const be of O) {
4117
- const xe = Qt(be);
4117
+ const xe = Kt(be);
4118
4118
  if (xe.length)
4119
4119
  return xe;
4120
4120
  }
4121
4121
  return [];
4122
4122
  }), yn = B(
4123
- () => qt.value.length > 0 || Ct.value.length > 0 || Wt.value.length > 0
4123
+ () => qt.value.length > 0 || $t.value.length > 0 || Wt.value.length > 0
4124
4124
  ), ln = B(() => !a.cardLoading.value && !!a.card.value);
4125
4125
  function bn() {
4126
4126
  const s = {}, h = Ae.value;
@@ -4159,7 +4159,7 @@ const mo = /* @__PURE__ */ he({
4159
4159
  if (!ae || R(ae.id, M.value))
4160
4160
  return;
4161
4161
  const xe = M.value || void 0;
4162
- X.value = xe ?? null, W(ae, h, xe), y({
4162
+ X.value = xe ?? null, q(ae, h, xe), y({
4163
4163
  action: "activate",
4164
4164
  owner: xe,
4165
4165
  spec: ae,
@@ -4440,7 +4440,7 @@ const mo = /* @__PURE__ */ he({
4440
4440
  const nt = await fetch(`/api/map-features/${encodeURIComponent(Ne)}/${encodeURIComponent(String(O))}`);
4441
4441
  if (!nt.ok)
4442
4442
  continue;
4443
- const pt = await nt.json(), Ot = ((ze = pt == null ? void 0 : pt.data) == null ? void 0 : ze.geom) || ((We = pt == null ? void 0 : pt.data) == null ? void 0 : We.geometry) || ((Ke = pt == null ? void 0 : pt.data) == null ? void 0 : Ke.geom_4326) || null, un = typeof Ot == "string" ? JSON.parse(Ot) : Ot;
4443
+ const pt = await nt.json(), Nt = ((ze = pt == null ? void 0 : pt.data) == null ? void 0 : ze.geom) || ((We = pt == null ? void 0 : pt.data) == null ? void 0 : We.geometry) || ((Ke = pt == null ? void 0 : pt.data) == null ? void 0 : Ke.geom_4326) || null, un = typeof Nt == "string" ? JSON.parse(Nt) : Nt;
4444
4444
  if (un)
4445
4445
  return ge.set(Q, un), un;
4446
4446
  } catch {
@@ -4605,7 +4605,7 @@ const mo = /* @__PURE__ */ he({
4605
4605
  ]),
4606
4606
  e("div", Ka, [
4607
4607
  z.value ? (o(), g("div", Qa, " Завантаження даних… ")) : H.value ? (o(), g("div", ei, G(H.value), 1)) : (o(), g(ee, { key: 2 }, [
4608
- Ct.value.length ? (o(), g("div", ti, [
4608
+ $t.value.length ? (o(), g("div", ti, [
4609
4609
  e("dl", ni, [
4610
4610
  (o(!0), g(ee, null, ve(Fe.value, (O) => (o(), g("div", {
4611
4611
  key: O.key,
@@ -4616,7 +4616,7 @@ const mo = /* @__PURE__ */ he({
4616
4616
  class: Ce(["text-gray-700 sm:col-span-2 font-normal whitespace-pre-wrap", O.format === "badge" ? "font-semibold text-yellow-800" : ""])
4617
4617
  }, [
4618
4618
  O.format === "tags" ? (o(), g("div", ri, [
4619
- (o(!0), g(ee, null, ve(Jt(O.value), (Q, ae) => (o(), g("span", {
4619
+ (o(!0), g(ee, null, ve(Xt(O.value), (Q, ae) => (o(), g("span", {
4620
4620
  key: ae,
4621
4621
  class: "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold text-foreground"
4622
4622
  }, G(Q), 1))), 128))
@@ -4661,7 +4661,7 @@ const mo = /* @__PURE__ */ he({
4661
4661
  onActivate: j
4662
4662
  }, null, 8, ["title", "url", "id", "button-text"]))), 128))
4663
4663
  ])) : K("", !0),
4664
- Kt.value ? (o(), g("div", ui, [
4664
+ Jt.value ? (o(), g("div", ui, [
4665
4665
  e("button", {
4666
4666
  type: "button",
4667
4667
  class: "flex items-center gap-1 justify-end w-full font-medium text-blue-600 hover:text-blue-800 transition-colors disabled:opacity-60 cursor-pointer",
@@ -4834,7 +4834,7 @@ const mo = /* @__PURE__ */ he({
4834
4834
  },
4835
4835
  emits: ["toggle-layer", "update:search", "open-filter"],
4836
4836
  setup(n, { emit: t }) {
4837
- const a = n, l = t, x = bt({}), f = N(null), v = bt({
4837
+ const a = n, l = t, x = yt({}), f = N(null), v = yt({
4838
4838
  visible: !1,
4839
4839
  text: "Спочатку активуйте шар, щоб застосувати фільтр",
4840
4840
  top: 0,
@@ -4906,7 +4906,7 @@ const mo = /* @__PURE__ */ he({
4906
4906
  placeholder: "Введіть назву шару...",
4907
4907
  class: "py-[7px] pl-8 pe-8 block w-full bg-gray-100 border-transparent rounded-lg text-sm focus:bg-white focus:border-blue-500 focus:ring-blue-500"
4908
4908
  }, null, 512), [
4909
- [$t, E.value]
4909
+ [kt, E.value]
4910
4910
  ]),
4911
4911
  (o(), g("svg", Ei, [...k[1] || (k[1] = [
4912
4912
  e("path", {
@@ -5027,7 +5027,7 @@ const mo = /* @__PURE__ */ he({
5027
5027
  items: {}
5028
5028
  },
5029
5029
  setup(n, { expose: t }) {
5030
- const a = n, l = bt({
5030
+ const a = n, l = yt({
5031
5031
  open: !1,
5032
5032
  top: 0,
5033
5033
  left: 0,
@@ -5146,7 +5146,7 @@ const mo = /* @__PURE__ */ he({
5146
5146
  },
5147
5147
  emits: ["select-layer", "reorder", "remove", "toggle-layer"],
5148
5148
  setup(n, { emit: t }) {
5149
- const a = n, l = t, x = bt({}), f = N(null), v = N(null), p = /* @__PURE__ */ new Map(), P = bt({ top: 0, left: 0 }), E = N(null), A = bt({ top: 0, left: 0 }), c = N(null), b = /* @__PURE__ */ new Map(), r = bt({});
5149
+ const a = n, l = t, x = yt({}), f = N(null), v = N(null), p = /* @__PURE__ */ new Map(), P = yt({ top: 0, left: 0 }), E = N(null), A = yt({ top: 0, left: 0 }), c = N(null), b = /* @__PURE__ */ new Map(), r = yt({});
5150
5150
  function u(S) {
5151
5151
  var R;
5152
5152
  for (const y of ((R = a.catalog) == null ? void 0 : R.groups) ?? []) {
@@ -5259,7 +5259,7 @@ const mo = /* @__PURE__ */ he({
5259
5259
  function te(S) {
5260
5260
  return S == null || S === "" ? null : String(S);
5261
5261
  }
5262
- function W(S, R) {
5262
+ function q(S, R) {
5263
5263
  return !Array.isArray(S) || S.length === 0 ? null : `${S.length} ${R}`;
5264
5264
  }
5265
5265
  function F(S) {
@@ -5272,9 +5272,9 @@ const mo = /* @__PURE__ */ he({
5272
5272
  { label: "Сервіс", value: te(M) },
5273
5273
  { label: "Посилання", value: te(X), breakLine: !0 },
5274
5274
  { label: "Джерело", value: te(re), breakLine: !0 },
5275
- { label: "Popup", value: W(ue, "полів") },
5276
- { label: "Картка", value: W(ge, "полів") },
5277
- { label: "Фільтри", value: W(Se, "фільтрів") }
5275
+ { label: "Popup", value: q(ue, "полів") },
5276
+ { label: "Картка", value: q(ge, "полів") },
5277
+ { label: "Фільтри", value: q(Se, "фільтрів") }
5278
5278
  ];
5279
5279
  }
5280
5280
  return (S, R) => (o(), g("div", qi, [
@@ -5546,12 +5546,12 @@ const mo = /* @__PURE__ */ he({
5546
5546
  }, mu = { class: "flex items-center gap-2" }, hu = { class: "flex mb-4 border-b border-gray-200" }, yu = { class: "map-catalog-widget__body" }, bu = /* @__PURE__ */ he({
5547
5547
  __name: "MapCatalogWidget",
5548
5548
  setup(n) {
5549
- const t = At(), a = Dt();
5549
+ const t = At(), a = Ot();
5550
5550
  function l() {
5551
5551
  const F = t.query["catalog-tab"];
5552
5552
  return (Array.isArray(F) ? F[0] : F) === "selected" ? "selected" : "catalog";
5553
5553
  }
5554
- const x = N(l()), f = N({ groups: [] }), v = N([]), p = N(""), { map: P } = at(), E = bt({}), A = N(null), c = N(!0), b = N(!1);
5554
+ const x = N(l()), f = N({ groups: [] }), v = N([]), p = N(""), { map: P } = at(), E = yt({}), A = N(null), c = N(!0), b = N(!1);
5555
5555
  function r(F) {
5556
5556
  return f.value.groups.map((S) => S.layers.find((R) => R.id === F)).find(Boolean) || null;
5557
5557
  }
@@ -5704,13 +5704,13 @@ const mo = /* @__PURE__ */ he({
5704
5704
  function te() {
5705
5705
  c.value = !c.value;
5706
5706
  }
5707
- function W() {
5707
+ function q() {
5708
5708
  b.value = window.innerWidth <= 768;
5709
5709
  }
5710
5710
  return Be(() => {
5711
- J(), W(), b.value && (c.value = !1), window.addEventListener("resize", W);
5711
+ J(), q(), b.value && (c.value = !1), window.addEventListener("resize", q);
5712
5712
  }), De(() => {
5713
- window.removeEventListener("resize", W);
5713
+ window.removeEventListener("resize", q);
5714
5714
  }), (F, S) => (o(), g("div", {
5715
5715
  class: Ce(["map-catalog-widget w-full max-w-md mx-auto p-4 bg-white border border-gray-200 rounded-lg shadow-sm widget", c.value && (x.value === "selected" || ne.value > 1) ? "min-h-[250px]" : "min-h-[0px]"])
5716
5716
  }, [
@@ -5841,19 +5841,19 @@ const mo = /* @__PURE__ */ he({
5841
5841
  },
5842
5842
  setup(n) {
5843
5843
  const t = ["#3a7a57", "#d970d5", "#8e997b", "#b4c039", "#a855f7", "#71823a", "#f79d92", "#8b5cf6", "#a6514e", "#6b7280"], a = n, l = N(!0), x = N(!1), f = N([]), v = N(null), p = N(null), P = N(null), E = N(null), A = N(null), c = N({}), b = N(null);
5844
- function r(W) {
5845
- return W && JSON.parse(JSON.stringify(W));
5844
+ function r(q) {
5845
+ return q && JSON.parse(JSON.stringify(q));
5846
5846
  }
5847
5847
  const u = B(() => {
5848
- const W = a.config.layer;
5849
- if (typeof W != "string") throw new Error("MapAttributeWidget: `layer` must be a string");
5850
- const F = W.trim();
5848
+ const q = a.config.layer;
5849
+ if (typeof q != "string") throw new Error("MapAttributeWidget: `layer` must be a string");
5850
+ const F = q.trim();
5851
5851
  if (!F) throw new Error("MapAttributeWidget: `layer` must be non-empty");
5852
5852
  return F;
5853
5853
  }), _ = B(() => {
5854
- const { list: W, attribute: F } = a.config;
5855
- if (Array.isArray(W) && W.length)
5856
- return W.map((S) => ({
5854
+ const { list: q, attribute: F } = a.config;
5855
+ if (Array.isArray(q) && q.length)
5856
+ return q.map((S) => ({
5857
5857
  id: (S == null ? void 0 : S.id) != null ? String(S.id).trim() : "",
5858
5858
  text: (S == null ? void 0 : S.text) != null && String(S.text).trim() || null
5859
5859
  })).filter((S) => S.id.length);
@@ -5865,43 +5865,43 @@ const mo = /* @__PURE__ */ he({
5865
5865
  return [{ id: S, text: null }];
5866
5866
  }
5867
5867
  throw new Error("MapAttributeWidget: `attribute` or `list` must be provided");
5868
- }), d = B(() => _.value.map((W) => ({
5869
- id: W.id,
5870
- label: W.text || c.value[W.id] || W.id
5868
+ }), d = B(() => _.value.map((q) => ({
5869
+ id: q.id,
5870
+ label: q.text || c.value[q.id] || q.id
5871
5871
  })));
5872
5872
  de(
5873
5873
  _,
5874
- (W) => {
5875
- if (!W.length) {
5874
+ (q) => {
5875
+ if (!q.length) {
5876
5876
  b.value = null, f.value = [];
5877
5877
  return;
5878
5878
  }
5879
- (!b.value || !W.some((F) => F.id === b.value)) && (b.value = W[0].id);
5879
+ (!b.value || !q.some((F) => F.id === b.value)) && (b.value = q[0].id);
5880
5880
  },
5881
5881
  { immediate: !0 }
5882
5882
  );
5883
5883
  const i = B(() => {
5884
- var W;
5885
- return b.value || ((W = _.value[0]) == null ? void 0 : W.id) || null;
5884
+ var q;
5885
+ return b.value || ((q = _.value[0]) == null ? void 0 : q.id) || null;
5886
5886
  });
5887
5887
  de(u, () => {
5888
- var W, F;
5889
- (F = (W = p.value) == null ? void 0 : W.remove) == null || F.call(W), p.value = null, P.value = null, E.value = null, A.value = null, c.value = {};
5888
+ var q, F;
5889
+ (F = (q = p.value) == null ? void 0 : q.remove) == null || F.call(q), p.value = null, P.value = null, E.value = null, A.value = null, c.value = {};
5890
5890
  });
5891
5891
  const k = B(() => {
5892
- var W;
5893
- return (W = E.value) != null && W.length ? {
5892
+ var q;
5893
+ return (q = E.value) != null && q.length ? {
5894
5894
  id: u.value,
5895
5895
  name: P.value,
5896
5896
  filters: E.value
5897
5897
  } : null;
5898
5898
  }), L = B(() => {
5899
- var W, F;
5900
- return ((F = (W = k.value) == null ? void 0 : W.filters) == null ? void 0 : F.length) || 0;
5899
+ var q, F;
5900
+ return ((F = (q = k.value) == null ? void 0 : q.filters) == null ? void 0 : F.length) || 0;
5901
5901
  });
5902
- async function $(W) {
5902
+ async function $(q) {
5903
5903
  var R;
5904
- const F = await fetch(`/api/gis-service/${encodeURIComponent(W)}`);
5904
+ const F = await fetch(`/api/gis-service/${encodeURIComponent(q)}`);
5905
5905
  if (!F.ok) {
5906
5906
  let y = "Не вдалося завантажити налаштування шару";
5907
5907
  try {
@@ -5917,11 +5917,11 @@ const mo = /* @__PURE__ */ he({
5917
5917
  return M && (y[M] = D || M), y;
5918
5918
  }, {}), S;
5919
5919
  }
5920
- function I(W, F) {
5921
- let S = Oe(W);
5920
+ function I(q, F) {
5921
+ let S = Oe(q);
5922
5922
  if (!S) {
5923
- const R = `${location.origin}/api/vtile/${W}/ua/{z}/{x}/{y}.vmt`;
5924
- S = Oe(W, {
5923
+ const R = `${location.origin}/api/vtile/${q}/ua/{z}/{x}/{y}.vmt`;
5924
+ S = Oe(q, {
5925
5925
  source: {
5926
5926
  type: "vector",
5927
5927
  tiles: [R],
@@ -5929,9 +5929,9 @@ const mo = /* @__PURE__ */ he({
5929
5929
  maxzoom: 14
5930
5930
  },
5931
5931
  layer: {
5932
- id: W,
5933
- source: W,
5934
- "source-layer": W,
5932
+ id: q,
5933
+ source: q,
5934
+ "source-layer": q,
5935
5935
  style: (F == null ? void 0 : F.style) || {}
5936
5936
  },
5937
5937
  card: F == null ? void 0 : F.card,
@@ -5940,9 +5940,9 @@ const mo = /* @__PURE__ */ he({
5940
5940
  }
5941
5941
  return p.value = S, S;
5942
5942
  }
5943
- async function C(W, F) {
5943
+ async function C(q, F) {
5944
5944
  var y;
5945
- const S = `/api/gis-service/${encodeURIComponent(W)}/${encodeURIComponent(F)}`, R = await fetch(S);
5945
+ const S = `/api/gis-service/${encodeURIComponent(q)}/${encodeURIComponent(F)}`, R = await fetch(S);
5946
5946
  if (!R.ok) {
5947
5947
  let m = "Не вдалося отримати статистику";
5948
5948
  try {
@@ -5954,32 +5954,32 @@ const mo = /* @__PURE__ */ he({
5954
5954
  }
5955
5955
  return R.json();
5956
5956
  }
5957
- function w(W) {
5957
+ function w(q) {
5958
5958
  const F = /* @__PURE__ */ new Map();
5959
- return W && (W.rules || []).forEach((R) => {
5959
+ return q && (q.rules || []).forEach((R) => {
5960
5960
  const y = (R == null ? void 0 : R.value) ?? (R == null ? void 0 : R.id);
5961
5961
  y != null && F.set(String(y), R);
5962
5962
  }), F;
5963
5963
  }
5964
- function T(W, F, S, R, y) {
5964
+ function T(q, F, S, R, y) {
5965
5965
  if (typeof (F == null ? void 0 : F.color) == "string" && F.color.trim()) return F.color.trim();
5966
5966
  const m = a.config.colors || {};
5967
- if (m[W]) return m[W];
5968
- const D = w(S == null ? void 0 : S.style).get(W);
5967
+ if (m[q]) return m[q];
5968
+ const D = w(S == null ? void 0 : S.style).get(q);
5969
5969
  return typeof (D == null ? void 0 : D.color) == "string" && D.color.trim() ? D.color.trim() : t[y % t.length];
5970
5970
  }
5971
- function z(W, F, S, R) {
5971
+ function z(q, F, S, R) {
5972
5972
  var y;
5973
- return (F == null ? void 0 : F.text) || (F == null ? void 0 : F.label) || (F == null ? void 0 : F.name) || (F == null ? void 0 : F[`${R}_text`]) || ((y = w(S == null ? void 0 : S.style).get(W)) == null ? void 0 : y.label) || W;
5973
+ return (F == null ? void 0 : F.text) || (F == null ? void 0 : F.label) || (F == null ? void 0 : F.name) || (F == null ? void 0 : F[`${R}_text`]) || ((y = w(S == null ? void 0 : S.style).get(q)) == null ? void 0 : y.label) || q;
5974
5974
  }
5975
- function H(W, F, S, R) {
5976
- if (!W) return;
5975
+ function H(q, F, S, R) {
5976
+ if (!q) return;
5977
5977
  const y = r((F == null ? void 0 : F.style) || A.value) || {}, m = R.trim();
5978
5978
  if (!m) return;
5979
5979
  const M = { ...y.colors || {}, ...a.config.colors || {} };
5980
5980
  m === R && S.forEach((D) => {
5981
5981
  D.color.trim() && (M[D.id] = D.color);
5982
- }), W.setStyle({
5982
+ }), q.setStyle({
5983
5983
  ...y,
5984
5984
  type: y.type || "polygon",
5985
5985
  colorAttr: m,
@@ -5991,13 +5991,13 @@ const mo = /* @__PURE__ */ he({
5991
5991
  async function Y() {
5992
5992
  var m, M;
5993
5993
  f.value = [], v.value = null;
5994
- const W = u.value, F = i.value;
5994
+ const q = u.value, F = i.value;
5995
5995
  if (!F)
5996
5996
  return;
5997
5997
  x.value = !0;
5998
- const S = await $(W);
5999
- I(W, S);
6000
- const R = await C(W, F), y = Array.isArray(R == null ? void 0 : R.rows) ? R.rows.map((D, X) => {
5998
+ const S = await $(q);
5999
+ I(q, S);
6000
+ const R = await C(q, F), y = Array.isArray(R == null ? void 0 : R.rows) ? R.rows.map((D, X) => {
6001
6001
  const re = (D == null ? void 0 : D.id) ?? (D == null ? void 0 : D.value), ue = re != null ? String(re) : "";
6002
6002
  if (!ue) return null;
6003
6003
  const ge = z(ue, D, S, F), Se = Number((D == null ? void 0 : D.count) ?? 0) || 0, we = T(ue, D, S, F, X);
@@ -6017,18 +6017,18 @@ const mo = /* @__PURE__ */ he({
6017
6017
  },
6018
6018
  { immediate: !0 }
6019
6019
  );
6020
- const ne = B(() => "Набори даних"), ie = B(() => f.value.reduce((W, F) => W + F.count, 0)), J = B(() => {
6020
+ const ne = B(() => "Набори даних"), ie = B(() => f.value.reduce((q, F) => q + F.count, 0)), J = B(() => {
6021
6021
  var S;
6022
- const W = i.value;
6023
- return ((S = d.value.find((R) => R.id === W)) == null ? void 0 : S.label) || null || v.value || W || null;
6022
+ const q = i.value;
6023
+ return ((S = d.value.find((R) => R.id === q)) == null ? void 0 : S.label) || null || v.value || q || null;
6024
6024
  });
6025
- function te(W) {
6026
- return ie.value ? `${(W / ie.value * 100).toFixed(2)}%` : "0.00%";
6025
+ function te(q) {
6026
+ return ie.value ? `${(q / ie.value * 100).toFixed(2)}%` : "0.00%";
6027
6027
  }
6028
6028
  return De(() => {
6029
- var W, F;
6030
- (F = (W = p.value) == null ? void 0 : W.remove) == null || F.call(W);
6031
- }), (W, F) => l.value ? (o(), g("div", xu, [
6029
+ var q, F;
6030
+ (F = (q = p.value) == null ? void 0 : q.remove) == null || F.call(q);
6031
+ }), (q, F) => l.value ? (o(), g("div", xu, [
6032
6032
  e("div", wu, [
6033
6033
  e("div", null, [
6034
6034
  e("h2", _u, G(ne.value), 1),
@@ -6124,11 +6124,11 @@ const mo = /* @__PURE__ */ he({
6124
6124
  },
6125
6125
  setup(n) {
6126
6126
  const t = {
6127
- mounted(U, q) {
6127
+ mounted(U, W) {
6128
6128
  if (typeof document > "u") return;
6129
6129
  let V = null;
6130
6130
  const ce = 8, me = () => {
6131
- const Fe = String((q == null ? void 0 : q.value) ?? "");
6131
+ const Fe = String((W == null ? void 0 : W.value) ?? "");
6132
6132
  if (!Fe) return;
6133
6133
  V = document.createElement("div"), V.textContent = Fe, Object.assign(V.style, {
6134
6134
  position: "absolute",
@@ -6150,8 +6150,8 @@ const mo = /* @__PURE__ */ he({
6150
6150
  },
6151
6151
  unmounted(U) {
6152
6152
  if (typeof document > "u") return;
6153
- const q = U.tooltipRightHandlers;
6154
- q && (U.removeEventListener("mouseenter", q.show), U.removeEventListener("mouseleave", q.hide));
6153
+ const W = U.tooltipRightHandlers;
6154
+ W && (U.removeEventListener("mouseenter", W.show), U.removeEventListener("mouseleave", W.hide));
6155
6155
  }
6156
6156
  }, a = n, l = at(), x = Gt();
6157
6157
  function f() {
@@ -6159,15 +6159,15 @@ const mo = /* @__PURE__ */ he({
6159
6159
  }
6160
6160
  function v() {
6161
6161
  var ce, me, $e;
6162
- const U = (ce = x == null ? void 0 : x.appContext.config.globalProperties) == null ? void 0 : ce.$settings, q = (me = U == null ? void 0 : U.map) == null ? void 0 : me.searchViewbox;
6163
- if (q) return q;
6162
+ const U = (ce = x == null ? void 0 : x.appContext.config.globalProperties) == null ? void 0 : ce.$settings, W = (me = U == null ? void 0 : U.map) == null ? void 0 : me.searchViewbox;
6163
+ if (W) return W;
6164
6164
  const V = f();
6165
6165
  return ($e = V == null ? void 0 : V.map) == null ? void 0 : $e.searchViewbox;
6166
6166
  }
6167
6167
  function p() {
6168
6168
  var me, $e, Fe;
6169
- const U = (me = x == null ? void 0 : x.appContext.config.globalProperties) == null ? void 0 : me.$settings, q = ($e = U == null ? void 0 : U.map) == null ? void 0 : $e.addressSuggest;
6170
- if (typeof q == "string" && q.trim()) return q.trim();
6169
+ const U = (me = x == null ? void 0 : x.appContext.config.globalProperties) == null ? void 0 : me.$settings, W = ($e = U == null ? void 0 : U.map) == null ? void 0 : $e.addressSuggest;
6170
+ if (typeof W == "string" && W.trim()) return W.trim();
6171
6171
  const V = f(), ce = (Fe = V == null ? void 0 : V.map) == null ? void 0 : Fe.addressSuggest;
6172
6172
  if (typeof ce == "string" && ce.trim()) return ce.trim();
6173
6173
  }
@@ -6176,11 +6176,11 @@ const mo = /* @__PURE__ */ he({
6176
6176
  return P && U.push("address"), E && U.push("nominatim"), U;
6177
6177
  }), c = B(() => {
6178
6178
  var V, ce;
6179
- const U = A.value, q = (ce = (V = a.config) == null ? void 0 : V.tools) == null ? void 0 : ce.filter((me) => U.includes(me));
6180
- return q && q.length ? q : U;
6179
+ const U = A.value, W = (ce = (V = a.config) == null ? void 0 : V.tools) == null ? void 0 : ce.filter((me) => U.includes(me));
6180
+ return W && W.length ? W : U;
6181
6181
  }), b = B(() => {
6182
- var U, q;
6183
- return ((q = (U = a.config) == null ? void 0 : U.placeholder) == null ? void 0 : q.trim()) || "Пошук…";
6182
+ var U, W;
6183
+ return ((W = (U = a.config) == null ? void 0 : U.placeholder) == null ? void 0 : W.trim()) || "Пошук…";
6184
6184
  }), r = N(c.value[0]);
6185
6185
  de(c, (U) => {
6186
6186
  U.includes(r.value) || (r.value = U[0]);
@@ -6194,10 +6194,10 @@ const mo = /* @__PURE__ */ he({
6194
6194
  let H = null;
6195
6195
  const Y = N(!1), ne = B(() => u.value.trim().length > 0 ? $.value : w.value), ie = B(() => u.value.trim().length ? `Знайдено ${$.value.length}` : "Історія пошуку"), J = B(() => u.value.trim().length ? "Нічого не знайдено" : "Історія порожня");
6196
6196
  function te() {
6197
- var U, q;
6197
+ var U, W;
6198
6198
  if (typeof window > "u") return [];
6199
6199
  try {
6200
- const V = (q = (U = window.localStorage) == null ? void 0 : U.getItem) == null ? void 0 : q.call(U, ko);
6200
+ const V = (W = (U = window.localStorage) == null ? void 0 : U.getItem) == null ? void 0 : W.call(U, ko);
6201
6201
  if (!V) return [];
6202
6202
  const ce = JSON.parse(V);
6203
6203
  return Array.isArray(ce) ? ce : [];
@@ -6205,40 +6205,40 @@ const mo = /* @__PURE__ */ he({
6205
6205
  return [];
6206
6206
  }
6207
6207
  }
6208
- function W(U) {
6209
- var q, V;
6210
- typeof window > "u" || (V = (q = window.localStorage) == null ? void 0 : q.setItem) == null || V.call(q, ko, JSON.stringify(U));
6208
+ function q(U) {
6209
+ var W, V;
6210
+ typeof window > "u" || (V = (W = window.localStorage) == null ? void 0 : W.setItem) == null || V.call(W, ko, JSON.stringify(U));
6211
6211
  }
6212
6212
  function F(U) {
6213
6213
  const V = [U, ...w.value.filter((ce) => ce.id !== U.id)].slice(0, 10);
6214
- w.value = V, W(V);
6214
+ w.value = V, q(V);
6215
6215
  }
6216
6216
  let S = null;
6217
6217
  function R() {
6218
6218
  S && (S.remove(), S = null);
6219
6219
  }
6220
6220
  function y() {
6221
- var q;
6222
- const U = (q = l.map) == null ? void 0 : q.value;
6221
+ var W;
6222
+ const U = (W = l.map) == null ? void 0 : W.value;
6223
6223
  U && (U.getLayer(dn) && U.removeLayer(dn), U.getLayer($n) && U.removeLayer($n), U.getSource(cn) && U.removeSource(cn));
6224
6224
  }
6225
6225
  function m(U) {
6226
6226
  var me, $e, Fe, Ee;
6227
6227
  if (!((me = a.config) != null && me.showMarker) || !U) return;
6228
- const q = ($e = l.map) == null ? void 0 : $e.value;
6229
- if (!q) return;
6228
+ const W = ($e = l.map) == null ? void 0 : $e.value;
6229
+ if (!W) return;
6230
6230
  y(), D();
6231
6231
  const V = {
6232
6232
  type: "Feature",
6233
6233
  geometry: U,
6234
6234
  properties: {}
6235
6235
  };
6236
- q.addSource(cn, {
6236
+ W.addSource(cn, {
6237
6237
  type: "geojson",
6238
6238
  data: V
6239
6239
  });
6240
6240
  const ce = ((Fe = a.config) == null ? void 0 : Fe.geometryColor) || ((Ee = a.config) == null ? void 0 : Ee.markerColor) || "#3B82F6";
6241
- q.addLayer({
6241
+ W.addLayer({
6242
6242
  id: dn,
6243
6243
  type: "fill",
6244
6244
  source: cn,
@@ -6246,7 +6246,7 @@ const mo = /* @__PURE__ */ he({
6246
6246
  "fill-color": ce,
6247
6247
  "fill-opacity": 0.3
6248
6248
  }
6249
- }), q.addLayer({
6249
+ }), W.addLayer({
6250
6250
  id: $n,
6251
6251
  type: "line",
6252
6252
  source: cn,
@@ -6255,7 +6255,7 @@ const mo = /* @__PURE__ */ he({
6255
6255
  "line-width": 1,
6256
6256
  "line-opacity": 1
6257
6257
  }
6258
- }), X(q);
6258
+ }), X(W);
6259
6259
  }
6260
6260
  let M = null;
6261
6261
  function D() {
@@ -6265,25 +6265,25 @@ const mo = /* @__PURE__ */ he({
6265
6265
  const V = performance.now();
6266
6266
  function ce(me) {
6267
6267
  if (!U.getLayer(dn)) return;
6268
- const Fe = (me - V) % 1200 / 1200, Ee = Math.sin(Fe * Math.PI), ut = 0.2 + Ee * 0.3, kt = 1 + Ee * 1;
6269
- U.setPaintProperty(dn, "fill-opacity", ut), U.setPaintProperty($n, "line-width", kt), M = requestAnimationFrame(ce);
6268
+ const Fe = (me - V) % 1200 / 1200, Ee = Math.sin(Fe * Math.PI), ut = 0.2 + Ee * 0.3, wt = 1 + Ee * 1;
6269
+ U.setPaintProperty(dn, "fill-opacity", ut), U.setPaintProperty($n, "line-width", wt), M = requestAnimationFrame(ce);
6270
6270
  }
6271
6271
  M = requestAnimationFrame(ce);
6272
6272
  }
6273
- function re(U, q) {
6273
+ function re(U, W) {
6274
6274
  var me, $e, Fe;
6275
6275
  if (!((me = a.config) != null && me.showMarker)) return;
6276
6276
  R(), y();
6277
6277
  const V = ($e = l.map) == null ? void 0 : $e.value;
6278
6278
  if (!V) return;
6279
- if (q) {
6280
- m(q);
6279
+ if (W) {
6280
+ m(W);
6281
6281
  return;
6282
6282
  }
6283
6283
  const ce = ((Fe = a.config) == null ? void 0 : Fe.markerColor) || "#3B82F6";
6284
6284
  S = new maplibregl.Marker({ color: ce }).setLngLat([U.lng, U.lat]).addTo(V);
6285
6285
  }
6286
- const ue = bt({
6286
+ const ue = yt({
6287
6287
  position: "absolute",
6288
6288
  left: "0px",
6289
6289
  top: "0px",
@@ -6293,7 +6293,7 @@ const mo = /* @__PURE__ */ he({
6293
6293
  function ge() {
6294
6294
  var $e;
6295
6295
  if (!L.value) return;
6296
- const U = L.value.getBoundingClientRect(), q = ($e = k.value) == null ? void 0 : $e.getBoundingClientRect(), V = (q == null ? void 0 : q.width) ?? U.width, ce = ((q == null ? void 0 : q.left) ?? U.left) + window.scrollX, me = U.bottom + window.scrollY + Xu;
6296
+ const U = L.value.getBoundingClientRect(), W = ($e = k.value) == null ? void 0 : $e.getBoundingClientRect(), V = (W == null ? void 0 : W.width) ?? U.width, ce = ((W == null ? void 0 : W.left) ?? U.left) + window.scrollX, me = U.bottom + window.scrollY + Xu;
6297
6297
  ue.left = `${ce}px`, ue.top = `${me}px`, ue.width = `${V}px`, ue.display = "block";
6298
6298
  }
6299
6299
  const Se = () => {
@@ -6318,41 +6318,41 @@ const mo = /* @__PURE__ */ he({
6318
6318
  return;
6319
6319
  }
6320
6320
  we(), C.value = !0, H = window.setTimeout(() => {
6321
- Ut(U).catch((q) => {
6322
- const V = (q == null ? void 0 : q.message) || "Помилка пошуку адреси";
6323
- yt({ type: "error", title: "Пошук адреси", message: V });
6321
+ Ut(U).catch((W) => {
6322
+ const V = (W == null ? void 0 : W.message) || "Помилка пошуку адреси";
6323
+ _t({ type: "error", title: "Пошук адреси", message: V });
6324
6324
  });
6325
6325
  }, z.value);
6326
6326
  });
6327
6327
  function Ae(U) {
6328
6328
  var ce;
6329
- const q = [];
6330
- i.value && q.push(i.value), U instanceof HTMLElement && q.push(U);
6329
+ const W = [];
6330
+ i.value && W.push(i.value), U instanceof HTMLElement && W.push(U);
6331
6331
  const V = (ce = d.value) == null ? void 0 : ce.querySelectorAll("li");
6332
6332
  V == null || V.forEach((me) => {
6333
- q.push(me);
6334
- }), q.forEach((me) => {
6333
+ W.push(me);
6334
+ }), W.forEach((me) => {
6335
6335
  me.dispatchEvent(new MouseEvent("mouseleave", { bubbles: !0 }));
6336
6336
  });
6337
6337
  }
6338
6338
  function je(U) {
6339
6339
  _.value && Ae(U.target), _.value = !_.value;
6340
6340
  }
6341
- function dt(U, q) {
6342
- Ae(q == null ? void 0 : q.target), r.value = U;
6341
+ function dt(U, W) {
6342
+ Ae(W == null ? void 0 : W.target), r.value = U;
6343
6343
  }
6344
6344
  function ot() {
6345
6345
  u.value = "", $.value = [], C.value = !1, Y.value = !1, R(), y();
6346
6346
  }
6347
6347
  function Ve(U) {
6348
- const q = U.target;
6348
+ const W = U.target;
6349
6349
  if (_.value) {
6350
6350
  const V = d.value;
6351
- V && !V.contains(q) && (Ae(q), _.value = !1);
6351
+ V && !V.contains(W) && (Ae(W), _.value = !1);
6352
6352
  }
6353
6353
  if (T.value) {
6354
6354
  const V = I.value, ce = L.value;
6355
- V && !V.contains(q) && (!ce || !ce.contains(q)) && (C.value = !1);
6355
+ V && !V.contains(W) && (!ce || !ce.contains(W)) && (C.value = !1);
6356
6356
  }
6357
6357
  }
6358
6358
  Be(() => {
@@ -6377,17 +6377,17 @@ const mo = /* @__PURE__ */ he({
6377
6377
  return "";
6378
6378
  }
6379
6379
  }
6380
- function rn(U) {
6381
- const q = U.replace(/[,]+/g, " ").trim();
6382
- if (!q) return null;
6383
- const V = q.split(/\s+/).filter(Boolean);
6380
+ function on(U) {
6381
+ const W = U.replace(/[,]+/g, " ").trim();
6382
+ if (!W) return null;
6383
+ const V = W.split(/\s+/).filter(Boolean);
6384
6384
  if (V.length < 2) return null;
6385
6385
  const ce = V.slice(0, 2).map(Number);
6386
6386
  if (!ce.every((ct) => Number.isFinite(ct))) return null;
6387
6387
  let [me, $e] = ce, Fe = me, Ee = $e;
6388
- const ut = (ct) => Math.abs(ct) <= 90, kt = (ct) => Math.abs(ct) <= 180;
6389
- if (!ut(Fe) || !kt(Ee))
6390
- if (ut(Ee) && kt(Fe))
6388
+ const ut = (ct) => Math.abs(ct) <= 90, wt = (ct) => Math.abs(ct) <= 180;
6389
+ if (!ut(Fe) || !wt(Ee))
6390
+ if (ut(Ee) && wt(Fe))
6391
6391
  Fe = $e, Ee = me;
6392
6392
  else
6393
6393
  return null;
@@ -6405,83 +6405,83 @@ const mo = /* @__PURE__ */ he({
6405
6405
  });
6406
6406
  }
6407
6407
  function gt(U) {
6408
- const q = (U == null ? void 0 : U.result) || (U == null ? void 0 : U.data) || U;
6409
- if (!q) return [];
6410
- const V = q.geom_centroid;
6408
+ const W = (U == null ? void 0 : U.result) || (U == null ? void 0 : U.data) || U;
6409
+ if (!W) return [];
6410
+ const V = W.geom_centroid;
6411
6411
  if (!V || !Array.isArray(V.coordinates)) return [];
6412
6412
  const [ce, me] = V.coordinates;
6413
6413
  return !Number.isFinite(me) || !Number.isFinite(ce) ? [] : [
6414
6414
  {
6415
6415
  id: "parcel",
6416
- title: q.cadnum || q.cad_num || "Земельна ділянка",
6416
+ title: W.cadnum || W.cad_num || "Земельна ділянка",
6417
6417
  lat: me,
6418
6418
  lng: ce,
6419
- geom: q.geom || null
6419
+ geom: W.geom || null
6420
6420
  }
6421
6421
  ];
6422
6422
  }
6423
6423
  function Et(U) {
6424
6424
  return (Array.isArray(U == null ? void 0 : U.features) ? U.features : []).map((V, ce) => {
6425
- var ct, Pt, Kt;
6425
+ var ct, Pt, Jt;
6426
6426
  const me = (ct = V == null ? void 0 : V.geometry) == null ? void 0 : ct.coordinates, $e = Number(me == null ? void 0 : me[0]), Fe = Number(me == null ? void 0 : me[1]);
6427
6427
  if (!Number.isFinite(Fe) || !Number.isFinite($e)) return null;
6428
6428
  const Ee = (V == null ? void 0 : V.properties) || {}, ut = ((Pt = Ee == null ? void 0 : Ee.geocoding) == null ? void 0 : Pt.label) || (Ee == null ? void 0 : Ee.display_name) || (Ee == null ? void 0 : Ee.label) || "Адреса";
6429
- return { id: String(((Kt = Ee == null ? void 0 : Ee.geocoding) == null ? void 0 : Kt.place_id) || (Ee == null ? void 0 : Ee.place_id) || ce), title: ut, lat: Fe, lng: $e };
6429
+ return { id: String(((Jt = Ee == null ? void 0 : Ee.geocoding) == null ? void 0 : Jt.place_id) || (Ee == null ? void 0 : Ee.place_id) || ce), title: ut, lat: Fe, lng: $e };
6430
6430
  }).filter((V) => !!V);
6431
6431
  }
6432
- function Nt(U) {
6432
+ function Dt(U) {
6433
6433
  return Number.isFinite(U.lat) && Number.isFinite(U.lng);
6434
6434
  }
6435
6435
  function it(U) {
6436
- const q = Number(U);
6437
- return Number.isFinite(q) ? q : null;
6438
- }
6439
- function xt(U) {
6440
- var me, $e, Fe, Ee, ut, kt;
6441
- const q = it(U.lng) ?? it(U.lon) ?? it(U.longitude) ?? it(U.x), V = it(U.lat) ?? it(U.latitude) ?? it(U.y);
6442
- if (q != null && V != null)
6443
- return { lat: V, lng: q };
6444
- const ce = ((me = U == null ? void 0 : U.geometry) == null ? void 0 : me.coordinates) ?? (($e = U == null ? void 0 : U.geom_centroid) == null ? void 0 : $e.coordinates) ?? ((Fe = U == null ? void 0 : U.centroid) == null ? void 0 : Fe.coordinates) ?? ((ut = (Ee = U == null ? void 0 : U.geojson) == null ? void 0 : Ee.geometry) == null ? void 0 : ut.coordinates) ?? ((kt = U == null ? void 0 : U.geom) == null ? void 0 : kt.coordinates);
6436
+ const W = Number(U);
6437
+ return Number.isFinite(W) ? W : null;
6438
+ }
6439
+ function bt(U) {
6440
+ var me, $e, Fe, Ee, ut, wt;
6441
+ const W = it(U.lng) ?? it(U.lon) ?? it(U.longitude) ?? it(U.x), V = it(U.lat) ?? it(U.latitude) ?? it(U.y);
6442
+ if (W != null && V != null)
6443
+ return { lat: V, lng: W };
6444
+ const ce = ((me = U == null ? void 0 : U.geometry) == null ? void 0 : me.coordinates) ?? (($e = U == null ? void 0 : U.geom_centroid) == null ? void 0 : $e.coordinates) ?? ((Fe = U == null ? void 0 : U.centroid) == null ? void 0 : Fe.coordinates) ?? ((ut = (Ee = U == null ? void 0 : U.geojson) == null ? void 0 : Ee.geometry) == null ? void 0 : ut.coordinates) ?? ((wt = U == null ? void 0 : U.geom) == null ? void 0 : wt.coordinates);
6445
6445
  if (Array.isArray(ce) && ce.length >= 2) {
6446
6446
  const ct = it(ce[0]), Pt = it(ce[1]);
6447
6447
  if (ct != null && Pt != null) return { lat: Pt, lng: ct };
6448
6448
  }
6449
6449
  return null;
6450
6450
  }
6451
- function wt(U) {
6451
+ function xt(U) {
6452
6452
  return (Array.isArray(U == null ? void 0 : U.data) ? U.data : []).map((V, ce) => {
6453
- const me = xt(V), $e = String(
6453
+ const me = bt(V), $e = String(
6454
6454
  V.text ?? V.title ?? V.label ?? V.name ?? V.address ?? V.display_name ?? V.id ?? "Адреса"
6455
6455
  ), Fe = String(V.id ?? V.code ?? V.value ?? ce);
6456
6456
  return me ? { id: Fe, title: $e, ...me } : { id: Fe, title: $e };
6457
6457
  }).filter((V) => !!(V != null && V.title));
6458
6458
  }
6459
- function Ct(U) {
6460
- const q = p();
6461
- if (!q) return null;
6462
- if (q.includes(":name"))
6463
- return q.replace(":name", encodeURIComponent(U));
6459
+ function $t(U) {
6460
+ const W = p();
6461
+ if (!W) return null;
6462
+ if (W.includes(":name"))
6463
+ return W.replace(":name", encodeURIComponent(U));
6464
6464
  try {
6465
- const V = new URL(q, window.location.origin);
6465
+ const V = new URL(W, window.location.origin);
6466
6466
  return U.trim() && V.searchParams.set("q", U), V.toString();
6467
6467
  } catch {
6468
- return q;
6468
+ return W;
6469
6469
  }
6470
6470
  }
6471
6471
  async function Bt(U) {
6472
- const q = Ct(U);
6473
- if (!q) return [];
6474
- const V = await fetch(q);
6472
+ const W = $t(U);
6473
+ if (!W) return [];
6474
+ const V = await fetch(W);
6475
6475
  if (!V.ok) throw new Error(`HTTP ${V.status}`);
6476
6476
  const ce = await V.json();
6477
- return wt(ce);
6477
+ return xt(ce);
6478
6478
  }
6479
- async function Xt(U) {
6480
- const q = new URL(Qu);
6481
- q.searchParams.set("format", "geojson"), q.searchParams.set("q", U), q.searchParams.set("addressdetails", "1"), q.searchParams.set("bounded", "1");
6479
+ async function rn(U) {
6480
+ const W = new URL(Qu);
6481
+ W.searchParams.set("format", "geojson"), W.searchParams.set("q", U), W.searchParams.set("addressdetails", "1"), W.searchParams.set("bounded", "1");
6482
6482
  const V = v();
6483
- V && q.searchParams.set("viewbox", V);
6484
- const ce = await fetch(q.toString());
6483
+ V && W.searchParams.set("viewbox", V);
6484
+ const ce = await fetch(W.toString());
6485
6485
  if (!ce.ok) throw new Error(`HTTP ${ce.status}`);
6486
6486
  const me = await ce.json();
6487
6487
  return Et(me);
@@ -6489,105 +6489,95 @@ const mo = /* @__PURE__ */ he({
6489
6489
  async function Ut(U) {
6490
6490
  if ($.value = [], we(), r.value === "address") {
6491
6491
  if (!p()) {
6492
- yt({ type: "warning", title: "Пошук адреси", message: "Не налаштовано addressSuggest" });
6492
+ _t({ type: "warning", title: "Пошук адреси", message: "Не налаштовано addressSuggest" });
6493
6493
  return;
6494
6494
  }
6495
6495
  const ce = await Bt(U);
6496
6496
  if (!ce.length) {
6497
- yt({ type: "warning", title: "Пошук адреси", message: "Не знайдено результатів" });
6497
+ _t({ type: "warning", title: "Пошук адреси", message: "Не знайдено результатів" });
6498
6498
  return;
6499
6499
  }
6500
6500
  $.value = ce;
6501
6501
  return;
6502
6502
  }
6503
- const q = await Xt(U);
6504
- if (!q.length) {
6505
- yt({ type: "warning", title: "Пошук адреси", message: "Не знайдено результатів" });
6503
+ const W = await rn(U);
6504
+ if (!W.length) {
6505
+ _t({ type: "warning", title: "Пошук адреси", message: "Не знайдено результатів" });
6506
6506
  return;
6507
6507
  }
6508
- $.value = q;
6508
+ $.value = W;
6509
6509
  }
6510
6510
  async function vt(U) {
6511
- if (Nt(U)) {
6512
- _t(U), F(U);
6511
+ if (Dt(U)) {
6512
+ Ct(U), F(U);
6513
6513
  return;
6514
6514
  }
6515
- try {
6516
- const V = (await Xt(U.title))[0];
6517
- if (!V || !Nt(V)) {
6518
- yt({ type: "warning", title: "Пошук адреси", message: "Не знайдено координати адреси" });
6519
- return;
6520
- }
6521
- _t(V), F(V);
6522
- } catch (q) {
6523
- const V = (q == null ? void 0 : q.message) || "Помилка пошуку адреси";
6524
- yt({ type: "error", title: "Пошук адреси", message: V });
6525
- }
6515
+ _t({ type: "warning", title: "Пошук адреси", message: "Геометрія для обраної адреси відсутня" });
6526
6516
  }
6527
6517
  function Vt() {
6528
6518
  r.value !== "address" && r.value !== "nominatim" || u.value.trim().length || w.value.length && (C.value = !0, Xe(() => {
6529
6519
  ge();
6530
6520
  }));
6531
6521
  }
6532
- function Jt(U) {
6522
+ function Xt(U) {
6533
6523
  const V = U.replace(/\s+/g, "").split(":");
6534
6524
  if (console.log(V), V.length !== 4) return !1;
6535
6525
  const ce = [10, 2, 3, 4];
6536
6526
  return V.every((me, $e) => me.length === ce[$e] && /^\d+$/.test(me));
6537
6527
  }
6538
- function _t(U) {
6528
+ function Ct(U) {
6539
6529
  var V, ce;
6540
- const q = ((V = a.config) == null ? void 0 : V.zoom) ?? 17;
6541
- (ce = l.flyTo) == null || ce.call(l, { center: [U.lng, U.lat], zoom: q }), re(U, U.geom), Y.value = !0;
6530
+ const W = ((V = a.config) == null ? void 0 : V.zoom) ?? 17;
6531
+ (ce = l.flyTo) == null || ce.call(l, { center: [U.lng, U.lat], zoom: W }), re(U, U.geom), Y.value = !0;
6542
6532
  }
6543
6533
  async function Lt() {
6544
6534
  const U = u.value.trim();
6545
6535
  if (U) {
6546
6536
  if (r.value === "xy") {
6547
- const q = rn(U);
6548
- if (!q) {
6549
- yt({ type: "warning", title: "Пошук координат", message: "Не знайдено або невірний формат координат" });
6537
+ const W = on(U);
6538
+ if (!W) {
6539
+ _t({ type: "warning", title: "Пошук координат", message: "Не знайдено або невірний формат координат" });
6550
6540
  return;
6551
6541
  }
6552
- _t(q);
6542
+ Ct(W);
6553
6543
  return;
6554
6544
  }
6555
6545
  if (r.value === "address" || r.value === "nominatim") {
6556
6546
  try {
6557
6547
  await Ut(U);
6558
- } catch (q) {
6559
- const V = (q == null ? void 0 : q.message) || "Помилка пошуку адреси";
6560
- yt({ type: "error", title: "Пошук адреси", message: V });
6548
+ } catch (W) {
6549
+ const V = (W == null ? void 0 : W.message) || "Помилка пошуку адреси";
6550
+ _t({ type: "error", title: "Пошук адреси", message: V });
6561
6551
  }
6562
6552
  return;
6563
6553
  }
6564
6554
  try {
6565
- const q = new URL(r.value === "here" ? Ju : Ku);
6555
+ const W = new URL(r.value === "here" ? Ju : Ku);
6566
6556
  if (r.value === "here")
6567
- q.searchParams.set("searchtext", U);
6557
+ W.searchParams.set("searchtext", U);
6568
6558
  else {
6569
- if (!Jt(U)) {
6570
- yt({ type: "warning", title: "Пошук кадастру", message: "Кадастровий номер має формат ХХХХХХХХХХ:ХХ:ХХХ:ХХХХ" });
6559
+ if (!Xt(U)) {
6560
+ _t({ type: "warning", title: "Пошук кадастру", message: "Кадастровий номер має формат ХХХХХХХХХХ:ХХ:ХХХ:ХХХХ" });
6571
6561
  return;
6572
6562
  }
6573
- q.searchParams.set("cad_num", U);
6563
+ W.searchParams.set("cad_num", U);
6574
6564
  }
6575
- const V = await fetch(q.toString());
6565
+ const V = await fetch(W.toString());
6576
6566
  if (!V.ok) throw new Error(`HTTP ${V.status}`);
6577
6567
  const ce = await V.json(), me = r.value === "here" ? Yt(ce) : gt(ce);
6578
6568
  if (!me.length)
6579
- yt({ type: "warning", title: "Пошук", message: "Не знайдено результатів" });
6569
+ _t({ type: "warning", title: "Пошук", message: "Не знайдено результатів" });
6580
6570
  else {
6581
6571
  const $e = me[0];
6582
- _t($e);
6572
+ Ct($e);
6583
6573
  }
6584
- } catch (q) {
6585
- const V = (q == null ? void 0 : q.message) || "Помилка пошуку";
6586
- yt({ type: "error", title: "Пошук", message: V });
6574
+ } catch (W) {
6575
+ const V = (W == null ? void 0 : W.message) || "Помилка пошуку";
6576
+ _t({ type: "error", title: "Пошук", message: V });
6587
6577
  }
6588
6578
  }
6589
6579
  }
6590
- return (U, q) => (o(), g("div", {
6580
+ return (U, W) => (o(), g("div", {
6591
6581
  ref_key: "widgetRef",
6592
6582
  ref: k,
6593
6583
  class: "map-search-widget flex flex-col gap-2 bg-white border border-stone-200 shadow-2xs rounded-xl widget p-3 min-w-[200px]"
@@ -6622,7 +6612,7 @@ const mo = /* @__PURE__ */ he({
6622
6612
  viewBox: "0 0 24 24",
6623
6613
  fill: "none",
6624
6614
  xmlns: "http://www.w3.org/2000/svg"
6625
- }, [...q[3] || (q[3] = [
6615
+ }, [...W[3] || (W[3] = [
6626
6616
  e("path", {
6627
6617
  d: "M6 9l6 6 6-6",
6628
6618
  stroke: "currentColor",
@@ -6654,19 +6644,19 @@ const mo = /* @__PURE__ */ he({
6654
6644
  r.value === "parcel" ? (o(), fe(oe(Lr), {
6655
6645
  key: 0,
6656
6646
  modelValue: u.value,
6657
- "onUpdate:modelValue": q[0] || (q[0] = (V) => u.value = V),
6647
+ "onUpdate:modelValue": W[0] || (W[0] = (V) => u.value = V),
6658
6648
  mask: "0000000000:00:000:0000",
6659
6649
  class: Ce(["vs-input !h-[34px] transition-all border block w-full border-gray-200 rounded-md focus:border-blue-100 border-solid py-1.5 pl-3 text-sm", Y.value ? "!pr-14" : "!pr-8"])
6660
6650
  }, null, 8, ["modelValue", "class"])) : et((o(), g("input", {
6661
6651
  key: 1,
6662
- "onUpdate:modelValue": q[1] || (q[1] = (V) => u.value = V),
6652
+ "onUpdate:modelValue": W[1] || (W[1] = (V) => u.value = V),
6663
6653
  placeholder: b.value,
6664
6654
  type: "text",
6665
6655
  class: Ce(["vs-input transition-all border block w-full border-gray-200 rounded-md focus:border-blue-100 border-solid py-1.5 pl-3 text-sm", Y.value ? "!pr-14" : "!pr-8"]),
6666
6656
  onFocus: Vt
6667
6657
  }, null, 42, Uu)), [
6668
6658
  [
6669
- $t,
6659
+ kt,
6670
6660
  u.value,
6671
6661
  void 0,
6672
6662
  { trim: !0 }
@@ -6679,7 +6669,7 @@ const mo = /* @__PURE__ */ he({
6679
6669
  class: "flex items-center text-gray-400 hover:text-gray-600",
6680
6670
  "aria-label": "Очистити",
6681
6671
  onClick: ot
6682
- }, [...q[4] || (q[4] = [
6672
+ }, [...W[4] || (W[4] = [
6683
6673
  e("svg", {
6684
6674
  xmlns: "http://www.w3.org/2000/svg",
6685
6675
  class: "h-4 w-4",
@@ -6695,7 +6685,7 @@ const mo = /* @__PURE__ */ he({
6695
6685
  })
6696
6686
  ], -1)
6697
6687
  ])])) : K("", !0),
6698
- q[5] || (q[5] = e("button", {
6688
+ W[5] || (W[5] = e("button", {
6699
6689
  type: "submit",
6700
6690
  class: "flex items-center text-gray-400 hover:text-gray-600",
6701
6691
  "aria-label": "Пошук"
@@ -6732,7 +6722,7 @@ const mo = /* @__PURE__ */ he({
6732
6722
  type: "button",
6733
6723
  class: "text-gray-400 hover:text-gray-600",
6734
6724
  "aria-label": "Закрити",
6735
- onClick: q[2] || (q[2] = (V) => C.value = !1)
6725
+ onClick: W[2] || (W[2] = (V) => C.value = !1)
6736
6726
  }, " ✕ ")
6737
6727
  ]),
6738
6728
  e("div", Zu, [
@@ -6750,7 +6740,7 @@ const mo = /* @__PURE__ */ he({
6750
6740
  ], 32)
6751
6741
  ], 512));
6752
6742
  }
6753
- }), $o = /* @__PURE__ */ Ue(ec, [["__scopeId", "data-v-ba50488b"]]), tc = "https://watergis.github.io/mapbox-gl-export/mapbox-gl-export.css", nc = "https://watergis.github.io/mapbox-gl-export/mapbox-gl-export.js", oc = /* @__PURE__ */ he({
6743
+ }), $o = /* @__PURE__ */ Ue(ec, [["__scopeId", "data-v-d7cf7dd1"]]), tc = "https://watergis.github.io/mapbox-gl-export/mapbox-gl-export.css", nc = "https://watergis.github.io/mapbox-gl-export/mapbox-gl-export.js", oc = /* @__PURE__ */ he({
6754
6744
  __name: "MapPrintControl",
6755
6745
  setup(n) {
6756
6746
  const { map: t, ready: a, addControl: l, removeControl: x } = at(), f = N(null), v = N(null), p = N(null), P = N(null);
@@ -7331,7 +7321,7 @@ const mo = /* @__PURE__ */ he({
7331
7321
  placeholder: "Широта (50.4501)"
7332
7322
  }, null, 512), [
7333
7323
  [
7334
- $t,
7324
+ kt,
7335
7325
  l.value,
7336
7326
  void 0,
7337
7327
  { number: !0 }
@@ -7345,7 +7335,7 @@ const mo = /* @__PURE__ */ he({
7345
7335
  placeholder: "Довгота (30.5234)"
7346
7336
  }, null, 512), [
7347
7337
  [
7348
- $t,
7338
+ kt,
7349
7339
  x.value,
7350
7340
  void 0,
7351
7341
  { number: !0 }
@@ -7473,7 +7463,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7473
7463
  placeholder: "Широта"
7474
7464
  }, null, 512), [
7475
7465
  [
7476
- $t,
7466
+ kt,
7477
7467
  v.value,
7478
7468
  void 0,
7479
7469
  { number: !0 }
@@ -7489,7 +7479,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7489
7479
  placeholder: "Довгота"
7490
7480
  }, null, 512), [
7491
7481
  [
7492
- $t,
7482
+ kt,
7493
7483
  p.value,
7494
7484
  void 0,
7495
7485
  { number: !0 }
@@ -7839,7 +7829,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7839
7829
  "aria-label": "Закрити",
7840
7830
  onClick: H
7841
7831
  }, [
7842
- pe(oe(on), {
7832
+ pe(oe(nn), {
7843
7833
  size: 14,
7844
7834
  "stroke-width": 2,
7845
7835
  class: "text-white"
@@ -8155,7 +8145,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
8155
8145
  "aria-label": "Закрити",
8156
8146
  onClick: E
8157
8147
  }, [
8158
- pe(oe(on), {
8148
+ pe(oe(nn), {
8159
8149
  size: 14,
8160
8150
  "stroke-width": 2,
8161
8151
  class: "text-white"
@@ -8321,7 +8311,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
8321
8311
  "aria-label": "Закрити",
8322
8312
  onClick: A
8323
8313
  }, [
8324
- pe(oe(on), {
8314
+ pe(oe(nn), {
8325
8315
  size: 14,
8326
8316
  "stroke-width": 2,
8327
8317
  class: "text-white"
@@ -8359,7 +8349,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
8359
8349
  class: "w-9 h-9 p-0.5 border-2 border-gray-200 rounded-lg cursor-pointer bg-white [&::-webkit-color-swatch-wrapper]:p-0 [&::-webkit-color-swatch]:border-none [&::-webkit-color-swatch]:rounded-md",
8360
8350
  onChange: P
8361
8351
  }, null, 544), [
8362
- [$t, v.value]
8352
+ [kt, v.value]
8363
8353
  ])
8364
8354
  ]),
8365
8355
  e("label", Fd, [
@@ -8373,7 +8363,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
8373
8363
  onInput: E
8374
8364
  }, null, 544), [
8375
8365
  [
8376
- $t,
8366
+ kt,
8377
8367
  p.value,
8378
8368
  void 0,
8379
8369
  { number: !0 }
@@ -8582,7 +8572,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
8582
8572
  m.beginPath(), m.arc(we, Ae, je, 0, 2 * Math.PI), m.fill();
8583
8573
  }
8584
8574
  }
8585
- function W() {
8575
+ function q() {
8586
8576
  if (!c.value) return;
8587
8577
  const m = I();
8588
8578
  if (!m) {
@@ -8655,10 +8645,10 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
8655
8645
  class: Ce(["drawing-canvas-wrap", { "drawing-canvas-wrap--eraser": n.tool === "eraser" }]),
8656
8646
  onMousedown: Y,
8657
8647
  onMousemove: ne,
8658
- onMouseup: W,
8648
+ onMouseup: q,
8659
8649
  onDblclick: J,
8660
8650
  onMouseleave: M[0] || (M[0] = () => {
8661
- ie(), W();
8651
+ ie(), q();
8662
8652
  })
8663
8653
  }, [
8664
8654
  e("canvas", {
@@ -8808,7 +8798,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
8808
8798
  },
8809
8799
  setup(n) {
8810
8800
  var yn, ln, bn, xn;
8811
- const t = n, a = At(), l = Dt(), x = N(null), f = N({}), v = N(null), p = N(!1), P = N(null), E = N(!1), A = N([]), c = N(null), b = B(() => c.value === "ruler"), r = B(() => c.value === "draw"), u = B(() => c.value === "geolocation"), _ = N("general"), d = N(null), i = N(null), k = N(null), L = N("pen"), $ = N("#2563eb"), I = N(3), C = N([]), w = N(!1), T = N(null), z = N(!1), H = N(null), Y = B(() => t.id || "main"), ne = B(() => {
8801
+ const t = n, a = At(), l = Ot(), x = N(null), f = N({}), v = N(null), p = N(!1), P = N(null), E = N(!1), A = N([]), c = N(null), b = B(() => c.value === "ruler"), r = B(() => c.value === "draw"), u = B(() => c.value === "geolocation"), _ = N("general"), d = N(null), i = N(null), k = N(null), L = N("pen"), $ = N("#2563eb"), I = N(3), C = N([]), w = N(!1), T = N(null), z = N(!1), H = N(null), Y = B(() => t.id || "main"), ne = B(() => {
8812
8802
  var j, Z;
8813
8803
  return {
8814
8804
  height: ((j = t.height) == null ? void 0 : j.trim()) || ((Z = f.value) == null ? void 0 : Z.height) || "calc(100vh - 65px)"
@@ -8822,7 +8812,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
8822
8812
  }), te = B(() => {
8823
8813
  var j;
8824
8814
  return we((j = f.value) == null ? void 0 : j.maps);
8825
- }), W = B(() => {
8815
+ }), q = B(() => {
8826
8816
  var Z, ye;
8827
8817
  const j = ((Z = f.value) == null ? void 0 : Z.minZoom) ?? ((ye = f.value) == null ? void 0 : ye.minzoom) ?? null;
8828
8818
  return typeof j == "number" ? j : null;
@@ -8893,7 +8883,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
8893
8883
  var j, Z, ye;
8894
8884
  return ((ye = (Z = (j = x.value) == null ? void 0 : j.ctx) == null ? void 0 : Z.map) == null ? void 0 : ye.value) ?? null;
8895
8885
  }
8896
- function rn() {
8886
+ function on() {
8897
8887
  const j = Tt();
8898
8888
  if (!j) return null;
8899
8889
  const Z = j.getCenter();
@@ -8906,7 +8896,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
8906
8896
  async function Yt() {
8907
8897
  var ye;
8908
8898
  const j = await ft(), Z = (ye = j == null ? void 0 : j.map) == null ? void 0 : ye.value;
8909
- Z && (typeof W.value == "number" && Z.setMinZoom(W.value), typeof F.value == "number" && Z.setMaxZoom(F.value));
8899
+ Z && (typeof q.value == "number" && Z.setMinZoom(q.value), typeof F.value == "number" && Z.setMaxZoom(F.value));
8910
8900
  }
8911
8901
  async function gt() {
8912
8902
  var se;
@@ -8917,41 +8907,41 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
8917
8907
  v.value = { center: [ye.lng, ye.lat], zoom: _e };
8918
8908
  }
8919
8909
  function Et() {
8920
- if (Ct.value) return;
8921
- const j = rn();
8910
+ if ($t.value) return;
8911
+ const j = on();
8922
8912
  if (!j) return;
8923
8913
  const Z = Ve(a.query.x), ye = Ve(a.query.y), _e = Ve(a.query.z);
8924
8914
  Z === j.x && ye === j.y && _e === j.z || (Bt.value = j, l.replace({ query: { ...a.query, ...j } }).catch(() => {
8925
8915
  }));
8926
8916
  }
8927
- function Nt(j, Z, ye = 1e-6) {
8917
+ function Dt(j, Z, ye = 1e-6) {
8928
8918
  return Math.abs(j - Z) <= ye;
8929
8919
  }
8930
8920
  async function it() {
8931
8921
  var Re;
8932
- if (Xt()) return;
8922
+ if (rn()) return;
8933
8923
  const j = await ft(), Z = (Re = j == null ? void 0 : j.map) == null ? void 0 : Re.value;
8934
8924
  if (!j || !Z) return;
8935
8925
  const ye = parseFloat(Ve(a.query.x) ?? ""), _e = parseFloat(Ve(a.query.y) ?? ""), se = parseFloat(Ve(a.query.z) ?? ""), Te = !Number.isNaN(ye), Le = !Number.isNaN(_e), le = !Number.isNaN(se);
8936
8926
  let Me = !1;
8937
- Ct.value = !0;
8927
+ $t.value = !0;
8938
8928
  try {
8939
8929
  if (Te && Le) {
8940
8930
  const Pe = Z.getCenter();
8941
- (!Nt(Pe.lng, ye) || !Nt(Pe.lat, _e)) && (Z.setCenter([ye, _e]), Me = !0);
8931
+ (!Dt(Pe.lng, ye) || !Dt(Pe.lat, _e)) && (Z.setCenter([ye, _e]), Me = !0);
8942
8932
  }
8943
8933
  if (le) {
8944
8934
  const Pe = Z.getZoom();
8945
- Nt(Pe, se, 1e-3) || (Z.setZoom(se), Me = !0);
8935
+ Dt(Pe, se, 1e-3) || (Z.setZoom(se), Me = !0);
8946
8936
  }
8947
8937
  (!Te || !Le || !le || Me) && Et();
8948
8938
  } finally {
8949
- Ct.value = !1;
8939
+ $t.value = !1;
8950
8940
  }
8951
8941
  }
8952
- let xt = null, wt = null;
8953
- const Ct = N(!1), Bt = N(null);
8954
- function Xt() {
8942
+ let bt = null, xt = null;
8943
+ const $t = N(!1), Bt = N(null);
8944
+ function rn() {
8955
8945
  const j = Bt.value;
8956
8946
  if (!j) return !1;
8957
8947
  const Z = Ve(a.query.x), ye = Ve(a.query.y), _e = Ve(a.query.z);
@@ -8967,7 +8957,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
8967
8957
  new CustomEvent(Vn, { detail: j })
8968
8958
  );
8969
8959
  }
8970
- function Jt(j) {
8960
+ function Xt(j) {
8971
8961
  if (!j) return null;
8972
8962
  if (typeof j == "string")
8973
8963
  try {
@@ -8977,7 +8967,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
8977
8967
  }
8978
8968
  return j;
8979
8969
  }
8980
- async function _t(j) {
8970
+ async function Ct(j) {
8981
8971
  const Z = await fetch(`/api/map-format?${j.toString()}`);
8982
8972
  if (!Z.ok)
8983
8973
  throw new Error(`API returned ${Z.status}`);
@@ -9010,7 +9000,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
9010
9000
  return Te !== "raster" && Le !== "raster";
9011
9001
  }) : [];
9012
9002
  }
9013
- async function q(j) {
9003
+ async function W(j) {
9014
9004
  var Te, Le, le, Me, Re;
9015
9005
  const Z = (Te = j == null ? void 0 : j.lngLat) == null ? void 0 : Te.lng, ye = (Le = j == null ? void 0 : j.lngLat) == null ? void 0 : Le.lat;
9016
9006
  if (typeof Z != "number" || typeof ye != "number") return [];
@@ -9024,14 +9014,14 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
9024
9014
  lng: Z.toFixed(6)
9025
9015
  });
9026
9016
  try {
9027
- const Ie = await _t(st), tt = Jt(
9017
+ const Ie = await Ct(st), tt = Xt(
9028
9018
  ((le = Ie == null ? void 0 : Ie.data) == null ? void 0 : le.geom) ?? (Ie == null ? void 0 : Ie.geom) ?? null
9029
9019
  ), Ze = ((Me = Ie == null ? void 0 : Ie.data) == null ? void 0 : Me.id) ?? (Ie == null ? void 0 : Ie.id);
9030
9020
  if (Ze != null) {
9031
- const He = await _t(new URLSearchParams({
9021
+ const He = await Ct(new URLSearchParams({
9032
9022
  layer: qe,
9033
9023
  id: String(Ze)
9034
- })), lt = typeof (He == null ? void 0 : He.html) == "string" ? He.html : null, wn = Jt(
9024
+ })), lt = typeof (He == null ? void 0 : He.html) == "string" ? He.html : null, wn = Xt(
9035
9025
  ((Re = He == null ? void 0 : He.data) == null ? void 0 : Re.geom) ?? (He == null ? void 0 : He.geom) ?? null
9036
9026
  );
9037
9027
  if (lt || wn) {
@@ -9057,7 +9047,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
9057
9047
  var se;
9058
9048
  const Z = j == null ? void 0 : j.lngLat;
9059
9049
  A.value.includes("ruler") && b.value && Z && ((se = d.value) == null || se.addPoint({ lat: Z.lat, lng: Z.lng }));
9060
- const ye = U(j), _e = await q(j).catch(() => []);
9050
+ const ye = U(j), _e = await W(j).catch(() => []);
9061
9051
  Vt({
9062
9052
  features: ye,
9063
9053
  externalItems: _e
@@ -9104,7 +9094,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
9104
9094
  Z != null && Z.flyTo && Z.flyTo({ center: [j.lng, j.lat], zoom: 15 });
9105
9095
  });
9106
9096
  }
9107
- function kt(j) {
9097
+ function wt(j) {
9108
9098
  C.value = j;
9109
9099
  }
9110
9100
  function ct() {
@@ -9115,7 +9105,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
9115
9105
  var j;
9116
9106
  (j = k.value) == null || j.finishPolygon();
9117
9107
  }
9118
- function Kt() {
9108
+ function Jt() {
9119
9109
  var j;
9120
9110
  (j = k.value) == null || j.undo();
9121
9111
  }
@@ -9160,10 +9150,10 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
9160
9150
  }
9161
9151
  async function An() {
9162
9152
  const j = await ft();
9163
- j != null && j.on && (xt == null || xt(), xt = j.on("moveend", Et), wt == null || wt(), wt = j.on("mousemove", Ut), vt == null || vt(), vt = j.on("click", V));
9153
+ j != null && j.on && (bt == null || bt(), bt = j.on("moveend", Et), xt == null || xt(), xt = j.on("mousemove", Ut), vt == null || vt(), vt = j.on("click", V));
9164
9154
  }
9165
9155
  So(() => {
9166
- xt == null || xt(), xt = null, wt == null || wt(), wt = null, vt == null || vt(), vt = null;
9156
+ bt == null || bt(), bt = null, xt == null || xt(), xt = null, vt == null || vt(), vt = null;
9167
9157
  });
9168
9158
  async function sn(j = !1) {
9169
9159
  var ye, _e;
@@ -9219,11 +9209,11 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
9219
9209
  });
9220
9210
  }), Array.from(j.values());
9221
9211
  }), zt = N([]);
9222
- function Qt(j) {
9212
+ function Kt(j) {
9223
9213
  zt.value.includes(j) ? zt.value = zt.value.filter((Z) => Z !== j) : zt.value.push(j);
9224
9214
  }
9225
9215
  const Wt = B(() => (j) => zt.value.includes(j.id));
9226
- return de([W, F], () => {
9216
+ return de([q, F], () => {
9227
9217
  Yt();
9228
9218
  }, { immediate: !0 }), de(Y, () => {
9229
9219
  sn(!0);
@@ -9273,7 +9263,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
9273
9263
  onClear: ct,
9274
9264
  onDownload: Mn,
9275
9265
  onFinishPolygon: Pt,
9276
- onUndo: Kt,
9266
+ onUndo: Jt,
9277
9267
  "onUpdate:tool": Z[1] || (Z[1] = (Le) => L.value = Le),
9278
9268
  "onUpdate:strokeColor": Z[2] || (Z[2] = (Le) => $.value = Le),
9279
9269
  "onUpdate:strokeWidth": Z[3] || (Z[3] = (Le) => I.value = Le)
@@ -9294,7 +9284,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
9294
9284
  ref: d,
9295
9285
  onClose: me,
9296
9286
  onTabChange: Z[4] || (Z[4] = (Le) => _.value = Le),
9297
- onPointsChange: kt,
9287
+ onPointsChange: wt,
9298
9288
  onShapeClosedChange: Z[5] || (Z[5] = (Le) => w.value = Le)
9299
9289
  }, null, 512)) : K("", !0),
9300
9290
  A.value.includes("geolocation") && u.value ? (o(), fe(wd, {
@@ -9398,7 +9388,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
9398
9388
  }, null, 8, ["api"])) : le.type === "layers" ? (o(), fe(vo, {
9399
9389
  key: 2,
9400
9390
  layers: qt.value,
9401
- onAction: Z[6] || (Z[6] = (He) => Qt(He.layerId)),
9391
+ onAction: Z[6] || (Z[6] = (He) => Kt(He.layerId)),
9402
9392
  config: le.config
9403
9393
  }, null, 8, ["layers", "config"])) : le.type === "basemaps" ? (o(), fe(On, {
9404
9394
  key: 3,
@@ -9411,7 +9401,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
9411
9401
  }, null, 8, ["items"])) : le.type === "filters" && Wt.value(le) ? (o(), fe(xo, {
9412
9402
  key: 5,
9413
9403
  "layer-id": (Ze = le.config) == null ? void 0 : Ze.layer,
9414
- onClose: Qt
9404
+ onClose: Kt
9415
9405
  }, null, 8, ["layer-id"])) : le.type === "dataset" || le.type === "attribute" ? (o(), fe(_o, {
9416
9406
  key: 6,
9417
9407
  config: le.config
@@ -9446,7 +9436,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
9446
9436
  }, null, 8, ["api"])) : le.type === "layers" ? (o(), fe(vo, {
9447
9437
  key: 2,
9448
9438
  layers: qt.value,
9449
- onAction: Z[7] || (Z[7] = (He) => Qt(He.layerId)),
9439
+ onAction: Z[7] || (Z[7] = (He) => Kt(He.layerId)),
9450
9440
  config: le.config
9451
9441
  }, null, 8, ["layers", "config"])) : le.type === "basemaps" ? (o(), fe(On, {
9452
9442
  key: 3,
@@ -9459,7 +9449,7 @@ const Cc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
9459
9449
  }, null, 8, ["items"])) : le.type === "filters" && Wt.value(le) ? (o(), fe(xo, {
9460
9450
  key: 5,
9461
9451
  "layer-id": (Ze = le.config) == null ? void 0 : Ze.layer,
9462
- onClose: Qt
9452
+ onClose: Kt
9463
9453
  }, null, 8, ["layer-id"])) : le.type === "dataset" || le.type === "attribute" ? (o(), fe(_o, {
9464
9454
  key: 6,
9465
9455
  config: le.config
@@ -10170,7 +10160,8 @@ function ng(n) {
10170
10160
  n.component("MapCustom", lf);
10171
10161
  }
10172
10162
  export {
10173
- ng as A,
10163
+ Yp as A,
10164
+ ng as B,
10174
10165
  Nr as F,
10175
10166
  $l as M,
10176
10167
  Ue as _,
@@ -10187,17 +10178,17 @@ export {
10187
10178
  bo as k,
10188
10179
  Na as l,
10189
10180
  wi as m,
10190
- Io as n,
10191
- Ba as o,
10192
- ho as p,
10193
- lf as q,
10194
- qp as r,
10181
+ Vn as n,
10182
+ Io as o,
10183
+ Ba as p,
10184
+ ho as q,
10185
+ lf as r,
10195
10186
  Fl as s,
10196
- Wp as t,
10187
+ qp as t,
10197
10188
  Oe as u,
10198
- Zp as v,
10199
- Hp as w,
10200
- Xp as x,
10201
- Gp as y,
10202
- Yp as z
10189
+ Wp as v,
10190
+ Zp as w,
10191
+ Hp as x,
10192
+ Xp as y,
10193
+ Gp as z
10203
10194
  };