@opengis/gis 0.2.171 → 0.2.173
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.
- package/dist/{CardIcon-DrNd-2PW.js → CardIcon-Cg8bUM4G.js} +1 -1
- package/dist/{EntityTablePage-CERD3KWs.js → EntityTablePage-DHQGlLRk.js} +1 -1
- package/dist/{ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-3IWWtgKt.js → ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-BIL1ocLY.js} +1 -1
- package/dist/{HeaderActions.vue_vue_type_script_setup_true_lang-D_BESZDN.js → HeaderActions.vue_vue_type_script_setup_true_lang-Buff9gTO.js} +1 -1
- package/dist/{MapSettings-Dlo25naH.js → MapSettings-De-z7r5t.js} +1 -1
- package/dist/{RastersTablePage-BB5DAQ9o.js → RastersTablePage-Cdgkri9K.js} +1 -1
- package/dist/{cartocss-DmNfkX6X.js → cartocss-BT50SVhy.js} +5 -5
- package/dist/{import-utils-Dp6H-Ajf.js → import-utils-CMWiuRPp.js} +1 -1
- package/dist/{index-BaB3A3Tb.js → index-CHFLgCGW.js} +688 -678
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +19 -19
- package/dist/{raster-GtCFqtk-.js → raster-dSEb1SIG.js} +3 -3
- package/dist/{register-BQEx0elz.js → register-D7Puupgo.js} +3 -3
- package/dist/{service-CgO3RsDo.js → service-Cz6T0O3Z.js} +5 -5
- package/dist/{vs-datatable-B3hGBtGc.js → vs-datatable-DqVncrSg.js} +1 -1
- package/package.json +1 -1
- package/server/plugins/mapnik/funcs/checkRasterFile.js +1 -1
- package/server/routes/mapnik/functions/createXml.js +20 -8
- package/server/routes/mapnik/mapnik.route.js +1 -1
- package/server/routes/mapnik/mapnik.schema.mjs +5 -0
- package/server/routes/registers/functions/map.registry.js +20 -12
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as Ae, useSlots as Xr, computed as O, openBlock as s, createBlock as we, resolveDynamicComponent as ln, createSlots as wr, renderList as Te, unref as pe, withCtx as Et, renderSlot as un, normalizeProps as Jr, guardReactiveProps as Kr, defineAsyncComponent as
|
|
1
|
+
import { defineComponent as Ae, useSlots as Xr, computed as O, openBlock as s, createBlock as we, resolveDynamicComponent as ln, createSlots as wr, renderList as Te, unref as pe, withCtx as Et, renderSlot as un, normalizeProps as Jr, guardReactiveProps as Kr, defineAsyncComponent as lt, createElementVNode as n, normalizeClass as Be, toDisplayString as J, createElementBlock as h, createVNode as be, ref as M, onMounted as Qe, watch as _e, createCommentVNode as oe, Fragment as de, withModifiers as We, Teleport as Ct, createTextVNode as Me, normalizeStyle as at, reactive as wt, withDirectives as Ke, vModelText as gt, withKeys as Qn, nextTick as it, shallowRef as _r, onUnmounted as kr, provide as Qr, inject as es, getCurrentInstance as Xt, onBeforeUnmount as Je, createStaticVNode as Uo, Transition as Vo, vShow as Gt, vModelRadio as ts, vModelSelect as ns } from "vue";
|
|
2
2
|
import { useRoute as Mt, useRouter as qt } from "vue-router";
|
|
3
3
|
import { Loader2 as an, Layers as os, Code as rs, ClipboardCopy as ss, ChevronRight as ls, X as $t, Search as $r, Plus as to, PenLine as is, Trash2 as qo, SquarePen as as, Check as us, ChevronDown as Cr, Eye as cs, EyeOff as ds, Contrast as fs, ChevronUp as ps, ArrowLeft as zo, ArrowRight as Io, Columns2 as vs, House as gs, MapPin as Cn, Minus as Lr, Navigation2 as ms, ArrowUpLeft as hs, Route as Zn, Map as ys, ArrowUpDown as bs, Car as xs, PersonStanding as ws, Bike as _s, Bus as ks, PlaneTakeoff as $s, RotateCcw as Cs, ArrowUp as Ls, Navigation as Ss, Circle as Sr, Info as Gn, Ruler as Er, ClipboardPaste as Es, TrendingUp as Ar, Pen as Bo, Undo2 as As, Pentagon as Ko, Download as Ts, Square as Ps, PaintBucket as Ms, Eraser as Rs, Upload as Tr } from "lucide-vue-next";
|
|
4
|
-
import { VsPagination as js, notify as
|
|
4
|
+
import { VsPagination as js, notify as ft, confirm as Fs } from "@opengis/core";
|
|
5
5
|
import { VsInputMask as zs } from "@opengis/form";
|
|
6
6
|
const Ln = /* @__PURE__ */ Ae({
|
|
7
7
|
__name: "BaseEntityWrapper",
|
|
@@ -34,13 +34,13 @@ const Ln = /* @__PURE__ */ Ae({
|
|
|
34
34
|
}), Is = "registers", Bs = "/gis.registers", mh = /* @__PURE__ */ Ae({
|
|
35
35
|
__name: "RegistersWrapper",
|
|
36
36
|
setup(e) {
|
|
37
|
-
const t =
|
|
38
|
-
() => import("./EntityTablePage-
|
|
39
|
-
), o =
|
|
37
|
+
const t = lt(
|
|
38
|
+
() => import("./EntityTablePage-DHQGlLRk.js")
|
|
39
|
+
), o = lt(
|
|
40
40
|
() => import("./EntityCreatePage-Da8XgBKU.js")
|
|
41
|
-
), r =
|
|
41
|
+
), r = lt(
|
|
42
42
|
() => import("./EntityEditPage-QktKEAxz.js")
|
|
43
|
-
), i =
|
|
43
|
+
), i = lt(() => import("./register-D7Puupgo.js")), c = {
|
|
44
44
|
table: t,
|
|
45
45
|
create: o,
|
|
46
46
|
edit: r,
|
|
@@ -85,13 +85,13 @@ const Ln = /* @__PURE__ */ Ae({
|
|
|
85
85
|
}), Ds = "services", Ns = "/gis.datasets", hh = /* @__PURE__ */ Ae({
|
|
86
86
|
__name: "DatasetsWrapper",
|
|
87
87
|
setup(e) {
|
|
88
|
-
const t =
|
|
89
|
-
() => import("./EntityTablePage-
|
|
90
|
-
), o =
|
|
88
|
+
const t = lt(
|
|
89
|
+
() => import("./EntityTablePage-DHQGlLRk.js")
|
|
90
|
+
), o = lt(
|
|
91
91
|
() => import("./EntityCreatePage-Da8XgBKU.js")
|
|
92
|
-
), r =
|
|
92
|
+
), r = lt(
|
|
93
93
|
() => import("./EntityEditPage-QktKEAxz.js")
|
|
94
|
-
), i =
|
|
94
|
+
), i = lt(() => import("./service-Cz6T0O3Z.js")), c = {
|
|
95
95
|
table: t,
|
|
96
96
|
create: o,
|
|
97
97
|
edit: r,
|
|
@@ -153,13 +153,13 @@ const Ln = /* @__PURE__ */ Ae({
|
|
|
153
153
|
}), Os = "rasters", Us = "/gis.rasters", yh = /* @__PURE__ */ Ae({
|
|
154
154
|
__name: "RastersWrapper",
|
|
155
155
|
setup(e) {
|
|
156
|
-
const t =
|
|
157
|
-
() => import("./RastersTablePage-
|
|
158
|
-
), o =
|
|
156
|
+
const t = lt(
|
|
157
|
+
() => import("./RastersTablePage-Cdgkri9K.js")
|
|
158
|
+
), o = lt(
|
|
159
159
|
() => import("./EntityCreatePage-Da8XgBKU.js")
|
|
160
|
-
), r =
|
|
160
|
+
), r = lt(
|
|
161
161
|
() => import("./EntityEditPage-QktKEAxz.js")
|
|
162
|
-
), i =
|
|
162
|
+
), i = lt(() => import("./raster-dSEb1SIG.js")), c = {
|
|
163
163
|
table: t,
|
|
164
164
|
create: o,
|
|
165
165
|
edit: r,
|
|
@@ -210,13 +210,13 @@ const Ln = /* @__PURE__ */ Ae({
|
|
|
210
210
|
}), Vs = "cartocss", qs = "/gis.cartocss", bh = /* @__PURE__ */ Ae({
|
|
211
211
|
__name: "CartocssWrapper",
|
|
212
212
|
setup(e) {
|
|
213
|
-
const t =
|
|
214
|
-
() => import("./EntityTablePage-
|
|
215
|
-
), o =
|
|
213
|
+
const t = lt(
|
|
214
|
+
() => import("./EntityTablePage-DHQGlLRk.js")
|
|
215
|
+
), o = lt(
|
|
216
216
|
() => import("./EntityCreatePage-Da8XgBKU.js")
|
|
217
|
-
), r =
|
|
217
|
+
), r = lt(
|
|
218
218
|
() => import("./EntityEditPage-QktKEAxz.js")
|
|
219
|
-
), i =
|
|
219
|
+
), i = lt(() => import("./cartocss-BT50SVhy.js")), c = {
|
|
220
220
|
table: t,
|
|
221
221
|
create: o,
|
|
222
222
|
edit: r,
|
|
@@ -320,13 +320,13 @@ function Zs(e, t) {
|
|
|
320
320
|
const Gs = /* @__PURE__ */ nt(Ws, [["render", Zs]]), Ys = { class: "gap-2 inline-flex" }, Xs = ["href"], Js = "maps", Qo = "/gis.maps", Ks = /* @__PURE__ */ Ae({
|
|
321
321
|
__name: "MapsWrapper",
|
|
322
322
|
setup(e) {
|
|
323
|
-
const t =
|
|
324
|
-
() => import("./EntityTablePage-
|
|
325
|
-
), o =
|
|
323
|
+
const t = lt(
|
|
324
|
+
() => import("./EntityTablePage-DHQGlLRk.js")
|
|
325
|
+
), o = lt(
|
|
326
326
|
() => import("./EntityCreatePage-Da8XgBKU.js")
|
|
327
|
-
), r =
|
|
327
|
+
), r = lt(
|
|
328
328
|
() => import("./EntityEditPage-QktKEAxz.js")
|
|
329
|
-
), i =
|
|
329
|
+
), i = lt(() => import("./MapSettings-De-z7r5t.js")), c = {
|
|
330
330
|
table: t,
|
|
331
331
|
create: o,
|
|
332
332
|
edit: r,
|
|
@@ -442,8 +442,8 @@ const Gs = /* @__PURE__ */ nt(Ws, [["render", Zs]]), Ys = { class: "gap-2 inline
|
|
|
442
442
|
else if (y.value === 0) {
|
|
443
443
|
const ve = await fetch(u("", P));
|
|
444
444
|
if (ve.ok) {
|
|
445
|
-
const
|
|
446
|
-
y.value =
|
|
445
|
+
const me = await ve.json();
|
|
446
|
+
y.value = me.data.length;
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
449
|
i("update:counts", {
|
|
@@ -593,7 +593,7 @@ const Gs = /* @__PURE__ */ nt(Ws, [["render", Zs]]), Ys = { class: "gap-2 inline
|
|
|
593
593
|
},
|
|
594
594
|
emits: ["close", "created"],
|
|
595
595
|
setup(e, { emit: t }) {
|
|
596
|
-
const o =
|
|
596
|
+
const o = lt(() => import("@opengis/form")), r = e, i = t, c = O(() => !!r.editData), m = M(null), p = M({
|
|
597
597
|
name: "",
|
|
598
598
|
description: "",
|
|
599
599
|
alias: []
|
|
@@ -647,7 +647,7 @@ const Gs = /* @__PURE__ */ nt(Ws, [["render", Zs]]), Ys = { class: "gap-2 inline
|
|
|
647
647
|
var u, w;
|
|
648
648
|
const f = (w = (u = m.value) == null ? void 0 : u.validate) == null ? void 0 : w.call(u);
|
|
649
649
|
if (f) {
|
|
650
|
-
|
|
650
|
+
ft({
|
|
651
651
|
type: "warning",
|
|
652
652
|
title: "Валідація",
|
|
653
653
|
message: Object.entries(f).map(([L, T]) => `${L}: ${T}`).join(`
|
|
@@ -677,7 +677,7 @@ const Gs = /* @__PURE__ */ nt(Ws, [["render", Zs]]), Ys = { class: "gap-2 inline
|
|
|
677
677
|
i("created"), i("close");
|
|
678
678
|
} catch (L) {
|
|
679
679
|
let T = "Помилка створення довідника";
|
|
680
|
-
L instanceof Error ? T = L.message : c.value && (T = "Помилка оновлення довідника"),
|
|
680
|
+
L instanceof Error ? T = L.message : c.value && (T = "Помилка оновлення довідника"), ft({
|
|
681
681
|
type: "error",
|
|
682
682
|
title: "Помилка",
|
|
683
683
|
message: T
|
|
@@ -714,13 +714,13 @@ const Gs = /* @__PURE__ */ nt(Ws, [["render", Zs]]), Ys = { class: "gap-2 inline
|
|
|
714
714
|
const X = await j.json().catch(() => ({}));
|
|
715
715
|
throw new Error(X.message || `HTTP error: ${j.status}`);
|
|
716
716
|
}
|
|
717
|
-
|
|
717
|
+
ft({
|
|
718
718
|
title: "Імпорт успішний",
|
|
719
719
|
type: "success",
|
|
720
720
|
message: `Створено класифікатор "${L}" з ${k.length} записами`
|
|
721
721
|
}), i("created"), i("close");
|
|
722
722
|
} catch (k) {
|
|
723
|
-
|
|
723
|
+
ft({
|
|
724
724
|
title: "Помилка імпорту",
|
|
725
725
|
type: "error",
|
|
726
726
|
message: k.message || "Некоректний формат файлу"
|
|
@@ -979,14 +979,14 @@ const Gs = /* @__PURE__ */ nt(Ws, [["render", Zs]]), Ys = { class: "gap-2 inline
|
|
|
979
979
|
onConfirm: async () => {
|
|
980
980
|
const f = await fetch(`/api/user-cls/${v}/${C}`, { method: "DELETE" });
|
|
981
981
|
if (!f.ok) {
|
|
982
|
-
|
|
982
|
+
ft({
|
|
983
983
|
type: "error",
|
|
984
984
|
title: "Помилка",
|
|
985
985
|
message: (await f.json()).error || "Something went wrong"
|
|
986
986
|
});
|
|
987
987
|
return;
|
|
988
988
|
}
|
|
989
|
-
|
|
989
|
+
ft({
|
|
990
990
|
title: "Видалено",
|
|
991
991
|
type: "success",
|
|
992
992
|
message: "Обʼєкт успішно видалено"
|
|
@@ -1030,7 +1030,7 @@ const Gs = /* @__PURE__ */ nt(Ws, [["render", Zs]]), Ys = { class: "gap-2 inline
|
|
|
1030
1030
|
n("td", Yl, [
|
|
1031
1031
|
n("div", {
|
|
1032
1032
|
class: "w-6 h-6 rounded border border-gray-300",
|
|
1033
|
-
style:
|
|
1033
|
+
style: at({ backgroundColor: f.color })
|
|
1034
1034
|
}, null, 4)
|
|
1035
1035
|
]),
|
|
1036
1036
|
n("td", Xl, J(f.text), 1),
|
|
@@ -1174,7 +1174,7 @@ const Gs = /* @__PURE__ */ nt(Ws, [["render", Zs]]), Ys = { class: "gap-2 inline
|
|
|
1174
1174
|
"w-full aspect-square rounded-lg border-2 transition-all",
|
|
1175
1175
|
c.value === g ? "border-gray-900 scale-110" : "border-gray-300 hover:border-gray-400"
|
|
1176
1176
|
]),
|
|
1177
|
-
style:
|
|
1177
|
+
style: at({ backgroundColor: g }),
|
|
1178
1178
|
onClick: (a) => c.value = g
|
|
1179
1179
|
}, null, 14, ui)), 64))
|
|
1180
1180
|
]),
|
|
@@ -1202,7 +1202,7 @@ const Gs = /* @__PURE__ */ nt(Ws, [["render", Zs]]), Ys = { class: "gap-2 inline
|
|
|
1202
1202
|
class: "w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-sky-500 focus:border-transparent text-sm text-[#2e3338]",
|
|
1203
1203
|
required: ""
|
|
1204
1204
|
}, null, 512), [
|
|
1205
|
-
[
|
|
1205
|
+
[gt, x.id]
|
|
1206
1206
|
])
|
|
1207
1207
|
]),
|
|
1208
1208
|
n("div", null, [
|
|
@@ -1221,7 +1221,7 @@ const Gs = /* @__PURE__ */ nt(Ws, [["render", Zs]]), Ys = { class: "gap-2 inline
|
|
|
1221
1221
|
class: "w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-sky-500 focus:border-transparent text-sm text-[#2e3338]",
|
|
1222
1222
|
required: ""
|
|
1223
1223
|
}, null, 512), [
|
|
1224
|
-
[
|
|
1224
|
+
[gt, x.text]
|
|
1225
1225
|
])
|
|
1226
1226
|
])
|
|
1227
1227
|
]),
|
|
@@ -1275,7 +1275,7 @@ const Gs = /* @__PURE__ */ nt(Ws, [["render", Zs]]), Ys = { class: "gap-2 inline
|
|
|
1275
1275
|
console.error("Error fetching classifier details:", k);
|
|
1276
1276
|
}
|
|
1277
1277
|
}, v = () => {
|
|
1278
|
-
y.value = x.value, _.value = !0,
|
|
1278
|
+
y.value = x.value, _.value = !0, it(() => {
|
|
1279
1279
|
var A;
|
|
1280
1280
|
(A = g.value) == null || A.focus();
|
|
1281
1281
|
});
|
|
@@ -1331,18 +1331,18 @@ const Gs = /* @__PURE__ */ nt(Ws, [["render", Zs]]), Ys = { class: "gap-2 inline
|
|
|
1331
1331
|
if (!A.ok)
|
|
1332
1332
|
throw new Error(`HTTP error: ${A.status}`);
|
|
1333
1333
|
const P = (await A.json()).data || [], j = new Blob(
|
|
1334
|
-
[JSON.stringify(P, (ve,
|
|
1334
|
+
[JSON.stringify(P, (ve, me) => me === null ? void 0 : me, 2)],
|
|
1335
1335
|
{
|
|
1336
1336
|
type: "application/json"
|
|
1337
1337
|
}
|
|
1338
1338
|
), X = URL.createObjectURL(j), ee = document.createElement("a");
|
|
1339
|
-
ee.href = X, ee.download = `${r.value}.json`, document.body.appendChild(ee), ee.click(), document.body.removeChild(ee), URL.revokeObjectURL(X),
|
|
1339
|
+
ee.href = X, ee.download = `${r.value}.json`, document.body.appendChild(ee), ee.click(), document.body.removeChild(ee), URL.revokeObjectURL(X), ft({
|
|
1340
1340
|
title: "Експорт завершено",
|
|
1341
1341
|
type: "success",
|
|
1342
1342
|
message: "Файл успішно експортовано"
|
|
1343
1343
|
});
|
|
1344
1344
|
} catch (A) {
|
|
1345
|
-
console.error("Error exporting classifier to json:", A),
|
|
1345
|
+
console.error("Error exporting classifier to json:", A), ft({
|
|
1346
1346
|
title: "Помилка",
|
|
1347
1347
|
type: "error",
|
|
1348
1348
|
message: "Не вдалося експортувати дані"
|
|
@@ -1375,7 +1375,7 @@ const Gs = /* @__PURE__ */ nt(Ws, [["render", Zs]]), Ys = { class: "gap-2 inline
|
|
|
1375
1375
|
],
|
|
1376
1376
|
placeholder: "Введіть опис"
|
|
1377
1377
|
}, null, 544), [
|
|
1378
|
-
[
|
|
1378
|
+
[gt, y.value]
|
|
1379
1379
|
]),
|
|
1380
1380
|
n("button", {
|
|
1381
1381
|
onClick: f,
|
|
@@ -1451,7 +1451,7 @@ const Gs = /* @__PURE__ */ nt(Ws, [["render", Zs]]), Ys = { class: "gap-2 inline
|
|
|
1451
1451
|
placeholder: "Пошук за назвою або описом...",
|
|
1452
1452
|
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"
|
|
1453
1453
|
}, null, 512), [
|
|
1454
|
-
[
|
|
1454
|
+
[gt, p.value]
|
|
1455
1455
|
])
|
|
1456
1456
|
])
|
|
1457
1457
|
]),
|
|
@@ -1734,13 +1734,13 @@ const Gs = /* @__PURE__ */ nt(Ws, [["render", Zs]]), Ys = { class: "gap-2 inline
|
|
|
1734
1734
|
headers: { "Content-Type": "application/json" },
|
|
1735
1735
|
body: JSON.stringify(a)
|
|
1736
1736
|
}).then((f) => f.json()).then((f) => {
|
|
1737
|
-
|
|
1737
|
+
ft({
|
|
1738
1738
|
title: "Успіх",
|
|
1739
1739
|
message: "Доступ успішно збережено",
|
|
1740
1740
|
type: "success"
|
|
1741
1741
|
});
|
|
1742
1742
|
}).catch((f) => {
|
|
1743
|
-
|
|
1743
|
+
ft({ title: "Помилка", message: f.message, type: "error" });
|
|
1744
1744
|
});
|
|
1745
1745
|
};
|
|
1746
1746
|
return Qe(_), (g, a) => (s(), h("div", ta, [
|
|
@@ -1752,7 +1752,7 @@ const Gs = /* @__PURE__ */ nt(Ws, [["render", Zs]]), Ys = { class: "gap-2 inline
|
|
|
1752
1752
|
placeholder: "Пошук...",
|
|
1753
1753
|
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"
|
|
1754
1754
|
}, null, 512), [
|
|
1755
|
-
[
|
|
1755
|
+
[gt, o.value]
|
|
1756
1756
|
])
|
|
1757
1757
|
]),
|
|
1758
1758
|
n("button", {
|
|
@@ -1849,8 +1849,8 @@ function ra(e) {
|
|
|
1849
1849
|
L.maxZoom == null && (L.maxZoom = u), t.value = new maplibregl.Map(L), (k = e.controls) != null && k.navigation && (t.value.addControl(new maplibregl.NavigationControl(
|
|
1850
1850
|
typeof e.controls.navigation == "object" ? e.controls.navigation : {}
|
|
1851
1851
|
), "top-right"), t.value.once("load", () => {
|
|
1852
|
-
var
|
|
1853
|
-
const ee = t.value.getContainer(), ve = (
|
|
1852
|
+
var me;
|
|
1853
|
+
const ee = t.value.getContainer(), ve = (me = ee == null ? void 0 : ee.querySelector) == null ? void 0 : me.call(ee, ".maplibregl-ctrl-compass, .mapboxgl-ctrl-compass");
|
|
1854
1854
|
ve && typeof t.value.easeTo == "function" && ve.addEventListener("click", (ye) => {
|
|
1855
1855
|
ye.preventDefault(), ye.stopPropagation(), t.value.easeTo({ bearing: 0, pitch: 0 });
|
|
1856
1856
|
}, !0);
|
|
@@ -1929,7 +1929,7 @@ function ra(e) {
|
|
|
1929
1929
|
};
|
|
1930
1930
|
return Qr(Pr, g), g;
|
|
1931
1931
|
}
|
|
1932
|
-
function
|
|
1932
|
+
function ut(e) {
|
|
1933
1933
|
if (e) return {
|
|
1934
1934
|
map: e,
|
|
1935
1935
|
flyTo: e.value.flyTo,
|
|
@@ -1974,7 +1974,7 @@ const sa = { class: "map-view-slot" }, la = /* @__PURE__ */ Ae({
|
|
|
1974
1974
|
});
|
|
1975
1975
|
async function p() {
|
|
1976
1976
|
var l;
|
|
1977
|
-
await
|
|
1977
|
+
await it();
|
|
1978
1978
|
const _ = (l = m.map) == null ? void 0 : l.value;
|
|
1979
1979
|
_ != null && _.resize && _.resize();
|
|
1980
1980
|
}
|
|
@@ -1989,7 +1989,7 @@ const sa = { class: "map-view-slot" }, la = /* @__PURE__ */ Ae({
|
|
|
1989
1989
|
}
|
|
1990
1990
|
return Qe(() => {
|
|
1991
1991
|
p(), x(), window.addEventListener("resize", p);
|
|
1992
|
-
}),
|
|
1992
|
+
}), Je(() => {
|
|
1993
1993
|
window.removeEventListener("resize", p), y();
|
|
1994
1994
|
}), t({ ctx: m }), (_, l) => (s(), h("div", {
|
|
1995
1995
|
ref_key: "wrapper",
|
|
@@ -2007,7 +2007,7 @@ const sa = { class: "map-view-slot" }, la = /* @__PURE__ */ Ae({
|
|
|
2007
2007
|
], 512));
|
|
2008
2008
|
}
|
|
2009
2009
|
}), ia = /* @__PURE__ */ nt(la, [["__scopeId", "data-v-eaf67109"]]), aa = ["Noto Sans Regular"], ua = 12, ca = "#0f172a", da = "#fff", fa = 14;
|
|
2010
|
-
function
|
|
2010
|
+
function dt(e, t) {
|
|
2011
2011
|
if (!e) return;
|
|
2012
2012
|
for (const r of t)
|
|
2013
2013
|
if (Object.prototype.hasOwnProperty.call(e, r) && e[r] !== void 0)
|
|
@@ -2043,7 +2043,7 @@ function ga(e, t) {
|
|
|
2043
2043
|
}
|
|
2044
2044
|
function ma(e, t = {}) {
|
|
2045
2045
|
if (!e) return [];
|
|
2046
|
-
const o =
|
|
2046
|
+
const o = dt(e, [
|
|
2047
2047
|
"text-field",
|
|
2048
2048
|
"textField",
|
|
2049
2049
|
"textFieldValue",
|
|
@@ -2053,15 +2053,15 @@ function ma(e, t = {}) {
|
|
|
2053
2053
|
if (!o) return [];
|
|
2054
2054
|
const r = va(o);
|
|
2055
2055
|
if (!r) return [];
|
|
2056
|
-
const i = r, c = (t.geometry || e.type || "point").toString().toLowerCase(), m =
|
|
2056
|
+
const i = r, c = (t.geometry || e.type || "point").toString().toLowerCase(), m = dt(e, ["text-font", "textFont"]), p = $o(dt(e, ["text-size", "textSize"]), ua), x = dt(e, ["text-allow-overlap", "textAllowOverlap"]), y = dt(e, [
|
|
2057
2057
|
"text-minzoom",
|
|
2058
2058
|
"textMinZoom",
|
|
2059
2059
|
"textZoom",
|
|
2060
2060
|
"text-zoom"
|
|
2061
|
-
]), _ =
|
|
2061
|
+
]), _ = dt(e, ["text-maxzoom", "textMaxZoom", "maxzoom"]), l = dt(e, ["text-color", "textColor"]) || ca, g = dt(e, ["text-halo-color", "textHaloColor"]) || da, a = dt(e, ["text-halo-width", "textHaloWidth"]), v = dt(e, ["text-halo-blur", "textHaloBlur"]), C = dt(e, ["text-offset", "textOffset"]), f = dt(e, ["text-anchor", "textAnchor"]), u = dt(e, ["text-justify", "textJustify"]), w = dt(e, ["text-letter-spacing", "textLetterSpacing"]), L = dt(e, ["text-transform", "textTransform"]), T = dt(e, ["symbol-placement", "symbolPlacement"]), D = dt(e, ["symbol-spacing", "symbolSpacing"]), A = dt(e, [
|
|
2062
2062
|
"text-rotation-alignment",
|
|
2063
2063
|
"textRotationAlignment"
|
|
2064
|
-
]), k =
|
|
2064
|
+
]), k = dt(e, ["text-pitch-alignment", "textPitchAlignment"]), P = dt(e, ["text-opacity", "textOpacity"]), j = {
|
|
2065
2065
|
"text-field": i,
|
|
2066
2066
|
"text-font": pa(m),
|
|
2067
2067
|
"text-size": p,
|
|
@@ -2082,8 +2082,8 @@ function ma(e, t = {}) {
|
|
|
2082
2082
|
const ye = $o(_, void 0);
|
|
2083
2083
|
ye !== void 0 && (ee.maxzoom = ye);
|
|
2084
2084
|
}
|
|
2085
|
-
const
|
|
2086
|
-
return
|
|
2085
|
+
const me = ga(t.filter, t.excludeClusters);
|
|
2086
|
+
return me && (ee.filter = me), [ee];
|
|
2087
2087
|
}
|
|
2088
2088
|
const Pt = "#9ca3af";
|
|
2089
2089
|
function ha(e) {
|
|
@@ -2434,7 +2434,7 @@ function Ye(e, t, o) {
|
|
|
2434
2434
|
const r = ba(o);
|
|
2435
2435
|
if (!e) return r;
|
|
2436
2436
|
if (!t) return r[e];
|
|
2437
|
-
const { map: i, ready: c = () => Promise.resolve() } =
|
|
2437
|
+
const { map: i, ready: c = () => Promise.resolve() } = ut(o), m = e || ((ie = t.layer) == null ? void 0 : ie.id), p = t.sourceId ?? e;
|
|
2438
2438
|
function x(R) {
|
|
2439
2439
|
var E;
|
|
2440
2440
|
const z = { ...R };
|
|
@@ -2448,14 +2448,14 @@ function Ye(e, t, o) {
|
|
|
2448
2448
|
i.value.removeLayer(G.id);
|
|
2449
2449
|
}), y.source && R && i.value.getSource(p) && i.value.removeSource(p);
|
|
2450
2450
|
}, v = async () => {
|
|
2451
|
-
var R, z, E, S, B, G, he, U, V, Z, H,
|
|
2451
|
+
var R, z, E, S, B, G, he, U, V, Z, H, se;
|
|
2452
2452
|
if (!(l || !i.value)) {
|
|
2453
2453
|
if (y.source && !i.value.getSource(p) && i.value.addSource(p, y.source), !i.value.getLayer(m)) {
|
|
2454
2454
|
const N = y.beforeId === 0 ? (z = (R = i.value.getStyle().layers) == null ? void 0 : R[0]) == null ? void 0 : z.id : y.beforeId;
|
|
2455
2455
|
((S = (E = y.layer) == null ? void 0 : E.style) != null && S.icon || (G = (B = y.layer) == null ? void 0 : B.style) != null && G.iconSet) && await sr(i.value, y.layer.style);
|
|
2456
2456
|
const K = ((he = y.source) == null ? void 0 : he.type) || ((U = y.layer) == null ? void 0 : U.type), fe = y.layer && (y.layer.type || y.layer.ref) ? y.layer : null, $e = (V = y.layer) == null ? void 0 : V.style, $ = ((Z = y.layer) == null ? void 0 : Z["source-layer"]) || ((H = y.source) == null ? void 0 : H["source-layer"]) || y.sourceLayer || p, q = y.style || $e, ae = rr(q, {
|
|
2457
2457
|
sourceType: K,
|
|
2458
|
-
filter: (
|
|
2458
|
+
filter: (se = y.layer) == null ? void 0 : se.filter,
|
|
2459
2459
|
allowFallback: !fe
|
|
2460
2460
|
});
|
|
2461
2461
|
if (!ae.length) {
|
|
@@ -2469,8 +2469,8 @@ function Ye(e, t, o) {
|
|
|
2469
2469
|
}
|
|
2470
2470
|
return;
|
|
2471
2471
|
}
|
|
2472
|
-
ae.forEach((Q,
|
|
2473
|
-
const ce = { ...Q, id: `${m}${
|
|
2472
|
+
ae.forEach((Q, le) => {
|
|
2473
|
+
const ce = { ...Q, id: `${m}${le || ""}`, source: p };
|
|
2474
2474
|
K === "vector" && $ && (ce["source-layer"] = $), i.value.addLayer(ce, N), g.set(ce.id, ce.filter ?? null);
|
|
2475
2475
|
});
|
|
2476
2476
|
}
|
|
@@ -2506,12 +2506,12 @@ function Ye(e, t, o) {
|
|
|
2506
2506
|
});
|
|
2507
2507
|
a(!1), S.forEach((Z, H) => {
|
|
2508
2508
|
var N;
|
|
2509
|
-
const
|
|
2509
|
+
const se = {
|
|
2510
2510
|
...Z,
|
|
2511
2511
|
id: `${m}${H}`,
|
|
2512
2512
|
source: ((N = y.layer) == null ? void 0 : N.source) || p
|
|
2513
2513
|
};
|
|
2514
|
-
z === "vector" && E && (
|
|
2514
|
+
z === "vector" && E && (se["source-layer"] = se["source-layer"] || E), i.value.addLayer(se);
|
|
2515
2515
|
}), _ = !0;
|
|
2516
2516
|
}, T = (R) => {
|
|
2517
2517
|
i.value && Object.entries(R).forEach(([z, E]) => {
|
|
@@ -2617,7 +2617,7 @@ function Ye(e, t, o) {
|
|
|
2617
2617
|
}, ue = ye.remove;
|
|
2618
2618
|
return ye.remove = () => {
|
|
2619
2619
|
xe(), ue();
|
|
2620
|
-
}, Xt() &&
|
|
2620
|
+
}, Xt() && Je(ye.remove), r[e] = ye, ye;
|
|
2621
2621
|
}
|
|
2622
2622
|
const Ma = { class: "z-10 relative widget bg-white rounded-lg shadow-md overflow-hidden" }, Ra = ["title", "onClick"], ja = ["src", "alt"], Fa = ["title"], So = /* @__PURE__ */ Ae({
|
|
2623
2623
|
__name: "BaseMaps",
|
|
@@ -2729,7 +2729,7 @@ const Ma = { class: "z-10 relative widget bg-white rounded-lg shadow-md overflow
|
|
|
2729
2729
|
function ve() {
|
|
2730
2730
|
_("state-change", { basemaps: L.value, selectedId: T.value });
|
|
2731
2731
|
}
|
|
2732
|
-
function
|
|
2732
|
+
function me(E) {
|
|
2733
2733
|
var S;
|
|
2734
2734
|
w.value[E] && (E !== "none" && ((S = w.value[E]) != null && S.url) && (D.value = E), T.value = E, ee(w.value[E]), ve(), typeof window < "u" && f() !== E && C.replace({ query: { ...v == null ? void 0 : v.query, basemap: E } }).catch(() => {
|
|
2735
2735
|
}));
|
|
@@ -2738,11 +2738,11 @@ const Ma = { class: "z-10 relative widget bg-white rounded-lg shadow-md overflow
|
|
|
2738
2738
|
var S, B;
|
|
2739
2739
|
if (!k.value) return;
|
|
2740
2740
|
if (P.value) {
|
|
2741
|
-
|
|
2741
|
+
me("none");
|
|
2742
2742
|
return;
|
|
2743
2743
|
}
|
|
2744
2744
|
const E = (S = w.value[D.value]) != null && S.url ? D.value : (B = A.value[0]) == null ? void 0 : B.id;
|
|
2745
|
-
E &&
|
|
2745
|
+
E && me(E);
|
|
2746
2746
|
}
|
|
2747
2747
|
return _e(
|
|
2748
2748
|
() => [w.value, u.value],
|
|
@@ -2757,7 +2757,7 @@ const Ma = { class: "z-10 relative widget bg-white rounded-lg shadow-md overflow
|
|
|
2757
2757
|
() => {
|
|
2758
2758
|
ve();
|
|
2759
2759
|
}
|
|
2760
|
-
),
|
|
2760
|
+
), Je(() => {
|
|
2761
2761
|
}), (E, S) => (s(), h("div", Ma, [
|
|
2762
2762
|
n("div", {
|
|
2763
2763
|
class: Be(["flex items-center gap-1 p-2", { "border-b border-gray-100": E.$slots.default }])
|
|
@@ -2770,7 +2770,7 @@ const Ma = { class: "z-10 relative widget bg-white rounded-lg shadow-md overflow
|
|
|
2770
2770
|
T.value === B.id && P.value ? "border-blue-500" : "border-gray-200"
|
|
2771
2771
|
]),
|
|
2772
2772
|
title: B.title,
|
|
2773
|
-
onClick: (G) =>
|
|
2773
|
+
onClick: (G) => me(B.id)
|
|
2774
2774
|
}, [
|
|
2775
2775
|
B.preview ? (s(), h("img", {
|
|
2776
2776
|
key: 0,
|
|
@@ -2825,7 +2825,7 @@ const Ma = { class: "z-10 relative widget bg-white rounded-lg shadow-md overflow
|
|
|
2825
2825
|
g();
|
|
2826
2826
|
return;
|
|
2827
2827
|
}
|
|
2828
|
-
i.value = u, r.open = !0,
|
|
2828
|
+
i.value = u, r.open = !0, it(() => {
|
|
2829
2829
|
y(), a(), requestAnimationFrame(() => {
|
|
2830
2830
|
y();
|
|
2831
2831
|
});
|
|
@@ -2861,12 +2861,12 @@ const Ma = { class: "z-10 relative widget bg-white rounded-lg shadow-md overflow
|
|
|
2861
2861
|
}
|
|
2862
2862
|
return Qe(() => {
|
|
2863
2863
|
document.addEventListener("click", _, !0), document.addEventListener("keydown", l), window.addEventListener("scroll", y, !0), window.addEventListener("resize", y);
|
|
2864
|
-
}),
|
|
2864
|
+
}), Je(() => {
|
|
2865
2865
|
document.removeEventListener("click", _, !0), document.removeEventListener("keydown", l), window.removeEventListener("scroll", y, !0), window.removeEventListener("resize", y), v();
|
|
2866
2866
|
}), _e(
|
|
2867
2867
|
() => o.items,
|
|
2868
2868
|
() => {
|
|
2869
|
-
r.open &&
|
|
2869
|
+
r.open && it(() => y());
|
|
2870
2870
|
},
|
|
2871
2871
|
{ deep: !0 }
|
|
2872
2872
|
), t({ close: g }), (C, f) => (s(), h("div", {
|
|
@@ -2885,7 +2885,7 @@ const Ma = { class: "z-10 relative widget bg-white rounded-lg shadow-md overflow
|
|
|
2885
2885
|
r.open ? (s(), h("div", {
|
|
2886
2886
|
key: 0,
|
|
2887
2887
|
class: "vst-popover__content inline-block z-[81] py-3 px-4 bg-white text-sm text-gray-500 rounded-md shadow-lg bottom mapLayer-info__popover",
|
|
2888
|
-
style:
|
|
2888
|
+
style: at(p.value),
|
|
2889
2889
|
ref_key: "popoverEl",
|
|
2890
2890
|
ref: c,
|
|
2891
2891
|
onClick: f[0] || (f[0] = We(() => {
|
|
@@ -2941,9 +2941,9 @@ const Ma = { class: "z-10 relative widget bg-white rounded-lg shadow-md overflow
|
|
|
2941
2941
|
function f() {
|
|
2942
2942
|
const T = i.value;
|
|
2943
2943
|
if (!T || !c.value) return;
|
|
2944
|
-
const D = T.getBoundingClientRect(), A = 12, k = 8, P = window.scrollX + A, j = window.scrollX + window.innerWidth - A, X = window.scrollY + A, ee = window.scrollY + window.innerHeight - A, ve = c.value.offsetWidth || 160,
|
|
2944
|
+
const D = T.getBoundingClientRect(), A = 12, k = 8, P = window.scrollX + A, j = window.scrollX + window.innerWidth - A, X = window.scrollY + A, ee = window.scrollY + window.innerHeight - A, ve = c.value.offsetWidth || 160, me = c.value.offsetHeight || 0;
|
|
2945
2945
|
let ye = D.bottom + window.scrollY + k, xe = D.left + window.scrollX;
|
|
2946
|
-
xe + ve > j && (xe = D.right + window.scrollX - ve, xe < P && (xe = P)), xe < P && (xe = P), ye +
|
|
2946
|
+
xe + ve > j && (xe = D.right + window.scrollX - ve, xe < P && (xe = P)), xe < P && (xe = P), ye + me > ee && (ye = D.top + window.scrollY - me - k, ye < X && (ye = Math.max(X, ee - me))), ye < X && (ye = X), ye + me > ee && (ye = Math.max(X, ee - me)), m.value = {
|
|
2947
2947
|
top: ye,
|
|
2948
2948
|
left: xe
|
|
2949
2949
|
};
|
|
@@ -2958,7 +2958,7 @@ const Ma = { class: "z-10 relative widget bg-white rounded-lg shadow-md overflow
|
|
|
2958
2958
|
D.contains(T.target) || (r.value = !1);
|
|
2959
2959
|
}
|
|
2960
2960
|
_e(r, (T) => {
|
|
2961
|
-
T ?
|
|
2961
|
+
T ? it(() => {
|
|
2962
2962
|
f(), requestAnimationFrame(() => {
|
|
2963
2963
|
f();
|
|
2964
2964
|
}), window.addEventListener("scroll", f, !0), window.addEventListener("resize", f);
|
|
@@ -2972,7 +2972,7 @@ const Ma = { class: "z-10 relative widget bg-white rounded-lg shadow-md overflow
|
|
|
2972
2972
|
}
|
|
2973
2973
|
return Qe(() => {
|
|
2974
2974
|
document.addEventListener("click", u, !0), L(), v.value ? x.value && (p.value = !1) : p.value = !1, window.addEventListener("resize", L);
|
|
2975
|
-
}),
|
|
2975
|
+
}), Je(() => {
|
|
2976
2976
|
document.removeEventListener("click", u, !0), window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f), window.removeEventListener("resize", L);
|
|
2977
2977
|
}), (T, D) => (s(), h("div", {
|
|
2978
2978
|
class: "map-info legend-widget flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative widget",
|
|
@@ -2982,7 +2982,7 @@ const Ma = { class: "z-10 relative widget bg-white rounded-lg shadow-md overflow
|
|
|
2982
2982
|
e.title || y.value.length || l.value.length ? (s(), h("div", {
|
|
2983
2983
|
key: 0,
|
|
2984
2984
|
class: "map-info__header",
|
|
2985
|
-
style:
|
|
2985
|
+
style: at([a.value ? "" : "padding-bottom: 20px"])
|
|
2986
2986
|
}, [
|
|
2987
2987
|
e.title ? (s(), h("h2", Da, J(e.title), 1)) : oe("", !0),
|
|
2988
2988
|
n("div", Na, [
|
|
@@ -3028,7 +3028,7 @@ const Ma = { class: "z-10 relative widget bg-white rounded-lg shadow-md overflow
|
|
|
3028
3028
|
ref_key: "menuPopover",
|
|
3029
3029
|
ref: c,
|
|
3030
3030
|
class: "vsTailwind vs-popover__content right map-info__popover",
|
|
3031
|
-
style:
|
|
3031
|
+
style: at(_.value),
|
|
3032
3032
|
onClick: D[0] || (D[0] = We(() => {
|
|
3033
3033
|
}, ["stop"]))
|
|
3034
3034
|
}, [
|
|
@@ -3393,7 +3393,7 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
3393
3393
|
disabled: { type: Boolean, default: !1 }
|
|
3394
3394
|
},
|
|
3395
3395
|
setup(e) {
|
|
3396
|
-
const t =
|
|
3396
|
+
const t = lt(() => import("@opengis/filter")), o = e, r = O(() => {
|
|
3397
3397
|
var E;
|
|
3398
3398
|
return ((E = o.layer) == null ? void 0 : E.id) ?? "";
|
|
3399
3399
|
}), i = O(() => `filter-popover-${r.value}`), {
|
|
@@ -3436,11 +3436,11 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
3436
3436
|
return U + S > he && (U = he - S), U < G && (U = G), U;
|
|
3437
3437
|
}
|
|
3438
3438
|
function X() {
|
|
3439
|
-
var Z, H,
|
|
3439
|
+
var Z, H, se;
|
|
3440
3440
|
if (!y.value || !D.value) return;
|
|
3441
3441
|
const E = y.value.getBoundingClientRect(), S = window.scrollX + 8, B = window.scrollX + window.innerWidth - 8, G = ((Z = _.value) == null ? void 0 : Z.offsetWidth) || 280, he = ((H = _.value) == null ? void 0 : H.offsetHeight) || 0;
|
|
3442
3442
|
let U = 0, V = 0;
|
|
3443
|
-
if ((
|
|
3443
|
+
if ((se = o.catalogAnchor) != null && se.value) {
|
|
3444
3444
|
const N = o.catalogAnchor.value.getBoundingClientRect(), K = N.top + window.scrollY;
|
|
3445
3445
|
U = j(K, he, 8);
|
|
3446
3446
|
const fe = N.right + window.scrollX + 12, $e = B - G, $ = S;
|
|
@@ -3454,7 +3454,7 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
3454
3454
|
x.left = V, x.top = U, x.transform = "none";
|
|
3455
3455
|
}
|
|
3456
3456
|
function ee() {
|
|
3457
|
-
D.value || z(), p(), c.value && D.value &&
|
|
3457
|
+
D.value || z(), p(), c.value && D.value && it(() => {
|
|
3458
3458
|
X(), ie(), requestAnimationFrame(() => X());
|
|
3459
3459
|
});
|
|
3460
3460
|
}
|
|
@@ -3462,13 +3462,13 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
3462
3462
|
o.disabled || ee();
|
|
3463
3463
|
}
|
|
3464
3464
|
_e(v, (E) => {
|
|
3465
|
-
E && D.value ?
|
|
3465
|
+
E && D.value ? it(() => {
|
|
3466
3466
|
X(), ie(), requestAnimationFrame(() => X());
|
|
3467
3467
|
}) : (R(), D.value || z());
|
|
3468
3468
|
}), _e(w, () => {
|
|
3469
|
-
!v.value || !D.value ||
|
|
3469
|
+
!v.value || !D.value || it(() => X());
|
|
3470
3470
|
}, { deep: !0 }), _e(D, (E) => {
|
|
3471
|
-
v.value && (E ?
|
|
3471
|
+
v.value && (E ? it(() => {
|
|
3472
3472
|
X(), ie();
|
|
3473
3473
|
}) : (R(), z()));
|
|
3474
3474
|
}), _e(
|
|
@@ -3477,7 +3477,7 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
3477
3477
|
E && (m(), g.value = {});
|
|
3478
3478
|
}
|
|
3479
3479
|
);
|
|
3480
|
-
function
|
|
3480
|
+
function me() {
|
|
3481
3481
|
!v.value || !D.value || X();
|
|
3482
3482
|
}
|
|
3483
3483
|
function ye(E) {
|
|
@@ -3500,9 +3500,9 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
3500
3500
|
a.visible = !1;
|
|
3501
3501
|
}
|
|
3502
3502
|
Qe(() => {
|
|
3503
|
-
z(), window.addEventListener("resize",
|
|
3504
|
-
}),
|
|
3505
|
-
window.removeEventListener("resize",
|
|
3503
|
+
z(), window.addEventListener("resize", me), window.addEventListener("scroll", me, !0);
|
|
3504
|
+
}), Je(() => {
|
|
3505
|
+
window.removeEventListener("resize", me), window.removeEventListener("scroll", me, !0), R();
|
|
3506
3506
|
});
|
|
3507
3507
|
function ie() {
|
|
3508
3508
|
R(), !(!_.value || !D.value) && (l = new ResizeObserver(() => {
|
|
@@ -3552,7 +3552,7 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
3552
3552
|
}, [
|
|
3553
3553
|
n("div", {
|
|
3554
3554
|
class: Be(["vst-popover__content inline-block z-50 rounded-[16px] bg-white text-sm text-gray-500 rounded-md shadow-lg bottom mapLayer-filter__popover", { "mapLayer-filter__popover--static": !D.value }]),
|
|
3555
|
-
style:
|
|
3555
|
+
style: at(k.value),
|
|
3556
3556
|
ref_key: "panel",
|
|
3557
3557
|
ref: _,
|
|
3558
3558
|
onClick: S[1] || (S[1] = We(() => {
|
|
@@ -3587,7 +3587,7 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
3587
3587
|
a.visible ? (s(), h("div", {
|
|
3588
3588
|
key: 0,
|
|
3589
3589
|
class: "filter-badge__hint",
|
|
3590
|
-
style:
|
|
3590
|
+
style: at({
|
|
3591
3591
|
top: `${a.top}px`,
|
|
3592
3592
|
left: `${a.left}px`
|
|
3593
3593
|
})
|
|
@@ -3611,7 +3611,7 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
3611
3611
|
T + a > u - f && (T = u - a - f + window.scrollX), T < f + window.scrollX && (T = f + window.scrollX), L + v > w + window.scrollY - f && (L = g.top - v - C + window.scrollY, L < f + window.scrollY && (L = w - v - f + window.scrollY)), m.top = L, m.left = T;
|
|
3612
3612
|
}
|
|
3613
3613
|
function x() {
|
|
3614
|
-
o.value = !o.value, o.value &&
|
|
3614
|
+
o.value = !o.value, o.value && it(p);
|
|
3615
3615
|
}
|
|
3616
3616
|
function y() {
|
|
3617
3617
|
var v;
|
|
@@ -3648,7 +3648,7 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
3648
3648
|
}
|
|
3649
3649
|
return Qe(() => {
|
|
3650
3650
|
document.addEventListener("click", _), window.addEventListener("scroll", p, !0), window.addEventListener("resize", p);
|
|
3651
|
-
}),
|
|
3651
|
+
}), Je(() => {
|
|
3652
3652
|
document.removeEventListener("click", _), window.removeEventListener("scroll", p, !0), window.removeEventListener("resize", p);
|
|
3653
3653
|
}), (l, g) => (s(), h("div", {
|
|
3654
3654
|
class: "opacity-wrapper",
|
|
@@ -3671,7 +3671,7 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
3671
3671
|
ref_key: "popoverEl",
|
|
3672
3672
|
ref: i,
|
|
3673
3673
|
class: "opacity-popover",
|
|
3674
|
-
style:
|
|
3674
|
+
style: at({ top: m.top + "px", left: m.left + "px" })
|
|
3675
3675
|
}, [
|
|
3676
3676
|
n("div", au, [
|
|
3677
3677
|
g[1] || (g[1] = n("label", { class: "opacity-popover__label" }, "Прозорість:", -1)),
|
|
@@ -3684,7 +3684,7 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
3684
3684
|
class: "opacity-popover__range",
|
|
3685
3685
|
onInput: y
|
|
3686
3686
|
}, null, 544), [
|
|
3687
|
-
[
|
|
3687
|
+
[gt, r.value]
|
|
3688
3688
|
]),
|
|
3689
3689
|
n("span", uu, J(r.value) + "%", 1)
|
|
3690
3690
|
])
|
|
@@ -3703,7 +3703,7 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
3703
3703
|
},
|
|
3704
3704
|
emits: ["action"],
|
|
3705
3705
|
setup(e, { emit: t }) {
|
|
3706
|
-
const o = e, r = M({}), i = M(!0), c = M(!1), m = M(!1), p =
|
|
3706
|
+
const o = e, r = M({}), i = M(!0), c = M(!1), m = M(!1), p = ut(), {
|
|
3707
3707
|
temporaryLayers: x,
|
|
3708
3708
|
activateTemporaryLayer: y,
|
|
3709
3709
|
deactivateTemporaryLayer: _,
|
|
@@ -3731,7 +3731,7 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
3731
3731
|
count: null,
|
|
3732
3732
|
holder: null
|
|
3733
3733
|
})
|
|
3734
|
-
), ae = Object.values(g.value).filter((Q) => !q.some((
|
|
3734
|
+
), ae = Object.values(g.value).filter((Q) => !q.some((le) => le.id === Q.id)).map((Q) => ({
|
|
3735
3735
|
id: Q.id,
|
|
3736
3736
|
name: Q.name,
|
|
3737
3737
|
visible: r.value[Q.id] ?? !0,
|
|
@@ -3774,9 +3774,9 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
3774
3774
|
});
|
|
3775
3775
|
}
|
|
3776
3776
|
function P($, q) {
|
|
3777
|
-
var Q,
|
|
3777
|
+
var Q, le, ce, Ie, Se, De, Oe, Ze, et, ht, pt, Rt, jt;
|
|
3778
3778
|
return {
|
|
3779
|
-
sourceKind: (((Q = q == null ? void 0 : q.source) == null ? void 0 : Q.type) || ((
|
|
3779
|
+
sourceKind: (((Q = q == null ? void 0 : q.source) == null ? void 0 : Q.type) || ((le = q == null ? void 0 : q.layer) == null ? void 0 : le.type) || $.type || $.service_type || $.service || "").toString().toLowerCase(),
|
|
3780
3780
|
sourceSig: A({
|
|
3781
3781
|
type: ((ce = q == null ? void 0 : q.source) == null ? void 0 : ce.type) ?? null,
|
|
3782
3782
|
data: ((Ie = q == null ? void 0 : q.source) == null ? void 0 : Ie.data) ?? null,
|
|
@@ -3786,15 +3786,15 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
3786
3786
|
tileSize: ((Ze = q == null ? void 0 : q.source) == null ? void 0 : Ze.tileSize) ?? null,
|
|
3787
3787
|
scheme: ((et = q == null ? void 0 : q.source) == null ? void 0 : et.scheme) ?? null
|
|
3788
3788
|
}),
|
|
3789
|
-
styleSig: A(((
|
|
3790
|
-
filterSig: A(((
|
|
3789
|
+
styleSig: A(((ht = q == null ? void 0 : q.layer) == null ? void 0 : ht.style) ?? null),
|
|
3790
|
+
filterSig: A(((pt = q == null ? void 0 : q.layer) == null ? void 0 : pt.filter) ?? null),
|
|
3791
3791
|
dataSig: A(((Rt = q == null ? void 0 : q.source) == null ? void 0 : Rt.data) ?? null),
|
|
3792
3792
|
tilesSig: A(((jt = q == null ? void 0 : q.source) == null ? void 0 : jt.tiles) ?? null),
|
|
3793
3793
|
visible: $.visible !== !1
|
|
3794
3794
|
};
|
|
3795
3795
|
}
|
|
3796
3796
|
async function j($ = !1) {
|
|
3797
|
-
var ae, Q,
|
|
3797
|
+
var ae, Q, le, ce;
|
|
3798
3798
|
const q = /* @__PURE__ */ new Set();
|
|
3799
3799
|
for (let Ie = 0; Ie < o.layers.length; Ie++) {
|
|
3800
3800
|
const Se = o.layers[Ie], De = ee(Se);
|
|
@@ -3804,17 +3804,17 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
3804
3804
|
if (q.add(Se.id), !Ze) {
|
|
3805
3805
|
if (!$)
|
|
3806
3806
|
continue;
|
|
3807
|
-
const
|
|
3808
|
-
r.value[Se.id] = Oe.visible, (ae =
|
|
3807
|
+
const pt = Ye(Se.id, De, p.map);
|
|
3808
|
+
r.value[Se.id] = Oe.visible, (ae = pt == null ? void 0 : pt.setVisible) == null || ae.call(pt, Oe.visible), D.set(Se.id, Oe);
|
|
3809
3809
|
continue;
|
|
3810
3810
|
}
|
|
3811
3811
|
if (!et) {
|
|
3812
3812
|
r.value[Se.id] = Oe.visible, D.set(Se.id, Oe);
|
|
3813
3813
|
continue;
|
|
3814
3814
|
}
|
|
3815
|
-
const
|
|
3816
|
-
if (r.value[Se.id] = Oe.visible,
|
|
3817
|
-
await ((Q = Ze == null ? void 0 : Ze.refresh) == null ? void 0 : Q.call(Ze, De)), (
|
|
3815
|
+
const ht = et.sourceKind !== Oe.sourceKind || et.sourceSig !== Oe.sourceSig || et.dataSig !== Oe.dataSig || et.tilesSig !== Oe.tilesSig || et.styleSig !== Oe.styleSig || et.filterSig !== Oe.filterSig;
|
|
3816
|
+
if (r.value[Se.id] = Oe.visible, ht) {
|
|
3817
|
+
await ((Q = Ze == null ? void 0 : Ze.refresh) == null ? void 0 : Q.call(Ze, De)), (le = Ze == null ? void 0 : Ze.setVisible) == null || le.call(Ze, Oe.visible), D.set(Se.id, Oe);
|
|
3818
3818
|
continue;
|
|
3819
3819
|
}
|
|
3820
3820
|
et.visible !== Oe.visible && ((ce = Ze == null ? void 0 : Ze.setVisible) == null || ce.call(Ze, Oe.visible)), D.set(Se.id, Oe);
|
|
@@ -3831,9 +3831,9 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
3831
3831
|
var De;
|
|
3832
3832
|
const q = $.id;
|
|
3833
3833
|
if (!q) return null;
|
|
3834
|
-
const ae = ($.type || $.service_type || $.service || "").toString().toLowerCase(), Q =
|
|
3834
|
+
const ae = ($.type || $.service_type || $.service || "").toString().toLowerCase(), Q = me(
|
|
3835
3835
|
$.data ?? $.geojson ?? ((De = $.source) == null ? void 0 : De.data) ?? null
|
|
3836
|
-
),
|
|
3836
|
+
), le = ae === "geojson" || !!Q, ce = $.service_url || $.url || null;
|
|
3837
3837
|
if (!!ce && (ae === "tms" || ae === "wmts" || ae === "wms" || ae === "ogc")) {
|
|
3838
3838
|
const Oe = ve(ce);
|
|
3839
3839
|
return Oe ? {
|
|
@@ -3857,7 +3857,7 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
3857
3857
|
popup: $.popup
|
|
3858
3858
|
} : null;
|
|
3859
3859
|
}
|
|
3860
|
-
if (
|
|
3860
|
+
if (le)
|
|
3861
3861
|
return Q ? {
|
|
3862
3862
|
sourceId: q,
|
|
3863
3863
|
service: ae || "geojson",
|
|
@@ -3962,7 +3962,7 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
3962
3962
|
function ve($) {
|
|
3963
3963
|
return $ ? /^https?:\/\//i.test($) ? $ : $.startsWith("//") ? `${window.location.protocol}${$}` : $.startsWith("/") ? `${location.origin}${$}` : `${location.origin}/${$}` : null;
|
|
3964
3964
|
}
|
|
3965
|
-
function
|
|
3965
|
+
function me($) {
|
|
3966
3966
|
if (!$) return null;
|
|
3967
3967
|
if (typeof $ == "string")
|
|
3968
3968
|
try {
|
|
@@ -3973,14 +3973,14 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
3973
3973
|
return $.type === "FeatureCollection" ? $ : $.type === "Feature" ? { type: "FeatureCollection", features: [$] } : $.type && Array.isArray($.coordinates) ? {
|
|
3974
3974
|
type: "FeatureCollection",
|
|
3975
3975
|
features: [{ type: "Feature", geometry: $, properties: {} }]
|
|
3976
|
-
} : Array.isArray($.features) ? { type: "FeatureCollection", features: $.features } : $.geometry ?
|
|
3976
|
+
} : Array.isArray($.features) ? { type: "FeatureCollection", features: $.features } : $.geometry ? me($.geometry) : null;
|
|
3977
3977
|
}
|
|
3978
3978
|
function ye($) {
|
|
3979
3979
|
const q = r.value[$];
|
|
3980
3980
|
return q ?? !0;
|
|
3981
3981
|
}
|
|
3982
3982
|
function xe($) {
|
|
3983
|
-
var Q,
|
|
3983
|
+
var Q, le;
|
|
3984
3984
|
if (!($ != null && $.id)) return null;
|
|
3985
3985
|
const q = (Q = $.title) == null ? void 0 : Q.trim();
|
|
3986
3986
|
if (!q) return null;
|
|
@@ -3992,7 +3992,7 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
3992
3992
|
data: $.data,
|
|
3993
3993
|
style: $.style
|
|
3994
3994
|
} : null;
|
|
3995
|
-
const ae = (
|
|
3995
|
+
const ae = (le = $.url) == null ? void 0 : le.trim();
|
|
3996
3996
|
return ae ? {
|
|
3997
3997
|
id: $.id,
|
|
3998
3998
|
title: q,
|
|
@@ -4007,9 +4007,9 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
4007
4007
|
if (!$) return;
|
|
4008
4008
|
const q = $.owner;
|
|
4009
4009
|
if ($.action === "clear") {
|
|
4010
|
-
const Q = x.value.filter((
|
|
4011
|
-
l(q), Q.forEach((
|
|
4012
|
-
|
|
4010
|
+
const Q = x.value.filter((le) => !q || le.owner === q).map((le) => le.id);
|
|
4011
|
+
l(q), Q.forEach((le) => {
|
|
4012
|
+
le in r.value && delete r.value[le];
|
|
4013
4013
|
});
|
|
4014
4014
|
return;
|
|
4015
4015
|
}
|
|
@@ -4029,10 +4029,10 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
4029
4029
|
() => x.value.map(($) => $.id),
|
|
4030
4030
|
($, q) => {
|
|
4031
4031
|
const ae = new Set(q || []), Q = new Set($);
|
|
4032
|
-
$.forEach((
|
|
4033
|
-
|
|
4034
|
-
}), ae.forEach((
|
|
4035
|
-
Q.has(
|
|
4032
|
+
$.forEach((le) => {
|
|
4033
|
+
le in r.value || (r.value[le] = !0);
|
|
4034
|
+
}), ae.forEach((le) => {
|
|
4035
|
+
Q.has(le) || delete r.value[le];
|
|
4036
4036
|
});
|
|
4037
4037
|
},
|
|
4038
4038
|
{ immediate: !0 }
|
|
@@ -4056,7 +4056,7 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
4056
4056
|
});
|
|
4057
4057
|
}
|
|
4058
4058
|
function E($, q) {
|
|
4059
|
-
var Q,
|
|
4059
|
+
var Q, le, ce, Ie, Se;
|
|
4060
4060
|
if (R($)) {
|
|
4061
4061
|
r.value[$.id] = q;
|
|
4062
4062
|
const De = Ye($.id);
|
|
@@ -4064,7 +4064,7 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
4064
4064
|
(Q = De == null ? void 0 : De.setVisible) == null || Q.call(De, !1);
|
|
4065
4065
|
return;
|
|
4066
4066
|
}
|
|
4067
|
-
if ((
|
|
4067
|
+
if ((le = De == null ? void 0 : De.isMounted) != null && le.call(De)) {
|
|
4068
4068
|
De.setVisible(!0);
|
|
4069
4069
|
return;
|
|
4070
4070
|
}
|
|
@@ -4112,7 +4112,7 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
4112
4112
|
return q ? !!(/^#[\da-fA-F]{3,8}$/.test(q) || /^rgb\s*\(/.test(q) || /^rgba\s*\(/.test(q) || /^hsl\s*\(/.test(q) || /^hsla\s*\(/.test(q) || /^[a-zA-Z]+$/.test(q) && q.length < 25) : !1;
|
|
4113
4113
|
}
|
|
4114
4114
|
function V($) {
|
|
4115
|
-
var q, ae, Q,
|
|
4115
|
+
var q, ae, Q, le, ce, Ie;
|
|
4116
4116
|
if (!$) return null;
|
|
4117
4117
|
if (typeof $ == "string") {
|
|
4118
4118
|
const Se = $.trim();
|
|
@@ -4128,7 +4128,7 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
4128
4128
|
if (typeof $ == "object") {
|
|
4129
4129
|
const Se = $;
|
|
4130
4130
|
return V(
|
|
4131
|
-
Se.color ?? Se.fill ?? Se.stroke ?? Se.lineColor ?? Se.fillColor ?? ((q = Se.paint) == null ? void 0 : q["fill-color"]) ?? ((ae = Se.paint) == null ? void 0 : ae["line-color"]) ?? ((Q = Se.paint) == null ? void 0 : Q["circle-color"]) ?? ((
|
|
4131
|
+
Se.color ?? Se.fill ?? Se.stroke ?? Se.lineColor ?? Se.fillColor ?? ((q = Se.paint) == null ? void 0 : q["fill-color"]) ?? ((ae = Se.paint) == null ? void 0 : ae["line-color"]) ?? ((Q = Se.paint) == null ? void 0 : Q["circle-color"]) ?? ((le = Se.paint) == null ? void 0 : le.color) ?? ((ce = Se.paint) == null ? void 0 : ce.lineColor) ?? ((Ie = Se.paint) == null ? void 0 : Ie.fillColor) ?? Se.paint ?? Se.value
|
|
4132
4132
|
);
|
|
4133
4133
|
}
|
|
4134
4134
|
return null;
|
|
@@ -4142,12 +4142,12 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
4142
4142
|
"--layers-panel-checkbox-color": Z($)
|
|
4143
4143
|
};
|
|
4144
4144
|
}
|
|
4145
|
-
function
|
|
4146
|
-
var
|
|
4145
|
+
function se($) {
|
|
4146
|
+
var le;
|
|
4147
4147
|
const { id: q } = $, ae = $.owner || void 0;
|
|
4148
4148
|
_(q, ae);
|
|
4149
4149
|
const Q = Ye(q);
|
|
4150
|
-
(
|
|
4150
|
+
(le = Q == null ? void 0 : Q.remove) == null || le.call(Q), (a(q) || ae === "add-data") && (C(q), window.dispatchEvent(new CustomEvent(Xn, { detail: { id: q } }))), delete r.value[q];
|
|
4151
4151
|
}
|
|
4152
4152
|
function N() {
|
|
4153
4153
|
i.value = !i.value;
|
|
@@ -4186,7 +4186,7 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
4186
4186
|
() => {
|
|
4187
4187
|
m.value && j(!1);
|
|
4188
4188
|
}
|
|
4189
|
-
),
|
|
4189
|
+
), Je(() => {
|
|
4190
4190
|
window.removeEventListener(
|
|
4191
4191
|
ar,
|
|
4192
4192
|
ie
|
|
@@ -4257,8 +4257,8 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
4257
4257
|
type: "checkbox",
|
|
4258
4258
|
class: "layers-panel__checkbox",
|
|
4259
4259
|
checked: ye(ae.id),
|
|
4260
|
-
style:
|
|
4261
|
-
onChange: (
|
|
4260
|
+
style: at(H(ae)),
|
|
4261
|
+
onChange: (le) => S(ae, le)
|
|
4262
4262
|
}, null, 44, wu),
|
|
4263
4263
|
n("div", _u, [
|
|
4264
4264
|
n("span", ku, J(ae.name), 1)
|
|
@@ -4269,7 +4269,7 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
4269
4269
|
type: "button",
|
|
4270
4270
|
class: "layers-panel__remove",
|
|
4271
4271
|
"aria-label": "Видалити шар",
|
|
4272
|
-
onClick: We((
|
|
4272
|
+
onClick: We((le) => se(ae), ["stop"])
|
|
4273
4273
|
}, [...q[2] || (q[2] = [
|
|
4274
4274
|
n("svg", {
|
|
4275
4275
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4291,10 +4291,10 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
4291
4291
|
"layer-id": ae.id,
|
|
4292
4292
|
class: "flex"
|
|
4293
4293
|
}, {
|
|
4294
|
-
trigger: Et(({ toggle:
|
|
4294
|
+
trigger: Et(({ toggle: le }) => [
|
|
4295
4295
|
n("button", {
|
|
4296
4296
|
class: "inline-flex items-center justify-center p-0 text-inherit no-underline cursor-pointer",
|
|
4297
|
-
onClick: We(
|
|
4297
|
+
onClick: We(le, ["prevent", "stop"])
|
|
4298
4298
|
}, [
|
|
4299
4299
|
n("div", Su, [
|
|
4300
4300
|
be(pe(fs))
|
|
@@ -4315,12 +4315,12 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
4315
4315
|
])
|
|
4316
4316
|
]),
|
|
4317
4317
|
(Q = ae.actions) != null && Q.length ? (s(), h("div", Eu, [
|
|
4318
|
-
(s(!0), h(de, null, Te(ae.actions, (
|
|
4319
|
-
key:
|
|
4318
|
+
(s(!0), h(de, null, Te(ae.actions, (le) => (s(), h("button", {
|
|
4319
|
+
key: le.widget || le.id || le.icon,
|
|
4320
4320
|
type: "button",
|
|
4321
4321
|
class: "layers-panel__action",
|
|
4322
|
-
innerHTML:
|
|
4323
|
-
onClick: (ce) => T("action", { layerId:
|
|
4322
|
+
innerHTML: le.icon,
|
|
4323
|
+
onClick: (ce) => T("action", { layerId: le.widget })
|
|
4324
4324
|
}, null, 8, Au))), 128))
|
|
4325
4325
|
])) : oe("", !0)
|
|
4326
4326
|
]);
|
|
@@ -4330,7 +4330,7 @@ const ou = { class: "map-filter" }, ru = { class: "map-filter__header" }, su = {
|
|
|
4330
4330
|
}
|
|
4331
4331
|
}), Po = /* @__PURE__ */ nt(Pu, [["__scopeId", "data-v-3c399929"]]);
|
|
4332
4332
|
function Mu() {
|
|
4333
|
-
const { map: e, ready: t } =
|
|
4333
|
+
const { map: e, ready: t } = ut(), o = M(null), r = M(null), i = M(null), c = M(null);
|
|
4334
4334
|
let m = [];
|
|
4335
4335
|
function p() {
|
|
4336
4336
|
m.forEach((a) => a()), m = [];
|
|
@@ -4378,7 +4378,7 @@ const Ru = { class: "min-w-[200px] max-w-[280px] rounded-lg border border-slate-
|
|
|
4378
4378
|
popupFields: o,
|
|
4379
4379
|
popupValues: r,
|
|
4380
4380
|
disable: i
|
|
4381
|
-
} = Mu(), { map: c } =
|
|
4381
|
+
} = Mu(), { map: c } = ut(), m = M(null), p = M({ left: "-9999px", top: "-9999px" }), x = M({}), y = /* @__PURE__ */ new Set(), _ = new Intl.NumberFormat("uk-UA", {
|
|
4382
4382
|
maximumFractionDigits: 2
|
|
4383
4383
|
});
|
|
4384
4384
|
function l(u, w) {
|
|
@@ -4455,24 +4455,24 @@ const Ru = { class: "min-w-[200px] max-w-[280px] rounded-lg border border-slate-
|
|
|
4455
4455
|
top: 0,
|
|
4456
4456
|
width: window.innerWidth,
|
|
4457
4457
|
height: window.innerHeight
|
|
4458
|
-
}, T = ((S = (E = c.value) == null ? void 0 : E.getContainer) == null ? void 0 : S.call(E)) || void 0, D = (T == null ? void 0 : T.getBoundingClientRect()) ?? L, A = D.left - L.left, k = D.top - L.top, P = u.offsetWidth || 0, j = u.offsetHeight || 0, X = 12, ee = 8, [ve,
|
|
4459
|
-
let ye = A + ve + X, xe = k +
|
|
4460
|
-
ye + P + ee > L.width && (ye = A + ve - P - X), xe + j + ee > L.height && (xe = k +
|
|
4458
|
+
}, T = ((S = (E = c.value) == null ? void 0 : E.getContainer) == null ? void 0 : S.call(E)) || void 0, D = (T == null ? void 0 : T.getBoundingClientRect()) ?? L, A = D.left - L.left, k = D.top - L.top, P = u.offsetWidth || 0, j = u.offsetHeight || 0, X = 12, ee = 8, [ve, me] = t.value;
|
|
4459
|
+
let ye = A + ve + X, xe = k + me + X;
|
|
4460
|
+
ye + P + ee > L.width && (ye = A + ve - P - X), xe + j + ee > L.height && (xe = k + me - j - X);
|
|
4461
4461
|
const ue = ee, ie = ee, R = Math.max(ee, L.width - P - ee), z = Math.max(ee, L.height - j - ee);
|
|
4462
4462
|
ye = Math.min(Math.max(ye, ue), R), xe = Math.min(Math.max(xe, ie), z), p.value = { left: `${ye}px`, top: `${xe}px` };
|
|
4463
4463
|
}
|
|
4464
4464
|
return _e([t, C], () => {
|
|
4465
|
-
|
|
4465
|
+
it(() => f());
|
|
4466
4466
|
}), Qe(() => {
|
|
4467
4467
|
window.addEventListener("resize", f);
|
|
4468
|
-
}),
|
|
4468
|
+
}), Je(() => {
|
|
4469
4469
|
window.removeEventListener("resize", f), i();
|
|
4470
4470
|
}), (u, w) => C.value.length ? (s(), h("div", {
|
|
4471
4471
|
key: 0,
|
|
4472
4472
|
ref_key: "popupRef",
|
|
4473
4473
|
ref: m,
|
|
4474
4474
|
class: "absolute pointer-events-none z-[130]",
|
|
4475
|
-
style:
|
|
4475
|
+
style: at(p.value)
|
|
4476
4476
|
}, [
|
|
4477
4477
|
n("div", Ru, [
|
|
4478
4478
|
n("div", ju, [
|
|
@@ -4515,7 +4515,7 @@ function Bu() {
|
|
|
4515
4515
|
p.value <= 0 || a(p.value - 1);
|
|
4516
4516
|
}
|
|
4517
4517
|
async function f(k, P) {
|
|
4518
|
-
var ee, ve,
|
|
4518
|
+
var ee, ve, me, ye, xe;
|
|
4519
4519
|
if (!((ee = k == null ? void 0 : k.properties) != null && ee.id)) return;
|
|
4520
4520
|
const j = new URLSearchParams();
|
|
4521
4521
|
j.set("layer", k.source), j.set("id", String((ve = k.properties) == null ? void 0 : ve.id));
|
|
@@ -4536,7 +4536,7 @@ function Bu() {
|
|
|
4536
4536
|
columns: R,
|
|
4537
4537
|
html: ie.html || null
|
|
4538
4538
|
}, _ || D(r.value);
|
|
4539
|
-
const S = ((
|
|
4539
|
+
const S = ((me = ie.rows) == null ? void 0 : me.geom) ?? ((ye = ie.data) == null ? void 0 : ye.geom);
|
|
4540
4540
|
if (S) {
|
|
4541
4541
|
const B = typeof S == "string" ? JSON.parse(S) : S;
|
|
4542
4542
|
B && (r.value = {
|
|
@@ -4561,7 +4561,7 @@ function Bu() {
|
|
|
4561
4561
|
function w() {
|
|
4562
4562
|
l();
|
|
4563
4563
|
}
|
|
4564
|
-
A(L()),
|
|
4564
|
+
A(L()), Je(() => w());
|
|
4565
4565
|
function L() {
|
|
4566
4566
|
const k = Array.isArray(e.query.info) ? e.query.info[0] : e.query.info;
|
|
4567
4567
|
if (typeof k != "string") return null;
|
|
@@ -4625,7 +4625,7 @@ function Bu() {
|
|
|
4625
4625
|
};
|
|
4626
4626
|
}
|
|
4627
4627
|
function Du() {
|
|
4628
|
-
const { map: e, ready: t } =
|
|
4628
|
+
const { map: e, ready: t } = ut(), o = M([]), r = M(0), i = M(0), c = M(!1), m = M(null), p = M({}), x = M(null), y = M([]), _ = O(() => o.value[i.value] || null), l = O(() => o.value.length > 0);
|
|
4629
4629
|
let g = null;
|
|
4630
4630
|
const a = () => {
|
|
4631
4631
|
g == null || g.remove(), g = null;
|
|
@@ -4649,7 +4649,7 @@ function Du() {
|
|
|
4649
4649
|
e
|
|
4650
4650
|
));
|
|
4651
4651
|
}, w = async (P, j, X) => {
|
|
4652
|
-
var
|
|
4652
|
+
var me, ye;
|
|
4653
4653
|
const [ee, ve] = [f(P), f(j)];
|
|
4654
4654
|
x.value = { x: ee, y: ve }, y.value = X, c.value = !0, m.value = null, o.value = [], p.value = {}, i.value = 0;
|
|
4655
4655
|
try {
|
|
@@ -4668,7 +4668,7 @@ function Du() {
|
|
|
4668
4668
|
o.value = ie.map((E) => E.data);
|
|
4669
4669
|
const [R] = o.value;
|
|
4670
4670
|
r.value = ie.reduce((E, S) => E + (S.count || 0), 0), p.value[0] = R;
|
|
4671
|
-
const z = ((
|
|
4671
|
+
const z = ((me = R == null ? void 0 : R.data) == null ? void 0 : me.geom_4326) ?? ((ye = R == null ? void 0 : R.data) == null ? void 0 : ye.geom);
|
|
4672
4672
|
await u(z);
|
|
4673
4673
|
} catch (xe) {
|
|
4674
4674
|
m.value = xe.message;
|
|
@@ -4684,12 +4684,12 @@ function Du() {
|
|
|
4684
4684
|
const { x: j, y: X } = x.value, ee = y.value.join(","), ve = `/api/map-info-point?x=${j}&y=${X}&index=${P}&layers=${ee}`;
|
|
4685
4685
|
try {
|
|
4686
4686
|
c.value = !0;
|
|
4687
|
-
const
|
|
4688
|
-
if (!
|
|
4689
|
-
const ye = await
|
|
4687
|
+
const me = await fetch(ve);
|
|
4688
|
+
if (!me.ok) throw new Error("Failed to fetch feature by index");
|
|
4689
|
+
const ye = await me.json();
|
|
4690
4690
|
o.value[P] = ye, p.value[P] = ye;
|
|
4691
|
-
} catch (
|
|
4692
|
-
m.value =
|
|
4691
|
+
} catch (me) {
|
|
4692
|
+
m.value = me.message;
|
|
4693
4693
|
} finally {
|
|
4694
4694
|
c.value = !1;
|
|
4695
4695
|
}
|
|
@@ -4711,7 +4711,7 @@ function Du() {
|
|
|
4711
4711
|
let k = null;
|
|
4712
4712
|
return Qe(async () => {
|
|
4713
4713
|
await t(), e.value && (k = async (P) => {
|
|
4714
|
-
const { lng: j, lat: X } = P.lngLat, ee = Ye(),
|
|
4714
|
+
const { lng: j, lat: X } = P.lngLat, ee = Ye(), me = Object.entries(ee).map(([ye, xe]) => {
|
|
4715
4715
|
var ue, ie, R, z;
|
|
4716
4716
|
return {
|
|
4717
4717
|
id: ye,
|
|
@@ -4727,9 +4727,9 @@ function Du() {
|
|
|
4727
4727
|
})()
|
|
4728
4728
|
};
|
|
4729
4729
|
}).filter((ye) => ye.service === "ogc" && ye.visible).map((ye) => ye.id);
|
|
4730
|
-
|
|
4730
|
+
me.length > 0 && await w(j, X, me);
|
|
4731
4731
|
}, e.value.on("dblclick", k));
|
|
4732
|
-
}),
|
|
4732
|
+
}), Je(() => {
|
|
4733
4733
|
e.value && k && e.value.off("dblclick", k), a();
|
|
4734
4734
|
}), {
|
|
4735
4735
|
features: o,
|
|
@@ -4864,83 +4864,83 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
4864
4864
|
}
|
|
4865
4865
|
function C(d) {
|
|
4866
4866
|
if (!d || !d.startsWith("external:")) return null;
|
|
4867
|
-
const b = d.slice(9), [I,
|
|
4868
|
-
return !
|
|
4869
|
-
layer:
|
|
4867
|
+
const b = d.slice(9), [I, re] = b.split(","), ge = I == null ? void 0 : I.trim(), ke = re == null ? void 0 : re.trim();
|
|
4868
|
+
return !ge || !ke ? null : {
|
|
4869
|
+
layer: ge,
|
|
4870
4870
|
id: ke,
|
|
4871
|
-
token: `external:${
|
|
4871
|
+
token: `external:${ge},${ke}`
|
|
4872
4872
|
};
|
|
4873
4873
|
}
|
|
4874
4874
|
function f(d) {
|
|
4875
4875
|
const b = v(), I = (d == null ? void 0 : d.trim()) || null;
|
|
4876
4876
|
if (b === I) return;
|
|
4877
|
-
const
|
|
4877
|
+
const re = { ...xe.query };
|
|
4878
4878
|
if (I)
|
|
4879
|
-
|
|
4879
|
+
re.info = I;
|
|
4880
4880
|
else if (b != null && b.startsWith("external:"))
|
|
4881
|
-
delete
|
|
4881
|
+
delete re.info;
|
|
4882
4882
|
else
|
|
4883
4883
|
return;
|
|
4884
|
-
i.push({ query:
|
|
4884
|
+
i.push({ query: re }).catch(() => {
|
|
4885
4885
|
});
|
|
4886
4886
|
}
|
|
4887
4887
|
function u(d) {
|
|
4888
4888
|
var I;
|
|
4889
4889
|
const b = c.value[d];
|
|
4890
4890
|
if (!b) {
|
|
4891
|
-
g(), o.close(),
|
|
4891
|
+
g(), o.close(), rt();
|
|
4892
4892
|
return;
|
|
4893
4893
|
}
|
|
4894
4894
|
if (m.value = d, b.type === "feature") {
|
|
4895
4895
|
o.openFeature(b.feature);
|
|
4896
4896
|
return;
|
|
4897
4897
|
}
|
|
4898
|
-
o.close(), f(b.infoToken ?? null), (I = b.html) != null && I.trim() ? T() :
|
|
4898
|
+
o.close(), f(b.infoToken ?? null), (I = b.html) != null && I.trim() ? T() : rt();
|
|
4899
4899
|
}
|
|
4900
4900
|
function w(d, b = 0) {
|
|
4901
4901
|
if (r.close(), c.value = d.map((I) => ({ type: "external", ...I })), !c.value.length) {
|
|
4902
|
-
o.close(), f(null),
|
|
4902
|
+
o.close(), f(null), rt();
|
|
4903
4903
|
return;
|
|
4904
4904
|
}
|
|
4905
4905
|
u(Math.min(Math.max(b, 0), c.value.length - 1));
|
|
4906
4906
|
}
|
|
4907
4907
|
function L(d) {
|
|
4908
4908
|
r.close();
|
|
4909
|
-
const b = Array.isArray(d == null ? void 0 : d.features) ? d.features.filter(Boolean) : [], I = Array.isArray(d == null ? void 0 : d.externalItems) ? d.externalItems.filter((
|
|
4909
|
+
const b = Array.isArray(d == null ? void 0 : d.features) ? d.features.filter(Boolean) : [], I = Array.isArray(d == null ? void 0 : d.externalItems) ? d.externalItems.filter((re) => typeof (re == null ? void 0 : re.html) == "string" && re.html.trim()) : [];
|
|
4910
4910
|
if (c.value = [
|
|
4911
|
-
...b.map((
|
|
4912
|
-
...I.map((
|
|
4911
|
+
...b.map((re) => ({ type: "feature", feature: re })),
|
|
4912
|
+
...I.map((re) => ({ type: "external", ...re }))
|
|
4913
4913
|
], !c.value.length) {
|
|
4914
|
-
o.close(), f(null),
|
|
4914
|
+
o.close(), f(null), rt();
|
|
4915
4915
|
return;
|
|
4916
4916
|
}
|
|
4917
4917
|
u(0);
|
|
4918
4918
|
}
|
|
4919
4919
|
function T() {
|
|
4920
|
-
return _.value ? l.value ? (Fe(l.value), !0) : (
|
|
4920
|
+
return _.value ? l.value ? (Fe(l.value), !0) : (rt(), !0) : (rt(), !1);
|
|
4921
4921
|
}
|
|
4922
4922
|
const D = (d) => {
|
|
4923
|
-
var
|
|
4924
|
-
const b = d, I = Array.isArray((
|
|
4923
|
+
var re, ge, ke, je;
|
|
4924
|
+
const b = d, I = Array.isArray((re = b.detail) == null ? void 0 : re.items) ? (ge = b.detail) == null ? void 0 : ge.items.filter((ze) => typeof (ze == null ? void 0 : ze.html) == "string" && ze.html.trim()) : [];
|
|
4925
4925
|
I.length ? w(I, Number(((ke = b.detail) == null ? void 0 : ke.index) ?? 0)) : typeof ((je = b.detail) == null ? void 0 : je.html) == "string" && b.detail.html.trim() ? w([{
|
|
4926
4926
|
html: b.detail.html,
|
|
4927
4927
|
geometry: b.detail.geometry ?? null,
|
|
4928
4928
|
infoToken: b.detail.infoToken ?? null
|
|
4929
|
-
}], 0) : (g(), o.close(), f(null),
|
|
4929
|
+
}], 0) : (g(), o.close(), f(null), rt());
|
|
4930
4930
|
}, A = (d) => {
|
|
4931
4931
|
L(d.detail);
|
|
4932
4932
|
};
|
|
4933
4933
|
Qe(() => {
|
|
4934
4934
|
typeof window > "u" || (window.addEventListener(Do, A), window.addEventListener(cr, D));
|
|
4935
|
-
}),
|
|
4935
|
+
}), Je(() => {
|
|
4936
4936
|
typeof window > "u" || (window.removeEventListener(Do, A), window.removeEventListener(cr, D));
|
|
4937
4937
|
});
|
|
4938
4938
|
const k = O(() => r.active.value), P = O(() => k.value || o.isOpen.value || _.value), j = O(() => k.value ? r.loading.value : o.cardLoading.value), X = O(() => k.value ? r.error.value : o.cardError.value), ee = O(() => {
|
|
4939
4939
|
var d, b, I;
|
|
4940
4940
|
return k.value ? ((d = r.current.value) == null ? void 0 : d.html) || null : _.value ? ((b = x.value) == null ? void 0 : b.html) || null : ((I = o.card.value) == null ? void 0 : I.html) || null;
|
|
4941
|
-
}), ve =
|
|
4941
|
+
}), ve = ut(), me = Wo(), ye = O(() => {
|
|
4942
4942
|
var d, b;
|
|
4943
|
-
return ((b = (d =
|
|
4943
|
+
return ((b = (d = me.value) == null ? void 0 : d.map) == null ? void 0 : b.cardHideEmpty) ?? null;
|
|
4944
4944
|
}), xe = Mt(), {
|
|
4945
4945
|
activateTemporaryLayer: ue,
|
|
4946
4946
|
deactivateTemporaryLayer: ie,
|
|
@@ -4954,8 +4954,8 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
4954
4954
|
var d;
|
|
4955
4955
|
return ((d = o.cardFeature.value) == null ? void 0 : d.source) ?? null;
|
|
4956
4956
|
}), B = O(() => S.value ? `map-card:${S.value}` : "map-card"), G = O(() => {
|
|
4957
|
-
var
|
|
4958
|
-
const d = o.cardFeature.value, b = (d == null ? void 0 : d.source) || ((
|
|
4957
|
+
var re, ge;
|
|
4958
|
+
const d = o.cardFeature.value, b = (d == null ? void 0 : d.source) || ((re = d == null ? void 0 : d.layer) == null ? void 0 : re.id), I = ((ge = d == null ? void 0 : d.properties) == null ? void 0 : ge.id) ?? (d == null ? void 0 : d.id);
|
|
4959
4959
|
return b && I != null ? `${b}:${I}` : null;
|
|
4960
4960
|
}), he = M(null), U = M([]), V = M(0), Z = /* @__PURE__ */ new Map();
|
|
4961
4961
|
function H() {
|
|
@@ -4963,7 +4963,7 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
4963
4963
|
const b = (window.location.pathname || "").match(/\/maps?\/([^/]+)/i);
|
|
4964
4964
|
return b && b[1] ? b[1] : null;
|
|
4965
4965
|
}
|
|
4966
|
-
const
|
|
4966
|
+
const se = O(() => {
|
|
4967
4967
|
const d = typeof t.mapId == "string" ? t.mapId.trim() : "";
|
|
4968
4968
|
if (d.length) return d;
|
|
4969
4969
|
const b = typeof xe.params.slug == "string" ? xe.params.slug.trim() : "";
|
|
@@ -4974,7 +4974,7 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
4974
4974
|
function $e(d) {
|
|
4975
4975
|
const b = d.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").replace(/[^a-zA-Z0-9]+/g, "-").replace(/^-+|-+$/g, "").toLowerCase();
|
|
4976
4976
|
if (b) return b;
|
|
4977
|
-
const I = Array.from(d).map((
|
|
4977
|
+
const I = Array.from(d).map((re) => re.charCodeAt(0).toString(16)).join("").slice(0, 8);
|
|
4978
4978
|
return I ? `layer-${I}` : `layer-${Math.random().toString(36).slice(2, 8)}`;
|
|
4979
4979
|
}
|
|
4980
4980
|
function $(d) {
|
|
@@ -5002,29 +5002,29 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5002
5002
|
function ae(d) {
|
|
5003
5003
|
const b = q(d);
|
|
5004
5004
|
if (b.length < 4) return null;
|
|
5005
|
-
const [I,
|
|
5006
|
-
return [I,
|
|
5005
|
+
const [I, re, ge, ke] = b;
|
|
5006
|
+
return [I, re, ge, ke].every((je) => Number.isFinite(je)) ? [I, re, ge, ke] : null;
|
|
5007
5007
|
}
|
|
5008
5008
|
function Q(d) {
|
|
5009
5009
|
if (!d) return null;
|
|
5010
5010
|
const b = d.trim();
|
|
5011
5011
|
if (!b.length) return null;
|
|
5012
5012
|
try {
|
|
5013
|
-
const
|
|
5013
|
+
const ge = JSON.parse(b), ke = ae(ge);
|
|
5014
5014
|
if (ke) return ke;
|
|
5015
5015
|
} catch {
|
|
5016
5016
|
}
|
|
5017
5017
|
const I = b.match(/-?\d+(?:\.\d+)?/g);
|
|
5018
5018
|
if (!I || I.length < 4) return null;
|
|
5019
|
-
const
|
|
5020
|
-
return
|
|
5019
|
+
const re = I.slice(0, 4).map((ge) => Number(ge));
|
|
5020
|
+
return re.every((ge) => Number.isFinite(ge)) ? [re[0], re[1], re[2], re[3]] : null;
|
|
5021
5021
|
}
|
|
5022
|
-
function
|
|
5022
|
+
function le(d) {
|
|
5023
5023
|
const b = {}, I = /([:@\w-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;
|
|
5024
|
-
let
|
|
5025
|
-
for (; (
|
|
5026
|
-
const
|
|
5027
|
-
|
|
5024
|
+
let re;
|
|
5025
|
+
for (; (re = I.exec(d)) !== null; ) {
|
|
5026
|
+
const ge = re[1], ke = re[2] ?? re[3] ?? re[4] ?? "";
|
|
5027
|
+
ge && (b[ge] = ke);
|
|
5028
5028
|
}
|
|
5029
5029
|
return b;
|
|
5030
5030
|
}
|
|
@@ -5042,30 +5042,30 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5042
5042
|
function Se(d) {
|
|
5043
5043
|
if (typeof d != "string" || !d.length) return [];
|
|
5044
5044
|
const b = [], I = /<LayerSwitcher\b([^>]*)>([\s\S]*?)<\/LayerSwitcher>/gi;
|
|
5045
|
-
let
|
|
5045
|
+
let re = 0, ge;
|
|
5046
5046
|
const ke = /* @__PURE__ */ new Set(), je = (ze) => {
|
|
5047
|
-
let qe = ze,
|
|
5047
|
+
let qe = ze, Xe = 2;
|
|
5048
5048
|
for (; ke.has(qe); )
|
|
5049
|
-
qe = `${ze}-${
|
|
5049
|
+
qe = `${ze}-${Xe}`, Xe += 1;
|
|
5050
5050
|
return ke.add(qe), qe;
|
|
5051
5051
|
};
|
|
5052
|
-
for (; (
|
|
5053
|
-
const [ze, qe = "",
|
|
5054
|
-
if (
|
|
5055
|
-
const Jo = d.slice(
|
|
5052
|
+
for (; (ge = I.exec(d)) !== null; ) {
|
|
5053
|
+
const [ze, qe = "", Xe = ""] = ge, ot = ge.index;
|
|
5054
|
+
if (ot > re) {
|
|
5055
|
+
const Jo = d.slice(re, ot);
|
|
5056
5056
|
Jo.trim().length && b.push({ type: "html", content: Jo });
|
|
5057
5057
|
}
|
|
5058
|
-
const
|
|
5058
|
+
const tt = le(qe), st = ce(tt, ["title"]) || "Тимчасовий шар", Ut = $(ce(tt, ["url"]));
|
|
5059
5059
|
if (!Ut) {
|
|
5060
|
-
b.push({ type: "html", content: ze }),
|
|
5060
|
+
b.push({ type: "html", content: ze }), re = ot + ze.length;
|
|
5061
5061
|
continue;
|
|
5062
5062
|
}
|
|
5063
|
-
const yn = ce(
|
|
5063
|
+
const yn = ce(tt, ["id"]), xo = ce(tt, ["button-text", "buttonText", "show", "show-label", "showLabel"]), Ur = Ie(ce(tt, ["tile-size", "tileSize"])), Vr = Ie(ce(tt, ["minzoom", "minZoom"])), qr = Ie(ce(tt, ["maxzoom", "maxZoom"])), Wr = Ie(ce(tt, ["opacity"])), Hr = Q(ce(tt, ["bounds", "data-bounds", "bbox"])), Zr = yn || $e(`${st}-${Ut}`) || $e(st), Yo = je(Zr || `layer-${b.length + 1}`), wo = Xe.trim(), Xo = /<[^>]+>/.test(wo), Gr = Xo ? wo : null, _o = Xo ? null : wo, Yr = xo && xo.trim().length ? xo.trim() : _o && _o.trim().length ? _o.trim() : void 0;
|
|
5064
5064
|
b.push({
|
|
5065
5065
|
type: "layer",
|
|
5066
5066
|
spec: {
|
|
5067
5067
|
id: Yo,
|
|
5068
|
-
title:
|
|
5068
|
+
title: st,
|
|
5069
5069
|
url: Ut,
|
|
5070
5070
|
tileSize: Ur,
|
|
5071
5071
|
minzoom: Vr,
|
|
@@ -5074,27 +5074,27 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5074
5074
|
bounds: Hr
|
|
5075
5075
|
},
|
|
5076
5076
|
componentProps: {
|
|
5077
|
-
title:
|
|
5077
|
+
title: st,
|
|
5078
5078
|
url: Ut,
|
|
5079
5079
|
id: Yo,
|
|
5080
5080
|
buttonText: Yr
|
|
5081
5081
|
},
|
|
5082
5082
|
slotText: Gr
|
|
5083
|
-
}),
|
|
5083
|
+
}), re = ot + ze.length;
|
|
5084
5084
|
}
|
|
5085
|
-
if (
|
|
5086
|
-
const ze = d.slice(
|
|
5085
|
+
if (re < d.length) {
|
|
5086
|
+
const ze = d.slice(re);
|
|
5087
5087
|
ze.trim().length && b.push({ type: "html", content: ze });
|
|
5088
5088
|
}
|
|
5089
5089
|
return !b.length && d.trim().length && b.push({ type: "html", content: d }), b;
|
|
5090
5090
|
}
|
|
5091
5091
|
function De(d) {
|
|
5092
5092
|
if (!d) return null;
|
|
5093
|
-
const b = typeof d.id == "string" ? d.id.trim() : "", I = typeof d.title == "string" ? d.title.trim() : "",
|
|
5094
|
-
return !b || !
|
|
5093
|
+
const b = typeof d.id == "string" ? d.id.trim() : "", I = typeof d.title == "string" ? d.title.trim() : "", re = $(typeof d.url == "string" ? d.url : "");
|
|
5094
|
+
return !b || !re ? null : {
|
|
5095
5095
|
id: b,
|
|
5096
5096
|
title: I || b,
|
|
5097
|
-
url:
|
|
5097
|
+
url: re,
|
|
5098
5098
|
tileSize: d.tileSize,
|
|
5099
5099
|
minzoom: d.minzoom,
|
|
5100
5100
|
maxzoom: d.maxzoom,
|
|
@@ -5109,8 +5109,8 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5109
5109
|
return (d == null ? void 0 : d.rows) ?? {};
|
|
5110
5110
|
}), Ze = O(() => {
|
|
5111
5111
|
if (k.value && r.current.value) {
|
|
5112
|
-
const
|
|
5113
|
-
return
|
|
5112
|
+
const re = r.current.value, ge = Array.isArray(re.columns) ? re.columns : [];
|
|
5113
|
+
return ge.length ? ge : re.fields ?? [];
|
|
5114
5114
|
}
|
|
5115
5115
|
const d = o.card.value;
|
|
5116
5116
|
if (!d) return [];
|
|
@@ -5126,12 +5126,12 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5126
5126
|
value: jt(b[I.name], I.format || "text", I.type || "text"),
|
|
5127
5127
|
format: I.format || "text"
|
|
5128
5128
|
}));
|
|
5129
|
-
}),
|
|
5130
|
-
function
|
|
5129
|
+
}), ht = /* @__PURE__ */ new Set(["—", "-", "–", "−"]);
|
|
5130
|
+
function pt(d) {
|
|
5131
5131
|
const b = d.match(/^(\d{4})-(\d{2})-(\d{2})$/);
|
|
5132
5132
|
if (!b) return d;
|
|
5133
|
-
const [, I,
|
|
5134
|
-
return `${
|
|
5133
|
+
const [, I, re, ge] = b;
|
|
5134
|
+
return `${ge}.${re}.${I}`;
|
|
5135
5135
|
}
|
|
5136
5136
|
function Rt(d) {
|
|
5137
5137
|
return Number.isFinite(d) ? new Intl.NumberFormat("uk-UA").format(d) : "—";
|
|
@@ -5140,21 +5140,21 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5140
5140
|
if (d == null) return "—";
|
|
5141
5141
|
if (b === "tags" || b === "file") return d;
|
|
5142
5142
|
if (Array.isArray(d))
|
|
5143
|
-
return d.length ? d.map((
|
|
5143
|
+
return d.length ? d.map((re) => jt(re, "text", "text")).join(", ") : "—";
|
|
5144
5144
|
if (typeof d == "boolean")
|
|
5145
5145
|
return d ? "так" : "ні";
|
|
5146
5146
|
if (I === "number" && typeof d == "number")
|
|
5147
5147
|
return Rt(d);
|
|
5148
5148
|
if (typeof d == "string") {
|
|
5149
|
-
const
|
|
5150
|
-
if (!
|
|
5151
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(
|
|
5152
|
-
return
|
|
5153
|
-
if (I === "number" && /^-?\d+(?:\.\d+)?$/.test(
|
|
5154
|
-
const
|
|
5155
|
-
return Number.isFinite(
|
|
5149
|
+
const re = d.trim();
|
|
5150
|
+
if (!re.length) return "—";
|
|
5151
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(re))
|
|
5152
|
+
return pt(re);
|
|
5153
|
+
if (I === "number" && /^-?\d+(?:\.\d+)?$/.test(re)) {
|
|
5154
|
+
const ge = Number(re);
|
|
5155
|
+
return Number.isFinite(ge) ? Rt(ge) : re;
|
|
5156
5156
|
}
|
|
5157
|
-
return
|
|
5157
|
+
return re;
|
|
5158
5158
|
}
|
|
5159
5159
|
return String(d);
|
|
5160
5160
|
}
|
|
@@ -5163,7 +5163,7 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5163
5163
|
if (Array.isArray(d)) return d.length === 0;
|
|
5164
5164
|
if (typeof d == "string") {
|
|
5165
5165
|
const b = d.trim();
|
|
5166
|
-
return b.length ?
|
|
5166
|
+
return b.length ? ht.has(b) : !0;
|
|
5167
5167
|
}
|
|
5168
5168
|
return !1;
|
|
5169
5169
|
}
|
|
@@ -5173,19 +5173,19 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5173
5173
|
if (typeof d == "string") {
|
|
5174
5174
|
const b = d.trim();
|
|
5175
5175
|
if (b.startsWith("{") && b.endsWith("}")) {
|
|
5176
|
-
const
|
|
5177
|
-
return
|
|
5176
|
+
const re = b.slice(1, -1).match(/"((?:[^"\\]|\\.)*)"/g);
|
|
5177
|
+
return re ? re.map((ge) => ge.slice(1, -1).replace(/\\"/g, '"')) : [];
|
|
5178
5178
|
}
|
|
5179
5179
|
}
|
|
5180
5180
|
return [];
|
|
5181
5181
|
}
|
|
5182
|
-
function
|
|
5182
|
+
function yt(d) {
|
|
5183
5183
|
if (d == null) return [];
|
|
5184
5184
|
if (Array.isArray(d))
|
|
5185
|
-
return d.filter((b) => typeof b == "string").map((b) => b.trim()).filter((b) => b.length > 0 && !
|
|
5185
|
+
return d.filter((b) => typeof b == "string").map((b) => b.trim()).filter((b) => b.length > 0 && !ht.has(b));
|
|
5186
5186
|
if (typeof d == "string") {
|
|
5187
5187
|
const b = d.trim();
|
|
5188
|
-
return !b.length ||
|
|
5188
|
+
return !b.length || ht.has(b) ? [] : b.includes(",") ? b.split(",").map((I) => I.trim()).filter((I) => I.length > 0) : [b];
|
|
5189
5189
|
}
|
|
5190
5190
|
return [];
|
|
5191
5191
|
}
|
|
@@ -5202,7 +5202,7 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5202
5202
|
const d = (b) => {
|
|
5203
5203
|
b.key === dr && Ve(b.newValue);
|
|
5204
5204
|
};
|
|
5205
|
-
window.addEventListener("storage", d),
|
|
5205
|
+
window.addEventListener("storage", d), Je(() => {
|
|
5206
5206
|
window.removeEventListener("storage", d);
|
|
5207
5207
|
});
|
|
5208
5208
|
}
|
|
@@ -5222,24 +5222,24 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5222
5222
|
);
|
|
5223
5223
|
const He = O(
|
|
5224
5224
|
() => et.value.filter((d) => Wt(d.value)).length
|
|
5225
|
-
),
|
|
5226
|
-
function
|
|
5225
|
+
), ct = O(() => W.value && !te.value ? et.value.filter((d) => !Wt(d.value)) : et.value);
|
|
5226
|
+
function vt(d) {
|
|
5227
5227
|
const b = typeof d == "string" ? d : "";
|
|
5228
5228
|
if (!b.length) return { sanitized: "", hiddenCount: 0 };
|
|
5229
5229
|
if (typeof DOMParser > "u")
|
|
5230
5230
|
return { sanitized: b, hiddenCount: 0 };
|
|
5231
|
-
const
|
|
5232
|
-
let
|
|
5233
|
-
return
|
|
5231
|
+
const re = new DOMParser().parseFromString(b, "text/html");
|
|
5232
|
+
let ge = 0;
|
|
5233
|
+
return re.querySelectorAll("dd").forEach((ke) => {
|
|
5234
5234
|
var qe;
|
|
5235
5235
|
const je = ((qe = ke.textContent) == null ? void 0 : qe.trim()) ?? "", ze = ke.closest("div");
|
|
5236
5236
|
if (Wt(je)) {
|
|
5237
|
-
|
|
5237
|
+
ge += 1, ze ? ze.remove() : ke.remove();
|
|
5238
5238
|
return;
|
|
5239
5239
|
}
|
|
5240
|
-
}), { sanitized:
|
|
5240
|
+
}), { sanitized: re.body.innerHTML, hiddenCount: ge };
|
|
5241
5241
|
}
|
|
5242
|
-
const
|
|
5242
|
+
const mt = O(() => vt(ee.value)), Lt = O(() => ee.value ? mt.value.hiddenCount : 0), Jt = O(() => He.value + Lt.value), lo = O(
|
|
5243
5243
|
() => {
|
|
5244
5244
|
var d;
|
|
5245
5245
|
return W.value && !te.value && !!((d = ee.value) != null && d.trim());
|
|
@@ -5253,31 +5253,32 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5253
5253
|
te.value = !te.value;
|
|
5254
5254
|
}
|
|
5255
5255
|
const Kt = O(() => {
|
|
5256
|
-
const d = lo.value ?
|
|
5256
|
+
const d = lo.value ? mt.value.sanitized : ee.value ?? "";
|
|
5257
5257
|
return Se(d);
|
|
5258
5258
|
}), cn = O(() => Kt.value.filter((d) => d.type === "layer"));
|
|
5259
5259
|
function ao(d) {
|
|
5260
5260
|
return Array.isArray(d) ? d.map((b, I) => {
|
|
5261
|
-
const
|
|
5262
|
-
if (!
|
|
5263
|
-
const tt = {
|
|
5261
|
+
const re = $(typeof (b == null ? void 0 : b.url) == "string" ? b.url : ""), ge = typeof (b == null ? void 0 : b.geohub) == "string" && b.geohub.trim().length ? `/api-hub/tms/${b.geohub.trim()}/ua/{z}/{x}/{y}.png` : "", ke = ((b == null ? void 0 : b.name) || (b == null ? void 0 : b.title) || (b == null ? void 0 : b.label) || `Шар ${I + 1}`).toString(), je = (b == null ? void 0 : b.id) != null ? String(b.id) : $e(`${ke}-${I + 1}`), ze = (b == null ? void 0 : b.buttonText) || (b == null ? void 0 : b.button_text) || null, qe = (b == null ? void 0 : b.description) || (b == null ? void 0 : b.subtitle) || null, Xe = re || $(ge) || "";
|
|
5262
|
+
if (!Xe) return null;
|
|
5263
|
+
const ot = typeof (b == null ? void 0 : b.layer_id) == "string" && b.layer_id.trim().length ? b.layer_id.trim() : null, tt = {
|
|
5264
5264
|
id: je,
|
|
5265
5265
|
title: ke,
|
|
5266
|
-
url:
|
|
5266
|
+
url: Xe,
|
|
5267
|
+
layer_id: ot,
|
|
5267
5268
|
subtitle: qe,
|
|
5268
5269
|
buttonText: ze || void 0
|
|
5269
5270
|
};
|
|
5270
5271
|
typeof (b == null ? void 0 : b.tileSize) == "number" && (tt.tileSize = b.tileSize), typeof (b == null ? void 0 : b.tile_size) == "number" && (tt.tileSize = b.tile_size), typeof (b == null ? void 0 : b.minzoom) == "number" && (tt.minzoom = b.minzoom), typeof (b == null ? void 0 : b.maxzoom) == "number" && (tt.maxzoom = b.maxzoom), typeof (b == null ? void 0 : b.opacity) == "number" && (tt.opacity = b.opacity);
|
|
5271
|
-
const
|
|
5272
|
-
return
|
|
5272
|
+
const st = ae((b == null ? void 0 : b.bounds) ?? (b == null ? void 0 : b.bbox) ?? null);
|
|
5273
|
+
return st && (tt.bounds = st), tt;
|
|
5273
5274
|
}).filter(Boolean) : [];
|
|
5274
5275
|
}
|
|
5275
5276
|
const Qt = O(() => {
|
|
5276
|
-
var
|
|
5277
|
+
var re, ge;
|
|
5277
5278
|
const d = o.card.value, b = r.current.value, I = [
|
|
5278
|
-
(
|
|
5279
|
+
(re = d == null ? void 0 : d.rows) == null ? void 0 : re.layers,
|
|
5279
5280
|
d == null ? void 0 : d.layers,
|
|
5280
|
-
(
|
|
5281
|
+
(ge = b == null ? void 0 : b.data) == null ? void 0 : ge.layers,
|
|
5281
5282
|
b == null ? void 0 : b.layers
|
|
5282
5283
|
];
|
|
5283
5284
|
for (const ke of I) {
|
|
@@ -5291,11 +5292,11 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5291
5292
|
), Pn = O(() => !o.cardLoading.value && !!o.card.value);
|
|
5292
5293
|
function co() {
|
|
5293
5294
|
const d = {}, b = N.value;
|
|
5294
|
-
if (b && typeof b == "object" && Object.entries(b).forEach(([I,
|
|
5295
|
-
typeof
|
|
5295
|
+
if (b && typeof b == "object" && Object.entries(b).forEach(([I, re]) => {
|
|
5296
|
+
typeof re == "string" && (d[I] = re);
|
|
5296
5297
|
}), S.value && (d.layer = S.value), !d.geohub) {
|
|
5297
|
-
const I = typeof (b == null ? void 0 : b.geohub) == "string" ? b.geohub : null,
|
|
5298
|
-
d.geohub = I ||
|
|
5298
|
+
const I = typeof (b == null ? void 0 : b.geohub) == "string" ? b.geohub : null, re = typeof (b == null ? void 0 : b.geohub_key) == "string" ? b.geohub_key : null, ge = typeof (b == null ? void 0 : b.geohubId) == "string" ? b.geohubId : null;
|
|
5299
|
+
d.geohub = I || re || ge || d.layer || "";
|
|
5299
5300
|
}
|
|
5300
5301
|
return d;
|
|
5301
5302
|
}
|
|
@@ -5320,27 +5321,36 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5320
5321
|
}
|
|
5321
5322
|
}
|
|
5322
5323
|
async function dn(d) {
|
|
5324
|
+
var qe, Xe, ot, tt;
|
|
5323
5325
|
if (!(d != null && d.id)) return;
|
|
5324
5326
|
await fo();
|
|
5325
|
-
const b = co(), I = cn.value.find((
|
|
5326
|
-
if (!
|
|
5327
|
+
const b = co(), I = cn.value.find((st) => st.spec.id === d.id), re = Qt.value.find((st) => st.id === d.id), ge = (I == null ? void 0 : I.spec) || De(re) || De(d), ke = (I == null ? void 0 : I.spec.bounds) ?? (re == null ? void 0 : re.bounds);
|
|
5328
|
+
if (!ge || z(ge.id, B.value))
|
|
5327
5329
|
return;
|
|
5328
|
-
const je =
|
|
5329
|
-
|
|
5330
|
+
const je = (re == null ? void 0 : re.layer_id) || ((Xe = (qe = I == null ? void 0 : I.spec.url) == null ? void 0 : qe.match(/\/api\/gis-rtile\/([^/]+)\//)) == null ? void 0 : Xe[1]) || ((tt = (ot = ge.url) == null ? void 0 : ot.match(/\/api\/gis-rtile\/([^/]+)\//)) == null ? void 0 : tt[1]) || null;
|
|
5331
|
+
if (je) {
|
|
5332
|
+
const st = typeof window < "u" ? window.location.origin : "";
|
|
5333
|
+
try {
|
|
5334
|
+
await fetch(`${st}/api/gis-xml/${je}`);
|
|
5335
|
+
} catch {
|
|
5336
|
+
}
|
|
5337
|
+
}
|
|
5338
|
+
const ze = B.value || void 0;
|
|
5339
|
+
he.value = ze ?? null, ue(ge, b, ze), E({
|
|
5330
5340
|
action: "activate",
|
|
5331
|
-
owner:
|
|
5332
|
-
spec:
|
|
5341
|
+
owner: ze,
|
|
5342
|
+
spec: ge,
|
|
5333
5343
|
context: b
|
|
5334
5344
|
}), po(ke);
|
|
5335
5345
|
}
|
|
5336
5346
|
async function po(d) {
|
|
5337
5347
|
var ke;
|
|
5338
5348
|
if (!(d != null && d.length)) return;
|
|
5339
|
-
const [b, I,
|
|
5340
|
-
[b, I,
|
|
5349
|
+
const [b, I, re, ge] = d;
|
|
5350
|
+
[b, I, re, ge].every((je) => Number.isFinite(je)) && typeof ve.fitBounds == "function" && (await ((ke = ve.ready) == null ? void 0 : ke.call(ve)), ve.fitBounds(
|
|
5341
5351
|
[
|
|
5342
5352
|
[b, I],
|
|
5343
|
-
[
|
|
5353
|
+
[re, ge]
|
|
5344
5354
|
],
|
|
5345
5355
|
{ padding: 48, maxZoom: 18 }
|
|
5346
5356
|
));
|
|
@@ -5400,7 +5410,7 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5400
5410
|
_e(
|
|
5401
5411
|
P,
|
|
5402
5412
|
(d, b) => {
|
|
5403
|
-
!d && b && (St(),
|
|
5413
|
+
!d && b && (St(), rt());
|
|
5404
5414
|
}
|
|
5405
5415
|
);
|
|
5406
5416
|
function Ot() {
|
|
@@ -5423,15 +5433,15 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5423
5433
|
const b = (d == null ? void 0 : d.data) ?? (d == null ? void 0 : d.properties);
|
|
5424
5434
|
return b != null && b.geom_4326 ? b.geom_4326 : b != null && b.geom ? b.geom : null;
|
|
5425
5435
|
}
|
|
5426
|
-
function
|
|
5436
|
+
function rt() {
|
|
5427
5437
|
U.value.length && (U.value.forEach((d, b) => {
|
|
5428
5438
|
var I;
|
|
5429
5439
|
(I = d == null ? void 0 : d.remove) == null || I.call(d, b === 0);
|
|
5430
5440
|
}), U.value = []);
|
|
5431
5441
|
}
|
|
5432
5442
|
function Fn(d) {
|
|
5433
|
-
var I,
|
|
5434
|
-
const b = (d == null ? void 0 : d.type) || ((
|
|
5443
|
+
var I, re, ge;
|
|
5444
|
+
const b = (d == null ? void 0 : d.type) || ((ge = (re = (I = d == null ? void 0 : d.features) == null ? void 0 : I[0]) == null ? void 0 : re.geometry) == null ? void 0 : ge.type) || "";
|
|
5435
5445
|
return b.includes("Polygon") ? [
|
|
5436
5446
|
{
|
|
5437
5447
|
type: "fill",
|
|
@@ -5497,9 +5507,9 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5497
5507
|
return v();
|
|
5498
5508
|
}
|
|
5499
5509
|
function zn(d) {
|
|
5500
|
-
var
|
|
5510
|
+
var ge, ke;
|
|
5501
5511
|
if (!d) return null;
|
|
5502
|
-
const b = (d == null ? void 0 : d.source) ?? ((
|
|
5512
|
+
const b = (d == null ? void 0 : d.source) ?? ((ge = d == null ? void 0 : d.layer) == null ? void 0 : ge.id), I = ((ke = d == null ? void 0 : d.properties) == null ? void 0 : ke.id) ?? (d == null ? void 0 : d.id);
|
|
5503
5513
|
return !b || I === void 0 || I === null ? null : `${b},${I}`.trim() || null;
|
|
5504
5514
|
}
|
|
5505
5515
|
function F(d, b) {
|
|
@@ -5520,11 +5530,11 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5520
5530
|
if (!d) return null;
|
|
5521
5531
|
const b = d.type === "FeatureCollection" ? (qe = (ze = d.features) == null ? void 0 : ze[0]) == null ? void 0 : qe.geometry : d.type === "Feature" ? d.geometry : d, I = [];
|
|
5522
5532
|
if (F(b, I), !I.length) return null;
|
|
5523
|
-
let
|
|
5524
|
-
return I.forEach(([
|
|
5525
|
-
|
|
5533
|
+
let re = I[0][0], ge = I[0][0], ke = I[0][1], je = I[0][1];
|
|
5534
|
+
return I.forEach(([Xe, ot]) => {
|
|
5535
|
+
Xe < re && (re = Xe), Xe > ge && (ge = Xe), ot < ke && (ke = ot), ot > je && (je = ot);
|
|
5526
5536
|
}), [
|
|
5527
|
-
(
|
|
5537
|
+
(re + ge) / 2,
|
|
5528
5538
|
(ke + je) / 2
|
|
5529
5539
|
];
|
|
5530
5540
|
}
|
|
@@ -5532,24 +5542,24 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5532
5542
|
var ke;
|
|
5533
5543
|
const I = hn();
|
|
5534
5544
|
if (!I || I.startsWith("external:")) return;
|
|
5535
|
-
const
|
|
5536
|
-
if (!
|
|
5537
|
-
const
|
|
5538
|
-
|
|
5545
|
+
const re = zn(d);
|
|
5546
|
+
if (!re || re !== I || nn === I) return;
|
|
5547
|
+
const ge = Y(b);
|
|
5548
|
+
ge && (await ((ke = ve.ready) == null ? void 0 : ke.call(ve)), ve.flyTo({ center: ge, zoom: wc }), nn = I);
|
|
5539
5549
|
}
|
|
5540
5550
|
function Fe(d) {
|
|
5541
|
-
var
|
|
5551
|
+
var ge;
|
|
5542
5552
|
if (!d) {
|
|
5543
|
-
|
|
5553
|
+
rt();
|
|
5544
5554
|
return;
|
|
5545
5555
|
}
|
|
5546
|
-
const b = (
|
|
5556
|
+
const b = (ge = ve.map) == null ? void 0 : ge.value, I = {
|
|
5547
5557
|
type: "FeatureCollection",
|
|
5548
5558
|
features: [{ type: "Feature", geometry: d, properties: {} }]
|
|
5549
5559
|
};
|
|
5550
|
-
|
|
5551
|
-
const
|
|
5552
|
-
if (U.value =
|
|
5560
|
+
rt();
|
|
5561
|
+
const re = Fn(d);
|
|
5562
|
+
if (U.value = re.map((ke, je) => Ye(
|
|
5553
5563
|
`feature-card-highlight${je || ""}`,
|
|
5554
5564
|
{
|
|
5555
5565
|
...je === 0 ? { source: { type: "geojson", data: I } } : {},
|
|
@@ -5565,10 +5575,10 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5565
5575
|
)), b != null && b.moveLayer) {
|
|
5566
5576
|
const ke = () => {
|
|
5567
5577
|
try {
|
|
5568
|
-
U.value.forEach((
|
|
5569
|
-
var
|
|
5570
|
-
const
|
|
5571
|
-
|
|
5578
|
+
U.value.forEach((Xe) => {
|
|
5579
|
+
var tt;
|
|
5580
|
+
const ot = (tt = Xe == null ? void 0 : Xe.ids) == null ? void 0 : tt.layerId;
|
|
5581
|
+
ot && b.moveLayer(ot);
|
|
5572
5582
|
});
|
|
5573
5583
|
} catch {
|
|
5574
5584
|
}
|
|
@@ -5587,29 +5597,29 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5587
5597
|
}
|
|
5588
5598
|
}
|
|
5589
5599
|
function Ce(d) {
|
|
5590
|
-
var
|
|
5591
|
-
const b = (d == null ? void 0 : d.source) || ((
|
|
5600
|
+
var re, ge;
|
|
5601
|
+
const b = (d == null ? void 0 : d.source) || ((re = d == null ? void 0 : d.layer) == null ? void 0 : re.id) || "unknown", I = ((ge = d == null ? void 0 : d.properties) == null ? void 0 : ge.id) ?? (d == null ? void 0 : d.id) ?? "unknown";
|
|
5592
5602
|
return `${b}:${I}`;
|
|
5593
5603
|
}
|
|
5594
5604
|
async function Ne(d) {
|
|
5595
|
-
var ke, je, ze, qe,
|
|
5605
|
+
var ke, je, ze, qe, Xe;
|
|
5596
5606
|
if (!d) return null;
|
|
5597
5607
|
const b = Ht(d);
|
|
5598
5608
|
if (b) return b;
|
|
5599
5609
|
const I = ((ke = d == null ? void 0 : d.properties) == null ? void 0 : ke.id) ?? (d == null ? void 0 : d.id);
|
|
5600
5610
|
if (!I) return null;
|
|
5601
|
-
const
|
|
5602
|
-
if (Z.has(
|
|
5603
|
-
return Z.get(
|
|
5604
|
-
const
|
|
5605
|
-
for (const
|
|
5611
|
+
const re = Ce(d);
|
|
5612
|
+
if (Z.has(re))
|
|
5613
|
+
return Z.get(re);
|
|
5614
|
+
const ge = [se.value, d == null ? void 0 : d.source, (je = d == null ? void 0 : d.layer) == null ? void 0 : je.id].map((ot) => typeof ot == "string" ? ot.trim() : "").filter(Boolean);
|
|
5615
|
+
for (const ot of ge)
|
|
5606
5616
|
try {
|
|
5607
|
-
const
|
|
5608
|
-
if (!
|
|
5617
|
+
const tt = await fetch(`/api/map-features/${encodeURIComponent(ot)}/${encodeURIComponent(String(I))}`);
|
|
5618
|
+
if (!tt.ok)
|
|
5609
5619
|
continue;
|
|
5610
|
-
const
|
|
5620
|
+
const st = await tt.json(), Ut = ((ze = st == null ? void 0 : st.data) == null ? void 0 : ze.geom) || ((qe = st == null ? void 0 : st.data) == null ? void 0 : qe.geometry) || ((Xe = st == null ? void 0 : st.data) == null ? void 0 : Xe.geom_4326) || null, yn = typeof Ut == "string" ? JSON.parse(Ut) : Ut;
|
|
5611
5621
|
if (yn)
|
|
5612
|
-
return Z.set(
|
|
5622
|
+
return Z.set(re, yn), yn;
|
|
5613
5623
|
} catch {
|
|
5614
5624
|
continue;
|
|
5615
5625
|
}
|
|
@@ -5621,30 +5631,30 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5621
5631
|
if (T())
|
|
5622
5632
|
return;
|
|
5623
5633
|
if (!d || k.value) {
|
|
5624
|
-
|
|
5634
|
+
rt();
|
|
5625
5635
|
return;
|
|
5626
5636
|
}
|
|
5627
5637
|
if (!Pn.value) {
|
|
5628
|
-
|
|
5638
|
+
rt();
|
|
5629
5639
|
return;
|
|
5630
5640
|
}
|
|
5631
5641
|
const I = await Ne(d);
|
|
5632
5642
|
if (b === V.value) {
|
|
5633
5643
|
if (!I) {
|
|
5634
|
-
|
|
5644
|
+
rt();
|
|
5635
5645
|
return;
|
|
5636
5646
|
}
|
|
5637
5647
|
Fe(I), Pe(d, I);
|
|
5638
5648
|
}
|
|
5639
5649
|
}
|
|
5640
5650
|
async function Ee(d) {
|
|
5641
|
-
var I,
|
|
5651
|
+
var I, re, ge;
|
|
5642
5652
|
const b = C(d);
|
|
5643
5653
|
if (!b) {
|
|
5644
|
-
(I = v()) != null && I.startsWith("external:") && (g(),
|
|
5654
|
+
(I = v()) != null && I.startsWith("external:") && (g(), rt());
|
|
5645
5655
|
return;
|
|
5646
5656
|
}
|
|
5647
|
-
if (((
|
|
5657
|
+
if (((re = x.value) == null ? void 0 : re.infoToken) === b.token) {
|
|
5648
5658
|
T();
|
|
5649
5659
|
return;
|
|
5650
5660
|
}
|
|
@@ -5652,9 +5662,9 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5652
5662
|
const ke = await fetch(`/api/map-format?layer=${encodeURIComponent(b.layer)}&id=${encodeURIComponent(b.id)}`);
|
|
5653
5663
|
if (!ke.ok)
|
|
5654
5664
|
throw new Error(`Failed (${ke.status})`);
|
|
5655
|
-
const je = await ke.json(), ze = typeof (je == null ? void 0 : je.html) == "string" ? je.html : null, qe = a(((
|
|
5665
|
+
const je = await ke.json(), ze = typeof (je == null ? void 0 : je.html) == "string" ? je.html : null, qe = a(((ge = je == null ? void 0 : je.data) == null ? void 0 : ge.geom) ?? (je == null ? void 0 : je.geom) ?? null);
|
|
5656
5666
|
if (!ze && !qe) {
|
|
5657
|
-
g(),
|
|
5667
|
+
g(), rt();
|
|
5658
5668
|
return;
|
|
5659
5669
|
}
|
|
5660
5670
|
w([{
|
|
@@ -5663,7 +5673,7 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5663
5673
|
infoToken: b.token
|
|
5664
5674
|
}], 0);
|
|
5665
5675
|
} catch {
|
|
5666
|
-
g(),
|
|
5676
|
+
g(), rt();
|
|
5667
5677
|
}
|
|
5668
5678
|
}
|
|
5669
5679
|
return _e(
|
|
@@ -5679,7 +5689,7 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5679
5689
|
}
|
|
5680
5690
|
), _e(k, (d) => {
|
|
5681
5691
|
if (d) {
|
|
5682
|
-
_.value ||
|
|
5692
|
+
_.value || rt();
|
|
5683
5693
|
return;
|
|
5684
5694
|
}
|
|
5685
5695
|
if (_.value) {
|
|
@@ -5687,14 +5697,14 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5687
5697
|
return;
|
|
5688
5698
|
}
|
|
5689
5699
|
Ue(o.cardFeature.value);
|
|
5690
|
-
}), _e(
|
|
5700
|
+
}), _e(se, () => {
|
|
5691
5701
|
if (_.value) {
|
|
5692
5702
|
T();
|
|
5693
5703
|
return;
|
|
5694
5704
|
}
|
|
5695
5705
|
!k.value && o.cardFeature.value && Ue(o.cardFeature.value);
|
|
5696
5706
|
}), _e(Pn, (d) => {
|
|
5697
|
-
T() || (d ? Ue(o.cardFeature.value) :
|
|
5707
|
+
T() || (d ? Ue(o.cardFeature.value) : rt());
|
|
5698
5708
|
}), _e(
|
|
5699
5709
|
() => hn(),
|
|
5700
5710
|
(d) => {
|
|
@@ -5702,18 +5712,18 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5702
5712
|
Ee(d);
|
|
5703
5713
|
return;
|
|
5704
5714
|
}
|
|
5705
|
-
x.value && (g(),
|
|
5715
|
+
x.value && (g(), rt());
|
|
5706
5716
|
},
|
|
5707
5717
|
{ immediate: !0 }
|
|
5708
5718
|
), _e(x, (d) => {
|
|
5709
5719
|
var b;
|
|
5710
5720
|
if (!((b = d == null ? void 0 : d.html) != null && b.trim())) {
|
|
5711
|
-
|
|
5721
|
+
rt();
|
|
5712
5722
|
return;
|
|
5713
5723
|
}
|
|
5714
5724
|
T();
|
|
5715
|
-
}),
|
|
5716
|
-
St(),
|
|
5725
|
+
}), Je(() => {
|
|
5726
|
+
St(), rt();
|
|
5717
5727
|
}), (d, b) => (s(), we(Vo, { name: "fade" }, {
|
|
5718
5728
|
default: Et(() => [
|
|
5719
5729
|
P.value ? (s(), h("div", Ou, [
|
|
@@ -5774,7 +5784,7 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5774
5784
|
j.value ? (s(), h("div", Ku, " Завантаження даних… ")) : X.value ? (s(), h("div", Qu, J(X.value), 1)) : (s(), h(de, { key: 2 }, [
|
|
5775
5785
|
et.value.length ? (s(), h("div", ec, [
|
|
5776
5786
|
n("dl", tc, [
|
|
5777
|
-
(s(!0), h(de, null, Te(
|
|
5787
|
+
(s(!0), h(de, null, Te(ct.value, (I) => (s(), h("div", {
|
|
5778
5788
|
key: I.key,
|
|
5779
5789
|
class: "grid grid-cols-1 gap-1 py-3 sm:grid-cols-10 sm:gap-4 even:bg-gray-50 text-[12px]"
|
|
5780
5790
|
}, [
|
|
@@ -5786,19 +5796,19 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5786
5796
|
]])
|
|
5787
5797
|
}, [
|
|
5788
5798
|
I.format === "tags" ? (s(), h("div", oc, [
|
|
5789
|
-
(s(!0), h(de, null, Te(At(I.value), (
|
|
5790
|
-
key:
|
|
5799
|
+
(s(!0), h(de, null, Te(At(I.value), (re, ge) => (s(), h("span", {
|
|
5800
|
+
key: ge,
|
|
5791
5801
|
class: "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold text-foreground"
|
|
5792
|
-
}, J(
|
|
5802
|
+
}, J(re), 1))), 128))
|
|
5793
5803
|
])) : I.format === "file" ? (s(), h(de, { key: 1 }, [
|
|
5794
|
-
|
|
5795
|
-
(s(!0), h(de, null, Te(
|
|
5796
|
-
key:
|
|
5804
|
+
yt(I.value).length ? (s(), h("div", rc, [
|
|
5805
|
+
(s(!0), h(de, null, Te(yt(I.value), (re, ge) => (s(), h("div", {
|
|
5806
|
+
key: ge,
|
|
5797
5807
|
class: "flex gap-x-2"
|
|
5798
5808
|
}, [
|
|
5799
5809
|
n("a", {
|
|
5800
5810
|
class: "flex items-center gap-x-2 border py-2 px-3 shadow rounded-xl cursor-pointer w-[42px] y-[34px]",
|
|
5801
|
-
href:
|
|
5811
|
+
href: re,
|
|
5802
5812
|
target: "_blank",
|
|
5803
5813
|
rel: "noopener"
|
|
5804
5814
|
}, [...b[2] || (b[2] = [
|
|
@@ -5810,7 +5820,7 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5810
5820
|
n("a", {
|
|
5811
5821
|
download: "1",
|
|
5812
5822
|
class: "flex items-center gap-x-2 border py-2 px-3 shadow rounded-xl cursor-pointer w-[42px] y-[34px]",
|
|
5813
|
-
href:
|
|
5823
|
+
href: re,
|
|
5814
5824
|
target: "_blank",
|
|
5815
5825
|
rel: "noopener"
|
|
5816
5826
|
}, [...b[3] || (b[3] = [
|
|
@@ -5830,7 +5840,7 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5830
5840
|
]))), 128))
|
|
5831
5841
|
])
|
|
5832
5842
|
])) : Kt.value.length ? (s(), h("div", ic, [
|
|
5833
|
-
(s(!0), h(de, null, Te(Kt.value, (I,
|
|
5843
|
+
(s(!0), h(de, null, Te(Kt.value, (I, re) => (s(), h(de, { key: re }, [
|
|
5834
5844
|
I.type === "html" ? (s(), h("div", {
|
|
5835
5845
|
key: 0,
|
|
5836
5846
|
innerHTML: I.content
|
|
@@ -5886,7 +5896,7 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5886
5896
|
type: "checkbox",
|
|
5887
5897
|
class: "peer hidden",
|
|
5888
5898
|
checked: go(I.id),
|
|
5889
|
-
onChange: (
|
|
5899
|
+
onChange: (re) => mo(I, re)
|
|
5890
5900
|
}, null, 40, mc),
|
|
5891
5901
|
b[4] || (b[4] = n("div", { class: "w-4 h-4 rounded border border-blue-800 flex items-center justify-center peer-checked:bg-blue-600 peer-checked:border-blue-600" }, [
|
|
5892
5902
|
n("svg", {
|
|
@@ -5919,7 +5929,7 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5919
5929
|
_: 1
|
|
5920
5930
|
}));
|
|
5921
5931
|
}
|
|
5922
|
-
}), kc = /* @__PURE__ */ nt(_c, [["__scopeId", "data-v-
|
|
5932
|
+
}), kc = /* @__PURE__ */ nt(_c, [["__scopeId", "data-v-e2cf1510"]]), $c = {
|
|
5923
5933
|
key: 0,
|
|
5924
5934
|
class: "legend-widget flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative widget",
|
|
5925
5935
|
style: { width: "100%" }
|
|
@@ -5929,7 +5939,7 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5929
5939
|
items: {}
|
|
5930
5940
|
},
|
|
5931
5941
|
setup(e) {
|
|
5932
|
-
const t = e, { map: o, ready: r } =
|
|
5942
|
+
const t = e, { map: o, ready: r } = ut(), i = M([]);
|
|
5933
5943
|
let c = null;
|
|
5934
5944
|
function m(_) {
|
|
5935
5945
|
return _ ? _.map((l, g) => {
|
|
@@ -5975,7 +5985,7 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5975
5985
|
{ immediate: !0, deep: !0 }
|
|
5976
5986
|
), Qe(async () => {
|
|
5977
5987
|
(t.items === void 0 || t.items === null) && (await r(), y(), x());
|
|
5978
|
-
}),
|
|
5988
|
+
}), Je(() => {
|
|
5979
5989
|
c == null || c(), c = null;
|
|
5980
5990
|
}), (_, l) => i.value.length ? (s(), h("div", $c, [
|
|
5981
5991
|
n("div", Cc, [
|
|
@@ -5985,7 +5995,7 @@ const ur = /* @__PURE__ */ Ae({
|
|
|
5985
5995
|
}, [
|
|
5986
5996
|
n("span", {
|
|
5987
5997
|
class: "shrink-0 size-2.5 inline-block me-2.5 h-[10px] w-[10px] rounded-full",
|
|
5988
|
-
style:
|
|
5998
|
+
style: at({ background: g.color })
|
|
5989
5999
|
}, null, 4),
|
|
5990
6000
|
n("span", Lc, [
|
|
5991
6001
|
n("span", null, J(g.label), 1)
|
|
@@ -6153,7 +6163,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
6153
6163
|
placeholder: "Введіть назву шару...",
|
|
6154
6164
|
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"
|
|
6155
6165
|
}, null, 512), [
|
|
6156
|
-
[
|
|
6166
|
+
[gt, y.value]
|
|
6157
6167
|
]),
|
|
6158
6168
|
(s(), h("svg", Fc, [...w[1] || (w[1] = [
|
|
6159
6169
|
n("path", {
|
|
@@ -6260,7 +6270,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
6260
6270
|
m.visible ? (s(), h("div", {
|
|
6261
6271
|
key: 0,
|
|
6262
6272
|
class: "filter-badge__hint",
|
|
6263
|
-
style:
|
|
6273
|
+
style: at({
|
|
6264
6274
|
top: `${m.top}px`,
|
|
6265
6275
|
left: `${m.left}px`
|
|
6266
6276
|
})
|
|
@@ -6303,7 +6313,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
6303
6313
|
g();
|
|
6304
6314
|
return;
|
|
6305
6315
|
}
|
|
6306
|
-
r.open = !0,
|
|
6316
|
+
r.open = !0, it(() => {
|
|
6307
6317
|
y(), a(), requestAnimationFrame(() => {
|
|
6308
6318
|
y();
|
|
6309
6319
|
});
|
|
@@ -6339,12 +6349,12 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
6339
6349
|
}
|
|
6340
6350
|
return Qe(() => {
|
|
6341
6351
|
document.addEventListener("click", _, !0), document.addEventListener("keydown", l), window.addEventListener("scroll", y, !0), window.addEventListener("resize", y);
|
|
6342
|
-
}),
|
|
6352
|
+
}), Je(() => {
|
|
6343
6353
|
document.removeEventListener("click", _, !0), document.removeEventListener("keydown", l), window.removeEventListener("scroll", y, !0), window.removeEventListener("resize", y), v();
|
|
6344
6354
|
}), _e(
|
|
6345
6355
|
() => o.items,
|
|
6346
6356
|
() => {
|
|
6347
|
-
r.open &&
|
|
6357
|
+
r.open && it(() => y());
|
|
6348
6358
|
},
|
|
6349
6359
|
{ deep: !0 }
|
|
6350
6360
|
), t({ close: g }), (C, f) => (s(), h("div", {
|
|
@@ -6361,7 +6371,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
6361
6371
|
r.open ? (s(), h("div", {
|
|
6362
6372
|
key: 0,
|
|
6363
6373
|
class: "vst-popover__content inline-block z-[103] py-3 px-4 bg-white text-sm text-gray-500 rounded-md shadow-lg bottom absolute min-w-[200px]",
|
|
6364
|
-
style:
|
|
6374
|
+
style: at(p.value),
|
|
6365
6375
|
ref_key: "popoverEl",
|
|
6366
6376
|
ref: c,
|
|
6367
6377
|
onClick: f[0] || (f[0] = We(() => {
|
|
@@ -6449,7 +6459,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
6449
6459
|
z ? g.set(R, z) : g.delete(R);
|
|
6450
6460
|
}
|
|
6451
6461
|
function w(R) {
|
|
6452
|
-
y.value = y.value === R ? null : R, y.value &&
|
|
6462
|
+
y.value = y.value === R ? null : R, y.value && it(() => {
|
|
6453
6463
|
L(R), requestAnimationFrame(() => {
|
|
6454
6464
|
L(R);
|
|
6455
6465
|
});
|
|
@@ -6459,8 +6469,8 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
6459
6469
|
const z = g.get(R);
|
|
6460
6470
|
if (!z || !l.value) return;
|
|
6461
6471
|
const E = z.getBoundingClientRect(), S = 12, B = 6, G = window.scrollX + S, he = window.scrollX + window.innerWidth - S, U = window.scrollY + S, V = window.scrollY + window.innerHeight - S, Z = l.value.offsetWidth || 190, H = l.value.offsetHeight || 0;
|
|
6462
|
-
let
|
|
6463
|
-
N + Z > he && (N = E.right + window.scrollX - Z, N < G && (N = G)), N < G && (N = G),
|
|
6472
|
+
let se = E.bottom + window.scrollY + B, N = E.left + window.scrollX;
|
|
6473
|
+
N + Z > he && (N = E.right + window.scrollX - Z, N < G && (N = G)), N < G && (N = G), se + H > V && (se = E.top + window.scrollY - H - B, se < U && (se = Math.max(U, V - H))), se < U && (se = U), se + H > V && (se = Math.max(U, V - H)), _.top = se, _.left = N;
|
|
6464
6474
|
}
|
|
6465
6475
|
function T(R) {
|
|
6466
6476
|
const z = Ye(R);
|
|
@@ -6484,19 +6494,19 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
6484
6494
|
}
|
|
6485
6495
|
Qe(() => {
|
|
6486
6496
|
document.addEventListener("click", D), window.addEventListener("resize", A), window.addEventListener("scroll", A, !0);
|
|
6487
|
-
}),
|
|
6497
|
+
}), Je(() => {
|
|
6488
6498
|
document.removeEventListener("click", D), window.removeEventListener("resize", A), window.removeEventListener("scroll", A, !0);
|
|
6489
6499
|
});
|
|
6490
|
-
const { map: k } =
|
|
6500
|
+
const { map: k } = ut();
|
|
6491
6501
|
function P(R) {
|
|
6492
6502
|
var G, he, U, V, Z, H;
|
|
6493
6503
|
if (!R) return;
|
|
6494
6504
|
const z = Ye(R), E = v(R);
|
|
6495
6505
|
if (!z && !E) return;
|
|
6496
6506
|
if (((G = E == null ? void 0 : E.extent) == null ? void 0 : G.length) === 4 && ((he = k.value) != null && he.fitBounds)) {
|
|
6497
|
-
const
|
|
6498
|
-
if (
|
|
6499
|
-
const [N, K, fe, $e] =
|
|
6507
|
+
const se = E.extent.map((N) => Number(N));
|
|
6508
|
+
if (se.every((N) => Number.isFinite(N))) {
|
|
6509
|
+
const [N, K, fe, $e] = se;
|
|
6500
6510
|
k.value.fitBounds([
|
|
6501
6511
|
[N, K],
|
|
6502
6512
|
[fe, $e]
|
|
@@ -6518,7 +6528,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
6518
6528
|
function ve(R) {
|
|
6519
6529
|
X.value = R;
|
|
6520
6530
|
}
|
|
6521
|
-
function
|
|
6531
|
+
function me(R, z) {
|
|
6522
6532
|
if (R.preventDefault(), j.value === null || j.value === z) {
|
|
6523
6533
|
j.value = null, X.value = null;
|
|
6524
6534
|
return;
|
|
@@ -6536,10 +6546,10 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
6536
6546
|
return !Array.isArray(R) || R.length === 0 ? null : `${R.length} ${z}`;
|
|
6537
6547
|
}
|
|
6538
6548
|
function ie(R) {
|
|
6539
|
-
var
|
|
6549
|
+
var se, N, K, fe, $e, $;
|
|
6540
6550
|
const z = Ye(R), E = v(R);
|
|
6541
6551
|
if (!z && !E) return [];
|
|
6542
|
-
const S = (E == null ? void 0 : E.name) || ((N = (
|
|
6552
|
+
const S = (E == null ? void 0 : E.name) || ((N = (se = z == null ? void 0 : z.opts) == null ? void 0 : se.layer) == null ? void 0 : N.name) || null, B = (E == null ? void 0 : E.service) || ((K = z == null ? void 0 : z.opts) == null ? void 0 : K.service) || null, G = (fe = z == null ? void 0 : z.getSource) == null ? void 0 : fe.call(z), he = G && "tiles" in G ? ($e = G.tiles) == null ? void 0 : $e[0] : (E == null ? void 0 : E.url) || null, U = (E == null ? void 0 : E.source_path) || null, V = (z == null ? void 0 : z.popup) || (E == null ? void 0 : E.popup), Z = (z == null ? void 0 : z.card) || (E == null ? void 0 : E.card), H = (E == null ? void 0 : E.filters) || (($ = z == null ? void 0 : z.opts) == null ? void 0 : $.filters);
|
|
6543
6553
|
return [
|
|
6544
6554
|
{ label: "Назва", value: xe(S) },
|
|
6545
6555
|
{ label: "Сервіс", value: xe(E != null && E.isClient ? "Завантажені дані" : B) },
|
|
@@ -6587,7 +6597,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
6587
6597
|
draggable: "true",
|
|
6588
6598
|
onDragstart: (G) => ee(G, S),
|
|
6589
6599
|
onDragover: We((G) => ve(S), ["prevent"]),
|
|
6590
|
-
onDrop: (G) =>
|
|
6600
|
+
onDrop: (G) => me(G, S),
|
|
6591
6601
|
onDragend: ye
|
|
6592
6602
|
}, [
|
|
6593
6603
|
n("div", td, [
|
|
@@ -6651,7 +6661,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
6651
6661
|
ref_key: "menuEl",
|
|
6652
6662
|
ref: l,
|
|
6653
6663
|
class: "selected-tab__menu",
|
|
6654
|
-
style:
|
|
6664
|
+
style: at({ top: _.top + "px", left: _.left + "px" })
|
|
6655
6665
|
}, [
|
|
6656
6666
|
n("div", id, [
|
|
6657
6667
|
n("button", {
|
|
@@ -6783,7 +6793,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
6783
6793
|
},
|
|
6784
6794
|
emits: ["change"],
|
|
6785
6795
|
setup(e, { emit: t }) {
|
|
6786
|
-
const o =
|
|
6796
|
+
const o = lt(() => import("@opengis/filter")), r = e, i = t, c = O(() => {
|
|
6787
6797
|
var x;
|
|
6788
6798
|
return ((x = r.layer) == null ? void 0 : x.filters) ?? [];
|
|
6789
6799
|
}), m = O(() => c.value.length > 0);
|
|
@@ -6828,7 +6838,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
6828
6838
|
const N = i.query["catalog-tab"];
|
|
6829
6839
|
return (Array.isArray(N) ? N[0] : N) === "selected" ? "selected" : "catalog";
|
|
6830
6840
|
}
|
|
6831
|
-
const p = M(m()), x = M({ groups: [] }), y = M([]), _ = M(""), { map: l } =
|
|
6841
|
+
const p = M(m()), x = M({ groups: [] }), y = M([]), _ = M(""), { map: l } = ut(), {
|
|
6832
6842
|
clientLayers: g,
|
|
6833
6843
|
isClientLayer: a,
|
|
6834
6844
|
getClientLayer: v,
|
|
@@ -6899,7 +6909,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
6899
6909
|
const K = w.value;
|
|
6900
6910
|
K && ee(K, N);
|
|
6901
6911
|
}
|
|
6902
|
-
function
|
|
6912
|
+
function me(N) {
|
|
6903
6913
|
const K = N.url;
|
|
6904
6914
|
let fe = null;
|
|
6905
6915
|
if (K && (fe = K.startsWith("http") ? K : `${window.location.origin}${K}`), !fe) return null;
|
|
@@ -6936,7 +6946,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
6936
6946
|
k(N, K), K && !y.value.includes(N) && y.value.push(N);
|
|
6937
6947
|
return;
|
|
6938
6948
|
}
|
|
6939
|
-
const $ =
|
|
6949
|
+
const $ = me($e);
|
|
6940
6950
|
if (!$) return;
|
|
6941
6951
|
const q = Ye($e.id, $, l);
|
|
6942
6952
|
if (q)
|
|
@@ -6970,24 +6980,24 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
6970
6980
|
!K || typeof K != "string" || (y.value.includes(K) || y.value.push(K), p.value = "selected");
|
|
6971
6981
|
}
|
|
6972
6982
|
function R(N) {
|
|
6973
|
-
y.value = [...N],
|
|
6983
|
+
y.value = [...N], it(() => {
|
|
6974
6984
|
var $;
|
|
6975
6985
|
if (!l.value) return;
|
|
6976
6986
|
const K = (($ = l.value.getStyle()) == null ? void 0 : $.layers) ?? [];
|
|
6977
6987
|
let fe;
|
|
6978
6988
|
const $e = (q) => K.filter((ae) => {
|
|
6979
|
-
var Q,
|
|
6980
|
-
return (ae == null ? void 0 : ae.source) === q || (ae == null ? void 0 : ae.id) === q || ((
|
|
6989
|
+
var Q, le;
|
|
6990
|
+
return (ae == null ? void 0 : ae.source) === q || (ae == null ? void 0 : ae.id) === q || ((le = (Q = ae == null ? void 0 : ae.id) == null ? void 0 : Q.startsWith) == null ? void 0 : le.call(Q, `${q}`));
|
|
6981
6991
|
}).map((ae) => ae.id);
|
|
6982
6992
|
for (let q = N.length - 1; q >= 0; q -= 1) {
|
|
6983
6993
|
const ae = N[q], Q = $e(ae);
|
|
6984
|
-
Q.length && (Q.forEach((
|
|
6994
|
+
Q.length && (Q.forEach((le) => {
|
|
6985
6995
|
var ce;
|
|
6986
|
-
if ((ce = l.value) != null && ce.getLayer(
|
|
6996
|
+
if ((ce = l.value) != null && ce.getLayer(le))
|
|
6987
6997
|
try {
|
|
6988
|
-
l.value.moveLayer(
|
|
6998
|
+
l.value.moveLayer(le, fe);
|
|
6989
6999
|
} catch (Ie) {
|
|
6990
|
-
console.warn("Cannot move layer",
|
|
7000
|
+
console.warn("Cannot move layer", le, Ie);
|
|
6991
7001
|
}
|
|
6992
7002
|
}), fe = Q[0]);
|
|
6993
7003
|
}
|
|
@@ -7049,13 +7059,13 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
7049
7059
|
function H() {
|
|
7050
7060
|
L.value = !L.value;
|
|
7051
7061
|
}
|
|
7052
|
-
function
|
|
7062
|
+
function se() {
|
|
7053
7063
|
T.value = window.innerWidth <= 768;
|
|
7054
7064
|
}
|
|
7055
7065
|
return Qe(() => {
|
|
7056
|
-
Z(),
|
|
7057
|
-
}),
|
|
7058
|
-
window.removeEventListener("resize",
|
|
7066
|
+
Z(), se(), T.value && (L.value = !1), window.addEventListener("resize", se), window.addEventListener($n, ie);
|
|
7067
|
+
}), Je(() => {
|
|
7068
|
+
window.removeEventListener("resize", se), window.removeEventListener($n, ie), r();
|
|
7059
7069
|
}), (N, K) => (s(), h("div", {
|
|
7060
7070
|
class: Be(["map-catalog-widget w-full max-w-md mx-auto p-4 bg-white border border-gray-200 rounded-lg shadow-sm widget", L.value && (p.value === "selected" || U.value > 1) ? "min-h-[250px]" : "min-h-[0px]"])
|
|
7061
7071
|
}, [
|
|
@@ -7346,12 +7356,12 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
7346
7356
|
const z = await A(ue, ie), E = Array.isArray(z == null ? void 0 : z.rows) ? z.rows.map((G, he) => {
|
|
7347
7357
|
const U = (G == null ? void 0 : G.id) ?? (G == null ? void 0 : G.value), V = U != null ? String(U) : "";
|
|
7348
7358
|
if (!V) return null;
|
|
7349
|
-
const Z = j(V, G, R, ie), H = Number((G == null ? void 0 : G.count) ?? 0) || 0,
|
|
7359
|
+
const Z = j(V, G, R, ie), H = Number((G == null ? void 0 : G.count) ?? 0) || 0, se = P(V, G, R, ie, he);
|
|
7350
7360
|
return {
|
|
7351
7361
|
id: V,
|
|
7352
7362
|
label: Z,
|
|
7353
7363
|
count: H,
|
|
7354
|
-
color:
|
|
7364
|
+
color: se
|
|
7355
7365
|
};
|
|
7356
7366
|
}).filter(Boolean) : [];
|
|
7357
7367
|
c.value = E, m.value = ((S = z == null ? void 0 : z.field) == null ? void 0 : S.label) || ((B = z == null ? void 0 : z.field) == null ? void 0 : B.name) || null, X(p.value, R, E, ie), i.value = !1;
|
|
@@ -7363,15 +7373,15 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
7363
7373
|
},
|
|
7364
7374
|
{ immediate: !0 }
|
|
7365
7375
|
);
|
|
7366
|
-
const ve = O(() => "Набори даних"),
|
|
7376
|
+
const ve = O(() => "Набори даних"), me = O(() => c.value.reduce((ue, ie) => ue + ie.count, 0)), ye = O(() => {
|
|
7367
7377
|
var R;
|
|
7368
7378
|
const ue = u.value;
|
|
7369
7379
|
return ((R = f.value.find((z) => z.id === ue)) == null ? void 0 : R.label) || null || m.value || ue || null;
|
|
7370
7380
|
});
|
|
7371
7381
|
function xe(ue) {
|
|
7372
|
-
return
|
|
7382
|
+
return me.value ? `${(ue / me.value * 100).toFixed(2)}%` : "0.00%";
|
|
7373
7383
|
}
|
|
7374
|
-
return
|
|
7384
|
+
return Je(() => {
|
|
7375
7385
|
var ue, ie;
|
|
7376
7386
|
(ie = (ue = p.value) == null ? void 0 : ue.remove) == null || ie.call(ue);
|
|
7377
7387
|
}), (ue, ie) => r.value ? (s(), h("div", Sd, [
|
|
@@ -7427,7 +7437,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
7427
7437
|
])
|
|
7428
7438
|
])) : oe("", !0),
|
|
7429
7439
|
i.value ? (s(), h("div", zd, "Завантаження…")) : c.value.length ? (s(), h(de, { key: 3 }, [
|
|
7430
|
-
n("h4", Bd, J(
|
|
7440
|
+
n("h4", Bd, J(me.value), 1),
|
|
7431
7441
|
n("ul", Dd, [
|
|
7432
7442
|
(s(!0), h(de, null, Te(c.value, (R) => (s(), h("li", {
|
|
7433
7443
|
key: R.id,
|
|
@@ -7436,7 +7446,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
7436
7446
|
n("div", Nd, [
|
|
7437
7447
|
n("span", {
|
|
7438
7448
|
class: "block w-[16px] h-[16px] rounded",
|
|
7439
|
-
style:
|
|
7449
|
+
style: at({ backgroundColor: R.color })
|
|
7440
7450
|
}, null, 4),
|
|
7441
7451
|
n("span", Od, J(R.label), 1)
|
|
7442
7452
|
]),
|
|
@@ -7499,7 +7509,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
7499
7509
|
const te = W.tooltipRightHandlers;
|
|
7500
7510
|
te && (W.removeEventListener("mouseenter", te.show), W.removeEventListener("mouseleave", te.hide));
|
|
7501
7511
|
}
|
|
7502
|
-
}, o = e, r =
|
|
7512
|
+
}, o = e, r = ut(), i = Xt();
|
|
7503
7513
|
function c() {
|
|
7504
7514
|
return typeof globalThis < "u" && globalThis.proxy ? globalThis.proxy : typeof window < "u" && window.proxy ? window.proxy : null;
|
|
7505
7515
|
}
|
|
@@ -7538,7 +7548,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
7538
7548
|
return ((W = o.config) == null ? void 0 : W.addressDebounceMs) ?? 1e3;
|
|
7539
7549
|
});
|
|
7540
7550
|
let X = null;
|
|
7541
|
-
const ee = M(!1), ve = O(() => v.value.trim().length > 0 ? T.value : k.value),
|
|
7551
|
+
const ee = M(!1), ve = O(() => v.value.trim().length > 0 ? T.value : k.value), me = O(() => v.value.trim().length ? `Знайдено ${T.value.length}` : "Історія пошуку"), ye = O(() => v.value.trim().length ? "Нічого не знайдено" : "Історія порожня");
|
|
7542
7552
|
function xe() {
|
|
7543
7553
|
var W, te;
|
|
7544
7554
|
if (typeof window > "u") return [];
|
|
@@ -7612,8 +7622,8 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
7612
7622
|
const ne = performance.now();
|
|
7613
7623
|
function Le(Re) {
|
|
7614
7624
|
if (!W.getLayer(wn)) return;
|
|
7615
|
-
const Ge = (Re - ne) % 1200 / 1200, He = Math.sin(Ge * Math.PI),
|
|
7616
|
-
W.setPaintProperty(wn, "fill-opacity",
|
|
7625
|
+
const Ge = (Re - ne) % 1200 / 1200, He = Math.sin(Ge * Math.PI), ct = 0.2 + He * 0.3, vt = 1 + He * 1;
|
|
7626
|
+
W.setPaintProperty(wn, "fill-opacity", ct), W.setPaintProperty(Dn, "line-width", vt), S = requestAnimationFrame(Le);
|
|
7617
7627
|
}
|
|
7618
7628
|
S = requestAnimationFrame(Le);
|
|
7619
7629
|
}
|
|
@@ -7672,7 +7682,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
7672
7682
|
_e(a, () => {
|
|
7673
7683
|
v.value = "", C.value = !1, T.value = [], A.value = !1, H(), ee.value = !1, R(), z();
|
|
7674
7684
|
}), _e(P, (W) => {
|
|
7675
|
-
W ?
|
|
7685
|
+
W ? it(() => {
|
|
7676
7686
|
V();
|
|
7677
7687
|
}) : U.display = "none";
|
|
7678
7688
|
}), _e(v, (W) => {
|
|
@@ -7685,13 +7695,13 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
7685
7695
|
return;
|
|
7686
7696
|
}
|
|
7687
7697
|
H(), A.value = !0, X = window.setTimeout(() => {
|
|
7688
|
-
|
|
7698
|
+
pt(W).catch((te) => {
|
|
7689
7699
|
const ne = (te == null ? void 0 : te.message) || "Помилка пошуку адреси";
|
|
7690
|
-
|
|
7700
|
+
ft({ type: "error", title: "Пошук адреси", message: ne });
|
|
7691
7701
|
});
|
|
7692
7702
|
}, j.value);
|
|
7693
7703
|
});
|
|
7694
|
-
function
|
|
7704
|
+
function se(W) {
|
|
7695
7705
|
var Le;
|
|
7696
7706
|
const te = [];
|
|
7697
7707
|
u.value && te.push(u.value), W instanceof HTMLElement && te.push(W);
|
|
@@ -7703,10 +7713,10 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
7703
7713
|
});
|
|
7704
7714
|
}
|
|
7705
7715
|
function N(W) {
|
|
7706
|
-
C.value &&
|
|
7716
|
+
C.value && se(W.target), C.value = !C.value;
|
|
7707
7717
|
}
|
|
7708
7718
|
function K(W, te) {
|
|
7709
|
-
|
|
7719
|
+
se(te == null ? void 0 : te.target), a.value = W;
|
|
7710
7720
|
}
|
|
7711
7721
|
function fe() {
|
|
7712
7722
|
v.value = "", T.value = [], A.value = !1, ee.value = !1, R(), z();
|
|
@@ -7715,7 +7725,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
7715
7725
|
const te = W.target;
|
|
7716
7726
|
if (C.value) {
|
|
7717
7727
|
const ne = f.value;
|
|
7718
|
-
ne && !ne.contains(te) && (
|
|
7728
|
+
ne && !ne.contains(te) && (se(te), C.value = !1);
|
|
7719
7729
|
}
|
|
7720
7730
|
if (P.value) {
|
|
7721
7731
|
const ne = D.value, Le = L.value;
|
|
@@ -7724,7 +7734,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
7724
7734
|
}
|
|
7725
7735
|
Qe(() => {
|
|
7726
7736
|
k.value = xe(), window.addEventListener("click", $e, !0), window.addEventListener("scroll", Z, !0), window.addEventListener("resize", Z);
|
|
7727
|
-
}),
|
|
7737
|
+
}), Je(() => {
|
|
7728
7738
|
window.removeEventListener("click", $e, !0), window.removeEventListener("scroll", Z, !0), window.removeEventListener("resize", Z), H(), R(), z();
|
|
7729
7739
|
});
|
|
7730
7740
|
function $(W) {
|
|
@@ -7750,11 +7760,11 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
7750
7760
|
const ne = te.split(/\s+/).filter(Boolean);
|
|
7751
7761
|
if (ne.length < 2) return null;
|
|
7752
7762
|
const Le = ne.slice(0, 2).map(Number);
|
|
7753
|
-
if (!Le.every((
|
|
7763
|
+
if (!Le.every((mt) => Number.isFinite(mt))) return null;
|
|
7754
7764
|
let [Re, Ve] = Le, Ge = Re, He = Ve;
|
|
7755
|
-
const
|
|
7756
|
-
if (!
|
|
7757
|
-
if (
|
|
7765
|
+
const ct = (mt) => Math.abs(mt) <= 90, vt = (mt) => Math.abs(mt) <= 180;
|
|
7766
|
+
if (!ct(Ge) || !vt(He))
|
|
7767
|
+
if (ct(He) && vt(Ge))
|
|
7758
7768
|
Ge = Ve, He = Re;
|
|
7759
7769
|
else
|
|
7760
7770
|
return null;
|
|
@@ -7771,7 +7781,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
7771
7781
|
};
|
|
7772
7782
|
});
|
|
7773
7783
|
}
|
|
7774
|
-
function
|
|
7784
|
+
function le(W) {
|
|
7775
7785
|
const te = (W == null ? void 0 : W.result) || (W == null ? void 0 : W.data) || W;
|
|
7776
7786
|
if (!te) return [];
|
|
7777
7787
|
const ne = te.geom_centroid;
|
|
@@ -7789,11 +7799,11 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
7789
7799
|
}
|
|
7790
7800
|
function ce(W) {
|
|
7791
7801
|
return (Array.isArray(W == null ? void 0 : W.features) ? W.features : []).map((ne, Le) => {
|
|
7792
|
-
var
|
|
7793
|
-
const Re = (
|
|
7802
|
+
var mt, Lt, Jt;
|
|
7803
|
+
const Re = (mt = ne == null ? void 0 : ne.geometry) == null ? void 0 : mt.coordinates, Ve = Number(Re == null ? void 0 : Re[0]), Ge = Number(Re == null ? void 0 : Re[1]);
|
|
7794
7804
|
if (!Number.isFinite(Ge) || !Number.isFinite(Ve)) return null;
|
|
7795
|
-
const He = (ne == null ? void 0 : ne.properties) || {},
|
|
7796
|
-
return { id: String(((Jt = He == null ? void 0 : He.geocoding) == null ? void 0 : Jt.place_id) || (He == null ? void 0 : He.place_id) || Le), title:
|
|
7805
|
+
const He = (ne == null ? void 0 : ne.properties) || {}, ct = ((Lt = He == null ? void 0 : He.geocoding) == null ? void 0 : Lt.label) || (He == null ? void 0 : He.display_name) || (He == null ? void 0 : He.label) || "Адреса";
|
|
7806
|
+
return { id: String(((Jt = He == null ? void 0 : He.geocoding) == null ? void 0 : Jt.place_id) || (He == null ? void 0 : He.place_id) || Le), title: ct, lat: Ge, lng: Ve };
|
|
7797
7807
|
}).filter((ne) => !!ne);
|
|
7798
7808
|
}
|
|
7799
7809
|
function Ie(W) {
|
|
@@ -7804,14 +7814,14 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
7804
7814
|
return Number.isFinite(te) ? te : null;
|
|
7805
7815
|
}
|
|
7806
7816
|
function De(W) {
|
|
7807
|
-
var Re, Ve, Ge, He,
|
|
7817
|
+
var Re, Ve, Ge, He, ct, vt;
|
|
7808
7818
|
const te = Se(W.lng) ?? Se(W.lon) ?? Se(W.longitude) ?? Se(W.x), ne = Se(W.lat) ?? Se(W.latitude) ?? Se(W.y);
|
|
7809
7819
|
if (te != null && ne != null)
|
|
7810
7820
|
return { lat: ne, lng: te };
|
|
7811
|
-
const Le = ((Re = W == null ? void 0 : W.geometry) == null ? void 0 : Re.coordinates) ?? ((Ve = W == null ? void 0 : W.geom_centroid) == null ? void 0 : Ve.coordinates) ?? ((Ge = W == null ? void 0 : W.centroid) == null ? void 0 : Ge.coordinates) ?? ((
|
|
7821
|
+
const Le = ((Re = W == null ? void 0 : W.geometry) == null ? void 0 : Re.coordinates) ?? ((Ve = W == null ? void 0 : W.geom_centroid) == null ? void 0 : Ve.coordinates) ?? ((Ge = W == null ? void 0 : W.centroid) == null ? void 0 : Ge.coordinates) ?? ((ct = (He = W == null ? void 0 : W.geojson) == null ? void 0 : He.geometry) == null ? void 0 : ct.coordinates) ?? ((vt = W == null ? void 0 : W.geom) == null ? void 0 : vt.coordinates);
|
|
7812
7822
|
if (Array.isArray(Le) && Le.length >= 2) {
|
|
7813
|
-
const
|
|
7814
|
-
if (
|
|
7823
|
+
const mt = Se(Le[0]), Lt = Se(Le[1]);
|
|
7824
|
+
if (mt != null && Lt != null) return { lat: Lt, lng: mt };
|
|
7815
7825
|
}
|
|
7816
7826
|
return null;
|
|
7817
7827
|
}
|
|
@@ -7843,7 +7853,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
7843
7853
|
const Le = await ne.json();
|
|
7844
7854
|
return Oe(Le);
|
|
7845
7855
|
}
|
|
7846
|
-
async function
|
|
7856
|
+
async function ht(W) {
|
|
7847
7857
|
const te = new URL(lf);
|
|
7848
7858
|
te.searchParams.set("format", "geojson"), te.searchParams.set("q", W), te.searchParams.set("addressdetails", "1"), te.searchParams.set("bounded", "1");
|
|
7849
7859
|
const ne = m();
|
|
@@ -7853,23 +7863,23 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
7853
7863
|
const Re = await Le.json();
|
|
7854
7864
|
return ce(Re);
|
|
7855
7865
|
}
|
|
7856
|
-
async function
|
|
7866
|
+
async function pt(W) {
|
|
7857
7867
|
if (T.value = [], H(), a.value === "address") {
|
|
7858
7868
|
if (!p()) {
|
|
7859
|
-
|
|
7869
|
+
ft({ type: "warning", title: "Пошук адреси", message: "Не налаштовано addressSuggest" });
|
|
7860
7870
|
return;
|
|
7861
7871
|
}
|
|
7862
7872
|
const Le = await et(W);
|
|
7863
7873
|
if (!Le.length) {
|
|
7864
|
-
|
|
7874
|
+
ft({ type: "warning", title: "Пошук адреси", message: "Не знайдено результатів" });
|
|
7865
7875
|
return;
|
|
7866
7876
|
}
|
|
7867
7877
|
T.value = Le;
|
|
7868
7878
|
return;
|
|
7869
7879
|
}
|
|
7870
|
-
const te = await
|
|
7880
|
+
const te = await ht(W);
|
|
7871
7881
|
if (!te.length) {
|
|
7872
|
-
|
|
7882
|
+
ft({ type: "warning", title: "Пошук адреси", message: "Не знайдено результатів" });
|
|
7873
7883
|
return;
|
|
7874
7884
|
}
|
|
7875
7885
|
T.value = te;
|
|
@@ -7879,10 +7889,10 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
7879
7889
|
At(W), ie(W);
|
|
7880
7890
|
return;
|
|
7881
7891
|
}
|
|
7882
|
-
|
|
7892
|
+
ft({ type: "warning", title: "Пошук адреси", message: "Геометрія для обраної адреси відсутня" });
|
|
7883
7893
|
}
|
|
7884
7894
|
function jt() {
|
|
7885
|
-
a.value !== "address" && a.value !== "nominatim" || v.value.trim().length || k.value.length && (A.value = !0,
|
|
7895
|
+
a.value !== "address" && a.value !== "nominatim" || v.value.trim().length || k.value.length && (A.value = !0, it(() => {
|
|
7886
7896
|
V();
|
|
7887
7897
|
}));
|
|
7888
7898
|
}
|
|
@@ -7897,13 +7907,13 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
7897
7907
|
const te = ((ne = o.config) == null ? void 0 : ne.zoom) ?? 17;
|
|
7898
7908
|
(Le = r.flyTo) == null || Le.call(r, { center: [W.lng, W.lat], zoom: te }), he(W, W.geom), ee.value = !0;
|
|
7899
7909
|
}
|
|
7900
|
-
async function
|
|
7910
|
+
async function yt() {
|
|
7901
7911
|
const W = v.value.trim();
|
|
7902
7912
|
if (W) {
|
|
7903
7913
|
if (a.value === "xy") {
|
|
7904
7914
|
const te = ae(W);
|
|
7905
7915
|
if (!te) {
|
|
7906
|
-
|
|
7916
|
+
ft({ type: "warning", title: "Пошук координат", message: "Не знайдено або невірний формат координат" });
|
|
7907
7917
|
return;
|
|
7908
7918
|
}
|
|
7909
7919
|
At(te);
|
|
@@ -7911,10 +7921,10 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
7911
7921
|
}
|
|
7912
7922
|
if (a.value === "address" || a.value === "nominatim") {
|
|
7913
7923
|
try {
|
|
7914
|
-
await
|
|
7924
|
+
await pt(W);
|
|
7915
7925
|
} catch (te) {
|
|
7916
7926
|
const ne = (te == null ? void 0 : te.message) || "Помилка пошуку адреси";
|
|
7917
|
-
|
|
7927
|
+
ft({ type: "error", title: "Пошук адреси", message: ne });
|
|
7918
7928
|
}
|
|
7919
7929
|
return;
|
|
7920
7930
|
}
|
|
@@ -7924,23 +7934,23 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
7924
7934
|
te.searchParams.set("searchtext", W);
|
|
7925
7935
|
else {
|
|
7926
7936
|
if (!Wt(W)) {
|
|
7927
|
-
|
|
7937
|
+
ft({ type: "warning", title: "Пошук кадастру", message: "Кадастровий номер має формат ХХХХХХХХХХ:ХХ:ХХХ:ХХХХ" });
|
|
7928
7938
|
return;
|
|
7929
7939
|
}
|
|
7930
7940
|
te.searchParams.set("cadnum", W);
|
|
7931
7941
|
}
|
|
7932
7942
|
const ne = await fetch(te.toString());
|
|
7933
7943
|
if (!ne.ok) throw new Error(`HTTP ${ne.status}`);
|
|
7934
|
-
const Le = await ne.json(), Re = a.value === "here" ? Q(Le) :
|
|
7944
|
+
const Le = await ne.json(), Re = a.value === "here" ? Q(Le) : le(Le);
|
|
7935
7945
|
if (!Re.length)
|
|
7936
|
-
|
|
7946
|
+
ft({ type: "warning", title: "Пошук", message: "Не знайдено результатів" });
|
|
7937
7947
|
else {
|
|
7938
7948
|
const Ve = Re[0];
|
|
7939
7949
|
At(Ve);
|
|
7940
7950
|
}
|
|
7941
7951
|
} catch (te) {
|
|
7942
7952
|
const ne = (te == null ? void 0 : te.message) || "Помилка пошуку";
|
|
7943
|
-
|
|
7953
|
+
ft({ type: "error", title: "Пошук", message: ne });
|
|
7944
7954
|
}
|
|
7945
7955
|
}
|
|
7946
7956
|
}
|
|
@@ -7951,7 +7961,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
7951
7961
|
}, [
|
|
7952
7962
|
n("form", {
|
|
7953
7963
|
class: "flex gap-2",
|
|
7954
|
-
onSubmit: We(
|
|
7964
|
+
onSubmit: We(yt, ["prevent"])
|
|
7955
7965
|
}, [
|
|
7956
7966
|
l.value.length > 1 ? (s(), h("div", {
|
|
7957
7967
|
key: 0,
|
|
@@ -8023,7 +8033,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
8023
8033
|
onFocus: jt
|
|
8024
8034
|
}, null, 42, Yd)), [
|
|
8025
8035
|
[
|
|
8026
|
-
|
|
8036
|
+
gt,
|
|
8027
8037
|
v.value,
|
|
8028
8038
|
void 0,
|
|
8029
8039
|
{ trim: !0 }
|
|
@@ -8081,10 +8091,10 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
8081
8091
|
ref_key: "addressResultsRef",
|
|
8082
8092
|
ref: D,
|
|
8083
8093
|
class: "vs-select__options mt-1 bg-white border border-gray-300 rounded-lg shadow-lg text-sm text-gray-900 z-50",
|
|
8084
|
-
style:
|
|
8094
|
+
style: at(U)
|
|
8085
8095
|
}, [
|
|
8086
8096
|
n("div", Jd, [
|
|
8087
|
-
n("span", Kd, J(
|
|
8097
|
+
n("span", Kd, J(me.value), 1),
|
|
8088
8098
|
n("button", {
|
|
8089
8099
|
type: "button",
|
|
8090
8100
|
class: "text-gray-400 hover:text-gray-600",
|
|
@@ -8110,7 +8120,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
8110
8120
|
}), hr = /* @__PURE__ */ nt(af, [["__scopeId", "data-v-c278e4f1"]]), uf = "https://watergis.github.io/mapbox-gl-export/mapbox-gl-export.css", cf = "https://watergis.github.io/mapbox-gl-export/mapbox-gl-export.js", df = /* @__PURE__ */ Ae({
|
|
8111
8121
|
__name: "MapPrintControl",
|
|
8112
8122
|
setup(e) {
|
|
8113
|
-
const { map: t, ready: o, addControl: r, removeControl: i } =
|
|
8123
|
+
const { map: t, ready: o, addControl: r, removeControl: i } = ut(), c = M(null), m = M(null), p = M(null), x = M(null);
|
|
8114
8124
|
let y = null;
|
|
8115
8125
|
function _() {
|
|
8116
8126
|
!window.mapboxgl && window.maplibregl && (window.mapboxgl = window.maplibregl);
|
|
@@ -8261,7 +8271,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
8261
8271
|
r ? r(P, "top-right") : A.addControl(P, "top-right"), y = (j) => {
|
|
8262
8272
|
j.key === "Escape" && w();
|
|
8263
8273
|
}, document.addEventListener("keyup", y);
|
|
8264
|
-
}),
|
|
8274
|
+
}), Je(() => {
|
|
8265
8275
|
w(), y && (document.removeEventListener("keyup", y), y = null);
|
|
8266
8276
|
const A = t.value;
|
|
8267
8277
|
if (m.value)
|
|
@@ -8316,7 +8326,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
8316
8326
|
targetAriaLabel: {}
|
|
8317
8327
|
},
|
|
8318
8328
|
setup(e) {
|
|
8319
|
-
const t = e, { map: o, ready: r } =
|
|
8329
|
+
const t = e, { map: o, ready: r } = ut(), i = M(null), c = M(null), m = M(null), p = M(null), x = Wo(), y = O(() => {
|
|
8320
8330
|
var w;
|
|
8321
8331
|
return ((w = x.value) == null ? void 0 : w.map) ?? null;
|
|
8322
8332
|
});
|
|
@@ -8449,7 +8459,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
8449
8459
|
}), xf = /* @__PURE__ */ nt(bf, [["__scopeId", "data-v-03fa94f6"]]), wf = { class: "map-navigation-control" }, _f = ["disabled"], kf = ["disabled"], $f = ["disabled"], Cf = /* @__PURE__ */ Ae({
|
|
8450
8460
|
__name: "MapNavigationControl",
|
|
8451
8461
|
setup(e) {
|
|
8452
|
-
const { map: t, ready: o } =
|
|
8462
|
+
const { map: t, ready: o } = ut(), r = M(!1), i = M(0), c = M(0), m = O(() => ({
|
|
8453
8463
|
transform: `scale(${(1 + c.value / 70).toFixed(5)}) rotateZ(0deg) rotateX(${c.value}deg) rotateZ(${i.value}deg)`
|
|
8454
8464
|
}));
|
|
8455
8465
|
function p() {
|
|
@@ -8462,7 +8472,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
8462
8472
|
await (o == null ? void 0 : o());
|
|
8463
8473
|
const l = t.value;
|
|
8464
8474
|
r.value = !!l, p(), (g = l == null ? void 0 : l.on) == null || g.call(l, "rotate", p), (a = l == null ? void 0 : l.on) == null || a.call(l, "pitch", p), (v = l == null ? void 0 : l.on) == null || v.call(l, "load", p);
|
|
8465
|
-
}),
|
|
8475
|
+
}), Je(() => {
|
|
8466
8476
|
var g, a, v;
|
|
8467
8477
|
const l = t.value;
|
|
8468
8478
|
(g = l == null ? void 0 : l.off) == null || g.call(l, "rotate", p), (a = l == null ? void 0 : l.off) == null || a.call(l, "pitch", p), (v = l == null ? void 0 : l.off) == null || v.call(l, "load", p);
|
|
@@ -8530,7 +8540,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
8530
8540
|
class: "w-4 h-4",
|
|
8531
8541
|
"stroke-width": 2.25,
|
|
8532
8542
|
"aria-hidden": "true",
|
|
8533
|
-
style:
|
|
8543
|
+
style: at(m.value)
|
|
8534
8544
|
}, null, 8, ["style"])
|
|
8535
8545
|
], 8, $f)
|
|
8536
8546
|
]));
|
|
@@ -8659,14 +8669,14 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
8659
8669
|
}
|
|
8660
8670
|
}
|
|
8661
8671
|
function C() {
|
|
8662
|
-
p.value = !p.value, p.value &&
|
|
8672
|
+
p.value = !p.value, p.value && it(() => {
|
|
8663
8673
|
var k;
|
|
8664
8674
|
return (k = c.value) == null ? void 0 : k.resize();
|
|
8665
8675
|
});
|
|
8666
8676
|
}
|
|
8667
8677
|
function f() {
|
|
8668
|
-
var
|
|
8669
|
-
const k = (ye = (
|
|
8678
|
+
var me, ye;
|
|
8679
|
+
const k = (ye = (me = t.mapContext) == null ? void 0 : me.map) == null ? void 0 : ye.value;
|
|
8670
8680
|
if (!c.value || !k || !k.getBounds) return;
|
|
8671
8681
|
if (typeof c.value.isStyleLoaded == "function" && !c.value.isStyleLoaded()) {
|
|
8672
8682
|
c.value.once("styledata", () => {
|
|
@@ -8733,7 +8743,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
8733
8743
|
), _e(
|
|
8734
8744
|
y,
|
|
8735
8745
|
() => {
|
|
8736
|
-
c.value &&
|
|
8746
|
+
c.value && it(() => {
|
|
8737
8747
|
var k;
|
|
8738
8748
|
return (k = c.value) == null ? void 0 : k.resize();
|
|
8739
8749
|
});
|
|
@@ -8744,12 +8754,12 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
8744
8754
|
var P;
|
|
8745
8755
|
l == null || l(), l = null, c.value && (c.value.remove(), c.value = null);
|
|
8746
8756
|
const k = (P = t.options) == null ? void 0 : P.active;
|
|
8747
|
-
typeof k == "boolean" && (p.value = k),
|
|
8757
|
+
typeof k == "boolean" && (p.value = k), it(() => {
|
|
8748
8758
|
g(), w();
|
|
8749
8759
|
});
|
|
8750
8760
|
},
|
|
8751
8761
|
{ deep: !0 }
|
|
8752
|
-
),
|
|
8762
|
+
), Je(() => {
|
|
8753
8763
|
l == null || l(), l = null, c.value && (c.value.remove(), c.value = null);
|
|
8754
8764
|
}), (k, P) => (s(), h("div", {
|
|
8755
8765
|
class: Be(["minimap", { "minimap--open": p.value }])
|
|
@@ -8768,7 +8778,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
8768
8778
|
ref_key: "minimapRoot",
|
|
8769
8779
|
ref: i,
|
|
8770
8780
|
class: "mapboxgl-ctrl-minimap mapboxgl-ctrl mapboxgl-map",
|
|
8771
|
-
style:
|
|
8781
|
+
style: at(y.value),
|
|
8772
8782
|
id: "mapboxgl-minimap"
|
|
8773
8783
|
}, null, 4)
|
|
8774
8784
|
], 512), [
|
|
@@ -8791,7 +8801,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
8791
8801
|
},
|
|
8792
8802
|
emits: ["close"],
|
|
8793
8803
|
setup(e, { emit: t }) {
|
|
8794
|
-
const o = e, r = t, { map: i, ready: c } =
|
|
8804
|
+
const o = e, r = t, { map: i, ready: c } = ut(), m = M(null), p = M(null), x = M(null), y = M(!1), _ = M(null);
|
|
8795
8805
|
_.__layerStoreMode = "isolated";
|
|
8796
8806
|
const l = M(null), g = M(!1), a = M(!1), v = M(!1);
|
|
8797
8807
|
let C = null, f = null, u = null, w = !1, L = "";
|
|
@@ -8813,9 +8823,9 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
8813
8823
|
Z();
|
|
8814
8824
|
return;
|
|
8815
8825
|
}
|
|
8816
|
-
const
|
|
8817
|
-
if (
|
|
8818
|
-
|
|
8826
|
+
const se = Array.from(document.querySelectorAll("script")).find((fe) => fe.src === yr);
|
|
8827
|
+
if (se) {
|
|
8828
|
+
se.addEventListener("load", () => Z(), { once: !0 }), se.addEventListener("error", () => H(new Error("Failed to load map compare script")), { once: !0 });
|
|
8819
8829
|
return;
|
|
8820
8830
|
}
|
|
8821
8831
|
const N = document.createElement("script");
|
|
@@ -8827,8 +8837,8 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
8827
8837
|
function P() {
|
|
8828
8838
|
var U, V, Z;
|
|
8829
8839
|
C == null || C(), C = null, f == null || f(), f = null, u == null || u(), u = null, T.forEach((H) => {
|
|
8830
|
-
var
|
|
8831
|
-
return (
|
|
8840
|
+
var se;
|
|
8841
|
+
return (se = H == null ? void 0 : H.remove) == null ? void 0 : se.call(H);
|
|
8832
8842
|
}), T.clear(), a.value = !1, v.value = !1, L = "", (U = l.value) == null || U.remove(), l.value = null, (Z = (V = _.value) == null ? void 0 : V.remove) == null || Z.call(V), _.value = null, g.value = !1;
|
|
8833
8843
|
}
|
|
8834
8844
|
function j(U) {
|
|
@@ -8841,13 +8851,13 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
8841
8851
|
function X(U, V) {
|
|
8842
8852
|
var H;
|
|
8843
8853
|
if (!U || !V) return;
|
|
8844
|
-
(Array.isArray((H = U.listImages) == null ? void 0 : H.call(U)) ? U.listImages() : []).forEach((
|
|
8854
|
+
(Array.isArray((H = U.listImages) == null ? void 0 : H.call(U)) ? U.listImages() : []).forEach((se) => {
|
|
8845
8855
|
var K, fe, $e;
|
|
8846
|
-
if (!
|
|
8847
|
-
const N = (fe = U.getImage) == null ? void 0 : fe.call(U,
|
|
8856
|
+
if (!se || (K = V.hasImage) != null && K.call(V, se)) return;
|
|
8857
|
+
const N = (fe = U.getImage) == null ? void 0 : fe.call(U, se);
|
|
8848
8858
|
if (N)
|
|
8849
8859
|
try {
|
|
8850
|
-
($e = V.addImage) == null || $e.call(V,
|
|
8860
|
+
($e = V.addImage) == null || $e.call(V, se, N);
|
|
8851
8861
|
} catch {
|
|
8852
8862
|
}
|
|
8853
8863
|
});
|
|
@@ -8868,7 +8878,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
8868
8878
|
return U;
|
|
8869
8879
|
}
|
|
8870
8880
|
}
|
|
8871
|
-
function
|
|
8881
|
+
function me(U) {
|
|
8872
8882
|
if (!U) return null;
|
|
8873
8883
|
try {
|
|
8874
8884
|
if (typeof U.serialize == "function") {
|
|
@@ -8882,11 +8892,11 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
8882
8892
|
}
|
|
8883
8893
|
function ye(U, V) {
|
|
8884
8894
|
const Z = ee(U), H = (Z == null ? void 0 : Z.sources) || {};
|
|
8885
|
-
Object.entries(H).forEach(([
|
|
8895
|
+
Object.entries(H).forEach(([se, N]) => {
|
|
8886
8896
|
var $e, $;
|
|
8887
|
-
const K = ($e = U == null ? void 0 : U.getSource) == null ? void 0 : $e.call(U,
|
|
8897
|
+
const K = ($e = U == null ? void 0 : U.getSource) == null ? void 0 : $e.call(U, se), fe = ($ = V == null ? void 0 : V.getSource) == null ? void 0 : $.call(V, se);
|
|
8888
8898
|
if (!(!K || !fe) && (N == null ? void 0 : N.type) === "geojson" && typeof fe.setData == "function") {
|
|
8889
|
-
const q =
|
|
8899
|
+
const q = me(K);
|
|
8890
8900
|
q != null && fe.setData(ve(q));
|
|
8891
8901
|
}
|
|
8892
8902
|
});
|
|
@@ -8901,13 +8911,13 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
8901
8911
|
Object.entries(V).forEach(([Z, H]) => {
|
|
8902
8912
|
var K;
|
|
8903
8913
|
if (!xe(Z, H)) return;
|
|
8904
|
-
const
|
|
8914
|
+
const se = ve(H.opts) || {}, N = Ye(Z, void 0, U);
|
|
8905
8915
|
if (!N) {
|
|
8906
|
-
const fe = Ye(Z,
|
|
8916
|
+
const fe = Ye(Z, se, U);
|
|
8907
8917
|
T.set(Z, fe);
|
|
8908
8918
|
return;
|
|
8909
8919
|
}
|
|
8910
|
-
T.set(Z, N), j(N.opts) !== j(
|
|
8920
|
+
T.set(Z, N), j(N.opts) !== j(se) && ((K = N.refresh) == null || K.call(N, se));
|
|
8911
8921
|
});
|
|
8912
8922
|
}
|
|
8913
8923
|
function ie(U) {
|
|
@@ -8927,7 +8937,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
8927
8937
|
tiles: [V.url],
|
|
8928
8938
|
tileSize: 256
|
|
8929
8939
|
};
|
|
8930
|
-
const H = Z.layers.find((
|
|
8940
|
+
const H = Z.layers.find((se) => se.id === bt);
|
|
8931
8941
|
H ? (H.type = "raster", H.source = bt, H.layout || (H.layout = {}), H.layout.visibility = "visible") : Z.layers.unshift({
|
|
8932
8942
|
id: bt,
|
|
8933
8943
|
type: "raster",
|
|
@@ -8940,11 +8950,11 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
8940
8950
|
tiles: [V.overlayUrl],
|
|
8941
8951
|
tileSize: 256
|
|
8942
8952
|
};
|
|
8943
|
-
const H = Z.layers.find((
|
|
8953
|
+
const H = Z.layers.find((se) => se.id === xt);
|
|
8944
8954
|
if (H)
|
|
8945
8955
|
H.type = "raster", H.source = xt, H.layout || (H.layout = {}), H.layout.visibility = "visible";
|
|
8946
8956
|
else {
|
|
8947
|
-
const
|
|
8957
|
+
const se = Z.layers.findIndex((K) => K.id === bt), N = se >= 0 ? se + 1 : 0;
|
|
8948
8958
|
Z.layers.splice(N, 0, {
|
|
8949
8959
|
id: xt,
|
|
8950
8960
|
type: "raster",
|
|
@@ -8955,14 +8965,14 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
8955
8965
|
return Z;
|
|
8956
8966
|
}
|
|
8957
8967
|
function z(U) {
|
|
8958
|
-
var $e, $, q, ae, Q,
|
|
8968
|
+
var $e, $, q, ae, Q, le, ce, Ie, Se, De, Oe, Ze, et, ht, pt;
|
|
8959
8969
|
if (!_.value) return;
|
|
8960
|
-
const V = _.value, Z = ($e = V.getSource) == null ? void 0 : $e.call(V, bt), H = ($ = V.getSource) == null ? void 0 : $.call(V, xt),
|
|
8970
|
+
const V = _.value, Z = ($e = V.getSource) == null ? void 0 : $e.call(V, bt), H = ($ = V.getSource) == null ? void 0 : $.call(V, xt), se = !!((q = V.getLayer) != null && q.call(V, bt)), N = !!((ae = V.getLayer) != null && ae.call(V, xt)), K = ee(V), fe = (le = (Q = K == null ? void 0 : K.layers) == null ? void 0 : Q[0]) == null ? void 0 : le.id;
|
|
8961
8971
|
if (!(U != null && U.url)) {
|
|
8962
|
-
|
|
8972
|
+
se && ((ce = V.setLayoutProperty) == null || ce.call(V, bt, "visibility", "none")), N && ((Ie = V.setLayoutProperty) == null || Ie.call(V, xt, "visibility", "none"));
|
|
8963
8973
|
return;
|
|
8964
8974
|
}
|
|
8965
|
-
|
|
8975
|
+
se && ((Se = V.setLayoutProperty) == null || Se.call(V, bt, "visibility", "visible")), Z != null && Z.setTiles ? Z.setTiles([U.url]) : Z || ((De = V.addSource) == null || De.call(V, bt, {
|
|
8966
8976
|
type: "raster",
|
|
8967
8977
|
tiles: [U.url],
|
|
8968
8978
|
tileSize: 256
|
|
@@ -8974,11 +8984,11 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
8974
8984
|
type: "raster",
|
|
8975
8985
|
tiles: [U.overlayUrl],
|
|
8976
8986
|
tileSize: 256
|
|
8977
|
-
}), (
|
|
8987
|
+
}), (ht = V.addLayer) == null || ht.call(V, {
|
|
8978
8988
|
id: xt,
|
|
8979
8989
|
type: "raster",
|
|
8980
8990
|
source: xt
|
|
8981
|
-
}))) : N && ((
|
|
8991
|
+
}))) : N && ((pt = V.setLayoutProperty) == null || pt.call(V, xt, "visibility", "none")), (!Z || typeof Z.setTiles != "function") && V.setStyle(R(ee(V), U));
|
|
8982
8992
|
}
|
|
8983
8993
|
function E() {
|
|
8984
8994
|
if (!_.value || !g.value) return;
|
|
@@ -8988,8 +8998,8 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
8988
8998
|
async function S() {
|
|
8989
8999
|
const U = i.value, V = _.value;
|
|
8990
9000
|
if (!U || !V || !g.value) return;
|
|
8991
|
-
const Z = D.value.find((K) => K.id === x.value), H = ee(U),
|
|
8992
|
-
!N || N === L || (L = N, V.setStyle(
|
|
9001
|
+
const Z = D.value.find((K) => K.id === x.value), H = ee(U), se = R(H, Z), N = j(se);
|
|
9002
|
+
!N || N === L || (L = N, V.setStyle(se), X(U, V), ye(U, V), v.value = !1, await new Promise((K) => {
|
|
8993
9003
|
var fe, $e;
|
|
8994
9004
|
if ((fe = V.isStyleLoaded) != null && fe.call(V)) {
|
|
8995
9005
|
K();
|
|
@@ -9007,15 +9017,15 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
9007
9017
|
v.value && S();
|
|
9008
9018
|
}
|
|
9009
9019
|
async function he() {
|
|
9010
|
-
var $, q, ae, Q,
|
|
9011
|
-
if (!o.isCompareOpen || l.value || _.value || (await (c == null ? void 0 : c()), await
|
|
9020
|
+
var $, q, ae, Q, le, ce, Ie, Se;
|
|
9021
|
+
if (!o.isCompareOpen || l.value || _.value || (await (c == null ? void 0 : c()), await it(), !i.value || !m.value || !p.value)) return;
|
|
9012
9022
|
await k();
|
|
9013
|
-
const U = i.value, V = D.value.find((De) => De.id === x.value), Z = R({}, V), H = ($ = U.getCenter) == null ? void 0 : $.call(U),
|
|
9023
|
+
const U = i.value, V = D.value.find((De) => De.id === x.value), Z = R({}, V), H = ($ = U.getCenter) == null ? void 0 : $.call(U), se = (q = U.getZoom) == null ? void 0 : q.call(U), N = ((ae = U.getBearing) == null ? void 0 : ae.call(U)) ?? 0, K = ((Q = U.getPitch) == null ? void 0 : Q.call(U)) ?? 0;
|
|
9014
9024
|
_.value = new maplibregl.Map({
|
|
9015
9025
|
container: p.value,
|
|
9016
9026
|
style: Z,
|
|
9017
9027
|
center: H,
|
|
9018
|
-
zoom:
|
|
9028
|
+
zoom: se,
|
|
9019
9029
|
bearing: N,
|
|
9020
9030
|
pitch: K,
|
|
9021
9031
|
attributionControl: !1,
|
|
@@ -9034,7 +9044,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
9034
9044
|
g.value = !0, G(), De();
|
|
9035
9045
|
});
|
|
9036
9046
|
});
|
|
9037
|
-
const fe = (
|
|
9047
|
+
const fe = (le = window.maplibregl) == null ? void 0 : le.Compare;
|
|
9038
9048
|
if (!fe) {
|
|
9039
9049
|
P(), r("close");
|
|
9040
9050
|
return;
|
|
@@ -9064,10 +9074,10 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
9064
9074
|
), _e(
|
|
9065
9075
|
() => [o.isCompareOpen, D.value, o.selectedBasemapId],
|
|
9066
9076
|
([U, V, Z]) => {
|
|
9067
|
-
var
|
|
9077
|
+
var se;
|
|
9068
9078
|
if (!U || x.value && V.some((N) => N.id === x.value)) return;
|
|
9069
9079
|
const H = V.find((N) => N.id !== Z);
|
|
9070
|
-
x.value = (H == null ? void 0 : H.id) || ((
|
|
9080
|
+
x.value = (H == null ? void 0 : H.id) || ((se = V[0]) == null ? void 0 : se.id) || null;
|
|
9071
9081
|
},
|
|
9072
9082
|
{ immediate: !0, deep: !0 }
|
|
9073
9083
|
), _e(
|
|
@@ -9084,7 +9094,7 @@ const jc = { class: "catalog-tab__search relative mt-[10px]" }, Fc = {
|
|
|
9084
9094
|
});
|
|
9085
9095
|
}
|
|
9086
9096
|
}
|
|
9087
|
-
),
|
|
9097
|
+
), Je(() => {
|
|
9088
9098
|
P();
|
|
9089
9099
|
}), (U, V) => e.isCompareOpen ? (s(), h("div", Ff, [
|
|
9090
9100
|
n("div", zf, [
|
|
@@ -9397,7 +9407,7 @@ const sp = { class: "bg-white/95 backdrop-blur-xl rounded-2xl shadow-[0_20px_50p
|
|
|
9397
9407
|
function ve(Q) {
|
|
9398
9408
|
return Q ? `${Q.coords.lng.toFixed(6)}, ${Q.coords.lat.toFixed(6)}` : "";
|
|
9399
9409
|
}
|
|
9400
|
-
function
|
|
9410
|
+
function me() {
|
|
9401
9411
|
m.value = ve(c.value[0]), p.value = ve(c.value[1]);
|
|
9402
9412
|
}
|
|
9403
9413
|
function ye() {
|
|
@@ -9429,24 +9439,24 @@ const sp = { class: "bg-white/95 backdrop-blur-xl rounded-2xl shadow-[0_20px_50p
|
|
|
9429
9439
|
return k += 1, Q;
|
|
9430
9440
|
}
|
|
9431
9441
|
function E(Q) {
|
|
9432
|
-
const
|
|
9433
|
-
if (!
|
|
9434
|
-
const ce = Number(
|
|
9442
|
+
const le = Q.replace(/[^\d.,+\-\s]/g, " ").match(/-?\d+(?:\.\d+)?/g);
|
|
9443
|
+
if (!le || le.length < 2) return null;
|
|
9444
|
+
const ce = Number(le[0]), Ie = Number(le[1]);
|
|
9435
9445
|
return !Number.isFinite(ce) || !Number.isFinite(Ie) || Math.abs(Ie) > 90 || Math.abs(ce) > 180 ? null : { lat: Ie, lng: ce };
|
|
9436
9446
|
}
|
|
9437
|
-
function S(Q,
|
|
9447
|
+
function S(Q, le) {
|
|
9438
9448
|
var Ie, Se;
|
|
9439
9449
|
const ce = c.value.slice(0, 2);
|
|
9440
9450
|
Q === 0 ? ce[0] = {
|
|
9441
9451
|
id: ((Ie = ce[0]) == null ? void 0 : Ie.id) ?? z(),
|
|
9442
|
-
coords: { lat:
|
|
9452
|
+
coords: { lat: le.lat, lng: le.lng }
|
|
9443
9453
|
} : ce[0] ? ce[1] = {
|
|
9444
9454
|
id: ((Se = ce[1]) == null ? void 0 : Se.id) ?? z(),
|
|
9445
|
-
coords: { lat:
|
|
9455
|
+
coords: { lat: le.lat, lng: le.lng }
|
|
9446
9456
|
} : ce[0] = {
|
|
9447
9457
|
id: z(),
|
|
9448
|
-
coords: { lat:
|
|
9449
|
-
}, c.value = ce.filter(Boolean).slice(0, 2),
|
|
9458
|
+
coords: { lat: le.lat, lng: le.lng }
|
|
9459
|
+
}, c.value = ce.filter(Boolean).slice(0, 2), me(), xe(), R();
|
|
9450
9460
|
}
|
|
9451
9461
|
function B(Q) {
|
|
9452
9462
|
c.value.length === 0 ? c.value = [{ id: z(), coords: { lat: Q.lat, lng: Q.lng } }] : c.value.length === 1 ? c.value = [
|
|
@@ -9455,18 +9465,18 @@ const sp = { class: "bg-white/95 backdrop-blur-xl rounded-2xl shadow-[0_20px_50p
|
|
|
9455
9465
|
] : c.value = [
|
|
9456
9466
|
c.value[0],
|
|
9457
9467
|
{ id: c.value[1].id, coords: { lat: Q.lat, lng: Q.lng } }
|
|
9458
|
-
],
|
|
9468
|
+
], me(), xe(), R();
|
|
9459
9469
|
}
|
|
9460
9470
|
function G(Q) {
|
|
9461
|
-
Q === 0 ? c.value = c.value.length > 1 ? [c.value[1]] : [] : c.value = c.value.slice(0, 1),
|
|
9471
|
+
Q === 0 ? c.value = c.value.length > 1 ? [c.value[1]] : [] : c.value = c.value.slice(0, 1), me(), xe(), R();
|
|
9462
9472
|
}
|
|
9463
9473
|
function he() {
|
|
9464
|
-
c.value.length < 2 || (c.value = [c.value[1], c.value[0]],
|
|
9474
|
+
c.value.length < 2 || (c.value = [c.value[1], c.value[0]], me(), xe(), R());
|
|
9465
9475
|
}
|
|
9466
9476
|
function U(Q) {
|
|
9467
|
-
const
|
|
9477
|
+
const le = Q === 0 ? m.value : p.value, ce = E(le);
|
|
9468
9478
|
if (!ce) {
|
|
9469
|
-
|
|
9479
|
+
me();
|
|
9470
9480
|
return;
|
|
9471
9481
|
}
|
|
9472
9482
|
S(Q, ce);
|
|
@@ -9478,9 +9488,9 @@ const sp = { class: "bg-white/95 backdrop-blur-xl rounded-2xl shadow-[0_20px_50p
|
|
|
9478
9488
|
}
|
|
9479
9489
|
const Q = ++P;
|
|
9480
9490
|
y.value = !0, _.value = "";
|
|
9481
|
-
const
|
|
9491
|
+
const le = ye();
|
|
9482
9492
|
try {
|
|
9483
|
-
const ce = await rp(
|
|
9493
|
+
const ce = await rp(le, { mode: x.value });
|
|
9484
9494
|
if (Q !== P) return;
|
|
9485
9495
|
u.value = ce.geometry, l.value = ce.distanceText, g.value = ce.durationText, a.value = ce.durationSeconds, v.value = ce.startInstruction, C.value = ce.instructions, f.value = ce.note, y.value = !1, w.value = null, ue(null), ie(ce);
|
|
9486
9496
|
} catch (ce) {
|
|
@@ -9489,21 +9499,21 @@ const sp = { class: "bg-white/95 backdrop-blur-xl rounded-2xl shadow-[0_20px_50p
|
|
|
9489
9499
|
}
|
|
9490
9500
|
}
|
|
9491
9501
|
const Z = (Q) => {
|
|
9492
|
-
const
|
|
9502
|
+
const le = (Q ?? []).map((ce) => ({
|
|
9493
9503
|
id: ce.id ?? z(),
|
|
9494
9504
|
coords: { ...ce.coords }
|
|
9495
9505
|
}));
|
|
9496
|
-
c.value =
|
|
9506
|
+
c.value = le.slice(0, 2), k = c.value.length ? Math.max(...c.value.map((ce) => ce.id)) + 1 : 1, me(), xe(), R();
|
|
9497
9507
|
};
|
|
9498
9508
|
function H(Q) {
|
|
9499
9509
|
var Ie;
|
|
9500
|
-
const
|
|
9501
|
-
if (!
|
|
9510
|
+
const le = a.value;
|
|
9511
|
+
if (!le || !Number.isFinite(le))
|
|
9502
9512
|
return Q === "car" && g.value || "—";
|
|
9503
9513
|
const ce = ((Ie = i.find((Se) => Se.id === Q)) == null ? void 0 : Ie.factor) ?? 1;
|
|
9504
|
-
return $e(
|
|
9514
|
+
return $e(le * ce);
|
|
9505
9515
|
}
|
|
9506
|
-
function
|
|
9516
|
+
function se(Q) {
|
|
9507
9517
|
switch (Q) {
|
|
9508
9518
|
case "depart":
|
|
9509
9519
|
return Ss;
|
|
@@ -9525,16 +9535,16 @@ const sp = { class: "bg-white/95 backdrop-blur-xl rounded-2xl shadow-[0_20px_50p
|
|
|
9525
9535
|
return Q === "start" ? { icon: "bg-emerald-50 text-emerald-600" } : Q === "end" ? { icon: "bg-red-50 text-red-500" } : { icon: "bg-gray-100 text-gray-500" };
|
|
9526
9536
|
}
|
|
9527
9537
|
function K(Q) {
|
|
9528
|
-
var
|
|
9529
|
-
w.value = Q, ue(((
|
|
9538
|
+
var le;
|
|
9539
|
+
w.value = Q, ue(((le = C.value[Q - 1]) == null ? void 0 : le.geometry) ?? null);
|
|
9530
9540
|
}
|
|
9531
9541
|
function fe() {
|
|
9532
9542
|
w.value = null, ue(null);
|
|
9533
9543
|
}
|
|
9534
9544
|
function $e(Q) {
|
|
9535
|
-
const
|
|
9536
|
-
if (
|
|
9537
|
-
const ce = Math.floor(
|
|
9545
|
+
const le = Math.max(0, Math.round(Q));
|
|
9546
|
+
if (le < 60) return `${le} с`;
|
|
9547
|
+
const ce = Math.floor(le / 60);
|
|
9538
9548
|
if (ce < 60) return `${ce} хв`;
|
|
9539
9549
|
const Ie = Math.floor(ce / 60), Se = ce % 60;
|
|
9540
9550
|
return Se > 0 ? `${Ie} год ${Se} хв` : `${Ie} год`;
|
|
@@ -9543,26 +9553,26 @@ const sp = { class: "bg-white/95 backdrop-blur-xl rounded-2xl shadow-[0_20px_50p
|
|
|
9543
9553
|
q(), r("close");
|
|
9544
9554
|
}
|
|
9545
9555
|
function q() {
|
|
9546
|
-
c.value = [], k = 1, P += 1,
|
|
9556
|
+
c.value = [], k = 1, P += 1, me(), R(), xe();
|
|
9547
9557
|
}
|
|
9548
9558
|
async function ae() {
|
|
9549
|
-
await
|
|
9550
|
-
const Q = L.value,
|
|
9551
|
-
if (!Q || !
|
|
9552
|
-
const ce =
|
|
9559
|
+
await it();
|
|
9560
|
+
const Q = L.value, le = Q == null ? void 0 : Q.closest(".map-view-root");
|
|
9561
|
+
if (!Q || !le) return;
|
|
9562
|
+
const ce = le.getBoundingClientRect(), Ie = Q.getBoundingClientRect();
|
|
9553
9563
|
T.value = Math.max(0, Math.floor(ce.bottom - Ie.top - 8));
|
|
9554
9564
|
}
|
|
9555
9565
|
return Qe(() => {
|
|
9556
|
-
var
|
|
9557
|
-
|
|
9558
|
-
const Q = (
|
|
9566
|
+
var le;
|
|
9567
|
+
me(), xe(), ae();
|
|
9568
|
+
const Q = (le = L.value) == null ? void 0 : le.closest(".map-view-root");
|
|
9559
9569
|
Q && typeof ResizeObserver < "u" && (D = new ResizeObserver(ae), D.observe(Q));
|
|
9560
|
-
}),
|
|
9570
|
+
}), Je(() => {
|
|
9561
9571
|
D == null || D.disconnect(), D = null;
|
|
9562
9572
|
}), _e(
|
|
9563
9573
|
() => c.value,
|
|
9564
9574
|
() => {
|
|
9565
|
-
|
|
9575
|
+
me(), c.value.length < 2 && (P += 1);
|
|
9566
9576
|
},
|
|
9567
9577
|
{ deep: !0 }
|
|
9568
9578
|
), _e(
|
|
@@ -9574,11 +9584,11 @@ const sp = { class: "bg-white/95 backdrop-blur-xl rounded-2xl shadow-[0_20px_50p
|
|
|
9574
9584
|
addPoint: B,
|
|
9575
9585
|
setPoints: Z,
|
|
9576
9586
|
clearPoints: q
|
|
9577
|
-
}), (Q,
|
|
9587
|
+
}), (Q, le) => (s(), h("div", {
|
|
9578
9588
|
ref_key: "panelWrapRef",
|
|
9579
9589
|
ref: L,
|
|
9580
9590
|
class: "route-panel-wrap absolute top-0 right-full mr-2 z-20 flex h-auto max-h-none min-h-0 flex-col gap-2 overflow-hidden pointer-events-none animate-slide-up",
|
|
9581
|
-
style:
|
|
9591
|
+
style: at(A.value)
|
|
9582
9592
|
}, [
|
|
9583
9593
|
n("div", sp, [
|
|
9584
9594
|
n("div", lp, [
|
|
@@ -9591,7 +9601,7 @@ const sp = { class: "bg-white/95 backdrop-blur-xl rounded-2xl shadow-[0_20px_50p
|
|
|
9591
9601
|
class: "text-white"
|
|
9592
9602
|
})
|
|
9593
9603
|
]),
|
|
9594
|
-
|
|
9604
|
+
le[8] || (le[8] = n("div", { class: "flex-1 min-w-0" }, [
|
|
9595
9605
|
n("h2", { class: "text-sm font-bold text-gray-900 leading-none" }, "Маршрутизатор"),
|
|
9596
9606
|
n("p", { class: "text-xs text-gray-400 mt-0.5" }, "Введіть координати")
|
|
9597
9607
|
], -1))
|
|
@@ -9620,32 +9630,32 @@ const sp = { class: "bg-white/95 backdrop-blur-xl rounded-2xl shadow-[0_20px_50p
|
|
|
9620
9630
|
]),
|
|
9621
9631
|
n("div", pp, [
|
|
9622
9632
|
n("div", vp, [
|
|
9623
|
-
|
|
9633
|
+
le[9] || (le[9] = n("div", { class: "absolute left-3 top-1/2 -translate-y-1/2 w-2.5 h-2.5 rounded-full bg-emerald-500 ring-2 ring-white z-10" }, null, -1)),
|
|
9624
9634
|
Ke(n("input", {
|
|
9625
|
-
"onUpdate:modelValue":
|
|
9635
|
+
"onUpdate:modelValue": le[0] || (le[0] = (ce) => m.value = ce),
|
|
9626
9636
|
type: "text",
|
|
9627
9637
|
placeholder: "30.5234, 50.4501",
|
|
9628
9638
|
class: "w-full px-3 py-2 text-sm pl-9 pr-8 rounded-xl border border-gray-200 bg-white text-gray-800 placeholder-gray-400 focus:border-blue-500 focus:outline-none transition-all disabled:opacity-50",
|
|
9629
|
-
onBlur:
|
|
9630
|
-
onKeyup:
|
|
9639
|
+
onBlur: le[1] || (le[1] = (ce) => U(0)),
|
|
9640
|
+
onKeyup: le[2] || (le[2] = Qn(We((ce) => U(0), ["prevent"]), ["enter"]))
|
|
9631
9641
|
}, null, 544), [
|
|
9632
|
-
[
|
|
9642
|
+
[gt, m.value]
|
|
9633
9643
|
]),
|
|
9634
9644
|
n("button", {
|
|
9635
9645
|
type: "button",
|
|
9636
9646
|
class: "absolute right-2 top-1/2 -translate-y-1/2 w-5 h-5 rounded-full flex items-center justify-center transition-all hover:scale-110 text-gray-400 hover:text-gray-600 hover:bg-gray-100",
|
|
9637
9647
|
"aria-label": "Очистити точку A",
|
|
9638
|
-
onClick:
|
|
9648
|
+
onClick: le[3] || (le[3] = (ce) => G(0))
|
|
9639
9649
|
}, [
|
|
9640
9650
|
be(pe($t), {
|
|
9641
9651
|
size: 11,
|
|
9642
9652
|
"stroke-width": 2
|
|
9643
9653
|
})
|
|
9644
9654
|
]),
|
|
9645
|
-
|
|
9655
|
+
le[10] || (le[10] = n("span", { class: "absolute left-8 -top-2 px-1 text-xs font-semibold text-gray-500 bg-white" }, "A", -1))
|
|
9646
9656
|
]),
|
|
9647
9657
|
n("div", gp, [
|
|
9648
|
-
|
|
9658
|
+
le[11] || (le[11] = n("div", { class: "absolute w-full h-px bg-gray-100" }, null, -1)),
|
|
9649
9659
|
n("button", {
|
|
9650
9660
|
type: "button",
|
|
9651
9661
|
class: "relative w-8 h-8 rounded-full border flex items-center justify-center transition-all disabled:opacity-40 hover:shadow-sm bg-white border-gray-200 text-gray-500 hover:text-blue-500 hover:border-blue-300",
|
|
@@ -9660,29 +9670,29 @@ const sp = { class: "bg-white/95 backdrop-blur-xl rounded-2xl shadow-[0_20px_50p
|
|
|
9660
9670
|
], 8, mp)
|
|
9661
9671
|
]),
|
|
9662
9672
|
n("div", hp, [
|
|
9663
|
-
|
|
9673
|
+
le[12] || (le[12] = n("div", { class: "absolute left-3 top-1/2 -translate-y-1/2 w-2.5 h-2.5 rounded-full bg-red-500 ring-2 ring-white z-10" }, null, -1)),
|
|
9664
9674
|
Ke(n("input", {
|
|
9665
|
-
"onUpdate:modelValue":
|
|
9675
|
+
"onUpdate:modelValue": le[4] || (le[4] = (ce) => p.value = ce),
|
|
9666
9676
|
type: "text",
|
|
9667
9677
|
placeholder: "30.4947, 50.4271",
|
|
9668
9678
|
class: "w-full px-3 py-2 text-sm pl-9 pr-8 rounded-xl border border-gray-200 bg-white text-gray-800 placeholder-gray-400 focus:border-blue-500 focus:outline-none transition-all disabled:opacity-50",
|
|
9669
|
-
onBlur:
|
|
9670
|
-
onKeyup:
|
|
9679
|
+
onBlur: le[5] || (le[5] = (ce) => U(1)),
|
|
9680
|
+
onKeyup: le[6] || (le[6] = Qn(We((ce) => U(1), ["prevent"]), ["enter"]))
|
|
9671
9681
|
}, null, 544), [
|
|
9672
|
-
[
|
|
9682
|
+
[gt, p.value]
|
|
9673
9683
|
]),
|
|
9674
9684
|
n("button", {
|
|
9675
9685
|
type: "button",
|
|
9676
9686
|
class: "absolute right-2 top-1/2 -translate-y-1/2 w-5 h-5 rounded-full flex items-center justify-center transition-all hover:scale-110 text-gray-400 hover:text-gray-600 hover:bg-gray-100",
|
|
9677
9687
|
"aria-label": "Очистити точку B",
|
|
9678
|
-
onClick:
|
|
9688
|
+
onClick: le[7] || (le[7] = (ce) => G(1))
|
|
9679
9689
|
}, [
|
|
9680
9690
|
be(pe($t), {
|
|
9681
9691
|
size: 11,
|
|
9682
9692
|
"stroke-width": 2
|
|
9683
9693
|
})
|
|
9684
9694
|
]),
|
|
9685
|
-
|
|
9695
|
+
le[13] || (le[13] = n("span", { class: "absolute left-8 -top-2 px-1 text-xs font-semibold text-gray-500 bg-white" }, "B", -1))
|
|
9686
9696
|
]),
|
|
9687
9697
|
n("div", yp, [
|
|
9688
9698
|
(s(), h(de, null, Te(i, (ce) => n("div", {
|
|
@@ -9731,13 +9741,13 @@ const sp = { class: "bg-white/95 backdrop-blur-xl rounded-2xl shadow-[0_20px_50p
|
|
|
9731
9741
|
size: 13,
|
|
9732
9742
|
"stroke-width": 2
|
|
9733
9743
|
}),
|
|
9734
|
-
|
|
9744
|
+
le[14] || (le[14] = Me(" Побудувати маршрут ", -1))
|
|
9735
9745
|
], 8, Lp)
|
|
9736
9746
|
])
|
|
9737
9747
|
]),
|
|
9738
9748
|
C.value.length ? (s(), h("div", Sp, [
|
|
9739
9749
|
n("div", Ep, [
|
|
9740
|
-
|
|
9750
|
+
le[15] || (le[15] = n("span", { class: "text-xs font-semibold text-gray-500 uppercase tracking-wide" }, "Покрокові інструкції", -1)),
|
|
9741
9751
|
n("span", Ap, J(ee.value) + " кроків", 1)
|
|
9742
9752
|
]),
|
|
9743
9753
|
n("div", Tp, [
|
|
@@ -9754,7 +9764,7 @@ const sp = { class: "bg-white/95 backdrop-blur-xl rounded-2xl shadow-[0_20px_50p
|
|
|
9754
9764
|
n("div", {
|
|
9755
9765
|
class: Be(["flex-shrink-0 w-7 h-7 rounded-lg flex items-center justify-center mt-0.5", N(ce.tone).icon])
|
|
9756
9766
|
}, [
|
|
9757
|
-
(s(), we(ln(
|
|
9767
|
+
(s(), we(ln(se(ce.icon)), {
|
|
9758
9768
|
size: 14,
|
|
9759
9769
|
"stroke-width": 2
|
|
9760
9770
|
}))
|
|
@@ -9771,7 +9781,7 @@ const sp = { class: "bg-white/95 backdrop-blur-xl rounded-2xl shadow-[0_20px_50p
|
|
|
9771
9781
|
])
|
|
9772
9782
|
])
|
|
9773
9783
|
])) : oe("", !0),
|
|
9774
|
-
|
|
9784
|
+
le[16] || (le[16] = n("div", { class: "bg-white/80 backdrop-blur-xl rounded-xl border border-white/60 px-3 py-2 flex-shrink-0 pointer-events-auto" }, [
|
|
9775
9785
|
n("p", { class: "text-[10px] text-gray-400 leading-relaxed text-center" }, [
|
|
9776
9786
|
n("kbd", { class: "px-1.5 py-0.5 rounded bg-gray-100 text-gray-500 text-[9px] font-mono" }, "ЛКМ"),
|
|
9777
9787
|
Me(" по карті заповнює точки маршруту ")
|
|
@@ -9977,7 +9987,7 @@ const sp = { class: "bg-white/95 backdrop-blur-xl rounded-2xl shadow-[0_20px_50p
|
|
|
9977
9987
|
} catch {
|
|
9978
9988
|
}
|
|
9979
9989
|
}
|
|
9980
|
-
const x = e, { map: y, ready: _ } =
|
|
9990
|
+
const x = e, { map: y, ready: _ } = ut();
|
|
9981
9991
|
function l() {
|
|
9982
9992
|
_().then(() => {
|
|
9983
9993
|
const g = y.value;
|
|
@@ -9994,7 +10004,7 @@ const sp = { class: "bg-white/95 backdrop-blur-xl rounded-2xl shadow-[0_20px_50p
|
|
|
9994
10004
|
() => [x.points, x.routeGeometry, x.hoverGeometry],
|
|
9995
10005
|
() => l(),
|
|
9996
10006
|
{ deep: !0, immediate: !0 }
|
|
9997
|
-
),
|
|
10007
|
+
), Je(() => {
|
|
9998
10008
|
_().then(() => p(y.value));
|
|
9999
10009
|
}), (g, a) => null;
|
|
10000
10010
|
}
|
|
@@ -10021,7 +10031,7 @@ const sp = { class: "bg-white/95 backdrop-blur-xl rounded-2xl shadow-[0_20px_50p
|
|
|
10021
10031
|
placeholder: "Широта (50.4501)"
|
|
10022
10032
|
}, null, 512), [
|
|
10023
10033
|
[
|
|
10024
|
-
|
|
10034
|
+
gt,
|
|
10025
10035
|
r.value,
|
|
10026
10036
|
void 0,
|
|
10027
10037
|
{ number: !0 }
|
|
@@ -10035,7 +10045,7 @@ const sp = { class: "bg-white/95 backdrop-blur-xl rounded-2xl shadow-[0_20px_50p
|
|
|
10035
10045
|
placeholder: "Довгота (30.5234)"
|
|
10036
10046
|
}, null, 512), [
|
|
10037
10047
|
[
|
|
10038
|
-
|
|
10048
|
+
gt,
|
|
10039
10049
|
i.value,
|
|
10040
10050
|
void 0,
|
|
10041
10051
|
{ number: !0 }
|
|
@@ -10163,7 +10173,7 @@ const Kp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
10163
10173
|
placeholder: "Широта"
|
|
10164
10174
|
}, null, 512), [
|
|
10165
10175
|
[
|
|
10166
|
-
|
|
10176
|
+
gt,
|
|
10167
10177
|
m.value,
|
|
10168
10178
|
void 0,
|
|
10169
10179
|
{ number: !0 }
|
|
@@ -10179,7 +10189,7 @@ const Kp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
10179
10189
|
placeholder: "Довгота"
|
|
10180
10190
|
}, null, 512), [
|
|
10181
10191
|
[
|
|
10182
|
-
|
|
10192
|
+
gt,
|
|
10183
10193
|
p.value,
|
|
10184
10194
|
void 0,
|
|
10185
10195
|
{ number: !0 }
|
|
@@ -10478,10 +10488,10 @@ const Kp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
10478
10488
|
id: ee,
|
|
10479
10489
|
coords: ve
|
|
10480
10490
|
}) => {
|
|
10481
|
-
const
|
|
10482
|
-
if (
|
|
10491
|
+
const me = i.value.findIndex((xe) => xe.id === ee);
|
|
10492
|
+
if (me === -1) return;
|
|
10483
10493
|
const ye = [...i.value];
|
|
10484
|
-
ye[
|
|
10494
|
+
ye[me] = { id: ee, coords: { ...ve } }, i.value = ye, a();
|
|
10485
10495
|
}, u = (ee) => {
|
|
10486
10496
|
i.value = i.value.filter((ve) => ve.id !== ee), a();
|
|
10487
10497
|
}, w = () => {
|
|
@@ -10499,11 +10509,11 @@ const Kp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
10499
10509
|
}, P = () => {
|
|
10500
10510
|
_.value && (p.value = !0, r("complete"), r("shape-closed-change", !0));
|
|
10501
10511
|
}, j = (ee) => {
|
|
10502
|
-
const ve = (ee ?? []).map((
|
|
10503
|
-
id:
|
|
10504
|
-
coords: { ...
|
|
10512
|
+
const ve = (ee ?? []).map((me) => ({
|
|
10513
|
+
id: me.id ?? v(),
|
|
10514
|
+
coords: { ...me.coords }
|
|
10505
10515
|
}));
|
|
10506
|
-
i.value = ve, ve.length === 0 ? l = 1 : l = Math.max(...ve.map((
|
|
10516
|
+
i.value = ve, ve.length === 0 ? l = 1 : l = Math.max(...ve.map((me) => me.id)) + 1, a();
|
|
10507
10517
|
}, X = () => {
|
|
10508
10518
|
w(), m.value = !1, r("close");
|
|
10509
10519
|
};
|
|
@@ -10543,7 +10553,7 @@ const Kp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
10543
10553
|
"flex-1 px-3 py-2 text-xs font-medium transition-colors",
|
|
10544
10554
|
x.value === "general" ? "text-blue-600 border-b-2 border-blue-500 bg-blue-50/50" : "text-gray-500 hover:text-gray-700"
|
|
10545
10555
|
]),
|
|
10546
|
-
onClick: ve[0] || (ve[0] = (
|
|
10556
|
+
onClick: ve[0] || (ve[0] = (me) => y("general"))
|
|
10547
10557
|
}, " Загальна ", 2),
|
|
10548
10558
|
n("button", {
|
|
10549
10559
|
type: "button",
|
|
@@ -10551,7 +10561,7 @@ const Kp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
10551
10561
|
"flex-1 px-3 py-2 text-xs font-medium transition-colors",
|
|
10552
10562
|
x.value === "topoint" ? "text-blue-600 border-b-2 border-blue-500 bg-blue-50/50" : "text-gray-500 hover:text-gray-700"
|
|
10553
10563
|
]),
|
|
10554
|
-
onClick: ve[1] || (ve[1] = (
|
|
10564
|
+
onClick: ve[1] || (ve[1] = (me) => y("topoint"))
|
|
10555
10565
|
}, " До точки ", 2)
|
|
10556
10566
|
]),
|
|
10557
10567
|
x.value === "general" ? (s(), h(de, { key: 0 }, [
|
|
@@ -10612,7 +10622,7 @@ const Kp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
10612
10622
|
function o(f) {
|
|
10613
10623
|
return Nr(f);
|
|
10614
10624
|
}
|
|
10615
|
-
const r = e, { map: i, ready: c } =
|
|
10625
|
+
const r = e, { map: i, ready: c } = ut();
|
|
10616
10626
|
function m() {
|
|
10617
10627
|
return { type: "FeatureCollection", features: [] };
|
|
10618
10628
|
}
|
|
@@ -10788,7 +10798,7 @@ const Kp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
10788
10798
|
() => [r.points, r.isShapeClosed, r.labelMode],
|
|
10789
10799
|
() => C(),
|
|
10790
10800
|
{ deep: !0, immediate: !0 }
|
|
10791
|
-
),
|
|
10801
|
+
), Je(() => {
|
|
10792
10802
|
c().then(() => a(i.value));
|
|
10793
10803
|
}), (f, u) => null;
|
|
10794
10804
|
}
|
|
@@ -10887,7 +10897,7 @@ const Kp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
10887
10897
|
position: {}
|
|
10888
10898
|
},
|
|
10889
10899
|
setup(e) {
|
|
10890
|
-
const t = e, { map: o, ready: r } =
|
|
10900
|
+
const t = e, { map: o, ready: r } = ut();
|
|
10891
10901
|
let i = !1;
|
|
10892
10902
|
function c() {
|
|
10893
10903
|
return { type: "FeatureCollection", features: [] };
|
|
@@ -10954,7 +10964,7 @@ const Kp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
10954
10964
|
() => t.position,
|
|
10955
10965
|
() => _(),
|
|
10956
10966
|
{ deep: !0, immediate: !0 }
|
|
10957
|
-
),
|
|
10967
|
+
), Je(() => {
|
|
10958
10968
|
r().then(() => x(o.value));
|
|
10959
10969
|
}), (l, g) => null;
|
|
10960
10970
|
}
|
|
@@ -11088,7 +11098,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11088
11098
|
point: {}
|
|
11089
11099
|
},
|
|
11090
11100
|
setup(e) {
|
|
11091
|
-
const t = e, { map: o, ready: r } =
|
|
11101
|
+
const t = e, { map: o, ready: r } = ut();
|
|
11092
11102
|
let i = !1;
|
|
11093
11103
|
function c() {
|
|
11094
11104
|
return { type: "FeatureCollection", features: [] };
|
|
@@ -11155,7 +11165,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11155
11165
|
() => t.point,
|
|
11156
11166
|
() => _(),
|
|
11157
11167
|
{ deep: !0, immediate: !0 }
|
|
11158
|
-
),
|
|
11168
|
+
), Je(() => {
|
|
11159
11169
|
r().then(() => x(o.value));
|
|
11160
11170
|
}), (l, g) => (s(), h("div", pg));
|
|
11161
11171
|
}
|
|
@@ -11250,7 +11260,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11250
11260
|
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",
|
|
11251
11261
|
onChange: x
|
|
11252
11262
|
}, null, 544), [
|
|
11253
|
-
[
|
|
11263
|
+
[gt, m.value]
|
|
11254
11264
|
])
|
|
11255
11265
|
]),
|
|
11256
11266
|
n("label", Lg, [
|
|
@@ -11264,7 +11274,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11264
11274
|
onInput: y
|
|
11265
11275
|
}, null, 544), [
|
|
11266
11276
|
[
|
|
11267
|
-
|
|
11277
|
+
gt,
|
|
11268
11278
|
p.value,
|
|
11269
11279
|
void 0,
|
|
11270
11280
|
{ number: !0 }
|
|
@@ -11341,7 +11351,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11341
11351
|
left: `${c.value.x}px`,
|
|
11342
11352
|
top: `${c.value.y}px`,
|
|
11343
11353
|
transform: "translate(-50%, -50%)"
|
|
11344
|
-
})), { ready: _ } =
|
|
11354
|
+
})), { ready: _ } = ut(), l = M(!1), g = M([]), a = M([]);
|
|
11345
11355
|
let v = 0, C = 0, f = 0, u = 0, w = null;
|
|
11346
11356
|
function L() {
|
|
11347
11357
|
const S = r.value, B = i.value, G = o.value;
|
|
@@ -11355,8 +11365,8 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11355
11365
|
const H = S.getContext("2d", { willReadFrequently: !0 });
|
|
11356
11366
|
if (H && H.scale(Z, Z), B) {
|
|
11357
11367
|
B.width = U * Z, B.height = V * Z, B.style.width = `${U}px`, B.style.height = `${V}px`;
|
|
11358
|
-
const
|
|
11359
|
-
|
|
11368
|
+
const se = B.getContext("2d", { willReadFrequently: !0 });
|
|
11369
|
+
se && se.scale(Z, Z);
|
|
11360
11370
|
}
|
|
11361
11371
|
a.value = [];
|
|
11362
11372
|
}
|
|
@@ -11457,7 +11467,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11457
11467
|
l.value && (p.tool === "line" || p.tool === "rect" || p.tool === "circle") && P(), p.tool === "polygon" && g.value.length > 0 && P();
|
|
11458
11468
|
}
|
|
11459
11469
|
}
|
|
11460
|
-
function
|
|
11470
|
+
function me() {
|
|
11461
11471
|
m.value = !1;
|
|
11462
11472
|
}
|
|
11463
11473
|
function ye() {
|
|
@@ -11466,8 +11476,8 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11466
11476
|
function xe(S, B, G) {
|
|
11467
11477
|
const he = Math.max(p.strokeWidth * 2.5, 8), U = 12 + Math.floor(p.strokeWidth);
|
|
11468
11478
|
for (let V = 0; V < U; V++) {
|
|
11469
|
-
const Z = Math.random() * 2 * Math.PI, H = he * Math.random(),
|
|
11470
|
-
S.beginPath(), S.arc(
|
|
11479
|
+
const Z = Math.random() * 2 * Math.PI, H = he * Math.random(), se = B + Math.cos(Z) * H, N = G + Math.sin(Z) * H, K = 1 + Math.random() * 2;
|
|
11480
|
+
S.beginPath(), S.arc(se, N, K, 0, 2 * Math.PI), S.fill();
|
|
11471
11481
|
}
|
|
11472
11482
|
}
|
|
11473
11483
|
function ue() {
|
|
@@ -11537,7 +11547,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11537
11547
|
const S = (B = o.value) == null ? void 0 : B.parentElement;
|
|
11538
11548
|
S && typeof ResizeObserver < "u" && (w = new ResizeObserver(L), w.observe(S));
|
|
11539
11549
|
});
|
|
11540
|
-
}),
|
|
11550
|
+
}), Je(() => {
|
|
11541
11551
|
w == null || w.disconnect(), w = null;
|
|
11542
11552
|
}), t({ clear: z, getCanvas: E, finishPolygon: ie, undo: R, canUndo: () => a.value.length > 0 }), (S, B) => (s(), h("div", {
|
|
11543
11553
|
ref_key: "wrapRef",
|
|
@@ -11548,7 +11558,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11548
11558
|
onMouseup: ue,
|
|
11549
11559
|
onDblclick: ye,
|
|
11550
11560
|
onMouseleave: B[0] || (B[0] = () => {
|
|
11551
|
-
|
|
11561
|
+
me(), ue();
|
|
11552
11562
|
})
|
|
11553
11563
|
}, [
|
|
11554
11564
|
n("canvas", {
|
|
@@ -11563,7 +11573,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11563
11573
|
}, null, 512),
|
|
11564
11574
|
Ke(n("div", {
|
|
11565
11575
|
class: "drawing-canvas__eraser-cursor",
|
|
11566
|
-
style:
|
|
11576
|
+
style: at(y.value)
|
|
11567
11577
|
}, null, 4), [
|
|
11568
11578
|
[Gt, e.tool === "eraser" && m.value]
|
|
11569
11579
|
])
|
|
@@ -11598,7 +11608,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11598
11608
|
__name: "index",
|
|
11599
11609
|
emits: ["close"],
|
|
11600
11610
|
setup(e, { emit: t }) {
|
|
11601
|
-
const o = t, r =
|
|
11611
|
+
const o = t, r = ut(), { registerClientLayer: i } = Go(), {
|
|
11602
11612
|
activateTemporaryLayer: c,
|
|
11603
11613
|
deactivateTemporaryLayer: m,
|
|
11604
11614
|
clearTemporaryLayers: p
|
|
@@ -11613,7 +11623,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11613
11623
|
var fe;
|
|
11614
11624
|
return (fe = K == null ? void 0 : K.geometry) == null ? void 0 : fe.type;
|
|
11615
11625
|
}).filter(Boolean)
|
|
11616
|
-
)].join(", ") || "—",
|
|
11626
|
+
)].join(", ") || "—", se = Eo(u.value), N = se ? `${se[0][1].toFixed(5)}, ${se[0][0].toFixed(5)} — ${se[1][1].toFixed(5)}, ${se[1][0].toFixed(5)}` : null;
|
|
11617
11627
|
return {
|
|
11618
11628
|
featureCount: Z.length,
|
|
11619
11629
|
geometryTypes: H,
|
|
@@ -11623,7 +11633,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11623
11633
|
function ve(Z) {
|
|
11624
11634
|
window.dispatchEvent(new CustomEvent("map:temporary-layer-request", { detail: Z }));
|
|
11625
11635
|
}
|
|
11626
|
-
function
|
|
11636
|
+
function me() {
|
|
11627
11637
|
m(Fo, Wn), ve({
|
|
11628
11638
|
action: "deactivate",
|
|
11629
11639
|
owner: Wn,
|
|
@@ -11642,14 +11652,14 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11642
11652
|
owner: Wn,
|
|
11643
11653
|
spec: H
|
|
11644
11654
|
});
|
|
11645
|
-
const
|
|
11646
|
-
|
|
11655
|
+
const se = Eo(Z);
|
|
11656
|
+
se && r.fitBounds && r.fitBounds(se, { padding: 48, duration: 600 });
|
|
11647
11657
|
}
|
|
11648
11658
|
function xe(Z) {
|
|
11649
11659
|
if (!Z || typeof Z != "object") return null;
|
|
11650
|
-
const H = Z,
|
|
11651
|
-
if (
|
|
11652
|
-
const N = String(
|
|
11660
|
+
const H = Z, se = H.id ?? H.srid ?? H.code ?? H.value;
|
|
11661
|
+
if (se == null || se === "") return null;
|
|
11662
|
+
const N = String(se), K = H.text ?? H.name ?? H.title ?? H.label, fe = K ? String(K) : `EPSG:${N}`;
|
|
11653
11663
|
return {
|
|
11654
11664
|
id: N,
|
|
11655
11665
|
text: fe.includes(N) ? fe : `${fe} (${N})`
|
|
@@ -11658,7 +11668,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11658
11668
|
async function ue(Z = "", H = !1) {
|
|
11659
11669
|
try {
|
|
11660
11670
|
D.value = !0;
|
|
11661
|
-
const
|
|
11671
|
+
const se = Z.trim(), N = se ? `/api/suggest/srid?key=${encodeURIComponent(se)}` : "/api/suggest/srid", K = await fetch(N);
|
|
11662
11672
|
if (!K.ok) {
|
|
11663
11673
|
f.value = [];
|
|
11664
11674
|
return;
|
|
@@ -11672,8 +11682,8 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11672
11682
|
return;
|
|
11673
11683
|
}
|
|
11674
11684
|
f.value = [];
|
|
11675
|
-
} catch (
|
|
11676
|
-
console.error("Failed to load SRID classifier:",
|
|
11685
|
+
} catch (se) {
|
|
11686
|
+
console.error("Failed to load SRID classifier:", se);
|
|
11677
11687
|
} finally {
|
|
11678
11688
|
D.value = !1;
|
|
11679
11689
|
}
|
|
@@ -11682,7 +11692,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11682
11692
|
v.value = Z.id, C.value = Z.text, H && (T.value = !1);
|
|
11683
11693
|
}
|
|
11684
11694
|
function R() {
|
|
11685
|
-
const Z = C.value.trim(), H = f.value.find((
|
|
11695
|
+
const Z = C.value.trim(), H = f.value.find((se) => se.id === v.value);
|
|
11686
11696
|
(!H || Z !== H.id && Z !== H.text) && (v.value = ""), T.value = !0, P && clearTimeout(P), P = setTimeout(() => {
|
|
11687
11697
|
ue(Z);
|
|
11688
11698
|
}, 300);
|
|
@@ -11693,7 +11703,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11693
11703
|
}, 150);
|
|
11694
11704
|
}
|
|
11695
11705
|
function E(Z) {
|
|
11696
|
-
var
|
|
11706
|
+
var se;
|
|
11697
11707
|
const H = [
|
|
11698
11708
|
Z,
|
|
11699
11709
|
Z == null ? void 0 : Z.data,
|
|
@@ -11702,12 +11712,12 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11702
11712
|
];
|
|
11703
11713
|
for (const N of H) {
|
|
11704
11714
|
const K = ir(N);
|
|
11705
|
-
if ((
|
|
11715
|
+
if ((se = K == null ? void 0 : K.features) != null && se.length) return K;
|
|
11706
11716
|
}
|
|
11707
11717
|
return null;
|
|
11708
11718
|
}
|
|
11709
11719
|
async function S() {
|
|
11710
|
-
var
|
|
11720
|
+
var se, N;
|
|
11711
11721
|
if (w.value = "", x.value === "geometry") {
|
|
11712
11722
|
let K;
|
|
11713
11723
|
try {
|
|
@@ -11716,7 +11726,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11716
11726
|
throw new Error("Некоректний JSON у полі геометрії");
|
|
11717
11727
|
}
|
|
11718
11728
|
const fe = ir(K);
|
|
11719
|
-
if (!((
|
|
11729
|
+
if (!((se = fe == null ? void 0 : fe.features) != null && se.length))
|
|
11720
11730
|
throw new Error("Не вдалося розпізнати геометрію GeoJSON");
|
|
11721
11731
|
return fe;
|
|
11722
11732
|
}
|
|
@@ -11731,9 +11741,9 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11731
11741
|
L.value = !0, w.value = "";
|
|
11732
11742
|
try {
|
|
11733
11743
|
const Z = await S();
|
|
11734
|
-
u.value = Z,
|
|
11744
|
+
u.value = Z, me(), ye(Z);
|
|
11735
11745
|
} catch (Z) {
|
|
11736
|
-
u.value = null,
|
|
11746
|
+
u.value = null, me(), w.value = (Z == null ? void 0 : Z.message) || "Не вдалося підготувати попередній перегляд";
|
|
11737
11747
|
} finally {
|
|
11738
11748
|
L.value = !1;
|
|
11739
11749
|
}
|
|
@@ -11747,20 +11757,20 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11747
11757
|
type: "geojson",
|
|
11748
11758
|
data: u.value
|
|
11749
11759
|
};
|
|
11750
|
-
|
|
11760
|
+
me(), c(H, {}, xr), ve({
|
|
11751
11761
|
action: "activate",
|
|
11752
11762
|
owner: xr,
|
|
11753
11763
|
spec: H
|
|
11754
11764
|
});
|
|
11755
|
-
const
|
|
11765
|
+
const se = Eo(u.value), N = l.value.trim();
|
|
11756
11766
|
i({
|
|
11757
11767
|
id: Z,
|
|
11758
11768
|
name: N,
|
|
11759
|
-
bounds:
|
|
11769
|
+
bounds: se,
|
|
11760
11770
|
data: u.value
|
|
11761
11771
|
}), window.dispatchEvent(new CustomEvent($n, {
|
|
11762
|
-
detail: { id: Z, name: N, bounds:
|
|
11763
|
-
})),
|
|
11772
|
+
detail: { id: Z, name: N, bounds: se }
|
|
11773
|
+
})), se && r.fitBounds && r.fitBounds(se, { padding: 48, duration: 600 }), o("close");
|
|
11764
11774
|
}
|
|
11765
11775
|
function he(Z) {
|
|
11766
11776
|
if (!Z) {
|
|
@@ -11768,29 +11778,29 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11768
11778
|
return;
|
|
11769
11779
|
}
|
|
11770
11780
|
if (!jr(Z)) {
|
|
11771
|
-
w.value = `Підтримуються формати: ${_}`, a.value = null, u.value = null,
|
|
11781
|
+
w.value = `Підтримуються формати: ${_}`, a.value = null, u.value = null, me();
|
|
11772
11782
|
return;
|
|
11773
11783
|
}
|
|
11774
|
-
a.value = Z, u.value = null,
|
|
11784
|
+
a.value = Z, u.value = null, me(), w.value = "";
|
|
11775
11785
|
}
|
|
11776
11786
|
function U(Z) {
|
|
11777
|
-
var
|
|
11787
|
+
var se;
|
|
11778
11788
|
const H = Z.target;
|
|
11779
|
-
he(((
|
|
11789
|
+
he(((se = H.files) == null ? void 0 : se[0]) || null);
|
|
11780
11790
|
}
|
|
11781
11791
|
function V(Z) {
|
|
11782
|
-
var H,
|
|
11783
|
-
A.value = !1, he(((
|
|
11792
|
+
var H, se;
|
|
11793
|
+
A.value = !1, he(((se = (H = Z.dataTransfer) == null ? void 0 : H.files) == null ? void 0 : se[0]) || null);
|
|
11784
11794
|
}
|
|
11785
11795
|
return _e(x, () => {
|
|
11786
|
-
u.value = null, w.value = "",
|
|
11796
|
+
u.value = null, w.value = "", me();
|
|
11787
11797
|
}), Qe(() => {
|
|
11788
11798
|
ue(Hn, !0);
|
|
11789
|
-
}),
|
|
11790
|
-
P && clearTimeout(P),
|
|
11799
|
+
}), Je(() => {
|
|
11800
|
+
P && clearTimeout(P), me();
|
|
11791
11801
|
}), (Z, H) => (s(), h("div", {
|
|
11792
11802
|
class: "add-data-modal fixed inset-0 z-[1200] flex items-center justify-center p-4 pointer-events-auto",
|
|
11793
|
-
onClick: H[9] || (H[9] = We((
|
|
11803
|
+
onClick: H[9] || (H[9] = We((se) => o("close"), ["self"]))
|
|
11794
11804
|
}, [
|
|
11795
11805
|
n("div", Rg, [
|
|
11796
11806
|
n("div", jg, [
|
|
@@ -11799,7 +11809,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11799
11809
|
type: "button",
|
|
11800
11810
|
class: "w-8 h-8 inline-flex items-center justify-center rounded-lg text-slate-500 hover:bg-slate-100 hover:text-slate-700",
|
|
11801
11811
|
"aria-label": "Закрити",
|
|
11802
|
-
onClick: H[0] || (H[0] = (
|
|
11812
|
+
onClick: H[0] || (H[0] = (se) => o("close"))
|
|
11803
11813
|
}, [
|
|
11804
11814
|
be(pe($t), { size: 18 })
|
|
11805
11815
|
])
|
|
@@ -11812,7 +11822,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11812
11822
|
n("span", { class: "text-red-500" }, "*")
|
|
11813
11823
|
], -1)),
|
|
11814
11824
|
Ke(n("select", {
|
|
11815
|
-
"onUpdate:modelValue": H[1] || (H[1] = (
|
|
11825
|
+
"onUpdate:modelValue": H[1] || (H[1] = (se) => x.value = se),
|
|
11816
11826
|
class: "w-full rounded-lg border border-slate-300 px-3 py-2 text-sm text-slate-800 bg-white focus:outline-none focus:ring-2 focus:ring-blue-400/50"
|
|
11817
11827
|
}, [...H[11] || (H[11] = [
|
|
11818
11828
|
n("option", { value: "file" }, "Файл", -1),
|
|
@@ -11827,12 +11837,12 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11827
11837
|
n("span", { class: "text-red-500" }, "*")
|
|
11828
11838
|
], -1)),
|
|
11829
11839
|
Ke(n("input", {
|
|
11830
|
-
"onUpdate:modelValue": H[2] || (H[2] = (
|
|
11840
|
+
"onUpdate:modelValue": H[2] || (H[2] = (se) => l.value = se),
|
|
11831
11841
|
type: "text",
|
|
11832
11842
|
class: "w-full rounded-lg border border-slate-300 px-3 py-2 text-sm text-slate-800 focus:outline-none focus:ring-2 focus:ring-blue-400/50",
|
|
11833
11843
|
placeholder: "Введіть назву"
|
|
11834
11844
|
}, null, 512), [
|
|
11835
|
-
[
|
|
11845
|
+
[gt, l.value]
|
|
11836
11846
|
])
|
|
11837
11847
|
]),
|
|
11838
11848
|
x.value === "geometry" ? (s(), h("div", Dg, [
|
|
@@ -11841,12 +11851,12 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11841
11851
|
n("span", { class: "text-red-500" }, "*")
|
|
11842
11852
|
], -1)),
|
|
11843
11853
|
Ke(n("textarea", {
|
|
11844
|
-
"onUpdate:modelValue": H[3] || (H[3] = (
|
|
11854
|
+
"onUpdate:modelValue": H[3] || (H[3] = (se) => g.value = se),
|
|
11845
11855
|
rows: "10",
|
|
11846
11856
|
class: "w-full rounded-lg border border-slate-300 px-3 py-2 text-sm font-mono text-slate-800 focus:outline-none focus:ring-2 focus:ring-blue-400/50 resize-y",
|
|
11847
11857
|
placeholder: '{"type":"Polygon","coordinates":[[[30.5,50.4],[30.6,50.4],[30.6,50.5],[30.5,50.5],[30.5,50.4]]]}'
|
|
11848
11858
|
}, null, 512), [
|
|
11849
|
-
[
|
|
11859
|
+
[gt, g.value]
|
|
11850
11860
|
]),
|
|
11851
11861
|
H[15] || (H[15] = n("p", { class: "mt-1.5 text-xs text-slate-500" }, " Вставте GeoJSON-геометрію, Feature або FeatureCollection. ", -1))
|
|
11852
11862
|
])) : (s(), h("div", Ng, [
|
|
@@ -11857,24 +11867,24 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11857
11867
|
], -1)),
|
|
11858
11868
|
n("div", Ug, [
|
|
11859
11869
|
Ke(n("input", {
|
|
11860
|
-
"onUpdate:modelValue": H[4] || (H[4] = (
|
|
11870
|
+
"onUpdate:modelValue": H[4] || (H[4] = (se) => C.value = se),
|
|
11861
11871
|
type: "text",
|
|
11862
11872
|
class: "w-full rounded-lg border border-slate-300 px-3 py-2 text-sm text-slate-800 bg-white focus:outline-none focus:ring-2 focus:ring-blue-400/50",
|
|
11863
11873
|
placeholder: "EPSG:4326",
|
|
11864
11874
|
autocomplete: "off",
|
|
11865
|
-
onFocus: H[5] || (H[5] = (
|
|
11875
|
+
onFocus: H[5] || (H[5] = (se) => T.value = !0),
|
|
11866
11876
|
onInput: R,
|
|
11867
11877
|
onBlur: z
|
|
11868
11878
|
}, null, 544), [
|
|
11869
|
-
[
|
|
11879
|
+
[gt, C.value]
|
|
11870
11880
|
]),
|
|
11871
11881
|
T.value ? (s(), h("div", Vg, [
|
|
11872
|
-
(s(!0), h(de, null, Te(f.value, (
|
|
11873
|
-
key:
|
|
11882
|
+
(s(!0), h(de, null, Te(f.value, (se) => (s(), h("button", {
|
|
11883
|
+
key: se.id,
|
|
11874
11884
|
type: "button",
|
|
11875
11885
|
class: "block w-full px-3 py-2 text-left text-sm text-slate-700 hover:bg-blue-50 hover:text-blue-700",
|
|
11876
|
-
onMousedown: We((N) => ie(
|
|
11877
|
-
}, J(
|
|
11886
|
+
onMousedown: We((N) => ie(se), ["prevent"])
|
|
11887
|
+
}, J(se.text), 41, qg))), 128)),
|
|
11878
11888
|
!f.value.length && !D.value ? (s(), h("p", Wg, " Нічого не знайдено ")) : oe("", !0),
|
|
11879
11889
|
D.value ? (s(), h("p", Hg, " Пошук... ")) : oe("", !0)
|
|
11880
11890
|
])) : oe("", !0)
|
|
@@ -11882,10 +11892,10 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11882
11892
|
]),
|
|
11883
11893
|
n("div", {
|
|
11884
11894
|
class: Be(["add-data-modal__dropzone", { "add-data-modal__dropzone--active": A.value }]),
|
|
11885
|
-
onDragover: H[6] || (H[6] = We((
|
|
11886
|
-
onDragleave: H[7] || (H[7] = We((
|
|
11895
|
+
onDragover: H[6] || (H[6] = We((se) => A.value = !0, ["prevent"])),
|
|
11896
|
+
onDragleave: H[7] || (H[7] = We((se) => A.value = !1, ["prevent"])),
|
|
11887
11897
|
onDrop: We(V, ["prevent"]),
|
|
11888
|
-
onClick: H[8] || (H[8] = (
|
|
11898
|
+
onClick: H[8] || (H[8] = (se) => {
|
|
11889
11899
|
var N;
|
|
11890
11900
|
return (N = k.value) == null ? void 0 : N.click();
|
|
11891
11901
|
})
|
|
@@ -11966,7 +11976,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
11966
11976
|
},
|
|
11967
11977
|
setup(e) {
|
|
11968
11978
|
var g, a;
|
|
11969
|
-
const t = e, o = ((a = (g = Xt()) == null ? void 0 : g.appContext.config.globalProperties) == null ? void 0 : a.$settings) || null, { map: r, ready: i } =
|
|
11979
|
+
const t = e, o = ((a = (g = Xt()) == null ? void 0 : g.appContext.config.globalProperties) == null ? void 0 : a.$settings) || null, { map: r, ready: i } = ut();
|
|
11970
11980
|
let c = null;
|
|
11971
11981
|
function m() {
|
|
11972
11982
|
c == null || c.remove(), c = null;
|
|
@@ -12041,7 +12051,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
12041
12051
|
l();
|
|
12042
12052
|
},
|
|
12043
12053
|
{ immediate: !0 }
|
|
12044
|
-
),
|
|
12054
|
+
), Je(m), (v, C) => null;
|
|
12045
12055
|
}
|
|
12046
12056
|
}), dm = {
|
|
12047
12057
|
key: 3,
|
|
@@ -12093,7 +12103,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
12093
12103
|
var Fn, nn, hn, zn;
|
|
12094
12104
|
const t = e;
|
|
12095
12105
|
console.log("props.data", t.data);
|
|
12096
|
-
const o = Mt(), r = qt(), i = M(null), c = M({}), m = M(null), p = M(!1), x = M(null), y = M(!1), _ = M([]), l = M([]), g = M(null), a = M(!1), { resolveMapLegendItems: v } = Br(), C = Or(), f = M(null), u = O(() => f.value === "route"), w = O(() => f.value === "ruler"), L = O(() => f.value === "height"), T = O(() => f.value === "draw"), D = O(() => f.value === "geolocation"), A = O(() => f.value === "add-data"), k = M(null), P = M("general"), j = M(null), X = M(null), ee = M(null), ve = M("pen"),
|
|
12106
|
+
const o = Mt(), r = qt(), i = M(null), c = M({}), m = M(null), p = M(!1), x = M(null), y = M(!1), _ = M([]), l = M([]), g = M(null), a = M(!1), { resolveMapLegendItems: v } = Br(), C = Or(), f = M(null), u = O(() => f.value === "route"), w = O(() => f.value === "ruler"), L = O(() => f.value === "height"), T = O(() => f.value === "draw"), D = O(() => f.value === "geolocation"), A = O(() => f.value === "add-data"), k = M(null), P = M("general"), j = M(null), X = M(null), ee = M(null), ve = M("pen"), me = M("#2563eb"), ye = M(3), xe = M([]), ue = M(null), ie = M(null), R = M([]), z = M(!1), E = M(null), S = M(!1), B = M(null), G = O(() => t.id || "main"), he = O(() => {
|
|
12097
12107
|
var F, Y;
|
|
12098
12108
|
return {
|
|
12099
12109
|
height: ((F = t.height) == null ? void 0 : F.trim()) || ((Y = c.value) == null ? void 0 : Y.height) || "calc(100vh - 65px)"
|
|
@@ -12111,7 +12121,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
12111
12121
|
var Y, Pe;
|
|
12112
12122
|
const F = ((Y = c.value) == null ? void 0 : Y.minZoom) ?? ((Pe = c.value) == null ? void 0 : Pe.minzoom) ?? null;
|
|
12113
12123
|
return typeof F == "number" ? F : null;
|
|
12114
|
-
}),
|
|
12124
|
+
}), se = O(() => {
|
|
12115
12125
|
var Y, Pe;
|
|
12116
12126
|
const F = ((Y = c.value) == null ? void 0 : Y.maxZoom) ?? ((Pe = c.value) == null ? void 0 : Pe.maxzoom) ?? null;
|
|
12117
12127
|
return typeof F == "number" ? F : typeof t.maxZoom == "number" ? t.maxZoom : 20;
|
|
@@ -12140,14 +12150,14 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
12140
12150
|
const Y = Yt(F.center);
|
|
12141
12151
|
return Y ? { ...F, center: Y } : F;
|
|
12142
12152
|
}
|
|
12143
|
-
const
|
|
12153
|
+
const le = ((nn = (Fn = Xt()) == null ? void 0 : Fn.appContext.config.globalProperties) == null ? void 0 : nn.$settings) || null;
|
|
12144
12154
|
function ce(F) {
|
|
12145
12155
|
if (F == null) return null;
|
|
12146
12156
|
const Y = Number(typeof F == "string" ? F.trim() : F);
|
|
12147
12157
|
return Number.isFinite(Y) ? Y : null;
|
|
12148
12158
|
}
|
|
12149
|
-
const Ie = Yt((hn =
|
|
12150
|
-
const F = (
|
|
12159
|
+
const Ie = Yt((hn = le == null ? void 0 : le.map) == null ? void 0 : hn.center), Se = ce((zn = le == null ? void 0 : le.map) == null ? void 0 : zn.zoom), De = O(() => {
|
|
12160
|
+
const F = (le == null ? void 0 : le.map) || null, Y = (F == null ? void 0 : F.boundary) ?? null, Pe = (F == null ? void 0 : F.katottg) ?? null;
|
|
12151
12161
|
return !Y && !Pe ? null : { boundary: Y, katottg: Pe };
|
|
12152
12162
|
});
|
|
12153
12163
|
function Oe(F) {
|
|
@@ -12159,9 +12169,9 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
12159
12169
|
const et = O(() => {
|
|
12160
12170
|
var F;
|
|
12161
12171
|
return Ze((F = c.value) == null ? void 0 : F.widgets);
|
|
12162
|
-
}),
|
|
12163
|
-
function
|
|
12164
|
-
return v(F, { hasCatalogWidget:
|
|
12172
|
+
}), ht = O(() => et.value.some((F) => (F == null ? void 0 : F.type) === "catalog"));
|
|
12173
|
+
function pt(F) {
|
|
12174
|
+
return v(F, { hasCatalogWidget: ht.value });
|
|
12165
12175
|
}
|
|
12166
12176
|
const Rt = O(() => et.value.some((F) => (F == null ? void 0 : F.type) === "basemaps")), jt = O(() => et.value.some((F) => (F == null ? void 0 : F.type) === "layers")), Wt = ["left", "right"], At = O(() => {
|
|
12167
12177
|
const F = {
|
|
@@ -12178,12 +12188,12 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
12178
12188
|
F[Ce.side][Ce.align].push(Pe);
|
|
12179
12189
|
}), F;
|
|
12180
12190
|
});
|
|
12181
|
-
function
|
|
12191
|
+
function yt(F) {
|
|
12182
12192
|
return Array.isArray(F) ? F[0] ?? null : typeof F == "string" ? F : null;
|
|
12183
12193
|
}
|
|
12184
12194
|
async function W() {
|
|
12185
12195
|
var Y;
|
|
12186
|
-
await
|
|
12196
|
+
await it();
|
|
12187
12197
|
const F = (Y = i.value) == null ? void 0 : Y.ctx;
|
|
12188
12198
|
return F ? (F.ready && await F.ready(), F) : null;
|
|
12189
12199
|
}
|
|
@@ -12204,7 +12214,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
12204
12214
|
async function Le() {
|
|
12205
12215
|
var Pe;
|
|
12206
12216
|
const F = await W(), Y = (Pe = F == null ? void 0 : F.map) == null ? void 0 : Pe.value;
|
|
12207
|
-
Y && (typeof H.value == "number" && Y.setMinZoom(H.value), typeof
|
|
12217
|
+
Y && (typeof H.value == "number" && Y.setMinZoom(H.value), typeof se.value == "number" && Y.setMaxZoom(se.value));
|
|
12208
12218
|
}
|
|
12209
12219
|
async function Re() {
|
|
12210
12220
|
var Ce;
|
|
@@ -12215,10 +12225,10 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
12215
12225
|
m.value = { center: [Pe.lng, Pe.lat], zoom: Fe };
|
|
12216
12226
|
}
|
|
12217
12227
|
function Ve() {
|
|
12218
|
-
if (
|
|
12228
|
+
if (mt.value) return;
|
|
12219
12229
|
const F = ne();
|
|
12220
12230
|
if (!F) return;
|
|
12221
|
-
const Y =
|
|
12231
|
+
const Y = yt(o.query.x), Pe = yt(o.query.y), Fe = yt(o.query.z);
|
|
12222
12232
|
Y === F.x && Pe === F.y && Fe === F.z || (Lt.value = F, r.replace({ query: { ...o.query, ...F } }).catch(() => {
|
|
12223
12233
|
}));
|
|
12224
12234
|
}
|
|
@@ -12230,9 +12240,9 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
12230
12240
|
if (Jt()) return;
|
|
12231
12241
|
const F = await W(), Y = (b = F == null ? void 0 : F.map) == null ? void 0 : b.value;
|
|
12232
12242
|
if (!F || !Y) return;
|
|
12233
|
-
const Pe = parseFloat(
|
|
12243
|
+
const Pe = parseFloat(yt(o.query.x) ?? ""), Fe = parseFloat(yt(o.query.y) ?? ""), Ce = parseFloat(yt(o.query.z) ?? ""), Ne = !Number.isNaN(Pe), Ue = !Number.isNaN(Fe), Ee = !Number.isNaN(Ce);
|
|
12234
12244
|
let d = !1;
|
|
12235
|
-
|
|
12245
|
+
mt.value = !0;
|
|
12236
12246
|
try {
|
|
12237
12247
|
if (Ne && Ue) {
|
|
12238
12248
|
const I = Y.getCenter();
|
|
@@ -12244,15 +12254,15 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
12244
12254
|
}
|
|
12245
12255
|
(!Ne || !Ue || !Ee || d) && Ve();
|
|
12246
12256
|
} finally {
|
|
12247
|
-
|
|
12257
|
+
mt.value = !1;
|
|
12248
12258
|
}
|
|
12249
12259
|
}
|
|
12250
|
-
let
|
|
12251
|
-
const
|
|
12260
|
+
let ct = null, vt = null;
|
|
12261
|
+
const mt = M(!1), Lt = M(null);
|
|
12252
12262
|
function Jt() {
|
|
12253
12263
|
const F = Lt.value;
|
|
12254
12264
|
if (!F) return !1;
|
|
12255
|
-
const Y =
|
|
12265
|
+
const Y = yt(o.query.x), Pe = yt(o.query.y), Fe = yt(o.query.z);
|
|
12256
12266
|
return Y === F.x && Pe === F.y && Fe === F.z ? (Lt.value = null, !0) : !1;
|
|
12257
12267
|
}
|
|
12258
12268
|
function lo(F) {
|
|
@@ -12284,13 +12294,13 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
12284
12294
|
function Kt() {
|
|
12285
12295
|
const F = te();
|
|
12286
12296
|
return F ? Object.entries(Ye()).filter(([, Y]) => {
|
|
12287
|
-
var I,
|
|
12288
|
-
const Pe = (
|
|
12297
|
+
var I, re, ge, ke, je, ze, qe;
|
|
12298
|
+
const Pe = (re = (I = Y == null ? void 0 : Y.opts) == null ? void 0 : I.source) == null ? void 0 : re.type, Fe = (ke = (ge = Y == null ? void 0 : Y.opts) == null ? void 0 : ge.layer) == null ? void 0 : ke.type, Ce = (((je = Y == null ? void 0 : Y.opts) == null ? void 0 : je.service) || "").toString().toLowerCase(), Ne = Array.isArray(Y == null ? void 0 : Y.card) ? Y.card.length > 0 : !!(Y != null && Y.card), Ue = Array.isArray(Y == null ? void 0 : Y.popup) ? Y.popup.length > 0 : !!(Y != null && Y.popup), Ee = (ze = Y == null ? void 0 : Y.ids) == null ? void 0 : ze.sourceId;
|
|
12289
12299
|
if (Pe !== "raster" && Fe !== "raster" || Ce !== "cartocss" && !Ne && !Ue || !Ee || !F.getSource(Ee)) return !1;
|
|
12290
|
-
const b = (((qe = F.getStyle()) == null ? void 0 : qe.layers) || []).filter((
|
|
12291
|
-
return b.length ? b.some((
|
|
12300
|
+
const b = (((qe = F.getStyle()) == null ? void 0 : qe.layers) || []).filter((Xe) => Xe.source === Ee);
|
|
12301
|
+
return b.length ? b.some((Xe) => {
|
|
12292
12302
|
try {
|
|
12293
|
-
return F.getLayoutProperty(
|
|
12303
|
+
return F.getLayoutProperty(Xe.id, "visibility") !== "none";
|
|
12294
12304
|
} catch {
|
|
12295
12305
|
return !0;
|
|
12296
12306
|
}
|
|
@@ -12300,11 +12310,11 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
12300
12310
|
function cn(F) {
|
|
12301
12311
|
const Y = te();
|
|
12302
12312
|
return Y ? (Y.queryRenderedFeatures(F == null ? void 0 : F.point) || []).filter((Fe) => {
|
|
12303
|
-
var Ee, d, b, I,
|
|
12313
|
+
var Ee, d, b, I, re;
|
|
12304
12314
|
if (!((Ee = Fe == null ? void 0 : Fe.properties) != null && Ee.id)) return !1;
|
|
12305
12315
|
const Ce = Ye(Fe.source);
|
|
12306
12316
|
if (!Ce) return !1;
|
|
12307
|
-
const Ne = (b = (d = Ce == null ? void 0 : Ce.opts) == null ? void 0 : d.source) == null ? void 0 : b.type, Ue = (
|
|
12317
|
+
const Ne = (b = (d = Ce == null ? void 0 : Ce.opts) == null ? void 0 : d.source) == null ? void 0 : b.type, Ue = (re = (I = Ce == null ? void 0 : Ce.opts) == null ? void 0 : I.layer) == null ? void 0 : re.type;
|
|
12308
12318
|
return Ne !== "raster" && Ue !== "raster";
|
|
12309
12319
|
}) : [];
|
|
12310
12320
|
}
|
|
@@ -12316,27 +12326,27 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
12316
12326
|
if (!Fe.length) return [];
|
|
12317
12327
|
const Ce = [];
|
|
12318
12328
|
for (let I = 0; I < Fe.length; I += 1) {
|
|
12319
|
-
const
|
|
12320
|
-
layer:
|
|
12329
|
+
const re = Fe[I], ge = new URLSearchParams({
|
|
12330
|
+
layer: re,
|
|
12321
12331
|
lat: Pe.toFixed(6),
|
|
12322
12332
|
lng: Y.toFixed(6)
|
|
12323
12333
|
});
|
|
12324
12334
|
try {
|
|
12325
|
-
const ke = await Tn(
|
|
12335
|
+
const ke = await Tn(ge), je = An(
|
|
12326
12336
|
((Ee = ke == null ? void 0 : ke.data) == null ? void 0 : Ee.geom) ?? (ke == null ? void 0 : ke.geom) ?? null
|
|
12327
12337
|
), ze = ((d = ke == null ? void 0 : ke.data) == null ? void 0 : d.id) ?? (ke == null ? void 0 : ke.id);
|
|
12328
12338
|
if (ze != null) {
|
|
12329
12339
|
const qe = await Tn(new URLSearchParams({
|
|
12330
|
-
layer:
|
|
12340
|
+
layer: re,
|
|
12331
12341
|
id: String(ze)
|
|
12332
|
-
})),
|
|
12342
|
+
})), Xe = typeof (qe == null ? void 0 : qe.html) == "string" ? qe.html : null, ot = An(
|
|
12333
12343
|
((b = qe == null ? void 0 : qe.data) == null ? void 0 : b.geom) ?? (qe == null ? void 0 : qe.geom) ?? null
|
|
12334
12344
|
);
|
|
12335
|
-
if (
|
|
12345
|
+
if (Xe || ot) {
|
|
12336
12346
|
Ce.push({
|
|
12337
|
-
html:
|
|
12338
|
-
geometry:
|
|
12339
|
-
infoToken: `external:${
|
|
12347
|
+
html: Xe,
|
|
12348
|
+
geometry: ot ?? je,
|
|
12349
|
+
infoToken: `external:${re},${String(ze)}`
|
|
12340
12350
|
});
|
|
12341
12351
|
continue;
|
|
12342
12352
|
}
|
|
@@ -12480,26 +12490,26 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
12480
12490
|
if (!d) return;
|
|
12481
12491
|
const b = d.width, I = d.height;
|
|
12482
12492
|
if (b <= 0 || I <= 0) return;
|
|
12483
|
-
const
|
|
12484
|
-
|
|
12485
|
-
const
|
|
12486
|
-
if (!
|
|
12487
|
-
|
|
12493
|
+
const re = document.createElement("canvas");
|
|
12494
|
+
re.width = b, re.height = I;
|
|
12495
|
+
const ge = re.getContext("2d");
|
|
12496
|
+
if (!ge) return;
|
|
12497
|
+
ge.drawImage(d, 0, 0), ge.drawImage(Y, 0, 0, Y.width, Y.height, 0, 0, b, I);
|
|
12488
12498
|
const ke = `map-drawing-${Date.now()}.png`;
|
|
12489
|
-
|
|
12499
|
+
re.toBlob(
|
|
12490
12500
|
(je) => {
|
|
12491
12501
|
if (je) {
|
|
12492
12502
|
Pe(je, ke);
|
|
12493
12503
|
return;
|
|
12494
12504
|
}
|
|
12495
12505
|
try {
|
|
12496
|
-
const ze =
|
|
12506
|
+
const ze = re.toDataURL("image/png");
|
|
12497
12507
|
Pe(ze, ke);
|
|
12498
12508
|
} catch {
|
|
12499
12509
|
const ze = document.createElement("canvas");
|
|
12500
12510
|
ze.width = Y.width, ze.height = Y.height;
|
|
12501
12511
|
const qe = ze.getContext("2d");
|
|
12502
|
-
qe && (qe.drawImage(Y, 0, 0), ze.toBlob((
|
|
12512
|
+
qe && (qe.drawImage(Y, 0, 0), ze.toBlob((Xe) => Xe && Pe(Xe, ke), "image/png"));
|
|
12503
12513
|
}
|
|
12504
12514
|
},
|
|
12505
12515
|
"image/png"
|
|
@@ -12509,10 +12519,10 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
12509
12519
|
}
|
|
12510
12520
|
async function bo() {
|
|
12511
12521
|
const F = await W();
|
|
12512
|
-
F != null && F.on && (
|
|
12522
|
+
F != null && F.on && (ct == null || ct(), ct = F.on("moveend", Ve), vt == null || vt(), vt = F.on("mousemove", lo), Tt == null || Tt(), Tt = F.on("click", Qt));
|
|
12513
12523
|
}
|
|
12514
12524
|
kr(() => {
|
|
12515
|
-
|
|
12525
|
+
ct == null || ct(), ct = null, vt == null || vt(), vt = null, Tt == null || Tt(), Tt = null;
|
|
12516
12526
|
});
|
|
12517
12527
|
async function St(F = !1, Y = !1) {
|
|
12518
12528
|
var Fe, Ce;
|
|
@@ -12571,8 +12581,8 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
12571
12581
|
function Ht(F) {
|
|
12572
12582
|
Ot.value.includes(F) ? Ot.value = Ot.value.filter((Y) => Y !== F) : Ot.value.push(F);
|
|
12573
12583
|
}
|
|
12574
|
-
const
|
|
12575
|
-
return _e([H,
|
|
12584
|
+
const rt = O(() => (F) => Ot.value.includes(F.id));
|
|
12585
|
+
return _e([H, se], () => {
|
|
12576
12586
|
Le();
|
|
12577
12587
|
}, { immediate: !0 }), _e(G, () => {
|
|
12578
12588
|
St(!0);
|
|
@@ -12597,7 +12607,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
12597
12607
|
{ deep: !0 }
|
|
12598
12608
|
), (F, Y) => (s(), h("div", {
|
|
12599
12609
|
class: "map-widget",
|
|
12600
|
-
style:
|
|
12610
|
+
style: at(he.value)
|
|
12601
12611
|
}, [
|
|
12602
12612
|
Y[10] || (Y[10] = n("div", {
|
|
12603
12613
|
id: "map-filter-popover-host",
|
|
@@ -12639,7 +12649,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
12639
12649
|
onFinishPolygon: gn,
|
|
12640
12650
|
onUndo: tn,
|
|
12641
12651
|
"onUpdate:tool": Y[2] || (Y[2] = (Ue) => ve.value = Ue),
|
|
12642
|
-
"onUpdate:strokeColor": Y[3] || (Y[3] = (Ue) =>
|
|
12652
|
+
"onUpdate:strokeColor": Y[3] || (Y[3] = (Ue) => me.value = Ue),
|
|
12643
12653
|
"onUpdate:strokeWidth": Y[4] || (Y[4] = (Ue) => ye.value = Ue)
|
|
12644
12654
|
}, null, 512)
|
|
12645
12655
|
])) : oe("", !0),
|
|
@@ -12789,7 +12799,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
12789
12799
|
ref_key: "drawingCanvasRef",
|
|
12790
12800
|
ref: ee,
|
|
12791
12801
|
tool: ve.value,
|
|
12792
|
-
"stroke-color":
|
|
12802
|
+
"stroke-color": me.value,
|
|
12793
12803
|
"stroke-width": ye.value
|
|
12794
12804
|
}, null, 8, ["tool", "stroke-color", "stroke-width"])) : oe("", !0),
|
|
12795
12805
|
(s(), we(Ct, { to: "body" }, [
|
|
@@ -12808,7 +12818,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
12808
12818
|
At.value[Ue].top.length ? (s(), h("div", Lm, [
|
|
12809
12819
|
n("div", Sm, [
|
|
12810
12820
|
(s(!0), h(de, null, Te(At.value[Ue].top, (Ee) => {
|
|
12811
|
-
var d, b, I,
|
|
12821
|
+
var d, b, I, re, ge, ke, je;
|
|
12812
12822
|
return Ke((s(), h("div", {
|
|
12813
12823
|
key: Ee.id || Ee.type,
|
|
12814
12824
|
class: "map-overlay__item"
|
|
@@ -12830,14 +12840,14 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
12830
12840
|
config: Ee.config
|
|
12831
12841
|
}, null, 8, ["layers", "config"])) : Ee.type === "basemaps" ? (s(), we(So, {
|
|
12832
12842
|
key: 3,
|
|
12833
|
-
layers: ((
|
|
12834
|
-
"default-layer": ((
|
|
12843
|
+
layers: ((re = Ee.config) == null ? void 0 : re.layers) || null,
|
|
12844
|
+
"default-layer": ((ge = Ee.config) == null ? void 0 : ge.default) || null,
|
|
12835
12845
|
title: Ee.title || ((ke = Ee.config) == null ? void 0 : ke.title) || null,
|
|
12836
12846
|
onStateChange: $
|
|
12837
12847
|
}, null, 8, ["layers", "default-layer", "title"])) : Ee.type === "legend" ? (s(), we(fr, {
|
|
12838
12848
|
key: 4,
|
|
12839
|
-
items:
|
|
12840
|
-
}, null, 8, ["items"])) : Ee.type === "filters" &&
|
|
12849
|
+
items: pt(Ee)
|
|
12850
|
+
}, null, 8, ["items"])) : Ee.type === "filters" && rt.value(Ee) ? (s(), we(pr, {
|
|
12841
12851
|
key: 5,
|
|
12842
12852
|
"layer-id": (je = Ee.config) == null ? void 0 : je.layer,
|
|
12843
12853
|
onClose: Ht
|
|
@@ -12857,7 +12867,7 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
12857
12867
|
At.value[Ue].bottom.length ? (s(), h("div", Em, [
|
|
12858
12868
|
n("div", Am, [
|
|
12859
12869
|
(s(!0), h(de, null, Te(At.value[Ue].bottom, (Ee) => {
|
|
12860
|
-
var d, b, I,
|
|
12870
|
+
var d, b, I, re, ge, ke, je;
|
|
12861
12871
|
return Ke((s(), h("div", {
|
|
12862
12872
|
key: Ee.id || Ee.type,
|
|
12863
12873
|
class: "map-overlay__item"
|
|
@@ -12879,14 +12889,14 @@ const Qv = { class: "height-panel-wrap absolute bottom-12 right-0 z-20 animate-s
|
|
|
12879
12889
|
config: Ee.config
|
|
12880
12890
|
}, null, 8, ["layers", "config"])) : Ee.type === "basemaps" ? (s(), we(So, {
|
|
12881
12891
|
key: 3,
|
|
12882
|
-
layers: ((
|
|
12883
|
-
"default-layer": ((
|
|
12892
|
+
layers: ((re = Ee.config) == null ? void 0 : re.layers) || null,
|
|
12893
|
+
"default-layer": ((ge = Ee.config) == null ? void 0 : ge.default) || null,
|
|
12884
12894
|
title: Ee.title || ((ke = Ee.config) == null ? void 0 : ke.title) || null,
|
|
12885
12895
|
onStateChange: $
|
|
12886
12896
|
}, null, 8, ["layers", "default-layer", "title"])) : Ee.type === "legend" ? (s(), we(fr, {
|
|
12887
12897
|
key: 4,
|
|
12888
|
-
items:
|
|
12889
|
-
}, null, 8, ["items"])) : Ee.type === "filters" &&
|
|
12898
|
+
items: pt(Ee)
|
|
12899
|
+
}, null, 8, ["items"])) : Ee.type === "filters" && rt.value(Ee) ? (s(), we(pr, {
|
|
12890
12900
|
key: 5,
|
|
12891
12901
|
"layer-id": (je = Ee.config) == null ? void 0 : je.layer,
|
|
12892
12902
|
onClose: Ht
|
|
@@ -13619,7 +13629,7 @@ export {
|
|
|
13619
13629
|
Ch as c,
|
|
13620
13630
|
Lh as d,
|
|
13621
13631
|
Sh as e,
|
|
13622
|
-
|
|
13632
|
+
ut as f,
|
|
13623
13633
|
cm as g,
|
|
13624
13634
|
pr as h,
|
|
13625
13635
|
So as i,
|