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