aviation-chart 0.1.16 → 0.1.17
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/aviation-chart.umd.js +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.js +84 -85
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -142,20 +142,20 @@ Mt(["exports"], function(o) {
|
|
|
142
142
|
if (!t)
|
|
143
143
|
return {};
|
|
144
144
|
const r = i / (e.width - 1);
|
|
145
|
-
let l, s, c, m, h,
|
|
146
|
-
const
|
|
145
|
+
let l, s, c, m, h, d;
|
|
146
|
+
const f = {}, w = /* @__PURE__ */ new Map(), F = /* @__PURE__ */ new Map();
|
|
147
147
|
function P(O, I, R) {
|
|
148
|
-
O[0] === 0 ? R(r * (
|
|
148
|
+
O[0] === 0 ? R(r * (d - 1), r * (h - y(c, I, l))) : O[0] === 2 ? R(r * d, r * (h - y(m, I, s))) : O[1] === 0 ? R(r * (d - y(s, I, l)), r * (h - 1)) : R(r * (d - y(m, I, c)), r * h);
|
|
149
149
|
}
|
|
150
150
|
for (h = 1 - n; h < e.height + n; h++) {
|
|
151
151
|
s = e.get(0, h - 1), m = e.get(0, h);
|
|
152
152
|
let O = Math.min(s, m), I = Math.max(s, m);
|
|
153
|
-
for (
|
|
154
|
-
l = s, c = m, s = e.get(
|
|
153
|
+
for (d = 1 - n; d < e.width + n; d++) {
|
|
154
|
+
l = s, c = m, s = e.get(d, h - 1), m = e.get(d, h);
|
|
155
155
|
const R = O, V = I;
|
|
156
156
|
if (O = Math.min(s, m), I = Math.max(s, m), isNaN(l) || isNaN(s) || isNaN(m) || isNaN(c))
|
|
157
157
|
continue;
|
|
158
|
-
const
|
|
158
|
+
const ft = Math.min(R, O), pt = Math.max(V, I), X = Math.ceil(ft / t) * t, ot = Math.floor(pt / t) * t;
|
|
159
159
|
for (let C = X; C <= ot; C += t) {
|
|
160
160
|
const At = l > C, q = s > C, nt = c > C, _t = m > C;
|
|
161
161
|
for (const bt of u[(At ? 8 : 0) | (q ? 4 : 0) | (_t ? 2 : 0) | (nt ? 1 : 0)]) {
|
|
@@ -163,14 +163,14 @@ Mt(["exports"], function(o) {
|
|
|
163
163
|
Y || w.set(C, Y = /* @__PURE__ */ new Map());
|
|
164
164
|
let lt = F.get(C);
|
|
165
165
|
lt || F.set(C, lt = /* @__PURE__ */ new Map());
|
|
166
|
-
const kt = bt[0], zt = bt[1], yt = g(e.width,
|
|
166
|
+
const kt = bt[0], zt = bt[1], yt = g(e.width, d, h, kt), st = g(e.width, d, h, zt);
|
|
167
167
|
let L, Tt;
|
|
168
168
|
if (L = lt.get(yt))
|
|
169
169
|
if (lt.delete(yt), Tt = Y.get(st))
|
|
170
170
|
if (Y.delete(st), L === Tt) {
|
|
171
171
|
if (P(zt, C, L.append), !L.isEmpty()) {
|
|
172
|
-
let rt =
|
|
173
|
-
rt || (
|
|
172
|
+
let rt = f[C];
|
|
173
|
+
rt || (f[C] = rt = []), rt.push(L.lineString());
|
|
174
174
|
}
|
|
175
175
|
} else
|
|
176
176
|
L.appendFragment(Tt), lt.set(L.end = Tt.end, L);
|
|
@@ -189,9 +189,9 @@ Mt(["exports"], function(o) {
|
|
|
189
189
|
for (const [O, I] of w.entries()) {
|
|
190
190
|
let R = null;
|
|
191
191
|
for (const V of I.values())
|
|
192
|
-
V.isEmpty() || (R == null && (R =
|
|
192
|
+
V.isEmpty() || (R == null && (R = f[O] || (f[O] = [])), R.push(V.lineString()));
|
|
193
193
|
}
|
|
194
|
-
return
|
|
194
|
+
return f;
|
|
195
195
|
}
|
|
196
196
|
function b(t) {
|
|
197
197
|
const e = Object.entries(t);
|
|
@@ -311,10 +311,10 @@ Mt(["exports"], function(o) {
|
|
|
311
311
|
if (l)
|
|
312
312
|
l.lastUsed = ++E, l.waiting++;
|
|
313
313
|
else {
|
|
314
|
-
const h = new AbortController(),
|
|
314
|
+
const h = new AbortController(), d = n(i, h);
|
|
315
315
|
l = {
|
|
316
316
|
abortController: h,
|
|
317
|
-
item:
|
|
317
|
+
item: d,
|
|
318
318
|
lastUsed: ++E,
|
|
319
319
|
waiting: 1
|
|
320
320
|
}, this.items.set(i, l), this.prune();
|
|
@@ -355,13 +355,13 @@ Mt(["exports"], function(o) {
|
|
|
355
355
|
try {
|
|
356
356
|
if (!(((n = c == null ? void 0 : c.format) === null || n === void 0 ? void 0 : n.startsWith("BGR")) || ((r = c == null ? void 0 : c.format) === null || r === void 0 ? void 0 : r.startsWith("RGB"))))
|
|
357
357
|
throw new Error(`Unrecognized format: ${c == null ? void 0 : c.format}`);
|
|
358
|
-
const h = (l = c == null ? void 0 : c.format) === null || l === void 0 ? void 0 : l.startsWith("BGR"),
|
|
359
|
-
if (await c.copyTo(
|
|
360
|
-
for (let w = 0; w <
|
|
361
|
-
const F =
|
|
362
|
-
|
|
358
|
+
const h = (l = c == null ? void 0 : c.format) === null || l === void 0 ? void 0 : l.startsWith("BGR"), d = c.allocationSize(), f = new Uint8ClampedArray(d);
|
|
359
|
+
if (await c.copyTo(f), h)
|
|
360
|
+
for (let w = 0; w < f.length; w += 4) {
|
|
361
|
+
const F = f[w];
|
|
362
|
+
f[w] = f[w + 2], f[w + 2] = F;
|
|
363
363
|
}
|
|
364
|
-
return Dt(s.width, s.height, e,
|
|
364
|
+
return Dt(s.width, s.height, e, f);
|
|
365
365
|
} catch {
|
|
366
366
|
return B(i) ? null : W(s, e);
|
|
367
367
|
} finally {
|
|
@@ -415,21 +415,21 @@ Mt(["exports"], function(o) {
|
|
|
415
415
|
if (r === 0)
|
|
416
416
|
return this;
|
|
417
417
|
const c = 1 << r, m = l * this.width / c, h = s * this.height / c;
|
|
418
|
-
return new $(this.width / c, this.height / c, (
|
|
418
|
+
return new $(this.width / c, this.height / c, (d, f) => this.get(d + m, f + h));
|
|
419
419
|
}, this.subsamplePixelCenters = (r) => {
|
|
420
|
-
const l = (m, h,
|
|
420
|
+
const l = (m, h, d) => isNaN(m) ? h : isNaN(h) ? m : m + (h - m) * d;
|
|
421
421
|
if (r <= 1)
|
|
422
422
|
return this;
|
|
423
423
|
const s = 0.5 - 1 / (2 * r), c = (m, h) => {
|
|
424
|
-
const
|
|
425
|
-
return l(pt, X,
|
|
424
|
+
const d = m / r - s, f = h / r - s, w = Math.floor(d), F = Math.floor(f), P = this.get(w, F), O = this.get(w + 1, F), I = this.get(w, F + 1), R = this.get(w + 1, F + 1), V = d - w, ft = f - F, pt = l(P, O, V), X = l(I, R, V);
|
|
425
|
+
return l(pt, X, ft);
|
|
426
426
|
};
|
|
427
427
|
return new $(this.width * r, this.height * r, c);
|
|
428
428
|
}, this.averagePixelCentersToGrid = (r = 1) => new $(this.width + 1, this.height + 1, (l, s) => {
|
|
429
429
|
let c = 0, m = 0, h = 0;
|
|
430
|
-
for (let
|
|
431
|
-
for (let
|
|
432
|
-
isNaN(h = this.get(
|
|
430
|
+
for (let d = l - r; d < l + r; d++)
|
|
431
|
+
for (let f = s - r; f < s + r; f++)
|
|
432
|
+
isNaN(h = this.get(d, f)) || (m++, c += h);
|
|
433
433
|
return m === 0 ? NaN : c / m;
|
|
434
434
|
}), this.scaleElevation = (r) => r === 1 ? this : new $(this.width, this.height, (l, s) => this.get(l, s) * r), this.materialize = (r = 2) => {
|
|
435
435
|
const l = this.width + 2 * r, s = new Float32Array(l * (this.height + 2 * r));
|
|
@@ -474,10 +474,10 @@ Mt(["exports"], function(o) {
|
|
|
474
474
|
var Et = {};
|
|
475
475
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
476
476
|
Et.read = function(t, e, i, n, r) {
|
|
477
|
-
var l, s, c = r * 8 - n - 1, m = (1 << c) - 1, h = m >> 1,
|
|
478
|
-
for (
|
|
477
|
+
var l, s, c = r * 8 - n - 1, m = (1 << c) - 1, h = m >> 1, d = -7, f = i ? r - 1 : 0, w = i ? -1 : 1, F = t[e + f];
|
|
478
|
+
for (f += w, l = F & (1 << -d) - 1, F >>= -d, d += c; d > 0; l = l * 256 + t[e + f], f += w, d -= 8)
|
|
479
479
|
;
|
|
480
|
-
for (s = l & (1 << -
|
|
480
|
+
for (s = l & (1 << -d) - 1, l >>= -d, d += n; d > 0; s = s * 256 + t[e + f], f += w, d -= 8)
|
|
481
481
|
;
|
|
482
482
|
if (l === 0)
|
|
483
483
|
l = 1 - h;
|
|
@@ -488,8 +488,8 @@ Mt(["exports"], function(o) {
|
|
|
488
488
|
}
|
|
489
489
|
return (F ? -1 : 1) * s * Math.pow(2, l - n);
|
|
490
490
|
}, Et.write = function(t, e, i, n, r, l) {
|
|
491
|
-
var s, c, m, h = l * 8 - r - 1,
|
|
492
|
-
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (c = isNaN(e) ? 1 : 0, s =
|
|
491
|
+
var s, c, m, h = l * 8 - r - 1, d = (1 << h) - 1, f = d >> 1, w = r === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, F = n ? 0 : l - 1, P = n ? 1 : -1, O = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
|
|
492
|
+
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (c = isNaN(e) ? 1 : 0, s = d) : (s = Math.floor(Math.log(e) / Math.LN2), e * (m = Math.pow(2, -s)) < 1 && (s--, m *= 2), s + f >= 1 ? e += w / m : e += w * Math.pow(2, 1 - f), e * m >= 2 && (s++, m /= 2), s + f >= d ? (c = 0, s = d) : s + f >= 1 ? (c = (e * m - 1) * Math.pow(2, r), s = s + f) : (c = e * Math.pow(2, f - 1) * Math.pow(2, r), s = 0)); r >= 8; t[i + F] = c & 255, F += P, c /= 256, r -= 8)
|
|
493
493
|
;
|
|
494
494
|
for (s = s << r | c, h += r; h > 0; t[i + F] = s & 255, F += P, s /= 256, h -= 8)
|
|
495
495
|
;
|
|
@@ -695,10 +695,10 @@ Mt(["exports"], function(o) {
|
|
|
695
695
|
this.writeTag(t, T.Bytes), this.writeRawMessage(e, i);
|
|
696
696
|
},
|
|
697
697
|
writePackedVarint: function(t, e) {
|
|
698
|
-
e.length && this.writeMessage(t,
|
|
698
|
+
e.length && this.writeMessage(t, de, e);
|
|
699
699
|
},
|
|
700
700
|
writePackedSVarint: function(t, e) {
|
|
701
|
-
e.length && this.writeMessage(t,
|
|
701
|
+
e.length && this.writeMessage(t, fe, e);
|
|
702
702
|
},
|
|
703
703
|
writePackedBoolean: function(t, e) {
|
|
704
704
|
e.length && this.writeMessage(t, ye, e);
|
|
@@ -784,10 +784,10 @@ Mt(["exports"], function(o) {
|
|
|
784
784
|
i.realloc(n);
|
|
785
785
|
for (var r = i.pos - 1; r >= t; r--) i.buf[r + n] = i.buf[r];
|
|
786
786
|
}
|
|
787
|
-
function
|
|
787
|
+
function de(t, e) {
|
|
788
788
|
for (var i = 0; i < t.length; i++) e.writeVarint(t[i]);
|
|
789
789
|
}
|
|
790
|
-
function
|
|
790
|
+
function fe(t, e) {
|
|
791
791
|
for (var i = 0; i < t.length; i++) e.writeSVarint(t[i]);
|
|
792
792
|
}
|
|
793
793
|
function ue(t, e) {
|
|
@@ -824,8 +824,8 @@ Mt(["exports"], function(o) {
|
|
|
824
824
|
for (var n = "", r = e; r < i; ) {
|
|
825
825
|
var l = t[r], s = null, c = l > 239 ? 4 : l > 223 ? 3 : l > 191 ? 2 : 1;
|
|
826
826
|
if (r + c > i) break;
|
|
827
|
-
var m, h,
|
|
828
|
-
c === 1 ? l < 128 && (s = l) : c === 2 ? (m = t[r + 1], (m & 192) === 128 && (s = (l & 31) << 6 | m & 63, s <= 127 && (s = null))) : c === 3 ? (m = t[r + 1], h = t[r + 2], (m & 192) === 128 && (h & 192) === 128 && (s = (l & 15) << 12 | (m & 63) << 6 | h & 63, (s <= 2047 || s >= 55296 && s <= 57343) && (s = null))) : c === 4 && (m = t[r + 1], h = t[r + 2],
|
|
827
|
+
var m, h, d;
|
|
828
|
+
c === 1 ? l < 128 && (s = l) : c === 2 ? (m = t[r + 1], (m & 192) === 128 && (s = (l & 31) << 6 | m & 63, s <= 127 && (s = null))) : c === 3 ? (m = t[r + 1], h = t[r + 2], (m & 192) === 128 && (h & 192) === 128 && (s = (l & 15) << 12 | (m & 63) << 6 | h & 63, (s <= 2047 || s >= 55296 && s <= 57343) && (s = null))) : c === 4 && (m = t[r + 1], h = t[r + 2], d = t[r + 3], (m & 192) === 128 && (h & 192) === 128 && (d & 192) === 128 && (s = (l & 15) << 18 | (m & 63) << 12 | (h & 63) << 6 | d & 63, (s <= 65535 || s >= 1114112) && (s = null))), s === null ? (s = 65533, c = 1) : s > 65535 && (s -= 65536, n += String.fromCharCode(s >>> 10 & 1023 | 55296), s = 56320 | s & 1023), n += String.fromCharCode(s), r += c;
|
|
829
829
|
}
|
|
830
830
|
return n;
|
|
831
831
|
}
|
|
@@ -850,10 +850,10 @@ Mt(["exports"], function(o) {
|
|
|
850
850
|
}
|
|
851
851
|
return i;
|
|
852
852
|
}
|
|
853
|
-
var ve = /* @__PURE__ */ ae(ne),
|
|
853
|
+
var ve = /* @__PURE__ */ ae(ne), dt;
|
|
854
854
|
(function(t) {
|
|
855
855
|
t[t.UNKNOWN = 0] = "UNKNOWN", t[t.POINT = 1] = "POINT", t[t.LINESTRING = 2] = "LINESTRING", t[t.POLYGON = 3] = "POLYGON";
|
|
856
|
-
})(
|
|
856
|
+
})(dt || (dt = {}));
|
|
857
857
|
function De(t) {
|
|
858
858
|
const e = new ve();
|
|
859
859
|
for (const i in t.layers) {
|
|
@@ -895,11 +895,11 @@ Mt(["exports"], function(o) {
|
|
|
895
895
|
if (m === null)
|
|
896
896
|
continue;
|
|
897
897
|
typeof h > "u" && (n.push(c), h = n.length - 1, l[c] = h), e.writeVarint(h);
|
|
898
|
-
const
|
|
899
|
-
|
|
900
|
-
const
|
|
901
|
-
let w = s[
|
|
902
|
-
typeof w > "u" && (r.push(m), w = r.length - 1, s[
|
|
898
|
+
const d = typeof m;
|
|
899
|
+
d !== "string" && d !== "boolean" && d !== "number" && (m = JSON.stringify(m));
|
|
900
|
+
const f = `${d}:${m}`;
|
|
901
|
+
let w = s[f];
|
|
902
|
+
typeof w > "u" && (r.push(m), w = r.length - 1, s[f] = w), e.writeVarint(w);
|
|
903
903
|
}
|
|
904
904
|
}
|
|
905
905
|
function St(t, e) {
|
|
@@ -915,14 +915,14 @@ Mt(["exports"], function(o) {
|
|
|
915
915
|
let r = 0, l = 0;
|
|
916
916
|
for (const s of i) {
|
|
917
917
|
let c = 1;
|
|
918
|
-
n ===
|
|
919
|
-
const m = s.length / 2, h = n ===
|
|
920
|
-
for (let
|
|
921
|
-
|
|
922
|
-
const
|
|
923
|
-
e.writeVarint(Vt(
|
|
918
|
+
n === dt.POINT && (c = s.length / 2), e.writeVarint(St(1, c));
|
|
919
|
+
const m = s.length / 2, h = n === dt.POLYGON ? m - 1 : m;
|
|
920
|
+
for (let d = 0; d < h; d++) {
|
|
921
|
+
d === 1 && n !== 1 && e.writeVarint(St(2, h - 1));
|
|
922
|
+
const f = s[d * 2] - r, w = s[d * 2 + 1] - l;
|
|
923
|
+
e.writeVarint(Vt(f)), e.writeVarint(Vt(w)), r += f, l += w;
|
|
924
924
|
}
|
|
925
|
-
n ===
|
|
925
|
+
n === dt.POLYGON && e.writeVarint(St(7, 1));
|
|
926
926
|
}
|
|
927
927
|
}
|
|
928
928
|
function ke(t, e) {
|
|
@@ -932,13 +932,13 @@ Mt(["exports"], function(o) {
|
|
|
932
932
|
}
|
|
933
933
|
class Re {
|
|
934
934
|
constructor(e, i, n, r, l) {
|
|
935
|
-
this.loaded = Promise.resolve(), this.decodeImage = It, this.fetchAndParseTile = (s, c, m, h,
|
|
936
|
-
const
|
|
937
|
-
return
|
|
938
|
-
const O = await
|
|
935
|
+
this.loaded = Promise.resolve(), this.decodeImage = It, this.fetchAndParseTile = (s, c, m, h, d) => {
|
|
936
|
+
const f = this, w = this.demUrlPattern.replace("{z}", s.toString()).replace("{x}", c.toString()).replace("{y}", m.toString());
|
|
937
|
+
return d == null || d.useTile(w), this.parsedCache.get(w, async (F, P) => {
|
|
938
|
+
const O = await f.fetchTile(s, c, m, P, d);
|
|
939
939
|
if (B(P))
|
|
940
940
|
throw new Error("canceled");
|
|
941
|
-
const I =
|
|
941
|
+
const I = f.decodeImage(O.data, f.encoding, P), R = d == null ? void 0 : d.marker("decode"), V = await I;
|
|
942
942
|
return R == null || R(), V;
|
|
943
943
|
}, h);
|
|
944
944
|
}, this.tileCache = new Z(i), this.parsedCache = new Z(i), this.contourCache = new Z(i), this.timeoutMs = l, this.demUrlPattern = e, this.encoding = n, this.maxzoom = r;
|
|
@@ -950,33 +950,33 @@ Mt(["exports"], function(o) {
|
|
|
950
950
|
signal: m.signal
|
|
951
951
|
};
|
|
952
952
|
l == null || l.fetchTile(s);
|
|
953
|
-
const
|
|
954
|
-
return G(this.timeoutMs, fetch(s, h).then(async (
|
|
955
|
-
if (
|
|
956
|
-
throw new Error(`Bad response: ${
|
|
953
|
+
const d = l == null ? void 0 : l.marker("fetch");
|
|
954
|
+
return G(this.timeoutMs, fetch(s, h).then(async (f) => {
|
|
955
|
+
if (d == null || d(), !f.ok)
|
|
956
|
+
throw new Error(`Bad response: ${f.status} for ${s}`);
|
|
957
957
|
return {
|
|
958
|
-
data: await
|
|
959
|
-
expires:
|
|
960
|
-
cacheControl:
|
|
958
|
+
data: await f.blob(),
|
|
959
|
+
expires: f.headers.get("expires") || void 0,
|
|
960
|
+
cacheControl: f.headers.get("cache-control") || void 0
|
|
961
961
|
};
|
|
962
962
|
}), m);
|
|
963
963
|
}, r);
|
|
964
964
|
}
|
|
965
965
|
async fetchDem(e, i, n, r, l, s) {
|
|
966
|
-
const c = Math.min(e - (r.overzoom || 0), this.maxzoom), m = e - c, h = 1 << m,
|
|
966
|
+
const c = Math.min(e - (r.overzoom || 0), this.maxzoom), m = e - c, h = 1 << m, d = Math.floor(i / h), f = Math.floor(n / h), w = await this.fetchAndParseTile(c, d, f, l, s);
|
|
967
967
|
return $.fromRawDem(w).split(m, i % h, n % h);
|
|
968
968
|
}
|
|
969
969
|
fetchContourTile(e, i, n, r, l, s) {
|
|
970
|
-
const { levels: c, multiplier: m = 1, buffer: h = 1, extent:
|
|
970
|
+
const { levels: c, multiplier: m = 1, buffer: h = 1, extent: d = 4096, contourLayer: f = "contours", elevationKey: w = "ele", levelKey: F = "level", subsampleBelow: P = 100 } = r;
|
|
971
971
|
if (!c || c.length === 0)
|
|
972
972
|
return Promise.resolve({ arrayBuffer: new ArrayBuffer(0) });
|
|
973
973
|
const O = [e, i, n, p(r)].join("/");
|
|
974
974
|
return this.contourCache.get(O, async (I, R) => {
|
|
975
|
-
const V = 1 << e,
|
|
975
|
+
const V = 1 << e, ft = [];
|
|
976
976
|
for (let q = n - 1; q <= n + 1; q++)
|
|
977
977
|
for (let nt = i - 1; nt <= i + 1; nt++)
|
|
978
|
-
|
|
979
|
-
const pt = await Promise.all(
|
|
978
|
+
ft.push(q < 0 || q >= V ? void 0 : this.fetchDem(e, (nt + V) % V, q, r, R, s));
|
|
979
|
+
const pt = await Promise.all(ft);
|
|
980
980
|
let X = $.combineNeighbors(pt);
|
|
981
981
|
if (!X || B(R))
|
|
982
982
|
return { arrayBuffer: new Uint8Array().buffer };
|
|
@@ -987,16 +987,16 @@ Mt(["exports"], function(o) {
|
|
|
987
987
|
for (; X.width < P; )
|
|
988
988
|
X = X.subsamplePixelCenters(2).materialize(2);
|
|
989
989
|
X = X.averagePixelCentersToGrid().scaleElevation(m).materialize(1);
|
|
990
|
-
const C = x(c[0], X,
|
|
990
|
+
const C = x(c[0], X, d, h);
|
|
991
991
|
ot == null || ot();
|
|
992
992
|
const At = De({
|
|
993
|
-
extent:
|
|
993
|
+
extent: d,
|
|
994
994
|
layers: {
|
|
995
|
-
[
|
|
995
|
+
[f]: {
|
|
996
996
|
features: Object.entries(C).map(([q, nt]) => {
|
|
997
997
|
const _t = Number(q);
|
|
998
998
|
return {
|
|
999
|
-
type:
|
|
999
|
+
type: dt.LINESTRING,
|
|
1000
1000
|
geometry: nt,
|
|
1001
1001
|
properties: {
|
|
1002
1002
|
[w]: _t,
|
|
@@ -1030,8 +1030,8 @@ Mt(["exports"], function(o) {
|
|
|
1030
1030
|
this.marks = {}, this.urls = [], this.fetched = [], this.resources = [], this.tilesFetched = 0, this.timeOrigin = Ce, this.finish = (i) => {
|
|
1031
1031
|
this.markFinish();
|
|
1032
1032
|
const n = (m) => {
|
|
1033
|
-
const h = this.marks[m] || [],
|
|
1034
|
-
return Number.isFinite(
|
|
1033
|
+
const h = this.marks[m] || [], d = Math.max(...h.map((w) => Math.max(...w))), f = Math.min(...h.map((w) => Math.min(...w)));
|
|
1034
|
+
return Number.isFinite(d) ? d - f : void 0;
|
|
1035
1035
|
}, r = n("main") || 0, l = n("fetch"), s = n("decode"), c = n("isoline");
|
|
1036
1036
|
return {
|
|
1037
1037
|
url: i,
|
|
@@ -1092,23 +1092,23 @@ Mt(["exports"], function(o) {
|
|
|
1092
1092
|
...l.args,
|
|
1093
1093
|
m,
|
|
1094
1094
|
s
|
|
1095
|
-
]),
|
|
1095
|
+
]), d = `${l.name}_${l.id}`;
|
|
1096
1096
|
if (l.id && h) {
|
|
1097
1097
|
this.cancels[l.id] = m;
|
|
1098
1098
|
try {
|
|
1099
|
-
const
|
|
1099
|
+
const f = await h, w = f == null ? void 0 : f.transferrables;
|
|
1100
1100
|
this.postMessage({
|
|
1101
1101
|
id: l.id,
|
|
1102
1102
|
type: "response",
|
|
1103
|
-
response:
|
|
1104
|
-
timings: s.finish(
|
|
1103
|
+
response: f,
|
|
1104
|
+
timings: s.finish(d)
|
|
1105
1105
|
}, w);
|
|
1106
|
-
} catch (
|
|
1106
|
+
} catch (f) {
|
|
1107
1107
|
this.postMessage({
|
|
1108
1108
|
id: l.id,
|
|
1109
1109
|
type: "response",
|
|
1110
|
-
error: (
|
|
1111
|
-
timings: s.finish(
|
|
1110
|
+
error: (f == null ? void 0 : f.toString()) || "error",
|
|
1111
|
+
timings: s.finish(d)
|
|
1112
1112
|
});
|
|
1113
1113
|
}
|
|
1114
1114
|
delete this.cancels[l.id];
|
|
@@ -1122,8 +1122,8 @@ Mt(["exports"], function(o) {
|
|
|
1122
1122
|
/** Invokes a method by name with a set of arguments in the remote context. */
|
|
1123
1123
|
send(e, i, n, r, ...l) {
|
|
1124
1124
|
const s = ++Le, c = new Promise((m, h) => {
|
|
1125
|
-
this.postMessage({ id: s, type: "request", name: e, args: l }, i), this.callbacks[s] = (
|
|
1126
|
-
r == null || r.addAll(w),
|
|
1125
|
+
this.postMessage({ id: s, type: "request", name: e, args: l }, i), this.callbacks[s] = (d, f, w) => {
|
|
1126
|
+
r == null || r.addAll(w), d ? h(d) : m(f);
|
|
1127
1127
|
};
|
|
1128
1128
|
});
|
|
1129
1129
|
return U(n, () => {
|
|
@@ -2107,7 +2107,6 @@ function Ke() {
|
|
|
2107
2107
|
source: "boundary",
|
|
2108
2108
|
minzoom: 0.5,
|
|
2109
2109
|
paint: {
|
|
2110
|
-
"line-color": "#2A303C",
|
|
2111
2110
|
"line-width": [
|
|
2112
2111
|
"interpolate",
|
|
2113
2112
|
[
|
|
@@ -2122,7 +2121,7 @@ function Ke() {
|
|
|
2122
2121
|
4
|
|
2123
2122
|
],
|
|
2124
2123
|
"line-opacity": 1,
|
|
2125
|
-
"line-pattern": "normal:national-border"
|
|
2124
|
+
"line-pattern": "normal:national-border-dark"
|
|
2126
2125
|
}
|
|
2127
2126
|
},
|
|
2128
2127
|
{
|