@nika-js/onlymap 0.12.1 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/README.md +1 -1
- package/dist/{basemap-BK25o5OE.js → basemap-zG1-omic.js} +473 -443
- package/dist/basemap.d.ts +16 -3
- package/dist/build-Bbi4SleC.js +208 -0
- package/dist/cartograph.js +43 -41
- package/dist/cartograph.standalone.js +3 -1
- package/dist/client-CIH6ToMI.js +6878 -0
- package/dist/{geoparquet-CLydPm2f.js → geoparquet-CyWsYt9S.js} +1 -1
- package/dist/{globe-view-ChuX60M5.js → globe-view-Xelgj_KW.js} +6 -6
- package/dist/{hillshade-DD8WFrvf.js → hillshade-Zbg50lm6.js} +79 -67
- package/dist/hillshade.d.ts +7 -0
- package/dist/html-data.d.ts +1 -1
- package/dist/{index-CgVFHEdM.js → index-6eeSlSqN.js} +3 -3
- package/dist/{index-CMKrghNb.js → index-BL_YCKiW.js} +54 -54
- package/dist/{index-C2CKUsom.js → index-BbVnkgld.js} +38 -38
- package/dist/{index-CvrH6mbS.js → index-BtRsa5oc.js} +3 -3
- package/dist/{index-DIzzRLKr.js → index-BwtXeP_F.js} +1 -1
- package/dist/{index-Dvwr1Y3o.js → index-ClAPAqcm.js} +49 -49
- package/dist/{index-Bs69fn8a.js → index-CpFNIkOO.js} +33429 -30673
- package/dist/{index-CdAf0bLj.js → index-DnCmvLuC.js} +42 -42
- package/dist/index-JFuN4DCn.js +4449 -0
- package/dist/layer-registry.d.ts +1 -0
- package/dist/{lerc-mAijS40k.js → lerc-C3SKC6CU.js} +1 -1
- package/dist/onlymap.standalone.js +60762 -51701
- package/dist/onlymapjs.js +47 -47
- package/dist/plane-gpu/gpu-layer-types.d.ts +35 -0
- package/dist/plane-gpu/plane-basemap.d.ts +10461 -0
- package/dist/plane-gpu/plane-gpu-view.d.ts +90 -0
- package/dist/plane-gpu/projection-params.d.ts +47 -0
- package/dist/plane-layers.d.ts +2 -0
- package/dist/plane-seam.d.ts +48 -0
- package/dist/plane-tileset.d.ts +23 -2
- package/dist/plane-vector/build.d.ts +107 -0
- package/dist/plane-vector/client.d.ts +18 -0
- package/dist/plane-vector/cut-ends-extension.d.ts +30 -0
- package/dist/plane-vector/plane-mvt-layer.d.ts +10412 -0
- package/dist/plane-vector/tile-cut.d.ts +45 -0
- package/dist/plane-vector/worker.d.ts +15 -0
- package/dist/plane-warp.d.ts +12 -1
- package/dist/{post-process-effect-rwFDi8di.js → post-process-effect-C3P9VwC9.js} +11 -11
- package/dist/programmatic.d.ts +6 -0
- package/dist/projection.d.ts +51 -0
- package/dist/{raster-CXIqf83L.js → raster-BgCnz9-Z.js} +3 -3
- package/dist/{raster-pipeline-CfSg2Re7.js → raster-pipeline-CKdpKgFo.js} +1 -1
- package/dist/react/om-map.d.ts +4 -0
- package/dist/react.js +259 -252
- package/dist/runtime-core.d.ts +84 -2
- package/dist/{text-on-path-B08PekFz.js → text-on-path-BpVLX8Yt.js} +74 -66
- package/dist/version.d.ts +1 -1
- package/dist/{zarr-CUn2udOc.js → zarr-Cur_pzNa.js} +2 -2
- package/docs/cartograph.md +2 -2
- package/docs/cartography.md +59 -3
- package/docs/testing.md +2 -1
- package/llms.txt +2 -2
- package/onlymapjs.attributes.json +1 -0
- package/onlymapjs.html-data.json +15 -1
- package/package.json +3 -2
- package/skills/onlymapjs/SKILL.md +2 -2
- package/skills/onlymapjs/references/syntax.md +7 -6
- package/dist/index-BHRpKnGi.js +0 -4883
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as L, j as x,
|
|
1
|
+
import { d as L, j as x, am as A, an as E, ao as d, ap as h, aq as u, ar as z, p as V, W as Z, G as D } from "./index-CpFNIkOO.js";
|
|
2
2
|
const c = Math.PI / 180, G = 180 / Math.PI;
|
|
3
3
|
function w(l, t = 0) {
|
|
4
4
|
const a = Math.min(180, l) * c;
|
|
@@ -41,9 +41,9 @@ class T extends A {
|
|
|
41
41
|
}
|
|
42
42
|
applyConstraints(t) {
|
|
43
43
|
const { longitude: a, latitude: o, maxBounds: e } = t;
|
|
44
|
-
if (t.zoom = this._constrainZoom(t.zoom, t), (a < -180 || a > 180) && (t.longitude = E(a + 180, 360) - 180), t.latitude = d(o, -
|
|
45
|
-
const s = t.zoom -
|
|
46
|
-
if (i > 0 && i <
|
|
44
|
+
if (t.zoom = this._constrainZoom(t.zoom, t), (a < -180 || a > 180) && (t.longitude = E(a + 180, 360) - 180), t.latitude = d(o, -h, h), e && (t.longitude = d(t.longitude, e[0][0], e[1][0]), t.latitude = d(t.latitude, e[0][1], e[1][1])), e) {
|
|
45
|
+
const s = t.zoom - u(o), n = e[1][0] - e[0][0], i = e[1][1] - e[0][1];
|
|
46
|
+
if (i > 0 && i < h * 2) {
|
|
47
47
|
const r = Math.min(S(t.height, s), i) / 2;
|
|
48
48
|
t.latitude = d(t.latitude, e[0][1] + r, e[1][1] - r);
|
|
49
49
|
}
|
|
@@ -52,13 +52,13 @@ class T extends A {
|
|
|
52
52
|
t.longitude = d(t.longitude, e[0][0] + r, e[1][0] - r);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
return t.latitude !== o && (t.zoom +=
|
|
55
|
+
return t.latitude !== o && (t.zoom += u(t.latitude) - u(o)), t;
|
|
56
56
|
}
|
|
57
57
|
_constrainZoom(t, a) {
|
|
58
58
|
a || (a = this.getViewportProps());
|
|
59
59
|
const { latitude: o, maxZoom: e, maxBounds: s } = a;
|
|
60
60
|
let { minZoom: n } = a;
|
|
61
|
-
const i =
|
|
61
|
+
const i = u(0), r = u(o) - i;
|
|
62
62
|
if (s !== null && a.width > 0 && a.height > 0) {
|
|
63
63
|
const g = s[0][1], M = s[1][1], _ = Math.sign(g) === Math.sign(M) ? Math.min(Math.abs(g), Math.abs(M)) : 0, P = w(s[1][0] - s[0][0]) * Math.cos(_ * c), f = w(s[1][1] - s[0][1]);
|
|
64
64
|
P > 0 && (n = Math.max(n, Math.log2(a.width / P) + i)), f > 0 && (n = Math.max(n, Math.log2(a.height / f) + i)), n > e && (n = e);
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { N as
|
|
3
|
-
import { p as
|
|
1
|
+
import { c as w, a3 as F, a4 as M, a5 as B, a6 as H, a7 as $, a8 as x, a9 as E, aa as _, ab as D, ac as O } from "./index-CpFNIkOO.js";
|
|
2
|
+
import { N as P, c as C } from "./hillshade-apron-Bem3DWyJ.js";
|
|
3
|
+
import { p as N, h as R, m as Z, a as U } from "./hillshade-shader-DI2uLSNU.js";
|
|
4
4
|
const A = 64, g = /* @__PURE__ */ new Map();
|
|
5
5
|
function S(t) {
|
|
6
6
|
const e = g.get(t);
|
|
7
7
|
if (e) return e;
|
|
8
8
|
const a = D(t);
|
|
9
9
|
if (g.set(t, a), g.size > A) {
|
|
10
|
-
const
|
|
11
|
-
|
|
10
|
+
const r = g.keys().next().value;
|
|
11
|
+
r !== void 0 && g.delete(r);
|
|
12
12
|
}
|
|
13
13
|
return a;
|
|
14
14
|
}
|
|
15
|
-
function z(t, e, a,
|
|
16
|
-
return t.replace("{z}", String(
|
|
15
|
+
function z(t, e, a, r) {
|
|
16
|
+
return t.replace("{z}", String(r)).replace("{x}", String(e)).replace("{y}", String(a));
|
|
17
17
|
}
|
|
18
|
-
async function
|
|
19
|
-
const
|
|
20
|
-
if (!
|
|
21
|
-
const
|
|
22
|
-
width:
|
|
23
|
-
height:
|
|
24
|
-
at: (
|
|
25
|
-
const h = (
|
|
26
|
-
return O(e,
|
|
18
|
+
async function I(t, e, a) {
|
|
19
|
+
const r = await S(z(t, a.x, a.y, a.z));
|
|
20
|
+
if (!r) return null;
|
|
21
|
+
const c = (i) => ({
|
|
22
|
+
width: i.width,
|
|
23
|
+
height: i.height,
|
|
24
|
+
at: (u, s) => {
|
|
25
|
+
const h = (s * i.width + u) * 4;
|
|
26
|
+
return O(e, i.data[h], i.data[h + 1], i.data[h + 2]);
|
|
27
27
|
}
|
|
28
28
|
}), d = 2 ** a.z, p = /* @__PURE__ */ new Map();
|
|
29
29
|
return await Promise.all(
|
|
30
|
-
|
|
31
|
-
const
|
|
32
|
-
if (
|
|
33
|
-
const h = ((a.x +
|
|
34
|
-
p.set(`${
|
|
30
|
+
P.map(async ({ dx: i, dy: u }) => {
|
|
31
|
+
const s = a.y + u;
|
|
32
|
+
if (s < 0 || s >= d) return;
|
|
33
|
+
const h = ((a.x + i) % d + d) % d;
|
|
34
|
+
p.set(`${i},${u}`, await S(z(t, h, s, a.z)));
|
|
35
35
|
})
|
|
36
|
-
),
|
|
37
|
-
const
|
|
38
|
-
return
|
|
36
|
+
), C(c(r), (i, u) => {
|
|
37
|
+
const s = p.get(`${i},${u}`);
|
|
38
|
+
return s ? c(s) : null;
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
const
|
|
41
|
+
const j = {
|
|
42
42
|
blendColorSrcFactor: "dst",
|
|
43
43
|
blendColorDstFactor: "zero",
|
|
44
44
|
blendAlphaSrcFactor: "zero",
|
|
@@ -51,16 +51,16 @@ class L extends _ {
|
|
|
51
51
|
return { ...e, modules: [...e.modules, U] };
|
|
52
52
|
}
|
|
53
53
|
draw(e) {
|
|
54
|
-
const a = this.props,
|
|
55
|
-
for (const
|
|
54
|
+
const a = this.props, r = { ...a.hillshadeUniforms, hillshadeHeights: a.image };
|
|
55
|
+
for (const c of this.getModels()) c.shaderInputs.setProps({ hillshade: r });
|
|
56
56
|
super.draw(e);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
class W extends L {
|
|
60
60
|
static layerName = "WarpedHillshadeBitmapLayer";
|
|
61
61
|
_createMesh() {
|
|
62
|
-
const e = this.props, a = e._planeFrame,
|
|
63
|
-
return !a || !
|
|
62
|
+
const e = this.props, a = e._planeFrame, r = e._planeBounds;
|
|
63
|
+
return !a || !r ? super._createMesh() : E(r, a, e._subdivision ?? 1);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
function k(t, e) {
|
|
@@ -69,13 +69,13 @@ function k(t, e) {
|
|
|
69
69
|
if (t in x) return x[t];
|
|
70
70
|
try {
|
|
71
71
|
const a = JSON.parse(t);
|
|
72
|
-
if ([a?.rScaler, a?.gScaler, a?.bScaler, a?.offset].every((
|
|
72
|
+
if ([a?.rScaler, a?.gScaler, a?.bScaler, a?.offset].every((r) => typeof r == "number" && Number.isFinite(r))) return a;
|
|
73
73
|
} catch {
|
|
74
74
|
}
|
|
75
75
|
return console.warn(`[onlymapjs] HillshadeLayer: decoder="${t}" is not "terrarium", "mapbox-rgb" or {rScaler,gScaler,bScaler,offset} JSON — using terrarium.`), e;
|
|
76
76
|
}
|
|
77
77
|
function J(t) {
|
|
78
|
-
const e =
|
|
78
|
+
const e = $(t.src);
|
|
79
79
|
return e ? e.requiresKey ? (console.warn(`[onlymapjs] HillshadeLayer: src="${t.src}" needs a ${e.requiresKey} key, which this layer does not plumb — use a keyless source such as "terrarium".`), null) : {
|
|
80
80
|
template: e.elevationData,
|
|
81
81
|
decoder: typeof e.decoder == "string" ? x[e.decoder] : e.decoder,
|
|
@@ -85,7 +85,7 @@ function J(t) {
|
|
|
85
85
|
function q(t, e) {
|
|
86
86
|
return !Number.isFinite(t) || !Number.isFinite(e) || e <= 0 ? 0 : Math.max(0, Math.round(Math.log2(Math.max(1, t / e))));
|
|
87
87
|
}
|
|
88
|
-
class Y extends
|
|
88
|
+
class Y extends w {
|
|
89
89
|
static layerName = "OmHillshadeLayer";
|
|
90
90
|
static defaultProps = {
|
|
91
91
|
src: { type: "string", value: "terrarium" },
|
|
@@ -100,10 +100,20 @@ class Y extends F {
|
|
|
100
100
|
_planeFrame: { type: "object", value: null, optional: !0, compare: !1 },
|
|
101
101
|
sunDatum: { type: "string", value: "sheet" }
|
|
102
102
|
};
|
|
103
|
+
/**
|
|
104
|
+
* The plane tileset for this layer's tiles: one binding for the layer's
|
|
105
|
+
* life, re-pointed when the plane changes, because deck keeps the tile
|
|
106
|
+
* layer's first tileset whatever class a later render passes
|
|
107
|
+
* (plane-tileset.ts). Kept in state, which outlives each render's instance.
|
|
108
|
+
*/
|
|
109
|
+
planeTileset(e) {
|
|
110
|
+
const a = this.state;
|
|
111
|
+
return a.planeTileset = F.bind(a.planeTileset, e), a.planeTileset.TilesetClass;
|
|
112
|
+
}
|
|
103
113
|
renderLayers() {
|
|
104
114
|
const e = J(this.props);
|
|
105
115
|
if (!e) return null;
|
|
106
|
-
const { azimuths: a, weights:
|
|
116
|
+
const { azimuths: a, weights: r } = N(this.props.sunAzimuth, this.props.sunWeight), c = this.props.blend === "multiply", d = this.context.device, p = d?.canvasContext?.cssToDeviceRatio?.() ?? 1, i = typeof devicePixelRatio == "number" && devicePixelRatio > 0 ? devicePixelRatio : 1, u = this.state.textures, s = this.props._planeFrame ?? null, h = Math.max(1, p / i), v = this.props.sunDatum === "geographic";
|
|
107
117
|
return new M(
|
|
108
118
|
this.getSubLayerProps({ id: "tiles" }),
|
|
109
119
|
{
|
|
@@ -118,8 +128,8 @@ class Y extends F {
|
|
|
118
128
|
// `renderSubLayers` was never called — no error anywhere. The tile
|
|
119
129
|
// PYRAMID's zoom range is a different number entirely, and the plane
|
|
120
130
|
// tileset applies it to the geographic zoom it derives.
|
|
121
|
-
...
|
|
122
|
-
zoomOffset: (this.props.zoomOffset ?? 0) + q(p,
|
|
131
|
+
...s ? { TilesetClass: this.planeTileset(s), minZoom: -1 / 0 } : {},
|
|
132
|
+
zoomOffset: (this.props.zoomOffset ?? 0) + q(p, i),
|
|
123
133
|
// deck compares FUNCTION props by their update triggers, never by
|
|
124
134
|
// identity — inline closures would otherwise invalidate everything on
|
|
125
135
|
// every render. So anything a closure captures is invisible to deck
|
|
@@ -133,60 +143,62 @@ class Y extends F {
|
|
|
133
143
|
// all, because every knob below is a uniform.
|
|
134
144
|
updateTriggers: {
|
|
135
145
|
getTileData: [e.template, JSON.stringify(e.decoder)],
|
|
136
|
-
|
|
146
|
+
// The plane itself, not its code: every tile's mesh is warped for
|
|
147
|
+
// one plane, and a live switch must rebuild them (plane-tileset.ts).
|
|
148
|
+
renderSubLayers: [a.join(","), r.join(","), this.props.sunElevation, this.props.zFactor, c, v, s]
|
|
137
149
|
},
|
|
138
|
-
getTileData: async (
|
|
139
|
-
const
|
|
140
|
-
if (!
|
|
141
|
-
const l = `${
|
|
142
|
-
|
|
150
|
+
getTileData: async (o) => {
|
|
151
|
+
const n = await I(e.template, e.decoder, o.index);
|
|
152
|
+
if (!n || !d) return null;
|
|
153
|
+
const l = `${o.index.z}/${o.index.x}/${o.index.y}`;
|
|
154
|
+
u.get(l)?.destroy();
|
|
143
155
|
const m = d.createTexture({
|
|
144
|
-
data:
|
|
156
|
+
data: n.data,
|
|
145
157
|
format: "r32float",
|
|
146
|
-
width:
|
|
147
|
-
height:
|
|
158
|
+
width: n.width + 2,
|
|
159
|
+
height: n.height + 2,
|
|
148
160
|
// NEAREST, because linear filtering of a float texture needs
|
|
149
161
|
// OES_texture_float_linear, which is not universal (the same
|
|
150
162
|
// constraint raster-pipeline.ts documents).
|
|
151
163
|
sampler: { minFilter: "nearest", magFilter: "nearest", addressModeU: "clamp-to-edge", addressModeV: "clamp-to-edge" }
|
|
152
164
|
});
|
|
153
|
-
return
|
|
165
|
+
return u.set(l, m), { texture: m, width: n.width, height: n.height, key: l };
|
|
154
166
|
},
|
|
155
|
-
onTileUnload: (
|
|
156
|
-
const
|
|
157
|
-
|
|
167
|
+
onTileUnload: (o) => {
|
|
168
|
+
const n = `${o.index.z}/${o.index.x}/${o.index.y}`;
|
|
169
|
+
u.get(n)?.destroy(), u.delete(n);
|
|
158
170
|
},
|
|
159
|
-
renderSubLayers: (
|
|
160
|
-
const
|
|
161
|
-
if (!
|
|
162
|
-
const l =
|
|
163
|
-
return new
|
|
164
|
-
id: `${
|
|
171
|
+
renderSubLayers: (o) => {
|
|
172
|
+
const n = o.data;
|
|
173
|
+
if (!n) return null;
|
|
174
|
+
const l = o.tile, [[m, f], [b, y]] = s && l.lngLatBbox ? [[l.lngLatBbox.west, l.lngLatBbox.south], [l.lngLatBbox.east, l.lngLatBbox.north]] : l.boundingBox, T = s ? W : L;
|
|
175
|
+
return new T(o, {
|
|
176
|
+
id: `${o.id}-bitmap`,
|
|
165
177
|
data: void 0,
|
|
166
|
-
image:
|
|
178
|
+
image: n.texture,
|
|
167
179
|
bounds: [m, f, b, y],
|
|
168
|
-
_planeFrame:
|
|
169
|
-
_planeBounds:
|
|
170
|
-
_subdivision:
|
|
171
|
-
multiply:
|
|
172
|
-
parameters:
|
|
180
|
+
_planeFrame: s,
|
|
181
|
+
_planeBounds: s ? { west: m, south: f, east: b, north: y } : void 0,
|
|
182
|
+
_subdivision: s ? H(l.index.z, h) : 1,
|
|
183
|
+
multiply: c,
|
|
184
|
+
parameters: c ? j : {},
|
|
173
185
|
hillshadeUniforms: R({
|
|
174
|
-
width:
|
|
175
|
-
height:
|
|
176
|
-
azimuthOffset:
|
|
186
|
+
width: n.width,
|
|
187
|
+
height: n.height,
|
|
188
|
+
azimuthOffset: s && !v ? B(s, [(m + b) / 2, (y + f) / 2]) : 0,
|
|
177
189
|
// Web Mercator: one scale for both axes, stated at the equator
|
|
178
190
|
// and given its cos-phi falloff per fragment by the shader.
|
|
179
|
-
...Z(l.index.z,
|
|
191
|
+
...Z(l.index.z, n.width, n.height),
|
|
180
192
|
north: y,
|
|
181
193
|
south: f,
|
|
182
194
|
azimuths: a,
|
|
183
|
-
weights:
|
|
195
|
+
weights: r,
|
|
184
196
|
sunElevation: this.props.sunElevation ?? 45,
|
|
185
197
|
zFactor: this.props.zFactor ?? 1,
|
|
186
198
|
// This layer's texture IS the heightfield, so there is no
|
|
187
199
|
// sampled colour to multiply into — a multiply-blended tile emits
|
|
188
200
|
// the shade and lets the GL blend put it in the framebuffer.
|
|
189
|
-
composite:
|
|
201
|
+
composite: c ? "framebuffer" : !1
|
|
190
202
|
})
|
|
191
203
|
});
|
|
192
204
|
}
|
|
@@ -203,7 +215,7 @@ class Y extends F {
|
|
|
203
215
|
}
|
|
204
216
|
export {
|
|
205
217
|
Y as OmHillshadeLayer,
|
|
206
|
-
|
|
218
|
+
I as buildPaddedHeights,
|
|
207
219
|
q as captureZoomOffset,
|
|
208
220
|
J as resolveHillshadeSource
|
|
209
221
|
};
|
package/dist/hillshade.d.ts
CHANGED
|
@@ -157,6 +157,13 @@ export declare class OmHillshadeLayer extends CompositeLayer<OmHillshadeLayerPro
|
|
|
157
157
|
value: string;
|
|
158
158
|
};
|
|
159
159
|
};
|
|
160
|
+
/**
|
|
161
|
+
* The plane tileset for this layer's tiles: one binding for the layer's
|
|
162
|
+
* life, re-pointed when the plane changes, because deck keeps the tile
|
|
163
|
+
* layer's first tileset whatever class a later render passes
|
|
164
|
+
* (plane-tileset.ts). Kept in state, which outlives each render's instance.
|
|
165
|
+
*/
|
|
166
|
+
private planeTileset;
|
|
160
167
|
renderLayers(): Layer | null;
|
|
161
168
|
initializeState(): void;
|
|
162
169
|
finalizeState(): void;
|
package/dist/html-data.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ interface TagData {
|
|
|
15
15
|
}[];
|
|
16
16
|
}
|
|
17
17
|
/** Hand-authored action list — validated against hasAction() in html-data.test.ts. */
|
|
18
|
-
export declare const BUILTIN_ACTIONS: readonly ["toggle-layer", "set-pickable", "set-layer-attribute", "expand-cluster", "zoom-in", "zoom-out", "filter-layer", "highlight-feature", "fade", "pulse", "populate", "trace", "story-play", "story-pause", "story-seek", "fly-to", "zoom-to-feature", "show-overlay", "hide-overlay", "show-tooltip", "hide-tooltip", "draw-mode", "draw-commit", "draw-cancel", "draw-delete", "draw-clear", "draw-config", "draw-save", "export-region-3d", "measure-mode", "measure-clear", "measure-units", "set-basemap", "set-projection", "set-effect", "set-lighting", "set-terrain", "set-clip-box", "clip-box-edit", "set-widgets-visible", "undo", "redo", "warm-tiles"];
|
|
18
|
+
export declare const BUILTIN_ACTIONS: readonly ["toggle-layer", "set-pickable", "set-layer-attribute", "expand-cluster", "zoom-in", "zoom-out", "filter-layer", "highlight-feature", "fade", "pulse", "populate", "trace", "story-play", "story-pause", "story-seek", "fly-to", "zoom-to-feature", "show-overlay", "hide-overlay", "show-tooltip", "hide-tooltip", "draw-mode", "draw-commit", "draw-cancel", "draw-delete", "draw-clear", "draw-config", "draw-save", "export-region-3d", "measure-mode", "measure-clear", "measure-units", "set-basemap", "set-projection", "set-crs", "set-effect", "set-lighting", "set-terrain", "set-clip-box", "clip-box-edit", "set-widgets-visible", "undo", "redo", "warm-tiles"];
|
|
19
19
|
/** Hand-authored widget types — validated against the widget registry in html-data.test.ts.
|
|
20
20
|
* Declared in `widget-types.ts` so the runtime validator can use it without
|
|
21
21
|
* pulling this 42 KB table into the bundle. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as t, a as o, b as i, C as l, c as p, d as n, D as _, e as c, f as g, F as h, L as m, g as L, h as y, i as f, j as w, M as S, k as V, O as b, l as C, m as E, P as I, T as P, n as T, o as M, U as d, V as A, p as O, q as u, W as N, r as k, s as x, t as D, u as G, G as R, v as j, w as W, x as q, y as v, z, B as F, E as U, H as Y, I as B, J as H, K as J, N as K, Q, R as X, S as Z, X as $, Y as aa, Z as sa, _ as ea, $ as ra, a0 as ta, a1 as oa, a2 as ia } from "./index-
|
|
2
|
-
import { P as s } from "./post-process-effect-
|
|
3
|
-
import { G as pa, a as na } from "./globe-view-
|
|
1
|
+
import { A as t, a as o, b as i, C as l, c as p, d as n, D as _, e as c, f as g, F as h, L as m, g as L, h as y, i as f, j as w, M as S, k as V, O as b, l as C, m as E, P as I, T as P, n as T, o as M, U as d, V as A, p as O, q as u, W as N, r as k, s as x, t as D, u as G, G as R, v as j, w as W, x as q, y as v, z, B as F, E as U, H as Y, I as B, J as H, K as J, N as K, Q, R as X, S as Z, X as $, Y as aa, Z as sa, _ as ea, $ as ra, a0 as ta, a1 as oa, a2 as ia } from "./index-CpFNIkOO.js";
|
|
2
|
+
import { P as s } from "./post-process-effect-C3P9VwC9.js";
|
|
3
|
+
import { G as pa, a as na } from "./globe-view-Xelgj_KW.js";
|
|
4
4
|
export {
|
|
5
5
|
t as AmbientLight,
|
|
6
6
|
o as Attribute,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { aU as E, aV as x, aW as R, aX as W, aY as h, aZ as w, a_ as N, a$ as O, b0 as S, b1 as B, b2 as I, b3 as _, b4 as z, b5 as k, b6 as P, b7 as $, b8 as C, b9 as F, ba as v, bb as U, bc as b, bd as M } from "./index-CpFNIkOO.js";
|
|
2
|
+
import { be as Pe, bf as $e, bg as Ce, bh as ve, bi as Ue, bj as Me, bk as je, bl as De, bm as qe, bn as Je, bo as Ve, bp as Ge, bq as He, br as Xe, bs as Ye, bt as Ze, bu as Ke, bv as Qe, bw as et, bx as tt, by as nt, bz as rt, bA as at, bB as st, bC as ot } from "./index-CpFNIkOO.js";
|
|
3
3
|
import { g as j, i as D } from "./table-accessors-CYWTzpQI.js";
|
|
4
4
|
async function q(t, e, n = {}, r = {}) {
|
|
5
|
-
const a =
|
|
6
|
-
o || (c.url =
|
|
5
|
+
const a = E(t), s = x.getWorkerFarm(n), { source: o } = n, c = { name: a, source: o };
|
|
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
|
|
@@ -38,7 +38,7 @@ async function J(t, e, n, r) {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
function V(t, e) {
|
|
41
|
-
if (!
|
|
41
|
+
if (!x.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);
|
|
@@ -53,7 +53,7 @@ async function* we(t) {
|
|
|
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* be(t) {
|
|
57
57
|
let e = "";
|
|
58
58
|
for await (const n of t) {
|
|
59
59
|
e += n;
|
|
@@ -66,7 +66,7 @@ async function* pe(t) {
|
|
|
66
66
|
}
|
|
67
67
|
e.length > 0 && (yield e);
|
|
68
68
|
}
|
|
69
|
-
async function*
|
|
69
|
+
async function* pe(t) {
|
|
70
70
|
let e = 1;
|
|
71
71
|
for await (const n of t)
|
|
72
72
|
yield { counter: e, line: n }, e++;
|
|
@@ -82,11 +82,11 @@ const G = "4.4.3", ge = {
|
|
|
82
82
|
mimeTypes: ["application/json"],
|
|
83
83
|
category: "json",
|
|
84
84
|
text: !0,
|
|
85
|
-
parseTextSync:
|
|
86
|
-
parse: async (t) =>
|
|
85
|
+
parseTextSync: p,
|
|
86
|
+
parse: async (t) => p(new TextDecoder().decode(t)),
|
|
87
87
|
options: {}
|
|
88
88
|
};
|
|
89
|
-
function
|
|
89
|
+
function p(t) {
|
|
90
90
|
return JSON.parse(t);
|
|
91
91
|
}
|
|
92
92
|
class H {
|
|
@@ -111,7 +111,7 @@ class H {
|
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
const f = new Error("Not implemented");
|
|
114
|
-
class
|
|
114
|
+
class X {
|
|
115
115
|
handle;
|
|
116
116
|
size = 0;
|
|
117
117
|
bigsize = 0n;
|
|
@@ -148,44 +148,44 @@ class Q {
|
|
|
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 Y(r);
|
|
152
152
|
}
|
|
153
|
-
async function
|
|
153
|
+
async function Y(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
|
-
function
|
|
159
|
+
function xe(t, e, n, r) {
|
|
160
160
|
!Array.isArray(e) && !w(e) && (r = void 0, n = e, e = void 0), n = n || {};
|
|
161
161
|
const s = N(e, r), o = O(t, s, n);
|
|
162
162
|
if (!o)
|
|
163
163
|
return null;
|
|
164
|
-
const c =
|
|
164
|
+
const c = S(n, o, s), i = B(t), u = () => {
|
|
165
165
|
throw new Error("parseSync called parse (which is async");
|
|
166
166
|
};
|
|
167
|
-
return r =
|
|
167
|
+
return r = I({ url: i, _parseSync: u, _parse: u, loaders: e }, c, r || null), Z(o, t, c, r);
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function Z(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
|
|
176
|
+
function K(t) {
|
|
177
177
|
return { ...t, length: j(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) && !w(e) && (r = void 0, n = e, e = void 0), t = await t, n = n || {};
|
|
182
|
-
const s =
|
|
182
|
+
const s = B(t), o = await z(t, e, n);
|
|
183
183
|
if (!o)
|
|
184
184
|
return [];
|
|
185
|
-
const c =
|
|
186
|
-
return r =
|
|
185
|
+
const c = S(n, o, a, s);
|
|
186
|
+
return r = I({ url: s, _parseInBatches: l, _parse: k, loaders: a }, c, r || null), await Q(o, t, c, r);
|
|
187
187
|
}
|
|
188
|
-
async function
|
|
188
|
+
async function Q(t, e, n, r) {
|
|
189
189
|
const a = await ee(t, e, n, r);
|
|
190
190
|
if (!n?.core?.metadata)
|
|
191
191
|
return a;
|
|
@@ -206,11 +206,11 @@ async function K(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 P(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) {
|
|
213
|
-
const a = await
|
|
213
|
+
const a = await $(t), s = await k(
|
|
214
214
|
a,
|
|
215
215
|
e,
|
|
216
216
|
// TODO - Hack: supply loaders MIME type to ensure we match it
|
|
@@ -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 = D(t) ?
|
|
223
|
+
const n = D(t) ? K(t) : {
|
|
224
224
|
shape: "unknown",
|
|
225
225
|
batchType: "data",
|
|
226
226
|
data: t,
|
|
@@ -234,10 +234,10 @@ async function re(t, e = []) {
|
|
|
234
234
|
n = r(n);
|
|
235
235
|
return n;
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function Se(t, e, n, r) {
|
|
238
238
|
let a;
|
|
239
239
|
!Array.isArray(e) && !w(e) ? (n = e, a = void 0) : a = e;
|
|
240
|
-
const s =
|
|
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
|
}
|
|
243
243
|
async function g(t, e, n, r) {
|
|
@@ -258,11 +258,11 @@ async function ae(t, e, n) {
|
|
|
258
258
|
const r = se(t, e, n), a = [];
|
|
259
259
|
for await (const s of r)
|
|
260
260
|
a.push(s);
|
|
261
|
-
return
|
|
261
|
+
return v(...a);
|
|
262
262
|
}
|
|
263
263
|
throw new Error("Writer could not encode data");
|
|
264
264
|
}
|
|
265
|
-
async function
|
|
265
|
+
async function Be(t, e, n) {
|
|
266
266
|
if (e.text && e.encodeText)
|
|
267
267
|
return await e.encodeText(t, n);
|
|
268
268
|
if (e.text) {
|
|
@@ -281,7 +281,7 @@ function se(t, e, n) {
|
|
|
281
281
|
function oe(t) {
|
|
282
282
|
return [{ ...t, start: 0, end: t.length }];
|
|
283
283
|
}
|
|
284
|
-
async function
|
|
284
|
+
async function Ie(t, e, n) {
|
|
285
285
|
const a = { ...U(), ...n };
|
|
286
286
|
return e.encodeURLtoURL ? ue(e, t, a) : V(e, a) ? await q(e, t, a) : await e.encode(t, a);
|
|
287
287
|
}
|
|
@@ -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 = b(t), e = b(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 X(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
|
}
|
|
@@ -357,7 +357,7 @@ function le(t, e) {
|
|
|
357
357
|
return n;
|
|
358
358
|
return null;
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function Ee(t, e) {
|
|
361
361
|
if (globalThis.loaders.makeNodeStream)
|
|
362
362
|
return globalThis.loaders.makeNodeStream(t, e);
|
|
363
363
|
const n = t[Symbol.asyncIterator] ? t[Symbol.asyncIterator]() : t[Symbol.iterator]();
|
|
@@ -388,7 +388,7 @@ function Re(t, e) {
|
|
|
388
388
|
}
|
|
389
389
|
);
|
|
390
390
|
}
|
|
391
|
-
const L = "4.4.3",
|
|
391
|
+
const L = "4.4.3", Re = {
|
|
392
392
|
dataType: null,
|
|
393
393
|
batchType: null,
|
|
394
394
|
name: "Null loader",
|
|
@@ -534,24 +534,24 @@ class Oe {
|
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
536
|
export {
|
|
537
|
-
|
|
537
|
+
Pe as FetchError,
|
|
538
538
|
ge as JSONLoader,
|
|
539
539
|
We as NullLoader,
|
|
540
|
-
|
|
541
|
-
|
|
540
|
+
Re as NullWorkerLoader,
|
|
541
|
+
$e as RequestScheduler,
|
|
542
542
|
Oe as _BrowserFileSystem,
|
|
543
543
|
Ne as _fetchProgress,
|
|
544
544
|
Ae as _selectSource,
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
545
|
+
Ce as _unregisterLoaders,
|
|
546
|
+
ve as assert,
|
|
547
|
+
$ as concatenateArrayBuffersAsync,
|
|
548
548
|
Ue as createDataSource,
|
|
549
549
|
Me as document,
|
|
550
|
-
|
|
550
|
+
Ie as encode,
|
|
551
551
|
Le as encodeInBatches,
|
|
552
552
|
ce as encodeSync,
|
|
553
553
|
ae as encodeTable,
|
|
554
|
-
|
|
554
|
+
Be as encodeTableAsText,
|
|
555
555
|
se as encodeTableInBatches,
|
|
556
556
|
ke as encodeText,
|
|
557
557
|
Fe as encodeTextSync,
|
|
@@ -566,26 +566,26 @@ export {
|
|
|
566
566
|
Ve as isIterable,
|
|
567
567
|
Ge as isIterator,
|
|
568
568
|
He as isPromise,
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
569
|
+
Xe as isPureObject,
|
|
570
|
+
Ye as isReadableStream,
|
|
571
|
+
Ze as isResponse,
|
|
572
|
+
Ke as isWorker,
|
|
573
|
+
Qe as isWritableStream,
|
|
574
574
|
et as load,
|
|
575
|
-
|
|
575
|
+
Se as loadInBatches,
|
|
576
576
|
tt as makeIterator,
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
577
|
+
be as makeLineIterator,
|
|
578
|
+
pe as makeNumberedLineIterator,
|
|
579
|
+
Ee as makeStream,
|
|
580
580
|
me as makeTextDecoderIterator,
|
|
581
581
|
we 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
|
-
|
|
588
|
-
|
|
587
|
+
b as resolvePath,
|
|
588
|
+
z as selectLoader,
|
|
589
589
|
O as selectLoaderSync,
|
|
590
590
|
rt as self,
|
|
591
591
|
at as setLoaderOptions,
|