@datosgeo-atdt/geo-ui 0.1.0 → 0.1.1
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/geo-ui.js +355 -355
- package/dist/geo-ui.js.map +1 -1
- package/dist/geo-ui.umd.cjs +10 -10
- package/dist/geo-ui.umd.cjs.map +1 -1
- package/package.json +1 -1
- /package/dist/{geo-ui.css → style.css} +0 -0
package/dist/geo-ui.js
CHANGED
|
@@ -56,7 +56,7 @@ function W_() {
|
|
|
56
56
|
function Pe(r) {
|
|
57
57
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
58
58
|
}
|
|
59
|
-
var Be,
|
|
59
|
+
var Be, je;
|
|
60
60
|
typeof SuppressedError == "function" && SuppressedError, le.prototype = { clone() {
|
|
61
61
|
return new le(this.x, this.y);
|
|
62
62
|
}, add(r) {
|
|
@@ -135,11 +135,11 @@ function W_() {
|
|
|
135
135
|
throw new Error("Expected [x, y] or {x, y} point format");
|
|
136
136
|
};
|
|
137
137
|
var Ye = (function() {
|
|
138
|
-
if (
|
|
138
|
+
if (je) return Be;
|
|
139
139
|
function r(e, i, s, o) {
|
|
140
140
|
this.cx = 3 * e, this.bx = 3 * (s - e) - this.cx, this.ax = 1 - this.cx - this.bx, this.cy = 3 * i, this.by = 3 * (o - i) - this.cy, this.ay = 1 - this.cy - this.by, this.p1x = e, this.p1y = i, this.p2x = s, this.p2y = o;
|
|
141
141
|
}
|
|
142
|
-
return
|
|
142
|
+
return je = 1, Be = r, r.prototype = { sampleCurveX: function(e) {
|
|
143
143
|
return ((this.ax * e + this.bx) * e + this.cx) * e;
|
|
144
144
|
}, sampleCurveY: function(e) {
|
|
145
145
|
return ((this.ay * e + this.by) * e + this.cy) * e;
|
|
@@ -213,16 +213,16 @@ function W_() {
|
|
|
213
213
|
var s = e[0], o = e[1], u = e[2], h = i[0], f = i[1], g = i[2];
|
|
214
214
|
return r[0] = o * g - u * f, r[1] = u * h - s * g, r[2] = s * f - o * h, r;
|
|
215
215
|
}
|
|
216
|
-
var
|
|
217
|
-
function
|
|
216
|
+
var Ue, at = dt;
|
|
217
|
+
function Nt(r, e, i) {
|
|
218
218
|
var s = e[0], o = e[1], u = e[2], h = e[3];
|
|
219
219
|
return r[0] = i[0] * s + i[4] * o + i[8] * u + i[12] * h, r[1] = i[1] * s + i[5] * o + i[9] * u + i[13] * h, r[2] = i[2] * s + i[6] * o + i[10] * u + i[14] * h, r[3] = i[3] * s + i[7] * o + i[11] * u + i[15] * h, r;
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function ei() {
|
|
222
222
|
var r = new st(4);
|
|
223
223
|
return st != Float32Array && (r[0] = 0, r[1] = 0, r[2] = 0), r[3] = 1, r;
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function jt(r, e, i, s) {
|
|
226
226
|
var o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : "zyx", u = Math.PI / 360;
|
|
227
227
|
e *= u, s *= u, i *= u;
|
|
228
228
|
var h = Math.sin(e), f = Math.cos(e), g = Math.sin(i), y = Math.cos(i), v = Math.sin(s), w = Math.cos(s);
|
|
@@ -254,11 +254,11 @@ function W_() {
|
|
|
254
254
|
var r = new st(2);
|
|
255
255
|
return st != Float32Array && (r[0] = 0, r[1] = 0), r;
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function Ut(r, e) {
|
|
258
258
|
var i = new st(2);
|
|
259
259
|
return i[0] = r, i[1] = e, i;
|
|
260
260
|
}
|
|
261
|
-
Mi(),
|
|
261
|
+
Mi(), Ue = new st(4), st != Float32Array && (Ue[0] = 0, Ue[1] = 0, Ue[2] = 0, Ue[3] = 0), Mi(), he(1, 0, 0), he(0, 1, 0), ei(), ei(), pi(), ot();
|
|
262
262
|
const Ze = 8192;
|
|
263
263
|
function xi(r, e, i) {
|
|
264
264
|
return e * (Ze / (r.tileSize * Math.pow(2, i - r.tileID.overscaledZ)));
|
|
@@ -280,7 +280,7 @@ function W_() {
|
|
|
280
280
|
return (u) => o.solve(u);
|
|
281
281
|
}
|
|
282
282
|
const Tt = Yt(0.25, 0.1, 0.25, 1);
|
|
283
|
-
function
|
|
283
|
+
function Gt(r, e, i) {
|
|
284
284
|
return Math.min(i, Math.max(e, r));
|
|
285
285
|
}
|
|
286
286
|
function fi(r, e, i) {
|
|
@@ -452,7 +452,7 @@ function W_() {
|
|
|
452
452
|
super("error", lt({ error: e }, i));
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
|
-
class
|
|
455
|
+
class qt {
|
|
456
456
|
on(e, i) {
|
|
457
457
|
return this._listeners = this._listeners || {}, We(e, i, this._listeners), { unsubscribe: () => {
|
|
458
458
|
this.off(e, i);
|
|
@@ -2267,7 +2267,7 @@ function W_() {
|
|
|
2267
2267
|
}
|
|
2268
2268
|
return h;
|
|
2269
2269
|
}
|
|
2270
|
-
function
|
|
2270
|
+
function Zt(r, e, i, s, o, u) {
|
|
2271
2271
|
if (!u) return;
|
|
2272
2272
|
const h = Ha(ll(s, u), o, i);
|
|
2273
2273
|
h < e && r.push([h, u, [0, 0]]);
|
|
@@ -2297,7 +2297,7 @@ function W_() {
|
|
|
2297
2297
|
}
|
|
2298
2298
|
} else {
|
|
2299
2299
|
const w = Wa(y, e);
|
|
2300
|
-
|
|
2300
|
+
Zt(h, u, s, r, f, w[0]), Zt(h, u, s, r, f, w[1]);
|
|
2301
2301
|
}
|
|
2302
2302
|
}
|
|
2303
2303
|
return u;
|
|
@@ -3882,7 +3882,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
3882
3882
|
}
|
|
3883
3883
|
}
|
|
3884
3884
|
Xe("DataDrivenProperty", nt), Xe("DataConstantProperty", et), Xe("CrossFadedDataDrivenProperty", ya), Xe("CrossFadedProperty", mo), Xe("ColorRampProperty", go);
|
|
3885
|
-
class Nr extends
|
|
3885
|
+
class Nr extends qt {
|
|
3886
3886
|
constructor(e, i, s) {
|
|
3887
3887
|
if (super(), this.id = e.id, this.type = e.type, this._globalState = s, this._featureFilter = { filter: () => !0, needGeometry: !1, getGlobalStateRefs: () => /* @__PURE__ */ new Set() }, e.type !== "custom" && (this.metadata = e.metadata, this.minzoom = e.minzoom, this.maxzoom = e.maxzoom, this._visibilityExpression = (function(o, u) {
|
|
3888
3888
|
return new ua(o, u);
|
|
@@ -4667,13 +4667,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4667
4667
|
class Fe extends d {
|
|
4668
4668
|
}
|
|
4669
4669
|
const Le = Ni([{ name: "a_pos", components: 2, type: "Int16" }], 4), { members: Ae } = Le;
|
|
4670
|
-
class
|
|
4670
|
+
class Ne {
|
|
4671
4671
|
constructor(e = []) {
|
|
4672
4672
|
this._forceNewSegmentOnNextPrepare = !1, this.segments = e;
|
|
4673
4673
|
}
|
|
4674
4674
|
prepareSegment(e, i, s, o) {
|
|
4675
4675
|
const u = this.segments[this.segments.length - 1];
|
|
4676
|
-
return e >
|
|
4676
|
+
return e > Ne.MAX_VERTEX_ARRAY_LENGTH && yt(`Max vertices per segment is ${Ne.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${Ne.MAX_VERTEX_ARRAY_LENGTH} vertices.`), this._forceNewSegmentOnNextPrepare || !u || u.vertexLength + e > Ne.MAX_VERTEX_ARRAY_LENGTH || u.sortKey !== o ? this.createNewSegment(i, s, o) : u;
|
|
4677
4677
|
}
|
|
4678
4678
|
createNewSegment(e, i, s) {
|
|
4679
4679
|
const o = { vertexOffset: e.length, primitiveOffset: i.length, vertexLength: 0, primitiveLength: 0, vaos: {} };
|
|
@@ -4692,13 +4692,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4692
4692
|
for (const e of this.segments) for (const i in e.vaos) e.vaos[i].destroy();
|
|
4693
4693
|
}
|
|
4694
4694
|
static simpleSegment(e, i, s, o) {
|
|
4695
|
-
return new
|
|
4695
|
+
return new Ne([{ vertexOffset: e, primitiveOffset: i, vertexLength: s, primitiveLength: o, vaos: {}, sortKey: 0 }]);
|
|
4696
4696
|
}
|
|
4697
4697
|
}
|
|
4698
4698
|
function gt(r, e) {
|
|
4699
|
-
return 256 * (r =
|
|
4699
|
+
return 256 * (r = Gt(Math.floor(r), 0, 255)) + Gt(Math.floor(e), 0, 255);
|
|
4700
4700
|
}
|
|
4701
|
-
|
|
4701
|
+
Ne.MAX_VERTEX_ARRAY_LENGTH = Math.pow(2, 16) - 1, Xe("SegmentVector", Ne);
|
|
4702
4702
|
const Ht = Ni([{ name: "a_pattern_from", components: 4, type: "Uint16" }, { name: "a_pattern_to", components: 4, type: "Uint16" }, { name: "a_pixel_ratio_from", components: 1, type: "Uint16" }, { name: "a_pixel_ratio_to", components: 1, type: "Uint16" }]), gi = Ni([{ name: "a_dasharray_from", components: 4, type: "Uint16" }, { name: "a_dasharray_to", components: 4, type: "Uint16" }]);
|
|
4703
4703
|
var li, wi, ci, Ri = { exports: {} }, Ti = { exports: {} }, Qi = { exports: {} }, qi = (function() {
|
|
4704
4704
|
if (ci) return Ri.exports;
|
|
@@ -4901,7 +4901,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
4901
4901
|
this.paintVertexBuffer && this.paintVertexBuffer.destroy();
|
|
4902
4902
|
}
|
|
4903
4903
|
setUniform(e, i) {
|
|
4904
|
-
const s = this.useIntegerZoom ? Math.floor(i.zoom) : i.zoom, o =
|
|
4904
|
+
const s = this.useIntegerZoom ? Math.floor(i.zoom) : i.zoom, o = Gt(this.expression.interpolationFactor(s, this.zoom, this.zoom + 1), 0, 1);
|
|
4905
4905
|
e.set(o);
|
|
4906
4906
|
}
|
|
4907
4907
|
getBinding(e, i, s) {
|
|
@@ -5136,7 +5136,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5136
5136
|
const o = i[s];
|
|
5137
5137
|
for (let u = 0; u < o.length; u++) {
|
|
5138
5138
|
const h = o[u], f = Math.round(h.x * e), g = Math.round(h.y * e);
|
|
5139
|
-
h.x =
|
|
5139
|
+
h.x = Gt(f, An, Vl), h.y = Gt(g, An, Vl), (f < h.x || f > h.x + 1 || g < h.y || g > h.y + 1) && yt("Geometry exceeds allowed extent, reduce your vector tile buffer size");
|
|
5140
5140
|
}
|
|
5141
5141
|
}
|
|
5142
5142
|
return i;
|
|
@@ -5150,7 +5150,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
5150
5150
|
}
|
|
5151
5151
|
class To {
|
|
5152
5152
|
constructor(e) {
|
|
5153
|
-
this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.layoutVertexArray = new W(), this.indexArray = new ve(), this.segments = new
|
|
5153
|
+
this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.layoutVertexArray = new W(), this.indexArray = new ve(), this.segments = new Ne(), this.programConfigurations = new Qn(e.layers, e.zoom), this.stateDependentLayerIds = this.layers.filter(((i) => i.isStateDependent())).map(((i) => i.id));
|
|
5154
5154
|
}
|
|
5155
5155
|
populate(e, i, s) {
|
|
5156
5156
|
const o = this.layers[0], u = [];
|
|
@@ -6111,7 +6111,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6111
6111
|
}
|
|
6112
6112
|
function Wd(r, e, i, s, o, u, h, f, g) {
|
|
6113
6113
|
const y = o.length / 2, v = h && f && g;
|
|
6114
|
-
if (y <
|
|
6114
|
+
if (y < Ne.MAX_VERTEX_ARRAY_LENGTH) {
|
|
6115
6115
|
const w = e.prepareSegment(y, i, s), S = w.vertexLength;
|
|
6116
6116
|
for (let z = 0; z < u.length; z += 3) s.emplaceBack(S + u[z], S + u[z + 1], S + u[z + 2]);
|
|
6117
6117
|
let M, A;
|
|
@@ -6130,7 +6130,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6130
6130
|
for (let te = 2; te < z.length; te += 3) {
|
|
6131
6131
|
const me = z[te - 2], Ie = z[te - 1], Se = z[te];
|
|
6132
6132
|
let Ce = j[me] < N, Ve = j[Ie] < N, ze = j[Se] < N;
|
|
6133
|
-
G.vertexLength + ((Ce ? 1 : 0) + (Ve ? 1 : 0) + (ze ? 1 : 0)) >
|
|
6133
|
+
G.vertexLength + ((Ce ? 1 : 0) + (Ve ? 1 : 0) + (ze ? 1 : 0)) > Ne.MAX_VERTEX_ARRAY_LENGTH && (G = w.createNewSegment(S, M), N = X.count, Ce = !0, Ve = !0, ze = !0, K = 0);
|
|
6134
6134
|
const Me = Hl(j, A, R, X, me, Ce, G), be = Hl(j, A, R, X, Ie, Ve, G), He = Hl(j, A, R, X, Se, ze, G);
|
|
6135
6135
|
M.emplaceBack(K + Me - N, K + be - N, K + He - N), G.primitiveLength++;
|
|
6136
6136
|
}
|
|
@@ -6144,7 +6144,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6144
6144
|
for (let Ie = 1; Ie < z[te].length; Ie += 2) {
|
|
6145
6145
|
const Se = me[Ie - 1], Ce = me[Ie];
|
|
6146
6146
|
let Ve = j[Se] < N, ze = j[Ce] < N;
|
|
6147
|
-
G.vertexLength + ((Ve ? 1 : 0) + (ze ? 1 : 0)) >
|
|
6147
|
+
G.vertexLength + ((Ve ? 1 : 0) + (ze ? 1 : 0)) > Ne.MAX_VERTEX_ARRAY_LENGTH && (G = w.createNewSegment(S, M), N = X.count, Ve = !0, ze = !0, K = 0);
|
|
6148
6148
|
const Me = Hl(j, A, R, X, Se, Ve, G), be = Hl(j, A, R, X, Ce, ze, G);
|
|
6149
6149
|
M.emplaceBack(K + Me - N, K + be - N), G.primitiveLength++;
|
|
6150
6150
|
}
|
|
@@ -6160,7 +6160,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6160
6160
|
}
|
|
6161
6161
|
class Ih {
|
|
6162
6162
|
constructor(e) {
|
|
6163
|
-
this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.patternFeatures = [], this.layoutVertexArray = new Z(), this.indexArray = new ve(), this.indexArray2 = new Fe(), this.programConfigurations = new Qn(e.layers, e.zoom), this.segments = new
|
|
6163
|
+
this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.patternFeatures = [], this.layoutVertexArray = new Z(), this.indexArray = new ve(), this.indexArray2 = new Fe(), this.programConfigurations = new Qn(e.layers, e.zoom), this.segments = new Ne(), this.segments2 = new Ne(), this.stateDependentLayerIds = this.layers.filter(((i) => i.isStateDependent())).map(((i) => i.id));
|
|
6164
6164
|
}
|
|
6165
6165
|
populate(e, i, s) {
|
|
6166
6166
|
this.hasDependencies = gu("fill", this.layers, i);
|
|
@@ -6371,7 +6371,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6371
6371
|
}
|
|
6372
6372
|
class Ch {
|
|
6373
6373
|
constructor(e) {
|
|
6374
|
-
this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.layoutVertexArray = new Y(), this.centroidVertexArray = new q(), this.indexArray = new ve(), this.programConfigurations = new Qn(e.layers, e.zoom), this.segments = new
|
|
6374
|
+
this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.layoutVertexArray = new Y(), this.centroidVertexArray = new q(), this.indexArray = new ve(), this.programConfigurations = new Qn(e.layers, e.zoom), this.segments = new Ne(), this.stateDependentLayerIds = this.layers.filter(((i) => i.isStateDependent())).map(((i) => i.id));
|
|
6375
6375
|
}
|
|
6376
6376
|
populate(e, i, s) {
|
|
6377
6377
|
this.features = [], this.hasDependencies = gu("fill-extrusion", this.layers, i);
|
|
@@ -6432,7 +6432,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6432
6432
|
for (let o = 1; o < e.length; o++) {
|
|
6433
6433
|
const u = e[o], h = e[o - 1];
|
|
6434
6434
|
if (rg(u, h)) continue;
|
|
6435
|
-
i.segment.vertexLength + 4 >
|
|
6435
|
+
i.segment.vertexLength + 4 > Ne.MAX_VERTEX_ARRAY_LENGTH && (i.segment = this.segments.prepareSegment(4, this.layoutVertexArray, this.indexArray));
|
|
6436
6436
|
const f = u.sub(h)._perp()._unit(), g = h.dist(u);
|
|
6437
6437
|
s + g > 32768 && (s = 0), Yl(this.layoutVertexArray, u.x, u.y, f.x, f.y, 0, 0, s), Yl(this.layoutVertexArray, u.x, u.y, f.x, f.y, 0, 1, s), s += g, Yl(this.layoutVertexArray, h.x, h.y, f.x, f.y, 0, 0, s), Yl(this.layoutVertexArray, h.x, h.y, f.x, f.y, 0, 1, s);
|
|
6438
6438
|
const y = i.segment.vertexLength;
|
|
@@ -6475,7 +6475,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6475
6475
|
const z = [];
|
|
6476
6476
|
for (const R of M) {
|
|
6477
6477
|
const j = [R.x, R.y, 0, 1];
|
|
6478
|
-
|
|
6478
|
+
Nt(j, j, A), z.push(new le(j[0] / j[3], j[1] / j[3]));
|
|
6479
6479
|
}
|
|
6480
6480
|
return z;
|
|
6481
6481
|
})(g, f), S = (function(M, A, z, R) {
|
|
@@ -6483,8 +6483,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6483
6483
|
for (const Ve of M) {
|
|
6484
6484
|
const ze = [], Me = [];
|
|
6485
6485
|
for (const be of Ve) {
|
|
6486
|
-
const He = be.x, $e = be.y, Ke = R[0] * He + R[4] * $e + R[12], Ge = R[1] * He + R[5] * $e + R[13], it = R[2] * He + R[6] * $e + R[14], Ot = R[3] * He + R[7] * $e + R[15], At = it + K, Si = Ot + te, dr = Ke + me, Hi = Ge + Ie, Pi = it + Se, _i = Ot + Ce,
|
|
6487
|
-
|
|
6486
|
+
const He = be.x, $e = be.y, Ke = R[0] * He + R[4] * $e + R[12], Ge = R[1] * He + R[5] * $e + R[13], it = R[2] * He + R[6] * $e + R[14], Ot = R[3] * He + R[7] * $e + R[15], At = it + K, Si = Ot + te, dr = Ke + me, Hi = Ge + Ie, Pi = it + Se, _i = Ot + Ce, $t = new le((Ke + N) / Si, (Ge + G) / Si);
|
|
6487
|
+
$t.z = At / Si, ze.push($t);
|
|
6488
6488
|
const Fi = new le(dr / _i, Hi / _i);
|
|
6489
6489
|
Fi.z = Pi / _i, Me.push(Fi);
|
|
6490
6490
|
}
|
|
@@ -6532,7 +6532,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
6532
6532
|
constructor(e) {
|
|
6533
6533
|
this.zoom = e.zoom, this.overscaling = e.overscaling, this.layers = e.layers, this.layerIds = this.layers.map(((i) => i.id)), this.index = e.index, this.hasDependencies = !1, this.patternFeatures = [], this.lineClipsArray = [], this.gradients = {}, this.layers.forEach(((i) => {
|
|
6534
6534
|
this.gradients[i.id] = {};
|
|
6535
|
-
})), this.layoutVertexArray = new ie(), this.layoutVertexArray2 = new H(), this.indexArray = new ve(), this.programConfigurations = new Qn(e.layers, e.zoom), this.segments = new
|
|
6535
|
+
})), this.layoutVertexArray = new ie(), this.layoutVertexArray2 = new H(), this.indexArray = new ve(), this.programConfigurations = new Qn(e.layers, e.zoom), this.segments = new Ne(), this.maxLineLength = 0, this.stateDependentLayerIds = this.layers.filter(((i) => i.isStateDependent())).map(((i) => i.id));
|
|
6536
6536
|
}
|
|
6537
6537
|
populate(e, i, s) {
|
|
6538
6538
|
this.hasDependencies = gu("line", this.layers, i) || this.hasLineDasharray(this.layers);
|
|
@@ -7339,20 +7339,20 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7339
7339
|
let Ge = 0, it = 0, Ot = 0, At = 0;
|
|
7340
7340
|
const Si = Me === "right" ? 1 : Me === "left" ? 0 : 0.5, dr = er / Ke;
|
|
7341
7341
|
let Hi = 0;
|
|
7342
|
-
for (const
|
|
7343
|
-
|
|
7344
|
-
const Fi =
|
|
7342
|
+
for (const $t of Ce) {
|
|
7343
|
+
$t.trim();
|
|
7344
|
+
const Fi = $t.getMaxScale(), Gi = { positionedGlyphs: [], lineOffset: 0 };
|
|
7345
7345
|
te.positionedLines[Hi] = Gi;
|
|
7346
7346
|
const di = Gi.positionedGlyphs;
|
|
7347
7347
|
let Rr = 0;
|
|
7348
|
-
if (
|
|
7348
|
+
if (!$t.length()) {
|
|
7349
7349
|
it += Ve, ++Hi;
|
|
7350
7350
|
continue;
|
|
7351
7351
|
}
|
|
7352
|
-
const pr = kg(Se,
|
|
7352
|
+
const pr = kg(Se, $t, dr);
|
|
7353
7353
|
let Fr = 0;
|
|
7354
|
-
for (const rr of
|
|
7355
|
-
const Ci =
|
|
7354
|
+
for (const rr of $t.text) {
|
|
7355
|
+
const Ci = $t.getSection(Fr), Xi = rr.codePointAt(0), Li = Rg(be, $e, Xi), nr = { glyph: Xi, imageName: null, x: Ge, y: it + -17, vertical: Li, scale: 1, fontStack: "", sectionIndex: $t.getSectionIndex(Fr), metrics: null, rect: null };
|
|
7356
7356
|
let is;
|
|
7357
7357
|
if ("fontStack" in Ci) {
|
|
7358
7358
|
if (is = Fg(Ci, Xi, Li, pr, me, Ie), !is) continue;
|
|
@@ -7369,11 +7369,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7369
7369
|
it += ln, At = Math.max(ln, At), ++Hi;
|
|
7370
7370
|
}
|
|
7371
7371
|
const { horizontalAlign: Pi, verticalAlign: _i } = kh(ze);
|
|
7372
|
-
(function(
|
|
7372
|
+
(function($t, Fi, Gi, di, Rr, pr, Fr, ln, rr) {
|
|
7373
7373
|
const Ci = (Fi - Gi) * Rr;
|
|
7374
7374
|
let Xi = 0;
|
|
7375
7375
|
Xi = pr !== Fr ? -ln * di - -17 : -di * rr * Fr + 0.5 * Fr;
|
|
7376
|
-
for (const Li of
|
|
7376
|
+
for (const Li of $t) for (const nr of Li.positionedGlyphs) nr.x += Ci, nr.y += Xi;
|
|
7377
7377
|
})(te.positionedLines, Si, Pi, _i, Ot, At, Ve, it, Ce.length), te.top += -_i * it, te.bottom = te.top + it, te.left += -Pi * Ot, te.right = te.left + Ot;
|
|
7378
7378
|
})(K, e, i, s, R, h, f, g, w, y, S, A), !(function(te) {
|
|
7379
7379
|
for (const me of te) if (me.positionedGlyphs.length !== 0) return !1;
|
|
@@ -7525,7 +7525,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7525
7525
|
}
|
|
7526
7526
|
class Lh {
|
|
7527
7527
|
constructor(e) {
|
|
7528
|
-
this.layoutVertexArray = new J(), this.indexArray = new ve(), this.programConfigurations = e, this.segments = new
|
|
7528
|
+
this.layoutVertexArray = new J(), this.indexArray = new ve(), this.programConfigurations = e, this.segments = new Ne(), this.dynamicLayoutVertexArray = new oe(), this.opacityVertexArray = new Te(), this.hasVisibleVertices = !1, this.placedSymbolArray = new m();
|
|
7529
7529
|
}
|
|
7530
7530
|
isEmpty() {
|
|
7531
7531
|
return this.layoutVertexArray.length === 0 && this.indexArray.length === 0 && this.dynamicLayoutVertexArray.length === 0 && this.opacityVertexArray.length === 0;
|
|
@@ -7540,7 +7540,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
7540
7540
|
Xe("SymbolBuffers", Lh);
|
|
7541
7541
|
class Bh {
|
|
7542
7542
|
constructor(e, i, s) {
|
|
7543
|
-
this.layoutVertexArray = new e(), this.layoutAttributes = i, this.indexArray = new s(), this.segments = new
|
|
7543
|
+
this.layoutVertexArray = new e(), this.layoutAttributes = i, this.indexArray = new s(), this.segments = new Ne(), this.collisionVertexArray = new xe();
|
|
7544
7544
|
}
|
|
7545
7545
|
upload(e) {
|
|
7546
7546
|
this.layoutVertexBuffer = e.createVertexBuffer(this.layoutVertexArray, this.layoutAttributes), this.indexBuffer = e.createIndexBuffer(this.indexArray), this.collisionVertexBuffer = e.createVertexBuffer(this.collisionVertexArray, mg.members, !0);
|
|
@@ -9553,9 +9553,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
9553
9553
|
return it ? (function(Si, dr, Hi) {
|
|
9554
9554
|
const Pi = new BigInt64Array(Si.size());
|
|
9555
9555
|
let _i = 0;
|
|
9556
|
-
for (let
|
|
9557
|
-
const Fi = Number(dr[
|
|
9558
|
-
let Gi = dr[
|
|
9556
|
+
for (let $t = 0; $t < Hi; $t++) {
|
|
9557
|
+
const Fi = Number(dr[$t]);
|
|
9558
|
+
let Gi = dr[$t + Hi];
|
|
9559
9559
|
Gi = Gi >> 1n ^ -(1n & Gi);
|
|
9560
9560
|
for (let di = _i; di < _i + Fi; di++) Si.get(di) ? Pi[di] = Gi : (Pi[di] = 0n, _i++);
|
|
9561
9561
|
_i += Fi;
|
|
@@ -9564,8 +9564,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
9564
9564
|
})(Ot, Ke, At.runs) : (function(Si, dr, Hi) {
|
|
9565
9565
|
const Pi = new BigInt64Array(Si.size());
|
|
9566
9566
|
let _i = 0;
|
|
9567
|
-
for (let
|
|
9568
|
-
const Fi = Number(dr[
|
|
9567
|
+
for (let $t = 0; $t < Hi; $t++) {
|
|
9568
|
+
const Fi = Number(dr[$t]), Gi = dr[$t + Hi];
|
|
9569
9569
|
for (let di = _i; di < _i + Fi; di++) Si.get(di) ? Pi[di] = Gi : (Pi[di] = 0n, _i++);
|
|
9570
9570
|
_i += Fi;
|
|
9571
9571
|
}
|
|
@@ -10268,13 +10268,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
10268
10268
|
(u.textFitWidth || u.textFitHeight) && (y = _p(r)), j = ku(v, 0, be[0]), N = ku(w, 0, be[1]), X = ku(v, be[0], be[2]), G = ku(w, be[1], be[3]), K = be[0] - j, me = be[1] - N, te = He - X, Ie = $e - G;
|
|
10269
10269
|
}
|
|
10270
10270
|
const Se = y.x1, Ce = y.y1, Ve = y.x2 - Se, ze = y.y2 - Ce, Me = (be, He, $e, Ke) => {
|
|
10271
|
-
const Ge = Ru(be.stretch - j, X, Ve, Se), it = Fu(be.fixed - K, te, be.stretch, M), Ot = Ru(He.stretch - N, G, ze, Ce), At = Fu(He.fixed - me, Ie, He.stretch, A), Si = Ru($e.stretch - j, X, Ve, Se), dr = Fu($e.fixed - K, te, $e.stretch, M), Hi = Ru(Ke.stretch - N, G, ze, Ce), Pi = Fu(Ke.fixed - me, Ie, Ke.stretch, A), _i = new le(Ge, Ot),
|
|
10271
|
+
const Ge = Ru(be.stretch - j, X, Ve, Se), it = Fu(be.fixed - K, te, be.stretch, M), Ot = Ru(He.stretch - N, G, ze, Ce), At = Fu(He.fixed - me, Ie, He.stretch, A), Si = Ru($e.stretch - j, X, Ve, Se), dr = Fu($e.fixed - K, te, $e.stretch, M), Hi = Ru(Ke.stretch - N, G, ze, Ce), Pi = Fu(Ke.fixed - me, Ie, Ke.stretch, A), _i = new le(Ge, Ot), $t = new le(Si, Ot), Fi = new le(Si, Hi), Gi = new le(Ge, Hi), di = new le(it / h, At / h), Rr = new le(dr / h, Pi / h), pr = e * Math.PI / 180;
|
|
10272
10272
|
if (pr) {
|
|
10273
10273
|
const rr = Math.sin(pr), Ci = Math.cos(pr), Xi = [Ci, -rr, rr, Ci];
|
|
10274
|
-
_i._matMult(Xi),
|
|
10274
|
+
_i._matMult(Xi), $t._matMult(Xi), Gi._matMult(Xi), Fi._matMult(Xi);
|
|
10275
10275
|
}
|
|
10276
10276
|
const Fr = be.stretch + be.fixed, ln = He.stretch + He.fixed;
|
|
10277
|
-
return { tl: _i, tr:
|
|
10277
|
+
return { tl: _i, tr: $t, bl: Gi, br: Fi, tex: { x: u.paddedRect.x + 1 + Fr, y: u.paddedRect.y + 1 + ln, w: $e.stretch + $e.fixed - Fr, h: Ke.stretch + Ke.fixed - ln }, writingMode: void 0, glyphOffset: [0, 0], sectionIndex: 0, pixelOffsetTL: di, pixelOffsetBR: Rr, minFontScaleX: te / h / Ve, minFontScaleY: Ie / h / ze, isSDF: i };
|
|
10278
10278
|
};
|
|
10279
10279
|
if (s && (u.stretchX || u.stretchY)) {
|
|
10280
10280
|
const be = Sf(v, z, M), He = Sf(w, R, A);
|
|
@@ -10509,18 +10509,18 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
10509
10509
|
let Me;
|
|
10510
10510
|
s && ze !== "none" && (r.allowVerticalPlacement && i.vertical && (Me = yp(s, i.vertical, ze, M.get("icon-text-fit-padding"), A, R)), z && (s = yp(s, z, ze, M.get("icon-text-fit-padding"), A, R)));
|
|
10511
10511
|
const be = v ? w.line.getGranularityForZoomLevel(v.z) : 1, He = ($e, Ke) => {
|
|
10512
|
-
Ke.x < 0 || Ke.x >= Ze || Ke.y < 0 || Ke.y >= Ze || (function(Ge, it, Ot, At, Si, dr, Hi, Pi, _i,
|
|
10512
|
+
Ke.x < 0 || Ke.x >= Ze || Ke.y < 0 || Ke.y >= Ze || (function(Ge, it, Ot, At, Si, dr, Hi, Pi, _i, $t, Fi, Gi, di, Rr, pr, Fr, ln, rr, Ci, Xi, Li, nr, is, gn, sc) {
|
|
10513
10513
|
const Fs = Ge.addToLineVertexArray(it, Ot);
|
|
10514
10514
|
let Da, Vo, jo, No, zf = 0, kf = 0, Rf = 0, Ff = 0, pd = -1, fd = -1;
|
|
10515
10515
|
const rs = {};
|
|
10516
10516
|
let Lf = Ui("");
|
|
10517
10517
|
if (Ge.allowVerticalPlacement && At.vertical) {
|
|
10518
10518
|
const Sr = Pi.layout.get("text-rotate").evaluate(Li, {}, gn) + 90;
|
|
10519
|
-
jo = new Lu(_i, it,
|
|
10519
|
+
jo = new Lu(_i, it, $t, Fi, Gi, At.vertical, di, Rr, pr, Sr), Hi && (No = new Lu(_i, it, $t, Fi, Gi, Hi, ln, rr, pr, Sr));
|
|
10520
10520
|
}
|
|
10521
10521
|
if (Si) {
|
|
10522
10522
|
const Sr = Pi.layout.get("icon-rotate").evaluate(Li, {}), en = Pi.layout.get("icon-text-fit") !== "none", za = Tf(Si, Sr, is, en), yn = Hi ? Tf(Hi, Sr, is, en) : void 0;
|
|
10523
|
-
Vo = new Lu(_i, it,
|
|
10523
|
+
Vo = new Lu(_i, it, $t, Fi, Gi, Si, ln, rr, !1, Sr), zf = 4 * za.length;
|
|
10524
10524
|
const ka = Ge.iconSizeData;
|
|
10525
10525
|
let kn = null;
|
|
10526
10526
|
ka.kind === "source" ? (kn = [es * Pi.layout.get("icon-size").evaluate(Li, {})], kn[0] > Ds && yt(`${Ge.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)) : ka.kind === "composite" && (kn = [es * nr.compositeIconSizes[0].evaluate(Li, {}, gn), es * nr.compositeIconSizes[1].evaluate(Li, {}, gn)], (kn[0] > Ds || kn[1] > Ds) && yt(`${Ge.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)), Ge.addSymbols(Ge.icon, za, kn, Xi, Ci, Li, P.az.none, it, Fs.lineStartIndex, Fs.lineLength, -1, gn), pd = Ge.icon.placedSymbolArray.length - 1, yn && (kf = 4 * yn.length, Ge.addSymbols(Ge.icon, yn, kn, Xi, Ci, Li, P.az.vertical, it, Fs.lineStartIndex, Fs.lineLength, -1, gn), fd = Ge.icon.placedSymbolArray.length - 1);
|
|
@@ -10531,7 +10531,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
10531
10531
|
if (!Da) {
|
|
10532
10532
|
Lf = Ui(en.text);
|
|
10533
10533
|
const yn = Pi.layout.get("text-rotate").evaluate(Li, {}, gn);
|
|
10534
|
-
Da = new Lu(_i, it,
|
|
10534
|
+
Da = new Lu(_i, it, $t, Fi, Gi, en, di, Rr, pr, yn);
|
|
10535
10535
|
}
|
|
10536
10536
|
const za = en.positionedLines.length === 1;
|
|
10537
10537
|
if (Rf += If(Ge, it, en, dr, Pi, pr, Li, Fr, Fs, At.vertical ? P.az.horizontal : P.az.horizontalOnly, za ? Bf : [Sr], rs, pd, nr, gn), za) break;
|
|
@@ -10551,7 +10551,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
10551
10551
|
}
|
|
10552
10552
|
return [za, Sr.length];
|
|
10553
10553
|
})(Ge.textAnchorOffsets, O_);
|
|
10554
|
-
Ge.symbolInstances.emplaceBack(it.x, it.y, rs.right >= 0 ? rs.right : -1, rs.center >= 0 ? rs.center : -1, rs.left >= 0 ? rs.left : -1, rs.vertical || -1, pd, fd, Lf, A_, D_, z_, k_, R_, F_, L_, B_,
|
|
10554
|
+
Ge.symbolInstances.emplaceBack(it.x, it.y, rs.right >= 0 ? rs.right : -1, rs.center >= 0 ? rs.center : -1, rs.left >= 0 ? rs.left : -1, rs.vertical || -1, pd, fd, Lf, A_, D_, z_, k_, R_, F_, L_, B_, $t, Rf, Ff, zf, kf, Of, 0, di, _n, V_, j_);
|
|
10555
10555
|
})(r, Ke, $e, i, s, o, Me, r.layers[0], r.collisionBoxArray, e.index, e.sourceLayerIndex, r.index, j, [K, K, K, K], Ie, g, N, te, Se, A, e, u, y, v, h);
|
|
10556
10556
|
};
|
|
10557
10557
|
if (Ce === "line") for (const $e of mf(e.geometry, 0, 0, Ze, Ze)) {
|
|
@@ -10588,7 +10588,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
10588
10588
|
const At = te ? [Me.x + Ot, Me.y] : [0, 0];
|
|
10589
10589
|
let Si = te ? [0, 0] : [Me.x + Ot + G[0], Me.y + G[1] - Ge], dr = [0, 0];
|
|
10590
10590
|
it && (dr = Si, Si = [0, 0]);
|
|
10591
|
-
const Hi = Me.metrics.isDoubleResolution ? 2 : 1, Pi = (Me.metrics.left - He) * Me.scale - Ot + Si[0], _i = (-Me.metrics.top - He) * Me.scale + Si[1],
|
|
10591
|
+
const Hi = Me.metrics.isDoubleResolution ? 2 : 1, Pi = (Me.metrics.left - He) * Me.scale - Ot + Si[0], _i = (-Me.metrics.top - He) * Me.scale + Si[1], $t = Pi + be.w / Hi * Me.scale / Ke, Fi = _i + be.h / Hi * Me.scale / Ke, Gi = new le(Pi, _i), di = new le($t, _i), Rr = new le(Pi, Fi), pr = new le($t, Fi);
|
|
10592
10592
|
if (it) {
|
|
10593
10593
|
const rr = new le(-Ot, Ot - -17), Ci = -Math.PI / 2, Xi = 12 - Ot, Li = new le(22 - Xi, -(Me.imageName ? Xi : 0)), nr = new le(...dr);
|
|
10594
10594
|
Gi._rotateAround(Ci, rr)._add(Li)._add(nr), di._rotateAround(Ci, rr)._add(Li)._add(nr), Rr._rotateAround(Ci, rr)._add(Li)._add(nr), pr._rotateAround(Ci, rr)._add(Li)._add(nr);
|
|
@@ -10727,7 +10727,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
10727
10727
|
const r = performance.getEntriesByName(hd)[0].duration, e = performance.getEntriesByName(dd)[0].duration, i = nc.length, s = 1 / (nc.reduce(((u, h) => u + h), 0) / i / 1e3), o = nc.filter(((u) => u > ud)).reduce(((u, h) => u + (h - ud) / ud), 0);
|
|
10728
10728
|
return { loadTime: r, fullLoadTime: e, fps: s, percentDroppedFrames: o / (i + o) * 100, totalFrames: i };
|
|
10729
10729
|
} };
|
|
10730
|
-
P.$ = ge, P.A = st, P.B = Ps, P.C = Ji, P.D = et, P.E =
|
|
10730
|
+
P.$ = ge, P.A = st, P.B = Ps, P.C = Ji, P.D = et, P.E = qt, P.F = function([r, e, i]) {
|
|
10731
10731
|
return e += 90, e *= Math.PI / 180, i *= Math.PI / 180, { x: r * Math.cos(e) * Math.sin(i), y: r * Math.sin(e) * Math.sin(i), z: r * Math.cos(i) };
|
|
10732
10732
|
}, P.G = bi, P.H = ii, P.I = zh, P.J = tu, P.K = function(r) {
|
|
10733
10733
|
if (Vt == null) {
|
|
@@ -10896,7 +10896,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
10896
10896
|
return r[0] = 0, r[1] = 0, r;
|
|
10897
10897
|
}, P.aF = function(r, e, i) {
|
|
10898
10898
|
return r[0] = e[0] * i, r[1] = e[1] * i, r;
|
|
10899
|
-
}, P.aG = Fh, P.aH =
|
|
10899
|
+
}, P.aG = Fh, P.aH = Nt, P.aI = function(r, e, i, s) {
|
|
10900
10900
|
const o = e.y - r.y, u = e.x - r.x, h = s.y - i.y, f = s.x - i.x, g = h * u - f * o;
|
|
10901
10901
|
if (g === 0) return null;
|
|
10902
10902
|
const y = (f * (r.y - i.y) - h * (r.x - i.x)) / g;
|
|
@@ -10913,7 +10913,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
10913
10913
|
i = [i[0] * f - i[1] * h, i[0] * h + i[1] * f];
|
|
10914
10914
|
}
|
|
10915
10915
|
return [o ? i[0] : xi(e, i[0], r.zoom), o ? i[1] : xi(e, i[1], r.zoom)];
|
|
10916
|
-
}, P.aQ = Rh, P.aR = sd, P.aS = kh, P.aT = ad, P.aU = Ni, P.aV = xu, P.aW = q, P.aX =
|
|
10916
|
+
}, P.aQ = Rh, P.aR = sd, P.aS = kh, P.aT = ad, P.aU = Ni, P.aV = xu, P.aW = q, P.aX = Ne, P.aY = ve, P.aZ = vi, P.a_ = Ap, P.aa = Ea, P.ab = 25, P.ac = jh, P.ad = (r) => {
|
|
10917
10917
|
const e = window.document.createElement("video");
|
|
10918
10918
|
return e.muted = !0, new Promise(((i) => {
|
|
10919
10919
|
e.onloadstart = () => {
|
|
@@ -10936,7 +10936,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
10936
10936
|
isNaN(i) ? delete e["max-age"] : e["max-age"] = i;
|
|
10937
10937
|
}
|
|
10938
10938
|
return e;
|
|
10939
|
-
}, P.an =
|
|
10939
|
+
}, P.an = Gt, P.ao = 85.051129, P.ap = Ai, P.aq = function(r) {
|
|
10940
10940
|
return Math.pow(2, r);
|
|
10941
10941
|
}, P.ar = Qt, P.as = Ep, P.at = function(r) {
|
|
10942
10942
|
return Math.log(r) / Math.LN2;
|
|
@@ -11016,7 +11016,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11016
11016
|
let i = 0, s = 0;
|
|
11017
11017
|
if (r.kind === "constant") s = r.layoutSize;
|
|
11018
11018
|
else if (r.kind !== "source") {
|
|
11019
|
-
const { interpolationType: o, minZoom: u, maxZoom: h } = r, f = o ?
|
|
11019
|
+
const { interpolationType: o, minZoom: u, maxZoom: h } = r, f = o ? Gt(wr.interpolationFactor(o, e, u, h), 0, 1) : 0;
|
|
11020
11020
|
r.kind === "camera" ? s = bi.number(r.minSize, r.maxSize, f) : i = f;
|
|
11021
11021
|
}
|
|
11022
11022
|
return { uSizeT: i, uSize: s };
|
|
@@ -11037,7 +11037,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11037
11037
|
return s === 0 ? null : (-(r[0] * i[0] + r[1] * i[1] + r[2] * i[2]) - i[3]) / s;
|
|
11038
11038
|
}, P.b9 = at, P.bA = function(r, e, i, s) {
|
|
11039
11039
|
return r[0] = e[0] + i[0] * s, r[1] = e[1] + i[1] * s, r[2] = e[2] + i[2] * s, r;
|
|
11040
|
-
}, P.bB =
|
|
11040
|
+
}, P.bB = jt, P.bC = function(r, e, i) {
|
|
11041
11041
|
var s = i[0], o = i[1], u = i[2], h = i[3], f = e[0], g = e[1], y = e[2], v = o * y - u * g, w = u * f - s * y, S = s * g - o * f;
|
|
11042
11042
|
return r[0] = f + h * (v += v) + o * (S += S) - u * (w += w), r[1] = g + h * w + u * v - s * S, r[2] = y + h * S + s * w - o * v, r;
|
|
11043
11043
|
}, P.bD = function(r, e, i) {
|
|
@@ -11197,7 +11197,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11197
11197
|
return new Float64Array(16);
|
|
11198
11198
|
}, P.bl = function(r, e, i) {
|
|
11199
11199
|
const s = new Float64Array(4);
|
|
11200
|
-
return
|
|
11200
|
+
return jt(s, r, e - 90, i), s;
|
|
11201
11201
|
}, P.bm = function(r, e, i, s) {
|
|
11202
11202
|
var o, u, h, f, g, y = e[0], v = e[1], w = e[2], S = e[3], M = i[0], A = i[1], z = i[2], R = i[3];
|
|
11203
11203
|
return (u = y * M + v * A + w * z + S * R) < 0 && (u = -u, M = -M, A = -A, z = -z, R = -R), 1 - u > zt ? (o = Math.acos(u), h = Math.sin(o), f = Math.sin((1 - s) * o) / h, g = Math.sin(s * o) / h) : (f = 1 - s, g = s), r[0] = f * y + g * M, r[1] = f * v + g * A, r[2] = f * w + g * z, r[3] = f * S + g * R, r;
|
|
@@ -11207,13 +11207,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11207
11207
|
var f = h[0], g = h[1], y = h[2], v = h[3], w = f + f, S = g + g, M = y + y, A = f * w, z = g * w, R = g * S, j = y * w, X = y * S, N = y * M, G = v * w, K = v * S, te = v * M;
|
|
11208
11208
|
u[0] = 1 - R - N, u[3] = z - te, u[6] = j + K, u[1] = z + te, u[4] = 1 - A - N, u[7] = X - G, u[2] = j - K, u[5] = X + G, u[8] = 1 - A - R;
|
|
11209
11209
|
})(e, r);
|
|
11210
|
-
const i = vi(-Math.asin(
|
|
11210
|
+
const i = vi(-Math.asin(Gt(e[2], -1, 1)));
|
|
11211
11211
|
let s, o;
|
|
11212
11212
|
return Math.hypot(e[5], e[8]) < 1e-3 ? (s = 0, o = -vi(Math.atan2(e[3], e[4]))) : (s = vi(e[5] === 0 && e[8] === 0 ? 0 : Math.atan2(e[5], e[8])), o = vi(e[1] === 0 && e[0] === 0 ? 0 : Math.atan2(e[1], e[0]))), { roll: s, pitch: i + 90, bearing: o };
|
|
11213
11213
|
}, P.bo = function(r, e) {
|
|
11214
11214
|
return r.roll == e.roll && r.pitch == e.pitch && r.bearing == e.bearing;
|
|
11215
11215
|
}, P.bp = Mt, P.bq = Kn, P.br = Co, P.bs = Wl, P.bt = Eo, P.bu = _t, P.bv = tt, P.bw = br, P.bx = function(r, e, i, s, o) {
|
|
11216
|
-
return _t(s, o,
|
|
11216
|
+
return _t(s, o, Gt((r - e) / (i - e), 0, 1));
|
|
11217
11217
|
}, P.by = ht, P.bz = function() {
|
|
11218
11218
|
return new Float64Array(3);
|
|
11219
11219
|
}, P.c = ne, P.c$ = function(r, e, i, s, o) {
|
|
@@ -11418,7 +11418,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11418
11418
|
}, P.cl = function(r, e) {
|
|
11419
11419
|
return r[0] = e[0], r[1] = e[1], r[2] = e[2], r[3] = e[3], r[4] = e[4], r[5] = e[5], r[6] = e[6], r[7] = e[7], r[8] = e[8], r[9] = e[9], r[10] = e[10], r[11] = e[11], r[12] = e[12], r[13] = e[13], r[14] = e[14], r[15] = e[15], r;
|
|
11420
11420
|
}, P.cm = (r) => r.type === "symbol", P.cn = (r) => r.type === "circle", P.co = (r) => r.type === "heatmap", P.cp = (r) => r.type === "line", P.cq = (r) => r.type === "fill", P.cr = (r) => r.type === "fill-extrusion", P.cs = (r) => r.type === "hillshade", P.ct = (r) => r.type === "color-relief", P.cu = (r) => r.type === "background", P.cv = (r) => r.type === "custom", P.cw = Yt, P.cx = function(r, e, i) {
|
|
11421
|
-
const s =
|
|
11421
|
+
const s = Ut(e.x - i.x, e.y - i.y), o = Ut(r.x - i.x, r.y - i.y), u = Math.atan2(s[0] * o[1] - s[1] * o[0], (function(h, f) {
|
|
11422
11422
|
return h[0] * f[0] + h[1] * f[1];
|
|
11423
11423
|
})(s, o));
|
|
11424
11424
|
return vi(u);
|
|
@@ -11546,10 +11546,10 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11546
11546
|
this.inFlightDependencies.push(si), ft = re.sendAsync({ type: "GI", data: { icons: Qe, source: this.source, tileID: this.tileID, type: "icons" } }, si);
|
|
11547
11547
|
}
|
|
11548
11548
|
const ti = Object.keys(we.patternDependencies);
|
|
11549
|
-
let
|
|
11549
|
+
let qt = Promise.resolve({});
|
|
11550
11550
|
if (ti.length) {
|
|
11551
11551
|
const si = new AbortController();
|
|
11552
|
-
this.inFlightDependencies.push(si),
|
|
11552
|
+
this.inFlightDependencies.push(si), qt = re.sendAsync({ type: "GI", data: { icons: ti, source: this.source, tileID: this.tileID, type: "patterns" } }, si);
|
|
11553
11553
|
}
|
|
11554
11554
|
const ye = we.dashDependencies;
|
|
11555
11555
|
let ni = Promise.resolve({});
|
|
@@ -11557,7 +11557,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11557
11557
|
const si = new AbortController();
|
|
11558
11558
|
this.inFlightDependencies.push(si), ni = re.sendAsync({ type: "GDA", data: { dashes: ye } }, si);
|
|
11559
11559
|
}
|
|
11560
|
-
const [sr, mt, Kt, ar] = yield Promise.all([We, ft,
|
|
11560
|
+
const [sr, mt, Kt, ar] = yield Promise.all([We, ft, qt, ni]), mi = new le(sr), Di = new P.cP(mt, Kt);
|
|
11561
11561
|
for (const si in ae) {
|
|
11562
11562
|
const $i = ae[si];
|
|
11563
11563
|
$i instanceof P.ah ? (Be($i.layers, this.zoom, U), P.cQ({ bucket: $i, glyphMap: sr, glyphPositions: mi.positions, imageMap: mt, imagePositions: Di.iconPositions, showCollisionBoxes: this.showCollisionBoxes, canonical: this.tileID.canonical, subdivisionGranularity: we.subdivisionGranularity })) : $i.hasDependencies && ($i instanceof P.cR || $i instanceof P.cS || $i instanceof P.cT) && (Be($i.layers, this.zoom, U), $i.addFeatures(we, this.tileID.canonical, Di.patternPositions, ar));
|
|
@@ -11570,7 +11570,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11570
11570
|
const U = new P.H(B);
|
|
11571
11571
|
for (const re of ce) re.recalculate(U, O);
|
|
11572
11572
|
}
|
|
11573
|
-
class
|
|
11573
|
+
class je {
|
|
11574
11574
|
constructor(B, O, U, re, ne) {
|
|
11575
11575
|
this.type = B, this.properties = U || {}, this.extent = ne, this.pointsArray = O, this.id = re;
|
|
11576
11576
|
}
|
|
@@ -11605,7 +11605,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11605
11605
|
let ke = we.loadGeometry();
|
|
11606
11606
|
for (const We of ke) for (const Qe of We) Qe.x = Qe.x * re - ne, Qe.y = Qe.y * re - fe;
|
|
11607
11607
|
const Ee = 128;
|
|
11608
|
-
ke = P.cV(ke, we.type, -Ee, -Ee, U + Ee, U + Ee), ke.length !== 0 && de.push(new
|
|
11608
|
+
ke = P.cV(ke, we.type, -Ee, -Ee, U + Ee, U + Ee), ke.length !== 0 && de.push(new je(we.type, ke, we.properties, we.id, U));
|
|
11609
11609
|
}
|
|
11610
11610
|
return new Ye(de, ce.name, U);
|
|
11611
11611
|
}
|
|
@@ -11758,7 +11758,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11758
11758
|
for (let ae = 0; ae < B.length; ae++) {
|
|
11759
11759
|
const we = B[ae];
|
|
11760
11760
|
if (!we.geometry) continue;
|
|
11761
|
-
const [ke, Ee] = we.geometry.coordinates, We = dt(
|
|
11761
|
+
const [ke, Ee] = we.geometry.coordinates, We = dt(Ue(ke)), Qe = dt(at(Ee));
|
|
11762
11762
|
fe.push(We, Qe, 1 / 0, ae, -1, 1), this.options.reduce && fe.push(0);
|
|
11763
11763
|
}
|
|
11764
11764
|
let de = this.trees[re + 1] = this._createTree(fe);
|
|
@@ -11779,7 +11779,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11779
11779
|
const Ee = this.getClusters([U, re, 180, fe], O), We = this.getClusters([-180, re, ne, fe], O);
|
|
11780
11780
|
return Ee.concat(We);
|
|
11781
11781
|
}
|
|
11782
|
-
const de = this.trees[this._limitZoom(O)], ae = de.range(
|
|
11782
|
+
const de = this.trees[this._limitZoom(O)], ae = de.range(Ue(U), at(fe), Ue(ne), at(re)), we = de.data, ke = [];
|
|
11783
11783
|
for (const Ee of ae) {
|
|
11784
11784
|
const We = this.stride * Ee;
|
|
11785
11785
|
ke.push(we[We + 5] > 1 ? De(we, We, this.clusterProps) : this.points[we[We + 3]]);
|
|
@@ -11837,8 +11837,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11837
11837
|
else {
|
|
11838
11838
|
const ti = this.points[O[ae + 3]];
|
|
11839
11839
|
ke = ti.properties;
|
|
11840
|
-
const [
|
|
11841
|
-
Ee =
|
|
11840
|
+
const [qt, ye] = ti.geometry.coordinates;
|
|
11841
|
+
Ee = Ue(qt), We = at(ye);
|
|
11842
11842
|
}
|
|
11843
11843
|
const Qe = { type: 1, geometry: [[Math.round(this.options.extent * (Ee * ne - U)), Math.round(this.options.extent * (We * ne - re))]], tags: ke };
|
|
11844
11844
|
let ft;
|
|
@@ -11854,12 +11854,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11854
11854
|
if (ae[Ee + 2] <= O) continue;
|
|
11855
11855
|
ae[Ee + 2] = O;
|
|
11856
11856
|
const We = ae[Ee], Qe = ae[Ee + 1], ft = B.within(ae[Ee], ae[Ee + 1], de), ti = ae[Ee + 5];
|
|
11857
|
-
let
|
|
11857
|
+
let qt = ti;
|
|
11858
11858
|
for (const ye of ft) {
|
|
11859
11859
|
const ni = ye * ke;
|
|
11860
|
-
ae[ni + 2] > O && (
|
|
11860
|
+
ae[ni + 2] > O && (qt += ae[ni + 5]);
|
|
11861
11861
|
}
|
|
11862
|
-
if (
|
|
11862
|
+
if (qt > ti && qt >= fe) {
|
|
11863
11863
|
let ye, ni = We * ti, sr = Qe * ti, mt = -1;
|
|
11864
11864
|
const Kt = (Ee / ke << 5) + (O + 1) + this.points.length;
|
|
11865
11865
|
for (const ar of ft) {
|
|
@@ -11869,10 +11869,10 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11869
11869
|
const Di = ae[mi + 5];
|
|
11870
11870
|
ni += ae[mi] * Di, sr += ae[mi + 1] * Di, ae[mi + 4] = Kt, ne && (ye || (ye = this._map(ae, Ee, !0), mt = this.clusterProps.length, this.clusterProps.push(ye)), ne(ye, this._map(ae, mi)));
|
|
11871
11871
|
}
|
|
11872
|
-
ae[Ee + 4] = Kt, we.push(ni /
|
|
11872
|
+
ae[Ee + 4] = Kt, we.push(ni / qt, sr / qt, 1 / 0, Kt, -1, qt), ne && we.push(mt);
|
|
11873
11873
|
} else {
|
|
11874
11874
|
for (let ye = 0; ye < ke; ye++) we.push(ae[Ee + ye]);
|
|
11875
|
-
if (
|
|
11875
|
+
if (qt > 1) for (const ye of ft) {
|
|
11876
11876
|
const ni = ye * ke;
|
|
11877
11877
|
if (!(ae[ni + 2] <= O)) {
|
|
11878
11878
|
ae[ni + 2] = O;
|
|
@@ -11899,40 +11899,40 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11899
11899
|
}
|
|
11900
11900
|
}
|
|
11901
11901
|
function De(ce, B, O) {
|
|
11902
|
-
return { type: "Feature", id: ce[B + 3], properties: Oe(ce, B, O), geometry: { type: "Point", coordinates: [(U = ce[B], 360 * (U - 0.5)),
|
|
11902
|
+
return { type: "Feature", id: ce[B + 3], properties: Oe(ce, B, O), geometry: { type: "Point", coordinates: [(U = ce[B], 360 * (U - 0.5)), Nt(ce[B + 1])] } };
|
|
11903
11903
|
var U;
|
|
11904
11904
|
}
|
|
11905
11905
|
function Oe(ce, B, O) {
|
|
11906
11906
|
const U = ce[B + 5], re = U >= 1e4 ? `${Math.round(U / 1e3)}k` : U >= 1e3 ? Math.round(U / 100) / 10 + "k" : U, ne = ce[B + 6], fe = ne === -1 ? {} : Object.assign({}, O[ne]);
|
|
11907
11907
|
return Object.assign(fe, { cluster: !0, cluster_id: ce[B + 3], point_count: U, point_count_abbreviated: re });
|
|
11908
11908
|
}
|
|
11909
|
-
function
|
|
11909
|
+
function Ue(ce) {
|
|
11910
11910
|
return ce / 360 + 0.5;
|
|
11911
11911
|
}
|
|
11912
11912
|
function at(ce) {
|
|
11913
11913
|
const B = Math.sin(ce * Math.PI / 180), O = 0.5 - 0.25 * Math.log((1 + B) / (1 - B)) / Math.PI;
|
|
11914
11914
|
return O < 0 ? 0 : O > 1 ? 1 : O;
|
|
11915
11915
|
}
|
|
11916
|
-
function
|
|
11916
|
+
function Nt(ce) {
|
|
11917
11917
|
const B = (180 - 360 * ce) * Math.PI / 180;
|
|
11918
11918
|
return 360 * Math.atan(Math.exp(B)) / Math.PI - 90;
|
|
11919
11919
|
}
|
|
11920
|
-
function
|
|
11920
|
+
function ei(ce, B, O, U) {
|
|
11921
11921
|
let re = U;
|
|
11922
11922
|
const ne = B + (O - B >> 1);
|
|
11923
11923
|
let fe, de = O - B;
|
|
11924
11924
|
const ae = ce[B], we = ce[B + 1], ke = ce[O], Ee = ce[O + 1];
|
|
11925
11925
|
for (let We = B + 3; We < O; We += 3) {
|
|
11926
|
-
const Qe =
|
|
11926
|
+
const Qe = jt(ce[We], ce[We + 1], ae, we, ke, Ee);
|
|
11927
11927
|
if (Qe > re) fe = We, re = Qe;
|
|
11928
11928
|
else if (Qe === re) {
|
|
11929
11929
|
const ft = Math.abs(We - ne);
|
|
11930
11930
|
ft < de && (fe = We, de = ft);
|
|
11931
11931
|
}
|
|
11932
11932
|
}
|
|
11933
|
-
re > U && (fe - B > 3 &&
|
|
11933
|
+
re > U && (fe - B > 3 && ei(ce, B, fe, U), ce[fe + 2] = re, O - fe > 3 && ei(ce, fe, O, U));
|
|
11934
11934
|
}
|
|
11935
|
-
function
|
|
11935
|
+
function jt(ce, B, O, U, re, ne) {
|
|
11936
11936
|
let fe = re - O, de = ne - U;
|
|
11937
11937
|
if (fe !== 0 || de !== 0) {
|
|
11938
11938
|
const ae = ((ce - O) * fe + (B - U) * de) / (fe * fe + de * de);
|
|
@@ -11942,13 +11942,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11942
11942
|
}
|
|
11943
11943
|
function ot(ce, B, O, U) {
|
|
11944
11944
|
const re = { id: ce ?? null, type: B, geometry: O, tags: U, minX: 1 / 0, minY: 1 / 0, maxX: -1 / 0, maxY: -1 / 0 };
|
|
11945
|
-
if (B === "Point" || B === "MultiPoint" || B === "LineString")
|
|
11946
|
-
else if (B === "Polygon")
|
|
11947
|
-
else if (B === "MultiLineString") for (const ne of O)
|
|
11948
|
-
else if (B === "MultiPolygon") for (const ne of O)
|
|
11945
|
+
if (B === "Point" || B === "MultiPoint" || B === "LineString") Ut(re, O);
|
|
11946
|
+
else if (B === "Polygon") Ut(re, O[0]);
|
|
11947
|
+
else if (B === "MultiLineString") for (const ne of O) Ut(re, ne);
|
|
11948
|
+
else if (B === "MultiPolygon") for (const ne of O) Ut(re, ne[0]);
|
|
11949
11949
|
return re;
|
|
11950
11950
|
}
|
|
11951
|
-
function
|
|
11951
|
+
function Ut(ce, B) {
|
|
11952
11952
|
for (let O = 0; O < B.length; O += 3) ce.minX = Math.min(ce.minX, B[O]), ce.minY = Math.min(ce.minY, B[O + 1]), ce.maxX = Math.max(ce.maxX, B[O]), ce.maxY = Math.max(ce.maxY, B[O + 1]);
|
|
11953
11953
|
}
|
|
11954
11954
|
function Ze(ce, B, O, U) {
|
|
@@ -11992,7 +11992,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11992
11992
|
B.push(we, ke, 0), ae > 0 && (fe += U ? (re * ke - we * ne) / 2 : Math.sqrt(Math.pow(we - re, 2) + Math.pow(ke - ne, 2))), re = we, ne = ke;
|
|
11993
11993
|
}
|
|
11994
11994
|
const de = B.length - 3;
|
|
11995
|
-
B[2] = 1,
|
|
11995
|
+
B[2] = 1, ei(B, 0, de, O), B[de + 2] = 1, B.size = Math.abs(fe), B.start = 0, B.end = B.size;
|
|
11996
11996
|
}
|
|
11997
11997
|
function _t(ce, B, O, U) {
|
|
11998
11998
|
for (let re = 0; re < ce.length; re++) {
|
|
@@ -12021,13 +12021,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12021
12021
|
}
|
|
12022
12022
|
if (Qe < O || We >= U) continue;
|
|
12023
12023
|
let ft = [];
|
|
12024
|
-
if (Ee === "Point" || Ee === "MultiPoint")
|
|
12024
|
+
if (Ee === "Point" || Ee === "MultiPoint") Gt(ke, ft, O, U, re);
|
|
12025
12025
|
else if (Ee === "LineString") fi(ke, ft, O, U, re, !1, de.lineMetrics);
|
|
12026
12026
|
else if (Ee === "MultiLineString") It(ke, ft, O, U, re, !1);
|
|
12027
12027
|
else if (Ee === "Polygon") It(ke, ft, O, U, re, !0);
|
|
12028
12028
|
else if (Ee === "MultiPolygon") for (const ti of ke) {
|
|
12029
|
-
const
|
|
12030
|
-
It(ti,
|
|
12029
|
+
const qt = [];
|
|
12030
|
+
It(ti, qt, O, U, re, !0), qt.length && ft.push(qt);
|
|
12031
12031
|
}
|
|
12032
12032
|
if (ft.length) {
|
|
12033
12033
|
if (de.lineMetrics && Ee === "LineString") {
|
|
@@ -12039,7 +12039,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12039
12039
|
}
|
|
12040
12040
|
return ae.length ? ae : null;
|
|
12041
12041
|
}
|
|
12042
|
-
function
|
|
12042
|
+
function Gt(ce, B, O, U, re) {
|
|
12043
12043
|
for (let ne = 0; ne < ce.length; ne += 3) {
|
|
12044
12044
|
const fe = ce[ne + re];
|
|
12045
12045
|
fe >= O && fe <= U && Lt(B, ce[ne], ce[ne + 1], ce[ne + 2]);
|
|
@@ -12049,8 +12049,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12049
12049
|
let de = lt(ce);
|
|
12050
12050
|
const ae = re === 0 ? ct : Rt;
|
|
12051
12051
|
let we, ke, Ee = ce.start;
|
|
12052
|
-
for (let
|
|
12053
|
-
const ye = ce[
|
|
12052
|
+
for (let qt = 0; qt < ce.length - 3; qt += 3) {
|
|
12053
|
+
const ye = ce[qt], ni = ce[qt + 1], sr = ce[qt + 2], mt = ce[qt + 3], Kt = ce[qt + 4], ar = re === 0 ? ye : ni, mi = re === 0 ? mt : Kt;
|
|
12054
12054
|
let Di = !1;
|
|
12055
12055
|
fe && (we = Math.sqrt(Math.pow(ye - mt, 2) + Math.pow(ni - Kt, 2))), ar < O ? mi > O && (ke = ae(de, ye, ni, mt, Kt, O), fe && (de.start = Ee + we * ke)) : ar > U ? mi < U && (ke = ae(de, ye, ni, mt, Kt, U), fe && (de.start = Ee + we * ke)) : Lt(de, ye, ni, sr), mi < O && ar >= O && (ke = ae(de, ye, ni, mt, Kt, O), Di = !0), mi > U && ar <= U && (ke = ae(de, ye, ni, mt, Kt, U), Di = !0), !ne && Di && (fe && (de.end = Ee + we * ke), B.push(de), de = lt(ce)), fe && (Ee += we);
|
|
12056
12056
|
}
|
|
@@ -12203,9 +12203,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12203
12203
|
}
|
|
12204
12204
|
if (Qe.source = null, B.length === 0) continue;
|
|
12205
12205
|
ke > 1 && console.time("clipping");
|
|
12206
|
-
const ft = 0.5 * we.buffer / we.extent, ti = 0.5 - ft,
|
|
12207
|
-
let ni = null, sr = null, mt = null, Kt = null, ar = Tt(B, Ee, U - ft, U +
|
|
12208
|
-
B = null, ar && (ni = Tt(ar, Ee, re - ft, re +
|
|
12206
|
+
const ft = 0.5 * we.buffer / we.extent, ti = 0.5 - ft, qt = 0.5 + ft, ye = 1 + ft;
|
|
12207
|
+
let ni = null, sr = null, mt = null, Kt = null, ar = Tt(B, Ee, U - ft, U + qt, 0, Qe.minX, Qe.maxX, we), mi = Tt(B, Ee, U + ti, U + ye, 0, Qe.minX, Qe.maxX, we);
|
|
12208
|
+
B = null, ar && (ni = Tt(ar, Ee, re - ft, re + qt, 1, Qe.minY, Qe.maxY, we), sr = Tt(ar, Ee, re + ti, re + ye, 1, Qe.minY, Qe.maxY, we), ar = null), mi && (mt = Tt(mi, Ee, re - ft, re + qt, 1, Qe.minY, Qe.maxY, we), Kt = Tt(mi, Ee, re + ti, re + ye, 1, Qe.minY, Qe.maxY, we), mi = null), ke > 1 && console.timeEnd("clipping"), ae.push(ni || [], O + 1, 2 * U, 2 * re), ae.push(sr || [], O + 1, 2 * U, 2 * re + 1), ae.push(mt || [], O + 1, 2 * U + 1, 2 * re), ae.push(Kt || [], O + 1, 2 * U + 1, 2 * re + 1);
|
|
12209
12209
|
}
|
|
12210
12210
|
}
|
|
12211
12211
|
getTile(B, O, U) {
|
|
@@ -12425,7 +12425,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12425
12425
|
var d = new c.A(4);
|
|
12426
12426
|
return c.A != Float32Array && (d[1] = 0, d[2] = 0), d[0] = 1, d[3] = 1, d;
|
|
12427
12427
|
}
|
|
12428
|
-
let Be,
|
|
12428
|
+
let Be, je, Ye;
|
|
12429
12429
|
const rt = { frame(d, t, n) {
|
|
12430
12430
|
const a = requestAnimationFrame(((p) => {
|
|
12431
12431
|
l(), t(p);
|
|
@@ -12443,7 +12443,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12443
12443
|
if (!n) throw new Error("failed to create canvas 2d context");
|
|
12444
12444
|
return t.width = d.width, t.height = d.height, n.drawImage(d, 0, 0, d.width, d.height), n;
|
|
12445
12445
|
}, resolveURL: (d) => (Be || (Be = document.createElement("a")), Be.href = d, Be.href), hardwareConcurrency: typeof navigator < "u" && navigator.hardwareConcurrency || 4, get prefersReducedMotion() {
|
|
12446
|
-
return Ye !== void 0 ? Ye : !!matchMedia && (
|
|
12446
|
+
return Ye !== void 0 ? Ye : !!matchMedia && (je == null && (je = matchMedia("(prefers-reduced-motion: reduce)")), je.matches);
|
|
12447
12447
|
}, set prefersReducedMotion(d) {
|
|
12448
12448
|
Ye = d;
|
|
12449
12449
|
} }, Ct = new class {
|
|
@@ -12647,7 +12647,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12647
12647
|
const { userImage: t } = d;
|
|
12648
12648
|
return !!(t && t.render && t.render()) && (d.data.replace(new Uint8Array(t.data.buffer)), !0);
|
|
12649
12649
|
}
|
|
12650
|
-
class
|
|
12650
|
+
class Ue extends c.E {
|
|
12651
12651
|
constructor() {
|
|
12652
12652
|
super(), this.images = {}, this.updatedImages = {}, this.callbackDispatchedThisFrame = {}, this.loaded = !1, this.requestors = [], this.patterns = {}, this.atlasImage = new c.R({ width: 1, height: 1 }), this.dirty = !0;
|
|
12653
12653
|
}
|
|
@@ -12775,11 +12775,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12775
12775
|
}
|
|
12776
12776
|
}
|
|
12777
12777
|
const at = 1e20;
|
|
12778
|
-
function
|
|
12779
|
-
for (let b = t; b < t + a; b++)
|
|
12780
|
-
for (let b = n; b < n + l; b++)
|
|
12778
|
+
function Nt(d, t, n, a, l, p, m, _, x) {
|
|
12779
|
+
for (let b = t; b < t + a; b++) ei(d, n * p + b, p, l, m, _, x);
|
|
12780
|
+
for (let b = n; b < n + l; b++) ei(d, b * p + t, 1, a, m, _, x);
|
|
12781
12781
|
}
|
|
12782
|
-
function
|
|
12782
|
+
function ei(d, t, n, a, l, p, m) {
|
|
12783
12783
|
p[0] = 0, m[0] = -at, m[1] = at, l[0] = d[t];
|
|
12784
12784
|
for (let _ = 1, x = 0, b = 0; _ < a; _++) {
|
|
12785
12785
|
l[_] = d[t + _ * n];
|
|
@@ -12796,7 +12796,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12796
12796
|
d[t + _ * n] = l[b] + T * T;
|
|
12797
12797
|
}
|
|
12798
12798
|
}
|
|
12799
|
-
const
|
|
12799
|
+
const jt = c.v.layout_symbol["text-font"].default.join(",");
|
|
12800
12800
|
class ot {
|
|
12801
12801
|
constructor(t, n, a) {
|
|
12802
12802
|
this.requestManager = t, this.localIdeographFontFamily = n, this.entries = {}, this.lang = a;
|
|
@@ -12847,7 +12847,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12847
12847
|
return !!this.localIdeographFontFamily && c.q(t);
|
|
12848
12848
|
}
|
|
12849
12849
|
_drawGlyph(t, n, a) {
|
|
12850
|
-
const l = n ===
|
|
12850
|
+
const l = n === jt && this.localIdeographFontFamily !== "" && this._charUsesLocalIdeographFontFamily(a), p = l ? "ideographTinySDF" : "tinySDF";
|
|
12851
12851
|
t[p] || (t[p] = this._createTinySDF(l ? this.localIdeographFontFamily : n));
|
|
12852
12852
|
const m = t[p].draw(String.fromCodePoint(a));
|
|
12853
12853
|
return { id: a, bitmap: new c.r({ width: m.width || 60, height: m.height || 60 }, m.data), metrics: { width: m.glyphWidth / 2 || 24, height: m.glyphHeight / 2 || 24, left: m.glyphLeft / 2 + 0.5 || 0, top: m.glyphTop / 2 - 27.5 || -8, advance: m.glyphAdvance / 2 || 24, isDoubleResolution: !0 } };
|
|
@@ -12910,7 +12910,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12910
12910
|
Z[se] = J > 0 ? J * J : 0, W[se] = J < 0 ? J * J : 0;
|
|
12911
12911
|
}
|
|
12912
12912
|
}
|
|
12913
|
-
|
|
12913
|
+
Nt(Z, 0, 0, b, T, b, this.f, this.v, this.z), Nt(W, q, q, _, x, b, this.f, this.v, this.z);
|
|
12914
12914
|
for (let ie = 0; ie < E; ie++) {
|
|
12915
12915
|
const H = Math.sqrt(Z[ie]) - Math.sqrt(W[ie]);
|
|
12916
12916
|
I[ie] = Math.round(255 - 255 * (H / this.radius + this.cutoff));
|
|
@@ -12918,7 +12918,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12918
12918
|
return k;
|
|
12919
12919
|
}
|
|
12920
12920
|
};
|
|
12921
|
-
class
|
|
12921
|
+
class Ut {
|
|
12922
12922
|
constructor() {
|
|
12923
12923
|
this.specification = c.u.light.position;
|
|
12924
12924
|
}
|
|
@@ -12932,7 +12932,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12932
12932
|
let Ze;
|
|
12933
12933
|
class xi extends c.E {
|
|
12934
12934
|
constructor(t) {
|
|
12935
|
-
super(), Ze = Ze || new c.t({ anchor: new c.D(c.u.light.anchor), position: new
|
|
12935
|
+
super(), Ze = Ze || new c.t({ anchor: new c.D(c.u.light.anchor), position: new Ut(), color: new c.D(c.u.light.color), intensity: new c.D(c.u.light.intensity) }), this._transitionable = new c.x(Ze, void 0), this.setLight(t), this._transitioning = this._transitionable.untransitioned();
|
|
12936
12936
|
}
|
|
12937
12937
|
getLight() {
|
|
12938
12938
|
return this._transitionable.serialize();
|
|
@@ -13080,12 +13080,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
13080
13080
|
return Object.keys(this.active).length;
|
|
13081
13081
|
}
|
|
13082
13082
|
}
|
|
13083
|
-
const
|
|
13083
|
+
const Gt = Math.floor(rt.hardwareConcurrency / 2);
|
|
13084
13084
|
let fi, lt;
|
|
13085
13085
|
function It() {
|
|
13086
13086
|
return fi || (fi = new Tt()), fi;
|
|
13087
13087
|
}
|
|
13088
|
-
Tt.workerCount = c.K(globalThis) ? Math.max(Math.min(
|
|
13088
|
+
Tt.workerCount = c.K(globalThis) ? Math.max(Math.min(Gt, 3), 1) : 1;
|
|
13089
13089
|
class Lt {
|
|
13090
13090
|
constructor(t, n) {
|
|
13091
13091
|
this.workerPool = t, this.actors = [], this.currentActor = 0, this.id = n;
|
|
@@ -14100,7 +14100,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
14100
14100
|
function ti(d) {
|
|
14101
14101
|
return d.cameraToCenterDistance * Math.min(0.85 * Math.tan(c.ap(90 - d.pitch)), Math.tan(c.ap(We - d.pitch)));
|
|
14102
14102
|
}
|
|
14103
|
-
function
|
|
14103
|
+
function qt(d, t) {
|
|
14104
14104
|
const n = d.canonical, a = t / c.aq(n.z), l = n.x + Math.pow(2, n.z) * d.wrap, p = c.ar(new Float64Array(16));
|
|
14105
14105
|
return c.O(p, p, [l * a, n.y * a, 0]), c.Q(p, p, [a / c.a5, a / c.a5, 1]), p;
|
|
14106
14106
|
}
|
|
@@ -14156,8 +14156,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
14156
14156
|
const Fe = Math.min(ve, T);
|
|
14157
14157
|
if (ee.wrap = m.getWrap(p, Te, ee.wrap), ee.zoom >= Fe) {
|
|
14158
14158
|
if (ee.zoom < b) continue;
|
|
14159
|
-
const Le = E - ee.zoom, Ae = k[0] - 0.5 - (se << Le),
|
|
14160
|
-
H.push({ tileID: new c.a2(ee.zoom === T ? gt : ee.zoom, ee.wrap, ee.zoom, se, J), distanceSq: c.au([V[0] - 0.5 - se, V[1] - 0.5 - J]), tileDistanceToCamera: Math.sqrt(Ae * Ae +
|
|
14159
|
+
const Le = E - ee.zoom, Ae = k[0] - 0.5 - (se << Le), Ne = k[1] - 0.5 - (J << Le), gt = t.reparseOverscaled ? Math.max(ee.zoom, ve) : ee.zoom;
|
|
14160
|
+
H.push({ tileID: new c.a2(ee.zoom === T ? gt : ee.zoom, ee.wrap, ee.zoom, se, J), distanceSq: c.au([V[0] - 0.5 - se, V[1] - 0.5 - J]), tileDistanceToCamera: Math.sqrt(Ae * Ae + Ne * Ne) });
|
|
14161
14161
|
} else for (let Le = 0; Le < 4; Le++) ie.push({ zoom: ee.zoom + 1, x: (se << 1) + Le % 2, y: (J << 1) + (Le >> 1), wrap: ee.wrap, fullyVisible: oe });
|
|
14162
14162
|
}
|
|
14163
14163
|
return H.sort(((ee, se) => ee.distanceSq - se.distanceSq)).map(((ee) => ee.tileID));
|
|
@@ -14911,13 +14911,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
14911
14911
|
const gt = this.projectPathToScreenSpace(Le, ie);
|
|
14912
14912
|
Le = gt.some(((Ht) => Ht.signedDistanceFromCamera <= 0)) ? [] : gt.map(((Ht) => Ht.point));
|
|
14913
14913
|
}
|
|
14914
|
-
let
|
|
14914
|
+
let Ne = [];
|
|
14915
14915
|
if (Le.length > 0) {
|
|
14916
14916
|
const gt = Le[0].clone(), Ht = Le[0].clone();
|
|
14917
14917
|
for (let gi = 1; gi < Le.length; gi++) gt.x = Math.min(gt.x, Le[gi].x), gt.y = Math.min(gt.y, Le[gi].y), Ht.x = Math.max(Ht.x, Le[gi].x), Ht.y = Math.max(Ht.y, Le[gi].y);
|
|
14918
|
-
|
|
14918
|
+
Ne = gt.x >= Te.x && Ht.x <= _e.x && gt.y >= Te.y && Ht.y <= _e.y ? [Le] : Ht.x < Te.x || gt.x > _e.x || Ht.y < Te.y || gt.y > _e.y ? [] : c.aJ([Le], Te.x, Te.y, _e.x, _e.y);
|
|
14919
14919
|
}
|
|
14920
|
-
for (const gt of
|
|
14920
|
+
for (const gt of Ne) {
|
|
14921
14921
|
xe.reset(gt, 0.25 * oe);
|
|
14922
14922
|
let Ht = 0;
|
|
14923
14923
|
Ht = xe.length <= 0.5 * oe ? 1 : Math.ceil(xe.paddedLength / Ae) + 1;
|
|
@@ -14998,7 +14998,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
14998
14998
|
let I = 1, k = 0, V = 0, q = 1;
|
|
14999
14999
|
const W = t.anchorPointX + _[0], Z = t.anchorPointY + _[1];
|
|
15000
15000
|
if (m && !p) {
|
|
15001
|
-
const Le = this.projectAndGetPerspectiveRatio(W + 1, Z, l, b, E), Ae = Le.x - x.x,
|
|
15001
|
+
const Le = this.projectAndGetPerspectiveRatio(W + 1, Z, l, b, E), Ae = Le.x - x.x, Ne = Math.atan((Le.y - x.y) / Ae) + (Ae < 0 ? Math.PI : 0), gt = Math.sin(Ne), Ht = Math.cos(Ne);
|
|
15002
15002
|
I = Ht, k = gt, V = -gt, q = Ht;
|
|
15003
15003
|
} else if (!m && p) {
|
|
15004
15004
|
const Le = un(this.transform);
|
|
@@ -15091,13 +15091,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15091
15091
|
placeLayerBucketPart(t, n, a) {
|
|
15092
15092
|
const { bucket: l, layout: p, translationText: m, translationIcon: _, unwrappedTileID: x, pitchedLabelPlaneMatrix: b, textPixelRatio: T, holdingForFade: E, collisionBoxArray: I, partiallyEvaluatedTextSize: k, collisionGroup: V } = t.parameters, q = p.get("text-optional"), W = p.get("icon-optional"), Z = c.aQ(p, "text-overlap", "text-allow-overlap"), Y = Z === "always", ie = c.aQ(p, "icon-overlap", "icon-allow-overlap"), H = ie === "always", ee = p.get("text-rotation-alignment") === "map", se = p.get("text-pitch-alignment") === "map", J = p.get("icon-text-fit") !== "none", oe = p.get("symbol-z-order") === "viewport-y", Te = Y && (H || !l.hasIconData() || W), _e = H && (Y || !l.hasTextData() || q);
|
|
15093
15093
|
!l.collisionArrays && I && l.deserializeCollisionBoxes(I);
|
|
15094
|
-
const xe = this.retainedQueryData[l.bucketInstanceId].tileID, ve = this._getTerrainElevationFunc(xe), Fe = this.transform.getFastPathSimpleProjectionMatrix(xe), Le = (Ae,
|
|
15094
|
+
const xe = this.retainedQueryData[l.bucketInstanceId].tileID, ve = this._getTerrainElevationFunc(xe), Fe = this.transform.getFastPathSimpleProjectionMatrix(xe), Le = (Ae, Ne, gt) => {
|
|
15095
15095
|
var Ht, gi;
|
|
15096
15096
|
if (n[Ae.crossTileID]) return;
|
|
15097
15097
|
if (E) return void (this.placements[Ae.crossTileID] = new pc(!1, !1, !1));
|
|
15098
15098
|
let li = !1, wi = !1, ci = !0, Ri = null, Ti = { box: null, placeable: !1, offscreen: null, occluded: !1 }, Qi = { placeable: !1 }, qi = null, Ui = null, or = null, Cn = 0, pn = 0, an = 0;
|
|
15099
|
-
|
|
15100
|
-
const Ir =
|
|
15099
|
+
Ne.textFeatureIndex ? Cn = Ne.textFeatureIndex : Ae.useRuntimeCollisionCircles && (Cn = Ae.featureIndex), Ne.verticalTextFeatureIndex && (pn = Ne.verticalTextFeatureIndex);
|
|
15100
|
+
const Ir = Ne.textBox;
|
|
15101
15101
|
if (Ir) {
|
|
15102
15102
|
const Ur = (hi) => {
|
|
15103
15103
|
let ui = c.az.horizontal;
|
|
@@ -15107,7 +15107,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15107
15107
|
}
|
|
15108
15108
|
return ui;
|
|
15109
15109
|
}, on = (hi, ui) => {
|
|
15110
|
-
if (l.allowVerticalPlacement && Ae.numVerticalGlyphVertices > 0 &&
|
|
15110
|
+
if (l.allowVerticalPlacement && Ae.numVerticalGlyphVertices > 0 && Ne.verticalTextBox) {
|
|
15111
15111
|
for (const Yi of l.writingModes) if (Yi === c.az.vertical ? (Ti = ui(), Qi = Ti) : Ti = hi(), Ti && Ti.placeable) break;
|
|
15112
15112
|
} else Ti = hi();
|
|
15113
15113
|
}, Yr = Ae.textAnchorOffsetStartIndex, Kr = Ae.textAnchorOffsetEndIndex;
|
|
@@ -15117,7 +15117,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15117
15117
|
return Ki && Ki.placeable && (this.markUsedOrientation(l, Yi, Ae), this.placedOrientations[Ae.crossTileID] = Yi), Ki;
|
|
15118
15118
|
};
|
|
15119
15119
|
on((() => hi(Ir, c.az.horizontal)), (() => {
|
|
15120
|
-
const ui =
|
|
15120
|
+
const ui = Ne.verticalTextBox;
|
|
15121
15121
|
return l.allowVerticalPlacement && Ae.numVerticalGlyphVertices > 0 && ui ? hi(ui, c.az.vertical) : { box: null, offscreen: null };
|
|
15122
15122
|
})), Ur(Ti && Ti.placeable);
|
|
15123
15123
|
} else {
|
|
@@ -15137,9 +15137,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15137
15137
|
}
|
|
15138
15138
|
return a && !An && (An = { box: this.collisionIndex.placeCollisionBox(Ir, "always", T, xe, x, se, ee, m, V.predicate, ve, void 0, Fe).box, offscreen: !1, placeable: !1, occluded: !1 }), An;
|
|
15139
15139
|
};
|
|
15140
|
-
on((() => ui(Ir,
|
|
15141
|
-
const Ki =
|
|
15142
|
-
return l.allowVerticalPlacement && (!Ti || !Ti.placeable) && Ae.numVerticalGlyphVertices > 0 && Ki ? ui(Ki,
|
|
15140
|
+
on((() => ui(Ir, Ne.iconBox, c.az.horizontal)), (() => {
|
|
15141
|
+
const Ki = Ne.verticalTextBox;
|
|
15142
|
+
return l.allowVerticalPlacement && (!Ti || !Ti.placeable) && Ae.numVerticalGlyphVertices > 0 && Ki ? ui(Ki, Ne.verticalIconBox, c.az.vertical) : { box: null, occluded: !0, offscreen: null };
|
|
15143
15143
|
})), Ti && (li = Ti.placeable, ci = Ti.offscreen);
|
|
15144
15144
|
const Yi = Ur(Ti && Ti.placeable);
|
|
15145
15145
|
if (!li && this.prevPlacement) {
|
|
@@ -15152,22 +15152,22 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15152
15152
|
const Ur = l.text.placedSymbolArray.get(Ae.centerJustifiedTextSymbolIndex), on = c.aA(l.textSizeData, k, Ur), Yr = p.get("text-padding");
|
|
15153
15153
|
Ui = this.collisionIndex.placeCollisionCircles(Z, Ur, l.lineVertexArray, l.glyphOffsetArray, on, x, b, a, se, V.predicate, Ae.collisionCircleDiameter, Yr, m, ve), Ui.circles.length && Ui.collisionDetected && !a && c.w("Collisions detected, but collision boxes are not shown"), li = Y || Ui.circles.length > 0 && !Ui.collisionDetected, ci = ci && Ui.offscreen;
|
|
15154
15154
|
}
|
|
15155
|
-
if (
|
|
15155
|
+
if (Ne.iconFeatureIndex && (an = Ne.iconFeatureIndex), Ne.iconBox) {
|
|
15156
15156
|
const Ur = (on) => this.collisionIndex.placeCollisionBox(on, ie, T, xe, x, se, ee, _, V.predicate, ve, J && Ri ? Ri : void 0, Fe);
|
|
15157
|
-
Qi && Qi.placeable &&
|
|
15157
|
+
Qi && Qi.placeable && Ne.verticalIconBox ? (or = Ur(Ne.verticalIconBox), wi = or.placeable) : (or = Ur(Ne.iconBox), wi = or.placeable), ci = ci && or.offscreen;
|
|
15158
15158
|
}
|
|
15159
15159
|
const Kn = q || Ae.numHorizontalGlyphVertices === 0 && Ae.numVerticalGlyphVertices === 0, Pa = W || Ae.numIconVertices === 0;
|
|
15160
15160
|
Kn || Pa ? Pa ? Kn || (wi = wi && li) : li = wi && li : wi = li = wi && li;
|
|
15161
15161
|
const Jn = wi && or.placeable;
|
|
15162
|
-
if (li && qi.placeable && this.collisionIndex.insertCollisionBox(qi.box, Z, p.get("text-ignore-placement"), l.bucketInstanceId, Qi && Qi.placeable && pn ? pn : Cn, V.ID), Jn && this.collisionIndex.insertCollisionBox(or.box, ie, p.get("icon-ignore-placement"), l.bucketInstanceId, an, V.ID), Ui && li && this.collisionIndex.insertCollisionCircles(Ui.circles, Z, p.get("text-ignore-placement"), l.bucketInstanceId, Cn, V.ID), a && this.storeCollisionData(l.bucketInstanceId, gt,
|
|
15162
|
+
if (li && qi.placeable && this.collisionIndex.insertCollisionBox(qi.box, Z, p.get("text-ignore-placement"), l.bucketInstanceId, Qi && Qi.placeable && pn ? pn : Cn, V.ID), Jn && this.collisionIndex.insertCollisionBox(or.box, ie, p.get("icon-ignore-placement"), l.bucketInstanceId, an, V.ID), Ui && li && this.collisionIndex.insertCollisionCircles(Ui.circles, Z, p.get("text-ignore-placement"), l.bucketInstanceId, Cn, V.ID), a && this.storeCollisionData(l.bucketInstanceId, gt, Ne, qi, or, Ui), Ae.crossTileID === 0) throw new Error("symbolInstance.crossTileID can't be 0");
|
|
15163
15163
|
if (l.bucketInstanceId === 0) throw new Error("bucket.bucketInstanceId can't be 0");
|
|
15164
15164
|
this.placements[Ae.crossTileID] = new pc((li || Te) && !(qi != null && qi.occluded), (wi || _e) && !(or != null && or.occluded), ci || l.justReloaded), n[Ae.crossTileID] = !0;
|
|
15165
15165
|
};
|
|
15166
15166
|
if (oe) {
|
|
15167
15167
|
if (t.symbolInstanceStart !== 0) throw new Error("bucket.bucketInstanceId should be 0");
|
|
15168
15168
|
const Ae = l.getSortedSymbolIndexes(-this.transform.bearingInRadians);
|
|
15169
|
-
for (let
|
|
15170
|
-
const gt = Ae[
|
|
15169
|
+
for (let Ne = Ae.length - 1; Ne >= 0; --Ne) {
|
|
15170
|
+
const gt = Ae[Ne];
|
|
15171
15171
|
Le(l.symbolInstances.get(gt), l.collisionArrays[gt], gt);
|
|
15172
15172
|
}
|
|
15173
15173
|
} else for (let Ae = t.symbolInstanceStart; Ae < t.symbolInstanceEnd; Ae++) Le(l.symbolInstances.get(Ae), l.collisionArrays[Ae], Ae);
|
|
@@ -15241,8 +15241,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
15241
15241
|
const ve = Xo(se.text);
|
|
15242
15242
|
q(t.text, ie, Te ? Ws : ve), q(t.text, H, _e ? Ws : ve);
|
|
15243
15243
|
const Fe = se.text.isHidden();
|
|
15244
|
-
[Y.rightJustifiedTextSymbolIndex, Y.centerJustifiedTextSymbolIndex, Y.leftJustifiedTextSymbolIndex].forEach(((
|
|
15245
|
-
|
|
15244
|
+
[Y.rightJustifiedTextSymbolIndex, Y.centerJustifiedTextSymbolIndex, Y.leftJustifiedTextSymbolIndex].forEach(((Ne) => {
|
|
15245
|
+
Ne >= 0 && (t.text.placedSymbolArray.get(Ne).hidden = Fe || Te ? 1 : 0);
|
|
15246
15246
|
})), Y.verticalPlacedTextSymbolIndex >= 0 && (t.text.placedSymbolArray.get(Y.verticalPlacedTextSymbolIndex).hidden = Fe || _e ? 1 : 0);
|
|
15247
15247
|
const Le = this.variableOffsets[Y.crossTileID];
|
|
15248
15248
|
Le && this.markUsedJustification(t, Le.anchor, Y, oe);
|
|
@@ -17070,7 +17070,7 @@ uniform ${T} ${E} u_${I};
|
|
|
17070
17070
|
const b = m.get(p);
|
|
17071
17071
|
return a ? b.f32 : b.f64;
|
|
17072
17072
|
}
|
|
17073
|
-
const _ =
|
|
17073
|
+
const _ = qt(t, this.worldSize);
|
|
17074
17074
|
c.S(_, n ? this._alignedProjMatrix : this._viewProjMatrix, _);
|
|
17075
17075
|
const x = { f64: _, f32: new Float32Array(_) };
|
|
17076
17076
|
return m.set(p, x), a ? x.f32 : x.f64;
|
|
@@ -17078,7 +17078,7 @@ uniform ${T} ${E} u_${I};
|
|
|
17078
17078
|
calculateFogMatrix(t) {
|
|
17079
17079
|
const n = t.key, a = this._fogMatrixCacheF32;
|
|
17080
17080
|
if (a.has(n)) return a.get(n);
|
|
17081
|
-
const l =
|
|
17081
|
+
const l = qt(t, this.worldSize);
|
|
17082
17082
|
return c.S(l, this._fogMatrix, l), a.set(n, new Float32Array(l)), a.get(n);
|
|
17083
17083
|
}
|
|
17084
17084
|
calculateCenterFromCameraLngLatAlt(t, n, a, l) {
|
|
@@ -17162,7 +17162,7 @@ uniform ${T} ${E} u_${I};
|
|
|
17162
17162
|
return c.O(p, p, [a.x, a.y, a.z]), c.bg(p, p, Math.PI), c.bh(p, p, Math.PI / 2), c.Q(p, p, [-l, l, l]), p;
|
|
17163
17163
|
}
|
|
17164
17164
|
getProjectionDataForCustomLayer(t = !0) {
|
|
17165
|
-
const n = new c.a2(0, 0, 0, 0, 0), a = this.getProjectionData({ overscaledTileID: n, applyGlobeMatrix: t }), l =
|
|
17165
|
+
const n = new c.a2(0, 0, 0, 0, 0), a = this.getProjectionData({ overscaledTileID: n, applyGlobeMatrix: t }), l = qt(n, this.worldSize);
|
|
17166
17166
|
c.S(l, this._viewProjMatrix, l), a.tileMercatorCoords = [0, 0, 1, 1];
|
|
17167
17167
|
const p = [c.a5, c.a5, this.worldSize / this._helper.pixelsPerMeter], m = c.bk();
|
|
17168
17168
|
return c.Q(m, l, p), a.fallbackMatrix = m, a.mainMatrix = m, a;
|
|
@@ -18593,7 +18593,7 @@ uniform ${T} ${E} u_${I};
|
|
|
18593
18593
|
const _ = this.tileManagers[m].getSource().type;
|
|
18594
18594
|
_ !== "vector" && _ !== "geojson" || this.tileManagers[m].reload();
|
|
18595
18595
|
}
|
|
18596
|
-
}, this.map = t, this.dispatcher = new Lt(It(), t._getMapId()), this.dispatcher.registerMessageHandler("GG", ((m, _) => this.getGlyphs(m, _))), this.dispatcher.registerMessageHandler("GI", ((m, _) => this.getImages(m, _))), this.dispatcher.registerMessageHandler("GDA", ((m, _) => this.getDashes(m, _))), this.imageManager = new
|
|
18596
|
+
}, this.map = t, this.dispatcher = new Lt(It(), t._getMapId()), this.dispatcher.registerMessageHandler("GG", ((m, _) => this.getGlyphs(m, _))), this.dispatcher.registerMessageHandler("GI", ((m, _) => this.getImages(m, _))), this.dispatcher.registerMessageHandler("GDA", ((m, _) => this.getDashes(m, _))), this.imageManager = new Ue(), this.imageManager.setEventedParent(this);
|
|
18597
18597
|
const p = ((a = t._container) === null || a === void 0 ? void 0 : a.lang) || typeof document < "u" && ((l = document.documentElement) === null || l === void 0 ? void 0 : l.lang) || void 0;
|
|
18598
18598
|
this.glyphManager = new ot(t._requestManager, n.localIdeographFontFamily, p), this.lineAtlas = new tt(256, 512), this.crossTileSymbolIndex = new Pr(), this._setInitialValues(), this._resetUpdates(), this.dispatcher.broadcast("SR", c.bP()), de().on(re, this._rtlPluginLoaded), this.on("data", ((m) => {
|
|
18599
18599
|
if (m.dataType !== "source" || m.sourceDataType !== "metadata") return;
|
|
@@ -19555,7 +19555,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19555
19555
|
this.buffer && (this.context.gl.deleteBuffer(this.buffer), delete this.buffer);
|
|
19556
19556
|
}
|
|
19557
19557
|
}
|
|
19558
|
-
class
|
|
19558
|
+
class Zt {
|
|
19559
19559
|
constructor(t) {
|
|
19560
19560
|
this.gl = t.gl, this.default = this.getDefault(), this.current = this.default, this.dirty = !1;
|
|
19561
19561
|
}
|
|
@@ -19571,7 +19571,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19571
19571
|
this.set(this.default);
|
|
19572
19572
|
}
|
|
19573
19573
|
}
|
|
19574
|
-
class Xa extends
|
|
19574
|
+
class Xa extends Zt {
|
|
19575
19575
|
getDefault() {
|
|
19576
19576
|
return c.bp.transparent;
|
|
19577
19577
|
}
|
|
@@ -19580,7 +19580,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19580
19580
|
(t.r !== n.r || t.g !== n.g || t.b !== n.b || t.a !== n.a || this.dirty) && (this.gl.clearColor(t.r, t.g, t.b, t.a), this.current = t, this.dirty = !1);
|
|
19581
19581
|
}
|
|
19582
19582
|
}
|
|
19583
|
-
class Ya extends
|
|
19583
|
+
class Ya extends Zt {
|
|
19584
19584
|
getDefault() {
|
|
19585
19585
|
return 1;
|
|
19586
19586
|
}
|
|
@@ -19588,7 +19588,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19588
19588
|
(t !== this.current || this.dirty) && (this.gl.clearDepth(t), this.current = t, this.dirty = !1);
|
|
19589
19589
|
}
|
|
19590
19590
|
}
|
|
19591
|
-
class Ka extends
|
|
19591
|
+
class Ka extends Zt {
|
|
19592
19592
|
getDefault() {
|
|
19593
19593
|
return 0;
|
|
19594
19594
|
}
|
|
@@ -19596,7 +19596,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19596
19596
|
(t !== this.current || this.dirty) && (this.gl.clearStencil(t), this.current = t, this.dirty = !1);
|
|
19597
19597
|
}
|
|
19598
19598
|
}
|
|
19599
|
-
class dl extends
|
|
19599
|
+
class dl extends Zt {
|
|
19600
19600
|
getDefault() {
|
|
19601
19601
|
return [!0, !0, !0, !0];
|
|
19602
19602
|
}
|
|
@@ -19605,7 +19605,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19605
19605
|
(t[0] !== n[0] || t[1] !== n[1] || t[2] !== n[2] || t[3] !== n[3] || this.dirty) && (this.gl.colorMask(t[0], t[1], t[2], t[3]), this.current = t, this.dirty = !1);
|
|
19606
19606
|
}
|
|
19607
19607
|
}
|
|
19608
|
-
class Gn extends
|
|
19608
|
+
class Gn extends Zt {
|
|
19609
19609
|
getDefault() {
|
|
19610
19610
|
return !0;
|
|
19611
19611
|
}
|
|
@@ -19613,7 +19613,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19613
19613
|
(t !== this.current || this.dirty) && (this.gl.depthMask(t), this.current = t, this.dirty = !1);
|
|
19614
19614
|
}
|
|
19615
19615
|
}
|
|
19616
|
-
class ea extends
|
|
19616
|
+
class ea extends Zt {
|
|
19617
19617
|
getDefault() {
|
|
19618
19618
|
return 255;
|
|
19619
19619
|
}
|
|
@@ -19621,7 +19621,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19621
19621
|
(t !== this.current || this.dirty) && (this.gl.stencilMask(t), this.current = t, this.dirty = !1);
|
|
19622
19622
|
}
|
|
19623
19623
|
}
|
|
19624
|
-
class vs extends
|
|
19624
|
+
class vs extends Zt {
|
|
19625
19625
|
getDefault() {
|
|
19626
19626
|
return { func: this.gl.ALWAYS, ref: 0, mask: 255 };
|
|
19627
19627
|
}
|
|
@@ -19630,7 +19630,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19630
19630
|
(t.func !== n.func || t.ref !== n.ref || t.mask !== n.mask || this.dirty) && (this.gl.stencilFunc(t.func, t.ref, t.mask), this.current = t, this.dirty = !1);
|
|
19631
19631
|
}
|
|
19632
19632
|
}
|
|
19633
|
-
class Vr extends
|
|
19633
|
+
class Vr extends Zt {
|
|
19634
19634
|
getDefault() {
|
|
19635
19635
|
const t = this.gl;
|
|
19636
19636
|
return [t.KEEP, t.KEEP, t.KEEP];
|
|
@@ -19640,7 +19640,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19640
19640
|
(t[0] !== n[0] || t[1] !== n[1] || t[2] !== n[2] || this.dirty) && (this.gl.stencilOp(t[0], t[1], t[2]), this.current = t, this.dirty = !1);
|
|
19641
19641
|
}
|
|
19642
19642
|
}
|
|
19643
|
-
class Fc extends
|
|
19643
|
+
class Fc extends Zt {
|
|
19644
19644
|
getDefault() {
|
|
19645
19645
|
return !1;
|
|
19646
19646
|
}
|
|
@@ -19650,7 +19650,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19650
19650
|
t ? n.enable(n.STENCIL_TEST) : n.disable(n.STENCIL_TEST), this.current = t, this.dirty = !1;
|
|
19651
19651
|
}
|
|
19652
19652
|
}
|
|
19653
|
-
class Lc extends
|
|
19653
|
+
class Lc extends Zt {
|
|
19654
19654
|
getDefault() {
|
|
19655
19655
|
return [0, 1];
|
|
19656
19656
|
}
|
|
@@ -19659,7 +19659,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19659
19659
|
(t[0] !== n[0] || t[1] !== n[1] || this.dirty) && (this.gl.depthRange(t[0], t[1]), this.current = t, this.dirty = !1);
|
|
19660
19660
|
}
|
|
19661
19661
|
}
|
|
19662
|
-
class pl extends
|
|
19662
|
+
class pl extends Zt {
|
|
19663
19663
|
getDefault() {
|
|
19664
19664
|
return !1;
|
|
19665
19665
|
}
|
|
@@ -19669,7 +19669,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19669
19669
|
t ? n.enable(n.DEPTH_TEST) : n.disable(n.DEPTH_TEST), this.current = t, this.dirty = !1;
|
|
19670
19670
|
}
|
|
19671
19671
|
}
|
|
19672
|
-
class qn extends
|
|
19672
|
+
class qn extends Zt {
|
|
19673
19673
|
getDefault() {
|
|
19674
19674
|
return this.gl.LESS;
|
|
19675
19675
|
}
|
|
@@ -19677,7 +19677,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19677
19677
|
(t !== this.current || this.dirty) && (this.gl.depthFunc(t), this.current = t, this.dirty = !1);
|
|
19678
19678
|
}
|
|
19679
19679
|
}
|
|
19680
|
-
class Ja extends
|
|
19680
|
+
class Ja extends Zt {
|
|
19681
19681
|
getDefault() {
|
|
19682
19682
|
return !1;
|
|
19683
19683
|
}
|
|
@@ -19687,7 +19687,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19687
19687
|
t ? n.enable(n.BLEND) : n.disable(n.BLEND), this.current = t, this.dirty = !1;
|
|
19688
19688
|
}
|
|
19689
19689
|
}
|
|
19690
|
-
class Qa extends
|
|
19690
|
+
class Qa extends Zt {
|
|
19691
19691
|
getDefault() {
|
|
19692
19692
|
const t = this.gl;
|
|
19693
19693
|
return [t.ONE, t.ZERO];
|
|
@@ -19697,7 +19697,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19697
19697
|
(t[0] !== n[0] || t[1] !== n[1] || this.dirty) && (this.gl.blendFunc(t[0], t[1]), this.current = t, this.dirty = !1);
|
|
19698
19698
|
}
|
|
19699
19699
|
}
|
|
19700
|
-
class ta extends
|
|
19700
|
+
class ta extends Zt {
|
|
19701
19701
|
getDefault() {
|
|
19702
19702
|
return c.bp.transparent;
|
|
19703
19703
|
}
|
|
@@ -19706,7 +19706,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19706
19706
|
(t.r !== n.r || t.g !== n.g || t.b !== n.b || t.a !== n.a || this.dirty) && (this.gl.blendColor(t.r, t.g, t.b, t.a), this.current = t, this.dirty = !1);
|
|
19707
19707
|
}
|
|
19708
19708
|
}
|
|
19709
|
-
class eo extends
|
|
19709
|
+
class eo extends Zt {
|
|
19710
19710
|
getDefault() {
|
|
19711
19711
|
return this.gl.FUNC_ADD;
|
|
19712
19712
|
}
|
|
@@ -19714,7 +19714,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19714
19714
|
(t !== this.current || this.dirty) && (this.gl.blendEquation(t), this.current = t, this.dirty = !1);
|
|
19715
19715
|
}
|
|
19716
19716
|
}
|
|
19717
|
-
class Bc extends
|
|
19717
|
+
class Bc extends Zt {
|
|
19718
19718
|
getDefault() {
|
|
19719
19719
|
return !1;
|
|
19720
19720
|
}
|
|
@@ -19724,7 +19724,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19724
19724
|
t ? n.enable(n.CULL_FACE) : n.disable(n.CULL_FACE), this.current = t, this.dirty = !1;
|
|
19725
19725
|
}
|
|
19726
19726
|
}
|
|
19727
|
-
class bs extends
|
|
19727
|
+
class bs extends Zt {
|
|
19728
19728
|
getDefault() {
|
|
19729
19729
|
return this.gl.BACK;
|
|
19730
19730
|
}
|
|
@@ -19732,7 +19732,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19732
19732
|
(t !== this.current || this.dirty) && (this.gl.cullFace(t), this.current = t, this.dirty = !1);
|
|
19733
19733
|
}
|
|
19734
19734
|
}
|
|
19735
|
-
class ws extends
|
|
19735
|
+
class ws extends Zt {
|
|
19736
19736
|
getDefault() {
|
|
19737
19737
|
return this.gl.CCW;
|
|
19738
19738
|
}
|
|
@@ -19740,7 +19740,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19740
19740
|
(t !== this.current || this.dirty) && (this.gl.frontFace(t), this.current = t, this.dirty = !1);
|
|
19741
19741
|
}
|
|
19742
19742
|
}
|
|
19743
|
-
class Oc extends
|
|
19743
|
+
class Oc extends Zt {
|
|
19744
19744
|
getDefault() {
|
|
19745
19745
|
return null;
|
|
19746
19746
|
}
|
|
@@ -19748,7 +19748,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19748
19748
|
(t !== this.current || this.dirty) && (this.gl.useProgram(t), this.current = t, this.dirty = !1);
|
|
19749
19749
|
}
|
|
19750
19750
|
}
|
|
19751
|
-
class fl extends
|
|
19751
|
+
class fl extends Zt {
|
|
19752
19752
|
getDefault() {
|
|
19753
19753
|
return this.gl.TEXTURE0;
|
|
19754
19754
|
}
|
|
@@ -19756,7 +19756,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19756
19756
|
(t !== this.current || this.dirty) && (this.gl.activeTexture(t), this.current = t, this.dirty = !1);
|
|
19757
19757
|
}
|
|
19758
19758
|
}
|
|
19759
|
-
class Et extends
|
|
19759
|
+
class Et extends Zt {
|
|
19760
19760
|
getDefault() {
|
|
19761
19761
|
const t = this.gl;
|
|
19762
19762
|
return [0, 0, t.drawingBufferWidth, t.drawingBufferHeight];
|
|
@@ -19766,7 +19766,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19766
19766
|
(t[0] !== n[0] || t[1] !== n[1] || t[2] !== n[2] || t[3] !== n[3] || this.dirty) && (this.gl.viewport(t[0], t[1], t[2], t[3]), this.current = t, this.dirty = !1);
|
|
19767
19767
|
}
|
|
19768
19768
|
}
|
|
19769
|
-
class to extends
|
|
19769
|
+
class to extends Zt {
|
|
19770
19770
|
getDefault() {
|
|
19771
19771
|
return null;
|
|
19772
19772
|
}
|
|
@@ -19776,7 +19776,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19776
19776
|
n.bindFramebuffer(n.FRAMEBUFFER, t), this.current = t, this.dirty = !1;
|
|
19777
19777
|
}
|
|
19778
19778
|
}
|
|
19779
|
-
class rh extends
|
|
19779
|
+
class rh extends Zt {
|
|
19780
19780
|
getDefault() {
|
|
19781
19781
|
return null;
|
|
19782
19782
|
}
|
|
@@ -19786,7 +19786,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19786
19786
|
n.bindRenderbuffer(n.RENDERBUFFER, t), this.current = t, this.dirty = !1;
|
|
19787
19787
|
}
|
|
19788
19788
|
}
|
|
19789
|
-
class Vc extends
|
|
19789
|
+
class Vc extends Zt {
|
|
19790
19790
|
getDefault() {
|
|
19791
19791
|
return null;
|
|
19792
19792
|
}
|
|
@@ -19796,7 +19796,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19796
19796
|
n.bindTexture(n.TEXTURE_2D, t), this.current = t, this.dirty = !1;
|
|
19797
19797
|
}
|
|
19798
19798
|
}
|
|
19799
|
-
class ia extends
|
|
19799
|
+
class ia extends Zt {
|
|
19800
19800
|
getDefault() {
|
|
19801
19801
|
return null;
|
|
19802
19802
|
}
|
|
@@ -19806,7 +19806,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19806
19806
|
n.bindBuffer(n.ARRAY_BUFFER, t), this.current = t, this.dirty = !1;
|
|
19807
19807
|
}
|
|
19808
19808
|
}
|
|
19809
|
-
class nh extends
|
|
19809
|
+
class nh extends Zt {
|
|
19810
19810
|
getDefault() {
|
|
19811
19811
|
return null;
|
|
19812
19812
|
}
|
|
@@ -19815,7 +19815,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19815
19815
|
n.bindBuffer(n.ELEMENT_ARRAY_BUFFER, t), this.current = t, this.dirty = !1;
|
|
19816
19816
|
}
|
|
19817
19817
|
}
|
|
19818
|
-
class sh extends
|
|
19818
|
+
class sh extends Zt {
|
|
19819
19819
|
getDefault() {
|
|
19820
19820
|
return null;
|
|
19821
19821
|
}
|
|
@@ -19826,7 +19826,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19826
19826
|
Or(a) ? a.bindVertexArray(t) : (n = a.getExtension("OES_vertex_array_object")) === null || n === void 0 || n.bindVertexArrayOES(t), this.current = t, this.dirty = !1;
|
|
19827
19827
|
}
|
|
19828
19828
|
}
|
|
19829
|
-
class jc extends
|
|
19829
|
+
class jc extends Zt {
|
|
19830
19830
|
getDefault() {
|
|
19831
19831
|
return 4;
|
|
19832
19832
|
}
|
|
@@ -19836,7 +19836,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19836
19836
|
n.pixelStorei(n.UNPACK_ALIGNMENT, t), this.current = t, this.dirty = !1;
|
|
19837
19837
|
}
|
|
19838
19838
|
}
|
|
19839
|
-
class ah extends
|
|
19839
|
+
class ah extends Zt {
|
|
19840
19840
|
getDefault() {
|
|
19841
19841
|
return !1;
|
|
19842
19842
|
}
|
|
@@ -19846,7 +19846,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19846
19846
|
n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL, t), this.current = t, this.dirty = !1;
|
|
19847
19847
|
}
|
|
19848
19848
|
}
|
|
19849
|
-
class ml extends
|
|
19849
|
+
class ml extends Zt {
|
|
19850
19850
|
getDefault() {
|
|
19851
19851
|
return !1;
|
|
19852
19852
|
}
|
|
@@ -19856,7 +19856,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19856
19856
|
n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL, t), this.current = t, this.dirty = !1;
|
|
19857
19857
|
}
|
|
19858
19858
|
}
|
|
19859
|
-
class Ts extends
|
|
19859
|
+
class Ts extends Zt {
|
|
19860
19860
|
constructor(t, n) {
|
|
19861
19861
|
super(t), this.context = t, this.parent = n;
|
|
19862
19862
|
}
|
|
@@ -20032,9 +20032,9 @@ uniform ${T} ${E} u_${I};
|
|
|
20032
20032
|
const ie = new c.P(Z.anchorX, Z.anchorY), H = { getElevation: E, width: l.width, height: l.height, pitchedLabelPlaneMatrix: p, pitchWithMap: n, transform: l, tileAnchorPoint: ie, translation: b, unwrappedTileID: T }, ee = n ? as(ie.x, ie.y, H) : Jt(ie.x, ie.y, H), se = js(l.cameraToCenterDistance, ee.signedDistanceFromCamera);
|
|
20033
20033
|
let J = c.aA(d.textSizeData, _, Z) * se / c.aM;
|
|
20034
20034
|
n && (J *= d.tilePixelRatio / m);
|
|
20035
|
-
const { width: oe, height: Te, anchor: _e, textOffset: xe, textBoxScale: ve } = Y, Fe = oh(_e, oe, Te, xe, ve, J), Le = l.getPitchedTextCorrection(ie.x + b[0], ie.y + b[1], T), Ae = na(ee.point, H, t, Fe, -l.bearingInRadians, Le),
|
|
20036
|
-
for (let gt = 0; gt < Z.numGlyphs; gt++) c.aG(k, Ae,
|
|
20037
|
-
x && Z.associatedIconIndex >= 0 && (q[Z.associatedIconIndex] = { shiftedAnchor: Ae, angle:
|
|
20035
|
+
const { width: oe, height: Te, anchor: _e, textOffset: xe, textBoxScale: ve } = Y, Fe = oh(_e, oe, Te, xe, ve, J), Le = l.getPitchedTextCorrection(ie.x + b[0], ie.y + b[1], T), Ae = na(ee.point, H, t, Fe, -l.bearingInRadians, Le), Ne = d.allowVerticalPlacement && Z.placedOrientation === c.az.vertical ? Math.PI / 2 : 0;
|
|
20036
|
+
for (let gt = 0; gt < Z.numGlyphs; gt++) c.aG(k, Ae, Ne);
|
|
20037
|
+
x && Z.associatedIconIndex >= 0 && (q[Z.associatedIconIndex] = { shiftedAnchor: Ae, angle: Ne });
|
|
20038
20038
|
} else Fn(Z.numGlyphs, k);
|
|
20039
20039
|
}
|
|
20040
20040
|
if (x) {
|
|
@@ -20065,9 +20065,9 @@ uniform ${T} ${E} u_${I};
|
|
|
20065
20065
|
if (!ve) continue;
|
|
20066
20066
|
const Fe = l ? ve.text : ve.icon;
|
|
20067
20067
|
if (!Fe || !Fe.segments.get().length || !Fe.hasVisibleVertices) continue;
|
|
20068
|
-
const Le = Fe.programConfigurations.get(n.id), Ae = l || ve.sdfIcons,
|
|
20068
|
+
const Le = Fe.programConfigurations.get(n.id), Ae = l || ve.sdfIcons, Ne = l ? ve.textSizeData : ve.iconSizeData, gt = Z || q.pitch !== 0, Ht = d.useProgram(Nc(Ae, l, ve), Le), gi = c.ay(Ne, q.zoom), li = d.style.map.terrain && d.style.map.terrain.getTerrainData(_e);
|
|
20069
20069
|
let wi, ci, Ri, Ti, Qi = [0, 0], qi = null;
|
|
20070
|
-
if (l) ci = xe.glyphAtlasTexture, Ri = V.LINEAR, wi = xe.glyphAtlasTexture.size, ve.iconsInText && (Qi = xe.imageAtlasTexture.size, qi = xe.imageAtlasTexture, Ti = gt || d.options.rotating || d.options.zooming ||
|
|
20070
|
+
if (l) ci = xe.glyphAtlasTexture, Ri = V.LINEAR, wi = xe.glyphAtlasTexture.size, ve.iconsInText && (Qi = xe.imageAtlasTexture.size, qi = xe.imageAtlasTexture, Ti = gt || d.options.rotating || d.options.zooming || Ne.kind === "composite" || Ne.kind === "camera" ? V.LINEAR : V.NEAREST);
|
|
20071
20071
|
else {
|
|
20072
20072
|
const hi = n.layout.get("icon-size").constantOr(0) !== 1 || ve.iconsNeedLinear;
|
|
20073
20073
|
ci = xe.imageAtlasTexture, Ri = Ae || d.options.rotating || d.options.zooming || hi || gt ? V.LINEAR : V.NEAREST, wi = xe.imageAtlasTexture.size;
|
|
@@ -20081,7 +20081,7 @@ uniform ${T} ${E} u_${I};
|
|
|
20081
20081
|
}
|
|
20082
20082
|
const Jn = l && J || Pa, Ur = Y || Jn ? yl : Z ? or : d.transform.clipSpaceToPixelsMatrix, on = Ae && n.paint.get(l ? "text-halo-width" : "icon-halo-width").constantOr(1) !== 0;
|
|
20083
20083
|
let Yr;
|
|
20084
|
-
Yr = Ae ? ve.iconsInText ? Un(
|
|
20084
|
+
Yr = Ae ? ve.iconsInText ? Un(Ne.kind, gi, ie, Z, Y, Jn, d, Ur, pn, an, wi, Qi, Te) : Ha(Ne.kind, gi, ie, Z, Y, Jn, d, Ur, pn, an, l, wi, 0, Te) : ul(Ne.kind, gi, ie, Z, Y, Jn, d, Ur, pn, an, l, wi, Te);
|
|
20085
20085
|
const Kr = { program: Ht, buffers: Fe, uniformValues: Yr, projectionData: Ir, atlasTexture: ci, atlasTextureIcon: qi, atlasInterpolation: Ri, atlasInterpolationIcon: Ti, isSDF: Ae, hasHalo: on };
|
|
20086
20086
|
if (H && ve.canOverlap) {
|
|
20087
20087
|
ee = !0;
|
|
@@ -20243,8 +20243,8 @@ uniform ${T} ${E} u_${I};
|
|
|
20243
20243
|
E.activeTexture.set(I.TEXTURE0), oe.texture.bind(Te, I.CLAMP_TO_EDGE, I.LINEAR_MIPMAP_NEAREST), E.activeTexture.set(I.TEXTURE1);
|
|
20244
20244
|
const { parentTile: _e, parentScaleBy: xe, parentTopLeft: ve, fadeValues: Fe } = $c(oe, t, H, ee);
|
|
20245
20245
|
oe.fadeOpacity = Fe.tileOpacity, _e ? (_e.fadeOpacity = Fe.parentTileOpacity, _e.texture.bind(Te, I.CLAMP_TO_EDGE, I.LINEAR_MIPMAP_NEAREST)) : oe.texture.bind(Te, I.CLAMP_TO_EDGE, I.LINEAR_MIPMAP_NEAREST), oe.texture.useMipmap && E.extTextureFilterAnisotropic && d.transform.pitch > 20 && I.texParameterf(I.TEXTURE_2D, E.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT, E.extTextureFilterAnisotropicMax);
|
|
20246
|
-
const Le = d.style.map.terrain && d.style.map.terrain.getTerrainData(se), Ae = V.getProjectionData({ overscaledTileID: se, aligned: Z, applyGlobeMatrix: !b, applyTerrainMatrix: !0 }),
|
|
20247
|
-
k.draw(E, I.TRIANGLES, J, l ? l[se.overscaledZ] : Bt.disabled, W, x ? Ft.frontCCW : Ft.backCCW,
|
|
20246
|
+
const Le = d.style.map.terrain && d.style.map.terrain.getTerrainData(se), Ae = V.getProjectionData({ overscaledTileID: se, aligned: Z, applyGlobeMatrix: !b, applyTerrainMatrix: !0 }), Ne = ll(ve, xe, Fe.fadeMix, n, _), gt = q.getMeshFromTileID(E, se.canonical, p, m, "raster");
|
|
20247
|
+
k.draw(E, I.TRIANGLES, J, l ? l[se.overscaledZ] : Bt.disabled, W, x ? Ft.frontCCW : Ft.backCCW, Ne, Le, Ae, n.id, gt.vertexBuffer, gt.indexBuffer, gt.segments);
|
|
20248
20248
|
}
|
|
20249
20249
|
}
|
|
20250
20250
|
function $c(d, t, n, a) {
|
|
@@ -20451,13 +20451,13 @@ uniform ${T} ${E} u_${I};
|
|
|
20451
20451
|
}
|
|
20452
20452
|
if (T.isRenderingGlobe && (function(I, k, V) {
|
|
20453
20453
|
const q = I.context, W = q.gl, Z = I.useProgram("atmosphere"), Y = new wt(W.LEQUAL, wt.ReadOnly, [0, 1]), ie = I.transform, H = (function(ve, Fe) {
|
|
20454
|
-
const Le = ve.properties.get("position"), Ae = [-Le.x, -Le.y, -Le.z],
|
|
20455
|
-
return ve.properties.get("anchor") === "map" && (c.bg(
|
|
20454
|
+
const Le = ve.properties.get("position"), Ae = [-Le.x, -Le.y, -Le.z], Ne = c.ar(new Float64Array(16));
|
|
20455
|
+
return ve.properties.get("anchor") === "map" && (c.bg(Ne, Ne, Fe.rollInRadians), c.bh(Ne, Ne, -Fe.pitchInRadians), c.bg(Ne, Ne, Fe.bearingInRadians), c.bh(Ne, Ne, Fe.center.lat * Math.PI / 180), c.bJ(Ne, Ne, -Fe.center.lng * Math.PI / 180)), c.cg(Ae, Ae, Ne), Ae;
|
|
20456
20456
|
})(V, I.transform), ee = ie.getProjectionData({ overscaledTileID: null, applyGlobeMatrix: !0, applyTerrainMatrix: !0 }), se = k.properties.get("atmosphere-blend") * ee.projectionTransition;
|
|
20457
20457
|
if (se === 0) return;
|
|
20458
20458
|
const J = Vn(ie.worldSize, ie.center.lat), oe = ie.inverseProjectionMatrix, Te = new Float64Array(4);
|
|
20459
20459
|
Te[3] = 1, c.aH(Te, Te, ie.modelViewProjectionMatrix), Te[0] /= Te[3], Te[1] /= Te[3], Te[2] /= Te[3], Te[3] = 1, c.aH(Te, Te, oe), Te[0] /= Te[3], Te[1] /= Te[3], Te[2] /= Te[3], Te[3] = 1;
|
|
20460
|
-
const _e = /* @__PURE__ */ ((ve, Fe, Le, Ae,
|
|
20460
|
+
const _e = /* @__PURE__ */ ((ve, Fe, Le, Ae, Ne) => ({ u_sun_pos: ve, u_atmosphere_blend: Fe, u_globe_position: Le, u_globe_radius: Ae, u_inv_proj_matrix: Ne }))(H, se, [Te[0], Te[1], Te[2]], J, oe), xe = wl(q, k);
|
|
20461
20461
|
Z.draw(q, W.TRIANGLES, Y, Bt.disabled, oi.alphaBlended, Ft.disabled, _e, null, null, "atmosphere", xe.vertexBuffer, xe.indexBuffer, xe.segments);
|
|
20462
20462
|
})(this, this.style.sky, this.style.light), this.options.showTileBoundaries) {
|
|
20463
20463
|
const I = (function(k, V) {
|
|
@@ -20513,7 +20513,7 @@ uniform ${T} ${E} u_${I};
|
|
|
20513
20513
|
for (const ve of q) {
|
|
20514
20514
|
const Fe = Y.getTile(ve), Le = Fe.getBucket(Z);
|
|
20515
20515
|
if (!Le || !Le.text || !Le.text.segments.get().length) continue;
|
|
20516
|
-
const Ae = c.ay(Le.textSizeData, oe.zoom),
|
|
20516
|
+
const Ae = c.ay(Le.textSizeData, oe.zoom), Ne = c.aN(Fe, 1, W.transform.zoom), gt = Ar(_e, W.transform, Ne), Ht = Z.layout.get("icon-text-fit") !== "none" && Le.hasIconData();
|
|
20517
20517
|
if (Ae) {
|
|
20518
20518
|
const gi = Math.pow(2, oe.zoom - Fe.tileID.overscaledZ), li = Te ? (wi, ci) => Te.getElevation(ve, wi, ci) : null;
|
|
20519
20519
|
lh(Le, _e, xe, J, oe, gt, gi, Ae, Ht, c.aO(oe, Fe, ee, se), ve.toUnwrapped(), li);
|
|
@@ -20528,7 +20528,7 @@ uniform ${T} ${E} u_${I};
|
|
|
20528
20528
|
for (let oe = 0; oe < b.length; oe++) {
|
|
20529
20529
|
const Te = b[oe], _e = _.getTile(Te), xe = _e.getBucket(x);
|
|
20530
20530
|
if (!xe) continue;
|
|
20531
|
-
const ve = x.paint.get("circle-translate"), Fe = x.paint.get("circle-translate-anchor"), Le = c.aO(Y, _e, ve, Fe), Ae = xe.programConfigurations.get(x.id),
|
|
20531
|
+
const ve = x.paint.get("circle-translate"), Fe = x.paint.get("circle-translate-anchor"), Le = c.aO(Y, _e, ve, Fe), Ae = xe.programConfigurations.get(x.id), Ne = m.useProgram("circle", Ae), gt = xe.layoutVertexBuffer, Ht = xe.indexBuffer, gi = m.style.map.terrain && m.style.map.terrain.getTerrainData(Te), li = { programConfiguration: Ae, program: Ne, layoutVertexBuffer: gt, indexBuffer: Ht, uniformValues: Ic(m, _e, x, Le, J), terrainData: gi, projectionData: Y.getProjectionData({ overscaledTileID: Te, applyGlobeMatrix: !E, applyTerrainMatrix: !0 }) };
|
|
20532
20532
|
if (q) {
|
|
20533
20533
|
const wi = xe.segments.get();
|
|
20534
20534
|
for (const ci of wi) se.push({ segments: new c.aX([ci]), sortKey: ci.sortKey, state: li });
|
|
@@ -20585,7 +20585,7 @@ uniform ${T} ${E} u_${I};
|
|
|
20585
20585
|
if (ie && !ve.patternsLoaded()) continue;
|
|
20586
20586
|
const Fe = ve.getBucket(x);
|
|
20587
20587
|
if (!Fe) continue;
|
|
20588
|
-
const Le = Fe.programConfigurations.get(x.id), Ae = m.context.program.get(),
|
|
20588
|
+
const Le = Fe.programConfigurations.get(x.id), Ae = m.context.program.get(), Ne = m.useProgram(se, Le), gt = _e || Ne.program !== Ae, Ht = m.style.map.terrain && m.style.map.terrain.getTerrainData(xe), gi = Y.constantOr(null), li = W && W.constantOr(null);
|
|
20589
20589
|
if (gi && ve.imageAtlas) {
|
|
20590
20590
|
const Qi = ve.imageAtlas, qi = Qi.patternPositions[gi.to.toString()], Ui = Qi.patternPositions[gi.from.toString()];
|
|
20591
20591
|
qi && Ui && Le.setConstantPatternPositions(qi, Ui);
|
|
@@ -20597,7 +20597,7 @@ uniform ${T} ${E} u_${I};
|
|
|
20597
20597
|
let Ri;
|
|
20598
20598
|
ie ? (Ri = ol(m, ve, x, ci, ee), Zc(J, oe, ve, Le, ee)) : Z && H ? (Ri = $a(m, ve, x, ci, ee, Fe.lineClipsArray.length), zr(m, _, J, oe, x, Fe, xe, Le, ee)) : Z ? (Ri = zc(m, ve, x, ci, ee), ji(m, J, oe, Le, gt, ee)) : H ? (Ri = Dc(m, ve, x, ci, Fe.lineClipsArray.length), $n(m, _, J, oe, x, Fe, xe)) : Ri = Qs(m, ve, x, ci);
|
|
20599
20599
|
const Ti = m.stencilModeForClipping(xe);
|
|
20600
|
-
|
|
20600
|
+
Ne.draw(J, oe.TRIANGLES, V, Ti, q, Ft.disabled, Ri, Ht, wi, x.id, Fe.layoutVertexBuffer, Fe.indexBuffer, Fe.segments, x.paint, m.transform.zoom, Le, Fe.layoutVertexBuffer2), _e = !1;
|
|
20601
20601
|
}
|
|
20602
20602
|
})(t, n, a, l, p) : c.cq(a) ? (function(m, _, x, b, T) {
|
|
20603
20603
|
const E = x.paint.get("fill-color"), I = x.paint.get("fill-opacity");
|
|
@@ -20633,14 +20633,14 @@ uniform ${T} ${E} u_${I};
|
|
|
20633
20633
|
if (!xe || !xe.data || !_e.needsHillshadePrepare) continue;
|
|
20634
20634
|
const ve = xe.dim, Fe = xe.stride, Le = xe.getPixels();
|
|
20635
20635
|
if (J.activeTexture.set(oe.TEXTURE1), J.pixelStoreUnpackPremultiplyAlpha.set(!1), _e.demTexture = _e.demTexture || W.getTileTexture(Fe), _e.demTexture) {
|
|
20636
|
-
const
|
|
20637
|
-
|
|
20636
|
+
const Ne = _e.demTexture;
|
|
20637
|
+
Ne.update(Le, { premultiply: !1 }), Ne.bind(oe.NEAREST, oe.CLAMP_TO_EDGE);
|
|
20638
20638
|
} else _e.demTexture = new c.T(J, Le, oe.RGBA, { premultiply: !1 }), _e.demTexture.bind(oe.NEAREST, oe.CLAMP_TO_EDGE);
|
|
20639
20639
|
J.activeTexture.set(oe.TEXTURE0);
|
|
20640
20640
|
let Ae = _e.fbo;
|
|
20641
20641
|
if (!Ae) {
|
|
20642
|
-
const
|
|
20643
|
-
|
|
20642
|
+
const Ne = new c.T(J, { width: ve, height: ve, data: null }, oe.RGBA);
|
|
20643
|
+
Ne.bind(oe.LINEAR, oe.CLAMP_TO_EDGE), Ae = _e.fbo = J.createFramebuffer(ve, ve, !0, !1), Ae.colorAttachment.set(Ne.texture);
|
|
20644
20644
|
}
|
|
20645
20645
|
J.bindFramebuffer.set(Ae.framebuffer), J.viewport.set([0, 0, ve, ve]), W.useProgram("hillshadePrepare").draw(J, oe.TRIANGLES, H, ee, se, Ft.disabled, Ku(_e.tileID, xe), null, null, ie.id, W.rasterBoundsBuffer, W.quadTriangleIndexBuffer, W.rasterBoundsSegments), _e.needsHillshadePrepare = !1;
|
|
20646
20646
|
}
|
|
@@ -23996,8 +23996,8 @@ var oc = (function(F, C, D) {
|
|
|
23996
23996
|
var le = 15 - C;
|
|
23997
23997
|
for (Q = 0; Q < $; ++Q)
|
|
23998
23998
|
if (F[Q])
|
|
23999
|
-
for (var Pe = Q << 4 | F[Q], Be = C - F[Q],
|
|
24000
|
-
c[yd[
|
|
23999
|
+
for (var Pe = Q << 4 | F[Q], Be = C - F[Q], je = P[F[Q] - 1]++ << Be, Ye = je | (1 << Be) - 1; je <= Ye; ++je)
|
|
24000
|
+
c[yd[je] >> le] = Pe;
|
|
24001
24001
|
} else
|
|
24002
24002
|
for (c = new qo($), Q = 0; Q < $; ++Q)
|
|
24003
24003
|
F[Q] && (c[Q] = yd[P[F[Q] - 1]++] >> 15 - F[Q]);
|
|
@@ -24061,76 +24061,76 @@ var Q_ = /* @__PURE__ */ oc(cc, 9, 1), ey = /* @__PURE__ */ oc(im, 5, 1), md = f
|
|
|
24061
24061
|
var ri = new rn(Math.max(Rt * 2, ct));
|
|
24062
24062
|
ri.set(D), D = ri;
|
|
24063
24063
|
}
|
|
24064
|
-
}, Be = C.f || 0,
|
|
24064
|
+
}, Be = C.f || 0, je = C.p || 0, Ye = C.b || 0, rt = C.l, Ct = C.d, Je = C.m, ge = C.n, Xt = Q * 8;
|
|
24065
24065
|
do {
|
|
24066
24066
|
if (!rt) {
|
|
24067
|
-
Be = xn(F,
|
|
24068
|
-
var zt = xn(F,
|
|
24069
|
-
if (
|
|
24067
|
+
Be = xn(F, je, 1);
|
|
24068
|
+
var zt = xn(F, je + 1, 3);
|
|
24069
|
+
if (je += 3, zt)
|
|
24070
24070
|
if (zt == 1)
|
|
24071
24071
|
rt = Q_, Ct = ey, Je = 9, ge = 5;
|
|
24072
24072
|
else if (zt == 2) {
|
|
24073
|
-
var Mi = xn(F,
|
|
24074
|
-
|
|
24073
|
+
var Mi = xn(F, je, 31) + 257, dt = xn(F, je + 10, 15) + 4, he = Mi + xn(F, je + 5, 31) + 1;
|
|
24074
|
+
je += 14;
|
|
24075
24075
|
for (var pe = new rn(he), De = new rn(19), Oe = 0; Oe < dt; ++Oe)
|
|
24076
|
-
De[X_[Oe]] = xn(F,
|
|
24077
|
-
|
|
24078
|
-
for (var
|
|
24079
|
-
var
|
|
24080
|
-
|
|
24081
|
-
var st =
|
|
24076
|
+
De[X_[Oe]] = xn(F, je + Oe * 3, 7);
|
|
24077
|
+
je += dt * 3;
|
|
24078
|
+
for (var Ue = md(De), at = (1 << Ue) - 1, Nt = oc(De, Ue, 1), Oe = 0; Oe < he; ) {
|
|
24079
|
+
var ei = Nt[xn(F, je, at)];
|
|
24080
|
+
je += ei & 15;
|
|
24081
|
+
var st = ei >> 4;
|
|
24082
24082
|
if (st < 16)
|
|
24083
24083
|
pe[Oe++] = st;
|
|
24084
24084
|
else {
|
|
24085
|
-
var
|
|
24086
|
-
for (st == 16 ? (ot = 3 + xn(F,
|
|
24087
|
-
pe[Oe++] =
|
|
24085
|
+
var jt = 0, ot = 0;
|
|
24086
|
+
for (st == 16 ? (ot = 3 + xn(F, je, 3), je += 2, jt = pe[Oe - 1]) : st == 17 ? (ot = 3 + xn(F, je, 7), je += 3) : st == 18 && (ot = 11 + xn(F, je, 127), je += 7); ot--; )
|
|
24087
|
+
pe[Oe++] = jt;
|
|
24088
24088
|
}
|
|
24089
24089
|
}
|
|
24090
|
-
var
|
|
24091
|
-
Je = md(
|
|
24090
|
+
var Ut = pe.subarray(0, Mi), Ze = pe.subarray(Mi);
|
|
24091
|
+
Je = md(Ut), ge = md(Ze), rt = oc(Ut, Je, 1), Ct = oc(Ze, ge, 1);
|
|
24092
24092
|
} else
|
|
24093
24093
|
tn(1);
|
|
24094
24094
|
else {
|
|
24095
|
-
var st = ty(
|
|
24095
|
+
var st = ty(je) + 4, pi = F[st - 4] | F[st - 3] << 8, Qt = st + pi;
|
|
24096
24096
|
if (Qt > Q) {
|
|
24097
24097
|
le && tn(0);
|
|
24098
24098
|
break;
|
|
24099
24099
|
}
|
|
24100
|
-
c && Pe(Ye + pi), D.set(F.subarray(st, Qt), Ye), C.b = Ye += pi, C.p =
|
|
24100
|
+
c && Pe(Ye + pi), D.set(F.subarray(st, Qt), Ye), C.b = Ye += pi, C.p = je = Qt * 8, C.f = Be;
|
|
24101
24101
|
continue;
|
|
24102
24102
|
}
|
|
24103
|
-
if (
|
|
24103
|
+
if (je > Xt) {
|
|
24104
24104
|
le && tn(0);
|
|
24105
24105
|
break;
|
|
24106
24106
|
}
|
|
24107
24107
|
}
|
|
24108
24108
|
c && Pe(Ye + 131072);
|
|
24109
|
-
for (var xi = (1 << Je) - 1, ht = (1 << ge) - 1, _t =
|
|
24110
|
-
var
|
|
24111
|
-
if (
|
|
24109
|
+
for (var xi = (1 << Je) - 1, ht = (1 << ge) - 1, _t = je; ; _t = je) {
|
|
24110
|
+
var jt = rt[gd(F, je) & xi], tt = jt >> 4;
|
|
24111
|
+
if (je += jt & 15, je > Xt) {
|
|
24112
24112
|
le && tn(0);
|
|
24113
24113
|
break;
|
|
24114
24114
|
}
|
|
24115
|
-
if (
|
|
24115
|
+
if (jt || tn(2), tt < 256)
|
|
24116
24116
|
D[Ye++] = tt;
|
|
24117
24117
|
else if (tt == 256) {
|
|
24118
|
-
_t =
|
|
24118
|
+
_t = je, rt = null;
|
|
24119
24119
|
break;
|
|
24120
24120
|
} else {
|
|
24121
24121
|
var Yt = tt - 254;
|
|
24122
24122
|
if (tt > 264) {
|
|
24123
24123
|
var Oe = tt - 257, Tt = Kf[Oe];
|
|
24124
|
-
Yt = xn(F,
|
|
24124
|
+
Yt = xn(F, je, (1 << Tt) - 1) + tm[Oe], je += Tt;
|
|
24125
24125
|
}
|
|
24126
|
-
var
|
|
24127
|
-
|
|
24126
|
+
var Gt = Ct[gd(F, je) & ht], fi = Gt >> 4;
|
|
24127
|
+
Gt || tn(3), je += Gt & 15;
|
|
24128
24128
|
var Ze = J_[fi];
|
|
24129
24129
|
if (fi > 3) {
|
|
24130
24130
|
var Tt = Jf[fi];
|
|
24131
|
-
Ze += gd(F,
|
|
24131
|
+
Ze += gd(F, je) & (1 << Tt) - 1, je += Tt;
|
|
24132
24132
|
}
|
|
24133
|
-
if (
|
|
24133
|
+
if (je > Xt) {
|
|
24134
24134
|
le && tn(0);
|
|
24135
24135
|
break;
|
|
24136
24136
|
}
|
|
@@ -24204,7 +24204,7 @@ yi((F, C) => {
|
|
|
24204
24204
|
Be.tileType === 1 ? console.error("Error: archive contains MVT vector tiles, but leafletRasterLayer is for displaying raster tiles. See https://github.com/protomaps/PMTiles/tree/main/js for details.") : Be.tileType === 2 ? $ = "image/png" : Be.tileType === 3 ? $ = "image/jpeg" : Be.tileType === 4 ? $ = "image/webp" : Be.tileType === 5 && ($ = "image/avif");
|
|
24205
24205
|
}), D = !0), F.getZxy(ue.z, ue.x, ue.y, Pe).then((Be) => {
|
|
24206
24206
|
if (Be) {
|
|
24207
|
-
let
|
|
24207
|
+
let je = new Blob([Be.data], { type: $ }), Ye = window.URL.createObjectURL(je);
|
|
24208
24208
|
c.src = Ye, c.cancel = void 0, P(void 0, c);
|
|
24209
24209
|
}
|
|
24210
24210
|
}).catch((Be) => {
|
|
@@ -24233,9 +24233,9 @@ var my = yi((F) => (C, D) => {
|
|
|
24233
24233
|
if (!ue) throw new Error("Invalid PMTiles protocol URL");
|
|
24234
24234
|
let P = ue[1], c = this.tiles.get(P);
|
|
24235
24235
|
c || (c = new vd(P), this.tiles.set(P, c));
|
|
24236
|
-
let le = ue[2], Pe = ue[3], Be = ue[4],
|
|
24236
|
+
let le = ue[2], Pe = ue[3], Be = ue[4], je = yield c.getHeader(), Ye = yield c == null ? void 0 : c.getZxy(+le, +Pe, +Be, $.signal);
|
|
24237
24237
|
if (Ye) return { data: new Uint8Array(Ye.data), cacheControl: Ye.cacheControl, expires: Ye.expires };
|
|
24238
|
-
if (
|
|
24238
|
+
if (je.tileType === 1) {
|
|
24239
24239
|
if (this.errorOnMissingTile) throw new Error("Tile not found.");
|
|
24240
24240
|
return { data: new Uint8Array() };
|
|
24241
24241
|
}
|
|
@@ -24377,8 +24377,8 @@ var um = class {
|
|
|
24377
24377
|
let Be = Pe.headers.get("Etag");
|
|
24378
24378
|
if (Be != null && Be.startsWith("W/") && (Be = null), Pe.status === 416 || Q && Be && Be !== Q) throw this.mustReload = !0, new xd(`Server returned non-matching ETag ${Q} after one retry. Check browser extensions and servers for issues that may affect correct ETag headers.`);
|
|
24379
24379
|
if (Pe.status >= 300) throw new Error(`Bad response code: ${Pe.status}`);
|
|
24380
|
-
let
|
|
24381
|
-
if (Pe.status === 200 && (!
|
|
24380
|
+
let je = Pe.headers.get("Content-Length");
|
|
24381
|
+
if (Pe.status === 200 && (!je || +je > D)) throw ue && ue.abort(), new Error("Server returned no content-length header or content-length exceeding request. Check that your storage backend supports HTTP Byte Serving.");
|
|
24382
24382
|
return { data: yield Pe.arrayBuffer(), etag: Be || void 0, cacheControl: Pe.headers.get("Cache-Control") || void 0, expires: Pe.headers.get("Expires") || void 0 };
|
|
24383
24383
|
});
|
|
24384
24384
|
}
|
|
@@ -24539,13 +24539,13 @@ var Py = pm, fm = class {
|
|
|
24539
24539
|
if (C < P.minZoom || C > P.maxZoom) return;
|
|
24540
24540
|
let c = P.rootDirectoryOffset, le = P.rootDirectoryLength;
|
|
24541
24541
|
for (let Pe = 0; Pe <= 3; Pe++) {
|
|
24542
|
-
let Be = yield this.cache.getDirectory(this.source, c, le, P),
|
|
24543
|
-
if (
|
|
24544
|
-
if (
|
|
24545
|
-
let Ye = yield this.source.getBytes(P.tileDataOffset +
|
|
24542
|
+
let Be = yield this.cache.getDirectory(this.source, c, le, P), je = cm(Be, ue);
|
|
24543
|
+
if (je) {
|
|
24544
|
+
if (je.runLength > 0) {
|
|
24545
|
+
let Ye = yield this.source.getBytes(P.tileDataOffset + je.offset, je.length, Q, P.etag);
|
|
24546
24546
|
return { data: yield this.decompress(Ye.data, P.tileCompression), cacheControl: Ye.cacheControl, expires: Ye.expires };
|
|
24547
24547
|
}
|
|
24548
|
-
c = P.leafDirectoryOffset +
|
|
24548
|
+
c = P.leafDirectoryOffset + je.offset, le = je.length;
|
|
24549
24549
|
} else return;
|
|
24550
24550
|
}
|
|
24551
24551
|
throw new Error("Maximum directory depth exceeded");
|
|
@@ -24607,24 +24607,24 @@ function Iy() {
|
|
|
24607
24607
|
var Oe = parseInt(this._config.skipFirstNLines) || 0;
|
|
24608
24608
|
if (this.isFirstChunk && 0 < Oe) {
|
|
24609
24609
|
let at = this._config.newline;
|
|
24610
|
-
at || (
|
|
24610
|
+
at || (Ue = this._config.quoteChar || '"', at = this._handle.guessLineEndings(pe, Ue)), pe = [...pe.split(at).slice(Oe)].join(at);
|
|
24611
24611
|
}
|
|
24612
|
-
this.isFirstChunk && dt(this._config.beforeFirstChunk) && (
|
|
24613
|
-
var Oe = this._partialLine + pe,
|
|
24612
|
+
this.isFirstChunk && dt(this._config.beforeFirstChunk) && (Ue = this._config.beforeFirstChunk(pe)) !== void 0 && (pe = Ue), this.isFirstChunk = !1, this._halted = !1;
|
|
24613
|
+
var Oe = this._partialLine + pe, Ue = (this._partialLine = "", this._handle.parse(Oe, this._baseIndex, !this._finished));
|
|
24614
24614
|
if (!this._handle.paused() && !this._handle.aborted()) {
|
|
24615
|
-
if (pe =
|
|
24615
|
+
if (pe = Ue.meta.cursor, Oe = (this._finished || (this._partialLine = Oe.substring(pe - this._baseIndex), this._baseIndex = pe), Ue && Ue.data && (this._rowCount += Ue.data.length), this._finished || this._config.preview && this._rowCount >= this._config.preview), P) $.postMessage({ results: Ue, workerId: Pe.WORKER_ID, finished: Oe });
|
|
24616
24616
|
else if (dt(this._config.chunk) && !De) {
|
|
24617
|
-
if (this._config.chunk(
|
|
24618
|
-
this._completeResults =
|
|
24617
|
+
if (this._config.chunk(Ue, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = !0);
|
|
24618
|
+
this._completeResults = Ue = void 0;
|
|
24619
24619
|
}
|
|
24620
|
-
return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(
|
|
24620
|
+
return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(Ue.data), this._completeResults.errors = this._completeResults.errors.concat(Ue.errors), this._completeResults.meta = Ue.meta), this._completed || !Oe || !dt(this._config.complete) || Ue && Ue.meta.aborted || (this._config.complete(this._completeResults, this._input), this._completed = !0), Oe || Ue && Ue.meta.paused || this._nextChunk(), Ue;
|
|
24621
24621
|
}
|
|
24622
24622
|
this._halted = !0;
|
|
24623
24623
|
}, this._sendError = function(pe) {
|
|
24624
24624
|
dt(this._config.error) ? this._config.error(pe) : P && this._config.error && $.postMessage({ workerId: Pe.WORKER_ID, error: pe, finished: !1 });
|
|
24625
24625
|
};
|
|
24626
24626
|
}
|
|
24627
|
-
function
|
|
24627
|
+
function je(he) {
|
|
24628
24628
|
var pe;
|
|
24629
24629
|
(he = he || {}).chunkSize || (he.chunkSize = Pe.RemoteChunkSize), Be.call(this, he), this._nextChunk = ue ? function() {
|
|
24630
24630
|
this._readChunk(), this._chunkLoaded();
|
|
@@ -24639,8 +24639,8 @@ function Iy() {
|
|
|
24639
24639
|
var De, Oe = this._config.downloadRequestHeaders;
|
|
24640
24640
|
for (De in Oe) pe.setRequestHeader(De, Oe[De]);
|
|
24641
24641
|
}
|
|
24642
|
-
var
|
|
24643
|
-
this._config.chunkSize && (
|
|
24642
|
+
var Ue;
|
|
24643
|
+
this._config.chunkSize && (Ue = this._start + this._config.chunkSize - 1, pe.setRequestHeader("Range", "bytes=" + this._start + "-" + Ue));
|
|
24644
24644
|
try {
|
|
24645
24645
|
pe.send(this._config.downloadRequestBody);
|
|
24646
24646
|
} catch (at) {
|
|
@@ -24657,15 +24657,15 @@ function Iy() {
|
|
|
24657
24657
|
function Ye(he) {
|
|
24658
24658
|
(he = he || {}).chunkSize || (he.chunkSize = Pe.LocalChunkSize), Be.call(this, he);
|
|
24659
24659
|
var pe, De, Oe = typeof FileReader < "u";
|
|
24660
|
-
this.stream = function(
|
|
24661
|
-
this._input =
|
|
24660
|
+
this.stream = function(Ue) {
|
|
24661
|
+
this._input = Ue, De = Ue.slice || Ue.webkitSlice || Ue.mozSlice, Oe ? ((pe = new FileReader()).onload = Mi(this._chunkLoaded, this), pe.onerror = Mi(this._chunkError, this)) : pe = new FileReaderSync(), this._nextChunk();
|
|
24662
24662
|
}, this._nextChunk = function() {
|
|
24663
24663
|
this._finished || this._config.preview && !(this._rowCount < this._config.preview) || this._readChunk();
|
|
24664
24664
|
}, this._readChunk = function() {
|
|
24665
|
-
var
|
|
24665
|
+
var Ue = this._input, at = (this._config.chunkSize && (at = Math.min(this._start + this._config.chunkSize, this._input.size), Ue = De.call(Ue, this._start, at)), pe.readAsText(Ue, this._config.encoding));
|
|
24666
24666
|
Oe || this._chunkLoaded({ target: { result: at } });
|
|
24667
|
-
}, this._chunkLoaded = function(
|
|
24668
|
-
this._start += this._config.chunkSize, this._finished = !this._config.chunkSize || this._start >= this._input.size, this.parseChunk(
|
|
24667
|
+
}, this._chunkLoaded = function(Ue) {
|
|
24668
|
+
this._start += this._config.chunkSize, this._finished = !this._config.chunkSize || this._start >= this._input.size, this.parseChunk(Ue.target.result);
|
|
24669
24669
|
}, this._chunkError = function() {
|
|
24670
24670
|
this._sendError(pe.error);
|
|
24671
24671
|
};
|
|
@@ -24686,20 +24686,20 @@ function Iy() {
|
|
|
24686
24686
|
Be.prototype.pause.apply(this, arguments), this._input.pause();
|
|
24687
24687
|
}, this.resume = function() {
|
|
24688
24688
|
Be.prototype.resume.apply(this, arguments), this._input.resume();
|
|
24689
|
-
}, this.stream = function(
|
|
24690
|
-
this._input =
|
|
24689
|
+
}, this.stream = function(Ue) {
|
|
24690
|
+
this._input = Ue, this._input.on("data", this._streamData), this._input.on("end", this._streamEnd), this._input.on("error", this._streamError);
|
|
24691
24691
|
}, this._checkIsFinished = function() {
|
|
24692
24692
|
Oe && pe.length === 1 && (this._finished = !0);
|
|
24693
24693
|
}, this._nextChunk = function() {
|
|
24694
24694
|
this._checkIsFinished(), pe.length ? this.parseChunk(pe.shift()) : De = !0;
|
|
24695
|
-
}, this._streamData = Mi(function(
|
|
24695
|
+
}, this._streamData = Mi(function(Ue) {
|
|
24696
24696
|
try {
|
|
24697
|
-
pe.push(typeof
|
|
24697
|
+
pe.push(typeof Ue == "string" ? Ue : Ue.toString(this._config.encoding)), De && (De = !1, this._checkIsFinished(), this.parseChunk(pe.shift()));
|
|
24698
24698
|
} catch (at) {
|
|
24699
24699
|
this._streamError(at);
|
|
24700
24700
|
}
|
|
24701
|
-
}, this), this._streamError = Mi(function(
|
|
24702
|
-
this._streamCleanUp(), this._sendError(
|
|
24701
|
+
}, this), this._streamError = Mi(function(Ue) {
|
|
24702
|
+
this._streamCleanUp(), this._sendError(Ue);
|
|
24703
24703
|
}, this), this._streamEnd = Mi(function() {
|
|
24704
24704
|
this._streamCleanUp(), Oe = !0, this._streamData("");
|
|
24705
24705
|
}, this), this._streamCleanUp = Mi(function() {
|
|
@@ -24707,28 +24707,28 @@ function Iy() {
|
|
|
24707
24707
|
}, this);
|
|
24708
24708
|
}
|
|
24709
24709
|
function Je(he) {
|
|
24710
|
-
var pe, De, Oe,
|
|
24710
|
+
var pe, De, Oe, Ue, at = Math.pow(2, 53), Nt = -at, ei = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, jt = /^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/, ot = this, Ut = 0, Ze = 0, xi = !1, ht = !1, _t = [], tt = { data: [], errors: [], meta: {} };
|
|
24711
24711
|
function Yt(lt) {
|
|
24712
24712
|
return he.skipEmptyLines === "greedy" ? lt.join("").trim() === "" : lt.length === 1 && lt[0].length === 0;
|
|
24713
24713
|
}
|
|
24714
24714
|
function Tt() {
|
|
24715
24715
|
if (tt && Oe && (fi("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + Pe.DefaultDelimiter + "'"), Oe = !1), he.skipEmptyLines && (tt.data = tt.data.filter(function(ct) {
|
|
24716
24716
|
return !Yt(ct);
|
|
24717
|
-
})),
|
|
24717
|
+
})), Gt()) {
|
|
24718
24718
|
let ct = function(Rt, ri) {
|
|
24719
24719
|
dt(he.transformHeader) && (Rt = he.transformHeader(Rt, ri)), _t.push(Rt);
|
|
24720
24720
|
};
|
|
24721
24721
|
if (tt) if (Array.isArray(tt.data[0])) {
|
|
24722
|
-
for (var lt = 0;
|
|
24722
|
+
for (var lt = 0; Gt() && lt < tt.data.length; lt++) tt.data[lt].forEach(ct);
|
|
24723
24723
|
tt.data.splice(0, 1);
|
|
24724
24724
|
} else tt.data.forEach(ct);
|
|
24725
24725
|
}
|
|
24726
24726
|
function It(ct, Rt) {
|
|
24727
24727
|
for (var ri = he.header ? {} : [], yt = 0; yt < ct.length; yt++) {
|
|
24728
24728
|
var kt = yt, xt = ct[yt], xt = ((Vt, pt) => ((Wt) => (he.dynamicTypingFunction && he.dynamicTyping[Wt] === void 0 && (he.dynamicTyping[Wt] = he.dynamicTypingFunction(Wt)), (he.dynamicTyping[Wt] || he.dynamicTyping) === !0))(Vt) ? pt === "true" || pt === "TRUE" || pt !== "false" && pt !== "FALSE" && (((Wt) => {
|
|
24729
|
-
if (
|
|
24729
|
+
if (ei.test(Wt) && (Wt = parseFloat(Wt), Nt < Wt && Wt < at))
|
|
24730
24730
|
return 1;
|
|
24731
|
-
})(pt) ? parseFloat(pt) :
|
|
24731
|
+
})(pt) ? parseFloat(pt) : jt.test(pt) ? new Date(pt) : pt === "" ? null : pt) : pt)(kt = he.header ? yt >= _t.length ? "__parsed_extra" : _t[yt] : kt, xt = he.transform ? he.transform(xt, kt) : xt);
|
|
24732
24732
|
kt === "__parsed_extra" ? (ri[kt] = ri[kt] || [], ri[kt].push(xt)) : ri[kt] = xt;
|
|
24733
24733
|
}
|
|
24734
24734
|
return he.header && (yt > _t.length ? fi("FieldMismatch", "TooManyFields", "Too many fields: expected " + _t.length + " fields but parsed " + yt, Ze + Rt) : yt < _t.length && fi("FieldMismatch", "TooFewFields", "Too few fields: expected " + _t.length + " fields but parsed " + yt, Ze + Rt)), ri;
|
|
@@ -24736,14 +24736,14 @@ function Iy() {
|
|
|
24736
24736
|
var Lt;
|
|
24737
24737
|
tt && (he.header || he.dynamicTyping || he.transform) && (Lt = 1, !tt.data.length || Array.isArray(tt.data[0]) ? (tt.data = tt.data.map(It), Lt = tt.data.length) : tt.data = It(tt.data, 0), he.header && tt.meta && (tt.meta.fields = _t), Ze += Lt);
|
|
24738
24738
|
}
|
|
24739
|
-
function
|
|
24739
|
+
function Gt() {
|
|
24740
24740
|
return he.header && _t.length === 0;
|
|
24741
24741
|
}
|
|
24742
24742
|
function fi(lt, It, Lt, ct) {
|
|
24743
24743
|
lt = { type: lt, code: It, message: Lt }, ct !== void 0 && (lt.row = ct), tt.errors.push(lt);
|
|
24744
24744
|
}
|
|
24745
|
-
dt(he.step) && (
|
|
24746
|
-
tt = lt,
|
|
24745
|
+
dt(he.step) && (Ue = he.step, he.step = function(lt) {
|
|
24746
|
+
tt = lt, Gt() ? Tt() : (Tt(), tt.data.length !== 0 && (Ut += lt.data.length, he.preview && Ut > he.preview ? De.abort() : (tt.data = tt.data[0], Ue(tt, ot))));
|
|
24747
24747
|
}), this.parse = function(lt, It, Lt) {
|
|
24748
24748
|
var ct = he.quoteChar || '"', ct = (he.newline || (he.newline = this.guessLineEndings(lt, ct)), Oe = !1, he.delimiter ? dt(he.delimiter) && (he.delimiter = he.delimiter(lt), tt.meta.delimiter = he.delimiter) : ((ct = ((Rt, ri, yt, kt, xt) => {
|
|
24749
24749
|
var Vt, pt, Wt, mr;
|
|
@@ -24781,8 +24781,8 @@ function Iy() {
|
|
|
24781
24781
|
return he.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
24782
24782
|
}
|
|
24783
24783
|
function Xt(he) {
|
|
24784
|
-
var pe = (he = he || {}).delimiter, De = he.newline, Oe = he.comments,
|
|
24785
|
-
if (he.escapeChar !== void 0 && (
|
|
24784
|
+
var pe = (he = he || {}).delimiter, De = he.newline, Oe = he.comments, Ue = he.step, at = he.preview, Nt = he.fastMode, ei = null, jt = !1, ot = he.quoteChar == null ? '"' : he.quoteChar, Ut = ot;
|
|
24785
|
+
if (he.escapeChar !== void 0 && (Ut = he.escapeChar), (typeof pe != "string" || -1 < Pe.BAD_DELIMITERS.indexOf(pe)) && (pe = ","), Oe === pe) throw new Error("Comment character same as delimiter");
|
|
24786
24786
|
Oe === !0 ? Oe = "#" : (typeof Oe != "string" || -1 < Pe.BAD_DELIMITERS.indexOf(Oe)) && (Oe = !1), De !== `
|
|
24787
24787
|
` && De !== "\r" && De !== `\r
|
|
24788
24788
|
` && (De = `
|
|
@@ -24790,9 +24790,9 @@ function Iy() {
|
|
|
24790
24790
|
var Ze = 0, xi = !1;
|
|
24791
24791
|
this.parse = function(ht, _t, tt) {
|
|
24792
24792
|
if (typeof ht != "string") throw new Error("Input must be a string");
|
|
24793
|
-
var Yt = ht.length, Tt = pe.length,
|
|
24793
|
+
var Yt = ht.length, Tt = pe.length, Gt = De.length, fi = Oe.length, lt = dt(Ue), It = [], Lt = [], ct = [], Rt = Ze = 0;
|
|
24794
24794
|
if (!ht) return Ai();
|
|
24795
|
-
if (
|
|
24795
|
+
if (Nt || Nt !== !1 && ht.indexOf(ot) === -1) {
|
|
24796
24796
|
for (var ri = ht.split(De), yt = 0; yt < ri.length; yt++) {
|
|
24797
24797
|
if (ct = ri[yt], Ze += ct.length, yt !== ri.length - 1) Ze += De.length;
|
|
24798
24798
|
else if (tt) return Ai();
|
|
@@ -24805,19 +24805,19 @@ function Iy() {
|
|
|
24805
24805
|
}
|
|
24806
24806
|
return Ai();
|
|
24807
24807
|
}
|
|
24808
|
-
for (var kt = ht.indexOf(pe, Ze), xt = ht.indexOf(De, Ze), Vt = new RegExp(ge(
|
|
24808
|
+
for (var kt = ht.indexOf(pe, Ze), xt = ht.indexOf(De, Ze), Vt = new RegExp(ge(Ut) + ge(ot), "g"), pt = ht.indexOf(ot, Ze); ; ) if (ht[Ze] === ot) for (pt = Ze, Ze++; ; ) {
|
|
24809
24809
|
if ((pt = ht.indexOf(ot, pt + 1)) === -1) return tt || Lt.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: It.length, index: Ze }), Oi();
|
|
24810
24810
|
if (pt === Yt - 1) return Oi(ht.substring(Ze, pt).replace(Vt, ot));
|
|
24811
|
-
if (ot ===
|
|
24812
|
-
else if (ot ===
|
|
24811
|
+
if (ot === Ut && ht[pt + 1] === Ut) pt++;
|
|
24812
|
+
else if (ot === Ut || pt === 0 || ht[pt - 1] !== Ut) {
|
|
24813
24813
|
kt !== -1 && kt < pt + 1 && (kt = ht.indexOf(pe, pt + 1));
|
|
24814
24814
|
var Wt = gr((xt = xt !== -1 && xt < pt + 1 ? ht.indexOf(De, pt + 1) : xt) === -1 ? kt : Math.min(kt, xt));
|
|
24815
24815
|
if (ht.substr(pt + 1 + Wt, Tt) === pe) {
|
|
24816
24816
|
ct.push(ht.substring(Ze, pt).replace(Vt, ot)), ht[Ze = pt + 1 + Wt + Tt] !== ot && (pt = ht.indexOf(ot, Ze)), kt = ht.indexOf(pe, Ze), xt = ht.indexOf(De, Ze);
|
|
24817
24817
|
break;
|
|
24818
24818
|
}
|
|
24819
|
-
if (Wt = gr(xt), ht.substring(pt + 1 + Wt, pt + 1 + Wt +
|
|
24820
|
-
if (ct.push(ht.substring(Ze, pt).replace(Vt, ot)), Lr(pt + 1 + Wt +
|
|
24819
|
+
if (Wt = gr(xt), ht.substring(pt + 1 + Wt, pt + 1 + Wt + Gt) === De) {
|
|
24820
|
+
if (ct.push(ht.substring(Ze, pt).replace(Vt, ot)), Lr(pt + 1 + Wt + Gt), kt = ht.indexOf(pe, Ze), pt = ht.indexOf(ot, Ze), lt && (vi(), xi)) return Ai();
|
|
24821
24821
|
if (at && It.length >= at) return Ai(!0);
|
|
24822
24822
|
break;
|
|
24823
24823
|
}
|
|
@@ -24826,11 +24826,11 @@ function Iy() {
|
|
|
24826
24826
|
}
|
|
24827
24827
|
else if (Oe && ct.length === 0 && ht.substring(Ze, Ze + fi) === Oe) {
|
|
24828
24828
|
if (xt === -1) return Ai();
|
|
24829
|
-
Ze = xt +
|
|
24829
|
+
Ze = xt + Gt, xt = ht.indexOf(De, Ze), kt = ht.indexOf(pe, Ze);
|
|
24830
24830
|
} else if (kt !== -1 && (kt < xt || xt === -1)) ct.push(ht.substring(Ze, kt)), Ze = kt + Tt, kt = ht.indexOf(pe, Ze);
|
|
24831
24831
|
else {
|
|
24832
24832
|
if (xt === -1) break;
|
|
24833
|
-
if (ct.push(ht.substring(Ze, xt)), Lr(xt +
|
|
24833
|
+
if (ct.push(ht.substring(Ze, xt)), Lr(xt + Gt), lt && (vi(), xi)) return Ai();
|
|
24834
24834
|
if (at && It.length >= at) return Ai(!0);
|
|
24835
24835
|
}
|
|
24836
24836
|
return Oi();
|
|
@@ -24848,7 +24848,7 @@ function Iy() {
|
|
|
24848
24848
|
Ze = ce, mr(ct), ct = [], xt = ht.indexOf(De, Ze);
|
|
24849
24849
|
}
|
|
24850
24850
|
function Ai(ce) {
|
|
24851
|
-
if (he.header && !_t && It.length && !
|
|
24851
|
+
if (he.header && !_t && It.length && !jt) {
|
|
24852
24852
|
var B = It[0], O = /* @__PURE__ */ Object.create(null), U = new Set(B);
|
|
24853
24853
|
let re = !1;
|
|
24854
24854
|
for (let ne = 0; ne < B.length; ne++) {
|
|
@@ -24856,16 +24856,16 @@ function Iy() {
|
|
|
24856
24856
|
if (O[fe = dt(he.transformHeader) ? he.transformHeader(fe, ne) : fe]) {
|
|
24857
24857
|
let de, ae = O[fe];
|
|
24858
24858
|
for (; de = fe + "_" + ae, ae++, U.has(de); ) ;
|
|
24859
|
-
U.add(de), B[ne] = de, O[fe]++, re = !0, (
|
|
24859
|
+
U.add(de), B[ne] = de, O[fe]++, re = !0, (ei = ei === null ? {} : ei)[de] = fe;
|
|
24860
24860
|
} else O[fe] = 1, B[ne] = fe;
|
|
24861
24861
|
U.add(fe);
|
|
24862
24862
|
}
|
|
24863
|
-
re && console.warn("Duplicate headers found and renamed."),
|
|
24863
|
+
re && console.warn("Duplicate headers found and renamed."), jt = !0;
|
|
24864
24864
|
}
|
|
24865
|
-
return { data: It, errors: Lt, meta: { delimiter: pe, linebreak: De, aborted: xi, truncated: !!ce, cursor: Rt + (_t || 0), renamedHeaders:
|
|
24865
|
+
return { data: It, errors: Lt, meta: { delimiter: pe, linebreak: De, aborted: xi, truncated: !!ce, cursor: Rt + (_t || 0), renamedHeaders: ei } };
|
|
24866
24866
|
}
|
|
24867
24867
|
function vi() {
|
|
24868
|
-
|
|
24868
|
+
Ue(Ai()), It = [], Lt = [];
|
|
24869
24869
|
}
|
|
24870
24870
|
}, this.abort = function() {
|
|
24871
24871
|
xi = !0;
|
|
@@ -24877,13 +24877,13 @@ function Iy() {
|
|
|
24877
24877
|
var pe = he.data, De = c[pe.workerId], Oe = !1;
|
|
24878
24878
|
if (pe.error) De.userError(pe.error, pe.file);
|
|
24879
24879
|
else if (pe.results && pe.results.data) {
|
|
24880
|
-
var
|
|
24880
|
+
var Ue = { abort: function() {
|
|
24881
24881
|
Oe = !0, st(pe.workerId, { data: [], errors: [], meta: { aborted: !0 } });
|
|
24882
24882
|
}, pause: pi, resume: pi };
|
|
24883
24883
|
if (dt(De.userStep)) {
|
|
24884
|
-
for (var at = 0; at < pe.results.data.length && (De.userStep({ data: pe.results.data[at], errors: pe.results.errors, meta: pe.results.meta },
|
|
24884
|
+
for (var at = 0; at < pe.results.data.length && (De.userStep({ data: pe.results.data[at], errors: pe.results.errors, meta: pe.results.meta }, Ue), !Oe); at++) ;
|
|
24885
24885
|
delete pe.results;
|
|
24886
|
-
} else dt(De.userChunk) && (De.userChunk(pe.results,
|
|
24886
|
+
} else dt(De.userChunk) && (De.userChunk(pe.results, Ue, pe.file), delete pe.results);
|
|
24887
24887
|
}
|
|
24888
24888
|
pe.finished && !Oe && st(pe.workerId, pe.results);
|
|
24889
24889
|
}
|
|
@@ -24910,41 +24910,41 @@ function Iy() {
|
|
|
24910
24910
|
}
|
|
24911
24911
|
return Pe.parse = function(he, pe) {
|
|
24912
24912
|
var De = (pe = pe || {}).dynamicTyping || !1;
|
|
24913
|
-
if (dt(De) && (pe.dynamicTypingFunction = De, De = {}), pe.dynamicTyping = De, pe.transform = !!dt(pe.transform) && pe.transform, !pe.worker || !Pe.WORKERS_SUPPORTED) return De = null, Pe.NODE_STREAM_INPUT, typeof he == "string" ? (he = ((Oe) => Oe.charCodeAt(0) !== 65279 ? Oe : Oe.slice(1))(he), De = new (pe.download ?
|
|
24913
|
+
if (dt(De) && (pe.dynamicTypingFunction = De, De = {}), pe.dynamicTyping = De, pe.transform = !!dt(pe.transform) && pe.transform, !pe.worker || !Pe.WORKERS_SUPPORTED) return De = null, Pe.NODE_STREAM_INPUT, typeof he == "string" ? (he = ((Oe) => Oe.charCodeAt(0) !== 65279 ? Oe : Oe.slice(1))(he), De = new (pe.download ? je : rt)(pe)) : he.readable === !0 && dt(he.read) && dt(he.on) ? De = new Ct(pe) : ($.File && he instanceof File || he instanceof Object) && (De = new Ye(pe)), De.stream(he);
|
|
24914
24914
|
(De = (() => {
|
|
24915
24915
|
var Oe;
|
|
24916
24916
|
return !!Pe.WORKERS_SUPPORTED && (Oe = (() => {
|
|
24917
|
-
var
|
|
24918
|
-
return Pe.BLOB_URL || (Pe.BLOB_URL =
|
|
24917
|
+
var Ue = $.URL || $.webkitURL || null, at = D.toString();
|
|
24918
|
+
return Pe.BLOB_URL || (Pe.BLOB_URL = Ue.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ", "(", at, ")();"], { type: "text/javascript" })));
|
|
24919
24919
|
})(), (Oe = new $.Worker(Oe)).onmessage = zt, Oe.id = le++, c[Oe.id] = Oe);
|
|
24920
24920
|
})()).userStep = pe.step, De.userChunk = pe.chunk, De.userComplete = pe.complete, De.userError = pe.error, pe.step = dt(pe.step), pe.chunk = dt(pe.chunk), pe.complete = dt(pe.complete), pe.error = dt(pe.error), delete pe.worker, De.postMessage({ input: he, config: pe, workerId: De.id });
|
|
24921
24921
|
}, Pe.unparse = function(he, pe) {
|
|
24922
|
-
var De = !1, Oe = !0,
|
|
24923
|
-
`,
|
|
24922
|
+
var De = !1, Oe = !0, Ue = ",", at = `\r
|
|
24923
|
+
`, Nt = '"', ei = Nt + Nt, jt = !1, ot = null, Ut = !1, Ze = ((() => {
|
|
24924
24924
|
if (typeof pe == "object") {
|
|
24925
24925
|
if (typeof pe.delimiter != "string" || Pe.BAD_DELIMITERS.filter(function(_t) {
|
|
24926
24926
|
return pe.delimiter.indexOf(_t) !== -1;
|
|
24927
|
-
}).length || (
|
|
24927
|
+
}).length || (Ue = pe.delimiter), typeof pe.quotes != "boolean" && typeof pe.quotes != "function" && !Array.isArray(pe.quotes) || (De = pe.quotes), typeof pe.skipEmptyLines != "boolean" && typeof pe.skipEmptyLines != "string" || (jt = pe.skipEmptyLines), typeof pe.newline == "string" && (at = pe.newline), typeof pe.quoteChar == "string" && (Nt = pe.quoteChar), typeof pe.header == "boolean" && (Oe = pe.header), Array.isArray(pe.columns)) {
|
|
24928
24928
|
if (pe.columns.length === 0) throw new Error("Option columns is empty");
|
|
24929
24929
|
ot = pe.columns;
|
|
24930
24930
|
}
|
|
24931
|
-
pe.escapeChar !== void 0 && (
|
|
24931
|
+
pe.escapeChar !== void 0 && (ei = pe.escapeChar + Nt), pe.escapeFormulae instanceof RegExp ? Ut = pe.escapeFormulae : typeof pe.escapeFormulae == "boolean" && pe.escapeFormulae && (Ut = /^[=+\-@\t\r].*$/);
|
|
24932
24932
|
}
|
|
24933
|
-
})(), new RegExp(ge(
|
|
24933
|
+
})(), new RegExp(ge(Nt), "g"));
|
|
24934
24934
|
if (typeof he == "string" && (he = JSON.parse(he)), Array.isArray(he)) {
|
|
24935
|
-
if (!he.length || Array.isArray(he[0])) return xi(null, he,
|
|
24936
|
-
if (typeof he[0] == "object") return xi(ot || Object.keys(he[0]), he,
|
|
24937
|
-
} else if (typeof he == "object") return typeof he.data == "string" && (he.data = JSON.parse(he.data)), Array.isArray(he.data) && (he.fields || (he.fields = he.meta && he.meta.fields || ot), he.fields || (he.fields = Array.isArray(he.data[0]) ? he.fields : typeof he.data[0] == "object" ? Object.keys(he.data[0]) : []), Array.isArray(he.data[0]) || typeof he.data[0] == "object" || (he.data = [he.data])), xi(he.fields || [], he.data || [],
|
|
24935
|
+
if (!he.length || Array.isArray(he[0])) return xi(null, he, jt);
|
|
24936
|
+
if (typeof he[0] == "object") return xi(ot || Object.keys(he[0]), he, jt);
|
|
24937
|
+
} else if (typeof he == "object") return typeof he.data == "string" && (he.data = JSON.parse(he.data)), Array.isArray(he.data) && (he.fields || (he.fields = he.meta && he.meta.fields || ot), he.fields || (he.fields = Array.isArray(he.data[0]) ? he.fields : typeof he.data[0] == "object" ? Object.keys(he.data[0]) : []), Array.isArray(he.data[0]) || typeof he.data[0] == "object" || (he.data = [he.data])), xi(he.fields || [], he.data || [], jt);
|
|
24938
24938
|
throw new Error("Unable to serialize unrecognized input");
|
|
24939
24939
|
function xi(_t, tt, Yt) {
|
|
24940
|
-
var Tt = "",
|
|
24941
|
-
if (
|
|
24942
|
-
for (var lt = 0; lt < _t.length; lt++) 0 < lt && (Tt +=
|
|
24940
|
+
var Tt = "", Gt = (typeof _t == "string" && (_t = JSON.parse(_t)), typeof tt == "string" && (tt = JSON.parse(tt)), Array.isArray(_t) && 0 < _t.length), fi = !Array.isArray(tt[0]);
|
|
24941
|
+
if (Gt && Oe) {
|
|
24942
|
+
for (var lt = 0; lt < _t.length; lt++) 0 < lt && (Tt += Ue), Tt += ht(_t[lt], lt);
|
|
24943
24943
|
0 < tt.length && (Tt += at);
|
|
24944
24944
|
}
|
|
24945
24945
|
for (var It = 0; It < tt.length; It++) {
|
|
24946
|
-
var Lt = (
|
|
24947
|
-
if (Yt && !
|
|
24946
|
+
var Lt = (Gt ? _t : tt[It]).length, ct = !1, Rt = Gt ? Object.keys(tt[It]).length === 0 : tt[It].length === 0;
|
|
24947
|
+
if (Yt && !Gt && (ct = Yt === "greedy" ? tt[It].join("").trim() === "" : tt[It].length === 1 && tt[It][0].length === 0), Yt === "greedy" && Gt) {
|
|
24948
24948
|
for (var ri = [], yt = 0; yt < Lt; yt++) {
|
|
24949
24949
|
var kt = fi ? _t[yt] : yt;
|
|
24950
24950
|
ri.push(tt[It][kt]);
|
|
@@ -24953,8 +24953,8 @@ function Iy() {
|
|
|
24953
24953
|
}
|
|
24954
24954
|
if (!ct) {
|
|
24955
24955
|
for (var xt = 0; xt < Lt; xt++) {
|
|
24956
|
-
0 < xt && !Rt && (Tt +=
|
|
24957
|
-
var Vt =
|
|
24956
|
+
0 < xt && !Rt && (Tt += Ue);
|
|
24957
|
+
var Vt = Gt && fi ? _t[xt] : xt;
|
|
24958
24958
|
Tt += ht(tt[It][Vt], xt);
|
|
24959
24959
|
}
|
|
24960
24960
|
It < tt.length - 1 && (!Yt || 0 < Lt && !Rt) && (Tt += at);
|
|
@@ -24964,42 +24964,42 @@ function Iy() {
|
|
|
24964
24964
|
}
|
|
24965
24965
|
function ht(_t, tt) {
|
|
24966
24966
|
var Yt, Tt;
|
|
24967
|
-
return _t == null ? "" : _t.constructor === Date ? JSON.stringify(_t).slice(1, 25) : (Tt = !1,
|
|
24968
|
-
for (var lt = 0; lt < fi.length; lt++) if (-1 <
|
|
24967
|
+
return _t == null ? "" : _t.constructor === Date ? JSON.stringify(_t).slice(1, 25) : (Tt = !1, Ut && typeof _t == "string" && Ut.test(_t) && (_t = "'" + _t, Tt = !0), Yt = _t.toString().replace(Ze, ei), (Tt = Tt || De === !0 || typeof De == "function" && De(_t, tt) || Array.isArray(De) && De[tt] || ((Gt, fi) => {
|
|
24968
|
+
for (var lt = 0; lt < fi.length; lt++) if (-1 < Gt.indexOf(fi[lt])) return !0;
|
|
24969
24969
|
return !1;
|
|
24970
|
-
})(Yt, Pe.BAD_DELIMITERS) || -1 < Yt.indexOf(
|
|
24970
|
+
})(Yt, Pe.BAD_DELIMITERS) || -1 < Yt.indexOf(Ue) || Yt.charAt(0) === " " || Yt.charAt(Yt.length - 1) === " ") ? Nt + Yt + Nt : Yt);
|
|
24971
24971
|
}
|
|
24972
24972
|
}, Pe.RECORD_SEP = "", Pe.UNIT_SEP = "", Pe.BYTE_ORDER_MARK = "\uFEFF", Pe.BAD_DELIMITERS = ["\r", `
|
|
24973
|
-
`, '"', Pe.BYTE_ORDER_MARK], Pe.WORKERS_SUPPORTED = !ue && !!$.Worker, Pe.NODE_STREAM_INPUT = 1, Pe.LocalChunkSize = 10485760, Pe.RemoteChunkSize = 5242880, Pe.DefaultDelimiter = ",", Pe.Parser = Xt, Pe.ParserHandle = Je, Pe.NetworkStreamer =
|
|
24973
|
+
`, '"', Pe.BYTE_ORDER_MARK], Pe.WORKERS_SUPPORTED = !ue && !!$.Worker, Pe.NODE_STREAM_INPUT = 1, Pe.LocalChunkSize = 10485760, Pe.RemoteChunkSize = 5242880, Pe.DefaultDelimiter = ",", Pe.Parser = Xt, Pe.ParserHandle = Je, Pe.NetworkStreamer = je, Pe.FileStreamer = Ye, Pe.StringStreamer = rt, Pe.ReadableStreamStreamer = Ct, $.jQuery && ((Q = $.jQuery).fn.parse = function(he) {
|
|
24974
24974
|
var pe = he.config || {}, De = [];
|
|
24975
24975
|
return this.each(function(at) {
|
|
24976
24976
|
if (!(Q(this).prop("tagName").toUpperCase() === "INPUT" && Q(this).attr("type").toLowerCase() === "file" && $.FileReader) || !this.files || this.files.length === 0) return !0;
|
|
24977
|
-
for (var
|
|
24977
|
+
for (var Nt = 0; Nt < this.files.length; Nt++) De.push({ file: this.files[Nt], inputElem: this, instanceConfig: Q.extend({}, pe) });
|
|
24978
24978
|
}), Oe(), this;
|
|
24979
24979
|
function Oe() {
|
|
24980
24980
|
if (De.length === 0) dt(he.complete) && he.complete();
|
|
24981
24981
|
else {
|
|
24982
|
-
var at,
|
|
24982
|
+
var at, Nt, ei, jt, ot = De[0];
|
|
24983
24983
|
if (dt(he.before)) {
|
|
24984
|
-
var
|
|
24985
|
-
if (typeof
|
|
24986
|
-
if (
|
|
24987
|
-
if (
|
|
24988
|
-
typeof
|
|
24989
|
-
} else if (
|
|
24984
|
+
var Ut = he.before(ot.file, ot.inputElem);
|
|
24985
|
+
if (typeof Ut == "object") {
|
|
24986
|
+
if (Ut.action === "abort") return at = "AbortError", Nt = ot.file, ei = ot.inputElem, jt = Ut.reason, void (dt(he.error) && he.error({ name: at }, Nt, ei, jt));
|
|
24987
|
+
if (Ut.action === "skip") return void Ue();
|
|
24988
|
+
typeof Ut.config == "object" && (ot.instanceConfig = Q.extend(ot.instanceConfig, Ut.config));
|
|
24989
|
+
} else if (Ut === "skip") return void Ue();
|
|
24990
24990
|
}
|
|
24991
24991
|
var Ze = ot.instanceConfig.complete;
|
|
24992
24992
|
ot.instanceConfig.complete = function(xi) {
|
|
24993
|
-
dt(Ze) && Ze(xi, ot.file, ot.inputElem),
|
|
24993
|
+
dt(Ze) && Ze(xi, ot.file, ot.inputElem), Ue();
|
|
24994
24994
|
}, Pe.parse(ot.file, ot.instanceConfig);
|
|
24995
24995
|
}
|
|
24996
24996
|
}
|
|
24997
|
-
function
|
|
24997
|
+
function Ue() {
|
|
24998
24998
|
De.splice(0, 1), Oe();
|
|
24999
24999
|
}
|
|
25000
25000
|
}), P && ($.onmessage = function(he) {
|
|
25001
25001
|
he = he.data, Pe.WORKER_ID === void 0 && he && (Pe.WORKER_ID = he.workerId), typeof he.input == "string" ? $.postMessage({ workerId: Pe.WORKER_ID, results: Pe.parse(he.input, he.config), finished: !0 }) : ($.File && he.input instanceof File || he.input instanceof Object) && (he = Pe.parse(he.input, he.config)) && $.postMessage({ workerId: Pe.WORKER_ID, results: he, finished: !0 });
|
|
25002
|
-
}), (
|
|
25002
|
+
}), (je.prototype = Object.create(Be.prototype)).constructor = je, (Ye.prototype = Object.create(Be.prototype)).constructor = Ye, (rt.prototype = Object.create(rt.prototype)).constructor = rt, (Ct.prototype = Object.create(Be.prototype)).constructor = Ct, Pe;
|
|
25003
25003
|
});
|
|
25004
25004
|
})(Gu)), Gu.exports;
|
|
25005
25005
|
}
|
|
@@ -25015,9 +25015,9 @@ async function Cy(F, C, D) {
|
|
|
25015
25015
|
try {
|
|
25016
25016
|
const P = ue.data, c = ue.meta.fields || [], le = /* @__PURE__ */ new Map();
|
|
25017
25017
|
P.forEach((Pe) => {
|
|
25018
|
-
const Be = Pe[C],
|
|
25018
|
+
const Be = Pe[C], je = Pe[D];
|
|
25019
25019
|
if (Be != null) {
|
|
25020
|
-
const Ye = parseFloat(
|
|
25020
|
+
const Ye = parseFloat(je), rt = isNaN(Ye) ? je : Ye;
|
|
25021
25021
|
le.set(String(Be), rt);
|
|
25022
25022
|
}
|
|
25023
25023
|
}), $({ headers: c, rows: P, joinMap: le });
|
|
@@ -25040,9 +25040,9 @@ async function Ay(F, C, D) {
|
|
|
25040
25040
|
try {
|
|
25041
25041
|
const P = ue.data, c = ue.meta.fields || [], le = /* @__PURE__ */ new Map();
|
|
25042
25042
|
P.forEach((Pe) => {
|
|
25043
|
-
const Be = Pe[C],
|
|
25043
|
+
const Be = Pe[C], je = Pe[D];
|
|
25044
25044
|
if (Be != null) {
|
|
25045
|
-
const Ye = parseFloat(
|
|
25045
|
+
const Ye = parseFloat(je), rt = isNaN(Ye) ? je : Ye;
|
|
25046
25046
|
le.set(String(Be), rt);
|
|
25047
25047
|
}
|
|
25048
25048
|
}), $({ headers: c, rows: P, joinMap: le });
|
|
@@ -25069,11 +25069,11 @@ function Dy(F, C) {
|
|
|
25069
25069
|
ue[Pe][le] = 1 / 0;
|
|
25070
25070
|
}
|
|
25071
25071
|
for (let le = 2; le <= $; le++) {
|
|
25072
|
-
let Pe = 0, Be = 0,
|
|
25072
|
+
let Pe = 0, Be = 0, je = 0;
|
|
25073
25073
|
for (let Ye = 1; Ye <= le; Ye++) {
|
|
25074
25074
|
const rt = le - Ye + 1, Ct = D[rt - 1];
|
|
25075
|
-
Be += Ct * Ct, Pe += Ct,
|
|
25076
|
-
const Je = Be - Pe * Pe /
|
|
25075
|
+
Be += Ct * Ct, Pe += Ct, je++;
|
|
25076
|
+
const Je = Be - Pe * Pe / je, ge = rt - 1;
|
|
25077
25077
|
if (ge !== 0)
|
|
25078
25078
|
for (let Xt = 2; Xt <= C; Xt++)
|
|
25079
25079
|
ue[le][Xt] >= Je + ue[ge][Xt - 1] && (Q[le][Xt] = rt, ue[le][Xt] = Je + ue[ge][Xt - 1]);
|
|
@@ -25098,8 +25098,8 @@ function zy(F, C, D) {
|
|
|
25098
25098
|
} : { r: 0, g: 0, b: 0 };
|
|
25099
25099
|
}, ue = Q(F), P = Q(C);
|
|
25100
25100
|
for (let c = 0; c < D; c++) {
|
|
25101
|
-
const le = c / (D - 1), Pe = Math.round(ue.r + le * (P.r - ue.r)), Be = Math.round(ue.g + le * (P.g - ue.g)),
|
|
25102
|
-
$.push(`rgb(${Pe}, ${Be}, ${
|
|
25101
|
+
const le = c / (D - 1), Pe = Math.round(ue.r + le * (P.r - ue.r)), Be = Math.round(ue.g + le * (P.g - ue.g)), je = Math.round(ue.b + le * (P.b - ue.b));
|
|
25102
|
+
$.push(`rgb(${Pe}, ${Be}, ${je})`);
|
|
25103
25103
|
}
|
|
25104
25104
|
return $;
|
|
25105
25105
|
}
|
|
@@ -25400,8 +25400,8 @@ class gm {
|
|
|
25400
25400
|
let $ = 1, Q = 0, ue = 0, P = 0, c = 1 / 0, le = -1 / 0, Pe = 1 / 0, Be = -1 / 0;
|
|
25401
25401
|
for (; C.pos < D; ) {
|
|
25402
25402
|
if (Q <= 0) {
|
|
25403
|
-
const
|
|
25404
|
-
$ =
|
|
25403
|
+
const je = C.readVarint();
|
|
25404
|
+
$ = je & 7, Q = je >> 3;
|
|
25405
25405
|
}
|
|
25406
25406
|
if (Q--, $ === 1 || $ === 2)
|
|
25407
25407
|
ue += C.readSVarint(), P += C.readSVarint(), ue < c && (c = ue), ue > le && (le = ue), P < Pe && (Pe = P), P > Be && (Be = P);
|
|
@@ -25444,12 +25444,12 @@ class gm {
|
|
|
25444
25444
|
Be = rt.length === 1 ? { type: "Polygon", coordinates: rt[0] } : { type: "MultiPolygon", coordinates: rt };
|
|
25445
25445
|
} else
|
|
25446
25446
|
throw new Error("unknown feature type");
|
|
25447
|
-
const
|
|
25447
|
+
const je = {
|
|
25448
25448
|
type: "Feature",
|
|
25449
25449
|
geometry: Be,
|
|
25450
25450
|
properties: this.properties
|
|
25451
25451
|
};
|
|
25452
|
-
return this.id != null && (
|
|
25452
|
+
return this.id != null && (je.id = this.id), je;
|
|
25453
25453
|
}
|
|
25454
25454
|
}
|
|
25455
25455
|
gm.types = ["Unknown", "Point", "LineString", "Polygon"];
|
|
@@ -26005,9 +26005,9 @@ async function sx(F, C, D, $ = "bbox", Q) {
|
|
|
26005
26005
|
for (let Pe = 0; Pe < le; Pe++)
|
|
26006
26006
|
for (let Be = 0; Be < le; Be++)
|
|
26007
26007
|
try {
|
|
26008
|
-
const
|
|
26009
|
-
if (!
|
|
26010
|
-
const rt = new jy(new Gy(
|
|
26008
|
+
const je = await ue.getZxy(c, Pe, Be);
|
|
26009
|
+
if (!je || !je.data) continue;
|
|
26010
|
+
const rt = new jy(new Gy(je.data)).layers[C];
|
|
26011
26011
|
if (!rt) continue;
|
|
26012
26012
|
for (let Ct = 0; Ct < rt.length; Ct++) {
|
|
26013
26013
|
const Je = rt.feature(Ct), ge = Je.properties, Xt = String(Q ? ge[Q] : Je.id);
|
|
@@ -26028,17 +26028,17 @@ async function sx(F, C, D, $ = "bbox", Q) {
|
|
|
26028
26028
|
if (!zt) {
|
|
26029
26029
|
const st = Je.loadGeometry();
|
|
26030
26030
|
let pi = 1 / 0, Qt = 1 / 0, Mi = -1 / 0, dt = -1 / 0;
|
|
26031
|
-
st.forEach((
|
|
26032
|
-
|
|
26033
|
-
pi = Math.min(pi,
|
|
26031
|
+
st.forEach((ei) => {
|
|
26032
|
+
ei.forEach((jt) => {
|
|
26033
|
+
pi = Math.min(pi, jt.x), Qt = Math.min(Qt, jt.y), Mi = Math.max(Mi, jt.x), dt = Math.max(dt, jt.y);
|
|
26034
26034
|
});
|
|
26035
26035
|
});
|
|
26036
|
-
const he = 4096, pe = (Pe + pi / he) / le * 360 - 180, De = (Pe + Mi / he) / le * 360 - 180, Oe = Math.PI - 2 * Math.PI * (Be + Qt / he) / le,
|
|
26036
|
+
const he = 4096, pe = (Pe + pi / he) / le * 360 - 180, De = (Pe + Mi / he) / le * 360 - 180, Oe = Math.PI - 2 * Math.PI * (Be + Qt / he) / le, Ue = Math.PI - 2 * Math.PI * (Be + dt / he) / le, at = 180 / Math.PI * Math.atan(0.5 * (Math.exp(Oe) - Math.exp(-Oe))), Nt = 180 / Math.PI * Math.atan(0.5 * (Math.exp(Ue) - Math.exp(-Ue)));
|
|
26037
26037
|
zt = [
|
|
26038
26038
|
Math.min(pe, De),
|
|
26039
|
-
Math.min(at,
|
|
26039
|
+
Math.min(at, Nt),
|
|
26040
26040
|
Math.max(pe, De),
|
|
26041
|
-
Math.max(at,
|
|
26041
|
+
Math.max(at, Nt)
|
|
26042
26042
|
];
|
|
26043
26043
|
}
|
|
26044
26044
|
return {
|
|
@@ -26068,7 +26068,7 @@ const Nu = "pmtiles-source", Wf = "pmtiles-fill", gx = ({
|
|
|
26068
26068
|
width: le = "100%",
|
|
26069
26069
|
height: Pe = 520,
|
|
26070
26070
|
initialView: Be,
|
|
26071
|
-
fitToId:
|
|
26071
|
+
fitToId: je,
|
|
26072
26072
|
bboxField: Ye = "bbox",
|
|
26073
26073
|
jenksK: rt = 5
|
|
26074
26074
|
}) => {
|
|
@@ -26113,18 +26113,18 @@ const Nu = "pmtiles-source", Wf = "pmtiles-fill", gx = ({
|
|
|
26113
26113
|
promoteId: D
|
|
26114
26114
|
});
|
|
26115
26115
|
const he = ue || D, pe = Q ? await Ay(Q, he, P) : await Cy($, he, P);
|
|
26116
|
-
pe.joinMap.forEach((Oe,
|
|
26116
|
+
pe.joinMap.forEach((Oe, Ue) => {
|
|
26117
26117
|
try {
|
|
26118
26118
|
st.setFeatureState(
|
|
26119
26119
|
{
|
|
26120
26120
|
source: Nu,
|
|
26121
26121
|
sourceLayer: C,
|
|
26122
|
-
id:
|
|
26122
|
+
id: Ue
|
|
26123
26123
|
},
|
|
26124
26124
|
{ value: Oe }
|
|
26125
26125
|
);
|
|
26126
26126
|
} catch (at) {
|
|
26127
|
-
console.warn(`Error setting feature state for key ${
|
|
26127
|
+
console.warn(`Error setting feature state for key ${Ue}:`, at);
|
|
26128
26128
|
}
|
|
26129
26129
|
});
|
|
26130
26130
|
let De;
|
|
@@ -26136,14 +26136,14 @@ const Nu = "pmtiles-source", Wf = "pmtiles-fill", gx = ({
|
|
|
26136
26136
|
"#f3f3f3"
|
|
26137
26137
|
];
|
|
26138
26138
|
else {
|
|
26139
|
-
const Oe = Array.from(pe.joinMap.values()).filter((
|
|
26139
|
+
const Oe = Array.from(pe.joinMap.values()).filter((Ue) => typeof Ue == "number").map((Ue) => Ue);
|
|
26140
26140
|
if (Oe.length === 0)
|
|
26141
26141
|
console.warn("No hay valores numéricos para clasificación Jenks"), De = ["case", ["!=", ["feature-state", "value"], null], "#66827f", "#f3f3f3"];
|
|
26142
26142
|
else {
|
|
26143
|
-
const
|
|
26144
|
-
for (let
|
|
26145
|
-
|
|
26146
|
-
De =
|
|
26143
|
+
const Ue = Dy(Oe, rt), at = Ue.length - 1, Nt = zy("#f3f3f3", "#66827f", at), ei = ["step", ["feature-state", "value"], Nt[0]];
|
|
26144
|
+
for (let jt = 1; jt < at; jt++)
|
|
26145
|
+
ei.push(Ue[jt]), ei.push(Nt[jt]);
|
|
26146
|
+
De = ei;
|
|
26147
26147
|
}
|
|
26148
26148
|
}
|
|
26149
26149
|
if (st.addLayer({
|
|
@@ -26164,19 +26164,19 @@ const Nu = "pmtiles-source", Wf = "pmtiles-fill", gx = ({
|
|
|
26164
26164
|
"line-color": "#2c3e50",
|
|
26165
26165
|
"line-width": 0.5
|
|
26166
26166
|
}
|
|
26167
|
-
}),
|
|
26168
|
-
const Oe = await sx(F, C,
|
|
26167
|
+
}), je) {
|
|
26168
|
+
const Oe = await sx(F, C, je, Ye, D);
|
|
26169
26169
|
if (Oe && Oe.bbox) {
|
|
26170
|
-
const
|
|
26170
|
+
const Ue = [
|
|
26171
26171
|
[Oe.bbox[0], Oe.bbox[1]],
|
|
26172
26172
|
[Oe.bbox[2], Oe.bbox[3]]
|
|
26173
26173
|
];
|
|
26174
|
-
st.fitBounds(
|
|
26174
|
+
st.fitBounds(Ue, {
|
|
26175
26175
|
padding: 50,
|
|
26176
26176
|
duration: 1e3
|
|
26177
26177
|
});
|
|
26178
26178
|
} else
|
|
26179
|
-
console.warn(`No se pudo encontrar bbox para fitToId: ${
|
|
26179
|
+
console.warn(`No se pudo encontrar bbox para fitToId: ${je}`);
|
|
26180
26180
|
}
|
|
26181
26181
|
} catch (he) {
|
|
26182
26182
|
console.error("Error cargando datos en el mapa:", he), Xt(`Error cargando datos: ${he instanceof Error ? he.message : String(he)}`);
|
|
@@ -26191,7 +26191,7 @@ const Nu = "pmtiles-source", Wf = "pmtiles-fill", gx = ({
|
|
|
26191
26191
|
})(), () => {
|
|
26192
26192
|
Je.current && (Je.current.remove(), Je.current = null), Uf.removeProtocol("pmtiles");
|
|
26193
26193
|
};
|
|
26194
|
-
}, [F, C, D, $, Q, ue, P, c, rt,
|
|
26194
|
+
}, [F, C, D, $, Q, ue, P, c, rt, je, Ye, Be]);
|
|
26195
26195
|
const zt = {
|
|
26196
26196
|
width: typeof le == "number" ? `${le}px` : le,
|
|
26197
26197
|
height: typeof Pe == "number" ? `${Pe}px` : Pe,
|