@milaboratories/pl-model-common 1.19.5 → 1.19.7
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/drivers/pframe/data_types.d.ts +4 -4
- package/dist/drivers/pframe/data_types.d.ts.map +1 -1
- package/dist/drivers/pframe/index.d.ts +1 -0
- package/dist/drivers/pframe/index.d.ts.map +1 -1
- package/dist/drivers/pframe/linker_columns.d.ts +43 -0
- package/dist/drivers/pframe/linker_columns.d.ts.map +1 -0
- package/dist/drivers/pframe/spec/spec.d.ts +164 -12
- package/dist/drivers/pframe/spec/spec.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +990 -586
- package/dist/index.mjs.map +1 -1
- package/dist/json.d.ts +3 -3
- package/dist/json.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/drivers/pframe/data_types.ts +26 -29
- package/src/drivers/pframe/index.ts +2 -0
- package/src/drivers/pframe/linker_columns.test.ts +286 -0
- package/src/drivers/pframe/linker_columns.ts +290 -0
- package/src/drivers/pframe/spec/spec.test.ts +182 -0
- package/src/drivers/pframe/spec/spec.ts +404 -22
- package/src/json.ts +3 -3
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Branded } from '../../branding';
|
|
2
|
-
import { ValueType
|
|
2
|
+
import { ValueType } from './spec/spec';
|
|
3
3
|
export type PVectorDataInt = Int32Array;
|
|
4
4
|
export type PVectorDataLong = BigInt64Array;
|
|
5
5
|
export type PVectorDataFloat = Float32Array;
|
|
6
6
|
export type PVectorDataDouble = Float64Array;
|
|
7
7
|
export type PVectorDataString = (null | string)[];
|
|
8
8
|
export type PVectorDataBytes = (null | Uint8Array)[];
|
|
9
|
-
export type PVectorDataTyped<DataType extends ValueType> = DataType extends
|
|
9
|
+
export type PVectorDataTyped<DataType extends ValueType> = DataType extends typeof ValueType.Int ? PVectorDataInt : DataType extends typeof ValueType.Long ? PVectorDataLong : DataType extends typeof ValueType.Float ? PVectorDataFloat : DataType extends typeof ValueType.Double ? PVectorDataDouble : DataType extends typeof ValueType.String ? PVectorDataString : DataType extends typeof ValueType.Bytes ? PVectorDataBytes : never;
|
|
10
10
|
export type PVectorData = PVectorDataTyped<ValueType>;
|
|
11
11
|
export type PTableVectorTyped<DataType extends ValueType> = {
|
|
12
12
|
/** Stored data type */
|
|
@@ -39,13 +39,13 @@ export declare const PTableNA: null;
|
|
|
39
39
|
export type PTableNA = typeof PTableNA;
|
|
40
40
|
/** Type guard for NA value */
|
|
41
41
|
export declare function isPTableNA(value: unknown): value is PTableNA;
|
|
42
|
-
export type ValueTypeSupported = Exclude<ValueType,
|
|
42
|
+
export type ValueTypeSupported = Exclude<ValueType, typeof ValueType.Bytes>;
|
|
43
43
|
export type PTableValueInt = number;
|
|
44
44
|
export type PTableValueLong = number;
|
|
45
45
|
export type PTableValueFloat = number;
|
|
46
46
|
export type PTableValueDouble = number;
|
|
47
47
|
export type PTableValueString = string;
|
|
48
|
-
export type PTableValueData<DataType extends ValueTypeSupported> = DataType extends
|
|
48
|
+
export type PTableValueData<DataType extends ValueTypeSupported> = DataType extends typeof ValueType.Int ? PTableValueInt : DataType extends typeof ValueType.Long ? PTableValueLong : DataType extends typeof ValueType.Float ? PTableValueFloat : DataType extends typeof ValueType.Double ? PTableValueDouble : DataType extends typeof ValueType.String ? PTableValueString : never;
|
|
49
49
|
export type PTableValueDataBranded<DataType extends ValueTypeSupported> = Branded<PTableValueData<DataType>, DataType>;
|
|
50
50
|
export type PTableValue<Absent = PTableAbsent, NA = PTableNA, DataType extends ValueTypeSupported = ValueTypeSupported> = Absent | NA | PTableValueData<DataType>;
|
|
51
51
|
export type PTableValueBranded<Absent = PTableAbsent, NA = PTableNA, DataType extends ValueTypeSupported = ValueTypeSupported> = Absent | NA | PTableValueDataBranded<DataType>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data_types.d.ts","sourceRoot":"","sources":["../../../src/drivers/pframe/data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F,MAAM,EAAE,iBAAiB,CAAC,SAAS,CAAC,EACpC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE;IACP,MAAM,EAAE,UAAU,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,QAAQ,CAAC;CACpB,GACA,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;AAiBpD,0DAA0D;AAC1D,MAAM,MAAM,UAAU,GAAG;IACvB,4CAA4C;IAC5C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,mBAAmB;IACnB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,4CAA4C;AAC5C,MAAM,MAAM,WAAW,GAAG;IACxB,6EAA6E;IAC7E,OAAO,EAAE,MAAM,CAAC;IAEhB,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/drivers/pframe/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAEhC,cAAc,QAAQ,CAAC;AAEvB,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/drivers/pframe/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAEhC,cAAc,QAAQ,CAAC;AAEvB,cAAc,UAAU,CAAC;AAEzB,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { CanonicalizedJson } from '../../json';
|
|
2
|
+
import { AxisSpec, PColumnIdAndSpec, AxisSpecNormalized, AxisId } from './spec/spec';
|
|
3
|
+
type LinkerKey = CanonicalizedJson<AxisId[]>;
|
|
4
|
+
export type CompositeLinkerMap = Map<LinkerKey, {
|
|
5
|
+
keyAxesSpec: AxisSpecNormalized[];
|
|
6
|
+
linkWith: Map<LinkerKey, PColumnIdAndSpec>;
|
|
7
|
+
}>;
|
|
8
|
+
interface LinkersData {
|
|
9
|
+
data: CompositeLinkerMap;
|
|
10
|
+
}
|
|
11
|
+
export declare class LinkerMap implements LinkersData {
|
|
12
|
+
/** Graph of linkers connected by axes (single or grouped by parents) */
|
|
13
|
+
readonly data: CompositeLinkerMap;
|
|
14
|
+
constructor(linkerMap: CompositeLinkerMap);
|
|
15
|
+
get keys(): MapIterator<string & {
|
|
16
|
+
__json_canonicalized: AxisId[];
|
|
17
|
+
}>;
|
|
18
|
+
get keyAxesIds(): AxisId[][];
|
|
19
|
+
static fromColumns(columns: PColumnIdAndSpec[]): LinkerMap;
|
|
20
|
+
/** Get all available nodes of linker graphs if start from sourceAxesKeys */
|
|
21
|
+
searchAvailableAxesKeys(sourceAxesKeys: LinkerKey[]): Set<LinkerKey>;
|
|
22
|
+
/** Get all linker columns that are necessary to reach endKey from startKey */
|
|
23
|
+
searchLinkerPath(startKey: LinkerKey, endKey: LinkerKey): PColumnIdAndSpec[];
|
|
24
|
+
getLinkerColumnsForAxes({ from: sourceAxes, to: targetAxes, throwWhenNoLinkExists, }: {
|
|
25
|
+
from: AxisSpecNormalized[];
|
|
26
|
+
to: AxisSpecNormalized[];
|
|
27
|
+
throwWhenNoLinkExists?: boolean;
|
|
28
|
+
}): PColumnIdAndSpec[];
|
|
29
|
+
/** Get list of axisSpecs from keys of linker columns map */
|
|
30
|
+
getAxesListFromKeysList(keys: LinkerKey[]): AxisSpecNormalized[];
|
|
31
|
+
/** Get axes of target axes that are impossible to be linked to source axes with current linker map */
|
|
32
|
+
getNonLinkableAxes(sourceAxes: AxisSpecNormalized[], targetAxes: AxisSpecNormalized[]): AxisSpecNormalized[];
|
|
33
|
+
/** Get all axes that can be connected to sourceAxes by linkers */
|
|
34
|
+
getReachableByLinkersAxesFromAxes(sourceAxes: AxisSpecNormalized[]): AxisSpec[];
|
|
35
|
+
static getLinkerKeyFromAxisSpec(axis: AxisSpecNormalized): LinkerKey;
|
|
36
|
+
/** Split array of axes into several arrays by parents: axes of one group are parents for each other.
|
|
37
|
+
There are no order inside every group. */
|
|
38
|
+
static getAxesGroups(axesSpec: AxisSpecNormalized[]): AxisSpecNormalized[][];
|
|
39
|
+
/** Get all axes that are not parents of any other axis */
|
|
40
|
+
static getAxesRoots(axes: AxisSpecNormalized[]): AxisSpecNormalized[];
|
|
41
|
+
}
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=linker_columns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linker_columns.d.ts","sourceRoot":"","sources":["../../../src/drivers/pframe/linker_columns.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,YAAY,CAAC;AACpB,OAAO,EAGL,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,MAAM,EAKZ,MAAM,aAAa,CAAC;AAErB,KAAK,SAAS,GAAG,iBAAiB,CAAC,MAAM,EAAE,CAAC,CAAC;AAC7C,MAAM,MAAM,kBAAkB,GAAG,GAAG,CAClC,SAAS,EACT;IACE,WAAW,EAAE,kBAAkB,EAAE,CAAC;IAClC,QAAQ,EAAE,GAA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,0DAA0D;IAC1D,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,kBAAkB,EAAE,GAAG,kBAAkB,EAAE;CAItE"}
|
|
@@ -1,12 +1,138 @@
|
|
|
1
|
+
import { CanonicalizedJson, StringifiedJson } from '../../../json';
|
|
1
2
|
import { PObject, PObjectId, PObjectSpec } from '../../../pool';
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
export declare const ValueType: {
|
|
5
|
+
readonly Int: "Int";
|
|
6
|
+
readonly Long: "Long";
|
|
7
|
+
readonly Float: "Float";
|
|
8
|
+
readonly Double: "Double";
|
|
9
|
+
readonly String: "String";
|
|
10
|
+
readonly Bytes: "Bytes";
|
|
11
|
+
};
|
|
8
12
|
/** PFrame columns and axes within them may store one of these types. */
|
|
9
|
-
export type ValueType =
|
|
13
|
+
export type ValueType = (typeof ValueType)[keyof typeof ValueType];
|
|
14
|
+
export type Metadata = Record<string, string>;
|
|
15
|
+
export declare function readMetadata<U extends Metadata, T extends keyof U = keyof U>(metadata: Metadata | undefined, key: T): U[T] | undefined;
|
|
16
|
+
type MetadataJsonImpl<M> = {
|
|
17
|
+
[P in keyof M as (M[P] extends StringifiedJson ? P : never)]: M[P] extends StringifiedJson<infer U> ? z.ZodType<U> : never;
|
|
18
|
+
};
|
|
19
|
+
export type MetadataJson<M> = MetadataJsonImpl<Required<M>>;
|
|
20
|
+
export declare function readMetadataJsonOrThrow<M extends Metadata, T extends keyof MetadataJson<M>>(metadata: Metadata | undefined, metadataJson: MetadataJson<M>, key: T, methodNameInError?: string): z.infer<MetadataJson<M>[T]> | undefined;
|
|
21
|
+
export declare function readMetadataJson<M extends Metadata, T extends keyof MetadataJson<M>>(metadata: Metadata | undefined, metadataJson: MetadataJson<M>, key: T): z.infer<MetadataJson<M>[T]> | undefined;
|
|
22
|
+
export declare const Domain: {
|
|
23
|
+
readonly Alphabet: "pl7.app/alphabet";
|
|
24
|
+
readonly BlockId: "pl7.app/blockId";
|
|
25
|
+
};
|
|
26
|
+
export type Domain = Metadata & Partial<{
|
|
27
|
+
[Domain.Alphabet]: 'nucleotide' | 'aminoacid' | string;
|
|
28
|
+
[Domain.BlockId]: string;
|
|
29
|
+
}>;
|
|
30
|
+
export type DomainJson = MetadataJson<Domain>;
|
|
31
|
+
export declare const DomainJson: DomainJson;
|
|
32
|
+
export declare function readDomain<T extends keyof Domain>(spec: {
|
|
33
|
+
domain?: Metadata | undefined;
|
|
34
|
+
} | undefined, key: T): Domain[T] | undefined;
|
|
35
|
+
export declare function readDomainJsonOrThrow<T extends keyof DomainJson>(spec: {
|
|
36
|
+
domain?: Metadata | undefined;
|
|
37
|
+
} | undefined, key: T): z.infer<DomainJson[T]> | undefined;
|
|
38
|
+
export declare function readDomainJson<T extends keyof DomainJson>(spec: {
|
|
39
|
+
domain?: Metadata | undefined;
|
|
40
|
+
} | undefined, key: T): z.infer<DomainJson[T]> | undefined;
|
|
41
|
+
export declare const Annotation: {
|
|
42
|
+
readonly Alphabet: "pl7.app/alphabet";
|
|
43
|
+
readonly DiscreteValues: "pl7.app/discreteValues";
|
|
44
|
+
readonly Format: "pl7.app/format";
|
|
45
|
+
readonly Graph: {
|
|
46
|
+
readonly IsVirtual: "pl7.app/graph/isVirtual";
|
|
47
|
+
};
|
|
48
|
+
readonly HideDataFromUi: "pl7.app/hideDataFromUi";
|
|
49
|
+
readonly IsLinkerColumn: "pl7.app/isLinkerColumn";
|
|
50
|
+
readonly Label: "pl7.app/label";
|
|
51
|
+
readonly Max: "pl7.app/max";
|
|
52
|
+
readonly Min: "pl7.app/min";
|
|
53
|
+
readonly Parents: "pl7.app/parents";
|
|
54
|
+
readonly Sequence: {
|
|
55
|
+
readonly Annotation: {
|
|
56
|
+
readonly Mapping: "pl7.app/sequence/annotation/mapping";
|
|
57
|
+
};
|
|
58
|
+
readonly IsAnnotation: "pl7.app/sequence/isAnnotation";
|
|
59
|
+
};
|
|
60
|
+
readonly Table: {
|
|
61
|
+
readonly FontFamily: "pl7.app/table/fontFamily";
|
|
62
|
+
readonly OrderPriority: "pl7.app/table/orderPriority";
|
|
63
|
+
readonly Visibility: "pl7.app/table/visibility";
|
|
64
|
+
};
|
|
65
|
+
readonly Trace: "pl7.app/trace";
|
|
66
|
+
};
|
|
67
|
+
export type Annotation = Metadata & Partial<{
|
|
68
|
+
[Annotation.Alphabet]: 'nucleotide' | 'aminoacid' | string;
|
|
69
|
+
[Annotation.DiscreteValues]: StringifiedJson<number[]> | StringifiedJson<string[]>;
|
|
70
|
+
[Annotation.Format]: string;
|
|
71
|
+
[Annotation.Graph.IsVirtual]: StringifiedJson<boolean>;
|
|
72
|
+
[Annotation.HideDataFromUi]: StringifiedJson<boolean>;
|
|
73
|
+
[Annotation.IsLinkerColumn]: StringifiedJson<boolean>;
|
|
74
|
+
[Annotation.Label]: string;
|
|
75
|
+
[Annotation.Max]: StringifiedJson<number>;
|
|
76
|
+
[Annotation.Min]: StringifiedJson<number>;
|
|
77
|
+
[Annotation.Parents]: StringifiedJson<AxisSpec[]>;
|
|
78
|
+
[Annotation.Sequence.Annotation.Mapping]: StringifiedJson<Record<string, string>>;
|
|
79
|
+
[Annotation.Sequence.IsAnnotation]: StringifiedJson<boolean>;
|
|
80
|
+
[Annotation.Table.FontFamily]: string;
|
|
81
|
+
[Annotation.Table.OrderPriority]: StringifiedJson<number>;
|
|
82
|
+
[Annotation.Table.Visibility]: 'hidden' | 'optional' | string;
|
|
83
|
+
[Annotation.Trace]: StringifiedJson<Record<string, unknown>>;
|
|
84
|
+
}>;
|
|
85
|
+
export declare const AxisSpec: z.ZodObject<{
|
|
86
|
+
type: z.ZodNativeEnum<{
|
|
87
|
+
readonly Int: "Int";
|
|
88
|
+
readonly Long: "Long";
|
|
89
|
+
readonly Float: "Float";
|
|
90
|
+
readonly Double: "Double";
|
|
91
|
+
readonly String: "String";
|
|
92
|
+
readonly Bytes: "Bytes";
|
|
93
|
+
}>;
|
|
94
|
+
name: z.ZodString;
|
|
95
|
+
domain: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
96
|
+
annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
97
|
+
parentAxes: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
98
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
99
|
+
type: z.ZodNativeEnum<{
|
|
100
|
+
readonly Int: "Int";
|
|
101
|
+
readonly Long: "Long";
|
|
102
|
+
readonly Float: "Float";
|
|
103
|
+
readonly Double: "Double";
|
|
104
|
+
readonly String: "String";
|
|
105
|
+
readonly Bytes: "Bytes";
|
|
106
|
+
}>;
|
|
107
|
+
name: z.ZodString;
|
|
108
|
+
domain: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
109
|
+
annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
110
|
+
parentAxes: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
111
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
112
|
+
type: z.ZodNativeEnum<{
|
|
113
|
+
readonly Int: "Int";
|
|
114
|
+
readonly Long: "Long";
|
|
115
|
+
readonly Float: "Float";
|
|
116
|
+
readonly Double: "Double";
|
|
117
|
+
readonly String: "String";
|
|
118
|
+
readonly Bytes: "Bytes";
|
|
119
|
+
}>;
|
|
120
|
+
name: z.ZodString;
|
|
121
|
+
domain: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
122
|
+
annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
123
|
+
parentAxes: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
124
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
125
|
+
export type AnnotationJson = MetadataJson<Annotation>;
|
|
126
|
+
export declare const AnnotationJson: AnnotationJson;
|
|
127
|
+
export declare function readAnnotation<T extends keyof Annotation>(spec: {
|
|
128
|
+
annotations?: Metadata | undefined;
|
|
129
|
+
} | undefined, key: T): Annotation[T] | undefined;
|
|
130
|
+
export declare function readAnnotationJsonOrThrow<T extends keyof AnnotationJson>(spec: {
|
|
131
|
+
annotations?: Metadata | undefined;
|
|
132
|
+
} | undefined, key: T): z.infer<AnnotationJson[T]> | undefined;
|
|
133
|
+
export declare function readAnnotationJson<T extends keyof AnnotationJson>(spec: {
|
|
134
|
+
annotations?: Metadata | undefined;
|
|
135
|
+
} | undefined, key: T): z.infer<AnnotationJson[T]> | undefined;
|
|
10
136
|
/**
|
|
11
137
|
* Specification of an individual axis.
|
|
12
138
|
*
|
|
@@ -46,8 +172,36 @@ export interface AxisSpec {
|
|
|
46
172
|
*/
|
|
47
173
|
readonly parentAxes?: number[];
|
|
48
174
|
}
|
|
175
|
+
/** Parents are specs, not indexes; normalized axis can be used considering its parents independently from column */
|
|
176
|
+
export interface AxisSpecNormalized extends Omit<AxisSpec, 'parentAxes'> {
|
|
177
|
+
parentAxesSpec: AxisSpecNormalized[];
|
|
178
|
+
}
|
|
179
|
+
/** Tree: axis is a root, its parents are children */
|
|
180
|
+
export type AxisTree = {
|
|
181
|
+
axis: AxisSpecNormalized;
|
|
182
|
+
children: AxisTree[];
|
|
183
|
+
};
|
|
184
|
+
/** Build tree by axis parents annotations */
|
|
185
|
+
export declare function getAxesTree(rootAxis: AxisSpecNormalized): AxisTree;
|
|
186
|
+
/** Get set of canonicalized axisIds from axisTree */
|
|
187
|
+
export declare function getSetFromAxisTree(tree: AxisTree): Set<CanonicalizedJson<AxisId>>;
|
|
188
|
+
/** Get array of axisSpecs from axisTree */
|
|
189
|
+
export declare function getArrayFromAxisTree(tree: AxisTree): AxisSpecNormalized[];
|
|
190
|
+
export declare function canonicalizeAxisWithParents(axis: AxisSpecNormalized): string & {
|
|
191
|
+
__json_canonicalized: AxisId[];
|
|
192
|
+
};
|
|
193
|
+
/** Create list of normalized axisSpec (parents are in array of specs, not indexes) */
|
|
194
|
+
export declare function getNormalizedAxesList(axes: AxisSpec[]): AxisSpecNormalized[];
|
|
195
|
+
/** Create list of regular axisSpec from normalized (parents are indexes, inside of current axes list) */
|
|
196
|
+
export declare function getDenormalizedAxesList(axesSpec: AxisSpecNormalized[]): AxisSpec[];
|
|
49
197
|
/** Common type representing spec for all the axes in a column */
|
|
50
198
|
export type AxesSpec = AxisSpec[];
|
|
199
|
+
export declare const PColumnName: {
|
|
200
|
+
readonly Label: "pl7.app/label";
|
|
201
|
+
readonly Table: {
|
|
202
|
+
readonly RowSelection: "pl7.app/table/row-selection";
|
|
203
|
+
};
|
|
204
|
+
};
|
|
51
205
|
/**
|
|
52
206
|
* Full column specification including all axes specs and specs of the column
|
|
53
207
|
* itself.
|
|
@@ -144,11 +298,9 @@ export type AxesId = AxisId[];
|
|
|
144
298
|
export declare function getAxisId(spec: AxisSpec): AxisId;
|
|
145
299
|
/** Extracts axes ids from axes spec array from column spec */
|
|
146
300
|
export declare function getAxesId(spec: AxesSpec): AxesId;
|
|
147
|
-
/**
|
|
148
|
-
|
|
149
|
-
* @deprecated Use {@link canonicalizeJson} instead to preserve type
|
|
150
|
-
*/
|
|
151
|
-
export declare function canonicalizeAxisId(id: AxisId): string;
|
|
301
|
+
/** Canonicalizes axis id */
|
|
302
|
+
export declare function canonicalizeAxisId(id: AxisId): CanonicalizedJson<AxisId>;
|
|
152
303
|
/** Returns whether "match" axis id is compatible with the "query" */
|
|
153
304
|
export declare function matchAxisId(query: AxisId, target: AxisId): boolean;
|
|
305
|
+
export {};
|
|
154
306
|
//# sourceMappingURL=spec.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../../../../src/drivers/pframe/spec/spec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../../../../src/drivers/pframe/spec/spec.ts"],"names":[],"mappings":"AACA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,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAExE;AAYD,qEAAqE;AACrE,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAElE"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var ee=Object.defineProperty;var ne=(e,n,r)=>n in e?ee(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r;var f=(e,n,r)=>ne(e,typeof n!="symbol"?n+"":n,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("zod"),b=require("canonicalize");function re(e){if(e.code!==void 0)return{code:e.code,sdkVersion:e.sdkVersion,featureFlags:e.featureFlags}}function h(e){if(e!==void 0)return typeof e=="string"?{__renderLambda:!0,handle:e,retentive:!1}:e}function te(e){if(e.v3!==void 0){const{initialArgs:n,initialUiState:r,inputsValid:t,outputs:i,renderingMode:o,sdkVersion:s,featureFlags:a,sections:u,title:c,enrichmentTargets:l}=e.v3,{code:Z}=e;return{initialArgs:n,initialUiState:r,inputsValid:t,outputs:i,renderingMode:o,sdkVersion:s,featureFlags:a,sections:u,title:c,code:Z,enrichmentTargets:l}}else if(e.inputsValid!==void 0){const{sdkVersion:n,renderingMode:r,outputs:t,inputsValid:i,sections:o,initialArgs:s,code:a}=e,u=Object.keys(e);if(n===void 0||r===void 0||t===void 0||i===void 0||o===void 0||s===void 0)throw new Error(`Malformed config v2. SDK version ${n}; Fields = ${u.join(", ")}`);return{sdkVersion:n,renderingMode:r,initialArgs:s,outputs:Object.fromEntries(Object.entries(t).map(([c,l])=>[c,h(l)])),inputsValid:h(i),sections:h(o),initialUiState:void 0,code:a}}else if(e.renderingMode!==void 0){const{sdkVersion:n,canRun:r,renderingMode:t,outputs:i,sections:o,initialArgs:s,code:a}=e,u=Object.keys(e);if(t===void 0||i===void 0||r===void 0||o===void 0||s===void 0)throw new Error(`Malformed config v1. SDK version ${n}; Fields = ${u.join(", ")}`);return{sdkVersion:n??"unknown",renderingMode:t,initialArgs:s,outputs:Object.fromEntries(Object.entries(i).map(([c,l])=>[c,h(l)])),inputsValid:h(r),sections:h(o),initialUiState:void 0,code:a}}else{const{sdkVersion:n}=e,r=Object.keys(e);throw new Error(`Config format not supported: SDK = ${n}; Fields = ${r.join(", ")}`)}}function ie(e){return new URL(e).protocol=="plblob+folder:"}function oe(e){return new URL(e).protocol=="block-ui:"}const ae=m.z.object({from:m.z.number(),to:m.z.number()});function se(e,n){if(!(e==null||n==null))return{from:e,to:n}}function ue(e,n){if(e.from<0||e.to<0||e.from>=e.to)throw new Error(`${n}: invalid bytes range: ${e}`)}function ce(e){return e!==void 0&&e.startsWith("log+live://log/")}function g(e){throw new Error("Unexpected object: "+e)}const j="upload://upload/",D="index://index/";function J(e){return e.startsWith(j)}function N(e){return e.startsWith(D)}function T(e){if(N(e)){const n=e.slice(D.length);return JSON.parse(decodeURIComponent(n)).path}else if(J(e)){const n=e.slice(j.length);return JSON.parse(decodeURIComponent(n)).localPath}g(e)}function le(e){return e.replace(/^.*[\\/]/,"")}function de(e){return le(T(e))}function fe(e){if(!e||typeof e!="object")return!1;const n=e;if(!("type"in n))return!1;switch(n.type){case"Json":return typeof n.keyLength=="number"&&n.data!==void 0&&typeof n.data=="object";case"JsonPartitioned":case"BinaryPartitioned":case"ParquetPartitioned":return typeof n.partitionKeyLength=="number"&&n.parts!==void 0&&typeof n.parts=="object";default:return!1}}function me(e,n){if(e!==void 0)switch(e.type){case"Json":return e;case"JsonPartitioned":{const r={};for(const[t,i]of Object.entries(e.parts))r[t]=n(i);return{...e,parts:r}}case"BinaryPartitioned":{const r={};for(const[t,i]of Object.entries(e.parts))r[t]={index:n(i.index),values:n(i.values)};return{...e,parts:r}}case"ParquetPartitioned":{const r={};for(const[t,i]of Object.entries(e.parts))r[t]=n(i);return{...e,parts:r}}}}function pe(e,n){switch(e.type){case"Json":break;case"JsonPartitioned":{Object.values(e.parts).forEach(n);break}case"BinaryPartitioned":{Object.values(e.parts).forEach(r=>{n(r.index),n(r.values)});break}case"ParquetPartitioned":{Object.values(e.parts).forEach(n);break}}}function L(e){if(!e||typeof e!="object")return!1;const n=e;if(!("type"in n))return!1;switch(n.type){case"Json":return typeof n.keyLength=="number"&&Array.isArray(n.data);case"JsonPartitioned":case"BinaryPartitioned":case"ParquetPartitioned":return typeof n.partitionKeyLength=="number"&&Array.isArray(n.parts);default:return!1}}function he(e){if(!L(e))return!1;switch(e.type){case"JsonPartitioned":case"BinaryPartitioned":case"ParquetPartitioned":return!0;default:return!1}}function ye(e){switch(e.type){case"Json":return{type:"Json",keyLength:e.keyLength,data:Object.entries(e.data).map(([n,r])=>({key:JSON.parse(n),value:r}))};case"JsonPartitioned":return{type:"JsonPartitioned",partitionKeyLength:e.partitionKeyLength,parts:Object.entries(e.parts).map(([n,r])=>({key:JSON.parse(n),value:r}))};case"BinaryPartitioned":return{type:"BinaryPartitioned",partitionKeyLength:e.partitionKeyLength,parts:Object.entries(e.parts).map(([n,r])=>({key:JSON.parse(n),value:r}))};case"ParquetPartitioned":return{type:"ParquetPartitioned",partitionKeyLength:e.partitionKeyLength,parts:Object.entries(e.parts).map(([n,r])=>({key:JSON.parse(n),value:r}))};default:g(e)}}function be(e){switch(e.type){case"Json":return{type:"Json",keyLength:e.keyLength,data:Object.fromEntries(e.data.map(({key:n,value:r})=>[JSON.stringify(n),r]))};case"JsonPartitioned":return{type:"JsonPartitioned",partitionKeyLength:e.partitionKeyLength,parts:Object.fromEntries(e.parts.map(({key:n,value:r})=>[JSON.stringify(n),r]))};case"BinaryPartitioned":return{type:"BinaryPartitioned",partitionKeyLength:e.partitionKeyLength,parts:Object.fromEntries(e.parts.map(({key:n,value:r})=>[JSON.stringify(n),r]))};case"ParquetPartitioned":return{type:"ParquetPartitioned",partitionKeyLength:e.partitionKeyLength,parts:Object.fromEntries(e.parts.map(({key:n,value:r})=>[JSON.stringify(n),r]))};default:g(e)}}function ge(e,n){if(e!==void 0)switch(e.type){case"Json":return e;case"JsonPartitioned":return{...e,parts:e.parts.map(r=>({key:r.key,value:n(r.value)}))};case"BinaryPartitioned":return{...e,parts:e.parts.map(r=>({key:r.key,value:{index:n(r.value.index),values:n(r.value.values)}}))};case"ParquetPartitioned":return{...e,parts:e.parts.map(r=>({key:r.key,value:n(r.value)}))}}}function V(e,n){const r=Math.floor(n/8),t=1<<7-n%8;return(e[r]&t)>0}function ve(e,n){return V(e.absent,n)}function Pe(e,n){if(e.isNA)return V(e.isNA,n);const r=e.type,t=e.data[n];switch(r){case"Int":return t===-2147483648;case"Long":return t===-9007199254740991n;case"Float":return Number.isNaN(t);case"Double":return Number.isNaN(t);case"String":return t===null;case"Bytes":return t===null;default:throw Error(`unsupported data type: ${r}`)}}const $={type:"absent"};function we(e){return typeof e=="object"&&e!==null&&"type"in e&&e.type==="absent"}const E=null;function B(e){return e===E}function Ae(e,n){return!(n?n(e):B(e))}function U(e,n,r){const t=e.type;if(t==="Bytes")throw Error("Bytes not yet supported");if(r&&"dataType"in r&&r.dataType!==void 0&&r.dataType!==t)throw Error(`expected column of type ${r.dataType}, got ${t}`);if(ve(e,n))return(r==null?void 0:r.absent)!==void 0?r.absent:$;if(Pe(e,n))return(r==null?void 0:r.na)!==void 0?r.na:E;const i=e.data[n];switch(t){case"Int":return i;case"Long":return Number(i);case"Float":return i;case"Double":return i;case"String":return i}}function ke(e,n,r){return U(e,n,r)}function Ee(e,n,r){return U(e,n,r)}function xe(e){return{kind:e.kind,valueType:e.valueType,name:e.name,domain:e.domain,parentAxes:e.parentAxes,axesId:x(e.axesSpec)}}function Se(e){return{columnId:e.id,spec:e.spec}}function p(e){const{type:n,name:r,domain:t}=e,i={type:n,name:r};return t&&Object.entries(t).length>0&&Object.assign(i,{domain:t}),i}function x(e){return e.map(p)}function Ce(e){return b(p(e))}function Oe(e,n){if(e===void 0)return n===void 0;if(n===void 0)return!0;for(const r in n)if(e[r]!==n[r])return!1;return!0}function q(e,n){return e.name===n.name&&Oe(e.domain,n.domain)}function Ie(e,n){return{...e,src:y(e.src,n)}}function y(e,n){switch(e.type){case"column":return{type:"column",column:n(e.column)};case"slicedColumn":return{type:"slicedColumn",column:n(e.column),newId:e.newId,axisFilters:e.axisFilters};case"inlineColumn":return e;case"inner":case"full":return{type:e.type,entries:e.entries.map(r=>y(r,n))};case"outer":return{type:"outer",primary:y(e.primary,n),secondary:e.secondary.map(r=>y(r,n))};default:g(e)}}function Fe(e){switch(e.type){case"axis":return{type:"axis",id:e.id};case"column":return{type:"column",id:e.id}}}function z(e){return b(e)}function Re(e){return JSON.parse(e)}function F(e){return b(p(e))}function R(e,n){return JSON.stringify([e,n])}class je{constructor(n){f(this,"domains",new Map);f(this,"axes",new Map);f(this,"domainPacks",[]);f(this,"domainPackToAnchor",new Map);this.anchors=n;const r=Object.entries(n);r.sort((t,i)=>t[0].localeCompare(i[0]));for(const[t,i]of r){for(let o=0;o<i.axesSpec.length;o++){const s=i.axesSpec[o],a=F(s);this.axes.set(a,{anchor:t,idx:o})}if(i.domain!==void 0){const o=Object.entries(i.domain);o.sort((s,a)=>s[0].localeCompare(a[0])),this.domainPackToAnchor.set(JSON.stringify(o),t),this.domainPacks.push(o.map(([s])=>s));for(const[s,a]of o){const u=R(s,a);this.domains.set(u,t)}}}}derive(n,r){const t={name:n.name,axes:[]};let i;if(n.domain!==void 0)e:for(const s of this.domainPacks){const a=[];for(const c of s){const l=n.domain[c];if(l!==void 0)a.push([c,l]);else break e}const u=this.domainPackToAnchor.get(JSON.stringify(a));if(u!==void 0){t.domainAnchor=u,i=new Set(s);break}}for(const[s,a]of Object.entries(n.domain??{})){if(i!==void 0&&i.has(s))continue;const u=R(s,a),c=this.domains.get(u);t.domain??(t.domain={}),t.domain[s]=c?{anchor:c}:a}if(t.axes=n.axesSpec.map(s=>{const a=F(s),u=this.axes.get(a);return u===void 0?p(s):u}),!r||r.length===0)return t;const o=[];for(const s of r){const[a,u]=s;if(typeof a=="number"){if(a<0||a>=n.axesSpec.length)throw new Error(`Axis index ${a} is out of bounds (0-${n.axesSpec.length-1})`);o.push([a,u])}else{const c=n.axesSpec.findIndex(l=>l.name===a);if(c===-1)throw new Error(`Axis with name "${a}" not found in the column specification`);o.push([c,u])}}return o.sort((s,a)=>s[0]-a[0]),{source:t,axisFilters:o}}deriveS(n,r){return z(this.derive(n,r))}}function De(e,n,r){const t={...n},i=(r==null?void 0:r.ignoreMissingDomains)??!1;if(t.domainAnchor!==void 0){const o=e[t.domainAnchor];if(!o)throw new Error(`Anchor "${t.domainAnchor}" not found`);const s=o.domain||{};t.domain={...s,...t.domain},delete t.domainAnchor}if(t.domain){const o={};for(const[s,a]of Object.entries(t.domain))if(typeof a=="string")o[s]=a;else{const u=e[a.anchor];if(!u)throw new Error(`Anchor "${a.anchor}" not found for domain key "${s}"`);if(!u.domain||u.domain[s]===void 0){if(!i)throw new Error(`Domain key "${s}" not found in anchor "${a.anchor}"`);continue}o[s]=u.domain[s]}t.domain=o}return t.axes&&(t.axes=t.axes.map(o=>Je(e,o))),t}function Je(e,n){if(!Ne(n))return n;const r=n.anchor,t=e[r];if(!t)throw new Error(`Anchor "${r}" not found for axis reference`);if("idx"in n){if(n.idx<0||n.idx>=t.axesSpec.length)throw new Error(`Axis index ${n.idx} out of bounds for anchor "${r}"`);return t.axesSpec[n.idx]}else if("name"in n){const i=t.axesSpec.filter(o=>o.name===n.name);if(i.length>1)throw new Error(`Multiple axes with name "${n.name}" found in anchor "${r}"`);if(i.length===0)throw new Error(`Axis with name "${n.name}" not found in anchor "${r}"`);return i[0]}else if("id"in n){const i=t.axesSpec.filter(o=>q(n.id,p(o)));if(i.length>1)throw new Error(`Multiple matching axes found for matcher in anchor "${r}"`);if(i.length===0)throw new Error(`No matching axis found for matcher in anchor "${r}"`);return i[0]}throw new Error("Unsupported axis reference type")}function Ne(e){return typeof e=="object"&&"anchor"in e}function Te(e){return typeof e=="object"&&e!==null&&"source"in e&&"axisFilters"in e}function d(e){return e.kind==="PColumn"}function K(e){return d(e.spec)}function Le(e){return d(e.obj)}function Ve(e){return d(e.obj.spec)}function $e(e){if(!K(e))throw new Error(`not a PColumn (kind = ${e.spec.kind})`);return e}function Be(e,n){return e===void 0?void 0:{...e,data:n(e.data)}}function Ue(e){const n=new Map,r=t=>{switch(t.type){case"column":n.set(t.column.id,t.column);return;case"slicedColumn":n.set(t.column.id,t.column);return;case"inlineColumn":return;case"full":case"inner":for(const i of t.entries)r(i);return;case"outer":r(t.primary);for(const i of t.secondary)r(i);return;default:g(t)}};return r(e),[...n.values()]}function qe(e){throw new Error("Unexpected object: "+e)}function v(e,n){switch(e.type){case"and":for(const r of e.operands)if(!v(r,n))return!1;return!0;case"or":for(const r of e.operands)if(v(r,n))return!0;return!1;case"not":return!v(e.operand,n);case"name":return d(n)&&n.name===e.name;case"name_pattern":return d(n)&&!!n.name.match(e.pattern);case"annotation":return d(n)&&n.annotations!==void 0&&n.annotations[e.annotation]===e.value;case"annotation_pattern":return d(n)&&n.annotations!==void 0&&n.annotations[e.annotation]!==void 0&&!!n.annotations[e.annotation].match(e.pattern);case"has_axes":return d(n)&&e.axes.every(r=>n.axesSpec.some(t=>(r.type===void 0||r.type===t.type)&&(r.name===void 0||r.name===t.name)&&(r.domain===void 0||Object.keys(r.domain).length===0||t.domain!==void 0&&Object.entries(r.domain).every(([i,o])=>t.domain[i]===o))));default:qe(e)}}function A(e,n){if(e.name!==void 0&&e.name!==n.name)return!1;if(e.type!==void 0){if(Array.isArray(e.type)){if(!e.type.includes(n.type))return!1}else if(e.type!==n.type)return!1}if(e.domain!==void 0){const r=n.domain||{};for(const[t,i]of Object.entries(e.domain))if(r[t]!==i)return!1}return!0}function k(e,n){if(n.name!==void 0&&e.name!==n.name||n.namePattern!==void 0&&!new RegExp(n.namePattern).test(e.name))return!1;if(n.type!==void 0){if(Array.isArray(n.type)){if(!n.type.includes(e.valueType))return!1}else if(n.type!==e.valueType)return!1}if(n.domain!==void 0){const r=e.domain||{};for(const[t,i]of Object.entries(n.domain))if(r[t]!==i)return!1}if(n.axes!==void 0){const r=e.axesSpec.map(p);if(n.partialAxesMatch){for(const t of n.axes)if(!r.some(i=>A(t,i)))return!1}else{if(r.length!==n.axes.length)return!1;for(let t=0;t<n.axes.length;t++)if(!A(n.axes[t],r[t]))return!1}}if(n.annotations!==void 0){const r=e.annotations||{};for(const[t,i]of Object.entries(n.annotations))if(r[t]!==i)return!1}if(n.annotationPatterns!==void 0){const r=e.annotations||{};for(const[t,i]of Object.entries(n.annotationPatterns)){const o=r[t];if(o===void 0||!new RegExp(i).test(o))return!1}}return!0}function ze(e){return Array.isArray(e)?n=>e.some(r=>d(n)&&k(n,r)):n=>d(n)&&k(n,e)}function Ke(e){const n={kind:e.kind,name:e.name};return e.domain!==void 0&&(n.domain=e.domain),d(e)&&(n.axesSpec=x(e.axesSpec)),b(n)}const Me={href:"/"},_e=m.z.object({__isRef:m.z.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:m.z.string().describe("Upstream block id"),name:m.z.string().describe("Name of the output provided to the upstream block's output context"),requireEnrichments:m.z.literal(!0).optional().describe("True if current block that stores this reference in its args, may need enrichments for the references value originating from the blocks in between current and referenced block")}).describe("Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees.").readonly();function He(e){return typeof e=="object"&&e!==null&&"__isRef"in e&&e.__isRef===!0&&"blockId"in e&&"name"in e}function We(e,n,r=!1){return r?{__isRef:!0,blockId:e,name:n,requireEnrichments:!0}:{__isRef:!0,blockId:e,name:n}}function Ge(e,n=!0){if(n)return{...e,requireEnrichments:!0};{const{requireEnrichments:r,...t}=e;return t}}function Xe(e,n,r=!1){return e.blockId===n.blockId&&e.name===n.name&&(r||e.requireEnrichments===n.requireEnrichments)}function Qe(e,n){return e.ok?{ok:!0,value:n(e.value)}:e}function Ye(e){if(e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray)return new DataView(e.buffer,e.byteOffset,e.byteLength);if(e instanceof ArrayBuffer)return new DataView(e);throw new TypeError("Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray")}const Ze="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",en="0123456789ABCDEFGHIJKLMNOPQRSTUV",nn="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function M(e,n,r){r=r||{};let t,i;switch(n){case"RFC3548":case"RFC4648":t=Ze,i=!0;break;case"RFC4648-HEX":t=en,i=!0;break;case"Crockford":t=nn,i=!1;break;default:throw new Error("Unknown base32 variant: "+String(n))}const o=r.padding!==void 0?r.padding:i,s=Ye(e);let a=0,u=0,c="";for(let l=0;l<s.byteLength;l++)for(u=u<<8|s.getUint8(l),a+=8;a>=5;)c+=t[u>>>a-5&31],a-=5;if(a>0&&(c+=t[u<<5-a&31]),o)for(;c.length%8!==0;)c+="=";return c}const S=15,_=24,C=m.z.string().length(_).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");function rn(){const e=new Uint8Array(S);return crypto.getRandomValues(e),C.parse(M(e,"RFC4648"))}function H(e){if(e.length!==S)throw new Error(`Wrong number of bytes: ${e.length}`);return C.parse(M(e,"RFC4648"))}async function tn(e){const n=new TextEncoder,r=await crypto.subtle.digest("SHA-256",n.encode(e));return H(new Uint8Array(r.slice(0,15)))}function on(e){return JSON.stringify(e)}function an(e){return b(e)}function sn(e){return JSON.parse(e)}class un extends Error{constructor(){super(...arguments);f(this,"name","AbortError")}}class cn extends Error{constructor(){super(...arguments);f(this,"name","UiError")}}function ln(e){return e instanceof Error&&e.name==="AbortError"}function W(e){return e instanceof Error?e.name==="AbortError"||W(e.cause):!1}function dn(e){return e instanceof Error&&e.name==="AggregateError"}class G extends Error{constructor(){super(...arguments);f(this,"name","PFrameError")}}function fn(e){return e instanceof Error&&e.name==="PFrameError"}class mn extends G{constructor(){super(...arguments);f(this,"name","PFrameError.Driver")}}function pn(e){return e instanceof Error&&e.name==="PFrameError.Driver"}function hn(e){if(typeof e=="string")return`String value was thrown: ${e}`;if(e&&typeof e=="object")try{return`Plain object was thrown: ${JSON.stringify(e)}`}catch(n){return`Non-serializable object was thrown (JSON.stringify failed: ${n instanceof Error?n.message:String(n)}): ${String(e)}`}return`Non-Error value (${typeof e}) was thrown: ${e}`}function P(e){return e instanceof Error?e:new Error(hn(e))}function w(e){const n=e.cause?w(e.cause):void 0,r=new Error(e.message,n!==void 0?{cause:n}:void 0);return r.name=e.name||"Error",r.stack=e.stack,r}function O(e){const n=P(e),r=n.cause?O(n.cause):void 0;return{name:n.name,message:n.message,stack:n.stack,...n.cause!==void 0&&{cause:r}}}function yn(e){if(e.error)throw e.error instanceof Error?e.error:w(e.error);return e.value}function I(e){return e.error?{error:O(e.error)}:{value:e.value}}function bn(e){return e.error?{error:w(e.error)}:{value:e.value}}function X(e){try{return{value:e()}}catch(n){return{error:P(n)}}}async function Q(e){try{return{value:await e()}}catch(n){return{error:P(n)}}}function gn(e){const n=X(e);return I(n)}async function vn(e){const n=await Q(e);return I(n)}const Pn=["supportsLazyState"],wn=["requiresUIAPIVersion","requiresModelAPIVersion"];function An(e,n,r=!0){return e===void 0?!1:e[n]===r}function kn(e){return e===void 0?new Set:new Set(Object.entries(e).filter(([n,r])=>n.startsWith("requires")&&r===!0).map(([n])=>n))}function En(e){return e===void 0?new Set:new Set(Object.entries(e).filter(([n,r])=>n.startsWith("supports")&&r===!0).map(([n])=>n))}class Y extends Error{constructor(r){super(`Some of the block requirements are not supported by the runtime: ${Array.from(r.entries()).map(([t,i])=>`${t}: ${i}`).join(", ")}`);f(this,"name","IncompatibleFlagsError");this.incompatibleFlags=r}}class xn{constructor(){f(this,"supportedRequirements",new Map)}addSupportedRequirement(n,r=!0){return this.supportedRequirements.has(n)||this.supportedRequirements.set(n,new Set),this.supportedRequirements.get(n).add(r),this}getIncompatibleFlags(n){if(n===void 0)return;const r=new Map;for(const[t,i]of Object.entries(n))if(t.startsWith("requires")){if(i===void 0)continue;const o=this.supportedRequirements.get(t);(o===void 0||!o.has(i))&&r.set(t,i)}return r.size===0?void 0:r}checkCompatibility(n){return this.getIncompatibleFlags(n)===void 0}throwIfIncompatible(n){const r=this.getIncompatibleFlags(n);if(r!==void 0)throw new Y(r)}}exports.AbortError=un;exports.AllRequiresFeatureFlags=wn;exports.AllSupportsFeatureFlags=Pn;exports.AnchoredIdDeriver=je;exports.DefaultNavigationState=Me;exports.IncompatibleFlagsError=Y;exports.PFrameDriverError=mn;exports.PFrameError=G;exports.PTableAbsent=$;exports.PTableNA=E;exports.PlId=C;exports.PlIdBytes=S;exports.PlIdLength=_;exports.PlRef=_e;exports.RangeBytes=ae;exports.RuntimeCapabilities=xn;exports.UiError=cn;exports.canonicalizeAxisId=Ce;exports.canonicalizeJson=an;exports.checkBlockFlag=An;exports.createPlRef=We;exports.dataInfoToEntries=ye;exports.deriveNativeId=Ke;exports.deserializeError=w;exports.deserializeResult=bn;exports.digestPlId=tn;exports.ensureError=P;exports.ensurePColumn=$e;exports.entriesToDataInfo=be;exports.executePSpecPredicate=v;exports.extractAllColumns=Ue;exports.extractAllRequirements=kn;exports.extractAllSupports=En;exports.extractCodeWithInfo=re;exports.extractConfigGeneric=te;exports.getAxesId=x;exports.getAxisId=p;exports.getColumnIdAndSpec=Se;exports.getFileNameFromHandle=de;exports.getFilePathFromHandle=T;exports.getPColumnSpecId=xe;exports.getPTableColumnId=Fe;exports.hasAbortError=W;exports.isAbortError=ln;exports.isAggregateError=dn;exports.isBlockUIURL=oe;exports.isDataInfo=fe;exports.isDataInfoEntries=L;exports.isFilteredPColumn=Te;exports.isFolderURL=ie;exports.isImportFileHandleIndex=N;exports.isImportFileHandleUpload=J;exports.isLiveLog=ce;exports.isPColumn=K;exports.isPColumnResult=Ve;exports.isPColumnSpec=d;exports.isPColumnSpecResult=Le;exports.isPFrameDriverError=pn;exports.isPFrameError=fn;exports.isPTableAbsent=we;exports.isPTableNA=B;exports.isPTableValueAxis=Ae;exports.isPartitionedDataInfoEntries=he;exports.isPlRef=He;exports.mapDataInfo=me;exports.mapDataInfoEntries=ge;exports.mapJoinEntry=y;exports.mapPObjectData=Be;exports.mapPTableDef=Ie;exports.mapValueInVOE=Qe;exports.matchAxis=A;exports.matchAxisId=q;exports.matchPColumn=k;exports.newRangeBytesOpt=se;exports.pTableValue=ke;exports.pTableValueBranded=Ee;exports.parseColumnId=Re;exports.parseJson=sn;exports.plId=H;exports.plRefsEqual=Xe;exports.resolveAnchors=De;exports.selectorsToPredicate=ze;exports.serializeError=O;exports.serializeResult=I;exports.stringifyColumnId=z;exports.stringifyJson=on;exports.uniquePlId=rn;exports.unwrapResult=yn;exports.validateRangeBytes=ue;exports.visitDataInfo=pe;exports.withEnrichments=Ge;exports.wrapAndSerialize=gn;exports.wrapAndSerializeAsync=vn;exports.wrapAsyncCallback=Q;exports.wrapCallback=X;
|
|
1
|
+
"use strict";var we=Object.defineProperty;var ve=(e,n,t)=>n in e?we(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var A=(e,n,t)=>ve(e,typeof n!="symbol"?n+"":n,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("zod"),C=require("canonicalize");function xe(e){if(e.code!==void 0)return{code:e.code,sdkVersion:e.sdkVersion,featureFlags:e.featureFlags}}function x(e){if(e!==void 0)return typeof e=="string"?{__renderLambda:!0,handle:e,retentive:!1}:e}function Pe(e){if(e.v3!==void 0){const{initialArgs:n,initialUiState:t,inputsValid:r,outputs:o,renderingMode:i,sdkVersion:s,featureFlags:a,sections:u,title:c,enrichmentTargets:d}=e.v3,{code:f}=e;return{initialArgs:n,initialUiState:t,inputsValid:r,outputs:o,renderingMode:i,sdkVersion:s,featureFlags:a,sections:u,title:c,code:f,enrichmentTargets:d}}else if(e.inputsValid!==void 0){const{sdkVersion:n,renderingMode:t,outputs:r,inputsValid:o,sections:i,initialArgs:s,code:a}=e,u=Object.keys(e);if(n===void 0||t===void 0||r===void 0||o===void 0||i===void 0||s===void 0)throw new Error(`Malformed config v2. SDK version ${n}; Fields = ${u.join(", ")}`);return{sdkVersion:n,renderingMode:t,initialArgs:s,outputs:Object.fromEntries(Object.entries(r).map(([c,d])=>[c,x(d)])),inputsValid:x(o),sections:x(i),initialUiState:void 0,code:a}}else if(e.renderingMode!==void 0){const{sdkVersion:n,canRun:t,renderingMode:r,outputs:o,sections:i,initialArgs:s,code:a}=e,u=Object.keys(e);if(r===void 0||o===void 0||t===void 0||i===void 0||s===void 0)throw new Error(`Malformed config v1. SDK version ${n}; Fields = ${u.join(", ")}`);return{sdkVersion:n??"unknown",renderingMode:r,initialArgs:s,outputs:Object.fromEntries(Object.entries(o).map(([c,d])=>[c,x(d)])),inputsValid:x(t),sections:x(i),initialUiState:void 0,code:a}}else{const{sdkVersion:n}=e,t=Object.keys(e);throw new Error(`Config format not supported: SDK = ${n}; Fields = ${t.join(", ")}`)}}function ke(e){return new URL(e).protocol=="plblob+folder:"}function Se(e){return new URL(e).protocol=="block-ui:"}const Ee=l.z.object({from:l.z.number(),to:l.z.number()});function Ie(e,n){if(!(e==null||n==null))return{from:e,to:n}}function Fe(e,n){if(e.from<0||e.to<0||e.from>=e.to)throw new Error(`${n}: invalid bytes range: ${e}`)}function Oe(e){return e!==void 0&&e.startsWith("log+live://log/")}function E(e){throw new Error("Unexpected object: "+e)}const Q="upload://upload/",X="index://index/";function Y(e){return e.startsWith(Q)}function Z(e){return e.startsWith(X)}function ee(e){if(Z(e)){const n=e.slice(X.length);return JSON.parse(decodeURIComponent(n)).path}else if(Y(e)){const n=e.slice(Q.length);return JSON.parse(decodeURIComponent(n)).localPath}E(e)}function Ce(e){return e.replace(/^.*[\\/]/,"")}function De(e){return Ce(ee(e))}function Je(e){if(!e||typeof e!="object")return!1;const n=e;if(!("type"in n))return!1;switch(n.type){case"Json":return typeof n.keyLength=="number"&&n.data!==void 0&&typeof n.data=="object";case"JsonPartitioned":case"BinaryPartitioned":case"ParquetPartitioned":return typeof n.partitionKeyLength=="number"&&n.parts!==void 0&&typeof n.parts=="object";default:return!1}}function Te(e,n){if(e!==void 0)switch(e.type){case"Json":return e;case"JsonPartitioned":{const t={};for(const[r,o]of Object.entries(e.parts))t[r]=n(o);return{...e,parts:t}}case"BinaryPartitioned":{const t={};for(const[r,o]of Object.entries(e.parts))t[r]={index:n(o.index),values:n(o.values)};return{...e,parts:t}}case"ParquetPartitioned":{const t={};for(const[r,o]of Object.entries(e.parts))t[r]=n(o);return{...e,parts:t}}}}function ze(e,n){switch(e.type){case"Json":break;case"JsonPartitioned":{Object.values(e.parts).forEach(n);break}case"BinaryPartitioned":{Object.values(e.parts).forEach(t=>{n(t.index),n(t.values)});break}case"ParquetPartitioned":{Object.values(e.parts).forEach(n);break}}}function ne(e){if(!e||typeof e!="object")return!1;const n=e;if(!("type"in n))return!1;switch(n.type){case"Json":return typeof n.keyLength=="number"&&Array.isArray(n.data);case"JsonPartitioned":case"BinaryPartitioned":case"ParquetPartitioned":return typeof n.partitionKeyLength=="number"&&Array.isArray(n.parts);default:return!1}}function Le(e){if(!ne(e))return!1;switch(e.type){case"JsonPartitioned":case"BinaryPartitioned":case"ParquetPartitioned":return!0;default:return!1}}function Re(e){switch(e.type){case"Json":return{type:"Json",keyLength:e.keyLength,data:Object.entries(e.data).map(([n,t])=>({key:JSON.parse(n),value:t}))};case"JsonPartitioned":return{type:"JsonPartitioned",partitionKeyLength:e.partitionKeyLength,parts:Object.entries(e.parts).map(([n,t])=>({key:JSON.parse(n),value:t}))};case"BinaryPartitioned":return{type:"BinaryPartitioned",partitionKeyLength:e.partitionKeyLength,parts:Object.entries(e.parts).map(([n,t])=>({key:JSON.parse(n),value:t}))};case"ParquetPartitioned":return{type:"ParquetPartitioned",partitionKeyLength:e.partitionKeyLength,parts:Object.entries(e.parts).map(([n,t])=>({key:JSON.parse(n),value:t}))};default:E(e)}}function Ne(e){switch(e.type){case"Json":return{type:"Json",keyLength:e.keyLength,data:Object.fromEntries(e.data.map(({key:n,value:t})=>[JSON.stringify(n),t]))};case"JsonPartitioned":return{type:"JsonPartitioned",partitionKeyLength:e.partitionKeyLength,parts:Object.fromEntries(e.parts.map(({key:n,value:t})=>[JSON.stringify(n),t]))};case"BinaryPartitioned":return{type:"BinaryPartitioned",partitionKeyLength:e.partitionKeyLength,parts:Object.fromEntries(e.parts.map(({key:n,value:t})=>[JSON.stringify(n),t]))};case"ParquetPartitioned":return{type:"ParquetPartitioned",partitionKeyLength:e.partitionKeyLength,parts:Object.fromEntries(e.parts.map(({key:n,value:t})=>[JSON.stringify(n),t]))};default:E(e)}}function je(e,n){if(e!==void 0)switch(e.type){case"Json":return e;case"JsonPartitioned":return{...e,parts:e.parts.map(t=>({key:t.key,value:n(t.value)}))};case"BinaryPartitioned":return{...e,parts:e.parts.map(t=>({key:t.key,value:{index:n(t.value.index),values:n(t.value.values)}}))};case"ParquetPartitioned":return{...e,parts:e.parts.map(t=>({key:t.key,value:n(t.value)}))}}}class Ve extends Error{constructor(){super(...arguments);A(this,"name","AbortError")}}class $e extends Error{constructor(){super(...arguments);A(this,"name","UiError")}}function Ke(e){return e instanceof Error&&e.name==="AbortError"}function te(e){return e instanceof Error?e.name==="AbortError"||te(e.cause):!1}function Me(e){return e instanceof Error&&e.name==="AggregateError"}class re extends Error{constructor(){super(...arguments);A(this,"name","PFrameError")}}function Be(e){return e instanceof Error&&e.name==="PFrameError"}class qe extends re{constructor(){super(...arguments);A(this,"name","PFrameError.Driver")}}function Ue(e){return e instanceof Error&&e.name==="PFrameError.Driver"}function We(e){if(typeof e=="string")return`String value was thrown: ${e}`;if(e&&typeof e=="object")try{return`Plain object was thrown: ${JSON.stringify(e)}`}catch(n){return`Non-serializable object was thrown (JSON.stringify failed: ${n instanceof Error?n.message:String(n)}): ${String(e)}`}return`Non-Error value (${typeof e}) was thrown: ${e}`}function I(e){return e instanceof Error?e:new Error(We(e))}function D(e){const n=e.cause?D(e.cause):void 0,t=new Error(e.message,n!==void 0?{cause:n}:void 0);return t.name=e.name||"Error",t.stack=e.stack,t}function N(e){const n=I(e),t=n.cause?N(n.cause):void 0;return{name:n.name,message:n.message,stack:n.stack,...n.cause!==void 0&&{cause:t}}}function He(e){if(e.error)throw e.error instanceof Error?e.error:D(e.error);return e.value}function j(e){return e.error?{error:N(e.error)}:{value:e.value}}function _e(e){return e.error?{error:D(e.error)}:{value:e.value}}function oe(e){try{return{value:e()}}catch(n){return{error:I(n)}}}async function ie(e){try{return{value:await e()}}catch(n){return{error:I(n)}}}function Ge(e){const n=oe(e);return j(n)}async function Qe(e){const n=await ie(e);return j(n)}function Xe(e){return JSON.stringify(e)}function m(e){return C(e)}function ae(e){return JSON.parse(e)}const g={Int:"Int",Long:"Long",Float:"Float",Double:"Double",String:"String",Bytes:"Bytes"};function J(e,n){return e==null?void 0:e[n]}function T(e,n,t,r="readMetadataJsonOrThrow"){const o=J(e,t);if(o===void 0)return;const i=n[t];try{const s=JSON.parse(o);return i.parse(s)}catch(s){throw new Error(`${r} failed, key: ${String(t)}, value: ${o}, error: ${I(s)}`)}}function V(e,n,t){try{return T(e,n,t)}catch{return}}const Ye={Alphabet:"pl7.app/alphabet",BlockId:"pl7.app/blockId"},$={};function Ze(e,n){return J(e==null?void 0:e.domain,n)}function en(e,n){return T(e==null?void 0:e.domain,$,n,"readDomainJsonOrThrow")}function nn(e,n){return V(e==null?void 0:e.domain,$,n)}const y={Alphabet:"pl7.app/alphabet",DiscreteValues:"pl7.app/discreteValues",Format:"pl7.app/format",Graph:{IsVirtual:"pl7.app/graph/isVirtual"},HideDataFromUi:"pl7.app/hideDataFromUi",IsLinkerColumn:"pl7.app/isLinkerColumn",Label:"pl7.app/label",Max:"pl7.app/max",Min:"pl7.app/min",Parents:"pl7.app/parents",Sequence:{Annotation:{Mapping:"pl7.app/sequence/annotation/mapping"},IsAnnotation:"pl7.app/sequence/isAnnotation"},Table:{FontFamily:"pl7.app/table/fontFamily",OrderPriority:"pl7.app/table/orderPriority",Visibility:"pl7.app/table/visibility"},Trace:"pl7.app/trace"},se=l.z.object({type:l.z.nativeEnum(g),name:l.z.string(),domain:l.z.record(l.z.string(),l.z.string()).optional(),annotations:l.z.record(l.z.string(),l.z.string()).optional(),parentAxes:l.z.array(l.z.number()).optional()}).passthrough(),K={[y.DiscreteValues]:l.z.array(l.z.string()).or(l.z.array(l.z.number())),[y.Graph.IsVirtual]:l.z.boolean(),[y.HideDataFromUi]:l.z.boolean(),[y.IsLinkerColumn]:l.z.boolean(),[y.Max]:l.z.number(),[y.Min]:l.z.number(),[y.Parents]:l.z.array(se),[y.Sequence.Annotation.Mapping]:l.z.record(l.z.string(),l.z.string()),[y.Sequence.IsAnnotation]:l.z.boolean(),[y.Table.OrderPriority]:l.z.number(),[y.Trace]:l.z.record(l.z.string(),l.z.unknown())};function tn(e,n){return J(e==null?void 0:e.annotations,n)}function rn(e,n){return T(e==null?void 0:e.annotations,K,n,"readAnnotationJsonOrThrow")}function M(e,n){return V(e==null?void 0:e.annotations,K,n)}function O(e){return{axis:e,children:[]}}function P(e){const n=O(e);let t=[n];for(;t.length;){const r=[];for(const o of t)o.children=o.axis.parentAxesSpec.map(O),r.push(...o.children);t=r}return n}function on(e){const n=new Set([m(p(e.axis))]);let t=[e];for(;t.length;){const r=[];for(const o of t)for(const i of o.children)n.add(m(p(i.axis))),r.push(i);t=r}return n}function k(e){const n=[e.axis];let t=[e];for(;t.length;){const r=[];for(const o of t)for(const i of o.children)n.push(i.axis),r.push(i);t=r}return n}function z(e){return m(k(P(e)).map(p))}function an(e,n){if(e.name!==n.name)return e.name<n.name?1:-1;if(e.type!==n.type)return e.type<n.type?1:-1;const t=m(e.domain??{}),r=m(n.domain??{});if(t!==r)return t<r?1:-1;const o=z(e),i=z(n);if(o!==i)return o<i?1:-1;const s=m(e.annotations??{}),a=m(n.annotations??{});return s!==a?s<a?1:-1:0}function sn(e){const n=M(e,y.Parents);return n===void 0?[]:n}function ue(e){e.parentAxesSpec.forEach(ue),e.parentAxesSpec.sort(an)}function un(e){let t=[O(e)];const r=new Set(m(p(e)));for(;t.length;){const o=[],i=new Set;for(const s of t){s.children=s.axis.parentAxesSpec.map(O);for(const a of s.children){const u=m(p(a.axis));if(!i.has(u)){if(o.push(a),i.add(u),r.has(u))return!0;r.add(u)}}}t=o}return!1}function B(e){if(!e.length)return[];const n=e.map(t=>{const{parentAxes:r,...o}=t;return{...o,annotations:{...o.annotations},parentAxesSpec:[]}});return e.forEach((t,r)=>{var i;const o=n[r];t.parentAxes?o.parentAxesSpec=t.parentAxes.map(s=>n[s]):(o.parentAxesSpec=B(sn(t)),(i=o.annotations)==null||delete i[y.Parents])}),n.some(un)?n.forEach(t=>{t.parentAxesSpec=[]}):n.forEach(t=>{ue(t)}),n}function cn(e){const n=e.map(t=>m(p(t)));return e.map(t=>{const o=t.parentAxesSpec.map(a=>m(p(a))).map(a=>n.indexOf(a)),{parentAxesSpec:i,...s}=t;return o.length?{...s,parentAxes:o}:s})}const ln={Label:"pl7.app/label",Table:{RowSelection:"pl7.app/table/row-selection"}};function dn(e){return{kind:e.kind,valueType:e.valueType,name:e.name,domain:e.domain,parentAxes:e.parentAxes,axesId:q(e.axesSpec)}}function fn(e){return{columnId:e.id,spec:e.spec}}function p(e){const{type:n,name:t,domain:r}=e,o={type:n,name:t};return r&&Object.entries(r).length>0&&Object.assign(o,{domain:r}),o}function q(e){return e.map(p)}function pn(e){return m(p(e))}function mn(e,n){if(e===void 0)return n===void 0;if(n===void 0)return!0;for(const t in n)if(e[t]!==n[t])return!1;return!0}function ce(e,n){return e.name===n.name&&mn(e.domain,n.domain)}function le(e,n){const t=Math.floor(n/8),r=1<<7-n%8;return(e[t]&r)>0}function hn(e,n){return le(e.absent,n)}function yn(e,n){if(e.isNA)return le(e.isNA,n);const t=e.type,r=e.data[n];switch(t){case g.Int:return r===-2147483648;case g.Long:return r===-9007199254740991n;case g.Float:return Number.isNaN(r);case g.Double:return Number.isNaN(r);case g.String:return r===null;case g.Bytes:return r===null;default:throw Error(`unsupported data type: ${t}`)}}const de={type:"absent"};function gn(e){return typeof e=="object"&&e!==null&&"type"in e&&e.type==="absent"}const U=null;function fe(e){return e===U}function An(e,n){return!(n?n(e):fe(e))}function pe(e,n,t){const r=e.type;if(r===g.Bytes)throw Error("Bytes not yet supported");if(t&&"dataType"in t&&t.dataType!==void 0&&t.dataType!==r)throw Error(`expected column of type ${t.dataType}, got ${r}`);if(hn(e,n))return(t==null?void 0:t.absent)!==void 0?t.absent:de;if(yn(e,n))return(t==null?void 0:t.na)!==void 0?t.na:U;const o=e.data[n];switch(r){case g.Int:return o;case g.Long:return Number(o);case g.Float:return o;case g.Double:return o;case g.String:return o}}function bn(e,n,t){return pe(e,n,t)}function wn(e,n,t){return pe(e,n,t)}function vn(e,n){return{...e,src:S(e.src,n)}}function S(e,n){switch(e.type){case"column":return{type:"column",column:n(e.column)};case"slicedColumn":return{type:"slicedColumn",column:n(e.column),newId:e.newId,axisFilters:e.axisFilters};case"inlineColumn":return e;case"inner":case"full":return{type:e.type,entries:e.entries.map(t=>S(t,n))};case"outer":return{type:"outer",primary:S(e.primary,n),secondary:e.secondary.map(t=>S(t,n))};default:E(e)}}function xn(e){switch(e.type){case"axis":return{type:"axis",id:e.id};case"column":return{type:"column",id:e.id}}}function me(e){return C(e)}function Pn(e){return JSON.parse(e)}function _(e){return C(p(e))}function G(e,n){return JSON.stringify([e,n])}class kn{constructor(n){A(this,"domains",new Map);A(this,"axes",new Map);A(this,"domainPacks",[]);A(this,"domainPackToAnchor",new Map);this.anchors=n;const t=Object.entries(n);t.sort((r,o)=>r[0].localeCompare(o[0]));for(const[r,o]of t){for(let i=0;i<o.axesSpec.length;i++){const s=o.axesSpec[i],a=_(s);this.axes.set(a,{anchor:r,idx:i})}if(o.domain!==void 0){const i=Object.entries(o.domain);i.sort((s,a)=>s[0].localeCompare(a[0])),this.domainPackToAnchor.set(JSON.stringify(i),r),this.domainPacks.push(i.map(([s])=>s));for(const[s,a]of i){const u=G(s,a);this.domains.set(u,r)}}}}derive(n,t){const r={name:n.name,axes:[]};let o;if(n.domain!==void 0)e:for(const s of this.domainPacks){const a=[];for(const c of s){const d=n.domain[c];if(d!==void 0)a.push([c,d]);else break e}const u=this.domainPackToAnchor.get(JSON.stringify(a));if(u!==void 0){r.domainAnchor=u,o=new Set(s);break}}for(const[s,a]of Object.entries(n.domain??{})){if(o!==void 0&&o.has(s))continue;const u=G(s,a),c=this.domains.get(u);r.domain??(r.domain={}),r.domain[s]=c?{anchor:c}:a}if(r.axes=n.axesSpec.map(s=>{const a=_(s),u=this.axes.get(a);return u===void 0?p(s):u}),!t||t.length===0)return r;const i=[];for(const s of t){const[a,u]=s;if(typeof a=="number"){if(a<0||a>=n.axesSpec.length)throw new Error(`Axis index ${a} is out of bounds (0-${n.axesSpec.length-1})`);i.push([a,u])}else{const c=n.axesSpec.findIndex(d=>d.name===a);if(c===-1)throw new Error(`Axis with name "${a}" not found in the column specification`);i.push([c,u])}}return i.sort((s,a)=>s[0]-a[0]),{source:r,axisFilters:i}}deriveS(n,t){return me(this.derive(n,t))}}function Sn(e,n,t){const r={...n},o=(t==null?void 0:t.ignoreMissingDomains)??!1;if(r.domainAnchor!==void 0){const i=e[r.domainAnchor];if(!i)throw new Error(`Anchor "${r.domainAnchor}" not found`);const s=i.domain||{};r.domain={...s,...r.domain},delete r.domainAnchor}if(r.domain){const i={};for(const[s,a]of Object.entries(r.domain))if(typeof a=="string")i[s]=a;else{const u=e[a.anchor];if(!u)throw new Error(`Anchor "${a.anchor}" not found for domain key "${s}"`);if(!u.domain||u.domain[s]===void 0){if(!o)throw new Error(`Domain key "${s}" not found in anchor "${a.anchor}"`);continue}i[s]=u.domain[s]}r.domain=i}return r.axes&&(r.axes=r.axes.map(i=>En(e,i))),r}function En(e,n){if(!In(n))return n;const t=n.anchor,r=e[t];if(!r)throw new Error(`Anchor "${t}" not found for axis reference`);if("idx"in n){if(n.idx<0||n.idx>=r.axesSpec.length)throw new Error(`Axis index ${n.idx} out of bounds for anchor "${t}"`);return r.axesSpec[n.idx]}else if("name"in n){const o=r.axesSpec.filter(i=>i.name===n.name);if(o.length>1)throw new Error(`Multiple axes with name "${n.name}" found in anchor "${t}"`);if(o.length===0)throw new Error(`Axis with name "${n.name}" not found in anchor "${t}"`);return o[0]}else if("id"in n){const o=r.axesSpec.filter(i=>ce(n.id,p(i)));if(o.length>1)throw new Error(`Multiple matching axes found for matcher in anchor "${t}"`);if(o.length===0)throw new Error(`No matching axis found for matcher in anchor "${t}"`);return o[0]}throw new Error("Unsupported axis reference type")}function In(e){return typeof e=="object"&&"anchor"in e}function Fn(e){return typeof e=="object"&&e!==null&&"source"in e&&"axisFilters"in e}function b(e){return e.kind==="PColumn"}function he(e){return b(e.spec)}function On(e){return b(e.obj)}function Cn(e){return b(e.obj.spec)}function Dn(e){if(!he(e))throw new Error(`not a PColumn (kind = ${e.spec.kind})`);return e}function Jn(e,n){return e===void 0?void 0:{...e,data:n(e.data)}}function Tn(e){const n=new Map,t=r=>{switch(r.type){case"column":n.set(r.column.id,r.column);return;case"slicedColumn":n.set(r.column.id,r.column);return;case"inlineColumn":return;case"full":case"inner":for(const o of r.entries)t(o);return;case"outer":t(r.primary);for(const o of r.secondary)t(o);return;default:E(r)}};return t(e),[...n.values()]}function zn(e){throw new Error("Unexpected object: "+e)}function F(e,n){switch(e.type){case"and":for(const t of e.operands)if(!F(t,n))return!1;return!0;case"or":for(const t of e.operands)if(F(t,n))return!0;return!1;case"not":return!F(e.operand,n);case"name":return b(n)&&n.name===e.name;case"name_pattern":return b(n)&&!!n.name.match(e.pattern);case"annotation":return b(n)&&n.annotations!==void 0&&n.annotations[e.annotation]===e.value;case"annotation_pattern":return b(n)&&n.annotations!==void 0&&n.annotations[e.annotation]!==void 0&&!!n.annotations[e.annotation].match(e.pattern);case"has_axes":return b(n)&&e.axes.every(t=>n.axesSpec.some(r=>(t.type===void 0||t.type===r.type)&&(t.name===void 0||t.name===r.name)&&(t.domain===void 0||Object.keys(t.domain).length===0||r.domain!==void 0&&Object.entries(t.domain).every(([o,i])=>r.domain[o]===i))));default:zn(e)}}function L(e,n){if(e.name!==void 0&&e.name!==n.name)return!1;if(e.type!==void 0){if(Array.isArray(e.type)){if(!e.type.includes(n.type))return!1}else if(e.type!==n.type)return!1}if(e.domain!==void 0){const t=n.domain||{};for(const[r,o]of Object.entries(e.domain))if(t[r]!==o)return!1}return!0}function R(e,n){if(n.name!==void 0&&e.name!==n.name||n.namePattern!==void 0&&!new RegExp(n.namePattern).test(e.name))return!1;if(n.type!==void 0){if(Array.isArray(n.type)){if(!n.type.includes(e.valueType))return!1}else if(n.type!==e.valueType)return!1}if(n.domain!==void 0){const t=e.domain||{};for(const[r,o]of Object.entries(n.domain))if(t[r]!==o)return!1}if(n.axes!==void 0){const t=e.axesSpec.map(p);if(n.partialAxesMatch){for(const r of n.axes)if(!t.some(o=>L(r,o)))return!1}else{if(t.length!==n.axes.length)return!1;for(let r=0;r<n.axes.length;r++)if(!L(n.axes[r],t[r]))return!1}}if(n.annotations!==void 0){const t=e.annotations||{};for(const[r,o]of Object.entries(n.annotations))if(t[r]!==o)return!1}if(n.annotationPatterns!==void 0){const t=e.annotations||{};for(const[r,o]of Object.entries(n.annotationPatterns)){const i=t[r];if(i===void 0||!new RegExp(o).test(i))return!1}}return!0}function Ln(e){return Array.isArray(e)?n=>e.some(t=>b(n)&&R(n,t)):n=>b(n)&&R(n,e)}function Rn(e){const n={kind:e.kind,name:e.name};return e.domain!==void 0&&(n.domain=e.domain),b(e)&&(n.axesSpec=q(e.axesSpec)),C(n)}class w{constructor(n){A(this,"data");this.data=n}get keys(){return this.data.keys()}get keyAxesIds(){return[...this.data.keys()].map(ae)}static fromColumns(n){var r,o;const t=new Map;for(const i of n.filter(s=>!!M(s.spec,y.IsLinkerColumn))){const s=w.getAxesGroups(B(i.spec.axesSpec));if(s.length!==2)continue;const[a,u]=s,c=w.getAxesRoots(a).map(f=>{const h=k(P(f));return[m(h.map(p)),h]}),d=w.getAxesRoots(u).map(f=>{const h=k(P(f));return[m(h.map(p)),h]});for(const[f,h]of c)t.has(f)||t.set(f,{keyAxesSpec:h,linkWith:new Map});for(const[f,h]of d)t.has(f)||t.set(f,{keyAxesSpec:h,linkWith:new Map});for(const[f]of c)for(const[h]of d)(r=t.get(f))==null||r.linkWith.set(h,i),(o=t.get(h))==null||o.linkWith.set(f,i)}return new this(t)}searchAvailableAxesKeys(n){const t=new Set(n),r=new Set;let o=n;for(;o.length;){const i=[];for(const s of o){const a=this.data.get(s);if(a)for(const u of a.linkWith.keys())!r.has(u)&&!t.has(u)&&(i.push(u),r.add(u))}o=i}return r}searchLinkerPath(n,t){const r={};let o=new Set([n]);const i=new Set([n]);for(;o.size;){const s=new Set;for(const a of o){const u=this.data.get(a);if(u)for(const c of u.linkWith.keys())if(r[c]=a,c===t){const d=[];let f=t;for(;r[f]!==n;)d.push(f),f=r[f];return d.push(f),d.map(h=>this.data.get(h).linkWith.get(r[h]))}else i.has(c)||(s.add(c),i.add(c))}o=s}return[]}getLinkerColumnsForAxes({from:n,to:t,throwWhenNoLinkExists:r=!0}){const o=n.map(w.getLinkerKeyFromAxisSpec);return Array.from(new Map(w.getAxesRoots(t).map(w.getLinkerKeyFromAxisSpec).flatMap(i=>{const s=o.map(a=>this.searchLinkerPath(a,i)).reduce((a,u)=>a.length&&a.length<u.length||!u.length?a:u,[]).map(a=>[a.columnId,a]);if(!s.length&&r)throw Error(`Unable to find linker column for ${i}`);return s})).values())}getAxesListFromKeysList(n){return Array.from(new Map(n.flatMap(t=>{var r;return((r=this.data.get(t))==null?void 0:r.keyAxesSpec)??[]}).map(t=>[m(p(t)),t])).values())}getNonLinkableAxes(n,t){const r=n.map(w.getLinkerKeyFromAxisSpec),o=t.map(w.getLinkerKeyFromAxisSpec);return Array.from(new Map(t.filter((s,a)=>{const u=o[a];return!r.some(c=>this.searchLinkerPath(c,u).length)}).flatMap(s=>k(P(s)).map(a=>[m(p(a)),a]))).values())}getReachableByLinkersAxesFromAxes(n){const t=n.map(w.getLinkerKeyFromAxisSpec),r=this.searchAvailableAxesKeys(t);return this.getAxesListFromKeysList([...r])}static getLinkerKeyFromAxisSpec(n){return m(k(P(n)).map(p))}static getAxesGroups(n){switch(n.length){case 0:return[];case 1:return[[n[0]]]}const t=n.map(u=>m(p(u))),r=n.map(u=>new Set(u.parentAxesSpec.map(c=>m(p(c))).map(c=>{const d=t.indexOf(c);if(d===-1)throw new Error(`malformed axesSpec: ${JSON.stringify(n)}, unable to locate parent ${c}`);return d}))),o=[...n.keys()],i=[],s=new Set;let a=o.find(u=>!s.has(u));for(;a!==void 0;){const u=[a];s.add(a);let c=[a];for(;c.length;){const d=new Set;for(const f of c){const h=r[f];o.forEach(v=>{if(v===f||s.has(v))return;(r[v].has(f)||h.has(v))&&(u.push(v),d.add(v),s.add(v))})}c=[...d]}i.push([...u]),a=o.find(d=>!s.has(d))}return i.map(u=>u.map(c=>n[c]))}static getAxesRoots(n){const t=new Set(n.flatMap(r=>r.parentAxesSpec).map(r=>m(p(r))));return n.filter(r=>!t.has(m(p(r))))}}const Nn={href:"/"},jn=l.z.object({__isRef:l.z.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:l.z.string().describe("Upstream block id"),name:l.z.string().describe("Name of the output provided to the upstream block's output context"),requireEnrichments:l.z.literal(!0).optional().describe("True if current block that stores this reference in its args, may need enrichments for the references value originating from the blocks in between current and referenced block")}).describe("Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees.").readonly();function Vn(e){return typeof e=="object"&&e!==null&&"__isRef"in e&&e.__isRef===!0&&"blockId"in e&&"name"in e}function $n(e,n,t=!1){return t?{__isRef:!0,blockId:e,name:n,requireEnrichments:!0}:{__isRef:!0,blockId:e,name:n}}function Kn(e,n=!0){if(n)return{...e,requireEnrichments:!0};{const{requireEnrichments:t,...r}=e;return r}}function Mn(e,n,t=!1){return e.blockId===n.blockId&&e.name===n.name&&(t||e.requireEnrichments===n.requireEnrichments)}function Bn(e,n){return e.ok?{ok:!0,value:n(e.value)}:e}function qn(e){if(e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray)return new DataView(e.buffer,e.byteOffset,e.byteLength);if(e instanceof ArrayBuffer)return new DataView(e);throw new TypeError("Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray")}const Un="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",Wn="0123456789ABCDEFGHIJKLMNOPQRSTUV",Hn="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function ye(e,n,t){t=t||{};let r,o;switch(n){case"RFC3548":case"RFC4648":r=Un,o=!0;break;case"RFC4648-HEX":r=Wn,o=!0;break;case"Crockford":r=Hn,o=!1;break;default:throw new Error("Unknown base32 variant: "+String(n))}const i=t.padding!==void 0?t.padding:o,s=qn(e);let a=0,u=0,c="";for(let d=0;d<s.byteLength;d++)for(u=u<<8|s.getUint8(d),a+=8;a>=5;)c+=r[u>>>a-5&31],a-=5;if(a>0&&(c+=r[u<<5-a&31]),i)for(;c.length%8!==0;)c+="=";return c}const W=15,ge=24,H=l.z.string().length(ge).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");function _n(){const e=new Uint8Array(W);return crypto.getRandomValues(e),H.parse(ye(e,"RFC4648"))}function Ae(e){if(e.length!==W)throw new Error(`Wrong number of bytes: ${e.length}`);return H.parse(ye(e,"RFC4648"))}async function Gn(e){const n=new TextEncoder,t=await crypto.subtle.digest("SHA-256",n.encode(e));return Ae(new Uint8Array(t.slice(0,15)))}const Qn=["supportsLazyState"],Xn=["requiresUIAPIVersion","requiresModelAPIVersion"];function Yn(e,n,t=!0){return e===void 0?!1:e[n]===t}function Zn(e){return e===void 0?new Set:new Set(Object.entries(e).filter(([n,t])=>n.startsWith("requires")&&t===!0).map(([n])=>n))}function et(e){return e===void 0?new Set:new Set(Object.entries(e).filter(([n,t])=>n.startsWith("supports")&&t===!0).map(([n])=>n))}class be extends Error{constructor(t){super(`Some of the block requirements are not supported by the runtime: ${Array.from(t.entries()).map(([r,o])=>`${r}: ${o}`).join(", ")}`);A(this,"name","IncompatibleFlagsError");this.incompatibleFlags=t}}class nt{constructor(){A(this,"supportedRequirements",new Map)}addSupportedRequirement(n,t=!0){return this.supportedRequirements.has(n)||this.supportedRequirements.set(n,new Set),this.supportedRequirements.get(n).add(t),this}getIncompatibleFlags(n){if(n===void 0)return;const t=new Map;for(const[r,o]of Object.entries(n))if(r.startsWith("requires")){if(o===void 0)continue;const i=this.supportedRequirements.get(r);(i===void 0||!i.has(o))&&t.set(r,o)}return t.size===0?void 0:t}checkCompatibility(n){return this.getIncompatibleFlags(n)===void 0}throwIfIncompatible(n){const t=this.getIncompatibleFlags(n);if(t!==void 0)throw new be(t)}}exports.AbortError=Ve;exports.AllRequiresFeatureFlags=Xn;exports.AllSupportsFeatureFlags=Qn;exports.AnchoredIdDeriver=kn;exports.Annotation=y;exports.AnnotationJson=K;exports.AxisSpec=se;exports.DefaultNavigationState=Nn;exports.Domain=Ye;exports.DomainJson=$;exports.IncompatibleFlagsError=be;exports.LinkerMap=w;exports.PColumnName=ln;exports.PFrameDriverError=qe;exports.PFrameError=re;exports.PTableAbsent=de;exports.PTableNA=U;exports.PlId=H;exports.PlIdBytes=W;exports.PlIdLength=ge;exports.PlRef=jn;exports.RangeBytes=Ee;exports.RuntimeCapabilities=nt;exports.UiError=$e;exports.ValueType=g;exports.canonicalizeAxisId=pn;exports.canonicalizeAxisWithParents=z;exports.canonicalizeJson=m;exports.checkBlockFlag=Yn;exports.createPlRef=$n;exports.dataInfoToEntries=Re;exports.deriveNativeId=Rn;exports.deserializeError=D;exports.deserializeResult=_e;exports.digestPlId=Gn;exports.ensureError=I;exports.ensurePColumn=Dn;exports.entriesToDataInfo=Ne;exports.executePSpecPredicate=F;exports.extractAllColumns=Tn;exports.extractAllRequirements=Zn;exports.extractAllSupports=et;exports.extractCodeWithInfo=xe;exports.extractConfigGeneric=Pe;exports.getArrayFromAxisTree=k;exports.getAxesId=q;exports.getAxesTree=P;exports.getAxisId=p;exports.getColumnIdAndSpec=fn;exports.getDenormalizedAxesList=cn;exports.getFileNameFromHandle=De;exports.getFilePathFromHandle=ee;exports.getNormalizedAxesList=B;exports.getPColumnSpecId=dn;exports.getPTableColumnId=xn;exports.getSetFromAxisTree=on;exports.hasAbortError=te;exports.isAbortError=Ke;exports.isAggregateError=Me;exports.isBlockUIURL=Se;exports.isDataInfo=Je;exports.isDataInfoEntries=ne;exports.isFilteredPColumn=Fn;exports.isFolderURL=ke;exports.isImportFileHandleIndex=Z;exports.isImportFileHandleUpload=Y;exports.isLiveLog=Oe;exports.isPColumn=he;exports.isPColumnResult=Cn;exports.isPColumnSpec=b;exports.isPColumnSpecResult=On;exports.isPFrameDriverError=Ue;exports.isPFrameError=Be;exports.isPTableAbsent=gn;exports.isPTableNA=fe;exports.isPTableValueAxis=An;exports.isPartitionedDataInfoEntries=Le;exports.isPlRef=Vn;exports.mapDataInfo=Te;exports.mapDataInfoEntries=je;exports.mapJoinEntry=S;exports.mapPObjectData=Jn;exports.mapPTableDef=vn;exports.mapValueInVOE=Bn;exports.matchAxis=L;exports.matchAxisId=ce;exports.matchPColumn=R;exports.newRangeBytesOpt=Ie;exports.pTableValue=bn;exports.pTableValueBranded=wn;exports.parseColumnId=Pn;exports.parseJson=ae;exports.plId=Ae;exports.plRefsEqual=Mn;exports.readAnnotation=tn;exports.readAnnotationJson=M;exports.readAnnotationJsonOrThrow=rn;exports.readDomain=Ze;exports.readDomainJson=nn;exports.readDomainJsonOrThrow=en;exports.readMetadata=J;exports.readMetadataJson=V;exports.readMetadataJsonOrThrow=T;exports.resolveAnchors=Sn;exports.selectorsToPredicate=Ln;exports.serializeError=N;exports.serializeResult=j;exports.stringifyColumnId=me;exports.stringifyJson=Xe;exports.uniquePlId=_n;exports.unwrapResult=He;exports.validateRangeBytes=Fe;exports.visitDataInfo=ze;exports.withEnrichments=Kn;exports.wrapAndSerialize=Ge;exports.wrapAndSerializeAsync=Qe;exports.wrapAsyncCallback=ie;exports.wrapCallback=oe;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|