@loaders.gl/tables
Advanced tools
Comparing version
@@ -127,11 +127,10 @@ /******/ (function(modules) { // webpackBootstrap | ||
/* WEBPACK VAR INJECTION */(function(global) {/* global window, global */ | ||
const moduleExports = __webpack_require__(/*! ./index */ "./src/index.js"); | ||
/* WEBPACK VAR INJECTION */(function(global) {const moduleExports = __webpack_require__(/*! ./index */ "./src/index.ts"); | ||
const _global = typeof window === 'undefined' ? global : window; | ||
// @ts-ignore | ||
_global.loaders = _global.loaders || {}; | ||
// @ts-ignore | ||
const _global = typeof window === 'undefined' ? global : window; // @ts-ignore | ||
_global.loaders = _global.loaders || {}; // @ts-ignore | ||
module.exports = Object.assign(_global.loaders, moduleExports); | ||
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node_modules/webpack/buildin/global.js */ "../../node_modules/webpack/buildin/global.js"))) | ||
@@ -141,5 +140,5 @@ | ||
/***/ "./src/index.js": | ||
/***/ "./src/index.ts": | ||
/*!**********************!*\ | ||
!*** ./src/index.js ***! | ||
!*** ./src/index.ts ***! | ||
\**********************/ | ||
@@ -151,9 +150,9 @@ /*! exports provided: Schema, Field, deduceTableSchema, TableBatchBuilder, RowTableBatch, ColumnarTableBatch, JSONLoader, XMLLoader, AsyncQueue, getTypeInfo, DataType, Null, Bool, Int, Int8, Int16, Int32, Int64, Uint8, Uint16, Uint32, Uint64, Float, Float16, Float32, Float64, Utf8, Date, DateDay, DateMillisecond, Time, TimeMillisecond, TimeSecond, Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond, Interval, IntervalDayTime, IntervalYearMonth, FixedSizeList */ | ||
__webpack_require__.r(__webpack_exports__); | ||
/* harmony import */ var _lib_schema_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/schema/schema */ "./src/lib/schema/schema.js"); | ||
/* harmony import */ var _lib_schema_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/schema/schema */ "./src/lib/schema/schema.ts"); | ||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Schema", function() { return _lib_schema_schema__WEBPACK_IMPORTED_MODULE_0__["default"]; }); | ||
/* harmony import */ var _lib_schema_field__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/schema/field */ "./src/lib/schema/field.js"); | ||
/* harmony import */ var _lib_schema_field__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/schema/field */ "./src/lib/schema/field.ts"); | ||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Field", function() { return _lib_schema_field__WEBPACK_IMPORTED_MODULE_1__["default"]; }); | ||
/* harmony import */ var _lib_schema_schema_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/schema/schema-utils */ "./src/lib/schema/schema-utils.js"); | ||
/* harmony import */ var _lib_schema_schema_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/schema/schema-utils */ "./src/lib/schema/schema-utils.ts"); | ||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deduceTableSchema", function() { return _lib_schema_schema_utils__WEBPACK_IMPORTED_MODULE_2__["deduceTableSchema"]; }); | ||
@@ -179,6 +178,6 @@ | ||
/* harmony import */ var _lib_types_type_utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./lib/types/type-utils */ "./src/lib/types/type-utils.js"); | ||
/* harmony import */ var _lib_types_type_utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./lib/types/type-utils */ "./src/lib/types/type-utils.ts"); | ||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getTypeInfo", function() { return _lib_types_type_utils__WEBPACK_IMPORTED_MODULE_9__["getTypeInfo"]; }); | ||
/* harmony import */ var _lib_types_arrow_like_type__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./lib/types/arrow-like/type */ "./src/lib/types/arrow-like/type.js"); | ||
/* harmony import */ var _lib_types_arrow_like_type__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./lib/types/arrow-like/type */ "./src/lib/types/arrow-like/type.ts"); | ||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DataType", function() { return _lib_types_arrow_like_type__WEBPACK_IMPORTED_MODULE_10__["DataType"]; }); | ||
@@ -250,22 +249,16 @@ | ||
// TABLE CATEGORY UTILS | ||
// TABLE CATEGORY UTILS | ||
// EXPERIMENTAL MICRO-LOADERS | ||
// EXPERIMENTAL APIs | ||
// EXPERIMENTAL MICRO-LOADERS | ||
// TYPES | ||
// EXPERIMENTAL APIs | ||
// TYPES | ||
/***/ }), | ||
@@ -288,5 +281,4 @@ | ||
parseTextSync | ||
}; | ||
}; // TODO - deprecated | ||
// TODO - deprecated | ||
function parseTextSync(text, options) { | ||
@@ -296,8 +288,7 @@ return JSON.parse(text); | ||
/***/ }), | ||
/***/ "./src/lib/schema/field.js": | ||
/***/ "./src/lib/schema/field.ts": | ||
/*!*********************************!*\ | ||
!*** ./src/lib/schema/field.js ***! | ||
!*** ./src/lib/schema/field.ts ***! | ||
\*********************************/ | ||
@@ -310,19 +301,10 @@ /*! exports provided: default */ | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Field; }); | ||
/* harmony import */ var _utils_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/assert */ "./src/lib/utils/assert.js"); | ||
/* harmony import */ var _types_arrow_like_type__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../types/arrow-like/type */ "./src/lib/types/arrow-like/type.js"); | ||
// ArrowJS `Schema` API-compatible class for row-based tables (returned from `DataTable`) | ||
// https://loaders.gl/arrowjs/docs/api-reference/field | ||
// A field holds name, nullable, and metadata information about a table "column" | ||
// A Schema is essentially a list of fields | ||
/** | ||
* ArrowJS `Field` API-compatible class for row-based tables | ||
* https://loaders.gl/arrowjs/docs/api-reference/field | ||
* A field holds name, nullable, and metadata information about a table "column" | ||
* A Schema is essentially a list of fields | ||
*/ | ||
class Field { | ||
constructor(name, type = null, nullable = false, metadata = new Map()) { | ||
Object(_utils_assert__WEBPACK_IMPORTED_MODULE_0__["assert"])(typeof name === 'string'); | ||
Object(_utils_assert__WEBPACK_IMPORTED_MODULE_0__["assert"])(!type || type instanceof _types_arrow_like_type__WEBPACK_IMPORTED_MODULE_1__["DataType"]); | ||
Object(_utils_assert__WEBPACK_IMPORTED_MODULE_0__["assert"])(typeof nullable === 'boolean'); | ||
Object(_utils_assert__WEBPACK_IMPORTED_MODULE_0__["assert"])(!metadata || typeof metadata === 'object'); | ||
constructor(name, type, nullable = false, metadata = new Map()) { | ||
this.name = name; | ||
@@ -343,23 +325,16 @@ this.type = type; | ||
compareTo(other) { | ||
return ( | ||
this.name === other.name && | ||
this.type === other.type && | ||
this.nullable === other.nullable && | ||
this.metadata === other.metadata | ||
); | ||
return this.name === other.name && this.type === other.type && this.nullable === other.nullable && this.metadata === other.metadata; | ||
} | ||
toString() { | ||
return `${this.type}${this.nullable ? ', nullable' : ''}${ | ||
this.metadata ? `, metadata: ${this.metadata}` : '' | ||
}`; | ||
return `${this.type}${this.nullable ? ', nullable' : ''}${this.metadata ? `, metadata: ${this.metadata}` : ''}`; | ||
} | ||
} | ||
/***/ }), | ||
/***/ "./src/lib/schema/schema-utils.js": | ||
/***/ "./src/lib/schema/schema-utils.ts": | ||
/*!****************************************!*\ | ||
!*** ./src/lib/schema/schema-utils.js ***! | ||
!*** ./src/lib/schema/schema-utils.ts ***! | ||
\****************************************/ | ||
@@ -372,5 +347,5 @@ /*! exports provided: deduceTableSchema */ | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deduceTableSchema", function() { return deduceTableSchema; }); | ||
/* harmony import */ var _types_arrow_like_type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../types/arrow-like/type */ "./src/lib/types/arrow-like/type.js"); | ||
/* harmony import */ var _schema__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./schema */ "./src/lib/schema/schema.js"); | ||
/* harmony import */ var _field__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./field */ "./src/lib/schema/field.js"); | ||
/* harmony import */ var _types_arrow_like_type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../types/arrow-like/type */ "./src/lib/types/arrow-like/type.ts"); | ||
/* harmony import */ var _schema__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./schema */ "./src/lib/schema/schema.ts"); | ||
/* harmony import */ var _field__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./field */ "./src/lib/schema/field.ts"); | ||
// SCHEMA SUPPORT - AUTODEDUCTION | ||
@@ -380,3 +355,2 @@ | ||
const TYPED_ARRAY_TO_TYPE = { | ||
@@ -392,11 +366,13 @@ Int8Array: new _types_arrow_like_type__WEBPACK_IMPORTED_MODULE_0__["Int8"](), | ||
Float64Array: new _types_arrow_like_type__WEBPACK_IMPORTED_MODULE_0__["Float64"]() | ||
}; | ||
}; // if (typeof BigInt64Array !== 'undefined') { | ||
// TYPED_ARRAY_TO_TYPE.BigInt64Array = new Int64(); | ||
// TYPED_ARRAY_TO_TYPE.BigUint64Array = new Uint64(); | ||
// } | ||
// Type deduction | ||
if (typeof BigInt64Array !== 'undefined') { | ||
TYPED_ARRAY_TO_TYPE.BigInt64Array = new _types_arrow_like_type__WEBPACK_IMPORTED_MODULE_0__["Int64"](); | ||
TYPED_ARRAY_TO_TYPE.BigUint64Array = new _types_arrow_like_type__WEBPACK_IMPORTED_MODULE_0__["Uint64"](); | ||
function deduceTableSchema(table, schema) { | ||
const deducedSchema = Array.isArray(table) ? deduceSchemaForRowTable(table) : deduceSchemaForColumnarTable(table); // Deduced schema will fill in missing info from partial options.schema, if provided | ||
return Object.assign(deducedSchema, schema); | ||
} | ||
// Type deduction | ||
/** | ||
@@ -413,28 +389,32 @@ * Type deduction from columnar array | ||
*/ | ||
function getTypeFromColumnArray(columnArray) { | ||
const ArrayType = columnArray.constructor && columnArray.constructor.name; | ||
let type = TYPED_ARRAY_TO_TYPE[ArrayType]; | ||
if (type) { | ||
return {type, nullable: false, metadata: null}; | ||
return { | ||
type, | ||
nullable: false, | ||
metadata: null | ||
}; | ||
} | ||
let metadata = null; | ||
if (columnArray.length > 0) { | ||
const value = columnArray[0]; | ||
type = deduceTypeFromValue(value); | ||
if (type) { | ||
metadata = new Map([['type', type.toString()]]); | ||
} | ||
} | ||
} // We use fields of Arrow-Type Null to indicate that we represent additional, non binary columns | ||
// We use fields of Arrow-Type Null to indicate that we represent additional, non binary columns | ||
return {type: new _types_arrow_like_type__WEBPACK_IMPORTED_MODULE_0__["Null"](), nullable: true, metadata}; | ||
} | ||
function deduceTableSchema(table, schema = null) { | ||
const deducedSchema = Array.isArray(table) | ||
? deduceSchemaForRowTable(table) | ||
: deduceSchemaForColumnarTable(table); | ||
// Deduced schema will fill in missing info from partial options.schema, if provided | ||
return Object.assign(deducedSchema, schema); | ||
return { | ||
type: new _types_arrow_like_type__WEBPACK_IMPORTED_MODULE_0__["Null"](), | ||
nullable: true, | ||
metadata | ||
}; | ||
} | ||
@@ -444,7 +424,13 @@ | ||
const fields = []; | ||
for (const columnName in columnarTable) { | ||
const columnArray = columnarTable[columnName]; | ||
const {type, nullable, metadata} = getTypeFromColumnArray(columnArray); | ||
const { | ||
type, | ||
nullable, | ||
metadata | ||
} = getTypeFromColumnArray(columnArray); | ||
fields.push(new _field__WEBPACK_IMPORTED_MODULE_2__["default"](columnName, type, nullable, metadata || new Map())); | ||
} | ||
return new _schema__WEBPACK_IMPORTED_MODULE_1__["default"](fields); | ||
@@ -455,5 +441,6 @@ } | ||
const fields = []; | ||
if (rowTable.length) { | ||
const row = rowTable[0]; | ||
// Note - handle rows in both array and object format | ||
const row = rowTable[0]; // Note - handle rows in both array and object format | ||
if (Array.isArray(row)) { | ||
@@ -481,2 +468,3 @@ // row: [value1, value2, ...] | ||
} | ||
return new _schema__WEBPACK_IMPORTED_MODULE_1__["default"](fields); | ||
@@ -489,21 +477,24 @@ } | ||
} | ||
if (value instanceof Date) { | ||
return new _types_arrow_like_type__WEBPACK_IMPORTED_MODULE_0__["TimestampMillisecond"](); | ||
} | ||
if (value instanceof Number) { | ||
return new _types_arrow_like_type__WEBPACK_IMPORTED_MODULE_0__["Float32"](); | ||
} | ||
if (typeof value === 'string') { | ||
return new _types_arrow_like_type__WEBPACK_IMPORTED_MODULE_0__["Utf8"](); | ||
} | ||
// TODO JS columns (arrays and object valued) are currently null | ||
} // TODO JS columns (arrays and object valued) are currently null | ||
return new _types_arrow_like_type__WEBPACK_IMPORTED_MODULE_0__["Null"](); | ||
} | ||
/***/ }), | ||
/***/ "./src/lib/schema/schema.js": | ||
/***/ "./src/lib/schema/schema.ts": | ||
/*!**********************************!*\ | ||
!*** ./src/lib/schema/schema.js ***! | ||
!*** ./src/lib/schema/schema.ts ***! | ||
\**********************************/ | ||
@@ -519,21 +510,26 @@ /*! exports provided: default */ | ||
// ArrowJS `Schema` API-compatible class for row-based tables (returned from `DataTable`) | ||
// https://loaders.gl/arrowjs/docs/api-reference/schema | ||
/** | ||
* ArrowJS `Schema` API-compatible class for row-based tables (returned from `DataTable`) | ||
* https://loaders.gl/arrowjs/docs/api-reference/schema | ||
*/ | ||
class Schema { | ||
constructor(fields, metadata = null) { | ||
// TODO - Arrow just allows Map<string, string> | ||
constructor(fields, metadata) { | ||
Object(_utils_assert__WEBPACK_IMPORTED_MODULE_0__["assert"])(Array.isArray(fields)); | ||
checkNames(fields); | ||
// For kepler fields, create arrow compatible `Fields` that have kepler fields as `metadata` | ||
checkNames(fields); // For kepler fields, create arrow compatible `Fields` that have kepler fields as `metadata` | ||
this.fields = fields; | ||
this.metadata = metadata || new Map(); | ||
} | ||
} // TODO - arrow only seems to compare fields, not metadata | ||
// TODO - arrow only seems to compare fields | ||
compareTo(other) { | ||
if (this.fields.metadata !== other.fields.metadata) { | ||
if (this.metadata !== other.metadata) { | ||
return false; | ||
} | ||
if (this.fields.length !== other.fields.length) { | ||
return false; | ||
} | ||
for (let i = 0; i < this.fields.length; ++i) { | ||
@@ -544,2 +540,3 @@ if (!this.fields[i].compareTo(other.fields[i])) { | ||
} | ||
return true; | ||
@@ -551,6 +548,8 @@ } | ||
const nameMap = Object.create(null); | ||
for (const name of columnNames) { | ||
nameMap[name] = true; | ||
} | ||
const selectedFields = columnNames.filter(field => nameMap[field.name]); | ||
const selectedFields = this.fields.filter(field => nameMap[field.name]); | ||
return new Schema(selectedFields, this.metadata); | ||
@@ -566,5 +565,5 @@ } | ||
assign(schemaOrFields) { | ||
let fields; | ||
let metadata = this.metadata; | ||
let fields = schemaOrFields; | ||
if (schemaOrFields instanceof Schema) { | ||
@@ -574,5 +573,7 @@ const otherSchema = schemaOrFields; | ||
metadata = mergeMaps(mergeMaps(new Map(), this.metadata), otherSchema.metadata); | ||
} | ||
} else { | ||
fields = schemaOrFields; | ||
} // Create a merged list of fields, overwrite fields in place, new fields at end | ||
// Create a merged list of fields, overwrite fields in place, new fields at end | ||
const fieldMap = Object.create(null); | ||
@@ -589,10 +590,10 @@ | ||
const mergedFields = Object.values(fieldMap); | ||
return new Schema(mergedFields, metadata); | ||
} | ||
} | ||
// Warn if any duplicated field names | ||
} // Warn if any duplicated field names | ||
function checkNames(fields) { | ||
const usedNames = {}; | ||
for (const field of fields) { | ||
@@ -603,2 +604,3 @@ if (usedNames[field.name]) { | ||
} | ||
usedNames[field.name] = true; | ||
@@ -609,6 +611,6 @@ } | ||
function mergeMaps(m1, m2) { | ||
// @ts-ignore | ||
return new Map([...(m1 || new Map()), ...(m2 || new Map())]); | ||
} | ||
/***/ }), | ||
@@ -630,3 +632,2 @@ | ||
this.batchSize = options.batchSize || 'auto'; | ||
this.length = 0; | ||
@@ -636,3 +637,2 @@ this.allocated = 0; | ||
this.isChunkComplete = false; | ||
this.reallocateColumns(); | ||
@@ -644,9 +644,11 @@ } | ||
this.reallocateColumns(); | ||
for (const fieldName in row) { | ||
this.columns[fieldName][this.length] = row[fieldName]; | ||
} | ||
this.length++; | ||
} | ||
} // Is this TableBatch full? | ||
// Is this TableBatch full? | ||
chunkComplete() { | ||
@@ -660,2 +662,3 @@ this.isChunkComplete = true; | ||
} | ||
return this.length >= this.allocated; | ||
@@ -666,7 +669,6 @@ } | ||
this.pruneColumns(); | ||
const columns = Array.isArray(this.schema) ? this.columns : {}; | ||
// schema is an array if there're no headers | ||
const columns = Array.isArray(this.schema) ? this.columns : {}; // schema is an array if there're no headers | ||
// object if there are headers | ||
// columns should match schema format | ||
if (!Array.isArray(this.schema)) { | ||
@@ -681,8 +683,10 @@ for (const fieldName in this.schema) { | ||
this.isChunkComplete = false; | ||
return { | ||
data: columns, | ||
schema: this.schema, | ||
length: this.length | ||
}; | ||
} // HELPERS | ||
return {data: columns, schema: this.schema, length: this.length}; | ||
} | ||
// HELPERS | ||
reallocateColumns() { | ||
@@ -693,3 +697,3 @@ if (this.length < this.allocated) { | ||
this.allocated = this.allocated > 0 ? (this.allocated *= 2) : this.batchSize; | ||
this.allocated = this.allocated > 0 ? this.allocated *= 2 : this.batchSize; | ||
this.columns = []; | ||
@@ -721,5 +725,5 @@ | ||
} | ||
} | ||
/***/ }), | ||
@@ -743,7 +747,7 @@ | ||
}; | ||
class RowTableBatch { | ||
constructor(schema, options = {}) { | ||
options = {...DEFAULT_OPTIONS, ...options}; | ||
options = { ...DEFAULT_OPTIONS, | ||
...options | ||
}; | ||
this.schema = schema; | ||
@@ -753,12 +757,11 @@ this.batchSize = options.batchSize; | ||
this.optimizeMemoryUsage = options.optimizeMemoryUsage; | ||
this.rows = null; | ||
this.length = 0; | ||
this.isChunkComplete = false; | ||
this.cursor = 0; | ||
this.cursor = 0; // schema is an array if there're no headers | ||
// object if there are headers | ||
// schema is an array if there're no headers | ||
// object if there are headers | ||
if (!Array.isArray(schema)) { | ||
this._headers = []; | ||
for (const key in schema) { | ||
@@ -775,7 +778,8 @@ this._headers[schema[key].index] = schema[key].name; | ||
} | ||
if (Number.isFinite(cursor)) { | ||
this.cursor = cursor; | ||
} | ||
} // We can only convert if we were given a schema | ||
// We can only convert if we were given a schema | ||
const convertToObject = this.convertToObject && this.schema; | ||
@@ -801,2 +805,3 @@ this.rows[this.length] = convertToObject ? convertRowToObject(row, this._headers) : row; | ||
} | ||
return this.rows && this.length >= this.batchSize; | ||
@@ -810,6 +815,13 @@ } | ||
this.isChunkComplete = false; | ||
return {data: rows, schema: this.schema, length: rows.length, cursor: this.cursor}; | ||
return { | ||
data: rows, | ||
schema: this.schema, | ||
length: rows.length, | ||
cursor: this.cursor | ||
}; | ||
} | ||
return null; | ||
} | ||
} | ||
@@ -821,2 +833,3 @@ | ||
} | ||
if (!Array.isArray(row)) { | ||
@@ -829,10 +842,12 @@ return row; | ||
} | ||
const result = {}; | ||
for (let i = 0; i < headers.length; i++) { | ||
result[headers[i]] = row[i]; | ||
} | ||
return result; | ||
} | ||
/***/ }), | ||
@@ -851,7 +866,5 @@ | ||
const DEFAULT_BATCH_SIZE = 100; | ||
const DEFAULT_OPTIONS = { | ||
batchSize: DEFAULT_BATCH_SIZE | ||
}; | ||
class TableBatchBuilder { | ||
@@ -861,4 +874,5 @@ constructor(TableBatchType, schema, options = {}) { | ||
this.schema = schema; | ||
this.options = {...DEFAULT_OPTIONS, ...options}; | ||
this.options = { ...DEFAULT_OPTIONS, | ||
...options | ||
}; | ||
this.batch = null; | ||
@@ -871,3 +885,5 @@ this.batchCount = 0; | ||
if (!this.batch) { | ||
const {TableBatchType} = this; | ||
const { | ||
TableBatchType | ||
} = this; | ||
this.batch = new TableBatchType(this.schema, this.options); | ||
@@ -881,2 +897,3 @@ } | ||
this.bytesUsed += chunk.byteLength || chunk.length || 0; | ||
if (this.batch) { | ||
@@ -912,10 +929,10 @@ this.batch.chunkComplete(); | ||
} | ||
} | ||
/***/ }), | ||
/***/ "./src/lib/types/arrow-like/enum.js": | ||
/***/ "./src/lib/types/arrow-like/enum.ts": | ||
/*!******************************************!*\ | ||
!*** ./src/lib/types/arrow-like/enum.js ***! | ||
!*** ./src/lib/types/arrow-like/enum.ts ***! | ||
\******************************************/ | ||
@@ -957,77 +974,58 @@ /*! exports provided: Type */ | ||
*/ | ||
const Type = { | ||
/** The default placeholder type */ | ||
NONE: 0, | ||
/** A NULL type having no physical storage */ | ||
Null: 1, | ||
/** Signed or unsigned 8, 16, 32, or 64-bit little-endian integer */ | ||
Int: 2, | ||
/** 2, 4, or 8-byte floating point value */ | ||
Float: 3, | ||
/** Variable-length bytes (no guarantee of UTF8-ness) */ | ||
Binary: 4, | ||
/** UTF8 variable-length string as List<Char> */ | ||
Utf8: 5, | ||
/** Boolean as 1 bit, LSB bit-packed ordering */ | ||
Bool: 6, | ||
/** Precision-and-scale-based decimal type. Storage type depends on the parameters. */ | ||
Decimal: 7, | ||
/** int32_t days or int64_t milliseconds since the UNIX epoch */ | ||
Date: 8, | ||
/** Time as signed 32 or 64-bit integer, representing either seconds, milliseconds, microseconds, or nanoseconds since midnight since midnight */ | ||
Time: 9, | ||
/** Exact timestamp encoded with int64 since UNIX epoch (Default unit millisecond) */ | ||
Timestamp: 10, | ||
/** YEAR_MONTH or DAY_TIME interval in SQL style */ | ||
Interval: 11, | ||
/** A list of some logical data type */ | ||
List: 12, | ||
/** Struct of logical types */ | ||
Struct: 13, | ||
/** Union of logical types */ | ||
Union: 14, | ||
/** Fixed-size binary. Each value occupies the same number of bytes */ | ||
FixedSizeBinary: 15, | ||
/** Fixed-size list. Each value occupies the same number of bytes */ | ||
FixedSizeList: 16, | ||
/** Map of named logical types */ | ||
Map: 17, | ||
let Type; | ||
/** Dictionary aka Category type */ | ||
Dictionary: -1, | ||
Int8: -2, | ||
Int16: -3, | ||
Int32: -4, | ||
Int64: -5, | ||
Uint8: -6, | ||
Uint16: -7, | ||
Uint32: -8, | ||
Uint64: -9, | ||
Float16: -10, | ||
Float32: -11, | ||
Float64: -12, | ||
DateDay: -13, | ||
DateMillisecond: -14, | ||
TimestampSecond: -15, | ||
TimestampMillisecond: -16, | ||
TimestampMicrosecond: -17, | ||
TimestampNanosecond: -18, | ||
TimeSecond: -19, | ||
TimeMillisecond: -20, | ||
TimeMicrosecond: -21, | ||
TimeNanosecond: -22, | ||
DenseUnion: -23, | ||
SparseUnion: -24, | ||
IntervalDayTime: -25, | ||
IntervalYearMonth: -26 | ||
}; | ||
(function (Type) { | ||
Type[Type["NONE"] = 0] = "NONE"; | ||
Type[Type["Null"] = 1] = "Null"; | ||
Type[Type["Int"] = 2] = "Int"; | ||
Type[Type["Float"] = 3] = "Float"; | ||
Type[Type["Binary"] = 4] = "Binary"; | ||
Type[Type["Utf8"] = 5] = "Utf8"; | ||
Type[Type["Bool"] = 6] = "Bool"; | ||
Type[Type["Decimal"] = 7] = "Decimal"; | ||
Type[Type["Date"] = 8] = "Date"; | ||
Type[Type["Time"] = 9] = "Time"; | ||
Type[Type["Timestamp"] = 10] = "Timestamp"; | ||
Type[Type["Interval"] = 11] = "Interval"; | ||
Type[Type["List"] = 12] = "List"; | ||
Type[Type["Struct"] = 13] = "Struct"; | ||
Type[Type["Union"] = 14] = "Union"; | ||
Type[Type["FixedSizeBinary"] = 15] = "FixedSizeBinary"; | ||
Type[Type["FixedSizeList"] = 16] = "FixedSizeList"; | ||
Type[Type["Map"] = 17] = "Map"; | ||
Type[Type["Dictionary"] = -1] = "Dictionary"; | ||
Type[Type["Int8"] = -2] = "Int8"; | ||
Type[Type["Int16"] = -3] = "Int16"; | ||
Type[Type["Int32"] = -4] = "Int32"; | ||
Type[Type["Int64"] = -5] = "Int64"; | ||
Type[Type["Uint8"] = -6] = "Uint8"; | ||
Type[Type["Uint16"] = -7] = "Uint16"; | ||
Type[Type["Uint32"] = -8] = "Uint32"; | ||
Type[Type["Uint64"] = -9] = "Uint64"; | ||
Type[Type["Float16"] = -10] = "Float16"; | ||
Type[Type["Float32"] = -11] = "Float32"; | ||
Type[Type["Float64"] = -12] = "Float64"; | ||
Type[Type["DateDay"] = -13] = "DateDay"; | ||
Type[Type["DateMillisecond"] = -14] = "DateMillisecond"; | ||
Type[Type["TimestampSecond"] = -15] = "TimestampSecond"; | ||
Type[Type["TimestampMillisecond"] = -16] = "TimestampMillisecond"; | ||
Type[Type["TimestampMicrosecond"] = -17] = "TimestampMicrosecond"; | ||
Type[Type["TimestampNanosecond"] = -18] = "TimestampNanosecond"; | ||
Type[Type["TimeSecond"] = -19] = "TimeSecond"; | ||
Type[Type["TimeMillisecond"] = -20] = "TimeMillisecond"; | ||
Type[Type["TimeMicrosecond"] = -21] = "TimeMicrosecond"; | ||
Type[Type["TimeNanosecond"] = -22] = "TimeNanosecond"; | ||
Type[Type["DenseUnion"] = -23] = "DenseUnion"; | ||
Type[Type["SparseUnion"] = -24] = "SparseUnion"; | ||
Type[Type["IntervalDayTime"] = -25] = "IntervalDayTime"; | ||
Type[Type["IntervalYearMonth"] = -26] = "IntervalYearMonth"; | ||
})(Type || (Type = {})); | ||
/***/ }), | ||
/***/ "./src/lib/types/arrow-like/type.js": | ||
/***/ "./src/lib/types/arrow-like/type.ts": | ||
/*!******************************************!*\ | ||
!*** ./src/lib/types/arrow-like/type.js ***! | ||
!*** ./src/lib/types/arrow-like/type.ts ***! | ||
\******************************************/ | ||
/*! exports provided: DataType, Null, Bool, Int, Int8, Int16, Int32, Int64, Uint8, Uint16, Uint32, Uint64, Float, Float16, Float32, Float64, Utf8, Date, DateDay, DateMillisecond, Time, TimeSecond, TimeMillisecond, Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond, Interval, IntervalDayTime, IntervalYearMonth, FixedSizeList */ | ||
/*! exports provided: Type, DataType, Null, Bool, Int, Int8, Int16, Int32, Int64, Uint8, Uint16, Uint32, Uint64, Float, Float16, Float32, Float64, Utf8, Date, DateDay, DateMillisecond, Time, TimeSecond, TimeMillisecond, Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond, Interval, IntervalDayTime, IntervalYearMonth, FixedSizeList */ | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
@@ -1069,3 +1067,5 @@ | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FixedSizeList", function() { return FixedSizeList; }); | ||
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./enum */ "./src/lib/types/arrow-like/enum.js"); | ||
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./enum */ "./src/lib/types/arrow-like/enum.ts"); | ||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Type", function() { return _enum__WEBPACK_IMPORTED_MODULE_0__["Type"]; }); | ||
// This code is adapted from ArrowJS https://github.com/apache/arrow | ||
@@ -1075,3 +1075,2 @@ // under Apache license http://www.apache.org/licenses/LICENSE-2.0 | ||
class DataType { | ||
@@ -1081,50 +1080,67 @@ static isNull(x) { | ||
} | ||
static isInt(x) { | ||
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_0__["Type"].Int; | ||
} | ||
static isFloat(x) { | ||
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_0__["Type"].Float; | ||
} | ||
static isBinary(x) { | ||
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_0__["Type"].Binary; | ||
} | ||
static isUtf8(x) { | ||
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_0__["Type"].Utf8; | ||
} | ||
static isBool(x) { | ||
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_0__["Type"].Bool; | ||
} | ||
static isDecimal(x) { | ||
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_0__["Type"].Decimal; | ||
} | ||
static isDate(x) { | ||
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_0__["Type"].Date; | ||
} | ||
static isTime(x) { | ||
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_0__["Type"].Time; | ||
} | ||
static isTimestamp(x) { | ||
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_0__["Type"].Timestamp; | ||
} | ||
static isInterval(x) { | ||
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_0__["Type"].Interval; | ||
} | ||
static isList(x) { | ||
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_0__["Type"].List; | ||
} | ||
static isStruct(x) { | ||
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_0__["Type"].Struct; | ||
} | ||
static isUnion(x) { | ||
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_0__["Type"].Union; | ||
} | ||
static isFixedSizeBinary(x) { | ||
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_0__["Type"].FixedSizeBinary; | ||
} | ||
static isFixedSizeList(x) { | ||
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_0__["Type"].FixedSizeList; | ||
} | ||
static isMap(x) { | ||
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_0__["Type"].Map; | ||
} | ||
static isDictionary(x) { | ||
@@ -1136,4 +1152,8 @@ return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_0__["Type"].Dictionary; | ||
return _enum__WEBPACK_IMPORTED_MODULE_0__["Type"].NONE; | ||
} | ||
} // get ArrayType(): AnyArrayType { | ||
// return Int8Array; | ||
// } | ||
// get ArrayType() { return Array; } | ||
compareTo(other) { | ||
@@ -1143,5 +1163,4 @@ // TODO | ||
} | ||
} | ||
// NULL | ||
} // NULL | ||
@@ -1152,11 +1171,12 @@ class Null extends DataType { | ||
} | ||
get [Symbol.toStringTag]() { | ||
return 'Null'; | ||
} | ||
toString() { | ||
return `Null`; | ||
} | ||
} | ||
// BOOLEANS | ||
} // BOOLEANS | ||
@@ -1166,15 +1186,16 @@ class Bool extends DataType { | ||
return _enum__WEBPACK_IMPORTED_MODULE_0__["Type"].Bool; | ||
} | ||
get ArrayType() { | ||
return Uint8Array; | ||
} | ||
} // get ArrayType() { | ||
// return Uint8Array; | ||
// } | ||
get [Symbol.toStringTag]() { | ||
return 'Bool'; | ||
} | ||
toString() { | ||
return `Bool`; | ||
} | ||
} | ||
// INTS | ||
} // INTS | ||
@@ -1187,27 +1208,30 @@ class Int extends DataType { | ||
} | ||
get typeId() { | ||
return _enum__WEBPACK_IMPORTED_MODULE_0__["Type"].Int; | ||
} | ||
get ArrayType() { | ||
switch (this.bitWidth) { | ||
case 8: | ||
return this.isSigned ? Int8Array : Uint8Array; | ||
case 16: | ||
return this.isSigned ? Int16Array : Uint16Array; | ||
case 32: | ||
return this.isSigned ? Int32Array : Uint32Array; | ||
case 64: | ||
return this.isSigned ? Int32Array : Uint32Array; | ||
default: | ||
throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`); | ||
} | ||
} | ||
} // get ArrayType() { | ||
// switch (this.bitWidth) { | ||
// case 8: | ||
// return this.isSigned ? Int8Array : Uint8Array; | ||
// case 16: | ||
// return this.isSigned ? Int16Array : Uint16Array; | ||
// case 32: | ||
// return this.isSigned ? Int32Array : Uint32Array; | ||
// case 64: | ||
// return this.isSigned ? Int32Array : Uint32Array; | ||
// default: | ||
// throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`); | ||
// } | ||
// } | ||
get [Symbol.toStringTag]() { | ||
return 'Int'; | ||
} | ||
toString() { | ||
return `${this.isSigned ? `I` : `Ui`}nt${this.bitWidth}`; | ||
return `${this.isSigned ? 'I' : 'Ui'}nt${this.bitWidth}`; | ||
} | ||
} | ||
class Int8 extends Int { | ||
@@ -1217,2 +1241,3 @@ constructor() { | ||
} | ||
} | ||
@@ -1223,2 +1248,3 @@ class Int16 extends Int { | ||
} | ||
} | ||
@@ -1229,2 +1255,3 @@ class Int32 extends Int { | ||
} | ||
} | ||
@@ -1235,2 +1262,3 @@ class Int64 extends Int { | ||
} | ||
} | ||
@@ -1241,2 +1269,3 @@ class Uint8 extends Int { | ||
} | ||
} | ||
@@ -1247,2 +1276,3 @@ class Uint16 extends Int { | ||
} | ||
} | ||
@@ -1253,2 +1283,3 @@ class Uint32 extends Int { | ||
} | ||
} | ||
@@ -1259,5 +1290,4 @@ class Uint64 extends Int { | ||
} | ||
} | ||
// FLOATS | ||
} // FLOATS | ||
@@ -1269,3 +1299,2 @@ const Precision = { | ||
}; | ||
class Float extends DataType { | ||
@@ -1276,25 +1305,28 @@ constructor(precision) { | ||
} | ||
get typeId() { | ||
return _enum__WEBPACK_IMPORTED_MODULE_0__["Type"].Float; | ||
} | ||
get ArrayType() { | ||
switch (this.precision) { | ||
case Precision.HALF: | ||
return Uint16Array; | ||
case Precision.SINGLE: | ||
return Float32Array; | ||
case Precision.DOUBLE: | ||
return Float64Array; | ||
default: | ||
throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`); | ||
} | ||
} | ||
} // get ArrayType() { | ||
// switch (this.precision) { | ||
// case Precision.HALF: | ||
// return Uint16Array; | ||
// case Precision.SINGLE: | ||
// return Float32Array; | ||
// case Precision.DOUBLE: | ||
// return Float64Array; | ||
// default: | ||
// throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`); | ||
// } | ||
// } | ||
get [Symbol.toStringTag]() { | ||
return 'Float'; | ||
} | ||
toString() { | ||
return `Float${this.precision}`; | ||
} | ||
} | ||
class Float16 extends Float { | ||
@@ -1304,2 +1336,3 @@ constructor() { | ||
} | ||
} | ||
@@ -1310,2 +1343,3 @@ class Float32 extends Float { | ||
} | ||
} | ||
@@ -1316,5 +1350,4 @@ class Float64 extends Float { | ||
} | ||
} | ||
// STRINGS | ||
} // STRINGS | ||
@@ -1324,15 +1357,16 @@ class Utf8 extends DataType { | ||
return _enum__WEBPACK_IMPORTED_MODULE_0__["Type"].Utf8; | ||
} | ||
get ArrayType() { | ||
return Uint8Array; | ||
} | ||
} // get ArrayType() { | ||
// return Uint8Array; | ||
// } | ||
get [Symbol.toStringTag]() { | ||
return 'Utf8'; | ||
} | ||
toString() { | ||
return `Utf8`; | ||
} | ||
} | ||
// DATES, TIMES AND INTERVALS | ||
} // DATES, TIMES AND INTERVALS | ||
@@ -1343,3 +1377,2 @@ const DateUnit = { | ||
}; | ||
class Date extends DataType { | ||
@@ -1350,16 +1383,19 @@ constructor(unit) { | ||
} | ||
get typeId() { | ||
return _enum__WEBPACK_IMPORTED_MODULE_0__["Type"].Date; | ||
} | ||
get ArrayType() { | ||
return Int32Array; | ||
} | ||
} // get ArrayType() { | ||
// return Int32Array; | ||
// } | ||
get [Symbol.toStringTag]() { | ||
return 'Date'; | ||
} | ||
toString() { | ||
return `Date${(this.unit + 1) * 32}<${DateUnit[this.unit]}>`; | ||
} | ||
} | ||
class DateDay extends Date { | ||
@@ -1369,2 +1405,3 @@ constructor() { | ||
} | ||
} | ||
@@ -1375,4 +1412,4 @@ class DateMillisecond extends Date { | ||
} | ||
} | ||
const TimeUnit = { | ||
@@ -1384,3 +1421,2 @@ SECOND: 1, | ||
}; | ||
class Time extends DataType { | ||
@@ -1392,16 +1428,19 @@ constructor(unit, bitWidth) { | ||
} | ||
get typeId() { | ||
return _enum__WEBPACK_IMPORTED_MODULE_0__["Type"].Time; | ||
} | ||
toString() { | ||
return `Time${this.bitWidth}<${TimeUnit[this.unit]}>`; | ||
} | ||
get [Symbol.toStringTag]() { | ||
return 'Time'; | ||
} | ||
get ArrayType() { | ||
return Int32Array; | ||
} | ||
} // get ArrayType() { | ||
// return Int32Array; | ||
// } | ||
} | ||
class TimeSecond extends Time { | ||
@@ -1411,2 +1450,3 @@ constructor() { | ||
} | ||
} | ||
@@ -1417,4 +1457,4 @@ class TimeMillisecond extends Time { | ||
} | ||
} | ||
// export class TimeMicrosecond extends Time { constructor() { super(TimeUnit.MICROSECOND, 64); } } | ||
} // export class TimeMicrosecond extends Time { constructor() { super(TimeUnit.MICROSECOND, 64); } } | ||
// export class TimeNanosecond extends Time { constructor() { super(TimeUnit.NANOSECOND, 64); } } | ||
@@ -1428,16 +1468,19 @@ | ||
} | ||
get typeId() { | ||
return _enum__WEBPACK_IMPORTED_MODULE_0__["Type"].Timestamp; | ||
} | ||
get ArrayType() { | ||
return Int32Array; | ||
} | ||
} // get ArrayType() { | ||
// return Int32Array; | ||
// } | ||
get [Symbol.toStringTag]() { | ||
return 'Timestamp'; | ||
} | ||
toString() { | ||
return `Timestamp<${TimeUnit[this.unit]}${this.timezone ? `, ${this.timezone}` : ``}>`; | ||
return `Timestamp<${TimeUnit[this.unit]}${this.timezone ? `, ${this.timezone}` : ''}>`; | ||
} | ||
} | ||
class TimestampSecond extends Timestamp { | ||
@@ -1447,2 +1490,3 @@ constructor(timezone = null) { | ||
} | ||
} | ||
@@ -1453,2 +1497,3 @@ class TimestampMillisecond extends Timestamp { | ||
} | ||
} | ||
@@ -1459,2 +1504,3 @@ class TimestampMicrosecond extends Timestamp { | ||
} | ||
} | ||
@@ -1465,4 +1511,4 @@ class TimestampNanosecond extends Timestamp { | ||
} | ||
} | ||
const IntervalUnit = { | ||
@@ -1472,3 +1518,2 @@ DAY_TIME: 0, | ||
}; | ||
class Interval extends DataType { | ||
@@ -1479,16 +1524,19 @@ constructor(unit) { | ||
} | ||
get typeId() { | ||
return _enum__WEBPACK_IMPORTED_MODULE_0__["Type"].Interval; | ||
} | ||
get ArrayType() { | ||
return Int32Array; | ||
} | ||
} // get ArrayType() { | ||
// return Int32Array; | ||
// } | ||
get [Symbol.toStringTag]() { | ||
return 'Interval'; | ||
} | ||
toString() { | ||
return `Interval<${IntervalUnit[this.unit]}>`; | ||
} | ||
} | ||
class IntervalDayTime extends Interval { | ||
@@ -1498,2 +1546,3 @@ constructor() { | ||
} | ||
} | ||
@@ -1504,4 +1553,4 @@ class IntervalYearMonth extends Interval { | ||
} | ||
} | ||
class FixedSizeList extends DataType { | ||
@@ -1513,28 +1562,33 @@ constructor(listSize, child) { | ||
} | ||
get typeId() { | ||
return _enum__WEBPACK_IMPORTED_MODULE_0__["Type"].FixedSizeList; | ||
} | ||
get valueType() { | ||
return this.children[0].type; | ||
} | ||
get valueField() { | ||
return this.children[0]; | ||
} | ||
get ArrayType() { | ||
return this.valueType.ArrayType; | ||
} | ||
} // get ArrayType() { | ||
// return this.valueType.ArrayType; | ||
// } | ||
get [Symbol.toStringTag]() { | ||
return 'FixedSizeList'; | ||
} | ||
toString() { | ||
return `FixedSizeList[${this.listSize}]<${this.valueType}>`; | ||
} | ||
} | ||
/***/ }), | ||
/***/ "./src/lib/types/type-utils.js": | ||
/***/ "./src/lib/types/type-utils.ts": | ||
/*!*************************************!*\ | ||
!*** ./src/lib/types/type-utils.js ***! | ||
!*** ./src/lib/types/type-utils.ts ***! | ||
\*************************************/ | ||
@@ -1547,4 +1601,8 @@ /*! exports provided: getTypeInfo */ | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTypeInfo", function() { return getTypeInfo; }); | ||
/* harmony import */ var _arrow_like_enum__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrow-like/enum */ "./src/lib/types/arrow-like/enum.js"); | ||
/* harmony import */ var _arrow_like_type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrow-like/type */ "./src/lib/types/arrow-like/type.ts"); | ||
/** | ||
* Gets type information from an Arrow type object or "mock" Arrow type object | ||
* @param arrowTypeLike Arrow Type or type object of similar shape | ||
*/ | ||
@@ -1560,3 +1618,2 @@ function getTypeInfo(arrowTypeLike) { | ||
} | ||
let ReverseType = null; | ||
@@ -1567,4 +1624,5 @@ | ||
ReverseType = {}; | ||
for (const key in _arrow_like_enum__WEBPACK_IMPORTED_MODULE_0__["Type"]) { | ||
ReverseType[_arrow_like_enum__WEBPACK_IMPORTED_MODULE_0__["Type"][key]] = key; | ||
for (const key in _arrow_like_type__WEBPACK_IMPORTED_MODULE_0__["Type"]) { | ||
ReverseType[_arrow_like_type__WEBPACK_IMPORTED_MODULE_0__["Type"][key]] = key; | ||
} | ||
@@ -1576,3 +1634,2 @@ } | ||
/***/ }), | ||
@@ -1599,3 +1656,2 @@ | ||
/***/ }), | ||
@@ -1616,3 +1672,2 @@ | ||
// http://2ality.com/2016/10/asynchronous-iteration.html | ||
class ArrayQueue extends Array { | ||
@@ -1623,2 +1678,3 @@ enqueue(value) { | ||
} | ||
dequeue() { | ||
@@ -1628,4 +1684,4 @@ // Remove first element | ||
} | ||
} | ||
/** | ||
@@ -1635,20 +1691,28 @@ * @returns a Promise for an Array with the elements | ||
*/ | ||
async function takeAsync(asyncIterable, count = Infinity) { | ||
const result = []; | ||
const iterator = asyncIterable[Symbol.asyncIterator](); | ||
while (result.length < count) { | ||
const {value, done} = await iterator.next(); | ||
const { | ||
value, | ||
done | ||
} = await iterator.next(); | ||
if (done) { | ||
break; | ||
} | ||
result.push(value); | ||
} | ||
return result; | ||
} | ||
class AsyncQueue { | ||
constructor() { | ||
// enqueues > dequeues | ||
this._values = new ArrayQueue(); | ||
// dequeues > enqueues | ||
this._values = new ArrayQueue(); // dequeues > enqueues | ||
this._settlers = new ArrayQueue(); | ||
@@ -1660,4 +1724,7 @@ this._closed = false; | ||
while (this._settlers.length > 0) { | ||
this._settlers.dequeue().resolve({done: true}); | ||
this._settlers.dequeue().resolve({ | ||
done: true | ||
}); | ||
} | ||
this._closed = true; | ||
@@ -1679,7 +1746,11 @@ } | ||
} | ||
const settler = this._settlers.dequeue(); | ||
if (value instanceof Error) { | ||
settler.reject(value); | ||
} else { | ||
settler.resolve({value}); | ||
settler.resolve({ | ||
value | ||
}); | ||
} | ||
@@ -1690,13 +1761,18 @@ } else { | ||
} | ||
/** | ||
* @returns a Promise for an IteratorResult | ||
*/ | ||
next() { | ||
if (this._values.length > 0) { | ||
const value = this._values.dequeue(); | ||
if (value instanceof Error) { | ||
return Promise.reject(value); | ||
} | ||
return Promise.resolve({value}); | ||
return Promise.resolve({ | ||
value | ||
}); | ||
} | ||
@@ -1708,12 +1784,19 @@ | ||
} | ||
return Promise.resolve({done: true}); | ||
} | ||
// Wait for new values to be enqueued | ||
return Promise.resolve({ | ||
done: true | ||
}); | ||
} // Wait for new values to be enqueued | ||
return new Promise((resolve, reject) => { | ||
this._settlers.enqueue({resolve, reject}); | ||
this._settlers.enqueue({ | ||
resolve, | ||
reject | ||
}); | ||
}); | ||
} | ||
} | ||
/***/ }), | ||
@@ -1732,3 +1815,2 @@ | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseXMLSupported", function() { return parseXMLSupported; }); | ||
/* global window, DOMParser */ | ||
function parseXML(xml) { | ||
@@ -1738,5 +1820,7 @@ if (window.DOMParser) { | ||
const parseError = isXMLParseError(xmlDoc); | ||
if (parseError) { | ||
throw new Error(parseError); | ||
} | ||
return xmlDoc; | ||
@@ -1747,2 +1831,3 @@ } | ||
const xmlDoc = new window.ActiveXObject('Microsoft.XMLDOM'); | ||
if (xmlDoc) { | ||
@@ -1757,3 +1842,2 @@ xmlDoc.async = 'false'; | ||
} | ||
function parseXMLSupported() { | ||
@@ -1773,5 +1857,4 @@ if (typeof window === 'undefined') { | ||
return false; | ||
} | ||
} // https://stackoverflow.com/questions/11563554/how-do-i-detect-xml-parsing-errors-when-using-javascripts-domparser-in-a-cross | ||
// https://stackoverflow.com/questions/11563554/how-do-i-detect-xml-parsing-errors-when-using-javascripts-domparser-in-a-cross | ||
function isXMLParseError(parsedDocument) { | ||
@@ -1792,3 +1875,2 @@ const parser = new DOMParser(); | ||
/***/ }), | ||
@@ -1808,5 +1890,3 @@ | ||
const XML_HEADER = '<?xml'; | ||
const XMLLoader = { | ||
@@ -1826,5 +1906,4 @@ name: 'XML', | ||
/***/ }) | ||
/******/ }); |
@@ -1,1 +0,1 @@ | ||
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=15)}([function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=n=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),n(e)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.FixedSizeList=e.IntervalYearMonth=e.IntervalDayTime=e.Interval=e.TimestampNanosecond=e.TimestampMicrosecond=e.TimestampMillisecond=e.TimestampSecond=e.Timestamp=e.TimeMillisecond=e.TimeSecond=e.Time=e.DateMillisecond=e.DateDay=e.Date=e.Utf8=e.Float64=e.Float32=e.Float16=e.Float=e.Uint64=e.Uint32=e.Uint16=e.Uint8=e.Int64=e.Int32=e.Int16=e.Int8=e.Int=e.Bool=e.Null=e.DataType=void 0;var o=r(n(11)),i=r(n(12)),u=r(n(6)),a=r(n(1)),l=r(n(2)),c=n(13);function s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var o=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,i.default)(this,n)}}var f=function(){function t(){(0,a.default)(this,t)}return(0,l.default)(t,[{key:"typeId",get:function(){return c.Type.NONE}},{key:"compareTo",value:function(t){return this===t}}],[{key:"isNull",value:function(t){return t&&t.typeId===c.Type.Null}},{key:"isInt",value:function(t){return t&&t.typeId===c.Type.Int}},{key:"isFloat",value:function(t){return t&&t.typeId===c.Type.Float}},{key:"isBinary",value:function(t){return t&&t.typeId===c.Type.Binary}},{key:"isUtf8",value:function(t){return t&&t.typeId===c.Type.Utf8}},{key:"isBool",value:function(t){return t&&t.typeId===c.Type.Bool}},{key:"isDecimal",value:function(t){return t&&t.typeId===c.Type.Decimal}},{key:"isDate",value:function(t){return t&&t.typeId===c.Type.Date}},{key:"isTime",value:function(t){return t&&t.typeId===c.Type.Time}},{key:"isTimestamp",value:function(t){return t&&t.typeId===c.Type.Timestamp}},{key:"isInterval",value:function(t){return t&&t.typeId===c.Type.Interval}},{key:"isList",value:function(t){return t&&t.typeId===c.Type.List}},{key:"isStruct",value:function(t){return t&&t.typeId===c.Type.Struct}},{key:"isUnion",value:function(t){return t&&t.typeId===c.Type.Union}},{key:"isFixedSizeBinary",value:function(t){return t&&t.typeId===c.Type.FixedSizeBinary}},{key:"isFixedSizeList",value:function(t){return t&&t.typeId===c.Type.FixedSizeList}},{key:"isMap",value:function(t){return t&&t.typeId===c.Type.Map}},{key:"isDictionary",value:function(t){return t&&t.typeId===c.Type.Dictionary}}]),t}();e.DataType=f;var d=function(t){(0,o.default)(n,t);var e=s(n);function n(){return(0,a.default)(this,n),e.apply(this,arguments)}return(0,l.default)(n,[{key:"typeId",get:function(){return c.Type.Null}},{key:Symbol.toStringTag,get:function(){return"Null"}},{key:"toString",value:function(){return"Null"}}]),n}(f);e.Null=d;var p=function(t){(0,o.default)(n,t);var e=s(n);function n(){return(0,a.default)(this,n),e.apply(this,arguments)}return(0,l.default)(n,[{key:"typeId",get:function(){return c.Type.Bool}},{key:"ArrayType",get:function(){return Uint8Array}},{key:Symbol.toStringTag,get:function(){return"Bool"}},{key:"toString",value:function(){return"Bool"}}]),n}(f);e.Bool=p;var h=function(t){(0,o.default)(n,t);var e=s(n);function n(t,r){var o;return(0,a.default)(this,n),(o=e.call(this)).isSigned=t,o.bitWidth=r,o}return(0,l.default)(n,[{key:"typeId",get:function(){return c.Type.Int}},{key:"ArrayType",get:function(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:case 64:return this.isSigned?Int32Array:Uint32Array;default:throw new Error("Unrecognized ".concat(this[Symbol.toStringTag]," type"))}}},{key:Symbol.toStringTag,get:function(){return"Int"}},{key:"toString",value:function(){return"".concat(this.isSigned?"I":"Ui","nt").concat(this.bitWidth)}}]),n}(f);e.Int=h;var y=function(t){(0,o.default)(n,t);var e=s(n);function n(){return(0,a.default)(this,n),e.call(this,!0,8)}return n}(h);e.Int8=y;var v=function(t){(0,o.default)(n,t);var e=s(n);function n(){return(0,a.default)(this,n),e.call(this,!0,16)}return n}(h);e.Int16=v;var m=function(t){(0,o.default)(n,t);var e=s(n);function n(){return(0,a.default)(this,n),e.call(this,!0,32)}return n}(h);e.Int32=m;var b=function(t){(0,o.default)(n,t);var e=s(n);function n(){return(0,a.default)(this,n),e.call(this,!0,64)}return n}(h);e.Int64=b;var g=function(t){(0,o.default)(n,t);var e=s(n);function n(){return(0,a.default)(this,n),e.call(this,!1,8)}return n}(h);e.Uint8=g;var w=function(t){(0,o.default)(n,t);var e=s(n);function n(){return(0,a.default)(this,n),e.call(this,!1,16)}return n}(h);e.Uint16=w;var x=function(t){(0,o.default)(n,t);var e=s(n);function n(){return(0,a.default)(this,n),e.call(this,!1,32)}return n}(h);e.Uint32=x;var O=function(t){(0,o.default)(n,t);var e=s(n);function n(){return(0,a.default)(this,n),e.call(this,!1,64)}return n}(h);e.Uint64=O;var T=16,S=32,_=64,j=function(t){(0,o.default)(n,t);var e=s(n);function n(t){var r;return(0,a.default)(this,n),(r=e.call(this)).precision=t,r}return(0,l.default)(n,[{key:"typeId",get:function(){return c.Type.Float}},{key:"ArrayType",get:function(){switch(this.precision){case T:return Uint16Array;case S:return Float32Array;case _:return Float64Array;default:throw new Error("Unrecognized ".concat(this[Symbol.toStringTag]," type"))}}},{key:Symbol.toStringTag,get:function(){return"Float"}},{key:"toString",value:function(){return"Float".concat(this.precision)}}]),n}(f);e.Float=j;var I=function(t){(0,o.default)(n,t);var e=s(n);function n(){return(0,a.default)(this,n),e.call(this,T)}return n}(j);e.Float16=I;var M=function(t){(0,o.default)(n,t);var e=s(n);function n(){return(0,a.default)(this,n),e.call(this,S)}return n}(j);e.Float32=M;var k=function(t){(0,o.default)(n,t);var e=s(n);function n(){return(0,a.default)(this,n),e.call(this,_)}return n}(j);e.Float64=k;var P=function(t){(0,o.default)(n,t);var e=s(n);function n(){return(0,a.default)(this,n),e.apply(this,arguments)}return(0,l.default)(n,[{key:"typeId",get:function(){return c.Type.Utf8}},{key:"ArrayType",get:function(){return Uint8Array}},{key:Symbol.toStringTag,get:function(){return"Utf8"}},{key:"toString",value:function(){return"Utf8"}}]),n}(f);e.Utf8=P;var A={DAY:0,MILLISECOND:1},D=function(t){(0,o.default)(n,t);var e=s(n);function n(t){var r;return(0,a.default)(this,n),(r=e.call(this)).unit=t,r}return(0,l.default)(n,[{key:"typeId",get:function(){return c.Type.Date}},{key:"ArrayType",get:function(){return Int32Array}},{key:Symbol.toStringTag,get:function(){return"Date"}},{key:"toString",value:function(){return"Date".concat(32*(this.unit+1),"<").concat(A[this.unit],">")}}]),n}(f);e.Date=D;var L=function(t){(0,o.default)(n,t);var e=s(n);function n(){return(0,a.default)(this,n),e.call(this,A.DAY)}return n}(D);e.DateDay=L;var U=function(t){(0,o.default)(n,t);var e=s(n);function n(){return(0,a.default)(this,n),e.call(this,A.MILLISECOND)}return n}(D);e.DateMillisecond=U;var N={SECOND:1,MILLISECOND:1e3,MICROSECOND:1e6,NANOSECOND:1e9},E=function(t){(0,o.default)(n,t);var e=s(n);function n(t,r){var o;return(0,a.default)(this,n),(o=e.call(this)).unit=t,o.bitWidth=r,o}return(0,l.default)(n,[{key:"typeId",get:function(){return c.Type.Time}},{key:"toString",value:function(){return"Time".concat(this.bitWidth,"<").concat(N[this.unit],">")}},{key:Symbol.toStringTag,get:function(){return"Time"}},{key:"ArrayType",get:function(){return Int32Array}}]),n}(f);e.Time=E;var F=function(t){(0,o.default)(n,t);var e=s(n);function n(){return(0,a.default)(this,n),e.call(this,N.SECOND,32)}return n}(E);e.TimeSecond=F;var C=function(t){(0,o.default)(n,t);var e=s(n);function n(){return(0,a.default)(this,n),e.call(this,N.MILLISECOND,32)}return n}(E);e.TimeMillisecond=C;var B=function(t){(0,o.default)(n,t);var e=s(n);function n(t){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return(0,a.default)(this,n),(r=e.call(this)).unit=t,r.timezone=o,r}return(0,l.default)(n,[{key:"typeId",get:function(){return c.Type.Timestamp}},{key:"ArrayType",get:function(){return Int32Array}},{key:Symbol.toStringTag,get:function(){return"Timestamp"}},{key:"toString",value:function(){return"Timestamp<".concat(N[this.unit]).concat(this.timezone?", ".concat(this.timezone):"",">")}}]),n}(f);e.Timestamp=B;var z=function(t){(0,o.default)(n,t);var e=s(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return(0,a.default)(this,n),e.call(this,N.SECOND,t)}return n}(B);e.TimestampSecond=z;var R=function(t){(0,o.default)(n,t);var e=s(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return(0,a.default)(this,n),e.call(this,N.MILLISECOND,t)}return n}(B);e.TimestampMillisecond=R;var X=function(t){(0,o.default)(n,t);var e=s(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return(0,a.default)(this,n),e.call(this,N.MICROSECOND,t)}return n}(B);e.TimestampMicrosecond=X;var Y=function(t){(0,o.default)(n,t);var e=s(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return(0,a.default)(this,n),e.call(this,N.NANOSECOND,t)}return n}(B);e.TimestampNanosecond=Y;var q={DAY_TIME:0,YEAR_MONTH:1},G=function(t){(0,o.default)(n,t);var e=s(n);function n(t){var r;return(0,a.default)(this,n),(r=e.call(this)).unit=t,r}return(0,l.default)(n,[{key:"typeId",get:function(){return c.Type.Interval}},{key:"ArrayType",get:function(){return Int32Array}},{key:Symbol.toStringTag,get:function(){return"Interval"}},{key:"toString",value:function(){return"Interval<".concat(q[this.unit],">")}}]),n}(f);e.Interval=G;var J=function(t){(0,o.default)(n,t);var e=s(n);function n(){return(0,a.default)(this,n),e.call(this,q.DAY_TIME)}return n}(G);e.IntervalDayTime=J;var W=function(t){(0,o.default)(n,t);var e=s(n);function n(){return(0,a.default)(this,n),e.call(this,q.YEAR_MONTH)}return n}(G);e.IntervalYearMonth=W;var H=function(t){(0,o.default)(n,t);var e=s(n);function n(t,r){var o;return(0,a.default)(this,n),(o=e.call(this)).listSize=t,o.children=[r],o}return(0,l.default)(n,[{key:"typeId",get:function(){return c.Type.FixedSizeList}},{key:"valueType",get:function(){return this.children[0].type}},{key:"valueField",get:function(){return this.children[0]}},{key:"ArrayType",get:function(){return this.valueType.ArrayType}},{key:Symbol.toStringTag,get:function(){return"FixedSizeList"}},{key:"toString",value:function(){return"FixedSizeList[".concat(this.listSize,"]<").concat(this.valueType,">")}}]),n}(f);e.FixedSizeList=H},function(t,e){function n(e,r){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t.exports.default=t.exports,t.exports.__esModule=!0,n(e,r)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.default=t.exports,t.exports.__esModule=!0,n(e)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(18)),i=r(n(1)),u=r(n(2)),a=n(9);function l(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return u=t.done,t},e:function(t){a=!0,i=t},f:function(){try{u||null==n.return||n.return()}finally{if(a)throw i}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var s=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;(0,i.default)(this,t),(0,a.assert)(Array.isArray(e)),f(e),this.fields=e,this.metadata=n||new Map}return(0,u.default)(t,[{key:"compareTo",value:function(t){if(this.fields.metadata!==t.fields.metadata)return!1;if(this.fields.length!==t.fields.length)return!1;for(var e=0;e<this.fields.length;++e)if(!this.fields[e].compareTo(t.fields[e]))return!1;return!0}},{key:"select",value:function(){for(var e=Object.create(null),n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];for(var i=0,u=r;i<u.length;i++){var a=u[i];e[a]=!0}var l=r.filter((function(t){return e[t.name]}));return new t(l,this.metadata)}},{key:"selectAt",value:function(){for(var e=this,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=r.map((function(t){return e.fields[t]})).filter(Boolean);return new t(i,this.metadata)}},{key:"assign",value:function(e){var n=this.metadata,r=e;if(e instanceof t){var o=e;r=o.fields,n=d(d(new Map,this.metadata),o.metadata)}var i,u=Object.create(null),a=l(this.fields);try{for(a.s();!(i=a.n()).done;){var c=i.value;u[c.name]=c}}catch(t){a.e(t)}finally{a.f()}var s,f=l(r);try{for(f.s();!(s=f.n()).done;){var p=s.value;u[p.name]=p}}catch(t){f.e(t)}finally{f.f()}return new t(Object.values(u),n)}}]),t}();function f(t){var e,n={},r=l(t);try{for(r.s();!(e=r.n()).done;){var o=e.value;n[o.name]&&console.warn("Schema: duplicated field name",o.name,o),n[o.name]=!0}}catch(t){r.e(t)}finally{r.f()}}function d(t,e){return new Map([].concat((0,o.default)(t||new Map),(0,o.default)(e||new Map)))}e.default=s},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assert=function(t,e){if(!t)throw new Error(e||"loader assertion failed.")}},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(3)),i=r(n(1)),u=r(n(2)),a=n(9),l=n(4),c=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Map;(0,i.default)(this,t),(0,a.assert)("string"==typeof e),(0,a.assert)(!n||n instanceof l.DataType),(0,a.assert)("boolean"==typeof r),(0,a.assert)(!u||"object"===(0,o.default)(u)),this.name=e,this.type=n,this.nullable=r,this.metadata=u}return(0,u.default)(t,[{key:"typeId",get:function(){return this.type&&this.type.typeId}},{key:"clone",value:function(){return new t(this.name,this.type,this.nullable,this.metadata)}},{key:"compareTo",value:function(t){return this.name===t.name&&this.type===t.type&&this.nullable===t.nullable&&this.metadata===t.metadata}},{key:"toString",value:function(){return"".concat(this.type).concat(this.nullable?", nullable":"").concat(this.metadata?", metadata: ".concat(this.metadata):"")}}]),t}();e.default=c},function(t,e,n){var r=n(5);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(3).default,o=n(23);t.exports=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?o(t):e},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Type=void 0;e.Type={NONE:0,Null:1,Int:2,Float:3,Binary:4,Utf8:5,Bool:6,Decimal:7,Date:8,Time:9,Timestamp:10,Interval:11,List:12,Struct:13,Union:14,FixedSizeBinary:15,FixedSizeList:16,Map:17,Dictionary:-1,Int8:-2,Int16:-3,Int32:-4,Int64:-5,Uint8:-6,Uint16:-7,Uint32:-8,Uint64:-9,Float16:-10,Float32:-11,Float64:-12,DateDay:-13,DateMillisecond:-14,TimestampSecond:-15,TimestampMillisecond:-16,TimestampMicrosecond:-17,TimestampNanosecond:-18,TimeSecond:-19,TimeMillisecond:-20,TimeMicrosecond:-21,TimeNanosecond:-22,DenseUnion:-23,SparseUnion:-24,IntervalDayTime:-25,IntervalYearMonth:-26}},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";(function(e){var r=n(17),o="undefined"==typeof window?e:window;o.loaders=o.loaders||{},t.exports=Object.assign(o.loaders,r)}).call(this,n(16))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Schema",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"Field",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"deduceTableSchema",{enumerable:!0,get:function(){return u.deduceTableSchema}}),Object.defineProperty(e,"TableBatchBuilder",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"RowTableBatch",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"ColumnarTableBatch",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"JSONLoader",{enumerable:!0,get:function(){return s.JSONLoader}}),Object.defineProperty(e,"XMLLoader",{enumerable:!0,get:function(){return f.XMLLoader}}),Object.defineProperty(e,"AsyncQueue",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"getTypeInfo",{enumerable:!0,get:function(){return p.getTypeInfo}}),Object.defineProperty(e,"DataType",{enumerable:!0,get:function(){return h.DataType}}),Object.defineProperty(e,"Null",{enumerable:!0,get:function(){return h.Null}}),Object.defineProperty(e,"Bool",{enumerable:!0,get:function(){return h.Bool}}),Object.defineProperty(e,"Int",{enumerable:!0,get:function(){return h.Int}}),Object.defineProperty(e,"Int8",{enumerable:!0,get:function(){return h.Int8}}),Object.defineProperty(e,"Int16",{enumerable:!0,get:function(){return h.Int16}}),Object.defineProperty(e,"Int32",{enumerable:!0,get:function(){return h.Int32}}),Object.defineProperty(e,"Int64",{enumerable:!0,get:function(){return h.Int64}}),Object.defineProperty(e,"Uint8",{enumerable:!0,get:function(){return h.Uint8}}),Object.defineProperty(e,"Uint16",{enumerable:!0,get:function(){return h.Uint16}}),Object.defineProperty(e,"Uint32",{enumerable:!0,get:function(){return h.Uint32}}),Object.defineProperty(e,"Uint64",{enumerable:!0,get:function(){return h.Uint64}}),Object.defineProperty(e,"Float",{enumerable:!0,get:function(){return h.Float}}),Object.defineProperty(e,"Float16",{enumerable:!0,get:function(){return h.Float16}}),Object.defineProperty(e,"Float32",{enumerable:!0,get:function(){return h.Float32}}),Object.defineProperty(e,"Float64",{enumerable:!0,get:function(){return h.Float64}}),Object.defineProperty(e,"Utf8",{enumerable:!0,get:function(){return h.Utf8}}),Object.defineProperty(e,"Date",{enumerable:!0,get:function(){return h.Date}}),Object.defineProperty(e,"DateDay",{enumerable:!0,get:function(){return h.DateDay}}),Object.defineProperty(e,"DateMillisecond",{enumerable:!0,get:function(){return h.DateMillisecond}}),Object.defineProperty(e,"Time",{enumerable:!0,get:function(){return h.Time}}),Object.defineProperty(e,"TimeMillisecond",{enumerable:!0,get:function(){return h.TimeMillisecond}}),Object.defineProperty(e,"TimeSecond",{enumerable:!0,get:function(){return h.TimeSecond}}),Object.defineProperty(e,"Timestamp",{enumerable:!0,get:function(){return h.Timestamp}}),Object.defineProperty(e,"TimestampSecond",{enumerable:!0,get:function(){return h.TimestampSecond}}),Object.defineProperty(e,"TimestampMillisecond",{enumerable:!0,get:function(){return h.TimestampMillisecond}}),Object.defineProperty(e,"TimestampMicrosecond",{enumerable:!0,get:function(){return h.TimestampMicrosecond}}),Object.defineProperty(e,"TimestampNanosecond",{enumerable:!0,get:function(){return h.TimestampNanosecond}}),Object.defineProperty(e,"Interval",{enumerable:!0,get:function(){return h.Interval}}),Object.defineProperty(e,"IntervalDayTime",{enumerable:!0,get:function(){return h.IntervalDayTime}}),Object.defineProperty(e,"IntervalYearMonth",{enumerable:!0,get:function(){return h.IntervalYearMonth}}),Object.defineProperty(e,"FixedSizeList",{enumerable:!0,get:function(){return h.FixedSizeList}});var o=r(n(7)),i=r(n(10)),u=n(24),a=r(n(25)),l=r(n(26)),c=r(n(27)),s=n(28),f=n(29),d=r(n(32)),p=n(40),h=n(4)},function(t,e,n){var r=n(19),o=n(20),i=n(21),u=n(22);t.exports=function(t){return r(t)||o(t)||i(t)||u()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(8);t.exports=function(t){if(Array.isArray(t))return r(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(8);t.exports=function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.deduceTableSchema=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Array.isArray(t)?s(t):c(t);return Object.assign(n,e)};var o=n(4),i=r(n(7)),u=r(n(10)),a={Int8Array:new o.Int8,Int16Array:new o.Int16,Int32Array:new o.Int32,Uint8Array:new o.Uint8,Uint8ClampedArray:new o.Uint8,Uint16Array:new o.Uint16,Uint32Array:new o.Uint32,Float32Array:new o.Float32,Float64Array:new o.Float64};function l(t){var e=t.constructor&&t.constructor.name,n=a[e];if(n)return{type:n,nullable:!1,metadata:null};var r=null;t.length>0&&((n=f(t[0]))&&(r=new Map([["type",n.toString()]])));return{type:new o.Null,nullable:!0,metadata:r}}function c(t){var e=[];for(var n in t){var r=l(t[n]),o=r.type,a=r.nullable,c=r.metadata;e.push(new u.default(n,o,a,c||new Map))}return new i.default(e)}function s(t){var e=[];if(t.length){var n=t[0];if(Array.isArray(n))for(var r=0;r<n.length;++r){var a=n[r],l=String(r),c=f(a),s=new Map([["type",c.toString()]]);e.push(new u.default(l,new o.Null,!0,s))}else for(var d in n){var p=f(n[d]),h=new Map([["type",p.toString()]]);e.push(new u.default(d,new o.Null,!0,h))}}return new i.default(e)}function f(t){return!0===t||!1===t?new o.Bool:t instanceof Date?new o.TimestampMillisecond:t instanceof Number?new o.Float32:"string"==typeof t?new o.Utf8:new o.Null}"undefined"!=typeof BigInt64Array&&(a.BigInt64Array=new o.Int64,a.BigUint64Array=new o.Uint64)},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(14)),i=r(n(1)),u=r(n(2));function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){(0,o.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var c={batchSize:100},s=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,i.default)(this,t),this.TableBatchType=e,this.schema=n,this.options=l(l({},c),r),this.batch=null,this.batchCount=0,this.bytesUsed=0}return(0,u.default)(t,[{key:"addRow",value:function(t){if(!this.batch){var e=this.TableBatchType;this.batch=new e(this.schema,this.options)}this.batch.addRow(t)}},{key:"chunkComplete",value:function(t){this.bytesUsed+=t.byteLength||t.length||0,this.batch&&this.batch.chunkComplete()}},{key:"isFull",value:function(){return this.batch&&this.batch.isFull()}},{key:"hasBatch",value:function(){return Boolean(this.batch)}},{key:"getBatch",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Number.isFinite(t.bytesUsed)&&(this.bytesUsed=t.bytesUsed),this.batch){var e=this.batch.getBatch();return this.batch=null,e.count=this.batchCount,this.batchCount++,e.bytesUsed=this.bytesUsed,Object.assign(e,t),e}return null}}]),t}();e.default=s},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(14)),i=r(n(1)),u=r(n(2));function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){(0,o.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var c={batchSize:"auto",convertToObject:!0,optimizeMemoryUsage:!1},s=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((0,i.default)(this,t),n=l(l({},c),n),this.schema=e,this.batchSize=n.batchSize,this.convertToObject=n.convertToObject,this.optimizeMemoryUsage=n.optimizeMemoryUsage,this.rows=null,this.length=0,this.isChunkComplete=!1,this.cursor=0,!Array.isArray(e))for(var r in this._headers=[],e)this._headers[e[r].index]=e[r].name}return(0,u.default)(t,[{key:"addRow",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.rows||(this.rows=new Array(this.batchSize),this.length=0),Number.isFinite(e)&&(this.cursor=e);var n=this.convertToObject&&this.schema;this.rows[this.length]=n?f(t,this._headers):t,this.optimizeMemoryUsage&&(this.rows[this.length]=JSON.parse(JSON.stringify(this.rows[this.length]))),this.length++}},{key:"chunkComplete",value:function(){this.isChunkComplete=!0}},{key:"isFull",value:function(){return"auto"===this.batchSize?this.isChunkComplete&&this.length>0:this.rows&&this.length>=this.batchSize}},{key:"getBatch",value:function(){if(this.rows){var t=this.rows.slice(0,this.length);return this.rows=null,this.isChunkComplete=!1,{data:t,schema:this.schema,length:t.length,cursor:this.cursor}}return null}}]),t}();function f(t,e){if(!t)throw new Error("null row");if(!Array.isArray(t))return t;if(!e)return t;for(var n={},r=0;r<e.length;r++)n[e[r]]=t[r];return n}e.default=s},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(1)),i=r(n(2)),u=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.default)(this,t),this.schema=e,this.batchSize=n.batchSize||"auto",this.length=0,this.allocated=0,this.columns=null,this.isChunkComplete=!1,this.reallocateColumns()}return(0,i.default)(t,[{key:"addRow",value:function(t){for(var e in this.reallocateColumns(),t)this.columns[e][this.length]=t[e];this.length++}},{key:"chunkComplete",value:function(){this.isChunkComplete=!0}},{key:"isFull",value:function(){return"auto"===this.batchSize?this.isChunkComplete:this.length>=this.allocated}},{key:"getBatch",value:function(){this.pruneColumns();var t=Array.isArray(this.schema)?this.columns:{};if(!Array.isArray(this.schema))for(var e in this.schema){var n=this.schema[e];t[n.name]=this.columns[n.index]}return this.columns=null,this.isChunkComplete=!1,{data:t,schema:this.schema,length:this.length}}},{key:"reallocateColumns",value:function(){if(!(this.length<this.allocated))for(var t in this.allocated=this.allocated>0?this.allocated*=2:this.batchSize,this.columns=[],this.schema){var e=this.schema[t],n=e.type||Float32Array,r=this.columns[e.index];if(r&&ArrayBuffer.isView(r)){var o=new n(this.allocated);o.set(r),this.columns[e.index]=o}else r?(r.length=this.allocated,this.columns[e.index]=r):this.columns[e.index]=new n(this.allocated)}}},{key:"pruneColumns",value:function(){var t=this;this.columns=this.columns.map((function(e){return e.slice(0,t.length)}))}}]),t}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSONLoader=void 0;var r={name:"JSON",extensions:["json"],testText:null,parseTextSync:function(t,e){return JSON.parse(t)}};e.JSONLoader=r},function(t,e,n){"use strict";var r=n(30);Object.defineProperty(e,"__esModule",{value:!0}),e.XMLLoader=void 0;var o=r(n(31)),i={name:"XML",extensions:["zml"],supported:(0,o.parseXMLSupported)(),testText:function(t){return t.startsWith("<?xml")},parseTextSync:o.default,browserOnly:!0,worker:!1};e.XMLLoader=i},function(t,e,n){var r=n(3).default;function o(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return o=function(){return t},t}t.exports=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==r(t)&&"function"!=typeof t)return{default:t};var e=o();if(e&&e.has(t))return e.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in t)if(Object.prototype.hasOwnProperty.call(t,u)){var a=i?Object.getOwnPropertyDescriptor(t,u):null;a&&(a.get||a.set)?Object.defineProperty(n,u,a):n[u]=t[u]}return n.default=t,e&&e.set(t,n),n},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if(window.DOMParser){var e=(new window.DOMParser).parseFromString(t,"application/xml"),n=function(t){var e=(new DOMParser).parseFromString("<","text/xml").getElementsByTagName("parsererror")[0].namespaceURI;if("http://www.w3.org/1999/xhtml"===e){var n=t.getElementsByTagName("parsererror");return n.length?n[0].innerHTML:null}return t.getElementsByTagNameNS(e,"parsererror").length>0}(e);if(n)throw new Error(n);return e}if(void 0!==window.ActiveXObject){var r=new window.ActiveXObject("Microsoft.XMLDOM");if(r)return r.async="false",r.loadXML(t),r}throw new Error("No XML parser available")},e.parseXMLSupported=function(){if("undefined"==typeof window)return!1;if(window.DOMParser)return!0;if(void 0!==window.ActiveXObject&&new window.ActiveXObject("Microsoft.XMLDOM"))return!0;return!1}},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.takeAsync=function(t){return p.apply(this,arguments)},e.default=void 0;var o=r(n(33)),i=r(n(35)),u=r(n(1)),a=r(n(2)),l=r(n(11)),c=r(n(12)),s=r(n(6));function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=(0,s.default)(t);if(e){var o=(0,s.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,c.default)(this,n)}}var d=function(t){(0,l.default)(n,t);var e=f(n);function n(){return(0,u.default)(this,n),e.apply(this,arguments)}return(0,a.default)(n,[{key:"enqueue",value:function(t){return this.push(t)}},{key:"dequeue",value:function(){return this.shift()}}]),n}((0,r(n(36)).default)(Array));function p(){return(p=(0,i.default)(o.default.mark((function t(e){var n,r,i,u,a,l=arguments;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=l.length>1&&void 0!==l[1]?l[1]:1/0,r=[],i=e[Symbol.asyncIterator]();case 3:if(!(r.length<n)){t.next=14;break}return t.next=6,i.next();case 6:if(u=t.sent,a=u.value,!u.done){t.next=11;break}return t.abrupt("break",14);case 11:r.push(a),t.next=3;break;case 14:return t.abrupt("return",r);case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var h=function(){function t(){(0,u.default)(this,t),this._values=new d,this._settlers=new d,this._closed=!1}return(0,a.default)(t,[{key:"close",value:function(){for(;this._settlers.length>0;)this._settlers.dequeue().resolve({done:!0});this._closed=!0}},{key:Symbol.asyncIterator,value:function(){return this}},{key:"enqueue",value:function(t){if(this._closed)throw new Error("Closed");if(this._settlers.length>0){if(this._values.length>0)throw new Error("Illegal internal state");var e=this._settlers.dequeue();t instanceof Error?e.reject(t):e.resolve({value:t})}else this._values.enqueue(t)}},{key:"next",value:function(){var t=this;if(this._values.length>0){var e=this._values.dequeue();return e instanceof Error?Promise.reject(e):Promise.resolve({value:e})}if(this._closed){if(this._settlers.length>0)throw new Error("Illegal internal state");return Promise.resolve({done:!0})}return new Promise((function(e,n){t._settlers.enqueue({resolve:e,reject:n})}))}}]),t}();e.default=h},function(t,e,n){t.exports=n(34)},function(t,e,n){var r=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",u=r.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),u=new T(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return _()}for(n.method=o,n.arg=i;;){var u=n.delegate;if(u){var a=w(u,n);if(a){if(a===s)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(t,e,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===s)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(t,n,u),i}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var s={};function f(){}function d(){}function p(){}var h={};h[o]=function(){return this};var y=Object.getPrototypeOf,v=y&&y(y(S([])));v&&v!==e&&n.call(v,o)&&(h=v);var m=p.prototype=f.prototype=Object.create(h);function b(t){["next","throw","return"].forEach((function(e){a(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){var r;this._invoke=function(o,i){function u(){return new e((function(r,u){!function r(o,i,u,a){var l=c(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,u,a)}),(function(t){r("throw",t,u,a)})):e.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return r("throw",t,u,a)}))}a(l.arg)}(o,i,r,u)}))}return r=r?r.then(u,u):u()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,s;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:_}}function _(){return{value:void 0,done:!0}}return d.prototype=m.constructor=p,p.constructor=d,d.displayName=a(p,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,u,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(g.prototype),g.prototype[i]=function(){return this},t.AsyncIterator=g,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var u=new g(l(e,n,r,o),i);return t.isGeneratorFunction(n)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},b(m),a(m,u,"Generator"),m[o]=function(){return this},m.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return u.type="throw",u.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var a=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(a&&l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var u=i?i.completion:{};return u.type=t,u.arg=e,i?(this.method="next",this.next=i.finallyLoc,s):this.complete(u)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e){function n(t,e,n,r,o,i,u){try{var a=t[i](u),l=a.value}catch(t){return void n(t)}a.done?e(l):Promise.resolve(l).then(r,o)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var u=t.apply(e,r);function a(t){n(u,o,i,a,l,"next",t)}function l(t){n(u,o,i,a,l,"throw",t)}a(void 0)}))}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(6),o=n(5),i=n(37),u=n(38);function a(e){var n="function"==typeof Map?new Map:void 0;return t.exports=a=function(t){if(null===t||!i(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,e)}function e(){return u(t,arguments,r(this).constructor)}return e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),o(e,t)},t.exports.default=t.exports,t.exports.__esModule=!0,a(e)}t.exports=a,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){return-1!==Function.toString.call(t).indexOf("[native code]")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(5),o=n(39);function i(e,n,u){return o()?(t.exports=i=Reflect.construct,t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=i=function(t,e,n){var o=[null];o.push.apply(o,e);var i=new(Function.bind.apply(t,o));return n&&r(i,n.prototype),i},t.exports.default=t.exports,t.exports.__esModule=!0),i.apply(null,arguments)}t.exports=i,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTypeInfo=function(t){return{typeId:t.typeId,ArrayType:t.ArrayType,typeName:t.toString(),typeEnumName:i(t.typeId),precision:t.precision}};var r=n(13);var o=null;function i(t){if(!o)for(var e in o={},r.Type)o[r.Type[e]]=e;return o[t]}}]); | ||
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=14)}([function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Type",{enumerable:!0,get:function(){return b.Type}}),e.FixedSizeList=e.IntervalYearMonth=e.IntervalDayTime=e.Interval=e.TimestampNanosecond=e.TimestampMicrosecond=e.TimestampMillisecond=e.TimestampSecond=e.Timestamp=e.TimeMillisecond=e.TimeSecond=e.Time=e.DateMillisecond=e.DateDay=e.Date=e.Utf8=e.Float64=e.Float32=e.Float16=e.Float=e.Uint64=e.Uint32=e.Uint16=e.Uint8=e.Int64=e.Int32=e.Int16=e.Int8=e.Int=e.Bool=e.Null=e.DataType=void 0;var i,o,a,u,l,c,s,f=r(n(10)),d=r(n(3)),p=r(n(11)),h=r(n(12)),y=r(n(6)),v=r(n(1)),m=r(n(2)),b=n(24);function g(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=(0,y.default)(t);if(e){var i=(0,y.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,h.default)(this,n)}}var w=function(){function t(){(0,v.default)(this,t)}return(0,m.default)(t,[{key:"typeId",get:function(){return b.Type.NONE}},{key:"compareTo",value:function(t){return this===t}}],[{key:"isNull",value:function(t){return t&&t.typeId===b.Type.Null}},{key:"isInt",value:function(t){return t&&t.typeId===b.Type.Int}},{key:"isFloat",value:function(t){return t&&t.typeId===b.Type.Float}},{key:"isBinary",value:function(t){return t&&t.typeId===b.Type.Binary}},{key:"isUtf8",value:function(t){return t&&t.typeId===b.Type.Utf8}},{key:"isBool",value:function(t){return t&&t.typeId===b.Type.Bool}},{key:"isDecimal",value:function(t){return t&&t.typeId===b.Type.Decimal}},{key:"isDate",value:function(t){return t&&t.typeId===b.Type.Date}},{key:"isTime",value:function(t){return t&&t.typeId===b.Type.Time}},{key:"isTimestamp",value:function(t){return t&&t.typeId===b.Type.Timestamp}},{key:"isInterval",value:function(t){return t&&t.typeId===b.Type.Interval}},{key:"isList",value:function(t){return t&&t.typeId===b.Type.List}},{key:"isStruct",value:function(t){return t&&t.typeId===b.Type.Struct}},{key:"isUnion",value:function(t){return t&&t.typeId===b.Type.Union}},{key:"isFixedSizeBinary",value:function(t){return t&&t.typeId===b.Type.FixedSizeBinary}},{key:"isFixedSizeList",value:function(t){return t&&t.typeId===b.Type.FixedSizeList}},{key:"isMap",value:function(t){return t&&t.typeId===b.Type.Map}},{key:"isDictionary",value:function(t){return t&&t.typeId===b.Type.Dictionary}}]),t}();e.DataType=w;var x=function(t){(0,p.default)(n,t);var e=g(n);function n(){return(0,v.default)(this,n),e.apply(this,arguments)}return(0,m.default)(n,[{key:"typeId",get:function(){return b.Type.Null}},{key:Symbol.toStringTag,get:function(){return"Null"}},{key:"toString",value:function(){return"Null"}}]),n}(w);e.Null=x;var O=function(t){(0,p.default)(n,t);var e=g(n);function n(){return(0,v.default)(this,n),e.apply(this,arguments)}return(0,m.default)(n,[{key:"typeId",get:function(){return b.Type.Bool}},{key:Symbol.toStringTag,get:function(){return"Bool"}},{key:"toString",value:function(){return"Bool"}}]),n}(w);e.Bool=O,i=Symbol.toStringTag;var T=function(t){(0,p.default)(n,t);var e=g(n);function n(t,r){var i;return(0,v.default)(this,n),i=e.call(this),(0,d.default)((0,f.default)(i),"isSigned",void 0),(0,d.default)((0,f.default)(i),"bitWidth",void 0),i.isSigned=t,i.bitWidth=r,i}return(0,m.default)(n,[{key:"typeId",get:function(){return b.Type.Int}},{key:i,get:function(){return"Int"}},{key:"toString",value:function(){return"".concat(this.isSigned?"I":"Ui","nt").concat(this.bitWidth)}}]),n}(w);e.Int=T;var S=function(t){(0,p.default)(n,t);var e=g(n);function n(){return(0,v.default)(this,n),e.call(this,!0,8)}return n}(T);e.Int8=S;var _=function(t){(0,p.default)(n,t);var e=g(n);function n(){return(0,v.default)(this,n),e.call(this,!0,16)}return n}(T);e.Int16=_;var j=function(t){(0,p.default)(n,t);var e=g(n);function n(){return(0,v.default)(this,n),e.call(this,!0,32)}return n}(T);e.Int32=j;var M=function(t){(0,p.default)(n,t);var e=g(n);function n(){return(0,v.default)(this,n),e.call(this,!0,64)}return n}(T);e.Int64=M;var I=function(t){(0,p.default)(n,t);var e=g(n);function n(){return(0,v.default)(this,n),e.call(this,!1,8)}return n}(T);e.Uint8=I;var k=function(t){(0,p.default)(n,t);var e=g(n);function n(){return(0,v.default)(this,n),e.call(this,!1,16)}return n}(T);e.Uint16=k;var P=function(t){(0,p.default)(n,t);var e=g(n);function n(){return(0,v.default)(this,n),e.call(this,!1,32)}return n}(T);e.Uint32=P;var D=function(t){(0,p.default)(n,t);var e=g(n);function n(){return(0,v.default)(this,n),e.call(this,!1,64)}return n}(T);e.Uint64=D;var L=16,N=32,F=64;o=Symbol.toStringTag;var U=function(t){(0,p.default)(n,t);var e=g(n);function n(t){var r;return(0,v.default)(this,n),r=e.call(this),(0,d.default)((0,f.default)(r),"precision",void 0),r.precision=t,r}return(0,m.default)(n,[{key:"typeId",get:function(){return b.Type.Float}},{key:o,get:function(){return"Float"}},{key:"toString",value:function(){return"Float".concat(this.precision)}}]),n}(w);e.Float=U;var E=function(t){(0,p.default)(n,t);var e=g(n);function n(){return(0,v.default)(this,n),e.call(this,L)}return n}(U);e.Float16=E;var A=function(t){(0,p.default)(n,t);var e=g(n);function n(){return(0,v.default)(this,n),e.call(this,N)}return n}(U);e.Float32=A;var C=function(t){(0,p.default)(n,t);var e=g(n);function n(){return(0,v.default)(this,n),e.call(this,F)}return n}(U);e.Float64=C;var B=function(t){(0,p.default)(n,t);var e=g(n);function n(){return(0,v.default)(this,n),e.apply(this,arguments)}return(0,m.default)(n,[{key:"typeId",get:function(){return b.Type.Utf8}},{key:Symbol.toStringTag,get:function(){return"Utf8"}},{key:"toString",value:function(){return"Utf8"}}]),n}(w);e.Utf8=B;var z={DAY:0,MILLISECOND:1};a=Symbol.toStringTag;var R=function(t){(0,p.default)(n,t);var e=g(n);function n(t){var r;return(0,v.default)(this,n),r=e.call(this),(0,d.default)((0,f.default)(r),"unit",void 0),r.unit=t,r}return(0,m.default)(n,[{key:"typeId",get:function(){return b.Type.Date}},{key:a,get:function(){return"Date"}},{key:"toString",value:function(){return"Date".concat(32*(this.unit+1),"<").concat(z[this.unit],">")}}]),n}(w);e.Date=R;var X=function(t){(0,p.default)(n,t);var e=g(n);function n(){return(0,v.default)(this,n),e.call(this,z.DAY)}return n}(R);e.DateDay=X;var Y=function(t){(0,p.default)(n,t);var e=g(n);function n(){return(0,v.default)(this,n),e.call(this,z.MILLISECOND)}return n}(R);e.DateMillisecond=Y;var W={SECOND:1,MILLISECOND:1e3,MICROSECOND:1e6,NANOSECOND:1e9};u=Symbol.toStringTag;var q=function(t){(0,p.default)(n,t);var e=g(n);function n(t,r){var i;return(0,v.default)(this,n),i=e.call(this),(0,d.default)((0,f.default)(i),"unit",void 0),(0,d.default)((0,f.default)(i),"bitWidth",void 0),i.unit=t,i.bitWidth=r,i}return(0,m.default)(n,[{key:"typeId",get:function(){return b.Type.Time}},{key:"toString",value:function(){return"Time".concat(this.bitWidth,"<").concat(W[this.unit],">")}},{key:u,get:function(){return"Time"}}]),n}(w);e.Time=q;var G=function(t){(0,p.default)(n,t);var e=g(n);function n(){return(0,v.default)(this,n),e.call(this,W.SECOND,32)}return n}(q);e.TimeSecond=G;var J=function(t){(0,p.default)(n,t);var e=g(n);function n(){return(0,v.default)(this,n),e.call(this,W.MILLISECOND,32)}return n}(q);e.TimeMillisecond=J,l=Symbol.toStringTag;var H=function(t){(0,p.default)(n,t);var e=g(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return(0,v.default)(this,n),r=e.call(this),(0,d.default)((0,f.default)(r),"unit",void 0),(0,d.default)((0,f.default)(r),"timezone",void 0),r.unit=t,r.timezone=i,r}return(0,m.default)(n,[{key:"typeId",get:function(){return b.Type.Timestamp}},{key:l,get:function(){return"Timestamp"}},{key:"toString",value:function(){return"Timestamp<".concat(W[this.unit]).concat(this.timezone?", ".concat(this.timezone):"",">")}}]),n}(w);e.Timestamp=H;var $=function(t){(0,p.default)(n,t);var e=g(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return(0,v.default)(this,n),e.call(this,W.SECOND,t)}return n}(H);e.TimestampSecond=$;var Q=function(t){(0,p.default)(n,t);var e=g(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return(0,v.default)(this,n),e.call(this,W.MILLISECOND,t)}return n}(H);e.TimestampMillisecond=Q;var V=function(t){(0,p.default)(n,t);var e=g(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return(0,v.default)(this,n),e.call(this,W.MICROSECOND,t)}return n}(H);e.TimestampMicrosecond=V;var K=function(t){(0,p.default)(n,t);var e=g(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return(0,v.default)(this,n),e.call(this,W.NANOSECOND,t)}return n}(H);e.TimestampNanosecond=K;var Z={DAY_TIME:0,YEAR_MONTH:1};c=Symbol.toStringTag;var tt=function(t){(0,p.default)(n,t);var e=g(n);function n(t){var r;return(0,v.default)(this,n),r=e.call(this),(0,d.default)((0,f.default)(r),"unit",void 0),r.unit=t,r}return(0,m.default)(n,[{key:"typeId",get:function(){return b.Type.Interval}},{key:c,get:function(){return"Interval"}},{key:"toString",value:function(){return"Interval<".concat(Z[this.unit],">")}}]),n}(w);e.Interval=tt;var et=function(t){(0,p.default)(n,t);var e=g(n);function n(){return(0,v.default)(this,n),e.call(this,Z.DAY_TIME)}return n}(tt);e.IntervalDayTime=et;var nt=function(t){(0,p.default)(n,t);var e=g(n);function n(){return(0,v.default)(this,n),e.call(this,Z.YEAR_MONTH)}return n}(tt);e.IntervalYearMonth=nt,s=Symbol.toStringTag;var rt=function(t){(0,p.default)(n,t);var e=g(n);function n(t,r){var i;return(0,v.default)(this,n),i=e.call(this),(0,d.default)((0,f.default)(i),"listSize",void 0),(0,d.default)((0,f.default)(i),"children",void 0),i.listSize=t,i.children=[r],i}return(0,m.default)(n,[{key:"typeId",get:function(){return b.Type.FixedSizeList}},{key:"valueType",get:function(){return this.children[0].type}},{key:"valueField",get:function(){return this.children[0]}},{key:s,get:function(){return"FixedSizeList"}},{key:"toString",value:function(){return"FixedSizeList[".concat(this.listSize,"]<").concat(this.valueType,">")}}]),n}(w);e.FixedSizeList=rt},function(t,e){function n(e,r){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t.exports.default=t.exports,t.exports.__esModule=!0,n(e,r)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.default=t.exports,t.exports.__esModule=!0,n(e)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(17)),o=r(n(1)),a=r(n(2)),u=r(n(3)),l=n(22);function c(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var f=function(){function t(e,n){(0,o.default)(this,t),(0,u.default)(this,"fields",void 0),(0,u.default)(this,"metadata",void 0),(0,l.assert)(Array.isArray(e)),function(t){var e,n={},r=c(t);try{for(r.s();!(e=r.n()).done;){var i=e.value;n[i.name]&&console.warn("Schema: duplicated field name",i.name,i),n[i.name]=!0}}catch(t){r.e(t)}finally{r.f()}}(e),this.fields=e,this.metadata=n||new Map}return(0,a.default)(t,[{key:"compareTo",value:function(t){if(this.metadata!==t.metadata)return!1;if(this.fields.length!==t.fields.length)return!1;for(var e=0;e<this.fields.length;++e)if(!this.fields[e].compareTo(t.fields[e]))return!1;return!0}},{key:"select",value:function(){for(var e=Object.create(null),n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o=0,a=r;o<a.length;o++){var u=a[o];e[u]=!0}var l=this.fields.filter((function(t){return e[t.name]}));return new t(l,this.metadata)}},{key:"selectAt",value:function(){for(var e=this,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=r.map((function(t){return e.fields[t]})).filter(Boolean);return new t(o,this.metadata)}},{key:"assign",value:function(e){var n,r=this.metadata;if(e instanceof t){var i=e;n=i.fields,r=d(d(new Map,this.metadata),i.metadata)}else n=e;var o,a=Object.create(null),u=c(this.fields);try{for(u.s();!(o=u.n()).done;){var l=o.value;a[l.name]=l}}catch(t){u.e(t)}finally{u.f()}var s,f=c(n);try{for(f.s();!(s=f.n()).done;){var p=s.value;a[p.name]=p}}catch(t){f.e(t)}finally{f.f()}return new t(Object.values(a),r)}}]),t}();function d(t,e){return new Map([].concat((0,i.default)(t||new Map),(0,i.default)(e||new Map)))}e.default=f},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(1)),o=r(n(2)),a=r(n(3)),u=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Map;(0,i.default)(this,t),(0,a.default)(this,"name",void 0),(0,a.default)(this,"type",void 0),(0,a.default)(this,"nullable",void 0),(0,a.default)(this,"metadata",void 0),this.name=e,this.type=n,this.nullable=r,this.metadata=o}return(0,o.default)(t,[{key:"typeId",get:function(){return this.type&&this.type.typeId}},{key:"clone",value:function(){return new t(this.name,this.type,this.nullable,this.metadata)}},{key:"compareTo",value:function(t){return this.name===t.name&&this.type===t.type&&this.nullable===t.nullable&&this.metadata===t.metadata}},{key:"toString",value:function(){return"".concat(this.type).concat(this.nullable?", nullable":"").concat(this.metadata?", metadata: ".concat(this.metadata):"")}}]),t}();e.default=u},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(5);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(13).default,i=n(10);t.exports=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?i(t):e},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=n=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),n(e)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";(function(e){var r=n(16),i="undefined"==typeof window?e:window;i.loaders=i.loaders||{},t.exports=Object.assign(i.loaders,r)}).call(this,n(15))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Schema",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"Field",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"deduceTableSchema",{enumerable:!0,get:function(){return a.deduceTableSchema}}),Object.defineProperty(e,"TableBatchBuilder",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"RowTableBatch",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"ColumnarTableBatch",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"JSONLoader",{enumerable:!0,get:function(){return s.JSONLoader}}),Object.defineProperty(e,"XMLLoader",{enumerable:!0,get:function(){return f.XMLLoader}}),Object.defineProperty(e,"AsyncQueue",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"getTypeInfo",{enumerable:!0,get:function(){return p.getTypeInfo}}),Object.defineProperty(e,"DataType",{enumerable:!0,get:function(){return h.DataType}}),Object.defineProperty(e,"Null",{enumerable:!0,get:function(){return h.Null}}),Object.defineProperty(e,"Bool",{enumerable:!0,get:function(){return h.Bool}}),Object.defineProperty(e,"Int",{enumerable:!0,get:function(){return h.Int}}),Object.defineProperty(e,"Int8",{enumerable:!0,get:function(){return h.Int8}}),Object.defineProperty(e,"Int16",{enumerable:!0,get:function(){return h.Int16}}),Object.defineProperty(e,"Int32",{enumerable:!0,get:function(){return h.Int32}}),Object.defineProperty(e,"Int64",{enumerable:!0,get:function(){return h.Int64}}),Object.defineProperty(e,"Uint8",{enumerable:!0,get:function(){return h.Uint8}}),Object.defineProperty(e,"Uint16",{enumerable:!0,get:function(){return h.Uint16}}),Object.defineProperty(e,"Uint32",{enumerable:!0,get:function(){return h.Uint32}}),Object.defineProperty(e,"Uint64",{enumerable:!0,get:function(){return h.Uint64}}),Object.defineProperty(e,"Float",{enumerable:!0,get:function(){return h.Float}}),Object.defineProperty(e,"Float16",{enumerable:!0,get:function(){return h.Float16}}),Object.defineProperty(e,"Float32",{enumerable:!0,get:function(){return h.Float32}}),Object.defineProperty(e,"Float64",{enumerable:!0,get:function(){return h.Float64}}),Object.defineProperty(e,"Utf8",{enumerable:!0,get:function(){return h.Utf8}}),Object.defineProperty(e,"Date",{enumerable:!0,get:function(){return h.Date}}),Object.defineProperty(e,"DateDay",{enumerable:!0,get:function(){return h.DateDay}}),Object.defineProperty(e,"DateMillisecond",{enumerable:!0,get:function(){return h.DateMillisecond}}),Object.defineProperty(e,"Time",{enumerable:!0,get:function(){return h.Time}}),Object.defineProperty(e,"TimeMillisecond",{enumerable:!0,get:function(){return h.TimeMillisecond}}),Object.defineProperty(e,"TimeSecond",{enumerable:!0,get:function(){return h.TimeSecond}}),Object.defineProperty(e,"Timestamp",{enumerable:!0,get:function(){return h.Timestamp}}),Object.defineProperty(e,"TimestampSecond",{enumerable:!0,get:function(){return h.TimestampSecond}}),Object.defineProperty(e,"TimestampMillisecond",{enumerable:!0,get:function(){return h.TimestampMillisecond}}),Object.defineProperty(e,"TimestampMicrosecond",{enumerable:!0,get:function(){return h.TimestampMicrosecond}}),Object.defineProperty(e,"TimestampNanosecond",{enumerable:!0,get:function(){return h.TimestampNanosecond}}),Object.defineProperty(e,"Interval",{enumerable:!0,get:function(){return h.Interval}}),Object.defineProperty(e,"IntervalDayTime",{enumerable:!0,get:function(){return h.IntervalDayTime}}),Object.defineProperty(e,"IntervalYearMonth",{enumerable:!0,get:function(){return h.IntervalYearMonth}}),Object.defineProperty(e,"FixedSizeList",{enumerable:!0,get:function(){return h.FixedSizeList}});var i=r(n(7)),o=r(n(9)),a=n(23),u=r(n(25)),l=r(n(26)),c=r(n(27)),s=n(28),f=n(29),d=r(n(31)),p=n(39),h=n(4)},function(t,e,n){var r=n(18),i=n(19),o=n(20),a=n(21);t.exports=function(t){return r(t)||i(t)||o(t)||a()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(8);t.exports=function(t){if(Array.isArray(t))return r(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(8);t.exports=function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assert=function(t,e){if(!t)throw new Error(e||"loader assertion failed.")}},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.deduceTableSchema=function(t,e){var n=Array.isArray(t)?function(t){var e=[];if(t.length){var n=t[0];if(Array.isArray(n))for(var r=0;r<n.length;++r){var u=n[r],l=String(r),s=c(u),f=new Map([["type",s.toString()]]);e.push(new a.default(l,new i.Null,!0,f))}else for(var d in n){var p=c(n[d]),h=new Map([["type",p.toString()]]);e.push(new a.default(d,new i.Null,!0,h))}}return new o.default(e)}(t):function(t){var e=[];for(var n in t){var r=l(t[n]),i=r.type,u=r.nullable,c=r.metadata;e.push(new a.default(n,i,u,c||new Map))}return new o.default(e)}(t);return Object.assign(n,e)};var i=n(4),o=r(n(7)),a=r(n(9)),u={Int8Array:new i.Int8,Int16Array:new i.Int16,Int32Array:new i.Int32,Uint8Array:new i.Uint8,Uint8ClampedArray:new i.Uint8,Uint16Array:new i.Uint16,Uint32Array:new i.Uint32,Float32Array:new i.Float32,Float64Array:new i.Float64};function l(t){var e=t.constructor&&t.constructor.name,n=u[e];if(n)return{type:n,nullable:!1,metadata:null};var r=null;t.length>0&&((n=c(t[0]))&&(r=new Map([["type",n.toString()]])));return{type:new i.Null,nullable:!0,metadata:r}}function c(t){return!0===t||!1===t?new i.Bool:t instanceof Date?new i.TimestampMillisecond:t instanceof Number?new i.Float32:"string"==typeof t?new i.Utf8:new i.Null}},function(t,e,n){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),e.Type=void 0,e.Type=r,function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth"}(r||(e.Type=r={}))},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(3)),o=r(n(1)),a=r(n(2));function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){(0,i.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var c={batchSize:100},s=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,o.default)(this,t),this.TableBatchType=e,this.schema=n,this.options=l(l({},c),r),this.batch=null,this.batchCount=0,this.bytesUsed=0}return(0,a.default)(t,[{key:"addRow",value:function(t){if(!this.batch){var e=this.TableBatchType;this.batch=new e(this.schema,this.options)}this.batch.addRow(t)}},{key:"chunkComplete",value:function(t){this.bytesUsed+=t.byteLength||t.length||0,this.batch&&this.batch.chunkComplete()}},{key:"isFull",value:function(){return this.batch&&this.batch.isFull()}},{key:"hasBatch",value:function(){return Boolean(this.batch)}},{key:"getBatch",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Number.isFinite(t.bytesUsed)&&(this.bytesUsed=t.bytesUsed),this.batch){var e=this.batch.getBatch();return this.batch=null,e.count=this.batchCount,this.batchCount++,e.bytesUsed=this.bytesUsed,Object.assign(e,t),e}return null}}]),t}();e.default=s},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(3)),o=r(n(1)),a=r(n(2));function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){(0,i.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var c={batchSize:"auto",convertToObject:!0,optimizeMemoryUsage:!1},s=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((0,o.default)(this,t),n=l(l({},c),n),this.schema=e,this.batchSize=n.batchSize,this.convertToObject=n.convertToObject,this.optimizeMemoryUsage=n.optimizeMemoryUsage,this.rows=null,this.length=0,this.isChunkComplete=!1,this.cursor=0,!Array.isArray(e))for(var r in this._headers=[],e)this._headers[e[r].index]=e[r].name}return(0,a.default)(t,[{key:"addRow",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.rows||(this.rows=new Array(this.batchSize),this.length=0),Number.isFinite(e)&&(this.cursor=e);var n=this.convertToObject&&this.schema;this.rows[this.length]=n?f(t,this._headers):t,this.optimizeMemoryUsage&&(this.rows[this.length]=JSON.parse(JSON.stringify(this.rows[this.length]))),this.length++}},{key:"chunkComplete",value:function(){this.isChunkComplete=!0}},{key:"isFull",value:function(){return"auto"===this.batchSize?this.isChunkComplete&&this.length>0:this.rows&&this.length>=this.batchSize}},{key:"getBatch",value:function(){if(this.rows){var t=this.rows.slice(0,this.length);return this.rows=null,this.isChunkComplete=!1,{data:t,schema:this.schema,length:t.length,cursor:this.cursor}}return null}}]),t}();function f(t,e){if(!t)throw new Error("null row");if(!Array.isArray(t))return t;if(!e)return t;for(var n={},r=0;r<e.length;r++)n[e[r]]=t[r];return n}e.default=s},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(1)),o=r(n(2)),a=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,i.default)(this,t),this.schema=e,this.batchSize=n.batchSize||"auto",this.length=0,this.allocated=0,this.columns=null,this.isChunkComplete=!1,this.reallocateColumns()}return(0,o.default)(t,[{key:"addRow",value:function(t){for(var e in this.reallocateColumns(),t)this.columns[e][this.length]=t[e];this.length++}},{key:"chunkComplete",value:function(){this.isChunkComplete=!0}},{key:"isFull",value:function(){return"auto"===this.batchSize?this.isChunkComplete:this.length>=this.allocated}},{key:"getBatch",value:function(){this.pruneColumns();var t=Array.isArray(this.schema)?this.columns:{};if(!Array.isArray(this.schema))for(var e in this.schema){var n=this.schema[e];t[n.name]=this.columns[n.index]}return this.columns=null,this.isChunkComplete=!1,{data:t,schema:this.schema,length:this.length}}},{key:"reallocateColumns",value:function(){if(!(this.length<this.allocated))for(var t in this.allocated=this.allocated>0?this.allocated*=2:this.batchSize,this.columns=[],this.schema){var e=this.schema[t],n=e.type||Float32Array,r=this.columns[e.index];if(r&&ArrayBuffer.isView(r)){var i=new n(this.allocated);i.set(r),this.columns[e.index]=i}else r?(r.length=this.allocated,this.columns[e.index]=r):this.columns[e.index]=new n(this.allocated)}}},{key:"pruneColumns",value:function(){var t=this;this.columns=this.columns.map((function(e){return e.slice(0,t.length)}))}}]),t}();e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSONLoader=void 0;var r={name:"JSON",extensions:["json"],testText:null,parseTextSync:function(t,e){return JSON.parse(t)}};e.JSONLoader=r},function(t,e,n){"use strict";var r=n(13);Object.defineProperty(e,"__esModule",{value:!0}),e.XMLLoader=void 0;var i=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==r(t)&&"function"!=typeof t)return{default:t};var n=o(e);if(n&&n.has(t))return n.get(t);var i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in t)if("default"!==u&&Object.prototype.hasOwnProperty.call(t,u)){var l=a?Object.getOwnPropertyDescriptor(t,u):null;l&&(l.get||l.set)?Object.defineProperty(i,u,l):i[u]=t[u]}i.default=t,n&&n.set(t,i);return i}(n(30));function o(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(o=function(t){return t?n:e})(t)}var a={name:"XML",extensions:["zml"],supported:(0,i.parseXMLSupported)(),testText:function(t){return t.startsWith("<?xml")},parseTextSync:i.default,browserOnly:!0,worker:!1};e.XMLLoader=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if(window.DOMParser){var e=(new window.DOMParser).parseFromString(t,"application/xml"),n=function(t){var e=(new DOMParser).parseFromString("<","text/xml").getElementsByTagName("parsererror")[0].namespaceURI;if("http://www.w3.org/1999/xhtml"===e){var n=t.getElementsByTagName("parsererror");return n.length?n[0].innerHTML:null}return t.getElementsByTagNameNS(e,"parsererror").length>0}(e);if(n)throw new Error(n);return e}if(void 0!==window.ActiveXObject){var r=new window.ActiveXObject("Microsoft.XMLDOM");if(r)return r.async="false",r.loadXML(t),r}throw new Error("No XML parser available")},e.parseXMLSupported=function(){if("undefined"==typeof window)return!1;if(window.DOMParser)return!0;if(void 0!==window.ActiveXObject&&new window.ActiveXObject("Microsoft.XMLDOM"))return!0;return!1}},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.takeAsync=function(t){return p.apply(this,arguments)},e.default=void 0;var i=r(n(32)),o=r(n(34)),a=r(n(1)),u=r(n(2)),l=r(n(11)),c=r(n(12)),s=r(n(6));function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=(0,s.default)(t);if(e){var i=(0,s.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,c.default)(this,n)}}var d=function(t){(0,l.default)(n,t);var e=f(n);function n(){return(0,a.default)(this,n),e.apply(this,arguments)}return(0,u.default)(n,[{key:"enqueue",value:function(t){return this.push(t)}},{key:"dequeue",value:function(){return this.shift()}}]),n}((0,r(n(35)).default)(Array));function p(){return(p=(0,o.default)(i.default.mark((function t(e){var n,r,o,a,u,l=arguments;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=l.length>1&&void 0!==l[1]?l[1]:1/0,r=[],o=e[Symbol.asyncIterator]();case 3:if(!(r.length<n)){t.next=14;break}return t.next=6,o.next();case 6:if(a=t.sent,u=a.value,!a.done){t.next=11;break}return t.abrupt("break",14);case 11:r.push(u),t.next=3;break;case 14:return t.abrupt("return",r);case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var h=function(){function t(){(0,a.default)(this,t),this._values=new d,this._settlers=new d,this._closed=!1}return(0,u.default)(t,[{key:"close",value:function(){for(;this._settlers.length>0;)this._settlers.dequeue().resolve({done:!0});this._closed=!0}},{key:Symbol.asyncIterator,value:function(){return this}},{key:"enqueue",value:function(t){if(this._closed)throw new Error("Closed");if(this._settlers.length>0){if(this._values.length>0)throw new Error("Illegal internal state");var e=this._settlers.dequeue();t instanceof Error?e.reject(t):e.resolve({value:t})}else this._values.enqueue(t)}},{key:"next",value:function(){var t=this;if(this._values.length>0){var e=this._values.dequeue();return e instanceof Error?Promise.reject(e):Promise.resolve({value:e})}if(this._closed){if(this._settlers.length>0)throw new Error("Illegal internal state");return Promise.resolve({done:!0})}return new Promise((function(e,n){t._settlers.enqueue({resolve:e,reject:n})}))}}]),t}();e.default=h},function(t,e,n){t.exports=n(33)},function(t,e,n){var r=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new T(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return _()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===s)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(t,e,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===s)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var s={};function f(){}function d(){}function p(){}var h={};h[i]=function(){return this};var y=Object.getPrototypeOf,v=y&&y(y(S([])));v&&v!==e&&n.call(v,i)&&(h=v);var m=p.prototype=f.prototype=Object.create(h);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){var r;this._invoke=function(i,o){function a(){return new e((function(r,a){!function r(i,o,a,u){var l=c(t[i],t,o);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,u)}))}u(l.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,s;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:_}}function _(){return{value:void 0,done:!0}}return d.prototype=m.constructor=p,p.constructor=d,d.displayName=u(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,u(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(g.prototype),g.prototype[o]=function(){return this},t.AsyncIterator=g,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new g(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),u(m,a,"Generator"),m[i]=function(){return this},m.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(u&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,s):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;O(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e){function n(t,e,n,r,i,o,a){try{var u=t[o](a),l=u.value}catch(t){return void n(t)}u.done?e(l):Promise.resolve(l).then(r,i)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise((function(i,o){var a=t.apply(e,r);function u(t){n(a,i,o,u,l,"next",t)}function l(t){n(a,i,o,u,l,"throw",t)}u(void 0)}))}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(6),i=n(5),o=n(36),a=n(37);function u(e){var n="function"==typeof Map?new Map:void 0;return t.exports=u=function(t){if(null===t||!o(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,e)}function e(){return a(t,arguments,r(this).constructor)}return e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),i(e,t)},t.exports.default=t.exports,t.exports.__esModule=!0,u(e)}t.exports=u,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){return-1!==Function.toString.call(t).indexOf("[native code]")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(5),i=n(38);function o(e,n,a){return i()?(t.exports=o=Reflect.construct,t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=o=function(t,e,n){var i=[null];i.push.apply(i,e);var o=new(Function.bind.apply(t,i));return n&&r(o,n.prototype),o},t.exports.default=t.exports,t.exports.__esModule=!0),o.apply(null,arguments)}t.exports=o,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTypeInfo=function(t){return{typeId:t.typeId,ArrayType:t.ArrayType,typeName:t.toString(),typeEnumName:o(t.typeId),precision:t.precision}};var r=n(4);var i=null;function o(t){if(!i)for(var e in i={},r.Type)i[r.Type[e]]=e;return i[t]}}]); |
@@ -1,1 +0,1 @@ | ||
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var s=e[r]={i:r,l:!1,exports:{}};return t[r].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(r,s,function(e){return t[e]}.bind(null,s));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){(function(e){const r=n(2),s="undefined"==typeof window?e:window;s.loaders=s.loaders||{},t.exports=Object.assign(s.loaders,r)}).call(this,n(1))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";function r(t,e){if(!t)throw new Error(e||"loader assertion failed.")}n.r(e),n.d(e,"Schema",(function(){return s})),n.d(e,"Field",(function(){return Y})),n.d(e,"deduceTableSchema",(function(){return H})),n.d(e,"TableBatchBuilder",(function(){return G})),n.d(e,"RowTableBatch",(function(){return Z})),n.d(e,"ColumnarTableBatch",(function(){return tt})),n.d(e,"JSONLoader",(function(){return et})),n.d(e,"XMLLoader",(function(){return nt})),n.d(e,"AsyncQueue",(function(){return st})),n.d(e,"getTypeInfo",(function(){return it})),n.d(e,"DataType",(function(){return a})),n.d(e,"Null",(function(){return u})),n.d(e,"Bool",(function(){return c})),n.d(e,"Int",(function(){return l})),n.d(e,"Int8",(function(){return h})),n.d(e,"Int16",(function(){return d})),n.d(e,"Int32",(function(){return p})),n.d(e,"Int64",(function(){return y})),n.d(e,"Uint8",(function(){return f})),n.d(e,"Uint16",(function(){return m})),n.d(e,"Uint32",(function(){return g})),n.d(e,"Uint64",(function(){return w})),n.d(e,"Float",(function(){return T})),n.d(e,"Float16",(function(){return x})),n.d(e,"Float32",(function(){return A})),n.d(e,"Float64",(function(){return M})),n.d(e,"Utf8",(function(){return O})),n.d(e,"Date",(function(){return N})),n.d(e,"DateDay",(function(){return D})),n.d(e,"DateMillisecond",(function(){return U})),n.d(e,"Time",(function(){return F})),n.d(e,"TimeMillisecond",(function(){return B})),n.d(e,"TimeSecond",(function(){return z})),n.d(e,"Timestamp",(function(){return E})),n.d(e,"TimestampSecond",(function(){return j})),n.d(e,"TimestampMillisecond",(function(){return L})),n.d(e,"TimestampMicrosecond",(function(){return _})),n.d(e,"TimestampNanosecond",(function(){return $})),n.d(e,"Interval",(function(){return P})),n.d(e,"IntervalDayTime",(function(){return R})),n.d(e,"IntervalYearMonth",(function(){return X})),n.d(e,"FixedSizeList",(function(){return q}));class s{constructor(t,e=null){r(Array.isArray(t)),function(t){const e={};for(const n of t)e[n.name]&&console.warn("Schema: duplicated field name",n.name,n),e[n.name]=!0}(t),this.fields=t,this.metadata=e||new Map}compareTo(t){if(this.fields.metadata!==t.fields.metadata)return!1;if(this.fields.length!==t.fields.length)return!1;for(let e=0;e<this.fields.length;++e)if(!this.fields[e].compareTo(t.fields[e]))return!1;return!0}select(...t){const e=Object.create(null);for(const n of t)e[n]=!0;const n=t.filter(t=>e[t.name]);return new s(n,this.metadata)}selectAt(...t){const e=t.map(t=>this.fields[t]).filter(Boolean);return new s(e,this.metadata)}assign(t){let e=this.metadata,n=t;if(t instanceof s){const r=t;n=r.fields,e=i(i(new Map,this.metadata),r.metadata)}const r=Object.create(null);for(const t of this.fields)r[t.name]=t;for(const t of n)r[t.name]=t;const o=Object.values(r);return new s(o,e)}}function i(t,e){return new Map([...t||new Map,...e||new Map])}const o={NONE:0,Null:1,Int:2,Float:3,Binary:4,Utf8:5,Bool:6,Decimal:7,Date:8,Time:9,Timestamp:10,Interval:11,List:12,Struct:13,Union:14,FixedSizeBinary:15,FixedSizeList:16,Map:17,Dictionary:-1,Int8:-2,Int16:-3,Int32:-4,Int64:-5,Uint8:-6,Uint16:-7,Uint32:-8,Uint64:-9,Float16:-10,Float32:-11,Float64:-12,DateDay:-13,DateMillisecond:-14,TimestampSecond:-15,TimestampMillisecond:-16,TimestampMicrosecond:-17,TimestampNanosecond:-18,TimeSecond:-19,TimeMillisecond:-20,TimeMicrosecond:-21,TimeNanosecond:-22,DenseUnion:-23,SparseUnion:-24,IntervalDayTime:-25,IntervalYearMonth:-26};class a{static isNull(t){return t&&t.typeId===o.Null}static isInt(t){return t&&t.typeId===o.Int}static isFloat(t){return t&&t.typeId===o.Float}static isBinary(t){return t&&t.typeId===o.Binary}static isUtf8(t){return t&&t.typeId===o.Utf8}static isBool(t){return t&&t.typeId===o.Bool}static isDecimal(t){return t&&t.typeId===o.Decimal}static isDate(t){return t&&t.typeId===o.Date}static isTime(t){return t&&t.typeId===o.Time}static isTimestamp(t){return t&&t.typeId===o.Timestamp}static isInterval(t){return t&&t.typeId===o.Interval}static isList(t){return t&&t.typeId===o.List}static isStruct(t){return t&&t.typeId===o.Struct}static isUnion(t){return t&&t.typeId===o.Union}static isFixedSizeBinary(t){return t&&t.typeId===o.FixedSizeBinary}static isFixedSizeList(t){return t&&t.typeId===o.FixedSizeList}static isMap(t){return t&&t.typeId===o.Map}static isDictionary(t){return t&&t.typeId===o.Dictionary}get typeId(){return o.NONE}compareTo(t){return this===t}}class u extends a{get typeId(){return o.Null}get[Symbol.toStringTag](){return"Null"}toString(){return"Null"}}class c extends a{get typeId(){return o.Bool}get ArrayType(){return Uint8Array}get[Symbol.toStringTag](){return"Bool"}toString(){return"Bool"}}class l extends a{constructor(t,e){super(),this.isSigned=t,this.bitWidth=e}get typeId(){return o.Int}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:case 64:return this.isSigned?Int32Array:Uint32Array;default:throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}get[Symbol.toStringTag](){return"Int"}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}class h extends l{constructor(){super(!0,8)}}class d extends l{constructor(){super(!0,16)}}class p extends l{constructor(){super(!0,32)}}class y extends l{constructor(){super(!0,64)}}class f extends l{constructor(){super(!1,8)}}class m extends l{constructor(){super(!1,16)}}class g extends l{constructor(){super(!1,32)}}class w extends l{constructor(){super(!1,64)}}const S=16,b=32,I=64;class T extends a{constructor(t){super(),this.precision=t}get typeId(){return o.Float}get ArrayType(){switch(this.precision){case S:return Uint16Array;case b:return Float32Array;case I:return Float64Array;default:throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}get[Symbol.toStringTag](){return"Float"}toString(){return"Float"+this.precision}}class x extends T{constructor(){super(S)}}class A extends T{constructor(){super(b)}}class M extends T{constructor(){super(I)}}class O extends a{get typeId(){return o.Utf8}get ArrayType(){return Uint8Array}get[Symbol.toStringTag](){return"Utf8"}toString(){return"Utf8"}}const v={DAY:0,MILLISECOND:1};class N extends a{constructor(t){super(),this.unit=t}get typeId(){return o.Date}get ArrayType(){return Int32Array}get[Symbol.toStringTag](){return"Date"}toString(){return`Date${32*(this.unit+1)}<${v[this.unit]}>`}}class D extends N{constructor(){super(v.DAY)}}class U extends N{constructor(){super(v.MILLISECOND)}}const C={SECOND:1,MILLISECOND:1e3,MICROSECOND:1e6,NANOSECOND:1e9};class F extends a{constructor(t,e){super(),this.unit=t,this.bitWidth=e}get typeId(){return o.Time}toString(){return`Time${this.bitWidth}<${C[this.unit]}>`}get[Symbol.toStringTag](){return"Time"}get ArrayType(){return Int32Array}}class z extends F{constructor(){super(C.SECOND,32)}}class B extends F{constructor(){super(C.MILLISECOND,32)}}class E extends a{constructor(t,e=null){super(),this.unit=t,this.timezone=e}get typeId(){return o.Timestamp}get ArrayType(){return Int32Array}get[Symbol.toStringTag](){return"Timestamp"}toString(){return`Timestamp<${C[this.unit]}${this.timezone?", "+this.timezone:""}>`}}class j extends E{constructor(t=null){super(C.SECOND,t)}}class L extends E{constructor(t=null){super(C.MILLISECOND,t)}}class _ extends E{constructor(t=null){super(C.MICROSECOND,t)}}class $ extends E{constructor(t=null){super(C.NANOSECOND,t)}}const k={DAY_TIME:0,YEAR_MONTH:1};class P extends a{constructor(t){super(),this.unit=t}get typeId(){return o.Interval}get ArrayType(){return Int32Array}get[Symbol.toStringTag](){return"Interval"}toString(){return`Interval<${k[this.unit]}>`}}class R extends P{constructor(){super(k.DAY_TIME)}}class X extends P{constructor(){super(k.YEAR_MONTH)}}class q extends a{constructor(t,e){super(),this.listSize=t,this.children=[e]}get typeId(){return o.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}get[Symbol.toStringTag](){return"FixedSizeList"}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}class Y{constructor(t,e=null,n=!1,s=new Map){r("string"==typeof t),r(!e||e instanceof a),r("boolean"==typeof n),r(!s||"object"==typeof s),this.name=t,this.type=e,this.nullable=n,this.metadata=s}get typeId(){return this.type&&this.type.typeId}clone(){return new Y(this.name,this.type,this.nullable,this.metadata)}compareTo(t){return this.name===t.name&&this.type===t.type&&this.nullable===t.nullable&&this.metadata===t.metadata}toString(){return`${this.type}${this.nullable?", nullable":""}${this.metadata?", metadata: "+this.metadata:""}`}}const W={Int8Array:new h,Int16Array:new d,Int32Array:new p,Uint8Array:new f,Uint8ClampedArray:new f,Uint16Array:new m,Uint32Array:new g,Float32Array:new A,Float64Array:new M};function J(t){const e=t.constructor&&t.constructor.name;let n=W[e];if(n)return{type:n,nullable:!1,metadata:null};let r=null;if(t.length>0){n=Q(t[0]),n&&(r=new Map([["type",n.toString()]]))}return{type:new u,nullable:!0,metadata:r}}function H(t,e=null){const n=Array.isArray(t)?function(t){const e=[];if(t.length){const n=t[0];if(Array.isArray(n))for(let t=0;t<n.length;++t){const r=n[t],s=String(t),i=Q(r),o=!0,a=new Map([["type",i.toString()]]);e.push(new Y(s,new u,o,a))}else for(const t in n){const r=Q(n[t]),s=!0,i=new Map([["type",r.toString()]]);e.push(new Y(t,new u,s,i))}}return new s(e)}(t):function(t){const e=[];for(const n in t){const r=t[n],{type:s,nullable:i,metadata:o}=J(r);e.push(new Y(n,s,i,o||new Map))}return new s(e)}(t);return Object.assign(n,e)}function Q(t){return!0===t||!1===t?new c:t instanceof Date?new L:t instanceof Number?new A:"string"==typeof t?new O:new u}"undefined"!=typeof BigInt64Array&&(W.BigInt64Array=new y,W.BigUint64Array=new w);const V={batchSize:100};class G{constructor(t,e,n={}){this.TableBatchType=t,this.schema=e,this.options={...V,...n},this.batch=null,this.batchCount=0,this.bytesUsed=0}addRow(t){if(!this.batch){const{TableBatchType:t}=this;this.batch=new t(this.schema,this.options)}this.batch.addRow(t)}chunkComplete(t){this.bytesUsed+=t.byteLength||t.length||0,this.batch&&this.batch.chunkComplete()}isFull(){return this.batch&&this.batch.isFull()}hasBatch(){return Boolean(this.batch)}getBatch(t={}){if(Number.isFinite(t.bytesUsed)&&(this.bytesUsed=t.bytesUsed),this.batch){const e=this.batch.getBatch();return this.batch=null,e.count=this.batchCount,this.batchCount++,e.bytesUsed=this.bytesUsed,Object.assign(e,t),e}return null}}const K={batchSize:"auto",convertToObject:!0,optimizeMemoryUsage:!1};class Z{constructor(t,e={}){if(e={...K,...e},this.schema=t,this.batchSize=e.batchSize,this.convertToObject=e.convertToObject,this.optimizeMemoryUsage=e.optimizeMemoryUsage,this.rows=null,this.length=0,this.isChunkComplete=!1,this.cursor=0,!Array.isArray(t)){this._headers=[];for(const e in t)this._headers[t[e].index]=t[e].name}}addRow(t,e=null){this.rows||(this.rows=new Array(this.batchSize),this.length=0),Number.isFinite(e)&&(this.cursor=e);const n=this.convertToObject&&this.schema;this.rows[this.length]=n?function(t,e){if(!t)throw new Error("null row");if(!Array.isArray(t))return t;if(!e)return t;const n={};for(let r=0;r<e.length;r++)n[e[r]]=t[r];return n}(t,this._headers):t,this.optimizeMemoryUsage&&(this.rows[this.length]=JSON.parse(JSON.stringify(this.rows[this.length]))),this.length++}chunkComplete(){this.isChunkComplete=!0}isFull(){return"auto"===this.batchSize?this.isChunkComplete&&this.length>0:this.rows&&this.length>=this.batchSize}getBatch(){if(this.rows){const t=this.rows.slice(0,this.length);return this.rows=null,this.isChunkComplete=!1,{data:t,schema:this.schema,length:t.length,cursor:this.cursor}}return null}}class tt{constructor(t,e={}){this.schema=t,this.batchSize=e.batchSize||"auto",this.length=0,this.allocated=0,this.columns=null,this.isChunkComplete=!1,this.reallocateColumns()}addRow(t){this.reallocateColumns();for(const e in t)this.columns[e][this.length]=t[e];this.length++}chunkComplete(){this.isChunkComplete=!0}isFull(){return"auto"===this.batchSize?this.isChunkComplete:this.length>=this.allocated}getBatch(t={}){this.pruneColumns();const e=Array.isArray(this.schema)?this.columns:{};if(!Array.isArray(this.schema))for(const t in this.schema){const n=this.schema[t];e[n.name]=this.columns[n.index]}return this.columns=null,this.isChunkComplete=!1,{data:e,schema:this.schema,length:this.length}}reallocateColumns(){if(!(this.length<this.allocated)){this.allocated=this.allocated>0?this.allocated*=2:this.batchSize,this.columns=[];for(const t in this.schema){const e=this.schema[t],n=e.type||Float32Array,r=this.columns[e.index];if(r&&ArrayBuffer.isView(r)){const t=new n(this.allocated);t.set(r),this.columns[e.index]=t}else r?(r.length=this.allocated,this.columns[e.index]=r):this.columns[e.index]=new n(this.allocated)}}}pruneColumns(){this.columns=this.columns.map(t=>t.slice(0,this.length))}}const et={name:"JSON",extensions:["json"],testText:null,parseTextSync:function(t,e){return JSON.parse(t)}};const nt={name:"XML",extensions:["zml"],supported:!("undefined"==typeof window||!window.DOMParser&&(void 0===window.ActiveXObject||!new window.ActiveXObject("Microsoft.XMLDOM"))),testText:function(t){return t.startsWith("<?xml")},parseTextSync:function(t){if(window.DOMParser){const e=(new window.DOMParser).parseFromString(t,"application/xml"),n=function(t){const e=new DOMParser,n=e.parseFromString("<","text/xml").getElementsByTagName("parsererror")[0].namespaceURI;if("http://www.w3.org/1999/xhtml"===n){const e=t.getElementsByTagName("parsererror");return e.length?e[0].innerHTML:null}return t.getElementsByTagNameNS(n,"parsererror").length>0}(e);if(n)throw new Error(n);return e}if(void 0!==window.ActiveXObject){const e=new window.ActiveXObject("Microsoft.XMLDOM");if(e)return e.async="false",e.loadXML(t),e}throw new Error("No XML parser available")},browserOnly:!0,worker:!1};class rt extends Array{enqueue(t){return this.push(t)}dequeue(){return this.shift()}}class st{constructor(){this._values=new rt,this._settlers=new rt,this._closed=!1}close(){for(;this._settlers.length>0;)this._settlers.dequeue().resolve({done:!0});this._closed=!0}[Symbol.asyncIterator](){return this}enqueue(t){if(this._closed)throw new Error("Closed");if(this._settlers.length>0){if(this._values.length>0)throw new Error("Illegal internal state");const e=this._settlers.dequeue();t instanceof Error?e.reject(t):e.resolve({value:t})}else this._values.enqueue(t)}next(){if(this._values.length>0){const t=this._values.dequeue();return t instanceof Error?Promise.reject(t):Promise.resolve({value:t})}if(this._closed){if(this._settlers.length>0)throw new Error("Illegal internal state");return Promise.resolve({done:!0})}return new Promise((t,e)=>{this._settlers.enqueue({resolve:t,reject:e})})}}function it(t){return{typeId:t.typeId,ArrayType:t.ArrayType,typeName:t.toString(),typeEnumName:at(t.typeId),precision:t.precision}}let ot=null;function at(t){if(!ot){ot={};for(const t in o)ot[o[t]]=t}return ot[t]}}])})); | ||
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var s=e[r]={i:r,l:!1,exports:{}};return t[r].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(r,s,function(e){return t[e]}.bind(null,s));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){(function(e){const r=n(2),s="undefined"==typeof window?e:window;s.loaders=s.loaders||{},t.exports=Object.assign(s.loaders,r)}).call(this,n(1))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";n.r(e),n.d(e,"Schema",(function(){return r})),n.d(e,"Field",(function(){return i})),n.d(e,"deduceTableSchema",(function(){return J})),n.d(e,"TableBatchBuilder",(function(){return V})),n.d(e,"RowTableBatch",(function(){return K})),n.d(e,"ColumnarTableBatch",(function(){return Z})),n.d(e,"JSONLoader",(function(){return tt})),n.d(e,"XMLLoader",(function(){return et})),n.d(e,"AsyncQueue",(function(){return rt})),n.d(e,"getTypeInfo",(function(){return st})),n.d(e,"DataType",(function(){return a})),n.d(e,"Null",(function(){return c})),n.d(e,"Bool",(function(){return u})),n.d(e,"Int",(function(){return l})),n.d(e,"Int8",(function(){return h})),n.d(e,"Int16",(function(){return d})),n.d(e,"Int32",(function(){return m})),n.d(e,"Int64",(function(){return p})),n.d(e,"Uint8",(function(){return f})),n.d(e,"Uint16",(function(){return y})),n.d(e,"Uint32",(function(){return g})),n.d(e,"Uint64",(function(){return w})),n.d(e,"Float",(function(){return T})),n.d(e,"Float16",(function(){return x})),n.d(e,"Float32",(function(){return M})),n.d(e,"Float64",(function(){return D})),n.d(e,"Utf8",(function(){return O})),n.d(e,"Date",(function(){return N})),n.d(e,"DateDay",(function(){return C})),n.d(e,"DateMillisecond",(function(){return U})),n.d(e,"Time",(function(){return F})),n.d(e,"TimeMillisecond",(function(){return B})),n.d(e,"TimeSecond",(function(){return z})),n.d(e,"Timestamp",(function(){return E})),n.d(e,"TimestampSecond",(function(){return L})),n.d(e,"TimestampMillisecond",(function(){return j})),n.d(e,"TimestampMicrosecond",(function(){return _})),n.d(e,"TimestampNanosecond",(function(){return $})),n.d(e,"Interval",(function(){return P})),n.d(e,"IntervalDayTime",(function(){return R})),n.d(e,"IntervalYearMonth",(function(){return X})),n.d(e,"FixedSizeList",(function(){return Y}));class r{constructor(t,e){!function(t,e){if(!t)throw new Error(e||"loader assertion failed.")}(Array.isArray(t)),function(t){const e={};for(const n of t)e[n.name]&&console.warn("Schema: duplicated field name",n.name,n),e[n.name]=!0}(t),this.fields=t,this.metadata=e||new Map}compareTo(t){if(this.metadata!==t.metadata)return!1;if(this.fields.length!==t.fields.length)return!1;for(let e=0;e<this.fields.length;++e)if(!this.fields[e].compareTo(t.fields[e]))return!1;return!0}select(...t){const e=Object.create(null);for(const n of t)e[n]=!0;const n=this.fields.filter(t=>e[t.name]);return new r(n,this.metadata)}selectAt(...t){const e=t.map(t=>this.fields[t]).filter(Boolean);return new r(e,this.metadata)}assign(t){let e,n=this.metadata;if(t instanceof r){const r=t;e=r.fields,n=s(s(new Map,this.metadata),r.metadata)}else e=t;const i=Object.create(null);for(const t of this.fields)i[t.name]=t;for(const t of e)i[t.name]=t;const o=Object.values(i);return new r(o,n)}}function s(t,e){return new Map([...t||new Map,...e||new Map])}class i{constructor(t,e,n=!1,r=new Map){this.name=t,this.type=e,this.nullable=n,this.metadata=r}get typeId(){return this.type&&this.type.typeId}clone(){return new i(this.name,this.type,this.nullable,this.metadata)}compareTo(t){return this.name===t.name&&this.type===t.type&&this.nullable===t.nullable&&this.metadata===t.metadata}toString(){return`${this.type}${this.nullable?", nullable":""}${this.metadata?", metadata: "+this.metadata:""}`}}let o;!function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth"}(o||(o={}));class a{static isNull(t){return t&&t.typeId===o.Null}static isInt(t){return t&&t.typeId===o.Int}static isFloat(t){return t&&t.typeId===o.Float}static isBinary(t){return t&&t.typeId===o.Binary}static isUtf8(t){return t&&t.typeId===o.Utf8}static isBool(t){return t&&t.typeId===o.Bool}static isDecimal(t){return t&&t.typeId===o.Decimal}static isDate(t){return t&&t.typeId===o.Date}static isTime(t){return t&&t.typeId===o.Time}static isTimestamp(t){return t&&t.typeId===o.Timestamp}static isInterval(t){return t&&t.typeId===o.Interval}static isList(t){return t&&t.typeId===o.List}static isStruct(t){return t&&t.typeId===o.Struct}static isUnion(t){return t&&t.typeId===o.Union}static isFixedSizeBinary(t){return t&&t.typeId===o.FixedSizeBinary}static isFixedSizeList(t){return t&&t.typeId===o.FixedSizeList}static isMap(t){return t&&t.typeId===o.Map}static isDictionary(t){return t&&t.typeId===o.Dictionary}get typeId(){return o.NONE}compareTo(t){return this===t}}class c extends a{get typeId(){return o.Null}get[Symbol.toStringTag](){return"Null"}toString(){return"Null"}}class u extends a{get typeId(){return o.Bool}get[Symbol.toStringTag](){return"Bool"}toString(){return"Bool"}}class l extends a{constructor(t,e){super(),this.isSigned=t,this.bitWidth=e}get typeId(){return o.Int}get[Symbol.toStringTag](){return"Int"}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}class h extends l{constructor(){super(!0,8)}}class d extends l{constructor(){super(!0,16)}}class m extends l{constructor(){super(!0,32)}}class p extends l{constructor(){super(!0,64)}}class f extends l{constructor(){super(!1,8)}}class y extends l{constructor(){super(!1,16)}}class g extends l{constructor(){super(!1,32)}}class w extends l{constructor(){super(!1,64)}}const S=16,b=32,I=64;class T extends a{constructor(t){super(),this.precision=t}get typeId(){return o.Float}get[Symbol.toStringTag](){return"Float"}toString(){return"Float"+this.precision}}class x extends T{constructor(){super(S)}}class M extends T{constructor(){super(b)}}class D extends T{constructor(){super(I)}}class O extends a{get typeId(){return o.Utf8}get[Symbol.toStringTag](){return"Utf8"}toString(){return"Utf8"}}const v={DAY:0,MILLISECOND:1};class N extends a{constructor(t){super(),this.unit=t}get typeId(){return o.Date}get[Symbol.toStringTag](){return"Date"}toString(){return`Date${32*(this.unit+1)}<${v[this.unit]}>`}}class C extends N{constructor(){super(v.DAY)}}class U extends N{constructor(){super(v.MILLISECOND)}}const A={SECOND:1,MILLISECOND:1e3,MICROSECOND:1e6,NANOSECOND:1e9};class F extends a{constructor(t,e){super(),this.unit=t,this.bitWidth=e}get typeId(){return o.Time}toString(){return`Time${this.bitWidth}<${A[this.unit]}>`}get[Symbol.toStringTag](){return"Time"}}class z extends F{constructor(){super(A.SECOND,32)}}class B extends F{constructor(){super(A.MILLISECOND,32)}}class E extends a{constructor(t,e=null){super(),this.unit=t,this.timezone=e}get typeId(){return o.Timestamp}get[Symbol.toStringTag](){return"Timestamp"}toString(){return`Timestamp<${A[this.unit]}${this.timezone?", "+this.timezone:""}>`}}class L extends E{constructor(t=null){super(A.SECOND,t)}}class j extends E{constructor(t=null){super(A.MILLISECOND,t)}}class _ extends E{constructor(t=null){super(A.MICROSECOND,t)}}class $ extends E{constructor(t=null){super(A.NANOSECOND,t)}}const k={DAY_TIME:0,YEAR_MONTH:1};class P extends a{constructor(t){super(),this.unit=t}get typeId(){return o.Interval}get[Symbol.toStringTag](){return"Interval"}toString(){return`Interval<${k[this.unit]}>`}}class R extends P{constructor(){super(k.DAY_TIME)}}class X extends P{constructor(){super(k.YEAR_MONTH)}}class Y extends a{constructor(t,e){super(),this.listSize=t,this.children=[e]}get typeId(){return o.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get[Symbol.toStringTag](){return"FixedSizeList"}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}const q={Int8Array:new h,Int16Array:new d,Int32Array:new m,Uint8Array:new f,Uint8ClampedArray:new f,Uint16Array:new y,Uint32Array:new g,Float32Array:new M,Float64Array:new D};function J(t,e){const n=Array.isArray(t)?function(t){const e=[];if(t.length){const n=t[0];if(Array.isArray(n))for(let t=0;t<n.length;++t){const r=n[t],s=String(t),o=H(r),a=!0,u=new Map([["type",o.toString()]]);e.push(new i(s,new c,a,u))}else for(const t in n){const r=H(n[t]),s=!0,o=new Map([["type",r.toString()]]);e.push(new i(t,new c,s,o))}}return new r(e)}(t):function(t){const e=[];for(const n in t){const r=t[n],{type:s,nullable:o,metadata:a}=W(r);e.push(new i(n,s,o,a||new Map))}return new r(e)}(t);return Object.assign(n,e)}function W(t){const e=t.constructor&&t.constructor.name;let n=q[e];if(n)return{type:n,nullable:!1,metadata:null};let r=null;if(t.length>0){n=H(t[0]),n&&(r=new Map([["type",n.toString()]]))}return{type:new c,nullable:!0,metadata:r}}function H(t){return!0===t||!1===t?new u:t instanceof Date?new j:t instanceof Number?new M:"string"==typeof t?new O:new c}const Q={batchSize:100};class V{constructor(t,e,n={}){this.TableBatchType=t,this.schema=e,this.options={...Q,...n},this.batch=null,this.batchCount=0,this.bytesUsed=0}addRow(t){if(!this.batch){const{TableBatchType:t}=this;this.batch=new t(this.schema,this.options)}this.batch.addRow(t)}chunkComplete(t){this.bytesUsed+=t.byteLength||t.length||0,this.batch&&this.batch.chunkComplete()}isFull(){return this.batch&&this.batch.isFull()}hasBatch(){return Boolean(this.batch)}getBatch(t={}){if(Number.isFinite(t.bytesUsed)&&(this.bytesUsed=t.bytesUsed),this.batch){const e=this.batch.getBatch();return this.batch=null,e.count=this.batchCount,this.batchCount++,e.bytesUsed=this.bytesUsed,Object.assign(e,t),e}return null}}const G={batchSize:"auto",convertToObject:!0,optimizeMemoryUsage:!1};class K{constructor(t,e={}){if(e={...G,...e},this.schema=t,this.batchSize=e.batchSize,this.convertToObject=e.convertToObject,this.optimizeMemoryUsage=e.optimizeMemoryUsage,this.rows=null,this.length=0,this.isChunkComplete=!1,this.cursor=0,!Array.isArray(t)){this._headers=[];for(const e in t)this._headers[t[e].index]=t[e].name}}addRow(t,e=null){this.rows||(this.rows=new Array(this.batchSize),this.length=0),Number.isFinite(e)&&(this.cursor=e);const n=this.convertToObject&&this.schema;this.rows[this.length]=n?function(t,e){if(!t)throw new Error("null row");if(!Array.isArray(t))return t;if(!e)return t;const n={};for(let r=0;r<e.length;r++)n[e[r]]=t[r];return n}(t,this._headers):t,this.optimizeMemoryUsage&&(this.rows[this.length]=JSON.parse(JSON.stringify(this.rows[this.length]))),this.length++}chunkComplete(){this.isChunkComplete=!0}isFull(){return"auto"===this.batchSize?this.isChunkComplete&&this.length>0:this.rows&&this.length>=this.batchSize}getBatch(){if(this.rows){const t=this.rows.slice(0,this.length);return this.rows=null,this.isChunkComplete=!1,{data:t,schema:this.schema,length:t.length,cursor:this.cursor}}return null}}class Z{constructor(t,e={}){this.schema=t,this.batchSize=e.batchSize||"auto",this.length=0,this.allocated=0,this.columns=null,this.isChunkComplete=!1,this.reallocateColumns()}addRow(t){this.reallocateColumns();for(const e in t)this.columns[e][this.length]=t[e];this.length++}chunkComplete(){this.isChunkComplete=!0}isFull(){return"auto"===this.batchSize?this.isChunkComplete:this.length>=this.allocated}getBatch(t={}){this.pruneColumns();const e=Array.isArray(this.schema)?this.columns:{};if(!Array.isArray(this.schema))for(const t in this.schema){const n=this.schema[t];e[n.name]=this.columns[n.index]}return this.columns=null,this.isChunkComplete=!1,{data:e,schema:this.schema,length:this.length}}reallocateColumns(){if(!(this.length<this.allocated)){this.allocated=this.allocated>0?this.allocated*=2:this.batchSize,this.columns=[];for(const t in this.schema){const e=this.schema[t],n=e.type||Float32Array,r=this.columns[e.index];if(r&&ArrayBuffer.isView(r)){const t=new n(this.allocated);t.set(r),this.columns[e.index]=t}else r?(r.length=this.allocated,this.columns[e.index]=r):this.columns[e.index]=new n(this.allocated)}}}pruneColumns(){this.columns=this.columns.map(t=>t.slice(0,this.length))}}const tt={name:"JSON",extensions:["json"],testText:null,parseTextSync:function(t,e){return JSON.parse(t)}};const et={name:"XML",extensions:["zml"],supported:!("undefined"==typeof window||!window.DOMParser&&(void 0===window.ActiveXObject||!new window.ActiveXObject("Microsoft.XMLDOM"))),testText:function(t){return t.startsWith("<?xml")},parseTextSync:function(t){if(window.DOMParser){const e=(new window.DOMParser).parseFromString(t,"application/xml"),n=function(t){const e=new DOMParser,n=e.parseFromString("<","text/xml").getElementsByTagName("parsererror")[0].namespaceURI;if("http://www.w3.org/1999/xhtml"===n){const e=t.getElementsByTagName("parsererror");return e.length?e[0].innerHTML:null}return t.getElementsByTagNameNS(n,"parsererror").length>0}(e);if(n)throw new Error(n);return e}if(void 0!==window.ActiveXObject){const e=new window.ActiveXObject("Microsoft.XMLDOM");if(e)return e.async="false",e.loadXML(t),e}throw new Error("No XML parser available")},browserOnly:!0,worker:!1};class nt extends Array{enqueue(t){return this.push(t)}dequeue(){return this.shift()}}class rt{constructor(){this._values=new nt,this._settlers=new nt,this._closed=!1}close(){for(;this._settlers.length>0;)this._settlers.dequeue().resolve({done:!0});this._closed=!0}[Symbol.asyncIterator](){return this}enqueue(t){if(this._closed)throw new Error("Closed");if(this._settlers.length>0){if(this._values.length>0)throw new Error("Illegal internal state");const e=this._settlers.dequeue();t instanceof Error?e.reject(t):e.resolve({value:t})}else this._values.enqueue(t)}next(){if(this._values.length>0){const t=this._values.dequeue();return t instanceof Error?Promise.reject(t):Promise.resolve({value:t})}if(this._closed){if(this._settlers.length>0)throw new Error("Illegal internal state");return Promise.resolve({done:!0})}return new Promise((t,e)=>{this._settlers.enqueue({resolve:t,reject:e})})}}function st(t){return{typeId:t.typeId,ArrayType:t.ArrayType,typeName:t.toString(),typeEnumName:ot(t.typeId),precision:t.precision}}let it=null;function ot(t){if(!it){it={};for(const t in o)it[o[t]]=t}return it[t]}}])})); |
@@ -1,3 +0,3 @@ | ||
import {LoaderObject} from "@loaders.gl/loader-utils"; | ||
import {LoaderObject} from '@loaders.gl/loader-utils'; | ||
export const JSONLoader: LoaderObject; |
@@ -10,4 +10,2 @@ "use strict"; | ||
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof")); | ||
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); | ||
@@ -17,16 +15,7 @@ | ||
var _assert = require("../utils/assert"); | ||
var _type = require("../types/arrow-like/type"); | ||
var Field = function () { | ||
function Field(name) { | ||
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; | ||
function Field(name, type) { | ||
var nullable = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; | ||
var metadata = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : new Map(); | ||
(0, _classCallCheck2.default)(this, Field); | ||
(0, _assert.assert)(typeof name === 'string'); | ||
(0, _assert.assert)(!type || type instanceof _type.DataType); | ||
(0, _assert.assert)(typeof nullable === 'boolean'); | ||
(0, _assert.assert)(!metadata || (0, _typeof2.default)(metadata) === 'object'); | ||
this.name = name; | ||
@@ -33,0 +22,0 @@ this.type = type; |
@@ -28,5 +28,5 @@ "use strict"; | ||
if (typeof BigInt64Array !== 'undefined') { | ||
TYPED_ARRAY_TO_TYPE.BigInt64Array = new _type2.Int64(); | ||
TYPED_ARRAY_TO_TYPE.BigUint64Array = new _type2.Uint64(); | ||
function deduceTableSchema(table, schema) { | ||
var deducedSchema = Array.isArray(table) ? deduceSchemaForRowTable(table) : deduceSchemaForColumnarTable(table); | ||
return Object.assign(deducedSchema, schema); | ||
} | ||
@@ -64,8 +64,2 @@ | ||
function deduceTableSchema(table) { | ||
var schema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; | ||
var deducedSchema = Array.isArray(table) ? deduceSchemaForRowTable(table) : deduceSchemaForColumnarTable(table); | ||
return Object.assign(deducedSchema, schema); | ||
} | ||
function deduceSchemaForColumnarTable(columnarTable) { | ||
@@ -72,0 +66,0 @@ var fields = []; |
@@ -18,3 +18,3 @@ "use strict"; | ||
function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } | ||
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } | ||
@@ -26,4 +26,3 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } | ||
var Schema = function () { | ||
function Schema(fields) { | ||
var metadata = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; | ||
function Schema(fields, metadata) { | ||
(0, _classCallCheck2.default)(this, Schema); | ||
@@ -39,3 +38,3 @@ (0, _assert.assert)(Array.isArray(fields)); | ||
value: function compareTo(other) { | ||
if (this.fields.metadata !== other.fields.metadata) { | ||
if (this.metadata !== other.metadata) { | ||
return false; | ||
@@ -70,3 +69,3 @@ } | ||
var selectedFields = columnNames.filter(function (field) { | ||
var selectedFields = this.fields.filter(function (field) { | ||
return nameMap[field.name]; | ||
@@ -93,4 +92,4 @@ }); | ||
value: function assign(schemaOrFields) { | ||
var fields; | ||
var metadata = this.metadata; | ||
var fields = schemaOrFields; | ||
@@ -101,2 +100,4 @@ if (schemaOrFields instanceof Schema) { | ||
metadata = mergeMaps(mergeMaps(new Map(), this.metadata), otherSchema.metadata); | ||
} else { | ||
fields = schemaOrFields; | ||
} | ||
@@ -103,0 +104,0 @@ |
import {Schema, Batch, IBatchBuilder} from './table-types'; | ||
export default class ColumnarTableBatch implements IBatchBuilder{ | ||
export default class ColumnarTableBatch implements IBatchBuilder { | ||
constructor(schema: Schema, options?: object); | ||
@@ -5,0 +5,0 @@ |
@@ -16,3 +16,3 @@ "use strict"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } | ||
@@ -19,0 +19,0 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } |
@@ -16,3 +16,3 @@ "use strict"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } | ||
@@ -19,0 +19,0 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } |
@@ -7,49 +7,51 @@ "use strict"; | ||
exports.Type = void 0; | ||
var Type = { | ||
NONE: 0, | ||
Null: 1, | ||
Int: 2, | ||
Float: 3, | ||
Binary: 4, | ||
Utf8: 5, | ||
Bool: 6, | ||
Decimal: 7, | ||
Date: 8, | ||
Time: 9, | ||
Timestamp: 10, | ||
Interval: 11, | ||
List: 12, | ||
Struct: 13, | ||
Union: 14, | ||
FixedSizeBinary: 15, | ||
FixedSizeList: 16, | ||
Map: 17, | ||
Dictionary: -1, | ||
Int8: -2, | ||
Int16: -3, | ||
Int32: -4, | ||
Int64: -5, | ||
Uint8: -6, | ||
Uint16: -7, | ||
Uint32: -8, | ||
Uint64: -9, | ||
Float16: -10, | ||
Float32: -11, | ||
Float64: -12, | ||
DateDay: -13, | ||
DateMillisecond: -14, | ||
TimestampSecond: -15, | ||
TimestampMillisecond: -16, | ||
TimestampMicrosecond: -17, | ||
TimestampNanosecond: -18, | ||
TimeSecond: -19, | ||
TimeMillisecond: -20, | ||
TimeMicrosecond: -21, | ||
TimeNanosecond: -22, | ||
DenseUnion: -23, | ||
SparseUnion: -24, | ||
IntervalDayTime: -25, | ||
IntervalYearMonth: -26 | ||
}; | ||
var Type; | ||
exports.Type = Type; | ||
(function (Type) { | ||
Type[Type["NONE"] = 0] = "NONE"; | ||
Type[Type["Null"] = 1] = "Null"; | ||
Type[Type["Int"] = 2] = "Int"; | ||
Type[Type["Float"] = 3] = "Float"; | ||
Type[Type["Binary"] = 4] = "Binary"; | ||
Type[Type["Utf8"] = 5] = "Utf8"; | ||
Type[Type["Bool"] = 6] = "Bool"; | ||
Type[Type["Decimal"] = 7] = "Decimal"; | ||
Type[Type["Date"] = 8] = "Date"; | ||
Type[Type["Time"] = 9] = "Time"; | ||
Type[Type["Timestamp"] = 10] = "Timestamp"; | ||
Type[Type["Interval"] = 11] = "Interval"; | ||
Type[Type["List"] = 12] = "List"; | ||
Type[Type["Struct"] = 13] = "Struct"; | ||
Type[Type["Union"] = 14] = "Union"; | ||
Type[Type["FixedSizeBinary"] = 15] = "FixedSizeBinary"; | ||
Type[Type["FixedSizeList"] = 16] = "FixedSizeList"; | ||
Type[Type["Map"] = 17] = "Map"; | ||
Type[Type["Dictionary"] = -1] = "Dictionary"; | ||
Type[Type["Int8"] = -2] = "Int8"; | ||
Type[Type["Int16"] = -3] = "Int16"; | ||
Type[Type["Int32"] = -4] = "Int32"; | ||
Type[Type["Int64"] = -5] = "Int64"; | ||
Type[Type["Uint8"] = -6] = "Uint8"; | ||
Type[Type["Uint16"] = -7] = "Uint16"; | ||
Type[Type["Uint32"] = -8] = "Uint32"; | ||
Type[Type["Uint64"] = -9] = "Uint64"; | ||
Type[Type["Float16"] = -10] = "Float16"; | ||
Type[Type["Float32"] = -11] = "Float32"; | ||
Type[Type["Float64"] = -12] = "Float64"; | ||
Type[Type["DateDay"] = -13] = "DateDay"; | ||
Type[Type["DateMillisecond"] = -14] = "DateMillisecond"; | ||
Type[Type["TimestampSecond"] = -15] = "TimestampSecond"; | ||
Type[Type["TimestampMillisecond"] = -16] = "TimestampMillisecond"; | ||
Type[Type["TimestampMicrosecond"] = -17] = "TimestampMicrosecond"; | ||
Type[Type["TimestampNanosecond"] = -18] = "TimestampNanosecond"; | ||
Type[Type["TimeSecond"] = -19] = "TimeSecond"; | ||
Type[Type["TimeMillisecond"] = -20] = "TimeMillisecond"; | ||
Type[Type["TimeMicrosecond"] = -21] = "TimeMicrosecond"; | ||
Type[Type["TimeNanosecond"] = -22] = "TimeNanosecond"; | ||
Type[Type["DenseUnion"] = -23] = "DenseUnion"; | ||
Type[Type["SparseUnion"] = -24] = "SparseUnion"; | ||
Type[Type["IntervalDayTime"] = -25] = "IntervalDayTime"; | ||
Type[Type["IntervalYearMonth"] = -26] = "IntervalYearMonth"; | ||
})(Type || (exports.Type = Type = {})); | ||
//# sourceMappingURL=enum.js.map |
@@ -8,2 +8,8 @@ "use strict"; | ||
}); | ||
Object.defineProperty(exports, "Type", { | ||
enumerable: true, | ||
get: function get() { | ||
return _enum.Type; | ||
} | ||
}); | ||
exports.FixedSizeList = exports.IntervalYearMonth = exports.IntervalDayTime = exports.Interval = exports.TimestampNanosecond = exports.TimestampMicrosecond = exports.TimestampMillisecond = exports.TimestampSecond = exports.Timestamp = exports.TimeMillisecond = exports.TimeSecond = exports.Time = exports.DateMillisecond = exports.DateDay = exports.Date = exports.Utf8 = exports.Float64 = exports.Float32 = exports.Float16 = exports.Float = exports.Uint64 = exports.Uint32 = exports.Uint16 = exports.Uint8 = exports.Int64 = exports.Int32 = exports.Int16 = exports.Int8 = exports.Int = exports.Bool = exports.Null = exports.DataType = void 0; | ||
@@ -185,7 +191,2 @@ | ||
}, { | ||
key: "ArrayType", | ||
get: function get() { | ||
return Uint8Array; | ||
} | ||
}, { | ||
key: Symbol.toStringTag, | ||
@@ -227,22 +228,2 @@ get: function get() { | ||
}, { | ||
key: "ArrayType", | ||
get: function get() { | ||
switch (this.bitWidth) { | ||
case 8: | ||
return this.isSigned ? Int8Array : Uint8Array; | ||
case 16: | ||
return this.isSigned ? Int16Array : Uint16Array; | ||
case 32: | ||
return this.isSigned ? Int32Array : Uint32Array; | ||
case 64: | ||
return this.isSigned ? Int32Array : Uint32Array; | ||
default: | ||
throw new Error("Unrecognized ".concat(this[Symbol.toStringTag], " type")); | ||
} | ||
} | ||
}, { | ||
key: Symbol.toStringTag, | ||
@@ -255,3 +236,3 @@ get: function get() { | ||
value: function toString() { | ||
return "".concat(this.isSigned ? "I" : "Ui", "nt").concat(this.bitWidth); | ||
return "".concat(this.isSigned ? 'I' : 'Ui', "nt").concat(this.bitWidth); | ||
} | ||
@@ -409,19 +390,2 @@ }]); | ||
}, { | ||
key: "ArrayType", | ||
get: function get() { | ||
switch (this.precision) { | ||
case Precision.HALF: | ||
return Uint16Array; | ||
case Precision.SINGLE: | ||
return Float32Array; | ||
case Precision.DOUBLE: | ||
return Float64Array; | ||
default: | ||
throw new Error("Unrecognized ".concat(this[Symbol.toStringTag], " type")); | ||
} | ||
} | ||
}, { | ||
key: Symbol.toStringTag, | ||
@@ -503,7 +467,2 @@ get: function get() { | ||
}, { | ||
key: "ArrayType", | ||
get: function get() { | ||
return Uint8Array; | ||
} | ||
}, { | ||
key: Symbol.toStringTag, | ||
@@ -548,7 +507,2 @@ get: function get() { | ||
}, { | ||
key: "ArrayType", | ||
get: function get() { | ||
return Int32Array; | ||
} | ||
}, { | ||
key: Symbol.toStringTag, | ||
@@ -635,7 +589,2 @@ get: function get() { | ||
} | ||
}, { | ||
key: "ArrayType", | ||
get: function get() { | ||
return Int32Array; | ||
} | ||
}]); | ||
@@ -699,7 +648,2 @@ return Time; | ||
}, { | ||
key: "ArrayType", | ||
get: function get() { | ||
return Int32Array; | ||
} | ||
}, { | ||
key: Symbol.toStringTag, | ||
@@ -712,3 +656,3 @@ get: function get() { | ||
value: function toString() { | ||
return "Timestamp<".concat(TimeUnit[this.unit]).concat(this.timezone ? ", ".concat(this.timezone) : "", ">"); | ||
return "Timestamp<".concat(TimeUnit[this.unit]).concat(this.timezone ? ", ".concat(this.timezone) : '', ">"); | ||
} | ||
@@ -809,7 +753,2 @@ }]); | ||
}, { | ||
key: "ArrayType", | ||
get: function get() { | ||
return Int32Array; | ||
} | ||
}, { | ||
key: Symbol.toStringTag, | ||
@@ -891,7 +830,2 @@ get: function get() { | ||
}, { | ||
key: "ArrayType", | ||
get: function get() { | ||
return this.valueType.ArrayType; | ||
} | ||
}, { | ||
key: Symbol.toStringTag, | ||
@@ -898,0 +832,0 @@ get: function get() { |
@@ -8,3 +8,3 @@ "use strict"; | ||
var _enum = require("./arrow-like/enum"); | ||
var _type = require("./arrow-like/type"); | ||
@@ -27,4 +27,4 @@ function getTypeInfo(arrowTypeLike) { | ||
for (var key in _enum.Type) { | ||
ReverseType[_enum.Type[key]] = key; | ||
for (var _key in _type.Type) { | ||
ReverseType[_type.Type[_key]] = _key; | ||
} | ||
@@ -31,0 +31,0 @@ } |
/** | ||
* @returns a Promise for an Array with the elements in `asyncIterable` | ||
*/ | ||
export function takeAsync(asyncIterable: AsyncIterable<any>, count?: number): Promise<any[]> | ||
export function takeAsync(asyncIterable: AsyncIterable<any>, count?: number): Promise<any[]>; | ||
@@ -25,2 +25,1 @@ /** | ||
} | ||
@@ -1,3 +0,3 @@ | ||
import {LoaderObject} from "@loaders.gl/loader-utils"; | ||
import {LoaderObject} from '@loaders.gl/loader-utils'; | ||
export const XMLLoader: LoaderObject; |
"use strict"; | ||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); | ||
var _typeof = require("@babel/runtime/helpers/typeof"); | ||
@@ -12,2 +12,6 @@ Object.defineProperty(exports, "__esModule", { | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
var XML_HEADER = '<?xml'; | ||
@@ -14,0 +18,0 @@ var XMLLoader = { |
@@ -1,3 +0,3 @@ | ||
import {LoaderObject} from "@loaders.gl/loader-utils"; | ||
import {LoaderObject} from '@loaders.gl/loader-utils'; | ||
export const JSONLoader: LoaderObject; |
@@ -1,10 +0,6 @@ | ||
import _typeof from "@babel/runtime/helpers/esm/typeof"; | ||
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck"; | ||
import _createClass from "@babel/runtime/helpers/esm/createClass"; | ||
import { assert } from '../utils/assert'; | ||
import { DataType } from '../types/arrow-like/type'; | ||
var Field = function () { | ||
function Field(name) { | ||
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; | ||
function Field(name, type) { | ||
var nullable = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; | ||
@@ -15,6 +11,2 @@ var metadata = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : new Map(); | ||
assert(typeof name === 'string'); | ||
assert(!type || type instanceof DataType); | ||
assert(typeof nullable === 'boolean'); | ||
assert(!metadata || _typeof(metadata) === 'object'); | ||
this.name = name; | ||
@@ -21,0 +13,0 @@ this.type = type; |
@@ -1,2 +0,2 @@ | ||
import { Int8, Int16, Int32, Int64, Uint8, Uint16, Uint32, Uint64, Float32, Float64, Bool, Utf8, TimestampMillisecond, Null } from '../types/arrow-like/type'; | ||
import { Int8, Int16, Int32, Uint8, Uint16, Uint32, Float32, Float64, Bool, Utf8, TimestampMillisecond, Null } from '../types/arrow-like/type'; | ||
import Schema from './schema'; | ||
@@ -15,6 +15,5 @@ import Field from './field'; | ||
}; | ||
if (typeof BigInt64Array !== 'undefined') { | ||
TYPED_ARRAY_TO_TYPE.BigInt64Array = new Int64(); | ||
TYPED_ARRAY_TO_TYPE.BigUint64Array = new Uint64(); | ||
export function deduceTableSchema(table, schema) { | ||
var deducedSchema = Array.isArray(table) ? deduceSchemaForRowTable(table) : deduceSchemaForColumnarTable(table); | ||
return Object.assign(deducedSchema, schema); | ||
} | ||
@@ -52,8 +51,2 @@ | ||
export function deduceTableSchema(table) { | ||
var schema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; | ||
var deducedSchema = Array.isArray(table) ? deduceSchemaForRowTable(table) : deduceSchemaForColumnarTable(table); | ||
return Object.assign(deducedSchema, schema); | ||
} | ||
function deduceSchemaForColumnarTable(columnarTable) { | ||
@@ -60,0 +53,0 @@ var fields = []; |
@@ -5,3 +5,3 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray"; | ||
function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } | ||
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } | ||
@@ -15,5 +15,3 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } | ||
var Schema = function () { | ||
function Schema(fields) { | ||
var metadata = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; | ||
function Schema(fields, metadata) { | ||
_classCallCheck(this, Schema); | ||
@@ -30,3 +28,3 @@ | ||
value: function compareTo(other) { | ||
if (this.fields.metadata !== other.fields.metadata) { | ||
if (this.metadata !== other.metadata) { | ||
return false; | ||
@@ -61,3 +59,3 @@ } | ||
var selectedFields = columnNames.filter(function (field) { | ||
var selectedFields = this.fields.filter(function (field) { | ||
return nameMap[field.name]; | ||
@@ -84,4 +82,4 @@ }); | ||
value: function assign(schemaOrFields) { | ||
var fields; | ||
var metadata = this.metadata; | ||
var fields = schemaOrFields; | ||
@@ -92,2 +90,4 @@ if (schemaOrFields instanceof Schema) { | ||
metadata = mergeMaps(mergeMaps(new Map(), this.metadata), otherSchema.metadata); | ||
} else { | ||
fields = schemaOrFields; | ||
} | ||
@@ -94,0 +94,0 @@ |
import {Schema, Batch, IBatchBuilder} from './table-types'; | ||
export default class ColumnarTableBatch implements IBatchBuilder{ | ||
export default class ColumnarTableBatch implements IBatchBuilder { | ||
constructor(schema: Schema, options?: object); | ||
@@ -5,0 +5,0 @@ |
@@ -5,3 +5,3 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } | ||
@@ -8,0 +8,0 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } |
@@ -5,3 +5,3 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } | ||
@@ -8,0 +8,0 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } |
@@ -1,47 +0,49 @@ | ||
export var Type = { | ||
NONE: 0, | ||
Null: 1, | ||
Int: 2, | ||
Float: 3, | ||
Binary: 4, | ||
Utf8: 5, | ||
Bool: 6, | ||
Decimal: 7, | ||
Date: 8, | ||
Time: 9, | ||
Timestamp: 10, | ||
Interval: 11, | ||
List: 12, | ||
Struct: 13, | ||
Union: 14, | ||
FixedSizeBinary: 15, | ||
FixedSizeList: 16, | ||
Map: 17, | ||
Dictionary: -1, | ||
Int8: -2, | ||
Int16: -3, | ||
Int32: -4, | ||
Int64: -5, | ||
Uint8: -6, | ||
Uint16: -7, | ||
Uint32: -8, | ||
Uint64: -9, | ||
Float16: -10, | ||
Float32: -11, | ||
Float64: -12, | ||
DateDay: -13, | ||
DateMillisecond: -14, | ||
TimestampSecond: -15, | ||
TimestampMillisecond: -16, | ||
TimestampMicrosecond: -17, | ||
TimestampNanosecond: -18, | ||
TimeSecond: -19, | ||
TimeMillisecond: -20, | ||
TimeMicrosecond: -21, | ||
TimeNanosecond: -22, | ||
DenseUnion: -23, | ||
SparseUnion: -24, | ||
IntervalDayTime: -25, | ||
IntervalYearMonth: -26 | ||
}; | ||
export var Type; | ||
(function (Type) { | ||
Type[Type["NONE"] = 0] = "NONE"; | ||
Type[Type["Null"] = 1] = "Null"; | ||
Type[Type["Int"] = 2] = "Int"; | ||
Type[Type["Float"] = 3] = "Float"; | ||
Type[Type["Binary"] = 4] = "Binary"; | ||
Type[Type["Utf8"] = 5] = "Utf8"; | ||
Type[Type["Bool"] = 6] = "Bool"; | ||
Type[Type["Decimal"] = 7] = "Decimal"; | ||
Type[Type["Date"] = 8] = "Date"; | ||
Type[Type["Time"] = 9] = "Time"; | ||
Type[Type["Timestamp"] = 10] = "Timestamp"; | ||
Type[Type["Interval"] = 11] = "Interval"; | ||
Type[Type["List"] = 12] = "List"; | ||
Type[Type["Struct"] = 13] = "Struct"; | ||
Type[Type["Union"] = 14] = "Union"; | ||
Type[Type["FixedSizeBinary"] = 15] = "FixedSizeBinary"; | ||
Type[Type["FixedSizeList"] = 16] = "FixedSizeList"; | ||
Type[Type["Map"] = 17] = "Map"; | ||
Type[Type["Dictionary"] = -1] = "Dictionary"; | ||
Type[Type["Int8"] = -2] = "Int8"; | ||
Type[Type["Int16"] = -3] = "Int16"; | ||
Type[Type["Int32"] = -4] = "Int32"; | ||
Type[Type["Int64"] = -5] = "Int64"; | ||
Type[Type["Uint8"] = -6] = "Uint8"; | ||
Type[Type["Uint16"] = -7] = "Uint16"; | ||
Type[Type["Uint32"] = -8] = "Uint32"; | ||
Type[Type["Uint64"] = -9] = "Uint64"; | ||
Type[Type["Float16"] = -10] = "Float16"; | ||
Type[Type["Float32"] = -11] = "Float32"; | ||
Type[Type["Float64"] = -12] = "Float64"; | ||
Type[Type["DateDay"] = -13] = "DateDay"; | ||
Type[Type["DateMillisecond"] = -14] = "DateMillisecond"; | ||
Type[Type["TimestampSecond"] = -15] = "TimestampSecond"; | ||
Type[Type["TimestampMillisecond"] = -16] = "TimestampMillisecond"; | ||
Type[Type["TimestampMicrosecond"] = -17] = "TimestampMicrosecond"; | ||
Type[Type["TimestampNanosecond"] = -18] = "TimestampNanosecond"; | ||
Type[Type["TimeSecond"] = -19] = "TimeSecond"; | ||
Type[Type["TimeMillisecond"] = -20] = "TimeMillisecond"; | ||
Type[Type["TimeMicrosecond"] = -21] = "TimeMicrosecond"; | ||
Type[Type["TimeNanosecond"] = -22] = "TimeNanosecond"; | ||
Type[Type["DenseUnion"] = -23] = "DenseUnion"; | ||
Type[Type["SparseUnion"] = -24] = "SparseUnion"; | ||
Type[Type["IntervalDayTime"] = -25] = "IntervalDayTime"; | ||
Type[Type["IntervalYearMonth"] = -26] = "IntervalYearMonth"; | ||
})(Type || (Type = {})); | ||
//# sourceMappingURL=enum.js.map |
@@ -12,2 +12,3 @@ import _inherits from "@babel/runtime/helpers/esm/inherits"; | ||
import { Type } from './enum'; | ||
export { Type } from './enum'; | ||
export var DataType = function () { | ||
@@ -169,7 +170,2 @@ function DataType() { | ||
}, { | ||
key: "ArrayType", | ||
get: function get() { | ||
return Uint8Array; | ||
} | ||
}, { | ||
key: Symbol.toStringTag, | ||
@@ -210,22 +206,2 @@ get: function get() { | ||
}, { | ||
key: "ArrayType", | ||
get: function get() { | ||
switch (this.bitWidth) { | ||
case 8: | ||
return this.isSigned ? Int8Array : Uint8Array; | ||
case 16: | ||
return this.isSigned ? Int16Array : Uint16Array; | ||
case 32: | ||
return this.isSigned ? Int32Array : Uint32Array; | ||
case 64: | ||
return this.isSigned ? Int32Array : Uint32Array; | ||
default: | ||
throw new Error("Unrecognized ".concat(this[Symbol.toStringTag], " type")); | ||
} | ||
} | ||
}, { | ||
key: Symbol.toStringTag, | ||
@@ -238,3 +214,3 @@ get: function get() { | ||
value: function toString() { | ||
return "".concat(this.isSigned ? "I" : "Ui", "nt").concat(this.bitWidth); | ||
return "".concat(this.isSigned ? 'I' : 'Ui', "nt").concat(this.bitWidth); | ||
} | ||
@@ -375,19 +351,2 @@ }]); | ||
}, { | ||
key: "ArrayType", | ||
get: function get() { | ||
switch (this.precision) { | ||
case Precision.HALF: | ||
return Uint16Array; | ||
case Precision.SINGLE: | ||
return Float32Array; | ||
case Precision.DOUBLE: | ||
return Float64Array; | ||
default: | ||
throw new Error("Unrecognized ".concat(this[Symbol.toStringTag], " type")); | ||
} | ||
} | ||
}, { | ||
key: Symbol.toStringTag, | ||
@@ -462,7 +421,2 @@ get: function get() { | ||
}, { | ||
key: "ArrayType", | ||
get: function get() { | ||
return Uint8Array; | ||
} | ||
}, { | ||
key: Symbol.toStringTag, | ||
@@ -506,7 +460,2 @@ get: function get() { | ||
}, { | ||
key: "ArrayType", | ||
get: function get() { | ||
return Int32Array; | ||
} | ||
}, { | ||
key: Symbol.toStringTag, | ||
@@ -588,7 +537,2 @@ get: function get() { | ||
} | ||
}, { | ||
key: "ArrayType", | ||
get: function get() { | ||
return Int32Array; | ||
} | ||
}]); | ||
@@ -648,7 +592,2 @@ | ||
}, { | ||
key: "ArrayType", | ||
get: function get() { | ||
return Int32Array; | ||
} | ||
}, { | ||
key: Symbol.toStringTag, | ||
@@ -661,3 +600,3 @@ get: function get() { | ||
value: function toString() { | ||
return "Timestamp<".concat(TimeUnit[this.unit]).concat(this.timezone ? ", ".concat(this.timezone) : "", ">"); | ||
return "Timestamp<".concat(TimeUnit[this.unit]).concat(this.timezone ? ", ".concat(this.timezone) : '', ">"); | ||
} | ||
@@ -753,7 +692,2 @@ }]); | ||
}, { | ||
key: "ArrayType", | ||
get: function get() { | ||
return Int32Array; | ||
} | ||
}, { | ||
key: Symbol.toStringTag, | ||
@@ -830,7 +764,2 @@ get: function get() { | ||
}, { | ||
key: "ArrayType", | ||
get: function get() { | ||
return this.valueType.ArrayType; | ||
} | ||
}, { | ||
key: Symbol.toStringTag, | ||
@@ -837,0 +766,0 @@ get: function get() { |
@@ -1,2 +0,2 @@ | ||
import { Type } from './arrow-like/enum'; | ||
import { Type } from './arrow-like/type'; | ||
export function getTypeInfo(arrowTypeLike) { | ||
@@ -17,4 +17,4 @@ return { | ||
for (var key in Type) { | ||
ReverseType[Type[key]] = key; | ||
for (var _key in Type) { | ||
ReverseType[Type[_key]] = _key; | ||
} | ||
@@ -21,0 +21,0 @@ } |
/** | ||
* @returns a Promise for an Array with the elements in `asyncIterable` | ||
*/ | ||
export function takeAsync(asyncIterable: AsyncIterable<any>, count?: number): Promise<any[]> | ||
export function takeAsync(asyncIterable: AsyncIterable<any>, count?: number): Promise<any[]>; | ||
@@ -25,2 +25,1 @@ /** | ||
} | ||
@@ -1,3 +0,3 @@ | ||
import {LoaderObject} from "@loaders.gl/loader-utils"; | ||
import {LoaderObject} from '@loaders.gl/loader-utils'; | ||
export const XMLLoader: LoaderObject; |
{ | ||
"name": "@loaders.gl/tables", | ||
"version": "3.0.0-alpha.18", | ||
"version": "3.0.0-alpha.19", | ||
"description": "Table format APIs for JSON, CSV, etc...", | ||
@@ -21,3 +21,3 @@ "license": "MIT", | ||
], | ||
"types": "src/index.d.ts", | ||
"types": "src/index.ts", | ||
"main": "dist/es5/index.js", | ||
@@ -36,6 +36,6 @@ "module": "dist/esm/index.js", | ||
"dependencies": { | ||
"@loaders.gl/core": "3.0.0-alpha.18", | ||
"@loaders.gl/core": "3.0.0-alpha.19", | ||
"d3-dsv": "^1.2.0" | ||
}, | ||
"gitHead": "8cb1ea7be6c51bae6a4c61b8ee4b71586b02a797" | ||
"gitHead": "4e0a11c8f59a3c3b96eab8e5b81469f72d682e96" | ||
} |
@@ -1,2 +0,1 @@ | ||
/* global window, global */ | ||
const moduleExports = require('./index'); | ||
@@ -3,0 +2,0 @@ |
@@ -1,3 +0,3 @@ | ||
import {LoaderObject} from "@loaders.gl/loader-utils"; | ||
import {LoaderObject} from '@loaders.gl/loader-utils'; | ||
export const JSONLoader: LoaderObject; |
import {Schema, Batch, IBatchBuilder} from './table-types'; | ||
export default class ColumnarTableBatch implements IBatchBuilder{ | ||
export default class ColumnarTableBatch implements IBatchBuilder { | ||
constructor(schema: Schema, options?: object); | ||
@@ -5,0 +5,0 @@ |
/** | ||
* @returns a Promise for an Array with the elements in `asyncIterable` | ||
*/ | ||
export function takeAsync(asyncIterable: AsyncIterable<any>, count?: number): Promise<any[]> | ||
export function takeAsync(asyncIterable: AsyncIterable<any>, count?: number): Promise<any[]>; | ||
@@ -25,2 +25,1 @@ /** | ||
} | ||
@@ -1,2 +0,1 @@ | ||
/* global window, DOMParser */ | ||
export default function parseXML(xml) { | ||
@@ -3,0 +2,0 @@ if (window.DOMParser) { |
@@ -1,3 +0,3 @@ | ||
import {LoaderObject} from "@loaders.gl/loader-utils"; | ||
import {LoaderObject} from '@loaders.gl/loader-utils'; | ||
export const XMLLoader: LoaderObject; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
438858
-1.49%124
-10.79%6306
-11.75%+ Added
+ Added
+ Added
- Removed
- Removed
- Removed