@milaboratories/milaboratories.ui-examples.model 1.1.9 → 1.1.11

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
@@ -391,7 +391,7 @@
391
391
  overrideMap,
392
392
  overrideMap === errorMap ? void 0 : errorMap
393
393
  // then global default map
394
- ].filter((x2) => !!x2)
394
+ ].filter((x) => !!x)
395
395
  });
396
396
  ctx.common.issues.push(issue);
397
397
  }
@@ -454,10 +454,10 @@
454
454
  });
455
455
  const DIRTY = (value) => ({ status: "dirty", value });
456
456
  const OK = (value) => ({ status: "valid", value });
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;
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
461
  function __classPrivateFieldGet(receiver, state, kind, f2) {
462
462
  if (typeof state === "function" ? receiver !== state || !f2 : !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);
@@ -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((x2) => !!x2);
2790
+ }).filter((x) => !!x);
2791
2791
  if (ctx.common.async) {
2792
2792
  return Promise.all(items).then((results) => {
2793
2793
  return ParseStatus.mergeArray(status, results);
@@ -3045,7 +3045,7 @@
3045
3045
  ctx.schemaErrorMap,
3046
3046
  getErrorMap(),
3047
3047
  errorMap
3048
- ].filter((x2) => !!x2),
3048
+ ].filter((x) => !!x),
3049
3049
  issueData: {
3050
3050
  code: ZodIssueCode.invalid_arguments,
3051
3051
  argumentsError: error
@@ -3061,7 +3061,7 @@
3061
3061
  ctx.schemaErrorMap,
3062
3062
  getErrorMap(),
3063
3063
  errorMap
3064
- ].filter((x2) => !!x2),
3064
+ ].filter((x) => !!x),
3065
3065
  issueData: {
3066
3066
  code: ZodIssueCode.invalid_return_type,
3067
3067
  returnTypeError: error
@@ -3917,7 +3917,7 @@
3917
3917
  function b$1(t) {
3918
3918
  throw new Error("Unexpected object: " + t);
3919
3919
  }
3920
- function J(t) {
3920
+ function J$1(t) {
3921
3921
  const { type: n, name: e, domain: r } = t;
3922
3922
  return { type: n, name: e, ...r && { domain: r } };
3923
3923
  }
@@ -4000,60 +4000,60 @@
4000
4000
  };
4001
4001
  return e(t), [...n.values()];
4002
4002
  }
