@urban-toolkit/autk-grammar 0.1.0 → 0.1.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.
@@ -1,66 +1,83 @@
1
- import { NormalizationMode as v, createEngine as R } from "@urban-toolkit/the-urban-grammar";
2
- import { ColorMapInterpolator as K, NormalizationMode as Q } from "@urban-toolkit/the-urban-grammar";
3
- import { AutkDb as C } from "@urban-toolkit/autk-db";
4
- import { AutkMap as P, MapStyle as N, ColorMapDomainStrategy as g, MapEvent as I } from "@urban-toolkit/autk-map";
5
- import { AutkPlot as j } from "@urban-toolkit/autk-plot";
6
- import { AutkComputeEngine as T } from "@urban-toolkit/autk-compute";
7
- function k(o, n) {
8
- function r(l, e) {
9
- if (!e || !e.db)
1
+ import { NormalizationMode as De, createEngine as qe } from "@urban-toolkit/the-urban-grammar";
2
+ import { ColorMapInterpolator as ga, NormalizationMode as ya } from "@urban-toolkit/the-urban-grammar";
3
+ import { AutkDb as Ge, DEFAULT_WORKSPACE_COORDINATE_FORMAT as Te } from "@urban-toolkit/autk-db";
4
+ import { AutkMap as Je, MapStyle as Ue, MapEvent as Xe } from "@urban-toolkit/autk-map";
5
+ import { AutkPlot as We } from "@urban-toolkit/autk-plot";
6
+ import { AutkComputeEngine as Ve } from "@urban-toolkit/autk-compute";
7
+ function Ke(e, f) {
8
+ function a(d, c) {
9
+ if (!c || !c.db)
10
10
  return;
11
- const t = document.getElementById(e.db);
11
+ const t = document.getElementById(c.db);
12
12
  if (t) {
13
- const u = l.tables;
13
+ const n = d.tables;
14
14
  t.innerHTML += "<ul>";
15
- for (const s of u)
16
- t.innerHTML += `<li>${s.name}: (${s.source}, ${s.type}) </li>`;
17
- t.innerHTML += "</ul>", t.innerHTML += `<p>Number of tables: ${u.length}</p>`;
15
+ for (const r of n)
16
+ t.innerHTML += `<li>${r.name}: (${r.source}, ${r.type}) </li>`;
17
+ t.innerHTML += "</ul>", t.innerHTML += `<p>Number of tables: ${n.length}</p>`;
18
18
  }
19
19
  }
20
20
  return {
21
- async resolveSource(l, e) {
22
- let t = l;
23
- t || (t = new C(), await t.init());
24
- let { type: u, ...s } = e;
25
- switch (u) {
21
+ async resolveSource(d, c) {
22
+ let t = d;
23
+ t || (t = new Ge(), await t.init());
24
+ let { type: n, ...r } = c;
25
+ switch (n) {
26
26
  case "osm":
27
- return await t.loadOsm(s), r(t, o), t;
27
+ return await t.loadOsm(r), a(t, e), t;
28
28
  case "csv":
29
- return await t.loadCsv(s), r(t, o), t;
29
+ return await t.loadCsv(r), a(t, e), t;
30
30
  case "json":
31
- return await t.loadJson(s), r(t, o), t;
31
+ return await t.loadJson(r), a(t, e), t;
32
32
  case "geojson": {
33
- const a = s;
34
- let i;
35
- if (a.geojsonFileUrl ? i = await (await fetch(a.geojsonFileUrl)).json() : i = a.geojsonObject, n && i && n.set(a.outputTableName, i), i) {
36
- const { geojsonFileUrl: f, ...p } = a;
37
- await t.loadGeojson({ ...p, geojsonObject: i });
38
- } else
39
- await t.loadGeojson(a);
40
- return r(t, o), t;
33
+ const b = r;
34
+ let l;
35
+ b.geojsonFileUrl ? l = await (await fetch(b.geojsonFileUrl)).json() : l = b.geojsonObject, f && l && f.set(b.outputTableName, l);
36
+ const u = l ? (() => {
37
+ const i = { ...b, geojsonObject: l };
38
+ return delete i.geojsonFileUrl, i;
39
+ })() : b;
40
+ try {
41
+ await t.loadGeojson(u);
42
+ } catch (i) {
43
+ const p = u.coordinateFormat ? `coordinateFormat is set to "${u.coordinateFormat}"` : "no coordinateFormat was specified — defaulting to EPSG:4326 (WGS84 per RFC 7946)";
44
+ throw new Error(
45
+ `Failed to load GeoJSON layer "${u.outputTableName}": ${i instanceof Error ? i.message : String(i)}. ${p}. Verify that coordinateFormat matches the actual CRS of the input data.`
46
+ );
47
+ }
48
+ try {
49
+ const i = await t.getBoundingBoxFromLayer(u.outputTableName), p = 25e6;
50
+ if (!isFinite(i.minLon) || !isFinite(i.minLat) || !isFinite(i.maxLon) || !isFinite(i.maxLat) || Math.abs(i.minLon) > p || Math.abs(i.maxLon) > p || Math.abs(i.minLat) > p || Math.abs(i.maxLat) > p)
51
+ throw new Error(
52
+ `Geometry bounding box after transform is invalid for layer "${u.outputTableName}" (bbox: [${i.minLon}, ${i.minLat}, ${i.maxLon}, ${i.maxLat}]). Verify that coordinateFormat matches the actual CRS of the input data. The workspace uses ${Te}; input is expected in EPSG:4326 by default.`
53
+ );
54
+ } catch (i) {
55
+ if (i instanceof Error && i.message.includes("bounding box after transform")) throw i;
56
+ }
57
+ return a(t, e), t;
41
58
  }
42
59
  case "heatmap": {
43
- const a = s;
60
+ const b = r;
44
61
  return await t.buildHeatmap({
45
- tableJoinName: a.tableJoinName,
46
- near: { distance: a.near.distance },
47
- outputTableName: a.outputTableName,
48
- grid: a.grid,
49
- ...a.groupBy && { groupBy: a.groupBy }
50
- }), r(t, o), t;
62
+ tableJoinName: b.tableJoinName,
63
+ near: { distance: b.near.distance },
64
+ outputTableName: b.outputTableName,
65
+ grid: b.grid,
66
+ ...b.groupBy && { groupBy: b.groupBy }
67
+ }), a(t, e), t;
51
68
  }
52
69
  case "join": {
53
- const a = s;
70
+ const b = r;
54
71
  if (await t.spatialQuery({
55
- tableRootName: a.tableRootName,
56
- tableJoinName: a.tableJoinName,
57
- ...a.near && { near: a.near },
58
- ...a.groupBy && { groupBy: a.groupBy }
59
- }), n) {
60
- const i = await t.getLayer(a.tableRootName);
61
- n.set(a.tableRootName, i);
72
+ tableRootName: b.tableRootName,
73
+ tableJoinName: b.tableJoinName,
74
+ ...b.near && { near: b.near },
75
+ ...b.groupBy && { groupBy: b.groupBy }
76
+ }), f) {
77
+ const l = await t.getLayer(b.tableRootName);
78
+ f.set(b.tableRootName, l);
62
79
  }
63
- return r(t, o), t;
80
+ return a(t, e), t;
64
81
  }
65
82
  default:
66
83
  return;
@@ -68,81 +85,1060 @@ function k(o, n) {
68
85
  }
69
86
  };
70
87
  }
71
- function B(o, n) {
72
- return n && n.length > 0 ? { type: g.USER, params: n } : o?.mode === v.PERCENTILE ? o.lowerPercentile !== void 0 || o.upperPercentile !== void 0 ? {
73
- type: g.PERCENTILE,
74
- params: [o.lowerPercentile ?? 0, o.upperPercentile ?? 100]
75
- } : { type: g.PERCENTILE } : { type: g.MIN_MAX };
76
- }
77
- function L(o, n) {
78
- return n.split(".").reduce((r, l) => {
79
- if (!(r == null || typeof r != "object"))
80
- return r[l];
81
- }, o);
82
- }
83
- function S(o, n, r) {
84
- const l = n.split("."), e = { ...o };
85
- let t = e;
86
- for (let u = 0; u < l.length - 1; u++)
87
- t[l[u]] = { ...t[l[u]] ?? {} }, t = t[l[u]];
88
- return t[l[l.length - 1]] = r, e;
89
- }
90
- function D(o, n, r) {
91
- async function l(e, t, u) {
92
- let s = {};
93
- for (const a of t.tables)
94
- a.type !== void 0 && (s[a.name] = a.type);
95
- for (const a of u.layerRefs) {
96
- const i = a.dataRef, f = s[i], p = a.getFnv, h = r?.get(i) ?? await t.getLayer(i), c = {
97
- ...h,
98
- features: (h.features ?? []).filter((d) => d.geometry != null)
88
+ var W = /* @__PURE__ */ (function(e) {
89
+ return e.USER = "user", e.MIN_MAX = "minMax", e.PERCENTILE = "percentile", e;
90
+ })({});
91
+ function fe(e, f, a) {
92
+ e.prototype = f.prototype = a, a.constructor = e;
93
+ }
94
+ function be(e, f) {
95
+ var a = Object.create(e.prototype);
96
+ for (var d in f) a[d] = f[d];
97
+ return a;
98
+ }
99
+ function z() {
100
+ }
101
+ var F = 0.7, B = 1 / F, H = "\\s*([+-]?\\d+)\\s*", D = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", k = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Qe = /^#([0-9a-f]{3,8})$/, Ze = RegExp(`^rgb\\(${H},${H},${H}\\)$`), Ye = RegExp(`^rgb\\(${k},${k},${k}\\)$`), ef = RegExp(`^rgba\\(${H},${H},${H},${D}\\)$`), ff = RegExp(`^rgba\\(${k},${k},${k},${D}\\)$`), af = RegExp(`^hsl\\(${D},${k},${k}\\)$`), df = RegExp(`^hsla\\(${D},${k},${k},${D}\\)$`), me = {
102
+ aliceblue: 15792383,
103
+ antiquewhite: 16444375,
104
+ aqua: 65535,
105
+ aquamarine: 8388564,
106
+ azure: 15794175,
107
+ beige: 16119260,
108
+ bisque: 16770244,
109
+ black: 0,
110
+ blanchedalmond: 16772045,
111
+ blue: 255,
112
+ blueviolet: 9055202,
113
+ brown: 10824234,
114
+ burlywood: 14596231,
115
+ cadetblue: 6266528,
116
+ chartreuse: 8388352,
117
+ chocolate: 13789470,
118
+ coral: 16744272,
119
+ cornflowerblue: 6591981,
120
+ cornsilk: 16775388,
121
+ crimson: 14423100,
122
+ cyan: 65535,
123
+ darkblue: 139,
124
+ darkcyan: 35723,
125
+ darkgoldenrod: 12092939,
126
+ darkgray: 11119017,
127
+ darkgreen: 25600,
128
+ darkgrey: 11119017,
129
+ darkkhaki: 12433259,
130
+ darkmagenta: 9109643,
131
+ darkolivegreen: 5597999,
132
+ darkorange: 16747520,
133
+ darkorchid: 10040012,
134
+ darkred: 9109504,
135
+ darksalmon: 15308410,
136
+ darkseagreen: 9419919,
137
+ darkslateblue: 4734347,
138
+ darkslategray: 3100495,
139
+ darkslategrey: 3100495,
140
+ darkturquoise: 52945,
141
+ darkviolet: 9699539,
142
+ deeppink: 16716947,
143
+ deepskyblue: 49151,
144
+ dimgray: 6908265,
145
+ dimgrey: 6908265,
146
+ dodgerblue: 2003199,
147
+ firebrick: 11674146,
148
+ floralwhite: 16775920,
149
+ forestgreen: 2263842,
150
+ fuchsia: 16711935,
151
+ gainsboro: 14474460,
152
+ ghostwhite: 16316671,
153
+ gold: 16766720,
154
+ goldenrod: 14329120,
155
+ gray: 8421504,
156
+ green: 32768,
157
+ greenyellow: 11403055,
158
+ grey: 8421504,
159
+ honeydew: 15794160,
160
+ hotpink: 16738740,
161
+ indianred: 13458524,
162
+ indigo: 4915330,
163
+ ivory: 16777200,
164
+ khaki: 15787660,
165
+ lavender: 15132410,
166
+ lavenderblush: 16773365,
167
+ lawngreen: 8190976,
168
+ lemonchiffon: 16775885,
169
+ lightblue: 11393254,
170
+ lightcoral: 15761536,
171
+ lightcyan: 14745599,
172
+ lightgoldenrodyellow: 16448210,
173
+ lightgray: 13882323,
174
+ lightgreen: 9498256,
175
+ lightgrey: 13882323,
176
+ lightpink: 16758465,
177
+ lightsalmon: 16752762,
178
+ lightseagreen: 2142890,
179
+ lightskyblue: 8900346,
180
+ lightslategray: 7833753,
181
+ lightslategrey: 7833753,
182
+ lightsteelblue: 11584734,
183
+ lightyellow: 16777184,
184
+ lime: 65280,
185
+ limegreen: 3329330,
186
+ linen: 16445670,
187
+ magenta: 16711935,
188
+ maroon: 8388608,
189
+ mediumaquamarine: 6737322,
190
+ mediumblue: 205,
191
+ mediumorchid: 12211667,
192
+ mediumpurple: 9662683,
193
+ mediumseagreen: 3978097,
194
+ mediumslateblue: 8087790,
195
+ mediumspringgreen: 64154,
196
+ mediumturquoise: 4772300,
197
+ mediumvioletred: 13047173,
198
+ midnightblue: 1644912,
199
+ mintcream: 16121850,
200
+ mistyrose: 16770273,
201
+ moccasin: 16770229,
202
+ navajowhite: 16768685,
203
+ navy: 128,
204
+ oldlace: 16643558,
205
+ olive: 8421376,
206
+ olivedrab: 7048739,
207
+ orange: 16753920,
208
+ orangered: 16729344,
209
+ orchid: 14315734,
210
+ palegoldenrod: 15657130,
211
+ palegreen: 10025880,
212
+ paleturquoise: 11529966,
213
+ palevioletred: 14381203,
214
+ papayawhip: 16773077,
215
+ peachpuff: 16767673,
216
+ peru: 13468991,
217
+ pink: 16761035,
218
+ plum: 14524637,
219
+ powderblue: 11591910,
220
+ purple: 8388736,
221
+ rebeccapurple: 6697881,
222
+ red: 16711680,
223
+ rosybrown: 12357519,
224
+ royalblue: 4286945,
225
+ saddlebrown: 9127187,
226
+ salmon: 16416882,
227
+ sandybrown: 16032864,
228
+ seagreen: 3050327,
229
+ seashell: 16774638,
230
+ sienna: 10506797,
231
+ silver: 12632256,
232
+ skyblue: 8900331,
233
+ slateblue: 6970061,
234
+ slategray: 7372944,
235
+ slategrey: 7372944,
236
+ snow: 16775930,
237
+ springgreen: 65407,
238
+ steelblue: 4620980,
239
+ tan: 13808780,
240
+ teal: 32896,
241
+ thistle: 14204888,
242
+ tomato: 16737095,
243
+ turquoise: 4251856,
244
+ violet: 15631086,
245
+ wheat: 16113331,
246
+ white: 16777215,
247
+ whitesmoke: 16119285,
248
+ yellow: 16776960,
249
+ yellowgreen: 10145074
250
+ };
251
+ fe(z, re, {
252
+ copy(e) {
253
+ return Object.assign(new this.constructor(), this, e);
254
+ },
255
+ displayable() {
256
+ return this.rgb().displayable();
257
+ },
258
+ hex: ge,
259
+ formatHex: ge,
260
+ formatHex8: cf,
261
+ formatHsl: tf,
262
+ formatRgb: ye,
263
+ toString: ye
264
+ });
265
+ function ge() {
266
+ return this.rgb().formatHex();
267
+ }
268
+ function cf() {
269
+ return this.rgb().formatHex8();
270
+ }
271
+ function tf() {
272
+ return Fe(this).formatHsl();
273
+ }
274
+ function ye() {
275
+ return this.rgb().formatRgb();
276
+ }
277
+ function re(e) {
278
+ var f, a;
279
+ return e = (e + "").trim().toLowerCase(), (f = Qe.exec(e)) ? (a = f[1].length, f = parseInt(f[1], 16), a === 6 ? ve(f) : a === 3 ? new m(f >> 8 & 15 | f >> 4 & 240, f >> 4 & 15 | f & 240, (f & 15) << 4 | f & 15, 1) : a === 8 ? V(f >> 24 & 255, f >> 16 & 255, f >> 8 & 255, (f & 255) / 255) : a === 4 ? V(f >> 12 & 15 | f >> 8 & 240, f >> 8 & 15 | f >> 4 & 240, f >> 4 & 15 | f & 240, ((f & 15) << 4 | f & 15) / 255) : null) : (f = Ze.exec(e)) ? new m(f[1], f[2], f[3], 1) : (f = Ye.exec(e)) ? new m(f[1] * 255 / 100, f[2] * 255 / 100, f[3] * 255 / 100, 1) : (f = ef.exec(e)) ? V(f[1], f[2], f[3], f[4]) : (f = ff.exec(e)) ? V(f[1] * 255 / 100, f[2] * 255 / 100, f[3] * 255 / 100, f[4]) : (f = af.exec(e)) ? Ne(f[1], f[2] / 100, f[3] / 100, 1) : (f = df.exec(e)) ? Ne(f[1], f[2] / 100, f[3] / 100, f[4]) : me.hasOwnProperty(e) ? ve(me[e]) : e === "transparent" ? new m(NaN, NaN, NaN, 0) : null;
280
+ }
281
+ function ve(e) {
282
+ return new m(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
283
+ }
284
+ function V(e, f, a, d) {
285
+ return d <= 0 && (e = f = a = NaN), new m(e, f, a, d);
286
+ }
287
+ function je(e) {
288
+ return e instanceof z || (e = re(e)), e ? (e = e.rgb(), new m(e.r, e.g, e.b, e.opacity)) : new m();
289
+ }
290
+ function q(e, f, a, d) {
291
+ return arguments.length === 1 ? je(e) : new m(e, f, a, d ?? 1);
292
+ }
293
+ function m(e, f, a, d) {
294
+ this.r = +e, this.g = +f, this.b = +a, this.opacity = +d;
295
+ }
296
+ fe(m, q, be(z, {
297
+ brighter(e) {
298
+ return e = e == null ? B : B ** +e, new m(this.r * e, this.g * e, this.b * e, this.opacity);
299
+ },
300
+ darker(e) {
301
+ return e = e == null ? F : F ** +e, new m(this.r * e, this.g * e, this.b * e, this.opacity);
302
+ },
303
+ rgb() {
304
+ return this;
305
+ },
306
+ clamp() {
307
+ return new m(T(this.r), T(this.g), T(this.b), Z(this.opacity));
308
+ },
309
+ displayable() {
310
+ return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
311
+ },
312
+ hex: we,
313
+ formatHex: we,
314
+ formatHex8: bf,
315
+ formatRgb: Me,
316
+ toString: Me
317
+ }));
318
+ function we() {
319
+ return `#${L(this.r)}${L(this.g)}${L(this.b)}`;
320
+ }
321
+ function bf() {
322
+ return `#${L(this.r)}${L(this.g)}${L(this.b)}${L((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
323
+ }
324
+ function Me() {
325
+ let e = Z(this.opacity);
326
+ return `${e === 1 ? "rgb(" : "rgba("}${T(this.r)}, ${T(this.g)}, ${T(this.b)}${e === 1 ? ")" : `, ${e})`}`;
327
+ }
328
+ function Z(e) {
329
+ return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));
330
+ }
331
+ function T(e) {
332
+ return Math.max(0, Math.min(255, Math.round(e) || 0));
333
+ }
334
+ function L(e) {
335
+ return e = T(e), (e < 16 ? "0" : "") + e.toString(16);
336
+ }
337
+ function Ne(e, f, a, d) {
338
+ return d <= 0 ? e = f = a = NaN : a <= 0 || a >= 1 ? e = f = NaN : f <= 0 && (e = NaN), new N(e, f, a, d);
339
+ }
340
+ function Fe(e) {
341
+ if (e instanceof N) return new N(e.h, e.s, e.l, e.opacity);
342
+ if (e instanceof z || (e = re(e)), !e) return new N();
343
+ if (e instanceof N) return e;
344
+ e = e.rgb();
345
+ var f = e.r / 255, a = e.g / 255, d = e.b / 255, c = Math.min(f, a, d), t = Math.max(f, a, d), n = NaN, r = t - c, b = (t + c) / 2;
346
+ return r ? (n = f === t ? (a - d) / r + (a < d) * 6 : a === t ? (d - f) / r + 2 : (f - a) / r + 4, r /= b < 0.5 ? t + c : 2 - t - c, n *= 60) : r = b > 0 && b < 1 ? 0 : n, new N(n, r, b, e.opacity);
347
+ }
348
+ function rf(e, f, a, d) {
349
+ return arguments.length === 1 ? Fe(e) : new N(e, f, a, d ?? 1);
350
+ }
351
+ function N(e, f, a, d) {
352
+ this.h = +e, this.s = +f, this.l = +a, this.opacity = +d;
353
+ }
354
+ fe(N, rf, be(z, {
355
+ brighter(e) {
356
+ return e = e == null ? B : B ** +e, new N(this.h, this.s, this.l * e, this.opacity);
357
+ },
358
+ darker(e) {
359
+ return e = e == null ? F : F ** +e, new N(this.h, this.s, this.l * e, this.opacity);
360
+ },
361
+ rgb() {
362
+ var e = this.h % 360 + (this.h < 0) * 360, f = isNaN(e) || isNaN(this.s) ? 0 : this.s, a = this.l, d = a + (a < 0.5 ? a : 1 - a) * f, c = 2 * a - d;
363
+ return new m(ce(e >= 240 ? e - 240 : e + 120, c, d), ce(e, c, d), ce(e < 120 ? e + 240 : e - 120, c, d), this.opacity);
364
+ },
365
+ clamp() {
366
+ return new N(xe(this.h), K(this.s), K(this.l), Z(this.opacity));
367
+ },
368
+ displayable() {
369
+ return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
370
+ },
371
+ formatHsl() {
372
+ let e = Z(this.opacity);
373
+ return `${e === 1 ? "hsl(" : "hsla("}${xe(this.h)}, ${K(this.s) * 100}%, ${K(this.l) * 100}%${e === 1 ? ")" : `, ${e})`}`;
374
+ }
375
+ }));
376
+ function xe(e) {
377
+ return e = (e || 0) % 360, e < 0 ? e + 360 : e;
378
+ }
379
+ function K(e) {
380
+ return Math.max(0, Math.min(1, e || 0));
381
+ }
382
+ function ce(e, f, a) {
383
+ return (e < 60 ? f + (a - f) * e / 60 : e < 180 ? a : e < 240 ? f + (a - f) * (240 - e) / 60 : f) * 255;
384
+ }
385
+ var nf = Math.PI / 180, of = 180 / Math.PI, Ie = -0.14861, ne = 1.78277, ie = -0.29227, ae = -0.90649, G = 1.97294, $e = G * ae, ke = G * ne, Ee = ne * ie - ae * Ie;
386
+ function sf(e) {
387
+ if (e instanceof j) return new j(e.h, e.s, e.l, e.opacity);
388
+ e instanceof m || (e = je(e));
389
+ var f = e.r / 255, a = e.g / 255, d = e.b / 255, c = (Ee * d + $e * f - ke * a) / (Ee + $e - ke), t = d - c, n = (G * (a - c) - ie * t) / ae, r = Math.sqrt(n * n + t * t) / (G * c * (1 - c)), b = r ? Math.atan2(n, t) * of - 120 : NaN;
390
+ return new j(b < 0 ? b + 360 : b, r, c, e.opacity);
391
+ }
392
+ function E(e, f, a, d) {
393
+ return arguments.length === 1 ? sf(e) : new j(e, f, a, d ?? 1);
394
+ }
395
+ function j(e, f, a, d) {
396
+ this.h = +e, this.s = +f, this.l = +a, this.opacity = +d;
397
+ }
398
+ fe(j, E, be(z, {
399
+ brighter(e) {
400
+ return e = e == null ? B : B ** +e, new j(this.h, this.s, this.l * e, this.opacity);
401
+ },
402
+ darker(e) {
403
+ return e = e == null ? F : F ** +e, new j(this.h, this.s, this.l * e, this.opacity);
404
+ },
405
+ rgb() {
406
+ var e = isNaN(this.h) ? 0 : (this.h + 120) * nf, f = +this.l, a = isNaN(this.s) ? 0 : this.s * f * (1 - f), d = Math.cos(e), c = Math.sin(e);
407
+ return new m(255 * (f + a * (Ie * d + ne * c)), 255 * (f + a * (ie * d + ae * c)), 255 * (f + G * d * a), this.opacity);
408
+ }
409
+ }));
410
+ function lf(e) {
411
+ return Math.abs(e = Math.round(e)) >= 1e21 ? e.toLocaleString("en").replace(/,/g, "") : e.toString(10);
412
+ }
413
+ function Y(e, f) {
414
+ if (!isFinite(e) || e === 0) return null;
415
+ var a = (e = f ? e.toExponential(f - 1) : e.toExponential()).indexOf("e"), d = e.slice(0, a);
416
+ return [d.length > 1 ? d[0] + d.slice(2) : d, +e.slice(a + 1)];
417
+ }
418
+ function uf(e) {
419
+ return e = Y(Math.abs(e)), e ? e[1] : NaN;
420
+ }
421
+ function hf(e, f) {
422
+ return function(a, d) {
423
+ for (var c = a.length, t = [], n = 0, r = e[0], b = 0; c > 0 && r > 0 && (b + r + 1 > d && (r = Math.max(1, d - b)), t.push(a.substring(c -= r, c + r)), !((b += r + 1) > d)); ) r = e[n = (n + 1) % e.length];
424
+ return t.reverse().join(f);
425
+ };
426
+ }
427
+ function pf(e) {
428
+ return function(f) {
429
+ return f.replace(/[0-9]/g, function(a) {
430
+ return e[+a];
431
+ });
432
+ };
433
+ }
434
+ var mf = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
435
+ function te(e) {
436
+ if (!(f = mf.exec(e))) throw Error("invalid format: " + e);
437
+ var f;
438
+ return new oe({
439
+ fill: f[1],
440
+ align: f[2],
441
+ sign: f[3],
442
+ symbol: f[4],
443
+ zero: f[5],
444
+ width: f[6],
445
+ comma: f[7],
446
+ precision: f[8] && f[8].slice(1),
447
+ trim: f[9],
448
+ type: f[10]
449
+ });
450
+ }
451
+ te.prototype = oe.prototype;
452
+ function oe(e) {
453
+ this.fill = e.fill === void 0 ? " " : e.fill + "", this.align = e.align === void 0 ? ">" : e.align + "", this.sign = e.sign === void 0 ? "-" : e.sign + "", this.symbol = e.symbol === void 0 ? "" : e.symbol + "", this.zero = !!e.zero, this.width = e.width === void 0 ? void 0 : +e.width, this.comma = !!e.comma, this.precision = e.precision === void 0 ? void 0 : +e.precision, this.trim = !!e.trim, this.type = e.type === void 0 ? "" : e.type + "";
454
+ }
455
+ oe.prototype.toString = function() {
456
+ return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
457
+ };
458
+ function gf(e) {
459
+ e: for (var f = e.length, a = 1, d = -1, c; a < f; ++a) switch (e[a]) {
460
+ case ".":
461
+ d = c = a;
462
+ break;
463
+ case "0":
464
+ d === 0 && (d = a), c = a;
465
+ break;
466
+ default:
467
+ if (!+e[a]) break e;
468
+ d > 0 && (d = 0);
469
+ break;
470
+ }
471
+ return d > 0 ? e.slice(0, d) + e.slice(c + 1) : e;
472
+ }
473
+ var ee;
474
+ function yf(e, f) {
475
+ var a = Y(e, f);
476
+ if (!a) return ee = void 0, e.toPrecision(f);
477
+ var d = a[0], c = a[1], t = c - (ee = Math.max(-8, Math.min(8, Math.floor(c / 3))) * 3) + 1, n = d.length;
478
+ return t === n ? d : t > n ? d + Array(t - n + 1).join("0") : t > 0 ? d.slice(0, t) + "." + d.slice(t) : "0." + Array(1 - t).join("0") + Y(e, Math.max(0, f + t - 1))[0];
479
+ }
480
+ function Ae(e, f) {
481
+ var a = Y(e, f);
482
+ if (!a) return e + "";
483
+ var d = a[0], c = a[1];
484
+ return c < 0 ? "0." + Array(-c).join("0") + d : d.length > c + 1 ? d.slice(0, c + 1) + "." + d.slice(c + 1) : d + Array(c - d.length + 2).join("0");
485
+ }
486
+ var Re = {
487
+ "%": (e, f) => (e * 100).toFixed(f),
488
+ b: (e) => Math.round(e).toString(2),
489
+ c: (e) => e + "",
490
+ d: lf,
491
+ e: (e, f) => e.toExponential(f),
492
+ f: (e, f) => e.toFixed(f),
493
+ g: (e, f) => e.toPrecision(f),
494
+ o: (e) => Math.round(e).toString(8),
495
+ p: (e, f) => Ae(e * 100, f),
496
+ r: Ae,
497
+ s: yf,
498
+ X: (e) => Math.round(e).toString(16).toUpperCase(),
499
+ x: (e) => Math.round(e).toString(16)
500
+ };
501
+ function Ce(e) {
502
+ return e;
503
+ }
504
+ var Pe = Array.prototype.map, Se = [
505
+ "y",
506
+ "z",
507
+ "a",
508
+ "f",
509
+ "p",
510
+ "n",
511
+ "µ",
512
+ "m",
513
+ "",
514
+ "k",
515
+ "M",
516
+ "G",
517
+ "T",
518
+ "P",
519
+ "E",
520
+ "Z",
521
+ "Y"
522
+ ];
523
+ function vf(e) {
524
+ var f = e.grouping === void 0 || e.thousands === void 0 ? Ce : hf(Pe.call(e.grouping, Number), e.thousands + ""), a = e.currency === void 0 ? "" : e.currency[0] + "", d = e.currency === void 0 ? "" : e.currency[1] + "", c = e.decimal === void 0 ? "." : e.decimal + "", t = e.numerals === void 0 ? Ce : pf(Pe.call(e.numerals, String)), n = e.percent === void 0 ? "%" : e.percent + "", r = e.minus === void 0 ? "−" : e.minus + "", b = e.nan === void 0 ? "NaN" : e.nan + "";
525
+ function l(i, p) {
526
+ i = te(i);
527
+ var y = i.fill, x = i.align, g = i.sign, R = i.symbol, C = i.zero, v = i.width, P = i.comma, $ = i.precision, I = i.trim, w = i.type;
528
+ w === "n" ? (P = !0, w = "g") : Re[w] || ($ === void 0 && ($ = 12), I = !0, w = "g"), (C || y === "0" && x === "=") && (C = !0, y = "0", x = "=");
529
+ var Oe = (p && p.prefix !== void 0 ? p.prefix : "") + (R === "$" ? a : R === "#" && /[boxX]/.test(w) ? "0" + w.toLowerCase() : ""), Be = (R === "$" ? d : /[%p]/.test(w) ? n : "") + (p && p.suffix !== void 0 ? p.suffix : ""), ue = Re[w], ze = /[defgprs%]/.test(w);
530
+ $ = $ === void 0 ? 6 : /[gprs]/.test(w) ? Math.max(1, Math.min(21, $)) : Math.max(0, Math.min(20, $));
531
+ function he(s) {
532
+ var S = Oe, M = Be, _, pe, J;
533
+ if (w === "c") M = ue(s) + M, s = "";
534
+ else {
535
+ s = +s;
536
+ var U = s < 0 || 1 / s < 0;
537
+ if (s = isNaN(s) ? b : ue(Math.abs(s), $), I && (s = gf(s)), U && +s == 0 && g !== "+" && (U = !1), S = (U ? g === "(" ? g : r : g === "-" || g === "(" ? "" : g) + S, M = (w === "s" && !isNaN(s) && ee !== void 0 ? Se[8 + ee / 3] : "") + M + (U && g === "(" ? ")" : ""), ze) {
538
+ for (_ = -1, pe = s.length; ++_ < pe; ) if (J = s.charCodeAt(_), 48 > J || J > 57) {
539
+ M = (J === 46 ? c + s.slice(_ + 1) : s.slice(_)) + M, s = s.slice(0, _);
540
+ break;
541
+ }
542
+ }
543
+ }
544
+ P && !C && (s = f(s, 1 / 0));
545
+ var X = S.length + s.length + M.length, A = X < v ? Array(v - X + 1).join(y) : "";
546
+ switch (P && C && (s = f(A + s, A.length ? v - M.length : 1 / 0), A = ""), x) {
547
+ case "<":
548
+ s = S + s + M + A;
549
+ break;
550
+ case "=":
551
+ s = S + A + s + M;
552
+ break;
553
+ case "^":
554
+ s = A.slice(0, X = A.length >> 1) + S + s + M + A.slice(X);
555
+ break;
556
+ default:
557
+ s = A + S + s + M;
558
+ break;
559
+ }
560
+ return t(s);
561
+ }
562
+ return he.toString = function() {
563
+ return i + "";
564
+ }, he;
565
+ }
566
+ function u(i, p) {
567
+ var y = Math.max(-8, Math.min(8, Math.floor(uf(p) / 3))) * 3, x = 10 ** -y, g = l((i = te(i), i.type = "f", i), { suffix: Se[8 + y / 3] });
568
+ return function(R) {
569
+ return g(x * R);
570
+ };
571
+ }
572
+ return {
573
+ format: l,
574
+ formatPrefix: u
575
+ };
576
+ }
577
+ var Q;
578
+ wf({
579
+ thousands: ",",
580
+ grouping: [3],
581
+ currency: ["$", ""]
582
+ });
583
+ function wf(e) {
584
+ return Q = vf(e), Q.format, Q.formatPrefix, Q;
585
+ }
586
+ function Mf(e, f, a, d, c) {
587
+ var t = e * e, n = t * e;
588
+ return ((1 - 3 * e + 3 * t - n) * f + (4 - 6 * t + 3 * n) * a + (1 + 3 * e + 3 * t - 3 * n) * d + n * c) / 6;
589
+ }
590
+ function Nf(e) {
591
+ var f = e.length - 1;
592
+ return function(a) {
593
+ var d = a <= 0 ? a = 0 : a >= 1 ? (a = 1, f - 1) : Math.floor(a * f), c = e[d], t = e[d + 1], n = d > 0 ? e[d - 1] : 2 * c - t, r = d < f - 1 ? e[d + 2] : 2 * t - c;
594
+ return Mf((a - d / f) * f, n, c, t, r);
595
+ };
596
+ }
597
+ var se = (e) => () => e;
598
+ function _e(e, f) {
599
+ return function(a) {
600
+ return e + a * f;
601
+ };
602
+ }
603
+ function xf(e, f, a) {
604
+ return e **= +a, f = f ** +a - e, a = 1 / a, function(d) {
605
+ return (e + d * f) ** +a;
606
+ };
607
+ }
608
+ function $f(e, f) {
609
+ var a = f - e;
610
+ return a ? _e(e, a > 180 || a < -180 ? a - 360 * Math.round(a / 360) : a) : se(isNaN(e) ? f : e);
611
+ }
612
+ function kf(e) {
613
+ return (e = +e) == 1 ? O : function(f, a) {
614
+ return a - f ? xf(f, a, e) : se(isNaN(f) ? a : f);
615
+ };
616
+ }
617
+ function O(e, f) {
618
+ var a = f - e;
619
+ return a ? _e(e, a) : se(isNaN(e) ? f : e);
620
+ }
621
+ (function e(f) {
622
+ var a = kf(f);
623
+ function d(c, t) {
624
+ var n = a((c = q(c)).r, (t = q(t)).r), r = a(c.g, t.g), b = a(c.b, t.b), l = O(c.opacity, t.opacity);
625
+ return function(u) {
626
+ return c.r = n(u), c.g = r(u), c.b = b(u), c.opacity = l(u), c + "";
627
+ };
628
+ }
629
+ return d.gamma = e, d;
630
+ })(1);
631
+ function Ef(e) {
632
+ return function(f) {
633
+ var a = f.length, d = Array(a), c = Array(a), t = Array(a), n, r;
634
+ for (n = 0; n < a; ++n) r = q(f[n]), d[n] = r.r || 0, c[n] = r.g || 0, t[n] = r.b || 0;
635
+ return d = e(d), c = e(c), t = e(t), r.opacity = 1, function(b) {
636
+ return r.r = d(b), r.g = c(b), r.b = t(b), r + "";
637
+ };
638
+ };
639
+ }
640
+ var Af = Ef(Nf);
641
+ function He(e) {
642
+ return (function f(a) {
643
+ a = +a;
644
+ function d(c, t) {
645
+ var n = e((c = E(c)).h, (t = E(t)).h), r = O(c.s, t.s), b = O(c.l, t.l), l = O(c.opacity, t.opacity);
646
+ return function(u) {
647
+ return c.h = n(u), c.s = r(u), c.l = b(u ** +a), c.opacity = l(u), c + "";
648
+ };
649
+ }
650
+ return d.gamma = f, d;
651
+ })(1);
652
+ }
653
+ He($f);
654
+ var le = He(O);
655
+ function o(e) {
656
+ for (var f = e.length / 6 | 0, a = Array(f), d = 0; d < f; ) a[d] = "#" + e.slice(d * 6, ++d * 6);
657
+ return a;
658
+ }
659
+ o("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");
660
+ o("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666");
661
+ o("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666");
662
+ o("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0");
663
+ o("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");
664
+ o("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2");
665
+ o("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc");
666
+ o("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999");
667
+ o("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3");
668
+ o("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");
669
+ o("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");
670
+ var h = (e) => Af(e[e.length - 1]), Rf = [
671
+ ,
672
+ ,
673
+ ,
674
+ "d8b365f5f5f55ab4ac",
675
+ "a6611adfc27d80cdc1018571",
676
+ "a6611adfc27df5f5f580cdc1018571",
677
+ "8c510ad8b365f6e8c3c7eae55ab4ac01665e",
678
+ "8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e",
679
+ "8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e",
680
+ "8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e",
681
+ "5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30",
682
+ "5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30"
683
+ ].map(o);
684
+ h(Rf);
685
+ var Cf = [
686
+ ,
687
+ ,
688
+ ,
689
+ "af8dc3f7f7f77fbf7b",
690
+ "7b3294c2a5cfa6dba0008837",
691
+ "7b3294c2a5cff7f7f7a6dba0008837",
692
+ "762a83af8dc3e7d4e8d9f0d37fbf7b1b7837",
693
+ "762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837",
694
+ "762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837",
695
+ "762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837",
696
+ "40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b",
697
+ "40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b"
698
+ ].map(o);
699
+ h(Cf);
700
+ var Pf = [
701
+ ,
702
+ ,
703
+ ,
704
+ "e9a3c9f7f7f7a1d76a",
705
+ "d01c8bf1b6dab8e1864dac26",
706
+ "d01c8bf1b6daf7f7f7b8e1864dac26",
707
+ "c51b7de9a3c9fde0efe6f5d0a1d76a4d9221",
708
+ "c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221",
709
+ "c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221",
710
+ "c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221",
711
+ "8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419",
712
+ "8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419"
713
+ ].map(o);
714
+ h(Pf);
715
+ var Sf = [
716
+ ,
717
+ ,
718
+ ,
719
+ "998ec3f7f7f7f1a340",
720
+ "5e3c99b2abd2fdb863e66101",
721
+ "5e3c99b2abd2f7f7f7fdb863e66101",
722
+ "542788998ec3d8daebfee0b6f1a340b35806",
723
+ "542788998ec3d8daebf7f7f7fee0b6f1a340b35806",
724
+ "5427888073acb2abd2d8daebfee0b6fdb863e08214b35806",
725
+ "5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806",
726
+ "2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08",
727
+ "2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08"
728
+ ].map(o);
729
+ h(Sf);
730
+ var Lf = [
731
+ ,
732
+ ,
733
+ ,
734
+ "ef8a62f7f7f767a9cf",
735
+ "ca0020f4a58292c5de0571b0",
736
+ "ca0020f4a582f7f7f792c5de0571b0",
737
+ "b2182bef8a62fddbc7d1e5f067a9cf2166ac",
738
+ "b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac",
739
+ "b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac",
740
+ "b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac",
741
+ "67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061",
742
+ "67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061"
743
+ ].map(o);
744
+ h(Lf);
745
+ var Tf = [
746
+ ,
747
+ ,
748
+ ,
749
+ "ef8a62ffffff999999",
750
+ "ca0020f4a582bababa404040",
751
+ "ca0020f4a582ffffffbababa404040",
752
+ "b2182bef8a62fddbc7e0e0e09999994d4d4d",
753
+ "b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d",
754
+ "b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d",
755
+ "b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d",
756
+ "67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a",
757
+ "67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a"
758
+ ].map(o);
759
+ h(Tf);
760
+ var jf = [
761
+ ,
762
+ ,
763
+ ,
764
+ "fc8d59ffffbf91bfdb",
765
+ "d7191cfdae61abd9e92c7bb6",
766
+ "d7191cfdae61ffffbfabd9e92c7bb6",
767
+ "d73027fc8d59fee090e0f3f891bfdb4575b4",
768
+ "d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4",
769
+ "d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4",
770
+ "d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4",
771
+ "a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695",
772
+ "a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695"
773
+ ].map(o);
774
+ h(jf);
775
+ var Ff = [
776
+ ,
777
+ ,
778
+ ,
779
+ "fc8d59ffffbf91cf60",
780
+ "d7191cfdae61a6d96a1a9641",
781
+ "d7191cfdae61ffffbfa6d96a1a9641",
782
+ "d73027fc8d59fee08bd9ef8b91cf601a9850",
783
+ "d73027fc8d59fee08bffffbfd9ef8b91cf601a9850",
784
+ "d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850",
785
+ "d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850",
786
+ "a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837",
787
+ "a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837"
788
+ ].map(o);
789
+ h(Ff);
790
+ var If = [
791
+ ,
792
+ ,
793
+ ,
794
+ "fc8d59ffffbf99d594",
795
+ "d7191cfdae61abdda42b83ba",
796
+ "d7191cfdae61ffffbfabdda42b83ba",
797
+ "d53e4ffc8d59fee08be6f59899d5943288bd",
798
+ "d53e4ffc8d59fee08bffffbfe6f59899d5943288bd",
799
+ "d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd",
800
+ "d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd",
801
+ "9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2",
802
+ "9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2"
803
+ ].map(o);
804
+ h(If);
805
+ var _f = [
806
+ ,
807
+ ,
808
+ ,
809
+ "e5f5f999d8c92ca25f",
810
+ "edf8fbb2e2e266c2a4238b45",
811
+ "edf8fbb2e2e266c2a42ca25f006d2c",
812
+ "edf8fbccece699d8c966c2a42ca25f006d2c",
813
+ "edf8fbccece699d8c966c2a441ae76238b45005824",
814
+ "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824",
815
+ "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b"
816
+ ].map(o);
817
+ h(_f);
818
+ var Hf = [
819
+ ,
820
+ ,
821
+ ,
822
+ "e0ecf49ebcda8856a7",
823
+ "edf8fbb3cde38c96c688419d",
824
+ "edf8fbb3cde38c96c68856a7810f7c",
825
+ "edf8fbbfd3e69ebcda8c96c68856a7810f7c",
826
+ "edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b",
827
+ "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b",
828
+ "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b"
829
+ ].map(o);
830
+ h(Hf);
831
+ var Of = [
832
+ ,
833
+ ,
834
+ ,
835
+ "e0f3dba8ddb543a2ca",
836
+ "f0f9e8bae4bc7bccc42b8cbe",
837
+ "f0f9e8bae4bc7bccc443a2ca0868ac",
838
+ "f0f9e8ccebc5a8ddb57bccc443a2ca0868ac",
839
+ "f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e",
840
+ "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e",
841
+ "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081"
842
+ ].map(o);
843
+ h(Of);
844
+ var Bf = [
845
+ ,
846
+ ,
847
+ ,
848
+ "fee8c8fdbb84e34a33",
849
+ "fef0d9fdcc8afc8d59d7301f",
850
+ "fef0d9fdcc8afc8d59e34a33b30000",
851
+ "fef0d9fdd49efdbb84fc8d59e34a33b30000",
852
+ "fef0d9fdd49efdbb84fc8d59ef6548d7301f990000",
853
+ "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000",
854
+ "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000"
855
+ ].map(o);
856
+ h(Bf);
857
+ var zf = [
858
+ ,
859
+ ,
860
+ ,
861
+ "ece2f0a6bddb1c9099",
862
+ "f6eff7bdc9e167a9cf02818a",
863
+ "f6eff7bdc9e167a9cf1c9099016c59",
864
+ "f6eff7d0d1e6a6bddb67a9cf1c9099016c59",
865
+ "f6eff7d0d1e6a6bddb67a9cf3690c002818a016450",
866
+ "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450",
867
+ "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636"
868
+ ].map(o);
869
+ h(zf);
870
+ var Df = [
871
+ ,
872
+ ,
873
+ ,
874
+ "ece7f2a6bddb2b8cbe",
875
+ "f1eef6bdc9e174a9cf0570b0",
876
+ "f1eef6bdc9e174a9cf2b8cbe045a8d",
877
+ "f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d",
878
+ "f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b",
879
+ "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b",
880
+ "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858"
881
+ ].map(o);
882
+ h(Df);
883
+ var qf = [
884
+ ,
885
+ ,
886
+ ,
887
+ "e7e1efc994c7dd1c77",
888
+ "f1eef6d7b5d8df65b0ce1256",
889
+ "f1eef6d7b5d8df65b0dd1c77980043",
890
+ "f1eef6d4b9dac994c7df65b0dd1c77980043",
891
+ "f1eef6d4b9dac994c7df65b0e7298ace125691003f",
892
+ "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f",
893
+ "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f"
894
+ ].map(o);
895
+ h(qf);
896
+ var Gf = [
897
+ ,
898
+ ,
899
+ ,
900
+ "fde0ddfa9fb5c51b8a",
901
+ "feebe2fbb4b9f768a1ae017e",
902
+ "feebe2fbb4b9f768a1c51b8a7a0177",
903
+ "feebe2fcc5c0fa9fb5f768a1c51b8a7a0177",
904
+ "feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177",
905
+ "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177",
906
+ "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a"
907
+ ].map(o);
908
+ h(Gf);
909
+ var Jf = [
910
+ ,
911
+ ,
912
+ ,
913
+ "edf8b17fcdbb2c7fb8",
914
+ "ffffcca1dab441b6c4225ea8",
915
+ "ffffcca1dab441b6c42c7fb8253494",
916
+ "ffffccc7e9b47fcdbb41b6c42c7fb8253494",
917
+ "ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84",
918
+ "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84",
919
+ "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58"
920
+ ].map(o);
921
+ h(Jf);
922
+ var Uf = [
923
+ ,
924
+ ,
925
+ ,
926
+ "f7fcb9addd8e31a354",
927
+ "ffffccc2e69978c679238443",
928
+ "ffffccc2e69978c67931a354006837",
929
+ "ffffccd9f0a3addd8e78c67931a354006837",
930
+ "ffffccd9f0a3addd8e78c67941ab5d238443005a32",
931
+ "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32",
932
+ "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529"
933
+ ].map(o);
934
+ h(Uf);
935
+ var Xf = [
936
+ ,
937
+ ,
938
+ ,
939
+ "fff7bcfec44fd95f0e",
940
+ "ffffd4fed98efe9929cc4c02",
941
+ "ffffd4fed98efe9929d95f0e993404",
942
+ "ffffd4fee391fec44ffe9929d95f0e993404",
943
+ "ffffd4fee391fec44ffe9929ec7014cc4c028c2d04",
944
+ "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04",
945
+ "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506"
946
+ ].map(o);
947
+ h(Xf);
948
+ var Wf = [
949
+ ,
950
+ ,
951
+ ,
952
+ "ffeda0feb24cf03b20",
953
+ "ffffb2fecc5cfd8d3ce31a1c",
954
+ "ffffb2fecc5cfd8d3cf03b20bd0026",
955
+ "ffffb2fed976feb24cfd8d3cf03b20bd0026",
956
+ "ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026",
957
+ "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026",
958
+ "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026"
959
+ ].map(o);
960
+ h(Wf);
961
+ var Vf = [
962
+ ,
963
+ ,
964
+ ,
965
+ "deebf79ecae13182bd",
966
+ "eff3ffbdd7e76baed62171b5",
967
+ "eff3ffbdd7e76baed63182bd08519c",
968
+ "eff3ffc6dbef9ecae16baed63182bd08519c",
969
+ "eff3ffc6dbef9ecae16baed64292c62171b5084594",
970
+ "f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594",
971
+ "f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b"
972
+ ].map(o);
973
+ h(Vf);
974
+ var Kf = [
975
+ ,
976
+ ,
977
+ ,
978
+ "e5f5e0a1d99b31a354",
979
+ "edf8e9bae4b374c476238b45",
980
+ "edf8e9bae4b374c47631a354006d2c",
981
+ "edf8e9c7e9c0a1d99b74c47631a354006d2c",
982
+ "edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32",
983
+ "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32",
984
+ "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b"
985
+ ].map(o);
986
+ h(Kf);
987
+ var Qf = [
988
+ ,
989
+ ,
990
+ ,
991
+ "f0f0f0bdbdbd636363",
992
+ "f7f7f7cccccc969696525252",
993
+ "f7f7f7cccccc969696636363252525",
994
+ "f7f7f7d9d9d9bdbdbd969696636363252525",
995
+ "f7f7f7d9d9d9bdbdbd969696737373525252252525",
996
+ "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525",
997
+ "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000"
998
+ ].map(o);
999
+ h(Qf);
1000
+ var Zf = [
1001
+ ,
1002
+ ,
1003
+ ,
1004
+ "efedf5bcbddc756bb1",
1005
+ "f2f0f7cbc9e29e9ac86a51a3",
1006
+ "f2f0f7cbc9e29e9ac8756bb154278f",
1007
+ "f2f0f7dadaebbcbddc9e9ac8756bb154278f",
1008
+ "f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486",
1009
+ "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486",
1010
+ "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d"
1011
+ ].map(o);
1012
+ h(Zf);
1013
+ var Yf = [
1014
+ ,
1015
+ ,
1016
+ ,
1017
+ "fee0d2fc9272de2d26",
1018
+ "fee5d9fcae91fb6a4acb181d",
1019
+ "fee5d9fcae91fb6a4ade2d26a50f15",
1020
+ "fee5d9fcbba1fc9272fb6a4ade2d26a50f15",
1021
+ "fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d",
1022
+ "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d",
1023
+ "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d"
1024
+ ].map(o);
1025
+ h(Yf);
1026
+ var ea = [
1027
+ ,
1028
+ ,
1029
+ ,
1030
+ "fee6cefdae6be6550d",
1031
+ "feeddefdbe85fd8d3cd94701",
1032
+ "feeddefdbe85fd8d3ce6550da63603",
1033
+ "feeddefdd0a2fdae6bfd8d3ce6550da63603",
1034
+ "feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04",
1035
+ "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04",
1036
+ "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704"
1037
+ ].map(o);
1038
+ h(ea);
1039
+ le(E(300, 0.5, 0), E(-240, 0.5, 1));
1040
+ le(E(-100, 0.75, 0.35), E(80, 1.5, 0.8));
1041
+ le(E(260, 0.75, 0.35), E(80, 1.5, 0.8));
1042
+ E();
1043
+ q();
1044
+ function de(e) {
1045
+ var f = e.length;
1046
+ return function(a) {
1047
+ return e[Math.max(0, Math.min(f - 1, Math.floor(a * f)))];
1048
+ };
1049
+ }
1050
+ de(o("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));
1051
+ de(o("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf"));
1052
+ de(o("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4"));
1053
+ de(o("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));
1054
+ var Le = typeof Float32Array < "u" ? Float32Array : Array;
1055
+ function fa() {
1056
+ var e = new Le(3);
1057
+ return Le != Float32Array && (e[0] = 0, e[1] = 0, e[2] = 0), e;
1058
+ }
1059
+ (function() {
1060
+ var e = fa();
1061
+ return function(f, a, d, c, t, n) {
1062
+ var r, b;
1063
+ for (a ||= 3, d ||= 0, b = c ? Math.min(c * a + d, f.length) : f.length, r = d; r < b; r += a) e[0] = f[r], e[1] = f[r + 1], e[2] = f[r + 2], t(e, e, n), f[r] = e[0], f[r + 1] = e[1], f[r + 2] = e[2];
1064
+ return f;
1065
+ };
1066
+ })();
1067
+ function aa(e, f) {
1068
+ return f && f.length > 0 ? { type: W.USER, params: f } : e?.mode === De.PERCENTILE ? e.lowerPercentile !== void 0 || e.upperPercentile !== void 0 ? {
1069
+ type: W.PERCENTILE,
1070
+ params: [e.lowerPercentile ?? 0, e.upperPercentile ?? 100]
1071
+ } : { type: W.PERCENTILE } : { type: W.MIN_MAX };
1072
+ }
1073
+ function da(e, f) {
1074
+ return f.split(".").reduce((a, d) => {
1075
+ if (!(a == null || typeof a != "object"))
1076
+ return a[d];
1077
+ }, e);
1078
+ }
1079
+ function ca(e, f, a) {
1080
+ const d = f.split("."), c = { ...e };
1081
+ let t = c;
1082
+ for (let n = 0; n < d.length - 1; n++)
1083
+ t[d[n]] = { ...t[d[n]] ?? {} }, t = t[d[n]];
1084
+ return t[d[d.length - 1]] = a, c;
1085
+ }
1086
+ function ta(e, f, a) {
1087
+ async function d(c, t, n) {
1088
+ let r = {};
1089
+ for (const b of t.tables)
1090
+ b.type !== void 0 && (r[b.name] = b.type);
1091
+ for (const b of n.layerRefs) {
1092
+ const l = b.dataRef, u = r[l], i = b.getFnv, p = a?.get(l) ?? await t.getLayer(l), y = {
1093
+ ...p,
1094
+ features: (p.features ?? []).filter((v) => v.geometry != null)
99
1095
  };
100
- f === "raster" ? e.loadCollection(i, { collection: c, type: "raster", property: p ?? "" }) : e.loadCollection(i, { collection: c, type: f }), a.opacity != null && e.updateRenderInfo(i, { opacity: a.opacity }), a.isColorMap && e.updateRenderInfo(i, { isColorMap: !0 }), a.isPick && e.updateRenderInfo(i, { isPick: !0 }), a.isSkip && e.updateRenderInfo(i, { isSkip: !0 });
101
- const { catchAllCategory: y, colorMapDomain: m } = a;
102
- let A = c, M = m;
103
- if (p && y && m?.length) {
104
- const d = new Set(m);
105
- A = {
106
- ...c,
107
- features: c.features.map((w) => {
108
- const E = w.properties, b = L(E, p);
109
- return b == null || !d.has(String(b)) ? { ...w, properties: S(E, p, y) } : w;
1096
+ u === "raster" ? c.loadCollection(l, { collection: y, type: "raster", property: i ?? "" }) : c.loadCollection(l, { collection: y, type: u }), b.opacity != null && c.updateRenderInfo(l, { opacity: b.opacity }), b.isColorMap && c.updateRenderInfo(l, { isColorMap: !0 }), b.isPick && c.updateRenderInfo(l, { isPick: !0 }), b.isSkip && c.updateRenderInfo(l, { isSkip: !0 });
1097
+ const { catchAllCategory: x, colorMapDomain: g } = b;
1098
+ let R = y, C = g;
1099
+ if (i && x && g?.length) {
1100
+ const v = new Set(g);
1101
+ R = {
1102
+ ...y,
1103
+ features: y.features.map((P) => {
1104
+ const $ = P.properties, I = da($, i);
1105
+ return I == null || !v.has(String(I)) ? { ...P, properties: ca($, i, x) } : P;
110
1106
  })
111
- }, M = d.has(y) ? m : [...m, y];
1107
+ }, C = v.has(x) ? g : [...g, x];
112
1108
  }
113
- if (a.colorMapInterpolator) {
114
- const d = {
1109
+ if (b.colorMapInterpolator) {
1110
+ const v = {
115
1111
  // urban-grammar ColorMapInterpolator values are string-compatible
116
1112
  // with autk-core ColorMapInterpolator at runtime
117
- interpolator: a.colorMapInterpolator,
118
- domainSpec: B(a.normalization, M)
1113
+ interpolator: b.colorMapInterpolator,
1114
+ domainSpec: aa(b.normalization, C)
119
1115
  };
120
- e.updateRenderInfo(i, { colormap: { config: d }, isColorMap: !0 });
1116
+ c.updateRenderInfo(l, { colormap: { config: v }, isColorMap: !0 });
121
1117
  }
122
- if (p && f !== "raster") {
123
- const d = p.startsWith("properties.") ? p : `properties.${p}`;
124
- e.updateThematic(i, { collection: A, property: d });
1118
+ if (i && u !== "raster") {
1119
+ const v = i.startsWith("properties.") ? i : `properties.${i}`;
1120
+ c.updateThematic(l, { collection: R, property: v });
125
1121
  }
126
1122
  }
127
1123
  }
128
1124
  return {
129
- async resolveMap(e, t, u = 0) {
130
- if (o && o.map && e) {
131
- let s;
132
- if (Array.isArray(o.map) ? s = document.getElementById(o.map[u]) : s = document.getElementById(o.map), !s)
133
- throw new Error("Could not find rendering target for map: " + o.map);
134
- if (!(s instanceof HTMLCanvasElement))
135
- throw new Error("Target for map is not a canvas: " + o.map);
136
- const a = new P(s);
137
- if (t.style && N.setPredefinedStyle(t.style), await a.init(), await l(a, e, t), n)
138
- for (const i of t.layerRefs)
139
- n.set(i.dataRef, a);
140
- a.draw();
1125
+ async resolveMap(c, t, n = 0) {
1126
+ if (e && e.map && c) {
1127
+ let r;
1128
+ if (Array.isArray(e.map) ? r = document.getElementById(e.map[n]) : r = document.getElementById(e.map), !r)
1129
+ throw new Error("Could not find rendering target for map: " + e.map);
1130
+ if (!(r instanceof HTMLCanvasElement))
1131
+ throw new Error("Target for map is not a canvas: " + e.map);
1132
+ const b = new Je(r);
1133
+ if (t.style && Ue.setPredefinedStyle(t.style), await b.init(), await d(b, c, t), f)
1134
+ for (const l of t.layerRefs)
1135
+ f.set(l.dataRef, b);
1136
+ b.draw();
141
1137
  }
142
1138
  }
143
1139
  };
144
1140
  }
145
- function x(o) {
1141
+ function ba(e) {
146
1142
  return {
147
1143
  scatter: "scatterplot",
148
1144
  bar: "barchart",
@@ -151,74 +1147,90 @@ function x(o) {
151
1147
  "parallel-coordinates": "parallel-coordinates",
152
1148
  table: "table",
153
1149
  heatmatrix: "heatmatrix"
154
- }[o];
1150
+ }[e];
155
1151
  }
156
- function F(o, n, r) {
1152
+ function ra(e, f, a) {
157
1153
  return {
158
- async resolvePlot(l, e) {
159
- if (!o || !o.plot) return;
160
- const t = document.getElementById(o.plot);
161
- if (!t) throw new Error(`Could not find plot target: ${o.plot}`);
162
- const u = l;
163
- if (!u) throw new Error("No data context available for plot.");
164
- const s = r?.get(e.dataRef) ?? await u.getLayer(e.dataRef), a = e.events ?? [], i = new j(t, {
165
- type: x(e.mark),
166
- collection: s,
167
- attributes: { axis: e.axis, ...e.color && { color: e.color } },
168
- labels: { axis: e.axis, title: e.title },
169
- events: a,
170
- ...e.width && { width: e.width },
171
- ...e.height && { height: e.height },
172
- ...e.margins && { margins: e.margins },
173
- ...e.transform && { transform: e.transform }
1154
+ async resolvePlot(d, c) {
1155
+ if (!e || !e.plot) return;
1156
+ const t = document.getElementById(e.plot);
1157
+ if (!t) throw new Error(`Could not find plot target: ${e.plot}`);
1158
+ const n = d;
1159
+ if (!n) throw new Error("No data context available for plot.");
1160
+ const r = a?.get(c.dataRef) ?? await n.getLayer(c.dataRef), b = c.events ?? [], l = new We(t, {
1161
+ type: ba(c.mark),
1162
+ collection: r,
1163
+ attributes: { axis: c.axis, ...c.color && { color: c.color } },
1164
+ labels: { axis: c.axis, title: c.title },
1165
+ events: b,
1166
+ ...c.width && { width: c.width },
1167
+ ...c.height && { height: c.height },
1168
+ ...c.margins && { margins: c.margins },
1169
+ ...c.transform && { transform: c.transform }
174
1170
  });
175
- if (e.mapRef && n) {
176
- const f = n.get(e.mapRef);
177
- if (f) {
178
- f.updateRenderInfo(e.mapRef, { isPick: !0 }), f.events.on(I.PICKING, ({ selection: p }) => {
179
- i.setSelection(p);
1171
+ if (c.mapRef && f) {
1172
+ const u = f.get(c.mapRef);
1173
+ if (u) {
1174
+ u.updateRenderInfo(c.mapRef, { isPick: !0 }), u.events.on(Xe.PICKING, ({ selection: i }) => {
1175
+ l.setSelection(i);
180
1176
  });
181
- for (const p of a)
182
- i.events.on(p, ({ selection: h }) => {
183
- f.setHighlightedIds(e.mapRef, h);
1177
+ for (const i of b)
1178
+ l.events.on(i, ({ selection: p }) => {
1179
+ u.setHighlightedIds(c.mapRef, p);
184
1180
  });
185
1181
  }
186
1182
  }
187
1183
  }
188
1184
  };
189
1185
  }
190
- function H(o) {
1186
+ function na(e) {
191
1187
  return {
192
- async resolveCompute(n, r) {
193
- if (n) {
194
- const l = await n.getLayer(r.dataRef), t = await new T().gpgpuPipeline({
195
- collection: l,
196
- variableMapping: r.attributes,
197
- wgslBody: r.wglsFunction,
198
- ...r.outputColumnName && { resultField: r.outputColumnName },
199
- ...r.outputColumns && { outputColumns: r.outputColumns },
200
- ...r.attributeArrays && { attributeArrays: r.attributeArrays },
201
- ...r.attributeMatrices && { attributeMatrices: r.attributeMatrices },
202
- ...r.uniforms && { uniforms: r.uniforms },
203
- ...r.uniformArrays && { uniformArrays: r.uniformArrays },
204
- ...r.uniformMatrices && { uniformMatrices: r.uniformMatrices }
1188
+ async resolveCompute(f, a) {
1189
+ if (f) {
1190
+ const d = await f.getLayer(a.dataRef), t = await new Ve().gpgpuPipeline({
1191
+ collection: d,
1192
+ variableMapping: a.attributes,
1193
+ wgslBody: a.wglsFunction,
1194
+ ...a.outputColumnName && { resultField: a.outputColumnName },
1195
+ ...a.outputColumns && { outputColumns: a.outputColumns },
1196
+ ...a.attributeArrays && { attributeArrays: a.attributeArrays },
1197
+ ...a.attributeMatrices && { attributeMatrices: a.attributeMatrices },
1198
+ ...a.uniforms && { uniforms: a.uniforms },
1199
+ ...a.uniformArrays && { uniformArrays: a.uniformArrays },
1200
+ ...a.uniformMatrices && { uniformMatrices: a.uniformMatrices }
205
1201
  });
206
- return o && o.set(r.dataRef, t), n;
1202
+ return e && e.set(a.dataRef, t), f;
207
1203
  }
208
1204
  }
209
1205
  };
210
1206
  }
211
- class O {
1207
+ class ha {
212
1208
  dataAdapter;
213
1209
  mapAdapter;
214
1210
  plotAdapter;
215
1211
  computeAdapter;
216
1212
  grammarEngine;
217
- constructor(n) {
218
- const r = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Map();
219
- this.dataAdapter = k(n, l), this.mapAdapter = D(n, r, e), this.plotAdapter = F(n, r, l), this.computeAdapter = H(e);
1213
+ _computeCache = /* @__PURE__ */ new Map();
1214
+ _data = {};
1215
+ constructor(f) {
1216
+ const a = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map();
1217
+ this.dataAdapter = Ke(f, d), this.mapAdapter = ta(f, a, this._computeCache), this.plotAdapter = ra(f, a, d), this.computeAdapter = na(this._computeCache);
220
1218
  }
221
- async run(n) {
1219
+ /**
1220
+ * The coordinate reference system used internally by the autk workspace.
1221
+ *
1222
+ * Input data is expected in EPSG:4326 (WGS84) by default and is transformed
1223
+ * to this CRS on load. Consumers that prepare data for injection (e.g. by
1224
+ * serialising a GeoDataFrame) can read this value and reproject accordingly
1225
+ * instead of hard-coding a CRS string.
1226
+ */
1227
+ get workspaceCrs() {
1228
+ return Te;
1229
+ }
1230
+ get data() {
1231
+ return this._data;
1232
+ }
1233
+ async run(f) {
222
1234
  if (!this.dataAdapter)
223
1235
  throw new Error("Database adapter not initialized. Please call the constructor first.");
224
1236
  if (!this.mapAdapter)
@@ -227,8 +1239,8 @@ class O {
227
1239
  throw new Error("Plot adapter not initialized. Please call the constructor first.");
228
1240
  if (!this.computeAdapter)
229
1241
  throw new Error("Compute adapter not initialized. Please call the constructor first.");
230
- this.grammarEngine = R({
231
- spec: n,
1242
+ this.grammarEngine = qe({
1243
+ spec: f,
232
1244
  adapters: {
233
1245
  db: this.dataAdapter,
234
1246
  map: this.mapAdapter,
@@ -236,11 +1248,27 @@ class O {
236
1248
  compute: this.computeAdapter
237
1249
  }
238
1250
  }), await this.grammarEngine.run();
1251
+ const a = this.grammarEngine.context;
1252
+ if (!a) {
1253
+ console.warn("Grammar engine produced no data context."), this._data = {};
1254
+ return;
1255
+ }
1256
+ const d = {};
1257
+ for (const c of a.getLayerTables())
1258
+ Object.defineProperty(d, c.name, {
1259
+ get: () => {
1260
+ const t = this._computeCache.get(c.name);
1261
+ return t ? Promise.resolve(t) : a.getLayer(c.name);
1262
+ },
1263
+ enumerable: !0,
1264
+ configurable: !0
1265
+ });
1266
+ this._data = d;
239
1267
  }
240
1268
  }
241
1269
  export {
242
- O as AutkGrammar,
243
- K as ColorMapInterpolator,
244
- Q as NormalizationMode
1270
+ ha as AutkGrammar,
1271
+ ga as ColorMapInterpolator,
1272
+ ya as NormalizationMode
245
1273
  };
246
1274
  //# sourceMappingURL=autk-grammar.js.map