@opengis/partsmap 0.0.93 → 0.0.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/PartsMap.js +606 -601
- package/dist/PartsMap.umd.cjs +8 -8
- package/package.json +1 -1
package/dist/PartsMap.js
CHANGED
@@ -7,12 +7,12 @@ function Ic(f, x, I) {
|
|
7
7
|
f = Xd(f * I), x = Xd(x * I);
|
8
8
|
var C = (f - x) * 2;
|
9
9
|
C < 0 && (C = -C - 1);
|
10
|
-
for (var
|
11
|
-
|
12
|
-
return
|
10
|
+
for (var L = ""; C >= 32; )
|
11
|
+
L += String.fromCharCode((32 | C & 31) + 63), C /= 32;
|
12
|
+
return L += String.fromCharCode((C | 0) + 63), L;
|
13
13
|
}
|
14
14
|
Ws.decode = function(f, x) {
|
15
|
-
for (var I = 0, C = 0,
|
15
|
+
for (var I = 0, C = 0, L = 0, U = [], S = 0, c = 0, pe = null, fe, xe, oe = Math.pow(10, Number.isInteger(x) ? x : 5); I < f.length; ) {
|
16
16
|
pe = null, S = 1, c = 0;
|
17
17
|
do
|
18
18
|
pe = f.charCodeAt(I++) - 63, c += (pe & 31) * S, S *= 32;
|
@@ -21,15 +21,15 @@ Ws.decode = function(f, x) {
|
|
21
21
|
do
|
22
22
|
pe = f.charCodeAt(I++) - 63, c += (pe & 31) * S, S *= 32;
|
23
23
|
while (pe >= 32);
|
24
|
-
xe = c & 1 ? (-c - 1) / 2 : c / 2, C += fe,
|
24
|
+
xe = c & 1 ? (-c - 1) / 2 : c / 2, C += fe, L += xe, U.push([C / oe, L / oe]);
|
25
25
|
}
|
26
26
|
return U;
|
27
27
|
};
|
28
28
|
Ws.encode = function(f, x) {
|
29
29
|
if (!f.length)
|
30
30
|
return "";
|
31
|
-
for (var I = Math.pow(10, Number.isInteger(x) ? x : 5), C = Ic(f[0][0], 0, I) + Ic(f[0][1], 0, I),
|
32
|
-
var U = f[
|
31
|
+
for (var I = Math.pow(10, Number.isInteger(x) ? x : 5), C = Ic(f[0][0], 0, I) + Ic(f[0][1], 0, I), L = 1; L < f.length; L++) {
|
32
|
+
var U = f[L], S = f[L - 1];
|
33
33
|
C += Ic(U[0], S[0], I), C += Ic(U[1], S[1], I);
|
34
34
|
}
|
35
35
|
return C;
|
@@ -67,13 +67,13 @@ var bp = { exports: {} };
|
|
67
67
|
f.exports = C();
|
68
68
|
})(Gm, function() {
|
69
69
|
var I = {}, C = {};
|
70
|
-
function
|
70
|
+
function L(S, c, pe) {
|
71
71
|
if (C[S] = pe, S === "index") {
|
72
72
|
var fe = "var sharedModule = {}; (" + C.shared + ")(sharedModule); (" + C.worker + ")(sharedModule);", xe = {};
|
73
73
|
return C.shared(xe), C.index(I, xe), typeof window < "u" && I.setWorkerUrl(window.URL.createObjectURL(new Blob([fe], { type: "text/javascript" }))), I;
|
74
74
|
}
|
75
75
|
}
|
76
|
-
|
76
|
+
L("shared", ["exports"], function(S) {
|
77
77
|
function c(i, e, r, s) {
|
78
78
|
return new (r || (r = Promise))(function(l, d) {
|
79
79
|
function p(v) {
|
@@ -501,7 +501,7 @@ var bp = { exports: {} };
|
|
501
501
|
}
|
502
502
|
}
|
503
503
|
const Yr = { kind: "null" }, Pe = { kind: "number" }, lt = { kind: "string" }, Ye = { kind: "boolean" }, Li = { kind: "color" }, or = { kind: "object" }, rt = { kind: "value" }, Sr = { kind: "collator" }, Br = { kind: "formatted" }, Qr = { kind: "padding" }, Tr = { kind: "resolvedImage" }, H = { kind: "variableAnchorOffsetCollection" };
|
504
|
-
function
|
504
|
+
function z(i, e) {
|
505
505
|
return { kind: "array", itemType: i, N: e };
|
506
506
|
}
|
507
507
|
function M(i) {
|
@@ -511,7 +511,7 @@ var bp = { exports: {} };
|
|
511
511
|
}
|
512
512
|
return i.kind;
|
513
513
|
}
|
514
|
-
const V = [Yr, Pe, lt, Ye, Li, Br, or,
|
514
|
+
const V = [Yr, Pe, lt, Ye, Li, Br, or, z(rt), Qr, Tr, H];
|
515
515
|
function Z(i, e) {
|
516
516
|
if (e.kind === "error") return null;
|
517
517
|
if (i.kind === "array") {
|
@@ -772,7 +772,7 @@ var bp = { exports: {} };
|
|
772
772
|
}
|
773
773
|
r = l;
|
774
774
|
}
|
775
|
-
return
|
775
|
+
return z(r || rt, e);
|
776
776
|
}
|
777
777
|
return or;
|
778
778
|
}
|
@@ -829,7 +829,7 @@ var bp = { exports: {} };
|
|
829
829
|
if (e[2] !== null && (typeof e[2] != "number" || e[2] < 0 || e[2] !== Math.floor(e[2]))) return r.error('The length argument to "array" must be a positive integer literal', 2);
|
830
830
|
_ = e[2], l++;
|
831
831
|
}
|
832
|
-
s =
|
832
|
+
s = z(m, _);
|
833
833
|
} else {
|
834
834
|
if (!Qs[d]) throw new Error(`Types doesn't contain name = ${d}`);
|
835
835
|
s = Qs[d];
|
@@ -1065,7 +1065,7 @@ var bp = { exports: {} };
|
|
1065
1065
|
}
|
1066
1066
|
static parse(e, r) {
|
1067
1067
|
if (e.length !== 3) return r.error(`Expected 2 arguments, but found ${e.length - 1} instead.`);
|
1068
|
-
const s = r.parse(e[1], 1, Pe), l = r.parse(e[2], 2,
|
1068
|
+
const s = r.parse(e[1], 1, Pe), l = r.parse(e[2], 2, z(r.expectedType || rt));
|
1069
1069
|
return s && l ? new ia(l.type.itemType, s, l) : null;
|
1070
1070
|
}
|
1071
1071
|
evaluate(e) {
|
@@ -1225,7 +1225,7 @@ var bp = { exports: {} };
|
|
1225
1225
|
if (e.length <= 2 || e.length >= 5) return r.error(`Expected 3 or 4 arguments, but found ${e.length - 1} instead.`);
|
1226
1226
|
const s = r.parse(e[1], 1, rt), l = r.parse(e[2], 2, Pe);
|
1227
1227
|
if (!s || !l) return null;
|
1228
|
-
if (!Q(s.type, [
|
1228
|
+
if (!Q(s.type, [z(rt), lt, rt])) return r.error(`Expected first argument to be of type array or string, but found ${M(s.type)} instead`);
|
1229
1229
|
if (e.length === 4) {
|
1230
1230
|
const d = r.parse(e[3], 3, Pe);
|
1231
1231
|
return d ? new no(s.type, s, l, d) : null;
|
@@ -1418,7 +1418,7 @@ var bp = { exports: {} };
|
|
1418
1418
|
if (!B) return null;
|
1419
1419
|
_ = _ || B.type, m.push([T, B]);
|
1420
1420
|
}
|
1421
|
-
return re(_, Pe) || re(_, Li) || re(_, Qr) || re(_, H) || re(_,
|
1421
|
+
return re(_, Pe) || re(_, Li) || re(_, Qr) || re(_, H) || re(_, z(Pe)) ? new Gi(_, s, l, d, m) : r.error(`Type ${M(_)} is not interpolatable.`);
|
1422
1422
|
}
|
1423
1423
|
evaluate(e) {
|
1424
1424
|
const r = this.labels, s = this.outputs;
|
@@ -1624,7 +1624,7 @@ var bp = { exports: {} };
|
|
1624
1624
|
let _ = null;
|
1625
1625
|
if (m["font-scale"] && (_ = r.parse(m["font-scale"], 1, Pe), !_)) return null;
|
1626
1626
|
let v = null;
|
1627
|
-
if (m["text-font"] && (v = r.parse(m["text-font"], 1,
|
1627
|
+
if (m["text-font"] && (v = r.parse(m["text-font"], 1, z(lt)), !v)) return null;
|
1628
1628
|
let T = null;
|
1629
1629
|
if (m["text-color"] && (T = r.parse(m["text-color"], 1, Li), !T)) return null;
|
1630
1630
|
const k = l[l.length - 1];
|
@@ -2449,7 +2449,7 @@ var bp = { exports: {} };
|
|
2449
2449
|
}
|
2450
2450
|
Hi.register(vn, { error: [{ kind: "error" }, [lt], (i, [e]) => {
|
2451
2451
|
throw new Kt(e.evaluate(i));
|
2452
|
-
}], typeof: [lt, [rt], (i, [e]) => M(ei(e.evaluate(i)))], "to-rgba": [
|
2452
|
+
}], typeof: [lt, [rt], (i, [e]) => M(ei(e.evaluate(i)))], "to-rgba": [z(Pe, 4), [Li], (i, [e]) => {
|
2453
2453
|
const [r, s, l, d] = e.evaluate(i).rgb;
|
2454
2454
|
return [255 * r, 255 * s, 255 * l, d];
|
2455
2455
|
}], rgb: [Li, [Pe, Pe, Pe], ga], rgba: [Li, [Pe, Pe, Pe, Pe], ga], has: { type: Ye, overloads: [[[lt], (i, [e]) => mo(e.evaluate(i), i.properties())], [[lt, or], (i, [e, r]) => mo(e.evaluate(i), r.evaluate(i))]] }, get: { type: rt, overloads: [[[lt], (i, [e]) => _a(e.evaluate(i), i.properties())], [[lt, or], (i, [e, r]) => _a(e.evaluate(i), r.evaluate(i))]] }, "feature-state": [rt, [lt], (i, [e]) => _a(e.evaluate(i), i.featureState || {})], properties: [or, [], (i) => i.properties()], "geometry-type": [lt, [], (i) => i.geometryType()], id: [rt, [], (i) => i.id()], zoom: [Pe, [], (i) => i.globals.zoom], "heatmap-density": [Pe, [], (i) => i.globals.heatmapDensity || 0], "line-progress": [Pe, [], (i) => i.globals.lineProgress || 0], accumulated: [rt, [], (i) => i.globals.accumulated === void 0 ? null : i.globals.accumulated], "+": [Pe, bn(Pe), (i, e) => {
|
@@ -2487,7 +2487,7 @@ var bp = { exports: {} };
|
|
2487
2487
|
}], "filter-id->=": [Ye, [rt], (i, [e]) => {
|
2488
2488
|
const r = i.id(), s = e.value;
|
2489
2489
|
return typeof r == typeof s && r >= s;
|
2490
|
-
}], "filter-has": [Ye, [rt], (i, [e]) => e.value in i.properties()], "filter-has-id": [Ye, [], (i) => i.id() !== null && i.id() !== void 0], "filter-type-in": [Ye, [
|
2490
|
+
}], "filter-has": [Ye, [rt], (i, [e]) => e.value in i.properties()], "filter-has-id": [Ye, [], (i) => i.id() !== null && i.id() !== void 0], "filter-type-in": [Ye, [z(lt)], (i, [e]) => e.value.indexOf(i.geometryType()) >= 0], "filter-id-in": [Ye, [z(rt)], (i, [e]) => e.value.indexOf(i.id()) >= 0], "filter-in-small": [Ye, [lt, z(rt)], (i, [e, r]) => r.value.indexOf(i.properties()[e.value]) >= 0], "filter-in-large": [Ye, [lt, z(rt)], (i, [e, r]) => function(s, l, d, p) {
|
2491
2491
|
for (; d <= p; ) {
|
2492
2492
|
const m = d + p >> 1;
|
2493
2493
|
if (l[m] === s) return !0;
|
@@ -2530,7 +2530,7 @@ var bp = { exports: {} };
|
|
2530
2530
|
function Tn(i, e) {
|
2531
2531
|
const r = new tn(vn, go, [], e ? function(l) {
|
2532
2532
|
const d = { color: Li, string: lt, number: Pe, enum: lt, boolean: Ye, formatted: Br, padding: Qr, resolvedImage: Tr, variableAnchorOffsetCollection: H };
|
2533
|
-
return l.type === "array" ?
|
2533
|
+
return l.type === "array" ? z(d[l.value] || rt, l.length) : d[l.type];
|
2534
2534
|
}(e) : void 0), s = r.parse(i, void 0, void 0, void 0, e && e.type === "string" ? { typeAnnotation: "coerce" } : void 0);
|
2535
2535
|
return s ? Nl(new bo(s, e)) : $n(r.errors);
|
2536
2536
|
}
|
@@ -8215,16 +8215,16 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8215
8215
|
}, S.o = el, S.p = td, S.q = o, S.r = Qc, S.s = mn, S.t = Na, S.u = Me, S.v = he, S.w = di, S.x = Nr, S.y = function([i, e, r]) {
|
8216
8216
|
return e += 90, e *= Math.PI / 180, r *= Math.PI / 180, { x: i * Math.cos(e) * Math.sin(r), y: i * Math.sin(e) * Math.sin(r), z: i * Math.cos(r) };
|
8217
8217
|
}, S.z = Zi;
|
8218
|
-
}),
|
8218
|
+
}), L("worker", ["./shared"], function(S) {
|
8219
8219
|
class c {
|
8220
|
-
constructor(
|
8221
|
-
this.keyCache = {},
|
8220
|
+
constructor(z) {
|
8221
|
+
this.keyCache = {}, z && this.replace(z);
|
8222
8222
|
}
|
8223
|
-
replace(
|
8224
|
-
this._layerConfigs = {}, this._layers = {}, this.update(
|
8223
|
+
replace(z) {
|
8224
|
+
this._layerConfigs = {}, this._layers = {}, this.update(z, []);
|
8225
8225
|
}
|
8226
|
-
update(
|
8227
|
-
for (const Z of
|
8226
|
+
update(z, M) {
|
8227
|
+
for (const Z of z) {
|
8228
8228
|
this._layerConfigs[Z.id] = Z;
|
8229
8229
|
const Q = this._layers[Z.id] = S.aB(Z);
|
8230
8230
|
Q._featureFilter = S.a7(Q.filter), this.keyCache[Z.id] && delete this.keyCache[Z.id];
|
@@ -8245,10 +8245,10 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8245
8245
|
}
|
8246
8246
|
}
|
8247
8247
|
class pe {
|
8248
|
-
constructor(
|
8248
|
+
constructor(z) {
|
8249
8249
|
const M = {}, V = [];
|
8250
|
-
for (const re in
|
8251
|
-
const J =
|
8250
|
+
for (const re in z) {
|
8251
|
+
const J = z[re], de = M[re] = {};
|
8252
8252
|
for (const ye in J) {
|
8253
8253
|
const ce = J[+ye];
|
8254
8254
|
if (!ce || ce.bitmap.width === 0 || ce.bitmap.height === 0) continue;
|
@@ -8257,8 +8257,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8257
8257
|
}
|
8258
8258
|
}
|
8259
8259
|
const { w: Z, h: Q } = S.p(V), te = new S.o({ width: Z || 1, height: Q || 1 });
|
8260
|
-
for (const re in
|
8261
|
-
const J =
|
8260
|
+
for (const re in z) {
|
8261
|
+
const J = z[re];
|
8262
8262
|
for (const de in J) {
|
8263
8263
|
const ye = J[+de];
|
8264
8264
|
if (!ye || ye.bitmap.width === 0 || ye.bitmap.height === 0) continue;
|
@@ -8271,17 +8271,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8271
8271
|
}
|
8272
8272
|
S.bk("GlyphAtlas", pe);
|
8273
8273
|
class fe {
|
8274
|
-
constructor(
|
8275
|
-
this.tileID = new S.S(
|
8274
|
+
constructor(z) {
|
8275
|
+
this.tileID = new S.S(z.tileID.overscaledZ, z.tileID.wrap, z.tileID.canonical.z, z.tileID.canonical.x, z.tileID.canonical.y), this.uid = z.uid, this.zoom = z.zoom, this.pixelRatio = z.pixelRatio, this.tileSize = z.tileSize, this.source = z.source, this.overscaling = this.tileID.overscaleFactor(), this.showCollisionBoxes = z.showCollisionBoxes, this.collectResourceTiming = !!z.collectResourceTiming, this.returnDependencies = !!z.returnDependencies, this.promoteId = z.promoteId, this.inFlightDependencies = [];
|
8276
8276
|
}
|
8277
|
-
parse(
|
8277
|
+
parse(z, M, V, Z) {
|
8278
8278
|
return S._(this, void 0, void 0, function* () {
|
8279
|
-
this.status = "parsing", this.data =
|
8280
|
-
const Q = new S.bl(Object.keys(
|
8279
|
+
this.status = "parsing", this.data = z, this.collisionBoxArray = new S.a5();
|
8280
|
+
const Q = new S.bl(Object.keys(z.layers).sort()), te = new S.bm(this.tileID, this.promoteId);
|
8281
8281
|
te.bucketLayerIDs = [];
|
8282
8282
|
const re = {}, J = { featureIndex: te, iconDependencies: {}, patternDependencies: {}, glyphDependencies: {}, availableImages: V }, de = M.familiesBySource[this.source];
|
8283
8283
|
for (const ct in de) {
|
8284
|
-
const wt =
|
8284
|
+
const wt = z.layers[ct];
|
8285
8285
|
if (!wt) continue;
|
8286
8286
|
wt.version === 1 && S.w(`Vector tile source "${this.source}" layer "${ct}" does not use vector tile spec v2 and therefore may have some rendering errors.`);
|
8287
8287
|
const Nt = Q.encode(ct), ri = [];
|
@@ -8322,34 +8322,34 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8322
8322
|
});
|
8323
8323
|
}
|
8324
8324
|
}
|
8325
|
-
function xe(H,
|
8326
|
-
const V = new S.a9(
|
8325
|
+
function xe(H, z, M) {
|
8326
|
+
const V = new S.a9(z);
|
8327
8327
|
for (const Z of H) Z.recalculate(V, M);
|
8328
8328
|
}
|
8329
8329
|
class oe {
|
8330
|
-
constructor(
|
8331
|
-
this.actor =
|
8330
|
+
constructor(z, M, V) {
|
8331
|
+
this.actor = z, this.layerIndex = M, this.availableImages = V, this.fetching = {}, this.loading = {}, this.loaded = {};
|
8332
8332
|
}
|
8333
|
-
loadVectorTile(
|
8333
|
+
loadVectorTile(z, M) {
|
8334
8334
|
return S._(this, void 0, void 0, function* () {
|
8335
|
-
const V = yield S.l(
|
8335
|
+
const V = yield S.l(z.request, M);
|
8336
8336
|
try {
|
8337
8337
|
return { vectorTile: new S.bs.VectorTile(new S.bt(V.data)), rawData: V.data, cacheControl: V.cacheControl, expires: V.expires };
|
8338
8338
|
} catch (Z) {
|
8339
8339
|
const Q = new Uint8Array(V.data);
|
8340
|
-
let te = `Unable to parse the tile at ${
|
8340
|
+
let te = `Unable to parse the tile at ${z.request.url}, `;
|
8341
8341
|
throw te += Q[0] === 31 && Q[1] === 139 ? "please make sure the data is not gzipped and that you have configured the relevant header in the server" : `got error: ${Z.message}`, new Error(te);
|
8342
8342
|
}
|
8343
8343
|
});
|
8344
8344
|
}
|
8345
|
-
loadTile(
|
8345
|
+
loadTile(z) {
|
8346
8346
|
return S._(this, void 0, void 0, function* () {
|
8347
|
-
const M =
|
8347
|
+
const M = z.uid, V = !!(z && z.request && z.request.collectResourceTiming) && new S.bu(z.request), Z = new fe(z);
|
8348
8348
|
this.loading[M] = Z;
|
8349
8349
|
const Q = new AbortController();
|
8350
8350
|
Z.abort = Q;
|
8351
8351
|
try {
|
8352
|
-
const te = yield this.loadVectorTile(
|
8352
|
+
const te = yield this.loadVectorTile(z, Q);
|
8353
8353
|
if (delete this.loading[M], !te) return null;
|
8354
8354
|
const re = te.rawData, J = {};
|
8355
8355
|
te.expires && (J.expires = te.expires), te.cacheControl && (J.cacheControl = te.cacheControl);
|
@@ -8372,12 +8372,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8372
8372
|
}
|
8373
8373
|
});
|
8374
8374
|
}
|
8375
|
-
reloadTile(
|
8375
|
+
reloadTile(z) {
|
8376
8376
|
return S._(this, void 0, void 0, function* () {
|
8377
|
-
const M =
|
8377
|
+
const M = z.uid;
|
8378
8378
|
if (!this.loaded || !this.loaded[M]) throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");
|
8379
8379
|
const V = this.loaded[M];
|
8380
|
-
if (V.showCollisionBoxes =
|
8380
|
+
if (V.showCollisionBoxes = z.showCollisionBoxes, V.status === "parsing") {
|
8381
8381
|
const Z = yield V.parse(V.vectorTile, this.layerIndex, this.availableImages, this.actor);
|
8382
8382
|
let Q;
|
8383
8383
|
if (this.fetching[M]) {
|
@@ -8389,15 +8389,15 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8389
8389
|
if (V.status === "done" && V.vectorTile) return V.parse(V.vectorTile, this.layerIndex, this.availableImages, this.actor);
|
8390
8390
|
});
|
8391
8391
|
}
|
8392
|
-
abortTile(
|
8392
|
+
abortTile(z) {
|
8393
8393
|
return S._(this, void 0, void 0, function* () {
|
8394
|
-
const M = this.loading, V =
|
8394
|
+
const M = this.loading, V = z.uid;
|
8395
8395
|
M && M[V] && M[V].abort && (M[V].abort.abort(), delete M[V]);
|
8396
8396
|
});
|
8397
8397
|
}
|
8398
|
-
removeTile(
|
8398
|
+
removeTile(z) {
|
8399
8399
|
return S._(this, void 0, void 0, function* () {
|
8400
|
-
this.loaded && this.loaded[
|
8400
|
+
this.loaded && this.loaded[z.uid] && delete this.loaded[z.uid];
|
8401
8401
|
});
|
8402
8402
|
}
|
8403
8403
|
}
|
@@ -8405,125 +8405,125 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8405
8405
|
constructor() {
|
8406
8406
|
this.loaded = {};
|
8407
8407
|
}
|
8408
|
-
loadTile(
|
8408
|
+
loadTile(z) {
|
8409
8409
|
return S._(this, void 0, void 0, function* () {
|
8410
|
-
const { uid: M, encoding: V, rawImageData: Z, redFactor: Q, greenFactor: te, blueFactor: re, baseShift: J } =
|
8410
|
+
const { uid: M, encoding: V, rawImageData: Z, redFactor: Q, greenFactor: te, blueFactor: re, baseShift: J } = z, de = Z.width + 2, ye = Z.height + 2, ce = S.b(Z) ? new S.R({ width: de, height: ye }, yield S.bv(Z, -1, -1, de, ye)) : Z, Ie = new S.bw(M, ce, V, Q, te, re, J);
|
8411
8411
|
return this.loaded = this.loaded || {}, this.loaded[M] = Ie, Ie;
|
8412
8412
|
});
|
8413
8413
|
}
|
8414
|
-
removeTile(
|
8415
|
-
const M = this.loaded, V =
|
8414
|
+
removeTile(z) {
|
8415
|
+
const M = this.loaded, V = z.uid;
|
8416
8416
|
M && M[V] && delete M[V];
|
8417
8417
|
}
|
8418
8418
|
}
|
8419
|
-
function ut(H,
|
8419
|
+
function ut(H, z) {
|
8420
8420
|
if (H.length !== 0) {
|
8421
|
-
$e(H[0],
|
8422
|
-
for (var M = 1; M < H.length; M++) $e(H[M], !
|
8421
|
+
$e(H[0], z);
|
8422
|
+
for (var M = 1; M < H.length; M++) $e(H[M], !z);
|
8423
8423
|
}
|
8424
8424
|
}
|
8425
|
-
function $e(H,
|
8425
|
+
function $e(H, z) {
|
8426
8426
|
for (var M = 0, V = 0, Z = 0, Q = H.length, te = Q - 1; Z < Q; te = Z++) {
|
8427
8427
|
var re = (H[Z][0] - H[te][0]) * (H[te][1] + H[Z][1]), J = M + re;
|
8428
8428
|
V += Math.abs(M) >= Math.abs(re) ? M - J + re : re - J + M, M = J;
|
8429
8429
|
}
|
8430
|
-
M + V >= 0 != !!
|
8430
|
+
M + V >= 0 != !!z && H.reverse();
|
8431
8431
|
}
|
8432
|
-
var Ke = S.bx(function H(
|
8433
|
-
var V, Z =
|
8434
|
-
if (Z === "FeatureCollection") for (V = 0; V <
|
8435
|
-
else if (Z === "GeometryCollection") for (V = 0; V <
|
8436
|
-
else if (Z === "Feature") H(
|
8437
|
-
else if (Z === "Polygon") ut(
|
8438
|
-
else if (Z === "MultiPolygon") for (V = 0; V <
|
8439
|
-
return
|
8432
|
+
var Ke = S.bx(function H(z, M) {
|
8433
|
+
var V, Z = z && z.type;
|
8434
|
+
if (Z === "FeatureCollection") for (V = 0; V < z.features.length; V++) H(z.features[V], M);
|
8435
|
+
else if (Z === "GeometryCollection") for (V = 0; V < z.geometries.length; V++) H(z.geometries[V], M);
|
8436
|
+
else if (Z === "Feature") H(z.geometry, M);
|
8437
|
+
else if (Z === "Polygon") ut(z.coordinates, M);
|
8438
|
+
else if (Z === "MultiPolygon") for (V = 0; V < z.coordinates.length; V++) ut(z.coordinates[V], M);
|
8439
|
+
return z;
|
8440
8440
|
});
|
8441
8441
|
const Oe = S.bs.VectorTileFeature.prototype.toGeoJSON;
|
8442
8442
|
var gt = { exports: {} }, ot = S.by, He = S.bs.VectorTileFeature, Vt = Tt;
|
8443
|
-
function Tt(H,
|
8444
|
-
this.options =
|
8443
|
+
function Tt(H, z) {
|
8444
|
+
this.options = z || {}, this.features = H, this.length = H.length;
|
8445
8445
|
}
|
8446
|
-
function Jt(H,
|
8447
|
-
this.id = typeof H.id == "number" ? H.id : void 0, this.type = H.type, this.rawGeometry = H.type === 1 ? [H.geometry] : H.geometry, this.properties = H.tags, this.extent =
|
8446
|
+
function Jt(H, z) {
|
8447
|
+
this.id = typeof H.id == "number" ? H.id : void 0, this.type = H.type, this.rawGeometry = H.type === 1 ? [H.geometry] : H.geometry, this.properties = H.tags, this.extent = z || 4096;
|
8448
8448
|
}
|
8449
8449
|
Tt.prototype.feature = function(H) {
|
8450
8450
|
return new Jt(this.features[H], this.options.extent);
|
8451
8451
|
}, Jt.prototype.loadGeometry = function() {
|
8452
8452
|
var H = this.rawGeometry;
|
8453
8453
|
this.geometry = [];
|
8454
|
-
for (var
|
8455
|
-
for (var M = H[
|
8454
|
+
for (var z = 0; z < H.length; z++) {
|
8455
|
+
for (var M = H[z], V = [], Z = 0; Z < M.length; Z++) V.push(new ot(M[Z][0], M[Z][1]));
|
8456
8456
|
this.geometry.push(V);
|
8457
8457
|
}
|
8458
8458
|
return this.geometry;
|
8459
8459
|
}, Jt.prototype.bbox = function() {
|
8460
8460
|
this.geometry || this.loadGeometry();
|
8461
|
-
for (var H = this.geometry,
|
8461
|
+
for (var H = this.geometry, z = 1 / 0, M = -1 / 0, V = 1 / 0, Z = -1 / 0, Q = 0; Q < H.length; Q++) for (var te = H[Q], re = 0; re < te.length; re++) {
|
8462
8462
|
var J = te[re];
|
8463
|
-
|
8463
|
+
z = Math.min(z, J.x), M = Math.max(M, J.x), V = Math.min(V, J.y), Z = Math.max(Z, J.y);
|
8464
8464
|
}
|
8465
|
-
return [
|
8465
|
+
return [z, V, M, Z];
|
8466
8466
|
}, Jt.prototype.toGeoJSON = He.prototype.toGeoJSON;
|
8467
8467
|
var jt = S.bz, Gr = Vt;
|
8468
8468
|
function Ii(H) {
|
8469
|
-
var
|
8469
|
+
var z = new jt();
|
8470
8470
|
return function(M, V) {
|
8471
8471
|
for (var Z in M.layers) V.writeMessage(3, Hr, M.layers[Z]);
|
8472
|
-
}(H,
|
8472
|
+
}(H, z), z.finish();
|
8473
8473
|
}
|
8474
|
-
function Hr(H,
|
8474
|
+
function Hr(H, z) {
|
8475
8475
|
var M;
|
8476
|
-
|
8476
|
+
z.writeVarintField(15, H.version || 1), z.writeStringField(1, H.name || ""), z.writeVarintField(5, H.extent || 4096);
|
8477
8477
|
var V = { keys: [], values: [], keycache: {}, valuecache: {} };
|
8478
|
-
for (M = 0; M < H.length; M++) V.feature = H.feature(M),
|
8478
|
+
for (M = 0; M < H.length; M++) V.feature = H.feature(M), z.writeMessage(2, It, V);
|
8479
8479
|
var Z = V.keys;
|
8480
|
-
for (M = 0; M < Z.length; M++)
|
8480
|
+
for (M = 0; M < Z.length; M++) z.writeStringField(3, Z[M]);
|
8481
8481
|
var Q = V.values;
|
8482
|
-
for (M = 0; M < Q.length; M++)
|
8482
|
+
for (M = 0; M < Q.length; M++) z.writeMessage(4, Ln, Q[M]);
|
8483
8483
|
}
|
8484
|
-
function It(H,
|
8484
|
+
function It(H, z) {
|
8485
8485
|
var M = H.feature;
|
8486
|
-
M.id !== void 0 &&
|
8486
|
+
M.id !== void 0 && z.writeVarintField(1, M.id), z.writeMessage(2, Js, H), z.writeVarintField(3, M.type), z.writeMessage(4, zr, M);
|
8487
8487
|
}
|
8488
|
-
function Js(H,
|
8488
|
+
function Js(H, z) {
|
8489
8489
|
var M = H.feature, V = H.keys, Z = H.values, Q = H.keycache, te = H.valuecache;
|
8490
8490
|
for (var re in M.properties) {
|
8491
8491
|
var J = M.properties[re], de = Q[re];
|
8492
8492
|
if (J !== null) {
|
8493
|
-
de === void 0 && (V.push(re), Q[re] = de = V.length - 1),
|
8493
|
+
de === void 0 && (V.push(re), Q[re] = de = V.length - 1), z.writeVarint(de);
|
8494
8494
|
var ye = typeof J;
|
8495
8495
|
ye !== "string" && ye !== "boolean" && ye !== "number" && (J = JSON.stringify(J));
|
8496
8496
|
var ce = ye + ":" + J, Ie = te[ce];
|
8497
|
-
Ie === void 0 && (Z.push(J), te[ce] = Ie = Z.length - 1),
|
8497
|
+
Ie === void 0 && (Z.push(J), te[ce] = Ie = Z.length - 1), z.writeVarint(Ie);
|
8498
8498
|
}
|
8499
8499
|
}
|
8500
8500
|
}
|
8501
|
-
function di(H,
|
8502
|
-
return (
|
8501
|
+
function di(H, z) {
|
8502
|
+
return (z << 3) + (7 & H);
|
8503
8503
|
}
|
8504
8504
|
function ki(H) {
|
8505
8505
|
return H << 1 ^ H >> 31;
|
8506
8506
|
}
|
8507
|
-
function zr(H,
|
8507
|
+
function zr(H, z) {
|
8508
8508
|
for (var M = H.loadGeometry(), V = H.type, Z = 0, Q = 0, te = M.length, re = 0; re < te; re++) {
|
8509
8509
|
var J = M[re], de = 1;
|
8510
|
-
V === 1 && (de = J.length),
|
8510
|
+
V === 1 && (de = J.length), z.writeVarint(di(1, de));
|
8511
8511
|
for (var ye = V === 3 ? J.length - 1 : J.length, ce = 0; ce < ye; ce++) {
|
8512
|
-
ce === 1 && V !== 1 &&
|
8512
|
+
ce === 1 && V !== 1 && z.writeVarint(di(2, ye - 1));
|
8513
8513
|
var Ie = J[ce].x - Z, Ge = J[ce].y - Q;
|
8514
|
-
|
8514
|
+
z.writeVarint(ki(Ie)), z.writeVarint(ki(Ge)), Z += Ie, Q += Ge;
|
8515
8515
|
}
|
8516
|
-
V === 3 &&
|
8516
|
+
V === 3 && z.writeVarint(di(7, 1));
|
8517
8517
|
}
|
8518
8518
|
}
|
8519
|
-
function Ln(H,
|
8519
|
+
function Ln(H, z) {
|
8520
8520
|
var M = typeof H;
|
8521
|
-
M === "string" ?
|
8521
|
+
M === "string" ? z.writeStringField(1, H) : M === "boolean" ? z.writeBooleanField(7, H) : M === "number" && (H % 1 != 0 ? z.writeDoubleField(3, H) : H < 0 ? z.writeSVarintField(6, H) : z.writeVarintField(5, H));
|
8522
8522
|
}
|
8523
|
-
gt.exports = Ii, gt.exports.fromVectorTileJs = Ii, gt.exports.fromGeojsonVt = function(H,
|
8524
|
-
|
8523
|
+
gt.exports = Ii, gt.exports.fromVectorTileJs = Ii, gt.exports.fromGeojsonVt = function(H, z) {
|
8524
|
+
z = z || {};
|
8525
8525
|
var M = {};
|
8526
|
-
for (var V in H) M[V] = new Gr(H[V].features,
|
8526
|
+
for (var V in H) M[V] = new Gr(H[V].features, z), M[V].name = V, M[V].version = z.version, M[V].extent = z.extent;
|
8527
8527
|
return Ii({ layers: M });
|
8528
8528
|
}, gt.exports.GeoJSONWrapper = Gr;
|
8529
8529
|
var xr = S.bx(gt.exports);
|
@@ -8531,17 +8531,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8531
8531
|
var Lr;
|
8532
8532
|
const zi = 3, nr = 5, Dn = 6;
|
8533
8533
|
class Wr {
|
8534
|
-
constructor(
|
8535
|
-
this.options = Object.assign(Object.create(Ks),
|
8534
|
+
constructor(z) {
|
8535
|
+
this.options = Object.assign(Object.create(Ks), z), this.trees = new Array(this.options.maxZoom + 1), this.stride = this.options.reduce ? 7 : 6, this.clusterProps = [];
|
8536
8536
|
}
|
8537
|
-
load(
|
8537
|
+
load(z) {
|
8538
8538
|
const { log: M, minZoom: V, maxZoom: Z } = this.options;
|
8539
8539
|
M && console.time("total time");
|
8540
|
-
const Q = `prepare ${
|
8541
|
-
M && console.time(Q), this.points =
|
8540
|
+
const Q = `prepare ${z.length} points`;
|
8541
|
+
M && console.time(Q), this.points = z;
|
8542
8542
|
const te = [];
|
8543
|
-
for (let J = 0; J <
|
8544
|
-
const de =
|
8543
|
+
for (let J = 0; J < z.length; J++) {
|
8544
|
+
const de = z[J];
|
8545
8545
|
if (!de.geometry) continue;
|
8546
8546
|
const [ye, ce] = de.geometry.coordinates, Ie = pn($i(ye)), Ge = pn(sr(ce));
|
8547
8547
|
te.push(Ie, Ge, 1 / 0, J, -1, 1), this.options.reduce && te.push(0);
|
@@ -8554,12 +8554,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8554
8554
|
}
|
8555
8555
|
return M && console.timeEnd("total time"), this;
|
8556
8556
|
}
|
8557
|
-
getClusters(
|
8558
|
-
let V = ((
|
8559
|
-
const Z = Math.max(-90, Math.min(90,
|
8560
|
-
let Q =
|
8561
|
-
const te = Math.max(-90, Math.min(90,
|
8562
|
-
if (
|
8557
|
+
getClusters(z, M) {
|
8558
|
+
let V = ((z[0] + 180) % 360 + 360) % 360 - 180;
|
8559
|
+
const Z = Math.max(-90, Math.min(90, z[1]));
|
8560
|
+
let Q = z[2] === 180 ? 180 : ((z[2] + 180) % 360 + 360) % 360 - 180;
|
8561
|
+
const te = Math.max(-90, Math.min(90, z[3]));
|
8562
|
+
if (z[2] - z[0] >= 360) V = -180, Q = 180;
|
8563
8563
|
else if (V > Q) {
|
8564
8564
|
const ce = this.getClusters([V, Z, 180, te], M), Ie = this.getClusters([-180, Z, Q, te], M);
|
8565
8565
|
return ce.concat(Ie);
|
@@ -8571,51 +8571,51 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8571
8571
|
}
|
8572
8572
|
return ye;
|
8573
8573
|
}
|
8574
|
-
getChildren(
|
8575
|
-
const M = this._getOriginId(
|
8574
|
+
getChildren(z) {
|
8575
|
+
const M = this._getOriginId(z), V = this._getOriginZoom(z), Z = "No cluster with the specified id.", Q = this.trees[V];
|
8576
8576
|
if (!Q) throw new Error(Z);
|
8577
8577
|
const te = Q.data;
|
8578
8578
|
if (M * this.stride >= te.length) throw new Error(Z);
|
8579
8579
|
const re = this.options.radius / (this.options.extent * Math.pow(2, V - 1)), J = Q.within(te[M * this.stride], te[M * this.stride + 1], re), de = [];
|
8580
8580
|
for (const ye of J) {
|
8581
8581
|
const ce = ye * this.stride;
|
8582
|
-
te[ce + 4] ===
|
8582
|
+
te[ce + 4] === z && de.push(te[ce + nr] > 1 ? vr(te, ce, this.clusterProps) : this.points[te[ce + zi]]);
|
8583
8583
|
}
|
8584
8584
|
if (de.length === 0) throw new Error(Z);
|
8585
8585
|
return de;
|
8586
8586
|
}
|
8587
|
-
getLeaves(
|
8587
|
+
getLeaves(z, M, V) {
|
8588
8588
|
const Z = [];
|
8589
|
-
return this._appendLeaves(Z,
|
8589
|
+
return this._appendLeaves(Z, z, M = M || 10, V = V || 0, 0), Z;
|
8590
8590
|
}
|
8591
|
-
getTile(
|
8592
|
-
const Z = this.trees[this._limitZoom(
|
8591
|
+
getTile(z, M, V) {
|
8592
|
+
const Z = this.trees[this._limitZoom(z)], Q = Math.pow(2, z), { extent: te, radius: re } = this.options, J = re / te, de = (V - J) / Q, ye = (V + 1 + J) / Q, ce = { features: [] };
|
8593
8593
|
return this._addTileFeatures(Z.range((M - J) / Q, de, (M + 1 + J) / Q, ye), Z.data, M, V, Q, ce), M === 0 && this._addTileFeatures(Z.range(1 - J / Q, de, 1, ye), Z.data, Q, V, Q, ce), M === Q - 1 && this._addTileFeatures(Z.range(0, de, J / Q, ye), Z.data, -1, V, Q, ce), ce.features.length ? ce : null;
|
8594
8594
|
}
|
8595
|
-
getClusterExpansionZoom(
|
8596
|
-
let M = this._getOriginZoom(
|
8595
|
+
getClusterExpansionZoom(z) {
|
8596
|
+
let M = this._getOriginZoom(z) - 1;
|
8597
8597
|
for (; M <= this.options.maxZoom; ) {
|
8598
|
-
const V = this.getChildren(
|
8598
|
+
const V = this.getChildren(z);
|
8599
8599
|
if (M++, V.length !== 1) break;
|
8600
|
-
|
8600
|
+
z = V[0].properties.cluster_id;
|
8601
8601
|
}
|
8602
8602
|
return M;
|
8603
8603
|
}
|
8604
|
-
_appendLeaves(
|
8604
|
+
_appendLeaves(z, M, V, Z, Q) {
|
8605
8605
|
const te = this.getChildren(M);
|
8606
8606
|
for (const re of te) {
|
8607
8607
|
const J = re.properties;
|
8608
|
-
if (J && J.cluster ? Q + J.point_count <= Z ? Q += J.point_count : Q = this._appendLeaves(
|
8608
|
+
if (J && J.cluster ? Q + J.point_count <= Z ? Q += J.point_count : Q = this._appendLeaves(z, J.cluster_id, V, Z, Q) : Q < Z ? Q++ : z.push(re), z.length === V) break;
|
8609
8609
|
}
|
8610
8610
|
return Q;
|
8611
8611
|
}
|
8612
|
-
_createTree(
|
8613
|
-
const M = new S.aw(
|
8614
|
-
for (let V = 0; V <
|
8615
|
-
return M.finish(), M.data =
|
8612
|
+
_createTree(z) {
|
8613
|
+
const M = new S.aw(z.length / this.stride | 0, this.options.nodeSize, Float32Array);
|
8614
|
+
for (let V = 0; V < z.length; V += this.stride) M.add(z[V], z[V + 1]);
|
8615
|
+
return M.finish(), M.data = z, M;
|
8616
8616
|
}
|
8617
|
-
_addTileFeatures(
|
8618
|
-
for (const re of
|
8617
|
+
_addTileFeatures(z, M, V, Z, Q, te) {
|
8618
|
+
for (const re of z) {
|
8619
8619
|
const J = re * this.stride, de = M[J + nr] > 1;
|
8620
8620
|
let ye, ce, Ie;
|
8621
8621
|
if (de) ye = Rn(M, J, this.clusterProps), ce = M[J], Ie = M[J + 1];
|
@@ -8630,15 +8630,15 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8630
8630
|
We = de || this.options.generateId ? M[J + zi] : this.points[M[J + zi]].id, We !== void 0 && (Ge.id = We), te.features.push(Ge);
|
8631
8631
|
}
|
8632
8632
|
}
|
8633
|
-
_limitZoom(
|
8634
|
-
return Math.max(this.options.minZoom, Math.min(Math.floor(+
|
8633
|
+
_limitZoom(z) {
|
8634
|
+
return Math.max(this.options.minZoom, Math.min(Math.floor(+z), this.options.maxZoom + 1));
|
8635
8635
|
}
|
8636
|
-
_cluster(
|
8637
|
-
const { radius: V, extent: Z, reduce: Q, minPoints: te } = this.options, re = V / (Z * Math.pow(2, M)), J =
|
8636
|
+
_cluster(z, M) {
|
8637
|
+
const { radius: V, extent: Z, reduce: Q, minPoints: te } = this.options, re = V / (Z * Math.pow(2, M)), J = z.data, de = [], ye = this.stride;
|
8638
8638
|
for (let ce = 0; ce < J.length; ce += ye) {
|
8639
8639
|
if (J[ce + 2] <= M) continue;
|
8640
8640
|
J[ce + 2] = M;
|
8641
|
-
const Ie = J[ce], Ge = J[ce + 1], We =
|
8641
|
+
const Ie = J[ce], Ge = J[ce + 1], We = z.within(J[ce], J[ce + 1], re), st = J[ce + nr];
|
8642
8642
|
let _t = st;
|
8643
8643
|
for (const nt of We) {
|
8644
8644
|
const Ct = nt * ye;
|
@@ -8668,46 +8668,46 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8668
8668
|
}
|
8669
8669
|
return de;
|
8670
8670
|
}
|
8671
|
-
_getOriginId(
|
8672
|
-
return
|
8671
|
+
_getOriginId(z) {
|
8672
|
+
return z - this.points.length >> 5;
|
8673
8673
|
}
|
8674
|
-
_getOriginZoom(
|
8675
|
-
return (
|
8674
|
+
_getOriginZoom(z) {
|
8675
|
+
return (z - this.points.length) % 32;
|
8676
8676
|
}
|
8677
|
-
_map(
|
8678
|
-
if (
|
8679
|
-
const te = this.clusterProps[
|
8677
|
+
_map(z, M, V) {
|
8678
|
+
if (z[M + nr] > 1) {
|
8679
|
+
const te = this.clusterProps[z[M + Dn]];
|
8680
8680
|
return V ? Object.assign({}, te) : te;
|
8681
8681
|
}
|
8682
|
-
const Z = this.points[
|
8682
|
+
const Z = this.points[z[M + zi]].properties, Q = this.options.map(Z);
|
8683
8683
|
return V && Q === Z ? Object.assign({}, Q) : Q;
|
8684
8684
|
}
|
8685
8685
|
}
|
8686
|
-
function vr(H,
|
8687
|
-
return { type: "Feature", id: H[
|
8686
|
+
function vr(H, z, M) {
|
8687
|
+
return { type: "Feature", id: H[z + zi], properties: Rn(H, z, M), geometry: { type: "Point", coordinates: [(V = H[z], 360 * (V - 0.5)), fn(H[z + 1])] } };
|
8688
8688
|
var V;
|
8689
8689
|
}
|
8690
|
-
function Rn(H,
|
8691
|
-
const V = H[
|
8692
|
-
return Object.assign(te, { cluster: !0, cluster_id: H[
|
8690
|
+
function Rn(H, z, M) {
|
8691
|
+
const V = H[z + nr], Z = V >= 1e4 ? `${Math.round(V / 1e3)}k` : V >= 1e3 ? Math.round(V / 100) / 10 + "k" : V, Q = H[z + Dn], te = Q === -1 ? {} : Object.assign({}, M[Q]);
|
8692
|
+
return Object.assign(te, { cluster: !0, cluster_id: H[z + zi], point_count: V, point_count_abbreviated: Z });
|
8693
8693
|
}
|
8694
8694
|
function $i(H) {
|
8695
8695
|
return H / 360 + 0.5;
|
8696
8696
|
}
|
8697
8697
|
function sr(H) {
|
8698
|
-
const
|
8698
|
+
const z = Math.sin(H * Math.PI / 180), M = 0.5 - 0.25 * Math.log((1 + z) / (1 - z)) / Math.PI;
|
8699
8699
|
return M < 0 ? 0 : M > 1 ? 1 : M;
|
8700
8700
|
}
|
8701
8701
|
function fn(H) {
|
8702
|
-
const
|
8703
|
-
return 360 * Math.atan(Math.exp(
|
8702
|
+
const z = (180 - 360 * H) * Math.PI / 180;
|
8703
|
+
return 360 * Math.atan(Math.exp(z)) / Math.PI - 90;
|
8704
8704
|
}
|
8705
|
-
function mn(H,
|
8705
|
+
function mn(H, z, M, V) {
|
8706
8706
|
let Z = V;
|
8707
|
-
const Q =
|
8708
|
-
let te, re = M -
|
8709
|
-
const J = H[
|
8710
|
-
for (let Ie =
|
8707
|
+
const Q = z + (M - z >> 1);
|
8708
|
+
let te, re = M - z;
|
8709
|
+
const J = H[z], de = H[z + 1], ye = H[M], ce = H[M + 1];
|
8710
|
+
for (let Ie = z + 3; Ie < M; Ie += 3) {
|
8711
8711
|
const Ge = cs(H[Ie], H[Ie + 1], J, de, ye, ce);
|
8712
8712
|
if (Ge > Z) te = Ie, Z = Ge;
|
8713
8713
|
else if (Ge === Z) {
|
@@ -8715,39 +8715,39 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8715
8715
|
We < re && (te = Ie, re = We);
|
8716
8716
|
}
|
8717
8717
|
}
|
8718
|
-
Z > V && (te -
|
8718
|
+
Z > V && (te - z > 3 && mn(H, z, te, V), H[te + 2] = Z, M - te > 3 && mn(H, te, M, V));
|
8719
8719
|
}
|
8720
|
-
function cs(H,
|
8720
|
+
function cs(H, z, M, V, Z, Q) {
|
8721
8721
|
let te = Z - M, re = Q - V;
|
8722
8722
|
if (te !== 0 || re !== 0) {
|
8723
|
-
const J = ((H - M) * te + (
|
8723
|
+
const J = ((H - M) * te + (z - V) * re) / (te * te + re * re);
|
8724
8724
|
J > 1 ? (M = Z, V = Q) : J > 0 && (M += te * J, V += re * J);
|
8725
8725
|
}
|
8726
|
-
return te = H - M, re =
|
8726
|
+
return te = H - M, re = z - V, te * te + re * re;
|
8727
8727
|
}
|
8728
|
-
function Dr(H,
|
8729
|
-
const Z = { id: H ?? null, type:
|
8730
|
-
if (
|
8731
|
-
else if (
|
8732
|
-
else if (
|
8733
|
-
else if (
|
8728
|
+
function Dr(H, z, M, V) {
|
8729
|
+
const Z = { id: H ?? null, type: z, geometry: M, tags: V, minX: 1 / 0, minY: 1 / 0, maxX: -1 / 0, maxY: -1 / 0 };
|
8730
|
+
if (z === "Point" || z === "MultiPoint" || z === "LineString") Xr(Z, M);
|
8731
|
+
else if (z === "Polygon") Xr(Z, M[0]);
|
8732
|
+
else if (z === "MultiLineString") for (const Q of M) Xr(Z, Q);
|
8733
|
+
else if (z === "MultiPolygon") for (const Q of M) Xr(Z, Q[0]);
|
8734
8734
|
return Z;
|
8735
8735
|
}
|
8736
|
-
function Xr(H,
|
8737
|
-
for (let M = 0; M <
|
8736
|
+
function Xr(H, z) {
|
8737
|
+
for (let M = 0; M < z.length; M += 3) H.minX = Math.min(H.minX, z[M]), H.minY = Math.min(H.minY, z[M + 1]), H.maxX = Math.max(H.maxX, z[M]), H.maxY = Math.max(H.maxY, z[M + 1]);
|
8738
8738
|
}
|
8739
|
-
function Jr(H,
|
8740
|
-
if (!
|
8741
|
-
const Z =
|
8739
|
+
function Jr(H, z, M, V) {
|
8740
|
+
if (!z.geometry) return;
|
8741
|
+
const Z = z.geometry.coordinates;
|
8742
8742
|
if (Z && Z.length === 0) return;
|
8743
|
-
const Q =
|
8744
|
-
let re = [], J =
|
8745
|
-
if (M.promoteId ? J =
|
8743
|
+
const Q = z.geometry.type, te = Math.pow(M.tolerance / ((1 << M.maxZoom) * M.extent), 2);
|
8744
|
+
let re = [], J = z.id;
|
8745
|
+
if (M.promoteId ? J = z.properties[M.promoteId] : M.generateId && (J = V || 0), Q === "Point") Bn(Z, re);
|
8746
8746
|
else if (Q === "MultiPoint") for (const de of Z) Bn(de, re);
|
8747
8747
|
else if (Q === "LineString") he(Z, re, te, !1);
|
8748
8748
|
else if (Q === "MultiLineString") {
|
8749
8749
|
if (M.lineMetrics) {
|
8750
|
-
for (const de of Z) re = [], he(de, re, te, !1), H.push(Dr(J, "LineString", re,
|
8750
|
+
for (const de of Z) re = [], he(de, re, te, !1), H.push(Dr(J, "LineString", re, z.properties));
|
8751
8751
|
return;
|
8752
8752
|
}
|
8753
8753
|
gn(Z, re, te, !1);
|
@@ -8755,7 +8755,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8755
8755
|
else {
|
8756
8756
|
if (Q !== "MultiPolygon") {
|
8757
8757
|
if (Q === "GeometryCollection") {
|
8758
|
-
for (const de of
|
8758
|
+
for (const de of z.geometry.geometries) Jr(H, { id: J, geometry: de, properties: z.properties }, M, V);
|
8759
8759
|
return;
|
8760
8760
|
}
|
8761
8761
|
throw new Error("Input data is not a valid GeoJSON object.");
|
@@ -8765,35 +8765,35 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8765
8765
|
gn(de, ye, te, !0), re.push(ye);
|
8766
8766
|
}
|
8767
8767
|
}
|
8768
|
-
H.push(Dr(J, Q, re,
|
8768
|
+
H.push(Dr(J, Q, re, z.properties));
|
8769
8769
|
}
|
8770
|
-
function Bn(H,
|
8771
|
-
|
8770
|
+
function Bn(H, z) {
|
8771
|
+
z.push(hs(H[0]), vt(H[1]), 0);
|
8772
8772
|
}
|
8773
|
-
function he(H,
|
8773
|
+
function he(H, z, M, V) {
|
8774
8774
|
let Z, Q, te = 0;
|
8775
8775
|
for (let J = 0; J < H.length; J++) {
|
8776
8776
|
const de = hs(H[J][0]), ye = vt(H[J][1]);
|
8777
|
-
|
8777
|
+
z.push(de, ye, 0), J > 0 && (te += V ? (Z * ye - de * Q) / 2 : Math.sqrt(Math.pow(de - Z, 2) + Math.pow(ye - Q, 2))), Z = de, Q = ye;
|
8778
8778
|
}
|
8779
|
-
const re =
|
8780
|
-
|
8779
|
+
const re = z.length - 3;
|
8780
|
+
z[2] = 1, mn(z, 0, re, M), z[re + 2] = 1, z.size = Math.abs(te), z.start = 0, z.end = z.size;
|
8781
8781
|
}
|
8782
|
-
function gn(H,
|
8782
|
+
function gn(H, z, M, V) {
|
8783
8783
|
for (let Z = 0; Z < H.length; Z++) {
|
8784
8784
|
const Q = [];
|
8785
|
-
he(H[Z], Q, M, V),
|
8785
|
+
he(H[Z], Q, M, V), z.push(Q);
|
8786
8786
|
}
|
8787
8787
|
}
|
8788
8788
|
function hs(H) {
|
8789
8789
|
return H / 360 + 0.5;
|
8790
8790
|
}
|
8791
8791
|
function vt(H) {
|
8792
|
-
const
|
8792
|
+
const z = Math.sin(H * Math.PI / 180), M = 0.5 - 0.25 * Math.log((1 + z) / (1 - z)) / Math.PI;
|
8793
8793
|
return M < 0 ? 0 : M > 1 ? 1 : M;
|
8794
8794
|
}
|
8795
|
-
function qt(H,
|
8796
|
-
if (V /=
|
8795
|
+
function qt(H, z, M, V, Z, Q, te, re) {
|
8796
|
+
if (V /= z, Q >= (M /= z) && te < V) return H;
|
8797
8797
|
if (te < M || Q >= V) return null;
|
8798
8798
|
const J = [];
|
8799
8799
|
for (const de of H) {
|
@@ -8824,57 +8824,57 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8824
8824
|
}
|
8825
8825
|
return J.length ? J : null;
|
8826
8826
|
}
|
8827
|
-
function us(H,
|
8827
|
+
function us(H, z, M, V, Z) {
|
8828
8828
|
for (let Q = 0; Q < H.length; Q += 3) {
|
8829
8829
|
const te = H[Q + Z];
|
8830
|
-
te >= M && te <= V && Ki(
|
8830
|
+
te >= M && te <= V && Ki(z, H[Q], H[Q + 1], H[Q + 2]);
|
8831
8831
|
}
|
8832
8832
|
}
|
8833
|
-
function Kr(H,
|
8833
|
+
function Kr(H, z, M, V, Z, Q, te) {
|
8834
8834
|
let re = Rr(H);
|
8835
8835
|
const J = Z === 0 ? ds : ps;
|
8836
8836
|
let de, ye, ce = H.start;
|
8837
8837
|
for (let _t = 0; _t < H.length - 3; _t += 3) {
|
8838
8838
|
const nt = H[_t], Ct = H[_t + 1], Zt = H[_t + 2], Qt = H[_t + 3], ct = H[_t + 4], wt = Z === 0 ? nt : Ct, Nt = Z === 0 ? Qt : ct;
|
8839
8839
|
let ri = !1;
|
8840
|
-
te && (de = Math.sqrt(Math.pow(nt - Qt, 2) + Math.pow(Ct - ct, 2))), wt < M ? Nt > M && (ye = J(re, nt, Ct, Qt, ct, M), te && (re.start = ce + de * ye)) : wt > V ? Nt < V && (ye = J(re, nt, Ct, Qt, ct, V), te && (re.start = ce + de * ye)) : Ki(re, nt, Ct, Zt), Nt < M && wt >= M && (ye = J(re, nt, Ct, Qt, ct, M), ri = !0), Nt > V && wt <= V && (ye = J(re, nt, Ct, Qt, ct, V), ri = !0), !Q && ri && (te && (re.end = ce + de * ye),
|
8840
|
+
te && (de = Math.sqrt(Math.pow(nt - Qt, 2) + Math.pow(Ct - ct, 2))), wt < M ? Nt > M && (ye = J(re, nt, Ct, Qt, ct, M), te && (re.start = ce + de * ye)) : wt > V ? Nt < V && (ye = J(re, nt, Ct, Qt, ct, V), te && (re.start = ce + de * ye)) : Ki(re, nt, Ct, Zt), Nt < M && wt >= M && (ye = J(re, nt, Ct, Qt, ct, M), ri = !0), Nt > V && wt <= V && (ye = J(re, nt, Ct, Qt, ct, V), ri = !0), !Q && ri && (te && (re.end = ce + de * ye), z.push(re), re = Rr(H)), te && (ce += de);
|
8841
8841
|
}
|
8842
8842
|
let Ie = H.length - 3;
|
8843
8843
|
const Ge = H[Ie], We = H[Ie + 1], st = Z === 0 ? Ge : We;
|
8844
|
-
st >= M && st <= V && Ki(re, Ge, We, H[Ie + 2]), Ie = re.length - 3, Q && Ie >= 3 && (re[Ie] !== re[0] || re[Ie + 1] !== re[1]) && Ki(re, re[0], re[1], re[2]), re.length &&
|
8844
|
+
st >= M && st <= V && Ki(re, Ge, We, H[Ie + 2]), Ie = re.length - 3, Q && Ie >= 3 && (re[Ie] !== re[0] || re[Ie + 1] !== re[1]) && Ki(re, re[0], re[1], re[2]), re.length && z.push(re);
|
8845
8845
|
}
|
8846
8846
|
function Rr(H) {
|
8847
|
-
const
|
8848
|
-
return
|
8847
|
+
const z = [];
|
8848
|
+
return z.size = H.size, z.start = H.start, z.end = H.end, z;
|
8849
8849
|
}
|
8850
|
-
function Fn(H,
|
8851
|
-
for (const te of H) Kr(te,
|
8850
|
+
function Fn(H, z, M, V, Z, Q) {
|
8851
|
+
for (const te of H) Kr(te, z, M, V, Z, Q, !1);
|
8852
8852
|
}
|
8853
|
-
function Ki(H,
|
8854
|
-
H.push(
|
8853
|
+
function Ki(H, z, M, V) {
|
8854
|
+
H.push(z, M, V);
|
8855
8855
|
}
|
8856
|
-
function ds(H,
|
8857
|
-
const te = (Q -
|
8856
|
+
function ds(H, z, M, V, Z, Q) {
|
8857
|
+
const te = (Q - z) / (V - z);
|
8858
8858
|
return Ki(H, Q, M + (Z - M) * te, 1), te;
|
8859
8859
|
}
|
8860
|
-
function ps(H,
|
8860
|
+
function ps(H, z, M, V, Z, Q) {
|
8861
8861
|
const te = (Q - M) / (Z - M);
|
8862
|
-
return Ki(H,
|
8862
|
+
return Ki(H, z + (V - z) * te, Q, 1), te;
|
8863
8863
|
}
|
8864
|
-
function Te(H,
|
8864
|
+
function Te(H, z) {
|
8865
8865
|
const M = [];
|
8866
8866
|
for (let V = 0; V < H.length; V++) {
|
8867
8867
|
const Z = H[V], Q = Z.type;
|
8868
8868
|
let te;
|
8869
|
-
if (Q === "Point" || Q === "MultiPoint" || Q === "LineString") te = br(Z.geometry,
|
8869
|
+
if (Q === "Point" || Q === "MultiPoint" || Q === "LineString") te = br(Z.geometry, z);
|
8870
8870
|
else if (Q === "MultiLineString" || Q === "Polygon") {
|
8871
8871
|
te = [];
|
8872
|
-
for (const re of Z.geometry) te.push(br(re,
|
8872
|
+
for (const re of Z.geometry) te.push(br(re, z));
|
8873
8873
|
} else if (Q === "MultiPolygon") {
|
8874
8874
|
te = [];
|
8875
8875
|
for (const re of Z.geometry) {
|
8876
8876
|
const J = [];
|
8877
|
-
for (const de of re) J.push(br(de,
|
8877
|
+
for (const de of re) J.push(br(de, z));
|
8878
8878
|
te.push(J);
|
8879
8879
|
}
|
8880
8880
|
}
|
@@ -8882,37 +8882,37 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8882
8882
|
}
|
8883
8883
|
return M;
|
8884
8884
|
}
|
8885
|
-
function br(H,
|
8885
|
+
function br(H, z) {
|
8886
8886
|
const M = [];
|
8887
8887
|
M.size = H.size, H.start !== void 0 && (M.start = H.start, M.end = H.end);
|
8888
|
-
for (let V = 0; V < H.length; V += 3) M.push(H[V] +
|
8888
|
+
for (let V = 0; V < H.length; V += 3) M.push(H[V] + z, H[V + 1], H[V + 2]);
|
8889
8889
|
return M;
|
8890
8890
|
}
|
8891
|
-
function Pi(H,
|
8891
|
+
function Pi(H, z) {
|
8892
8892
|
if (H.transformed) return H;
|
8893
8893
|
const M = 1 << H.z, V = H.x, Z = H.y;
|
8894
8894
|
for (const Q of H.features) {
|
8895
8895
|
const te = Q.geometry, re = Q.type;
|
8896
|
-
if (Q.geometry = [], re === 1) for (let J = 0; J < te.length; J += 2) Q.geometry.push(wr(te[J], te[J + 1],
|
8896
|
+
if (Q.geometry = [], re === 1) for (let J = 0; J < te.length; J += 2) Q.geometry.push(wr(te[J], te[J + 1], z, M, V, Z));
|
8897
8897
|
else for (let J = 0; J < te.length; J++) {
|
8898
8898
|
const de = [];
|
8899
|
-
for (let ye = 0; ye < te[J].length; ye += 2) de.push(wr(te[J][ye], te[J][ye + 1],
|
8899
|
+
for (let ye = 0; ye < te[J].length; ye += 2) de.push(wr(te[J][ye], te[J][ye + 1], z, M, V, Z));
|
8900
8900
|
Q.geometry.push(de);
|
8901
8901
|
}
|
8902
8902
|
}
|
8903
8903
|
return H.transformed = !0, H;
|
8904
8904
|
}
|
8905
|
-
function wr(H,
|
8906
|
-
return [Math.round(M * (H * V - Z)), Math.round(M * (
|
8905
|
+
function wr(H, z, M, V, Z, Q) {
|
8906
|
+
return [Math.round(M * (H * V - Z)), Math.round(M * (z * V - Q))];
|
8907
8907
|
}
|
8908
|
-
function Yr(H,
|
8909
|
-
const Q =
|
8908
|
+
function Yr(H, z, M, V, Z) {
|
8909
|
+
const Q = z === Z.maxZoom ? 0 : Z.tolerance / ((1 << z) * Z.extent), te = { features: [], numPoints: 0, numSimplified: 0, numFeatures: H.length, source: null, x: M, y: V, z, transformed: !1, minX: 2, minY: 1, maxX: -1, maxY: 0 };
|
8910
8910
|
for (const re of H) Pe(te, re, Q, Z);
|
8911
8911
|
return te;
|
8912
8912
|
}
|
8913
|
-
function Pe(H,
|
8914
|
-
const Z =
|
8915
|
-
if (H.minX = Math.min(H.minX,
|
8913
|
+
function Pe(H, z, M, V) {
|
8914
|
+
const Z = z.geometry, Q = z.type, te = [];
|
8915
|
+
if (H.minX = Math.min(H.minX, z.minX), H.minY = Math.min(H.minY, z.minY), H.maxX = Math.max(H.maxX, z.maxX), H.maxY = Math.max(H.maxY, z.maxY), Q === "Point" || Q === "MultiPoint") for (let re = 0; re < Z.length; re += 3) te.push(Z[re], Z[re + 1]), H.numPoints++, H.numSimplified++;
|
8916
8916
|
else if (Q === "LineString") lt(te, Z, H, M, !1, !1);
|
8917
8917
|
else if (Q === "MultiLineString" || Q === "Polygon") for (let re = 0; re < Z.length; re++) lt(te, Z[re], H, M, Q === "Polygon", re === 0);
|
8918
8918
|
else if (Q === "MultiPolygon") for (let re = 0; re < Z.length; re++) {
|
@@ -8920,21 +8920,21 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8920
8920
|
for (let de = 0; de < J.length; de++) lt(te, J[de], H, M, !0, de === 0);
|
8921
8921
|
}
|
8922
8922
|
if (te.length) {
|
8923
|
-
let re =
|
8923
|
+
let re = z.tags || null;
|
8924
8924
|
if (Q === "LineString" && V.lineMetrics) {
|
8925
8925
|
re = {};
|
8926
|
-
for (const de in
|
8926
|
+
for (const de in z.tags) re[de] = z.tags[de];
|
8927
8927
|
re.mapbox_clip_start = Z.start / Z.size, re.mapbox_clip_end = Z.end / Z.size;
|
8928
8928
|
}
|
8929
8929
|
const J = { geometry: te, type: Q === "Polygon" || Q === "MultiPolygon" ? 3 : Q === "LineString" || Q === "MultiLineString" ? 2 : 1, tags: re };
|
8930
|
-
|
8930
|
+
z.id !== null && (J.id = z.id), H.features.push(J);
|
8931
8931
|
}
|
8932
8932
|
}
|
8933
|
-
function lt(H,
|
8933
|
+
function lt(H, z, M, V, Z, Q) {
|
8934
8934
|
const te = V * V;
|
8935
|
-
if (V > 0 &&
|
8935
|
+
if (V > 0 && z.size < (Z ? te : V)) return void (M.numPoints += z.length / 3);
|
8936
8936
|
const re = [];
|
8937
|
-
for (let J = 0; J <
|
8937
|
+
for (let J = 0; J < z.length; J += 3) (V === 0 || z[J + 2] > te) && (M.numSimplified++, re.push(z[J], z[J + 1])), M.numPoints++;
|
8938
8938
|
Z && function(J, de) {
|
8939
8939
|
let ye = 0;
|
8940
8940
|
for (let ce = 0, Ie = J.length, Ge = Ie - 2; ce < Ie; Ge = ce, ce += 2) ye += (J[ce] - J[Ge]) * (J[ce + 1] + J[Ge + 1]);
|
@@ -8946,7 +8946,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8946
8946
|
}
|
8947
8947
|
const Ye = { maxZoom: 14, indexMaxZoom: 5, indexMaxPoints: 1e5, tolerance: 3, extent: 4096, buffer: 64, lineMetrics: !1, promoteId: null, generateId: !1, debug: 0 };
|
8948
8948
|
class Li {
|
8949
|
-
constructor(
|
8949
|
+
constructor(z, M) {
|
8950
8950
|
const V = (M = this.options = function(Q, te) {
|
8951
8951
|
for (const re in te) Q[re] = te[re];
|
8952
8952
|
return Q;
|
@@ -8958,7 +8958,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8958
8958
|
if (Q.type === "FeatureCollection") for (let J = 0; J < Q.features.length; J++) Jr(re, Q.features[J], te, J);
|
8959
8959
|
else Jr(re, Q.type === "Feature" ? Q : { geometry: Q }, te);
|
8960
8960
|
return re;
|
8961
|
-
}(
|
8961
|
+
}(z, M);
|
8962
8962
|
this.tiles = {}, this.tileCoords = [], V && (console.timeEnd("preprocess data"), console.log("index: maxZoom: %d, maxPoints: %d", M.indexMaxZoom, M.indexMaxPoints), console.time("generate tiles"), this.stats = {}, this.total = 0), Z = function(Q, te) {
|
8963
8963
|
const re = te.buffer / te.extent;
|
8964
8964
|
let J = Q;
|
@@ -8966,18 +8966,18 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8966
8966
|
return (de || ye) && (J = qt(Q, 1, -re, 1 + re, 0, -1, 2, te) || [], de && (J = Te(de, 1).concat(J)), ye && (J = J.concat(Te(ye, -1)))), J;
|
8967
8967
|
}(Z, M), Z.length && this.splitTile(Z, 0, 0, 0), V && (Z.length && console.log("features: %d, points: %d", this.tiles[0].numFeatures, this.tiles[0].numPoints), console.timeEnd("generate tiles"), console.log("tiles generated:", this.total, JSON.stringify(this.stats)));
|
8968
8968
|
}
|
8969
|
-
splitTile(
|
8970
|
-
const J = [
|
8969
|
+
splitTile(z, M, V, Z, Q, te, re) {
|
8970
|
+
const J = [z, M, V, Z], de = this.options, ye = de.debug;
|
8971
8971
|
for (; J.length; ) {
|
8972
|
-
Z = J.pop(), V = J.pop(), M = J.pop(),
|
8972
|
+
Z = J.pop(), V = J.pop(), M = J.pop(), z = J.pop();
|
8973
8973
|
const ce = 1 << M, Ie = or(M, V, Z);
|
8974
8974
|
let Ge = this.tiles[Ie];
|
8975
|
-
if (!Ge && (ye > 1 && console.time("creation"), Ge = this.tiles[Ie] = Yr(
|
8975
|
+
if (!Ge && (ye > 1 && console.time("creation"), Ge = this.tiles[Ie] = Yr(z, M, V, Z, de), this.tileCoords.push({ z: M, x: V, y: Z }), ye)) {
|
8976
8976
|
ye > 1 && (console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)", M, V, Z, Ge.numFeatures, Ge.numPoints, Ge.numSimplified), console.timeEnd("creation"));
|
8977
8977
|
const ri = `z${M}`;
|
8978
8978
|
this.stats[ri] = (this.stats[ri] || 0) + 1, this.total++;
|
8979
8979
|
}
|
8980
|
-
if (Ge.source =
|
8980
|
+
if (Ge.source = z, Q == null) {
|
8981
8981
|
if (M === de.indexMaxZoom || Ge.numPoints <= de.indexMaxPoints) continue;
|
8982
8982
|
} else {
|
8983
8983
|
if (M === de.maxZoom || M === Q) continue;
|
@@ -8986,38 +8986,38 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
8986
8986
|
if (V !== te >> ri || Z !== re >> ri) continue;
|
8987
8987
|
}
|
8988
8988
|
}
|
8989
|
-
if (Ge.source = null,
|
8989
|
+
if (Ge.source = null, z.length === 0) continue;
|
8990
8990
|
ye > 1 && console.time("clipping");
|
8991
8991
|
const We = 0.5 * de.buffer / de.extent, st = 0.5 - We, _t = 0.5 + We, nt = 1 + We;
|
8992
|
-
let Ct = null, Zt = null, Qt = null, ct = null, wt = qt(
|
8993
|
-
|
8992
|
+
let Ct = null, Zt = null, Qt = null, ct = null, wt = qt(z, ce, V - We, V + _t, 0, Ge.minX, Ge.maxX, de), Nt = qt(z, ce, V + st, V + nt, 0, Ge.minX, Ge.maxX, de);
|
8993
|
+
z = null, wt && (Ct = qt(wt, ce, Z - We, Z + _t, 1, Ge.minY, Ge.maxY, de), Zt = qt(wt, ce, Z + st, Z + nt, 1, Ge.minY, Ge.maxY, de), wt = null), Nt && (Qt = qt(Nt, ce, Z - We, Z + _t, 1, Ge.minY, Ge.maxY, de), ct = qt(Nt, ce, Z + st, Z + nt, 1, Ge.minY, Ge.maxY, de), Nt = null), ye > 1 && console.timeEnd("clipping"), J.push(Ct || [], M + 1, 2 * V, 2 * Z), J.push(Zt || [], M + 1, 2 * V, 2 * Z + 1), J.push(Qt || [], M + 1, 2 * V + 1, 2 * Z), J.push(ct || [], M + 1, 2 * V + 1, 2 * Z + 1);
|
8994
8994
|
}
|
8995
8995
|
}
|
8996
|
-
getTile(
|
8997
|
-
|
8996
|
+
getTile(z, M, V) {
|
8997
|
+
z = +z, M = +M, V = +V;
|
8998
8998
|
const Z = this.options, { extent: Q, debug: te } = Z;
|
8999
|
-
if (
|
9000
|
-
const re = 1 <<
|
8999
|
+
if (z < 0 || z > 24) return null;
|
9000
|
+
const re = 1 << z, J = or(z, M = M + re & re - 1, V);
|
9001
9001
|
if (this.tiles[J]) return Pi(this.tiles[J], Q);
|
9002
|
-
te > 1 && console.log("drilling down to z%d-%d-%d",
|
9003
|
-
let de, ye =
|
9002
|
+
te > 1 && console.log("drilling down to z%d-%d-%d", z, M, V);
|
9003
|
+
let de, ye = z, ce = M, Ie = V;
|
9004
9004
|
for (; !de && ye > 0; ) ye--, ce >>= 1, Ie >>= 1, de = this.tiles[or(ye, ce, Ie)];
|
9005
|
-
return de && de.source ? (te > 1 && (console.log("found parent tile z%d-%d-%d", ye, ce, Ie), console.time("drilling down")), this.splitTile(de.source, ye, ce, Ie,
|
9005
|
+
return de && de.source ? (te > 1 && (console.log("found parent tile z%d-%d-%d", ye, ce, Ie), console.time("drilling down")), this.splitTile(de.source, ye, ce, Ie, z, M, V), te > 1 && console.timeEnd("drilling down"), this.tiles[J] ? Pi(this.tiles[J], Q) : null) : null;
|
9006
9006
|
}
|
9007
9007
|
}
|
9008
|
-
function or(H,
|
9009
|
-
return 32 * ((1 << H) * M +
|
9008
|
+
function or(H, z, M) {
|
9009
|
+
return 32 * ((1 << H) * M + z) + H;
|
9010
9010
|
}
|
9011
|
-
function rt(H,
|
9012
|
-
return
|
9011
|
+
function rt(H, z) {
|
9012
|
+
return z ? H.properties[z] : H.id;
|
9013
9013
|
}
|
9014
|
-
function Sr(H,
|
9014
|
+
function Sr(H, z) {
|
9015
9015
|
if (H == null) return !0;
|
9016
|
-
if (H.type === "Feature") return rt(H,
|
9016
|
+
if (H.type === "Feature") return rt(H, z) != null;
|
9017
9017
|
if (H.type === "FeatureCollection") {
|
9018
9018
|
const M = /* @__PURE__ */ new Set();
|
9019
9019
|
for (const V of H.features) {
|
9020
|
-
const Z = rt(V,
|
9020
|
+
const Z = rt(V, z);
|
9021
9021
|
if (Z == null || M.has(Z)) return !1;
|
9022
9022
|
M.add(Z);
|
9023
9023
|
}
|
@@ -9025,19 +9025,19 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9025
9025
|
}
|
9026
9026
|
return !1;
|
9027
9027
|
}
|
9028
|
-
function Br(H,
|
9028
|
+
function Br(H, z) {
|
9029
9029
|
const M = /* @__PURE__ */ new Map();
|
9030
|
-
if (H != null) if (H.type === "Feature") M.set(rt(H,
|
9031
|
-
else for (const V of H.features) M.set(rt(V,
|
9030
|
+
if (H != null) if (H.type === "Feature") M.set(rt(H, z), H);
|
9031
|
+
else for (const V of H.features) M.set(rt(V, z), V);
|
9032
9032
|
return M;
|
9033
9033
|
}
|
9034
9034
|
class Qr extends oe {
|
9035
9035
|
constructor() {
|
9036
9036
|
super(...arguments), this._dataUpdateable = /* @__PURE__ */ new Map();
|
9037
9037
|
}
|
9038
|
-
loadVectorTile(
|
9038
|
+
loadVectorTile(z, M) {
|
9039
9039
|
return S._(this, void 0, void 0, function* () {
|
9040
|
-
const V =
|
9040
|
+
const V = z.tileID.canonical;
|
9041
9041
|
if (!this._geoJSONIndex) throw new Error("Unable to parse the data into a cluster or geojson");
|
9042
9042
|
const Z = this._geoJSONIndex.getTile(V.z, V.x, V.y);
|
9043
9043
|
if (!Z) return null;
|
@@ -9076,14 +9076,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9076
9076
|
return te.byteOffset === 0 && te.byteLength === te.buffer.byteLength || (te = new Uint8Array(te)), { vectorTile: Q, rawData: te.buffer };
|
9077
9077
|
});
|
9078
9078
|
}
|
9079
|
-
loadData(
|
9079
|
+
loadData(z) {
|
9080
9080
|
return S._(this, void 0, void 0, function* () {
|
9081
9081
|
var M;
|
9082
9082
|
(M = this._pendingRequest) === null || M === void 0 || M.abort();
|
9083
|
-
const V = !!(
|
9083
|
+
const V = !!(z && z.request && z.request.collectResourceTiming) && new S.bu(z.request);
|
9084
9084
|
this._pendingRequest = new AbortController();
|
9085
9085
|
try {
|
9086
|
-
this._pendingData = this.loadAndProcessGeoJSON(
|
9086
|
+
this._pendingData = this.loadAndProcessGeoJSON(z, this._pendingRequest), this._geoJSONIndex = z.cluster ? new Wr(function({ superclusterOptions: te, clusterProperties: re }) {
|
9087
9087
|
if (!re || !te) return te;
|
9088
9088
|
const J = {}, de = {}, ye = { accumulated: null, zoom: 0 }, ce = { properties: null }, Ie = Object.keys(re);
|
9089
9089
|
for (const Ge of Ie) {
|
@@ -9099,11 +9099,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9099
9099
|
ce.properties = We;
|
9100
9100
|
for (const st of Ie) ye.accumulated = Ge[st], Ge[st] = de[st].evaluate(ye, ce);
|
9101
9101
|
}, te;
|
9102
|
-
}(
|
9102
|
+
}(z)).load((yield this._pendingData).features) : (Z = yield this._pendingData, new Li(Z, z.geojsonVtOptions)), this.loaded = {};
|
9103
9103
|
const Q = {};
|
9104
9104
|
if (V) {
|
9105
9105
|
const te = V.finish();
|
9106
|
-
te && (Q.resourceTiming = {}, Q.resourceTiming[
|
9106
|
+
te && (Q.resourceTiming = {}, Q.resourceTiming[z.source] = JSON.parse(JSON.stringify(te)));
|
9107
9107
|
}
|
9108
9108
|
return Q;
|
9109
9109
|
} catch (Q) {
|
@@ -9118,37 +9118,37 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9118
9118
|
return this._pendingData;
|
9119
9119
|
});
|
9120
9120
|
}
|
9121
|
-
reloadTile(
|
9121
|
+
reloadTile(z) {
|
9122
9122
|
const M = this.loaded;
|
9123
|
-
return M && M[
|
9123
|
+
return M && M[z.uid] ? super.reloadTile(z) : this.loadTile(z);
|
9124
9124
|
}
|
9125
|
-
loadAndProcessGeoJSON(
|
9125
|
+
loadAndProcessGeoJSON(z, M) {
|
9126
9126
|
return S._(this, void 0, void 0, function* () {
|
9127
|
-
let V = yield this.loadGeoJSON(
|
9128
|
-
if (delete this._pendingRequest, typeof V != "object") throw new Error(`Input data given to '${
|
9129
|
-
if (Ke(V, !0),
|
9130
|
-
const Z = S.bB(
|
9127
|
+
let V = yield this.loadGeoJSON(z, M);
|
9128
|
+
if (delete this._pendingRequest, typeof V != "object") throw new Error(`Input data given to '${z.source}' is not a valid GeoJSON object.`);
|
9129
|
+
if (Ke(V, !0), z.filter) {
|
9130
|
+
const Z = S.bB(z.filter, { type: "boolean", "property-type": "data-driven", overridable: !1, transition: !1 });
|
9131
9131
|
if (Z.result === "error") throw new Error(Z.value.map((te) => `${te.key}: ${te.message}`).join(", "));
|
9132
9132
|
V = { type: "FeatureCollection", features: V.features.filter((te) => Z.value.evaluate({ zoom: 0 }, te)) };
|
9133
9133
|
}
|
9134
9134
|
return V;
|
9135
9135
|
});
|
9136
9136
|
}
|
9137
|
-
loadGeoJSON(
|
9137
|
+
loadGeoJSON(z, M) {
|
9138
9138
|
return S._(this, void 0, void 0, function* () {
|
9139
|
-
const { promoteId: V } =
|
9140
|
-
if (
|
9141
|
-
const Z = yield S.h(
|
9139
|
+
const { promoteId: V } = z;
|
9140
|
+
if (z.request) {
|
9141
|
+
const Z = yield S.h(z.request, M);
|
9142
9142
|
return this._dataUpdateable = Sr(Z.data, V) ? Br(Z.data, V) : void 0, Z.data;
|
9143
9143
|
}
|
9144
|
-
if (typeof
|
9145
|
-
const Z = JSON.parse(
|
9144
|
+
if (typeof z.data == "string") try {
|
9145
|
+
const Z = JSON.parse(z.data);
|
9146
9146
|
return this._dataUpdateable = Sr(Z, V) ? Br(Z, V) : void 0, Z;
|
9147
9147
|
} catch {
|
9148
|
-
throw new Error(`Input data given to '${
|
9148
|
+
throw new Error(`Input data given to '${z.source}' is not a valid GeoJSON object.`);
|
9149
9149
|
}
|
9150
|
-
if (!
|
9151
|
-
if (!this._dataUpdateable) throw new Error(`Cannot update existing geojson data in ${
|
9150
|
+
if (!z.dataDiff) throw new Error(`Input data given to '${z.source}' is not a valid GeoJSON object.`);
|
9151
|
+
if (!this._dataUpdateable) throw new Error(`Cannot update existing geojson data in ${z.source}`);
|
9152
9152
|
return function(Z, Q, te) {
|
9153
9153
|
var re, J, de, ye;
|
9154
9154
|
if (Q.removeAll && Z.clear(), Q.remove) for (const ce of Q.remove) Z.delete(ce);
|
@@ -9164,27 +9164,27 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9164
9164
|
else if (((de = ce.removeProperties) === null || de === void 0 ? void 0 : de.length) > 0) for (const We of ce.removeProperties) Object.prototype.hasOwnProperty.call(Ie.properties, We) && delete Ie.properties[We];
|
9165
9165
|
if (((ye = ce.addOrUpdateProperties) === null || ye === void 0 ? void 0 : ye.length) > 0) for (const { key: We, value: st } of ce.addOrUpdateProperties) Ie.properties[We] = st;
|
9166
9166
|
}
|
9167
|
-
}(this._dataUpdateable,
|
9167
|
+
}(this._dataUpdateable, z.dataDiff, V), { type: "FeatureCollection", features: Array.from(this._dataUpdateable.values()) };
|
9168
9168
|
});
|
9169
9169
|
}
|
9170
|
-
removeSource(
|
9170
|
+
removeSource(z) {
|
9171
9171
|
return S._(this, void 0, void 0, function* () {
|
9172
9172
|
this._pendingRequest && this._pendingRequest.abort();
|
9173
9173
|
});
|
9174
9174
|
}
|
9175
|
-
getClusterExpansionZoom(
|
9176
|
-
return this._geoJSONIndex.getClusterExpansionZoom(
|
9175
|
+
getClusterExpansionZoom(z) {
|
9176
|
+
return this._geoJSONIndex.getClusterExpansionZoom(z.clusterId);
|
9177
9177
|
}
|
9178
|
-
getClusterChildren(
|
9179
|
-
return this._geoJSONIndex.getChildren(
|
9178
|
+
getClusterChildren(z) {
|
9179
|
+
return this._geoJSONIndex.getChildren(z.clusterId);
|
9180
9180
|
}
|
9181
|
-
getClusterLeaves(
|
9182
|
-
return this._geoJSONIndex.getLeaves(
|
9181
|
+
getClusterLeaves(z) {
|
9182
|
+
return this._geoJSONIndex.getLeaves(z.clusterId, z.limit, z.offset);
|
9183
9183
|
}
|
9184
9184
|
}
|
9185
9185
|
class Tr {
|
9186
|
-
constructor(
|
9187
|
-
this.self =
|
9186
|
+
constructor(z) {
|
9187
|
+
this.self = z, this.actor = new S.F(z), this.layerIndexes = {}, this.availableImages = {}, this.workerSources = {}, this.demWorkerSources = {}, this.externalWorkerSourceTypes = {}, this.self.registerWorkerSource = (M, V) => {
|
9188
9188
|
if (this.externalWorkerSourceTypes[M]) throw new Error(`Worker source with name "${M}" already registered.`);
|
9189
9189
|
this.externalWorkerSourceTypes[M] = V;
|
9190
9190
|
}, this.self.addProtocol = S.bh, this.self.removeProtocol = S.bi, this.self.registerRTLTextPlugin = (M) => {
|
@@ -9214,16 +9214,16 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9214
9214
|
this._getLayerIndex(M).replace(V);
|
9215
9215
|
}));
|
9216
9216
|
}
|
9217
|
-
_setImages(
|
9217
|
+
_setImages(z, M) {
|
9218
9218
|
return S._(this, void 0, void 0, function* () {
|
9219
|
-
this.availableImages[
|
9220
|
-
for (const V in this.workerSources[
|
9221
|
-
const Z = this.workerSources[
|
9219
|
+
this.availableImages[z] = M;
|
9220
|
+
for (const V in this.workerSources[z]) {
|
9221
|
+
const Z = this.workerSources[z][V];
|
9222
9222
|
for (const Q in Z) Z[Q].availableImages = M;
|
9223
9223
|
}
|
9224
9224
|
});
|
9225
9225
|
}
|
9226
|
-
_syncRTLPluginState(
|
9226
|
+
_syncRTLPluginState(z, M) {
|
9227
9227
|
return S._(this, void 0, void 0, function* () {
|
9228
9228
|
if (S.bC.isParsed()) return S.bC.getState();
|
9229
9229
|
if (M.pluginStatus !== "loading") return S.bC.setState(M), M;
|
@@ -9235,36 +9235,36 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
9235
9235
|
throw S.bC.setState({ pluginStatus: "error", pluginURL: "" }), new Error(`RTL Text Plugin failed to import scripts from ${V}`);
|
9236
9236
|
});
|
9237
9237
|
}
|
9238
|
-
_getAvailableImages(
|
9239
|
-
let M = this.availableImages[
|
9238
|
+
_getAvailableImages(z) {
|
9239
|
+
let M = this.availableImages[z];
|
9240
9240
|
return M || (M = []), M;
|
9241
9241
|
}
|
9242
|
-
_getLayerIndex(
|
9243
|
-
let M = this.layerIndexes[
|
9244
|
-
return M || (M = this.layerIndexes[
|
9242
|
+
_getLayerIndex(z) {
|
9243
|
+
let M = this.layerIndexes[z];
|
9244
|
+
return M || (M = this.layerIndexes[z] = new c()), M;
|
9245
9245
|
}
|
9246
|
-
_getWorkerSource(
|
9247
|
-
if (this.workerSources[
|
9248
|
-
const Z = { sendAsync: (Q, te) => (Q.targetMapId =
|
9246
|
+
_getWorkerSource(z, M, V) {
|
9247
|
+
if (this.workerSources[z] || (this.workerSources[z] = {}), this.workerSources[z][M] || (this.workerSources[z][M] = {}), !this.workerSources[z][M][V]) {
|
9248
|
+
const Z = { sendAsync: (Q, te) => (Q.targetMapId = z, this.actor.sendAsync(Q, te)) };
|
9249
9249
|
switch (M) {
|
9250
9250
|
case "vector":
|
9251
|
-
this.workerSources[
|
9251
|
+
this.workerSources[z][M][V] = new oe(Z, this._getLayerIndex(z), this._getAvailableImages(z));
|
9252
9252
|
break;
|
9253
9253
|
case "geojson":
|
9254
|
-
this.workerSources[
|
9254
|
+
this.workerSources[z][M][V] = new Qr(Z, this._getLayerIndex(z), this._getAvailableImages(z));
|
9255
9255
|
break;
|
9256
9256
|
default:
|
9257
|
-
this.workerSources[
|
9257
|
+
this.workerSources[z][M][V] = new this.externalWorkerSourceTypes[M](Z, this._getLayerIndex(z), this._getAvailableImages(z));
|
9258
9258
|
}
|
9259
9259
|
}
|
9260
|
-
return this.workerSources[
|
9260
|
+
return this.workerSources[z][M][V];
|
9261
9261
|
}
|
9262
|
-
_getDEMWorkerSource(
|
9263
|
-
return this.demWorkerSources[
|
9262
|
+
_getDEMWorkerSource(z, M) {
|
9263
|
+
return this.demWorkerSources[z] || (this.demWorkerSources[z] = {}), this.demWorkerSources[z][M] || (this.demWorkerSources[z][M] = new ae()), this.demWorkerSources[z][M];
|
9264
9264
|
}
|
9265
9265
|
}
|
9266
9266
|
return S.i(self) && (self.worker = new Tr(self)), Tr;
|
9267
|
-
}),
|
9267
|
+
}), L("index", ["exports", "./shared"], function(S, c) {
|
9268
9268
|
var pe = "4.5.2";
|
9269
9269
|
let fe, xe;
|
9270
9270
|
const oe = { now: typeof performance < "u" && performance && performance.now ? performance.now.bind(performance) : Date.now.bind(Date), frameAsync: (u) => new Promise((t, n) => {
|
@@ -11355,7 +11355,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11355
11355
|
const a = o[3];
|
11356
11356
|
return { point: new c.P(o[0] / a, o[1] / a), signedDistanceFromCamera: a, isOccluded: !1 };
|
11357
11357
|
}
|
11358
|
-
function
|
11358
|
+
function z(u, t) {
|
11359
11359
|
return 0.5 + u / t * 0.5;
|
11360
11360
|
}
|
11361
11361
|
function M(u, t) {
|
@@ -11378,7 +11378,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
11378
11378
|
We(be.numGlyphs, K);
|
11379
11379
|
continue;
|
11380
11380
|
}
|
11381
|
-
const De =
|
11381
|
+
const De = z(n.transform.cameraToCenterDistance, ze.signedDistanceFromCamera), we = c.aj(G, j, be), Se = g ? we / De : we * De, Ne = { getElevation: N, labelPlaneMatrix: a, lineVertexArray: $, pitchWithMap: g, projectionCache: { projections: {}, offsets: {}, cachedAnchorPoint: void 0, anyProjectionOccluded: !1 }, projection: w, tileAnchorPoint: new c.P(be.anchorX, be.anchorY), unwrappedTileID: P, width: A, height: R, translation: F }, tt = te(Ne, be, Se, !1, y, t, h, u.glyphOffsetArray, K, ne, b);
|
11382
11382
|
le = tt.useVertical, (tt.notEnoughRoom || le || tt.needsFlipping && te(Ne, be, Se, !0, y, t, h, u.glyphOffsetArray, K, ne, b).notEnoughRoom) && We(be.numGlyphs, K);
|
11383
11383
|
}
|
11384
11384
|
o ? u.text.dynamicLayoutVertexBuffer.updateData(K) : u.icon.dynamicLayoutVertexBuffer.updateData(K);
|
@@ -14011,7 +14011,7 @@ uniform ${P} ${A} u_${R};
|
|
14011
14011
|
for (let K = 0; K < N.length; K++) {
|
14012
14012
|
const $ = N.get(K), ee = $.hidden || !$.crossTileID || u.allowVerticalPlacement && !$.placedOrientation ? null : o[$.crossTileID];
|
14013
14013
|
if (ee) {
|
14014
|
-
const ne = new c.P($.anchorX, $.anchorY), le = { getElevation: F, width: a.width, height: a.height, labelPlaneMatrix: h, lineVertexArray: null, pitchWithMap: n, projection: P, projectionCache: null, tileAnchorPoint: ne, translation: A, unwrappedTileID: R }, _e = n ? H(ne, g, F) : de(ne.x, ne.y, le), be =
|
14014
|
+
const ne = new c.P($.anchorX, $.anchorY), le = { getElevation: F, width: a.width, height: a.height, labelPlaneMatrix: h, lineVertexArray: null, pitchWithMap: n, projection: P, projectionCache: null, tileAnchorPoint: ne, translation: A, unwrappedTileID: R }, _e = n ? H(ne, g, F) : de(ne.x, ne.y, le), be = z(a.cameraToCenterDistance, _e.signedDistanceFromCamera);
|
14015
14015
|
let ze = c.aj(u.textSizeData, b, $) * be / c.aq;
|
14016
14016
|
n && (ze *= u.tilePixelRatio / y);
|
14017
14017
|
const { width: De, height: we, anchor: Se, textOffset: Ne, textBoxScale: tt } = ee, ke = uo(Se, De, we, Ne, tt, ze), Ce = P.getPitchedTextCorrection(a, ne.add(new c.P(A[0], A[1])), R), Qe = po(_e.point, le, t, ke, a.angle, Ce), Rt = u.allowVerticalPlacement && $.placedOrientation === c.ai.vertical ? Math.PI / 2 : 0;
|
@@ -18092,56 +18092,56 @@ function Ym(f) {
|
|
18092
18092
|
}
|
18093
18093
|
const Jd = ["#69D2E7", "yellow", "#FE4365", "#125B9A", "#41B3A2", "#D7C3F1", "#F1D3CE"], Qm = ["ma-star", "ma-water", "ma-swimming", "fa-home", "fa-search", "fa-trash", "fa-check"], Kd = {};
|
18094
18094
|
async function Yd(f, x, I = "api") {
|
18095
|
-
const C = await fetch(`${I}/gis-layer/${f}/${x}`), { rows:
|
18096
|
-
return
|
18095
|
+
const C = await fetch(`${I}/gis-layer/${f}/${x}`), { rows: L } = await C.json();
|
18096
|
+
return L;
|
18097
18097
|
}
|
18098
18098
|
async function Zh(f, x, I, C) {
|
18099
18099
|
if (!f) return null;
|
18100
|
-
const
|
18100
|
+
const L = JSON.parse(JSON.stringify(f)), U = L.colorAttr ? await Yd(x, L.colorAttr, C) : null;
|
18101
18101
|
U == null || U.forEach((c, pe) => {
|
18102
18102
|
var fe, xe;
|
18103
|
-
c.color = c.color || ((fe =
|
18103
|
+
c.color = c.color || ((fe = L.colorSet) == null ? void 0 : fe[c.id]) || ((xe = L.colorSet) == null ? void 0 : xe[pe]) || Jd[pe % Jd.length], c.icon = L.icon ? L.icon.split("+")[0] + "+" + c.color.replace("#", "") + ".png" : null;
|
18104
18104
|
});
|
18105
|
-
const S =
|
18105
|
+
const S = L.iconAttr ? await Yd(x, L.iconAttr, C) : null;
|
18106
18106
|
if (S == null || S.forEach((c, pe) => {
|
18107
18107
|
var ut, $e, Ke, Oe;
|
18108
|
-
const fe = c.icon || ((ut =
|
18108
|
+
const fe = c.icon || ((ut = L.iconSet) == null ? void 0 : ut[c.id]) || (($e = L.iconPattern) == null ? void 0 : $e.replace("{id}", c.id)) || ((Ke = L.iconSet) == null ? void 0 : Ke[pe]) || (L.iconPrefix ? null : Qm[pe]);
|
18109
18109
|
if (!fe) return;
|
18110
|
-
const xe = c.color || ((Oe =
|
18111
|
-
c.icon =
|
18112
|
-
}),
|
18113
|
-
const c = ["match", ["get",
|
18110
|
+
const xe = c.color || ((Oe = L.color) == null ? void 0 : Oe.replace("#", "")) || "red", [oe = "pin6", ae = "m"] = L.icon ? L.icon.split("-") : [];
|
18111
|
+
c.icon = L.iconPrefix || fe != null && fe.includes("/") ? (L.iconPrefix || "") + fe : `${oe}-${ae}-${fe}+${xe}.png`;
|
18112
|
+
}), L.colorAttr && U) {
|
18113
|
+
const c = ["match", ["get", L.colorAttr]];
|
18114
18114
|
U.filter((pe) => pe.id).forEach((pe) => {
|
18115
18115
|
c.push(pe.id), c.push(pe.color);
|
18116
|
-
}), c.push(
|
18116
|
+
}), c.push(L.color || "gray"), L.color = c;
|
18117
18117
|
}
|
18118
|
-
if (
|
18119
|
-
const c = ["match", ["get",
|
18118
|
+
if (L.icon && L.iconAttr && S) {
|
18119
|
+
const c = ["match", ["get", L.iconAttr]];
|
18120
18120
|
S.filter((pe) => pe.icon).forEach(({ id: pe, icon: fe }) => {
|
18121
|
-
if (
|
18121
|
+
if (L.colorAttr && U) {
|
18122
18122
|
c.push(pe);
|
18123
|
-
const xe = ["match", ["get",
|
18123
|
+
const xe = ["match", ["get", L.colorAttr]];
|
18124
18124
|
U.forEach((oe) => {
|
18125
18125
|
xe.push(oe.id);
|
18126
18126
|
const ae = fe.split("+")[0] + "+" + oe.color.replace("#", "") + ".png";
|
18127
18127
|
xe.push(ae), Go(ae, I, C);
|
18128
|
-
}), xe.push(
|
18128
|
+
}), xe.push(L.icon), c.push(xe);
|
18129
18129
|
} else
|
18130
18130
|
c.push(pe), c.push(fe), Go(fe, I, C);
|
18131
|
-
}), c.push((
|
18132
|
-
} else if (
|
18133
|
-
const c = ["match", ["get",
|
18131
|
+
}), c.push((L.iconPrefix || "") + L.icon), Go((L.iconPrefix || "") + L.icon, I, C), L.icon = c;
|
18132
|
+
} else if (L.icon && L.colorAttr && U) {
|
18133
|
+
const c = ["match", ["get", L.colorAttr]];
|
18134
18134
|
U.forEach((pe) => {
|
18135
18135
|
c.push(pe.id), c.push(pe.icon), Go(pe.icon, I, C);
|
18136
|
-
}), c.push(
|
18137
|
-
} else
|
18136
|
+
}), c.push(L.icon), Go(L.icon, I, C), L.icon = c;
|
18137
|
+
} else L.icon && await Go(L.icon, I, C);
|
18138
18138
|
return eg({
|
18139
18139
|
style: f,
|
18140
18140
|
colors: U,
|
18141
18141
|
icons: S,
|
18142
18142
|
map: I,
|
18143
18143
|
id: x
|
18144
|
-
}), Ym(
|
18144
|
+
}), Ym(L);
|
18145
18145
|
}
|
18146
18146
|
async function Go(f = "pin4-sm-mi-plumber+f45942.png", x = null, I) {
|
18147
18147
|
if (Kd[f]) return null;
|
@@ -18149,9 +18149,9 @@ async function Go(f = "pin4-sm-mi-plumber+f45942.png", x = null, I) {
|
|
18149
18149
|
const C = await (x == null ? void 0 : x.loadImage(f != null && f.startsWith("/") || f != null && f.includes("//") ? f : `${I}/marker_icon/${f.replace(".png", "")}.png`));
|
18150
18150
|
x == null || x.addImage(f, C.data);
|
18151
18151
|
}
|
18152
|
-
function eg({ style: f, colors: x, icons: I, map: C, id:
|
18152
|
+
function eg({ style: f, colors: x, icons: I, map: C, id: L }) {
|
18153
18153
|
C.legend || Object.assign(C, { legend: {} }), window.map || (window.map = C), Object.assign(C.legend, {
|
18154
|
-
[
|
18154
|
+
[L]: {
|
18155
18155
|
icon: f.icon,
|
18156
18156
|
colors: x,
|
18157
18157
|
icons: I,
|
@@ -18180,20 +18180,20 @@ const _l = {
|
|
18180
18180
|
},
|
18181
18181
|
async setVisible(f, x = !0, I = this.map) {
|
18182
18182
|
if (!f) return;
|
18183
|
-
const C = (f == null ? void 0 : f.id) || f,
|
18184
|
-
if (!(
|
18183
|
+
const C = (f == null ? void 0 : f.id) || f, L = this.layerList.find((S) => S.id === f) || f;
|
18184
|
+
if (!(L != null && L.id)) throw new Error("MixinError: Layer has no id");
|
18185
18185
|
I.getStyle().layers.filter((S) => S.id.match(C)).forEach((S) => {
|
18186
18186
|
I.setLayoutProperty(
|
18187
18187
|
S.id,
|
18188
18188
|
"visibility",
|
18189
18189
|
x ? "visible" : "none"
|
18190
18190
|
);
|
18191
|
-
}), x && await this.addLayer(
|
18191
|
+
}), x && await this.addLayer(L);
|
18192
18192
|
},
|
18193
18193
|
async addLayer(f, x = this == null ? void 0 : this.map) {
|
18194
|
-
var
|
18194
|
+
var L, U;
|
18195
18195
|
const I = this.layerList.find((S) => S.id === f) || f;
|
18196
|
-
!this.map.getStyle() || this.map.getStyle().layers.find((S) => S.id === I.id) || (this.layerList.find((S) => S.id === I.id) || this.layerList.push(I), (I.service === "vtile" || I.service === "vector" || (
|
18196
|
+
!this.map.getStyle() || this.map.getStyle().layers.find((S) => S.id === I.id) || (this.layerList.find((S) => S.id === I.id) || this.layerList.push(I), (I.service === "vtile" || I.service === "vector" || (L = I.url) != null && L.includes(".vmt")) && this.addVtileLayer(I, x), I.service === "geojson" && this.addGeoJsonLayer(I, x), ((U = I.url) != null && U.includes(".png") || ["tms", "raster"].includes(I.service)) && await this.addRasterLayer(I, x));
|
18197
18197
|
},
|
18198
18198
|
async addRasterLayer(f, x = this == null ? void 0 : this.map) {
|
18199
18199
|
var I;
|
@@ -18215,21 +18215,21 @@ const _l = {
|
|
18215
18215
|
},
|
18216
18216
|
async updateStyle(f, x = this == null ? void 0 : this.map) {
|
18217
18217
|
const I = f.id;
|
18218
|
-
x.getStyle().layers.forEach(async (
|
18219
|
-
|
18218
|
+
x.getStyle().layers.forEach(async (L) => {
|
18219
|
+
L.source === I && x.getLayer(L.id) && await x.removeLayer(L.id);
|
18220
18220
|
}), (await Zh(
|
18221
18221
|
f.style,
|
18222
18222
|
f.source || f.id,
|
18223
18223
|
x,
|
18224
18224
|
this.prefix
|
18225
|
-
) || f.layers || []).forEach((
|
18225
|
+
) || f.layers || []).forEach((L, U) => {
|
18226
18226
|
const S = {
|
18227
|
-
...
|
18227
|
+
...L,
|
18228
18228
|
id: `${f.id}-${U}`,
|
18229
18229
|
source: f.id,
|
18230
|
-
"source-layer":
|
18231
|
-
maxzoom: +
|
18232
|
-
minzoom: +
|
18230
|
+
"source-layer": L["source-layer"] || f.source || f.id,
|
18231
|
+
maxzoom: +L.maxzoom || 24,
|
18232
|
+
minzoom: +L.minzoom || 0
|
18233
18233
|
};
|
18234
18234
|
x.addLayer(S);
|
18235
18235
|
});
|
@@ -18262,8 +18262,8 @@ const _l = {
|
|
18262
18262
|
});
|
18263
18263
|
},
|
18264
18264
|
async addGeoJsonLayer(f, x = this.map) {
|
18265
|
-
var
|
18266
|
-
const I = f.data || ((
|
18265
|
+
var L;
|
18266
|
+
const I = f.data || ((L = f == null ? void 0 : f.url) != null && L.startsWith("http") ? "" : window.location.origin) + f.url;
|
18267
18267
|
x.addSource(f.id, { type: "geojson", data: I }), (await Zh(
|
18268
18268
|
f.style,
|
18269
18269
|
I.source || I.id,
|
@@ -18308,7 +18308,7 @@ const _l = {
|
|
18308
18308
|
// }
|
18309
18309
|
// },
|
18310
18310
|
async setFilter(f, x) {
|
18311
|
-
const I = this.layerList.find((
|
18311
|
+
const I = this.layerList.find((L) => L.id === f);
|
18312
18312
|
await (await this.map.getSource(f)).setTiles([
|
18313
18313
|
`${window.location.origin}${I.url}${I.url.includes("?") ? "&" : "?"}filter=${x}${I.props ? `&props=${I.props}` : ""}`
|
18314
18314
|
]);
|
@@ -18326,8 +18326,8 @@ const _l = {
|
|
18326
18326
|
}
|
18327
18327
|
}, Ji = (f, x) => {
|
18328
18328
|
const I = f.__vccOpts || f;
|
18329
|
-
for (const [C,
|
18330
|
-
I[C] =
|
18329
|
+
for (const [C, L] of x)
|
18330
|
+
I[C] = L;
|
18331
18331
|
return I;
|
18332
18332
|
}, tg = {}, ig = {
|
18333
18333
|
class: "w-48 mx-auto mb-4",
|
@@ -18373,9 +18373,9 @@ const hg = Mc("string"), yr = Mc("function"), Ip = Mc("number"), zc = (f) => f !
|
|
18373
18373
|
function yl(f, x, { allOwnKeys: I = !1 } = {}) {
|
18374
18374
|
if (f === null || typeof f > "u")
|
18375
18375
|
return;
|
18376
|
-
let C,
|
18376
|
+
let C, L;
|
18377
18377
|
if (typeof f != "object" && (f = [f]), Ko(f))
|
18378
|
-
for (C = 0,
|
18378
|
+
for (C = 0, L = f.length; C < L; C++)
|
18379
18379
|
x.call(null, f[C], C, f);
|
18380
18380
|
else {
|
18381
18381
|
const U = I ? Object.getOwnPropertyNames(f) : Object.keys(f), S = U.length;
|
@@ -18387,35 +18387,35 @@ function yl(f, x, { allOwnKeys: I = !1 } = {}) {
|
|
18387
18387
|
function kp(f, x) {
|
18388
18388
|
x = x.toLowerCase();
|
18389
18389
|
const I = Object.keys(f);
|
18390
|
-
let C = I.length,
|
18390
|
+
let C = I.length, L;
|
18391
18391
|
for (; C-- > 0; )
|
18392
|
-
if (
|
18393
|
-
return
|
18392
|
+
if (L = I[C], x === L.toLowerCase())
|
18393
|
+
return L;
|
18394
18394
|
return null;
|
18395
18395
|
}
|
18396
18396
|
const qs = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Pp = (f) => !gl(f) && f !== qs;
|
18397
18397
|
function Kh() {
|
18398
|
-
const { caseless: f } = Pp(this) && this || {}, x = {}, I = (C,
|
18399
|
-
const U = f && kp(x,
|
18398
|
+
const { caseless: f } = Pp(this) && this || {}, x = {}, I = (C, L) => {
|
18399
|
+
const U = f && kp(x, L) || L;
|
18400
18400
|
kc(x[U]) && kc(C) ? x[U] = Kh(x[U], C) : kc(C) ? x[U] = Kh({}, C) : Ko(C) ? x[U] = C.slice() : x[U] = C;
|
18401
18401
|
};
|
18402
|
-
for (let C = 0,
|
18402
|
+
for (let C = 0, L = arguments.length; C < L; C++)
|
18403
18403
|
arguments[C] && yl(arguments[C], I);
|
18404
18404
|
return x;
|
18405
18405
|
}
|
18406
|
-
const Tg = (f, x, I, { allOwnKeys: C } = {}) => (yl(x, (
|
18407
|
-
I && yr(
|
18406
|
+
const Tg = (f, x, I, { allOwnKeys: C } = {}) => (yl(x, (L, U) => {
|
18407
|
+
I && yr(L) ? f[U] = Sp(L, I) : f[U] = L;
|
18408
18408
|
}, { allOwnKeys: C }), f), Ig = (f) => (f.charCodeAt(0) === 65279 && (f = f.slice(1)), f), kg = (f, x, I, C) => {
|
18409
18409
|
f.prototype = Object.create(x.prototype, C), f.prototype.constructor = f, Object.defineProperty(f, "super", {
|
18410
18410
|
value: x.prototype
|
18411
18411
|
}), I && Object.assign(f.prototype, I);
|
18412
18412
|
}, Pg = (f, x, I, C) => {
|
18413
|
-
let
|
18413
|
+
let L, U, S;
|
18414
18414
|
const c = {};
|
18415
18415
|
if (x = x || {}, f == null) return x;
|
18416
18416
|
do {
|
18417
|
-
for (
|
18418
|
-
S =
|
18417
|
+
for (L = Object.getOwnPropertyNames(f), U = L.length; U-- > 0; )
|
18418
|
+
S = L[U], (!C || C(S, f, x)) && !c[S] && (x[S] = f[S], c[S] = !0);
|
18419
18419
|
f = I !== !1 && nu(f);
|
18420
18420
|
} while (f && (!I || I(f, x)) && f !== Object.prototype);
|
18421
18421
|
return x;
|
@@ -18434,9 +18434,9 @@ const Tg = (f, x, I, { allOwnKeys: C } = {}) => (yl(x, (z, U) => {
|
|
18434
18434
|
return I;
|
18435
18435
|
}, Eg = /* @__PURE__ */ ((f) => (x) => f && x instanceof f)(typeof Uint8Array < "u" && nu(Uint8Array)), Mg = (f, x) => {
|
18436
18436
|
const C = (f && f[Symbol.iterator]).call(f);
|
18437
|
-
let
|
18438
|
-
for (; (
|
18439
|
-
const U =
|
18437
|
+
let L;
|
18438
|
+
for (; (L = C.next()) && !L.done; ) {
|
18439
|
+
const U = L.value;
|
18440
18440
|
x.call(f, U[0], U[1]);
|
18441
18441
|
}
|
18442
18442
|
}, zg = (f, x) => {
|
@@ -18447,14 +18447,14 @@ const Tg = (f, x, I, { allOwnKeys: C } = {}) => (yl(x, (z, U) => {
|
|
18447
18447
|
return C;
|
18448
18448
|
}, Lg = Zr("HTMLFormElement"), Dg = (f) => f.toLowerCase().replace(
|
18449
18449
|
/[-_\s]([a-z\d])(\w*)/g,
|
18450
|
-
function(I, C,
|
18451
|
-
return C.toUpperCase() +
|
18450
|
+
function(I, C, L) {
|
18451
|
+
return C.toUpperCase() + L;
|
18452
18452
|
}
|
18453
18453
|
), Qd = (({ hasOwnProperty: f }) => (x, I) => f.call(x, I))(Object.prototype), Rg = Zr("RegExp"), Ap = (f, x) => {
|
18454
18454
|
const I = Object.getOwnPropertyDescriptors(f), C = {};
|
18455
|
-
yl(I, (
|
18455
|
+
yl(I, (L, U) => {
|
18456
18456
|
let S;
|
18457
|
-
(S = x(
|
18457
|
+
(S = x(L, U, f)) !== !1 && (C[U] = S || L);
|
18458
18458
|
}), Object.defineProperties(f, C);
|
18459
18459
|
}, Bg = (f) => {
|
18460
18460
|
Ap(f, (x, I) => {
|
@@ -18472,8 +18472,8 @@ const Tg = (f, x, I, { allOwnKeys: C } = {}) => (yl(x, (z, U) => {
|
|
18472
18472
|
}
|
18473
18473
|
});
|
18474
18474
|
}, Fg = (f, x) => {
|
18475
|
-
const I = {}, C = (
|
18476
|
-
|
18475
|
+
const I = {}, C = (L) => {
|
18476
|
+
L.forEach((U) => {
|
18477
18477
|
I[U] = !0;
|
18478
18478
|
});
|
18479
18479
|
};
|
@@ -18494,26 +18494,26 @@ function $g(f) {
|
|
18494
18494
|
return !!(f && yr(f.append) && f[Symbol.toStringTag] === "FormData" && f[Symbol.iterator]);
|
18495
18495
|
}
|
18496
18496
|
const Ug = (f) => {
|
18497
|
-
const x = new Array(10), I = (C,
|
18497
|
+
const x = new Array(10), I = (C, L) => {
|
18498
18498
|
if (zc(C)) {
|
18499
18499
|
if (x.indexOf(C) >= 0)
|
18500
18500
|
return;
|
18501
18501
|
if (!("toJSON" in C)) {
|
18502
|
-
x[
|
18502
|
+
x[L] = C;
|
18503
18503
|
const U = Ko(C) ? [] : {};
|
18504
18504
|
return yl(C, (S, c) => {
|
18505
|
-
const pe = I(S,
|
18505
|
+
const pe = I(S, L + 1);
|
18506
18506
|
!gl(pe) && (U[c] = pe);
|
18507
|
-
}), x[
|
18507
|
+
}), x[L] = void 0, U;
|
18508
18508
|
}
|
18509
18509
|
}
|
18510
18510
|
return C;
|
18511
18511
|
};
|
18512
18512
|
return I(f, 0);
|
18513
|
-
}, jg = Zr("AsyncFunction"), qg = (f) => f && (zc(f) || yr(f)) && yr(f.then) && yr(f.catch), Ep = ((f, x) => f ? setImmediate : x ? ((I, C) => (qs.addEventListener("message", ({ source:
|
18514
|
-
|
18515
|
-
}, !1), (
|
18516
|
-
C.push(
|
18513
|
+
}, jg = Zr("AsyncFunction"), qg = (f) => f && (zc(f) || yr(f)) && yr(f.then) && yr(f.catch), Ep = ((f, x) => f ? setImmediate : x ? ((I, C) => (qs.addEventListener("message", ({ source: L, data: U }) => {
|
18514
|
+
L === qs && U === I && C.length && C.shift()();
|
18515
|
+
}, !1), (L) => {
|
18516
|
+
C.push(L), qs.postMessage(I, "*");
|
18517
18517
|
}))(`axios@${Math.random()}`, []) : (I) => setTimeout(I))(
|
18518
18518
|
typeof setImmediate == "function",
|
18519
18519
|
yr(qs.postMessage)
|
@@ -18577,8 +18577,8 @@ const Ug = (f) => {
|
|
18577
18577
|
setImmediate: Ep,
|
18578
18578
|
asap: Zg
|
18579
18579
|
};
|
18580
|
-
function ht(f, x, I, C,
|
18581
|
-
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = f, this.name = "AxiosError", x && (this.code = x), I && (this.config = I), C && (this.request = C),
|
18580
|
+
function ht(f, x, I, C, L) {
|
18581
|
+
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = f, this.name = "AxiosError", x && (this.code = x), I && (this.config = I), C && (this.request = C), L && (this.response = L);
|
18582
18582
|
}
|
18583
18583
|
me.inherits(ht, Error, {
|
18584
18584
|
toJSON: function() {
|
@@ -18621,11 +18621,11 @@ const Mp = ht.prototype, zp = {};
|
|
18621
18621
|
});
|
18622
18622
|
Object.defineProperties(ht, zp);
|
18623
18623
|
Object.defineProperty(Mp, "isAxiosError", { value: !0 });
|
18624
|
-
ht.from = (f, x, I, C,
|
18624
|
+
ht.from = (f, x, I, C, L, U) => {
|
18625
18625
|
const S = Object.create(Mp);
|
18626
18626
|
return me.toFlatObject(f, S, function(pe) {
|
18627
18627
|
return pe !== Error.prototype;
|
18628
|
-
}, (c) => c !== "isAxiosError"), ht.call(S, f.message, x, I, C,
|
18628
|
+
}, (c) => c !== "isAxiosError"), ht.call(S, f.message, x, I, C, L), S.cause = f, S.name = f.name, U && Object.assign(S, U), S;
|
18629
18629
|
};
|
18630
18630
|
const Gg = null;
|
18631
18631
|
function Yh(f) {
|
@@ -18635,8 +18635,8 @@ function Lp(f) {
|
|
18635
18635
|
return me.endsWith(f, "[]") ? f.slice(0, -2) : f;
|
18636
18636
|
}
|
18637
18637
|
function tp(f, x, I) {
|
18638
|
-
return f ? f.concat(x).map(function(
|
18639
|
-
return
|
18638
|
+
return f ? f.concat(x).map(function(L, U) {
|
18639
|
+
return L = Lp(L), !I && U ? "[" + L + "]" : L;
|
18640
18640
|
}).join(I ? "." : "") : x;
|
18641
18641
|
}
|
18642
18642
|
function Hg(f) {
|
@@ -18655,8 +18655,8 @@ function Lc(f, x, I) {
|
|
18655
18655
|
}, !1, function(Ke, Oe) {
|
18656
18656
|
return !me.isUndefined(Oe[Ke]);
|
18657
18657
|
});
|
18658
|
-
const C = I.metaTokens,
|
18659
|
-
if (!me.isFunction(
|
18658
|
+
const C = I.metaTokens, L = I.visitor || xe, U = I.dots, S = I.indexes, pe = (I.Blob || typeof Blob < "u" && Blob) && me.isSpecCompliantForm(x);
|
18659
|
+
if (!me.isFunction(L))
|
18660
18660
|
throw new TypeError("visitor must be a function");
|
18661
18661
|
function fe($e) {
|
18662
18662
|
if ($e === null) return "";
|
@@ -18692,7 +18692,7 @@ function Lc(f, x, I) {
|
|
18692
18692
|
if (oe.indexOf($e) !== -1)
|
18693
18693
|
throw Error("Circular reference detected in " + Ke.join("."));
|
18694
18694
|
oe.push($e), me.forEach($e, function(gt, ot) {
|
18695
|
-
(!(me.isUndefined(gt) || gt === null) &&
|
18695
|
+
(!(me.isUndefined(gt) || gt === null) && L.call(
|
18696
18696
|
x,
|
18697
18697
|
gt,
|
18698
18698
|
me.isString(ot) ? ot.trim() : ot,
|
@@ -18731,8 +18731,8 @@ Dp.toString = function(x) {
|
|
18731
18731
|
const I = x ? function(C) {
|
18732
18732
|
return x.call(this, C, ip);
|
18733
18733
|
} : ip;
|
18734
|
-
return this._pairs.map(function(
|
18735
|
-
return I(
|
18734
|
+
return this._pairs.map(function(L) {
|
18735
|
+
return I(L[0]) + "=" + I(L[1]);
|
18736
18736
|
}, "").join("&");
|
18737
18737
|
};
|
18738
18738
|
function Xg(f) {
|
@@ -18741,9 +18741,9 @@ function Xg(f) {
|
|
18741
18741
|
function Rp(f, x, I) {
|
18742
18742
|
if (!x)
|
18743
18743
|
return f;
|
18744
|
-
const C = I && I.encode || Xg,
|
18744
|
+
const C = I && I.encode || Xg, L = I && I.serialize;
|
18745
18745
|
let U;
|
18746
|
-
if (
|
18746
|
+
if (L ? U = L(x, I) : U = me.isURLSearchParams(x) ? x.toString() : new su(x, I).toString(C), U) {
|
18747
18747
|
const S = f.indexOf("#");
|
18748
18748
|
S !== -1 && (f = f.slice(0, S)), f += (f.indexOf("?") === -1 ? "?" : "&") + U;
|
18749
18749
|
}
|
@@ -18828,7 +18828,7 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", i_
|
|
18828
18828
|
};
|
18829
18829
|
function n_(f, x) {
|
18830
18830
|
return Lc(f, new qr.classes.URLSearchParams(), Object.assign({
|
18831
|
-
visitor: function(I, C,
|
18831
|
+
visitor: function(I, C, L, U) {
|
18832
18832
|
return qr.isNode && me.isBuffer(I) ? (this.append(C, I.toString("base64")), !1) : U.defaultVisitor.apply(this, arguments);
|
18833
18833
|
}
|
18834
18834
|
}, x));
|
@@ -18839,23 +18839,23 @@ function s_(f) {
|
|
18839
18839
|
function o_(f) {
|
18840
18840
|
const x = {}, I = Object.keys(f);
|
18841
18841
|
let C;
|
18842
|
-
const
|
18842
|
+
const L = I.length;
|
18843
18843
|
let U;
|
18844
|
-
for (C = 0; C <
|
18844
|
+
for (C = 0; C < L; C++)
|
18845
18845
|
U = I[C], x[U] = f[U];
|
18846
18846
|
return x;
|
18847
18847
|
}
|
18848
18848
|
function Fp(f) {
|
18849
|
-
function x(I, C,
|
18849
|
+
function x(I, C, L, U) {
|
18850
18850
|
let S = I[U++];
|
18851
18851
|
if (S === "__proto__") return !0;
|
18852
18852
|
const c = Number.isFinite(+S), pe = U >= I.length;
|
18853
|
-
return S = !S && me.isArray(
|
18853
|
+
return S = !S && me.isArray(L) ? L.length : S, pe ? (me.hasOwnProp(L, S) ? L[S] = [L[S], C] : L[S] = C, !c) : ((!L[S] || !me.isObject(L[S])) && (L[S] = []), x(I, C, L[S], U) && me.isArray(L[S]) && (L[S] = o_(L[S])), !c);
|
18854
18854
|
}
|
18855
18855
|
if (me.isFormData(f) && me.isFunction(f.entries)) {
|
18856
18856
|
const I = {};
|
18857
|
-
return me.forEachEntry(f, (C,
|
18858
|
-
x(s_(C),
|
18857
|
+
return me.forEachEntry(f, (C, L) => {
|
18858
|
+
x(s_(C), L, I, 0);
|
18859
18859
|
}), I;
|
18860
18860
|
}
|
18861
18861
|
return null;
|
@@ -18874,9 +18874,9 @@ const xl = {
|
|
18874
18874
|
transitional: Bp,
|
18875
18875
|
adapter: ["xhr", "http", "fetch"],
|
18876
18876
|
transformRequest: [function(x, I) {
|
18877
|
-
const C = I.getContentType() || "",
|
18877
|
+
const C = I.getContentType() || "", L = C.indexOf("application/json") > -1, U = me.isObject(x);
|
18878
18878
|
if (U && me.isHTMLForm(x) && (x = new FormData(x)), me.isFormData(x))
|
18879
|
-
return
|
18879
|
+
return L ? JSON.stringify(Fp(x)) : x;
|
18880
18880
|
if (me.isArrayBuffer(x) || me.isBuffer(x) || me.isStream(x) || me.isFile(x) || me.isBlob(x) || me.isReadableStream(x))
|
18881
18881
|
return x;
|
18882
18882
|
if (me.isArrayBufferView(x))
|
@@ -18896,14 +18896,14 @@ const xl = {
|
|
18896
18896
|
);
|
18897
18897
|
}
|
18898
18898
|
}
|
18899
|
-
return U ||
|
18899
|
+
return U || L ? (I.setContentType("application/json", !1), a_(x)) : x;
|
18900
18900
|
}],
|
18901
18901
|
transformResponse: [function(x) {
|
18902
|
-
const I = this.transitional || xl.transitional, C = I && I.forcedJSONParsing,
|
18902
|
+
const I = this.transitional || xl.transitional, C = I && I.forcedJSONParsing, L = this.responseType === "json";
|
18903
18903
|
if (me.isResponse(x) || me.isReadableStream(x))
|
18904
18904
|
return x;
|
18905
|
-
if (x && me.isString(x) && (C && !this.responseType ||
|
18906
|
-
const S = !(I && I.silentJSONParsing) &&
|
18905
|
+
if (x && me.isString(x) && (C && !this.responseType || L)) {
|
18906
|
+
const S = !(I && I.silentJSONParsing) && L;
|
18907
18907
|
try {
|
18908
18908
|
return JSON.parse(x);
|
18909
18909
|
} catch (c) {
|
@@ -18959,10 +18959,10 @@ const l_ = me.toObjectSet([
|
|
18959
18959
|
"user-agent"
|
18960
18960
|
]), c_ = (f) => {
|
18961
18961
|
const x = {};
|
18962
|
-
let I, C,
|
18962
|
+
let I, C, L;
|
18963
18963
|
return f && f.split(`
|
18964
18964
|
`).forEach(function(S) {
|
18965
|
-
|
18965
|
+
L = S.indexOf(":"), I = S.substring(0, L).trim().toLowerCase(), C = S.substring(L + 1).trim(), !(!I || x[I] && l_[I]) && (I === "set-cookie" ? x[I] ? x[I].push(C) : x[I] = [C] : x[I] = x[I] ? x[I] + ", " + C : C);
|
18966
18966
|
}), x;
|
18967
18967
|
}, np = Symbol("internals");
|
18968
18968
|
function fl(f) {
|
@@ -18979,10 +18979,10 @@ function h_(f) {
|
|
18979
18979
|
return x;
|
18980
18980
|
}
|
18981
18981
|
const u_ = (f) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(f.trim());
|
18982
|
-
function Hh(f, x, I, C,
|
18982
|
+
function Hh(f, x, I, C, L) {
|
18983
18983
|
if (me.isFunction(C))
|
18984
18984
|
return C.call(this, x, I);
|
18985
|
-
if (
|
18985
|
+
if (L && (x = I), !!me.isString(x)) {
|
18986
18986
|
if (me.isString(C))
|
18987
18987
|
return x.indexOf(C) !== -1;
|
18988
18988
|
if (me.isRegExp(C))
|
@@ -18996,8 +18996,8 @@ function p_(f, x) {
|
|
18996
18996
|
const I = me.toCamelCase(" " + x);
|
18997
18997
|
["get", "set", "has"].forEach((C) => {
|
18998
18998
|
Object.defineProperty(f, C + I, {
|
18999
|
-
value: function(
|
19000
|
-
return this[C].call(this, x,
|
18999
|
+
value: function(L, U, S) {
|
19000
|
+
return this[C].call(this, x, L, U, S);
|
19001
19001
|
},
|
19002
19002
|
configurable: !0
|
19003
19003
|
});
|
@@ -19008,13 +19008,13 @@ class rr {
|
|
19008
19008
|
x && this.set(x);
|
19009
19009
|
}
|
19010
19010
|
set(x, I, C) {
|
19011
|
-
const
|
19011
|
+
const L = this;
|
19012
19012
|
function U(c, pe, fe) {
|
19013
19013
|
const xe = fl(pe);
|
19014
19014
|
if (!xe)
|
19015
19015
|
throw new Error("header name must be a non-empty string");
|
19016
|
-
const oe = me.findKey(
|
19017
|
-
(!oe ||
|
19016
|
+
const oe = me.findKey(L, xe);
|
19017
|
+
(!oe || L[oe] === void 0 || fe === !0 || fe === void 0 && L[oe] !== !1) && (L[oe || pe] = Pc(c));
|
19018
19018
|
}
|
19019
19019
|
const S = (c, pe) => me.forEach(c, (fe, xe) => U(fe, xe, pe));
|
19020
19020
|
if (me.isPlainObject(x) || x instanceof this.constructor)
|
@@ -19032,15 +19032,15 @@ class rr {
|
|
19032
19032
|
if (x = fl(x), x) {
|
19033
19033
|
const C = me.findKey(this, x);
|
19034
19034
|
if (C) {
|
19035
|
-
const
|
19035
|
+
const L = this[C];
|
19036
19036
|
if (!I)
|
19037
|
-
return
|
19037
|
+
return L;
|
19038
19038
|
if (I === !0)
|
19039
|
-
return h_(
|
19039
|
+
return h_(L);
|
19040
19040
|
if (me.isFunction(I))
|
19041
|
-
return I.call(this,
|
19041
|
+
return I.call(this, L, C);
|
19042
19042
|
if (me.isRegExp(I))
|
19043
|
-
return I.exec(
|
19043
|
+
return I.exec(L);
|
19044
19044
|
throw new TypeError("parser must be boolean|regexp|function");
|
19045
19045
|
}
|
19046
19046
|
}
|
@@ -19054,34 +19054,34 @@ class rr {
|
|
19054
19054
|
}
|
19055
19055
|
delete(x, I) {
|
19056
19056
|
const C = this;
|
19057
|
-
let
|
19057
|
+
let L = !1;
|
19058
19058
|
function U(S) {
|
19059
19059
|
if (S = fl(S), S) {
|
19060
19060
|
const c = me.findKey(C, S);
|
19061
|
-
c && (!I || Hh(C, C[c], c, I)) && (delete C[c],
|
19061
|
+
c && (!I || Hh(C, C[c], c, I)) && (delete C[c], L = !0);
|
19062
19062
|
}
|
19063
19063
|
}
|
19064
|
-
return me.isArray(x) ? x.forEach(U) : U(x),
|
19064
|
+
return me.isArray(x) ? x.forEach(U) : U(x), L;
|
19065
19065
|
}
|
19066
19066
|
clear(x) {
|
19067
19067
|
const I = Object.keys(this);
|
19068
|
-
let C = I.length,
|
19068
|
+
let C = I.length, L = !1;
|
19069
19069
|
for (; C--; ) {
|
19070
19070
|
const U = I[C];
|
19071
|
-
(!x || Hh(this, this[U], U, x, !0)) && (delete this[U],
|
19071
|
+
(!x || Hh(this, this[U], U, x, !0)) && (delete this[U], L = !0);
|
19072
19072
|
}
|
19073
|
-
return
|
19073
|
+
return L;
|
19074
19074
|
}
|
19075
19075
|
normalize(x) {
|
19076
19076
|
const I = this, C = {};
|
19077
|
-
return me.forEach(this, (
|
19077
|
+
return me.forEach(this, (L, U) => {
|
19078
19078
|
const S = me.findKey(C, U);
|
19079
19079
|
if (S) {
|
19080
|
-
I[S] = Pc(
|
19080
|
+
I[S] = Pc(L), delete I[U];
|
19081
19081
|
return;
|
19082
19082
|
}
|
19083
19083
|
const c = x ? d_(U) : String(U).trim();
|
19084
|
-
c !== U && delete I[U], I[c] = Pc(
|
19084
|
+
c !== U && delete I[U], I[c] = Pc(L), C[c] = !0;
|
19085
19085
|
}), this;
|
19086
19086
|
}
|
19087
19087
|
concat(...x) {
|
@@ -19089,8 +19089,8 @@ class rr {
|
|
19089
19089
|
}
|
19090
19090
|
toJSON(x) {
|
19091
19091
|
const I = /* @__PURE__ */ Object.create(null);
|
19092
|
-
return me.forEach(this, (C,
|
19093
|
-
C != null && C !== !1 && (I[
|
19092
|
+
return me.forEach(this, (C, L) => {
|
19093
|
+
C != null && C !== !1 && (I[L] = x && me.isArray(C) ? C.join(", ") : C);
|
19094
19094
|
}), I;
|
19095
19095
|
}
|
19096
19096
|
[Symbol.iterator]() {
|
@@ -19108,15 +19108,15 @@ class rr {
|
|
19108
19108
|
}
|
19109
19109
|
static concat(x, ...I) {
|
19110
19110
|
const C = new this(x);
|
19111
|
-
return I.forEach((
|
19111
|
+
return I.forEach((L) => C.set(L)), C;
|
19112
19112
|
}
|
19113
19113
|
static accessor(x) {
|
19114
19114
|
const C = (this[np] = this[np] = {
|
19115
19115
|
accessors: {}
|
19116
|
-
}).accessors,
|
19116
|
+
}).accessors, L = this.prototype;
|
19117
19117
|
function U(S) {
|
19118
19118
|
const c = fl(S);
|
19119
|
-
C[c] || (p_(
|
19119
|
+
C[c] || (p_(L, S), C[c] = !0);
|
19120
19120
|
}
|
19121
19121
|
return me.isArray(x) ? x.forEach(U) : U(x), this;
|
19122
19122
|
}
|
@@ -19133,11 +19133,11 @@ me.reduceDescriptors(rr.prototype, ({ value: f }, x) => {
|
|
19133
19133
|
});
|
19134
19134
|
me.freezeMethods(rr);
|
19135
19135
|
function Wh(f, x) {
|
19136
|
-
const I = this || xl, C = x || I,
|
19136
|
+
const I = this || xl, C = x || I, L = rr.from(C.headers);
|
19137
19137
|
let U = C.data;
|
19138
19138
|
return me.forEach(f, function(c) {
|
19139
|
-
U = c.call(I, U,
|
19140
|
-
}),
|
19139
|
+
U = c.call(I, U, L.normalize(), x ? x.status : void 0);
|
19140
|
+
}), L.normalize(), U;
|
19141
19141
|
}
|
19142
19142
|
function Op(f) {
|
19143
19143
|
return !!(f && f.__CANCEL__);
|
@@ -19165,36 +19165,36 @@ function f_(f) {
|
|
19165
19165
|
function m_(f, x) {
|
19166
19166
|
f = f || 10;
|
19167
19167
|
const I = new Array(f), C = new Array(f);
|
19168
|
-
let
|
19168
|
+
let L = 0, U = 0, S;
|
19169
19169
|
return x = x !== void 0 ? x : 1e3, function(pe) {
|
19170
19170
|
const fe = Date.now(), xe = C[U];
|
19171
|
-
S || (S = fe), I[
|
19171
|
+
S || (S = fe), I[L] = pe, C[L] = fe;
|
19172
19172
|
let oe = U, ae = 0;
|
19173
|
-
for (; oe !==
|
19173
|
+
for (; oe !== L; )
|
19174
19174
|
ae += I[oe++], oe = oe % f;
|
19175
|
-
if (
|
19175
|
+
if (L = (L + 1) % f, L === U && (U = (U + 1) % f), fe - S < x)
|
19176
19176
|
return;
|
19177
19177
|
const ut = xe && fe - xe;
|
19178
19178
|
return ut ? Math.round(ae * 1e3 / ut) : void 0;
|
19179
19179
|
};
|
19180
19180
|
}
|
19181
19181
|
function g_(f, x) {
|
19182
|
-
let I = 0, C = 1e3 / x,
|
19182
|
+
let I = 0, C = 1e3 / x, L, U;
|
19183
19183
|
const S = (fe, xe = Date.now()) => {
|
19184
|
-
I = xe,
|
19184
|
+
I = xe, L = null, U && (clearTimeout(U), U = null), f.apply(null, fe);
|
19185
19185
|
};
|
19186
19186
|
return [(...fe) => {
|
19187
19187
|
const xe = Date.now(), oe = xe - I;
|
19188
|
-
oe >= C ? S(fe, xe) : (
|
19189
|
-
U = null, S(
|
19188
|
+
oe >= C ? S(fe, xe) : (L = fe, U || (U = setTimeout(() => {
|
19189
|
+
U = null, S(L);
|
19190
19190
|
}, C - oe)));
|
19191
|
-
}, () =>
|
19191
|
+
}, () => L && S(L)];
|
19192
19192
|
}
|
19193
19193
|
const Ac = (f, x, I = 3) => {
|
19194
19194
|
let C = 0;
|
19195
|
-
const
|
19195
|
+
const L = m_(50, 250);
|
19196
19196
|
return g_((U) => {
|
19197
|
-
const S = U.loaded, c = U.lengthComputable ? U.total : void 0, pe = S - C, fe =
|
19197
|
+
const S = U.loaded, c = U.lengthComputable ? U.total : void 0, pe = S - C, fe = L(pe), xe = S <= c;
|
19198
19198
|
C = S;
|
19199
19199
|
const oe = {
|
19200
19200
|
loaded: S,
|
@@ -19222,7 +19222,7 @@ const Ac = (f, x, I = 3) => {
|
|
19222
19222
|
function() {
|
19223
19223
|
const x = /(msie|trident)/i.test(navigator.userAgent), I = document.createElement("a");
|
19224
19224
|
let C;
|
19225
|
-
function
|
19225
|
+
function L(U) {
|
19226
19226
|
let S = U;
|
19227
19227
|
return x && (I.setAttribute("href", S), S = I.href), I.setAttribute("href", S), {
|
19228
19228
|
href: I.href,
|
@@ -19235,8 +19235,8 @@ const Ac = (f, x, I = 3) => {
|
|
19235
19235
|
pathname: I.pathname.charAt(0) === "/" ? I.pathname : "/" + I.pathname
|
19236
19236
|
};
|
19237
19237
|
}
|
19238
|
-
return C =
|
19239
|
-
const c = me.isString(S) ?
|
19238
|
+
return C = L(window.location.href), function(S) {
|
19239
|
+
const c = me.isString(S) ? L(S) : S;
|
19240
19240
|
return c.protocol === C.protocol && c.host === C.host;
|
19241
19241
|
};
|
19242
19242
|
}()
|
@@ -19250,9 +19250,9 @@ const Ac = (f, x, I = 3) => {
|
|
19250
19250
|
), y_ = qr.hasStandardBrowserEnv ? (
|
19251
19251
|
// Standard browser envs support document.cookie
|
19252
19252
|
{
|
19253
|
-
write(f, x, I, C,
|
19253
|
+
write(f, x, I, C, L, U) {
|
19254
19254
|
const S = [f + "=" + encodeURIComponent(x)];
|
19255
|
-
me.isNumber(I) && S.push("expires=" + new Date(I).toGMTString()), me.isString(C) && S.push("path=" + C), me.isString(
|
19255
|
+
me.isNumber(I) && S.push("expires=" + new Date(I).toGMTString()), me.isString(C) && S.push("path=" + C), me.isString(L) && S.push("domain=" + L), U === !0 && S.push("secure"), document.cookie = S.join("; ");
|
19256
19256
|
},
|
19257
19257
|
read(f) {
|
19258
19258
|
const x = document.cookie.match(new RegExp("(^|;\\s*)(" + f + ")=([^;]*)"));
|
@@ -19290,7 +19290,7 @@ function Xs(f, x) {
|
|
19290
19290
|
function C(fe, xe, oe) {
|
19291
19291
|
return me.isPlainObject(fe) && me.isPlainObject(xe) ? me.merge.call({ caseless: oe }, fe, xe) : me.isPlainObject(xe) ? me.merge({}, xe) : me.isArray(xe) ? xe.slice() : xe;
|
19292
19292
|
}
|
19293
|
-
function
|
19293
|
+
function L(fe, xe, oe) {
|
19294
19294
|
if (me.isUndefined(xe)) {
|
19295
19295
|
if (!me.isUndefined(fe))
|
19296
19296
|
return C(void 0, fe, oe);
|
@@ -19341,16 +19341,16 @@ function Xs(f, x) {
|
|
19341
19341
|
socketPath: S,
|
19342
19342
|
responseEncoding: S,
|
19343
19343
|
validateStatus: c,
|
19344
|
-
headers: (fe, xe) =>
|
19344
|
+
headers: (fe, xe) => L(ap(fe), ap(xe), !0)
|
19345
19345
|
};
|
19346
19346
|
return me.forEach(Object.keys(Object.assign({}, f, x)), function(xe) {
|
19347
|
-
const oe = pe[xe] ||
|
19347
|
+
const oe = pe[xe] || L, ae = oe(f[xe], x[xe], xe);
|
19348
19348
|
me.isUndefined(ae) && oe !== c || (I[xe] = ae);
|
19349
19349
|
}), I;
|
19350
19350
|
}
|
19351
19351
|
const $p = (f) => {
|
19352
19352
|
const x = Xs({}, f);
|
19353
|
-
let { data: I, withXSRFToken: C, xsrfHeaderName:
|
19353
|
+
let { data: I, withXSRFToken: C, xsrfHeaderName: L, xsrfCookieName: U, headers: S, auth: c } = x;
|
19354
19354
|
x.headers = S = rr.from(S), x.url = Rp(Np(x.baseURL, x.url), f.params, f.paramsSerializer), c && S.set(
|
19355
19355
|
"Authorization",
|
19356
19356
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
@@ -19365,21 +19365,21 @@ const $p = (f) => {
|
|
19365
19365
|
}
|
19366
19366
|
}
|
19367
19367
|
if (qr.hasStandardBrowserEnv && (C && me.isFunction(C) && (C = C(x)), C || C !== !1 && __(x.url))) {
|
19368
|
-
const fe =
|
19369
|
-
fe && S.set(
|
19368
|
+
const fe = L && U && y_.read(U);
|
19369
|
+
fe && S.set(L, fe);
|
19370
19370
|
}
|
19371
19371
|
return x;
|
19372
19372
|
}, b_ = typeof XMLHttpRequest < "u", w_ = b_ && function(f) {
|
19373
19373
|
return new Promise(function(I, C) {
|
19374
|
-
const
|
19375
|
-
let U =
|
19376
|
-
const S = rr.from(
|
19377
|
-
let { responseType: c, onUploadProgress: pe, onDownloadProgress: fe } =
|
19374
|
+
const L = $p(f);
|
19375
|
+
let U = L.data;
|
19376
|
+
const S = rr.from(L.headers).normalize();
|
19377
|
+
let { responseType: c, onUploadProgress: pe, onDownloadProgress: fe } = L, xe, oe, ae, ut, $e;
|
19378
19378
|
function Ke() {
|
19379
|
-
ut && ut(), $e && $e(),
|
19379
|
+
ut && ut(), $e && $e(), L.cancelToken && L.cancelToken.unsubscribe(xe), L.signal && L.signal.removeEventListener("abort", xe);
|
19380
19380
|
}
|
19381
19381
|
let Oe = new XMLHttpRequest();
|
19382
|
-
Oe.open(
|
19382
|
+
Oe.open(L.method.toUpperCase(), L.url, !0), Oe.timeout = L.timeout;
|
19383
19383
|
function gt() {
|
19384
19384
|
if (!Oe)
|
19385
19385
|
return;
|
@@ -19406,9 +19406,9 @@ const $p = (f) => {
|
|
19406
19406
|
}, Oe.onerror = function() {
|
19407
19407
|
C(new ht("Network Error", ht.ERR_NETWORK, f, Oe)), Oe = null;
|
19408
19408
|
}, Oe.ontimeout = function() {
|
19409
|
-
let Vt =
|
19410
|
-
const Tt =
|
19411
|
-
|
19409
|
+
let Vt = L.timeout ? "timeout of " + L.timeout + "ms exceeded" : "timeout exceeded";
|
19410
|
+
const Tt = L.transitional || Bp;
|
19411
|
+
L.timeoutErrorMessage && (Vt = L.timeoutErrorMessage), C(new ht(
|
19412
19412
|
Vt,
|
19413
19413
|
Tt.clarifyTimeoutError ? ht.ETIMEDOUT : ht.ECONNABORTED,
|
19414
19414
|
f,
|
@@ -19416,10 +19416,10 @@ const $p = (f) => {
|
|
19416
19416
|
)), Oe = null;
|
19417
19417
|
}, U === void 0 && S.setContentType(null), "setRequestHeader" in Oe && me.forEach(S.toJSON(), function(Vt, Tt) {
|
19418
19418
|
Oe.setRequestHeader(Tt, Vt);
|
19419
|
-
}), me.isUndefined(
|
19419
|
+
}), me.isUndefined(L.withCredentials) || (Oe.withCredentials = !!L.withCredentials), c && c !== "json" && (Oe.responseType = L.responseType), fe && ([ae, $e] = Ac(fe, !0), Oe.addEventListener("progress", ae)), pe && Oe.upload && ([oe, ut] = Ac(pe), Oe.upload.addEventListener("progress", oe), Oe.upload.addEventListener("loadend", ut)), (L.cancelToken || L.signal) && (xe = (He) => {
|
19420
19420
|
Oe && (C(!He || He.type ? new Yo(null, f, Oe) : He), Oe.abort(), Oe = null);
|
19421
|
-
},
|
19422
|
-
const ot = f_(
|
19421
|
+
}, L.cancelToken && L.cancelToken.subscribe(xe), L.signal && (L.signal.aborted ? xe() : L.signal.addEventListener("abort", xe)));
|
19422
|
+
const ot = f_(L.url);
|
19423
19423
|
if (ot && qr.protocols.indexOf(ot) === -1) {
|
19424
19424
|
C(new ht("Unsupported protocol " + ot + ":", ht.ERR_BAD_REQUEST, f));
|
19425
19425
|
return;
|
@@ -19428,7 +19428,7 @@ const $p = (f) => {
|
|
19428
19428
|
});
|
19429
19429
|
}, S_ = (f, x) => {
|
19430
19430
|
let I = new AbortController(), C;
|
19431
|
-
const
|
19431
|
+
const L = function(pe) {
|
19432
19432
|
if (!C) {
|
19433
19433
|
C = !0, S();
|
19434
19434
|
const fe = pe instanceof Error ? pe : this.reason;
|
@@ -19436,14 +19436,14 @@ const $p = (f) => {
|
|
19436
19436
|
}
|
19437
19437
|
};
|
19438
19438
|
let U = x && setTimeout(() => {
|
19439
|
-
|
19439
|
+
L(new ht(`timeout ${x} of ms exceeded`, ht.ETIMEDOUT));
|
19440
19440
|
}, x);
|
19441
19441
|
const S = () => {
|
19442
19442
|
f && (U && clearTimeout(U), U = null, f.forEach((pe) => {
|
19443
|
-
pe && (pe.removeEventListener ? pe.removeEventListener("abort",
|
19443
|
+
pe && (pe.removeEventListener ? pe.removeEventListener("abort", L) : pe.unsubscribe(L));
|
19444
19444
|
}), f = null);
|
19445
19445
|
};
|
19446
|
-
f.forEach((pe) => pe && pe.addEventListener && pe.addEventListener("abort",
|
19446
|
+
f.forEach((pe) => pe && pe.addEventListener && pe.addEventListener("abort", L));
|
19447
19447
|
const { signal: c } = I;
|
19448
19448
|
return c.unsubscribe = S, [c, () => {
|
19449
19449
|
U && clearTimeout(U), U = null;
|
@@ -19454,14 +19454,14 @@ const $p = (f) => {
|
|
19454
19454
|
yield f;
|
19455
19455
|
return;
|
19456
19456
|
}
|
19457
|
-
let C = 0,
|
19457
|
+
let C = 0, L;
|
19458
19458
|
for (; C < I; )
|
19459
|
-
|
19459
|
+
L = C + x, yield f.slice(C, L), C = L;
|
19460
19460
|
}, I_ = async function* (f, x, I) {
|
19461
19461
|
for await (const C of f)
|
19462
19462
|
yield* T_(ArrayBuffer.isView(C) ? C : await I(String(C)), x);
|
19463
|
-
}, lp = (f, x, I, C,
|
19464
|
-
const U = I_(f, x,
|
19463
|
+
}, lp = (f, x, I, C, L) => {
|
19464
|
+
const U = I_(f, x, L);
|
19465
19465
|
let S = 0, c, pe = (fe) => {
|
19466
19466
|
c || (c = !0, C && C(fe));
|
19467
19467
|
};
|
@@ -19534,7 +19534,7 @@ const P_ = async (f) => {
|
|
19534
19534
|
url: x,
|
19535
19535
|
method: I,
|
19536
19536
|
data: C,
|
19537
|
-
signal:
|
19537
|
+
signal: L,
|
19538
19538
|
cancelToken: U,
|
19539
19539
|
timeout: S,
|
19540
19540
|
onDownloadProgress: c,
|
@@ -19545,7 +19545,7 @@ const P_ = async (f) => {
|
|
19545
19545
|
fetchOptions: ae
|
19546
19546
|
} = $p(f);
|
19547
19547
|
fe = fe ? (fe + "").toLowerCase() : "text";
|
19548
|
-
let [ut, $e] =
|
19548
|
+
let [ut, $e] = L || U || S ? S_([L, U], S) : [], Ke, Oe;
|
19549
19549
|
const gt = () => {
|
19550
19550
|
!Ke && setTimeout(() => {
|
19551
19551
|
ut && ut.unsubscribe();
|
@@ -19633,7 +19633,7 @@ const hp = (f) => `- ${f}`, E_ = (f) => me.isFunction(f) || f === null || f ===
|
|
19633
19633
|
f = me.isArray(f) ? f : [f];
|
19634
19634
|
const { length: x } = f;
|
19635
19635
|
let I, C;
|
19636
|
-
const
|
19636
|
+
const L = {};
|
19637
19637
|
for (let U = 0; U < x; U++) {
|
19638
19638
|
I = f[U];
|
19639
19639
|
let S;
|
@@ -19641,10 +19641,10 @@ const hp = (f) => `- ${f}`, E_ = (f) => me.isFunction(f) || f === null || f ===
|
|
19641
19641
|
throw new ht(`Unknown adapter '${S}'`);
|
19642
19642
|
if (C)
|
19643
19643
|
break;
|
19644
|
-
|
19644
|
+
L[S || "#" + U] = C;
|
19645
19645
|
}
|
19646
19646
|
if (!C) {
|
19647
|
-
const U = Object.entries(
|
19647
|
+
const U = Object.entries(L).map(
|
19648
19648
|
([c, pe]) => `adapter ${c} ` + (pe === !1 ? "is not supported by the environment" : "is not available in the build")
|
19649
19649
|
);
|
19650
19650
|
let S = x ? U.length > 1 ? `since :
|
@@ -19689,17 +19689,17 @@ const Zp = "1.7.4", au = {};
|
|
19689
19689
|
});
|
19690
19690
|
const dp = {};
|
19691
19691
|
au.transitional = function(x, I, C) {
|
19692
|
-
function
|
19692
|
+
function L(U, S) {
|
19693
19693
|
return "[Axios v" + Zp + "] Transitional option '" + U + "'" + S + (C ? ". " + C : "");
|
19694
19694
|
}
|
19695
19695
|
return (U, S, c) => {
|
19696
19696
|
if (x === !1)
|
19697
19697
|
throw new ht(
|
19698
|
-
|
19698
|
+
L(S, " has been removed" + (I ? " in " + I : "")),
|
19699
19699
|
ht.ERR_DEPRECATED
|
19700
19700
|
);
|
19701
19701
|
return I && !dp[S] && (dp[S] = !0, console.warn(
|
19702
|
-
|
19702
|
+
L(
|
19703
19703
|
S,
|
19704
19704
|
" has been deprecated since v" + I + " and will be removed in the near future"
|
19705
19705
|
)
|
@@ -19710,9 +19710,9 @@ function M_(f, x, I) {
|
|
19710
19710
|
if (typeof f != "object")
|
19711
19711
|
throw new ht("options must be an object", ht.ERR_BAD_OPTION_VALUE);
|
19712
19712
|
const C = Object.keys(f);
|
19713
|
-
let
|
19714
|
-
for (;
|
19715
|
-
const U = C[
|
19713
|
+
let L = C.length;
|
19714
|
+
for (; L-- > 0; ) {
|
19715
|
+
const U = C[L], S = x[U];
|
19716
19716
|
if (S) {
|
19717
19717
|
const c = f[U], pe = c === void 0 || S(c, U, f);
|
19718
19718
|
if (pe !== !0)
|
@@ -19747,9 +19747,9 @@ class Gs {
|
|
19747
19747
|
return await this._request(x, I);
|
19748
19748
|
} catch (C) {
|
19749
19749
|
if (C instanceof Error) {
|
19750
|
-
let
|
19751
|
-
Error.captureStackTrace ? Error.captureStackTrace(
|
19752
|
-
const U =
|
19750
|
+
let L;
|
19751
|
+
Error.captureStackTrace ? Error.captureStackTrace(L = {}) : L = new Error();
|
19752
|
+
const U = L.stack ? L.stack.replace(/^.+\n/, "") : "";
|
19753
19753
|
try {
|
19754
19754
|
C.stack ? U && !String(C.stack).endsWith(U.replace(/^.+\n.+\n/, "")) && (C.stack += `
|
19755
19755
|
` + U) : C.stack = U;
|
@@ -19761,14 +19761,14 @@ class Gs {
|
|
19761
19761
|
}
|
19762
19762
|
_request(x, I) {
|
19763
19763
|
typeof x == "string" ? (I = I || {}, I.url = x) : I = x || {}, I = Xs(this.defaults, I);
|
19764
|
-
const { transitional: C, paramsSerializer:
|
19764
|
+
const { transitional: C, paramsSerializer: L, headers: U } = I;
|
19765
19765
|
C !== void 0 && iu.assertOptions(C, {
|
19766
19766
|
silentJSONParsing: os.transitional(os.boolean),
|
19767
19767
|
forcedJSONParsing: os.transitional(os.boolean),
|
19768
19768
|
clarifyTimeoutError: os.transitional(os.boolean)
|
19769
|
-
}, !1),
|
19770
|
-
serialize:
|
19771
|
-
} : iu.assertOptions(
|
19769
|
+
}, !1), L != null && (me.isFunction(L) ? I.paramsSerializer = {
|
19770
|
+
serialize: L
|
19771
|
+
} : iu.assertOptions(L, {
|
19772
19772
|
encode: os.function,
|
19773
19773
|
serialize: os.function
|
19774
19774
|
}, !0)), I.method = (I.method || this.defaults.method || "get").toLowerCase();
|
@@ -19857,17 +19857,17 @@ class lu {
|
|
19857
19857
|
I = U;
|
19858
19858
|
});
|
19859
19859
|
const C = this;
|
19860
|
-
this.promise.then((
|
19860
|
+
this.promise.then((L) => {
|
19861
19861
|
if (!C._listeners) return;
|
19862
19862
|
let U = C._listeners.length;
|
19863
19863
|
for (; U-- > 0; )
|
19864
|
-
C._listeners[U](
|
19864
|
+
C._listeners[U](L);
|
19865
19865
|
C._listeners = null;
|
19866
|
-
}), this.promise.then = (
|
19866
|
+
}), this.promise.then = (L) => {
|
19867
19867
|
let U;
|
19868
19868
|
const S = new Promise((c) => {
|
19869
19869
|
C.subscribe(c), U = c;
|
19870
|
-
}).then(
|
19870
|
+
}).then(L);
|
19871
19871
|
return S.cancel = function() {
|
19872
19872
|
C.unsubscribe(U);
|
19873
19873
|
}, S;
|
@@ -19908,8 +19908,8 @@ class lu {
|
|
19908
19908
|
static source() {
|
19909
19909
|
let x;
|
19910
19910
|
return {
|
19911
|
-
token: new lu(function(
|
19912
|
-
x =
|
19911
|
+
token: new lu(function(L) {
|
19912
|
+
x = L;
|
19913
19913
|
}),
|
19914
19914
|
cancel: x
|
19915
19915
|
};
|
@@ -19993,8 +19993,8 @@ Object.entries(ru).forEach(([f, x]) => {
|
|
19993
19993
|
});
|
19994
19994
|
function Gp(f) {
|
19995
19995
|
const x = new Gs(f), I = Sp(Gs.prototype.request, x);
|
19996
|
-
return me.extend(I, Gs.prototype, x, { allOwnKeys: !0 }), me.extend(I, x, null, { allOwnKeys: !0 }), I.create = function(
|
19997
|
-
return Gp(Xs(f,
|
19996
|
+
return me.extend(I, Gs.prototype, x, { allOwnKeys: !0 }), me.extend(I, x, null, { allOwnKeys: !0 }), I.create = function(L) {
|
19997
|
+
return Gp(Xs(f, L));
|
19998
19998
|
}, I;
|
19999
19999
|
}
|
20000
20000
|
const Xt = Gp(xl);
|
@@ -20019,9 +20019,9 @@ Xt.HttpStatusCode = ru;
|
|
20019
20019
|
Xt.default = Xt;
|
20020
20020
|
const D_ = (f, x = 300) => {
|
20021
20021
|
let I;
|
20022
|
-
return function(...
|
20022
|
+
return function(...L) {
|
20023
20023
|
clearTimeout(I), I = setTimeout(() => {
|
20024
|
-
f.apply(this,
|
20024
|
+
f.apply(this, L);
|
20025
20025
|
}, x);
|
20026
20026
|
};
|
20027
20027
|
};
|
@@ -20044,15 +20044,15 @@ function Hp(f, x, I = {}) {
|
|
20044
20044
|
}, x, I);
|
20045
20045
|
}
|
20046
20046
|
function pp(f, x, I = {}) {
|
20047
|
-
for (const
|
20048
|
-
if (
|
20047
|
+
for (const L of f) {
|
20048
|
+
if (L.length < 4)
|
20049
20049
|
throw new Error(
|
20050
20050
|
"Each LinearRing of a Polygon must have 4 or more Positions."
|
20051
20051
|
);
|
20052
|
-
if (
|
20052
|
+
if (L[L.length - 1].length !== L[0].length)
|
20053
20053
|
throw new Error("First and last Position are not equivalent.");
|
20054
|
-
for (let U = 0; U <
|
20055
|
-
if (
|
20054
|
+
for (let U = 0; U < L[L.length - 1].length; U++)
|
20055
|
+
if (L[L.length - 1][U] !== L[0][U])
|
20056
20056
|
throw new Error("First and last Position are not equivalent.");
|
20057
20057
|
}
|
20058
20058
|
return Rc({
|
@@ -20077,7 +20077,7 @@ function gp(f) {
|
|
20077
20077
|
}
|
20078
20078
|
function cu(f, x, I) {
|
20079
20079
|
if (f !== null)
|
20080
|
-
for (var C,
|
20080
|
+
for (var C, L, U, S, c, pe, fe, xe = 0, oe = 0, ae, ut = f.type, $e = ut === "FeatureCollection", Ke = ut === "Feature", Oe = $e ? f.features.length : 1, gt = 0; gt < Oe; gt++) {
|
20081
20081
|
fe = $e ? f.features[gt].geometry : Ke ? f.geometry : f, ae = fe ? fe.type === "GeometryCollection" : !1, c = ae ? fe.geometries.length : 1;
|
20082
20082
|
for (var ot = 0; ot < c; ot++) {
|
20083
20083
|
var He = 0, Vt = 0;
|
@@ -20116,9 +20116,9 @@ function cu(f, x, I) {
|
|
20116
20116
|
case "Polygon":
|
20117
20117
|
case "MultiLineString":
|
20118
20118
|
for (C = 0; C < pe.length; C++) {
|
20119
|
-
for (
|
20119
|
+
for (L = 0; L < pe[C].length - xe; L++) {
|
20120
20120
|
if (x(
|
20121
|
-
pe[C][
|
20121
|
+
pe[C][L],
|
20122
20122
|
oe,
|
20123
20123
|
gt,
|
20124
20124
|
He,
|
@@ -20133,10 +20133,10 @@ function cu(f, x, I) {
|
|
20133
20133
|
break;
|
20134
20134
|
case "MultiPolygon":
|
20135
20135
|
for (C = 0; C < pe.length; C++) {
|
20136
|
-
for (Vt = 0,
|
20137
|
-
for (U = 0; U < pe[C][
|
20136
|
+
for (Vt = 0, L = 0; L < pe[C].length; L++) {
|
20137
|
+
for (U = 0; U < pe[C][L].length - xe; U++) {
|
20138
20138
|
if (x(
|
20139
|
-
pe[C][
|
20139
|
+
pe[C][L][U],
|
20140
20140
|
oe,
|
20141
20141
|
gt,
|
20142
20142
|
He,
|
@@ -20171,18 +20171,18 @@ function ml(f, x = {}) {
|
|
20171
20171
|
}), I;
|
20172
20172
|
}
|
20173
20173
|
function R_(f, x = {}) {
|
20174
|
-
const I = ml(f), C = (I[0] + I[2]) / 2,
|
20175
|
-
return Hp([C,
|
20174
|
+
const I = ml(f), C = (I[0] + I[2]) / 2, L = (I[1] + I[3]) / 2;
|
20175
|
+
return Hp([C, L], x.properties, x);
|
20176
20176
|
}
|
20177
20177
|
function B_(f, x = {}) {
|
20178
|
-
let I = 0, C = 0,
|
20178
|
+
let I = 0, C = 0, L = 0;
|
20179
20179
|
return cu(
|
20180
20180
|
f,
|
20181
20181
|
function(U) {
|
20182
|
-
I += U[0], C += U[1],
|
20182
|
+
I += U[0], C += U[1], L++;
|
20183
20183
|
},
|
20184
20184
|
!0
|
20185
|
-
), Hp([I /
|
20185
|
+
), Hp([I / L, C / L], x.properties);
|
20186
20186
|
}
|
20187
20187
|
const F_ = {
|
20188
20188
|
mixins: [_l],
|
@@ -20248,7 +20248,7 @@ const F_ = {
|
|
20248
20248
|
}
|
20249
20249
|
}
|
20250
20250
|
}, O_ = { class: "vs-map-slot-layers z-10 select-none" }, V_ = ["onClick"], N_ = ["src"];
|
20251
|
-
function $_(f, x, I, C,
|
20251
|
+
function $_(f, x, I, C, L, U) {
|
20252
20252
|
return it(), mt("div", O_, [
|
20253
20253
|
(it(!0), mt(ls, null, Wo(I.baseLayers, (S, c) => (it(), mt("div", {
|
20254
20254
|
key: S.id,
|
@@ -20343,22 +20343,22 @@ const iy = /* @__PURE__ */ Ji(X_, [["render", ty]]), ry = {
|
|
20343
20343
|
},
|
20344
20344
|
methods: {
|
20345
20345
|
async handleLayerChange(f, x) {
|
20346
|
-
await this.setVisible(f, x), x && this.map.getStyle().layers.filter((
|
20347
|
-
this.map.getLayer(
|
20346
|
+
await this.setVisible(f, x), x && this.map.getStyle().layers.filter((L) => !this.basemapIds.includes(L.id) && L.id !== f.id).map((L) => L.id).forEach((L) => {
|
20347
|
+
this.map.getLayer(L) && this.map.moveLayer(L);
|
20348
20348
|
});
|
20349
20349
|
}
|
20350
20350
|
}
|
20351
20351
|
}, ny = (f) => (yp("data-v-4c33eaa0"), f = f(), xp(), f), sy = { class: "p-[10px]" }, oy = { class: "select-none absolute left-[20px] top-[10px] border bg-white max-w-[250px] p-[10px] rounded-lg z-10" }, ay = { class: "flex justify-between items-center border-b pb-[8px] text-[16px]" }, ly = /* @__PURE__ */ ny(() => /* @__PURE__ */ Re("span", null, "Додаткові шари", -1)), cy = { class: "mt-2 max-h-[300px] overflow-auto [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent" }, hy = ["id", "value", "onChange"], uy = ["for"];
|
20352
|
-
function dy(f, x, I, C,
|
20352
|
+
function dy(f, x, I, C, L, U) {
|
20353
20353
|
const S = ii("layersIcon"), c = ii("VsPopover"), pe = ii("closeIcon");
|
20354
20354
|
return it(), mt(ls, null, [
|
20355
|
-
!
|
20355
|
+
!L.isOpen && L.mounted ? (it(), ir(c, {
|
20356
20356
|
key: 0,
|
20357
20357
|
teleport: "body",
|
20358
20358
|
trigger: "hover",
|
20359
20359
|
placement: "right",
|
20360
20360
|
class: "select-none flex absolute left-[20px] top-[10px] border bg-white max-w-[250px] rounded-lg cursor-pointer z-10",
|
20361
|
-
onClick: x[0] || (x[0] = (fe) =>
|
20361
|
+
onClick: x[0] || (x[0] = (fe) => L.isOpen = !L.isOpen)
|
20362
20362
|
}, {
|
20363
20363
|
reference: _r(() => [
|
20364
20364
|
Re("div", sy, [
|
@@ -20373,7 +20373,7 @@ function dy(f, x, I, C, z, U) {
|
|
20373
20373
|
Hs(Re("div", oy, [
|
20374
20374
|
Re("div", ay, [
|
20375
20375
|
ly,
|
20376
|
-
|
20376
|
+
L.mounted ? (it(), ir(c, {
|
20377
20377
|
key: 0,
|
20378
20378
|
teleport: "body",
|
20379
20379
|
trigger: "hover",
|
@@ -20384,7 +20384,7 @@ function dy(f, x, I, C, z, U) {
|
|
20384
20384
|
Re("button", {
|
20385
20385
|
type: "button",
|
20386
20386
|
class: "size-6 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600",
|
20387
|
-
onClick: x[1] || (x[1] = (fe) =>
|
20387
|
+
onClick: x[1] || (x[1] = (fe) => L.isOpen = !L.isOpen)
|
20388
20388
|
}, [
|
20389
20389
|
tr(pe)
|
20390
20390
|
])
|
@@ -20413,10 +20413,10 @@ function dy(f, x, I, C, z, U) {
|
|
20413
20413
|
}, Mr(fe.name), 9, uy)
|
20414
20414
|
]))), 128))
|
20415
20415
|
], 512), [
|
20416
|
-
[Jo,
|
20416
|
+
[Jo, L.isOpen]
|
20417
20417
|
])
|
20418
20418
|
], 512), [
|
20419
|
-
[Jo,
|
20419
|
+
[Jo, L.isOpen]
|
20420
20420
|
])
|
20421
20421
|
], 64);
|
20422
20422
|
}
|
@@ -20446,9 +20446,9 @@ const py = /* @__PURE__ */ Ji(ry, [["render", dy], ["__scopeId", "data-v-4c33eaa
|
|
20446
20446
|
},
|
20447
20447
|
watch: {
|
20448
20448
|
async currentLayer(f, x) {
|
20449
|
-
const I = this.compareLayers.find((
|
20450
|
-
I && await this.setVisible(I, !1, this.map), C && await this.setVisible(C, !0, this.map), this.map.getStyle().layers.forEach((
|
20451
|
-
|
20449
|
+
const I = this.compareLayers.find((L) => L.id === x), C = this.compareLayers.find((L) => L.id === f);
|
20450
|
+
I && await this.setVisible(I, !1, this.map), C && await this.setVisible(C, !0, this.map), this.map.getStyle().layers.forEach((L) => {
|
20451
|
+
L.source === this.table && this.map.getLayer(L.id) && this.map.moveLayer(L.id);
|
20452
20452
|
});
|
20453
20453
|
}
|
20454
20454
|
}
|
@@ -20456,13 +20456,13 @@ const py = /* @__PURE__ */ Ji(ry, [["render", dy], ["__scopeId", "data-v-4c33eaa
|
|
20456
20456
|
type: "button",
|
20457
20457
|
class: "size-6 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600"
|
20458
20458
|
}, " - ", -1), vy = { class: "pt-1 max-h-[300px] overflow-auto [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent" }, by = ["id", "name", "value"], wy = ["for"];
|
20459
|
-
function Sy(f, x, I, C,
|
20459
|
+
function Sy(f, x, I, C, L, U) {
|
20460
20460
|
const S = ii("VsPopover"), c = ii("closeIcon");
|
20461
20461
|
return Hs((it(), mt("div", my, [
|
20462
20462
|
Re("div", gy, [
|
20463
20463
|
_y,
|
20464
20464
|
Re("div", yy, [
|
20465
|
-
|
20465
|
+
L.mounted ? (it(), ir(S, {
|
20466
20466
|
key: 0,
|
20467
20467
|
trigger: "hover",
|
20468
20468
|
placement: "bottom",
|
@@ -20477,7 +20477,7 @@ function Sy(f, x, I, C, z, U) {
|
|
20477
20477
|
]),
|
20478
20478
|
_: 1
|
20479
20479
|
})) : oi("", !0),
|
20480
|
-
|
20480
|
+
L.mounted ? (it(), ir(S, {
|
20481
20481
|
key: 1,
|
20482
20482
|
trigger: "hover",
|
20483
20483
|
placement: "bottom",
|
@@ -20509,10 +20509,10 @@ function Sy(f, x, I, C, z, U) {
|
|
20509
20509
|
id: pe.id,
|
20510
20510
|
name: pe.id,
|
20511
20511
|
value: pe.id,
|
20512
|
-
"onUpdate:modelValue": x[2] || (x[2] = (fe) =>
|
20512
|
+
"onUpdate:modelValue": x[2] || (x[2] = (fe) => L.currentLayer = fe),
|
20513
20513
|
class: "shrink-0 border-gray-200 rounded-full text-blue-600 focus:ring-blue-500 checked:border-blue-500 dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800"
|
20514
20514
|
}, null, 8, by), [
|
20515
|
-
[jm,
|
20515
|
+
[jm, L.currentLayer]
|
20516
20516
|
]),
|
20517
20517
|
Re("label", {
|
20518
20518
|
for: pe.id,
|
@@ -20553,7 +20553,7 @@ const Ty = /* @__PURE__ */ Ji(fy, [["render", Sy]]), Iy = {}, ky = {
|
|
20553
20553
|
Ay,
|
20554
20554
|
Cy
|
20555
20555
|
];
|
20556
|
-
function My(f, x, I, C,
|
20556
|
+
function My(f, x, I, C, L, U) {
|
20557
20557
|
return it(), mt("svg", ky, Ey);
|
20558
20558
|
}
|
20559
20559
|
const zy = /* @__PURE__ */ Ji(Iy, [["render", My]]), Ly = {
|
@@ -20662,9 +20662,9 @@ const zy = /* @__PURE__ */ Ji(Iy, [["render", My]]), Ly = {
|
|
20662
20662
|
this.table,
|
20663
20663
|
f.getStyle().sources[this.table]
|
20664
20664
|
));
|
20665
|
-
const C = f.getStyle().layers.filter((
|
20666
|
-
C.length && C.forEach((
|
20667
|
-
x.getLayer(
|
20665
|
+
const C = f.getStyle().layers.filter((L) => L.source === this.table);
|
20666
|
+
C.length && C.forEach((L) => {
|
20667
|
+
x.getLayer(L.id) || x.addLayer(L);
|
20668
20668
|
});
|
20669
20669
|
}
|
20670
20670
|
}
|
@@ -20678,10 +20678,10 @@ const zy = /* @__PURE__ */ Ji(Iy, [["render", My]]), Ly = {
|
|
20678
20678
|
}, null, -1), Fy = [
|
20679
20679
|
By
|
20680
20680
|
];
|
20681
|
-
function Oy(f, x, I, C,
|
20681
|
+
function Oy(f, x, I, C, L, U) {
|
20682
20682
|
const S = ii("compareIcon"), c = ii("VsPopover"), pe = ii("CompareBaseLayers");
|
20683
20683
|
return it(), mt(ls, null, [
|
20684
|
-
|
20684
|
+
L.mounted ? (it(), ir(c, {
|
20685
20685
|
key: 0,
|
20686
20686
|
teleport: "body",
|
20687
20687
|
trigger: "hover",
|
@@ -20700,16 +20700,16 @@ function Oy(f, x, I, C, z, U) {
|
|
20700
20700
|
]),
|
20701
20701
|
_: 1
|
20702
20702
|
}, 8, ["class", "onClick"])) : oi("", !0),
|
20703
|
-
|
20703
|
+
L.isOpen && L.afterMapLoaded ? (it(), ir(pe, {
|
20704
20704
|
key: 1,
|
20705
20705
|
table: I.table,
|
20706
|
-
map:
|
20706
|
+
map: L.afterMap,
|
20707
20707
|
compareLayers: I.compareLayers,
|
20708
20708
|
onClose: U.destroyCompare,
|
20709
|
-
collapsed:
|
20710
|
-
"onUpdate:collapsed": x[0] || (x[0] = (fe) =>
|
20709
|
+
collapsed: L.collapsed,
|
20710
|
+
"onUpdate:collapsed": x[0] || (x[0] = (fe) => L.collapsed = fe)
|
20711
20711
|
}, null, 8, ["table", "map", "compareLayers", "onClose", "collapsed"])) : oi("", !0),
|
20712
|
-
|
20712
|
+
L.isOpen ? (it(), mt("div", Ry, Fy)) : oi("", !0)
|
20713
20713
|
], 64);
|
20714
20714
|
}
|
20715
20715
|
const Vy = /* @__PURE__ */ Ji(Ly, [["render", Oy]]), Ny = {
|
@@ -20726,7 +20726,7 @@ const Vy = /* @__PURE__ */ Ji(Ly, [["render", Oy]]), Ny = {
|
|
20726
20726
|
key: 0,
|
20727
20727
|
class: "flex justify-start items-center gap-2"
|
20728
20728
|
}, Wy = { class: "ml-1 text-[0.875rem]" };
|
20729
|
-
function Xy(f, x, I, C,
|
20729
|
+
function Xy(f, x, I, C, L, U) {
|
20730
20730
|
var S;
|
20731
20731
|
return it(), mt("div", $y, [
|
20732
20732
|
I.title ? (it(), mt("div", Uy, Mr(I.title), 1)) : oi("", !0),
|
@@ -20808,9 +20808,9 @@ const Jy = /* @__PURE__ */ Ji(Ny, [["render", Xy]]), Ky = {
|
|
20808
20808
|
var f, x, I, C;
|
20809
20809
|
try {
|
20810
20810
|
if (await this.createMap(), (f = this.row) != null && f.geom) {
|
20811
|
-
const { type:
|
20811
|
+
const { type: L, coordinates: U } = this.row.geom;
|
20812
20812
|
let S;
|
20813
|
-
switch (
|
20813
|
+
switch (L) {
|
20814
20814
|
case "Polygon":
|
20815
20815
|
S = pp(U);
|
20816
20816
|
break;
|
@@ -20851,11 +20851,11 @@ const Jy = /* @__PURE__ */ Ji(Ny, [["render", Xy]]), Ky = {
|
|
20851
20851
|
f != null && f.geom && this.fitToBounds(f.geom), this.map && this.map.getStyle() && this.map.getStyle().layers.filter(
|
20852
20852
|
(C) => C.source === this.table && C.type === "line"
|
20853
20853
|
).forEach((C) => {
|
20854
|
-
var
|
20854
|
+
var L;
|
20855
20855
|
this.map.setPaintProperty(
|
20856
20856
|
C.id,
|
20857
20857
|
"line-width",
|
20858
|
-
((
|
20858
|
+
((L = this.row) == null ? void 0 : L.id) != null ? [
|
20859
20859
|
"case",
|
20860
20860
|
["==", ["get", "id"], this.row.id.toString()],
|
20861
20861
|
(this.polygonStrokeWidth ?? 2.5) * 2,
|
@@ -20891,10 +20891,10 @@ const Jy = /* @__PURE__ */ Ji(Ny, [["render", Xy]]), Ky = {
|
|
20891
20891
|
const {
|
20892
20892
|
data: { rows: x }
|
20893
20893
|
} = await Xt.get(`/api/data/${this.table}/${this.colorAttr}`), I = x.reduce(
|
20894
|
-
(C,
|
20894
|
+
(C, L, U) => L != null && L.id ? [
|
20895
20895
|
...C,
|
20896
|
-
|
20897
|
-
|
20896
|
+
L.id.toString(),
|
20897
|
+
L.color || f[0][U % 5]
|
20898
20898
|
] : C,
|
20899
20899
|
["match", ["get", this.colorAttr]]
|
20900
20900
|
);
|
@@ -20908,7 +20908,7 @@ const Jy = /* @__PURE__ */ Ji(Ny, [["render", Xy]]), Ky = {
|
|
20908
20908
|
try {
|
20909
20909
|
const {
|
20910
20910
|
data: { rows: f }
|
20911
|
-
} = await Xt.get(`/api/data/${this.table}/${this.strokeAttr}`), x = f.reduce((I, C,
|
20911
|
+
} = await Xt.get(`/api/data/${this.table}/${this.strokeAttr}`), x = f.reduce((I, C, L) => C != null && C.id ? [
|
20912
20912
|
...I,
|
20913
20913
|
{
|
20914
20914
|
id: C.id.toString(),
|
@@ -20928,9 +20928,9 @@ const Jy = /* @__PURE__ */ Ji(Ny, [["render", Xy]]), Ky = {
|
|
20928
20928
|
}
|
20929
20929
|
},
|
20930
20930
|
async handleMapLoad() {
|
20931
|
-
var C,
|
20931
|
+
var C, L, U, S, c;
|
20932
20932
|
(C = this.row) != null && C.geom && this.fitToBounds(this.row.geom), this.$emit("map", this.map);
|
20933
|
-
const f = await this.getStrokeStyle(), x = await this.getColorStyle(), I = ((U = (
|
20933
|
+
const f = await this.getStrokeStyle(), x = await this.getColorStyle(), I = ((U = (L = location.search.split("&").find((pe) => pe.includes("filter="))) == null ? void 0 : L.split("filter=")) == null ? void 0 : U[1]) || "";
|
20934
20934
|
await this.addLayer({
|
20935
20935
|
id: this.table,
|
20936
20936
|
service: "vector",
|
@@ -21034,16 +21034,16 @@ const Jy = /* @__PURE__ */ Ji(Ny, [["render", Xy]]), Ky = {
|
|
21034
21034
|
fitToBounds(f) {
|
21035
21035
|
if (!this.map) return;
|
21036
21036
|
const { type: x, coordinates: I } = f;
|
21037
|
-
let C,
|
21037
|
+
let C, L;
|
21038
21038
|
switch (x) {
|
21039
21039
|
case "Polygon":
|
21040
|
-
C = pp(I),
|
21040
|
+
C = pp(I), L = ml(C), this.map.fitBounds(L, { padding: 30, maxZoom: 15, duration: 0 });
|
21041
21041
|
break;
|
21042
21042
|
case "MultiPolygon":
|
21043
|
-
C = mp(I),
|
21043
|
+
C = mp(I), L = ml(C), this.map.fitBounds(L, { padding: 30, maxZoom: 15, duration: 0 });
|
21044
21044
|
break;
|
21045
21045
|
case "MultiPoint":
|
21046
|
-
C = fp(I),
|
21046
|
+
C = fp(I), L = ml(C), this.map.fitBounds(L, { padding: 30, maxZoom: 15, duration: 0 });
|
21047
21047
|
break;
|
21048
21048
|
case "Point":
|
21049
21049
|
this.map.flyTo({
|
@@ -21062,7 +21062,7 @@ const Jy = /* @__PURE__ */ Ji(Ny, [["render", Xy]]), Ky = {
|
|
21062
21062
|
class: "vs-map-portal relative z-1 mt-2",
|
21063
21063
|
id: "mapwrapper"
|
21064
21064
|
};
|
21065
|
-
function Qy(f, x, I, C,
|
21065
|
+
function Qy(f, x, I, C, L, U) {
|
21066
21066
|
var xe;
|
21067
21067
|
const S = ii("MapLegend"), c = ii("MapSlotLayers"), pe = ii("MapCompare"), fe = ii("AdditionalLayers");
|
21068
21068
|
return it(), mt("div", Yy, [
|
@@ -21073,28 +21073,28 @@ function Qy(f, x, I, C, z, U) {
|
|
21073
21073
|
style: Jh({ height: I.height })
|
21074
21074
|
}, null, 4),
|
21075
21075
|
Hs(tr(S, {
|
21076
|
-
colors:
|
21077
|
-
strokes:
|
21076
|
+
colors: L.colors,
|
21077
|
+
strokes: L.strokes,
|
21078
21078
|
title: I.legendname
|
21079
21079
|
}, null, 8, ["colors", "strokes", "title"]), [
|
21080
21080
|
[Jo, I.legend]
|
21081
21081
|
]),
|
21082
21082
|
tr(c, {
|
21083
|
-
map:
|
21083
|
+
map: L.map,
|
21084
21084
|
baseLayers: I.basemap,
|
21085
21085
|
selectedLayer: I.selectedBaseLayer,
|
21086
21086
|
"onUpdate:selectedLayer": x[0] || (x[0] = (oe) => f.$emit("update:selectedBaseLayer", oe))
|
21087
21087
|
}, null, 8, ["map", "baseLayers", "selectedLayer"]),
|
21088
21088
|
I.isMapCompare ? (it(), ir(pe, {
|
21089
21089
|
key: 0,
|
21090
|
-
map:
|
21090
|
+
map: L.map,
|
21091
21091
|
compareLayers: U.allLayers,
|
21092
21092
|
table: I.table,
|
21093
21093
|
onIsCompareOpen: x[1] || (x[1] = (oe) => f.$emit("isCompareOpen", oe))
|
21094
21094
|
}, null, 8, ["map", "compareLayers", "table"])) : oi("", !0),
|
21095
21095
|
(xe = I.additionalLayers) != null && xe.length ? (it(), ir(fe, {
|
21096
21096
|
key: 1,
|
21097
|
-
map:
|
21097
|
+
map: L.map,
|
21098
21098
|
layers: I.additionalLayers,
|
21099
21099
|
basemapIds: U.basemapIds
|
21100
21100
|
}, null, 8, ["map", "layers", "basemapIds"])) : oi("", !0)
|
@@ -21217,7 +21217,7 @@ const T0 = /* @__PURE__ */ Ji(g0, [["render", S0]]), I0 = {
|
|
21217
21217
|
key: 0,
|
21218
21218
|
class: "flex justify-end gap-x-2"
|
21219
21219
|
};
|
21220
|
-
function R0(f, x, I, C,
|
21220
|
+
function R0(f, x, I, C, L, U) {
|
21221
21221
|
return it(), ir(qm, { to: "#modal" }, [
|
21222
21222
|
tr(Wd, { name: "fade" }, {
|
21223
21223
|
default: _r(() => [
|
@@ -21263,6 +21263,7 @@ const B0 = /* @__PURE__ */ Ji(I0, [["render", R0], ["__scopeId", "data-v-3740577
|
|
21263
21263
|
dashedLine: { type: Boolean, default: !1 },
|
21264
21264
|
title: { type: String, default: () => "" },
|
21265
21265
|
table: { type: String, default: () => "" },
|
21266
|
+
rows: { type: Object, default: () => null },
|
21266
21267
|
isMapCompare: { type: Boolean, default: !0 },
|
21267
21268
|
initTotal: { type: [Number, String], default: () => "" },
|
21268
21269
|
colorAttr: { type: String, default: () => "" },
|
@@ -21373,13 +21374,13 @@ const B0 = /* @__PURE__ */ Ji(I0, [["render", R0], ["__scopeId", "data-v-3740577
|
|
21373
21374
|
f || this.getData();
|
21374
21375
|
},
|
21375
21376
|
async regionSelectValue(f, x) {
|
21376
|
-
var
|
21377
|
+
var L, U;
|
21377
21378
|
if (!this.regionSelectValue) {
|
21378
21379
|
this.map.removeSource("region-search-id");
|
21379
21380
|
return;
|
21380
21381
|
}
|
21381
21382
|
f && this.selectedId && this.closeObjCard(), this.polyline = this.regionSelectValue.encoded_geom, this.getData();
|
21382
|
-
const I = ((
|
21383
|
+
const I = ((L = this.regionSelectValue) == null ? void 0 : L.geom) || Ws.toGeoJSON(this.regionSelectValue.encoded_geom), C = this.map.getSource("region-search-id");
|
21383
21384
|
if (this.currentBbox = ml(I), C)
|
21384
21385
|
C.setData({
|
21385
21386
|
type: "Feature",
|
@@ -21414,16 +21415,20 @@ const B0 = /* @__PURE__ */ Ji(I0, [["render", R0], ["__scopeId", "data-v-3740577
|
|
21414
21415
|
this.addressSelectValue && (f && this.selectedId && this.closeObjCard(), this.getData());
|
21415
21416
|
}
|
21416
21417
|
},
|
21417
|
-
|
21418
|
-
|
21419
|
-
|
21420
|
-
|
21421
|
-
|
21422
|
-
const
|
21423
|
-
|
21424
|
-
|
21418
|
+
created() {
|
21419
|
+
this.tableData = this.rows, this.total = this.initTotal, this.id && (this.selectedRow = this.rows[0], this.selectedId = this.id, this.isSelectObj = !0);
|
21420
|
+
},
|
21421
|
+
mounted() {
|
21422
|
+
this.rows || this.getData();
|
21423
|
+
const f = new URLSearchParams(window.location.search), x = f.get("filter");
|
21424
|
+
f.get("id");
|
21425
|
+
const I = x == null ? void 0 : x.split("|");
|
21426
|
+
I == null || I.forEach((L) => {
|
21427
|
+
const [U, S] = L.split("=");
|
21425
21428
|
S != null && S.includes(",") ? this.mountedFilter[U] = S == null ? void 0 : S.split(",") : this.mountedFilter[U] = S, this.activeFilters = this.mountedFilter;
|
21426
|
-
})
|
21429
|
+
});
|
21430
|
+
const C = new URLSearchParams(window.location.search);
|
21431
|
+
this.currentPage = C.get("page") || 1, this.getFilter();
|
21427
21432
|
},
|
21428
21433
|
updated() {
|
21429
21434
|
this.checkFilterLength();
|
@@ -21556,8 +21561,8 @@ const B0 = /* @__PURE__ */ Ji(I0, [["render", R0], ["__scopeId", "data-v-3740577
|
|
21556
21561
|
if ((x == null ? void 0 : x.length) < 1 || ((U = x[0]) == null ? void 0 : U.source) === "region-search-id" || ((S = x[0]) == null ? void 0 : S.source) === "route-line") return;
|
21557
21562
|
const I = window.location.pathname, C = new URLSearchParams(window.location.search);
|
21558
21563
|
C.set("id", `${(c = x[0]) == null ? void 0 : c.properties.id}`), this.getObjectData((fe = (pe = x[0]) == null ? void 0 : pe.properties) == null ? void 0 : fe.id);
|
21559
|
-
const
|
21560
|
-
window.history.pushState({}, "",
|
21564
|
+
const L = `${I}?${C.toString()}`;
|
21565
|
+
window.history.pushState({}, "", L), this.isSelectObj = !0, f.lngLat && (($e = this.map) == null || $e.fitBounds(
|
21561
21566
|
[
|
21562
21567
|
[(xe = f.lngLat) == null ? void 0 : xe.lng, (oe = f.lngLat) == null ? void 0 : oe.lat],
|
21563
21568
|
[(ae = f.lngLat) == null ? void 0 : ae.lng, (ut = f.lngLat) == null ? void 0 : ut.lat]
|
@@ -21579,9 +21584,9 @@ const B0 = /* @__PURE__ */ Ji(I0, [["render", R0], ["__scopeId", "data-v-3740577
|
|
21579
21584
|
this.isMapVisible = x;
|
21580
21585
|
const C = await (await fetch(`/api/data/${this.table}/${f.id}`)).json();
|
21581
21586
|
this.selectedRow = ((c = C == null ? void 0 : C.rows) == null ? void 0 : c[0]) || f;
|
21582
|
-
const
|
21587
|
+
const L = window.location.pathname, U = new URLSearchParams(window.location.search);
|
21583
21588
|
U.set("id", `${f.id}`);
|
21584
|
-
const S = `${
|
21589
|
+
const S = `${L}?${U.toString()}`;
|
21585
21590
|
window.history.pushState({}, "", S), this.checkUrl(x), this.isSelectObj = !0;
|
21586
21591
|
},
|
21587
21592
|
deletePulsePoint() {
|
@@ -21602,8 +21607,8 @@ const B0 = /* @__PURE__ */ Ji(I0, [["render", R0], ["__scopeId", "data-v-3740577
|
|
21602
21607
|
(f = this.map) != null && f.getLayer("highlighted-polygon") && ((x = this.map) == null || x.removeLayer("highlighted-polygon"), (I = this.map) == null || I.removeSource("highlighted-polygon"));
|
21603
21608
|
},
|
21604
21609
|
highlightPolygon(f) {
|
21605
|
-
var x, I, C,
|
21606
|
-
this.deletePulsePoint(), this.deleteHighlighPolygon(), (
|
21610
|
+
var x, I, C, L, U, S;
|
21611
|
+
this.deletePulsePoint(), this.deleteHighlighPolygon(), (L = this.map) == null || L.addSource("highlighted-polygon", {
|
21607
21612
|
type: "geojson",
|
21608
21613
|
data: {
|
21609
21614
|
geometry: {
|
@@ -21670,7 +21675,7 @@ const B0 = /* @__PURE__ */ Ji(I0, [["render", R0], ["__scopeId", "data-v-3740577
|
|
21670
21675
|
}
|
21671
21676
|
)
|
21672
21677
|
).length) return;
|
21673
|
-
const
|
21678
|
+
const L = x[0].geometry.coordinates.slice();
|
21674
21679
|
x[0].source === "highlighted-polygon" && x[1] ? this.hoverData = (c = x[1]) == null ? void 0 : c.properties : this.hoverData = (pe = x[0]) == null ? void 0 : pe.properties;
|
21675
21680
|
const U = {
|
21676
21681
|
source: x[0].source,
|
@@ -21678,8 +21683,8 @@ const B0 = /* @__PURE__ */ Ji(I0, [["render", R0], ["__scopeId", "data-v-3740577
|
|
21678
21683
|
id: x[0].id
|
21679
21684
|
};
|
21680
21685
|
if (U.source !== "region-search-id") {
|
21681
|
-
for (this.map.setFeatureState(U, { hover: !0 }), this.hoverObject = U; Math.abs(f.lngLat.lng -
|
21682
|
-
|
21686
|
+
for (this.map.setFeatureState(U, { hover: !0 }), this.hoverObject = U; Math.abs(f.lngLat.lng - L[0]) > 180; )
|
21687
|
+
L[0] += f.lngLat.lng > L[0] ? 360 : -360;
|
21683
21688
|
this.popup.setLngLat(f.lngLat).setHTML(this.$refs.popup.innerHTML).addTo(this.map);
|
21684
21689
|
}
|
21685
21690
|
},
|
@@ -21716,7 +21721,7 @@ const B0 = /* @__PURE__ */ Ji(I0, [["render", R0], ["__scopeId", "data-v-3740577
|
|
21716
21721
|
ref: "popup",
|
21717
21722
|
style: { display: "none" }
|
21718
21723
|
};
|
21719
|
-
function px(f, x, I, C,
|
21724
|
+
function px(f, x, I, C, L, U) {
|
21720
21725
|
var Oe, gt;
|
21721
21726
|
const S = ii("VsTextMask"), c = ii("vs-text"), pe = ii("FilterIcon"), fe = ii("VsFilterList"), xe = ii("VisibleMapIcon"), oe = ii("HiddenMapIcon"), ae = ii("CloseIcon"), ut = ii("NoData"), $e = ii("VsPagination"), Ke = ii("MapPortal");
|
21722
21727
|
return it(), mt("section", O0, [
|