@milaboratories/milaboratories.pool-explorer.model 1.0.60 → 1.0.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bundle.js CHANGED
@@ -53,7 +53,7 @@
53
53
  return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
54
54
  }
55
55
  util2.joinValues = joinValues;
56
- util2.jsonStringifyReplacer = (_, value) => {
56
+ util2.jsonStringifyReplacer = (_2, value) => {
57
57
  if (typeof value === "bigint") {
58
58
  return value.toString();
59
59
  }
@@ -391,7 +391,7 @@
391
391
  overrideMap,
392
392
  overrideMap === errorMap ? void 0 : errorMap
393
393
  // then global default map
394
- ].filter((x) => !!x)
394
+ ].filter((x2) => !!x2)
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 = (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, f2) {
457
+ const isAborted = (x2) => x2.status === "aborted";
458
+ const isDirty = (x2) => x2.status === "dirty";
459
+ const isValid = (x2) => x2.status === "valid";
460
+ const isAsync = (x2) => typeof Promise !== "undefined" && x2 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, f2) {
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((x) => !!x);
2790
+ }).filter((x2) => !!x2);
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((x) => !!x),
3048
+ ].filter((x2) => !!x2),
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((x) => !!x),
3064
+ ].filter((x2) => !!x2),
3065
3065
  issueData: {
3066
3066
  code: ZodIssueCode.invalid_return_type,
3067
3067
  returnTypeError: error
@@ -3071,29 +3071,29 @@
3071
3071
  const params = { errorMap: ctx.common.contextualErrorMap };
3072
3072
  const fn2 = ctx.data;
3073
3073
  if (this._def.returns instanceof ZodPromise) {
3074
- const me = this;
3074
+ const me2 = this;
3075
3075
  return OK(async function(...args) {
3076
3076
  const error = new ZodError([]);
3077
- const parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => {
3077
+ const parsedArgs = await me2._def.args.parseAsync(args, params).catch((e) => {
3078
3078
  error.addIssue(makeArgsIssue(args, e));
3079
3079
  throw error;
3080
3080
  });
3081
3081
  const result = await Reflect.apply(fn2, this, parsedArgs);
3082
- const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => {
3082
+ const parsedReturns = await me2._def.returns._def.type.parseAsync(result, params).catch((e) => {
3083
3083
  error.addIssue(makeReturnsIssue(result, e));
3084
3084
  throw error;
3085
3085
  });
3086
3086
  return parsedReturns;
3087
3087
  });
3088
3088
  } else {
3089
- const me = this;
3089
+ const me2 = this;
3090
3090
  return OK(function(...args) {
3091
- const parsedArgs = me._def.args.safeParse(args, params);
3091
+ const parsedArgs = me2._def.args.safeParse(args, params);
3092
3092
  if (!parsedArgs.success) {
3093
3093
  throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);
3094
3094
  }
3095
3095
  const result = Reflect.apply(fn2, this, parsedArgs.data);
3096
- const parsedReturns = me._def.returns.safeParse(result, params);
3096
+ const parsedReturns = me2._def.returns.safeParse(result, params);
3097
3097
  if (!parsedReturns.success) {
3098
3098
  throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);
3099
3099
  }
@@ -3914,8 +3914,8 @@
3914
3914
  quotelessJson,
3915
3915
  ZodError
3916
3916
  });
3917
- function getDefaultExportFromCjs(x) {
3918
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
3917
+ function getDefaultExportFromCjs(x2) {
3918
+ return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
3919
3919
  }
3920
3920
  var canonicalize;
3921
3921
  var hasRequiredCanonicalize;
@@ -3956,232 +3956,232 @@
3956
3956
  }
3957
3957
  var canonicalizeExports = requireCanonicalize();
3958
3958
  const Re = /* @__PURE__ */ getDefaultExportFromCjs(canonicalizeExports);
3959
- var B$1 = Object.defineProperty;
3960
- var j = (n2, e, t) => e in n2 ? B$1(n2, e, { enumerable: true, configurable: true, writable: true, value: t }) : n2[e] = t;
3961
- var l$1 = (n2, e, t) => j(n2, typeof e != "symbol" ? e + "" : e, t);
3959
+ var D$1 = Object.defineProperty;
3960
+ var L = (e, n2, t) => n2 in e ? D$1(e, n2, { enumerable: true, configurable: true, writable: true, value: t }) : e[n2] = t;
3961
+ var l$1 = (e, n2, t) => L(e, typeof n2 != "symbol" ? n2 + "" : n2, t);
3962
3962
  z$1.object({
3963
3963
  /** Included left border. */
3964
3964
  from: z$1.number(),
3965
3965
  /** Excluded right border. */
3966
3966
  to: z$1.number()
3967
3967
  });
3968
- function w(n2) {
3969
- throw new Error("Unexpected object: " + n2);
3968
+ function A(e) {
3969
+ throw new Error("Unexpected object: " + e);
3970
3970
  }
3971
- function En(n2) {
3972
- if (!n2 || typeof n2 != "object")
3971
+ function Oe(e) {
3972
+ if (!e || typeof e != "object")
3973
3973
  return false;
3974
- const e = n2;
3975
- if (!("type" in e))
3974
+ const n2 = e;
3975
+ if (!("type" in n2))
3976
3976
  return false;
3977
- switch (e.type) {
3977
+ switch (n2.type) {
3978
3978
  case "Json":
3979
- return typeof e.keyLength == "number" && e.data !== void 0 && typeof e.data == "object";
3979
+ return typeof n2.keyLength == "number" && n2.data !== void 0 && typeof n2.data == "object";
3980
3980
  case "JsonPartitioned":
3981
- return typeof e.partitionKeyLength == "number" && e.parts !== void 0 && typeof e.parts == "object";
3981
+ return typeof n2.partitionKeyLength == "number" && n2.parts !== void 0 && typeof n2.parts == "object";
3982
3982
  case "BinaryPartitioned":
3983
- return typeof e.partitionKeyLength == "number" && e.parts !== void 0 && typeof e.parts == "object";
3983
+ return typeof n2.partitionKeyLength == "number" && n2.parts !== void 0 && typeof n2.parts == "object";
3984
3984
  default:
3985
3985
  return false;
3986
3986
  }
3987
3987
  }
3988
- function Nn(n2, e) {
3989
- if (n2 !== void 0)
3990
- switch (n2.type) {
3988
+ function Ce(e, n2) {
3989
+ if (e !== void 0)
3990
+ switch (e.type) {
3991
3991
  case "Json":
3992
- return n2;
3992
+ return e;
3993
3993
  case "JsonPartitioned": {
3994
3994
  const t = {};
3995
- for (const [r, o] of Object.entries(n2.parts))
3996
- t[r] = e(o);
3995
+ for (const [r, o] of Object.entries(e.parts))
3996
+ t[r] = n2(o);
3997
3997
  return {
3998
- ...n2,
3998
+ ...e,
3999
3999
  parts: t
4000
4000
  };
4001
4001
  }
4002
4002
  case "BinaryPartitioned": {
4003
4003
  const t = {};
4004
- for (const [r, o] of Object.entries(n2.parts))
4004
+ for (const [r, o] of Object.entries(e.parts))
4005
4005
  t[r] = {
4006
- index: e(o.index),
4007
- values: e(o.values)
4006
+ index: n2(o.index),
4007
+ values: n2(o.values)
4008
4008
  };
4009
4009
  return {
4010
- ...n2,
4010
+ ...e,
4011
4011
  parts: t
4012
4012
  };
4013
4013
  }
4014
4014
  }
4015
4015
  }
4016
- function K(n2) {
4017
- if (!n2 || typeof n2 != "object")
4016
+ function _(e) {
4017
+ if (!e || typeof e != "object")
4018
4018
  return false;
4019
- const e = n2;
4020
- if (!("type" in e))
4019
+ const n2 = e;
4020
+ if (!("type" in n2))
4021
4021
  return false;
4022
- switch (e.type) {
4022
+ switch (n2.type) {
4023
4023
  case "Json":
4024
- return typeof e.keyLength == "number" && Array.isArray(e.data);
4024
+ return typeof n2.keyLength == "number" && Array.isArray(n2.data);
4025
4025
  case "JsonPartitioned":
4026
- return typeof e.partitionKeyLength == "number" && Array.isArray(e.parts);
4026
+ return typeof n2.partitionKeyLength == "number" && Array.isArray(n2.parts);
4027
4027
  case "BinaryPartitioned":
4028
- return typeof e.partitionKeyLength == "number" && Array.isArray(e.parts);
4028
+ return typeof n2.partitionKeyLength == "number" && Array.isArray(n2.parts);
4029
4029
  default:
4030
4030
  return false;
4031
4031
  }
4032
4032
  }
4033
- function Sn(n2) {
4034
- return K(n2) ? n2.type === "JsonPartitioned" || n2.type === "BinaryPartitioned" : false;
4033
+ function $e(e) {
4034
+ return _(e) ? e.type === "JsonPartitioned" || e.type === "BinaryPartitioned" : false;
4035
4035
  }
4036
- function Cn(n2) {
4037
- switch (n2.type) {
4036
+ function Ve$1(e) {
4037
+ switch (e.type) {
4038
4038
  case "Json": {
4039
- const e = Object.entries(n2.data).map(([t, r]) => ({ key: JSON.parse(t), value: r }));
4039
+ const n2 = Object.entries(e.data).map(([t, r]) => ({ key: JSON.parse(t), value: r }));
4040
4040
  return {
4041
4041
  type: "Json",
4042
- keyLength: n2.keyLength,
4043
- data: e
4042
+ keyLength: e.keyLength,
4043
+ data: n2
4044
4044
  };
4045
4045
  }
4046
4046
  case "JsonPartitioned": {
4047
- const e = Object.entries(n2.parts).map(([t, r]) => ({ key: JSON.parse(t), value: r }));
4047
+ const n2 = Object.entries(e.parts).map(([t, r]) => ({ key: JSON.parse(t), value: r }));
4048
4048
  return {
4049
4049
  type: "JsonPartitioned",
4050
- partitionKeyLength: n2.partitionKeyLength,
4051
- parts: e
4050
+ partitionKeyLength: e.partitionKeyLength,
4051
+ parts: n2
4052
4052
  };
4053
4053
  }
4054
4054
  case "BinaryPartitioned": {
4055
- const e = Object.entries(n2.parts).map(([t, r]) => ({ key: JSON.parse(t), value: r }));
4055
+ const n2 = Object.entries(e.parts).map(([t, r]) => ({ key: JSON.parse(t), value: r }));
4056
4056
  return {
4057
4057
  type: "BinaryPartitioned",
4058
- partitionKeyLength: n2.partitionKeyLength,
4059
- parts: e
4058
+ partitionKeyLength: e.partitionKeyLength,
4059
+ parts: n2
4060
4060
  };
4061
4061
  }
4062
4062
  }
4063
4063
  }
4064
- function Jn(n2) {
4065
- switch (n2.type) {
4064
+ function Ie$1(e) {
4065
+ switch (e.type) {
4066
4066
  case "Json": {
4067
- const e = {};
4068
- for (const t of n2.data)
4069
- e[JSON.stringify(t.key)] = t.value;
4067
+ const n2 = {};
4068
+ for (const t of e.data)
4069
+ n2[JSON.stringify(t.key)] = t.value;
4070
4070
  return {
4071
4071
  type: "Json",
4072
- keyLength: n2.keyLength,
4073
- data: e
4072
+ keyLength: e.keyLength,
4073
+ data: n2
4074
4074
  };
4075
4075
  }
4076
4076
  case "JsonPartitioned": {
4077
- const e = {};
4078
- for (const t of n2.parts)
4079
- e[JSON.stringify(t.key)] = t.value;
4077
+ const n2 = {};
4078
+ for (const t of e.parts)
4079
+ n2[JSON.stringify(t.key)] = t.value;
4080
4080
  return {
4081
4081
  type: "JsonPartitioned",
4082
- partitionKeyLength: n2.partitionKeyLength,
4083
- parts: e
4082
+ partitionKeyLength: e.partitionKeyLength,
4083
+ parts: n2
4084
4084
  };
4085
4085
  }
4086
4086
  case "BinaryPartitioned": {
4087
- const e = {};
4088
- for (const t of n2.parts)
4089
- e[JSON.stringify(t.key)] = t.value;
4087
+ const n2 = {};
4088
+ for (const t of e.parts)
4089
+ n2[JSON.stringify(t.key)] = t.value;
4090
4090
  return {
4091
4091
  type: "BinaryPartitioned",
4092
- partitionKeyLength: n2.partitionKeyLength,
4093
- parts: e
4092
+ partitionKeyLength: e.partitionKeyLength,
4093
+ parts: n2
4094
4094
  };
4095
4095
  }
4096
4096
  }
4097
4097
  }
4098
- function p$1(n2) {
4099
- const { type: e, name: t, domain: r } = n2, o = { type: e, name: t };
4098
+ function y(e) {
4099
+ const { type: n2, name: t, domain: r } = e, o = { type: n2, name: t };
4100
4100
  return r && Object.entries(r).length > 0 && Object.assign(o, { domain: r }), o;
4101
4101
  }
4102
- function J(n2) {
4103
- return n2.map(p$1);
4102
+ function C(e) {
4103
+ return e.map(y);
4104
4104
  }
4105
- function Rn(n2) {
4106
- return Re(p$1(n2));
4105
+ function _e$1(e) {
4106
+ return Re(y(e));
4107
4107
  }
4108
- function Y$1(n2, e) {
4109
- if (n2 === void 0) return e === void 0;
4110
- if (e === void 0) return true;
4111
- for (const t in e)
4112
- if (n2[t] !== e[t]) return false;
4108
+ function ee$1(e, n2) {
4109
+ if (e === void 0) return n2 === void 0;
4110
+ if (n2 === void 0) return true;
4111
+ for (const t in n2)
4112
+ if (e[t] !== n2[t]) return false;
4113
4113
  return true;
4114
4114
  }
4115
- function Z$1(n2, e) {
4116
- return n2.name === e.name && Y$1(n2.domain, e.domain);
4115
+ function ne$1(e, n2) {
4116
+ return e.name === n2.name && ee$1(e.domain, n2.domain);
4117
4117
  }
4118
- function Un(n2, e) {
4119
- return { ...n2, src: h(n2.src, e) };
4118
+ function qe$1(e, n2) {
4119
+ return { ...e, src: g(e.src, n2) };
4120
4120
  }
4121
- function h(n2, e) {
4122
- switch (n2.type) {
4121
+ function g(e, n2) {
4122
+ switch (e.type) {
4123
4123
  case "column":
4124
4124
  return {
4125
4125
  type: "column",
4126
- column: e(n2.column)
4126
+ column: n2(e.column)
4127
4127
  };
4128
4128
  case "slicedColumn":
4129
4129
  return {
4130
4130
  type: "slicedColumn",
4131
- column: e(n2.column),
4132
- newId: n2.newId,
4133
- axisFilters: n2.axisFilters
4131
+ column: n2(e.column),
4132
+ newId: e.newId,
4133
+ axisFilters: e.axisFilters
4134
4134
  };
4135
4135
  case "inlineColumn":
4136
- return n2;
4136
+ return e;
4137
4137
  case "inner":
4138
4138
  case "full":
4139
4139
  return {
4140
- type: n2.type,
4141
- entries: n2.entries.map((t) => h(t, e))
4140
+ type: e.type,
4141
+ entries: e.entries.map((t) => g(t, n2))
4142
4142
  };
4143
4143
  case "outer":
4144
4144
  return {
4145
4145
  type: "outer",
4146
- primary: h(n2.primary, e),
4147
- secondary: n2.secondary.map((t) => h(t, e))
4146
+ primary: g(e.primary, n2),
4147
+ secondary: e.secondary.map((t) => g(t, n2))
4148
4148
  };
4149
4149
  default:
4150
- w(n2);
4150
+ A(e);
4151
4151
  }
4152
4152
  }
4153
- function nn(n2) {
4154
- return Re(n2);
4153
+ function te(e) {
4154
+ return Re(e);
4155
4155
  }
4156
- function P(n2) {
4157
- return Re(p$1(n2));
4156
+ function P(e) {
4157
+ return Re(y(e));
4158
4158
  }
4159
- function k(n2, e) {
4160
- return JSON.stringify([n2, e]);
4159
+ function E(e, n2) {
4160
+ return JSON.stringify([e, n2]);
4161
4161
  }
4162
- class _n {
4162
+ class He {
4163
4163
  /**
4164
4164
  * Creates a new anchor context from a set of anchor column specifications
4165
4165
  * @param anchors Record of anchor column specifications indexed by anchor ID
4166
4166
  */
4167
- constructor(e) {
4167
+ constructor(n2) {
4168
4168
  l$1(this, "domains", /* @__PURE__ */ new Map());
4169
4169
  l$1(this, "axes", /* @__PURE__ */ new Map());
4170
4170
  l$1(this, "domainPacks", []);
4171
4171
  l$1(this, "domainPackToAnchor", /* @__PURE__ */ new Map());
4172
- this.anchors = e;
4173
- const t = Object.entries(e);
4172
+ this.anchors = n2;
4173
+ const t = Object.entries(n2);
4174
4174
  t.sort((r, o) => r[0].localeCompare(o[0]));
4175
4175
  for (const [r, o] of t) {
4176
- for (let s2 = 0; s2 < o.axesSpec.length; s2++) {
4177
- const a = o.axesSpec[s2], i = P(a);
4178
- this.axes.set(i, { anchor: r, idx: s2 });
4176
+ for (let i = 0; i < o.axesSpec.length; i++) {
4177
+ const a = o.axesSpec[i], s2 = P(a);
4178
+ this.axes.set(s2, { anchor: r, idx: i });
4179
4179
  }
4180
4180
  if (o.domain !== void 0) {
4181
- const s2 = Object.entries(o.domain);
4182
- s2.sort((a, i) => a[0].localeCompare(i[0])), this.domainPackToAnchor.set(JSON.stringify(s2), r), this.domainPacks.push(s2.map(([a]) => a));
4183
- for (const [a, i] of s2) {
4184
- const u2 = k(a, i);
4181
+ const i = Object.entries(o.domain);
4182
+ i.sort((a, s2) => a[0].localeCompare(s2[0])), this.domainPackToAnchor.set(JSON.stringify(i), r), this.domainPacks.push(i.map(([a]) => a));
4183
+ for (const [a, s2] of i) {
4184
+ const u2 = E(a, s2);
4185
4185
  this.domains.set(u2, r);
4186
4186
  }
4187
4187
  }
@@ -4190,57 +4190,57 @@
4190
4190
  /**
4191
4191
  * Implementation of derive method
4192
4192
  */
4193
- derive(e, t) {
4193
+ derive(n2, t) {
4194
4194
  const r = {
4195
- name: e.name,
4195
+ name: n2.name,
4196
4196
  axes: []
4197
4197
  };
4198
4198
  let o;
4199
- if (e.domain !== void 0)
4200
- n:
4199
+ if (n2.domain !== void 0)
4200
+ e:
4201
4201
  for (const a of this.domainPacks) {
4202
- const i = [];
4202
+ const s2 = [];
4203
4203
  for (const c2 of a) {
4204
- const m2 = e.domain[c2];
4205
- if (m2 !== void 0)
4206
- i.push([c2, m2]);
4204
+ const f = n2.domain[c2];
4205
+ if (f !== void 0)
4206
+ s2.push([c2, f]);
4207
4207
  else
4208
- break n;
4208
+ break e;
4209
4209
  }
4210
- const u2 = this.domainPackToAnchor.get(JSON.stringify(i));
4210
+ const u2 = this.domainPackToAnchor.get(JSON.stringify(s2));
4211
4211
  if (u2 !== void 0) {
4212
4212
  r.domainAnchor = u2, o = new Set(a);
4213
4213
  break;
4214
4214
  }
4215
4215
  }
4216
- for (const [a, i] of Object.entries(e.domain ?? {})) {
4216
+ for (const [a, s2] of Object.entries(n2.domain ?? {})) {
4217
4217
  if (o !== void 0 && o.has(a))
4218
4218
  continue;
4219
- const u2 = k(a, i), c2 = this.domains.get(u2);
4220
- r.domain ?? (r.domain = {}), r.domain[a] = c2 ? { anchor: c2 } : i;
4219
+ const u2 = E(a, s2), c2 = this.domains.get(u2);
4220
+ r.domain ?? (r.domain = {}), r.domain[a] = c2 ? { anchor: c2 } : s2;
4221
4221
  }
4222
- if (r.axes = e.axesSpec.map((a) => {
4223
- const i = P(a), u2 = this.axes.get(i);
4224
- return u2 === void 0 ? p$1(a) : u2;
4222
+ if (r.axes = n2.axesSpec.map((a) => {
4223
+ const s2 = P(a), u2 = this.axes.get(s2);
4224
+ return u2 === void 0 ? y(a) : u2;
4225
4225
  }), !t || t.length === 0)
4226
4226
  return r;
4227
- const s2 = [];
4227
+ const i = [];
4228
4228
  for (const a of t) {
4229
- const [i, u2] = a;
4230
- if (typeof i == "number") {
4231
- if (i < 0 || i >= e.axesSpec.length)
4232
- throw new Error(`Axis index ${i} is out of bounds (0-${e.axesSpec.length - 1})`);
4233
- s2.push([i, u2]);
4229
+ const [s2, u2] = a;
4230
+ if (typeof s2 == "number") {
4231
+ if (s2 < 0 || s2 >= n2.axesSpec.length)
4232
+ throw new Error(`Axis index ${s2} is out of bounds (0-${n2.axesSpec.length - 1})`);
4233
+ i.push([s2, u2]);
4234
4234
  } else {
4235
- const c2 = e.axesSpec.findIndex((m2) => m2.name === i);
4235
+ const c2 = n2.axesSpec.findIndex((f) => f.name === s2);
4236
4236
  if (c2 === -1)
4237
- throw new Error(`Axis with name "${i}" not found in the column specification`);
4238
- s2.push([c2, u2]);
4237
+ throw new Error(`Axis with name "${s2}" not found in the column specification`);
4238
+ i.push([c2, u2]);
4239
4239
  }
4240
4240
  }
4241
- return s2.sort((a, i) => a[0] - i[0]), {
4241
+ return i.sort((a, s2) => a[0] - s2[0]), {
4242
4242
  source: r,
4243
- axisFilters: s2
4243
+ axisFilters: i
4244
4244
  };
4245
4245
  }
4246
4246
  /**
@@ -4249,58 +4249,58 @@
4249
4249
  * @param axisFilters Optional axis filters to apply to the column
4250
4250
  * @returns A canonicalized string representation of the anchored column identifier
4251
4251
  */
4252
- deriveS(e, t) {
4253
- return nn(this.derive(e, t));
4252
+ deriveS(n2, t) {
4253
+ return te(this.derive(n2, t));
4254
4254
  }
4255
4255
  }
4256
- function Mn(n2, e, t) {
4257
- const r = { ...e }, o = (t == null ? void 0 : t.ignoreMissingDomains) ?? false;
4256
+ function We(e, n2, t) {
4257
+ const r = { ...n2 }, o = (t == null ? void 0 : t.ignoreMissingDomains) ?? false;
4258
4258
  if (r.domainAnchor !== void 0) {
4259
- const s2 = n2[r.domainAnchor];
4260
- if (!s2)
4259
+ const i = e[r.domainAnchor];
4260
+ if (!i)
4261
4261
  throw new Error(`Anchor "${r.domainAnchor}" not found`);
4262
- const a = s2.domain || {};
4262
+ const a = i.domain || {};
4263
4263
  r.domain = { ...a, ...r.domain }, delete r.domainAnchor;
4264
4264
  }
4265
4265
  if (r.domain) {
4266
- const s2 = {};
4267
- for (const [a, i] of Object.entries(r.domain))
4268
- if (typeof i == "string")
4269
- s2[a] = i;
4266
+ const i = {};
4267
+ for (const [a, s2] of Object.entries(r.domain))
4268
+ if (typeof s2 == "string")
4269
+ i[a] = s2;
4270
4270
  else {
4271
- const u2 = n2[i.anchor];
4271
+ const u2 = e[s2.anchor];
4272
4272
  if (!u2)
4273
- throw new Error(`Anchor "${i.anchor}" not found for domain key "${a}"`);
4273
+ throw new Error(`Anchor "${s2.anchor}" not found for domain key "${a}"`);
4274
4274
  if (!u2.domain || u2.domain[a] === void 0) {
4275
4275
  if (!o)
4276
- throw new Error(`Domain key "${a}" not found in anchor "${i.anchor}"`);
4276
+ throw new Error(`Domain key "${a}" not found in anchor "${s2.anchor}"`);
4277
4277
  continue;
4278
4278
  }
4279
- s2[a] = u2.domain[a];
4279
+ i[a] = u2.domain[a];
4280
4280
  }
4281
- r.domain = s2;
4281
+ r.domain = i;
4282
4282
  }
4283
- return r.axes && (r.axes = r.axes.map((s2) => en(n2, s2))), r;
4283
+ return r.axes && (r.axes = r.axes.map((i) => re(e, i))), r;
4284
4284
  }
4285
- function en(n2, e) {
4286
- if (!tn(e))
4287
- return e;
4288
- const t = e.anchor, r = n2[t];
4285
+ function re(e, n2) {
4286
+ if (!oe$1(n2))
4287
+ return n2;
4288
+ const t = n2.anchor, r = e[t];
4289
4289
  if (!r)
4290
4290
  throw new Error(`Anchor "${t}" not found for axis reference`);
4291
- if ("idx" in e) {
4292
- if (e.idx < 0 || e.idx >= r.axesSpec.length)
4293
- throw new Error(`Axis index ${e.idx} out of bounds for anchor "${t}"`);
4294
- return r.axesSpec[e.idx];
4295
- } else if ("name" in e) {
4296
- const o = r.axesSpec.filter((s2) => s2.name === e.name);
4291
+ if ("idx" in n2) {
4292
+ if (n2.idx < 0 || n2.idx >= r.axesSpec.length)
4293
+ throw new Error(`Axis index ${n2.idx} out of bounds for anchor "${t}"`);
4294
+ return r.axesSpec[n2.idx];
4295
+ } else if ("name" in n2) {
4296
+ const o = r.axesSpec.filter((i) => i.name === n2.name);
4297
4297
  if (o.length > 1)
4298
- throw new Error(`Multiple axes with name "${e.name}" found in anchor "${t}"`);
4298
+ throw new Error(`Multiple axes with name "${n2.name}" found in anchor "${t}"`);
4299
4299
  if (o.length === 0)
4300
- throw new Error(`Axis with name "${e.name}" not found in anchor "${t}"`);
4300
+ throw new Error(`Axis with name "${n2.name}" not found in anchor "${t}"`);
4301
4301
  return o[0];
4302
- } else if ("id" in e) {
4303
- const o = r.axesSpec.filter((s2) => Z$1(e.id, p$1(s2)));
4302
+ } else if ("id" in n2) {
4303
+ const o = r.axesSpec.filter((i) => ne$1(n2.id, y(i)));
4304
4304
  if (o.length > 1)
4305
4305
  throw new Error(`Multiple matching axes found for matcher in anchor "${t}"`);
4306
4306
  if (o.length === 0)
@@ -4309,33 +4309,33 @@
4309
4309
  }
4310
4310
  throw new Error("Unsupported axis reference type");
4311
4311
  }
4312
- function tn(n2) {
4313
- return typeof n2 == "object" && "anchor" in n2;
4312
+ function oe$1(e) {
4313
+ return typeof e == "object" && "anchor" in e;
4314
4314
  }
4315
- function f(n2) {
4316
- return n2.kind === "PColumn";
4315
+ function d(e) {
4316
+ return e.kind === "PColumn";
4317
4317
  }
4318
- function rn(n2) {
4319
- return f(n2.spec);
4318
+ function ie$1(e) {
4319
+ return d(e.spec);
4320
4320
  }
4321
- function qn(n2) {
4322
- if (!rn(n2)) throw new Error(`not a PColumn (kind = ${n2.spec.kind})`);
4323
- return n2;
4321
+ function Ye(e) {
4322
+ if (!ie$1(e)) throw new Error(`not a PColumn (kind = ${e.spec.kind})`);
4323
+ return e;
4324
4324
  }
4325
- function Wn(n2, e) {
4326
- return n2 === void 0 ? void 0 : {
4327
- ...n2,
4328
- data: e(n2.data)
4325
+ function Ze(e, n2) {
4326
+ return e === void 0 ? void 0 : {
4327
+ ...e,
4328
+ data: n2(e.data)
4329
4329
  };
4330
4330
  }
4331
- function Xn(n2) {
4332
- const e = /* @__PURE__ */ new Map(), t = (r) => {
4331
+ function en(e) {
4332
+ const n2 = /* @__PURE__ */ new Map(), t = (r) => {
4333
4333
  switch (r.type) {
4334
4334
  case "column":
4335
- e.set(r.column.id, r.column);
4335
+ n2.set(r.column.id, r.column);
4336
4336
  return;
4337
4337
  case "slicedColumn":
4338
- e.set(r.column.id, r.column);
4338
+ n2.set(r.column.id, r.column);
4339
4339
  return;
4340
4340
  case "inlineColumn":
4341
4341
  return;
@@ -4348,84 +4348,84 @@
4348
4348
  for (const o of r.secondary) t(o);
4349
4349
  return;
4350
4350
  default:
4351
- w(r);
4351
+ A(r);
4352
4352
  }
4353
4353
  };
4354
- return t(n2), [...e.values()];
4354
+ return t(e), [...n2.values()];
4355
4355
  }
4356
- function E$1(n2, e) {
4357
- if (n2.name !== void 0 && n2.name !== e.name)
4356
+ function S(e, n2) {
4357
+ if (e.name !== void 0 && e.name !== n2.name)
4358
4358
  return false;
4359
- if (n2.type !== void 0) {
4360
- if (Array.isArray(n2.type)) {
4361
- if (!n2.type.includes(e.type))
4359
+ if (e.type !== void 0) {
4360
+ if (Array.isArray(e.type)) {
4361
+ if (!e.type.includes(n2.type))
4362
4362
  return false;
4363
- } else if (n2.type !== e.type)
4363
+ } else if (e.type !== n2.type)
4364
4364
  return false;
4365
4365
  }
4366
- if (n2.domain !== void 0) {
4367
- const t = e.domain || {};
4368
- for (const [r, o] of Object.entries(n2.domain))
4366
+ if (e.domain !== void 0) {
4367
+ const t = n2.domain || {};
4368
+ for (const [r, o] of Object.entries(e.domain))
4369
4369
  if (t[r] !== o)
4370
4370
  return false;
4371
4371
  }
4372
4372
  return true;
4373
4373
  }
4374
- function N(n2, e) {
4375
- if (e.name !== void 0 && n2.name !== e.name || e.namePattern !== void 0 && !new RegExp(e.namePattern).test(n2.name))
4374
+ function v$1(e, n2) {
4375
+ if (n2.name !== void 0 && e.name !== n2.name || n2.namePattern !== void 0 && !new RegExp(n2.namePattern).test(e.name))
4376
4376
  return false;
4377
- if (e.type !== void 0) {
4378
- if (Array.isArray(e.type)) {
4379
- if (!e.type.includes(n2.valueType))
4377
+ if (n2.type !== void 0) {
4378
+ if (Array.isArray(n2.type)) {
4379
+ if (!n2.type.includes(e.valueType))
4380
4380
  return false;
4381
- } else if (e.type !== n2.valueType)
4381
+ } else if (n2.type !== e.valueType)
4382
4382
  return false;
4383
4383
  }
4384
- if (e.domain !== void 0) {
4385
- const t = n2.domain || {};
4386
- for (const [r, o] of Object.entries(e.domain))
4384
+ if (n2.domain !== void 0) {
4385
+ const t = e.domain || {};
4386
+ for (const [r, o] of Object.entries(n2.domain))
4387
4387
  if (t[r] !== o)
4388
4388
  return false;
4389
4389
  }
4390
- if (e.axes !== void 0) {
4391
- const t = n2.axesSpec.map(p$1);
4392
- if (e.partialAxesMatch) {
4393
- for (const r of e.axes)
4394
- if (!t.some((o) => E$1(r, o)))
4390
+ if (n2.axes !== void 0) {
4391
+ const t = e.axesSpec.map(y);
4392
+ if (n2.partialAxesMatch) {
4393
+ for (const r of n2.axes)
4394
+ if (!t.some((o) => S(r, o)))
4395
4395
  return false;
4396
4396
  } else {
4397
- if (t.length !== e.axes.length)
4397
+ if (t.length !== n2.axes.length)
4398
4398
  return false;
4399
- for (let r = 0; r < e.axes.length; r++)
4400
- if (!E$1(e.axes[r], t[r]))
4399
+ for (let r = 0; r < n2.axes.length; r++)
4400
+ if (!S(n2.axes[r], t[r]))
4401
4401
  return false;
4402
4402
  }
4403
4403
  }
4404
- if (e.annotations !== void 0) {
4405
- const t = n2.annotations || {};
4406
- for (const [r, o] of Object.entries(e.annotations))
4404
+ if (n2.annotations !== void 0) {
4405
+ const t = e.annotations || {};
4406
+ for (const [r, o] of Object.entries(n2.annotations))
4407
4407
  if (t[r] !== o)
4408
4408
  return false;
4409
4409
  }
4410
- if (e.annotationPatterns !== void 0) {
4411
- const t = n2.annotations || {};
4412
- for (const [r, o] of Object.entries(e.annotationPatterns)) {
4413
- const s2 = t[r];
4414
- if (s2 === void 0 || !new RegExp(o).test(s2))
4410
+ if (n2.annotationPatterns !== void 0) {
4411
+ const t = e.annotations || {};
4412
+ for (const [r, o] of Object.entries(n2.annotationPatterns)) {
4413
+ const i = t[r];
4414
+ if (i === void 0 || !new RegExp(o).test(i))
4415
4415
  return false;
4416
4416
  }
4417
4417
  }
4418
4418
  return true;
4419
4419
  }
4420
- function Gn(n2) {
4421
- return Array.isArray(n2) ? (e) => n2.some((t) => f(e) && N(e, t)) : (e) => f(e) && N(e, n2);
4420
+ function nn(e) {
4421
+ return Array.isArray(e) ? (n2) => e.some((t) => d(n2) && v$1(n2, t)) : (n2) => d(n2) && v$1(n2, e);
4422
4422
  }
4423
- function Qn(n2) {
4424
- const e = {
4425
- kind: n2.kind,
4426
- name: n2.name
4423
+ function tn(e) {
4424
+ const n2 = {
4425
+ kind: e.kind,
4426
+ name: e.name
4427
4427
  };
4428
- return n2.domain !== void 0 && (e.domain = n2.domain), f(n2) && (e.axesSpec = J(n2.axesSpec)), Re(e);
4428
+ return e.domain !== void 0 && (n2.domain = e.domain), d(e) && (n2.axesSpec = C(e.axesSpec)), Re(n2);
4429
4429
  }
4430
4430
  z$1.object({
4431
4431
  __isRef: z$1.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
@@ -4435,25 +4435,25 @@
4435
4435
  }).describe(
4436
4436
  "Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees."
4437
4437
  ).readonly();
4438
- function ne(n2) {
4439
- return typeof n2 == "object" && n2 !== null && "__isRef" in n2 && n2.__isRef === true && "blockId" in n2 && "name" in n2;
4438
+ function sn(e) {
4439
+ return typeof e == "object" && e !== null && "__isRef" in e && e.__isRef === true && "blockId" in e && "name" in e;
4440
4440
  }
4441
- function te$1(n2, e = true) {
4442
- if (e)
4441
+ function un(e, n2 = true) {
4442
+ if (n2)
4443
4443
  return {
4444
- ...n2,
4444
+ ...e,
4445
4445
  requireEnrichments: true
4446
4446
  };
4447
4447
  {
4448
- const { requireEnrichments: t, ...r } = n2;
4448
+ const { requireEnrichments: t, ...r } = e;
4449
4449
  return r;
4450
4450
  }
4451
4451
  }
4452
- function oe$1(n2, e) {
4453
- return n2.ok ? { ok: true, value: e(n2.value) } : n2;
4452
+ function fn(e, n2) {
4453
+ return e.ok ? { ok: true, value: n2(e.value) } : e;
4454
4454
  }
4455
- const fn = 24;
4456
- z$1.string().length(fn).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
4455
+ const de$1 = 24;
4456
+ z$1.string().length(de$1).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
4457
4457
  var stringify = { exports: {} };
4458
4458
  var hasRequiredStringify;
4459
4459
  function requireStringify() {
@@ -4513,13 +4513,13 @@
4513
4513
  cause: z$1.lazy(() => n).optional(),
4514
4514
  errors: z$1.lazy(() => n.array()).optional()
4515
4515
  });
4516
- var Ye = Object.defineProperty;
4517
- var Xe = (t, e, n2) => e in t ? Ye(t, e, { enumerable: true, configurable: true, writable: true, value: n2 }) : t[e] = n2;
4518
- var D = (t, e, n2) => Xe(t, typeof e != "symbol" ? e + "" : e, n2);
4519
- function re(t) {
4516
+ var qe = Object.defineProperty;
4517
+ var ze = (t, e, n2) => e in t ? qe(t, e, { enumerable: true, configurable: true, writable: true, value: n2 }) : t[e] = n2;
4518
+ var k = (t, e, n2) => ze(t, typeof e != "symbol" ? e + "" : e, n2);
4519
+ function ne(t) {
4520
4520
  return { type: "Immediate", value: t };
4521
4521
  }
4522
- function ht() {
4522
+ function ft() {
4523
4523
  return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
4524
4524
  }
4525
4525
  function Ke(t) {
@@ -4528,39 +4528,39 @@
4528
4528
  if (typeof globalThis.platforma < "u") return globalThis.platforma;
4529
4529
  throw new Error("Can't get platforma instance.");
4530
4530
  }
4531
- function gt() {
4531
+ function ht() {
4532
4532
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
4533
4533
  }
4534
- function y() {
4534
+ function v() {
4535
4535
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
4536
4536
  throw new Error("Not in config rendering context");
4537
4537
  }
4538
- function H(t, e) {
4539
- const n2 = gt();
4538
+ function G(t, e) {
4539
+ const n2 = ht();
4540
4540
  if (n2 === void 0) return false;
4541
4541
  if (t in n2.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
4542
4542
  return n2.callbackRegistry[t] = e, true;
4543
4543
  }
4544
- const de = /* @__PURE__ */ new Map();
4545
- function mt(t, e) {
4546
- t in y().callbackRegistry || (y().callbackRegistry[t] = (n2) => {
4547
- for (const r of de.get(t))
4544
+ const ue = /* @__PURE__ */ new Map();
4545
+ function gt(t, e) {
4546
+ t in v().callbackRegistry || (v().callbackRegistry[t] = (n2) => {
4547
+ for (const r of ue.get(t))
4548
4548
  r(n2);
4549
- }, de.set(t, [])), de.get(t).push(e);
4549
+ }, ue.set(t, [])), ue.get(t).push(e);
4550
4550
  }
4551
- class I {
4551
+ class F {
4552
4552
  constructor(e, n2 = (r) => r) {
4553
- D(this, "isResolved", false);
4554
- D(this, "resolvedValue");
4555
- this.handle = e, this.postProcess = n2, mt(e, (r) => {
4553
+ k(this, "isResolved", false);
4554
+ k(this, "resolvedValue");
4555
+ this.handle = e, this.postProcess = n2, gt(e, (r) => {
4556
4556
  this.resolvedValue = n2(r), this.isResolved = true;
4557
4557
  });
4558
4558
  }
4559
4559
  map(e) {
4560
- return new I(this.handle, (n2) => e(this.postProcess(n2)));
4560
+ return new F(this.handle, (n2) => e(this.postProcess(n2)));
4561
4561
  }
4562
4562
  mapDefined(e) {
4563
- return new I(this.handle, (n2) => {
4563
+ return new F(this.handle, (n2) => {
4564
4564
  const r = this.postProcess(n2);
4565
4565
  return r ? e(r) : void 0;
4566
4566
  });
@@ -4569,10 +4569,10 @@
4569
4569
  return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
4570
4570
  }
4571
4571
  }
4572
- function ge(t, e) {
4572
+ function fe(t, e) {
4573
4573
  return t === void 0 ? void 0 : e(t);
4574
4574
  }
4575
- class E {
4575
+ class D {
4576
4576
  constructor(e, n2) {
4577
4577
  this.handle = e, this.resolvePath = n2;
4578
4578
  }
@@ -4611,47 +4611,47 @@
4611
4611
  ...this.resolvePath,
4612
4612
  ...n2.map((i) => typeof i == "string" ? i : i.field)
4613
4613
  ];
4614
- return ge(
4615
- y().resolveWithCommon(this.handle, e, ...n2),
4616
- (i) => new E(i, r)
4614
+ return fe(
4615
+ v().resolveWithCommon(this.handle, e, ...n2),
4616
+ (i) => new D(i, r)
4617
4617
  );
4618
4618
  }
4619
4619
  get resourceType() {
4620
- return y().getResourceType(this.handle);
4620
+ return v().getResourceType(this.handle);
4621
4621
  }
4622
4622
  getInputsLocked() {
4623
- return y().getInputsLocked(this.handle);
4623
+ return v().getInputsLocked(this.handle);
4624
4624
  }
4625
4625
  getOutputsLocked() {
4626
- return y().getOutputsLocked(this.handle);
4626
+ return v().getOutputsLocked(this.handle);
4627
4627
  }
4628
4628
  getIsReadyOrError() {
4629
- return y().getIsReadyOrError(this.handle);
4629
+ return v().getIsReadyOrError(this.handle);
4630
4630
  }
4631
4631
  getIsFinal() {
4632
- return y().getIsFinal(this.handle);
4632
+ return v().getIsFinal(this.handle);
4633
4633
  }
4634
4634
  getError() {
4635
4635
  const e = [...this.resolvePath, "error"];
4636
- return ge(
4637
- y().getError(this.handle),
4638
- (n2) => new E(n2, e)
4636
+ return fe(
4637
+ v().getError(this.handle),
4638
+ (n2) => new D(n2, e)
4639
4639
  );
4640
4640
  }
4641
4641
  listInputFields() {
4642
- return y().listInputFields(this.handle);
4642
+ return v().listInputFields(this.handle);
4643
4643
  }
4644
4644
  listOutputFields() {
4645
- return y().listOutputFields(this.handle);
4645
+ return v().listOutputFields(this.handle);
4646
4646
  }
4647
4647
  listDynamicFields() {
4648
- return y().listDynamicFields(this.handle);
4648
+ return v().listDynamicFields(this.handle);
4649
4649
  }
4650
4650
  getKeyValueBase64(e) {
4651
- return y().getKeyValueBase64(this.handle, e);
4651
+ return v().getKeyValueBase64(this.handle, e);
4652
4652
  }
4653
4653
  getKeyValueAsString(e) {
4654
- return y().getKeyValueAsString(this.handle, e);
4654
+ return v().getKeyValueAsString(this.handle, e);
4655
4655
  }
4656
4656
  getKeyValueAsJson(e) {
4657
4657
  const n2 = this.getKeyValueAsString(e);
@@ -4659,10 +4659,10 @@
4659
4659
  return JSON.parse(n2);
4660
4660
  }
4661
4661
  getDataBase64() {
4662
- return y().getDataBase64(this.handle);
4662
+ return v().getDataBase64(this.handle);
4663
4663
  }
4664
4664
  getDataAsString() {
4665
- return y().getDataAsString(this.handle);
4665
+ return v().getDataAsString(this.handle);
4666
4666
  }
4667
4667
  getDataAsJson() {
4668
4668
  const e = this.getDataAsString();
@@ -4675,7 +4675,7 @@
4675
4675
  getPColumns(e = false, n2 = "") {
4676
4676
  const r = this.parsePObjectCollection(e, n2);
4677
4677
  return r === void 0 ? void 0 : Object.entries(r).map(([, s2]) => {
4678
- if (!rn(s2)) throw new Error(`not a PColumn (kind = ${s2.spec.kind})`);
4678
+ if (!ie$1(s2)) throw new Error(`not a PColumn (kind = ${s2.spec.kind})`);
4679
4679
  return s2;
4680
4680
  });
4681
4681
  }
@@ -4683,7 +4683,7 @@
4683
4683
  *
4684
4684
  */
4685
4685
  parsePObjectCollection(e = false, n2 = "") {
4686
- const r = y().parsePObjectCollection(
4686
+ const r = v().parsePObjectCollection(
4687
4687
  this.handle,
4688
4688
  e,
4689
4689
  n2,
@@ -4693,19 +4693,19 @@
4693
4693
  const i = {};
4694
4694
  for (const [s2, o] of Object.entries(r)) {
4695
4695
  const a = [...this.resolvePath, s2];
4696
- i[s2] = Wn(o, (l2) => new E(l2, a));
4696
+ i[s2] = Ze(o, (l2) => new D(l2, a));
4697
4697
  }
4698
4698
  return i;
4699
4699
  }
4700
4700
  getFileContentAsBase64(e) {
4701
- return new I(y().getBlobContentAsBase64(this.handle, e));
4701
+ return new F(v().getBlobContentAsBase64(this.handle, e));
4702
4702
  }
4703
4703
  getFileContentAsString(e) {
4704
- return new I(y().getBlobContentAsString(this.handle, e));
4704
+ return new F(v().getBlobContentAsString(this.handle, e));
4705
4705
  }
4706
4706
  getFileContentAsJson(e) {
4707
- return new I(
4708
- y().getBlobContentAsString(this.handle, e)
4707
+ return new F(
4708
+ v().getBlobContentAsString(this.handle, e)
4709
4709
  ).mapDefined((n2) => JSON.parse(n2));
4710
4710
  }
4711
4711
  /**
@@ -4724,7 +4724,7 @@
4724
4724
  * @returns downloaded file handle
4725
4725
  */
4726
4726
  getFileHandle() {
4727
- return new I(y().getDownloadedBlobContentHandle(this.handle));
4727
+ return new F(v().getDownloadedBlobContentHandle(this.handle));
4728
4728
  }
4729
4729
  /**
4730
4730
  * @deprecated use getFileHandle
@@ -4736,7 +4736,7 @@
4736
4736
  * @returns downloaded file handle
4737
4737
  */
4738
4738
  getRemoteFileHandle() {
4739
- return new I(y().getOnDemandBlobContentHandle(this.handle));
4739
+ return new F(v().getOnDemandBlobContentHandle(this.handle));
4740
4740
  }
4741
4741
  /**
4742
4742
  * @deprecated use getRemoteFileHandle
@@ -4748,22 +4748,22 @@
4748
4748
  * @returns the url to the extracted folder
4749
4749
  */
4750
4750
  extractArchiveAndGetURL(e) {
4751
- return new I(y().extractArchiveAndGetURL(this.handle, e));
4751
+ return new F(v().extractArchiveAndGetURL(this.handle, e));
4752
4752
  }
4753
4753
  getImportProgress() {
4754
- return new I(y().getImportProgress(this.handle));
4754
+ return new F(v().getImportProgress(this.handle));
4755
4755
  }
4756
4756
  getLastLogs(e) {
4757
- return new I(y().getLastLogs(this.handle, e));
4757
+ return new F(v().getLastLogs(this.handle, e));
4758
4758
  }
4759
4759
  getProgressLog(e) {
4760
- return new I(y().getProgressLog(this.handle, e));
4760
+ return new F(v().getProgressLog(this.handle, e));
4761
4761
  }
4762
4762
  getProgressLogWithInfo(e) {
4763
- return new I(y().getProgressLogWithInfo(this.handle, e));
4763
+ return new F(v().getProgressLogWithInfo(this.handle, e));
4764
4764
  }
4765
4765
  getLogHandle() {
4766
- return new I(y().getLogHandle(this.handle));
4766
+ return new F(v().getLogHandle(this.handle));
4767
4767
  }
4768
4768
  allFieldsResolved(e = "Input") {
4769
4769
  switch (e) {
@@ -4789,135 +4789,135 @@
4789
4789
  let l2 = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
4790
4790
  (u2) => [u2, this.resolve({ field: u2, assertFieldType: r })]
4791
4791
  );
4792
- return s2 && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2, c2]) => o(u2, c2));
4792
+ return s2 && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2, h]) => o(u2, h));
4793
4793
  }
4794
4794
  }
4795
- const Ve = "staging", je = "main";
4796
- const bt = "pl7.app/label", wt = "pl7.app/trace", At = z$1.object({
4795
+ const Ne = "staging", Ve = "main";
4796
+ const bt = "pl7.app/label", vt = "pl7.app/trace", Ct = z$1.object({
4797
4797
  type: z$1.string(),
4798
4798
  importance: z$1.number().optional(),
4799
4799
  id: z$1.string().optional(),
4800
4800
  label: z$1.string()
4801
- }), xt = z$1.array(At), Ct = 1e-3, Pt = "__LABEL__", Te = "__LABEL__@1";
4802
- function $e(t, e, n2 = {}) {
4803
- const r = /* @__PURE__ */ new Map(), i = n2.forceTraceElements !== void 0 && n2.forceTraceElements.length > 0 ? new Set(n2.forceTraceElements) : void 0, s2 = /* @__PURE__ */ new Map(), o = t.map((p2) => {
4804
- var S, F;
4805
- const m2 = e(p2);
4806
- let f2, v, b;
4807
- "spec" in m2 && typeof m2.spec == "object" ? (f2 = m2.spec, v = m2.prefixTrace, b = m2.suffixTrace) : f2 = m2;
4808
- const h2 = (S = f2.annotations) == null ? void 0 : S[bt], w2 = (F = f2.annotations) == null ? void 0 : F[wt], x = (w2 ? xt.safeParse(JSON.parse(w2)).data : void 0) ?? [], C = [
4809
- ...v ?? [],
4810
- ...x,
4811
- ...b ?? []
4801
+ }), St = z$1.array(Ct), wt = 1e-3, At = "__LABEL__", xe = "__LABEL__@1";
4802
+ function Je(t, e, n2 = {}) {
4803
+ const r = /* @__PURE__ */ new Map(), i = n2.forceTraceElements !== void 0 && n2.forceTraceElements.length > 0 ? new Set(n2.forceTraceElements) : void 0, s2 = /* @__PURE__ */ new Map(), o = t.map((d2) => {
4804
+ var c2, m2;
4805
+ const b = e(d2);
4806
+ let p2, y2, C2;
4807
+ "spec" in b && typeof b.spec == "object" ? (p2 = b.spec, y2 = b.prefixTrace, C2 = b.suffixTrace) : p2 = b;
4808
+ const E2 = (c2 = p2.annotations) == null ? void 0 : c2[bt], _2 = (m2 = p2.annotations) == null ? void 0 : m2[vt], w = (_2 ? St.safeParse(JSON.parse(_2)).data : void 0) ?? [], A2 = [
4809
+ ...y2 ?? [],
4810
+ ...w,
4811
+ ...C2 ?? []
4812
4812
  ];
4813
- if (h2 !== void 0) {
4814
- const k2 = { label: h2, type: Pt, importance: -2 };
4815
- n2.addLabelAsSuffix ? C.push(k2) : C.splice(0, 0, k2);
4816
- }
4817
- const A = [], T = /* @__PURE__ */ new Map();
4818
- for (let k2 = C.length - 1; k2 >= 0; --k2) {
4819
- const { type: W } = C[k2], j2 = C[k2].importance ?? 0, $ = (T.get(W) ?? 0) + 1;
4820
- T.set(W, $);
4821
- const K2 = `${W}@${$}`;
4822
- s2.set(K2, (s2.get(K2) ?? 0) + 1), r.set(
4823
- K2,
4813
+ if (E2 !== void 0) {
4814
+ const T = { label: E2, type: At, importance: -2 };
4815
+ n2.addLabelAsSuffix ? A2.push(T) : A2.splice(0, 0, T);
4816
+ }
4817
+ const S2 = [], I = /* @__PURE__ */ new Map();
4818
+ for (let T = A2.length - 1; T >= 0; --T) {
4819
+ const { type: U } = A2[T], V = A2[T].importance ?? 0, J = (I.get(U) ?? 0) + 1;
4820
+ I.set(U, J);
4821
+ const K = `${U}@${J}`;
4822
+ s2.set(K, (s2.get(K) ?? 0) + 1), r.set(
4823
+ K,
4824
4824
  Math.max(
4825
- r.get(K2) ?? Number.NEGATIVE_INFINITY,
4826
- j2 - (C.length - k2) * Ct
4825
+ r.get(K) ?? Number.NEGATIVE_INFINITY,
4826
+ V - (A2.length - T) * wt
4827
4827
  )
4828
- ), A.push({ ...C[k2], fullType: K2, occurrenceIndex: $ });
4828
+ ), S2.push({ ...A2[T], fullType: K, occurrenceIndex: J });
4829
4829
  }
4830
- return A.reverse(), {
4831
- value: p2,
4832
- spec: f2,
4833
- label: h2,
4834
- fullTrace: A
4830
+ return S2.reverse(), {
4831
+ value: d2,
4832
+ spec: p2,
4833
+ label: E2,
4834
+ fullTrace: S2
4835
4835
  };
4836
4836
  }), a = [], l2 = [], u2 = [...r];
4837
- u2.sort(([, p2], [, m2]) => m2 - p2);
4838
- for (const [p2] of u2)
4839
- p2.endsWith("@1") || s2.get(p2) === t.length ? a.push(p2) : l2.push(p2);
4840
- const c2 = (p2, m2 = false) => {
4841
- const f2 = [];
4842
- for (let v = 0; v < o.length; v++) {
4843
- const b = o[v], h2 = b.fullTrace.filter((C) => p2.has(C.fullType) || i && i.has(C.type));
4844
- if (h2.length === 0)
4845
- if (m2)
4846
- f2.push({
4837
+ u2.sort(([, d2], [, b]) => b - d2);
4838
+ for (const [d2] of u2)
4839
+ d2.endsWith("@1") || s2.get(d2) === t.length ? a.push(d2) : l2.push(d2);
4840
+ const h = (d2, b = false) => {
4841
+ const p2 = [];
4842
+ for (let y2 = 0; y2 < o.length; y2++) {
4843
+ const C2 = o[y2], E2 = C2.fullTrace.filter((A2) => d2.has(A2.fullType) || i && i.has(A2.type));
4844
+ if (E2.length === 0)
4845
+ if (b)
4846
+ p2.push({
4847
4847
  label: "Unlabeled",
4848
- value: b.value
4848
+ value: C2.value
4849
4849
  });
4850
4850
  else return;
4851
- const w2 = h2.map((C) => C.label), x = n2.separator ?? " / ";
4852
- f2.push({
4853
- label: w2.join(x),
4854
- value: b.value
4851
+ const _2 = E2.map((A2) => A2.label), w = n2.separator ?? " / ";
4852
+ p2.push({
4853
+ label: _2.join(w),
4854
+ value: C2.value
4855
4855
  });
4856
4856
  }
4857
- return f2;
4857
+ return p2;
4858
4858
  };
4859
4859
  if (a.length === 0) {
4860
4860
  if (l2.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
4861
- return c2(new Set(Te), true);
4862
- }
4863
- let d = 0, g = -1;
4864
- for (; d < a.length; ) {
4865
- const p2 = /* @__PURE__ */ new Set();
4866
- n2.includeNativeLabel && p2.add(Te);
4867
- for (let f2 = 0; f2 < d; ++f2) p2.add(a[f2]);
4868
- g >= 0 && p2.add(a[g]);
4869
- const m2 = c2(p2);
4870
- if (m2 !== void 0 && new Set(m2.map((f2) => f2.label)).size === t.length) return m2;
4871
- g++, g >= a.length && (d++, g = d);
4872
- }
4873
- return c2(/* @__PURE__ */ new Set([...a, ...l2]), true);
4861
+ return h(new Set(xe), true);
4862
+ }
4863
+ let f = 0, g2 = -1;
4864
+ for (; f < a.length; ) {
4865
+ const d2 = /* @__PURE__ */ new Set();
4866
+ n2.includeNativeLabel && d2.add(xe);
4867
+ for (let p2 = 0; p2 < f; ++p2) d2.add(a[p2]);
4868
+ g2 >= 0 && d2.add(a[g2]);
4869
+ const b = h(d2);
4870
+ if (b !== void 0 && new Set(b.map((p2) => p2.label)).size === t.length) return b;
4871
+ g2++, g2 >= a.length && (f++, g2 = f);
4872
+ }
4873
+ return h(/* @__PURE__ */ new Set([...a, ...l2]), true);
4874
4874
  }
4875
- const Z = "PColumnData/", se = Z + "ResourceMap", oe = Z + "Partitioned/ResourceMap", q = Z + "JsonPartitioned", B = Z + "BinaryPartitioned", Je = Z + "Partitioned/", ae = Je + "JsonPartitioned", z = Je + "BinaryPartitioned";
4876
- const ye = (t) => {
4875
+ const Q = "PColumnData/", ie = Q + "ResourceMap", se = Q + "Partitioned/ResourceMap", H = Q + "JsonPartitioned", B = Q + "BinaryPartitioned", Me = Q + "Partitioned/", oe = Me + "JsonPartitioned", q = Me + "BinaryPartitioned";
4876
+ const ge = (t) => {
4877
4877
  if (t.endsWith(".index"))
4878
4878
  return { baseKey: t.substring(0, t.length - 6), type: "index" };
4879
4879
  if (t.endsWith(".values"))
4880
4880
  return { baseKey: t.substring(0, t.length - 7), type: "values" };
4881
4881
  throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
4882
4882
  };
4883
- function St(t) {
4883
+ function Pt(t) {
4884
4884
  if (!t) return;
4885
4885
  const e = t.resourceType.name, n2 = t.getDataAsJson(), r = [];
4886
4886
  let i = 0;
4887
4887
  switch (e) {
4888
- case se:
4888
+ case ie:
4889
4889
  i = n2.keyLength;
4890
4890
  break;
4891
- case oe:
4891
+ case se:
4892
4892
  i = n2.partitionKeyLength + n2.keyLength;
4893
4893
  break;
4894
- case q:
4894
+ case H:
4895
4895
  case B:
4896
4896
  i = n2.partitionKeyLength;
4897
4897
  break;
4898
- case z:
4899
- case ae:
4898
+ case q:
4899
+ case oe:
4900
4900
  i = n2.superPartitionKeyLength + n2.partitionKeyLength;
4901
4901
  break;
4902
4902
  }
4903
4903
  switch (e) {
4904
- case se:
4905
- case q:
4904
+ case ie:
4905
+ case H:
4906
4906
  case B:
4907
4907
  for (let s2 of t.listInputFields()) {
4908
- e === B && (s2 = ye(s2).baseKey);
4908
+ e === B && (s2 = ge(s2).baseKey);
4909
4909
  const o = [...JSON.parse(s2)];
4910
4910
  r.push(o);
4911
4911
  }
4912
4912
  break;
4913
+ case se:
4914
+ case q:
4913
4915
  case oe:
4914
- case z:
4915
- case ae:
4916
4916
  for (const s2 of t.listInputFields()) {
4917
4917
  const o = [...JSON.parse(s2)], a = t.resolve({ field: s2, assertFieldType: "Input" });
4918
4918
  if (a !== void 0)
4919
4919
  for (let l2 of a.listInputFields()) {
4920
- e === z && (l2 = ye(l2).baseKey);
4920
+ e === q && (l2 = ge(l2).baseKey);
4921
4921
  const u2 = [...o, ...JSON.parse(l2)];
4922
4922
  r.push(u2);
4923
4923
  }
@@ -4926,7 +4926,7 @@
4926
4926
  }
4927
4927
  return { data: r, keyLength: i };
4928
4928
  }
4929
- function _t(t) {
4929
+ function xt(t) {
4930
4930
  if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
4931
4931
  throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
4932
4932
  const { parts: e, partitionKeyLength: n2 } = t, r = [];
@@ -4945,11 +4945,11 @@
4945
4945
  }
4946
4946
  return r.map((i) => Array.from(i.values()));
4947
4947
  }
4948
- function It(t) {
4948
+ function _t(t) {
4949
4949
  if (t === void 0) return;
4950
- if (K(t))
4951
- return _t(t);
4952
- const e = St(t);
4950
+ if (_(t))
4951
+ return xt(t);
4952
+ const e = Pt(t);
4953
4953
  if (!e) return;
4954
4954
  const { data: n2, keyLength: r } = e, i = [];
4955
4955
  for (let s2 = 0; s2 < r; ++s2)
@@ -4962,16 +4962,16 @@
4962
4962
  }
4963
4963
  return i.map((s2) => Array.from(s2.values()));
4964
4964
  }
4965
- function ve(t, e = []) {
4965
+ function me(t, e = []) {
4966
4966
  if (t === void 0 || !t.getIsReadyOrError()) return;
4967
4967
  const n2 = t.resourceType.name, r = t.getDataAsJson();
4968
- if (e.length > 0 && (n2 === ae || n2 === z))
4968
+ if (e.length > 0 && (n2 === oe || n2 === q))
4969
4969
  throw new Error(`Unexpected nested super-partitioned resource: ${n2}`);
4970
4970
  switch (n2) {
4971
+ case ie:
4971
4972
  case se:
4972
- case oe:
4973
4973
  throw new Error(`Only data columns are supported, got: ${n2}`);
4974
- case q: {
4974
+ case H: {
4975
4975
  if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
4976
4976
  throw new Error(`Missing partitionKeyLength in metadata for ${n2}`);
4977
4977
  const i = [];
@@ -4992,7 +4992,7 @@
4992
4992
  throw new Error(`Missing partitionKeyLength in metadata for ${n2}`);
4993
4993
  const i = [], s2 = /* @__PURE__ */ new Map();
4994
4994
  for (const o of t.listInputFields()) {
4995
- const a = ye(o), l2 = t.resolve({ field: o, assertFieldType: "Input" });
4995
+ const a = ge(o), l2 = t.resolve({ field: o, assertFieldType: "Input" });
4996
4996
  if (l2 === void 0) return;
4997
4997
  let u2 = s2.get(a.baseKey);
4998
4998
  u2 || (u2 = {}, s2.set(a.baseKey, u2)), a.type === "index" ? u2.index = l2 : u2.values = l2;
@@ -5014,16 +5014,16 @@
5014
5014
  parts: i
5015
5015
  };
5016
5016
  }
5017
- case ae: {
5017
+ case oe: {
5018
5018
  if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
5019
5019
  throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n2}`);
5020
5020
  const i = r.superPartitionKeyLength + r.partitionKeyLength, s2 = [];
5021
5021
  for (const o of t.listInputFields()) {
5022
5022
  const a = t.resolve({ field: o, assertFieldType: "Input" });
5023
5023
  if (a === void 0) return;
5024
- if (a.resourceType.name !== q)
5025
- throw new Error(`Expected ${q} inside ${n2}, but got ${a.resourceType.name}`);
5026
- const l2 = ve(a, JSON.parse(o));
5024
+ if (a.resourceType.name !== H)
5025
+ throw new Error(`Expected ${H} inside ${n2}, but got ${a.resourceType.name}`);
5026
+ const l2 = me(a, JSON.parse(o));
5027
5027
  if (l2 === void 0) return;
5028
5028
  if (l2.type !== "JsonPartitioned")
5029
5029
  throw new Error(`Unexpected inner result type for ${n2}: ${l2.type}`);
@@ -5035,7 +5035,7 @@
5035
5035
  parts: s2
5036
5036
  };
5037
5037
  }
5038
- case z: {
5038
+ case q: {
5039
5039
  if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
5040
5040
  throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n2}`);
5041
5041
  const i = r.superPartitionKeyLength + r.partitionKeyLength, s2 = [];
@@ -5044,7 +5044,7 @@
5044
5044
  if (a === void 0) return;
5045
5045
  if (a.resourceType.name !== B)
5046
5046
  throw new Error(`Expected ${B} inside ${n2}, but got ${a.resourceType.name}`);
5047
- const l2 = ve(a, JSON.parse(o));
5047
+ const l2 = me(a, JSON.parse(o));
5048
5048
  if (l2 === void 0) return;
5049
5049
  if (l2.type !== "BinaryPartitioned")
5050
5050
  throw new Error(`Unexpected inner result type for ${n2}: ${l2.type}`);
@@ -5060,15 +5060,15 @@
5060
5060
  throw new Error(`Unknown resource type: ${n2}`);
5061
5061
  }
5062
5062
  }
5063
- function Tt(t) {
5063
+ function It(t) {
5064
5064
  if (t !== void 0) {
5065
- if (K(t)) return t;
5066
- if (En(t)) return Cn(t);
5067
- if (t instanceof E) return ve(t);
5065
+ if (_(t)) return t;
5066
+ if (Oe(t)) return Ve$1(t);
5067
+ if (t instanceof D) return me(t);
5068
5068
  throw new Error(`Unexpected input type: ${typeof t}`);
5069
5069
  }
5070
5070
  }
5071
- function Lt(t, e) {
5071
+ function Tt(t, e) {
5072
5072
  const n2 = [...e].sort((s2, o) => o[0] - s2[0]);
5073
5073
  if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
5074
5074
  const { partitionKeyLength: s2 } = t;
@@ -5128,45 +5128,45 @@
5128
5128
  }
5129
5129
  }
5130
5130
  }
5131
- function Et(t) {
5131
+ function Lt(t) {
5132
5132
  if (!Array.isArray(t)) return false;
5133
5133
  if (t.length === 0) return true;
5134
5134
  const e = t[0];
5135
5135
  return typeof e == "object" && e !== null && "key" in e && "val" in e;
5136
5136
  }
5137
- class kt {
5137
+ class Ft {
5138
5138
  constructor(e) {
5139
5139
  this.columns = e;
5140
5140
  }
5141
5141
  selectColumns(e) {
5142
- const n2 = typeof e == "function" ? e : Gn(e);
5142
+ const n2 = typeof e == "function" ? e : nn(e);
5143
5143
  return this.columns.filter((r) => n2(r.spec));
5144
5144
  }
5145
5145
  }
5146
- function Dt(t) {
5146
+ function Et(t) {
5147
5147
  if (t)
5148
5148
  return t.map((e) => ({
5149
- type: `split:${Rn(e.axisId)}`,
5149
+ type: `split:${_e$1(e.axisId)}`,
5150
5150
  label: e.label,
5151
5151
  importance: 1e6
5152
5152
  // High importance for split filters in labels
5153
5153
  }));
5154
5154
  }
5155
- function Ot(t) {
5155
+ function kt(t) {
5156
5156
  if (t)
5157
5157
  return t.map((e) => [e.axisIdx, e.value]);
5158
5158
  }
5159
- function Rt(t, e) {
5159
+ function Dt(t, e) {
5160
5160
  if (!e || e.length === 0) return t;
5161
5161
  const n2 = [...e].sort((r, i) => r[0] - i[0]);
5162
5162
  return Re({ id: t, axisFilters: n2 });
5163
5163
  }
5164
- function Le(t) {
5164
+ function _e(t) {
5165
5165
  if (!t || typeof t != "object") return false;
5166
5166
  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);
5167
5167
  return !!e.domainAnchor || n2 || r;
5168
5168
  }
5169
- function Ft(t) {
5169
+ function Rt(t) {
5170
5170
  if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
5171
5171
  return [];
5172
5172
  const e = t.axes.map((n2, r) => typeof n2 == "object" && "split" in n2 && n2.split === true ? r : -1).filter((n2) => n2 !== -1);
@@ -5174,11 +5174,11 @@
5174
5174
  throw new Error("Axis splitting is not supported when `partialAxesMatch` is defined.");
5175
5175
  return e.sort((n2, r) => n2 - r), e;
5176
5176
  }
5177
- class le {
5177
+ class ae {
5178
5178
  constructor() {
5179
- D(this, "defaultProviderStore", []);
5180
- D(this, "providers", [new kt(this.defaultProviderStore)]);
5181
- D(this, "axisLabelProviders", []);
5179
+ k(this, "defaultProviderStore", []);
5180
+ k(this, "providers", [new Ft(this.defaultProviderStore)]);
5181
+ k(this, "axisLabelProviders", []);
5182
5182
  }
5183
5183
  addColumnProvider(e) {
5184
5184
  return this.providers.push(e), this;
@@ -5206,129 +5206,129 @@
5206
5206
  };
5207
5207
  let u2 = () => false;
5208
5208
  if (a) {
5209
- const f2 = (Array.isArray(a) ? a : [a]).map((v) => {
5210
- if (Le(v)) {
5209
+ const p2 = (Array.isArray(a) ? a : [a]).map((y2) => {
5210
+ if (_e(y2)) {
5211
5211
  if (!r)
5212
5212
  throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
5213
- return Gn(Mn(r.anchors, v, n2));
5213
+ return nn(We(r.anchors, y2, n2));
5214
5214
  } else
5215
- return Gn(v);
5215
+ return nn(y2);
5216
5216
  });
5217
- u2 = (v) => f2.some((b) => b(v));
5217
+ u2 = (y2) => p2.some((C2) => C2(y2));
5218
5218
  }
5219
- const c2 = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], d = [], g = /* @__PURE__ */ new Set();
5220
- for (const f$1 of c2) {
5221
- const v = Le(f$1);
5222
- let b;
5223
- if (v) {
5219
+ const h = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], f = [], g2 = /* @__PURE__ */ new Set();
5220
+ for (const p2 of h) {
5221
+ const y$1 = _e(p2);
5222
+ let C2;
5223
+ if (y$1) {
5224
5224
  if (!r)
5225
5225
  throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
5226
- b = Mn(r.anchors, f$1, n2);
5226
+ C2 = We(r.anchors, p2, n2);
5227
5227
  } else
5228
- b = f$1;
5229
- const h2 = /* @__PURE__ */ new Set(), w2 = [];
5230
- for (const A of this.providers) {
5231
- const T = A.selectColumns(b);
5232
- for (const S of T) {
5233
- if (u2(S.spec)) continue;
5234
- if (h2.has(S.id))
5235
- throw new Error(`Duplicate column id ${S.id} in provider ${A.constructor.name}`);
5236
- const F = Qn(S.spec);
5237
- g.has(F) || (h2.add(S.id), g.add(F), w2.push(S));
5228
+ C2 = p2;
5229
+ const E2 = /* @__PURE__ */ new Set(), _2 = [];
5230
+ for (const S2 of this.providers) {
5231
+ const I = S2.selectColumns(C2);
5232
+ for (const c2 of I) {
5233
+ if (u2(c2.spec)) continue;
5234
+ if (E2.has(c2.id))
5235
+ throw new Error(`Duplicate column id ${c2.id} in provider ${S2.constructor.name}`);
5236
+ const m2 = tn(c2.spec);
5237
+ g2.has(m2) || (E2.add(c2.id), g2.add(m2), _2.push(c2));
5238
5238
  }
5239
5239
  }
5240
- if (w2.length === 0) continue;
5241
- const x = Ft(f$1), C = x.length > 0;
5242
- for (const A of w2) {
5243
- if (!f(A.spec)) continue;
5244
- const T = A.spec;
5245
- if (C) {
5246
- if (Et(A.data))
5247
- throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${A.id}`);
5248
- const S = Tt(A.data);
5249
- if (!S) {
5240
+ if (_2.length === 0) continue;
5241
+ const w = Rt(p2), A2 = w.length > 0;
5242
+ for (const S2 of _2) {
5243
+ if (!d(S2.spec)) continue;
5244
+ const I = S2.spec;
5245
+ if (A2) {
5246
+ if (Lt(S2.data))
5247
+ throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${S2.id}`);
5248
+ const c2 = It(S2.data);
5249
+ if (!c2) {
5250
5250
  if (s2) continue;
5251
5251
  return;
5252
5252
  }
5253
- if (!Sn(S))
5254
- throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${S.type} for column ${A.id}`);
5255
- const F = It(S), k2 = x[x.length - 1];
5256
- if (k2 >= S.partitionKeyLength)
5257
- throw new Error(`Not enough partition keys (${S.partitionKeyLength}) for requested split axes (max index ${k2}) in column ${T.name}`);
5258
- const W = x.map((_) => this.findLabels(p$1(T.axesSpec[_]))), j2 = [], $ = (_, G) => {
5259
- if (G >= x.length) {
5260
- if (j2.push([..._]), j2.length > 1e4)
5253
+ if (!$e(c2))
5254
+ throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${c2.type} for column ${S2.id}`);
5255
+ const m2 = _t(c2), T = w[w.length - 1];
5256
+ if (T >= c2.partitionKeyLength)
5257
+ throw new Error(`Not enough partition keys (${c2.partitionKeyLength}) for requested split axes (max index ${T}) in column ${I.name}`);
5258
+ const U = w.map((L2) => this.findLabels(y(I.axesSpec[L2]))), V = [], J = (L2, W) => {
5259
+ if (W >= w.length) {
5260
+ if (V.push([...L2]), V.length > 1e4)
5261
5261
  throw new Error("Too many key combinations, aborting.");
5262
5262
  return;
5263
5263
  }
5264
- const N2 = x[G];
5265
- if (N2 >= F.length)
5266
- throw new Error(`Axis index ${N2} out of bounds for unique keys array (length ${F.length}) during split key generation for column ${A.id}`);
5267
- const J2 = F[N2];
5268
- if (!J2 || J2.length === 0) {
5269
- j2.length = 0;
5264
+ const j = w[W];
5265
+ if (j >= m2.length)
5266
+ throw new Error(`Axis index ${j} out of bounds for unique keys array (length ${m2.length}) during split key generation for column ${S2.id}`);
5267
+ const M = m2[j];
5268
+ if (!M || M.length === 0) {
5269
+ V.length = 0;
5270
5270
  return;
5271
5271
  }
5272
- for (const ee of J2)
5273
- _.push(ee), $(_, G + 1), _.pop();
5272
+ for (const Z of M)
5273
+ L2.push(Z), J(L2, W + 1), L2.pop();
5274
5274
  };
5275
- if ($([], 0), j2.length === 0)
5275
+ if (J([], 0), V.length === 0)
5276
5276
  continue;
5277
- const K2 = [...T.axesSpec], Ge = x.map((_) => _);
5278
- for (let _ = x.length - 1; _ >= 0; _--)
5279
- K2.splice(x[_], 1);
5280
- const He = { ...T, axesSpec: K2 };
5281
- for (const _ of j2) {
5282
- const G = _.map((N2, J2) => {
5283
- const ee = Ge[J2], qe = p$1(T.axesSpec[ee]), ce = W[J2], ze = (ce == null ? void 0 : ce[N2]) ?? String(N2);
5284
- return { axisIdx: ee, axisId: qe, value: N2, label: ze };
5277
+ const K = [...I.axesSpec], Ue = w.map((L2) => L2);
5278
+ for (let L2 = w.length - 1; L2 >= 0; L2--)
5279
+ K.splice(w[L2], 1);
5280
+ const We2 = { ...I, axesSpec: K };
5281
+ for (const L2 of V) {
5282
+ const W = L2.map((j, M) => {
5283
+ const Z = Ue[M], Ge = y(I.axesSpec[Z]), le = U[M], He2 = (le == null ? void 0 : le[j]) ?? String(j);
5284
+ return { axisIdx: Z, axisId: Ge, value: j, label: He2 };
5285
5285
  });
5286
- d.push({
5286
+ f.push({
5287
5287
  type: "split",
5288
- originalColumn: A,
5289
- spec: T,
5290
- adjustedSpec: He,
5291
- dataEntries: S,
5292
- axisFilters: G
5288
+ originalColumn: S2,
5289
+ spec: I,
5290
+ adjustedSpec: We2,
5291
+ dataEntries: c2,
5292
+ axisFilters: W
5293
5293
  });
5294
5294
  }
5295
5295
  } else
5296
- d.push({
5296
+ f.push({
5297
5297
  type: "direct",
5298
- originalColumn: A,
5299
- spec: T,
5300
- adjustedSpec: T
5298
+ originalColumn: S2,
5299
+ spec: I,
5300
+ adjustedSpec: I
5301
5301
  });
5302
5302
  }
5303
5303
  }
5304
- if (d.length === 0) return [];
5305
- const p2 = $e(
5306
- d,
5307
- (f2) => ({
5308
- spec: f2.spec,
5309
- suffixTrace: f2.type === "split" ? Dt(f2.axisFilters) : void 0
5304
+ if (f.length === 0) return [];
5305
+ const d$1 = Je(
5306
+ f,
5307
+ (p2) => ({
5308
+ spec: p2.spec,
5309
+ suffixTrace: p2.type === "split" ? Et(p2.axisFilters) : void 0
5310
5310
  }),
5311
5311
  l2
5312
- ), m2 = [];
5313
- for (const { value: f2, label: v } of p2) {
5314
- const { originalColumn: b, spec: h2 } = f2, w2 = f2.type === "split" ? f2.axisFilters : void 0, x = Ot(w2);
5315
- let C;
5316
- r ? C = r.deriveS(h2, x) : C = Rt(b.id, x);
5317
- let A = { ...f2.adjustedSpec };
5318
- o && (A = {
5319
- ...A,
5312
+ ), b = [];
5313
+ for (const { value: p2, label: y2 } of d$1) {
5314
+ const { originalColumn: C2, spec: E2 } = p2, _2 = p2.type === "split" ? p2.axisFilters : void 0, w = kt(_2);
5315
+ let A2;
5316
+ r ? A2 = r.deriveS(E2, w) : A2 = Dt(C2.id, w);
5317
+ let S2 = { ...p2.adjustedSpec };
5318
+ o && (S2 = {
5319
+ ...S2,
5320
5320
  annotations: {
5321
- ...A.annotations ?? {},
5322
- "pl7.app/label": v
5321
+ ...S2.annotations ?? {},
5322
+ "pl7.app/label": y2
5323
5323
  }
5324
- }), m2.push({
5325
- id: C,
5326
- spec: A,
5327
- data: () => f2.type === "split" ? Jn(Lt(f2.dataEntries, x)) : f2.originalColumn.data,
5328
- label: v
5324
+ }), b.push({
5325
+ id: A2,
5326
+ spec: S2,
5327
+ data: () => p2.type === "split" ? Ie$1(Tt(p2.dataEntries, w)) : p2.originalColumn.data,
5328
+ label: y2
5329
5329
  });
5330
5330
  }
5331
- return m2;
5331
+ return b;
5332
5332
  }
5333
5333
  getColumns(e, n2) {
5334
5334
  const r = this.getUniversalEntries(e, {
@@ -5353,19 +5353,19 @@
5353
5353
  return i;
5354
5354
  }
5355
5355
  }
5356
- function pe(t, e) {
5356
+ function ce(t, e) {
5357
5357
  if (t === void 0) return e === void 0;
5358
5358
  if (e === void 0) return true;
5359
5359
  for (const n2 in e)
5360
5360
  if (t[n2] !== e[n2]) return false;
5361
5361
  return true;
5362
5362
  }
5363
- function Ee(t) {
5364
- return Wn(t, (e) => e instanceof E ? e.handle : En(e) ? Nn(e, (n2) => n2.handle) : e);
5363
+ function Ie(t) {
5364
+ return Ze(t, (e) => e instanceof D ? e.handle : Oe(e) ? Ce(e, (n2) => n2.handle) : e);
5365
5365
  }
5366
- class Kt {
5366
+ class Ot {
5367
5367
  constructor() {
5368
- D(this, "ctx", y());
5368
+ k(this, "ctx", v());
5369
5369
  }
5370
5370
  /**
5371
5371
  * @deprecated use getOptions()
@@ -5374,28 +5374,28 @@
5374
5374
  return this.ctx.calculateOptions(e);
5375
5375
  }
5376
5376
  getOptions(e, n2) {
5377
- const r = typeof e == "function" ? e : Gn(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
5377
+ const r = typeof e == "function" ? e : nn(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
5378
5378
  let s2 = {}, o = false;
5379
- return typeof n2 < "u" && (typeof n2 == "function" ? s2 = n2 : typeof n2 == "object" && ("includeNativeLabel" in n2 || "separator" in n2 || "addLabelAsSuffix" in n2 ? s2 = n2 : (n2 = n2, s2 = n2.label ?? {}, o = n2.refsWithEnrichments ?? false))), typeof s2 == "object" ? $e(i, (a) => a.obj, s2 ?? {}).map(({ value: { ref: a }, label: l2 }) => ({
5380
- ref: te$1(a, o),
5379
+ return typeof n2 < "u" && (typeof n2 == "function" ? s2 = n2 : typeof n2 == "object" && ("includeNativeLabel" in n2 || "separator" in n2 || "addLabelAsSuffix" in n2 ? s2 = n2 : (n2 = n2, s2 = n2.label ?? {}, o = n2.refsWithEnrichments ?? false))), typeof s2 == "object" ? Je(i, (a) => a.obj, s2 ?? {}).map(({ value: { ref: a }, label: l2 }) => ({
5380
+ ref: un(a, o),
5381
5381
  label: l2
5382
5382
  })) : i.map(({ ref: a, obj: l2 }) => ({
5383
- ref: te$1(a, o),
5383
+ ref: un(a, o),
5384
5384
  label: s2(l2, a)
5385
5385
  }));
5386
5386
  }
5387
5387
  resolveAnchorCtx(e) {
5388
- if (e instanceof _n) return e;
5388
+ if (e instanceof He) return e;
5389
5389
  const n2 = {};
5390
5390
  for (const [r, i] of Object.entries(e))
5391
- if (ne(i)) {
5391
+ if (sn(i)) {
5392
5392
  const s2 = this.getPColumnSpecByRef(i);
5393
5393
  if (!s2)
5394
5394
  return;
5395
5395
  n2[r] = s2;
5396
5396
  } else
5397
5397
  n2[r] = i;
5398
- return new _n(n2);
5398
+ return new He(n2);
5399
5399
  }
5400
5400
  /**
5401
5401
  * Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
@@ -5408,7 +5408,7 @@
5408
5408
  getAnchoredPColumns(e, n2, r) {
5409
5409
  const i = this.resolveAnchorCtx(e);
5410
5410
  if (i)
5411
- return new le().addColumnProvider(this).addAxisLabelProvider(this).getColumns(n2, {
5411
+ return new ae().addColumnProvider(this).addAxisLabelProvider(this).getColumns(n2, {
5412
5412
  ...r,
5413
5413
  anchorCtx: i
5414
5414
  });
@@ -5445,7 +5445,7 @@
5445
5445
  getCanonicalOptions(e, n2, r) {
5446
5446
  const i = this.resolveAnchorCtx(e);
5447
5447
  if (!i) return;
5448
- const s2 = new le().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(n2, {
5448
+ const s2 = new ae().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(n2, {
5449
5449
  ...r,
5450
5450
  anchorCtx: i
5451
5451
  });
@@ -5469,7 +5469,7 @@
5469
5469
  ref: n2.ref,
5470
5470
  obj: {
5471
5471
  ...n2.obj,
5472
- data: new E(n2.obj.data, [n2.ref.blockId, n2.ref.name])
5472
+ data: new D(n2.obj.data, [n2.ref.blockId, n2.ref.name])
5473
5473
  }
5474
5474
  }))
5475
5475
  };
@@ -5488,9 +5488,9 @@
5488
5488
  ref: n2.ref,
5489
5489
  obj: {
5490
5490
  ...n2.obj,
5491
- data: oe$1(
5491
+ data: fn(
5492
5492
  n2.obj.data,
5493
- (r) => new E(r, [n2.ref.blockId, n2.ref.name])
5493
+ (r) => new D(r, [n2.ref.blockId, n2.ref.name])
5494
5494
  )
5495
5495
  }
5496
5496
  }))
@@ -5517,9 +5517,9 @@
5517
5517
  )) == null ? void 0 : r.obj;
5518
5518
  const n2 = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
5519
5519
  if (n2)
5520
- return Wn(
5520
+ return Ze(
5521
5521
  n2,
5522
- (i) => new E(i, [e.blockId, e.name])
5522
+ (i) => new D(i, [e.blockId, e.name])
5523
5523
  );
5524
5524
  }
5525
5525
  /**
@@ -5530,7 +5530,7 @@
5530
5530
  getPColumnByRef(e) {
5531
5531
  const n2 = this.getDataByRef(e);
5532
5532
  if (n2)
5533
- return qn(n2);
5533
+ return Ye(n2);
5534
5534
  }
5535
5535
  /**
5536
5536
  * Returns spec associated with the ref ensuring that it is a p-column spec.
@@ -5540,7 +5540,7 @@
5540
5540
  getPColumnSpecByRef(e) {
5541
5541
  const n2 = this.getSpecByRef(e);
5542
5542
  if (n2) {
5543
- if (!f(n2)) throw new Error(`not a PColumn spec (kind = ${n2.kind})`);
5543
+ if (!d(n2)) throw new Error(`not a PColumn spec (kind = ${n2.kind})`);
5544
5544
  return n2;
5545
5545
  }
5546
5546
  }
@@ -5559,13 +5559,13 @@
5559
5559
  findDataWithCompatibleSpec(e) {
5560
5560
  const n2 = [];
5561
5561
  e: for (const r of this.getData().entries) {
5562
- if (!f(r.obj.spec))
5562
+ if (!d(r.obj.spec))
5563
5563
  continue;
5564
5564
  const i = r.obj.spec;
5565
- if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && pe(e.domain, i.domain)) {
5565
+ if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && ce(e.domain, i.domain)) {
5566
5566
  for (let s2 = 0; s2 < e.axesSpec.length; ++s2) {
5567
5567
  const o = e.axesSpec[s2], a = i.axesSpec[s2];
5568
- if (o.name !== a.name || o.type !== a.type || !pe(o.domain, a.domain))
5568
+ if (o.name !== a.name || o.type !== a.type || !ce(o.domain, a.domain))
5569
5569
  continue e;
5570
5570
  }
5571
5571
  n2.push(r.obj);
@@ -5580,9 +5580,9 @@
5580
5580
  findLabels(e) {
5581
5581
  const n2 = this.getData();
5582
5582
  for (const r of n2.entries) {
5583
- if (!rn(r.obj)) continue;
5583
+ if (!ie$1(r.obj)) continue;
5584
5584
  const i = r.obj.spec;
5585
- if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && pe(e.domain, i.axesSpec[0].domain)) {
5585
+ if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && ce(e.domain, i.axesSpec[0].domain)) {
5586
5586
  if (r.obj.data.resourceType.name !== "PColumnData/Json")
5587
5587
  throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
5588
5588
  return Object.fromEntries(
@@ -5601,8 +5601,8 @@
5601
5601
  * @returns An array of PColumn objects matching the selectors. Data is loaded on first access.
5602
5602
  */
5603
5603
  selectColumns(e) {
5604
- const n2 = typeof e == "function" ? e : Gn(e);
5605
- return this.getSpecs().entries.filter(({ obj: i }) => f(i) ? n2(i) : false).map(({ ref: i, obj: s2 }) => {
5604
+ const n2 = typeof e == "function" ? e : nn(e);
5605
+ return this.getSpecs().entries.filter(({ obj: i }) => d(i) ? n2(i) : false).map(({ ref: i, obj: s2 }) => {
5606
5606
  const o = s2;
5607
5607
  let a = null;
5608
5608
  const l2 = this;
@@ -5632,39 +5632,57 @@
5632
5632
  return r;
5633
5633
  }
5634
5634
  }
5635
- class te {
5635
+ class ee {
5636
5636
  constructor() {
5637
- D(this, "ctx");
5638
- D(this, "args");
5639
- D(this, "uiState");
5640
- D(this, "_activeArgsCache");
5641
- D(this, "resultPool", new Kt());
5642
- this.ctx = y(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
5637
+ k(this, "ctx");
5638
+ k(this, "_argsCache");
5639
+ k(this, "_uiStateCache");
5640
+ k(this, "_activeArgsCache");
5641
+ k(this, "resultPool", new Ot());
5642
+ this.ctx = v();
5643
+ }
5644
+ get args() {
5645
+ if (this._argsCache === void 0) {
5646
+ const e = this.ctx.args, n2 = typeof e == "function" ? e() : e;
5647
+ this._argsCache = { v: JSON.parse(n2) };
5648
+ }
5649
+ return this._argsCache.v;
5650
+ }
5651
+ get uiState() {
5652
+ if (this._uiStateCache === void 0) {
5653
+ const e = this.ctx.uiState, n2 = typeof e == "function" ? e() : e;
5654
+ this._uiStateCache = { v: n2 ? JSON.parse(n2) : {} };
5655
+ }
5656
+ return this._uiStateCache.v;
5643
5657
  }
5644
5658
  /**
5645
5659
  * Returns args snapshot the block was executed for (i.e. when "Run" button was pressed).
5646
5660
  * Returns undefined, if block was never executed or stopped mid-way execution, so that the result was cleared.
5647
5661
  * */
5648
5662
  get activeArgs() {
5649
- return this._activeArgsCache === void 0 && (this._activeArgsCache = {
5650
- v: this.ctx.activeArgs ? JSON.parse(this.ctx.activeArgs) : void 0
5651
- }), this._activeArgsCache.v;
5663
+ if (this._activeArgsCache === void 0) {
5664
+ const e = this.ctx.activeArgs, n2 = typeof e == "function" ? e() : e;
5665
+ this._activeArgsCache = {
5666
+ v: n2 ? JSON.parse(n2) : void 0
5667
+ };
5668
+ }
5669
+ return this._activeArgsCache.v;
5652
5670
  }
5653
5671
  // /** Can be used to determine features provided by the desktop instance. */
5654
5672
  // public get featureFlags() {
5655
5673
  // return this.ctx.featureFlags;
5656
5674
  // }
5657
5675
  getNamedAccessor(e) {
5658
- return ge(
5676
+ return fe(
5659
5677
  this.ctx.getAccessorHandleByName(e),
5660
- (n2) => new E(n2, [e])
5678
+ (n2) => new D(n2, [e])
5661
5679
  );
5662
5680
  }
5663
5681
  get prerun() {
5664
- return this.getNamedAccessor(Ve);
5682
+ return this.getNamedAccessor(Ne);
5665
5683
  }
5666
5684
  get outputs() {
5667
- return this.getNamedAccessor(je);
5685
+ return this.getNamedAccessor(Ve);
5668
5686
  }
5669
5687
  /**
5670
5688
  * Find labels data for a given axis id. It will search for a label column and return its data as a map.
@@ -5676,26 +5694,35 @@
5676
5694
  }
5677
5695
  verifyInlineAndExplicitColumnsSupport(e) {
5678
5696
  var i;
5679
- const n2 = e.some((s2) => !(s2.data instanceof E) || En(s2.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
5697
+ const n2 = e.some((s2) => !(s2.data instanceof D) || Oe(s2.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
5680
5698
  if (n2 && !r) throw Error("Inline or explicit columns not supported");
5681
5699
  }
5700
+ patchPTableDef(e) {
5701
+ var n2;
5702
+ return (n2 = this.ctx.featureFlags) != null && n2.pTablePartitionFiltersSupport ? e : {
5703
+ ...e,
5704
+ partitionFilters: [],
5705
+ filters: [...e.partitionFilters, ...e.filters]
5706
+ };
5707
+ }
5682
5708
  // TODO remove all non-PColumn fields
5683
5709
  createPFrame(e) {
5684
5710
  return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
5685
- e.map((n2) => Ee(n2))
5711
+ e.map((n2) => Ie(n2))
5686
5712
  );
5687
5713
  }
5688
5714
  createPTable(e) {
5689
5715
  let n2;
5690
- return "columns" in e ? n2 = {
5716
+ return "columns" in e ? n2 = this.patchPTableDef({
5691
5717
  src: {
5692
5718
  type: "full",
5693
5719
  entries: e.columns.map((r) => ({ type: "column", column: r }))
5694
5720
  },
5695
- filters: e.filters ?? [],
5721
+ partitionFilters: e.filters ?? [],
5722
+ filters: [],
5696
5723
  sorting: e.sorting ?? []
5697
- } : n2 = e, this.verifyInlineAndExplicitColumnsSupport(Xn(n2.src)), this.ctx.createPTable(
5698
- Un(n2, (r) => Ee(r))
5724
+ }) : n2 = this.patchPTableDef(e), this.verifyInlineAndExplicitColumnsSupport(en(n2.src)), this.ctx.createPTable(
5725
+ qe$1(n2, (r) => Ie(r))
5699
5726
  );
5700
5727
  }
5701
5728
  /** @deprecated scheduled for removal from SDK */
@@ -5715,34 +5742,35 @@
5715
5742
  this.ctx.logError(e);
5716
5743
  }
5717
5744
  }
5718
- const Y = "1.37.18";
5719
- function Vt(t) {
5745
+ const z = "1.39.0";
5746
+ function Kt(t) {
5720
5747
  return t.__renderLambda === true;
5721
5748
  }
5722
- function fe(t) {
5749
+ function de(t) {
5723
5750
  if (t !== void 0)
5724
- return Vt(t) ? t.handle : t;
5751
+ return Kt(t) ? t.handle : t;
5725
5752
  }
5726
- class L {
5727
- constructor(e, n2, r, i, s2, o, a, l2) {
5728
- this._renderingMode = e, this._initialArgs = n2, this._initialUiState = r, this._outputs = i, this._inputsValid = s2, this._sections = o, this._title = a, this._enrichmentTargets = l2;
5753
+ const x = class x2 {
5754
+ constructor(e, n2, r, i, s2, o, a, l2, u2) {
5755
+ this._renderingMode = e, this._initialArgs = n2, this._initialUiState = r, this._outputs = i, this._inputsValid = s2, this._sections = o, this._title = a, this._enrichmentTargets = l2, this._featureFlags = u2;
5729
5756
  }
5730
5757
  static create(e = "Heavy") {
5731
- return new L(
5758
+ return new x2(
5732
5759
  e,
5733
5760
  void 0,
5734
5761
  {},
5735
5762
  {},
5736
- re(true),
5737
- re([]),
5763
+ ne(true),
5764
+ ne([]),
5738
5765
  void 0,
5739
- void 0
5766
+ void 0,
5767
+ { ...x2.INITIAL_BLOCK_FEATURE_FLAGS }
5740
5768
  );
5741
5769
  }
5742
5770
  output(e, n2, r = {}) {
5743
5771
  if (typeof n2 == "function") {
5744
5772
  const i = `output#${e}`;
5745
- return H(i, () => n2(new te())), new L(
5773
+ return G(i, () => n2(new ee())), new x2(
5746
5774
  this._renderingMode,
5747
5775
  this._initialArgs,
5748
5776
  this._initialUiState,
@@ -5757,10 +5785,11 @@
5757
5785
  this._inputsValid,
5758
5786
  this._sections,
5759
5787
  this._title,
5760
- this._enrichmentTargets
5788
+ this._enrichmentTargets,
5789
+ this._featureFlags
5761
5790
  );
5762
5791
  } else
5763
- return new L(
5792
+ return new x2(
5764
5793
  this._renderingMode,
5765
5794
  this._initialArgs,
5766
5795
  this._initialUiState,
@@ -5771,7 +5800,8 @@
5771
5800
  this._inputsValid,
5772
5801
  this._sections,
5773
5802
  this._title,
5774
- this._enrichmentTargets
5803
+ this._enrichmentTargets,
5804
+ this._featureFlags
5775
5805
  );
5776
5806
  }
5777
5807
  /** Shortcut for {@link output} with retentive flag set to true. */
@@ -5779,7 +5809,7 @@
5779
5809
  return this.output(e, n2, { retentive: true });
5780
5810
  }
5781
5811
  argsValid(e) {
5782
- return typeof e == "function" ? (H("inputsValid", () => e(new te())), new L(
5812
+ return typeof e == "function" ? (G("inputsValid", () => e(new ee())), new x2(
5783
5813
  this._renderingMode,
5784
5814
  this._initialArgs,
5785
5815
  this._initialUiState,
@@ -5790,8 +5820,9 @@
5790
5820
  },
5791
5821
  this._sections,
5792
5822
  this._title,
5793
- this._enrichmentTargets
5794
- )) : new L(
5823
+ this._enrichmentTargets,
5824
+ this._featureFlags
5825
+ )) : new x2(
5795
5826
  this._renderingMode,
5796
5827
  this._initialArgs,
5797
5828
  this._initialUiState,
@@ -5799,11 +5830,12 @@
5799
5830
  e,
5800
5831
  this._sections,
5801
5832
  this._title,
5802
- this._enrichmentTargets
5833
+ this._enrichmentTargets,
5834
+ this._featureFlags
5803
5835
  );
5804
5836
  }
5805
5837
  sections(e) {
5806
- return Array.isArray(e) ? this.sections(re(e)) : typeof e == "function" ? (H("sections", () => e(new te())), new L(
5838
+ return Array.isArray(e) ? this.sections(ne(e)) : typeof e == "function" ? (G("sections", () => e(new ee())), new x2(
5807
5839
  this._renderingMode,
5808
5840
  this._initialArgs,
5809
5841
  this._initialUiState,
@@ -5811,8 +5843,9 @@
5811
5843
  this._inputsValid,
5812
5844
  { __renderLambda: true, handle: "sections" },
5813
5845
  this._title,
5814
- this._enrichmentTargets
5815
- )) : new L(
5846
+ this._enrichmentTargets,
5847
+ this._featureFlags
5848
+ )) : new x2(
5816
5849
  this._renderingMode,
5817
5850
  this._initialArgs,
5818
5851
  this._initialUiState,
@@ -5820,12 +5853,13 @@
5820
5853
  this._inputsValid,
5821
5854
  e,
5822
5855
  this._title,
5823
- this._enrichmentTargets
5856
+ this._enrichmentTargets,
5857
+ this._featureFlags
5824
5858
  );
5825
5859
  }
5826
5860
  /** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
5827
5861
  title(e) {
5828
- return H("title", () => e(new te())), new L(
5862
+ return G("title", () => e(new ee())), new x2(
5829
5863
  this._renderingMode,
5830
5864
  this._initialArgs,
5831
5865
  this._initialUiState,
@@ -5833,7 +5867,8 @@
5833
5867
  this._inputsValid,
5834
5868
  this._sections,
5835
5869
  { __renderLambda: true, handle: "title" },
5836
- this._enrichmentTargets
5870
+ this._enrichmentTargets,
5871
+ this._featureFlags
5837
5872
  );
5838
5873
  }
5839
5874
  /**
@@ -5841,7 +5876,7 @@
5841
5876
  * @deprecated use {@link withArgs}
5842
5877
  * */
5843
5878
  initialArgs(e) {
5844
- return new L(
5879
+ return new x2(
5845
5880
  this._renderingMode,
5846
5881
  e,
5847
5882
  this._initialUiState,
@@ -5849,12 +5884,13 @@
5849
5884
  this._inputsValid,
5850
5885
  this._sections,
5851
5886
  this._title,
5852
- this._enrichmentTargets
5887
+ this._enrichmentTargets,
5888
+ this._featureFlags
5853
5889
  );
5854
5890
  }
5855
5891
  /** Sets initial args for the block, this value must be specified. */
5856
5892
  withArgs(e) {
5857
- return new L(
5893
+ return new x2(
5858
5894
  this._renderingMode,
5859
5895
  e,
5860
5896
  this._initialUiState,
@@ -5862,12 +5898,13 @@
5862
5898
  this._inputsValid,
5863
5899
  this._sections,
5864
5900
  this._title,
5865
- this._enrichmentTargets
5901
+ this._enrichmentTargets,
5902
+ this._featureFlags
5866
5903
  );
5867
5904
  }
5868
5905
  /** Defines type and sets initial value for block UiState. */
5869
5906
  withUiState(e) {
5870
- return new L(
5907
+ return new x2(
5871
5908
  this._renderingMode,
5872
5909
  this._initialArgs,
5873
5910
  e,
@@ -5875,7 +5912,8 @@
5875
5912
  this._inputsValid,
5876
5913
  this._sections,
5877
5914
  this._title,
5878
- this._enrichmentTargets
5915
+ this._enrichmentTargets,
5916
+ this._featureFlags
5879
5917
  );
5880
5918
  }
5881
5919
  /**
@@ -5883,7 +5921,7 @@
5883
5921
  * Influences dependency graph construction.
5884
5922
  */
5885
5923
  enriches(e) {
5886
- return H("enrichmentTargets", e), new L(
5924
+ return G("enrichmentTargets", e), new x2(
5887
5925
  this._renderingMode,
5888
5926
  this._initialArgs,
5889
5927
  this._initialUiState,
@@ -5891,7 +5929,8 @@
5891
5929
  this._inputsValid,
5892
5930
  this._sections,
5893
5931
  this._title,
5894
- { __renderLambda: true, handle: "enrichmentTargets" }
5932
+ { __renderLambda: true, handle: "enrichmentTargets" },
5933
+ this._featureFlags
5895
5934
  );
5896
5935
  }
5897
5936
  /** Renders all provided block settings into a pre-configured platforma API
@@ -5901,7 +5940,7 @@
5901
5940
  if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
5902
5941
  const e = {
5903
5942
  v3: {
5904
- sdkVersion: Y,
5943
+ sdkVersion: z,
5905
5944
  renderingMode: this._renderingMode,
5906
5945
  initialArgs: this._initialArgs,
5907
5946
  initialUiState: this._initialUiState,
@@ -5909,22 +5948,29 @@
5909
5948
  sections: this._sections,
5910
5949
  title: this._title,
5911
5950
  outputs: this._outputs,
5912
- enrichmentTargets: this._enrichmentTargets
5951
+ enrichmentTargets: this._enrichmentTargets,
5952
+ featureFlags: this._featureFlags
5913
5953
  },
5914
5954
  // fields below are added to allow previous desktop versions read generated configs
5915
- sdkVersion: Y,
5955
+ sdkVersion: z,
5916
5956
  renderingMode: this._renderingMode,
5917
5957
  initialArgs: this._initialArgs,
5918
- inputsValid: fe(this._inputsValid),
5919
- sections: fe(this._sections),
5958
+ inputsValid: de(this._inputsValid),
5959
+ sections: de(this._sections),
5920
5960
  outputs: Object.fromEntries(
5921
- Object.entries(this._outputs).map(([n2, r]) => [n2, fe(r)])
5961
+ Object.entries(this._outputs).map(([n2, r]) => [n2, de(r)])
5922
5962
  )
5923
5963
  };
5924
- return ht() ? Ke({ sdkVersion: Y }) : { config: e };
5964
+ return ft() ? Ke({ sdkVersion: z }) : { config: e };
5925
5965
  }
5926
- }
5927
- const platforma = L.create("Heavy").withArgs({ titleArg: "The title" }).output("allSpecs", (ctx) => ctx.resultPool.getSpecs()).sections((ctx) => {
5966
+ };
5967
+ k(x, "INITIAL_BLOCK_FEATURE_FLAGS", {
5968
+ supportsLazyState: true,
5969
+ requiresUIAPIVersion: 1,
5970
+ requiresModelAPIVersion: 1
5971
+ });
5972
+ let Te = x;
5973
+ const platforma = Te.create("Heavy").withArgs({ titleArg: "The title" }).output("allSpecs", (ctx) => ctx.resultPool.getSpecs()).sections((ctx) => {
5928
5974
  return [{ type: "link", href: "/", label: "Main" }];
5929
5975
  }).title((ctx) => "Pool explorer").done();
5930
5976
  exports2.platforma = platforma;