@opengis/surveyor 0.0.8 → 0.0.9
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/chunks/{create-CAVC1qXJ.js → create-DR8tXNYj.js} +409 -409
- package/dist/chunks/map-DvwFkxAS.js +2763 -0
- package/dist/index.css +1 -1
- package/dist/index.js +3 -3
- package/package.json +1 -1
- package/server/modules/surveyor/route.ts +4 -2
- package/server/modules/surveyor/schema.ts +18 -1
- package/server/modules/surveyor/services/applicationTile.ts +36 -8
- package/server/resources/surveyor-user/applications.ts +1 -1
- package/dist/chunks/map-UTBxwT7-.js +0 -2776
|
@@ -1,2776 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
|
-
import { a as t, i as n, s as r } from "./resources-2e8RFqWR.js";
|
|
3
|
-
import { l as i, o as a } from "./filterQuery-CvfZrkTC.js";
|
|
4
|
-
import { t as o } from "./SurveyorTeleport-CnSF0Ptl.js";
|
|
5
|
-
import { c as s, d as c, f as l, l as u, m as d, p as f, t as p, u as m } from "./appealMapLayers-CQMK3rrz.js";
|
|
6
|
-
import { a as h, i as g, o as _, s as v, t as y } from "./AppealStatusBadge-Cu-UzdzA.js";
|
|
7
|
-
import { a as b, c as x, d as ee, i as te, l as S, n as ne, o as re, r as C, s as ie, t as ae, u as w } from "./mapLayersApi-CBLcbADa.js";
|
|
8
|
-
import { i as oe, n as se } from "./geometry-DyhIVRcw.js";
|
|
9
|
-
import { t as T } from "./work_types-Hwme-FEX.js";
|
|
10
|
-
import { Fragment as E, computed as D, createBlock as O, createCommentVNode as k, createElementBlock as A, createElementVNode as j, createTextVNode as M, createVNode as N, defineComponent as P, nextTick as ce, normalizeClass as F, normalizeStyle as I, onMounted as le, onUnmounted as ue, openBlock as L, ref as R, renderList as z, shallowRef as de, toDisplayString as B, useTemplateRef as fe, vModelText as V, watch as H, withCtx as U, withDirectives as W, withModifiers as G } from "vue";
|
|
11
|
-
import { RouterLink as K, useRoute as q, useRouter as J } from "vue-router";
|
|
12
|
-
import { AlertTriangle as Y, Check as X, ChevronDown as Z, ChevronLeft as pe, Compass as Q, GripVertical as me, Layers2 as he, Loader2 as ge, Map as _e, Minus as ve, MoreHorizontal as ye, Plus as be, RotateCcw as xe, Search as Se, SlidersHorizontal as Ce, X as we, ZoomIn as Te } from "lucide-vue-next";
|
|
13
|
-
//#region admin/src/api/map.ts
|
|
14
|
-
var Ee = [
|
|
15
|
-
"search",
|
|
16
|
-
"dateFrom",
|
|
17
|
-
"dateTo",
|
|
18
|
-
"workType",
|
|
19
|
-
"verifiedBy",
|
|
20
|
-
"organization",
|
|
21
|
-
"address"
|
|
22
|
-
];
|
|
23
|
-
function De(e = {}) {
|
|
24
|
-
let t = new URLSearchParams();
|
|
25
|
-
for (let n of Ee) {
|
|
26
|
-
let r = e[n], i = Array.isArray(r) ? r.map((e) => e.trim()).filter(Boolean).join(",") : r?.trim();
|
|
27
|
-
i && t.set(n, i);
|
|
28
|
-
}
|
|
29
|
-
let n = t.toString(), i = r("/api/surveyor/vtile/applications/{z}/{x}/{y}");
|
|
30
|
-
return n ? `${i}?${n}` : i;
|
|
31
|
-
}
|
|
32
|
-
async function Oe() {
|
|
33
|
-
let e = await n(v, {
|
|
34
|
-
page: 1,
|
|
35
|
-
limit: 1
|
|
36
|
-
}), t = Object.fromEntries(g.map((e) => [e, 0]));
|
|
37
|
-
for (let n of g) {
|
|
38
|
-
let r = Number(e.summary?.[n] ?? 0);
|
|
39
|
-
t[n] = Number.isFinite(r) ? r : 0;
|
|
40
|
-
}
|
|
41
|
-
return t;
|
|
42
|
-
}
|
|
43
|
-
function ke(e) {
|
|
44
|
-
return t(`/api/resource/applications/${encodeURIComponent(e)}?include=organization,surveyor`);
|
|
45
|
-
}
|
|
46
|
-
function Ae(e, n, r = 1, i = []) {
|
|
47
|
-
let a = new URLSearchParams({
|
|
48
|
-
lng: String(e),
|
|
49
|
-
lat: String(n),
|
|
50
|
-
page: String(r),
|
|
51
|
-
limit: "10"
|
|
52
|
-
}), o = [...new Set(i)].filter(Boolean);
|
|
53
|
-
return o.length && a.set("statuses", o.join(",")), t(`/api/surveyor/applications/identify?${a}`);
|
|
54
|
-
}
|
|
55
|
-
function je(e, n = {}) {
|
|
56
|
-
let r = e.trim(), i = new URLSearchParams({
|
|
57
|
-
search: r,
|
|
58
|
-
page: String(n.page ?? 1),
|
|
59
|
-
limit: String(n.limit ?? 20)
|
|
60
|
-
});
|
|
61
|
-
return n.filter && i.set("filter", n.filter), t(`/api/surveyor/applications/search?${i}`, { signal: n.signal });
|
|
62
|
-
}
|
|
63
|
-
//#endregion
|
|
64
|
-
//#region admin/src/api/mock-map-settings.ts
|
|
65
|
-
var Me = {
|
|
66
|
-
center: "49.8397, 24.0297",
|
|
67
|
-
zoom: 13,
|
|
68
|
-
bounds: "49.75, 23.90, 49.92, 24.20",
|
|
69
|
-
katottg: "UA4610100000",
|
|
70
|
-
collapseEmptyFields: !0,
|
|
71
|
-
configFileName: null,
|
|
72
|
-
links: {
|
|
73
|
-
publicCabinet: "https://cabinet.geodesist.gov.ua/public",
|
|
74
|
-
adminCabinet: "https://cabinet.geodesist.gov.ua/admin",
|
|
75
|
-
gis: "https://gis.geodesist.gov.ua"
|
|
76
|
-
}
|
|
77
|
-
}, Ne = "surveyor:map-settings", $ = R({ ...Me });
|
|
78
|
-
function Pe(e) {
|
|
79
|
-
let t = Number(e.trim().replace(",", "."));
|
|
80
|
-
return Number.isFinite(t) ? t : null;
|
|
81
|
-
}
|
|
82
|
-
function Fe(e) {
|
|
83
|
-
let t = e.split(",").map((e) => Pe(e));
|
|
84
|
-
return t.length !== 2 || t[0] == null || t[1] == null ? null : {
|
|
85
|
-
lat: t[0],
|
|
86
|
-
lng: t[1]
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
function Ie(e) {
|
|
90
|
-
let t = e.split(",").map((e) => Pe(e));
|
|
91
|
-
if (t.length !== 4 || t.some((e) => e == null)) return null;
|
|
92
|
-
let [n, r, i, a] = t;
|
|
93
|
-
return n >= i || r >= a ? null : {
|
|
94
|
-
minLat: n,
|
|
95
|
-
minLng: r,
|
|
96
|
-
maxLat: i,
|
|
97
|
-
maxLng: a
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
function Le() {
|
|
101
|
-
try {
|
|
102
|
-
let e = localStorage.getItem(Ne);
|
|
103
|
-
if (!e) return;
|
|
104
|
-
$.value = {
|
|
105
|
-
...Me,
|
|
106
|
-
...JSON.parse(e)
|
|
107
|
-
};
|
|
108
|
-
} catch {
|
|
109
|
-
$.value = { ...Me };
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
Le();
|
|
113
|
-
function Re() {
|
|
114
|
-
let e = D(() => Fe($.value.center)), t = D(() => Ie($.value.bounds)), n = D(() => e.value ? [e.value.lng, e.value.lat] : null), r = D(() => t.value ? [[t.value.minLng, t.value.minLat], [t.value.maxLng, t.value.maxLat]] : null);
|
|
115
|
-
function i(e) {
|
|
116
|
-
$.value = { ...e }, localStorage.setItem(Ne, JSON.stringify($.value));
|
|
117
|
-
}
|
|
118
|
-
function a() {
|
|
119
|
-
$.value = { ...Me }, localStorage.removeItem(Ne);
|
|
120
|
-
}
|
|
121
|
-
return {
|
|
122
|
-
settings: $,
|
|
123
|
-
center: e,
|
|
124
|
-
bounds: t,
|
|
125
|
-
centerLngLat: n,
|
|
126
|
-
maxBounds: r,
|
|
127
|
-
zoom: D(() => $.value.zoom),
|
|
128
|
-
saveSettings: i,
|
|
129
|
-
resetSettings: a
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
//#endregion
|
|
133
|
-
//#region admin/src/pages/map/components/map-styles.ts
|
|
134
|
-
var ze = "map-applications", Be = "applications", Ve = "map-applications-fill", He = "map-applications-line";
|
|
135
|
-
function Ue() {
|
|
136
|
-
return [
|
|
137
|
-
"match",
|
|
138
|
-
["get", "status"],
|
|
139
|
-
...Object.entries(h).flatMap(([e, t]) => [e, t]),
|
|
140
|
-
"#64748b"
|
|
141
|
-
];
|
|
142
|
-
}
|
|
143
|
-
function We(e) {
|
|
144
|
-
return [
|
|
145
|
-
"*",
|
|
146
|
-
e,
|
|
147
|
-
[
|
|
148
|
-
"case",
|
|
149
|
-
[
|
|
150
|
-
"boolean",
|
|
151
|
-
["feature-state", "selected"],
|
|
152
|
-
!1
|
|
153
|
-
],
|
|
154
|
-
.55,
|
|
155
|
-
[
|
|
156
|
-
"boolean",
|
|
157
|
-
["feature-state", "hover"],
|
|
158
|
-
!1
|
|
159
|
-
],
|
|
160
|
-
.42,
|
|
161
|
-
.26
|
|
162
|
-
]
|
|
163
|
-
];
|
|
164
|
-
}
|
|
165
|
-
function Ge(e) {
|
|
166
|
-
return e.size ? [
|
|
167
|
-
"in",
|
|
168
|
-
["get", "status"],
|
|
169
|
-
["literal", Array.from(e)]
|
|
170
|
-
] : ["boolean", !1];
|
|
171
|
-
}
|
|
172
|
-
//#endregion
|
|
173
|
-
//#region admin/src/pages/map/components/MapView.vue?vue&type=script&setup=true&lang.ts
|
|
174
|
-
var Ke = 250, qe = /*@__PURE__*/ P({
|
|
175
|
-
__name: "MapView",
|
|
176
|
-
props: {
|
|
177
|
-
basemap: {
|
|
178
|
-
type: Object,
|
|
179
|
-
required: !0
|
|
180
|
-
},
|
|
181
|
-
overlays: {
|
|
182
|
-
type: Array,
|
|
183
|
-
required: !1,
|
|
184
|
-
default: () => []
|
|
185
|
-
},
|
|
186
|
-
activeOverlayIds: {
|
|
187
|
-
type: Array,
|
|
188
|
-
required: !1,
|
|
189
|
-
default: () => []
|
|
190
|
-
},
|
|
191
|
-
overlayOpacities: {
|
|
192
|
-
type: Object,
|
|
193
|
-
required: !1,
|
|
194
|
-
default: () => ({})
|
|
195
|
-
},
|
|
196
|
-
visibleStatuses: {
|
|
197
|
-
type: Set,
|
|
198
|
-
required: !0
|
|
199
|
-
},
|
|
200
|
-
selectedId: {
|
|
201
|
-
type: [String, null],
|
|
202
|
-
required: !1,
|
|
203
|
-
default: null
|
|
204
|
-
},
|
|
205
|
-
applicationsVisible: {
|
|
206
|
-
type: Boolean,
|
|
207
|
-
required: !1,
|
|
208
|
-
default: !0
|
|
209
|
-
},
|
|
210
|
-
applicationsOpacity: {
|
|
211
|
-
type: Number,
|
|
212
|
-
required: !1,
|
|
213
|
-
default: 100
|
|
214
|
-
},
|
|
215
|
-
filters: {
|
|
216
|
-
type: Object,
|
|
217
|
-
required: !1,
|
|
218
|
-
default: () => ({})
|
|
219
|
-
},
|
|
220
|
-
initialView: {
|
|
221
|
-
type: [Object, null],
|
|
222
|
-
required: !1,
|
|
223
|
-
default: null
|
|
224
|
-
}
|
|
225
|
-
},
|
|
226
|
-
emits: [
|
|
227
|
-
"pointHover",
|
|
228
|
-
"pointSelect",
|
|
229
|
-
"zoom",
|
|
230
|
-
"viewChange",
|
|
231
|
-
"overlayLoad"
|
|
232
|
-
],
|
|
233
|
-
setup(e, { expose: t, emit: n }) {
|
|
234
|
-
let r = {
|
|
235
|
-
padding: 48,
|
|
236
|
-
maxZoom: 18
|
|
237
|
-
}, i = e, a = n, { centerLngLat: o, maxBounds: s, zoom: l, settings: u } = Re(), p = R(null), h = de(null), g = R(null), _ = R(""), v = /* @__PURE__ */ new Map(), y = [], ae = 0, T, E = null, D = null, O, k = null, A = !1, j = !1, M = [Ve, He];
|
|
238
|
-
function N() {
|
|
239
|
-
return i.initialView ? {
|
|
240
|
-
center: [i.initialView.lng, i.initialView.lat],
|
|
241
|
-
zoom: i.initialView.zoom
|
|
242
|
-
} : {
|
|
243
|
-
center: o.value ?? [24.0297, 49.8397],
|
|
244
|
-
zoom: l.value
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
function P() {
|
|
248
|
-
if (j) return;
|
|
249
|
-
let e = h.value;
|
|
250
|
-
if (!e) return;
|
|
251
|
-
let t = e.getCenter(), n = {
|
|
252
|
-
lng: t.lng,
|
|
253
|
-
lat: t.lat,
|
|
254
|
-
zoom: e.getZoom()
|
|
255
|
-
};
|
|
256
|
-
a("viewChange", n), a("zoom", n.zoom);
|
|
257
|
-
}
|
|
258
|
-
function ce(e, t = !1) {
|
|
259
|
-
let n = h.value;
|
|
260
|
-
n && (j = !0, t ? n.flyTo({
|
|
261
|
-
center: [e.lng, e.lat],
|
|
262
|
-
zoom: e.zoom,
|
|
263
|
-
bearing: 0,
|
|
264
|
-
pitch: 0,
|
|
265
|
-
duration: 500
|
|
266
|
-
}) : n.jumpTo({
|
|
267
|
-
center: [e.lng, e.lat],
|
|
268
|
-
zoom: e.zoom
|
|
269
|
-
}), a("zoom", e.zoom), window.setTimeout(() => {
|
|
270
|
-
j = !1;
|
|
271
|
-
}, 0));
|
|
272
|
-
}
|
|
273
|
-
function F(e) {
|
|
274
|
-
s.value ? e.setMaxBounds(s.value) : e.setMaxBounds(null);
|
|
275
|
-
}
|
|
276
|
-
function I(e) {
|
|
277
|
-
return e.isStyleLoaded() && !!e.getLayer("map-applications-fill");
|
|
278
|
-
}
|
|
279
|
-
function L(e) {
|
|
280
|
-
if (!I(e)) return;
|
|
281
|
-
let t = Ge(i.visibleStatuses);
|
|
282
|
-
for (let n of M) e.getLayer(n) && e.setFilter(n, t);
|
|
283
|
-
}
|
|
284
|
-
function z(e) {
|
|
285
|
-
if (!I(e)) return;
|
|
286
|
-
let t = i.applicationsVisible ? "visible" : "none", n = i.applicationsOpacity / 100;
|
|
287
|
-
for (let n of M) e.getLayer(n) && e.setLayoutProperty(n, "visibility", t);
|
|
288
|
-
e.setPaintProperty(Ve, "fill-opacity", We(n)), e.setPaintProperty(He, "line-opacity", n);
|
|
289
|
-
}
|
|
290
|
-
function B(e, t) {
|
|
291
|
-
b(e, t, te(e, i.overlays, [Ve]));
|
|
292
|
-
}
|
|
293
|
-
function fe(e) {
|
|
294
|
-
e.getSource("map-applications") || e.addSource(ze, {
|
|
295
|
-
type: "vector",
|
|
296
|
-
tiles: [De(i.filters)],
|
|
297
|
-
promoteId: "id"
|
|
298
|
-
});
|
|
299
|
-
let t = Ge(i.visibleStatuses);
|
|
300
|
-
e.getLayer("map-applications-fill") || e.addLayer({
|
|
301
|
-
id: Ve,
|
|
302
|
-
type: "fill",
|
|
303
|
-
source: ze,
|
|
304
|
-
"source-layer": Be,
|
|
305
|
-
filter: t,
|
|
306
|
-
paint: {
|
|
307
|
-
"fill-color": Ue(),
|
|
308
|
-
"fill-opacity": We(i.applicationsOpacity / 100)
|
|
309
|
-
}
|
|
310
|
-
}), e.getLayer("map-applications-line") || e.addLayer({
|
|
311
|
-
id: He,
|
|
312
|
-
type: "line",
|
|
313
|
-
source: ze,
|
|
314
|
-
"source-layer": Be,
|
|
315
|
-
filter: t,
|
|
316
|
-
paint: {
|
|
317
|
-
"line-color": Ue(),
|
|
318
|
-
"line-width": [
|
|
319
|
-
"case",
|
|
320
|
-
[
|
|
321
|
-
"boolean",
|
|
322
|
-
["feature-state", "selected"],
|
|
323
|
-
!1
|
|
324
|
-
],
|
|
325
|
-
3,
|
|
326
|
-
[
|
|
327
|
-
"boolean",
|
|
328
|
-
["feature-state", "hover"],
|
|
329
|
-
!1
|
|
330
|
-
],
|
|
331
|
-
2.5,
|
|
332
|
-
1.5
|
|
333
|
-
]
|
|
334
|
-
}
|
|
335
|
-
}), L(e), z(e);
|
|
336
|
-
}
|
|
337
|
-
function V(e) {
|
|
338
|
-
return i.overlayOpacities[e.id] ?? Math.round(d(e) * 100);
|
|
339
|
-
}
|
|
340
|
-
function U(e) {
|
|
341
|
-
for (let t of i.overlays) ne(e, t, V(t));
|
|
342
|
-
}
|
|
343
|
-
function W(e) {
|
|
344
|
-
ie(e, i.overlays, i.activeOverlayIds, Ve), U(e);
|
|
345
|
-
}
|
|
346
|
-
let G = /* @__PURE__ */ new Set();
|
|
347
|
-
function K(e) {
|
|
348
|
-
let t = e;
|
|
349
|
-
t.sourceId && t.isSourceLoaded && i.overlays.some((e) => e.id === t.sourceId) && (G.add(t.sourceId), a("overlayLoad", t.sourceId, "ready"));
|
|
350
|
-
}
|
|
351
|
-
function q(e) {
|
|
352
|
-
let t = e;
|
|
353
|
-
!t.sourceId || t.tile || G.has(t.sourceId) || i.overlays.some((e) => e.id === t.sourceId) && a("overlayLoad", t.sourceId, "error");
|
|
354
|
-
}
|
|
355
|
-
function J(e) {
|
|
356
|
-
fe(e), W(e);
|
|
357
|
-
}
|
|
358
|
-
function Y(e) {
|
|
359
|
-
return {
|
|
360
|
-
source: ze,
|
|
361
|
-
sourceLayer: Be,
|
|
362
|
-
id: e
|
|
363
|
-
};
|
|
364
|
-
}
|
|
365
|
-
function X(e) {
|
|
366
|
-
if (!y.length || !e.getSource("map-applications")) {
|
|
367
|
-
y.length = 0;
|
|
368
|
-
return;
|
|
369
|
-
}
|
|
370
|
-
for (let t of y) try {
|
|
371
|
-
e.setFeatureState(Y(t), { hover: !1 });
|
|
372
|
-
} catch {}
|
|
373
|
-
y.length = 0;
|
|
374
|
-
}
|
|
375
|
-
function Z(e, t) {
|
|
376
|
-
let n = new Set(t);
|
|
377
|
-
if (e.getSource("map-applications")) {
|
|
378
|
-
for (let t of y) if (!n.has(t)) try {
|
|
379
|
-
e.setFeatureState(Y(t), { hover: !1 });
|
|
380
|
-
} catch {}
|
|
381
|
-
for (let n of t) try {
|
|
382
|
-
e.setFeatureState(Y(n), { hover: !0 });
|
|
383
|
-
} catch {}
|
|
384
|
-
}
|
|
385
|
-
y.length = 0, y.push(...t);
|
|
386
|
-
}
|
|
387
|
-
function pe(e, t) {
|
|
388
|
-
let n = g.value;
|
|
389
|
-
if (n && n !== t && e.getSource("map-applications")) try {
|
|
390
|
-
e.setFeatureState(Y(n), { selected: !1 });
|
|
391
|
-
} catch {}
|
|
392
|
-
if (g.value = t, t && e.getSource("map-applications")) try {
|
|
393
|
-
e.setFeatureState(Y(t), { selected: !0 });
|
|
394
|
-
} catch {}
|
|
395
|
-
}
|
|
396
|
-
function Q(e, t) {
|
|
397
|
-
let n = e.queryRenderedFeatures(t, { layers: [Ve] }), r = [];
|
|
398
|
-
for (let e of n) {
|
|
399
|
-
let t = String(e.id ?? e.properties?.id ?? "");
|
|
400
|
-
t && !r.includes(t) && r.push(t);
|
|
401
|
-
}
|
|
402
|
-
return r;
|
|
403
|
-
}
|
|
404
|
-
function me(e) {
|
|
405
|
-
return {
|
|
406
|
-
id: e.app_id,
|
|
407
|
-
number: e.number ?? "—",
|
|
408
|
-
status: e.status ?? "",
|
|
409
|
-
workType: e.work_type_data?.text ?? "—",
|
|
410
|
-
organization: e.org_id_data?.text ?? "—"
|
|
411
|
-
};
|
|
412
|
-
}
|
|
413
|
-
function he(e, t) {
|
|
414
|
-
let n = Array.from(i.visibleStatuses).sort().join(",");
|
|
415
|
-
return `${e.toFixed(5)}:${t.toFixed(5)}:${n}`;
|
|
416
|
-
}
|
|
417
|
-
function ge(e, t) {
|
|
418
|
-
if (v.size > 40) {
|
|
419
|
-
let e = v.keys().next().value;
|
|
420
|
-
e && v.delete(e);
|
|
421
|
-
}
|
|
422
|
-
v.set(e, t);
|
|
423
|
-
}
|
|
424
|
-
function _e() {
|
|
425
|
-
clearTimeout(T), T = void 0, ae += 1;
|
|
426
|
-
}
|
|
427
|
-
function ve(e) {
|
|
428
|
-
let t = h.value;
|
|
429
|
-
if (!t || !I(t)) return;
|
|
430
|
-
let n = Q(t, e.point);
|
|
431
|
-
if (t.getCanvas().style.cursor = n.length ? "pointer" : "", !n.length || !i.visibleStatuses.size) {
|
|
432
|
-
X(t), E = null, D = null, _e(), a("pointHover", null, null);
|
|
433
|
-
return;
|
|
434
|
-
}
|
|
435
|
-
Z(t, n);
|
|
436
|
-
let r = {
|
|
437
|
-
x: e.point.x,
|
|
438
|
-
y: e.point.y
|
|
439
|
-
};
|
|
440
|
-
E = r;
|
|
441
|
-
let o = e.lngLat.lng, s = e.lngLat.lat, c = he(o, s), l = v.get(c);
|
|
442
|
-
if (l) {
|
|
443
|
-
_e(), D = l, a("pointHover", l, r);
|
|
444
|
-
return;
|
|
445
|
-
}
|
|
446
|
-
D && a("pointHover", D, r), _e();
|
|
447
|
-
let u = ae;
|
|
448
|
-
T = setTimeout(() => {
|
|
449
|
-
Ae(o, s, 1, i.visibleStatuses).then((e) => {
|
|
450
|
-
if (u !== ae || !E) return;
|
|
451
|
-
let t = {
|
|
452
|
-
points: e.data.map(me),
|
|
453
|
-
total: e.total
|
|
454
|
-
};
|
|
455
|
-
ge(c, t), D = t, a("pointHover", t, E);
|
|
456
|
-
}).catch(() => {});
|
|
457
|
-
}, Ke);
|
|
458
|
-
}
|
|
459
|
-
function ye(e) {
|
|
460
|
-
let t = h.value;
|
|
461
|
-
if (t && I(t)) {
|
|
462
|
-
if (!Q(t, e.point).length) {
|
|
463
|
-
a("pointSelect", null);
|
|
464
|
-
return;
|
|
465
|
-
}
|
|
466
|
-
a("pointSelect", {
|
|
467
|
-
lng: e.lngLat.lng,
|
|
468
|
-
lat: e.lngLat.lat
|
|
469
|
-
});
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
function be() {
|
|
473
|
-
let e = p.value;
|
|
474
|
-
if (!k || !e || h.value || e.clientWidth === 0 || e.clientHeight === 0) return;
|
|
475
|
-
let t = N(), n = new k.Map({
|
|
476
|
-
container: e,
|
|
477
|
-
style: m(i.basemap),
|
|
478
|
-
center: t.center,
|
|
479
|
-
zoom: t.zoom,
|
|
480
|
-
minZoom: 1,
|
|
481
|
-
maxZoom: 19,
|
|
482
|
-
attributionControl: !1,
|
|
483
|
-
locale: w,
|
|
484
|
-
transformRequest: (e, t) => t === "Tile" && e.includes("/vtile/applications/") ? {
|
|
485
|
-
url: e,
|
|
486
|
-
credentials: "include"
|
|
487
|
-
} : { url: e }
|
|
488
|
-
});
|
|
489
|
-
n.on("load", () => {
|
|
490
|
-
F(n), n.resize(), J(n), pe(n, i.selectedId ?? null), P();
|
|
491
|
-
}), n.on("moveend", P), n.on("sourcedata", K), n.on("error", q), n.on("mousemove", (e) => ve(e)), n.on("click", (e) => ye(e)), h.value = n;
|
|
492
|
-
}
|
|
493
|
-
async function xe() {
|
|
494
|
-
try {
|
|
495
|
-
k = await ee();
|
|
496
|
-
} catch (e) {
|
|
497
|
-
console.error(e), _.value = S;
|
|
498
|
-
return;
|
|
499
|
-
}
|
|
500
|
-
!A && p.value && (O = new ResizeObserver(() => {
|
|
501
|
-
h.value ? h.value.resize() : be();
|
|
502
|
-
}), O.observe(p.value));
|
|
503
|
-
}
|
|
504
|
-
H(() => Array.from(i.visibleStatuses).sort().join(","), () => {
|
|
505
|
-
v.clear(), D = null, _e();
|
|
506
|
-
let e = h.value;
|
|
507
|
-
e && X(e), a("pointHover", null, null), e?.isStyleLoaded() && L(e);
|
|
508
|
-
}), H(() => De(i.filters), (e) => {
|
|
509
|
-
let t = h.value, n = t?.getSource(ze);
|
|
510
|
-
t && n && (X(t), E = null, D = null, _e(), t.getCanvas().style.cursor = "", a("pointHover", null, null), n.setTiles([e]));
|
|
511
|
-
}), H(() => [i.applicationsVisible, i.applicationsOpacity], () => {
|
|
512
|
-
let e = h.value;
|
|
513
|
-
e && (i.applicationsVisible || (X(e), E = null, D = null, _e(), e.getCanvas().style.cursor = "", a("pointHover", null, null)), z(e));
|
|
514
|
-
}), H(() => i.overlays, () => {
|
|
515
|
-
let e = h.value;
|
|
516
|
-
e?.isStyleLoaded() && W(e);
|
|
517
|
-
}), H(() => i.activeOverlayIds, () => {
|
|
518
|
-
let e = h.value;
|
|
519
|
-
e?.isStyleLoaded() && C(e, i.overlays, i.activeOverlayIds);
|
|
520
|
-
}), H(() => i.overlayOpacities, () => {
|
|
521
|
-
let e = h.value;
|
|
522
|
-
e?.isStyleLoaded() && U(e);
|
|
523
|
-
}, { deep: !0 }), H(() => i.basemap, (e) => {
|
|
524
|
-
let t = h.value;
|
|
525
|
-
if (!t) return;
|
|
526
|
-
let n = () => B(t, e);
|
|
527
|
-
t.isStyleLoaded() ? n() : t.once("style.load", n);
|
|
528
|
-
}), H(() => i.selectedId ?? null, (e) => {
|
|
529
|
-
let t = h.value;
|
|
530
|
-
t?.getSource("map-applications") && pe(t, e);
|
|
531
|
-
}), H(() => [
|
|
532
|
-
u.value.center,
|
|
533
|
-
u.value.zoom,
|
|
534
|
-
u.value.bounds
|
|
535
|
-
].join("|"), () => {
|
|
536
|
-
let e = h.value;
|
|
537
|
-
if (!e?.isStyleLoaded()) return;
|
|
538
|
-
F(e);
|
|
539
|
-
let t = N();
|
|
540
|
-
e.flyTo({
|
|
541
|
-
center: t.center,
|
|
542
|
-
zoom: t.zoom,
|
|
543
|
-
bearing: 0,
|
|
544
|
-
pitch: 0,
|
|
545
|
-
duration: 500
|
|
546
|
-
});
|
|
547
|
-
});
|
|
548
|
-
function Se() {
|
|
549
|
-
h.value?.zoomIn({ duration: 250 });
|
|
550
|
-
}
|
|
551
|
-
function Ce() {
|
|
552
|
-
h.value?.zoomOut({ duration: 250 });
|
|
553
|
-
}
|
|
554
|
-
function we() {
|
|
555
|
-
let e = N();
|
|
556
|
-
h.value?.flyTo({
|
|
557
|
-
center: e.center,
|
|
558
|
-
zoom: e.zoom,
|
|
559
|
-
bearing: 0,
|
|
560
|
-
pitch: 0,
|
|
561
|
-
duration: 500
|
|
562
|
-
});
|
|
563
|
-
}
|
|
564
|
-
function Te(e) {
|
|
565
|
-
let t = h.value;
|
|
566
|
-
return !!(t?.isStyleLoaded() && t.isSourceLoaded(e));
|
|
567
|
-
}
|
|
568
|
-
function Ee(e) {
|
|
569
|
-
let t = h.value, n = i.overlays.find((t) => t.id === e);
|
|
570
|
-
if (!t || !n || !c(n)) return;
|
|
571
|
-
let r = t.getZoom(), a = f(n), o = n.kind === "raster" || n.kind === "vector" ? n.maxzoom ?? 18 : 18, s = a != null && r < a ? a : Math.min(o, r + 1), l = t.getCenter();
|
|
572
|
-
t.flyTo({
|
|
573
|
-
center: [l.lng, l.lat],
|
|
574
|
-
zoom: s,
|
|
575
|
-
duration: 600
|
|
576
|
-
});
|
|
577
|
-
}
|
|
578
|
-
function Oe(e) {
|
|
579
|
-
let t = oe(e), n = h.value;
|
|
580
|
-
t && n && n.fitBounds(se(t), {
|
|
581
|
-
...r,
|
|
582
|
-
duration: 500
|
|
583
|
-
});
|
|
584
|
-
}
|
|
585
|
-
function ke(e) {
|
|
586
|
-
let t = h.value, n = i.overlays.find((t) => t.id === e);
|
|
587
|
-
if (!t || !n) return;
|
|
588
|
-
let r = () => {
|
|
589
|
-
G.delete(e), x(t, n), re(t, n, i.activeOverlayIds.includes(e), Ve), ne(t, n, V(n));
|
|
590
|
-
};
|
|
591
|
-
t.isStyleLoaded() ? r() : t.once("load", r);
|
|
592
|
-
}
|
|
593
|
-
t({
|
|
594
|
-
zoomIn: Se,
|
|
595
|
-
zoomOut: Ce,
|
|
596
|
-
resetView: we,
|
|
597
|
-
setView: ce,
|
|
598
|
-
overlaySourceReady: Te,
|
|
599
|
-
zoomToOverlay: Ee,
|
|
600
|
-
reloadOverlay: ke,
|
|
601
|
-
fitApplicationGeometry: Oe
|
|
602
|
-
}), le(xe), ue(() => {
|
|
603
|
-
A = !0, clearTimeout(T), O?.disconnect(), h.value?.remove(), h.value = null;
|
|
604
|
-
});
|
|
605
|
-
let je = {
|
|
606
|
-
FIT_APPLICATION_OPTIONS: r,
|
|
607
|
-
props: i,
|
|
608
|
-
emit: a,
|
|
609
|
-
HOVER_IDENTIFY_DELAY_MS: Ke,
|
|
610
|
-
centerLngLat: o,
|
|
611
|
-
maxBounds: s,
|
|
612
|
-
zoom: l,
|
|
613
|
-
settings: u,
|
|
614
|
-
containerRef: p,
|
|
615
|
-
mapRef: h,
|
|
616
|
-
selectedFeatureId: g,
|
|
617
|
-
mapLoadError: _,
|
|
618
|
-
identifyCache: v,
|
|
619
|
-
hoveredFeatureIds: y,
|
|
620
|
-
get hoverRequestId() {
|
|
621
|
-
return ae;
|
|
622
|
-
},
|
|
623
|
-
set hoverRequestId(e) {
|
|
624
|
-
ae = e;
|
|
625
|
-
},
|
|
626
|
-
get hoverTimer() {
|
|
627
|
-
return T;
|
|
628
|
-
},
|
|
629
|
-
set hoverTimer(e) {
|
|
630
|
-
T = e;
|
|
631
|
-
},
|
|
632
|
-
get hoverAnchor() {
|
|
633
|
-
return E;
|
|
634
|
-
},
|
|
635
|
-
set hoverAnchor(e) {
|
|
636
|
-
E = e;
|
|
637
|
-
},
|
|
638
|
-
get hoverPayload() {
|
|
639
|
-
return D;
|
|
640
|
-
},
|
|
641
|
-
set hoverPayload(e) {
|
|
642
|
-
D = e;
|
|
643
|
-
},
|
|
644
|
-
get resizeObserver() {
|
|
645
|
-
return O;
|
|
646
|
-
},
|
|
647
|
-
set resizeObserver(e) {
|
|
648
|
-
O = e;
|
|
649
|
-
},
|
|
650
|
-
get ml() {
|
|
651
|
-
return k;
|
|
652
|
-
},
|
|
653
|
-
set ml(e) {
|
|
654
|
-
k = e;
|
|
655
|
-
},
|
|
656
|
-
get disposed() {
|
|
657
|
-
return A;
|
|
658
|
-
},
|
|
659
|
-
set disposed(e) {
|
|
660
|
-
A = e;
|
|
661
|
-
},
|
|
662
|
-
get suppressViewEmit() {
|
|
663
|
-
return j;
|
|
664
|
-
},
|
|
665
|
-
set suppressViewEmit(e) {
|
|
666
|
-
j = e;
|
|
667
|
-
},
|
|
668
|
-
interactiveLayers: M,
|
|
669
|
-
getViewOptions: N,
|
|
670
|
-
emitCurrentView: P,
|
|
671
|
-
setView: ce,
|
|
672
|
-
applyMapConstraints: F,
|
|
673
|
-
applicationsLayersReady: I,
|
|
674
|
-
applyStatusFilter: L,
|
|
675
|
-
applyApplicationsAppearance: z,
|
|
676
|
-
replaceBasemap: B,
|
|
677
|
-
ensureApplicationsLayers: fe,
|
|
678
|
-
overlayPercent: V,
|
|
679
|
-
paintOverlayOpacities: U,
|
|
680
|
-
ensureOverlayLayers: W,
|
|
681
|
-
readyOverlaySources: G,
|
|
682
|
-
handleSourceData: K,
|
|
683
|
-
handleOverlayError: q,
|
|
684
|
-
ensureMapLayers: J,
|
|
685
|
-
featureTarget: Y,
|
|
686
|
-
clearHoverState: X,
|
|
687
|
-
setHoveredFeatures: Z,
|
|
688
|
-
applySelection: pe,
|
|
689
|
-
featureIdsAt: Q,
|
|
690
|
-
toMapPoint: me,
|
|
691
|
-
identifyCacheKey: he,
|
|
692
|
-
rememberIdentify: ge,
|
|
693
|
-
cancelHoverRequest: _e,
|
|
694
|
-
handleMouseMove: ve,
|
|
695
|
-
handleClick: ye,
|
|
696
|
-
initMap: be,
|
|
697
|
-
setupMap: xe,
|
|
698
|
-
zoomIn: Se,
|
|
699
|
-
zoomOut: Ce,
|
|
700
|
-
resetView: we,
|
|
701
|
-
overlaySourceReady: Te,
|
|
702
|
-
zoomToOverlay: Ee,
|
|
703
|
-
fitApplicationGeometry: Oe,
|
|
704
|
-
reloadOverlay: ke
|
|
705
|
-
};
|
|
706
|
-
return Object.defineProperty(je, "__isScriptSetup", {
|
|
707
|
-
enumerable: !1,
|
|
708
|
-
value: !0
|
|
709
|
-
}), je;
|
|
710
|
-
}
|
|
711
|
-
}), Je = {
|
|
712
|
-
ref: "containerRef",
|
|
713
|
-
class: "absolute inset-0 h-full w-full"
|
|
714
|
-
}, Ye = {
|
|
715
|
-
key: 0,
|
|
716
|
-
class: "absolute inset-0 z-[5] flex items-center justify-center bg-white/90 px-4 text-center text-sm text-red-600"
|
|
717
|
-
};
|
|
718
|
-
function Xe(e, t, n, r, i, a) {
|
|
719
|
-
return L(), A(E, null, [j("div", Je, null, 512), r.mapLoadError ? (L(), A("p", Ye, B(r.mapLoadError), 1)) : k("", !0)], 64);
|
|
720
|
-
}
|
|
721
|
-
var Ze = /*#__PURE__*/ e(qe, [
|
|
722
|
-
["render", Xe],
|
|
723
|
-
["__scopeId", "data-v-ea235a7a"],
|
|
724
|
-
["__file", "C:/softpro/surveyor/admin/src/pages/map/components/MapView.vue"]
|
|
725
|
-
]), Qe = 4, $e = 208, et = /*@__PURE__*/ P({
|
|
726
|
-
__name: "MapFilterSelect",
|
|
727
|
-
props: {
|
|
728
|
-
modelValue: {
|
|
729
|
-
type: Array,
|
|
730
|
-
required: !0
|
|
731
|
-
},
|
|
732
|
-
options: {
|
|
733
|
-
type: Array,
|
|
734
|
-
required: !0
|
|
735
|
-
},
|
|
736
|
-
label: {
|
|
737
|
-
type: String,
|
|
738
|
-
required: !0
|
|
739
|
-
}
|
|
740
|
-
},
|
|
741
|
-
emits: ["update:modelValue"],
|
|
742
|
-
setup(e, { expose: t, emit: n }) {
|
|
743
|
-
t();
|
|
744
|
-
let r = e, i = n, a = R(!1), s = R(null), c = fe("buttonRef"), l = fe("menuRef"), u = D(() => r.modelValue.length ? r.modelValue.map((e) => r.options.find((t) => t.value === e)?.label ?? e).join(", ") : "Усі значення");
|
|
745
|
-
function d() {
|
|
746
|
-
let e = c.value?.getBoundingClientRect();
|
|
747
|
-
if (!e) return;
|
|
748
|
-
let t = window.innerHeight - e.bottom - Qe - 8;
|
|
749
|
-
s.value = {
|
|
750
|
-
top: `${e.bottom + Qe}px`,
|
|
751
|
-
left: `${e.left}px`,
|
|
752
|
-
width: `${e.width}px`,
|
|
753
|
-
maxHeight: `${Math.max(Math.min($e, t), 80)}px`
|
|
754
|
-
};
|
|
755
|
-
}
|
|
756
|
-
function f(e) {
|
|
757
|
-
let t = e.target;
|
|
758
|
-
c.value?.contains(t) || l.value?.contains(t) || (a.value = !1);
|
|
759
|
-
}
|
|
760
|
-
function p(e) {
|
|
761
|
-
e.key === "Escape" && (a.value = !1);
|
|
762
|
-
}
|
|
763
|
-
function m() {
|
|
764
|
-
window.removeEventListener("resize", d), window.removeEventListener("scroll", d, !0), document.removeEventListener("pointerdown", f), document.removeEventListener("keydown", p);
|
|
765
|
-
}
|
|
766
|
-
function h(e) {
|
|
767
|
-
if (!e) {
|
|
768
|
-
i("update:modelValue", []);
|
|
769
|
-
return;
|
|
770
|
-
}
|
|
771
|
-
let t = new Set(r.modelValue);
|
|
772
|
-
t.has(e) ? t.delete(e) : t.add(e), i("update:modelValue", [...t]);
|
|
773
|
-
}
|
|
774
|
-
H(a, async (e) => {
|
|
775
|
-
if (m(), !e) {
|
|
776
|
-
s.value = null;
|
|
777
|
-
return;
|
|
778
|
-
}
|
|
779
|
-
await ce(), d(), window.addEventListener("resize", d), window.addEventListener("scroll", d, !0), document.addEventListener("pointerdown", f), document.addEventListener("keydown", p);
|
|
780
|
-
}), ue(m);
|
|
781
|
-
let g = {
|
|
782
|
-
props: r,
|
|
783
|
-
emit: i,
|
|
784
|
-
MENU_GAP: Qe,
|
|
785
|
-
MENU_MAX_HEIGHT: $e,
|
|
786
|
-
open: a,
|
|
787
|
-
menuStyle: s,
|
|
788
|
-
buttonRef: c,
|
|
789
|
-
menuRef: l,
|
|
790
|
-
selectedLabel: u,
|
|
791
|
-
updateMenuPosition: d,
|
|
792
|
-
handleOutsidePointer: f,
|
|
793
|
-
handleEscape: p,
|
|
794
|
-
detachListeners: m,
|
|
795
|
-
toggle: h,
|
|
796
|
-
SurveyorTeleport: o,
|
|
797
|
-
get Check() {
|
|
798
|
-
return X;
|
|
799
|
-
},
|
|
800
|
-
get ChevronDown() {
|
|
801
|
-
return Z;
|
|
802
|
-
}
|
|
803
|
-
};
|
|
804
|
-
return Object.defineProperty(g, "__isScriptSetup", {
|
|
805
|
-
enumerable: !1,
|
|
806
|
-
value: !0
|
|
807
|
-
}), g;
|
|
808
|
-
}
|
|
809
|
-
}), tt = ["aria-expanded", "aria-label"], nt = { class: "min-w-0 truncate" }, rt = ["aria-label"], it = ["aria-selected"], at = ["aria-selected", "onClick"], ot = { class: "min-w-0 truncate" };
|
|
810
|
-
function st(e, t, n, r, i, a) {
|
|
811
|
-
return L(), A(E, null, [j("button", {
|
|
812
|
-
ref: "buttonRef",
|
|
813
|
-
type: "button",
|
|
814
|
-
"data-map-filter-ui": "",
|
|
815
|
-
"aria-expanded": r.open,
|
|
816
|
-
"aria-label": n.label,
|
|
817
|
-
class: F(["flex h-9 w-full items-center justify-between gap-2 rounded-lg border bg-white px-2.5 text-left text-xs text-slate-700 outline-none transition-colors focus:border-brand-400 focus:ring-1 focus:ring-brand-100", r.open ? "border-brand-400 ring-1 ring-brand-100" : "border-slate-200"]),
|
|
818
|
-
onClick: t[0] ||= (e) => r.open = !r.open
|
|
819
|
-
}, [j("span", nt, B(r.selectedLabel), 1), N(r.ChevronDown, { class: F(["h-3.5 w-3.5 shrink-0 text-slate-400 transition-transform", r.open ? "rotate-180" : ""]) }, null, 8, ["class"])], 10, tt), N(r.SurveyorTeleport, null, {
|
|
820
|
-
default: U(() => [r.open && r.menuStyle ? (L(), A("div", {
|
|
821
|
-
key: 0,
|
|
822
|
-
ref: "menuRef",
|
|
823
|
-
"data-map-filter-ui": "",
|
|
824
|
-
role: "listbox",
|
|
825
|
-
"aria-multiselectable": "true",
|
|
826
|
-
"aria-label": n.label,
|
|
827
|
-
class: "fixed z-[80] overflow-y-auto rounded-lg border border-slate-200 bg-white py-1 shadow-xl",
|
|
828
|
-
style: I(r.menuStyle)
|
|
829
|
-
}, [j("button", {
|
|
830
|
-
type: "button",
|
|
831
|
-
role: "option",
|
|
832
|
-
"aria-selected": !n.modelValue.length,
|
|
833
|
-
class: F(["flex w-full items-center gap-2 px-2.5 py-2 text-left text-xs transition-colors hover:bg-slate-50", n.modelValue.length ? "text-slate-700" : "bg-brand-50 font-medium text-brand-700"]),
|
|
834
|
-
onClick: t[1] ||= (e) => r.toggle("")
|
|
835
|
-
}, [j("span", { class: F(["flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded border", n.modelValue.length ? "border-slate-300 bg-white" : "border-brand-600 bg-brand-600 text-white"]) }, [n.modelValue.length ? k("", !0) : (L(), O(r.Check, {
|
|
836
|
-
key: 0,
|
|
837
|
-
class: "h-2.5 w-2.5"
|
|
838
|
-
}))], 2), t[2] ||= j("span", { class: "min-w-0 truncate" }, "Усі значення", -1)], 10, it), (L(!0), A(E, null, z(n.options, (e) => (L(), A("button", {
|
|
839
|
-
key: e.value,
|
|
840
|
-
type: "button",
|
|
841
|
-
role: "option",
|
|
842
|
-
"aria-selected": n.modelValue.includes(e.value),
|
|
843
|
-
class: F(["flex w-full items-center gap-2 px-2.5 py-2 text-left text-xs transition-colors hover:bg-slate-50", n.modelValue.includes(e.value) ? "bg-brand-50 font-medium text-brand-700" : "text-slate-700"]),
|
|
844
|
-
onClick: (t) => r.toggle(e.value)
|
|
845
|
-
}, [j("span", { class: F(["flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded border", n.modelValue.includes(e.value) ? "border-brand-600 bg-brand-600 text-white" : "border-slate-300 bg-white"]) }, [n.modelValue.includes(e.value) ? (L(), O(r.Check, {
|
|
846
|
-
key: 0,
|
|
847
|
-
class: "h-2.5 w-2.5"
|
|
848
|
-
})) : k("", !0)], 2), j("span", ot, B(e.label), 1)], 10, at))), 128))], 12, rt)) : k("", !0)]),
|
|
849
|
-
_: 1
|
|
850
|
-
})], 64);
|
|
851
|
-
}
|
|
852
|
-
var ct = /*#__PURE__*/ e(et, [["render", st], ["__file", "C:/softpro/surveyor/admin/src/pages/map/components/MapFilterSelect.vue"]]), lt = 208, ut = 182, dt = 12, ft = /*@__PURE__*/ P({
|
|
853
|
-
__name: "OverlayLayerRow",
|
|
854
|
-
props: {
|
|
855
|
-
layer: {
|
|
856
|
-
type: Object,
|
|
857
|
-
required: !0
|
|
858
|
-
},
|
|
859
|
-
visible: {
|
|
860
|
-
type: Boolean,
|
|
861
|
-
required: !0
|
|
862
|
-
},
|
|
863
|
-
opacity: {
|
|
864
|
-
type: Number,
|
|
865
|
-
required: !0
|
|
866
|
-
},
|
|
867
|
-
mapZoom: {
|
|
868
|
-
type: Number,
|
|
869
|
-
required: !0
|
|
870
|
-
},
|
|
871
|
-
loadState: {
|
|
872
|
-
type: String,
|
|
873
|
-
required: !1
|
|
874
|
-
},
|
|
875
|
-
menuOpen: {
|
|
876
|
-
type: Boolean,
|
|
877
|
-
required: !0
|
|
878
|
-
},
|
|
879
|
-
legendOpen: {
|
|
880
|
-
type: Boolean,
|
|
881
|
-
required: !0
|
|
882
|
-
}
|
|
883
|
-
},
|
|
884
|
-
emits: [
|
|
885
|
-
"toggle",
|
|
886
|
-
"update:opacity",
|
|
887
|
-
"zoom",
|
|
888
|
-
"toggleMenu",
|
|
889
|
-
"closeMenu",
|
|
890
|
-
"toggleLegend",
|
|
891
|
-
"retry"
|
|
892
|
-
],
|
|
893
|
-
setup(e, { expose: t, emit: n }) {
|
|
894
|
-
t();
|
|
895
|
-
let r = e, i = n, a = fe("menuButtonRef"), s = fe("menuRef"), u = R(null), d = D(() => f(r.layer)), p = D(() => l(r.layer)), m = D(() => r.layer.legendLabel || r.layer.label), h = D(() => c(r.layer) ? d.value != null && r.mapZoom < d.value ? "unavailable" : r.loadState ?? "ready" : "missing"), g = D(() => h.value === "missing" || h.value === "unavailable" && !r.visible), _ = D(() => c(r.layer)), v = D(() => h.value === "missing" || h.value === "unavailable"), y = D(() => {
|
|
896
|
-
let e = d.value;
|
|
897
|
-
return e == null ? "" : `Доступний з ${Number.isInteger(e) ? String(e) : e.toFixed(1)} масштабу`;
|
|
898
|
-
}), b = D(() => {
|
|
899
|
-
let e = p.value ?? "#94a3b8";
|
|
900
|
-
return {
|
|
901
|
-
backgroundColor: `color-mix(in srgb, ${e} 22%, white)`,
|
|
902
|
-
borderColor: e
|
|
903
|
-
};
|
|
904
|
-
});
|
|
905
|
-
function x() {
|
|
906
|
-
let e = a.value?.getBoundingClientRect();
|
|
907
|
-
if (!e) return;
|
|
908
|
-
let t = e.right + dt + lt <= window.innerWidth - 8 ? e.right + dt : Math.max(8, e.left - lt - dt), n = Math.min(Math.max(8, e.top - 12), window.innerHeight - ut - 8);
|
|
909
|
-
u.value = {
|
|
910
|
-
top: n,
|
|
911
|
-
left: t
|
|
912
|
-
};
|
|
913
|
-
}
|
|
914
|
-
function ee(e) {
|
|
915
|
-
let t = e.target;
|
|
916
|
-
t instanceof Node && (s.value?.contains(t) || a.value?.contains(t) || i("closeMenu"));
|
|
917
|
-
}
|
|
918
|
-
function te(e) {
|
|
919
|
-
e.key === "Escape" && i("closeMenu");
|
|
920
|
-
}
|
|
921
|
-
function S() {
|
|
922
|
-
window.removeEventListener("resize", x), window.removeEventListener("scroll", x, !0), document.removeEventListener("pointerdown", ee), document.removeEventListener("keydown", te);
|
|
923
|
-
}
|
|
924
|
-
H(() => r.menuOpen, async (e) => {
|
|
925
|
-
if (S(), !e) {
|
|
926
|
-
u.value = null;
|
|
927
|
-
return;
|
|
928
|
-
}
|
|
929
|
-
await ce(), x(), window.addEventListener("resize", x), window.addEventListener("scroll", x, !0), document.addEventListener("pointerdown", ee), document.addEventListener("keydown", te);
|
|
930
|
-
}), ue(S);
|
|
931
|
-
function ne(e) {
|
|
932
|
-
i("update:opacity", Number(e.target.value));
|
|
933
|
-
}
|
|
934
|
-
let re = {
|
|
935
|
-
MENU_WIDTH: lt,
|
|
936
|
-
MENU_HEIGHT: ut,
|
|
937
|
-
MENU_GAP: dt,
|
|
938
|
-
props: r,
|
|
939
|
-
emit: i,
|
|
940
|
-
menuButtonRef: a,
|
|
941
|
-
menuRef: s,
|
|
942
|
-
menuPosition: u,
|
|
943
|
-
minZoom: d,
|
|
944
|
-
legendColor: p,
|
|
945
|
-
legendText: m,
|
|
946
|
-
status: h,
|
|
947
|
-
toggleDisabled: g,
|
|
948
|
-
canZoom: _,
|
|
949
|
-
faded: v,
|
|
950
|
-
zoomText: y,
|
|
951
|
-
swatchStyle: b,
|
|
952
|
-
updateMenuPosition: x,
|
|
953
|
-
handleOutsidePointer: ee,
|
|
954
|
-
handleEscape: te,
|
|
955
|
-
detachMenuListeners: S,
|
|
956
|
-
onOpacityInput: ne,
|
|
957
|
-
SurveyorTeleport: o,
|
|
958
|
-
get AlertTriangle() {
|
|
959
|
-
return Y;
|
|
960
|
-
},
|
|
961
|
-
get GripVertical() {
|
|
962
|
-
return me;
|
|
963
|
-
},
|
|
964
|
-
get Loader2() {
|
|
965
|
-
return ge;
|
|
966
|
-
},
|
|
967
|
-
get MapIcon() {
|
|
968
|
-
return _e;
|
|
969
|
-
},
|
|
970
|
-
get MoreHorizontal() {
|
|
971
|
-
return ye;
|
|
972
|
-
},
|
|
973
|
-
get ZoomIn() {
|
|
974
|
-
return Te;
|
|
975
|
-
}
|
|
976
|
-
};
|
|
977
|
-
return Object.defineProperty(re, "__isScriptSetup", {
|
|
978
|
-
enumerable: !1,
|
|
979
|
-
value: !0
|
|
980
|
-
}), re;
|
|
981
|
-
}
|
|
982
|
-
}), pt = { class: "flex items-center gap-2.5" }, mt = [
|
|
983
|
-
"aria-checked",
|
|
984
|
-
"aria-label",
|
|
985
|
-
"disabled"
|
|
986
|
-
], ht = { class: "min-w-0 flex-1" }, gt = ["title"], _t = {
|
|
987
|
-
key: 0,
|
|
988
|
-
class: "mt-0.5 flex items-center gap-1 text-[10px] text-amber-600"
|
|
989
|
-
}, vt = {
|
|
990
|
-
key: 1,
|
|
991
|
-
class: "mt-0.5 flex items-center gap-1 text-[10px] text-amber-600"
|
|
992
|
-
}, yt = {
|
|
993
|
-
key: 2,
|
|
994
|
-
class: "mt-0.5 flex items-center gap-1 text-[10px] text-brand-600"
|
|
995
|
-
}, bt = {
|
|
996
|
-
key: 3,
|
|
997
|
-
class: "mt-0.5 flex items-center gap-1 text-[10px] text-red-600"
|
|
998
|
-
}, xt = {
|
|
999
|
-
key: 4,
|
|
1000
|
-
class: "block text-[11px] text-slate-400"
|
|
1001
|
-
}, St = ["aria-expanded", "aria-label"], Ct = { class: "mb-2 flex items-center justify-between text-xs font-semibold text-slate-600" }, wt = { class: "tabular-nums text-slate-400" }, Tt = ["value", "aria-label"], Et = ["disabled", "title"], Dt = {
|
|
1002
|
-
key: 0,
|
|
1003
|
-
class: "mt-2 rounded-lg border border-slate-100 bg-slate-50 px-3 py-2 text-[11px] text-slate-600"
|
|
1004
|
-
}, Ot = { class: "flex items-center gap-2" };
|
|
1005
|
-
function kt(e, t, n, r, i, a) {
|
|
1006
|
-
return L(), A("div", { class: F(["relative rounded-xl border border-slate-200 px-3 py-2.5 transition-colors", [n.visible ? "bg-white" : "bg-slate-50", r.faded ? "opacity-65" : ""]]) }, [
|
|
1007
|
-
j("div", pt, [
|
|
1008
|
-
N(r.GripVertical, {
|
|
1009
|
-
class: "h-4 w-4 shrink-0 text-slate-300",
|
|
1010
|
-
"aria-hidden": "true"
|
|
1011
|
-
}),
|
|
1012
|
-
j("button", {
|
|
1013
|
-
type: "button",
|
|
1014
|
-
role: "switch",
|
|
1015
|
-
"aria-checked": n.visible,
|
|
1016
|
-
"aria-label": `Показати шар ${n.layer.label}`,
|
|
1017
|
-
disabled: r.toggleDisabled,
|
|
1018
|
-
class: F(["relative h-5 w-9 shrink-0 rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-brand-200 focus:ring-offset-1 disabled:cursor-not-allowed", n.visible ? "bg-brand-600" : "bg-slate-200"]),
|
|
1019
|
-
onClick: t[0] ||= (e) => r.emit("toggle")
|
|
1020
|
-
}, [j("span", { class: F(["absolute left-0.5 top-0.5 h-4 w-4 rounded-full bg-white shadow-sm transition-transform", n.visible ? "translate-x-4" : ""]) }, null, 2)], 10, mt),
|
|
1021
|
-
j("span", {
|
|
1022
|
-
class: "h-2.5 w-8 shrink-0 rounded-sm border",
|
|
1023
|
-
style: I(r.swatchStyle),
|
|
1024
|
-
"aria-hidden": "true"
|
|
1025
|
-
}, null, 4),
|
|
1026
|
-
j("div", ht, [j("span", {
|
|
1027
|
-
class: "block truncate text-sm font-medium text-slate-700",
|
|
1028
|
-
title: n.layer.label
|
|
1029
|
-
}, B(n.layer.label), 9, gt), r.status === "unavailable" ? (L(), A("span", _t, [N(r.AlertTriangle, { class: "h-3 w-3 shrink-0" }), M(" " + B(r.zoomText), 1)])) : r.status === "missing" ? (L(), A("span", vt, [N(r.AlertTriangle, { class: "h-3 w-3 shrink-0" }), t[5] ||= M(" Джерело не налаштовано ", -1)])) : r.status === "loading" ? (L(), A("span", yt, [N(r.Loader2, { class: "h-3 w-3 shrink-0 animate-spin" }), t[6] ||= M(" Завантаження шару… ", -1)])) : r.status === "error" ? (L(), A("span", bt, [N(r.AlertTriangle, { class: "h-3 w-3 shrink-0" }), t[7] ||= M(" Помилка завантаження ", -1)])) : (L(), A("span", xt, B(n.opacity) + "% прозорості", 1))]),
|
|
1030
|
-
r.status === "error" ? (L(), A("button", {
|
|
1031
|
-
key: 0,
|
|
1032
|
-
type: "button",
|
|
1033
|
-
class: "rounded-md px-1.5 py-1 text-[10px] font-semibold text-red-700 hover:bg-red-50 focus:outline-none focus:ring-2 focus:ring-red-200",
|
|
1034
|
-
onClick: t[1] ||= (e) => r.emit("retry")
|
|
1035
|
-
}, " Повторити ")) : k("", !0),
|
|
1036
|
-
j("button", {
|
|
1037
|
-
ref: "menuButtonRef",
|
|
1038
|
-
type: "button",
|
|
1039
|
-
"aria-expanded": n.menuOpen,
|
|
1040
|
-
"aria-label": `Меню шару ${n.layer.label}`,
|
|
1041
|
-
class: "rounded-md p-1.5 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-700 focus:outline-none focus:ring-2 focus:ring-brand-200",
|
|
1042
|
-
onClick: t[2] ||= (e) => r.emit("toggleMenu")
|
|
1043
|
-
}, [N(r.MoreHorizontal, { class: "h-4 w-4" })], 8, St)
|
|
1044
|
-
]),
|
|
1045
|
-
N(r.SurveyorTeleport, null, {
|
|
1046
|
-
default: U(() => [n.menuOpen && r.menuPosition ? (L(), A("div", {
|
|
1047
|
-
key: 0,
|
|
1048
|
-
ref: "menuRef",
|
|
1049
|
-
role: "menu",
|
|
1050
|
-
class: "fixed z-[70] w-52 rounded-xl border border-slate-200 bg-white p-3 shadow-xl",
|
|
1051
|
-
style: I({
|
|
1052
|
-
top: `${r.menuPosition.top}px`,
|
|
1053
|
-
left: `${r.menuPosition.left}px`
|
|
1054
|
-
})
|
|
1055
|
-
}, [
|
|
1056
|
-
j("div", Ct, [t[8] ||= j("span", null, "Прозорість", -1), j("span", wt, B(n.opacity) + "%", 1)]),
|
|
1057
|
-
j("input", {
|
|
1058
|
-
type: "range",
|
|
1059
|
-
min: "0",
|
|
1060
|
-
max: "100",
|
|
1061
|
-
value: n.opacity,
|
|
1062
|
-
"aria-label": `Прозорість шару ${n.layer.label}`,
|
|
1063
|
-
class: "mb-3 w-full accent-brand-600",
|
|
1064
|
-
onInput: r.onOpacityInput
|
|
1065
|
-
}, null, 40, Tt),
|
|
1066
|
-
j("button", {
|
|
1067
|
-
type: "button",
|
|
1068
|
-
disabled: !r.canZoom,
|
|
1069
|
-
title: r.canZoom ? void 0 : "Немає геометрії шару",
|
|
1070
|
-
class: "flex w-full items-center gap-2 rounded-lg px-2 py-2 text-left text-xs text-slate-600 hover:bg-slate-50 focus:outline-none focus:ring-2 focus:ring-brand-200 disabled:cursor-not-allowed disabled:text-slate-300 disabled:hover:bg-transparent",
|
|
1071
|
-
onClick: t[3] ||= (e) => r.emit("zoom")
|
|
1072
|
-
}, [N(r.ZoomIn, { class: F(["h-3.5 w-3.5", r.canZoom ? "text-slate-400" : "text-slate-300"]) }, null, 8, ["class"]), t[9] ||= M(" Наблизити до шару ", -1)], 8, Et),
|
|
1073
|
-
j("button", {
|
|
1074
|
-
type: "button",
|
|
1075
|
-
class: "flex w-full items-center gap-2 rounded-lg px-2 py-2 text-left text-xs text-slate-600 hover:bg-slate-50 focus:outline-none focus:ring-2 focus:ring-brand-200",
|
|
1076
|
-
onClick: t[4] ||= (e) => r.emit("toggleLegend")
|
|
1077
|
-
}, [N(r.MapIcon, { class: "h-3.5 w-3.5 text-slate-400" }), t[10] ||= M(" Переглянути легенду ", -1)])
|
|
1078
|
-
], 4)) : k("", !0)]),
|
|
1079
|
-
_: 1
|
|
1080
|
-
}),
|
|
1081
|
-
n.legendOpen ? (L(), A("div", Dt, [t[11] ||= j("div", { class: "mb-1 font-semibold text-slate-700" }, "Легенда шару", -1), j("div", Ot, [j("span", {
|
|
1082
|
-
class: "h-2.5 w-7 rounded-sm",
|
|
1083
|
-
style: I({ backgroundColor: r.legendColor ?? "#94a3b8" })
|
|
1084
|
-
}, null, 4), M(" " + B(r.legendText), 1)])])) : k("", !0)
|
|
1085
|
-
], 2);
|
|
1086
|
-
}
|
|
1087
|
-
var At = /*#__PURE__*/ e(ft, [["render", kt], ["__file", "C:/softpro/surveyor/admin/src/pages/map/components/OverlayLayerRow.vue"]]), jt = T.items.map((e) => ({
|
|
1088
|
-
code: e.code,
|
|
1089
|
-
label: e.name
|
|
1090
|
-
})), Mt = Object.fromEntries(T.items.map((e) => [e.code, e.name])), Nt = Object.entries(_).map(([e, t]) => ({
|
|
1091
|
-
key: e,
|
|
1092
|
-
label: t,
|
|
1093
|
-
color: h[e] ?? "#64748b"
|
|
1094
|
-
})), Pt = "Звернення на видачу вихідних даних", Ft = 208, It = 96, Lt = 12, Rt = /*@__PURE__*/ P({
|
|
1095
|
-
__name: "MapLayersPanel",
|
|
1096
|
-
props: {
|
|
1097
|
-
searchQuery: {
|
|
1098
|
-
type: String,
|
|
1099
|
-
required: !0
|
|
1100
|
-
},
|
|
1101
|
-
filters: {
|
|
1102
|
-
type: Object,
|
|
1103
|
-
required: !0
|
|
1104
|
-
},
|
|
1105
|
-
visibleStatuses: {
|
|
1106
|
-
type: Set,
|
|
1107
|
-
required: !0
|
|
1108
|
-
},
|
|
1109
|
-
statusCounts: {
|
|
1110
|
-
type: Object,
|
|
1111
|
-
required: !0
|
|
1112
|
-
},
|
|
1113
|
-
totalCount: {
|
|
1114
|
-
type: Number,
|
|
1115
|
-
required: !0
|
|
1116
|
-
},
|
|
1117
|
-
basemapId: {
|
|
1118
|
-
type: String,
|
|
1119
|
-
required: !0
|
|
1120
|
-
},
|
|
1121
|
-
baseLayers: {
|
|
1122
|
-
type: Array,
|
|
1123
|
-
required: !0
|
|
1124
|
-
},
|
|
1125
|
-
overlays: {
|
|
1126
|
-
type: Array,
|
|
1127
|
-
required: !0
|
|
1128
|
-
},
|
|
1129
|
-
activeOverlayIds: {
|
|
1130
|
-
type: Array,
|
|
1131
|
-
required: !0
|
|
1132
|
-
},
|
|
1133
|
-
overlayOpacities: {
|
|
1134
|
-
type: Object,
|
|
1135
|
-
required: !0
|
|
1136
|
-
},
|
|
1137
|
-
overlayLoad: {
|
|
1138
|
-
type: Object,
|
|
1139
|
-
required: !0
|
|
1140
|
-
},
|
|
1141
|
-
mapZoom: {
|
|
1142
|
-
type: Number,
|
|
1143
|
-
required: !0
|
|
1144
|
-
},
|
|
1145
|
-
applicationsName: {
|
|
1146
|
-
type: String,
|
|
1147
|
-
required: !1
|
|
1148
|
-
},
|
|
1149
|
-
applicationsVisible: {
|
|
1150
|
-
type: Boolean,
|
|
1151
|
-
required: !0
|
|
1152
|
-
},
|
|
1153
|
-
applicationsOpacity: {
|
|
1154
|
-
type: Number,
|
|
1155
|
-
required: !0
|
|
1156
|
-
},
|
|
1157
|
-
searchLoading: {
|
|
1158
|
-
type: Boolean,
|
|
1159
|
-
required: !1
|
|
1160
|
-
},
|
|
1161
|
-
searchResults: {
|
|
1162
|
-
type: Array,
|
|
1163
|
-
required: !1
|
|
1164
|
-
},
|
|
1165
|
-
searchEmpty: {
|
|
1166
|
-
type: Boolean,
|
|
1167
|
-
required: !1
|
|
1168
|
-
},
|
|
1169
|
-
searchError: {
|
|
1170
|
-
type: String,
|
|
1171
|
-
required: !1
|
|
1172
|
-
}
|
|
1173
|
-
},
|
|
1174
|
-
emits: [
|
|
1175
|
-
"update:searchQuery",
|
|
1176
|
-
"update:filters",
|
|
1177
|
-
"update:applicationsVisible",
|
|
1178
|
-
"update:applicationsOpacity",
|
|
1179
|
-
"toggleStatus",
|
|
1180
|
-
"selectAllStatuses",
|
|
1181
|
-
"clearStatuses",
|
|
1182
|
-
"basemapChange",
|
|
1183
|
-
"toggleOverlay",
|
|
1184
|
-
"overlayOpacity",
|
|
1185
|
-
"zoomToOverlay",
|
|
1186
|
-
"retryOverlay",
|
|
1187
|
-
"selectSearchResult"
|
|
1188
|
-
],
|
|
1189
|
-
setup(e, { expose: t, emit: n }) {
|
|
1190
|
-
t();
|
|
1191
|
-
let r = {
|
|
1192
|
-
dateFrom: "Від",
|
|
1193
|
-
dateTo: "До",
|
|
1194
|
-
workType: "Вид робіт",
|
|
1195
|
-
verifiedBy: "Перевірив",
|
|
1196
|
-
organization: "Організація",
|
|
1197
|
-
address: "Адреса"
|
|
1198
|
-
}, i = e, a = n, s = R(!1), l = R(!0), f = R(!0), p = R(!1), m = R(!1), h = R({}), g = R(!1), _ = R(null), v = fe("menuButtonRef"), y = fe("menuRef"), b = R(null), x = R(null), ee = R(null), te = D({
|
|
1199
|
-
get: () => i.searchQuery,
|
|
1200
|
-
set: (e) => a("update:searchQuery", e)
|
|
1201
|
-
}), S = D(() => !!i.searchQuery.trim() && (i.searchLoading || i.searchError || i.searchEmpty || (i.searchResults?.length ?? 0) > 0)), ne = D(() => i.applicationsName || Pt), re = D(() => +!!i.applicationsVisible + i.overlays.filter((e) => i.activeOverlayIds.includes(e.id)).length), C = D(() => i.baseLayers.find((e) => e.id === i.basemapId) ?? i.baseLayers[0]), ie = D(() => Nt.filter((e) => i.visibleStatuses.has(e.key)).reduce((e, t) => e + (i.statusCounts[t.key] ?? 0), 0));
|
|
1202
|
-
function ae(e) {
|
|
1203
|
-
let t = i.statusCounts[e] ?? 0;
|
|
1204
|
-
return ie.value > 0 && i.visibleStatuses.has(e) ? Math.round(t / ie.value * 100) : 0;
|
|
1205
|
-
}
|
|
1206
|
-
function w(e) {
|
|
1207
|
-
return e.toLocaleString("uk-UA");
|
|
1208
|
-
}
|
|
1209
|
-
let oe = D(() => Object.keys(r).filter((e) => {
|
|
1210
|
-
let t = i.filters[e];
|
|
1211
|
-
return Array.isArray(t) ? t.length > 0 : !!t;
|
|
1212
|
-
}).map((e) => ({
|
|
1213
|
-
key: e,
|
|
1214
|
-
label: `${r[e]}: ${E(e, i.filters[e] ?? "")}`
|
|
1215
|
-
}))), se = D(() => oe.value.length), T = D(() => !!(h.value.dateFrom && h.value.dateTo && h.value.dateFrom > h.value.dateTo));
|
|
1216
|
-
function E(e, t) {
|
|
1217
|
-
let n = Array.isArray(t) ? t : [t];
|
|
1218
|
-
return e === "workType" ? n.map((e) => Mt[e] ?? e).join(", ") : e === "dateFrom" || e === "dateTo" ? n[0]?.split("-").reverse().join(".") ?? "" : n.join(", ");
|
|
1219
|
-
}
|
|
1220
|
-
function O(e) {
|
|
1221
|
-
let t = {}, n = (e.workType ?? []).map((e) => e.trim()).filter(Boolean);
|
|
1222
|
-
n.length && (t.workType = n);
|
|
1223
|
-
for (let n of [
|
|
1224
|
-
"dateFrom",
|
|
1225
|
-
"dateTo",
|
|
1226
|
-
"verifiedBy",
|
|
1227
|
-
"organization",
|
|
1228
|
-
"address"
|
|
1229
|
-
]) {
|
|
1230
|
-
let r = e[n]?.trim();
|
|
1231
|
-
r && (t[n] = r);
|
|
1232
|
-
}
|
|
1233
|
-
return t;
|
|
1234
|
-
}
|
|
1235
|
-
function k() {
|
|
1236
|
-
return {
|
|
1237
|
-
dateFrom: "",
|
|
1238
|
-
dateTo: "",
|
|
1239
|
-
workType: [],
|
|
1240
|
-
verifiedBy: "",
|
|
1241
|
-
organization: "",
|
|
1242
|
-
address: ""
|
|
1243
|
-
};
|
|
1244
|
-
}
|
|
1245
|
-
function A() {
|
|
1246
|
-
m.value || (h.value = {
|
|
1247
|
-
...k(),
|
|
1248
|
-
...i.filters,
|
|
1249
|
-
workType: [...i.filters.workType ?? []]
|
|
1250
|
-
}), m.value = !m.value;
|
|
1251
|
-
}
|
|
1252
|
-
function j() {
|
|
1253
|
-
T.value || (a("update:filters", O(h.value)), m.value = !1);
|
|
1254
|
-
}
|
|
1255
|
-
function M() {
|
|
1256
|
-
h.value = k(), a("update:filters", {});
|
|
1257
|
-
}
|
|
1258
|
-
function N(e) {
|
|
1259
|
-
let t = { ...i.filters };
|
|
1260
|
-
delete t[e], a("update:filters", t), m.value && (h.value = {
|
|
1261
|
-
...h.value,
|
|
1262
|
-
[e]: e === "workType" ? [] : ""
|
|
1263
|
-
});
|
|
1264
|
-
}
|
|
1265
|
-
function P() {
|
|
1266
|
-
a("update:applicationsVisible", !i.applicationsVisible);
|
|
1267
|
-
}
|
|
1268
|
-
function F() {
|
|
1269
|
-
b.value = null, g.value = !g.value;
|
|
1270
|
-
}
|
|
1271
|
-
function I(e) {
|
|
1272
|
-
return i.overlayOpacities[e.id] ?? Math.round(d(e) * 100);
|
|
1273
|
-
}
|
|
1274
|
-
function le(e) {
|
|
1275
|
-
g.value = !1, b.value = b.value === e ? null : e;
|
|
1276
|
-
}
|
|
1277
|
-
function L(e) {
|
|
1278
|
-
x.value = x.value === e ? null : e;
|
|
1279
|
-
}
|
|
1280
|
-
function z(e) {
|
|
1281
|
-
c(e) && (b.value = null, ee.value = `Карту наближено до шару «${e.label}».`, a("zoomToOverlay", e.id));
|
|
1282
|
-
}
|
|
1283
|
-
function de() {
|
|
1284
|
-
let e = v.value?.getBoundingClientRect();
|
|
1285
|
-
if (!e) return;
|
|
1286
|
-
let t = e.right + Lt + Ft <= window.innerWidth - 8 ? e.right + Lt : Math.max(8, e.left - Ft - Lt), n = Math.min(Math.max(8, e.top - 12), window.innerHeight - It - 8);
|
|
1287
|
-
_.value = {
|
|
1288
|
-
top: n,
|
|
1289
|
-
left: t
|
|
1290
|
-
};
|
|
1291
|
-
}
|
|
1292
|
-
function B(e) {
|
|
1293
|
-
let t = e.target;
|
|
1294
|
-
y.value?.contains(t) || v.value?.contains(t) || (g.value = !1);
|
|
1295
|
-
}
|
|
1296
|
-
function V(e) {
|
|
1297
|
-
e.key === "Escape" && (g.value = !1);
|
|
1298
|
-
}
|
|
1299
|
-
function U() {
|
|
1300
|
-
window.removeEventListener("resize", de), window.removeEventListener("scroll", de, !0), document.removeEventListener("pointerdown", B), document.removeEventListener("keydown", V);
|
|
1301
|
-
}
|
|
1302
|
-
H(g, async (e) => {
|
|
1303
|
-
if (U(), !e) {
|
|
1304
|
-
_.value = null;
|
|
1305
|
-
return;
|
|
1306
|
-
}
|
|
1307
|
-
await ce(), de(), window.addEventListener("resize", de), window.addEventListener("scroll", de, !0), document.addEventListener("pointerdown", B), document.addEventListener("keydown", V);
|
|
1308
|
-
});
|
|
1309
|
-
function W(e) {
|
|
1310
|
-
e.key === "Escape" && (document.querySelector("[data-map-filter-ui][role=\"listbox\"]") || (m.value = !1));
|
|
1311
|
-
}
|
|
1312
|
-
H(m, (e) => {
|
|
1313
|
-
e ? document.addEventListener("keydown", W) : document.removeEventListener("keydown", W);
|
|
1314
|
-
}), H(s, (e) => {
|
|
1315
|
-
e && (g.value = !1, m.value = !1, b.value = null, x.value = null, ee.value = null);
|
|
1316
|
-
}), ue(() => {
|
|
1317
|
-
U(), document.removeEventListener("keydown", W);
|
|
1318
|
-
});
|
|
1319
|
-
let G = {
|
|
1320
|
-
DEFAULT_APPLICATIONS_LAYER_NAME: Pt,
|
|
1321
|
-
MENU_WIDTH: Ft,
|
|
1322
|
-
MENU_HEIGHT: It,
|
|
1323
|
-
MENU_GAP: Lt,
|
|
1324
|
-
FILTER_LABELS: r,
|
|
1325
|
-
props: i,
|
|
1326
|
-
emit: a,
|
|
1327
|
-
collapsed: s,
|
|
1328
|
-
layersOpen: l,
|
|
1329
|
-
applicationsOpen: f,
|
|
1330
|
-
baseOpen: p,
|
|
1331
|
-
filtersOpen: m,
|
|
1332
|
-
draftFilters: h,
|
|
1333
|
-
menuOpen: g,
|
|
1334
|
-
menuPosition: _,
|
|
1335
|
-
menuButtonRef: v,
|
|
1336
|
-
menuRef: y,
|
|
1337
|
-
overlayMenuId: b,
|
|
1338
|
-
legendLayerId: x,
|
|
1339
|
-
layerNotice: ee,
|
|
1340
|
-
searchModel: te,
|
|
1341
|
-
searchDropdownOpen: S,
|
|
1342
|
-
applicationsLayerName: ne,
|
|
1343
|
-
activeLayersCount: re,
|
|
1344
|
-
activeBasemap: C,
|
|
1345
|
-
visibleStatusCount: ie,
|
|
1346
|
-
statusPercent: ae,
|
|
1347
|
-
formatCount: w,
|
|
1348
|
-
activeFilterChips: oe,
|
|
1349
|
-
activeFilterCount: se,
|
|
1350
|
-
dateRangeInvalid: T,
|
|
1351
|
-
filterValueText: E,
|
|
1352
|
-
cleanFilters: O,
|
|
1353
|
-
emptyDraft: k,
|
|
1354
|
-
toggleFilters: A,
|
|
1355
|
-
applyFilters: j,
|
|
1356
|
-
resetFilters: M,
|
|
1357
|
-
removeFilter: N,
|
|
1358
|
-
toggleApplications: P,
|
|
1359
|
-
toggleApplicationsMenu: F,
|
|
1360
|
-
overlayOpacity: I,
|
|
1361
|
-
toggleOverlayMenu: le,
|
|
1362
|
-
toggleLegend: L,
|
|
1363
|
-
zoomToLayer: z,
|
|
1364
|
-
updateMenuPosition: de,
|
|
1365
|
-
handleOutsidePointer: B,
|
|
1366
|
-
handleEscape: V,
|
|
1367
|
-
detachMenuListeners: U,
|
|
1368
|
-
handleFiltersEscape: W,
|
|
1369
|
-
SurveyorTeleport: o,
|
|
1370
|
-
get Check() {
|
|
1371
|
-
return X;
|
|
1372
|
-
},
|
|
1373
|
-
get ChevronDown() {
|
|
1374
|
-
return Z;
|
|
1375
|
-
},
|
|
1376
|
-
get Layers2() {
|
|
1377
|
-
return he;
|
|
1378
|
-
},
|
|
1379
|
-
get MoreHorizontal() {
|
|
1380
|
-
return ye;
|
|
1381
|
-
},
|
|
1382
|
-
get RotateCcw() {
|
|
1383
|
-
return xe;
|
|
1384
|
-
},
|
|
1385
|
-
get Search() {
|
|
1386
|
-
return Se;
|
|
1387
|
-
},
|
|
1388
|
-
get SlidersHorizontal() {
|
|
1389
|
-
return Ce;
|
|
1390
|
-
},
|
|
1391
|
-
get X() {
|
|
1392
|
-
return we;
|
|
1393
|
-
},
|
|
1394
|
-
MapFilterSelect: ct,
|
|
1395
|
-
OverlayLayerRow: At,
|
|
1396
|
-
get WORK_TYPE_OPTIONS() {
|
|
1397
|
-
return jt;
|
|
1398
|
-
},
|
|
1399
|
-
get MAP_LEGEND() {
|
|
1400
|
-
return Nt;
|
|
1401
|
-
},
|
|
1402
|
-
get basemapPreview() {
|
|
1403
|
-
return u;
|
|
1404
|
-
}
|
|
1405
|
-
};
|
|
1406
|
-
return Object.defineProperty(G, "__isScriptSetup", {
|
|
1407
|
-
enumerable: !1,
|
|
1408
|
-
value: !0
|
|
1409
|
-
}), G;
|
|
1410
|
-
}
|
|
1411
|
-
}), zt = { class: "rounded-full bg-brand-50 px-1.5 py-0.5 text-[11px] text-brand-700" }, Bt = {
|
|
1412
|
-
key: 1,
|
|
1413
|
-
class: "absolute inset-x-3 bottom-3 z-30 flex max-h-[calc(100%-6rem)] flex-col overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-[0_16px_50px_rgba(15,23,42,0.18)] xl:inset-x-auto xl:bottom-auto xl:left-4 xl:top-4 xl:max-h-[calc(100%-2rem)] xl:w-[400px]",
|
|
1414
|
-
"aria-label": "Панель шарів карти"
|
|
1415
|
-
}, Vt = { class: "border-b border-slate-100 p-3" }, Ht = { class: "flex items-center gap-2" }, Ut = { class: "relative min-w-0 flex-1" }, Wt = {
|
|
1416
|
-
key: 0,
|
|
1417
|
-
class: "mt-2 max-h-56 overflow-y-auto rounded-lg border border-slate-200 bg-white shadow-sm",
|
|
1418
|
-
role: "listbox",
|
|
1419
|
-
"aria-label": "Результати пошуку"
|
|
1420
|
-
}, Gt = {
|
|
1421
|
-
key: 0,
|
|
1422
|
-
class: "px-3 py-2.5 text-sm text-slate-500"
|
|
1423
|
-
}, Kt = {
|
|
1424
|
-
key: 1,
|
|
1425
|
-
class: "px-3 py-2.5 text-sm text-red-600"
|
|
1426
|
-
}, qt = {
|
|
1427
|
-
key: 2,
|
|
1428
|
-
class: "px-3 py-2.5 text-sm text-slate-500"
|
|
1429
|
-
}, Jt = {
|
|
1430
|
-
key: 3,
|
|
1431
|
-
class: "divide-y divide-slate-100"
|
|
1432
|
-
}, Yt = ["onClick"], Xt = { class: "text-sm font-medium text-slate-800" }, Zt = { class: "line-clamp-2 text-xs text-slate-500" }, Qt = { class: "min-h-0 flex-1 overflow-y-auto px-3 pb-3" }, $t = { class: "flex items-center justify-between pb-2 pt-3" }, en = { class: "text-[11px] text-slate-400" }, tn = {
|
|
1433
|
-
key: 0,
|
|
1434
|
-
class: "max-h-[min(480px,45vh)] space-y-2 overflow-y-auto pr-1"
|
|
1435
|
-
}, nn = { class: "flex items-start gap-2.5 p-3" }, rn = ["aria-checked"], an = ["title"], on = { class: "block truncate text-sm font-semibold text-slate-800" }, sn = { class: "mt-1 flex flex-wrap items-center gap-1.5 text-xs text-slate-500" }, cn = { class: "font-medium tabular-nums text-slate-700" }, ln = {
|
|
1436
|
-
key: 0,
|
|
1437
|
-
class: "rounded-full bg-amber-100 px-1.5 py-0.5 font-medium text-amber-700"
|
|
1438
|
-
}, un = {
|
|
1439
|
-
key: 1,
|
|
1440
|
-
class: "text-slate-400"
|
|
1441
|
-
}, dn = ["aria-expanded"], fn = {
|
|
1442
|
-
key: 0,
|
|
1443
|
-
class: "border-t border-brand-100 px-3 pb-3 pt-2"
|
|
1444
|
-
}, pn = { class: "mb-1 flex items-center justify-between" }, mn = { class: "text-[11px] tabular-nums text-slate-400" }, hn = { class: "space-y-0.5 py-0.5" }, gn = ["title", "onClick"], _n = { class: "min-w-0 flex-1 whitespace-normal break-words text-xs font-medium leading-4 text-slate-700" }, vn = { class: "w-10 shrink-0 pt-0.5 text-right text-xs tabular-nums text-slate-500" }, yn = { class: "w-8 shrink-0 pt-0.5 text-right text-[11px] tabular-nums text-slate-400" }, bn = {
|
|
1445
|
-
key: 0,
|
|
1446
|
-
class: "mt-2 rounded-lg border border-dashed border-slate-200 bg-white px-3 py-3 text-center text-xs text-slate-500"
|
|
1447
|
-
}, xn = { class: "mt-2 flex items-center gap-2 border-t border-brand-100 pt-2" }, Sn = ["aria-expanded"], Cn = {
|
|
1448
|
-
key: 0,
|
|
1449
|
-
class: "rounded-full bg-brand-600 px-1.5 text-[10px] text-white"
|
|
1450
|
-
}, wn = {
|
|
1451
|
-
key: 1,
|
|
1452
|
-
class: "mt-2 flex flex-wrap gap-1.5"
|
|
1453
|
-
}, Tn = ["title", "onClick"], En = { class: "max-w-[150px] truncate" }, Dn = { class: "mt-4 flex items-center justify-between border-t border-slate-100 pb-2 pt-3" }, On = {
|
|
1454
|
-
key: 2,
|
|
1455
|
-
class: "grid grid-cols-2 gap-2"
|
|
1456
|
-
}, kn = ["onClick"], An = ["src", "alt"], jn = ["src", "alt"], Mn = { class: "min-w-0 flex-1" }, Nn = { class: "block text-sm font-semibold text-slate-700" }, Pn = { class: "mb-3 flex items-start justify-between" }, Fn = { class: "grid grid-cols-2 gap-3" }, In = { class: "block" }, Ln = ["max"], Rn = { class: "block" }, zn = ["min"], Bn = {
|
|
1457
|
-
key: 0,
|
|
1458
|
-
class: "col-span-2 -mt-1 text-[11px] text-red-600"
|
|
1459
|
-
}, Vn = { class: "col-span-2 block" }, Hn = { class: "col-span-2 block" }, Un = { class: "col-span-2 block" }, Wn = { class: "col-span-2 block" }, Gn = { class: "mt-4 flex gap-2 border-t border-slate-100 pt-3" }, Kn = ["disabled"], qn = { class: "mb-2 flex items-center justify-between text-xs font-semibold text-slate-600" }, Jn = { class: "tabular-nums text-slate-400" }, Yn = ["value"];
|
|
1460
|
-
function Xn(e, t, n, r, i, a) {
|
|
1461
|
-
return L(), A(E, null, [r.collapsed ? (L(), A("button", {
|
|
1462
|
-
key: 0,
|
|
1463
|
-
type: "button",
|
|
1464
|
-
class: "absolute bottom-4 left-4 z-30 inline-flex items-center gap-2 rounded-xl border border-slate-200 bg-white px-4 py-3 text-sm font-semibold text-slate-700 shadow-card-hover transition-all hover:border-brand-300 hover:text-brand-700 xl:bottom-auto xl:top-4",
|
|
1465
|
-
onClick: t[0] ||= (e) => r.collapsed = !1
|
|
1466
|
-
}, [
|
|
1467
|
-
N(r.Layers2, { class: "h-4 w-4 text-brand-600" }),
|
|
1468
|
-
t[21] ||= M(" Шари ", -1),
|
|
1469
|
-
j("span", zt, B(r.activeLayersCount), 1)
|
|
1470
|
-
])) : (L(), A("section", Bt, [
|
|
1471
|
-
j("div", Vt, [j("div", Ht, [j("label", Ut, [
|
|
1472
|
-
N(r.Search, { class: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400" }),
|
|
1473
|
-
W(j("input", {
|
|
1474
|
-
"onUpdate:modelValue": t[1] ||= (e) => r.searchModel = e,
|
|
1475
|
-
type: "text",
|
|
1476
|
-
autocomplete: "off",
|
|
1477
|
-
placeholder: "Пошук на карті…",
|
|
1478
|
-
class: "h-10 w-full rounded-lg border border-slate-200 bg-slate-50 pl-9 pr-9 text-sm text-slate-700 outline-none transition-colors placeholder:text-slate-400 focus:border-brand-400 focus:bg-white focus:ring-2 focus:ring-brand-100"
|
|
1479
|
-
}, null, 512), [[V, r.searchModel]]),
|
|
1480
|
-
n.searchQuery ? (L(), A("button", {
|
|
1481
|
-
key: 0,
|
|
1482
|
-
type: "button",
|
|
1483
|
-
title: "Очистити пошук",
|
|
1484
|
-
"aria-label": "Очистити пошук",
|
|
1485
|
-
class: "absolute right-2 top-1/2 flex h-6 w-6 -translate-y-1/2 items-center justify-center rounded-md text-slate-400 transition-colors hover:bg-slate-200/60 hover:text-slate-700",
|
|
1486
|
-
onClick: t[2] ||= (e) => r.searchModel = ""
|
|
1487
|
-
}, [N(r.X, { class: "h-3.5 w-3.5" })])) : k("", !0)
|
|
1488
|
-
]), j("button", {
|
|
1489
|
-
type: "button",
|
|
1490
|
-
title: "Згорнути панель шарів",
|
|
1491
|
-
"aria-label": "Згорнути панель шарів",
|
|
1492
|
-
class: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg border border-slate-200 text-slate-500 transition-colors hover:border-brand-300 hover:bg-brand-50 hover:text-brand-700",
|
|
1493
|
-
onClick: t[3] ||= (e) => r.collapsed = !0
|
|
1494
|
-
}, [N(r.X, { class: "h-4 w-4" })])]), r.searchDropdownOpen ? (L(), A("div", Wt, [n.searchLoading ? (L(), A("p", Gt, "Пошук…")) : n.searchError ? (L(), A("p", Kt, B(n.searchError), 1)) : n.searchEmpty ? (L(), A("p", qt, "Нічого не знайдено")) : (L(), A("ul", Jt, [(L(!0), A(E, null, z(n.searchResults, (e) => (L(), A("li", { key: e.id }, [j("button", {
|
|
1495
|
-
type: "button",
|
|
1496
|
-
role: "option",
|
|
1497
|
-
class: "flex w-full flex-col gap-0.5 px-3 py-2.5 text-left transition-colors hover:bg-brand-50",
|
|
1498
|
-
onClick: (t) => r.emit("selectSearchResult", e)
|
|
1499
|
-
}, [j("span", Xt, B(e.number || "Без номера"), 1), j("span", Zt, B(e.address), 1)], 8, Yt)]))), 128))]))])) : k("", !0)]),
|
|
1500
|
-
j("div", Qt, [
|
|
1501
|
-
j("div", $t, [j("button", {
|
|
1502
|
-
type: "button",
|
|
1503
|
-
class: "flex items-center gap-2 text-[11px] font-bold uppercase tracking-[0.12em] text-slate-400",
|
|
1504
|
-
onClick: t[4] ||= (e) => r.layersOpen = !r.layersOpen
|
|
1505
|
-
}, [N(r.ChevronDown, { class: F(["h-3.5 w-3.5 transition-transform", r.layersOpen ? "" : "-rotate-90"]) }, null, 8, ["class"]), t[22] ||= M(" Додаткові шари ", -1)]), j("span", en, B(r.activeLayersCount) + " активні", 1)]),
|
|
1506
|
-
r.layersOpen ? (L(), A("div", tn, [j("div", { class: F(["rounded-xl border transition-colors", n.applicationsVisible ? "border-brand-300 bg-brand-50/40" : "border-slate-200 bg-white"]) }, [j("div", nn, [
|
|
1507
|
-
j("button", {
|
|
1508
|
-
type: "button",
|
|
1509
|
-
role: "switch",
|
|
1510
|
-
"aria-checked": n.applicationsVisible,
|
|
1511
|
-
"aria-label": "Показати звернення",
|
|
1512
|
-
class: F(["relative mt-0.5 h-5 w-9 shrink-0 rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-brand-200 focus:ring-offset-1", n.applicationsVisible ? "bg-brand-600" : "bg-slate-200"]),
|
|
1513
|
-
onClick: r.toggleApplications
|
|
1514
|
-
}, [j("span", { class: F(["absolute left-0.5 top-0.5 h-4 w-4 rounded-full bg-white shadow-sm transition-transform", n.applicationsVisible ? "translate-x-4" : ""]) }, null, 2)], 10, rn),
|
|
1515
|
-
j("button", {
|
|
1516
|
-
type: "button",
|
|
1517
|
-
title: r.applicationsLayerName,
|
|
1518
|
-
class: "min-w-0 flex-1 text-left focus:outline-none",
|
|
1519
|
-
onClick: t[5] ||= (e) => r.applicationsOpen = !r.applicationsOpen
|
|
1520
|
-
}, [j("span", on, B(r.applicationsLayerName), 1), j("span", sn, [
|
|
1521
|
-
j("span", cn, B(r.formatCount(r.visibleStatusCount)), 1),
|
|
1522
|
-
t[23] ||= M(" об'єктів ", -1),
|
|
1523
|
-
r.activeFilterCount > 0 ? (L(), A("span", ln, " фільтри: " + B(r.activeFilterCount), 1)) : k("", !0),
|
|
1524
|
-
n.applicationsOpacity < 100 ? (L(), A("span", un, "· " + B(n.applicationsOpacity) + "% непрозорості", 1)) : k("", !0)
|
|
1525
|
-
])], 8, an),
|
|
1526
|
-
j("button", {
|
|
1527
|
-
ref: "menuButtonRef",
|
|
1528
|
-
type: "button",
|
|
1529
|
-
"aria-expanded": r.menuOpen,
|
|
1530
|
-
"aria-label": "Меню шару звернень",
|
|
1531
|
-
class: "rounded-md p-1 text-slate-400 transition-colors hover:bg-white hover:text-slate-700 focus:outline-none focus:ring-2 focus:ring-brand-200",
|
|
1532
|
-
onClick: r.toggleApplicationsMenu
|
|
1533
|
-
}, [N(r.MoreHorizontal, { class: "h-4 w-4" })], 8, dn),
|
|
1534
|
-
j("button", {
|
|
1535
|
-
type: "button",
|
|
1536
|
-
"aria-label": "Розгорнути фільтри звернень",
|
|
1537
|
-
class: "rounded-md p-1 text-slate-400 transition-colors hover:bg-white hover:text-brand-600",
|
|
1538
|
-
onClick: t[6] ||= (e) => r.applicationsOpen = !r.applicationsOpen
|
|
1539
|
-
}, [N(r.ChevronDown, { class: F(["h-4 w-4 transition-transform", r.applicationsOpen ? "" : "-rotate-90"]) }, null, 8, ["class"])])
|
|
1540
|
-
]), r.applicationsOpen ? (L(), A("div", fn, [
|
|
1541
|
-
j("div", pn, [t[24] ||= j("span", { class: "text-[11px] font-semibold text-slate-400" }, "Швидкі фільтри за статусом", -1), j("span", mn, B(r.formatCount(r.visibleStatusCount)) + " з " + B(r.formatCount(n.totalCount)), 1)]),
|
|
1542
|
-
j("div", hn, [(L(!0), A(E, null, z(r.MAP_LEGEND, (e) => (L(), A("button", {
|
|
1543
|
-
key: e.key,
|
|
1544
|
-
type: "button",
|
|
1545
|
-
title: e.label,
|
|
1546
|
-
class: F(["flex w-full items-start gap-2 rounded-lg px-2 py-2 text-left transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-brand-200", n.visibleStatuses.has(e.key) ? "hover:bg-white" : "opacity-45 hover:bg-white/70"]),
|
|
1547
|
-
onClick: (t) => r.emit("toggleStatus", e.key)
|
|
1548
|
-
}, [
|
|
1549
|
-
j("span", {
|
|
1550
|
-
class: "mt-1 h-2.5 w-2.5 shrink-0 rounded-full",
|
|
1551
|
-
style: I({ backgroundColor: e.color })
|
|
1552
|
-
}, null, 4),
|
|
1553
|
-
j("span", _n, B(e.label), 1),
|
|
1554
|
-
j("span", vn, B(r.formatCount(n.statusCounts[e.key] ?? 0)), 1),
|
|
1555
|
-
j("span", yn, B(r.statusPercent(e.key)) + "% ", 1)
|
|
1556
|
-
], 10, gn))), 128))]),
|
|
1557
|
-
n.visibleStatuses.size === 0 ? (L(), A("div", bn, " За вибраними статусами об'єктів не знайдено. ")) : k("", !0),
|
|
1558
|
-
j("div", xn, [
|
|
1559
|
-
j("button", {
|
|
1560
|
-
type: "button",
|
|
1561
|
-
class: "text-xs font-semibold text-brand-700 hover:text-brand-900",
|
|
1562
|
-
onClick: t[7] ||= (e) => r.emit("selectAllStatuses")
|
|
1563
|
-
}, " Усі "),
|
|
1564
|
-
t[26] ||= j("span", { class: "text-slate-300" }, "·", -1),
|
|
1565
|
-
j("button", {
|
|
1566
|
-
type: "button",
|
|
1567
|
-
class: "text-xs font-medium text-slate-500 hover:text-slate-700",
|
|
1568
|
-
onClick: t[8] ||= (e) => r.emit("clearStatuses")
|
|
1569
|
-
}, " Скинути "),
|
|
1570
|
-
j("button", {
|
|
1571
|
-
type: "button",
|
|
1572
|
-
"aria-expanded": r.filtersOpen,
|
|
1573
|
-
class: F(["ml-auto inline-flex items-center gap-1.5 rounded-md border bg-white px-2 py-1.5 text-xs font-semibold transition-colors", r.filtersOpen || r.activeFilterCount ? "border-brand-200 text-brand-700" : "border-slate-200 text-slate-600 hover:border-brand-300 hover:text-brand-700"]),
|
|
1574
|
-
onClick: r.toggleFilters
|
|
1575
|
-
}, [
|
|
1576
|
-
N(r.SlidersHorizontal, { class: "h-3.5 w-3.5" }),
|
|
1577
|
-
t[25] ||= M(" Фільтри ", -1),
|
|
1578
|
-
r.activeFilterCount > 0 ? (L(), A("span", Cn, B(r.activeFilterCount), 1)) : k("", !0)
|
|
1579
|
-
], 10, Sn)
|
|
1580
|
-
]),
|
|
1581
|
-
r.activeFilterChips.length ? (L(), A("div", wn, [(L(!0), A(E, null, z(r.activeFilterChips, (e) => (L(), A("button", {
|
|
1582
|
-
key: e.key,
|
|
1583
|
-
type: "button",
|
|
1584
|
-
title: `Прибрати фільтр «${e.label}»`,
|
|
1585
|
-
class: "inline-flex max-w-full items-center gap-1 rounded-full border border-brand-100 bg-white px-2 py-1 text-[11px] text-brand-700 hover:border-brand-300",
|
|
1586
|
-
onClick: (t) => r.removeFilter(e.key)
|
|
1587
|
-
}, [j("span", En, B(e.label), 1), N(r.X, { class: "h-3 w-3 shrink-0" })], 8, Tn))), 128))])) : k("", !0)
|
|
1588
|
-
])) : k("", !0)], 2), (L(!0), A(E, null, z(n.overlays, (e) => (L(), O(r.OverlayLayerRow, {
|
|
1589
|
-
key: e.id,
|
|
1590
|
-
layer: e,
|
|
1591
|
-
visible: n.activeOverlayIds.includes(e.id),
|
|
1592
|
-
opacity: r.overlayOpacity(e),
|
|
1593
|
-
"map-zoom": n.mapZoom,
|
|
1594
|
-
"load-state": n.overlayLoad[e.id],
|
|
1595
|
-
"menu-open": r.overlayMenuId === e.id,
|
|
1596
|
-
"legend-open": r.legendLayerId === e.id,
|
|
1597
|
-
onToggle: (t) => r.emit("toggleOverlay", e.id),
|
|
1598
|
-
"onUpdate:opacity": (t) => r.emit("overlayOpacity", e.id, t),
|
|
1599
|
-
onZoom: (t) => r.zoomToLayer(e),
|
|
1600
|
-
onToggleMenu: (t) => r.toggleOverlayMenu(e.id),
|
|
1601
|
-
onCloseMenu: t[9] ||= (e) => r.overlayMenuId = null,
|
|
1602
|
-
onToggleLegend: (t) => r.toggleLegend(e.id),
|
|
1603
|
-
onRetry: (t) => r.emit("retryOverlay", e.id)
|
|
1604
|
-
}, null, 8, [
|
|
1605
|
-
"layer",
|
|
1606
|
-
"visible",
|
|
1607
|
-
"opacity",
|
|
1608
|
-
"map-zoom",
|
|
1609
|
-
"load-state",
|
|
1610
|
-
"menu-open",
|
|
1611
|
-
"legend-open",
|
|
1612
|
-
"onToggle",
|
|
1613
|
-
"onUpdate:opacity",
|
|
1614
|
-
"onZoom",
|
|
1615
|
-
"onToggleMenu",
|
|
1616
|
-
"onToggleLegend",
|
|
1617
|
-
"onRetry"
|
|
1618
|
-
]))), 128))])) : k("", !0),
|
|
1619
|
-
r.layerNotice ? (L(), A("button", {
|
|
1620
|
-
key: 1,
|
|
1621
|
-
type: "button",
|
|
1622
|
-
class: "mt-2 flex w-full items-center justify-between rounded-lg border border-brand-100 bg-brand-50 px-3 py-2 text-left text-xs text-brand-800",
|
|
1623
|
-
role: "status",
|
|
1624
|
-
onClick: t[10] ||= (e) => r.layerNotice = null
|
|
1625
|
-
}, [j("span", null, B(r.layerNotice), 1), N(r.X, { class: "h-3.5 w-3.5 shrink-0" })])) : k("", !0),
|
|
1626
|
-
j("div", Dn, [j("button", {
|
|
1627
|
-
type: "button",
|
|
1628
|
-
class: "flex items-center gap-2 text-[11px] font-bold uppercase tracking-[0.12em] text-slate-400",
|
|
1629
|
-
onClick: t[11] ||= (e) => r.baseOpen = !r.baseOpen
|
|
1630
|
-
}, [N(r.ChevronDown, { class: F(["h-3.5 w-3.5 transition-transform", r.baseOpen ? "" : "-rotate-90"]) }, null, 8, ["class"]), t[27] ||= M(" Базові шари ", -1)]), t[28] ||= j("span", { class: "text-[11px] text-slate-400" }, "1 активний", -1)]),
|
|
1631
|
-
r.baseOpen ? (L(), A("div", On, [(L(!0), A(E, null, z(n.baseLayers, (e) => (L(), A("button", {
|
|
1632
|
-
key: e.id,
|
|
1633
|
-
type: "button",
|
|
1634
|
-
class: F(["group rounded-xl border p-1.5 text-left transition-all focus:outline-none focus:ring-2 focus:ring-brand-200", n.basemapId === e.id ? "border-brand-500 bg-brand-50 shadow-sm" : "border-slate-200 bg-white hover:border-brand-300"]),
|
|
1635
|
-
onClick: (t) => r.emit("basemapChange", e.id)
|
|
1636
|
-
}, [j("img", {
|
|
1637
|
-
src: r.basemapPreview(e),
|
|
1638
|
-
alt: e.label,
|
|
1639
|
-
class: "block h-12 w-full rounded-md object-cover"
|
|
1640
|
-
}, null, 8, An), j("span", { class: F(["mt-1.5 flex items-center gap-1 px-0.5 text-xs font-semibold", n.basemapId === e.id ? "text-brand-700" : "text-slate-600"]) }, [n.basemapId === e.id ? (L(), O(r.Check, {
|
|
1641
|
-
key: 0,
|
|
1642
|
-
class: "h-3 w-3"
|
|
1643
|
-
})) : k("", !0), M(" " + B(e.label), 1)], 2)], 10, kn))), 128))])) : r.activeBasemap ? (L(), A("button", {
|
|
1644
|
-
key: 3,
|
|
1645
|
-
type: "button",
|
|
1646
|
-
class: "flex w-full items-center gap-3 rounded-xl border border-slate-200 bg-slate-50 p-2 text-left transition-colors hover:border-brand-300 hover:bg-brand-50/40",
|
|
1647
|
-
onClick: t[12] ||= (e) => r.baseOpen = !0
|
|
1648
|
-
}, [
|
|
1649
|
-
j("img", {
|
|
1650
|
-
src: r.basemapPreview(r.activeBasemap),
|
|
1651
|
-
alt: r.activeBasemap.label,
|
|
1652
|
-
class: "block h-12 w-16 shrink-0 rounded-md object-cover"
|
|
1653
|
-
}, null, 8, jn),
|
|
1654
|
-
j("span", Mn, [j("span", Nn, B(r.activeBasemap.label), 1), t[29] ||= j("span", { class: "block text-[11px] text-slate-400" }, "Підложка карти", -1)]),
|
|
1655
|
-
N(r.ChevronDown, { class: "h-4 w-4 text-slate-400" })
|
|
1656
|
-
])) : k("", !0)
|
|
1657
|
-
]),
|
|
1658
|
-
r.filtersOpen ? (L(), A("form", {
|
|
1659
|
-
key: 0,
|
|
1660
|
-
class: "shrink-0 border-t border-slate-100 bg-white p-4",
|
|
1661
|
-
onSubmit: G(r.applyFilters, ["prevent"])
|
|
1662
|
-
}, [
|
|
1663
|
-
j("div", Pn, [t[30] ||= j("div", null, [j("h3", { class: "text-sm font-bold text-slate-800" }, "Розширені фільтри"), j("p", { class: "mt-0.5 text-xs text-slate-400" }, "Звужуйте вибір об'єктів звернень")], -1), j("button", {
|
|
1664
|
-
type: "button",
|
|
1665
|
-
"aria-label": "Закрити фільтри",
|
|
1666
|
-
class: "rounded-md p-1 text-slate-400 hover:bg-slate-100 hover:text-slate-700",
|
|
1667
|
-
onClick: t[13] ||= (e) => r.filtersOpen = !1
|
|
1668
|
-
}, [N(r.X, { class: "h-4 w-4" })])]),
|
|
1669
|
-
j("div", Fn, [
|
|
1670
|
-
j("label", In, [t[31] ||= j("span", { class: "mb-1 block text-[11px] font-semibold text-slate-500" }, "Дата від", -1), W(j("input", {
|
|
1671
|
-
"onUpdate:modelValue": t[14] ||= (e) => r.draftFilters.dateFrom = e,
|
|
1672
|
-
type: "date",
|
|
1673
|
-
max: r.draftFilters.dateTo || void 0,
|
|
1674
|
-
class: "h-9 w-full rounded-lg border border-slate-200 px-2 text-xs text-slate-700 outline-none focus:border-brand-400 focus:ring-1 focus:ring-brand-100"
|
|
1675
|
-
}, null, 8, Ln), [[V, r.draftFilters.dateFrom]])]),
|
|
1676
|
-
j("label", Rn, [t[32] ||= j("span", { class: "mb-1 block text-[11px] font-semibold text-slate-500" }, "Дата до", -1), W(j("input", {
|
|
1677
|
-
"onUpdate:modelValue": t[15] ||= (e) => r.draftFilters.dateTo = e,
|
|
1678
|
-
type: "date",
|
|
1679
|
-
min: r.draftFilters.dateFrom || void 0,
|
|
1680
|
-
class: "h-9 w-full rounded-lg border border-slate-200 px-2 text-xs text-slate-700 outline-none focus:border-brand-400 focus:ring-1 focus:ring-brand-100"
|
|
1681
|
-
}, null, 8, zn), [[V, r.draftFilters.dateTo]])]),
|
|
1682
|
-
r.dateRangeInvalid ? (L(), A("p", Bn, " Дата «від» не може бути пізнішою за дату «до». ")) : k("", !0),
|
|
1683
|
-
j("label", Vn, [t[33] ||= j("span", { class: "mb-1 block text-[11px] font-semibold text-slate-500" }, "Вид робіт", -1), N(r.MapFilterSelect, {
|
|
1684
|
-
"model-value": r.draftFilters.workType ?? [],
|
|
1685
|
-
label: "Вид робіт",
|
|
1686
|
-
options: r.WORK_TYPE_OPTIONS.map((e) => ({
|
|
1687
|
-
value: e.code,
|
|
1688
|
-
label: e.label
|
|
1689
|
-
})),
|
|
1690
|
-
"onUpdate:modelValue": t[16] ||= (e) => r.draftFilters.workType = e
|
|
1691
|
-
}, null, 8, ["model-value", "options"])]),
|
|
1692
|
-
j("label", Hn, [t[34] ||= j("span", { class: "mb-1 block text-[11px] font-semibold text-slate-500" }, "Перевірив", -1), W(j("input", {
|
|
1693
|
-
"onUpdate:modelValue": t[17] ||= (e) => r.draftFilters.verifiedBy = e,
|
|
1694
|
-
type: "text",
|
|
1695
|
-
class: "h-9 w-full rounded-lg border border-slate-200 px-2.5 text-xs text-slate-700 outline-none focus:border-brand-400 focus:ring-1 focus:ring-brand-100"
|
|
1696
|
-
}, null, 512), [[V, r.draftFilters.verifiedBy]])]),
|
|
1697
|
-
j("label", Un, [t[35] ||= j("span", { class: "mb-1 block text-[11px] font-semibold text-slate-500" }, "Організація", -1), W(j("input", {
|
|
1698
|
-
"onUpdate:modelValue": t[18] ||= (e) => r.draftFilters.organization = e,
|
|
1699
|
-
type: "text",
|
|
1700
|
-
class: "h-9 w-full rounded-lg border border-slate-200 px-2.5 text-xs text-slate-700 outline-none focus:border-brand-400 focus:ring-1 focus:ring-brand-100"
|
|
1701
|
-
}, null, 512), [[V, r.draftFilters.organization]])]),
|
|
1702
|
-
j("label", Wn, [t[36] ||= j("span", { class: "mb-1 block text-[11px] font-semibold text-slate-500" }, "Адреса", -1), W(j("input", {
|
|
1703
|
-
"onUpdate:modelValue": t[19] ||= (e) => r.draftFilters.address = e,
|
|
1704
|
-
type: "text",
|
|
1705
|
-
class: "h-9 w-full rounded-lg border border-slate-200 px-2.5 text-xs text-slate-700 outline-none focus:border-brand-400 focus:ring-1 focus:ring-brand-100"
|
|
1706
|
-
}, null, 512), [[V, r.draftFilters.address]])])
|
|
1707
|
-
]),
|
|
1708
|
-
j("div", Gn, [j("button", {
|
|
1709
|
-
type: "button",
|
|
1710
|
-
class: "inline-flex flex-1 items-center justify-center gap-1.5 rounded-lg border border-slate-200 px-3 py-2 text-xs font-semibold text-slate-600 hover:bg-slate-50",
|
|
1711
|
-
onClick: r.resetFilters
|
|
1712
|
-
}, [N(r.RotateCcw, { class: "h-3.5 w-3.5" }), t[37] ||= M(" Скинути ", -1)]), j("button", {
|
|
1713
|
-
type: "submit",
|
|
1714
|
-
disabled: r.dateRangeInvalid,
|
|
1715
|
-
class: "flex-1 rounded-lg bg-brand-600 px-3 py-2 text-xs font-semibold text-white hover:bg-brand-700 disabled:cursor-not-allowed disabled:opacity-50"
|
|
1716
|
-
}, " Застосувати ", 8, Kn)])
|
|
1717
|
-
], 32)) : k("", !0)
|
|
1718
|
-
])), N(r.SurveyorTeleport, null, {
|
|
1719
|
-
default: U(() => [r.menuOpen && r.menuPosition ? (L(), A("div", {
|
|
1720
|
-
key: 0,
|
|
1721
|
-
ref: "menuRef",
|
|
1722
|
-
role: "menu",
|
|
1723
|
-
class: "fixed z-[70] w-52 rounded-xl border border-slate-200 bg-white p-3 shadow-xl",
|
|
1724
|
-
style: I({
|
|
1725
|
-
top: `${r.menuPosition.top}px`,
|
|
1726
|
-
left: `${r.menuPosition.left}px`
|
|
1727
|
-
})
|
|
1728
|
-
}, [j("div", qn, [t[38] ||= j("span", null, "Непрозорість", -1), j("span", Jn, B(n.applicationsOpacity) + "%", 1)]), j("input", {
|
|
1729
|
-
type: "range",
|
|
1730
|
-
min: "0",
|
|
1731
|
-
max: "100",
|
|
1732
|
-
value: n.applicationsOpacity,
|
|
1733
|
-
"aria-label": "Непрозорість шару звернень",
|
|
1734
|
-
class: "w-full accent-brand-600",
|
|
1735
|
-
onInput: t[20] ||= (e) => r.emit("update:applicationsOpacity", Number(e.target.value))
|
|
1736
|
-
}, null, 40, Yn)], 4)) : k("", !0)]),
|
|
1737
|
-
_: 1
|
|
1738
|
-
})], 64);
|
|
1739
|
-
}
|
|
1740
|
-
var Zn = /*#__PURE__*/ e(Rt, [["render", Xn], ["__file", "C:/softpro/surveyor/admin/src/pages/map/components/MapLayersPanel.vue"]]), Qn = "flex h-9 w-9 items-center justify-center text-slate-600 transition-colors hover:bg-brand-50 hover:text-brand-600", $n = /*@__PURE__*/ P({
|
|
1741
|
-
__name: "MapControls",
|
|
1742
|
-
props: { visibleCount: {
|
|
1743
|
-
type: Number,
|
|
1744
|
-
required: !0
|
|
1745
|
-
} },
|
|
1746
|
-
emits: [
|
|
1747
|
-
"zoomIn",
|
|
1748
|
-
"zoomOut",
|
|
1749
|
-
"resetView"
|
|
1750
|
-
],
|
|
1751
|
-
setup(e, { expose: t, emit: n }) {
|
|
1752
|
-
t();
|
|
1753
|
-
let r = {
|
|
1754
|
-
emit: n,
|
|
1755
|
-
groupedButtonClass: Qn,
|
|
1756
|
-
get Compass() {
|
|
1757
|
-
return Q;
|
|
1758
|
-
},
|
|
1759
|
-
get Minus() {
|
|
1760
|
-
return ve;
|
|
1761
|
-
},
|
|
1762
|
-
get Plus() {
|
|
1763
|
-
return be;
|
|
1764
|
-
}
|
|
1765
|
-
};
|
|
1766
|
-
return Object.defineProperty(r, "__isScriptSetup", {
|
|
1767
|
-
enumerable: !1,
|
|
1768
|
-
value: !0
|
|
1769
|
-
}), r;
|
|
1770
|
-
}
|
|
1771
|
-
}), er = { class: "absolute right-3 top-3 z-20 flex flex-col gap-1.5" }, tr = { class: "flex flex-col overflow-hidden rounded-lg border border-slate-200 bg-white shadow-card" }, nr = { class: "absolute bottom-3 right-3 z-10 flex items-center gap-2 rounded-md bg-white/80 px-2.5 py-1 text-[11px] text-slate-400 backdrop-blur-sm" };
|
|
1772
|
-
function rr(e, t, n, r, i, a) {
|
|
1773
|
-
return L(), A(E, null, [j("div", er, [j("div", tr, [
|
|
1774
|
-
j("button", {
|
|
1775
|
-
type: "button",
|
|
1776
|
-
title: "Збільшити",
|
|
1777
|
-
"aria-label": "Збільшити",
|
|
1778
|
-
class: F(r.groupedButtonClass),
|
|
1779
|
-
onClick: t[0] ||= (e) => r.emit("zoomIn")
|
|
1780
|
-
}, [N(r.Plus, { class: "h-4 w-4" })]),
|
|
1781
|
-
t[3] ||= j("div", { class: "h-px bg-slate-100" }, null, -1),
|
|
1782
|
-
j("button", {
|
|
1783
|
-
type: "button",
|
|
1784
|
-
title: "Зменшити",
|
|
1785
|
-
"aria-label": "Зменшити",
|
|
1786
|
-
class: F(r.groupedButtonClass),
|
|
1787
|
-
onClick: t[1] ||= (e) => r.emit("zoomOut")
|
|
1788
|
-
}, [N(r.Minus, { class: "h-4 w-4" })]),
|
|
1789
|
-
t[4] ||= j("div", { class: "h-px bg-slate-100" }, null, -1),
|
|
1790
|
-
j("button", {
|
|
1791
|
-
type: "button",
|
|
1792
|
-
title: "Північ/Південь/Захід/Схід",
|
|
1793
|
-
"aria-label": "Північ/Південь/Захід/Схід",
|
|
1794
|
-
class: F(r.groupedButtonClass),
|
|
1795
|
-
onClick: t[2] ||= (e) => r.emit("resetView")
|
|
1796
|
-
}, [N(r.Compass, { class: "h-4 w-4" })])
|
|
1797
|
-
])]), j("div", nr, [
|
|
1798
|
-
t[5] ||= j("span", null, "MapLibre", -1),
|
|
1799
|
-
t[6] ||= j("span", { class: "text-slate-300" }, "·", -1),
|
|
1800
|
-
j("span", null, "Точок: " + B(n.visibleCount), 1)
|
|
1801
|
-
])], 64);
|
|
1802
|
-
}
|
|
1803
|
-
var ir = /*#__PURE__*/ e($n, [["render", rr], ["__file", "C:/softpro/surveyor/admin/src/pages/map/components/MapControls.vue"]]), ar = /*@__PURE__*/ P({
|
|
1804
|
-
__name: "MapPointTooltip",
|
|
1805
|
-
props: {
|
|
1806
|
-
points: {
|
|
1807
|
-
type: Array,
|
|
1808
|
-
required: !0
|
|
1809
|
-
},
|
|
1810
|
-
total: {
|
|
1811
|
-
type: Number,
|
|
1812
|
-
required: !0
|
|
1813
|
-
},
|
|
1814
|
-
position: {
|
|
1815
|
-
type: Object,
|
|
1816
|
-
required: !0
|
|
1817
|
-
},
|
|
1818
|
-
containerWidth: {
|
|
1819
|
-
type: Number,
|
|
1820
|
-
required: !0
|
|
1821
|
-
},
|
|
1822
|
-
containerHeight: {
|
|
1823
|
-
type: Number,
|
|
1824
|
-
required: !0
|
|
1825
|
-
}
|
|
1826
|
-
},
|
|
1827
|
-
setup(e, { expose: t }) {
|
|
1828
|
-
t();
|
|
1829
|
-
let n = e, r = D(() => n.points.slice(0, 6)), i = D(() => n.points.length === 1 && n.total <= 1), a = D(() => Math.max(n.total - r.value.length, 0)), o = D(() => i.value ? 156 : 40 + r.value.length * 52 + (a.value ? 28 : 8)), s = D(() => {
|
|
1830
|
-
let e = o.value, t = n.position.x > 280 ? n.position.x - 256 - 14 : n.position.x + 14, r = n.position.y > e + 24 ? n.position.y - e - 12 : n.position.y + 14;
|
|
1831
|
-
return {
|
|
1832
|
-
left: `${Math.min(Math.max(t, 8), Math.max(n.containerWidth - 256 - 8, 8))}px`,
|
|
1833
|
-
top: `${Math.min(Math.max(r, 8), Math.max(n.containerHeight - e - 8, 8))}px`
|
|
1834
|
-
};
|
|
1835
|
-
});
|
|
1836
|
-
function c(e) {
|
|
1837
|
-
return h[e] ?? "#64748b";
|
|
1838
|
-
}
|
|
1839
|
-
function l(e) {
|
|
1840
|
-
return _[e] ?? e;
|
|
1841
|
-
}
|
|
1842
|
-
let u = {
|
|
1843
|
-
props: n,
|
|
1844
|
-
visiblePoints: r,
|
|
1845
|
-
single: i,
|
|
1846
|
-
hiddenCount: a,
|
|
1847
|
-
cardHeight: o,
|
|
1848
|
-
style: s,
|
|
1849
|
-
color: c,
|
|
1850
|
-
statusLabel: l,
|
|
1851
|
-
point: D(() => n.points[0])
|
|
1852
|
-
};
|
|
1853
|
-
return Object.defineProperty(u, "__isScriptSetup", {
|
|
1854
|
-
enumerable: !1,
|
|
1855
|
-
value: !0
|
|
1856
|
-
}), u;
|
|
1857
|
-
}
|
|
1858
|
-
}), or = { class: "mb-2 flex items-center gap-2" }, sr = { class: "text-sm font-semibold text-slate-800" }, cr = { class: "space-y-1.5 text-xs" }, lr = { class: "flex justify-between gap-2" }, ur = { class: "font-medium text-slate-700" }, dr = { class: "flex justify-between gap-2" }, fr = { class: "font-medium text-slate-700" }, pr = { class: "flex justify-between gap-2" }, mr = { class: "text-right font-medium text-slate-700" }, hr = { class: "flex justify-between gap-2" }, gr = { class: "text-right font-medium text-slate-700" }, _r = { class: "mb-2 text-xs font-semibold text-slate-500" }, vr = { class: "space-y-2" }, yr = { class: "flex items-center gap-2" }, br = { class: "truncate text-sm font-semibold text-slate-800" }, xr = { class: "truncate pl-4 text-[11px] text-slate-500" }, Sr = {
|
|
1859
|
-
key: 0,
|
|
1860
|
-
class: "mt-2 text-[11px] font-medium text-slate-400"
|
|
1861
|
-
};
|
|
1862
|
-
function Cr(e, t, n, r, i, a) {
|
|
1863
|
-
return L(), A("div", {
|
|
1864
|
-
class: "pointer-events-none absolute z-30 w-64 rounded-lg border border-slate-200 bg-white p-3 shadow-card-hover",
|
|
1865
|
-
style: I(r.style)
|
|
1866
|
-
}, [r.single && r.point ? (L(), A(E, { key: 0 }, [j("div", or, [j("span", {
|
|
1867
|
-
class: "h-2.5 w-2.5 shrink-0 rounded-full",
|
|
1868
|
-
style: I({ backgroundColor: r.color(r.point.status) })
|
|
1869
|
-
}, null, 4), j("span", sr, B(r.point.number), 1)]), j("dl", cr, [
|
|
1870
|
-
j("div", lr, [t[0] ||= j("dt", { class: "text-slate-400" }, "Ідентифікатор", -1), j("dd", ur, B(r.point.id), 1)]),
|
|
1871
|
-
j("div", dr, [t[1] ||= j("dt", { class: "text-slate-400" }, "Статус", -1), j("dd", fr, B(r.statusLabel(r.point.status)), 1)]),
|
|
1872
|
-
j("div", pr, [t[2] ||= j("dt", { class: "text-slate-400" }, "Вид робіт", -1), j("dd", mr, B(r.point.workType), 1)]),
|
|
1873
|
-
j("div", hr, [t[3] ||= j("dt", { class: "text-slate-400" }, "Організація", -1), j("dd", gr, B(r.point.organization), 1)])
|
|
1874
|
-
])], 64)) : (L(), A(E, { key: 1 }, [
|
|
1875
|
-
j("p", _r, " Звернення в точці · " + B(n.total), 1),
|
|
1876
|
-
j("ul", vr, [(L(!0), A(E, null, z(r.visiblePoints, (e) => (L(), A("li", {
|
|
1877
|
-
key: e.id,
|
|
1878
|
-
class: "min-w-0"
|
|
1879
|
-
}, [j("div", yr, [j("span", {
|
|
1880
|
-
class: "h-2 w-2 shrink-0 rounded-full",
|
|
1881
|
-
style: I({ backgroundColor: r.color(e.status) })
|
|
1882
|
-
}, null, 4), j("span", br, B(e.number), 1)]), j("p", xr, B(r.statusLabel(e.status)) + " · " + B(e.organization), 1)]))), 128))]),
|
|
1883
|
-
r.hiddenCount ? (L(), A("p", Sr, " Ще " + B(r.hiddenCount), 1)) : k("", !0)
|
|
1884
|
-
], 64))], 4);
|
|
1885
|
-
}
|
|
1886
|
-
var wr = /*#__PURE__*/ e(ar, [["render", Cr], ["__file", "C:/softpro/surveyor/admin/src/pages/map/components/MapPointTooltip.vue"]]), Tr = /*@__PURE__*/ P({
|
|
1887
|
-
__name: "MapApplicationPanel",
|
|
1888
|
-
props: {
|
|
1889
|
-
rows: {
|
|
1890
|
-
type: Array,
|
|
1891
|
-
required: !0
|
|
1892
|
-
},
|
|
1893
|
-
total: {
|
|
1894
|
-
type: Number,
|
|
1895
|
-
required: !0
|
|
1896
|
-
},
|
|
1897
|
-
page: {
|
|
1898
|
-
type: Number,
|
|
1899
|
-
required: !0
|
|
1900
|
-
},
|
|
1901
|
-
pageCount: {
|
|
1902
|
-
type: Number,
|
|
1903
|
-
required: !0
|
|
1904
|
-
},
|
|
1905
|
-
application: {
|
|
1906
|
-
type: [Object, null],
|
|
1907
|
-
required: !0
|
|
1908
|
-
},
|
|
1909
|
-
loading: {
|
|
1910
|
-
type: Boolean,
|
|
1911
|
-
required: !0
|
|
1912
|
-
},
|
|
1913
|
-
error: {
|
|
1914
|
-
type: String,
|
|
1915
|
-
required: !0
|
|
1916
|
-
}
|
|
1917
|
-
},
|
|
1918
|
-
emits: [
|
|
1919
|
-
"close",
|
|
1920
|
-
"back",
|
|
1921
|
-
"select",
|
|
1922
|
-
"page"
|
|
1923
|
-
],
|
|
1924
|
-
setup(e, { expose: t, emit: n }) {
|
|
1925
|
-
t();
|
|
1926
|
-
let r = e, i = n;
|
|
1927
|
-
function a(e) {
|
|
1928
|
-
return Array.isArray(e) ? e[0] ?? null : e ?? null;
|
|
1929
|
-
}
|
|
1930
|
-
function o(e) {
|
|
1931
|
-
if (!e) return "—";
|
|
1932
|
-
let t = e.match(/^(\d{4})-(\d{2})-(\d{2})/);
|
|
1933
|
-
return t ? `${t[3]}.${t[2]}.${t[1]}` : e;
|
|
1934
|
-
}
|
|
1935
|
-
function s(e) {
|
|
1936
|
-
return e ? [
|
|
1937
|
-
e.last_name,
|
|
1938
|
-
e.first_name,
|
|
1939
|
-
e.middle_name
|
|
1940
|
-
].filter(Boolean).join(" ") : "";
|
|
1941
|
-
}
|
|
1942
|
-
let c = D(() => a(r.application?.organization)), l = D(() => a(r.application?.surveyor)), u = {
|
|
1943
|
-
props: r,
|
|
1944
|
-
emit: i,
|
|
1945
|
-
firstRelation: a,
|
|
1946
|
-
formatDate: o,
|
|
1947
|
-
personName: s,
|
|
1948
|
-
organization: c,
|
|
1949
|
-
surveyor: l,
|
|
1950
|
-
showList: D(() => !r.application),
|
|
1951
|
-
fields: D(() => {
|
|
1952
|
-
let e = r.application;
|
|
1953
|
-
if (!e) return [];
|
|
1954
|
-
let t = s(l.value) || e.surveyor_id_data?.text || "—", n = l.value?.phone || c.value?.phone;
|
|
1955
|
-
return [
|
|
1956
|
-
{
|
|
1957
|
-
label: "Вид робіт",
|
|
1958
|
-
value: e.work_type_data?.text || "—"
|
|
1959
|
-
},
|
|
1960
|
-
{
|
|
1961
|
-
label: "Організація",
|
|
1962
|
-
value: c.value?.name || e.org_id_data?.text || "—"
|
|
1963
|
-
},
|
|
1964
|
-
{
|
|
1965
|
-
label: "Заявник",
|
|
1966
|
-
value: t
|
|
1967
|
-
},
|
|
1968
|
-
...n ? [{
|
|
1969
|
-
label: "Телефон",
|
|
1970
|
-
value: n
|
|
1971
|
-
}] : [],
|
|
1972
|
-
{
|
|
1973
|
-
label: "Площа, га",
|
|
1974
|
-
value: e.area == null || e.area === "" ? "—" : String(e.area)
|
|
1975
|
-
},
|
|
1976
|
-
{
|
|
1977
|
-
label: "Адреса",
|
|
1978
|
-
value: e.address_id_data?.text || "—"
|
|
1979
|
-
},
|
|
1980
|
-
{
|
|
1981
|
-
label: "Місцезнаходження",
|
|
1982
|
-
value: e.location || "—"
|
|
1983
|
-
},
|
|
1984
|
-
{
|
|
1985
|
-
label: "Опис запиту",
|
|
1986
|
-
value: e.description || "—"
|
|
1987
|
-
},
|
|
1988
|
-
{
|
|
1989
|
-
label: "Підстава виконання",
|
|
1990
|
-
value: e.execution_basis || "—"
|
|
1991
|
-
},
|
|
1992
|
-
{
|
|
1993
|
-
label: "Дата прийому",
|
|
1994
|
-
value: o(e.created_at)
|
|
1995
|
-
},
|
|
1996
|
-
{
|
|
1997
|
-
label: "Дата видачі даних",
|
|
1998
|
-
value: o(e.source_data_issued_at)
|
|
1999
|
-
},
|
|
2000
|
-
{
|
|
2001
|
-
label: "Дата прийому даних",
|
|
2002
|
-
value: o(e.survey_uploaded_at)
|
|
2003
|
-
},
|
|
2004
|
-
{
|
|
2005
|
-
label: "Дата перевірки",
|
|
2006
|
-
value: o(e.verified_at)
|
|
2007
|
-
},
|
|
2008
|
-
{
|
|
2009
|
-
label: "Перевірив",
|
|
2010
|
-
value: e.verified_by_data?.text || "—"
|
|
2011
|
-
}
|
|
2012
|
-
];
|
|
2013
|
-
}),
|
|
2014
|
-
get RouterLink() {
|
|
2015
|
-
return K;
|
|
2016
|
-
},
|
|
2017
|
-
get ChevronLeft() {
|
|
2018
|
-
return pe;
|
|
2019
|
-
},
|
|
2020
|
-
get X() {
|
|
2021
|
-
return we;
|
|
2022
|
-
},
|
|
2023
|
-
AppealStatusBadge: y
|
|
2024
|
-
};
|
|
2025
|
-
return Object.defineProperty(u, "__isScriptSetup", {
|
|
2026
|
-
enumerable: !1,
|
|
2027
|
-
value: !0
|
|
2028
|
-
}), u;
|
|
2029
|
-
}
|
|
2030
|
-
}), Er = { class: "absolute bottom-12 right-16 top-3 z-20 flex w-[min(360px,calc(100vw-6rem))] flex-col overflow-hidden rounded-xl border border-slate-200 bg-white shadow-card-hover" }, Dr = { class: "flex items-start justify-between gap-3 border-b border-slate-100 px-4 py-3" }, Or = { class: "flex min-w-0 items-start gap-1" }, kr = { class: "min-w-0" }, Ar = { class: "text-[11px] font-semibold uppercase tracking-wide text-slate-400" }, jr = { class: "truncate text-base font-semibold text-slate-900" }, Mr = { class: "min-h-0 flex-1 overflow-y-auto px-4 py-3" }, Nr = {
|
|
2031
|
-
key: 0,
|
|
2032
|
-
class: "py-8 text-center text-sm text-slate-400"
|
|
2033
|
-
}, Pr = {
|
|
2034
|
-
key: 1,
|
|
2035
|
-
class: "py-8 text-center text-sm text-red-600"
|
|
2036
|
-
}, Fr = {
|
|
2037
|
-
key: 2,
|
|
2038
|
-
class: "py-8 text-center text-sm text-slate-400"
|
|
2039
|
-
}, Ir = {
|
|
2040
|
-
key: 3,
|
|
2041
|
-
class: "space-y-2"
|
|
2042
|
-
}, Lr = ["onClick"], Rr = { class: "flex items-center justify-between gap-2" }, zr = { class: "truncate text-sm font-semibold text-slate-800" }, Br = { class: "truncate text-xs text-slate-500" }, Vr = { class: "truncate text-xs text-slate-400" }, Hr = { class: "space-y-2.5" }, Ur = { class: "text-[11px] font-medium text-slate-400" }, Wr = { class: "text-[13px] font-medium leading-snug text-slate-800" }, Gr = {
|
|
2043
|
-
key: 0,
|
|
2044
|
-
class: "flex items-center justify-between gap-3 border-t border-slate-100 px-4 py-3"
|
|
2045
|
-
}, Kr = ["disabled"], qr = { class: "text-xs text-slate-400" }, Jr = ["disabled"], Yr = {
|
|
2046
|
-
key: 1,
|
|
2047
|
-
class: "border-t border-slate-100 px-4 py-3"
|
|
2048
|
-
};
|
|
2049
|
-
function Xr(e, t, n, r, i, a) {
|
|
2050
|
-
return L(), A("aside", Er, [
|
|
2051
|
-
j("header", Dr, [j("div", Or, [n.application && n.total > 1 ? (L(), A("button", {
|
|
2052
|
-
key: 0,
|
|
2053
|
-
type: "button",
|
|
2054
|
-
class: "mt-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-600",
|
|
2055
|
-
"aria-label": "До списку",
|
|
2056
|
-
onClick: t[0] ||= (e) => r.emit("back")
|
|
2057
|
-
}, [N(r.ChevronLeft, { class: "h-4 w-4" })])) : k("", !0), j("div", kr, [j("p", Ar, B(r.showList ? "Звернення в точці" : "Звернення"), 1), j("h2", jr, [r.showList ? (L(), A(E, { key: 0 }, [M(B(n.total), 1)], 64)) : (L(), A(E, { key: 1 }, [M(B(n.application?.number || (n.loading ? "Завантаження…" : "—")), 1)], 64))])])]), j("button", {
|
|
2058
|
-
type: "button",
|
|
2059
|
-
class: "flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-600",
|
|
2060
|
-
"aria-label": "Закрити",
|
|
2061
|
-
onClick: t[1] ||= (e) => r.emit("close")
|
|
2062
|
-
}, [N(r.X, { class: "h-4 w-4" })])]),
|
|
2063
|
-
j("div", Mr, [n.loading && !n.rows.length ? (L(), A("p", Nr, "Завантаження…")) : n.error ? (L(), A("p", Pr, B(n.error), 1)) : r.showList && !n.rows.length ? (L(), A("p", Fr, " У цій точці немає звернень ")) : r.showList ? (L(), A("ul", Ir, [(L(!0), A(E, null, z(n.rows, (e) => (L(), A("li", { key: e.app_id }, [j("button", {
|
|
2064
|
-
type: "button",
|
|
2065
|
-
class: "flex w-full flex-col gap-1 rounded-lg border border-slate-200 px-3 py-2.5 text-left transition-colors hover:border-brand-300 hover:bg-brand-50",
|
|
2066
|
-
onClick: (t) => r.emit("select", e)
|
|
2067
|
-
}, [
|
|
2068
|
-
j("span", Rr, [j("span", zr, B(e.number || "—"), 1), N(r.AppealStatusBadge, {
|
|
2069
|
-
status: e.status || "",
|
|
2070
|
-
label: e.status_data?.text || void 0,
|
|
2071
|
-
size: "sm"
|
|
2072
|
-
}, null, 8, ["status", "label"])]),
|
|
2073
|
-
j("span", Br, B(e.work_type_data?.text || "—"), 1),
|
|
2074
|
-
j("span", Vr, B(e.org_id_data?.text || "—"), 1)
|
|
2075
|
-
], 8, Lr)]))), 128))])) : n.application ? (L(), A(E, { key: 4 }, [N(r.AppealStatusBadge, {
|
|
2076
|
-
class: "mb-3",
|
|
2077
|
-
status: n.application.status || "",
|
|
2078
|
-
label: n.application.status_data?.text || void 0,
|
|
2079
|
-
size: "sm"
|
|
2080
|
-
}, null, 8, ["status", "label"]), j("dl", Hr, [(L(!0), A(E, null, z(r.fields, (e) => (L(), A("div", { key: e.label }, [j("dt", Ur, B(e.label), 1), j("dd", Wr, B(e.value), 1)]))), 128))])], 64)) : k("", !0)]),
|
|
2081
|
-
r.showList && n.pageCount > 1 ? (L(), A("footer", Gr, [
|
|
2082
|
-
j("button", {
|
|
2083
|
-
type: "button",
|
|
2084
|
-
class: "rounded-md px-2 py-1 text-[13px] font-medium text-slate-600 transition-colors hover:bg-slate-100 disabled:pointer-events-none disabled:text-slate-300",
|
|
2085
|
-
disabled: n.page <= 1 || n.loading,
|
|
2086
|
-
onClick: t[2] ||= (e) => r.emit("page", n.page - 1)
|
|
2087
|
-
}, " Назад ", 8, Kr),
|
|
2088
|
-
j("span", qr, B(n.page) + " / " + B(n.pageCount), 1),
|
|
2089
|
-
j("button", {
|
|
2090
|
-
type: "button",
|
|
2091
|
-
class: "rounded-md px-2 py-1 text-[13px] font-medium text-slate-600 transition-colors hover:bg-slate-100 disabled:pointer-events-none disabled:text-slate-300",
|
|
2092
|
-
disabled: n.page >= n.pageCount || n.loading,
|
|
2093
|
-
onClick: t[3] ||= (e) => r.emit("page", n.page + 1)
|
|
2094
|
-
}, " Далі ", 8, Jr)
|
|
2095
|
-
])) : n.application?.app_id ? (L(), A("footer", Yr, [N(r.RouterLink, {
|
|
2096
|
-
to: `/requests/${n.application.app_id}`,
|
|
2097
|
-
class: "inline-flex text-[13px] font-medium text-brand-600 transition-colors hover:text-brand-800 hover:underline"
|
|
2098
|
-
}, {
|
|
2099
|
-
default: U(() => [...t[4] ||= [M(" Відкрити картку звернення ", -1)]]),
|
|
2100
|
-
_: 1
|
|
2101
|
-
}, 8, ["to"])])) : k("", !0)
|
|
2102
|
-
]);
|
|
2103
|
-
}
|
|
2104
|
-
var Zr = /*#__PURE__*/ e(Tr, [["render", Xr], ["__file", "C:/softpro/surveyor/admin/src/pages/map/components/MapApplicationPanel.vue"]]), Qr = ["status", "workType"], $r = "_", ei = [
|
|
2105
|
-
"dateFrom",
|
|
2106
|
-
"dateTo",
|
|
2107
|
-
"workType",
|
|
2108
|
-
"verifiedBy",
|
|
2109
|
-
"organization",
|
|
2110
|
-
"address"
|
|
2111
|
-
];
|
|
2112
|
-
function ti(e) {
|
|
2113
|
-
let t = Number(String(e ?? "").trim().replace(",", "."));
|
|
2114
|
-
return Number.isFinite(t) ? t : null;
|
|
2115
|
-
}
|
|
2116
|
-
function ni(e) {
|
|
2117
|
-
let t = ti(e.x), n = ti(e.y), r = ti(e.z), i = t != null && n != null && r != null ? {
|
|
2118
|
-
lng: t,
|
|
2119
|
-
lat: n,
|
|
2120
|
-
zoom: r
|
|
2121
|
-
} : null, o = String(e.filter ?? ""), s = a(o, Qr), c = null, l = s.status;
|
|
2122
|
-
if (l != null && l !== "") {
|
|
2123
|
-
let e = Array.isArray(l) ? l.join(",") : String(l);
|
|
2124
|
-
if (e === $r) c = /* @__PURE__ */ new Set();
|
|
2125
|
-
else {
|
|
2126
|
-
let t = e.split(",").map((e) => e.trim()).filter(Boolean);
|
|
2127
|
-
c = new Set(t.filter((e) => g.includes(e)));
|
|
2128
|
-
}
|
|
2129
|
-
}
|
|
2130
|
-
let u = String(s.search ?? "").trim(), d = {};
|
|
2131
|
-
for (let e of ei) {
|
|
2132
|
-
let t = s[e];
|
|
2133
|
-
if (t == null || t === "") continue;
|
|
2134
|
-
if (e === "workType") {
|
|
2135
|
-
let e = Array.isArray(t) ? t.map((e) => String(e).trim()).filter(Boolean) : String(t).split(",").map((e) => e.trim()).filter(Boolean);
|
|
2136
|
-
e.length && (d.workType = e);
|
|
2137
|
-
continue;
|
|
2138
|
-
}
|
|
2139
|
-
let n = Array.isArray(t) ? t[0] : String(t).trim();
|
|
2140
|
-
n && (d[e] = n);
|
|
2141
|
-
}
|
|
2142
|
-
let f = e.layers, p = null;
|
|
2143
|
-
f != null && String(f) !== "" ? p = String(f).split(",").map((e) => e.trim()).filter(Boolean) : f != null && String(f) === "" && (p = []);
|
|
2144
|
-
let m = e.app, h = null;
|
|
2145
|
-
m != null && String(m) !== "" && (h = String(m) !== "0");
|
|
2146
|
-
let _ = ti(e.p), v = _ != null && _ > 0 ? Math.floor(_) : 1, y = String(e.basemap ?? e.base ?? "").trim() || null;
|
|
2147
|
-
return {
|
|
2148
|
-
view: i,
|
|
2149
|
-
sel: String(e.sel ?? "").trim() || null,
|
|
2150
|
-
identifyPage: v,
|
|
2151
|
-
basemapId: y,
|
|
2152
|
-
layerIds: p,
|
|
2153
|
-
applicationsVisible: h,
|
|
2154
|
-
visibleStatuses: c,
|
|
2155
|
-
search: u,
|
|
2156
|
-
advancedFilters: d
|
|
2157
|
-
};
|
|
2158
|
-
}
|
|
2159
|
-
function ri(e) {
|
|
2160
|
-
let t = {};
|
|
2161
|
-
g.every((t) => e.visibleStatuses.has(t)) || (t.status = e.visibleStatuses.size ? [...e.visibleStatuses].sort().join(",") : $r);
|
|
2162
|
-
let n = e.search.trim();
|
|
2163
|
-
n && (t.search = n);
|
|
2164
|
-
for (let n of ei) {
|
|
2165
|
-
let r = e.advancedFilters[n];
|
|
2166
|
-
if (n === "workType") {
|
|
2167
|
-
let n = (e.advancedFilters.workType ?? []).map((e) => e.trim()).filter(Boolean);
|
|
2168
|
-
n.length && (t.workType = n);
|
|
2169
|
-
continue;
|
|
2170
|
-
}
|
|
2171
|
-
let i = typeof r == "string" ? r.trim() : "";
|
|
2172
|
-
i && (t[n] = i);
|
|
2173
|
-
}
|
|
2174
|
-
return t;
|
|
2175
|
-
}
|
|
2176
|
-
function ii(e) {
|
|
2177
|
-
let t = {};
|
|
2178
|
-
e.view && (t.z = String(Math.round(e.view.zoom * 100) / 100), t.x = e.view.lng.toFixed(5), t.y = e.view.lat.toFixed(5)), e.sel && (t.sel = e.sel), e.identifyPage > 1 && (t.p = String(e.identifyPage));
|
|
2179
|
-
let n = i(ri(e));
|
|
2180
|
-
return n && (t.filter = n), e.basemapId && e.defaultBasemapId && e.basemapId !== e.defaultBasemapId && (t.basemap = e.basemapId), e.activeOverlayIds.length > 0 && (t.layers = [...e.activeOverlayIds].sort().join(",")), e.applicationsVisible || (t.app = "0"), t;
|
|
2181
|
-
}
|
|
2182
|
-
function ai(e, t) {
|
|
2183
|
-
let n = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)]);
|
|
2184
|
-
for (let r of n) if (String(e[r] ?? "") !== String(t[r] ?? "")) return !1;
|
|
2185
|
-
return !0;
|
|
2186
|
-
}
|
|
2187
|
-
//#endregion
|
|
2188
|
-
//#region admin/src/pages/map/useMapRouteSync.ts
|
|
2189
|
-
var oi = 300, si = [
|
|
2190
|
-
"z",
|
|
2191
|
-
"x",
|
|
2192
|
-
"y",
|
|
2193
|
-
"sel",
|
|
2194
|
-
"p",
|
|
2195
|
-
"filter",
|
|
2196
|
-
"basemap",
|
|
2197
|
-
"base",
|
|
2198
|
-
"layers",
|
|
2199
|
-
"app"
|
|
2200
|
-
];
|
|
2201
|
-
function ci(e, t = {}) {
|
|
2202
|
-
let n = q(), r = J(), i = !1, a = !1, o, s = "";
|
|
2203
|
-
function c() {
|
|
2204
|
-
return JSON.stringify(ii({
|
|
2205
|
-
view: e.mapView.value,
|
|
2206
|
-
sel: e.sel.value,
|
|
2207
|
-
identifyPage: e.identifyPage.value,
|
|
2208
|
-
basemapId: e.basemapId.value,
|
|
2209
|
-
defaultBasemapId: e.defaultBasemapId.value,
|
|
2210
|
-
activeOverlayIds: e.activeOverlayIds.value,
|
|
2211
|
-
applicationsVisible: e.applicationsVisible.value,
|
|
2212
|
-
visibleStatuses: e.visibleStatuses.value,
|
|
2213
|
-
search: e.appliedSearch.value,
|
|
2214
|
-
advancedFilters: e.advancedFilters.value
|
|
2215
|
-
}));
|
|
2216
|
-
}
|
|
2217
|
-
function l() {
|
|
2218
|
-
let r = ni(n.query);
|
|
2219
|
-
i = !0, r.view && (e.mapView.value = r.view, t.onViewFromRoute?.(r.view)), e.sel.value = r.sel, e.identifyPage.value = r.identifyPage, r.basemapId && (e.basemapId.value = r.basemapId), r.layerIds != null && (e.activeOverlayIds.value = [...r.layerIds]), r.applicationsVisible != null && (e.applicationsVisible.value = r.applicationsVisible), r.visibleStatuses && (e.visibleStatuses.value = new Set(r.visibleStatuses)), e.searchQuery.value = r.search, e.appliedSearch.value = r.search, e.advancedFilters.value = { ...r.advancedFilters }, s = c(), i = !1;
|
|
2220
|
-
}
|
|
2221
|
-
function u() {
|
|
2222
|
-
return l(), ni(n.query);
|
|
2223
|
-
}
|
|
2224
|
-
function d() {
|
|
2225
|
-
if (i) return;
|
|
2226
|
-
let t = ii({
|
|
2227
|
-
view: e.mapView.value,
|
|
2228
|
-
sel: e.sel.value,
|
|
2229
|
-
identifyPage: e.identifyPage.value,
|
|
2230
|
-
basemapId: e.basemapId.value,
|
|
2231
|
-
defaultBasemapId: e.defaultBasemapId.value,
|
|
2232
|
-
activeOverlayIds: e.activeOverlayIds.value,
|
|
2233
|
-
applicationsVisible: e.applicationsVisible.value,
|
|
2234
|
-
visibleStatuses: e.visibleStatuses.value,
|
|
2235
|
-
search: e.appliedSearch.value,
|
|
2236
|
-
advancedFilters: e.advancedFilters.value
|
|
2237
|
-
}), o = JSON.stringify(t);
|
|
2238
|
-
if (o === s) return;
|
|
2239
|
-
if (ai(n.query, t)) {
|
|
2240
|
-
s = o;
|
|
2241
|
-
return;
|
|
2242
|
-
}
|
|
2243
|
-
s = o, a = !0;
|
|
2244
|
-
let c = {};
|
|
2245
|
-
for (let e of si) c[e] = t[e];
|
|
2246
|
-
r.replace({ query: c });
|
|
2247
|
-
}
|
|
2248
|
-
function f() {
|
|
2249
|
-
i || d();
|
|
2250
|
-
}
|
|
2251
|
-
function p() {
|
|
2252
|
-
i || (clearTimeout(o), o = setTimeout(d, oi));
|
|
2253
|
-
}
|
|
2254
|
-
function m() {
|
|
2255
|
-
H(() => n.query, () => {
|
|
2256
|
-
if (a) {
|
|
2257
|
-
a = !1;
|
|
2258
|
-
return;
|
|
2259
|
-
}
|
|
2260
|
-
l();
|
|
2261
|
-
}, { deep: !0 }), H([
|
|
2262
|
-
e.sel,
|
|
2263
|
-
e.identifyPage,
|
|
2264
|
-
e.basemapId,
|
|
2265
|
-
e.defaultBasemapId,
|
|
2266
|
-
e.activeOverlayIds,
|
|
2267
|
-
e.applicationsVisible,
|
|
2268
|
-
e.visibleStatuses,
|
|
2269
|
-
e.appliedSearch,
|
|
2270
|
-
e.advancedFilters
|
|
2271
|
-
], () => f(), { deep: !0 }), H(e.mapView, () => p(), { deep: !0 });
|
|
2272
|
-
}
|
|
2273
|
-
function h() {
|
|
2274
|
-
clearTimeout(o);
|
|
2275
|
-
}
|
|
2276
|
-
return {
|
|
2277
|
-
readInitialRouteState: u,
|
|
2278
|
-
bindMapRouteSync: m,
|
|
2279
|
-
syncRouteNow: d,
|
|
2280
|
-
clearViewDebounce: h
|
|
2281
|
-
};
|
|
2282
|
-
}
|
|
2283
|
-
function li(e, t) {
|
|
2284
|
-
return e.find((e) => e.app_id === t) ?? null;
|
|
2285
|
-
}
|
|
2286
|
-
//#endregion
|
|
2287
|
-
//#region admin/src/pages/map/index.vue?vue&type=script&setup=true&lang.ts
|
|
2288
|
-
var ui = 350, di = /*@__PURE__*/ P({
|
|
2289
|
-
__name: "index",
|
|
2290
|
-
setup(e, { expose: t }) {
|
|
2291
|
-
t();
|
|
2292
|
-
let n = fe("mapViewRef"), r = R(null), i = R(""), a = R(""), o = R([]), l = R(!1), u = R(!1), m = R(""), h = R({}), _ = D(() => ({ ...h.value })), v, y, b = 0, x = R(!0), ee = R(100), te = R(s), S = R(p), ne = R(null), re = R([]), C = R([]), ie = R({}), w = R({}), { zoom: oe } = Re(), se = R(oe.value), T = R(null), E = R(null), O = /* @__PURE__ */ new Map(), k = D(() => S.value[0]?.id ?? s), A = D(() => S.value.find((e) => e.id === te.value) ?? S.value[0] ?? p[0]);
|
|
2293
|
-
function j(e) {
|
|
2294
|
-
if (e.basemapId && S.value.some((t) => t.id === e.basemapId) && (te.value = e.basemapId), e.layerIds != null) {
|
|
2295
|
-
C.value = e.layerIds.filter((e) => {
|
|
2296
|
-
let t = re.value.find((t) => t.id === e);
|
|
2297
|
-
if (!t || !c(t)) return !1;
|
|
2298
|
-
let n = f(t);
|
|
2299
|
-
return n == null || se.value >= n;
|
|
2300
|
-
}), w.value = {};
|
|
2301
|
-
for (let e of C.value) P(e, "loading");
|
|
2302
|
-
}
|
|
2303
|
-
e.applicationsVisible != null && (x.value = e.applicationsVisible);
|
|
2304
|
-
}
|
|
2305
|
-
async function M() {
|
|
2306
|
-
let e = await ae("map");
|
|
2307
|
-
S.value = e.baseLayers, te.value = e.baseLayers[0]?.id ?? e.defaultBaseId, ne.value = e.overlays.find((e) => e.kind === "applications") ?? null, re.value = e.overlays.filter((e) => e.kind === "raster" || e.kind === "vector"), C.value = re.value.filter((e) => {
|
|
2308
|
-
if (!e.defaultVisible || !c(e)) return !1;
|
|
2309
|
-
let t = f(e);
|
|
2310
|
-
return t == null || se.value >= t;
|
|
2311
|
-
}).map((e) => e.id), ie.value = Object.fromEntries(re.value.map((e) => [e.id, Math.round(d(e) * 100)])), w.value = {};
|
|
2312
|
-
for (let e of C.value) P(e, "loading");
|
|
2313
|
-
ne.value && (x.value = ne.value.defaultVisible, ee.value = Math.round(ne.value.opacity * 100));
|
|
2314
|
-
}
|
|
2315
|
-
function N(e) {
|
|
2316
|
-
let t = O.get(e);
|
|
2317
|
-
t && (clearTimeout(t), O.delete(e));
|
|
2318
|
-
}
|
|
2319
|
-
function P(e, t) {
|
|
2320
|
-
N(e), w.value = {
|
|
2321
|
-
...w.value,
|
|
2322
|
-
[e]: t
|
|
2323
|
-
}, t === "loading" && O.set(e, setTimeout(() => {
|
|
2324
|
-
w.value[e] === "loading" && (w.value = {
|
|
2325
|
-
...w.value,
|
|
2326
|
-
[e]: "error"
|
|
2327
|
-
}), O.delete(e);
|
|
2328
|
-
}, 1e4));
|
|
2329
|
-
}
|
|
2330
|
-
function F(e) {
|
|
2331
|
-
let t = re.value.find((t) => t.id === e);
|
|
2332
|
-
if (!t || !c(t)) return !1;
|
|
2333
|
-
let n = f(t);
|
|
2334
|
-
return n == null || se.value >= n;
|
|
2335
|
-
}
|
|
2336
|
-
function I(e) {
|
|
2337
|
-
let t = C.value, r = !t.includes(e);
|
|
2338
|
-
if (!r || F(e)) {
|
|
2339
|
-
if (C.value = r ? [...t, e] : t.filter((t) => t !== e), !r) {
|
|
2340
|
-
N(e);
|
|
2341
|
-
let t = { ...w.value };
|
|
2342
|
-
delete t[e], w.value = t;
|
|
2343
|
-
return;
|
|
2344
|
-
}
|
|
2345
|
-
n.value?.overlaySourceReady(e) ? P(e, "ready") : P(e, "loading");
|
|
2346
|
-
}
|
|
2347
|
-
}
|
|
2348
|
-
function L(e, t) {
|
|
2349
|
-
ie.value = {
|
|
2350
|
-
...ie.value,
|
|
2351
|
-
[e]: t
|
|
2352
|
-
};
|
|
2353
|
-
}
|
|
2354
|
-
function z(e) {
|
|
2355
|
-
if (!C.value.includes(e)) {
|
|
2356
|
-
if (!F(e)) return;
|
|
2357
|
-
C.value = [...C.value, e];
|
|
2358
|
-
}
|
|
2359
|
-
P(e, "loading"), n.value?.reloadOverlay(e);
|
|
2360
|
-
}
|
|
2361
|
-
function de(e) {
|
|
2362
|
-
n.value?.zoomToOverlay(e);
|
|
2363
|
-
}
|
|
2364
|
-
let B = R(Object.fromEntries(g.map((e) => [e, 0]))), V = R(new Set(Nt.map((e) => e.key))), U = R(null), W = R(null), G = R(null), K = R(null), q = R([]), J = R(0), Y = R(1), X = R(null), Z = R(!1), pe = R(""), Q = 0, me = R({
|
|
2365
|
-
width: 0,
|
|
2366
|
-
height: 0
|
|
2367
|
-
}), he = D(() => g.reduce((e, t) => e + (B.value[t] ?? 0), 0)), ge = D(() => x.value ? [...V.value].reduce((e, t) => e + (B.value[t] ?? 0), 0) : 0);
|
|
2368
|
-
function _e() {
|
|
2369
|
-
V.value = new Set(Nt.map((e) => e.key));
|
|
2370
|
-
}
|
|
2371
|
-
function ve() {
|
|
2372
|
-
V.value = /* @__PURE__ */ new Set();
|
|
2373
|
-
}
|
|
2374
|
-
function ye(e) {
|
|
2375
|
-
let t = new Set(V.value);
|
|
2376
|
-
t.has(e) ? t.delete(e) : t.add(e), V.value = t;
|
|
2377
|
-
}
|
|
2378
|
-
let be = D(() => Math.max(1, Math.ceil(J.value / 10)));
|
|
2379
|
-
function xe(e, t) {
|
|
2380
|
-
U.value = e, W.value = t;
|
|
2381
|
-
}
|
|
2382
|
-
function Se() {
|
|
2383
|
-
Q += 1, K.value = null, q.value = [], J.value = 0, Y.value = 1, G.value = null, X.value = null, Z.value = !1, pe.value = "";
|
|
2384
|
-
}
|
|
2385
|
-
function Ce(e) {
|
|
2386
|
-
X.value = e, G.value = e.app_id;
|
|
2387
|
-
}
|
|
2388
|
-
async function we(e) {
|
|
2389
|
-
if (!e.sel) return;
|
|
2390
|
-
let t = e.view ? {
|
|
2391
|
-
lng: e.view.lng,
|
|
2392
|
-
lat: e.view.lat
|
|
2393
|
-
} : T.value ? {
|
|
2394
|
-
lng: T.value.lng,
|
|
2395
|
-
lat: T.value.lat
|
|
2396
|
-
} : null;
|
|
2397
|
-
if (t) {
|
|
2398
|
-
await $(t, e.identifyPage);
|
|
2399
|
-
let n = li(q.value, e.sel);
|
|
2400
|
-
if (n) {
|
|
2401
|
-
Ce(n);
|
|
2402
|
-
return;
|
|
2403
|
-
}
|
|
2404
|
-
}
|
|
2405
|
-
pe.value = "", Z.value = !0;
|
|
2406
|
-
try {
|
|
2407
|
-
let n = await ke(e.sel), r = t ?? T.value ?? {
|
|
2408
|
-
lng: 24.0297,
|
|
2409
|
-
lat: 49.8397
|
|
2410
|
-
};
|
|
2411
|
-
K.value = r, q.value = [n], J.value = 1, Y.value = 1, Ce(n);
|
|
2412
|
-
} catch (e) {
|
|
2413
|
-
pe.value = e instanceof Error ? e.message : "Не вдалося завантажити звернення", t && (K.value = t);
|
|
2414
|
-
} finally {
|
|
2415
|
-
Z.value = !1;
|
|
2416
|
-
}
|
|
2417
|
-
}
|
|
2418
|
-
function Te(e) {
|
|
2419
|
-
T.value = e, se.value = e.zoom;
|
|
2420
|
-
}
|
|
2421
|
-
let { readInitialRouteState: Ee, bindMapRouteSync: De, syncRouteNow: Me, clearViewDebounce: Ne } = ci({
|
|
2422
|
-
mapView: T,
|
|
2423
|
-
sel: G,
|
|
2424
|
-
identifyPage: Y,
|
|
2425
|
-
basemapId: te,
|
|
2426
|
-
defaultBasemapId: k,
|
|
2427
|
-
activeOverlayIds: C,
|
|
2428
|
-
applicationsVisible: x,
|
|
2429
|
-
visibleStatuses: V,
|
|
2430
|
-
searchQuery: i,
|
|
2431
|
-
appliedSearch: a,
|
|
2432
|
-
advancedFilters: h
|
|
2433
|
-
}, { onViewFromRoute: (e) => {
|
|
2434
|
-
n.value?.setView(e, !1);
|
|
2435
|
-
} });
|
|
2436
|
-
async function $(e, t) {
|
|
2437
|
-
let n = ++Q, r = K.value?.lng === e.lng && K.value?.lat === e.lat;
|
|
2438
|
-
if (K.value = e, Y.value = t, X.value = null, G.value = null, pe.value = "", Z.value = !0, r || (q.value = [], J.value = 0), !V.value.size) {
|
|
2439
|
-
q.value = [], J.value = 0, Z.value = !1;
|
|
2440
|
-
return;
|
|
2441
|
-
}
|
|
2442
|
-
try {
|
|
2443
|
-
let r = await Ae(e.lng, e.lat, t, V.value);
|
|
2444
|
-
if (n !== Q) return;
|
|
2445
|
-
q.value = r.data, J.value = r.total, Y.value = r.page, r.total === 1 && r.data[0] && Ce(r.data[0]);
|
|
2446
|
-
} catch (e) {
|
|
2447
|
-
if (n !== Q) return;
|
|
2448
|
-
q.value = [], J.value = 0, pe.value = e instanceof Error ? e.message : "Не вдалося завантажити звернення";
|
|
2449
|
-
} finally {
|
|
2450
|
-
n === Q && (Z.value = !1);
|
|
2451
|
-
}
|
|
2452
|
-
}
|
|
2453
|
-
function Pe(e) {
|
|
2454
|
-
if (!e) {
|
|
2455
|
-
Se();
|
|
2456
|
-
return;
|
|
2457
|
-
}
|
|
2458
|
-
$(e, 1);
|
|
2459
|
-
}
|
|
2460
|
-
function Fe(e) {
|
|
2461
|
-
let t = K.value;
|
|
2462
|
-
!t || e < 1 || e > be.value || $(t, e);
|
|
2463
|
-
}
|
|
2464
|
-
function Ie() {
|
|
2465
|
-
X.value = null, G.value = null;
|
|
2466
|
-
}
|
|
2467
|
-
function Le() {
|
|
2468
|
-
r.value && (me.value = {
|
|
2469
|
-
width: r.value.clientWidth,
|
|
2470
|
-
height: r.value.clientHeight
|
|
2471
|
-
});
|
|
2472
|
-
}
|
|
2473
|
-
H(() => Array.from(V.value).sort().join(","), () => {
|
|
2474
|
-
let e = K.value;
|
|
2475
|
-
e && (q.value = q.value.filter((e) => V.value.has(e.status ?? "")), $(e, 1));
|
|
2476
|
-
});
|
|
2477
|
-
function ze() {
|
|
2478
|
-
o.value = [], l.value = !1, u.value = !1, m.value = "";
|
|
2479
|
-
}
|
|
2480
|
-
function Be(e) {
|
|
2481
|
-
Se(), G.value = e.id, n.value?.fitApplicationGeometry(e.geometry);
|
|
2482
|
-
}
|
|
2483
|
-
async function Ve(e) {
|
|
2484
|
-
let t = e.trim();
|
|
2485
|
-
if (y?.abort(), !t) {
|
|
2486
|
-
ze();
|
|
2487
|
-
return;
|
|
2488
|
-
}
|
|
2489
|
-
let n = ++b, r = new AbortController();
|
|
2490
|
-
y = r, l.value = !0, u.value = !1, m.value = "", o.value = [];
|
|
2491
|
-
try {
|
|
2492
|
-
let e = await je(t, { signal: r.signal });
|
|
2493
|
-
if (n !== b) return;
|
|
2494
|
-
o.value = e.data, u.value = e.total === 0, e.total === 1 && e.data[0] && Be(e.data[0]);
|
|
2495
|
-
} catch (e) {
|
|
2496
|
-
if (r.signal.aborted || n !== b) return;
|
|
2497
|
-
o.value = [], u.value = !1, m.value = e instanceof Error ? e.message : "Не вдалося виконати пошук";
|
|
2498
|
-
} finally {
|
|
2499
|
-
n === b && (l.value = !1);
|
|
2500
|
-
}
|
|
2501
|
-
}
|
|
2502
|
-
H(i, (e) => {
|
|
2503
|
-
clearTimeout(v);
|
|
2504
|
-
let t = e.trim();
|
|
2505
|
-
if (!t) {
|
|
2506
|
-
a.value = "", b += 1, y?.abort(), ze();
|
|
2507
|
-
return;
|
|
2508
|
-
}
|
|
2509
|
-
v = setTimeout(() => {
|
|
2510
|
-
a.value = t, Ve(e);
|
|
2511
|
-
}, ui);
|
|
2512
|
-
});
|
|
2513
|
-
let He;
|
|
2514
|
-
le(async () => {
|
|
2515
|
-
Le(), r.value && (He = new ResizeObserver(Le), He.observe(r.value));
|
|
2516
|
-
let e = Ee();
|
|
2517
|
-
E.value = e.view, e.view && (T.value = e.view), e.search && Ve(e.search), await M(), j(e), await ce(), e.view && n.value?.setView(e.view, !1), await we(e), De(), Me(), Oe().then((e) => {
|
|
2518
|
-
B.value = e;
|
|
2519
|
-
}).catch((e) => {
|
|
2520
|
-
console.error(e);
|
|
2521
|
-
});
|
|
2522
|
-
}), ue(() => {
|
|
2523
|
-
He?.disconnect(), clearTimeout(v), Ne(), y?.abort();
|
|
2524
|
-
for (let e of O.values()) clearTimeout(e);
|
|
2525
|
-
O.clear();
|
|
2526
|
-
});
|
|
2527
|
-
let Ue = {
|
|
2528
|
-
mapViewRef: n,
|
|
2529
|
-
containerRef: r,
|
|
2530
|
-
SEARCH_DEBOUNCE_MS: ui,
|
|
2531
|
-
searchQuery: i,
|
|
2532
|
-
appliedSearch: a,
|
|
2533
|
-
searchResults: o,
|
|
2534
|
-
searchLoading: l,
|
|
2535
|
-
searchEmpty: u,
|
|
2536
|
-
searchError: m,
|
|
2537
|
-
advancedFilters: h,
|
|
2538
|
-
mapFilters: _,
|
|
2539
|
-
get searchTimer() {
|
|
2540
|
-
return v;
|
|
2541
|
-
},
|
|
2542
|
-
set searchTimer(e) {
|
|
2543
|
-
v = e;
|
|
2544
|
-
},
|
|
2545
|
-
get searchAbort() {
|
|
2546
|
-
return y;
|
|
2547
|
-
},
|
|
2548
|
-
set searchAbort(e) {
|
|
2549
|
-
y = e;
|
|
2550
|
-
},
|
|
2551
|
-
get searchRequestId() {
|
|
2552
|
-
return b;
|
|
2553
|
-
},
|
|
2554
|
-
set searchRequestId(e) {
|
|
2555
|
-
b = e;
|
|
2556
|
-
},
|
|
2557
|
-
applicationsVisible: x,
|
|
2558
|
-
applicationsOpacity: ee,
|
|
2559
|
-
basemapId: te,
|
|
2560
|
-
baseLayers: S,
|
|
2561
|
-
applicationsLayer: ne,
|
|
2562
|
-
overlayLayers: re,
|
|
2563
|
-
activeOverlayIds: C,
|
|
2564
|
-
overlayOpacities: ie,
|
|
2565
|
-
overlayLoad: w,
|
|
2566
|
-
settingsZoom: oe,
|
|
2567
|
-
mapZoom: se,
|
|
2568
|
-
mapView: T,
|
|
2569
|
-
mapInitialView: E,
|
|
2570
|
-
overlayLoadTimers: O,
|
|
2571
|
-
defaultBasemapId: k,
|
|
2572
|
-
activeBasemap: A,
|
|
2573
|
-
applyLayerStateFromRoute: j,
|
|
2574
|
-
loadLayerSettings: M,
|
|
2575
|
-
clearOverlayLoadTimer: N,
|
|
2576
|
-
setOverlayLoad: P,
|
|
2577
|
-
overlayCanTurnOn: F,
|
|
2578
|
-
toggleOverlay: I,
|
|
2579
|
-
setOverlayOpacity: L,
|
|
2580
|
-
retryOverlay: z,
|
|
2581
|
-
zoomToOverlay: de,
|
|
2582
|
-
statusCounts: B,
|
|
2583
|
-
visibleStatuses: V,
|
|
2584
|
-
hovered: U,
|
|
2585
|
-
hoverPosition: W,
|
|
2586
|
-
selectedId: G,
|
|
2587
|
-
identifyPoint: K,
|
|
2588
|
-
identifyRows: q,
|
|
2589
|
-
identifyTotal: J,
|
|
2590
|
-
identifyPage: Y,
|
|
2591
|
-
selectedApplication: X,
|
|
2592
|
-
selectedLoading: Z,
|
|
2593
|
-
selectedError: pe,
|
|
2594
|
-
get selectRequestId() {
|
|
2595
|
-
return Q;
|
|
2596
|
-
},
|
|
2597
|
-
set selectRequestId(e) {
|
|
2598
|
-
Q = e;
|
|
2599
|
-
},
|
|
2600
|
-
containerSize: me,
|
|
2601
|
-
totalCount: he,
|
|
2602
|
-
visibleCount: ge,
|
|
2603
|
-
selectAllStatuses: _e,
|
|
2604
|
-
clearStatuses: ve,
|
|
2605
|
-
toggleStatus: ye,
|
|
2606
|
-
identifyPageCount: be,
|
|
2607
|
-
handlePointHover: xe,
|
|
2608
|
-
closeSelection: Se,
|
|
2609
|
-
openIdentifiedApplication: Ce,
|
|
2610
|
-
restoreSelectionFromRoute: we,
|
|
2611
|
-
handleViewChange: Te,
|
|
2612
|
-
readInitialRouteState: Ee,
|
|
2613
|
-
bindMapRouteSync: De,
|
|
2614
|
-
syncRouteNow: Me,
|
|
2615
|
-
clearViewDebounce: Ne,
|
|
2616
|
-
loadIdentifiedApplications: $,
|
|
2617
|
-
handlePointSelect: Pe,
|
|
2618
|
-
showIdentifyPage: Fe,
|
|
2619
|
-
backToIdentifyList: Ie,
|
|
2620
|
-
updateContainerSize: Le,
|
|
2621
|
-
clearSearchState: ze,
|
|
2622
|
-
selectSearchResult: Be,
|
|
2623
|
-
runMapSearch: Ve,
|
|
2624
|
-
get resizeObserver() {
|
|
2625
|
-
return He;
|
|
2626
|
-
},
|
|
2627
|
-
set resizeObserver(e) {
|
|
2628
|
-
He = e;
|
|
2629
|
-
},
|
|
2630
|
-
MapView: Ze,
|
|
2631
|
-
MapLayersPanel: Zn,
|
|
2632
|
-
MapControls: ir,
|
|
2633
|
-
MapPointTooltip: wr,
|
|
2634
|
-
MapApplicationPanel: Zr
|
|
2635
|
-
};
|
|
2636
|
-
return Object.defineProperty(Ue, "__isScriptSetup", {
|
|
2637
|
-
enumerable: !1,
|
|
2638
|
-
value: !0
|
|
2639
|
-
}), Ue;
|
|
2640
|
-
}
|
|
2641
|
-
}), fi = { class: "flex h-full min-h-0 w-full flex-1 flex-col" }, pi = {
|
|
2642
|
-
ref: "containerRef",
|
|
2643
|
-
class: "relative h-full min-h-0 flex-1 overflow-hidden bg-slate-100"
|
|
2644
|
-
};
|
|
2645
|
-
function mi(e, t, n, r, i, a) {
|
|
2646
|
-
return L(), A("div", fi, [j("div", pi, [
|
|
2647
|
-
N(r.MapView, {
|
|
2648
|
-
ref: "mapViewRef",
|
|
2649
|
-
basemap: r.activeBasemap,
|
|
2650
|
-
overlays: r.overlayLayers,
|
|
2651
|
-
"active-overlay-ids": r.activeOverlayIds,
|
|
2652
|
-
"overlay-opacities": r.overlayOpacities,
|
|
2653
|
-
"visible-statuses": r.visibleStatuses,
|
|
2654
|
-
"selected-id": r.selectedId,
|
|
2655
|
-
"applications-visible": r.applicationsVisible,
|
|
2656
|
-
"applications-opacity": r.applicationsOpacity,
|
|
2657
|
-
filters: r.mapFilters,
|
|
2658
|
-
"initial-view": r.mapInitialView,
|
|
2659
|
-
onPointHover: r.handlePointHover,
|
|
2660
|
-
onPointSelect: r.handlePointSelect,
|
|
2661
|
-
onZoom: t[0] ||= (e) => r.mapZoom = e,
|
|
2662
|
-
onViewChange: r.handleViewChange,
|
|
2663
|
-
onOverlayLoad: r.setOverlayLoad
|
|
2664
|
-
}, null, 8, [
|
|
2665
|
-
"basemap",
|
|
2666
|
-
"overlays",
|
|
2667
|
-
"active-overlay-ids",
|
|
2668
|
-
"overlay-opacities",
|
|
2669
|
-
"visible-statuses",
|
|
2670
|
-
"selected-id",
|
|
2671
|
-
"applications-visible",
|
|
2672
|
-
"applications-opacity",
|
|
2673
|
-
"filters",
|
|
2674
|
-
"initial-view"
|
|
2675
|
-
]),
|
|
2676
|
-
N(r.MapLayersPanel, {
|
|
2677
|
-
"search-query": r.searchQuery,
|
|
2678
|
-
"onUpdate:searchQuery": t[1] ||= (e) => r.searchQuery = e,
|
|
2679
|
-
"applications-visible": r.applicationsVisible,
|
|
2680
|
-
"onUpdate:applicationsVisible": t[2] ||= (e) => r.applicationsVisible = e,
|
|
2681
|
-
"applications-opacity": r.applicationsOpacity,
|
|
2682
|
-
"onUpdate:applicationsOpacity": t[3] ||= (e) => r.applicationsOpacity = e,
|
|
2683
|
-
filters: r.advancedFilters,
|
|
2684
|
-
"onUpdate:filters": t[4] ||= (e) => r.advancedFilters = e,
|
|
2685
|
-
"visible-statuses": r.visibleStatuses,
|
|
2686
|
-
"status-counts": r.statusCounts,
|
|
2687
|
-
"total-count": r.totalCount,
|
|
2688
|
-
"basemap-id": r.basemapId,
|
|
2689
|
-
"base-layers": r.baseLayers,
|
|
2690
|
-
overlays: r.overlayLayers,
|
|
2691
|
-
"active-overlay-ids": r.activeOverlayIds,
|
|
2692
|
-
"overlay-opacities": r.overlayOpacities,
|
|
2693
|
-
"overlay-load": r.overlayLoad,
|
|
2694
|
-
"map-zoom": r.mapZoom,
|
|
2695
|
-
"applications-name": r.applicationsLayer?.label,
|
|
2696
|
-
onToggleOverlay: r.toggleOverlay,
|
|
2697
|
-
onOverlayOpacity: r.setOverlayOpacity,
|
|
2698
|
-
onZoomToOverlay: r.zoomToOverlay,
|
|
2699
|
-
onRetryOverlay: r.retryOverlay,
|
|
2700
|
-
onToggleStatus: r.toggleStatus,
|
|
2701
|
-
onSelectAllStatuses: r.selectAllStatuses,
|
|
2702
|
-
onClearStatuses: r.clearStatuses,
|
|
2703
|
-
onBasemapChange: t[5] ||= (e) => r.basemapId = e,
|
|
2704
|
-
"search-loading": r.searchLoading,
|
|
2705
|
-
"search-results": r.searchResults,
|
|
2706
|
-
"search-empty": r.searchEmpty,
|
|
2707
|
-
"search-error": r.searchError,
|
|
2708
|
-
onSelectSearchResult: r.selectSearchResult
|
|
2709
|
-
}, null, 8, [
|
|
2710
|
-
"search-query",
|
|
2711
|
-
"applications-visible",
|
|
2712
|
-
"applications-opacity",
|
|
2713
|
-
"filters",
|
|
2714
|
-
"visible-statuses",
|
|
2715
|
-
"status-counts",
|
|
2716
|
-
"total-count",
|
|
2717
|
-
"basemap-id",
|
|
2718
|
-
"base-layers",
|
|
2719
|
-
"overlays",
|
|
2720
|
-
"active-overlay-ids",
|
|
2721
|
-
"overlay-opacities",
|
|
2722
|
-
"overlay-load",
|
|
2723
|
-
"map-zoom",
|
|
2724
|
-
"applications-name",
|
|
2725
|
-
"search-loading",
|
|
2726
|
-
"search-results",
|
|
2727
|
-
"search-empty",
|
|
2728
|
-
"search-error"
|
|
2729
|
-
]),
|
|
2730
|
-
N(r.MapControls, {
|
|
2731
|
-
"visible-count": r.visibleCount,
|
|
2732
|
-
onZoomIn: t[6] ||= (e) => r.mapViewRef?.zoomIn(),
|
|
2733
|
-
onZoomOut: t[7] ||= (e) => r.mapViewRef?.zoomOut(),
|
|
2734
|
-
onResetView: t[8] ||= (e) => r.mapViewRef?.resetView()
|
|
2735
|
-
}, null, 8, ["visible-count"]),
|
|
2736
|
-
r.identifyPoint ? (L(), O(r.MapApplicationPanel, {
|
|
2737
|
-
key: 0,
|
|
2738
|
-
rows: r.identifyRows,
|
|
2739
|
-
total: r.identifyTotal,
|
|
2740
|
-
page: r.identifyPage,
|
|
2741
|
-
"page-count": r.identifyPageCount,
|
|
2742
|
-
application: r.selectedApplication,
|
|
2743
|
-
loading: r.selectedLoading,
|
|
2744
|
-
error: r.selectedError,
|
|
2745
|
-
onClose: r.closeSelection,
|
|
2746
|
-
onBack: r.backToIdentifyList,
|
|
2747
|
-
onSelect: r.openIdentifiedApplication,
|
|
2748
|
-
onPage: r.showIdentifyPage
|
|
2749
|
-
}, null, 8, [
|
|
2750
|
-
"rows",
|
|
2751
|
-
"total",
|
|
2752
|
-
"page",
|
|
2753
|
-
"page-count",
|
|
2754
|
-
"application",
|
|
2755
|
-
"loading",
|
|
2756
|
-
"error"
|
|
2757
|
-
])) : k("", !0),
|
|
2758
|
-
r.hovered?.points.length && r.hoverPosition ? (L(), O(r.MapPointTooltip, {
|
|
2759
|
-
key: 1,
|
|
2760
|
-
points: r.hovered.points,
|
|
2761
|
-
total: r.hovered.total,
|
|
2762
|
-
position: r.hoverPosition,
|
|
2763
|
-
"container-width": r.containerSize.width,
|
|
2764
|
-
"container-height": r.containerSize.height
|
|
2765
|
-
}, null, 8, [
|
|
2766
|
-
"points",
|
|
2767
|
-
"total",
|
|
2768
|
-
"position",
|
|
2769
|
-
"container-width",
|
|
2770
|
-
"container-height"
|
|
2771
|
-
])) : k("", !0)
|
|
2772
|
-
], 512)]);
|
|
2773
|
-
}
|
|
2774
|
-
var hi = /*#__PURE__*/ e(di, [["render", mi], ["__file", "C:/softpro/surveyor/admin/src/pages/map/index.vue"]]);
|
|
2775
|
-
//#endregion
|
|
2776
|
-
export { hi as default };
|