@platforma-sdk/model 1.28.0 → 1.28.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/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  var je = Object.defineProperty;
2
2
  var Ke = (t, e, n) => e in t ? je(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
3
  var L = (t, e, n) => Ke(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { isPColumn as se, mapPObjectData as ge, isDataInfoEntries as xe, isDataInfo as me, dataInfoToEntries as Ve, resolveAnchors as $e, isPColumnSpec as Z, isPartitionedDataInfoEntries as Je, getAxisId as F, entriesToDataInfo as Ne, selectorsToPredicate as ce, canonicalizeAxisId as Ue, AnchoredIdDeriver as ye, isPlRef as Be, mapValueInVOE as Me, ensurePColumn as Ge, extractAllColumns as We, mapPTableDef as He, mapDataInfo as qe, matchAxisId as G } from "@milaboratories/pl-model-common";
4
+ import { isPColumn as ie, mapPObjectData as ge, isDataInfoEntries as xe, isDataInfo as me, dataInfoToEntries as Ve, resolveAnchors as $e, isPColumnSpec as Q, isPartitionedDataInfoEntries as Je, getAxisId as E, entriesToDataInfo as Ne, selectorsToPredicate as ce, canonicalizeAxisId as Ue, AnchoredIdDeriver as ye, isPlRef as Be, mapValueInVOE as Me, ensurePColumn as Ge, extractAllColumns as We, mapPTableDef as He, mapDataInfo as qe, matchAxisId as G } from "@milaboratories/pl-model-common";
5
5
  export * from "@milaboratories/pl-model-common";
6
6
  import { z as K } from "zod";
7
7
  import Pe from "canonicalize";
@@ -22,8 +22,8 @@ function Rt(t) {
22
22
  }
23
23
  });
24
24
  }
