@platforma-open/milaboratories.immune-assay-data.model 1.1.0 → 1.2.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/.turbo/turbo-build.log +13 -13
- package/CHANGELOG.md +6 -0
- package/dist/bundle.js +501 -484
- package/dist/bundle.js.map +1 -1
- package/dist/index.cjs +1 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -50
- package/dist/index.d.ts +4 -50
- package/dist/index.js +2 -5
- package/dist/index.js.map +1 -1
- package/dist/model.json +1 -1
- package/package.json +5 -5
- package/src/index.ts +5 -7
package/dist/bundle.js
CHANGED
|
@@ -2,48 +2,6 @@
|
|
|
2
2
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.model = {}));
|
|
3
3
|
})(this, function(exports2) {
|
|
4
4
|
"use strict";
|
|
5
|
-
function getDefaultExportFromCjs(x2) {
|
|
6
|
-
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
7
|
-
}
|
|
8
|
-
var canonicalize;
|
|
9
|
-
var hasRequiredCanonicalize;
|
|
10
|
-
function requireCanonicalize() {
|
|
11
|
-
if (hasRequiredCanonicalize) return canonicalize;
|
|
12
|
-
hasRequiredCanonicalize = 1;
|
|
13
|
-
canonicalize = function serialize(object) {
|
|
14
|
-
if (typeof object === "number" && isNaN(object)) {
|
|
15
|
-
throw new Error("NaN is not allowed");
|
|
16
|
-
}
|
|
17
|
-
if (typeof object === "number" && !isFinite(object)) {
|
|
18
|
-
throw new Error("Infinity is not allowed");
|
|
19
|
-
}
|
|
20
|
-
if (object === null || typeof object !== "object") {
|
|
21
|
-
return JSON.stringify(object);
|
|
22
|
-
}
|
|
23
|
-
if (object.toJSON instanceof Function) {
|
|
24
|
-
return serialize(object.toJSON());
|
|
25
|
-
}
|
|
26
|
-
if (Array.isArray(object)) {
|
|
27
|
-
const values2 = object.reduce((t, cv, ci) => {
|
|
28
|
-
const comma = ci === 0 ? "" : ",";
|
|
29
|
-
const value = cv === void 0 || typeof cv === "symbol" ? null : cv;
|
|
30
|
-
return `${t}${comma}${serialize(value)}`;
|
|
31
|
-
}, "");
|
|
32
|
-
return `[${values2}]`;
|
|
33
|
-
}
|
|
34
|
-
const values = Object.keys(object).sort().reduce((t, cv) => {
|
|
35
|
-
if (object[cv] === void 0 || typeof object[cv] === "symbol") {
|
|
36
|
-
return t;
|
|
37
|
-
}
|
|
38
|
-
const comma = t.length === 0 ? "" : ",";
|
|
39
|
-
return `${t}${comma}${serialize(cv)}:${serialize(object[cv])}`;
|
|
40
|
-
}, "");
|
|
41
|
-
return `{${values}}`;
|
|
42
|
-
};
|
|
43
|
-
return canonicalize;
|
|
44
|
-
}
|
|
45
|
-
var canonicalizeExports = requireCanonicalize();
|
|
46
|
-
const ke = /* @__PURE__ */ getDefaultExportFromCjs(canonicalizeExports);
|
|
47
5
|
var util;
|
|
48
6
|
(function(util2) {
|
|
49
7
|
util2.assertEqual = (val) => val;
|
|
@@ -433,7 +391,7 @@
|
|
|
433
391
|
overrideMap,
|
|
434
392
|
overrideMap === errorMap ? void 0 : errorMap
|
|
435
393
|
// then global default map
|
|
436
|
-
].filter((
|
|
394
|
+
].filter((x) => !!x)
|
|
437
395
|
});
|
|
438
396
|
ctx.common.issues.push(issue);
|
|
439
397
|
}
|
|
@@ -496,10 +454,10 @@
|
|
|
496
454
|
});
|
|
497
455
|
const DIRTY = (value) => ({ status: "dirty", value });
|
|
498
456
|
const OK = (value) => ({ status: "valid", value });
|
|
499
|
-
const isAborted = (
|
|
500
|
-
const isDirty = (
|
|
501
|
-
const isValid = (
|
|
502
|
-
const isAsync = (
|
|
457
|
+
const isAborted = (x) => x.status === "aborted";
|
|
458
|
+
const isDirty = (x) => x.status === "dirty";
|
|
459
|
+
const isValid = (x) => x.status === "valid";
|
|
460
|
+
const isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
503
461
|
function __classPrivateFieldGet(receiver, state, kind, f2) {
|
|
504
462
|
if (typeof state === "function" ? receiver !== state || true : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
505
463
|
return state.get(receiver);
|
|
@@ -2829,7 +2787,7 @@
|
|
|
2829
2787
|
if (!schema)
|
|
2830
2788
|
return null;
|
|
2831
2789
|
return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));
|
|
2832
|
-
}).filter((
|
|
2790
|
+
}).filter((x) => !!x);
|
|
2833
2791
|
if (ctx.common.async) {
|
|
2834
2792
|
return Promise.all(items).then((results) => {
|
|
2835
2793
|
return ParseStatus.mergeArray(status, results);
|
|
@@ -3087,7 +3045,7 @@
|
|
|
3087
3045
|
ctx.schemaErrorMap,
|
|
3088
3046
|
getErrorMap(),
|
|
3089
3047
|
errorMap
|
|
3090
|
-
].filter((
|
|
3048
|
+
].filter((x) => !!x),
|
|
3091
3049
|
issueData: {
|
|
3092
3050
|
code: ZodIssueCode.invalid_arguments,
|
|
3093
3051
|
argumentsError: error
|
|
@@ -3103,7 +3061,7 @@
|
|
|
3103
3061
|
ctx.schemaErrorMap,
|
|
3104
3062
|
getErrorMap(),
|
|
3105
3063
|
errorMap
|
|
3106
|
-
].filter((
|
|
3064
|
+
].filter((x) => !!x),
|
|
3107
3065
|
issueData: {
|
|
3108
3066
|
code: ZodIssueCode.invalid_return_type,
|
|
3109
3067
|
returnTypeError: error
|
|
@@ -3111,31 +3069,31 @@
|
|
|
3111
3069
|
});
|
|
3112
3070
|
}
|
|
3113
3071
|
const params = { errorMap: ctx.common.contextualErrorMap };
|
|
3114
|
-
const
|
|
3072
|
+
const fn2 = ctx.data;
|
|
3115
3073
|
if (this._def.returns instanceof ZodPromise) {
|
|
3116
|
-
const
|
|
3074
|
+
const me = this;
|
|
3117
3075
|
return OK(async function(...args) {
|
|
3118
3076
|
const error = new ZodError([]);
|
|
3119
|
-
const parsedArgs = await
|
|
3077
|
+
const parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => {
|
|
3120
3078
|
error.addIssue(makeArgsIssue(args, e));
|
|
3121
3079
|
throw error;
|
|
3122
3080
|
});
|
|
3123
|
-
const result = await Reflect.apply(
|
|
3124
|
-
const parsedReturns = await
|
|
3081
|
+
const result = await Reflect.apply(fn2, this, parsedArgs);
|
|
3082
|
+
const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => {
|
|
3125
3083
|
error.addIssue(makeReturnsIssue(result, e));
|
|
3126
3084
|
throw error;
|
|
3127
3085
|
});
|
|
3128
3086
|
return parsedReturns;
|
|
3129
3087
|
});
|
|
3130
3088
|
} else {
|
|
3131
|
-
const
|
|
3089
|
+
const me = this;
|
|
3132
3090
|
return OK(function(...args) {
|
|
3133
|
-
const parsedArgs =
|
|
3091
|
+
const parsedArgs = me._def.args.safeParse(args, params);
|
|
3134
3092
|
if (!parsedArgs.success) {
|
|
3135
3093
|
throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);
|
|
3136
3094
|
}
|
|
3137
|
-
const result = Reflect.apply(
|
|
3138
|
-
const parsedReturns =
|
|
3095
|
+
const result = Reflect.apply(fn2, this, parsedArgs.data);
|
|
3096
|
+
const parsedReturns = me._def.returns.safeParse(result, params);
|
|
3139
3097
|
if (!parsedReturns.success) {
|
|
3140
3098
|
throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);
|
|
3141
3099
|
}
|
|
@@ -3840,7 +3798,7 @@
|
|
|
3840
3798
|
date: (arg) => ZodDate.create({ ...arg, coerce: true })
|
|
3841
3799
|
};
|
|
3842
3800
|
const NEVER = INVALID;
|
|
3843
|
-
var z$
|
|
3801
|
+
var z$1 = /* @__PURE__ */ Object.freeze({
|
|
3844
3802
|
__proto__: null,
|
|
3845
3803
|
defaultErrorMap: errorMap,
|
|
3846
3804
|
setErrorMap,
|
|
@@ -3956,13 +3914,61 @@
|
|
|
3956
3914
|
quotelessJson,
|
|
3957
3915
|
ZodError
|
|
3958
3916
|
});
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3917
|
+
function getDefaultExportFromCjs(x) {
|
|
3918
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
3919
|
+
}
|
|
3920
|
+
var canonicalize;
|
|
3921
|
+
var hasRequiredCanonicalize;
|
|
3922
|
+
function requireCanonicalize() {
|
|
3923
|
+
if (hasRequiredCanonicalize) return canonicalize;
|
|
3924
|
+
hasRequiredCanonicalize = 1;
|
|
3925
|
+
canonicalize = function serialize(object) {
|
|
3926
|
+
if (typeof object === "number" && isNaN(object)) {
|
|
3927
|
+
throw new Error("NaN is not allowed");
|
|
3928
|
+
}
|
|
3929
|
+
if (typeof object === "number" && !isFinite(object)) {
|
|
3930
|
+
throw new Error("Infinity is not allowed");
|
|
3931
|
+
}
|
|
3932
|
+
if (object === null || typeof object !== "object") {
|
|
3933
|
+
return JSON.stringify(object);
|
|
3934
|
+
}
|
|
3935
|
+
if (object.toJSON instanceof Function) {
|
|
3936
|
+
return serialize(object.toJSON());
|
|
3937
|
+
}
|
|
3938
|
+
if (Array.isArray(object)) {
|
|
3939
|
+
const values2 = object.reduce((t, cv, ci) => {
|
|
3940
|
+
const comma = ci === 0 ? "" : ",";
|
|
3941
|
+
const value = cv === void 0 || typeof cv === "symbol" ? null : cv;
|
|
3942
|
+
return `${t}${comma}${serialize(value)}`;
|
|
3943
|
+
}, "");
|
|
3944
|
+
return `[${values2}]`;
|
|
3945
|
+
}
|
|
3946
|
+
const values = Object.keys(object).sort().reduce((t, cv) => {
|
|
3947
|
+
if (object[cv] === void 0 || typeof object[cv] === "symbol") {
|
|
3948
|
+
return t;
|
|
3949
|
+
}
|
|
3950
|
+
const comma = t.length === 0 ? "" : ",";
|
|
3951
|
+
return `${t}${comma}${serialize(cv)}:${serialize(object[cv])}`;
|
|
3952
|
+
}, "");
|
|
3953
|
+
return `{${values}}`;
|
|
3954
|
+
};
|
|
3955
|
+
return canonicalize;
|
|
3956
|
+
}
|
|
3957
|
+
var canonicalizeExports = requireCanonicalize();
|
|
3958
|
+
const Re = /* @__PURE__ */ getDefaultExportFromCjs(canonicalizeExports);
|
|
3959
|
+
var B$1 = Object.defineProperty;
|
|
3960
|
+
var j = (n2, e, t) => e in n2 ? B$1(n2, e, { enumerable: true, configurable: true, writable: true, value: t }) : n2[e] = t;
|
|
3961
|
+
var l$1 = (n2, e, t) => j(n2, typeof e != "symbol" ? e + "" : e, t);
|
|
3962
|
+
z$1.object({
|
|
3963
|
+
/** Included left border. */
|
|
3964
|
+
from: z$1.number(),
|
|
3965
|
+
/** Excluded right border. */
|
|
3966
|
+
to: z$1.number()
|
|
3967
|
+
});
|
|
3962
3968
|
function w(n2) {
|
|
3963
3969
|
throw new Error("Unexpected object: " + n2);
|
|
3964
3970
|
}
|
|
3965
|
-
function
|
|
3971
|
+
function En(n2) {
|
|
3966
3972
|
if (!n2 || typeof n2 != "object")
|
|
3967
3973
|
return false;
|
|
3968
3974
|
const e = n2;
|
|
@@ -3979,7 +3985,7 @@
|
|
|
3979
3985
|
return false;
|
|
3980
3986
|
}
|
|
3981
3987
|
}
|
|
3982
|
-
function
|
|
3988
|
+
function Nn(n2, e) {
|
|
3983
3989
|
if (n2 !== void 0)
|
|
3984
3990
|
switch (n2.type) {
|
|
3985
3991
|
case "Json":
|
|
@@ -4007,7 +4013,7 @@
|
|
|
4007
4013
|
}
|
|
4008
4014
|
}
|
|
4009
4015
|
}
|
|
4010
|
-
function
|
|
4016
|
+
function K(n2) {
|
|
4011
4017
|
if (!n2 || typeof n2 != "object")
|
|
4012
4018
|
return false;
|
|
4013
4019
|
const e = n2;
|
|
@@ -4024,10 +4030,10 @@
|
|
|
4024
4030
|
return false;
|
|
4025
4031
|
}
|
|
4026
4032
|
}
|
|
4027
|
-
function
|
|
4028
|
-
return
|
|
4033
|
+
function Sn(n2) {
|
|
4034
|
+
return K(n2) ? n2.type === "JsonPartitioned" || n2.type === "BinaryPartitioned" : false;
|
|
4029
4035
|
}
|
|
4030
|
-
function
|
|
4036
|
+
function Cn(n2) {
|
|
4031
4037
|
switch (n2.type) {
|
|
4032
4038
|
case "Json": {
|
|
4033
4039
|
const e = Object.entries(n2.data).map(([t, r]) => ({ key: JSON.parse(t), value: r }));
|
|
@@ -4055,7 +4061,7 @@
|
|
|
4055
4061
|
}
|
|
4056
4062
|
}
|
|
4057
4063
|
}
|
|
4058
|
-
function
|
|
4064
|
+
function Jn(n2) {
|
|
4059
4065
|
switch (n2.type) {
|
|
4060
4066
|
case "Json": {
|
|
4061
4067
|
const e = {};
|
|
@@ -4089,36 +4095,36 @@
|
|
|
4089
4095
|
}
|
|
4090
4096
|
}
|
|
4091
4097
|
}
|
|
4092
|
-
function
|
|
4098
|
+
function Fn(n2) {
|
|
4093
4099
|
return {
|
|
4094
4100
|
columnId: n2.id,
|
|
4095
4101
|
spec: n2.spec
|
|
4096
4102
|
};
|
|
4097
4103
|
}
|
|
4098
4104
|
function p$1(n2) {
|
|
4099
|
-
const { type: e, name: t, domain: r } = n2;
|
|
4100
|
-
return
|
|
4105
|
+
const { type: e, name: t, domain: r } = n2, o = { type: e, name: t };
|
|
4106
|
+
return r && Object.entries(r).length > 0 && Object.assign(o, { domain: r }), o;
|
|
4101
4107
|
}
|
|
4102
|
-
function
|
|
4108
|
+
function J(n2) {
|
|
4103
4109
|
return n2.map(p$1);
|
|
4104
4110
|
}
|
|
4105
|
-
function
|
|
4106
|
-
return
|
|
4111
|
+
function Rn(n2) {
|
|
4112
|
+
return Re(p$1(n2));
|
|
4107
4113
|
}
|
|
4108
|
-
function
|
|
4114
|
+
function Y$1(n2, e) {
|
|
4109
4115
|
if (n2 === void 0) return e === void 0;
|
|
4110
4116
|
if (e === void 0) return true;
|
|
4111
4117
|
for (const t in e)
|
|
4112
4118
|
if (n2[t] !== e[t]) return false;
|
|
4113
4119
|
return true;
|
|
4114
4120
|
}
|
|
4115
|
-
function
|
|
4116
|
-
return n2.name === e.name &&
|
|
4121
|
+
function Z$1(n2, e) {
|
|
4122
|
+
return n2.name === e.name && Y$1(n2.domain, e.domain);
|
|
4117
4123
|
}
|
|
4118
|
-
function
|
|
4119
|
-
return { ...n2, src: h
|
|
4124
|
+
function Un(n2, e) {
|
|
4125
|
+
return { ...n2, src: h(n2.src, e) };
|
|
4120
4126
|
}
|
|
4121
|
-
function h
|
|
4127
|
+
function h(n2, e) {
|
|
4122
4128
|
switch (n2.type) {
|
|
4123
4129
|
case "column":
|
|
4124
4130
|
return {
|
|
@@ -4138,28 +4144,28 @@
|
|
|
4138
4144
|
case "full":
|
|
4139
4145
|
return {
|
|
4140
4146
|
type: n2.type,
|
|
4141
|
-
entries: n2.entries.map((t) => h
|
|
4147
|
+
entries: n2.entries.map((t) => h(t, e))
|
|
4142
4148
|
};
|
|
4143
4149
|
case "outer":
|
|
4144
4150
|
return {
|
|
4145
4151
|
type: "outer",
|
|
4146
|
-
primary: h
|
|
4147
|
-
secondary: n2.secondary.map((t) => h
|
|
4152
|
+
primary: h(n2.primary, e),
|
|
4153
|
+
secondary: n2.secondary.map((t) => h(t, e))
|
|
4148
4154
|
};
|
|
4149
4155
|
default:
|
|
4150
4156
|
w(n2);
|
|
4151
4157
|
}
|
|
4152
4158
|
}
|
|
4153
|
-
function
|
|
4154
|
-
return
|
|
4159
|
+
function nn(n2) {
|
|
4160
|
+
return Re(n2);
|
|
4155
4161
|
}
|
|
4156
|
-
function
|
|
4157
|
-
return
|
|
4162
|
+
function P(n2) {
|
|
4163
|
+
return Re(p$1(n2));
|
|
4158
4164
|
}
|
|
4159
|
-
function
|
|
4165
|
+
function k$1(n2, e) {
|
|
4160
4166
|
return JSON.stringify([n2, e]);
|
|
4161
4167
|
}
|
|
4162
|
-
class
|
|
4168
|
+
class _n {
|
|
4163
4169
|
/**
|
|
4164
4170
|
* Creates a new anchor context from a set of anchor column specifications
|
|
4165
4171
|
* @param anchors Record of anchor column specifications indexed by anchor ID
|
|
@@ -4174,14 +4180,14 @@
|
|
|
4174
4180
|
t.sort((r, o) => r[0].localeCompare(o[0]));
|
|
4175
4181
|
for (const [r, o] of t) {
|
|
4176
4182
|
for (let s2 = 0; s2 < o.axesSpec.length; s2++) {
|
|
4177
|
-
const a = o.axesSpec[s2], i =
|
|
4183
|
+
const a = o.axesSpec[s2], i = P(a);
|
|
4178
4184
|
this.axes.set(i, { anchor: r, idx: s2 });
|
|
4179
4185
|
}
|
|
4180
4186
|
if (o.domain !== void 0) {
|
|
4181
4187
|
const s2 = Object.entries(o.domain);
|
|
4182
4188
|
s2.sort((a, i) => a[0].localeCompare(i[0])), this.domainPackToAnchor.set(JSON.stringify(s2), r), this.domainPacks.push(s2.map(([a]) => a));
|
|
4183
4189
|
for (const [a, i] of s2) {
|
|
4184
|
-
const u2 =
|
|
4190
|
+
const u2 = k$1(a, i);
|
|
4185
4191
|
this.domains.set(u2, r);
|
|
4186
4192
|
}
|
|
4187
4193
|
}
|
|
@@ -4201,9 +4207,9 @@
|
|
|
4201
4207
|
for (const a of this.domainPacks) {
|
|
4202
4208
|
const i = [];
|
|
4203
4209
|
for (const c2 of a) {
|
|
4204
|
-
const
|
|
4205
|
-
if (
|
|
4206
|
-
i.push([c2,
|
|
4210
|
+
const m2 = e.domain[c2];
|
|
4211
|
+
if (m2 !== void 0)
|
|
4212
|
+
i.push([c2, m2]);
|
|
4207
4213
|
else
|
|
4208
4214
|
break n;
|
|
4209
4215
|
}
|
|
@@ -4216,11 +4222,11 @@
|
|
|
4216
4222
|
for (const [a, i] of Object.entries(e.domain ?? {})) {
|
|
4217
4223
|
if (o !== void 0 && o.has(a))
|
|
4218
4224
|
continue;
|
|
4219
|
-
const u2 =
|
|
4225
|
+
const u2 = k$1(a, i), c2 = this.domains.get(u2);
|
|
4220
4226
|
r.domain ?? (r.domain = {}), r.domain[a] = c2 ? { anchor: c2 } : i;
|
|
4221
4227
|
}
|
|
4222
4228
|
if (r.axes = e.axesSpec.map((a) => {
|
|
4223
|
-
const i =
|
|
4229
|
+
const i = P(a), u2 = this.axes.get(i);
|
|
4224
4230
|
return u2 === void 0 ? p$1(a) : u2;
|
|
4225
4231
|
}), !t || t.length === 0)
|
|
4226
4232
|
return r;
|
|
@@ -4232,7 +4238,7 @@
|
|
|
4232
4238
|
throw new Error(`Axis index ${i} is out of bounds (0-${e.axesSpec.length - 1})`);
|
|
4233
4239
|
s2.push([i, u2]);
|
|
4234
4240
|
} else {
|
|
4235
|
-
const c2 = e.axesSpec.findIndex((
|
|
4241
|
+
const c2 = e.axesSpec.findIndex((m2) => m2.name === i);
|
|
4236
4242
|
if (c2 === -1)
|
|
4237
4243
|
throw new Error(`Axis with name "${i}" not found in the column specification`);
|
|
4238
4244
|
s2.push([c2, u2]);
|
|
@@ -4250,10 +4256,10 @@
|
|
|
4250
4256
|
* @returns A canonicalized string representation of the anchored column identifier
|
|
4251
4257
|
*/
|
|
4252
4258
|
deriveS(e, t) {
|
|
4253
|
-
return
|
|
4259
|
+
return nn(this.derive(e, t));
|
|
4254
4260
|
}
|
|
4255
4261
|
}
|
|
4256
|
-
function
|
|
4262
|
+
function Mn(n2, e, t) {
|
|
4257
4263
|
const r = { ...e }, o = (t == null ? void 0 : t.ignoreMissingDomains) ?? false;
|
|
4258
4264
|
if (r.domainAnchor !== void 0) {
|
|
4259
4265
|
const s2 = n2[r.domainAnchor];
|
|
@@ -4280,10 +4286,10 @@
|
|
|
4280
4286
|
}
|
|
4281
4287
|
r.domain = s2;
|
|
4282
4288
|
}
|
|
4283
|
-
return r.axes && (r.axes = r.axes.map((s2) =>
|
|
4289
|
+
return r.axes && (r.axes = r.axes.map((s2) => en(n2, s2))), r;
|
|
4284
4290
|
}
|
|
4285
|
-
function
|
|
4286
|
-
if (!
|
|
4291
|
+
function en(n2, e) {
|
|
4292
|
+
if (!tn(e))
|
|
4287
4293
|
return e;
|
|
4288
4294
|
const t = e.anchor, r = n2[t];
|
|
4289
4295
|
if (!r)
|
|
@@ -4300,7 +4306,7 @@
|
|
|
4300
4306
|
throw new Error(`Axis with name "${e.name}" not found in anchor "${t}"`);
|
|
4301
4307
|
return o[0];
|
|
4302
4308
|
} else if ("id" in e) {
|
|
4303
|
-
const o = r.axesSpec.filter((s2) =>
|
|
4309
|
+
const o = r.axesSpec.filter((s2) => Z$1(e.id, p$1(s2)));
|
|
4304
4310
|
if (o.length > 1)
|
|
4305
4311
|
throw new Error(`Multiple matching axes found for matcher in anchor "${t}"`);
|
|
4306
4312
|
if (o.length === 0)
|
|
@@ -4309,26 +4315,26 @@
|
|
|
4309
4315
|
}
|
|
4310
4316
|
throw new Error("Unsupported axis reference type");
|
|
4311
4317
|
}
|
|
4312
|
-
function
|
|
4318
|
+
function tn(n2) {
|
|
4313
4319
|
return typeof n2 == "object" && "anchor" in n2;
|
|
4314
4320
|
}
|
|
4315
4321
|
function f(n2) {
|
|
4316
4322
|
return n2.kind === "PColumn";
|
|
4317
4323
|
}
|
|
4318
|
-
function
|
|
4324
|
+
function rn(n2) {
|
|
4319
4325
|
return f(n2.spec);
|
|
4320
4326
|
}
|
|
4321
|
-
function
|
|
4322
|
-
if (!
|
|
4327
|
+
function qn(n2) {
|
|
4328
|
+
if (!rn(n2)) throw new Error(`not a PColumn (kind = ${n2.spec.kind})`);
|
|
4323
4329
|
return n2;
|
|
4324
4330
|
}
|
|
4325
|
-
function
|
|
4331
|
+
function Wn(n2, e) {
|
|
4326
4332
|
return n2 === void 0 ? void 0 : {
|
|
4327
4333
|
...n2,
|
|
4328
4334
|
data: e(n2.data)
|
|
4329
4335
|
};
|
|
4330
4336
|
}
|
|
4331
|
-
function
|
|
4337
|
+
function Xn(n2) {
|
|
4332
4338
|
const e = /* @__PURE__ */ new Map(), t = (r) => {
|
|
4333
4339
|
switch (r.type) {
|
|
4334
4340
|
case "column":
|
|
@@ -4353,7 +4359,7 @@
|
|
|
4353
4359
|
};
|
|
4354
4360
|
return t(n2), [...e.values()];
|
|
4355
4361
|
}
|
|
4356
|
-
function
|
|
4362
|
+
function E$1(n2, e) {
|
|
4357
4363
|
if (n2.name !== void 0 && n2.name !== e.name)
|
|
4358
4364
|
return false;
|
|
4359
4365
|
if (n2.type !== void 0) {
|
|
@@ -4391,13 +4397,13 @@
|
|
|
4391
4397
|
const t = n2.axesSpec.map(p$1);
|
|
4392
4398
|
if (e.partialAxesMatch) {
|
|
4393
4399
|
for (const r of e.axes)
|
|
4394
|
-
if (!t.some((o) =>
|
|
4400
|
+
if (!t.some((o) => E$1(r, o)))
|
|
4395
4401
|
return false;
|
|
4396
4402
|
} else {
|
|
4397
4403
|
if (t.length !== e.axes.length)
|
|
4398
4404
|
return false;
|
|
4399
4405
|
for (let r = 0; r < e.axes.length; r++)
|
|
4400
|
-
if (!
|
|
4406
|
+
if (!E$1(e.axes[r], t[r]))
|
|
4401
4407
|
return false;
|
|
4402
4408
|
}
|
|
4403
4409
|
}
|
|
@@ -4417,28 +4423,28 @@
|
|
|
4417
4423
|
}
|
|
4418
4424
|
return true;
|
|
4419
4425
|
}
|
|
4420
|
-
function
|
|
4426
|
+
function Gn(n2) {
|
|
4421
4427
|
return Array.isArray(n2) ? (e) => n2.some((t) => f(e) && N(e, t)) : (e) => f(e) && N(e, n2);
|
|
4422
4428
|
}
|
|
4423
|
-
function
|
|
4429
|
+
function Qn(n2) {
|
|
4424
4430
|
const e = {
|
|
4425
4431
|
kind: n2.kind,
|
|
4426
4432
|
name: n2.name
|
|
4427
4433
|
};
|
|
4428
|
-
return n2.domain !== void 0 && (e.domain = n2.domain), f(n2) && (e.axesSpec =
|
|
4434
|
+
return n2.domain !== void 0 && (e.domain = n2.domain), f(n2) && (e.axesSpec = J(n2.axesSpec)), Re(e);
|
|
4429
4435
|
}
|
|
4430
|
-
z$
|
|
4431
|
-
__isRef: z$
|
|
4432
|
-
blockId: z$
|
|
4433
|
-
name: z$
|
|
4434
|
-
requireEnrichments: z$
|
|
4436
|
+
z$1.object({
|
|
4437
|
+
__isRef: z$1.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
|
|
4438
|
+
blockId: z$1.string().describe("Upstream block id"),
|
|
4439
|
+
name: z$1.string().describe("Name of the output provided to the upstream block's output context"),
|
|
4440
|
+
requireEnrichments: z$1.literal(true).optional().describe("True if current block that stores this reference in its args, may need enrichments for the references value originating from the blocks in between current and referenced block")
|
|
4435
4441
|
}).describe(
|
|
4436
4442
|
"Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees."
|
|
4437
4443
|
).readonly();
|
|
4438
|
-
function
|
|
4444
|
+
function ne(n2) {
|
|
4439
4445
|
return typeof n2 == "object" && n2 !== null && "__isRef" in n2 && n2.__isRef === true && "blockId" in n2 && "name" in n2;
|
|
4440
4446
|
}
|
|
4441
|
-
function
|
|
4447
|
+
function te$1(n2, e = true) {
|
|
4442
4448
|
if (e)
|
|
4443
4449
|
return {
|
|
4444
4450
|
...n2,
|
|
@@ -4449,13 +4455,13 @@
|
|
|
4449
4455
|
return r;
|
|
4450
4456
|
}
|
|
4451
4457
|
}
|
|
4452
|
-
function
|
|
4458
|
+
function oe$1(n2, e) {
|
|
4453
4459
|
return n2.ok ? { ok: true, value: e(n2.value) } : n2;
|
|
4454
4460
|
}
|
|
4455
|
-
const
|
|
4456
|
-
z$
|
|
4457
|
-
function
|
|
4458
|
-
return
|
|
4461
|
+
const fn = 24;
|
|
4462
|
+
z$1.string().length(fn).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
|
|
4463
|
+
function ue$1(n2) {
|
|
4464
|
+
return Re(n2);
|
|
4459
4465
|
}
|
|
4460
4466
|
var stringify = { exports: {} };
|
|
4461
4467
|
var hasRequiredStringify;
|
|
@@ -4488,44 +4494,44 @@
|
|
|
4488
4494
|
return stringify.exports;
|
|
4489
4495
|
}
|
|
4490
4496
|
requireStringify();
|
|
4491
|
-
const l = z$
|
|
4492
|
-
type: z$
|
|
4493
|
-
name: z$
|
|
4494
|
-
message: z$
|
|
4497
|
+
const l = z$1.object({
|
|
4498
|
+
type: z$1.literal("PlError"),
|
|
4499
|
+
name: z$1.string(),
|
|
4500
|
+
message: z$1.string(),
|
|
4495
4501
|
/** The message with all details needed for SDK developers. */
|
|
4496
|
-
fullMessage: z$
|
|
4497
|
-
stack: z$
|
|
4502
|
+
fullMessage: z$1.string().optional(),
|
|
4503
|
+
stack: z$1.string().optional()
|
|
4498
4504
|
}), c = l.extend({
|
|
4499
|
-
cause: z$
|
|
4500
|
-
errors: z$
|
|
4501
|
-
}), m = z$
|
|
4502
|
-
type: z$
|
|
4503
|
-
name: z$
|
|
4504
|
-
message: z$
|
|
4505
|
-
stack: z$
|
|
4505
|
+
cause: z$1.lazy(() => s).optional(),
|
|
4506
|
+
errors: z$1.lazy(() => s.array()).optional()
|
|
4507
|
+
}), m = z$1.object({
|
|
4508
|
+
type: z$1.literal("StandardError"),
|
|
4509
|
+
name: z$1.string(),
|
|
4510
|
+
message: z$1.string(),
|
|
4511
|
+
stack: z$1.string().optional()
|
|
4506
4512
|
}), p = m.extend({
|
|
4507
|
-
cause: z$
|
|
4508
|
-
errors: z$
|
|
4509
|
-
}), s = z$
|
|
4510
|
-
const u = z$
|
|
4511
|
-
name: z$
|
|
4512
|
-
message: z$
|
|
4513
|
-
fullMessage: z$
|
|
4514
|
-
stack: z$
|
|
4513
|
+
cause: z$1.lazy(() => s).optional(),
|
|
4514
|
+
errors: z$1.lazy(() => s.array()).optional()
|
|
4515
|
+
}), s = z$1.union([p, c]);
|
|
4516
|
+
const u = z$1.object({
|
|
4517
|
+
name: z$1.string(),
|
|
4518
|
+
message: z$1.string(),
|
|
4519
|
+
fullMessage: z$1.string().optional(),
|
|
4520
|
+
stack: z$1.string().optional()
|
|
4515
4521
|
}), n = u.extend({
|
|
4516
|
-
cause: z$
|
|
4517
|
-
errors: z$
|
|
4522
|
+
cause: z$1.lazy(() => n).optional(),
|
|
4523
|
+
errors: z$1.lazy(() => n.array()).optional()
|
|
4518
4524
|
});
|
|
4519
|
-
var
|
|
4520
|
-
var
|
|
4521
|
-
var
|
|
4525
|
+
var Ye = Object.defineProperty;
|
|
4526
|
+
var Xe = (t, e, n2) => e in t ? Ye(t, e, { enumerable: true, configurable: true, writable: true, value: n2 }) : t[e] = n2;
|
|
4527
|
+
var k = (t, e, n2) => Xe(t, typeof e != "symbol" ? e + "" : e, n2);
|
|
4522
4528
|
function re(t) {
|
|
4523
4529
|
return { type: "Immediate", value: t };
|
|
4524
4530
|
}
|
|
4525
4531
|
function ht() {
|
|
4526
4532
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
4527
4533
|
}
|
|
4528
|
-
function
|
|
4534
|
+
function Ke(t) {
|
|
4529
4535
|
if (t && typeof globalThis.getPlatforma == "function")
|
|
4530
4536
|
return globalThis.getPlatforma(t);
|
|
4531
4537
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
@@ -4534,7 +4540,7 @@
|
|
|
4534
4540
|
function gt() {
|
|
4535
4541
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
4536
4542
|
}
|
|
4537
|
-
function
|
|
4543
|
+
function y() {
|
|
4538
4544
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
4539
4545
|
throw new Error("Not in config rendering context");
|
|
4540
4546
|
}
|
|
@@ -4544,17 +4550,17 @@
|
|
|
4544
4550
|
if (t in n2.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
|
|
4545
4551
|
return n2.callbackRegistry[t] = e, true;
|
|
4546
4552
|
}
|
|
4547
|
-
const
|
|
4553
|
+
const de = /* @__PURE__ */ new Map();
|
|
4548
4554
|
function mt(t, e) {
|
|
4549
|
-
t in
|
|
4550
|
-
for (const r of
|
|
4555
|
+
t in y().callbackRegistry || (y().callbackRegistry[t] = (n2) => {
|
|
4556
|
+
for (const r of de.get(t))
|
|
4551
4557
|
r(n2);
|
|
4552
|
-
},
|
|
4558
|
+
}, de.set(t, [])), de.get(t).push(e);
|
|
4553
4559
|
}
|
|
4554
4560
|
class I {
|
|
4555
4561
|
constructor(e, n2 = (r) => r) {
|
|
4556
|
-
|
|
4557
|
-
|
|
4562
|
+
k(this, "isResolved", false);
|
|
4563
|
+
k(this, "resolvedValue");
|
|
4558
4564
|
this.handle = e, this.postProcess = n2, mt(e, (r) => {
|
|
4559
4565
|
this.resolvedValue = n2(r), this.isResolved = true;
|
|
4560
4566
|
});
|
|
@@ -4572,10 +4578,10 @@
|
|
|
4572
4578
|
return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
|
|
4573
4579
|
}
|
|
4574
4580
|
}
|
|
4575
|
-
function
|
|
4581
|
+
function ge(t, e) {
|
|
4576
4582
|
return t === void 0 ? void 0 : e(t);
|
|
4577
4583
|
}
|
|
4578
|
-
class
|
|
4584
|
+
class E {
|
|
4579
4585
|
constructor(e, n2) {
|
|
4580
4586
|
this.handle = e, this.resolvePath = n2;
|
|
4581
4587
|
}
|
|
@@ -4614,47 +4620,47 @@
|
|
|
4614
4620
|
...this.resolvePath,
|
|
4615
4621
|
...n2.map((i) => typeof i == "string" ? i : i.field)
|
|
4616
4622
|
];
|
|
4617
|
-
return
|
|
4618
|
-
|
|
4619
|
-
(i) => new
|
|
4623
|
+
return ge(
|
|
4624
|
+
y().resolveWithCommon(this.handle, e, ...n2),
|
|
4625
|
+
(i) => new E(i, r)
|
|
4620
4626
|
);
|
|
4621
4627
|
}
|
|
4622
4628
|
get resourceType() {
|
|
4623
|
-
return
|
|
4629
|
+
return y().getResourceType(this.handle);
|
|
4624
4630
|
}
|
|
4625
4631
|
getInputsLocked() {
|
|
4626
|
-
return
|
|
4632
|
+
return y().getInputsLocked(this.handle);
|
|
4627
4633
|
}
|
|
4628
4634
|
getOutputsLocked() {
|
|
4629
|
-
return
|
|
4635
|
+
return y().getOutputsLocked(this.handle);
|
|
4630
4636
|
}
|
|
4631
4637
|
getIsReadyOrError() {
|
|
4632
|
-
return
|
|
4638
|
+
return y().getIsReadyOrError(this.handle);
|
|
4633
4639
|
}
|
|
4634
4640
|
getIsFinal() {
|
|
4635
|
-
return
|
|
4641
|
+
return y().getIsFinal(this.handle);
|
|
4636
4642
|
}
|
|
4637
4643
|
getError() {
|
|
4638
4644
|
const e = [...this.resolvePath, "error"];
|
|
4639
|
-
return
|
|
4640
|
-
|
|
4641
|
-
(n2) => new
|
|
4645
|
+
return ge(
|
|
4646
|
+
y().getError(this.handle),
|
|
4647
|
+
(n2) => new E(n2, e)
|
|
4642
4648
|
);
|
|
4643
4649
|
}
|
|
4644
4650
|
listInputFields() {
|
|
4645
|
-
return
|
|
4651
|
+
return y().listInputFields(this.handle);
|
|
4646
4652
|
}
|
|
4647
4653
|
listOutputFields() {
|
|
4648
|
-
return
|
|
4654
|
+
return y().listOutputFields(this.handle);
|
|
4649
4655
|
}
|
|
4650
4656
|
listDynamicFields() {
|
|
4651
|
-
return
|
|
4657
|
+
return y().listDynamicFields(this.handle);
|
|
4652
4658
|
}
|
|
4653
4659
|
getKeyValueBase64(e) {
|
|
4654
|
-
return
|
|
4660
|
+
return y().getKeyValueBase64(this.handle, e);
|
|
4655
4661
|
}
|
|
4656
4662
|
getKeyValueAsString(e) {
|
|
4657
|
-
return
|
|
4663
|
+
return y().getKeyValueAsString(this.handle, e);
|
|
4658
4664
|
}
|
|
4659
4665
|
getKeyValueAsJson(e) {
|
|
4660
4666
|
const n2 = this.getKeyValueAsString(e);
|
|
@@ -4662,10 +4668,10 @@
|
|
|
4662
4668
|
return JSON.parse(n2);
|
|
4663
4669
|
}
|
|
4664
4670
|
getDataBase64() {
|
|
4665
|
-
return
|
|
4671
|
+
return y().getDataBase64(this.handle);
|
|
4666
4672
|
}
|
|
4667
4673
|
getDataAsString() {
|
|
4668
|
-
return
|
|
4674
|
+
return y().getDataAsString(this.handle);
|
|
4669
4675
|
}
|
|
4670
4676
|
getDataAsJson() {
|
|
4671
4677
|
const e = this.getDataAsString();
|
|
@@ -4678,7 +4684,7 @@
|
|
|
4678
4684
|
getPColumns(e = false, n2 = "") {
|
|
4679
4685
|
const r = this.parsePObjectCollection(e, n2);
|
|
4680
4686
|
return r === void 0 ? void 0 : Object.entries(r).map(([, s2]) => {
|
|
4681
|
-
if (!
|
|
4687
|
+
if (!rn(s2)) throw new Error(`not a PColumn (kind = ${s2.spec.kind})`);
|
|
4682
4688
|
return s2;
|
|
4683
4689
|
});
|
|
4684
4690
|
}
|
|
@@ -4686,7 +4692,7 @@
|
|
|
4686
4692
|
*
|
|
4687
4693
|
*/
|
|
4688
4694
|
parsePObjectCollection(e = false, n2 = "") {
|
|
4689
|
-
const r =
|
|
4695
|
+
const r = y().parsePObjectCollection(
|
|
4690
4696
|
this.handle,
|
|
4691
4697
|
e,
|
|
4692
4698
|
n2,
|
|
@@ -4696,19 +4702,19 @@
|
|
|
4696
4702
|
const i = {};
|
|
4697
4703
|
for (const [s2, o] of Object.entries(r)) {
|
|
4698
4704
|
const a = [...this.resolvePath, s2];
|
|
4699
|
-
i[s2] =
|
|
4705
|
+
i[s2] = Wn(o, (l2) => new E(l2, a));
|
|
4700
4706
|
}
|
|
4701
4707
|
return i;
|
|
4702
4708
|
}
|
|
4703
4709
|
getFileContentAsBase64(e) {
|
|
4704
|
-
return new I(
|
|
4710
|
+
return new I(y().getBlobContentAsBase64(this.handle, e));
|
|
4705
4711
|
}
|
|
4706
4712
|
getFileContentAsString(e) {
|
|
4707
|
-
return new I(
|
|
4713
|
+
return new I(y().getBlobContentAsString(this.handle, e));
|
|
4708
4714
|
}
|
|
4709
4715
|
getFileContentAsJson(e) {
|
|
4710
4716
|
return new I(
|
|
4711
|
-
|
|
4717
|
+
y().getBlobContentAsString(this.handle, e)
|
|
4712
4718
|
).mapDefined((n2) => JSON.parse(n2));
|
|
4713
4719
|
}
|
|
4714
4720
|
/**
|
|
@@ -4727,7 +4733,7 @@
|
|
|
4727
4733
|
* @returns downloaded file handle
|
|
4728
4734
|
*/
|
|
4729
4735
|
getFileHandle() {
|
|
4730
|
-
return new I(
|
|
4736
|
+
return new I(y().getDownloadedBlobContentHandle(this.handle));
|
|
4731
4737
|
}
|
|
4732
4738
|
/**
|
|
4733
4739
|
* @deprecated use getFileHandle
|
|
@@ -4739,7 +4745,7 @@
|
|
|
4739
4745
|
* @returns downloaded file handle
|
|
4740
4746
|
*/
|
|
4741
4747
|
getRemoteFileHandle() {
|
|
4742
|
-
return new I(
|
|
4748
|
+
return new I(y().getOnDemandBlobContentHandle(this.handle));
|
|
4743
4749
|
}
|
|
4744
4750
|
/**
|
|
4745
4751
|
* @deprecated use getRemoteFileHandle
|
|
@@ -4751,22 +4757,22 @@
|
|
|
4751
4757
|
* @returns the url to the extracted folder
|
|
4752
4758
|
*/
|
|
4753
4759
|
extractArchiveAndGetURL(e) {
|
|
4754
|
-
return new I(
|
|
4760
|
+
return new I(y().extractArchiveAndGetURL(this.handle, e));
|
|
4755
4761
|
}
|
|
4756
4762
|
getImportProgress() {
|
|
4757
|
-
return new I(
|
|
4763
|
+
return new I(y().getImportProgress(this.handle));
|
|
4758
4764
|
}
|
|
4759
4765
|
getLastLogs(e) {
|
|
4760
|
-
return new I(
|
|
4766
|
+
return new I(y().getLastLogs(this.handle, e));
|
|
4761
4767
|
}
|
|
4762
4768
|
getProgressLog(e) {
|
|
4763
|
-
return new I(
|
|
4769
|
+
return new I(y().getProgressLog(this.handle, e));
|
|
4764
4770
|
}
|
|
4765
4771
|
getProgressLogWithInfo(e) {
|
|
4766
|
-
return new I(
|
|
4772
|
+
return new I(y().getProgressLogWithInfo(this.handle, e));
|
|
4767
4773
|
}
|
|
4768
4774
|
getLogHandle() {
|
|
4769
|
-
return new I(
|
|
4775
|
+
return new I(y().getLogHandle(this.handle));
|
|
4770
4776
|
}
|
|
4771
4777
|
allFieldsResolved(e = "Input") {
|
|
4772
4778
|
switch (e) {
|
|
@@ -4792,91 +4798,91 @@
|
|
|
4792
4798
|
let l2 = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
|
|
4793
4799
|
(u2) => [u2, this.resolve({ field: u2, assertFieldType: r })]
|
|
4794
4800
|
);
|
|
4795
|
-
return s2 && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2,
|
|
4796
|
-
}
|
|
4797
|
-
}
|
|
4798
|
-
const
|
|
4799
|
-
const bt = "pl7.app/label", wt = "pl7.app/trace", At = z$
|
|
4800
|
-
type: z$
|
|
4801
|
-
importance: z$
|
|
4802
|
-
id: z$
|
|
4803
|
-
label: z$
|
|
4804
|
-
}), xt = z$
|
|
4805
|
-
function
|
|
4806
|
-
const r = /* @__PURE__ */ new Map(), i = n2.forceTraceElements !== void 0 && n2.forceTraceElements.length > 0 ? new Set(n2.forceTraceElements) : void 0, s2 = /* @__PURE__ */ new Map(), o = t.map((
|
|
4807
|
-
var S,
|
|
4808
|
-
const
|
|
4809
|
-
let
|
|
4810
|
-
"spec" in
|
|
4811
|
-
const
|
|
4812
|
-
...
|
|
4813
|
-
...
|
|
4814
|
-
...
|
|
4801
|
+
return s2 && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2, c2]) => o(u2, c2));
|
|
4802
|
+
}
|
|
4803
|
+
}
|
|
4804
|
+
const Ve = "staging", je = "main";
|
|
4805
|
+
const bt = "pl7.app/label", wt = "pl7.app/trace", At = z$1.object({
|
|
4806
|
+
type: z$1.string(),
|
|
4807
|
+
importance: z$1.number().optional(),
|
|
4808
|
+
id: z$1.string().optional(),
|
|
4809
|
+
label: z$1.string()
|
|
4810
|
+
}), xt = z$1.array(At), Ct = 1e-3, Pt = "__LABEL__", Te = "__LABEL__@1";
|
|
4811
|
+
function $e(t, e, n2 = {}) {
|
|
4812
|
+
const r = /* @__PURE__ */ new Map(), i = n2.forceTraceElements !== void 0 && n2.forceTraceElements.length > 0 ? new Set(n2.forceTraceElements) : void 0, s2 = /* @__PURE__ */ new Map(), o = t.map((p2) => {
|
|
4813
|
+
var S, F;
|
|
4814
|
+
const m2 = e(p2);
|
|
4815
|
+
let f2, v, b;
|
|
4816
|
+
"spec" in m2 && typeof m2.spec == "object" ? (f2 = m2.spec, v = m2.prefixTrace, b = m2.suffixTrace) : f2 = m2;
|
|
4817
|
+
const g = (S = f2.annotations) == null ? void 0 : S[bt], x = (F = f2.annotations) == null ? void 0 : F[wt], A = (x ? xt.safeParse(JSON.parse(x)).data : void 0) ?? [], C = [
|
|
4818
|
+
...v ?? [],
|
|
4819
|
+
...A,
|
|
4820
|
+
...b ?? []
|
|
4815
4821
|
];
|
|
4816
|
-
if (
|
|
4817
|
-
const
|
|
4818
|
-
n2.addLabelAsSuffix ?
|
|
4819
|
-
}
|
|
4820
|
-
const
|
|
4821
|
-
for (let
|
|
4822
|
-
const { type: W } =
|
|
4823
|
-
|
|
4824
|
-
const
|
|
4825
|
-
s2.set(
|
|
4826
|
-
|
|
4822
|
+
if (g !== void 0) {
|
|
4823
|
+
const D = { label: g, type: Pt, importance: -2 };
|
|
4824
|
+
n2.addLabelAsSuffix ? C.push(D) : C.splice(0, 0, D);
|
|
4825
|
+
}
|
|
4826
|
+
const w2 = [], T = /* @__PURE__ */ new Map();
|
|
4827
|
+
for (let D = C.length - 1; D >= 0; --D) {
|
|
4828
|
+
const { type: W } = C[D], j2 = C[D].importance ?? 0, $ = (T.get(W) ?? 0) + 1;
|
|
4829
|
+
T.set(W, $);
|
|
4830
|
+
const K2 = `${W}@${$}`;
|
|
4831
|
+
s2.set(K2, (s2.get(K2) ?? 0) + 1), r.set(
|
|
4832
|
+
K2,
|
|
4827
4833
|
Math.max(
|
|
4828
|
-
r.get(
|
|
4829
|
-
|
|
4834
|
+
r.get(K2) ?? Number.NEGATIVE_INFINITY,
|
|
4835
|
+
j2 - (C.length - D) * Ct
|
|
4830
4836
|
)
|
|
4831
|
-
),
|
|
4837
|
+
), w2.push({ ...C[D], fullType: K2, occurrenceIndex: $ });
|
|
4832
4838
|
}
|
|
4833
|
-
return
|
|
4834
|
-
value:
|
|
4835
|
-
spec:
|
|
4836
|
-
label:
|
|
4837
|
-
fullTrace:
|
|
4839
|
+
return w2.reverse(), {
|
|
4840
|
+
value: p2,
|
|
4841
|
+
spec: f2,
|
|
4842
|
+
label: g,
|
|
4843
|
+
fullTrace: w2
|
|
4838
4844
|
};
|
|
4839
4845
|
}), a = [], l2 = [], u2 = [...r];
|
|
4840
|
-
u2.sort(([,
|
|
4841
|
-
for (const [
|
|
4842
|
-
|
|
4843
|
-
const
|
|
4844
|
-
const
|
|
4845
|
-
for (let
|
|
4846
|
-
const
|
|
4847
|
-
if (
|
|
4848
|
-
if (
|
|
4849
|
-
|
|
4846
|
+
u2.sort(([, p2], [, m2]) => m2 - p2);
|
|
4847
|
+
for (const [p2] of u2)
|
|
4848
|
+
p2.endsWith("@1") || s2.get(p2) === t.length ? a.push(p2) : l2.push(p2);
|
|
4849
|
+
const c2 = (p2, m2 = false) => {
|
|
4850
|
+
const f2 = [];
|
|
4851
|
+
for (let v = 0; v < o.length; v++) {
|
|
4852
|
+
const b = o[v], g = b.fullTrace.filter((C) => p2.has(C.fullType) || i && i.has(C.type));
|
|
4853
|
+
if (g.length === 0)
|
|
4854
|
+
if (m2)
|
|
4855
|
+
f2.push({
|
|
4850
4856
|
label: "Unlabeled",
|
|
4851
|
-
value:
|
|
4857
|
+
value: b.value
|
|
4852
4858
|
});
|
|
4853
4859
|
else return;
|
|
4854
|
-
const
|
|
4855
|
-
|
|
4856
|
-
label:
|
|
4857
|
-
value:
|
|
4860
|
+
const x = g.map((C) => C.label), A = n2.separator ?? " / ";
|
|
4861
|
+
f2.push({
|
|
4862
|
+
label: x.join(A),
|
|
4863
|
+
value: b.value
|
|
4858
4864
|
});
|
|
4859
4865
|
}
|
|
4860
|
-
return
|
|
4866
|
+
return f2;
|
|
4861
4867
|
};
|
|
4862
4868
|
if (a.length === 0) {
|
|
4863
4869
|
if (l2.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
|
|
4864
|
-
return
|
|
4865
|
-
}
|
|
4866
|
-
let
|
|
4867
|
-
for (;
|
|
4868
|
-
const
|
|
4869
|
-
n2.includeNativeLabel &&
|
|
4870
|
-
for (let
|
|
4871
|
-
|
|
4872
|
-
const
|
|
4873
|
-
if (
|
|
4874
|
-
|
|
4875
|
-
}
|
|
4876
|
-
return
|
|
4877
|
-
}
|
|
4878
|
-
const Z = "PColumnData/", se = Z + "ResourceMap", oe = Z + "Partitioned/ResourceMap", q = Z + "JsonPartitioned", B = Z + "BinaryPartitioned",
|
|
4879
|
-
const
|
|
4870
|
+
return c2(new Set(Te), true);
|
|
4871
|
+
}
|
|
4872
|
+
let d = 0, h2 = -1;
|
|
4873
|
+
for (; d < a.length; ) {
|
|
4874
|
+
const p2 = /* @__PURE__ */ new Set();
|
|
4875
|
+
n2.includeNativeLabel && p2.add(Te);
|
|
4876
|
+
for (let f2 = 0; f2 < d; ++f2) p2.add(a[f2]);
|
|
4877
|
+
h2 >= 0 && p2.add(a[h2]);
|
|
4878
|
+
const m2 = c2(p2);
|
|
4879
|
+
if (m2 !== void 0 && new Set(m2.map((f2) => f2.label)).size === t.length) return m2;
|
|
4880
|
+
h2++, h2 >= a.length && (d++, h2 = d);
|
|
4881
|
+
}
|
|
4882
|
+
return c2(/* @__PURE__ */ new Set([...a, ...l2]), true);
|
|
4883
|
+
}
|
|
4884
|
+
const Z = "PColumnData/", se = Z + "ResourceMap", oe = Z + "Partitioned/ResourceMap", q = Z + "JsonPartitioned", B = Z + "BinaryPartitioned", Je = Z + "Partitioned/", ae = Je + "JsonPartitioned", z = Je + "BinaryPartitioned";
|
|
4885
|
+
const ye = (t) => {
|
|
4880
4886
|
if (t.endsWith(".index"))
|
|
4881
4887
|
return { baseKey: t.substring(0, t.length - 6), type: "index" };
|
|
4882
4888
|
if (t.endsWith(".values"))
|
|
@@ -4908,7 +4914,7 @@
|
|
|
4908
4914
|
case q:
|
|
4909
4915
|
case B:
|
|
4910
4916
|
for (let s2 of t.listInputFields()) {
|
|
4911
|
-
e === B && (s2 =
|
|
4917
|
+
e === B && (s2 = ye(s2).baseKey);
|
|
4912
4918
|
const o = [...JSON.parse(s2)];
|
|
4913
4919
|
r.push(o);
|
|
4914
4920
|
}
|
|
@@ -4920,7 +4926,7 @@
|
|
|
4920
4926
|
const o = [...JSON.parse(s2)], a = t.resolve({ field: s2, assertFieldType: "Input" });
|
|
4921
4927
|
if (a !== void 0)
|
|
4922
4928
|
for (let l2 of a.listInputFields()) {
|
|
4923
|
-
e === z && (l2 =
|
|
4929
|
+
e === z && (l2 = ye(l2).baseKey);
|
|
4924
4930
|
const u2 = [...o, ...JSON.parse(l2)];
|
|
4925
4931
|
r.push(u2);
|
|
4926
4932
|
}
|
|
@@ -4950,7 +4956,7 @@
|
|
|
4950
4956
|
}
|
|
4951
4957
|
function It(t) {
|
|
4952
4958
|
if (t === void 0) return;
|
|
4953
|
-
if (
|
|
4959
|
+
if (K(t))
|
|
4954
4960
|
return _t(t);
|
|
4955
4961
|
const e = St(t);
|
|
4956
4962
|
if (!e) return;
|
|
@@ -4965,7 +4971,7 @@
|
|
|
4965
4971
|
}
|
|
4966
4972
|
return i.map((s2) => Array.from(s2.values()));
|
|
4967
4973
|
}
|
|
4968
|
-
function
|
|
4974
|
+
function ve(t, e = []) {
|
|
4969
4975
|
if (t === void 0 || !t.getIsReadyOrError()) return;
|
|
4970
4976
|
const n2 = t.resourceType.name, r = t.getDataAsJson();
|
|
4971
4977
|
if (e.length > 0 && (n2 === ae || n2 === z))
|
|
@@ -4995,7 +5001,7 @@
|
|
|
4995
5001
|
throw new Error(`Missing partitionKeyLength in metadata for ${n2}`);
|
|
4996
5002
|
const i = [], s2 = /* @__PURE__ */ new Map();
|
|
4997
5003
|
for (const o of t.listInputFields()) {
|
|
4998
|
-
const a =
|
|
5004
|
+
const a = ye(o), l2 = t.resolve({ field: o, assertFieldType: "Input" });
|
|
4999
5005
|
if (l2 === void 0) return;
|
|
5000
5006
|
let u2 = s2.get(a.baseKey);
|
|
5001
5007
|
u2 || (u2 = {}, s2.set(a.baseKey, u2)), a.type === "index" ? u2.index = l2 : u2.values = l2;
|
|
@@ -5026,7 +5032,7 @@
|
|
|
5026
5032
|
if (a === void 0) return;
|
|
5027
5033
|
if (a.resourceType.name !== q)
|
|
5028
5034
|
throw new Error(`Expected ${q} inside ${n2}, but got ${a.resourceType.name}`);
|
|
5029
|
-
const l2 =
|
|
5035
|
+
const l2 = ve(a, JSON.parse(o));
|
|
5030
5036
|
if (l2 === void 0) return;
|
|
5031
5037
|
if (l2.type !== "JsonPartitioned")
|
|
5032
5038
|
throw new Error(`Unexpected inner result type for ${n2}: ${l2.type}`);
|
|
@@ -5047,7 +5053,7 @@
|
|
|
5047
5053
|
if (a === void 0) return;
|
|
5048
5054
|
if (a.resourceType.name !== B)
|
|
5049
5055
|
throw new Error(`Expected ${B} inside ${n2}, but got ${a.resourceType.name}`);
|
|
5050
|
-
const l2 =
|
|
5056
|
+
const l2 = ve(a, JSON.parse(o));
|
|
5051
5057
|
if (l2 === void 0) return;
|
|
5052
5058
|
if (l2.type !== "BinaryPartitioned")
|
|
5053
5059
|
throw new Error(`Unexpected inner result type for ${n2}: ${l2.type}`);
|
|
@@ -5065,9 +5071,9 @@
|
|
|
5065
5071
|
}
|
|
5066
5072
|
function Tt(t) {
|
|
5067
5073
|
if (t !== void 0) {
|
|
5068
|
-
if (
|
|
5069
|
-
if (
|
|
5070
|
-
if (t instanceof
|
|
5074
|
+
if (K(t)) return t;
|
|
5075
|
+
if (En(t)) return Cn(t);
|
|
5076
|
+
if (t instanceof E) return ve(t);
|
|
5071
5077
|
throw new Error(`Unexpected input type: ${typeof t}`);
|
|
5072
5078
|
}
|
|
5073
5079
|
}
|
|
@@ -5131,39 +5137,45 @@
|
|
|
5131
5137
|
}
|
|
5132
5138
|
}
|
|
5133
5139
|
}
|
|
5134
|
-
|
|
5140
|
+
function Et(t) {
|
|
5141
|
+
if (!Array.isArray(t)) return false;
|
|
5142
|
+
if (t.length === 0) return true;
|
|
5143
|
+
const e = t[0];
|
|
5144
|
+
return typeof e == "object" && e !== null && "key" in e && "val" in e;
|
|
5145
|
+
}
|
|
5146
|
+
class Dt {
|
|
5135
5147
|
constructor(e) {
|
|
5136
5148
|
this.columns = e;
|
|
5137
5149
|
}
|
|
5138
5150
|
selectColumns(e) {
|
|
5139
|
-
const n2 = typeof e == "function" ? e :
|
|
5151
|
+
const n2 = typeof e == "function" ? e : Gn(e);
|
|
5140
5152
|
return this.columns.filter((r) => n2(r.spec));
|
|
5141
5153
|
}
|
|
5142
5154
|
}
|
|
5143
|
-
function
|
|
5155
|
+
function kt(t) {
|
|
5144
5156
|
if (t)
|
|
5145
5157
|
return t.map((e) => ({
|
|
5146
|
-
type: `split:${
|
|
5158
|
+
type: `split:${Rn(e.axisId)}`,
|
|
5147
5159
|
label: e.label,
|
|
5148
5160
|
importance: 1e6
|
|
5149
5161
|
// High importance for split filters in labels
|
|
5150
5162
|
}));
|
|
5151
5163
|
}
|
|
5152
|
-
function
|
|
5164
|
+
function Ot(t) {
|
|
5153
5165
|
if (t)
|
|
5154
5166
|
return t.map((e) => [e.axisIdx, e.value]);
|
|
5155
5167
|
}
|
|
5156
5168
|
function Rt(t, e) {
|
|
5157
5169
|
if (!e || e.length === 0) return t;
|
|
5158
5170
|
const n2 = [...e].sort((r, i) => r[0] - i[0]);
|
|
5159
|
-
return
|
|
5171
|
+
return Re({ id: t, axisFilters: n2 });
|
|
5160
5172
|
}
|
|
5161
|
-
function
|
|
5173
|
+
function Le(t) {
|
|
5162
5174
|
if (!t || typeof t != "object") return false;
|
|
5163
5175
|
const e = t, n2 = 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);
|
|
5164
5176
|
return !!e.domainAnchor || n2 || r;
|
|
5165
5177
|
}
|
|
5166
|
-
function
|
|
5178
|
+
function Ft(t) {
|
|
5167
5179
|
if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
|
|
5168
5180
|
return [];
|
|
5169
5181
|
const e = t.axes.map((n2, r) => typeof n2 == "object" && "split" in n2 && n2.split === true ? r : -1).filter((n2) => n2 !== -1);
|
|
@@ -5171,11 +5183,11 @@
|
|
|
5171
5183
|
throw new Error("Axis splitting is not supported when `partialAxesMatch` is defined.");
|
|
5172
5184
|
return e.sort((n2, r) => n2 - r), e;
|
|
5173
5185
|
}
|
|
5174
|
-
class
|
|
5186
|
+
class le {
|
|
5175
5187
|
constructor() {
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5188
|
+
k(this, "defaultProviderStore", []);
|
|
5189
|
+
k(this, "providers", [new Dt(this.defaultProviderStore)]);
|
|
5190
|
+
k(this, "axisLabelProviders", []);
|
|
5179
5191
|
}
|
|
5180
5192
|
addColumnProvider(e) {
|
|
5181
5193
|
return this.providers.push(e), this;
|
|
@@ -5203,127 +5215,129 @@
|
|
|
5203
5215
|
};
|
|
5204
5216
|
let u2 = () => false;
|
|
5205
5217
|
if (a) {
|
|
5206
|
-
const
|
|
5207
|
-
if (
|
|
5218
|
+
const f2 = (Array.isArray(a) ? a : [a]).map((v) => {
|
|
5219
|
+
if (Le(v)) {
|
|
5208
5220
|
if (!r)
|
|
5209
5221
|
throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
|
|
5210
|
-
return
|
|
5222
|
+
return Gn(Mn(r.anchors, v, n2));
|
|
5211
5223
|
} else
|
|
5212
|
-
return
|
|
5224
|
+
return Gn(v);
|
|
5213
5225
|
});
|
|
5214
|
-
u2 = (
|
|
5226
|
+
u2 = (v) => f2.some((b) => b(v));
|
|
5215
5227
|
}
|
|
5216
|
-
const
|
|
5217
|
-
for (const
|
|
5218
|
-
const
|
|
5219
|
-
let
|
|
5220
|
-
if (
|
|
5228
|
+
const c2 = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], d = [], h2 = /* @__PURE__ */ new Set();
|
|
5229
|
+
for (const f$1 of c2) {
|
|
5230
|
+
const v = Le(f$1);
|
|
5231
|
+
let b;
|
|
5232
|
+
if (v) {
|
|
5221
5233
|
if (!r)
|
|
5222
5234
|
throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
|
|
5223
|
-
|
|
5235
|
+
b = Mn(r.anchors, f$1, n2);
|
|
5224
5236
|
} else
|
|
5225
|
-
|
|
5226
|
-
const
|
|
5227
|
-
for (const
|
|
5228
|
-
const
|
|
5229
|
-
for (const S of
|
|
5237
|
+
b = f$1;
|
|
5238
|
+
const g = /* @__PURE__ */ new Set(), x = [];
|
|
5239
|
+
for (const w2 of this.providers) {
|
|
5240
|
+
const T = w2.selectColumns(b);
|
|
5241
|
+
for (const S of T) {
|
|
5230
5242
|
if (u2(S.spec)) continue;
|
|
5231
|
-
if (
|
|
5232
|
-
throw new Error(`Duplicate column id ${S.id} in provider ${
|
|
5233
|
-
const
|
|
5234
|
-
|
|
5243
|
+
if (g.has(S.id))
|
|
5244
|
+
throw new Error(`Duplicate column id ${S.id} in provider ${w2.constructor.name}`);
|
|
5245
|
+
const F = Qn(S.spec);
|
|
5246
|
+
h2.has(F) || (g.add(S.id), h2.add(F), x.push(S));
|
|
5235
5247
|
}
|
|
5236
5248
|
}
|
|
5237
|
-
if (
|
|
5238
|
-
const
|
|
5239
|
-
for (const
|
|
5240
|
-
if (!f(
|
|
5241
|
-
const
|
|
5242
|
-
if (
|
|
5243
|
-
|
|
5249
|
+
if (x.length === 0) continue;
|
|
5250
|
+
const A = Ft(f$1), C = A.length > 0;
|
|
5251
|
+
for (const w2 of x) {
|
|
5252
|
+
if (!f(w2.spec)) continue;
|
|
5253
|
+
const T = w2.spec;
|
|
5254
|
+
if (C) {
|
|
5255
|
+
if (Et(w2.data))
|
|
5256
|
+
throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${w2.id}`);
|
|
5257
|
+
const S = Tt(w2.data);
|
|
5244
5258
|
if (!S) {
|
|
5245
5259
|
if (s2) continue;
|
|
5246
5260
|
return;
|
|
5247
5261
|
}
|
|
5248
|
-
if (!
|
|
5249
|
-
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${S.type} for column ${
|
|
5250
|
-
const
|
|
5251
|
-
if (
|
|
5252
|
-
throw new Error(`Not enough partition keys (${S.partitionKeyLength}) for requested split axes (max index ${
|
|
5253
|
-
const W =
|
|
5254
|
-
if (
|
|
5255
|
-
if (
|
|
5262
|
+
if (!Sn(S))
|
|
5263
|
+
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${S.type} for column ${w2.id}`);
|
|
5264
|
+
const F = It(S), D = A[A.length - 1];
|
|
5265
|
+
if (D >= S.partitionKeyLength)
|
|
5266
|
+
throw new Error(`Not enough partition keys (${S.partitionKeyLength}) for requested split axes (max index ${D}) in column ${T.name}`);
|
|
5267
|
+
const W = A.map((_) => this.findLabels(p$1(T.axesSpec[_]))), j2 = [], $ = (_, G) => {
|
|
5268
|
+
if (G >= A.length) {
|
|
5269
|
+
if (j2.push([..._]), j2.length > 1e4)
|
|
5256
5270
|
throw new Error("Too many key combinations, aborting.");
|
|
5257
5271
|
return;
|
|
5258
5272
|
}
|
|
5259
|
-
const
|
|
5260
|
-
if (
|
|
5261
|
-
throw new Error(`Axis index ${
|
|
5262
|
-
const
|
|
5263
|
-
if (!
|
|
5264
|
-
|
|
5273
|
+
const N2 = A[G];
|
|
5274
|
+
if (N2 >= F.length)
|
|
5275
|
+
throw new Error(`Axis index ${N2} out of bounds for unique keys array (length ${F.length}) during split key generation for column ${w2.id}`);
|
|
5276
|
+
const J2 = F[N2];
|
|
5277
|
+
if (!J2 || J2.length === 0) {
|
|
5278
|
+
j2.length = 0;
|
|
5265
5279
|
return;
|
|
5266
5280
|
}
|
|
5267
|
-
for (const ee of
|
|
5268
|
-
_.push(ee),
|
|
5281
|
+
for (const ee of J2)
|
|
5282
|
+
_.push(ee), $(_, G + 1), _.pop();
|
|
5269
5283
|
};
|
|
5270
|
-
if (
|
|
5284
|
+
if ($([], 0), j2.length === 0)
|
|
5271
5285
|
continue;
|
|
5272
|
-
const
|
|
5273
|
-
for (let _ =
|
|
5274
|
-
|
|
5275
|
-
const
|
|
5276
|
-
for (const _ of
|
|
5277
|
-
const
|
|
5278
|
-
const ee =
|
|
5279
|
-
return { axisIdx: ee, axisId:
|
|
5286
|
+
const K2 = [...T.axesSpec], Ge = A.map((_) => _);
|
|
5287
|
+
for (let _ = A.length - 1; _ >= 0; _--)
|
|
5288
|
+
K2.splice(A[_], 1);
|
|
5289
|
+
const He = { ...T, axesSpec: K2 };
|
|
5290
|
+
for (const _ of j2) {
|
|
5291
|
+
const G = _.map((N2, J2) => {
|
|
5292
|
+
const ee = Ge[J2], qe = p$1(T.axesSpec[ee]), ce = W[J2], ze = (ce == null ? void 0 : ce[N2]) ?? String(N2);
|
|
5293
|
+
return { axisIdx: ee, axisId: qe, value: N2, label: ze };
|
|
5280
5294
|
});
|
|
5281
|
-
|
|
5295
|
+
d.push({
|
|
5282
5296
|
type: "split",
|
|
5283
|
-
originalColumn:
|
|
5284
|
-
spec:
|
|
5285
|
-
adjustedSpec:
|
|
5297
|
+
originalColumn: w2,
|
|
5298
|
+
spec: T,
|
|
5299
|
+
adjustedSpec: He,
|
|
5286
5300
|
dataEntries: S,
|
|
5287
|
-
axisFilters:
|
|
5301
|
+
axisFilters: G
|
|
5288
5302
|
});
|
|
5289
5303
|
}
|
|
5290
5304
|
} else
|
|
5291
|
-
|
|
5305
|
+
d.push({
|
|
5292
5306
|
type: "direct",
|
|
5293
|
-
originalColumn:
|
|
5294
|
-
spec:
|
|
5295
|
-
adjustedSpec:
|
|
5307
|
+
originalColumn: w2,
|
|
5308
|
+
spec: T,
|
|
5309
|
+
adjustedSpec: T
|
|
5296
5310
|
});
|
|
5297
5311
|
}
|
|
5298
5312
|
}
|
|
5299
|
-
if (
|
|
5300
|
-
const
|
|
5301
|
-
|
|
5302
|
-
(
|
|
5303
|
-
spec:
|
|
5304
|
-
suffixTrace:
|
|
5313
|
+
if (d.length === 0) return [];
|
|
5314
|
+
const p2 = $e(
|
|
5315
|
+
d,
|
|
5316
|
+
(f2) => ({
|
|
5317
|
+
spec: f2.spec,
|
|
5318
|
+
suffixTrace: f2.type === "split" ? kt(f2.axisFilters) : void 0
|
|
5305
5319
|
}),
|
|
5306
5320
|
l2
|
|
5307
|
-
),
|
|
5308
|
-
for (const { value:
|
|
5309
|
-
const { originalColumn:
|
|
5310
|
-
let
|
|
5311
|
-
r ?
|
|
5312
|
-
let
|
|
5313
|
-
o && (
|
|
5314
|
-
...
|
|
5321
|
+
), m2 = [];
|
|
5322
|
+
for (const { value: f2, label: v } of p2) {
|
|
5323
|
+
const { originalColumn: b, spec: g } = f2, x = f2.type === "split" ? f2.axisFilters : void 0, A = Ot(x);
|
|
5324
|
+
let C;
|
|
5325
|
+
r ? C = r.deriveS(g, A) : C = Rt(b.id, A);
|
|
5326
|
+
let w2 = { ...f2.adjustedSpec };
|
|
5327
|
+
o && (w2 = {
|
|
5328
|
+
...w2,
|
|
5315
5329
|
annotations: {
|
|
5316
|
-
...
|
|
5317
|
-
"pl7.app/label":
|
|
5330
|
+
...w2.annotations ?? {},
|
|
5331
|
+
"pl7.app/label": v
|
|
5318
5332
|
}
|
|
5319
|
-
}),
|
|
5320
|
-
id:
|
|
5321
|
-
spec:
|
|
5322
|
-
data: () =>
|
|
5323
|
-
label:
|
|
5333
|
+
}), m2.push({
|
|
5334
|
+
id: C,
|
|
5335
|
+
spec: w2,
|
|
5336
|
+
data: () => f2.type === "split" ? Jn(Lt(f2.dataEntries, A)) : f2.originalColumn.data,
|
|
5337
|
+
label: v
|
|
5324
5338
|
});
|
|
5325
5339
|
}
|
|
5326
|
-
return
|
|
5340
|
+
return m2;
|
|
5327
5341
|
}
|
|
5328
5342
|
getColumns(e, n2) {
|
|
5329
5343
|
const r = this.getUniversalEntries(e, {
|
|
@@ -5355,12 +5369,12 @@
|
|
|
5355
5369
|
if (t[n2] !== e[n2]) return false;
|
|
5356
5370
|
return true;
|
|
5357
5371
|
}
|
|
5358
|
-
function
|
|
5359
|
-
return
|
|
5372
|
+
function Ee(t) {
|
|
5373
|
+
return Wn(t, (e) => e instanceof E ? e.handle : En(e) ? Nn(e, (n2) => n2.handle) : e);
|
|
5360
5374
|
}
|
|
5361
|
-
class
|
|
5375
|
+
class Kt {
|
|
5362
5376
|
constructor() {
|
|
5363
|
-
|
|
5377
|
+
k(this, "ctx", y());
|
|
5364
5378
|
}
|
|
5365
5379
|
/**
|
|
5366
5380
|
* @deprecated use getOptions()
|
|
@@ -5369,28 +5383,28 @@
|
|
|
5369
5383
|
return this.ctx.calculateOptions(e);
|
|
5370
5384
|
}
|
|
5371
5385
|
getOptions(e, n2) {
|
|
5372
|
-
const r = typeof e == "function" ? e :
|
|
5386
|
+
const r = typeof e == "function" ? e : Gn(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
|
|
5373
5387
|
let s2 = {}, o = false;
|
|
5374
|
-
return typeof n2 < "u" && (typeof n2 == "function" ? s2 = n2 : typeof n2 == "object" && ("includeNativeLabel" in n2 || "separator" in n2 || "addLabelAsSuffix" in n2 ? s2 = n2 : (n2 = n2, s2 = n2.label ?? {}, o = n2.refsWithEnrichments ?? false))), typeof s2 == "object" ?
|
|
5375
|
-
ref:
|
|
5388
|
+
return typeof n2 < "u" && (typeof n2 == "function" ? s2 = n2 : typeof n2 == "object" && ("includeNativeLabel" in n2 || "separator" in n2 || "addLabelAsSuffix" in n2 ? s2 = n2 : (n2 = n2, s2 = n2.label ?? {}, o = n2.refsWithEnrichments ?? false))), typeof s2 == "object" ? $e(i, (a) => a.obj, s2 ?? {}).map(({ value: { ref: a }, label: l2 }) => ({
|
|
5389
|
+
ref: te$1(a, o),
|
|
5376
5390
|
label: l2
|
|
5377
5391
|
})) : i.map(({ ref: a, obj: l2 }) => ({
|
|
5378
|
-
ref:
|
|
5392
|
+
ref: te$1(a, o),
|
|
5379
5393
|
label: s2(l2, a)
|
|
5380
5394
|
}));
|
|
5381
5395
|
}
|
|
5382
5396
|
resolveAnchorCtx(e) {
|
|
5383
|
-
if (e instanceof
|
|
5397
|
+
if (e instanceof _n) return e;
|
|
5384
5398
|
const n2 = {};
|
|
5385
5399
|
for (const [r, i] of Object.entries(e))
|
|
5386
|
-
if (
|
|
5400
|
+
if (ne(i)) {
|
|
5387
5401
|
const s2 = this.getPColumnSpecByRef(i);
|
|
5388
5402
|
if (!s2)
|
|
5389
5403
|
return;
|
|
5390
5404
|
n2[r] = s2;
|
|
5391
5405
|
} else
|
|
5392
5406
|
n2[r] = i;
|
|
5393
|
-
return new
|
|
5407
|
+
return new _n(n2);
|
|
5394
5408
|
}
|
|
5395
5409
|
/**
|
|
5396
5410
|
* Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
|
|
@@ -5403,7 +5417,7 @@
|
|
|
5403
5417
|
getAnchoredPColumns(e, n2, r) {
|
|
5404
5418
|
const i = this.resolveAnchorCtx(e);
|
|
5405
5419
|
if (i)
|
|
5406
|
-
return new
|
|
5420
|
+
return new le().addColumnProvider(this).addAxisLabelProvider(this).getColumns(n2, {
|
|
5407
5421
|
...r,
|
|
5408
5422
|
anchorCtx: i
|
|
5409
5423
|
});
|
|
@@ -5440,7 +5454,7 @@
|
|
|
5440
5454
|
getCanonicalOptions(e, n2, r) {
|
|
5441
5455
|
const i = this.resolveAnchorCtx(e);
|
|
5442
5456
|
if (!i) return;
|
|
5443
|
-
const s2 = new
|
|
5457
|
+
const s2 = new le().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(n2, {
|
|
5444
5458
|
...r,
|
|
5445
5459
|
anchorCtx: i
|
|
5446
5460
|
});
|
|
@@ -5464,7 +5478,7 @@
|
|
|
5464
5478
|
ref: n2.ref,
|
|
5465
5479
|
obj: {
|
|
5466
5480
|
...n2.obj,
|
|
5467
|
-
data: new
|
|
5481
|
+
data: new E(n2.obj.data, [n2.ref.blockId, n2.ref.name])
|
|
5468
5482
|
}
|
|
5469
5483
|
}))
|
|
5470
5484
|
};
|
|
@@ -5483,9 +5497,9 @@
|
|
|
5483
5497
|
ref: n2.ref,
|
|
5484
5498
|
obj: {
|
|
5485
5499
|
...n2.obj,
|
|
5486
|
-
data:
|
|
5500
|
+
data: oe$1(
|
|
5487
5501
|
n2.obj.data,
|
|
5488
|
-
(r) => new
|
|
5502
|
+
(r) => new E(r, [n2.ref.blockId, n2.ref.name])
|
|
5489
5503
|
)
|
|
5490
5504
|
}
|
|
5491
5505
|
}))
|
|
@@ -5512,9 +5526,9 @@
|
|
|
5512
5526
|
)) == null ? void 0 : r.obj;
|
|
5513
5527
|
const n2 = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
|
|
5514
5528
|
if (n2)
|
|
5515
|
-
return
|
|
5529
|
+
return Wn(
|
|
5516
5530
|
n2,
|
|
5517
|
-
(i) => new
|
|
5531
|
+
(i) => new E(i, [e.blockId, e.name])
|
|
5518
5532
|
);
|
|
5519
5533
|
}
|
|
5520
5534
|
/**
|
|
@@ -5525,7 +5539,7 @@
|
|
|
5525
5539
|
getPColumnByRef(e) {
|
|
5526
5540
|
const n2 = this.getDataByRef(e);
|
|
5527
5541
|
if (n2)
|
|
5528
|
-
return
|
|
5542
|
+
return qn(n2);
|
|
5529
5543
|
}
|
|
5530
5544
|
/**
|
|
5531
5545
|
* Returns spec associated with the ref ensuring that it is a p-column spec.
|
|
@@ -5575,7 +5589,7 @@
|
|
|
5575
5589
|
findLabels(e) {
|
|
5576
5590
|
const n2 = this.getData();
|
|
5577
5591
|
for (const r of n2.entries) {
|
|
5578
|
-
if (!
|
|
5592
|
+
if (!rn(r.obj)) continue;
|
|
5579
5593
|
const i = r.obj.spec;
|
|
5580
5594
|
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && pe(e.domain, i.axesSpec[0].domain)) {
|
|
5581
5595
|
if (r.obj.data.resourceType.name !== "PColumnData/Json")
|
|
@@ -5596,13 +5610,13 @@
|
|
|
5596
5610
|
* @returns An array of PColumn objects matching the selectors. Data is loaded on first access.
|
|
5597
5611
|
*/
|
|
5598
5612
|
selectColumns(e) {
|
|
5599
|
-
const n2 = typeof e == "function" ? e :
|
|
5613
|
+
const n2 = typeof e == "function" ? e : Gn(e);
|
|
5600
5614
|
return this.getSpecs().entries.filter(({ obj: i }) => f(i) ? n2(i) : false).map(({ ref: i, obj: s2 }) => {
|
|
5601
5615
|
const o = s2;
|
|
5602
5616
|
let a = null;
|
|
5603
5617
|
const l2 = this;
|
|
5604
5618
|
return {
|
|
5605
|
-
id:
|
|
5619
|
+
id: Re(i),
|
|
5606
5620
|
spec: o,
|
|
5607
5621
|
get data() {
|
|
5608
5622
|
var u2;
|
|
@@ -5629,12 +5643,12 @@
|
|
|
5629
5643
|
}
|
|
5630
5644
|
class te {
|
|
5631
5645
|
constructor() {
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
this.ctx =
|
|
5646
|
+
k(this, "ctx");
|
|
5647
|
+
k(this, "args");
|
|
5648
|
+
k(this, "uiState");
|
|
5649
|
+
k(this, "_activeArgsCache");
|
|
5650
|
+
k(this, "resultPool", new Kt());
|
|
5651
|
+
this.ctx = y(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
|
|
5638
5652
|
}
|
|
5639
5653
|
/**
|
|
5640
5654
|
* Returns args snapshot the block was executed for (i.e. when "Run" button was pressed).
|
|
@@ -5650,16 +5664,16 @@
|
|
|
5650
5664
|
// return this.ctx.featureFlags;
|
|
5651
5665
|
// }
|
|
5652
5666
|
getNamedAccessor(e) {
|
|
5653
|
-
return
|
|
5667
|
+
return ge(
|
|
5654
5668
|
this.ctx.getAccessorHandleByName(e),
|
|
5655
|
-
(n2) => new
|
|
5669
|
+
(n2) => new E(n2, [e])
|
|
5656
5670
|
);
|
|
5657
5671
|
}
|
|
5658
5672
|
get prerun() {
|
|
5659
|
-
return this.getNamedAccessor(
|
|
5673
|
+
return this.getNamedAccessor(Ve);
|
|
5660
5674
|
}
|
|
5661
5675
|
get outputs() {
|
|
5662
|
-
return this.getNamedAccessor(
|
|
5676
|
+
return this.getNamedAccessor(je);
|
|
5663
5677
|
}
|
|
5664
5678
|
/**
|
|
5665
5679
|
* Find labels data for a given axis id. It will search for a label column and return its data as a map.
|
|
@@ -5671,13 +5685,13 @@
|
|
|
5671
5685
|
}
|
|
5672
5686
|
verifyInlineAndExplicitColumnsSupport(e) {
|
|
5673
5687
|
var i;
|
|
5674
|
-
const n2 = e.some((s2) => !(s2.data instanceof
|
|
5688
|
+
const n2 = e.some((s2) => !(s2.data instanceof E) || En(s2.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
|
|
5675
5689
|
if (n2 && !r) throw Error("Inline or explicit columns not supported");
|
|
5676
5690
|
}
|
|
5677
5691
|
// TODO remove all non-PColumn fields
|
|
5678
5692
|
createPFrame(e) {
|
|
5679
5693
|
return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
|
|
5680
|
-
e.map((n2) =>
|
|
5694
|
+
e.map((n2) => Ee(n2))
|
|
5681
5695
|
);
|
|
5682
5696
|
}
|
|
5683
5697
|
createPTable(e) {
|
|
@@ -5689,8 +5703,8 @@
|
|
|
5689
5703
|
},
|
|
5690
5704
|
filters: e.filters ?? [],
|
|
5691
5705
|
sorting: e.sorting ?? []
|
|
5692
|
-
} : n2 = e, this.verifyInlineAndExplicitColumnsSupport(
|
|
5693
|
-
|
|
5706
|
+
} : n2 = e, this.verifyInlineAndExplicitColumnsSupport(Xn(n2.src)), this.ctx.createPTable(
|
|
5707
|
+
Un(n2, (r) => Ee(r))
|
|
5694
5708
|
);
|
|
5695
5709
|
}
|
|
5696
5710
|
/** @deprecated scheduled for removal from SDK */
|
|
@@ -5710,20 +5724,20 @@
|
|
|
5710
5724
|
this.ctx.logError(e);
|
|
5711
5725
|
}
|
|
5712
5726
|
}
|
|
5713
|
-
const Y = "1.
|
|
5714
|
-
function
|
|
5727
|
+
const Y = "1.37.2";
|
|
5728
|
+
function Vt(t) {
|
|
5715
5729
|
return t.__renderLambda === true;
|
|
5716
5730
|
}
|
|
5717
|
-
function
|
|
5731
|
+
function fe(t) {
|
|
5718
5732
|
if (t !== void 0)
|
|
5719
|
-
return
|
|
5733
|
+
return Vt(t) ? t.handle : t;
|
|
5720
5734
|
}
|
|
5721
|
-
class
|
|
5735
|
+
class L {
|
|
5722
5736
|
constructor(e, n2, r, i, s2, o, a, l2) {
|
|
5723
5737
|
this._renderingMode = e, this._initialArgs = n2, this._initialUiState = r, this._outputs = i, this._inputsValid = s2, this._sections = o, this._title = a, this._enrichmentTargets = l2;
|
|
5724
5738
|
}
|
|
5725
5739
|
static create(e = "Heavy") {
|
|
5726
|
-
return new
|
|
5740
|
+
return new L(
|
|
5727
5741
|
e,
|
|
5728
5742
|
void 0,
|
|
5729
5743
|
{},
|
|
@@ -5737,7 +5751,7 @@
|
|
|
5737
5751
|
output(e, n2, r = {}) {
|
|
5738
5752
|
if (typeof n2 == "function") {
|
|
5739
5753
|
const i = `output#${e}`;
|
|
5740
|
-
return H(i, () => n2(new te())), new
|
|
5754
|
+
return H(i, () => n2(new te())), new L(
|
|
5741
5755
|
this._renderingMode,
|
|
5742
5756
|
this._initialArgs,
|
|
5743
5757
|
this._initialUiState,
|
|
@@ -5755,7 +5769,7 @@
|
|
|
5755
5769
|
this._enrichmentTargets
|
|
5756
5770
|
);
|
|
5757
5771
|
} else
|
|
5758
|
-
return new
|
|
5772
|
+
return new L(
|
|
5759
5773
|
this._renderingMode,
|
|
5760
5774
|
this._initialArgs,
|
|
5761
5775
|
this._initialUiState,
|
|
@@ -5774,7 +5788,7 @@
|
|
|
5774
5788
|
return this.output(e, n2, { retentive: true });
|
|
5775
5789
|
}
|
|
5776
5790
|
argsValid(e) {
|
|
5777
|
-
return typeof e == "function" ? (H("inputsValid", () => e(new te())), new
|
|
5791
|
+
return typeof e == "function" ? (H("inputsValid", () => e(new te())), new L(
|
|
5778
5792
|
this._renderingMode,
|
|
5779
5793
|
this._initialArgs,
|
|
5780
5794
|
this._initialUiState,
|
|
@@ -5786,7 +5800,7 @@
|
|
|
5786
5800
|
this._sections,
|
|
5787
5801
|
this._title,
|
|
5788
5802
|
this._enrichmentTargets
|
|
5789
|
-
)) : new
|
|
5803
|
+
)) : new L(
|
|
5790
5804
|
this._renderingMode,
|
|
5791
5805
|
this._initialArgs,
|
|
5792
5806
|
this._initialUiState,
|
|
@@ -5798,7 +5812,7 @@
|
|
|
5798
5812
|
);
|
|
5799
5813
|
}
|
|
5800
5814
|
sections(e) {
|
|
5801
|
-
return Array.isArray(e) ? this.sections(re(e)) : typeof e == "function" ? (H("sections", () => e(new te())), new
|
|
5815
|
+
return Array.isArray(e) ? this.sections(re(e)) : typeof e == "function" ? (H("sections", () => e(new te())), new L(
|
|
5802
5816
|
this._renderingMode,
|
|
5803
5817
|
this._initialArgs,
|
|
5804
5818
|
this._initialUiState,
|
|
@@ -5807,7 +5821,7 @@
|
|
|
5807
5821
|
{ __renderLambda: true, handle: "sections" },
|
|
5808
5822
|
this._title,
|
|
5809
5823
|
this._enrichmentTargets
|
|
5810
|
-
)) : new
|
|
5824
|
+
)) : new L(
|
|
5811
5825
|
this._renderingMode,
|
|
5812
5826
|
this._initialArgs,
|
|
5813
5827
|
this._initialUiState,
|
|
@@ -5820,7 +5834,7 @@
|
|
|
5820
5834
|
}
|
|
5821
5835
|
/** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
|
|
5822
5836
|
title(e) {
|
|
5823
|
-
return H("title", () => e(new te())), new
|
|
5837
|
+
return H("title", () => e(new te())), new L(
|
|
5824
5838
|
this._renderingMode,
|
|
5825
5839
|
this._initialArgs,
|
|
5826
5840
|
this._initialUiState,
|
|
@@ -5836,7 +5850,7 @@
|
|
|
5836
5850
|
* @deprecated use {@link withArgs}
|
|
5837
5851
|
* */
|
|
5838
5852
|
initialArgs(e) {
|
|
5839
|
-
return new
|
|
5853
|
+
return new L(
|
|
5840
5854
|
this._renderingMode,
|
|
5841
5855
|
e,
|
|
5842
5856
|
this._initialUiState,
|
|
@@ -5849,7 +5863,7 @@
|
|
|
5849
5863
|
}
|
|
5850
5864
|
/** Sets initial args for the block, this value must be specified. */
|
|
5851
5865
|
withArgs(e) {
|
|
5852
|
-
return new
|
|
5866
|
+
return new L(
|
|
5853
5867
|
this._renderingMode,
|
|
5854
5868
|
e,
|
|
5855
5869
|
this._initialUiState,
|
|
@@ -5862,7 +5876,7 @@
|
|
|
5862
5876
|
}
|
|
5863
5877
|
/** Defines type and sets initial value for block UiState. */
|
|
5864
5878
|
withUiState(e) {
|
|
5865
|
-
return new
|
|
5879
|
+
return new L(
|
|
5866
5880
|
this._renderingMode,
|
|
5867
5881
|
this._initialArgs,
|
|
5868
5882
|
e,
|
|
@@ -5878,7 +5892,7 @@
|
|
|
5878
5892
|
* Influences dependency graph construction.
|
|
5879
5893
|
*/
|
|
5880
5894
|
enriches(e) {
|
|
5881
|
-
return H("enrichmentTargets", e), new
|
|
5895
|
+
return H("enrichmentTargets", e), new L(
|
|
5882
5896
|
this._renderingMode,
|
|
5883
5897
|
this._initialArgs,
|
|
5884
5898
|
this._initialUiState,
|
|
@@ -5910,64 +5924,78 @@
|
|
|
5910
5924
|
sdkVersion: Y,
|
|
5911
5925
|
renderingMode: this._renderingMode,
|
|
5912
5926
|
initialArgs: this._initialArgs,
|
|
5913
|
-
inputsValid:
|
|
5914
|
-
sections:
|
|
5927
|
+
inputsValid: fe(this._inputsValid),
|
|
5928
|
+
sections: fe(this._sections),
|
|
5915
5929
|
outputs: Object.fromEntries(
|
|
5916
|
-
Object.entries(this._outputs).map(([n2, r]) => [n2,
|
|
5930
|
+
Object.entries(this._outputs).map(([n2, r]) => [n2, fe(r)])
|
|
5917
5931
|
)
|
|
5918
5932
|
};
|
|
5919
|
-
return ht() ?
|
|
5933
|
+
return ht() ? Ke({ sdkVersion: Y }) : { config: e };
|
|
5920
5934
|
}
|
|
5921
5935
|
}
|
|
5922
|
-
function
|
|
5936
|
+
function Ue() {
|
|
5937
|
+
return {
|
|
5938
|
+
version: 2,
|
|
5939
|
+
stateCache: [],
|
|
5940
|
+
pTableParams: {
|
|
5941
|
+
sorting: [],
|
|
5942
|
+
filters: [],
|
|
5943
|
+
hiddenColIds: null
|
|
5944
|
+
}
|
|
5945
|
+
};
|
|
5946
|
+
}
|
|
5947
|
+
function jt(t) {
|
|
5948
|
+
return "version" in t ? t : Ue();
|
|
5949
|
+
}
|
|
5950
|
+
function be(t) {
|
|
5923
5951
|
return t.axesSpec.length === 1 && t.name === "pl7.app/label";
|
|
5924
5952
|
}
|
|
5925
|
-
function
|
|
5926
|
-
return new
|
|
5953
|
+
function Be(t) {
|
|
5954
|
+
return new le().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
|
|
5927
5955
|
name: "pl7.app/label",
|
|
5928
5956
|
axes: [{}]
|
|
5929
5957
|
// exactly one axis
|
|
5930
5958
|
}, { dontWaitAllData: true });
|
|
5931
5959
|
}
|
|
5932
|
-
function
|
|
5960
|
+
function we(t, e) {
|
|
5933
5961
|
const n2 = [], r = [];
|
|
5934
5962
|
for (const a of t)
|
|
5935
|
-
|
|
5963
|
+
be(a.spec) ? n2.push(a) : r.push(a);
|
|
5936
5964
|
const i = [];
|
|
5937
5965
|
for (const a of r)
|
|
5938
5966
|
for (const l2 of a.spec.axesSpec) {
|
|
5939
5967
|
const u2 = p$1(l2);
|
|
5940
|
-
i.some((
|
|
5968
|
+
i.some((c2) => Z$1(c2, u2)) || i.push(u2);
|
|
5941
5969
|
}
|
|
5942
5970
|
for (const a of n2) {
|
|
5943
|
-
const l2 = p$1(a.spec.axesSpec[0]), u2 = i.findIndex((
|
|
5971
|
+
const l2 = p$1(a.spec.axesSpec[0]), u2 = i.findIndex((c2) => Z$1(c2, l2));
|
|
5944
5972
|
u2 !== -1 && i.splice(u2, 1);
|
|
5945
5973
|
}
|
|
5946
5974
|
const s2 = (a, l2) => {
|
|
5947
5975
|
let u2 = a.toString();
|
|
5948
5976
|
if (l2)
|
|
5949
|
-
for (const
|
|
5950
|
-
u2 +=
|
|
5977
|
+
for (const c2 in l2)
|
|
5978
|
+
u2 += c2, u2 += l2[c2];
|
|
5951
5979
|
return u2;
|
|
5952
5980
|
}, o = [];
|
|
5953
5981
|
for (const a of e) {
|
|
5954
|
-
const l2 = a.spec.axesSpec[0], u2 = p$1(l2),
|
|
5955
|
-
if (
|
|
5956
|
-
const
|
|
5957
|
-
|
|
5958
|
-
id: s2(a.id,
|
|
5982
|
+
const l2 = a.spec.axesSpec[0], u2 = p$1(l2), c2 = i.findIndex((d) => Z$1(d, u2));
|
|
5983
|
+
if (c2 !== -1) {
|
|
5984
|
+
const d = i[c2], h2 = Object.keys(d.domain ?? {}).length, p2 = Object.keys(l2.domain ?? {}).length;
|
|
5985
|
+
h2 > p2 ? o.push({
|
|
5986
|
+
id: s2(a.id, d.domain),
|
|
5959
5987
|
spec: {
|
|
5960
5988
|
...a.spec,
|
|
5961
|
-
axesSpec: [{ ...
|
|
5989
|
+
axesSpec: [{ ...d, annotations: l2.annotations }]
|
|
5962
5990
|
},
|
|
5963
5991
|
data: a.data
|
|
5964
|
-
}) : o.push(a), i.splice(
|
|
5992
|
+
}) : o.push(a), i.splice(c2, 1);
|
|
5965
5993
|
}
|
|
5966
5994
|
}
|
|
5967
5995
|
return o;
|
|
5968
5996
|
}
|
|
5969
5997
|
function We(t) {
|
|
5970
|
-
const e = (i) => Array.isArray(i), n2 = (i) => i instanceof
|
|
5998
|
+
const e = (i) => Array.isArray(i), n2 = (i) => i instanceof E, r = (i) => typeof i == "object" && "type" in i;
|
|
5971
5999
|
return t.map((i) => i.data).every((i) => {
|
|
5972
6000
|
if (e(i))
|
|
5973
6001
|
return true;
|
|
@@ -5986,7 +6014,7 @@
|
|
|
5986
6014
|
throw Error(`unsupported column data type: ${i}`);
|
|
5987
6015
|
});
|
|
5988
6016
|
}
|
|
5989
|
-
function
|
|
6017
|
+
function Ae(t, e, n2, r, i, s2) {
|
|
5990
6018
|
let o = t;
|
|
5991
6019
|
const a = [];
|
|
5992
6020
|
return a.push(...e), {
|
|
@@ -6002,48 +6030,40 @@
|
|
|
6002
6030
|
sorting: i
|
|
6003
6031
|
};
|
|
6004
6032
|
}
|
|
6005
|
-
function
|
|
6033
|
+
function Nt(t) {
|
|
6006
6034
|
var e;
|
|
6007
6035
|
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "hidden";
|
|
6008
6036
|
}
|
|
6009
|
-
function
|
|
6037
|
+
function $t(t) {
|
|
6010
6038
|
var e;
|
|
6011
6039
|
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
|
|
6012
6040
|
}
|
|
6013
|
-
function
|
|
6014
|
-
|
|
6015
|
-
|
|
6041
|
+
function ue(t, e) {
|
|
6042
|
+
return [...new Map(t.map((n2) => [e(n2), n2])).values()];
|
|
6043
|
+
}
|
|
6044
|
+
function Kn(t, e, n2, r) {
|
|
6045
|
+
const i = jt(n2 ?? Ue()), s2 = "full", o = ue(
|
|
6046
|
+
[...[], ...i.pTableParams.filters],
|
|
6047
|
+
(g) => ue$1(g.column)
|
|
6048
|
+
), a = ue(
|
|
6049
|
+
[...[], ...i.pTableParams.sorting],
|
|
6050
|
+
(g) => ue$1(g.column)
|
|
6051
|
+
), l2 = e.filter((g) => !Nt(g.spec)), u2 = Be(t.resultPool);
|
|
6016
6052
|
if (!u2) return;
|
|
6017
|
-
const d =
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
var A2, m2;
|
|
6021
|
-
const p2 = (m2 = (A2 = r == null ? void 0 : r.gridState.columnVisibility) == null ? void 0 : A2.hiddenColIds) == null ? void 0 : m2.map(ne).filter((v) => v.type === "column").map((v) => v.id);
|
|
6022
|
-
return p2 || l2.filter((v) => qt(v.spec)).map((v) => v.id);
|
|
6053
|
+
const c2 = we(l2.map(Fn), u2), d = Ae(l2, c2, s2, o, a), h2 = t.createPTable(d), p2 = new Set((() => {
|
|
6054
|
+
const g = i.pTableParams.hiddenColIds;
|
|
6055
|
+
return g || l2.filter((x) => $t(x.spec)).map((x) => x.id);
|
|
6023
6056
|
})());
|
|
6024
|
-
|
|
6025
|
-
const
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
id: p$1(p2),
|
|
6029
|
-
spec: p2
|
|
6030
|
-
})),
|
|
6031
|
-
...[...l2, ...f2].map((p2) => ({
|
|
6032
|
-
type: "column",
|
|
6033
|
-
id: p2.id,
|
|
6034
|
-
spec: p2.spec
|
|
6035
|
-
}))
|
|
6036
|
-
];
|
|
6037
|
-
if (!We([...b, ...f2])) return;
|
|
6038
|
-
const c2 = t.createPTable(
|
|
6039
|
-
Ge(l2, f2, s2, o, a)
|
|
6040
|
-
);
|
|
6057
|
+
[...o.map((g) => g.column), ...a.map((g) => g.column)].filter((g) => g.type === "column").map((g) => p2.delete(g.id));
|
|
6058
|
+
const m2 = l2.filter((g) => !p2.has(g.id)), f2 = we(m2.map(Fn), u2);
|
|
6059
|
+
if (!We([...m2, ...f2])) return;
|
|
6060
|
+
const v = Ae(m2, f2, s2, o, a), b = t.createPTable(v);
|
|
6041
6061
|
return {
|
|
6042
|
-
|
|
6043
|
-
|
|
6062
|
+
fullTableHandle: h2,
|
|
6063
|
+
visibleTableHandle: b
|
|
6044
6064
|
};
|
|
6045
6065
|
}
|
|
6046
|
-
const model =
|
|
6066
|
+
const model = L.create().withArgs({
|
|
6047
6067
|
settings: {
|
|
6048
6068
|
coverageThreshold: 0.95,
|
|
6049
6069
|
// default value matching MMseqs2 default
|
|
@@ -6053,9 +6073,7 @@
|
|
|
6053
6073
|
selectedColumns: []
|
|
6054
6074
|
}).withUiState({
|
|
6055
6075
|
title: "Immune Assay Data",
|
|
6056
|
-
tableState:
|
|
6057
|
-
gridState: {}
|
|
6058
|
-
}
|
|
6076
|
+
tableState: Ue()
|
|
6059
6077
|
}).argsValid(
|
|
6060
6078
|
(ctx) => ctx.args.datasetRef !== void 0 && ctx.args.fileHandle !== void 0 && ctx.args.importColumns !== void 0 && ctx.args.sequenceColumnHeader !== void 0 && ctx.args.targetRef !== void 0 && ctx.uiState.fileImportError === void 0
|
|
6061
6079
|
).output(
|
|
@@ -6134,10 +6152,9 @@
|
|
|
6134
6152
|
const cols = (_d = (_c = ctx.outputs) == null ? void 0 : _c.resolve("table")) == null ? void 0 : _d.getPColumns();
|
|
6135
6153
|
if (cols === void 0)
|
|
6136
6154
|
return void 0;
|
|
6137
|
-
return
|
|
6155
|
+
return Kn(
|
|
6138
6156
|
ctx,
|
|
6139
6157
|
cols,
|
|
6140
|
-
(_) => true,
|
|
6141
6158
|
ctx.uiState.tableState
|
|
6142
6159
|
);
|
|
6143
6160
|
}).output("isRunning", (ctx) => {
|