@loaders.gl/schema 3.4.14 → 3.4.15
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/es5/bundle.js +1 -1
- package/dist/es5/bundle.js.map +1 -1
- package/dist/es5/category/mesh/convert-mesh.js +2 -7
- package/dist/es5/category/mesh/convert-mesh.js.map +1 -1
- package/dist/es5/category/mesh/deduce-mesh-schema.js +8 -8
- package/dist/es5/category/mesh/deduce-mesh-schema.js.map +1 -1
- package/dist/es5/category/mesh/mesh-to-arrow-table.js +17 -16
- package/dist/es5/category/mesh/mesh-to-arrow-table.js.map +1 -1
- package/dist/es5/category/mesh/mesh-utils.js +15 -15
- package/dist/es5/category/mesh/mesh-utils.js.map +1 -1
- package/dist/es5/category/table/deduce-table-schema.js +9 -9
- package/dist/es5/category/table/deduce-table-schema.js.map +1 -1
- package/dist/es5/index.js +51 -51
- package/dist/es5/lib/arrow/get-type-info.js +3 -3
- package/dist/es5/lib/arrow/get-type-info.js.map +1 -1
- package/dist/es5/lib/batches/base-table-batch-aggregator.js +38 -51
- package/dist/es5/lib/batches/base-table-batch-aggregator.js.map +1 -1
- package/dist/es5/lib/batches/columnar-table-batch-aggregator.js +60 -81
- package/dist/es5/lib/batches/columnar-table-batch-aggregator.js.map +1 -1
- package/dist/es5/lib/batches/row-table-batch-aggregator.js +53 -66
- package/dist/es5/lib/batches/row-table-batch-aggregator.js.map +1 -1
- package/dist/es5/lib/batches/table-batch-builder.js +101 -127
- package/dist/es5/lib/batches/table-batch-builder.js.map +1 -1
- package/dist/es5/lib/schema/impl/enum.js +1 -1
- package/dist/es5/lib/schema/impl/field.js +17 -30
- package/dist/es5/lib/schema/impl/field.js.map +1 -1
- package/dist/es5/lib/schema/impl/schema.js +55 -105
- package/dist/es5/lib/schema/impl/schema.js.map +1 -1
- package/dist/es5/lib/schema/impl/type.js +375 -675
- package/dist/es5/lib/schema/impl/type.js.map +1 -1
- package/dist/es5/lib/schema/schema.js +37 -37
- package/dist/es5/lib/utils/async-queue.js +72 -138
- package/dist/es5/lib/utils/async-queue.js.map +1 -1
- package/dist/es5/lib/utils/row-utils.js +4 -4
- package/dist/es5/lib/utils/row-utils.js.map +1 -1
- package/package.json +2 -2
package/dist/es5/bundle.js
CHANGED
package/dist/es5/bundle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.js","names":["moduleExports","require","globalThis","loaders","module","exports","Object","assign"],"sources":["../../src/bundle.ts"],"sourcesContent":["// @ts-nocheck\nconst moduleExports = require('./index');\nglobalThis.loaders = globalThis.loaders || {};\nmodule.exports = Object.assign(globalThis.loaders, moduleExports);\n"],"mappings":";;AACA,
|
|
1
|
+
{"version":3,"file":"bundle.js","names":["moduleExports","require","globalThis","loaders","module","exports","Object","assign"],"sources":["../../src/bundle.ts"],"sourcesContent":["// @ts-nocheck\nconst moduleExports = require('./index');\nglobalThis.loaders = globalThis.loaders || {};\nmodule.exports = Object.assign(globalThis.loaders, moduleExports);\n"],"mappings":";;AACA,MAAMA,aAAa,GAAGC,OAAO,CAAC,SAAS,CAAC;AACxCC,UAAU,CAACC,OAAO,GAAGD,UAAU,CAACC,OAAO,IAAI,CAAC,CAAC;AAC7CC,MAAM,CAACC,OAAO,GAAGC,MAAM,CAACC,MAAM,CAACL,UAAU,CAACC,OAAO,EAAEH,aAAa,CAAC"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.convertMesh = convertMesh;
|
|
8
7
|
exports.convertMeshToColumnarTable = convertMeshToColumnarTable;
|
|
9
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
8
|
var _meshToArrowTable = require("./mesh-to-arrow-table");
|
|
11
9
|
function convertMesh(mesh, shape, options) {
|
|
12
10
|
switch (shape || 'mesh') {
|
|
@@ -24,11 +22,8 @@ function convertMesh(mesh, shape, options) {
|
|
|
24
22
|
}
|
|
25
23
|
}
|
|
26
24
|
function convertMeshToColumnarTable(mesh) {
|
|
27
|
-
|
|
28
|
-
for (
|
|
29
|
-
var _Object$entries$_i = (0, _slicedToArray2.default)(_Object$entries[_i], 2),
|
|
30
|
-
columnName = _Object$entries$_i[0],
|
|
31
|
-
attribute = _Object$entries$_i[1];
|
|
25
|
+
const columns = {};
|
|
26
|
+
for (const [columnName, attribute] of Object.entries(mesh.attributes)) {
|
|
32
27
|
columns[columnName] = attribute.value;
|
|
33
28
|
}
|
|
34
29
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert-mesh.js","names":["_meshToArrowTable","require","convertMesh","mesh","shape","options","convertMeshToColumnarTable","data","convertMeshToArrowTable","Error","concat","columns","
|
|
1
|
+
{"version":3,"file":"convert-mesh.js","names":["_meshToArrowTable","require","convertMesh","mesh","shape","options","convertMeshToColumnarTable","data","convertMeshToArrowTable","Error","concat","columns","columnName","attribute","Object","entries","attributes","value","schema"],"sources":["../../../../src/category/mesh/convert-mesh.ts"],"sourcesContent":["import type {Mesh} from './mesh-types';\nimport type {ColumnarTable, ArrowTable} from '../table/table-types';\nimport {convertMeshToArrowTable} from './mesh-to-arrow-table';\n\ntype TargetShape = 'mesh' | 'columnar-table' | 'arrow-table';\n\n/**\n * Convert a mesh to a specific shape\n */\nexport function convertMesh(\n mesh: Mesh,\n shape: TargetShape,\n options?: any\n): Mesh | ColumnarTable | ArrowTable {\n switch (shape || 'mesh') {\n case 'mesh':\n return mesh;\n case 'columnar-table':\n return convertMeshToColumnarTable(mesh);\n case 'arrow-table':\n return {\n shape: 'arrow-table',\n data: convertMeshToArrowTable(mesh)\n };\n default:\n throw new Error(`Unsupported shape ${options?.shape}`);\n }\n}\n\n/**\n * Convert a loaders.gl Mesh to a Columnar Table\n * @param mesh\n * @returns\n */\nexport function convertMeshToColumnarTable(mesh: Mesh): ColumnarTable {\n const columns = {};\n\n for (const [columnName, attribute] of Object.entries(mesh.attributes)) {\n columns[columnName] = attribute.value;\n }\n\n return {\n shape: 'columnar-table',\n schema: mesh.schema,\n data: columns\n };\n}\n"],"mappings":";;;;;;;AAEA,IAAAA,iBAAA,GAAAC,OAAA;AAOO,SAASC,WAAWA,CACzBC,IAAU,EACVC,KAAkB,EAClBC,OAAa,EACsB;EACnC,QAAQD,KAAK,IAAI,MAAM;IACrB,KAAK,MAAM;MACT,OAAOD,IAAI;IACb,KAAK,gBAAgB;MACnB,OAAOG,0BAA0B,CAACH,IAAI,CAAC;IACzC,KAAK,aAAa;MAChB,OAAO;QACLC,KAAK,EAAE,aAAa;QACpBG,IAAI,EAAE,IAAAC,yCAAuB,EAACL,IAAI;MACpC,CAAC;IACH;MACE,MAAM,IAAIM,KAAK,sBAAAC,MAAA,CAAsBL,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAED,KAAK,CAAE,CAAC;EAC1D;AACF;AAOO,SAASE,0BAA0BA,CAACH,IAAU,EAAiB;EACpE,MAAMQ,OAAO,GAAG,CAAC,CAAC;EAElB,KAAK,MAAM,CAACC,UAAU,EAAEC,SAAS,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACZ,IAAI,CAACa,UAAU,CAAC,EAAE;IACrEL,OAAO,CAACC,UAAU,CAAC,GAAGC,SAAS,CAACI,KAAK;EACvC;EAEA,OAAO;IACLb,KAAK,EAAE,gBAAgB;IACvBc,MAAM,EAAEf,IAAI,CAACe,MAAM;IACnBX,IAAI,EAAEI;EACR,CAAC;AACH"}
|
|
@@ -9,25 +9,25 @@ exports.makeMeshAttributeMetadata = makeMeshAttributeMetadata;
|
|
|
9
9
|
var _schema = require("../../lib/schema/schema");
|
|
10
10
|
var _arrowLikeTypeUtils = require("../../lib/arrow/arrow-like-type-utils");
|
|
11
11
|
function deduceMeshSchema(attributes, metadata) {
|
|
12
|
-
|
|
12
|
+
const fields = deduceMeshFields(attributes);
|
|
13
13
|
return new _schema.Schema(fields, metadata);
|
|
14
14
|
}
|
|
15
15
|
function deduceMeshField(attributeName, attribute, optionalMetadata) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
const type = (0, _arrowLikeTypeUtils.getArrowTypeFromTypedArray)(attribute.value);
|
|
17
|
+
const metadata = optionalMetadata ? optionalMetadata : makeMeshAttributeMetadata(attribute);
|
|
18
|
+
const field = new _schema.Field(attributeName, new _schema.FixedSizeList(attribute.size, new _schema.Field('value', type)), false, metadata);
|
|
19
19
|
return field;
|
|
20
20
|
}
|
|
21
21
|
function deduceMeshFields(attributes) {
|
|
22
|
-
|
|
23
|
-
for (
|
|
24
|
-
|
|
22
|
+
const fields = [];
|
|
23
|
+
for (const attributeName in attributes) {
|
|
24
|
+
const attribute = attributes[attributeName];
|
|
25
25
|
fields.push(deduceMeshField(attributeName, attribute));
|
|
26
26
|
}
|
|
27
27
|
return fields;
|
|
28
28
|
}
|
|
29
29
|
function makeMeshAttributeMetadata(attribute) {
|
|
30
|
-
|
|
30
|
+
const result = new Map();
|
|
31
31
|
if ('byteOffset' in attribute) {
|
|
32
32
|
result.set('byteOffset', attribute.byteOffset.toString(10));
|
|
33
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deduce-mesh-schema.js","names":["_schema","require","_arrowLikeTypeUtils","deduceMeshSchema","attributes","metadata","fields","deduceMeshFields","Schema","deduceMeshField","attributeName","attribute","optionalMetadata","type","getArrowTypeFromTypedArray","value","makeMeshAttributeMetadata","field","Field","FixedSizeList","size","push","result","Map","set","byteOffset","toString","byteStride","normalized"],"sources":["../../../../src/category/mesh/deduce-mesh-schema.ts"],"sourcesContent":["import {MeshAttribute, MeshAttributes} from './mesh-types';\nimport {Schema, Field, FixedSizeList} from '../../lib/schema/schema';\nimport {getArrowTypeFromTypedArray} from '../../lib/arrow/arrow-like-type-utils';\n\n/**\n * Create a schema for mesh attributes data\n * @param attributes\n * @param metadata\n * @returns\n */\nexport function deduceMeshSchema(\n attributes: MeshAttributes,\n metadata?: Map<string, string>\n): Schema {\n const fields = deduceMeshFields(attributes);\n return new Schema(fields, metadata);\n}\n\n/**\n * Create arrow-like schema field for mesh attribute\n * @param attributeName\n * @param attribute\n * @param optionalMetadata\n * @returns\n */\nexport function deduceMeshField(\n attributeName: string,\n attribute: MeshAttribute,\n optionalMetadata?: Map<string, string>\n): Field {\n const type = getArrowTypeFromTypedArray(attribute.value);\n const metadata = optionalMetadata ? optionalMetadata : makeMeshAttributeMetadata(attribute);\n const field = new Field(\n attributeName,\n new FixedSizeList(attribute.size, new Field('value', type)),\n false,\n metadata\n );\n return field;\n}\n\n/**\n * Create fields array for mesh attributes\n * @param attributes\n * @returns\n */\nfunction deduceMeshFields(attributes: MeshAttributes): Field[] {\n const fields: Field[] = [];\n for (const attributeName in attributes) {\n const attribute: MeshAttribute = attributes[attributeName];\n fields.push(deduceMeshField(attributeName, attribute));\n }\n return fields;\n}\n\n/**\n * Make metadata by mesh attribute properties\n * @param attribute\n * @returns\n */\nexport function makeMeshAttributeMetadata(attribute: MeshAttribute): Map<string, string> {\n const result = new Map();\n if ('byteOffset' in attribute) {\n result.set('byteOffset', attribute.byteOffset!.toString(10));\n }\n if ('byteStride' in attribute) {\n result.set('byteStride', attribute.byteStride!.toString(10));\n }\n if ('normalized' in attribute) {\n result.set('normalized', attribute.normalized!.toString());\n }\n return result;\n}\n"],"mappings":";;;;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AAQO,SAASE,gBAAgBA,CAC9BC,UAA0B,EAC1BC,QAA8B,EACtB;EACR,
|
|
1
|
+
{"version":3,"file":"deduce-mesh-schema.js","names":["_schema","require","_arrowLikeTypeUtils","deduceMeshSchema","attributes","metadata","fields","deduceMeshFields","Schema","deduceMeshField","attributeName","attribute","optionalMetadata","type","getArrowTypeFromTypedArray","value","makeMeshAttributeMetadata","field","Field","FixedSizeList","size","push","result","Map","set","byteOffset","toString","byteStride","normalized"],"sources":["../../../../src/category/mesh/deduce-mesh-schema.ts"],"sourcesContent":["import {MeshAttribute, MeshAttributes} from './mesh-types';\nimport {Schema, Field, FixedSizeList} from '../../lib/schema/schema';\nimport {getArrowTypeFromTypedArray} from '../../lib/arrow/arrow-like-type-utils';\n\n/**\n * Create a schema for mesh attributes data\n * @param attributes\n * @param metadata\n * @returns\n */\nexport function deduceMeshSchema(\n attributes: MeshAttributes,\n metadata?: Map<string, string>\n): Schema {\n const fields = deduceMeshFields(attributes);\n return new Schema(fields, metadata);\n}\n\n/**\n * Create arrow-like schema field for mesh attribute\n * @param attributeName\n * @param attribute\n * @param optionalMetadata\n * @returns\n */\nexport function deduceMeshField(\n attributeName: string,\n attribute: MeshAttribute,\n optionalMetadata?: Map<string, string>\n): Field {\n const type = getArrowTypeFromTypedArray(attribute.value);\n const metadata = optionalMetadata ? optionalMetadata : makeMeshAttributeMetadata(attribute);\n const field = new Field(\n attributeName,\n new FixedSizeList(attribute.size, new Field('value', type)),\n false,\n metadata\n );\n return field;\n}\n\n/**\n * Create fields array for mesh attributes\n * @param attributes\n * @returns\n */\nfunction deduceMeshFields(attributes: MeshAttributes): Field[] {\n const fields: Field[] = [];\n for (const attributeName in attributes) {\n const attribute: MeshAttribute = attributes[attributeName];\n fields.push(deduceMeshField(attributeName, attribute));\n }\n return fields;\n}\n\n/**\n * Make metadata by mesh attribute properties\n * @param attribute\n * @returns\n */\nexport function makeMeshAttributeMetadata(attribute: MeshAttribute): Map<string, string> {\n const result = new Map();\n if ('byteOffset' in attribute) {\n result.set('byteOffset', attribute.byteOffset!.toString(10));\n }\n if ('byteStride' in attribute) {\n result.set('byteStride', attribute.byteStride!.toString(10));\n }\n if ('normalized' in attribute) {\n result.set('normalized', attribute.normalized!.toString());\n }\n return result;\n}\n"],"mappings":";;;;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AAQO,SAASE,gBAAgBA,CAC9BC,UAA0B,EAC1BC,QAA8B,EACtB;EACR,MAAMC,MAAM,GAAGC,gBAAgB,CAACH,UAAU,CAAC;EAC3C,OAAO,IAAII,cAAM,CAACF,MAAM,EAAED,QAAQ,CAAC;AACrC;AASO,SAASI,eAAeA,CAC7BC,aAAqB,EACrBC,SAAwB,EACxBC,gBAAsC,EAC/B;EACP,MAAMC,IAAI,GAAG,IAAAC,8CAA0B,EAACH,SAAS,CAACI,KAAK,CAAC;EACxD,MAAMV,QAAQ,GAAGO,gBAAgB,GAAGA,gBAAgB,GAAGI,yBAAyB,CAACL,SAAS,CAAC;EAC3F,MAAMM,KAAK,GAAG,IAAIC,aAAK,CACrBR,aAAa,EACb,IAAIS,qBAAa,CAACR,SAAS,CAACS,IAAI,EAAE,IAAIF,aAAK,CAAC,OAAO,EAAEL,IAAI,CAAC,CAAC,EAC3D,KAAK,EACLR,QACF,CAAC;EACD,OAAOY,KAAK;AACd;AAOA,SAASV,gBAAgBA,CAACH,UAA0B,EAAW;EAC7D,MAAME,MAAe,GAAG,EAAE;EAC1B,KAAK,MAAMI,aAAa,IAAIN,UAAU,EAAE;IACtC,MAAMO,SAAwB,GAAGP,UAAU,CAACM,aAAa,CAAC;IAC1DJ,MAAM,CAACe,IAAI,CAACZ,eAAe,CAACC,aAAa,EAAEC,SAAS,CAAC,CAAC;EACxD;EACA,OAAOL,MAAM;AACf;AAOO,SAASU,yBAAyBA,CAACL,SAAwB,EAAuB;EACvF,MAAMW,MAAM,GAAG,IAAIC,GAAG,CAAC,CAAC;EACxB,IAAI,YAAY,IAAIZ,SAAS,EAAE;IAC7BW,MAAM,CAACE,GAAG,CAAC,YAAY,EAAEb,SAAS,CAACc,UAAU,CAAEC,QAAQ,CAAC,EAAE,CAAC,CAAC;EAC9D;EACA,IAAI,YAAY,IAAIf,SAAS,EAAE;IAC7BW,MAAM,CAACE,GAAG,CAAC,YAAY,EAAEb,SAAS,CAACgB,UAAU,CAAED,QAAQ,CAAC,EAAE,CAAC,CAAC;EAC9D;EACA,IAAI,YAAY,IAAIf,SAAS,EAAE;IAC7BW,MAAM,CAACE,GAAG,CAAC,YAAY,EAAEb,SAAS,CAACiB,UAAU,CAAEF,QAAQ,CAAC,CAAC,CAAC;EAC5D;EACA,OAAOJ,MAAM;AACf"}
|
|
@@ -9,25 +9,26 @@ var _arrowTypeUtils = require("../../lib/arrow/arrow-type-utils");
|
|
|
9
9
|
var _deduceMeshSchema = require("./deduce-mesh-schema");
|
|
10
10
|
function convertMeshToArrowTable(mesh, batchSize) {
|
|
11
11
|
var _mesh$schema;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
for (
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
size =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
const vectors = [];
|
|
13
|
+
const fields = [];
|
|
14
|
+
for (const attributeKey in mesh.attributes) {
|
|
15
|
+
const attribute = mesh.attributes[attributeKey];
|
|
16
|
+
const {
|
|
17
|
+
value,
|
|
18
|
+
size = 1
|
|
19
|
+
} = attribute;
|
|
20
|
+
const type = (0, _arrowTypeUtils.getArrowType)(value);
|
|
21
|
+
const vector = (0, _arrowTypeUtils.getArrowVector)(value);
|
|
22
|
+
const listType = new _Arrow.FixedSizeList(size, new _Arrow.Field('value', type));
|
|
23
|
+
const field = new _Arrow.Field(attributeKey, listType, false, (0, _deduceMeshSchema.makeMeshAttributeMetadata)(attribute));
|
|
24
|
+
const data = new _Arrow.Data(listType, 0, value.length / size, 0, undefined, [vector]);
|
|
25
|
+
const listVector = new _Arrow.FixedSizeListVector(data);
|
|
25
26
|
vectors.push(listVector);
|
|
26
27
|
fields.push(field);
|
|
27
28
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
const schema = new _Arrow.Schema(fields, (mesh === null || mesh === void 0 ? void 0 : (_mesh$schema = mesh.schema) === null || _mesh$schema === void 0 ? void 0 : _mesh$schema.metadata) || new Map());
|
|
30
|
+
const recordBatch = new _Arrow.RecordBatch(schema, vectors[0].length, vectors);
|
|
31
|
+
const table = new _Arrow.Table(schema, recordBatch);
|
|
31
32
|
return table;
|
|
32
33
|
}
|
|
33
34
|
//# sourceMappingURL=mesh-to-arrow-table.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mesh-to-arrow-table.js","names":["_Arrow","require","_arrowTypeUtils","_deduceMeshSchema","convertMeshToArrowTable","mesh","batchSize","_mesh$schema","vectors","fields","attributeKey","attributes","attribute","value","
|
|
1
|
+
{"version":3,"file":"mesh-to-arrow-table.js","names":["_Arrow","require","_arrowTypeUtils","_deduceMeshSchema","convertMeshToArrowTable","mesh","batchSize","_mesh$schema","vectors","fields","attributeKey","attributes","attribute","value","size","type","getArrowType","vector","getArrowVector","listType","FixedSizeList","Field","field","makeMeshAttributeMetadata","data","Data","length","undefined","listVector","FixedSizeListVector","push","schema","Schema","metadata","Map","recordBatch","RecordBatch","table","Table"],"sources":["../../../../src/category/mesh/mesh-to-arrow-table.ts"],"sourcesContent":["import {\n Table,\n Schema,\n RecordBatch,\n FixedSizeList,\n Field,\n Data,\n FixedSizeListVector\n} from 'apache-arrow/Arrow.dom';\nimport {AbstractVector} from 'apache-arrow/vector';\nimport {getArrowType, getArrowVector} from '../../lib/arrow/arrow-type-utils';\nimport type {Mesh} from './mesh-types';\nimport {makeMeshAttributeMetadata} from './deduce-mesh-schema';\n\n/**\n * * Convert a loaders.gl Mesh to an Apache Arrow Table\n * @param mesh\n * @param metadata\n * @param batchSize\n * @returns\n */\nexport function convertMeshToArrowTable(mesh: Mesh, batchSize?: number): Table {\n const vectors: AbstractVector[] = [];\n const fields: Field[] = [];\n for (const attributeKey in mesh.attributes) {\n const attribute = mesh.attributes[attributeKey];\n const {value, size = 1} = attribute;\n const type = getArrowType(value);\n const vector = getArrowVector(value);\n const listType = new FixedSizeList(size, new Field('value', type));\n const field = new Field(attributeKey, listType, false, makeMeshAttributeMetadata(attribute));\n const data = new Data(listType, 0, value.length / size, 0, undefined, [vector]);\n const listVector = new FixedSizeListVector(data);\n vectors.push(listVector);\n fields.push(field);\n }\n const schema = new Schema(fields, mesh?.schema?.metadata || new Map<string, string>());\n const recordBatch = new RecordBatch(schema, vectors[0].length, vectors);\n const table = new Table(schema, recordBatch);\n return table;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAUA,IAAAC,eAAA,GAAAD,OAAA;AAEA,IAAAE,iBAAA,GAAAF,OAAA;AASO,SAASG,uBAAuBA,CAACC,IAAU,EAAEC,SAAkB,EAAS;EAAA,IAAAC,YAAA;EAC7E,MAAMC,OAAyB,GAAG,EAAE;EACpC,MAAMC,MAAe,GAAG,EAAE;EAC1B,KAAK,MAAMC,YAAY,IAAIL,IAAI,CAACM,UAAU,EAAE;IAC1C,MAAMC,SAAS,GAAGP,IAAI,CAACM,UAAU,CAACD,YAAY,CAAC;IAC/C,MAAM;MAACG,KAAK;MAAEC,IAAI,GAAG;IAAC,CAAC,GAAGF,SAAS;IACnC,MAAMG,IAAI,GAAG,IAAAC,4BAAY,EAACH,KAAK,CAAC;IAChC,MAAMI,MAAM,GAAG,IAAAC,8BAAc,EAACL,KAAK,CAAC;IACpC,MAAMM,QAAQ,GAAG,IAAIC,oBAAa,CAACN,IAAI,EAAE,IAAIO,YAAK,CAAC,OAAO,EAAEN,IAAI,CAAC,CAAC;IAClE,MAAMO,KAAK,GAAG,IAAID,YAAK,CAACX,YAAY,EAAES,QAAQ,EAAE,KAAK,EAAE,IAAAI,2CAAyB,EAACX,SAAS,CAAC,CAAC;IAC5F,MAAMY,IAAI,GAAG,IAAIC,WAAI,CAACN,QAAQ,EAAE,CAAC,EAAEN,KAAK,CAACa,MAAM,GAAGZ,IAAI,EAAE,CAAC,EAAEa,SAAS,EAAE,CAACV,MAAM,CAAC,CAAC;IAC/E,MAAMW,UAAU,GAAG,IAAIC,0BAAmB,CAACL,IAAI,CAAC;IAChDhB,OAAO,CAACsB,IAAI,CAACF,UAAU,CAAC;IACxBnB,MAAM,CAACqB,IAAI,CAACR,KAAK,CAAC;EACpB;EACA,MAAMS,MAAM,GAAG,IAAIC,aAAM,CAACvB,MAAM,EAAE,CAAAJ,IAAI,aAAJA,IAAI,wBAAAE,YAAA,GAAJF,IAAI,CAAE0B,MAAM,cAAAxB,YAAA,uBAAZA,YAAA,CAAc0B,QAAQ,KAAI,IAAIC,GAAG,CAAiB,CAAC,CAAC;EACtF,MAAMC,WAAW,GAAG,IAAIC,kBAAW,CAACL,MAAM,EAAEvB,OAAO,CAAC,CAAC,CAAC,CAACkB,MAAM,EAAElB,OAAO,CAAC;EACvE,MAAM6B,KAAK,GAAG,IAAIC,YAAK,CAACP,MAAM,EAAEI,WAAW,CAAC;EAC5C,OAAOE,KAAK;AACd"}
|
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.getMeshBoundingBox = getMeshBoundingBox;
|
|
7
7
|
exports.getMeshSize = getMeshSize;
|
|
8
8
|
function getMeshSize(attributes) {
|
|
9
|
-
|
|
10
|
-
for (
|
|
11
|
-
|
|
9
|
+
let size = 0;
|
|
10
|
+
for (const attributeName in attributes) {
|
|
11
|
+
const attribute = attributes[attributeName];
|
|
12
12
|
if (ArrayBuffer.isView(attribute)) {
|
|
13
13
|
size += attribute.byteLength * attribute.BYTES_PER_ELEMENT;
|
|
14
14
|
}
|
|
@@ -16,18 +16,18 @@ function getMeshSize(attributes) {
|
|
|
16
16
|
return size;
|
|
17
17
|
}
|
|
18
18
|
function getMeshBoundingBox(attributes) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
for (
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
let minX = Infinity;
|
|
20
|
+
let minY = Infinity;
|
|
21
|
+
let minZ = Infinity;
|
|
22
|
+
let maxX = -Infinity;
|
|
23
|
+
let maxY = -Infinity;
|
|
24
|
+
let maxZ = -Infinity;
|
|
25
|
+
const positions = attributes.POSITION ? attributes.POSITION.value : [];
|
|
26
|
+
const len = positions && positions.length;
|
|
27
|
+
for (let i = 0; i < len; i += 3) {
|
|
28
|
+
const x = positions[i];
|
|
29
|
+
const y = positions[i + 1];
|
|
30
|
+
const z = positions[i + 2];
|
|
31
31
|
minX = x < minX ? x : minX;
|
|
32
32
|
minY = y < minY ? y : minY;
|
|
33
33
|
minZ = z < minZ ? z : minZ;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mesh-utils.js","names":["getMeshSize","attributes","size","attributeName","attribute","ArrayBuffer","isView","byteLength","BYTES_PER_ELEMENT","getMeshBoundingBox","minX","Infinity","minY","minZ","maxX","maxY","maxZ","positions","POSITION","value","len","length","i","x","y","z"],"sources":["../../../../src/category/mesh/mesh-utils.ts"],"sourcesContent":["// Mesh category utilities\n// TODO - move to mesh category module, or to math.gl/geometry module\nimport {TypedArray} from '../../types';\nimport {MeshAttributes} from './mesh-types';\n\ntype TypedArrays = {[key: string]: TypedArray};\n\n/**\n * Holds an axis aligned bounding box\n * TODO - make sure AxisAlignedBoundingBox in math.gl/culling understands this format (or change this format)\n */\ntype BoundingBox = [[number, number, number], [number, number, number]];\n\n/**\n * Get number of vertices in mesh\n * @param attributes\n */\nexport function getMeshSize(attributes: TypedArrays): number {\n let size = 0;\n for (const attributeName in attributes) {\n const attribute = attributes[attributeName];\n if (ArrayBuffer.isView(attribute)) {\n // @ts-ignore DataView doesn't have BYTES_PER_ELEMENT\n size += attribute.byteLength * attribute.BYTES_PER_ELEMENT;\n }\n }\n return size;\n}\n\n/**\n * Get the (axis aligned) bounding box of a mesh\n * @param attributes\n * @returns array of two vectors representing the axis aligned bounding box\n */\n// eslint-disable-next-line complexity\nexport function getMeshBoundingBox(attributes: MeshAttributes): BoundingBox {\n let minX = Infinity;\n let minY = Infinity;\n let minZ = Infinity;\n let maxX = -Infinity;\n let maxY = -Infinity;\n let maxZ = -Infinity;\n\n const positions = attributes.POSITION ? attributes.POSITION.value : [];\n const len = positions && positions.length;\n\n for (let i = 0; i < len; i += 3) {\n const x = positions[i];\n const y = positions[i + 1];\n const z = positions[i + 2];\n\n minX = x < minX ? x : minX;\n minY = y < minY ? y : minY;\n minZ = z < minZ ? z : minZ;\n\n maxX = x > maxX ? x : maxX;\n maxY = y > maxY ? y : maxY;\n maxZ = z > maxZ ? z : maxZ;\n }\n return [\n [minX, minY, minZ],\n [maxX, maxY, maxZ]\n ];\n}\n"],"mappings":";;;;;;;AAiBO,SAASA,WAAWA,CAACC,UAAuB,EAAU;EAC3D,IAAIC,IAAI,GAAG,CAAC;EACZ,KAAK,
|
|
1
|
+
{"version":3,"file":"mesh-utils.js","names":["getMeshSize","attributes","size","attributeName","attribute","ArrayBuffer","isView","byteLength","BYTES_PER_ELEMENT","getMeshBoundingBox","minX","Infinity","minY","minZ","maxX","maxY","maxZ","positions","POSITION","value","len","length","i","x","y","z"],"sources":["../../../../src/category/mesh/mesh-utils.ts"],"sourcesContent":["// Mesh category utilities\n// TODO - move to mesh category module, or to math.gl/geometry module\nimport {TypedArray} from '../../types';\nimport {MeshAttributes} from './mesh-types';\n\ntype TypedArrays = {[key: string]: TypedArray};\n\n/**\n * Holds an axis aligned bounding box\n * TODO - make sure AxisAlignedBoundingBox in math.gl/culling understands this format (or change this format)\n */\ntype BoundingBox = [[number, number, number], [number, number, number]];\n\n/**\n * Get number of vertices in mesh\n * @param attributes\n */\nexport function getMeshSize(attributes: TypedArrays): number {\n let size = 0;\n for (const attributeName in attributes) {\n const attribute = attributes[attributeName];\n if (ArrayBuffer.isView(attribute)) {\n // @ts-ignore DataView doesn't have BYTES_PER_ELEMENT\n size += attribute.byteLength * attribute.BYTES_PER_ELEMENT;\n }\n }\n return size;\n}\n\n/**\n * Get the (axis aligned) bounding box of a mesh\n * @param attributes\n * @returns array of two vectors representing the axis aligned bounding box\n */\n// eslint-disable-next-line complexity\nexport function getMeshBoundingBox(attributes: MeshAttributes): BoundingBox {\n let minX = Infinity;\n let minY = Infinity;\n let minZ = Infinity;\n let maxX = -Infinity;\n let maxY = -Infinity;\n let maxZ = -Infinity;\n\n const positions = attributes.POSITION ? attributes.POSITION.value : [];\n const len = positions && positions.length;\n\n for (let i = 0; i < len; i += 3) {\n const x = positions[i];\n const y = positions[i + 1];\n const z = positions[i + 2];\n\n minX = x < minX ? x : minX;\n minY = y < minY ? y : minY;\n minZ = z < minZ ? z : minZ;\n\n maxX = x > maxX ? x : maxX;\n maxY = y > maxY ? y : maxY;\n maxZ = z > maxZ ? z : maxZ;\n }\n return [\n [minX, minY, minZ],\n [maxX, maxY, maxZ]\n ];\n}\n"],"mappings":";;;;;;;AAiBO,SAASA,WAAWA,CAACC,UAAuB,EAAU;EAC3D,IAAIC,IAAI,GAAG,CAAC;EACZ,KAAK,MAAMC,aAAa,IAAIF,UAAU,EAAE;IACtC,MAAMG,SAAS,GAAGH,UAAU,CAACE,aAAa,CAAC;IAC3C,IAAIE,WAAW,CAACC,MAAM,CAACF,SAAS,CAAC,EAAE;MAEjCF,IAAI,IAAIE,SAAS,CAACG,UAAU,GAAGH,SAAS,CAACI,iBAAiB;IAC5D;EACF;EACA,OAAON,IAAI;AACb;AAQO,SAASO,kBAAkBA,CAACR,UAA0B,EAAe;EAC1E,IAAIS,IAAI,GAAGC,QAAQ;EACnB,IAAIC,IAAI,GAAGD,QAAQ;EACnB,IAAIE,IAAI,GAAGF,QAAQ;EACnB,IAAIG,IAAI,GAAG,CAACH,QAAQ;EACpB,IAAII,IAAI,GAAG,CAACJ,QAAQ;EACpB,IAAIK,IAAI,GAAG,CAACL,QAAQ;EAEpB,MAAMM,SAAS,GAAGhB,UAAU,CAACiB,QAAQ,GAAGjB,UAAU,CAACiB,QAAQ,CAACC,KAAK,GAAG,EAAE;EACtE,MAAMC,GAAG,GAAGH,SAAS,IAAIA,SAAS,CAACI,MAAM;EAEzC,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,GAAG,EAAEE,CAAC,IAAI,CAAC,EAAE;IAC/B,MAAMC,CAAC,GAAGN,SAAS,CAACK,CAAC,CAAC;IACtB,MAAME,CAAC,GAAGP,SAAS,CAACK,CAAC,GAAG,CAAC,CAAC;IAC1B,MAAMG,CAAC,GAAGR,SAAS,CAACK,CAAC,GAAG,CAAC,CAAC;IAE1BZ,IAAI,GAAGa,CAAC,GAAGb,IAAI,GAAGa,CAAC,GAAGb,IAAI;IAC1BE,IAAI,GAAGY,CAAC,GAAGZ,IAAI,GAAGY,CAAC,GAAGZ,IAAI;IAC1BC,IAAI,GAAGY,CAAC,GAAGZ,IAAI,GAAGY,CAAC,GAAGZ,IAAI;IAE1BC,IAAI,GAAGS,CAAC,GAAGT,IAAI,GAAGS,CAAC,GAAGT,IAAI;IAC1BC,IAAI,GAAGS,CAAC,GAAGT,IAAI,GAAGS,CAAC,GAAGT,IAAI;IAC1BC,IAAI,GAAGS,CAAC,GAAGT,IAAI,GAAGS,CAAC,GAAGT,IAAI;EAC5B;EACA,OAAO,CACL,CAACN,IAAI,EAAEE,IAAI,EAAEC,IAAI,CAAC,EAClB,CAACC,IAAI,EAAEC,IAAI,EAAEC,IAAI,CAAC,CACnB;AACH"}
|
|
@@ -5,17 +5,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.deduceTableSchema = deduceTableSchema;
|
|
7
7
|
function deduceTableSchema(table, schema) {
|
|
8
|
-
|
|
8
|
+
const deducedSchema = Array.isArray(table) ? deduceSchemaForRowTable(table) : deduceSchemaForColumnarTable(table);
|
|
9
9
|
return Object.assign(deducedSchema, schema);
|
|
10
10
|
}
|
|
11
11
|
function deduceSchemaForColumnarTable(columnarTable) {
|
|
12
|
-
|
|
13
|
-
for (
|
|
14
|
-
|
|
12
|
+
const schema = {};
|
|
13
|
+
for (const field in columnarTable) {
|
|
14
|
+
const column = columnarTable[field];
|
|
15
15
|
if (ArrayBuffer.isView(column)) {
|
|
16
16
|
schema[field] = column.constructor;
|
|
17
17
|
} else if (column.length) {
|
|
18
|
-
|
|
18
|
+
const value = column[0];
|
|
19
19
|
schema[field] = deduceTypeFromValue(value);
|
|
20
20
|
}
|
|
21
21
|
schema[field] = schema[field] || null;
|
|
@@ -23,11 +23,11 @@ function deduceSchemaForColumnarTable(columnarTable) {
|
|
|
23
23
|
return schema;
|
|
24
24
|
}
|
|
25
25
|
function deduceSchemaForRowTable(rowTable) {
|
|
26
|
-
|
|
26
|
+
const schema = {};
|
|
27
27
|
if (rowTable.length) {
|
|
28
|
-
|
|
29
|
-
for (
|
|
30
|
-
|
|
28
|
+
const row = rowTable[0];
|
|
29
|
+
for (const field in row) {
|
|
30
|
+
const value = row[field];
|
|
31
31
|
schema[field] = deduceTypeFromValue(value);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deduce-table-schema.js","names":["deduceTableSchema","table","schema","deducedSchema","Array","isArray","deduceSchemaForRowTable","deduceSchemaForColumnarTable","Object","assign","columnarTable","field","column","ArrayBuffer","isView","constructor","length","value","deduceTypeFromValue","rowTable","row","Date","Number","Float32Array","String"],"sources":["../../../../src/category/table/deduce-table-schema.ts"],"sourcesContent":["// Type deduction\nimport {\n Schema\n // Int,\n // Int8,\n // Int16,\n // Int32,\n // Uint8,\n // Uint16,\n // Uint32,\n // Float32,\n // Float64\n // Bool,\n // Utf8,\n // TimestampMillisecond,\n // Null\n} from '../../lib/schema/schema';\n\n// const TYPED_ARRAY_TO_TYPE = {\n// Int8Array: new Int8(),\n// Int16Array: new Int16(),\n// Int32Array: new Int32(),\n// Uint8Array: new Uint8(),\n// Uint8ClampedArray: new Uint8(),\n// Uint16Array: new Uint16(),\n// Uint32Array: new Uint32(),\n// Float32Array: new Float32(),\n// Float64Array: new Float64()\n// };\n\n// if (typeof BigInt64Array !== 'undefined') {\n// TYPED_ARRAY_TO_TYPE.BigInt64Array = new Int64();\n// TYPED_ARRAY_TO_TYPE.BigUint64Array = new Uint64();\n// }\n\n/**\n * SCHEMA SUPPORT - AUTODEDUCTION\n * @param {*} table\n * @param {*} schema\n * @returns\n */\nexport function deduceTableSchema(table, schema?: Schema) {\n const deducedSchema = Array.isArray(table)\n ? deduceSchemaForRowTable(table)\n : deduceSchemaForColumnarTable(table);\n // Deduced schema will fill in missing info from partial options.schema, if provided\n return Object.assign(deducedSchema, schema);\n}\n\nfunction deduceSchemaForColumnarTable(columnarTable) {\n const schema = {};\n for (const field in columnarTable) {\n const column = columnarTable[field];\n // Check if column is typed, if so we are done\n if (ArrayBuffer.isView(column)) {\n schema[field] = column.constructor;\n // else we need data\n } else if (column.length) {\n const value = column[0];\n schema[field] = deduceTypeFromValue(value);\n // TODO - support nested schemas?\n }\n // else we mark as present but unknow\n schema[field] = schema[field] || null;\n }\n return schema;\n}\n\nfunction deduceSchemaForRowTable(rowTable) {\n const schema = {};\n if (rowTable.length) {\n const row = rowTable[0];\n // TODO - Could look at additional rows if nulls in first row\n for (const field in row) {\n const value = row[field];\n schema[field] = deduceTypeFromValue(value);\n }\n }\n return schema;\n}\n\nfunction deduceTypeFromValue(value) {\n if (value instanceof Date) {\n return Date;\n } else if (value instanceof Number) {\n return Float32Array;\n } else if (typeof value === 'string') {\n return String;\n }\n return null;\n}\n\n/*\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction deduceSchema(rows) {\n const row = rows[0];\n\n const schema = {};\n let i = 0;\n for (const columnName in row) {\n const value = row[columnName];\n switch (typeof value) {\n case 'number':\n case 'boolean':\n // TODO - booleans could be handled differently...\n schema[columnName] = {name: String(columnName), index: i, type: Float32Array};\n break;\n\n case 'object':\n schema[columnName] = {name: String(columnName), index: i, type: Array};\n break;\n\n case 'string':\n default:\n schema[columnName] = {name: String(columnName), index: i, type: Array};\n // We currently only handle numeric rows\n // TODO we could offer a function to map strings to numbers?\n }\n i++;\n }\n return schema;\n}\n*/\n"],"mappings":";;;;;;AAyCO,SAASA,iBAAiBA,CAACC,KAAK,EAAEC,MAAe,EAAE;EACxD,
|
|
1
|
+
{"version":3,"file":"deduce-table-schema.js","names":["deduceTableSchema","table","schema","deducedSchema","Array","isArray","deduceSchemaForRowTable","deduceSchemaForColumnarTable","Object","assign","columnarTable","field","column","ArrayBuffer","isView","constructor","length","value","deduceTypeFromValue","rowTable","row","Date","Number","Float32Array","String"],"sources":["../../../../src/category/table/deduce-table-schema.ts"],"sourcesContent":["// Type deduction\nimport {\n Schema\n // Int,\n // Int8,\n // Int16,\n // Int32,\n // Uint8,\n // Uint16,\n // Uint32,\n // Float32,\n // Float64\n // Bool,\n // Utf8,\n // TimestampMillisecond,\n // Null\n} from '../../lib/schema/schema';\n\n// const TYPED_ARRAY_TO_TYPE = {\n// Int8Array: new Int8(),\n// Int16Array: new Int16(),\n// Int32Array: new Int32(),\n// Uint8Array: new Uint8(),\n// Uint8ClampedArray: new Uint8(),\n// Uint16Array: new Uint16(),\n// Uint32Array: new Uint32(),\n// Float32Array: new Float32(),\n// Float64Array: new Float64()\n// };\n\n// if (typeof BigInt64Array !== 'undefined') {\n// TYPED_ARRAY_TO_TYPE.BigInt64Array = new Int64();\n// TYPED_ARRAY_TO_TYPE.BigUint64Array = new Uint64();\n// }\n\n/**\n * SCHEMA SUPPORT - AUTODEDUCTION\n * @param {*} table\n * @param {*} schema\n * @returns\n */\nexport function deduceTableSchema(table, schema?: Schema) {\n const deducedSchema = Array.isArray(table)\n ? deduceSchemaForRowTable(table)\n : deduceSchemaForColumnarTable(table);\n // Deduced schema will fill in missing info from partial options.schema, if provided\n return Object.assign(deducedSchema, schema);\n}\n\nfunction deduceSchemaForColumnarTable(columnarTable) {\n const schema = {};\n for (const field in columnarTable) {\n const column = columnarTable[field];\n // Check if column is typed, if so we are done\n if (ArrayBuffer.isView(column)) {\n schema[field] = column.constructor;\n // else we need data\n } else if (column.length) {\n const value = column[0];\n schema[field] = deduceTypeFromValue(value);\n // TODO - support nested schemas?\n }\n // else we mark as present but unknow\n schema[field] = schema[field] || null;\n }\n return schema;\n}\n\nfunction deduceSchemaForRowTable(rowTable) {\n const schema = {};\n if (rowTable.length) {\n const row = rowTable[0];\n // TODO - Could look at additional rows if nulls in first row\n for (const field in row) {\n const value = row[field];\n schema[field] = deduceTypeFromValue(value);\n }\n }\n return schema;\n}\n\nfunction deduceTypeFromValue(value) {\n if (value instanceof Date) {\n return Date;\n } else if (value instanceof Number) {\n return Float32Array;\n } else if (typeof value === 'string') {\n return String;\n }\n return null;\n}\n\n/*\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction deduceSchema(rows) {\n const row = rows[0];\n\n const schema = {};\n let i = 0;\n for (const columnName in row) {\n const value = row[columnName];\n switch (typeof value) {\n case 'number':\n case 'boolean':\n // TODO - booleans could be handled differently...\n schema[columnName] = {name: String(columnName), index: i, type: Float32Array};\n break;\n\n case 'object':\n schema[columnName] = {name: String(columnName), index: i, type: Array};\n break;\n\n case 'string':\n default:\n schema[columnName] = {name: String(columnName), index: i, type: Array};\n // We currently only handle numeric rows\n // TODO we could offer a function to map strings to numbers?\n }\n i++;\n }\n return schema;\n}\n*/\n"],"mappings":";;;;;;AAyCO,SAASA,iBAAiBA,CAACC,KAAK,EAAEC,MAAe,EAAE;EACxD,MAAMC,aAAa,GAAGC,KAAK,CAACC,OAAO,CAACJ,KAAK,CAAC,GACtCK,uBAAuB,CAACL,KAAK,CAAC,GAC9BM,4BAA4B,CAACN,KAAK,CAAC;EAEvC,OAAOO,MAAM,CAACC,MAAM,CAACN,aAAa,EAAED,MAAM,CAAC;AAC7C;AAEA,SAASK,4BAA4BA,CAACG,aAAa,EAAE;EACnD,MAAMR,MAAM,GAAG,CAAC,CAAC;EACjB,KAAK,MAAMS,KAAK,IAAID,aAAa,EAAE;IACjC,MAAME,MAAM,GAAGF,aAAa,CAACC,KAAK,CAAC;IAEnC,IAAIE,WAAW,CAACC,MAAM,CAACF,MAAM,CAAC,EAAE;MAC9BV,MAAM,CAACS,KAAK,CAAC,GAAGC,MAAM,CAACG,WAAW;IAEpC,CAAC,MAAM,IAAIH,MAAM,CAACI,MAAM,EAAE;MACxB,MAAMC,KAAK,GAAGL,MAAM,CAAC,CAAC,CAAC;MACvBV,MAAM,CAACS,KAAK,CAAC,GAAGO,mBAAmB,CAACD,KAAK,CAAC;IAE5C;IAEAf,MAAM,CAACS,KAAK,CAAC,GAAGT,MAAM,CAACS,KAAK,CAAC,IAAI,IAAI;EACvC;EACA,OAAOT,MAAM;AACf;AAEA,SAASI,uBAAuBA,CAACa,QAAQ,EAAE;EACzC,MAAMjB,MAAM,GAAG,CAAC,CAAC;EACjB,IAAIiB,QAAQ,CAACH,MAAM,EAAE;IACnB,MAAMI,GAAG,GAAGD,QAAQ,CAAC,CAAC,CAAC;IAEvB,KAAK,MAAMR,KAAK,IAAIS,GAAG,EAAE;MACvB,MAAMH,KAAK,GAAGG,GAAG,CAACT,KAAK,CAAC;MACxBT,MAAM,CAACS,KAAK,CAAC,GAAGO,mBAAmB,CAACD,KAAK,CAAC;IAC5C;EACF;EACA,OAAOf,MAAM;AACf;AAEA,SAASgB,mBAAmBA,CAACD,KAAK,EAAE;EAClC,IAAIA,KAAK,YAAYI,IAAI,EAAE;IACzB,OAAOA,IAAI;EACb,CAAC,MAAM,IAAIJ,KAAK,YAAYK,MAAM,EAAE;IAClC,OAAOC,YAAY;EACrB,CAAC,MAAM,IAAI,OAAON,KAAK,KAAK,QAAQ,EAAE;IACpC,OAAOO,MAAM;EACf;EACA,OAAO,IAAI;AACb"}
|