@milaboratories/milaboratories.ui-examples.model 1.1.3 → 1.1.4

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
@@ -194,10 +194,10 @@
194
194
  fieldErrors._errors.push(mapper(issue));
195
195
  } else {
196
196
  let curr = fieldErrors;
197
- let i = 0;
198
- while (i < issue.path.length) {
199
- const el = issue.path[i];
200
- const terminal = i === issue.path.length - 1;
197
+ let i2 = 0;
198
+ while (i2 < issue.path.length) {
199
+ const el = issue.path[i2];
200
+ const terminal = i2 === issue.path.length - 1;
201
201
  if (!terminal) {
202
202
  curr[el] = curr[el] || { _errors: [] };
203
203
  } else {
@@ -205,7 +205,7 @@
205
205
  curr[el]._errors.push(mapper(issue));
206
206
  }
207
207
  curr = curr[el];
208
- i++;
208
+ i2++;
209
209
  }
210
210
  }
211
211
  }
@@ -2051,14 +2051,14 @@
2051
2051
  }
2052
2052
  }
2053
2053
  if (ctx.common.async) {
2054
- return Promise.all([...ctx.data].map((item, i) => {
2055
- return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));
2054
+ return Promise.all([...ctx.data].map((item, i2) => {
2055
+ return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i2));
2056
2056
  })).then((result2) => {
2057
2057
  return ParseStatus.mergeArray(status, result2);
2058
2058
  });
2059
2059
  }
2060
- const result = [...ctx.data].map((item, i) => {
2061
- return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));
2060
+ const result = [...ctx.data].map((item, i2) => {
2061
+ return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i2));
2062
2062
  });
2063
2063
  return ParseStatus.mergeArray(status, result);
2064
2064
  }
@@ -2659,17 +2659,17 @@
2659
2659
  });
2660
2660
  }
2661
2661
  }