25
- function S(t) {
26
- return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t === null ? ee(t) : t;
25
+ function x(t) {
26
+ return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t === null ? Z(t) : t;
27
27
  }
28
28
  function W(t) {
29
29
  return { type: "GetFromCtx", variable: t };
@@ -35,12 +35,12 @@ function Ot(t) {
35
35
  };
36
36
  }
37
37
  const jt = W("$args"), Kt = W("$it"), Vt = W("$prod"), $t = W("$staging"), Jt = W("$ui");
38
- function ee(t) {
38
+ function Z(t) {
39
39
  return { type: "Immediate", value: t };
40
40
  }
41
41
  function Ce(t) {
42
42
  const e = {};
43
- for (const [n, r] of Object.entries(t)) e[n] = S(r);
43
+ for (const [n, r] of Object.entries(t)) e[n] = x(r);
44
44
  return {
45
45
  type: "MakeObject",
46
46
  template: e
@@ -48,17 +48,17 @@ function Ce(t) {
48
48
  }
49
49
  function Nt(...t) {
50
50
  const e = [];
51
- for (const n of t) e.push(S(n));
51
+ for (const n of t) e.push(x(n));
52
52
  return {
53
53
  type: "MakeArray",
54
54
  template: e
55
55
  };
56
56
  }
57
- function te(t, e) {
57
+ function ee(t, e) {
58
58
  return {
59
59
  type: "GetJsonField",
60
- source: S(t),
61
- field: S(e)
60
+ source: x(t),
61
+ field: x(e)
62
62
  };
63
63
  }
64
64
  function Ut(t, e, n = "$it") {
@@ -112,15 +112,15 @@ function qt(t, e) {
112
112
  function zt(t, e) {
113
113
  return {
114
114
  type: "GetResourceField",
115
- source: S(t),
116
- field: S(e)
115
+ source: x(t),
116
+ field: x(e)
117
117
  };
118
118
  }
119
119
  function Yt() {
120
120
  return function(t) {
121
121
  return {
122
122
  type: "GetResourceValueAsJson",
123
- source: S(t)
123
+ source: x(t)
124
124
  };
125
125
  };
126
126
  }
@@ -135,73 +135,73 @@ function Xt(t, e, n = "$it") {
135
135
  function Qt(t) {
136
136
  return {
137
137
  type: "GetBlobContent",
138
- source: S(t)
138
+ source: x(t)
139
139
  };
140
140
  }
141
141
  function Zt(t) {
142
142
  return {
143
143
  type: "GetBlobContentAsString",
144
- source: S(t)
144
+ source: x(t)
145
145
  };
146
146
  }
147
147
  function en() {
148
148
  return function(t) {
149
149
  return {
150
150
  type: "GetBlobContentAsJson",
151
- source: S(t)
151
+ source: x(t)
152
152
  };
153
153
  };
154
154
  }
155
155
  function tn(t) {
156
156
  return {
157
157
  type: "GetDownloadedBlobContent",
158
- source: S(t)
158
+ source: x(t)
159
159
  };
160
160
  }
161
161
  function nn(t) {
162
162
  return {
163
163
  type: "GetOnDemandBlobContent",
164
- source: S(t)
164
+ source: x(t)
165
165
  };
166
166
  }
167
167
  function rn(t, e) {
168
168
  return {
169
169
  type: "ExtractArchiveAndGetURL",
170
170
  format: e,
171
- source: S(t)
171
+ source: x(t)
172
172
  };
173
173
  }
174
174
  function sn(t) {
175
175
  return {
176
176
  type: "GetImportProgress",
177
- source: S(t)
177
+ source: x(t)
178
178
  };
179
179
  }
180
180
  function on(t, e) {
181
181
  return {
182
182
  type: "GetLastLogs",
183
- source: S(t),
183
+ source: x(t),
184
184
  lines: e
185
185
  };
186
186
  }
187
187
  function an(t, e) {
188
188
  return {
189
189
  type: "GetProgressLog",
190
- source: S(t),
190
+ source: x(t),
191
191
  patternToSearch: e
192
192
  };
193
193
  }
194
194
  function ln(t, e) {
195
195
  return {
196
196
  type: "GetProgressLogWithInfo",
197
- source: S(t),
197
+ source: x(t),
198
198
  patternToSearch: e
199
199
  };
200
200
  }
201
201
  function un(t) {
202
202
  return {
203
203
  type: "GetLogHandle",
204
- source: S(t)
204
+ source: x(t)
205
205
  };
206
206
  }
207
207
  function Xe() {
@@ -216,11 +216,11 @@ function _e(t) {
216
216
  function Qe() {
217
217
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
218
218
  }
219
- function h() {
219
+ function m() {
220
220
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
221
221
  throw new Error("Not in config rendering context");
222
222
  }
223
- function X(t, e) {
223
+ function Y(t, e) {
224
224
  const n = Qe();
225
225
  if (n === void 0) return !1;
226
226
  if (t in n.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
@@ -228,12 +228,12 @@ function X(t, e) {
228
228
  }
229
229
  const ae = /* @__PURE__ */ new Map();
230
230
  function Ze(t, e) {
231
- t in h().callbackRegistry || (h().callbackRegistry[t] = (n) => {
231
+ t in m().callbackRegistry || (m().callbackRegistry[t] = (n) => {
232
232
  for (const r of ae.get(t))
233
233
  r(n);
234
234
  }, ae.set(t, [])), ae.get(t).push(e);
235
235
  }
236
- class _ {
236
+ class C {
237
237
  constructor(e, n = (r) => r) {
238
238
  L(this, "isResolved", !1);
239
239
  L(this, "resolvedValue");
@@ -242,10 +242,10 @@ class _ {
242
242
  });
243
243
  }
244
244
  map(e) {
245
- return new _(this.handle, (n) => e(this.postProcess(n)));
245
+ return new C(this.handle, (n) => e(this.postProcess(n)));
246
246
  }
247
247
  mapDefined(e) {
248
- return new _(this.handle, (n) => {
248
+ return new C(this.handle, (n) => {
249
249
  const r = this.postProcess(n);
250
250
  return r ? e(r) : void 0;
251
251
  });
@@ -257,7 +257,7 @@ class _ {
257
257
  function pe(t, e) {
258
258
  return t === void 0 ? void 0 : e(t);
259
259
  }
260
- class I {
260
+ class _ {
261
261
  constructor(e, n) {
262
262
  this.handle = e, this.resolvePath = n;
263
263
  }
@@ -297,46 +297,46 @@ class I {
297
297
  ...n.map((i) => typeof i == "string" ? i : i.field)
298
298
  ];
299
299
  return pe(
300
- h().resolveWithCommon(this.handle, e, ...n),
301
- (i) => new I(i, r)
300
+ m().resolveWithCommon(this.handle, e, ...n),
301
+ (i) => new _(i, r)
302
302
  );
303
303
  }
304
304
  get resourceType() {
305
- return h().getResourceType(this.handle);
305
+ return m().getResourceType(this.handle);
306
306
  }
307
307
  getInputsLocked() {
308
- return h().getInputsLocked(this.handle);
308
+ return m().getInputsLocked(this.handle);
309
309
  }
310
310
  getOutputsLocked() {
311
- return h().getOutputsLocked(this.handle);
311
+ return m().getOutputsLocked(this.handle);
312
312
  }
313
313
  getIsReadyOrError() {
314
- return h().getIsReadyOrError(this.handle);
314
+ return m().getIsReadyOrError(this.handle);
315
315
  }
316
316
  getIsFinal() {
317
- return h().getIsFinal(this.handle);
317
+ return m().getIsFinal(this.handle);
318
318
  }
319
319
  getError() {
320
320
  const e = [...this.resolvePath, "error"];
321
321
  return pe(
322
- h().getError(this.handle),
323
- (n) => new I(n, e)
322
+ m().getError(this.handle),
323
+ (n) => new _(n, e)
324
324
  );
325
325
  }
326
326
  listInputFields() {
327
- return h().listInputFields(this.handle);
327
+ return m().listInputFields(this.handle);
328
328
  }
329
329
  listOutputFields() {
330
- return h().listOutputFields(this.handle);
330
+ return m().listOutputFields(this.handle);
331
331
  }
332
332
  listDynamicFields() {
333
- return h().listDynamicFields(this.handle);
333
+ return m().listDynamicFields(this.handle);
334
334
  }
335
335
  getKeyValueBase64(e) {
336
- return h().getKeyValueBase64(this.handle, e);
336
+ return m().getKeyValueBase64(this.handle, e);
337
337
  }
338
338
  getKeyValueAsString(e) {
339
- return h().getKeyValueAsString(this.handle, e);
339
+ return m().getKeyValueAsString(this.handle, e);
340
340
  }
341
341
  getKeyValueAsJson(e) {
342
342
  const n = this.getKeyValueAsString(e);
@@ -344,10 +344,10 @@ class I {
344
344
  return JSON.parse(n);
345
345
  }
346
346
  getDataBase64() {
347
- return h().getDataBase64(this.handle);
347
+ return m().getDataBase64(this.handle);
348
348
  }
349
349
  getDataAsString() {
350
- return h().getDataAsString(this.handle);
350
+ return m().getDataAsString(this.handle);
351
351
  }
352
352
  getDataAsJson() {
353
353
  const e = this.getDataAsString();
@@ -360,7 +360,7 @@ class I {
360
360
  getPColumns(e = !1, n = "") {
361
361
  const r = this.parsePObjectCollection(e, n);
362
362
  return r === void 0 ? void 0 : Object.entries(r).map(([, s]) => {
363
- if (!se(s)) throw new Error(`not a PColumn (kind = ${s.spec.kind})`);
363
+ if (!ie(s)) throw new Error(`not a PColumn (kind = ${s.spec.kind})`);
364
364
  return s;
365
365
  });
366
366
  }
@@ -368,7 +368,7 @@ class I {
368
368
  *
369
369
  */
370
370
  parsePObjectCollection(e = !1, n = "") {
371
- const r = h().parsePObjectCollection(
371
+ const r = m().parsePObjectCollection(
372
372
  this.handle,
373
373
  e,
374
374
  n,
@@ -378,19 +378,19 @@ class I {
378
378
  const i = {};
379
379
  for (const [s, o] of Object.entries(r)) {
380
380
  const a = [...this.resolvePath, s];
381
- i[s] = ge(o, (l) => new I(l, a));
381
+ i[s] = ge(o, (l) => new _(l, a));
382
382
  }
383
383
  return i;
384
384
  }
385
385
  getFileContentAsBase64() {
386
- return new _(h().getBlobContentAsBase64(this.handle));
386
+ return new C(m().getBlobContentAsBase64(this.handle));
387
387
  }
388
388
  getFileContentAsString() {
389
- return new _(h().getBlobContentAsString(this.handle));
389
+ return new C(m().getBlobContentAsString(this.handle));
390
390
  }
391
391
  getFileContentAsJson() {
392
- return new _(
393
- h().getBlobContentAsString(this.handle)
392
+ return new C(
393
+ m().getBlobContentAsString(this.handle)
394
394
  ).mapDefined((e) => JSON.parse(e));
395
395
  }
396
396
  /**
@@ -409,7 +409,7 @@ class I {
409
409
  * @returns downloaded file handle
410
410
  */
411
411
  getFileHandle() {
412
- return new _(h().getDownloadedBlobContentHandle(this.handle));
412
+ return new C(m().getDownloadedBlobContentHandle(this.handle));
413
413
  }
414
414
  /**
415
415
  * @deprecated use getFileHandle
@@ -421,7 +421,7 @@ class I {
421
421
  * @returns downloaded file handle
422
422
  */
423
423
  getRemoteFileHandle() {
424
- return new _(h().getOnDemandBlobContentHandle(this.handle));
424
+ return new C(m().getOnDemandBlobContentHandle(this.handle));
425
425
  }
426
426
  /**
427
427
  * @deprecated use getRemoteFileHandle
@@ -433,22 +433,22 @@ class I {
433
433
  * @returns the url to the extracted folder
434
434
  */
435
435
  extractArchiveAndGetURL(e) {
436
- return new _(h().extractArchiveAndGetURL(this.handle, e));
436
+ return new C(m().extractArchiveAndGetURL(this.handle, e));
437
437
  }
438
438
  getImportProgress() {
439
- return new _(h().getImportProgress(this.handle));
439
+ return new C(m().getImportProgress(this.handle));
440
440
  }
441
441
  getLastLogs(e) {
442
- return new _(h().getLastLogs(this.handle, e));
442
+ return new C(m().getLastLogs(this.handle, e));
443
443
  }
444
444
  getProgressLog(e) {
445
- return new _(h().getProgressLog(this.handle, e));
445
+ return new C(m().getProgressLog(this.handle, e));
446
446
  }
447
447
  getProgressLogWithInfo(e) {
448
- return new _(h().getProgressLogWithInfo(this.handle, e));
448
+ return new C(m().getProgressLogWithInfo(this.handle, e));
449
449
  }
450
450
  getLogHandle() {
451
- return new _(h().getLogHandle(this.handle));
451
+ return new C(m().getLogHandle(this.handle));
452
452
  }
453
453
  allFieldsResolved(e = "Input") {
454
454
  switch (e) {
@@ -472,9 +472,9 @@ class I {
472
472
  if (i && (r === "Input" && !this.getInputsLocked() || r === "Output" && !this.getOutputsLocked()))
473
473
  return;
474
474
  let l = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
475
- (c) => [c, this.resolve({ field: c, assertFieldType: r })]
475
+ (u) => [u, this.resolve({ field: u, assertFieldType: r })]
476
476
  );
477
- return s && (l = l.filter((c) => c[1] !== void 0)), l.map(([c, w]) => o(c, w));
477
+ return s && (l = l.filter((u) => u[1] !== void 0)), l.map(([u, S]) => o(u, S));
478
478
  }
479
479
  }
480
480
  const Ie = "staging", Le = "main", et = {
@@ -512,93 +512,104 @@ const cn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
512
512
  id: K.string().optional(),
513
513
  label: K.string()
514
514
  }), st = K.array(it), ot = 1e-3, at = "__LABEL__", ve = "__LABEL__@1";
515
- function Fe(t, e, n = {}) {
516
- const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s = t.map((u) => {
517
- var $, q;
518
- const f = e(u);
519
- let p, y, v;
520
- "spec" in f && typeof f.spec == "object" ? (p = f.spec, y = f.prefixTrace, v = f.suffixTrace) : p = f;
521
- const m = ($ = p.annotations) == null ? void 0 : $[nt], b = (q = p.annotations) == null ? void 0 : q[rt], g = (b ? st.safeParse(JSON.parse(b)).data : void 0) ?? [], A = [
522
- ...y ?? [],
523
- ...g,
524
- ...v ?? []
515
+ function Ee(t, e, n = {}) {
516
+ const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s = t.map((p) => {
517
+ var q, F;
518
+ const c = e(p);
519
+ let h, A, y;
520
+ "spec" in c && typeof c.spec == "object" ? (h = c.spec, A = c.prefixTrace, y = c.suffixTrace) : h = c;
521
+ 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 = [
522
+ ...A ?? [],
523
+ ...P,
524
+ ...y ?? []
525
525
  ];
526
- if (m) {
527
- const P = { label: m, type: at, importance: -2 };
528
- n.addLabelAsSuffix ? A.push(P) : A.splice(0, 0, P);
526
+ if (v) {
527
+ const I = { label: v, type: at, importance: -2 };
528
+ n.addLabelAsSuffix ? b.push(I) : b.splice(0, 0, I);
529
529
  }
530
- const x = [], k = /* @__PURE__ */ new Map();
531
- for (let P = A.length - 1; P >= 0; --P) {
532
- const { type: R } = A[P], z = A[P].importance ?? 0, J = (k.get(R) ?? 0) + 1;
533
- k.set(R, J);
534
- const E = `${R}@${J}`;
535
- i.set(E, (i.get(E) ?? 0) + 1), r.set(
536
- E,
530
+ const k = [], $ = /* @__PURE__ */ new Map();
531
+ for (let I = b.length - 1; I >= 0; --I) {
532
+ const { type: R } = b[I], se = b[I].importance ?? 0, J = ($.get(R) ?? 0) + 1;
533
+ $.set(R, J);
534
+ const w = `${R}@${J}`;
535
+ i.set(w, (i.get(w) ?? 0) + 1), r.set(
536
+ w,
537
537
  Math.max(
538
- r.get(E) ?? Number.NEGATIVE_INFINITY,
539
- z - (A.length - P) * ot
538
+ r.get(w) ?? Number.NEGATIVE_INFINITY,
539
+ se - (b.length - I) * ot
540
540
  )
541
- ), x.push({ ...A[P], fullType: E, occurenceIndex: J });
541
+ ), k.push({ ...b[I], fullType: w, occurenceIndex: J });
542
542
  }
543
- return x.reverse(), {
544
- value: u,
545
- spec: p,
546
- label: m,
547
- fullTrace: x
543
+ return k.reverse(), {
544
+ value: p,
545
+ spec: h,
546
+ label: v,
547
+ fullTrace: k
548
548
  };
549
549
  }), o = [], a = [], l = [...r];
550
- l.sort(([, u], [, f]) => f - u);
551
- for (const [u] of l)
552
- u.endsWith("@1") || i.get(u) === t.length ? o.push(u) : a.push(u);
553
- const c = (u) => s.map((f) => {
554
- const p = f.fullTrace.filter((v) => u.has(v.fullType)).map((v) => v.label), y = n.separator ?? " / ";
555
- return {
556
- label: p.join(y),
557
- value: f.value
558
- };
559
- });
550
+ l.sort(([, p], [, c]) => c - p);
551
+ for (const [p] of l)
552
+ p.endsWith("@1") || i.get(p) === t.length ? o.push(p) : a.push(p);
553
+ const u = (p) => {
554
+ const c = [];
555
+ for (let h = 0; h < s.length; h++) {
556
+ const A = s[h], y = A.fullTrace.filter((P) => p.has(P.fullType));
557
+ if (y.length === 0)
558
+ return;
559
+ const v = y.map((P) => P.label), g = n.separator ?? " / ";
560
+ c.push({
561
+ label: v.join(g),
562
+ value: A.value
563
+ });
564
+ }
565
+ return c;
566
+ };
560
567
  if (o.length === 0) {
561
568
  if (a.length !== 0) throw new Error("Assertion error.");
562
- return c(new Set(ve));
563
- }
564
- let w = 0, d = 0;
565
- for (; w < o.length; ) {
566
- const u = /* @__PURE__ */ new Set();
567
- n.includeNativeLabel && u.add(ve);
568
- for (let p = 0; p < w; ++p) u.add(o[p]);
569
- u.add(o[d]);
570
- const f = c(u);
571
- if (new Set(f.map((p) => p.label)).size === t.length) return f;
572
- d++, d == o.length && (w++, d = w);
573
- }
574
- return c(/* @__PURE__ */ new Set([...o, ...a]));
575
- }
576
- const H = "PColumnData/", ne = H + "ResourceMap", re = H + "Partitioned/ResourceMap", U = H + "JsonPartitioned", V = H + "BinaryPartitioned", Ee = H + "Partitioned/", ie = Ee + "JsonPartitioned", B = Ee + "BinaryPartitioned";
577
- function De(t, e, n, r = [], i) {
569
+ const p = u(new Set(ve));
570
+ if (p === void 0) throw new Error("Assertion error.");
571
+ return p;
572
+ }
573
+ let S = 0, d = 0;
574
+ for (; S < o.length; ) {
575
+ const p = /* @__PURE__ */ new Set();
576
+ n.includeNativeLabel && p.add(ve);
577
+ for (let h = 0; h < S; ++h) p.add(o[h]);
578
+ p.add(o[d]);
579
+ const c = u(p);
580
+ if (c !== void 0 && new Set(c.map((h) => h.label)).size === t.length) return c;
581
+ d++, d >= o.length && (S++, d = S);
582
+ }
583
+ const f = u(/* @__PURE__ */ new Set([...o, ...a]));
584
+ if (f === void 0) throw new Error("Assertion error.");
585
+ return f;
586
+ }
587
+ 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";
588
+ function ke(t, e, n, r = [], i) {
578
589
  if (t === void 0) return !1;
579
590
  switch (t.resourceType.name) {
580
- case ne: {
591
+ case te: {
581
592
  let s = t.getInputsLocked();
582
593
  for (const o of t.listInputFields()) {
583
- const a = t.resolve({ field: o, assertFieldType: "Input" }), l = [...r, ...JSON.parse(o)], c = a === void 0 ? void 0 : e(a);
584
- c === void 0 && (s = !1), (c !== void 0 || i) && n.push({ key: l, value: c });
594
+ const a = t.resolve({ field: o, assertFieldType: "Input" }), l = [...r, ...JSON.parse(o)], u = a === void 0 ? void 0 : e(a);
595
+ u === void 0 && (s = !1), (u !== void 0 || i) && n.push({ key: l, value: u });
585
596
  }
586
597
  return s;
587
598
  }
588
- case re: {
599
+ case ne: {
589
600
  let s = t.getInputsLocked();
590
601
  for (const o of t.listInputFields()) {
591
602
  const a = t.resolve({ field: o, assertFieldType: "Input" });
592
603
  if (a === void 0) s = !1;
593
604
  else {
594
- const l = [...r, ...JSON.parse(o)], c = De(
605
+ const l = [...r, ...JSON.parse(o)], u = ke(
595
606
  a,
596
607
  e,
597
608
  n,
598
609
  l,
599
610
  i
600
611
  );
601
- s = s && c;
612
+ s = s && u;
602
613
  }
603
614
  }
604
615
  return s;
@@ -609,7 +620,7 @@ function De(t, e, n, r = [], i) {
609
620
  }
610
621
  function pn(t, e, n = !1) {
611
622
  const r = [];
612
- return { isComplete: De(t, e, r, [], n), data: r };
623
+ return { isComplete: ke(t, e, r, [], n), data: r };
613
624
  }
614
625
  const fe = (t) => {
615
626
  if (t.endsWith(".index"))
@@ -623,10 +634,10 @@ function lt(t) {
623
634
  const e = t.resourceType.name, n = t.getDataAsJson(), r = [];
624
635
  let i = 0;
625
636
  switch (e) {
626
- case ne:
637
+ case te:
627
638
  i = n.keyLength;
628
639
  break;
629
- case re:
640
+ case ne:
630
641
  i = n.partitionKeyLength + n.keyLength;
631
642
  break;
632
643
  case U:
@@ -634,12 +645,12 @@ function lt(t) {
634
645
  i = n.partitionKeyLength;
635
646
  break;
636
647
  case B:
637
- case ie:
648
+ case re:
638
649
  i = n.superPartitionKeyLength + n.partitionKeyLength;
639
650
  break;
640
651
  }
641
652
  switch (e) {
642
- case ne:
653
+ case te:
643
654
  case U:
644
655
  case V:
645
656
  for (let s of t.listInputFields()) {
@@ -648,16 +659,16 @@ function lt(t) {
648
659
  r.push(o);
649
660
  }
650
661
  break;
651
- case re:
662
+ case ne:
652
663
  case B:
653
- case ie:
664
+ case re:
654
665
  for (const s of t.listInputFields()) {
655
666
  const o = [...JSON.parse(s)], a = t.resolve({ field: s, assertFieldType: "Input" });
656
667
  if (a !== void 0)
657
668
  for (let l of a.listInputFields()) {
658
669
  e === B && (l = fe(l).baseKey);
659
- const c = [...o, ...JSON.parse(l)];
660
- r.push(c);
670
+ const u = [...o, ...JSON.parse(l)];
671
+ r.push(u);
661
672
  }
662
673
  }
663
674
  break;
@@ -703,11 +714,11 @@ function ct(t) {
703
714
  function he(t, e = []) {
704
715
  if (t === void 0 || !t.getIsReadyOrError()) return;
705
716
  const n = t.resourceType.name, r = t.getDataAsJson();
706
- if (e.length > 0 && (n === ie || n === B))
717
+ if (e.length > 0 && (n === re || n === B))
707
718
  throw new Error(`Unexpected nested super-partitioned resource: ${n}`);
708
719
  switch (n) {
720
+ case te:
709
721
  case ne:
710
- case re:
711
722
  throw new Error(`Only data columns are supported, got: ${n}`);
712
723
  case U: {
713
724
  if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
@@ -732,8 +743,8 @@ function he(t, e = []) {
732
743
  for (const o of t.listInputFields()) {
733
744
  const a = fe(o), l = t.resolve({ field: o, assertFieldType: "Input" });
734
745
  if (l === void 0) return;
735
- let c = s.get(a.baseKey);
736
- c || (c = {}, s.set(a.baseKey, c)), a.type === "index" ? c.index = l : c.values = l;
746
+ let u = s.get(a.baseKey);
747
+ u || (u = {}, s.set(a.baseKey, u)), a.type === "index" ? u.index = l : u.values = l;
737
748
  }
738
749
  for (const [o, a] of s.entries()) {
739
750
  if (!a.index || !a.values) return;
@@ -752,7 +763,7 @@ function he(t, e = []) {
752
763
  parts: i
753
764
  };
754
765
  }
755
- case ie: {
766
+ case re: {
756
767
  if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
757
768
  throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n}`);
758
769
  const i = r.superPartitionKeyLength + r.partitionKeyLength, s = [];
@@ -802,7 +813,7 @@ function pt(t) {
802
813
  if (t !== void 0) {
803
814
  if (xe(t)) return t;
804
815
  if (me(t)) return Ve(t);
805
- if (t instanceof I) return he(t);
816
+ if (t instanceof _) return he(t);
806
817
  throw new Error(`Unexpected input type: ${typeof t}`);
807
818
  }
808
819
  }
@@ -935,110 +946,111 @@ class be {
935
946
  const { anchorCtx: r, labelOps: i, dontWaitAllData: s = !1, overrideLabelAnnotation: o = !1 } = n ?? {}, a = {
936
947
  ...o && (i == null ? void 0 : i.includeNativeLabel) !== !1 ? { includeNativeLabel: !0 } : {},
937
948
  ...i ?? {}
938
- }, l = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], c = [];
939
- for (const u of l) {
940
- const f = yt(u);
941
- let p;
942
- if (f) {
949
+ }, l = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], u = [];
950
+ for (const f of l) {
951
+ const p = yt(f);
952
+ let c;
953
+ if (p) {
943
954
  if (!r)
944
955
  throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
945
- p = $e(r.anchors, u);
956
+ c = $e(r.anchors, f);
946
957
  } else
947
- p = u;
948
- const y = /* @__PURE__ */ new Set(), v = [];
958
+ c = f;
959
+ const h = /* @__PURE__ */ new Set(), A = [];
949
960
  for (const g of this.providers) {
950
- const A = g.selectColumns(p);
951
- for (const x of A) {
952
- if (y.has(x.id)) throw new Error(`Duplicate column id ${x.id} in provider ${g.constructor.name}`);
953
- y.add(x.id), v.push(x);
961
+ const P = g.selectColumns(c);
962
+ for (const b of P) {
963
+ if (h.has(b.id)) throw new Error(`Duplicate column id ${b.id} in provider ${g.constructor.name}`);
964
+ h.add(b.id), A.push(b);
954
965
  }
955
966
  }
956
- if (v.length === 0) continue;
957
- const m = vt(u), b = m.length > 0;
958
- for (const g of v) {
959
- if (!Z(g.spec)) continue;
960
- const A = g.spec;
961
- if (b) {
962
- const x = pt(g.data);
963
- if (!x) {
967
+ if (A.length === 0) continue;
968
+ const y = vt(f), v = y.length > 0;
969
+ for (const g of A) {
970
+ if (!Q(g.spec)) continue;
971
+ const P = g.spec;
972
+ if (v) {
973
+ const b = pt(g.data);
974
+ if (!b) {
964
975
  if (s) continue;
965
976
  return;
966
977
  }
967
- if (!Je(x))
968
- throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${x.type} for column ${g.id}`);
969
- const k = ct(x), $ = m[m.length - 1];
970
- if ($ >= x.partitionKeyLength)
971
- throw new Error(`Not enough partition keys (${x.partitionKeyLength}) for requested split axes (max index ${$}) in column ${A.name}`);
972
- const q = m.map((C) => this.findLabels(F(A.axesSpec[C]))), P = [], R = (C, N) => {
973
- if (N >= m.length) {
974
- P.push([...C]);
978
+ if (!Je(b))
979
+ throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${b.type} for column ${g.id}`);
980
+ const k = ct(b), $ = y[y.length - 1];
981
+ if ($ >= b.partitionKeyLength)
982
+ throw new Error(`Not enough partition keys (${b.partitionKeyLength}) for requested split axes (max index ${$}) in column ${P.name}`);
983
+ const q = y.map((w) => this.findLabels(E(P.axesSpec[w]))), F = [], I = (w, N) => {
984
+ if (N >= y.length) {
985
+ if (F.push([...w]), F.length > 1e4)
986
+ throw new Error("Too many key combinations, aborting.");
975
987
  return;
976
988
  }
977
- const D = m[N];
989
+ const D = y[N];
978
990
  if (D >= k.length)
979
991
  throw new Error(`Axis index ${D} out of bounds for unique keys array (length ${k.length}) during split key generation for column ${g.id}`);
980
992
  const O = k[D];
981
993
  if (!O || O.length === 0) {
982
- P.length = 0;
994
+ F.length = 0;
983
995
  return;
984
996
  }
985
- for (const Y of O)
986
- C.push(Y), R(C, N + 1), C.pop();
997
+ for (const z of O)
998
+ w.push(z), I(w, N + 1), w.pop();
987
999
  };
988
- if (R([], 0), P.length === 0)
1000
+ if (I([], 0), F.length === 0)
989
1001
  continue;
990
- const z = [...A.axesSpec], J = m.map((C) => C);
991
- for (let C = m.length - 1; C >= 0; C--)
992
- z.splice(m[C], 1);
993
- const E = { ...A, axesSpec: z };
994
- for (const C of P) {
995
- const N = C.map((D, O) => {
996
- const Y = J[O], Re = F(A.axesSpec[Y]), oe = q[O], Oe = (oe == null ? void 0 : oe[D]) ?? String(D);
997
- return { axisIdx: Y, axisId: Re, value: D, label: Oe };
1002
+ const R = [...P.axesSpec], se = y.map((w) => w);
1003
+ for (let w = y.length - 1; w >= 0; w--)
1004
+ R.splice(y[w], 1);
1005
+ const J = { ...P, axesSpec: R };
1006
+ for (const w of F) {
1007
+ const N = w.map((D, O) => {
1008
+ const z = se[O], Re = E(P.axesSpec[z]), oe = q[O], Oe = (oe == null ? void 0 : oe[D]) ?? String(D);
1009
+ return { axisIdx: z, axisId: Re, value: D, label: Oe };
998
1010
  });
999
- c.push({
1011
+ u.push({
1000
1012
  type: "split",
1001
1013
  originalColumn: g,
1002
- spec: A,
1003
- adjustedSpec: E,
1004
- dataEntries: x,
1014
+ spec: P,
1015
+ adjustedSpec: J,
1016
+ dataEntries: b,
1005
1017
  axisFilters: N
1006
1018
  });
1007
1019
  }
1008
1020
  } else
1009
- c.push({
1021
+ u.push({
1010
1022
  type: "direct",
1011
1023
  originalColumn: g,
1012
- spec: A,
1013
- adjustedSpec: A
1024
+ spec: P,
1025
+ adjustedSpec: P
1014
1026
  });
1015
1027
  }
1016
1028
  }
1017
- if (c.length === 0) return [];
1018
- const w = Fe(
1019
- c,
1020
- (u) => ({
1021
- spec: u.spec,
1022
- suffixTrace: u.type === "split" ? ht(u.axisFilters) : void 0
1029
+ if (u.length === 0) return [];
1030
+ const S = Ee(
1031
+ u,
1032
+ (f) => ({
1033
+ spec: f.spec,
1034
+ suffixTrace: f.type === "split" ? ht(f.axisFilters) : void 0
1023
1035
  }),
1024
1036
  a
1025
1037
  ), d = [];
1026
- for (const { value: u, label: f } of w) {
1027
- const { originalColumn: p, spec: y } = u, v = u.type === "split" ? u.axisFilters : void 0, m = gt(v);
1028
- let b;
1029
- r ? b = r.deriveS(y, m) : b = mt(p.id, m);
1030
- let g = { ...u.adjustedSpec };
1038
+ for (const { value: f, label: p } of S) {
1039
+ const { originalColumn: c, spec: h } = f, A = f.type === "split" ? f.axisFilters : void 0, y = gt(A);
1040
+ let v;
1041
+ r ? v = r.deriveS(h, y) : v = mt(c.id, y);
1042
+ let g = { ...f.adjustedSpec };
1031
1043
  o && (g = {
1032
1044
  ...g,
1033
1045
  annotations: {
1034
1046
  ...g.annotations ?? {},
1035
- "pl7.app/label": f
1047
+ "pl7.app/label": p
1036
1048
  }
1037
1049
  }), d.push({
1038
- id: b,
1050
+ id: v,
1039
1051
  spec: g,
1040
- data: () => u.type === "split" ? Ne(dt(u.dataEntries, m)) : u.originalColumn.data,
1041
- label: f
1052
+ data: () => f.type === "split" ? Ne(dt(f.dataEntries, y)) : f.originalColumn.data,
1053
+ label: p
1042
1054
  });
1043
1055
  }
1044
1056
  return d;
@@ -1074,11 +1086,11 @@ function le(t, e) {
1074
1086
  return !0;
1075
1087
  }
1076
1088
  function we(t) {
1077
- return ge(t, (e) => e instanceof I ? e.handle : me(e) ? qe(e, (n) => n.handle) : e);
1089
+ return ge(t, (e) => e instanceof _ ? e.handle : me(e) ? qe(e, (n) => n.handle) : e);
1078
1090
  }
1079
1091
  class bt {
1080
1092
  constructor() {
1081
- L(this, "ctx", h());
1093
+ L(this, "ctx", m());
1082
1094
  }
1083
1095
  /**
1084
1096
  * @deprecated use getOptions()
@@ -1088,7 +1100,7 @@ class bt {
1088
1100
  }
1089
1101
  getOptions(e, n) {
1090
1102
  const r = typeof e == "function" ? e : ce(e), i = this.getSpecs().entries.filter((s) => r(s.obj));
1091
- return typeof n == "object" || typeof n > "u" ? Fe(i, (s) => s.obj, n ?? {}).map(({ value: { ref: s }, label: o }) => ({
1103
+ return typeof n == "object" || typeof n > "u" ? Ee(i, (s) => s.obj, n ?? {}).map(({ value: { ref: s }, label: o }) => ({
1092
1104
  ref: s,
1093
1105
  label: o
1094
1106
  })) : i.map((s) => ({
@@ -1181,7 +1193,7 @@ class bt {
1181
1193
  ref: n.ref,
1182
1194
  obj: {
1183
1195
  ...n.obj,
1184
- data: new I(n.obj.data, [n.ref.blockId, n.ref.name])
1196
+ data: new _(n.obj.data, [n.ref.blockId, n.ref.name])
1185
1197
  }
1186
1198
  }))
1187
1199
  };
@@ -1202,7 +1214,7 @@ class bt {
1202
1214
  ...n.obj,
1203
1215
  data: Me(
1204
1216
  n.obj.data,
1205
- (r) => new I(r, [n.ref.blockId, n.ref.name])
1217
+ (r) => new _(r, [n.ref.blockId, n.ref.name])
1206
1218
  )
1207
1219
  }
1208
1220
  }))
@@ -1231,7 +1243,7 @@ class bt {
1231
1243
  if (n)
1232
1244
  return ge(
1233
1245
  n,
1234
- (i) => new I(i, [e.blockId, e.name])
1246
+ (i) => new _(i, [e.blockId, e.name])
1235
1247
  );
1236
1248
  }
1237
1249
  /**
@@ -1252,7 +1264,7 @@ class bt {
1252
1264
  getPColumnSpecByRef(e) {
1253
1265
  const n = this.getSpecByRef(e);
1254
1266
  if (n) {
1255
- if (!Z(n)) throw new Error(`not a PColumn spec (kind = ${n.kind})`);
1267
+ if (!Q(n)) throw new Error(`not a PColumn spec (kind = ${n.kind})`);
1256
1268
  return n;
1257
1269
  }
1258
1270
  }
@@ -1271,7 +1283,7 @@ class bt {
1271
1283
  findDataWithCompatibleSpec(e) {
1272
1284
  const n = [];
1273
1285
  e: for (const r of this.getData().entries) {
1274
- if (!Z(r.obj.spec))
1286
+ if (!Q(r.obj.spec))
1275
1287
  continue;
1276
1288
  const i = r.obj.spec;
1277
1289
  if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && le(e.domain, i.domain)) {
@@ -1292,7 +1304,7 @@ class bt {
1292
1304
  findLabels(e) {
1293
1305
  const n = this.getData();
1294
1306
  for (const r of n.entries) {
1295
- if (!se(r.obj)) continue;
1307
+ if (!ie(r.obj)) continue;
1296
1308
  const i = r.obj.spec;
1297
1309
  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)) {
1298
1310
  if (r.obj.data.resourceType.name !== "PColumnData/Json")
@@ -1314,7 +1326,7 @@ class bt {
1314
1326
  */
1315
1327
  selectColumns(e) {
1316
1328
  const n = typeof e == "function" ? e : ce(e);
1317
- return this.getSpecs().entries.filter(({ obj: i }) => Z(i) ? n(i) : !1).map(({ ref: i, obj: s }) => {
1329
+ return this.getSpecs().entries.filter(({ obj: i }) => Q(i) ? n(i) : !1).map(({ ref: i, obj: s }) => {
1318
1330
  const o = s;
1319
1331
  let a = null;
1320
1332
  const l = this;
@@ -1322,8 +1334,8 @@ class bt {
1322
1334
  id: Pe(i),
1323
1335
  spec: o,
1324
1336
  get data() {
1325
- var c;
1326
- return a !== null || (a = (c = l.getPColumnByRef(i)) == null ? void 0 : c.data), a;
1337
+ var u;
1338
+ return a !== null || (a = (u = l.getPColumnByRef(i)) == null ? void 0 : u.data), a;
1327
1339
  }
1328
1340
  };
1329
1341
  });
@@ -1341,7 +1353,7 @@ class bt {
1341
1353
  }));
1342
1354
  }
1343
1355
  }
1344
- class Q {
1356
+ class X {
1345
1357
  constructor() {
1346
1358
  L(this, "ctx");
1347
1359
  L(this, "args");
@@ -1349,7 +1361,7 @@ class Q {
1349
1361
  // lazy rendering because this feature is rarely used
1350
1362
  L(this, "_activeArgsCache");
1351
1363
  L(this, "resultPool", new bt());
1352
- this.ctx = h(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
1364
+ this.ctx = m(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
1353
1365
  }
1354
1366
  /**
1355
1367
  * Returns args snapshot the block was executed for (i.e. when "Run" button was pressed).
@@ -1367,7 +1379,7 @@ class Q {
1367
1379
  getNamedAccessor(e) {
1368
1380
  return pe(
1369
1381
  this.ctx.getAccessorHandleByName(e),
1370
- (n) => new I(n, [e])
1382
+ (n) => new _(n, [e])
1371
1383
  );
1372
1384
  }
1373
1385
  get prerun() {
@@ -1386,7 +1398,7 @@ class Q {
1386
1398
  }
1387
1399
  verifyInlineAndExplicitColumnsSupport(e) {
1388
1400
  var i;
1389
- const n = e.some((s) => !(s.data instanceof I) || me(s.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === !0;
1401
+ const n = e.some((s) => !(s.data instanceof _) || me(s.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === !0;
1390
1402
  if (n && !r) throw Error("Inline or explicit columns not supported");
1391
1403
  }
1392
1404
  // TODO remove all non-PColumn fields
@@ -1417,7 +1429,7 @@ class Q {
1417
1429
  return this.ctx.getCurrentUnstableMarker();
1418
1430
  }
1419
1431
  }
1420
- const M = "1.28.0";
1432
+ const M = "1.28.4";
1421
1433
  function wt(t) {
1422
1434
  return t.__renderLambda === !0;
1423
1435
  }
@@ -1440,7 +1452,7 @@ function dn(t) {
1440
1452
  sdkVersion: o,
1441
1453
  sections: a,
1442
1454
  title: l
1443
- } = t.v3, { code: c } = t;
1455
+ } = t.v3, { code: u } = t;
1444
1456
  return {
1445
1457
  initialArgs: e,
1446
1458
  initialUiState: n,
@@ -1450,7 +1462,7 @@ function dn(t) {
1450
1462
  sdkVersion: o,
1451
1463
  sections: a,
1452
1464
  title: l,
1453
- code: c
1465
+ code: u
1454
1466
  };
1455
1467
  } else if (t.inputsValid !== void 0) {
1456
1468
  const { sdkVersion: e, renderingMode: n, outputs: r, inputsValid: i, sections: s, initialArgs: o, code: a } = t, l = Object.keys(t);
@@ -1463,7 +1475,7 @@ function dn(t) {
1463
1475
  renderingMode: n,
1464
1476
  initialArgs: o,
1465
1477
  outputs: Object.fromEntries(
1466
- Object.entries(r).map(([c, w]) => [c, j(w)])
1478
+ Object.entries(r).map(([u, S]) => [u, j(S)])
1467
1479
  ),
1468
1480
  inputsValid: j(i),
1469
1481
  sections: j(s),
@@ -1481,7 +1493,7 @@ function dn(t) {
1481
1493
  renderingMode: r,
1482
1494
  initialArgs: o,
1483
1495
  outputs: Object.fromEntries(
1484
- Object.entries(i).map(([c, w]) => [c, j(w)])
1496
+ Object.entries(i).map(([u, S]) => [u, j(S)])
1485
1497
  ),
1486
1498
  inputsValid: j(n),
1487
1499
  sections: j(s),
@@ -1505,15 +1517,15 @@ class T {
1505
1517
  void 0,
1506
1518
  {},
1507
1519
  {},
1508
- ee(!0),
1509
- ee([]),
1520
+ Z(!0),
1521
+ Z([]),
1510
1522
  void 0
1511
1523
  );
1512
1524
  }
1513
1525
  output(e, n, r = {}) {
1514
1526
  if (typeof n == "function") {
1515
1527
  const i = `output#${e}`;
1516
- return X(i, () => n(new Q())), new T(
1528
+ return Y(i, () => n(new X())), new T(
1517
1529
  this._renderingMode,
1518
1530
  this._initialArgs,
1519
1531
  this._initialUiState,
@@ -1548,7 +1560,7 @@ class T {
1548
1560
  return this.output(e, n, { retentive: !0 });
1549
1561
  }
1550
1562
  argsValid(e) {
1551
- return typeof e == "function" ? (X("inputsValid", () => e(new Q())), new T(
1563
+ return typeof e == "function" ? (Y("inputsValid", () => e(new X())), new T(
1552
1564
  this._renderingMode,
1553
1565
  this._initialArgs,
1554
1566
  this._initialUiState,
@@ -1570,7 +1582,7 @@ class T {
1570
1582
  );
1571
1583
  }
1572
1584
  sections(e) {
1573
- return Array.isArray(e) ? this.sections(ee(e)) : typeof e == "function" ? (X("sections", () => e(new Q())), new T(
1585
+ return Array.isArray(e) ? this.sections(Z(e)) : typeof e == "function" ? (Y("sections", () => e(new X())), new T(
1574
1586
  this._renderingMode,
1575
1587
  this._initialArgs,
1576
1588
  this._initialUiState,
@@ -1590,7 +1602,7 @@ class T {
1590
1602
  }
1591
1603
  /** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
1592
1604
  title(e) {
1593
- return X("title", () => e(new Q())), new T(
1605
+ return Y("title", () => e(new X())), new T(
1594
1606
  this._renderingMode,
1595
1607
  this._initialArgs,
1596
1608
  this._initialUiState,
@@ -1669,39 +1681,39 @@ class T {
1669
1681
  }
1670
1682
  }
1671
1683
  function fn(t, e, n, r) {
1672
- var c, w;
1684
+ var u, S;
1673
1685
  Array.isArray(r) && (r = { filters: r });
1674
- const i = t.resultPool.getData().entries.map((d) => d.obj).filter(se).filter((d) => d.spec.name === "pl7.app/label" && d.spec.axesSpec.length === 1), s = (d, u) => {
1675
- let f = d.toString();
1676
- if (u)
1677
- for (const p in u)
1678
- f += p, f += u[p];
1679
- return f;
1686
+ const i = t.resultPool.getData().entries.map((d) => d.obj).filter(ie).filter((d) => d.spec.name === "pl7.app/label" && d.spec.axesSpec.length === 1), s = (d, f) => {
1687
+ let p = d.toString();
1688
+ if (f)
1689
+ for (const c in f)
1690
+ p += c, p += f[c];
1691
+ return p;
1680
1692
  }, o = /* @__PURE__ */ new Map();
1681
1693
  for (const d of e)
1682
- for (const u of d.spec.axesSpec) {
1683
- const f = F(u);
1684
- for (const p of i) {
1685
- const y = p.spec.axesSpec[0], v = F(p.spec.axesSpec[0]);
1686
- if (G(f, v)) {
1687
- const m = Object.keys(f.domain ?? {}).length, b = Object.keys(v.domain ?? {}).length;
1688
- if (m > b) {
1689
- const g = s(p.id, f.domain);
1694
+ for (const f of d.spec.axesSpec) {
1695
+ const p = E(f);
1696
+ for (const c of i) {
1697
+ const h = c.spec.axesSpec[0], A = E(c.spec.axesSpec[0]);
1698
+ if (G(p, A)) {
1699
+ const y = Object.keys(p.domain ?? {}).length, v = Object.keys(A.domain ?? {}).length;
1700
+ if (y > v) {
1701
+ const g = s(c.id, p.domain);
1690
1702
  o.set(g, {
1691
1703
  id: g,
1692
1704
  spec: {
1693
- ...p.spec,
1694
- axesSpec: [{ ...f, annotations: y.annotations }]
1705
+ ...c.spec,
1706
+ axesSpec: [{ ...p, annotations: h.annotations }]
1695
1707
  },
1696
- data: p.data
1708
+ data: c.data
1697
1709
  });
1698
1710
  } else
1699
- o.set(s(p.id), p);
1711
+ o.set(s(c.id), c);
1700
1712
  }
1701
1713
  }
1702
1714
  }
1703
1715
  if ([...e, ...o.values()].some(
1704
- (d) => d.data instanceof I && !d.data.getIsReadyOrError()
1716
+ (d) => d.data instanceof _ && !d.data.getIsReadyOrError()
1705
1717
  ))
1706
1718
  return;
1707
1719
  let a = e;
@@ -1720,8 +1732,8 @@ function fn(t, e, n, r) {
1720
1732
  },
1721
1733
  secondary: l.map((d) => ({ type: "column", column: d }))
1722
1734
  },
1723
- filters: [...(r == null ? void 0 : r.filters) ?? [], ...((c = n == null ? void 0 : n.pTableParams) == null ? void 0 : c.filters) ?? []],
1724
- sorting: ((w = n == null ? void 0 : n.pTableParams) == null ? void 0 : w.sorting) ?? []
1735
+ filters: [...(r == null ? void 0 : r.filters) ?? [], ...((u = n == null ? void 0 : n.pTableParams) == null ? void 0 : u.filters) ?? []],
1736
+ sorting: ((S = n == null ? void 0 : n.pTableParams) == null ? void 0 : S.sorting) ?? []
1725
1737
  });
1726
1738
  }
1727
1739
  function hn(t, e, n) {
@@ -1755,55 +1767,55 @@ function St(t) {
1755
1767
  }), e;
1756
1768
  }
1757
1769
  function xt(t, e) {
1758
- const n = t.spec.axesSpec.map(F);
1759
- return e.spec.axesSpec.map(F).every((i) => n.some((s) => G(s, i) && G(i, s)));
1770
+ const n = t.spec.axesSpec.map(E);
1771
+ return e.spec.axesSpec.map(E).every((i) => n.some((s) => G(s, i) && G(i, s)));
1760
1772
  }
1761
- function ke(t, e) {
1762
- const n = t.spec.axesSpec.map(F);
1763
- return e.spec.axesSpec.map(F).every((i) => n.some((s) => G(s, i)));
1773
+ function De(t, e) {
1774
+ const n = t.spec.axesSpec.map(E);
1775
+ return e.spec.axesSpec.map(E).every((i) => n.some((s) => G(s, i)));
1764
1776
  }
1765
1777
  const Pt = "pl7.app/graph/isVirtual", Ae = "pl7.app/label";
1766
1778
  function Se(t, e) {
1767
- const n = t.spec.axesSpec.map(F), r = e.spec.axesSpec.map(F);
1779
+ const n = t.spec.axesSpec.map(E), r = e.spec.axesSpec.map(E);
1768
1780
  if (xt(t, e))
1769
1781
  return [];
1770
- if (!ke(t, e))
1782
+ if (!De(t, e))
1771
1783
  return [];
1772
- const o = r.map((d) => n.filter((u) => G(u, d))), a = St(o), l = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Set(), w = a.map((d) => {
1773
- const u = /* @__PURE__ */ new Set();
1774
- return d.map((f, p) => {
1775
- const y = e.spec.axesSpec[p].domain, v = f.domain;
1776
- return Object.entries(v ?? {}).forEach(([m, b]) => {
1777
- if ((y == null ? void 0 : y[m]) === void 0) {
1778
- const g = JSON.stringify([m, b]);
1779
- u.add(g), l.add(g);
1784
+ const o = r.map((d) => n.filter((f) => G(f, d))), a = St(o), l = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), S = a.map((d) => {
1785
+ const f = /* @__PURE__ */ new Set();
1786
+ return d.map((p, c) => {
1787
+ const h = e.spec.axesSpec[c].domain, A = p.domain;
1788
+ return Object.entries(A ?? {}).forEach(([y, v]) => {
1789
+ if ((h == null ? void 0 : h[y]) === void 0) {
1790
+ const g = JSON.stringify([y, v]);
1791
+ f.add(g), l.add(g);
1780
1792
  }
1781
1793
  }), {
1782
- ...f,
1783
- annotations: e.spec.axesSpec[p].annotations
1794
+ ...p,
1795
+ annotations: e.spec.axesSpec[c].annotations
1784
1796
  };
1785
- }), u;
1797
+ }), f;
1786
1798
  });
1787
1799
  return [...l].forEach((d) => {
1788
- w.some((u) => !u.has(d)) && c.add(d);
1789
- }), a.map((d, u) => {
1790
- var m;
1791
- const f = At(e.id, d.map((b) => b.domain)), p = ((m = e.spec.annotations) == null ? void 0 : m[Ae]) ?? "", y = [...w[u]].filter((b) => c.has(b)).sort().map((b) => {
1800
+ S.some((f) => !f.has(d)) && u.add(d);
1801
+ }), a.map((d, f) => {
1802
+ var y;
1803
+ const p = At(e.id, d.map((v) => v.domain)), c = ((y = e.spec.annotations) == null ? void 0 : y[Ae]) ?? "", h = [...S[f]].filter((v) => u.has(v)).sort().map((v) => {
1792
1804
  var g;
1793
- return (g = JSON.parse(b)) == null ? void 0 : g[1];
1794
- }).join(" / "), v = {
1805
+ return (g = JSON.parse(v)) == null ? void 0 : g[1];
1806
+ }).join(" / "), A = {
1795
1807
  ...e.spec.annotations,
1796
1808
  [Pt]: "true"
1797
1809
  };
1798
- return (p || y) && (v[Ae] = p && y ? p + " / " + y : p + y), {
1799
- id: f,
1810
+ return (c || h) && (A[Ae] = c && h ? c + " / " + h : c + h), {
1811
+ id: p,
1800
1812
  spec: {
1801
1813
  ...e.spec,
1802
- axesSpec: d.map((b, g) => ({
1803
- ...b,
1814
+ axesSpec: d.map((v, g) => ({
1815
+ ...v,
1804
1816
  annotations: e.spec.axesSpec[g].annotations
1805
1817
  })),
1806
- annotations: v
1818
+ annotations: A
1807
1819
  },
1808
1820
  data: e.data
1809
1821
  };
@@ -1827,7 +1839,7 @@ function _t(t, e) {
1827
1839
  for (const i of t) {
1828
1840
  if (i.id === r.id)
1829
1841
  break;
1830
- if (ke(i, r)) {
1842
+ if (De(i, r)) {
1831
1843
  n.push(r);
1832
1844
  break;
1833
1845
  }
@@ -1844,9 +1856,9 @@ const It = [
1844
1856
  ];
1845
1857
  function gn(t, e) {
1846
1858
  if (e === void 0) return;
1847
- const n = t.resultPool.getData().entries.map((s) => s.obj).filter(se).filter((s) => It.includes(s.spec.valueType)), r = _t(e, n), i = [...r, ...Ct(r)];
1859
+ const n = t.resultPool.getData().entries.map((s) => s.obj).filter(ie).filter((s) => It.includes(s.spec.valueType)), r = _t(e, n), i = [...r, ...Ct(r)];
1848
1860
  if (!i.some(
1849
- (s) => s.data instanceof I && !s.data.getIsReadyOrError()
1861
+ (s) => s.data instanceof _ && !s.data.getIsReadyOrError()
1850
1862
  ))
1851
1863
  return t.createPFrame(i);
1852
1864
  }
@@ -1873,14 +1885,14 @@ class mn {
1873
1885
  function Lt(t) {
1874
1886
  return Ce({
1875
1887
  __isRef: !0,
1876
- blockId: te(t, "blockId"),
1877
- name: te(t, "name")
1888
+ blockId: ee(t, "blockId"),
1889
+ name: ee(t, "name")
1878
1890
  });
1879
1891
  }
1880
1892
  function yn(t) {
1881
1893
  return Ce({
1882
- ref: Lt(te(t, "ref")),
1883
- label: te(t, "label")
1894
+ ref: Lt(ee(t, "ref")),
1895
+ label: ee(t, "label")
1884
1896
  });
1885
1897
  }
1886
1898
  const vn = {
@@ -1904,7 +1916,7 @@ export {
1904
1916
  jt as Args,
1905
1917
  T as BlockModel,
1906
1918
  vn as CurrentSdkInfo,
1907
- _ as FutureRef,
1919
+ C as FutureRef,
1908
1920
  Pt as IS_VIRTUAL_COLUMN,
1909
1921
  Kt as It,
1910
1922
  cn as JsRenderInternal,
@@ -1918,22 +1930,22 @@ export {
1918
1930
  V as RT_BINARY_PARTITIONED,
1919
1931
  B as RT_BINARY_SUPER_PARTITIONED,
1920
1932
  U as RT_JSON_PARTITIONED,
1921
- ie as RT_JSON_SUPER_PARTITIONED,
1922
- ne as RT_RESOURCE_MAP,
1923
- re as RT_RESOURCE_MAP_PARTITIONED,
1924
- Q as RenderCtx,
1933
+ re as RT_JSON_SUPER_PARTITIONED,
1934
+ te as RT_RESOURCE_MAP,
1935
+ ne as RT_RESOURCE_MAP_PARTITIONED,
1936
+ X as RenderCtx,
1925
1937
  bt as ResultPool,
1926
1938
  $t as StagingOutputs,
1927
1939
  st as Trace,
1928
1940
  it as TraceEntry,
1929
- I as TreeNodeAccessor,
1941
+ _ as TreeNodeAccessor,
1930
1942
  Jt as UiState,
1931
1943
  Ht as and,
1932
1944
  pt as convertOrParsePColumnData,
1933
1945
  gn as createPFrameForGraphs,
1934
1946
  fn as createPlDataTable,
1935
1947
  hn as createPlDataTableSheet,
1936
- Fe as deriveLabels,
1948
+ Ee as deriveLabels,
1937
1949
  ue as downgradeCfgOrLambda,
1938
1950
  _t as enrichColumnsWithCompatible,
1939
1951
  rn as extractArchiveAndGetURL,
@@ -1949,9 +1961,9 @@ export {
1949
1961
  tn as getDownloadedBlobContent,
1950
1962
  wn as getEnvironmentValue,
1951
1963
  W as getFromCfg,
1952
- ee as getImmediate,
1964
+ Z as getImmediate,
1953
1965
  sn as getImportProgress,
1954
- te as getJsonField,
1966
+ ee as getJsonField,
1955
1967
  on as getLastLogs,
1956
1968
  un as getLogHandle,
1957
1969
  nn as getOnDemandBlobContent,