@datosgeo-atdt/geo-ui 0.4.0 → 0.4.2
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/components/MapaPMTiles.d.ts.map +1 -1
- package/dist/geo-ui.js +111 -111
- package/dist/geo-ui.js.map +1 -1
- package/dist/geo-ui.umd.cjs +9 -9
- package/dist/geo-ui.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/geo-ui.js
CHANGED
|
@@ -162,9 +162,9 @@ function ty() {
|
|
|
162
162
|
return this.sampleCurveY(this.solveCurveX(e, i));
|
|
163
163
|
} }, Oe;
|
|
164
164
|
})(), at = Pe(Ye);
|
|
165
|
-
let
|
|
165
|
+
let Et, Qe;
|
|
166
166
|
function ge() {
|
|
167
|
-
return
|
|
167
|
+
return Et == null && (Et = typeof OffscreenCanvas < "u" && new OffscreenCanvas(1, 1).getContext("2d") && typeof createImageBitmap == "function"), Et;
|
|
168
168
|
}
|
|
169
169
|
function ei() {
|
|
170
170
|
if (Qe == null && (Qe = !1, ge())) {
|
|
@@ -291,7 +291,7 @@ function ty() {
|
|
|
291
291
|
for (const i of e) for (const s in i) r[s] = i[s];
|
|
292
292
|
return r;
|
|
293
293
|
}
|
|
294
|
-
let
|
|
294
|
+
let Ct = 1;
|
|
295
295
|
function Vt(r, e, i) {
|
|
296
296
|
const s = {};
|
|
297
297
|
for (const o in r) s[o] = e.call(this, r[o], o, r);
|
|
@@ -2557,7 +2557,7 @@ function ty() {
|
|
|
2557
2557
|
function fl(r) {
|
|
2558
2558
|
return !!r.expression && r.expression.interpolated;
|
|
2559
2559
|
}
|
|
2560
|
-
function
|
|
2560
|
+
function At(r) {
|
|
2561
2561
|
return r instanceof Number ? "number" : r instanceof String ? "string" : r instanceof Boolean ? "boolean" : Array.isArray(r) ? "array" : r === null ? "null" : typeof r;
|
|
2562
2562
|
}
|
|
2563
2563
|
function to(r) {
|
|
@@ -2630,7 +2630,7 @@ function ty() {
|
|
|
2630
2630
|
return ia(typeof i === o ? s[i] : void 0, r.default, e.default);
|
|
2631
2631
|
}
|
|
2632
2632
|
function oh(r, e, i) {
|
|
2633
|
-
if (
|
|
2633
|
+
if (At(i) !== "number") return ia(r.default, e.default);
|
|
2634
2634
|
const s = r.stops.length;
|
|
2635
2635
|
if (s === 1 || i <= r.stops[0][0]) return r.stops[0][1];
|
|
2636
2636
|
if (i >= r.stops[s - 1][0]) return r.stops[s - 1][1];
|
|
@@ -2639,7 +2639,7 @@ function ty() {
|
|
|
2639
2639
|
}
|
|
2640
2640
|
function jc(r, e, i) {
|
|
2641
2641
|
const s = r.base !== void 0 ? r.base : 1;
|
|
2642
|
-
if (
|
|
2642
|
+
if (At(i) !== "number") return ia(r.default, e.default);
|
|
2643
2643
|
const o = r.stops.length;
|
|
2644
2644
|
if (o === 1 || i <= r.stops[0][0]) return r.stops[0][1];
|
|
2645
2645
|
if (i >= r.stops[o - 1][0]) return r.stops[o - 1][1];
|
|
@@ -2673,7 +2673,7 @@ function ty() {
|
|
|
2673
2673
|
i = Ii.parse(i);
|
|
2674
2674
|
break;
|
|
2675
2675
|
default:
|
|
2676
|
-
|
|
2676
|
+
At(i) === e.type || e.type === "enum" && e.values[i] || (i = void 0);
|
|
2677
2677
|
}
|
|
2678
2678
|
return ia(i, r.default, e.default);
|
|
2679
2679
|
}
|
|
@@ -2968,7 +2968,7 @@ function ty() {
|
|
|
2968
2968
|
function zr(r) {
|
|
2969
2969
|
const e = r.key, i = r.value, s = r.valueSpec || {}, o = r.objectElementValidators || {}, u = r.style, h = r.styleSpec, f = r.validateSpec;
|
|
2970
2970
|
let g = [];
|
|
2971
|
-
const y =
|
|
2971
|
+
const y = At(i);
|
|
2972
2972
|
if (y !== "object") return [new Re(e, i, `object expected, ${y} found`)];
|
|
2973
2973
|
for (const v in i) {
|
|
2974
2974
|
const w = v.split(".")[0], S = $s(s, w) || s["*"];
|
|
@@ -2992,27 +2992,27 @@ function ty() {
|
|
|
2992
2992
|
}
|
|
2993
2993
|
function oo(r) {
|
|
2994
2994
|
const e = r.value, i = r.valueSpec, s = r.style, o = r.styleSpec, u = r.key, h = r.arrayElementValidator || r.validateSpec;
|
|
2995
|
-
if (
|
|
2995
|
+
if (At(e) !== "array") return [new Re(u, e, `array expected, ${At(e)} found`)];
|
|
2996
2996
|
if (i.length && e.length !== i.length) return [new Re(u, e, `array length ${i.length} expected, length ${e.length} found`)];
|
|
2997
2997
|
let f = { type: i.value, values: i.values };
|
|
2998
|
-
o.$version < 7 && (f.function = i.function),
|
|
2998
|
+
o.$version < 7 && (f.function = i.function), At(i.value) === "object" && (f = i.value);
|
|
2999
2999
|
let g = [];
|
|
3000
3000
|
for (let y = 0; y < e.length; y++) g = g.concat(h({ array: e, arrayIndex: y, value: e[y], valueSpec: f, validateSpec: r.validateSpec, style: s, styleSpec: o, key: `${u}[${y}]` }));
|
|
3001
3001
|
return g;
|
|
3002
3002
|
}
|
|
3003
3003
|
function oa(r) {
|
|
3004
3004
|
const e = r.key, i = r.value, s = r.valueSpec;
|
|
3005
|
-
let o =
|
|
3005
|
+
let o = At(i);
|
|
3006
3006
|
return o === "number" && i != i && (o = "NaN"), o !== "number" ? [new Re(e, i, `number expected, ${o} found`)] : "minimum" in s && i < s.minimum ? [new Re(e, i, `${i} is less than the minimum value ${s.minimum}`)] : "maximum" in s && i > s.maximum ? [new Re(e, i, `${i} is greater than the maximum value ${s.maximum}`)] : [];
|
|
3007
3007
|
}
|
|
3008
3008
|
function lo(r) {
|
|
3009
3009
|
const e = r.valueSpec, i = Ni(r.value.type);
|
|
3010
3010
|
let s, o, u, h = {};
|
|
3011
|
-
const f = i !== "categorical" && r.value.property === void 0, g = !f, y =
|
|
3011
|
+
const f = i !== "categorical" && r.value.property === void 0, g = !f, y = At(r.value.stops) === "array" && At(r.value.stops[0]) === "array" && At(r.value.stops[0][0]) === "object", v = zr({ key: r.key, value: r.value, valueSpec: r.styleSpec.function, validateSpec: r.validateSpec, style: r.style, styleSpec: r.styleSpec, objectElementValidators: { stops: function(M) {
|
|
3012
3012
|
if (i === "identity") return [new Re(M.key, M.value, 'identity function may not have a "stops" property')];
|
|
3013
3013
|
let A = [];
|
|
3014
3014
|
const z = M.value;
|
|
3015
|
-
return A = A.concat(oo({ key: M.key, value: z, valueSpec: M.valueSpec, validateSpec: M.validateSpec, style: M.style, styleSpec: M.styleSpec, arrayElementValidator: w })),
|
|
3015
|
+
return A = A.concat(oo({ key: M.key, value: z, valueSpec: M.valueSpec, validateSpec: M.validateSpec, style: M.style, styleSpec: M.styleSpec, arrayElementValidator: w })), At(z) === "array" && z.length === 0 && A.push(new Re(M.key, z, "array must have at least one stop")), A;
|
|
3016
3016
|
}, default: function(M) {
|
|
3017
3017
|
return M.validateSpec({ key: M.key, value: M.value, valueSpec: e, validateSpec: M.validateSpec, style: M.style, styleSpec: M.styleSpec });
|
|
3018
3018
|
} } });
|
|
@@ -3020,10 +3020,10 @@ function ty() {
|
|
|
3020
3020
|
function w(M) {
|
|
3021
3021
|
let A = [];
|
|
3022
3022
|
const z = M.value, R = M.key;
|
|
3023
|
-
if (
|
|
3023
|
+
if (At(z) !== "array") return [new Re(R, z, `array expected, ${At(z)} found`)];
|
|
3024
3024
|
if (z.length !== 2) return [new Re(R, z, `array length 2 expected, length ${z.length} found`)];
|
|
3025
3025
|
if (y) {
|
|
3026
|
-
if (
|
|
3026
|
+
if (At(z[0]) !== "object") return [new Re(R, z, `object expected, ${At(z[0])} found`)];
|
|
3027
3027
|
if (z[0].zoom === void 0) return [new Re(R, z, "object stop key must have zoom")];
|
|
3028
3028
|
if (z[0].value === void 0) return [new Re(R, z, "object stop key must have value")];
|
|
3029
3029
|
if (u && u > Ni(z[0].zoom)) return [new Re(R, z[0].zoom, "stop zoom values must appear in ascending order")];
|
|
@@ -3032,7 +3032,7 @@ function ty() {
|
|
|
3032
3032
|
return Ts($n(z[1])) ? A.concat([new Re(`${R}[1]`, z[1], "expressions are not allowed in function stops.")]) : A.concat(M.validateSpec({ key: `${R}[1]`, value: z[1], valueSpec: e, validateSpec: M.validateSpec, style: M.style, styleSpec: M.styleSpec }));
|
|
3033
3033
|
}
|
|
3034
3034
|
function S(M, A) {
|
|
3035
|
-
const z =
|
|
3035
|
+
const z = At(M.value), R = Ni(M.value), N = M.value !== null ? M.value : A;
|
|
3036
3036
|
if (s) {
|
|
3037
3037
|
if (z !== s) return [new Re(M.key, N, `${z} stop domain type must match previous stop domain type ${s}`)];
|
|
3038
3038
|
} else s = z;
|
|
@@ -3058,7 +3058,7 @@ function ty() {
|
|
|
3058
3058
|
return [];
|
|
3059
3059
|
}
|
|
3060
3060
|
function la(r) {
|
|
3061
|
-
const e = r.key, i = r.value, s =
|
|
3061
|
+
const e = r.key, i = r.value, s = At(i);
|
|
3062
3062
|
return s !== "string" ? [new Re(e, i, `color expected, ${s} found`)] : It.parse(String(i)) ? [] : [new Re(e, i, `color expected, "${i}" found`)];
|
|
3063
3063
|
}
|
|
3064
3064
|
function Wn(r) {
|
|
@@ -3070,7 +3070,7 @@ function ty() {
|
|
|
3070
3070
|
}
|
|
3071
3071
|
function Wc(r) {
|
|
3072
3072
|
const e = r.value, i = r.key;
|
|
3073
|
-
if (
|
|
3073
|
+
if (At(e) !== "array") return [new Re(i, e, `array expected, ${At(e)} found`)];
|
|
3074
3074
|
const s = r.styleSpec;
|
|
3075
3075
|
let o, u = [];
|
|
3076
3076
|
if (e.length < 1) return [new Re(i, e, "filter array must have at least 1 element")];
|
|
@@ -3085,8 +3085,8 @@ function ty() {
|
|
|
3085
3085
|
e.length !== 3 && u.push(new Re(i, e, `filter array for operator "${e[0]}" must have 3 elements`));
|
|
3086
3086
|
case "in":
|
|
3087
3087
|
case "!in":
|
|
3088
|
-
e.length >= 2 && (o =
|
|
3089
|
-
for (let h = 2; h < e.length; h++) o =
|
|
3088
|
+
e.length >= 2 && (o = At(e[1]), o !== "string" && u.push(new Re(`${i}[1]`, e[1], `string expected, ${o} found`)));
|
|
3089
|
+
for (let h = 2; h < e.length; h++) o = At(e[h]), Ni(e[1]) === "$type" ? u = u.concat(Wn({ key: `${i}[${h}]`, value: e[h], valueSpec: s.geometry_type, style: r.style, styleSpec: r.styleSpec })) : o !== "string" && o !== "number" && o !== "boolean" && u.push(new Re(`${i}[${h}]`, e[h], `string, number, or boolean expected, ${o} found`));
|
|
3090
3090
|
break;
|
|
3091
3091
|
case "any":
|
|
3092
3092
|
case "all":
|
|
@@ -3095,7 +3095,7 @@ function ty() {
|
|
|
3095
3095
|
break;
|
|
3096
3096
|
case "has":
|
|
3097
3097
|
case "!has":
|
|
3098
|
-
o =
|
|
3098
|
+
o = At(e[1]), e.length !== 2 ? u.push(new Re(i, e, `filter array for "${e[0]}" operator must have 2 elements`)) : o !== "string" && u.push(new Re(`${i}[1]`, e[1], `string expected, ${o} found`));
|
|
3099
3099
|
}
|
|
3100
3100
|
return u;
|
|
3101
3101
|
}
|
|
@@ -3107,7 +3107,7 @@ function ty() {
|
|
|
3107
3107
|
const v = r.valueSpec || g[f];
|
|
3108
3108
|
if (!v) return [new Re(i, h, `unknown property "${f}"`)];
|
|
3109
3109
|
let w;
|
|
3110
|
-
if (
|
|
3110
|
+
if (At(h) === "string" && ws(v) && !v.tokens && (w = /^{([^}]+)}$/.exec(h))) return [new Re(i, h, `"${f}" does not support interpolation syntax
|
|
3111
3111
|
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(w[1])} }\`.`)];
|
|
3112
3112
|
const S = [];
|
|
3113
3113
|
return r.layerType === "symbol" && f === "text-font" && to($n(h)) && Ni(h.type) === "identity" && S.push(new Re(i, h, '"text-font" does not support identity functions')), S.concat(s({ key: r.key, value: h, valueSpec: v, style: o, styleSpec: u, expressionContext: "property", propertyType: e, propertyKey: f }));
|
|
@@ -3121,7 +3121,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
3121
3121
|
function Kc(r) {
|
|
3122
3122
|
let e = [];
|
|
3123
3123
|
const i = r.value, s = r.key, o = r.style, u = r.styleSpec;
|
|
3124
|
-
if (
|
|
3124
|
+
if (At(i) !== "object") return [new Re(s, i, `object expected, ${At(i)} found`)];
|
|
3125
3125
|
i.type || i.ref || e.push(new Re(s, i, 'either "type" or "ref" is required'));
|
|
3126
3126
|
let h = Ni(i.type);
|
|
3127
3127
|
const f = Ni(i.ref);
|
|
@@ -3146,11 +3146,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
3146
3146
|
return e = e.concat(zr({ key: s, value: i, valueSpec: u.layer, style: r.style, styleSpec: r.styleSpec, validateSpec: r.validateSpec, objectElementValidators: { "*": () => [], type: () => r.validateSpec({ key: `${s}.type`, value: i.type, valueSpec: u.layer.type, style: r.style, styleSpec: r.styleSpec, validateSpec: r.validateSpec, object: i, objectKey: "type" }), filter: Ss, layout: (g) => zr({ layer: i, key: g.key, value: g.value, style: g.style, styleSpec: g.styleSpec, validateSpec: g.validateSpec, objectElementValidators: { "*": (y) => Yc(_r({ layerType: h }, y)) } }), paint: (g) => zr({ layer: i, key: g.key, value: g.value, style: g.style, styleSpec: g.styleSpec, validateSpec: g.validateSpec, objectElementValidators: { "*": (y) => Xc(_r({ layerType: h }, y)) } }) } })), e;
|
|
3147
3147
|
}
|
|
3148
3148
|
function Mn(r) {
|
|
3149
|
-
const e = r.value, i = r.key, s =
|
|
3149
|
+
const e = r.value, i = r.key, s = At(e);
|
|
3150
3150
|
return s !== "string" ? [new Re(i, e, `string expected, ${s} found`)] : [];
|
|
3151
3151
|
}
|
|
3152
3152
|
const xl = { promoteId: function({ key: r, value: e }) {
|
|
3153
|
-
if (
|
|
3153
|
+
if (At(e) === "string") return Mn({ key: r, value: e });
|
|
3154
3154
|
{
|
|
3155
3155
|
const i = [];
|
|
3156
3156
|
for (const s in e) i.push(...Mn({ key: `${r}.${s}`, value: e[s] }));
|
|
@@ -3171,7 +3171,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
3171
3171
|
var y;
|
|
3172
3172
|
const v = (y = g.sourceName) !== null && y !== void 0 ? y : "", w = g.value, S = g.styleSpec, M = S.source_raster_dem, A = g.style;
|
|
3173
3173
|
let z = [];
|
|
3174
|
-
const R =
|
|
3174
|
+
const R = At(w);
|
|
3175
3175
|
if (w === void 0) return z;
|
|
3176
3176
|
if (R !== "object") return z.push(new Re("source_raster_dem", w, `object expected, ${R} found`)), z;
|
|
3177
3177
|
const N = Ni(w.encoding) === "custom", X = ["redFactor", "greenFactor", "blueFactor", "baseShift"], j = g.value.encoding ? `"${g.value.encoding}"` : "Default";
|
|
@@ -3197,7 +3197,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
3197
3197
|
function ca(r) {
|
|
3198
3198
|
const e = r.value, i = r.styleSpec, s = i.light, o = r.style;
|
|
3199
3199
|
let u = [];
|
|
3200
|
-
const h =
|
|
3200
|
+
const h = At(e);
|
|
3201
3201
|
if (e === void 0) return u;
|
|
3202
3202
|
if (h !== "object") return u = u.concat([new Re("light", e, `object expected, ${h} found`)]), u;
|
|
3203
3203
|
for (const f in e) {
|
|
@@ -3207,7 +3207,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
3207
3207
|
return u;
|
|
3208
3208
|
}
|
|
3209
3209
|
function Jc(r) {
|
|
3210
|
-
const e = r.value, i = r.styleSpec, s = i.sky, o = r.style, u =
|
|
3210
|
+
const e = r.value, i = r.styleSpec, s = i.sky, o = r.style, u = At(e);
|
|
3211
3211
|
if (e === void 0) return [];
|
|
3212
3212
|
if (u !== "object") return [new Re("sky", e, `object expected, ${u} found`)];
|
|
3213
3213
|
let h = [];
|
|
@@ -3217,7 +3217,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
3217
3217
|
function bl(r) {
|
|
3218
3218
|
const e = r.value, i = r.styleSpec, s = i.terrain, o = r.style;
|
|
3219
3219
|
let u = [];
|
|
3220
|
-
const h =
|
|
3220
|
+
const h = At(e);
|
|
3221
3221
|
if (e === void 0) return u;
|
|
3222
3222
|
if (h !== "object") return u = u.concat([new Re("terrain", e, `object expected, ${h} found`)]), u;
|
|
3223
3223
|
for (const f in e) u = u.concat(s[f] ? r.validateSpec({ key: f, value: e[f], valueSpec: s[f], validateSpec: r.validateSpec, style: o, styleSpec: i }) : [new Re(f, e[f], `unknown property "${f}"`)]);
|
|
@@ -3237,13 +3237,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
3237
3237
|
return !!r && r.constructor === Object;
|
|
3238
3238
|
}
|
|
3239
3239
|
function Tl(r) {
|
|
3240
|
-
return Qc(r.value) ? [] : [new Re(r.key, r.value, `object expected, ${
|
|
3240
|
+
return Qc(r.value) ? [] : [new Re(r.key, r.value, `object expected, ${At(r.value)} found`)];
|
|
3241
3241
|
}
|
|
3242
3242
|
const Sl = { "*": () => [], array: oo, boolean: function(r) {
|
|
3243
|
-
const e = r.value, i = r.key, s =
|
|
3243
|
+
const e = r.value, i = r.key, s = At(e);
|
|
3244
3244
|
return s !== "boolean" ? [new Re(i, e, `boolean expected, ${s} found`)] : [];
|
|
3245
3245
|
}, number: oa, color: la, constants: $c, enum: Wn, filter: Ss, function: lo, layer: Kc, object: zr, source: vl, light: ca, sky: Jc, terrain: bl, projection: function(r) {
|
|
3246
|
-
const e = r.value, i = r.styleSpec, s = i.projection, o = r.style, u =
|
|
3246
|
+
const e = r.value, i = r.styleSpec, s = i.projection, o = r.style, u = At(e);
|
|
3247
3247
|
if (e === void 0) return [];
|
|
3248
3248
|
if (u !== "object") return [new Re("projection", e, `object expected, ${u} found`)];
|
|
3249
3249
|
let h = [];
|
|
@@ -3253,7 +3253,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
3253
3253
|
const e = r.key;
|
|
3254
3254
|
let i = r.value;
|
|
3255
3255
|
i = i instanceof String ? i.valueOf() : i;
|
|
3256
|
-
const s =
|
|
3256
|
+
const s = At(i);
|
|
3257
3257
|
return s !== "array" || (function(o) {
|
|
3258
3258
|
return Array.isArray(o) && o.length === 3 && typeof o[0] == "string" && typeof o[1] == "string" && typeof o[2] == "number";
|
|
3259
3259
|
})(i) || (function(o) {
|
|
@@ -3265,7 +3265,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
3265
3265
|
return Mn(r).length === 0 ? [] : Pn(r);
|
|
3266
3266
|
}, padding: function(r) {
|
|
3267
3267
|
const e = r.key, i = r.value;
|
|
3268
|
-
if (
|
|
3268
|
+
if (At(i) === "array") {
|
|
3269
3269
|
if (i.length < 1 || i.length > 4) return [new Re(e, i, `padding requires 1 to 4 values; ${i.length} values found`)];
|
|
3270
3270
|
const s = { type: "number" };
|
|
3271
3271
|
let o = [];
|
|
@@ -3275,7 +3275,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
3275
3275
|
return oa({ key: e, value: i, valueSpec: {} });
|
|
3276
3276
|
}, numberArray: function(r) {
|
|
3277
3277
|
const e = r.key, i = r.value;
|
|
3278
|
-
if (
|
|
3278
|
+
if (At(i) === "array") {
|
|
3279
3279
|
const s = { type: "number" };
|
|
3280
3280
|
if (i.length < 1) return [new Re(e, i, "array length at least 1 expected, length 0 found")];
|
|
3281
3281
|
let o = [];
|
|
@@ -3285,7 +3285,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
3285
3285
|
return oa({ key: e, value: i, valueSpec: {} });
|
|
3286
3286
|
}, colorArray: function(r) {
|
|
3287
3287
|
const e = r.key, i = r.value;
|
|
3288
|
-
if (
|
|
3288
|
+
if (At(i) === "array") {
|
|
3289
3289
|
if (i.length < 1) return [new Re(e, i, "array length at least 1 expected, length 0 found")];
|
|
3290
3290
|
let s = [];
|
|
3291
3291
|
for (let o = 0; o < i.length; o++) s = s.concat(la({ key: `${e}[${o}]`, value: i[o] }));
|
|
@@ -3293,17 +3293,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
3293
3293
|
}
|
|
3294
3294
|
return la({ key: e, value: i });
|
|
3295
3295
|
}, variableAnchorOffsetCollection: function(r) {
|
|
3296
|
-
const e = r.key, i = r.value, s =
|
|
3296
|
+
const e = r.key, i = r.value, s = At(i), o = r.styleSpec;
|
|
3297
3297
|
if (s !== "array" || i.length < 1 || i.length % 2 != 0) return [new Re(e, i, "variableAnchorOffsetCollection requires a non-empty array of even length")];
|
|
3298
3298
|
let u = [];
|
|
3299
3299
|
for (let h = 0; h < i.length; h += 2) u = u.concat(Wn({ key: `${e}[${h}]`, value: i[h], valueSpec: o.layout_symbol["text-anchor"] })), u = u.concat(oo({ key: `${e}[${h + 1}]`, value: i[h + 1], valueSpec: { length: 2, value: "number" }, validateSpec: r.validateSpec, style: r.style, styleSpec: o }));
|
|
3300
3300
|
return u;
|
|
3301
3301
|
}, sprite: wl, state: Tl, fontFaces: function(r) {
|
|
3302
3302
|
const e = r.key, i = r.value, s = r.validateSpec, o = r.styleSpec, u = r.style;
|
|
3303
|
-
if (!Qc(i)) return [new Re(e, i, `object expected, ${
|
|
3303
|
+
if (!Qc(i)) return [new Re(e, i, `object expected, ${At(i)} found`)];
|
|
3304
3304
|
const h = [];
|
|
3305
3305
|
for (const f in i) {
|
|
3306
|
-
const g = i[f], y =
|
|
3306
|
+
const g = i[f], y = At(g);
|
|
3307
3307
|
if (y === "string") h.push(...Mn({ key: `${e}.${f}`, value: g }));
|
|
3308
3308
|
else if (y === "array") {
|
|
3309
3309
|
const v = { url: { type: "string", required: !0 }, "unicode-range": { type: "array", value: "string" } };
|
|
@@ -10925,7 +10925,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
10925
10925
|
}
|
|
10926
10926
|
}));
|
|
10927
10927
|
}, P.ae = Re, P.af = function() {
|
|
10928
|
-
return
|
|
10928
|
+
return Ct++;
|
|
10929
10929
|
}, P.ag = l, P.ah = zo, P.ai = ic, P.aj = na, P.ak = zn, P.al = Vp, P.am = function(r) {
|
|
10930
10930
|
const e = {};
|
|
10931
10931
|
if (r.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g, ((i, s, o, u) => {
|
|
@@ -11594,7 +11594,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11594
11594
|
this.layers[B.name] = B;
|
|
11595
11595
|
}
|
|
11596
11596
|
}
|
|
11597
|
-
function
|
|
11597
|
+
function Et(ce) {
|
|
11598
11598
|
let B = P.cU(ce);
|
|
11599
11599
|
return B.byteOffset === 0 && B.byteLength === B.buffer.byteLength || (B = new Uint8Array(B)), { vectorTile: ce, rawData: B.buffer };
|
|
11600
11600
|
}
|
|
@@ -11671,7 +11671,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
11671
11671
|
const gt = Qe(tt, fe, U.canonical);
|
|
11672
11672
|
gt.length > 0 && we.addLayer(gt);
|
|
11673
11673
|
}
|
|
11674
|
-
const Ee =
|
|
11674
|
+
const Ee = Et(we);
|
|
11675
11675
|
return this.overzoomedTileResultCache.set(de, Ee), Ee;
|
|
11676
11676
|
}
|
|
11677
11677
|
reloadTile(B) {
|
|
@@ -12023,11 +12023,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12023
12023
|
let gt = [];
|
|
12024
12024
|
if (Ee === "Point" || Ee === "MultiPoint") $t(ke, gt, O, U, re);
|
|
12025
12025
|
else if (Ee === "LineString") mi(ke, gt, O, U, re, !1, de.lineMetrics);
|
|
12026
|
-
else if (Ee === "MultiLineString")
|
|
12027
|
-
else if (Ee === "Polygon")
|
|
12026
|
+
else if (Ee === "MultiLineString") Ct(ke, gt, O, U, re, !1);
|
|
12027
|
+
else if (Ee === "Polygon") Ct(ke, gt, O, U, re, !0);
|
|
12028
12028
|
else if (Ee === "MultiPolygon") for (const ti of ke) {
|
|
12029
12029
|
const Wt = [];
|
|
12030
|
-
|
|
12030
|
+
Ct(ti, Wt, O, U, re, !0), Wt.length && gt.push(Wt);
|
|
12031
12031
|
}
|
|
12032
12032
|
if (gt.length) {
|
|
12033
12033
|
if (de.lineMetrics && Ee === "LineString") {
|
|
@@ -12062,7 +12062,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12062
12062
|
const B = [];
|
|
12063
12063
|
return B.size = ce.size, B.start = ce.start, B.end = ce.end, B;
|
|
12064
12064
|
}
|
|
12065
|
-
function
|
|
12065
|
+
function Ct(ce, B, O, U, re, ne) {
|
|
12066
12066
|
for (const fe of ce) mi(fe, B, O, U, re, ne, !1);
|
|
12067
12067
|
}
|
|
12068
12068
|
function Vt(ce, B, O, U) {
|
|
@@ -12232,7 +12232,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12232
12232
|
const U = B.tileID.canonical;
|
|
12233
12233
|
if (!this._geoJSONIndex) throw new Error("Unable to parse the data into a cluster or geojson");
|
|
12234
12234
|
const re = this._geoJSONIndex.getTile(U.z, U.x, U.y);
|
|
12235
|
-
return re ?
|
|
12235
|
+
return re ? Et(new P.d2(re.features, { version: 2, extent: P.a5 })) : null;
|
|
12236
12236
|
}));
|
|
12237
12237
|
}
|
|
12238
12238
|
loadData(B) {
|
|
@@ -12446,7 +12446,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12446
12446
|
return Ye !== void 0 ? Ye : !!matchMedia && (Ne == null && (Ne = matchMedia("(prefers-reduced-motion: reduce)")), Ne.matches);
|
|
12447
12447
|
}, set prefersReducedMotion(d) {
|
|
12448
12448
|
Ye = d;
|
|
12449
|
-
} },
|
|
12449
|
+
} }, Et = new class {
|
|
12450
12450
|
constructor() {
|
|
12451
12451
|
this._realTime = typeof performance < "u" && performance && performance.now ? performance.now.bind(performance) : Date.now.bind(Date), this._frozenAt = null;
|
|
12452
12452
|
}
|
|
@@ -12464,7 +12464,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
12464
12464
|
}
|
|
12465
12465
|
}();
|
|
12466
12466
|
function Qe() {
|
|
12467
|
-
return
|
|
12467
|
+
return Et.getCurrentTime();
|
|
12468
12468
|
}
|
|
12469
12469
|
class ge {
|
|
12470
12470
|
static testProp(t) {
|
|
@@ -13082,7 +13082,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
13082
13082
|
}
|
|
13083
13083
|
const $t = Math.floor(at.hardwareConcurrency / 2);
|
|
13084
13084
|
let mi, ut;
|
|
13085
|
-
function
|
|
13085
|
+
function Ct() {
|
|
13086
13086
|
return mi || (mi = new xt()), mi;
|
|
13087
13087
|
}
|
|
13088
13088
|
xt.workerCount = c.K(globalThis) ? Math.max(Math.min($t, 3), 1) : 1;
|
|
@@ -13117,7 +13117,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
|
13117
13117
|
}
|
|
13118
13118
|
}
|
|
13119
13119
|
function dt() {
|
|
13120
|
-
return ut || (ut = new Vt(
|
|
13120
|
+
return ut || (ut = new Vt(Ct(), c.M), ut.registerMessageHandler("GR", ((d, t, n) => c.m(t, n)))), ut;
|
|
13121
13121
|
}
|
|
13122
13122
|
function Bt(d, t) {
|
|
13123
13123
|
const n = c.N();
|
|
@@ -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 Vt(
|
|
18596
|
+
}, this.map = t, this.dispatcher = new Vt(Ct(), 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 nt(t._requestManager, n.localIdeographFontFamily, p), this.lineAtlas = new Je(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;
|
|
@@ -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
|
|
19759
|
+
class At extends Ht {
|
|
19760
19760
|
getDefault() {
|
|
19761
19761
|
const t = this.gl;
|
|
19762
19762
|
return [0, 0, t.drawingBufferWidth, t.drawingBufferHeight];
|
|
@@ -19912,7 +19912,7 @@ uniform ${T} ${E} u_${I};
|
|
|
19912
19912
|
class no {
|
|
19913
19913
|
constructor(t) {
|
|
19914
19914
|
var n, a;
|
|
19915
|
-
if (this.gl = t, this.clearColor = new Xa(this), this.clearDepth = new Ya(this), this.clearStencil = new Ka(this), this.colorMask = new dl(this), this.depthMask = new Gn(this), this.stencilMask = new ea(this), this.stencilFunc = new vs(this), this.stencilOp = new Vr(this), this.stencilTest = new Lc(this), this.depthRange = new Bc(this), this.depthTest = new pl(this), this.depthFunc = new qn(this), this.blend = new Ja(this), this.blendFunc = new Qa(this), this.blendColor = new ta(this), this.blendEquation = new eo(this), this.cullFace = new Oc(this), this.cullFaceSide = new bs(this), this.frontFace = new ws(this), this.program = new Vc(this), this.activeTexture = new fl(this), this.viewport = new
|
|
19915
|
+
if (this.gl = t, this.clearColor = new Xa(this), this.clearDepth = new Ya(this), this.clearStencil = new Ka(this), this.colorMask = new dl(this), this.depthMask = new Gn(this), this.stencilMask = new ea(this), this.stencilFunc = new vs(this), this.stencilOp = new Vr(this), this.stencilTest = new Lc(this), this.depthRange = new Bc(this), this.depthTest = new pl(this), this.depthFunc = new qn(this), this.blend = new Ja(this), this.blendFunc = new Qa(this), this.blendColor = new ta(this), this.blendEquation = new eo(this), this.cullFace = new Oc(this), this.cullFaceSide = new bs(this), this.frontFace = new ws(this), this.program = new Vc(this), this.activeTexture = new fl(this), this.viewport = new At(this), this.bindFramebuffer = new to(this), this.bindRenderbuffer = new sh(this), this.bindTexture = new Nc(this), this.bindVertexBuffer = new ia(this), this.bindElementBuffer = new ah(this), this.bindVertexArray = new oh(this), this.pixelStoreUnpack = new jc(this), this.pixelStoreUnpackPremultiplyAlpha = new lh(this), this.pixelStoreUnpackFlipY = new ml(this), this.extTextureFilterAnisotropic = t.getExtension("EXT_texture_filter_anisotropic") || t.getExtension("MOZ_EXT_texture_filter_anisotropic") || t.getExtension("WEBKIT_EXT_texture_filter_anisotropic"), this.extTextureFilterAnisotropic && (this.extTextureFilterAnisotropicMax = t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)), this.maxTextureSize = t.getParameter(t.MAX_TEXTURE_SIZE), Or(t)) {
|
|
19916
19916
|
this.HALF_FLOAT = t.HALF_FLOAT;
|
|
19917
19917
|
const l = t.getExtension("EXT_color_buffer_half_float");
|
|
19918
19918
|
this.RGBA16F = (n = t.RGBA16F) !== null && n !== void 0 ? n : l == null ? void 0 : l.RGBA16F_EXT, this.RGB16F = (a = t.RGB16F) !== null && a !== void 0 ? a : l == null ? void 0 : l.RGB16F_EXT, t.getExtension("EXT_color_buffer_float");
|
|
@@ -23877,15 +23877,15 @@ ${k.shaderPreludeCode.vertexSource}`, define: k.shaderDefine }, defaultProjectio
|
|
|
23877
23877
|
}, P.importScriptInWorkers = function(d) {
|
|
23878
23878
|
return dt().broadcast("IS", d);
|
|
23879
23879
|
}, P.isTimeFrozen = function() {
|
|
23880
|
-
return
|
|
23880
|
+
return Et.isFrozen();
|
|
23881
23881
|
}, P.now = Qe, P.prewarm = function() {
|
|
23882
|
-
|
|
23882
|
+
Ct().acquire(zt);
|
|
23883
23883
|
}, P.restoreNow = function() {
|
|
23884
|
-
|
|
23884
|
+
Et.restoreNow();
|
|
23885
23885
|
}, P.setMaxParallelImageRequests = function(d) {
|
|
23886
23886
|
c.c.MAX_PARALLEL_IMAGE_REQUESTS = d;
|
|
23887
23887
|
}, P.setNow = function(d) {
|
|
23888
|
-
|
|
23888
|
+
Et.setNow(d);
|
|
23889
23889
|
}, P.setRTLTextPlugin = function(d, t) {
|
|
23890
23890
|
return de().setRTLTextPlugin(d, t);
|
|
23891
23891
|
}, P.setWorkerCount = function(d) {
|
|
@@ -24061,14 +24061,14 @@ var oy = /* @__PURE__ */ lc(uc, 9, 1), ly = /* @__PURE__ */ lc(um, 5, 1), _d = f
|
|
|
24061
24061
|
var ni = new rn(Math.max(Bt * 2, dt));
|
|
24062
24062
|
ni.set(D), D = ni;
|
|
24063
24063
|
}
|
|
24064
|
-
}, Oe = C.f || 0, Ne = C.p || 0, Ye = C.b || 0, at = C.l,
|
|
24064
|
+
}, Oe = C.f || 0, Ne = C.p || 0, Ye = C.b || 0, at = C.l, Et = C.d, Qe = C.m, ge = C.n, ei = Q * 8;
|
|
24065
24065
|
do {
|
|
24066
24066
|
if (!at) {
|
|
24067
24067
|
Oe = xn(F, Ne, 1);
|
|
24068
24068
|
var Dt = xn(F, Ne + 1, 3);
|
|
24069
24069
|
if (Ne += 3, Dt)
|
|
24070
24070
|
if (Dt == 1)
|
|
24071
|
-
at = oy,
|
|
24071
|
+
at = oy, Et = ly, Qe = 9, ge = 5;
|
|
24072
24072
|
else if (Dt == 2) {
|
|
24073
24073
|
var Mi = xn(F, Ne, 31) + 257, st = xn(F, Ne + 10, 15) + 4, pe = Mi + xn(F, Ne + 5, 31) + 1;
|
|
24074
24074
|
Ne += 14;
|
|
@@ -24088,7 +24088,7 @@ var oy = /* @__PURE__ */ lc(uc, 9, 1), ly = /* @__PURE__ */ lc(um, 5, 1), _d = f
|
|
|
24088
24088
|
}
|
|
24089
24089
|
}
|
|
24090
24090
|
var ft = he.subarray(0, Mi), Fe = he.subarray(Mi);
|
|
24091
|
-
Qe = _d(ft), ge = _d(Fe), at = lc(ft, Qe, 1),
|
|
24091
|
+
Qe = _d(ft), ge = _d(Fe), at = lc(ft, Qe, 1), Et = lc(Fe, ge, 1);
|
|
24092
24092
|
} else
|
|
24093
24093
|
tn(1);
|
|
24094
24094
|
else {
|
|
@@ -24123,7 +24123,7 @@ var oy = /* @__PURE__ */ lc(uc, 9, 1), ly = /* @__PURE__ */ lc(um, 5, 1), _d = f
|
|
|
24123
24123
|
var qe = Je - 257, xt = sm[qe];
|
|
24124
24124
|
zt = xn(F, Ne, (1 << xt) - 1) + cm[qe], Ne += xt;
|
|
24125
24125
|
}
|
|
24126
|
-
var $t =
|
|
24126
|
+
var $t = Et[yd(F, Ne) & et], mi = $t >> 4;
|
|
24127
24127
|
$t || tn(3), Ne += $t & 15;
|
|
24128
24128
|
var Fe = ay[mi];
|
|
24129
24129
|
if (mi > 3) {
|
|
@@ -24137,15 +24137,15 @@ var oy = /* @__PURE__ */ lc(uc, 9, 1), ly = /* @__PURE__ */ lc(um, 5, 1), _d = f
|
|
|
24137
24137
|
c && Pe(Ye + 131072);
|
|
24138
24138
|
var ut = Ye + zt;
|
|
24139
24139
|
if (Ye < Fe) {
|
|
24140
|
-
var
|
|
24141
|
-
for (
|
|
24142
|
-
D[Ye] = $[
|
|
24140
|
+
var Ct = ue - Fe, Vt = Math.min(Fe, ut);
|
|
24141
|
+
for (Ct + Ye < 0 && tn(3); Ye < Vt; ++Ye)
|
|
24142
|
+
D[Ye] = $[Ct + Ye];
|
|
24143
24143
|
}
|
|
24144
24144
|
for (; Ye < ut; ++Ye)
|
|
24145
24145
|
D[Ye] = D[Ye - Fe];
|
|
24146
24146
|
}
|
|
24147
24147
|
}
|
|
24148
|
-
C.l = at, C.p = ot, C.b = Ye, C.f = Oe, at && (Oe = 1, C.m = Qe, C.d =
|
|
24148
|
+
C.l = at, C.p = ot, C.b = Ye, C.f = Oe, at && (Oe = 1, C.m = Qe, C.d = Et, C.n = ge);
|
|
24149
24149
|
} while (!Oe);
|
|
24150
24150
|
return Ye != D.length && P ? uy(D, 0, Ye) : D.subarray(0, Ye);
|
|
24151
24151
|
}, dy = /* @__PURE__ */ new rn(0), py = function(F) {
|
|
@@ -24224,9 +24224,9 @@ var Ty = xi((F) => (C, D) => {
|
|
|
24224
24224
|
constructor(C) {
|
|
24225
24225
|
this.tilev4 = xi((D, $) => fr(this, null, function* () {
|
|
24226
24226
|
if (D.type === "json") {
|
|
24227
|
-
let at = D.url.substr(10),
|
|
24228
|
-
if (
|
|
24229
|
-
let Qe = yield
|
|
24227
|
+
let at = D.url.substr(10), Et = this.tiles.get(at);
|
|
24228
|
+
if (Et || (Et = new Sd(at), this.tiles.set(at, Et)), this.metadata) return { data: yield Et.getTileJson(D.url) };
|
|
24229
|
+
let Qe = yield Et.getHeader();
|
|
24230
24230
|
return (Qe.minLon >= Qe.maxLon || Qe.minLat >= Qe.maxLat) && console.error(`Bounds of PMTiles archive ${Qe.minLon},${Qe.minLat},${Qe.maxLon},${Qe.maxLat} are not valid.`), { data: { tiles: [`${D.url}/{z}/{x}/{y}`], minzoom: Qe.minZoom, maxzoom: Qe.maxZoom, bounds: [Qe.minLon, Qe.minLat, Qe.maxLon, Qe.maxLat] } };
|
|
24231
24231
|
}
|
|
24232
24232
|
let Q = new RegExp(/pmtiles:\/\/(.+)\/(\d+)\/(\d+)\/(\d+)/), ue = D.url.match(Q);
|
|
@@ -24679,7 +24679,7 @@ function Fy() {
|
|
|
24679
24679
|
if (!this._finished) return ze = this._config.chunkSize, he = ze ? (qe = he.substring(0, ze), he.substring(ze)) : (qe = he, ""), this._finished = !he, this.parseChunk(qe);
|
|
24680
24680
|
};
|
|
24681
24681
|
}
|
|
24682
|
-
function
|
|
24682
|
+
function Et(pe) {
|
|
24683
24683
|
Oe.call(this, pe = pe || {});
|
|
24684
24684
|
var he = [], ze = !0, qe = !1;
|
|
24685
24685
|
this.pause = function() {
|
|
@@ -24723,7 +24723,7 @@ function Fy() {
|
|
|
24723
24723
|
Je.data.splice(0, 1);
|
|
24724
24724
|
} else Je.data.forEach(dt);
|
|
24725
24725
|
}
|
|
24726
|
-
function
|
|
24726
|
+
function Ct(dt, Bt) {
|
|
24727
24727
|
for (var ni = pe.header ? {} : [], vt = 0; vt < dt.length; vt++) {
|
|
24728
24728
|
var Ft = vt, bt = dt[vt], bt = ((Gt, mt) => ((Yt) => (pe.dynamicTypingFunction && pe.dynamicTyping[Yt] === void 0 && (pe.dynamicTyping[Yt] = pe.dynamicTypingFunction(Yt)), (pe.dynamicTyping[Yt] || pe.dynamicTyping) === !0))(Gt) ? mt === "true" || mt === "TRUE" || mt !== "false" && mt !== "FALSE" && (((Yt) => {
|
|
24729
24729
|
if (qt.test(Yt) && (Yt = parseFloat(Yt), Ut < Yt && Yt < ct))
|
|
@@ -24734,17 +24734,17 @@ function Fy() {
|
|
|
24734
24734
|
return pe.header && (vt > ot.length ? mi("FieldMismatch", "TooManyFields", "Too many fields: expected " + ot.length + " fields but parsed " + vt, Fe + Bt) : vt < ot.length && mi("FieldMismatch", "TooFewFields", "Too few fields: expected " + ot.length + " fields but parsed " + vt, Fe + Bt)), ni;
|
|
24735
24735
|
}
|
|
24736
24736
|
var Vt;
|
|
24737
|
-
Je && (pe.header || pe.dynamicTyping || pe.transform) && (Vt = 1, !Je.data.length || Array.isArray(Je.data[0]) ? (Je.data = Je.data.map(
|
|
24737
|
+
Je && (pe.header || pe.dynamicTyping || pe.transform) && (Vt = 1, !Je.data.length || Array.isArray(Je.data[0]) ? (Je.data = Je.data.map(Ct), Vt = Je.data.length) : Je.data = Ct(Je.data, 0), pe.header && Je.meta && (Je.meta.fields = ot), Fe += Vt);
|
|
24738
24738
|
}
|
|
24739
24739
|
function $t() {
|
|
24740
24740
|
return pe.header && ot.length === 0;
|
|
24741
24741
|
}
|
|
24742
|
-
function mi(ut,
|
|
24743
|
-
ut = { type: ut, code:
|
|
24742
|
+
function mi(ut, Ct, Vt, dt) {
|
|
24743
|
+
ut = { type: ut, code: Ct, message: Vt }, dt !== void 0 && (ut.row = dt), Je.errors.push(ut);
|
|
24744
24744
|
}
|
|
24745
24745
|
st(pe.step) && (Ue = pe.step, pe.step = function(ut) {
|
|
24746
24746
|
Je = ut, $t() ? xt() : (xt(), Je.data.length !== 0 && (ft += ut.data.length, pe.preview && ft > pe.preview ? ze.abort() : (Je.data = Je.data[0], Ue(Je, nt))));
|
|
24747
|
-
}), this.parse = function(ut,
|
|
24747
|
+
}), this.parse = function(ut, Ct, Vt) {
|
|
24748
24748
|
var dt = pe.quoteChar || '"', dt = (pe.newline || (pe.newline = this.guessLineEndings(ut, dt)), qe = !1, pe.delimiter ? st(pe.delimiter) && (pe.delimiter = pe.delimiter(ut), Je.meta.delimiter = pe.delimiter) : ((dt = ((Bt, ni, vt, Ft, bt) => {
|
|
24749
24749
|
var Gt, mt, Yt, mr;
|
|
24750
24750
|
bt = bt || [",", " ", "|", ";", Pe.RECORD_SEP, Pe.UNIT_SEP];
|
|
@@ -24754,7 +24754,7 @@ function Fy() {
|
|
|
24754
24754
|
}
|
|
24755
24755
|
return { successful: !!(pe.delimiter = Gt), bestDelimiter: Gt };
|
|
24756
24756
|
})(ut, pe.newline, pe.skipEmptyLines, pe.comments, pe.delimitersToGuess)).successful ? pe.delimiter = dt.bestDelimiter : (qe = !0, pe.delimiter = Pe.DefaultDelimiter), Je.meta.delimiter = pe.delimiter), di(pe));
|
|
24757
|
-
return pe.preview && pe.header && dt.preview++, he = ut, ze = new ei(dt), Je = ze.parse(he,
|
|
24757
|
+
return pe.preview && pe.header && dt.preview++, he = ut, ze = new ei(dt), Je = ze.parse(he, Ct, Vt), xt(), Lt ? { meta: { paused: !0 } } : Je || { meta: { paused: !1 } };
|
|
24758
24758
|
}, this.paused = function() {
|
|
24759
24759
|
return Lt;
|
|
24760
24760
|
}, this.pause = function() {
|
|
@@ -24790,7 +24790,7 @@ function Fy() {
|
|
|
24790
24790
|
var Fe = 0, Lt = !1;
|
|
24791
24791
|
this.parse = function(et, ot, Je) {
|
|
24792
24792
|
if (typeof et != "string") throw new Error("Input must be a string");
|
|
24793
|
-
var zt = et.length, xt = he.length, $t = ze.length, mi = qe.length, ut = st(Ue),
|
|
24793
|
+
var zt = et.length, xt = he.length, $t = ze.length, mi = qe.length, ut = st(Ue), Ct = [], Vt = [], dt = [], Bt = Fe = 0;
|
|
24794
24794
|
if (!et) return Ai();
|
|
24795
24795
|
if (Ut || Ut !== !1 && et.indexOf(nt) === -1) {
|
|
24796
24796
|
for (var ni = et.split(ze), vt = 0; vt < ni.length; vt++) {
|
|
@@ -24798,15 +24798,15 @@ function Fy() {
|
|
|
24798
24798
|
else if (Je) return Ai();
|
|
24799
24799
|
if (!qe || dt.substring(0, mi) !== qe) {
|
|
24800
24800
|
if (ut) {
|
|
24801
|
-
if (
|
|
24801
|
+
if (Ct = [], mr(dt.split(he)), vi(), Lt) return Ai();
|
|
24802
24802
|
} else mr(dt.split(he));
|
|
24803
|
-
if (ct && ct <= vt) return
|
|
24803
|
+
if (ct && ct <= vt) return Ct = Ct.slice(0, ct), Ai(!0);
|
|
24804
24804
|
}
|
|
24805
24805
|
}
|
|
24806
24806
|
return Ai();
|
|
24807
24807
|
}
|
|
24808
24808
|
for (var Ft = et.indexOf(he, Fe), bt = et.indexOf(ze, Fe), Gt = new RegExp(ge(ft) + ge(nt), "g"), mt = et.indexOf(nt, Fe); ; ) if (et[Fe] === nt) for (mt = Fe, Fe++; ; ) {
|
|
24809
|
-
if ((mt = et.indexOf(nt, mt + 1)) === -1) return Je || Vt.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row:
|
|
24809
|
+
if ((mt = et.indexOf(nt, mt + 1)) === -1) return Je || Vt.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: Ct.length, index: Fe }), Oi();
|
|
24810
24810
|
if (mt === zt - 1) return Oi(et.substring(Fe, mt).replace(Gt, nt));
|
|
24811
24811
|
if (nt === ft && et[mt + 1] === ft) mt++;
|
|
24812
24812
|
else if (nt === ft || mt === 0 || et[mt - 1] !== ft) {
|
|
@@ -24818,10 +24818,10 @@ function Fy() {
|
|
|
24818
24818
|
}
|
|
24819
24819
|
if (Yt = gr(bt), et.substring(mt + 1 + Yt, mt + 1 + Yt + $t) === ze) {
|
|
24820
24820
|
if (dt.push(et.substring(Fe, mt).replace(Gt, nt)), Lr(mt + 1 + Yt + $t), Ft = et.indexOf(he, Fe), mt = et.indexOf(nt, Fe), ut && (vi(), Lt)) return Ai();
|
|
24821
|
-
if (ct &&
|
|
24821
|
+
if (ct && Ct.length >= ct) return Ai(!0);
|
|
24822
24822
|
break;
|
|
24823
24823
|
}
|
|
24824
|
-
Vt.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row:
|
|
24824
|
+
Vt.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: Ct.length, index: Fe }), mt++;
|
|
24825
24825
|
}
|
|
24826
24826
|
}
|
|
24827
24827
|
else if (qe && dt.length === 0 && et.substring(Fe, Fe + mi) === qe) {
|
|
@@ -24831,11 +24831,11 @@ function Fy() {
|
|
|
24831
24831
|
else {
|
|
24832
24832
|
if (bt === -1) break;
|
|
24833
24833
|
if (dt.push(et.substring(Fe, bt)), Lr(bt + $t), ut && (vi(), Lt)) return Ai();
|
|
24834
|
-
if (ct &&
|
|
24834
|
+
if (ct && Ct.length >= ct) return Ai(!0);
|
|
24835
24835
|
}
|
|
24836
24836
|
return Oi();
|
|
24837
24837
|
function mr(ce) {
|
|
24838
|
-
|
|
24838
|
+
Ct.push(ce), Bt = Fe;
|
|
24839
24839
|
}
|
|
24840
24840
|
function gr(ce) {
|
|
24841
24841
|
var B = 0;
|
|
@@ -24848,8 +24848,8 @@ function Fy() {
|
|
|
24848
24848
|
Fe = ce, mr(dt), dt = [], bt = et.indexOf(ze, Fe);
|
|
24849
24849
|
}
|
|
24850
24850
|
function Ai(ce) {
|
|
24851
|
-
if (pe.header && !ot &&
|
|
24852
|
-
var B =
|
|
24851
|
+
if (pe.header && !ot && Ct.length && !Zt) {
|
|
24852
|
+
var B = Ct[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++) {
|
|
24855
24855
|
let fe = B[ne];
|
|
@@ -24862,10 +24862,10 @@ function Fy() {
|
|
|
24862
24862
|
}
|
|
24863
24863
|
re && console.warn("Duplicate headers found and renamed."), Zt = !0;
|
|
24864
24864
|
}
|
|
24865
|
-
return { data:
|
|
24865
|
+
return { data: Ct, errors: Vt, meta: { delimiter: he, linebreak: ze, aborted: Lt, truncated: !!ce, cursor: Bt + (ot || 0), renamedHeaders: qt } };
|
|
24866
24866
|
}
|
|
24867
24867
|
function vi() {
|
|
24868
|
-
Ue(Ai()),
|
|
24868
|
+
Ue(Ai()), Ct = [], Vt = [];
|
|
24869
24869
|
}
|
|
24870
24870
|
}, this.abort = function() {
|
|
24871
24871
|
Lt = !0;
|
|
@@ -24910,7 +24910,7 @@ function Fy() {
|
|
|
24910
24910
|
}
|
|
24911
24911
|
return Pe.parse = function(pe, he) {
|
|
24912
24912
|
var ze = (he = he || {}).dynamicTyping || !1;
|
|
24913
|
-
if (st(ze) && (he.dynamicTypingFunction = ze, ze = {}), he.dynamicTyping = ze, he.transform = !!st(he.transform) && he.transform, !he.worker || !Pe.WORKERS_SUPPORTED) return ze = null, Pe.NODE_STREAM_INPUT, typeof pe == "string" ? (pe = ((qe) => qe.charCodeAt(0) !== 65279 ? qe : qe.slice(1))(pe), ze = new (he.download ? Ne : at)(he)) : pe.readable === !0 && st(pe.read) && st(pe.on) ? ze = new
|
|
24913
|
+
if (st(ze) && (he.dynamicTypingFunction = ze, ze = {}), he.dynamicTyping = ze, he.transform = !!st(he.transform) && he.transform, !he.worker || !Pe.WORKERS_SUPPORTED) return ze = null, Pe.NODE_STREAM_INPUT, typeof pe == "string" ? (pe = ((qe) => qe.charCodeAt(0) !== 65279 ? qe : qe.slice(1))(pe), ze = new (he.download ? Ne : at)(he)) : pe.readable === !0 && st(pe.read) && st(pe.on) ? ze = new Et(he) : ($.File && pe instanceof File || pe instanceof Object) && (ze = new Ye(he)), ze.stream(pe);
|
|
24914
24914
|
(ze = (() => {
|
|
24915
24915
|
var qe;
|
|
24916
24916
|
return !!Pe.WORKERS_SUPPORTED && (qe = (() => {
|
|
@@ -24942,12 +24942,12 @@ function Fy() {
|
|
|
24942
24942
|
for (var ut = 0; ut < ot.length; ut++) 0 < ut && (xt += Ue), xt += et(ot[ut], ut);
|
|
24943
24943
|
0 < Je.length && (xt += ct);
|
|
24944
24944
|
}
|
|
24945
|
-
for (var
|
|
24946
|
-
var Vt = ($t ? ot : Je[
|
|
24947
|
-
if (zt && !$t && (dt = zt === "greedy" ? Je[
|
|
24945
|
+
for (var Ct = 0; Ct < Je.length; Ct++) {
|
|
24946
|
+
var Vt = ($t ? ot : Je[Ct]).length, dt = !1, Bt = $t ? Object.keys(Je[Ct]).length === 0 : Je[Ct].length === 0;
|
|
24947
|
+
if (zt && !$t && (dt = zt === "greedy" ? Je[Ct].join("").trim() === "" : Je[Ct].length === 1 && Je[Ct][0].length === 0), zt === "greedy" && $t) {
|
|
24948
24948
|
for (var ni = [], vt = 0; vt < Vt; vt++) {
|
|
24949
24949
|
var Ft = mi ? ot[vt] : vt;
|
|
24950
|
-
ni.push(Je[
|
|
24950
|
+
ni.push(Je[Ct][Ft]);
|
|
24951
24951
|
}
|
|
24952
24952
|
dt = ni.join("").trim() === "";
|
|
24953
24953
|
}
|
|
@@ -24955,9 +24955,9 @@ function Fy() {
|
|
|
24955
24955
|
for (var bt = 0; bt < Vt; bt++) {
|
|
24956
24956
|
0 < bt && !Bt && (xt += Ue);
|
|
24957
24957
|
var Gt = $t && mi ? ot[bt] : bt;
|
|
24958
|
-
xt += et(Je[
|
|
24958
|
+
xt += et(Je[Ct][Gt], bt);
|
|
24959
24959
|
}
|
|
24960
|
-
|
|
24960
|
+
Ct < Je.length - 1 && (!zt || 0 < Vt && !Bt) && (xt += ct);
|
|
24961
24961
|
}
|
|
24962
24962
|
}
|
|
24963
24963
|
return xt;
|
|
@@ -24970,7 +24970,7 @@ function Fy() {
|
|
|
24970
24970
|
})(zt, Pe.BAD_DELIMITERS) || -1 < zt.indexOf(Ue) || zt.charAt(0) === " " || zt.charAt(zt.length - 1) === " ") ? Ut + zt + Ut : zt);
|
|
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 = ei, Pe.ParserHandle = Qe, Pe.NetworkStreamer = Ne, Pe.FileStreamer = Ye, Pe.StringStreamer = at, Pe.ReadableStreamStreamer =
|
|
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 = ei, Pe.ParserHandle = Qe, Pe.NetworkStreamer = Ne, Pe.FileStreamer = Ye, Pe.StringStreamer = at, Pe.ReadableStreamStreamer = Et, $.jQuery && ((Q = $.jQuery).fn.parse = function(pe) {
|
|
24974
24974
|
var he = pe.config || {}, ze = [];
|
|
24975
24975
|
return this.each(function(ct) {
|
|
24976
24976
|
if (!(Q(this).prop("tagName").toUpperCase() === "INPUT" && Q(this).attr("type").toLowerCase() === "file" && $.FileReader) || !this.files || this.files.length === 0) return !0;
|
|
@@ -24999,7 +24999,7 @@ function Fy() {
|
|
|
24999
24999
|
}
|
|
25000
25000
|
}), P && ($.onmessage = function(pe) {
|
|
25001
25001
|
pe = pe.data, Pe.WORKER_ID === void 0 && pe && (Pe.WORKER_ID = pe.workerId), typeof pe.input == "string" ? $.postMessage({ workerId: Pe.WORKER_ID, results: Pe.parse(pe.input, pe.config), finished: !0 }) : ($.File && pe.input instanceof File || pe.input instanceof Object) && (pe = Pe.parse(pe.input, pe.config)) && $.postMessage({ workerId: Pe.WORKER_ID, results: pe, finished: !0 });
|
|
25002
|
-
}), (Ne.prototype = Object.create(Oe.prototype)).constructor = Ne, (Ye.prototype = Object.create(Oe.prototype)).constructor = Ye, (at.prototype = Object.create(at.prototype)).constructor = at, (
|
|
25002
|
+
}), (Ne.prototype = Object.create(Oe.prototype)).constructor = Ne, (Ye.prototype = Object.create(Oe.prototype)).constructor = Ye, (at.prototype = Object.create(at.prototype)).constructor = at, (Et.prototype = Object.create(Oe.prototype)).constructor = Et, Pe;
|
|
25003
25003
|
});
|
|
25004
25004
|
})(Zu)), Zu.exports;
|
|
25005
25005
|
}
|
|
@@ -25071,8 +25071,8 @@ function Yf(F, C) {
|
|
|
25071
25071
|
for (let le = 2; le <= $; le++) {
|
|
25072
25072
|
let Pe = 0, Oe = 0, Ne = 0;
|
|
25073
25073
|
for (let Ye = 1; Ye <= le; Ye++) {
|
|
25074
|
-
const at = le - Ye + 1,
|
|
25075
|
-
Oe +=
|
|
25074
|
+
const at = le - Ye + 1, Et = D[at - 1];
|
|
25075
|
+
Oe += Et * Et, Pe += Et, Ne++;
|
|
25076
25076
|
const Qe = Oe - Pe * Pe / Ne, ge = at - 1;
|
|
25077
25077
|
if (ge !== 0)
|
|
25078
25078
|
for (let ei = 2; ei <= C; ei++)
|
|
@@ -25430,8 +25430,8 @@ class Sm {
|
|
|
25430
25430
|
let Oe;
|
|
25431
25431
|
if (this.type === 1) {
|
|
25432
25432
|
const Ye = [];
|
|
25433
|
-
for (const
|
|
25434
|
-
Ye.push(
|
|
25433
|
+
for (const Et of c)
|
|
25434
|
+
Ye.push(Et[0]);
|
|
25435
25435
|
const at = Pe(Ye);
|
|
25436
25436
|
Oe = Ye.length === 1 ? { type: "Point", coordinates: at[0] } : { type: "MultiPoint", coordinates: at };
|
|
25437
25437
|
} else if (this.type === 2) {
|
|
@@ -25439,8 +25439,8 @@ class Sm {
|
|
|
25439
25439
|
Oe = Ye.length === 1 ? { type: "LineString", coordinates: Ye[0] } : { type: "MultiLineString", coordinates: Ye };
|
|
25440
25440
|
} else if (this.type === 3) {
|
|
25441
25441
|
const Ye = Vy(c), at = [];
|
|
25442
|
-
for (const
|
|
25443
|
-
at.push(
|
|
25442
|
+
for (const Et of Ye)
|
|
25443
|
+
at.push(Et.map(Pe));
|
|
25444
25444
|
Oe = at.length === 1 ? { type: "Polygon", coordinates: at[0] } : { type: "MultiPolygon", coordinates: at };
|
|
25445
25445
|
} else
|
|
25446
25446
|
throw new Error("unknown feature type");
|
|
@@ -26009,8 +26009,8 @@ async function cx(F, C, D, $ = "bbox", Q) {
|
|
|
26009
26009
|
if (!Ne || !Ne.data) continue;
|
|
26010
26010
|
const at = new qy(new Wy(Ne.data)).layers[C];
|
|
26011
26011
|
if (!at) continue;
|
|
26012
|
-
for (let
|
|
26013
|
-
const Qe = at.feature(
|
|
26012
|
+
for (let Et = 0; Et < at.length; Et++) {
|
|
26013
|
+
const Qe = at.feature(Et), ge = Qe.properties, ei = String(Q ? ge[Q] : Qe.id);
|
|
26014
26014
|
if (ei === String(D)) {
|
|
26015
26015
|
let Dt = null;
|
|
26016
26016
|
if (ge[$]) {
|
|
@@ -26071,7 +26071,7 @@ const Uu = "pmtiles-source", tm = "pmtiles-fill", oc = "municipios-source", vd =
|
|
|
26071
26071
|
fitToIds: Ne,
|
|
26072
26072
|
bboxField: Ye = "bbox",
|
|
26073
26073
|
jenksK: at = 5,
|
|
26074
|
-
showMunicipios:
|
|
26074
|
+
showMunicipios: Et = !1,
|
|
26075
26075
|
municipiosCsvUrl: Qe,
|
|
26076
26076
|
municipiosCsvFile: ge,
|
|
26077
26077
|
municipiosField: ei = "valor"
|
|
@@ -26154,7 +26154,7 @@ const Uu = "pmtiles-source", tm = "pmtiles-fill", oc = "municipios-source", vd =
|
|
|
26154
26154
|
}
|
|
26155
26155
|
const qt = Ne ? Array.isArray(Ne) ? Ne : [Ne] : [];
|
|
26156
26156
|
let Zt;
|
|
26157
|
-
if (qt.length > 0 && (Zt = ["in", ["get", D], ["literal", qt]]), st.addLayer({
|
|
26157
|
+
if (qt.length > 0 && (Zt = ["in", ["get", D], ["literal", qt]]), Et || st.addLayer({
|
|
26158
26158
|
id: tm,
|
|
26159
26159
|
type: "fill",
|
|
26160
26160
|
source: Uu,
|
|
@@ -26171,10 +26171,10 @@ const Uu = "pmtiles-source", tm = "pmtiles-fill", oc = "municipios-source", vd =
|
|
|
26171
26171
|
"source-layer": C,
|
|
26172
26172
|
paint: {
|
|
26173
26173
|
"line-color": "#2c3e50",
|
|
26174
|
-
"line-width":
|
|
26174
|
+
"line-width": Et ? 1.5 : 0.5
|
|
26175
26175
|
},
|
|
26176
26176
|
filter: Zt
|
|
26177
|
-
}),
|
|
26177
|
+
}), Et && qt.length > 0) {
|
|
26178
26178
|
st.addSource(oc, {
|
|
26179
26179
|
type: "vector",
|
|
26180
26180
|
url: `pmtiles://${px}`,
|
|
@@ -26182,7 +26182,7 @@ const Uu = "pmtiles-source", tm = "pmtiles-fill", oc = "municipios-source", vd =
|
|
|
26182
26182
|
});
|
|
26183
26183
|
const nt = [
|
|
26184
26184
|
"in",
|
|
26185
|
-
["
|
|
26185
|
+
["get", "CVE_ENT"],
|
|
26186
26186
|
["literal", qt]
|
|
26187
26187
|
];
|
|
26188
26188
|
if (Qe || ge) {
|
|
@@ -26288,7 +26288,7 @@ const Uu = "pmtiles-source", tm = "pmtiles-fill", oc = "municipios-source", vd =
|
|
|
26288
26288
|
})(), () => {
|
|
26289
26289
|
ht.current && (ht.current.remove(), ht.current = null), $f.removeProtocol("pmtiles");
|
|
26290
26290
|
};
|
|
26291
|
-
}, [F, C, D, $, Q, ue, P, c, at, Ne, Ye, Oe,
|
|
26291
|
+
}, [F, C, D, $, Q, ue, P, c, at, Ne, Ye, Oe, Et, Qe, ge, ei]);
|
|
26292
26292
|
const Mi = {
|
|
26293
26293
|
width: typeof le == "number" ? `${le}px` : le,
|
|
26294
26294
|
height: typeof Pe == "number" ? `${Pe}px` : Pe,
|