@milaboratories/milaboratories.ui-examples.model 1.2.23 → 1.2.25
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 +13 -0
- package/dist/bundle.js +781 -685
- package/dist/bundle.js.map +1 -1
- package/dist/index.cjs +44 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +45 -44
- package/dist/index.js.map +1 -1
- package/dist/model.json +1 -1
- package/package.json +3 -3
- package/src/index.ts +62 -57
package/dist/bundle.js
CHANGED
|
@@ -391,7 +391,7 @@
|
|
|
391
391
|
overrideMap,
|
|
392
392
|
overrideMap === errorMap ? void 0 : errorMap
|
|
393
393
|
// then global default map
|
|
394
|
-
].filter((
|
|
394
|
+
].filter((x) => !!x)
|
|
395
395
|
});
|
|
396
396
|
ctx.common.issues.push(issue);
|
|
397
397
|
}
|
|
@@ -454,15 +454,15 @@
|
|
|
454
454
|
});
|
|
455
455
|
const DIRTY = (value) => ({ status: "dirty", value });
|
|
456
456
|
const OK = (value) => ({ status: "valid", value });
|
|
457
|
-
const isAborted = (
|
|
458
|
-
const isDirty = (
|
|
459
|
-
const isValid = (
|
|
460
|
-
const isAsync = (
|
|
461
|
-
function __classPrivateFieldGet(receiver, state, kind,
|
|
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;
|
|
461
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
462
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");
|
|
463
463
|
return state.get(receiver);
|
|
464
464
|
}
|
|
465
|
-
function __classPrivateFieldSet(receiver, state, value, kind,
|
|
465
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
466
466
|
if (typeof state === "function" ? receiver !== state || true : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
467
467
|
return state.set(receiver, value), value;
|
|
468
468
|
}
|
|
@@ -2787,7 +2787,7 @@
|
|
|
2787
2787
|
if (!schema)
|
|
2788
2788
|
return null;
|
|
2789
2789
|
return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));
|
|
2790
|
-
}).filter((
|
|
2790
|
+
}).filter((x) => !!x);
|
|
2791
2791
|
if (ctx.common.async) {
|
|
2792
2792
|
return Promise.all(items).then((results) => {
|
|
2793
2793
|
return ParseStatus.mergeArray(status, results);
|
|
@@ -3045,7 +3045,7 @@
|
|
|
3045
3045
|
ctx.schemaErrorMap,
|
|
3046
3046
|
getErrorMap(),
|
|
3047
3047
|
errorMap
|
|
3048
|
-
].filter((
|
|
3048
|
+
].filter((x) => !!x),
|
|
3049
3049
|
issueData: {
|
|
3050
3050
|
code: ZodIssueCode.invalid_arguments,
|
|
3051
3051
|
argumentsError: error
|
|
@@ -3061,7 +3061,7 @@
|
|
|
3061
3061
|
ctx.schemaErrorMap,
|
|
3062
3062
|
getErrorMap(),
|
|
3063
3063
|
errorMap
|
|
3064
|
-
].filter((
|
|
3064
|
+
].filter((x) => !!x),
|
|
3065
3065
|
issueData: {
|
|
3066
3066
|
code: ZodIssueCode.invalid_return_type,
|
|
3067
3067
|
returnTypeError: error
|
|
@@ -3798,7 +3798,7 @@
|
|
|
3798
3798
|
date: (arg) => ZodDate.create({ ...arg, coerce: true })
|
|
3799
3799
|
};
|
|
3800
3800
|
const NEVER = INVALID;
|
|
3801
|
-
var z$
|
|
3801
|
+
var z$2 = /* @__PURE__ */ Object.freeze({
|
|
3802
3802
|
__proto__: null,
|
|
3803
3803
|
defaultErrorMap: errorMap,
|
|
3804
3804
|
setErrorMap,
|
|
@@ -3914,8 +3914,8 @@
|
|
|
3914
3914
|
quotelessJson,
|
|
3915
3915
|
ZodError
|
|
3916
3916
|
});
|
|
3917
|
-
function getDefaultExportFromCjs(
|
|
3918
|
-
return
|
|
3917
|
+
function getDefaultExportFromCjs(x) {
|
|
3918
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
3919
3919
|
}
|
|
3920
3920
|
var canonicalize;
|
|
3921
3921
|
var hasRequiredCanonicalize;
|
|
@@ -3955,20 +3955,20 @@
|
|
|
3955
3955
|
return canonicalize;
|
|
3956
3956
|
}
|
|
3957
3957
|
var canonicalizeExports = requireCanonicalize();
|
|
3958
|
-
const
|
|
3959
|
-
var
|
|
3960
|
-
var
|
|
3961
|
-
var
|
|
3962
|
-
z$
|
|
3958
|
+
const We = /* @__PURE__ */ getDefaultExportFromCjs(canonicalizeExports);
|
|
3959
|
+
var te = Object.defineProperty;
|
|
3960
|
+
var re = (e, n2, t) => n2 in e ? te(e, n2, { enumerable: true, configurable: true, writable: true, value: t }) : e[n2] = t;
|
|
3961
|
+
var b = (e, n2, t) => re(e, typeof n2 != "symbol" ? n2 + "" : n2, t);
|
|
3962
|
+
z$2.object({
|
|
3963
3963
|
/** Included left border. */
|
|
3964
|
-
from: z$
|
|
3964
|
+
from: z$2.number(),
|
|
3965
3965
|
/** Excluded right border. */
|
|
3966
|
-
to: z$
|
|
3966
|
+
to: z$2.number()
|
|
3967
3967
|
});
|
|
3968
|
-
function
|
|
3968
|
+
function S(e) {
|
|
3969
3969
|
throw new Error("Unexpected object: " + e);
|
|
3970
3970
|
}
|
|
3971
|
-
function
|
|
3971
|
+
function Qe$1(e) {
|
|
3972
3972
|
if (!e || typeof e != "object")
|
|
3973
3973
|
return false;
|
|
3974
3974
|
const n2 = e;
|
|
@@ -3985,44 +3985,44 @@
|
|
|
3985
3985
|
return false;
|
|
3986
3986
|
}
|
|
3987
3987
|
}
|
|
3988
|
-
function
|
|
3988
|
+
function Xe$1(e, n2) {
|
|
3989
3989
|
if (e !== void 0)
|
|
3990
3990
|
switch (e.type) {
|
|
3991
3991
|
case "Json":
|
|
3992
3992
|
return e;
|
|
3993
3993
|
case "JsonPartitioned": {
|
|
3994
|
-
const
|
|
3995
|
-
for (const [
|
|
3996
|
-
r
|
|
3994
|
+
const t = {};
|
|
3995
|
+
for (const [r, o] of Object.entries(e.parts))
|
|
3996
|
+
t[r] = n2(o);
|
|
3997
3997
|
return {
|
|
3998
3998
|
...e,
|
|
3999
|
-
parts:
|
|
3999
|
+
parts: t
|
|
4000
4000
|
};
|
|
4001
4001
|
}
|
|
4002
4002
|
case "BinaryPartitioned": {
|
|
4003
|
-
const
|
|
4004
|
-
for (const [
|
|
4005
|
-
r
|
|
4006
|
-
index: n2(
|
|
4007
|
-
values: n2(
|
|
4003
|
+
const t = {};
|
|
4004
|
+
for (const [r, o] of Object.entries(e.parts))
|
|
4005
|
+
t[r] = {
|
|
4006
|
+
index: n2(o.index),
|
|
4007
|
+
values: n2(o.values)
|
|
4008
4008
|
};
|
|
4009
4009
|
return {
|
|
4010
4010
|
...e,
|
|
4011
|
-
parts:
|
|
4011
|
+
parts: t
|
|
4012
4012
|
};
|
|
4013
4013
|
}
|
|
4014
4014
|
case "ParquetPartitioned": {
|
|
4015
|
-
const
|
|
4016
|
-
for (const [
|
|
4017
|
-
r
|
|
4015
|
+
const t = {};
|
|
4016
|
+
for (const [r, o] of Object.entries(e.parts))
|
|
4017
|
+
t[r] = n2(o);
|
|
4018
4018
|
return {
|
|
4019
4019
|
...e,
|
|
4020
|
-
parts:
|
|
4020
|
+
parts: t
|
|
4021
4021
|
};
|
|
4022
4022
|
}
|
|
4023
4023
|
}
|
|
4024
4024
|
}
|
|
4025
|
-
function
|
|
4025
|
+
function ue$1(e) {
|
|
4026
4026
|
if (!e || typeof e != "object")
|
|
4027
4027
|
return false;
|
|
4028
4028
|
const n2 = e;
|
|
@@ -4039,8 +4039,8 @@
|
|
|
4039
4039
|
return false;
|
|
4040
4040
|
}
|
|
4041
4041
|
}
|
|
4042
|
-
function
|
|
4043
|
-
if (!
|
|
4042
|
+
function Ze$1(e) {
|
|
4043
|
+
if (!ue$1(e)) return false;
|
|
4044
4044
|
switch (e.type) {
|
|
4045
4045
|
case "JsonPartitioned":
|
|
4046
4046
|
case "BinaryPartitioned":
|
|
@@ -4050,44 +4050,44 @@
|
|
|
4050
4050
|
return false;
|
|
4051
4051
|
}
|
|
4052
4052
|
}
|
|
4053
|
-
function
|
|
4053
|
+
function en$1(e) {
|
|
4054
4054
|
switch (e.type) {
|
|
4055
4055
|
case "Json":
|
|
4056
4056
|
return {
|
|
4057
4057
|
type: "Json",
|
|
4058
4058
|
keyLength: e.keyLength,
|
|
4059
|
-
data: Object.entries(e.data).map(([n2,
|
|
4059
|
+
data: Object.entries(e.data).map(([n2, t]) => ({ key: JSON.parse(n2), value: t }))
|
|
4060
4060
|
};
|
|
4061
4061
|
case "JsonPartitioned":
|
|
4062
4062
|
return {
|
|
4063
4063
|
type: "JsonPartitioned",
|
|
4064
4064
|
partitionKeyLength: e.partitionKeyLength,
|
|
4065
|
-
parts: Object.entries(e.parts).map(([n2,
|
|
4065
|
+
parts: Object.entries(e.parts).map(([n2, t]) => ({ key: JSON.parse(n2), value: t }))
|
|
4066
4066
|
};
|
|
4067
4067
|
case "BinaryPartitioned":
|
|
4068
4068
|
return {
|
|
4069
4069
|
type: "BinaryPartitioned",
|
|
4070
4070
|
partitionKeyLength: e.partitionKeyLength,
|
|
4071
|
-
parts: Object.entries(e.parts).map(([n2,
|
|
4071
|
+
parts: Object.entries(e.parts).map(([n2, t]) => ({ key: JSON.parse(n2), value: t }))
|
|
4072
4072
|
};
|
|
4073
4073
|
case "ParquetPartitioned":
|
|
4074
4074
|
return {
|
|
4075
4075
|
type: "ParquetPartitioned",
|
|
4076
4076
|
partitionKeyLength: e.partitionKeyLength,
|
|
4077
|
-
parts: Object.entries(e.parts).map(([n2,
|
|
4077
|
+
parts: Object.entries(e.parts).map(([n2, t]) => ({ key: JSON.parse(n2), value: t }))
|
|
4078
4078
|
};
|
|
4079
4079
|
default:
|
|
4080
|
-
|
|
4080
|
+
S(e);
|
|
4081
4081
|
}
|
|
4082
4082
|
}
|
|
4083
|
-
function
|
|
4083
|
+
function nn$1(e) {
|
|
4084
4084
|
switch (e.type) {
|
|
4085
4085
|
case "Json":
|
|
4086
4086
|
return {
|
|
4087
4087
|
type: "Json",
|
|
4088
4088
|
keyLength: e.keyLength,
|
|
4089
4089
|
data: Object.fromEntries(
|
|
4090
|
-
e.data.map(({ key: n2, value:
|
|
4090
|
+
e.data.map(({ key: n2, value: t }) => [JSON.stringify(n2), t])
|
|
4091
4091
|
)
|
|
4092
4092
|
};
|
|
4093
4093
|
case "JsonPartitioned":
|
|
@@ -4095,7 +4095,7 @@
|
|
|
4095
4095
|
type: "JsonPartitioned",
|
|
4096
4096
|
partitionKeyLength: e.partitionKeyLength,
|
|
4097
4097
|
parts: Object.fromEntries(
|
|
4098
|
-
e.parts.map(({ key: n2, value:
|
|
4098
|
+
e.parts.map(({ key: n2, value: t }) => [JSON.stringify(n2), t])
|
|
4099
4099
|
)
|
|
4100
4100
|
};
|
|
4101
4101
|
case "BinaryPartitioned":
|
|
@@ -4103,7 +4103,7 @@
|
|
|
4103
4103
|
type: "BinaryPartitioned",
|
|
4104
4104
|
partitionKeyLength: e.partitionKeyLength,
|
|
4105
4105
|
parts: Object.fromEntries(
|
|
4106
|
-
e.parts.map(({ key: n2, value:
|
|
4106
|
+
e.parts.map(({ key: n2, value: t }) => [JSON.stringify(n2), t])
|
|
4107
4107
|
)
|
|
4108
4108
|
};
|
|
4109
4109
|
case "ParquetPartitioned":
|
|
@@ -4111,43 +4111,147 @@
|
|
|
4111
4111
|
type: "ParquetPartitioned",
|
|
4112
4112
|
partitionKeyLength: e.partitionKeyLength,
|
|
4113
4113
|
parts: Object.fromEntries(
|
|
4114
|
-
e.parts.map(({ key: n2, value:
|
|
4114
|
+
e.parts.map(({ key: n2, value: t }) => [JSON.stringify(n2), t])
|
|
4115
4115
|
)
|
|
4116
4116
|
};
|
|
4117
4117
|
default:
|
|
4118
|
-
|
|
4118
|
+
S(e);
|
|
4119
|
+
}
|
|
4120
|
+
}
|
|
4121
|
+
function de(e) {
|
|
4122
|
+
if (typeof e == "string")
|
|
4123
|
+
return `String value was thrown: ${e}`;
|
|
4124
|
+
if (e && typeof e == "object")
|
|
4125
|
+
try {
|
|
4126
|
+
return `Plain object was thrown: ${JSON.stringify(e)}`;
|
|
4127
|
+
} catch (n2) {
|
|
4128
|
+
return `Non-serializable object was thrown (JSON.stringify failed: ${n2 instanceof Error ? n2.message : String(n2)}): ${String(e)}`;
|
|
4129
|
+
}
|
|
4130
|
+
return `Non-Error value (${typeof e}) was thrown: ${e}`;
|
|
4131
|
+
}
|
|
4132
|
+
function C(e) {
|
|
4133
|
+
return e instanceof Error ? e : new Error(de(e));
|
|
4134
|
+
}
|
|
4135
|
+
function hn(e) {
|
|
4136
|
+
return JSON.stringify(e);
|
|
4137
|
+
}
|
|
4138
|
+
function m$1(e) {
|
|
4139
|
+
return We(e);
|
|
4140
|
+
}
|
|
4141
|
+
function me$1(e) {
|
|
4142
|
+
return JSON.parse(e);
|
|
4143
|
+
}
|
|
4144
|
+
const g = {
|
|
4145
|
+
Int: "Int",
|
|
4146
|
+
Long: "Long",
|
|
4147
|
+
Float: "Float",
|
|
4148
|
+
Double: "Double",
|
|
4149
|
+
String: "String",
|
|
4150
|
+
Bytes: "Bytes"
|
|
4151
|
+
};
|
|
4152
|
+
function I(e, n2) {
|
|
4153
|
+
return e == null ? void 0 : e[n2];
|
|
4154
|
+
}
|
|
4155
|
+
function j(e, n2, t, r = "readMetadataJsonOrThrow") {
|
|
4156
|
+
const o = I(e, t);
|
|
4157
|
+
if (o === void 0) return;
|
|
4158
|
+
const i = n2[t];
|
|
4159
|
+
try {
|
|
4160
|
+
const s2 = JSON.parse(o);
|
|
4161
|
+
return i.parse(s2);
|
|
4162
|
+
} catch (s2) {
|
|
4163
|
+
throw new Error(
|
|
4164
|
+
`${r} failed, key: ${String(t)}, value: ${o}, error: ${C(s2)}`
|
|
4165
|
+
);
|
|
4119
4166
|
}
|
|
4120
4167
|
}
|
|
4121
|
-
function
|
|
4168
|
+
function U(e, n2, t) {
|
|
4169
|
+
try {
|
|
4170
|
+
return j(e, n2, t);
|
|
4171
|
+
} catch {
|
|
4172
|
+
return;
|
|
4173
|
+
}
|
|
4174
|
+
}
|
|
4175
|
+
const y = {
|
|
4176
|
+
DiscreteValues: "pl7.app/discreteValues",
|
|
4177
|
+
Graph: {
|
|
4178
|
+
IsVirtual: "pl7.app/graph/isVirtual"
|
|
4179
|
+
},
|
|
4180
|
+
HideDataFromUi: "pl7.app/hideDataFromUi",
|
|
4181
|
+
IsLinkerColumn: "pl7.app/isLinkerColumn",
|
|
4182
|
+
Label: "pl7.app/label",
|
|
4183
|
+
Max: "pl7.app/max",
|
|
4184
|
+
Min: "pl7.app/min",
|
|
4185
|
+
Parents: "pl7.app/parents",
|
|
4186
|
+
Sequence: {
|
|
4187
|
+
Annotation: {
|
|
4188
|
+
Mapping: "pl7.app/sequence/annotation/mapping"
|
|
4189
|
+
},
|
|
4190
|
+
IsAnnotation: "pl7.app/sequence/isAnnotation"
|
|
4191
|
+
},
|
|
4192
|
+
Table: {
|
|
4193
|
+
OrderPriority: "pl7.app/table/orderPriority",
|
|
4194
|
+
Visibility: "pl7.app/table/visibility"
|
|
4195
|
+
},
|
|
4196
|
+
Trace: "pl7.app/trace"
|
|
4197
|
+
}, he = z$2.object({
|
|
4198
|
+
type: z$2.nativeEnum(g),
|
|
4199
|
+
name: z$2.string(),
|
|
4200
|
+
domain: z$2.record(z$2.string(), z$2.string()).optional(),
|
|
4201
|
+
annotations: z$2.record(z$2.string(), z$2.string()).optional(),
|
|
4202
|
+
parentAxes: z$2.array(z$2.number()).optional()
|
|
4203
|
+
}).passthrough(), W = {
|
|
4204
|
+
[y.DiscreteValues]: z$2.array(z$2.string()).or(z$2.array(z$2.number())),
|
|
4205
|
+
[y.Graph.IsVirtual]: z$2.boolean(),
|
|
4206
|
+
[y.HideDataFromUi]: z$2.boolean(),
|
|
4207
|
+
[y.IsLinkerColumn]: z$2.boolean(),
|
|
4208
|
+
[y.Max]: z$2.number(),
|
|
4209
|
+
[y.Min]: z$2.number(),
|
|
4210
|
+
[y.Parents]: z$2.array(he),
|
|
4211
|
+
[y.Sequence.Annotation.Mapping]: z$2.record(z$2.string(), z$2.string()),
|
|
4212
|
+
[y.Sequence.IsAnnotation]: z$2.boolean(),
|
|
4213
|
+
[y.Table.OrderPriority]: z$2.number(),
|
|
4214
|
+
[y.Trace]: z$2.record(z$2.string(), z$2.unknown())
|
|
4215
|
+
};
|
|
4216
|
+
function An(e, n2) {
|
|
4217
|
+
return I(e == null ? void 0 : e.annotations, n2);
|
|
4218
|
+
}
|
|
4219
|
+
function z$1(e, n2) {
|
|
4220
|
+
return U(e == null ? void 0 : e.annotations, W, n2);
|
|
4221
|
+
}
|
|
4222
|
+
const Pn = {
|
|
4223
|
+
Label: "pl7.app/label"
|
|
4224
|
+
};
|
|
4225
|
+
function En(e) {
|
|
4122
4226
|
return {
|
|
4123
4227
|
columnId: e.id,
|
|
4124
4228
|
spec: e.spec
|
|
4125
4229
|
};
|
|
4126
4230
|
}
|
|
4127
|
-
function
|
|
4128
|
-
const { type: n2, name:
|
|
4129
|
-
return
|
|
4231
|
+
function p$1(e) {
|
|
4232
|
+
const { type: n2, name: t, domain: r } = e, o = { type: n2, name: t };
|
|
4233
|
+
return r && Object.entries(r).length > 0 && Object.assign(o, { domain: r }), o;
|
|
4130
4234
|
}
|
|
4131
|
-
function
|
|
4132
|
-
return e.map(
|
|
4235
|
+
function G$1(e) {
|
|
4236
|
+
return e.map(p$1);
|
|
4133
4237
|
}
|
|
4134
|
-
function
|
|
4135
|
-
return $
|
|
4238
|
+
function On(e) {
|
|
4239
|
+
return m$1(p$1(e));
|
|
4136
4240
|
}
|
|
4137
|
-
function
|
|
4241
|
+
function we$1(e, n2) {
|
|
4138
4242
|
if (e === void 0) return n2 === void 0;
|
|
4139
4243
|
if (n2 === void 0) return true;
|
|
4140
|
-
for (const
|
|
4141
|
-
if (e[
|
|
4244
|
+
for (const t in n2)
|
|
4245
|
+
if (e[t] !== n2[t]) return false;
|
|
4142
4246
|
return true;
|
|
4143
4247
|
}
|
|
4144
|
-
function
|
|
4145
|
-
return e.name === n2.name &&
|
|
4248
|
+
function Ae$1(e, n2) {
|
|
4249
|
+
return e.name === n2.name && we$1(e.domain, n2.domain);
|
|
4146
4250
|
}
|
|
4147
|
-
function
|
|
4148
|
-
return { ...e, src:
|
|
4251
|
+
function In(e, n2) {
|
|
4252
|
+
return { ...e, src: E(e.src, n2) };
|
|
4149
4253
|
}
|
|
4150
|
-
function
|
|
4254
|
+
function E(e, n2) {
|
|
4151
4255
|
switch (e.type) {
|
|
4152
4256
|
case "column":
|
|
4153
4257
|
return {
|
|
@@ -4167,51 +4271,51 @@
|
|
|
4167
4271
|
case "full":
|
|
4168
4272
|
return {
|
|
4169
4273
|
type: e.type,
|
|
4170
|
-
entries: e.entries.map((
|
|
4274
|
+
entries: e.entries.map((t) => E(t, n2))
|
|
4171
4275
|
};
|
|
4172
4276
|
case "outer":
|
|
4173
4277
|
return {
|
|
4174
4278
|
type: "outer",
|
|
4175
|
-
primary:
|
|
4176
|
-
secondary: e.secondary.map((
|
|
4279
|
+
primary: E(e.primary, n2),
|
|
4280
|
+
secondary: e.secondary.map((t) => E(t, n2))
|
|
4177
4281
|
};
|
|
4178
4282
|
default:
|
|
4179
|
-
|
|
4283
|
+
S(e);
|
|
4180
4284
|
}
|
|
4181
4285
|
}
|
|
4182
|
-
function
|
|
4183
|
-
return
|
|
4286
|
+
function Se$1(e) {
|
|
4287
|
+
return We(e);
|
|
4184
4288
|
}
|
|
4185
|
-
function
|
|
4186
|
-
return $
|
|
4289
|
+
function N(e) {
|
|
4290
|
+
return We(p$1(e));
|
|
4187
4291
|
}
|
|
4188
|
-
function
|
|
4292
|
+
function R(e, n2) {
|
|
4189
4293
|
return JSON.stringify([e, n2]);
|
|
4190
4294
|
}
|
|
4191
|
-
class
|
|
4295
|
+
class Nn {
|
|
4192
4296
|
/**
|
|
4193
4297
|
* Creates a new anchor context from a set of anchor column specifications
|
|
4194
4298
|
* @param anchors Record of anchor column specifications indexed by anchor ID
|
|
4195
4299
|
*/
|
|
4196
4300
|
constructor(n2) {
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4301
|
+
b(this, "domains", /* @__PURE__ */ new Map());
|
|
4302
|
+
b(this, "axes", /* @__PURE__ */ new Map());
|
|
4303
|
+
b(this, "domainPacks", []);
|
|
4304
|
+
b(this, "domainPackToAnchor", /* @__PURE__ */ new Map());
|
|
4201
4305
|
this.anchors = n2;
|
|
4202
|
-
const
|
|
4203
|
-
|
|
4204
|
-
for (const [
|
|
4205
|
-
for (let
|
|
4206
|
-
const s2 =
|
|
4207
|
-
this.axes.set(a, { anchor:
|
|
4306
|
+
const t = Object.entries(n2);
|
|
4307
|
+
t.sort((r, o) => r[0].localeCompare(o[0]));
|
|
4308
|
+
for (const [r, o] of t) {
|
|
4309
|
+
for (let i = 0; i < o.axesSpec.length; i++) {
|
|
4310
|
+
const s2 = o.axesSpec[i], a = N(s2);
|
|
4311
|
+
this.axes.set(a, { anchor: r, idx: i });
|
|
4208
4312
|
}
|
|
4209
|
-
if (
|
|
4210
|
-
const
|
|
4211
|
-
|
|
4212
|
-
for (const [s2, a] of
|
|
4213
|
-
const u2 =
|
|
4214
|
-
this.domains.set(u2,
|
|
4313
|
+
if (o.domain !== void 0) {
|
|
4314
|
+
const i = Object.entries(o.domain);
|
|
4315
|
+
i.sort((s2, a) => s2[0].localeCompare(a[0])), this.domainPackToAnchor.set(JSON.stringify(i), r), this.domainPacks.push(i.map(([s2]) => s2));
|
|
4316
|
+
for (const [s2, a] of i) {
|
|
4317
|
+
const u2 = R(s2, a);
|
|
4318
|
+
this.domains.set(u2, r);
|
|
4215
4319
|
}
|
|
4216
4320
|
}
|
|
4217
4321
|
}
|
|
@@ -4219,12 +4323,12 @@
|
|
|
4219
4323
|
/**
|
|
4220
4324
|
* Implementation of derive method
|
|
4221
4325
|
*/
|
|
4222
|
-
derive(n2,
|
|
4223
|
-
const
|
|
4326
|
+
derive(n2, t) {
|
|
4327
|
+
const r = {
|
|
4224
4328
|
name: n2.name,
|
|
4225
4329
|
axes: []
|
|
4226
4330
|
};
|
|
4227
|
-
let
|
|
4331
|
+
let o;
|
|
4228
4332
|
if (n2.domain !== void 0)
|
|
4229
4333
|
e:
|
|
4230
4334
|
for (const s2 of this.domainPacks) {
|
|
@@ -4238,38 +4342,38 @@
|
|
|
4238
4342
|
}
|
|
4239
4343
|
const u2 = this.domainPackToAnchor.get(JSON.stringify(a));
|
|
4240
4344
|
if (u2 !== void 0) {
|
|
4241
|
-
|
|
4345
|
+
r.domainAnchor = u2, o = new Set(s2);
|
|
4242
4346
|
break;
|
|
4243
4347
|
}
|
|
4244
4348
|
}
|
|
4245
4349
|
for (const [s2, a] of Object.entries(n2.domain ?? {})) {
|
|
4246
|
-
if (
|
|
4350
|
+
if (o !== void 0 && o.has(s2))
|
|
4247
4351
|
continue;
|
|
4248
|
-
const u2 =
|
|
4249
|
-
|
|
4250
|
-
}
|
|
4251
|
-
if (
|
|
4252
|
-
const a =
|
|
4253
|
-
return u2 === void 0 ?
|
|
4254
|
-
}), !
|
|
4255
|
-
return
|
|
4256
|
-
const
|
|
4257
|
-
for (const s2 of
|
|
4352
|
+
const u2 = R(s2, a), c2 = this.domains.get(u2);
|
|
4353
|
+
r.domain ?? (r.domain = {}), r.domain[s2] = c2 ? { anchor: c2 } : a;
|
|
4354
|
+
}
|
|
4355
|
+
if (r.axes = n2.axesSpec.map((s2) => {
|
|
4356
|
+
const a = N(s2), u2 = this.axes.get(a);
|
|
4357
|
+
return u2 === void 0 ? p$1(s2) : u2;
|
|
4358
|
+
}), !t || t.length === 0)
|
|
4359
|
+
return r;
|
|
4360
|
+
const i = [];
|
|
4361
|
+
for (const s2 of t) {
|
|
4258
4362
|
const [a, u2] = s2;
|
|
4259
4363
|
if (typeof a == "number") {
|
|
4260
4364
|
if (a < 0 || a >= n2.axesSpec.length)
|
|
4261
4365
|
throw new Error(`Axis index ${a} is out of bounds (0-${n2.axesSpec.length - 1})`);
|
|
4262
|
-
|
|
4366
|
+
i.push([a, u2]);
|
|
4263
4367
|
} else {
|
|
4264
4368
|
const c2 = n2.axesSpec.findIndex((d) => d.name === a);
|
|
4265
4369
|
if (c2 === -1)
|
|
4266
4370
|
throw new Error(`Axis with name "${a}" not found in the column specification`);
|
|
4267
|
-
|
|
4371
|
+
i.push([c2, u2]);
|
|
4268
4372
|
}
|
|
4269
4373
|
}
|
|
4270
|
-
return
|
|
4271
|
-
source:
|
|
4272
|
-
axisFilters:
|
|
4374
|
+
return i.sort((s2, a) => s2[0] - a[0]), {
|
|
4375
|
+
source: r,
|
|
4376
|
+
axisFilters: i
|
|
4273
4377
|
};
|
|
4274
4378
|
}
|
|
4275
4379
|
/**
|
|
@@ -4278,111 +4382,111 @@
|
|
|
4278
4382
|
* @param axisFilters Optional axis filters to apply to the column
|
|
4279
4383
|
* @returns A canonicalized string representation of the anchored column identifier
|
|
4280
4384
|
*/
|
|
4281
|
-
deriveS(n2,
|
|
4282
|
-
return
|
|
4283
|
-
}
|
|
4284
|
-
}
|
|
4285
|
-
function
|
|
4286
|
-
const
|
|
4287
|
-
if (
|
|
4288
|
-
const
|
|
4289
|
-
if (!
|
|
4290
|
-
throw new Error(`Anchor "${
|
|
4291
|
-
const s2 =
|
|
4292
|
-
|
|
4293
|
-
}
|
|
4294
|
-
if (
|
|
4295
|
-
const
|
|
4296
|
-
for (const [s2, a] of Object.entries(
|
|
4385
|
+
deriveS(n2, t) {
|
|
4386
|
+
return Se$1(this.derive(n2, t));
|
|
4387
|
+
}
|
|
4388
|
+
}
|
|
4389
|
+
function Rn(e, n2, t) {
|
|
4390
|
+
const r = { ...n2 }, o = (t == null ? void 0 : t.ignoreMissingDomains) ?? false;
|
|
4391
|
+
if (r.domainAnchor !== void 0) {
|
|
4392
|
+
const i = e[r.domainAnchor];
|
|
4393
|
+
if (!i)
|
|
4394
|
+
throw new Error(`Anchor "${r.domainAnchor}" not found`);
|
|
4395
|
+
const s2 = i.domain || {};
|
|
4396
|
+
r.domain = { ...s2, ...r.domain }, delete r.domainAnchor;
|
|
4397
|
+
}
|
|
4398
|
+
if (r.domain) {
|
|
4399
|
+
const i = {};
|
|
4400
|
+
for (const [s2, a] of Object.entries(r.domain))
|
|
4297
4401
|
if (typeof a == "string")
|
|
4298
|
-
|
|
4402
|
+
i[s2] = a;
|
|
4299
4403
|
else {
|
|
4300
4404
|
const u2 = e[a.anchor];
|
|
4301
4405
|
if (!u2)
|
|
4302
4406
|
throw new Error(`Anchor "${a.anchor}" not found for domain key "${s2}"`);
|
|
4303
4407
|
if (!u2.domain || u2.domain[s2] === void 0) {
|
|
4304
|
-
if (!
|
|
4408
|
+
if (!o)
|
|
4305
4409
|
throw new Error(`Domain key "${s2}" not found in anchor "${a.anchor}"`);
|
|
4306
4410
|
continue;
|
|
4307
4411
|
}
|
|
4308
|
-
|
|
4412
|
+
i[s2] = u2.domain[s2];
|
|
4309
4413
|
}
|
|
4310
|
-
|
|
4414
|
+
r.domain = i;
|
|
4311
4415
|
}
|
|
4312
|
-
return
|
|
4416
|
+
return r.axes && (r.axes = r.axes.map((i) => Ee(e, i))), r;
|
|
4313
4417
|
}
|
|
4314
|
-
function
|
|
4315
|
-
if (!
|
|
4418
|
+
function Ee(e, n2) {
|
|
4419
|
+
if (!Oe$1(n2))
|
|
4316
4420
|
return n2;
|
|
4317
|
-
const
|
|
4318
|
-
if (!
|
|
4319
|
-
throw new Error(`Anchor "${
|
|
4421
|
+
const t = n2.anchor, r = e[t];
|
|
4422
|
+
if (!r)
|
|
4423
|
+
throw new Error(`Anchor "${t}" not found for axis reference`);
|
|
4320
4424
|
if ("idx" in n2) {
|
|
4321
|
-
if (n2.idx < 0 || n2.idx >=
|
|
4322
|
-
throw new Error(`Axis index ${n2.idx} out of bounds for anchor "${
|
|
4323
|
-
return
|
|
4425
|
+
if (n2.idx < 0 || n2.idx >= r.axesSpec.length)
|
|
4426
|
+
throw new Error(`Axis index ${n2.idx} out of bounds for anchor "${t}"`);
|
|
4427
|
+
return r.axesSpec[n2.idx];
|
|
4324
4428
|
} else if ("name" in n2) {
|
|
4325
|
-
const
|
|
4326
|
-
if (
|
|
4327
|
-
throw new Error(`Multiple axes with name "${n2.name}" found in anchor "${
|
|
4328
|
-
if (
|
|
4329
|
-
throw new Error(`Axis with name "${n2.name}" not found in anchor "${
|
|
4330
|
-
return
|
|
4429
|
+
const o = r.axesSpec.filter((i) => i.name === n2.name);
|
|
4430
|
+
if (o.length > 1)
|
|
4431
|
+
throw new Error(`Multiple axes with name "${n2.name}" found in anchor "${t}"`);
|
|
4432
|
+
if (o.length === 0)
|
|
4433
|
+
throw new Error(`Axis with name "${n2.name}" not found in anchor "${t}"`);
|
|
4434
|
+
return o[0];
|
|
4331
4435
|
} else if ("id" in n2) {
|
|
4332
|
-
const
|
|
4333
|
-
if (
|
|
4334
|
-
throw new Error(`Multiple matching axes found for matcher in anchor "${
|
|
4335
|
-
if (
|
|
4336
|
-
throw new Error(`No matching axis found for matcher in anchor "${
|
|
4337
|
-
return
|
|
4436
|
+
const o = r.axesSpec.filter((i) => Ae$1(n2.id, p$1(i)));
|
|
4437
|
+
if (o.length > 1)
|
|
4438
|
+
throw new Error(`Multiple matching axes found for matcher in anchor "${t}"`);
|
|
4439
|
+
if (o.length === 0)
|
|
4440
|
+
throw new Error(`No matching axis found for matcher in anchor "${t}"`);
|
|
4441
|
+
return o[0];
|
|
4338
4442
|
}
|
|
4339
4443
|
throw new Error("Unsupported axis reference type");
|
|
4340
4444
|
}
|
|
4341
|
-
function
|
|
4445
|
+
function Oe$1(e) {
|
|
4342
4446
|
return typeof e == "object" && "anchor" in e;
|
|
4343
4447
|
}
|
|
4344
|
-
function
|
|
4448
|
+
function w$1(e) {
|
|
4345
4449
|
return e.kind === "PColumn";
|
|
4346
4450
|
}
|
|
4347
|
-
function
|
|
4348
|
-
return
|
|
4451
|
+
function Fe$1(e) {
|
|
4452
|
+
return w$1(e.spec);
|
|
4349
4453
|
}
|
|
4350
|
-
function
|
|
4351
|
-
if (!
|
|
4454
|
+
function Vn(e) {
|
|
4455
|
+
if (!Fe$1(e)) throw new Error(`not a PColumn (kind = ${e.spec.kind})`);
|
|
4352
4456
|
return e;
|
|
4353
4457
|
}
|
|
4354
|
-
function
|
|
4458
|
+
function Mn(e, n2) {
|
|
4355
4459
|
return e === void 0 ? void 0 : {
|
|
4356
4460
|
...e,
|
|
4357
4461
|
data: n2(e.data)
|
|
4358
4462
|
};
|
|
4359
4463
|
}
|
|
4360
|
-
function
|
|
4361
|
-
const n2 = /* @__PURE__ */ new Map(),
|
|
4362
|
-
switch (
|
|
4464
|
+
function Bn(e) {
|
|
4465
|
+
const n2 = /* @__PURE__ */ new Map(), t = (r) => {
|
|
4466
|
+
switch (r.type) {
|
|
4363
4467
|
case "column":
|
|
4364
|
-
n2.set(
|
|
4468
|
+
n2.set(r.column.id, r.column);
|
|
4365
4469
|
return;
|
|
4366
4470
|
case "slicedColumn":
|
|
4367
|
-
n2.set(
|
|
4471
|
+
n2.set(r.column.id, r.column);
|
|
4368
4472
|
return;
|
|
4369
4473
|
case "inlineColumn":
|
|
4370
4474
|
return;
|
|
4371
4475
|
case "full":
|
|
4372
4476
|
case "inner":
|
|
4373
|
-
for (const
|
|
4477
|
+
for (const o of r.entries) t(o);
|
|
4374
4478
|
return;
|
|
4375
4479
|
case "outer":
|
|
4376
|
-
r
|
|
4377
|
-
for (const
|
|
4480
|
+
t(r.primary);
|
|
4481
|
+
for (const o of r.secondary) t(o);
|
|
4378
4482
|
return;
|
|
4379
4483
|
default:
|
|
4380
|
-
|
|
4484
|
+
S(r);
|
|
4381
4485
|
}
|
|
4382
4486
|
};
|
|
4383
|
-
return
|
|
4487
|
+
return t(e), [...n2.values()];
|
|
4384
4488
|
}
|
|
4385
|
-
function
|
|
4489
|
+
function T(e, n2) {
|
|
4386
4490
|
if (e.name !== void 0 && e.name !== n2.name)
|
|
4387
4491
|
return false;
|
|
4388
4492
|
if (e.type !== void 0) {
|
|
@@ -4393,14 +4497,14 @@
|
|
|
4393
4497
|
return false;
|
|
4394
4498
|
}
|
|
4395
4499
|
if (e.domain !== void 0) {
|
|
4396
|
-
const
|
|
4397
|
-
for (const [
|
|
4398
|
-
if (r
|
|
4500
|
+
const t = n2.domain || {};
|
|
4501
|
+
for (const [r, o] of Object.entries(e.domain))
|
|
4502
|
+
if (t[r] !== o)
|
|
4399
4503
|
return false;
|
|
4400
4504
|
}
|
|
4401
4505
|
return true;
|
|
4402
4506
|
}
|
|
4403
|
-
function
|
|
4507
|
+
function $$1(e, n2) {
|
|
4404
4508
|
if (n2.name !== void 0 && e.name !== n2.name || n2.namePattern !== void 0 && !new RegExp(n2.namePattern).test(e.name))
|
|
4405
4509
|
return false;
|
|
4406
4510
|
if (n2.type !== void 0) {
|
|
@@ -4411,81 +4515,78 @@
|
|
|
4411
4515
|
return false;
|
|
4412
4516
|
}
|
|
4413
4517
|
if (n2.domain !== void 0) {
|
|
4414
|
-
const
|
|
4415
|
-
for (const [
|
|
4416
|
-
if (r
|
|
4518
|
+
const t = e.domain || {};
|
|
4519
|
+
for (const [r, o] of Object.entries(n2.domain))
|
|
4520
|
+
if (t[r] !== o)
|
|
4417
4521
|
return false;
|
|
4418
4522
|
}
|
|
4419
4523
|
if (n2.axes !== void 0) {
|
|
4420
|
-
const
|
|
4524
|
+
const t = e.axesSpec.map(p$1);
|
|
4421
4525
|
if (n2.partialAxesMatch) {
|
|
4422
|
-
for (const
|
|
4423
|
-
if (!
|
|
4526
|
+
for (const r of n2.axes)
|
|
4527
|
+
if (!t.some((o) => T(r, o)))
|
|
4424
4528
|
return false;
|
|
4425
4529
|
} else {
|
|
4426
|
-
if (
|
|
4530
|
+
if (t.length !== n2.axes.length)
|
|
4427
4531
|
return false;
|
|
4428
|
-
for (let
|
|
4429
|
-
if (!
|
|
4532
|
+
for (let r = 0; r < n2.axes.length; r++)
|
|
4533
|
+
if (!T(n2.axes[r], t[r]))
|
|
4430
4534
|
return false;
|
|
4431
4535
|
}
|
|
4432
4536
|
}
|
|
4433
4537
|
if (n2.annotations !== void 0) {
|
|
4434
|
-
const
|
|
4435
|
-
for (const [
|
|
4436
|
-
if (r
|
|
4538
|
+
const t = e.annotations || {};
|
|
4539
|
+
for (const [r, o] of Object.entries(n2.annotations))
|
|
4540
|
+
if (t[r] !== o)
|
|
4437
4541
|
return false;
|
|
4438
4542
|
}
|
|
4439
4543
|
if (n2.annotationPatterns !== void 0) {
|
|
4440
|
-
const
|
|
4441
|
-
for (const [
|
|
4442
|
-
const
|
|
4443
|
-
if (
|
|
4544
|
+
const t = e.annotations || {};
|
|
4545
|
+
for (const [r, o] of Object.entries(n2.annotationPatterns)) {
|
|
4546
|
+
const i = t[r];
|
|
4547
|
+
if (i === void 0 || !new RegExp(o).test(i))
|
|
4444
4548
|
return false;
|
|
4445
4549
|
}
|
|
4446
4550
|
}
|
|
4447
4551
|
return true;
|
|
4448
4552
|
}
|
|
4449
|
-
function
|
|
4450
|
-
return Array.isArray(e) ? (n2) => e.some((
|
|
4553
|
+
function Un(e) {
|
|
4554
|
+
return Array.isArray(e) ? (n2) => e.some((t) => w$1(n2) && $$1(n2, t)) : (n2) => w$1(n2) && $$1(n2, e);
|
|
4451
4555
|
}
|
|
4452
|
-
function
|
|
4556
|
+
function qn(e) {
|
|
4453
4557
|
const n2 = {
|
|
4454
4558
|
kind: e.kind,
|
|
4455
4559
|
name: e.name
|
|
4456
4560
|
};
|
|
4457
|
-
return e.domain !== void 0 && (n2.domain = e.domain),
|
|
4561
|
+
return e.domain !== void 0 && (n2.domain = e.domain), w$1(e) && (n2.axesSpec = G$1(e.axesSpec)), We(n2);
|
|
4458
4562
|
}
|
|
4459
|
-
z$
|
|
4460
|
-
__isRef: z$
|
|
4461
|
-
blockId: z$
|
|
4462
|
-
name: z$
|
|
4463
|
-
requireEnrichments: z$
|
|
4563
|
+
z$2.object({
|
|
4564
|
+
__isRef: z$2.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
|
|
4565
|
+
blockId: z$2.string().describe("Upstream block id"),
|
|
4566
|
+
name: z$2.string().describe("Name of the output provided to the upstream block's output context"),
|
|
4567
|
+
requireEnrichments: z$2.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")
|
|
4464
4568
|
}).describe(
|
|
4465
4569
|
"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."
|
|
4466
4570
|
).readonly();
|
|
4467
|
-
function
|
|
4571
|
+
function Hn(e) {
|
|
4468
4572
|
return typeof e == "object" && e !== null && "__isRef" in e && e.__isRef === true && "blockId" in e && "name" in e;
|
|
4469
4573
|
}
|
|
4470
|
-
function
|
|
4574
|
+
function Gn(e, n2 = true) {
|
|
4471
4575
|
if (n2)
|
|
4472
4576
|
return {
|
|
4473
4577
|
...e,
|
|
4474
4578
|
requireEnrichments: true
|
|
4475
4579
|
};
|
|
4476
4580
|
{
|
|
4477
|
-
const { requireEnrichments:
|
|
4478
|
-
return
|
|
4581
|
+
const { requireEnrichments: t, ...r } = e;
|
|
4582
|
+
return r;
|
|
4479
4583
|
}
|
|
4480
4584
|
}
|
|
4481
|
-
function
|
|
4585
|
+
function Xn$1(e, n2) {
|
|
4482
4586
|
return e.ok ? { ok: true, value: n2(e.value) } : e;
|
|
4483
4587
|
}
|
|
4484
|
-
const
|
|
4485
|
-
z$
|
|
4486
|
-
function dn(e) {
|
|
4487
|
-
return $e(e);
|
|
4488
|
-
}
|
|
4588
|
+
const De$1 = 24;
|
|
4589
|
+
z$2.string().length(De$1).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
|
|
4489
4590
|
var stringify = { exports: {} };
|
|
4490
4591
|
var hasRequiredStringify;
|
|
4491
4592
|
function requireStringify() {
|
|
@@ -4517,74 +4618,74 @@
|
|
|
4517
4618
|
return stringify.exports;
|
|
4518
4619
|
}
|
|
4519
4620
|
requireStringify();
|
|
4520
|
-
const l = z$
|
|
4521
|
-
type: z$
|
|
4522
|
-
name: z$
|
|
4523
|
-
message: z$
|
|
4621
|
+
const l = z$2.object({
|
|
4622
|
+
type: z$2.literal("PlError"),
|
|
4623
|
+
name: z$2.string(),
|
|
4624
|
+
message: z$2.string(),
|
|
4524
4625
|
/** The message with all details needed for SDK developers. */
|
|
4525
|
-
fullMessage: z$
|
|
4526
|
-
stack: z$
|
|
4626
|
+
fullMessage: z$2.string().optional(),
|
|
4627
|
+
stack: z$2.string().optional()
|
|
4527
4628
|
}), c = l.extend({
|
|
4528
|
-
cause: z$
|
|
4529
|
-
errors: z$
|
|
4530
|
-
}), m = z$
|
|
4531
|
-
type: z$
|
|
4532
|
-
name: z$
|
|
4533
|
-
message: z$
|
|
4534
|
-
stack: z$
|
|
4629
|
+
cause: z$2.lazy(() => s).optional(),
|
|
4630
|
+
errors: z$2.lazy(() => s.array()).optional()
|
|
4631
|
+
}), m = z$2.object({
|
|
4632
|
+
type: z$2.literal("StandardError"),
|
|
4633
|
+
name: z$2.string(),
|
|
4634
|
+
message: z$2.string(),
|
|
4635
|
+
stack: z$2.string().optional()
|
|
4535
4636
|
}), p = m.extend({
|
|
4536
|
-
cause: z$
|
|
4537
|
-
errors: z$
|
|
4538
|
-
}), s = z$
|
|
4539
|
-
const u = z$
|
|
4540
|
-
name: z$
|
|
4541
|
-
message: z$
|
|
4542
|
-
fullMessage: z$
|
|
4543
|
-
stack: z$
|
|
4637
|
+
cause: z$2.lazy(() => s).optional(),
|
|
4638
|
+
errors: z$2.lazy(() => s.array()).optional()
|
|
4639
|
+
}), s = z$2.union([p, c]);
|
|
4640
|
+
const u = z$2.object({
|
|
4641
|
+
name: z$2.string(),
|
|
4642
|
+
message: z$2.string(),
|
|
4643
|
+
fullMessage: z$2.string().optional(),
|
|
4644
|
+
stack: z$2.string().optional()
|
|
4544
4645
|
}), n = u.extend({
|
|
4545
|
-
cause: z$
|
|
4546
|
-
errors: z$
|
|
4646
|
+
cause: z$2.lazy(() => n).optional(),
|
|
4647
|
+
errors: z$2.lazy(() => n.array()).optional()
|
|
4547
4648
|
});
|
|
4548
|
-
var
|
|
4549
|
-
var
|
|
4550
|
-
var V = (t, e, n2) =>
|
|
4649
|
+
var at = Object.defineProperty;
|
|
4650
|
+
var lt = (t, e, n2) => e in t ? at(t, e, { enumerable: true, configurable: true, writable: true, value: n2 }) : t[e] = n2;
|
|
4651
|
+
var V = (t, e, n2) => lt(t, typeof e != "symbol" ? e + "" : e, n2);
|
|
4551
4652
|
function se(t) {
|
|
4552
4653
|
return { type: "Immediate", value: t };
|
|
4553
4654
|
}
|
|
4554
|
-
function
|
|
4655
|
+
function Vt() {
|
|
4555
4656
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
4556
4657
|
}
|
|
4557
|
-
function
|
|
4658
|
+
function He(t) {
|
|
4558
4659
|
if (t && typeof globalThis.getPlatforma == "function")
|
|
4559
4660
|
return globalThis.getPlatforma(t);
|
|
4560
4661
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
4561
4662
|
throw new Error("Can't get platforma instance.");
|
|
4562
4663
|
}
|
|
4563
|
-
function
|
|
4664
|
+
function kt() {
|
|
4564
4665
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
4565
4666
|
}
|
|
4566
|
-
function
|
|
4667
|
+
function v() {
|
|
4567
4668
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
4568
4669
|
throw new Error("Not in config rendering context");
|
|
4569
4670
|
}
|
|
4570
4671
|
function G(t, e) {
|
|
4571
|
-
const n2 =
|
|
4672
|
+
const n2 = kt();
|
|
4572
4673
|
if (n2 === void 0) return false;
|
|
4573
4674
|
if (t in n2.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
|
|
4574
4675
|
return n2.callbackRegistry[t] = e, true;
|
|
4575
4676
|
}
|
|
4576
|
-
const
|
|
4577
|
-
function
|
|
4578
|
-
t in
|
|
4579
|
-
for (const r of
|
|
4677
|
+
const me = /* @__PURE__ */ new Map();
|
|
4678
|
+
function Dt(t, e) {
|
|
4679
|
+
t in v().callbackRegistry || (v().callbackRegistry[t] = (n2) => {
|
|
4680
|
+
for (const r of me.get(t))
|
|
4580
4681
|
r(n2);
|
|
4581
|
-
},
|
|
4682
|
+
}, me.set(t, [])), me.get(t).push(e);
|
|
4582
4683
|
}
|
|
4583
4684
|
class L {
|
|
4584
4685
|
constructor(e, n2 = (r) => r) {
|
|
4585
4686
|
V(this, "isResolved", false);
|
|
4586
4687
|
V(this, "resolvedValue");
|
|
4587
|
-
this.handle = e, this.postProcess = n2,
|
|
4688
|
+
this.handle = e, this.postProcess = n2, Dt(e, (r) => {
|
|
4588
4689
|
this.resolvedValue = n2(r), this.isResolved = true;
|
|
4589
4690
|
});
|
|
4590
4691
|
}
|
|
@@ -4601,10 +4702,10 @@
|
|
|
4601
4702
|
return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
|
|
4602
4703
|
}
|
|
4603
4704
|
}
|
|
4604
|
-
function
|
|
4705
|
+
function Ce(t, e) {
|
|
4605
4706
|
return t === void 0 ? void 0 : e(t);
|
|
4606
4707
|
}
|
|
4607
|
-
class
|
|
4708
|
+
class k {
|
|
4608
4709
|
constructor(e, n2) {
|
|
4609
4710
|
this.handle = e, this.resolvePath = n2;
|
|
4610
4711
|
}
|
|
@@ -4643,47 +4744,47 @@
|
|
|
4643
4744
|
...this.resolvePath,
|
|
4644
4745
|
...n2.map((i) => typeof i == "string" ? i : i.field)
|
|
4645
4746
|
];
|
|
4646
|
-
return
|
|
4647
|
-
|
|
4648
|
-
(i) => new
|
|
4747
|
+
return Ce(
|
|
4748
|
+
v().resolveWithCommon(this.handle, e, ...n2),
|
|
4749
|
+
(i) => new k(i, r)
|
|
4649
4750
|
);
|
|
4650
4751
|
}
|
|
4651
4752
|
get resourceType() {
|
|
4652
|
-
return
|
|
4753
|
+
return v().getResourceType(this.handle);
|
|
4653
4754
|
}
|
|
4654
4755
|
getInputsLocked() {
|
|
4655
|
-
return
|
|
4756
|
+
return v().getInputsLocked(this.handle);
|
|
4656
4757
|
}
|
|
4657
4758
|
getOutputsLocked() {
|
|
4658
|
-
return
|
|
4759
|
+
return v().getOutputsLocked(this.handle);
|
|
4659
4760
|
}
|
|
4660
4761
|
getIsReadyOrError() {
|
|
4661
|
-
return
|
|
4762
|
+
return v().getIsReadyOrError(this.handle);
|
|
4662
4763
|
}
|
|
4663
4764
|
getIsFinal() {
|
|
4664
|
-
return
|
|
4765
|
+
return v().getIsFinal(this.handle);
|
|
4665
4766
|
}
|
|
4666
4767
|
getError() {
|
|
4667
4768
|
const e = [...this.resolvePath, "error"];
|
|
4668
|
-
return
|
|
4669
|
-
|
|
4670
|
-
(n2) => new
|
|
4769
|
+
return Ce(
|
|
4770
|
+
v().getError(this.handle),
|
|
4771
|
+
(n2) => new k(n2, e)
|
|
4671
4772
|
);
|
|
4672
4773
|
}
|
|
4673
4774
|
listInputFields() {
|
|
4674
|
-
return
|
|
4775
|
+
return v().listInputFields(this.handle);
|
|
4675
4776
|
}
|
|
4676
4777
|
listOutputFields() {
|
|
4677
|
-
return
|
|
4778
|
+
return v().listOutputFields(this.handle);
|
|
4678
4779
|
}
|
|
4679
4780
|
listDynamicFields() {
|
|
4680
|
-
return
|
|
4781
|
+
return v().listDynamicFields(this.handle);
|
|
4681
4782
|
}
|
|
4682
4783
|
getKeyValueBase64(e) {
|
|
4683
|
-
return
|
|
4784
|
+
return v().getKeyValueBase64(this.handle, e);
|
|
4684
4785
|
}
|
|
4685
4786
|
getKeyValueAsString(e) {
|
|
4686
|
-
return
|
|
4787
|
+
return v().getKeyValueAsString(this.handle, e);
|
|
4687
4788
|
}
|
|
4688
4789
|
getKeyValueAsJson(e) {
|
|
4689
4790
|
const n2 = this.getKeyValueAsString(e);
|
|
@@ -4691,10 +4792,10 @@
|
|
|
4691
4792
|
return JSON.parse(n2);
|
|
4692
4793
|
}
|
|
4693
4794
|
getDataBase64() {
|
|
4694
|
-
return
|
|
4795
|
+
return v().getDataBase64(this.handle);
|
|
4695
4796
|
}
|
|
4696
4797
|
getDataAsString() {
|
|
4697
|
-
return
|
|
4798
|
+
return v().getDataAsString(this.handle);
|
|
4698
4799
|
}
|
|
4699
4800
|
getDataAsJson() {
|
|
4700
4801
|
const e = this.getDataAsString();
|
|
@@ -4707,7 +4808,7 @@
|
|
|
4707
4808
|
getPColumns(e = false, n2 = "") {
|
|
4708
4809
|
const r = this.parsePObjectCollection(e, n2);
|
|
4709
4810
|
return r === void 0 ? void 0 : Object.entries(r).map(([, o]) => {
|
|
4710
|
-
if (!
|
|
4811
|
+
if (!Fe$1(o)) throw new Error(`not a PColumn (kind = ${o.spec.kind})`);
|
|
4711
4812
|
return o;
|
|
4712
4813
|
});
|
|
4713
4814
|
}
|
|
@@ -4715,7 +4816,7 @@
|
|
|
4715
4816
|
*
|
|
4716
4817
|
*/
|
|
4717
4818
|
parsePObjectCollection(e = false, n2 = "") {
|
|
4718
|
-
const r =
|
|
4819
|
+
const r = v().parsePObjectCollection(
|
|
4719
4820
|
this.handle,
|
|
4720
4821
|
e,
|
|
4721
4822
|
n2,
|
|
@@ -4725,19 +4826,19 @@
|
|
|
4725
4826
|
const i = {};
|
|
4726
4827
|
for (const [o, s2] of Object.entries(r)) {
|
|
4727
4828
|
const a = [...this.resolvePath, o];
|
|
4728
|
-
i[o] =
|
|
4829
|
+
i[o] = Mn(s2, (l2) => new k(l2, a));
|
|
4729
4830
|
}
|
|
4730
4831
|
return i;
|
|
4731
4832
|
}
|
|
4732
4833
|
getFileContentAsBase64(e) {
|
|
4733
|
-
return new L(
|
|
4834
|
+
return new L(v().getBlobContentAsBase64(this.handle, e));
|
|
4734
4835
|
}
|
|
4735
4836
|
getFileContentAsString(e) {
|
|
4736
|
-
return new L(
|
|
4837
|
+
return new L(v().getBlobContentAsString(this.handle, e));
|
|
4737
4838
|
}
|
|
4738
4839
|
getFileContentAsJson(e) {
|
|
4739
4840
|
return new L(
|
|
4740
|
-
|
|
4841
|
+
v().getBlobContentAsString(this.handle, e)
|
|
4741
4842
|
).mapDefined((n2) => JSON.parse(n2));
|
|
4742
4843
|
}
|
|
4743
4844
|
/**
|
|
@@ -4756,7 +4857,7 @@
|
|
|
4756
4857
|
* @returns downloaded file handle
|
|
4757
4858
|
*/
|
|
4758
4859
|
getFileHandle() {
|
|
4759
|
-
return new L(
|
|
4860
|
+
return new L(v().getDownloadedBlobContentHandle(this.handle));
|
|
4760
4861
|
}
|
|
4761
4862
|
/**
|
|
4762
4863
|
* @deprecated use getFileHandle
|
|
@@ -4768,7 +4869,7 @@
|
|
|
4768
4869
|
* @returns downloaded file handle
|
|
4769
4870
|
*/
|
|
4770
4871
|
getRemoteFileHandle() {
|
|
4771
|
-
return new L(
|
|
4872
|
+
return new L(v().getOnDemandBlobContentHandle(this.handle));
|
|
4772
4873
|
}
|
|
4773
4874
|
/**
|
|
4774
4875
|
* @deprecated use getRemoteFileHandle
|
|
@@ -4780,22 +4881,22 @@
|
|
|
4780
4881
|
* @returns the url to the extracted folder
|
|
4781
4882
|
*/
|
|
4782
4883
|
extractArchiveAndGetURL(e) {
|
|
4783
|
-
return new L(
|
|
4884
|
+
return new L(v().extractArchiveAndGetURL(this.handle, e));
|
|
4784
4885
|
}
|
|
4785
4886
|
getImportProgress() {
|
|
4786
|
-
return new L(
|
|
4887
|
+
return new L(v().getImportProgress(this.handle));
|
|
4787
4888
|
}
|
|
4788
4889
|
getLastLogs(e) {
|
|
4789
|
-
return new L(
|
|
4890
|
+
return new L(v().getLastLogs(this.handle, e));
|
|
4790
4891
|
}
|
|
4791
4892
|
getProgressLog(e) {
|
|
4792
|
-
return new L(
|
|
4893
|
+
return new L(v().getProgressLog(this.handle, e));
|
|
4793
4894
|
}
|
|
4794
4895
|
getProgressLogWithInfo(e) {
|
|
4795
|
-
return new L(
|
|
4896
|
+
return new L(v().getProgressLogWithInfo(this.handle, e));
|
|
4796
4897
|
}
|
|
4797
4898
|
getLogHandle() {
|
|
4798
|
-
return new L(
|
|
4899
|
+
return new L(v().getLogHandle(this.handle));
|
|
4799
4900
|
}
|
|
4800
4901
|
allFieldsResolved(e = "Input") {
|
|
4801
4902
|
switch (e) {
|
|
@@ -4819,100 +4920,99 @@
|
|
|
4819
4920
|
if (i && (r === "Input" && !this.getInputsLocked() || r === "Output" && !this.getOutputsLocked()))
|
|
4820
4921
|
return;
|
|
4821
4922
|
let l2 = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
|
|
4822
|
-
(
|
|
4923
|
+
(c2) => [c2, this.resolve({ field: c2, assertFieldType: r })]
|
|
4823
4924
|
);
|
|
4824
|
-
return o && (l2 = l2.filter((
|
|
4825
|
-
}
|
|
4826
|
-
}
|
|
4827
|
-
const
|
|
4828
|
-
const
|
|
4829
|
-
type: z$
|
|
4830
|
-
importance: z$
|
|
4831
|
-
id: z$
|
|
4832
|
-
label: z$
|
|
4833
|
-
}),
|
|
4834
|
-
function
|
|
4835
|
-
const r = /* @__PURE__ */ new Map(), i = n2.forceTraceElements !== void 0 && n2.forceTraceElements.length > 0 ? new Set(n2.forceTraceElements) : void 0, o = /* @__PURE__ */ new Map(), s2 = t.map((
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
...
|
|
4842
|
-
...
|
|
4843
|
-
...C ?? []
|
|
4925
|
+
return o && (l2 = l2.filter((c2) => c2[1] !== void 0)), l2.map(([c2, m2]) => s2(c2, m2));
|
|
4926
|
+
}
|
|
4927
|
+
}
|
|
4928
|
+
const ze = "staging", Xe = "main";
|
|
4929
|
+
const Nt = z$2.object({
|
|
4930
|
+
type: z$2.string(),
|
|
4931
|
+
importance: z$2.number().optional(),
|
|
4932
|
+
id: z$2.string().optional(),
|
|
4933
|
+
label: z$2.string()
|
|
4934
|
+
}), Ut = z$2.array(Nt), Kt = 1e-3, qt = "__LABEL__", De = "__LABEL__@1";
|
|
4935
|
+
function Qe(t, e, n2 = {}) {
|
|
4936
|
+
const r = /* @__PURE__ */ new Map(), i = n2.forceTraceElements !== void 0 && n2.forceTraceElements.length > 0 ? new Set(n2.forceTraceElements) : void 0, o = /* @__PURE__ */ new Map(), s2 = t.map((f) => {
|
|
4937
|
+
const y$1 = e(f);
|
|
4938
|
+
let p2, g2, P;
|
|
4939
|
+
"spec" in y$1 && typeof y$1.spec == "object" ? (p2 = y$1.spec, g2 = y$1.prefixTrace, P = y$1.suffixTrace) : p2 = y$1;
|
|
4940
|
+
const E2 = An(p2, y.Label), x = An(p2, y.Trace), T2 = (x ? Ut.safeParse(me$1(x)).data : void 0) ?? [], S2 = [
|
|
4941
|
+
...g2 ?? [],
|
|
4942
|
+
...T2,
|
|
4943
|
+
...P ?? []
|
|
4844
4944
|
];
|
|
4845
4945
|
if (E2 !== void 0) {
|
|
4846
|
-
const
|
|
4847
|
-
n2.addLabelAsSuffix ?
|
|
4848
|
-
}
|
|
4849
|
-
const
|
|
4850
|
-
for (let
|
|
4851
|
-
const { type:
|
|
4852
|
-
|
|
4853
|
-
const
|
|
4854
|
-
o.set(
|
|
4855
|
-
|
|
4946
|
+
const u2 = { label: E2, type: qt, importance: -2 };
|
|
4947
|
+
n2.addLabelAsSuffix ? S2.push(u2) : S2.splice(0, 0, u2);
|
|
4948
|
+
}
|
|
4949
|
+
const C2 = [], I2 = /* @__PURE__ */ new Map();
|
|
4950
|
+
for (let u2 = S2.length - 1; u2 >= 0; --u2) {
|
|
4951
|
+
const { type: b2 } = S2[u2], K = S2[u2].importance ?? 0, B = (I2.get(b2) ?? 0) + 1;
|
|
4952
|
+
I2.set(b2, B);
|
|
4953
|
+
const O = `${b2}@${B}`;
|
|
4954
|
+
o.set(O, (o.get(O) ?? 0) + 1), r.set(
|
|
4955
|
+
O,
|
|
4856
4956
|
Math.max(
|
|
4857
|
-
r.get(
|
|
4858
|
-
K - (
|
|
4957
|
+
r.get(O) ?? Number.NEGATIVE_INFINITY,
|
|
4958
|
+
K - (S2.length - u2) * Kt
|
|
4859
4959
|
)
|
|
4860
|
-
),
|
|
4960
|
+
), C2.push({ ...S2[u2], fullType: O, occurrenceIndex: B });
|
|
4861
4961
|
}
|
|
4862
|
-
return
|
|
4863
|
-
value:
|
|
4962
|
+
return C2.reverse(), {
|
|
4963
|
+
value: f,
|
|
4864
4964
|
spec: p2,
|
|
4865
4965
|
label: E2,
|
|
4866
|
-
fullTrace:
|
|
4966
|
+
fullTrace: C2
|
|
4867
4967
|
};
|
|
4868
|
-
}), a = [], l2 = [],
|
|
4869
|
-
|
|
4870
|
-
for (const [
|
|
4871
|
-
|
|
4872
|
-
const
|
|
4968
|
+
}), a = [], l2 = [], c2 = [...r];
|
|
4969
|
+
c2.sort(([, f], [, y2]) => y2 - f);
|
|
4970
|
+
for (const [f] of c2)
|
|
4971
|
+
f.endsWith("@1") || o.get(f) === t.length ? a.push(f) : l2.push(f);
|
|
4972
|
+
const m2 = (f, y2 = false) => {
|
|
4873
4973
|
const p2 = [];
|
|
4874
|
-
for (let
|
|
4875
|
-
const
|
|
4974
|
+
for (let g2 = 0; g2 < s2.length; g2++) {
|
|
4975
|
+
const P = s2[g2], E2 = P.fullTrace.filter((S2) => f.has(S2.fullType) || i && i.has(S2.type));
|
|
4876
4976
|
if (E2.length === 0)
|
|
4877
|
-
if (
|
|
4977
|
+
if (y2)
|
|
4878
4978
|
p2.push({
|
|
4879
4979
|
label: "Unlabeled",
|
|
4880
|
-
value:
|
|
4980
|
+
value: P.value
|
|
4881
4981
|
});
|
|
4882
4982
|
else return;
|
|
4883
|
-
const
|
|
4983
|
+
const x = E2.map((S2) => S2.label), T2 = n2.separator ?? " / ";
|
|
4884
4984
|
p2.push({
|
|
4885
|
-
label:
|
|
4886
|
-
value:
|
|
4985
|
+
label: x.join(T2),
|
|
4986
|
+
value: P.value
|
|
4887
4987
|
});
|
|
4888
4988
|
}
|
|
4889
4989
|
return p2;
|
|
4890
4990
|
};
|
|
4891
4991
|
if (a.length === 0) {
|
|
4892
4992
|
if (l2.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
|
|
4893
|
-
return
|
|
4894
|
-
}
|
|
4895
|
-
let
|
|
4896
|
-
for (;
|
|
4897
|
-
const
|
|
4898
|
-
n2.includeNativeLabel &&
|
|
4899
|
-
for (let p2 = 0; p2 <
|
|
4900
|
-
|
|
4901
|
-
const
|
|
4902
|
-
if (
|
|
4903
|
-
|
|
4904
|
-
}
|
|
4905
|
-
return
|
|
4906
|
-
}
|
|
4907
|
-
const ee = "PColumnData/", le = ee + "ResourceMap", ue = ee + "Partitioned/ResourceMap", H = ee + "JsonPartitioned",
|
|
4908
|
-
const
|
|
4993
|
+
return m2(new Set(De), true);
|
|
4994
|
+
}
|
|
4995
|
+
let d = 0, h = -1;
|
|
4996
|
+
for (; d < a.length; ) {
|
|
4997
|
+
const f = /* @__PURE__ */ new Set();
|
|
4998
|
+
n2.includeNativeLabel && f.add(De);
|
|
4999
|
+
for (let p2 = 0; p2 < d; ++p2) f.add(a[p2]);
|
|
5000
|
+
h >= 0 && f.add(a[h]);
|
|
5001
|
+
const y2 = m2(f);
|
|
5002
|
+
if (y2 !== void 0 && new Set(y2.map((p2) => p2.label)).size === t.length) return y2;
|
|
5003
|
+
h++, h >= a.length && (d++, h = d);
|
|
5004
|
+
}
|
|
5005
|
+
return m2(/* @__PURE__ */ new Set([...a, ...l2]), true);
|
|
5006
|
+
}
|
|
5007
|
+
const ee = "PColumnData/", le = ee + "ResourceMap", ue = ee + "Partitioned/ResourceMap", H = ee + "JsonPartitioned", $ = ee + "BinaryPartitioned", Ze = ee + "Partitioned/", ce = Ze + "JsonPartitioned", z = Ze + "BinaryPartitioned";
|
|
5008
|
+
const Se = (t) => {
|
|
4909
5009
|
if (t.endsWith(".index"))
|
|
4910
5010
|
return { baseKey: t.substring(0, t.length - 6), type: "index" };
|
|
4911
5011
|
if (t.endsWith(".values"))
|
|
4912
5012
|
return { baseKey: t.substring(0, t.length - 7), type: "values" };
|
|
4913
5013
|
throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
|
|
4914
5014
|
};
|
|
4915
|
-
function
|
|
5015
|
+
function jt(t) {
|
|
4916
5016
|
if (!t) return;
|
|
4917
5017
|
const e = t.resourceType.name, n2 = t.getDataAsJson(), r = [];
|
|
4918
5018
|
let i = 0;
|
|
@@ -4924,7 +5024,7 @@
|
|
|
4924
5024
|
i = n2.partitionKeyLength + n2.keyLength;
|
|
4925
5025
|
break;
|
|
4926
5026
|
case H:
|
|
4927
|
-
case
|
|
5027
|
+
case $:
|
|
4928
5028
|
i = n2.partitionKeyLength;
|
|
4929
5029
|
break;
|
|
4930
5030
|
case z:
|
|
@@ -4935,9 +5035,9 @@
|
|
|
4935
5035
|
switch (e) {
|
|
4936
5036
|
case le:
|
|
4937
5037
|
case H:
|
|
4938
|
-
case
|
|
5038
|
+
case $:
|
|
4939
5039
|
for (let o of t.listInputFields()) {
|
|
4940
|
-
e ===
|
|
5040
|
+
e === $ && (o = Se(o).baseKey);
|
|
4941
5041
|
const s2 = [...JSON.parse(o)];
|
|
4942
5042
|
r.push(s2);
|
|
4943
5043
|
}
|
|
@@ -4949,16 +5049,16 @@
|
|
|
4949
5049
|
const s2 = [...JSON.parse(o)], a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
4950
5050
|
if (a !== void 0)
|
|
4951
5051
|
for (let l2 of a.listInputFields()) {
|
|
4952
|
-
e === z && (l2 =
|
|
4953
|
-
const
|
|
4954
|
-
r.push(
|
|
5052
|
+
e === z && (l2 = Se(l2).baseKey);
|
|
5053
|
+
const c2 = [...s2, ...JSON.parse(l2)];
|
|
5054
|
+
r.push(c2);
|
|
4955
5055
|
}
|
|
4956
5056
|
}
|
|
4957
5057
|
break;
|
|
4958
5058
|
}
|
|
4959
5059
|
return { data: r, keyLength: i };
|
|
4960
5060
|
}
|
|
4961
|
-
function
|
|
5061
|
+
function Mt(t) {
|
|
4962
5062
|
if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
|
|
4963
5063
|
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
|
|
4964
5064
|
const { parts: e, partitionKeyLength: n2 } = t, r = [];
|
|
@@ -4977,11 +5077,11 @@
|
|
|
4977
5077
|
}
|
|
4978
5078
|
return r.map((i) => Array.from(i.values()));
|
|
4979
5079
|
}
|
|
4980
|
-
function
|
|
5080
|
+
function $t(t) {
|
|
4981
5081
|
if (t === void 0) return;
|
|
4982
|
-
if (
|
|
4983
|
-
return
|
|
4984
|
-
const e =
|
|
5082
|
+
if (ue$1(t))
|
|
5083
|
+
return Mt(t);
|
|
5084
|
+
const e = jt(t);
|
|
4985
5085
|
if (!e) return;
|
|
4986
5086
|
const { data: n2, keyLength: r } = e, i = [];
|
|
4987
5087
|
for (let o = 0; o < r; ++o)
|
|
@@ -4994,7 +5094,7 @@
|
|
|
4994
5094
|
}
|
|
4995
5095
|
return i.map((o) => Array.from(o.values()));
|
|
4996
5096
|
}
|
|
4997
|
-
function
|
|
5097
|
+
function Pe(t, e = []) {
|
|
4998
5098
|
if (t === void 0 || !t.getIsReadyOrError()) return;
|
|
4999
5099
|
const n2 = t.resourceType.name, r = t.getDataAsJson();
|
|
5000
5100
|
if (e.length > 0 && (n2 === ce || n2 === z))
|
|
@@ -5019,15 +5119,15 @@
|
|
|
5019
5119
|
parts: i
|
|
5020
5120
|
};
|
|
5021
5121
|
}
|
|
5022
|
-
case
|
|
5122
|
+
case $: {
|
|
5023
5123
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
5024
5124
|
throw new Error(`Missing partitionKeyLength in metadata for ${n2}`);
|
|
5025
5125
|
const i = [], o = /* @__PURE__ */ new Map();
|
|
5026
5126
|
for (const s2 of t.listInputFields()) {
|
|
5027
|
-
const a =
|
|
5127
|
+
const a = Se(s2), l2 = t.resolve({ field: s2, assertFieldType: "Input" });
|
|
5028
5128
|
if (l2 === void 0) return;
|
|
5029
|
-
let
|
|
5030
|
-
|
|
5129
|
+
let c2 = o.get(a.baseKey);
|
|
5130
|
+
c2 || (c2 = {}, o.set(a.baseKey, c2)), a.type === "index" ? c2.index = l2 : c2.values = l2;
|
|
5031
5131
|
}
|
|
5032
5132
|
for (const [s2, a] of o.entries()) {
|
|
5033
5133
|
if (!a.index || !a.values) return;
|
|
@@ -5055,7 +5155,7 @@
|
|
|
5055
5155
|
if (a === void 0) return;
|
|
5056
5156
|
if (a.resourceType.name !== H)
|
|
5057
5157
|
throw new Error(`Expected ${H} inside ${n2}, but got ${a.resourceType.name}`);
|
|
5058
|
-
const l2 =
|
|
5158
|
+
const l2 = Pe(a, JSON.parse(s2));
|
|
5059
5159
|
if (l2 === void 0) return;
|
|
5060
5160
|
if (l2.type !== "JsonPartitioned")
|
|
5061
5161
|
throw new Error(`Unexpected inner result type for ${n2}: ${l2.type}`);
|
|
@@ -5074,9 +5174,9 @@
|
|
|
5074
5174
|
for (const s2 of t.listInputFields()) {
|
|
5075
5175
|
const a = t.resolve({ field: s2, assertFieldType: "Input" });
|
|
5076
5176
|
if (a === void 0) return;
|
|
5077
|
-
if (a.resourceType.name !==
|
|
5078
|
-
throw new Error(`Expected ${
|
|
5079
|
-
const l2 =
|
|
5177
|
+
if (a.resourceType.name !== $)
|
|
5178
|
+
throw new Error(`Expected ${$} inside ${n2}, but got ${a.resourceType.name}`);
|
|
5179
|
+
const l2 = Pe(a, JSON.parse(s2));
|
|
5080
5180
|
if (l2 === void 0) return;
|
|
5081
5181
|
if (l2.type !== "BinaryPartitioned")
|
|
5082
5182
|
throw new Error(`Unexpected inner result type for ${n2}: ${l2.type}`);
|
|
@@ -5092,15 +5192,15 @@
|
|
|
5092
5192
|
throw new Error(`Unknown resource type: ${n2}`);
|
|
5093
5193
|
}
|
|
5094
5194
|
}
|
|
5095
|
-
function
|
|
5195
|
+
function Jt(t) {
|
|
5096
5196
|
if (t !== void 0) {
|
|
5097
|
-
if (
|
|
5098
|
-
if (
|
|
5099
|
-
if (t instanceof
|
|
5197
|
+
if (ue$1(t)) return t;
|
|
5198
|
+
if (Qe$1(t)) return en$1(t);
|
|
5199
|
+
if (t instanceof k) return Pe(t);
|
|
5100
5200
|
throw new Error(`Unexpected input type: ${typeof t}`);
|
|
5101
5201
|
}
|
|
5102
5202
|
}
|
|
5103
|
-
function
|
|
5203
|
+
function Bt(t, e) {
|
|
5104
5204
|
const n2 = [...e].sort((s2, a) => a[0] - s2[0]), { type: r } = t;
|
|
5105
5205
|
switch (r) {
|
|
5106
5206
|
case "Json": {
|
|
@@ -5172,45 +5272,45 @@
|
|
|
5172
5272
|
};
|
|
5173
5273
|
}
|
|
5174
5274
|
}
|
|
5175
|
-
function
|
|
5275
|
+
function Wt(t) {
|
|
5176
5276
|
if (!Array.isArray(t)) return false;
|
|
5177
5277
|
if (t.length === 0) return true;
|
|
5178
5278
|
const e = t[0];
|
|
5179
5279
|
return typeof e == "object" && e !== null && "key" in e && "val" in e;
|
|
5180
5280
|
}
|
|
5181
|
-
class
|
|
5281
|
+
class Gt {
|
|
5182
5282
|
constructor(e) {
|
|
5183
5283
|
this.columns = e;
|
|
5184
5284
|
}
|
|
5185
5285
|
selectColumns(e) {
|
|
5186
|
-
const n2 = typeof e == "function" ? e :
|
|
5286
|
+
const n2 = typeof e == "function" ? e : Un(e);
|
|
5187
5287
|
return this.columns.filter((r) => n2(r.spec));
|
|
5188
5288
|
}
|
|
5189
5289
|
}
|
|
5190
|
-
function
|
|
5290
|
+
function Ht(t) {
|
|
5191
5291
|
if (t)
|
|
5192
5292
|
return t.map((e) => ({
|
|
5193
|
-
type: `split:${
|
|
5293
|
+
type: `split:${On(e.axisId)}`,
|
|
5194
5294
|
label: e.label,
|
|
5195
5295
|
importance: 1e6
|
|
5196
5296
|
// High importance for split filters in labels
|
|
5197
5297
|
}));
|
|
5198
5298
|
}
|
|
5199
|
-
function
|
|
5299
|
+
function zt(t) {
|
|
5200
5300
|
if (t)
|
|
5201
5301
|
return t.map((e) => [e.axisIdx, e.value]);
|
|
5202
5302
|
}
|
|
5203
|
-
function
|
|
5303
|
+
function Xt(t, e) {
|
|
5204
5304
|
if (!e || e.length === 0) return t;
|
|
5205
5305
|
const n2 = [...e].sort((r, i) => r[0] - i[0]);
|
|
5206
|
-
return
|
|
5306
|
+
return We({ id: t, axisFilters: n2 });
|
|
5207
5307
|
}
|
|
5208
|
-
function
|
|
5308
|
+
function Oe(t) {
|
|
5209
5309
|
if (!t || typeof t != "object") return false;
|
|
5210
5310
|
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);
|
|
5211
5311
|
return !!e.domainAnchor || n2 || r;
|
|
5212
5312
|
}
|
|
5213
|
-
function
|
|
5313
|
+
function Yt(t) {
|
|
5214
5314
|
if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
|
|
5215
5315
|
return [];
|
|
5216
5316
|
const e = t.axes.map((n2, r) => typeof n2 == "object" && "split" in n2 && n2.split === true ? r : -1).filter((n2) => n2 !== -1);
|
|
@@ -5221,7 +5321,7 @@
|
|
|
5221
5321
|
class Q {
|
|
5222
5322
|
constructor() {
|
|
5223
5323
|
V(this, "defaultProviderStore", []);
|
|
5224
|
-
V(this, "providers", [new
|
|
5324
|
+
V(this, "providers", [new Gt(this.defaultProviderStore)]);
|
|
5225
5325
|
V(this, "axisLabelProviders", []);
|
|
5226
5326
|
}
|
|
5227
5327
|
addColumnProvider(e) {
|
|
@@ -5248,131 +5348,131 @@
|
|
|
5248
5348
|
...s2 && (i == null ? void 0 : i.includeNativeLabel) !== false ? { includeNativeLabel: true } : {},
|
|
5249
5349
|
...i ?? {}
|
|
5250
5350
|
};
|
|
5251
|
-
let
|
|
5351
|
+
let c2 = () => false;
|
|
5252
5352
|
if (a) {
|
|
5253
|
-
const p2 = (Array.isArray(a) ? a : [a]).map((
|
|
5254
|
-
if (
|
|
5353
|
+
const p2 = (Array.isArray(a) ? a : [a]).map((g2) => {
|
|
5354
|
+
if (Oe(g2)) {
|
|
5255
5355
|
if (!r)
|
|
5256
5356
|
throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
|
|
5257
|
-
return
|
|
5357
|
+
return Un(Rn(r.anchors, g2, n2));
|
|
5258
5358
|
} else
|
|
5259
|
-
return
|
|
5359
|
+
return Un(g2);
|
|
5260
5360
|
});
|
|
5261
|
-
|
|
5361
|
+
c2 = (g2) => p2.some((P) => P(g2));
|
|
5262
5362
|
}
|
|
5263
|
-
const
|
|
5264
|
-
for (const p2 of
|
|
5265
|
-
const
|
|
5266
|
-
let
|
|
5267
|
-
if (
|
|
5363
|
+
const m2 = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], d = [], h = /* @__PURE__ */ new Set();
|
|
5364
|
+
for (const p2 of m2) {
|
|
5365
|
+
const g2 = Oe(p2);
|
|
5366
|
+
let P;
|
|
5367
|
+
if (g2) {
|
|
5268
5368
|
if (!r)
|
|
5269
5369
|
throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
|
|
5270
|
-
|
|
5370
|
+
P = Rn(r.anchors, p2, n2);
|
|
5271
5371
|
} else
|
|
5272
|
-
|
|
5273
|
-
const E2 = /* @__PURE__ */ new Set(),
|
|
5274
|
-
for (const
|
|
5275
|
-
const
|
|
5276
|
-
for (const
|
|
5277
|
-
if (u2
|
|
5278
|
-
if (E2.has(
|
|
5279
|
-
throw new Error(`Duplicate column id ${
|
|
5280
|
-
const
|
|
5281
|
-
|
|
5372
|
+
P = p2;
|
|
5373
|
+
const E2 = /* @__PURE__ */ new Set(), x = [];
|
|
5374
|
+
for (const C2 of this.providers) {
|
|
5375
|
+
const I2 = C2.selectColumns(P);
|
|
5376
|
+
for (const u2 of I2) {
|
|
5377
|
+
if (c2(u2.spec)) continue;
|
|
5378
|
+
if (E2.has(u2.id))
|
|
5379
|
+
throw new Error(`Duplicate column id ${u2.id} in provider ${C2.constructor.name}`);
|
|
5380
|
+
const b2 = qn(u2.spec);
|
|
5381
|
+
h.has(b2) || (E2.add(u2.id), h.add(b2), x.push(u2));
|
|
5282
5382
|
}
|
|
5283
5383
|
}
|
|
5284
|
-
if (
|
|
5285
|
-
const
|
|
5286
|
-
for (const
|
|
5287
|
-
if (!
|
|
5288
|
-
const
|
|
5289
|
-
if (
|
|
5290
|
-
if (
|
|
5291
|
-
throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${
|
|
5292
|
-
const
|
|
5293
|
-
if (!
|
|
5384
|
+
if (x.length === 0) continue;
|
|
5385
|
+
const T2 = Yt(p2), S2 = T2.length > 0;
|
|
5386
|
+
for (const C2 of x) {
|
|
5387
|
+
if (!w$1(C2.spec)) continue;
|
|
5388
|
+
const I2 = C2.spec;
|
|
5389
|
+
if (S2) {
|
|
5390
|
+
if (Wt(C2.data))
|
|
5391
|
+
throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${C2.id}`);
|
|
5392
|
+
const u2 = Jt(C2.data);
|
|
5393
|
+
if (!u2) {
|
|
5294
5394
|
if (o) continue;
|
|
5295
5395
|
return;
|
|
5296
5396
|
}
|
|
5297
|
-
if (!
|
|
5298
|
-
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${
|
|
5299
|
-
const
|
|
5300
|
-
if (
|
|
5301
|
-
throw new Error(`Not enough partition keys (${
|
|
5302
|
-
const
|
|
5303
|
-
if (
|
|
5304
|
-
if (
|
|
5397
|
+
if (!Ze$1(u2))
|
|
5398
|
+
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${u2.type} for column ${C2.id}`);
|
|
5399
|
+
const b2 = $t(u2), K = T2[T2.length - 1];
|
|
5400
|
+
if (K >= u2.partitionKeyLength)
|
|
5401
|
+
throw new Error(`Not enough partition keys (${u2.partitionKeyLength}) for requested split axes (max index ${K}) in column ${I2.name}`);
|
|
5402
|
+
const B = T2.map((_) => this.findLabels(p$1(I2.axesSpec[_]))), O = [], _e = (_, W2) => {
|
|
5403
|
+
if (W2 >= T2.length) {
|
|
5404
|
+
if (O.push([..._]), O.length > 1e4)
|
|
5305
5405
|
throw new Error("Too many key combinations, aborting.");
|
|
5306
5406
|
return;
|
|
5307
5407
|
}
|
|
5308
|
-
const
|
|
5309
|
-
if (
|
|
5310
|
-
throw new Error(`Axis index ${
|
|
5311
|
-
const
|
|
5312
|
-
if (!
|
|
5313
|
-
|
|
5408
|
+
const q = T2[W2];
|
|
5409
|
+
if (q >= b2.length)
|
|
5410
|
+
throw new Error(`Axis index ${q} out of bounds for unique keys array (length ${b2.length}) during split key generation for column ${C2.id}`);
|
|
5411
|
+
const j2 = b2[q];
|
|
5412
|
+
if (!j2 || j2.length === 0) {
|
|
5413
|
+
O.length = 0;
|
|
5314
5414
|
return;
|
|
5315
5415
|
}
|
|
5316
|
-
for (const
|
|
5317
|
-
_.push(
|
|
5416
|
+
for (const te2 of j2)
|
|
5417
|
+
_.push(te2), _e(_, W2 + 1), _.pop();
|
|
5318
5418
|
};
|
|
5319
|
-
if (
|
|
5419
|
+
if (_e([], 0), O.length === 0)
|
|
5320
5420
|
continue;
|
|
5321
|
-
const
|
|
5322
|
-
for (let _ =
|
|
5323
|
-
|
|
5324
|
-
const
|
|
5325
|
-
for (const _ of
|
|
5326
|
-
const
|
|
5327
|
-
const
|
|
5328
|
-
return { axisIdx:
|
|
5421
|
+
const Le = [...I2.axesSpec], rt = T2.map((_) => _);
|
|
5422
|
+
for (let _ = T2.length - 1; _ >= 0; _--)
|
|
5423
|
+
Le.splice(T2[_], 1);
|
|
5424
|
+
const it = { ...I2, axesSpec: Le };
|
|
5425
|
+
for (const _ of O) {
|
|
5426
|
+
const W2 = _.map((q, j2) => {
|
|
5427
|
+
const te2 = rt[j2], ot = p$1(I2.axesSpec[te2]), fe = B[j2], st = (fe == null ? void 0 : fe[q]) ?? String(q);
|
|
5428
|
+
return { axisIdx: te2, axisId: ot, value: q, label: st };
|
|
5329
5429
|
});
|
|
5330
|
-
|
|
5430
|
+
d.push({
|
|
5331
5431
|
type: "split",
|
|
5332
|
-
originalColumn:
|
|
5333
|
-
spec:
|
|
5334
|
-
adjustedSpec:
|
|
5335
|
-
dataEntries:
|
|
5336
|
-
axisFilters:
|
|
5432
|
+
originalColumn: C2,
|
|
5433
|
+
spec: I2,
|
|
5434
|
+
adjustedSpec: it,
|
|
5435
|
+
dataEntries: u2,
|
|
5436
|
+
axisFilters: W2
|
|
5337
5437
|
});
|
|
5338
5438
|
}
|
|
5339
5439
|
} else
|
|
5340
|
-
|
|
5440
|
+
d.push({
|
|
5341
5441
|
type: "direct",
|
|
5342
|
-
originalColumn:
|
|
5343
|
-
spec:
|
|
5344
|
-
adjustedSpec:
|
|
5442
|
+
originalColumn: C2,
|
|
5443
|
+
spec: I2,
|
|
5444
|
+
adjustedSpec: I2
|
|
5345
5445
|
});
|
|
5346
5446
|
}
|
|
5347
5447
|
}
|
|
5348
|
-
if (
|
|
5349
|
-
const
|
|
5350
|
-
|
|
5448
|
+
if (d.length === 0) return [];
|
|
5449
|
+
const f = Qe(
|
|
5450
|
+
d,
|
|
5351
5451
|
(p2) => ({
|
|
5352
5452
|
spec: p2.spec,
|
|
5353
|
-
suffixTrace: p2.type === "split" ?
|
|
5453
|
+
suffixTrace: p2.type === "split" ? Ht(p2.axisFilters) : void 0
|
|
5354
5454
|
}),
|
|
5355
5455
|
l2
|
|
5356
|
-
), y = [];
|
|
5357
|
-
for (const { value: p2, label:
|
|
5358
|
-
const { originalColumn:
|
|
5359
|
-
let
|
|
5360
|
-
r ?
|
|
5361
|
-
let
|
|
5362
|
-
s2 && (
|
|
5363
|
-
...
|
|
5456
|
+
), y$1 = [];
|
|
5457
|
+
for (const { value: p2, label: g2 } of f) {
|
|
5458
|
+
const { originalColumn: P, spec: E2 } = p2, x = p2.type === "split" ? p2.axisFilters : void 0, T2 = zt(x);
|
|
5459
|
+
let S2;
|
|
5460
|
+
r ? S2 = r.deriveS(E2, T2) : S2 = Xt(P.id, T2);
|
|
5461
|
+
let C2 = { ...p2.adjustedSpec };
|
|
5462
|
+
s2 && (C2 = {
|
|
5463
|
+
...C2,
|
|
5364
5464
|
annotations: {
|
|
5365
|
-
...
|
|
5366
|
-
|
|
5465
|
+
...C2.annotations ?? {},
|
|
5466
|
+
[y.Label]: g2
|
|
5367
5467
|
}
|
|
5368
|
-
}), y.push({
|
|
5369
|
-
id:
|
|
5370
|
-
spec:
|
|
5371
|
-
data: () => p2.type === "split" ?
|
|
5372
|
-
label:
|
|
5468
|
+
}), y$1.push({
|
|
5469
|
+
id: S2,
|
|
5470
|
+
spec: C2,
|
|
5471
|
+
data: () => p2.type === "split" ? nn$1(Bt(p2.dataEntries, T2)) : p2.originalColumn.data,
|
|
5472
|
+
label: g2
|
|
5373
5473
|
});
|
|
5374
5474
|
}
|
|
5375
|
-
return y;
|
|
5475
|
+
return y$1;
|
|
5376
5476
|
}
|
|
5377
5477
|
getColumns(e, n2) {
|
|
5378
5478
|
const r = this.getUniversalEntries(e, {
|
|
@@ -5397,7 +5497,7 @@
|
|
|
5397
5497
|
return i;
|
|
5398
5498
|
}
|
|
5399
5499
|
}
|
|
5400
|
-
function
|
|
5500
|
+
function Ae(t) {
|
|
5401
5501
|
const e = (i) => i.operator !== "InSet" ? i : {
|
|
5402
5502
|
operator: "Or",
|
|
5403
5503
|
operands: i.references.map((o) => ({
|
|
@@ -5430,19 +5530,19 @@
|
|
|
5430
5530
|
});
|
|
5431
5531
|
return t.map((i) => r(i, e));
|
|
5432
5532
|
}
|
|
5433
|
-
function
|
|
5533
|
+
function ye(t, e) {
|
|
5434
5534
|
if (t === void 0) return e === void 0;
|
|
5435
5535
|
if (e === void 0) return true;
|
|
5436
5536
|
for (const n2 in e)
|
|
5437
5537
|
if (t[n2] !== e[n2]) return false;
|
|
5438
5538
|
return true;
|
|
5439
5539
|
}
|
|
5440
|
-
function
|
|
5441
|
-
return
|
|
5540
|
+
function Re(t) {
|
|
5541
|
+
return Mn(t, (e) => e instanceof k ? e.handle : Qe$1(e) ? Xe$1(e, (n2) => n2.handle) : e);
|
|
5442
5542
|
}
|
|
5443
|
-
class
|
|
5543
|
+
class Qt {
|
|
5444
5544
|
constructor() {
|
|
5445
|
-
V(this, "ctx",
|
|
5545
|
+
V(this, "ctx", v());
|
|
5446
5546
|
}
|
|
5447
5547
|
/**
|
|
5448
5548
|
* @deprecated use getOptions()
|
|
@@ -5451,28 +5551,28 @@
|
|
|
5451
5551
|
return this.ctx.calculateOptions(e);
|
|
5452
5552
|
}
|
|
5453
5553
|
getOptions(e, n2) {
|
|
5454
|
-
const r = typeof e == "function" ? e :
|
|
5554
|
+
const r = typeof e == "function" ? e : Un(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
|
|
5455
5555
|
let o = {}, s2 = false;
|
|
5456
|
-
return typeof n2 < "u" && (typeof n2 == "function" ? o = n2 : typeof n2 == "object" && ("includeNativeLabel" in n2 || "separator" in n2 || "addLabelAsSuffix" in n2 ? o = n2 : (n2 = n2, o = n2.label ?? {}, s2 = n2.refsWithEnrichments ?? false))), typeof o == "object" ?
|
|
5457
|
-
ref:
|
|
5556
|
+
return typeof n2 < "u" && (typeof n2 == "function" ? o = n2 : typeof n2 == "object" && ("includeNativeLabel" in n2 || "separator" in n2 || "addLabelAsSuffix" in n2 ? o = n2 : (n2 = n2, o = n2.label ?? {}, s2 = n2.refsWithEnrichments ?? false))), typeof o == "object" ? Qe(i, (a) => a.obj, o ?? {}).map(({ value: { ref: a }, label: l2 }) => ({
|
|
5557
|
+
ref: Gn(a, s2),
|
|
5458
5558
|
label: l2
|
|
5459
5559
|
})) : i.map(({ ref: a, obj: l2 }) => ({
|
|
5460
|
-
ref:
|
|
5560
|
+
ref: Gn(a, s2),
|
|
5461
5561
|
label: o(l2, a)
|
|
5462
5562
|
}));
|
|
5463
5563
|
}
|
|
5464
5564
|
resolveAnchorCtx(e) {
|
|
5465
|
-
if (e instanceof
|
|
5565
|
+
if (e instanceof Nn) return e;
|
|
5466
5566
|
const n2 = {};
|
|
5467
5567
|
for (const [r, i] of Object.entries(e))
|
|
5468
|
-
if (
|
|
5568
|
+
if (Hn(i)) {
|
|
5469
5569
|
const o = this.getPColumnSpecByRef(i);
|
|
5470
5570
|
if (!o)
|
|
5471
5571
|
return;
|
|
5472
5572
|
n2[r] = o;
|
|
5473
5573
|
} else
|
|
5474
5574
|
n2[r] = i;
|
|
5475
|
-
return new
|
|
5575
|
+
return new Nn(n2);
|
|
5476
5576
|
}
|
|
5477
5577
|
/**
|
|
5478
5578
|
* Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
|
|
@@ -5546,7 +5646,7 @@
|
|
|
5546
5646
|
ref: n2.ref,
|
|
5547
5647
|
obj: {
|
|
5548
5648
|
...n2.obj,
|
|
5549
|
-
data: new
|
|
5649
|
+
data: new k(n2.obj.data, [n2.ref.blockId, n2.ref.name])
|
|
5550
5650
|
}
|
|
5551
5651
|
}))
|
|
5552
5652
|
};
|
|
@@ -5565,9 +5665,9 @@
|
|
|
5565
5665
|
ref: n2.ref,
|
|
5566
5666
|
obj: {
|
|
5567
5667
|
...n2.obj,
|
|
5568
|
-
data:
|
|
5668
|
+
data: Xn$1(
|
|
5569
5669
|
n2.obj.data,
|
|
5570
|
-
(r) => new
|
|
5670
|
+
(r) => new k(r, [n2.ref.blockId, n2.ref.name])
|
|
5571
5671
|
)
|
|
5572
5672
|
}
|
|
5573
5673
|
}))
|
|
@@ -5594,9 +5694,9 @@
|
|
|
5594
5694
|
)) == null ? void 0 : r.obj;
|
|
5595
5695
|
const n2 = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
|
|
5596
5696
|
if (n2)
|
|
5597
|
-
return
|
|
5697
|
+
return Mn(
|
|
5598
5698
|
n2,
|
|
5599
|
-
(i) => new
|
|
5699
|
+
(i) => new k(i, [e.blockId, e.name])
|
|
5600
5700
|
);
|
|
5601
5701
|
}
|
|
5602
5702
|
/**
|
|
@@ -5607,7 +5707,7 @@
|
|
|
5607
5707
|
getPColumnByRef(e) {
|
|
5608
5708
|
const n2 = this.getDataByRef(e);
|
|
5609
5709
|
if (n2)
|
|
5610
|
-
return
|
|
5710
|
+
return Vn(n2);
|
|
5611
5711
|
}
|
|
5612
5712
|
/**
|
|
5613
5713
|
* Returns spec associated with the ref ensuring that it is a p-column spec.
|
|
@@ -5617,7 +5717,7 @@
|
|
|
5617
5717
|
getPColumnSpecByRef(e) {
|
|
5618
5718
|
const n2 = this.getSpecByRef(e);
|
|
5619
5719
|
if (n2) {
|
|
5620
|
-
if (!
|
|
5720
|
+
if (!w$1(n2)) throw new Error(`not a PColumn spec (kind = ${n2.kind})`);
|
|
5621
5721
|
return n2;
|
|
5622
5722
|
}
|
|
5623
5723
|
}
|
|
@@ -5636,13 +5736,13 @@
|
|
|
5636
5736
|
findDataWithCompatibleSpec(e) {
|
|
5637
5737
|
const n2 = [];
|
|
5638
5738
|
e: for (const r of this.getData().entries) {
|
|
5639
|
-
if (!
|
|
5739
|
+
if (!w$1(r.obj.spec))
|
|
5640
5740
|
continue;
|
|
5641
5741
|
const i = r.obj.spec;
|
|
5642
|
-
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length &&
|
|
5742
|
+
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && ye(e.domain, i.domain)) {
|
|
5643
5743
|
for (let o = 0; o < e.axesSpec.length; ++o) {
|
|
5644
5744
|
const s2 = e.axesSpec[o], a = i.axesSpec[o];
|
|
5645
|
-
if (s2.name !== a.name || s2.type !== a.type || !
|
|
5745
|
+
if (s2.name !== a.name || s2.type !== a.type || !ye(s2.domain, a.domain))
|
|
5646
5746
|
continue e;
|
|
5647
5747
|
}
|
|
5648
5748
|
n2.push(r.obj);
|
|
@@ -5657,9 +5757,9 @@
|
|
|
5657
5757
|
findLabels(e) {
|
|
5658
5758
|
const n2 = this.getData();
|
|
5659
5759
|
for (const r of n2.entries) {
|
|
5660
|
-
if (!
|
|
5760
|
+
if (!Fe$1(r.obj)) continue;
|
|
5661
5761
|
const i = r.obj.spec;
|
|
5662
|
-
if (i.name ===
|
|
5762
|
+
if (i.name === Pn.Label && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && ye(e.domain, i.axesSpec[0].domain)) {
|
|
5663
5763
|
if (r.obj.data.resourceType.name !== "PColumnData/Json")
|
|
5664
5764
|
throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
|
|
5665
5765
|
return Object.fromEntries(
|
|
@@ -5678,17 +5778,17 @@
|
|
|
5678
5778
|
* @returns An array of PColumn objects matching the selectors. Data is loaded on first access.
|
|
5679
5779
|
*/
|
|
5680
5780
|
selectColumns(e) {
|
|
5681
|
-
const n2 = typeof e == "function" ? e :
|
|
5682
|
-
return this.getSpecs().entries.filter(({ obj: i }) =>
|
|
5781
|
+
const n2 = typeof e == "function" ? e : Un(e);
|
|
5782
|
+
return this.getSpecs().entries.filter(({ obj: i }) => w$1(i) ? n2(i) : false).map(({ ref: i, obj: o }) => {
|
|
5683
5783
|
const s2 = o;
|
|
5684
5784
|
let a = null;
|
|
5685
5785
|
const l2 = this;
|
|
5686
5786
|
return {
|
|
5687
|
-
id:
|
|
5787
|
+
id: We(i),
|
|
5688
5788
|
spec: s2,
|
|
5689
5789
|
get data() {
|
|
5690
|
-
var
|
|
5691
|
-
return a !== null || (a = (
|
|
5790
|
+
var c2;
|
|
5791
|
+
return a !== null || (a = (c2 = l2.getPColumnByRef(i)) == null ? void 0 : c2.data), a;
|
|
5692
5792
|
}
|
|
5693
5793
|
};
|
|
5694
5794
|
});
|
|
@@ -5698,13 +5798,12 @@
|
|
|
5698
5798
|
* @returns a map of axis value => label
|
|
5699
5799
|
*/
|
|
5700
5800
|
findLabelsForColumnAxis(e, n2) {
|
|
5701
|
-
var o;
|
|
5702
5801
|
const r = this.findLabels(e.axesSpec[n2]);
|
|
5703
5802
|
if (!r) return;
|
|
5704
|
-
const i = (
|
|
5803
|
+
const i = An(e, `pl7.app/axisKeys/${n2}`);
|
|
5705
5804
|
if (i !== void 0) {
|
|
5706
|
-
const
|
|
5707
|
-
return Object.fromEntries(
|
|
5805
|
+
const o = JSON.parse(i);
|
|
5806
|
+
return Object.fromEntries(o.map((s2) => [s2, r[s2] ?? "Unlabelled"]));
|
|
5708
5807
|
} else
|
|
5709
5808
|
return r;
|
|
5710
5809
|
}
|
|
@@ -5715,8 +5814,8 @@
|
|
|
5715
5814
|
V(this, "_argsCache");
|
|
5716
5815
|
V(this, "_uiStateCache");
|
|
5717
5816
|
V(this, "_activeArgsCache");
|
|
5718
|
-
V(this, "resultPool", new
|
|
5719
|
-
this.ctx =
|
|
5817
|
+
V(this, "resultPool", new Qt());
|
|
5818
|
+
this.ctx = v();
|
|
5720
5819
|
}
|
|
5721
5820
|
get args() {
|
|
5722
5821
|
if (this._argsCache === void 0) {
|
|
@@ -5750,16 +5849,16 @@
|
|
|
5750
5849
|
// return this.ctx.featureFlags;
|
|
5751
5850
|
// }
|
|
5752
5851
|
getNamedAccessor(e) {
|
|
5753
|
-
return
|
|
5852
|
+
return Ce(
|
|
5754
5853
|
this.ctx.getAccessorHandleByName(e),
|
|
5755
|
-
(n2) => new
|
|
5854
|
+
(n2) => new k(n2, [e])
|
|
5756
5855
|
);
|
|
5757
5856
|
}
|
|
5758
5857
|
get prerun() {
|
|
5759
|
-
return this.getNamedAccessor(
|
|
5858
|
+
return this.getNamedAccessor(ze);
|
|
5760
5859
|
}
|
|
5761
5860
|
get outputs() {
|
|
5762
|
-
return this.getNamedAccessor(
|
|
5861
|
+
return this.getNamedAccessor(Xe);
|
|
5763
5862
|
}
|
|
5764
5863
|
/**
|
|
5765
5864
|
* Find labels data for a given axis id. It will search for a label column and return its data as a map.
|
|
@@ -5771,7 +5870,7 @@
|
|
|
5771
5870
|
}
|
|
5772
5871
|
verifyInlineAndExplicitColumnsSupport(e) {
|
|
5773
5872
|
var i;
|
|
5774
|
-
const n2 = e.some((o) => !(o.data instanceof
|
|
5873
|
+
const n2 = e.some((o) => !(o.data instanceof k) || Qe$1(o.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
|
|
5775
5874
|
if (n2 && !r) throw Error("Inline or explicit columns not supported");
|
|
5776
5875
|
}
|
|
5777
5876
|
patchPTableDef(e) {
|
|
@@ -5782,14 +5881,14 @@
|
|
|
5782
5881
|
filters: [...e.partitionFilters, ...e.filters]
|
|
5783
5882
|
}), (r = this.ctx.featureFlags) != null && r.pFrameInSetFilterSupport || (e = {
|
|
5784
5883
|
...e,
|
|
5785
|
-
partitionFilters:
|
|
5786
|
-
filters:
|
|
5884
|
+
partitionFilters: Ae(e.partitionFilters),
|
|
5885
|
+
filters: Ae(e.filters)
|
|
5787
5886
|
}), e;
|
|
5788
5887
|
}
|
|
5789
5888
|
// TODO remove all non-PColumn fields
|
|
5790
5889
|
createPFrame(e) {
|
|
5791
5890
|
return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
|
|
5792
|
-
e.map((n2) =>
|
|
5891
|
+
e.map((n2) => Re(n2))
|
|
5793
5892
|
);
|
|
5794
5893
|
}
|
|
5795
5894
|
createPTable(e) {
|
|
@@ -5802,8 +5901,8 @@
|
|
|
5802
5901
|
partitionFilters: e.filters ?? [],
|
|
5803
5902
|
filters: [],
|
|
5804
5903
|
sorting: e.sorting ?? []
|
|
5805
|
-
}) : n2 = this.patchPTableDef(e), this.verifyInlineAndExplicitColumnsSupport(
|
|
5806
|
-
|
|
5904
|
+
}) : n2 = this.patchPTableDef(e), this.verifyInlineAndExplicitColumnsSupport(Bn(n2.src)), this.ctx.createPTable(
|
|
5905
|
+
In(n2, (r) => Re(r))
|
|
5807
5906
|
);
|
|
5808
5907
|
}
|
|
5809
5908
|
/** @deprecated scheduled for removal from SDK */
|
|
@@ -5823,20 +5922,20 @@
|
|
|
5823
5922
|
this.ctx.logError(e);
|
|
5824
5923
|
}
|
|
5825
5924
|
}
|
|
5826
|
-
const
|
|
5827
|
-
function
|
|
5925
|
+
const Zt = "1.42.16", X = Zt;
|
|
5926
|
+
function en(t) {
|
|
5828
5927
|
return t.__renderLambda === true;
|
|
5829
5928
|
}
|
|
5830
|
-
function
|
|
5929
|
+
function ge(t) {
|
|
5831
5930
|
if (t !== void 0)
|
|
5832
|
-
return
|
|
5931
|
+
return en(t) ? t.handle : t;
|
|
5833
5932
|
}
|
|
5834
|
-
const
|
|
5835
|
-
constructor(e, n2, r, i, o, s2, a, l2,
|
|
5836
|
-
this._renderingMode = e, this._initialArgs = n2, this._initialUiState = r, this._outputs = i, this._inputsValid = o, this._sections = s2, this._title = a, this._enrichmentTargets = l2, this._featureFlags =
|
|
5933
|
+
const w = class w2 {
|
|
5934
|
+
constructor(e, n2, r, i, o, s2, a, l2, c2) {
|
|
5935
|
+
this._renderingMode = e, this._initialArgs = n2, this._initialUiState = r, this._outputs = i, this._inputsValid = o, this._sections = s2, this._title = a, this._enrichmentTargets = l2, this._featureFlags = c2;
|
|
5837
5936
|
}
|
|
5838
5937
|
static create(e = "Heavy") {
|
|
5839
|
-
return new
|
|
5938
|
+
return new w2(
|
|
5840
5939
|
e,
|
|
5841
5940
|
void 0,
|
|
5842
5941
|
{},
|
|
@@ -5845,13 +5944,13 @@
|
|
|
5845
5944
|
se([]),
|
|
5846
5945
|
void 0,
|
|
5847
5946
|
void 0,
|
|
5848
|
-
{ ...
|
|
5947
|
+
{ ...w2.INITIAL_BLOCK_FEATURE_FLAGS }
|
|
5849
5948
|
);
|
|
5850
5949
|
}
|
|
5851
5950
|
output(e, n2, r = {}) {
|
|
5852
5951
|
if (typeof n2 == "function") {
|
|
5853
5952
|
const i = `output#${e}`;
|
|
5854
|
-
return G(i, () => n2(new ne())), new
|
|
5953
|
+
return G(i, () => n2(new ne())), new w2(
|
|
5855
5954
|
this._renderingMode,
|
|
5856
5955
|
this._initialArgs,
|
|
5857
5956
|
this._initialUiState,
|
|
@@ -5870,7 +5969,7 @@
|
|
|
5870
5969
|
this._featureFlags
|
|
5871
5970
|
);
|
|
5872
5971
|
} else
|
|
5873
|
-
return new
|
|
5972
|
+
return new w2(
|
|
5874
5973
|
this._renderingMode,
|
|
5875
5974
|
this._initialArgs,
|
|
5876
5975
|
this._initialUiState,
|
|
@@ -5890,7 +5989,7 @@
|
|
|
5890
5989
|
return this.output(e, n2, { retentive: true });
|
|
5891
5990
|
}
|
|
5892
5991
|
argsValid(e) {
|
|
5893
|
-
return typeof e == "function" ? (G("inputsValid", () => e(new ne())), new
|
|
5992
|
+
return typeof e == "function" ? (G("inputsValid", () => e(new ne())), new w2(
|
|
5894
5993
|
this._renderingMode,
|
|
5895
5994
|
this._initialArgs,
|
|
5896
5995
|
this._initialUiState,
|
|
@@ -5903,7 +6002,7 @@
|
|
|
5903
6002
|
this._title,
|
|
5904
6003
|
this._enrichmentTargets,
|
|
5905
6004
|
this._featureFlags
|
|
5906
|
-
)) : new
|
|
6005
|
+
)) : new w2(
|
|
5907
6006
|
this._renderingMode,
|
|
5908
6007
|
this._initialArgs,
|
|
5909
6008
|
this._initialUiState,
|
|
@@ -5916,7 +6015,7 @@
|
|
|
5916
6015
|
);
|
|
5917
6016
|
}
|
|
5918
6017
|
sections(e) {
|
|
5919
|
-
return Array.isArray(e) ? this.sections(se(e)) : typeof e == "function" ? (G("sections", () => e(new ne())), new
|
|
6018
|
+
return Array.isArray(e) ? this.sections(se(e)) : typeof e == "function" ? (G("sections", () => e(new ne())), new w2(
|
|
5920
6019
|
this._renderingMode,
|
|
5921
6020
|
this._initialArgs,
|
|
5922
6021
|
this._initialUiState,
|
|
@@ -5926,7 +6025,7 @@
|
|
|
5926
6025
|
this._title,
|
|
5927
6026
|
this._enrichmentTargets,
|
|
5928
6027
|
this._featureFlags
|
|
5929
|
-
)) : new
|
|
6028
|
+
)) : new w2(
|
|
5930
6029
|
this._renderingMode,
|
|
5931
6030
|
this._initialArgs,
|
|
5932
6031
|
this._initialUiState,
|
|
@@ -5940,7 +6039,7 @@
|
|
|
5940
6039
|
}
|
|
5941
6040
|
/** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
|
|
5942
6041
|
title(e) {
|
|
5943
|
-
return G("title", () => e(new ne())), new
|
|
6042
|
+
return G("title", () => e(new ne())), new w2(
|
|
5944
6043
|
this._renderingMode,
|
|
5945
6044
|
this._initialArgs,
|
|
5946
6045
|
this._initialUiState,
|
|
@@ -5957,7 +6056,7 @@
|
|
|
5957
6056
|
* @deprecated use {@link withArgs}
|
|
5958
6057
|
* */
|
|
5959
6058
|
initialArgs(e) {
|
|
5960
|
-
return new
|
|
6059
|
+
return new w2(
|
|
5961
6060
|
this._renderingMode,
|
|
5962
6061
|
e,
|
|
5963
6062
|
this._initialUiState,
|
|
@@ -5971,7 +6070,7 @@
|
|
|
5971
6070
|
}
|
|
5972
6071
|
/** Sets initial args for the block, this value must be specified. */
|
|
5973
6072
|
withArgs(e) {
|
|
5974
|
-
return new
|
|
6073
|
+
return new w2(
|
|
5975
6074
|
this._renderingMode,
|
|
5976
6075
|
e,
|
|
5977
6076
|
this._initialUiState,
|
|
@@ -5985,7 +6084,7 @@
|
|
|
5985
6084
|
}
|
|
5986
6085
|
/** Defines type and sets initial value for block UiState. */
|
|
5987
6086
|
withUiState(e) {
|
|
5988
|
-
return new
|
|
6087
|
+
return new w2(
|
|
5989
6088
|
this._renderingMode,
|
|
5990
6089
|
this._initialArgs,
|
|
5991
6090
|
e,
|
|
@@ -5999,7 +6098,7 @@
|
|
|
5999
6098
|
}
|
|
6000
6099
|
/** Sets or overrides feature flags for the block. */
|
|
6001
6100
|
withFeatureFlags(e) {
|
|
6002
|
-
return new
|
|
6101
|
+
return new w2(
|
|
6003
6102
|
this._renderingMode,
|
|
6004
6103
|
this._initialArgs,
|
|
6005
6104
|
this._initialUiState,
|
|
@@ -6016,7 +6115,7 @@
|
|
|
6016
6115
|
* Influences dependency graph construction.
|
|
6017
6116
|
*/
|
|
6018
6117
|
enriches(e) {
|
|
6019
|
-
return G("enrichmentTargets", e), new
|
|
6118
|
+
return G("enrichmentTargets", e), new w2(
|
|
6020
6119
|
this._renderingMode,
|
|
6021
6120
|
this._initialArgs,
|
|
6022
6121
|
this._initialUiState,
|
|
@@ -6057,22 +6156,22 @@
|
|
|
6057
6156
|
sdkVersion: X,
|
|
6058
6157
|
renderingMode: this._renderingMode,
|
|
6059
6158
|
initialArgs: this._initialArgs,
|
|
6060
|
-
inputsValid:
|
|
6061
|
-
sections:
|
|
6159
|
+
inputsValid: ge(this._inputsValid),
|
|
6160
|
+
sections: ge(this._sections),
|
|
6062
6161
|
outputs: Object.fromEntries(
|
|
6063
|
-
Object.entries(this._outputs).map(([r, i]) => [r,
|
|
6162
|
+
Object.entries(this._outputs).map(([r, i]) => [r, ge(i)])
|
|
6064
6163
|
)
|
|
6065
6164
|
};
|
|
6066
|
-
return globalThis.platformaApiVersion = e,
|
|
6165
|
+
return globalThis.platformaApiVersion = e, Vt() ? He({ sdkVersion: X, apiVersion: platformaApiVersion }) : { config: n2 };
|
|
6067
6166
|
}
|
|
6068
6167
|
};
|
|
6069
|
-
V(
|
|
6168
|
+
V(w, "INITIAL_BLOCK_FEATURE_FLAGS", {
|
|
6070
6169
|
supportsLazyState: true,
|
|
6071
6170
|
requiresUIAPIVersion: 1,
|
|
6072
6171
|
requiresModelAPIVersion: 1
|
|
6073
6172
|
});
|
|
6074
|
-
let
|
|
6075
|
-
function
|
|
6173
|
+
let Ne = w;
|
|
6174
|
+
function tt() {
|
|
6076
6175
|
return {
|
|
6077
6176
|
sourceId: null,
|
|
6078
6177
|
hiddenColIds: null,
|
|
@@ -6081,72 +6180,72 @@
|
|
|
6081
6180
|
sorting: []
|
|
6082
6181
|
};
|
|
6083
6182
|
}
|
|
6084
|
-
function
|
|
6183
|
+
function Ue() {
|
|
6085
6184
|
return {
|
|
6086
6185
|
version: 4,
|
|
6087
6186
|
stateCache: [],
|
|
6088
|
-
pTableParams:
|
|
6187
|
+
pTableParams: tt()
|
|
6089
6188
|
};
|
|
6090
6189
|
}
|
|
6091
|
-
function
|
|
6092
|
-
return "version" in t || (t =
|
|
6190
|
+
function tn(t) {
|
|
6191
|
+
return "version" in t || (t = Ue()), t.version === 2 && (t = {
|
|
6093
6192
|
version: 3,
|
|
6094
6193
|
stateCache: t.stateCache.map((e) => ({
|
|
6095
6194
|
...e,
|
|
6096
6195
|
filtersState: []
|
|
6097
6196
|
})),
|
|
6098
|
-
pTableParams:
|
|
6099
|
-
}), t.version === 3 && (t =
|
|
6197
|
+
pTableParams: tt()
|
|
6198
|
+
}), t.version === 3 && (t = Ue()), t;
|
|
6100
6199
|
}
|
|
6101
|
-
function
|
|
6102
|
-
return t.axesSpec.length === 1 && t.name ===
|
|
6200
|
+
function we(t) {
|
|
6201
|
+
return t.axesSpec.length === 1 && t.name === Pn.Label;
|
|
6103
6202
|
}
|
|
6104
|
-
function
|
|
6203
|
+
function nn(t) {
|
|
6105
6204
|
return new Q().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
|
|
6106
|
-
name:
|
|
6205
|
+
name: Pn.Label,
|
|
6107
6206
|
axes: [{}]
|
|
6108
6207
|
// exactly one axis
|
|
6109
6208
|
}, { dontWaitAllData: true });
|
|
6110
6209
|
}
|
|
6111
|
-
function
|
|
6210
|
+
function Ke(t, e) {
|
|
6112
6211
|
const n2 = [], r = [];
|
|
6113
6212
|
for (const a of t)
|
|
6114
|
-
|
|
6213
|
+
we(a.spec) ? n2.push(a) : r.push(a);
|
|
6115
6214
|
const i = [];
|
|
6116
6215
|
for (const a of r)
|
|
6117
6216
|
for (const l2 of a.spec.axesSpec) {
|
|
6118
|
-
const
|
|
6119
|
-
i.some((
|
|
6217
|
+
const c2 = p$1(l2);
|
|
6218
|
+
i.some((m2) => Ae$1(m2, c2)) || i.push(c2);
|
|
6120
6219
|
}
|
|
6121
6220
|
for (const a of n2) {
|
|
6122
|
-
const l2 =
|
|
6123
|
-
|
|
6221
|
+
const l2 = p$1(a.spec.axesSpec[0]), c2 = i.findIndex((m2) => Ae$1(m2, l2));
|
|
6222
|
+
c2 !== -1 && i.splice(c2, 1);
|
|
6124
6223
|
}
|
|
6125
6224
|
const o = (a, l2) => {
|
|
6126
|
-
let
|
|
6225
|
+
let c2 = a.toString();
|
|
6127
6226
|
if (l2)
|
|
6128
|
-
for (const
|
|
6129
|
-
|
|
6130
|
-
return
|
|
6227
|
+
for (const m2 in l2)
|
|
6228
|
+
c2 += m2, c2 += l2[m2];
|
|
6229
|
+
return c2;
|
|
6131
6230
|
}, s2 = [];
|
|
6132
6231
|
for (const a of e) {
|
|
6133
|
-
const l2 = a.spec.axesSpec[0],
|
|
6134
|
-
if (
|
|
6135
|
-
const
|
|
6136
|
-
|
|
6137
|
-
id: o(a.id,
|
|
6232
|
+
const l2 = a.spec.axesSpec[0], c2 = p$1(l2), m2 = i.findIndex((d) => Ae$1(d, c2));
|
|
6233
|
+
if (m2 !== -1) {
|
|
6234
|
+
const d = i[m2], h = Object.keys(d.domain ?? {}).length, f = Object.keys(l2.domain ?? {}).length;
|
|
6235
|
+
h > f ? s2.push({
|
|
6236
|
+
id: o(a.id, d.domain),
|
|
6138
6237
|
spec: {
|
|
6139
6238
|
...a.spec,
|
|
6140
|
-
axesSpec: [{ ...
|
|
6239
|
+
axesSpec: [{ ...d, annotations: l2.annotations }]
|
|
6141
6240
|
},
|
|
6142
6241
|
data: a.data
|
|
6143
|
-
}) : s2.push(a), i.splice(
|
|
6242
|
+
}) : s2.push(a), i.splice(m2, 1);
|
|
6144
6243
|
}
|
|
6145
6244
|
}
|
|
6146
6245
|
return s2;
|
|
6147
6246
|
}
|
|
6148
|
-
function
|
|
6149
|
-
const e = (i) => Array.isArray(i), n2 = (i) => i instanceof
|
|
6247
|
+
function rn(t) {
|
|
6248
|
+
const e = (i) => Array.isArray(i), n2 = (i) => i instanceof k, r = (i) => typeof i == "object" && "type" in i;
|
|
6150
6249
|
return t.map((i) => i.data).every((i) => {
|
|
6151
6250
|
if (e(i))
|
|
6152
6251
|
return true;
|
|
@@ -6167,7 +6266,7 @@
|
|
|
6167
6266
|
throw Error(`unsupported column data type: ${i}`);
|
|
6168
6267
|
});
|
|
6169
6268
|
}
|
|
6170
|
-
function
|
|
6269
|
+
function qe(t) {
|
|
6171
6270
|
let e = t.columns;
|
|
6172
6271
|
const n2 = [];
|
|
6173
6272
|
if (t.coreColumnPredicate) {
|
|
@@ -6189,78 +6288,74 @@
|
|
|
6189
6288
|
sorting: t.sorting
|
|
6190
6289
|
};
|
|
6191
6290
|
}
|
|
6192
|
-
function
|
|
6193
|
-
|
|
6194
|
-
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "hidden";
|
|
6291
|
+
function on(t) {
|
|
6292
|
+
return An(t, y.Table.Visibility) === "hidden";
|
|
6195
6293
|
}
|
|
6196
|
-
function
|
|
6197
|
-
|
|
6198
|
-
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
|
|
6294
|
+
function sn(t) {
|
|
6295
|
+
return An(t, y.Table.Visibility) === "optional";
|
|
6199
6296
|
}
|
|
6200
|
-
function
|
|
6297
|
+
function be(t, e) {
|
|
6201
6298
|
return [...new Map(t.map((n2) => [e(n2), n2])).values()];
|
|
6202
6299
|
}
|
|
6203
|
-
function
|
|
6300
|
+
function Xn(t, e, n2, r) {
|
|
6204
6301
|
if (e.length === 0) return;
|
|
6205
|
-
const i = e.filter((
|
|
6302
|
+
const i = e.filter((u2) => Fe(u2.spec) || !on(u2.spec)), o = tn(n2), s2 = nn(t.resultPool);
|
|
6206
6303
|
if (!s2) return;
|
|
6207
|
-
const a =
|
|
6208
|
-
...
|
|
6209
|
-
[...l2.flatMap((
|
|
6210
|
-
(
|
|
6211
|
-
).map((
|
|
6212
|
-
...l2.map((
|
|
6213
|
-
],
|
|
6214
|
-
const
|
|
6215
|
-
return
|
|
6216
|
-
}), p2 =
|
|
6304
|
+
const a = Ke(i.map(En), s2), l2 = [...i, ...a], m2 = [
|
|
6305
|
+
...be(
|
|
6306
|
+
[...l2.flatMap((u2) => u2.spec.axesSpec.map((b2) => p$1(b2)))],
|
|
6307
|
+
(u2) => m$1(u2)
|
|
6308
|
+
).map((u2) => ({ type: "axis", id: u2 })),
|
|
6309
|
+
...l2.map((u2) => ({ type: "column", id: u2.id }))
|
|
6310
|
+
], d = new Set(m2.map((u2) => m$1(u2))), h = (u2) => d.has(m$1(u2)), f = "full", y2 = o.pTableParams.partitionFilters.filter((u2) => {
|
|
6311
|
+
const b2 = h(u2.column);
|
|
6312
|
+
return b2 || t.logWarn(`Partition filter ${JSON.stringify(u2)} does not match provided columns, skipping`), b2;
|
|
6313
|
+
}), p2 = be(
|
|
6217
6314
|
[...[], ...o.pTableParams.filters],
|
|
6218
|
-
(
|
|
6219
|
-
).filter((
|
|
6220
|
-
const
|
|
6221
|
-
return
|
|
6222
|
-
}),
|
|
6315
|
+
(u2) => m$1(u2.column)
|
|
6316
|
+
).filter((u2) => {
|
|
6317
|
+
const b2 = h(u2.column);
|
|
6318
|
+
return b2 || t.logWarn(`Filter ${JSON.stringify(u2)} does not match provided columns, skipping`), b2;
|
|
6319
|
+
}), g2 = be(
|
|
6223
6320
|
[...[], ...o.pTableParams.sorting],
|
|
6224
|
-
(
|
|
6225
|
-
).filter((
|
|
6226
|
-
const
|
|
6227
|
-
return
|
|
6228
|
-
}),
|
|
6321
|
+
(u2) => m$1(u2.column)
|
|
6322
|
+
).filter((u2) => {
|
|
6323
|
+
const b2 = h(u2.column);
|
|
6324
|
+
return b2 || t.logWarn(`Sorting ${JSON.stringify(u2)} does not match provided columns, skipping`), b2;
|
|
6325
|
+
}), P = qe({
|
|
6229
6326
|
columns: i,
|
|
6230
6327
|
labelColumns: a,
|
|
6231
|
-
coreJoinType:
|
|
6232
|
-
partitionFilters:
|
|
6328
|
+
coreJoinType: f,
|
|
6329
|
+
partitionFilters: y2,
|
|
6233
6330
|
filters: p2,
|
|
6234
|
-
sorting:
|
|
6331
|
+
sorting: g2,
|
|
6235
6332
|
coreColumnPredicate: void 0
|
|
6236
|
-
}), E2 = t.createPTable(
|
|
6237
|
-
const
|
|
6238
|
-
return
|
|
6333
|
+
}), E2 = t.createPTable(P), x = new Set((() => {
|
|
6334
|
+
const u2 = o.pTableParams.hiddenColIds;
|
|
6335
|
+
return u2 || i.filter((b2) => sn(b2.spec)).map((b2) => b2.id);
|
|
6239
6336
|
})());
|
|
6240
|
-
i.filter((
|
|
6241
|
-
const
|
|
6242
|
-
if (!
|
|
6243
|
-
const
|
|
6244
|
-
columns:
|
|
6245
|
-
labelColumns:
|
|
6246
|
-
coreJoinType:
|
|
6247
|
-
partitionFilters:
|
|
6337
|
+
i.filter((u2) => Fe(u2.spec)).forEach((u2) => x.delete(u2.id)), [...y2.map((u2) => u2.column), ...p2.map((u2) => u2.column), ...g2.map((u2) => u2.column)].filter((u2) => u2.type === "column").forEach((u2) => x.delete(u2.id));
|
|
6338
|
+
const T2 = i.filter((u2) => !x.has(u2.id)), S2 = Ke(T2.map(En), s2);
|
|
6339
|
+
if (!rn([...T2, ...S2])) return;
|
|
6340
|
+
const C2 = qe({
|
|
6341
|
+
columns: T2,
|
|
6342
|
+
labelColumns: S2,
|
|
6343
|
+
coreJoinType: f,
|
|
6344
|
+
partitionFilters: y2,
|
|
6248
6345
|
filters: p2,
|
|
6249
|
-
sorting:
|
|
6346
|
+
sorting: g2,
|
|
6250
6347
|
coreColumnPredicate: void 0
|
|
6251
|
-
}),
|
|
6348
|
+
}), I2 = t.createPTable(C2);
|
|
6252
6349
|
return {
|
|
6253
6350
|
sourceId: o.pTableParams.sourceId,
|
|
6254
6351
|
fullTableHandle: E2,
|
|
6255
|
-
visibleTableHandle:
|
|
6352
|
+
visibleTableHandle: I2
|
|
6256
6353
|
};
|
|
6257
6354
|
}
|
|
6258
|
-
function
|
|
6259
|
-
|
|
6260
|
-
return ((e = t.annotations) == null ? void 0 : e[nn]) === "true";
|
|
6355
|
+
function Fe(t) {
|
|
6356
|
+
return !!z$1(t, y.IsLinkerColumn);
|
|
6261
6357
|
}
|
|
6262
|
-
const
|
|
6263
|
-
const ImportFileHandleSchema = z$1.string().optional().refine(
|
|
6358
|
+
const ImportFileHandleSchema = z$2.string().optional().refine(
|
|
6264
6359
|
(_a) => true
|
|
6265
6360
|
);
|
|
6266
6361
|
function* range(from, to, step = 1) {
|
|
@@ -6270,23 +6365,23 @@
|
|
|
6270
6365
|
}
|
|
6271
6366
|
function toList(iterable) {
|
|
6272
6367
|
const lst = [];
|
|
6273
|
-
for (const
|
|
6274
|
-
lst.push(
|
|
6368
|
+
for (const it of iterable) {
|
|
6369
|
+
lst.push(it);
|
|
6275
6370
|
}
|
|
6276
6371
|
return lst;
|
|
6277
6372
|
}
|
|
6278
6373
|
function times(n2, cb) {
|
|
6279
6374
|
return toList(range(0, n2)).map(cb);
|
|
6280
6375
|
}
|
|
6281
|
-
const $BlockArgs = z$
|
|
6282
|
-
numbers: z$
|
|
6283
|
-
handles: z$
|
|
6376
|
+
const $BlockArgs = z$2.object({
|
|
6377
|
+
numbers: z$2.array(z$2.coerce.number()),
|
|
6378
|
+
handles: z$2.array(ImportFileHandleSchema)
|
|
6284
6379
|
});
|
|
6285
|
-
const platforma =
|
|
6380
|
+
const platforma = Ne.create("Heavy").withArgs({ numbers: [1, 2, 3, 4], handles: [] }).withUiState({
|
|
6286
6381
|
dataTableV2: {
|
|
6287
6382
|
sourceId: "source_1",
|
|
6288
6383
|
numRows: 200,
|
|
6289
|
-
state:
|
|
6384
|
+
state: Ue()
|
|
6290
6385
|
},
|
|
6291
6386
|
dynamicSections: [],
|
|
6292
6387
|
datasets: []
|
|
@@ -6308,11 +6403,11 @@
|
|
|
6308
6403
|
const sheets = [
|
|
6309
6404
|
{
|
|
6310
6405
|
axis: {
|
|
6311
|
-
type:
|
|
6406
|
+
type: g.Int,
|
|
6312
6407
|
name: "part",
|
|
6313
6408
|
annotations: {
|
|
6314
|
-
|
|
6315
|
-
|
|
6409
|
+
[y.Label]: "Partitioned axis",
|
|
6410
|
+
[y.DiscreteValues]: hn([0, 1])
|
|
6316
6411
|
}
|
|
6317
6412
|
},
|
|
6318
6413
|
options: [
|
|
@@ -6330,27 +6425,27 @@
|
|
|
6330
6425
|
id: "column1",
|
|
6331
6426
|
spec: {
|
|
6332
6427
|
kind: "PColumn",
|
|
6333
|
-
valueType:
|
|
6428
|
+
valueType: g.String,
|
|
6334
6429
|
name: "example",
|
|
6335
6430
|
annotations: {
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6431
|
+
[y.Label]: "String column",
|
|
6432
|
+
[y.DiscreteValues]: hn(["up", "down"]),
|
|
6433
|
+
[y.Table.OrderPriority]: hn(101)
|
|
6339
6434
|
},
|
|
6340
6435
|
axesSpec: [
|
|
6341
6436
|
{
|
|
6342
|
-
type:
|
|
6437
|
+
type: g.Int,
|
|
6343
6438
|
name: "part",
|
|
6344
6439
|
annotations: {
|
|
6345
|
-
|
|
6346
|
-
|
|
6440
|
+
[y.Label]: "Partitioned axis",
|
|
6441
|
+
[y.DiscreteValues]: hn([0, 1])
|
|
6347
6442
|
}
|
|
6348
6443
|
},
|
|
6349
6444
|
{
|
|
6350
|
-
type:
|
|
6445
|
+
type: g.Int,
|
|
6351
6446
|
name: "index",
|
|
6352
6447
|
annotations: {
|
|
6353
|
-
|
|
6448
|
+
[y.Label]: "Int axis"
|
|
6354
6449
|
}
|
|
6355
6450
|
}
|
|
6356
6451
|
]
|
|
@@ -6367,27 +6462,27 @@
|
|
|
6367
6462
|
id: "column2",
|
|
6368
6463
|
spec: {
|
|
6369
6464
|
kind: "PColumn",
|
|
6370
|
-
valueType:
|
|
6465
|
+
valueType: g.Float,
|
|
6371
6466
|
name: "value",
|
|
6372
6467
|
annotations: {
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6468
|
+
[y.Label]: "Float column",
|
|
6469
|
+
[y.Table.Visibility]: "optional",
|
|
6470
|
+
[y.Table.OrderPriority]: hn(100)
|
|
6376
6471
|
},
|
|
6377
6472
|
axesSpec: [
|
|
6378
6473
|
{
|
|
6379
|
-
type:
|
|
6474
|
+
type: g.Int,
|
|
6380
6475
|
name: "part",
|
|
6381
6476
|
annotations: {
|
|
6382
|
-
|
|
6383
|
-
|
|
6477
|
+
[y.Label]: "Partitioned axis",
|
|
6478
|
+
[y.DiscreteValues]: hn([0, 1])
|
|
6384
6479
|
}
|
|
6385
6480
|
},
|
|
6386
6481
|
{
|
|
6387
|
-
type:
|
|
6482
|
+
type: g.Int,
|
|
6388
6483
|
name: "index",
|
|
6389
6484
|
annotations: {
|
|
6390
|
-
|
|
6485
|
+
[y.Label]: "Int axis"
|
|
6391
6486
|
}
|
|
6392
6487
|
}
|
|
6393
6488
|
]
|
|
@@ -6404,17 +6499,17 @@
|
|
|
6404
6499
|
id: "labelColumn",
|
|
6405
6500
|
spec: {
|
|
6406
6501
|
kind: "PColumn",
|
|
6407
|
-
valueType:
|
|
6408
|
-
name:
|
|
6502
|
+
valueType: g.Int,
|
|
6503
|
+
name: Pn.Label,
|
|
6409
6504
|
annotations: {
|
|
6410
|
-
|
|
6505
|
+
[y.Label]: "Int axis labels"
|
|
6411
6506
|
},
|
|
6412
6507
|
axesSpec: [
|
|
6413
6508
|
{
|
|
6414
|
-
type:
|
|
6509
|
+
type: g.Int,
|
|
6415
6510
|
name: "index",
|
|
6416
6511
|
annotations: {
|
|
6417
|
-
|
|
6512
|
+
[y.Label]: "Int axis"
|
|
6418
6513
|
}
|
|
6419
6514
|
}
|
|
6420
6515
|
]
|
|
@@ -6431,26 +6526,26 @@
|
|
|
6431
6526
|
id: "linkerColumn",
|
|
6432
6527
|
spec: {
|
|
6433
6528
|
kind: "PColumn",
|
|
6434
|
-
valueType:
|
|
6529
|
+
valueType: g.Int,
|
|
6435
6530
|
name: "linker",
|
|
6436
6531
|
annotations: {
|
|
6437
|
-
|
|
6438
|
-
|
|
6439
|
-
|
|
6532
|
+
[y.Label]: "Index axis linker",
|
|
6533
|
+
[y.IsLinkerColumn]: hn(true),
|
|
6534
|
+
[y.Table.Visibility]: "hidden"
|
|
6440
6535
|
},
|
|
6441
6536
|
axesSpec: [
|
|
6442
6537
|
{
|
|
6443
|
-
type:
|
|
6538
|
+
type: g.Int,
|
|
6444
6539
|
name: "index",
|
|
6445
6540
|
annotations: {
|
|
6446
|
-
|
|
6541
|
+
[y.Label]: "Int axis"
|
|
6447
6542
|
}
|
|
6448
6543
|
},
|
|
6449
6544
|
{
|
|
6450
|
-
type:
|
|
6545
|
+
type: g.Int,
|
|
6451
6546
|
name: "linkedIndex",
|
|
6452
6547
|
annotations: {
|
|
6453
|
-
|
|
6548
|
+
[y.Label]: "Linked int axis"
|
|
6454
6549
|
}
|
|
6455
6550
|
}
|
|
6456
6551
|
]
|
|
@@ -6464,24 +6559,24 @@
|
|
|
6464
6559
|
})
|
|
6465
6560
|
}
|
|
6466
6561
|
];
|
|
6467
|
-
for (let
|
|
6562
|
+
for (let j2 = 1; j2 < 10; ++j2) {
|
|
6468
6563
|
columns.push({
|
|
6469
|
-
id: `alphabeticalColumn${
|
|
6564
|
+
id: `alphabeticalColumn${j2}`,
|
|
6470
6565
|
spec: {
|
|
6471
6566
|
kind: "PColumn",
|
|
6472
|
-
valueType:
|
|
6567
|
+
valueType: g.String,
|
|
6473
6568
|
name: "value",
|
|
6474
6569
|
annotations: {
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
|
|
6570
|
+
[y.Label]: `Alphabetical column ${j2}`,
|
|
6571
|
+
[y.Table.Visibility]: "optional",
|
|
6572
|
+
[y.Table.OrderPriority]: hn(10 - j2)
|
|
6478
6573
|
},
|
|
6479
6574
|
axesSpec: [
|
|
6480
6575
|
{
|
|
6481
|
-
type:
|
|
6576
|
+
type: g.Int,
|
|
6482
6577
|
name: "linkedIndex",
|
|
6483
6578
|
annotations: {
|
|
6484
|
-
|
|
6579
|
+
[y.Label]: "Linked int axis"
|
|
6485
6580
|
}
|
|
6486
6581
|
}
|
|
6487
6582
|
]
|
|
@@ -6490,12 +6585,12 @@
|
|
|
6490
6585
|
const v2 = i + 1;
|
|
6491
6586
|
return {
|
|
6492
6587
|
key: [v2],
|
|
6493
|
-
val: v2.toString().repeat(
|
|
6588
|
+
val: v2.toString().repeat(j2)
|
|
6494
6589
|
};
|
|
6495
6590
|
})
|
|
6496
6591
|
});
|
|
6497
6592
|
}
|
|
6498
|
-
return
|
|
6593
|
+
return Xn(
|
|
6499
6594
|
ctx,
|
|
6500
6595
|
columns,
|
|
6501
6596
|
ctx.uiState.dataTableV2.state
|
|
@@ -6506,12 +6601,12 @@
|
|
|
6506
6601
|
}
|
|
6507
6602
|
return "Ui Examples";
|
|
6508
6603
|
}).sections((ctx) => {
|
|
6509
|
-
const dynamicSections = (ctx.uiState.dynamicSections ?? []).map((
|
|
6604
|
+
const dynamicSections = (ctx.uiState.dynamicSections ?? []).map((it) => ({
|
|
6510
6605
|
type: "link",
|
|
6511
|
-
href: `/section?id=${
|
|
6512
|
-
label:
|
|
6606
|
+
href: `/section?id=${it.id}`,
|
|
6607
|
+
label: it.label
|
|
6513
6608
|
}));
|
|
6514
|
-
if (dynamicSections.some((
|
|
6609
|
+
if (dynamicSections.some((it) => it.label === "Error")) {
|
|
6515
6610
|
throw new Error("sections: test error");
|
|
6516
6611
|
}
|
|
6517
6612
|
return [
|
|
@@ -6534,16 +6629,17 @@
|
|
|
6534
6629
|
{ type: "link", href: "/pl-number-field-page", label: "PlNumberFieldPage" },
|
|
6535
6630
|
{ type: "link", href: "/pl-error-boundary-page", label: "PlErrorBoundaryPage" },
|
|
6536
6631
|
{ type: "link", href: "/pl-element-list-page", label: "PlElementList" },
|
|
6537
|
-
{ type: "link", href: "/errors", label: "Errors" },
|
|
6538
6632
|
{ type: "link", href: "/text-fields", label: "PlTextField" },
|
|
6539
6633
|
{ type: "link", href: "/tabs", label: "PlTabs" },
|
|
6634
|
+
{ type: "link", href: "/pl-autocomplete", label: "PlAutocomplete" },
|
|
6635
|
+
{ type: "link", href: "/radio", label: "PlRadio" },
|
|
6540
6636
|
{ type: "link", href: "/stacked-bar", label: "PlChartStackedBar" },
|
|
6541
6637
|
{ type: "link", href: "/histogram", label: "PlChartHistogram" },
|
|
6542
6638
|
{ type: "link", href: "/buttons", label: "ButtonsPage" },
|
|
6639
|
+
{ type: "link", href: "/errors", label: "Errors" },
|
|
6640
|
+
{ type: "link", href: "/downloads", label: "Downloads" },
|
|
6543
6641
|
{ type: "link", href: "/notifications", label: "Notifications" },
|
|
6544
6642
|
{ type: "link", href: "/drafts", label: "Drafts" },
|
|
6545
|
-
{ type: "link", href: "/pl-autocomplete", label: "PlAutocomplete" },
|
|
6546
|
-
{ type: "link", href: "/radio", label: "PlRadio" },
|
|
6547
6643
|
...dynamicSections.length ? [
|
|
6548
6644
|
{ type: "delimiter" },
|
|
6549
6645
|
...dynamicSections,
|