@urban-toolkit/autk-grammar 4.0.0 → 4.1.0
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/README.md +13 -1
- package/dist/autk-grammar.js +322 -310
- package/dist/autk-grammar.js.map +1 -1
- package/dist/autk-grammar.umd.cjs +2 -2
- package/dist/autk-grammar.umd.cjs.map +1 -1
- package/dist/index.d.ts +10 -0
- package/package.json +6 -6
package/dist/autk-grammar.js
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
import { AutkDb as
|
|
2
|
-
import { AutkMap as
|
|
3
|
-
import { AutkPlot as
|
|
4
|
-
import { ColorMapDomainStrategy as
|
|
5
|
-
import { AutkComputeEngine as
|
|
6
|
-
function
|
|
1
|
+
import { AutkDb as $, DEFAULT_WORKSPACE_COORDINATE_FORMAT as O } from "@urban-toolkit/autk-db";
|
|
2
|
+
import { AutkMap as Y, MapEvent as L } from "@urban-toolkit/autk-map";
|
|
3
|
+
import { AutkPlot as H, PlotEvent as w } from "@urban-toolkit/autk-plot";
|
|
4
|
+
import { ColorMapDomainStrategy as S } from "@urban-toolkit/autk-core";
|
|
5
|
+
import { AutkComputeEngine as V } from "@urban-toolkit/autk-compute";
|
|
6
|
+
function k(t) {
|
|
7
7
|
const { spec: e, adapters: r } = t;
|
|
8
|
-
let
|
|
8
|
+
let o;
|
|
9
9
|
async function s() {
|
|
10
|
-
let
|
|
10
|
+
let u;
|
|
11
11
|
if (e.data)
|
|
12
|
-
for (const
|
|
13
|
-
|
|
12
|
+
for (const i of e.data)
|
|
13
|
+
u = await r.db.resolveSource(u, i);
|
|
14
14
|
if (e.compute)
|
|
15
|
-
for (const
|
|
16
|
-
|
|
15
|
+
for (const i of e.compute)
|
|
16
|
+
u = await r.compute.resolveCompute(u, i);
|
|
17
17
|
if (e.map)
|
|
18
18
|
if (Array.isArray(e.map))
|
|
19
|
-
for (let
|
|
20
|
-
let
|
|
21
|
-
await r.map.resolveMap(
|
|
19
|
+
for (let i = 0; i < e.map.length; i++) {
|
|
20
|
+
let l = e.map[i];
|
|
21
|
+
await r.map.resolveMap(u, l, i);
|
|
22
22
|
}
|
|
23
23
|
else
|
|
24
|
-
await r.map.resolveMap(
|
|
24
|
+
await r.map.resolveMap(u, e.map);
|
|
25
25
|
if (e.plot)
|
|
26
26
|
if (Array.isArray(e.plot))
|
|
27
|
-
for (const
|
|
28
|
-
await r.plot.resolvePlot(
|
|
27
|
+
for (const i of e.plot)
|
|
28
|
+
await r.plot.resolvePlot(u, i);
|
|
29
29
|
else
|
|
30
|
-
await r.plot.resolvePlot(
|
|
31
|
-
|
|
30
|
+
await r.plot.resolvePlot(u, e.plot);
|
|
31
|
+
o = u;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
return console.log("Spec to update",
|
|
35
|
-
|
|
33
|
+
function a(u) {
|
|
34
|
+
return console.log("Spec to update", u), new Promise((i) => {
|
|
35
|
+
i();
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function n() {
|
|
39
39
|
console.log("Function not implemented yet");
|
|
40
40
|
}
|
|
41
|
-
return { run: s, updatedSpec:
|
|
42
|
-
return
|
|
41
|
+
return { run: s, updatedSpec: a, destroy: n, get context() {
|
|
42
|
+
return o;
|
|
43
43
|
} };
|
|
44
44
|
}
|
|
45
|
-
var
|
|
46
|
-
function
|
|
45
|
+
var W = /* @__PURE__ */ ((t) => (t.CAT_ACCENT = "schemeAccent", t.CAT_DARK2 = "schemeDark2", t.CAT_CATEGORY10 = "schemeCategory10", t.CAT_OBSERVABLE10 = "schemeObservable10", t.CAT_PAIRED = "schemePaired", t.CAT_PASTEL1 = "schemePastel1", t.CAT_PASTEL2 = "schemePastel2", t.CAT_SET1 = "schemeSet1", t.CAT_SET2 = "schemeSet2", t.CAT_SET3 = "schemeSet3", t.CAT_TABLEAU10 = "schemeTableau10", t.SEQ_REDS = "interpolateReds", t.SEQ_BLUES = "interpolateBlues", t.SEQ_GREENS = "interpolateGreens", t.SEQ_GREYS = "interpolateGreys", t.SEQ_ORANGES = "interpolateOranges", t.SEQ_PURPLES = "interpolatePurples", t.SEQ_TURBO = "interpolateTurbo", t.SEQ_VIRIDIS = "interpolateViridis", t.SEQ_INFERNO = "interpolateInferno", t.SEQ_MAGMA = "interpolateMagma", t.SEQ_PLASMA = "interpolatePlasma", t.SEQ_CIVIDIS = "interpolateCividis", t.SEQ_WARM = "interpolateWarm", t.SEQ_COOL = "interpolateCool", t.SEQ_CUBEHELIX_DEFAULT = "interpolateCubehelixDefault", t.SEQ_BU_GN = "interpolateBuGn", t.SEQ_BU_PU = "interpolateBuPu", t.SEQ_GN_BU = "interpolateGnBu", t.SEQ_OR_RD = "interpolateOrRd", t.SEQ_PU_BU_GN = "interpolatePuBuGn", t.SEQ_PU_BU = "interpolatePuBu", t.SEQ_PU_RD = "interpolatePuRd", t.SEQ_RD_PU = "interpolateRdPu", t.SEQ_YL_GN_BU = "interpolateYlGnBu", t.SEQ_YL_GN = "interpolateYlGn", t.SEQ_YL_OR_BR = "interpolateYlOrBr", t.SEQ_YL_OR_RD = "interpolateYlOrRd", t.DIV_BR_BG = "interpolateBrBG", t.DIV_PR_GN = "interpolatePRGn", t.DIV_PI_YG = "interpolatePiYG", t.DIV_PU_OR = "interpolatePuOr", t.DIV_RED_BLUE = "interpolateRdBu", t.DIV_RED_GREY = "interpolateRdGy", t.DIV_RED_YELLOW_BLUE = "interpolateRdYlBu", t.DIV_RED_YELLOW_GREEN = "interpolateRdYlGn", t.DIV_SPECTRAL = "interpolateSpectral", t))(W || {}), G = /* @__PURE__ */ ((t) => (t.MIN_MAX = "minMax", t.PERCENTILE = "percentile", t))(G || {});
|
|
46
|
+
function J(t) {
|
|
47
47
|
const { autoLoadLayers: e, ...r } = t;
|
|
48
48
|
return { ...r, autoLoadLayers: { layers: e?.layers ?? [] } };
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
function r(
|
|
50
|
+
function K(t, e) {
|
|
51
|
+
function r(o, s) {
|
|
52
52
|
if (!s || !s.db)
|
|
53
53
|
return;
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
for (const
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
const a = document.getElementById(s.db);
|
|
55
|
+
if (a) {
|
|
56
|
+
const n = o.getTablesMetadata();
|
|
57
|
+
a.innerHTML += "<ul>";
|
|
58
|
+
for (const u of n)
|
|
59
|
+
a.innerHTML += `<li>${u.name}: (${u.source}, ${u.type}) </li>`;
|
|
60
|
+
a.innerHTML += "</ul>", a.innerHTML += `<p>Number of tables: ${n.length}</p>`;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
return {
|
|
64
|
-
async resolveSource(
|
|
65
|
-
let
|
|
66
|
-
|
|
67
|
-
let { type:
|
|
68
|
-
switch (
|
|
64
|
+
async resolveSource(o, s) {
|
|
65
|
+
let a = o;
|
|
66
|
+
a || (a = new $(), await a.init());
|
|
67
|
+
let { type: n, ...u } = s;
|
|
68
|
+
switch (n) {
|
|
69
69
|
case "osm":
|
|
70
|
-
return await
|
|
70
|
+
return await a.loadOsm(J(u)), r(a, t), a;
|
|
71
71
|
case "csv":
|
|
72
|
-
return await
|
|
72
|
+
return await a.loadCsv(u), r(a, t), a;
|
|
73
73
|
case "json":
|
|
74
|
-
return await
|
|
74
|
+
return await a.loadJson(u), r(a, t), a;
|
|
75
75
|
case "geojson": {
|
|
76
|
-
const
|
|
77
|
-
let
|
|
78
|
-
|
|
79
|
-
const c =
|
|
80
|
-
const f = { ...
|
|
76
|
+
const i = u;
|
|
77
|
+
let l;
|
|
78
|
+
i.geojsonFileUrl ? l = await (await fetch(i.geojsonFileUrl)).json() : l = i.geojsonObject, e && l && e.set(i.outputTableName, l);
|
|
79
|
+
const c = l ? (() => {
|
|
80
|
+
const f = { ...i, geojsonObject: l };
|
|
81
81
|
return delete f.geojsonFileUrl, f;
|
|
82
|
-
})() :
|
|
82
|
+
})() : i;
|
|
83
83
|
try {
|
|
84
|
-
await
|
|
84
|
+
await a.loadGeojson(c);
|
|
85
85
|
} catch (f) {
|
|
86
86
|
const p = c.coordinateFormat ? `coordinateFormat is set to "${c.coordinateFormat}"` : "no coordinateFormat was specified — defaulting to EPSG:4326 (WGS84 per RFC 7946)";
|
|
87
87
|
throw new Error(
|
|
@@ -89,38 +89,38 @@ function J(t, e) {
|
|
|
89
89
|
);
|
|
90
90
|
}
|
|
91
91
|
try {
|
|
92
|
-
const f = await
|
|
92
|
+
const f = await a.getBoundingBoxFromLayer(c.outputTableName), p = 25e6;
|
|
93
93
|
if (!isFinite(f.minLon) || !isFinite(f.minLat) || !isFinite(f.maxLon) || !isFinite(f.maxLat) || Math.abs(f.minLon) > p || Math.abs(f.maxLon) > p || Math.abs(f.minLat) > p || Math.abs(f.maxLat) > p)
|
|
94
94
|
throw new Error(
|
|
95
|
-
`Geometry bounding box after transform is invalid for layer "${c.outputTableName}" (bbox: [${f.minLon}, ${f.minLat}, ${f.maxLon}, ${f.maxLat}]). Verify that coordinateFormat matches the actual CRS of the input data. The workspace uses ${
|
|
95
|
+
`Geometry bounding box after transform is invalid for layer "${c.outputTableName}" (bbox: [${f.minLon}, ${f.minLat}, ${f.maxLon}, ${f.maxLat}]). Verify that coordinateFormat matches the actual CRS of the input data. The workspace uses ${O}; input is expected in EPSG:4326 by default.`
|
|
96
96
|
);
|
|
97
97
|
} catch (f) {
|
|
98
98
|
if (f instanceof Error && f.message.includes("bounding box after transform")) throw f;
|
|
99
99
|
}
|
|
100
|
-
return r(
|
|
100
|
+
return r(a, t), a;
|
|
101
101
|
}
|
|
102
102
|
case "heatmap": {
|
|
103
|
-
const
|
|
104
|
-
return await
|
|
105
|
-
tableJoinName:
|
|
106
|
-
near: { distance:
|
|
107
|
-
outputTableName:
|
|
108
|
-
grid:
|
|
109
|
-
...
|
|
110
|
-
}), r(
|
|
103
|
+
const i = u;
|
|
104
|
+
return await a.buildHeatmap({
|
|
105
|
+
tableJoinName: i.tableJoinName,
|
|
106
|
+
near: { distance: i.near.distance },
|
|
107
|
+
outputTableName: i.outputTableName,
|
|
108
|
+
grid: i.grid,
|
|
109
|
+
...i.groupBy && { groupBy: i.groupBy }
|
|
110
|
+
}), r(a, t), a;
|
|
111
111
|
}
|
|
112
112
|
case "join": {
|
|
113
|
-
const
|
|
114
|
-
if (await
|
|
115
|
-
tableRootName:
|
|
116
|
-
tableJoinName:
|
|
117
|
-
...
|
|
118
|
-
...
|
|
113
|
+
const i = u;
|
|
114
|
+
if (await a.spatialQuery({
|
|
115
|
+
tableRootName: i.tableRootName,
|
|
116
|
+
tableJoinName: i.tableJoinName,
|
|
117
|
+
...i.near && { near: i.near },
|
|
118
|
+
...i.groupBy && { groupBy: i.groupBy }
|
|
119
119
|
}), e) {
|
|
120
|
-
const
|
|
121
|
-
e.set(
|
|
120
|
+
const l = await a.getLayer(i.tableRootName);
|
|
121
|
+
e.set(i.tableRootName, l);
|
|
122
122
|
}
|
|
123
|
-
return r(
|
|
123
|
+
return r(a, t), a;
|
|
124
124
|
}
|
|
125
125
|
default:
|
|
126
126
|
return;
|
|
@@ -128,85 +128,85 @@ function J(t, e) {
|
|
|
128
128
|
}
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
|
-
function
|
|
132
|
-
return e && e.length > 0 ? { type:
|
|
133
|
-
type:
|
|
131
|
+
function X(t, e) {
|
|
132
|
+
return e && e.length > 0 ? { type: S.USER, params: e } : t?.mode === G.PERCENTILE ? t.lowerPercentile !== void 0 || t.upperPercentile !== void 0 ? {
|
|
133
|
+
type: S.PERCENTILE,
|
|
134
134
|
params: [t.lowerPercentile ?? 0, t.upperPercentile ?? 100]
|
|
135
|
-
} : { type:
|
|
135
|
+
} : { type: S.PERCENTILE } : { type: S.MIN_MAX };
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
return e.split(".").reduce((r,
|
|
137
|
+
function q(t, e) {
|
|
138
|
+
return e.split(".").reduce((r, o) => {
|
|
139
139
|
if (!(r == null || typeof r != "object"))
|
|
140
|
-
return r[
|
|
140
|
+
return r[o];
|
|
141
141
|
}, t);
|
|
142
142
|
}
|
|
143
|
-
function
|
|
144
|
-
const
|
|
145
|
-
let
|
|
146
|
-
for (let
|
|
147
|
-
o[
|
|
148
|
-
return o[
|
|
149
|
-
}
|
|
150
|
-
function
|
|
151
|
-
const
|
|
152
|
-
return
|
|
153
|
-
}
|
|
154
|
-
function
|
|
155
|
-
async function a
|
|
156
|
-
let
|
|
157
|
-
for (const
|
|
158
|
-
|
|
159
|
-
for (const
|
|
160
|
-
const
|
|
161
|
-
...
|
|
162
|
-
features: (
|
|
143
|
+
function z(t, e, r) {
|
|
144
|
+
const o = e.split("."), s = { ...t };
|
|
145
|
+
let a = s;
|
|
146
|
+
for (let n = 0; n < o.length - 1; n++)
|
|
147
|
+
a[o[n]] = { ...a[o[n]] ?? {} }, a = a[o[n]];
|
|
148
|
+
return a[o[o.length - 1]] = r, s;
|
|
149
|
+
}
|
|
150
|
+
function Z(t, e) {
|
|
151
|
+
const o = t.features?.[0]?.properties?.bands ?? [];
|
|
152
|
+
return o.find((a) => a.id === e || a.label === e?.replace(/\./g, "_"))?.id ?? o[0]?.id ?? e ?? "";
|
|
153
|
+
}
|
|
154
|
+
function tt(t, e, r, o) {
|
|
155
|
+
async function s(a, n, u) {
|
|
156
|
+
let i = {};
|
|
157
|
+
for (const l of n.getTablesMetadata())
|
|
158
|
+
l.type !== void 0 && (i[l.name] = l.type);
|
|
159
|
+
for (const l of u.layerRefs) {
|
|
160
|
+
const c = l.dataRef, f = i[c], p = l.getFnv, m = r?.get(c) ?? await n.getLayer(c), d = f === "raster" ? m : {
|
|
161
|
+
...m,
|
|
162
|
+
features: (m.features ?? []).filter((_) => _.geometry != null)
|
|
163
163
|
};
|
|
164
|
-
|
|
165
|
-
const { catchAllCategory:
|
|
166
|
-
let
|
|
167
|
-
if (
|
|
168
|
-
const
|
|
169
|
-
|
|
170
|
-
...
|
|
171
|
-
features:
|
|
172
|
-
const
|
|
173
|
-
return
|
|
164
|
+
f === "raster" ? a.loadCollection(c, { collection: d, type: "raster", property: Z(d, p) }) : a.loadCollection(c, { collection: d, type: f }), l.opacity != null && a.updateRenderInfo(c, { opacity: l.opacity }), (l.isColorMap ?? (p != null && f !== "raster")) && a.updateRenderInfo(c, { isColorMap: !0 }), l.isPick && a.updateRenderInfo(c, { isPick: !0 }), l.isSkip && a.updateRenderInfo(c, { isSkip: !0 });
|
|
165
|
+
const { catchAllCategory: h, colorMapDomain: g } = l;
|
|
166
|
+
let R = d, b = g;
|
|
167
|
+
if (p && h && g?.length) {
|
|
168
|
+
const _ = new Set(g);
|
|
169
|
+
R = {
|
|
170
|
+
...d,
|
|
171
|
+
features: d.features.map((M) => {
|
|
172
|
+
const v = M.properties, P = q(v, p);
|
|
173
|
+
return P == null || !_.has(String(P)) ? { ...M, properties: z(v, p, h) } : M;
|
|
174
174
|
})
|
|
175
|
-
},
|
|
175
|
+
}, b = _.has(h) ? g : [...g, h];
|
|
176
176
|
}
|
|
177
|
-
if (
|
|
178
|
-
const
|
|
177
|
+
if (l.colorMapInterpolator) {
|
|
178
|
+
const _ = {
|
|
179
179
|
// urban-grammar ColorMapInterpolator values are string-compatible
|
|
180
180
|
// with autk-core ColorMapInterpolator at runtime
|
|
181
|
-
interpolator:
|
|
182
|
-
domainSpec:
|
|
181
|
+
interpolator: l.colorMapInterpolator,
|
|
182
|
+
domainSpec: X(l.normalization, b)
|
|
183
183
|
};
|
|
184
|
-
|
|
184
|
+
a.updateRenderInfo(c, { colormap: { config: _ }, isColorMap: !0 });
|
|
185
185
|
}
|
|
186
|
-
if (
|
|
187
|
-
const
|
|
188
|
-
|
|
186
|
+
if (p && f !== "raster") {
|
|
187
|
+
const _ = p.startsWith("properties.") ? p : `properties.${p}`;
|
|
188
|
+
a.updateThematic(c, { collection: R, property: _ });
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
return {
|
|
193
|
-
async resolveMap(
|
|
194
|
-
if (t && t.map &&
|
|
195
|
-
let
|
|
196
|
-
if (Array.isArray(t.map) ?
|
|
193
|
+
async resolveMap(a, n, u = 0) {
|
|
194
|
+
if (t && t.map && a) {
|
|
195
|
+
let i;
|
|
196
|
+
if (Array.isArray(t.map) ? i = document.getElementById(t.map[u]) : i = document.getElementById(t.map), !i)
|
|
197
197
|
throw new Error("Could not find rendering target for map: " + t.map);
|
|
198
|
-
if (!(
|
|
198
|
+
if (!(i instanceof HTMLCanvasElement))
|
|
199
199
|
throw new Error("Target for map is not a canvas: " + t.map);
|
|
200
|
-
const
|
|
201
|
-
if (
|
|
202
|
-
for (const
|
|
203
|
-
e.set(
|
|
204
|
-
|
|
200
|
+
const l = new Y(i);
|
|
201
|
+
if (n.style && l.style.setPredefinedStyle(n.style), await l.init(), await s(l, a, n), e)
|
|
202
|
+
for (const c of n.layerRefs)
|
|
203
|
+
e.set(c.dataRef, l);
|
|
204
|
+
o && (o[u] = l), l.draw();
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
};
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function et(t) {
|
|
210
210
|
return {
|
|
211
211
|
scatter: "scatterplot",
|
|
212
212
|
bar: "barchart",
|
|
@@ -217,241 +217,241 @@ function tt(t) {
|
|
|
217
217
|
heatmatrix: "heatmatrix"
|
|
218
218
|
}[t];
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function rt(t, e, r, o, s) {
|
|
221
221
|
return {
|
|
222
|
-
async resolvePlot(
|
|
222
|
+
async resolvePlot(a, n) {
|
|
223
223
|
if (!t || !t.plot) return;
|
|
224
|
-
const
|
|
225
|
-
if (!
|
|
226
|
-
const
|
|
227
|
-
if (!
|
|
228
|
-
const
|
|
229
|
-
type:
|
|
230
|
-
collection:
|
|
231
|
-
attributes: { axis:
|
|
232
|
-
labels: { axis:
|
|
224
|
+
const u = document.getElementById(t.plot);
|
|
225
|
+
if (!u) throw new Error(`Could not find plot target: ${t.plot}`);
|
|
226
|
+
const i = a;
|
|
227
|
+
if (!i) throw new Error("No data context available for plot.");
|
|
228
|
+
const l = s?.get(n.dataRef) ?? await i.getLayer(n.dataRef), c = n.events ?? [], f = new H(u, {
|
|
229
|
+
type: et(n.mark),
|
|
230
|
+
collection: l,
|
|
231
|
+
attributes: { axis: n.axis, ...n.color && { color: n.color } },
|
|
232
|
+
labels: { axis: n.axis, title: n.title },
|
|
233
233
|
events: c,
|
|
234
|
-
...
|
|
235
|
-
...
|
|
236
|
-
...
|
|
237
|
-
...
|
|
234
|
+
...n.width && { width: n.width },
|
|
235
|
+
...n.height && { height: n.height },
|
|
236
|
+
...n.margins && { margins: n.margins },
|
|
237
|
+
...n.transform && { transform: n.transform }
|
|
238
238
|
});
|
|
239
|
-
if (r?.set(
|
|
240
|
-
const p = e.get(
|
|
239
|
+
if (r?.set(n.dataRef, f), n.mapRef && o?.set(n.dataRef, n.mapRef), n.mapRef && e) {
|
|
240
|
+
const p = e.get(n.mapRef);
|
|
241
241
|
if (p) {
|
|
242
|
-
p.updateRenderInfo(
|
|
242
|
+
p.updateRenderInfo(n.mapRef, { isPick: !0 }), p.events.on(L.PICKING, ({ selection: m }) => {
|
|
243
243
|
f.setSelection(m);
|
|
244
244
|
});
|
|
245
245
|
for (const m of c)
|
|
246
|
-
f.events.on(m, ({ selection:
|
|
247
|
-
p.setHighlightedIds(
|
|
246
|
+
f.events.on(m, ({ selection: d }) => {
|
|
247
|
+
p.setHighlightedIds(n.mapRef, d);
|
|
248
248
|
});
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
252
|
};
|
|
253
253
|
}
|
|
254
|
-
const
|
|
255
|
-
function
|
|
254
|
+
const D = 134217728, at = 4, ot = 32;
|
|
255
|
+
function nt(t) {
|
|
256
256
|
return Array.isArray(t) ? t.join(`
|
|
257
257
|
`) : t;
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function E(t) {
|
|
260
260
|
return !!t && typeof t == "object" && !Array.isArray(t) && typeof t.fromFeature == "object" && t.fromFeature !== null;
|
|
261
261
|
}
|
|
262
|
-
function
|
|
262
|
+
function A(t, e) {
|
|
263
263
|
return t instanceof Map ? t.get(e) : t[e];
|
|
264
264
|
}
|
|
265
|
-
function
|
|
266
|
-
return e.split(".").reduce((r,
|
|
265
|
+
function C(t, e) {
|
|
266
|
+
return e.split(".").reduce((r, o) => {
|
|
267
267
|
if (!(r == null || typeof r != "object"))
|
|
268
|
-
return r[
|
|
268
|
+
return r[o];
|
|
269
269
|
}, t);
|
|
270
270
|
}
|
|
271
|
-
function
|
|
271
|
+
function j(t) {
|
|
272
272
|
const e = [];
|
|
273
273
|
for (const r of [t.uniforms, t.uniformMatrices])
|
|
274
|
-
for (const
|
|
275
|
-
|
|
274
|
+
for (const o of Object.values(r ?? {}))
|
|
275
|
+
E(o) && e.push(o);
|
|
276
276
|
return e;
|
|
277
277
|
}
|
|
278
|
-
function
|
|
279
|
-
return [.../* @__PURE__ */ new Set([t.dataRef, ...
|
|
278
|
+
function it(t) {
|
|
279
|
+
return [.../* @__PURE__ */ new Set([t.dataRef, ...j(t).map((e) => e.fromFeature.layer)])];
|
|
280
280
|
}
|
|
281
|
-
function
|
|
282
|
-
for (const e of
|
|
283
|
-
const { iterate: r, layer:
|
|
284
|
-
if (r === "all" || r === "batched") return { mode: r, layer:
|
|
281
|
+
function x(t) {
|
|
282
|
+
for (const e of j(t)) {
|
|
283
|
+
const { iterate: r, layer: o } = e.fromFeature;
|
|
284
|
+
if (r === "all" || r === "batched") return { mode: r, layer: o };
|
|
285
285
|
}
|
|
286
286
|
return null;
|
|
287
287
|
}
|
|
288
|
-
function
|
|
289
|
-
const
|
|
290
|
-
return
|
|
288
|
+
function U(t, e, r) {
|
|
289
|
+
const o = t.fromFeature, s = r !== void 0 && o.iterate === "all" ? r : o.index ?? 0, a = A(e, o.layer)?.features?.[s];
|
|
290
|
+
return a ? C(a, o.path) : void 0;
|
|
291
291
|
}
|
|
292
|
-
function
|
|
292
|
+
function N(t, e, r) {
|
|
293
293
|
if (!t) return;
|
|
294
|
-
const
|
|
295
|
-
for (const [s,
|
|
296
|
-
if (!
|
|
297
|
-
|
|
294
|
+
const o = {};
|
|
295
|
+
for (const [s, a] of Object.entries(t)) {
|
|
296
|
+
if (!E(a)) {
|
|
297
|
+
o[s] = a;
|
|
298
298
|
continue;
|
|
299
299
|
}
|
|
300
|
-
const
|
|
301
|
-
Number.isFinite(
|
|
300
|
+
const n = Number(U(a, e, r) ?? NaN);
|
|
301
|
+
Number.isFinite(n) ? o[s] = n : typeof a.default == "number" && (o[s] = a.default);
|
|
302
302
|
}
|
|
303
|
-
return
|
|
303
|
+
return o;
|
|
304
304
|
}
|
|
305
|
-
function
|
|
305
|
+
function I(t, e, r) {
|
|
306
306
|
if (!t) return;
|
|
307
|
-
const
|
|
308
|
-
for (const [s,
|
|
309
|
-
if (!
|
|
310
|
-
|
|
307
|
+
const o = {};
|
|
308
|
+
for (const [s, a] of Object.entries(t)) {
|
|
309
|
+
if (!E(a)) {
|
|
310
|
+
o[s] = a;
|
|
311
311
|
continue;
|
|
312
312
|
}
|
|
313
|
-
const
|
|
314
|
-
if (!
|
|
315
|
-
const
|
|
316
|
-
|
|
313
|
+
const n = U(a, e, r), u = Array.isArray(n) ? n : Array.isArray(a.default) ? a.default : void 0;
|
|
314
|
+
if (!u) continue;
|
|
315
|
+
const i = a.cols ?? (Array.isArray(u[0]) ? u[0].length : 0);
|
|
316
|
+
i > 0 ? o[s] = { data: u, cols: i } : console.warn(`[autk-grammar] uniform matrix "${s}" has no column count; entry dropped`);
|
|
317
317
|
}
|
|
318
|
-
return
|
|
318
|
+
return o;
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function st(t) {
|
|
321
321
|
return t != null && !(typeof t == "number" && !Number.isFinite(t));
|
|
322
322
|
}
|
|
323
|
-
function
|
|
324
|
-
return
|
|
323
|
+
function B(t) {
|
|
324
|
+
return E(t) && t.fromFeature.iterate === "batched";
|
|
325
325
|
}
|
|
326
|
-
function
|
|
327
|
-
return Object.values(e ?? {}).some(
|
|
326
|
+
function Q(t, e) {
|
|
327
|
+
return Object.values(e ?? {}).some(B) ? ot : Object.values(t ?? {}).some(B) ? at : 0;
|
|
328
328
|
}
|
|
329
|
-
function
|
|
330
|
-
const
|
|
331
|
-
return
|
|
329
|
+
function lt(t, e, r = D) {
|
|
330
|
+
const o = Q(t, e);
|
|
331
|
+
return o > 0 ? Math.floor(r / o) : Number.POSITIVE_INFINITY;
|
|
332
332
|
}
|
|
333
|
-
function
|
|
334
|
-
const s = {},
|
|
335
|
-
for (const
|
|
336
|
-
for (const
|
|
337
|
-
|
|
338
|
-
if (
|
|
339
|
-
const
|
|
340
|
-
r = r.filter((
|
|
333
|
+
function ut(t, e, r, o = D) {
|
|
334
|
+
const s = {}, a = {}, n = [];
|
|
335
|
+
for (const i of [t, e])
|
|
336
|
+
for (const l of Object.values(i ?? {}))
|
|
337
|
+
E(l) && l.fromFeature.iterate === "batched" && l.fromFeature.required && n.push(l.fromFeature.path);
|
|
338
|
+
if (n.length > 0) {
|
|
339
|
+
const i = r.length;
|
|
340
|
+
r = r.filter((l) => n.every((c) => st(C(l, c)))), r.length < i && console.info(`[autk-grammar] batched compute dropped ${i - r.length} feature(s) missing ${n.join(", ")}`);
|
|
341
341
|
}
|
|
342
|
-
const
|
|
343
|
-
r.length >
|
|
344
|
-
`[autk-grammar] batched compute capped at ${
|
|
345
|
-
), r = r.slice(0,
|
|
346
|
-
for (const [
|
|
347
|
-
if (
|
|
348
|
-
const c = typeof
|
|
349
|
-
|
|
350
|
-
const p = Number(
|
|
342
|
+
const u = lt(t, e, o);
|
|
343
|
+
r.length > u && (console.warn(
|
|
344
|
+
`[autk-grammar] batched compute capped at ${u} features (got ${r.length}): its largest packed array takes ${Q(t, e)} B per feature, and a storage buffer binding holds ${o} B`
|
|
345
|
+
), r = r.slice(0, u));
|
|
346
|
+
for (const [i, l] of Object.entries(t ?? {}))
|
|
347
|
+
if (E(l) && l.fromFeature.iterate === "batched") {
|
|
348
|
+
const c = typeof l.default == "number" ? l.default : void 0;
|
|
349
|
+
a[i] = r.map((f) => {
|
|
350
|
+
const p = Number(C(f, l.fromFeature.path) ?? c);
|
|
351
351
|
return Number.isFinite(p) ? p : 0;
|
|
352
352
|
});
|
|
353
|
-
} else typeof
|
|
354
|
-
for (const [
|
|
355
|
-
if (!
|
|
353
|
+
} else typeof l == "number" && (s[i] = l);
|
|
354
|
+
for (const [i, l] of Object.entries(e ?? {})) {
|
|
355
|
+
if (!E(l) || l.fromFeature.iterate !== "batched") continue;
|
|
356
356
|
const c = [];
|
|
357
357
|
for (const f of r) {
|
|
358
|
-
const p =
|
|
359
|
-
let m = 1 / 0,
|
|
358
|
+
const p = C(f, l.fromFeature.path);
|
|
359
|
+
let m = 1 / 0, d = 1 / 0, y = -1 / 0, h = -1 / 0;
|
|
360
360
|
if (Array.isArray(p))
|
|
361
|
-
for (const
|
|
362
|
-
if (!Array.isArray(
|
|
363
|
-
const R = Number(
|
|
364
|
-
!Number.isFinite(R) || !Number.isFinite(
|
|
361
|
+
for (const g of p) {
|
|
362
|
+
if (!Array.isArray(g) || g.length < 2) continue;
|
|
363
|
+
const R = Number(g[0]), b = Number(g[1]);
|
|
364
|
+
!Number.isFinite(R) || !Number.isFinite(b) || (m = Math.min(m, R), d = Math.min(d, b), y = Math.max(y, R), h = Math.max(h, b));
|
|
365
365
|
}
|
|
366
|
-
Number.isFinite(m) || (m = 0,
|
|
366
|
+
Number.isFinite(m) || (m = 0, d = 0, y = 0, h = 0), c.push(m, d, y, d, y, h, m, h);
|
|
367
367
|
}
|
|
368
|
-
|
|
368
|
+
a[i] = c;
|
|
369
369
|
}
|
|
370
|
-
return s.num_features = r.length, { uniforms: s, uniformArrays:
|
|
370
|
+
return s.num_features = r.length, { uniforms: s, uniformArrays: a };
|
|
371
371
|
}
|
|
372
|
-
function
|
|
373
|
-
const
|
|
374
|
-
if (!
|
|
372
|
+
function T(t, e, r) {
|
|
373
|
+
const o = A(e, t.dataRef);
|
|
374
|
+
if (!o) throw new Error(`compute: table "${t.dataRef}" is not loaded`);
|
|
375
375
|
const s = {
|
|
376
|
-
collection:
|
|
376
|
+
collection: o,
|
|
377
377
|
variableMapping: t.attributes,
|
|
378
|
-
wgslBody:
|
|
378
|
+
wgslBody: nt(t.wglsFunction)
|
|
379
379
|
};
|
|
380
380
|
t.attributeArrays && (s.attributeArrays = t.attributeArrays), t.attributeMatrices && (s.attributeMatrices = t.attributeMatrices), t.uniformArrays && (s.uniformArrays = t.uniformArrays), t.outputColumnName && (s.resultField = t.outputColumnName), t.outputColumns && (s.outputColumns = t.outputColumns);
|
|
381
|
-
const
|
|
382
|
-
if (
|
|
383
|
-
const
|
|
381
|
+
const a = x(t);
|
|
382
|
+
if (a?.mode === "batched") {
|
|
383
|
+
const l = A(e, a.layer)?.features ?? [], c = ut(t.uniforms, t.uniformMatrices, l), f = N(F(t.uniforms), e) ?? {}, p = I(F(t.uniformMatrices), e);
|
|
384
384
|
return s.uniforms = { ...f, ...c.uniforms }, s.uniformArrays = { ...s.uniformArrays ?? {}, ...c.uniformArrays }, p && Object.keys(p).length > 0 && (s.uniformMatrices = p), s;
|
|
385
385
|
}
|
|
386
|
-
const
|
|
387
|
-
return
|
|
386
|
+
const n = a?.mode === "all" ? r : void 0, u = N(t.uniforms, e, n), i = I(t.uniformMatrices, e, n);
|
|
387
|
+
return u && (s.uniforms = u), i && (s.uniformMatrices = i), s;
|
|
388
388
|
}
|
|
389
|
-
function
|
|
389
|
+
function F(t) {
|
|
390
390
|
if (t)
|
|
391
|
-
return Object.fromEntries(Object.entries(t).filter(([, e]) => !(
|
|
391
|
+
return Object.fromEntries(Object.entries(t).filter(([, e]) => !(E(e) && e.fromFeature.iterate === "batched")));
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function ft(t) {
|
|
394
394
|
return t.outputColumns ?? (t.outputColumnName ? [t.outputColumnName] : []);
|
|
395
395
|
}
|
|
396
|
-
async function
|
|
397
|
-
const
|
|
398
|
-
if (
|
|
399
|
-
const s =
|
|
396
|
+
async function ct(t, e, r) {
|
|
397
|
+
const o = x(t);
|
|
398
|
+
if (o?.mode !== "all") return r(T(t, e));
|
|
399
|
+
const s = A(e, t.dataRef);
|
|
400
400
|
if (!s) throw new Error(`compute: table "${t.dataRef}" is not loaded`);
|
|
401
|
-
const
|
|
402
|
-
for (const
|
|
403
|
-
const
|
|
404
|
-
for (const f of
|
|
401
|
+
const a = ft(t), n = structuredClone(s);
|
|
402
|
+
for (const i of n.features) {
|
|
403
|
+
const l = i.properties ??= {}, c = l.compute ??= {};
|
|
404
|
+
for (const f of a) c[f] = 0;
|
|
405
405
|
}
|
|
406
|
-
const
|
|
407
|
-
for (let
|
|
408
|
-
const
|
|
409
|
-
|
|
410
|
-
const p = c.properties?.compute, m =
|
|
406
|
+
const u = A(e, o.layer)?.features?.length ?? 0;
|
|
407
|
+
for (let i = 0; i < u; i++) {
|
|
408
|
+
const l = await r({ ...T(t, e, i), collection: n });
|
|
409
|
+
n.features.forEach((c, f) => {
|
|
410
|
+
const p = c.properties?.compute, m = l.features[f]?.properties?.compute;
|
|
411
411
|
if (!(!p || !m))
|
|
412
|
-
for (const
|
|
413
|
-
const
|
|
414
|
-
Number.isFinite(
|
|
412
|
+
for (const d of a) {
|
|
413
|
+
const y = Number(m[d]);
|
|
414
|
+
Number.isFinite(y) && (p[d] += y);
|
|
415
415
|
}
|
|
416
416
|
});
|
|
417
417
|
}
|
|
418
|
-
return
|
|
418
|
+
return n;
|
|
419
419
|
}
|
|
420
|
-
function
|
|
420
|
+
function pt(t) {
|
|
421
421
|
return {
|
|
422
422
|
async resolveCompute(e, r) {
|
|
423
423
|
if (e) {
|
|
424
|
-
const
|
|
425
|
-
for (const
|
|
426
|
-
const
|
|
427
|
-
if (
|
|
428
|
-
else if (
|
|
424
|
+
const o = {};
|
|
425
|
+
for (const n of it(r)) {
|
|
426
|
+
const u = t?.get(n);
|
|
427
|
+
if (u) o[n] = u;
|
|
428
|
+
else if (n === r.dataRef) o[n] = await e.getLayer(n);
|
|
429
429
|
else
|
|
430
430
|
try {
|
|
431
|
-
|
|
431
|
+
o[n] = await e.getLayer(n);
|
|
432
432
|
} catch {
|
|
433
|
-
|
|
433
|
+
o[n] = void 0;
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
const s = new
|
|
437
|
-
return t && t.set(r.dataRef,
|
|
436
|
+
const s = new V(), a = await ct(r, o, (n) => s.gpgpuPipeline(n));
|
|
437
|
+
return t && t.set(r.dataRef, a), e;
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
};
|
|
441
441
|
}
|
|
442
|
-
class
|
|
442
|
+
class mt {
|
|
443
443
|
_listeners = /* @__PURE__ */ new Map();
|
|
444
444
|
on(e, r) {
|
|
445
445
|
this._listeners.has(e) || this._listeners.set(e, /* @__PURE__ */ new Set());
|
|
446
|
-
const
|
|
447
|
-
return
|
|
446
|
+
const o = this._listeners.get(e);
|
|
447
|
+
return o.add(r), () => o.delete(r);
|
|
448
448
|
}
|
|
449
449
|
/** @internal */
|
|
450
450
|
emit(e, r) {
|
|
451
|
-
this._listeners.get(e)?.forEach((
|
|
451
|
+
this._listeners.get(e)?.forEach((o) => o(r));
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
|
-
class
|
|
454
|
+
class Et {
|
|
455
455
|
dataAdapter;
|
|
456
456
|
mapAdapter;
|
|
457
457
|
plotAdapter;
|
|
@@ -460,13 +460,14 @@ class _t {
|
|
|
460
460
|
_computeCache = /* @__PURE__ */ new Map();
|
|
461
461
|
_data = {};
|
|
462
462
|
_mapRegistry = /* @__PURE__ */ new Map();
|
|
463
|
+
_maps = [];
|
|
463
464
|
_plotRegistry = /* @__PURE__ */ new Map();
|
|
464
465
|
_fwdCleanups = [];
|
|
465
466
|
_plotMapLinks = /* @__PURE__ */ new Map();
|
|
466
|
-
interactions = new
|
|
467
|
+
interactions = new mt();
|
|
467
468
|
constructor(e) {
|
|
468
469
|
const r = /* @__PURE__ */ new Map();
|
|
469
|
-
this.dataAdapter =
|
|
470
|
+
this.dataAdapter = K(e, r), this.mapAdapter = tt(e, this._mapRegistry, this._computeCache, this._maps), this.plotAdapter = rt(e, this._mapRegistry, this._plotRegistry, this._plotMapLinks, r), this.computeAdapter = pt(this._computeCache);
|
|
470
471
|
}
|
|
471
472
|
/**
|
|
472
473
|
* The coordinate reference system used internally by the autk workspace.
|
|
@@ -477,11 +478,22 @@ class _t {
|
|
|
477
478
|
* instead of hard-coding a CRS string.
|
|
478
479
|
*/
|
|
479
480
|
get workspaceCrs() {
|
|
480
|
-
return
|
|
481
|
+
return O;
|
|
481
482
|
}
|
|
482
483
|
get data() {
|
|
483
484
|
return this._data;
|
|
484
485
|
}
|
|
486
|
+
/**
|
|
487
|
+
* The maps the last {@link run} drew, one per `map` entry of the spec, in order.
|
|
488
|
+
*
|
|
489
|
+
* Each map draws on demand: one frame once its layers are loaded, then one each
|
|
490
|
+
* time it changes. Between frames a map canvas can read back empty, so to read a
|
|
491
|
+
* map's pixels (for example with `canvas.toDataURL()`), call its `requestRender()`
|
|
492
|
+
* and read in a `requestAnimationFrame` callback registered after that call.
|
|
493
|
+
*/
|
|
494
|
+
get maps() {
|
|
495
|
+
return this._maps;
|
|
496
|
+
}
|
|
485
497
|
async run(e) {
|
|
486
498
|
if (!this.dataAdapter)
|
|
487
499
|
throw new Error("Database adapter not initialized. Please call the constructor first.");
|
|
@@ -491,7 +503,7 @@ class _t {
|
|
|
491
503
|
throw new Error("Plot adapter not initialized. Please call the constructor first.");
|
|
492
504
|
if (!this.computeAdapter)
|
|
493
505
|
throw new Error("Compute adapter not initialized. Please call the constructor first.");
|
|
494
|
-
this._mapRegistry.clear(), this._plotRegistry.clear(), this._plotMapLinks.clear(), this._computeCache.clear(), this.grammarEngine =
|
|
506
|
+
this._mapRegistry.clear(), this._maps.length = 0, this._plotRegistry.clear(), this._plotMapLinks.clear(), this._computeCache.clear(), this.grammarEngine = k({
|
|
495
507
|
spec: e,
|
|
496
508
|
adapters: {
|
|
497
509
|
db: this.dataAdapter,
|
|
@@ -505,17 +517,17 @@ class _t {
|
|
|
505
517
|
console.warn("Grammar engine produced no data context."), this._data = {};
|
|
506
518
|
return;
|
|
507
519
|
}
|
|
508
|
-
const
|
|
520
|
+
const o = {};
|
|
509
521
|
for (const s of r.getLayersMetadata())
|
|
510
|
-
Object.defineProperty(
|
|
522
|
+
Object.defineProperty(o, s.name, {
|
|
511
523
|
get: () => {
|
|
512
|
-
const
|
|
513
|
-
return
|
|
524
|
+
const a = this._computeCache.get(s.name);
|
|
525
|
+
return a ? Promise.resolve(a) : r.getLayer(s.name);
|
|
514
526
|
},
|
|
515
527
|
enumerable: !0,
|
|
516
528
|
configurable: !0
|
|
517
529
|
});
|
|
518
|
-
this._data =
|
|
530
|
+
this._data = o;
|
|
519
531
|
}
|
|
520
532
|
/**
|
|
521
533
|
* Highlights features on the map layer identified by `layerId`.
|
|
@@ -523,8 +535,8 @@ class _t {
|
|
|
523
535
|
*/
|
|
524
536
|
highlightOnMap(e, r) {
|
|
525
537
|
this._mapRegistry.get(e)?.setHighlightedIds(e, r);
|
|
526
|
-
for (const [
|
|
527
|
-
s === e && this._plotRegistry.get(
|
|
538
|
+
for (const [o, s] of this._plotMapLinks)
|
|
539
|
+
s === e && this._plotRegistry.get(o)?.setSelection(r);
|
|
528
540
|
}
|
|
529
541
|
/**
|
|
530
542
|
* Clears highlighted features on the map layer identified by `layerId`.
|
|
@@ -532,8 +544,8 @@ class _t {
|
|
|
532
544
|
*/
|
|
533
545
|
clearHighlightOnMap(e) {
|
|
534
546
|
this._mapRegistry.get(e)?.clearHighlightedIds(e);
|
|
535
|
-
for (const [r,
|
|
536
|
-
|
|
547
|
+
for (const [r, o] of this._plotMapLinks)
|
|
548
|
+
o === e && this._plotRegistry.get(r)?.setSelection([]);
|
|
537
549
|
}
|
|
538
550
|
/**
|
|
539
551
|
* Clears the selection on the plot identified by `plotId` (its dataRef).
|
|
@@ -550,50 +562,50 @@ class _t {
|
|
|
550
562
|
*/
|
|
551
563
|
setPlotSelection(e, r) {
|
|
552
564
|
this._plotRegistry.get(e)?.setSelection(r);
|
|
553
|
-
const
|
|
554
|
-
|
|
565
|
+
const o = this._plotMapLinks.get(e);
|
|
566
|
+
o && this._mapRegistry.get(o)?.setHighlightedIds(o, r);
|
|
555
567
|
}
|
|
556
568
|
_rewireInteractions() {
|
|
557
569
|
for (const r of this._fwdCleanups) r();
|
|
558
570
|
this._fwdCleanups = [];
|
|
559
571
|
const e = /* @__PURE__ */ new Set();
|
|
560
|
-
for (const [r,
|
|
561
|
-
if (e.has(
|
|
562
|
-
e.add(
|
|
563
|
-
const s = ({ selection:
|
|
564
|
-
this.interactions.emit("map:picking", { layerId: r, selection:
|
|
572
|
+
for (const [r, o] of this._mapRegistry) {
|
|
573
|
+
if (e.has(o)) continue;
|
|
574
|
+
e.add(o);
|
|
575
|
+
const s = ({ selection: a }) => {
|
|
576
|
+
this.interactions.emit("map:picking", { layerId: r, selection: a });
|
|
565
577
|
};
|
|
566
|
-
|
|
578
|
+
o.events.on(L.PICKING, s), this._fwdCleanups.push(() => o.events.off(L.PICKING, s));
|
|
567
579
|
}
|
|
568
|
-
for (const [r,
|
|
569
|
-
for (const s of [
|
|
570
|
-
const
|
|
580
|
+
for (const [r, o] of this._plotRegistry)
|
|
581
|
+
for (const s of [w.CLICK, w.BRUSH, w.BRUSH_X, w.BRUSH_Y]) {
|
|
582
|
+
const a = ({ selection: n }) => {
|
|
571
583
|
this.interactions.emit("plot:selection", {
|
|
572
584
|
plotId: r,
|
|
573
585
|
event: s,
|
|
574
|
-
selection:
|
|
586
|
+
selection: n
|
|
575
587
|
});
|
|
576
588
|
};
|
|
577
|
-
|
|
589
|
+
o.events.on(s, a), this._fwdCleanups.push(() => o.events.off(s, a));
|
|
578
590
|
}
|
|
579
591
|
}
|
|
580
592
|
}
|
|
581
593
|
export {
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
594
|
+
Et as AutkGrammar,
|
|
595
|
+
W as ColorMapInterpolator,
|
|
596
|
+
mt as GrammarEventEmitter,
|
|
597
|
+
G as NormalizationMode,
|
|
598
|
+
D as STORAGE_BUFFER_BINDING_SIZE,
|
|
599
|
+
ut as buildBatchedUniforms,
|
|
600
|
+
it as computeLayerNames,
|
|
601
|
+
k as createEngine,
|
|
602
|
+
x as findIterateSource,
|
|
603
|
+
E as isFromFeature,
|
|
604
|
+
nt as joinWgsl,
|
|
605
|
+
lt as maxBatchedFeatures,
|
|
606
|
+
T as resolveComputeParams,
|
|
607
|
+
I as resolveUniformMatrices,
|
|
608
|
+
N as resolveUniforms,
|
|
609
|
+
ct as runCompute
|
|
598
610
|
};
|
|
599
611
|
//# sourceMappingURL=autk-grammar.js.map
|