aviation-chart 0.1.18 → 0.1.19
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 +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.js +324 -331
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,8 +6,8 @@ function Mt(o, a) {
|
|
|
6
6
|
else if (!Rt)
|
|
7
7
|
Rt = a;
|
|
8
8
|
else {
|
|
9
|
-
var u = "var sharedChunk = {}; (" + vt + ")(sharedChunk); (" + Rt + ")(sharedChunk);",
|
|
10
|
-
vt(
|
|
9
|
+
var u = "var sharedChunk = {}; (" + vt + ")(sharedChunk); (" + Rt + ")(sharedChunk);", x = {};
|
|
10
|
+
vt(x), Ot = a(x), typeof window < "u" && (Ot.workerUrl = window.URL.createObjectURL(
|
|
11
11
|
new Blob([u], { type: "text/javascript" })
|
|
12
12
|
));
|
|
13
13
|
}
|
|
@@ -132,79 +132,79 @@ Mt(["exports"], function(o) {
|
|
|
132
132
|
],
|
|
133
133
|
[]
|
|
134
134
|
];
|
|
135
|
-
function
|
|
135
|
+
function x(t, e, i, n) {
|
|
136
136
|
return e = e * 2 + n[0], i = i * 2 + n[1], e + i * (t + 1) * 2;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function p(t, e, i) {
|
|
139
139
|
return (e - t) / (i - t);
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function y(t, e, i = 4096, n = 1) {
|
|
142
142
|
if (!t)
|
|
143
143
|
return {};
|
|
144
144
|
const r = i / (e.width - 1);
|
|
145
|
-
let l, s, c, m,
|
|
146
|
-
const
|
|
147
|
-
function P
|
|
148
|
-
|
|
145
|
+
let l, s, c, m, h, d;
|
|
146
|
+
const f = {}, w = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map();
|
|
147
|
+
function C(P, I, k) {
|
|
148
|
+
P[0] === 0 ? k(r * (d - 1), r * (h - p(c, I, l))) : P[0] === 2 ? k(r * d, r * (h - p(m, I, s))) : P[1] === 0 ? k(r * (d - p(s, I, l)), r * (h - 1)) : k(r * (d - p(m, I, c)), r * h);
|
|
149
149
|
}
|
|
150
|
-
for (
|
|
151
|
-
s = e.get(0,
|
|
152
|
-
let
|
|
153
|
-
for (
|
|
154
|
-
l = s, c = m, s = e.get(
|
|
155
|
-
const
|
|
156
|
-
if (
|
|
150
|
+
for (h = 1 - n; h < e.height + n; h++) {
|
|
151
|
+
s = e.get(0, h - 1), m = e.get(0, h);
|
|
152
|
+
let P = Math.min(s, m), I = Math.max(s, m);
|
|
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
|
+
const k = P, V = I;
|
|
156
|
+
if (P = Math.min(s, m), I = Math.max(s, m), isNaN(l) || isNaN(s) || isNaN(m) || isNaN(c))
|
|
157
157
|
continue;
|
|
158
|
-
const
|
|
159
|
-
for (let
|
|
160
|
-
const At = l >
|
|
158
|
+
const ft = Math.min(k, P), pt = Math.max(V, I), X = Math.ceil(ft / t) * t, ot = Math.floor(pt / t) * t;
|
|
159
|
+
for (let R = X; R <= ot; R += t) {
|
|
160
|
+
const At = l > R, q = s > R, nt = c > R, _t = m > R;
|
|
161
161
|
for (const bt of u[(At ? 8 : 0) | (q ? 4 : 0) | (_t ? 2 : 0) | (nt ? 1 : 0)]) {
|
|
162
|
-
let Y = w.get(
|
|
163
|
-
Y || w.set(
|
|
164
|
-
let lt =
|
|
165
|
-
lt ||
|
|
166
|
-
const kt = bt[0], zt = bt[1], yt =
|
|
162
|
+
let Y = w.get(R);
|
|
163
|
+
Y || w.set(R, Y = /* @__PURE__ */ new Map());
|
|
164
|
+
let lt = E.get(R);
|
|
165
|
+
lt || E.set(R, lt = /* @__PURE__ */ new Map());
|
|
166
|
+
const kt = bt[0], zt = bt[1], yt = x(e.width, d, h, kt), st = x(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
|
-
if (
|
|
172
|
-
let rt =
|
|
173
|
-
rt || (
|
|
171
|
+
if (C(zt, R, L.append), !L.isEmpty()) {
|
|
172
|
+
let rt = f[R];
|
|
173
|
+
rt || (f[R] = rt = []), rt.push(L.lineString());
|
|
174
174
|
}
|
|
175
175
|
} else
|
|
176
176
|
L.appendFragment(Tt), lt.set(L.end = Tt.end, L);
|
|
177
177
|
else
|
|
178
|
-
|
|
178
|
+
C(zt, R, L.append), lt.set(L.end = st, L);
|
|
179
179
|
else if (L = Y.get(st))
|
|
180
|
-
Y.delete(st),
|
|
180
|
+
Y.delete(st), C(kt, R, L.prepend), Y.set(L.start = yt, L);
|
|
181
181
|
else {
|
|
182
182
|
const rt = new a(yt, st);
|
|
183
|
-
|
|
183
|
+
C(kt, R, rt.append), C(zt, R, rt.append), Y.set(yt, rt), lt.set(st, rt);
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
-
for (const [
|
|
190
|
-
let
|
|
189
|
+
for (const [P, I] of w.entries()) {
|
|
190
|
+
let k = null;
|
|
191
191
|
for (const V of I.values())
|
|
192
|
-
V.isEmpty() || (
|
|
192
|
+
V.isEmpty() || (k == null && (k = f[P] || (f[P] = [])), k.push(V.lineString()));
|
|
193
193
|
}
|
|
194
|
-
return
|
|
194
|
+
return f;
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function _(t) {
|
|
197
197
|
const e = Object.entries(t);
|
|
198
198
|
return e.sort(([i], [n]) => i < n ? -1 : i > n ? 1 : 0), e;
|
|
199
199
|
}
|
|
200
|
-
function
|
|
201
|
-
return
|
|
200
|
+
function F(t) {
|
|
201
|
+
return _(t).map(([e, i]) => [e, ...typeof i == "number" ? [i] : i].join("*")).join("~");
|
|
202
202
|
}
|
|
203
|
-
function
|
|
203
|
+
function O(t) {
|
|
204
204
|
return Object.fromEntries(t.split("~").map((e) => e.split("*").map(Number)).map(([e, ...i]) => [e, i]));
|
|
205
205
|
}
|
|
206
|
-
function
|
|
207
|
-
return
|
|
206
|
+
function A({ thresholds: t, ...e }) {
|
|
207
|
+
return _({ thresholds: F(t), ...e }).map(([i, n]) => `${encodeURIComponent(i)}=${encodeURIComponent(n)}`).join("&");
|
|
208
208
|
}
|
|
209
209
|
function z(t) {
|
|
210
210
|
return Object.fromEntries(t.replace(/^.*\?/, "").split("&").map((e) => {
|
|
@@ -212,7 +212,7 @@ Mt(["exports"], function(o) {
|
|
|
212
212
|
let r = i[1];
|
|
213
213
|
switch (n) {
|
|
214
214
|
case "thresholds":
|
|
215
|
-
r =
|
|
215
|
+
r = O(r);
|
|
216
216
|
break;
|
|
217
217
|
case "extent":
|
|
218
218
|
case "multiplier":
|
|
@@ -223,10 +223,10 @@ Mt(["exports"], function(o) {
|
|
|
223
223
|
return [n, r];
|
|
224
224
|
}));
|
|
225
225
|
}
|
|
226
|
-
function
|
|
227
|
-
return
|
|
226
|
+
function g(t) {
|
|
227
|
+
return _(t).map(([e, i]) => `${encodeURIComponent(e)}=${encodeURIComponent(i)}`).join(",");
|
|
228
228
|
}
|
|
229
|
-
function
|
|
229
|
+
function b(t, e) {
|
|
230
230
|
const { thresholds: i, ...n } = t;
|
|
231
231
|
let r = [], l = -1 / 0;
|
|
232
232
|
return Object.entries(i).forEach(([s, c]) => {
|
|
@@ -241,13 +241,13 @@ Mt(["exports"], function(o) {
|
|
|
241
241
|
const e = new ArrayBuffer(t.byteLength);
|
|
242
242
|
return new Uint8Array(e).set(new Uint8Array(t)), e;
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function S(t, e) {
|
|
245
245
|
return t.then(({ data: i, ...n }) => {
|
|
246
246
|
let r = i;
|
|
247
247
|
return e && (r = new Float32Array(i.length), r.set(i)), { ...n, data: r, transferrables: [r.buffer] };
|
|
248
248
|
});
|
|
249
249
|
}
|
|
250
|
-
function
|
|
250
|
+
function M(t) {
|
|
251
251
|
return t.then(({ arrayBuffer: e }) => {
|
|
252
252
|
const i = v(e);
|
|
253
253
|
return {
|
|
@@ -303,27 +303,27 @@ Mt(["exports"], function(o) {
|
|
|
303
303
|
var e;
|
|
304
304
|
return !!(!((e = t == null ? void 0 : t.signal) === null || e === void 0) && e.aborted);
|
|
305
305
|
}
|
|
306
|
-
let
|
|
306
|
+
let D = 0;
|
|
307
307
|
class Z {
|
|
308
308
|
constructor(e = 100) {
|
|
309
309
|
this.size = () => this.items.size, this.get = (i, n, r) => {
|
|
310
310
|
let l = this.items.get(i);
|
|
311
311
|
if (l)
|
|
312
|
-
l.lastUsed = ++
|
|
312
|
+
l.lastUsed = ++D, l.waiting++;
|
|
313
313
|
else {
|
|
314
|
-
const
|
|
314
|
+
const h = new AbortController(), d = n(i, h);
|
|
315
315
|
l = {
|
|
316
|
-
abortController:
|
|
317
|
-
item:
|
|
318
|
-
lastUsed: ++
|
|
316
|
+
abortController: h,
|
|
317
|
+
item: d,
|
|
318
|
+
lastUsed: ++D,
|
|
319
319
|
waiting: 1
|
|
320
320
|
}, this.items.set(i, l), this.prune();
|
|
321
321
|
}
|
|
322
|
-
const s = this.items, c = l.item.then((
|
|
322
|
+
const s = this.items, c = l.item.then((h) => h, (h) => (s.delete(i), Promise.reject(h)));
|
|
323
323
|
let m = !1;
|
|
324
324
|
return U(r, () => {
|
|
325
|
-
var
|
|
326
|
-
l && l.abortController && !m && (m = !0, --l.waiting <= 0 && ((
|
|
325
|
+
var h;
|
|
326
|
+
l && l.abortController && !m && (m = !0, --l.waiting <= 0 && ((h = l.abortController) === null || h === void 0 || h.abort(), s.delete(i)));
|
|
327
327
|
}), c;
|
|
328
328
|
}, this.clear = () => this.items.clear(), this.maxSize = e, this.items = /* @__PURE__ */ new Map();
|
|
329
329
|
}
|
|
@@ -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
|
|
359
|
-
if (await c.copyTo(
|
|
360
|
-
for (let w = 0; w <
|
|
361
|
-
const
|
|
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 E = f[w];
|
|
362
|
+
f[w] = f[w + 2], f[w + 2] = E;
|
|
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 {
|
|
@@ -414,30 +414,30 @@ Mt(["exports"], function(o) {
|
|
|
414
414
|
this.split = (r, l, s) => {
|
|
415
415
|
if (r === 0)
|
|
416
416
|
return this;
|
|
417
|
-
const c = 1 << r, m = l * this.width / c,
|
|
418
|
-
return new $(this.width / c, this.height / c, (
|
|
417
|
+
const c = 1 << r, m = l * this.width / c, h = s * 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,
|
|
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
|
-
const s = 0.5 - 1 / (2 * r), c = (m,
|
|
424
|
-
const
|
|
425
|
-
return l(pt, X,
|
|
423
|
+
const s = 0.5 - 1 / (2 * r), c = (m, h) => {
|
|
424
|
+
const d = m / r - s, f = h / r - s, w = Math.floor(d), E = Math.floor(f), C = this.get(w, E), P = this.get(w + 1, E), I = this.get(w, E + 1), k = this.get(w + 1, E + 1), V = d - w, ft = f - E, pt = l(C, P, V), X = l(I, k, 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
|
-
let c = 0, m = 0,
|
|
430
|
-
for (let
|
|
431
|
-
for (let
|
|
432
|
-
isNaN(
|
|
429
|
+
let c = 0, m = 0, h = 0;
|
|
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));
|
|
436
436
|
let c = 0;
|
|
437
437
|
for (let m = -r; m < this.height + r; m++)
|
|
438
|
-
for (let
|
|
439
|
-
s[c++] = this.get(
|
|
440
|
-
return new $(this.width, this.height, (m,
|
|
438
|
+
for (let h = -r; h < this.width + r; h++)
|
|
439
|
+
s[c++] = this.get(h, m);
|
|
440
|
+
return new $(this.width, this.height, (m, h) => s[(h + r) * l + m + r]);
|
|
441
441
|
}, this.get = n, this.width = e, this.height = i;
|
|
442
442
|
}
|
|
443
443
|
/** Construct a height tile from raw DEM pixel values */
|
|
@@ -474,26 +474,26 @@ 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,
|
|
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, E = t[e + f];
|
|
478
|
+
for (f += w, l = E & (1 << -d) - 1, E >>= -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
|
-
l = 1 -
|
|
483
|
+
l = 1 - h;
|
|
484
484
|
else {
|
|
485
485
|
if (l === m)
|
|
486
|
-
return s ? NaN : (
|
|
487
|
-
s = s + Math.pow(2, n), l = l -
|
|
486
|
+
return s ? NaN : (E ? -1 : 1) * (1 / 0);
|
|
487
|
+
s = s + Math.pow(2, n), l = l - h;
|
|
488
488
|
}
|
|
489
|
-
return (
|
|
489
|
+
return (E ? -1 : 1) * s * Math.pow(2, l - n);
|
|
490
490
|
}, Et.write = function(t, e, i, n, r, l) {
|
|
491
|
-
var s, c, m,
|
|
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, E = n ? 0 : l - 1, C = n ? 1 : -1, P = 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 + E] = c & 255, E += C, c /= 256, r -= 8)
|
|
493
493
|
;
|
|
494
|
-
for (s = s << r | c,
|
|
494
|
+
for (s = s << r | c, h += r; h > 0; t[i + E] = s & 255, E += C, s /= 256, h -= 8)
|
|
495
495
|
;
|
|
496
|
-
t[i +
|
|
496
|
+
t[i + E - C] |= P * 128;
|
|
497
497
|
};
|
|
498
498
|
var ne = T, gt = Et;
|
|
499
499
|
function T(t) {
|
|
@@ -642,16 +642,16 @@ Mt(["exports"], function(o) {
|
|
|
642
642
|
return this.length = this.pos, this.pos = 0, this.buf.subarray(0, this.length);
|
|
643
643
|
},
|
|
644
644
|
writeFixed32: function(t) {
|
|
645
|
-
this.realloc(4),
|
|
645
|
+
this.realloc(4), ht(this.buf, t, this.pos), this.pos += 4;
|
|
646
646
|
},
|
|
647
647
|
writeSFixed32: function(t) {
|
|
648
|
-
this.realloc(4),
|
|
648
|
+
this.realloc(4), ht(this.buf, t, this.pos), this.pos += 4;
|
|
649
649
|
},
|
|
650
650
|
writeFixed64: function(t) {
|
|
651
|
-
this.realloc(8),
|
|
651
|
+
this.realloc(8), ht(this.buf, t & -1, this.pos), ht(this.buf, Math.floor(t * Gt), this.pos + 4), this.pos += 8;
|
|
652
652
|
},
|
|
653
653
|
writeSFixed64: function(t) {
|
|
654
|
-
this.realloc(8),
|
|
654
|
+
this.realloc(8), ht(this.buf, t & -1, this.pos), ht(this.buf, Math.floor(t * Gt), this.pos + 4), this.pos += 8;
|
|
655
655
|
},
|
|
656
656
|
writeVarint: function(t) {
|
|
657
657
|
if (t = +t || 0, t > 268435455 || t < 0) {
|
|
@@ -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);
|
|
@@ -770,12 +770,12 @@ Mt(["exports"], function(o) {
|
|
|
770
770
|
var i, n;
|
|
771
771
|
if (t >= 0 ? (i = t % 4294967296 | 0, n = t / 4294967296 | 0) : (i = ~(-t % 4294967296), n = ~(-t / 4294967296), i ^ 4294967295 ? i = i + 1 | 0 : (i = 0, n = n + 1 | 0)), t >= 18446744073709552e3 || t < -18446744073709552e3)
|
|
772
772
|
throw new Error("Given varint doesn't fit into 10 bytes");
|
|
773
|
-
e.realloc(10), me(i, n, e),
|
|
773
|
+
e.realloc(10), me(i, n, e), he(n, e);
|
|
774
774
|
}
|
|
775
775
|
function me(t, e, i) {
|
|
776
776
|
i.buf[i.pos++] = t & 127 | 128, t >>>= 7, i.buf[i.pos++] = t & 127 | 128, t >>>= 7, i.buf[i.pos++] = t & 127 | 128, t >>>= 7, i.buf[i.pos++] = t & 127 | 128, t >>>= 7, i.buf[i.pos] = t & 127;
|
|
777
777
|
}
|
|
778
|
-
function
|
|
778
|
+
function he(t, e) {
|
|
779
779
|
var i = (t & 7) << 4;
|
|
780
780
|
e.buf[e.pos++] |= i | ((t >>>= 3) ? 128 : 0), t && (e.buf[e.pos++] = t & 127 | ((t >>>= 7) ? 128 : 0), t && (e.buf[e.pos++] = t & 127 | ((t >>>= 7) ? 128 : 0), t && (e.buf[e.pos++] = t & 127 | ((t >>>= 7) ? 128 : 0), t && (e.buf[e.pos++] = t & 127 | ((t >>>= 7) ? 128 : 0), t && (e.buf[e.pos++] = t & 127)))));
|
|
781
781
|
}
|
|
@@ -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) {
|
|
@@ -814,7 +814,7 @@ Mt(["exports"], function(o) {
|
|
|
814
814
|
function wt(t, e) {
|
|
815
815
|
return (t[e] | t[e + 1] << 8 | t[e + 2] << 16) + t[e + 3] * 16777216;
|
|
816
816
|
}
|
|
817
|
-
function
|
|
817
|
+
function ht(t, e, i) {
|
|
818
818
|
t[i] = e, t[i + 1] = e >>> 8, t[i + 2] = e >>> 16, t[i + 3] = e >>> 24;
|
|
819
819
|
}
|
|
820
820
|
function Nt(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,
|
|
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],
|
|
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) {
|
|
@@ -891,15 +891,15 @@ Mt(["exports"], function(o) {
|
|
|
891
891
|
throw new Error();
|
|
892
892
|
const n = t.keys, r = t.values, l = t.keycache, s = t.valuecache;
|
|
893
893
|
for (const c in i.properties) {
|
|
894
|
-
let m = i.properties[c],
|
|
894
|
+
let m = i.properties[c], h = l[c];
|
|
895
895
|
if (m === null)
|
|
896
896
|
continue;
|
|
897
|
-
typeof
|
|
898
|
-
const
|
|
899
|
-
|
|
900
|
-
const
|
|
901
|
-
let w = s[
|
|
902
|
-
typeof w > "u" && (r.push(m), w = r.length - 1, s[
|
|
897
|
+
typeof h > "u" && (n.push(c), h = n.length - 1, l[c] = h), e.writeVarint(h);
|
|
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,
|
|
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,75 +932,75 @@ 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,
|
|
936
|
-
const
|
|
937
|
-
return
|
|
938
|
-
const
|
|
939
|
-
if (B(
|
|
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 (E, C) => {
|
|
938
|
+
const P = await f.fetchTile(s, c, m, C, d);
|
|
939
|
+
if (B(C))
|
|
940
940
|
throw new Error("canceled");
|
|
941
|
-
const I =
|
|
942
|
-
return
|
|
943
|
-
},
|
|
941
|
+
const I = f.decodeImage(P.data, f.encoding, C), k = d == null ? void 0 : d.marker("decode"), V = await I;
|
|
942
|
+
return k == null || k(), V;
|
|
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;
|
|
945
945
|
}
|
|
946
946
|
fetchTile(e, i, n, r, l) {
|
|
947
947
|
const s = this.demUrlPattern.replace("{z}", e.toString()).replace("{x}", i.toString()).replace("{y}", n.toString());
|
|
948
948
|
return l == null || l.useTile(s), this.tileCache.get(s, (c, m) => {
|
|
949
|
-
const
|
|
949
|
+
const h = {
|
|
950
950
|
signal: m.signal
|
|
951
951
|
};
|
|
952
952
|
l == null || l.fetchTile(s);
|
|
953
|
-
const
|
|
954
|
-
return G(this.timeoutMs, fetch(s,
|
|
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,
|
|
967
|
-
return $.fromRawDem(w).split(m, i %
|
|
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
|
+
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:
|
|
970
|
+
const { levels: c, multiplier: m = 1, buffer: h = 1, extent: d = 4096, contourLayer: f = "contours", elevationKey: w = "ele", levelKey: E = "level", subsampleBelow: C = 100 } = r;
|
|
971
971
|
if (!c || c.length === 0)
|
|
972
972
|
return Promise.resolve({ arrayBuffer: new ArrayBuffer(0) });
|
|
973
|
-
const
|
|
974
|
-
return this.contourCache.get(
|
|
975
|
-
const V = 1 << e,
|
|
973
|
+
const P = [e, i, n, g(r)].join("/");
|
|
974
|
+
return this.contourCache.get(P, async (I, k) => {
|
|
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, k, s));
|
|
979
|
+
const pt = await Promise.all(ft);
|
|
980
980
|
let X = $.combineNeighbors(pt);
|
|
981
|
-
if (!X || B(
|
|
981
|
+
if (!X || B(k))
|
|
982
982
|
return { arrayBuffer: new Uint8Array().buffer };
|
|
983
983
|
const ot = s == null ? void 0 : s.marker("isoline");
|
|
984
|
-
if (X.width >=
|
|
984
|
+
if (X.width >= C)
|
|
985
985
|
X = X.materialize(2);
|
|
986
986
|
else
|
|
987
|
-
for (; X.width <
|
|
987
|
+
for (; X.width < C; )
|
|
988
988
|
X = X.subsamplePixelCenters(2).materialize(2);
|
|
989
989
|
X = X.averagePixelCentersToGrid().scaleElevation(m).materialize(1);
|
|
990
|
-
const
|
|
990
|
+
const R = y(c[0], X, d, h);
|
|
991
991
|
ot == null || ot();
|
|
992
992
|
const At = De({
|
|
993
|
-
extent:
|
|
993
|
+
extent: d,
|
|
994
994
|
layers: {
|
|
995
|
-
[
|
|
996
|
-
features: Object.entries(
|
|
995
|
+
[f]: {
|
|
996
|
+
features: Object.entries(R).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,
|
|
1003
|
-
[
|
|
1003
|
+
[E]: Math.max(...c.map((bt, Y) => _t % bt === 0 ? Y : 0))
|
|
1004
1004
|
}
|
|
1005
1005
|
};
|
|
1006
1006
|
})
|
|
@@ -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
|
|
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,
|
|
@@ -1063,7 +1063,7 @@ Mt(["exports"], function(o) {
|
|
|
1063
1063
|
const r = i.origin - this.timeOrigin;
|
|
1064
1064
|
for (const l in i.marks) {
|
|
1065
1065
|
const s = l;
|
|
1066
|
-
(this.marks[s] || (this.marks[s] = [])).push(...((n = i.marks[s]) === null || n === void 0 ? void 0 : n.map((m) => m.map((
|
|
1066
|
+
(this.marks[s] || (this.marks[s] = [])).push(...((n = i.marks[s]) === null || n === void 0 ? void 0 : n.map((m) => m.map((h) => h + r))) || []);
|
|
1067
1067
|
}
|
|
1068
1068
|
this.resources.push(...i.resources.map((l) => Ie(l, r)));
|
|
1069
1069
|
}, this.markFinish = this.marker(e);
|
|
@@ -1088,27 +1088,27 @@ Mt(["exports"], function(o) {
|
|
|
1088
1088
|
const s = this.callbacks[l.id];
|
|
1089
1089
|
delete this.callbacks[l.id], s && s(l.error ? new Error(l.error) : void 0, l.response, l.timings);
|
|
1090
1090
|
} else if (l.type === "request") {
|
|
1091
|
-
const s = new Wt("worker"), c = i[l.name], m = new AbortController(),
|
|
1091
|
+
const s = new Wt("worker"), c = i[l.name], m = new AbortController(), h = c.apply(c, [
|
|
1092
1092
|
...l.args,
|
|
1093
1093
|
m,
|
|
1094
1094
|
s
|
|
1095
|
-
]),
|
|
1096
|
-
if (l.id &&
|
|
1095
|
+
]), d = `${l.name}_${l.id}`;
|
|
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];
|
|
@@ -1121,9 +1121,9 @@ Mt(["exports"], function(o) {
|
|
|
1121
1121
|
}
|
|
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
|
-
const s = ++Le, c = new Promise((m,
|
|
1125
|
-
this.postMessage({ id: s, type: "request", name: e, args: l }, i), this.callbacks[s] = (
|
|
1126
|
-
r == null || r.addAll(w),
|
|
1124
|
+
const s = ++Le, c = new Promise((m, h) => {
|
|
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, () => {
|
|
@@ -1131,129 +1131,129 @@ Mt(["exports"], function(o) {
|
|
|
1131
1131
|
}), G(this.timeoutMs, c, n);
|
|
1132
1132
|
}
|
|
1133
1133
|
}
|
|
1134
|
-
o.A = Ge, o.H = $, o.L = Re, o.T = Wt, o.a = z, o.b =
|
|
1134
|
+
o.A = Ge, o.H = $, o.L = Re, o.T = Wt, o.a = z, o.b = y, o.c = Dt, o.d = It, o.e = A, o.f = M, o.g = b, o.p = S;
|
|
1135
1135
|
});
|
|
1136
1136
|
Mt(["./shared"], function(o) {
|
|
1137
|
-
const a = (
|
|
1137
|
+
const a = (p) => Promise.reject(new Error(`No manager registered for ${p}`));
|
|
1138
1138
|
class u {
|
|
1139
1139
|
constructor() {
|
|
1140
|
-
this.managers = {}, this.init = (
|
|
1141
|
-
var
|
|
1142
|
-
return ((
|
|
1143
|
-
}, this.fetchAndParseTile = (
|
|
1144
|
-
var
|
|
1145
|
-
return o.p(((
|
|
1146
|
-
}, this.fetchContourTile = (
|
|
1147
|
-
var
|
|
1148
|
-
return o.f(((
|
|
1140
|
+
this.managers = {}, this.init = (y, _) => (this.managers[y.managerId] = new o.L(y.demUrlPattern, y.cacheSize, y.encoding, y.maxzoom, y.timeoutMs), Promise.resolve()), this.fetchTile = (y, _, F, O, A, z) => {
|
|
1141
|
+
var g;
|
|
1142
|
+
return ((g = this.managers[y]) === null || g === void 0 ? void 0 : g.fetchTile(_, F, O, A, z)) || a(y);
|
|
1143
|
+
}, this.fetchAndParseTile = (y, _, F, O, A, z) => {
|
|
1144
|
+
var g;
|
|
1145
|
+
return o.p(((g = this.managers[y]) === null || g === void 0 ? void 0 : g.fetchAndParseTile(_, F, O, A, z)) || a(y), !0);
|
|
1146
|
+
}, this.fetchContourTile = (y, _, F, O, A, z, g) => {
|
|
1147
|
+
var b;
|
|
1148
|
+
return o.f(((b = this.managers[y]) === null || b === void 0 ? void 0 : b.fetchContourTile(_, F, O, A, z, g)) || a(y));
|
|
1149
1149
|
};
|
|
1150
1150
|
}
|
|
1151
1151
|
}
|
|
1152
|
-
const
|
|
1153
|
-
|
|
1152
|
+
const x = typeof self < "u" ? self : typeof window < "u" ? window : global;
|
|
1153
|
+
x.actor = new o.A(x, new u());
|
|
1154
1154
|
});
|
|
1155
1155
|
Mt(["./shared"], function(o) {
|
|
1156
1156
|
const a = { workerUrl: "" };
|
|
1157
|
-
let u,
|
|
1158
|
-
class
|
|
1157
|
+
let u, x = 0;
|
|
1158
|
+
class p {
|
|
1159
1159
|
constructor() {
|
|
1160
|
-
this.decodeImage = (
|
|
1160
|
+
this.decodeImage = (b, v, S) => o.p(o.d(b, v, S), !1);
|
|
1161
1161
|
}
|
|
1162
1162
|
}
|
|
1163
|
-
function
|
|
1163
|
+
function y() {
|
|
1164
1164
|
if (!u) {
|
|
1165
|
-
const
|
|
1166
|
-
u = new o.A(
|
|
1165
|
+
const g = new Worker(a.workerUrl), b = new p();
|
|
1166
|
+
u = new o.A(g, b);
|
|
1167
1167
|
}
|
|
1168
1168
|
return u;
|
|
1169
1169
|
}
|
|
1170
|
-
class
|
|
1171
|
-
constructor(
|
|
1172
|
-
this.fetchTile = (H, G, U, B,
|
|
1173
|
-
const tt = this.managerId = ++
|
|
1174
|
-
this.actor = ct ||
|
|
1170
|
+
class _ {
|
|
1171
|
+
constructor(b, v, S, M, j, ct) {
|
|
1172
|
+
this.fetchTile = (H, G, U, B, D) => this.actor.send("fetchTile", [], B, D, this.managerId, H, G, U), this.fetchAndParseTile = (H, G, U, B, D) => this.actor.send("fetchAndParseTile", [], B, D, this.managerId, H, G, U), this.fetchContourTile = (H, G, U, B, D, Z) => this.actor.send("fetchContourTile", [], D, Z, this.managerId, H, G, U, B);
|
|
1173
|
+
const tt = this.managerId = ++x;
|
|
1174
|
+
this.actor = ct || y(), this.loaded = this.actor.send("init", [], new AbortController(), void 0, {
|
|
1175
1175
|
cacheSize: v,
|
|
1176
|
-
demUrlPattern:
|
|
1177
|
-
encoding:
|
|
1178
|
-
maxzoom:
|
|
1176
|
+
demUrlPattern: b,
|
|
1177
|
+
encoding: S,
|
|
1178
|
+
maxzoom: M,
|
|
1179
1179
|
managerId: tt,
|
|
1180
1180
|
timeoutMs: j
|
|
1181
1181
|
});
|
|
1182
1182
|
}
|
|
1183
1183
|
}
|
|
1184
1184
|
Blob.prototype.arrayBuffer || (Blob.prototype.arrayBuffer = function() {
|
|
1185
|
-
return new Promise((
|
|
1186
|
-
const
|
|
1187
|
-
|
|
1185
|
+
return new Promise((b, v) => {
|
|
1186
|
+
const S = new FileReader();
|
|
1187
|
+
S.onload = (M) => {
|
|
1188
1188
|
var j;
|
|
1189
|
-
return
|
|
1190
|
-
},
|
|
1189
|
+
return b((j = M.target) === null || j === void 0 ? void 0 : j.result);
|
|
1190
|
+
}, S.onerror = v, S.readAsArrayBuffer(this);
|
|
1191
1191
|
});
|
|
1192
1192
|
});
|
|
1193
|
-
const
|
|
1193
|
+
const F = (g) => (b, v) => {
|
|
1194
1194
|
if (v instanceof AbortController)
|
|
1195
|
-
return
|
|
1195
|
+
return g(b, v);
|
|
1196
1196
|
{
|
|
1197
|
-
const
|
|
1198
|
-
return
|
|
1197
|
+
const S = new AbortController();
|
|
1198
|
+
return g(b, S).then((M) => v(void 0, M.data, M.cacheControl, M.expires), (M) => v(M)), { cancel: () => S.abort() };
|
|
1199
1199
|
}
|
|
1200
|
-
},
|
|
1201
|
-
class
|
|
1202
|
-
constructor({ url:
|
|
1203
|
-
this.timingCallbacks = [], this.onTiming = (
|
|
1204
|
-
this.timingCallbacks.push(
|
|
1205
|
-
}, this.setupMaplibre = (
|
|
1206
|
-
|
|
1207
|
-
}, this.sharedDemProtocolV4 = async (
|
|
1208
|
-
const [K, et, N] = this.parseUrl(
|
|
1200
|
+
}, O = /* @__PURE__ */ new Set();
|
|
1201
|
+
class A {
|
|
1202
|
+
constructor({ url: b, cacheSize: v = 100, id: S = "dem", encoding: M = "terrarium", maxzoom: j = 12, worker: ct = !0, timeoutMs: tt = 1e4, actor: H }) {
|
|
1203
|
+
this.timingCallbacks = [], this.onTiming = (D) => {
|
|
1204
|
+
this.timingCallbacks.push(D);
|
|
1205
|
+
}, this.setupMaplibre = (D) => {
|
|
1206
|
+
D.addProtocol(this.sharedDemProtocolId, this.sharedDemProtocol), D.addProtocol(this.contourProtocolId, this.contourProtocol);
|
|
1207
|
+
}, this.sharedDemProtocolV4 = async (D, Z) => {
|
|
1208
|
+
const [K, et, N] = this.parseUrl(D.url), it = new o.T("main");
|
|
1209
1209
|
let at;
|
|
1210
1210
|
try {
|
|
1211
1211
|
const W = await this.manager.fetchTile(K, et, N, Z, it);
|
|
1212
|
-
return at = it.finish(
|
|
1212
|
+
return at = it.finish(D.url), {
|
|
1213
1213
|
data: await W.data.arrayBuffer(),
|
|
1214
1214
|
cacheControl: W.cacheControl,
|
|
1215
1215
|
expires: W.expires
|
|
1216
1216
|
};
|
|
1217
1217
|
} catch (W) {
|
|
1218
|
-
throw at = it.error(
|
|
1218
|
+
throw at = it.error(D.url), W;
|
|
1219
1219
|
} finally {
|
|
1220
1220
|
this.timingCallbacks.forEach((W) => W(at));
|
|
1221
1221
|
}
|
|
1222
|
-
}, this.contourProtocolV4 = async (
|
|
1222
|
+
}, this.contourProtocolV4 = async (D, Z) => {
|
|
1223
1223
|
const K = new o.T("main");
|
|
1224
1224
|
let et;
|
|
1225
1225
|
try {
|
|
1226
|
-
const [N, it, at] = this.parseUrl(
|
|
1227
|
-
return et = K.finish(
|
|
1226
|
+
const [N, it, at] = this.parseUrl(D.url), W = o.a(D.url), xt = await this.manager.fetchContourTile(N, it, at, o.g(W, N), Z, K);
|
|
1227
|
+
return et = K.finish(D.url), { data: xt.arrayBuffer };
|
|
1228
1228
|
} catch (N) {
|
|
1229
|
-
throw et = K.error(
|
|
1229
|
+
throw et = K.error(D.url), N;
|
|
1230
1230
|
} finally {
|
|
1231
1231
|
this.timingCallbacks.forEach((N) => N(et));
|
|
1232
1232
|
}
|
|
1233
|
-
}, this.contourProtocol =
|
|
1234
|
-
let G =
|
|
1235
|
-
for (;
|
|
1236
|
-
G =
|
|
1237
|
-
|
|
1238
|
-
const B = ct ?
|
|
1239
|
-
this.manager = new B(
|
|
1233
|
+
}, this.contourProtocol = F(this.contourProtocolV4), this.sharedDemProtocol = F(this.sharedDemProtocolV4), this.contourProtocolUrl = (D) => `${this.contourProtocolUrlBase}?${o.e(D)}`;
|
|
1234
|
+
let G = S, U = 1;
|
|
1235
|
+
for (; O.has(G); )
|
|
1236
|
+
G = S + U++;
|
|
1237
|
+
O.add(G), this.sharedDemProtocolId = `${G}-shared`, this.contourProtocolId = `${G}-contour`, this.sharedDemProtocolUrl = `${this.sharedDemProtocolId}://{z}/{x}/{y}`, this.contourProtocolUrlBase = `${this.contourProtocolId}://{z}/{x}/{y}`;
|
|
1238
|
+
const B = ct ? _ : o.L;
|
|
1239
|
+
this.manager = new B(b, v, M, j, tt, H);
|
|
1240
1240
|
}
|
|
1241
|
-
getDemTile(
|
|
1242
|
-
return this.manager.fetchAndParseTile(
|
|
1241
|
+
getDemTile(b, v, S, M) {
|
|
1242
|
+
return this.manager.fetchAndParseTile(b, v, S, M || new AbortController());
|
|
1243
1243
|
}
|
|
1244
|
-
parseUrl(
|
|
1245
|
-
const [, v,
|
|
1246
|
-
return [Number(v), Number(
|
|
1244
|
+
parseUrl(b) {
|
|
1245
|
+
const [, v, S, M] = /\/\/(\d+)\/(\d+)\/(\d+)/.exec(b) || [];
|
|
1246
|
+
return [Number(v), Number(S), Number(M)];
|
|
1247
1247
|
}
|
|
1248
1248
|
}
|
|
1249
1249
|
return {
|
|
1250
1250
|
generateIsolines: o.b,
|
|
1251
|
-
DemSource:
|
|
1251
|
+
DemSource: A,
|
|
1252
1252
|
HeightTile: o.H,
|
|
1253
1253
|
LocalDemManager: o.L,
|
|
1254
1254
|
decodeParsedImage: o.c,
|
|
1255
|
-
set workerUrl(
|
|
1256
|
-
a.workerUrl =
|
|
1255
|
+
set workerUrl(g) {
|
|
1256
|
+
a.workerUrl = g;
|
|
1257
1257
|
},
|
|
1258
1258
|
get workerUrl() {
|
|
1259
1259
|
return a.workerUrl;
|
|
@@ -1266,16 +1266,16 @@ function Xe(o) {
|
|
|
1266
1266
|
}
|
|
1267
1267
|
function Ne(o) {
|
|
1268
1268
|
if (o == null) return Xe;
|
|
1269
|
-
var a, u,
|
|
1270
|
-
return function(
|
|
1271
|
-
|
|
1272
|
-
var
|
|
1273
|
-
for (
|
|
1274
|
-
return
|
|
1269
|
+
var a, u, x = o.scale[0], p = o.scale[1], y = o.translate[0], _ = o.translate[1];
|
|
1270
|
+
return function(F, O) {
|
|
1271
|
+
O || (a = u = 0);
|
|
1272
|
+
var A = 2, z = F.length, g = new Array(z);
|
|
1273
|
+
for (g[0] = (a += F[0]) * x + y, g[1] = (u += F[1]) * p + _; A < z; ) g[A] = F[A], ++A;
|
|
1274
|
+
return g;
|
|
1275
1275
|
};
|
|
1276
1276
|
}
|
|
1277
1277
|
function Ve(o, a) {
|
|
1278
|
-
for (var u,
|
|
1278
|
+
for (var u, x = o.length, p = x - a; p < --x; ) u = o[p], o[p++] = o[x], o[x] = u;
|
|
1279
1279
|
}
|
|
1280
1280
|
function $t(o, a) {
|
|
1281
1281
|
return typeof a == "string" && (a = o.objects[a]), a.type === "GeometryCollection" ? { type: "FeatureCollection", features: a.geometries.map(function(u) {
|
|
@@ -1283,60 +1283,60 @@ function $t(o, a) {
|
|
|
1283
1283
|
}) } : Kt(o, a);
|
|
1284
1284
|
}
|
|
1285
1285
|
function Kt(o, a) {
|
|
1286
|
-
var u = a.id,
|
|
1287
|
-
return u == null &&
|
|
1286
|
+
var u = a.id, x = a.bbox, p = a.properties == null ? {} : a.properties, y = Ue(o, a);
|
|
1287
|
+
return u == null && x == null ? { type: "Feature", properties: p, geometry: y } : x == null ? { type: "Feature", id: u, properties: p, geometry: y } : { type: "Feature", id: u, bbox: x, properties: p, geometry: y };
|
|
1288
1288
|
}
|
|
1289
1289
|
function Ue(o, a) {
|
|
1290
|
-
var u = Ne(o.transform),
|
|
1291
|
-
function
|
|
1292
|
-
|
|
1293
|
-
for (var
|
|
1294
|
-
|
|
1295
|
-
z < 0 && Ve(
|
|
1296
|
-
}
|
|
1297
|
-
function
|
|
1290
|
+
var u = Ne(o.transform), x = o.arcs;
|
|
1291
|
+
function p(z, g) {
|
|
1292
|
+
g.length && g.pop();
|
|
1293
|
+
for (var b = x[z < 0 ? ~z : z], v = 0, S = b.length; v < S; ++v)
|
|
1294
|
+
g.push(u(b[v], v));
|
|
1295
|
+
z < 0 && Ve(g, S);
|
|
1296
|
+
}
|
|
1297
|
+
function y(z) {
|
|
1298
1298
|
return u(z);
|
|
1299
1299
|
}
|
|
1300
|
-
function
|
|
1301
|
-
for (var
|
|
1302
|
-
return
|
|
1300
|
+
function _(z) {
|
|
1301
|
+
for (var g = [], b = 0, v = z.length; b < v; ++b) p(z[b], g);
|
|
1302
|
+
return g.length < 2 && g.push(g[0]), g;
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1305
|
-
for (var
|
|
1306
|
-
return
|
|
1304
|
+
function F(z) {
|
|
1305
|
+
for (var g = _(z); g.length < 4; ) g.push(g[0]);
|
|
1306
|
+
return g;
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1309
|
-
return z.map(
|
|
1308
|
+
function O(z) {
|
|
1309
|
+
return z.map(F);
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1312
|
-
var
|
|
1313
|
-
switch (
|
|
1311
|
+
function A(z) {
|
|
1312
|
+
var g = z.type, b;
|
|
1313
|
+
switch (g) {
|
|
1314
1314
|
case "GeometryCollection":
|
|
1315
|
-
return { type:
|
|
1315
|
+
return { type: g, geometries: z.geometries.map(A) };
|
|
1316
1316
|
case "Point":
|
|
1317
|
-
|
|
1317
|
+
b = y(z.coordinates);
|
|
1318
1318
|
break;
|
|
1319
1319
|
case "MultiPoint":
|
|
1320
|
-
|
|
1320
|
+
b = z.coordinates.map(y);
|
|
1321
1321
|
break;
|
|
1322
1322
|
case "LineString":
|
|
1323
|
-
|
|
1323
|
+
b = _(z.arcs);
|
|
1324
1324
|
break;
|
|
1325
1325
|
case "MultiLineString":
|
|
1326
|
-
|
|
1326
|
+
b = z.arcs.map(_);
|
|
1327
1327
|
break;
|
|
1328
1328
|
case "Polygon":
|
|
1329
|
-
|
|
1329
|
+
b = O(z.arcs);
|
|
1330
1330
|
break;
|
|
1331
1331
|
case "MultiPolygon":
|
|
1332
|
-
|
|
1332
|
+
b = z.arcs.map(O);
|
|
1333
1333
|
break;
|
|
1334
1334
|
default:
|
|
1335
1335
|
return null;
|
|
1336
1336
|
}
|
|
1337
|
-
return { type:
|
|
1337
|
+
return { type: g, coordinates: b };
|
|
1338
1338
|
}
|
|
1339
|
-
return
|
|
1339
|
+
return A(a);
|
|
1340
1340
|
}
|
|
1341
1341
|
const We = {
|
|
1342
1342
|
airspaceStroke: "#AAB7B8",
|
|
@@ -3240,11 +3240,11 @@ const oi = {
|
|
|
3240
3240
|
async function Qt(o) {
|
|
3241
3241
|
const a = await fetch(o);
|
|
3242
3242
|
if (!a.ok) throw new Error(`fetch ${o} → ${a.status}`);
|
|
3243
|
-
const u = a.headers.get("Content-Encoding"),
|
|
3244
|
-
if (u === "gzip" ||
|
|
3243
|
+
const u = a.headers.get("Content-Encoding"), x = a.headers.get("Content-Type") || "";
|
|
3244
|
+
if (u === "gzip" || x.includes("json"))
|
|
3245
3245
|
return a.json();
|
|
3246
|
-
const
|
|
3247
|
-
return new Response(
|
|
3246
|
+
const p = a.body.pipeThrough(new DecompressionStream("gzip"));
|
|
3247
|
+
return new Response(p).json();
|
|
3248
3248
|
}
|
|
3249
3249
|
class ri {
|
|
3250
3250
|
/**
|
|
@@ -3262,16 +3262,16 @@ class ri {
|
|
|
3262
3262
|
constructor(a = {}) {
|
|
3263
3263
|
const {
|
|
3264
3264
|
container: u,
|
|
3265
|
-
theme:
|
|
3266
|
-
apiUrl:
|
|
3267
|
-
spriteUrl:
|
|
3268
|
-
period:
|
|
3269
|
-
layers:
|
|
3270
|
-
center:
|
|
3271
|
-
zoom:
|
|
3265
|
+
theme: x = "light",
|
|
3266
|
+
apiUrl: p = ti,
|
|
3267
|
+
spriteUrl: y,
|
|
3268
|
+
period: _ = null,
|
|
3269
|
+
layers: F = {},
|
|
3270
|
+
center: O = [104, 36],
|
|
3271
|
+
zoom: A = 4,
|
|
3272
3272
|
terrainUrl: z = null
|
|
3273
3273
|
} = a;
|
|
3274
|
-
|
|
3274
|
+
this._apiUrl = p.replace(/\/$/, ""), this._spriteUrl = (y ?? p).replace(/\/$/, ""), this._terrainUrl = z ?? `${this._apiUrl}/api/terrain/{z}/{x}/{y}.png`, this._theme = x, this._period = _, this._center = O, this._zoom = A, this._ready = !1, this._layerVisible = {
|
|
3275
3275
|
// aviation groups — all visible by default
|
|
3276
3276
|
adiz: !0,
|
|
3277
3277
|
fir: !0,
|
|
@@ -3289,15 +3289,8 @@ class ri {
|
|
|
3289
3289
|
terrain: !1,
|
|
3290
3290
|
contour: !1,
|
|
3291
3291
|
// user overrides
|
|
3292
|
-
...
|
|
3293
|
-
}, this._initMap(u)
|
|
3294
|
-
get(p, _, v) {
|
|
3295
|
-
var A;
|
|
3296
|
-
if (typeof _ == "symbol" || _ in p) return Reflect.get(p, _, v);
|
|
3297
|
-
const D = (A = p._map) == null ? void 0 : A[_];
|
|
3298
|
-
return typeof D == "function" ? D.bind(p._map) : void 0;
|
|
3299
|
-
}
|
|
3300
|
-
});
|
|
3292
|
+
...F
|
|
3293
|
+
}, this._initMap(u);
|
|
3301
3294
|
}
|
|
3302
3295
|
// ── Map initialization ────────────────────────────────────────────────────
|
|
3303
3296
|
_initMap(a) {
|
|
@@ -3336,8 +3329,8 @@ class ri {
|
|
|
3336
3329
|
async _initSources() {
|
|
3337
3330
|
if (!this._period)
|
|
3338
3331
|
try {
|
|
3339
|
-
const
|
|
3340
|
-
this._period =
|
|
3332
|
+
const x = await (await fetch(`${this._apiUrl}/api/periods`)).json();
|
|
3333
|
+
this._period = x[x.length - 1];
|
|
3341
3334
|
} catch (u) {
|
|
3342
3335
|
console.warn("[AviationChart] fetchPeriods failed:", u), this._period = "latest";
|
|
3343
3336
|
}
|
|
@@ -3382,15 +3375,15 @@ class ri {
|
|
|
3382
3375
|
}), await this._loadBaseData();
|
|
3383
3376
|
}
|
|
3384
3377
|
async _loadBaseData() {
|
|
3385
|
-
var a, u,
|
|
3378
|
+
var a, u, x, p;
|
|
3386
3379
|
try {
|
|
3387
|
-
const [
|
|
3380
|
+
const [y, _] = await Promise.all([
|
|
3388
3381
|
Qt(`${this._apiUrl}/topjson/land.topojson.gz`),
|
|
3389
3382
|
Qt(`${this._apiUrl}/topjson/boundary.topojson.gz`)
|
|
3390
3383
|
]);
|
|
3391
|
-
(a =
|
|
3392
|
-
} catch (
|
|
3393
|
-
console.error("[AviationChart] loadBaseData failed:",
|
|
3384
|
+
(a = y == null ? void 0 : y.objects) != null && a.land ? (u = this._map.getSource("land")) == null || u.setData($t(y, y.objects.land)) : console.warn("[AviationChart] land topojson missing objects.land"), (x = _ == null ? void 0 : _.objects) != null && x.boundary ? (p = this._map.getSource("boundary")) == null || p.setData($t(_, _.objects.boundary)) : console.warn("[AviationChart] boundary topojson missing objects.boundary");
|
|
3385
|
+
} catch (y) {
|
|
3386
|
+
console.error("[AviationChart] loadBaseData failed:", y);
|
|
3394
3387
|
}
|
|
3395
3388
|
}
|
|
3396
3389
|
_initLayers() {
|
|
@@ -3445,26 +3438,26 @@ class ri {
|
|
|
3445
3438
|
"text-halo-width": 1
|
|
3446
3439
|
}
|
|
3447
3440
|
}), this._layerVisible.terrain && this._map.setTerrain({ source: "terrain", exaggeration: 4 });
|
|
3448
|
-
for (const
|
|
3449
|
-
this._map.getLayer(
|
|
3450
|
-
for (const
|
|
3451
|
-
this._map.getLayer(
|
|
3441
|
+
for (const x of Yt(this._theme))
|
|
3442
|
+
this._map.getLayer(x.id) || this._map.addLayer(x);
|
|
3443
|
+
for (const x of Ht("amm", this._theme))
|
|
3444
|
+
this._map.getLayer(x.id) || this._map.addLayer(x, "fir-line");
|
|
3452
3445
|
}
|
|
3453
3446
|
_applyVisibility() {
|
|
3454
|
-
for (const [
|
|
3455
|
-
const
|
|
3456
|
-
for (const
|
|
3457
|
-
this._map.getLayer(
|
|
3447
|
+
for (const [p, y] of Object.entries(Ct)) {
|
|
3448
|
+
const _ = this._layerVisible[p] !== !1 ? "visible" : "none";
|
|
3449
|
+
for (const F of y)
|
|
3450
|
+
this._map.getLayer(F) && this._map.setLayoutProperty(F, "visibility", _);
|
|
3458
3451
|
}
|
|
3459
3452
|
const a = this._layerVisible.amm !== !1 ? "visible" : "none";
|
|
3460
|
-
for (const
|
|
3461
|
-
this._map.getLayer(
|
|
3453
|
+
for (const p of Pt)
|
|
3454
|
+
this._map.getLayer(p) && this._map.setLayoutProperty(p, "visibility", a);
|
|
3462
3455
|
const u = this._layerVisible.terrain ? "visible" : "none";
|
|
3463
|
-
for (const
|
|
3464
|
-
this._map.getLayer(
|
|
3465
|
-
const
|
|
3466
|
-
for (const
|
|
3467
|
-
this._map.getLayer(
|
|
3456
|
+
for (const p of Zt)
|
|
3457
|
+
this._map.getLayer(p) && this._map.setLayoutProperty(p, "visibility", u);
|
|
3458
|
+
const x = this._layerVisible.contour ? "visible" : "none";
|
|
3459
|
+
for (const p of Jt)
|
|
3460
|
+
this._map.getLayer(p) && this._map.setLayoutProperty(p, "visibility", x);
|
|
3468
3461
|
}
|
|
3469
3462
|
// ── Public API ────────────────────────────────────────────────────────────
|
|
3470
3463
|
/** Raw MapLibre Map instance */
|
|
@@ -3488,18 +3481,18 @@ class ri {
|
|
|
3488
3481
|
this._theme = a;
|
|
3489
3482
|
const u = ut[a] ?? ut.light;
|
|
3490
3483
|
this._map.setPaintProperty("background", "background-color", u.background);
|
|
3491
|
-
const
|
|
3484
|
+
const x = [
|
|
3492
3485
|
"landLaye",
|
|
3493
3486
|
"boundary",
|
|
3494
3487
|
...Object.values(Ct).flat(),
|
|
3495
3488
|
...Pt
|
|
3496
3489
|
];
|
|
3497
|
-
for (const
|
|
3498
|
-
this._map.getLayer(
|
|
3499
|
-
for (const
|
|
3500
|
-
this._map.addLayer(
|
|
3501
|
-
for (const
|
|
3502
|
-
this._map.getLayer(
|
|
3490
|
+
for (const p of x)
|
|
3491
|
+
this._map.getLayer(p) && this._map.removeLayer(p);
|
|
3492
|
+
for (const p of Yt(this._theme))
|
|
3493
|
+
this._map.addLayer(p);
|
|
3494
|
+
for (const p of Ht("amm", this._theme))
|
|
3495
|
+
this._map.getLayer(p.id) || this._map.addLayer(p, "fir-line");
|
|
3503
3496
|
this._applyVisibility();
|
|
3504
3497
|
}
|
|
3505
3498
|
/**
|
|
@@ -3515,41 +3508,41 @@ class ri {
|
|
|
3515
3508
|
*/
|
|
3516
3509
|
setLayerVisible(a, u) {
|
|
3517
3510
|
if (this._layerVisible[a] = u, a === "terrain") {
|
|
3518
|
-
const
|
|
3519
|
-
for (const
|
|
3520
|
-
this._map.getLayer(
|
|
3511
|
+
const y = u ? "visible" : "none";
|
|
3512
|
+
for (const _ of Zt)
|
|
3513
|
+
this._map.getLayer(_) && this._map.setLayoutProperty(_, "visibility", y);
|
|
3521
3514
|
this._map.setTerrain(u ? { source: "terrain", exaggeration: 4 } : null);
|
|
3522
3515
|
return;
|
|
3523
3516
|
}
|
|
3524
3517
|
if (a === "contour") {
|
|
3525
|
-
const
|
|
3526
|
-
for (const
|
|
3527
|
-
this._map.getLayer(
|
|
3518
|
+
const y = u ? "visible" : "none";
|
|
3519
|
+
for (const _ of Jt)
|
|
3520
|
+
this._map.getLayer(_) && this._map.setLayoutProperty(_, "visibility", y);
|
|
3528
3521
|
return;
|
|
3529
3522
|
}
|
|
3530
3523
|
if (a === "amm") {
|
|
3531
|
-
const
|
|
3532
|
-
for (const
|
|
3533
|
-
this._map.getLayer(
|
|
3524
|
+
const y = u ? "visible" : "none";
|
|
3525
|
+
for (const _ of Pt)
|
|
3526
|
+
this._map.getLayer(_) && this._map.setLayoutProperty(_, "visibility", y);
|
|
3534
3527
|
return;
|
|
3535
3528
|
}
|
|
3536
|
-
const
|
|
3537
|
-
if (!
|
|
3529
|
+
const x = Ct[a];
|
|
3530
|
+
if (!x) {
|
|
3538
3531
|
console.warn(`[AviationChart] Unknown layer key: "${a}"`);
|
|
3539
3532
|
return;
|
|
3540
3533
|
}
|
|
3541
|
-
const
|
|
3542
|
-
for (const
|
|
3543
|
-
this._map.getLayer(
|
|
3534
|
+
const p = u ? "visible" : "none";
|
|
3535
|
+
for (const y of x)
|
|
3536
|
+
this._map.getLayer(y) && this._map.setLayoutProperty(y, "visibility", p);
|
|
3544
3537
|
}
|
|
3545
3538
|
/**
|
|
3546
3539
|
* Switch the navdata period. Fetches tiles for the new period immediately.
|
|
3547
3540
|
* @param {string} period
|
|
3548
3541
|
*/
|
|
3549
3542
|
setPeriod(a) {
|
|
3550
|
-
var
|
|
3543
|
+
var x;
|
|
3551
3544
|
this._period = a;
|
|
3552
|
-
const u = (
|
|
3545
|
+
const u = (x = this._map) == null ? void 0 : x.getSource("navdata");
|
|
3553
3546
|
u && u.setTiles([`${this._apiUrl}/api/tiles/${a}/{z}/{x}/{y}.pbf`]);
|
|
3554
3547
|
}
|
|
3555
3548
|
/** Proxy to map.on — returns `this` for chaining */
|