@genome-spy/app 1.1.1 → 1.3.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/dist/{SharedReadCache-Ey5QIiPM.js → SharedReadCache-9sT2aIxW.js} +6 -12
- package/dist/__vite-browser-external-Dgu_Ldik.js +7 -0
- package/dist/{agentApi-sPuuT0KS.js → agentApi-BclFF9zB.js} +9981 -8914
- package/dist/agentApi.es.js +6783 -5135
- package/dist/agentShared.es.js +433 -460
- package/dist/arrayUtils-Bm7QnzhN.js +1306 -0
- package/dist/{blosc-JROzDOnd.js → blosc-C-W97QwH.js} +3 -3
- package/dist/{canvas2d-iDK4BC5j.js → canvas2d-8MSf70d4.js} +141 -134
- package/dist/{canvas2d-MXaFeZnP.js → canvas2d-BwGNI_Rx.js} +147 -141
- package/dist/clipOptions-SrrxeAEU.js +4316 -0
- package/dist/clipOptions-clBEbkjv.js +4326 -0
- package/dist/{layoutResult-D50MSHXR.js → color-jETn8xK_.js} +29 -10
- package/dist/color-uTRRsy8i.js +116 -0
- package/dist/{componentStyles-DGtQXvwc.js → componentStyles-C7FbjS-a.js} +1 -1
- package/dist/{viewIdentityRegistry-BIYd4TE0.js → containerView-BItRtKqu.js} +28 -31
- package/dist/{viewIdentityRegistry-BDKkEjXl.js → containerView-CWa6ZIJW.js} +28 -31
- package/dist/{debug-DbigmdrK.js → debug-23s-jja_.js} +10 -9
- package/dist/{debug-BlqDxTw3.js → debug-CWRxvAss.js} +9 -10
- package/dist/dialog.es.js +1 -1
- package/dist/dist-CmY6iewb.js +1501 -0
- package/dist/dist-D6xbz5Ks.js +1501 -0
- package/dist/{esm-CjkeZi__.js → esm-BFwBAnbO.js} +25 -25
- package/dist/esm-BUkWqSr2.js +299 -0
- package/dist/{esm-C-6g-SkZ.js → esm-C0xXMLsR.js} +37 -41
- package/dist/{esm-CJeszW-t.js → esm-C2xhhXs0.js} +7 -7
- package/dist/esm-C6erfjPM.js +252 -0
- package/dist/{esm-DFHFX1sH.js → esm-CVjC7qA4.js} +34 -38
- package/dist/esm-CqY5ezGz.js +1249 -0
- package/dist/esm-DfMIJ_N2.js +1522 -0
- package/dist/esm-Dls41IbZ.js +787 -0
- package/dist/{esm-Bv7Frz7C.js → esm-DzQDfrsZ.js} +7 -10
- package/dist/esm-aGLCvYRP.js +238 -0
- package/dist/{esm-VFJeyk9i.js → esm-nzwgJFGz.js} +40 -36
- package/dist/figWigMetadataSourceAdapter-8Kf_vZRf.js +36 -0
- package/dist/figWigMetadataSourceAdapter-DdDMZpYO.js +36 -0
- package/dist/flowNode-BSjy0Wz3.js +1306 -0
- package/dist/flowOutput-D5qpxWe0.js +183 -0
- package/dist/index.es.js +4766 -5522
- package/dist/index.js +1089 -685
- package/dist/inflate-BdC5KvHn.js +886 -0
- package/dist/{lz4-CUYSbVey.js → lz4-BLPgBOlE.js} +1 -1
- package/dist/markUtils-RaatLEa-.js +78 -0
- package/dist/{metadataChannels-DV62inJh.js → metadataChannels-DLSmx7kU.js} +6 -3
- package/dist/metadataUtils-DxEPe0vj.js +879 -0
- package/dist/order-BnKzKjt4.js +1151 -0
- package/dist/order-BpJnq_nV.js +1150 -0
- package/dist/{parquetRead-0hFIa3Cc.js → parquetRead-D-yY8njE.js} +3 -11
- package/dist/{rasterExport-B62RmAK1.js → rasterExport-B-WrX1pa.js} +5 -5
- package/dist/{rasterExport-DQH3hVg_.js → rasterExport-C_vx4Jwd.js} +4 -4
- package/dist/{rasterization-B05bDo5e.js → rasterization-QktH8Sn2.js} +26 -19
- package/dist/rectangle-BAdoDPXu.js +194 -0
- package/dist/{rectangle-DE98gIxF.js → rectangle-DZTR6NFQ.js} +10 -1
- package/dist/renderCanvas2D-CsRO78Pq.js +291 -0
- package/dist/{renderCanvas2D-Bdv-B4wj.js → renderCanvas2D-Y7pkRzbC.js} +98 -92
- package/dist/{rolldown-runtime-DF993M8W.js → rolldown-runtime-DeIk2rA4.js} +1 -1
- package/dist/{indexer-DbFTKGlm.js → scaleNull-CVzag4z8.js} +2 -12
- package/dist/{indexer-En7gpvLN.js → scaleNull-Pbz7QGnl.js} +2 -12
- package/dist/{scalePosition-ByvlXaML.js → scalePosition-CRXa0rCC.js} +8 -1
- package/dist/schema.json +33403 -16929
- package/dist/style.css +1 -1
- package/dist/{svg-N3tj05-e.js → svg-BBMtLgtM.js} +445 -362
- package/dist/{svg-DHsq1RpV.js → svg-JjWL6U-T.js} +464 -381
- package/dist/{svgRasterizer-CYVDlt5z.js → svgRasterizer-6OcftuoI.js} +3 -3
- package/dist/{svgRasterizer-CvCBlxLj.js → svgRasterizer-DkNRaCPs.js} +4 -4
- package/dist/tableMetadataSourceAdapter-CUNwLsdi.js +291 -0
- package/dist/tableMetadataSourceAdapter-DQrEXCo6.js +1283 -0
- package/dist/url-DeOdSRrv.js +183 -0
- package/dist/viewError-B0TMfOpB.js +33 -0
- package/dist/viewError-D9aO90cI.js +33 -0
- package/dist/{viewSelectors-DDLW-byr.js → viewSelectors-DkFvo33d.js} +914 -752
- package/dist/{viewSelectors-j-F9XwsE.js → viewSelectors-lM93fHAq.js} +942 -780
- package/dist/viewUtils-0SJOewM6.js +6195 -0
- package/dist/webgl-CXIO3OQz.js +5782 -0
- package/dist/webgl-Pdvfhio5.js +5783 -0
- package/package.json +7 -5
- package/src/agentApi/index.d.ts +3 -2
- package/src/agentShared/index.d.ts +2 -0
- package/src/appTypes.d.ts +1 -6
- package/src/embedTypes.d.ts +36 -1
- package/src/index.d.ts +6 -0
- package/src/spec/sampleView.d.ts +68 -13
- package/src/spec/view.d.ts +44 -5
- package/src/state/paramProvenanceTypes.d.ts +25 -2
- package/src/state.d.ts +14 -52
- package/dist/clipOptions-B5PibDq3.js +0 -2923
- package/dist/clipOptions-Cba4I0AO.js +0 -2903
- package/dist/esm-Dndm-NaA.js +0 -1193
- package/dist/order-B4uR9Q04.js +0 -1062
- package/dist/order-BSPy5DI8.js +0 -1062
- package/dist/renderCanvas2D-ChdoHGrU.js +0 -285
- package/dist/vega-scale-Byaw1K8O.js +0 -2446
- package/dist/vega-scale-Ctz_wa3z.js +0 -2443
- package/dist/viewError-BiR9VCgL.js +0 -29
- package/dist/viewUtils-JX6CMEYH.js +0 -6664
- package/dist/webgl-DdmOwEH0.js +0 -5544
- package/dist/webgl-Dw8xqZpX.js +0 -5544
|
@@ -0,0 +1,879 @@
|
|
|
1
|
+
import { C as e, J as t, Q as n, S as r, X as i, Y as a, Z as o, a as s, b as c, c as l, d as u, f as d, h as f, l as ee, m as p, o as te, p as ne, q as m, tt as h, u as re, w as ie, x as g } from "./arrayUtils-Bm7QnzhN.js";
|
|
2
|
+
import { o as _ } from "./flowOutput-D5qpxWe0.js";
|
|
3
|
+
//#region ../../node_modules/d3-dsv/src/dsv.js
|
|
4
|
+
var v = {}, y = {}, b = 34, x = 10, S = 13;
|
|
5
|
+
function C(e) {
|
|
6
|
+
return Function("d", "return {" + e.map(function(e, t) {
|
|
7
|
+
return JSON.stringify(e) + ": d[" + t + "] || \"\"";
|
|
8
|
+
}).join(",") + "}");
|
|
9
|
+
}
|
|
10
|
+
function ae(e, t) {
|
|
11
|
+
var n = C(e);
|
|
12
|
+
return function(r, i) {
|
|
13
|
+
return t(n(r), i, e);
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function w(e) {
|
|
17
|
+
var t = Object.create(null), n = [];
|
|
18
|
+
return e.forEach(function(e) {
|
|
19
|
+
for (var r in e) r in t || n.push(t[r] = r);
|
|
20
|
+
}), n;
|
|
21
|
+
}
|
|
22
|
+
function T(e, t) {
|
|
23
|
+
var n = e + "", r = n.length;
|
|
24
|
+
return r < t ? Array(t - r + 1).join(0) + n : n;
|
|
25
|
+
}
|
|
26
|
+
function oe(e) {
|
|
27
|
+
return e < 0 ? "-" + T(-e, 6) : e > 9999 ? "+" + T(e, 6) : T(e, 4);
|
|
28
|
+
}
|
|
29
|
+
function se(e) {
|
|
30
|
+
var t = e.getUTCHours(), n = e.getUTCMinutes(), r = e.getUTCSeconds(), i = e.getUTCMilliseconds();
|
|
31
|
+
return isNaN(e) ? "Invalid Date" : oe(e.getUTCFullYear(), 4) + "-" + T(e.getUTCMonth() + 1, 2) + "-" + T(e.getUTCDate(), 2) + (i ? "T" + T(t, 2) + ":" + T(n, 2) + ":" + T(r, 2) + "." + T(i, 3) + "Z" : r ? "T" + T(t, 2) + ":" + T(n, 2) + ":" + T(r, 2) + "Z" : n || t ? "T" + T(t, 2) + ":" + T(n, 2) + "Z" : "");
|
|
32
|
+
}
|
|
33
|
+
function E(e) {
|
|
34
|
+
var t = RegExp("[\"" + e + "\n\r]"), n = e.charCodeAt(0);
|
|
35
|
+
function r(e, t) {
|
|
36
|
+
var n, r, a = i(e, function(e, i) {
|
|
37
|
+
if (n) return n(e, i - 1);
|
|
38
|
+
r = e, n = t ? ae(e, t) : C(e);
|
|
39
|
+
});
|
|
40
|
+
return a.columns = r || [], a;
|
|
41
|
+
}
|
|
42
|
+
function i(e, t) {
|
|
43
|
+
var r = [], i = e.length, a = 0, o = 0, s, c = i <= 0, l = !1;
|
|
44
|
+
e.charCodeAt(i - 1) === x && --i, e.charCodeAt(i - 1) === S && --i;
|
|
45
|
+
function u() {
|
|
46
|
+
if (c) return y;
|
|
47
|
+
if (l) return l = !1, v;
|
|
48
|
+
var t, r = a, o;
|
|
49
|
+
if (e.charCodeAt(r) === b) {
|
|
50
|
+
for (; a++ < i && e.charCodeAt(a) !== b || e.charCodeAt(++a) === b;);
|
|
51
|
+
return (t = a) >= i ? c = !0 : (o = e.charCodeAt(a++)) === x ? l = !0 : o === S && (l = !0, e.charCodeAt(a) === x && ++a), e.slice(r + 1, t - 1).replace(/""/g, "\"");
|
|
52
|
+
}
|
|
53
|
+
for (; a < i;) {
|
|
54
|
+
if ((o = e.charCodeAt(t = a++)) === x) l = !0;
|
|
55
|
+
else if (o === S) l = !0, e.charCodeAt(a) === x && ++a;
|
|
56
|
+
else if (o !== n) continue;
|
|
57
|
+
return e.slice(r, t);
|
|
58
|
+
}
|
|
59
|
+
return c = !0, e.slice(r, i);
|
|
60
|
+
}
|
|
61
|
+
for (; (s = u()) !== y;) {
|
|
62
|
+
for (var d = []; s !== v && s !== y;) d.push(s), s = u();
|
|
63
|
+
t && (d = t(d, o++)) == null || r.push(d);
|
|
64
|
+
}
|
|
65
|
+
return r;
|
|
66
|
+
}
|
|
67
|
+
function a(t, n) {
|
|
68
|
+
return t.map(function(t) {
|
|
69
|
+
return n.map(function(e) {
|
|
70
|
+
return u(t[e]);
|
|
71
|
+
}).join(e);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
function o(t, n) {
|
|
75
|
+
return n ??= w(t), [n.map(u).join(e)].concat(a(t, n)).join("\n");
|
|
76
|
+
}
|
|
77
|
+
function s(e, t) {
|
|
78
|
+
return t ??= w(e), a(e, t).join("\n");
|
|
79
|
+
}
|
|
80
|
+
function c(e) {
|
|
81
|
+
return e.map(l).join("\n");
|
|
82
|
+
}
|
|
83
|
+
function l(t) {
|
|
84
|
+
return t.map(u).join(e);
|
|
85
|
+
}
|
|
86
|
+
function u(e) {
|
|
87
|
+
return e == null ? "" : e instanceof Date ? se(e) : t.test(e += "") ? "\"" + e.replace(/"/g, "\"\"") + "\"" : e;
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
parse: r,
|
|
91
|
+
parseRows: i,
|
|
92
|
+
format: o,
|
|
93
|
+
formatBody: s,
|
|
94
|
+
formatRows: c,
|
|
95
|
+
formatRow: l,
|
|
96
|
+
formatValue: u
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
//#endregion
|
|
100
|
+
//#region ../../node_modules/vega-loader/node_modules/vega-util/build/accessor.js
|
|
101
|
+
function D(e, t, n) {
|
|
102
|
+
return Object.assign(e, {
|
|
103
|
+
fields: t || [],
|
|
104
|
+
fname: n
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region ../../node_modules/vega-loader/node_modules/vega-util/build/getter.js
|
|
109
|
+
function ce(e) {
|
|
110
|
+
return e.length === 1 ? le(e[0]) : ue(e);
|
|
111
|
+
}
|
|
112
|
+
var le = (e) => function(t) {
|
|
113
|
+
return t[e];
|
|
114
|
+
}, ue = (e) => {
|
|
115
|
+
let t = e.length;
|
|
116
|
+
return function(n) {
|
|
117
|
+
for (let r = 0; r < t; ++r) n = n[e[r]];
|
|
118
|
+
return n;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
//#endregion
|
|
122
|
+
//#region ../../node_modules/vega-loader/node_modules/vega-util/build/error.js
|
|
123
|
+
function O(e) {
|
|
124
|
+
throw Error(e);
|
|
125
|
+
}
|
|
126
|
+
//#endregion
|
|
127
|
+
//#region ../../node_modules/vega-loader/node_modules/vega-util/build/splitAccessPath.js
|
|
128
|
+
function de(e) {
|
|
129
|
+
let t = [], n = e.length, r = null, i = 0, a = "", o, s, c;
|
|
130
|
+
e += "";
|
|
131
|
+
function l() {
|
|
132
|
+
t.push(a + e.substring(o, s)), a = "", o = s + 1;
|
|
133
|
+
}
|
|
134
|
+
for (o = s = 0; s < n; ++s) if (c = e[s], c === "\\") a += e.substring(o, s++), o = s;
|
|
135
|
+
else if (c === r) l(), r = null, i = -1;
|
|
136
|
+
else if (r) continue;
|
|
137
|
+
else o === i && c === "\"" || o === i && c === "'" ? (o = s + 1, r = c) : c === "." && !i ? s > o ? l() : o = s + 1 : c === "[" ? (s > o && l(), i = o = s + 1) : c === "]" && (i || O("Access path missing open bracket: " + e), i > 0 && l(), i = 0, o = s + 1);
|
|
138
|
+
return i && O("Access path missing closing bracket: " + e), r && O("Access path missing closing quote: " + e), s > o && (s++, l()), t;
|
|
139
|
+
}
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region ../../node_modules/vega-loader/node_modules/vega-util/build/field.js
|
|
142
|
+
function fe(e, t, n) {
|
|
143
|
+
let r = de(e), i = r.length === 1 ? r[0] : e;
|
|
144
|
+
return D((n && n.get || ce)(r), [i], t || i);
|
|
145
|
+
}
|
|
146
|
+
fe("id");
|
|
147
|
+
var pe = D((e) => e, [], "identity");
|
|
148
|
+
D(() => 0, [], "zero"), D(() => 1, [], "one"), D(() => !0, [], "true"), D(() => !1, [], "false"), [...Object.getOwnPropertyNames(Object.prototype).filter((e) => typeof Object.prototype[e] == "function")];
|
|
149
|
+
//#endregion
|
|
150
|
+
//#region ../../node_modules/vega-loader/node_modules/vega-util/build/isArray.js
|
|
151
|
+
var me = Array.isArray;
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region ../../node_modules/vega-loader/node_modules/vega-util/build/isObject.js
|
|
154
|
+
function he(e) {
|
|
155
|
+
return e === Object(e);
|
|
156
|
+
}
|
|
157
|
+
//#endregion
|
|
158
|
+
//#region ../../node_modules/vega-loader/node_modules/vega-util/build/toNumber.js
|
|
159
|
+
function ge(e) {
|
|
160
|
+
return e == null || e === "" ? null : +e;
|
|
161
|
+
}
|
|
162
|
+
//#endregion
|
|
163
|
+
//#region ../../node_modules/vega-loader/node_modules/vega-util/build/isFunction.js
|
|
164
|
+
function k(e) {
|
|
165
|
+
return typeof e == "function";
|
|
166
|
+
}
|
|
167
|
+
//#endregion
|
|
168
|
+
//#region ../../node_modules/vega-loader/node_modules/vega-util/build/extend.js
|
|
169
|
+
function _e(e, ...t) {
|
|
170
|
+
for (let n of t) for (let t in n) e[t] = n[t];
|
|
171
|
+
return e;
|
|
172
|
+
}
|
|
173
|
+
//#endregion
|
|
174
|
+
//#region ../../node_modules/vega-loader/node_modules/vega-util/build/hasOwnProperty.js
|
|
175
|
+
function A(e, t) {
|
|
176
|
+
return Object.hasOwn(e, t);
|
|
177
|
+
}
|
|
178
|
+
//#endregion
|
|
179
|
+
//#region ../../node_modules/vega-loader/node_modules/vega-util/build/isDate.js
|
|
180
|
+
function ve(e) {
|
|
181
|
+
return Object.prototype.toString.call(e) === "[object Date]";
|
|
182
|
+
}
|
|
183
|
+
//#endregion
|
|
184
|
+
//#region ../../node_modules/vega-loader/node_modules/vega-util/build/isIterable.js
|
|
185
|
+
function ye(e) {
|
|
186
|
+
return e != null && k(e[Symbol.iterator]);
|
|
187
|
+
}
|
|
188
|
+
//#endregion
|
|
189
|
+
//#region ../../node_modules/vega-loader/node_modules/vega-util/build/isNumber.js
|
|
190
|
+
function be(e) {
|
|
191
|
+
return typeof e == "number";
|
|
192
|
+
}
|
|
193
|
+
//#endregion
|
|
194
|
+
//#region ../../node_modules/vega-loader/node_modules/vega-util/build/isString.js
|
|
195
|
+
function xe(e) {
|
|
196
|
+
return typeof e == "string";
|
|
197
|
+
}
|
|
198
|
+
//#endregion
|
|
199
|
+
//#region ../../node_modules/vega-loader/node_modules/vega-util/build/stringValue.js
|
|
200
|
+
function j(e) {
|
|
201
|
+
return me(e) ? `[${e.map((e) => e === null ? "null" : j(e))}]` : he(e) || xe(e) ? JSON.stringify(e).replaceAll("\u2028", "\\u2028").replaceAll("\u2029", "\\u2029") : e;
|
|
202
|
+
}
|
|
203
|
+
//#endregion
|
|
204
|
+
//#region ../../node_modules/vega-loader/node_modules/vega-util/build/toBoolean.js
|
|
205
|
+
function Se(e) {
|
|
206
|
+
return e == null || e === "" ? null : !e || e === "false" || e === "0" ? !1 : !!e;
|
|
207
|
+
}
|
|
208
|
+
//#endregion
|
|
209
|
+
//#region ../../node_modules/vega-loader/node_modules/vega-util/build/toDate.js
|
|
210
|
+
var Ce = (e) => be(e) || ve(e) ? e : Date.parse(e);
|
|
211
|
+
function we(e, t) {
|
|
212
|
+
return t ||= Ce, e == null || e === "" ? null : t(e);
|
|
213
|
+
}
|
|
214
|
+
//#endregion
|
|
215
|
+
//#region ../../node_modules/vega-loader/node_modules/vega-util/build/toString.js
|
|
216
|
+
function Te(e) {
|
|
217
|
+
return e == null || e === "" ? null : e + "";
|
|
218
|
+
}
|
|
219
|
+
//#endregion
|
|
220
|
+
//#region ../../node_modules/topojson-client/src/identity.js
|
|
221
|
+
function Ee(e) {
|
|
222
|
+
return e;
|
|
223
|
+
}
|
|
224
|
+
//#endregion
|
|
225
|
+
//#region ../../node_modules/topojson-client/src/transform.js
|
|
226
|
+
function De(e) {
|
|
227
|
+
if (e == null) return Ee;
|
|
228
|
+
var t, n, r = e.scale[0], i = e.scale[1], a = e.translate[0], o = e.translate[1];
|
|
229
|
+
return function(e, s) {
|
|
230
|
+
s || (t = n = 0);
|
|
231
|
+
var c = 2, l = e.length, u = Array(l);
|
|
232
|
+
for (u[0] = (t += e[0]) * r + a, u[1] = (n += e[1]) * i + o; c < l;) u[c] = e[c], ++c;
|
|
233
|
+
return u;
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
//#endregion
|
|
237
|
+
//#region ../../node_modules/topojson-client/src/reverse.js
|
|
238
|
+
function Oe(e, t) {
|
|
239
|
+
for (var n, r = e.length, i = r - t; i < --r;) n = e[i], e[i++] = e[r], e[r] = n;
|
|
240
|
+
}
|
|
241
|
+
//#endregion
|
|
242
|
+
//#region ../../node_modules/topojson-client/src/feature.js
|
|
243
|
+
function ke(e, t) {
|
|
244
|
+
return typeof t == "string" && (t = e.objects[t]), t.type === "GeometryCollection" ? {
|
|
245
|
+
type: "FeatureCollection",
|
|
246
|
+
features: t.geometries.map(function(t) {
|
|
247
|
+
return M(e, t);
|
|
248
|
+
})
|
|
249
|
+
} : M(e, t);
|
|
250
|
+
}
|
|
251
|
+
function M(e, t) {
|
|
252
|
+
var n = t.id, r = t.bbox, i = t.properties == null ? {} : t.properties, a = N(e, t);
|
|
253
|
+
return n == null && r == null ? {
|
|
254
|
+
type: "Feature",
|
|
255
|
+
properties: i,
|
|
256
|
+
geometry: a
|
|
257
|
+
} : r == null ? {
|
|
258
|
+
type: "Feature",
|
|
259
|
+
id: n,
|
|
260
|
+
properties: i,
|
|
261
|
+
geometry: a
|
|
262
|
+
} : {
|
|
263
|
+
type: "Feature",
|
|
264
|
+
id: n,
|
|
265
|
+
bbox: r,
|
|
266
|
+
properties: i,
|
|
267
|
+
geometry: a
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
function N(e, t) {
|
|
271
|
+
var n = De(e.transform), r = e.arcs;
|
|
272
|
+
function i(e, t) {
|
|
273
|
+
t.length && t.pop();
|
|
274
|
+
for (var i = r[e < 0 ? ~e : e], a = 0, o = i.length; a < o; ++a) t.push(n(i[a], a));
|
|
275
|
+
e < 0 && Oe(t, o);
|
|
276
|
+
}
|
|
277
|
+
function a(e) {
|
|
278
|
+
return n(e);
|
|
279
|
+
}
|
|
280
|
+
function o(e) {
|
|
281
|
+
for (var t = [], n = 0, r = e.length; n < r; ++n) i(e[n], t);
|
|
282
|
+
return t.length < 2 && t.push(t[0]), t;
|
|
283
|
+
}
|
|
284
|
+
function s(e) {
|
|
285
|
+
for (var t = o(e); t.length < 4;) t.push(t[0]);
|
|
286
|
+
return t;
|
|
287
|
+
}
|
|
288
|
+
function c(e) {
|
|
289
|
+
return e.map(s);
|
|
290
|
+
}
|
|
291
|
+
function l(e) {
|
|
292
|
+
var t = e.type, n;
|
|
293
|
+
switch (t) {
|
|
294
|
+
case "GeometryCollection": return {
|
|
295
|
+
type: t,
|
|
296
|
+
geometries: e.geometries.map(l)
|
|
297
|
+
};
|
|
298
|
+
case "Point":
|
|
299
|
+
n = a(e.coordinates);
|
|
300
|
+
break;
|
|
301
|
+
case "MultiPoint":
|
|
302
|
+
n = e.coordinates.map(a);
|
|
303
|
+
break;
|
|
304
|
+
case "LineString":
|
|
305
|
+
n = o(e.arcs);
|
|
306
|
+
break;
|
|
307
|
+
case "MultiLineString":
|
|
308
|
+
n = e.arcs.map(o);
|
|
309
|
+
break;
|
|
310
|
+
case "Polygon":
|
|
311
|
+
n = c(e.arcs);
|
|
312
|
+
break;
|
|
313
|
+
case "MultiPolygon":
|
|
314
|
+
n = e.arcs.map(c);
|
|
315
|
+
break;
|
|
316
|
+
default: return null;
|
|
317
|
+
}
|
|
318
|
+
return {
|
|
319
|
+
type: t,
|
|
320
|
+
coordinates: n
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
return l(t);
|
|
324
|
+
}
|
|
325
|
+
//#endregion
|
|
326
|
+
//#region ../../node_modules/topojson-client/src/stitch.js
|
|
327
|
+
function Ae(e, t) {
|
|
328
|
+
var n = {}, r = {}, i = {}, a = [], o = -1;
|
|
329
|
+
t.forEach(function(n, r) {
|
|
330
|
+
var i = e.arcs[n < 0 ? ~n : n], a;
|
|
331
|
+
i.length < 3 && !i[1][0] && !i[1][1] && (a = t[++o], t[o] = n, t[r] = a);
|
|
332
|
+
}), t.forEach(function(e) {
|
|
333
|
+
var t = s(e), n = t[0], a = t[1], o, c;
|
|
334
|
+
if (o = i[n]) {
|
|
335
|
+
if (delete i[o.end], o.push(e), o.end = a, c = r[a]) {
|
|
336
|
+
delete r[c.start];
|
|
337
|
+
var l = c === o ? o : o.concat(c);
|
|
338
|
+
r[l.start = o.start] = i[l.end = c.end] = l;
|
|
339
|
+
} else r[o.start] = i[o.end] = o;
|
|
340
|
+
} else if (o = r[a]) {
|
|
341
|
+
if (delete r[o.start], o.unshift(e), o.start = n, c = i[n]) {
|
|
342
|
+
delete i[c.end];
|
|
343
|
+
var u = c === o ? o : c.concat(o);
|
|
344
|
+
r[u.start = c.start] = i[u.end = o.end] = u;
|
|
345
|
+
} else r[o.start] = i[o.end] = o;
|
|
346
|
+
} else o = [e], r[o.start = n] = i[o.end = a] = o;
|
|
347
|
+
});
|
|
348
|
+
function s(t) {
|
|
349
|
+
var n = e.arcs[t < 0 ? ~t : t], r = n[0], i;
|
|
350
|
+
return e.transform ? (i = [0, 0], n.forEach(function(e) {
|
|
351
|
+
i[0] += e[0], i[1] += e[1];
|
|
352
|
+
})) : i = n[n.length - 1], t < 0 ? [i, r] : [r, i];
|
|
353
|
+
}
|
|
354
|
+
function c(e, t) {
|
|
355
|
+
for (var r in e) {
|
|
356
|
+
var i = e[r];
|
|
357
|
+
delete t[i.start], delete i.start, delete i.end, i.forEach(function(e) {
|
|
358
|
+
n[e < 0 ? ~e : e] = 1;
|
|
359
|
+
}), a.push(i);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
return c(i, r), c(r, i), t.forEach(function(e) {
|
|
363
|
+
n[e < 0 ? ~e : e] || a.push([e]);
|
|
364
|
+
}), a;
|
|
365
|
+
}
|
|
366
|
+
//#endregion
|
|
367
|
+
//#region ../../node_modules/topojson-client/src/mesh.js
|
|
368
|
+
function je(e) {
|
|
369
|
+
return N(e, Me.apply(this, arguments));
|
|
370
|
+
}
|
|
371
|
+
function Me(e, t, n) {
|
|
372
|
+
var r, i, a;
|
|
373
|
+
if (arguments.length > 1) r = Ne(e, t, n);
|
|
374
|
+
else for (i = 0, r = Array(a = e.arcs.length); i < a; ++i) r[i] = i;
|
|
375
|
+
return {
|
|
376
|
+
type: "MultiLineString",
|
|
377
|
+
arcs: Ae(e, r)
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
function Ne(e, t, n) {
|
|
381
|
+
var r = [], i = [], a;
|
|
382
|
+
function o(e) {
|
|
383
|
+
var t = e < 0 ? ~e : e;
|
|
384
|
+
(i[t] || (i[t] = [])).push({
|
|
385
|
+
i: e,
|
|
386
|
+
g: a
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
function s(e) {
|
|
390
|
+
e.forEach(o);
|
|
391
|
+
}
|
|
392
|
+
function c(e) {
|
|
393
|
+
e.forEach(s);
|
|
394
|
+
}
|
|
395
|
+
function l(e) {
|
|
396
|
+
e.forEach(c);
|
|
397
|
+
}
|
|
398
|
+
function u(e) {
|
|
399
|
+
switch (a = e, e.type) {
|
|
400
|
+
case "GeometryCollection":
|
|
401
|
+
e.geometries.forEach(u);
|
|
402
|
+
break;
|
|
403
|
+
case "LineString":
|
|
404
|
+
s(e.arcs);
|
|
405
|
+
break;
|
|
406
|
+
case "MultiLineString":
|
|
407
|
+
case "Polygon":
|
|
408
|
+
c(e.arcs);
|
|
409
|
+
break;
|
|
410
|
+
case "MultiPolygon": l(e.arcs);
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
return u(t), i.forEach(n == null ? function(e) {
|
|
414
|
+
r.push(e[0].i);
|
|
415
|
+
} : function(e) {
|
|
416
|
+
n(e[0].g, e[e.length - 1].g) && r.push(e[0].i);
|
|
417
|
+
}), r;
|
|
418
|
+
}
|
|
419
|
+
//#endregion
|
|
420
|
+
//#region ../../node_modules/vega-format/node_modules/vega-util/build/accessor.js
|
|
421
|
+
function P(e, t, n) {
|
|
422
|
+
return Object.assign(e, {
|
|
423
|
+
fields: t || [],
|
|
424
|
+
fname: n
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
//#endregion
|
|
428
|
+
//#region ../../node_modules/vega-format/node_modules/vega-util/build/getter.js
|
|
429
|
+
function Pe(e) {
|
|
430
|
+
return e.length === 1 ? Fe(e[0]) : Ie(e);
|
|
431
|
+
}
|
|
432
|
+
var Fe = (e) => function(t) {
|
|
433
|
+
return t[e];
|
|
434
|
+
}, Ie = (e) => {
|
|
435
|
+
let t = e.length;
|
|
436
|
+
return function(n) {
|
|
437
|
+
for (let r = 0; r < t; ++r) n = n[e[r]];
|
|
438
|
+
return n;
|
|
439
|
+
};
|
|
440
|
+
};
|
|
441
|
+
//#endregion
|
|
442
|
+
//#region ../../node_modules/vega-format/node_modules/vega-util/build/error.js
|
|
443
|
+
function F(e) {
|
|
444
|
+
throw Error(e);
|
|
445
|
+
}
|
|
446
|
+
//#endregion
|
|
447
|
+
//#region ../../node_modules/vega-format/node_modules/vega-util/build/splitAccessPath.js
|
|
448
|
+
function Le(e) {
|
|
449
|
+
let t = [], n = e.length, r = null, i = 0, a = "", o, s, c;
|
|
450
|
+
e += "";
|
|
451
|
+
function l() {
|
|
452
|
+
t.push(a + e.substring(o, s)), a = "", o = s + 1;
|
|
453
|
+
}
|
|
454
|
+
for (o = s = 0; s < n; ++s) if (c = e[s], c === "\\") a += e.substring(o, s++), o = s;
|
|
455
|
+
else if (c === r) l(), r = null, i = -1;
|
|
456
|
+
else if (r) continue;
|
|
457
|
+
else o === i && c === "\"" || o === i && c === "'" ? (o = s + 1, r = c) : c === "." && !i ? s > o ? l() : o = s + 1 : c === "[" ? (s > o && l(), i = o = s + 1) : c === "]" && (i || F("Access path missing open bracket: " + e), i > 0 && l(), i = 0, o = s + 1);
|
|
458
|
+
return i && F("Access path missing closing bracket: " + e), r && F("Access path missing closing quote: " + e), s > o && (s++, l()), t;
|
|
459
|
+
}
|
|
460
|
+
//#endregion
|
|
461
|
+
//#region ../../node_modules/vega-format/node_modules/vega-util/build/field.js
|
|
462
|
+
function Re(e, t, n) {
|
|
463
|
+
let r = Le(e), i = r.length === 1 ? r[0] : e;
|
|
464
|
+
return P((n && n.get || Pe)(r), [i], t || i);
|
|
465
|
+
}
|
|
466
|
+
Re("id"), P((e) => e, [], "identity"), P(() => 0, [], "zero"), P(() => 1, [], "one"), P(() => !0, [], "true"), P(() => !1, [], "false"), [...Object.getOwnPropertyNames(Object.prototype).filter((e) => typeof Object.prototype[e] == "function")], Array.isArray;
|
|
467
|
+
//#endregion
|
|
468
|
+
//#region ../../node_modules/vega-format/node_modules/vega-util/build/isObject.js
|
|
469
|
+
function ze(e) {
|
|
470
|
+
return e === Object(e);
|
|
471
|
+
}
|
|
472
|
+
//#endregion
|
|
473
|
+
//#region ../../node_modules/vega-format/node_modules/vega-util/build/isString.js
|
|
474
|
+
function I(e) {
|
|
475
|
+
return typeof e == "string";
|
|
476
|
+
}
|
|
477
|
+
//#endregion
|
|
478
|
+
//#region ../../node_modules/vega-format/build/vega-format.js
|
|
479
|
+
function L(e) {
|
|
480
|
+
let t = {};
|
|
481
|
+
return (n) => t[n] || (t[n] = e(n));
|
|
482
|
+
}
|
|
483
|
+
function Be(e, t) {
|
|
484
|
+
return (n) => {
|
|
485
|
+
let r = e(n), i = r.indexOf(t);
|
|
486
|
+
if (i < 0) return r;
|
|
487
|
+
let a = Ve(r, i), o = a < r.length ? r.slice(a) : "";
|
|
488
|
+
for (; --a > i;) if (r[a] !== "0") {
|
|
489
|
+
++a;
|
|
490
|
+
break;
|
|
491
|
+
}
|
|
492
|
+
return r.slice(0, a) + o;
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
function Ve(e, t) {
|
|
496
|
+
let n = e.lastIndexOf("e"), r;
|
|
497
|
+
if (n > 0) return n;
|
|
498
|
+
for (n = e.length; --n > t;) if (r = e.charCodeAt(n), r >= 48 && r <= 57) return n + 1;
|
|
499
|
+
}
|
|
500
|
+
function He(e) {
|
|
501
|
+
let r = L(e.format), i = e.formatPrefix;
|
|
502
|
+
return {
|
|
503
|
+
format: r,
|
|
504
|
+
formatPrefix: i,
|
|
505
|
+
formatFloat(e) {
|
|
506
|
+
let t = n(e || ",");
|
|
507
|
+
if (t.precision == null) {
|
|
508
|
+
switch (t.precision = 12, t.type) {
|
|
509
|
+
case "%":
|
|
510
|
+
t.precision -= 2;
|
|
511
|
+
break;
|
|
512
|
+
case "e": --t.precision;
|
|
513
|
+
}
|
|
514
|
+
return Be(r(t), r(".1f")(1)[1]);
|
|
515
|
+
}
|
|
516
|
+
return r(t);
|
|
517
|
+
},
|
|
518
|
+
formatSpan(e, o, s, c) {
|
|
519
|
+
c = n(c ?? ",f");
|
|
520
|
+
let l = h(e, o, s), u = Math.max(Math.abs(e), Math.abs(o)), d;
|
|
521
|
+
if (c.precision == null) switch (c.type) {
|
|
522
|
+
case "s": return isNaN(d = t(l, u)) || (c.precision = d), i(c, u);
|
|
523
|
+
case "":
|
|
524
|
+
case "e":
|
|
525
|
+
case "g":
|
|
526
|
+
case "p":
|
|
527
|
+
case "r":
|
|
528
|
+
isNaN(d = m(l, u)) || (c.precision = d - (c.type === "e"));
|
|
529
|
+
break;
|
|
530
|
+
case "f":
|
|
531
|
+
case "%": isNaN(d = a(l)) || (c.precision = d - (c.type === "%") * 2);
|
|
532
|
+
}
|
|
533
|
+
return r(c);
|
|
534
|
+
}
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
Ue();
|
|
538
|
+
function Ue() {
|
|
539
|
+
return He({
|
|
540
|
+
format: i,
|
|
541
|
+
formatPrefix: o
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
function R(e, t, n) {
|
|
545
|
+
n ||= {}, ze(n) || F(`Invalid time multi-format specifier: ${n}`);
|
|
546
|
+
let r = t(u), i = t(l), a = t(te), o = t(s), c = t(d), f = t(ee), p = t(re), m = t(ne), h = e(n.milliseconds || ".%L"), ie = e(n.seconds || ":%S"), g = e(n.minutes || "%I:%M"), _ = e(n.hours || "%I %p"), v = e(n.date || n.day || "%a %d"), y = e(n.week || "%b %d"), b = e(n.month || "%B"), x = e(n.quarter || "%B"), S = e(n.year || "%Y");
|
|
547
|
+
return (e) => (r(e) < e ? h : i(e) < e ? ie : a(e) < e ? g : o(e) < e ? _ : f(e) < e ? c(e) < e ? v : y : m(e) < e ? p(e) < e ? b : x : S)(e);
|
|
548
|
+
}
|
|
549
|
+
function z(e) {
|
|
550
|
+
let t = L(e.format), n = L(e.utcFormat);
|
|
551
|
+
return {
|
|
552
|
+
timeFormat: (e) => I(e) ? t(e) : R(t, p, e),
|
|
553
|
+
utcFormat: (e) => I(e) ? n(e) : R(n, f, e),
|
|
554
|
+
timeParse: L(e.parse),
|
|
555
|
+
utcParse: L(e.utcParse)
|
|
556
|
+
};
|
|
557
|
+
}
|
|
558
|
+
var B;
|
|
559
|
+
We();
|
|
560
|
+
function We() {
|
|
561
|
+
return B = z({
|
|
562
|
+
format: c,
|
|
563
|
+
parse: g,
|
|
564
|
+
utcFormat: r,
|
|
565
|
+
utcParse: e
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
function Ge(e) {
|
|
569
|
+
return z(ie(e));
|
|
570
|
+
}
|
|
571
|
+
function Ke(e) {
|
|
572
|
+
return arguments.length ? B = Ge(e) : B;
|
|
573
|
+
}
|
|
574
|
+
//#endregion
|
|
575
|
+
//#region ../../node_modules/vega-loader/build/vega-loader.browser.js
|
|
576
|
+
var qe = (e) => e != null && e === e, Je = (e) => e === "true" || e === "false" || e === !0 || e === !1, Ye = (e) => !Number.isNaN(Date.parse(e)), V = (e) => !Number.isNaN(+e) && !(e instanceof Date), Xe = (e) => V(e) && Number.isInteger(+e), H = {
|
|
577
|
+
boolean: Se,
|
|
578
|
+
integer: ge,
|
|
579
|
+
number: ge,
|
|
580
|
+
date: we,
|
|
581
|
+
string: Te,
|
|
582
|
+
unknown: pe
|
|
583
|
+
}, U = [
|
|
584
|
+
Je,
|
|
585
|
+
Xe,
|
|
586
|
+
V,
|
|
587
|
+
Ye
|
|
588
|
+
], Ze = [
|
|
589
|
+
"boolean",
|
|
590
|
+
"integer",
|
|
591
|
+
"number",
|
|
592
|
+
"date"
|
|
593
|
+
];
|
|
594
|
+
function W(e, t) {
|
|
595
|
+
if (!e || !e.length) return "unknown";
|
|
596
|
+
let n = e.length, r = U.length, i = U.map((e, t) => t + 1);
|
|
597
|
+
for (let a = 0, o = 0, s, c; a < n; ++a) for (c = t ? e[a][t] : e[a], s = 0; s < r; ++s) if (i[s] && qe(c) && !U[s](c) && (i[s] = 0, ++o, o === U.length)) return "string";
|
|
598
|
+
return Ze[i.reduce((e, t) => e === 0 ? t : e, 0) - 1];
|
|
599
|
+
}
|
|
600
|
+
function Qe(e, t) {
|
|
601
|
+
return t.reduce((t, n) => (t[n] = W(e, n), t), {});
|
|
602
|
+
}
|
|
603
|
+
function G(e) {
|
|
604
|
+
let t = function(t, n) {
|
|
605
|
+
let r = { delimiter: e };
|
|
606
|
+
return K(t, n ? _e(n, r) : r);
|
|
607
|
+
};
|
|
608
|
+
return t.responseType = "text", t;
|
|
609
|
+
}
|
|
610
|
+
function K(e, t) {
|
|
611
|
+
return t.header && (e = t.header.map(j).join(t.delimiter) + "\n" + e), E(t.delimiter).parse(e + "");
|
|
612
|
+
}
|
|
613
|
+
K.responseType = "text";
|
|
614
|
+
function $e(e) {
|
|
615
|
+
return typeof Buffer == "function" && k(Buffer.isBuffer) ? Buffer.isBuffer(e) : !1;
|
|
616
|
+
}
|
|
617
|
+
function q(e, t) {
|
|
618
|
+
let n = t && t.property ? fe(t.property) : pe;
|
|
619
|
+
return he(e) && !$e(e) ? et(n(e), t) : n(JSON.parse(e));
|
|
620
|
+
}
|
|
621
|
+
q.responseType = "json";
|
|
622
|
+
function et(e, t) {
|
|
623
|
+
return !me(e) && ye(e) && (e = [...e]), t && t.copy ? JSON.parse(JSON.stringify(e)) : e;
|
|
624
|
+
}
|
|
625
|
+
var tt = {
|
|
626
|
+
interior: (e, t) => e !== t,
|
|
627
|
+
exterior: (e, t) => e === t
|
|
628
|
+
};
|
|
629
|
+
function J(e, t) {
|
|
630
|
+
let n, r, i, a;
|
|
631
|
+
return e = q(e, t), t && t.feature ? (n = ke, i = t.feature) : t && t.mesh ? (n = je, i = t.mesh, a = tt[t.filter]) : O("Missing TopoJSON feature or mesh parameter."), r = (r = e.objects[i]) ? n(e, r, a) : O("Invalid TopoJSON object: " + i), r && r.features || [r];
|
|
632
|
+
}
|
|
633
|
+
J.responseType = "json";
|
|
634
|
+
var Y = {
|
|
635
|
+
dsv: K,
|
|
636
|
+
csv: G(","),
|
|
637
|
+
tsv: G(" "),
|
|
638
|
+
json: q,
|
|
639
|
+
topojson: J
|
|
640
|
+
};
|
|
641
|
+
function nt(e, t) {
|
|
642
|
+
return arguments.length > 1 ? (Y[e] = t, this) : A(Y, e) ? Y[e] : null;
|
|
643
|
+
}
|
|
644
|
+
function rt(e, t, n, r) {
|
|
645
|
+
t ||= {};
|
|
646
|
+
let i = nt(t.type || "json");
|
|
647
|
+
return i || O("Unknown data format type: " + t.type), e = i(e, t), t.parse && it(e, t.parse, n, r), A(e, "columns") && delete e.columns, e;
|
|
648
|
+
}
|
|
649
|
+
function it(e, t, n, r) {
|
|
650
|
+
if (!e.length) return;
|
|
651
|
+
let i = Ke();
|
|
652
|
+
n ||= i.timeParse, r ||= i.utcParse;
|
|
653
|
+
let a = e.columns || Object.keys(e[0]), o, s, c, l, u, d;
|
|
654
|
+
t === "auto" && (t = Qe(e, a)), a = Object.keys(t);
|
|
655
|
+
let f = a.map((e) => {
|
|
656
|
+
let i = t[e], a, o;
|
|
657
|
+
if (i && (i.startsWith("date:") || i.startsWith("utc:"))) return a = i.split(/:(.+)?/, 2), o = a[1], (o[0] === "'" && o[o.length - 1] === "'" || o[0] === "\"" && o[o.length - 1] === "\"") && (o = o.slice(1, -1)), (a[0] === "utc" ? r : n)(o);
|
|
658
|
+
if (!H[i]) throw Error("Illegal format pattern: " + e + ":" + i);
|
|
659
|
+
return H[i];
|
|
660
|
+
});
|
|
661
|
+
for (c = 0, u = e.length, d = a.length; c < u; ++c) for (o = e[c], l = 0; l < d; ++l) s = a[l], o[s] = f[l](o[s]);
|
|
662
|
+
}
|
|
663
|
+
//#endregion
|
|
664
|
+
//#region src/utils/escapeSeparator.js
|
|
665
|
+
function at(e) {
|
|
666
|
+
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
667
|
+
}
|
|
668
|
+
function ot(e, t = "/") {
|
|
669
|
+
let n = at(t);
|
|
670
|
+
return e.replace(new RegExp(n, "g"), "\\" + t);
|
|
671
|
+
}
|
|
672
|
+
function X(e, t = "/") {
|
|
673
|
+
return e.map((e) => ot(e, t)).join(t);
|
|
674
|
+
}
|
|
675
|
+
function Z(e, t = "/") {
|
|
676
|
+
if (!t) return [e];
|
|
677
|
+
let n = t, r = [], i = "";
|
|
678
|
+
for (let t = 0; t < e.length; t++) {
|
|
679
|
+
let a = e[t];
|
|
680
|
+
if (a === "\\") {
|
|
681
|
+
if (e.substring(t + 1, t + 1 + n.length) === n) {
|
|
682
|
+
i += n, t += n.length;
|
|
683
|
+
continue;
|
|
684
|
+
}
|
|
685
|
+
i += "\\";
|
|
686
|
+
} else e.substring(t, t + n.length) === n ? (r.push(i), i = "", t += n.length - 1) : i += a;
|
|
687
|
+
}
|
|
688
|
+
return r.push(i), r;
|
|
689
|
+
}
|
|
690
|
+
//#endregion
|
|
691
|
+
//#region src/utils/dataLayout.js
|
|
692
|
+
function st(e, t = /* @__PURE__ */ new Set()) {
|
|
693
|
+
if (e.length === 0) return {};
|
|
694
|
+
let n = e[0], r = Object.keys(n).filter((e) => !t.has(e)), i = {};
|
|
695
|
+
for (let t of r) i[t] = e.map((e) => e[t]);
|
|
696
|
+
return i;
|
|
697
|
+
}
|
|
698
|
+
function ct(e) {
|
|
699
|
+
let t = Object.keys(e);
|
|
700
|
+
if (t.length === 0) return [];
|
|
701
|
+
let n = e[t[0]]?.length ?? 0;
|
|
702
|
+
for (let r of t) {
|
|
703
|
+
if (!Array.isArray(e[r])) throw Error(`Column "${r}" is not an array`);
|
|
704
|
+
if (e[r].length !== n) throw Error(`All columns must have identical lengths; "${r}" has length ${e[r].length}, expected ${n}`);
|
|
705
|
+
}
|
|
706
|
+
let r = [];
|
|
707
|
+
for (let i = 0; i < n; i++) {
|
|
708
|
+
let n = {};
|
|
709
|
+
for (let r of t) n[r] = e[r][i];
|
|
710
|
+
r.push(n);
|
|
711
|
+
}
|
|
712
|
+
return r;
|
|
713
|
+
}
|
|
714
|
+
var lt = "(Root)";
|
|
715
|
+
function ut(e, t) {
|
|
716
|
+
let n = typeof t == "string" && t.length > 0 ? (e) => Z(e, t) : (e) => [e], r = {
|
|
717
|
+
part: lt,
|
|
718
|
+
attribute: "",
|
|
719
|
+
path: "",
|
|
720
|
+
children: /* @__PURE__ */ new Map(),
|
|
721
|
+
parent: null
|
|
722
|
+
};
|
|
723
|
+
for (let t of e) {
|
|
724
|
+
let e = n(t), i = r;
|
|
725
|
+
for (let n = 0; n < e.length; n++) {
|
|
726
|
+
let r = e[n];
|
|
727
|
+
if (!i.children.has(r)) {
|
|
728
|
+
let a = {
|
|
729
|
+
part: r,
|
|
730
|
+
path: X(e.slice(0, n + 1), "/"),
|
|
731
|
+
attribute: t,
|
|
732
|
+
children: /* @__PURE__ */ new Map(),
|
|
733
|
+
parent: i
|
|
734
|
+
};
|
|
735
|
+
i.children.set(r, a);
|
|
736
|
+
}
|
|
737
|
+
i = i.children.get(r);
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
return r;
|
|
741
|
+
}
|
|
742
|
+
function dt(e) {
|
|
743
|
+
return e.length ? X(e, "/") + "/" : "";
|
|
744
|
+
}
|
|
745
|
+
function ft(e, t = [], n = []) {
|
|
746
|
+
if (!t.length) return e;
|
|
747
|
+
let r = dt(t), i = {};
|
|
748
|
+
for (let [t, a] of Object.entries(e)) n.includes(t) ? i[t] = a : i[r + t] = a;
|
|
749
|
+
return i;
|
|
750
|
+
}
|
|
751
|
+
function Q(e, t, n = "/") {
|
|
752
|
+
return X(Z(e, t), n);
|
|
753
|
+
}
|
|
754
|
+
function pt(e, t = {}, n, r, i = /* @__PURE__ */ new Set()) {
|
|
755
|
+
let a = ht(e, i);
|
|
756
|
+
if (n != null && typeof n != "string") throw Error("attributeGroupSeparator must be a string");
|
|
757
|
+
return a = gt(a, n), r ? (a = vt(a, r, n), t = yt(t, r, n)) : t[""] && (t = mt(t, { attributeNames: Object.keys(a).filter((e) => e !== "sample") })), {
|
|
758
|
+
columnarMetadata: a,
|
|
759
|
+
attributeDefs: t
|
|
760
|
+
};
|
|
761
|
+
}
|
|
762
|
+
function mt(e, t) {
|
|
763
|
+
let n = e[""];
|
|
764
|
+
if (!n) return e;
|
|
765
|
+
let r = {};
|
|
766
|
+
for (let [t, n] of Object.entries(e)) t !== "" && (r[t] = n);
|
|
767
|
+
for (let e of t.attributeNames) {
|
|
768
|
+
if (r[e]) continue;
|
|
769
|
+
let t = Z(e, "/"), i = !1;
|
|
770
|
+
for (let e = 1; e < t.length; e++) if (r[X(t.slice(0, e), "/")]) {
|
|
771
|
+
i = !0;
|
|
772
|
+
break;
|
|
773
|
+
}
|
|
774
|
+
i || (r[e] = { ...n });
|
|
775
|
+
}
|
|
776
|
+
return r;
|
|
777
|
+
}
|
|
778
|
+
function ht(e, t = /* @__PURE__ */ new Set()) {
|
|
779
|
+
return st(e, t);
|
|
780
|
+
}
|
|
781
|
+
function gt(e, t) {
|
|
782
|
+
let n = { sample: e.sample };
|
|
783
|
+
for (let [r, i] of Object.entries(e)) {
|
|
784
|
+
if (r === "sample") continue;
|
|
785
|
+
let e = typeof t == "string" && t.length > 0 ? Q(r, t, "/") : X([r], "/");
|
|
786
|
+
n[e] = i;
|
|
787
|
+
}
|
|
788
|
+
return n;
|
|
789
|
+
}
|
|
790
|
+
function _t(e, t) {
|
|
791
|
+
return typeof t == "string" && t.length > 0 ? Z(e, t) : [e];
|
|
792
|
+
}
|
|
793
|
+
function vt(e, t, n) {
|
|
794
|
+
return bt(e, _t(t, n));
|
|
795
|
+
}
|
|
796
|
+
function yt(e, t, n) {
|
|
797
|
+
let r = _t(t, n), i = X(r, "/"), a = {}, o;
|
|
798
|
+
for (let [t, n] of Object.entries(e)) t === "" ? o = n : a[t] = n;
|
|
799
|
+
let s = ft(a, r);
|
|
800
|
+
return o && !s[i] && (s[i] = o), s;
|
|
801
|
+
}
|
|
802
|
+
function bt(e, t = []) {
|
|
803
|
+
return ft(e, t, ["sample"]);
|
|
804
|
+
}
|
|
805
|
+
function xt(e) {
|
|
806
|
+
switch (W(e)) {
|
|
807
|
+
case "integer":
|
|
808
|
+
case "number": return "quantitative";
|
|
809
|
+
default: return "nominal";
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
function St(e, t = {}, n) {
|
|
813
|
+
let r = structuredClone(t ?? {}), i = ut(e.attributeNames, n), a = /* @__PURE__ */ new Map();
|
|
814
|
+
function o(e) {
|
|
815
|
+
e.path && a.set(e.path, e);
|
|
816
|
+
for (let t of e.children.values()) o(t);
|
|
817
|
+
}
|
|
818
|
+
o(i);
|
|
819
|
+
for (let t of e.attributeNames) {
|
|
820
|
+
let i = r[t], o = null;
|
|
821
|
+
if (n != null) {
|
|
822
|
+
let e = Q(t, n, "/"), i = a.get(e)?.parent;
|
|
823
|
+
for (; i && (o = r[i.path]?.type, o == null);) i = i.parent;
|
|
824
|
+
}
|
|
825
|
+
if (!o && (i || (i = {}, r[t] = i), !i.type)) {
|
|
826
|
+
let n = Object.values(e.entities).map((e) => e[t]);
|
|
827
|
+
i.type = xt(n);
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
return r;
|
|
831
|
+
}
|
|
832
|
+
function Ct(e, t) {
|
|
833
|
+
let n = new Set(e.attributeNames), r = new Set(t.attributeNames), i = n.intersection(r);
|
|
834
|
+
if (i.size > 0) throw Error(`Duplicate attribute names: ${Array.from(i).join(", ")}`);
|
|
835
|
+
let a = [...n, ...r], o = e.attributeDefs ?? {}, s = t.attributeDefs ?? {}, c = { ...o };
|
|
836
|
+
for (let e of Object.keys(s)) c[e] = e in c ? $(c[e], s[e], e) : s[e];
|
|
837
|
+
let l = Object.keys(e.entities), u = Object.keys(t.entities), d = /* @__PURE__ */ new Set([...l, ...u]), f = {};
|
|
838
|
+
for (let r of d) {
|
|
839
|
+
let i = e.entities[r] ?? {}, o = t.entities[r] ?? {}, s = {};
|
|
840
|
+
for (let e of a) s[e] = n.has(e) ? i[e] : o[e];
|
|
841
|
+
f[r] = s;
|
|
842
|
+
}
|
|
843
|
+
return {
|
|
844
|
+
entities: f,
|
|
845
|
+
attributeNames: a,
|
|
846
|
+
attributeDefs: c
|
|
847
|
+
};
|
|
848
|
+
}
|
|
849
|
+
function wt(e) {
|
|
850
|
+
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
851
|
+
}
|
|
852
|
+
function $(e, t, n, r = "") {
|
|
853
|
+
if (_(e, t)) return e;
|
|
854
|
+
let i = { ...e };
|
|
855
|
+
for (let [e, a] of Object.entries(t)) {
|
|
856
|
+
if (!(e in i)) {
|
|
857
|
+
i[e] = a;
|
|
858
|
+
continue;
|
|
859
|
+
}
|
|
860
|
+
let t = i[e];
|
|
861
|
+
if (_(t, a)) continue;
|
|
862
|
+
if (wt(t) && wt(a)) {
|
|
863
|
+
i[e] = $(t, a, n, r ? r + "." + e : e);
|
|
864
|
+
continue;
|
|
865
|
+
}
|
|
866
|
+
let o = r ? r + "." + e : e, s = Tt(t), c = Tt(a);
|
|
867
|
+
throw Error("Conflicting attribute definition for key \"" + n + "\" at \"" + o + "\". Existing value: " + s + "; incoming value: " + c + ". Align the source-level/group defaults (type/scale/visibility) before importing into the same group.");
|
|
868
|
+
}
|
|
869
|
+
return i;
|
|
870
|
+
}
|
|
871
|
+
function Tt(e) {
|
|
872
|
+
try {
|
|
873
|
+
return JSON.stringify(e) ?? String(e);
|
|
874
|
+
} catch {
|
|
875
|
+
return String(e);
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
//#endregion
|
|
879
|
+
export { ct as a, nt as c, pt as i, rt as l, St as n, X as o, Q as r, Z as s, Ct as t, E as u };
|