@nika-js/onlymap 0.13.0 → 0.13.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/CHANGELOG.md +29 -0
- package/README.md +2 -2
- package/bin/dem-tiles.mjs +270 -0
- package/bin/onlymapjs.mjs +138 -34
- package/dist/{basemap-BxqFTBzX.js → basemap-CdSCIWCl.js} +473 -443
- package/dist/basemap.d.ts +16 -3
- package/dist/{build-D4iI8O9b.js → build-CUx4yR_O.js} +10 -10
- package/dist/camera-altitude.d.ts +29 -0
- package/dist/{client-BYFePLZV.js → client-DVkMuuPp.js} +2 -2
- package/dist/color.d.ts +15 -0
- package/dist/credit-chrome.d.ts +11 -0
- package/dist/elements/om-map.d.ts +41 -1
- package/dist/geodesy.d.ts +2 -0
- package/dist/{geoparquet-BV32P0nI.js → geoparquet-DuCEsCOu.js} +3 -3
- package/dist/{globe-view-B_X6obse.js → globe-view-BWNfn-Sx.js} +1 -1
- package/dist/ground-controller.d.ts +39 -0
- package/dist/{hillshade-9VS_t-Ks.js → hillshade-DyfYxqNm.js} +61 -64
- package/dist/{hillshade-shader-DI2uLSNU.js → hillshade-shader-BWA0USDQ.js} +12 -11
- package/dist/hillshade-shader.d.ts +2 -2
- package/dist/hillshade.d.ts +0 -29
- package/dist/{index-IDWDfgTC.js → index-BfHaNHyY.js} +20687 -19351
- package/dist/{index-JewSBOjJ.js → index-CCj9Z5yt.js} +38 -38
- package/dist/{index-D40H3fpl.js → index-Cc3huYsW.js} +62 -62
- package/dist/{index-Bct9VWxi.js → index-DRGcZmBm.js} +1 -1
- package/dist/{index-eSuCj2Bn.js → index-DYrgHprN.js} +61 -61
- package/dist/{index-D3P6Cfbr.js → index-DabUE8w3.js} +38 -38
- package/dist/{index-CbFw6P0B.js → index-DfzI_j0D.js} +1 -1
- package/dist/{index-Di1LK4JT.js → index-DiDoH_BG.js} +3 -3
- package/dist/{index-BR_5FIN1.js → index-dUoVyYIW.js} +18 -18
- package/dist/index.d.ts +1 -1
- package/dist/{lerc-C42a0ISa.js → lerc-CUV0h9Ci.js} +1 -1
- package/dist/onlymap.standalone.js +37891 -36442
- package/dist/onlymapjs.js +49 -49
- package/dist/plane-gpu/plane-basemap.d.ts +0 -14
- package/dist/{post-process-effect-ktcgAjmv.js → post-process-effect-DPrpqybM.js} +1 -1
- package/dist/programmatic.d.ts +3 -1
- package/dist/{raster-CIxg_M_1.js → raster-CrRQNJE7.js} +4 -4
- package/dist/{raster-pipeline-BODPC9vJ.js → raster-pipeline-D9g8RAo4.js} +11 -11
- package/dist/runtime-core.d.ts +132 -0
- package/dist/sea-surface.d.ts +18 -0
- package/dist/terrain-derive.d.ts +39 -0
- package/dist/terrain-ground.d.ts +31 -0
- package/dist/terrain-heightfield.d.ts +17 -9
- package/dist/terrain-inspect-GowNVtMZ.js +96 -0
- package/dist/terrain-inspect.d.ts +34 -0
- package/dist/terrain-nodata.d.ts +50 -0
- package/dist/terrain-priority.d.ts +92 -0
- package/dist/terrain-sample.d.ts +6 -0
- package/dist/terrain-skirt.d.ts +6140 -0
- package/dist/terrain-texture-mask.d.ts +40 -0
- package/dist/terrain-tint.d.ts +61 -0
- package/dist/terrain.d.ts +132 -8
- package/dist/{text-on-path-LZL6NfwZ.js → text-on-path-BoFbm-tl.js} +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/viewport-filter.d.ts +9 -0
- package/dist/volumetrics.d.ts +11 -0
- package/dist/{zarr-D19fNIZt.js → zarr-C8CU8LXU.js} +2 -2
- package/docs/cartograph.md +2 -2
- package/llms.txt +1 -1
- package/onlymapjs.html-data.json +162 -2
- package/package.json +2 -1
- package/skills/onlymapjs/SKILL.md +5 -2
- package/skills/onlymapjs/references/syntax.md +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
3
|
-
function
|
|
4
|
-
const n = Math.max(Math.cos(r *
|
|
1
|
+
import { aR as tt, aS as et, aT as q, ak as nt, aa as ot, aU as L, aV as rt, aW as D, af as st, ag as _, aX as B, aY as it } from "./index-BfHaNHyY.js";
|
|
2
|
+
const J = Math.PI / 180, T = tt * J;
|
|
3
|
+
function Q(t, r) {
|
|
4
|
+
const n = Math.max(Math.cos(r * J), 1e-6);
|
|
5
5
|
return {
|
|
6
6
|
toMetres(o) {
|
|
7
7
|
return [(o[0] - t) * T * n, (o[1] - r) * T];
|
|
@@ -11,17 +11,17 @@ function K(t, r) {
|
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function O(t) {
|
|
15
15
|
return Array.isArray(t) && typeof t[0] == "number" && typeof t[1] == "number";
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
return Array.isArray(t) &&
|
|
17
|
+
function $(t) {
|
|
18
|
+
return Array.isArray(t) && O(t[0]);
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function V(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)) {
|
|
24
|
-
if (
|
|
24
|
+
if (O(f)) {
|
|
25
25
|
s = !0, f[0] < r && (r = f[0]), f[0] > o && (o = f[0]), f[1] < n && (n = f[1]), f[1] > a && (a = f[1]);
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
@@ -31,9 +31,9 @@ function Q(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) ||
|
|
34
|
+
return !Array.isArray(t) || O(t) ? t : $(t) ? r(t) : t.map((n) => z(n, r));
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function K(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];
|
|
@@ -48,7 +48,7 @@ function at(t, r, n, o, a, s) {
|
|
|
48
48
|
}
|
|
49
49
|
function ct(t, r, n, o) {
|
|
50
50
|
if (t.length <= 2 || !(r > 0)) return t;
|
|
51
|
-
const a =
|
|
51
|
+
const a = Q(n, o), s = new Float64Array(t.length), e = new Float64Array(t.length);
|
|
52
52
|
for (let l = 0; l < t.length; l++) {
|
|
53
53
|
const [y, h] = a.toMetres(t[l]);
|
|
54
54
|
s[l] = y, e[l] = h;
|
|
@@ -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 K(t) && u.length < 4 ? t : u;
|
|
71
71
|
}
|
|
72
72
|
function ut(t, r) {
|
|
73
|
-
const n =
|
|
73
|
+
const n = V(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 = K(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) && !$(o)) {
|
|
111
|
+
if ($(o[0])) {
|
|
112
112
|
r.push(o);
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
@@ -118,8 +118,8 @@ function mt(t) {
|
|
|
118
118
|
return n(t), r;
|
|
119
119
|
}
|
|
120
120
|
function dt(t, r, n) {
|
|
121
|
-
if (!
|
|
122
|
-
for (let o = 1; o < t.length; o++) if (
|
|
121
|
+
if (!q(t[0], r, n)) return !1;
|
|
122
|
+
for (let o = 1; o < t.length; o++) if (q(t[o], r, n)) return !1;
|
|
123
123
|
return !0;
|
|
124
124
|
}
|
|
125
125
|
function pt(t, r, n) {
|
|
@@ -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 X = 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] = -X, a[1] = X;
|
|
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] = X;
|
|
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 : X;
|
|
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];
|
|
@@ -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 ($(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,9 +359,9 @@ 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 = V(t);
|
|
363
363
|
if (!o) return [];
|
|
364
|
-
const a =
|
|
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 [];
|
|
366
366
|
const f = Math.max(1, Math.round(r.repeat)), c = e * f, i = e / Math.max(1, r.cellsPerBand), u = xt(s, i, c + i * 4);
|
|
367
367
|
if (!u) return [];
|
|
@@ -411,7 +411,7 @@ function It(t) {
|
|
|
411
411
|
return Math.atan(Math.sinh(Math.PI * (1 - 2 * t))) * 180 / Math.PI;
|
|
412
412
|
}
|
|
413
413
|
async function Pt(t) {
|
|
414
|
-
const [r, n, o, a] = t.bounds, s = Math.max(0, Math.round(t.zoom)), e =
|
|
414
|
+
const [r, n, o, a] = t.bounds, s = Math.max(0, Math.round(t.zoom)), e = L(r, a, s), f = L(o, n, s), c = Math.min(e.x, f.x), i = Math.max(e.x, f.x), u = Math.min(e.y, f.y), l = Math.max(e.y, f.y), y = (i - c + 1) * (l - u + 1);
|
|
415
415
|
if (y <= 0 || y > t.maxTiles) return null;
|
|
416
416
|
const h = (i - c + 1) * I, m = (l - u + 1) * I, d = new Float32Array(h * m), p = new Uint8Array(h * m), M = await Promise.all(
|
|
417
417
|
Array.from({ length: y }, (k, g) => {
|
|
@@ -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[
|
|
428
|
+
const U = (v * b.width + E) * 4, j = (x + v) * h + A + E;
|
|
429
|
+
d[j] = ot(t.decoder, b.data[U], b.data[U + 1], b.data[U + 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;
|
|
@@ -461,7 +461,7 @@ async function Rt(t) {
|
|
|
461
461
|
return m;
|
|
462
462
|
}
|
|
463
463
|
const vt = /* @__PURE__ */ new Set(["LineString", "MultiLineString", "Polygon", "MultiPolygon"]);
|
|
464
|
-
function
|
|
464
|
+
function H(t, r, n) {
|
|
465
465
|
return t.map((o) => {
|
|
466
466
|
const s = o.geometry;
|
|
467
467
|
if (!s || s.coordinates == null) return o;
|
|
@@ -488,7 +488,7 @@ async function Yt(t, r, n, o, a) {
|
|
|
488
488
|
for (const e of n)
|
|
489
489
|
switch (e.type) {
|
|
490
490
|
case "simplify": {
|
|
491
|
-
const f =
|
|
491
|
+
const f = D(e.params.tolerance);
|
|
492
492
|
if (!f) {
|
|
493
493
|
S(a, '<om-transform type="simplify"> needs a tolerance with a unit.', 'Write tolerance="0.15mm" (paper) or tolerance="50m" (ground).');
|
|
494
494
|
break;
|
|
@@ -500,7 +500,7 @@ async function Yt(t, r, n, o, a) {
|
|
|
500
500
|
}
|
|
501
501
|
{
|
|
502
502
|
const i = /* @__PURE__ */ new Set();
|
|
503
|
-
s =
|
|
503
|
+
s = H(s, (u) => ut(u, c), (u) => i.add(u)), i.size > 0 && S(
|
|
504
504
|
a,
|
|
505
505
|
`<om-transform type="simplify"> left ${[...i].join("/")} geometry untouched — there is no path to thin.`,
|
|
506
506
|
"Simplify lines and polygons. A scatter of points has no redundant vertices, and thinning it would delete data."
|
|
@@ -516,7 +516,7 @@ async function Yt(t, r, n, o, a) {
|
|
|
516
516
|
}
|
|
517
517
|
{
|
|
518
518
|
const c = /* @__PURE__ */ new Set();
|
|
519
|
-
s =
|
|
519
|
+
s = H(s, (i) => lt(i, Math.round(f)), (i) => c.add(i)), c.size > 0 && S(
|
|
520
520
|
a,
|
|
521
521
|
`<om-transform type="smooth"> left ${[...c].join("/")} geometry untouched — there is no path to round.`,
|
|
522
522
|
"Smooth lines and polygons. Rounding a scatter of points would replace every one of them with a location that is not in the data."
|
|
@@ -540,7 +540,7 @@ async function Yt(t, r, n, o, a) {
|
|
|
540
540
|
break;
|
|
541
541
|
}
|
|
542
542
|
case "buffer": {
|
|
543
|
-
const f =
|
|
543
|
+
const f = D(e.params.distance);
|
|
544
544
|
if (!f) {
|
|
545
545
|
S(a, '<om-transform type="buffer"> needs a distance with a unit.', 'Write distance="1.2mm" (paper) or distance="500m" (ground).');
|
|
546
546
|
break;
|
|
@@ -578,7 +578,7 @@ async function Yt(t, r, n, o, a) {
|
|
|
578
578
|
break;
|
|
579
579
|
}
|
|
580
580
|
case "contour": {
|
|
581
|
-
const f = e.params.src, c = Et(e.params.bounds), i =
|
|
581
|
+
const f = e.params.src, c = Et(e.params.bounds), i = D(e.params.interval);
|
|
582
582
|
if (!f || !c || !i) {
|
|
583
583
|
S(
|
|
584
584
|
a,
|
|
@@ -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 _ ? _[y] : u?.decoder ?? _.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,12 +623,12 @@ export {
|
|
|
623
623
|
Nt as bufferRows,
|
|
624
624
|
ft as chaikinRing,
|
|
625
625
|
Rt as contourFromDem,
|
|
626
|
-
|
|
626
|
+
V as coordinateCentre,
|
|
627
627
|
W as distanceTransform,
|
|
628
628
|
xt as gridFor,
|
|
629
629
|
z as mapRings,
|
|
630
630
|
Z as marchingSquares,
|
|
631
|
-
|
|
631
|
+
Q as metricFrame,
|
|
632
632
|
Et as parseBounds,
|
|
633
633
|
gt as rasterizeRings,
|
|
634
634
|
Yt as runTransforms,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { g as
|
|
4
|
-
async function
|
|
1
|
+
import { b1 as E, b2 as x, b3 as R, b4 as N, b5 as h, b6 as b, b7 as W, b8 as O, b9 as I, ba as S, bb as B, bc as _, bd as z, be as k, bf as P, bg as $, bh as C, bi as F, bj as v, bk as D, bl as w, bm as M } from "./index-BfHaNHyY.js";
|
|
2
|
+
import { bn as Pe, bo as $e, bp as Ce, bq as ve, br as De, bs as Me, bt as Ue, bu as je, bv as Je, bw as qe, bx as Ge, by as He, bz as Ve, bA as Ke, bB as Qe, bC as Xe, bD as Ye, bE as Ze, bF as et, bG as tt, bH as nt, bI as rt, bJ as at, bK as st, bL as ot } from "./index-BfHaNHyY.js";
|
|
3
|
+
import { g as U, i as j } from "./table-accessors-CYWTzpQI.js";
|
|
4
|
+
async function J(t, e, n = {}, r = {}) {
|
|
5
5
|
const a = E(t), s = x.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,
|
|
9
9
|
// eslint-disable-next-line
|
|
10
|
-
|
|
11
|
-
), y =
|
|
10
|
+
q.bind(null, r)
|
|
11
|
+
), y = N(n);
|
|
12
12
|
return d.postMessage("process", { input: e, options: y }), (await d.result).result;
|
|
13
13
|
}
|
|
14
|
-
async function
|
|
14
|
+
async function q(t, e, n, r) {
|
|
15
15
|
switch (n) {
|
|
16
16
|
case "done":
|
|
17
17
|
e.done(r);
|
|
@@ -37,7 +37,7 @@ async function J(t, e, n, r) {
|
|
|
37
37
|
console.warn(`process-on-worker: unknown message ${n}`);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function G(t, e) {
|
|
41
41
|
if (!x.isSupported())
|
|
42
42
|
return !1;
|
|
43
43
|
const n = e?._nodeWorkers ?? e?.core?._nodeWorkers, r = e?.worker ?? e?.core?.worker;
|
|
@@ -48,12 +48,12 @@ async function* me(t, e = {}) {
|
|
|
48
48
|
for await (const r of t)
|
|
49
49
|
yield typeof r == "string" ? r : n.decode(r, { stream: !0 });
|
|
50
50
|
}
|
|
51
|
-
async function*
|
|
51
|
+
async function* be(t) {
|
|
52
52
|
const e = new TextEncoder();
|
|
53
53
|
for await (const n of t)
|
|
54
54
|
yield typeof n == "string" ? e.encode(n).buffer : n;
|
|
55
55
|
}
|
|
56
|
-
async function*
|
|
56
|
+
async function* we(t) {
|
|
57
57
|
let e = "";
|
|
58
58
|
for await (const n of t) {
|
|
59
59
|
e += n;
|
|
@@ -71,13 +71,13 @@ async function* pe(t) {
|
|
|
71
71
|
for await (const n of t)
|
|
72
72
|
yield { counter: e, line: n }, e++;
|
|
73
73
|
}
|
|
74
|
-
const
|
|
74
|
+
const H = "4.4.3", ge = {
|
|
75
75
|
dataType: null,
|
|
76
76
|
batchType: null,
|
|
77
77
|
name: "JSON",
|
|
78
78
|
id: "json",
|
|
79
79
|
module: "json",
|
|
80
|
-
version:
|
|
80
|
+
version: H,
|
|
81
81
|
extensions: ["json", "geojson"],
|
|
82
82
|
mimeTypes: ["application/json"],
|
|
83
83
|
category: "json",
|
|
@@ -89,7 +89,7 @@ const G = "4.4.3", ge = {
|
|
|
89
89
|
function p(t) {
|
|
90
90
|
return JSON.parse(t);
|
|
91
91
|
}
|
|
92
|
-
class
|
|
92
|
+
class V {
|
|
93
93
|
handle;
|
|
94
94
|
size;
|
|
95
95
|
bigsize;
|
|
@@ -111,7 +111,7 @@ class H {
|
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
const f = new Error("Not implemented");
|
|
114
|
-
class
|
|
114
|
+
class K {
|
|
115
115
|
handle;
|
|
116
116
|
size = 0;
|
|
117
117
|
bigsize = 0n;
|
|
@@ -148,44 +148,44 @@ class X {
|
|
|
148
148
|
async function Te(t, e, n) {
|
|
149
149
|
t instanceof Blob || (t = new Blob([t]));
|
|
150
150
|
const r = t.slice(e, e + n);
|
|
151
|
-
return await
|
|
151
|
+
return await Q(r);
|
|
152
152
|
}
|
|
153
|
-
async function
|
|
153
|
+
async function Q(t) {
|
|
154
154
|
return await new Promise((e, n) => {
|
|
155
155
|
const r = new FileReader();
|
|
156
156
|
r.onload = (a) => e(a?.target?.result), r.onerror = (a) => n(a), r.readAsArrayBuffer(t);
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
159
|
function xe(t, e, n, r) {
|
|
160
|
-
!Array.isArray(e) && !
|
|
161
|
-
const s =
|
|
160
|
+
!Array.isArray(e) && !b(e) && (r = void 0, n = e, e = void 0), n = n || {};
|
|
161
|
+
const s = W(e, r), o = O(t, s, n);
|
|
162
162
|
if (!o)
|
|
163
163
|
return null;
|
|
164
|
-
const c =
|
|
164
|
+
const c = I(n, o, s), i = S(t), u = () => {
|
|
165
165
|
throw new Error("parseSync called parse (which is async");
|
|
166
166
|
};
|
|
167
|
-
return r =
|
|
167
|
+
return r = B({ url: i, _parseSync: u, _parse: u, loaders: e }, c, r || null), X(o, t, c, r);
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function X(t, e, n, r) {
|
|
170
170
|
if (e = _(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
|
-
function
|
|
177
|
-
return { ...t, length:
|
|
176
|
+
function Y(t) {
|
|
177
|
+
return { ...t, length: U(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
|
-
!Array.isArray(e) && !
|
|
182
|
-
const s =
|
|
181
|
+
!Array.isArray(e) && !b(e) && (r = void 0, n = e, e = void 0), t = await t, n = n || {};
|
|
182
|
+
const s = S(t), o = await z(t, e, n);
|
|
183
183
|
if (!o)
|
|
184
184
|
return [];
|
|
185
|
-
const c =
|
|
186
|
-
return r =
|
|
185
|
+
const c = I(n, o, a, s);
|
|
186
|
+
return r = B({ url: s, _parseInBatches: l, _parse: k, loaders: a }, c, r || null), await Z(o, t, c, r);
|
|
187
187
|
}
|
|
188
|
-
async function
|
|
188
|
+
async function Z(t, e, n, r) {
|
|
189
189
|
const a = await ee(t, e, n, r);
|
|
190
190
|
if (!n?.core?.metadata)
|
|
191
191
|
return a;
|
|
@@ -220,7 +220,7 @@ async function* te(t, e, n, r) {
|
|
|
220
220
|
yield ne(s, e);
|
|
221
221
|
}
|
|
222
222
|
function ne(t, e) {
|
|
223
|
-
const n =
|
|
223
|
+
const n = j(t) ? Y(t) : {
|
|
224
224
|
shape: "unknown",
|
|
225
225
|
batchType: "data",
|
|
226
226
|
data: t,
|
|
@@ -234,9 +234,9 @@ async function re(t, e = []) {
|
|
|
234
234
|
n = r(n);
|
|
235
235
|
return n;
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function Ie(t, e, n, r) {
|
|
238
238
|
let a;
|
|
239
|
-
!Array.isArray(e) && !
|
|
239
|
+
!Array.isArray(e) && !b(e) ? (n = e, a = void 0) : a = e;
|
|
240
240
|
const s = C(n || {});
|
|
241
241
|
return Array.isArray(t) ? t.map((c) => g(c, a, n || {}, s)) : g(t, a, n || {}, s);
|
|
242
242
|
}
|
|
@@ -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 Se(t, e, n) {
|
|
266
266
|
if (e.text && e.encodeText)
|
|
267
267
|
return await e.encodeText(t, n);
|
|
268
268
|
if (e.text) {
|
|
@@ -281,9 +281,9 @@ function se(t, e, n) {
|
|
|
281
281
|
function oe(t) {
|
|
282
282
|
return [{ ...t, start: 0, end: t.length }];
|
|
283
283
|
}
|
|
284
|
-
async function
|
|
285
|
-
const a = { ...
|
|
286
|
-
return e.encodeURLtoURL ? ue(e, t, a) :
|
|
284
|
+
async function Be(t, e, n) {
|
|
285
|
+
const a = { ...D(), ...n };
|
|
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) {
|
|
289
289
|
if (e.encodeSync)
|
|
@@ -320,7 +320,7 @@ function Le(t, e, n) {
|
|
|
320
320
|
throw new Error(`Writer ${e.name} could not encode in batches`);
|
|
321
321
|
}
|
|
322
322
|
async function ie(t, e, n, r) {
|
|
323
|
-
if (t =
|
|
323
|
+
if (t = w(t), e = w(e), h || !n.encodeURLtoURL)
|
|
324
324
|
throw new Error();
|
|
325
325
|
return await n.encodeURLtoURL(t, e, r);
|
|
326
326
|
}
|
|
@@ -328,7 +328,7 @@ async function ue(t, e, n) {
|
|
|
328
328
|
if (h)
|
|
329
329
|
throw new Error(`Writer ${t.name} not supported in browser`);
|
|
330
330
|
const r = T("input");
|
|
331
|
-
await new
|
|
331
|
+
await new K(r, "w").write(e);
|
|
332
332
|
const s = T("output"), o = await ie(r, s, t, n);
|
|
333
333
|
return (await M(o)).arrayBuffer();
|
|
334
334
|
}
|
|
@@ -402,7 +402,7 @@ const L = "4.4.3", Re = {
|
|
|
402
402
|
options: {
|
|
403
403
|
null: {}
|
|
404
404
|
}
|
|
405
|
-
},
|
|
405
|
+
}, Ne = {
|
|
406
406
|
dataType: null,
|
|
407
407
|
batchType: null,
|
|
408
408
|
name: "Null loader",
|
|
@@ -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 We(t, e, n = () => {
|
|
429
429
|
}, r = () => {
|
|
430
430
|
}) {
|
|
431
431
|
if (t = await t, !t.ok)
|
|
@@ -524,7 +524,7 @@ class Oe {
|
|
|
524
524
|
// implements IRandomAccessFileSystem
|
|
525
525
|
// RANDOM ACCESS
|
|
526
526
|
async openReadableFile(e, n) {
|
|
527
|
-
return new
|
|
527
|
+
return new V(this.files[e]);
|
|
528
528
|
}
|
|
529
529
|
// PRIVATE
|
|
530
530
|
// Supports case independent paths, and file usage tracking
|
|
@@ -536,55 +536,55 @@ class Oe {
|
|
|
536
536
|
export {
|
|
537
537
|
Pe as FetchError,
|
|
538
538
|
ge as JSONLoader,
|
|
539
|
-
|
|
539
|
+
Ne as NullLoader,
|
|
540
540
|
Re as NullWorkerLoader,
|
|
541
541
|
$e as RequestScheduler,
|
|
542
542
|
Oe as _BrowserFileSystem,
|
|
543
|
-
|
|
543
|
+
We as _fetchProgress,
|
|
544
544
|
Ae as _selectSource,
|
|
545
545
|
Ce as _unregisterLoaders,
|
|
546
546
|
ve as assert,
|
|
547
547
|
$ as concatenateArrayBuffersAsync,
|
|
548
|
-
|
|
548
|
+
De as createDataSource,
|
|
549
549
|
Me as document,
|
|
550
|
-
|
|
550
|
+
Be as encode,
|
|
551
551
|
Le as encodeInBatches,
|
|
552
552
|
ce as encodeSync,
|
|
553
553
|
ae as encodeTable,
|
|
554
|
-
|
|
554
|
+
Se as encodeTableAsText,
|
|
555
555
|
se as encodeTableInBatches,
|
|
556
556
|
ke as encodeText,
|
|
557
557
|
Fe as encodeTextSync,
|
|
558
558
|
ie as encodeURLtoURL,
|
|
559
559
|
M as fetchFile,
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
560
|
+
Ue as forEach,
|
|
561
|
+
D as getLoaderOptions,
|
|
562
|
+
je as getPathPrefix,
|
|
563
|
+
Je as global,
|
|
564
|
+
qe as isAsyncIterable,
|
|
565
565
|
h as isBrowser,
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
566
|
+
Ge as isIterable,
|
|
567
|
+
He as isIterator,
|
|
568
|
+
Ve as isPromise,
|
|
569
|
+
Ke as isPureObject,
|
|
570
|
+
Qe as isReadableStream,
|
|
571
|
+
Xe as isResponse,
|
|
572
|
+
Ye as isWorker,
|
|
573
|
+
Ze as isWritableStream,
|
|
574
574
|
et as load,
|
|
575
|
-
|
|
575
|
+
Ie as loadInBatches,
|
|
576
576
|
tt as makeIterator,
|
|
577
|
-
|
|
577
|
+
we as makeLineIterator,
|
|
578
578
|
pe as makeNumberedLineIterator,
|
|
579
579
|
Ee as makeStream,
|
|
580
580
|
me as makeTextDecoderIterator,
|
|
581
|
-
|
|
581
|
+
be as makeTextEncoderIterator,
|
|
582
582
|
k as parse,
|
|
583
583
|
l as parseInBatches,
|
|
584
584
|
xe as parseSync,
|
|
585
585
|
Te as readArrayBuffer,
|
|
586
586
|
nt as registerLoaders,
|
|
587
|
-
|
|
587
|
+
w as resolvePath,
|
|
588
588
|
z as selectLoader,
|
|
589
589
|
O as selectLoaderSync,
|
|
590
590
|
rt as self,
|