@platforma-sdk/model 1.30.21 → 1.30.26
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/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +600 -583
- package/dist/index.mjs.map +1 -1
- package/dist/render/api.d.ts +2 -1
- package/dist/render/api.d.ts.map +1 -1
- package/dist/render/util/column_collection.d.ts +3 -1
- package/dist/render/util/column_collection.d.ts.map +1 -1
- package/dist/render/util/label.d.ts +2 -0
- package/dist/render/util/label.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +5 -5
- package/src/render/api.ts +2 -0
- package/src/render/util/column_collection.ts +27 -2
- package/src/render/util/label.test.ts +78 -0
- package/src/render/util/label.ts +24 -14
package/dist/index.mjs
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { isPColumn as
|
|
1
|
+
var ze = Object.defineProperty;
|
|
2
|
+
var Ye = (t, e, n) => e in t ? ze(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var F = (t, e, n) => Ye(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { isPColumn as ye, mapPObjectData as ve, isDataInfoEntries as Le, isDataInfo as be, dataInfoToEntries as Xe, selectorsToPredicate as Y, resolveAnchors as we, deriveNativeId as Qe, isPColumnSpec as te, isPartitionedDataInfoEntries as Ze, getAxisId as O, entriesToDataInfo as et, canonicalizeAxisId as tt, withEnrichments as Ae, AnchoredIdDeriver as xe, isPlRef as nt, mapValueInVOE as rt, ensurePColumn as it, extractAllColumns as st, mapPTableDef as ot, mapDataInfo as at, canonicalizeJson as re, matchAxisId as K, getColumnIdAndSpec as Ee, getPColumnSpecId as Pe } from "@milaboratories/pl-model-common";
|
|
5
5
|
export * from "@milaboratories/pl-model-common";
|
|
6
|
-
import
|
|
7
|
-
import { z as
|
|
6
|
+
import De from "canonicalize";
|
|
7
|
+
import { z as U } from "zod";
|
|
8
8
|
export * from "@milaboratories/pl-error-like";
|
|
9
|
-
class
|
|
9
|
+
class lt extends Error {
|
|
10
10
|
constructor(e, n) {
|
|
11
11
|
super(`${e.length}${n ? "+" : ""} errors, first error: ` + e[0].message), this.errors = e, this.moreErrors = n;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
if (!t.ok) throw new
|
|
14
|
+
function ut(t) {
|
|
15
|
+
if (!t.ok) throw new lt(t.errors, t.moreErrors);
|
|
16
16
|
return t.value;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function qt(t) {
|
|
19
19
|
return new Proxy(t, {
|
|
20
20
|
get(e, n) {
|
|
21
|
-
return
|
|
21
|
+
return ut(e[n]);
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
function C(t) {
|
|
26
|
-
return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t === null ?
|
|
26
|
+
return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t === null ? ne(t) : t;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function X(t) {
|
|
29
29
|
return { type: "GetFromCtx", variable: t };
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function zt(t) {
|
|
32
32
|
return {
|
|
33
33
|
type: "Isolate",
|
|
34
34
|
cfg: t
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
const
|
|
38
|
-
function
|
|
37
|
+
const Yt = X("$args"), Xt = X("$it"), Qt = X("$prod"), Zt = X("$staging"), en = X("$ui");
|
|
38
|
+
function ne(t) {
|
|
39
39
|
return { type: "Immediate", value: t };
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function Fe(t) {
|
|
42
42
|
const e = {};
|
|
43
43
|
for (const [n, r] of Object.entries(t)) e[n] = C(r);
|
|
44
44
|
return {
|
|
@@ -46,7 +46,7 @@ function Te(t) {
|
|
|
46
46
|
template: e
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function tn(...t) {
|
|
50
50
|
const e = [];
|
|
51
51
|
for (const n of t) e.push(C(n));
|
|
52
52
|
return {
|
|
@@ -54,14 +54,14 @@ function Xt(...t) {
|
|
|
54
54
|
template: e
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function ie(t, e) {
|
|
58
58
|
return {
|
|
59
59
|
type: "GetJsonField",
|
|
60
60
|
source: C(t),
|
|
61
61
|
field: C(e)
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function nn(t, e, n = "$it") {
|
|
65
65
|
return {
|
|
66
66
|
type: "MapRecordValues",
|
|
67
67
|
source: t,
|
|
@@ -69,7 +69,7 @@ function Qt(t, e, n = "$it") {
|
|
|
69
69
|
itVar: n
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function rn(t, e, n = "$it") {
|
|
73
73
|
return {
|
|
74
74
|
type: "MapArrayValues",
|
|
75
75
|
source: t,
|
|
@@ -77,46 +77,46 @@ function Zt(t, e, n = "$it") {
|
|
|
77
77
|
itVar: n
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function sn(t) {
|
|
81
81
|
return {
|
|
82
82
|
type: "Flatten",
|
|
83
83
|
source: t
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function on(t) {
|
|
87
87
|
return {
|
|
88
88
|
type: "IsEmpty",
|
|
89
89
|
arg: t
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function an(t) {
|
|
93
93
|
return {
|
|
94
94
|
type: "Not",
|
|
95
95
|
operand: t
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function ln(t, e) {
|
|
99
99
|
return {
|
|
100
100
|
type: "And",
|
|
101
101
|
operand1: t,
|
|
102
102
|
operand2: e
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function un(t, e) {
|
|
106
106
|
return {
|
|
107
107
|
type: "Or",
|
|
108
108
|
operand1: t,
|
|
109
109
|
operand2: e
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function cn(t, e) {
|
|
113
113
|
return {
|
|
114
114
|
type: "GetResourceField",
|
|
115
115
|
source: C(t),
|
|
116
116
|
field: C(e)
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function dn() {
|
|
120
120
|
return function(t) {
|
|
121
121
|
return {
|
|
122
122
|
type: "GetResourceValueAsJson",
|
|
@@ -124,7 +124,7 @@ function an() {
|
|
|
124
124
|
};
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function pn(t, e, n = "$it") {
|
|
128
128
|
return {
|
|
129
129
|
type: "MapResourceFields",
|
|
130
130
|
source: t,
|
|
@@ -132,19 +132,19 @@ function ln(t, e, n = "$it") {
|
|
|
132
132
|
itVar: n
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function fn(t) {
|
|
136
136
|
return {
|
|
137
137
|
type: "GetBlobContent",
|
|
138
138
|
source: C(t)
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function hn(t) {
|
|
142
142
|
return {
|
|
143
143
|
type: "GetBlobContentAsString",
|
|
144
144
|
source: C(t)
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function gn() {
|
|
148
148
|
return function(t) {
|
|
149
149
|
return {
|
|
150
150
|
type: "GetBlobContentAsJson",
|
|
@@ -152,100 +152,100 @@ function pn() {
|
|
|
152
152
|
};
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function mn(t) {
|
|
156
156
|
return {
|
|
157
157
|
type: "GetDownloadedBlobContent",
|
|
158
158
|
source: C(t)
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function yn(t) {
|
|
162
162
|
return {
|
|
163
163
|
type: "GetOnDemandBlobContent",
|
|
164
164
|
source: C(t)
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function vn(t, e) {
|
|
168
168
|
return {
|
|
169
169
|
type: "ExtractArchiveAndGetURL",
|
|
170
170
|
format: e,
|
|
171
171
|
source: C(t)
|
|
172
172
|
};
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function bn(t) {
|
|
175
175
|
return {
|
|
176
176
|
type: "GetImportProgress",
|
|
177
177
|
source: C(t)
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
|
-
function
|
|
180
|
+
function wn(t, e) {
|
|
181
181
|
return {
|
|
182
182
|
type: "GetLastLogs",
|
|
183
183
|
source: C(t),
|
|
184
184
|
lines: e
|
|
185
185
|
};
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function An(t, e) {
|
|
188
188
|
return {
|
|
189
189
|
type: "GetProgressLog",
|
|
190
190
|
source: C(t),
|
|
191
191
|
patternToSearch: e
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function xn(t, e) {
|
|
195
195
|
return {
|
|
196
196
|
type: "GetProgressLogWithInfo",
|
|
197
197
|
source: C(t),
|
|
198
198
|
patternToSearch: e
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function Pn(t) {
|
|
202
202
|
return {
|
|
203
203
|
type: "GetLogHandle",
|
|
204
204
|
source: C(t)
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
|
-
function
|
|
207
|
+
function ct() {
|
|
208
208
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function Oe(t) {
|
|
211
211
|
if (t && typeof globalThis.getPlatforma == "function")
|
|
212
212
|
return globalThis.getPlatforma(t);
|
|
213
213
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
214
214
|
throw new Error("Can't get platforma instance.");
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function dt() {
|
|
217
217
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function f() {
|
|
220
220
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
221
221
|
throw new Error("Not in config rendering context");
|
|
222
222
|
}
|
|
223
|
-
function
|
|
224
|
-
const n =
|
|
223
|
+
function G(t, e) {
|
|
224
|
+
const n = dt();
|
|
225
225
|
if (n === void 0) return !1;
|
|
226
226
|
if (t in n.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
|
|
227
227
|
return n.callbackRegistry[t] = e, !0;
|
|
228
228
|
}
|
|
229
|
-
const
|
|
230
|
-
function
|
|
231
|
-
t in
|
|
232
|
-
for (const r of
|
|
229
|
+
const ue = /* @__PURE__ */ new Map();
|
|
230
|
+
function pt(t, e) {
|
|
231
|
+
t in f().callbackRegistry || (f().callbackRegistry[t] = (n) => {
|
|
232
|
+
for (const r of ue.get(t))
|
|
233
233
|
r(n);
|
|
234
|
-
},
|
|
234
|
+
}, ue.set(t, [])), ue.get(t).push(e);
|
|
235
235
|
}
|
|
236
|
-
class
|
|
236
|
+
class I {
|
|
237
237
|
constructor(e, n = (r) => r) {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
this.handle = e, this.postProcess = n,
|
|
238
|
+
F(this, "isResolved", !1);
|
|
239
|
+
F(this, "resolvedValue");
|
|
240
|
+
this.handle = e, this.postProcess = n, pt(e, (r) => {
|
|
241
241
|
this.resolvedValue = n(r), this.isResolved = !0;
|
|
242
242
|
});
|
|
243
243
|
}
|
|
244
244
|
map(e) {
|
|
245
|
-
return new
|
|
245
|
+
return new I(this.handle, (n) => e(this.postProcess(n)));
|
|
246
246
|
}
|
|
247
247
|
mapDefined(e) {
|
|
248
|
-
return new
|
|
248
|
+
return new I(this.handle, (n) => {
|
|
249
249
|
const r = this.postProcess(n);
|
|
250
250
|
return r ? e(r) : void 0;
|
|
251
251
|
});
|
|
@@ -257,7 +257,7 @@ class S {
|
|
|
257
257
|
function pe(t, e) {
|
|
258
258
|
return t === void 0 ? void 0 : e(t);
|
|
259
259
|
}
|
|
260
|
-
class
|
|
260
|
+
class E {
|
|
261
261
|
constructor(e, n) {
|
|
262
262
|
this.handle = e, this.resolvePath = n;
|
|
263
263
|
}
|
|
@@ -297,46 +297,46 @@ class I {
|
|
|
297
297
|
...n.map((i) => typeof i == "string" ? i : i.field)
|
|
298
298
|
];
|
|
299
299
|
return pe(
|
|
300
|
-
|
|
301
|
-
(i) => new
|
|
300
|
+
f().resolveWithCommon(this.handle, e, ...n),
|
|
301
|
+
(i) => new E(i, r)
|
|
302
302
|
);
|
|
303
303
|
}
|
|
304
304
|
get resourceType() {
|
|
305
|
-
return
|
|
305
|
+
return f().getResourceType(this.handle);
|
|
306
306
|
}
|
|
307
307
|
getInputsLocked() {
|
|
308
|
-
return
|
|
308
|
+
return f().getInputsLocked(this.handle);
|
|
309
309
|
}
|
|
310
310
|
getOutputsLocked() {
|
|
311
|
-
return
|
|
311
|
+
return f().getOutputsLocked(this.handle);
|
|
312
312
|
}
|
|
313
313
|
getIsReadyOrError() {
|
|
314
|
-
return
|
|
314
|
+
return f().getIsReadyOrError(this.handle);
|
|
315
315
|
}
|
|
316
316
|
getIsFinal() {
|
|
317
|
-
return
|
|
317
|
+
return f().getIsFinal(this.handle);
|
|
318
318
|
}
|
|
319
319
|
getError() {
|
|
320
320
|
const e = [...this.resolvePath, "error"];
|
|
321
321
|
return pe(
|
|
322
|
-
|
|
323
|
-
(n) => new
|
|
322
|
+
f().getError(this.handle),
|
|
323
|
+
(n) => new E(n, e)
|
|
324
324
|
);
|
|
325
325
|
}
|
|
326
326
|
listInputFields() {
|
|
327
|
-
return
|
|
327
|
+
return f().listInputFields(this.handle);
|
|
328
328
|
}
|
|
329
329
|
listOutputFields() {
|
|
330
|
-
return
|
|
330
|
+
return f().listOutputFields(this.handle);
|
|
331
331
|
}
|
|
332
332
|
listDynamicFields() {
|
|
333
|
-
return
|
|
333
|
+
return f().listDynamicFields(this.handle);
|
|
334
334
|
}
|
|
335
335
|
getKeyValueBase64(e) {
|
|
336
|
-
return
|
|
336
|
+
return f().getKeyValueBase64(this.handle, e);
|
|
337
337
|
}
|
|
338
338
|
getKeyValueAsString(e) {
|
|
339
|
-
return
|
|
339
|
+
return f().getKeyValueAsString(this.handle, e);
|
|
340
340
|
}
|
|
341
341
|
getKeyValueAsJson(e) {
|
|
342
342
|
const n = this.getKeyValueAsString(e);
|
|
@@ -344,10 +344,10 @@ class I {
|
|
|
344
344
|
return JSON.parse(n);
|
|
345
345
|
}
|
|
346
346
|
getDataBase64() {
|
|
347
|
-
return
|
|
347
|
+
return f().getDataBase64(this.handle);
|
|
348
348
|
}
|
|
349
349
|
getDataAsString() {
|
|
350
|
-
return
|
|
350
|
+
return f().getDataAsString(this.handle);
|
|
351
351
|
}
|
|
352
352
|
getDataAsJson() {
|
|
353
353
|
const e = this.getDataAsString();
|
|
@@ -360,7 +360,7 @@ class I {
|
|
|
360
360
|
getPColumns(e = !1, n = "") {
|
|
361
361
|
const r = this.parsePObjectCollection(e, n);
|
|
362
362
|
return r === void 0 ? void 0 : Object.entries(r).map(([, s]) => {
|
|
363
|
-
if (!
|
|
363
|
+
if (!ye(s)) throw new Error(`not a PColumn (kind = ${s.spec.kind})`);
|
|
364
364
|
return s;
|
|
365
365
|
});
|
|
366
366
|
}
|
|
@@ -368,7 +368,7 @@ class I {
|
|
|
368
368
|
*
|
|
369
369
|
*/
|
|
370
370
|
parsePObjectCollection(e = !1, n = "") {
|
|
371
|
-
const r =
|
|
371
|
+
const r = f().parsePObjectCollection(
|
|
372
372
|
this.handle,
|
|
373
373
|
e,
|
|
374
374
|
n,
|
|
@@ -378,19 +378,19 @@ class I {
|
|
|
378
378
|
const i = {};
|
|
379
379
|
for (const [s, o] of Object.entries(r)) {
|
|
380
380
|
const a = [...this.resolvePath, s];
|
|
381
|
-
i[s] =
|
|
381
|
+
i[s] = ve(o, (l) => new E(l, a));
|
|
382
382
|
}
|
|
383
383
|
return i;
|
|
384
384
|
}
|
|
385
385
|
getFileContentAsBase64() {
|
|
386
|
-
return new
|
|
386
|
+
return new I(f().getBlobContentAsBase64(this.handle));
|
|
387
387
|
}
|
|
388
388
|
getFileContentAsString() {
|
|
389
|
-
return new
|
|
389
|
+
return new I(f().getBlobContentAsString(this.handle));
|
|
390
390
|
}
|
|
391
391
|
getFileContentAsJson() {
|
|
392
|
-
return new
|
|
393
|
-
|
|
392
|
+
return new I(
|
|
393
|
+
f().getBlobContentAsString(this.handle)
|
|
394
394
|
).mapDefined((e) => JSON.parse(e));
|
|
395
395
|
}
|
|
396
396
|
/**
|
|
@@ -409,7 +409,7 @@ class I {
|
|
|
409
409
|
* @returns downloaded file handle
|
|
410
410
|
*/
|
|
411
411
|
getFileHandle() {
|
|
412
|
-
return new
|
|
412
|
+
return new I(f().getDownloadedBlobContentHandle(this.handle));
|
|
413
413
|
}
|
|
414
414
|
/**
|
|
415
415
|
* @deprecated use getFileHandle
|
|
@@ -421,7 +421,7 @@ class I {
|
|
|
421
421
|
* @returns downloaded file handle
|
|
422
422
|
*/
|
|
423
423
|
getRemoteFileHandle() {
|
|
424
|
-
return new
|
|
424
|
+
return new I(f().getOnDemandBlobContentHandle(this.handle));
|
|
425
425
|
}
|
|
426
426
|
/**
|
|
427
427
|
* @deprecated use getRemoteFileHandle
|
|
@@ -433,22 +433,22 @@ class I {
|
|
|
433
433
|
* @returns the url to the extracted folder
|
|
434
434
|
*/
|
|
435
435
|
extractArchiveAndGetURL(e) {
|
|
436
|
-
return new
|
|
436
|
+
return new I(f().extractArchiveAndGetURL(this.handle, e));
|
|
437
437
|
}
|
|
438
438
|
getImportProgress() {
|
|
439
|
-
return new
|
|
439
|
+
return new I(f().getImportProgress(this.handle));
|
|
440
440
|
}
|
|
441
441
|
getLastLogs(e) {
|
|
442
|
-
return new
|
|
442
|
+
return new I(f().getLastLogs(this.handle, e));
|
|
443
443
|
}
|
|
444
444
|
getProgressLog(e) {
|
|
445
|
-
return new
|
|
445
|
+
return new I(f().getProgressLog(this.handle, e));
|
|
446
446
|
}
|
|
447
447
|
getProgressLogWithInfo(e) {
|
|
448
|
-
return new
|
|
448
|
+
return new I(f().getProgressLogWithInfo(this.handle, e));
|
|
449
449
|
}
|
|
450
450
|
getLogHandle() {
|
|
451
|
-
return new
|
|
451
|
+
return new I(f().getLogHandle(this.handle));
|
|
452
452
|
}
|
|
453
453
|
allFieldsResolved(e = "Input") {
|
|
454
454
|
switch (e) {
|
|
@@ -477,118 +477,119 @@ class I {
|
|
|
477
477
|
return s && (l = l.filter((u) => u[1] !== void 0)), l.map(([u, p]) => o(u, p));
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
|
-
const
|
|
480
|
+
const Re = "staging", ke = "main", ft = {
|
|
481
481
|
explicitColumnsSupport: !0,
|
|
482
482
|
inlineColumnsSupport: !0,
|
|
483
483
|
activeArgs: !0
|
|
484
484
|
};
|
|
485
|
-
function
|
|
485
|
+
function je(t) {
|
|
486
486
|
return typeof t == "object" && t !== null && "__awaited_futures__" in t;
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function fe(t, e, n) {
|
|
489
489
|
if (e.has(n)) return;
|
|
490
490
|
if (e.add(n), typeof n === "object")
|
|
491
|
-
if (
|
|
491
|
+
if (je(n)) n.__awaited_futures__.forEach((i) => t.add(i));
|
|
492
492
|
else if (Array.isArray(n))
|
|
493
|
-
for (const i of n)
|
|
493
|
+
for (const i of n) fe(t, e, i);
|
|
494
494
|
else
|
|
495
495
|
for (const [, i] of Object.entries(n))
|
|
496
|
-
i !== n &&
|
|
496
|
+
i !== n && fe(t, e, i);
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function ht(t) {
|
|
499
499
|
const e = /* @__PURE__ */ new Set();
|
|
500
|
-
return
|
|
500
|
+
return fe(e, /* @__PURE__ */ new Set(), t), e;
|
|
501
501
|
}
|
|
502
|
-
const
|
|
502
|
+
const Cn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
503
503
|
__proto__: null,
|
|
504
|
-
GlobalCfgRenderCtxFeatureFlags:
|
|
505
|
-
MainAccessorName:
|
|
506
|
-
StagingAccessorName:
|
|
507
|
-
getAllFutureAwaits:
|
|
508
|
-
isFutureAwait:
|
|
509
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
510
|
-
type:
|
|
511
|
-
importance:
|
|
512
|
-
id:
|
|
513
|
-
label:
|
|
514
|
-
}),
|
|
515
|
-
function
|
|
516
|
-
const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(),
|
|
517
|
-
var
|
|
518
|
-
const
|
|
519
|
-
let
|
|
520
|
-
"spec" in
|
|
521
|
-
const b = (
|
|
522
|
-
...
|
|
523
|
-
...
|
|
524
|
-
...
|
|
504
|
+
GlobalCfgRenderCtxFeatureFlags: ft,
|
|
505
|
+
MainAccessorName: ke,
|
|
506
|
+
StagingAccessorName: Re,
|
|
507
|
+
getAllFutureAwaits: ht,
|
|
508
|
+
isFutureAwait: je
|
|
509
|
+
}, Symbol.toStringTag, { value: "Module" })), gt = "pl7.app/label", mt = "pl7.app/trace", yt = U.object({
|
|
510
|
+
type: U.string(),
|
|
511
|
+
importance: U.number().optional(),
|
|
512
|
+
id: U.string().optional(),
|
|
513
|
+
label: U.string()
|
|
514
|
+
}), vt = U.array(yt), bt = 1e-3, wt = "__LABEL__", Ce = "__LABEL__@1";
|
|
515
|
+
function Ve(t, e, n = {}) {
|
|
516
|
+
const r = /* @__PURE__ */ new Map(), i = n.forceTraceElements !== void 0 && n.forceTraceElements.length > 0 ? new Set(n.forceTraceElements) : void 0, s = /* @__PURE__ */ new Map(), o = t.map((g) => {
|
|
517
|
+
var S, R;
|
|
518
|
+
const m = e(g);
|
|
519
|
+
let c, y, d;
|
|
520
|
+
"spec" in m && typeof m.spec == "object" ? (c = m.spec, y = m.prefixTrace, d = m.suffixTrace) : c = m;
|
|
521
|
+
const b = (S = c.annotations) == null ? void 0 : S[gt], A = (R = c.annotations) == null ? void 0 : R[mt], v = (A ? vt.safeParse(JSON.parse(A)).data : void 0) ?? [], P = [
|
|
522
|
+
...y ?? [],
|
|
523
|
+
...v,
|
|
524
|
+
...d ?? []
|
|
525
525
|
];
|
|
526
|
-
if (b) {
|
|
527
|
-
const
|
|
528
|
-
n.addLabelAsSuffix ?
|
|
526
|
+
if (b !== void 0) {
|
|
527
|
+
const D = { label: b, type: wt, importance: -2 };
|
|
528
|
+
n.addLabelAsSuffix ? P.push(D) : P.splice(0, 0, D);
|
|
529
529
|
}
|
|
530
|
-
const
|
|
531
|
-
for (let
|
|
532
|
-
const { type:
|
|
533
|
-
|
|
534
|
-
const
|
|
535
|
-
|
|
536
|
-
|
|
530
|
+
const x = [], T = /* @__PURE__ */ new Map();
|
|
531
|
+
for (let D = P.length - 1; D >= 0; --D) {
|
|
532
|
+
const { type: M } = P[D], j = P[D].importance ?? 0, $ = (T.get(M) ?? 0) + 1;
|
|
533
|
+
T.set(M, $);
|
|
534
|
+
const k = `${M}@${$}`;
|
|
535
|
+
s.set(k, (s.get(k) ?? 0) + 1), r.set(
|
|
536
|
+
k,
|
|
537
537
|
Math.max(
|
|
538
|
-
r.get(
|
|
539
|
-
|
|
538
|
+
r.get(k) ?? Number.NEGATIVE_INFINITY,
|
|
539
|
+
j - (P.length - D) * bt
|
|
540
540
|
)
|
|
541
|
-
),
|
|
541
|
+
), x.push({ ...P[D], fullType: k, occurrenceIndex: $ });
|
|
542
542
|
}
|
|
543
|
-
return
|
|
544
|
-
value:
|
|
545
|
-
spec:
|
|
543
|
+
return x.reverse(), {
|
|
544
|
+
value: g,
|
|
545
|
+
spec: c,
|
|
546
546
|
label: b,
|
|
547
|
-
fullTrace:
|
|
547
|
+
fullTrace: x
|
|
548
548
|
};
|
|
549
|
-
}),
|
|
550
|
-
|
|
551
|
-
for (const [
|
|
552
|
-
|
|
553
|
-
const
|
|
554
|
-
const
|
|
555
|
-
for (let
|
|
556
|
-
const
|
|
557
|
-
if (
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
549
|
+
}), a = [], l = [], u = [...r];
|
|
550
|
+
u.sort(([, g], [, m]) => m - g);
|
|
551
|
+
for (const [g] of u)
|
|
552
|
+
g.endsWith("@1") || s.get(g) === t.length ? a.push(g) : l.push(g);
|
|
553
|
+
const p = (g, m = !1) => {
|
|
554
|
+
const c = [];
|
|
555
|
+
for (let y = 0; y < o.length; y++) {
|
|
556
|
+
const d = o[y], b = d.fullTrace.filter((P) => g.has(P.fullType) || i && i.has(P.type));
|
|
557
|
+
if (b.length === 0)
|
|
558
|
+
if (m)
|
|
559
|
+
c.push({
|
|
560
|
+
label: "Unlabeled",
|
|
561
|
+
value: d.value
|
|
562
|
+
});
|
|
563
|
+
else return;
|
|
564
|
+
const A = b.map((P) => P.label), v = n.separator ?? " / ";
|
|
565
|
+
c.push({
|
|
566
|
+
label: A.join(v),
|
|
567
|
+
value: d.value
|
|
563
568
|
});
|
|
564
569
|
}
|
|
565
|
-
return
|
|
570
|
+
return c;
|
|
566
571
|
};
|
|
567
|
-
if (
|
|
568
|
-
if (
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
return d;
|
|
586
|
-
}
|
|
587
|
-
const q = "PColumnData/", ne = q + "ResourceMap", re = q + "Partitioned/ResourceMap", M = q + "JsonPartitioned", $ = q + "BinaryPartitioned", ke = q + "Partitioned/", ie = ke + "JsonPartitioned", W = ke + "BinaryPartitioned";
|
|
588
|
-
function je(t, e, n, r = [], i) {
|
|
572
|
+
if (a.length === 0) {
|
|
573
|
+
if (l.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
|
|
574
|
+
return p(new Set(Ce), !0);
|
|
575
|
+
}
|
|
576
|
+
let h = 0, w = -1;
|
|
577
|
+
for (; h < a.length; ) {
|
|
578
|
+
const g = /* @__PURE__ */ new Set();
|
|
579
|
+
n.includeNativeLabel && g.add(Ce);
|
|
580
|
+
for (let c = 0; c < h; ++c) g.add(a[c]);
|
|
581
|
+
w >= 0 && g.add(a[w]);
|
|
582
|
+
const m = p(g);
|
|
583
|
+
if (m !== void 0 && new Set(m.map((c) => c.label)).size === t.length) return m;
|
|
584
|
+
w++, w >= a.length && (h++, w = h);
|
|
585
|
+
}
|
|
586
|
+
return p(/* @__PURE__ */ new Set([...a, ...l]), !0);
|
|
587
|
+
}
|
|
588
|
+
const Q = "PColumnData/", se = Q + "ResourceMap", oe = Q + "Partitioned/ResourceMap", H = Q + "JsonPartitioned", B = Q + "BinaryPartitioned", Ke = Q + "Partitioned/", ae = Ke + "JsonPartitioned", q = Ke + "BinaryPartitioned";
|
|
589
|
+
function $e(t, e, n, r = [], i) {
|
|
589
590
|
if (t === void 0) return !1;
|
|
590
591
|
switch (t.resourceType.name) {
|
|
591
|
-
case
|
|
592
|
+
case se: {
|
|
592
593
|
let s = t.getInputsLocked();
|
|
593
594
|
for (const o of t.listInputFields()) {
|
|
594
595
|
const a = t.resolve({ field: o, assertFieldType: "Input" }), l = [...r, ...JSON.parse(o)], u = a === void 0 ? void 0 : e(a);
|
|
@@ -596,13 +597,13 @@ function je(t, e, n, r = [], i) {
|
|
|
596
597
|
}
|
|
597
598
|
return s;
|
|
598
599
|
}
|
|
599
|
-
case
|
|
600
|
+
case oe: {
|
|
600
601
|
let s = t.getInputsLocked();
|
|
601
602
|
for (const o of t.listInputFields()) {
|
|
602
603
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
603
604
|
if (a === void 0) s = !1;
|
|
604
605
|
else {
|
|
605
|
-
const l = [...r, ...JSON.parse(o)], u =
|
|
606
|
+
const l = [...r, ...JSON.parse(o)], u = $e(
|
|
606
607
|
a,
|
|
607
608
|
e,
|
|
608
609
|
n,
|
|
@@ -618,55 +619,55 @@ function je(t, e, n, r = [], i) {
|
|
|
618
619
|
throw new Error(`Unknown resource type: ${t.resourceType.name}`);
|
|
619
620
|
}
|
|
620
621
|
}
|
|
621
|
-
function
|
|
622
|
+
function Sn(t, e, n = !1) {
|
|
622
623
|
const r = [];
|
|
623
|
-
return { isComplete:
|
|
624
|
+
return { isComplete: $e(t, e, r, [], n), data: r };
|
|
624
625
|
}
|
|
625
|
-
const
|
|
626
|
+
const he = (t) => {
|
|
626
627
|
if (t.endsWith(".index"))
|
|
627
628
|
return { baseKey: t.substring(0, t.length - 6), type: "index" };
|
|
628
629
|
if (t.endsWith(".values"))
|
|
629
630
|
return { baseKey: t.substring(0, t.length - 7), type: "values" };
|
|
630
631
|
throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
|
|
631
632
|
};
|
|
632
|
-
function
|
|
633
|
+
function At(t) {
|
|
633
634
|
if (!t) return;
|
|
634
635
|
const e = t.resourceType.name, n = t.getDataAsJson(), r = [];
|
|
635
636
|
let i = 0;
|
|
636
637
|
switch (e) {
|
|
637
|
-
case
|
|
638
|
+
case se:
|
|
638
639
|
i = n.keyLength;
|
|
639
640
|
break;
|
|
640
|
-
case
|
|
641
|
+
case oe:
|
|
641
642
|
i = n.partitionKeyLength + n.keyLength;
|
|
642
643
|
break;
|
|
643
|
-
case
|
|
644
|
-
case
|
|
644
|
+
case H:
|
|
645
|
+
case B:
|
|
645
646
|
i = n.partitionKeyLength;
|
|
646
647
|
break;
|
|
647
|
-
case
|
|
648
|
-
case
|
|
648
|
+
case q:
|
|
649
|
+
case ae:
|
|
649
650
|
i = n.superPartitionKeyLength + n.partitionKeyLength;
|
|
650
651
|
break;
|
|
651
652
|
}
|
|
652
653
|
switch (e) {
|
|
653
|
-
case
|
|
654
|
-
case
|
|
655
|
-
case
|
|
654
|
+
case se:
|
|
655
|
+
case H:
|
|
656
|
+
case B:
|
|
656
657
|
for (let s of t.listInputFields()) {
|
|
657
|
-
e ===
|
|
658
|
+
e === B && (s = he(s).baseKey);
|
|
658
659
|
const o = [...JSON.parse(s)];
|
|
659
660
|
r.push(o);
|
|
660
661
|
}
|
|
661
662
|
break;
|
|
662
|
-
case
|
|
663
|
-
case
|
|
664
|
-
case
|
|
663
|
+
case oe:
|
|
664
|
+
case q:
|
|
665
|
+
case ae:
|
|
665
666
|
for (const s of t.listInputFields()) {
|
|
666
667
|
const o = [...JSON.parse(s)], a = t.resolve({ field: s, assertFieldType: "Input" });
|
|
667
668
|
if (a !== void 0)
|
|
668
669
|
for (let l of a.listInputFields()) {
|
|
669
|
-
e ===
|
|
670
|
+
e === q && (l = he(l).baseKey);
|
|
670
671
|
const u = [...o, ...JSON.parse(l)];
|
|
671
672
|
r.push(u);
|
|
672
673
|
}
|
|
@@ -675,7 +676,7 @@ function mt(t) {
|
|
|
675
676
|
}
|
|
676
677
|
return { data: r, keyLength: i };
|
|
677
678
|
}
|
|
678
|
-
function
|
|
679
|
+
function xt(t) {
|
|
679
680
|
if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
|
|
680
681
|
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
|
|
681
682
|
const { parts: e, partitionKeyLength: n } = t, r = [];
|
|
@@ -694,11 +695,11 @@ function yt(t) {
|
|
|
694
695
|
}
|
|
695
696
|
return r.map((i) => Array.from(i.values()));
|
|
696
697
|
}
|
|
697
|
-
function
|
|
698
|
+
function Pt(t) {
|
|
698
699
|
if (t === void 0) return;
|
|
699
|
-
if (
|
|
700
|
-
return
|
|
701
|
-
const e =
|
|
700
|
+
if (Le(t))
|
|
701
|
+
return xt(t);
|
|
702
|
+
const e = At(t);
|
|
702
703
|
if (!e) return;
|
|
703
704
|
const { data: n, keyLength: r } = e, i = [];
|
|
704
705
|
for (let s = 0; s < r; ++s)
|
|
@@ -711,16 +712,16 @@ function vt(t) {
|
|
|
711
712
|
}
|
|
712
713
|
return i.map((s) => Array.from(s.values()));
|
|
713
714
|
}
|
|
714
|
-
function
|
|
715
|
+
function ge(t, e = []) {
|
|
715
716
|
if (t === void 0 || !t.getIsReadyOrError()) return;
|
|
716
717
|
const n = t.resourceType.name, r = t.getDataAsJson();
|
|
717
|
-
if (e.length > 0 && (n ===
|
|
718
|
+
if (e.length > 0 && (n === ae || n === q))
|
|
718
719
|
throw new Error(`Unexpected nested super-partitioned resource: ${n}`);
|
|
719
720
|
switch (n) {
|
|
720
|
-
case
|
|
721
|
-
case
|
|
721
|
+
case se:
|
|
722
|
+
case oe:
|
|
722
723
|
throw new Error(`Only data columns are supported, got: ${n}`);
|
|
723
|
-
case
|
|
724
|
+
case H: {
|
|
724
725
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
725
726
|
throw new Error(`Missing partitionKeyLength in metadata for ${n}`);
|
|
726
727
|
const i = [];
|
|
@@ -736,12 +737,12 @@ function he(t, e = []) {
|
|
|
736
737
|
parts: i
|
|
737
738
|
};
|
|
738
739
|
}
|
|
739
|
-
case
|
|
740
|
+
case B: {
|
|
740
741
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
741
742
|
throw new Error(`Missing partitionKeyLength in metadata for ${n}`);
|
|
742
743
|
const i = [], s = /* @__PURE__ */ new Map();
|
|
743
744
|
for (const o of t.listInputFields()) {
|
|
744
|
-
const a =
|
|
745
|
+
const a = he(o), l = t.resolve({ field: o, assertFieldType: "Input" });
|
|
745
746
|
if (l === void 0) return;
|
|
746
747
|
let u = s.get(a.baseKey);
|
|
747
748
|
u || (u = {}, s.set(a.baseKey, u)), a.type === "index" ? u.index = l : u.values = l;
|
|
@@ -763,16 +764,16 @@ function he(t, e = []) {
|
|
|
763
764
|
parts: i
|
|
764
765
|
};
|
|
765
766
|
}
|
|
766
|
-
case
|
|
767
|
+
case ae: {
|
|
767
768
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
768
769
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n}`);
|
|
769
770
|
const i = r.superPartitionKeyLength + r.partitionKeyLength, s = [];
|
|
770
771
|
for (const o of t.listInputFields()) {
|
|
771
772
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
772
773
|
if (a === void 0) return;
|
|
773
|
-
if (a.resourceType.name !==
|
|
774
|
-
throw new Error(`Expected ${
|
|
775
|
-
const l =
|
|
774
|
+
if (a.resourceType.name !== H)
|
|
775
|
+
throw new Error(`Expected ${H} inside ${n}, but got ${a.resourceType.name}`);
|
|
776
|
+
const l = ge(a, JSON.parse(o));
|
|
776
777
|
if (l === void 0) return;
|
|
777
778
|
if (l.type !== "JsonPartitioned")
|
|
778
779
|
throw new Error(`Unexpected inner result type for ${n}: ${l.type}`);
|
|
@@ -784,16 +785,16 @@ function he(t, e = []) {
|
|
|
784
785
|
parts: s
|
|
785
786
|
};
|
|
786
787
|
}
|
|
787
|
-
case
|
|
788
|
+
case q: {
|
|
788
789
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
789
790
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n}`);
|
|
790
791
|
const i = r.superPartitionKeyLength + r.partitionKeyLength, s = [];
|
|
791
792
|
for (const o of t.listInputFields()) {
|
|
792
793
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
793
794
|
if (a === void 0) return;
|
|
794
|
-
if (a.resourceType.name !==
|
|
795
|
-
throw new Error(`Expected ${
|
|
796
|
-
const l =
|
|
795
|
+
if (a.resourceType.name !== B)
|
|
796
|
+
throw new Error(`Expected ${B} inside ${n}, but got ${a.resourceType.name}`);
|
|
797
|
+
const l = ge(a, JSON.parse(o));
|
|
797
798
|
if (l === void 0) return;
|
|
798
799
|
if (l.type !== "BinaryPartitioned")
|
|
799
800
|
throw new Error(`Unexpected inner result type for ${n}: ${l.type}`);
|
|
@@ -809,15 +810,15 @@ function he(t, e = []) {
|
|
|
809
810
|
throw new Error(`Unknown resource type: ${n}`);
|
|
810
811
|
}
|
|
811
812
|
}
|
|
812
|
-
function
|
|
813
|
+
function Ct(t) {
|
|
813
814
|
if (t !== void 0) {
|
|
814
|
-
if (
|
|
815
|
-
if (
|
|
816
|
-
if (t instanceof
|
|
815
|
+
if (Le(t)) return t;
|
|
816
|
+
if (be(t)) return Xe(t);
|
|
817
|
+
if (t instanceof E) return ge(t);
|
|
817
818
|
throw new Error(`Unexpected input type: ${typeof t}`);
|
|
818
819
|
}
|
|
819
820
|
}
|
|
820
|
-
function
|
|
821
|
+
function St(t, e) {
|
|
821
822
|
const n = [...e].sort((s, o) => o[0] - s[0]);
|
|
822
823
|
if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
|
|
823
824
|
const { partitionKeyLength: s } = t;
|
|
@@ -877,39 +878,39 @@ function wt(t, e) {
|
|
|
877
878
|
}
|
|
878
879
|
}
|
|
879
880
|
}
|
|
880
|
-
class
|
|
881
|
+
class _t {
|
|
881
882
|
constructor(e) {
|
|
882
883
|
this.columns = e;
|
|
883
884
|
}
|
|
884
885
|
selectColumns(e) {
|
|
885
|
-
const n = typeof e == "function" ? e :
|
|
886
|
+
const n = typeof e == "function" ? e : Y(e);
|
|
886
887
|
return this.columns.filter((r) => n(r.spec));
|
|
887
888
|
}
|
|
888
889
|
}
|
|
889
|
-
function
|
|
890
|
+
function It(t) {
|
|
890
891
|
if (t)
|
|
891
892
|
return t.map((e) => ({
|
|
892
|
-
type: `split:${
|
|
893
|
+
type: `split:${tt(e.axisId)}`,
|
|
893
894
|
label: e.label,
|
|
894
895
|
importance: 1e6
|
|
895
896
|
// High importance for split filters in labels
|
|
896
897
|
}));
|
|
897
898
|
}
|
|
898
|
-
function
|
|
899
|
+
function Tt(t) {
|
|
899
900
|
if (t)
|
|
900
901
|
return t.map((e) => [e.axisIdx, e.value]);
|
|
901
902
|
}
|
|
902
|
-
function
|
|
903
|
+
function Lt(t, e) {
|
|
903
904
|
if (!e || e.length === 0) return t;
|
|
904
905
|
const n = [...e].sort((r, i) => r[0] - i[0]);
|
|
905
|
-
return
|
|
906
|
+
return De({ id: t, axisFilters: n });
|
|
906
907
|
}
|
|
907
|
-
function
|
|
908
|
+
function Se(t) {
|
|
908
909
|
if (!t || typeof t != "object") return !1;
|
|
909
910
|
const e = t, n = e.domain && typeof e.domain == "object" && Object.values(e.domain).some((i) => typeof i == "object" && i !== null && "anchor" in i), r = e.axes && Array.isArray(e.axes) && e.axes.some((i) => typeof i == "object" && i !== null && "anchor" in i);
|
|
910
911
|
return !!e.domainAnchor || n || r;
|
|
911
912
|
}
|
|
912
|
-
function
|
|
913
|
+
function Et(t) {
|
|
913
914
|
if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
|
|
914
915
|
return [];
|
|
915
916
|
const e = t.axes.map((n, r) => typeof n == "object" && "split" in n && n.split === !0 ? r : -1).filter((n) => n !== -1);
|
|
@@ -917,11 +918,11 @@ function _t(t) {
|
|
|
917
918
|
throw new Error("Axis splitting is not supported when `partialAxesMatch` is defined.");
|
|
918
919
|
return e.sort((n, r) => n - r), e;
|
|
919
920
|
}
|
|
920
|
-
class
|
|
921
|
+
class me {
|
|
921
922
|
constructor() {
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
923
|
+
F(this, "defaultProviderStore", []);
|
|
924
|
+
F(this, "providers", [new _t(this.defaultProviderStore)]);
|
|
925
|
+
F(this, "axisLabelProviders", []);
|
|
925
926
|
}
|
|
926
927
|
addColumnProvider(e) {
|
|
927
928
|
return this.providers.push(e), this;
|
|
@@ -943,117 +944,133 @@ class ge {
|
|
|
943
944
|
}
|
|
944
945
|
}
|
|
945
946
|
getUniversalEntries(e, n) {
|
|
946
|
-
const { anchorCtx: r, labelOps: i, dontWaitAllData: s = !1, overrideLabelAnnotation: o = !1 } = n ?? {},
|
|
947
|
+
const { anchorCtx: r, labelOps: i, dontWaitAllData: s = !1, overrideLabelAnnotation: o = !1, exclude: a } = n ?? {}, l = {
|
|
947
948
|
...o && (i == null ? void 0 : i.includeNativeLabel) !== !1 ? { includeNativeLabel: !0 } : {},
|
|
948
949
|
...i ?? {}
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
950
|
+
};
|
|
951
|
+
let u = () => !1;
|
|
952
|
+
if (a) {
|
|
953
|
+
const c = (Array.isArray(a) ? a : [a]).map((y) => {
|
|
954
|
+
if (Se(y)) {
|
|
955
|
+
if (!r)
|
|
956
|
+
throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
|
|
957
|
+
return Y(we(r.anchors, y, n));
|
|
958
|
+
} else
|
|
959
|
+
return Y(y);
|
|
960
|
+
});
|
|
961
|
+
u = (y) => c.some((d) => d(y));
|
|
962
|
+
}
|
|
963
|
+
const p = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], h = [], w = /* @__PURE__ */ new Set();
|
|
964
|
+
for (const c of p) {
|
|
965
|
+
const y = Se(c);
|
|
966
|
+
let d;
|
|
967
|
+
if (y) {
|
|
954
968
|
if (!r)
|
|
955
969
|
throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
|
|
956
|
-
|
|
970
|
+
d = we(r.anchors, c, n);
|
|
957
971
|
} else
|
|
958
|
-
|
|
959
|
-
const
|
|
960
|
-
for (const
|
|
961
|
-
const
|
|
962
|
-
for (const
|
|
963
|
-
if (
|
|
964
|
-
|
|
972
|
+
d = c;
|
|
973
|
+
const b = /* @__PURE__ */ new Set(), A = [];
|
|
974
|
+
for (const x of this.providers) {
|
|
975
|
+
const T = x.selectColumns(d);
|
|
976
|
+
for (const S of T) {
|
|
977
|
+
if (u(S.spec)) continue;
|
|
978
|
+
if (b.has(S.id))
|
|
979
|
+
throw new Error(`Duplicate column id ${S.id} in provider ${x.constructor.name}`);
|
|
980
|
+
const R = Qe(S.spec);
|
|
981
|
+
w.has(R) || (b.add(S.id), w.add(R), A.push(S));
|
|
965
982
|
}
|
|
966
983
|
}
|
|
967
|
-
if (
|
|
968
|
-
const
|
|
969
|
-
for (const
|
|
970
|
-
if (!
|
|
971
|
-
const
|
|
972
|
-
if (
|
|
973
|
-
const
|
|
974
|
-
if (!
|
|
984
|
+
if (A.length === 0) continue;
|
|
985
|
+
const v = Et(c), P = v.length > 0;
|
|
986
|
+
for (const x of A) {
|
|
987
|
+
if (!te(x.spec)) continue;
|
|
988
|
+
const T = x.spec;
|
|
989
|
+
if (P) {
|
|
990
|
+
const S = Ct(x.data);
|
|
991
|
+
if (!S) {
|
|
975
992
|
if (s) continue;
|
|
976
993
|
return;
|
|
977
994
|
}
|
|
978
|
-
if (!
|
|
979
|
-
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${
|
|
980
|
-
const
|
|
981
|
-
if (
|
|
982
|
-
throw new Error(`Not enough partition keys (${
|
|
983
|
-
const
|
|
984
|
-
if (
|
|
985
|
-
if (
|
|
995
|
+
if (!Ze(S))
|
|
996
|
+
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${S.type} for column ${x.id}`);
|
|
997
|
+
const R = Pt(S), D = v[v.length - 1];
|
|
998
|
+
if (D >= S.partitionKeyLength)
|
|
999
|
+
throw new Error(`Not enough partition keys (${S.partitionKeyLength}) for requested split axes (max index ${D}) in column ${T.name}`);
|
|
1000
|
+
const M = v.map((_) => this.findLabels(O(T.axesSpec[_]))), j = [], $ = (_, W) => {
|
|
1001
|
+
if (W >= v.length) {
|
|
1002
|
+
if (j.push([..._]), j.length > 1e4)
|
|
986
1003
|
throw new Error("Too many key combinations, aborting.");
|
|
987
1004
|
return;
|
|
988
1005
|
}
|
|
989
|
-
const
|
|
990
|
-
if (
|
|
991
|
-
throw new Error(`Axis index ${
|
|
992
|
-
const
|
|
993
|
-
if (!
|
|
994
|
-
|
|
1006
|
+
const V = v[W];
|
|
1007
|
+
if (V >= R.length)
|
|
1008
|
+
throw new Error(`Axis index ${V} out of bounds for unique keys array (length ${R.length}) during split key generation for column ${x.id}`);
|
|
1009
|
+
const J = R[V];
|
|
1010
|
+
if (!J || J.length === 0) {
|
|
1011
|
+
j.length = 0;
|
|
995
1012
|
return;
|
|
996
1013
|
}
|
|
997
|
-
for (const
|
|
998
|
-
|
|
1014
|
+
for (const Z of J)
|
|
1015
|
+
_.push(Z), $(_, W + 1), _.pop();
|
|
999
1016
|
};
|
|
1000
|
-
if (
|
|
1017
|
+
if ($([], 0), j.length === 0)
|
|
1001
1018
|
continue;
|
|
1002
|
-
const k = [...
|
|
1003
|
-
for (let
|
|
1004
|
-
k.splice(
|
|
1005
|
-
const
|
|
1006
|
-
for (const
|
|
1007
|
-
const
|
|
1008
|
-
const
|
|
1009
|
-
return { axisIdx:
|
|
1019
|
+
const k = [...T.axesSpec], We = v.map((_) => _);
|
|
1020
|
+
for (let _ = v.length - 1; _ >= 0; _--)
|
|
1021
|
+
k.splice(v[_], 1);
|
|
1022
|
+
const Ge = { ...T, axesSpec: k };
|
|
1023
|
+
for (const _ of j) {
|
|
1024
|
+
const W = _.map((V, J) => {
|
|
1025
|
+
const Z = We[J], He = O(T.axesSpec[Z]), le = M[J], qe = (le == null ? void 0 : le[V]) ?? String(V);
|
|
1026
|
+
return { axisIdx: Z, axisId: He, value: V, label: qe };
|
|
1010
1027
|
});
|
|
1011
|
-
|
|
1028
|
+
h.push({
|
|
1012
1029
|
type: "split",
|
|
1013
|
-
originalColumn:
|
|
1014
|
-
spec:
|
|
1015
|
-
adjustedSpec:
|
|
1016
|
-
dataEntries:
|
|
1017
|
-
axisFilters:
|
|
1030
|
+
originalColumn: x,
|
|
1031
|
+
spec: T,
|
|
1032
|
+
adjustedSpec: Ge,
|
|
1033
|
+
dataEntries: S,
|
|
1034
|
+
axisFilters: W
|
|
1018
1035
|
});
|
|
1019
1036
|
}
|
|
1020
1037
|
} else
|
|
1021
|
-
|
|
1038
|
+
h.push({
|
|
1022
1039
|
type: "direct",
|
|
1023
|
-
originalColumn:
|
|
1024
|
-
spec:
|
|
1025
|
-
adjustedSpec:
|
|
1040
|
+
originalColumn: x,
|
|
1041
|
+
spec: T,
|
|
1042
|
+
adjustedSpec: T
|
|
1026
1043
|
});
|
|
1027
1044
|
}
|
|
1028
1045
|
}
|
|
1029
|
-
if (
|
|
1030
|
-
const
|
|
1031
|
-
|
|
1032
|
-
(
|
|
1033
|
-
spec:
|
|
1034
|
-
suffixTrace:
|
|
1046
|
+
if (h.length === 0) return [];
|
|
1047
|
+
const g = Ve(
|
|
1048
|
+
h,
|
|
1049
|
+
(c) => ({
|
|
1050
|
+
spec: c.spec,
|
|
1051
|
+
suffixTrace: c.type === "split" ? It(c.axisFilters) : void 0
|
|
1035
1052
|
}),
|
|
1036
|
-
|
|
1037
|
-
),
|
|
1038
|
-
for (const { value:
|
|
1039
|
-
const { originalColumn:
|
|
1040
|
-
let
|
|
1041
|
-
r ?
|
|
1042
|
-
let
|
|
1043
|
-
o && (
|
|
1044
|
-
...
|
|
1053
|
+
l
|
|
1054
|
+
), m = [];
|
|
1055
|
+
for (const { value: c, label: y } of g) {
|
|
1056
|
+
const { originalColumn: d, spec: b } = c, A = c.type === "split" ? c.axisFilters : void 0, v = Tt(A);
|
|
1057
|
+
let P;
|
|
1058
|
+
r ? P = r.deriveS(b, v) : P = Lt(d.id, v);
|
|
1059
|
+
let x = { ...c.adjustedSpec };
|
|
1060
|
+
o && (x = {
|
|
1061
|
+
...x,
|
|
1045
1062
|
annotations: {
|
|
1046
|
-
...
|
|
1047
|
-
"pl7.app/label":
|
|
1063
|
+
...x.annotations ?? {},
|
|
1064
|
+
"pl7.app/label": y
|
|
1048
1065
|
}
|
|
1049
|
-
}),
|
|
1050
|
-
id:
|
|
1051
|
-
spec:
|
|
1052
|
-
data: () =>
|
|
1053
|
-
label:
|
|
1066
|
+
}), m.push({
|
|
1067
|
+
id: P,
|
|
1068
|
+
spec: x,
|
|
1069
|
+
data: () => c.type === "split" ? et(St(c.dataEntries, v)) : c.originalColumn.data,
|
|
1070
|
+
label: y
|
|
1054
1071
|
});
|
|
1055
1072
|
}
|
|
1056
|
-
return
|
|
1073
|
+
return m;
|
|
1057
1074
|
}
|
|
1058
1075
|
getColumns(e, n) {
|
|
1059
1076
|
const r = this.getUniversalEntries(e, {
|
|
@@ -1078,19 +1095,19 @@ class ge {
|
|
|
1078
1095
|
return i;
|
|
1079
1096
|
}
|
|
1080
1097
|
}
|
|
1081
|
-
function
|
|
1098
|
+
function ce(t, e) {
|
|
1082
1099
|
if (t === void 0) return e === void 0;
|
|
1083
1100
|
if (e === void 0) return !0;
|
|
1084
1101
|
for (const n in e)
|
|
1085
1102
|
if (t[n] !== e[n]) return !1;
|
|
1086
1103
|
return !0;
|
|
1087
1104
|
}
|
|
1088
|
-
function
|
|
1089
|
-
return
|
|
1105
|
+
function _e(t) {
|
|
1106
|
+
return ve(t, (e) => e instanceof E ? e.handle : be(e) ? at(e, (n) => n.handle) : e);
|
|
1090
1107
|
}
|
|
1091
|
-
class
|
|
1108
|
+
class Dt {
|
|
1092
1109
|
constructor() {
|
|
1093
|
-
|
|
1110
|
+
F(this, "ctx", f());
|
|
1094
1111
|
}
|
|
1095
1112
|
/**
|
|
1096
1113
|
* @deprecated use getOptions()
|
|
@@ -1099,28 +1116,28 @@ class It {
|
|
|
1099
1116
|
return this.ctx.calculateOptions(e);
|
|
1100
1117
|
}
|
|
1101
1118
|
getOptions(e, n) {
|
|
1102
|
-
const r = typeof e == "function" ? e :
|
|
1119
|
+
const r = typeof e == "function" ? e : Y(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
|
|
1103
1120
|
let s = {}, o = !1;
|
|
1104
|
-
return typeof n < "u" && (typeof n == "function" ? s = n : typeof n == "object" && ("includeNativeLabel" in n || "separator" in n || "addLabelAsSuffix" in n ? s = n : (n = n, s = n.label ?? {}, o = n.refsWithEnrichments ?? !1))), typeof s == "object" ?
|
|
1105
|
-
ref:
|
|
1121
|
+
return typeof n < "u" && (typeof n == "function" ? s = n : typeof n == "object" && ("includeNativeLabel" in n || "separator" in n || "addLabelAsSuffix" in n ? s = n : (n = n, s = n.label ?? {}, o = n.refsWithEnrichments ?? !1))), typeof s == "object" ? Ve(i, (a) => a.obj, s ?? {}).map(({ value: { ref: a }, label: l }) => ({
|
|
1122
|
+
ref: Ae(a, o),
|
|
1106
1123
|
label: l
|
|
1107
1124
|
})) : i.map(({ ref: a, obj: l }) => ({
|
|
1108
|
-
ref:
|
|
1125
|
+
ref: Ae(a, o),
|
|
1109
1126
|
label: s(l, a)
|
|
1110
1127
|
}));
|
|
1111
1128
|
}
|
|
1112
1129
|
resolveAnchorCtx(e) {
|
|
1113
|
-
if (e instanceof
|
|
1130
|
+
if (e instanceof xe) return e;
|
|
1114
1131
|
const n = {};
|
|
1115
1132
|
for (const [r, i] of Object.entries(e))
|
|
1116
|
-
if (
|
|
1133
|
+
if (nt(i)) {
|
|
1117
1134
|
const s = this.getPColumnSpecByRef(i);
|
|
1118
1135
|
if (!s)
|
|
1119
1136
|
return;
|
|
1120
1137
|
n[r] = s;
|
|
1121
1138
|
} else
|
|
1122
1139
|
n[r] = i;
|
|
1123
|
-
return new
|
|
1140
|
+
return new xe(n);
|
|
1124
1141
|
}
|
|
1125
1142
|
/**
|
|
1126
1143
|
* Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
|
|
@@ -1133,7 +1150,7 @@ class It {
|
|
|
1133
1150
|
getAnchoredPColumns(e, n, r) {
|
|
1134
1151
|
const i = this.resolveAnchorCtx(e);
|
|
1135
1152
|
if (i)
|
|
1136
|
-
return new
|
|
1153
|
+
return new me().addColumnProvider(this).addAxisLabelProvider(this).getColumns(n, {
|
|
1137
1154
|
...r,
|
|
1138
1155
|
anchorCtx: i
|
|
1139
1156
|
});
|
|
@@ -1170,7 +1187,7 @@ class It {
|
|
|
1170
1187
|
getCanonicalOptions(e, n, r) {
|
|
1171
1188
|
const i = this.resolveAnchorCtx(e);
|
|
1172
1189
|
if (!i) return;
|
|
1173
|
-
const s = new
|
|
1190
|
+
const s = new me().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(n, {
|
|
1174
1191
|
...r,
|
|
1175
1192
|
anchorCtx: i
|
|
1176
1193
|
});
|
|
@@ -1194,7 +1211,7 @@ class It {
|
|
|
1194
1211
|
ref: n.ref,
|
|
1195
1212
|
obj: {
|
|
1196
1213
|
...n.obj,
|
|
1197
|
-
data: new
|
|
1214
|
+
data: new E(n.obj.data, [n.ref.blockId, n.ref.name])
|
|
1198
1215
|
}
|
|
1199
1216
|
}))
|
|
1200
1217
|
};
|
|
@@ -1213,9 +1230,9 @@ class It {
|
|
|
1213
1230
|
ref: n.ref,
|
|
1214
1231
|
obj: {
|
|
1215
1232
|
...n.obj,
|
|
1216
|
-
data:
|
|
1233
|
+
data: rt(
|
|
1217
1234
|
n.obj.data,
|
|
1218
|
-
(r) => new
|
|
1235
|
+
(r) => new E(r, [n.ref.blockId, n.ref.name])
|
|
1219
1236
|
)
|
|
1220
1237
|
}
|
|
1221
1238
|
}))
|
|
@@ -1242,9 +1259,9 @@ class It {
|
|
|
1242
1259
|
)) == null ? void 0 : r.obj;
|
|
1243
1260
|
const n = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
|
|
1244
1261
|
if (n)
|
|
1245
|
-
return
|
|
1262
|
+
return ve(
|
|
1246
1263
|
n,
|
|
1247
|
-
(i) => new
|
|
1264
|
+
(i) => new E(i, [e.blockId, e.name])
|
|
1248
1265
|
);
|
|
1249
1266
|
}
|
|
1250
1267
|
/**
|
|
@@ -1255,7 +1272,7 @@ class It {
|
|
|
1255
1272
|
getPColumnByRef(e) {
|
|
1256
1273
|
const n = this.getDataByRef(e);
|
|
1257
1274
|
if (n)
|
|
1258
|
-
return
|
|
1275
|
+
return it(n);
|
|
1259
1276
|
}
|
|
1260
1277
|
/**
|
|
1261
1278
|
* Returns spec associated with the ref ensuring that it is a p-column spec.
|
|
@@ -1265,7 +1282,7 @@ class It {
|
|
|
1265
1282
|
getPColumnSpecByRef(e) {
|
|
1266
1283
|
const n = this.getSpecByRef(e);
|
|
1267
1284
|
if (n) {
|
|
1268
|
-
if (!
|
|
1285
|
+
if (!te(n)) throw new Error(`not a PColumn spec (kind = ${n.kind})`);
|
|
1269
1286
|
return n;
|
|
1270
1287
|
}
|
|
1271
1288
|
}
|
|
@@ -1284,13 +1301,13 @@ class It {
|
|
|
1284
1301
|
findDataWithCompatibleSpec(e) {
|
|
1285
1302
|
const n = [];
|
|
1286
1303
|
e: for (const r of this.getData().entries) {
|
|
1287
|
-
if (!
|
|
1304
|
+
if (!te(r.obj.spec))
|
|
1288
1305
|
continue;
|
|
1289
1306
|
const i = r.obj.spec;
|
|
1290
|
-
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length &&
|
|
1307
|
+
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && ce(e.domain, i.domain)) {
|
|
1291
1308
|
for (let s = 0; s < e.axesSpec.length; ++s) {
|
|
1292
1309
|
const o = e.axesSpec[s], a = i.axesSpec[s];
|
|
1293
|
-
if (o.name !== a.name || o.type !== a.type || !
|
|
1310
|
+
if (o.name !== a.name || o.type !== a.type || !ce(o.domain, a.domain))
|
|
1294
1311
|
continue e;
|
|
1295
1312
|
}
|
|
1296
1313
|
n.push(r.obj);
|
|
@@ -1305,9 +1322,9 @@ class It {
|
|
|
1305
1322
|
findLabels(e) {
|
|
1306
1323
|
const n = this.getData();
|
|
1307
1324
|
for (const r of n.entries) {
|
|
1308
|
-
if (!
|
|
1325
|
+
if (!ye(r.obj)) continue;
|
|
1309
1326
|
const i = r.obj.spec;
|
|
1310
|
-
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type &&
|
|
1327
|
+
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && ce(e.domain, i.axesSpec[0].domain)) {
|
|
1311
1328
|
if (r.obj.data.resourceType.name !== "PColumnData/Json")
|
|
1312
1329
|
throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
|
|
1313
1330
|
return Object.fromEntries(
|
|
@@ -1326,13 +1343,13 @@ class It {
|
|
|
1326
1343
|
* @returns An array of PColumn objects matching the selectors. Data is loaded on first access.
|
|
1327
1344
|
*/
|
|
1328
1345
|
selectColumns(e) {
|
|
1329
|
-
const n = typeof e == "function" ? e :
|
|
1330
|
-
return this.getSpecs().entries.filter(({ obj: i }) =>
|
|
1346
|
+
const n = typeof e == "function" ? e : Y(e);
|
|
1347
|
+
return this.getSpecs().entries.filter(({ obj: i }) => te(i) ? n(i) : !1).map(({ ref: i, obj: s }) => {
|
|
1331
1348
|
const o = s;
|
|
1332
1349
|
let a = null;
|
|
1333
1350
|
const l = this;
|
|
1334
1351
|
return {
|
|
1335
|
-
id:
|
|
1352
|
+
id: De(i),
|
|
1336
1353
|
spec: o,
|
|
1337
1354
|
get data() {
|
|
1338
1355
|
var u;
|
|
@@ -1357,15 +1374,15 @@ class It {
|
|
|
1357
1374
|
return r;
|
|
1358
1375
|
}
|
|
1359
1376
|
}
|
|
1360
|
-
class
|
|
1377
|
+
class ee {
|
|
1361
1378
|
constructor() {
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1379
|
+
F(this, "ctx");
|
|
1380
|
+
F(this, "args");
|
|
1381
|
+
F(this, "uiState");
|
|
1365
1382
|
// lazy rendering because this feature is rarely used
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
this.ctx =
|
|
1383
|
+
F(this, "_activeArgsCache");
|
|
1384
|
+
F(this, "resultPool", new Dt());
|
|
1385
|
+
this.ctx = f(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
|
|
1369
1386
|
}
|
|
1370
1387
|
/**
|
|
1371
1388
|
* Returns args snapshot the block was executed for (i.e. when "Run" button was pressed).
|
|
@@ -1383,14 +1400,14 @@ class X {
|
|
|
1383
1400
|
getNamedAccessor(e) {
|
|
1384
1401
|
return pe(
|
|
1385
1402
|
this.ctx.getAccessorHandleByName(e),
|
|
1386
|
-
(n) => new
|
|
1403
|
+
(n) => new E(n, [e])
|
|
1387
1404
|
);
|
|
1388
1405
|
}
|
|
1389
1406
|
get prerun() {
|
|
1390
|
-
return this.getNamedAccessor(
|
|
1407
|
+
return this.getNamedAccessor(Re);
|
|
1391
1408
|
}
|
|
1392
1409
|
get outputs() {
|
|
1393
|
-
return this.getNamedAccessor(
|
|
1410
|
+
return this.getNamedAccessor(ke);
|
|
1394
1411
|
}
|
|
1395
1412
|
/**
|
|
1396
1413
|
* Find labels data for a given axis id. It will search for a label column and return its data as a map.
|
|
@@ -1402,13 +1419,13 @@ class X {
|
|
|
1402
1419
|
}
|
|
1403
1420
|
verifyInlineAndExplicitColumnsSupport(e) {
|
|
1404
1421
|
var i;
|
|
1405
|
-
const n = e.some((s) => !(s.data instanceof
|
|
1422
|
+
const n = e.some((s) => !(s.data instanceof E) || be(s.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === !0;
|
|
1406
1423
|
if (n && !r) throw Error("Inline or explicit columns not supported");
|
|
1407
1424
|
}
|
|
1408
1425
|
// TODO remove all non-PColumn fields
|
|
1409
1426
|
createPFrame(e) {
|
|
1410
1427
|
return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
|
|
1411
|
-
e.map((n) =>
|
|
1428
|
+
e.map((n) => _e(n))
|
|
1412
1429
|
);
|
|
1413
1430
|
}
|
|
1414
1431
|
createPTable(e) {
|
|
@@ -1420,8 +1437,8 @@ class X {
|
|
|
1420
1437
|
},
|
|
1421
1438
|
filters: e.filters ?? [],
|
|
1422
1439
|
sorting: e.sorting ?? []
|
|
1423
|
-
} : n = e, this.verifyInlineAndExplicitColumnsSupport(
|
|
1424
|
-
|
|
1440
|
+
} : n = e, this.verifyInlineAndExplicitColumnsSupport(st(n.src)), this.ctx.createPTable(
|
|
1441
|
+
ot(n, (r) => _e(r))
|
|
1425
1442
|
);
|
|
1426
1443
|
}
|
|
1427
1444
|
/** @deprecated scheduled for removal from SDK */
|
|
@@ -1432,19 +1449,19 @@ class X {
|
|
|
1432
1449
|
return this.ctx.getCurrentUnstableMarker();
|
|
1433
1450
|
}
|
|
1434
1451
|
}
|
|
1435
|
-
const
|
|
1436
|
-
function
|
|
1452
|
+
const z = "1.30.26";
|
|
1453
|
+
function Ft(t) {
|
|
1437
1454
|
return t.__renderLambda === !0;
|
|
1438
1455
|
}
|
|
1439
|
-
function
|
|
1456
|
+
function de(t) {
|
|
1440
1457
|
if (t !== void 0)
|
|
1441
|
-
return
|
|
1458
|
+
return Ft(t) ? t.handle : t;
|
|
1442
1459
|
}
|
|
1443
|
-
function
|
|
1460
|
+
function N(t) {
|
|
1444
1461
|
if (t !== void 0)
|
|
1445
1462
|
return typeof t == "string" ? { __renderLambda: !0, handle: t, retentive: !1 } : t;
|
|
1446
1463
|
}
|
|
1447
|
-
function
|
|
1464
|
+
function _n(t) {
|
|
1448
1465
|
if (t.v3 !== void 0) {
|
|
1449
1466
|
const {
|
|
1450
1467
|
initialArgs: e,
|
|
@@ -1480,10 +1497,10 @@ function xn(t) {
|
|
|
1480
1497
|
renderingMode: n,
|
|
1481
1498
|
initialArgs: o,
|
|
1482
1499
|
outputs: Object.fromEntries(
|
|
1483
|
-
Object.entries(r).map(([u, p]) => [u,
|
|
1500
|
+
Object.entries(r).map(([u, p]) => [u, N(p)])
|
|
1484
1501
|
),
|
|
1485
|
-
inputsValid:
|
|
1486
|
-
sections:
|
|
1502
|
+
inputsValid: N(i),
|
|
1503
|
+
sections: N(s),
|
|
1487
1504
|
initialUiState: void 0,
|
|
1488
1505
|
code: a
|
|
1489
1506
|
};
|
|
@@ -1498,10 +1515,10 @@ function xn(t) {
|
|
|
1498
1515
|
renderingMode: r,
|
|
1499
1516
|
initialArgs: o,
|
|
1500
1517
|
outputs: Object.fromEntries(
|
|
1501
|
-
Object.entries(i).map(([u, p]) => [u,
|
|
1518
|
+
Object.entries(i).map(([u, p]) => [u, N(p)])
|
|
1502
1519
|
),
|
|
1503
|
-
inputsValid:
|
|
1504
|
-
sections:
|
|
1520
|
+
inputsValid: N(n),
|
|
1521
|
+
sections: N(s),
|
|
1505
1522
|
initialUiState: void 0,
|
|
1506
1523
|
code: a
|
|
1507
1524
|
};
|
|
@@ -1512,18 +1529,18 @@ function xn(t) {
|
|
|
1512
1529
|
);
|
|
1513
1530
|
}
|
|
1514
1531
|
}
|
|
1515
|
-
class
|
|
1532
|
+
class L {
|
|
1516
1533
|
constructor(e, n, r, i, s, o, a, l) {
|
|
1517
1534
|
this._renderingMode = e, this._initialArgs = n, this._initialUiState = r, this._outputs = i, this._inputsValid = s, this._sections = o, this._title = a, this._enrichmentTargets = l;
|
|
1518
1535
|
}
|
|
1519
1536
|
static create(e = "Heavy") {
|
|
1520
|
-
return new
|
|
1537
|
+
return new L(
|
|
1521
1538
|
e,
|
|
1522
1539
|
void 0,
|
|
1523
1540
|
{},
|
|
1524
1541
|
{},
|
|
1525
|
-
|
|
1526
|
-
|
|
1542
|
+
ne(!0),
|
|
1543
|
+
ne([]),
|
|
1527
1544
|
void 0,
|
|
1528
1545
|
void 0
|
|
1529
1546
|
);
|
|
@@ -1531,7 +1548,7 @@ class _ {
|
|
|
1531
1548
|
output(e, n, r = {}) {
|
|
1532
1549
|
if (typeof n == "function") {
|
|
1533
1550
|
const i = `output#${e}`;
|
|
1534
|
-
return
|
|
1551
|
+
return G(i, () => n(new ee())), new L(
|
|
1535
1552
|
this._renderingMode,
|
|
1536
1553
|
this._initialArgs,
|
|
1537
1554
|
this._initialUiState,
|
|
@@ -1549,7 +1566,7 @@ class _ {
|
|
|
1549
1566
|
this._enrichmentTargets
|
|
1550
1567
|
);
|
|
1551
1568
|
} else
|
|
1552
|
-
return new
|
|
1569
|
+
return new L(
|
|
1553
1570
|
this._renderingMode,
|
|
1554
1571
|
this._initialArgs,
|
|
1555
1572
|
this._initialUiState,
|
|
@@ -1568,7 +1585,7 @@ class _ {
|
|
|
1568
1585
|
return this.output(e, n, { retentive: !0 });
|
|
1569
1586
|
}
|
|
1570
1587
|
argsValid(e) {
|
|
1571
|
-
return typeof e == "function" ? (
|
|
1588
|
+
return typeof e == "function" ? (G("inputsValid", () => e(new ee())), new L(
|
|
1572
1589
|
this._renderingMode,
|
|
1573
1590
|
this._initialArgs,
|
|
1574
1591
|
this._initialUiState,
|
|
@@ -1580,7 +1597,7 @@ class _ {
|
|
|
1580
1597
|
this._sections,
|
|
1581
1598
|
this._title,
|
|
1582
1599
|
this._enrichmentTargets
|
|
1583
|
-
)) : new
|
|
1600
|
+
)) : new L(
|
|
1584
1601
|
this._renderingMode,
|
|
1585
1602
|
this._initialArgs,
|
|
1586
1603
|
this._initialUiState,
|
|
@@ -1592,7 +1609,7 @@ class _ {
|
|
|
1592
1609
|
);
|
|
1593
1610
|
}
|
|
1594
1611
|
sections(e) {
|
|
1595
|
-
return Array.isArray(e) ? this.sections(
|
|
1612
|
+
return Array.isArray(e) ? this.sections(ne(e)) : typeof e == "function" ? (G("sections", () => e(new ee())), new L(
|
|
1596
1613
|
this._renderingMode,
|
|
1597
1614
|
this._initialArgs,
|
|
1598
1615
|
this._initialUiState,
|
|
@@ -1601,7 +1618,7 @@ class _ {
|
|
|
1601
1618
|
{ __renderLambda: !0, handle: "sections" },
|
|
1602
1619
|
this._title,
|
|
1603
1620
|
this._enrichmentTargets
|
|
1604
|
-
)) : new
|
|
1621
|
+
)) : new L(
|
|
1605
1622
|
this._renderingMode,
|
|
1606
1623
|
this._initialArgs,
|
|
1607
1624
|
this._initialUiState,
|
|
@@ -1614,7 +1631,7 @@ class _ {
|
|
|
1614
1631
|
}
|
|
1615
1632
|
/** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
|
|
1616
1633
|
title(e) {
|
|
1617
|
-
return
|
|
1634
|
+
return G("title", () => e(new ee())), new L(
|
|
1618
1635
|
this._renderingMode,
|
|
1619
1636
|
this._initialArgs,
|
|
1620
1637
|
this._initialUiState,
|
|
@@ -1630,7 +1647,7 @@ class _ {
|
|
|
1630
1647
|
* @deprecated use {@link withArgs}
|
|
1631
1648
|
* */
|
|
1632
1649
|
initialArgs(e) {
|
|
1633
|
-
return new
|
|
1650
|
+
return new L(
|
|
1634
1651
|
this._renderingMode,
|
|
1635
1652
|
e,
|
|
1636
1653
|
this._initialUiState,
|
|
@@ -1643,7 +1660,7 @@ class _ {
|
|
|
1643
1660
|
}
|
|
1644
1661
|
/** Sets initial args for the block, this value must be specified. */
|
|
1645
1662
|
withArgs(e) {
|
|
1646
|
-
return new
|
|
1663
|
+
return new L(
|
|
1647
1664
|
this._renderingMode,
|
|
1648
1665
|
e,
|
|
1649
1666
|
this._initialUiState,
|
|
@@ -1656,7 +1673,7 @@ class _ {
|
|
|
1656
1673
|
}
|
|
1657
1674
|
/** Defines type and sets initial value for block UiState. */
|
|
1658
1675
|
withUiState(e) {
|
|
1659
|
-
return new
|
|
1676
|
+
return new L(
|
|
1660
1677
|
this._renderingMode,
|
|
1661
1678
|
this._initialArgs,
|
|
1662
1679
|
e,
|
|
@@ -1672,7 +1689,7 @@ class _ {
|
|
|
1672
1689
|
* Influences dependency graph construction.
|
|
1673
1690
|
*/
|
|
1674
1691
|
enriches(e) {
|
|
1675
|
-
return
|
|
1692
|
+
return G("enrichmentTargets", e), new L(
|
|
1676
1693
|
this._renderingMode,
|
|
1677
1694
|
this._initialArgs,
|
|
1678
1695
|
this._initialUiState,
|
|
@@ -1690,7 +1707,7 @@ class _ {
|
|
|
1690
1707
|
if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
|
|
1691
1708
|
const e = {
|
|
1692
1709
|
v3: {
|
|
1693
|
-
sdkVersion:
|
|
1710
|
+
sdkVersion: z,
|
|
1694
1711
|
renderingMode: this._renderingMode,
|
|
1695
1712
|
initialArgs: this._initialArgs,
|
|
1696
1713
|
initialUiState: this._initialUiState,
|
|
@@ -1701,54 +1718,54 @@ class _ {
|
|
|
1701
1718
|
enrichmentTargets: this._enrichmentTargets
|
|
1702
1719
|
},
|
|
1703
1720
|
// fields below are added to allow previous desktop versions read generated configs
|
|
1704
|
-
sdkVersion:
|
|
1721
|
+
sdkVersion: z,
|
|
1705
1722
|
renderingMode: this._renderingMode,
|
|
1706
1723
|
initialArgs: this._initialArgs,
|
|
1707
|
-
inputsValid:
|
|
1708
|
-
sections:
|
|
1724
|
+
inputsValid: de(this._inputsValid),
|
|
1725
|
+
sections: de(this._sections),
|
|
1709
1726
|
outputs: Object.fromEntries(
|
|
1710
|
-
Object.entries(this._outputs).map(([n, r]) => [n,
|
|
1727
|
+
Object.entries(this._outputs).map(([n, r]) => [n, de(r)])
|
|
1711
1728
|
)
|
|
1712
1729
|
};
|
|
1713
|
-
return
|
|
1730
|
+
return ct() ? Oe({ sdkVersion: z }) : { config: e };
|
|
1714
1731
|
}
|
|
1715
1732
|
}
|
|
1716
|
-
function
|
|
1733
|
+
function In(t) {
|
|
1717
1734
|
const e = t.type;
|
|
1718
1735
|
switch (e) {
|
|
1719
1736
|
case "axis":
|
|
1720
|
-
return
|
|
1737
|
+
return re(t);
|
|
1721
1738
|
case "column":
|
|
1722
|
-
return
|
|
1739
|
+
return re(t);
|
|
1723
1740
|
default:
|
|
1724
1741
|
throw Error(`unsupported column type: ${e}`);
|
|
1725
1742
|
}
|
|
1726
1743
|
}
|
|
1727
|
-
function
|
|
1744
|
+
function Ot(t) {
|
|
1728
1745
|
return JSON.parse(t);
|
|
1729
1746
|
}
|
|
1730
|
-
function
|
|
1747
|
+
function Rt(t) {
|
|
1731
1748
|
return t.axesSpec.length === 1 && t.name === "pl7.app/label";
|
|
1732
1749
|
}
|
|
1733
|
-
function
|
|
1734
|
-
return new
|
|
1750
|
+
function Je(t) {
|
|
1751
|
+
return new me().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
|
|
1735
1752
|
name: "pl7.app/label",
|
|
1736
1753
|
axes: [{}]
|
|
1737
1754
|
// exactly one axis
|
|
1738
1755
|
}, { dontWaitAllData: !0 });
|
|
1739
1756
|
}
|
|
1740
|
-
function
|
|
1757
|
+
function Ne(t, e) {
|
|
1741
1758
|
const n = [], r = [];
|
|
1742
1759
|
for (const a of t)
|
|
1743
|
-
|
|
1760
|
+
Rt(a.spec) ? n.push(a) : r.push(a);
|
|
1744
1761
|
const i = [];
|
|
1745
1762
|
for (const a of r)
|
|
1746
1763
|
for (const l of a.spec.axesSpec) {
|
|
1747
|
-
const u =
|
|
1748
|
-
i.some((p) =>
|
|
1764
|
+
const u = O(l);
|
|
1765
|
+
i.some((p) => K(p, u)) || i.push(u);
|
|
1749
1766
|
}
|
|
1750
1767
|
for (const a of n) {
|
|
1751
|
-
const l =
|
|
1768
|
+
const l = O(a.spec.axesSpec[0]), u = i.findIndex((p) => K(p, l));
|
|
1752
1769
|
u !== -1 && i.splice(u, 1);
|
|
1753
1770
|
}
|
|
1754
1771
|
const s = (a, l) => {
|
|
@@ -1759,14 +1776,14 @@ function Ke(t, e) {
|
|
|
1759
1776
|
return u;
|
|
1760
1777
|
}, o = [];
|
|
1761
1778
|
for (const a of e) {
|
|
1762
|
-
const l = a.spec.axesSpec[0], u =
|
|
1779
|
+
const l = a.spec.axesSpec[0], u = O(l), p = i.findIndex((h) => K(h, u));
|
|
1763
1780
|
if (p !== -1) {
|
|
1764
|
-
const
|
|
1765
|
-
|
|
1766
|
-
id: s(a.id,
|
|
1781
|
+
const h = i[p], w = Object.keys(h.domain ?? {}).length, g = Object.keys(l.domain ?? {}).length;
|
|
1782
|
+
w > g ? o.push({
|
|
1783
|
+
id: s(a.id, h.domain),
|
|
1767
1784
|
spec: {
|
|
1768
1785
|
...a.spec,
|
|
1769
|
-
axesSpec: [{ ...
|
|
1786
|
+
axesSpec: [{ ...h, annotations: l.annotations }]
|
|
1770
1787
|
},
|
|
1771
1788
|
data: a.data
|
|
1772
1789
|
}) : o.push(a), i.splice(p, 1);
|
|
@@ -1774,8 +1791,8 @@ function Ke(t, e) {
|
|
|
1774
1791
|
}
|
|
1775
1792
|
return o;
|
|
1776
1793
|
}
|
|
1777
|
-
function
|
|
1778
|
-
const e = (i) => Array.isArray(i), n = (i) => i instanceof
|
|
1794
|
+
function Ue(t) {
|
|
1795
|
+
const e = (i) => Array.isArray(i), n = (i) => i instanceof E, r = (i) => typeof i == "object" && "type" in i;
|
|
1779
1796
|
return t.map((i) => i.data).every((i) => {
|
|
1780
1797
|
if (e(i))
|
|
1781
1798
|
return !0;
|
|
@@ -1794,7 +1811,7 @@ function $e(t) {
|
|
|
1794
1811
|
throw Error(`unsupported column data type: ${i}`);
|
|
1795
1812
|
});
|
|
1796
1813
|
}
|
|
1797
|
-
function
|
|
1814
|
+
function Be(t, e, n, r, i, s) {
|
|
1798
1815
|
let o = t;
|
|
1799
1816
|
const a = [];
|
|
1800
1817
|
if (s) {
|
|
@@ -1815,56 +1832,56 @@ function Je(t, e, n, r, i, s) {
|
|
|
1815
1832
|
sorting: i
|
|
1816
1833
|
};
|
|
1817
1834
|
}
|
|
1818
|
-
function
|
|
1835
|
+
function Tn(t, e, n, r) {
|
|
1819
1836
|
var u, p;
|
|
1820
1837
|
Array.isArray(r) && (r = { filters: r });
|
|
1821
|
-
const i = (r == null ? void 0 : r.coreJoinType) ?? "full", s = [...(r == null ? void 0 : r.filters) ?? [], ...((u = n == null ? void 0 : n.pTableParams) == null ? void 0 : u.filters) ?? []], o = ((p = n == null ? void 0 : n.pTableParams) == null ? void 0 : p.sorting) ?? [], a =
|
|
1838
|
+
const i = (r == null ? void 0 : r.coreJoinType) ?? "full", s = [...(r == null ? void 0 : r.filters) ?? [], ...((u = n == null ? void 0 : n.pTableParams) == null ? void 0 : u.filters) ?? []], o = ((p = n == null ? void 0 : n.pTableParams) == null ? void 0 : p.sorting) ?? [], a = Je(t.resultPool);
|
|
1822
1839
|
if (!a) return;
|
|
1823
|
-
const l =
|
|
1824
|
-
if (
|
|
1840
|
+
const l = Ne(e.map(Ee), a);
|
|
1841
|
+
if (Ue([...e, ...l]))
|
|
1825
1842
|
return t.createPTable(
|
|
1826
|
-
|
|
1843
|
+
Be(e, l, i, s, o, r == null ? void 0 : r.coreColumnPredicate)
|
|
1827
1844
|
);
|
|
1828
1845
|
}
|
|
1829
|
-
function
|
|
1846
|
+
function kt(t) {
|
|
1830
1847
|
var e;
|
|
1831
1848
|
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
|
|
1832
1849
|
}
|
|
1833
|
-
function
|
|
1834
|
-
var
|
|
1835
|
-
const s = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((
|
|
1850
|
+
function Ln(t, e, n, r, i) {
|
|
1851
|
+
var c, y;
|
|
1852
|
+
const s = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((c = r == null ? void 0 : r.pTableParams) == null ? void 0 : c.filters) ?? []], a = ((y = r == null ? void 0 : r.pTableParams) == null ? void 0 : y.sorting) ?? [], l = e.find((d) => n(d.spec));
|
|
1836
1853
|
if (!l) return;
|
|
1837
|
-
const u =
|
|
1854
|
+
const u = Je(t.resultPool);
|
|
1838
1855
|
if (!u) return;
|
|
1839
1856
|
const p = new Set((() => {
|
|
1840
|
-
var b,
|
|
1857
|
+
var b, A;
|
|
1841
1858
|
if (s === "inner") return [];
|
|
1842
|
-
const
|
|
1843
|
-
return
|
|
1859
|
+
const d = (A = (b = r == null ? void 0 : r.gridState.columnVisibility) == null ? void 0 : b.hiddenColIds) == null ? void 0 : A.map(Ot).filter((v) => v.type === "column").map((v) => v.id);
|
|
1860
|
+
return d || e.filter((v) => kt(v.spec)).map((v) => v.id);
|
|
1844
1861
|
})());
|
|
1845
|
-
p.delete(l.id), [...o.map((
|
|
1846
|
-
const
|
|
1847
|
-
...l.spec.axesSpec.map((
|
|
1862
|
+
p.delete(l.id), [...o.map((d) => d.column), ...a.map((d) => d.column)].filter((d) => d.type === "column").map((d) => p.delete(d.id));
|
|
1863
|
+
const h = e.filter((d) => !p.has(d.id)), w = Ne(h.map(Ee), u), g = [
|
|
1864
|
+
...l.spec.axesSpec.map((d) => ({
|
|
1848
1865
|
type: "axis",
|
|
1849
|
-
id:
|
|
1850
|
-
spec:
|
|
1866
|
+
id: O(d),
|
|
1867
|
+
spec: d
|
|
1851
1868
|
})),
|
|
1852
|
-
...[...e, ...
|
|
1869
|
+
...[...e, ...w].map((d) => ({
|
|
1853
1870
|
type: "column",
|
|
1854
|
-
id:
|
|
1855
|
-
spec:
|
|
1871
|
+
id: d.id,
|
|
1872
|
+
spec: d.spec
|
|
1856
1873
|
}))
|
|
1857
1874
|
];
|
|
1858
|
-
if (
|
|
1859
|
-
const
|
|
1860
|
-
|
|
1875
|
+
if (!Ue([...h, ...w])) return;
|
|
1876
|
+
const m = t.createPTable(
|
|
1877
|
+
Be(e, w, s, o, a, i == null ? void 0 : i.coreColumnPredicate)
|
|
1861
1878
|
);
|
|
1862
1879
|
return {
|
|
1863
|
-
tableSpec:
|
|
1864
|
-
tableHandle:
|
|
1880
|
+
tableSpec: g,
|
|
1881
|
+
tableHandle: m
|
|
1865
1882
|
};
|
|
1866
1883
|
}
|
|
1867
|
-
function
|
|
1884
|
+
function En(t, e, n) {
|
|
1868
1885
|
const r = t.resultPool.findLabels(e);
|
|
1869
1886
|
return {
|
|
1870
1887
|
axis: e,
|
|
@@ -1875,7 +1892,7 @@ function _n(t, e, n) {
|
|
|
1875
1892
|
defaultValue: n[0]
|
|
1876
1893
|
};
|
|
1877
1894
|
}
|
|
1878
|
-
const
|
|
1895
|
+
const jt = (t, e) => {
|
|
1879
1896
|
let n = t.toString();
|
|
1880
1897
|
return e == null || e.forEach((r) => {
|
|
1881
1898
|
if (r)
|
|
@@ -1883,7 +1900,7 @@ const Ot = (t, e) => {
|
|
|
1883
1900
|
n += i, n += s;
|
|
1884
1901
|
}), n;
|
|
1885
1902
|
};
|
|
1886
|
-
function
|
|
1903
|
+
function Vt(t) {
|
|
1887
1904
|
if (!t.length)
|
|
1888
1905
|
return [];
|
|
1889
1906
|
let e = [[]];
|
|
@@ -1894,85 +1911,85 @@ function Dt(t) {
|
|
|
1894
1911
|
}), e = r;
|
|
1895
1912
|
}), e;
|
|
1896
1913
|
}
|
|
1897
|
-
function
|
|
1898
|
-
const n = t.axesSpec.map(
|
|
1899
|
-
return e.axesSpec.map(
|
|
1914
|
+
function Kt(t, e) {
|
|
1915
|
+
const n = t.axesSpec.map(O);
|
|
1916
|
+
return e.axesSpec.map(O).every((i) => n.some((s) => K(s, i) && K(i, s)));
|
|
1900
1917
|
}
|
|
1901
|
-
function
|
|
1902
|
-
const n = t.axesSpec.map(
|
|
1903
|
-
return e.axesSpec.map(
|
|
1918
|
+
function Me(t, e) {
|
|
1919
|
+
const n = t.axesSpec.map(O);
|
|
1920
|
+
return e.axesSpec.map(O).every((i) => n.some((s) => K(s, i)));
|
|
1904
1921
|
}
|
|
1905
|
-
const
|
|
1906
|
-
function
|
|
1907
|
-
const n = t.spec.axesSpec.map(
|
|
1908
|
-
if (
|
|
1922
|
+
const $t = "pl7.app/graph/isVirtual", Ie = "pl7.app/label";
|
|
1923
|
+
function Te(t, e) {
|
|
1924
|
+
const n = t.spec.axesSpec.map(O), r = e.spec.axesSpec.map(O);
|
|
1925
|
+
if (Kt(t.spec, e.spec))
|
|
1909
1926
|
return [];
|
|
1910
|
-
if (!
|
|
1927
|
+
if (!Me(t.spec, e.spec))
|
|
1911
1928
|
return [];
|
|
1912
|
-
const o = r.map((
|
|
1913
|
-
const
|
|
1914
|
-
return
|
|
1915
|
-
const
|
|
1916
|
-
return Object.entries(
|
|
1917
|
-
if ((
|
|
1918
|
-
const
|
|
1919
|
-
|
|
1929
|
+
const o = r.map((h) => n.filter((w) => K(w, h))), a = Vt(o), l = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), p = a.map((h) => {
|
|
1930
|
+
const w = /* @__PURE__ */ new Set();
|
|
1931
|
+
return h.map((g, m) => {
|
|
1932
|
+
const c = e.spec.axesSpec[m].domain, y = g.domain;
|
|
1933
|
+
return Object.entries(y ?? {}).forEach(([d, b]) => {
|
|
1934
|
+
if ((c == null ? void 0 : c[d]) === void 0) {
|
|
1935
|
+
const A = JSON.stringify([d, b]);
|
|
1936
|
+
w.add(A), l.add(A);
|
|
1920
1937
|
}
|
|
1921
1938
|
}), {
|
|
1922
|
-
...
|
|
1923
|
-
annotations: e.spec.axesSpec[
|
|
1939
|
+
...g,
|
|
1940
|
+
annotations: e.spec.axesSpec[m].annotations
|
|
1924
1941
|
};
|
|
1925
|
-
}),
|
|
1942
|
+
}), w;
|
|
1926
1943
|
});
|
|
1927
|
-
return [...l].forEach((
|
|
1928
|
-
p.some((
|
|
1929
|
-
}), a.map((
|
|
1930
|
-
var
|
|
1931
|
-
const
|
|
1932
|
-
var
|
|
1933
|
-
return (
|
|
1934
|
-
}).join(" / "),
|
|
1944
|
+
return [...l].forEach((h) => {
|
|
1945
|
+
p.some((w) => !w.has(h)) && u.add(h);
|
|
1946
|
+
}), a.map((h, w) => {
|
|
1947
|
+
var d;
|
|
1948
|
+
const g = jt(e.id, h.map((b) => b.domain)), m = ((d = e.spec.annotations) == null ? void 0 : d[Ie]) ?? "", c = [...p[w]].filter((b) => u.has(b)).sort().map((b) => {
|
|
1949
|
+
var A;
|
|
1950
|
+
return (A = JSON.parse(b)) == null ? void 0 : A[1];
|
|
1951
|
+
}).join(" / "), y = {
|
|
1935
1952
|
...e.spec.annotations,
|
|
1936
|
-
[
|
|
1953
|
+
[$t]: "true"
|
|
1937
1954
|
};
|
|
1938
|
-
return (
|
|
1939
|
-
id:
|
|
1955
|
+
return (m || c) && (y[Ie] = m && c ? m + " / " + c : m + c), {
|
|
1956
|
+
id: g,
|
|
1940
1957
|
spec: {
|
|
1941
1958
|
...e.spec,
|
|
1942
|
-
axesSpec:
|
|
1959
|
+
axesSpec: h.map((b, A) => ({
|
|
1943
1960
|
...b,
|
|
1944
|
-
annotations: e.spec.axesSpec[
|
|
1961
|
+
annotations: e.spec.axesSpec[A].annotations
|
|
1945
1962
|
})),
|
|
1946
|
-
annotations:
|
|
1963
|
+
annotations: y
|
|
1947
1964
|
},
|
|
1948
1965
|
data: e.data
|
|
1949
1966
|
};
|
|
1950
1967
|
});
|
|
1951
1968
|
}
|
|
1952
|
-
function
|
|
1969
|
+
function Jt(t) {
|
|
1953
1970
|
const e = [];
|
|
1954
1971
|
for (let n = 0; n < t.length; n++)
|
|
1955
1972
|
for (let r = n + 1; r < t.length; r++) {
|
|
1956
1973
|
const i = t[n], s = t[r];
|
|
1957
1974
|
e.push(
|
|
1958
|
-
...
|
|
1959
|
-
...
|
|
1975
|
+
...Te(i, s),
|
|
1976
|
+
...Te(s, i)
|
|
1960
1977
|
);
|
|
1961
1978
|
}
|
|
1962
1979
|
return e;
|
|
1963
1980
|
}
|
|
1964
|
-
function
|
|
1981
|
+
function Nt(t, e) {
|
|
1965
1982
|
const n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map();
|
|
1966
1983
|
t.forEach((s) => {
|
|
1967
|
-
n.add(s.id), r.set(
|
|
1984
|
+
n.add(s.id), r.set(re(Pe(s.spec)), s);
|
|
1968
1985
|
});
|
|
1969
1986
|
const i = /* @__PURE__ */ new Map();
|
|
1970
1987
|
for (const s of e) {
|
|
1971
1988
|
if (n.has(s.id)) continue;
|
|
1972
|
-
const o =
|
|
1989
|
+
const o = re(Pe(s.spec));
|
|
1973
1990
|
if (!r.has(o)) {
|
|
1974
1991
|
for (const a of r.values())
|
|
1975
|
-
if (
|
|
1992
|
+
if (Me(a.spec, s.spec)) {
|
|
1976
1993
|
i.set(o, s);
|
|
1977
1994
|
break;
|
|
1978
1995
|
}
|
|
@@ -1980,15 +1997,15 @@ function Vt(t, e) {
|
|
|
1980
1997
|
}
|
|
1981
1998
|
return [...r.values(), ...i.values()];
|
|
1982
1999
|
}
|
|
1983
|
-
function
|
|
2000
|
+
function Dn(t, e) {
|
|
1984
2001
|
if (!e) return;
|
|
1985
|
-
const n = t.resultPool.getData().entries.map((s) => s.obj).filter(
|
|
2002
|
+
const n = t.resultPool.getData().entries.map((s) => s.obj).filter(ye), r = Nt(e, n), i = [...r, ...Jt(r)];
|
|
1986
2003
|
if (!i.some(
|
|
1987
|
-
(s) => s.data instanceof
|
|
2004
|
+
(s) => s.data instanceof E && !s.data.getIsReadyOrError()
|
|
1988
2005
|
))
|
|
1989
2006
|
return t.createPFrame(i);
|
|
1990
2007
|
}
|
|
1991
|
-
class
|
|
2008
|
+
class Fn {
|
|
1992
2009
|
constructor(e) {
|
|
1993
2010
|
this.handle = e;
|
|
1994
2011
|
}
|
|
@@ -2008,121 +2025,121 @@ class Ln {
|
|
|
2008
2025
|
return await platforma.pFrameDriver.getUniqueValues(this.handle, e);
|
|
2009
2026
|
}
|
|
2010
2027
|
}
|
|
2011
|
-
function
|
|
2012
|
-
return
|
|
2028
|
+
function Ut(t) {
|
|
2029
|
+
return Fe({
|
|
2013
2030
|
__isRef: !0,
|
|
2014
|
-
blockId:
|
|
2015
|
-
name:
|
|
2031
|
+
blockId: ie(t, "blockId"),
|
|
2032
|
+
name: ie(t, "name")
|
|
2016
2033
|
});
|
|
2017
2034
|
}
|
|
2018
|
-
function
|
|
2019
|
-
return
|
|
2020
|
-
ref:
|
|
2021
|
-
label:
|
|
2035
|
+
function On(t) {
|
|
2036
|
+
return Fe({
|
|
2037
|
+
ref: Ut(ie(t, "ref")),
|
|
2038
|
+
label: ie(t, "label")
|
|
2022
2039
|
});
|
|
2023
2040
|
}
|
|
2024
|
-
const
|
|
2025
|
-
sdkVersion:
|
|
2041
|
+
const Rn = {
|
|
2042
|
+
sdkVersion: z
|
|
2026
2043
|
};
|
|
2027
|
-
function
|
|
2028
|
-
return
|
|
2044
|
+
function Bt() {
|
|
2045
|
+
return Oe({ sdkVersion: z });
|
|
2029
2046
|
}
|
|
2030
|
-
function
|
|
2047
|
+
function kn(t) {
|
|
2031
2048
|
try {
|
|
2032
|
-
return
|
|
2049
|
+
return Bt();
|
|
2033
2050
|
} catch {
|
|
2034
2051
|
return t;
|
|
2035
2052
|
}
|
|
2036
2053
|
}
|
|
2037
|
-
function
|
|
2054
|
+
function jn(t) {
|
|
2038
2055
|
if (typeof globalThis.getEnvironmentValue == "function")
|
|
2039
2056
|
return globalThis.getEnvironmentValue(t);
|
|
2040
2057
|
}
|
|
2041
2058
|
export {
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2059
|
+
Yt as Args,
|
|
2060
|
+
L as BlockModel,
|
|
2061
|
+
Rn as CurrentSdkInfo,
|
|
2062
|
+
I as FutureRef,
|
|
2063
|
+
$t as IS_VIRTUAL_COLUMN,
|
|
2064
|
+
Xt as It,
|
|
2065
|
+
Cn as JsRenderInternal,
|
|
2066
|
+
Ie as LABEL_ANNOTATION,
|
|
2067
|
+
Qt as MainOutputs,
|
|
2068
|
+
lt as OutputError,
|
|
2069
|
+
gt as PAnnotationLabel,
|
|
2070
|
+
mt as PAnnotationTrace,
|
|
2071
|
+
me as PColumnCollection,
|
|
2072
|
+
Fn as PFrameImpl,
|
|
2073
|
+
B as RT_BINARY_PARTITIONED,
|
|
2074
|
+
q as RT_BINARY_SUPER_PARTITIONED,
|
|
2075
|
+
H as RT_JSON_PARTITIONED,
|
|
2076
|
+
ae as RT_JSON_SUPER_PARTITIONED,
|
|
2077
|
+
se as RT_RESOURCE_MAP,
|
|
2078
|
+
oe as RT_RESOURCE_MAP_PARTITIONED,
|
|
2079
|
+
ee as RenderCtx,
|
|
2080
|
+
Dt as ResultPool,
|
|
2081
|
+
Zt as StagingOutputs,
|
|
2082
|
+
vt as Trace,
|
|
2083
|
+
yt as TraceEntry,
|
|
2084
|
+
E as TreeNodeAccessor,
|
|
2085
|
+
en as UiState,
|
|
2086
|
+
Ue as allColumnsComputed,
|
|
2087
|
+
ln as and,
|
|
2088
|
+
Ct as convertOrParsePColumnData,
|
|
2089
|
+
Dn as createPFrameForGraphs,
|
|
2090
|
+
Tn as createPlDataTable,
|
|
2091
|
+
En as createPlDataTableSheet,
|
|
2092
|
+
Ln as createPlDataTableV2,
|
|
2093
|
+
Ve as deriveLabels,
|
|
2094
|
+
de as downgradeCfgOrLambda,
|
|
2095
|
+
Nt as enrichColumnsWithCompatible,
|
|
2096
|
+
vn as extractArchiveAndGetURL,
|
|
2097
|
+
_n as extractConfig,
|
|
2098
|
+
St as filterDataInfoEntries,
|
|
2099
|
+
sn as flatten,
|
|
2100
|
+
On as fromPlOption,
|
|
2101
|
+
Ut as fromPlRef,
|
|
2102
|
+
Jt as getAdditionalColumns,
|
|
2103
|
+
Je as getAllLabelColumns,
|
|
2104
|
+
fn as getBlobContent,
|
|
2105
|
+
gn as getBlobContentAsJson,
|
|
2106
|
+
hn as getBlobContentAsString,
|
|
2107
|
+
mn as getDownloadedBlobContent,
|
|
2108
|
+
jn as getEnvironmentValue,
|
|
2109
|
+
X as getFromCfg,
|
|
2110
|
+
ne as getImmediate,
|
|
2111
|
+
bn as getImportProgress,
|
|
2112
|
+
ie as getJsonField,
|
|
2113
|
+
wn as getLastLogs,
|
|
2114
|
+
Pn as getLogHandle,
|
|
2115
|
+
Ne as getMatchingLabelColumns,
|
|
2116
|
+
yn as getOnDemandBlobContent,
|
|
2117
|
+
At as getPartitionKeysList,
|
|
2118
|
+
kn as getPlatformaOrDefault,
|
|
2119
|
+
An as getProgressLog,
|
|
2120
|
+
xn as getProgressLogWithInfo,
|
|
2121
|
+
Bt as getRawPlatformaInstance,
|
|
2122
|
+
cn as getResourceField,
|
|
2123
|
+
dn as getResourceValueAsJson,
|
|
2124
|
+
Pt as getUniquePartitionKeys,
|
|
2108
2125
|
pe as ifDef,
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2126
|
+
kt as isColumnOptional,
|
|
2127
|
+
Ft as isConfigLambda,
|
|
2128
|
+
on as isEmpty,
|
|
2129
|
+
Rt as isLabelColumn,
|
|
2130
|
+
zt as isolate,
|
|
2131
|
+
tn as makeArray,
|
|
2132
|
+
Fe as makeObject,
|
|
2133
|
+
rn as mapArrayValues,
|
|
2134
|
+
nn as mapRecordValues,
|
|
2135
|
+
pn as mapResourceFields,
|
|
2136
|
+
an as not,
|
|
2137
|
+
un as or,
|
|
2138
|
+
ge as parsePColumnData,
|
|
2139
|
+
Ot as parsePTableColumnId,
|
|
2140
|
+
Sn as parseResourceMap,
|
|
2141
|
+
ut as readOutput,
|
|
2142
|
+
In as stringifyPTableColumnId,
|
|
2143
|
+
qt as wrapOutputs
|
|
2127
2144
|
};
|
|
2128
2145
|
//# sourceMappingURL=index.mjs.map
|