@milaboratories/milaboratories.ui-examples.model 1.1.42 → 1.1.44

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
@@ -35,7 +35,7 @@
35
35
  }, "");
36
36
  return `{${values}}`;
37
37
  };
38
- const Pe = /* @__PURE__ */ getDefaultExportFromCjs(canonicalize);
38
+ const ve = /* @__PURE__ */ getDefaultExportFromCjs(canonicalize);
39
39
  var util;
40
40
  (function(util2) {
41
41
  util2.assertEqual = (val) => val;
@@ -87,7 +87,7 @@
87
87
  return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
88
88
  }
89
89
  util2.joinValues = joinValues;
90
- util2.jsonStringifyReplacer = (_2, value) => {
90
+ util2.jsonStringifyReplacer = (_, value) => {
91
91
  if (typeof value === "bigint") {
92
92
  return value.toString();
93
93
  }
@@ -3103,7 +3103,7 @@
3103
3103
  });
3104
3104
  }
3105
3105
  const params = { errorMap: ctx.common.contextualErrorMap };
3106
- const fn2 = ctx.data;
3106
+ const fn = ctx.data;
3107
3107
  if (this._def.returns instanceof ZodPromise) {
3108
3108
  const me = this;
3109
3109
  return OK(async function(...args) {
@@ -3112,7 +3112,7 @@
3112
3112
  error.addIssue(makeArgsIssue(args, e));
3113
3113
  throw error;
3114
3114
  });
3115
- const result = await Reflect.apply(fn2, this, parsedArgs);
3115
+ const result = await Reflect.apply(fn, this, parsedArgs);
3116
3116
  const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => {
3117
3117
  error.addIssue(makeReturnsIssue(result, e));
3118
3118
  throw error;
@@ -3126,7 +3126,7 @@
3126
3126
  if (!parsedArgs.success) {
3127
3127
  throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);
3128
3128
  }
3129
- const result = Reflect.apply(fn2, this, parsedArgs.data);
3129
+ const result = Reflect.apply(fn, this, parsedArgs.data);
3130
3130
  const parsedReturns = me._def.returns.safeParse(result, params);
3131
3131
  if (!parsedReturns.success) {
3132
3132
  throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);
@@ -4081,12 +4081,18 @@
4081
4081
  }
4082
4082
  }
4083
4083
  }
4084
+ function Sn(n2) {
4085
+ return {
4086
+ columnId: n2.id,
4087
+ spec: n2.spec
4088
+ };
4089
+ }
4084
4090
  function p$1(n2) {
4085
4091
  const { type: t, name: e, domain: r } = n2;
4086
4092
  return { type: t, name: e, ...r && { domain: r } };
4087
4093
  }
