@nika-js/onlymap 0.13.3 → 0.13.5
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/CHANGELOG.md +32 -0
- package/README.md +9 -5
- package/dist/actions.d.ts +12 -6
- package/dist/attribute-resolution.d.ts +32 -4
- package/dist/{basemap-5NHR6Gio.js → basemap-CErNEhX6.js} +3 -7
- package/dist/basemap.d.ts +1 -5
- package/dist/bbox-tokens.d.ts +70 -0
- package/dist/{build-DJjheWZ2.js → build-ByNIb4VX.js} +1 -1
- package/dist/{client-0mQmDog8.js → client-xe2E4jg4.js} +2 -2
- package/dist/clip-box-controller.d.ts +0 -17
- package/dist/ctx.d.ts +17 -0
- package/dist/data-layer.d.ts +15 -8
- package/dist/dom-tile-layer.d.ts +30 -0
- package/dist/draw-controller.d.ts +1 -1
- package/dist/elements/om-map.d.ts +12 -1
- package/dist/feature-service.d.ts +42 -0
- package/dist/geodesy.d.ts +6 -5
- package/dist/{geoparquet-B_nO2OyP.js → geoparquet-DOhMQl-X.js} +1 -1
- package/dist/{globe-view-BFUa9ksE.js → globe-view-84s_uNZX.js} +1 -1
- package/dist/grid-tiles.d.ts +117 -0
- package/dist/{hillshade-B_CxPhtA.js → hillshade-D8h8CRQq.js} +2 -2
- package/dist/{hillshade-shader-r7GxxjXj.js → hillshade-shader-Bm1O0P76.js} +1 -1
- package/dist/{index-YMu_yLXO.js → index-4Y4Q7RP4.js} +3 -3
- package/dist/{index-DWijIMti.js → index-BG_49YHy.js} +33543 -32098
- package/dist/index-BahtHUrg.js +8458 -0
- package/dist/{index-ChmxbIdj.js → index-DTN2CcOQ.js} +43 -43
- package/dist/{index-BvNxS6dM.js → index-DXxQu9Xi.js} +1 -1
- package/dist/{index-A1FYw2dy.js → index-D_EiGesl.js} +1 -1
- package/dist/{index-CObPGkze.js → index-DrSCLk9i.js} +22 -22
- package/dist/{index-CU7RnKnO.js → index-J_Sj6T0S.js} +32 -32
- package/dist/index-bpdGuZR6.js +478 -0
- package/dist/{index-CgIuV5Oh.js → index-phbljJTZ.js} +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/ir-snapshot.d.ts +2 -0
- package/dist/ir.d.ts +18 -0
- package/dist/layer-registry.d.ts +1 -0
- package/dist/layers/warped-bitmap-layer.d.ts +14 -1
- package/dist/{lerc-Bl4vym9y.js → lerc-DLWS3sYw.js} +1 -1
- package/dist/onlymap.standalone.js +69300 -58870
- package/dist/onlymapjs.js +25 -25
- package/dist/parse-manifest.d.ts +4 -1
- package/dist/plane-gpu/plane-basemap.d.ts +237 -237
- package/dist/plane-vector/plane-mvt-layer.d.ts +237 -237
- package/dist/plane-warp.d.ts +14 -1
- package/dist/pmtiles.d.ts +76 -0
- package/dist/{post-process-effect-gFGVlC77.js → post-process-effect-CHsD0-oP.js} +1 -1
- package/dist/programmatic.d.ts +21 -1
- package/dist/{raster-1ShXyF12.js → raster-B7ILGg0X.js} +4 -4
- package/dist/{raster-pipeline-BMS54TX2.js → raster-pipeline-avMAbONM.js} +11 -11
- package/dist/react/om-layer.d.ts +4 -0
- package/dist/react.js +67 -65
- package/dist/runtime-core.d.ts +106 -4
- package/dist/serialize/emit.d.ts +2 -0
- package/dist/serialize/index.d.ts +2 -0
- package/dist/{terrain-inspect-Cndlmxig.js → terrain-inspect-FKTVm7nv.js} +1 -1
- package/dist/{text-on-path-QInco4aP.js → text-on-path-CpHM02Fs.js} +19 -18
- package/dist/tile-url.d.ts +84 -16
- package/dist/time-dimension.d.ts +25 -0
- package/dist/vector-style-CPvUSy2F.js +518 -0
- package/dist/vector-style.d.ts +59 -0
- package/dist/version.d.ts +1 -1
- package/dist/{zarr-CYD8fyBe.js → zarr-DpbT4eyF.js} +2 -2
- package/dist/zoom-gates.d.ts +60 -0
- package/docs/cartograph.md +2 -2
- package/llms.txt +4 -3
- package/onlymapjs.attributes.json +17 -0
- package/onlymapjs.html-data.json +56 -0
- package/package.json +5 -2
- package/skills/onlymapjs/SKILL.md +10 -3
- package/skills/onlymapjs/references/syntax.md +64 -7
- package/dist/index-DT5d7kFO.js +0 -459
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bX as Be, bY as le, bZ as ce, b_ as De, b$ as Oe, c0 as ke } from "./index-BG_49YHy.js";
|
|
2
2
|
import { y as ve, a as he, z as G, R as J, A as ue, C as Fe, F as je, n as xe, S as Ie, E as Ne } from "./recordbatch-Bpc0uxFn.js";
|
|
3
3
|
import { g as V, a as fe, b as Le, c as Ue, d as Me, e as qe, m as Ve } from "./table-accessors-CYWTzpQI.js";
|
|
4
4
|
import { c as $e } from "./convert-arrow-schema-DrAihRf9.js";
|
|
@@ -6,17 +6,17 @@ function de(t) {
|
|
|
6
6
|
switch (t.shape) {
|
|
7
7
|
case "array-row-table":
|
|
8
8
|
case "object-row-table":
|
|
9
|
-
return
|
|
9
|
+
return Pe(t.data);
|
|
10
10
|
case "geojson-table":
|
|
11
11
|
return ze(t.features);
|
|
12
12
|
case "columnar-table":
|
|
13
|
-
return
|
|
13
|
+
return He(t.data);
|
|
14
14
|
case "arrow-table":
|
|
15
15
|
default:
|
|
16
16
|
throw new Error("Deduce schema");
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function He(t) {
|
|
20
20
|
const e = [];
|
|
21
21
|
for (const [r, s] of Object.entries(t)) {
|
|
22
22
|
const n = Qe(s, r);
|
|
@@ -24,7 +24,7 @@ function Pe(t) {
|
|
|
24
24
|
}
|
|
25
25
|
return { fields: e, metadata: {} };
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function Pe(t) {
|
|
28
28
|
if (!t.length)
|
|
29
29
|
throw new Error("deduce from empty table");
|
|
30
30
|
const e = [], r = t[0];
|
|
@@ -109,16 +109,16 @@ function L(t, e) {
|
|
|
109
109
|
case "object-row-table":
|
|
110
110
|
return Ge(t);
|
|
111
111
|
case "array-row-table":
|
|
112
|
-
return Ye(t);
|
|
113
|
-
case "columnar-table":
|
|
114
112
|
return Ke(t);
|
|
113
|
+
case "columnar-table":
|
|
114
|
+
return Ye(t);
|
|
115
115
|
case "arrow-table":
|
|
116
116
|
return Xe(t);
|
|
117
117
|
default:
|
|
118
118
|
throw new Error(e);
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function Ye(t) {
|
|
122
122
|
const e = t.schema || de(t), r = t.schema?.fields || [];
|
|
123
123
|
if (t.shape === "columnar-table")
|
|
124
124
|
return { ...t, schema: e };
|
|
@@ -135,7 +135,7 @@ function Ke(t) {
|
|
|
135
135
|
data: n
|
|
136
136
|
};
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function Ke(t) {
|
|
139
139
|
if (t.shape === "array-row-table")
|
|
140
140
|
return t;
|
|
141
141
|
const e = V(t), r = new Array(e);
|
|
@@ -371,7 +371,7 @@ class we {
|
|
|
371
371
|
this.columns[e.name] = new r(this.allocated);
|
|
372
372
|
else if (Array.isArray(s))
|
|
373
373
|
s.length = this.allocated;
|
|
374
|
-
else if (
|
|
374
|
+
else if (De(s)) {
|
|
375
375
|
const n = new r(this.allocated);
|
|
376
376
|
n.set(s), this.columns[e.name] = n;
|
|
377
377
|
} else
|
|
@@ -859,19 +859,19 @@ function W(t = {}) {
|
|
|
859
859
|
return S();
|
|
860
860
|
if (c || c !== !1 && i.indexOf(h) === -1) {
|
|
861
861
|
const R = i.split(r);
|
|
862
|
-
for (let
|
|
863
|
-
const
|
|
864
|
-
if (o +=
|
|
862
|
+
for (let D = 0; D < R.length; D++) {
|
|
863
|
+
const O = R[D];
|
|
864
|
+
if (o += O.length, D !== R.length - 1)
|
|
865
865
|
o += r.length;
|
|
866
866
|
else if (g)
|
|
867
867
|
return S();
|
|
868
|
-
if (!(s &&
|
|
868
|
+
if (!(s && O.substr(0, C) === s)) {
|
|
869
869
|
if (T) {
|
|
870
|
-
if (y = [], x(
|
|
870
|
+
if (y = [], x(O.split(e)), I(), u)
|
|
871
871
|
return S();
|
|
872
872
|
} else
|
|
873
|
-
x(
|
|
874
|
-
if (a &&
|
|
873
|
+
x(O.split(e));
|
|
874
|
+
if (a && D >= a)
|
|
875
875
|
return y = y.slice(0, a), S(!0);
|
|
876
876
|
}
|
|
877
877
|
}
|
|
@@ -891,10 +891,10 @@ function W(t = {}) {
|
|
|
891
891
|
row: y.length,
|
|
892
892
|
// row has yet to be inserted
|
|
893
893
|
index: o
|
|
894
|
-
}),
|
|
894
|
+
}), H();
|
|
895
895
|
if (b === w - 1) {
|
|
896
896
|
const Ee = i.substring(o, b).replace(B, h);
|
|
897
|
-
return
|
|
897
|
+
return H(Ee);
|
|
898
898
|
}
|
|
899
899
|
if (h === f && i[b + 1] === f) {
|
|
900
900
|
b++;
|
|
@@ -902,17 +902,17 @@ function W(t = {}) {
|
|
|
902
902
|
}
|
|
903
903
|
if (h !== f && b !== 0 && i[b - 1] === f)
|
|
904
904
|
continue;
|
|
905
|
-
const R = _ === -1 ? A : Math.min(A, _),
|
|
906
|
-
if (i[b + 1 +
|
|
907
|
-
if (p.push(i.substring(o, b).replace(B, h)), o = b + 1 +
|
|
905
|
+
const R = _ === -1 ? A : Math.min(A, _), D = Y(R);
|
|
906
|
+
if (i[b + 1 + D] === e) {
|
|
907
|
+
if (p.push(i.substring(o, b).replace(B, h)), o = b + 1 + D + l, A = i.indexOf(e, o), _ = i.indexOf(r, o), T && (I(), u))
|
|
908
908
|
return S();
|
|
909
909
|
if (a && y.length >= a)
|
|
910
910
|
return S(!0);
|
|
911
911
|
break;
|
|
912
912
|
}
|
|
913
|
-
const
|
|
914
|
-
if (i.substr(b + 1 +
|
|
915
|
-
if (p.push(i.substring(o, b).replace(B, h)),
|
|
913
|
+
const O = Y(_);
|
|
914
|
+
if (i.substr(b + 1 + O, m) === r) {
|
|
915
|
+
if (p.push(i.substring(o, b).replace(B, h)), K(b + 1 + O + m), A = i.indexOf(e, o), T && (I(), u))
|
|
916
916
|
return S();
|
|
917
917
|
if (a && y.length >= a)
|
|
918
918
|
return S(!0);
|
|
@@ -944,7 +944,7 @@ function W(t = {}) {
|
|
|
944
944
|
continue;
|
|
945
945
|
}
|
|
946
946
|
if (_ !== -1) {
|
|
947
|
-
if (p.push(i.substring(o, _)),
|
|
947
|
+
if (p.push(i.substring(o, _)), K(_ + m), T && (I(), u))
|
|
948
948
|
return S();
|
|
949
949
|
if (a && y.length >= a)
|
|
950
950
|
return S(!0);
|
|
@@ -952,27 +952,27 @@ function W(t = {}) {
|
|
|
952
952
|
}
|
|
953
953
|
break;
|
|
954
954
|
}
|
|
955
|
-
return
|
|
955
|
+
return H();
|
|
956
956
|
function x(R) {
|
|
957
957
|
y.push(R), k = o;
|
|
958
958
|
}
|
|
959
|
-
function
|
|
960
|
-
let
|
|
959
|
+
function Y(R) {
|
|
960
|
+
let D = 0;
|
|
961
961
|
if (R !== -1) {
|
|
962
|
-
const
|
|
963
|
-
|
|
962
|
+
const O = i.substring(b + 1, R);
|
|
963
|
+
O && O.trim() === "" && (D = O.length);
|
|
964
964
|
}
|
|
965
|
-
return
|
|
965
|
+
return D;
|
|
966
966
|
}
|
|
967
|
-
function
|
|
967
|
+
function H(R) {
|
|
968
968
|
return g || (typeof R > "u" && (R = i.substr(o)), p.push(R), o = w, x(p), T && I()), S();
|
|
969
969
|
}
|
|
970
|
-
function
|
|
970
|
+
function K(R) {
|
|
971
971
|
o = R, x(p), p = [], _ = i.indexOf(r, o);
|
|
972
972
|
}
|
|
973
|
-
function S(R,
|
|
973
|
+
function S(R, D) {
|
|
974
974
|
return {
|
|
975
|
-
data:
|
|
975
|
+
data: D || !1 ? y[0] : y,
|
|
976
976
|
errors: v,
|
|
977
977
|
meta: {
|
|
978
978
|
delimiter: e,
|
|
@@ -1242,7 +1242,7 @@ function At(t, e) {
|
|
|
1242
1242
|
s.close();
|
|
1243
1243
|
}
|
|
1244
1244
|
};
|
|
1245
|
-
return $.parse(
|
|
1245
|
+
return $.parse(Oe(t), f, _t), s;
|
|
1246
1246
|
}
|
|
1247
1247
|
function Ae(t) {
|
|
1248
1248
|
return t && t.every((e) => typeof e == "string");
|
|
@@ -1294,7 +1294,7 @@ function Rt(t, e) {
|
|
|
1294
1294
|
}
|
|
1295
1295
|
};
|
|
1296
1296
|
}
|
|
1297
|
-
var ne = {},
|
|
1297
|
+
var ne = {}, P = {}, z = 34, N = 10, Q = 13;
|
|
1298
1298
|
function Se(t) {
|
|
1299
1299
|
return new Function("d", "return {" + t.map(function(e, r) {
|
|
1300
1300
|
return JSON.stringify(e) + ": d[" + r + '] || ""';
|
|
@@ -1324,7 +1324,7 @@ function Bt(t) {
|
|
|
1324
1324
|
var e = t.getUTCHours(), r = t.getUTCMinutes(), s = t.getUTCSeconds(), n = t.getUTCMilliseconds();
|
|
1325
1325
|
return isNaN(t) ? "Invalid Date" : Et(t.getUTCFullYear()) + "-" + E(t.getUTCMonth() + 1, 2) + "-" + E(t.getUTCDate(), 2) + (n ? "T" + E(e, 2) + ":" + E(r, 2) + ":" + E(s, 2) + "." + E(n, 3) + "Z" : s ? "T" + E(e, 2) + ":" + E(r, 2) + ":" + E(s, 2) + "Z" : r || e ? "T" + E(e, 2) + ":" + E(r, 2) + "Z" : "");
|
|
1326
1326
|
}
|
|
1327
|
-
function
|
|
1327
|
+
function Dt(t) {
|
|
1328
1328
|
var e = new RegExp('["' + t + `
|
|
1329
1329
|
\r]`), r = t.charCodeAt(0);
|
|
1330
1330
|
function s(i, d) {
|
|
@@ -1338,7 +1338,7 @@ function Ot(t) {
|
|
|
1338
1338
|
var g = [], w = i.length, l = 0, m = 0, C, T = w <= 0, y = !1;
|
|
1339
1339
|
i.charCodeAt(w - 1) === N && --w, i.charCodeAt(w - 1) === Q && --w;
|
|
1340
1340
|
function v() {
|
|
1341
|
-
if (T) return
|
|
1341
|
+
if (T) return P;
|
|
1342
1342
|
if (y) return y = !1, ne;
|
|
1343
1343
|
var k, A = l, _;
|
|
1344
1344
|
if (i.charCodeAt(A) === z) {
|
|
@@ -1354,8 +1354,8 @@ function Ot(t) {
|
|
|
1354
1354
|
}
|
|
1355
1355
|
return T = !0, i.slice(A, w);
|
|
1356
1356
|
}
|
|
1357
|
-
for (; (C = v()) !==
|
|
1358
|
-
for (var p = []; C !== ne && C !==
|
|
1357
|
+
for (; (C = v()) !== P; ) {
|
|
1358
|
+
for (var p = []; C !== ne && C !== P; ) p.push(C), C = v();
|
|
1359
1359
|
d && (p = d(p, m++)) == null || g.push(p);
|
|
1360
1360
|
}
|
|
1361
1361
|
return g;
|
|
@@ -1395,7 +1395,7 @@ function Ot(t) {
|
|
|
1395
1395
|
formatValue: u
|
|
1396
1396
|
};
|
|
1397
1397
|
}
|
|
1398
|
-
var
|
|
1398
|
+
var Ot = Dt(","), kt = Ot.formatRows;
|
|
1399
1399
|
function ae(t, e = { csv: { useDisplayNames: !0 } }) {
|
|
1400
1400
|
const r = e.useDisplayNames || e.csv?.useDisplayNames, a = [(t.schema?.fields || []).map((h) => {
|
|
1401
1401
|
const f = h.metadata?.displayName;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b$ as Bt, cb as Xt, cc as Yt, cd as Us } from "./index-BG_49YHy.js";
|
|
2
2
|
import { w as gs, t as Hs, f as Ws, m as Qs } from "./mgrs-BY9bIvp4.js";
|
|
3
3
|
import { c as Xs } from "./convert-arrow-schema-DrAihRf9.js";
|
|
4
4
|
import { y as Ys, A as bt, a as Ks, z as Vs, R as Zs } from "./recordbatch-Bpc0uxFn.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a_ as tt, a$ as et, b0 as q, ak as nt, aa as ot, b1 as L, b2 as rt, b3 as D, af as st, ag as U, b4 as B, b5 as it } from "./index-BG_49YHy.js";
|
|
2
2
|
const J = Math.PI / 180, T = tt * J;
|
|
3
3
|
function Q(t, r) {
|
|
4
4
|
const n = Math.max(Math.cos(r * J), 1e-6);
|
|
@@ -14,10 +14,10 @@ function Q(t, r) {
|
|
|
14
14
|
function O(t) {
|
|
15
15
|
return Array.isArray(t) && typeof t[0] == "number" && typeof t[1] == "number";
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function X(t) {
|
|
18
18
|
return Array.isArray(t) && O(t[0]);
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function K(t) {
|
|
21
21
|
let r = 1 / 0, n = 1 / 0, o = -1 / 0, a = -1 / 0, s = !1;
|
|
22
22
|
const e = (f) => {
|
|
23
23
|
if (Array.isArray(f)) {
|
|
@@ -31,9 +31,9 @@ function V(t) {
|
|
|
31
31
|
return e(t), s ? [(r + o) / 2, (n + a) / 2] : null;
|
|
32
32
|
}
|
|
33
33
|
function z(t, r) {
|
|
34
|
-
return !Array.isArray(t) || O(t) ? t :
|
|
34
|
+
return !Array.isArray(t) || O(t) ? t : X(t) ? r(t) : t.map((n) => z(n, r));
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function V(t) {
|
|
37
37
|
if (t.length < 3) return !1;
|
|
38
38
|
const r = t[0], n = t[t.length - 1];
|
|
39
39
|
return r[0] === n[0] && r[1] === n[1];
|
|
@@ -67,16 +67,16 @@ function ct(t, r, n, o) {
|
|
|
67
67
|
}
|
|
68
68
|
const u = [];
|
|
69
69
|
for (let l = 0; l < t.length; l++) f[l] && u.push(t[l]);
|
|
70
|
-
return
|
|
70
|
+
return V(t) && u.length < 4 ? t : u;
|
|
71
71
|
}
|
|
72
72
|
function ut(t, r) {
|
|
73
|
-
const n =
|
|
73
|
+
const n = K(t);
|
|
74
74
|
return n ? z(t, (o) => ct(o, r, n[0], n[1])) : t;
|
|
75
75
|
}
|
|
76
76
|
const Y = 0.25;
|
|
77
77
|
function ft(t, r) {
|
|
78
78
|
let n = t;
|
|
79
|
-
const o =
|
|
79
|
+
const o = V(t);
|
|
80
80
|
for (let a = 0; a < r; a++) {
|
|
81
81
|
const s = o ? n.slice(0, -1) : n;
|
|
82
82
|
if (s.length < 3) return n;
|
|
@@ -107,8 +107,8 @@ function ht(t) {
|
|
|
107
107
|
}
|
|
108
108
|
function mt(t) {
|
|
109
109
|
const r = [], n = (o) => {
|
|
110
|
-
if (Array.isArray(o) &&
|
|
111
|
-
if (
|
|
110
|
+
if (Array.isArray(o) && !X(o)) {
|
|
111
|
+
if (X(o[0])) {
|
|
112
112
|
r.push(o);
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
@@ -159,7 +159,7 @@ function yt(t, r) {
|
|
|
159
159
|
for (let o = 0; o < t.length; o++) n.push(...pt(t[o], o, r));
|
|
160
160
|
return n;
|
|
161
161
|
}
|
|
162
|
-
const
|
|
162
|
+
const G = 1e20;
|
|
163
163
|
function gt(t, r) {
|
|
164
164
|
const n = new Uint8Array(r.width * r.height);
|
|
165
165
|
if (t.length === 0) return n;
|
|
@@ -193,12 +193,12 @@ function gt(t, r) {
|
|
|
193
193
|
}
|
|
194
194
|
function C(t, r, n, o, a) {
|
|
195
195
|
let s = 0;
|
|
196
|
-
o[0] = 0, a[0] = -
|
|
196
|
+
o[0] = 0, a[0] = -G, a[1] = G;
|
|
197
197
|
for (let e = 1; e < r; e++) {
|
|
198
198
|
let f = (t[e] + e * e - (t[o[s]] + o[s] * o[s])) / (2 * e - 2 * o[s]);
|
|
199
199
|
for (; f <= a[s]; )
|
|
200
200
|
s--, f = (t[e] + e * e - (t[o[s]] + o[s] * o[s])) / (2 * e - 2 * o[s]);
|
|
201
|
-
s++, o[s] = e, a[s] = f, a[s + 1] =
|
|
201
|
+
s++, o[s] = e, a[s] = f, a[s + 1] = G;
|
|
202
202
|
}
|
|
203
203
|
s = 0;
|
|
204
204
|
for (let e = 0; e < r; e++) {
|
|
@@ -209,7 +209,7 @@ function C(t, r, n, o, a) {
|
|
|
209
209
|
}
|
|
210
210
|
function W(t, r, n) {
|
|
211
211
|
const o = new Float64Array(r * n);
|
|
212
|
-
for (let i = 0; i < o.length; i++) o[i] = t[i] ? 0 :
|
|
212
|
+
for (let i = 0; i < o.length; i++) o[i] = t[i] ? 0 : G;
|
|
213
213
|
const a = Math.max(r, n), s = new Float64Array(a), e = new Float64Array(a), f = new Int32Array(a), c = new Float64Array(a + 1);
|
|
214
214
|
for (let i = 0; i < r; i++) {
|
|
215
215
|
for (let u = 0; u < n; u++) s[u] = o[u * r + i];
|
|
@@ -234,7 +234,7 @@ function bt(t, r) {
|
|
|
234
234
|
}
|
|
235
235
|
return c;
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function $(t, r, n) {
|
|
238
238
|
const o = r - t;
|
|
239
239
|
return o === 0 ? 0.5 : (n - t) / o;
|
|
240
240
|
}
|
|
@@ -245,7 +245,7 @@ function Z(t, r, n, o) {
|
|
|
245
245
|
if (!l(d, m)) continue;
|
|
246
246
|
const p = u(d, m), M = u(d + 1, m), F = u(d + 1, m + 1), w = u(d, m + 1), N = (p < n ? 8 : 0) | (M < n ? 4 : 0) | (F < n ? 2 : 0) | (w < n ? 1 : 0);
|
|
247
247
|
if (N === 0 || N === 15) continue;
|
|
248
|
-
const k = [y(d) +
|
|
248
|
+
const k = [y(d) + $(p, M, n) * e, h(m)], g = [y(d + 1), h(m) + $(M, F, n) * e], b = [y(d) + $(w, F, n) * e, h(m + 1)], A = [y(d), h(m) + $(p, w, n) * e], x = (P, R) => {
|
|
249
249
|
i.push([P[0], P[1], R[0], R[1]]);
|
|
250
250
|
};
|
|
251
251
|
switch (N) {
|
|
@@ -346,7 +346,7 @@ function At(t) {
|
|
|
346
346
|
function Ft(t) {
|
|
347
347
|
const r = [], n = (o) => {
|
|
348
348
|
if (Array.isArray(o)) {
|
|
349
|
-
if (
|
|
349
|
+
if (X(o)) {
|
|
350
350
|
const a = o, s = a[0], e = a[a.length - 1], f = a.length > 2 && s[0] === e[0] && s[1] === e[1];
|
|
351
351
|
r.push(f ? a : [...a, [s[0], s[1]]]);
|
|
352
352
|
return;
|
|
@@ -359,7 +359,7 @@ function Ft(t) {
|
|
|
359
359
|
function St(t, r) {
|
|
360
360
|
const n = Ft(t);
|
|
361
361
|
if (n.length === 0) return [];
|
|
362
|
-
const o =
|
|
362
|
+
const o = K(t);
|
|
363
363
|
if (!o) return [];
|
|
364
364
|
const a = Q(o[0], o[1]), s = n.map((m) => m.map((d) => a.toMetres(d))), e = Math.abs(r.distanceMetres);
|
|
365
365
|
if (!(e > 0)) return [];
|
|
@@ -425,8 +425,8 @@ async function Pt(t) {
|
|
|
425
425
|
const A = (k - c) * I, x = (g - u) * I, P = Math.min(I, b.height), R = Math.min(I, b.width);
|
|
426
426
|
for (let v = 0; v < P; v++)
|
|
427
427
|
for (let E = 0; E < R; E++) {
|
|
428
|
-
const
|
|
429
|
-
d[j] = ot(t.decoder, b.data[
|
|
428
|
+
const _ = (v * b.width + E) * 4, j = (x + v) * h + A + E;
|
|
429
|
+
d[j] = ot(t.decoder, b.data[_], b.data[_ + 1], b.data[_ + 2]), p[j] = 1;
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
432
|
const F = { width: h, height: m, cell: 1, originX: 0, originY: 0 }, w = 2 ** s;
|
|
@@ -596,7 +596,7 @@ async function Yt(t, r, n, o, a) {
|
|
|
596
596
|
S(a, `<om-transform type="contour"> src="${f}" is neither a terrain preset nor a {z}/{x}/{y} template.`, 'Use src="terrarium", or a raw tile URL plus decoder=.');
|
|
597
597
|
break;
|
|
598
598
|
}
|
|
599
|
-
const y = e.params.decoder ?? (typeof u?.decoder == "string" ? u.decoder : void 0), h = y && y in
|
|
599
|
+
const y = e.params.decoder ?? (typeof u?.decoder == "string" ? u.decoder : void 0), h = y && y in U ? U[y] : u?.decoder ?? U.terrarium, m = e.params.zoom === void 0 ? 10 : Number(e.params.zoom), d = await Rt({
|
|
600
600
|
template: l,
|
|
601
601
|
decoder: h,
|
|
602
602
|
zoom: Number.isFinite(m) ? m : 10,
|
|
@@ -623,7 +623,7 @@ export {
|
|
|
623
623
|
Nt as bufferRows,
|
|
624
624
|
ft as chaikinRing,
|
|
625
625
|
Rt as contourFromDem,
|
|
626
|
-
|
|
626
|
+
K as coordinateCentre,
|
|
627
627
|
W as distanceTransform,
|
|
628
628
|
xt as gridFor,
|
|
629
629
|
z as mapRings,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { g as
|
|
1
|
+
import { ba as E, bb as S, bc as R, bd as N, be as h, bf as b, bg as O, bh as W, bi as x, bj as I, bk as B, bl as P, bm as _, bn as k, bo as z, bp as $, bq as C, br as F, bs as v, bt as M, bu as w, bv as U } from "./index-BG_49YHy.js";
|
|
2
|
+
import { bw as ze, bx as $e, by as Ce, bz as ve, bA as Me, bB as Ue, bC as De, bD as je, bE as Je, bF as qe, bG as Ge, bH as He, bI as Ve, bJ as Ke, bK as Qe, bL as Xe, bM as Ye, bN as Ze, bO as et, bP as tt, bQ as nt, bR as rt, bS as at, bT as st, bU as ot } from "./index-BG_49YHy.js";
|
|
3
|
+
import { g as D, i as j } from "./table-accessors-CYWTzpQI.js";
|
|
4
4
|
async function J(t, e, n = {}, r = {}) {
|
|
5
|
-
const a = E(t), s =
|
|
5
|
+
const a = E(t), s = S.getWorkerFarm(n), { source: o } = n, c = { name: a, source: o };
|
|
6
6
|
o || (c.url = R(t, n));
|
|
7
7
|
const i = s.getWorkerPool(c), u = n.jobName || t.name, d = await i.startJob(
|
|
8
8
|
u,
|
|
@@ -38,7 +38,7 @@ async function q(t, e, n, r) {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
function G(t, e) {
|
|
41
|
-
if (!
|
|
41
|
+
if (!S.isSupported())
|
|
42
42
|
return !1;
|
|
43
43
|
const n = e?._nodeWorkers ?? e?.core?._nodeWorkers, r = e?.worker ?? e?.core?.worker;
|
|
44
44
|
return !h && !n ? !1 : !!(t.worker && r);
|
|
@@ -156,33 +156,33 @@ async function Q(t) {
|
|
|
156
156
|
r.onload = (a) => e(a?.target?.result), r.onerror = (a) => n(a), r.readAsArrayBuffer(t);
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function Se(t, e, n, r) {
|
|
160
160
|
!Array.isArray(e) && !b(e) && (r = void 0, n = e, e = void 0), n = n || {};
|
|
161
|
-
const s =
|
|
161
|
+
const s = O(e, r), o = W(t, s, n);
|
|
162
162
|
if (!o)
|
|
163
163
|
return null;
|
|
164
|
-
const c =
|
|
164
|
+
const c = x(n, o, s), i = I(t), u = () => {
|
|
165
165
|
throw new Error("parseSync called parse (which is async");
|
|
166
166
|
};
|
|
167
167
|
return r = B({ url: i, _parseSync: u, _parse: u, loaders: e }, c, r || null), X(o, t, c, r);
|
|
168
168
|
}
|
|
169
169
|
function X(t, e, n, r) {
|
|
170
|
-
if (e =
|
|
170
|
+
if (e = P(e, t), t.parseTextSync && typeof e == "string")
|
|
171
171
|
return t.parseTextSync(e, n);
|
|
172
172
|
if (t.parseSync && e instanceof ArrayBuffer)
|
|
173
173
|
return t.parseSync(e, n, r);
|
|
174
174
|
throw new Error(`${t.name} loader: 'parseSync' not supported by this loader, use 'parse' instead. ${r.url || ""}`);
|
|
175
175
|
}
|
|
176
176
|
function Y(t) {
|
|
177
|
-
return { ...t, length:
|
|
177
|
+
return { ...t, length: D(t), batchType: "data" };
|
|
178
178
|
}
|
|
179
179
|
async function l(t, e, n, r) {
|
|
180
180
|
const a = Array.isArray(e) ? e : void 0;
|
|
181
181
|
!Array.isArray(e) && !b(e) && (r = void 0, n = e, e = void 0), t = await t, n = n || {};
|
|
182
|
-
const s =
|
|
182
|
+
const s = I(t), o = await _(t, e, n);
|
|
183
183
|
if (!o)
|
|
184
184
|
return [];
|
|
185
|
-
const c =
|
|
185
|
+
const c = x(n, o, a, s);
|
|
186
186
|
return r = B({ url: s, _parseInBatches: l, _parse: k, loaders: a }, c, r || null), await Z(o, t, c, r);
|
|
187
187
|
}
|
|
188
188
|
async function Z(t, e, n, r) {
|
|
@@ -206,7 +206,7 @@ async function Z(t, e, n, r) {
|
|
|
206
206
|
return o(a);
|
|
207
207
|
}
|
|
208
208
|
async function ee(t, e, n, r) {
|
|
209
|
-
const a = await
|
|
209
|
+
const a = await z(e, n), s = await re(a, n?.core?.transforms || []);
|
|
210
210
|
return t.parseInBatches ? t.parseInBatches(s, n, r) : te(s, t, n, r);
|
|
211
211
|
}
|
|
212
212
|
async function* te(t, e, n, r) {
|
|
@@ -234,7 +234,7 @@ async function re(t, e = []) {
|
|
|
234
234
|
n = r(n);
|
|
235
235
|
return n;
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function xe(t, e, n, r) {
|
|
238
238
|
let a;
|
|
239
239
|
!Array.isArray(e) && !b(e) ? (n = e, a = void 0) : a = e;
|
|
240
240
|
const s = C(n || {});
|
|
@@ -262,7 +262,7 @@ async function ae(t, e, n) {
|
|
|
262
262
|
}
|
|
263
263
|
throw new Error("Writer could not encode data");
|
|
264
264
|
}
|
|
265
|
-
async function
|
|
265
|
+
async function Ie(t, e, n) {
|
|
266
266
|
if (e.text && e.encodeText)
|
|
267
267
|
return await e.encodeText(t, n);
|
|
268
268
|
if (e.text) {
|
|
@@ -282,7 +282,7 @@ function oe(t) {
|
|
|
282
282
|
return [{ ...t, start: 0, end: t.length }];
|
|
283
283
|
}
|
|
284
284
|
async function Be(t, e, n) {
|
|
285
|
-
const a = { ...
|
|
285
|
+
const a = { ...M(), ...n };
|
|
286
286
|
return e.encodeURLtoURL ? ue(e, t, a) : G(e, a) ? await J(e, t, a) : await e.encode(t, a);
|
|
287
287
|
}
|
|
288
288
|
function ce(t, e, n) {
|
|
@@ -330,7 +330,7 @@ async function ue(t, e, n) {
|
|
|
330
330
|
const r = T("input");
|
|
331
331
|
await new K(r, "w").write(e);
|
|
332
332
|
const s = T("output"), o = await ie(r, s, t, n);
|
|
333
|
-
return (await
|
|
333
|
+
return (await U(o)).arrayBuffer();
|
|
334
334
|
}
|
|
335
335
|
function fe(t) {
|
|
336
336
|
return [{ ...t, start: 0, end: t.length }];
|
|
@@ -425,7 +425,7 @@ const L = "4.4.3", Re = {
|
|
|
425
425
|
function m(t, e, n) {
|
|
426
426
|
return null;
|
|
427
427
|
}
|
|
428
|
-
async function
|
|
428
|
+
async function Oe(t, e, n = () => {
|
|
429
429
|
}, r = () => {
|
|
430
430
|
}) {
|
|
431
431
|
if (t = await t, !t.ok)
|
|
@@ -458,7 +458,7 @@ async function A(t, e, n, r, a, s, o) {
|
|
|
458
458
|
t.error(c), o(c);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
class
|
|
461
|
+
class We {
|
|
462
462
|
_fetch;
|
|
463
463
|
files = {};
|
|
464
464
|
lowerCaseFiles = {};
|
|
@@ -534,31 +534,31 @@ class Oe {
|
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
536
|
export {
|
|
537
|
-
|
|
537
|
+
ze as FetchError,
|
|
538
538
|
ge as JSONLoader,
|
|
539
539
|
Ne as NullLoader,
|
|
540
540
|
Re as NullWorkerLoader,
|
|
541
541
|
$e as RequestScheduler,
|
|
542
|
-
|
|
543
|
-
|
|
542
|
+
We as _BrowserFileSystem,
|
|
543
|
+
Oe as _fetchProgress,
|
|
544
544
|
Ae as _selectSource,
|
|
545
545
|
Ce as _unregisterLoaders,
|
|
546
546
|
ve as assert,
|
|
547
547
|
$ as concatenateArrayBuffersAsync,
|
|
548
|
-
|
|
549
|
-
|
|
548
|
+
Me as createDataSource,
|
|
549
|
+
Ue as document,
|
|
550
550
|
Be as encode,
|
|
551
551
|
Le as encodeInBatches,
|
|
552
552
|
ce as encodeSync,
|
|
553
553
|
ae as encodeTable,
|
|
554
|
-
|
|
554
|
+
Ie as encodeTableAsText,
|
|
555
555
|
se as encodeTableInBatches,
|
|
556
556
|
ke as encodeText,
|
|
557
557
|
Fe as encodeTextSync,
|
|
558
558
|
ie as encodeURLtoURL,
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
559
|
+
U as fetchFile,
|
|
560
|
+
De as forEach,
|
|
561
|
+
M as getLoaderOptions,
|
|
562
562
|
je as getPathPrefix,
|
|
563
563
|
Je as global,
|
|
564
564
|
qe as isAsyncIterable,
|
|
@@ -572,7 +572,7 @@ export {
|
|
|
572
572
|
Ye as isWorker,
|
|
573
573
|
Ze as isWritableStream,
|
|
574
574
|
et as load,
|
|
575
|
-
|
|
575
|
+
xe as loadInBatches,
|
|
576
576
|
tt as makeIterator,
|
|
577
577
|
we as makeLineIterator,
|
|
578
578
|
pe as makeNumberedLineIterator,
|
|
@@ -581,12 +581,12 @@ export {
|
|
|
581
581
|
be as makeTextEncoderIterator,
|
|
582
582
|
k as parse,
|
|
583
583
|
l as parseInBatches,
|
|
584
|
-
|
|
584
|
+
Se as parseSync,
|
|
585
585
|
Te as readArrayBuffer,
|
|
586
586
|
nt as registerLoaders,
|
|
587
587
|
w as resolvePath,
|
|
588
|
-
|
|
589
|
-
|
|
588
|
+
_ as selectLoader,
|
|
589
|
+
W as selectLoaderSync,
|
|
590
590
|
rt as self,
|
|
591
591
|
at as setLoaderOptions,
|
|
592
592
|
st as setPathPrefix,
|