4003
- function mt$1(t, n) {
4003
+ function mt(t, n) {
4004
4004
  return t.ok ? { ok: true, value: n(t.value) } : t;
4005
4005
  }
4006
4006
  const Q = 24;
4007
4007
  z.string().length(Q).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
4008
- var de = Object.defineProperty;
4009
- var pe = (t, e, n) => e in t ? de(t, e, { enumerable: true, configurable: true, writable: true, value: n }) : t[e] = n;
4010
- var S = (t, e, n) => pe(t, typeof e != "symbol" ? e + "" : e, n);
4011
- function E(t) {
4012
- return { type: "Immediate", value: t };
4008
+ var fe = Object.defineProperty;
4009
+ var he = (n, e, t) => e in n ? fe(n, e, { enumerable: true, configurable: true, writable: true, value: t }) : n[e] = t;
4010
+ var w = (n, e, t) => he(n, typeof e != "symbol" ? e + "" : e, t);
4011
+ function V(n) {
4012
+ return { type: "Immediate", value: n };
4013
4013
  }
4014
- function _e() {
4014
+ function Se() {
4015
4015
  return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
4016
4016
  }
4017
- function ie(t) {
4018
- if (t && typeof globalThis.getPlatforma == "function")
4019
- return globalThis.getPlatforma(t);
4017
+ function oe(n) {
4018
+ if (n && typeof globalThis.getPlatforma == "function")
4019
+ return globalThis.getPlatforma(n);
4020
4020
  if (typeof globalThis.platforma < "u") return globalThis.platforma;
4021
4021
  throw new Error("Can't get platforma instance.");
4022
4022
  }
4023
4023
  function we() {
4024
4024
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
4025
4025
  }
4026
- function l() {
4026
+ function c() {
4027
4027
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
4028
4028
  throw new Error("Not in config rendering context");
4029
4029
  }
4030
- function L(t, e) {
4031
- const n = we();
4032
- if (n === void 0) return false;
4033
- if (t in n.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
4034
- return n.callbackRegistry[t] = e, true;
4030
+ function E(n, e) {
4031
+ const t = we();
4032
+ if (t === void 0) return false;
4033
+ if (n in t.callbackRegistry) throw new Error(`Callback with key ${n} already registered.`);
4034
+ return t.callbackRegistry[n] = e, true;
4035
4035
  }
4036
- const M = /* @__PURE__ */ new Map();
4037
- function Se(t, e) {
4038
- t in l().callbackRegistry || (l().callbackRegistry[t] = (n) => {
4039
- for (const r of M.get(t))
4040
- r(n);
4041
- }, M.set(t, [])), M.get(t).push(e);
4036
+ const J = /* @__PURE__ */ new Map();
4037
+ function Ce(n, e) {
4038
+ n in c().callbackRegistry || (c().callbackRegistry[n] = (t) => {
4039
+ for (const r of J.get(n))
4040
+ r(t);
4041
+ }, J.set(n, [])), J.get(n).push(e);
4042
4042
  }
4043
- class v {
4044
- constructor(e, n = (r) => r) {
4045
- S(this, "isResolved", false);
4046
- S(this, "resolvedValue");
4047
- this.handle = e, this.postProcess = n, Se(e, (r) => {
4048
- this.resolvedValue = n(r), this.isResolved = true;
4043
+ class _ {
4044
+ constructor(e, t = (r) => r) {
4045
+ w(this, "isResolved", false);
4046
+ w(this, "resolvedValue");
4047
+ this.handle = e, this.postProcess = t, Ce(e, (r) => {
4048
+ this.resolvedValue = t(r), this.isResolved = true;
4049
4049
  });
4050
4050
  }
4051
4051
  map(e) {
4052
- return new v(this.handle, (n) => e(this.postProcess(n)));
4052
+ return new _(this.handle, (t) => e(this.postProcess(t)));
4053
4053
  }
4054
4054
  mapDefined(e) {
4055
- return new v(this.handle, (n) => {
4056
- const r = this.postProcess(n);
4055
+ return new _(this.handle, (t) => {
4056
+ const r = this.postProcess(t);
4057
4057
  return r ? e(r) : void 0;
4058
4058
  });
4059
4059
  }
@@ -4061,100 +4061,100 @@
4061
4061
  return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
4062
4062
  }
4063
4063
  }
4064
- function K(t, e) {
4065
- return t === void 0 ? void 0 : e(t);
4064
+ function H(n, e) {
4065
+ return n === void 0 ? void 0 : e(n);
4066
4066
  }
4067
- class _ {
4068
- constructor(e, n) {
4069
- this.handle = e, this.resolvePath = n;
4067
+ class b {
4068
+ constructor(e, t) {
4069
+ this.handle = e, this.resolvePath = t;
4070
4070
  }
4071
4071
  resolve(...e) {
4072
- const n = e.map(
4072
+ const t = e.map(
4073
4073
  (r) => ({
4074
4074
  assertFieldType: "Input",
4075
4075
  ...typeof r == "string" ? { field: r } : r
4076
4076
  })
4077
4077
  );
4078
- return this.resolveWithCommon({}, ...n);
4078
+ return this.resolveWithCommon({}, ...t);
4079
4079
  }
4080
4080
  resolveOutput(...e) {
4081
- const n = e.map(
4081
+ const t = e.map(
4082
4082
  (r) => ({
4083
4083
  assertFieldType: "Output",
4084
4084
  ...typeof r == "string" ? { field: r } : r
4085
4085
  })
4086
4086
  );
4087
- return this.resolveWithCommon({}, ...n);
4087
+ return this.resolveWithCommon({}, ...t);
4088
4088
  }
4089
4089
  resolveInput(...e) {
4090
- const n = e.map(
4090
+ const t = e.map(
4091
4091
  (r) => ({
4092
4092
  assertFieldType: "Input",
4093
4093
  ...typeof r == "string" ? { field: r } : r
4094
4094
  })
4095
4095
  );
4096
- return this.resolveWithCommon({}, ...n);
4096
+ return this.resolveWithCommon({}, ...t);
4097
4097
  }
4098
4098
  resolveAny(...e) {
4099
4099
  return this.resolveWithCommon({}, ...e);
4100
4100
  }
4101
- resolveWithCommon(e, ...n) {
4101
+ resolveWithCommon(e, ...t) {
4102
4102
  const r = [
4103
4103
  ...this.resolvePath,
4104
- ...n.map((i2) => typeof i2 == "string" ? i2 : i2.field)
4104
+ ...t.map((s) => typeof s == "string" ? s : s.field)
4105
4105
  ];
4106
- return K(
4107
- l().resolveWithCommon(this.handle, e, ...n),
4108
- (i2) => new _(i2, r)
4106
+ return H(
4107
+ c().resolveWithCommon(this.handle, e, ...t),
4108
+ (s) => new b(s, r)
4109
4109
  );
4110
4110
  }
4111
4111
  get resourceType() {
4112
- return l().getResourceType(this.handle);
4112
+ return c().getResourceType(this.handle);
4113
4113
  }
4114
4114
  getInputsLocked() {
4115
- return l().getInputsLocked(this.handle);
4115
+ return c().getInputsLocked(this.handle);
4116
4116
  }
4117
4117
  getOutputsLocked() {
4118
- return l().getOutputsLocked(this.handle);
4118
+ return c().getOutputsLocked(this.handle);
4119
4119
  }
4120
4120
  getIsReadyOrError() {
4121
- return l().getIsReadyOrError(this.handle);
4121
+ return c().getIsReadyOrError(this.handle);
4122
4122
  }
4123
4123
  getIsFinal() {
4124
- return l().getIsFinal(this.handle);
4124
+ return c().getIsFinal(this.handle);
4125
4125
  }
4126
4126
  getError() {
4127
4127
  const e = [...this.resolvePath, "error"];
4128
- return K(
4129
- l().getError(this.handle),
4130
- (n) => new _(n, e)
4128
+ return H(
4129
+ c().getError(this.handle),
4130
+ (t) => new b(t, e)
4131
4131
  );
4132
4132
  }
4133
4133
  listInputFields() {
4134
- return l().listInputFields(this.handle);
4134
+ return c().listInputFields(this.handle);
4135
4135
  }
4136
4136
  listOutputFields() {
4137
- return l().listOutputFields(this.handle);
4137
+ return c().listOutputFields(this.handle);
4138
4138
  }
4139
4139
  listDynamicFields() {
4140
- return l().listDynamicFields(this.handle);
4140
+ return c().listDynamicFields(this.handle);
4141
4141
  }
4142
4142
  getKeyValueBase64(e) {
4143
- return l().getKeyValueBase64(this.handle, e);
4143
+ return c().getKeyValueBase64(this.handle, e);
4144
4144
  }
4145
4145
  getKeyValueAsString(e) {
4146
- return l().getKeyValueAsString(this.handle, e);
4146
+ return c().getKeyValueAsString(this.handle, e);
4147
4147
  }
4148
4148
  getKeyValueAsJson(e) {
4149
- const n = this.getKeyValueAsString(e);
4150
- if (n == null) throw new Error("Resource has no content.");
4151
- return JSON.parse(n);
4149
+ const t = this.getKeyValueAsString(e);
4150
+ if (t == null) throw new Error("Resource has no content.");
4151
+ return JSON.parse(t);
4152
4152
  }
4153
4153
  getDataBase64() {
4154
- return l().getDataBase64(this.handle);
4154
+ return c().getDataBase64(this.handle);
4155
4155
  }
4156
4156
  getDataAsString() {
4157
- return l().getDataAsString(this.handle);
4157
+ return c().getDataAsString(this.handle);
4158
4158
  }
4159
4159
  getDataAsJson() {
4160
4160
  const e = this.getDataAsString();
@@ -4164,40 +4164,40 @@
4164
4164
  /**
4165
4165
  *
4166
4166
  */
4167
- getPColumns(e = false, n = "") {
4168
- const r = this.parsePObjectCollection(e, n);
4169
- return r === void 0 ? void 0 : Object.entries(r).map(([, s]) => {
4170
- if (!W(s)) throw new Error(`not a PColumn (kind = ${s.spec.kind})`);
4171
- return s;
4167
+ getPColumns(e = false, t = "") {
4168
+ const r = this.parsePObjectCollection(e, t);
4169
+ return r === void 0 ? void 0 : Object.entries(r).map(([, i2]) => {
4170
+ if (!W(i2)) throw new Error(`not a PColumn (kind = ${i2.spec.kind})`);
4171
+ return i2;
4172
4172
  });
4173
4173
  }
4174
4174
  /**
4175
4175
  *
4176
4176
  */
4177
- parsePObjectCollection(e = false, n = "") {
4178
- const r = l().parsePObjectCollection(
4177
+ parsePObjectCollection(e = false, t = "") {
4178
+ const r = c().parsePObjectCollection(
4179
4179
  this.handle,
4180
4180
  e,
4181
- n,
4181
+ t,
4182
4182
  ...this.resolvePath
4183
4183
  );
4184
4184
  if (r === void 0) return;
4185
- const i2 = {};
4186
- for (const [s, o] of Object.entries(r)) {
4187
- const a = [...this.resolvePath, s];
4188
- i2[s] = lt(o, (c) => new _(c, a));
4185
+ const s = {};
4186
+ for (const [i2, o] of Object.entries(r)) {
4187
+ const l = [...this.resolvePath, i2];
4188
+ s[i2] = lt(o, (a) => new b(a, l));
4189
4189
  }
4190
- return i2;
4190
+ return s;
4191
4191
  }
4192
4192
  getFileContentAsBase64() {
4193
- return new v(l().getBlobContentAsBase64(this.handle));
4193
+ return new _(c().getBlobContentAsBase64(this.handle));
4194
4194
  }
4195
4195
  getFileContentAsString() {
4196
- return new v(l().getBlobContentAsString(this.handle));
4196
+ return new _(c().getBlobContentAsString(this.handle));
4197
4197
  }
4198
4198
  getFileContentAsJson() {
4199
- return new v(
4200
- l().getBlobContentAsString(this.handle)
4199
+ return new _(
4200
+ c().getBlobContentAsString(this.handle)
4201
4201
  ).mapDefined((e) => JSON.parse(e));
4202
4202
  }
4203
4203
  /**
@@ -4216,7 +4216,7 @@
4216
4216
  * @returns downloaded file handle
4217
4217
  */
4218
4218
  getFileHandle() {
4219
- return new v(l().getDownloadedBlobContentHandle(this.handle));
4219
+ return new _(c().getDownloadedBlobContentHandle(this.handle));
4220
4220
  }
4221
4221
  /**
4222
4222
  * @deprecated use getFileHandle
@@ -4228,7 +4228,7 @@
4228
4228
  * @returns downloaded file handle
4229
4229
  */
4230
4230
  getRemoteFileHandle() {
4231
- return new v(l().getOnDemandBlobContentHandle(this.handle));
4231
+ return new _(c().getOnDemandBlobContentHandle(this.handle));
4232
4232
  }
4233
4233
  /**
4234
4234
  * @deprecated use getRemoteFileHandle
@@ -4237,109 +4237,109 @@
4237
4237
  return this.getRemoteFileHandle();
4238
4238
  }
4239
4239
  getImportProgress() {
4240
- return new v(l().getImportProgress(this.handle));
4240
+ return new _(c().getImportProgress(this.handle));
4241
4241
  }
4242
4242
  getLastLogs(e) {
4243
- return new v(l().getLastLogs(this.handle, e));
4243
+ return new _(c().getLastLogs(this.handle, e));
4244
4244
  }
4245
4245
  getProgressLog(e) {
4246
- return new v(l().getProgressLog(this.handle, e));
4246
+ return new _(c().getProgressLog(this.handle, e));
4247
4247
  }
4248
4248
  getLogHandle() {
4249
- return new v(l().getLogHandle(this.handle));
4249
+ return new _(c().getLogHandle(this.handle));
4250
4250
  }
4251
4251
  allFieldsResolved(e = "Input") {
4252
4252
  switch (e) {
4253
4253
  case "Input":
4254
4254
  return this.getInputsLocked() && this.listInputFields().every(
4255
- (n) => this.resolve({ field: n, assertFieldType: "Input" }) !== void 0
4255
+ (t) => this.resolve({ field: t, assertFieldType: "Input" }) !== void 0
4256
4256
  );
4257
4257
  case "Output":
4258
4258
  return this.getOutputsLocked() && this.listOutputFields().every(
4259
- (n) => this.resolve({ field: n, assertFieldType: "Output" }) !== void 0
4259
+ (t) => this.resolve({ field: t, assertFieldType: "Output" }) !== void 0
4260
4260
  );
4261
4261
  }
4262
4262
  }
4263
- mapFields(e, n) {
4264
- const { fieldType: r, requireLocked: i2, skipUnresolved: s } = {
4263
+ mapFields(e, t) {
4264
+ const { fieldType: r, requireLocked: s, skipUnresolved: i2 } = {
4265
4265
  fieldType: "Input",
4266
4266
  requireLocked: true,
4267
4267
  skipUnresolved: false,
4268
- ...n
4268
+ ...t
4269
4269
  }, o = e;
4270
- if (i2 && (r === "Input" && !this.getInputsLocked() || r === "Output" && !this.getOutputsLocked()))
4270
+ if (s && (r === "Input" && !this.getInputsLocked() || r === "Output" && !this.getOutputsLocked()))
4271
4271
  return;
4272
- let c = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
4272
+ let a = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
4273
4273
  (u) => [u, this.resolve({ field: u, assertFieldType: r })]
4274
4274
  );
4275
- return s && (c = c.filter((u) => u[1] !== void 0)), c.map(([u, g]) => o(u, g));
4275
+ return i2 && (a = a.filter((u) => u[1] !== void 0)), a.map(([u, h]) => o(u, h));
4276
4276
  }
4277
4277
  }
4278
- const se = "staging", oe = "main";
4279
- const Ae = "pl7.app/label", Ie = "pl7.app/trace", Re = z.object({
4278
+ const ae = "staging", le = "main";
4279
+ const Ie = "pl7.app/label", Fe = "pl7.app/trace", Re = z.object({
4280
4280
  type: z.string(),
4281
4281
  importance: z.number().optional(),
4282
4282
  id: z.string().optional(),
4283
4283
  label: z.string()
4284
- }), Fe = z.array(Re), Te = 1e-3, Oe = "__LABEL__", Z = "__LABEL__@1";
4285
- function ke(t, e, n = {}) {
4286
- const r = /* @__PURE__ */ new Map(), i2 = /* @__PURE__ */ new Map(), s = t.map((p) => {
4287
- var R, Y;
4288
- const h = e(p), f2 = (R = h.annotations) == null ? void 0 : R[Ae], C = (Y = h.annotations) == null ? void 0 : Y[Ie], y = (C ? Fe.safeParse(JSON.parse(C)).data : void 0) ?? [];
4284
+ }), Oe = z.array(Re), Te = 1e-3, ke = "__LABEL__", ee = "__LABEL__@1";
4285
+ function xe(n, e, t = {}) {
4286
+ const r = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), i2 = n.map((p) => {
4287
+ var F, Q2;
4288
+ const g = e(p), f2 = (F = g.annotations) == null ? void 0 : F[Ie], C = (Q2 = g.annotations) == null ? void 0 : Q2[Fe], y = (C ? Oe.safeParse(JSON.parse(C)).data : void 0) ?? [];
4289
4289
  if (f2) {
4290
- const w = { label: f2, type: Oe, importance: -2 };
4291
- n.addLabelAsSuffix ? y.push(w) : y.splice(0, 0, w);
4290
+ const S = { label: f2, type: ke, importance: -2 };
4291
+ t.addLabelAsSuffix ? y.push(S) : y.splice(0, 0, S);
4292
4292
  }
4293
4293
  const I = [], D = /* @__PURE__ */ new Map();
4294
- for (let w = y.length - 1; w >= 0; --w) {
4295
- const { type: B } = y[w], ce = y[w].importance ?? 0, N = (D.get(B) ?? 0) + 1;
4296
- D.set(B, N);
4297
- const F = `${B}@${N}`;
4298
- i2.set(F, (i2.get(F) ?? 0) + 1), r.set(
4299
- F,
4294
+ for (let S = y.length - 1; S >= 0; --S) {
4295
+ const { type: M } = y[S], pe = y[S].importance ?? 0, U = (D.get(M) ?? 0) + 1;
4296
+ D.set(M, U);
4297
+ const R = `${M}@${U}`;
4298
+ s.set(R, (s.get(R) ?? 0) + 1), r.set(
4299
+ R,
4300
4300
  Math.max(
4301
- r.get(F) ?? Number.NEGATIVE_INFINITY,
4302
- ce - (y.length - w) * Te
4301
+ r.get(R) ?? Number.NEGATIVE_INFINITY,
4302
+ pe - (y.length - S) * Te
4303
4303
  )
4304
- ), I.push({ ...y[w], fullType: F, occurenceIndex: N });
4304
+ ), I.push({ ...y[S], fullType: R, occurenceIndex: U });
4305
4305
  }
4306
4306
  return I.reverse(), {
4307
4307
  value: p,
4308
- spec: h,
4308
+ spec: g,
4309
4309
  label: f2,
4310
4310
  fullTrace: I
4311
4311
  };
4312
- }), o = [], a = [], c = [...r];
4313
- c.sort(([, p], [, h]) => h - p);
4314
- for (const [p] of c)
4315
- p.endsWith("@1") || i2.get(p) === t.length ? o.push(p) : a.push(p);
4316
- const u = (p) => s.map((h) => {
4317
- const f2 = h.fullTrace.filter((y) => p.has(y.fullType)).map((y) => y.label), C = n.separator ?? " / ";
4312
+ }), o = [], l = [], a = [...r];
4313
+ a.sort(([, p], [, g]) => g - p);
4314
+ for (const [p] of a)
4315
+ p.endsWith("@1") || s.get(p) === n.length ? o.push(p) : l.push(p);
4316
+ const u = (p) => i2.map((g) => {
4317
+ const f2 = g.fullTrace.filter((y) => p.has(y.fullType)).map((y) => y.label), C = t.separator ?? " / ";
4318
4318
  return {
4319
4319
  label: f2.join(C),
4320
- value: h.value
4320
+ value: g.value
4321
4321
  };
4322
4322
  });
4323
4323
  if (o.length === 0) {
4324
- if (a.length !== 0) throw new Error("Assertion error.");
4325
- return u(new Set(Z));
4324
+ if (l.length !== 0) throw new Error("Assertion error.");
4325
+ return u(new Set(ee));
4326
4326
  }
4327
- let g = 0, d = 0;
4328
- for (; g < o.length; ) {
4327
+ let h = 0, d = 0;
4328
+ for (; h < o.length; ) {
4329
4329
  const p = /* @__PURE__ */ new Set();
4330
- n.includeNativeLabel && p.add(Z);
4331
- for (let f2 = 0; f2 < g; ++f2) p.add(o[f2]);
4330
+ t.includeNativeLabel && p.add(ee);
4331
+ for (let f2 = 0; f2 < h; ++f2) p.add(o[f2]);
4332
4332
  p.add(o[d]);
4333
- const h = u(p);
4334
- if (new Set(h.map((f2) => f2.label)).size === t.length) return h;
4335
- d++, d == o.length && (g++, d = g);
4333
+ const g = u(p);
4334
+ if (new Set(g.map((f2) => f2.label)).size === n.length) return g;
4335
+ d++, d == o.length && (h++, d = h);
4336
4336
  }
4337
- return u(/* @__PURE__ */ new Set([...o, ...a]));
4337
+ return u(/* @__PURE__ */ new Set([...o, ...l]));
4338
4338
  }
4339
4339
  class De {
4340
4340
  constructor() {
4341
- S(this, "ctx", l());
4342
- S(this, "defaultLabelFn", (e, n) => {
4341
+ w(this, "ctx", c());
4342
+ w(this, "defaultLabelFn", (e, t) => {
4343
4343
  var r;
4344
4344
  return ((r = e.annotations) == null ? void 0 : r["pl7.app/label"]) ?? "Unlabelled";
4345
4345
  });
@@ -4350,14 +4350,14 @@
4350
4350
  calculateOptions(e) {
4351
4351
  return this.ctx.calculateOptions(e);
4352
4352
  }
4353
- getOptions(e, n) {
4354
- const r = this.getSpecs().entries.filter((i2) => e(i2.obj));
4355
- return typeof n == "object" || typeof n > "u" ? ke(r, (i2) => i2.obj, n ?? {}).map(({ value: { ref: i2 }, label: s }) => ({
4356
- ref: i2,
4357
- label: s
4358
- })) : r.map((i2) => ({
4359
- ref: i2.ref,
4360
- label: n(i2.obj, i2.ref)
4353
+ getOptions(e, t) {
4354
+ const r = this.getSpecs().entries.filter((s) => e(s.obj));
4355
+ return typeof t == "object" || typeof t > "u" ? xe(r, (s) => s.obj, t ?? {}).map(({ value: { ref: s }, label: i2 }) => ({
4356
+ ref: s,
4357
+ label: i2
4358
+ })) : r.map((s) => ({
4359
+ ref: s.ref,
4360
+ label: t(s.obj, s.ref)
4361
4361
  }));
4362
4362
  }
4363
4363
  /**
@@ -4370,11 +4370,11 @@
4370
4370
  const e = this.ctx.getDataFromResultPool();
4371
4371
  return {
4372
4372
  isComplete: e.isComplete,
4373
- entries: e.entries.map((n) => ({
4374
- ref: n.ref,
4373
+ entries: e.entries.map((t) => ({
4374
+ ref: t.ref,
4375
4375
  obj: {
4376
- ...n.obj,
4377
- data: new _(n.obj.data, [n.ref.blockId, n.ref.name])
4376
+ ...t.obj,
4377
+ data: new b(t.obj.data, [t.ref.blockId, t.ref.name])
4378
4378
  }
4379
4379
  }))
4380
4380
  };
@@ -4389,13 +4389,13 @@
4389
4389
  const e = this.ctx.getDataWithErrorsFromResultPool();
4390
4390
  return {
4391
4391
  isComplete: e.isComplete,
4392
- entries: e.entries.map((n) => ({
4393
- ref: n.ref,
4392
+ entries: e.entries.map((t) => ({
4393
+ ref: t.ref,
4394
4394
  obj: {
4395
- ...n.obj,
4396
- data: mt$1(
4397
- n.obj.data,
4398
- (r) => new _(r, [n.ref.blockId, n.ref.name])
4395
+ ...t.obj,
4396
+ data: mt(
4397
+ t.obj.data,
4398
+ (r) => new b(r, [t.ref.blockId, t.ref.name])
4399
4399
  )
4400
4400
  }
4401
4401
  }))
@@ -4415,12 +4415,12 @@
4415
4415
  * @returns data associated with the ref
4416
4416
  */
4417
4417
  getDataByRef(e) {
4418
- var n;
4419
- return typeof this.ctx.getDataFromResultPoolByRef > "u" ? (n = this.getData().entries.find(
4418
+ var t;
4419
+ return typeof this.ctx.getDataFromResultPoolByRef > "u" ? (t = this.getData().entries.find(
4420
4420
  (r) => r.ref.blockId === e.blockId && r.ref.name === e.name
4421
- )) == null ? void 0 : n.obj : lt(
4421
+ )) == null ? void 0 : t.obj : lt(
4422
4422
  this.ctx.getDataFromResultPoolByRef(e.blockId, e.name),
4423
- (r) => new _(r, [e.blockId, e.name])
4423
+ (r) => new b(r, [e.blockId, e.name])
4424
4424
  );
4425
4425
  }
4426
4426
  /**
@@ -4429,9 +4429,9 @@
4429
4429
  * @returns p-column associated with the ref
4430
4430
  */
4431
4431
  getPColumnByRef(e) {
4432
- const n = this.getDataByRef(e);
4433
- if (n)
4434
- return dt(n);
4432
+ const t = this.getDataByRef(e);
4433
+ if (t)
4434
+ return dt(t);
4435
4435
  }
4436
4436
  /**
4437
4437
  * Returns spec associated with the ref ensuring that it is a p-column spec.
@@ -4439,10 +4439,10 @@
4439
4439
  * @returns p-column spec associated with the ref
4440
4440
  */
4441
4441
  getPColumnSpecByRef(e) {
4442
- const n = this.getSpecByRef(e);
4443
- if (n) {
4444
- if (!i(n)) throw new Error(`not a PColumn spec (kind = ${n.kind})`);
4445
- return n;
4442
+ const t = this.getSpecByRef(e);
4443
+ if (t) {
4444
+ if (!i(t)) throw new Error(`not a PColumn spec (kind = ${t.kind})`);
4445
+ return t;
4446
4446
  }
4447
4447
  }
4448
4448
  /**
@@ -4450,10 +4450,10 @@
4450
4450
  * @returns object spec associated with the ref
4451
4451
  */
4452
4452
  getSpecByRef(e) {
4453
- var n;
4454
- return typeof this.ctx.getSpecFromResultPoolByRef > "u" ? (n = this.getSpecs().entries.find(
4453
+ var t;
4454
+ return typeof this.ctx.getSpecFromResultPoolByRef > "u" ? (t = this.getSpecs().entries.find(
4455
4455
  (r) => r.ref.blockId === e.blockId && r.ref.name === e.name
4456
- )) == null ? void 0 : n.obj : this.ctx.getSpecFromResultPoolByRef(e.blockId, e.name);
4456
+ )) == null ? void 0 : t.obj : this.ctx.getSpecFromResultPoolByRef(e.blockId, e.name);
4457
4457
  }
4458
4458
  /**
4459
4459
  * @param spec object specification
@@ -4461,46 +4461,46 @@
4461
4461
  * @deprecated delete this method after Jan 1, 2025
4462
4462
  */
4463
4463
  findDataWithCompatibleSpec(e) {
4464
- const n = [];
4464
+ const t = [];
4465
4465
  e: for (const r of this.getData().entries) {
4466
4466
  if (!i(r.obj.spec))
4467
4467
  continue;
4468
- const i$1 = r.obj.spec;
4469
- if (e.name === i$1.name && e.valueType === i$1.valueType && e.axesSpec.length === i$1.axesSpec.length && H(e.domain, i$1.domain)) {
4470
- for (let s = 0; s < e.axesSpec.length; ++s) {
4471
- const o = e.axesSpec[s], a = i$1.axesSpec[s];
4472
- if (o.name !== a.name || o.type !== a.type || !H(o.domain, a.domain))
4468
+ const s = r.obj.spec;
4469
+ if (e.name === s.name && e.valueType === s.valueType && e.axesSpec.length === s.axesSpec.length && q(e.domain, s.domain)) {
4470
+ for (let i2 = 0; i2 < e.axesSpec.length; ++i2) {
4471
+ const o = e.axesSpec[i2], l = s.axesSpec[i2];
4472
+ if (o.name !== l.name || o.type !== l.type || !q(o.domain, l.domain))
4473
4473
  continue e;
4474
4474
  }
4475
- n.push(r.obj);
4475
+ t.push(r.obj);
4476
4476
  }
4477
4477
  }
4478
- return n;
4478
+ return t;
4479
4479
  }
4480
4480
  }
4481
- function H(t, e) {
4482
- if (t === void 0) return e === void 0;
4481
+ function q(n, e) {
4482
+ if (n === void 0) return e === void 0;
4483
4483
  if (e === void 0) return true;
4484
- for (const n in e)
4485
- if (t[n] !== e[n]) return false;
4484
+ for (const t in e)
4485
+ if (n[t] !== e[t]) return false;
4486
4486
  return true;
4487
4487
  }
4488
- class x {
4488
+ class L {
4489
4489
  constructor() {
4490
- S(this, "ctx");
4491
- S(this, "args");
4492
- S(this, "uiState");
4493
- S(this, "resultPool", new De());
4494
- this.ctx = l(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
4490
+ w(this, "ctx");
4491
+ w(this, "args");
4492
+ w(this, "uiState");
4493
+ w(this, "resultPool", new De());
4494
+ this.ctx = c(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
4495
4495
  }
4496
4496
  getNamedAccessor(e) {
4497
- return K(
4497
+ return H(
4498
4498
  this.ctx.getAccessorHandleByName(e),
4499
- (n) => new _(n, [e])
4499
+ (t) => new b(t, [e])
4500
4500
  );
4501
4501
  }
4502
4502
  get prerun() {
4503
- return this.getNamedAccessor(se);
4503
+ return this.getNamedAccessor(ae);
4504
4504
  }
4505
4505
  /**
4506
4506
  * @deprecated use prerun
@@ -4515,7 +4515,7 @@
4515
4515
  return this.precalc;
4516
4516
  }
4517
4517
  get outputs() {
4518
- return this.getNamedAccessor(oe);
4518
+ return this.getNamedAccessor(le);
4519
4519
  }
4520
4520
  /**
4521
4521
  * @deprecated use outputs
@@ -4528,11 +4528,11 @@
4528
4528
  * @returns a map of axis value => label
4529
4529
  */
4530
4530
  findLabels(e) {
4531
- const n = this.resultPool.getData();
4532
- for (const r of n.entries) {
4531
+ const t = this.resultPool.getData();
4532
+ for (const r of t.entries) {
4533
4533
  if (!W(r.obj)) continue;
4534
- const i2 = r.obj.spec;
4535
- if (i2.name === "pl7.app/label" && i2.axesSpec.length === 1 && i2.axesSpec[0].name === e.name && i2.axesSpec[0].type === e.type && H(e.domain, i2.axesSpec[0].domain)) {
4534
+ const s = r.obj.spec;
4535
+ if (s.name === "pl7.app/label" && s.axesSpec.length === 1 && s.axesSpec[0].name === e.name && s.axesSpec[0].type === e.type && q(e.domain, s.axesSpec[0].domain)) {
4536
4536
  if (r.obj.data.resourceType.name !== "PColumnData/Json")
4537
4537
  throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
4538
4538
  return Object.fromEntries(
@@ -4544,28 +4544,28 @@
4544
4544
  }
4545
4545
  }
4546
4546
  verifyInlineColumnsSupport(e) {
4547
- var i2;
4548
- const n = e.some((s) => !(s.data instanceof _)), r = ((i2 = this.ctx.featureFlags) == null ? void 0 : i2.inlineColumnsSupport) === true;
4549
- if (n && !r) throw Error("inline columns not supported");
4547
+ var s;
4548
+ const t = e.some((i2) => !(i2.data instanceof b)), r = ((s = this.ctx.featureFlags) == null ? void 0 : s.inlineColumnsSupport) === true;
4549
+ if (t && !r) throw Error("inline columns not supported");
4550
4550
  }
4551
4551
  createPFrame(e) {
4552
4552
  return this.verifyInlineColumnsSupport(e), this.ctx.createPFrame(
4553
- e.map((n) => lt(n, (r) => r instanceof _ ? r.handle : r))
4553
+ e.map((t) => lt(t, (r) => r instanceof b ? r.handle : r))
4554
4554
  );
4555
4555
  }
4556
4556
  createPTable(e) {
4557
- var n;
4558
- return "columns" in e ? n = {
4557
+ var t;
4558
+ return "columns" in e ? t = {
4559
4559
  src: {
4560
4560
  type: "full",
4561
4561
  entries: e.columns.map((r) => ({ type: "column", column: r }))
4562
4562
  },
4563
4563
  filters: e.filters ?? [],
4564
4564
  sorting: e.sorting ?? []
4565
- } : n = e, this.verifyInlineColumnsSupport(pt(n.src)), this.ctx.createPTable(
4565
+ } : t = e, this.verifyInlineColumnsSupport(pt(t.src)), this.ctx.createPTable(
4566
4566
  it(
4567
- n,
4568
- (r) => lt(r, (i2) => i2 instanceof _ ? i2.handle : i2)
4567
+ t,
4568
+ (r) => lt(r, (s) => s instanceof b ? s.handle : s)
4569
4569
  )
4570
4570
  );
4571
4571
  }
@@ -4578,33 +4578,33 @@
4578
4578
  return this.ctx.getCurrentUnstableMarker();
4579
4579
  }
4580
4580
  }
4581
- const T = "1.21.0";
4582
- function xe(t) {
4583
- return t.__renderLambda === true;
4581
+ const T = "1.21.20";
4582
+ function Le(n) {
4583
+ return n.__renderLambda === true;
4584
4584
  }
4585
- function $(t) {
4586
- if (t !== void 0)
4587
- return xe(t) ? t.handle : t;
4585
+ function G(n) {
4586
+ if (n !== void 0)
4587
+ return Le(n) ? n.handle : n;
4588
4588
  }
4589
- class b {
4590
- constructor(e, n, r, i2, s, o, a) {
4591
- this._renderingMode = e, this._initialArgs = n, this._initialUiState = r, this._outputs = i2, this._inputsValid = s, this._sections = o, this._title = a;
4589
+ class v {
4590
+ constructor(e, t, r, s, i2, o, l) {
4591
+ this._renderingMode = e, this._initialArgs = t, this._initialUiState = r, this._outputs = s, this._inputsValid = i2, this._sections = o, this._title = l;
4592
4592
  }
4593
4593
  static create(e = "Heavy") {
4594
- return new b(
4594
+ return new v(
4595
4595
  e,
4596
4596
  void 0,
4597
4597
  {},
4598
4598
  {},
4599
- E(true),
4600
- E([]),
4599
+ V(true),
4600
+ V([]),
4601
4601
  void 0
4602
4602
  );
4603
4603
  }
4604
- output(e, n, r = {}) {
4605
- if (typeof n == "function") {
4606
- const i2 = `output#${e}`;
4607
- return L(i2, () => n(new x())), new b(
4604
+ output(e, t, r = {}) {
4605
+ if (typeof t == "function") {
4606
+ const s = `output#${e}`;
4607
+ return E(s, () => t(new L())), new v(
4608
4608
  this._renderingMode,
4609
4609
  this._initialArgs,
4610
4610
  this._initialUiState,
@@ -4612,7 +4612,7 @@
4612
4612
  ...this._outputs,
4613
4613
  [e]: {
4614
4614
  __renderLambda: true,
4615
- handle: i2,
4615
+ handle: s,
4616
4616
  ...r
4617
4617
  }
4618
4618
  },
@@ -4621,13 +4621,13 @@
4621
4621
  this._title
4622
4622
  );
4623
4623
  } else
4624
- return new b(
4624
+ return new v(
4625
4625
  this._renderingMode,
4626
4626
  this._initialArgs,
4627
4627
  this._initialUiState,
4628
4628
  {
4629
4629
  ...this._outputs,
4630
- [e]: n
4630
+ [e]: t
4631
4631
  },
4632
4632
  this._inputsValid,
4633
4633
  this._sections,
@@ -4635,15 +4635,15 @@
4635
4635
  );
4636
4636
  }
4637
4637
  /** Shortcut for {@link output} with retentive flag set to true. */
4638
- retentiveOutput(e, n) {
4639
- return this.output(e, n, { retentive: true });
4638
+ retentiveOutput(e, t) {
4639
+ return this.output(e, t, { retentive: true });
4640
4640
  }
4641
4641
  /** @deprecated */
4642
4642
  canRun(e) {
4643
4643
  return this.inputsValid(e);
4644
4644
  }
4645
4645
  argsValid(e) {
4646
- return typeof e == "function" ? (L("inputsValid", () => e(new x())), new b(
4646
+ return typeof e == "function" ? (E("inputsValid", () => e(new L())), new v(
4647
4647
  this._renderingMode,
4648
4648
  this._initialArgs,
4649
4649
  this._initialUiState,
@@ -4654,7 +4654,7 @@
4654
4654
  },
4655
4655
  this._sections,
4656
4656
  this._title
4657
- )) : new b(
4657
+ )) : new v(
4658
4658
  this._renderingMode,
4659
4659
  this._initialArgs,
4660
4660
  this._initialUiState,
@@ -4668,7 +4668,7 @@
4668
4668
  return this.argsValid(e);
4669
4669
  }
4670
4670
  sections(e) {
4671
- return Array.isArray(e) ? this.sections(E(e)) : typeof e == "function" ? (L("sections", () => e(new x())), new b(
4671
+ return Array.isArray(e) ? this.sections(V(e)) : typeof e == "function" ? (E("sections", () => e(new L())), new v(
4672
4672
  this._renderingMode,
4673
4673
  this._initialArgs,
4674
4674
  this._initialUiState,
@@ -4676,7 +4676,7 @@
4676
4676
  this._inputsValid,
4677
4677
  { __renderLambda: true, handle: "sections" },
4678
4678
  this._title
4679
- )) : new b(
4679
+ )) : new v(
4680
4680
  this._renderingMode,
4681
4681
  this._initialArgs,
4682
4682
  this._initialUiState,
@@ -4687,7 +4687,7 @@
4687
4687
  );
4688
4688
  }
4689
4689
  title(e) {
4690
- return L("title", () => e(new x())), new b(
4690
+ return E("title", () => e(new L())), new v(
4691
4691
  this._renderingMode,
4692
4692
  this._initialArgs,
4693
4693
  this._initialUiState,
@@ -4702,7 +4702,7 @@
4702
4702
  * @deprecated use {@link withArgs}
4703
4703
  * */
4704
4704
  initialArgs(e) {
4705
- return new b(
4705
+ return new v(
4706
4706
  this._renderingMode,
4707
4707
  e,
4708
4708
  this._initialUiState,
@@ -4714,7 +4714,7 @@
4714
4714
  }
4715
4715
  /** Sets initial args for the block, this value must be specified. */
4716
4716
  withArgs(e) {
4717
- return new b(
4717
+ return new v(
4718
4718
  this._renderingMode,
4719
4719
  e,
4720
4720
  this._initialUiState,
@@ -4726,7 +4726,7 @@
4726
4726
  }
4727
4727
  /** Defines type and sets initial value for block UiState. */
4728
4728
  withUiState(e) {
4729
- return new b(
4729
+ return new v(
4730
4730
  this._renderingMode,
4731
4731
  this._initialArgs,
4732
4732
  e,
@@ -4756,81 +4756,81 @@
4756
4756
  sdkVersion: T,
4757
4757
  renderingMode: this._renderingMode,
4758
4758
  initialArgs: this._initialArgs,
4759
- inputsValid: $(this._inputsValid),
4760
- sections: $(this._sections),
4759
+ inputsValid: G(this._inputsValid),
4760
+ sections: G(this._sections),
4761
4761
  outputs: Object.fromEntries(
4762
- Object.entries(this._outputs).map(([n, r]) => [n, $(r)])
4762
+ Object.entries(this._outputs).map(([t, r]) => [t, G(r)])
4763
4763
  )
4764
4764
  };
4765
- return _e() ? ie({ sdkVersion: T }) : { config: e };
4765
+ return Se() ? oe({ sdkVersion: T }) : { config: e };
4766
4766
  }
4767
4767
  }
4768
- function mt(t, e, n, r) {
4769
- var u, g;
4768
+ function _t(n, e, t, r) {
4769
+ var u, h;
4770
4770
  Array.isArray(r) && (r = { filters: r });
4771
- const i2 = t.resultPool.getData().entries.map((d) => d.obj).filter(W).filter((d) => d.spec.name === "pl7.app/label" && d.spec.axesSpec.length === 1), s = (d, p) => {
4772
- let h = d.toString();
4771
+ const s = n.resultPool.getData().entries.map((d) => d.obj).filter(W).filter((d) => d.spec.name === "pl7.app/label" && d.spec.axesSpec.length === 1), i2 = (d, p) => {
4772
+ let g = d.toString();
4773
4773
  if (p)
4774
4774
  for (const f2 in p)
4775
- h += f2, h += p[f2];
4776
- return h;
4775
+ g += f2, g += p[f2];
4776
+ return g;
4777
4777
  }, o = /* @__PURE__ */ new Map();
4778
4778
  for (const d of e)
4779
4779
  for (const p of d.spec.axesSpec) {
4780
- const h = J(p);
4781
- for (const f2 of i2) {
4782
- const C = f2.spec.axesSpec[0], y = J(f2.spec.axesSpec[0]);
4783
- if (ot(h, y)) {
4784
- const I = Object.keys(h.domain ?? {}).length, D = Object.keys(y.domain ?? {}).length;
4780
+ const g = J$1(p);
4781
+ for (const f2 of s) {
4782
+ const C = f2.spec.axesSpec[0], y = J$1(f2.spec.axesSpec[0]);
4783
+ if (ot(g, y)) {
4784
+ const I = Object.keys(g.domain ?? {}).length, D = Object.keys(y.domain ?? {}).length;
4785
4785
  if (I > D) {
4786
- const R = s(f2.id, h.domain);
4787
- o.set(R, {
4788
- id: R,
4786
+ const F = i2(f2.id, g.domain);
4787
+ o.set(F, {
4788
+ id: F,
4789
4789
  spec: {
4790
4790
  ...f2.spec,
4791
- axesSpec: [{ ...h, annotations: C.annotations }]
4791
+ axesSpec: [{ ...g, annotations: C.annotations }]
4792
4792
  },
4793
4793
  data: f2.data
4794
4794
  });
4795
4795
  } else
4796
- o.set(s(f2.id), f2);
4796
+ o.set(i2(f2.id), f2);
4797
4797
  }
4798
4798
  }
4799
4799
  }
4800
4800
  if ([...e, ...o.values()].some(
4801
- (d) => d.data instanceof _ && !d.data.getIsReadyOrError()
4801
+ (d) => d.data instanceof b && !d.data.getIsReadyOrError()
4802
4802
  ))
4803
4803
  return;
4804
- let a = e;
4805
- const c = [];
4804
+ let l = e;
4805
+ const a = [];
4806
4806
  if (r != null && r.coreColumnPredicate) {
4807
- a = [];
4807
+ l = [];
4808
4808
  for (const d of e)
4809
- r.coreColumnPredicate(d.spec) ? a.push(d) : c.push(d);
4809
+ r.coreColumnPredicate(d.spec) ? l.push(d) : a.push(d);
4810
4810
  }
4811
- return c.push(...o.values()), t.createPTable({
4811
+ return a.push(...o.values()), n.createPTable({
4812
4812
  src: {
4813
4813
  type: "outer",
4814
4814
  primary: {
4815
4815
  type: (r == null ? void 0 : r.coreJoinType) ?? "full",
4816
- entries: a.map((d) => ({ type: "column", column: d }))
4816
+ entries: l.map((d) => ({ type: "column", column: d }))
4817
4817
  },
4818
- secondary: c.map((d) => ({ type: "column", column: d }))
4818
+ secondary: a.map((d) => ({ type: "column", column: d }))
4819
4819
  },
4820
- filters: [...(r == null ? void 0 : r.filters) ?? [], ...((u = n == null ? void 0 : n.pTableParams) == null ? void 0 : u.filters) ?? []],
4821
- sorting: ((g = n == null ? void 0 : n.pTableParams) == null ? void 0 : g.sorting) ?? []
4820
+ filters: [...(r == null ? void 0 : r.filters) ?? [], ...((u = t == null ? void 0 : t.pTableParams) == null ? void 0 : u.filters) ?? []],
4821
+ sorting: ((h = t == null ? void 0 : t.pTableParams) == null ? void 0 : h.sorting) ?? []
4822
4822
  });
4823
4823
  }
4824
4824
  const $BlockArgs = z.object({
4825
4825
  numbers: z.array(z.coerce.number())
4826
4826
  });
4827
- const platforma = b.create("Heavy").withArgs({ numbers: [1, 2, 3] }).withUiState({ dataTableState: void 0 }).output("numbers", (ctx) => {
4827
+ const platforma = v.create("Heavy").withArgs({ numbers: [1, 2, 3, 4] }).withUiState({ dataTableState: void 0, dynamicSections: [] }).output("numbers", (ctx) => {
4828
4828
  var _a, _b;
4829
4829
  return (_b = (_a = ctx.outputs) == null ? void 0 : _a.resolve("numbers")) == null ? void 0 : _b.getDataAsJson();
4830
4830
  }).output("pt", (ctx) => {
4831
- var _a, _b, _c, _d, _e2;
4831
+ var _a, _b, _c, _d, _e;
4832
4832
  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;
4833
- return mt(ctx, [
4833
+ return _t(ctx, [
4834
4834
  {
4835
4835
  id: "example",
4836
4836
  spec: {
@@ -4856,10 +4856,15 @@
4856
4856
  ]
4857
4857
  }
4858
4858
  ], ctx.uiState.dataTableState.tableState, [
4859
- ...(_d = ctx.uiState.dataTableState.tableState.pTableParams) == null ? void 0 : _d.filters,
4860
- ...((_e2 = ctx.uiState.dataTableState.filterModel) == null ? void 0 : _e2.filters) ?? []
4859
+ ...((_d = ctx.uiState.dataTableState.tableState.pTableParams) == null ? void 0 : _d.filters) ?? [],
4860
+ ...((_e = ctx.uiState.dataTableState.filterModel) == null ? void 0 : _e.filters) ?? []
4861
4861
  ]);
4862
4862
  }).sections((ctx) => {
4863
+ const dynamicSections = (ctx.uiState.dynamicSections ?? []).map((it2) => ({
4864
+ type: "link",
4865
+ href: `/section?id=${it2.id}`,
4866
+ label: it2.label
4867
+ }));
4863
4868
  return [
4864
4869
  { type: "link", href: "/loaders", label: "Loaders" },
4865
4870
  { type: "link", href: "/", label: "Icons/Masks" },
@@ -4877,10 +4882,21 @@
4877
4882
  { type: "link", href: "/errors", label: "Errors" },
4878
4883
  { type: "link", href: "/text-fields", label: "PlTextField" },
4879
4884
  { type: "link", href: "/tabs", label: "PlTabs" },
4880
- { type: "link", href: "/drafts", label: "Drafts" },
4881
4885
  { type: "link", href: "/stacked-bar", label: "PlChartStackedBar" },
4882
4886
  { type: "link", href: "/buttons", label: "ButtonsPage" },
4883
- { type: "link", href: "/notifications", label: "Notifications" }
4887
+ { type: "link", href: "/notifications", label: "Notifications" },
4888
+ { type: "link", href: "/drafts", label: "Drafts" },
4889
+ ...dynamicSections.length ? [
4890
+ { type: "delimiter" },
4891
+ ...dynamicSections,
4892
+ { type: "delimiter" }
4893
+ ] : [],
4894
+ {
4895
+ type: "link",
4896
+ href: "/add-section",
4897
+ appearance: "add-section",
4898
+ label: "New Dynamic section"
4899
+ }
4884
4900
  ];
4885
4901
  }).done();
4886
4902
  exports2.$BlockArgs = $BlockArgs;