@opengis/gis 0.1.68 → 0.1.70
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/index.css +1 -1
- package/dist/index.js +731 -767
- package/dist/index.umd.cjs +9 -9
- package/package.json +1 -1
- package/server/plugins/mapnik/funcs/mapnik.js +5 -1
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { computed as M, createElementBlock as p, openBlock as c, normalizeStyle as
|
|
2
|
-
import
|
|
1
|
+
import { computed as M, createElementBlock as p, openBlock as c, normalizeStyle as he, createCommentVNode as F, createElementVNode as r, toDisplayString as S, Fragment as B, renderList as W, normalizeClass as K, ref as A, onMounted as xe, resolveDirective as ht, withDirectives as ne, watch as fe, createVNode as N, vModelText as We, vModelCheckbox as qe, defineComponent as Ge, reactive as ft, onBeforeUnmount as gt, createBlock as X, renderSlot as Ne, Teleport as Ke, Transition as vt, withCtx as Z, vShow as Pe, nextTick as Ee, resolveComponent as G, unref as Ze, createTextVNode as ae, createStaticVNode as Be, withModifiers as mt, resolveDynamicComponent as Oe, withKeys as yt, onUnmounted as bt, mergeProps as wt } from "vue";
|
|
2
|
+
import xt from "@opengis/filter";
|
|
3
3
|
const H = (e, t) => {
|
|
4
4
|
const o = e.__vccOpts || e;
|
|
5
|
-
for (const [
|
|
6
|
-
o[
|
|
5
|
+
for (const [s, n] of t)
|
|
6
|
+
o[s] = n;
|
|
7
7
|
return o;
|
|
8
|
-
},
|
|
8
|
+
}, _t = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "p-5 pb-0 flex justify-between items-center"
|
|
11
|
-
},
|
|
11
|
+
}, kt = { class: "inline-block font-semibold text-lg text-gray-800" }, Lt = { class: "flex flex-col gap-1 p-5" }, Ct = { class: "flex items-center justify-between w-full text-sm text-gray-800 ml-2" }, $t = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "ms-2 text-xs text-gray-500"
|
|
14
|
-
},
|
|
14
|
+
}, It = {
|
|
15
15
|
__name: "vs-legend-widget",
|
|
16
16
|
props: {
|
|
17
17
|
config: {
|
|
@@ -21,20 +21,20 @@ const H = (e, t) => {
|
|
|
21
21
|
},
|
|
22
22
|
setup(e) {
|
|
23
23
|
const t = e, o = M(() => {
|
|
24
|
-
var
|
|
25
|
-
return ((
|
|
26
|
-
}),
|
|
27
|
-
var
|
|
28
|
-
return ((
|
|
24
|
+
var n;
|
|
25
|
+
return ((n = t.config) == null ? void 0 : n.items) || [];
|
|
26
|
+
}), s = M(() => {
|
|
27
|
+
var n;
|
|
28
|
+
return ((n = t.config) == null ? void 0 : n.title) || "";
|
|
29
29
|
});
|
|
30
|
-
return (
|
|
30
|
+
return (n, i) => (c(), p("div", {
|
|
31
31
|
class: "legend-widget flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative",
|
|
32
|
-
style:
|
|
32
|
+
style: he({ width: e.config.width || "100%" })
|
|
33
33
|
}, [
|
|
34
|
-
|
|
35
|
-
r("h2",
|
|
34
|
+
s.value ? (c(), p("div", _t, [
|
|
35
|
+
r("h2", kt, S(s.value), 1)
|
|
36
36
|
])) : F("", !0),
|
|
37
|
-
r("div",
|
|
37
|
+
r("div", Lt, [
|
|
38
38
|
(c(!0), p(B, null, W(o.value, (d) => (c(), p("div", {
|
|
39
39
|
class: "flex items-center",
|
|
40
40
|
key: d.label
|
|
@@ -46,17 +46,17 @@ const H = (e, t) => {
|
|
|
46
46
|
d.shape === "line" ? "w-6 h-0.5" : "",
|
|
47
47
|
d.shape === "dashed-line" ? "w-6 h-0.5 dashed-line" : ""
|
|
48
48
|
]]),
|
|
49
|
-
style:
|
|
49
|
+
style: he({ backgroundColor: d.color })
|
|
50
50
|
}, null, 6),
|
|
51
|
-
r("span",
|
|
51
|
+
r("span", Ct, [
|
|
52
52
|
r("span", null, S(d.label), 1),
|
|
53
|
-
d.count !== void 0 ? (c(), p("span",
|
|
53
|
+
d.count !== void 0 ? (c(), p("span", $t, " (" + S(d.count) + ") ", 1)) : F("", !0)
|
|
54
54
|
])
|
|
55
55
|
]))), 128))
|
|
56
56
|
])
|
|
57
57
|
], 4));
|
|
58
58
|
}
|
|
59
|
-
},
|
|
59
|
+
}, Vt = /* @__PURE__ */ H(It, [["__scopeId", "data-v-dd12cf90"]]), St = { class: "flex flex-row gap-x-3 z-10 relative" }, Ft = ["onClick"], jt = ["src", "alt"], Pt = {
|
|
60
60
|
__name: "vs-basemaps-widget",
|
|
61
61
|
props: {
|
|
62
62
|
map: {
|
|
@@ -73,7 +73,7 @@ const H = (e, t) => {
|
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
setup(e) {
|
|
76
|
-
const t = e, o = A("voyager"),
|
|
76
|
+
const t = e, o = A("voyager"), s = M(() => {
|
|
77
77
|
var g;
|
|
78
78
|
if (!((g = t.config) != null && g.layers)) return [];
|
|
79
79
|
const v = t.config.layers.map((l) => ({
|
|
@@ -98,7 +98,7 @@ const H = (e, t) => {
|
|
|
98
98
|
owner: ""
|
|
99
99
|
}), v;
|
|
100
100
|
});
|
|
101
|
-
function
|
|
101
|
+
function n(v) {
|
|
102
102
|
return {
|
|
103
103
|
version: 8,
|
|
104
104
|
sources: {
|
|
@@ -120,7 +120,7 @@ const H = (e, t) => {
|
|
|
120
120
|
}
|
|
121
121
|
const i = (v) => {
|
|
122
122
|
if (!t.map) return;
|
|
123
|
-
const g = t.map.getStyle(), l =
|
|
123
|
+
const g = t.map.getStyle(), l = s.value.map((h) => h.id), u = g.layers.filter((h) => !l.includes(h.id)), a = {};
|
|
124
124
|
for (const h in g.sources)
|
|
125
125
|
l.includes(h) || (a[h] = g.sources[h]);
|
|
126
126
|
if (v.id === "__none__") {
|
|
@@ -132,7 +132,7 @@ const H = (e, t) => {
|
|
|
132
132
|
t.map.setStyle(h);
|
|
133
133
|
return;
|
|
134
134
|
}
|
|
135
|
-
const m =
|
|
135
|
+
const m = n(v);
|
|
136
136
|
t.map.setStyle(m), t.map.once("styledata", () => {
|
|
137
137
|
for (const [h, f] of Object.entries(a))
|
|
138
138
|
t.map.getSource(h) || t.map.addSource(h, f);
|
|
@@ -141,16 +141,16 @@ const H = (e, t) => {
|
|
|
141
141
|
});
|
|
142
142
|
}, d = (v) => {
|
|
143
143
|
o.value = v;
|
|
144
|
-
const g =
|
|
144
|
+
const g = s.value.find((l) => l.id === v);
|
|
145
145
|
g && t.map && i(g);
|
|
146
146
|
};
|
|
147
147
|
return xe(() => {
|
|
148
148
|
var v;
|
|
149
149
|
(v = t.config) != null && v.default && (o.value = t.config.default), d(o.value);
|
|
150
150
|
}), (v, g) => {
|
|
151
|
-
const l =
|
|
152
|
-
return c(), p("div",
|
|
153
|
-
(c(!0), p(B, null, W(
|
|
151
|
+
const l = ht("tooltip");
|
|
152
|
+
return c(), p("div", St, [
|
|
153
|
+
(c(!0), p(B, null, W(s.value, (u) => ne((c(), p("div", {
|
|
154
154
|
trigger: "hover",
|
|
155
155
|
placement: "top",
|
|
156
156
|
key: u.id
|
|
@@ -167,8 +167,8 @@ const H = (e, t) => {
|
|
|
167
167
|
src: u.image,
|
|
168
168
|
alt: u.title,
|
|
169
169
|
class: K(["object-cover rounded-lg", u.id === "__none__" ? "w-10 h-10" : "w-12 h-12"])
|
|
170
|
-
}, null, 10,
|
|
171
|
-
], 10,
|
|
170
|
+
}, null, 10, jt)) : F("", !0)
|
|
171
|
+
], 10, Ft)
|
|
172
172
|
])), [
|
|
173
173
|
[l, u.title]
|
|
174
174
|
])), 128))
|
|
@@ -176,7 +176,7 @@ const H = (e, t) => {
|
|
|
176
176
|
};
|
|
177
177
|
}
|
|
178
178
|
};
|
|
179
|
-
function
|
|
179
|
+
function $e(e) {
|
|
180
180
|
if (!e.attrType || !e.attribute || !e.rules)
|
|
181
181
|
return e.color || "#ccc";
|
|
182
182
|
const t = e.rules.map((o) => [
|
|
@@ -185,7 +185,7 @@ function Ie(e) {
|
|
|
185
185
|
]);
|
|
186
186
|
return t.push(e.color || "#ccc"), ["case", ...t.flat()];
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function Et(e) {
|
|
189
189
|
if (!e.attrType || e.attrType !== "icon-by-attribute" || !e.attribute || !e.rules)
|
|
190
190
|
return e.default_icon || null;
|
|
191
191
|
const t = e.rules.map((o) => [
|
|
@@ -203,7 +203,7 @@ function Xe(e) {
|
|
|
203
203
|
]);
|
|
204
204
|
return t.push(e.fillPattern || ""), ["case", ...t.flat()];
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function ue(e, t = "stroke", o = "#ccc") {
|
|
207
207
|
return [
|
|
208
208
|
"case",
|
|
209
209
|
["boolean", ["feature-state", "hovered"], !1],
|
|
@@ -213,14 +213,14 @@ function pe(e, t = "stroke", o = "#ccc") {
|
|
|
213
213
|
e[t] || o
|
|
214
214
|
];
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function Mt(e) {
|
|
217
217
|
const t = [
|
|
218
218
|
{
|
|
219
219
|
type: "fill",
|
|
220
220
|
minzoom: e.pointZoom || 0,
|
|
221
221
|
paint: {
|
|
222
|
-
"fill-color":
|
|
223
|
-
"fill-outline-color":
|
|
222
|
+
"fill-color": $e(e),
|
|
223
|
+
"fill-outline-color": ue(e, "stroke", "#ccc"),
|
|
224
224
|
"fill-opacity": e.opacity || 1,
|
|
225
225
|
...e.attrType === "attribute-pattern" && {
|
|
226
226
|
"fill-pattern": Xe(e)
|
|
@@ -231,7 +231,7 @@ function Pt(e) {
|
|
|
231
231
|
{
|
|
232
232
|
type: "line",
|
|
233
233
|
paint: {
|
|
234
|
-
"line-color":
|
|
234
|
+
"line-color": ue(e, "stroke", "#ccc"),
|
|
235
235
|
"line-width": e.width || 2,
|
|
236
236
|
"line-opacity": e.lineOpacity || e.opacity || 1
|
|
237
237
|
}
|
|
@@ -242,18 +242,18 @@ function Pt(e) {
|
|
|
242
242
|
maxzoom: e.pointZoom,
|
|
243
243
|
paint: {
|
|
244
244
|
"circle-color": e.color || "#ccc",
|
|
245
|
-
"circle-stroke-color":
|
|
245
|
+
"circle-stroke-color": ue(e, "stroke", "#ccc"),
|
|
246
246
|
"circle-stroke-width": e.width || 2,
|
|
247
247
|
"circle-opacity": e.opacity || 1
|
|
248
248
|
}
|
|
249
249
|
}), t;
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function Tt(e) {
|
|
252
252
|
return [
|
|
253
253
|
{
|
|
254
254
|
type: "line",
|
|
255
255
|
paint: {
|
|
256
|
-
"line-color":
|
|
256
|
+
"line-color": ue(e, "color", $e(e)),
|
|
257
257
|
"line-width": e.width || 2,
|
|
258
258
|
"line-opacity": e.opacity || 1,
|
|
259
259
|
...e.dashArray && { "line-dasharray": e.dashArray }
|
|
@@ -265,16 +265,16 @@ function Et(e) {
|
|
|
265
265
|
}
|
|
266
266
|
];
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function zt(e) {
|
|
269
269
|
const t = [
|
|
270
270
|
{
|
|
271
271
|
type: "circle",
|
|
272
272
|
maxzoom: e.icon && +e.iconZoom || 22,
|
|
273
273
|
paint: {
|
|
274
274
|
"circle-radius": e.radius || 6,
|
|
275
|
-
"circle-stroke-color":
|
|
275
|
+
"circle-stroke-color": ue(e, "stroke", "#ccc"),
|
|
276
276
|
"circle-stroke-width": e.width || 2,
|
|
277
|
-
"circle-color":
|
|
277
|
+
"circle-color": $e(e),
|
|
278
278
|
"circle-opacity": e.opacity || 1
|
|
279
279
|
}
|
|
280
280
|
}
|
|
@@ -303,15 +303,15 @@ function Mt(e) {
|
|
|
303
303
|
}
|
|
304
304
|
}), t;
|
|
305
305
|
}
|
|
306
|
-
function
|
|
307
|
-
const
|
|
308
|
-
return
|
|
306
|
+
function At(e, t, o) {
|
|
307
|
+
const s = e.type || "point";
|
|
308
|
+
return s === "polygon" ? [
|
|
309
309
|
{
|
|
310
310
|
type: "fill",
|
|
311
311
|
...o !== void 0 ? { maxzoom: o } : {},
|
|
312
312
|
paint: {
|
|
313
|
-
"fill-color":
|
|
314
|
-
"fill-outline-color":
|
|
313
|
+
"fill-color": $e(e),
|
|
314
|
+
"fill-outline-color": ue(e, "stroke", "#ccc"),
|
|
315
315
|
"fill-opacity": e.opacity || 1,
|
|
316
316
|
...e.attrType === "attribute-pattern" && {
|
|
317
317
|
"fill-pattern": Xe(e)
|
|
@@ -323,17 +323,17 @@ function Tt(e, t, o) {
|
|
|
323
323
|
type: "line",
|
|
324
324
|
...o !== void 0 ? { maxzoom: o } : {},
|
|
325
325
|
paint: {
|
|
326
|
-
"line-color":
|
|
326
|
+
"line-color": ue(e, "stroke", "#ccc"),
|
|
327
327
|
"line-width": e.width || 2,
|
|
328
328
|
"line-opacity": e.lineOpacity || e.opacity || 1
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
|
-
] :
|
|
331
|
+
] : s === "line" ? [
|
|
332
332
|
{
|
|
333
333
|
type: "line",
|
|
334
334
|
...o !== void 0 ? { maxzoom: o } : {},
|
|
335
335
|
paint: {
|
|
336
|
-
"line-color":
|
|
336
|
+
"line-color": ue(e, "color", $e(e)),
|
|
337
337
|
"line-width": e.width || 2,
|
|
338
338
|
"line-opacity": e.opacity || 1,
|
|
339
339
|
...e.dashArray && { "line-dasharray": e.dashArray }
|
|
@@ -349,24 +349,24 @@ function Tt(e, t, o) {
|
|
|
349
349
|
...o !== void 0 ? { maxzoom: o } : {},
|
|
350
350
|
paint: {
|
|
351
351
|
"circle-radius": e.radius || 6,
|
|
352
|
-
"circle-stroke-color":
|
|
352
|
+
"circle-stroke-color": ue(e, "stroke", "#ccc"),
|
|
353
353
|
"circle-stroke-width": e.width || 2,
|
|
354
|
-
"circle-color":
|
|
354
|
+
"circle-color": $e(e),
|
|
355
355
|
"circle-opacity": e.opacity || 1
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
358
|
];
|
|
359
359
|
}
|
|
360
360
|
function et(e) {
|
|
361
|
-
var o,
|
|
361
|
+
var o, s;
|
|
362
362
|
if (!e) return null;
|
|
363
363
|
if (e.attrType === "icon-by-attribute" && e.iconZoom) {
|
|
364
|
-
const
|
|
364
|
+
const n = Et(e), i = Array.isArray(n) && n[0] === "case" ? n : [
|
|
365
365
|
"case",
|
|
366
|
-
["==", ["get", e.attribute], ((
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
], d =
|
|
366
|
+
["==", ["get", e.attribute], ((s = (o = e.rules) == null ? void 0 : o[0]) == null ? void 0 : s.value) || ""],
|
|
367
|
+
n,
|
|
368
|
+
n
|
|
369
|
+
], d = At(e, void 0, +e.iconZoom), v = {
|
|
370
370
|
type: "symbol",
|
|
371
371
|
minzoom: +e.iconZoom,
|
|
372
372
|
layout: {
|
|
@@ -382,44 +382,44 @@ function et(e) {
|
|
|
382
382
|
return [...d, v];
|
|
383
383
|
}
|
|
384
384
|
const t = e.type || "point";
|
|
385
|
-
return t === "polygon" ?
|
|
385
|
+
return t === "polygon" ? Mt(e) : t === "line" ? Tt(e) : zt(e);
|
|
386
386
|
}
|
|
387
|
-
function
|
|
387
|
+
function Bt(e) {
|
|
388
388
|
return e.startsWith("http") ? e : `${window.location.origin}${e}`;
|
|
389
389
|
}
|
|
390
|
-
function
|
|
390
|
+
function Ot(e) {
|
|
391
391
|
const {
|
|
392
392
|
id: t,
|
|
393
393
|
sourceLayer: o,
|
|
394
|
-
url:
|
|
395
|
-
bounds:
|
|
394
|
+
url: s,
|
|
395
|
+
bounds: n,
|
|
396
396
|
title: i,
|
|
397
397
|
style: d,
|
|
398
398
|
service: v,
|
|
399
399
|
service_type: g,
|
|
400
400
|
source_type: l,
|
|
401
401
|
data: u
|
|
402
|
-
} = e, a =
|
|
402
|
+
} = e, a = Bt(s), m = g || v || l || "vector";
|
|
403
403
|
switch (m) {
|
|
404
404
|
case "vtile":
|
|
405
405
|
case "vector":
|
|
406
|
-
return
|
|
406
|
+
return Ut(
|
|
407
407
|
t,
|
|
408
408
|
o,
|
|
409
409
|
a,
|
|
410
|
-
|
|
410
|
+
n,
|
|
411
411
|
i,
|
|
412
412
|
d
|
|
413
413
|
);
|
|
414
414
|
case "raster":
|
|
415
|
-
return
|
|
415
|
+
return Rt(t, a, n, i, d);
|
|
416
416
|
case "geojson":
|
|
417
|
-
return
|
|
417
|
+
return Ht(t, u || a, n, i, d);
|
|
418
418
|
default:
|
|
419
419
|
throw new Error(`Unsupported layer service type: ${m}`);
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function Dt(e) {
|
|
423
423
|
switch (e) {
|
|
424
424
|
case "polygon":
|
|
425
425
|
return { type: "polygon", color: "#3388ff", opacity: 0.5 };
|
|
@@ -430,11 +430,11 @@ function Bt(e) {
|
|
|
430
430
|
return { type: "point", color: "#3388ff", radius: 6, opacity: 1 };
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
|
-
function
|
|
433
|
+
function Ut(e, t, o, s, n, i) {
|
|
434
434
|
const d = t || (o.match(/\/vtile\/([^/]+)/) || [])[1] || e, v = {
|
|
435
435
|
type: "vector",
|
|
436
436
|
tiles: [o],
|
|
437
|
-
...
|
|
437
|
+
...s && { bounds: s }
|
|
438
438
|
}, u = et(i || {}).map((a, m) => ({
|
|
439
439
|
...a,
|
|
440
440
|
id: `${e}-${m}`,
|
|
@@ -443,19 +443,19 @@ function Ot(e, t, o, n, s, i) {
|
|
|
443
443
|
}));
|
|
444
444
|
return {
|
|
445
445
|
id: e,
|
|
446
|
-
title:
|
|
446
|
+
title: n,
|
|
447
447
|
source: v,
|
|
448
448
|
layers: u,
|
|
449
449
|
visible: !0
|
|
450
450
|
};
|
|
451
451
|
}
|
|
452
|
-
function
|
|
452
|
+
function Rt(e, t, o, s, n) {
|
|
453
453
|
const i = {
|
|
454
454
|
type: "raster",
|
|
455
455
|
tiles: [t],
|
|
456
456
|
tileSize: 256,
|
|
457
457
|
...o && { bounds: o }
|
|
458
|
-
}, d =
|
|
458
|
+
}, d = n || {}, v = {
|
|
459
459
|
id: e,
|
|
460
460
|
type: "raster",
|
|
461
461
|
source: e,
|
|
@@ -466,13 +466,13 @@ function Dt(e, t, o, n, s) {
|
|
|
466
466
|
};
|
|
467
467
|
return {
|
|
468
468
|
id: e,
|
|
469
|
-
title:
|
|
469
|
+
title: s,
|
|
470
470
|
source: i,
|
|
471
471
|
layers: [v],
|
|
472
472
|
visible: !0
|
|
473
473
|
};
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function Ht(e, t, o, s, n) {
|
|
476
476
|
var u;
|
|
477
477
|
const i = {
|
|
478
478
|
type: "geojson",
|
|
@@ -484,20 +484,20 @@ function Ut(e, t, o, n, s) {
|
|
|
484
484
|
const a = (u = t.features[0].geometry) == null ? void 0 : u.type;
|
|
485
485
|
a === "Polygon" || a === "MultiPolygon" ? d = "polygon" : a === "LineString" || a === "MultiLineString" ? d = "line" : d = "point";
|
|
486
486
|
}
|
|
487
|
-
const v =
|
|
487
|
+
const v = n || Dt(d), l = et(v).map((a, m) => ({
|
|
488
488
|
...a,
|
|
489
489
|
id: `${e}-${m}`,
|
|
490
490
|
source: e
|
|
491
491
|
}));
|
|
492
492
|
return {
|
|
493
493
|
id: e,
|
|
494
|
-
title:
|
|
494
|
+
title: s,
|
|
495
495
|
source: i,
|
|
496
496
|
layers: l,
|
|
497
497
|
visible: !0
|
|
498
498
|
};
|
|
499
499
|
}
|
|
500
|
-
function
|
|
500
|
+
function Nt(e) {
|
|
501
501
|
if (!e || e.attrType !== "icon-by-attribute") return [];
|
|
502
502
|
const t = /* @__PURE__ */ new Set();
|
|
503
503
|
return e.default_icon && t.add(e.default_icon), Array.isArray(e.rules) && e.rules.forEach((o) => {
|
|
@@ -507,67 +507,82 @@ function Rt(e) {
|
|
|
507
507
|
url: (e.icon_base_url || "") + o
|
|
508
508
|
}));
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function Wt(e) {
|
|
511
511
|
const t = /* @__PURE__ */ new Set();
|
|
512
|
-
function o(
|
|
513
|
-
typeof
|
|
512
|
+
function o(s) {
|
|
513
|
+
typeof s == "string" ? t.add(s) : Array.isArray(s) && s.forEach(o);
|
|
514
514
|
}
|
|
515
515
|
return e && e["icon-image"] && o(e["icon-image"]), Array.from(t);
|
|
516
516
|
}
|
|
517
517
|
async function tt(e, t) {
|
|
518
|
-
const o = t.map(async ({ name:
|
|
519
|
-
const i = await e.loadImage(
|
|
520
|
-
return { name:
|
|
518
|
+
const o = t.map(async ({ name: s, url: n }) => {
|
|
519
|
+
const i = await e.loadImage(n);
|
|
520
|
+
return { name: s, data: i.data };
|
|
521
521
|
});
|
|
522
522
|
try {
|
|
523
|
-
const
|
|
524
|
-
for (const { name:
|
|
525
|
-
e.hasImage(
|
|
526
|
-
} catch (
|
|
527
|
-
console.error("Failed to load icons:",
|
|
523
|
+
const s = await Promise.all(o);
|
|
524
|
+
for (const { name: n, data: i } of s)
|
|
525
|
+
e.hasImage(n) || e.addImage(n, i);
|
|
526
|
+
} catch (s) {
|
|
527
|
+
console.error("Failed to load icons:", s);
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
|
-
function
|
|
531
|
-
const
|
|
532
|
-
return tt(e,
|
|
530
|
+
function Zt(e, t, o = "/icons/") {
|
|
531
|
+
const n = Wt(t).map((i) => ({ name: i, url: o + i }));
|
|
532
|
+
return tt(e, n);
|
|
533
533
|
}
|
|
534
534
|
async function we(e, t) {
|
|
535
|
-
const o =
|
|
536
|
-
|
|
537
|
-
for (const
|
|
538
|
-
t.visible !== void 0 && (
|
|
539
|
-
...
|
|
535
|
+
const o = Ot(t), s = Nt(t.style);
|
|
536
|
+
s.length > 0 && await tt(e, s), t.layout && t.layout["icon-image"] && await Zt(e, t.layout), e.getSource(o.id) || e.addSource(o.id, o.source);
|
|
537
|
+
for (const n of o.layers)
|
|
538
|
+
t.visible !== void 0 && (n.layout = {
|
|
539
|
+
...n.layout,
|
|
540
540
|
visibility: t.visible ? "visible" : "none"
|
|
541
|
-
}), e.getLayer(
|
|
542
|
-
|
|
541
|
+
}), e.getLayer(n.id) ? e.setLayoutProperty(
|
|
542
|
+
n.id,
|
|
543
543
|
"visibility",
|
|
544
544
|
t.visible ? "visible" : "none"
|
|
545
|
-
) : await e.addLayer(
|
|
545
|
+
) : await e.addLayer(n);
|
|
546
546
|
return o;
|
|
547
547
|
}
|
|
548
548
|
function Ce(e, t) {
|
|
549
|
-
e.getStyle().layers.filter((
|
|
550
|
-
e.removeLayer(
|
|
549
|
+
e.getStyle().layers.filter((n) => n.source === t).forEach((n) => {
|
|
550
|
+
e.removeLayer(n.id);
|
|
551
551
|
}), e.getSource(t) && e.removeSource(t);
|
|
552
552
|
}
|
|
553
|
-
const
|
|
553
|
+
const qt = {}, Gt = {
|
|
554
|
+
width: "24",
|
|
555
|
+
height: "24",
|
|
556
|
+
viewBox: "0 0 24 24",
|
|
557
|
+
fill: "none",
|
|
558
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
559
|
+
};
|
|
560
|
+
function Jt(e, t) {
|
|
561
|
+
return c(), p("svg", Gt, [...t[0] || (t[0] = [
|
|
562
|
+
r("path", {
|
|
563
|
+
d: "M11 19C15.4183 19 19 15.4183 19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11C3 15.4183 6.58172 19 11 19Z",
|
|
564
|
+
stroke: "black",
|
|
565
|
+
"stroke-linecap": "round",
|
|
566
|
+
"stroke-linejoin": "round"
|
|
567
|
+
}, null, -1),
|
|
568
|
+
r("path", {
|
|
569
|
+
d: "M21.0002 21L16.7002 16.7",
|
|
570
|
+
stroke: "black",
|
|
571
|
+
"stroke-linecap": "round",
|
|
572
|
+
"stroke-linejoin": "round"
|
|
573
|
+
}, null, -1)
|
|
574
|
+
])]);
|
|
575
|
+
}
|
|
576
|
+
const ot = /* @__PURE__ */ H(qt, [["render", Jt]]), Qt = { class: "w-full flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative" }, Yt = { class: "flex flex-col justify-between h-full pb-5 px-5" }, Kt = {
|
|
554
577
|
key: 0,
|
|
555
578
|
class: "relative mb-[10px]"
|
|
556
|
-
},
|
|
557
|
-
width: "16",
|
|
558
|
-
height: "17",
|
|
559
|
-
viewBox: "0 0 16 17",
|
|
560
|
-
fill: "none",
|
|
561
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
562
|
-
class: "absolute top-1/2 left-[8px] w-[16px] h-[16px]",
|
|
563
|
-
style: { transform: "translate(0px, -50%)" }
|
|
564
|
-
}, Jt = {
|
|
579
|
+
}, Xt = {
|
|
565
580
|
key: 1,
|
|
566
581
|
class: "mb-4"
|
|
567
|
-
},
|
|
582
|
+
}, eo = { class: "" }, to = { class: "space-y-2" }, oo = { class: "flex items-center gap-[10px] text-gray-500" }, ro = { class: "dataset-checkbox-container flex" }, so = ["onUpdate:modelValue", "onChange"], no = { class: "text-sm" }, io = ["onClick"], ao = ["innerHTML"], lo = {
|
|
568
583
|
key: 0,
|
|
569
584
|
class: "text-sm text-gray-500 text-center py-2"
|
|
570
|
-
},
|
|
585
|
+
}, co = {
|
|
571
586
|
__name: "vs-layers-widget",
|
|
572
587
|
props: {
|
|
573
588
|
map: {
|
|
@@ -597,7 +612,7 @@ const Nt = { class: "w-full flex flex-col bg-white border border-stone-200 shado
|
|
|
597
612
|
},
|
|
598
613
|
emits: ["set-filter-layer", "update:enabledLayerIds"],
|
|
599
614
|
setup(e, { emit: t }) {
|
|
600
|
-
const o = e,
|
|
615
|
+
const o = e, s = t, n = A(""), i = A([]);
|
|
601
616
|
function d() {
|
|
602
617
|
const f = new URLSearchParams(window.location.search).get("layers");
|
|
603
618
|
return f ? f.split(",") : [];
|
|
@@ -618,85 +633,72 @@ const Nt = { class: "w-full flex flex-col bg-white border border-stone-200 shado
|
|
|
618
633
|
visible: f.visible ?? !1
|
|
619
634
|
})), i.value.forEach((f) => {
|
|
620
635
|
f.visible && we(o.map, f);
|
|
621
|
-
}),
|
|
636
|
+
}), s("update:enabledLayerIds", u());
|
|
622
637
|
});
|
|
623
638
|
const g = M(() => {
|
|
624
|
-
if (!
|
|
625
|
-
const h =
|
|
639
|
+
if (!n.value) return i.value;
|
|
640
|
+
const h = n.value.toLowerCase();
|
|
626
641
|
return i.value.filter((f) => (f.title || f.name || f.label || "").toLowerCase().includes(h));
|
|
627
642
|
}), l = M(() => i.value.every((h) => h.visible)), u = () => i.value.filter((h) => h.visible).map((h) => h.id), a = (h) => {
|
|
628
|
-
h.visible ? we(o.map, h) : (Ce(o.map, h.id),
|
|
643
|
+
h.visible ? we(o.map, h) : (Ce(o.map, h.id), s("set-filter-layer", null)), o.map.getStyle().layers.filter((j) => j.source === h.id).forEach((j) => {
|
|
629
644
|
o.map.setLayoutProperty(
|
|
630
645
|
j.id,
|
|
631
646
|
"visibility",
|
|
632
647
|
h.visible ? "visible" : "none"
|
|
633
648
|
);
|
|
634
|
-
}),
|
|
649
|
+
}), s("update:enabledLayerIds", u());
|
|
635
650
|
}, m = () => {
|
|
636
651
|
const h = !l.value;
|
|
637
652
|
i.value.forEach((f) => {
|
|
638
653
|
f.visible = h, h ? we(o.map, f) : Ce(o.map, f.id);
|
|
639
|
-
}), h ||
|
|
654
|
+
}), h || s("set-filter-layer", null), s("update:enabledLayerIds", u());
|
|
640
655
|
};
|
|
641
|
-
return
|
|
656
|
+
return fe(
|
|
642
657
|
() => u(),
|
|
643
658
|
(h) => {
|
|
644
659
|
o.history && v(h);
|
|
645
660
|
},
|
|
646
661
|
{ deep: !0 }
|
|
647
|
-
), (h, f) => (c(), p("div",
|
|
648
|
-
f[
|
|
662
|
+
), (h, f) => (c(), p("div", Qt, [
|
|
663
|
+
f[1] || (f[1] = r("div", { class: "p-5 pb-3 flex justify-between items-center" }, [
|
|
649
664
|
r("h2", { class: "inline-block font-semibold text-lg text-gray-800" }, "Шари")
|
|
650
665
|
], -1)),
|
|
651
|
-
r("div",
|
|
652
|
-
e.config.search ? (c(), p("div",
|
|
666
|
+
r("div", Yt, [
|
|
667
|
+
e.config.search ? (c(), p("div", Kt, [
|
|
653
668
|
ne(r("input", {
|
|
654
669
|
type: "text",
|
|
655
|
-
"onUpdate:modelValue": f[0] || (f[0] = (L) =>
|
|
670
|
+
"onUpdate:modelValue": f[0] || (f[0] = (L) => n.value = L),
|
|
656
671
|
placeholder: "Введіть назву шару...",
|
|
657
|
-
class: "py-[7px] ps-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 disabled:opacity-50 disabled:pointer-events-none"
|
|
672
|
+
class: "py-[7px] ps-8 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 disabled:opacity-50 disabled:pointer-events-none"
|
|
658
673
|
}, null, 512), [
|
|
659
|
-
[
|
|
674
|
+
[We, n.value]
|
|
660
675
|
]),
|
|
661
|
-
(
|
|
662
|
-
r("path", {
|
|
663
|
-
d: "M7.33333 13.1667C10.2789 13.1667 12.6667 10.7789 12.6667 7.83333C12.6667 4.88781 10.2789 2.5 7.33333 2.5C4.38781 2.5 2 4.88781 2 7.83333C2 10.7789 4.38781 13.1667 7.33333 13.1667Z",
|
|
664
|
-
stroke: "#6B7280",
|
|
665
|
-
"stroke-linecap": "round",
|
|
666
|
-
"stroke-linejoin": "round"
|
|
667
|
-
}, null, -1),
|
|
668
|
-
r("path", {
|
|
669
|
-
d: "M13.9995 14.5L11.1328 11.6333",
|
|
670
|
-
stroke: "#6B7280",
|
|
671
|
-
"stroke-linecap": "round",
|
|
672
|
-
"stroke-linejoin": "round"
|
|
673
|
-
}, null, -1)
|
|
674
|
-
])]))
|
|
676
|
+
N(ot)
|
|
675
677
|
])) : F("", !0),
|
|
676
|
-
e.config.allow_toggle_all ? (c(), p("div",
|
|
678
|
+
e.config.allow_toggle_all ? (c(), p("div", Xt, [
|
|
677
679
|
r("button", {
|
|
678
680
|
onClick: m,
|
|
679
681
|
class: "w-full py-[7px] bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors"
|
|
680
682
|
}, S(l.value ? "Вимкнути всі" : "Увімкнути всі"), 1)
|
|
681
683
|
])) : F("", !0),
|
|
682
|
-
r("div",
|
|
683
|
-
r("ul",
|
|
684
|
+
r("div", eo, [
|
|
685
|
+
r("ul", to, [
|
|
684
686
|
(c(!0), p(B, null, W(g.value, (L) => (c(), p("li", {
|
|
685
687
|
key: L.id,
|
|
686
688
|
class: "flex flex-wrap justify-between items-center gap-x-2"
|
|
687
689
|
}, [
|
|
688
|
-
r("label",
|
|
689
|
-
r("span",
|
|
690
|
+
r("label", oo, [
|
|
691
|
+
r("span", ro, [
|
|
690
692
|
ne(r("input", {
|
|
691
693
|
class: "dataset-checkbox",
|
|
692
694
|
type: "checkbox",
|
|
693
695
|
"onUpdate:modelValue": (j) => L.visible = j,
|
|
694
696
|
onChange: () => a(L)
|
|
695
|
-
}, null, 40,
|
|
697
|
+
}, null, 40, so), [
|
|
696
698
|
[qe, L.visible]
|
|
697
699
|
])
|
|
698
700
|
]),
|
|
699
|
-
r("span",
|
|
701
|
+
r("span", no, S(L.title || L.name || L.label), 1)
|
|
700
702
|
]),
|
|
701
703
|
L.actions && L.visible ? (c(!0), p(B, { key: 0 }, W(L.actions, (j) => (c(), p("div", {
|
|
702
704
|
key: j.id
|
|
@@ -707,18 +709,18 @@ const Nt = { class: "w-full flex flex-col bg-white border border-stone-200 shado
|
|
|
707
709
|
}, [
|
|
708
710
|
r("div", {
|
|
709
711
|
innerHTML: j.icon
|
|
710
|
-
}, null, 8,
|
|
711
|
-
], 8,
|
|
712
|
+
}, null, 8, ao)
|
|
713
|
+
], 8, io)
|
|
712
714
|
]))), 128)) : F("", !0)
|
|
713
715
|
]))), 128)),
|
|
714
|
-
|
|
716
|
+
n.value && g.value.length === 0 ? (c(), p("li", lo, " Шарів не знайдено ")) : F("", !0)
|
|
715
717
|
])
|
|
716
718
|
])
|
|
717
719
|
])
|
|
718
720
|
]));
|
|
719
721
|
}
|
|
720
722
|
};
|
|
721
|
-
|
|
723
|
+
Ge({
|
|
722
724
|
props: {
|
|
723
725
|
modelValue: { type: Boolean, default: () => !1 },
|
|
724
726
|
title: { type: String, default: () => "" },
|
|
@@ -759,49 +761,49 @@ Ye({
|
|
|
759
761
|
}
|
|
760
762
|
}
|
|
761
763
|
});
|
|
762
|
-
const
|
|
764
|
+
const je = async (e, t, o, s = 10) => {
|
|
763
765
|
var L, j, T, k;
|
|
764
766
|
if (!t || !o) return;
|
|
765
|
-
await
|
|
766
|
-
const
|
|
767
|
-
if (!i || !
|
|
767
|
+
await Ee();
|
|
768
|
+
const n = await (o == null ? void 0 : o.getBoundingClientRect()), i = await (t == null ? void 0 : t.getBoundingClientRect());
|
|
769
|
+
if (!i || !n) return;
|
|
768
770
|
const d = await parseInt((L = t == null ? void 0 : t.getBoundingClientRect()) == null ? void 0 : L.height), v = await parseInt((j = t == null ? void 0 : t.getBoundingClientRect()) == null ? void 0 : j.width), g = await parseInt((T = o == null ? void 0 : o.getBoundingClientRect()) == null ? void 0 : T.height), l = await parseInt((k = o == null ? void 0 : o.getBoundingClientRect()) == null ? void 0 : k.width), u = await window.innerHeight, a = await window.innerWidth;
|
|
769
771
|
let m = 0, h = 0;
|
|
770
|
-
const f = i.bottom +
|
|
772
|
+
const f = i.bottom + s + g;
|
|
771
773
|
switch (e) {
|
|
772
774
|
case "top":
|
|
773
|
-
i.top -
|
|
775
|
+
i.top - n.height - s < 0 ? m = i.top - n.height + s + g + d : m = i.top - n.height - s, a > l + i.right + 30 ? h = i.left - n.width / 2 + i.width / 2 : h = a - 30 - l;
|
|
774
776
|
break;
|
|
775
777
|
case "bottom":
|
|
776
|
-
u > f ? m = i.bottom +
|
|
778
|
+
u > f ? m = i.bottom + s : m = i.bottom - s - g - d, h = i.left - n.width / 2 + i.width / 2;
|
|
777
779
|
break;
|
|
778
780
|
case "left":
|
|
779
|
-
m = i.top -
|
|
781
|
+
m = i.top - n.height / 2 + i.height / 2, i.left - n.width - s > 0 ? h = i.left - n.width - s : h = 10;
|
|
780
782
|
break;
|
|
781
783
|
case "right":
|
|
782
|
-
m = i.top -
|
|
784
|
+
m = i.top - n.height / 2 + i.height / 2, a - v > l ? h = i.right + s : h = a - 30 - l;
|
|
783
785
|
break;
|
|
784
786
|
case "top-right":
|
|
785
|
-
i.top -
|
|
787
|
+
i.top - n.height - s < 0 ? m = i.top - n.height + s + g + d : m = i.top - n.height - s, a - v > l ? h = i.right + s : h = a - 30 - l;
|
|
786
788
|
break;
|
|
787
789
|
case "top-left":
|
|
788
|
-
i.top -
|
|
790
|
+
i.top - n.height - s < 0 ? m = i.top - n.height + s + g + d : m = i.top - n.height - s, i.left - n.width - s > 0 ? h = i.left - n.width - s : h = 10;
|
|
789
791
|
break;
|
|
790
792
|
case "top-start":
|
|
791
|
-
i.top -
|
|
793
|
+
i.top - n.height - s < 0 ? m = i.top - n.height + s + g + d : m = i.top - n.height - s, i.left > 0 ? h = i.left : h = 10;
|
|
792
794
|
break;
|
|
793
795
|
case "bottom-right":
|
|
794
|
-
u > f ? m = i.bottom +
|
|
796
|
+
u > f ? m = i.bottom + s : m = i.bottom - s - g - d, a - v > l ? h = i.left : h = a - 30 - l;
|
|
795
797
|
break;
|
|
796
798
|
case "bottom-left":
|
|
797
|
-
u > f ? m = i.bottom +
|
|
799
|
+
u > f ? m = i.bottom + s : m = i.bottom - s - g - d, i.left > 0 ? h = i.right - l : h = 10;
|
|
798
800
|
break;
|
|
799
801
|
case "bottom-start":
|
|
800
|
-
u > f ? m = i.bottom +
|
|
802
|
+
u > f ? m = i.bottom + s : m = i.bottom - s - g - d, i.left > 0 ? h = i.left : h = 10;
|
|
801
803
|
break;
|
|
802
804
|
}
|
|
803
|
-
m + g > u ? m = u - g -
|
|
804
|
-
},
|
|
805
|
+
m + g > u ? m = u - g - s : m < 0 && (m = s), h + l > a ? h = a - l - s : h < 0 && (h = s), o instanceof HTMLElement && (o.style.top = `${m}px`, o.style.left = `${h}px`, o.style.position = "fixed");
|
|
806
|
+
}, uo = { class: "text-center" }, po = { class: "py-2 px-4 w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 dark:bg-neutral-900 dark:text-neutral-200 dark:focus:bg-neutral-800 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full" }, Ie = /* @__PURE__ */ Ge({
|
|
805
807
|
__name: "vs-popover",
|
|
806
808
|
props: {
|
|
807
809
|
isOpen: { type: Boolean, default: !1 },
|
|
@@ -814,7 +816,7 @@ const Pe = async (e, t, o, n = 10) => {
|
|
|
814
816
|
},
|
|
815
817
|
emits: ["isvisible"],
|
|
816
818
|
setup(e, { expose: t, emit: o }) {
|
|
817
|
-
const
|
|
819
|
+
const s = e, n = o, i = A(!1), d = A([]), v = A(null), g = A(null), l = A(null), u = (_) => {
|
|
818
820
|
var D, le;
|
|
819
821
|
if (!_) {
|
|
820
822
|
i.value = !1;
|
|
@@ -837,19 +839,19 @@ const Pe = async (e, t, o, n = 10) => {
|
|
|
837
839
|
_.removeEventListener("scroll", m);
|
|
838
840
|
}), d.value = [];
|
|
839
841
|
};
|
|
840
|
-
|
|
841
|
-
_ ? (f(), window.addEventListener("resize", () =>
|
|
842
|
+
fe(i, (_) => {
|
|
843
|
+
_ ? (f(), window.addEventListener("resize", () => je(s.placement, g.value, l.value)), je(s.placement, g.value, l.value)) : window.removeEventListener("resize", () => je(s.placement, g.value, l.value)), n("isvisible", _);
|
|
842
844
|
}), xe(() => {
|
|
843
845
|
window.addEventListener("click", u), window.addEventListener("popstate", h), window.addEventListener("scroll", a, !0), f();
|
|
844
|
-
}),
|
|
846
|
+
}), gt(() => {
|
|
845
847
|
window.removeEventListener("click", u), window.removeEventListener("popstate", h), L();
|
|
846
848
|
});
|
|
847
849
|
const j = () => {
|
|
848
|
-
i.value = !0,
|
|
850
|
+
i.value = !0, je(s.placement, g.value, l.value);
|
|
849
851
|
}, T = () => {
|
|
850
852
|
i.value = !1;
|
|
851
853
|
}, k = async () => {
|
|
852
|
-
await
|
|
854
|
+
await je(s.placement, g.value, l.value), i.value = !i.value;
|
|
853
855
|
};
|
|
854
856
|
return t({
|
|
855
857
|
togglePopover: k
|
|
@@ -858,7 +860,7 @@ const Pe = async (e, t, o, n = 10) => {
|
|
|
858
860
|
ref: v,
|
|
859
861
|
class: "vs-popover inline-block"
|
|
860
862
|
}, [
|
|
861
|
-
r("div",
|
|
863
|
+
r("div", uo, [
|
|
862
864
|
_.trigger === "click" ? (c(), p("div", {
|
|
863
865
|
key: 0,
|
|
864
866
|
ref_key: "popoverRef",
|
|
@@ -866,7 +868,7 @@ const Pe = async (e, t, o, n = 10) => {
|
|
|
866
868
|
onClick: k,
|
|
867
869
|
class: K({ "pointer-events-none": _.disabled })
|
|
868
870
|
}, [
|
|
869
|
-
|
|
871
|
+
Ne(_.$slots, "reference", {}, () => [
|
|
870
872
|
D[0] || (D[0] = r("button", null, "Click me!", -1))
|
|
871
873
|
])
|
|
872
874
|
], 2)) : F("", !0),
|
|
@@ -878,29 +880,29 @@ const Pe = async (e, t, o, n = 10) => {
|
|
|
878
880
|
onMouseleave: T,
|
|
879
881
|
class: K({ "pointer-events-none": _.disabled })
|
|
880
882
|
}, [
|
|
881
|
-
|
|
883
|
+
Ne(_.$slots, "reference", {}, () => [
|
|
882
884
|
D[1] || (D[1] = r("button", null, "Click me!", -1))
|
|
883
885
|
])
|
|
884
886
|
], 34)) : F("", !0),
|
|
885
887
|
(c(), X(Ke, { to: _.teleport }, [
|
|
886
|
-
N(
|
|
888
|
+
N(vt, { name: "fade" }, {
|
|
887
889
|
default: Z(() => [
|
|
888
890
|
ne(r("div", {
|
|
889
891
|
class: K(["vsTailwind vs-popover__content", _.placement]),
|
|
890
892
|
ref_key: "contentPop",
|
|
891
893
|
ref: l,
|
|
892
|
-
style:
|
|
894
|
+
style: he({
|
|
893
895
|
width: _.width ? _.width + "px" : "fit-content",
|
|
894
896
|
zIndex: 10002
|
|
895
897
|
})
|
|
896
898
|
}, [
|
|
897
|
-
r("div",
|
|
898
|
-
|
|
899
|
+
r("div", po, [
|
|
900
|
+
Ne(_.$slots, "default", {}, () => [
|
|
899
901
|
D[2] || (D[2] = r("span", null, "Popover content", -1))
|
|
900
902
|
])
|
|
901
903
|
])
|
|
902
904
|
], 6), [
|
|
903
|
-
[
|
|
905
|
+
[Pe, i.value]
|
|
904
906
|
])
|
|
905
907
|
]),
|
|
906
908
|
_: 3
|
|
@@ -910,11 +912,11 @@ const Pe = async (e, t, o, n = 10) => {
|
|
|
910
912
|
], 512));
|
|
911
913
|
}
|
|
912
914
|
});
|
|
913
|
-
|
|
914
|
-
const
|
|
915
|
+
ft({ visible: !0 });
|
|
916
|
+
const ho = { class: "legend-widget flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative" }, fo = {
|
|
915
917
|
key: 0,
|
|
916
918
|
class: "p-5 pb-3 flex justify-between items-start gap-[30px]"
|
|
917
|
-
},
|
|
919
|
+
}, go = { class: "inline-block font-semibold text-lg text-gray-800 dark:text-neutral-200" }, vo = { class: "flex flex-col gap-1" }, mo = { class: "flex flex-col gap-1 p-5 pt-0" }, yo = ["innerHTML"], bo = {
|
|
918
920
|
__name: "vs-info-widget",
|
|
919
921
|
props: {
|
|
920
922
|
config: {
|
|
@@ -926,25 +928,25 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
926
928
|
const t = e, o = M(() => {
|
|
927
929
|
var i;
|
|
928
930
|
return ((i = t.config) == null ? void 0 : i.title) || "";
|
|
929
|
-
}),
|
|
931
|
+
}), s = M(() => {
|
|
930
932
|
var i;
|
|
931
933
|
return ((i = t.config) == null ? void 0 : i.content) || "";
|
|
932
|
-
}),
|
|
934
|
+
}), n = M(() => {
|
|
933
935
|
var i;
|
|
934
936
|
return ((i = t.config) == null ? void 0 : i.goTo) || [];
|
|
935
937
|
});
|
|
936
938
|
return (i, d) => {
|
|
937
939
|
var g, l;
|
|
938
940
|
const v = G("router-link");
|
|
939
|
-
return c(), p("div",
|
|
940
|
-
o.value || (g =
|
|
941
|
-
r("h2",
|
|
942
|
-
(l =
|
|
941
|
+
return c(), p("div", ho, [
|
|
942
|
+
o.value || (g = n.value) != null && g.length ? (c(), p("div", fo, [
|
|
943
|
+
r("h2", go, S(o.value), 1),
|
|
944
|
+
(l = n.value) != null && l.length ? (c(), X(Ze(Ie), {
|
|
943
945
|
key: 0,
|
|
944
946
|
placement: "bottom"
|
|
945
947
|
}, {
|
|
946
948
|
reference: Z(() => [
|
|
947
|
-
N(Ze(
|
|
949
|
+
N(Ze(Ie), {
|
|
948
950
|
trigger: "hover",
|
|
949
951
|
placement: "right"
|
|
950
952
|
}, {
|
|
@@ -985,8 +987,8 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
985
987
|
})
|
|
986
988
|
]),
|
|
987
989
|
default: Z(() => [
|
|
988
|
-
r("div",
|
|
989
|
-
(c(!0), p(B, null, W(
|
|
990
|
+
r("div", vo, [
|
|
991
|
+
(c(!0), p(B, null, W(n.value, (u) => (c(), p("div", {
|
|
990
992
|
key: u.label
|
|
991
993
|
}, [
|
|
992
994
|
u.url ? (c(), X(v, {
|
|
@@ -1005,34 +1007,34 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1005
1007
|
_: 1
|
|
1006
1008
|
})) : F("", !0)
|
|
1007
1009
|
])) : F("", !0),
|
|
1008
|
-
r("div",
|
|
1009
|
-
r("div", { innerHTML:
|
|
1010
|
+
r("div", mo, [
|
|
1011
|
+
r("div", { innerHTML: s.value }, null, 8, yo)
|
|
1010
1012
|
])
|
|
1011
1013
|
]);
|
|
1012
1014
|
};
|
|
1013
1015
|
}
|
|
1014
|
-
},
|
|
1016
|
+
}, wo = /* @__PURE__ */ H(bo, [["__scopeId", "data-v-629caa82"]]), xo = { class: "w-full flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative overflow-hidden" }, _o = {
|
|
1015
1017
|
key: 0,
|
|
1016
1018
|
class: "p-5 pb-3 flex justify-between items-center"
|
|
1017
|
-
},
|
|
1019
|
+
}, ko = { class: "inline-block font-semibold text-lg text-gray-800" }, Lo = {
|
|
1018
1020
|
key: 1,
|
|
1019
1021
|
class: "flex"
|
|
1020
|
-
},
|
|
1022
|
+
}, Co = { class: "flex items-center mx-[8px]" }, $o = { class: "min-h-[34px] max-h-[34px] overflow-hidden min-w-[34px] flex justify-center items-center bg-stone-100 text-stone-800 py-2 px-3 text-sm rounded-lg" }, Io = { class: "min-h-[34px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm" }, Vo = { class: "flex flex-col justify-between pb-5 px-5 h-full overflow-y-auto flex-1 [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent" }, So = {
|
|
1021
1023
|
key: 0,
|
|
1022
1024
|
class: "text-center"
|
|
1023
|
-
},
|
|
1025
|
+
}, Fo = {
|
|
1024
1026
|
key: 1,
|
|
1025
1027
|
class: "text-red-500"
|
|
1026
|
-
},
|
|
1028
|
+
}, jo = { key: 2 }, Po = ["innerHTML"], Eo = {
|
|
1027
1029
|
key: 1,
|
|
1028
1030
|
class: "flow-root"
|
|
1029
|
-
},
|
|
1031
|
+
}, Mo = { class: "-my-3 divide-y divide-gray-100 text-sm" }, To = { class: "font-medium text-gray-900" }, zo = { class: "text-gray-700 sm:col-span-2" }, Ao = {
|
|
1030
1032
|
key: 2,
|
|
1031
1033
|
class: "vs-map-card-info__nodata"
|
|
1032
|
-
},
|
|
1034
|
+
}, Bo = {
|
|
1033
1035
|
key: 3,
|
|
1034
1036
|
class: "pt-4 flex justify-end"
|
|
1035
|
-
},
|
|
1037
|
+
}, Oo = ["href"], rt = {
|
|
1036
1038
|
__name: "vs-card-widget",
|
|
1037
1039
|
props: {
|
|
1038
1040
|
config: {
|
|
@@ -1046,7 +1048,7 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1046
1048
|
},
|
|
1047
1049
|
emits: ["close", "content-resize"],
|
|
1048
1050
|
setup(e, { emit: t }) {
|
|
1049
|
-
const o = e,
|
|
1051
|
+
const o = e, s = t, n = M(() => {
|
|
1050
1052
|
var T;
|
|
1051
1053
|
return ((T = o.config) == null ? void 0 : T.title) || "";
|
|
1052
1054
|
}), i = M(
|
|
@@ -1060,19 +1062,19 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1060
1062
|
return !T || !k ? {} : k.reduce((_, D) => (!D.hide && !["geom", "geodata", "id"].includes(D.name) && (_[D.ua] = T[D.name] ?? "-"), _), {});
|
|
1061
1063
|
});
|
|
1062
1064
|
async function f() {
|
|
1063
|
-
var T, k, _, D, le,
|
|
1065
|
+
var T, k, _, D, le, pe;
|
|
1064
1066
|
v.value = !0, g.value = null;
|
|
1065
1067
|
try {
|
|
1066
|
-
const
|
|
1068
|
+
const oe = {
|
|
1067
1069
|
id: (T = o.cardValues) == null ? void 0 : T.id,
|
|
1068
1070
|
layer: typeof ((k = o.cardValues) == null ? void 0 : k.layer) == "object" ? (D = (_ = o.cardValues) == null ? void 0 : _.layer) == null ? void 0 : D.id : (le = o.cardValues) == null ? void 0 : le.layer,
|
|
1069
|
-
map: (
|
|
1070
|
-
},
|
|
1071
|
-
d.value[l.value] =
|
|
1072
|
-
} catch (
|
|
1073
|
-
g.value = (
|
|
1071
|
+
map: (pe = o.cardValues) == null ? void 0 : pe.map
|
|
1072
|
+
}, De = await fetch("/api/map-format?" + new URLSearchParams(oe)).then((Ue) => Ue.json());
|
|
1073
|
+
d.value[l.value] = De;
|
|
1074
|
+
} catch (oe) {
|
|
1075
|
+
g.value = (oe == null ? void 0 : oe.message) || "Помилка запиту";
|
|
1074
1076
|
} finally {
|
|
1075
|
-
v.value = !1, await
|
|
1077
|
+
v.value = !1, await Ee(), s("content-resize");
|
|
1076
1078
|
}
|
|
1077
1079
|
}
|
|
1078
1080
|
function L() {
|
|
@@ -1082,24 +1084,24 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1082
1084
|
l.value > 0 && (l.value -= 1, d.value[l.value] || f());
|
|
1083
1085
|
}
|
|
1084
1086
|
return xe(async () => {
|
|
1085
|
-
await
|
|
1086
|
-
}),
|
|
1087
|
+
await Ee(), f();
|
|
1088
|
+
}), fe(
|
|
1087
1089
|
() => o.info,
|
|
1088
1090
|
() => {
|
|
1089
|
-
l.value = 0, f(),
|
|
1091
|
+
l.value = 0, f(), s("content-resize");
|
|
1090
1092
|
},
|
|
1091
1093
|
{ deep: !0 }
|
|
1092
|
-
),
|
|
1093
|
-
await
|
|
1094
|
+
), fe([() => o.cardValues, () => o.config], async () => {
|
|
1095
|
+
await Ee(), f(), s("content-resize");
|
|
1094
1096
|
}), (T, k) => {
|
|
1095
1097
|
var _, D;
|
|
1096
|
-
return c(), p("div",
|
|
1097
|
-
|
|
1098
|
-
r("h2",
|
|
1098
|
+
return c(), p("div", xo, [
|
|
1099
|
+
n.value ? (c(), p("div", _o, [
|
|
1100
|
+
r("h2", ko, S(n.value), 1),
|
|
1099
1101
|
r("button", {
|
|
1100
1102
|
type: "button",
|
|
1101
1103
|
class: "size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600 ml-2",
|
|
1102
|
-
onClick: k[0] || (k[0] = (le) =>
|
|
1104
|
+
onClick: k[0] || (k[0] = (le) => s("close"))
|
|
1103
1105
|
}, [...k[1] || (k[1] = [
|
|
1104
1106
|
r("svg", {
|
|
1105
1107
|
class: "shrink-0 size-4 cursor-pointer",
|
|
@@ -1118,7 +1120,7 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1118
1120
|
], -1)
|
|
1119
1121
|
])])
|
|
1120
1122
|
])) : F("", !0),
|
|
1121
|
-
a.value > 1 ? (c(), p("div",
|
|
1123
|
+
a.value > 1 ? (c(), p("div", Lo, [
|
|
1122
1124
|
r("button", {
|
|
1123
1125
|
type: "button",
|
|
1124
1126
|
class: K([{
|
|
@@ -1126,10 +1128,10 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1126
1128
|
}, "min-h-[34px] min-w-[34px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"]),
|
|
1127
1129
|
onClick: j
|
|
1128
1130
|
}, " ◀ ", 2),
|
|
1129
|
-
r("div",
|
|
1130
|
-
r("span",
|
|
1131
|
+
r("div", Co, [
|
|
1132
|
+
r("span", $o, S(u.value), 1),
|
|
1131
1133
|
k[2] || (k[2] = r("span", { class: "min-h-[34px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm" }, "з", -1)),
|
|
1132
|
-
r("span",
|
|
1134
|
+
r("span", Io, S(a.value), 1)
|
|
1133
1135
|
]),
|
|
1134
1136
|
r("button", {
|
|
1135
1137
|
type: "button",
|
|
@@ -1139,50 +1141,50 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1139
1141
|
}, "min-h-[34px] min-w-[34px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"])
|
|
1140
1142
|
}, " ▶ ", 2)
|
|
1141
1143
|
])) : F("", !0),
|
|
1142
|
-
r("div",
|
|
1143
|
-
v.value ? (c(), p("div",
|
|
1144
|
+
r("div", Vo, [
|
|
1145
|
+
v.value ? (c(), p("div", So, "Завантаження даних...")) : g.value ? (c(), p("div", Fo, " Помилка завантаження даних ")) : (c(), p("div", jo, [
|
|
1144
1146
|
(_ = m.value) != null && _.html ? (c(), p("div", {
|
|
1145
1147
|
key: 0,
|
|
1146
1148
|
innerHTML: m.value.html,
|
|
1147
1149
|
class: "custom-table-html border-b"
|
|
1148
|
-
}, null, 8,
|
|
1149
|
-
r("dl",
|
|
1150
|
-
(c(!0), p(B, null, W(h.value, (le,
|
|
1151
|
-
key:
|
|
1150
|
+
}, null, 8, Po)) : Object.keys(h.value).length ? (c(), p("div", Eo, [
|
|
1151
|
+
r("dl", Mo, [
|
|
1152
|
+
(c(!0), p(B, null, W(h.value, (le, pe) => (c(), p("div", {
|
|
1153
|
+
key: pe,
|
|
1152
1154
|
class: "grid grid-cols-1 gap-1 py-3 even:bg-gray-50 sm:grid-cols-3 sm:gap-4"
|
|
1153
1155
|
}, [
|
|
1154
|
-
r("dt",
|
|
1155
|
-
r("dd",
|
|
1156
|
+
r("dt", To, S(pe), 1),
|
|
1157
|
+
r("dd", zo, S(le), 1)
|
|
1156
1158
|
]))), 128))
|
|
1157
1159
|
])
|
|
1158
|
-
])) : (c(), p("div",
|
|
1160
|
+
])) : (c(), p("div", Ao, "Даних не знайдено."))
|
|
1159
1161
|
])),
|
|
1160
|
-
(D = m.value) != null && D.cardInterface && i.value ? (c(), p("div",
|
|
1162
|
+
(D = m.value) != null && D.cardInterface && i.value ? (c(), p("div", Bo, [
|
|
1161
1163
|
r("a", {
|
|
1162
1164
|
href: `/card/${m.value.cardInterface}/${m.value.id}`,
|
|
1163
1165
|
target: "_blank",
|
|
1164
1166
|
class: "w-full !cursor-pointer text-center gap-2 px-3 py-1.5 bg-blue-600 text-white rounded hover:bg-blue-700 transition text-sm font-medium"
|
|
1165
|
-
}, " Перейти в реєстр ", 8,
|
|
1167
|
+
}, " Перейти в реєстр ", 8, Oo)
|
|
1166
1168
|
])) : F("", !0)
|
|
1167
1169
|
])
|
|
1168
1170
|
]);
|
|
1169
1171
|
};
|
|
1170
1172
|
}
|
|
1171
|
-
},
|
|
1173
|
+
}, Do = { class: "size-full flex flex-col bg-white border border-gray-200 shadow-2xs rounded-xl dark:bg-neutral-800 dark:border-neutral-700" }, Uo = {
|
|
1172
1174
|
key: 0,
|
|
1173
1175
|
class: "p-5 pb-0 items-center"
|
|
1174
|
-
},
|
|
1176
|
+
}, Ro = { class: "inline-block font-semibold text-lg text-gray-800 dark:text-neutral-200" }, Ho = { class: "h-full p-5" }, No = { class: "h-full flex flex-col justify-between space-y-4" }, Wo = { class: "space-y-4" }, Zo = {
|
|
1175
1177
|
key: 0,
|
|
1176
1178
|
class: "flex gap-x-1 w-full h-2.5 rounded-full overflow-hidden"
|
|
1177
|
-
},
|
|
1179
|
+
}, qo = ["aria-valuenow"], Go = { class: "text-sm text-gray-500 px-2 w-full py-2 cursor-pointer !flex flex-row items-center rounded-lg group hover:bg-gray-100" }, Jo = ["for"], Qo = {
|
|
1178
1180
|
key: 0,
|
|
1179
1181
|
width: "16",
|
|
1180
1182
|
height: "auto",
|
|
1181
1183
|
src: "data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PScwIDAgMTYgMTYnIGZpbGw9J3doaXRlJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnPjxwYXRoIGQ9J00xMi4yMDcgNC43OTNhMSAxIDAgMDEwIDEuNDE0bC01IDVhMSAxIDAgMDEtMS40MTQgMGwtMi0yYTEgMSAwIDAxMS40MTQtMS40MTRMNi41IDkuMDg2bDQuMjkzLTQuMjkzYTEgMSAwIDAxMS40MTQgMHonLz48L3N2Zz4="
|
|
1182
|
-
},
|
|
1184
|
+
}, Yo = ["id", "onUpdate:modelValue"], Ko = { class: "ml-2 text-gray-800 dark:text-neutral-200" }, Xo = {
|
|
1183
1185
|
key: 0,
|
|
1184
1186
|
class: "ms-auto text-xs text-gray-500 dark:text-neutral-500"
|
|
1185
|
-
},
|
|
1187
|
+
}, er = {
|
|
1186
1188
|
__name: "vs-attributre-widget",
|
|
1187
1189
|
props: {
|
|
1188
1190
|
config: {
|
|
@@ -1198,14 +1200,14 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1198
1200
|
const t = e, o = M(() => {
|
|
1199
1201
|
var g;
|
|
1200
1202
|
return ((g = t.config) == null ? void 0 : g.title) || "";
|
|
1201
|
-
}),
|
|
1203
|
+
}), s = A([]), n = M(() => t.config.layer.style.rules.some(
|
|
1202
1204
|
(g) => g.count !== void 0
|
|
1203
1205
|
)), i = M(() => t.config.layer.style.rules.reduce(
|
|
1204
1206
|
(g, l) => g + (l.count || 0),
|
|
1205
1207
|
0
|
|
1206
1208
|
)), d = (g) => !g || i.value === 0 ? 0 : Math.round(g / i.value * 100), v = () => {
|
|
1207
1209
|
const l = t.config.layer.style.rules.filter(
|
|
1208
|
-
(u, a) =>
|
|
1210
|
+
(u, a) => s.value[a]
|
|
1209
1211
|
).map((u) => u.id || u.value).join(",");
|
|
1210
1212
|
if (t.config.layer.id) {
|
|
1211
1213
|
const u = t.map.getSource(t.config.layer.id);
|
|
@@ -1217,23 +1219,23 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1217
1219
|
};
|
|
1218
1220
|
return xe(() => {
|
|
1219
1221
|
var g;
|
|
1220
|
-
(g = t.config) != null && g.layer && (we(t.map, t.config.layer),
|
|
1222
|
+
(g = t.config) != null && g.layer && (we(t.map, t.config.layer), s.value = new Array(t.config.layer.style.rules.length).fill(
|
|
1221
1223
|
!1
|
|
1222
1224
|
));
|
|
1223
|
-
}), (g, l) => (c(), p("div",
|
|
1224
|
-
o.value ? (c(), p("div",
|
|
1225
|
+
}), (g, l) => (c(), p("div", Do, [
|
|
1226
|
+
o.value ? (c(), p("div", Uo, [
|
|
1225
1227
|
r("div", null, [
|
|
1226
|
-
r("h2",
|
|
1228
|
+
r("h2", Ro, S(o.value), 1)
|
|
1227
1229
|
])
|
|
1228
1230
|
])) : F("", !0),
|
|
1229
|
-
r("div",
|
|
1230
|
-
r("div",
|
|
1231
|
-
r("div",
|
|
1232
|
-
|
|
1231
|
+
r("div", Ho, [
|
|
1232
|
+
r("div", No, [
|
|
1233
|
+
r("div", Wo, [
|
|
1234
|
+
n.value ? (c(), p("div", Zo, [
|
|
1233
1235
|
(c(!0), p(B, null, W(e.config.layer.style.rules, (u, a) => (c(), p("div", {
|
|
1234
1236
|
key: a,
|
|
1235
1237
|
class: "flex flex-col justify-center overflow-hidden text-xs text-white text-center whitespace-nowrap",
|
|
1236
|
-
style:
|
|
1238
|
+
style: he({
|
|
1237
1239
|
width: `${d(u.count)}%`,
|
|
1238
1240
|
backgroundColor: u.color
|
|
1239
1241
|
}),
|
|
@@ -1241,37 +1243,37 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1241
1243
|
"aria-valuenow": d(u.count),
|
|
1242
1244
|
"aria-valuemin": "0",
|
|
1243
1245
|
"aria-valuemax": "100"
|
|
1244
|
-
}, null, 12,
|
|
1246
|
+
}, null, 12, qo))), 128))
|
|
1245
1247
|
])) : F("", !0),
|
|
1246
1248
|
r("ul", null, [
|
|
1247
1249
|
(c(!0), p(B, null, W(e.config.layer.style.rules, (u, a) => (c(), p("li", { key: a }, [
|
|
1248
|
-
r("div",
|
|
1250
|
+
r("div", Go, [
|
|
1249
1251
|
r("label", {
|
|
1250
1252
|
for: `filter-${a}`,
|
|
1251
1253
|
class: "flex items-center w-full cursor-pointer"
|
|
1252
1254
|
}, [
|
|
1253
1255
|
r("div", {
|
|
1254
1256
|
class: "w-[18px] h-[18px] border rounded-[4px] flex items-center justify-center",
|
|
1255
|
-
style:
|
|
1256
|
-
background:
|
|
1257
|
-
borderColor:
|
|
1257
|
+
style: he({
|
|
1258
|
+
background: s.value[a] ? u.color || "#2563eb" : "#fff",
|
|
1259
|
+
borderColor: s.value[a] ? u.color || "#2563eb" : u.color || "#d9d9d9"
|
|
1258
1260
|
})
|
|
1259
1261
|
}, [
|
|
1260
|
-
|
|
1262
|
+
s.value[a] ? (c(), p("img", Qo)) : F("", !0)
|
|
1261
1263
|
], 4),
|
|
1262
1264
|
ne(r("input", {
|
|
1263
1265
|
type: "checkbox",
|
|
1264
1266
|
id: `filter-${a}`,
|
|
1265
|
-
"onUpdate:modelValue": (m) =>
|
|
1267
|
+
"onUpdate:modelValue": (m) => s.value[a] = m,
|
|
1266
1268
|
onChange: v,
|
|
1267
1269
|
class: "hidden",
|
|
1268
1270
|
disabled: !1
|
|
1269
|
-
}, null, 40,
|
|
1270
|
-
[qe,
|
|
1271
|
+
}, null, 40, Yo), [
|
|
1272
|
+
[qe, s.value[a]]
|
|
1271
1273
|
]),
|
|
1272
|
-
r("span",
|
|
1273
|
-
|
|
1274
|
-
], 8,
|
|
1274
|
+
r("span", Ko, S(u.label || u.text), 1),
|
|
1275
|
+
n.value ? (c(), p("span", Xo, "(" + S(u.count) + ")", 1)) : F("", !0)
|
|
1276
|
+
], 8, Jo)
|
|
1275
1277
|
])
|
|
1276
1278
|
]))), 128))
|
|
1277
1279
|
])
|
|
@@ -1280,17 +1282,35 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1280
1282
|
])
|
|
1281
1283
|
]));
|
|
1282
1284
|
}
|
|
1283
|
-
},
|
|
1285
|
+
}, tr = {}, or = {
|
|
1286
|
+
class: "shrink-0 size-4",
|
|
1287
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1288
|
+
width: "24",
|
|
1289
|
+
height: "24",
|
|
1290
|
+
viewBox: "0 0 24 24",
|
|
1291
|
+
fill: "none",
|
|
1292
|
+
stroke: "currentColor",
|
|
1293
|
+
"stroke-width": "2",
|
|
1294
|
+
"stroke-linecap": "round",
|
|
1295
|
+
"stroke-linejoin": "round"
|
|
1296
|
+
};
|
|
1297
|
+
function rr(e, t) {
|
|
1298
|
+
return c(), p("svg", or, [...t[0] || (t[0] = [
|
|
1299
|
+
r("path", { d: "M18 6 6 18" }, null, -1),
|
|
1300
|
+
r("path", { d: "m6 6 12 12" }, null, -1)
|
|
1301
|
+
])]);
|
|
1302
|
+
}
|
|
1303
|
+
const st = /* @__PURE__ */ H(tr, [["render", rr]]), sr = { class: "hover:bg-gray-100 rounded-lg flex items-center ml-[20px] py-[8px] px-[8px]" }, nr = ["for"], ir = { class: "custom-checkbox-wrapper" }, ar = ["id", "checked"], lr = { class: "custom-checkbox" }, cr = {
|
|
1284
1304
|
key: 0,
|
|
1285
1305
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1286
1306
|
width: "12",
|
|
1287
1307
|
height: "8",
|
|
1288
1308
|
viewBox: "0 0 12 8",
|
|
1289
1309
|
fill: "none"
|
|
1290
|
-
},
|
|
1310
|
+
}, dr = { class: "flex items-center justify-between ml-2 w-full" }, ur = ["title"], pr = {
|
|
1291
1311
|
key: 0,
|
|
1292
1312
|
class: "text-xs opacity-60 text-[#4b5563]"
|
|
1293
|
-
},
|
|
1313
|
+
}, hr = {
|
|
1294
1314
|
__name: "vs-map-catalog-item",
|
|
1295
1315
|
props: {
|
|
1296
1316
|
layer: {
|
|
@@ -1308,28 +1328,28 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1308
1328
|
},
|
|
1309
1329
|
emits: ["select", "remove"],
|
|
1310
1330
|
setup(e, { emit: t }) {
|
|
1311
|
-
const o = e,
|
|
1331
|
+
const o = e, s = t, n = M(() => o.selectedLayers.some((v) => v.id === o.layer.id)), i = (v) => Intl.NumberFormat("uk", {
|
|
1312
1332
|
notation: "compact"
|
|
1313
1333
|
}).format(v), d = (v) => {
|
|
1314
|
-
|
|
1334
|
+
s(v ? "select" : "remove", o.layer);
|
|
1315
1335
|
};
|
|
1316
1336
|
return (v, g) => {
|
|
1317
1337
|
var l, u, a, m, h;
|
|
1318
|
-
return c(), p("div",
|
|
1338
|
+
return c(), p("div", sr, [
|
|
1319
1339
|
r("label", {
|
|
1320
1340
|
class: "flex items-center w-full cursor-pointer",
|
|
1321
1341
|
for: e.layer.id
|
|
1322
1342
|
}, [
|
|
1323
|
-
r("div",
|
|
1343
|
+
r("div", ir, [
|
|
1324
1344
|
r("input", {
|
|
1325
1345
|
id: e.layer.id,
|
|
1326
1346
|
type: "checkbox",
|
|
1327
|
-
checked:
|
|
1347
|
+
checked: n.value,
|
|
1328
1348
|
onChange: g[0] || (g[0] = (f) => d(f.target.checked)),
|
|
1329
1349
|
class: "custom-checkbox-input"
|
|
1330
|
-
}, null, 40,
|
|
1331
|
-
r("div",
|
|
1332
|
-
|
|
1350
|
+
}, null, 40, ar),
|
|
1351
|
+
r("div", lr, [
|
|
1352
|
+
n.value ? (c(), p("svg", cr, [...g[1] || (g[1] = [
|
|
1333
1353
|
r("path", {
|
|
1334
1354
|
d: "M10.6663 1L4.24967 7.41667L1.33301 4.5",
|
|
1335
1355
|
stroke: "#fff",
|
|
@@ -1339,18 +1359,18 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1339
1359
|
])])) : F("", !0)
|
|
1340
1360
|
])
|
|
1341
1361
|
]),
|
|
1342
|
-
r("div",
|
|
1362
|
+
r("div", dr, [
|
|
1343
1363
|
r("div", {
|
|
1344
1364
|
class: "whitespace-nowrap text text-ellipsis max-w-[260px] overflow-hidden text-[13px] text-[#4b5563]",
|
|
1345
1365
|
title: (l = e.layer) == null ? void 0 : l.name
|
|
1346
|
-
}, S(((u = e.layer) == null ? void 0 : u.name) || ((a = e.layer) == null ? void 0 : a.title)), 9,
|
|
1347
|
-
isNaN(i((m = e.layer) == null ? void 0 : m.count)) ? F("", !0) : (c(), p("div",
|
|
1366
|
+
}, S(((u = e.layer) == null ? void 0 : u.name) || ((a = e.layer) == null ? void 0 : a.title)), 9, ur),
|
|
1367
|
+
isNaN(i((m = e.layer) == null ? void 0 : m.count)) ? F("", !0) : (c(), p("div", pr, S(i((h = e.layer) == null ? void 0 : h.count)), 1))
|
|
1348
1368
|
])
|
|
1349
|
-
], 8,
|
|
1369
|
+
], 8, nr)
|
|
1350
1370
|
]);
|
|
1351
1371
|
};
|
|
1352
1372
|
}
|
|
1353
|
-
},
|
|
1373
|
+
}, fr = /* @__PURE__ */ H(hr, [["__scopeId", "data-v-b96f3537"]]), gr = {}, vr = {
|
|
1354
1374
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1355
1375
|
width: "16",
|
|
1356
1376
|
height: "16",
|
|
@@ -1362,8 +1382,8 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1362
1382
|
"stroke-linejoin": "round",
|
|
1363
1383
|
class: "lucide lucide-zoom-in"
|
|
1364
1384
|
};
|
|
1365
|
-
function
|
|
1366
|
-
return c(), p("svg",
|
|
1385
|
+
function mr(e, t) {
|
|
1386
|
+
return c(), p("svg", vr, [...t[0] || (t[0] = [
|
|
1367
1387
|
r("circle", {
|
|
1368
1388
|
cx: "11",
|
|
1369
1389
|
cy: "11",
|
|
@@ -1389,7 +1409,7 @@ function dr(e, t) {
|
|
|
1389
1409
|
}, null, -1)
|
|
1390
1410
|
])]);
|
|
1391
1411
|
}
|
|
1392
|
-
const
|
|
1412
|
+
const yr = /* @__PURE__ */ H(gr, [["render", mr]]), br = {}, wr = {
|
|
1393
1413
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1394
1414
|
width: "16",
|
|
1395
1415
|
height: "16",
|
|
@@ -1401,8 +1421,8 @@ const ur = /* @__PURE__ */ H(lr, [["render", dr]]), pr = {}, hr = {
|
|
|
1401
1421
|
"stroke-linejoin": "round",
|
|
1402
1422
|
class: "lucide lucide-info"
|
|
1403
1423
|
};
|
|
1404
|
-
function
|
|
1405
|
-
return c(), p("svg",
|
|
1424
|
+
function xr(e, t) {
|
|
1425
|
+
return c(), p("svg", wr, [...t[0] || (t[0] = [
|
|
1406
1426
|
r("circle", {
|
|
1407
1427
|
cx: "12",
|
|
1408
1428
|
cy: "12",
|
|
@@ -1412,7 +1432,7 @@ function fr(e, t) {
|
|
|
1412
1432
|
r("path", { d: "M12 8h.01" }, null, -1)
|
|
1413
1433
|
])]);
|
|
1414
1434
|
}
|
|
1415
|
-
const
|
|
1435
|
+
const _r = /* @__PURE__ */ H(br, [["render", xr]]), kr = {}, Lr = {
|
|
1416
1436
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1417
1437
|
width: "16",
|
|
1418
1438
|
height: "16",
|
|
@@ -1424,8 +1444,8 @@ const gr = /* @__PURE__ */ H(pr, [["render", fr]]), vr = {}, mr = {
|
|
|
1424
1444
|
"stroke-linejoin": "round",
|
|
1425
1445
|
class: "lucide lucide-table"
|
|
1426
1446
|
};
|
|
1427
|
-
function
|
|
1428
|
-
return c(), p("svg",
|
|
1447
|
+
function Cr(e, t) {
|
|
1448
|
+
return c(), p("svg", Lr, [...t[0] || (t[0] = [
|
|
1429
1449
|
r("path", { d: "M12 3v18" }, null, -1),
|
|
1430
1450
|
r("rect", {
|
|
1431
1451
|
width: "18",
|
|
@@ -1438,7 +1458,7 @@ function yr(e, t) {
|
|
|
1438
1458
|
r("path", { d: "M3 15h18" }, null, -1)
|
|
1439
1459
|
])]);
|
|
1440
1460
|
}
|
|
1441
|
-
const
|
|
1461
|
+
const $r = /* @__PURE__ */ H(kr, [["render", Cr]]), Ir = {}, Vr = {
|
|
1442
1462
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1443
1463
|
width: "16",
|
|
1444
1464
|
height: "16",
|
|
@@ -1450,12 +1470,12 @@ const br = /* @__PURE__ */ H(vr, [["render", yr]]), wr = {}, xr = {
|
|
|
1450
1470
|
"stroke-linejoin": "round",
|
|
1451
1471
|
class: "lucide lucide-trash2"
|
|
1452
1472
|
};
|
|
1453
|
-
function
|
|
1454
|
-
return c(), p("svg",
|
|
1455
|
-
|
|
1473
|
+
function Sr(e, t) {
|
|
1474
|
+
return c(), p("svg", Vr, [...t[0] || (t[0] = [
|
|
1475
|
+
Be('<path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line>', 5)
|
|
1456
1476
|
])]);
|
|
1457
1477
|
}
|
|
1458
|
-
const
|
|
1478
|
+
const Fr = /* @__PURE__ */ H(Ir, [["render", Sr]]), jr = {}, Pr = {
|
|
1459
1479
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1460
1480
|
width: "18",
|
|
1461
1481
|
height: "18",
|
|
@@ -1467,8 +1487,8 @@ const kr = /* @__PURE__ */ H(wr, [["render", _r]]), Lr = {}, Cr = {
|
|
|
1467
1487
|
"stroke-linejoin": "round",
|
|
1468
1488
|
class: "lucide lucide-more-vertical text-gray-600"
|
|
1469
1489
|
};
|
|
1470
|
-
function
|
|
1471
|
-
return c(), p("svg",
|
|
1490
|
+
function Er(e, t) {
|
|
1491
|
+
return c(), p("svg", Pr, [...t[0] || (t[0] = [
|
|
1472
1492
|
r("circle", {
|
|
1473
1493
|
cx: "12",
|
|
1474
1494
|
cy: "12",
|
|
@@ -1486,15 +1506,15 @@ function $r(e, t) {
|
|
|
1486
1506
|
}, null, -1)
|
|
1487
1507
|
])]);
|
|
1488
1508
|
}
|
|
1489
|
-
const
|
|
1509
|
+
const Mr = /* @__PURE__ */ H(jr, [["render", Er]]), Tr = {}, zr = {
|
|
1490
1510
|
width: "6",
|
|
1491
1511
|
height: "10",
|
|
1492
1512
|
viewBox: "0 0 6 10",
|
|
1493
1513
|
fill: "none",
|
|
1494
1514
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1495
1515
|
};
|
|
1496
|
-
function
|
|
1497
|
-
return c(), p("svg",
|
|
1516
|
+
function Ar(e, t) {
|
|
1517
|
+
return c(), p("svg", zr, [...t[0] || (t[0] = [
|
|
1498
1518
|
r("path", {
|
|
1499
1519
|
d: "M1 9L5 5L1 1",
|
|
1500
1520
|
stroke: "currentColor",
|
|
@@ -1503,40 +1523,42 @@ function Fr(e, t) {
|
|
|
1503
1523
|
}, null, -1)
|
|
1504
1524
|
])]);
|
|
1505
1525
|
}
|
|
1506
|
-
const
|
|
1526
|
+
const Br = /* @__PURE__ */ H(Tr, [["render", Ar]]), Or = {}, Dr = {
|
|
1507
1527
|
width: "18",
|
|
1508
1528
|
height: "18",
|
|
1509
1529
|
viewBox: "0 0 24 24",
|
|
1510
1530
|
fill: "none",
|
|
1511
1531
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1512
1532
|
};
|
|
1513
|
-
function
|
|
1514
|
-
return c(), p("svg",
|
|
1515
|
-
|
|
1533
|
+
function Ur(e, t) {
|
|
1534
|
+
return c(), p("svg", Dr, [...t[0] || (t[0] = [
|
|
1535
|
+
Be('<g clip-path="url(#clip0_231_103)"><path d="M12 20L9 21V12.5L4.52 7.572C4.18545 7.20393 4.00005 6.7244 4 6.227V4H20V6.172C19.9999 6.70239 19.7891 7.21101 19.414 7.586L15 12" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21.121 20.1209C21.5406 19.7014 21.8265 19.1668 21.9423 18.5849C22.0581 18.0029 21.9988 17.3997 21.7717 16.8514C21.5447 16.3032 21.1602 15.8346 20.6668 15.5049C20.1734 15.1752 19.5934 14.9993 19 14.9993C18.4066 14.9993 17.8266 15.1752 17.3332 15.5049C16.8398 15.8346 16.4553 16.3032 16.2283 16.8514C16.0012 17.3997 15.9419 18.0029 16.0577 18.5849C16.1735 19.1668 16.4594 19.7014 16.879 20.1209C17.297 20.5399 18.004 21.1659 19 21.9999C20.051 21.1099 20.759 20.4839 21.121 20.1209Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M19 18V18.01" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></g><defs><clipPath id="clip0_231_103"><rect width="24" height="24" fill="white"></rect></clipPath></defs>', 2)
|
|
1516
1536
|
])]);
|
|
1517
1537
|
}
|
|
1518
|
-
const
|
|
1519
|
-
function
|
|
1538
|
+
const Rr = /* @__PURE__ */ H(Or, [["render", Ur]]);
|
|
1539
|
+
function Hr() {
|
|
1520
1540
|
const t = new URLSearchParams(window.location.search).get("layers");
|
|
1521
1541
|
return t ? t.split(",") : [];
|
|
1522
1542
|
}
|
|
1523
|
-
function
|
|
1543
|
+
function Nr(e) {
|
|
1524
1544
|
const t = new URLSearchParams(window.location.search);
|
|
1525
1545
|
e.length > 0 ? t.set("layers", e.join(",")) : t.delete("layers");
|
|
1526
1546
|
const o = `${window.location.pathname}?${t.toString()}`;
|
|
1527
1547
|
window.history.replaceState({}, "", o);
|
|
1528
1548
|
}
|
|
1529
|
-
const
|
|
1549
|
+
const Wr = {
|
|
1530
1550
|
components: {
|
|
1531
|
-
VsPopover:
|
|
1532
|
-
VsLayersItem:
|
|
1533
|
-
ZoomInIcon:
|
|
1534
|
-
InfoIcon:
|
|
1535
|
-
TableIcon:
|
|
1536
|
-
TrashIcon:
|
|
1537
|
-
DotsIcon:
|
|
1538
|
-
ChevronRightIcon:
|
|
1539
|
-
FilterIcon:
|
|
1551
|
+
VsPopover: Ie,
|
|
1552
|
+
VsLayersItem: fr,
|
|
1553
|
+
ZoomInIcon: yr,
|
|
1554
|
+
InfoIcon: _r,
|
|
1555
|
+
TableIcon: $r,
|
|
1556
|
+
TrashIcon: Fr,
|
|
1557
|
+
DotsIcon: Mr,
|
|
1558
|
+
ChevronRightIcon: Br,
|
|
1559
|
+
FilterIcon: Rr,
|
|
1560
|
+
closeIcon: st,
|
|
1561
|
+
searchIcon: ot
|
|
1540
1562
|
},
|
|
1541
1563
|
props: {
|
|
1542
1564
|
center: { type: Array, default: () => [26.2516, 50.6199] },
|
|
@@ -1569,17 +1591,17 @@ const Br = {
|
|
|
1569
1591
|
},
|
|
1570
1592
|
async mounted() {
|
|
1571
1593
|
if (this.mounted = !0, await this.getLayers(), this.categories = this.layersCategories(), this.history) {
|
|
1572
|
-
const e =
|
|
1594
|
+
const e = Hr();
|
|
1573
1595
|
e.length > 0 && this.layers && (e.forEach((t) => {
|
|
1574
|
-
const o = this.layers.find((
|
|
1575
|
-
if (o && !this.selectedLayers.find((
|
|
1576
|
-
const
|
|
1596
|
+
const o = this.layers.find((s) => String(s.id) === t);
|
|
1597
|
+
if (o && !this.selectedLayers.find((s) => s.id === o.id)) {
|
|
1598
|
+
const s = {
|
|
1577
1599
|
...o,
|
|
1578
1600
|
visible: !0,
|
|
1579
1601
|
opacity: 100,
|
|
1580
1602
|
showFilters: !1
|
|
1581
1603
|
};
|
|
1582
|
-
this.selectedLayers.push(
|
|
1604
|
+
this.selectedLayers.push(s), we(this.map, s);
|
|
1583
1605
|
}
|
|
1584
1606
|
}), this.activeView = "selected");
|
|
1585
1607
|
}
|
|
@@ -1597,7 +1619,7 @@ const Br = {
|
|
|
1597
1619
|
// --- HISTORY: оновлення layers у URL ---
|
|
1598
1620
|
selectedLayers: {
|
|
1599
1621
|
handler(e) {
|
|
1600
|
-
this.history &&
|
|
1622
|
+
this.history && Nr(e.map((t) => t.id));
|
|
1601
1623
|
},
|
|
1602
1624
|
deep: !0
|
|
1603
1625
|
}
|
|
@@ -1608,7 +1630,7 @@ const Br = {
|
|
|
1608
1630
|
const e = await fetch("/api/map-catalog").then((o) => o.json()), t = (e.services || []).filter(
|
|
1609
1631
|
(o) => o.service_type !== "other"
|
|
1610
1632
|
);
|
|
1611
|
-
this.layers = [...t, ...e.rasters || []], this
|
|
1633
|
+
this.layers = [...t, ...e.rasters || []], this.rawCatalog = {
|
|
1612
1634
|
...e,
|
|
1613
1635
|
services: t
|
|
1614
1636
|
};
|
|
@@ -1665,17 +1687,17 @@ const Br = {
|
|
|
1665
1687
|
},
|
|
1666
1688
|
updateLayerOpacity(e) {
|
|
1667
1689
|
if (this.map) {
|
|
1668
|
-
const t = this.map.getStyle().layers.filter((
|
|
1669
|
-
t.forEach((
|
|
1670
|
-
|
|
1671
|
-
|
|
1690
|
+
const t = this.map.getStyle().layers.filter((s) => s.id.includes(e.id)), o = e.opacity / 100;
|
|
1691
|
+
t.forEach((s) => {
|
|
1692
|
+
s.type === "fill" ? (e.originalFillOpacity || (e.originalFillOpacity = this.map.getPaintProperty(s.id, "fill-opacity") || 1), this.map.setPaintProperty(
|
|
1693
|
+
s.id,
|
|
1672
1694
|
"fill-opacity",
|
|
1673
1695
|
e.originalFillOpacity * o
|
|
1674
|
-
)) :
|
|
1675
|
-
|
|
1696
|
+
)) : s.type === "raster" ? this.map.setPaintProperty(s.id, "raster-opacity", o) : s.type === "line" ? this.map.setPaintProperty(s.id, "line-opacity", o) : s.type === "circle" ? (this.map.setPaintProperty(s.id, "circle-opacity", o), this.map.setPaintProperty(
|
|
1697
|
+
s.id,
|
|
1676
1698
|
"circle-stroke-opacity",
|
|
1677
1699
|
o
|
|
1678
|
-
)) :
|
|
1700
|
+
)) : s.type === "symbol" && (this.map.setPaintProperty(s.id, "icon-opacity", o), this.map.setPaintProperty(s.id, "text-opacity", o));
|
|
1679
1701
|
});
|
|
1680
1702
|
}
|
|
1681
1703
|
},
|
|
@@ -1713,7 +1735,7 @@ const Br = {
|
|
|
1713
1735
|
async handleFilterChange({ url: e }, t) {
|
|
1714
1736
|
const o = this.map.getSource(t.id);
|
|
1715
1737
|
if (o) {
|
|
1716
|
-
const
|
|
1738
|
+
const n = o.tiles[0].split("?filter=")[0], i = e ? `${n}?filter=${e}` : n;
|
|
1717
1739
|
o.setTiles([i]);
|
|
1718
1740
|
}
|
|
1719
1741
|
},
|
|
@@ -1770,9 +1792,9 @@ const Br = {
|
|
|
1770
1792
|
const t = this.selectedLayers[this.draggedLayerIndex];
|
|
1771
1793
|
if (this.selectedLayers.splice(this.draggedLayerIndex, 1), this.selectedLayers.splice(e, 0, t), this.draggedLayerIndex = null, this.map && this.selectedLayers.length > 1)
|
|
1772
1794
|
for (let o = this.selectedLayers.length - 1; o >= 0; o--) {
|
|
1773
|
-
const
|
|
1774
|
-
|
|
1775
|
-
|
|
1795
|
+
const s = this.selectedLayers[o];
|
|
1796
|
+
s.visible && this.map.getStyle().layers.find((n) => n.id.includes(s.id)) && this.map.getStyle().layers.forEach((n) => {
|
|
1797
|
+
n.id.includes(s.id) && this.map.moveLayer(n.id);
|
|
1776
1798
|
});
|
|
1777
1799
|
}
|
|
1778
1800
|
},
|
|
@@ -1780,37 +1802,37 @@ const Br = {
|
|
|
1780
1802
|
this.draggedLayerIndex = null;
|
|
1781
1803
|
}
|
|
1782
1804
|
}
|
|
1783
|
-
},
|
|
1805
|
+
}, Zr = { class: "w-full max-w-md mx-auto p-4 bg-white border border-gray-200 rounded-lg shadow-sm" }, qr = { class: "flex items-center justify-between mb-4" }, Gr = { class: "flex items-center gap-2" }, Jr = { class: "text-lg font-semibold text-gray-800" }, Qr = { key: 0 }, Yr = { key: 1 }, Kr = { class: "flex mb-4 border-b border-gray-200" }, Xr = { key: 0 }, es = { class: "mb-4" }, ts = {
|
|
1784
1806
|
key: 0,
|
|
1785
1807
|
class: "space-y-2 max-h-[400px] overflow-y-auto pr-1 [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent"
|
|
1786
|
-
},
|
|
1808
|
+
}, os = ["onDragstart", "onDragover", "onDrop"], rs = { class: "flex items-center justify-between" }, ss = { class: "flex items-center gap-2 cursor-move" }, ns = ["onUpdate:modelValue", "onChange"], is = { class: "text-gray-800" }, as = { class: "flex items-center gap-2" }, ls = { class: "relative" }, cs = { class: "flex items-center gap-2" }, ds = ["onUpdate:modelValue", "onInput"], us = { class: "text-xs text-gray-600 whitespace-nowrap" }, ps = ["onClick"], hs = { class: "relative" }, fs = { class: "w-48" }, gs = {
|
|
1787
1809
|
key: 0,
|
|
1788
1810
|
class: "my-1 border-gray-200"
|
|
1789
|
-
},
|
|
1811
|
+
}, vs = ["disabled", "onClick"], ms = {
|
|
1790
1812
|
class: "p-1 rounded-full hover:bg-gray-100 transition-colors",
|
|
1791
1813
|
"aria-label": "Layer actions"
|
|
1792
|
-
},
|
|
1814
|
+
}, ys = {
|
|
1793
1815
|
key: 0,
|
|
1794
1816
|
class: "bg-blue-50 rounded-md mt-2"
|
|
1795
|
-
},
|
|
1817
|
+
}, bs = { class: "px-2 pt-2 text-blue-600 hover:text-blue-700 transition-colors" }, ws = {
|
|
1796
1818
|
key: 0,
|
|
1797
1819
|
class: "text-center text-[14px] text-[#4b5563]"
|
|
1798
|
-
},
|
|
1820
|
+
}, xs = { class: "relative mt-[10px]" }, _s = {
|
|
1799
1821
|
key: 0,
|
|
1800
1822
|
class: "vs-layers-catalog__list flex-1 scrollable-container overflow-auto mt-2 catalog-list"
|
|
1801
|
-
},
|
|
1823
|
+
}, ks = {
|
|
1802
1824
|
key: 0,
|
|
1803
1825
|
class: "text-center text-[14px] text-[#4b5563]"
|
|
1804
|
-
},
|
|
1826
|
+
}, Ls = {
|
|
1805
1827
|
key: 0,
|
|
1806
1828
|
class: "text-center text-[14px] text-[#4b5563]"
|
|
1807
|
-
},
|
|
1808
|
-
function
|
|
1829
|
+
}, Cs = ["onClick"], $s = { class: "flex items-center gap-x-3" }, Is = ["title"], Vs = { class: "text-xs opacity-60 text-[#4b5563]" };
|
|
1830
|
+
function Ss(e, t, o, s, n, i) {
|
|
1809
1831
|
var h;
|
|
1810
1832
|
const d = G("VsPopover"), v = G("DotsIcon"), g = G("VsFilter"), l = G("searchIcon"), u = G("closeIcon"), a = G("VsLayersItem"), m = G("chevronRightIcon");
|
|
1811
|
-
return c(), p("div",
|
|
1812
|
-
r("div",
|
|
1813
|
-
r("div",
|
|
1833
|
+
return c(), p("div", Zr, [
|
|
1834
|
+
r("div", qr, [
|
|
1835
|
+
r("div", Gr, [
|
|
1814
1836
|
t[7] || (t[7] = r("svg", {
|
|
1815
1837
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1816
1838
|
width: "20",
|
|
@@ -1827,9 +1849,9 @@ function _s(e, t, o, n, s, i) {
|
|
|
1827
1849
|
r("path", { d: "m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65" }),
|
|
1828
1850
|
r("path", { d: "m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65" })
|
|
1829
1851
|
], -1)),
|
|
1830
|
-
r("h2",
|
|
1831
|
-
ae(S(
|
|
1832
|
-
|
|
1852
|
+
r("h2", Jr, [
|
|
1853
|
+
ae(S(n.activeView === "catalog" ? "Каталог" : "Вибрані шари") + " ", 1),
|
|
1854
|
+
n.activeView === "catalog" ? (c(), p("span", Qr, "(" + S(((h = n.layers) == null ? void 0 : h.length) || 0) + ")", 1)) : (c(), p("span", Yr, "(" + S(n.selectedLayers.length) + ")", 1))
|
|
1833
1855
|
])
|
|
1834
1856
|
]),
|
|
1835
1857
|
r("button", {
|
|
@@ -1837,30 +1859,30 @@ function _s(e, t, o, n, s, i) {
|
|
|
1837
1859
|
"aria-label": "Reset layers",
|
|
1838
1860
|
onClick: t[0] || (t[0] = (...f) => i.clearSelectedLayers && i.clearSelectedLayers(...f))
|
|
1839
1861
|
}, [...t[8] || (t[8] = [
|
|
1840
|
-
|
|
1862
|
+
Be('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-refresh-cw text-gray-600" data-v-e9e7021a><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" data-v-e9e7021a></path><path d="M21 3v5h-5" data-v-e9e7021a></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" data-v-e9e7021a></path><path d="M8 16H3v5" data-v-e9e7021a></path></svg>', 1)
|
|
1841
1863
|
])])
|
|
1842
1864
|
]),
|
|
1843
|
-
r("div",
|
|
1865
|
+
r("div", Kr, [
|
|
1844
1866
|
r("button", {
|
|
1845
1867
|
class: K([
|
|
1846
1868
|
"px-4 py-2 text-sm font-medium",
|
|
1847
|
-
|
|
1869
|
+
n.activeView === "catalog" ? "text-blue-600 border-b-2 border-blue-600" : "text-gray-600 hover:text-gray-800"
|
|
1848
1870
|
]),
|
|
1849
|
-
onClick: t[1] || (t[1] = (f) =>
|
|
1871
|
+
onClick: t[1] || (t[1] = (f) => n.activeView = "catalog")
|
|
1850
1872
|
}, " Каталог ", 2),
|
|
1851
1873
|
r("button", {
|
|
1852
1874
|
class: K([
|
|
1853
1875
|
"px-4 py-2 text-sm font-medium",
|
|
1854
|
-
|
|
1876
|
+
n.activeView === "selected" ? "text-blue-600 border-b-2 border-blue-600" : "text-gray-600 hover:text-gray-800"
|
|
1855
1877
|
]),
|
|
1856
|
-
onClick: t[2] || (t[2] = (f) =>
|
|
1878
|
+
onClick: t[2] || (t[2] = (f) => n.activeView = "selected")
|
|
1857
1879
|
}, " Вибрані шари ", 2)
|
|
1858
1880
|
]),
|
|
1859
|
-
|
|
1860
|
-
r("div",
|
|
1881
|
+
n.activeView === "selected" ? (c(), p("div", Xr, [
|
|
1882
|
+
r("div", es, [
|
|
1861
1883
|
r("button", {
|
|
1862
1884
|
class: "flex items-center gap-2 text-blue-600 hover:text-blue-700 transition-colors px-3 py-2 rounded-md bg-blue-50 hover:bg-blue-100 w-full justify-center",
|
|
1863
|
-
onClick: t[3] || (t[3] = (f) =>
|
|
1885
|
+
onClick: t[3] || (t[3] = (f) => n.activeView = "catalog")
|
|
1864
1886
|
}, [...t[9] || (t[9] = [
|
|
1865
1887
|
r("svg", {
|
|
1866
1888
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1880,42 +1902,42 @@ function _s(e, t, o, n, s, i) {
|
|
|
1880
1902
|
r("span", null, "Вибрати шар", -1)
|
|
1881
1903
|
])])
|
|
1882
1904
|
]),
|
|
1883
|
-
|
|
1884
|
-
(c(!0), p(B, null, W(
|
|
1905
|
+
n.mounted ? (c(), p("div", ts, [
|
|
1906
|
+
(c(!0), p(B, null, W(n.selectedLayers, (f, L) => {
|
|
1885
1907
|
var j, T;
|
|
1886
1908
|
return c(), p("div", {
|
|
1887
1909
|
key: f.id || L,
|
|
1888
|
-
class: K(["border border-gray-200 rounded-md p-3 mb-2 bg-white shadow-sm text-[13px] text-[#4b5563]", { dragging:
|
|
1910
|
+
class: K(["border border-gray-200 rounded-md p-3 mb-2 bg-white shadow-sm text-[13px] text-[#4b5563]", { dragging: n.draggedLayerIndex === L }]),
|
|
1889
1911
|
draggable: "true",
|
|
1890
1912
|
onDragstart: (k) => i.onDragStart(L),
|
|
1891
|
-
onDragover:
|
|
1913
|
+
onDragover: mt((k) => i.onDragOver(L), ["prevent"]),
|
|
1892
1914
|
onDrop: (k) => i.onDrop(L),
|
|
1893
1915
|
onDragend: t[4] || (t[4] = (...k) => i.onDragEnd && i.onDragEnd(...k))
|
|
1894
1916
|
}, [
|
|
1895
|
-
r("div",
|
|
1896
|
-
r("div",
|
|
1897
|
-
t[10] || (t[10] =
|
|
1917
|
+
r("div", rs, [
|
|
1918
|
+
r("div", ss, [
|
|
1919
|
+
t[10] || (t[10] = Be('<svg width="16" height="16" fill="none" stroke="#9ca3af" stroke-width="2" viewBox="0 0 24 24" class="mr-1 shrink-0" data-v-e9e7021a><circle cx="5" cy="5" r="1.5" data-v-e9e7021a></circle><circle cx="5" cy="12" r="1.5" data-v-e9e7021a></circle><circle cx="5" cy="19" r="1.5" data-v-e9e7021a></circle><circle cx="12" cy="5" r="1.5" data-v-e9e7021a></circle><circle cx="12" cy="12" r="1.5" data-v-e9e7021a></circle><circle cx="12" cy="19" r="1.5" data-v-e9e7021a></circle><circle cx="19" cy="5" r="1.5" data-v-e9e7021a></circle><circle cx="19" cy="12" r="1.5" data-v-e9e7021a></circle><circle cx="19" cy="19" r="1.5" data-v-e9e7021a></circle></svg>', 1)),
|
|
1898
1920
|
ne(r("input", {
|
|
1899
1921
|
type: "checkbox",
|
|
1900
1922
|
class: "w-4 h-4 text-blue-600 rounded focus:ring-blue-500",
|
|
1901
1923
|
"onUpdate:modelValue": (k) => f.visible = k,
|
|
1902
1924
|
onChange: (k) => i.toggleLayerVisibility(f)
|
|
1903
|
-
}, null, 40,
|
|
1925
|
+
}, null, 40, ns), [
|
|
1904
1926
|
[qe, f.visible]
|
|
1905
1927
|
]),
|
|
1906
|
-
r("span",
|
|
1928
|
+
r("span", is, S(f.name || f.title || f.label), 1)
|
|
1907
1929
|
]),
|
|
1908
|
-
r("div",
|
|
1909
|
-
r("div",
|
|
1930
|
+
r("div", as, [
|
|
1931
|
+
r("div", ls, [
|
|
1910
1932
|
N(d, { placement: "bottom" }, {
|
|
1911
1933
|
reference: Z(() => [
|
|
1912
1934
|
r("div", {
|
|
1913
1935
|
class: "text-sm text-gray-600 hover:text-gray-800 transition-colors px-2 py-1 rounded hover:bg-gray-100 cursor-pointer",
|
|
1914
1936
|
onClick: (k) => i.updateLayerOpacity(f)
|
|
1915
|
-
}, S(f.opacity || 100) + "% ", 9,
|
|
1937
|
+
}, S(f.opacity || 100) + "% ", 9, ps)
|
|
1916
1938
|
]),
|
|
1917
1939
|
default: Z(() => [
|
|
1918
|
-
r("div",
|
|
1940
|
+
r("div", cs, [
|
|
1919
1941
|
t[11] || (t[11] = r("label", { class: "text-gray-600 whitespace-nowrap" }, "Прозорість:", -1)),
|
|
1920
1942
|
ne(r("input", {
|
|
1921
1943
|
type: "range",
|
|
@@ -1925,26 +1947,26 @@ function _s(e, t, o, n, s, i) {
|
|
|
1925
1947
|
"onUpdate:modelValue": (k) => f.opacity = k,
|
|
1926
1948
|
onInput: (k) => i.onLayerOpacityChange(f),
|
|
1927
1949
|
class: "h-2 w-full accent-blue-600 rounded-lg cursor-pointer bg-gray-200"
|
|
1928
|
-
}, null, 40,
|
|
1929
|
-
[
|
|
1950
|
+
}, null, 40, ds), [
|
|
1951
|
+
[We, f.opacity]
|
|
1930
1952
|
]),
|
|
1931
|
-
r("span",
|
|
1953
|
+
r("span", us, S(Math.round(f.opacity)) + "% ", 1)
|
|
1932
1954
|
])
|
|
1933
1955
|
]),
|
|
1934
1956
|
_: 2
|
|
1935
1957
|
}, 1024)
|
|
1936
1958
|
]),
|
|
1937
|
-
r("div",
|
|
1959
|
+
r("div", hs, [
|
|
1938
1960
|
N(d, { placement: "bottom" }, {
|
|
1939
1961
|
reference: Z(() => [
|
|
1940
|
-
r("div",
|
|
1962
|
+
r("div", ms, [
|
|
1941
1963
|
N(v)
|
|
1942
1964
|
])
|
|
1943
1965
|
]),
|
|
1944
1966
|
default: Z(() => [
|
|
1945
|
-
r("div",
|
|
1967
|
+
r("div", fs, [
|
|
1946
1968
|
(c(!0), p(B, null, W(i.popoverActions(f), (k, _) => (c(), p(B, { key: _ }, [
|
|
1947
|
-
k.divider ? (c(), p("hr",
|
|
1969
|
+
k.divider ? (c(), p("hr", gs)) : (c(), p("button", {
|
|
1948
1970
|
key: 1,
|
|
1949
1971
|
class: K(
|
|
1950
1972
|
"w-full p-2 text-left text-sm flex items-center gap-2 " + (k.class || "")
|
|
@@ -1952,9 +1974,9 @@ function _s(e, t, o, n, s, i) {
|
|
|
1952
1974
|
disabled: k.disabled,
|
|
1953
1975
|
onClick: (D) => !k.disabled && e.$options.methods[k.handler].call(this, f)
|
|
1954
1976
|
}, [
|
|
1955
|
-
(c(), X(
|
|
1977
|
+
(c(), X(Oe(k.icon), { class: "lucide" })),
|
|
1956
1978
|
ae(" " + S(k.label), 1)
|
|
1957
|
-
], 10,
|
|
1979
|
+
], 10, vs))
|
|
1958
1980
|
], 64))), 128))
|
|
1959
1981
|
])
|
|
1960
1982
|
]),
|
|
@@ -1963,8 +1985,8 @@ function _s(e, t, o, n, s, i) {
|
|
|
1963
1985
|
])
|
|
1964
1986
|
])
|
|
1965
1987
|
]),
|
|
1966
|
-
f.showFilters ? (c(), p("div",
|
|
1967
|
-
r("div",
|
|
1988
|
+
f.showFilters ? (c(), p("div", ys, [
|
|
1989
|
+
r("div", bs, " Фільтри для шару: " + S(f.name || f.title || f.label), 1),
|
|
1968
1990
|
ne(N(g, {
|
|
1969
1991
|
ref_for: !0,
|
|
1970
1992
|
ref: "filter",
|
|
@@ -1975,85 +1997,85 @@ function _s(e, t, o, n, s, i) {
|
|
|
1975
1997
|
name: "filter",
|
|
1976
1998
|
onFilterChange: (k) => i.handleFilterChange(k, f)
|
|
1977
1999
|
}, null, 8, ["scheme", "onFilterChange"]), [
|
|
1978
|
-
[
|
|
2000
|
+
[Pe, (j = f.filters) == null ? void 0 : j.length]
|
|
1979
2001
|
]),
|
|
1980
2002
|
ne(r("div", null, [...t[12] || (t[12] = [
|
|
1981
2003
|
r("div", { class: "px-2 text-[14px] text-[#4b5563]" }, " Фільтри для шару відсутні ", -1)
|
|
1982
2004
|
])], 512), [
|
|
1983
|
-
[
|
|
2005
|
+
[Pe, !((T = f.filters) != null && T.length)]
|
|
1984
2006
|
])
|
|
1985
2007
|
])) : F("", !0)
|
|
1986
|
-
], 42,
|
|
2008
|
+
], 42, os);
|
|
1987
2009
|
}), 128)),
|
|
1988
|
-
|
|
2010
|
+
n.selectedLayers.length === 0 ? (c(), p("div", ws, [...t[13] || (t[13] = [
|
|
1989
2011
|
r("p", null, 'Щоб додати шар, натисніть на кнопку "Вибрати шар".', -1)
|
|
1990
2012
|
])])) : F("", !0)
|
|
1991
2013
|
])) : F("", !0)
|
|
1992
2014
|
])) : (c(), p(B, { key: 1 }, [
|
|
1993
|
-
r("div",
|
|
2015
|
+
r("div", xs, [
|
|
1994
2016
|
ne(r("input", {
|
|
1995
2017
|
title: "value",
|
|
1996
2018
|
placeholder: "Введіть назву шару...",
|
|
1997
|
-
"onUpdate:modelValue": t[5] || (t[5] = (f) =>
|
|
2019
|
+
"onUpdate:modelValue": t[5] || (t[5] = (f) => n.search = f),
|
|
1998
2020
|
type: "text",
|
|
1999
|
-
class: "py-[7px] pl-
|
|
2000
|
-
onKeyup: t[6] || (t[6] =
|
|
2021
|
+
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 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600",
|
|
2022
|
+
onKeyup: t[6] || (t[6] = yt((...f) => i.onEnter && i.onEnter(...f), ["enter"]))
|
|
2001
2023
|
}, null, 544), [
|
|
2002
|
-
[
|
|
2024
|
+
[We, n.search]
|
|
2003
2025
|
]),
|
|
2004
2026
|
N(l, {
|
|
2005
2027
|
class: "absolute top-1/2 left-[8px] w-[16px] h-[16px]",
|
|
2006
2028
|
style: { transform: "translate(0, -50%)" }
|
|
2007
2029
|
}),
|
|
2008
|
-
|
|
2030
|
+
n.search ? (c(), X(u, {
|
|
2009
2031
|
key: 0,
|
|
2010
2032
|
class: "absolute top-1/2 right-[10px] w-[16px] h-[16px] cursor-pointer",
|
|
2011
2033
|
style: { transform: "translate(0, -50%)" },
|
|
2012
2034
|
onClick: i.clearSearch
|
|
2013
2035
|
}, null, 8, ["onClick"])) : F("", !0)
|
|
2014
2036
|
]),
|
|
2015
|
-
|
|
2016
|
-
|
|
2037
|
+
n.categories ? (c(), p("div", _s, [
|
|
2038
|
+
n.search ? (c(), p(B, { key: 0 }, [
|
|
2017
2039
|
(c(!0), p(B, null, W(i.searchedLayers, (f, L) => (c(), X(a, {
|
|
2018
2040
|
key: L,
|
|
2019
2041
|
layer: f,
|
|
2020
2042
|
map: o.map,
|
|
2021
|
-
selectedLayers:
|
|
2043
|
+
selectedLayers: n.selectedLayers,
|
|
2022
2044
|
onSelect: i.addToSelected,
|
|
2023
2045
|
onRemove: i.handleRemoveFromCatalog
|
|
2024
2046
|
}, null, 8, ["layer", "map", "selectedLayers", "onSelect", "onRemove"]))), 128)),
|
|
2025
|
-
i.searchedLayers.length === 0 ? (c(), p("div",
|
|
2047
|
+
i.searchedLayers.length === 0 ? (c(), p("div", ks, " Нічого не знайдено ")) : F("", !0)
|
|
2026
2048
|
], 64)) : (c(), p(B, { key: 1 }, [
|
|
2027
|
-
!
|
|
2049
|
+
!n.categories || Object.keys(n.categories).length === 0 ? (c(), p("div", Ls, " Каталог порожній ")) : (c(!0), p(B, { key: 1 }, W(Object.keys(n.categories), (f) => (c(), p("div", { key: f }, [
|
|
2028
2050
|
r("div", {
|
|
2029
2051
|
class: "hover:bg-gray-100 focus:bg-gray-100 px-2.5 cursor-pointer p-[8px] rounded-lg flex justify-between items-center",
|
|
2030
2052
|
onClick: (L) => i.selectCategory(f)
|
|
2031
2053
|
}, [
|
|
2032
|
-
r("div",
|
|
2054
|
+
r("div", $s, [
|
|
2033
2055
|
N(m, {
|
|
2034
2056
|
class: K({
|
|
2035
|
-
"rotate-up": f ===
|
|
2036
|
-
"rotate-down": f !==
|
|
2057
|
+
"rotate-up": f === n.selectedCategory,
|
|
2058
|
+
"rotate-down": f !== n.selectedCategory
|
|
2037
2059
|
})
|
|
2038
2060
|
}, null, 8, ["class"]),
|
|
2039
2061
|
r("div", {
|
|
2040
2062
|
class: "max-w-[260px] text-[14px] text-[#4b5563]",
|
|
2041
2063
|
title: f
|
|
2042
|
-
}, S(f), 9,
|
|
2064
|
+
}, S(f), 9, Is)
|
|
2043
2065
|
]),
|
|
2044
|
-
r("div",
|
|
2045
|
-
], 8,
|
|
2066
|
+
r("div", Vs, S(i.formatNumber(n.categories[f].length)), 1)
|
|
2067
|
+
], 8, Cs),
|
|
2046
2068
|
ne(r("div", null, [
|
|
2047
|
-
(c(!0), p(B, null, W(
|
|
2069
|
+
(c(!0), p(B, null, W(n.categories[f], (L, j) => (c(), X(a, {
|
|
2048
2070
|
key: j,
|
|
2049
2071
|
layer: L,
|
|
2050
2072
|
map: o.map,
|
|
2051
|
-
selectedLayers:
|
|
2073
|
+
selectedLayers: n.selectedLayers,
|
|
2052
2074
|
onSelect: i.addToSelected,
|
|
2053
2075
|
onRemove: i.handleRemoveFromCatalog
|
|
2054
2076
|
}, null, 8, ["layer", "map", "selectedLayers", "onSelect", "onRemove"]))), 128))
|
|
2055
2077
|
], 512), [
|
|
2056
|
-
[
|
|
2078
|
+
[Pe, f === n.selectedCategory]
|
|
2057
2079
|
])
|
|
2058
2080
|
]))), 128))
|
|
2059
2081
|
], 64))
|
|
@@ -2061,13 +2083,13 @@ function _s(e, t, o, n, s, i) {
|
|
|
2061
2083
|
], 64))
|
|
2062
2084
|
]);
|
|
2063
2085
|
}
|
|
2064
|
-
const
|
|
2086
|
+
const Fs = /* @__PURE__ */ H(Wr, [["render", Ss], ["__scopeId", "data-v-e9e7021a"]]), js = {
|
|
2065
2087
|
key: 0,
|
|
2066
2088
|
class: "w-full flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative widget"
|
|
2067
|
-
},
|
|
2089
|
+
}, Ps = {
|
|
2068
2090
|
key: 0,
|
|
2069
2091
|
class: "p-5 pb-3 flex justify-between items-center"
|
|
2070
|
-
},
|
|
2092
|
+
}, Es = { class: "inline-block font-semibold text-lg text-gray-800 dark:text-neutral-200" }, Ms = { class: "flex flex-col justify-between h-full" }, Ts = {
|
|
2071
2093
|
__name: "vs-filters-widget",
|
|
2072
2094
|
props: {
|
|
2073
2095
|
config: {
|
|
@@ -2087,7 +2109,7 @@ const ks = /* @__PURE__ */ H(Br, [["render", _s], ["__scopeId", "data-v-ed5e991a
|
|
|
2087
2109
|
const t = e, o = M(() => {
|
|
2088
2110
|
var d;
|
|
2089
2111
|
return ((d = t.config) == null ? void 0 : d.filters) || [];
|
|
2090
|
-
}),
|
|
2112
|
+
}), s = M(() => o.value), n = M(() => {
|
|
2091
2113
|
var v;
|
|
2092
2114
|
const d = (v = t.config) == null ? void 0 : v.conditions;
|
|
2093
2115
|
return !d || !d.layers ? !0 : t.enabledLayerIds.some((g) => d.layers.includes(g));
|
|
@@ -2104,27 +2126,27 @@ const ks = /* @__PURE__ */ H(Br, [["render", _s], ["__scopeId", "data-v-ed5e991a
|
|
|
2104
2126
|
}
|
|
2105
2127
|
});
|
|
2106
2128
|
};
|
|
2107
|
-
return (d, v) =>
|
|
2108
|
-
e.config.title ? (c(), p("div",
|
|
2109
|
-
r("h2",
|
|
2129
|
+
return (d, v) => n.value ? (c(), p("div", js, [
|
|
2130
|
+
e.config.title ? (c(), p("div", Ps, [
|
|
2131
|
+
r("h2", Es, S(e.config.title), 1)
|
|
2110
2132
|
])) : F("", !0),
|
|
2111
|
-
r("div",
|
|
2112
|
-
N(Ze(
|
|
2133
|
+
r("div", Ms, [
|
|
2134
|
+
N(Ze(xt), {
|
|
2113
2135
|
ref: "filter",
|
|
2114
|
-
schema:
|
|
2136
|
+
schema: s.value,
|
|
2115
2137
|
view: "vertical",
|
|
2116
2138
|
onChange: i
|
|
2117
2139
|
}, null, 8, ["schema"])
|
|
2118
2140
|
])
|
|
2119
2141
|
])) : F("", !0);
|
|
2120
2142
|
}
|
|
2121
|
-
},
|
|
2143
|
+
}, zs = {
|
|
2122
2144
|
type: "button",
|
|
2123
2145
|
class: "py-2 px-2.5 inline-flex items-center gap-x-1.5 text-sm font-medium rounded-lg bg-white text-gray-800 hover:bg-gray-50 focus:outline-none focus:bg-gray-49 h-[38px] shadow-md"
|
|
2124
|
-
},
|
|
2146
|
+
}, As = { class: "flex gap-[5px] items-center" }, Bs = { class: "text-gray-600" }, Os = {
|
|
2125
2147
|
key: 0,
|
|
2126
2148
|
class: "w-[16px] h-[16px] font-medium bg-gray-800 text-white rounded-full flex items-center justify-center text-[10px]"
|
|
2127
|
-
},
|
|
2149
|
+
}, Ds = {
|
|
2128
2150
|
__name: "vs-inline-filters-widget",
|
|
2129
2151
|
props: {
|
|
2130
2152
|
config: {
|
|
@@ -2141,10 +2163,10 @@ const ks = /* @__PURE__ */ H(Br, [["render", _s], ["__scopeId", "data-v-ed5e991a
|
|
|
2141
2163
|
}
|
|
2142
2164
|
},
|
|
2143
2165
|
setup(e) {
|
|
2144
|
-
const t = e, o = A(0),
|
|
2166
|
+
const t = e, o = A(0), s = A(null), n = M(() => {
|
|
2145
2167
|
var l;
|
|
2146
2168
|
return ((l = t.config) == null ? void 0 : l.filters) || [];
|
|
2147
|
-
}), i = M(() =>
|
|
2169
|
+
}), i = M(() => n.value.map((l) => ({
|
|
2148
2170
|
...l,
|
|
2149
2171
|
id: l.name
|
|
2150
2172
|
}))), d = M(() => {
|
|
@@ -2180,15 +2202,15 @@ const ks = /* @__PURE__ */ H(Br, [["render", _s], ["__scopeId", "data-v-ed5e991a
|
|
|
2180
2202
|
}
|
|
2181
2203
|
});
|
|
2182
2204
|
};
|
|
2183
|
-
return
|
|
2205
|
+
return fe(
|
|
2184
2206
|
() => t.enabledLayerIds,
|
|
2185
2207
|
(l) => {
|
|
2186
|
-
(!l || !l.length) &&
|
|
2208
|
+
(!l || !l.length) && s.value && (s.value.activeFilters = {}, o.value = 0);
|
|
2187
2209
|
}
|
|
2188
|
-
),
|
|
2210
|
+
), fe(
|
|
2189
2211
|
() => {
|
|
2190
2212
|
var l;
|
|
2191
|
-
return (l =
|
|
2213
|
+
return (l = s.value) == null ? void 0 : l.activeFilters;
|
|
2192
2214
|
},
|
|
2193
2215
|
(l) => {
|
|
2194
2216
|
o.value = Object.keys(l || {}).length;
|
|
@@ -2199,7 +2221,7 @@ const ks = /* @__PURE__ */ H(Br, [["render", _s], ["__scopeId", "data-v-ed5e991a
|
|
|
2199
2221
|
return d.value && i.value.length ? (c(), X(m, {
|
|
2200
2222
|
key: 0,
|
|
2201
2223
|
ref_key: "filter",
|
|
2202
|
-
ref:
|
|
2224
|
+
ref: s,
|
|
2203
2225
|
isDialog: e.config.dialog ?? !0,
|
|
2204
2226
|
scheme: i.value,
|
|
2205
2227
|
urlSeparator: "true",
|
|
@@ -2214,8 +2236,8 @@ const ks = /* @__PURE__ */ H(Br, [["render", _s], ["__scopeId", "data-v-ed5e991a
|
|
|
2214
2236
|
placement: "bottom"
|
|
2215
2237
|
}, {
|
|
2216
2238
|
reference: Z(() => [
|
|
2217
|
-
r("button",
|
|
2218
|
-
r("div",
|
|
2239
|
+
r("button", zs, [
|
|
2240
|
+
r("div", As, [
|
|
2219
2241
|
u[0] || (u[0] = r("svg", {
|
|
2220
2242
|
width: "18",
|
|
2221
2243
|
height: "18",
|
|
@@ -2242,8 +2264,8 @@ const ks = /* @__PURE__ */ H(Br, [["render", _s], ["__scopeId", "data-v-ed5e991a
|
|
|
2242
2264
|
"stroke-linejoin": "round"
|
|
2243
2265
|
})
|
|
2244
2266
|
], -1)),
|
|
2245
|
-
r("span",
|
|
2246
|
-
o.value ? (c(), p("span",
|
|
2267
|
+
r("span", Bs, S(v.value), 1),
|
|
2268
|
+
o.value ? (c(), p("span", Os, S(o.value), 1)) : F("", !0)
|
|
2247
2269
|
])
|
|
2248
2270
|
])
|
|
2249
2271
|
]),
|
|
@@ -2257,7 +2279,7 @@ const ks = /* @__PURE__ */ H(Br, [["render", _s], ["__scopeId", "data-v-ed5e991a
|
|
|
2257
2279
|
}, 8, ["isDialog", "scheme"])) : F("", !0);
|
|
2258
2280
|
};
|
|
2259
2281
|
}
|
|
2260
|
-
},
|
|
2282
|
+
}, Us = {
|
|
2261
2283
|
name: "VsListWidget",
|
|
2262
2284
|
props: {
|
|
2263
2285
|
config: {
|
|
@@ -2305,36 +2327,36 @@ const ks = /* @__PURE__ */ H(Br, [["render", _s], ["__scopeId", "data-v-ed5e991a
|
|
|
2305
2327
|
beforeUnmount() {
|
|
2306
2328
|
this.resizeObserver && this.$refs.rootEl && (this.resizeObserver.unobserve(this.$refs.rootEl), this.resizeObserver.disconnect());
|
|
2307
2329
|
}
|
|
2308
|
-
},
|
|
2330
|
+
}, Rs = {
|
|
2309
2331
|
class: "bg-white p-4 rounded-lg h-full flex flex-col overflow-hidden",
|
|
2310
2332
|
ref: "rootEl"
|
|
2311
|
-
},
|
|
2333
|
+
}, Hs = {
|
|
2312
2334
|
key: 0,
|
|
2313
2335
|
class: "flex flex-col flex-1 overflow-hidden"
|
|
2314
|
-
},
|
|
2336
|
+
}, Ns = { class: "space-y-0 overflow-y-auto flex-1 [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent" }, Ws = ["onClick"], Zs = { class: "text-base font-medium" }, qs = { class: "mt-2 flex flex-wrap gap-2" }, Gs = {
|
|
2315
2337
|
key: 1,
|
|
2316
2338
|
class: "px-2 py-1 text-sm bg-gray-100 rounded-full"
|
|
2317
|
-
},
|
|
2339
|
+
}, Js = {
|
|
2318
2340
|
key: 0,
|
|
2319
2341
|
class: "my-5 pr-2"
|
|
2320
|
-
},
|
|
2342
|
+
}, Qs = { class: "paginationWrapper relative flex justify-center" }, Ys = {
|
|
2321
2343
|
key: 1,
|
|
2322
2344
|
class: "text-center text-slate-400"
|
|
2323
2345
|
};
|
|
2324
|
-
function
|
|
2346
|
+
function Ks(e, t, o, s, n, i) {
|
|
2325
2347
|
var v;
|
|
2326
2348
|
const d = G("VsPagination");
|
|
2327
|
-
return c(), p("div",
|
|
2349
|
+
return c(), p("div", Rs, [
|
|
2328
2350
|
t[0] || (t[0] = r("h2", { class: "text-xl font-semibold mb-4" }, "Список", -1)),
|
|
2329
|
-
((v =
|
|
2330
|
-
r("div",
|
|
2331
|
-
(c(!0), p(B, null, W(
|
|
2351
|
+
((v = n.items) == null ? void 0 : v.length) > 0 ? (c(), p("div", Hs, [
|
|
2352
|
+
r("div", Ns, [
|
|
2353
|
+
(c(!0), p(B, null, W(n.items, (g) => (c(), p("div", {
|
|
2332
2354
|
key: g.id,
|
|
2333
2355
|
class: "py-4 border-b last:border-b-0 hover:bg-gray-50",
|
|
2334
2356
|
onClick: (l) => e.$emit("cardValuesId", g.id)
|
|
2335
2357
|
}, [
|
|
2336
|
-
r("h3",
|
|
2337
|
-
r("div",
|
|
2358
|
+
r("h3", Zs, S(g.name), 1),
|
|
2359
|
+
r("div", qs, [
|
|
2338
2360
|
g.status_data ? (c(), p("span", {
|
|
2339
2361
|
key: 0,
|
|
2340
2362
|
class: K(["px-2 py-1 text-sm rounded-full", {
|
|
@@ -2342,17 +2364,17 @@ function Ns(e, t, o, n, s, i) {
|
|
|
2342
2364
|
"bg-red-100 text-red-800": g.status_data.color === "red"
|
|
2343
2365
|
}])
|
|
2344
2366
|
}, S(g.status_data.text), 3)) : F("", !0),
|
|
2345
|
-
g.class_mbd_id_data ? (c(), p("span",
|
|
2367
|
+
g.class_mbd_id_data ? (c(), p("span", Gs, S(g.class_mbd_id_data.text), 1)) : F("", !0)
|
|
2346
2368
|
])
|
|
2347
|
-
], 8,
|
|
2369
|
+
], 8, Ws))), 128))
|
|
2348
2370
|
]),
|
|
2349
|
-
|
|
2350
|
-
r("div",
|
|
2371
|
+
n.total > n.limit ? (c(), p("div", Js, [
|
|
2372
|
+
r("div", Qs, [
|
|
2351
2373
|
N(d, {
|
|
2352
|
-
total:
|
|
2374
|
+
total: n.total,
|
|
2353
2375
|
maxPages: 4,
|
|
2354
|
-
defaultPage:
|
|
2355
|
-
pageSize:
|
|
2376
|
+
defaultPage: n.currentPage,
|
|
2377
|
+
pageSize: n.limit,
|
|
2356
2378
|
goTo: !1,
|
|
2357
2379
|
size: "medium",
|
|
2358
2380
|
onPageChange: i.handlePageChange,
|
|
@@ -2363,25 +2385,25 @@ function Ns(e, t, o, n, s, i) {
|
|
|
2363
2385
|
}, null, 8, ["total", "defaultPage", "pageSize", "onPageChange", "onPageSizeChange"])
|
|
2364
2386
|
])
|
|
2365
2387
|
])) : F("", !0)
|
|
2366
|
-
])) : (c(), p("div",
|
|
2388
|
+
])) : (c(), p("div", Ys, "Немає даних"))
|
|
2367
2389
|
], 512);
|
|
2368
2390
|
}
|
|
2369
|
-
const
|
|
2391
|
+
const Xs = /* @__PURE__ */ H(Us, [["render", Ks]]), en = { class: "map-skeleton-loader" }, tn = {
|
|
2370
2392
|
__name: "vs-skeleton-loader",
|
|
2371
2393
|
setup(e) {
|
|
2372
|
-
return (t, o) => (c(), p("div",
|
|
2394
|
+
return (t, o) => (c(), p("div", en, [...o[0] || (o[0] = [
|
|
2373
2395
|
r("div", { class: "dot-pulse" }, null, -1)
|
|
2374
2396
|
])]));
|
|
2375
2397
|
}
|
|
2376
|
-
},
|
|
2398
|
+
}, on = /* @__PURE__ */ H(tn, [["__scopeId", "data-v-954c1e03"]]), rn = {}, sn = {
|
|
2377
2399
|
width: "24",
|
|
2378
2400
|
height: "24",
|
|
2379
2401
|
viewBox: "0 0 24 24",
|
|
2380
2402
|
fill: "none",
|
|
2381
2403
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2382
2404
|
};
|
|
2383
|
-
function
|
|
2384
|
-
return c(), p("svg",
|
|
2405
|
+
function nn(e, t) {
|
|
2406
|
+
return c(), p("svg", sn, [...t[0] || (t[0] = [
|
|
2385
2407
|
r("title", null, "Globe Icon", -1),
|
|
2386
2408
|
r("desc", null, " A circular representation of a globe with horizontal and vertical lines ", -1),
|
|
2387
2409
|
r("path", {
|
|
@@ -2407,9 +2429,9 @@ function Ks(e, t) {
|
|
|
2407
2429
|
}, null, -1)
|
|
2408
2430
|
])]);
|
|
2409
2431
|
}
|
|
2410
|
-
const
|
|
2432
|
+
const an = /* @__PURE__ */ H(rn, [["render", nn]]), ln = {
|
|
2411
2433
|
components: {
|
|
2412
|
-
homeIcon:
|
|
2434
|
+
homeIcon: an
|
|
2413
2435
|
},
|
|
2414
2436
|
name: "vs-homezoom",
|
|
2415
2437
|
props: {
|
|
@@ -2423,7 +2445,7 @@ const Xs = /* @__PURE__ */ H(Qs, [["render", Ks]]), en = {
|
|
|
2423
2445
|
},
|
|
2424
2446
|
computed: {}
|
|
2425
2447
|
};
|
|
2426
|
-
function
|
|
2448
|
+
function cn(e, t, o, s, n, i) {
|
|
2427
2449
|
const d = G("homeIcon"), v = G("VsPopover");
|
|
2428
2450
|
return c(), p("div", null, [
|
|
2429
2451
|
N(v, {
|
|
@@ -2445,15 +2467,15 @@ function tn(e, t, o, n, s, i) {
|
|
|
2445
2467
|
})
|
|
2446
2468
|
]);
|
|
2447
2469
|
}
|
|
2448
|
-
const
|
|
2470
|
+
const dn = /* @__PURE__ */ H(ln, [["render", cn]]), un = {}, pn = {
|
|
2449
2471
|
width: "24",
|
|
2450
2472
|
height: "24",
|
|
2451
2473
|
viewBox: "0 0 24 24",
|
|
2452
2474
|
fill: "none",
|
|
2453
2475
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2454
2476
|
};
|
|
2455
|
-
function
|
|
2456
|
-
return c(), p("svg",
|
|
2477
|
+
function hn(e, t) {
|
|
2478
|
+
return c(), p("svg", pn, [...t[0] || (t[0] = [
|
|
2457
2479
|
r("title", null, "Document with Two Sections Icon", -1),
|
|
2458
2480
|
r("desc", null, "A document icon with a split design indicating two sections", -1),
|
|
2459
2481
|
r("path", {
|
|
@@ -2479,10 +2501,10 @@ function nn(e, t) {
|
|
|
2479
2501
|
}, null, -1)
|
|
2480
2502
|
])]);
|
|
2481
2503
|
}
|
|
2482
|
-
const
|
|
2504
|
+
const fn = /* @__PURE__ */ H(un, [["render", hn]]), gn = {
|
|
2483
2505
|
components: {
|
|
2484
|
-
printIcon:
|
|
2485
|
-
VsPopover:
|
|
2506
|
+
printIcon: fn,
|
|
2507
|
+
VsPopover: Ie
|
|
2486
2508
|
},
|
|
2487
2509
|
props: {
|
|
2488
2510
|
map: { type: Object },
|
|
@@ -2529,14 +2551,14 @@ const an = /* @__PURE__ */ H(rn, [["render", nn]]), ln = {
|
|
|
2529
2551
|
methods: {
|
|
2530
2552
|
addScript(e) {
|
|
2531
2553
|
return new Promise((t, o) => {
|
|
2532
|
-
const
|
|
2533
|
-
|
|
2554
|
+
const s = document.createElement("script");
|
|
2555
|
+
s.src = e, s.async = !0, s.onload = t, s.onerror = o, document.head.appendChild(s), this.scriptElements.push(s);
|
|
2534
2556
|
});
|
|
2535
2557
|
},
|
|
2536
2558
|
addStyle(e) {
|
|
2537
2559
|
return new Promise((t, o) => {
|
|
2538
|
-
const
|
|
2539
|
-
|
|
2560
|
+
const s = document.createElement("link");
|
|
2561
|
+
s.href = e, s.rel = "stylesheet", s.type = "text/css", s.onload = t, s.onerror = o, document.head.appendChild(s), this.styleElements.push(s);
|
|
2540
2562
|
});
|
|
2541
2563
|
},
|
|
2542
2564
|
async loadResources() {
|
|
@@ -2566,13 +2588,13 @@ const an = /* @__PURE__ */ H(rn, [["render", nn]]), ln = {
|
|
|
2566
2588
|
return;
|
|
2567
2589
|
}
|
|
2568
2590
|
window.mapboxgl.accessToken = "pk.eyJ1Ijoia3Jpemhhbm92c2t5IiwiYSI6ImNsemkxNWtkODA5dDcycnNhMWZzYWM0MTAifQ.6fEpgfd_2mA4UYuflDewpQ";
|
|
2569
|
-
const { MapboxExportControl: e, Size: t, PageOrientation: o, Format:
|
|
2591
|
+
const { MapboxExportControl: e, Size: t, PageOrientation: o, Format: s, DPI: n } = window.MapboxExportControl;
|
|
2570
2592
|
this.map.addControl(
|
|
2571
2593
|
new e({
|
|
2572
2594
|
PageSize: t.A3,
|
|
2573
2595
|
PageOrientation: o.Portrait,
|
|
2574
|
-
Format:
|
|
2575
|
-
DPI:
|
|
2596
|
+
Format: s.PNG,
|
|
2597
|
+
DPI: n[96],
|
|
2576
2598
|
Crosshair: !0,
|
|
2577
2599
|
PrintableArea: !0,
|
|
2578
2600
|
Local: "uk"
|
|
@@ -2582,8 +2604,8 @@ const an = /* @__PURE__ */ H(rn, [["render", nn]]), ln = {
|
|
|
2582
2604
|
simulateClick() {
|
|
2583
2605
|
new Promise((t) => {
|
|
2584
2606
|
const o = setTimeout(() => {
|
|
2585
|
-
const
|
|
2586
|
-
|
|
2607
|
+
const s = document.querySelector(".mapboxgl-export-control");
|
|
2608
|
+
s && (clearInterval(o), t(s));
|
|
2587
2609
|
}, 100);
|
|
2588
2610
|
}).then((t) => {
|
|
2589
2611
|
t.click();
|
|
@@ -2596,7 +2618,7 @@ const an = /* @__PURE__ */ H(rn, [["render", nn]]), ln = {
|
|
|
2596
2618
|
}
|
|
2597
2619
|
}
|
|
2598
2620
|
};
|
|
2599
|
-
function
|
|
2621
|
+
function vn(e, t, o, s, n, i) {
|
|
2600
2622
|
const d = G("printIcon"), v = G("VsPopover");
|
|
2601
2623
|
return c(), X(v, {
|
|
2602
2624
|
trigger: "hover",
|
|
@@ -2615,7 +2637,7 @@ function cn(e, t, o, n, s, i) {
|
|
|
2615
2637
|
_: 1
|
|
2616
2638
|
});
|
|
2617
2639
|
}
|
|
2618
|
-
const
|
|
2640
|
+
const mn = /* @__PURE__ */ H(gn, [["render", vn]]), yn = {
|
|
2619
2641
|
props: {
|
|
2620
2642
|
map: {
|
|
2621
2643
|
type: Object,
|
|
@@ -2628,7 +2650,7 @@ const dn = /* @__PURE__ */ H(ln, [["render", cn]]), un = {
|
|
|
2628
2650
|
};
|
|
2629
2651
|
},
|
|
2630
2652
|
components: {
|
|
2631
|
-
VsPopover:
|
|
2653
|
+
VsPopover: Ie
|
|
2632
2654
|
},
|
|
2633
2655
|
mounted() {
|
|
2634
2656
|
this.map.on("move", this.updateViewStatus), this.updateViewStatus();
|
|
@@ -2653,7 +2675,7 @@ const dn = /* @__PURE__ */ H(ln, [["render", cn]]), un = {
|
|
|
2653
2675
|
}
|
|
2654
2676
|
}
|
|
2655
2677
|
};
|
|
2656
|
-
function
|
|
2678
|
+
function bn(e, t, o, s, n, i) {
|
|
2657
2679
|
const d = G("VsPopover");
|
|
2658
2680
|
return c(), X(d, {
|
|
2659
2681
|
trigger: "hover",
|
|
@@ -2665,7 +2687,7 @@ function pn(e, t, o, n, s, i) {
|
|
|
2665
2687
|
r("div", {
|
|
2666
2688
|
class: "font-light w-full h-[44px] p-[9px] [transition:.3s] hover:[transition:.3s] text-[19px] hover:bg-[#DBEAFE] flex cursor-pointer text-[#1E40AF] bg-[#fff] rounded-[4px] border-[1px] border-solid border-[#E5E7EB]",
|
|
2667
2689
|
onClick: t[0] || (t[0] = (...v) => i.toggleView && i.toggleView(...v))
|
|
2668
|
-
}, S(
|
|
2690
|
+
}, S(n.is3D ? "2D" : "3D"), 1)
|
|
2669
2691
|
]),
|
|
2670
2692
|
default: Z(() => [
|
|
2671
2693
|
t[1] || (t[1] = r("div", null, "Перемикач виду", -1))
|
|
@@ -2673,40 +2695,22 @@ function pn(e, t, o, n, s, i) {
|
|
|
2673
2695
|
_: 1
|
|
2674
2696
|
});
|
|
2675
2697
|
}
|
|
2676
|
-
const
|
|
2677
|
-
class: "shrink-0 size-4",
|
|
2678
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2679
|
-
width: "24",
|
|
2680
|
-
height: "24",
|
|
2681
|
-
viewBox: "0 0 24 24",
|
|
2682
|
-
fill: "none",
|
|
2683
|
-
stroke: "currentColor",
|
|
2684
|
-
"stroke-width": "2",
|
|
2685
|
-
"stroke-linecap": "round",
|
|
2686
|
-
"stroke-linejoin": "round"
|
|
2687
|
-
};
|
|
2688
|
-
function vn(e, t) {
|
|
2689
|
-
return c(), p("svg", gn, [...t[0] || (t[0] = [
|
|
2690
|
-
r("path", { d: "M18 6 6 18" }, null, -1),
|
|
2691
|
-
r("path", { d: "m6 6 12 12" }, null, -1)
|
|
2692
|
-
])]);
|
|
2693
|
-
}
|
|
2694
|
-
const mn = /* @__PURE__ */ H(fn, [["render", vn]]), yn = {
|
|
2698
|
+
const wn = /* @__PURE__ */ H(yn, [["render", bn]]), xn = {
|
|
2695
2699
|
props: {
|
|
2696
2700
|
bgColor: {
|
|
2697
2701
|
type: String,
|
|
2698
2702
|
default: "#1E40AF"
|
|
2699
2703
|
}
|
|
2700
2704
|
}
|
|
2701
|
-
},
|
|
2705
|
+
}, _n = {
|
|
2702
2706
|
width: "24",
|
|
2703
2707
|
height: "24",
|
|
2704
2708
|
viewBox: "0 0 24 24",
|
|
2705
2709
|
fill: "none",
|
|
2706
2710
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2707
|
-
},
|
|
2708
|
-
function
|
|
2709
|
-
return c(), p("svg",
|
|
2711
|
+
}, kn = ["stroke"], Ln = ["stroke"], Cn = ["stroke"], $n = ["stroke"], In = ["stroke"], Vn = ["stroke"];
|
|
2712
|
+
function Sn(e, t, o, s, n, i) {
|
|
2713
|
+
return c(), p("svg", _n, [
|
|
2710
2714
|
t[0] || (t[0] = r("title", null, "Target Icon", -1)),
|
|
2711
2715
|
t[1] || (t[1] = r("desc", null, "A target icon with a circular pattern inside a rounded square", -1)),
|
|
2712
2716
|
r("path", {
|
|
@@ -2715,49 +2719,49 @@ function $n(e, t, o, n, s, i) {
|
|
|
2715
2719
|
"stroke-width": "1",
|
|
2716
2720
|
"stroke-linecap": "round",
|
|
2717
2721
|
"stroke-linejoin": "round"
|
|
2718
|
-
}, null, 8,
|
|
2722
|
+
}, null, 8, kn),
|
|
2719
2723
|
r("path", {
|
|
2720
2724
|
d: "M19 12H22",
|
|
2721
2725
|
stroke: o.bgColor,
|
|
2722
2726
|
"stroke-width": "1",
|
|
2723
2727
|
"stroke-linecap": "round",
|
|
2724
2728
|
"stroke-linejoin": "round"
|
|
2725
|
-
}, null, 8,
|
|
2729
|
+
}, null, 8, Ln),
|
|
2726
2730
|
r("path", {
|
|
2727
2731
|
d: "M12 2V5",
|
|
2728
2732
|
stroke: o.bgColor,
|
|
2729
2733
|
"stroke-width": "1",
|
|
2730
2734
|
"stroke-linecap": "round",
|
|
2731
2735
|
"stroke-linejoin": "round"
|
|
2732
|
-
}, null, 8,
|
|
2736
|
+
}, null, 8, Cn),
|
|
2733
2737
|
r("path", {
|
|
2734
2738
|
d: "M12 19V22",
|
|
2735
2739
|
stroke: o.bgColor,
|
|
2736
2740
|
"stroke-width": "1",
|
|
2737
2741
|
"stroke-linecap": "round",
|
|
2738
2742
|
"stroke-linejoin": "round"
|
|
2739
|
-
}, null, 8,
|
|
2743
|
+
}, null, 8, $n),
|
|
2740
2744
|
r("path", {
|
|
2741
2745
|
d: "M12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19Z",
|
|
2742
2746
|
stroke: o.bgColor,
|
|
2743
2747
|
"stroke-width": "1",
|
|
2744
2748
|
"stroke-linecap": "round",
|
|
2745
2749
|
"stroke-linejoin": "round"
|
|
2746
|
-
}, null, 8,
|
|
2750
|
+
}, null, 8, In),
|
|
2747
2751
|
r("path", {
|
|
2748
2752
|
d: "M12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z",
|
|
2749
2753
|
stroke: o.bgColor,
|
|
2750
2754
|
"stroke-width": "1",
|
|
2751
2755
|
"stroke-linecap": "round",
|
|
2752
2756
|
"stroke-linejoin": "round"
|
|
2753
|
-
}, null, 8,
|
|
2757
|
+
}, null, 8, Vn)
|
|
2754
2758
|
]);
|
|
2755
2759
|
}
|
|
2756
|
-
const
|
|
2760
|
+
const Fn = /* @__PURE__ */ H(xn, [["render", Sn]]), jn = {
|
|
2757
2761
|
components: {
|
|
2758
|
-
geoIcon:
|
|
2759
|
-
VsPopover:
|
|
2760
|
-
closeIcon:
|
|
2762
|
+
geoIcon: Fn,
|
|
2763
|
+
VsPopover: Ie,
|
|
2764
|
+
closeIcon: st
|
|
2761
2765
|
},
|
|
2762
2766
|
data() {
|
|
2763
2767
|
return {
|
|
@@ -2810,16 +2814,16 @@ const In = /* @__PURE__ */ H(yn, [["render", $n]]), Vn = {
|
|
|
2810
2814
|
`https://nominatim.openstreetmap.org/reverse?format=json&lat=${this.location.latitude}&lon=${this.location.longitude}`
|
|
2811
2815
|
)).json();
|
|
2812
2816
|
this.data = o.address;
|
|
2813
|
-
const
|
|
2817
|
+
const s = [this.location.longitude, this.location.latitude], n = [
|
|
2814
2818
|
[parseFloat(o.boundingbox[2]), parseFloat(o.boundingbox[0])],
|
|
2815
2819
|
[parseFloat(o.boundingbox[3]), parseFloat(o.boundingbox[1])]
|
|
2816
2820
|
];
|
|
2817
|
-
this.map.fitBounds(
|
|
2821
|
+
this.map.fitBounds(n, {
|
|
2818
2822
|
padding: 200,
|
|
2819
2823
|
maxZoom: 16
|
|
2820
2824
|
}), this.marker || (this.marker = new Marker({
|
|
2821
2825
|
color: "var(--primary)"
|
|
2822
|
-
})), this.marker.setLngLat(
|
|
2826
|
+
})), this.marker.setLngLat(s).addTo(this.map), this.activeControl = "geolocation";
|
|
2823
2827
|
},
|
|
2824
2828
|
closeGeolocation() {
|
|
2825
2829
|
this.showLocation = !1, this.marker && (this.marker.remove(), this.marker = null), this.location = null, this.data = null;
|
|
@@ -2832,46 +2836,46 @@ const In = /* @__PURE__ */ H(yn, [["render", $n]]), Vn = {
|
|
|
2832
2836
|
}), this.$emit("close");
|
|
2833
2837
|
}
|
|
2834
2838
|
}
|
|
2835
|
-
},
|
|
2839
|
+
}, Pn = {
|
|
2836
2840
|
key: 0,
|
|
2837
2841
|
class: "max-w-[412px] absolute w-full top-[20px] right-[70px] bg-white border rounded-[15px] p-4 z-10"
|
|
2838
|
-
},
|
|
2839
|
-
function
|
|
2842
|
+
}, En = { class: "flex justify-between items-center border-b pb-[16px]" }, Mn = { class: "d-flex" }, Tn = { class: "pt-[16px]" };
|
|
2843
|
+
function zn(e, t, o, s, n, i) {
|
|
2840
2844
|
var l, u, a, m, h, f;
|
|
2841
2845
|
const d = G("closeIcon"), v = G("geoIcon"), g = G("VsPopover");
|
|
2842
2846
|
return c(), p("div", null, [
|
|
2843
2847
|
(c(), X(Ke, { to: "#maplibre-demo-map" }, [
|
|
2844
|
-
|
|
2845
|
-
r("div",
|
|
2848
|
+
n.location ? (c(), p("div", Pn, [
|
|
2849
|
+
r("div", En, [
|
|
2846
2850
|
t[0] || (t[0] = r("div", { class: "text-lg font-semibold" }, "Ваша геолокація", -1)),
|
|
2847
|
-
r("div",
|
|
2851
|
+
r("div", Mn, [
|
|
2848
2852
|
N(d, { onClick: i.closeGeolocation }, null, 8, ["onClick"])
|
|
2849
2853
|
])
|
|
2850
2854
|
]),
|
|
2851
|
-
r("div",
|
|
2855
|
+
r("div", Tn, [
|
|
2852
2856
|
r("div", null, [
|
|
2853
2857
|
t[1] || (t[1] = r("strong", null, "Широта:", -1)),
|
|
2854
|
-
ae(" " + S((l =
|
|
2858
|
+
ae(" " + S((l = n.location) == null ? void 0 : l.latitude), 1)
|
|
2855
2859
|
]),
|
|
2856
2860
|
r("div", null, [
|
|
2857
2861
|
t[2] || (t[2] = r("strong", null, "Довгота:", -1)),
|
|
2858
|
-
ae(" " + S((u =
|
|
2862
|
+
ae(" " + S((u = n.location) == null ? void 0 : u.longitude), 1)
|
|
2859
2863
|
]),
|
|
2860
2864
|
r("div", null, [
|
|
2861
2865
|
t[3] || (t[3] = r("strong", null, "КраЇна:", -1)),
|
|
2862
|
-
ae(" " + S((a =
|
|
2866
|
+
ae(" " + S((a = n.data) == null ? void 0 : a.country), 1)
|
|
2863
2867
|
]),
|
|
2864
2868
|
r("div", null, [
|
|
2865
2869
|
t[4] || (t[4] = r("strong", null, "Код країни:", -1)),
|
|
2866
|
-
ae(" " + S((m =
|
|
2870
|
+
ae(" " + S((m = n.data) == null ? void 0 : m.country_code), 1)
|
|
2867
2871
|
]),
|
|
2868
2872
|
r("div", null, [
|
|
2869
2873
|
t[5] || (t[5] = r("strong", null, "Місто:", -1)),
|
|
2870
|
-
ae(" " + S((h =
|
|
2874
|
+
ae(" " + S((h = n.data) == null ? void 0 : h.city), 1)
|
|
2871
2875
|
]),
|
|
2872
2876
|
r("div", null, [
|
|
2873
2877
|
t[6] || (t[6] = r("strong", null, "Поштовий індекс:", -1)),
|
|
2874
|
-
ae(" " + S((f =
|
|
2878
|
+
ae(" " + S((f = n.data) == null ? void 0 : f.postcode), 1)
|
|
2875
2879
|
])
|
|
2876
2880
|
])
|
|
2877
2881
|
])) : F("", !0)
|
|
@@ -2895,7 +2899,7 @@ function En(e, t, o, n, s, i) {
|
|
|
2895
2899
|
})
|
|
2896
2900
|
]);
|
|
2897
2901
|
}
|
|
2898
|
-
const
|
|
2902
|
+
const An = /* @__PURE__ */ H(jn, [["render", zn]]), Ae = {
|
|
2899
2903
|
__name: "vs-map-widget-column",
|
|
2900
2904
|
props: {
|
|
2901
2905
|
position: String,
|
|
@@ -2920,8 +2924,8 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
2920
2924
|
"content-resize"
|
|
2921
2925
|
],
|
|
2922
2926
|
setup(e, { expose: t, emit: o }) {
|
|
2923
|
-
const
|
|
2924
|
-
|
|
2927
|
+
const s = o, n = e, i = A(
|
|
2928
|
+
n.widgets.map((l) => {
|
|
2925
2929
|
var u;
|
|
2926
2930
|
return {
|
|
2927
2931
|
...l,
|
|
@@ -2929,10 +2933,10 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
2929
2933
|
};
|
|
2930
2934
|
})
|
|
2931
2935
|
);
|
|
2932
|
-
|
|
2933
|
-
() =>
|
|
2936
|
+
fe(
|
|
2937
|
+
() => n.widgets.map((l) => l.id || l.type).join(","),
|
|
2934
2938
|
() => {
|
|
2935
|
-
i.value =
|
|
2939
|
+
i.value = n.widgets.map((l) => {
|
|
2936
2940
|
var u;
|
|
2937
2941
|
return {
|
|
2938
2942
|
...l,
|
|
@@ -2944,7 +2948,7 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
2944
2948
|
function d(l) {
|
|
2945
2949
|
const u = i.value.find((a) => a.id === l);
|
|
2946
2950
|
u && u.config && (u.config.visible = !u.config.visible, setTimeout(() => {
|
|
2947
|
-
|
|
2951
|
+
s("content-resize");
|
|
2948
2952
|
}, 30));
|
|
2949
2953
|
}
|
|
2950
2954
|
const v = A(null);
|
|
@@ -2954,21 +2958,21 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
2954
2958
|
g = new MutationObserver(() => {
|
|
2955
2959
|
var l;
|
|
2956
2960
|
clearTimeout((l = v.value) == null ? void 0 : l._resizeTimeout), v.value._resizeTimeout = setTimeout(() => {
|
|
2957
|
-
|
|
2961
|
+
s("content-resize");
|
|
2958
2962
|
}, 30);
|
|
2959
2963
|
}), v.value && g.observe(v.value, {
|
|
2960
2964
|
childList: !0,
|
|
2961
2965
|
subtree: !0,
|
|
2962
2966
|
characterData: !0
|
|
2963
2967
|
});
|
|
2964
|
-
}),
|
|
2968
|
+
}), bt(() => {
|
|
2965
2969
|
g && g.disconnect();
|
|
2966
2970
|
}), (l, u) => e.mapLoaded ? (c(), p("div", {
|
|
2967
2971
|
key: 0,
|
|
2968
2972
|
class: "widget-column",
|
|
2969
2973
|
ref_key: "columnRef",
|
|
2970
2974
|
ref: v,
|
|
2971
|
-
style:
|
|
2975
|
+
style: he({
|
|
2972
2976
|
width: e.getColumnWidth(e.position),
|
|
2973
2977
|
paddingRight: e.rightColumnOffset
|
|
2974
2978
|
})
|
|
@@ -2978,7 +2982,7 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
2978
2982
|
return c(), p(B, {
|
|
2979
2983
|
key: a.id || a.type
|
|
2980
2984
|
}, [
|
|
2981
|
-
a.type !== "card" ? ne((c(), X(
|
|
2985
|
+
a.type !== "card" ? ne((c(), X(Oe(e.getWidgetComponent(a.type)), {
|
|
2982
2986
|
key: 0,
|
|
2983
2987
|
map: e.map,
|
|
2984
2988
|
config: a.config,
|
|
@@ -2993,9 +2997,9 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
2993
2997
|
onCatalogLayers: u[3] || (u[3] = (h) => l.$emit("catalog-layers", h)),
|
|
2994
2998
|
class: "widget"
|
|
2995
2999
|
}, null, 40, ["map", "config", "hasFilters", "currentLayer", "enabledLayerIds", "history"])), [
|
|
2996
|
-
[
|
|
3000
|
+
[Pe, ((m = a.config) == null ? void 0 : m.visible) !== !1]
|
|
2997
3001
|
]) : F("", !0),
|
|
2998
|
-
e.cardValues && a.type === "card" ? (c(), X(
|
|
3002
|
+
e.cardValues && a.type === "card" ? (c(), X(rt, {
|
|
2999
3003
|
key: 1,
|
|
3000
3004
|
config: a.config,
|
|
3001
3005
|
cardValues: e.cardValues,
|
|
@@ -3006,21 +3010,16 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
3006
3010
|
}), 128))
|
|
3007
3011
|
], 4)) : F("", !0);
|
|
3008
3012
|
}
|
|
3009
|
-
},
|
|
3013
|
+
}, Bn = { class: "map-widgets-flex" }, On = { class: "widgets-left" }, Dn = { class: "widgets-top" }, Un = { class: "widgets-bottom" }, Rn = { class: "widgets-right" }, Hn = { class: "widgets-top" }, Nn = { class: "widgets-bottom" }, Wn = { class: "absolute top-[180px] right-2 z-10 flex flex-col gap-[5px]" }, Zn = /* @__PURE__ */ Ge({
|
|
3010
3014
|
__name: "vs-map",
|
|
3011
3015
|
props: {
|
|
3012
|
-
table: {
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
},
|
|
3016
|
-
height: {
|
|
3017
|
-
type: String,
|
|
3018
|
-
required: !0
|
|
3019
|
-
}
|
|
3016
|
+
table: {},
|
|
3017
|
+
name: {},
|
|
3018
|
+
height: {}
|
|
3020
3019
|
},
|
|
3021
3020
|
setup(e) {
|
|
3022
|
-
const t = e, o = A(null),
|
|
3023
|
-
let
|
|
3021
|
+
const t = e, o = A(null), s = A(!1);
|
|
3022
|
+
let n = null;
|
|
3024
3023
|
const i = A(null), d = A(null), v = A([]), g = A([]), l = A(null), u = A(null), a = A(null), m = A([]);
|
|
3025
3024
|
let h = null;
|
|
3026
3025
|
function f(b) {
|
|
@@ -3033,28 +3032,11 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
3033
3032
|
(y) => (y.position || {}) === b
|
|
3034
3033
|
) || [];
|
|
3035
3034
|
}
|
|
3036
|
-
const L = (b, y, x) => {
|
|
3037
|
-
|
|
3038
|
-
if (b)
|
|
3039
|
-
if (x === "markdown") {
|
|
3040
|
-
const $ = b.replace(/\{\{([^}]+)\}\}/g, (w, C) => {
|
|
3041
|
-
try {
|
|
3042
|
-
return new Function("data", `with(data) { return ${C} }`)(y);
|
|
3043
|
-
} catch {
|
|
3044
|
-
return "";
|
|
3045
|
-
}
|
|
3046
|
-
});
|
|
3047
|
-
return marked($);
|
|
3048
|
-
} else
|
|
3049
|
-
return y[b] || b;
|
|
3050
|
-
} catch ($) {
|
|
3051
|
-
return console.error("Error processing template:", $), b;
|
|
3052
|
-
}
|
|
3053
|
-
}, j = (b, y, x, $, w) => {
|
|
3054
|
-
const C = L(b, $, w), P = y ? L(y, $, w) : "";
|
|
3035
|
+
const L = (b, y, x) => y[b] || b, j = (b, y, x, I, w) => {
|
|
3036
|
+
const C = L(b, I), P = y ? L(y, I) : "";
|
|
3055
3037
|
let V = "";
|
|
3056
3038
|
return x != null && x.length && (V = x.map((E) => {
|
|
3057
|
-
const J = L(E.value,
|
|
3039
|
+
const J = L(E.value, I);
|
|
3058
3040
|
return `
|
|
3059
3041
|
<tr class="flex justify-between items-center">
|
|
3060
3042
|
<td class="font-medium mr-1.5 flex items-center">${E.label}</td>
|
|
@@ -3079,35 +3061,35 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
3079
3061
|
</div>
|
|
3080
3062
|
`;
|
|
3081
3063
|
}, T = (b) => ({
|
|
3082
|
-
legend:
|
|
3083
|
-
basemaps:
|
|
3084
|
-
layers:
|
|
3085
|
-
info:
|
|
3086
|
-
attribute:
|
|
3087
|
-
catalog:
|
|
3088
|
-
filters:
|
|
3089
|
-
"inline-filters":
|
|
3090
|
-
list:
|
|
3091
|
-
card:
|
|
3064
|
+
legend: Vt,
|
|
3065
|
+
basemaps: Pt,
|
|
3066
|
+
layers: co,
|
|
3067
|
+
info: wo,
|
|
3068
|
+
attribute: er,
|
|
3069
|
+
catalog: Fs,
|
|
3070
|
+
filters: Ts,
|
|
3071
|
+
"inline-filters": Ds,
|
|
3072
|
+
list: Xs,
|
|
3073
|
+
card: rt
|
|
3092
3074
|
})[b], k = M(() => !!a.value && Array.isArray(a.value.widgets) && a.value.widgets.some((b) => b.type === "filters")), _ = (b) => {
|
|
3093
3075
|
i.value = b;
|
|
3094
3076
|
};
|
|
3095
3077
|
function D() {
|
|
3096
|
-
const b = new URLSearchParams(window.location.search), y = parseFloat(b.get("x")), x = parseFloat(b.get("y")),
|
|
3078
|
+
const b = new URLSearchParams(window.location.search), y = parseFloat(b.get("x")), x = parseFloat(b.get("y")), I = parseFloat(b.get("z")), w = parseFloat(b.get("bearing")), C = parseFloat(b.get("pitch"));
|
|
3097
3079
|
return {
|
|
3098
3080
|
center: isFinite(y) && isFinite(x) ? [y, x] : null,
|
|
3099
|
-
zoom: isFinite(
|
|
3081
|
+
zoom: isFinite(I) ? I : null,
|
|
3100
3082
|
bearing: isFinite(w) ? w : null,
|
|
3101
3083
|
pitch: isFinite(C) ? C : null
|
|
3102
3084
|
};
|
|
3103
3085
|
}
|
|
3104
|
-
function le({ center: b, zoom: y, bearing: x, pitch:
|
|
3086
|
+
function le({ center: b, zoom: y, bearing: x, pitch: I }) {
|
|
3105
3087
|
const w = new URLSearchParams(window.location.search);
|
|
3106
|
-
w.set("x", b[0].toFixed(5)), w.set("y", b[1].toFixed(5)), w.set("z", y.toFixed(2)), w.set("bearing", x.toFixed(2)), w.set("pitch",
|
|
3088
|
+
w.set("x", b[0].toFixed(5)), w.set("y", b[1].toFixed(5)), w.set("z", y.toFixed(2)), w.set("bearing", x.toFixed(2)), w.set("pitch", I.toFixed(2));
|
|
3107
3089
|
const C = `${window.location.pathname}?${w.toString()}`;
|
|
3108
3090
|
window.history.replaceState({}, "", C);
|
|
3109
3091
|
}
|
|
3110
|
-
const
|
|
3092
|
+
const pe = () => {
|
|
3111
3093
|
var C, P, V;
|
|
3112
3094
|
if (!a.value || !a.value.map) return;
|
|
3113
3095
|
const b = {
|
|
@@ -3116,33 +3098,29 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
3116
3098
|
sources: {},
|
|
3117
3099
|
layers: []
|
|
3118
3100
|
};
|
|
3119
|
-
let y = a.value.map.center, x = a.value.map.zoom,
|
|
3101
|
+
let y = a.value.map.center, x = a.value.map.zoom, I = a.value.map.bearing || 0, w = a.value.map.pitch || 0;
|
|
3120
3102
|
if (a.value.history) {
|
|
3121
3103
|
const E = D();
|
|
3122
|
-
E.center && (y = E.center), E.zoom !== null && (x = E.zoom), E.bearing !== null && (
|
|
3104
|
+
E.center && (y = E.center), E.zoom !== null && (x = E.zoom), E.bearing !== null && (I = E.bearing), E.pitch !== null && (w = E.pitch);
|
|
3123
3105
|
}
|
|
3124
3106
|
o.value = new maplibregl.Map({
|
|
3125
3107
|
container: "maplibre-demo-map",
|
|
3126
3108
|
style: b,
|
|
3127
3109
|
center: y,
|
|
3128
3110
|
zoom: x,
|
|
3129
|
-
bearing:
|
|
3111
|
+
bearing: I,
|
|
3130
3112
|
pitch: w,
|
|
3131
3113
|
maxBounds: [18.0856083513, 40.3614785833, 58.0807890155, 56.3350745713]
|
|
3132
|
-
}), (V = (P = (C = a == null ? void 0 : a.value) == null ? void 0 : C.interactions) == null ? void 0 : P.navigation) != null && V.enabled && !h && (h = new maplibregl.NavigationControl({
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
visualizePitch: !0
|
|
3136
|
-
}), o.value.addControl(h, "top-right")), o.value.on("load", async () => {
|
|
3137
|
-
var Y, ke, U, Le, Fe;
|
|
3138
|
-
n.value = !0;
|
|
3114
|
+
}), (V = (P = (C = a == null ? void 0 : a.value) == null ? void 0 : C.interactions) == null ? void 0 : P.navigation) != null && V.enabled && !h && (h = new maplibregl.NavigationControl(), o.value.addControl(h, "top-right")), o.value.on("load", async () => {
|
|
3115
|
+
var Y, ke, U, Le, Se;
|
|
3116
|
+
s.value = !0;
|
|
3139
3117
|
const E = D(), J = E.center && E.zoom !== null;
|
|
3140
3118
|
if ((Y = a.value.map) != null && Y.bbox && !J) {
|
|
3141
|
-
const [q, R,
|
|
3119
|
+
const [q, R, $, te] = a.value.map.bbox;
|
|
3142
3120
|
o.value.fitBounds(
|
|
3143
3121
|
[
|
|
3144
3122
|
[q, R],
|
|
3145
|
-
[
|
|
3123
|
+
[$, te]
|
|
3146
3124
|
],
|
|
3147
3125
|
{
|
|
3148
3126
|
padding: 50,
|
|
@@ -3151,33 +3129,33 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
3151
3129
|
);
|
|
3152
3130
|
}
|
|
3153
3131
|
if (await (async () => {
|
|
3154
|
-
var R,
|
|
3155
|
-
const q = ((ee = (re = (
|
|
3132
|
+
var R, $, te, re, ee;
|
|
3133
|
+
const q = ((ee = (re = (te = ($ = (R = a.value) == null ? void 0 : R.widgets) == null ? void 0 : $.find((z) => z.type === "layers")) == null ? void 0 : te.config) == null ? void 0 : re.layers) == null ? void 0 : ee.filter(
|
|
3156
3134
|
(z) => {
|
|
3157
|
-
var
|
|
3158
|
-
return ((
|
|
3135
|
+
var ce;
|
|
3136
|
+
return ((ce = z.style) == null ? void 0 : ce.attrType) === "icon-by-attribute";
|
|
3159
3137
|
}
|
|
3160
3138
|
)) || [];
|
|
3161
3139
|
for (const z of q) {
|
|
3162
|
-
const { rules:
|
|
3140
|
+
const { rules: ce, default_icon: ve, icon_base_url: me } = z.style, ye = [...ce.map((se) => se.icon), ve].filter(
|
|
3163
3141
|
Boolean
|
|
3164
3142
|
);
|
|
3165
3143
|
for (const se of ye)
|
|
3166
3144
|
try {
|
|
3167
|
-
const
|
|
3145
|
+
const de = `${me}${se}`, be = await o.value.loadImage(de);
|
|
3168
3146
|
o.value.hasImage(se) || o.value.addImage(se, be.data);
|
|
3169
|
-
} catch (
|
|
3170
|
-
console.error(`Failed to load icon: ${se}`,
|
|
3147
|
+
} catch (de) {
|
|
3148
|
+
console.error(`Failed to load icon: ${se}`, de);
|
|
3171
3149
|
}
|
|
3172
3150
|
}
|
|
3173
3151
|
})(), (Le = (U = (ke = a.value) == null ? void 0 : ke.interactions) == null ? void 0 : U.hover) != null && Le.enabled && (o.value.on("mousemove", (q) => {
|
|
3174
|
-
var
|
|
3152
|
+
var ce, ve, me, ye, se, de, be, Fe, Q, ze;
|
|
3175
3153
|
const R = o.value.queryRenderedFeatures(q.point);
|
|
3176
3154
|
if (o.value && o.value.getCanvas && (o.value.getCanvas().style.cursor = R.length ? "pointer" : ""), !R.length) {
|
|
3177
3155
|
if (d.value) {
|
|
3178
|
-
const O = (
|
|
3156
|
+
const O = (ce = o.value.getSource(
|
|
3179
3157
|
d.value.source
|
|
3180
|
-
)) == null ? void 0 :
|
|
3158
|
+
)) == null ? void 0 : ce.type;
|
|
3181
3159
|
d.value.source, d.value.id, O === "vector" && d.value.source, ge(
|
|
3182
3160
|
o.value,
|
|
3183
3161
|
d.value.source,
|
|
@@ -3185,11 +3163,11 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
3185
3163
|
{ hovered: !1 }
|
|
3186
3164
|
), d.value = null;
|
|
3187
3165
|
}
|
|
3188
|
-
|
|
3166
|
+
n && (n.remove(), n = null);
|
|
3189
3167
|
return;
|
|
3190
3168
|
}
|
|
3191
|
-
const
|
|
3192
|
-
if (!d.value || d.value.id !==
|
|
3169
|
+
const $ = R[0];
|
|
3170
|
+
if (!d.value || d.value.id !== $.id || d.value.source !== $.layer.source) {
|
|
3193
3171
|
if (d.value) {
|
|
3194
3172
|
const Re = (ve = o.value.getSource(
|
|
3195
3173
|
d.value.source
|
|
@@ -3201,46 +3179,46 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
3201
3179
|
{ hovered: !1 }
|
|
3202
3180
|
);
|
|
3203
3181
|
}
|
|
3204
|
-
const O = (me = o.value.getSource(
|
|
3205
|
-
|
|
3182
|
+
const O = (me = o.value.getSource($.layer.source)) == null ? void 0 : me.type;
|
|
3183
|
+
$.layer.source, $.id, O === "vector" && $.layer.source, ge(o.value, $.layer.source, $.id, {
|
|
3206
3184
|
hovered: !0
|
|
3207
|
-
}), d.value = { source:
|
|
3185
|
+
}), d.value = { source: $.layer.source, id: $.id };
|
|
3208
3186
|
}
|
|
3209
|
-
const
|
|
3187
|
+
const te = (se = (ye = a.value) == null ? void 0 : ye.widgets) == null ? void 0 : se.find(
|
|
3210
3188
|
(O) => O.type === "layers"
|
|
3211
|
-
), re = (be = (
|
|
3189
|
+
), re = (be = (de = a.value) == null ? void 0 : de.widgets) == null ? void 0 : be.find(
|
|
3212
3190
|
(O) => O.type === "attribute"
|
|
3213
3191
|
);
|
|
3214
3192
|
let ee = null;
|
|
3215
|
-
if (
|
|
3216
|
-
(O) => O.id ===
|
|
3217
|
-
)), (Q = (
|
|
3193
|
+
if (te && (ee = te.config.layers.find(
|
|
3194
|
+
(O) => O.id === $.layer.source
|
|
3195
|
+
)), (Q = (Fe = a.value) == null ? void 0 : Fe.widgets) == null ? void 0 : Q.find(
|
|
3218
3196
|
(O) => O.type === "catalog"
|
|
3219
3197
|
)) {
|
|
3220
3198
|
if (!R.length) {
|
|
3221
|
-
|
|
3199
|
+
n && (n.style.display = "none");
|
|
3222
3200
|
return;
|
|
3223
3201
|
}
|
|
3224
3202
|
const O = R[0];
|
|
3225
|
-
|
|
3203
|
+
n = pt(O, q, n);
|
|
3226
3204
|
return;
|
|
3227
3205
|
}
|
|
3228
|
-
if (!ee && re && re.config.layer.id ===
|
|
3206
|
+
if (!ee && re && re.config.layer.id === $.layer.source && (ee = re.config.layer), (ze = ee == null ? void 0 : ee.style) != null && ze.popup) {
|
|
3229
3207
|
const O = ee.style.popup;
|
|
3230
3208
|
let Re = O.title, He = "";
|
|
3231
3209
|
O.mode === "markdown" ? He = Array.isArray(O.content) ? O.content.join(`
|
|
3232
3210
|
|
|
3233
|
-
`) : "" : He = Array.isArray(O.content) ? O.content.join("") : "",
|
|
3211
|
+
`) : "" : He = Array.isArray(O.content) ? O.content.join("") : "", n || (n = document.createElement("div"), o.value.getContainer().appendChild(n)), n.innerHTML = j(
|
|
3234
3212
|
Re,
|
|
3235
3213
|
He,
|
|
3236
3214
|
O.fields,
|
|
3237
|
-
|
|
3215
|
+
$.properties,
|
|
3238
3216
|
O.mode
|
|
3239
|
-
),
|
|
3217
|
+
), Ye(n, q);
|
|
3240
3218
|
}
|
|
3241
3219
|
}), o.value.on("mouseleave", () => {
|
|
3242
3220
|
var q;
|
|
3243
|
-
if (
|
|
3221
|
+
if (n && (n.remove(), n = null), d.value) {
|
|
3244
3222
|
const R = (q = o.value.getSource(
|
|
3245
3223
|
d.value.source
|
|
3246
3224
|
)) == null ? void 0 : q.type;
|
|
@@ -3253,54 +3231,54 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
3253
3231
|
}
|
|
3254
3232
|
o.value && o.value.getCanvas && (o.value.getCanvas().style.cursor = "");
|
|
3255
3233
|
})), o.value.on("click", async (q) => {
|
|
3256
|
-
var ve, me, ye, se,
|
|
3257
|
-
if (
|
|
3234
|
+
var ve, me, ye, se, de, be, Fe;
|
|
3235
|
+
if (oe(), ["length", "area", "print"].includes(u.value)) return;
|
|
3258
3236
|
const R = o.value.queryRenderedFeatures(q.point);
|
|
3259
3237
|
if (!R.length) return;
|
|
3260
|
-
const
|
|
3238
|
+
const $ = R[0], te = (me = (ve = a.value) == null ? void 0 : ve.widgets) == null ? void 0 : me.find(
|
|
3261
3239
|
(Q) => Q.type === "layers"
|
|
3262
3240
|
), re = (se = (ye = a.value) == null ? void 0 : ye.widgets) == null ? void 0 : se.find(
|
|
3263
3241
|
(Q) => Q.type === "attribute"
|
|
3264
|
-
), ee = (be = (
|
|
3242
|
+
), ee = (be = (de = a.value) == null ? void 0 : de.widgets) == null ? void 0 : be.find(
|
|
3265
3243
|
(Q) => Q.type === "catalog"
|
|
3266
3244
|
);
|
|
3267
3245
|
let z;
|
|
3268
|
-
if (ee ? z =
|
|
3246
|
+
if (ee ? z = $.layer.source : z = (re == null ? void 0 : re.config.layer) || (te == null ? void 0 : te.config.layers.find((Q) => Q.id === $.layer.source)), z != null && z.noCard) return;
|
|
3269
3247
|
v.value.forEach((Q) => {
|
|
3270
3248
|
var O;
|
|
3271
|
-
const
|
|
3272
|
-
Q.source, Q.id,
|
|
3249
|
+
const ze = (O = o.value.getSource(Q.source)) == null ? void 0 : O.type;
|
|
3250
|
+
Q.source, Q.id, ze === "vector" && Q.source, ge(o.value, Q.source, Q.id, {
|
|
3273
3251
|
selected: !1
|
|
3274
3252
|
});
|
|
3275
3253
|
}), v.value = [];
|
|
3276
|
-
const
|
|
3277
|
-
|
|
3254
|
+
const ce = (Fe = o.value.getSource($.layer.source)) == null ? void 0 : Fe.type;
|
|
3255
|
+
$.layer.source, $.id, ce === "vector" && $.layer.source, ge(o.value, $.layer.source, $.id, {
|
|
3278
3256
|
selected: !0
|
|
3279
|
-
}), v.value.push({ source:
|
|
3257
|
+
}), v.value.push({ source: $.layer.source, id: $.id }), l.value = {
|
|
3280
3258
|
layer: (z == null ? void 0 : z.service_key) || z || "",
|
|
3281
3259
|
map: (z == null ? void 0 : z.map_key) || "",
|
|
3282
|
-
id:
|
|
3260
|
+
id: $.properties.id,
|
|
3283
3261
|
title: (z == null ? void 0 : z.title) || ""
|
|
3284
3262
|
};
|
|
3285
3263
|
}), o.value.on("dblclick", (q) => {
|
|
3286
|
-
var
|
|
3287
|
-
if (
|
|
3288
|
-
|
|
3289
|
-
const R = (re = (
|
|
3264
|
+
var te, re, ee;
|
|
3265
|
+
if (oe(), ["length", "area", "print"].includes(u.value)) return;
|
|
3266
|
+
lt([q.lngLat.lng, q.lngLat.lat]);
|
|
3267
|
+
const R = (re = (te = a.value) == null ? void 0 : te.widgets) == null ? void 0 : re.find(
|
|
3290
3268
|
(z) => z.type === "layers"
|
|
3291
3269
|
);
|
|
3292
|
-
let
|
|
3293
|
-
(ee = R == null ? void 0 : R.config) != null && ee.layers && (
|
|
3270
|
+
let $ = null;
|
|
3271
|
+
(ee = R == null ? void 0 : R.config) != null && ee.layers && ($ = R.config.layers.find(
|
|
3294
3272
|
(z) => z.visible !== !1 && ["tms", "wms", "raster"].includes(
|
|
3295
3273
|
(z.service_type || z.service || "").toLowerCase()
|
|
3296
3274
|
)
|
|
3297
|
-
)), !(
|
|
3298
|
-
layer: (
|
|
3299
|
-
map: (
|
|
3275
|
+
)), !($ != null && $.noCard) && (l.value = {
|
|
3276
|
+
layer: ($ == null ? void 0 : $.map_key) || "",
|
|
3277
|
+
map: ($ == null ? void 0 : $.service_key) || "",
|
|
3300
3278
|
id: "",
|
|
3301
|
-
title: (
|
|
3279
|
+
title: ($ == null ? void 0 : $.title) || ""
|
|
3302
3280
|
});
|
|
3303
|
-
}), o.value.resize(), (
|
|
3281
|
+
}), o.value.resize(), (Se = a == null ? void 0 : a.value) != null && Se.history) {
|
|
3304
3282
|
const q = () => {
|
|
3305
3283
|
const R = o.value.getCenter();
|
|
3306
3284
|
le({
|
|
@@ -3313,71 +3291,57 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
3313
3291
|
o.value.on("moveend", q), o.value.on("rotate", q), o.value.on("pitch", q);
|
|
3314
3292
|
}
|
|
3315
3293
|
});
|
|
3316
|
-
},
|
|
3317
|
-
|
|
3294
|
+
}, oe = () => {
|
|
3295
|
+
Je(), v.value.forEach((b) => {
|
|
3318
3296
|
o.value && ge(o.value, b.source, b.id, {
|
|
3319
3297
|
selected: !1
|
|
3320
3298
|
});
|
|
3321
3299
|
}), v.value = [], l.value = null;
|
|
3322
3300
|
};
|
|
3323
3301
|
xe(async () => {
|
|
3324
|
-
await
|
|
3302
|
+
await Ue(), await Ee(), pe();
|
|
3325
3303
|
const b = document.getElementById("maplibre-demo-map");
|
|
3326
3304
|
b && b.addEventListener("mouseleave", () => {
|
|
3327
|
-
|
|
3328
|
-
})
|
|
3329
|
-
() => t.table,
|
|
3330
|
-
async (y) => {
|
|
3331
|
-
if (y) {
|
|
3332
|
-
if (te(), u.value = null, s && (s.remove(), s = null), o.value) {
|
|
3333
|
-
try {
|
|
3334
|
-
o.value.remove();
|
|
3335
|
-
} catch {
|
|
3336
|
-
}
|
|
3337
|
-
o.value = null, n.value = !1;
|
|
3338
|
-
}
|
|
3339
|
-
await Me(), await $e(), ce();
|
|
3340
|
-
}
|
|
3341
|
-
}
|
|
3342
|
-
);
|
|
3305
|
+
n && (n.remove(), n = null);
|
|
3306
|
+
});
|
|
3343
3307
|
});
|
|
3344
|
-
const
|
|
3308
|
+
const De = M(() => ({
|
|
3345
3309
|
height: (t == null ? void 0 : t.height) || "100vh",
|
|
3346
3310
|
width: "100%"
|
|
3347
|
-
})),
|
|
3348
|
-
const b = await fetch(`/api/map/${t.table}`).then((y) => y.json());
|
|
3311
|
+
})), Ue = async () => {
|
|
3312
|
+
const b = await fetch(`/api/map/${t.name || t.table || "main"}`).then((y) => y.json());
|
|
3349
3313
|
a.value = b;
|
|
3350
|
-
},
|
|
3314
|
+
}, Me = (b) => {
|
|
3351
3315
|
if (!a.value || !a.value.widgets) return "400px";
|
|
3352
3316
|
const y = a.value.widgets.find((x) => x.position === b);
|
|
3353
3317
|
return (y == null ? void 0 : y.width) || "400px";
|
|
3354
3318
|
}, ie = A([]);
|
|
3355
|
-
|
|
3319
|
+
fe(
|
|
3356
3320
|
() => a.value,
|
|
3357
3321
|
(b) => {
|
|
3358
|
-
b && b.map && (ie.value =
|
|
3322
|
+
b && b.map && (ie.value = nt(), pe());
|
|
3359
3323
|
}
|
|
3360
3324
|
);
|
|
3361
|
-
const
|
|
3325
|
+
const nt = () => {
|
|
3362
3326
|
var y;
|
|
3363
3327
|
if (!a.value || !a.value.widgets) return [];
|
|
3364
3328
|
const b = a.value.widgets.find((x) => x.type === "layers");
|
|
3365
3329
|
return (y = b == null ? void 0 : b.config) != null && y.layers ? b.config.layers.map((x) => ({ ...x, visible: x.visible ?? !1 })).filter((x) => x.visible).map((x) => x.id) : [];
|
|
3366
3330
|
};
|
|
3367
|
-
function ge(b, y, x,
|
|
3331
|
+
function ge(b, y, x, I) {
|
|
3368
3332
|
b.getStyle().layers.filter((C) => C.source === y).forEach((C) => {
|
|
3369
3333
|
var V;
|
|
3370
3334
|
const P = { source: y, id: x };
|
|
3371
|
-
((V = b.getSource(y)) == null ? void 0 : V.type) === "vector" && C["source-layer"] && (P.sourceLayer = C["source-layer"]), b.setFeatureState(P,
|
|
3335
|
+
((V = b.getSource(y)) == null ? void 0 : V.type) === "vector" && C["source-layer"] && (P.sourceLayer = C["source-layer"]), b.setFeatureState(P, I);
|
|
3372
3336
|
});
|
|
3373
3337
|
}
|
|
3374
|
-
const
|
|
3375
|
-
function
|
|
3338
|
+
const it = M(() => !!a.value && !!a.value.interactions && !!a.value.interactions.navigation && a.value.interactions.navigation.enabled), at = M(() => !!a.value && Array.isArray(a.value.tools) && a.value.tools.length > 0), Te = M(() => it.value || at.value ? "40px" : "20px");
|
|
3339
|
+
function Je() {
|
|
3376
3340
|
o.value && (o.value.getLayer("layer-with-pulsing-dot") && o.value.removeLayer("layer-with-pulsing-dot"), o.value.getSource("dot-point") && o.value.removeSource("dot-point"), o.value.hasImage && o.value.hasImage("pulsing-dot") && o.value.removeImage("pulsing-dot"));
|
|
3377
3341
|
}
|
|
3378
|
-
function
|
|
3379
|
-
var
|
|
3380
|
-
|
|
3342
|
+
function lt(b) {
|
|
3343
|
+
var I, w, C, P;
|
|
3344
|
+
Je();
|
|
3381
3345
|
const y = 80, x = {
|
|
3382
3346
|
width: y,
|
|
3383
3347
|
height: y,
|
|
@@ -3388,8 +3352,8 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
3388
3352
|
},
|
|
3389
3353
|
render() {
|
|
3390
3354
|
var U;
|
|
3391
|
-
const E = performance.now() % 2e3 / 2e3, J = y / 2 * 0.3,
|
|
3392
|
-
Y.clearRect(0, 0, this.width, this.height), Y.beginPath(), Y.arc(this.width / 2, this.height / 2,
|
|
3355
|
+
const E = performance.now() % 2e3 / 2e3, J = y / 2 * 0.3, Ve = y / 2 * 0.7 * E + J, { context: Y } = this;
|
|
3356
|
+
Y.clearRect(0, 0, this.width, this.height), Y.beginPath(), Y.arc(this.width / 2, this.height / 2, Ve, 0, Math.PI * 2), Y.fillStyle = `rgba(255, 100, 100, ${1 - E})`, Y.fill();
|
|
3393
3357
|
const ke = y / 2 * 0.7 * (E - 0.5 < 0 ? E - 0.5 + 1 : E - 0.5) + J;
|
|
3394
3358
|
return Y.beginPath(), Y.arc(
|
|
3395
3359
|
this.width / 2,
|
|
@@ -3400,7 +3364,7 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
3400
3364
|
), Y.fillStyle = `rgba(255, 100, 100, ${1 - (E - 0.5 < 0 ? E - 0.5 + 1 : E - 0.5)})`, Y.fill(), this.data = Y.getImageData(0, 0, this.width, this.height).data, (U = o.value) == null || U.triggerRepaint(), !0;
|
|
3401
3365
|
}
|
|
3402
3366
|
};
|
|
3403
|
-
(
|
|
3367
|
+
(I = o.value) != null && I.hasImage("pulsing-dot") || (w = o.value) == null || w.addImage("pulsing-dot", x, { pixelRatio: 2 }), (C = o.value) == null || C.addSource("dot-point", {
|
|
3404
3368
|
type: "geojson",
|
|
3405
3369
|
data: {
|
|
3406
3370
|
type: "Feature",
|
|
@@ -3414,74 +3378,74 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
3414
3378
|
paint: { "icon-opacity": 0.6 }
|
|
3415
3379
|
});
|
|
3416
3380
|
}
|
|
3417
|
-
const
|
|
3418
|
-
var b, y, x,
|
|
3381
|
+
const ct = M(() => {
|
|
3382
|
+
var b, y, x, I, w, C, P, V, E, J;
|
|
3419
3383
|
return {
|
|
3420
3384
|
center: (y = (b = a == null ? void 0 : a.value) == null ? void 0 : b.map) == null ? void 0 : y.center,
|
|
3421
|
-
zoom: (
|
|
3385
|
+
zoom: (I = (x = a == null ? void 0 : a.value) == null ? void 0 : x.map) == null ? void 0 : I.zoom,
|
|
3422
3386
|
pitch: ((C = (w = a == null ? void 0 : a.value) == null ? void 0 : w.map) == null ? void 0 : C.pitch) || 0,
|
|
3423
3387
|
bearing: ((V = (P = a == null ? void 0 : a.value) == null ? void 0 : P.map) == null ? void 0 : V.bearing) || 0,
|
|
3424
3388
|
bbox: ((J = (E = a == null ? void 0 : a.value) == null ? void 0 : E.map) == null ? void 0 : J.bbox) || null
|
|
3425
3389
|
};
|
|
3426
|
-
}),
|
|
3427
|
-
home:
|
|
3428
|
-
print:
|
|
3429
|
-
geolocation:
|
|
3430
|
-
pitch:
|
|
3390
|
+
}), Qe = {
|
|
3391
|
+
home: dn,
|
|
3392
|
+
print: mn,
|
|
3393
|
+
geolocation: An,
|
|
3394
|
+
pitch: wn
|
|
3431
3395
|
// length: VsLengthMeasure,
|
|
3432
3396
|
// area: VsAreaMeasure,
|
|
3433
|
-
},
|
|
3397
|
+
}, dt = (b) => {
|
|
3434
3398
|
u.value = b;
|
|
3435
3399
|
};
|
|
3436
3400
|
function _e(b) {
|
|
3437
3401
|
if (!a.value || !a.value.widgets) return;
|
|
3438
3402
|
const y = a.value.widgets.find((w) => w.type === "list");
|
|
3439
3403
|
if (!y || !y.config) return;
|
|
3440
|
-
const { map_key: x, service_key:
|
|
3441
|
-
x &&
|
|
3404
|
+
const { map_key: x, service_key: I } = y.config;
|
|
3405
|
+
x && I && (l.value = {
|
|
3442
3406
|
id: b,
|
|
3443
3407
|
map: x,
|
|
3444
|
-
layer:
|
|
3408
|
+
layer: I
|
|
3445
3409
|
});
|
|
3446
3410
|
}
|
|
3447
|
-
const
|
|
3411
|
+
const ut = M(
|
|
3448
3412
|
() => a.value && a.value.widgets ? a.value.widgets.filter((b) => b.position === "absolute") : []
|
|
3449
3413
|
);
|
|
3450
|
-
function
|
|
3451
|
-
const
|
|
3414
|
+
function pt(b, y, x) {
|
|
3415
|
+
const I = b.properties, w = m.value.find(
|
|
3452
3416
|
(U) => String(U.id) === String(b.source)
|
|
3453
|
-
), C = Array.isArray(w == null ? void 0 : w.popup) ? w.popup : [], V = C.filter((U) => U.meta === "image").map((U) =>
|
|
3417
|
+
), C = Array.isArray(w == null ? void 0 : w.popup) ? w.popup : [], V = C.filter((U) => U.meta === "image").map((U) => I == null ? void 0 : I[U.name]).filter(Boolean), E = V.length > 0 ? `
|
|
3454
3418
|
<div class="popup-image-single overflow-hidden rounded-t-xl" style="width:260px;height:160px;margin:0 auto 0 auto;">
|
|
3455
3419
|
<img src="${V[0]}" style="width:100%;height:100%;object-fit:cover;border-radius:12px 12px 0 0;display:block;" />
|
|
3456
3420
|
</div>
|
|
3457
|
-
` : "", J = C.find((U) => U.meta === "title"),
|
|
3421
|
+
` : "", J = C.find((U) => U.meta === "title"), Ve = J ? I == null ? void 0 : I[J.name] : "";
|
|
3458
3422
|
let Y = C.filter((U) => U.meta !== "title" && U.meta !== "image").map((U) => {
|
|
3459
|
-
const Le =
|
|
3460
|
-
let
|
|
3423
|
+
const Le = I == null ? void 0 : I[U.name];
|
|
3424
|
+
let Se = Le ?? "-";
|
|
3461
3425
|
switch (U.meta) {
|
|
3462
3426
|
case "badge":
|
|
3463
|
-
|
|
3427
|
+
Se = Le ? `<span class="inline-block rounded px-2 py-0.5 text-xs bg-yellow-100 text-yellow-800 ">${Le}</span>` : "-";
|
|
3464
3428
|
break;
|
|
3465
3429
|
}
|
|
3466
3430
|
return `
|
|
3467
3431
|
<tr style="display: table-row;">
|
|
3468
3432
|
<td style="display: table-cell; padding: 2px 8px 2px 0; vertical-align: middle; font-weight: 500; width: 50%; text-align: left;">${U.ua || U.name}</td>
|
|
3469
|
-
<td style="display: table-cell; padding: 2px 0 2px 8px; vertical-align: middle; width: 50%; text-align: right;">${
|
|
3433
|
+
<td style="display: table-cell; padding: 2px 0 2px 8px; vertical-align: middle; width: 50%; text-align: right;">${Se}</td>
|
|
3470
3434
|
</tr>
|
|
3471
3435
|
`;
|
|
3472
3436
|
}).join("");
|
|
3473
|
-
C.length || (Y = Object.keys(
|
|
3437
|
+
C.length || (Y = Object.keys(I).map(
|
|
3474
3438
|
(U) => `
|
|
3475
3439
|
<tr style="display: table-row;">
|
|
3476
3440
|
<td style="display: table-cell; padding: 2px 8px 2px 0; vertical-align: middle; font-weight: 500; width: 50%; text-align: left;">${U}</td>
|
|
3477
|
-
<td style="display: table-cell; padding: 2px 0 2px 8px; vertical-align: middle; width: 50%; text-align: right;">${
|
|
3441
|
+
<td style="display: table-cell; padding: 2px 0 2px 8px; vertical-align: middle; width: 50%; text-align: right;">${I[U] || "-"}</td>
|
|
3478
3442
|
</tr>
|
|
3479
3443
|
`
|
|
3480
3444
|
).join(""));
|
|
3481
3445
|
const ke = `
|
|
3482
3446
|
<div class="absolute min-w-[250px] max-w-[300px] bg-white/90 border border-gray-200 rounded-lg shadow-md text-gray-800 pointer-events-none" style="display: flex; flex-direction: column; justify-content: center;">
|
|
3483
3447
|
${E}
|
|
3484
|
-
${
|
|
3448
|
+
${Ve ? `<div class="font-semibold text-sm border-b border-solid border-gray-200 text-gray-800 px-2 py-1">${Ve}</div>` : ""}
|
|
3485
3449
|
<div class="text-xs px-2 py-0.5 text-gray-500" style="display: flex; justify-content: center; align-items: center; flex: 1;">
|
|
3486
3450
|
<table class="w-full" style="border-collapse: collapse; border: none; margin: 0 auto;">
|
|
3487
3451
|
<tbody>${Y}</tbody>
|
|
@@ -3489,135 +3453,135 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
3489
3453
|
</div>
|
|
3490
3454
|
</div>
|
|
3491
3455
|
`;
|
|
3492
|
-
return x || (x = document.createElement("div"), x.className = "custom-popup absolute z-50", document.body.appendChild(x)), x.innerHTML = ke,
|
|
3456
|
+
return x || (x = document.createElement("div"), x.className = "custom-popup absolute z-50", document.body.appendChild(x)), x.innerHTML = ke, Ye(x, y), x;
|
|
3493
3457
|
}
|
|
3494
|
-
function
|
|
3495
|
-
const x = b.offsetWidth,
|
|
3458
|
+
function Ye(b, y) {
|
|
3459
|
+
const x = b.offsetWidth, I = b.offsetHeight, w = document.getElementById("maplibre-demo-map"), C = w.getBoundingClientRect(), P = y.originalEvent.clientX - C.left, V = y.originalEvent.clientY - C.top;
|
|
3496
3460
|
let E = P - x / 2;
|
|
3497
3461
|
E = Math.max(10, Math.min(E, C.width - x - 10));
|
|
3498
3462
|
let J;
|
|
3499
|
-
V -
|
|
3463
|
+
V - I - 10 > 0 ? J = V - I - 5 : V + I + 10 < C.height ? J = V + 10 : J = Math.max(10, C.height - I - 10), b.style.position = "absolute", b.style.left = `${E + 20}px`, b.style.top = `${J + 10}px`, b.parentNode !== w && w.appendChild(b);
|
|
3500
3464
|
}
|
|
3501
3465
|
return (b, y) => {
|
|
3502
|
-
var x,
|
|
3466
|
+
var x, I;
|
|
3503
3467
|
return c(), p("div", {
|
|
3504
3468
|
class: "maplibre-demo-map-container",
|
|
3505
|
-
style:
|
|
3469
|
+
style: he(De.value)
|
|
3506
3470
|
}, [
|
|
3507
3471
|
y[10] || (y[10] = r("div", { id: "maplibre-demo-map" }, null, -1)),
|
|
3508
|
-
|
|
3509
|
-
r("div",
|
|
3510
|
-
r("div",
|
|
3511
|
-
r("div",
|
|
3472
|
+
s.value ? (c(), p(B, { key: 1 }, [
|
|
3473
|
+
r("div", Bn, [
|
|
3474
|
+
r("div", On, [
|
|
3475
|
+
r("div", Dn, [
|
|
3512
3476
|
(c(), p(B, null, W(["top-left"], (w) => {
|
|
3513
3477
|
var C, P;
|
|
3514
|
-
return N(
|
|
3478
|
+
return N(Ae, {
|
|
3515
3479
|
key: w,
|
|
3516
3480
|
position: w,
|
|
3517
3481
|
widgets: f(w),
|
|
3518
3482
|
map: o.value,
|
|
3519
|
-
mapLoaded:
|
|
3483
|
+
mapLoaded: s.value,
|
|
3520
3484
|
cardValues: l.value,
|
|
3521
3485
|
hasFilters: k.value,
|
|
3522
3486
|
history: (P = (C = a.value) == null ? void 0 : C.value) == null ? void 0 : P.history,
|
|
3523
3487
|
currentFilterLayer: i.value,
|
|
3524
3488
|
enabledLayerIds: ie.value,
|
|
3525
3489
|
getWidgetComponent: T,
|
|
3526
|
-
getColumnWidth:
|
|
3527
|
-
rightColumnOffset: w === "top-right" ?
|
|
3490
|
+
getColumnWidth: Me,
|
|
3491
|
+
rightColumnOffset: w === "top-right" ? Te.value : void 0,
|
|
3528
3492
|
onSetFilterLayer: _,
|
|
3529
3493
|
"onUpdate:enabledLayerIds": y[0] || (y[0] = (V) => ie.value = V),
|
|
3530
3494
|
onCardValuesId: _e,
|
|
3531
|
-
onCloseCard:
|
|
3495
|
+
onCloseCard: oe,
|
|
3532
3496
|
onCatalogLayers: y[1] || (y[1] = (V) => m.value = V)
|
|
3533
3497
|
}, null, 8, ["position", "widgets", "map", "mapLoaded", "cardValues", "hasFilters", "history", "currentFilterLayer", "enabledLayerIds", "rightColumnOffset"]);
|
|
3534
3498
|
}), 64))
|
|
3535
3499
|
]),
|
|
3536
|
-
r("div",
|
|
3500
|
+
r("div", Un, [
|
|
3537
3501
|
(c(), p(B, null, W(["bottom-left"], (w) => {
|
|
3538
3502
|
var C, P;
|
|
3539
|
-
return N(
|
|
3503
|
+
return N(Ae, {
|
|
3540
3504
|
key: w,
|
|
3541
3505
|
position: w,
|
|
3542
3506
|
widgets: f(w),
|
|
3543
3507
|
map: o.value,
|
|
3544
|
-
mapLoaded:
|
|
3508
|
+
mapLoaded: s.value,
|
|
3545
3509
|
cardValues: l.value,
|
|
3546
3510
|
hasFilters: k.value,
|
|
3547
3511
|
history: (P = (C = a.value) == null ? void 0 : C.value) == null ? void 0 : P.history,
|
|
3548
3512
|
currentFilterLayer: i.value,
|
|
3549
3513
|
enabledLayerIds: ie.value,
|
|
3550
3514
|
getWidgetComponent: T,
|
|
3551
|
-
getColumnWidth:
|
|
3552
|
-
rightColumnOffset: w === "top-right" ?
|
|
3515
|
+
getColumnWidth: Me,
|
|
3516
|
+
rightColumnOffset: w === "top-right" ? Te.value : void 0,
|
|
3553
3517
|
onSetFilterLayer: _,
|
|
3554
3518
|
"onUpdate:enabledLayerIds": y[2] || (y[2] = (V) => ie.value = V),
|
|
3555
3519
|
onCardValuesId: _e,
|
|
3556
|
-
onCloseCard:
|
|
3520
|
+
onCloseCard: oe,
|
|
3557
3521
|
onCatalogLayers: y[3] || (y[3] = (V) => m.value = V)
|
|
3558
3522
|
}, null, 8, ["position", "widgets", "map", "mapLoaded", "cardValues", "hasFilters", "history", "currentFilterLayer", "enabledLayerIds", "rightColumnOffset"]);
|
|
3559
3523
|
}), 64))
|
|
3560
3524
|
])
|
|
3561
3525
|
]),
|
|
3562
|
-
r("div",
|
|
3563
|
-
r("div",
|
|
3526
|
+
r("div", Rn, [
|
|
3527
|
+
r("div", Hn, [
|
|
3564
3528
|
(c(), p(B, null, W(["top-right"], (w) => {
|
|
3565
3529
|
var C, P;
|
|
3566
|
-
return N(
|
|
3530
|
+
return N(Ae, {
|
|
3567
3531
|
key: w,
|
|
3568
3532
|
position: w,
|
|
3569
3533
|
widgets: f(w),
|
|
3570
3534
|
map: o.value,
|
|
3571
|
-
mapLoaded:
|
|
3535
|
+
mapLoaded: s.value,
|
|
3572
3536
|
cardValues: l.value,
|
|
3573
3537
|
hasFilters: k.value,
|
|
3574
3538
|
history: (P = (C = a.value) == null ? void 0 : C.value) == null ? void 0 : P.history,
|
|
3575
3539
|
currentFilterLayer: i.value,
|
|
3576
3540
|
enabledLayerIds: ie.value,
|
|
3577
3541
|
getWidgetComponent: T,
|
|
3578
|
-
getColumnWidth:
|
|
3579
|
-
rightColumnOffset: w === "top-right" ?
|
|
3542
|
+
getColumnWidth: Me,
|
|
3543
|
+
rightColumnOffset: w === "top-right" ? Te.value : void 0,
|
|
3580
3544
|
onSetFilterLayer: _,
|
|
3581
3545
|
"onUpdate:enabledLayerIds": y[4] || (y[4] = (V) => ie.value = V),
|
|
3582
3546
|
onCardValuesId: _e,
|
|
3583
|
-
onCloseCard:
|
|
3547
|
+
onCloseCard: oe,
|
|
3584
3548
|
onCatalogLayers: y[5] || (y[5] = (V) => m.value = V)
|
|
3585
3549
|
}, null, 8, ["position", "widgets", "map", "mapLoaded", "cardValues", "hasFilters", "history", "currentFilterLayer", "enabledLayerIds", "rightColumnOffset"]);
|
|
3586
3550
|
}), 64))
|
|
3587
3551
|
]),
|
|
3588
|
-
r("div",
|
|
3552
|
+
r("div", Nn, [
|
|
3589
3553
|
(c(), p(B, null, W(["bottom-right"], (w) => {
|
|
3590
3554
|
var C, P;
|
|
3591
|
-
return N(
|
|
3555
|
+
return N(Ae, {
|
|
3592
3556
|
key: w,
|
|
3593
3557
|
position: w,
|
|
3594
3558
|
widgets: f(w),
|
|
3595
3559
|
map: o.value,
|
|
3596
|
-
mapLoaded:
|
|
3560
|
+
mapLoaded: s.value,
|
|
3597
3561
|
cardValues: l.value,
|
|
3598
3562
|
hasFilters: k.value,
|
|
3599
3563
|
history: (P = (C = a.value) == null ? void 0 : C.value) == null ? void 0 : P.history,
|
|
3600
3564
|
currentFilterLayer: i.value,
|
|
3601
3565
|
enabledLayerIds: ie.value,
|
|
3602
3566
|
getWidgetComponent: T,
|
|
3603
|
-
getColumnWidth:
|
|
3604
|
-
rightColumnOffset: w === "top-right" ?
|
|
3567
|
+
getColumnWidth: Me,
|
|
3568
|
+
rightColumnOffset: w === "top-right" ? Te.value : void 0,
|
|
3605
3569
|
onSetFilterLayer: _,
|
|
3606
3570
|
"onUpdate:enabledLayerIds": y[6] || (y[6] = (V) => ie.value = V),
|
|
3607
3571
|
onCardValuesId: _e,
|
|
3608
|
-
onCloseCard:
|
|
3572
|
+
onCloseCard: oe,
|
|
3609
3573
|
onCatalogLayers: y[7] || (y[7] = (V) => m.value = V)
|
|
3610
3574
|
}, null, 8, ["position", "widgets", "map", "mapLoaded", "cardValues", "hasFilters", "history", "currentFilterLayer", "enabledLayerIds", "rightColumnOffset"]);
|
|
3611
3575
|
}), 64))
|
|
3612
3576
|
])
|
|
3613
3577
|
])
|
|
3614
3578
|
]),
|
|
3615
|
-
(c(!0), p(B, null, W(
|
|
3579
|
+
(c(!0), p(B, null, W(ut.value, (w, C) => (c(), p("div", {
|
|
3616
3580
|
key: "abs-" + (w.id || w.type || C),
|
|
3617
3581
|
class: "absolute z-20",
|
|
3618
|
-
style:
|
|
3582
|
+
style: he(w.style)
|
|
3619
3583
|
}, [
|
|
3620
|
-
(c(), X(
|
|
3584
|
+
(c(), X(Oe(T(w.type)), {
|
|
3621
3585
|
map: o.value,
|
|
3622
3586
|
config: w.config,
|
|
3623
3587
|
hasFilters: k.value,
|
|
@@ -3627,30 +3591,30 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
3627
3591
|
onSetFilterLayer: _,
|
|
3628
3592
|
"onUpdate:enabledLayerIds": y[8] || (y[8] = (P) => ie.value = P),
|
|
3629
3593
|
onCardValuesId: _e,
|
|
3630
|
-
onCloseCard:
|
|
3594
|
+
onCloseCard: oe,
|
|
3631
3595
|
onCatalogLayers: y[9] || (y[9] = (P) => m.value = P)
|
|
3632
3596
|
}, null, 40, ["map", "config", "hasFilters", "currentFilterLayer", "enabledLayerIds", "cardValues"]))
|
|
3633
3597
|
], 4))), 128)),
|
|
3634
|
-
r("div",
|
|
3635
|
-
(c(!0), p(B, null, W((
|
|
3636
|
-
|
|
3598
|
+
r("div", Wn, [
|
|
3599
|
+
(c(!0), p(B, null, W((I = (x = a.value) == null ? void 0 : x.value) == null ? void 0 : I.tools, (w) => (c(), p(B, { key: w }, [
|
|
3600
|
+
s.value && Qe[w] ? (c(), X(Oe(Qe[w]), wt({
|
|
3637
3601
|
key: 0,
|
|
3638
3602
|
map: o.value,
|
|
3639
3603
|
activeTool: u.value,
|
|
3640
|
-
setActiveTool:
|
|
3641
|
-
}, { ref_for: !0 }, w === "home" ? { initialView:
|
|
3604
|
+
setActiveTool: dt
|
|
3605
|
+
}, { ref_for: !0 }, w === "home" ? { initialView: ct.value } : {}, { onCardValuesId: _e }), null, 16, ["map", "activeTool"])) : F("", !0)
|
|
3642
3606
|
], 64))), 128))
|
|
3643
3607
|
])
|
|
3644
|
-
], 64)) : (c(), X(
|
|
3608
|
+
], 64)) : (c(), X(on, { key: 0 }))
|
|
3645
3609
|
], 4);
|
|
3646
3610
|
};
|
|
3647
3611
|
}
|
|
3648
|
-
},
|
|
3649
|
-
function
|
|
3650
|
-
e.component("MapCustom",
|
|
3612
|
+
}), qn = /* @__PURE__ */ H(Zn, [["__scopeId", "data-v-09938096"]]);
|
|
3613
|
+
function Qn(e) {
|
|
3614
|
+
e.component("MapCustom", qn);
|
|
3651
3615
|
}
|
|
3652
3616
|
export {
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3617
|
+
qn as MapCustom,
|
|
3618
|
+
qn as default,
|
|
3619
|
+
Qn as install
|
|
3656
3620
|
};
|