@platforma-sdk/model 1.42.10 → 1.42.16

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,24 +1,24 @@
1
- var it = Object.defineProperty;
2
- var ot = (t, e, n) => e in t ? it(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var V = (t, e, n) => ot(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { isPColumn as je, mapPObjectData as Ae, isDataInfoEntries as qe, isDataInfo as pe, dataInfoToEntries as st, selectorsToPredicate as Y, resolveAnchors as Fe, deriveNativeId as at, isPColumnSpec as oe, isPartitionedDataInfoEntries as lt, getAxisId as k, entriesToDataInfo as ut, canonicalizeAxisId as ct, withEnrichments as xe, AnchoredIdDeriver as Ie, isPlRef as pt, mapValueInVOE as dt, ensurePColumn as ft, extractAllColumns as ht, mapPTableDef as mt, mapDataInfo as gt, extractConfigGeneric as yt, matchAxisId as U, getColumnIdAndSpec as _e, canonicalizeJson as D, parseJson as Le, visitDataInfo as bt, isPTableAbsent as vt, uniquePlId as Ct } from "@milaboratories/pl-model-common";
1
+ var at = Object.defineProperty;
2
+ var lt = (t, e, n) => e in t ? at(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var V = (t, e, n) => lt(t, typeof e != "symbol" ? e + "" : e, n);
4
+ import { isPColumn as $e, mapPObjectData as xe, readAnnotation as J, Annotation as R, parseJson as ut, isDataInfoEntries as Je, isDataInfo as pe, dataInfoToEntries as ct, selectorsToPredicate as Y, resolveAnchors as Ee, deriveNativeId as pt, isPColumnSpec as oe, isPartitionedDataInfoEntries as dt, getAxisId as F, entriesToDataInfo as ft, canonicalizeAxisId as ht, withEnrichments as Ve, AnchoredIdDeriver as ke, isPlRef as mt, mapValueInVOE as yt, ensurePColumn as gt, PColumnName as de, extractAllColumns as bt, mapPTableDef as vt, mapDataInfo as Ct, extractConfigGeneric as Tt, matchAxisId as U, getColumnIdAndSpec as ve, canonicalizeJson as D, readAnnotationJson as St, LinkerMap as Pt, getArrayFromAxisTree as At, getAxesTree as wt, visitDataInfo as Ft, getNormalizedAxesList as he, stringifyJson as Be, isPTableAbsent as xt, ValueType as It, uniquePlId as _t } from "@milaboratories/pl-model-common";
5
5
  export * from "@milaboratories/pl-model-common";
6
- import Be from "canonicalize";
7
- import { z as B } from "zod";
6
+ import We from "canonicalize";
7
+ import { z as M } from "zod";
8
8
  export * from "@milaboratories/pl-error-like";
9
- class Tt extends Error {
9
+ class Lt extends Error {
10
10
  constructor(e, n) {
11
11
  super(`${e.length}${n ? "+" : ""} errors, first error: ` + e[0].message), this.errors = e, this.moreErrors = n;
12
12
  }
13
13
  }
14
- function St(t) {
15
- if (!t.ok) throw new Tt(t.errors, t.moreErrors);
14
+ function Et(t) {
15
+ if (!t.ok) throw new Lt(t.errors, t.moreErrors);
16
16
  return t.value;
17
17
  }
18
- function hn(t) {
18
+ function bn(t) {
19
19
  return new Proxy(t, {
20
20
  get(e, n) {
21
- return St(e[n]);
21
+ return Et(e[n]);
22
22
  }
23
23
  });
24
24
  }
@@ -28,17 +28,17 @@ function A(t) {
28
28
  function Z(t) {
29
29
  return { type: "GetFromCtx", variable: t };
30
30
  }
31
- function mn(t) {
31
+ function vn(t) {
32
32
  return {
33
33
  type: "Isolate",
34
34
  cfg: t
35
35
  };
36
36
  }
37
- const gn = Z("$args"), yn = Z("$it"), bn = Z("$prod"), vn = Z("$staging"), Cn = Z("$ui");
37
+ const Cn = Z("$args"), Tn = Z("$it"), Sn = Z("$prod"), Pn = Z("$staging"), An = Z("$ui");
38
38
  function se(t) {
39
39
  return { type: "Immediate", value: t };
40
40
  }
41
- function Je(t) {
41
+ function Ge(t) {
42
42
  const e = {};
43
43
  for (const [n, r] of Object.entries(t)) e[n] = A(r);
44
44
  return {
@@ -46,7 +46,7 @@ function Je(t) {
46
46
  template: e
47
47
  };
48
48
  }
49
- function Tn(...t) {
49
+ function wn(...t) {
50
50
  const e = [];
51
51
  for (const n of t) e.push(A(n));
52
52
  return {
@@ -61,7 +61,7 @@ function ae(t, e) {
61
61
  field: A(e)
62
62
  };
63
63
  }
64
- function Sn(t, e, n = "$it") {
64
+ function Fn(t, e, n = "$it") {
65
65
  return {
66
66
  type: "MapRecordValues",
67
67
  source: t,
@@ -69,7 +69,7 @@ function Sn(t, e, n = "$it") {
69
69
  itVar: n
70
70
  };
71
71
  }
72
- function Pn(t, e, n = "$it") {
72
+ function xn(t, e, n = "$it") {
73
73
  return {
74
74
  type: "MapArrayValues",
75
75
  source: t,
@@ -77,46 +77,46 @@ function Pn(t, e, n = "$it") {
77
77
  itVar: n
78
78
  };
79
79
  }
80
- function An(t) {
80
+ function In(t) {
81
81
  return {
82
82
  type: "Flatten",
83
83
  source: t
84
84
  };
85
85
  }
86
- function wn(t) {
86
+ function _n(t) {
87
87
  return {
88
88
  type: "IsEmpty",
89
89
  arg: t
90
90
  };
91
91
  }
92
- function Fn(t) {
92
+ function Ln(t) {
93
93
  return {
94
94
  type: "Not",
95
95
  operand: t
96
96
  };
97
97
  }
98
- function xn(t, e) {
98
+ function En(t, e) {
99
99
  return {
100
100
  type: "And",
101
101
  operand1: t,
102
102
  operand2: e
103
103
  };
104
104
  }
105
- function In(t, e) {
105
+ function Vn(t, e) {
106
106
  return {
107
107
  type: "Or",
108
108
  operand1: t,
109
109
  operand2: e
110
110
  };
111
111
  }
112
- function _n(t, e) {
112
+ function kn(t, e) {
113
113
  return {
114
114
  type: "GetResourceField",
115
115
  source: A(t),
116
116
  field: A(e)
117
117
  };
118
118
  }
119
- function Ln() {
119
+ function Dn() {
120
120
  return function(t) {
121
121
  return {
122
122
  type: "GetResourceValueAsJson",
@@ -124,7 +124,7 @@ function Ln() {
124
124
  };
125
125
  };
126
126
  }
127
- function En(t, e, n = "$it") {
127
+ function On(t, e, n = "$it") {
128
128
  return {
129
129
  type: "MapResourceFields",
130
130
  source: t,
@@ -132,21 +132,21 @@ function En(t, e, n = "$it") {
132
132
  itVar: n
133
133
  };
134
134
  }
135
- function Vn(t, e) {
135
+ function Rn(t, e) {
136
136
  return {
137
137
  type: "GetBlobContent",
138
138
  range: e,
139
139
  source: A(t)
140
140
  };
141
141
  }
142
- function kn(t, e) {
142
+ function Nn(t, e) {
143
143
  return {
144
144
  type: "GetBlobContentAsString",
145
145
  range: e,
146
146
  source: A(t)
147
147
  };
148
148
  }
149
- function On() {
149
+ function Un() {
150
150
  return function(t, e) {
151
151
  return {
152
152
  type: "GetBlobContentAsJson",
@@ -155,92 +155,92 @@ function On() {
155
155
  };
156
156
  };
157
157
  }
158
- function Dn(t) {
158
+ function Kn(t) {
159
159
  return {
160
160
  type: "GetDownloadedBlobContent",
161
161
  source: A(t)
162
162
  };
163
163
  }
164
- function Rn(t) {
164
+ function qn(t) {
165
165
  return {
166
166
  type: "GetOnDemandBlobContent",
167
167
  source: A(t)
168
168
  };
169
169
  }
170
- function Nn(t, e) {
170
+ function jn(t, e) {
171
171
  return {
172
172
  type: "ExtractArchiveAndGetURL",
173
173
  format: e,
174
174
  source: A(t)
175
175
  };
176
176
  }
177
- function Un(t) {
177
+ function Mn(t) {
178
178
  return {
179
179
  type: "GetImportProgress",
180
180
  source: A(t)
181
181
  };
182
182
  }
183
- function Kn(t, e) {
183
+ function $n(t, e) {
184
184
  return {
185
185
  type: "GetLastLogs",
186
186
  source: A(t),
187
187
  lines: e
188
188
  };
189
189
  }
190
- function Mn(t, e) {
190
+ function Jn(t, e) {
191
191
  return {
192
192
  type: "GetProgressLog",
193
193
  source: A(t),
194
194
  patternToSearch: e
195
195
  };
196
196
  }
197
- function jn(t, e) {
197
+ function Bn(t, e) {
198
198
  return {
199
199
  type: "GetProgressLogWithInfo",
200
200
  source: A(t),
201
201
  patternToSearch: e
202
202
  };
203
203
  }
204
- function qn(t) {
204
+ function Wn(t) {
205
205
  return {
206
206
  type: "GetLogHandle",
207
207
  source: A(t)
208
208
  };
209
209
  }
210
- function Pt() {
210
+ function Vt() {
211
211
  return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
212
212
  }
213
- function $e(t) {
213
+ function He(t) {
214
214
  if (t && typeof globalThis.getPlatforma == "function")
215
215
  return globalThis.getPlatforma(t);
216
216
  if (typeof globalThis.platforma < "u") return globalThis.platforma;
217
217
  throw new Error("Can't get platforma instance.");
218
218
  }
219
- function At() {
219
+ function kt() {
220
220
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
221
221
  }
222
- function b() {
222
+ function v() {
223
223
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
224
224
  throw new Error("Not in config rendering context");
225
225
  }
226
226
  function G(t, e) {
227
- const n = At();
227
+ const n = kt();
228
228
  if (n === void 0) return !1;
229
229
  if (t in n.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
230
230
  return n.callbackRegistry[t] = e, !0;
231
231
  }
232
- const fe = /* @__PURE__ */ new Map();
233
- function wt(t, e) {
234
- t in b().callbackRegistry || (b().callbackRegistry[t] = (n) => {
235
- for (const r of fe.get(t))
232
+ const me = /* @__PURE__ */ new Map();
233
+ function Dt(t, e) {
234
+ t in v().callbackRegistry || (v().callbackRegistry[t] = (n) => {
235
+ for (const r of me.get(t))
236
236
  r(n);
237
- }, fe.set(t, [])), fe.get(t).push(e);
237
+ }, me.set(t, [])), me.get(t).push(e);
238
238
  }
239
239
  class L {
240
240
  constructor(e, n = (r) => r) {
241
241
  V(this, "isResolved", !1);
242
242
  V(this, "resolvedValue");
243
- this.handle = e, this.postProcess = n, wt(e, (r) => {
243
+ this.handle = e, this.postProcess = n, Dt(e, (r) => {
244
244
  this.resolvedValue = n(r), this.isResolved = !0;
245
245
  });
246
246
  }
@@ -257,10 +257,10 @@ class L {
257
257
  return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
258
258
  }
259
259
  }
260
- function ye(t, e) {
260
+ function Ce(t, e) {
261
261
  return t === void 0 ? void 0 : e(t);
262
262
  }
263
- class O {
263
+ class k {
264
264
  constructor(e, n) {
265
265
  this.handle = e, this.resolvePath = n;
266
266
  }
@@ -299,47 +299,47 @@ class O {
299
299
  ...this.resolvePath,
300
300
  ...n.map((i) => typeof i == "string" ? i : i.field)
301
301
  ];
302
- return ye(
303
- b().resolveWithCommon(this.handle, e, ...n),
304
- (i) => new O(i, r)
302
+ return Ce(
303
+ v().resolveWithCommon(this.handle, e, ...n),
304
+ (i) => new k(i, r)
305
305
  );
306
306
  }
307
307
  get resourceType() {
308
- return b().getResourceType(this.handle);
308
+ return v().getResourceType(this.handle);
309
309
  }
310
310
  getInputsLocked() {
311
- return b().getInputsLocked(this.handle);
311
+ return v().getInputsLocked(this.handle);
312
312
  }
313
313
  getOutputsLocked() {
314
- return b().getOutputsLocked(this.handle);
314
+ return v().getOutputsLocked(this.handle);
315
315
  }
316
316
  getIsReadyOrError() {
317
- return b().getIsReadyOrError(this.handle);
317
+ return v().getIsReadyOrError(this.handle);
318
318
  }
319
319
  getIsFinal() {
320
- return b().getIsFinal(this.handle);
320
+ return v().getIsFinal(this.handle);
321
321
  }
322
322
  getError() {
323
323
  const e = [...this.resolvePath, "error"];
324
- return ye(
325
- b().getError(this.handle),
326
- (n) => new O(n, e)
324
+ return Ce(
325
+ v().getError(this.handle),
326
+ (n) => new k(n, e)
327
327
  );
328
328
  }
329
329
  listInputFields() {
330
- return b().listInputFields(this.handle);
330
+ return v().listInputFields(this.handle);
331
331
  }
332
332
  listOutputFields() {
333
- return b().listOutputFields(this.handle);
333
+ return v().listOutputFields(this.handle);
334
334
  }
335
335
  listDynamicFields() {
336
- return b().listDynamicFields(this.handle);
336
+ return v().listDynamicFields(this.handle);
337
337
  }
338
338
  getKeyValueBase64(e) {
339
- return b().getKeyValueBase64(this.handle, e);
339
+ return v().getKeyValueBase64(this.handle, e);
340
340
  }
341
341
  getKeyValueAsString(e) {
342
- return b().getKeyValueAsString(this.handle, e);
342
+ return v().getKeyValueAsString(this.handle, e);
343
343
  }
344
344
  getKeyValueAsJson(e) {
345
345
  const n = this.getKeyValueAsString(e);
@@ -347,10 +347,10 @@ class O {
347
347
  return JSON.parse(n);
348
348
  }
349
349
  getDataBase64() {
350
- return b().getDataBase64(this.handle);
350
+ return v().getDataBase64(this.handle);
351
351
  }
352
352
  getDataAsString() {
353
- return b().getDataAsString(this.handle);
353
+ return v().getDataAsString(this.handle);
354
354
  }
355
355
  getDataAsJson() {
356
356
  const e = this.getDataAsString();
@@ -363,7 +363,7 @@ class O {
363
363
  getPColumns(e = !1, n = "") {
364
364
  const r = this.parsePObjectCollection(e, n);
365
365
  return r === void 0 ? void 0 : Object.entries(r).map(([, o]) => {
366
- if (!je(o)) throw new Error(`not a PColumn (kind = ${o.spec.kind})`);
366
+ if (!$e(o)) throw new Error(`not a PColumn (kind = ${o.spec.kind})`);
367
367
  return o;
368
368
  });
369
369
  }
@@ -371,7 +371,7 @@ class O {
371
371
  *
372
372
  */
373
373
  parsePObjectCollection(e = !1, n = "") {
374
- const r = b().parsePObjectCollection(
374
+ const r = v().parsePObjectCollection(
375
375
  this.handle,
376
376
  e,
377
377
  n,
@@ -381,19 +381,19 @@ class O {
381
381
  const i = {};
382
382
  for (const [o, s] of Object.entries(r)) {
383
383
  const a = [...this.resolvePath, o];
384
- i[o] = Ae(s, (l) => new O(l, a));
384
+ i[o] = xe(s, (l) => new k(l, a));
385
385
  }
386
386
  return i;
387
387
  }
388
388
  getFileContentAsBase64(e) {
389
- return new L(b().getBlobContentAsBase64(this.handle, e));
389
+ return new L(v().getBlobContentAsBase64(this.handle, e));
390
390
  }
391
391
  getFileContentAsString(e) {
392
- return new L(b().getBlobContentAsString(this.handle, e));
392
+ return new L(v().getBlobContentAsString(this.handle, e));
393
393
  }
394
394
  getFileContentAsJson(e) {
395
395
  return new L(
396
- b().getBlobContentAsString(this.handle, e)
396
+ v().getBlobContentAsString(this.handle, e)
397
397
  ).mapDefined((n) => JSON.parse(n));
398
398
  }
399
399
  /**
@@ -412,7 +412,7 @@ class O {
412
412
  * @returns downloaded file handle
413
413
  */
414
414
  getFileHandle() {
415
- return new L(b().getDownloadedBlobContentHandle(this.handle));
415
+ return new L(v().getDownloadedBlobContentHandle(this.handle));
416
416
  }
417
417
  /**
418
418
  * @deprecated use getFileHandle
@@ -424,7 +424,7 @@ class O {
424
424
  * @returns downloaded file handle
425
425
  */
426
426
  getRemoteFileHandle() {
427
- return new L(b().getOnDemandBlobContentHandle(this.handle));
427
+ return new L(v().getOnDemandBlobContentHandle(this.handle));
428
428
  }
429
429
  /**
430
430
  * @deprecated use getRemoteFileHandle
@@ -436,22 +436,22 @@ class O {
436
436
  * @returns the url to the extracted folder
437
437
  */
438
438
  extractArchiveAndGetURL(e) {
439
- return new L(b().extractArchiveAndGetURL(this.handle, e));
439
+ return new L(v().extractArchiveAndGetURL(this.handle, e));
440
440
  }
441
441
  getImportProgress() {
442
- return new L(b().getImportProgress(this.handle));
442
+ return new L(v().getImportProgress(this.handle));
443
443
  }
444
444
  getLastLogs(e) {
445
- return new L(b().getLastLogs(this.handle, e));
445
+ return new L(v().getLastLogs(this.handle, e));
446
446
  }
447
447
  getProgressLog(e) {
448
- return new L(b().getProgressLog(this.handle, e));
448
+ return new L(v().getProgressLog(this.handle, e));
449
449
  }
450
450
  getProgressLogWithInfo(e) {
451
- return new L(b().getProgressLogWithInfo(this.handle, e));
451
+ return new L(v().getProgressLogWithInfo(this.handle, e));
452
452
  }
453
453
  getLogHandle() {
454
- return new L(b().getLogHandle(this.handle));
454
+ return new L(v().getLogHandle(this.handle));
455
455
  }
456
456
  allFieldsResolved(e = "Input") {
457
457
  switch (e) {
@@ -475,130 +475,129 @@ class O {
475
475
  if (i && (r === "Input" && !this.getInputsLocked() || r === "Output" && !this.getOutputsLocked()))
476
476
  return;
477
477
  let l = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
478
- (u) => [u, this.resolve({ field: u, assertFieldType: r })]
478
+ (c) => [c, this.resolve({ field: c, assertFieldType: r })]
479
479
  );
480
- return o && (l = l.filter((u) => u[1] !== void 0)), l.map(([u, h]) => s(u, h));
480
+ return o && (l = l.filter((c) => c[1] !== void 0)), l.map(([c, m]) => s(c, m));
481
481
  }
482
482
  }
483
- const We = "staging", Ge = "main", Ft = {
483
+ const ze = "staging", Xe = "main", Ot = {
484
484
  explicitColumnsSupport: !0,
485
485
  inlineColumnsSupport: !0,
486
486
  activeArgs: !0,
487
487
  pTablePartitionFiltersSupport: !0,
488
488
  pFrameInSetFilterSupport: !0
489
489
  };
490
- function He(t) {
490
+ function Ye(t) {
491
491
  return typeof t == "object" && t !== null && "__awaited_futures__" in t;
492
492
  }
493
- function be(t, e, n) {
493
+ function Te(t, e, n) {
494
494
  if (e.has(n)) return;
495
495
  if (e.add(n), typeof n === "object")
496
- if (He(n)) n.__awaited_futures__.forEach((i) => t.add(i));
496
+ if (Ye(n)) n.__awaited_futures__.forEach((i) => t.add(i));
497
497
  else if (Array.isArray(n))
498
- for (const i of n) be(t, e, i);
498
+ for (const i of n) Te(t, e, i);
499
499
  else
500
500
  for (const [, i] of Object.entries(n))
501
- i !== n && be(t, e, i);
501
+ i !== n && Te(t, e, i);
502
502
  }
503
- function xt(t) {
503
+ function Rt(t) {
504
504
  const e = /* @__PURE__ */ new Set();
505
- return be(e, /* @__PURE__ */ new Set(), t), e;
505
+ return Te(e, /* @__PURE__ */ new Set(), t), e;
506
506
  }
507
- const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
507
+ const Gn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
508
508
  __proto__: null,
509
- GlobalCfgRenderCtxFeatureFlags: Ft,
510
- MainAccessorName: Ge,
511
- StagingAccessorName: We,
512
- getAllFutureAwaits: xt,
513
- isFutureAwait: He
514
- }, Symbol.toStringTag, { value: "Module" })), It = "pl7.app/label", _t = "pl7.app/trace", Lt = B.object({
515
- type: B.string(),
516
- importance: B.number().optional(),
517
- id: B.string().optional(),
518
- label: B.string()
519
- }), Et = B.array(Lt), Vt = 1e-3, kt = "__LABEL__", Ee = "__LABEL__@1";
520
- function ze(t, e, n = {}) {
521
- const r = /* @__PURE__ */ new Map(), i = n.forceTraceElements !== void 0 && n.forceTraceElements.length > 0 ? new Set(n.forceTraceElements) : void 0, o = /* @__PURE__ */ new Map(), s = t.map((d) => {
522
- var c, v;
523
- const y = e(d);
524
- let p, g, C;
525
- "spec" in y && typeof y.spec == "object" ? (p = y.spec, g = y.prefixTrace, C = y.suffixTrace) : p = y;
526
- const E = (c = p.annotations) == null ? void 0 : c[It], F = (v = p.annotations) == null ? void 0 : v[_t], S = (F ? Et.safeParse(JSON.parse(F)).data : void 0) ?? [], P = [
509
+ GlobalCfgRenderCtxFeatureFlags: Ot,
510
+ MainAccessorName: Xe,
511
+ StagingAccessorName: ze,
512
+ getAllFutureAwaits: Rt,
513
+ isFutureAwait: Ye
514
+ }, Symbol.toStringTag, { value: "Module" })), Nt = M.object({
515
+ type: M.string(),
516
+ importance: M.number().optional(),
517
+ id: M.string().optional(),
518
+ label: M.string()
519
+ }), Ut = M.array(Nt), Kt = 1e-3, qt = "__LABEL__", De = "__LABEL__@1";
520
+ function Qe(t, e, n = {}) {
521
+ const r = /* @__PURE__ */ new Map(), i = n.forceTraceElements !== void 0 && n.forceTraceElements.length > 0 ? new Set(n.forceTraceElements) : void 0, o = /* @__PURE__ */ new Map(), s = t.map((f) => {
522
+ const y = e(f);
523
+ let p, g, P;
524
+ "spec" in y && typeof y.spec == "object" ? (p = y.spec, g = y.prefixTrace, P = y.suffixTrace) : p = y;
525
+ const E = J(p, R.Label), x = J(p, R.Trace), T = (x ? Ut.safeParse(ut(x)).data : void 0) ?? [], S = [
527
526
  ...g ?? [],
528
- ...S,
529
- ...C ?? []
527
+ ...T,
528
+ ...P ?? []
530
529
  ];
531
530
  if (E !== void 0) {
532
- const I = { label: E, type: kt, importance: -2 };
533
- n.addLabelAsSuffix ? P.push(I) : P.splice(0, 0, I);
531
+ const u = { label: E, type: qt, importance: -2 };
532
+ n.addLabelAsSuffix ? S.push(u) : S.splice(0, 0, u);
534
533
  }
535
- const T = [], x = /* @__PURE__ */ new Map();
536
- for (let I = P.length - 1; I >= 0; --I) {
537
- const { type: $ } = P[I], K = P[I].importance ?? 0, j = (x.get($) ?? 0) + 1;
538
- x.set($, j);
539
- const N = `${$}@${j}`;
540
- o.set(N, (o.get(N) ?? 0) + 1), r.set(
541
- N,
534
+ const C = [], I = /* @__PURE__ */ new Map();
535
+ for (let u = S.length - 1; u >= 0; --u) {
536
+ const { type: b } = S[u], K = S[u].importance ?? 0, B = (I.get(b) ?? 0) + 1;
537
+ I.set(b, B);
538
+ const O = `${b}@${B}`;
539
+ o.set(O, (o.get(O) ?? 0) + 1), r.set(
540
+ O,
542
541
  Math.max(
543
- r.get(N) ?? Number.NEGATIVE_INFINITY,
544
- K - (P.length - I) * Vt
542
+ r.get(O) ?? Number.NEGATIVE_INFINITY,
543
+ K - (S.length - u) * Kt
545
544
  )
546
- ), T.push({ ...P[I], fullType: N, occurrenceIndex: j });
545
+ ), C.push({ ...S[u], fullType: O, occurrenceIndex: B });
547
546
  }
548
- return T.reverse(), {
549
- value: d,
547
+ return C.reverse(), {
548
+ value: f,
550
549
  spec: p,
551
550
  label: E,
552
- fullTrace: T
551
+ fullTrace: C
553
552
  };
554
- }), a = [], l = [], u = [...r];
555
- u.sort(([, d], [, y]) => y - d);
556
- for (const [d] of u)
557
- d.endsWith("@1") || o.get(d) === t.length ? a.push(d) : l.push(d);
558
- const h = (d, y = !1) => {
553
+ }), a = [], l = [], c = [...r];
554
+ c.sort(([, f], [, y]) => y - f);
555
+ for (const [f] of c)
556
+ f.endsWith("@1") || o.get(f) === t.length ? a.push(f) : l.push(f);
557
+ const m = (f, y = !1) => {
559
558
  const p = [];
560
559
  for (let g = 0; g < s.length; g++) {
561
- const C = s[g], E = C.fullTrace.filter((P) => d.has(P.fullType) || i && i.has(P.type));
560
+ const P = s[g], E = P.fullTrace.filter((S) => f.has(S.fullType) || i && i.has(S.type));
562
561
  if (E.length === 0)
563
562
  if (y)
564
563
  p.push({
565
564
  label: "Unlabeled",
566
- value: C.value
565
+ value: P.value
567
566
  });
568
567
  else return;
569
- const F = E.map((P) => P.label), S = n.separator ?? " / ";
568
+ const x = E.map((S) => S.label), T = n.separator ?? " / ";
570
569
  p.push({
571
- label: F.join(S),
572
- value: C.value
570
+ label: x.join(T),
571
+ value: P.value
573
572
  });
574
573
  }
575
574
  return p;
576
575
  };
577
576
  if (a.length === 0) {
578
577
  if (l.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
579
- return h(new Set(Ee), !0);
580
- }
581
- let f = 0, m = -1;
582
- for (; f < a.length; ) {
583
- const d = /* @__PURE__ */ new Set();
584
- n.includeNativeLabel && d.add(Ee);
585
- for (let p = 0; p < f; ++p) d.add(a[p]);
586
- m >= 0 && d.add(a[m]);
587
- const y = h(d);
578
+ return m(new Set(De), !0);
579
+ }
580
+ let d = 0, h = -1;
581
+ for (; d < a.length; ) {
582
+ const f = /* @__PURE__ */ new Set();
583
+ n.includeNativeLabel && f.add(De);
584
+ for (let p = 0; p < d; ++p) f.add(a[p]);
585
+ h >= 0 && f.add(a[h]);
586
+ const y = m(f);
588
587
  if (y !== void 0 && new Set(y.map((p) => p.label)).size === t.length) return y;
589
- m++, m >= a.length && (f++, m = f);
588
+ h++, h >= a.length && (d++, h = d);
590
589
  }
591
- return h(/* @__PURE__ */ new Set([...a, ...l]), !0);
590
+ return m(/* @__PURE__ */ new Set([...a, ...l]), !0);
592
591
  }
593
- const ee = "PColumnData/", le = ee + "ResourceMap", ue = ee + "Partitioned/ResourceMap", H = ee + "JsonPartitioned", J = ee + "BinaryPartitioned", Xe = ee + "Partitioned/", ce = Xe + "JsonPartitioned", z = Xe + "BinaryPartitioned";
594
- function Ye(t, e, n, r = [], i) {
592
+ const ee = "PColumnData/", le = ee + "ResourceMap", ue = ee + "Partitioned/ResourceMap", H = ee + "JsonPartitioned", $ = ee + "BinaryPartitioned", Ze = ee + "Partitioned/", ce = Ze + "JsonPartitioned", z = Ze + "BinaryPartitioned";
593
+ function et(t, e, n, r = [], i) {
595
594
  if (t === void 0) return !1;
596
595
  switch (t.resourceType.name) {
597
596
  case le: {
598
597
  let o = t.getInputsLocked();
599
598
  for (const s of t.listInputFields()) {
600
- const a = t.resolve({ field: s, assertFieldType: "Input" }), l = [...r, ...JSON.parse(s)], u = a === void 0 ? void 0 : e(a);
601
- u === void 0 && (o = !1), (u !== void 0 || i) && n.push({ key: l, value: u });
599
+ const a = t.resolve({ field: s, assertFieldType: "Input" }), l = [...r, ...JSON.parse(s)], c = a === void 0 ? void 0 : e(a);
600
+ c === void 0 && (o = !1), (c !== void 0 || i) && n.push({ key: l, value: c });
602
601
  }
603
602
  return o;
604
603
  }
@@ -608,14 +607,14 @@ function Ye(t, e, n, r = [], i) {
608
607
  const a = t.resolve({ field: s, assertFieldType: "Input" });
609
608
  if (a === void 0) o = !1;
610
609
  else {
611
- const l = [...r, ...JSON.parse(s)], u = Ye(
610
+ const l = [...r, ...JSON.parse(s)], c = et(
612
611
  a,
613
612
  e,
614
613
  n,
615
614
  l,
616
615
  i
617
616
  );
618
- o = o && u;
617
+ o = o && c;
619
618
  }
620
619
  }
621
620
  return o;
@@ -624,18 +623,18 @@ function Ye(t, e, n, r = [], i) {
624
623
  throw new Error(`Unknown resource type: ${t.resourceType.name}`);
625
624
  }
626
625
  }
627
- function Jn(t, e, n = !1) {
626
+ function Hn(t, e, n = !1) {
628
627
  const r = [];
629
- return { isComplete: Ye(t, e, r, [], n), data: r };
628
+ return { isComplete: et(t, e, r, [], n), data: r };
630
629
  }
631
- const ve = (t) => {
630
+ const Se = (t) => {
632
631
  if (t.endsWith(".index"))
633
632
  return { baseKey: t.substring(0, t.length - 6), type: "index" };
634
633
  if (t.endsWith(".values"))
635
634
  return { baseKey: t.substring(0, t.length - 7), type: "values" };
636
635
  throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
637
636
  };
638
- function Ot(t) {
637
+ function jt(t) {
639
638
  if (!t) return;
640
639
  const e = t.resourceType.name, n = t.getDataAsJson(), r = [];
641
640
  let i = 0;
@@ -647,7 +646,7 @@ function Ot(t) {
647
646
  i = n.partitionKeyLength + n.keyLength;
648
647
  break;
649
648
  case H:
650
- case J:
649
+ case $:
651
650
  i = n.partitionKeyLength;
652
651
  break;
653
652
  case z:
@@ -658,9 +657,9 @@ function Ot(t) {
658
657
  switch (e) {
659
658
  case le:
660
659
  case H:
661
- case J:
660
+ case $:
662
661
  for (let o of t.listInputFields()) {
663
- e === J && (o = ve(o).baseKey);
662
+ e === $ && (o = Se(o).baseKey);
664
663
  const s = [...JSON.parse(o)];
665
664
  r.push(s);
666
665
  }
@@ -672,16 +671,16 @@ function Ot(t) {
672
671
  const s = [...JSON.parse(o)], a = t.resolve({ field: o, assertFieldType: "Input" });
673
672
  if (a !== void 0)
674
673
  for (let l of a.listInputFields()) {
675
- e === z && (l = ve(l).baseKey);
676
- const u = [...s, ...JSON.parse(l)];
677
- r.push(u);
674
+ e === z && (l = Se(l).baseKey);
675
+ const c = [...s, ...JSON.parse(l)];
676
+ r.push(c);
678
677
  }
679
678
  }
680
679
  break;
681
680
  }
682
681
  return { data: r, keyLength: i };
683
682
  }
684
- function Dt(t) {
683
+ function Mt(t) {
685
684
  if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
686
685
  throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
687
686
  const { parts: e, partitionKeyLength: n } = t, r = [];
@@ -700,11 +699,11 @@ function Dt(t) {
700
699
  }
701
700
  return r.map((i) => Array.from(i.values()));
702
701
  }
703
- function Rt(t) {
702
+ function $t(t) {
704
703
  if (t === void 0) return;
705
- if (qe(t))
706
- return Dt(t);
707
- const e = Ot(t);
704
+ if (Je(t))
705
+ return Mt(t);
706
+ const e = jt(t);
708
707
  if (!e) return;
709
708
  const { data: n, keyLength: r } = e, i = [];
710
709
  for (let o = 0; o < r; ++o)
@@ -717,7 +716,7 @@ function Rt(t) {
717
716
  }
718
717
  return i.map((o) => Array.from(o.values()));
719
718
  }
720
- function Ce(t, e = []) {
719
+ function Pe(t, e = []) {
721
720
  if (t === void 0 || !t.getIsReadyOrError()) return;
722
721
  const n = t.resourceType.name, r = t.getDataAsJson();
723
722
  if (e.length > 0 && (n === ce || n === z))
@@ -742,15 +741,15 @@ function Ce(t, e = []) {
742
741
  parts: i
743
742
  };
744
743
  }
745
- case J: {
744
+ case $: {
746
745
  if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
747
746
  throw new Error(`Missing partitionKeyLength in metadata for ${n}`);
748
747
  const i = [], o = /* @__PURE__ */ new Map();
749
748
  for (const s of t.listInputFields()) {
750
- const a = ve(s), l = t.resolve({ field: s, assertFieldType: "Input" });
749
+ const a = Se(s), l = t.resolve({ field: s, assertFieldType: "Input" });
751
750
  if (l === void 0) return;
752
- let u = o.get(a.baseKey);
753
- u || (u = {}, o.set(a.baseKey, u)), a.type === "index" ? u.index = l : u.values = l;
751
+ let c = o.get(a.baseKey);
752
+ c || (c = {}, o.set(a.baseKey, c)), a.type === "index" ? c.index = l : c.values = l;
754
753
  }
755
754
  for (const [s, a] of o.entries()) {
756
755
  if (!a.index || !a.values) return;
@@ -778,7 +777,7 @@ function Ce(t, e = []) {
778
777
  if (a === void 0) return;
779
778
  if (a.resourceType.name !== H)
780
779
  throw new Error(`Expected ${H} inside ${n}, but got ${a.resourceType.name}`);
781
- const l = Ce(a, JSON.parse(s));
780
+ const l = Pe(a, JSON.parse(s));
782
781
  if (l === void 0) return;
783
782
  if (l.type !== "JsonPartitioned")
784
783
  throw new Error(`Unexpected inner result type for ${n}: ${l.type}`);
@@ -797,9 +796,9 @@ function Ce(t, e = []) {
797
796
  for (const s of t.listInputFields()) {
798
797
  const a = t.resolve({ field: s, assertFieldType: "Input" });
799
798
  if (a === void 0) return;
800
- if (a.resourceType.name !== J)
801
- throw new Error(`Expected ${J} inside ${n}, but got ${a.resourceType.name}`);
802
- const l = Ce(a, JSON.parse(s));
799
+ if (a.resourceType.name !== $)
800
+ throw new Error(`Expected ${$} inside ${n}, but got ${a.resourceType.name}`);
801
+ const l = Pe(a, JSON.parse(s));
803
802
  if (l === void 0) return;
804
803
  if (l.type !== "BinaryPartitioned")
805
804
  throw new Error(`Unexpected inner result type for ${n}: ${l.type}`);
@@ -815,81 +814,93 @@ function Ce(t, e = []) {
815
814
  throw new Error(`Unknown resource type: ${n}`);
816
815
  }
817
816
  }
818
- function Nt(t) {
817
+ function Jt(t) {
819
818
  if (t !== void 0) {
820
- if (qe(t)) return t;
821
- if (pe(t)) return st(t);
822
- if (t instanceof O) return Ce(t);
819
+ if (Je(t)) return t;
820
+ if (pe(t)) return ct(t);
821
+ if (t instanceof k) return Pe(t);
823
822
  throw new Error(`Unexpected input type: ${typeof t}`);
824
823
  }
825
824
  }
826
- function Ut(t, e) {
827
- const n = [...e].sort((o, s) => s[0] - o[0]);
828
- if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
829
- const { partitionKeyLength: o } = t;
830
- for (const [s] of e)
831
- if (s >= o)
832
- throw new Error(`Can't filter on non-partitioned axis ${s}. Must be >= ${o}`);
833
- } else if (t.type === "Json") {
834
- const { keyLength: o } = t;
835
- for (const [s] of e)
836
- if (s >= o)
837
- throw new Error(`Can't filter on non-data axis ${s}. Must be >= ${o}`);
838
- }
839
- const r = (o) => {
840
- for (const [s, a] of n)
841
- if (o[s] !== a)
825
+ function Bt(t, e) {
826
+ const n = [...e].sort((s, a) => a[0] - s[0]), { type: r } = t;
827
+ switch (r) {
828
+ case "Json": {
829
+ const { keyLength: s } = t;
830
+ for (const [a] of e)
831
+ if (a >= s)
832
+ throw new Error(`Can't filter on non-data axis ${a}. Must be >= ${s}`);
833
+ break;
834
+ }
835
+ case "JsonPartitioned":
836
+ case "BinaryPartitioned":
837
+ case "ParquetPartitioned": {
838
+ const { partitionKeyLength: s } = t;
839
+ for (const [a] of e)
840
+ if (a >= s)
841
+ throw new Error(`Can't filter on non-partitioned axis ${a}. Must be >= ${s}`);
842
+ break;
843
+ }
844
+ default:
845
+ throw new Error(`Unsupported data info type: ${r}`);
846
+ }
847
+ const i = (s) => {
848
+ for (const [a, l] of n)
849
+ if (s[a] !== l)
842
850
  return !1;
843
851
  return !0;
844
- }, i = (o) => {
845
- const s = [...o];
846
- for (const [a] of n)
847
- s.splice(a, 1);
848
- return s;
852
+ }, o = (s) => {
853
+ const a = [...s];
854
+ for (const [l] of n)
855
+ a.splice(l, 1);
856
+ return a;
849
857
  };
850
858
  switch (t.type) {
851
- case "Json": {
852
- const o = t.data.filter((s) => r(s.key)).map((s) => ({
853
- key: i(s.key),
854
- value: s.value
855
- }));
859
+ case "Json":
856
860
  return {
857
861
  type: "Json",
858
862
  keyLength: t.keyLength - e.length,
859
- data: o
863
+ data: t.data.filter((s) => i(s.key)).map((s) => ({
864
+ key: o(s.key),
865
+ value: s.value
866
+ }))
860
867
  };
861
- }
862
- case "JsonPartitioned": {
863
- const o = t.parts.filter((s) => r(s.key)).map((s) => ({
864
- key: i(s.key),
865
- value: s.value
866
- }));
868
+ case "JsonPartitioned":
867
869
  return {
868
870
  type: "JsonPartitioned",
869
871
  partitionKeyLength: t.partitionKeyLength - e.length,
870
- parts: o
872
+ parts: t.parts.filter((s) => i(s.key)).map((s) => ({
873
+ key: o(s.key),
874
+ value: s.value
875
+ }))
871
876
  };
872
- }
873
- case "BinaryPartitioned": {
874
- const o = t.parts.filter((s) => r(s.key)).map((s) => ({
875
- key: i(s.key),
876
- value: s.value
877
- }));
877
+ case "BinaryPartitioned":
878
878
  return {
879
879
  type: "BinaryPartitioned",
880
880
  partitionKeyLength: t.partitionKeyLength - e.length,
881
- parts: o
881
+ parts: t.parts.filter((s) => i(s.key)).map((s) => ({
882
+ key: o(s.key),
883
+ value: s.value
884
+ }))
885
+ };
886
+ case "ParquetPartitioned":
887
+ return {
888
+ type: "ParquetPartitioned",
889
+ partitionKeyLength: t.partitionKeyLength - e.length,
890
+ parts: t.parts.filter((s) => i(s.key)).map((s) => ({
891
+ key: o(s.key),
892
+ value: s.value
893
+ }))
882
894
  };
883
- }
884
895
  }
885
896
  }
886
- function Kt(t) {
897
+ function Wt(t) {
887
898
  if (!Array.isArray(t)) return !1;
888
899
  if (t.length === 0) return !0;
889
900
  const e = t[0];
890
901
  return typeof e == "object" && e !== null && "key" in e && "val" in e;
891
902
  }
892
- class Mt {
903
+ class Gt {
893
904
  constructor(e) {
894
905
  this.columns = e;
895
906
  }
@@ -898,30 +909,30 @@ class Mt {
898
909
  return this.columns.filter((r) => n(r.spec));
899
910
  }
900
911
  }
901
- function jt(t) {
912
+ function Ht(t) {
902
913
  if (t)
903
914
  return t.map((e) => ({
904
- type: `split:${ct(e.axisId)}`,
915
+ type: `split:${ht(e.axisId)}`,
905
916
  label: e.label,
906
917
  importance: 1e6
907
918
  // High importance for split filters in labels
908
919
  }));
909
920
  }
910
- function qt(t) {
921
+ function zt(t) {
911
922
  if (t)
912
923
  return t.map((e) => [e.axisIdx, e.value]);
913
924
  }
914
- function Bt(t, e) {
925
+ function Xt(t, e) {
915
926
  if (!e || e.length === 0) return t;
916
927
  const n = [...e].sort((r, i) => r[0] - i[0]);
917
- return Be({ id: t, axisFilters: n });
928
+ return We({ id: t, axisFilters: n });
918
929
  }
919
- function Ve(t) {
930
+ function Oe(t) {
920
931
  if (!t || typeof t != "object") return !1;
921
932
  const e = t, n = 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);
922
933
  return !!e.domainAnchor || n || r;
923
934
  }
924
- function Jt(t) {
935
+ function Yt(t) {
925
936
  if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
926
937
  return [];
927
938
  const e = t.axes.map((n, r) => typeof n == "object" && "split" in n && n.split === !0 ? r : -1).filter((n) => n !== -1);
@@ -932,7 +943,7 @@ function Jt(t) {
932
943
  class Q {
933
944
  constructor() {
934
945
  V(this, "defaultProviderStore", []);
935
- V(this, "providers", [new Mt(this.defaultProviderStore)]);
946
+ V(this, "providers", [new Gt(this.defaultProviderStore)]);
936
947
  V(this, "axisLabelProviders", []);
937
948
  }
938
949
  addColumnProvider(e) {
@@ -959,127 +970,127 @@ class Q {
959
970
  ...s && (i == null ? void 0 : i.includeNativeLabel) !== !1 ? { includeNativeLabel: !0 } : {},
960
971
  ...i ?? {}
961
972
  };
962
- let u = () => !1;
973
+ let c = () => !1;
963
974
  if (a) {
964
975
  const p = (Array.isArray(a) ? a : [a]).map((g) => {
965
- if (Ve(g)) {
976
+ if (Oe(g)) {
966
977
  if (!r)
967
978
  throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
968
- return Y(Fe(r.anchors, g, n));
979
+ return Y(Ee(r.anchors, g, n));
969
980
  } else
970
981
  return Y(g);
971
982
  });
972
- u = (g) => p.some((C) => C(g));
983
+ c = (g) => p.some((P) => P(g));
973
984
  }
974
- const h = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], f = [], m = /* @__PURE__ */ new Set();
975
- for (const p of h) {
976
- const g = Ve(p);
977
- let C;
985
+ const m = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], d = [], h = /* @__PURE__ */ new Set();
986
+ for (const p of m) {
987
+ const g = Oe(p);
988
+ let P;
978
989
  if (g) {
979
990
  if (!r)
980
991
  throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
981
- C = Fe(r.anchors, p, n);
992
+ P = Ee(r.anchors, p, n);
982
993
  } else
983
- C = p;
984
- const E = /* @__PURE__ */ new Set(), F = [];
985
- for (const T of this.providers) {
986
- const x = T.selectColumns(C);
987
- for (const c of x) {
988
- if (u(c.spec)) continue;
989
- if (E.has(c.id))
990
- throw new Error(`Duplicate column id ${c.id} in provider ${T.constructor.name}`);
991
- const v = at(c.spec);
992
- m.has(v) || (E.add(c.id), m.add(v), F.push(c));
994
+ P = p;
995
+ const E = /* @__PURE__ */ new Set(), x = [];
996
+ for (const C of this.providers) {
997
+ const I = C.selectColumns(P);
998
+ for (const u of I) {
999
+ if (c(u.spec)) continue;
1000
+ if (E.has(u.id))
1001
+ throw new Error(`Duplicate column id ${u.id} in provider ${C.constructor.name}`);
1002
+ const b = pt(u.spec);
1003
+ h.has(b) || (E.add(u.id), h.add(b), x.push(u));
993
1004
  }
994
1005
  }
995
- if (F.length === 0) continue;
996
- const S = Jt(p), P = S.length > 0;
997
- for (const T of F) {
998
- if (!oe(T.spec)) continue;
999
- const x = T.spec;
1000
- if (P) {
1001
- if (Kt(T.data))
1002
- throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${T.id}`);
1003
- const c = Nt(T.data);
1004
- if (!c) {
1006
+ if (x.length === 0) continue;
1007
+ const T = Yt(p), S = T.length > 0;
1008
+ for (const C of x) {
1009
+ if (!oe(C.spec)) continue;
1010
+ const I = C.spec;
1011
+ if (S) {
1012
+ if (Wt(C.data))
1013
+ throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${C.id}`);
1014
+ const u = Jt(C.data);
1015
+ if (!u) {
1005
1016
  if (o) continue;
1006
1017
  return;
1007
1018
  }
1008
- if (!lt(c))
1009
- throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${c.type} for column ${T.id}`);
1010
- const v = Rt(c), I = S[S.length - 1];
1011
- if (I >= c.partitionKeyLength)
1012
- throw new Error(`Not enough partition keys (${c.partitionKeyLength}) for requested split axes (max index ${I}) in column ${x.name}`);
1013
- const $ = S.map((_) => this.findLabels(k(x.axesSpec[_]))), K = [], j = (_, W) => {
1014
- if (W >= S.length) {
1015
- if (K.push([..._]), K.length > 1e4)
1019
+ if (!dt(u))
1020
+ throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${u.type} for column ${C.id}`);
1021
+ const b = $t(u), K = T[T.length - 1];
1022
+ if (K >= u.partitionKeyLength)
1023
+ throw new Error(`Not enough partition keys (${u.partitionKeyLength}) for requested split axes (max index ${K}) in column ${I.name}`);
1024
+ const B = T.map((_) => this.findLabels(F(I.axesSpec[_]))), O = [], _e = (_, W) => {
1025
+ if (W >= T.length) {
1026
+ if (O.push([..._]), O.length > 1e4)
1016
1027
  throw new Error("Too many key combinations, aborting.");
1017
1028
  return;
1018
1029
  }
1019
- const M = S[W];
1020
- if (M >= v.length)
1021
- throw new Error(`Axis index ${M} out of bounds for unique keys array (length ${v.length}) during split key generation for column ${T.id}`);
1022
- const q = v[M];
1023
- if (!q || q.length === 0) {
1024
- K.length = 0;
1030
+ const q = T[W];
1031
+ if (q >= b.length)
1032
+ throw new Error(`Axis index ${q} out of bounds for unique keys array (length ${b.length}) during split key generation for column ${C.id}`);
1033
+ const j = b[q];
1034
+ if (!j || j.length === 0) {
1035
+ O.length = 0;
1025
1036
  return;
1026
1037
  }
1027
- for (const te of q)
1028
- _.push(te), j(_, W + 1), _.pop();
1038
+ for (const te of j)
1039
+ _.push(te), _e(_, W + 1), _.pop();
1029
1040
  };
1030
- if (j([], 0), K.length === 0)
1041
+ if (_e([], 0), O.length === 0)
1031
1042
  continue;
1032
- const N = [...x.axesSpec], et = S.map((_) => _);
1033
- for (let _ = S.length - 1; _ >= 0; _--)
1034
- N.splice(S[_], 1);
1035
- const tt = { ...x, axesSpec: N };
1036
- for (const _ of K) {
1037
- const W = _.map((M, q) => {
1038
- const te = et[q], nt = k(x.axesSpec[te]), de = $[q], rt = (de == null ? void 0 : de[M]) ?? String(M);
1039
- return { axisIdx: te, axisId: nt, value: M, label: rt };
1043
+ const Le = [...I.axesSpec], rt = T.map((_) => _);
1044
+ for (let _ = T.length - 1; _ >= 0; _--)
1045
+ Le.splice(T[_], 1);
1046
+ const it = { ...I, axesSpec: Le };
1047
+ for (const _ of O) {
1048
+ const W = _.map((q, j) => {
1049
+ const te = rt[j], ot = F(I.axesSpec[te]), fe = B[j], st = (fe == null ? void 0 : fe[q]) ?? String(q);
1050
+ return { axisIdx: te, axisId: ot, value: q, label: st };
1040
1051
  });
1041
- f.push({
1052
+ d.push({
1042
1053
  type: "split",
1043
- originalColumn: T,
1044
- spec: x,
1045
- adjustedSpec: tt,
1046
- dataEntries: c,
1054
+ originalColumn: C,
1055
+ spec: I,
1056
+ adjustedSpec: it,
1057
+ dataEntries: u,
1047
1058
  axisFilters: W
1048
1059
  });
1049
1060
  }
1050
1061
  } else
1051
- f.push({
1062
+ d.push({
1052
1063
  type: "direct",
1053
- originalColumn: T,
1054
- spec: x,
1055
- adjustedSpec: x
1064
+ originalColumn: C,
1065
+ spec: I,
1066
+ adjustedSpec: I
1056
1067
  });
1057
1068
  }
1058
1069
  }
1059
- if (f.length === 0) return [];
1060
- const d = ze(
1061
- f,
1070
+ if (d.length === 0) return [];
1071
+ const f = Qe(
1072
+ d,
1062
1073
  (p) => ({
1063
1074
  spec: p.spec,
1064
- suffixTrace: p.type === "split" ? jt(p.axisFilters) : void 0
1075
+ suffixTrace: p.type === "split" ? Ht(p.axisFilters) : void 0
1065
1076
  }),
1066
1077
  l
1067
1078
  ), y = [];
1068
- for (const { value: p, label: g } of d) {
1069
- const { originalColumn: C, spec: E } = p, F = p.type === "split" ? p.axisFilters : void 0, S = qt(F);
1070
- let P;
1071
- r ? P = r.deriveS(E, S) : P = Bt(C.id, S);
1072
- let T = { ...p.adjustedSpec };
1073
- s && (T = {
1074
- ...T,
1079
+ for (const { value: p, label: g } of f) {
1080
+ const { originalColumn: P, spec: E } = p, x = p.type === "split" ? p.axisFilters : void 0, T = zt(x);
1081
+ let S;
1082
+ r ? S = r.deriveS(E, T) : S = Xt(P.id, T);
1083
+ let C = { ...p.adjustedSpec };
1084
+ s && (C = {
1085
+ ...C,
1075
1086
  annotations: {
1076
- ...T.annotations ?? {},
1077
- "pl7.app/label": g
1087
+ ...C.annotations ?? {},
1088
+ [R.Label]: g
1078
1089
  }
1079
1090
  }), y.push({
1080
- id: P,
1081
- spec: T,
1082
- data: () => p.type === "split" ? ut(Ut(p.dataEntries, S)) : p.originalColumn.data,
1091
+ id: S,
1092
+ spec: C,
1093
+ data: () => p.type === "split" ? ft(Bt(p.dataEntries, T)) : p.originalColumn.data,
1083
1094
  label: g
1084
1095
  });
1085
1096
  }
@@ -1108,7 +1119,7 @@ class Q {
1108
1119
  return i;
1109
1120
  }
1110
1121
  }
1111
- function Te(t) {
1122
+ function Ae(t) {
1112
1123
  const e = (i) => i.operator !== "InSet" ? i : {
1113
1124
  operator: "Or",
1114
1125
  operands: i.references.map((o) => ({
@@ -1141,19 +1152,19 @@ function Te(t) {
1141
1152
  });
1142
1153
  return t.map((i) => r(i, e));
1143
1154
  }
1144
- function he(t, e) {
1155
+ function ye(t, e) {
1145
1156
  if (t === void 0) return e === void 0;
1146
1157
  if (e === void 0) return !0;
1147
1158
  for (const n in e)
1148
1159
  if (t[n] !== e[n]) return !1;
1149
1160
  return !0;
1150
1161
  }
1151
- function ke(t) {
1152
- return Ae(t, (e) => e instanceof O ? e.handle : pe(e) ? gt(e, (n) => n.handle) : e);
1162
+ function Re(t) {
1163
+ return xe(t, (e) => e instanceof k ? e.handle : pe(e) ? Ct(e, (n) => n.handle) : e);
1153
1164
  }
1154
- class $t {
1165
+ class Qt {
1155
1166
  constructor() {
1156
- V(this, "ctx", b());
1167
+ V(this, "ctx", v());
1157
1168
  }
1158
1169
  /**
1159
1170
  * @deprecated use getOptions()
@@ -1164,26 +1175,26 @@ class $t {
1164
1175
  getOptions(e, n) {
1165
1176
  const r = typeof e == "function" ? e : Y(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
1166
1177
  let o = {}, s = !1;
1167
- return typeof n < "u" && (typeof n == "function" ? o = n : typeof n == "object" && ("includeNativeLabel" in n || "separator" in n || "addLabelAsSuffix" in n ? o = n : (n = n, o = n.label ?? {}, s = n.refsWithEnrichments ?? !1))), typeof o == "object" ? ze(i, (a) => a.obj, o ?? {}).map(({ value: { ref: a }, label: l }) => ({
1168
- ref: xe(a, s),
1178
+ return typeof n < "u" && (typeof n == "function" ? o = n : typeof n == "object" && ("includeNativeLabel" in n || "separator" in n || "addLabelAsSuffix" in n ? o = n : (n = n, o = n.label ?? {}, s = n.refsWithEnrichments ?? !1))), typeof o == "object" ? Qe(i, (a) => a.obj, o ?? {}).map(({ value: { ref: a }, label: l }) => ({
1179
+ ref: Ve(a, s),
1169
1180
  label: l
1170
1181
  })) : i.map(({ ref: a, obj: l }) => ({
1171
- ref: xe(a, s),
1182
+ ref: Ve(a, s),
1172
1183
  label: o(l, a)
1173
1184
  }));
1174
1185
  }
1175
1186
  resolveAnchorCtx(e) {
1176
- if (e instanceof Ie) return e;
1187
+ if (e instanceof ke) return e;
1177
1188
  const n = {};
1178
1189
  for (const [r, i] of Object.entries(e))
1179
- if (pt(i)) {
1190
+ if (mt(i)) {
1180
1191
  const o = this.getPColumnSpecByRef(i);
1181
1192
  if (!o)
1182
1193
  return;
1183
1194
  n[r] = o;
1184
1195
  } else
1185
1196
  n[r] = i;
1186
- return new Ie(n);
1197
+ return new ke(n);
1187
1198
  }
1188
1199
  /**
1189
1200
  * Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
@@ -1257,7 +1268,7 @@ class $t {
1257
1268
  ref: n.ref,
1258
1269
  obj: {
1259
1270
  ...n.obj,
1260
- data: new O(n.obj.data, [n.ref.blockId, n.ref.name])
1271
+ data: new k(n.obj.data, [n.ref.blockId, n.ref.name])
1261
1272
  }
1262
1273
  }))
1263
1274
  };
@@ -1276,9 +1287,9 @@ class $t {
1276
1287
  ref: n.ref,
1277
1288
  obj: {
1278
1289
  ...n.obj,
1279
- data: dt(
1290
+ data: yt(
1280
1291
  n.obj.data,
1281
- (r) => new O(r, [n.ref.blockId, n.ref.name])
1292
+ (r) => new k(r, [n.ref.blockId, n.ref.name])
1282
1293
  )
1283
1294
  }
1284
1295
  }))
@@ -1305,9 +1316,9 @@ class $t {
1305
1316
  )) == null ? void 0 : r.obj;
1306
1317
  const n = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
1307
1318
  if (n)
1308
- return Ae(
1319
+ return xe(
1309
1320
  n,
1310
- (i) => new O(i, [e.blockId, e.name])
1321
+ (i) => new k(i, [e.blockId, e.name])
1311
1322
  );
1312
1323
  }
1313
1324
  /**
@@ -1318,7 +1329,7 @@ class $t {
1318
1329
  getPColumnByRef(e) {
1319
1330
  const n = this.getDataByRef(e);
1320
1331
  if (n)
1321
- return ft(n);
1332
+ return gt(n);
1322
1333
  }
1323
1334
  /**
1324
1335
  * Returns spec associated with the ref ensuring that it is a p-column spec.
@@ -1350,10 +1361,10 @@ class $t {
1350
1361
  if (!oe(r.obj.spec))
1351
1362
  continue;
1352
1363
  const i = r.obj.spec;
1353
- if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && he(e.domain, i.domain)) {
1364
+ if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && ye(e.domain, i.domain)) {
1354
1365
  for (let o = 0; o < e.axesSpec.length; ++o) {
1355
1366
  const s = e.axesSpec[o], a = i.axesSpec[o];
1356
- if (s.name !== a.name || s.type !== a.type || !he(s.domain, a.domain))
1367
+ if (s.name !== a.name || s.type !== a.type || !ye(s.domain, a.domain))
1357
1368
  continue e;
1358
1369
  }
1359
1370
  n.push(r.obj);
@@ -1368,9 +1379,9 @@ class $t {
1368
1379
  findLabels(e) {
1369
1380
  const n = this.getData();
1370
1381
  for (const r of n.entries) {
1371
- if (!je(r.obj)) continue;
1382
+ if (!$e(r.obj)) continue;
1372
1383
  const i = r.obj.spec;
1373
- if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && he(e.domain, i.axesSpec[0].domain)) {
1384
+ if (i.name === de.Label && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && ye(e.domain, i.axesSpec[0].domain)) {
1374
1385
  if (r.obj.data.resourceType.name !== "PColumnData/Json")
1375
1386
  throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
1376
1387
  return Object.fromEntries(
@@ -1395,11 +1406,11 @@ class $t {
1395
1406
  let a = null;
1396
1407
  const l = this;
1397
1408
  return {
1398
- id: Be(i),
1409
+ id: We(i),
1399
1410
  spec: s,
1400
1411
  get data() {
1401
- var u;
1402
- return a !== null || (a = (u = l.getPColumnByRef(i)) == null ? void 0 : u.data), a;
1412
+ var c;
1413
+ return a !== null || (a = (c = l.getPColumnByRef(i)) == null ? void 0 : c.data), a;
1403
1414
  }
1404
1415
  };
1405
1416
  });
@@ -1409,13 +1420,12 @@ class $t {
1409
1420
  * @returns a map of axis value => label
1410
1421
  */
1411
1422
  findLabelsForColumnAxis(e, n) {
1412
- var o;
1413
1423
  const r = this.findLabels(e.axesSpec[n]);
1414
1424
  if (!r) return;
1415
- const i = (o = e.annotations) == null ? void 0 : o["pl7.app/axisKeys/" + n];
1425
+ const i = J(e, `pl7.app/axisKeys/${n}`);
1416
1426
  if (i !== void 0) {
1417
- const s = JSON.parse(i);
1418
- return Object.fromEntries(s.map((a) => [a, r[a] ?? "Unlabelled"]));
1427
+ const o = JSON.parse(i);
1428
+ return Object.fromEntries(o.map((s) => [s, r[s] ?? "Unlabelled"]));
1419
1429
  } else
1420
1430
  return r;
1421
1431
  }
@@ -1427,8 +1437,8 @@ class ne {
1427
1437
  V(this, "_uiStateCache");
1428
1438
  // lazy rendering because this feature is rarely used
1429
1439
  V(this, "_activeArgsCache");
1430
- V(this, "resultPool", new $t());
1431
- this.ctx = b();
1440
+ V(this, "resultPool", new Qt());
1441
+ this.ctx = v();
1432
1442
  }
1433
1443
  get args() {
1434
1444
  if (this._argsCache === void 0) {
@@ -1462,16 +1472,16 @@ class ne {
1462
1472
  // return this.ctx.featureFlags;
1463
1473
  // }
1464
1474
  getNamedAccessor(e) {
1465
- return ye(
1475
+ return Ce(
1466
1476
  this.ctx.getAccessorHandleByName(e),
1467
- (n) => new O(n, [e])
1477
+ (n) => new k(n, [e])
1468
1478
  );
1469
1479
  }
1470
1480
  get prerun() {
1471
- return this.getNamedAccessor(We);
1481
+ return this.getNamedAccessor(ze);
1472
1482
  }
1473
1483
  get outputs() {
1474
- return this.getNamedAccessor(Ge);
1484
+ return this.getNamedAccessor(Xe);
1475
1485
  }
1476
1486
  /**
1477
1487
  * Find labels data for a given axis id. It will search for a label column and return its data as a map.
@@ -1483,7 +1493,7 @@ class ne {
1483
1493
  }
1484
1494
  verifyInlineAndExplicitColumnsSupport(e) {
1485
1495
  var i;
1486
- const n = e.some((o) => !(o.data instanceof O) || pe(o.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === !0;
1496
+ const n = e.some((o) => !(o.data instanceof k) || pe(o.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === !0;
1487
1497
  if (n && !r) throw Error("Inline or explicit columns not supported");
1488
1498
  }
1489
1499
  patchPTableDef(e) {
@@ -1494,14 +1504,14 @@ class ne {
1494
1504
  filters: [...e.partitionFilters, ...e.filters]
1495
1505
  }), (r = this.ctx.featureFlags) != null && r.pFrameInSetFilterSupport || (e = {
1496
1506
  ...e,
1497
- partitionFilters: Te(e.partitionFilters),
1498
- filters: Te(e.filters)
1507
+ partitionFilters: Ae(e.partitionFilters),
1508
+ filters: Ae(e.filters)
1499
1509
  }), e;
1500
1510
  }
1501
1511
  // TODO remove all non-PColumn fields
1502
1512
  createPFrame(e) {
1503
1513
  return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
1504
- e.map((n) => ke(n))
1514
+ e.map((n) => Re(n))
1505
1515
  );
1506
1516
  }
1507
1517
  createPTable(e) {
@@ -1514,8 +1524,8 @@ class ne {
1514
1524
  partitionFilters: e.filters ?? [],
1515
1525
  filters: [],
1516
1526
  sorting: e.sorting ?? []
1517
- }) : n = this.patchPTableDef(e), this.verifyInlineAndExplicitColumnsSupport(ht(n.src)), this.ctx.createPTable(
1518
- mt(n, (r) => ke(r))
1527
+ }) : n = this.patchPTableDef(e), this.verifyInlineAndExplicitColumnsSupport(bt(n.src)), this.ctx.createPTable(
1528
+ vt(n, (r) => Re(r))
1519
1529
  );
1520
1530
  }
1521
1531
  /** @deprecated scheduled for removal from SDK */
@@ -1535,20 +1545,20 @@ class ne {
1535
1545
  this.ctx.logError(e);
1536
1546
  }
1537
1547
  }
1538
- const Wt = "1.42.10", X = Wt;
1539
- function Gt(t) {
1548
+ const Zt = "1.42.16", X = Zt;
1549
+ function en(t) {
1540
1550
  return t.__renderLambda === !0;
1541
1551
  }
1542
- function me(t) {
1552
+ function ge(t) {
1543
1553
  if (t !== void 0)
1544
- return Gt(t) ? t.handle : t;
1554
+ return en(t) ? t.handle : t;
1545
1555
  }
1546
- function $n(t) {
1547
- return yt(t);
1556
+ function zn(t) {
1557
+ return Tt(t);
1548
1558
  }
1549
1559
  const w = class w {
1550
- constructor(e, n, r, i, o, s, a, l, u) {
1551
- this._renderingMode = e, this._initialArgs = n, this._initialUiState = r, this._outputs = i, this._inputsValid = o, this._sections = s, this._title = a, this._enrichmentTargets = l, this._featureFlags = u;
1560
+ constructor(e, n, r, i, o, s, a, l, c) {
1561
+ this._renderingMode = e, this._initialArgs = n, this._initialUiState = r, this._outputs = i, this._inputsValid = o, this._sections = s, this._title = a, this._enrichmentTargets = l, this._featureFlags = c;
1552
1562
  }
1553
1563
  static create(e = "Heavy") {
1554
1564
  return new w(
@@ -1772,13 +1782,13 @@ const w = class w {
1772
1782
  sdkVersion: X,
1773
1783
  renderingMode: this._renderingMode,
1774
1784
  initialArgs: this._initialArgs,
1775
- inputsValid: me(this._inputsValid),
1776
- sections: me(this._sections),
1785
+ inputsValid: ge(this._inputsValid),
1786
+ sections: ge(this._sections),
1777
1787
  outputs: Object.fromEntries(
1778
- Object.entries(this._outputs).map(([r, i]) => [r, me(i)])
1788
+ Object.entries(this._outputs).map(([r, i]) => [r, ge(i)])
1779
1789
  )
1780
1790
  };
1781
- return globalThis.platformaApiVersion = e, Pt() ? $e({ sdkVersion: X, apiVersion: platformaApiVersion }) : { config: n };
1791
+ return globalThis.platformaApiVersion = e, Vt() ? He({ sdkVersion: X, apiVersion: platformaApiVersion }) : { config: n };
1782
1792
  }
1783
1793
  };
1784
1794
  V(w, "INITIAL_BLOCK_FEATURE_FLAGS", {
@@ -1786,8 +1796,8 @@ V(w, "INITIAL_BLOCK_FEATURE_FLAGS", {
1786
1796
  requiresUIAPIVersion: 1,
1787
1797
  requiresModelAPIVersion: 1
1788
1798
  });
1789
- let Oe = w;
1790
- function Qe() {
1799
+ let Ne = w;
1800
+ function tt() {
1791
1801
  return {
1792
1802
  sourceId: null,
1793
1803
  hiddenColIds: null,
@@ -1796,72 +1806,72 @@ function Qe() {
1796
1806
  sorting: []
1797
1807
  };
1798
1808
  }
1799
- function De() {
1809
+ function Ue() {
1800
1810
  return {
1801
1811
  version: 4,
1802
1812
  stateCache: [],
1803
- pTableParams: Qe()
1813
+ pTableParams: tt()
1804
1814
  };
1805
1815
  }
1806
- function Ht(t) {
1807
- return "version" in t || (t = De()), t.version === 2 && (t = {
1816
+ function tn(t) {
1817
+ return "version" in t || (t = Ue()), t.version === 2 && (t = {
1808
1818
  version: 3,
1809
1819
  stateCache: t.stateCache.map((e) => ({
1810
1820
  ...e,
1811
1821
  filtersState: []
1812
1822
  })),
1813
- pTableParams: Qe()
1814
- }), t.version === 3 && (t = De()), t;
1823
+ pTableParams: tt()
1824
+ }), t.version === 3 && (t = Ue()), t;
1815
1825
  }
1816
- function Se(t) {
1817
- return t.axesSpec.length === 1 && t.name === "pl7.app/label";
1826
+ function we(t) {
1827
+ return t.axesSpec.length === 1 && t.name === de.Label;
1818
1828
  }
1819
- function zt(t) {
1829
+ function nn(t) {
1820
1830
  return new Q().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
1821
- name: "pl7.app/label",
1831
+ name: de.Label,
1822
1832
  axes: [{}]
1823
1833
  // exactly one axis
1824
1834
  }, { dontWaitAllData: !0 });
1825
1835
  }
1826
- function Re(t, e) {
1836
+ function Ke(t, e) {
1827
1837
  const n = [], r = [];
1828
1838
  for (const a of t)
1829
- Se(a.spec) ? n.push(a) : r.push(a);
1839
+ we(a.spec) ? n.push(a) : r.push(a);
1830
1840
  const i = [];
1831
1841
  for (const a of r)
1832
1842
  for (const l of a.spec.axesSpec) {
1833
- const u = k(l);
1834
- i.some((h) => U(h, u)) || i.push(u);
1843
+ const c = F(l);
1844
+ i.some((m) => U(m, c)) || i.push(c);
1835
1845
  }
1836
1846
  for (const a of n) {
1837
- const l = k(a.spec.axesSpec[0]), u = i.findIndex((h) => U(h, l));
1838
- u !== -1 && i.splice(u, 1);
1847
+ const l = F(a.spec.axesSpec[0]), c = i.findIndex((m) => U(m, l));
1848
+ c !== -1 && i.splice(c, 1);
1839
1849
  }
1840
1850
  const o = (a, l) => {
1841
- let u = a.toString();
1851
+ let c = a.toString();
1842
1852
  if (l)
1843
- for (const h in l)
1844
- u += h, u += l[h];
1845
- return u;
1853
+ for (const m in l)
1854
+ c += m, c += l[m];
1855
+ return c;
1846
1856
  }, s = [];
1847
1857
  for (const a of e) {
1848
- const l = a.spec.axesSpec[0], u = k(l), h = i.findIndex((f) => U(f, u));
1849
- if (h !== -1) {
1850
- const f = i[h], m = Object.keys(f.domain ?? {}).length, d = Object.keys(l.domain ?? {}).length;
1851
- m > d ? s.push({
1852
- id: o(a.id, f.domain),
1858
+ const l = a.spec.axesSpec[0], c = F(l), m = i.findIndex((d) => U(d, c));
1859
+ if (m !== -1) {
1860
+ const d = i[m], h = Object.keys(d.domain ?? {}).length, f = Object.keys(l.domain ?? {}).length;
1861
+ h > f ? s.push({
1862
+ id: o(a.id, d.domain),
1853
1863
  spec: {
1854
1864
  ...a.spec,
1855
- axesSpec: [{ ...f, annotations: l.annotations }]
1865
+ axesSpec: [{ ...d, annotations: l.annotations }]
1856
1866
  },
1857
1867
  data: a.data
1858
- }) : s.push(a), i.splice(h, 1);
1868
+ }) : s.push(a), i.splice(m, 1);
1859
1869
  }
1860
1870
  }
1861
1871
  return s;
1862
1872
  }
1863
- function Xt(t) {
1864
- const e = (i) => Array.isArray(i), n = (i) => i instanceof O, r = (i) => typeof i == "object" && "type" in i;
1873
+ function rn(t) {
1874
+ const e = (i) => Array.isArray(i), n = (i) => i instanceof k, r = (i) => typeof i == "object" && "type" in i;
1865
1875
  return t.map((i) => i.data).every((i) => {
1866
1876
  if (e(i))
1867
1877
  return !0;
@@ -1875,12 +1885,14 @@ function Xt(t) {
1875
1885
  return Object.values(i.parts).every((s) => s.getIsReadyOrError());
1876
1886
  case "BinaryPartitioned":
1877
1887
  return Object.values(i.parts).every((s) => s.index.getIsReadyOrError() && s.values.getIsReadyOrError());
1888
+ case "ParquetPartitioned":
1889
+ return Object.values(i.parts).every((s) => s.getIsReadyOrError());
1878
1890
  }
1879
1891
  else
1880
1892
  throw Error(`unsupported column data type: ${i}`);
1881
1893
  });
1882
1894
  }
1883
- function Ne(t) {
1895
+ function qe(t) {
1884
1896
  let e = t.columns;
1885
1897
  const n = [];
1886
1898
  if (t.coreColumnPredicate) {
@@ -1902,77 +1914,75 @@ function Ne(t) {
1902
1914
  sorting: t.sorting
1903
1915
  };
1904
1916
  }
1905
- function Yt(t) {
1906
- var e;
1907
- return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "hidden";
1917
+ function on(t) {
1918
+ return J(t, R.Table.Visibility) === "hidden";
1908
1919
  }
1909
- function Qt(t) {
1910
- var e;
1911
- return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
1920
+ function sn(t) {
1921
+ return J(t, R.Table.Visibility) === "optional";
1912
1922
  }
1913
- function ge(t, e) {
1923
+ function be(t, e) {
1914
1924
  return [...new Map(t.map((n) => [e(n), n])).values()];
1915
1925
  }
1916
- function Wn(t, e, n, r) {
1926
+ function Xn(t, e, n, r) {
1917
1927
  if (e.length === 0) return;
1918
- const i = e.filter((c) => Pe(c.spec) || !Yt(c.spec)), o = Ht(n), s = zt(t.resultPool);
1928
+ const i = e.filter((u) => Fe(u.spec) || !on(u.spec)), o = tn(n), s = nn(t.resultPool);
1919
1929
  if (!s) return;
1920
- const a = Re(i.map(_e), s), l = [...i, ...a], h = [
1921
- ...ge(
1922
- [...l.flatMap((c) => c.spec.axesSpec.map((v) => k(v)))],
1923
- (c) => D(c)
1924
- ).map((c) => ({ type: "axis", id: c })),
1925
- ...l.map((c) => ({ type: "column", id: c.id }))
1926
- ], f = new Set(h.map((c) => D(c))), m = (c) => f.has(D(c)), d = (r == null ? void 0 : r.coreJoinType) ?? "full", y = o.pTableParams.partitionFilters.filter((c) => {
1927
- const v = m(c.column);
1928
- return v || t.logWarn(`Partition filter ${JSON.stringify(c)} does not match provided columns, skipping`), v;
1929
- }), p = ge(
1930
+ const a = Ke(i.map(ve), s), l = [...i, ...a], m = [
1931
+ ...be(
1932
+ [...l.flatMap((u) => u.spec.axesSpec.map((b) => F(b)))],
1933
+ (u) => D(u)
1934
+ ).map((u) => ({ type: "axis", id: u })),
1935
+ ...l.map((u) => ({ type: "column", id: u.id }))
1936
+ ], d = new Set(m.map((u) => D(u))), h = (u) => d.has(D(u)), f = (r == null ? void 0 : r.coreJoinType) ?? "full", y = o.pTableParams.partitionFilters.filter((u) => {
1937
+ const b = h(u.column);
1938
+ return b || t.logWarn(`Partition filter ${JSON.stringify(u)} does not match provided columns, skipping`), b;
1939
+ }), p = be(
1930
1940
  [...(r == null ? void 0 : r.filters) ?? [], ...o.pTableParams.filters],
1931
- (c) => D(c.column)
1932
- ).filter((c) => {
1933
- const v = m(c.column);
1934
- return v || t.logWarn(`Filter ${JSON.stringify(c)} does not match provided columns, skipping`), v;
1935
- }), g = ge(
1941
+ (u) => D(u.column)
1942
+ ).filter((u) => {
1943
+ const b = h(u.column);
1944
+ return b || t.logWarn(`Filter ${JSON.stringify(u)} does not match provided columns, skipping`), b;
1945
+ }), g = be(
1936
1946
  [...(r == null ? void 0 : r.sorting) ?? [], ...o.pTableParams.sorting],
1937
- (c) => D(c.column)
1938
- ).filter((c) => {
1939
- const v = m(c.column);
1940
- return v || t.logWarn(`Sorting ${JSON.stringify(c)} does not match provided columns, skipping`), v;
1941
- }), C = Ne({
1947
+ (u) => D(u.column)
1948
+ ).filter((u) => {
1949
+ const b = h(u.column);
1950
+ return b || t.logWarn(`Sorting ${JSON.stringify(u)} does not match provided columns, skipping`), b;
1951
+ }), P = qe({
1942
1952
  columns: i,
1943
1953
  labelColumns: a,
1944
- coreJoinType: d,
1954
+ coreJoinType: f,
1945
1955
  partitionFilters: y,
1946
1956
  filters: p,
1947
1957
  sorting: g,
1948
1958
  coreColumnPredicate: r == null ? void 0 : r.coreColumnPredicate
1949
- }), E = t.createPTable(C), F = new Set((() => {
1950
- if (d === "inner") return [];
1951
- const c = o.pTableParams.hiddenColIds;
1952
- return c || i.filter((v) => Qt(v.spec)).map((v) => v.id);
1959
+ }), E = t.createPTable(P), x = new Set((() => {
1960
+ if (f === "inner") return [];
1961
+ const u = o.pTableParams.hiddenColIds;
1962
+ return u || i.filter((b) => sn(b.spec)).map((b) => b.id);
1953
1963
  })());
1954
- i.filter((c) => Pe(c.spec)).forEach((c) => F.delete(c.id)), r != null && r.coreColumnPredicate && i.flatMap((v) => {
1955
- var I;
1956
- return (I = r == null ? void 0 : r.coreColumnPredicate) != null && I.call(r, v.spec) ? [v.id] : [];
1957
- }).forEach((v) => F.delete(v)), [...y.map((c) => c.column), ...p.map((c) => c.column), ...g.map((c) => c.column)].filter((c) => c.type === "column").forEach((c) => F.delete(c.id));
1958
- const S = i.filter((c) => !F.has(c.id)), P = Re(S.map(_e), s);
1959
- if (!Xt([...S, ...P])) return;
1960
- const T = Ne({
1961
- columns: S,
1962
- labelColumns: P,
1963
- coreJoinType: d,
1964
+ i.filter((u) => Fe(u.spec)).forEach((u) => x.delete(u.id)), r != null && r.coreColumnPredicate && i.flatMap((b) => {
1965
+ var K;
1966
+ return (K = r == null ? void 0 : r.coreColumnPredicate) != null && K.call(r, b.spec) ? [b.id] : [];
1967
+ }).forEach((b) => x.delete(b)), [...y.map((u) => u.column), ...p.map((u) => u.column), ...g.map((u) => u.column)].filter((u) => u.type === "column").forEach((u) => x.delete(u.id));
1968
+ const T = i.filter((u) => !x.has(u.id)), S = Ke(T.map(ve), s);
1969
+ if (!rn([...T, ...S])) return;
1970
+ const C = qe({
1971
+ columns: T,
1972
+ labelColumns: S,
1973
+ coreJoinType: f,
1964
1974
  partitionFilters: y,
1965
1975
  filters: p,
1966
1976
  sorting: g,
1967
1977
  coreColumnPredicate: r == null ? void 0 : r.coreColumnPredicate
1968
- }), x = t.createPTable(T);
1978
+ }), I = t.createPTable(C);
1969
1979
  return {
1970
1980
  sourceId: o.pTableParams.sourceId,
1971
1981
  fullTableHandle: E,
1972
- visibleTableHandle: x
1982
+ visibleTableHandle: I
1973
1983
  };
1974
1984
  }
1975
- function Gn(t, e, n) {
1985
+ function Yn(t, e, n) {
1976
1986
  const r = t.resultPool.findLabels(e);
1977
1987
  return {
1978
1988
  axis: e,
@@ -1983,7 +1993,7 @@ function Gn(t, e, n) {
1983
1993
  defaultValue: n[0]
1984
1994
  };
1985
1995
  }
1986
- const Zt = (t, e) => {
1996
+ const an = (t, e) => {
1987
1997
  let n = t.toString();
1988
1998
  return e == null || e.forEach((r) => {
1989
1999
  if (r)
@@ -1991,7 +2001,7 @@ const Zt = (t, e) => {
1991
2001
  n += i, n += o;
1992
2002
  }), n;
1993
2003
  };
1994
- function en(t) {
2004
+ function ln(t) {
1995
2005
  if (!t.length)
1996
2006
  return [];
1997
2007
  let e = [[]];
@@ -2002,93 +2012,73 @@ function en(t) {
2002
2012
  }), e = r;
2003
2013
  }), e;
2004
2014
  }
2005
- function Pe(t) {
2006
- var e;
2007
- return ((e = t.annotations) == null ? void 0 : e[nn]) === "true";
2015
+ function Fe(t) {
2016
+ return !!St(t, R.IsLinkerColumn);
2008
2017
  }
2009
- const tn = "pl7.app/graph/isVirtual", Ue = "pl7.app/label", nn = "pl7.app/isLinkerColumn";
2010
- function rn(t) {
2011
- var n, r;
2012
- const e = /* @__PURE__ */ new Map();
2013
- for (const { spec: i } of t) {
2014
- const o = i.axesSpec.map(k).map(D);
2015
- o.forEach((s) => {
2016
- e.has(s) || e.set(s, /* @__PURE__ */ new Set());
2017
- });
2018
- for (let s = 0; s < o.length - 1; s++)
2019
- for (let a = s + 1; a < o.length; a++) {
2020
- const l = o[s], u = o[a];
2021
- (n = e.get(l)) == null || n.add(u), (r = e.get(u)) == null || r.add(l);
2022
- }
2023
- }
2024
- return e;
2025
- }
2026
- function on(t, e) {
2027
- const n = rn(t), r = [...n.keys()].map(Le), i = [];
2028
- for (const l of e.values()) {
2029
- const u = r.find((h) => U(l, h));
2030
- u && i.push(D(u));
2031
- }
2032
- const o = new Set(i), s = /* @__PURE__ */ new Map();
2033
- let a = [...i];
2034
- for (; a.length; ) {
2035
- const l = [];
2036
- for (const u of a)
2037
- for (const h of n.get(u) ?? [])
2038
- o.has(h) || (l.push(h), o.add(h), s.set(h, Le(h)));
2039
- a = l;
2018
+ function un(t, e) {
2019
+ const n = Pt.fromColumns(t.map(ve)), r = [], i = [...e.values()].map((a) => At(wt(a)).map(F));
2020
+ for (const a of i) {
2021
+ const l = n.keyAxesIds.find(
2022
+ (c) => c.every(
2023
+ (m) => a.find((d) => U(d, m))
2024
+ )
2025
+ );
2026
+ l && r.push(D(l));
2040
2027
  }
2041
- return s;
2028
+ const o = n.searchAvailableAxesKeys(r), s = n.getAxesListFromKeysList([...o]);
2029
+ return new Map(s.map((a) => {
2030
+ const l = F(a);
2031
+ return [D(l), a];
2032
+ }));
2042
2033
  }
2043
- function Ke(t, e) {
2034
+ function je(t, e) {
2044
2035
  const n = [];
2045
2036
  return e.forEach((r) => {
2046
- n.push(...sn(t, r));
2037
+ n.push(...cn(t, r));
2047
2038
  }), n;
2048
2039
  }
2049
- function sn(t, e) {
2050
- const n = e.spec.axesSpec.map(k);
2051
- if (n.every((u) => t.has(D(u))))
2040
+ function cn(t, e) {
2041
+ const n = e.spec.axesSpec.map(F);
2042
+ if (n.every((c) => t.has(D(c))))
2052
2043
  return [e];
2053
- const r = n.map((u) => {
2054
- const h = [];
2055
- for (const [f, m] of t)
2056
- U(m, u) && !U(u, m) && h.push(m);
2057
- return h;
2058
- }), i = en(r), o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), a = i.map((u) => {
2059
- const h = /* @__PURE__ */ new Set();
2060
- return u.map((f, m) => {
2061
- const d = e.spec.axesSpec[m].domain, y = f.domain;
2044
+ const r = n.map((c) => {
2045
+ const m = [];
2046
+ for (const [d, h] of t)
2047
+ U(h, c) && !U(c, h) && m.push(h);
2048
+ return m;
2049
+ }), i = ln(r), o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), a = i.map((c) => {
2050
+ const m = /* @__PURE__ */ new Set();
2051
+ return c.map((d, h) => {
2052
+ const f = e.spec.axesSpec[h].domain, y = d.domain;
2062
2053
  return Object.entries(y ?? {}).forEach(([p, g]) => {
2063
- if ((d == null ? void 0 : d[p]) === void 0) {
2064
- const C = JSON.stringify([p, g]);
2065
- h.add(C), o.add(C);
2054
+ if ((f == null ? void 0 : f[p]) === void 0) {
2055
+ const P = JSON.stringify([p, g]);
2056
+ m.add(P), o.add(P);
2066
2057
  }
2067
2058
  }), {
2068
- ...f,
2069
- annotations: e.spec.axesSpec[m].annotations
2059
+ ...d,
2060
+ annotations: e.spec.axesSpec[h].annotations
2070
2061
  };
2071
- }), h;
2062
+ }), m;
2072
2063
  });
2073
- [...o].forEach((u) => {
2074
- a.some((h) => !h.has(u)) && s.add(u);
2064
+ [...o].forEach((c) => {
2065
+ a.some((m) => !m.has(c)) && s.add(c);
2075
2066
  });
2076
- const l = i.map((u, h) => {
2077
- var p;
2078
- const f = Zt(e.id, u.map((g) => g.domain)), m = ((p = e.spec.annotations) == null ? void 0 : p[Ue]) ?? "", d = [...a[h]].filter((g) => s.has(g)).sort().map((g) => {
2079
- var C;
2080
- return (C = JSON.parse(g)) == null ? void 0 : C[1];
2067
+ const l = i.map((c, m) => {
2068
+ const d = an(e.id, c.map((p) => p.domain)), h = J(e.spec, R.Label) ?? "", f = [...a[m]].filter((p) => s.has(p)).sort().map((p) => {
2069
+ var g;
2070
+ return (g = JSON.parse(p)) == null ? void 0 : g[1];
2081
2071
  }).join(" / "), y = {
2082
2072
  ...e.spec.annotations,
2083
- [tn]: "true"
2073
+ [R.Graph.IsVirtual]: Be(!0)
2084
2074
  };
2085
- return (m || d) && (y[Ue] = m && d ? m + " / " + d : m + d), {
2086
- id: f,
2075
+ return (h || f) && (y[R.Label] = h && f ? h + " / " + f : h + f), {
2076
+ id: d,
2087
2077
  spec: {
2088
2078
  ...e.spec,
2089
- axesSpec: u.map((g, C) => ({
2090
- ...g,
2091
- annotations: e.spec.axesSpec[C].annotations
2079
+ axesSpec: c.map((p, g) => ({
2080
+ ...p,
2081
+ annotations: e.spec.axesSpec[g].annotations
2092
2082
  })),
2093
2083
  annotations: y
2094
2084
  },
@@ -2097,26 +2087,26 @@ function sn(t, e) {
2097
2087
  });
2098
2088
  return [e, ...l];
2099
2089
  }
2100
- function an(t) {
2090
+ function pn(t) {
2101
2091
  let e = !0;
2102
- return t.data instanceof O ? e = e && t.data.getIsReadyOrError() : pe(t.data) && bt(t.data, (n) => {
2092
+ return t.data instanceof k ? e = e && t.data.getIsReadyOrError() : pe(t.data) && Ft(t.data, (n) => {
2103
2093
  e = e && n.getIsReadyOrError();
2104
2094
  }), e;
2105
2095
  }
2106
2096
  function re(t) {
2107
- return t.every(an);
2097
+ return t.every(pn);
2108
2098
  }
2109
- function Hn(t, e) {
2099
+ function Qn(t, e) {
2110
2100
  if (!e) {
2111
- const f = new Q();
2112
- f.addColumnProvider(t.resultPool);
2113
- const m = f.getColumns(() => !0, { dontWaitAllData: !0, overrideLabelAnnotation: !1 }) ?? [];
2114
- if (!re(m))
2101
+ const d = new Q();
2102
+ d.addColumnProvider(t.resultPool);
2103
+ const h = d.getColumns(() => !0, { dontWaitAllData: !0, overrideLabelAnnotation: !1 }) ?? [];
2104
+ if (!re(h))
2115
2105
  return;
2116
- const d = new Map(m.flatMap((p) => p.spec.axesSpec).map((p) => {
2117
- const g = k(p);
2118
- return [D(g), g];
2119
- })), y = Ke(d, m);
2106
+ const f = new Map(h.flatMap((p) => he(p.spec.axesSpec)).map((p) => {
2107
+ const g = F(p);
2108
+ return [D(g), p];
2109
+ })), y = je(f, h);
2120
2110
  return t.createPFrame(y);
2121
2111
  }
2122
2112
  if (!re(e))
@@ -2124,82 +2114,82 @@ function Hn(t, e) {
2124
2114
  const n = new Q();
2125
2115
  n.addColumnProvider(t.resultPool), n.addColumns(e);
2126
2116
  const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
2127
- for (const f of e)
2128
- for (const m of f.spec.axesSpec) {
2129
- const d = k(m);
2130
- r.set(D(d), d), i.set(D(d), d);
2117
+ for (const d of e)
2118
+ for (const h of he(d.spec.axesSpec)) {
2119
+ const f = F(h);
2120
+ r.set(D(f), h), i.set(D(f), h);
2131
2121
  }
2132
- const o = n.getColumns((f) => Pe(f)) ?? [], s = on(o, r);
2133
- for (const f of s)
2134
- r.set(...f), i.set(...f);
2135
- const a = (n.getColumns((f) => f.axesSpec.some((m) => {
2136
- const d = k(m);
2122
+ const o = n.getColumns((d) => Fe(d)) ?? [], s = un(o, r);
2123
+ for (const d of s)
2124
+ r.set(...d), i.set(...d);
2125
+ const a = (n.getColumns((d) => d.axesSpec.some((h) => {
2126
+ const f = F(h);
2137
2127
  for (const y of r.values())
2138
- if (U(y, d))
2128
+ if (U(F(y), f))
2139
2129
  return !0;
2140
2130
  return !1;
2141
- }), { dontWaitAllData: !0, overrideLabelAnnotation: !1 }) ?? []).filter((f) => !Se(f.spec));
2131
+ }), { dontWaitAllData: !0, overrideLabelAnnotation: !1 }) ?? []).filter((d) => !we(d.spec));
2142
2132
  if (!re(a))
2143
2133
  return;
2144
- for (const f of a)
2145
- for (const m of f.spec.axesSpec) {
2146
- const d = k(m);
2147
- i.set(D(d), d);
2134
+ for (const d of a)
2135
+ for (const h of he(d.spec.axesSpec)) {
2136
+ const f = F(h);
2137
+ i.set(D(f), h);
2148
2138
  }
2149
- const l = (n.getColumns((f) => f.axesSpec.some((m) => {
2150
- const d = k(m);
2139
+ const l = (n.getColumns((d) => d.axesSpec.some((h) => {
2140
+ const f = F(h);
2151
2141
  for (const y of i.values())
2152
- if (U(y, d))
2142
+ if (U(F(y), f))
2153
2143
  return !0;
2154
2144
  return !1;
2155
- }), { dontWaitAllData: !0, overrideLabelAnnotation: !1 }) ?? []).filter((f) => Se(f.spec));
2145
+ }), { dontWaitAllData: !0, overrideLabelAnnotation: !1 }) ?? []).filter((d) => we(d.spec));
2156
2146
  if (!re(l))
2157
2147
  return;
2158
- const u = [...a, ...l], h = Ke(r, u);
2159
- return t.createPFrame(h);
2148
+ const c = [...a, ...l], m = je(r, c);
2149
+ return t.createPFrame(m);
2160
2150
  }
2161
- function zn({
2151
+ function Zn({
2162
2152
  selection: t,
2163
- columnId: e = Ct(),
2153
+ columnId: e = _t(),
2164
2154
  label: n = "Selection marker",
2165
2155
  domain: r
2166
2156
  }) {
2167
2157
  if (!(t != null && t.axesSpec.length))
2168
2158
  return;
2169
- const i = t.selectedKeys.filter((o) => o.every((s) => !vt(s))).map((o) => ({ key: o, val: 1 }));
2159
+ const i = t.selectedKeys.filter((o) => o.every((s) => !xt(s))).map((o) => ({ key: o, val: 1 }));
2170
2160
  if (i.length)
2171
2161
  return {
2172
2162
  id: e,
2173
2163
  spec: {
2174
2164
  kind: "PColumn",
2175
- valueType: "Int",
2176
- name: "pl7.app/table/row-selection",
2165
+ valueType: It.Int,
2166
+ name: de.Table.RowSelection,
2177
2167
  axesSpec: t.axesSpec,
2178
2168
  ...r && Object.keys(r).length && { domain: r },
2179
2169
  annotations: {
2180
- "pl7.app/label": n,
2181
- "pl7.app/discreteValues": "[1]"
2170
+ [R.Label]: n,
2171
+ [R.DiscreteValues]: Be([1])
2182
2172
  }
2183
2173
  },
2184
2174
  data: i
2185
2175
  };
2186
2176
  }
2187
- function Xn() {
2177
+ function er() {
2188
2178
  return {
2189
2179
  axesSpec: [],
2190
2180
  selectedKeys: []
2191
2181
  };
2192
2182
  }
2193
- function ln(t) {
2183
+ function dn(t) {
2194
2184
  throw new Error("Unexpected object: " + t);
2195
2185
  }
2196
- function R(t) {
2186
+ function N(t) {
2197
2187
  return t.valueType === "Int" || t.valueType === "Long" || t.valueType === "Float" || t.valueType === "Double";
2198
2188
  }
2199
2189
  function ie(t) {
2200
2190
  return t.valueType === "String";
2201
2191
  }
2202
- const Ze = {
2192
+ const nt = {
2203
2193
  lessThan: {
2204
2194
  label: "Col < X (Less Than)",
2205
2195
  form: {
@@ -2220,7 +2210,7 @@ const Ze = {
2220
2210
  defaultValue: () => 0
2221
2211
  }
2222
2212
  },
2223
- supportedFor: R
2213
+ supportedFor: N
2224
2214
  },
2225
2215
  greaterThan: {
2226
2216
  label: "Col > X (Greater Than)",
@@ -2242,7 +2232,7 @@ const Ze = {
2242
2232
  defaultValue: () => 0
2243
2233
  }
2244
2234
  },
2245
- supportedFor: R
2235
+ supportedFor: N
2246
2236
  },
2247
2237
  lessThanOrEqual: {
2248
2238
  label: "Col ≤ X (Less Than or Equal)",
@@ -2264,7 +2254,7 @@ const Ze = {
2264
2254
  defaultValue: () => 0
2265
2255
  }
2266
2256
  },
2267
- supportedFor: R
2257
+ supportedFor: N
2268
2258
  },
2269
2259
  greaterThanOrEqual: {
2270
2260
  label: "Col ≥ X (Greater Than or Equal)",
@@ -2286,7 +2276,7 @@ const Ze = {
2286
2276
  defaultValue: () => 0
2287
2277
  }
2288
2278
  },
2289
- supportedFor: R
2279
+ supportedFor: N
2290
2280
  },
2291
2281
  lessThanColumn: {
2292
2282
  label: "Col₁ < Col₂ (Compare Columns)",
@@ -2315,7 +2305,7 @@ const Ze = {
2315
2305
  }
2316
2306
  }
2317
2307
  },
2318
- supportedFor: (t, e) => R(t) && (e === void 0 || R(e))
2308
+ supportedFor: (t, e) => N(t) && (e === void 0 || N(e))
2319
2309
  },
2320
2310
  lessThanColumnOrEqual: {
2321
2311
  label: "Col₁ ≤ Col₂ (Compare Columns)",
@@ -2344,7 +2334,7 @@ const Ze = {
2344
2334
  }
2345
2335
  }
2346
2336
  },
2347
- supportedFor: (t, e) => R(t) && (e === void 0 || R(e))
2337
+ supportedFor: (t, e) => N(t) && (e === void 0 || N(e))
2348
2338
  },
2349
2339
  topN: {
2350
2340
  label: "Top N",
@@ -2366,7 +2356,7 @@ const Ze = {
2366
2356
  defaultValue: () => 10
2367
2357
  }
2368
2358
  },
2369
- supportedFor: R
2359
+ supportedFor: N
2370
2360
  },
2371
2361
  bottomN: {
2372
2362
  label: "Bottom N",
@@ -2388,7 +2378,7 @@ const Ze = {
2388
2378
  defaultValue: () => 10
2389
2379
  }
2390
2380
  },
2391
- supportedFor: R
2381
+ supportedFor: N
2392
2382
  },
2393
2383
  patternContainSubsequence: {
2394
2384
  label: "Col ~ Seq (Contain Subsequence)",
@@ -2563,16 +2553,16 @@ const Ze = {
2563
2553
  supportedFor: () => !1
2564
2554
  }
2565
2555
  };
2566
- function Yn(t) {
2567
- return t ? Object.entries(Ze).filter(([e, n]) => n.supportedFor(t)).map(([e, n]) => ({
2556
+ function tr(t) {
2557
+ return t ? Object.entries(nt).filter(([e, n]) => n.supportedFor(t)).map(([e, n]) => ({
2568
2558
  label: n.label,
2569
2559
  value: e
2570
2560
  })) : [];
2571
2561
  }
2572
- function Qn(t) {
2573
- return Ze[t];
2562
+ function nr(t) {
2563
+ return nt[t];
2574
2564
  }
2575
- function we(t) {
2565
+ function Ie(t) {
2576
2566
  if (t.type === "or")
2577
2567
  return {
2578
2568
  type: "or",
@@ -2586,7 +2576,7 @@ function we(t) {
2586
2576
  if (t.type === "not")
2587
2577
  return {
2588
2578
  type: "not",
2589
- filter: we(t.filter)
2579
+ filter: Ie(t.filter)
2590
2580
  };
2591
2581
  if (t.type === "isNA")
2592
2582
  return {
@@ -2690,22 +2680,22 @@ function we(t) {
2690
2680
  };
2691
2681
  if (t.type === void 0)
2692
2682
  throw new Error("Filter type is undefined, this should not happen");
2693
- ln(t);
2683
+ dn(t);
2694
2684
  }
2695
2685
  function Me(t) {
2696
- return t.filter((e) => e.type !== void 0).map(we);
2686
+ return t.filter((e) => e.type !== void 0).map(Ie);
2697
2687
  }
2698
- function Zn(t) {
2688
+ function rr(t) {
2699
2689
  return {
2700
2690
  title: t.title,
2701
2691
  mode: t.mode,
2702
2692
  steps: t.steps.filter((e) => e.filter.type == null ? !1 : e.filter.type === "or" || e.filter.type === "and" ? e.filter.filters.length > 0 : !1).map((e) => ({
2703
2693
  label: e.label.trim(),
2704
- filter: we(e.filter)
2694
+ filter: Ie(e.filter)
2705
2695
  }))
2706
2696
  };
2707
2697
  }
2708
- class er {
2698
+ class ir {
2709
2699
  constructor(e) {
2710
2700
  this.handle = e;
2711
2701
  }
@@ -2722,140 +2712,134 @@ class er {
2722
2712
  var r;
2723
2713
  return (r = cfgRenderCtx.featureFlags) != null && r.pFrameInSetFilterSupport || (e = {
2724
2714
  ...e,
2725
- filters: Te(e.filters)
2715
+ filters: Ae(e.filters)
2726
2716
  }), await platforma.pFrameDriver.calculateTableData(this.handle, e, n);
2727
2717
  }
2728
2718
  async getUniqueValues(e) {
2729
2719
  return await platforma.pFrameDriver.getUniqueValues(this.handle, e);
2730
2720
  }
2731
2721
  }
2732
- function un(t) {
2733
- return Je({
2722
+ function fn(t) {
2723
+ return Ge({
2734
2724
  __isRef: !0,
2735
2725
  blockId: ae(t, "blockId"),
2736
2726
  name: ae(t, "name")
2737
2727
  });
2738
2728
  }
2739
- function tr(t) {
2740
- return Je({
2741
- ref: un(ae(t, "ref")),
2729
+ function or(t) {
2730
+ return Ge({
2731
+ ref: fn(ae(t, "ref")),
2742
2732
  label: ae(t, "label")
2743
2733
  });
2744
2734
  }
2745
- const nr = {
2735
+ const sr = {
2746
2736
  sdkVersion: X
2747
2737
  };
2748
- function rr() {
2738
+ function ar() {
2749
2739
  return platformaApiVersion ?? 1;
2750
2740
  }
2751
- function ir() {
2752
- return $e({ sdkVersion: X, apiVersion: platformaApiVersion });
2741
+ function lr() {
2742
+ return He({ sdkVersion: X, apiVersion: platformaApiVersion });
2753
2743
  }
2754
- function or(t) {
2744
+ function ur(t) {
2755
2745
  if (typeof globalThis.getEnvironmentValue == "function")
2756
2746
  return globalThis.getEnvironmentValue(t);
2757
2747
  }
2758
2748
  export {
2759
- gn as Args,
2760
- Oe as BlockModel,
2761
- nr as CurrentSdkInfo,
2749
+ Cn as Args,
2750
+ Ne as BlockModel,
2751
+ sr as CurrentSdkInfo,
2762
2752
  L as FutureRef,
2763
- tn as IS_VIRTUAL_COLUMN,
2764
- yn as It,
2765
- Bn as JsRenderInternal,
2766
- Ue as LABEL_ANNOTATION,
2767
- nn as LINKER_COLUMN_ANNOTATION,
2768
- bn as MainOutputs,
2769
- Tt as OutputError,
2770
- It as PAnnotationLabel,
2771
- _t as PAnnotationTrace,
2753
+ Tn as It,
2754
+ Gn as JsRenderInternal,
2755
+ Sn as MainOutputs,
2756
+ Lt as OutputError,
2772
2757
  Q as PColumnCollection,
2773
- er as PFrameImpl,
2774
- J as RT_BINARY_PARTITIONED,
2758
+ ir as PFrameImpl,
2759
+ $ as RT_BINARY_PARTITIONED,
2775
2760
  z as RT_BINARY_SUPER_PARTITIONED,
2776
2761
  H as RT_JSON_PARTITIONED,
2777
2762
  ce as RT_JSON_SUPER_PARTITIONED,
2778
2763
  le as RT_RESOURCE_MAP,
2779
2764
  ue as RT_RESOURCE_MAP_PARTITIONED,
2780
2765
  ne as RenderCtx,
2781
- $t as ResultPool,
2782
- vn as StagingOutputs,
2783
- Et as Trace,
2784
- Lt as TraceEntry,
2785
- O as TreeNodeAccessor,
2786
- Cn as UiState,
2787
- Xt as allColumnsComputed,
2766
+ Qt as ResultPool,
2767
+ Pn as StagingOutputs,
2768
+ Ut as Trace,
2769
+ Nt as TraceEntry,
2770
+ k as TreeNodeAccessor,
2771
+ An as UiState,
2772
+ rn as allColumnsComputed,
2788
2773
  re as allColumnsReady,
2789
- xn as and,
2790
- Zn as compileAnnotationScript,
2791
- we as compileFilter,
2774
+ En as and,
2775
+ rr as compileAnnotationScript,
2776
+ Ie as compileFilter,
2792
2777
  Me as compileFilters,
2793
- Nt as convertOrParsePColumnData,
2794
- Hn as createPFrameForGraphs,
2795
- Gn as createPlDataTableSheet,
2796
- De as createPlDataTableStateV2,
2797
- Wn as createPlDataTableV2,
2798
- Xn as createPlSelectionModel,
2799
- zn as createRowSelectionColumn,
2800
- ze as deriveLabels,
2801
- me as downgradeCfgOrLambda,
2802
- Ke as enrichCompatible,
2803
- Nn as extractArchiveAndGetURL,
2804
- $n as extractConfig,
2805
- Ut as filterDataInfoEntries,
2806
- Ze as filterUiMetadata,
2807
- An as flatten,
2808
- tr as fromPlOption,
2809
- un as fromPlRef,
2810
- zt as getAllLabelColumns,
2811
- on as getAvailableWithLinkersAxes,
2812
- Vn as getBlobContent,
2813
- On as getBlobContentAsJson,
2814
- kn as getBlobContentAsString,
2815
- Dn as getDownloadedBlobContent,
2816
- or as getEnvironmentValue,
2817
- Qn as getFilterUiMetadata,
2818
- Yn as getFilterUiTypeOptions,
2778
+ Jt as convertOrParsePColumnData,
2779
+ Qn as createPFrameForGraphs,
2780
+ Yn as createPlDataTableSheet,
2781
+ Ue as createPlDataTableStateV2,
2782
+ Xn as createPlDataTableV2,
2783
+ er as createPlSelectionModel,
2784
+ Zn as createRowSelectionColumn,
2785
+ Qe as deriveLabels,
2786
+ ge as downgradeCfgOrLambda,
2787
+ je as enrichCompatible,
2788
+ jn as extractArchiveAndGetURL,
2789
+ zn as extractConfig,
2790
+ Bt as filterDataInfoEntries,
2791
+ nt as filterUiMetadata,
2792
+ In as flatten,
2793
+ or as fromPlOption,
2794
+ fn as fromPlRef,
2795
+ nn as getAllLabelColumns,
2796
+ un as getAvailableWithLinkersAxes,
2797
+ Rn as getBlobContent,
2798
+ Un as getBlobContentAsJson,
2799
+ Nn as getBlobContentAsString,
2800
+ Kn as getDownloadedBlobContent,
2801
+ ur as getEnvironmentValue,
2802
+ nr as getFilterUiMetadata,
2803
+ tr as getFilterUiTypeOptions,
2819
2804
  Z as getFromCfg,
2820
2805
  se as getImmediate,
2821
- Un as getImportProgress,
2806
+ Mn as getImportProgress,
2822
2807
  ae as getJsonField,
2823
- Kn as getLastLogs,
2824
- rn as getLinkerColumnsMap,
2825
- qn as getLogHandle,
2826
- Re as getMatchingLabelColumns,
2827
- Rn as getOnDemandBlobContent,
2828
- Ot as getPartitionKeysList,
2829
- rr as getPlatformaApiVersion,
2830
- Mn as getProgressLog,
2831
- jn as getProgressLogWithInfo,
2832
- ir as getRawPlatformaInstance,
2833
- _n as getResourceField,
2834
- Ln as getResourceValueAsJson,
2835
- Rt as getUniquePartitionKeys,
2836
- ye as ifDef,
2837
- Yt as isColumnHidden,
2838
- Qt as isColumnOptional,
2839
- an as isColumnReady,
2840
- Gt as isConfigLambda,
2841
- wn as isEmpty,
2842
- Se as isLabelColumn,
2843
- Pe as isLinkerColumn,
2844
- mn as isolate,
2845
- Tn as makeArray,
2846
- Qe as makeDefaultPTableParams,
2847
- Je as makeObject,
2848
- Pn as mapArrayValues,
2849
- Sn as mapRecordValues,
2850
- En as mapResourceFields,
2851
- Fn as not,
2852
- In as or,
2853
- Ce as parsePColumnData,
2854
- Jn as parseResourceMap,
2855
- St as readOutput,
2856
- ge as uniqueBy,
2857
- ln as unreachable,
2858
- Ht as upgradePlDataTableStateV2,
2859
- hn as wrapOutputs
2808
+ $n as getLastLogs,
2809
+ Wn as getLogHandle,
2810
+ Ke as getMatchingLabelColumns,
2811
+ qn as getOnDemandBlobContent,
2812
+ jt as getPartitionKeysList,
2813
+ ar as getPlatformaApiVersion,
2814
+ Jn as getProgressLog,
2815
+ Bn as getProgressLogWithInfo,
2816
+ lr as getRawPlatformaInstance,
2817
+ kn as getResourceField,
2818
+ Dn as getResourceValueAsJson,
2819
+ $t as getUniquePartitionKeys,
2820
+ Ce as ifDef,
2821
+ on as isColumnHidden,
2822
+ sn as isColumnOptional,
2823
+ pn as isColumnReady,
2824
+ en as isConfigLambda,
2825
+ _n as isEmpty,
2826
+ we as isLabelColumn,
2827
+ Fe as isLinkerColumn,
2828
+ vn as isolate,
2829
+ wn as makeArray,
2830
+ tt as makeDefaultPTableParams,
2831
+ Ge as makeObject,
2832
+ xn as mapArrayValues,
2833
+ Fn as mapRecordValues,
2834
+ On as mapResourceFields,
2835
+ Ln as not,
2836
+ Vn as or,
2837
+ Pe as parsePColumnData,
2838
+ Hn as parseResourceMap,
2839
+ Et as readOutput,
2840
+ be as uniqueBy,
2841
+ dn as unreachable,
2842
+ tn as upgradePlDataTableStateV2,
2843
+ bn as wrapOutputs
2860
2844
  };
2861
2845
  //# sourceMappingURL=index.mjs.map