4088
- function En(n2) {
4089
- return Pe(p$1(n2));
4094
+ function Cn(n2) {
4095
+ return ve(p$1(n2));
4090
4096
  }
4091
4097
  function X$1(n2, t) {
4092
4098
  if (n2 === void 0) return t === void 0;
@@ -4098,7 +4104,7 @@
4098
4104
  function z(n2, t) {
4099
4105
  return n2.name === t.name && X$1(n2.domain, t.domain);
4100
4106
  }
4101
- function Cn(n2, t) {
4107
+ function Jn(n2, t) {
4102
4108
  return { ...n2, src: l$1(n2.src, t) };
4103
4109
  }
4104
4110
  function l$1(n2, t) {
@@ -4132,15 +4138,15 @@
4132
4138
  }
4133
4139
  }
4134
4140
  function G(n2) {
4135
- return Pe(n2);
4141
+ return ve(n2);
4136
4142
  }
4137
4143
  function A(n2) {
4138
- return Pe(p$1(n2));
4144
+ return ve(p$1(n2));
4139
4145
  }
4140
4146
  function x(n2, t) {
4141
4147
  return JSON.stringify([n2, t]);
4142
4148
  }
4143
- class On {
4149
+ class $n {
4144
4150
  /**
4145
4151
  * Creates a new anchor context from a set of anchor column specifications
4146
4152
  * @param anchors Record of anchor column specifications indexed by anchor ID
@@ -4234,7 +4240,7 @@
4234
4240
  return G(this.derive(t, e));
4235
4241
  }
4236
4242
  }
4237
- function $n(n2, t, e) {
4243
+ function Dn(n2, t, e) {
4238
4244
  const r = { ...t }, o = (e == null ? void 0 : e.ignoreMissingDomains) ?? false;
4239
4245
  if (r.domainAnchor !== void 0) {
4240
4246
  const s2 = n2[r.domainAnchor];
@@ -4299,17 +4305,17 @@
4299
4305
  function Z$1(n2) {
4300
4306
  return f(n2.spec);
4301
4307
  }
4302
- function In(n2) {
4308
+ function Bn(n2) {
4303
4309
  if (!Z$1(n2)) throw new Error(`not a PColumn (kind = ${n2.spec.kind})`);
4304
4310
  return n2;
4305
4311
  }
4306
- function Bn(n2, t) {
4312
+ function jn(n2, t) {
4307
4313
  return n2 === void 0 ? void 0 : {
4308
4314
  ...n2,
4309
4315
  data: t(n2.data)
4310
4316
  };
4311
4317
  }
4312
- function jn(n2) {
4318
+ function Fn(n2) {
4313
4319
  const t = /* @__PURE__ */ new Map(), e = (r) => {
4314
4320
  switch (r.type) {
4315
4321
  case "column":
@@ -4396,7 +4402,7 @@
4396
4402
  }
4397
4403
  return true;
4398
4404
  }
4399
- function Fn(n2) {
4405
+ function Un(n2) {
4400
4406
  return Array.isArray(n2) ? (t) => n2.some((e) => f(t) && N(t, e)) : (t) => f(t) && N(t, n2);
4401
4407
  }
4402
4408
  z$1.object({
@@ -4406,10 +4412,10 @@
4406
4412
  }).describe(
4407
4413
  "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."
4408
4414
  ).strict().readonly();
4409
- function Rn(n2) {
4415
+ function Mn(n2) {
4410
4416
  return typeof n2 == "object" && n2 !== null && "__isRef" in n2 && n2.__isRef === true && "blockId" in n2 && "name" in n2;
4411
4417
  }
4412
- function _n(n2, t) {
4418
+ function Hn(n2, t) {
4413
4419
  return n2.ok ? { ok: true, value: t(n2.value) } : n2;
4414
4420
  }
4415
4421
  const on = 24;
@@ -4466,13 +4472,13 @@
4466
4472
  cause: z$1.lazy(() => n).optional(),
4467
4473
  errors: z$1.lazy(() => n.array()).optional()
4468
4474
  });
4469
- var je = Object.defineProperty;
4470
- var Ke = (t, e, n2) => e in t ? je(t, e, { enumerable: true, configurable: true, writable: true, value: n2 }) : t[e] = n2;
4471
- var L = (t, e, n2) => Ke(t, typeof e != "symbol" ? e + "" : e, n2);
4475
+ var Ne = Object.defineProperty;
4476
+ var Ue = (t, e, n2) => e in t ? Ne(t, e, { enumerable: true, configurable: true, writable: true, value: n2 }) : t[e] = n2;
4477
+ var L = (t, e, n2) => Ue(t, typeof e != "symbol" ? e + "" : e, n2);
4472
4478
  function Z(t) {
4473
4479
  return { type: "Immediate", value: t };
4474
4480
  }
4475
- function Xe() {
4481
+ function nt() {
4476
4482
  return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
4477
4483
  }
4478
4484
  function _e(t) {
@@ -4481,7 +4487,7 @@
4481
4487
  if (typeof globalThis.platforma < "u") return globalThis.platforma;
4482
4488
  throw new Error("Can't get platforma instance.");
4483
4489
  }
4484
- function Qe() {
4490
+ function rt() {
4485
4491
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
4486
4492
  }
4487
4493
  function m() {
@@ -4489,31 +4495,31 @@
4489
4495
  throw new Error("Not in config rendering context");
4490
4496
  }
4491
4497
  function Y(t, e) {
4492
- const n2 = Qe();
4498
+ const n2 = rt();
4493
4499
  if (n2 === void 0) return false;
4494
4500
  if (t in n2.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
4495
4501
  return n2.callbackRegistry[t] = e, true;
4496
4502
  }
4497
- const ae = /* @__PURE__ */ new Map();
4498
- function Ze(t, e) {
4503
+ const oe = /* @__PURE__ */ new Map();
4504
+ function it(t, e) {
4499
4505
  t in m().callbackRegistry || (m().callbackRegistry[t] = (n2) => {
4500
- for (const r of ae.get(t))
4506
+ for (const r of oe.get(t))
4501
4507
  r(n2);
4502
- }, ae.set(t, [])), ae.get(t).push(e);
4508
+ }, oe.set(t, [])), oe.get(t).push(e);
4503
4509
  }
4504
- class C {
4510
+ class S {
4505
4511
  constructor(e, n2 = (r) => r) {
4506
4512
  L(this, "isResolved", false);
4507
4513
  L(this, "resolvedValue");
4508
- this.handle = e, this.postProcess = n2, Ze(e, (r) => {
4514
+ this.handle = e, this.postProcess = n2, it(e, (r) => {
4509
4515
  this.resolvedValue = n2(r), this.isResolved = true;
4510
4516
  });
4511
4517
  }
4512
4518
  map(e) {
4513
- return new C(this.handle, (n2) => e(this.postProcess(n2)));
4519
+ return new S(this.handle, (n2) => e(this.postProcess(n2)));
4514
4520
  }
4515
4521
  mapDefined(e) {
4516
- return new C(this.handle, (n2) => {
4522
+ return new S(this.handle, (n2) => {
4517
4523
  const r = this.postProcess(n2);
4518
4524
  return r ? e(r) : void 0;
4519
4525
  });
@@ -4522,10 +4528,10 @@
4522
4528
  return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
4523
4529
  }
4524
4530
  }
4525
- function pe(t, e) {
4531
+ function ce(t, e) {
4526
4532
  return t === void 0 ? void 0 : e(t);
4527
4533
  }
4528
- class _ {
4534
+ class I {
4529
4535
  constructor(e, n2) {
4530
4536
  this.handle = e, this.resolvePath = n2;
4531
4537
  }
@@ -4564,9 +4570,9 @@
4564
4570
  ...this.resolvePath,
4565
4571
  ...n2.map((i) => typeof i == "string" ? i : i.field)
4566
4572
  ];
4567
- return pe(
4573
+ return ce(
4568
4574
  m().resolveWithCommon(this.handle, e, ...n2),
4569
- (i) => new _(i, r)
4575
+ (i) => new I(i, r)
4570
4576
  );
4571
4577
  }
4572
4578
  get resourceType() {
@@ -4586,9 +4592,9 @@
4586
4592
  }
4587
4593
  getError() {
4588
4594
  const e = [...this.resolvePath, "error"];
4589
- return pe(
4595
+ return ce(
4590
4596
  m().getError(this.handle),
4591
- (n2) => new _(n2, e)
4597
+ (n2) => new I(n2, e)
4592
4598
  );
4593
4599
  }
4594
4600
  listInputFields() {
@@ -4646,18 +4652,18 @@
4646
4652
  const i = {};
4647
4653
  for (const [s2, o] of Object.entries(r)) {
4648
4654
  const a = [...this.resolvePath, s2];
4649
- i[s2] = Bn(o, (l2) => new _(l2, a));
4655
+ i[s2] = jn(o, (l2) => new I(l2, a));
4650
4656
  }
4651
4657
  return i;
4652
4658
  }
4653
4659
  getFileContentAsBase64() {
4654
- return new C(m().getBlobContentAsBase64(this.handle));
4660
+ return new S(m().getBlobContentAsBase64(this.handle));
4655
4661
  }
4656
4662
  getFileContentAsString() {
4657
- return new C(m().getBlobContentAsString(this.handle));
4663
+ return new S(m().getBlobContentAsString(this.handle));
4658
4664
  }
4659
4665
  getFileContentAsJson() {
4660
- return new C(
4666
+ return new S(
4661
4667
  m().getBlobContentAsString(this.handle)
4662
4668
  ).mapDefined((e) => JSON.parse(e));
4663
4669
  }
@@ -4677,7 +4683,7 @@
4677
4683
  * @returns downloaded file handle
4678
4684
  */
4679
4685
  getFileHandle() {
4680
- return new C(m().getDownloadedBlobContentHandle(this.handle));
4686
+ return new S(m().getDownloadedBlobContentHandle(this.handle));
4681
4687
  }
4682
4688
  /**
4683
4689
  * @deprecated use getFileHandle
@@ -4689,7 +4695,7 @@
4689
4695
  * @returns downloaded file handle
4690
4696
  */
4691
4697
  getRemoteFileHandle() {
4692
- return new C(m().getOnDemandBlobContentHandle(this.handle));
4698
+ return new S(m().getOnDemandBlobContentHandle(this.handle));
4693
4699
  }
4694
4700
  /**
4695
4701
  * @deprecated use getRemoteFileHandle
@@ -4701,22 +4707,22 @@
4701
4707
  * @returns the url to the extracted folder
4702
4708
  */
4703
4709
  extractArchiveAndGetURL(e) {
4704
- return new C(m().extractArchiveAndGetURL(this.handle, e));
4710
+ return new S(m().extractArchiveAndGetURL(this.handle, e));
4705
4711
  }
4706
4712
  getImportProgress() {
4707
- return new C(m().getImportProgress(this.handle));
4713
+ return new S(m().getImportProgress(this.handle));
4708
4714
  }
4709
4715
  getLastLogs(e) {
4710
- return new C(m().getLastLogs(this.handle, e));
4716
+ return new S(m().getLastLogs(this.handle, e));
4711
4717
  }
4712
4718
  getProgressLog(e) {
4713
- return new C(m().getProgressLog(this.handle, e));
4719
+ return new S(m().getProgressLog(this.handle, e));
4714
4720
  }
4715
4721
  getProgressLogWithInfo(e) {
4716
- return new C(m().getProgressLogWithInfo(this.handle, e));
4722
+ return new S(m().getProgressLogWithInfo(this.handle, e));
4717
4723
  }
4718
4724
  getLogHandle() {
4719
- return new C(m().getLogHandle(this.handle));
4725
+ return new S(m().getLogHandle(this.handle));
4720
4726
  }
4721
4727
  allFieldsResolved(e = "Input") {
4722
4728
  switch (e) {
@@ -4742,97 +4748,97 @@
4742
4748
  let l2 = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
4743
4749
  (u2) => [u2, this.resolve({ field: u2, assertFieldType: r })]
4744
4750
  );
4745
- return s2 && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2, S]) => o(u2, S));
4751
+ return s2 && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2, w2]) => o(u2, w2));
4746
4752
  }
4747
4753
  }
4748
- const Ie = "staging", Le = "main";
4749
- const nt = "pl7.app/label", rt = "pl7.app/trace", it = z$1.object({
4754
+ const Le = "staging", Te = "main";
4755
+ const at = "pl7.app/label", lt = "pl7.app/trace", ut = z$1.object({
4750
4756
  type: z$1.string(),
4751
4757
  importance: z$1.number().optional(),
4752
4758
  id: z$1.string().optional(),
4753
4759
  label: z$1.string()
4754
- }), st = z$1.array(it), ot = 1e-3, at = "__LABEL__", ve = "__LABEL__@1";
4755
- function Ee(t, e, n2 = {}) {
4756
- const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s2 = t.map((p2) => {
4760
+ }), ct = z$1.array(ut), pt = 1e-3, dt = "__LABEL__", we = "__LABEL__@1";
4761
+ function Fe(t, e, n2 = {}) {
4762
+ const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s2 = t.map((d) => {
4757
4763
  var q, F;
4758
- const c2 = e(p2);
4759
- let h, A2, y;
4760
- "spec" in c2 && typeof c2.spec == "object" ? (h = c2.spec, A2 = c2.prefixTrace, y = c2.suffixTrace) : h = c2;
4761
- const v = (q = h.annotations) == null ? void 0 : q[nt], g = (F = h.annotations) == null ? void 0 : F[rt], P = (g ? st.safeParse(JSON.parse(g)).data : void 0) ?? [], b = [
4762
- ...A2 ?? [],
4763
- ...P,
4764
- ...y ?? []
4764
+ const h = e(d);
4765
+ let f2, x2, c2;
4766
+ "spec" in h && typeof h.spec == "object" ? (f2 = h.spec, x2 = h.prefixTrace, c2 = h.suffixTrace) : f2 = h;
4767
+ const y = (q = f2.annotations) == null ? void 0 : q[at], g = (F = f2.annotations) == null ? void 0 : F[lt], v = (g ? ct.safeParse(JSON.parse(g)).data : void 0) ?? [], A2 = [
4768
+ ...x2 ?? [],
4769
+ ...v,
4770
+ ...c2 ?? []
4765
4771
  ];
4766
- if (v) {
4767
- const I = { label: v, type: at, importance: -2 };
4768
- n2.addLabelAsSuffix ? b.push(I) : b.splice(0, 0, I);
4772
+ if (y) {
4773
+ const _ = { label: y, type: dt, importance: -2 };
4774
+ n2.addLabelAsSuffix ? A2.push(_) : A2.splice(0, 0, _);
4769
4775
  }
4770
- const k2 = [], $2 = /* @__PURE__ */ new Map();
4771
- for (let I = b.length - 1; I >= 0; --I) {
4772
- const { type: R } = b[I], se = b[I].importance ?? 0, J = ($2.get(R) ?? 0) + 1;
4776
+ const D2 = [], $2 = /* @__PURE__ */ new Map();
4777
+ for (let _ = A2.length - 1; _ >= 0; --_) {
4778
+ const { type: R } = A2[_], ie = A2[_].importance ?? 0, J = ($2.get(R) ?? 0) + 1;
4773
4779
  $2.set(R, J);
4774
- const w2 = `${R}@${J}`;
4775
- i.set(w2, (i.get(w2) ?? 0) + 1), r.set(
4776
- w2,
4780
+ const P = `${R}@${J}`;
4781
+ i.set(P, (i.get(P) ?? 0) + 1), r.set(
4782
+ P,
4777
4783
  Math.max(
4778
- r.get(w2) ?? Number.NEGATIVE_INFINITY,
4779
- se - (b.length - I) * ot
4784
+ r.get(P) ?? Number.NEGATIVE_INFINITY,
4785
+ ie - (A2.length - _) * pt
4780
4786
  )
4781
- ), k2.push({ ...b[I], fullType: w2, occurenceIndex: J });
4787
+ ), D2.push({ ...A2[_], fullType: P, occurenceIndex: J });
4782
4788
  }
4783
- return k2.reverse(), {
4784
- value: p2,
4785
- spec: h,
4786
- label: v,
4787
- fullTrace: k2
4789
+ return D2.reverse(), {
4790
+ value: d,
4791
+ spec: f2,
4792
+ label: y,
4793
+ fullTrace: D2
4788
4794
  };
4789
4795
  }), o = [], a = [], l2 = [...r];
4790
- l2.sort(([, p2], [, c2]) => c2 - p2);
4791
- for (const [p2] of l2)
4792
- p2.endsWith("@1") || i.get(p2) === t.length ? o.push(p2) : a.push(p2);
4793
- const u2 = (p2) => {
4794
- const c2 = [];
4795
- for (let h = 0; h < s2.length; h++) {
4796
- const A2 = s2[h], y = A2.fullTrace.filter((P) => p2.has(P.fullType));
4797
- if (y.length === 0)
4796
+ l2.sort(([, d], [, h]) => h - d);
4797
+ for (const [d] of l2)
4798
+ d.endsWith("@1") || i.get(d) === t.length ? o.push(d) : a.push(d);
4799
+ const u2 = (d) => {
4800
+ const h = [];
4801
+ for (let f2 = 0; f2 < s2.length; f2++) {
4802
+ const x2 = s2[f2], c2 = x2.fullTrace.filter((v) => d.has(v.fullType));
4803
+ if (c2.length === 0)
4798
4804
  return;
4799
- const v = y.map((P) => P.label), g = n2.separator ?? " / ";
4800
- c2.push({
4801
- label: v.join(g),
4802
- value: A2.value
4805
+ const y = c2.map((v) => v.label), g = n2.separator ?? " / ";
4806
+ h.push({
4807
+ label: y.join(g),
4808
+ value: x2.value
4803
4809
  });
4804
4810
  }
4805
- return c2;
4811
+ return h;
4806
4812
  };
4807
4813
  if (o.length === 0) {
4808
4814
  if (a.length !== 0) throw new Error("Assertion error.");
4809
- const p2 = u2(new Set(ve));
4810
- if (p2 === void 0) throw new Error("Assertion error.");
4811
- return p2;
4812
- }
4813
- let S = 0, d = 0;
4814
- for (; S < o.length; ) {
4815
- const p2 = /* @__PURE__ */ new Set();
4816
- n2.includeNativeLabel && p2.add(ve);
4817
- for (let h = 0; h < S; ++h) p2.add(o[h]);
4818
- p2.add(o[d]);
4819
- const c2 = u2(p2);
4820
- if (c2 !== void 0 && new Set(c2.map((h) => h.label)).size === t.length) return c2;
4821
- d++, d >= o.length && (S++, d = S);
4822
- }
4823
- const f2 = u2(/* @__PURE__ */ new Set([...o, ...a]));
4824
- if (f2 === void 0) throw new Error("Assertion error.");
4825
- return f2;
4815
+ const d = u2(new Set(we));
4816
+ if (d === void 0) throw new Error("Assertion error.");
4817
+ return d;
4818
+ }
4819
+ let w2 = 0, b = 0;
4820
+ for (; w2 < o.length; ) {
4821
+ const d = /* @__PURE__ */ new Set();
4822
+ n2.includeNativeLabel && d.add(we);
4823
+ for (let f2 = 0; f2 < w2; ++f2) d.add(o[f2]);
4824
+ d.add(o[b]);
4825
+ const h = u2(d);
4826
+ if (h !== void 0 && new Set(h.map((f2) => f2.label)).size === t.length) return h;
4827
+ b++, b >= o.length && (w2++, b = w2);
4828
+ }
4829
+ const p2 = u2(/* @__PURE__ */ new Set([...o, ...a]));
4830
+ if (p2 === void 0) throw new Error("Assertion error.");
4831
+ return p2;
4826
4832
  }
4827
- const H = "PColumnData/", te = H + "ResourceMap", ne = H + "Partitioned/ResourceMap", U = H + "JsonPartitioned", V = H + "BinaryPartitioned", Fe = H + "Partitioned/", re = Fe + "JsonPartitioned", B = Fe + "BinaryPartitioned";
4828
- const fe = (t) => {
4833
+ const H = "PColumnData/", te = H + "ResourceMap", ne = H + "Partitioned/ResourceMap", U = H + "JsonPartitioned", K = H + "BinaryPartitioned", De = H + "Partitioned/", re = De + "JsonPartitioned", B = De + "BinaryPartitioned";
4834
+ const de = (t) => {
4829
4835
  if (t.endsWith(".index"))
4830
4836
  return { baseKey: t.substring(0, t.length - 6), type: "index" };
4831
4837
  if (t.endsWith(".values"))
4832
4838
  return { baseKey: t.substring(0, t.length - 7), type: "values" };
4833
4839
  throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
4834
4840
  };
4835
- function lt(t) {
4841
+ function ft(t) {
4836
4842
  if (!t) return;
4837
4843
  const e = t.resourceType.name, n2 = t.getDataAsJson(), r = [];
4838
4844
  let i = 0;
@@ -4844,7 +4850,7 @@
4844
4850
  i = n2.partitionKeyLength + n2.keyLength;
4845
4851
  break;
4846
4852
  case U:
4847
- case V:
4853
+ case K:
4848
4854
  i = n2.partitionKeyLength;
4849
4855
  break;
4850
4856
  case B:
@@ -4855,9 +4861,9 @@
4855
4861
  switch (e) {
4856
4862
  case te:
4857
4863
  case U:
4858
- case V:
4864
+ case K:
4859
4865
  for (let s2 of t.listInputFields()) {
4860
- e === V && (s2 = fe(s2).baseKey);
4866
+ e === K && (s2 = de(s2).baseKey);
4861
4867
  const o = [...JSON.parse(s2)];
4862
4868
  r.push(o);
4863
4869
  }
@@ -4869,7 +4875,7 @@
4869
4875
  const o = [...JSON.parse(s2)], a = t.resolve({ field: s2, assertFieldType: "Input" });
4870
4876
  if (a !== void 0)
4871
4877
  for (let l2 of a.listInputFields()) {
4872
- e === B && (l2 = fe(l2).baseKey);
4878
+ e === B && (l2 = de(l2).baseKey);
4873
4879
  const u2 = [...o, ...JSON.parse(l2)];
4874
4880
  r.push(u2);
4875
4881
  }
@@ -4878,7 +4884,7 @@
4878
4884
  }
4879
4885
  return { data: r, keyLength: i };
4880
4886
  }
4881
- function ut(t) {
4887
+ function ht(t) {
4882
4888
  if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
4883
4889
  throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
4884
4890
  const { parts: e, partitionKeyLength: n2 } = t, r = [];
@@ -4897,11 +4903,11 @@
4897
4903
  }
4898
4904
  return r.map((i) => Array.from(i.values()));
4899
4905
  }
4900
- function ct(t) {
4906
+ function gt(t) {
4901
4907
  if (t === void 0) return;
4902
4908
  if (j(t))
4903
- return ut(t);
4904
- const e = lt(t);
4909
+ return ht(t);
4910
+ const e = ft(t);
4905
4911
  if (!e) return;
4906
4912
  const { data: n2, keyLength: r } = e, i = [];
4907
4913
  for (let s2 = 0; s2 < r; ++s2)
@@ -4914,7 +4920,7 @@
4914
4920
  }
4915
4921
  return i.map((s2) => Array.from(s2.values()));
4916
4922
  }
4917
- function he(t, e = []) {
4923
+ function fe(t, e = []) {
4918
4924
  if (t === void 0 || !t.getIsReadyOrError()) return;
4919
4925
  const n2 = t.resourceType.name, r = t.getDataAsJson();
4920
4926
  if (e.length > 0 && (n2 === re || n2 === B))
@@ -4939,12 +4945,12 @@
4939
4945
  parts: i
4940
4946
  };
4941
4947
  }
4942
- case V: {
4948
+ case K: {
4943
4949
  if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
4944
4950
  throw new Error(`Missing partitionKeyLength in metadata for ${n2}`);
4945
4951
  const i = [], s2 = /* @__PURE__ */ new Map();
4946
4952
  for (const o of t.listInputFields()) {
4947
- const a = fe(o), l2 = t.resolve({ field: o, assertFieldType: "Input" });
4953
+ const a = de(o), l2 = t.resolve({ field: o, assertFieldType: "Input" });
4948
4954
  if (l2 === void 0) return;
4949
4955
  let u2 = s2.get(a.baseKey);
4950
4956
  u2 || (u2 = {}, s2.set(a.baseKey, u2)), a.type === "index" ? u2.index = l2 : u2.values = l2;
@@ -4975,7 +4981,7 @@
4975
4981
  if (a === void 0) return;
4976
4982
  if (a.resourceType.name !== U)
4977
4983
  throw new Error(`Expected ${U} inside ${n2}, but got ${a.resourceType.name}`);
4978
- const l2 = he(a, JSON.parse(o));
4984
+ const l2 = fe(a, JSON.parse(o));
4979
4985
  if (l2 === void 0) return;
4980
4986
  if (l2.type !== "JsonPartitioned")
4981
4987
  throw new Error(`Unexpected inner result type for ${n2}: ${l2.type}`);
@@ -4994,9 +5000,9 @@
4994
5000
  for (const o of t.listInputFields()) {
4995
5001
  const a = t.resolve({ field: o, assertFieldType: "Input" });
4996
5002
  if (a === void 0) return;
4997
- if (a.resourceType.name !== V)
4998
- throw new Error(`Expected ${V} inside ${n2}, but got ${a.resourceType.name}`);
4999
- const l2 = he(a, JSON.parse(o));
5003
+ if (a.resourceType.name !== K)
5004
+ throw new Error(`Expected ${K} inside ${n2}, but got ${a.resourceType.name}`);
5005
+ const l2 = fe(a, JSON.parse(o));
5000
5006
  if (l2 === void 0) return;
5001
5007
  if (l2.type !== "BinaryPartitioned")
5002
5008
  throw new Error(`Unexpected inner result type for ${n2}: ${l2.type}`);
@@ -5012,15 +5018,15 @@
5012
5018
  throw new Error(`Unknown resource type: ${n2}`);
5013
5019
  }
5014
5020
  }
5015
- function pt(t) {
5021
+ function mt(t) {
5016
5022
  if (t !== void 0) {
5017
5023
  if (j(t)) return t;
5018
5024
  if (pn(t)) return ln(t);
5019
- if (t instanceof _) return he(t);
5025
+ if (t instanceof I) return fe(t);
5020
5026
  throw new Error(`Unexpected input type: ${typeof t}`);
5021
5027
  }
5022
5028
  }
5023
- function dt(t, e) {
5029
+ function yt(t, e) {
5024
5030
  const n2 = [...e].sort((s2, o) => o[0] - s2[0]);
5025
5031
  if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
5026
5032
  const { partitionKeyLength: s2 } = t;
@@ -5080,39 +5086,39 @@
5080
5086
  }
5081
5087
  }
5082
5088
  }
5083
- class ft {
5089
+ class vt {
5084
5090
  constructor(e) {
5085
5091
  this.columns = e;
5086
5092
  }
5087
5093
  selectColumns(e) {
5088
- const n2 = typeof e == "function" ? e : Fn(e);
5094
+ const n2 = typeof e == "function" ? e : Un(e);
5089
5095
  return this.columns.filter((r) => n2(r.spec));
5090
5096
  }
5091
5097
  }
5092
- function ht(t) {
5098
+ function bt(t) {
5093
5099
  if (t)
5094
5100
  return t.map((e) => ({
5095
- type: `split:${En(e.axisId)}`,
5101
+ type: `split:${Cn(e.axisId)}`,
5096
5102
  label: e.label,
5097
5103
  importance: 1e6
5098
5104
  // High importance for split filters in labels
5099
5105
  }));
5100
5106
  }
5101
- function gt(t) {
5107
+ function wt(t) {
5102
5108
  if (t)
5103
5109
  return t.map((e) => [e.axisIdx, e.value]);
5104
5110
  }
5105
- function mt(t, e) {
5111
+ function At(t, e) {
5106
5112
  if (!e || e.length === 0) return t;
5107
5113
  const n2 = [...e].sort((r, i) => r[0] - i[0]);
5108
- return Pe({ id: t, axisFilters: n2 });
5114
+ return ve({ id: t, axisFilters: n2 });
5109
5115
  }
5110
- function yt(t) {
5116
+ function Pt(t) {
5111
5117
  if (!t || typeof t != "object") return false;
5112
5118
  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);
5113
5119
  return !!e.domainAnchor || n2 || r;
5114
5120
  }
5115
- function vt(t) {
5121
+ function xt(t) {
5116
5122
  if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
5117
5123
  return [];
5118
5124
  const e = t.axes.map((n2, r) => typeof n2 == "object" && "split" in n2 && n2.split === true ? r : -1).filter((n2) => n2 !== -1);
@@ -5120,10 +5126,10 @@
5120
5126
  throw new Error("Axis splitting is not supported when `partialAxesMatch` is defined.");
5121
5127
  return e.sort((n2, r) => n2 - r), e;
5122
5128
  }
5123
- class be {
5129
+ class he {
5124
5130
  constructor() {
5125
5131
  L(this, "defaultProviderStore", []);
5126
- L(this, "providers", [new ft(this.defaultProviderStore)]);
5132
+ L(this, "providers", [new vt(this.defaultProviderStore)]);
5127
5133
  L(this, "axisLabelProviders", []);
5128
5134
  }
5129
5135
  addColumnProvider(e) {
@@ -5150,73 +5156,73 @@
5150
5156
  ...o && (i == null ? void 0 : i.includeNativeLabel) !== false ? { includeNativeLabel: true } : {},
5151
5157
  ...i ?? {}
5152
5158
  }, l2 = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], u2 = [];
5153
- for (const f$1 of l2) {
5154
- const p2 = yt(f$1);
5155
- let c2;
5156
- if (p2) {
5159
+ for (const p2 of l2) {
5160
+ const d = Pt(p2);
5161
+ let h;
5162
+ if (d) {
5157
5163
  if (!r)
5158
5164
  throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
5159
- c2 = $n(r.anchors, f$1, n2);
5165
+ h = Dn(r.anchors, p2, n2);
5160
5166
  } else
5161
- c2 = f$1;
5162
- const h = /* @__PURE__ */ new Set(), A2 = [];
5167
+ h = p2;
5168
+ const f$1 = /* @__PURE__ */ new Set(), x2 = [];
5163
5169
  for (const g of this.providers) {
5164
- const P = g.selectColumns(c2);
5165
- for (const b of P) {
5166
- if (h.has(b.id)) throw new Error(`Duplicate column id ${b.id} in provider ${g.constructor.name}`);
5167
- h.add(b.id), A2.push(b);
5170
+ const v = g.selectColumns(h);
5171
+ for (const A2 of v) {
5172
+ if (f$1.has(A2.id)) throw new Error(`Duplicate column id ${A2.id} in provider ${g.constructor.name}`);
5173
+ f$1.add(A2.id), x2.push(A2);
5168
5174
  }
5169
5175
  }
5170
- if (A2.length === 0) continue;
5171
- const y = vt(f$1), v = y.length > 0;
5172
- for (const g of A2) {
5176
+ if (x2.length === 0) continue;
5177
+ const c2 = xt(p2), y = c2.length > 0;
5178
+ for (const g of x2) {
5173
5179
  if (!f(g.spec)) continue;
5174
- const P = g.spec;
5175
- if (v) {
5176
- const b = pt(g.data);
5177
- if (!b) {
5180
+ const v = g.spec;
5181
+ if (y) {
5182
+ const A2 = mt(g.data);
5183
+ if (!A2) {
5178
5184
  if (s2) continue;
5179
5185
  return;
5180
5186
  }
5181
- if (!yn(b))
5182
- throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${b.type} for column ${g.id}`);
5183
- const k2 = ct(b), $2 = y[y.length - 1];
5184
- if ($2 >= b.partitionKeyLength)
5185
- throw new Error(`Not enough partition keys (${b.partitionKeyLength}) for requested split axes (max index ${$2}) in column ${P.name}`);
5186
- const q = y.map((w2) => this.findLabels(p$1(P.axesSpec[w2]))), F = [], I = (w2, N2) => {
5187
- if (N2 >= y.length) {
5188
- if (F.push([...w2]), F.length > 1e4)
5187
+ if (!yn(A2))
5188
+ throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${A2.type} for column ${g.id}`);
5189
+ const D2 = gt(A2), $2 = c2[c2.length - 1];
5190
+ if ($2 >= A2.partitionKeyLength)
5191
+ throw new Error(`Not enough partition keys (${A2.partitionKeyLength}) for requested split axes (max index ${$2}) in column ${v.name}`);
5192
+ const q = c2.map((P) => this.findLabels(p$1(v.axesSpec[P]))), F = [], _ = (P, N2) => {
5193
+ if (N2 >= c2.length) {
5194
+ if (F.push([...P]), F.length > 1e4)
5189
5195
  throw new Error("Too many key combinations, aborting.");
5190
5196
  return;
5191
5197
  }
5192
- const D2 = y[N2];
5193
- if (D2 >= k2.length)
5194
- throw new Error(`Axis index ${D2} out of bounds for unique keys array (length ${k2.length}) during split key generation for column ${g.id}`);
5195
- const O = k2[D2];
5196
- if (!O || O.length === 0) {
5198
+ const O = c2[N2];
5199
+ if (O >= D2.length)
5200
+ throw new Error(`Axis index ${O} out of bounds for unique keys array (length ${D2.length}) during split key generation for column ${g.id}`);
5201
+ const k2 = D2[O];
5202
+ if (!k2 || k2.length === 0) {
5197
5203
  F.length = 0;
5198
5204
  return;
5199
5205
  }
5200
- for (const z2 of O)
5201
- w2.push(z2), I(w2, N2 + 1), w2.pop();
5206
+ for (const z2 of k2)
5207
+ P.push(z2), _(P, N2 + 1), P.pop();
5202
5208
  };
5203
- if (I([], 0), F.length === 0)
5209
+ if (_([], 0), F.length === 0)
5204
5210
  continue;
5205
- const R = [...P.axesSpec], se = y.map((w2) => w2);
5206
- for (let w2 = y.length - 1; w2 >= 0; w2--)
5207
- R.splice(y[w2], 1);
5208
- const J = { ...P, axesSpec: R };
5209
- for (const w2 of F) {
5210
- const N2 = w2.map((D2, O) => {
5211
- const z2 = se[O], Re = p$1(P.axesSpec[z2]), oe = q[O], Oe = (oe == null ? void 0 : oe[D2]) ?? String(D2);
5212
- return { axisIdx: z2, axisId: Re, value: D2, label: Oe };
5211
+ const R = [...v.axesSpec], ie = c2.map((P) => P);
5212
+ for (let P = c2.length - 1; P >= 0; P--)
5213
+ R.splice(c2[P], 1);
5214
+ const J = { ...v, axesSpec: R };
5215
+ for (const P of F) {
5216
+ const N2 = P.map((O, k2) => {
5217
+ const z2 = ie[k2], $e = p$1(v.axesSpec[z2]), se = q[k2], Je = (se == null ? void 0 : se[O]) ?? String(O);
5218
+ return { axisIdx: z2, axisId: $e, value: O, label: Je };
5213
5219
  });
5214
5220
  u2.push({
5215
5221
  type: "split",
5216
5222
  originalColumn: g,
5217
- spec: P,
5223
+ spec: v,
5218
5224
  adjustedSpec: J,
5219
- dataEntries: b,
5225
+ dataEntries: A2,
5220
5226
  axisFilters: N2
5221
5227
  });
5222
5228
  }
@@ -5224,39 +5230,39 @@
5224
5230
  u2.push({
5225
5231
  type: "direct",
5226
5232
  originalColumn: g,
5227
- spec: P,
5228
- adjustedSpec: P
5233
+ spec: v,
5234
+ adjustedSpec: v
5229
5235
  });
5230
5236
  }
5231
5237
  }
5232
5238
  if (u2.length === 0) return [];
5233
- const S = Ee(
5239
+ const w2 = Fe(
5234
5240
  u2,
5235
- (f2) => ({
5236
- spec: f2.spec,
5237
- suffixTrace: f2.type === "split" ? ht(f2.axisFilters) : void 0
5241
+ (p2) => ({
5242
+ spec: p2.spec,
5243
+ suffixTrace: p2.type === "split" ? bt(p2.axisFilters) : void 0
5238
5244
  }),
5239
5245
  a
5240
- ), d = [];
5241
- for (const { value: f2, label: p2 } of S) {
5242
- const { originalColumn: c2, spec: h } = f2, A2 = f2.type === "split" ? f2.axisFilters : void 0, y = gt(A2);
5243
- let v;
5244
- r ? v = r.deriveS(h, y) : v = mt(c2.id, y);
5245
- let g = { ...f2.adjustedSpec };
5246
+ ), b = [];
5247
+ for (const { value: p2, label: d } of w2) {
5248
+ const { originalColumn: h, spec: f2 } = p2, x2 = p2.type === "split" ? p2.axisFilters : void 0, c2 = wt(x2);
5249
+ let y;
5250
+ r ? y = r.deriveS(f2, c2) : y = At(h.id, c2);
5251
+ let g = { ...p2.adjustedSpec };
5246
5252
  o && (g = {
5247
5253
  ...g,
5248
5254
  annotations: {
5249
5255
  ...g.annotations ?? {},
5250
- "pl7.app/label": p2
5256
+ "pl7.app/label": d
5251
5257
  }
5252
- }), d.push({
5253
- id: v,
5258
+ }), b.push({
5259
+ id: y,
5254
5260
  spec: g,
5255
- data: () => f2.type === "split" ? hn(dt(f2.dataEntries, y)) : f2.originalColumn.data,
5256
- label: p2
5261
+ data: () => p2.type === "split" ? hn(yt(p2.dataEntries, c2)) : p2.originalColumn.data,
5262
+ label: d
5257
5263
  });
5258
5264
  }
5259
- return d;
5265
+ return b;
5260
5266
  }
5261
5267
  getColumns(e, n2) {
5262
5268
  const r = this.getUniversalEntries(e, {
@@ -5281,17 +5287,17 @@
5281
5287
  return i;
5282
5288
  }
5283
5289
  }
5284
- function le(t, e) {
5290
+ function ae(t, e) {
5285
5291
  if (t === void 0) return e === void 0;
5286
5292
  if (e === void 0) return true;
5287
5293
  for (const n2 in e)
5288
5294
  if (t[n2] !== e[n2]) return false;
5289
5295
  return true;
5290
5296
  }
5291
- function we(t) {
5292
- return Bn(t, (e) => e instanceof _ ? e.handle : pn(e) ? mn(e, (n2) => n2.handle) : e);
5297
+ function Ae(t) {
5298
+ return jn(t, (e) => e instanceof I ? e.handle : pn(e) ? mn(e, (n2) => n2.handle) : e);
5293
5299
  }
5294
- class bt {
5300
+ class Ct {
5295
5301
  constructor() {
5296
5302
  L(this, "ctx", m());
5297
5303
  }
@@ -5302,8 +5308,8 @@
5302
5308
  return this.ctx.calculateOptions(e);
5303
5309
  }
5304
5310
  getOptions(e, n2) {
5305
- const r = typeof e == "function" ? e : Fn(e), i = this.getSpecs().entries.filter((s2) => r(s2.obj));
5306
- return typeof n2 == "object" || typeof n2 > "u" ? Ee(i, (s2) => s2.obj, n2 ?? {}).map(({ value: { ref: s2 }, label: o }) => ({
5311
+ const r = typeof e == "function" ? e : Un(e), i = this.getSpecs().entries.filter((s2) => r(s2.obj));
5312
+ return typeof n2 == "object" || typeof n2 > "u" ? Fe(i, (s2) => s2.obj, n2 ?? {}).map(({ value: { ref: s2 }, label: o }) => ({
5307
5313
  ref: s2,
5308
5314
  label: o
5309
5315
  })) : i.map((s2) => ({
@@ -5312,17 +5318,17 @@
5312
5318
  }));
5313
5319
  }
5314
5320
  resolveAnchorCtx(e) {
5315
- if (e instanceof On) return e;
5321
+ if (e instanceof $n) return e;
5316
5322
  const n2 = {};
5317
5323
  for (const [r, i] of Object.entries(e))
5318
- if (Rn(i)) {
5324
+ if (Mn(i)) {
5319
5325
  const s2 = this.getPColumnSpecByRef(i);
5320
5326
  if (!s2)
5321
5327
  return;
5322
5328
  n2[r] = s2;
5323
5329
  } else
5324
5330
  n2[r] = i;
5325
- return new On(n2);
5331
+ return new $n(n2);
5326
5332
  }
5327
5333
  /**
5328
5334
  * Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
@@ -5335,7 +5341,7 @@
5335
5341
  getAnchoredPColumns(e, n2, r) {
5336
5342
  const i = this.resolveAnchorCtx(e);
5337
5343
  if (i)
5338
- return new be().addColumnProvider(this).addAxisLabelProvider(this).getColumns(n2, {
5344
+ return new he().addColumnProvider(this).addAxisLabelProvider(this).getColumns(n2, {
5339
5345
  ...r,
5340
5346
  anchorCtx: i
5341
5347
  });
@@ -5372,7 +5378,7 @@
5372
5378
  getCanonicalOptions(e, n2, r) {
5373
5379
  const i = this.resolveAnchorCtx(e);
5374
5380
  if (!i) return;
5375
- const s2 = new be().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(n2, {
5381
+ const s2 = new he().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(n2, {
5376
5382
  ...r,
5377
5383
  anchorCtx: i
5378
5384
  });
@@ -5396,7 +5402,7 @@
5396
5402
  ref: n2.ref,
5397
5403
  obj: {
5398
5404
  ...n2.obj,
5399
- data: new _(n2.obj.data, [n2.ref.blockId, n2.ref.name])
5405
+ data: new I(n2.obj.data, [n2.ref.blockId, n2.ref.name])
5400
5406
  }
5401
5407
  }))
5402
5408
  };
@@ -5415,9 +5421,9 @@
5415
5421
  ref: n2.ref,
5416
5422
  obj: {
5417
5423
  ...n2.obj,
5418
- data: _n(
5424
+ data: Hn(
5419
5425
  n2.obj.data,
5420
- (r) => new _(r, [n2.ref.blockId, n2.ref.name])
5426
+ (r) => new I(r, [n2.ref.blockId, n2.ref.name])
5421
5427
  )
5422
5428
  }
5423
5429
  }))
@@ -5444,9 +5450,9 @@
5444
5450
  )) == null ? void 0 : r.obj;
5445
5451
  const n2 = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
5446
5452
  if (n2)
5447
- return Bn(
5453
+ return jn(
5448
5454
  n2,
5449
- (i) => new _(i, [e.blockId, e.name])
5455
+ (i) => new I(i, [e.blockId, e.name])
5450
5456
  );
5451
5457
  }
5452
5458
  /**
@@ -5457,7 +5463,7 @@
5457
5463
  getPColumnByRef(e) {
5458
5464
  const n2 = this.getDataByRef(e);
5459
5465
  if (n2)
5460
- return In(n2);
5466
+ return Bn(n2);
5461
5467
  }
5462
5468
  /**
5463
5469
  * Returns spec associated with the ref ensuring that it is a p-column spec.
@@ -5489,10 +5495,10 @@
5489
5495
  if (!f(r.obj.spec))
5490
5496
  continue;
5491
5497
  const i = r.obj.spec;
5492
- if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && le(e.domain, i.domain)) {
5498
+ if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && ae(e.domain, i.domain)) {
5493
5499
  for (let s2 = 0; s2 < e.axesSpec.length; ++s2) {
5494
5500
  const o = e.axesSpec[s2], a = i.axesSpec[s2];
5495
- if (o.name !== a.name || o.type !== a.type || !le(o.domain, a.domain))
5501
+ if (o.name !== a.name || o.type !== a.type || !ae(o.domain, a.domain))
5496
5502
  continue e;
5497
5503
  }
5498
5504
  n2.push(r.obj);
@@ -5509,7 +5515,7 @@
5509
5515
  for (const r of n2.entries) {
5510
5516
  if (!Z$1(r.obj)) continue;
5511
5517
  const i = r.obj.spec;
5512
- if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && le(e.domain, i.axesSpec[0].domain)) {
5518
+ if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && ae(e.domain, i.axesSpec[0].domain)) {
5513
5519
  if (r.obj.data.resourceType.name !== "PColumnData/Json")
5514
5520
  throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
5515
5521
  return Object.fromEntries(
@@ -5528,13 +5534,13 @@
5528
5534
  * @returns An array of PColumn objects matching the selectors. Data is loaded on first access.
5529
5535
  */
5530
5536
  selectColumns(e) {
5531
- const n2 = typeof e == "function" ? e : Fn(e);
5537
+ const n2 = typeof e == "function" ? e : Un(e);
5532
5538
  return this.getSpecs().entries.filter(({ obj: i }) => f(i) ? n2(i) : false).map(({ ref: i, obj: s2 }) => {
5533
5539
  const o = s2;
5534
5540
  let a = null;
5535
5541
  const l2 = this;
5536
5542
  return {
5537
- id: Pe(i),
5543
+ id: ve(i),
5538
5544
  spec: o,
5539
5545
  get data() {
5540
5546
  var u2;
@@ -5565,7 +5571,7 @@
5565
5571
  L(this, "args");
5566
5572
  L(this, "uiState");
5567
5573
  L(this, "_activeArgsCache");
5568
- L(this, "resultPool", new bt());
5574
+ L(this, "resultPool", new Ct());
5569
5575
  this.ctx = m(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
5570
5576
  }
5571
5577
  /**
@@ -5582,16 +5588,16 @@
5582
5588
  // return this.ctx.featureFlags;
5583
5589
  // }
5584
5590
  getNamedAccessor(e) {
5585
- return pe(
5591
+ return ce(
5586
5592
  this.ctx.getAccessorHandleByName(e),
5587
- (n2) => new _(n2, [e])
5593
+ (n2) => new I(n2, [e])
5588
5594
  );
5589
5595
  }
5590
5596
  get prerun() {
5591
- return this.getNamedAccessor(Ie);
5597
+ return this.getNamedAccessor(Le);
5592
5598
  }
5593
5599
  get outputs() {
5594
- return this.getNamedAccessor(Le);
5600
+ return this.getNamedAccessor(Te);
5595
5601
  }
5596
5602
  /**
5597
5603
  * Find labels data for a given axis id. It will search for a label column and return its data as a map.
@@ -5603,13 +5609,13 @@
5603
5609
  }
5604
5610
  verifyInlineAndExplicitColumnsSupport(e) {
5605
5611
  var i;
5606
- const n2 = e.some((s2) => !(s2.data instanceof _) || pn(s2.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
5612
+ const n2 = e.some((s2) => !(s2.data instanceof I) || pn(s2.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
5607
5613
  if (n2 && !r) throw Error("Inline or explicit columns not supported");
5608
5614
  }
5609
5615
  // TODO remove all non-PColumn fields
5610
5616
  createPFrame(e) {
5611
5617
  return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
5612
- e.map((n2) => we(n2))
5618
+ e.map((n2) => Ae(n2))
5613
5619
  );
5614
5620
  }
5615
5621
  createPTable(e) {
@@ -5621,8 +5627,8 @@
5621
5627
  },
5622
5628
  filters: e.filters ?? [],
5623
5629
  sorting: e.sorting ?? []
5624
- } : n2 = e, this.verifyInlineAndExplicitColumnsSupport(jn(n2.src)), this.ctx.createPTable(
5625
- Cn(n2, (r) => we(r))
5630
+ } : n2 = e, this.verifyInlineAndExplicitColumnsSupport(Fn(n2.src)), this.ctx.createPTable(
5631
+ Jn(n2, (r) => Ae(r))
5626
5632
  );
5627
5633
  }
5628
5634
  /** @deprecated scheduled for removal from SDK */
@@ -5634,13 +5640,13 @@
5634
5640
  return this.ctx.getCurrentUnstableMarker();
5635
5641
  }
5636
5642
  }
5637
- const M = "1.29.2";
5638
- function wt(t) {
5643
+ const M = "1.29.12";
5644
+ function St(t) {
5639
5645
  return t.__renderLambda === true;
5640
5646
  }
5641
- function ue(t) {
5647
+ function le(t) {
5642
5648
  if (t !== void 0)
5643
- return wt(t) ? t.handle : t;
5649
+ return St(t) ? t.handle : t;
5644
5650
  }
5645
5651
  class T {
5646
5652
  constructor(e, n2, r, i, s2, o, a) {
@@ -5806,70 +5812,105 @@
5806
5812
  sdkVersion: M,
5807
5813
  renderingMode: this._renderingMode,
5808
5814
  initialArgs: this._initialArgs,
5809
- inputsValid: ue(this._inputsValid),
5810
- sections: ue(this._sections),
5815
+ inputsValid: le(this._inputsValid),
5816
+ sections: le(this._sections),
5811
5817
  outputs: Object.fromEntries(
5812
- Object.entries(this._outputs).map(([n2, r]) => [n2, ue(r)])
5818
+ Object.entries(this._outputs).map(([n2, r]) => [n2, le(r)])
5813
5819
  )
5814
5820
  };
5815
- return Xe() ? _e({ sdkVersion: M }) : { config: e };
5821
+ return nt() ? _e({ sdkVersion: M }) : { config: e };
5816
5822
  }
5817
5823
  }
5818
- function fn(t, e, n2, r) {
5819
- var u2, S;
5820
- Array.isArray(r) && (r = { filters: r });
5821
- const i = t.resultPool.getData().entries.map((d) => d.obj).filter(Z$1).filter((d) => d.spec.name === "pl7.app/label" && d.spec.axesSpec.length === 1), s2 = (d, f2) => {
5822
- let p2 = d.toString();
5823
- if (f2)
5824
- for (const c2 in f2)
5825
- p2 += c2, p2 += f2[c2];
5826
- return p2;
5827
- }, o = /* @__PURE__ */ new Map();
5828
- for (const d of e)
5829
- for (const f2 of d.spec.axesSpec) {
5830
- const p2 = p$1(f2);
5831
- for (const c2 of i) {
5832
- const h = c2.spec.axesSpec[0], A2 = p$1(c2.spec.axesSpec[0]);
5833
- if (z(p2, A2)) {
5834
- const y = Object.keys(p2.domain ?? {}).length, v = Object.keys(A2.domain ?? {}).length;
5835
- if (y > v) {
5836
- const g = s2(c2.id, p2.domain);
5837
- o.set(g, {
5838
- id: g,
5824
+ function Re(t) {
5825
+ return new he().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
5826
+ name: "pl7.app/label",
5827
+ axes: [{}]
5828
+ // exactly one axis
5829
+ }, { dontWaitAllData: true });
5830
+ }
5831
+ function ke(t, e) {
5832
+ const n2 = (i, s2) => {
5833
+ let o = i.toString();
5834
+ if (s2)
5835
+ for (const a in s2)
5836
+ o += a, o += s2[a];
5837
+ return o;
5838
+ }, r = /* @__PURE__ */ new Map();
5839
+ for (const i of t)
5840
+ for (const s2 of i.spec.axesSpec) {
5841
+ const o = p$1(s2);
5842
+ for (const a of e) {
5843
+ const l2 = a.spec.axesSpec[0], u2 = p$1(a.spec.axesSpec[0]);
5844
+ if (z(o, u2)) {
5845
+ const w2 = Object.keys(o.domain ?? {}).length, b = Object.keys(u2.domain ?? {}).length;
5846
+ if (w2 > b) {
5847
+ const p2 = n2(a.id, o.domain);
5848
+ r.set(p2, {
5849
+ id: p2,
5839
5850
  spec: {
5840
- ...c2.spec,
5841
- axesSpec: [{ ...p2, annotations: h.annotations }]
5851
+ ...a.spec,
5852
+ axesSpec: [{ ...o, annotations: l2.annotations }]
5842
5853
  },
5843
- data: c2.data
5854
+ data: a.data
5844
5855
  });
5845
5856
  } else
5846
- o.set(s2(c2.id), c2);
5857
+ r.set(n2(a.id), a);
5847
5858
  }
5848
5859
  }
5849
5860
  }
5850
- if ([...e, ...o.values()].some(
5851
- (d) => d.data instanceof _ && !d.data.getIsReadyOrError()
5852
- ))
5853
- return;
5854
- let a = e;
5855
- const l2 = [];
5856
- if (r != null && r.coreColumnPredicate) {
5857
- a = [];
5858
- for (const d of e)
5859
- r.coreColumnPredicate(d.spec) ? a.push(d) : l2.push(d);
5860
- }
5861
- return l2.push(...o.values()), t.createPTable({
5861
+ return [...r.values()];
5862
+ }
5863
+ function je(t) {
5864
+ const e = (i) => Array.isArray(i), n2 = (i) => i instanceof I, r = (i) => typeof i == "object" && "type" in i;
5865
+ return t.map((i) => i.data).every((i) => {
5866
+ if (e(i))
5867
+ return true;
5868
+ if (n2(i))
5869
+ return i.getIsReadyOrError();
5870
+ if (r(i))
5871
+ switch (i.type) {
5872
+ case "Json":
5873
+ return true;
5874
+ case "JsonPartitioned":
5875
+ return Object.values(i.parts).every((o) => o.getIsReadyOrError());
5876
+ case "BinaryPartitioned":
5877
+ return Object.values(i.parts).every((o) => o.index.getIsReadyOrError() && o.values.getIsReadyOrError());
5878
+ }
5879
+ else
5880
+ throw Error(`unsupported column data type: ${i}`);
5881
+ });
5882
+ }
5883
+ function Ve(t, e, n2, r, i, s2) {
5884
+ let o = t;
5885
+ const a = [];
5886
+ if (s2) {
5887
+ o = [];
5888
+ for (const l2 of t)
5889
+ s2(l2.spec) ? o.push(l2) : a.push(l2);
5890
+ }
5891
+ return a.push(...e), {
5862
5892
  src: {
5863
5893
  type: "outer",
5864
5894
  primary: {
5865
- type: (r == null ? void 0 : r.coreJoinType) ?? "full",
5866
- entries: a.map((d) => ({ type: "column", column: d }))
5895
+ type: n2,
5896
+ entries: o.map((l2) => ({ type: "column", column: l2 }))
5867
5897
  },
5868
- secondary: l2.map((d) => ({ type: "column", column: d }))
5898
+ secondary: a.map((l2) => ({ type: "column", column: l2 }))
5869
5899
  },
5870
- filters: [...(r == null ? void 0 : r.filters) ?? [], ...((u2 = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : u2.filters) ?? []],
5871
- sorting: ((S = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : S.sorting) ?? []
5872
- });
5900
+ filters: r,
5901
+ sorting: i
5902
+ };
5903
+ }
5904
+ function Pn(t, e, n2, r) {
5905
+ var u2, w2;
5906
+ Array.isArray(r) && (r = { filters: r });
5907
+ const i = (r == null ? void 0 : r.coreJoinType) ?? "full", s2 = [...(r == null ? void 0 : r.filters) ?? [], ...((u2 = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : u2.filters) ?? []], o = ((w2 = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : w2.sorting) ?? [], a = Re(t.resultPool);
5908
+ if (!a) return;
5909
+ const l2 = ke(e.map(Sn), a);
5910
+ if (je([...e, ...l2]))
5911
+ return t.createPTable(
5912
+ Ve(e, l2, i, s2, o, r == null ? void 0 : r.coreColumnPredicate)
5913
+ );
5873
5914
  }
5874
5915
  const ImportFileHandleSchema = z$1.string().optional().refine(
5875
5916
  (_a) => true
@@ -5917,7 +5958,7 @@
5917
5958
  val: v.toString()
5918
5959
  };
5919
5960
  });
5920
- return fn(
5961
+ return Pn(
5921
5962
  ctx,
5922
5963
  [
5923
5964
  {
@@ -5997,6 +6038,7 @@
5997
6038
  { type: "link", href: "/buttons", label: "ButtonsPage" },
5998
6039
  { type: "link", href: "/notifications", label: "Notifications" },
5999
6040
  { type: "link", href: "/drafts", label: "Drafts" },
6041
+ { type: "link", href: "/pl-autocomplete", label: "PlAutocomplete" },
6000
6042
  ...dynamicSections.length ? [
6001
6043
  { type: "delimiter" },
6002
6044
  ...dynamicSections,