@teritorio/openstreetmap-logical-history-component 0.3.0 → 0.4.0
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/README.md +53 -18
- package/dist/index.css +1 -1
- package/dist/index.d.ts +25 -25
- package/dist/index.js +591 -538
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a,
|
|
2
|
-
import
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, createVNode as s, customRef as c, defineComponent as l, getCurrentInstance as u, getCurrentScope as d, guardReactiveProps as f, inject as p, mergeProps as m, nextTick as h, normalizeClass as g, normalizeProps as _, onMounted as v, onScopeDispose as y, openBlock as b, provide as x, readonly as S, ref as C, renderList as w, renderSlot as T, shallowRef as E, toDisplayString as D, toRef as O, toValue as k, unref as A, useCssVars as ee, useSlots as te, useTemplateRef as ne, watch as j, withCtx as M, withDirectives as re, withModifiers as N } from "vue";
|
|
2
|
+
import ie from "maplibre-gl";
|
|
3
3
|
//#region \0rolldown/runtime.js
|
|
4
|
-
var
|
|
5
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i =
|
|
4
|
+
var ae = Object.create, oe = Object.defineProperty, se = Object.getOwnPropertyDescriptor, ce = Object.getOwnPropertyNames, le = Object.getPrototypeOf, ue = Object.prototype.hasOwnProperty, de = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), fe = (e, t, n, r) => {
|
|
5
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = ce(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !ue.call(e, s) && s !== n && oe(e, s, {
|
|
6
6
|
get: ((e) => t[e]).bind(null, s),
|
|
7
|
-
enumerable: !(r =
|
|
7
|
+
enumerable: !(r = se(t, s)) || r.enumerable
|
|
8
8
|
});
|
|
9
9
|
return e;
|
|
10
|
-
},
|
|
10
|
+
}, pe = (e, t, n) => (n = e == null ? {} : ae(le(e)), fe(t || !e || !e.__esModule ? oe(n, "default", {
|
|
11
11
|
value: e,
|
|
12
12
|
enumerable: !0
|
|
13
|
-
}) : n, e)), P = 6371008.8,
|
|
13
|
+
}) : n, e)), P = 6371008.8, me = {
|
|
14
14
|
centimeters: P * 100,
|
|
15
15
|
centimetres: P * 100,
|
|
16
16
|
degrees: 360 / (2 * Math.PI),
|
|
@@ -31,17 +31,17 @@ function F(e, t, n = {}) {
|
|
|
31
31
|
let r = { type: "Feature" };
|
|
32
32
|
return (n.id === 0 || n.id) && (r.id = n.id), n.bbox && (r.bbox = n.bbox), r.properties = t || {}, r.geometry = e, r;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function he(e, t, n = {}) {
|
|
35
35
|
if (!e) throw Error("coordinates is required");
|
|
36
36
|
if (!Array.isArray(e)) throw Error("coordinates must be an Array");
|
|
37
37
|
if (e.length < 2) throw Error("coordinates must be at least 2 numbers long");
|
|
38
|
-
if (!
|
|
38
|
+
if (!xe(e[0]) || !xe(e[1])) throw Error("coordinates must contain numbers");
|
|
39
39
|
return F({
|
|
40
40
|
type: "Point",
|
|
41
41
|
coordinates: e
|
|
42
42
|
}, t, n);
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function ge(e, t, n = {}) {
|
|
45
45
|
for (let t of e) {
|
|
46
46
|
if (t.length < 4) throw Error("Each LinearRing of a Polygon must have 4 or more Positions.");
|
|
47
47
|
if (t[t.length - 1].length !== t[0].length) throw Error("First and last Position are not equivalent.");
|
|
@@ -63,38 +63,38 @@ function L(e, t = {}) {
|
|
|
63
63
|
let n = { type: "FeatureCollection" };
|
|
64
64
|
return t.id && (n.id = t.id), t.bbox && (n.bbox = t.bbox), n.features = e, n;
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function _e(e, t, n = {}) {
|
|
67
67
|
return F({
|
|
68
68
|
type: "MultiLineString",
|
|
69
69
|
coordinates: e
|
|
70
70
|
}, t, n);
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function ve(e, t, n = {}) {
|
|
73
73
|
return F({
|
|
74
74
|
type: "MultiPolygon",
|
|
75
75
|
coordinates: e
|
|
76
76
|
}, t, n);
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
let n =
|
|
78
|
+
function ye(e, t = "kilometers") {
|
|
79
|
+
let n = me[t];
|
|
80
80
|
if (!n) throw Error(t + " units is invalid");
|
|
81
81
|
return e * n;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function be(e) {
|
|
84
84
|
return e % (2 * Math.PI) * 180 / Math.PI;
|
|
85
85
|
}
|
|
86
86
|
function R(e) {
|
|
87
87
|
return e % 360 * Math.PI / 180;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function xe(e) {
|
|
90
90
|
return !isNaN(e) && e !== null && !Array.isArray(e);
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function Se(e) {
|
|
93
93
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
94
94
|
}
|
|
95
95
|
//#endregion
|
|
96
96
|
//#region node_modules/@turf/meta/dist/esm/index.js
|
|
97
|
-
function
|
|
97
|
+
function Ce(e, t, n) {
|
|
98
98
|
if (e !== null) for (var r, i, a, o, s, c, l, u = 0, d = 0, f, p = e.type, m = p === "FeatureCollection", h = p === "Feature", g = m ? e.features.length : 1, _ = 0; _ < g; _++) {
|
|
99
99
|
l = m ? e.features[_].geometry : h ? e.geometry : e, f = l ? l.type === "GeometryCollection" : !1, s = f ? l.geometries.length : 1;
|
|
100
100
|
for (var v = 0; v < s; v++) {
|
|
@@ -140,7 +140,7 @@ function Se(e, t, n) {
|
|
|
140
140
|
}
|
|
141
141
|
break;
|
|
142
142
|
case "GeometryCollection":
|
|
143
|
-
for (r = 0; r < o.geometries.length; r++) if (
|
|
143
|
+
for (r = 0; r < o.geometries.length; r++) if (Ce(o.geometries[r], t, n) === !1) return !1;
|
|
144
144
|
break;
|
|
145
145
|
default: throw Error("Unknown Geometry Type");
|
|
146
146
|
}
|
|
@@ -148,17 +148,17 @@ function Se(e, t, n) {
|
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function we(e, t) {
|
|
152
152
|
if (e.type === "Feature") t(e, 0);
|
|
153
153
|
else if (e.type === "FeatureCollection") for (var n = 0; n < e.features.length && t(e.features[n], n) !== !1; n++);
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function Te(e, t, n) {
|
|
156
156
|
var r = n;
|
|
157
|
-
return
|
|
157
|
+
return we(e, function(e, i) {
|
|
158
158
|
r = i === 0 && n === void 0 ? e : t(r, e, i);
|
|
159
159
|
}), r;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function Ee(e, t) {
|
|
162
162
|
var n, r, i, a, o, s, c, l, u, d, f = 0, p = e.type === "FeatureCollection", m = e.type === "Feature", h = p ? e.features.length : 1;
|
|
163
163
|
for (n = 0; n < h; n++) {
|
|
164
164
|
for (s = p ? e.features[n].geometry : m ? e.geometry : e, l = p ? e.features[n].properties : m ? e.properties : {}, u = p ? e.features[n].bbox : m ? e.bbox : void 0, d = p ? e.features[n].id : m ? e.id : void 0, c = s ? s.type === "GeometryCollection" : !1, o = c ? s.geometries.length : 1, i = 0; i < o; i++) {
|
|
@@ -184,14 +184,14 @@ function Te(e, t) {
|
|
|
184
184
|
f++;
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function De(e, t, n) {
|
|
188
188
|
var r = n;
|
|
189
|
-
return
|
|
189
|
+
return Ee(e, function(e, i, a, o, s) {
|
|
190
190
|
r = i === 0 && n === void 0 ? e : t(r, e, i, a, o, s);
|
|
191
191
|
}), r;
|
|
192
192
|
}
|
|
193
|
-
function
|
|
194
|
-
|
|
193
|
+
function Oe(e, t) {
|
|
194
|
+
Ee(e, function(e, n, r, i, a) {
|
|
195
195
|
var o = e === null ? null : e.type;
|
|
196
196
|
switch (o) {
|
|
197
197
|
case null:
|
|
@@ -225,15 +225,15 @@ function De(e, t) {
|
|
|
225
225
|
}
|
|
226
226
|
//#endregion
|
|
227
227
|
//#region node_modules/@turf/area/dist/esm/index.js
|
|
228
|
-
function Oe(e) {
|
|
229
|
-
return Ee(e, (e, t) => e + ke(t), 0);
|
|
230
|
-
}
|
|
231
228
|
function ke(e) {
|
|
229
|
+
return De(e, (e, t) => e + Ae(t), 0);
|
|
230
|
+
}
|
|
231
|
+
function Ae(e) {
|
|
232
232
|
let t = 0, n;
|
|
233
233
|
switch (e.type) {
|
|
234
|
-
case "Polygon": return
|
|
234
|
+
case "Polygon": return je(e.coordinates);
|
|
235
235
|
case "MultiPolygon":
|
|
236
|
-
for (n = 0; n < e.coordinates.length; n++) t +=
|
|
236
|
+
for (n = 0; n < e.coordinates.length; n++) t += je(e.coordinates[n]);
|
|
237
237
|
return t;
|
|
238
238
|
case "Point":
|
|
239
239
|
case "MultiPoint":
|
|
@@ -242,36 +242,36 @@ function ke(e) {
|
|
|
242
242
|
}
|
|
243
243
|
return 0;
|
|
244
244
|
}
|
|
245
|
-
function
|
|
245
|
+
function je(e) {
|
|
246
246
|
let t = 0;
|
|
247
247
|
if (e && e.length > 0) {
|
|
248
|
-
t += Math.abs(
|
|
249
|
-
for (let n = 1; n < e.length; n++) t -= Math.abs(
|
|
248
|
+
t += Math.abs(Pe(e[0]));
|
|
249
|
+
for (let n = 1; n < e.length; n++) t -= Math.abs(Pe(e[n]));
|
|
250
250
|
}
|
|
251
251
|
return t;
|
|
252
252
|
}
|
|
253
|
-
var
|
|
254
|
-
function
|
|
253
|
+
var Me = P * P / 2, Ne = Math.PI / 180;
|
|
254
|
+
function Pe(e) {
|
|
255
255
|
let t = e.length - 1;
|
|
256
256
|
if (t <= 2) return 0;
|
|
257
257
|
let n = 0, r = 0;
|
|
258
258
|
for (; r < t;) {
|
|
259
|
-
let i = e[r], a = e[r + 1 === t ? 0 : r + 1], o = e[r + 2 >= t ? (r + 2) % t : r + 2], s = i[0] *
|
|
259
|
+
let i = e[r], a = e[r + 1 === t ? 0 : r + 1], o = e[r + 2 >= t ? (r + 2) % t : r + 2], s = i[0] * Ne, c = a[1] * Ne, l = o[0] * Ne;
|
|
260
260
|
n += (l - s) * Math.sin(c), r++;
|
|
261
261
|
}
|
|
262
|
-
return n *
|
|
262
|
+
return n * Me;
|
|
263
263
|
}
|
|
264
264
|
//#endregion
|
|
265
265
|
//#region node_modules/geojson-equality-ts/dist/esm/index.js
|
|
266
|
-
var
|
|
266
|
+
var Fe = Object.defineProperty, z = (e, t) => Fe(e, "name", {
|
|
267
267
|
value: t,
|
|
268
268
|
configurable: !0
|
|
269
|
-
}),
|
|
269
|
+
}), Ie = class {
|
|
270
270
|
constructor(e) {
|
|
271
271
|
this.direction = !1, this.compareProperties = !0, this.precision = 10 ** -(e?.precision ?? 17), this.direction = e?.direction ?? !1, this.compareProperties = e?.compareProperties ?? !0;
|
|
272
272
|
}
|
|
273
273
|
compare(e, t) {
|
|
274
|
-
if (e.type !== t.type || !
|
|
274
|
+
if (e.type !== t.type || !Re(e, t)) return !1;
|
|
275
275
|
switch (e.type) {
|
|
276
276
|
case "Point": return this.compareCoord(e.coordinates, t.coordinates);
|
|
277
277
|
case "LineString": return this.compareLine(e.coordinates, t.coordinates);
|
|
@@ -280,7 +280,7 @@ var Pe = Object.defineProperty, z = (e, t) => Pe(e, "name", {
|
|
|
280
280
|
case "Feature": return this.compareFeature(e, t);
|
|
281
281
|
case "FeatureCollection": return this.compareFeatureCollection(e, t);
|
|
282
282
|
default: if (e.type.startsWith("Multi")) {
|
|
283
|
-
let n =
|
|
283
|
+
let n = ze(e), r = ze(t);
|
|
284
284
|
return n.every((e) => r.some((t) => this.compare(e, t)));
|
|
285
285
|
}
|
|
286
286
|
}
|
|
@@ -290,7 +290,7 @@ var Pe = Object.defineProperty, z = (e, t) => Pe(e, "name", {
|
|
|
290
290
|
return e.length === t.length && e.every((e, n) => Math.abs(e - t[n]) < this.precision);
|
|
291
291
|
}
|
|
292
292
|
compareLine(e, t, n = 0, r = !1) {
|
|
293
|
-
if (!
|
|
293
|
+
if (!Re(e, t)) return !1;
|
|
294
294
|
let i = e, a = t;
|
|
295
295
|
if (r && !this.compareCoord(i[0], a[0])) {
|
|
296
296
|
let e = this.fixStartIndex(a, i);
|
|
@@ -319,48 +319,48 @@ var Pe = Object.defineProperty, z = (e, t) => Pe(e, "name", {
|
|
|
319
319
|
return !1;
|
|
320
320
|
}
|
|
321
321
|
compareGeometryCollection(e, t) {
|
|
322
|
-
return
|
|
322
|
+
return Re(e.geometries, t.geometries) && this.compareBBox(e, t) && e.geometries.every((e, n) => this.compare(e, t.geometries[n]));
|
|
323
323
|
}
|
|
324
324
|
compareFeature(e, t) {
|
|
325
|
-
return e.id === t.id && (this.compareProperties ?
|
|
325
|
+
return e.id === t.id && (this.compareProperties ? Ve(e.properties, t.properties) : !0) && this.compareBBox(e, t) && this.compare(e.geometry, t.geometry);
|
|
326
326
|
}
|
|
327
327
|
compareFeatureCollection(e, t) {
|
|
328
|
-
return
|
|
328
|
+
return Re(e.features, t.features) && this.compareBBox(e, t) && e.features.every((e, n) => this.compare(e, t.features[n]));
|
|
329
329
|
}
|
|
330
330
|
compareBBox(e, t) {
|
|
331
331
|
return !e.bbox && !t.bbox || (e.bbox && t.bbox ? this.compareCoord(e.bbox, t.bbox) : !1);
|
|
332
332
|
}
|
|
333
333
|
};
|
|
334
|
-
z(
|
|
335
|
-
var
|
|
336
|
-
function
|
|
334
|
+
z(Ie, "GeojsonEquality");
|
|
335
|
+
var Le = Ie;
|
|
336
|
+
function Re(e, t) {
|
|
337
337
|
return e.coordinates ? e.coordinates.length === t.coordinates.length : e.length === t.length;
|
|
338
338
|
}
|
|
339
|
-
z(
|
|
340
|
-
function
|
|
339
|
+
z(Re, "sameLength");
|
|
340
|
+
function ze(e) {
|
|
341
341
|
return e.coordinates.map((t) => ({
|
|
342
342
|
type: e.type.replace("Multi", ""),
|
|
343
343
|
coordinates: t
|
|
344
344
|
}));
|
|
345
345
|
}
|
|
346
|
-
z(
|
|
347
|
-
function
|
|
348
|
-
return new
|
|
346
|
+
z(ze, "explode");
|
|
347
|
+
function Be(e, t, n) {
|
|
348
|
+
return new Le(n).compare(e, t);
|
|
349
349
|
}
|
|
350
|
-
z(
|
|
351
|
-
function
|
|
350
|
+
z(Be, "geojsonEquality");
|
|
351
|
+
function Ve(e, t) {
|
|
352
352
|
if (e === null && t === null) return !0;
|
|
353
353
|
if (e === null || t === null) return !1;
|
|
354
354
|
let n = Object.keys(e), r = Object.keys(t);
|
|
355
355
|
if (n.length !== r.length) return !1;
|
|
356
356
|
for (var i of n) {
|
|
357
|
-
let n = e[i], r = t[i], a =
|
|
358
|
-
if (a && !
|
|
357
|
+
let n = e[i], r = t[i], a = He(n) && He(r);
|
|
358
|
+
if (a && !Ve(n, r) || !a && n !== r) return !1;
|
|
359
359
|
}
|
|
360
360
|
return !0;
|
|
361
361
|
}
|
|
362
|
-
z(
|
|
363
|
-
var
|
|
362
|
+
z(Ve, "equal");
|
|
363
|
+
var He = /* @__PURE__ */ z((e) => typeof e == "object" && !!e, "isObject");
|
|
364
364
|
//#endregion
|
|
365
365
|
//#region node_modules/@turf/invariant/dist/esm/index.js
|
|
366
366
|
function B(e) {
|
|
@@ -382,7 +382,7 @@ function V(e) {
|
|
|
382
382
|
function H(e) {
|
|
383
383
|
return e.type === "Feature" ? e.geometry : e;
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function Ue(e, t) {
|
|
386
386
|
return e.type === "FeatureCollection" ? "FeatureCollection" : e.type === "GeometryCollection" ? "GeometryCollection" : e.type === "Feature" && e.geometry !== null ? e.geometry.type : e.type;
|
|
387
387
|
}
|
|
388
388
|
//#endregion
|
|
@@ -391,11 +391,11 @@ function U(e, t, n = {}) {
|
|
|
391
391
|
let r = B(e), i = V(t);
|
|
392
392
|
for (let e = 0; e < i.length - 1; e++) {
|
|
393
393
|
let t = !1;
|
|
394
|
-
if (n.ignoreEndVertices && (e === 0 && (t = "start"), e === i.length - 2 && (t = "end"), e === 0 && e + 1 === i.length - 1 && (t = "both")),
|
|
394
|
+
if (n.ignoreEndVertices && (e === 0 && (t = "start"), e === i.length - 2 && (t = "end"), e === 0 && e + 1 === i.length - 1 && (t = "both")), We(i[e], i[e + 1], r, t, n.epsilon === void 0 ? null : n.epsilon)) return !0;
|
|
395
395
|
}
|
|
396
396
|
return !1;
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function We(e, t, n, r, i) {
|
|
399
399
|
let a = n[0], o = n[1], s = e[0], c = e[1], l = t[0], u = t[1], d = n[0] - s, f = n[1] - c, p = l - s, m = u - c, h = d * m - f * p;
|
|
400
400
|
if (i !== null) {
|
|
401
401
|
if (Math.abs(h) > i) return !1;
|
|
@@ -404,25 +404,25 @@ function Ue(e, t, n, r, i) {
|
|
|
404
404
|
}
|
|
405
405
|
//#endregion
|
|
406
406
|
//#region node_modules/@turf/clean-coords/dist/esm/index.js
|
|
407
|
-
function
|
|
407
|
+
function Ge(e, t = {}) {
|
|
408
408
|
var n = typeof t == "object" ? t.mutate : t;
|
|
409
409
|
if (!e) throw Error("geojson is required");
|
|
410
|
-
var r =
|
|
410
|
+
var r = Ue(e), i = [];
|
|
411
411
|
switch (r) {
|
|
412
412
|
case "LineString":
|
|
413
|
-
i =
|
|
413
|
+
i = Ke(e, r);
|
|
414
414
|
break;
|
|
415
415
|
case "MultiLineString":
|
|
416
416
|
case "Polygon":
|
|
417
417
|
V(e).forEach(function(e) {
|
|
418
|
-
i.push(
|
|
418
|
+
i.push(Ke(e, r));
|
|
419
419
|
});
|
|
420
420
|
break;
|
|
421
421
|
case "MultiPolygon":
|
|
422
422
|
V(e).forEach(function(e) {
|
|
423
423
|
var t = [];
|
|
424
424
|
e.forEach(function(e) {
|
|
425
|
-
t.push(
|
|
425
|
+
t.push(Ke(e, r));
|
|
426
426
|
}), i.push(t);
|
|
427
427
|
});
|
|
428
428
|
break;
|
|
@@ -447,31 +447,31 @@ function We(e, t = {}) {
|
|
|
447
447
|
id: e.id
|
|
448
448
|
});
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function Ke(e, t) {
|
|
451
451
|
let n = V(e);
|
|
452
|
-
if (n.length === 2 && !
|
|
452
|
+
if (n.length === 2 && !qe(n[0], n[1])) return n;
|
|
453
453
|
let r = [], i = 0, a = 1, o = 2;
|
|
454
454
|
for (r.push(n[i]); o < n.length;) U(n[a], I([n[i], n[o]])) ? a = o : (r.push(n[a]), i = a, a++, o = a), o++;
|
|
455
455
|
if (r.push(n[a]), t === "Polygon" || t === "MultiPolygon") {
|
|
456
456
|
if (U(r[0], I([r[1], r[r.length - 2]])) && (r.shift(), r.pop(), r.push(r[0])), r.length < 4) throw Error("invalid polygon, fewer than 4 points");
|
|
457
|
-
if (!
|
|
457
|
+
if (!qe(r[0], r[r.length - 1])) throw Error("invalid polygon, first and last points not equal");
|
|
458
458
|
}
|
|
459
459
|
return r;
|
|
460
460
|
}
|
|
461
|
-
function
|
|
461
|
+
function qe(e, t) {
|
|
462
462
|
return e[0] === t[0] && e[1] === t[1];
|
|
463
463
|
}
|
|
464
464
|
//#endregion
|
|
465
465
|
//#region node_modules/@turf/boolean-equal/dist/esm/index.js
|
|
466
|
-
function
|
|
466
|
+
function Je(e, t, n = {}) {
|
|
467
467
|
let r = n.precision;
|
|
468
468
|
if (r = r == null || isNaN(r) ? 6 : r, typeof r != "number" || !(r >= 0)) throw Error("precision must be a positive number");
|
|
469
|
-
return H(e).type === H(t).type ?
|
|
469
|
+
return H(e).type === H(t).type ? Be(Ge(e), Ge(t), { precision: r }) : !1;
|
|
470
470
|
}
|
|
471
|
-
var
|
|
471
|
+
var Ye = Je;
|
|
472
472
|
//#endregion
|
|
473
473
|
//#region src/utils/feature-transform.ts
|
|
474
|
-
function
|
|
474
|
+
function Xe(e) {
|
|
475
475
|
return e.features.map((t) => {
|
|
476
476
|
if (t.id == null) {
|
|
477
477
|
console.warn("Skipping feature with null id");
|
|
@@ -488,7 +488,7 @@ function Ye(e) {
|
|
|
488
488
|
return;
|
|
489
489
|
}
|
|
490
490
|
let i = e.features.find((e) => e.properties.links === t.properties.links && e.id !== t.id);
|
|
491
|
-
return i?.geometry && t.geometry && (t.properties.geom = !
|
|
491
|
+
return i?.geometry && t.geometry && (t.properties.geom = !Ye(t.geometry, i.geometry)), t.id === r.before ? {
|
|
492
492
|
...t,
|
|
493
493
|
properties: {
|
|
494
494
|
...t.properties,
|
|
@@ -509,7 +509,7 @@ function Ye(e) {
|
|
|
509
509
|
} : t;
|
|
510
510
|
}).filter((e) => e !== void 0).sort((e, t) => {
|
|
511
511
|
let n = e.geometry, r = t.geometry;
|
|
512
|
-
return !n && !r ? 0 : n ? r ?
|
|
512
|
+
return !n && !r ? 0 : n ? r ? ke(t) - ke(e) : -1 : 1;
|
|
513
513
|
});
|
|
514
514
|
}
|
|
515
515
|
//#endregion
|
|
@@ -519,14 +519,14 @@ var W = {
|
|
|
519
519
|
delete: "#FF0000",
|
|
520
520
|
updateBefore: "#FFA479",
|
|
521
521
|
updateAfter: "#F2BE00"
|
|
522
|
-
},
|
|
522
|
+
}, Ze = Object.fromEntries([
|
|
523
523
|
"new",
|
|
524
524
|
"delete",
|
|
525
525
|
"updateAfter",
|
|
526
526
|
"updateBefore"
|
|
527
527
|
].map((e) => [e, e]));
|
|
528
|
-
function
|
|
529
|
-
let e =
|
|
528
|
+
function Qe() {
|
|
529
|
+
let e = C(), n = C([]), r = t(() => e.value?.features.length);
|
|
530
530
|
function i(e) {
|
|
531
531
|
return e.reduce((e, t) => {
|
|
532
532
|
let n = t.properties.links;
|
|
@@ -537,7 +537,7 @@ function Ze() {
|
|
|
537
537
|
l();
|
|
538
538
|
let r = {
|
|
539
539
|
...t,
|
|
540
|
-
features:
|
|
540
|
+
features: Xe(t)
|
|
541
541
|
};
|
|
542
542
|
e.value = r, n.value = i(r.features);
|
|
543
543
|
}
|
|
@@ -548,7 +548,7 @@ function Ze() {
|
|
|
548
548
|
return e.filter((e) => e.properties.is_after || e.properties.is_new);
|
|
549
549
|
}
|
|
550
550
|
function c(e) {
|
|
551
|
-
return e.properties.is_new ?
|
|
551
|
+
return e.properties.is_new ? Ze.new : e.properties.deleted ? Ze.delete : e.properties.is_before ? Ze.updateBefore : Ze.updateAfter;
|
|
552
552
|
}
|
|
553
553
|
function l() {
|
|
554
554
|
e.value = void 0, n.value = [];
|
|
@@ -565,108 +565,111 @@ function Ze() {
|
|
|
565
565
|
}
|
|
566
566
|
//#endregion
|
|
567
567
|
//#region src/constants/injectionKeys.ts
|
|
568
|
-
var
|
|
568
|
+
var $e = Symbol("reasonCollapsed"), et = Symbol("loCha"), tt = Symbol("loChaInstanceId"), nt = Symbol("mapStyleUrl"), rt = {
|
|
569
569
|
n: "node",
|
|
570
570
|
w: "way",
|
|
571
571
|
r: "relation"
|
|
572
572
|
};
|
|
573
|
-
function
|
|
574
|
-
return `https://www.openstreetmap.org/${
|
|
573
|
+
function it(e, t) {
|
|
574
|
+
return `https://www.openstreetmap.org/${rt[e]}/${t}/history`;
|
|
575
575
|
}
|
|
576
|
-
function
|
|
576
|
+
function at(e) {
|
|
577
577
|
return `https://www.openstreetmap.org/user/${encodeURIComponent(e)}`;
|
|
578
578
|
}
|
|
579
|
-
function at(e, t) {
|
|
580
|
-
return `http://127.0.0.1:8111/load_object?objects=${e}${t}`;
|
|
581
|
-
}
|
|
582
579
|
function ot(e, t) {
|
|
583
|
-
return `
|
|
580
|
+
return `http://127.0.0.1:8111/load_object?objects=${e}${t}`;
|
|
584
581
|
}
|
|
585
582
|
function st(e, t) {
|
|
586
|
-
return `https://
|
|
583
|
+
return `https://osmlab.github.io/osm-deep-history/#/${rt[e]}/${t}`;
|
|
584
|
+
}
|
|
585
|
+
function ct(e, t) {
|
|
586
|
+
return `https://pewu.github.io/osm-history/#/${rt[e]}/${t}`;
|
|
587
587
|
}
|
|
588
588
|
//#endregion
|
|
589
589
|
//#region src/components/LoCha/LoChaObject.vue?vue&type=script&setup=true&lang.ts
|
|
590
|
-
var
|
|
590
|
+
var lt = { class: "locha-object" }, ut = { class: "wrap" }, dt = ["href"], ft = { class: "fab" }, pt = { class: "fab-menu" }, mt = ["href"], ht = ["href", "target"], gt = ["href"], _t = ["href"], vt = { class: "date" }, yt = ["href", "title"], bt = /* @__PURE__ */ l({
|
|
591
591
|
__name: "LoChaObject",
|
|
592
592
|
props: {
|
|
593
593
|
feature: {},
|
|
594
594
|
josmTarget: {}
|
|
595
595
|
},
|
|
596
596
|
setup(e) {
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
597
|
+
ee((e) => ({
|
|
598
|
+
v26dc6b0d: l.value,
|
|
599
|
+
v817d1e34: A(W).delete,
|
|
600
|
+
v0b8a0045: A(W).new
|
|
601
601
|
}));
|
|
602
|
-
let n = e, { getStatus: o } =
|
|
602
|
+
let n = e, { getStatus: o } = p(et), s = t(() => o(n.feature)), c = t(() => {
|
|
603
603
|
switch (s.value) {
|
|
604
604
|
case "new": return "new";
|
|
605
605
|
case "delete": return "deleted";
|
|
606
606
|
default: return "";
|
|
607
607
|
}
|
|
608
608
|
}), l = t(() => W[s.value]);
|
|
609
|
-
return (t, o) => (
|
|
610
|
-
a("
|
|
611
|
-
a("
|
|
612
|
-
href:
|
|
609
|
+
return (t, o) => (b(), i("article", lt, [a("header", null, [
|
|
610
|
+
a("div", ut, [
|
|
611
|
+
a("a", {
|
|
612
|
+
href: A(it)(e.feature.properties.objtype, e.feature.properties.id),
|
|
613
613
|
title: "OSM History",
|
|
614
614
|
target: "_blank",
|
|
615
615
|
onClick: o[0] ||= N(() => {}, ["stop"])
|
|
616
|
-
},
|
|
616
|
+
}, D(`${e.feature.properties.objtype}${e.feature.properties.id}-v${e.feature.properties.version}`), 9, dt),
|
|
617
|
+
s.value === "new" || s.value === "delete" ? (b(), i("div", {
|
|
617
618
|
key: 0,
|
|
618
|
-
class:
|
|
619
|
+
class: g(["status-content", {
|
|
619
620
|
"object-new": s.value === "new",
|
|
620
621
|
"object-deleted": s.value === "delete"
|
|
621
622
|
}])
|
|
622
|
-
},
|
|
623
|
-
a("
|
|
624
|
-
|
|
625
|
-
a("a", {
|
|
626
|
-
href: k(it)(e.feature.properties.username),
|
|
627
|
-
title: `View ${e.feature.properties.username} OSM profile`,
|
|
628
|
-
target: "_blank",
|
|
629
|
-
onClick: o[1] ||= N(() => {}, ["stop"])
|
|
630
|
-
}, " 👤" + E(e.feature.properties.username), 9, ft)
|
|
631
|
-
]),
|
|
632
|
-
w(t.$slots, "tags-diff", {}, void 0, !0),
|
|
633
|
-
a("div", pt, [
|
|
634
|
-
a("a", {
|
|
635
|
-
href: k(rt)(e.feature.properties.objtype, e.feature.properties.id),
|
|
636
|
-
type: "button",
|
|
637
|
-
title: "Edit in OSM iD",
|
|
638
|
-
target: "_blank",
|
|
639
|
-
onClick: o[2] ||= N(() => {}, ["stop"])
|
|
640
|
-
}, " OSM iD ", 8, mt),
|
|
641
|
-
a("a", {
|
|
642
|
-
href: k(at)(e.feature.properties.objtype, e.feature.properties.id),
|
|
643
|
-
type: "button",
|
|
644
|
-
title: "Edit in JOSM",
|
|
645
|
-
target: e.josmTarget || "hidden_josm_target",
|
|
646
|
-
onClick: o[3] ||= N(() => {}, ["stop"])
|
|
647
|
-
}, " JOSM ", 8, ht),
|
|
648
|
-
a("a", {
|
|
649
|
-
href: k(ot)(e.feature.properties.objtype, e.feature.properties.id),
|
|
650
|
-
type: "button",
|
|
651
|
-
title: "OSM Deep History",
|
|
652
|
-
target: "_blank",
|
|
653
|
-
onClick: o[4] ||= N(() => {}, ["stop"])
|
|
654
|
-
}, " Deep H ", 8, gt),
|
|
655
|
-
a("a", {
|
|
656
|
-
href: k(st)(e.feature.properties.objtype, e.feature.properties.id),
|
|
623
|
+
}, D(c.value), 3)) : r("", !0),
|
|
624
|
+
a("div", ft, [o[6] ||= a("button", {
|
|
625
|
+
class: "fab-toggle",
|
|
657
626
|
type: "button",
|
|
658
|
-
title: "
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
627
|
+
title: "Tools"
|
|
628
|
+
}, " 🔧 Tools ", -1), a("div", pt, [
|
|
629
|
+
a("a", {
|
|
630
|
+
href: A(it)(e.feature.properties.objtype, e.feature.properties.id),
|
|
631
|
+
class: "action-btn",
|
|
632
|
+
title: "Edit in OSM iD",
|
|
633
|
+
target: "_blank",
|
|
634
|
+
onClick: o[1] ||= N(() => {}, ["stop"])
|
|
635
|
+
}, " OSM iD ", 8, mt),
|
|
636
|
+
a("a", {
|
|
637
|
+
href: A(ot)(e.feature.properties.objtype, e.feature.properties.id),
|
|
638
|
+
class: "action-btn",
|
|
639
|
+
title: "Edit in JOSM",
|
|
640
|
+
target: e.josmTarget || "hidden_josm_target",
|
|
641
|
+
onClick: o[2] ||= N(() => {}, ["stop"])
|
|
642
|
+
}, " JOSM ", 8, ht),
|
|
643
|
+
a("a", {
|
|
644
|
+
href: A(st)(e.feature.properties.objtype, e.feature.properties.id),
|
|
645
|
+
class: "action-btn",
|
|
646
|
+
title: "OSM Deep History",
|
|
647
|
+
target: "_blank",
|
|
648
|
+
onClick: o[3] ||= N(() => {}, ["stop"])
|
|
649
|
+
}, " Deep H ", 8, gt),
|
|
650
|
+
a("a", {
|
|
651
|
+
href: A(ct)(e.feature.properties.objtype, e.feature.properties.id),
|
|
652
|
+
class: "action-btn",
|
|
653
|
+
title: "OSM History Viewer",
|
|
654
|
+
target: "_blank",
|
|
655
|
+
onClick: o[4] ||= N(() => {}, ["stop"])
|
|
656
|
+
}, " OSM H ", 8, _t)
|
|
657
|
+
])])
|
|
658
|
+
]),
|
|
659
|
+
a("p", vt, " 📅 " + D(n.feature.properties.created), 1),
|
|
660
|
+
a("a", {
|
|
661
|
+
href: A(at)(e.feature.properties.username),
|
|
662
|
+
title: `View ${e.feature.properties.username} OSM profile`,
|
|
663
|
+
target: "_blank",
|
|
664
|
+
onClick: o[5] ||= N(() => {}, ["stop"])
|
|
665
|
+
}, " 👤" + D(e.feature.properties.username), 9, yt)
|
|
666
|
+
]), T(t.$slots, "object-detail", {}, void 0, !0)]));
|
|
667
|
+
}
|
|
668
|
+
}), xt = (e, t) => {
|
|
666
669
|
let n = e.__vccOpts || e;
|
|
667
670
|
for (let [e, r] of t) n[e] = r;
|
|
668
671
|
return n;
|
|
669
|
-
},
|
|
672
|
+
}, St = /* @__PURE__ */ xt(bt, [["__scopeId", "data-v-4e68f036"]]);
|
|
670
673
|
//#endregion
|
|
671
674
|
//#region node_modules/@turf/bbox/dist/esm/index.js
|
|
672
675
|
function G(e, t = {}) {
|
|
@@ -677,35 +680,35 @@ function G(e, t = {}) {
|
|
|
677
680
|
-Infinity,
|
|
678
681
|
-Infinity
|
|
679
682
|
];
|
|
680
|
-
return
|
|
683
|
+
return Ce(e, (e) => {
|
|
681
684
|
n[0] > e[0] && (n[0] = e[0]), n[1] > e[1] && (n[1] = e[1]), n[2] < e[0] && (n[2] = e[0]), n[3] < e[1] && (n[3] = e[1]);
|
|
682
685
|
}), n;
|
|
683
686
|
}
|
|
684
|
-
var
|
|
687
|
+
var Ct = G;
|
|
685
688
|
//#endregion
|
|
686
689
|
//#region node_modules/@vueuse/shared/dist/index.js
|
|
687
|
-
function
|
|
688
|
-
return
|
|
690
|
+
function wt(e, t) {
|
|
691
|
+
return d() ? (y(e, t), !0) : !1;
|
|
689
692
|
}
|
|
690
|
-
var
|
|
693
|
+
var Tt = typeof window < "u" && typeof document < "u";
|
|
691
694
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
692
|
-
var
|
|
693
|
-
function
|
|
695
|
+
var Et = (e) => e != null, Dt = Object.prototype.toString, Ot = (e) => Dt.call(e) === "[object Object]", kt = () => {}, At = /* @__PURE__ */ jt();
|
|
696
|
+
function jt() {
|
|
694
697
|
var e, t;
|
|
695
|
-
return
|
|
698
|
+
return Tt && !!(!((e = window) == null || (e = e.navigator) == null) && e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window) == null || (t = t.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
|
|
696
699
|
}
|
|
697
|
-
function
|
|
698
|
-
if (e.length !== 1) return
|
|
700
|
+
function Mt(...e) {
|
|
701
|
+
if (e.length !== 1) return O(...e);
|
|
699
702
|
let t = e[0];
|
|
700
|
-
return typeof t == "function" ?
|
|
703
|
+
return typeof t == "function" ? S(c(() => ({
|
|
701
704
|
get: t,
|
|
702
|
-
set:
|
|
703
|
-
}))) :
|
|
705
|
+
set: kt
|
|
706
|
+
}))) : C(t);
|
|
704
707
|
}
|
|
705
|
-
function
|
|
708
|
+
function Nt(e) {
|
|
706
709
|
return Array.isArray(e) ? e : [e];
|
|
707
710
|
}
|
|
708
|
-
function
|
|
711
|
+
function Pt(e, t, n) {
|
|
709
712
|
return j(e, t, {
|
|
710
713
|
...n,
|
|
711
714
|
immediate: !0
|
|
@@ -713,64 +716,64 @@ function Mt(e, t, n) {
|
|
|
713
716
|
}
|
|
714
717
|
//#endregion
|
|
715
718
|
//#region node_modules/@vueuse/core/dist/index.js
|
|
716
|
-
var
|
|
717
|
-
|
|
718
|
-
function
|
|
719
|
-
let t =
|
|
719
|
+
var Ft = Tt ? window : void 0;
|
|
720
|
+
Tt && window.document, Tt && window.navigator, Tt && window.location;
|
|
721
|
+
function It(e) {
|
|
722
|
+
let t = k(e);
|
|
720
723
|
return t?.$el ?? t;
|
|
721
724
|
}
|
|
722
|
-
function
|
|
725
|
+
function Lt(...e) {
|
|
723
726
|
let n = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), r = t(() => {
|
|
724
|
-
let t =
|
|
727
|
+
let t = Nt(k(e[0])).filter((e) => e != null);
|
|
725
728
|
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
726
729
|
});
|
|
727
|
-
return
|
|
728
|
-
r.value?.map((e) =>
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
730
|
+
return Pt(() => [
|
|
731
|
+
r.value?.map((e) => It(e)) ?? [Ft].filter((e) => e != null),
|
|
732
|
+
Nt(k(r.value ? e[1] : e[0])),
|
|
733
|
+
Nt(A(r.value ? e[2] : e[1])),
|
|
734
|
+
k(r.value ? e[3] : e[2])
|
|
732
735
|
], ([e, t, r, i], a, o) => {
|
|
733
736
|
if (!e?.length || !t?.length || !r?.length) return;
|
|
734
|
-
let s =
|
|
737
|
+
let s = Ot(i) ? { ...i } : i, c = e.flatMap((e) => t.flatMap((t) => r.map((r) => n(e, t, r, s))));
|
|
735
738
|
o(() => {
|
|
736
739
|
c.forEach((e) => e());
|
|
737
740
|
});
|
|
738
741
|
}, { flush: "post" });
|
|
739
742
|
}
|
|
740
|
-
function
|
|
741
|
-
let e =
|
|
742
|
-
return t &&
|
|
743
|
+
function Rt() {
|
|
744
|
+
let e = E(!1), t = u();
|
|
745
|
+
return t && v(() => {
|
|
743
746
|
e.value = !0;
|
|
744
747
|
}, t), e;
|
|
745
748
|
}
|
|
746
749
|
/* @__NO_SIDE_EFFECTS__ */
|
|
747
|
-
function
|
|
748
|
-
let n =
|
|
750
|
+
function zt(e) {
|
|
751
|
+
let n = Rt();
|
|
749
752
|
return t(() => (n.value, !!e()));
|
|
750
753
|
}
|
|
751
|
-
function
|
|
752
|
-
let { root: i, rootMargin: a, threshold: o = 0, window: s =
|
|
754
|
+
function Bt(e, n, r = {}) {
|
|
755
|
+
let { root: i, rootMargin: a, threshold: o = 0, window: s = Ft, immediate: c = !0 } = r, l = /* @__PURE__ */ zt(() => s && "IntersectionObserver" in s), u = t(() => Nt(k(e)).map(It).filter(Et)), d = kt, f = E(c), p = l.value ? j(() => [
|
|
753
756
|
u.value,
|
|
754
|
-
|
|
755
|
-
|
|
757
|
+
It(i),
|
|
758
|
+
k(a),
|
|
756
759
|
f.value
|
|
757
760
|
], ([e, t, r]) => {
|
|
758
761
|
if (d(), !f.value || !e.length) return;
|
|
759
762
|
let i = new IntersectionObserver(n, {
|
|
760
|
-
root:
|
|
763
|
+
root: It(t),
|
|
761
764
|
rootMargin: r,
|
|
762
765
|
threshold: o
|
|
763
766
|
});
|
|
764
767
|
e.forEach((e) => e && i.observe(e)), d = () => {
|
|
765
|
-
i.disconnect(), d =
|
|
768
|
+
i.disconnect(), d = kt;
|
|
766
769
|
};
|
|
767
770
|
}, {
|
|
768
771
|
immediate: c,
|
|
769
772
|
flush: "post"
|
|
770
|
-
}) :
|
|
773
|
+
}) : kt, m = () => {
|
|
771
774
|
d(), p(), f.value = !1;
|
|
772
775
|
};
|
|
773
|
-
return
|
|
776
|
+
return wt(m), {
|
|
774
777
|
isSupported: l,
|
|
775
778
|
isActive: f,
|
|
776
779
|
pause() {
|
|
@@ -782,42 +785,42 @@ function Rt(e, n, r = {}) {
|
|
|
782
785
|
stop: m
|
|
783
786
|
};
|
|
784
787
|
}
|
|
785
|
-
function
|
|
788
|
+
function Vt(e) {
|
|
786
789
|
return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
|
|
787
790
|
}
|
|
788
|
-
function
|
|
791
|
+
function Ht(e) {
|
|
789
792
|
let t = window.getComputedStyle(e);
|
|
790
793
|
if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" && e.clientWidth < e.scrollWidth || t.overflowY === "auto" && e.clientHeight < e.scrollHeight) return !0;
|
|
791
794
|
{
|
|
792
795
|
let t = e.parentNode;
|
|
793
|
-
return !t || t.tagName === "BODY" ? !1 :
|
|
796
|
+
return !t || t.tagName === "BODY" ? !1 : Ht(t);
|
|
794
797
|
}
|
|
795
798
|
}
|
|
796
|
-
function
|
|
799
|
+
function Ut(e) {
|
|
797
800
|
let t = e || window.event, n = t.target;
|
|
798
|
-
return
|
|
801
|
+
return Ht(n) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
|
|
799
802
|
}
|
|
800
|
-
var
|
|
801
|
-
function
|
|
802
|
-
let r =
|
|
803
|
-
j(
|
|
804
|
-
let t =
|
|
803
|
+
var Wt = /* @__PURE__ */ new WeakMap();
|
|
804
|
+
function Gt(e, n = !1) {
|
|
805
|
+
let r = E(n), i = null, a = "";
|
|
806
|
+
j(Mt(e), (e) => {
|
|
807
|
+
let t = Vt(k(e));
|
|
805
808
|
if (t) {
|
|
806
809
|
let e = t;
|
|
807
|
-
if (
|
|
810
|
+
if (Wt.get(e) || Wt.set(e, e.style.overflow), e.style.overflow !== "hidden" && (a = e.style.overflow), e.style.overflow === "hidden") return r.value = !0;
|
|
808
811
|
if (r.value) return e.style.overflow = "hidden";
|
|
809
812
|
}
|
|
810
813
|
}, { immediate: !0 });
|
|
811
814
|
let o = () => {
|
|
812
|
-
let t =
|
|
813
|
-
!t || r.value || (
|
|
814
|
-
|
|
815
|
+
let t = Vt(k(e));
|
|
816
|
+
!t || r.value || (At && (i = Lt(t, "touchmove", (e) => {
|
|
817
|
+
Ut(e);
|
|
815
818
|
}, { passive: !1 })), t.style.overflow = "hidden", r.value = !0);
|
|
816
819
|
}, s = () => {
|
|
817
|
-
let t =
|
|
818
|
-
!t || !r.value || (
|
|
820
|
+
let t = Vt(k(e));
|
|
821
|
+
!t || !r.value || (At && i?.(), t.style.overflow = a, Wt.delete(t), r.value = !1);
|
|
819
822
|
};
|
|
820
|
-
return
|
|
823
|
+
return wt(s), t({
|
|
821
824
|
get() {
|
|
822
825
|
return r.value;
|
|
823
826
|
},
|
|
@@ -828,26 +831,26 @@ function Ut(e, n = !1) {
|
|
|
828
831
|
}
|
|
829
832
|
//#endregion
|
|
830
833
|
//#region node_modules/@vueuse/components/dist/index.js
|
|
831
|
-
var
|
|
832
|
-
typeof t.value == "function" ?
|
|
834
|
+
var Kt = { mounted(e, t) {
|
|
835
|
+
typeof t.value == "function" ? Bt(e, t.value) : Bt(e, ...t.value);
|
|
833
836
|
} };
|
|
834
|
-
function
|
|
835
|
-
let e = !1, t =
|
|
837
|
+
function qt() {
|
|
838
|
+
let e = !1, t = E(!1);
|
|
836
839
|
return (n, r) => {
|
|
837
840
|
if (t.value = r.value, e) return;
|
|
838
841
|
e = !0;
|
|
839
|
-
let i =
|
|
842
|
+
let i = Gt(n, r.value);
|
|
840
843
|
j(t, (e) => i.value = e);
|
|
841
844
|
};
|
|
842
845
|
}
|
|
843
|
-
|
|
846
|
+
qt();
|
|
844
847
|
//#endregion
|
|
845
848
|
//#region src/constants/map.ts
|
|
846
|
-
var
|
|
849
|
+
var Jt = "https://maps.cartoway.com/styles/positron/style.json", Yt = "#f4f4f5", Xt = "bbox", K = "lochas", q = {
|
|
847
850
|
Bbox: {
|
|
848
851
|
id: "bbox-layer",
|
|
849
852
|
type: "line",
|
|
850
|
-
source:
|
|
853
|
+
source: Xt,
|
|
851
854
|
paint: {
|
|
852
855
|
"line-color": "#000000",
|
|
853
856
|
"line-width": 1,
|
|
@@ -899,7 +902,7 @@ var Kt = "https://maps.cartoway.com/styles/positron/style.json", qt = "#f4f4f5",
|
|
|
899
902
|
["get", "geom"],
|
|
900
903
|
!1
|
|
901
904
|
],
|
|
902
|
-
|
|
905
|
+
Yt,
|
|
903
906
|
[
|
|
904
907
|
"==",
|
|
905
908
|
["get", "is_new"],
|
|
@@ -940,7 +943,7 @@ var Kt = "https://maps.cartoway.com/styles/positron/style.json", qt = "#f4f4f5",
|
|
|
940
943
|
["get", "geom"],
|
|
941
944
|
!1
|
|
942
945
|
],
|
|
943
|
-
|
|
946
|
+
Yt,
|
|
944
947
|
[
|
|
945
948
|
"==",
|
|
946
949
|
["get", "is_new"],
|
|
@@ -1066,7 +1069,7 @@ var Kt = "https://maps.cartoway.com/styles/positron/style.json", qt = "#f4f4f5",
|
|
|
1066
1069
|
["get", "geom"],
|
|
1067
1070
|
!1
|
|
1068
1071
|
],
|
|
1069
|
-
|
|
1072
|
+
Yt,
|
|
1070
1073
|
[
|
|
1071
1074
|
"==",
|
|
1072
1075
|
["get", "is_new"],
|
|
@@ -1097,7 +1100,7 @@ var Kt = "https://maps.cartoway.com/styles/positron/style.json", qt = "#f4f4f5",
|
|
|
1097
1100
|
};
|
|
1098
1101
|
//#endregion
|
|
1099
1102
|
//#region node_modules/@turf/bbox-clip/dist/esm/index.js
|
|
1100
|
-
function
|
|
1103
|
+
function Zt(e, t, n) {
|
|
1101
1104
|
var r = e.length, i = J(e[0], t), a = [], o, s, c;
|
|
1102
1105
|
let l, u;
|
|
1103
1106
|
for (n ||= [], o = 1; o < r; o++) {
|
|
@@ -1105,57 +1108,57 @@ function Yt(e, t, n) {
|
|
|
1105
1108
|
a.push(l), s === c ? o === r - 1 && a.push(u) : (a.push(u), o < r - 1 && (n.push(a), a = []));
|
|
1106
1109
|
break;
|
|
1107
1110
|
} else if (i & s) break;
|
|
1108
|
-
else i ? (l =
|
|
1111
|
+
else i ? (l = $t(l, u, i, t), i = J(l, t)) : (u = $t(l, u, s, t), s = J(u, t));
|
|
1109
1112
|
i = c;
|
|
1110
1113
|
}
|
|
1111
1114
|
return a.length && n.push(a), n;
|
|
1112
1115
|
}
|
|
1113
|
-
function
|
|
1116
|
+
function Qt(e, t) {
|
|
1114
1117
|
var n, r, i, a, o, s, c;
|
|
1115
1118
|
for (r = 1; r <= 8; r *= 2) {
|
|
1116
|
-
for (n = [], i = e[e.length - 1], a = !(J(i, t) & r), o = 0; o < e.length; o++) s = e[o], c = !(J(s, t) & r), c !== a && n.push(
|
|
1119
|
+
for (n = [], i = e[e.length - 1], a = !(J(i, t) & r), o = 0; o < e.length; o++) s = e[o], c = !(J(s, t) & r), c !== a && n.push($t(i, s, r, t)), c && n.push(s), i = s, a = c;
|
|
1117
1120
|
if (e = n, !e.length) break;
|
|
1118
1121
|
}
|
|
1119
1122
|
return n;
|
|
1120
1123
|
}
|
|
1121
|
-
function
|
|
1124
|
+
function $t(e, t, n, r) {
|
|
1122
1125
|
return n & 8 ? [e[0] + (t[0] - e[0]) * (r[3] - e[1]) / (t[1] - e[1]), r[3]] : n & 4 ? [e[0] + (t[0] - e[0]) * (r[1] - e[1]) / (t[1] - e[1]), r[1]] : n & 2 ? [r[2], e[1] + (t[1] - e[1]) * (r[2] - e[0]) / (t[0] - e[0])] : n & 1 ? [r[0], e[1] + (t[1] - e[1]) * (r[0] - e[0]) / (t[0] - e[0])] : null;
|
|
1123
1126
|
}
|
|
1124
1127
|
function J(e, t) {
|
|
1125
1128
|
var n = 0;
|
|
1126
1129
|
return e[0] < t[0] ? n |= 1 : e[0] > t[2] && (n |= 2), e[1] < t[1] ? n |= 4 : e[1] > t[3] && (n |= 8), n;
|
|
1127
1130
|
}
|
|
1128
|
-
function
|
|
1131
|
+
function en(e, t) {
|
|
1129
1132
|
let n = H(e), r = n.type, i = e.type === "Feature" ? e.properties : {}, a = n.coordinates;
|
|
1130
1133
|
switch (r) {
|
|
1131
1134
|
case "LineString":
|
|
1132
1135
|
case "MultiLineString": {
|
|
1133
1136
|
let e = [];
|
|
1134
1137
|
return r === "LineString" && (a = [a]), a.forEach((n) => {
|
|
1135
|
-
|
|
1136
|
-
}), e.length === 1 ? I(e[0], i) :
|
|
1138
|
+
Zt(n, t, e);
|
|
1139
|
+
}), e.length === 1 ? I(e[0], i) : _e(e, i);
|
|
1137
1140
|
}
|
|
1138
|
-
case "Polygon": return
|
|
1139
|
-
case "MultiPolygon": return
|
|
1141
|
+
case "Polygon": return ge(tn(a, t), i);
|
|
1142
|
+
case "MultiPolygon": return ve(a.map((e) => tn(e, t)), i);
|
|
1140
1143
|
default: throw Error("geometry " + r + " not supported");
|
|
1141
1144
|
}
|
|
1142
1145
|
}
|
|
1143
|
-
function
|
|
1146
|
+
function tn(e, t) {
|
|
1144
1147
|
let n = [];
|
|
1145
1148
|
for (let r of e) {
|
|
1146
|
-
let e =
|
|
1149
|
+
let e = Qt(r, t);
|
|
1147
1150
|
e.length > 0 && ((e[0][0] !== e[e.length - 1][0] || e[0][1] !== e[e.length - 1][1]) && e.push(e[0]), e.length >= 4 && n.push(e));
|
|
1148
1151
|
}
|
|
1149
1152
|
return n;
|
|
1150
1153
|
}
|
|
1151
|
-
var
|
|
1154
|
+
var nn = en;
|
|
1152
1155
|
//#endregion
|
|
1153
1156
|
//#region node_modules/@turf/bbox-polygon/dist/esm/index.js
|
|
1154
|
-
function
|
|
1157
|
+
function rn(e, t = {}) {
|
|
1155
1158
|
let n = Number(e[0]), r = Number(e[1]), i = Number(e[2]), a = Number(e[3]);
|
|
1156
1159
|
if (e.length === 6) throw Error("@turf/bbox-polygon does not support BBox with 6 positions");
|
|
1157
1160
|
let o = [n, r];
|
|
1158
|
-
return
|
|
1161
|
+
return ge([[
|
|
1159
1162
|
o,
|
|
1160
1163
|
[i, r],
|
|
1161
1164
|
[i, a],
|
|
@@ -1166,8 +1169,8 @@ function tn(e, t = {}) {
|
|
|
1166
1169
|
id: t.id
|
|
1167
1170
|
});
|
|
1168
1171
|
}
|
|
1169
|
-
var
|
|
1170
|
-
function
|
|
1172
|
+
var an = rn, Y = 11102230246251565e-32, X = 134217729, on = (3 + 8 * Y) * Y;
|
|
1173
|
+
function sn(e, t, n, r, i) {
|
|
1171
1174
|
let a, o, s, c, l = t[0], u = r[0], d = 0, f = 0;
|
|
1172
1175
|
u > l == u > -l ? (a = l, l = t[++d]) : (a = u, u = r[++f]);
|
|
1173
1176
|
let p = 0;
|
|
@@ -1176,7 +1179,7 @@ function an(e, t, n, r, i) {
|
|
|
1176
1179
|
for (; f < n;) o = a + u, c = o - a, s = a - (o - c) + (u - c), u = r[++f], a = o, s !== 0 && (i[p++] = s);
|
|
1177
1180
|
return (a !== 0 || p === 0) && (i[p++] = a), p;
|
|
1178
1181
|
}
|
|
1179
|
-
function
|
|
1182
|
+
function cn(e, t) {
|
|
1180
1183
|
let n = t[0];
|
|
1181
1184
|
for (let r = 1; r < e; r++) n += t[r];
|
|
1182
1185
|
return n;
|
|
@@ -1186,26 +1189,26 @@ function Z(e) {
|
|
|
1186
1189
|
}
|
|
1187
1190
|
//#endregion
|
|
1188
1191
|
//#region node_modules/robust-predicates/esm/orient2d.js
|
|
1189
|
-
var
|
|
1190
|
-
function
|
|
1192
|
+
var ln = (3 + 16 * Y) * Y, un = (2 + 12 * Y) * Y, dn = (9 + 64 * Y) * Y * Y, fn = Z(4), pn = Z(8), mn = Z(12), hn = Z(16), Q = Z(4);
|
|
1193
|
+
function gn(e, t, n, r, i, a, o) {
|
|
1191
1194
|
let s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, T = e - i, E = n - i, D = t - a, O = r - a;
|
|
1192
|
-
b = T * O, f = X * T, p = f - (f - T), m = T - p, f = X * O, h = f - (f - O), g = O - h, x = m * g - (b - p * h - m * h - p * g), S = D * E, f = X * D, p = f - (f - D), m = D - p, f = X * E, h = f - (f - E), g = E - h, C = m * g - (S - p * h - m * h - p * g), _ = x - C, d = x - _,
|
|
1193
|
-
let k =
|
|
1194
|
-
if (k >= A || -k >= A || (d = e - T, s = e - (T + d) + (d - i), d = n - E, l = n - (E + d) + (d - i), d = t - D, c = t - (D + d) + (d - a), d = r - O, u = r - (O + d) + (d - a), s === 0 && c === 0 && l === 0 && u === 0) || (A =
|
|
1195
|
+
b = T * O, f = X * T, p = f - (f - T), m = T - p, f = X * O, h = f - (f - O), g = O - h, x = m * g - (b - p * h - m * h - p * g), S = D * E, f = X * D, p = f - (f - D), m = D - p, f = X * E, h = f - (f - E), g = E - h, C = m * g - (S - p * h - m * h - p * g), _ = x - C, d = x - _, fn[0] = x - (_ + d) + (d - C), v = b + _, d = v - b, y = b - (v - d) + (_ - d), _ = y - S, d = y - _, fn[1] = y - (_ + d) + (d - S), w = v + _, d = w - v, fn[2] = v - (w - d) + (_ - d), fn[3] = w;
|
|
1196
|
+
let k = cn(4, fn), A = un * o;
|
|
1197
|
+
if (k >= A || -k >= A || (d = e - T, s = e - (T + d) + (d - i), d = n - E, l = n - (E + d) + (d - i), d = t - D, c = t - (D + d) + (d - a), d = r - O, u = r - (O + d) + (d - a), s === 0 && c === 0 && l === 0 && u === 0) || (A = dn * o + on * Math.abs(k), k += T * u + O * s - (D * l + E * c), k >= A || -k >= A)) return k;
|
|
1195
1198
|
b = s * O, f = X * s, p = f - (f - s), m = s - p, f = X * O, h = f - (f - O), g = O - h, x = m * g - (b - p * h - m * h - p * g), S = c * E, f = X * c, p = f - (f - c), m = c - p, f = X * E, h = f - (f - E), g = E - h, C = m * g - (S - p * h - m * h - p * g), _ = x - C, d = x - _, Q[0] = x - (_ + d) + (d - C), v = b + _, d = v - b, y = b - (v - d) + (_ - d), _ = y - S, d = y - _, Q[1] = y - (_ + d) + (d - S), w = v + _, d = w - v, Q[2] = v - (w - d) + (_ - d), Q[3] = w;
|
|
1196
|
-
let ee =
|
|
1199
|
+
let ee = sn(4, fn, 4, Q, pn);
|
|
1197
1200
|
b = T * u, f = X * T, p = f - (f - T), m = T - p, f = X * u, h = f - (f - u), g = u - h, x = m * g - (b - p * h - m * h - p * g), S = D * l, f = X * D, p = f - (f - D), m = D - p, f = X * l, h = f - (f - l), g = l - h, C = m * g - (S - p * h - m * h - p * g), _ = x - C, d = x - _, Q[0] = x - (_ + d) + (d - C), v = b + _, d = v - b, y = b - (v - d) + (_ - d), _ = y - S, d = y - _, Q[1] = y - (_ + d) + (d - S), w = v + _, d = w - v, Q[2] = v - (w - d) + (_ - d), Q[3] = w;
|
|
1198
|
-
let te =
|
|
1199
|
-
return b = s * u, f = X * s, p = f - (f - s), m = s - p, f = X * u, h = f - (f - u), g = u - h, x = m * g - (b - p * h - m * h - p * g), S = c * l, f = X * c, p = f - (f - c), m = c - p, f = X * l, h = f - (f - l), g = l - h, C = m * g - (S - p * h - m * h - p * g), _ = x - C, d = x - _, Q[0] = x - (_ + d) + (d - C), v = b + _, d = v - b, y = b - (v - d) + (_ - d), _ = y - S, d = y - _, Q[1] = y - (_ + d) + (d - S), w = v + _, d = w - v, Q[2] = v - (w - d) + (_ - d), Q[3] = w,
|
|
1201
|
+
let te = sn(ee, pn, 4, Q, mn);
|
|
1202
|
+
return b = s * u, f = X * s, p = f - (f - s), m = s - p, f = X * u, h = f - (f - u), g = u - h, x = m * g - (b - p * h - m * h - p * g), S = c * l, f = X * c, p = f - (f - c), m = c - p, f = X * l, h = f - (f - l), g = l - h, C = m * g - (S - p * h - m * h - p * g), _ = x - C, d = x - _, Q[0] = x - (_ + d) + (d - C), v = b + _, d = v - b, y = b - (v - d) + (_ - d), _ = y - S, d = y - _, Q[1] = y - (_ + d) + (d - S), w = v + _, d = w - v, Q[2] = v - (w - d) + (_ - d), Q[3] = w, hn[sn(te, mn, 4, Q, hn) - 1];
|
|
1200
1203
|
}
|
|
1201
|
-
function
|
|
1204
|
+
function _n(e, t, n, r, i, a) {
|
|
1202
1205
|
let o = (t - a) * (n - i), s = (e - i) * (r - a), c = o - s, l = Math.abs(o + s);
|
|
1203
|
-
return Math.abs(c) >=
|
|
1206
|
+
return Math.abs(c) >= ln * l ? c : -gn(e, t, n, r, i, a, l);
|
|
1204
1207
|
}
|
|
1205
1208
|
(7 + 56 * Y) * Y, (3 + 28 * Y) * Y, (26 + 288 * Y) * Y * Y, Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(8), Z(8), Z(8), Z(4), Z(8), Z(8), Z(8), Z(12), Z(192), Z(192), (10 + 96 * Y) * Y, (4 + 48 * Y) * Y, (44 + 576 * Y) * Y * Y, Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(8), Z(8), Z(8), Z(8), Z(8), Z(8), Z(8), Z(8), Z(8), Z(4), Z(4), Z(4), Z(8), Z(16), Z(16), Z(16), Z(32), Z(32), Z(48), Z(64), Z(1152), Z(1152), (16 + 224 * Y) * Y, (5 + 72 * Y) * Y, (71 + 1408 * Y) * Y * Y, Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(4), Z(24), Z(24), Z(24), Z(24), Z(24), Z(24), Z(24), Z(24), Z(24), Z(24), Z(1152), Z(1152), Z(1152), Z(1152), Z(1152), Z(2304), Z(2304), Z(3456), Z(5760), Z(8), Z(8), Z(8), Z(16), Z(24), Z(48), Z(48), Z(96), Z(192), Z(384), Z(384), Z(384), Z(768), Z(96), Z(96), Z(96), Z(1152);
|
|
1206
1209
|
//#endregion
|
|
1207
1210
|
//#region node_modules/point-in-polygon-hao/dist/esm/index.js
|
|
1208
|
-
function
|
|
1211
|
+
function vn(e, t) {
|
|
1209
1212
|
var n, r, i = 0, a, o, s, c, l, u, d, f = e[0], p = e[1], m = t.length;
|
|
1210
1213
|
for (n = 0; n < m; n++) {
|
|
1211
1214
|
r = 0;
|
|
@@ -1215,7 +1218,7 @@ function gn(e, t) {
|
|
|
1215
1218
|
if (d = h[r + 1], c = d[0] - f, l = d[1] - p, s === 0 && l === 0) {
|
|
1216
1219
|
if (c <= 0 && o >= 0 || o <= 0 && c >= 0) return 0;
|
|
1217
1220
|
} else if (l >= 0 && s <= 0 || l <= 0 && s >= 0) {
|
|
1218
|
-
if (a =
|
|
1221
|
+
if (a = _n(o, c, s, l, 0, 0), a === 0) return 0;
|
|
1219
1222
|
(a > 0 && l > 0 && s <= 0 || a < 0 && l <= 0 && s > 0) && i++;
|
|
1220
1223
|
}
|
|
1221
1224
|
u = d, s = l, o = c;
|
|
@@ -1225,26 +1228,26 @@ function gn(e, t) {
|
|
|
1225
1228
|
}
|
|
1226
1229
|
//#endregion
|
|
1227
1230
|
//#region node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js
|
|
1228
|
-
function
|
|
1231
|
+
function yn(e, t, n = {}) {
|
|
1229
1232
|
if (!e) throw Error("point is required");
|
|
1230
1233
|
if (!t) throw Error("polygon is required");
|
|
1231
1234
|
let r = B(e), i = H(t), a = i.type, o = t.bbox, s = i.coordinates;
|
|
1232
|
-
if (o &&
|
|
1235
|
+
if (o && bn(r, o) === !1) return !1;
|
|
1233
1236
|
a === "Polygon" && (s = [s]);
|
|
1234
1237
|
let c = !1;
|
|
1235
1238
|
for (var l = 0; l < s.length; ++l) {
|
|
1236
|
-
let e =
|
|
1239
|
+
let e = vn(r, s[l]);
|
|
1237
1240
|
if (e === 0) return !n.ignoreBoundary;
|
|
1238
1241
|
e && (c = !0);
|
|
1239
1242
|
}
|
|
1240
1243
|
return c;
|
|
1241
1244
|
}
|
|
1242
|
-
function
|
|
1245
|
+
function bn(e, t) {
|
|
1243
1246
|
return t[0] <= e[0] && t[1] <= e[1] && t[2] >= e[0] && t[3] >= e[1];
|
|
1244
1247
|
}
|
|
1245
1248
|
//#endregion
|
|
1246
1249
|
//#region node_modules/@turf/geojson-rbush/dist/esm/index.js
|
|
1247
|
-
var
|
|
1250
|
+
var xn = /* @__PURE__ */ pe((/* @__PURE__ */ de(((e, t) => {
|
|
1248
1251
|
(function(n, r) {
|
|
1249
1252
|
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n ||= self).RBush = r();
|
|
1250
1253
|
})(e, function() {
|
|
@@ -1462,7 +1465,7 @@ var yn = /* @__PURE__ */ fe((/* @__PURE__ */ ue(((e, t) => {
|
|
|
1462
1465
|
}, r;
|
|
1463
1466
|
});
|
|
1464
1467
|
})))(), 1);
|
|
1465
|
-
function
|
|
1468
|
+
function Sn(e) {
|
|
1466
1469
|
var t;
|
|
1467
1470
|
if (e.bbox) t = e.bbox;
|
|
1468
1471
|
else if (Array.isArray(e) && e.length === 4) t = e;
|
|
@@ -1482,9 +1485,9 @@ function bn(e) {
|
|
|
1482
1485
|
maxY: t[3]
|
|
1483
1486
|
};
|
|
1484
1487
|
}
|
|
1485
|
-
var
|
|
1488
|
+
var Cn = class {
|
|
1486
1489
|
constructor(e = 9) {
|
|
1487
|
-
this.tree = new
|
|
1490
|
+
this.tree = new xn.default(e), this.tree.toBBox = Sn;
|
|
1488
1491
|
}
|
|
1489
1492
|
insert(e) {
|
|
1490
1493
|
if (e.type !== "Feature") throw Error("invalid feature");
|
|
@@ -1495,7 +1498,7 @@ var xn = class {
|
|
|
1495
1498
|
return Array.isArray(e) ? e.forEach(function(e) {
|
|
1496
1499
|
if (e.type !== "Feature") throw Error("invalid features");
|
|
1497
1500
|
e.bbox = e.bbox ? e.bbox : G(e), t.push(e);
|
|
1498
|
-
}) :
|
|
1501
|
+
}) : we(e, function(e) {
|
|
1499
1502
|
if (e.type !== "Feature") throw Error("invalid features");
|
|
1500
1503
|
e.bbox = e.bbox ? e.bbox : G(e), t.push(e);
|
|
1501
1504
|
}), this.tree.load(t), this;
|
|
@@ -1508,10 +1511,10 @@ var xn = class {
|
|
|
1508
1511
|
return this.tree.clear(), this;
|
|
1509
1512
|
}
|
|
1510
1513
|
search(e) {
|
|
1511
|
-
return L(this.tree.search(
|
|
1514
|
+
return L(this.tree.search(Sn(e)));
|
|
1512
1515
|
}
|
|
1513
1516
|
collides(e) {
|
|
1514
|
-
return this.tree.collides(
|
|
1517
|
+
return this.tree.collides(Sn(e));
|
|
1515
1518
|
}
|
|
1516
1519
|
all() {
|
|
1517
1520
|
return L(this.tree.all());
|
|
@@ -1523,38 +1526,38 @@ var xn = class {
|
|
|
1523
1526
|
return this.tree.fromJSON(e), this;
|
|
1524
1527
|
}
|
|
1525
1528
|
};
|
|
1526
|
-
function
|
|
1527
|
-
return new
|
|
1529
|
+
function wn(e) {
|
|
1530
|
+
return new Cn(e);
|
|
1528
1531
|
}
|
|
1529
1532
|
//#endregion
|
|
1530
1533
|
//#region node_modules/@turf/truncate/dist/esm/index.js
|
|
1531
|
-
function
|
|
1532
|
-
if (t ??= {}, !
|
|
1534
|
+
function Tn(e, t) {
|
|
1535
|
+
if (t ??= {}, !Se(t)) throw Error("options is invalid");
|
|
1533
1536
|
var n = t.precision, r = t.coordinates, i = t.mutate;
|
|
1534
1537
|
if (n = n == null || isNaN(n) ? 6 : n, r = r == null || isNaN(r) ? 3 : r, !e) throw Error("<geojson> is required");
|
|
1535
1538
|
if (typeof n != "number") throw Error("<precision> must be a number");
|
|
1536
1539
|
if (typeof r != "number") throw Error("<coordinates> must be a number");
|
|
1537
1540
|
(i === !1 || i === void 0) && (e = JSON.parse(JSON.stringify(e)));
|
|
1538
1541
|
var a = 10 ** n;
|
|
1539
|
-
return
|
|
1540
|
-
|
|
1542
|
+
return Ce(e, function(e) {
|
|
1543
|
+
En(e, a, r);
|
|
1541
1544
|
}), e;
|
|
1542
1545
|
}
|
|
1543
|
-
function
|
|
1546
|
+
function En(e, t, n) {
|
|
1544
1547
|
e.length > n && e.splice(n, e.length);
|
|
1545
1548
|
for (var r = 0; r < e.length; r++) e[r] = Math.round(e[r] * t) / t;
|
|
1546
1549
|
return e;
|
|
1547
1550
|
}
|
|
1548
1551
|
//#endregion
|
|
1549
1552
|
//#region node_modules/@turf/line-segment/dist/esm/index.js
|
|
1550
|
-
function
|
|
1553
|
+
function Dn(e) {
|
|
1551
1554
|
if (!e) throw Error("geojson is required");
|
|
1552
1555
|
let t = [];
|
|
1553
|
-
return
|
|
1554
|
-
|
|
1556
|
+
return Oe(e, (e) => {
|
|
1557
|
+
On(e, t);
|
|
1555
1558
|
}), L(t);
|
|
1556
1559
|
}
|
|
1557
|
-
function
|
|
1560
|
+
function On(e, t) {
|
|
1558
1561
|
let n = [], r = e.geometry;
|
|
1559
1562
|
if (r !== null) {
|
|
1560
1563
|
switch (r.type) {
|
|
@@ -1564,20 +1567,20 @@ function En(e, t) {
|
|
|
1564
1567
|
case "LineString": n = [V(r)];
|
|
1565
1568
|
}
|
|
1566
1569
|
n.forEach((n) => {
|
|
1567
|
-
|
|
1570
|
+
kn(n, e.properties).forEach((e) => {
|
|
1568
1571
|
e.id = t.length, t.push(e);
|
|
1569
1572
|
});
|
|
1570
1573
|
});
|
|
1571
1574
|
}
|
|
1572
1575
|
}
|
|
1573
|
-
function
|
|
1576
|
+
function kn(e, t) {
|
|
1574
1577
|
let n = [];
|
|
1575
1578
|
return e.reduce((e, r) => {
|
|
1576
1579
|
let i = I([e, r], t);
|
|
1577
|
-
return i.bbox =
|
|
1580
|
+
return i.bbox = An(e, r), n.push(i), r;
|
|
1578
1581
|
}), n;
|
|
1579
1582
|
}
|
|
1580
|
-
function
|
|
1583
|
+
function An(e, t) {
|
|
1581
1584
|
let n = e[0], r = e[1], i = t[0], a = t[1];
|
|
1582
1585
|
return [
|
|
1583
1586
|
n < i ? n : i,
|
|
@@ -1588,8 +1591,8 @@ function On(e, t) {
|
|
|
1588
1591
|
}
|
|
1589
1592
|
//#endregion
|
|
1590
1593
|
//#region node_modules/sweepline-intersections/dist/sweeplineIntersections.esm.js
|
|
1591
|
-
var
|
|
1592
|
-
constructor(e = [], t =
|
|
1594
|
+
var jn = class {
|
|
1595
|
+
constructor(e = [], t = Mn) {
|
|
1593
1596
|
if (this.data = e, this.length = this.data.length, this.compare = t, this.length > 0) for (let e = (this.length >> 1) - 1; e >= 0; e--) this._down(e);
|
|
1594
1597
|
}
|
|
1595
1598
|
push(e) {
|
|
@@ -1622,16 +1625,16 @@ var kn = class {
|
|
|
1622
1625
|
t[e] = i;
|
|
1623
1626
|
}
|
|
1624
1627
|
};
|
|
1625
|
-
function
|
|
1628
|
+
function Mn(e, t) {
|
|
1626
1629
|
return e < t ? -1 : e > t ? 1 : 0;
|
|
1627
1630
|
}
|
|
1628
|
-
function
|
|
1631
|
+
function Nn(e, t) {
|
|
1629
1632
|
return e.p.x > t.p.x ? 1 : e.p.x < t.p.x ? -1 : e.p.y === t.p.y || e.p.y > t.p.y ? 1 : -1;
|
|
1630
1633
|
}
|
|
1631
|
-
function
|
|
1634
|
+
function Pn(e, t) {
|
|
1632
1635
|
return e.rightSweepEvent.p.x > t.rightSweepEvent.p.x ? 1 : e.rightSweepEvent.p.x < t.rightSweepEvent.p.x ? -1 : e.rightSweepEvent.p.y === t.rightSweepEvent.p.y || e.rightSweepEvent.p.y < t.rightSweepEvent.p.y ? 1 : -1;
|
|
1633
1636
|
}
|
|
1634
|
-
var
|
|
1637
|
+
var Fn = class {
|
|
1635
1638
|
constructor(e, t, n, r) {
|
|
1636
1639
|
this.p = {
|
|
1637
1640
|
x: e[0],
|
|
@@ -1642,50 +1645,50 @@ var Nn = class {
|
|
|
1642
1645
|
return this.p.x === e.p.x && this.p.y === e.p.y;
|
|
1643
1646
|
}
|
|
1644
1647
|
};
|
|
1645
|
-
function
|
|
1648
|
+
function In(e, t) {
|
|
1646
1649
|
if (e.type === "FeatureCollection") {
|
|
1647
1650
|
let n = e.features;
|
|
1648
|
-
for (let e = 0; e < n.length; e++)
|
|
1649
|
-
} else
|
|
1651
|
+
for (let e = 0; e < n.length; e++) Bn(n[e], t);
|
|
1652
|
+
} else Bn(e, t);
|
|
1650
1653
|
}
|
|
1651
|
-
var
|
|
1652
|
-
function
|
|
1654
|
+
var Ln = 0, Rn = 0, zn = 0;
|
|
1655
|
+
function Bn(e, t) {
|
|
1653
1656
|
let n = e.type === "Feature" ? e.geometry : e, r = n.coordinates;
|
|
1654
1657
|
(n.type === "Polygon" || n.type === "MultiLineString") && (r = [r]), n.type === "LineString" && (r = [[r]]);
|
|
1655
1658
|
for (let e = 0; e < r.length; e++) for (let n = 0; n < r[e].length; n++) {
|
|
1656
1659
|
let i = r[e][n][0], a = null;
|
|
1657
|
-
|
|
1660
|
+
Rn += 1;
|
|
1658
1661
|
for (let o = 0; o < r[e][n].length - 1; o++) {
|
|
1659
1662
|
a = r[e][n][o + 1];
|
|
1660
|
-
let s = new
|
|
1661
|
-
s.otherEvent = c, c.otherEvent = s,
|
|
1663
|
+
let s = new Fn(i, Ln, Rn, zn), c = new Fn(a, Ln, Rn, zn + 1);
|
|
1664
|
+
s.otherEvent = c, c.otherEvent = s, Nn(s, c) > 0 ? (c.isLeftEndpoint = !0, s.isLeftEndpoint = !1) : (s.isLeftEndpoint = !0, c.isLeftEndpoint = !1), t.push(s), t.push(c), i = a, zn += 1;
|
|
1662
1665
|
}
|
|
1663
1666
|
}
|
|
1664
|
-
|
|
1667
|
+
Ln += 1;
|
|
1665
1668
|
}
|
|
1666
|
-
var
|
|
1669
|
+
var Vn = class {
|
|
1667
1670
|
constructor(e) {
|
|
1668
1671
|
this.leftSweepEvent = e, this.rightSweepEvent = e.otherEvent;
|
|
1669
1672
|
}
|
|
1670
1673
|
};
|
|
1671
|
-
function
|
|
1674
|
+
function Hn(e, t) {
|
|
1672
1675
|
if (e === null || t === null || e.leftSweepEvent.ringId === t.leftSweepEvent.ringId && (e.rightSweepEvent.isSamePoint(t.leftSweepEvent) || e.rightSweepEvent.isSamePoint(t.leftSweepEvent) || e.rightSweepEvent.isSamePoint(t.rightSweepEvent) || e.leftSweepEvent.isSamePoint(t.leftSweepEvent) || e.leftSweepEvent.isSamePoint(t.rightSweepEvent))) return !1;
|
|
1673
1676
|
let n = e.leftSweepEvent.p.x, r = e.leftSweepEvent.p.y, i = e.rightSweepEvent.p.x, a = e.rightSweepEvent.p.y, o = t.leftSweepEvent.p.x, s = t.leftSweepEvent.p.y, c = t.rightSweepEvent.p.x, l = t.rightSweepEvent.p.y, u = (l - s) * (i - n) - (c - o) * (a - r), d = (c - o) * (r - s) - (l - s) * (n - o), f = (i - n) * (r - s) - (a - r) * (n - o);
|
|
1674
1677
|
if (u === 0) return !1;
|
|
1675
1678
|
let p = d / u, m = f / u;
|
|
1676
1679
|
return p >= 0 && p <= 1 && m >= 0 && m <= 1 ? [n + p * (i - n), r + p * (a - r)] : !1;
|
|
1677
1680
|
}
|
|
1678
|
-
function
|
|
1681
|
+
function Un(e, t) {
|
|
1679
1682
|
t ||= !1;
|
|
1680
|
-
let n = [], r = new
|
|
1683
|
+
let n = [], r = new jn([], Pn);
|
|
1681
1684
|
for (; e.length;) {
|
|
1682
1685
|
let i = e.pop();
|
|
1683
1686
|
if (i.isLeftEndpoint) {
|
|
1684
|
-
let e = new
|
|
1687
|
+
let e = new Vn(i);
|
|
1685
1688
|
for (let a = 0; a < r.data.length; a++) {
|
|
1686
1689
|
let o = r.data[a];
|
|
1687
1690
|
if (t && o.leftSweepEvent.featureId === i.featureId) continue;
|
|
1688
|
-
let s =
|
|
1691
|
+
let s = Hn(e, o);
|
|
1689
1692
|
s !== !1 && n.push(s);
|
|
1690
1693
|
}
|
|
1691
1694
|
r.push(e);
|
|
@@ -1693,17 +1696,17 @@ function Vn(e, t) {
|
|
|
1693
1696
|
}
|
|
1694
1697
|
return n;
|
|
1695
1698
|
}
|
|
1696
|
-
function
|
|
1697
|
-
let n = new
|
|
1698
|
-
return
|
|
1699
|
+
function Wn(e, t) {
|
|
1700
|
+
let n = new jn([], Nn);
|
|
1701
|
+
return In(e, n), Un(n, t);
|
|
1699
1702
|
}
|
|
1700
1703
|
//#endregion
|
|
1701
1704
|
//#region node_modules/@turf/line-intersect/dist/esm/index.js
|
|
1702
|
-
var
|
|
1703
|
-
function
|
|
1705
|
+
var Gn = Wn;
|
|
1706
|
+
function Kn(e, t, n = {}) {
|
|
1704
1707
|
let { removeDuplicates: r = !0, ignoreSelfIntersections: i = !0 } = n, a = [];
|
|
1705
1708
|
e.type === "FeatureCollection" ? a = a.concat(e.features) : e.type === "Feature" ? a.push(e) : (e.type === "LineString" || e.type === "Polygon" || e.type === "MultiLineString" || e.type === "MultiPolygon") && a.push(F(e)), t.type === "FeatureCollection" ? a = a.concat(t.features) : t.type === "Feature" ? a.push(t) : (t.type === "LineString" || t.type === "Polygon" || t.type === "MultiLineString" || t.type === "MultiPolygon") && a.push(F(t));
|
|
1706
|
-
let o =
|
|
1709
|
+
let o = Gn(L(a), i), s = [];
|
|
1707
1710
|
if (r) {
|
|
1708
1711
|
let e = {};
|
|
1709
1712
|
o.forEach((t) => {
|
|
@@ -1711,29 +1714,29 @@ function Wn(e, t, n = {}) {
|
|
|
1711
1714
|
e[n] || (e[n] = !0, s.push(t));
|
|
1712
1715
|
});
|
|
1713
1716
|
} else s = o;
|
|
1714
|
-
return L(s.map((e) =>
|
|
1717
|
+
return L(s.map((e) => he(e)));
|
|
1715
1718
|
}
|
|
1716
1719
|
//#endregion
|
|
1717
1720
|
//#region node_modules/@turf/distance/dist/esm/index.js
|
|
1718
|
-
function
|
|
1721
|
+
function qn(e, t, n = {}) {
|
|
1719
1722
|
var r = B(e), i = B(t), a = R(i[1] - r[1]), o = R(i[0] - r[0]), s = R(r[1]), c = R(i[1]), l = Math.sin(a / 2) ** 2 + Math.sin(o / 2) ** 2 * Math.cos(s) * Math.cos(c);
|
|
1720
|
-
return
|
|
1723
|
+
return ye(2 * Math.atan2(Math.sqrt(l), Math.sqrt(1 - l)), n.units);
|
|
1721
1724
|
}
|
|
1722
1725
|
//#endregion
|
|
1723
1726
|
//#region node_modules/@turf/nearest-point-on-line/dist/esm/index.js
|
|
1724
|
-
var
|
|
1727
|
+
var Jn = Object.defineProperty, Yn = Object.defineProperties, Xn = Object.getOwnPropertyDescriptors, Zn = Object.getOwnPropertySymbols, Qn = Object.prototype.hasOwnProperty, $n = Object.prototype.propertyIsEnumerable, er = (e, t, n) => t in e ? Jn(e, t, {
|
|
1725
1728
|
enumerable: !0,
|
|
1726
1729
|
configurable: !0,
|
|
1727
1730
|
writable: !0,
|
|
1728
1731
|
value: n
|
|
1729
|
-
}) : e[t] = n,
|
|
1730
|
-
for (var n in t ||= {})
|
|
1731
|
-
if (
|
|
1732
|
+
}) : e[t] = n, tr = (e, t) => {
|
|
1733
|
+
for (var n in t ||= {}) Qn.call(t, n) && er(e, n, t[n]);
|
|
1734
|
+
if (Zn) for (var n of Zn(t)) $n.call(t, n) && er(e, n, t[n]);
|
|
1732
1735
|
return e;
|
|
1733
|
-
},
|
|
1734
|
-
function
|
|
1736
|
+
}, nr = (e, t) => Yn(e, Xn(t));
|
|
1737
|
+
function rr(e, t, n = {}) {
|
|
1735
1738
|
if (!e || !t) throw Error("lines and inputPoint are required arguments");
|
|
1736
|
-
let r = B(t), i =
|
|
1739
|
+
let r = B(t), i = he([Infinity, Infinity], {
|
|
1737
1740
|
lineStringIndex: -1,
|
|
1738
1741
|
segmentIndex: -1,
|
|
1739
1742
|
totalDistance: -1,
|
|
@@ -1745,16 +1748,16 @@ function tr(e, t, n = {}) {
|
|
|
1745
1748
|
location: -1,
|
|
1746
1749
|
dist: Infinity
|
|
1747
1750
|
}), a = 0, o = 0, s = -1;
|
|
1748
|
-
return
|
|
1751
|
+
return Oe(e, function(e, c, l) {
|
|
1749
1752
|
s !== l && (s = l, o = 0);
|
|
1750
1753
|
let u = V(e);
|
|
1751
1754
|
for (let e = 0; e < u.length - 1; e++) {
|
|
1752
|
-
let s =
|
|
1753
|
-
f[0] === r[0] && f[1] === r[1] ? [m, h] = [f, !0] : c[0] === r[0] && c[1] === r[1] ? [m, h] = [c, !1] : [m, h] =
|
|
1754
|
-
let g =
|
|
1755
|
+
let s = he(u[e]), c = B(s), d = he(u[e + 1]), f = B(d), p = qn(s, d, n), m, h;
|
|
1756
|
+
f[0] === r[0] && f[1] === r[1] ? [m, h] = [f, !0] : c[0] === r[0] && c[1] === r[1] ? [m, h] = [c, !1] : [m, h] = lr(c, f, r);
|
|
1757
|
+
let g = qn(t, m, n);
|
|
1755
1758
|
if (g < i.properties.pointDistance) {
|
|
1756
|
-
let t =
|
|
1757
|
-
i =
|
|
1759
|
+
let t = qn(s, m, n);
|
|
1760
|
+
i = he(m, {
|
|
1758
1761
|
lineStringIndex: l,
|
|
1759
1762
|
segmentIndex: h ? e + 1 : e,
|
|
1760
1763
|
totalDistance: a + t,
|
|
@@ -1765,7 +1768,7 @@ function tr(e, t, n = {}) {
|
|
|
1765
1768
|
index: -1,
|
|
1766
1769
|
location: -1,
|
|
1767
1770
|
dist: Infinity
|
|
1768
|
-
}), i.properties =
|
|
1771
|
+
}), i.properties = nr(tr({}, i.properties), {
|
|
1769
1772
|
multiFeatureIndex: i.properties.lineStringIndex,
|
|
1770
1773
|
index: i.properties.segmentIndex,
|
|
1771
1774
|
location: i.properties.totalDistance,
|
|
@@ -1780,7 +1783,7 @@ function $(e, t) {
|
|
|
1780
1783
|
let [n, r, i] = e, [a, o, s] = t;
|
|
1781
1784
|
return n * a + r * o + i * s;
|
|
1782
1785
|
}
|
|
1783
|
-
function
|
|
1786
|
+
function ir(e, t) {
|
|
1784
1787
|
let [n, r, i] = e, [a, o, s] = t;
|
|
1785
1788
|
return [
|
|
1786
1789
|
r * s - i * o,
|
|
@@ -1788,18 +1791,18 @@ function nr(e, t) {
|
|
|
1788
1791
|
n * o - r * a
|
|
1789
1792
|
];
|
|
1790
1793
|
}
|
|
1791
|
-
function
|
|
1794
|
+
function ar(e) {
|
|
1792
1795
|
return Math.sqrt(e[0] ** 2 + e[1] ** 2 + e[2] ** 2);
|
|
1793
1796
|
}
|
|
1794
|
-
function
|
|
1795
|
-
let t =
|
|
1797
|
+
function or(e) {
|
|
1798
|
+
let t = ar(e);
|
|
1796
1799
|
return [
|
|
1797
1800
|
e[0] / t,
|
|
1798
1801
|
e[1] / t,
|
|
1799
1802
|
e[2] / t
|
|
1800
1803
|
];
|
|
1801
1804
|
}
|
|
1802
|
-
function
|
|
1805
|
+
function sr(e) {
|
|
1803
1806
|
let t = R(e[1]), n = R(e[0]);
|
|
1804
1807
|
return [
|
|
1805
1808
|
Math.cos(t) * Math.cos(n),
|
|
@@ -1807,144 +1810,144 @@ function ar(e) {
|
|
|
1807
1810
|
Math.sin(t)
|
|
1808
1811
|
];
|
|
1809
1812
|
}
|
|
1810
|
-
function
|
|
1811
|
-
let [t, n, r] = e, i = Math.min(Math.max(r, -1), 1), a =
|
|
1812
|
-
return [
|
|
1813
|
+
function cr(e) {
|
|
1814
|
+
let [t, n, r] = e, i = Math.min(Math.max(r, -1), 1), a = be(Math.asin(i));
|
|
1815
|
+
return [be(Math.atan2(n, t)), a];
|
|
1813
1816
|
}
|
|
1814
|
-
function
|
|
1815
|
-
let r =
|
|
1817
|
+
function lr(e, t, n) {
|
|
1818
|
+
let r = sr(e), i = sr(t), a = sr(n), o = ir(r, i);
|
|
1816
1819
|
if (o[0] === 0 && o[1] === 0 && o[2] === 0) return $(r, i) > 0 ? [[...t], !0] : [[...n], !1];
|
|
1817
|
-
let s =
|
|
1820
|
+
let s = ir(o, a);
|
|
1818
1821
|
if (s[0] === 0 && s[1] === 0 && s[2] === 0) return [[...t], !0];
|
|
1819
|
-
let c = ir(
|
|
1822
|
+
let c = or(ir(s, o)), l = [
|
|
1820
1823
|
-c[0],
|
|
1821
1824
|
-c[1],
|
|
1822
1825
|
-c[2]
|
|
1823
|
-
], u = $(a, c) > $(a, l) ? c : l, d =
|
|
1824
|
-
return f >= 0 && p >= 0 ? [
|
|
1826
|
+
], u = $(a, c) > $(a, l) ? c : l, d = or(o), f = $(ir(r, u), d), p = $(ir(u, i), d);
|
|
1827
|
+
return f >= 0 && p >= 0 ? [cr(u), !1] : $(r, a) > $(i, a) ? [[...e], !1] : [[...t], !0];
|
|
1825
1828
|
}
|
|
1826
1829
|
//#endregion
|
|
1827
1830
|
//#region node_modules/@turf/line-split/dist/esm/index.js
|
|
1828
|
-
function
|
|
1831
|
+
function ur(e, t) {
|
|
1829
1832
|
if (!e) throw Error("line is required");
|
|
1830
1833
|
if (!t) throw Error("splitter is required");
|
|
1831
|
-
let n =
|
|
1834
|
+
let n = Ue(e), r = Ue(t);
|
|
1832
1835
|
if (n !== "LineString") throw Error("line must be LineString");
|
|
1833
1836
|
if (r === "FeatureCollection") throw Error("splitter cannot be a FeatureCollection");
|
|
1834
1837
|
if (r === "GeometryCollection") throw Error("splitter cannot be a GeometryCollection");
|
|
1835
|
-
var i =
|
|
1838
|
+
var i = Tn(t, { precision: 7 });
|
|
1836
1839
|
switch (e.type !== "Feature" && (e = F(e)), r) {
|
|
1837
|
-
case "Point": return
|
|
1838
|
-
case "MultiPoint": return
|
|
1840
|
+
case "Point": return fr(e, i);
|
|
1841
|
+
case "MultiPoint": return dr(e, i);
|
|
1839
1842
|
case "LineString":
|
|
1840
1843
|
case "MultiLineString":
|
|
1841
1844
|
case "Polygon":
|
|
1842
|
-
case "MultiPolygon": return
|
|
1845
|
+
case "MultiPolygon": return dr(e, Kn(e, i, { ignoreSelfIntersections: !0 }));
|
|
1843
1846
|
}
|
|
1844
1847
|
}
|
|
1845
|
-
function
|
|
1846
|
-
var n = [], r =
|
|
1847
|
-
return
|
|
1848
|
+
function dr(e, t) {
|
|
1849
|
+
var n = [], r = wn();
|
|
1850
|
+
return Oe(t, function(t) {
|
|
1848
1851
|
if (n.forEach(function(e, t) {
|
|
1849
1852
|
e.id = t;
|
|
1850
|
-
}), !n.length) n =
|
|
1853
|
+
}), !n.length) n = fr(e, t).features, r.load(L(n));
|
|
1851
1854
|
else {
|
|
1852
1855
|
var i = r.search(t);
|
|
1853
1856
|
if (i.features.length) {
|
|
1854
|
-
var a =
|
|
1857
|
+
var a = pr(t, i);
|
|
1855
1858
|
n = n.filter(function(e) {
|
|
1856
1859
|
return e.id !== a.id;
|
|
1857
|
-
}), r.remove(a),
|
|
1860
|
+
}), r.remove(a), we(fr(a, t), function(e) {
|
|
1858
1861
|
n.push(e), r.insert(e);
|
|
1859
1862
|
});
|
|
1860
1863
|
}
|
|
1861
1864
|
}
|
|
1862
1865
|
}), L(n);
|
|
1863
1866
|
}
|
|
1864
|
-
function
|
|
1867
|
+
function fr(e, t) {
|
|
1865
1868
|
var n = [], r = V(e)[0], i = V(e)[e.geometry.coordinates.length - 1];
|
|
1866
|
-
if (
|
|
1867
|
-
var a =
|
|
1869
|
+
if (mr(r, B(t)) || mr(i, B(t))) return L([e]);
|
|
1870
|
+
var a = wn(), o = Dn(e);
|
|
1868
1871
|
a.load(o);
|
|
1869
1872
|
var s = a.search(t);
|
|
1870
1873
|
if (!s.features.length) return L([e]);
|
|
1871
|
-
var c =
|
|
1874
|
+
var c = pr(t, s), l = Te(o, function(e, r, i) {
|
|
1872
1875
|
var a = V(r)[1], o = B(t);
|
|
1873
|
-
return i === c.id ? (e.push(o), n.push(I(e)),
|
|
1876
|
+
return i === c.id ? (e.push(o), n.push(I(e)), mr(o, a) ? [o] : [o, a]) : (e.push(a), e);
|
|
1874
1877
|
}, [r]);
|
|
1875
1878
|
return l.length > 1 && n.push(I(l)), L(n);
|
|
1876
1879
|
}
|
|
1877
|
-
function
|
|
1880
|
+
function pr(e, t) {
|
|
1878
1881
|
if (!t.features.length) throw Error("lines must contain features");
|
|
1879
1882
|
if (t.features.length === 1) return t.features[0];
|
|
1880
1883
|
var n, r = Infinity;
|
|
1881
|
-
return
|
|
1882
|
-
var i =
|
|
1884
|
+
return we(t, function(t) {
|
|
1885
|
+
var i = rr(t, e).properties.dist;
|
|
1883
1886
|
i < r && (n = t, r = i);
|
|
1884
1887
|
}), n;
|
|
1885
1888
|
}
|
|
1886
|
-
function
|
|
1889
|
+
function mr(e, t) {
|
|
1887
1890
|
return e[0] === t[0] && e[1] === t[1];
|
|
1888
1891
|
}
|
|
1889
1892
|
//#endregion
|
|
1890
1893
|
//#region node_modules/@turf/boolean-contains/dist/esm/index.js
|
|
1891
|
-
function
|
|
1894
|
+
function hr(e, t) {
|
|
1892
1895
|
let n = H(e), r = H(t), i = n.type, a = r.type, o = n.coordinates, s = r.coordinates;
|
|
1893
1896
|
switch (i) {
|
|
1894
1897
|
case "Point": switch (a) {
|
|
1895
|
-
case "Point": return
|
|
1898
|
+
case "Point": return Dr(o, s);
|
|
1896
1899
|
default: throw Error("feature2 " + a + " geometry not supported");
|
|
1897
1900
|
}
|
|
1898
1901
|
case "MultiPoint": switch (a) {
|
|
1899
|
-
case "Point": return
|
|
1900
|
-
case "MultiPoint": return
|
|
1902
|
+
case "Point": return vr(n, r);
|
|
1903
|
+
case "MultiPoint": return yr(n, r);
|
|
1901
1904
|
default: throw Error("feature2 " + a + " geometry not supported");
|
|
1902
1905
|
}
|
|
1903
1906
|
case "LineString": switch (a) {
|
|
1904
1907
|
case "Point": return U(r, n, { ignoreEndVertices: !0 });
|
|
1905
|
-
case "LineString": return
|
|
1906
|
-
case "MultiPoint": return
|
|
1908
|
+
case "LineString": return Sr(n, r);
|
|
1909
|
+
case "MultiPoint": return br(n, r);
|
|
1907
1910
|
default: throw Error("feature2 " + a + " geometry not supported");
|
|
1908
1911
|
}
|
|
1909
1912
|
case "Polygon": switch (a) {
|
|
1910
|
-
case "Point": return
|
|
1911
|
-
case "LineString": return
|
|
1912
|
-
case "Polygon": return
|
|
1913
|
-
case "MultiPoint": return
|
|
1914
|
-
case "MultiPolygon": return
|
|
1913
|
+
case "Point": return yn(r, n, { ignoreBoundary: !0 });
|
|
1914
|
+
case "LineString": return wr(n, r);
|
|
1915
|
+
case "Polygon": return Tr(n, r);
|
|
1916
|
+
case "MultiPoint": return xr(n, r);
|
|
1917
|
+
case "MultiPolygon": return _r(n, r);
|
|
1915
1918
|
default: throw Error("feature2 " + a + " geometry not supported");
|
|
1916
1919
|
}
|
|
1917
1920
|
case "MultiPolygon": switch (a) {
|
|
1918
|
-
case "Polygon": return
|
|
1921
|
+
case "Polygon": return gr(n, r);
|
|
1919
1922
|
default: throw Error("feature2 " + a + " geometry not supported");
|
|
1920
1923
|
}
|
|
1921
1924
|
default: throw Error("feature1 " + i + " geometry not supported");
|
|
1922
1925
|
}
|
|
1923
1926
|
}
|
|
1924
|
-
function
|
|
1925
|
-
return e.coordinates.some((e) =>
|
|
1927
|
+
function gr(e, t) {
|
|
1928
|
+
return e.coordinates.some((e) => Tr({
|
|
1926
1929
|
type: "Polygon",
|
|
1927
1930
|
coordinates: e
|
|
1928
1931
|
}, t));
|
|
1929
1932
|
}
|
|
1930
|
-
function
|
|
1931
|
-
return t.coordinates.every((t) =>
|
|
1933
|
+
function _r(e, t) {
|
|
1934
|
+
return t.coordinates.every((t) => Tr(e, {
|
|
1932
1935
|
type: "Polygon",
|
|
1933
1936
|
coordinates: t
|
|
1934
1937
|
}));
|
|
1935
1938
|
}
|
|
1936
|
-
function
|
|
1939
|
+
function vr(e, t) {
|
|
1937
1940
|
let n, r = !1;
|
|
1938
|
-
for (n = 0; n < e.coordinates.length; n++) if (
|
|
1941
|
+
for (n = 0; n < e.coordinates.length; n++) if (Dr(e.coordinates[n], t.coordinates)) {
|
|
1939
1942
|
r = !0;
|
|
1940
1943
|
break;
|
|
1941
1944
|
}
|
|
1942
1945
|
return r;
|
|
1943
1946
|
}
|
|
1944
|
-
function
|
|
1947
|
+
function yr(e, t) {
|
|
1945
1948
|
for (let n of t.coordinates) {
|
|
1946
1949
|
let t = !1;
|
|
1947
|
-
for (let r of e.coordinates) if (
|
|
1950
|
+
for (let r of e.coordinates) if (Dr(n, r)) {
|
|
1948
1951
|
t = !0;
|
|
1949
1952
|
break;
|
|
1950
1953
|
}
|
|
@@ -1952,16 +1955,16 @@ function _r(e, t) {
|
|
|
1952
1955
|
}
|
|
1953
1956
|
return !0;
|
|
1954
1957
|
}
|
|
1955
|
-
function
|
|
1958
|
+
function br(e, t) {
|
|
1956
1959
|
let n = !1;
|
|
1957
1960
|
for (let r of t.coordinates) if (U(r, e, { ignoreEndVertices: !0 }) && (n = !0), !U(r, e)) return !1;
|
|
1958
1961
|
return !!n;
|
|
1959
1962
|
}
|
|
1960
|
-
function
|
|
1961
|
-
for (let n of t.coordinates) if (!
|
|
1963
|
+
function xr(e, t) {
|
|
1964
|
+
for (let n of t.coordinates) if (!yn(n, e, { ignoreBoundary: !0 })) return !1;
|
|
1962
1965
|
return !0;
|
|
1963
1966
|
}
|
|
1964
|
-
function
|
|
1967
|
+
function Sr(e, t) {
|
|
1965
1968
|
let n = !1;
|
|
1966
1969
|
for (let r of t.coordinates) if (U({
|
|
1967
1970
|
type: "Point",
|
|
@@ -1972,69 +1975,74 @@ function br(e, t) {
|
|
|
1972
1975
|
}, e, { ignoreEndVertices: !1 })) return !1;
|
|
1973
1976
|
return n;
|
|
1974
1977
|
}
|
|
1975
|
-
function
|
|
1978
|
+
function Cr(e, t) {
|
|
1976
1979
|
let n = e.coordinates, r = [];
|
|
1977
1980
|
for (let e = 0; e < n.length - 1; e++) {
|
|
1978
|
-
let i = I([n[e], n[e + 1]]), a =
|
|
1981
|
+
let i = I([n[e], n[e + 1]]), a = ur(i, F(t));
|
|
1979
1982
|
a.features.length === 0 ? r.push(i) : r.push(...a.features);
|
|
1980
1983
|
}
|
|
1981
1984
|
return L(r);
|
|
1982
1985
|
}
|
|
1983
|
-
function
|
|
1984
|
-
if (!
|
|
1985
|
-
for (let n of t.coordinates) if (!
|
|
1986
|
-
let n = !1, r =
|
|
1986
|
+
function wr(e, t) {
|
|
1987
|
+
if (!Er(G(e), G(t))) return !1;
|
|
1988
|
+
for (let n of t.coordinates) if (!yn(n, e)) return !1;
|
|
1989
|
+
let n = !1, r = Cr(t, e);
|
|
1987
1990
|
for (let t of r.features) {
|
|
1988
|
-
let r =
|
|
1989
|
-
if (!
|
|
1990
|
-
!n &&
|
|
1991
|
+
let r = Or(t.geometry.coordinates[0], t.geometry.coordinates[1]);
|
|
1992
|
+
if (!yn(r, e)) return !1;
|
|
1993
|
+
!n && yn(r, e, { ignoreBoundary: !0 }) && (n = !0);
|
|
1991
1994
|
}
|
|
1992
1995
|
return n;
|
|
1993
1996
|
}
|
|
1994
|
-
function
|
|
1995
|
-
if (e.type === "Feature" && e.geometry === null || t.type === "Feature" && t.geometry === null || !
|
|
1997
|
+
function Tr(e, t) {
|
|
1998
|
+
if (e.type === "Feature" && e.geometry === null || t.type === "Feature" && t.geometry === null || !Er(G(e), G(t))) return !1;
|
|
1996
1999
|
let n = H(t).coordinates;
|
|
1997
|
-
for (let t of n) for (let n of t) if (!
|
|
2000
|
+
for (let t of n) for (let n of t) if (!yn(n, e)) return !1;
|
|
1998
2001
|
return !0;
|
|
1999
2002
|
}
|
|
2000
|
-
function
|
|
2003
|
+
function Er(e, t) {
|
|
2001
2004
|
return !(e[0] > t[0] || e[2] < t[2] || e[1] > t[1] || e[3] < t[3]);
|
|
2002
2005
|
}
|
|
2003
|
-
function
|
|
2006
|
+
function Dr(e, t) {
|
|
2004
2007
|
return e[0] === t[0] && e[1] === t[1];
|
|
2005
2008
|
}
|
|
2006
|
-
function
|
|
2009
|
+
function Or(e, t) {
|
|
2007
2010
|
return [(e[0] + t[0]) / 2, (e[1] + t[1]) / 2];
|
|
2008
2011
|
}
|
|
2009
|
-
var
|
|
2012
|
+
var kr = hr;
|
|
2010
2013
|
//#endregion
|
|
2011
2014
|
//#region node_modules/@turf/envelope/dist/esm/index.js
|
|
2012
|
-
function
|
|
2013
|
-
return
|
|
2015
|
+
function Ar(e) {
|
|
2016
|
+
return rn(G(e));
|
|
2014
2017
|
}
|
|
2015
|
-
var
|
|
2018
|
+
var jr = Ar;
|
|
2016
2019
|
//#endregion
|
|
2017
2020
|
//#region src/utils/geom.ts
|
|
2018
|
-
function
|
|
2021
|
+
function Mr(e) {
|
|
2019
2022
|
return e.geometry && (e.geometry.type === "LineString" || e.geometry.type === "MultiLineString" || e.geometry.type === "Polygon" || e.geometry.type === "MultiPolygon");
|
|
2020
2023
|
}
|
|
2021
|
-
function
|
|
2022
|
-
let n = e.map((e) => e.geometry ? e.geometry.type === "Point" || e.geometry.type === "MultiPoint" ?
|
|
2023
|
-
return n.length === 0 ? null :
|
|
2024
|
-
}
|
|
2025
|
-
var
|
|
2026
|
-
function
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
t,
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
i
|
|
2024
|
+
function Nr(e, t) {
|
|
2025
|
+
let n = e.map((e) => e.geometry ? e.geometry.type === "Point" || e.geometry.type === "MultiPoint" ? kr(an(t), e) ? e : null : Mr(e) ? nn(e, t) : null : null).filter((e) => e !== null);
|
|
2026
|
+
return n.length === 0 ? null : jr(L(n));
|
|
2027
|
+
}
|
|
2028
|
+
var Pr = .001, Fr = 1e-4;
|
|
2029
|
+
function Ir(e, t) {
|
|
2030
|
+
return [
|
|
2031
|
+
e[0] - t,
|
|
2032
|
+
e[1] - t,
|
|
2033
|
+
e[2] + t,
|
|
2034
|
+
e[3] + t
|
|
2033
2035
|
];
|
|
2034
2036
|
}
|
|
2037
|
+
function Lr(e) {
|
|
2038
|
+
return Ir(e, Pr);
|
|
2039
|
+
}
|
|
2040
|
+
function Rr(e) {
|
|
2041
|
+
return Ir(e, Fr);
|
|
2042
|
+
}
|
|
2035
2043
|
//#endregion
|
|
2036
2044
|
//#region src/components/VMap.vue?vue&type=script&setup=true&lang.ts
|
|
2037
|
-
var
|
|
2045
|
+
var zr = ["id"], Br = /* @__PURE__ */ xt(/* @__PURE__ */ l({
|
|
2038
2046
|
__name: "VMap",
|
|
2039
2047
|
props: {
|
|
2040
2048
|
id: {},
|
|
@@ -2042,23 +2050,24 @@ var Pr = ["id"], Fr = /* @__PURE__ */ yt(/* @__PURE__ */ c({
|
|
|
2042
2050
|
bbox: {}
|
|
2043
2051
|
},
|
|
2044
2052
|
setup(e) {
|
|
2045
|
-
let t = e, n =
|
|
2053
|
+
let t = e, n = p(nt, Jt), r = {
|
|
2046
2054
|
top: 60,
|
|
2047
2055
|
left: 60,
|
|
2048
2056
|
right: 60,
|
|
2049
2057
|
bottom: 80
|
|
2050
|
-
}, a =
|
|
2058
|
+
}, a = E(), o = E(!1), s = E(), c = E(), l;
|
|
2051
2059
|
j(o, (e) => {
|
|
2052
|
-
e ?
|
|
2060
|
+
e ? u() : (a.value && a.value.remove(), a.value = void 0);
|
|
2053
2061
|
}), j(() => t.features, (e) => {
|
|
2054
|
-
a.value && o.value && e && (a.value.remove(), a.value = void 0,
|
|
2062
|
+
a.value && o.value && e && (a.value.remove(), a.value = void 0, u());
|
|
2055
2063
|
});
|
|
2056
|
-
function
|
|
2064
|
+
function u() {
|
|
2057
2065
|
if (!a.value) {
|
|
2058
|
-
|
|
2066
|
+
l = t.bbox ? Lr(t.bbox) : void 0;
|
|
2067
|
+
let e = l ? Nr(t.features, l) : L(t.features);
|
|
2059
2068
|
if (e) {
|
|
2060
|
-
let i =
|
|
2061
|
-
a.value = new
|
|
2069
|
+
let i = Rr(Ct(e)), o = [[i[0], i[1]], [i[2], i[3]]];
|
|
2070
|
+
a.value = new ie.Map({
|
|
2062
2071
|
hash: !1,
|
|
2063
2072
|
container: `map-${t.id}`,
|
|
2064
2073
|
bounds: o,
|
|
@@ -2068,14 +2077,15 @@ var Pr = ["id"], Fr = /* @__PURE__ */ yt(/* @__PURE__ */ c({
|
|
|
2068
2077
|
maxZoom: 17
|
|
2069
2078
|
},
|
|
2070
2079
|
style: n,
|
|
2071
|
-
|
|
2072
|
-
|
|
2080
|
+
cooperativeGestures: !0,
|
|
2081
|
+
attributionControl: !1
|
|
2082
|
+
}), a.value.addControl(new ie.FullscreenControl()), a.value.on("load", f);
|
|
2073
2083
|
}
|
|
2074
2084
|
}
|
|
2075
2085
|
}
|
|
2076
|
-
function
|
|
2086
|
+
function d(e) {
|
|
2077
2087
|
if (!a.value) throw Error("Call initMap() function first.");
|
|
2078
|
-
a.value.addSource(
|
|
2088
|
+
a.value.addSource(Xt, {
|
|
2079
2089
|
type: "geojson",
|
|
2080
2090
|
data: {
|
|
2081
2091
|
type: "Feature",
|
|
@@ -2093,122 +2103,126 @@ var Pr = ["id"], Fr = /* @__PURE__ */ yt(/* @__PURE__ */ c({
|
|
|
2093
2103
|
}
|
|
2094
2104
|
}), a.value.addLayer(q.Bbox);
|
|
2095
2105
|
}
|
|
2096
|
-
function
|
|
2106
|
+
function f() {
|
|
2097
2107
|
if (!a.value) throw Error("Call initMap() function first.");
|
|
2098
|
-
|
|
2108
|
+
l && d(l), a.value.addSource(K, {
|
|
2099
2109
|
type: "geojson",
|
|
2100
2110
|
data: {
|
|
2101
2111
|
type: "FeatureCollection",
|
|
2102
2112
|
features: t.features
|
|
2103
2113
|
}
|
|
2104
|
-
}),
|
|
2114
|
+
}), m(), v();
|
|
2105
2115
|
}
|
|
2106
|
-
function
|
|
2116
|
+
function m() {
|
|
2107
2117
|
if (!a.value) throw Error("Call initMap() function first.");
|
|
2108
2118
|
a.value.getLayer(q.Polygon.id) || a.value.addLayer(q.Polygon), a.value.getLayer(q.PolygonBorder.id) || a.value.addLayer(q.PolygonBorder), a.value.getLayer(q.LineStringBorder.id) || a.value.addLayer(q.LineStringBorder), a.value.getLayer(q.LineString.id) || a.value.addLayer(q.LineString), a.value.getLayer(q.Point.id) || a.value.addLayer(q.Point);
|
|
2109
2119
|
}
|
|
2110
|
-
function
|
|
2111
|
-
!e.features || e.features.length === 0 || (c.value !== void 0 &&
|
|
2112
|
-
}
|
|
2113
|
-
function h() {
|
|
2114
|
-
a.value.getCanvas().style.cursor = "pointer";
|
|
2120
|
+
function h(e) {
|
|
2121
|
+
!e.features || e.features.length === 0 || (c.value !== void 0 && x(), c.value = e.features[0], y(e.lngLat, e.features[0]));
|
|
2115
2122
|
}
|
|
2116
2123
|
function g() {
|
|
2117
|
-
a.value.getCanvas().style.cursor = ""
|
|
2124
|
+
a.value.getCanvas().style.cursor = "pointer";
|
|
2118
2125
|
}
|
|
2119
2126
|
function _() {
|
|
2127
|
+
a.value.getCanvas().style.cursor = "", c.value !== void 0 && (c.value = void 0), x();
|
|
2128
|
+
}
|
|
2129
|
+
function v() {
|
|
2120
2130
|
if (!a.value) throw Error("Call initMap() function first.");
|
|
2121
2131
|
Object.values(q).forEach((e) => {
|
|
2122
|
-
e.id !== "bbox-layer" && (a.value.on("mousemove", e.id,
|
|
2132
|
+
e.id !== "bbox-layer" && (a.value.on("mousemove", e.id, h), a.value.on("mouseenter", e.id, g), a.value.on("mouseleave", e.id, _));
|
|
2123
2133
|
});
|
|
2124
2134
|
}
|
|
2125
|
-
function
|
|
2135
|
+
function y(e, t) {
|
|
2126
2136
|
if (!a.value) throw Error("Call initMap() function first.");
|
|
2127
|
-
s.value = new
|
|
2137
|
+
s.value = new ie.Popup().setLngLat(e).setHTML(`${rt[t.properties.objtype]}-${t.properties.id}-v${t.properties.version}`).addTo(a.value);
|
|
2128
2138
|
}
|
|
2129
|
-
function
|
|
2139
|
+
function x() {
|
|
2130
2140
|
s.value?.remove(), s.value = void 0;
|
|
2131
2141
|
}
|
|
2132
|
-
function
|
|
2142
|
+
function S([e]) {
|
|
2133
2143
|
o.value = e?.isIntersecting || !1;
|
|
2134
2144
|
}
|
|
2135
|
-
return (t, n) =>
|
|
2145
|
+
return (t, n) => re((b(), i("div", {
|
|
2136
2146
|
id: `map-${e.id}`,
|
|
2137
2147
|
class: "v-map"
|
|
2138
|
-
}, null, 8,
|
|
2148
|
+
}, null, 8, zr)), [[A(Kt), S]]);
|
|
2139
2149
|
}
|
|
2140
|
-
}), [["__scopeId", "data-v-
|
|
2150
|
+
}), [["__scopeId", "data-v-e1815a55"]]), Vr = ["id"], Hr = { class: "group-header" }, Ur = { class: "header-start" }, Wr = ["href"], Gr = ["title"], Kr = { class: "header-center" }, qr = {
|
|
2151
|
+
key: 0,
|
|
2152
|
+
class: "header-end"
|
|
2153
|
+
}, Jr = { class: "group-content" }, Yr = {
|
|
2154
|
+
key: 0,
|
|
2155
|
+
class: "content-start"
|
|
2156
|
+
}, Xr = { class: "before-list" }, Zr = { class: "after-list" }, Qr = /* @__PURE__ */ xt(/* @__PURE__ */ l({
|
|
2141
2157
|
__name: "LoChaGroup",
|
|
2142
2158
|
props: {
|
|
2159
|
+
id: {},
|
|
2143
2160
|
index: {},
|
|
2144
2161
|
features: {},
|
|
2145
2162
|
josmTarget: {}
|
|
2146
2163
|
},
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
}
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
}
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
}, void 0, !0)]),
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
}, {
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
id: `${k(r)}-${n.index}`,
|
|
2199
|
-
features: t.features,
|
|
2200
|
-
bbox: k(s)?.bbox
|
|
2164
|
+
emits: ["navigate"],
|
|
2165
|
+
setup(n) {
|
|
2166
|
+
ee((e) => ({ v67f2bcc7: u.value }));
|
|
2167
|
+
let c = n, l = te(), u = t(() => l["content-start"] ? "repeat(4, minmax(0, 1fr))" : "repeat(3, minmax(0, 1fr))"), d = p(tt), { loCha: f, getBeforeFeatures: m, getAfterFeatures: h } = p(et);
|
|
2168
|
+
if (!f.value) throw Error("LoCha is empty.");
|
|
2169
|
+
let g = t(() => {
|
|
2170
|
+
let e = [...new Set(m(c.features).map((e) => e.properties.tags?.name).filter(Boolean))], t = [...new Set(h(c.features).map((e) => e.properties.tags?.name).filter(Boolean))], n = e.length > 0 ? e.join(", ") : "(unnamed)", r = t.length > 0 ? t.join(", ") : "(unnamed)";
|
|
2171
|
+
return n === r ? n : `${n} → ${r}`;
|
|
2172
|
+
});
|
|
2173
|
+
return (t, l) => (b(), i("div", {
|
|
2174
|
+
id: n.id,
|
|
2175
|
+
class: "locha-group"
|
|
2176
|
+
}, [a("div", Hr, [
|
|
2177
|
+
a("div", Ur, [a("a", {
|
|
2178
|
+
class: "anchor-button",
|
|
2179
|
+
href: `#${n.id}`,
|
|
2180
|
+
onClick: l[0] ||= N((e) => t.$emit("navigate", `#${n.id}`), ["prevent"])
|
|
2181
|
+
}, "🔗", 8, Wr), a("h3", {
|
|
2182
|
+
class: "group-name",
|
|
2183
|
+
title: g.value
|
|
2184
|
+
}, D(g.value), 9, Gr)]),
|
|
2185
|
+
a("div", Kr, [T(t.$slots, "header-center", { index: n.index }, void 0, !0)]),
|
|
2186
|
+
t.$slots["header-end"] ? (b(), i("div", qr, [T(t.$slots, "header-end", { index: n.index }, void 0, !0)])) : r("", !0)
|
|
2187
|
+
]), a("div", Jr, [
|
|
2188
|
+
t.$slots["content-start"] ? (b(), i("div", Yr, [T(t.$slots, "content-start", { index: n.index }, void 0, !0)])) : r("", !0),
|
|
2189
|
+
a("div", Xr, [a("ul", null, [(b(!0), i(e, null, w(A(m)(n.features), (e) => (b(), i("li", { key: e.id }, [s(St, {
|
|
2190
|
+
feature: e,
|
|
2191
|
+
"josm-target": n.josmTarget
|
|
2192
|
+
}, o({ _: 2 }, [t.$slots["object-detail"] ? {
|
|
2193
|
+
name: "object-detail",
|
|
2194
|
+
fn: M(() => [T(t.$slots, "object-detail", {
|
|
2195
|
+
feature: e,
|
|
2196
|
+
index: n.index
|
|
2197
|
+
}, void 0, !0)]),
|
|
2198
|
+
key: "0"
|
|
2199
|
+
} : void 0]), 1032, ["feature", "josm-target"])]))), 128))])]),
|
|
2200
|
+
a("div", Zr, [a("ul", null, [(b(!0), i(e, null, w(A(h)(n.features), (e) => (b(), i("li", { key: e.id }, [s(St, {
|
|
2201
|
+
feature: e,
|
|
2202
|
+
"josm-target": n.josmTarget
|
|
2203
|
+
}, o({ _: 2 }, [t.$slots["object-detail"] ? {
|
|
2204
|
+
name: "object-detail",
|
|
2205
|
+
fn: M(() => [T(t.$slots, "object-detail", {
|
|
2206
|
+
feature: e,
|
|
2207
|
+
index: n.index
|
|
2208
|
+
}, void 0, !0)]),
|
|
2209
|
+
key: "0"
|
|
2210
|
+
} : void 0]), 1032, ["feature", "josm-target"])]))), 128))])]),
|
|
2211
|
+
s(Br, {
|
|
2212
|
+
id: `${A(d)}-${c.index}`,
|
|
2213
|
+
features: n.features,
|
|
2214
|
+
bbox: A(f)?.bbox
|
|
2201
2215
|
}, null, 8, [
|
|
2202
2216
|
"id",
|
|
2203
2217
|
"features",
|
|
2204
2218
|
"bbox"
|
|
2205
2219
|
])
|
|
2206
|
-
]));
|
|
2220
|
+
])], 8, Vr));
|
|
2207
2221
|
}
|
|
2208
|
-
}), [["__scopeId", "data-v-
|
|
2222
|
+
}), [["__scopeId", "data-v-5b721cff"]]);
|
|
2209
2223
|
//#endregion
|
|
2210
2224
|
//#region src/utils/scrollToSection.ts
|
|
2211
|
-
function
|
|
2225
|
+
function $r(e, t = {}) {
|
|
2212
2226
|
let { container: n = document, behavior: r = "smooth", block: i = "start", inline: a = "nearest" } = t, o = e.startsWith("#") ? e.slice(1) : e, s = n.querySelector(`#${CSS.escape(o)}`);
|
|
2213
2227
|
return s ? (s.scrollIntoView({
|
|
2214
2228
|
behavior: r,
|
|
@@ -2218,57 +2232,79 @@ function Vr(e, t = {}) {
|
|
|
2218
2232
|
}
|
|
2219
2233
|
//#endregion
|
|
2220
2234
|
//#region src/components/LoCha/LoChaGroupList.vue?vue&type=script&setup=true&lang.ts
|
|
2221
|
-
var
|
|
2235
|
+
var ei = ["name"], ti = /* @__PURE__ */ xt(/* @__PURE__ */ l({
|
|
2222
2236
|
__name: "LoChaGroupList",
|
|
2223
2237
|
props: { hash: {} },
|
|
2224
2238
|
setup(t) {
|
|
2225
|
-
|
|
2226
|
-
let n = t, { groups: r } =
|
|
2227
|
-
function
|
|
2228
|
-
return `locha-${
|
|
2239
|
+
ee((e) => ({ bf57d7a0: A(l) }));
|
|
2240
|
+
let n = t, { groups: r } = p(et), c = p(tt), l = W.delete, u = C(), d = ne("listRef");
|
|
2241
|
+
function f(e) {
|
|
2242
|
+
return `locha-${c}-group-${e}`;
|
|
2229
2243
|
}
|
|
2230
|
-
function
|
|
2231
|
-
return `hidden_josm_target_${
|
|
2244
|
+
function _() {
|
|
2245
|
+
return `hidden_josm_target_${c}`;
|
|
2246
|
+
}
|
|
2247
|
+
function y(e) {
|
|
2248
|
+
u.value = e, history.replaceState(null, "", e), h(() => $r(e, { container: d.value ?? void 0 }));
|
|
2232
2249
|
}
|
|
2233
2250
|
return j(() => n.hash, (e) => {
|
|
2234
|
-
|
|
2235
|
-
}, { immediate: !0 }), (
|
|
2251
|
+
u.value = e, e && h(() => $r(e, { container: d.value ?? void 0 }));
|
|
2252
|
+
}, { immediate: !0 }), v(() => {
|
|
2253
|
+
let e = window.location.hash;
|
|
2254
|
+
e && !n.hash && y(e);
|
|
2255
|
+
}), (t, n) => (b(), i("div", {
|
|
2236
2256
|
ref_key: "listRef",
|
|
2237
|
-
ref:
|
|
2257
|
+
ref: d,
|
|
2238
2258
|
class: "locha-group-list"
|
|
2239
|
-
}, [a("ul", null, [(
|
|
2259
|
+
}, [a("ul", null, [(b(!0), i(e, null, w(A(r), (e, n) => (b(), i("li", {
|
|
2240
2260
|
key: n,
|
|
2241
|
-
class:
|
|
2242
|
-
}, [
|
|
2243
|
-
|
|
2244
|
-
href: `#${d(n)}`
|
|
2245
|
-
}, "🔗", 8, Hr), o(Br, {
|
|
2246
|
-
id: d(n),
|
|
2261
|
+
class: g({ selected: u.value === `#${f(n)}` })
|
|
2262
|
+
}, [s(Qr, {
|
|
2263
|
+
id: f(n),
|
|
2247
2264
|
features: e,
|
|
2248
2265
|
index: n,
|
|
2249
|
-
"josm-target":
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2266
|
+
"josm-target": _(),
|
|
2267
|
+
onNavigate: y
|
|
2268
|
+
}, o({ _: 2 }, [
|
|
2269
|
+
t.$slots["object-detail"] ? {
|
|
2270
|
+
name: "object-detail",
|
|
2271
|
+
fn: M((e) => [T(t.$slots, "object-detail", m({ ref_for: !0 }, e), void 0, !0)]),
|
|
2272
|
+
key: "0"
|
|
2273
|
+
} : void 0,
|
|
2274
|
+
t.$slots["header-center"] ? {
|
|
2275
|
+
name: "header-center",
|
|
2276
|
+
fn: M((e) => [T(t.$slots, "header-center", m({ ref_for: !0 }, e), void 0, !0)]),
|
|
2277
|
+
key: "1"
|
|
2278
|
+
} : void 0,
|
|
2279
|
+
t.$slots["header-end"] ? {
|
|
2280
|
+
name: "header-end",
|
|
2281
|
+
fn: M((e) => [T(t.$slots, "header-end", m({ ref_for: !0 }, e), void 0, !0)]),
|
|
2282
|
+
key: "2"
|
|
2283
|
+
} : void 0,
|
|
2284
|
+
t.$slots["content-start"] ? {
|
|
2285
|
+
name: "content-start",
|
|
2286
|
+
fn: M((e) => [T(t.$slots, "content-start", m({ ref_for: !0 }, e), void 0, !0)]),
|
|
2287
|
+
key: "3"
|
|
2288
|
+
} : void 0
|
|
2289
|
+
]), 1032, [
|
|
2255
2290
|
"id",
|
|
2256
2291
|
"features",
|
|
2257
2292
|
"index",
|
|
2258
2293
|
"josm-target"
|
|
2259
2294
|
])], 2))), 128))]), a("iframe", {
|
|
2260
|
-
name:
|
|
2295
|
+
name: _(),
|
|
2261
2296
|
style: { display: "none" }
|
|
2262
|
-
}, null, 8,
|
|
2297
|
+
}, null, 8, ei)], 512));
|
|
2263
2298
|
}
|
|
2264
|
-
}), [["__scopeId", "data-v-
|
|
2299
|
+
}), [["__scopeId", "data-v-d3c72fff"]]), ni = { class: "locha" }, ri = {
|
|
2265
2300
|
key: 0,
|
|
2266
2301
|
class: "user-feedback"
|
|
2267
|
-
},
|
|
2302
|
+
}, ii = /* @__PURE__ */ xt(/* @__PURE__ */ l({
|
|
2268
2303
|
__name: "LoCha",
|
|
2269
2304
|
props: {
|
|
2305
|
+
id: {},
|
|
2270
2306
|
data: {},
|
|
2271
|
-
mapStyleUrl: { default:
|
|
2307
|
+
mapStyleUrl: { default: Jt },
|
|
2272
2308
|
reasonCollapsed: {
|
|
2273
2309
|
type: Boolean,
|
|
2274
2310
|
default: !0
|
|
@@ -2276,24 +2312,41 @@ var Hr = ["href"], Ur = ["name"], Wr = /* @__PURE__ */ yt(/* @__PURE__ */ c({
|
|
|
2276
2312
|
hash: {}
|
|
2277
2313
|
},
|
|
2278
2314
|
setup(e) {
|
|
2279
|
-
let t = e
|
|
2280
|
-
|
|
2281
|
-
let
|
|
2282
|
-
|
|
2283
|
-
let { featureCount:
|
|
2315
|
+
let t = e;
|
|
2316
|
+
x($e, t.reasonCollapsed), x(tt, t.id), x(nt, t.mapStyleUrl);
|
|
2317
|
+
let r = Qe();
|
|
2318
|
+
x(et, r);
|
|
2319
|
+
let { featureCount: a, setLoCha: s } = r;
|
|
2284
2320
|
return j(() => t.data, (e) => {
|
|
2285
2321
|
e && s(e);
|
|
2286
|
-
}, { immediate: !0 }), (t, r) => (
|
|
2322
|
+
}, { immediate: !0 }), (t, r) => (b(), i("section", ni, [A(a) ? (b(), n(ti, {
|
|
2287
2323
|
key: 1,
|
|
2288
2324
|
hash: e.hash
|
|
2289
|
-
}, {
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2325
|
+
}, o({ _: 2 }, [
|
|
2326
|
+
t.$slots["object-detail"] ? {
|
|
2327
|
+
name: "object-detail",
|
|
2328
|
+
fn: M((e) => [T(t.$slots, "object-detail", _(f(e)), void 0, !0)]),
|
|
2329
|
+
key: "0"
|
|
2330
|
+
} : void 0,
|
|
2331
|
+
t.$slots["header-center"] ? {
|
|
2332
|
+
name: "header-center",
|
|
2333
|
+
fn: M((e) => [T(t.$slots, "header-center", _(f(e)), void 0, !0)]),
|
|
2334
|
+
key: "1"
|
|
2335
|
+
} : void 0,
|
|
2336
|
+
t.$slots["header-end"] ? {
|
|
2337
|
+
name: "header-end",
|
|
2338
|
+
fn: M((e) => [T(t.$slots, "header-end", _(f(e)), void 0, !0)]),
|
|
2339
|
+
key: "2"
|
|
2340
|
+
} : void 0,
|
|
2341
|
+
t.$slots["content-start"] ? {
|
|
2342
|
+
name: "content-start",
|
|
2343
|
+
fn: M((e) => [T(t.$slots, "content-start", _(f(e)), void 0, !0)]),
|
|
2344
|
+
key: "3"
|
|
2345
|
+
} : void 0
|
|
2346
|
+
]), 1032, ["hash"])) : (b(), i("p", ri, " ⚠️ No data "))]));
|
|
2347
|
+
}
|
|
2348
|
+
}), [["__scopeId", "data-v-34eb8402"]]);
|
|
2296
2349
|
//#endregion
|
|
2297
|
-
export {
|
|
2350
|
+
export { ii as LoCha, $r as scrollToSection };
|
|
2298
2351
|
|
|
2299
2352
|
//# sourceMappingURL=index.js.map
|