2662
- function mergeValues(a, b) {
2662
+ function mergeValues(a, b2) {
2663
2663
  const aType = getParsedType(a);
2664
- const bType = getParsedType(b);
2665
- if (a === b) {
2664
+ const bType = getParsedType(b2);
2665
+ if (a === b2) {
2666
2666
  return { valid: true, data: a };
2667
2667
  } else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {
2668
- const bKeys = util.objectKeys(b);
2668
+ const bKeys = util.objectKeys(b2);
2669
2669
  const sharedKeys = util.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1);
2670
- const newObj = { ...a, ...b };
2670
+ const newObj = { ...a, ...b2 };
2671
2671
  for (const key of sharedKeys) {
2672
- const sharedValue = mergeValues(a[key], b[key]);
2672
+ const sharedValue = mergeValues(a[key], b2[key]);
2673
2673
  if (!sharedValue.valid) {
2674
2674
  return { valid: false };
2675
2675
  }
@@ -2677,13 +2677,13 @@
2677
2677
  }
2678
2678
  return { valid: true, data: newObj };
2679
2679
  } else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {
2680
- if (a.length !== b.length) {
2680
+ if (a.length !== b2.length) {
2681
2681
  return { valid: false };
2682
2682
  }
2683
2683
  const newArray = [];
2684
2684
  for (let index = 0; index < a.length; index++) {
2685
2685
  const itemA = a[index];
2686
- const itemB = b[index];
2686
+ const itemB = b2[index];
2687
2687
  const sharedValue = mergeValues(itemA, itemB);
2688
2688
  if (!sharedValue.valid) {
2689
2689
  return { valid: false };
@@ -2691,7 +2691,7 @@
2691
2691
  newArray.push(sharedValue.data);
2692
2692
  }
2693
2693
  return { valid: true, data: newArray };
2694
- } else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a === +b) {
2694
+ } else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a === +b2) {
2695
2695
  return { valid: true, data: a };
2696
2696
  } else {
2697
2697
  return { valid: false };
@@ -2986,7 +2986,7 @@
2986
2986
  }
2987
2987
  return { status: status.value, value: parsedSet };
2988
2988
  }
2989
- const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));
2989
+ const elements = [...ctx.data.values()].map((item, i2) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i2)));
2990
2990
  if (ctx.common.async) {
2991
2991
  return Promise.all(elements).then((elements2) => finalizeSet(elements2));
2992
2992
  } else {
@@ -3071,29 +3071,29 @@
3071
3071
  const params = { errorMap: ctx.common.contextualErrorMap };
3072
3072
  const fn = ctx.data;
3073
3073
  if (this._def.returns instanceof ZodPromise) {
3074
- const me2 = this;
3074
+ const me = this;
3075
3075
  return OK(async function(...args) {
3076
3076
  const error = new ZodError([]);
3077
- const parsedArgs = await me2._def.args.parseAsync(args, params).catch((e) => {
3077
+ const parsedArgs = await me._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(fn, this, parsedArgs);
3082
- const parsedReturns = await me2._def.returns._def.type.parseAsync(result, params).catch((e) => {
3082
+ const parsedReturns = await me._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 me2 = this;
3089
+ const me = this;
3090
3090
  return OK(function(...args) {
3091
- const parsedArgs = me2._def.args.safeParse(args, params);
3091
+ const parsedArgs = me._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(fn, this, parsedArgs.data);
3096
- const parsedReturns = me2._def.returns.safeParse(result, params);
3096
+ const parsedReturns = me._def.returns.safeParse(result, params);
3097
3097
  if (!parsedReturns.success) {
3098
3098
  throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);
3099
3099
  }
@@ -3662,10 +3662,10 @@
3662
3662
  }
3663
3663
  }
3664
3664
  }
3665
- static create(a, b) {
3665
+ static create(a, b2) {
3666
3666
  return new ZodPipeline({
3667
3667
  in: a,
3668
- out: b,
3668
+ out: b2,
3669
3669
  typeName: ZodFirstPartyTypeKind.ZodPipeline
3670
3670
  });
3671
3671
  }
@@ -3798,7 +3798,7 @@
3798
3798
  date: (arg) => ZodDate.create({ ...arg, coerce: true })
3799
3799
  };
3800
3800
  const NEVER = INVALID;
3801
- var z$1 = /* @__PURE__ */ Object.freeze({
3801
+ var z = /* @__PURE__ */ Object.freeze({
3802
3802
  __proto__: null,
3803
3803
  defaultErrorMap: errorMap,
3804
3804
  setErrorMap,
@@ -3917,21 +3917,21 @@
3917
3917
  function f(t) {
3918
3918
  throw new Error("Unexpected object: " + t);
3919
3919
  }
3920
- function S(t) {
3921
- const { type: n, name: r, domain: e } = t;
3922
- return { type: n, name: r, ...e && { domain: e } };
3920
+ function S$1(t) {
3921
+ const { type: n, name: e, domain: r } = t;
3922
+ return { type: n, name: e, ...r && { domain: r } };
3923
3923
  }
3924
3924
  function B(t, n) {
3925
3925
  if (t === void 0) return n === void 0;
3926
3926
  if (n === void 0) return true;
3927
- for (const r in n)
3928
- if (t[r] !== n[r]) return false;
3927
+ for (const e in n)
3928
+ if (t[e] !== n[e]) return false;
3929
3929
  return true;
3930
3930
  }
3931
- function z(t, n) {
3931
+ function M(t, n) {
3932
3932
  return t.name === n.name && B(t.domain, n.domain);
3933
3933
  }
3934
- function M(t, n) {
3934
+ function q(t, n) {
3935
3935
  return { ...t, src: u$1(t.src, n) };
3936
3936
  }
3937
3937
  function u$1(t, n) {
@@ -3945,159 +3945,159 @@
3945
3945
  case "full":
3946
3946
  return {
3947
3947
  type: t.type,
3948
- entries: t.entries.map((r) => u$1(r, n))
3948
+ entries: t.entries.map((e) => u$1(e, n))
3949
3949
  };
3950
3950
  case "outer":
3951
3951
  return {
3952
3952
  type: "outer",
3953
3953
  primary: u$1(t.primary, n),
3954
- secondary: t.secondary.map((r) => u$1(r, n))
3954
+ secondary: t.secondary.map((e) => u$1(e, n))
3955
3955
  };
3956
3956
  default:
3957
3957
  f(t);
3958
3958
  }
3959
3959
  }
3960
- z$1.object({
3961
- __isRef: z$1.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
3962
- blockId: z$1.string().describe("Upstream block id"),
3963
- name: z$1.string().describe("Name of the output provided to the upstream block's output context")
3960
+ z.object({
3961
+ __isRef: z.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
3962
+ blockId: z.string().describe("Upstream block id"),
3963
+ name: z.string().describe("Name of the output provided to the upstream block's output context")
3964
3964
  }).describe(
3965
3965
  "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."
3966
3966
  ).strict().readonly();
3967
- function o(t) {
3967
+ function i(t) {
3968
3968
  return t.kind === "PColumn";
3969
3969
  }
3970
3970
  function U$1(t) {
3971
- return o(t.spec);
3971
+ return i(t.spec);
3972
3972
  }
3973
- function Y(t) {
3973
+ function Z$1(t) {
3974
3974
  if (!U$1(t)) throw new Error(`not a PColumn (kind = ${t.spec.kind})`);
3975
3975
  return t;
3976
3976
  }
3977
- function Z$1(t, n) {
3977
+ function T(t, n) {
3978
3978
  return t === void 0 ? void 0 : {
3979
3979
  ...t,
3980
3980
  data: n(t.data)
3981
3981
  };
3982
3982
  }
3983
- function T(t) {
3984
- const n = /* @__PURE__ */ new Map(), r = (e) => {
3985
- switch (e.type) {
3983
+ function v$1(t) {
3984
+ const n = /* @__PURE__ */ new Map(), e = (r) => {
3985
+ switch (r.type) {
3986
3986
  case "column":
3987
- n.set(e.column.id, e.column);
3987
+ n.set(r.column.id, r.column);
3988
3988
  return;
3989
3989
  case "full":
3990
3990
  case "inner":
3991
- for (const i of e.entries) r(i);
3991
+ for (const o of r.entries) e(o);
3992
3992
  return;
3993
3993
  case "outer":
3994
- r(e.primary);
3995
- for (const i of e.secondary) r(i);
3994
+ e(r.primary);
3995
+ for (const o of r.secondary) e(o);
3996
3996
  return;
3997
3997
  default:
3998
- f(e);
3998
+ f(r);
3999
3999
  }
4000
4000
  };
4001
- return r(t), [...n.values()];
4001
+ return e(t), [...n.values()];
4002
4002
  }
4003
- function v(t, n) {
4003
+ function tt(t, n) {
4004
4004
  return t.ok ? { ok: true, value: n(t.value) } : t;
4005
4005
  }
4006
- var pt = Object.defineProperty;
4007
- var dt = (e, t, n) => t in e ? pt(e, t, { enumerable: true, configurable: true, writable: true, value: n }) : e[t] = n;
4008
- var w = (e, t, n) => dt(e, typeof t != "symbol" ? t + "" : t, n);
4009
- function D(e) {
4010
- return { type: "Immediate", value: e };
4006
+ var de = Object.defineProperty;
4007
+ var pe = (t, e, n) => e in t ? de(t, e, { enumerable: true, configurable: true, writable: true, value: n }) : t[e] = n;
4008
+ var S = (t, e, n) => pe(t, typeof e != "symbol" ? e + "" : e, n);
4009
+ function L(t) {
4010
+ return { type: "Immediate", value: t };
4011
4011
  }
4012
- function vt() {
4012
+ function ve() {
4013
4013
  return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
4014
4014
  }
4015
- function st(e) {
4016
- if (e && typeof globalThis.getPlatforma == "function")
4017
- return globalThis.getPlatforma(e);
4015
+ function ie(t) {
4016
+ if (t && typeof globalThis.getPlatforma == "function")
4017
+ return globalThis.getPlatforma(t);
4018
4018
  if (typeof globalThis.platforma < "u") return globalThis.platforma;
4019
4019
  throw new Error("Can't get platforma instance.");
4020
4020
  }
4021
- function wt() {
4021
+ function we() {
4022
4022
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
4023
4023
  }
4024
4024
  function u() {
4025
4025
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
4026
4026
  throw new Error("Not in config rendering context");
4027
4027
  }
4028
- function O(e, t) {
4029
- const n = wt();
4028
+ function k(t, e) {
4029
+ const n = we();
4030
4030
  if (n === void 0) return false;
4031
- if (e in n.callbackRegistry) throw new Error(`Callback with key ${e} already registered.`);
4032
- return n.callbackRegistry[e] = t, true;
4031
+ if (t in n.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
4032
+ return n.callbackRegistry[t] = e, true;
4033
4033
  }
4034
4034
  const N = /* @__PURE__ */ new Map();
4035
- function St(e, t) {
4036
- e in u().callbackRegistry || (u().callbackRegistry[e] = (n) => {
4037
- for (const r of N.get(e))
4038
- r(n);
4039
- }, N.set(e, [])), N.get(e).push(t);
4035
+ function Se(t, e) {
4036
+ t in u().callbackRegistry || (u().callbackRegistry[t] = (n) => {
4037
+ for (const s of N.get(t))
4038
+ s(n);
4039
+ }, N.set(t, [])), N.get(t).push(e);
4040
4040
  }
4041
- class g {
4042
- constructor(t, n = (r) => r) {
4043
- w(this, "isResolved", false);
4044
- w(this, "resolvedValue");
4045
- this.handle = t, this.postProcess = n, St(t, (r) => {
4046
- this.resolvedValue = n(r), this.isResolved = true;
4041
+ class _ {
4042
+ constructor(e, n = (s) => s) {
4043
+ S(this, "isResolved", false);
4044
+ S(this, "resolvedValue");
4045
+ this.handle = e, this.postProcess = n, Se(e, (s) => {
4046
+ this.resolvedValue = n(s), this.isResolved = true;
4047
4047
  });
4048
4048
  }
4049
- map(t) {
4050
- return new g(this.handle, (n) => t(this.postProcess(n)));
4049
+ map(e) {
4050
+ return new _(this.handle, (n) => e(this.postProcess(n)));
4051
4051
  }
4052
- mapDefined(t) {
4053
- return new g(this.handle, (n) => {
4054
- const r = this.postProcess(n);
4055
- return r ? t(r) : void 0;
4052
+ mapDefined(e) {
4053
+ return new _(this.handle, (n) => {
4054
+ const s = this.postProcess(n);
4055
+ return s ? e(s) : void 0;
4056
4056
  });
4057
4057
  }
4058
4058
  toJSON() {
4059
4059
  return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
4060
4060
  }
4061
4061
  }
4062
- function Q(e) {
4063
- return e === void 0 ? void 0 : new _(e);
4062
+ function Q(t) {
4063
+ return t === void 0 ? void 0 : new v(t);
4064
4064
  }
4065
- class _ {
4066
- constructor(t) {
4067
- this.handle = t;
4065
+ class v {
4066
+ constructor(e) {
4067
+ this.handle = e;
4068
4068
  }
4069
- resolve(...t) {
4070
- const n = t.map(
4071
- (r) => ({
4069
+ resolve(...e) {
4070
+ const n = e.map(
4071
+ (s) => ({
4072
4072
  assertFieldType: "Input",
4073
- ...typeof r == "string" ? { field: r } : r
4073
+ ...typeof s == "string" ? { field: s } : s
4074
4074
  })
4075
4075
  );
4076
4076
  return this.resolveWithCommon({}, ...n);
4077
4077
  }
4078
- resolveOutput(...t) {
4079
- const n = t.map(
4080
- (r) => ({
4078
+ resolveOutput(...e) {
4079
+ const n = e.map(
4080
+ (s) => ({
4081
4081
  assertFieldType: "Output",
4082
- ...typeof r == "string" ? { field: r } : r
4082
+ ...typeof s == "string" ? { field: s } : s
4083
4083
  })
4084
4084
  );
4085
4085
  return this.resolveWithCommon({}, ...n);
4086
4086
  }
4087
- resolveInput(...t) {
4088
- const n = t.map(
4089
- (r) => ({
4087
+ resolveInput(...e) {
4088
+ const n = e.map(
4089
+ (s) => ({
4090
4090
  assertFieldType: "Input",
4091
- ...typeof r == "string" ? { field: r } : r
4091
+ ...typeof s == "string" ? { field: s } : s
4092
4092
  })
4093
4093
  );
4094
4094
  return this.resolveWithCommon({}, ...n);
4095
4095
  }
4096
- resolveAny(...t) {
4097
- return this.resolveWithCommon({}, ...t);
4096
+ resolveAny(...e) {
4097
+ return this.resolveWithCommon({}, ...e);
4098
4098
  }
4099
- resolveWithCommon(t, ...n) {
4100
- return Q(u().resolveWithCommon(this.handle, t, ...n));
4099
+ resolveWithCommon(e, ...n) {
4100
+ return Q(u().resolveWithCommon(this.handle, e, ...n));
4101
4101
  }
4102
4102
  get resourceType() {
4103
4103
  return u().getResourceType(this.handle);
@@ -4126,14 +4126,14 @@
4126
4126
  listDynamicFields() {
4127
4127
  return u().listDynamicFields(this.handle);
4128
4128
  }
4129
- getKeyValueBase64(t) {
4130
- return u().getKeyValueBase64(this.handle, t);
4129
+ getKeyValueBase64(e) {
4130
+ return u().getKeyValueBase64(this.handle, e);
4131
4131
  }
4132
- getKeyValueAsString(t) {
4133
- return u().getKeyValueAsString(this.handle, t);
4132
+ getKeyValueAsString(e) {
4133
+ return u().getKeyValueAsString(this.handle, e);
4134
4134
  }
4135
- getKeyValueAsJson(t) {
4136
- const n = this.getKeyValueAsString(t);
4135
+ getKeyValueAsJson(e) {
4136
+ const n = this.getKeyValueAsString(e);
4137
4137
  if (n == null) throw new Error("Resource has no content.");
4138
4138
  return JSON.parse(n);
4139
4139
  }
@@ -4144,45 +4144,45 @@
4144
4144
  return u().getDataAsString(this.handle);
4145
4145
  }
4146
4146
  getDataAsJson() {
4147
- const t = this.getDataAsString();
4148
- if (t == null) throw new Error("Resource has no content.");
4149
- return JSON.parse(t);
4147
+ const e = this.getDataAsString();
4148
+ if (e == null) throw new Error("Resource has no content.");
4149
+ return JSON.parse(e);
4150
4150
  }
4151
4151
  /**
4152
4152
  *
4153
4153
  */
4154
- getPColumns(t = false, n = "") {
4155
- const r = this.parsePObjectCollection(t, n);
4156
- return r === void 0 ? void 0 : Object.entries(r).map(([, i]) => {
4157
- if (!U$1(i)) throw new Error(`not a PColumn (kind = ${i.spec.kind})`);
4158
- return i;
4154
+ getPColumns(e = false, n = "") {
4155
+ const s = this.parsePObjectCollection(e, n);
4156
+ return s === void 0 ? void 0 : Object.entries(s).map(([, r]) => {
4157
+ if (!U$1(r)) throw new Error(`not a PColumn (kind = ${r.spec.kind})`);
4158
+ return r;
4159
4159
  });
4160
4160
  }
4161
4161
  /**
4162
4162
  *
4163
4163
  */
4164
- parsePObjectCollection(t = false, n = "") {
4165
- const r = u().parsePObjectCollection(
4164
+ parsePObjectCollection(e = false, n = "") {
4165
+ const s = u().parsePObjectCollection(
4166
4166
  this.handle,
4167
- t,
4167
+ e,
4168
4168
  n
4169
4169
  );
4170
- if (r === void 0) return;
4171
- const s = {};
4172
- for (const [i, o2] of Object.entries(r))
4173
- s[i] = Z$1(o2, (l) => new _(l));
4174
- return s;
4170
+ if (s === void 0) return;
4171
+ const i2 = {};
4172
+ for (const [r, o] of Object.entries(s))
4173
+ i2[r] = T(o, (l) => new v(l));
4174
+ return i2;
4175
4175
  }
4176
4176
  getFileContentAsBase64() {
4177
- return new g(u().getBlobContentAsBase64(this.handle));
4177
+ return new _(u().getBlobContentAsBase64(this.handle));
4178
4178
  }
4179
4179
  getFileContentAsString() {
4180
- return new g(u().getBlobContentAsString(this.handle));
4180
+ return new _(u().getBlobContentAsString(this.handle));
4181
4181
  }
4182
4182
  getFileContentAsJson() {
4183
- return new g(
4183
+ return new _(
4184
4184
  u().getBlobContentAsString(this.handle)
4185
- ).mapDefined((t) => JSON.parse(t));
4185
+ ).mapDefined((e) => JSON.parse(e));
4186
4186
  }
4187
4187
  /**
4188
4188
  * @deprecated use getFileContentAsBase64
@@ -4200,7 +4200,7 @@
4200
4200
  * @returns downloaded file handle
4201
4201
  */
4202
4202
  getFileHandle() {
4203
- return new g(u().getDownloadedBlobContentHandle(this.handle));
4203
+ return new _(u().getDownloadedBlobContentHandle(this.handle));
4204
4204
  }
4205
4205
  /**
4206
4206
  * @deprecated use getFileHandle
@@ -4212,7 +4212,7 @@
4212
4212
  * @returns downloaded file handle
4213
4213
  */
4214
4214
  getRemoteFileHandle() {
4215
- return new g(u().getOnDemandBlobContentHandle(this.handle));
4215
+ return new _(u().getOnDemandBlobContentHandle(this.handle));
4216
4216
  }
4217
4217
  /**
4218
4218
  * @deprecated use getRemoteFileHandle
@@ -4221,19 +4221,19 @@
4221
4221
  return this.getRemoteFileHandle();
4222
4222
  }
4223
4223
  getImportProgress() {
4224
- return new g(u().getImportProgress(this.handle));
4224
+ return new _(u().getImportProgress(this.handle));
4225
4225
  }
4226
- getLastLogs(t) {
4227
- return new g(u().getLastLogs(this.handle, t));
4226
+ getLastLogs(e) {
4227
+ return new _(u().getLastLogs(this.handle, e));
4228
4228
  }
4229
- getProgressLog(t) {
4230
- return new g(u().getProgressLog(this.handle, t));
4229
+ getProgressLog(e) {
4230
+ return new _(u().getProgressLog(this.handle, e));
4231
4231
  }
4232
4232
  getLogHandle() {
4233
- return new g(u().getLogHandle(this.handle));
4233
+ return new _(u().getLogHandle(this.handle));
4234
4234
  }
4235
- allFieldsResolved(t = "Input") {
4236
- switch (t) {
4235
+ allFieldsResolved(e = "Input") {
4236
+ switch (e) {
4237
4237
  case "Input":
4238
4238
  return this.getInputsLocked() && this.listInputFields().every(
4239
4239
  (n) => this.resolve({ field: n, assertFieldType: "Input" }) !== void 0
@@ -4244,104 +4244,104 @@
4244
4244
  );
4245
4245
  }
4246
4246
  }
4247
- mapFields(t, n) {
4248
- const { fieldType: r, requireLocked: s, skipUnresolved: i } = {
4247
+ mapFields(e, n) {
4248
+ const { fieldType: s, requireLocked: i2, skipUnresolved: r } = {
4249
4249
  fieldType: "Input",
4250
4250
  requireLocked: true,
4251
4251
  skipUnresolved: false,
4252
4252
  ...n
4253
- }, o2 = t;
4254
- if (s && (r === "Input" && !this.getInputsLocked() || r === "Output" && !this.getOutputsLocked()))
4253
+ }, o = e;
4254
+ if (i2 && (s === "Input" && !this.getInputsLocked() || s === "Output" && !this.getOutputsLocked()))
4255
4255
  return;
4256
- let a = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
4257
- (c) => [c, this.resolve({ field: c, assertFieldType: r })]
4256
+ let d = (s === "Input" ? this.listInputFields() : s === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
4257
+ (a) => [a, this.resolve({ field: a, assertFieldType: s })]
4258
4258
  );
4259
- return i && (a = a.filter((c) => c[1] !== void 0)), a.map(([c, f2]) => o2(c, f2));
4259
+ return r && (d = d.filter((a) => a[1] !== void 0)), d.map(([a, p]) => o(a, p));
4260
4260
  }
4261
4261
  }
4262
- const it = "staging", ot = "main";
4263
- const It = "pl7.app/label", Pt = "pl7.app/trace", Rt = z$1.object({
4264
- type: z$1.string(),
4265
- importance: z$1.number().optional(),
4266
- id: z$1.string().optional(),
4267
- label: z$1.string()
4268
- }), Ft = z$1.array(Rt), Tt = 1e-3, Ot = "__LABEL__", Z = "__LABEL__@1";
4269
- function kt(e, t, n = {}) {
4270
- const r = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), i = e.map((p) => {
4271
- var q, z2;
4272
- const m = t(p), y = (q = m.annotations) == null ? void 0 : q[It], T2 = (z2 = m.annotations) == null ? void 0 : z2[Pt], b = (T2 ? Ft.safeParse(JSON.parse(T2)).data : void 0) ?? [];
4273
- if (y) {
4274
- const v2 = { label: y, type: Ot, importance: -2 };
4275
- n.addLabelAsSuffix ? b.push(v2) : b.splice(0, 0, v2);
4262
+ const re = "staging", oe = "main";
4263
+ const Ie = "pl7.app/label", Pe = "pl7.app/trace", Re = z.object({
4264
+ type: z.string(),
4265
+ importance: z.number().optional(),
4266
+ id: z.string().optional(),
4267
+ label: z.string()
4268
+ }), Fe = z.array(Re), Te = 1e-3, Oe = "__LABEL__", Z = "__LABEL__@1";
4269
+ function ke(t, e, n = {}) {
4270
+ const s = /* @__PURE__ */ new Map(), i2 = /* @__PURE__ */ new Map(), r = t.map((c) => {
4271
+ var q2, z2;
4272
+ const m = e(c), h = (q2 = m.annotations) == null ? void 0 : q2[Ie], A = (z2 = m.annotations) == null ? void 0 : z2[Pe], y = (A ? Fe.safeParse(JSON.parse(A)).data : void 0) ?? [];
4273
+ if (h) {
4274
+ const w = { label: h, type: Oe, importance: -2 };
4275
+ n.addLabelAsSuffix ? y.push(w) : y.splice(0, 0, w);
4276
4276
  }
4277
- const E = [], W = /* @__PURE__ */ new Map();
4278
- for (let v2 = b.length - 1; v2 >= 0; --v2) {
4279
- const { type: V } = b[v2], ct = b[v2].importance ?? 0, j = (W.get(V) ?? 0) + 1;
4277
+ const C = [], W = /* @__PURE__ */ new Map();
4278
+ for (let w = y.length - 1; w >= 0; --w) {
4279
+ const { type: V } = y[w], ce = y[w].importance ?? 0, j = (W.get(V) ?? 0) + 1;
4280
4280
  W.set(V, j);
4281
- const I = `${V}@${j}`;
4282
- s.set(I, (s.get(I) ?? 0) + 1), r.set(
4283
- I,
4281
+ const R = `${V}@${j}`;
4282
+ i2.set(R, (i2.get(R) ?? 0) + 1), s.set(
4283
+ R,
4284
4284
  Math.max(
4285
- r.get(I) ?? Number.NEGATIVE_INFINITY,
4286
- ct - (b.length - v2) * Tt
4285
+ s.get(R) ?? Number.NEGATIVE_INFINITY,
4286
+ ce - (y.length - w) * Te
4287
4287
  )
4288
- ), E.push({ ...b[v2], fullType: I, occurenceIndex: j });
4288
+ ), C.push({ ...y[w], fullType: R, occurenceIndex: j });
4289
4289
  }
4290
- return E.reverse(), {
4291
- value: p,
4290
+ return C.reverse(), {
4291
+ value: c,
4292
4292
  spec: m,
4293
- label: y,
4294
- fullTrace: E
4293
+ label: h,
4294
+ fullTrace: C
4295
4295
  };
4296
- }), o2 = [], l = [], a = [...r];
4297
- a.sort(([, p], [, m]) => m - p);
4298
- for (const [p] of a)
4299
- p.endsWith("@1") || s.get(p) === e.length ? o2.push(p) : l.push(p);
4300
- const c = (p) => i.map((m) => {
4301
- const y = m.fullTrace.filter((b) => p.has(b.fullType)).map((b) => b.label), T2 = n.separator ?? " / ";
4296
+ }), o = [], l = [], d = [...s];
4297
+ d.sort(([, c], [, m]) => m - c);
4298
+ for (const [c] of d)
4299
+ c.endsWith("@1") || i2.get(c) === t.length ? o.push(c) : l.push(c);
4300
+ const a = (c) => r.map((m) => {
4301
+ const h = m.fullTrace.filter((y) => c.has(y.fullType)).map((y) => y.label), A = n.separator ?? " / ";
4302
4302
  return {
4303
- label: y.join(T2),
4303
+ label: h.join(A),
4304
4304
  value: m.value
4305
4305
  };
4306
4306
  });
4307
- if (o2.length === 0) {
4307
+ if (o.length === 0) {
4308
4308
  if (l.length !== 0) throw new Error("Assertion error.");
4309
- return c(new Set(Z));
4310
- }
4311
- let f2 = 0, S2 = 0;
4312
- for (; f2 < o2.length; ) {
4313
- const p = /* @__PURE__ */ new Set();
4314
- n.includeNativeLabel && p.add(Z);
4315
- for (let y = 0; y < f2; ++y) p.add(o2[y]);
4316
- p.add(o2[S2]);
4317
- const m = c(p);
4318
- if (new Set(m.map((y) => y.label)).size === e.length) return m;
4319
- S2++, S2 == o2.length && (f2++, S2 = f2);
4320
- }
4321
- return c(/* @__PURE__ */ new Set([...o2, ...l]));
4309
+ return a(new Set(Z));
4310
+ }
4311
+ let p = 0, g = 0;
4312
+ for (; p < o.length; ) {
4313
+ const c = /* @__PURE__ */ new Set();
4314
+ n.includeNativeLabel && c.add(Z);
4315
+ for (let h = 0; h < p; ++h) c.add(o[h]);
4316
+ c.add(o[g]);
4317
+ const m = a(c);
4318
+ if (new Set(m.map((h) => h.label)).size === t.length) return m;
4319
+ g++, g == o.length && (p++, g = p);
4320
+ }
4321
+ return a(/* @__PURE__ */ new Set([...o, ...l]));
4322
4322
  }
4323
- class Dt {
4323
+ class De {
4324
4324
  constructor() {
4325
- w(this, "ctx", u());
4326
- w(this, "defaultLabelFn", (t, n) => {
4327
- var r;
4328
- return ((r = t.annotations) == null ? void 0 : r["pl7.app/label"]) ?? "Unlabelled";
4325
+ S(this, "ctx", u());
4326
+ S(this, "defaultLabelFn", (e, n) => {
4327
+ var s;
4328
+ return ((s = e.annotations) == null ? void 0 : s["pl7.app/label"]) ?? "Unlabelled";
4329
4329
  });
4330
4330
  }
4331
4331
  /**
4332
4332
  * @deprecated use getOptions()
4333
4333
  */
4334
- calculateOptions(t) {
4335
- return this.ctx.calculateOptions(t);
4336
- }
4337
- getOptions(t, n) {
4338
- const r = this.getSpecs().entries.filter((s) => t(s.obj));
4339
- return typeof n == "object" || typeof n > "u" ? kt(r, (s) => s.obj, n ?? {}).map(({ value: { ref: s }, label: i }) => ({
4340
- ref: s,
4341
- label: i
4342
- })) : r.map((s) => ({
4343
- ref: s.ref,
4344
- label: n(s.obj, s.ref)
4334
+ calculateOptions(e) {
4335
+ return this.ctx.calculateOptions(e);
4336
+ }
4337
+ getOptions(e, n) {
4338
+ const s = this.getSpecs().entries.filter((i2) => e(i2.obj));
4339
+ return typeof n == "object" || typeof n > "u" ? ke(s, (i2) => i2.obj, n ?? {}).map(({ value: { ref: i2 }, label: r }) => ({
4340
+ ref: i2,
4341
+ label: r
4342
+ })) : s.map((i2) => ({
4343
+ ref: i2.ref,
4344
+ label: n(i2.obj, i2.ref)
4345
4345
  }));
4346
4346
  }
4347
4347
  /**
@@ -4351,14 +4351,14 @@
4351
4351
  return this.getData();
4352
4352
  }
4353
4353
  getData() {
4354
- const t = this.ctx.getDataFromResultPool();
4354
+ const e = this.ctx.getDataFromResultPool();
4355
4355
  return {
4356
- isComplete: t.isComplete,
4357
- entries: t.entries.map((n) => ({
4356
+ isComplete: e.isComplete,
4357
+ entries: e.entries.map((n) => ({
4358
4358
  ref: n.ref,
4359
4359
  obj: {
4360
4360
  ...n.obj,
4361
- data: new _(n.obj.data)
4361
+ data: new v(n.obj.data)
4362
4362
  }
4363
4363
  }))
4364
4364
  };
@@ -4370,14 +4370,14 @@
4370
4370
  return this.getDataWithErrors();
4371
4371
  }
4372
4372
  getDataWithErrors() {
4373
- const t = this.ctx.getDataWithErrorsFromResultPool();
4373
+ const e = this.ctx.getDataWithErrorsFromResultPool();
4374
4374
  return {
4375
- isComplete: t.isComplete,
4376
- entries: t.entries.map((n) => ({
4375
+ isComplete: e.isComplete,
4376
+ entries: e.entries.map((n) => ({
4377
4377
  ref: n.ref,
4378
4378
  obj: {
4379
4379
  ...n.obj,
4380
- data: v(n.obj.data, (r) => new _(r))
4380
+ data: tt(n.obj.data, (s) => new v(s))
4381
4381
  }
4382
4382
  }))
4383
4383
  };
@@ -4395,13 +4395,13 @@
4395
4395
  * @param ref a Ref
4396
4396
  * @returns data associated with the ref
4397
4397
  */
4398
- getDataByRef(t) {
4398
+ getDataByRef(e) {
4399
4399
  var n;
4400
4400
  return typeof this.ctx.getDataFromResultPoolByRef > "u" ? (n = this.getData().entries.find(
4401
- (r) => r.ref.blockId === t.blockId && r.ref.name === t.name
4402
- )) == null ? void 0 : n.obj : Z$1(
4403
- this.ctx.getDataFromResultPoolByRef(t.blockId, t.name),
4404
- (r) => new _(r)
4401
+ (s) => s.ref.blockId === e.blockId && s.ref.name === e.name
4402
+ )) == null ? void 0 : n.obj : T(
4403
+ this.ctx.getDataFromResultPoolByRef(e.blockId, e.name),
4404
+ (s) => new v(s)
4405
4405
  );
4406
4406
  }
4407
4407
  /**
@@ -4409,20 +4409,20 @@
4409
4409
  * @param ref a Ref
4410
4410
  * @returns p-column associated with the ref
4411
4411
  */
4412
- getPColumnByRef(t) {
4413
- const n = this.getDataByRef(t);
4412
+ getPColumnByRef(e) {
4413
+ const n = this.getDataByRef(e);
4414
4414
  if (n)
4415
- return Y(n);
4415
+ return Z$1(n);
4416
4416
  }
4417
4417
  /**
4418
4418
  * Returns spec associated with the ref ensuring that it is a p-column spec.
4419
4419
  * @param ref a Ref
4420
4420
  * @returns p-column spec associated with the ref
4421
4421
  */
4422
- getPColumnSpecByRef(t) {
4423
- const n = this.getSpecByRef(t);
4422
+ getPColumnSpecByRef(e) {
4423
+ const n = this.getSpecByRef(e);
4424
4424
  if (n) {
4425
- if (!o(n)) throw new Error(`not a PColumn spec (kind = ${n.kind})`);
4425
+ if (!i(n)) throw new Error(`not a PColumn spec (kind = ${n.kind})`);
4426
4426
  return n;
4427
4427
  }
4428
4428
  }
@@ -4430,56 +4430,56 @@
4430
4430
  * @param ref a Ref
4431
4431
  * @returns object spec associated with the ref
4432
4432
  */
4433
- getSpecByRef(t) {
4433
+ getSpecByRef(e) {
4434
4434
  var n;
4435
4435
  return typeof this.ctx.getSpecFromResultPoolByRef > "u" ? (n = this.getSpecs().entries.find(
4436
- (r) => r.ref.blockId === t.blockId && r.ref.name === t.name
4437
- )) == null ? void 0 : n.obj : this.ctx.getSpecFromResultPoolByRef(t.blockId, t.name);
4436
+ (s) => s.ref.blockId === e.blockId && s.ref.name === e.name
4437
+ )) == null ? void 0 : n.obj : this.ctx.getSpecFromResultPoolByRef(e.blockId, e.name);
4438
4438
  }
4439
4439
  /**
4440
4440
  * @param spec object specification
4441
4441
  * @returns array of data objects with compatible specs
4442
4442
  * @deprecated delete this method after Jan 1, 2025
4443
4443
  */
4444
- findDataWithCompatibleSpec(t) {
4444
+ findDataWithCompatibleSpec(e) {
4445
4445
  const n = [];
4446
- t: for (const r of this.getData().entries) {
4447
- if (!o(r.obj.spec))
4446
+ e: for (const s of this.getData().entries) {
4447
+ if (!i(s.obj.spec))
4448
4448
  continue;
4449
- const s = r.obj.spec;
4450
- if (t.name === s.name && t.valueType === s.valueType && t.axesSpec.length === s.axesSpec.length && $(t.domain, s.domain)) {
4451
- for (let i = 0; i < t.axesSpec.length; ++i) {
4452
- const o2 = t.axesSpec[i], l = s.axesSpec[i];
4453
- if (o2.name !== l.name || o2.type !== l.type || !$(o2.domain, l.domain))
4454
- continue t;
4449
+ const i$1 = s.obj.spec;
4450
+ if (e.name === i$1.name && e.valueType === i$1.valueType && e.axesSpec.length === i$1.axesSpec.length && $(e.domain, i$1.domain)) {
4451
+ for (let r = 0; r < e.axesSpec.length; ++r) {
4452
+ const o = e.axesSpec[r], l = i$1.axesSpec[r];
4453
+ if (o.name !== l.name || o.type !== l.type || !$(o.domain, l.domain))
4454
+ continue e;
4455
4455
  }
4456
- n.push(r.obj);
4456
+ n.push(s.obj);
4457
4457
  }
4458
4458
  }
4459
4459
  return n;
4460
4460
  }
4461
4461
  }
4462
- function $(e, t) {
4463
- if (e === void 0) return t === void 0;
4464
- if (t === void 0) return true;
4465
- for (const n in t)
4466
- if (e[n] !== t[n]) return false;
4462
+ function $(t, e) {
4463
+ if (t === void 0) return e === void 0;
4464
+ if (e === void 0) return true;
4465
+ for (const n in e)
4466
+ if (t[n] !== e[n]) return false;
4467
4467
  return true;
4468
4468
  }
4469
- class k {
4469
+ class D {
4470
4470
  constructor() {
4471
- w(this, "ctx");
4472
- w(this, "args");
4473
- w(this, "uiState");
4474
- w(this, "resultPool", new Dt());
4471
+ S(this, "ctx");
4472
+ S(this, "args");
4473
+ S(this, "uiState");
4474
+ S(this, "resultPool", new De());
4475
4475
  this.ctx = u(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : void 0;
4476
4476
  }
4477
- getNamedAccessor(t) {
4478
- const n = this.ctx.getAccessorHandleByName(t);
4479
- return n ? new _(n) : void 0;
4477
+ getNamedAccessor(e) {
4478
+ const n = this.ctx.getAccessorHandleByName(e);
4479
+ return n ? new v(n) : void 0;
4480
4480
  }
4481
4481
  get prerun() {
4482
- return this.getNamedAccessor(it);
4482
+ return this.getNamedAccessor(re);
4483
4483
  }
4484
4484
  /**
4485
4485
  * @deprecated use prerun
@@ -4494,7 +4494,7 @@
4494
4494
  return this.precalc;
4495
4495
  }
4496
4496
  get outputs() {
4497
- return this.getNamedAccessor(ot);
4497
+ return this.getNamedAccessor(oe);
4498
4498
  }
4499
4499
  /**
4500
4500
  * @deprecated use outputs
@@ -4506,92 +4506,92 @@
4506
4506
  * Find labels data for a given axis id. It will search for a label column and return its data as a map.
4507
4507
  * @returns a map of axis value => label
4508
4508
  */
4509
- findLabels(t) {
4509
+ findLabels(e) {
4510
4510
  const n = this.resultPool.getData();
4511
- for (const r of n.entries) {
4512
- if (!U$1(r.obj)) continue;
4513
- const s = r.obj.spec;
4514
- if (s.name === "pl7.app/label" && s.axesSpec.length === 1 && s.axesSpec[0].name === t.name && s.axesSpec[0].type === t.type && $(t.domain, s.axesSpec[0].domain)) {
4515
- if (r.obj.data.resourceType.name !== "PColumnData/Json")
4516
- throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
4511
+ for (const s of n.entries) {
4512
+ if (!U$1(s.obj)) continue;
4513
+ const i2 = s.obj.spec;
4514
+ if (i2.name === "pl7.app/label" && i2.axesSpec.length === 1 && i2.axesSpec[0].name === e.name && i2.axesSpec[0].type === e.type && $(e.domain, i2.axesSpec[0].domain)) {
4515
+ if (s.obj.data.resourceType.name !== "PColumnData/Json")
4516
+ throw Error(`Expected JSON column for labels, got: ${s.obj.data.resourceType.name}`);
4517
4517
  return Object.fromEntries(
4518
4518
  Object.entries(
4519
- r.obj.data.getDataAsJson().data
4520
- ).map((o2) => [JSON.parse(o2[0])[0], o2[1]])
4519
+ s.obj.data.getDataAsJson().data
4520
+ ).map((o) => [JSON.parse(o[0])[0], o[1]])
4521
4521
  );
4522
4522
  }
4523
4523
  }
4524
4524
  }
4525
- verifyInlineColumnsSupport(t) {
4526
- var s;
4527
- const n = t.some((i) => !(i.data instanceof _)), r = ((s = this.ctx.featureFlags) == null ? void 0 : s.inlineColumnsSupport) === true;
4528
- if (n && !r) throw Error("inline columns not supported");
4525
+ verifyInlineColumnsSupport(e) {
4526
+ var i2;
4527
+ const n = e.some((r) => !(r.data instanceof v)), s = ((i2 = this.ctx.featureFlags) == null ? void 0 : i2.inlineColumnsSupport) === true;
4528
+ if (n && !s) throw Error("inline columns not supported");
4529
4529
  }
4530
- createPFrame(t) {
4531
- return this.verifyInlineColumnsSupport(t), this.ctx.createPFrame(t.map((n) => Z$1(
4530
+ createPFrame(e) {
4531
+ return this.verifyInlineColumnsSupport(e), this.ctx.createPFrame(e.map((n) => T(
4532
4532
  n,
4533
- (r) => r instanceof _ ? r.handle : r
4533
+ (s) => s instanceof v ? s.handle : s
4534
4534
  )));
4535
4535
  }
4536
- createPTable(t) {
4536
+ createPTable(e) {
4537
4537
  var n;
4538
- return "columns" in t ? n = {
4538
+ return "columns" in e ? n = {
4539
4539
  src: {
4540
4540
  type: "full",
4541
- entries: t.columns.map((r) => ({ type: "column", column: r }))
4541
+ entries: e.columns.map((s) => ({ type: "column", column: s }))
4542
4542
  },
4543
- filters: t.filters ?? [],
4544
- sorting: t.sorting ?? []
4545
- } : n = t, this.verifyInlineColumnsSupport(T(n.src)), this.ctx.createPTable(M(n, (r) => Z$1(
4546
- r,
4547
- (s) => s instanceof _ ? s.handle : s
4543
+ filters: e.filters ?? [],
4544
+ sorting: e.sorting ?? []
4545
+ } : n = e, this.verifyInlineColumnsSupport(v$1(n.src)), this.ctx.createPTable(q(n, (s) => T(
4546
+ s,
4547
+ (i2) => i2 instanceof v ? i2.handle : i2
4548
4548
  )));
4549
4549
  }
4550
4550
  /** @deprecated scheduled for removal from SDK */
4551
- getBlockLabel(t) {
4552
- return this.ctx.getBlockLabel(t);
4551
+ getBlockLabel(e) {
4552
+ return this.ctx.getBlockLabel(e);
4553
4553
  }
4554
4554
  getCurrentUnstableMarker() {
4555
4555
  if (!(typeof this.ctx.getCurrentUnstableMarker > "u"))
4556
4556
  return this.ctx.getCurrentUnstableMarker();
4557
4557
  }
4558
4558
  }
4559
- const P = "1.20.6";
4560
- function xt(e) {
4561
- return e.__renderLambda === true;
4559
+ const F = "1.20.11";
4560
+ function xe(t) {
4561
+ return t.__renderLambda === true;
4562
4562
  }
4563
- function U(e) {
4564
- if (e !== void 0)
4565
- return xt(e) ? e.handle : e;
4563
+ function U(t) {
4564
+ if (t !== void 0)
4565
+ return xe(t) ? t.handle : t;
4566
4566
  }
4567
- class h {
4568
- constructor(t, n, r, s, i, o2, l) {
4569
- this._renderingMode = t, this._initialArgs = n, this._initialUiState = r, this._outputs = s, this._inputsValid = i, this._sections = o2, this._title = l;
4567
+ class b {
4568
+ constructor(e, n, s, i2, r, o, l) {
4569
+ this._renderingMode = e, this._initialArgs = n, this._initialUiState = s, this._outputs = i2, this._inputsValid = r, this._sections = o, this._title = l;
4570
4570
  }
4571
- static create(t = "Heavy") {
4572
- return new h(
4573
- t,
4571
+ static create(e = "Heavy") {
4572
+ return new b(
4573
+ e,
4574
4574
  void 0,
4575
4575
  {},
4576
4576
  {},
4577
- D(true),
4578
- D([]),
4577
+ L(true),
4578
+ L([]),
4579
4579
  void 0
4580
4580
  );
4581
4581
  }
4582
- output(t, n, r = {}) {
4582
+ output(e, n, s = {}) {
4583
4583
  if (typeof n == "function") {
4584
- const s = `output#${t}`;
4585
- return O(s, () => n(new k())), new h(
4584
+ const i2 = `output#${e}`;
4585
+ return k(i2, () => n(new D())), new b(
4586
4586
  this._renderingMode,
4587
4587
  this._initialArgs,
4588
4588
  this._initialUiState,
4589
4589
  {
4590
4590
  ...this._outputs,
4591
- [t]: {
4591
+ [e]: {
4592
4592
  __renderLambda: true,
4593
- handle: s,
4594
- ...r
4593
+ handle: i2,
4594
+ ...s
4595
4595
  }
4596
4596
  },
4597
4597
  this._inputsValid,
@@ -4599,13 +4599,13 @@
4599
4599
  this._title
4600
4600
  );
4601
4601
  } else
4602
- return new h(
4602
+ return new b(
4603
4603
  this._renderingMode,
4604
4604
  this._initialArgs,
4605
4605
  this._initialUiState,
4606
4606
  {
4607
4607
  ...this._outputs,
4608
- [t]: n
4608
+ [e]: n
4609
4609
  },
4610
4610
  this._inputsValid,
4611
4611
  this._sections,
@@ -4613,15 +4613,15 @@
4613
4613
  );
4614
4614
  }
4615
4615
  /** Shortcut for {@link output} with retentive flag set to true. */
4616
- retentiveOutput(t, n) {
4617
- return this.output(t, n, { retentive: true });
4616
+ retentiveOutput(e, n) {
4617
+ return this.output(e, n, { retentive: true });
4618
4618
  }
4619
4619
  /** @deprecated */
4620
- canRun(t) {
4621
- return this.inputsValid(t);
4620
+ canRun(e) {
4621
+ return this.inputsValid(e);
4622
4622
  }
4623
- argsValid(t) {
4624
- return typeof t == "function" ? (O("inputsValid", () => t(new k())), new h(
4623
+ argsValid(e) {
4624
+ return typeof e == "function" ? (k("inputsValid", () => e(new D())), new b(
4625
4625
  this._renderingMode,
4626
4626
  this._initialArgs,
4627
4627
  this._initialUiState,
@@ -4632,21 +4632,21 @@
4632
4632
  },
4633
4633
  this._sections,
4634
4634
  this._title
4635
- )) : new h(
4635
+ )) : new b(
4636
4636
  this._renderingMode,
4637
4637
  this._initialArgs,
4638
4638
  this._initialUiState,
4639
4639
  this._outputs,
4640
- t,
4640
+ e,
4641
4641
  this._sections,
4642
4642
  this._title
4643
4643
  );
4644
4644
  }
4645
- inputsValid(t) {
4646
- return this.argsValid(t);
4645
+ inputsValid(e) {
4646
+ return this.argsValid(e);
4647
4647
  }
4648
- sections(t) {
4649
- return Array.isArray(t) ? this.sections(D(t)) : typeof t == "function" ? (O("sections", () => t(new k())), new h(
4648
+ sections(e) {
4649
+ return Array.isArray(e) ? this.sections(L(e)) : typeof e == "function" ? (k("sections", () => e(new D())), new b(
4650
4650
  this._renderingMode,
4651
4651
  this._initialArgs,
4652
4652
  this._initialUiState,
@@ -4654,18 +4654,18 @@
4654
4654
  this._inputsValid,
4655
4655
  { __renderLambda: true, handle: "sections" },
4656
4656
  this._title
4657
- )) : new h(
4657
+ )) : new b(
4658
4658
  this._renderingMode,
4659
4659
  this._initialArgs,
4660
4660
  this._initialUiState,
4661
4661
  this._outputs,
4662
4662
  this._inputsValid,
4663
- t,
4663
+ e,
4664
4664
  this._title
4665
4665
  );
4666
4666
  }
4667
- title(t) {
4668
- return O("title", () => t(new k())), new h(
4667
+ title(e) {
4668
+ return k("title", () => e(new D())), new b(
4669
4669
  this._renderingMode,
4670
4670
  this._initialArgs,
4671
4671
  this._initialUiState,
@@ -4679,10 +4679,10 @@
4679
4679
  * Sets initial args for the block, this value must be specified.
4680
4680
  * @deprecated use {@link withArgs}
4681
4681
  * */
4682
- initialArgs(t) {
4683
- return new h(
4682
+ initialArgs(e) {
4683
+ return new b(
4684
4684
  this._renderingMode,
4685
- t,
4685
+ e,
4686
4686
  this._initialUiState,
4687
4687
  this._outputs,
4688
4688
  this._inputsValid,
@@ -4691,10 +4691,10 @@
4691
4691
  );
4692
4692
  }
4693
4693
  /** Sets initial args for the block, this value must be specified. */
4694
- withArgs(t) {
4695
- return new h(
4694
+ withArgs(e) {
4695
+ return new b(
4696
4696
  this._renderingMode,
4697
- t,
4697
+ e,
4698
4698
  this._initialUiState,
4699
4699
  this._outputs,
4700
4700
  this._inputsValid,
@@ -4703,11 +4703,11 @@
4703
4703
  );
4704
4704
  }
4705
4705
  /** Defines type and sets initial value for block UiState. */
4706
- withUiState(t) {
4707
- return new h(
4706
+ withUiState(e) {
4707
+ return new b(
4708
4708
  this._renderingMode,
4709
4709
  this._initialArgs,
4710
- t,
4710
+ e,
4711
4711
  this._outputs,
4712
4712
  this._inputsValid,
4713
4713
  this._sections,
@@ -4719,9 +4719,9 @@
4719
4719
  * other features provided by the platforma to the block. */
4720
4720
  done() {
4721
4721
  if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
4722
- const t = {
4722
+ const e = {
4723
4723
  v3: {
4724
- sdkVersion: P,
4724
+ sdkVersion: F,
4725
4725
  renderingMode: this._renderingMode,
4726
4726
  initialArgs: this._initialArgs,
4727
4727
  initialUiState: this._initialUiState,
@@ -4731,53 +4731,75 @@
4731
4731
  outputs: this._outputs
4732
4732
  },
4733
4733
  // fields below are added to allow previous desktop versions read generated configs
4734
- sdkVersion: P,
4734
+ sdkVersion: F,
4735
4735
  renderingMode: this._renderingMode,
4736
4736
  initialArgs: this._initialArgs,
4737
4737
  inputsValid: U(this._inputsValid),
4738
4738
  sections: U(this._sections),
4739
4739
  outputs: Object.fromEntries(
4740
- Object.entries(this._outputs).map(([n, r]) => [n, U(r)])
4740
+ Object.entries(this._outputs).map(([n, s]) => [n, U(s)])
4741
4741
  )
4742
4742
  };
4743
- return vt() ? st({ sdkVersion: P }) : { config: t };
4743
+ return ve() ? ie({ sdkVersion: F }) : { config: e };
4744
4744
  }
4745
4745
  }
4746
- function me(e, t, n, r) {
4747
- var o2, l;
4748
- const s = e.resultPool.getData().entries.map((a) => a.obj).filter(U$1).filter((a) => a.spec.name === "pl7.app/label" && a.spec.axesSpec.length === 1), i = /* @__PURE__ */ new Map();
4749
- for (const a of t)
4750
- for (const c of a.spec.axesSpec) {
4751
- const f2 = S(c);
4752
- for (const S$1 of s)
4753
- z(f2, S(S$1.spec.axesSpec[0])) && i.set(S$1.id, S$1);
4746
+ function mt(t, e, n, s) {
4747
+ var l, d;
4748
+ const i2 = t.resultPool.getData().entries.map((a) => a.obj).filter(U$1).filter((a) => a.spec.name === "pl7.app/label" && a.spec.axesSpec.length === 1), r = (a, p) => {
4749
+ let g = a.toString();
4750
+ if (p)
4751
+ for (const c in p)
4752
+ g += c, g += p[c];
4753
+ return g;
4754
+ }, o = /* @__PURE__ */ new Map();
4755
+ for (const a of e)
4756
+ for (const p of a.spec.axesSpec) {
4757
+ const g = S$1(p);
4758
+ for (const c of i2) {
4759
+ const m = c.spec.axesSpec[0], h = S$1(c.spec.axesSpec[0]);
4760
+ if (M(g, h)) {
4761
+ const A = Object.keys(g.domain ?? {}).length, y = Object.keys(h.domain ?? {}).length;
4762
+ if (A > y) {
4763
+ const C = r(c.id, g.domain);
4764
+ o.set(C, {
4765
+ id: C,
4766
+ spec: {
4767
+ ...c.spec,
4768
+ axesSpec: [{ ...g, annotations: m.annotations }]
4769
+ },
4770
+ data: c.data
4771
+ });
4772
+ } else
4773
+ o.set(r(c.id), c);
4774
+ }
4775
+ }
4754
4776
  }
4755
- if (![...t, ...i.values()].some(
4756
- (a) => a.data instanceof _ && !a.data.getIsReadyOrError()
4777
+ if (![...e, ...o.values()].some(
4778
+ (a) => a.data instanceof v && !a.data.getIsReadyOrError()
4757
4779
  ))
4758
- return e.createPTable({
4780
+ return t.createPTable({
4759
4781
  src: {
4760
4782
  type: "outer",
4761
4783
  primary: {
4762
4784
  type: "full",
4763
- entries: t.map((a) => ({ type: "column", column: a }))
4785
+ entries: e.map((a) => ({ type: "column", column: a }))
4764
4786
  },
4765
- secondary: [...i.values()].map((a) => ({ type: "column", column: a }))
4787
+ secondary: [...o.values()].map((a) => ({ type: "column", column: a }))
4766
4788
  },
4767
- filters: [...((o2 = n == null ? void 0 : n.pTableParams) == null ? void 0 : o2.filters) ?? [], ...r ?? []],
4768
- sorting: ((l = n == null ? void 0 : n.pTableParams) == null ? void 0 : l.sorting) ?? []
4789
+ filters: [...((l = n == null ? void 0 : n.pTableParams) == null ? void 0 : l.filters) ?? [], ...s ?? []],
4790
+ sorting: ((d = n == null ? void 0 : n.pTableParams) == null ? void 0 : d.sorting) ?? []
4769
4791
  });
4770
4792
  }
4771
- const $BlockArgs = z$1.object({
4772
- numbers: z$1.array(z$1.coerce.number())
4793
+ const $BlockArgs = z.object({
4794
+ numbers: z.array(z.coerce.number())
4773
4795
  });
4774
- const platforma = h.create("Heavy").withArgs({ numbers: [1, 2, 3] }).withUiState({ dataTableState: void 0 }).output("numbers", (ctx) => {
4796
+ const platforma = b.create("Heavy").withArgs({ numbers: [1, 2, 3] }).withUiState({ dataTableState: void 0 }).output("numbers", (ctx) => {
4775
4797
  var _a, _b;
4776
4798
  return (_b = (_a = ctx.outputs) == null ? void 0 : _a.resolve("numbers")) == null ? void 0 : _b.getDataAsJson();
4777
4799
  }).output("pt", (ctx) => {
4778
4800
  var _a, _b, _c, _d, _e;
4779
4801
  if (!((_c = (_b = (_a = ctx.uiState) == null ? void 0 : _a.dataTableState) == null ? void 0 : _b.tableState.pTableParams) == null ? void 0 : _c.filters)) return void 0;
4780
- return me(ctx, [
4802
+ return mt(ctx, [
4781
4803
  {
4782
4804
  id: "example",
4783
4805
  spec: {