@loaders.gl/schema 3.1.0-alpha.3 → 4.0.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dist.min.js DELETED
@@ -1,2 +0,0 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var i in r)("object"==typeof exports?exports:e)[i]=r[i]}}(window,(function(){return function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=84)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.strideForType=t.Dictionary=t.Map_=t.FixedSizeList=t.FixedSizeBinary=t.SparseUnion=t.DenseUnion=t.Union=t.Struct=t.List=t.IntervalYearMonth=t.IntervalDayTime=t.Interval=t.TimestampNanosecond=t.TimestampMicrosecond=t.TimestampMillisecond=t.TimestampSecond=t.Timestamp=t.TimeNanosecond=t.TimeMicrosecond=t.TimeMillisecond=t.TimeSecond=t.Time=t.DateMillisecond=t.DateDay=t.Date_=t.Decimal=t.Bool=t.Utf8=t.Binary=t.Float64=t.Float32=t.Float16=t.Float=t.Uint64=t.Uint32=t.Uint16=t.Uint8=t.Int64=t.Int32=t.Int16=t.Int8=t.Int=t.Null=t.DataType=void 0;const i=r(1);class n{static isNull(e){return e&&e.typeId===i.Type.Null}static isInt(e){return e&&e.typeId===i.Type.Int}static isFloat(e){return e&&e.typeId===i.Type.Float}static isBinary(e){return e&&e.typeId===i.Type.Binary}static isUtf8(e){return e&&e.typeId===i.Type.Utf8}static isBool(e){return e&&e.typeId===i.Type.Bool}static isDecimal(e){return e&&e.typeId===i.Type.Decimal}static isDate(e){return e&&e.typeId===i.Type.Date}static isTime(e){return e&&e.typeId===i.Type.Time}static isTimestamp(e){return e&&e.typeId===i.Type.Timestamp}static isInterval(e){return e&&e.typeId===i.Type.Interval}static isList(e){return e&&e.typeId===i.Type.List}static isStruct(e){return e&&e.typeId===i.Type.Struct}static isUnion(e){return e&&e.typeId===i.Type.Union}static isFixedSizeBinary(e){return e&&e.typeId===i.Type.FixedSizeBinary}static isFixedSizeList(e){return e&&e.typeId===i.Type.FixedSizeList}static isMap(e){return e&&e.typeId===i.Type.Map}static isDictionary(e){return e&&e.typeId===i.Type.Dictionary}get typeId(){return i.Type.NONE}}var s;t.DataType=n,n[Symbol.toStringTag]=((s=n.prototype).children=null,s.ArrayType=Array,s[Symbol.toStringTag]="DataType");class o extends n{toString(){return"Null"}get typeId(){return i.Type.Null}}t.Null=o,o[Symbol.toStringTag]=(e=>e[Symbol.toStringTag]="Null")(o.prototype);class a extends n{constructor(e,t){super(),this.isSigned=e,this.bitWidth=t}get typeId(){return i.Type.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}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}t.Int=a,a[Symbol.toStringTag]=(e=>(e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]="Int"))(a.prototype);class c extends a{constructor(){super(!0,8)}}t.Int8=c;class u extends a{constructor(){super(!0,16)}}t.Int16=u;class l extends a{constructor(){super(!0,32)}}t.Int32=l;class d extends a{constructor(){super(!0,64)}}t.Int64=d;class h extends a{constructor(){super(!1,8)}}t.Uint8=h;class f extends a{constructor(){super(!1,16)}}t.Uint16=f;class p extends a{constructor(){super(!1,32)}}t.Uint32=p;class y extends a{constructor(){super(!1,64)}}t.Uint64=y,Object.defineProperty(c.prototype,"ArrayType",{value:Int8Array}),Object.defineProperty(u.prototype,"ArrayType",{value:Int16Array}),Object.defineProperty(l.prototype,"ArrayType",{value:Int32Array}),Object.defineProperty(d.prototype,"ArrayType",{value:Int32Array}),Object.defineProperty(h.prototype,"ArrayType",{value:Uint8Array}),Object.defineProperty(f.prototype,"ArrayType",{value:Uint16Array}),Object.defineProperty(p.prototype,"ArrayType",{value:Uint32Array}),Object.defineProperty(y.prototype,"ArrayType",{value:Uint32Array});class b extends n{constructor(e){super(),this.precision=e}get typeId(){return i.Type.Float}get ArrayType(){switch(this.precision){case i.Precision.HALF:return Uint16Array;case i.Precision.SINGLE:return Float32Array;case i.Precision.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return"Float"+(this.precision<<5||16)}}t.Float=b,b[Symbol.toStringTag]=(e=>(e.precision=null,e[Symbol.toStringTag]="Float"))(b.prototype);class m extends b{constructor(){super(i.Precision.HALF)}}t.Float16=m;class g extends b{constructor(){super(i.Precision.SINGLE)}}t.Float32=g;class _ extends b{constructor(){super(i.Precision.DOUBLE)}}t.Float64=_,Object.defineProperty(m.prototype,"ArrayType",{value:Uint16Array}),Object.defineProperty(g.prototype,"ArrayType",{value:Float32Array}),Object.defineProperty(_.prototype,"ArrayType",{value:Float64Array});class B extends n{constructor(){super()}get typeId(){return i.Type.Binary}toString(){return"Binary"}}t.Binary=B,B[Symbol.toStringTag]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Binary"))(B.prototype);class v extends n{constructor(){super()}get typeId(){return i.Type.Utf8}toString(){return"Utf8"}}t.Utf8=v,v[Symbol.toStringTag]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Utf8"))(v.prototype);class T extends n{constructor(){super()}get typeId(){return i.Type.Bool}toString(){return"Bool"}}t.Bool=T,T[Symbol.toStringTag]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Bool"))(T.prototype);class I extends n{constructor(e,t){super(),this.scale=e,this.precision=t}get typeId(){return i.Type.Decimal}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}}t.Decimal=I,I[Symbol.toStringTag]=(e=>(e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]="Decimal"))(I.prototype);class w extends n{constructor(e){super(),this.unit=e}get typeId(){return i.Type.Date}toString(){return`Date${32*(this.unit+1)}<${i.DateUnit[this.unit]}>`}}t.Date_=w,w[Symbol.toStringTag]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Date"))(w.prototype);t.DateDay=class extends w{constructor(){super(i.DateUnit.DAY)}};t.DateMillisecond=class extends w{constructor(){super(i.DateUnit.MILLISECOND)}};class S extends n{constructor(e,t){super(),this.unit=e,this.bitWidth=t}get typeId(){return i.Type.Time}toString(){return`Time${this.bitWidth}<${i.TimeUnit[this.unit]}>`}}t.Time=S,S[Symbol.toStringTag]=(e=>(e.unit=null,e.bitWidth=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Time"))(S.prototype);t.TimeSecond=class extends S{constructor(){super(i.TimeUnit.SECOND,32)}};t.TimeMillisecond=class extends S{constructor(){super(i.TimeUnit.MILLISECOND,32)}};t.TimeMicrosecond=class extends S{constructor(){super(i.TimeUnit.MICROSECOND,64)}};t.TimeNanosecond=class extends S{constructor(){super(i.TimeUnit.NANOSECOND,64)}};class O extends n{constructor(e,t){super(),this.unit=e,this.timezone=t}get typeId(){return i.Type.Timestamp}toString(){return`Timestamp<${i.TimeUnit[this.unit]}${this.timezone?", "+this.timezone:""}>`}}t.Timestamp=O,O[Symbol.toStringTag]=(e=>(e.unit=null,e.timezone=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Timestamp"))(O.prototype);t.TimestampSecond=class extends O{constructor(e){super(i.TimeUnit.SECOND,e)}};t.TimestampMillisecond=class extends O{constructor(e){super(i.TimeUnit.MILLISECOND,e)}};t.TimestampMicrosecond=class extends O{constructor(e){super(i.TimeUnit.MICROSECOND,e)}};t.TimestampNanosecond=class extends O{constructor(e){super(i.TimeUnit.NANOSECOND,e)}};class A extends n{constructor(e){super(),this.unit=e}get typeId(){return i.Type.Interval}toString(){return`Interval<${i.IntervalUnit[this.unit]}>`}}t.Interval=A,A[Symbol.toStringTag]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Interval"))(A.prototype);t.IntervalDayTime=class extends A{constructor(){super(i.IntervalUnit.DAY_TIME)}};t.IntervalYearMonth=class extends A{constructor(){super(i.IntervalUnit.YEAR_MONTH)}};class D extends n{constructor(e){super(),this.children=[e]}get typeId(){return i.Type.List}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}}t.List=D,D[Symbol.toStringTag]=(e=>(e.children=null,e[Symbol.toStringTag]="List"))(D.prototype);class V extends n{constructor(e){super(),this.children=e}get typeId(){return i.Type.Struct}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}}t.Struct=V,V[Symbol.toStringTag]=(e=>(e.children=null,e[Symbol.toStringTag]="Struct"))(V.prototype);class F extends n{constructor(e,t,r){super(),this.mode=e,this.children=r,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce((e,t,r)=>(e[t]=r)&&e||e,Object.create(null))}get typeId(){return i.Type.Union}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>""+e.type).join(" | ")}>`}}t.Union=F,F[Symbol.toStringTag]=(e=>(e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]="Union"))(F.prototype);t.DenseUnion=class extends F{constructor(e,t){super(i.UnionMode.Dense,e,t)}};t.SparseUnion=class extends F{constructor(e,t){super(i.UnionMode.Sparse,e,t)}};class M extends n{constructor(e){super(),this.byteWidth=e}get typeId(){return i.Type.FixedSizeBinary}toString(){return`FixedSizeBinary[${this.byteWidth}]`}}t.FixedSizeBinary=M,M[Symbol.toStringTag]=(e=>(e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]="FixedSizeBinary"))(M.prototype);class U extends n{constructor(e,t){super(),this.listSize=e,this.children=[t]}get typeId(){return i.Type.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}t.FixedSizeList=U,U[Symbol.toStringTag]=(e=>(e.children=null,e.listSize=null,e[Symbol.toStringTag]="FixedSizeList"))(U.prototype);class P extends n{constructor(e,t=!1){super(),this.children=[e],this.keysSorted=t}get typeId(){return i.Type.Map}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}toString(){return`Map<{${this.children[0].type.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}}t.Map_=P,P[Symbol.toStringTag]=(e=>(e.children=null,e.keysSorted=null,e[Symbol.toStringTag]="Map_"))(P.prototype);const j=(x=-1,()=>++x);var x;class L extends n{constructor(e,t,r,i){super(),this.indices=t,this.dictionary=e,this.isOrdered=i||!1,this.id=null==r?j():"number"==typeof r?r:r.low}get typeId(){return i.Type.Dictionary}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}}t.Dictionary=L,L[Symbol.toStringTag]=(e=>(e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]="Dictionary"))(L.prototype),t.strideForType=function(e){const t=e;switch(e.typeId){case i.Type.Decimal:return 4;case i.Type.Timestamp:return 2;case i.Type.Date:case i.Type.Interval:return 1+t.unit;case i.Type.Int:case i.Type.Time:return+(t.bitWidth>32)+1;case i.Type.FixedSizeList:return t.listSize;case i.Type.FixedSizeBinary:return t.byteWidth;default:return 1}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BufferType=t.Type=t.MessageHeader=t.MetadataVersion=t.IntervalUnit=t.UnionMode=t.Precision=t.TimeUnit=t.DateUnit=void 0;var i=r(16);Object.defineProperty(t,"DateUnit",{enumerable:!0,get:function(){return i.DateUnit}}),Object.defineProperty(t,"TimeUnit",{enumerable:!0,get:function(){return i.TimeUnit}}),Object.defineProperty(t,"Precision",{enumerable:!0,get:function(){return i.Precision}}),Object.defineProperty(t,"UnionMode",{enumerable:!0,get:function(){return i.UnionMode}}),Object.defineProperty(t,"IntervalUnit",{enumerable:!0,get:function(){return i.IntervalUnit}}),Object.defineProperty(t,"MetadataVersion",{enumerable:!0,get:function(){return i.MetadataVersion}});var n=r(34);Object.defineProperty(t,"MessageHeader",{enumerable:!0,get:function(){return n.MessageHeader}}),function(e){e[e.NONE=0]="NONE",e[e.Null=1]="Null",e[e.Int=2]="Int",e[e.Float=3]="Float",e[e.Binary=4]="Binary",e[e.Utf8=5]="Utf8",e[e.Bool=6]="Bool",e[e.Decimal=7]="Decimal",e[e.Date=8]="Date",e[e.Time=9]="Time",e[e.Timestamp=10]="Timestamp",e[e.Interval=11]="Interval",e[e.List=12]="List",e[e.Struct=13]="Struct",e[e.Union=14]="Union",e[e.FixedSizeBinary=15]="FixedSizeBinary",e[e.FixedSizeList=16]="FixedSizeList",e[e.Map=17]="Map",e[e.Dictionary=-1]="Dictionary",e[e.Int8=-2]="Int8",e[e.Int16=-3]="Int16",e[e.Int32=-4]="Int32",e[e.Int64=-5]="Int64",e[e.Uint8=-6]="Uint8",e[e.Uint16=-7]="Uint16",e[e.Uint32=-8]="Uint32",e[e.Uint64=-9]="Uint64",e[e.Float16=-10]="Float16",e[e.Float32=-11]="Float32",e[e.Float64=-12]="Float64",e[e.DateDay=-13]="DateDay",e[e.DateMillisecond=-14]="DateMillisecond",e[e.TimestampSecond=-15]="TimestampSecond",e[e.TimestampMillisecond=-16]="TimestampMillisecond",e[e.TimestampMicrosecond=-17]="TimestampMicrosecond",e[e.TimestampNanosecond=-18]="TimestampNanosecond",e[e.TimeSecond=-19]="TimeSecond",e[e.TimeMillisecond=-20]="TimeMillisecond",e[e.TimeMicrosecond=-21]="TimeMicrosecond",e[e.TimeNanosecond=-22]="TimeNanosecond",e[e.DenseUnion=-23]="DenseUnion",e[e.SparseUnion=-24]="SparseUnion",e[e.IntervalDayTime=-25]="IntervalDayTime",e[e.IntervalYearMonth=-26]="IntervalYearMonth"}(t.Type||(t.Type={})),function(e){e[e.OFFSET=0]="OFFSET",e[e.DATA=1]="DATA",e[e.VALIDITY=2]="VALIDITY",e[e.TYPE=3]="TYPE"}(t.BufferType||(t.BufferType={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VariableWidthBuilder=t.FixedWidthBuilder=t.Builder=void 0;const i=r(3),n=r(1),s=r(10),o=r(86),a=r(17),c=r(0);class u{constructor({type:e,nullValues:t}){this.length=0,this.finished=!1,this.type=e,this.children=[],this.nullValues=t,this.stride=c.strideForType(e),this._nulls=new a.BitmapBufferBuilder,t&&t.length>0&&(this._isValid=o.createIsValidFunction(t))}static new(e){}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e){throw new Error('"throughDOM" not available in this environment')}static throughIterable(e){return function(e){const{queueingStrategy:t="count"}=e,{highWaterMark:r=("bytes"!==t?1e3:16384)}=e,i="bytes"!==t?"length":"byteLength";return function*(t){let n=0;const s=u.new(e);for(const e of t)s.append(e)[i]>=r&&++n&&(yield s.toVector());(s.finish().length>0||0===n)&&(yield s.toVector())}}(e)}static throughAsyncIterable(e){return function(e){const{queueingStrategy:t="count"}=e,{highWaterMark:r=("bytes"!==t?1e3:16384)}=e,i="bytes"!==t?"length":"byteLength";return async function*(t){let n=0;const s=u.new(e);for await(const e of t)s.append(e)[i]>=r&&++n&&(yield s.toVector());(s.finish().length>0||0===n)&&(yield s.toVector())}}(e)}toVector(){return i.Vector.new(this.flush())}get ArrayType(){return this.type.ArrayType}get nullCount(){return this._nulls.numInvalid}get numChildren(){return this.children.length}get byteLength(){let e=0;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),this._typeIds&&(e+=this._typeIds.byteLength),this.children.reduce((e,t)=>e+t.byteLength,e)}get reservedLength(){return this._nulls.reservedLength}get reservedByteLength(){let e=0;return this._offsets&&(e+=this._offsets.reservedByteLength),this._values&&(e+=this._values.reservedByteLength),this._nulls&&(e+=this._nulls.reservedByteLength),this._typeIds&&(e+=this._typeIds.reservedByteLength),this.children.reduce((e,t)=>e+t.reservedByteLength,e)}get valueOffsets(){return this._offsets?this._offsets.buffer:null}get values(){return this._values?this._values.buffer:null}get nullBitmap(){return this._nulls?this._nulls.buffer:null}get typeIds(){return this._typeIds?this._typeIds.buffer:null}append(e){return this.set(this.length,e)}isValid(e){return this._isValid(e)}set(e,t){return this.setValid(e,this.isValid(t))&&this.setValue(e,t),this}setValue(e,t){this._setValue(this,e,t)}setValid(e,t){return this.length=this._nulls.set(e,+t).length,t}addChild(e,t=""+this.numChildren){throw new Error(`Cannot append children to non-nested type "${this.type}"`)}getChildAt(e){return this.children[e]||null}flush(){const e=[],t=this._values,r=this._offsets,i=this._typeIds,{length:o,nullCount:a}=this;i?(e[n.BufferType.TYPE]=i.flush(o),r&&(e[n.BufferType.OFFSET]=r.flush(o))):r?(t&&(e[n.BufferType.DATA]=t.flush(r.last())),e[n.BufferType.OFFSET]=r.flush(o)):t&&(e[n.BufferType.DATA]=t.flush(o)),a>0&&(e[n.BufferType.VALIDITY]=this._nulls.flush(o));const c=s.Data.new(this.type,0,o,a,e,this.children.map(e=>e.flush()));return this.clear(),c}finish(){return this.finished=!0,this.children.forEach(e=>e.finish()),this}clear(){return this.length=0,this._offsets&&this._offsets.clear(),this._values&&this._values.clear(),this._nulls&&this._nulls.clear(),this._typeIds&&this._typeIds.clear(),this.children.forEach(e=>e.clear()),this}}t.Builder=u,u.prototype.length=1,u.prototype.stride=1,u.prototype.children=null,u.prototype.finished=!1,u.prototype.nullValues=null,u.prototype._isValid=()=>!0;t.FixedWidthBuilder=class extends u{constructor(e){super(e),this._values=new a.DataBufferBuilder(new this.ArrayType(0),this.stride)}setValue(e,t){const r=this._values;return r.reserve(e-r.length+1),super.setValue(e,t)}};t.VariableWidthBuilder=class extends u{constructor(e){super(e),this._pendingLength=0,this._offsets=new a.OffsetsBufferBuilder}setValue(e,t){const r=this._pending||(this._pending=new Map),i=r.get(e);i&&(this._pendingLength-=i.length),this._pendingLength+=t.length,r.set(e,t)}setValid(e,t){return!!super.setValid(e,t)||((this._pending||(this._pending=new Map)).set(e,void 0),!1)}clear(){return this._pendingLength=0,this._pending=void 0,super.clear()}flush(){return this._flush(),super.flush()}finish(){return this._flush(),super.finish()}_flush(){const e=this._pending,t=this._pendingLength;return this._pendingLength=0,this._pending=void 0,e&&e.size>0&&this._flushPending(e,t),this}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Vector=t.AbstractVector=void 0;class i{}t.AbstractVector=i,t.Vector=i,i.prototype.data=null},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseVector=void 0;const i=r(1),n=r(19),s=r(30),o=r(3);class a extends o.AbstractVector{constructor(e,t){super(),this._children=t,this.numChildren=e.childData.length,this._bindDataAccessors(this.data=e)}get type(){return this.data.type}get typeId(){return this.data.typeId}get length(){return this.data.length}get offset(){return this.data.offset}get stride(){return this.data.stride}get nullCount(){return this.data.nullCount}get byteLength(){return this.data.byteLength}get VectorName(){return i.Type[this.typeId]+"Vector"}get ArrayType(){return this.type.ArrayType}get values(){return this.data.values}get typeIds(){return this.data.typeIds}get nullBitmap(){return this.data.nullBitmap}get valueOffsets(){return this.data.valueOffsets}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}clone(e,t=this._children){return o.Vector.new(e,t)}concat(...e){return n.Chunked.concat(this,...e)}slice(e,t){return s.clampRange(this,e,t,this._sliceInternal)}isValid(e){if(this.nullCount>0){const t=this.offset+e;return 0!==(this.nullBitmap[t>>3]&1<<t%8)}return!0}getChildAt(e){return e<0||e>=this.numChildren?null:(this._children||(this._children=[]))[e]||(this._children[e]=o.Vector.new(this.data.childData[e]))}toJSON(){return[...this]}_sliceInternal(e,t,r){return e.clone(e.data.slice(t,r-t),null)}_bindDataAccessors(e){}}t.BaseVector=a,a.prototype[Symbol.isConcatSpreadable]=!0},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compareArrayLike=t.rebaseValueOffsets=t.toUint8ClampedArrayAsyncIterator=t.toFloat64ArrayAsyncIterator=t.toFloat32ArrayAsyncIterator=t.toUint32ArrayAsyncIterator=t.toUint16ArrayAsyncIterator=t.toUint8ArrayAsyncIterator=t.toInt32ArrayAsyncIterator=t.toInt16ArrayAsyncIterator=t.toInt8ArrayAsyncIterator=t.toArrayBufferViewAsyncIterator=t.toUint8ClampedArrayIterator=t.toFloat64ArrayIterator=t.toFloat32ArrayIterator=t.toUint32ArrayIterator=t.toUint16ArrayIterator=t.toUint8ArrayIterator=t.toInt32ArrayIterator=t.toInt16ArrayIterator=t.toInt8ArrayIterator=t.toArrayBufferViewIterator=t.toUint8ClampedArray=t.toFloat64Array=t.toFloat32Array=t.toBigUint64Array=t.toUint32Array=t.toUint16Array=t.toUint8Array=t.toBigInt64Array=t.toInt32Array=t.toInt16Array=t.toInt8Array=t.toArrayBufferView=t.joinUint8Arrays=t.memcpy=void 0;const i=r(14),n=r(20);var s=i.flatbuffers.ByteBuffer;const o=r(9),a="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;function c(e,t,r=0,i=t.byteLength){const n=e.byteLength,s=new Uint8Array(e.buffer,e.byteOffset,n),o=new Uint8Array(t.buffer,t.byteOffset,Math.min(i,n));return s.set(o,r),e}function u(e,t){let r=o.isIteratorResult(t)?t.value:t;return r instanceof e?e===Uint8Array?new e(r.buffer,r.byteOffset,r.byteLength):r:r?("string"==typeof r&&(r=n.encodeUtf8(r)),r instanceof ArrayBuffer||r instanceof a?new e(r):r instanceof s?u(e,r.bytes()):ArrayBuffer.isView(r)?r.byteLength<=0?new e(0):new e(r.buffer,r.byteOffset,r.byteLength/e.BYTES_PER_ELEMENT):e.from(r)):new e(0)}t.memcpy=c,t.joinUint8Arrays=function(e,t){const r=function(e){const t=e[0]?[e[0]]:[];let r,i,n,s;for(let o,a,c=0,u=0,l=e.length;++c<l;)o=t[u],a=e[c],!o||!a||o.buffer!==a.buffer||a.byteOffset<o.byteOffset?a&&(t[++u]=a):(({byteOffset:r,byteLength:n}=o),({byteOffset:i,byteLength:s}=a),r+n<i||i+s<r?a&&(t[++u]=a):t[u]=new Uint8Array(o.buffer,r,i-r+s));return t}(e),i=r.reduce((e,t)=>e+t.byteLength,0);let n,s,o,a=0,u=-1;const l=Math.min(t||1/0,i);for(let e=r.length;++u<e;){if(n=r[u],s=n.subarray(0,Math.min(n.length,l-a)),l<=a+s.length){s.length<n.length?r[u]=n.subarray(s.length):s.length===n.length&&u++,o?c(o,s,a):o=s;break}c(o||(o=new Uint8Array(l)),s,a),a+=s.length}return[o||new Uint8Array(0),r.slice(u),i-(o?o.byteLength:0)]},t.toArrayBufferView=u,t.toInt8Array=e=>u(Int8Array,e),t.toInt16Array=e=>u(Int16Array,e),t.toInt32Array=e=>u(Int32Array,e),t.toBigInt64Array=e=>u(o.BigInt64Array,e),t.toUint8Array=e=>u(Uint8Array,e),t.toUint16Array=e=>u(Uint16Array,e),t.toUint32Array=e=>u(Uint32Array,e),t.toBigUint64Array=e=>u(o.BigUint64Array,e),t.toFloat32Array=e=>u(Float32Array,e),t.toFloat64Array=e=>u(Float64Array,e),t.toUint8ClampedArray=e=>u(Uint8ClampedArray,e);const l=e=>(e.next(),e);function*d(e,t){const r=function*(e){yield e},i="string"==typeof t||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof a?r(t):o.isIterable(t)?t:r(t);return yield*l(function*(t){let r=null;do{r=t.next(yield u(e,r))}while(!r.done)}(i[Symbol.iterator]())),new e}async function*h(e,t){if(o.isPromise(t))return yield*h(e,await t);const r=async function*(e){yield await e},i="string"==typeof t||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof a?r(t):o.isIterable(t)?async function*(e){yield*l(function*(e){let t=null;do{t=e.next(yield t&&t.value)}while(!t.done)}(e[Symbol.iterator]()))}(t):o.isAsyncIterable(t)?t:r(t);return yield*l(async function*(t){let r=null;do{r=await t.next(yield u(e,r))}while(!r.done)}(i[Symbol.asyncIterator]())),new e}t.toArrayBufferViewIterator=d,t.toInt8ArrayIterator=e=>d(Int8Array,e),t.toInt16ArrayIterator=e=>d(Int16Array,e),t.toInt32ArrayIterator=e=>d(Int32Array,e),t.toUint8ArrayIterator=e=>d(Uint8Array,e),t.toUint16ArrayIterator=e=>d(Uint16Array,e),t.toUint32ArrayIterator=e=>d(Uint32Array,e),t.toFloat32ArrayIterator=e=>d(Float32Array,e),t.toFloat64ArrayIterator=e=>d(Float64Array,e),t.toUint8ClampedArrayIterator=e=>d(Uint8ClampedArray,e),t.toArrayBufferViewAsyncIterator=h,t.toInt8ArrayAsyncIterator=e=>h(Int8Array,e),t.toInt16ArrayAsyncIterator=e=>h(Int16Array,e),t.toInt32ArrayAsyncIterator=e=>h(Int32Array,e),t.toUint8ArrayAsyncIterator=e=>h(Uint8Array,e),t.toUint16ArrayAsyncIterator=e=>h(Uint16Array,e),t.toUint32ArrayAsyncIterator=e=>h(Uint32Array,e),t.toFloat32ArrayAsyncIterator=e=>h(Float32Array,e),t.toFloat64ArrayAsyncIterator=e=>h(Float64Array,e),t.toUint8ClampedArrayAsyncIterator=e=>h(Uint8ClampedArray,e),t.rebaseValueOffsets=function(e,t,r){if(0!==e){r=r.slice(0,t+1);for(let i=-1;++i<=t;)r[i]+=e}return r},t.compareArrayLike=function(e,t){let r=0;const i=e.length;if(i!==t.length)return!1;if(i>0)do{if(e[r]!==t[r])return!1}while(++r<i);return!0}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Field=t.Schema=void 0;const i=r(0);class n{constructor(e=[],t,r){this.fields=e||[],this.metadata=t||new Map,r||(r=a(e)),this.dictionaries=r}get[Symbol.toStringTag](){return"Schema"}toString(){return`Schema<{ ${this.fields.map((e,t)=>`${t}: ${e}`).join(", ")} }>`}select(...e){const t=e.reduce((e,t)=>(e[t]=!0)&&e,Object.create(null));return new n(this.fields.filter(e=>t[e.name]),this.metadata)}selectAt(...e){return new n(e.map(e=>this.fields[e]).filter(Boolean),this.metadata)}assign(...e){const t=e[0]instanceof n?e[0]:Array.isArray(e[0])?new n(e[0]):new n(e),r=[...this.fields],i=o(o(new Map,this.metadata),t.metadata),s=t.fields.filter(e=>{const t=r.findIndex(t=>t.name===e.name);return!~t||(r[t]=e.clone({metadata:o(o(new Map,r[t].metadata),e.metadata)}))&&!1}),c=a(s,new Map);return new n([...r,...s],i,new Map([...this.dictionaries,...c]))}}t.Schema=n;class s{constructor(e,t,r=!1,i){this.name=e,this.type=t,this.nullable=r,this.metadata=i||new Map}static new(...e){let[t,r,i,n]=e;return e[0]&&"object"==typeof e[0]&&(({name:t}=e[0]),void 0===r&&(r=e[0].type),void 0===i&&(i=e[0].nullable),void 0===n&&(n=e[0].metadata)),new s(""+t,r,i,n)}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...e){let[t,r,i,n]=e;return e[0]&&"object"==typeof e[0]?({name:t=this.name,type:r=this.type,nullable:i=this.nullable,metadata:n=this.metadata}=e[0]):[t=this.name,r=this.type,i=this.nullable,n=this.metadata]=e,s.new(t,r,i,n)}}function o(e,t){return new Map([...e||new Map,...t||new Map])}function a(e,t=new Map){for(let r=-1,n=e.length;++r<n;){const n=e[r].type;if(i.DataType.isDictionary(n))if(t.has(n.id)){if(t.get(n.id)!==n.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}else t.set(n.id,n.dictionary);n.children&&n.children.length>0&&a(n.children,t)}return t}t.Field=s,n.prototype.fields=null,n.prototype.metadata=null,n.prototype.dictionaries=null,s.prototype.type=null,s.prototype.name=null,s.prototype.nullable=null,s.prototype.metadata=null},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Utf8Builder=t.SparseUnionBuilder=t.DenseUnionBuilder=t.UnionBuilder=t.TimeNanosecondBuilder=t.TimeMicrosecondBuilder=t.TimeMillisecondBuilder=t.TimeSecondBuilder=t.TimeBuilder=t.TimestampNanosecondBuilder=t.TimestampMicrosecondBuilder=t.TimestampMillisecondBuilder=t.TimestampSecondBuilder=t.TimestampBuilder=t.StructBuilder=t.NullBuilder=t.MapBuilder=t.ListBuilder=t.Uint64Builder=t.Uint32Builder=t.Uint16Builder=t.Uint8Builder=t.Int64Builder=t.Int32Builder=t.Int16Builder=t.Int8Builder=t.IntBuilder=t.IntervalYearMonthBuilder=t.IntervalDayTimeBuilder=t.IntervalBuilder=t.Float64Builder=t.Float32Builder=t.Float16Builder=t.FloatBuilder=t.FixedSizeListBuilder=t.FixedSizeBinaryBuilder=t.DictionaryBuilder=t.DecimalBuilder=t.DateMillisecondBuilder=t.DateDayBuilder=t.DateBuilder=t.BoolBuilder=t.BinaryBuilder=t.Builder=t.util=t.predicate=t.CountByResult=t.FilteredDataFrame=t.DataFrame=t.RecordBatch=t.Message=t.JSONMessageReader=t.AsyncMessageReader=t.MessageReader=t.RecordBatchJSONWriter=t.RecordBatchStreamWriter=t.RecordBatchFileWriter=t.RecordBatchWriter=t.AsyncRecordBatchStreamReader=t.AsyncRecordBatchFileReader=t.RecordBatchStreamReader=t.RecordBatchFileReader=t.RecordBatchReader=t.AsyncByteQueue=t.AsyncByteStream=t.ByteStream=t.Utf8Vector=t.SparseUnionVector=t.DenseUnionVector=t.UnionVector=t.TimeNanosecondVector=t.TimeMicrosecondVector=t.TimeMillisecondVector=t.TimeSecondVector=t.TimeVector=t.TimestampNanosecondVector=t.TimestampMicrosecondVector=t.TimestampMillisecondVector=t.TimestampSecondVector=t.TimestampVector=t.StructVector=t.NullVector=t.MapVector=t.ListVector=t.Uint64Vector=t.Uint32Vector=t.Uint16Vector=t.Uint8Vector=t.Int64Vector=t.Int32Vector=t.Int16Vector=t.Int8Vector=t.IntVector=t.IntervalYearMonthVector=t.IntervalDayTimeVector=t.IntervalVector=t.Float64Vector=t.Float32Vector=t.Float16Vector=t.FloatVector=t.FixedSizeListVector=t.FixedSizeBinaryVector=t.DictionaryVector=t.DecimalVector=t.DateMillisecondVector=t.DateDayVector=t.DateVector=t.Chunked=t.BoolVector=t.BinaryVector=t.BaseVector=t.Vector=t.Visitor=t.Field=t.Schema=t.Column=t.Table=t.Map_=t.FixedSizeList=t.IntervalYearMonth=t.IntervalDayTime=t.Interval=t.Dictionary=t.SparseUnion=t.DenseUnion=t.Union=t.Struct=t.List=t.Decimal=t.TimeNanosecond=t.TimeMicrosecond=t.TimeMillisecond=t.TimeSecond=t.Time=t.TimestampNanosecond=t.TimestampMicrosecond=t.TimestampMillisecond=t.TimestampSecond=t.Timestamp=t.DateMillisecond=t.DateDay=t.Date_=t.FixedSizeBinary=t.Binary=t.Utf8=t.Float64=t.Float32=t.Float16=t.Float=t.Uint64=t.Uint32=t.Uint16=t.Uint8=t.Int64=t.Int32=t.Int16=t.Int8=t.Int=t.Bool=t.Null=t.DataType=t.Data=t.BufferType=t.UnionMode=t.Type=t.TimeUnit=t.Precision=t.MetadataVersion=t.MessageHeader=t.IntervalUnit=t.DateUnit=void 0;const i=r(25),n=r(33),s=r(28),o=r(37),a=r(100),c=r(101),u=r(102),l=r(103);i.default.toDOMStream=a.toDOMStream,n.Builder.throughDOM=c.builderThroughDOMStream,s.RecordBatchReader.throughDOM=u.recordBatchReaderThroughDOMStream,s.RecordBatchFileReader.throughDOM=u.recordBatchReaderThroughDOMStream,s.RecordBatchStreamReader.throughDOM=u.recordBatchReaderThroughDOMStream,o.RecordBatchWriter.throughDOM=l.recordBatchWriterThroughDOMStream,o.RecordBatchFileWriter.throughDOM=l.recordBatchWriterThroughDOMStream,o.RecordBatchStreamWriter.throughDOM=l.recordBatchWriterThroughDOMStream;var d=r(11);Object.defineProperty(t,"DateUnit",{enumerable:!0,get:function(){return d.DateUnit}}),Object.defineProperty(t,"IntervalUnit",{enumerable:!0,get:function(){return d.IntervalUnit}}),Object.defineProperty(t,"MessageHeader",{enumerable:!0,get:function(){return d.MessageHeader}}),Object.defineProperty(t,"MetadataVersion",{enumerable:!0,get:function(){return d.MetadataVersion}}),Object.defineProperty(t,"Precision",{enumerable:!0,get:function(){return d.Precision}}),Object.defineProperty(t,"TimeUnit",{enumerable:!0,get:function(){return d.TimeUnit}}),Object.defineProperty(t,"Type",{enumerable:!0,get:function(){return d.Type}}),Object.defineProperty(t,"UnionMode",{enumerable:!0,get:function(){return d.UnionMode}}),Object.defineProperty(t,"BufferType",{enumerable:!0,get:function(){return d.BufferType}}),Object.defineProperty(t,"Data",{enumerable:!0,get:function(){return d.Data}}),Object.defineProperty(t,"DataType",{enumerable:!0,get:function(){return d.DataType}}),Object.defineProperty(t,"Null",{enumerable:!0,get:function(){return d.Null}}),Object.defineProperty(t,"Bool",{enumerable:!0,get:function(){return d.Bool}}),Object.defineProperty(t,"Int",{enumerable:!0,get:function(){return d.Int}}),Object.defineProperty(t,"Int8",{enumerable:!0,get:function(){return d.Int8}}),Object.defineProperty(t,"Int16",{enumerable:!0,get:function(){return d.Int16}}),Object.defineProperty(t,"Int32",{enumerable:!0,get:function(){return d.Int32}}),Object.defineProperty(t,"Int64",{enumerable:!0,get:function(){return d.Int64}}),Object.defineProperty(t,"Uint8",{enumerable:!0,get:function(){return d.Uint8}}),Object.defineProperty(t,"Uint16",{enumerable:!0,get:function(){return d.Uint16}}),Object.defineProperty(t,"Uint32",{enumerable:!0,get:function(){return d.Uint32}}),Object.defineProperty(t,"Uint64",{enumerable:!0,get:function(){return d.Uint64}}),Object.defineProperty(t,"Float",{enumerable:!0,get:function(){return d.Float}}),Object.defineProperty(t,"Float16",{enumerable:!0,get:function(){return d.Float16}}),Object.defineProperty(t,"Float32",{enumerable:!0,get:function(){return d.Float32}}),Object.defineProperty(t,"Float64",{enumerable:!0,get:function(){return d.Float64}}),Object.defineProperty(t,"Utf8",{enumerable:!0,get:function(){return d.Utf8}}),Object.defineProperty(t,"Binary",{enumerable:!0,get:function(){return d.Binary}}),Object.defineProperty(t,"FixedSizeBinary",{enumerable:!0,get:function(){return d.FixedSizeBinary}}),Object.defineProperty(t,"Date_",{enumerable:!0,get:function(){return d.Date_}}),Object.defineProperty(t,"DateDay",{enumerable:!0,get:function(){return d.DateDay}}),Object.defineProperty(t,"DateMillisecond",{enumerable:!0,get:function(){return d.DateMillisecond}}),Object.defineProperty(t,"Timestamp",{enumerable:!0,get:function(){return d.Timestamp}}),Object.defineProperty(t,"TimestampSecond",{enumerable:!0,get:function(){return d.TimestampSecond}}),Object.defineProperty(t,"TimestampMillisecond",{enumerable:!0,get:function(){return d.TimestampMillisecond}}),Object.defineProperty(t,"TimestampMicrosecond",{enumerable:!0,get:function(){return d.TimestampMicrosecond}}),Object.defineProperty(t,"TimestampNanosecond",{enumerable:!0,get:function(){return d.TimestampNanosecond}}),Object.defineProperty(t,"Time",{enumerable:!0,get:function(){return d.Time}}),Object.defineProperty(t,"TimeSecond",{enumerable:!0,get:function(){return d.TimeSecond}}),Object.defineProperty(t,"TimeMillisecond",{enumerable:!0,get:function(){return d.TimeMillisecond}}),Object.defineProperty(t,"TimeMicrosecond",{enumerable:!0,get:function(){return d.TimeMicrosecond}}),Object.defineProperty(t,"TimeNanosecond",{enumerable:!0,get:function(){return d.TimeNanosecond}}),Object.defineProperty(t,"Decimal",{enumerable:!0,get:function(){return d.Decimal}}),Object.defineProperty(t,"List",{enumerable:!0,get:function(){return d.List}}),Object.defineProperty(t,"Struct",{enumerable:!0,get:function(){return d.Struct}}),Object.defineProperty(t,"Union",{enumerable:!0,get:function(){return d.Union}}),Object.defineProperty(t,"DenseUnion",{enumerable:!0,get:function(){return d.DenseUnion}}),Object.defineProperty(t,"SparseUnion",{enumerable:!0,get:function(){return d.SparseUnion}}),Object.defineProperty(t,"Dictionary",{enumerable:!0,get:function(){return d.Dictionary}}),Object.defineProperty(t,"Interval",{enumerable:!0,get:function(){return d.Interval}}),Object.defineProperty(t,"IntervalDayTime",{enumerable:!0,get:function(){return d.IntervalDayTime}}),Object.defineProperty(t,"IntervalYearMonth",{enumerable:!0,get:function(){return d.IntervalYearMonth}}),Object.defineProperty(t,"FixedSizeList",{enumerable:!0,get:function(){return d.FixedSizeList}}),Object.defineProperty(t,"Map_",{enumerable:!0,get:function(){return d.Map_}}),Object.defineProperty(t,"Table",{enumerable:!0,get:function(){return d.Table}}),Object.defineProperty(t,"Column",{enumerable:!0,get:function(){return d.Column}}),Object.defineProperty(t,"Schema",{enumerable:!0,get:function(){return d.Schema}}),Object.defineProperty(t,"Field",{enumerable:!0,get:function(){return d.Field}}),Object.defineProperty(t,"Visitor",{enumerable:!0,get:function(){return d.Visitor}}),Object.defineProperty(t,"Vector",{enumerable:!0,get:function(){return d.Vector}}),Object.defineProperty(t,"BaseVector",{enumerable:!0,get:function(){return d.BaseVector}}),Object.defineProperty(t,"BinaryVector",{enumerable:!0,get:function(){return d.BinaryVector}}),Object.defineProperty(t,"BoolVector",{enumerable:!0,get:function(){return d.BoolVector}}),Object.defineProperty(t,"Chunked",{enumerable:!0,get:function(){return d.Chunked}}),Object.defineProperty(t,"DateVector",{enumerable:!0,get:function(){return d.DateVector}}),Object.defineProperty(t,"DateDayVector",{enumerable:!0,get:function(){return d.DateDayVector}}),Object.defineProperty(t,"DateMillisecondVector",{enumerable:!0,get:function(){return d.DateMillisecondVector}}),Object.defineProperty(t,"DecimalVector",{enumerable:!0,get:function(){return d.DecimalVector}}),Object.defineProperty(t,"DictionaryVector",{enumerable:!0,get:function(){return d.DictionaryVector}}),Object.defineProperty(t,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return d.FixedSizeBinaryVector}}),Object.defineProperty(t,"FixedSizeListVector",{enumerable:!0,get:function(){return d.FixedSizeListVector}}),Object.defineProperty(t,"FloatVector",{enumerable:!0,get:function(){return d.FloatVector}}),Object.defineProperty(t,"Float16Vector",{enumerable:!0,get:function(){return d.Float16Vector}}),Object.defineProperty(t,"Float32Vector",{enumerable:!0,get:function(){return d.Float32Vector}}),Object.defineProperty(t,"Float64Vector",{enumerable:!0,get:function(){return d.Float64Vector}}),Object.defineProperty(t,"IntervalVector",{enumerable:!0,get:function(){return d.IntervalVector}}),Object.defineProperty(t,"IntervalDayTimeVector",{enumerable:!0,get:function(){return d.IntervalDayTimeVector}}),Object.defineProperty(t,"IntervalYearMonthVector",{enumerable:!0,get:function(){return d.IntervalYearMonthVector}}),Object.defineProperty(t,"IntVector",{enumerable:!0,get:function(){return d.IntVector}}),Object.defineProperty(t,"Int8Vector",{enumerable:!0,get:function(){return d.Int8Vector}}),Object.defineProperty(t,"Int16Vector",{enumerable:!0,get:function(){return d.Int16Vector}}),Object.defineProperty(t,"Int32Vector",{enumerable:!0,get:function(){return d.Int32Vector}}),Object.defineProperty(t,"Int64Vector",{enumerable:!0,get:function(){return d.Int64Vector}}),Object.defineProperty(t,"Uint8Vector",{enumerable:!0,get:function(){return d.Uint8Vector}}),Object.defineProperty(t,"Uint16Vector",{enumerable:!0,get:function(){return d.Uint16Vector}}),Object.defineProperty(t,"Uint32Vector",{enumerable:!0,get:function(){return d.Uint32Vector}}),Object.defineProperty(t,"Uint64Vector",{enumerable:!0,get:function(){return d.Uint64Vector}}),Object.defineProperty(t,"ListVector",{enumerable:!0,get:function(){return d.ListVector}}),Object.defineProperty(t,"MapVector",{enumerable:!0,get:function(){return d.MapVector}}),Object.defineProperty(t,"NullVector",{enumerable:!0,get:function(){return d.NullVector}}),Object.defineProperty(t,"StructVector",{enumerable:!0,get:function(){return d.StructVector}}),Object.defineProperty(t,"TimestampVector",{enumerable:!0,get:function(){return d.TimestampVector}}),Object.defineProperty(t,"TimestampSecondVector",{enumerable:!0,get:function(){return d.TimestampSecondVector}}),Object.defineProperty(t,"TimestampMillisecondVector",{enumerable:!0,get:function(){return d.TimestampMillisecondVector}}),Object.defineProperty(t,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return d.TimestampMicrosecondVector}}),Object.defineProperty(t,"TimestampNanosecondVector",{enumerable:!0,get:function(){return d.TimestampNanosecondVector}}),Object.defineProperty(t,"TimeVector",{enumerable:!0,get:function(){return d.TimeVector}}),Object.defineProperty(t,"TimeSecondVector",{enumerable:!0,get:function(){return d.TimeSecondVector}}),Object.defineProperty(t,"TimeMillisecondVector",{enumerable:!0,get:function(){return d.TimeMillisecondVector}}),Object.defineProperty(t,"TimeMicrosecondVector",{enumerable:!0,get:function(){return d.TimeMicrosecondVector}}),Object.defineProperty(t,"TimeNanosecondVector",{enumerable:!0,get:function(){return d.TimeNanosecondVector}}),Object.defineProperty(t,"UnionVector",{enumerable:!0,get:function(){return d.UnionVector}}),Object.defineProperty(t,"DenseUnionVector",{enumerable:!0,get:function(){return d.DenseUnionVector}}),Object.defineProperty(t,"SparseUnionVector",{enumerable:!0,get:function(){return d.SparseUnionVector}}),Object.defineProperty(t,"Utf8Vector",{enumerable:!0,get:function(){return d.Utf8Vector}}),Object.defineProperty(t,"ByteStream",{enumerable:!0,get:function(){return d.ByteStream}}),Object.defineProperty(t,"AsyncByteStream",{enumerable:!0,get:function(){return d.AsyncByteStream}}),Object.defineProperty(t,"AsyncByteQueue",{enumerable:!0,get:function(){return d.AsyncByteQueue}}),Object.defineProperty(t,"RecordBatchReader",{enumerable:!0,get:function(){return d.RecordBatchReader}}),Object.defineProperty(t,"RecordBatchFileReader",{enumerable:!0,get:function(){return d.RecordBatchFileReader}}),Object.defineProperty(t,"RecordBatchStreamReader",{enumerable:!0,get:function(){return d.RecordBatchStreamReader}}),Object.defineProperty(t,"AsyncRecordBatchFileReader",{enumerable:!0,get:function(){return d.AsyncRecordBatchFileReader}}),Object.defineProperty(t,"AsyncRecordBatchStreamReader",{enumerable:!0,get:function(){return d.AsyncRecordBatchStreamReader}}),Object.defineProperty(t,"RecordBatchWriter",{enumerable:!0,get:function(){return d.RecordBatchWriter}}),Object.defineProperty(t,"RecordBatchFileWriter",{enumerable:!0,get:function(){return d.RecordBatchFileWriter}}),Object.defineProperty(t,"RecordBatchStreamWriter",{enumerable:!0,get:function(){return d.RecordBatchStreamWriter}}),Object.defineProperty(t,"RecordBatchJSONWriter",{enumerable:!0,get:function(){return d.RecordBatchJSONWriter}}),Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return d.MessageReader}}),Object.defineProperty(t,"AsyncMessageReader",{enumerable:!0,get:function(){return d.AsyncMessageReader}}),Object.defineProperty(t,"JSONMessageReader",{enumerable:!0,get:function(){return d.JSONMessageReader}}),Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return d.Message}}),Object.defineProperty(t,"RecordBatch",{enumerable:!0,get:function(){return d.RecordBatch}}),Object.defineProperty(t,"DataFrame",{enumerable:!0,get:function(){return d.DataFrame}}),Object.defineProperty(t,"FilteredDataFrame",{enumerable:!0,get:function(){return d.FilteredDataFrame}}),Object.defineProperty(t,"CountByResult",{enumerable:!0,get:function(){return d.CountByResult}}),Object.defineProperty(t,"predicate",{enumerable:!0,get:function(){return d.predicate}}),Object.defineProperty(t,"util",{enumerable:!0,get:function(){return d.util}}),Object.defineProperty(t,"Builder",{enumerable:!0,get:function(){return d.Builder}}),Object.defineProperty(t,"BinaryBuilder",{enumerable:!0,get:function(){return d.BinaryBuilder}}),Object.defineProperty(t,"BoolBuilder",{enumerable:!0,get:function(){return d.BoolBuilder}}),Object.defineProperty(t,"DateBuilder",{enumerable:!0,get:function(){return d.DateBuilder}}),Object.defineProperty(t,"DateDayBuilder",{enumerable:!0,get:function(){return d.DateDayBuilder}}),Object.defineProperty(t,"DateMillisecondBuilder",{enumerable:!0,get:function(){return d.DateMillisecondBuilder}}),Object.defineProperty(t,"DecimalBuilder",{enumerable:!0,get:function(){return d.DecimalBuilder}}),Object.defineProperty(t,"DictionaryBuilder",{enumerable:!0,get:function(){return d.DictionaryBuilder}}),Object.defineProperty(t,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return d.FixedSizeBinaryBuilder}}),Object.defineProperty(t,"FixedSizeListBuilder",{enumerable:!0,get:function(){return d.FixedSizeListBuilder}}),Object.defineProperty(t,"FloatBuilder",{enumerable:!0,get:function(){return d.FloatBuilder}}),Object.defineProperty(t,"Float16Builder",{enumerable:!0,get:function(){return d.Float16Builder}}),Object.defineProperty(t,"Float32Builder",{enumerable:!0,get:function(){return d.Float32Builder}}),Object.defineProperty(t,"Float64Builder",{enumerable:!0,get:function(){return d.Float64Builder}}),Object.defineProperty(t,"IntervalBuilder",{enumerable:!0,get:function(){return d.IntervalBuilder}}),Object.defineProperty(t,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return d.IntervalDayTimeBuilder}}),Object.defineProperty(t,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return d.IntervalYearMonthBuilder}}),Object.defineProperty(t,"IntBuilder",{enumerable:!0,get:function(){return d.IntBuilder}}),Object.defineProperty(t,"Int8Builder",{enumerable:!0,get:function(){return d.Int8Builder}}),Object.defineProperty(t,"Int16Builder",{enumerable:!0,get:function(){return d.Int16Builder}}),Object.defineProperty(t,"Int32Builder",{enumerable:!0,get:function(){return d.Int32Builder}}),Object.defineProperty(t,"Int64Builder",{enumerable:!0,get:function(){return d.Int64Builder}}),Object.defineProperty(t,"Uint8Builder",{enumerable:!0,get:function(){return d.Uint8Builder}}),Object.defineProperty(t,"Uint16Builder",{enumerable:!0,get:function(){return d.Uint16Builder}}),Object.defineProperty(t,"Uint32Builder",{enumerable:!0,get:function(){return d.Uint32Builder}}),Object.defineProperty(t,"Uint64Builder",{enumerable:!0,get:function(){return d.Uint64Builder}}),Object.defineProperty(t,"ListBuilder",{enumerable:!0,get:function(){return d.ListBuilder}}),Object.defineProperty(t,"MapBuilder",{enumerable:!0,get:function(){return d.MapBuilder}}),Object.defineProperty(t,"NullBuilder",{enumerable:!0,get:function(){return d.NullBuilder}}),Object.defineProperty(t,"StructBuilder",{enumerable:!0,get:function(){return d.StructBuilder}}),Object.defineProperty(t,"TimestampBuilder",{enumerable:!0,get:function(){return d.TimestampBuilder}}),Object.defineProperty(t,"TimestampSecondBuilder",{enumerable:!0,get:function(){return d.TimestampSecondBuilder}}),Object.defineProperty(t,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return d.TimestampMillisecondBuilder}}),Object.defineProperty(t,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return d.TimestampMicrosecondBuilder}}),Object.defineProperty(t,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return d.TimestampNanosecondBuilder}}),Object.defineProperty(t,"TimeBuilder",{enumerable:!0,get:function(){return d.TimeBuilder}}),Object.defineProperty(t,"TimeSecondBuilder",{enumerable:!0,get:function(){return d.TimeSecondBuilder}}),Object.defineProperty(t,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return d.TimeMillisecondBuilder}}),Object.defineProperty(t,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return d.TimeMicrosecondBuilder}}),Object.defineProperty(t,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return d.TimeNanosecondBuilder}}),Object.defineProperty(t,"UnionBuilder",{enumerable:!0,get:function(){return d.UnionBuilder}}),Object.defineProperty(t,"DenseUnionBuilder",{enumerable:!0,get:function(){return d.DenseUnionBuilder}}),Object.defineProperty(t,"SparseUnionBuilder",{enumerable:!0,get:function(){return d.SparseUnionBuilder}}),Object.defineProperty(t,"Utf8Builder",{enumerable:!0,get:function(){return d.Utf8Builder}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Visitor=void 0;const i=r(10),n=r(3),s=r(1),o=r(0);class a{visitMany(e,...t){return e.map((e,r)=>this.visit(e,...t.map(e=>e[r])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,t=!0){return function(e,t,r=!0){let a=null,u=s.Type.NONE;t instanceof i.Data||t instanceof n.Vector?u=c(t.type):t instanceof o.DataType?u=c(t):"number"!=typeof(u=t)&&(u=s.Type[t]);switch(u){case s.Type.Null:a=e.visitNull;break;case s.Type.Bool:a=e.visitBool;break;case s.Type.Int:a=e.visitInt;break;case s.Type.Int8:a=e.visitInt8||e.visitInt;break;case s.Type.Int16:a=e.visitInt16||e.visitInt;break;case s.Type.Int32:a=e.visitInt32||e.visitInt;break;case s.Type.Int64:a=e.visitInt64||e.visitInt;break;case s.Type.Uint8:a=e.visitUint8||e.visitInt;break;case s.Type.Uint16:a=e.visitUint16||e.visitInt;break;case s.Type.Uint32:a=e.visitUint32||e.visitInt;break;case s.Type.Uint64:a=e.visitUint64||e.visitInt;break;case s.Type.Float:a=e.visitFloat;break;case s.Type.Float16:a=e.visitFloat16||e.visitFloat;break;case s.Type.Float32:a=e.visitFloat32||e.visitFloat;break;case s.Type.Float64:a=e.visitFloat64||e.visitFloat;break;case s.Type.Utf8:a=e.visitUtf8;break;case s.Type.Binary:a=e.visitBinary;break;case s.Type.FixedSizeBinary:a=e.visitFixedSizeBinary;break;case s.Type.Date:a=e.visitDate;break;case s.Type.DateDay:a=e.visitDateDay||e.visitDate;break;case s.Type.DateMillisecond:a=e.visitDateMillisecond||e.visitDate;break;case s.Type.Timestamp:a=e.visitTimestamp;break;case s.Type.TimestampSecond:a=e.visitTimestampSecond||e.visitTimestamp;break;case s.Type.TimestampMillisecond:a=e.visitTimestampMillisecond||e.visitTimestamp;break;case s.Type.TimestampMicrosecond:a=e.visitTimestampMicrosecond||e.visitTimestamp;break;case s.Type.TimestampNanosecond:a=e.visitTimestampNanosecond||e.visitTimestamp;break;case s.Type.Time:a=e.visitTime;break;case s.Type.TimeSecond:a=e.visitTimeSecond||e.visitTime;break;case s.Type.TimeMillisecond:a=e.visitTimeMillisecond||e.visitTime;break;case s.Type.TimeMicrosecond:a=e.visitTimeMicrosecond||e.visitTime;break;case s.Type.TimeNanosecond:a=e.visitTimeNanosecond||e.visitTime;break;case s.Type.Decimal:a=e.visitDecimal;break;case s.Type.List:a=e.visitList;break;case s.Type.Struct:a=e.visitStruct;break;case s.Type.Union:a=e.visitUnion;break;case s.Type.DenseUnion:a=e.visitDenseUnion||e.visitUnion;break;case s.Type.SparseUnion:a=e.visitSparseUnion||e.visitUnion;break;case s.Type.Dictionary:a=e.visitDictionary;break;case s.Type.Interval:a=e.visitInterval;break;case s.Type.IntervalDayTime:a=e.visitIntervalDayTime||e.visitInterval;break;case s.Type.IntervalYearMonth:a=e.visitIntervalYearMonth||e.visitInterval;break;case s.Type.FixedSizeList:a=e.visitFixedSizeList;break;case s.Type.Map:a=e.visitMap}if("function"==typeof a)return a;if(!r)return()=>null;throw new Error(`Unrecognized type '${s.Type[u]}'`)}(this,e,t)}visitNull(e,...t){return null}visitBool(e,...t){return null}visitInt(e,...t){return null}visitFloat(e,...t){return null}visitUtf8(e,...t){return null}visitBinary(e,...t){return null}visitFixedSizeBinary(e,...t){return null}visitDate(e,...t){return null}visitTimestamp(e,...t){return null}visitTime(e,...t){return null}visitDecimal(e,...t){return null}visitList(e,...t){return null}visitStruct(e,...t){return null}visitUnion(e,...t){return null}visitDictionary(e,...t){return null}visitInterval(e,...t){return null}visitFixedSizeList(e,...t){return null}visitMap(e,...t){return null}}function c(e){switch(e.typeId){case s.Type.Null:return s.Type.Null;case s.Type.Int:{const{bitWidth:t,isSigned:r}=e;switch(t){case 8:return r?s.Type.Int8:s.Type.Uint8;case 16:return r?s.Type.Int16:s.Type.Uint16;case 32:return r?s.Type.Int32:s.Type.Uint32;case 64:return r?s.Type.Int64:s.Type.Uint64}return s.Type.Int}case s.Type.Float:switch(e.precision){case s.Precision.HALF:return s.Type.Float16;case s.Precision.SINGLE:return s.Type.Float32;case s.Precision.DOUBLE:return s.Type.Float64}return s.Type.Float;case s.Type.Binary:return s.Type.Binary;case s.Type.Utf8:return s.Type.Utf8;case s.Type.Bool:return s.Type.Bool;case s.Type.Decimal:return s.Type.Decimal;case s.Type.Time:switch(e.unit){case s.TimeUnit.SECOND:return s.Type.TimeSecond;case s.TimeUnit.MILLISECOND:return s.Type.TimeMillisecond;case s.TimeUnit.MICROSECOND:return s.Type.TimeMicrosecond;case s.TimeUnit.NANOSECOND:return s.Type.TimeNanosecond}return s.Type.Time;case s.Type.Timestamp:switch(e.unit){case s.TimeUnit.SECOND:return s.Type.TimestampSecond;case s.TimeUnit.MILLISECOND:return s.Type.TimestampMillisecond;case s.TimeUnit.MICROSECOND:return s.Type.TimestampMicrosecond;case s.TimeUnit.NANOSECOND:return s.Type.TimestampNanosecond}return s.Type.Timestamp;case s.Type.Date:switch(e.unit){case s.DateUnit.DAY:return s.Type.DateDay;case s.DateUnit.MILLISECOND:return s.Type.DateMillisecond}return s.Type.Date;case s.Type.Interval:switch(e.unit){case s.IntervalUnit.DAY_TIME:return s.Type.IntervalDayTime;case s.IntervalUnit.YEAR_MONTH:return s.Type.IntervalYearMonth}return s.Type.Interval;case s.Type.Map:return s.Type.Map;case s.Type.List:return s.Type.List;case s.Type.Struct:return s.Type.Struct;case s.Type.Union:switch(e.mode){case s.UnionMode.Dense:return s.Type.DenseUnion;case s.UnionMode.Sparse:return s.Type.SparseUnion}return s.Type.Union;case s.Type.FixedSizeBinary:return s.Type.FixedSizeBinary;case s.Type.FixedSizeList:return s.Type.FixedSizeList;case s.Type.Dictionary:return s.Type.Dictionary}throw new Error(`Unrecognized type '${s.Type[e.typeId]}'`)}t.Visitor=a,a.prototype.visitInt8=null,a.prototype.visitInt16=null,a.prototype.visitInt32=null,a.prototype.visitInt64=null,a.prototype.visitUint8=null,a.prototype.visitUint16=null,a.prototype.visitUint32=null,a.prototype.visitUint64=null,a.prototype.visitFloat16=null,a.prototype.visitFloat32=null,a.prototype.visitFloat64=null,a.prototype.visitDateDay=null,a.prototype.visitDateMillisecond=null,a.prototype.visitTimestampSecond=null,a.prototype.visitTimestampMillisecond=null,a.prototype.visitTimestampMicrosecond=null,a.prototype.visitTimestampNanosecond=null,a.prototype.visitTimeSecond=null,a.prototype.visitTimeMillisecond=null,a.prototype.visitTimeMicrosecond=null,a.prototype.visitTimeNanosecond=null,a.prototype.visitDenseUnion=null,a.prototype.visitSparseUnion=null,a.prototype.visitIntervalDayTime=null,a.prototype.visitIntervalYearMonth=null},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isReadableNodeStream=t.isWritableNodeStream=t.isReadableDOMStream=t.isWritableDOMStream=t.isFetchResponse=t.isFSReadStream=t.isFileHandle=t.isUnderlyingSink=t.isIteratorResult=t.isArrayLike=t.isArrowJSON=t.isAsyncIterable=t.isIterable=t.isObservable=t.isPromise=t.isObject=t.BigUint64ArrayAvailable=t.BigUint64Array=t.BigInt64ArrayAvailable=t.BigInt64Array=t.BigIntAvailable=t.BigInt=void 0;const i=r(22),[n,s]=(()=>{const e=()=>{throw new Error("BigInt is not available in this environment")};function t(){throw e()}return t.asIntN=()=>{throw e()},t.asUintN=()=>{throw e()},"undefined"!=typeof BigInt?[BigInt,!0]:[t,!1]})();t.BigInt=n,t.BigIntAvailable=s;const[o,a]=(()=>{const e=()=>{throw new Error("BigInt64Array is not available in this environment")};return"undefined"!=typeof BigInt64Array?[BigInt64Array,!0]:[class{static get BYTES_PER_ELEMENT(){return 8}static of(){throw e()}static from(){throw e()}constructor(){throw e()}},!1]})();t.BigInt64Array=o,t.BigInt64ArrayAvailable=a;const[c,u]=(()=>{const e=()=>{throw new Error("BigUint64Array is not available in this environment")};return"undefined"!=typeof BigUint64Array?[BigUint64Array,!0]:[class{static get BYTES_PER_ELEMENT(){return 8}static of(){throw e()}static from(){throw e()}constructor(){throw e()}},!1]})();t.BigUint64Array=c,t.BigUint64ArrayAvailable=u;const l=e=>"number"==typeof e,d=e=>"boolean"==typeof e,h=e=>"function"==typeof e;t.isObject=e=>null!=e&&Object(e)===e,t.isPromise=e=>t.isObject(e)&&h(e.then),t.isObservable=e=>t.isObject(e)&&h(e.subscribe),t.isIterable=e=>t.isObject(e)&&h(e[Symbol.iterator]),t.isAsyncIterable=e=>t.isObject(e)&&h(e[Symbol.asyncIterator]),t.isArrowJSON=e=>t.isObject(e)&&t.isObject(e.schema),t.isArrayLike=e=>t.isObject(e)&&l(e.length),t.isIteratorResult=e=>t.isObject(e)&&"done"in e&&"value"in e,t.isUnderlyingSink=e=>t.isObject(e)&&h(e.abort)&&h(e.close)&&h(e.start)&&h(e.write),t.isFileHandle=e=>t.isObject(e)&&h(e.stat)&&l(e.fd),t.isFSReadStream=e=>t.isReadableNodeStream(e)&&l(e.bytesRead),t.isFetchResponse=e=>t.isObject(e)&&t.isReadableDOMStream(e.body),t.isWritableDOMStream=e=>t.isObject(e)&&h(e.abort)&&h(e.getWriter)&&!(e instanceof i.ReadableInterop),t.isReadableDOMStream=e=>t.isObject(e)&&h(e.cancel)&&h(e.getReader)&&!(e instanceof i.ReadableInterop),t.isWritableNodeStream=e=>t.isObject(e)&&h(e.end)&&h(e.write)&&d(e.writable)&&!(e instanceof i.ReadableInterop),t.isReadableNodeStream=e=>t.isObject(e)&&h(e.read)&&h(e.pipe)&&d(e.readable)&&!(e instanceof i.ReadableInterop)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Data=t.kUnknownNullCount=void 0;const i=r(12),n=r(12),s=r(1),o=r(0),a=r(5);t.kUnknownNullCount=-1;class c{constructor(e,t,r,i,n,s,a){let u;this.type=e,this.dictionary=a,this.offset=Math.floor(Math.max(t||0,0)),this.length=Math.floor(Math.max(r||0,0)),this._nullCount=Math.floor(Math.max(i||0,-1)),this.childData=(s||[]).map(e=>e instanceof c?e:e.data),n instanceof c?(this.stride=n.stride,this.values=n.values,this.typeIds=n.typeIds,this.nullBitmap=n.nullBitmap,this.valueOffsets=n.valueOffsets):(this.stride=o.strideForType(e),n&&((u=n[0])&&(this.valueOffsets=u),(u=n[1])&&(this.values=u),(u=n[2])&&(this.nullBitmap=u),(u=n[3])&&(this.typeIds=u)))}get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get byteLength(){let e=0;const{valueOffsets:t,values:r,nullBitmap:i,typeIds:n}=this;return t&&(e+=t.byteLength),r&&(e+=r.byteLength),i&&(e+=i.byteLength),n&&(e+=n.byteLength),this.childData.reduce((e,t)=>e+t.byteLength,e)}get nullCount(){let e,r=this._nullCount;return r<=t.kUnknownNullCount&&(e=this.nullBitmap)&&(this._nullCount=r=this.length-n.popcnt_bit_range(e,this.offset,this.offset+this.length)),r}clone(e,t=this.offset,r=this.length,i=this._nullCount,n=this,s=this.childData){return new c(e,t,r,i,n,s,this.dictionary)}slice(e,t){const{stride:r,typeId:i,childData:n}=this,s=+(0===this._nullCount)-1,o=16===i?r:1,a=this._sliceBuffers(e,t,r,i);return this.clone(this.type,this.offset+e,t,s,a,!n.length||this.valueOffsets?n:this._sliceChildren(n,o*e,o*t))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===s.Type.Null)return this.clone(this.type,0,e,0);const{length:t,nullCount:r}=this,n=new Uint8Array((e+63&-64)>>3).fill(255,0,t>>3);n[t>>3]=(1<<t-(-8&t))-1,r>0&&n.set(i.truncateBitmap(this.offset,t,this.nullBitmap),0);const o=this.buffers;return o[s.BufferType.VALIDITY]=n,this.clone(this.type,0,e,r+(e-t),o)}_sliceBuffers(e,t,r,i){let n;const{buffers:o}=this;return(n=o[s.BufferType.TYPE])&&(o[s.BufferType.TYPE]=n.subarray(e,e+t)),(n=o[s.BufferType.OFFSET])&&(o[s.BufferType.OFFSET]=n.subarray(e,e+t+1))||(n=o[s.BufferType.DATA])&&(o[s.BufferType.DATA]=6===i?n:n.subarray(r*e,r*(e+t))),o}_sliceChildren(e,t,r){return e.map(e=>e.slice(t,r))}static new(e,t,r,i,n,o,a){switch(n instanceof c?n=n.buffers:n||(n=[]),e.typeId){case s.Type.Null:return c.Null(e,t,r);case s.Type.Int:return c.Int(e,t,r,i||0,n[s.BufferType.VALIDITY],n[s.BufferType.DATA]||[]);case s.Type.Dictionary:return c.Dictionary(e,t,r,i||0,n[s.BufferType.VALIDITY],n[s.BufferType.DATA]||[],a);case s.Type.Float:return c.Float(e,t,r,i||0,n[s.BufferType.VALIDITY],n[s.BufferType.DATA]||[]);case s.Type.Bool:return c.Bool(e,t,r,i||0,n[s.BufferType.VALIDITY],n[s.BufferType.DATA]||[]);case s.Type.Decimal:return c.Decimal(e,t,r,i||0,n[s.BufferType.VALIDITY],n[s.BufferType.DATA]||[]);case s.Type.Date:return c.Date(e,t,r,i||0,n[s.BufferType.VALIDITY],n[s.BufferType.DATA]||[]);case s.Type.Time:return c.Time(e,t,r,i||0,n[s.BufferType.VALIDITY],n[s.BufferType.DATA]||[]);case s.Type.Timestamp:return c.Timestamp(e,t,r,i||0,n[s.BufferType.VALIDITY],n[s.BufferType.DATA]||[]);case s.Type.Interval:return c.Interval(e,t,r,i||0,n[s.BufferType.VALIDITY],n[s.BufferType.DATA]||[]);case s.Type.FixedSizeBinary:return c.FixedSizeBinary(e,t,r,i||0,n[s.BufferType.VALIDITY],n[s.BufferType.DATA]||[]);case s.Type.Binary:return c.Binary(e,t,r,i||0,n[s.BufferType.VALIDITY],n[s.BufferType.OFFSET]||[],n[s.BufferType.DATA]||[]);case s.Type.Utf8:return c.Utf8(e,t,r,i||0,n[s.BufferType.VALIDITY],n[s.BufferType.OFFSET]||[],n[s.BufferType.DATA]||[]);case s.Type.List:return c.List(e,t,r,i||0,n[s.BufferType.VALIDITY],n[s.BufferType.OFFSET]||[],(o||[])[0]);case s.Type.FixedSizeList:return c.FixedSizeList(e,t,r,i||0,n[s.BufferType.VALIDITY],(o||[])[0]);case s.Type.Struct:return c.Struct(e,t,r,i||0,n[s.BufferType.VALIDITY],o||[]);case s.Type.Map:return c.Map(e,t,r,i||0,n[s.BufferType.VALIDITY],n[s.BufferType.OFFSET]||[],(o||[])[0]);case s.Type.Union:return c.Union(e,t,r,i||0,n[s.BufferType.VALIDITY],n[s.BufferType.TYPE]||[],n[s.BufferType.OFFSET]||o,o)}throw new Error("Unrecognized typeId "+e.typeId)}static Null(e,t,r){return new c(e,t,r,0)}static Int(e,t,r,i,n,s){return new c(e,t,r,i,[void 0,a.toArrayBufferView(e.ArrayType,s),a.toUint8Array(n)])}static Dictionary(e,t,r,i,n,s,o){return new c(e,t,r,i,[void 0,a.toArrayBufferView(e.indices.ArrayType,s),a.toUint8Array(n)],[],o)}static Float(e,t,r,i,n,s){return new c(e,t,r,i,[void 0,a.toArrayBufferView(e.ArrayType,s),a.toUint8Array(n)])}static Bool(e,t,r,i,n,s){return new c(e,t,r,i,[void 0,a.toArrayBufferView(e.ArrayType,s),a.toUint8Array(n)])}static Decimal(e,t,r,i,n,s){return new c(e,t,r,i,[void 0,a.toArrayBufferView(e.ArrayType,s),a.toUint8Array(n)])}static Date(e,t,r,i,n,s){return new c(e,t,r,i,[void 0,a.toArrayBufferView(e.ArrayType,s),a.toUint8Array(n)])}static Time(e,t,r,i,n,s){return new c(e,t,r,i,[void 0,a.toArrayBufferView(e.ArrayType,s),a.toUint8Array(n)])}static Timestamp(e,t,r,i,n,s){return new c(e,t,r,i,[void 0,a.toArrayBufferView(e.ArrayType,s),a.toUint8Array(n)])}static Interval(e,t,r,i,n,s){return new c(e,t,r,i,[void 0,a.toArrayBufferView(e.ArrayType,s),a.toUint8Array(n)])}static FixedSizeBinary(e,t,r,i,n,s){return new c(e,t,r,i,[void 0,a.toArrayBufferView(e.ArrayType,s),a.toUint8Array(n)])}static Binary(e,t,r,i,n,s,o){return new c(e,t,r,i,[a.toInt32Array(s),a.toUint8Array(o),a.toUint8Array(n)])}static Utf8(e,t,r,i,n,s,o){return new c(e,t,r,i,[a.toInt32Array(s),a.toUint8Array(o),a.toUint8Array(n)])}static List(e,t,r,i,n,s,o){return new c(e,t,r,i,[a.toInt32Array(s),void 0,a.toUint8Array(n)],o?[o]:[])}static FixedSizeList(e,t,r,i,n,s){return new c(e,t,r,i,[void 0,void 0,a.toUint8Array(n)],s?[s]:[])}static Struct(e,t,r,i,n,s){return new c(e,t,r,i,[void 0,void 0,a.toUint8Array(n)],s)}static Map(e,t,r,i,n,s,o){return new c(e,t,r,i,[a.toInt32Array(s),void 0,a.toUint8Array(n)],o?[o]:[])}static Union(e,t,r,i,n,o,u,l){const d=[void 0,void 0,a.toUint8Array(n),a.toArrayBufferView(e.ArrayType,o)];return e.mode===s.UnionMode.Sparse?new c(e,t,r,i,d,u):(d[s.BufferType.OFFSET]=a.toInt32Array(u),new c(e,t,r,i,d,l))}}t.Data=c,c.prototype.childData=Object.freeze([])},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.util=t.predicate=t.CountByResult=t.FilteredDataFrame=t.DataFrame=t.RecordBatch=t.Message=t.JSONMessageReader=t.AsyncMessageReader=t.MessageReader=t.RecordBatchJSONWriter=t.RecordBatchStreamWriter=t.RecordBatchFileWriter=t.RecordBatchWriter=t.AsyncRecordBatchStreamReader=t.AsyncRecordBatchFileReader=t.RecordBatchStreamReader=t.RecordBatchFileReader=t.RecordBatchReader=t.AsyncByteQueue=t.AsyncByteStream=t.ByteStream=t.Utf8Builder=t.SparseUnionBuilder=t.DenseUnionBuilder=t.UnionBuilder=t.TimeNanosecondBuilder=t.TimeMicrosecondBuilder=t.TimeMillisecondBuilder=t.TimeSecondBuilder=t.TimeBuilder=t.TimestampNanosecondBuilder=t.TimestampMicrosecondBuilder=t.TimestampMillisecondBuilder=t.TimestampSecondBuilder=t.TimestampBuilder=t.StructBuilder=t.NullBuilder=t.MapBuilder=t.ListBuilder=t.Uint64Builder=t.Uint32Builder=t.Uint16Builder=t.Uint8Builder=t.Int64Builder=t.Int32Builder=t.Int16Builder=t.Int8Builder=t.IntBuilder=t.IntervalYearMonthBuilder=t.IntervalDayTimeBuilder=t.IntervalBuilder=t.Float64Builder=t.Float32Builder=t.Float16Builder=t.FloatBuilder=t.FixedSizeListBuilder=t.FixedSizeBinaryBuilder=t.DictionaryBuilder=t.DecimalBuilder=t.DateMillisecondBuilder=t.DateDayBuilder=t.DateBuilder=t.BoolBuilder=t.BinaryBuilder=t.Builder=t.Utf8Vector=t.SparseUnionVector=t.DenseUnionVector=t.UnionVector=t.TimeNanosecondVector=t.TimeMicrosecondVector=t.TimeMillisecondVector=t.TimeSecondVector=t.TimeVector=t.TimestampNanosecondVector=t.TimestampMicrosecondVector=t.TimestampMillisecondVector=t.TimestampSecondVector=t.TimestampVector=t.StructVector=t.NullVector=t.MapVector=t.ListVector=t.Uint64Vector=t.Uint32Vector=t.Uint16Vector=t.Uint8Vector=t.Int64Vector=t.Int32Vector=t.Int16Vector=t.Int8Vector=t.IntVector=t.IntervalYearMonthVector=t.IntervalDayTimeVector=t.IntervalVector=t.Float64Vector=t.Float32Vector=t.Float16Vector=t.FloatVector=t.FixedSizeListVector=t.FixedSizeBinaryVector=t.DictionaryVector=t.DecimalVector=t.DateMillisecondVector=t.DateDayVector=t.DateVector=t.Chunked=t.BoolVector=t.BinaryVector=t.BaseVector=t.Vector=t.Field=t.Schema=t.Visitor=t.Column=t.Table=t.Map_=t.FixedSizeList=t.IntervalYearMonth=t.IntervalDayTime=t.Interval=t.Dictionary=t.SparseUnion=t.DenseUnion=t.Union=t.Struct=t.List=t.Decimal=t.TimeNanosecond=t.TimeMicrosecond=t.TimeMillisecond=t.TimeSecond=t.Time=t.TimestampNanosecond=t.TimestampMicrosecond=t.TimestampMillisecond=t.TimestampSecond=t.Timestamp=t.DateMillisecond=t.DateDay=t.Date_=t.FixedSizeBinary=t.Binary=t.Utf8=t.Float64=t.Float32=t.Float16=t.Float=t.Uint64=t.Uint32=t.Uint16=t.Uint8=t.Int64=t.Int32=t.Int16=t.Int8=t.Int=t.Bool=t.Null=t.DataType=t.Data=t.BufferType=t.Type=t.MessageHeader=t.MetadataVersion=t.IntervalUnit=t.UnionMode=t.Precision=t.TimeUnit=t.DateUnit=void 0;var i=r(16);Object.defineProperty(t,"DateUnit",{enumerable:!0,get:function(){return i.DateUnit}}),Object.defineProperty(t,"TimeUnit",{enumerable:!0,get:function(){return i.TimeUnit}}),Object.defineProperty(t,"Precision",{enumerable:!0,get:function(){return i.Precision}}),Object.defineProperty(t,"UnionMode",{enumerable:!0,get:function(){return i.UnionMode}}),Object.defineProperty(t,"IntervalUnit",{enumerable:!0,get:function(){return i.IntervalUnit}}),Object.defineProperty(t,"MetadataVersion",{enumerable:!0,get:function(){return i.MetadataVersion}});var n=r(34);Object.defineProperty(t,"MessageHeader",{enumerable:!0,get:function(){return n.MessageHeader}});var s=r(1);Object.defineProperty(t,"Type",{enumerable:!0,get:function(){return s.Type}}),Object.defineProperty(t,"BufferType",{enumerable:!0,get:function(){return s.BufferType}});var o=r(10);Object.defineProperty(t,"Data",{enumerable:!0,get:function(){return o.Data}});var a=r(0);Object.defineProperty(t,"DataType",{enumerable:!0,get:function(){return a.DataType}}),Object.defineProperty(t,"Null",{enumerable:!0,get:function(){return a.Null}}),Object.defineProperty(t,"Bool",{enumerable:!0,get:function(){return a.Bool}}),Object.defineProperty(t,"Int",{enumerable:!0,get:function(){return a.Int}}),Object.defineProperty(t,"Int8",{enumerable:!0,get:function(){return a.Int8}}),Object.defineProperty(t,"Int16",{enumerable:!0,get:function(){return a.Int16}}),Object.defineProperty(t,"Int32",{enumerable:!0,get:function(){return a.Int32}}),Object.defineProperty(t,"Int64",{enumerable:!0,get:function(){return a.Int64}}),Object.defineProperty(t,"Uint8",{enumerable:!0,get:function(){return a.Uint8}}),Object.defineProperty(t,"Uint16",{enumerable:!0,get:function(){return a.Uint16}}),Object.defineProperty(t,"Uint32",{enumerable:!0,get:function(){return a.Uint32}}),Object.defineProperty(t,"Uint64",{enumerable:!0,get:function(){return a.Uint64}}),Object.defineProperty(t,"Float",{enumerable:!0,get:function(){return a.Float}}),Object.defineProperty(t,"Float16",{enumerable:!0,get:function(){return a.Float16}}),Object.defineProperty(t,"Float32",{enumerable:!0,get:function(){return a.Float32}}),Object.defineProperty(t,"Float64",{enumerable:!0,get:function(){return a.Float64}}),Object.defineProperty(t,"Utf8",{enumerable:!0,get:function(){return a.Utf8}}),Object.defineProperty(t,"Binary",{enumerable:!0,get:function(){return a.Binary}}),Object.defineProperty(t,"FixedSizeBinary",{enumerable:!0,get:function(){return a.FixedSizeBinary}}),Object.defineProperty(t,"Date_",{enumerable:!0,get:function(){return a.Date_}}),Object.defineProperty(t,"DateDay",{enumerable:!0,get:function(){return a.DateDay}}),Object.defineProperty(t,"DateMillisecond",{enumerable:!0,get:function(){return a.DateMillisecond}}),Object.defineProperty(t,"Timestamp",{enumerable:!0,get:function(){return a.Timestamp}}),Object.defineProperty(t,"TimestampSecond",{enumerable:!0,get:function(){return a.TimestampSecond}}),Object.defineProperty(t,"TimestampMillisecond",{enumerable:!0,get:function(){return a.TimestampMillisecond}}),Object.defineProperty(t,"TimestampMicrosecond",{enumerable:!0,get:function(){return a.TimestampMicrosecond}}),Object.defineProperty(t,"TimestampNanosecond",{enumerable:!0,get:function(){return a.TimestampNanosecond}}),Object.defineProperty(t,"Time",{enumerable:!0,get:function(){return a.Time}}),Object.defineProperty(t,"TimeSecond",{enumerable:!0,get:function(){return a.TimeSecond}}),Object.defineProperty(t,"TimeMillisecond",{enumerable:!0,get:function(){return a.TimeMillisecond}}),Object.defineProperty(t,"TimeMicrosecond",{enumerable:!0,get:function(){return a.TimeMicrosecond}}),Object.defineProperty(t,"TimeNanosecond",{enumerable:!0,get:function(){return a.TimeNanosecond}}),Object.defineProperty(t,"Decimal",{enumerable:!0,get:function(){return a.Decimal}}),Object.defineProperty(t,"List",{enumerable:!0,get:function(){return a.List}}),Object.defineProperty(t,"Struct",{enumerable:!0,get:function(){return a.Struct}}),Object.defineProperty(t,"Union",{enumerable:!0,get:function(){return a.Union}}),Object.defineProperty(t,"DenseUnion",{enumerable:!0,get:function(){return a.DenseUnion}}),Object.defineProperty(t,"SparseUnion",{enumerable:!0,get:function(){return a.SparseUnion}}),Object.defineProperty(t,"Dictionary",{enumerable:!0,get:function(){return a.Dictionary}}),Object.defineProperty(t,"Interval",{enumerable:!0,get:function(){return a.Interval}}),Object.defineProperty(t,"IntervalDayTime",{enumerable:!0,get:function(){return a.IntervalDayTime}}),Object.defineProperty(t,"IntervalYearMonth",{enumerable:!0,get:function(){return a.IntervalYearMonth}}),Object.defineProperty(t,"FixedSizeList",{enumerable:!0,get:function(){return a.FixedSizeList}}),Object.defineProperty(t,"Map_",{enumerable:!0,get:function(){return a.Map_}});var c=r(29);Object.defineProperty(t,"Table",{enumerable:!0,get:function(){return c.Table}});var u=r(23);Object.defineProperty(t,"Column",{enumerable:!0,get:function(){return u.Column}});var l=r(8);Object.defineProperty(t,"Visitor",{enumerable:!0,get:function(){return l.Visitor}});var d=r(6);Object.defineProperty(t,"Schema",{enumerable:!0,get:function(){return d.Schema}}),Object.defineProperty(t,"Field",{enumerable:!0,get:function(){return d.Field}});var h=r(13);Object.defineProperty(t,"Vector",{enumerable:!0,get:function(){return h.Vector}}),Object.defineProperty(t,"BaseVector",{enumerable:!0,get:function(){return h.BaseVector}}),Object.defineProperty(t,"BinaryVector",{enumerable:!0,get:function(){return h.BinaryVector}}),Object.defineProperty(t,"BoolVector",{enumerable:!0,get:function(){return h.BoolVector}}),Object.defineProperty(t,"Chunked",{enumerable:!0,get:function(){return h.Chunked}}),Object.defineProperty(t,"DateVector",{enumerable:!0,get:function(){return h.DateVector}}),Object.defineProperty(t,"DateDayVector",{enumerable:!0,get:function(){return h.DateDayVector}}),Object.defineProperty(t,"DateMillisecondVector",{enumerable:!0,get:function(){return h.DateMillisecondVector}}),Object.defineProperty(t,"DecimalVector",{enumerable:!0,get:function(){return h.DecimalVector}}),Object.defineProperty(t,"DictionaryVector",{enumerable:!0,get:function(){return h.DictionaryVector}}),Object.defineProperty(t,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return h.FixedSizeBinaryVector}}),Object.defineProperty(t,"FixedSizeListVector",{enumerable:!0,get:function(){return h.FixedSizeListVector}}),Object.defineProperty(t,"FloatVector",{enumerable:!0,get:function(){return h.FloatVector}}),Object.defineProperty(t,"Float16Vector",{enumerable:!0,get:function(){return h.Float16Vector}}),Object.defineProperty(t,"Float32Vector",{enumerable:!0,get:function(){return h.Float32Vector}}),Object.defineProperty(t,"Float64Vector",{enumerable:!0,get:function(){return h.Float64Vector}}),Object.defineProperty(t,"IntervalVector",{enumerable:!0,get:function(){return h.IntervalVector}}),Object.defineProperty(t,"IntervalDayTimeVector",{enumerable:!0,get:function(){return h.IntervalDayTimeVector}}),Object.defineProperty(t,"IntervalYearMonthVector",{enumerable:!0,get:function(){return h.IntervalYearMonthVector}}),Object.defineProperty(t,"IntVector",{enumerable:!0,get:function(){return h.IntVector}}),Object.defineProperty(t,"Int8Vector",{enumerable:!0,get:function(){return h.Int8Vector}}),Object.defineProperty(t,"Int16Vector",{enumerable:!0,get:function(){return h.Int16Vector}}),Object.defineProperty(t,"Int32Vector",{enumerable:!0,get:function(){return h.Int32Vector}}),Object.defineProperty(t,"Int64Vector",{enumerable:!0,get:function(){return h.Int64Vector}}),Object.defineProperty(t,"Uint8Vector",{enumerable:!0,get:function(){return h.Uint8Vector}}),Object.defineProperty(t,"Uint16Vector",{enumerable:!0,get:function(){return h.Uint16Vector}}),Object.defineProperty(t,"Uint32Vector",{enumerable:!0,get:function(){return h.Uint32Vector}}),Object.defineProperty(t,"Uint64Vector",{enumerable:!0,get:function(){return h.Uint64Vector}}),Object.defineProperty(t,"ListVector",{enumerable:!0,get:function(){return h.ListVector}}),Object.defineProperty(t,"MapVector",{enumerable:!0,get:function(){return h.MapVector}}),Object.defineProperty(t,"NullVector",{enumerable:!0,get:function(){return h.NullVector}}),Object.defineProperty(t,"StructVector",{enumerable:!0,get:function(){return h.StructVector}}),Object.defineProperty(t,"TimestampVector",{enumerable:!0,get:function(){return h.TimestampVector}}),Object.defineProperty(t,"TimestampSecondVector",{enumerable:!0,get:function(){return h.TimestampSecondVector}}),Object.defineProperty(t,"TimestampMillisecondVector",{enumerable:!0,get:function(){return h.TimestampMillisecondVector}}),Object.defineProperty(t,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return h.TimestampMicrosecondVector}}),Object.defineProperty(t,"TimestampNanosecondVector",{enumerable:!0,get:function(){return h.TimestampNanosecondVector}}),Object.defineProperty(t,"TimeVector",{enumerable:!0,get:function(){return h.TimeVector}}),Object.defineProperty(t,"TimeSecondVector",{enumerable:!0,get:function(){return h.TimeSecondVector}}),Object.defineProperty(t,"TimeMillisecondVector",{enumerable:!0,get:function(){return h.TimeMillisecondVector}}),Object.defineProperty(t,"TimeMicrosecondVector",{enumerable:!0,get:function(){return h.TimeMicrosecondVector}}),Object.defineProperty(t,"TimeNanosecondVector",{enumerable:!0,get:function(){return h.TimeNanosecondVector}}),Object.defineProperty(t,"UnionVector",{enumerable:!0,get:function(){return h.UnionVector}}),Object.defineProperty(t,"DenseUnionVector",{enumerable:!0,get:function(){return h.DenseUnionVector}}),Object.defineProperty(t,"SparseUnionVector",{enumerable:!0,get:function(){return h.SparseUnionVector}}),Object.defineProperty(t,"Utf8Vector",{enumerable:!0,get:function(){return h.Utf8Vector}});var f=r(33);Object.defineProperty(t,"Builder",{enumerable:!0,get:function(){return f.Builder}}),Object.defineProperty(t,"BinaryBuilder",{enumerable:!0,get:function(){return f.BinaryBuilder}}),Object.defineProperty(t,"BoolBuilder",{enumerable:!0,get:function(){return f.BoolBuilder}}),Object.defineProperty(t,"DateBuilder",{enumerable:!0,get:function(){return f.DateBuilder}}),Object.defineProperty(t,"DateDayBuilder",{enumerable:!0,get:function(){return f.DateDayBuilder}}),Object.defineProperty(t,"DateMillisecondBuilder",{enumerable:!0,get:function(){return f.DateMillisecondBuilder}}),Object.defineProperty(t,"DecimalBuilder",{enumerable:!0,get:function(){return f.DecimalBuilder}}),Object.defineProperty(t,"DictionaryBuilder",{enumerable:!0,get:function(){return f.DictionaryBuilder}}),Object.defineProperty(t,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return f.FixedSizeBinaryBuilder}}),Object.defineProperty(t,"FixedSizeListBuilder",{enumerable:!0,get:function(){return f.FixedSizeListBuilder}}),Object.defineProperty(t,"FloatBuilder",{enumerable:!0,get:function(){return f.FloatBuilder}}),Object.defineProperty(t,"Float16Builder",{enumerable:!0,get:function(){return f.Float16Builder}}),Object.defineProperty(t,"Float32Builder",{enumerable:!0,get:function(){return f.Float32Builder}}),Object.defineProperty(t,"Float64Builder",{enumerable:!0,get:function(){return f.Float64Builder}}),Object.defineProperty(t,"IntervalBuilder",{enumerable:!0,get:function(){return f.IntervalBuilder}}),Object.defineProperty(t,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return f.IntervalDayTimeBuilder}}),Object.defineProperty(t,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return f.IntervalYearMonthBuilder}}),Object.defineProperty(t,"IntBuilder",{enumerable:!0,get:function(){return f.IntBuilder}}),Object.defineProperty(t,"Int8Builder",{enumerable:!0,get:function(){return f.Int8Builder}}),Object.defineProperty(t,"Int16Builder",{enumerable:!0,get:function(){return f.Int16Builder}}),Object.defineProperty(t,"Int32Builder",{enumerable:!0,get:function(){return f.Int32Builder}}),Object.defineProperty(t,"Int64Builder",{enumerable:!0,get:function(){return f.Int64Builder}}),Object.defineProperty(t,"Uint8Builder",{enumerable:!0,get:function(){return f.Uint8Builder}}),Object.defineProperty(t,"Uint16Builder",{enumerable:!0,get:function(){return f.Uint16Builder}}),Object.defineProperty(t,"Uint32Builder",{enumerable:!0,get:function(){return f.Uint32Builder}}),Object.defineProperty(t,"Uint64Builder",{enumerable:!0,get:function(){return f.Uint64Builder}}),Object.defineProperty(t,"ListBuilder",{enumerable:!0,get:function(){return f.ListBuilder}}),Object.defineProperty(t,"MapBuilder",{enumerable:!0,get:function(){return f.MapBuilder}}),Object.defineProperty(t,"NullBuilder",{enumerable:!0,get:function(){return f.NullBuilder}}),Object.defineProperty(t,"StructBuilder",{enumerable:!0,get:function(){return f.StructBuilder}}),Object.defineProperty(t,"TimestampBuilder",{enumerable:!0,get:function(){return f.TimestampBuilder}}),Object.defineProperty(t,"TimestampSecondBuilder",{enumerable:!0,get:function(){return f.TimestampSecondBuilder}}),Object.defineProperty(t,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return f.TimestampMillisecondBuilder}}),Object.defineProperty(t,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return f.TimestampMicrosecondBuilder}}),Object.defineProperty(t,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return f.TimestampNanosecondBuilder}}),Object.defineProperty(t,"TimeBuilder",{enumerable:!0,get:function(){return f.TimeBuilder}}),Object.defineProperty(t,"TimeSecondBuilder",{enumerable:!0,get:function(){return f.TimeSecondBuilder}}),Object.defineProperty(t,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return f.TimeMillisecondBuilder}}),Object.defineProperty(t,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return f.TimeMicrosecondBuilder}}),Object.defineProperty(t,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return f.TimeNanosecondBuilder}}),Object.defineProperty(t,"UnionBuilder",{enumerable:!0,get:function(){return f.UnionBuilder}}),Object.defineProperty(t,"DenseUnionBuilder",{enumerable:!0,get:function(){return f.DenseUnionBuilder}}),Object.defineProperty(t,"SparseUnionBuilder",{enumerable:!0,get:function(){return f.SparseUnionBuilder}}),Object.defineProperty(t,"Utf8Builder",{enumerable:!0,get:function(){return f.Utf8Builder}});var p=r(18);Object.defineProperty(t,"ByteStream",{enumerable:!0,get:function(){return p.ByteStream}}),Object.defineProperty(t,"AsyncByteStream",{enumerable:!0,get:function(){return p.AsyncByteStream}}),Object.defineProperty(t,"AsyncByteQueue",{enumerable:!0,get:function(){return p.AsyncByteQueue}});var y=r(28);Object.defineProperty(t,"RecordBatchReader",{enumerable:!0,get:function(){return y.RecordBatchReader}}),Object.defineProperty(t,"RecordBatchFileReader",{enumerable:!0,get:function(){return y.RecordBatchFileReader}}),Object.defineProperty(t,"RecordBatchStreamReader",{enumerable:!0,get:function(){return y.RecordBatchStreamReader}}),Object.defineProperty(t,"AsyncRecordBatchFileReader",{enumerable:!0,get:function(){return y.AsyncRecordBatchFileReader}}),Object.defineProperty(t,"AsyncRecordBatchStreamReader",{enumerable:!0,get:function(){return y.AsyncRecordBatchStreamReader}});var b=r(37);Object.defineProperty(t,"RecordBatchWriter",{enumerable:!0,get:function(){return b.RecordBatchWriter}}),Object.defineProperty(t,"RecordBatchFileWriter",{enumerable:!0,get:function(){return b.RecordBatchFileWriter}}),Object.defineProperty(t,"RecordBatchStreamWriter",{enumerable:!0,get:function(){return b.RecordBatchStreamWriter}}),Object.defineProperty(t,"RecordBatchJSONWriter",{enumerable:!0,get:function(){return b.RecordBatchJSONWriter}});var m=r(38);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return m.MessageReader}}),Object.defineProperty(t,"AsyncMessageReader",{enumerable:!0,get:function(){return m.AsyncMessageReader}}),Object.defineProperty(t,"JSONMessageReader",{enumerable:!0,get:function(){return m.JSONMessageReader}});var g=r(21);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return g.Message}});var _=r(15);Object.defineProperty(t,"RecordBatch",{enumerable:!0,get:function(){return _.RecordBatch}});var B=r(104);Object.defineProperty(t,"DataFrame",{enumerable:!0,get:function(){return B.DataFrame}}),Object.defineProperty(t,"FilteredDataFrame",{enumerable:!0,get:function(){return B.FilteredDataFrame}}),Object.defineProperty(t,"CountByResult",{enumerable:!0,get:function(){return B.CountByResult}});const v=r(27),T=r(62),I=r(12),w=r(26),S=r(5),O=r(30),A=r(83);t.predicate=A;const D=r(63);t.util={...v,...T,...I,...w,...S,...O,compareSchemas:D.compareSchemas,compareFields:D.compareFields,compareTypes:D.compareTypes}},function(e,t,r){"use strict";function i(e,t,r,i){return 0!=(r&1<<i)}function n(e,t,r,i){return(r&1<<i)>>i}function s(e){const t=[];let r=0,i=0,n=0;for(const s of e)s&&(n|=1<<i),8==++i&&(t[r++]=n,n=i=0);(0===r||i>0)&&(t[r++]=n);const s=new Uint8Array(t.length+7&-8);return s.set(t),s}Object.defineProperty(t,"__esModule",{value:!0}),t.popcnt_uint32=t.popcnt_array=t.popcnt_bit_range=t.BitIterator=t.packBools=t.truncateBitmap=t.setBool=t.getBit=t.getBool=void 0,t.getBool=i,t.getBit=n,t.setBool=function(e,t,r){return r?!!(e[t>>3]|=1<<t%8)||!0:!(e[t>>3]&=~(1<<t%8))&&!1},t.truncateBitmap=function(e,t,r){const n=r.byteLength+7&-8;if(e>0||r.byteLength<n){const a=new Uint8Array(n);return a.set(e%8==0?r.subarray(e>>3):s(new o(r,e,t,null,i)).subarray(0,n)),a}return r},t.packBools=s;class o{constructor(e,t,r,i,n){this.bytes=e,this.length=r,this.context=i,this.get=n,this.bit=t%8,this.byteIndex=t>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index<this.length?(8===this.bit&&(this.bit=0,this.byte=this.bytes[this.byteIndex++]),{value:this.get(this.context,this.index++,this.byte,this.bit++)}):{done:!0,value:null}}[Symbol.iterator](){return this}}function a(e,t,r){let i=0,n=0|t;const s=new DataView(e.buffer,e.byteOffset,e.byteLength),o=void 0===r?e.byteLength:n+r;for(;o-n>=4;)i+=c(s.getUint32(n)),n+=4;for(;o-n>=2;)i+=c(s.getUint16(n)),n+=2;for(;o-n>=1;)i+=c(s.getUint8(n)),n+=1;return i}function c(e){let t=0|e;return t-=t>>>1&1431655765,t=(858993459&t)+(t>>>2&858993459),16843009*(t+(t>>>4)&252645135)>>>24}t.BitIterator=o,t.popcnt_bit_range=function e(t,r,i){if(i-r<=0)return 0;if(i-r<8){let e=0;for(const s of new o(t,r,i-r,t,n))e+=s;return e}const s=i>>3<<3,c=r+(r%8==0?0:8-r%8);return e(t,r,c)+e(t,s,i)+a(t,c>>3,s-c>>3)},t.popcnt_array=a,t.popcnt_uint32=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.vectorFromValuesWithType=t.StructRow=t.MapRow=t.Utf8Vector=t.SparseUnionVector=t.DenseUnionVector=t.UnionVector=t.TimeNanosecondVector=t.TimeMicrosecondVector=t.TimeMillisecondVector=t.TimeSecondVector=t.TimeVector=t.TimestampNanosecondVector=t.TimestampMicrosecondVector=t.TimestampMillisecondVector=t.TimestampSecondVector=t.TimestampVector=t.StructVector=t.NullVector=t.MapVector=t.ListVector=t.Uint64Vector=t.Uint32Vector=t.Uint16Vector=t.Uint8Vector=t.Int64Vector=t.Int32Vector=t.Int16Vector=t.Int8Vector=t.IntVector=t.IntervalYearMonthVector=t.IntervalDayTimeVector=t.IntervalVector=t.Float64Vector=t.Float32Vector=t.Float16Vector=t.FloatVector=t.FixedSizeListVector=t.FixedSizeBinaryVector=t.DictionaryVector=t.DecimalVector=t.DateMillisecondVector=t.DateDayVector=t.DateVector=t.Chunked=t.BoolVector=t.BinaryVector=t.BaseVector=t.Vector=void 0;var i=r(3);Object.defineProperty(t,"Vector",{enumerable:!0,get:function(){return i.Vector}});var n=r(4);Object.defineProperty(t,"BaseVector",{enumerable:!0,get:function(){return n.BaseVector}});var s=r(65);Object.defineProperty(t,"BinaryVector",{enumerable:!0,get:function(){return s.BinaryVector}});var o=r(66);Object.defineProperty(t,"BoolVector",{enumerable:!0,get:function(){return o.BoolVector}});var a=r(19);Object.defineProperty(t,"Chunked",{enumerable:!0,get:function(){return a.Chunked}});var c=r(67);Object.defineProperty(t,"DateVector",{enumerable:!0,get:function(){return c.DateVector}}),Object.defineProperty(t,"DateDayVector",{enumerable:!0,get:function(){return c.DateDayVector}}),Object.defineProperty(t,"DateMillisecondVector",{enumerable:!0,get:function(){return c.DateMillisecondVector}});var u=r(68);Object.defineProperty(t,"DecimalVector",{enumerable:!0,get:function(){return u.DecimalVector}});var l=r(39);Object.defineProperty(t,"DictionaryVector",{enumerable:!0,get:function(){return l.DictionaryVector}});var d=r(69);Object.defineProperty(t,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return d.FixedSizeBinaryVector}});var h=r(70);Object.defineProperty(t,"FixedSizeListVector",{enumerable:!0,get:function(){return h.FixedSizeListVector}});var f=r(71);Object.defineProperty(t,"FloatVector",{enumerable:!0,get:function(){return f.FloatVector}}),Object.defineProperty(t,"Float16Vector",{enumerable:!0,get:function(){return f.Float16Vector}}),Object.defineProperty(t,"Float32Vector",{enumerable:!0,get:function(){return f.Float32Vector}}),Object.defineProperty(t,"Float64Vector",{enumerable:!0,get:function(){return f.Float64Vector}});var p=r(72);Object.defineProperty(t,"IntervalVector",{enumerable:!0,get:function(){return p.IntervalVector}}),Object.defineProperty(t,"IntervalDayTimeVector",{enumerable:!0,get:function(){return p.IntervalDayTimeVector}}),Object.defineProperty(t,"IntervalYearMonthVector",{enumerable:!0,get:function(){return p.IntervalYearMonthVector}});var y=r(40);Object.defineProperty(t,"IntVector",{enumerable:!0,get:function(){return y.IntVector}}),Object.defineProperty(t,"Int8Vector",{enumerable:!0,get:function(){return y.Int8Vector}}),Object.defineProperty(t,"Int16Vector",{enumerable:!0,get:function(){return y.Int16Vector}}),Object.defineProperty(t,"Int32Vector",{enumerable:!0,get:function(){return y.Int32Vector}}),Object.defineProperty(t,"Int64Vector",{enumerable:!0,get:function(){return y.Int64Vector}}),Object.defineProperty(t,"Uint8Vector",{enumerable:!0,get:function(){return y.Uint8Vector}}),Object.defineProperty(t,"Uint16Vector",{enumerable:!0,get:function(){return y.Uint16Vector}}),Object.defineProperty(t,"Uint32Vector",{enumerable:!0,get:function(){return y.Uint32Vector}}),Object.defineProperty(t,"Uint64Vector",{enumerable:!0,get:function(){return y.Uint64Vector}});var b=r(73);Object.defineProperty(t,"ListVector",{enumerable:!0,get:function(){return b.ListVector}});var m=r(74);Object.defineProperty(t,"MapVector",{enumerable:!0,get:function(){return m.MapVector}});var g=r(75);Object.defineProperty(t,"NullVector",{enumerable:!0,get:function(){return g.NullVector}});var _=r(76);Object.defineProperty(t,"StructVector",{enumerable:!0,get:function(){return _.StructVector}});var B=r(77);Object.defineProperty(t,"TimestampVector",{enumerable:!0,get:function(){return B.TimestampVector}}),Object.defineProperty(t,"TimestampSecondVector",{enumerable:!0,get:function(){return B.TimestampSecondVector}}),Object.defineProperty(t,"TimestampMillisecondVector",{enumerable:!0,get:function(){return B.TimestampMillisecondVector}}),Object.defineProperty(t,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return B.TimestampMicrosecondVector}}),Object.defineProperty(t,"TimestampNanosecondVector",{enumerable:!0,get:function(){return B.TimestampNanosecondVector}});var v=r(78);Object.defineProperty(t,"TimeVector",{enumerable:!0,get:function(){return v.TimeVector}}),Object.defineProperty(t,"TimeSecondVector",{enumerable:!0,get:function(){return v.TimeSecondVector}}),Object.defineProperty(t,"TimeMillisecondVector",{enumerable:!0,get:function(){return v.TimeMillisecondVector}}),Object.defineProperty(t,"TimeMicrosecondVector",{enumerable:!0,get:function(){return v.TimeMicrosecondVector}}),Object.defineProperty(t,"TimeNanosecondVector",{enumerable:!0,get:function(){return v.TimeNanosecondVector}});var T=r(79);Object.defineProperty(t,"UnionVector",{enumerable:!0,get:function(){return T.UnionVector}}),Object.defineProperty(t,"DenseUnionVector",{enumerable:!0,get:function(){return T.DenseUnionVector}}),Object.defineProperty(t,"SparseUnionVector",{enumerable:!0,get:function(){return T.SparseUnionVector}});var I=r(80);Object.defineProperty(t,"Utf8Vector",{enumerable:!0,get:function(){return I.Utf8Vector}});var w=r(31);Object.defineProperty(t,"MapRow",{enumerable:!0,get:function(){return w.MapRow}}),Object.defineProperty(t,"StructRow",{enumerable:!0,get:function(){return w.StructRow}});const S=r(95),O=r(1),A=r(3),D=r(19),V=r(4),F=r(12),M=r(9),U=r(2),P=r(81),j=r(59),x=r(96),L=r(97),N=r(82),R=r(98),E=r(99);A.Vector.new=function(e,...t){return new(E.instance.getVisitFn(e)())(e,...t)},A.Vector.from=function(e){const{values:t=[],...r}={nullValues:[null,void 0],...e};if(M.isIterable(t)){const e=[...U.Builder.throughIterable(r)(t)];return 1===e.length?e[0]:D.Chunked.concat(e)}return(async e=>{const i=U.Builder.throughAsyncIterable(r);for await(const r of i(t))e.push(r);return 1===e.length?e[0]:D.Chunked.concat(e)})([])},t.vectorFromValuesWithType=function(e,t){if(M.isIterable(t))return A.Vector.from({nullValues:[null,void 0],type:e(),values:t});if(M.isAsyncIterable(t))return A.Vector.from({nullValues:[null,void 0],type:e(),values:t});const{values:r=[],type:i=e(),nullValues:n=[null,void 0]}={...t};return M.isIterable(r),A.Vector.from({nullValues:n,...t,type:i})},V.BaseVector.prototype.get=function(e){return P.instance.visit(this,e)},V.BaseVector.prototype.set=function(e,t){return j.instance.visit(this,e,t)},V.BaseVector.prototype.indexOf=function(e,t){return x.instance.visit(this,e,t)},V.BaseVector.prototype.toArray=function(){return L.instance.visit(this)},V.BaseVector.prototype.getByteWidth=function(){return R.instance.visit(this.type)},V.BaseVector.prototype[Symbol.iterator]=function(){return N.instance.visit(this)},V.BaseVector.prototype._bindDataAccessors=function(){const e=this.nullBitmap;e&&e.byteLength>0&&(this.get=function(e){return function(t){return this.isValid(t)?e.call(this,t):null}}(this.get),this.set=function(e){return function(t,r){F.setBool(this.nullBitmap,this.offset+t,!(null==r))&&e.call(this,t,r)}}(this.set))},Object.keys(O.Type).map(e=>O.Type[e]).filter(e=>"number"==typeof e).filter(e=>e!==O.Type.NONE).forEach(e=>{const t=E.instance.visit(e);var r;t.prototype.get=S.partial1(P.instance.getVisitFn(e)),t.prototype.set=S.partial2(j.instance.getVisitFn(e)),t.prototype.indexOf=S.partial2(x.instance.getVisitFn(e)),t.prototype.toArray=S.partial0(L.instance.getVisitFn(e)),t.prototype.getByteWidth=(r=R.instance.getVisitFn(e),function(){return r(this.type)}),t.prototype[Symbol.iterator]=S.partial0(N.instance.getVisitFn(e))})},function(e,t,r){"use strict";r.r(t),r.d(t,"flatbuffers",(function(){return i}));var i={};i.Offset,i.Table,i.SIZEOF_SHORT=2,i.SIZEOF_INT=4,i.FILE_IDENTIFIER_LENGTH=4,i.SIZE_PREFIX_LENGTH=4,i.Encoding={UTF8_BYTES:1,UTF16_STRING:2},i.int32=new Int32Array(2),i.float32=new Float32Array(i.int32.buffer),i.float64=new Float64Array(i.int32.buffer),i.isLittleEndian=1===new Uint16Array(new Uint8Array([1,0]).buffer)[0],i.Long=function(e,t){this.low=0|e,this.high=0|t},i.Long.create=function(e,t){return 0==e&&0==t?i.Long.ZERO:new i.Long(e,t)},i.Long.prototype.toFloat64=function(){return(this.low>>>0)+4294967296*this.high},i.Long.prototype.equals=function(e){return this.low==e.low&&this.high==e.high},i.Long.ZERO=new i.Long(0,0),i.Builder=function(e){if(e)t=e;else var t=1024;this.bb=i.ByteBuffer.allocate(t),this.space=t,this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1},i.Builder.prototype.clear=function(){this.bb.clear(),this.space=this.bb.capacity(),this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1},i.Builder.prototype.forceDefaults=function(e){this.force_defaults=e},i.Builder.prototype.dataBuffer=function(){return this.bb},i.Builder.prototype.asUint8Array=function(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())},i.Builder.prototype.prep=function(e,t){e>this.minalign&&(this.minalign=e);for(var r=1+~(this.bb.capacity()-this.space+t)&e-1;this.space<r+e+t;){var n=this.bb.capacity();this.bb=i.Builder.growByteBuffer(this.bb),this.space+=this.bb.capacity()-n}this.pad(r)},i.Builder.prototype.pad=function(e){for(var t=0;t<e;t++)this.bb.writeInt8(--this.space,0)},i.Builder.prototype.writeInt8=function(e){this.bb.writeInt8(this.space-=1,e)},i.Builder.prototype.writeInt16=function(e){this.bb.writeInt16(this.space-=2,e)},i.Builder.prototype.writeInt32=function(e){this.bb.writeInt32(this.space-=4,e)},i.Builder.prototype.writeInt64=function(e){this.bb.writeInt64(this.space-=8,e)},i.Builder.prototype.writeFloat32=function(e){this.bb.writeFloat32(this.space-=4,e)},i.Builder.prototype.writeFloat64=function(e){this.bb.writeFloat64(this.space-=8,e)},i.Builder.prototype.addInt8=function(e){this.prep(1,0),this.writeInt8(e)},i.Builder.prototype.addInt16=function(e){this.prep(2,0),this.writeInt16(e)},i.Builder.prototype.addInt32=function(e){this.prep(4,0),this.writeInt32(e)},i.Builder.prototype.addInt64=function(e){this.prep(8,0),this.writeInt64(e)},i.Builder.prototype.addFloat32=function(e){this.prep(4,0),this.writeFloat32(e)},i.Builder.prototype.addFloat64=function(e){this.prep(8,0),this.writeFloat64(e)},i.Builder.prototype.addFieldInt8=function(e,t,r){(this.force_defaults||t!=r)&&(this.addInt8(t),this.slot(e))},i.Builder.prototype.addFieldInt16=function(e,t,r){(this.force_defaults||t!=r)&&(this.addInt16(t),this.slot(e))},i.Builder.prototype.addFieldInt32=function(e,t,r){(this.force_defaults||t!=r)&&(this.addInt32(t),this.slot(e))},i.Builder.prototype.addFieldInt64=function(e,t,r){!this.force_defaults&&t.equals(r)||(this.addInt64(t),this.slot(e))},i.Builder.prototype.addFieldFloat32=function(e,t,r){(this.force_defaults||t!=r)&&(this.addFloat32(t),this.slot(e))},i.Builder.prototype.addFieldFloat64=function(e,t,r){(this.force_defaults||t!=r)&&(this.addFloat64(t),this.slot(e))},i.Builder.prototype.addFieldOffset=function(e,t,r){(this.force_defaults||t!=r)&&(this.addOffset(t),this.slot(e))},i.Builder.prototype.addFieldStruct=function(e,t,r){t!=r&&(this.nested(t),this.slot(e))},i.Builder.prototype.nested=function(e){if(e!=this.offset())throw new Error("FlatBuffers: struct must be serialized inline.")},i.Builder.prototype.notNested=function(){if(this.isNested)throw new Error("FlatBuffers: object serialization must not be nested.")},i.Builder.prototype.slot=function(e){this.vtable[e]=this.offset()},i.Builder.prototype.offset=function(){return this.bb.capacity()-this.space},i.Builder.growByteBuffer=function(e){var t=e.capacity();if(3221225472&t)throw new Error("FlatBuffers: cannot grow buffer beyond 2 gigabytes.");var r=t<<1,n=i.ByteBuffer.allocate(r);return n.setPosition(r-t),n.bytes().set(e.bytes(),r-t),n},i.Builder.prototype.addOffset=function(e){this.prep(i.SIZEOF_INT,0),this.writeInt32(this.offset()-e+i.SIZEOF_INT)},i.Builder.prototype.startObject=function(e){this.notNested(),null==this.vtable&&(this.vtable=[]),this.vtable_in_use=e;for(var t=0;t<e;t++)this.vtable[t]=0;this.isNested=!0,this.object_start=this.offset()},i.Builder.prototype.endObject=function(){if(null==this.vtable||!this.isNested)throw new Error("FlatBuffers: endObject called without startObject");this.addInt32(0);for(var e=this.offset(),t=this.vtable_in_use-1;t>=0&&0==this.vtable[t];t--);for(var r=t+1;t>=0;t--)this.addInt16(0!=this.vtable[t]?e-this.vtable[t]:0);this.addInt16(e-this.object_start);var n=(r+2)*i.SIZEOF_SHORT;this.addInt16(n);var s=0,o=this.space;e:for(t=0;t<this.vtables.length;t++){var a=this.bb.capacity()-this.vtables[t];if(n==this.bb.readInt16(a)){for(var c=i.SIZEOF_SHORT;c<n;c+=i.SIZEOF_SHORT)if(this.bb.readInt16(o+c)!=this.bb.readInt16(a+c))continue e;s=this.vtables[t];break}}return s?(this.space=this.bb.capacity()-e,this.bb.writeInt32(this.space,s-e)):(this.vtables.push(this.offset()),this.bb.writeInt32(this.bb.capacity()-e,this.offset()-e)),this.isNested=!1,e},i.Builder.prototype.finish=function(e,t,r){var n=r?i.SIZE_PREFIX_LENGTH:0;if(t){var s=t;if(this.prep(this.minalign,i.SIZEOF_INT+i.FILE_IDENTIFIER_LENGTH+n),s.length!=i.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+i.FILE_IDENTIFIER_LENGTH);for(var o=i.FILE_IDENTIFIER_LENGTH-1;o>=0;o--)this.writeInt8(s.charCodeAt(o))}this.prep(this.minalign,i.SIZEOF_INT+n),this.addOffset(e),n&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)},i.Builder.prototype.finishSizePrefixed=function(e,t){this.finish(e,t,!0)},i.Builder.prototype.requiredField=function(e,t){var r=this.bb.capacity()-e,i=r-this.bb.readInt32(r);if(!(0!=this.bb.readInt16(i+t)))throw new Error("FlatBuffers: field "+t+" must be set")},i.Builder.prototype.startVector=function(e,t,r){this.notNested(),this.vector_num_elems=t,this.prep(i.SIZEOF_INT,e*t),this.prep(r,e*t)},i.Builder.prototype.endVector=function(){return this.writeInt32(this.vector_num_elems),this.offset()},i.Builder.prototype.createString=function(e){if(e instanceof Uint8Array)var t=e;else{t=[];for(var r=0;r<e.length;){var i,n=e.charCodeAt(r++);if(n<55296||n>=56320)i=n;else i=(n<<10)+e.charCodeAt(r++)+-56613888;i<128?t.push(i):(i<2048?t.push(i>>6&31|192):(i<65536?t.push(i>>12&15|224):t.push(i>>18&7|240,i>>12&63|128),t.push(i>>6&63|128)),t.push(63&i|128))}}this.addInt8(0),this.startVector(1,t.length,1),this.bb.setPosition(this.space-=t.length);r=0;for(var s=this.space,o=this.bb.bytes();r<t.length;r++)o[s++]=t[r];return this.endVector()},i.Builder.prototype.createLong=function(e,t){return i.Long.create(e,t)},i.ByteBuffer=function(e){this.bytes_=e,this.position_=0},i.ByteBuffer.allocate=function(e){return new i.ByteBuffer(new Uint8Array(e))},i.ByteBuffer.prototype.clear=function(){this.position_=0},i.ByteBuffer.prototype.bytes=function(){return this.bytes_},i.ByteBuffer.prototype.position=function(){return this.position_},i.ByteBuffer.prototype.setPosition=function(e){this.position_=e},i.ByteBuffer.prototype.capacity=function(){return this.bytes_.length},i.ByteBuffer.prototype.readInt8=function(e){return this.readUint8(e)<<24>>24},i.ByteBuffer.prototype.readUint8=function(e){return this.bytes_[e]},i.ByteBuffer.prototype.readInt16=function(e){return this.readUint16(e)<<16>>16},i.ByteBuffer.prototype.readUint16=function(e){return this.bytes_[e]|this.bytes_[e+1]<<8},i.ByteBuffer.prototype.readInt32=function(e){return this.bytes_[e]|this.bytes_[e+1]<<8|this.bytes_[e+2]<<16|this.bytes_[e+3]<<24},i.ByteBuffer.prototype.readUint32=function(e){return this.readInt32(e)>>>0},i.ByteBuffer.prototype.readInt64=function(e){return new i.Long(this.readInt32(e),this.readInt32(e+4))},i.ByteBuffer.prototype.readUint64=function(e){return new i.Long(this.readUint32(e),this.readUint32(e+4))},i.ByteBuffer.prototype.readFloat32=function(e){return i.int32[0]=this.readInt32(e),i.float32[0]},i.ByteBuffer.prototype.readFloat64=function(e){return i.int32[i.isLittleEndian?0:1]=this.readInt32(e),i.int32[i.isLittleEndian?1:0]=this.readInt32(e+4),i.float64[0]},i.ByteBuffer.prototype.writeInt8=function(e,t){this.bytes_[e]=t},i.ByteBuffer.prototype.writeUint8=function(e,t){this.bytes_[e]=t},i.ByteBuffer.prototype.writeInt16=function(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8},i.ByteBuffer.prototype.writeUint16=function(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8},i.ByteBuffer.prototype.writeInt32=function(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24},i.ByteBuffer.prototype.writeUint32=function(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24},i.ByteBuffer.prototype.writeInt64=function(e,t){this.writeInt32(e,t.low),this.writeInt32(e+4,t.high)},i.ByteBuffer.prototype.writeUint64=function(e,t){this.writeUint32(e,t.low),this.writeUint32(e+4,t.high)},i.ByteBuffer.prototype.writeFloat32=function(e,t){i.float32[0]=t,this.writeInt32(e,i.int32[0])},i.ByteBuffer.prototype.writeFloat64=function(e,t){i.float64[0]=t,this.writeInt32(e,i.int32[i.isLittleEndian?0:1]),this.writeInt32(e+4,i.int32[i.isLittleEndian?1:0])},i.ByteBuffer.prototype.getBufferIdentifier=function(){if(this.bytes_.length<this.position_+i.SIZEOF_INT+i.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: ByteBuffer is too short to contain an identifier.");for(var e="",t=0;t<i.FILE_IDENTIFIER_LENGTH;t++)e+=String.fromCharCode(this.readInt8(this.position_+i.SIZEOF_INT+t));return e},i.ByteBuffer.prototype.__offset=function(e,t){var r=e-this.readInt32(e);return t<this.readInt16(r)?this.readInt16(r+t):0},i.ByteBuffer.prototype.__union=function(e,t){return e.bb_pos=t+this.readInt32(t),e.bb=this,e},i.ByteBuffer.prototype.__string=function(e,t){e+=this.readInt32(e);var r=this.readInt32(e),n="",s=0;if(e+=i.SIZEOF_INT,t===i.Encoding.UTF8_BYTES)return this.bytes_.subarray(e,e+r);for(;s<r;){var o,a=this.readUint8(e+s++);if(a<192)o=a;else{var c=this.readUint8(e+s++);if(a<224)o=(31&a)<<6|63&c;else{var u=this.readUint8(e+s++);if(a<240)o=(15&a)<<12|(63&c)<<6|63&u;else o=(7&a)<<18|(63&c)<<12|(63&u)<<6|63&this.readUint8(e+s++)}}o<65536?n+=String.fromCharCode(o):(o-=65536,n+=String.fromCharCode(55296+(o>>10),56320+(1023&o)))}return n},i.ByteBuffer.prototype.__indirect=function(e){return e+this.readInt32(e)},i.ByteBuffer.prototype.__vector=function(e){return e+this.readInt32(e)+i.SIZEOF_INT},i.ByteBuffer.prototype.__vector_len=function(e){return this.readInt32(e+this.readInt32(e))},i.ByteBuffer.prototype.__has_identifier=function(e){if(e.length!=i.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+i.FILE_IDENTIFIER_LENGTH);for(var t=0;t<i.FILE_IDENTIFIER_LENGTH;t++)if(e.charCodeAt(t)!=this.readInt8(this.position_+i.SIZEOF_INT+t))return!1;return!0},i.ByteBuffer.prototype.createLong=function(e,t){return i.Long.create(e,t)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._InternalEmptyPlaceholderRecordBatch=t.RecordBatch=void 0;const i=r(10),n=r(29),s=r(3),o=r(8),a=r(6),c=r(9),u=r(19),l=r(24),d=r(0),h=r(64),f=r(13);class p extends f.StructVector{constructor(...e){let t;const r=e[0];let n;if(e[1]instanceof i.Data)[,t,n]=e;else{const n=r.fields,[,s,o]=e;t=i.Data.Struct(new d.Struct(n),0,s,0,null,o)}super(t,n),this._schema=r}static from(e){return c.isIterable(e.values),n.Table.from(e)}static new(...e){const[t,r]=l.selectFieldArgs(e),i=r.filter(e=>e instanceof s.Vector);return new p(...h.ensureSameLengthData(new a.Schema(t),i.map(e=>e.data)))}clone(e,t=this._children){return new p(this._schema,e,t)}concat(...e){const t=this._schema,r=u.Chunked.flatten(this,...e);return new n.Table(t,r.map(({data:e})=>new p(t,e)))}get schema(){return this._schema}get numCols(){return this._schema.fields.length}get dictionaries(){return this._dictionaries||(this._dictionaries=y.collect(this))}select(...e){const t=this._schema.fields.reduce((e,t,r)=>e.set(t.name,r),new Map);return this.selectAt(...e.map(e=>t.get(e)).filter(e=>e>-1))}selectAt(...e){const t=this._schema.selectAt(...e),r=e.map(e=>this.data.childData[e]).filter(Boolean);return new p(t,this.length,r)}}t.RecordBatch=p;t._InternalEmptyPlaceholderRecordBatch=class extends p{constructor(e){super(e,0,e.fields.map(e=>i.Data.new(e.type,0,0,0)))}};class y extends o.Visitor{constructor(){super(...arguments),this.dictionaries=new Map}static collect(e){return(new y).visit(e.data,new d.Struct(e.schema.fields)).dictionaries}visit(e,t){return d.DataType.isDictionary(t)?this.visitDictionary(e,t):(e.childData.forEach((e,r)=>this.visit(e,t.children[r].type)),this)}visitDictionary(e,t){const r=e.dictionary;return r&&r.length>0&&this.dictionaries.set(t.id,r),this}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Schema=t.Buffer=t.Field=t.DictionaryEncoding=t.KeyValue=t.Duration=t.Interval=t.Timestamp=t.Time=t.Date=t.Decimal=t.Bool=t.FixedSizeBinary=t.LargeBinary=t.LargeUtf8=t.Binary=t.Utf8=t.FloatingPoint=t.Int=t.Union=t.Map=t.FixedSizeList=t.LargeList=t.List=t.Struct_=t.Null=t.Endianness=t.DictionaryKind=t.Type=t.IntervalUnit=t.TimeUnit=t.DateUnit=t.Precision=t.UnionMode=t.Feature=t.MetadataVersion=void 0;const i=r(14);var n,s,o,a,c,u,l,d;!function(e){e[e.V1=0]="V1",e[e.V2=1]="V2",e[e.V3=2]="V3",e[e.V4=3]="V4",e[e.V5=4]="V5"}(t.MetadataVersion||(t.MetadataVersion={})),function(e){e[e.UNUSED=0]="UNUSED",e[e.DICTIONARY_REPLACEMENT=1]="DICTIONARY_REPLACEMENT",e[e.COMPRESSED_BODY=2]="COMPRESSED_BODY"}(t.Feature||(t.Feature={})),function(e){e[e.Sparse=0]="Sparse",e[e.Dense=1]="Dense"}(n=t.UnionMode||(t.UnionMode={})),function(e){e[e.HALF=0]="HALF",e[e.SINGLE=1]="SINGLE",e[e.DOUBLE=2]="DOUBLE"}(s=t.Precision||(t.Precision={})),function(e){e[e.DAY=0]="DAY",e[e.MILLISECOND=1]="MILLISECOND"}(o=t.DateUnit||(t.DateUnit={})),function(e){e[e.SECOND=0]="SECOND",e[e.MILLISECOND=1]="MILLISECOND",e[e.MICROSECOND=2]="MICROSECOND",e[e.NANOSECOND=3]="NANOSECOND"}(a=t.TimeUnit||(t.TimeUnit={})),function(e){e[e.YEAR_MONTH=0]="YEAR_MONTH",e[e.DAY_TIME=1]="DAY_TIME"}(c=t.IntervalUnit||(t.IntervalUnit={})),function(e){e[e.NONE=0]="NONE",e[e.Null=1]="Null",e[e.Int=2]="Int",e[e.FloatingPoint=3]="FloatingPoint",e[e.Binary=4]="Binary",e[e.Utf8=5]="Utf8",e[e.Bool=6]="Bool",e[e.Decimal=7]="Decimal",e[e.Date=8]="Date",e[e.Time=9]="Time",e[e.Timestamp=10]="Timestamp",e[e.Interval=11]="Interval",e[e.List=12]="List",e[e.Struct_=13]="Struct_",e[e.Union=14]="Union",e[e.FixedSizeBinary=15]="FixedSizeBinary",e[e.FixedSizeList=16]="FixedSizeList",e[e.Map=17]="Map",e[e.Duration=18]="Duration",e[e.LargeBinary=19]="LargeBinary",e[e.LargeUtf8=20]="LargeUtf8",e[e.LargeList=21]="LargeList"}(u=t.Type||(t.Type={})),function(e){e[e.DenseArray=0]="DenseArray"}(l=t.DictionaryKind||(t.DictionaryKind={})),function(e){e[e.Little=0]="Little",e[e.Big=1]="Big"}(d=t.Endianness||(t.Endianness={}));class h{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsNull(e,t){return(t||new h).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsNull(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new h).__init(e.readInt32(e.position())+e.position(),e)}static startNull(e){e.startObject(0)}static endNull(e){return e.endObject()}static createNull(e){return h.startNull(e),h.endNull(e)}}t.Null=h;class f{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsStruct_(e,t){return(t||new f).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsStruct_(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new f).__init(e.readInt32(e.position())+e.position(),e)}static startStruct_(e){e.startObject(0)}static endStruct_(e){return e.endObject()}static createStruct_(e){return f.startStruct_(e),f.endStruct_(e)}}t.Struct_=f;class p{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsList(e,t){return(t||new p).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsList(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new p).__init(e.readInt32(e.position())+e.position(),e)}static startList(e){e.startObject(0)}static endList(e){return e.endObject()}static createList(e){return p.startList(e),p.endList(e)}}t.List=p;class y{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsLargeList(e,t){return(t||new y).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeList(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new y).__init(e.readInt32(e.position())+e.position(),e)}static startLargeList(e){e.startObject(0)}static endLargeList(e){return e.endObject()}static createLargeList(e){return y.startLargeList(e),y.endLargeList(e)}}t.LargeList=y;class b{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFixedSizeList(e,t){return(t||new b).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeList(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new b).__init(e.readInt32(e.position())+e.position(),e)}listSize(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeList(e){e.startObject(1)}static addListSize(e,t){e.addFieldInt32(0,t,0)}static endFixedSizeList(e){return e.endObject()}static createFixedSizeList(e,t){return b.startFixedSizeList(e),b.addListSize(e,t),b.endFixedSizeList(e)}}t.FixedSizeList=b;class m{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMap(e,t){return(t||new m).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMap(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new m).__init(e.readInt32(e.position())+e.position(),e)}keysSorted(){const e=this.bb.__offset(this.bb_pos,4);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}static startMap(e){e.startObject(1)}static addKeysSorted(e,t){e.addFieldInt8(0,+t,0)}static endMap(e){return e.endObject()}static createMap(e,t){return m.startMap(e),m.addKeysSorted(e,t),m.endMap(e)}}t.Map=m;class g{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsUnion(e,t){return(t||new g).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUnion(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new g).__init(e.readInt32(e.position())+e.position(),e)}mode(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):n.Sparse}typeIds(e){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readInt32(this.bb.__vector(this.bb_pos+t)+4*e):0}typeIdsLength(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}typeIdsArray(){const e=this.bb.__offset(this.bb_pos,6);return e?new Int32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}static startUnion(e){e.startObject(2)}static addMode(e,t){e.addFieldInt16(0,t,n.Sparse)}static addTypeIds(e,t){e.addFieldOffset(1,t,0)}static createTypeIdsVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addInt32(t[r]);return e.endVector()}static startTypeIdsVector(e,t){e.startVector(4,t,4)}static endUnion(e){return e.endObject()}static createUnion(e,t,r){return g.startUnion(e),g.addMode(e,t),g.addTypeIds(e,r),g.endUnion(e)}}t.Union=g;class _{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsInt(e,t){return(t||new _).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInt(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new _).__init(e.readInt32(e.position())+e.position(),e)}bitWidth(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}isSigned(){const e=this.bb.__offset(this.bb_pos,6);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}static startInt(e){e.startObject(2)}static addBitWidth(e,t){e.addFieldInt32(0,t,0)}static addIsSigned(e,t){e.addFieldInt8(1,+t,0)}static endInt(e){return e.endObject()}static createInt(e,t,r){return _.startInt(e),_.addBitWidth(e,t),_.addIsSigned(e,r),_.endInt(e)}}t.Int=_;class B{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFloatingPoint(e,t){return(t||new B).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFloatingPoint(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new B).__init(e.readInt32(e.position())+e.position(),e)}precision(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):s.HALF}static startFloatingPoint(e){e.startObject(1)}static addPrecision(e,t){e.addFieldInt16(0,t,s.HALF)}static endFloatingPoint(e){return e.endObject()}static createFloatingPoint(e,t){return B.startFloatingPoint(e),B.addPrecision(e,t),B.endFloatingPoint(e)}}t.FloatingPoint=B;class v{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsUtf8(e,t){return(t||new v).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUtf8(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new v).__init(e.readInt32(e.position())+e.position(),e)}static startUtf8(e){e.startObject(0)}static endUtf8(e){return e.endObject()}static createUtf8(e){return v.startUtf8(e),v.endUtf8(e)}}t.Utf8=v;class T{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBinary(e,t){return(t||new T).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBinary(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new T).__init(e.readInt32(e.position())+e.position(),e)}static startBinary(e){e.startObject(0)}static endBinary(e){return e.endObject()}static createBinary(e){return T.startBinary(e),T.endBinary(e)}}t.Binary=T;class I{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsLargeUtf8(e,t){return(t||new I).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeUtf8(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new I).__init(e.readInt32(e.position())+e.position(),e)}static startLargeUtf8(e){e.startObject(0)}static endLargeUtf8(e){return e.endObject()}static createLargeUtf8(e){return I.startLargeUtf8(e),I.endLargeUtf8(e)}}t.LargeUtf8=I;class w{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsLargeBinary(e,t){return(t||new w).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeBinary(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new w).__init(e.readInt32(e.position())+e.position(),e)}static startLargeBinary(e){e.startObject(0)}static endLargeBinary(e){return e.endObject()}static createLargeBinary(e){return w.startLargeBinary(e),w.endLargeBinary(e)}}t.LargeBinary=w;class S{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFixedSizeBinary(e,t){return(t||new S).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeBinary(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new S).__init(e.readInt32(e.position())+e.position(),e)}byteWidth(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeBinary(e){e.startObject(1)}static addByteWidth(e,t){e.addFieldInt32(0,t,0)}static endFixedSizeBinary(e){return e.endObject()}static createFixedSizeBinary(e,t){return S.startFixedSizeBinary(e),S.addByteWidth(e,t),S.endFixedSizeBinary(e)}}t.FixedSizeBinary=S;class O{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBool(e,t){return(t||new O).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBool(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new O).__init(e.readInt32(e.position())+e.position(),e)}static startBool(e){e.startObject(0)}static endBool(e){return e.endObject()}static createBool(e){return O.startBool(e),O.endBool(e)}}t.Bool=O;class A{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDecimal(e,t){return(t||new A).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDecimal(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new A).__init(e.readInt32(e.position())+e.position(),e)}precision(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}scale(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):0}bitWidth(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readInt32(this.bb_pos+e):128}static startDecimal(e){e.startObject(3)}static addPrecision(e,t){e.addFieldInt32(0,t,0)}static addScale(e,t){e.addFieldInt32(1,t,0)}static addBitWidth(e,t){e.addFieldInt32(2,t,128)}static endDecimal(e){return e.endObject()}static createDecimal(e,t,r,i){return A.startDecimal(e),A.addPrecision(e,t),A.addScale(e,r),A.addBitWidth(e,i),A.endDecimal(e)}}t.Decimal=A;class D{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDate(e,t){return(t||new D).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDate(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new D).__init(e.readInt32(e.position())+e.position(),e)}unit(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):o.MILLISECOND}static startDate(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,o.MILLISECOND)}static endDate(e){return e.endObject()}static createDate(e,t){return D.startDate(e),D.addUnit(e,t),D.endDate(e)}}t.Date=D;class V{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsTime(e,t){return(t||new V).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTime(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new V).__init(e.readInt32(e.position())+e.position(),e)}unit(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):a.MILLISECOND}bitWidth(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):32}static startTime(e){e.startObject(2)}static addUnit(e,t){e.addFieldInt16(0,t,a.MILLISECOND)}static addBitWidth(e,t){e.addFieldInt32(1,t,32)}static endTime(e){return e.endObject()}static createTime(e,t,r){return V.startTime(e),V.addUnit(e,t),V.addBitWidth(e,r),V.endTime(e)}}t.Time=V;class F{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsTimestamp(e,t){return(t||new F).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTimestamp(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new F).__init(e.readInt32(e.position())+e.position(),e)}unit(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):a.SECOND}timezone(e){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__string(this.bb_pos+t,e):null}static startTimestamp(e){e.startObject(2)}static addUnit(e,t){e.addFieldInt16(0,t,a.SECOND)}static addTimezone(e,t){e.addFieldOffset(1,t,0)}static endTimestamp(e){return e.endObject()}static createTimestamp(e,t,r){return F.startTimestamp(e),F.addUnit(e,t),F.addTimezone(e,r),F.endTimestamp(e)}}t.Timestamp=F;class M{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsInterval(e,t){return(t||new M).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInterval(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new M).__init(e.readInt32(e.position())+e.position(),e)}unit(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):c.YEAR_MONTH}static startInterval(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,c.YEAR_MONTH)}static endInterval(e){return e.endObject()}static createInterval(e,t){return M.startInterval(e),M.addUnit(e,t),M.endInterval(e)}}t.Interval=M;class U{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDuration(e,t){return(t||new U).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDuration(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new U).__init(e.readInt32(e.position())+e.position(),e)}unit(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):a.MILLISECOND}static startDuration(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,a.MILLISECOND)}static endDuration(e){return e.endObject()}static createDuration(e,t){return U.startDuration(e),U.addUnit(e,t),U.endDuration(e)}}t.Duration=U;class P{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsKeyValue(e,t){return(t||new P).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsKeyValue(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new P).__init(e.readInt32(e.position())+e.position(),e)}key(e){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}value(e){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__string(this.bb_pos+t,e):null}static startKeyValue(e){e.startObject(2)}static addKey(e,t){e.addFieldOffset(0,t,0)}static addValue(e,t){e.addFieldOffset(1,t,0)}static endKeyValue(e){return e.endObject()}static createKeyValue(e,t,r){return P.startKeyValue(e),P.addKey(e,t),P.addValue(e,r),P.endKeyValue(e)}}t.KeyValue=P;class j{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDictionaryEncoding(e,t){return(t||new j).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryEncoding(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new j).__init(e.readInt32(e.position())+e.position(),e)}id(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}indexType(e){const t=this.bb.__offset(this.bb_pos,6);return t?(e||new _).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}isOrdered(){const e=this.bb.__offset(this.bb_pos,8);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}dictionaryKind(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt16(this.bb_pos+e):l.DenseArray}static startDictionaryEncoding(e){e.startObject(4)}static addId(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addIndexType(e,t){e.addFieldOffset(1,t,0)}static addIsOrdered(e,t){e.addFieldInt8(2,+t,0)}static addDictionaryKind(e,t){e.addFieldInt16(3,t,l.DenseArray)}static endDictionaryEncoding(e){return e.endObject()}static createDictionaryEncoding(e,t,r,i,n){return j.startDictionaryEncoding(e),j.addId(e,t),j.addIndexType(e,r),j.addIsOrdered(e,i),j.addDictionaryKind(e,n),j.endDictionaryEncoding(e)}}t.DictionaryEncoding=j;class x{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsField(e,t){return(t||new x).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsField(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new x).__init(e.readInt32(e.position())+e.position(),e)}name(e){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}nullable(){const e=this.bb.__offset(this.bb_pos,6);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}typeType(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readUint8(this.bb_pos+e):u.NONE}type(e){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__union(e,this.bb_pos+t):null}dictionary(e){const t=this.bb.__offset(this.bb_pos,12);return t?(e||new j).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}children(e,t){const r=this.bb.__offset(this.bb_pos,14);return r?(t||new x).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+4*e),this.bb):null}childrenLength(){const e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){const r=this.bb.__offset(this.bb_pos,16);return r?(t||new P).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+4*e),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,16);return e?this.bb.__vector_len(this.bb_pos+e):0}static startField(e){e.startObject(7)}static addName(e,t){e.addFieldOffset(0,t,0)}static addNullable(e,t){e.addFieldInt8(1,+t,0)}static addTypeType(e,t){e.addFieldInt8(2,t,u.NONE)}static addType(e,t){e.addFieldOffset(3,t,0)}static addDictionary(e,t){e.addFieldOffset(4,t,0)}static addChildren(e,t){e.addFieldOffset(5,t,0)}static createChildrenVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}static startChildrenVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(6,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endField(e){return e.endObject()}static createField(e,t,r,i,n,s,o,a){return x.startField(e),x.addName(e,t),x.addNullable(e,r),x.addTypeType(e,i),x.addType(e,n),x.addDictionary(e,s),x.addChildren(e,o),x.addCustomMetadata(e,a),x.endField(e)}}t.Field=x;t.Buffer=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}offset(){return this.bb.readInt64(this.bb_pos)}length(){return this.bb.readInt64(this.bb_pos+8)}static createBuffer(e,t,r){return e.prep(8,16),e.writeInt64(r),e.writeInt64(t),e.offset()}};class L{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsSchema(e,t){return(t||new L).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsSchema(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new L).__init(e.readInt32(e.position())+e.position(),e)}endianness(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):d.Little}fields(e,t){const r=this.bb.__offset(this.bb_pos,6);return r?(t||new x).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+4*e),this.bb):null}fieldsLength(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){const r=this.bb.__offset(this.bb_pos,8);return r?(t||new P).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+4*e),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}features(e){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb.__vector(this.bb_pos+t)+8*e):this.bb.createLong(0,0)}featuresLength(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}static startSchema(e){e.startObject(4)}static addEndianness(e,t){e.addFieldInt16(0,t,d.Little)}static addFields(e,t){e.addFieldOffset(1,t,0)}static createFieldsVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}static startFieldsVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(2,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static addFeatures(e,t){e.addFieldOffset(3,t,0)}static createFeaturesVector(e,t){e.startVector(8,t.length,8);for(let r=t.length-1;r>=0;r--)e.addInt64(t[r]);return e.endVector()}static startFeaturesVector(e,t){e.startVector(8,t,8)}static endSchema(e){return e.endObject()}static finishSchemaBuffer(e,t){e.finish(t)}static finishSizePrefixedSchemaBuffer(e,t){e.finish(t,void 0,!0)}static createSchema(e,t,r,i,n){return L.startSchema(e),L.addEndianness(e,t),L.addFields(e,r),L.addCustomMetadata(e,i),L.addFeatures(e,n),L.endSchema(e)}}t.Schema=L},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WideBufferBuilder=t.OffsetsBufferBuilder=t.BitmapBufferBuilder=t.DataBufferBuilder=t.BufferBuilder=void 0;const i=r(5),n=r(9),s=(e,t)=>(e*t+63&-64||64)/t;class o{constructor(e,t=1){this.buffer=e,this.stride=t,this.BYTES_PER_ELEMENT=e.BYTES_PER_ELEMENT,this.ArrayType=e.constructor,this._resize(this.length=e.length/t|0)}get byteLength(){return this.length*this.stride*this.BYTES_PER_ELEMENT|0}get reservedLength(){return this.buffer.length/this.stride}get reservedByteLength(){return this.buffer.byteLength}set(e,t){return this}append(e){return this.set(this.length,e)}reserve(e){if(e>0){this.length+=e;const t=this.stride,r=this.length*t,i=this.buffer.length;r>=i&&this._resize(s(0===i?1*r:2*r,this.BYTES_PER_ELEMENT))}return this}flush(e=this.length){e=s(e*this.stride,this.BYTES_PER_ELEMENT);const t=((e,t=0)=>e.length>=t?e.subarray(0,t):i.memcpy(new e.constructor(t),e,0))(this.buffer,e);return this.clear(),t}clear(){return this.length=0,this._resize(0),this}_resize(e){return this.buffer=i.memcpy(new this.ArrayType(e),this.buffer)}}t.BufferBuilder=o,o.prototype.offset=0;class a extends o{last(){return this.get(this.length-1)}get(e){return this.buffer[e]}set(e,t){return this.reserve(e-this.length+1),this.buffer[e*this.stride]=t,this}}t.DataBufferBuilder=a;t.BitmapBufferBuilder=class extends a{constructor(e=new Uint8Array(0)){super(e,1/8),this.numValid=0}get numInvalid(){return this.length-this.numValid}get(e){return this.buffer[e>>3]>>e%8&1}set(e,t){const{buffer:r}=this.reserve(e-this.length+1),i=e>>3,n=e%8,s=r[i]>>n&1;return t?0===s&&(r[i]|=1<<n,++this.numValid):1===s&&(r[i]&=~(1<<n),--this.numValid),this}clear(){return this.numValid=0,super.clear()}};t.OffsetsBufferBuilder=class extends a{constructor(e=new Int32Array(1)){super(e,1)}append(e){return this.set(this.length-1,e)}set(e,t){const r=this.length-1,i=this.reserve(e-r+1).buffer;return r<e++&&i.fill(i[r],r,e),i[e]=i[e-1]+t,this}flush(e=this.length-1){return e>this.length&&this.set(e-1,0),super.flush(e+1)}};t.WideBufferBuilder=class extends o{get ArrayType64(){return this._ArrayType64||(this._ArrayType64=this.buffer instanceof Int32Array?n.BigInt64Array:n.BigUint64Array)}set(e,t){switch(this.reserve(e-this.length+1),typeof t){case"bigint":this.buffer64[e]=t;break;case"number":this.buffer[e*this.stride]=t;break;default:this.buffer.set(t,e*this.stride)}return this}_resize(e){const t=super._resize(e),r=t.byteLength/(this.BYTES_PER_ELEMENT*this.stride);return n.BigIntAvailable&&(this.buffer64=new this.ArrayType64(t.buffer,t.byteOffset,r)),t}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncByteStream=t.ByteStream=t.AsyncByteQueue=void 0;const i=r(25),n=r(20),s=r(22),o=r(5),a=r(9);class c extends s.AsyncQueue{write(e){if((e=o.toUint8Array(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?n.decodeUtf8(this.toUint8Array(!0)):this.toUint8Array(!1).then(n.decodeUtf8)}toUint8Array(e=!1){return e?o.joinUint8Arrays(this._values)[0]:(async()=>{const e=[];let t=0;for await(const r of this)e.push(r),t+=r.byteLength;return o.joinUint8Arrays(e,t)[0]})()}}t.AsyncByteQueue=c;class u{constructor(e){e&&(this.source=new d(i.default.fromIterable(e)))}[Symbol.iterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}}t.ByteStream=u;class l{constructor(e){e instanceof l?this.source=e.source:e instanceof c?this.source=new h(i.default.fromAsyncIterable(e)):a.isReadableNodeStream(e)?this.source=new h(i.default.fromNodeStream(e)):a.isReadableDOMStream(e)?this.source=new h(i.default.fromDOMStream(e)):a.isFetchResponse(e)?this.source=new h(i.default.fromDOMStream(e.body)):a.isIterable(e)?this.source=new h(i.default.fromIterable(e)):(a.isPromise(e)||a.isAsyncIterable(e))&&(this.source=new h(i.default.fromAsyncIterable(e)))}[Symbol.asyncIterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}get closed(){return this.source.closed}cancel(e){return this.source.cancel(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}}t.AsyncByteStream=l;class d{constructor(e){this.source=e}cancel(e){this.return(e)}peek(e){return this.next(e,"peek").value}read(e){return this.next(e,"read").value}next(e,t="read"){return this.source.next({cmd:t,size:e})}throw(e){return Object.create(this.source.throw&&this.source.throw(e)||s.ITERATOR_DONE)}return(e){return Object.create(this.source.return&&this.source.return(e)||s.ITERATOR_DONE)}}class h{constructor(e){this.source=e,this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}async cancel(e){await this.return(e)}get closed(){return this._closedPromise}async read(e){return(await this.next(e,"read")).value}async peek(e){return(await this.next(e,"peek")).value}async next(e,t="read"){return await this.source.next({cmd:t,size:e})}async throw(e){const t=this.source.throw&&await this.source.throw(e)||s.ITERATOR_DONE;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)}async return(e){const t=this.source.return&&await this.source.return(e)||s.ITERATOR_DONE;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Chunked=void 0;const i=r(30),n=r(0),s=r(24),o=r(3);class a{constructor(e){this.chunks=e,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator()}next(){for(;this.chunkIndex<this.chunks.length;){const e=this.chunkIterator.next();if(!e.done)return e;++this.chunkIndex<this.chunks.length&&(this.chunkIterator=this.getChunkIterator())}return{done:!0,value:null}}getChunkIterator(){return this.chunks[this.chunkIndex][Symbol.iterator]()}[Symbol.iterator](){return this}}class c extends o.AbstractVector{constructor(e,t=[],r=function(e){const t=new Uint32Array((e||[]).length+1);let r=t[0]=0;const i=t.length;for(let n=0;++n<i;)t[n]=r+=e[n-1].length;return t}(t)){super(),this._nullCount=-1,this._type=e,this._chunks=t,this._chunkOffsets=r,this._length=r[r.length-1],this._numChildren=(this._type.children||[]).length}static flatten(...e){return s.selectChunkArgs(o.Vector,e)}static concat(...e){const t=c.flatten(...e);return new c(t[0].type,t)}get type(){return this._type}get length(){return this._length}get chunks(){return this._chunks}get typeId(){return this._type.typeId}get VectorName(){return`Chunked<${this._type}>`}get data(){return this._chunks[0]?this._chunks[0].data:null}get ArrayType(){return this._type.ArrayType}get numChildren(){return this._numChildren}get stride(){return this._chunks[0]?this._chunks[0].stride:1}get byteLength(){return this._chunks.reduce((e,t)=>e+t.byteLength,0)}get nullCount(){let e=this._nullCount;return e<0&&(this._nullCount=e=this._chunks.reduce((e,{nullCount:t})=>e+t,0)),e}get indices(){if(n.DataType.isDictionary(this._type)){if(!this._indices){const e=this._chunks;this._indices=1===e.length?e[0].indices:c.concat(...e.map(e=>e.indices))}return this._indices}return null}get dictionary(){return n.DataType.isDictionary(this._type)?this._chunks[this._chunks.length-1].data.dictionary:null}[Symbol.iterator](){return new a(this._chunks)}clone(e=this._chunks){return new c(this._type,e)}concat(...e){return this.clone(c.flatten(this,...e))}slice(e,t){return i.clampRange(this,e,t,this._sliceInternal)}getChildAt(e){if(e<0||e>=this._numChildren)return null;const t=this._children||(this._children=[]);let r,i,n;return(r=t[e])?r:(i=(this._type.children||[])[e])&&(n=this._chunks.map(t=>t.getChildAt(e)).filter(e=>null!=e),n.length>0)?t[e]=new c(i.type,n):null}search(e,t){const r=e,i=this._chunkOffsets;let n=i.length-1;if(r<0)return null;if(r>=i[n])return null;if(n<=1)return t?t(this,0,r):[0,r];let s=0,o=0,a=0;do{if(s+1===n)return t?t(this,s,r-o):[s,r-o];a=s+(n-s)/2|0,r>=i[a]?s=a:n=a}while(r<i[n]&&r>=(o=i[s]));return null}isValid(e){return!!this.search(e,this.isValidInternal)}get(e){return this.search(e,this.getInternal)}set(e,t){this.search(e,({chunks:e},r,i)=>e[r].set(i,t))}indexOf(e,t){return t&&"number"==typeof t?this.search(t,(t,r,i)=>this.indexOfInternal(t,r,i,e)):this.indexOfInternal(this,0,Math.max(0,t||0),e)}toArray(){const{chunks:e}=this,t=e.length;let r=this._type.ArrayType;if(t<=0)return new r(0);if(t<=1)return e[0].toArray();let i=0;const n=new Array(t);for(let r=-1;++r<t;)i+=(n[r]=e[r].toArray()).length;r!==n[0].constructor&&(r=n[0].constructor);const s=new r(i),o=r===Array?l:u;for(let e=-1,r=0;++e<t;)r=o(n[e],s,r);return s}getInternal({_chunks:e},t,r){return e[t].get(r)}isValidInternal({_chunks:e},t,r){return e[t].isValid(r)}indexOfInternal({_chunks:e},t,r,i){let n=t-1;const s=e.length;let o=r,a=0,c=-1;for(;++n<s;){if(~(c=e[n].indexOf(i,o)))return a+c;o=0,a+=e[n].length}return-1}_sliceInternal(e,t,r){const i=[],{chunks:n,_chunkOffsets:s}=e;for(let e=-1,o=n.length;++e<o;){const o=n[e],a=o.length,c=s[e];if(c>=r)break;if(t>=c+a)continue;if(c>=t&&c+a<=r){i.push(o);continue}const u=Math.max(0,t-c),l=Math.min(r-c,a);i.push(o.slice(u,l))}return e.clone(i)}}t.Chunked=c;const u=(e,t,r)=>(t.set(e,r),r+e.length),l=(e,t,r)=>{let i=r;for(let r=-1,n=e.length;++r<n;)t[i++]=e[r];return i}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.encodeUtf8=exports.decodeUtf8=void 0;const buffer_1=__webpack_require__(5),text_encoding_utf_8_1=__webpack_require__(85),_Buffer=eval("typeof Buffer === 'function' ? Buffer : null"),useNativeEncoders="function"==typeof TextDecoder&&"function"==typeof TextEncoder;exports.decodeUtf8=(e=>{if(useNativeEncoders||!_Buffer){const t=new e("utf-8");return e=>t.decode(e)}return e=>{const{buffer:t,byteOffset:r,length:i}=buffer_1.toUint8Array(e);return _Buffer.from(t,r,i).toString()}})("undefined"!=typeof TextDecoder?TextDecoder:text_encoding_utf_8_1.TextDecoder),exports.encodeUtf8=(e=>{if(useNativeEncoders||!_Buffer){const t=new e;return e=>t.encode(e)}return(e="")=>buffer_1.toUint8Array(_Buffer.from(e,"utf8"))})("undefined"!=typeof TextEncoder?TextEncoder:text_encoding_utf_8_1.TextEncoder)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldNode=t.BufferRegion=t.DictionaryBatch=t.RecordBatch=t.Message=void 0;const i=r(14),n=r(16),s=r(34),o=r(6),a=r(5),c=r(1),u=r(90),l=r(91);var d=i.flatbuffers.Long,h=i.flatbuffers.Builder,f=i.flatbuffers.ByteBuffer;const p=r(0);class y{constructor(e,t,r,i){this._version=t,this._headerType=r,this.body=new Uint8Array(0),i&&(this._createHeader=()=>i),this._bodyLength="number"==typeof e?e:e.low}static fromJSON(e,t){const r=new y(0,c.MetadataVersion.V4,t);return r._createHeader=function(e,t){return()=>{switch(t){case c.MessageHeader.Schema:return o.Schema.fromJSON(e);case c.MessageHeader.RecordBatch:return b.fromJSON(e);case c.MessageHeader.DictionaryBatch:return m.fromJSON(e)}throw new Error(`Unrecognized Message type: { name: ${c.MessageHeader[t]}, type: ${t} }`)}}(e,t),r}static decode(e){e=new f(a.toUint8Array(e));const t=s.Message.getRootAsMessage(e),r=t.bodyLength(),i=t.version(),u=t.headerType(),l=new y(r,i,u);return l._createHeader=function(e,t){return()=>{switch(t){case c.MessageHeader.Schema:return o.Schema.decode(e.header(new n.Schema));case c.MessageHeader.RecordBatch:return b.decode(e.header(new s.RecordBatch),e.version());case c.MessageHeader.DictionaryBatch:return m.decode(e.header(new s.DictionaryBatch),e.version())}throw new Error(`Unrecognized Message type: { name: ${c.MessageHeader[t]}, type: ${t} }`)}}(t,u),l}static encode(e){const t=new h;let r=-1;return e.isSchema()?r=o.Schema.encode(t,e.header()):e.isRecordBatch()?r=b.encode(t,e.header()):e.isDictionaryBatch()&&(r=m.encode(t,e.header())),s.Message.startMessage(t),s.Message.addVersion(t,c.MetadataVersion.V4),s.Message.addHeader(t,r),s.Message.addHeaderType(t,e.headerType),s.Message.addBodyLength(t,new d(e.bodyLength,0)),s.Message.finishMessageBuffer(t,s.Message.endMessage(t)),t.asUint8Array()}static from(e,t=0){if(e instanceof o.Schema)return new y(0,c.MetadataVersion.V4,c.MessageHeader.Schema,e);if(e instanceof b)return new y(t,c.MetadataVersion.V4,c.MessageHeader.RecordBatch,e);if(e instanceof m)return new y(t,c.MetadataVersion.V4,c.MessageHeader.DictionaryBatch,e);throw new Error("Unrecognized Message header: "+e)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===c.MessageHeader.Schema}isRecordBatch(){return this.headerType===c.MessageHeader.RecordBatch}isDictionaryBatch(){return this.headerType===c.MessageHeader.DictionaryBatch}}t.Message=y;class b{constructor(e,t,r){this._nodes=t,this._buffers=r,this._length="number"==typeof e?e:e.low}get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}}t.RecordBatch=b;class m{constructor(e,t,r=!1){this._data=e,this._isDelta=r,this._id="number"==typeof t?t:t.low}get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}}t.DictionaryBatch=m;class g{constructor(e,t){this.offset="number"==typeof e?e:e.low,this.length="number"==typeof t?t:t.low}}t.BufferRegion=g;class _{constructor(e,t){this.length="number"==typeof e?e:e.low,this.nullCount="number"==typeof t?t:t.low}}function B(e,t){const r=[];for(let i,n=-1,s=-1,a=e.childrenLength();++n<a;)(i=e.children(n))&&(r[++s]=o.Field.decode(i,t));return r}function v(e){const t=new Map;if(e)for(let r,i,n=-1,s=0|e.customMetadataLength();++n<s;)(r=e.customMetadata(n))&&null!=(i=r.key())&&t.set(i,r.value());return t}function T(e){return new p.Int(e.isSigned(),e.bitWidth())}function I(e,t){const r=e.typeType();switch(r){case n.Type.NONE:case n.Type.Null:return new p.Null;case n.Type.Binary:return new p.Binary;case n.Type.Utf8:return new p.Utf8;case n.Type.Bool:return new p.Bool;case n.Type.List:return new p.List((t||[])[0]);case n.Type.Struct_:return new p.Struct(t||[])}switch(r){case n.Type.Int:{const t=e.type(new n.Int);return new p.Int(t.isSigned(),t.bitWidth())}case n.Type.FloatingPoint:{const t=e.type(new n.FloatingPoint);return new p.Float(t.precision())}case n.Type.Decimal:{const t=e.type(new n.Decimal);return new p.Decimal(t.scale(),t.precision())}case n.Type.Date:{const t=e.type(new n.Date);return new p.Date_(t.unit())}case n.Type.Time:{const t=e.type(new n.Time);return new p.Time(t.unit(),t.bitWidth())}case n.Type.Timestamp:{const t=e.type(new n.Timestamp);return new p.Timestamp(t.unit(),t.timezone())}case n.Type.Interval:{const t=e.type(new n.Interval);return new p.Interval(t.unit())}case n.Type.Union:{const r=e.type(new n.Union);return new p.Union(r.mode(),r.typeIdsArray()||[],t||[])}case n.Type.FixedSizeBinary:{const t=e.type(new n.FixedSizeBinary);return new p.FixedSizeBinary(t.byteWidth())}case n.Type.FixedSizeList:{const r=e.type(new n.FixedSizeList);return new p.FixedSizeList(r.listSize(),(t||[])[0])}case n.Type.Map:{const r=e.type(new n.Map);return new p.Map_((t||[])[0],r.keysSorted())}}throw new Error(`Unrecognized type: "${n.Type[r]}" (${r})`)}t.FieldNode=_,o.Field.encode=function(e,t){let r=-1,i=-1,s=-1;const a=t.type;let c=t.typeId;p.DataType.isDictionary(a)?(c=a.dictionary.typeId,s=u.instance.visit(a,e),i=u.instance.visit(a.dictionary,e)):i=u.instance.visit(a,e);const l=(a.children||[]).map(t=>o.Field.encode(e,t)),d=n.Field.createChildrenVector(e,l),h=t.metadata&&t.metadata.size>0?n.Field.createCustomMetadataVector(e,[...t.metadata].map(([t,r])=>{const i=e.createString(""+t),s=e.createString(""+r);return n.KeyValue.startKeyValue(e),n.KeyValue.addKey(e,i),n.KeyValue.addValue(e,s),n.KeyValue.endKeyValue(e)})):-1;t.name&&(r=e.createString(t.name));n.Field.startField(e),n.Field.addType(e,i),n.Field.addTypeType(e,c),n.Field.addChildren(e,d),n.Field.addNullable(e,!!t.nullable),-1!==r&&n.Field.addName(e,r);-1!==s&&n.Field.addDictionary(e,s);-1!==h&&n.Field.addCustomMetadata(e,h);return n.Field.endField(e)},o.Field.decode=function(e,t){let r,i,n,s,a,c;t&&(c=e.dictionary())?t.has(r=c.id().low)?(s=(s=c.indexType())?T(s):new p.Int32,a=new p.Dictionary(t.get(r),s,r,c.isOrdered()),i=new o.Field(e.name(),a,e.nullable(),v(e))):(s=(s=c.indexType())?T(s):new p.Int32,t.set(r,n=I(e,B(e,t))),a=new p.Dictionary(n,s,r,c.isOrdered()),i=new o.Field(e.name(),a,e.nullable(),v(e))):(n=I(e,B(e,t)),i=new o.Field(e.name(),n,e.nullable(),v(e)));return i||null},o.Field.fromJSON=l.fieldFromJSON,o.Schema.encode=function(e,t){const r=t.fields.map(t=>o.Field.encode(e,t));n.Schema.startFieldsVector(e,r.length);const i=n.Schema.createFieldsVector(e,r),s=t.metadata&&t.metadata.size>0?n.Schema.createCustomMetadataVector(e,[...t.metadata].map(([t,r])=>{const i=e.createString(""+t),s=e.createString(""+r);return n.KeyValue.startKeyValue(e),n.KeyValue.addKey(e,i),n.KeyValue.addValue(e,s),n.KeyValue.endKeyValue(e)})):-1;n.Schema.startSchema(e),n.Schema.addFields(e,i),n.Schema.addEndianness(e,w?n.Endianness.Little:n.Endianness.Big),-1!==s&&n.Schema.addCustomMetadata(e,s);return n.Schema.endSchema(e)},o.Schema.decode=function(e,t=new Map){const r=function(e,t){const r=[];for(let i,n=-1,s=-1,a=e.fieldsLength();++n<a;)(i=e.fields(n))&&(r[++s]=o.Field.decode(i,t));return r}(e,t);return new o.Schema(r,v(e),t)},o.Schema.fromJSON=l.schemaFromJSON,b.encode=function(e,t){const r=t.nodes||[],i=t.buffers||[];s.RecordBatch.startNodesVector(e,r.length),r.slice().reverse().forEach(t=>_.encode(e,t));const n=e.endVector();s.RecordBatch.startBuffersVector(e,i.length),i.slice().reverse().forEach(t=>g.encode(e,t));const o=e.endVector();return s.RecordBatch.startRecordBatch(e),s.RecordBatch.addLength(e,new d(t.length,0)),s.RecordBatch.addNodes(e,n),s.RecordBatch.addBuffers(e,o),s.RecordBatch.endRecordBatch(e)},b.decode=function(e,t=c.MetadataVersion.V4){return new b(e.length(),function(e){const t=[];for(let r,i=-1,n=-1,s=e.nodesLength();++i<s;)(r=e.nodes(i))&&(t[++n]=_.decode(r));return t}(e),function(e,t){const r=[];for(let i,n=-1,s=-1,o=e.buffersLength();++n<o;)(i=e.buffers(n))&&(t<c.MetadataVersion.V4&&(i.bb_pos+=8*(n+1)),r[++s]=g.decode(i));return r}(e,t))},b.fromJSON=l.recordBatchFromJSON,m.encode=function(e,t){const r=b.encode(e,t.data);return s.DictionaryBatch.startDictionaryBatch(e),s.DictionaryBatch.addId(e,new d(t.id,0)),s.DictionaryBatch.addIsDelta(e,t.isDelta),s.DictionaryBatch.addData(e,r),s.DictionaryBatch.endDictionaryBatch(e)},m.decode=function(e,t=c.MetadataVersion.V4){return new m(b.decode(e.data(),t),e.id(),e.isDelta())},m.fromJSON=l.dictionaryBatchFromJSON,_.encode=function(e,t){return s.FieldNode.createFieldNode(e,new d(t.length,0),new d(t.nullCount,0))},_.decode=function(e){return new _(e.length(),e.nullCount())},g.encode=function(e,t){return n.Buffer.createBuffer(e,new d(t.offset,0),new d(t.length,0))},g.decode=function(e){return new g(e.offset(),e.length())};const w=function(){const e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncQueue=t.ReadableInterop=t.ArrowJSON=t.ITERATOR_DONE=void 0;const i=r(25);t.ITERATOR_DONE=Object.freeze({done:!0,value:void 0});t.ArrowJSON=class{constructor(e){this._json=e}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}};class n{tee(){return this._getDOMStream().tee()}pipe(e,t){return this._getNodeStream().pipe(e,t)}pipeTo(e,t){return this._getDOMStream().pipeTo(e,t)}pipeThrough(e,t){return this._getDOMStream().pipeThrough(e,t)}_getDOMStream(){return this._DOMStream||(this._DOMStream=this.toDOMStream())}_getNodeStream(){return this._nodeStream||(this._nodeStream=this.toNodeStream())}}t.ReadableInterop=n;class s extends n{constructor(){super(),this._values=[],this.resolvers=[],this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}get closed(){return this._closedPromise}async cancel(e){await this.return(e)}write(e){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(e):this.resolvers.shift().resolve({done:!1,value:e}))}abort(e){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:e}:this.resolvers.shift().reject({done:!0,value:e}))}close(){if(this._closedPromiseResolve){const{resolvers:e}=this;for(;e.length>0;)e.shift().resolve(t.ITERATOR_DONE);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return i.default.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return i.default.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}async throw(e){return await this.abort(e),t.ITERATOR_DONE}async return(e){return await this.close(),t.ITERATOR_DONE}async read(e){return(await this.next(e,"read")).value}async peek(e){return(await this.next(e,"peek")).value}next(...e){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise((e,t)=>{this.resolvers.push({resolve:e,reject:t})}):Promise.resolve(t.ITERATOR_DONE)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error(this+" is closed")}}t.AsyncQueue=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Column=void 0;const i=r(6),n=r(3),s=r(19);class o extends s.Chunked{constructor(e,t=[],r){if(t=s.Chunked.flatten(...t),super(e.type,t,r),this._field=e,1===t.length&&!(this instanceof a))return new a(e,t[0],this._chunkOffsets)}static new(...e){let[t,r,...a]=e;"string"==typeof t||t instanceof i.Field||(r=t,t="");const c=s.Chunked.flatten(Array.isArray(r)?[...r,...a]:r instanceof n.Vector?[r,...a]:[n.Vector.new(r,...a)]);if("string"==typeof t){const e=c[0].data.type;t=new i.Field(t,e,!0)}else!t.nullable&&c.some(({nullCount:e})=>e>0)&&(t=t.clone({nullable:!0}));return new o(t,c)}get field(){return this._field}get name(){return this._field.name}get nullable(){return this._field.nullable}get metadata(){return this._field.metadata}clone(e=this._chunks){return new o(this._field,e)}getChildAt(e){if(e<0||e>=this.numChildren)return null;const t=this._children||(this._children=[]);let r,i,n;return(r=t[e])?r:(i=(this.type.children||[])[e])&&(n=this._chunks.map(t=>t.getChildAt(e)).filter(e=>null!=e),n.length>0)?t[e]=new o(i,n):null}}t.Column=o;class a extends o{constructor(e,t,r){super(e,[t],r),this._chunk=t}search(e,t){return t?t(this,0,e):[0,e]}isValid(e){return this._chunk.isValid(e)}get(e){return this._chunk.get(e)}set(e,t){this._chunk.set(e,t)}indexOf(e,t){return this._chunk.indexOf(e,t)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectColumnChildrenArgs=t.selectVectorChildrenArgs=t.selectChunkArgs=t.selectFieldArgs=t.selectColumnArgs=t.selectArgs=void 0;const i=r(10),n=r(6),s=r(23),o=r(3),a=r(0),c=r(19),u=Array.isArray;function l(e,t,r,i){let n,s=i,o=-1;const a=t.length;for(;++o<a;)u(n=t[o])?s=l(e,n,r,s).length:n instanceof e&&(r[s++]=n);return r}t.selectArgs=(e,t)=>l(e,t,[],0),t.selectColumnArgs=e=>{const[t,r]=h(e,[[],[]]);return r.map((e,r)=>e instanceof s.Column?s.Column.new(e.field.clone(t[r]),e):e instanceof o.Vector?s.Column.new(t[r],e):s.Column.new(t[r],[]))},t.selectFieldArgs=e=>h(e,[[],[]]),t.selectChunkArgs=(e,t)=>function e(t,r,i,n){let s,o=n,a=-1;const l=r.length;for(;++a<l;)u(s=r[a])?o=e(t,s,i,o).length:s instanceof c.Chunked?o=e(t,s.chunks,i,o).length:s instanceof t&&(i[o++]=s);return i}(e,t,[],0),t.selectVectorChildrenArgs=(e,t)=>function e(t,r,i,n){let s,a=n,c=-1;const d=r.length;for(;++c<d;)u(s=r[c])?a=e(t,s,i,a).length:s instanceof t?a=l(o.Vector,s.schema.fields.map((e,t)=>s.getChildAt(t)),i,a).length:s instanceof o.Vector&&(i[a++]=s);return i}(e,t,[],0),t.selectColumnChildrenArgs=(e,t)=>function e(t,r,i,n){let o,a=n,c=-1;const d=r.length;for(;++c<d;)u(o=r[c])?a=e(t,o,i,a).length:o instanceof t?a=l(s.Column,o.schema.fields.map((e,t)=>s.Column.new(e,o.getChildAt(t))),i,a).length:o instanceof s.Column&&(i[a++]=o);return i}(e,t,[],0);const d=(e,[t,r],i)=>(e[0][i]=t,e[1][i]=r,e);function h(e,t){let r,c;switch(c=e.length){case 0:return t;case 1:if(r=t[0],!e[0])return t;if(u(e[0]))return h(e[0],t);e[0]instanceof i.Data||e[0]instanceof o.Vector||e[0]instanceof a.DataType||([r,e]=Object.entries(e[0]).reduce(d,t));break;default:u(r=e[c-1])?e=u(e[0])?e[0]:e.slice(0,c-1):(e=u(e[0])?e[0]:e,r=[])}let l=-1,f=-1,p=-1;const y=e.length;let b,m;const[g,_]=t;for(;++p<y;)m=e[p],m instanceof s.Column&&(_[++f]=m)?g[++l]=m.field.clone(r[p],m.type,!0):(({[p]:b=p}=r),m instanceof a.DataType&&(_[++f]=m)?g[++l]=n.Field.new(b,m,!0):m&&m.type&&(_[++f]=m)&&(m instanceof i.Data&&(_[f]=m=o.Vector.new(m)),g[++l]=n.Field.new(b,m.type,!0)));return t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(5);t.default={fromIterable:e=>n(function*(e){let t,r,n,s,o=!1,a=[],c=0;({cmd:n,size:s}=yield null);const u=i.toUint8ArrayIterator(e)[Symbol.iterator]();try{do{if(({done:t,value:r}=isNaN(s-c)?u.next(void 0):u.next(s-c)),!t&&r.byteLength>0&&(a.push(r),c+=r.byteLength),t||s<=c)do{({cmd:n,size:s}=yield"peek"===n?i.joinUint8Arrays(a,s)[0]:([r,a,c]=i.joinUint8Arrays(a,s),r))}while(s<c)}while(!t)}catch(e){(o=!0)&&"function"==typeof u.throw&&u.throw(e)}finally{!1===o&&"function"==typeof u.return&&u.return(null)}return null}(e)),fromAsyncIterable:e=>n(async function*(e){let t,r,n,s,o=!1,a=[],c=0;({cmd:n,size:s}=yield null);const u=i.toUint8ArrayAsyncIterator(e)[Symbol.asyncIterator]();try{do{if(({done:t,value:r}=isNaN(s-c)?await u.next(void 0):await u.next(s-c)),!t&&r.byteLength>0&&(a.push(r),c+=r.byteLength),t||s<=c)do{({cmd:n,size:s}=yield"peek"===n?i.joinUint8Arrays(a,s)[0]:([r,a,c]=i.joinUint8Arrays(a,s),r))}while(s<c)}while(!t)}catch(e){(o=!0)&&"function"==typeof u.throw&&await u.throw(e)}finally{!1===o&&"function"==typeof u.return&&await u.return(new Uint8Array(0))}return null}(e)),fromDOMStream:e=>n(async function*(e){let t,r,n,o=!1,a=!1,c=[],u=0;({cmd:r,size:n}=yield null);const l=new s(e);try{do{if(({done:o,value:t}=isNaN(n-u)?await l.read(void 0):await l.read(n-u)),!o&&t.byteLength>0&&(c.push(i.toUint8Array(t)),u+=t.byteLength),o||n<=u)do{({cmd:r,size:n}=yield"peek"===r?i.joinUint8Arrays(c,n)[0]:([t,c,u]=i.joinUint8Arrays(c,n),t))}while(n<u)}while(!o)}catch(e){(a=!0)&&await l.cancel(e)}finally{!1===a?await l.cancel():e.locked&&l.releaseLock()}return null}(e)),fromNodeStream:e=>n(async function*(e){const t=[];let r,n,s,a="error",c=!1,u=null,l=0,d=[];if(({cmd:r,size:n}=yield null),e.isTTY)return yield new Uint8Array(0),null;try{t[0]=o(e,"end"),t[1]=o(e,"error");do{if(t[2]=o(e,"readable"),[a,u]=await Promise.race(t.map(e=>e[2])),"error"===a)break;if((c="end"===a)||(isFinite(n-l)?(s=i.toUint8Array(e.read(n-l)),s.byteLength<n-l&&(s=i.toUint8Array(e.read(void 0)))):s=i.toUint8Array(e.read(void 0)),s.byteLength>0&&(d.push(s),l+=s.byteLength)),c||n<=l)do{({cmd:r,size:n}=yield"peek"===r?i.joinUint8Arrays(d,n)[0]:([s,d,l]=i.joinUint8Arrays(d,n),s))}while(n<l)}while(!c)}finally{await function(t,r){return s=d=null,new Promise((i,n)=>{for(const[r,i]of t)e.off(r,i);try{const t=e.destroy;t&&t.call(e,r),r=void 0}catch(e){r=e||r}finally{null!=r?n(r):i()}})}(t,"error"===a?u:null)}return null}(e)),toDOMStream(e,t){throw new Error('"toDOMStream" not available in this environment')},toNodeStream(e,t){throw new Error('"toNodeStream" not available in this environment')}};const n=e=>(e.next(),e);class s{constructor(e){this.source=e,this.byobReader=null,this.defaultReader=null;try{this.supportsBYOB=!!(this.reader=this.getBYOBReader())}catch(e){this.supportsBYOB=!(this.reader=this.getDefaultReader())}}get closed(){return this.reader?this.reader.closed.catch(()=>{}):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=this.byobReader=this.defaultReader=null}async cancel(e){const{reader:t,source:r}=this;t&&await t.cancel(e).catch(()=>{}),r&&r.locked&&this.releaseLock()}async read(e){if(0===e)return{done:null==this.reader,value:new Uint8Array(0)};const t=this.supportsBYOB&&"number"==typeof e?await this.readFromBYOBReader(e):await this.getDefaultReader().read();return!t.done&&(t.value=i.toUint8Array(t)),t}getDefaultReader(){return this.byobReader&&this.releaseLock(),this.defaultReader||(this.defaultReader=this.source.getReader(),this.defaultReader.closed.catch(()=>{})),this.reader=this.defaultReader}getBYOBReader(){return this.defaultReader&&this.releaseLock(),this.byobReader||(this.byobReader=this.source.getReader({mode:"byob"}),this.byobReader.closed.catch(()=>{})),this.reader=this.byobReader}async readFromBYOBReader(e){return await async function e(t,r,i,n){if(i>=n)return{done:!1,value:new Uint8Array(r,0,n)};const{done:s,value:o}=await t.read(new Uint8Array(r,i,n-i));if((i+=o.byteLength)<n&&!s)return await e(t,o.buffer,i,n);return{done:s,value:new Uint8Array(o.buffer,0,i)}}(this.getBYOBReader(),new ArrayBuffer(e),0,e)}}const o=(e,t)=>{const r=e=>i([t,e]);let i;return[t,r,new Promise(n=>(i=n)&&e.once(t,r))]}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.float64ToUint16=t.uint16ToFloat64=void 0;const i=new Float64Array(1),n=new Uint32Array(i.buffer);t.uint16ToFloat64=function(e){const t=(31744&e)>>10,r=(1023&e)/1024,i=(-1)**((32768&e)>>15);switch(t){case 31:return i*(r?NaN:1/0);case 0:return i*(r?6103515625e-14*r:0)}return i*2**(t-15)*(1+r)},t.float64ToUint16=function(e){if(e!=e)return 32256;i[0]=e;const t=(2147483648&n[1])>>16&65535;let r=2146435072&n[1],s=0;return r>=1089470464?n[0]>0?r=31744:(r=(2080374784&r)>>16,s=(1048575&n[1])>>10):r<=1056964608?(s=1048576+(1048575&n[1]),s=1048576+(s<<(r>>20)-998)>>21,r=0):(r=r-1056964608>>10,s=512+(1048575&n[1])>>10),t|r|65535&s}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BN=t.bignumToBigInt=t.bignumToString=t.isArrowBigNumSymbol=void 0;const i=r(5),n=r(9);function s(e,...t){return 0===t.length?Object.setPrototypeOf(i.toArrayBufferView(this.TypedArray,e),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(e,...t),this.constructor.prototype)}function o(...e){return s.apply(this,e)}function a(...e){return s.apply(this,e)}function c(...e){return s.apply(this,e)}function u(e){const{buffer:t,byteOffset:r,length:i,signed:n}=e,s=new Int32Array(t,r,i);let o=0,a=0;const c=s.length;let u,l;for(;a<c;)l=s[a++],u=s[a++],n||(u>>>=0),o+=(l>>>0)+u*a**32;return o}function l(e){let t="";const r=new Uint32Array(2);let i=new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2);const n=new Uint32Array((i=new Uint16Array(i).reverse()).buffer);let s=-1;const o=i.length-1;do{for(r[0]=i[s=0];s<o;)i[s++]=r[1]=r[0]/10,r[0]=(r[0]-10*r[1]<<16)+i[s];i[s]=r[1]=r[0]/10,r[0]=r[0]-10*r[1],t=`${r[0]}${t}`}while(n[0]||n[1]||n[2]||n[3]);return t||"0"}t.isArrowBigNumSymbol=Symbol.for("isArrowBigNum"),s.prototype[t.isArrowBigNumSymbol]=!0,s.prototype.toJSON=function(){return`"${t.bignumToString(this)}"`},s.prototype.valueOf=function(){return u(this)},s.prototype.toString=function(){return t.bignumToString(this)},s.prototype[Symbol.toPrimitive]=function(e="default"){switch(e){case"number":return u(this);case"string":return t.bignumToString(this);case"default":return t.bignumToBigInt(this)}return t.bignumToString(this)},Object.setPrototypeOf(o.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(a.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(c.prototype,Object.create(Uint32Array.prototype)),Object.assign(o.prototype,s.prototype,{constructor:o,signed:!0,TypedArray:Int32Array,BigIntArray:n.BigInt64Array}),Object.assign(a.prototype,s.prototype,{constructor:a,signed:!1,TypedArray:Uint32Array,BigIntArray:n.BigUint64Array}),Object.assign(c.prototype,s.prototype,{constructor:c,signed:!0,TypedArray:Uint32Array,BigIntArray:n.BigUint64Array}),n.BigIntAvailable?(t.bignumToBigInt=e=>8===e.byteLength?new e.BigIntArray(e.buffer,e.byteOffset,1)[0]:l(e),t.bignumToString=e=>8===e.byteLength?""+new e.BigIntArray(e.buffer,e.byteOffset,1)[0]:l(e)):(t.bignumToString=l,t.bignumToBigInt=t.bignumToString);class d{static new(e,t){switch(t){case!0:return new o(e);case!1:return new a(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case n.BigInt64Array:return new o(e)}return 16===e.byteLength?new c(e):new a(e)}static signed(e){return new o(e)}static unsigned(e){return new a(e)}static decimal(e){return new c(e)}constructor(e,t){return d.new(e,t)}}t.BN=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncRecordBatchFileReader=t.RecordBatchFileReader=t.AsyncRecordBatchStreamReader=t.RecordBatchStreamReader=t.RecordBatchReader=void 0;const i=r(3),n=r(1),s=r(60),o=r(25),a=r(18),c=r(61),u=r(89),l=r(15),d=r(22),h=r(38),f=r(9);class p extends d.ReadableInterop{constructor(e){super(),this._impl=e}get closed(){return this._impl.closed}get schema(){return this._impl.schema}get autoDestroy(){return this._impl.autoDestroy}get dictionaries(){return this._impl.dictionaries}get numDictionaries(){return this._impl.numDictionaries}get numRecordBatches(){return this._impl.numRecordBatches}get footer(){return this._impl.isFile()?this._impl.footer:null}isSync(){return this._impl.isSync()}isAsync(){return this._impl.isAsync()}isFile(){return this._impl.isFile()}isStream(){return this._impl.isStream()}next(){return this._impl.next()}throw(e){return this._impl.throw(e)}return(e){return this._impl.return(e)}cancel(){return this._impl.cancel()}reset(e){return this._impl.reset(e),this._DOMStream=void 0,this._nodeStream=void 0,this}open(e){const t=this._impl.open(e);return f.isPromise(t)?t.then(()=>this):this}readRecordBatch(e){return this._impl.isFile()?this._impl.readRecordBatch(e):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return o.default.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return o.default.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,t){throw new Error('"throughDOM" not available in this environment')}static from(e){return e instanceof p?e:f.isArrowJSON(e)?function(e){return new y(new w(e))}(e):f.isFileHandle(e)?async function(e){const{size:t}=await e.stat(),r=new c.AsyncRandomAccessFile(e,t);if(t>=h.magicX2AndPadding&&h.checkForMagicArrowString(await r.readAt(0,h.magicLength+7&-8)))return new g(new I(r));return new b(new v(r))}(e):f.isPromise(e)?(async()=>await p.from(await e))():f.isFetchResponse(e)||f.isReadableDOMStream(e)||f.isReadableNodeStream(e)||f.isAsyncIterable(e)?async function(e){const t=await e.peek(h.magicLength+7&-8);return t&&t.byteLength>=4?h.checkForMagicArrowString(t)?new m(new T(await e.read())):new b(new v(e)):new b(new v(async function*(){}()))}(new a.AsyncByteStream(e)):function(e){const t=e.peek(h.magicLength+7&-8);return t&&t.byteLength>=4?h.checkForMagicArrowString(t)?new m(new T(e.read())):new y(new B(e)):new y(new B(function*(){}()))}(new a.ByteStream(e))}static readAll(e){return e instanceof p?e.isSync()?O(e):A(e):f.isArrowJSON(e)||ArrayBuffer.isView(e)||f.isIterable(e)||f.isIteratorResult(e)?O(e):A(e)}}t.RecordBatchReader=p;class y extends p{constructor(e){super(e),this._impl=e}[Symbol.iterator](){return this._impl[Symbol.iterator]()}async*[Symbol.asyncIterator](){yield*this[Symbol.iterator]()}}t.RecordBatchStreamReader=y;class b extends p{constructor(e){super(e),this._impl=e}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}}t.AsyncRecordBatchStreamReader=b;class m extends y{constructor(e){super(e),this._impl=e}}t.RecordBatchFileReader=m;class g extends b{constructor(e){super(e),this._impl=e}}t.AsyncRecordBatchFileReader=g;class _{constructor(e=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=e}get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(e){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=e,this.dictionaries=new Map,this}_loadRecordBatch(e,t){return new l.RecordBatch(this.schema,e.length,this._loadVectors(e,t,this.schema.fields))}_loadDictionaryBatch(e,t){const{id:r,isDelta:n,data:s}=e,{dictionaries:o,schema:a}=this,c=o.get(r);if(n||!c){const e=a.dictionaries.get(r);return c&&n?c.concat(i.Vector.new(this._loadVectors(s,t,[e])[0])):i.Vector.new(this._loadVectors(s,t,[e])[0])}return c}_loadVectors(e,t,r){return new u.VectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(r)}}class B extends _{constructor(e,t){super(t),this._reader=f.isArrowJSON(e)?new h.JSONMessageReader(this._handle=e):new h.MessageReader(this._handle=e)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(e){return this.closed||(this.autoDestroy=S(this,e),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):d.ITERATOR_DONE}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):d.ITERATOR_DONE}next(){if(this.closed)return d.ITERATOR_DONE;let e;const{_reader:t}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else{if(e.isRecordBatch()){this._recordBatchIndex++;const r=e.header(),i=t.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(r,i)}}if(e.isDictionaryBatch()){this._dictionaryIndex++;const r=e.header(),i=t.readMessageBody(e.bodyLength),n=this._loadDictionaryBatch(r,i);this.dictionaries.set(r.id,n)}}return this.schema&&0===this._recordBatchIndex?(this._recordBatchIndex++,{done:!1,value:new l._InternalEmptyPlaceholderRecordBatch(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}}class v extends _{constructor(e,t){super(t),this._reader=new h.AsyncMessageReader(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}async cancel(){!this.closed&&(this.closed=!0)&&(await this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}async open(e){return this.closed||(this.autoDestroy=S(this,e),this.schema||(this.schema=await this._reader.readSchema())||await this.cancel()),this}async throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?await this.reset()._reader.throw(e):d.ITERATOR_DONE}async return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?await this.reset()._reader.return(e):d.ITERATOR_DONE}async next(){if(this.closed)return d.ITERATOR_DONE;let e;const{_reader:t}=this;for(;e=await this._readNextMessageAndValidate();)if(e.isSchema())await this.reset(e.header());else{if(e.isRecordBatch()){this._recordBatchIndex++;const r=e.header(),i=await t.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(r,i)}}if(e.isDictionaryBatch()){this._dictionaryIndex++;const r=e.header(),i=await t.readMessageBody(e.bodyLength),n=this._loadDictionaryBatch(r,i);this.dictionaries.set(r.id,n)}}return this.schema&&0===this._recordBatchIndex?(this._recordBatchIndex++,{done:!1,value:new l._InternalEmptyPlaceholderRecordBatch(this.schema)}):await this.return()}async _readNextMessageAndValidate(e){return await this._reader.readMessage(e)}}class T extends B{constructor(e,t){super(e instanceof c.RandomAccessFile?e:new c.RandomAccessFile(e),t)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(const e of this._footer.dictionaryBatches())e&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){if(this.closed)return null;this._footer||this.open();const t=this._footer&&this._footer.getRecordBatch(e);if(t&&this._handle.seek(t.offset)){const e=this._reader.readMessage(n.MessageHeader.RecordBatch);if(e&&e.isRecordBatch()){const t=e.header(),r=this._reader.readMessageBody(e.bodyLength);return this._loadRecordBatch(t,r)}}return null}_readDictionaryBatch(e){const t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&this._handle.seek(t.offset)){const e=this._reader.readMessage(n.MessageHeader.DictionaryBatch);if(e&&e.isDictionaryBatch()){const t=e.header(),r=this._reader.readMessageBody(e.bodyLength),i=this._loadDictionaryBatch(t,r);this.dictionaries.set(t.id,i)}}}_readFooter(){const{_handle:e}=this,t=e.size-h.magicAndPadding,r=e.readInt32(t),i=e.readAt(t-r,r);return s.Footer.decode(i)}_readNextMessageAndValidate(e){if(this._footer||this.open(),this._footer&&this._recordBatchIndex<this.numRecordBatches){const t=this._footer&&this._footer.getRecordBatch(this._recordBatchIndex);if(t&&this._handle.seek(t.offset))return this._reader.readMessage(e)}return null}}class I extends v{constructor(e,...t){const r="number"!=typeof t[0]?t.shift():void 0,i=t[0]instanceof Map?t.shift():void 0;super(e instanceof c.AsyncRandomAccessFile?e:new c.AsyncRandomAccessFile(e,r),i)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isFile(){return!0}isAsync(){return!0}async open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=await this._readFooter()).schema;for(const e of this._footer.dictionaryBatches())e&&await this._readDictionaryBatch(this._dictionaryIndex++)}return await super.open(e)}async readRecordBatch(e){if(this.closed)return null;this._footer||await this.open();const t=this._footer&&this._footer.getRecordBatch(e);if(t&&await this._handle.seek(t.offset)){const e=await this._reader.readMessage(n.MessageHeader.RecordBatch);if(e&&e.isRecordBatch()){const t=e.header(),r=await this._reader.readMessageBody(e.bodyLength);return this._loadRecordBatch(t,r)}}return null}async _readDictionaryBatch(e){const t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&await this._handle.seek(t.offset)){const e=await this._reader.readMessage(n.MessageHeader.DictionaryBatch);if(e&&e.isDictionaryBatch()){const t=e.header(),r=await this._reader.readMessageBody(e.bodyLength),i=this._loadDictionaryBatch(t,r);this.dictionaries.set(t.id,i)}}}async _readFooter(){const{_handle:e}=this;e._pending&&await e._pending;const t=e.size-h.magicAndPadding,r=await e.readInt32(t),i=await e.readAt(t-r,r);return s.Footer.decode(i)}async _readNextMessageAndValidate(e){if(this._footer||await this.open(),this._footer&&this._recordBatchIndex<this.numRecordBatches){const t=this._footer.getRecordBatch(this._recordBatchIndex);if(t&&await this._handle.seek(t.offset))return await this._reader.readMessage(e)}return null}}class w extends B{constructor(e,t){super(e,t)}_loadVectors(e,t,r){return new u.JSONVectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(r)}}function S(e,t){return t&&"boolean"==typeof t.autoDestroy?t.autoDestroy:e.autoDestroy}function*O(e){const t=p.from(e);try{if(!t.open({autoDestroy:!1}).closed)do{yield t}while(!t.reset().open().closed)}finally{t.cancel()}}async function*A(e){const t=await p.from(e);try{if(!(await t.open({autoDestroy:!1})).closed)do{yield t}while(!(await t.reset().open()).closed)}finally{await t.cancel()}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Table=void 0;const i=r(23),n=r(6),s=r(15),o=r(28),a=r(0),c=r(24),u=r(9),l=r(37),d=r(64),h=r(13);class f extends h.Chunked{constructor(...e){let t=null;e[0]instanceof n.Schema&&(t=e.shift());const r=c.selectArgs(s.RecordBatch,e);if(!t&&!(t=r[0]&&r[0].schema))throw new TypeError("Table must be initialized with a Schema or at least one RecordBatch");r[0]||(r[0]=new s._InternalEmptyPlaceholderRecordBatch(t)),super(new a.Struct(t.fields),r),this._schema=t,this._chunks=r}static empty(e=new n.Schema([])){return new f(e,[])}static from(e){if(!e)return f.empty();if("object"==typeof e){const t=u.isIterable(e.values)?function(e){const{type:t}=e;if(t instanceof a.Struct)return f.fromStruct(h.StructVector.from(e));return null}(e):u.isAsyncIterable(e.values)?function(e){const{type:t}=e;if(t instanceof a.Struct)return h.StructVector.from(e).then(e=>f.fromStruct(e));return null}(e):null;if(null!==t)return t}let t=o.RecordBatchReader.from(e);return u.isPromise(t)?(async()=>await f.from(await t))():t.isSync()&&(t=t.open())?t.schema?new f(t.schema,[...t]):f.empty():(async e=>{const t=await e,r=t.schema,i=[];if(r){for await(const e of t)i.push(e);return new f(r,i)}return f.empty()})(t.open())}static async fromAsync(e){return await f.from(e)}static fromStruct(e){return f.new(e.data.childData,e.type.children)}static new(...e){return new f(...d.distributeColumnsIntoRecordBatches(c.selectColumnArgs(e)))}get schema(){return this._schema}get length(){return this._length}get chunks(){return this._chunks}get numCols(){return this._numChildren}clone(e=this._chunks){return new f(this._schema,e)}getColumn(e){return this.getColumnAt(this.getColumnIndex(e))}getColumnAt(e){return this.getChildAt(e)}getColumnIndex(e){return this._schema.fields.findIndex(t=>t.name===e)}getChildAt(e){if(e<0||e>=this.numChildren)return null;let t,r;const n=this._schema.fields,s=this._children||(this._children=[]);if(r=s[e])return r;if(t=n[e]){const r=this._chunks.map(t=>t.getChildAt(e)).filter(e=>null!=e);if(r.length>0)return s[e]=new i.Column(t,r)}return null}serialize(e="binary",t=!0){return(t?l.RecordBatchStreamWriter:l.RecordBatchFileWriter).writeAll(this).toUint8Array(!0)}count(){return this._length}select(...e){const t=this._schema.fields.reduce((e,t,r)=>e.set(t.name,r),new Map);return this.selectAt(...e.map(e=>t.get(e)).filter(e=>e>-1))}selectAt(...e){const t=this._schema.selectAt(...e);return new f(t,this._chunks.map(({length:r,data:{childData:i}})=>new s.RecordBatch(t,r,e.map(e=>i[e]).filter(Boolean))))}assign(e){const t=this._schema.fields,[r,i]=e.schema.fields.reduce((e,r,i)=>{const[n,s]=e,o=t.findIndex(e=>e.name===r.name);return~o?s[o]=i:n.push(i),e},[[],[]]),n=this._schema.assign(e.schema),s=[...t.map((t,r,n,s=i[r])=>void 0===s?this.getColumnAt(r):e.getColumnAt(s)),...r.map(t=>e.getColumnAt(t))].filter(Boolean);return new f(...d.distributeVectorsIntoRecordBatches(n,s))}}t.Table=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createElementComparator=t.clampRange=t.clampIndex=void 0;const i=r(3),n=r(31),s=r(5),o=r(9);let a;t.clampIndex=function(e,t,r){const i=e.length,n=t>-1?t:i+t%i;return r?r(e,n):n},t.clampRange=function(e,t,r,i){const{length:n=0}=e;let s="number"!=typeof t?0:t,o="number"!=typeof r?n:r;return s<0&&(s=(s%n+n)%n),o<0&&(o=(o%n+n)%n),o<s&&(a=s,s=o,o=a),o>n&&(o=n),i?i(e,s,o):[s,o]};const c=o.BigIntAvailable?o.BigInt(0):0,u=e=>e!=e;function l(e){const t=typeof e;if("object"!==t||null===e)return u(e)?u:"bigint"!==t?t=>t===e:t=>c+t===e;if(e instanceof Date){const t=e.valueOf();return e=>e instanceof Date&&e.valueOf()===t}return ArrayBuffer.isView(e)?t=>!!t&&s.compareArrayLike(e,t):e instanceof Map?function(e){let t=-1;const r=[];return e.forEach(e=>r[++t]=l(e)),d(r)}(e):Array.isArray(e)?function(e){const t=[];for(let r=-1,i=e.length;++r<i;)t[r]=l(e[r]);return d(t)}(e):e instanceof i.Vector?function(e){const t=[];for(let r=-1,i=e.length;++r<i;)t[r]=l(e.get(r));return d(t)}(e):function(e){const t=Object.keys(e);if(0===t.length)return()=>!1;const r=[];for(let i=-1,n=t.length;++i<n;)r[i]=l(e[t[i]]);return d(r,t)}(e)}function d(e,t){return r=>{if(!r||"object"!=typeof r)return!1;switch(r.constructor){case Array:return function(e,t){const r=e.length;if(t.length!==r)return!1;for(let i=-1;++i<r;)if(!e[i](t[i]))return!1;return!0}(e,r);case Map:case n.MapRow:case n.StructRow:return h(e,r,r.keys());case Object:case void 0:return h(e,r,t||Object.keys(r))}return r instanceof i.Vector&&function(e,t){const r=e.length;if(t.length!==r)return!1;for(let i=-1;++i<r;)if(!e[i](t.get(i)))return!1;return!0}(e,r)}}function h(e,t,r){const i=r[Symbol.iterator](),n=t instanceof Map?t.keys():Object.keys(t)[Symbol.iterator](),s=t instanceof Map?t.values():Object.values(t)[Symbol.iterator]();let o=0;const a=e.length;let c=s.next(),u=i.next(),l=n.next();for(;o<a&&!u.done&&!l.done&&!c.done&&(u.value===l.value&&e[o](c.value));++o,u=i.next(),l=n.next(),c=s.next());return!!(o===a&&u.done&&l.done&&c.done)||(i.return&&i.return(),n.return&&n.return(),s.return&&s.return(),!1)}t.createElementComparator=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StructRow=t.MapRow=void 0;const i=r(41),n=Symbol.for("parent"),s=Symbol.for("rowIndex"),o=Symbol.for("keyToIdx"),a=Symbol.for("idxToVal"),c=Symbol.for("nodejs.util.inspect.custom");class u{constructor(e,t){this[n]=e,this.size=t}entries(){return this[Symbol.iterator]()}has(e){return void 0!==this.get(e)}get(e){let t=void 0;if(null!=e){const r=this[o]||(this[o]=new Map);let i=r.get(e);if(void 0!==i){const e=this[a]||(this[a]=new Array(this.size));void 0!==(t=e[i])||(e[i]=t=this.getValue(i))}else if((i=this.getIndex(e))>-1){r.set(e,i);const n=this[a]||(this[a]=new Array(this.size));void 0!==(t=n[i])||(n[i]=t=this.getValue(i))}}return t}set(e,t){if(null!=e){const r=this[o]||(this[o]=new Map);let i=r.get(e);if(void 0===i&&r.set(e,i=this.getIndex(e)),i>-1){(this[a]||(this[a]=new Array(this.size)))[i]=this.setValue(i,t)}}return this}clear(){throw new Error(`Clearing ${this[Symbol.toStringTag]} not supported.`)}delete(e){throw new Error(`Deleting ${this[Symbol.toStringTag]} values not supported.`)}*[Symbol.iterator](){const e=this.keys(),t=this.values(),r=this[o]||(this[o]=new Map),i=this[a]||(this[a]=new Array(this.size));for(let n,s,o,a,c=0;!(o=e.next()).done&&!(a=t.next()).done;++c)n=o.value,s=a.value,i[c]=s,r.has(n)||r.set(n,c),yield[n,s]}forEach(e,t){const r=this.keys(),i=this.values(),n=void 0===t?e:(r,i,n)=>e.call(t,r,i,n),s=this[o]||(this[o]=new Map),c=this[a]||(this[a]=new Array(this.size));for(let e,t,o,a,u=0;!(o=r.next()).done&&!(a=i.next()).done;++u)e=o.value,t=a.value,c[u]=t,s.has(e)||s.set(e,u),n(t,e,this)}toArray(){return[...this.values()]}toJSON(){const e={};return this.forEach((t,r)=>e[r]=t),e}inspect(){return this.toString()}[c](){return this.toString()}toString(){const e=[];return this.forEach((t,r)=>{r=i.valueToString(r),t=i.valueToString(t),e.push(`${r}: ${t}`)}),`{ ${e.join(", ")} }`}}var l;u[Symbol.toStringTag]=(l=u.prototype,Object.defineProperties(l,{size:{writable:!0,enumerable:!1,configurable:!1,value:0},[n]:{writable:!0,enumerable:!1,configurable:!1,value:null},[s]:{writable:!0,enumerable:!1,configurable:!1,value:-1}}),l[Symbol.toStringTag]="Row");t.MapRow=class extends u{constructor(e){return super(e,e.length),h(this)}keys(){return this[n].getChildAt(0)[Symbol.iterator]()}values(){return this[n].getChildAt(1)[Symbol.iterator]()}getKey(e){return this[n].getChildAt(0).get(e)}getIndex(e){return this[n].getChildAt(0).indexOf(e)}getValue(e){return this[n].getChildAt(1).get(e)}setValue(e,t){this[n].getChildAt(1).set(e,t)}};t.StructRow=class extends u{constructor(e){return super(e,e.type.children.length),d(this)}*keys(){for(const e of this[n].type.children)yield e.name}*values(){for(const e of this[n].type.children)yield this[e.name]}getKey(e){return this[n].type.children[e].name}getIndex(e){return this[n].type.children.findIndex(t=>t.name===e)}getValue(e){return this[n].getChildAt(e).get(this[s])}setValue(e,t){return this[n].getChildAt(e).set(this[s],t)}},Object.setPrototypeOf(u.prototype,Map.prototype);const d=(()=>{const e={enumerable:!0,configurable:!1,get:null,set:null};return t=>{let r=-1;const i=t[o]||(t[o]=new Map),n=e=>function(){return this.get(e)},s=e=>function(t){return this.set(e,t)};for(const o of t.keys())i.set(o,++r),e.get=n(o),e.set=s(o),Object.prototype.hasOwnProperty.call(t,o)||(e.enumerable=!0,Object.defineProperty(t,o,e)),Object.prototype.hasOwnProperty.call(t,r)||(e.enumerable=!1,Object.defineProperty(t,r,e));return e.get=e.set=null,t}})(),h=(()=>{if("undefined"==typeof Proxy)return d;const e=u.prototype.has,t=u.prototype.get,r=u.prototype.set,i=u.prototype.getKey,l={isExtensible:()=>!1,deleteProperty:()=>!1,preventExtensions:()=>!0,ownKeys:e=>[...e.keys()].map(e=>""+e),has(e,t){switch(t){case"getKey":case"getIndex":case"getValue":case"setValue":case"toArray":case"toJSON":case"inspect":case"constructor":case"isPrototypeOf":case"propertyIsEnumerable":case"toString":case"toLocaleString":case"valueOf":case"size":case"has":case"get":case"set":case"clear":case"delete":case"keys":case"values":case"entries":case"forEach":case"__proto__":case"__defineGetter__":case"__defineSetter__":case"hasOwnProperty":case"__lookupGetter__":case"__lookupSetter__":case Symbol.iterator:case Symbol.toStringTag:case n:case s:case a:case o:case c:return!0}return"number"!=typeof t||e.has(t)||(t=e.getKey(t)),e.has(t)},get(r,u,l){switch(u){case"getKey":case"getIndex":case"getValue":case"setValue":case"toArray":case"toJSON":case"inspect":case"constructor":case"isPrototypeOf":case"propertyIsEnumerable":case"toString":case"toLocaleString":case"valueOf":case"size":case"has":case"get":case"set":case"clear":case"delete":case"keys":case"values":case"entries":case"forEach":case"__proto__":case"__defineGetter__":case"__defineSetter__":case"hasOwnProperty":case"__lookupGetter__":case"__lookupSetter__":case Symbol.iterator:case Symbol.toStringTag:case n:case s:case a:case o:case c:return Reflect.get(r,u,l)}return"number"!=typeof u||e.call(l,u)||(u=i.call(l,u)),t.call(l,u)},set(t,c,u,l){switch(c){case n:case s:case a:case o:return Reflect.set(t,c,u,l);case"getKey":case"getIndex":case"getValue":case"setValue":case"toArray":case"toJSON":case"inspect":case"constructor":case"isPrototypeOf":case"propertyIsEnumerable":case"toString":case"toLocaleString":case"valueOf":case"size":case"has":case"get":case"set":case"clear":case"delete":case"keys":case"values":case"entries":case"forEach":case"__proto__":case"__defineGetter__":case"__defineSetter__":case"hasOwnProperty":case"__lookupGetter__":case"__lookupSetter__":case Symbol.iterator:case Symbol.toStringTag:return!1}return"number"!=typeof c||e.call(l,c)||(c=i.call(l,c)),!!e.call(l,c)&&!!r.call(l,c,u)}};return e=>new Proxy(e,l)})()},,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DenseUnionBuilder=t.SparseUnionBuilder=t.UnionBuilder=t.StructBuilder=t.MapBuilder=t.FixedSizeListBuilder=t.ListBuilder=t.BinaryBuilder=t.Utf8Builder=t.IntervalYearMonthBuilder=t.IntervalDayTimeBuilder=t.IntervalBuilder=t.TimestampNanosecondBuilder=t.TimestampMicrosecondBuilder=t.TimestampMillisecondBuilder=t.TimestampSecondBuilder=t.TimestampBuilder=t.TimeNanosecondBuilder=t.TimeMicrosecondBuilder=t.TimeMillisecondBuilder=t.TimeSecondBuilder=t.TimeBuilder=t.Uint64Builder=t.Uint32Builder=t.Uint16Builder=t.Uint8Builder=t.Int64Builder=t.Int32Builder=t.Int16Builder=t.Int8Builder=t.IntBuilder=t.Float64Builder=t.Float32Builder=t.Float16Builder=t.FloatBuilder=t.FixedSizeBinaryBuilder=t.DictionaryBuilder=t.DecimalBuilder=t.DateMillisecondBuilder=t.DateDayBuilder=t.DateBuilder=t.NullBuilder=t.BoolBuilder=t.Builder=void 0;var i=r(2);Object.defineProperty(t,"Builder",{enumerable:!0,get:function(){return i.Builder}});var n=r(42);Object.defineProperty(t,"BoolBuilder",{enumerable:!0,get:function(){return n.BoolBuilder}});var s=r(43);Object.defineProperty(t,"NullBuilder",{enumerable:!0,get:function(){return s.NullBuilder}});var o=r(44);Object.defineProperty(t,"DateBuilder",{enumerable:!0,get:function(){return o.DateBuilder}}),Object.defineProperty(t,"DateDayBuilder",{enumerable:!0,get:function(){return o.DateDayBuilder}}),Object.defineProperty(t,"DateMillisecondBuilder",{enumerable:!0,get:function(){return o.DateMillisecondBuilder}});var a=r(45);Object.defineProperty(t,"DecimalBuilder",{enumerable:!0,get:function(){return a.DecimalBuilder}});var c=r(46);Object.defineProperty(t,"DictionaryBuilder",{enumerable:!0,get:function(){return c.DictionaryBuilder}});var u=r(47);Object.defineProperty(t,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return u.FixedSizeBinaryBuilder}});var l=r(48);Object.defineProperty(t,"FloatBuilder",{enumerable:!0,get:function(){return l.FloatBuilder}}),Object.defineProperty(t,"Float16Builder",{enumerable:!0,get:function(){return l.Float16Builder}}),Object.defineProperty(t,"Float32Builder",{enumerable:!0,get:function(){return l.Float32Builder}}),Object.defineProperty(t,"Float64Builder",{enumerable:!0,get:function(){return l.Float64Builder}});var d=r(49);Object.defineProperty(t,"IntBuilder",{enumerable:!0,get:function(){return d.IntBuilder}}),Object.defineProperty(t,"Int8Builder",{enumerable:!0,get:function(){return d.Int8Builder}}),Object.defineProperty(t,"Int16Builder",{enumerable:!0,get:function(){return d.Int16Builder}}),Object.defineProperty(t,"Int32Builder",{enumerable:!0,get:function(){return d.Int32Builder}}),Object.defineProperty(t,"Int64Builder",{enumerable:!0,get:function(){return d.Int64Builder}}),Object.defineProperty(t,"Uint8Builder",{enumerable:!0,get:function(){return d.Uint8Builder}}),Object.defineProperty(t,"Uint16Builder",{enumerable:!0,get:function(){return d.Uint16Builder}}),Object.defineProperty(t,"Uint32Builder",{enumerable:!0,get:function(){return d.Uint32Builder}}),Object.defineProperty(t,"Uint64Builder",{enumerable:!0,get:function(){return d.Uint64Builder}});var h=r(50);Object.defineProperty(t,"TimeBuilder",{enumerable:!0,get:function(){return h.TimeBuilder}}),Object.defineProperty(t,"TimeSecondBuilder",{enumerable:!0,get:function(){return h.TimeSecondBuilder}}),Object.defineProperty(t,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return h.TimeMillisecondBuilder}}),Object.defineProperty(t,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return h.TimeMicrosecondBuilder}}),Object.defineProperty(t,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return h.TimeNanosecondBuilder}});var f=r(51);Object.defineProperty(t,"TimestampBuilder",{enumerable:!0,get:function(){return f.TimestampBuilder}}),Object.defineProperty(t,"TimestampSecondBuilder",{enumerable:!0,get:function(){return f.TimestampSecondBuilder}}),Object.defineProperty(t,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return f.TimestampMillisecondBuilder}}),Object.defineProperty(t,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return f.TimestampMicrosecondBuilder}}),Object.defineProperty(t,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return f.TimestampNanosecondBuilder}});var p=r(52);Object.defineProperty(t,"IntervalBuilder",{enumerable:!0,get:function(){return p.IntervalBuilder}}),Object.defineProperty(t,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return p.IntervalDayTimeBuilder}}),Object.defineProperty(t,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return p.IntervalYearMonthBuilder}});var y=r(35);Object.defineProperty(t,"Utf8Builder",{enumerable:!0,get:function(){return y.Utf8Builder}});var b=r(36);Object.defineProperty(t,"BinaryBuilder",{enumerable:!0,get:function(){return b.BinaryBuilder}});var m=r(53);Object.defineProperty(t,"ListBuilder",{enumerable:!0,get:function(){return m.ListBuilder}});var g=r(55);Object.defineProperty(t,"FixedSizeListBuilder",{enumerable:!0,get:function(){return g.FixedSizeListBuilder}});var _=r(56);Object.defineProperty(t,"MapBuilder",{enumerable:!0,get:function(){return _.MapBuilder}});var B=r(57);Object.defineProperty(t,"StructBuilder",{enumerable:!0,get:function(){return B.StructBuilder}});var v=r(58);Object.defineProperty(t,"UnionBuilder",{enumerable:!0,get:function(){return v.UnionBuilder}}),Object.defineProperty(t,"SparseUnionBuilder",{enumerable:!0,get:function(){return v.SparseUnionBuilder}}),Object.defineProperty(t,"DenseUnionBuilder",{enumerable:!0,get:function(){return v.DenseUnionBuilder}});const T=r(1),I=r(35),w=r(2),S=r(59),O=r(87);w.Builder.new=function e(t){const r=t.type,i=new(O.instance.getVisitFn(r)())(t);if(r.children&&r.children.length>0){const n=t.children||[],s={nullValues:t.nullValues},o=Array.isArray(n)?(e,t)=>n[t]||s:({name:e})=>n[e]||s;r.children.forEach((t,r)=>{const{type:n}=t,s=o(t,r);i.children.push(e({...s,type:n}))})}return i},Object.keys(T.Type).map(e=>T.Type[e]).filter(e=>"number"==typeof e&&e!==T.Type.NONE).forEach(e=>{O.instance.visit(e).prototype._setValue=S.instance.getVisitFn(e)}),I.Utf8Builder.prototype._setValue=S.instance.visitBinary},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.DictionaryBatch=t.RecordBatch=t.BodyCompression=t.FieldNode=t.MessageHeader=t.BodyCompressionMethod=t.CompressionType=void 0;const i=r(14),n=r(16);var s,o,a;!function(e){e[e.LZ4_FRAME=0]="LZ4_FRAME",e[e.ZSTD=1]="ZSTD"}(s=t.CompressionType||(t.CompressionType={})),function(e){e[e.BUFFER=0]="BUFFER"}(o=t.BodyCompressionMethod||(t.BodyCompressionMethod={})),function(e){e[e.NONE=0]="NONE",e[e.Schema=1]="Schema",e[e.DictionaryBatch=2]="DictionaryBatch",e[e.RecordBatch=3]="RecordBatch",e[e.Tensor=4]="Tensor",e[e.SparseTensor=5]="SparseTensor"}(a=t.MessageHeader||(t.MessageHeader={}));class c{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}length(){return this.bb.readInt64(this.bb_pos)}nullCount(){return this.bb.readInt64(this.bb_pos+8)}static createFieldNode(e,t,r){return e.prep(8,16),e.writeInt64(r),e.writeInt64(t),e.offset()}}t.FieldNode=c;class u{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBodyCompression(e,t){return(t||new u).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBodyCompression(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new u).__init(e.readInt32(e.position())+e.position(),e)}codec(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt8(this.bb_pos+e):s.LZ4_FRAME}method(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt8(this.bb_pos+e):o.BUFFER}static startBodyCompression(e){e.startObject(2)}static addCodec(e,t){e.addFieldInt8(0,t,s.LZ4_FRAME)}static addMethod(e,t){e.addFieldInt8(1,t,o.BUFFER)}static endBodyCompression(e){return e.endObject()}static createBodyCompression(e,t,r){return u.startBodyCompression(e),u.addCodec(e,t),u.addMethod(e,r),u.endBodyCompression(e)}}t.BodyCompression=u;class l{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsRecordBatch(e,t){return(t||new l).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsRecordBatch(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new l).__init(e.readInt32(e.position())+e.position(),e)}length(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}nodes(e,t){const r=this.bb.__offset(this.bb_pos,6);return r?(t||new c).__init(this.bb.__vector(this.bb_pos+r)+16*e,this.bb):null}nodesLength(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}buffers(e,t){const r=this.bb.__offset(this.bb_pos,8);return r?(t||new n.Buffer).__init(this.bb.__vector(this.bb_pos+r)+16*e,this.bb):null}buffersLength(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}compression(e){const t=this.bb.__offset(this.bb_pos,10);return t?(e||new u).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}static startRecordBatch(e){e.startObject(4)}static addLength(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addNodes(e,t){e.addFieldOffset(1,t,0)}static startNodesVector(e,t){e.startVector(16,t,8)}static addBuffers(e,t){e.addFieldOffset(2,t,0)}static startBuffersVector(e,t){e.startVector(16,t,8)}static addCompression(e,t){e.addFieldOffset(3,t,0)}static endRecordBatch(e){return e.endObject()}static createRecordBatch(e,t,r,i,n){return l.startRecordBatch(e),l.addLength(e,t),l.addNodes(e,r),l.addBuffers(e,i),l.addCompression(e,n),l.endRecordBatch(e)}}t.RecordBatch=l;class d{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDictionaryBatch(e,t){return(t||new d).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryBatch(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new d).__init(e.readInt32(e.position())+e.position(),e)}id(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}data(e){const t=this.bb.__offset(this.bb_pos,6);return t?(e||new l).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}isDelta(){const e=this.bb.__offset(this.bb_pos,8);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}static startDictionaryBatch(e){e.startObject(3)}static addId(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addData(e,t){e.addFieldOffset(1,t,0)}static addIsDelta(e,t){e.addFieldInt8(2,+t,0)}static endDictionaryBatch(e){return e.endObject()}static createDictionaryBatch(e,t,r,i){return d.startDictionaryBatch(e),d.addId(e,t),d.addData(e,r),d.addIsDelta(e,i),d.endDictionaryBatch(e)}}t.DictionaryBatch=d;class h{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMessage(e,t){return(t||new h).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMessage(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new h).__init(e.readInt32(e.position())+e.position(),e)}version(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):n.MetadataVersion.V1}headerType(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):a.NONE}header(e){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__union(e,this.bb_pos+t):null}bodyLength(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}customMetadata(e,t){const r=this.bb.__offset(this.bb_pos,12);return r?(t||new n.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+4*e),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startMessage(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,n.MetadataVersion.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,a.NONE)}static addHeader(e,t){e.addFieldOffset(2,t,0)}static addBodyLength(e,t){e.addFieldInt64(3,t,e.createLong(0,0))}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endMessage(e){return e.endObject()}static finishMessageBuffer(e,t){e.finish(t)}static finishSizePrefixedMessageBuffer(e,t){e.finish(t,void 0,!0)}static createMessage(e,t,r,i,n,s){return h.startMessage(e),h.addVersion(e,t),h.addHeaderType(e,r),h.addHeader(e,i),h.addBodyLength(e,n),h.addCustomMetadata(e,s),h.endMessage(e)}}t.Message=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Utf8Builder=void 0;const i=r(20),n=r(36),s=r(17),o=r(2);class a extends o.VariableWidthBuilder{constructor(e){super(e),this._values=new s.BufferBuilder(new Uint8Array(0))}get byteLength(){let e=this._pendingLength+4*this.length;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,t){return super.setValue(e,i.encodeUtf8(t))}_flushPending(e,t){}}t.Utf8Builder=a,a.prototype._flushPending=n.BinaryBuilder.prototype._flushPending},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BinaryBuilder=void 0;const i=r(5),n=r(17),s=r(2);class o extends s.VariableWidthBuilder{constructor(e){super(e),this._values=new n.BufferBuilder(new Uint8Array(0))}get byteLength(){let e=this._pendingLength+4*this.length;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,t){return super.setValue(e,i.toUint8Array(t))}_flushPending(e,t){const r=this._offsets,i=this._values.reserve(t).buffer;let n,s=0,o=0,a=0;for([s,n]of e)void 0===n?r.set(s,0):(o=n.length,i.set(n,a),r.set(s,o),a+=o)}}t.BinaryBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecordBatchJSONWriter=t.RecordBatchFileWriter=t.RecordBatchStreamWriter=t.RecordBatchWriter=void 0;const i=r(29),n=r(38),s=r(23),o=r(0),a=r(6),c=r(21),u=r(21),l=r(60),d=r(1),h=r(63),f=r(18),p=r(92),y=r(93),b=r(94),m=r(5),g=r(15),_=r(22),B=r(9);class v extends _.ReadableInterop{constructor(e){super(),this._position=0,this._started=!1,this._sink=new f.AsyncByteQueue,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,B.isObject(e)||(e={autoDestroy:!0,writeLegacyIpcFormat:!1}),this._autoDestroy="boolean"!=typeof e.autoDestroy||e.autoDestroy,this._writeLegacyIpcFormat="boolean"==typeof e.writeLegacyIpcFormat&&e.writeLegacyIpcFormat}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,t){throw new Error('"throughDOM" not available in this environment')}toString(e=!1){return this._sink.toString(e)}toUint8Array(e=!1){return this._sink.toUint8Array(e)}writeAll(e){return B.isPromise(e)?e.then(e=>this.writeAll(e)):B.isAsyncIterable(e)?O(this,e):S(this,e)}get closed(){return this._sink.closed}[Symbol.asyncIterator](){return this._sink[Symbol.asyncIterator]()}toDOMStream(e){return this._sink.toDOMStream(e)}toNodeStream(e){return this._sink.toNodeStream(e)}close(){return this.reset()._sink.close()}abort(e){return this.reset()._sink.abort(e)}finish(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}reset(e=this._sink,t=null){return e===this._sink||e instanceof f.AsyncByteQueue?this._sink=e:(this._sink=new f.AsyncByteQueue,e&&B.isWritableDOMStream(e)?this.toDOMStream({type:"bytes"}).pipeTo(e):e&&B.isWritableNodeStream(e)&&this.toNodeStream({objectMode:!1}).pipe(e)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,t&&h.compareSchemas(t,this._schema)||(null===t?(this._position=0,this._schema=null):(this._started=!0,this._schema=t,this._writeSchema(t))),this}write(e){let t=null;if(!this._sink)throw new Error("RecordBatchWriter is closed");if(null==e)return this.finish()&&void 0;if(e instanceof i.Table&&!(t=e.schema))return this.finish()&&void 0;if(e instanceof g.RecordBatch&&!(t=e.schema))return this.finish()&&void 0;if(t&&!h.compareSchemas(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof g.RecordBatch?e instanceof g._InternalEmptyPlaceholderRecordBatch||this._writeRecordBatch(e):e instanceof i.Table?this.writeAll(e.chunks):B.isIterable(e)&&this.writeAll(e)}_writeMessage(e,t=8){const r=t-1,i=c.Message.encode(e),n=i.byteLength,s=this._writeLegacyIpcFormat?4:8,o=n+s+r&~r,a=o-n-s;return e.headerType===d.MessageHeader.RecordBatch?this._recordBatchBlocks.push(new l.FileBlock(o,e.bodyLength,this._position)):e.headerType===d.MessageHeader.DictionaryBatch&&this._dictionaryBlocks.push(new l.FileBlock(o,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(o-s)),n>0&&this._write(i),this._writePadding(a)}_write(e){if(this._started){const t=m.toUint8Array(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(c.Message.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(n.MAGIC)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){const{byteLength:t,nodes:r,bufferRegions:i,buffers:n}=p.VectorAssembler.assemble(e),s=new u.RecordBatch(e.length,r,i),o=c.Message.from(s,t);return this._writeDictionaries(e)._writeMessage(o)._writeBodyBuffers(n)}_writeDictionaryBatch(e,t,r=!1){this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0));const{byteLength:i,nodes:n,bufferRegions:s,buffers:o}=p.VectorAssembler.assemble(e),a=new u.RecordBatch(e.length,n,s),l=new u.DictionaryBatch(a,t,r),d=c.Message.from(l,i);return this._writeMessage(d)._writeBodyBuffers(o)}_writeBodyBuffers(e){let t,r,i;for(let n=-1,s=e.length;++n<s;)(t=e[n])&&(r=t.byteLength)>0&&(this._write(t),(i=(r+7&-8)-r)>0&&this._writePadding(i));return this}_writeDictionaries(e){for(let[t,r]of e.dictionaries){let e=this._dictionaryDeltaOffsets.get(t)||0;if(0===e||(r=r.slice(e)).length>0){const i="chunks"in r?r.chunks:[r];for(const r of i)this._writeDictionaryBatch(r,t,e>0),e+=r.length}}return this}}t.RecordBatchWriter=v;class T extends v{static writeAll(e,t){const r=new T(t);return B.isPromise(e)?e.then(e=>r.writeAll(e)):B.isAsyncIterable(e)?O(r,e):S(r,e)}}t.RecordBatchStreamWriter=T;class I extends v{static writeAll(e){const t=new I;return B.isPromise(e)?e.then(e=>t.writeAll(e)):B.isAsyncIterable(e)?O(t,e):S(t,e)}constructor(){super(),this._autoDestroy=!0}_writeSchema(e){return this._writeMagic()._writePadding(2)}_writeFooter(e){const t=l.Footer.encode(new l.Footer(e,d.MetadataVersion.V4,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}}t.RecordBatchFileWriter=I;class w extends v{constructor(){super(),this._autoDestroy=!0,this._recordBatches=[],this._dictionaries=[]}static writeAll(e){return(new w).writeAll(e)}_writeMessage(){return this}_writeFooter(e){return this}_writeSchema(e){return this._write('{\n "schema": '+JSON.stringify({fields:e.fields.map(A)},null,2))}_writeDictionaries(e){return e.dictionaries.size>0&&this._dictionaries.push(e),this}_writeDictionaryBatch(e,t,r=!1){return this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0)),this._write(0===this._dictionaryBlocks.length?" ":",\n "),this._write(""+function(e,t,r=!1){const i=new a.Field(""+t,e.type,e.nullCount>0),n=b.JSONVectorAssembler.assemble(new s.Column(i,[e]));return JSON.stringify({id:t,isDelta:r,data:{count:e.length,columns:n}},null,2)}(e,t,r)),this._dictionaryBlocks.push(new l.FileBlock(0,0,0)),this}_writeRecordBatch(e){return this._writeDictionaries(e),this._recordBatches.push(e),this}close(){if(this._dictionaries.length>0){this._write(',\n "dictionaries": [\n');for(const e of this._dictionaries)super._writeDictionaries(e);this._write("\n ]")}if(this._recordBatches.length>0){for(let t=-1,r=this._recordBatches.length;++t<r;)this._write(0===t?',\n "batches": [\n ':",\n "),this._write(""+(e=this._recordBatches[t],JSON.stringify({count:e.length,columns:b.JSONVectorAssembler.assemble(e)},null,2))),this._recordBatchBlocks.push(new l.FileBlock(0,0,0));this._write("\n ]")}var e;return this._schema&&this._write("\n}"),this._dictionaries=[],this._recordBatches=[],super.close()}}function S(e,t){let r=t;t instanceof i.Table&&(r=t.chunks,e.reset(void 0,t.schema));for(const t of r)e.write(t);return e.finish()}async function O(e,t){for await(const r of t)e.write(r);return e.finish()}function A({name:e,type:t,nullable:r}){const i=new y.JSONTypeAssembler;return{name:e,nullable:r,type:i.visit(t),children:(t.children||[]).map(A),dictionary:o.DataType.isDictionary(t)?{id:t.id,isOrdered:t.isOrdered,indexType:i.visit(t.indices)}:void 0}}t.RecordBatchJSONWriter=w},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.magicX2AndPadding=t.magicAndPadding=t.magicLength=t.checkForMagicArrowString=t.MAGIC=t.MAGIC_STR=t.PADDING=t.JSONMessageReader=t.AsyncMessageReader=t.MessageReader=void 0;const i=r(1);var n=r(14).flatbuffers.ByteBuffer;const s=r(21),o=r(9),a=r(61),c=r(5),u=r(18),l=r(22),d=e=>`Expected ${i.MessageHeader[e]} Message in stream, but was null or length 0.`,h=e=>`Header pointer of flatbuffer-encoded ${i.MessageHeader[e]} Message is null or length 0.`,f=(e,t)=>`Expected to read ${e} metadata bytes, but only read ${t}.`,p=(e,t)=>`Expected to read ${e} bytes for message body, but only read ${t}.`;class y{constructor(e){this.source=e instanceof u.ByteStream?e:new u.ByteStream(e)}[Symbol.iterator](){return this}next(){let e;return(e=this.readMetadataLength()).done||-1===e.value&&(e=this.readMetadataLength()).done||(e=this.readMetadata(e.value)).done?l.ITERATOR_DONE:e}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}readMessage(e){let t;if((t=this.next()).done)return null;if(null!=e&&t.value.headerType!==e)throw new Error(d(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array(0);const t=c.toUint8Array(this.source.read(e));if(t.byteLength<e)throw new Error(p(e,t.byteLength));return t.byteOffset%8==0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()}readSchema(e=!1){const t=i.MessageHeader.Schema,r=this.readMessage(t),n=r&&r.header();if(e&&!n)throw new Error(h(t));return n}readMetadataLength(){const e=this.source.read(t.PADDING),r=e&&new n(e),i=r&&r.readInt32(0)||0;return{done:0===i,value:i}}readMetadata(e){const t=this.source.read(e);if(!t)return l.ITERATOR_DONE;if(t.byteLength<e)throw new Error(f(e,t.byteLength));return{done:!1,value:s.Message.decode(t)}}}t.MessageReader=y;class b{constructor(e,t){this.source=e instanceof u.AsyncByteStream?e:o.isFileHandle(e)?new a.AsyncRandomAccessFile(e,t):new u.AsyncByteStream(e)}[Symbol.asyncIterator](){return this}async next(){let e;return(e=await this.readMetadataLength()).done||-1===e.value&&(e=await this.readMetadataLength()).done||(e=await this.readMetadata(e.value)).done?l.ITERATOR_DONE:e}async throw(e){return await this.source.throw(e)}async return(e){return await this.source.return(e)}async readMessage(e){let t;if((t=await this.next()).done)return null;if(null!=e&&t.value.headerType!==e)throw new Error(d(e));return t.value}async readMessageBody(e){if(e<=0)return new Uint8Array(0);const t=c.toUint8Array(await this.source.read(e));if(t.byteLength<e)throw new Error(p(e,t.byteLength));return t.byteOffset%8==0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()}async readSchema(e=!1){const t=i.MessageHeader.Schema,r=await this.readMessage(t),n=r&&r.header();if(e&&!n)throw new Error(h(t));return n}async readMetadataLength(){const e=await this.source.read(t.PADDING),r=e&&new n(e),i=r&&r.readInt32(0)||0;return{done:0===i,value:i}}async readMetadata(e){const t=await this.source.read(e);if(!t)return l.ITERATOR_DONE;if(t.byteLength<e)throw new Error(f(e,t.byteLength));return{done:!1,value:s.Message.decode(t)}}}t.AsyncMessageReader=b;t.JSONMessageReader=class extends y{constructor(e){super(new Uint8Array(0)),this._schema=!1,this._body=[],this._batchIndex=0,this._dictionaryIndex=0,this._json=e instanceof l.ArrowJSON?e:new l.ArrowJSON(e)}next(){const{_json:e}=this;if(!this._schema){this._schema=!0;return{done:!1,value:s.Message.fromJSON(e.schema,i.MessageHeader.Schema)}}if(this._dictionaryIndex<e.dictionaries.length){const t=e.dictionaries[this._dictionaryIndex++];this._body=t.data.columns;return{done:!1,value:s.Message.fromJSON(t,i.MessageHeader.DictionaryBatch)}}if(this._batchIndex<e.batches.length){const t=e.batches[this._batchIndex++];this._body=t.columns;return{done:!1,value:s.Message.fromJSON(t,i.MessageHeader.RecordBatch)}}return this._body=[],l.ITERATOR_DONE}readMessageBody(e){return function e(t){return(t||[]).reduce((t,r)=>[...t,...r.VALIDITY&&[r.VALIDITY]||[],...r.TYPE&&[r.TYPE]||[],...r.OFFSET&&[r.OFFSET]||[],...r.DATA&&[r.DATA]||[],...e(r.children)],[])}(this._body)}readMessage(e){let t;if((t=this.next()).done)return null;if(null!=e&&t.value.headerType!==e)throw new Error(d(e));return t.value}readSchema(){const e=i.MessageHeader.Schema,t=this.readMessage(e),r=t&&t.header();if(!t||!r)throw new Error(h(e));return r}},t.PADDING=4,t.MAGIC_STR="ARROW1",t.MAGIC=new Uint8Array(t.MAGIC_STR.length);for(let e=0;e<t.MAGIC_STR.length;e+=1)t.MAGIC[e]=t.MAGIC_STR.charCodeAt(e);t.checkForMagicArrowString=function(e,r=0){for(let i=-1,n=t.MAGIC.length;++i<n;)if(t.MAGIC[i]!==e[r+i])return!1;return!0},t.magicLength=t.MAGIC.length,t.magicAndPadding=t.magicLength+t.PADDING,t.magicX2AndPadding=2*t.magicLength+t.PADDING},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DictionaryVector=void 0;const i=r(10),n=r(3),s=r(4),o=r(13),a=r(0);class c extends s.BaseVector{constructor(e){super(e),this.indices=n.Vector.new(e.clone(this.type.indices))}static from(...e){if(3===e.length){const[t,r,s]=e,o=new a.Dictionary(t.type,r,null,null);return n.Vector.new(i.Data.Dictionary(o,0,s.length,0,null,s,t))}return o.vectorFromValuesWithType(()=>e[0].type,e[0])}get dictionary(){return this.data.dictionary}reverseLookup(e){return this.dictionary.indexOf(e)}getKey(e){return this.indices.get(e)}getValue(e){return this.dictionary.get(e)}setKey(e,t){return this.indices.set(e,t)}setValue(e,t){return this.dictionary.set(e,t)}}t.DictionaryVector=c,c.prototype.indices=null},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Uint64Vector=t.Uint32Vector=t.Uint16Vector=t.Uint8Vector=t.Int64Vector=t.Int32Vector=t.Int16Vector=t.Int8Vector=t.IntVector=void 0;const i=r(10),n=r(3),s=r(4),o=r(13),a=r(9),c=r(5),u=r(0);class l extends s.BaseVector{static from(...e){const[t,r=!1]=e;let s=v(this,r);if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)){const e=B(t.constructor,r)||s;if(null===s&&(s=e),s&&s===e){const e=new s;let r=t.byteLength/e.ArrayType.BYTES_PER_ELEMENT;return _(s,t.constructor)&&(r*=.5),n.Vector.new(i.Data.Int(e,0,r,0,null,t))}}if(s)return o.vectorFromValuesWithType(()=>new s,t);if(t instanceof DataView||t instanceof ArrayBuffer)throw new TypeError("Cannot infer integer type from instance of "+t.constructor.name);throw new TypeError("Unrecognized IntVector input")}}t.IntVector=l;class d extends l{}t.Int8Vector=d;class h extends l{}t.Int16Vector=h;class f extends l{}t.Int32Vector=f;class p extends l{toBigInt64Array(){return c.toBigInt64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigInt64Array())}}t.Int64Vector=p;class y extends l{}t.Uint8Vector=y;class b extends l{}t.Uint16Vector=b;class m extends l{}t.Uint32Vector=m;class g extends l{toBigUint64Array(){return c.toBigUint64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigUint64Array())}}t.Uint64Vector=g;const _=(e,t)=>!(e!==u.Int64&&e!==u.Uint64||t!==Int32Array&&t!==Uint32Array),B=(e,t)=>{switch(e){case Int8Array:return u.Int8;case Int16Array:return u.Int16;case Int32Array:return t?u.Int64:u.Int32;case a.BigInt64Array:return u.Int64;case Uint8Array:return u.Uint8;case Uint16Array:return u.Uint16;case Uint32Array:return t?u.Uint64:u.Uint32;case a.BigUint64Array:return u.Uint64;default:return null}},v=(e,t)=>{switch(e){case d:return u.Int8;case h:return u.Int16;case f:return t?u.Int64:u.Int32;case p:return u.Int64;case y:return u.Uint8;case b:return u.Uint16;case m:return t?u.Uint64:u.Uint32;case g:return u.Uint64;default:return null}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.valueToString=void 0;t.valueToString=function(e){if(null===e)return"null";if(void 0===e)return"undefined";switch(typeof e){case"number":case"bigint":return""+e;case"string":return`"${e}"`}return"function"==typeof e[Symbol.toPrimitive]?e[Symbol.toPrimitive]("string"):ArrayBuffer.isView(e)?`[${e}]`:JSON.stringify(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BoolBuilder=void 0;const i=r(17),n=r(2);class s extends n.Builder{constructor(e){super(e),this._values=new i.BitmapBufferBuilder}setValue(e,t){this._values.set(e,+t)}}t.BoolBuilder=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NullBuilder=void 0;const i=r(2);class n extends i.Builder{setValue(e,t){}setValid(e,t){return this.length=Math.max(e+1,this.length),t}}t.NullBuilder=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DateMillisecondBuilder=t.DateDayBuilder=t.DateBuilder=void 0;const i=r(2);class n extends i.FixedWidthBuilder{}t.DateBuilder=n;t.DateDayBuilder=class extends n{};t.DateMillisecondBuilder=class extends n{}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DecimalBuilder=void 0;const i=r(2);class n extends i.FixedWidthBuilder{}t.DecimalBuilder=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DictionaryBuilder=void 0;const i=r(0),n=r(2);class s extends n.Builder{constructor({type:e,nullValues:t,dictionaryHashFunction:r}){super({type:new i.Dictionary(e.dictionary,e.indices,e.id,e.isOrdered)}),this._nulls=null,this._dictionaryOffset=0,this._keysToIndices=Object.create(null),this.indices=n.Builder.new({type:this.type.indices,nullValues:t}),this.dictionary=n.Builder.new({type:this.type.dictionary,nullValues:null}),"function"==typeof r&&(this.valueToKey=r)}get values(){return this.indices.values}get nullCount(){return this.indices.nullCount}get nullBitmap(){return this.indices.nullBitmap}get byteLength(){return this.indices.byteLength+this.dictionary.byteLength}get reservedLength(){return this.indices.reservedLength+this.dictionary.reservedLength}get reservedByteLength(){return this.indices.reservedByteLength+this.dictionary.reservedByteLength}isValid(e){return this.indices.isValid(e)}setValid(e,t){const r=this.indices;return t=r.setValid(e,t),this.length=r.length,t}setValue(e,t){const r=this._keysToIndices,i=this.valueToKey(t);let n=r[i];return void 0===n&&(r[i]=n=this._dictionaryOffset+this.dictionary.append(t).length-1),this.indices.setValue(e,n)}flush(){const e=this.type,t=this._dictionary,r=this.dictionary.toVector(),i=this.indices.flush().clone(e);return i.dictionary=t?t.concat(r):r,this.finished||(this._dictionaryOffset+=r.length),this._dictionary=i.dictionary,this.clear(),i}finish(){return this.indices.finish(),this.dictionary.finish(),this._dictionaryOffset=0,this._keysToIndices=Object.create(null),super.finish()}clear(){return this.indices.clear(),this.dictionary.clear(),super.clear()}valueToKey(e){return"string"==typeof e?e:""+e}}t.DictionaryBuilder=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FixedSizeBinaryBuilder=void 0;const i=r(2);class n extends i.FixedWidthBuilder{}t.FixedSizeBinaryBuilder=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Float64Builder=t.Float32Builder=t.Float16Builder=t.FloatBuilder=void 0;const i=r(26),n=r(2);class s extends n.FixedWidthBuilder{}t.FloatBuilder=s;t.Float16Builder=class extends s{setValue(e,t){this._values.set(e,i.float64ToUint16(t))}};t.Float32Builder=class extends s{setValue(e,t){this._values.set(e,t)}};t.Float64Builder=class extends s{setValue(e,t){this._values.set(e,t)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Uint64Builder=t.Uint32Builder=t.Uint16Builder=t.Uint8Builder=t.Int64Builder=t.Int32Builder=t.Int16Builder=t.Int8Builder=t.IntBuilder=void 0;const i=r(27),n=r(17),s=r(9),o=r(2);class a extends o.FixedWidthBuilder{setValue(e,t){this._values.set(e,t)}}t.IntBuilder=a;t.Int8Builder=class extends a{};t.Int16Builder=class extends a{};t.Int32Builder=class extends a{};t.Int64Builder=class extends a{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map(c)),super(e),this._values=new n.WideBufferBuilder(new Int32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid(c(e))}};t.Uint8Builder=class extends a{};t.Uint16Builder=class extends a{};t.Uint32Builder=class extends a{};t.Uint64Builder=class extends a{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map(c)),super(e),this._values=new n.WideBufferBuilder(new Uint32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid(c(e))}};const c=(u={BigIntArray:s.BigInt64Array},e=>(ArrayBuffer.isView(e)&&(u.buffer=e.buffer,u.byteOffset=e.byteOffset,u.byteLength=e.byteLength,e=i.bignumToBigInt(u),u.buffer=null),e));var u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeNanosecondBuilder=t.TimeMicrosecondBuilder=t.TimeMillisecondBuilder=t.TimeSecondBuilder=t.TimeBuilder=void 0;const i=r(2);class n extends i.FixedWidthBuilder{}t.TimeBuilder=n;t.TimeSecondBuilder=class extends n{};t.TimeMillisecondBuilder=class extends n{};t.TimeMicrosecondBuilder=class extends n{};t.TimeNanosecondBuilder=class extends n{}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimestampNanosecondBuilder=t.TimestampMicrosecondBuilder=t.TimestampMillisecondBuilder=t.TimestampSecondBuilder=t.TimestampBuilder=void 0;const i=r(2);class n extends i.FixedWidthBuilder{}t.TimestampBuilder=n;t.TimestampSecondBuilder=class extends n{};t.TimestampMillisecondBuilder=class extends n{};t.TimestampMicrosecondBuilder=class extends n{};t.TimestampNanosecondBuilder=class extends n{}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IntervalYearMonthBuilder=t.IntervalDayTimeBuilder=t.IntervalBuilder=void 0;const i=r(2);class n extends i.FixedWidthBuilder{}t.IntervalBuilder=n;t.IntervalDayTimeBuilder=class extends n{};t.IntervalYearMonthBuilder=class extends n{}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListBuilder=void 0;const i=r(54),n=r(6),s=r(0),o=r(17),a=r(2);class c extends a.VariableWidthBuilder{constructor(e){super(e),this._run=new i.Run,this._offsets=new o.OffsetsBufferBuilder}addChild(e,t="0"){if(this.numChildren>0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=e,this.type=new s.List(new n.Field(t,e.type,!0)),this.numChildren-1}clear(){return this._run.clear(),super.clear()}_flushPending(e){const t=this._run,r=this._offsets,i=this._setValue;let n,s=0;for([s,n]of e)void 0===n?r.set(s,0):(r.set(s,n.length),i(this,s,t.bind(n)))}}t.ListBuilder=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Run=void 0;const i=r(3);t.Run=class{get length(){return this._values.length}get(e){return this._values[e]}clear(){return this._values=null,this}bind(e){return e instanceof i.Vector?e:(this._values=e,this)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FixedSizeListBuilder=void 0;const i=r(54),n=r(6),s=r(2),o=r(0);class a extends s.Builder{constructor(){super(...arguments),this._run=new i.Run}setValue(e,t){super.setValue(e,this._run.bind(t))}addChild(e,t="0"){if(this.numChildren>0)throw new Error("FixedSizeListBuilder can only have one child.");const r=this.children.push(e);return this.type=new o.FixedSizeList(this.type.listSize,new n.Field(t,e.type,!0)),r}clear(){return this._run.clear(),super.clear()}}t.FixedSizeListBuilder=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MapBuilder=void 0;const i=r(6),n=r(0),s=r(2);class o extends s.VariableWidthBuilder{set(e,t){return super.set(e,t)}setValue(e,t){t=t instanceof Map?t:new Map(Object.entries(t));const r=this._pending||(this._pending=new Map),i=r.get(e);i&&(this._pendingLength-=i.size),this._pendingLength+=t.size,r.set(e,t)}addChild(e,t=""+this.numChildren){if(this.numChildren>0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=e,this.type=new n.Map_(new i.Field(t,e.type,!0),this.type.keysSorted),this.numChildren-1}_flushPending(e){const t=this._offsets,r=this._setValue;e.forEach((e,i)=>{void 0===e?t.set(i,0):(t.set(i,e.size),r(this,i,e))})}}t.MapBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StructBuilder=void 0;const i=r(6),n=r(2),s=r(0);class o extends n.Builder{addChild(e,t=""+this.numChildren){const r=this.children.push(e);return this.type=new s.Struct([...this.type.children,new i.Field(t,e.type,!0)]),r}}t.StructBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DenseUnionBuilder=t.SparseUnionBuilder=t.UnionBuilder=void 0;const i=r(6),n=r(17),s=r(2),o=r(0);class a extends s.Builder{constructor(e){super(e),this._typeIds=new n.DataBufferBuilder(new Int8Array(0),1),"function"==typeof e.valueToChildTypeId&&(this._valueToChildTypeId=e.valueToChildTypeId)}get typeIdToChildIndex(){return this.type.typeIdToChildIndex}append(e,t){return this.set(this.length,e,t)}set(e,t,r){return void 0===r&&(r=this._valueToChildTypeId(this,t,e)),this.setValid(e,this.isValid(t))&&this.setValue(e,t,r),this}setValue(e,t,r){this._typeIds.set(e,r),super.setValue(e,t)}addChild(e,t=""+this.children.length){const r=this.children.push(e),{type:{children:n,mode:s,typeIds:a}}=this,c=[...n,new i.Field(t,e.type)];return this.type=new o.Union(s,[...a,r],c),r}_valueToChildTypeId(e,t,r){throw new Error("Cannot map UnionBuilder value to child typeId. Pass the `childTypeId` as the second argument to unionBuilder.append(), or supply a `valueToChildTypeId` function as part of the UnionBuilder constructor options.")}}t.UnionBuilder=a;t.SparseUnionBuilder=class extends a{};t.DenseUnionBuilder=class extends a{constructor(e){super(e),this._offsets=new n.DataBufferBuilder(new Int32Array(0))}setValue(e,t,r){const i=this.type.typeIdToChildIndex[r];return this._offsets.set(e,this.getChildAt(i).length),super.setValue(e,t,r)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.instance=t.SetVisitor=void 0;const i=r(3),n=r(8),s=r(20),o=r(26),a=r(5),c=r(1);class u extends n.Visitor{}t.SetVisitor=u;const l=(e,t,r)=>{e[t]=r%4294967296|0,e[t+1]=r/4294967296|0},d=(e,t,r,i)=>{const{[r]:n,[r+1]:s}=t;null!=n&&null!=s&&e.set(i.subarray(0,s-n),n)},h=({values:e},t,r)=>{((e,t,r)=>{e[t]=r/864e5|0})(e,t,r.valueOf())},f=({values:e},t,r)=>{l(e,2*t,r.valueOf())},p=({stride:e,values:t},r,i)=>{t[e*r]=i},y=({stride:e,values:t},r,i)=>{t[e*r]=o.float64ToUint16(i)},b=(e,t,r)=>{switch(typeof r){case"bigint":e.values64[t]=r;break;case"number":e.values[t*e.stride]=r;break;default:{const i=r,{stride:n,ArrayType:s}=e,o=a.toArrayBufferView(s,i);e.values.set(o.subarray(0,n),n*t)}}},m=({values:e},t,r)=>l(e,2*t,r/1e3),g=({values:e},t,r)=>l(e,2*t,r),_=({values:e},t,r)=>((e,t,r)=>{e[t]=1e3*r%4294967296|0,e[t+1]=1e3*r/4294967296|0})(e,2*t,r),B=({values:e},t,r)=>((e,t,r)=>{e[t]=1e6*r%4294967296|0,e[t+1]=1e6*r/4294967296|0})(e,2*t,r),v=({values:e,stride:t},r,i)=>{e[t*r]=i},T=({values:e,stride:t},r,i)=>{e[t*r]=i},I=({values:e},t,r)=>{e.set(r.subarray(0,2),2*t)},w=({values:e},t,r)=>{e.set(r.subarray(0,2),2*t)},S=(e,t,r)=>{const i=e.typeIdToChildIndex[e.typeIds[t]],n=e.getChildAt(i);n&&n.set(e.valueOffsets[t],r)},O=(e,t,r)=>{const i=e.typeIdToChildIndex[e.typeIds[t]],n=e.getChildAt(i);n&&n.set(t,r)},A=({values:e},t,r)=>{e.set(r.subarray(0,2),2*t)},D=({values:e},t,r)=>{e[t]=12*r[0]+r[1]%12};u.prototype.visitBool=({offset:e,values:t},r,i)=>{const n=e+r;i?t[n>>3]|=1<<n%8:t[n>>3]&=~(1<<n%8)},u.prototype.visitInt=(e,t,r)=>{e.type.bitWidth<64?p(e,t,r):b(e,t,r)},u.prototype.visitInt8=p,u.prototype.visitInt16=p,u.prototype.visitInt32=p,u.prototype.visitInt64=b,u.prototype.visitUint8=p,u.prototype.visitUint16=p,u.prototype.visitUint32=p,u.prototype.visitUint64=b,u.prototype.visitFloat=(e,t,r)=>{e.type.precision!==c.Precision.HALF?p(e,t,r):y(e,t,r)},u.prototype.visitFloat16=y,u.prototype.visitFloat32=p,u.prototype.visitFloat64=p,u.prototype.visitUtf8=({values:e,valueOffsets:t},r,i)=>{d(e,t,r,s.encodeUtf8(i))},u.prototype.visitBinary=({values:e,valueOffsets:t},r,i)=>d(e,t,r,i),u.prototype.visitFixedSizeBinary=({stride:e,values:t},r,i)=>{t.set(i.subarray(0,e),e*r)},u.prototype.visitDate=(e,t,r)=>{e.type.unit===c.DateUnit.DAY?h(e,t,r):f(e,t,r)},u.prototype.visitDateDay=h,u.prototype.visitDateMillisecond=f,u.prototype.visitTimestamp=(e,t,r)=>{switch(e.type.unit){case c.TimeUnit.SECOND:return m(e,t,r);case c.TimeUnit.MILLISECOND:return g(e,t,r);case c.TimeUnit.MICROSECOND:return _(e,t,r);case c.TimeUnit.NANOSECOND:return B(e,t,r)}},u.prototype.visitTimestampSecond=m,u.prototype.visitTimestampMillisecond=g,u.prototype.visitTimestampMicrosecond=_,u.prototype.visitTimestampNanosecond=B,u.prototype.visitTime=(e,t,r)=>{switch(e.type.unit){case c.TimeUnit.SECOND:return v(e,t,r);case c.TimeUnit.MILLISECOND:return T(e,t,r);case c.TimeUnit.MICROSECOND:return I(e,t,r);case c.TimeUnit.NANOSECOND:return w(e,t,r)}},u.prototype.visitTimeSecond=v,u.prototype.visitTimeMillisecond=T,u.prototype.visitTimeMicrosecond=I,u.prototype.visitTimeNanosecond=w,u.prototype.visitDecimal=({values:e},t,r)=>{e.set(r.subarray(0,4),4*t)},u.prototype.visitList=(e,t,r)=>{const i=e.getChildAt(0),n=e.valueOffsets;for(let e=-1,s=n[t],o=n[t+1];s<o;)i.set(s++,r.get(++e))},u.prototype.visitStruct=(e,t,r)=>{const n=r instanceof Map?(s=t,o=r,(e,t,r)=>e&&e.set(s,o.get(t.name))):r instanceof i.Vector?((e,t)=>(r,i,n)=>r&&r.set(e,t.get(n)))(t,r):Array.isArray(r)?((e,t)=>(r,i,n)=>r&&r.set(e,t[n]))(t,r):((e,t)=>(r,i,n)=>r&&r.set(e,t[i.name]))(t,r);var s,o;e.type.children.forEach((t,r)=>n(e.getChildAt(r),t,r))},u.prototype.visitUnion=(e,t,r)=>{e.type.mode===c.UnionMode.Dense?S(e,t,r):O(e,t,r)},u.prototype.visitDenseUnion=S,u.prototype.visitSparseUnion=O,u.prototype.visitDictionary=(e,t,r)=>{const i=e.getKey(t);null!==i&&e.setValue(i,r)},u.prototype.visitInterval=(e,t,r)=>{e.type.unit===c.IntervalUnit.DAY_TIME?A(e,t,r):D(e,t,r)},u.prototype.visitIntervalDayTime=A,u.prototype.visitIntervalYearMonth=D,u.prototype.visitFixedSizeList=(e,t,r)=>{const i=e.getChildAt(0),{stride:n}=e;for(let e=-1,s=t*n;++e<n;)i.set(s+e,r.get(e))},u.prototype.visitMap=(e,t,r)=>{const i=e.getChildAt(0),n=e.valueOffsets,s=r instanceof Map?[...r]:Object.entries(r);for(let e=-1,r=n[t],o=n[t+1];r<o;)i.set(r++,s[++e])},t.instance=new u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileBlock=t.Footer=void 0;const i=r(88),n=r(14);var s=n.flatbuffers.Long,o=n.flatbuffers.Builder,a=n.flatbuffers.ByteBuffer;const c=r(6),u=r(1),l=r(5);class d{constructor(e,t=u.MetadataVersion.V4,r,i){this.schema=e,this.version=t,r&&(this._recordBatches=r),i&&(this._dictionaryBatches=i)}static decode(e){e=new a(l.toUint8Array(e));const t=i.Footer.getRootAsFooter(e),r=c.Schema.decode(t.schema());return new h(r,t)}static encode(e){const t=new o,r=c.Schema.encode(t,e.schema);i.Footer.startRecordBatchesVector(t,e.numRecordBatches),[...e.recordBatches()].slice().reverse().forEach(e=>f.encode(t,e));const n=t.endVector();i.Footer.startDictionariesVector(t,e.numDictionaries),[...e.dictionaryBatches()].slice().reverse().forEach(e=>f.encode(t,e));const s=t.endVector();return i.Footer.startFooter(t),i.Footer.addSchema(t,r),i.Footer.addVersion(t,u.MetadataVersion.V4),i.Footer.addRecordBatches(t,n),i.Footer.addDictionaries(t,s),i.Footer.finishFooterBuffer(t,i.Footer.endFooter(t)),t.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}*recordBatches(){for(let e,t=-1,r=this.numRecordBatches;++t<r;)(e=this.getRecordBatch(t))&&(yield e)}*dictionaryBatches(){for(let e,t=-1,r=this.numDictionaries;++t<r;)(e=this.getDictionaryBatch(t))&&(yield e)}getRecordBatch(e){return e>=0&&e<this.numRecordBatches&&this._recordBatches[e]||null}getDictionaryBatch(e){return e>=0&&e<this.numDictionaries&&this._dictionaryBatches[e]||null}}t.Footer=d;class h extends d{constructor(e,t){super(e,t.version()),this._footer=t}get numRecordBatches(){return this._footer.recordBatchesLength()}get numDictionaries(){return this._footer.dictionariesLength()}getRecordBatch(e){if(e>=0&&e<this.numRecordBatches){const t=this._footer.recordBatches(e);if(t)return f.decode(t)}return null}getDictionaryBatch(e){if(e>=0&&e<this.numDictionaries){const t=this._footer.dictionaries(e);if(t)return f.decode(t)}return null}}class f{constructor(e,t,r){this.metaDataLength=e,this.offset="number"==typeof r?r:r.low,this.bodyLength="number"==typeof t?t:t.low}static decode(e){return new f(e.metaDataLength(),e.bodyLength(),e.offset())}static encode(e,t){const{metaDataLength:r}=t,n=new s(t.offset,0),o=new s(t.bodyLength,0);return i.Block.createBlock(e,n,r,o)}}t.FileBlock=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncRandomAccessFile=t.RandomAccessFile=void 0;const i=r(18),n=r(5);class s extends i.ByteStream{constructor(e,t){super(),this.position=0,this.buffer=n.toUint8Array(e),this.size=void 0===t?this.buffer.byteLength:t}readInt32(e){const{buffer:t,byteOffset:r}=this.readAt(e,4);return new DataView(t,r).getInt32(0,!0)}seek(e){return this.position=Math.min(e,this.size),e<this.size}read(e){const{buffer:t,size:r,position:i}=this;return t&&i<r?("number"!=typeof e&&(e=1/0),this.position=Math.min(r,i+Math.min(r-i,e)),t.subarray(i,this.position)):null}readAt(e,t){const r=this.buffer,i=Math.min(this.size,e+t);return r?r.subarray(e,i):new Uint8Array(t)}close(){this.buffer&&(this.buffer=null)}throw(e){return this.close(),{done:!0,value:e}}return(e){return this.close(),{done:!0,value:e}}}t.RandomAccessFile=s;class o extends i.AsyncByteStream{constructor(e,t){super(),this.position=0,this._handle=e,"number"==typeof t?this.size=t:this._pending=(async()=>{this.size=(await e.stat()).size,delete this._pending})()}async readInt32(e){const{buffer:t,byteOffset:r}=await this.readAt(e,4);return new DataView(t,r).getInt32(0,!0)}async seek(e){return this._pending&&await this._pending,this.position=Math.min(e,this.size),e<this.size}async read(e){this._pending&&await this._pending;const{_handle:t,size:r,position:i}=this;if(t&&i<r){"number"!=typeof e&&(e=1/0);let n=i,s=0,o=0;const a=Math.min(r,n+Math.min(r-n,e)),c=new Uint8Array(Math.max(0,(this.position=a)-n));for(;(n+=o)<a&&(s+=o)<c.byteLength;)({bytesRead:o}=await t.read(c,s,c.byteLength-s,n));return c}return null}async readAt(e,t){this._pending&&await this._pending;const{_handle:r,size:i}=this;if(r&&e+t<i){const n=Math.min(i,e+t),s=new Uint8Array(n-e);return(await r.read(s,0,t,e)).buffer}return new Uint8Array(t)}async close(){const e=this._handle;this._handle=null,e&&await e.close()}async throw(e){return await this.close(),{done:!0,value:e}}async return(e){return await this.close(),{done:!0,value:e}}}t.AsyncRandomAccessFile=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Int128=t.Int64=t.Uint64=t.BaseInt64=void 0;function i(e){return e<0&&(e=4294967295+e+1),"0x"+e.toString(16)}const n=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];class s{constructor(e){this.buffer=e}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(e){const t=new Uint32Array([this.buffer[1]>>>16,65535&this.buffer[1],this.buffer[0]>>>16,65535&this.buffer[0]]),r=new Uint32Array([e.buffer[1]>>>16,65535&e.buffer[1],e.buffer[0]>>>16,65535&e.buffer[0]]);let i=t[3]*r[3];this.buffer[0]=65535&i;let n=i>>>16;return i=t[2]*r[3],n+=i,i=t[3]*r[2]>>>0,n+=i,this.buffer[0]+=n<<16,this.buffer[1]=n>>>0<i?65536:0,this.buffer[1]+=n>>>16,this.buffer[1]+=t[1]*r[3]+t[2]*r[2]+t[3]*r[1],this.buffer[1]+=t[0]*r[3]+t[1]*r[2]+t[2]*r[1]+t[3]*r[0]<<16,this}_plus(e){const t=this.buffer[0]+e.buffer[0]>>>0;this.buffer[1]+=e.buffer[1],t<this.buffer[0]>>>0&&++this.buffer[1],this.buffer[0]=t}lessThan(e){return this.buffer[1]<e.buffer[1]||this.buffer[1]===e.buffer[1]&&this.buffer[0]<e.buffer[0]}equals(e){return this.buffer[1]===e.buffer[1]&&this.buffer[0]==e.buffer[0]}greaterThan(e){return e.lessThan(this)}hex(){return`${i(this.buffer[1])} ${i(this.buffer[0])}`}}t.BaseInt64=s;class o extends s{times(e){return this._times(e),this}plus(e){return this._plus(e),this}static from(e,t=new Uint32Array(2)){return o.fromString("string"==typeof e?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return o.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){const r=e.length,i=new o(t);for(let t=0;t<r;){const s=8<r-t?8:r-t,a=new o(new Uint32Array([parseInt(e.substr(t,s),10),0])),c=new o(new Uint32Array([n[s],0]));i.times(c),i.plus(a),t+=s}return i}static convertArray(e){const t=new Uint32Array(2*e.length);for(let r=-1,i=e.length;++r<i;)o.from(e[r],new Uint32Array(t.buffer,t.byteOffset+2*r*4,2));return t}static multiply(e,t){return new o(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new o(new Uint32Array(e.buffer)).plus(t)}}t.Uint64=o;class a extends s{negate(){return this.buffer[0]=1+~this.buffer[0],this.buffer[1]=~this.buffer[1],0==this.buffer[0]&&++this.buffer[1],this}times(e){return this._times(e),this}plus(e){return this._plus(e),this}lessThan(e){const t=this.buffer[1]<<0,r=e.buffer[1]<<0;return t<r||t===r&&this.buffer[0]<e.buffer[0]}static from(e,t=new Uint32Array(2)){return a.fromString("string"==typeof e?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return a.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){const r=e.startsWith("-"),i=e.length,s=new a(t);for(let t=r?1:0;t<i;){const r=8<i-t?8:i-t,o=new a(new Uint32Array([parseInt(e.substr(t,r),10),0])),c=new a(new Uint32Array([n[r],0]));s.times(c),s.plus(o),t+=r}return r?s.negate():s}static convertArray(e){const t=new Uint32Array(2*e.length);for(let r=-1,i=e.length;++r<i;)a.from(e[r],new Uint32Array(t.buffer,t.byteOffset+2*r*4,2));return t}static multiply(e,t){return new a(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new a(new Uint32Array(e.buffer)).plus(t)}}t.Int64=a;class c{constructor(e){this.buffer=e}high(){return new a(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2))}low(){return new a(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset,2))}negate(){return this.buffer[0]=1+~this.buffer[0],this.buffer[1]=~this.buffer[1],this.buffer[2]=~this.buffer[2],this.buffer[3]=~this.buffer[3],0==this.buffer[0]&&++this.buffer[1],0==this.buffer[1]&&++this.buffer[2],0==this.buffer[2]&&++this.buffer[3],this}times(e){const t=new o(new Uint32Array([this.buffer[3],0])),r=new o(new Uint32Array([this.buffer[2],0])),i=new o(new Uint32Array([this.buffer[1],0])),n=new o(new Uint32Array([this.buffer[0],0])),s=new o(new Uint32Array([e.buffer[3],0])),a=new o(new Uint32Array([e.buffer[2],0])),c=new o(new Uint32Array([e.buffer[1],0])),u=new o(new Uint32Array([e.buffer[0],0]));let l=o.multiply(n,u);this.buffer[0]=l.low();const d=new o(new Uint32Array([l.high(),0]));l=o.multiply(i,u),d.plus(l),l=o.multiply(n,c),d.plus(l),this.buffer[1]=d.low(),this.buffer[3]=d.lessThan(l)?1:0,this.buffer[2]=d.high();return new o(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2)).plus(o.multiply(r,u)).plus(o.multiply(i,c)).plus(o.multiply(n,a)),this.buffer[3]+=o.multiply(t,u).plus(o.multiply(r,c)).plus(o.multiply(i,a)).plus(o.multiply(n,s)).low(),this}plus(e){const t=new Uint32Array(4);return t[3]=this.buffer[3]+e.buffer[3]>>>0,t[2]=this.buffer[2]+e.buffer[2]>>>0,t[1]=this.buffer[1]+e.buffer[1]>>>0,t[0]=this.buffer[0]+e.buffer[0]>>>0,t[0]<this.buffer[0]>>>0&&++t[1],t[1]<this.buffer[1]>>>0&&++t[2],t[2]<this.buffer[2]>>>0&&++t[3],this.buffer[3]=t[3],this.buffer[2]=t[2],this.buffer[1]=t[1],this.buffer[0]=t[0],this}hex(){return`${i(this.buffer[3])} ${i(this.buffer[2])} ${i(this.buffer[1])} ${i(this.buffer[0])}`}static multiply(e,t){return new c(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new c(new Uint32Array(e.buffer)).plus(t)}static from(e,t=new Uint32Array(4)){return c.fromString("string"==typeof e?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(4)){return c.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(4)){const r=e.startsWith("-"),i=e.length,s=new c(t);for(let t=r?1:0;t<i;){const r=8<i-t?8:i-t,o=new c(new Uint32Array([parseInt(e.substr(t,r),10),0,0,0])),a=new c(new Uint32Array([n[r],0,0,0]));s.times(a),s.plus(o),t+=r}return r?s.negate():s}static convertArray(e){const t=new Uint32Array(4*e.length);for(let r=-1,i=e.length;++r<i;)c.from(e[r],new Uint32Array(t.buffer,t.byteOffset+16*r,4));return t}}t.Int128=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compareTypes=t.compareFields=t.compareSchemas=t.instance=t.TypeComparator=void 0;const i=r(8);class n extends i.Visitor{compareSchemas(e,t){return e===t||t instanceof e.constructor&&this.compareManyFields(e.fields,t.fields)}compareManyFields(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((e,r)=>this.compareFields(e,t[r]))}compareFields(e,t){return e===t||t instanceof e.constructor&&e.name===t.name&&e.nullable===t.nullable&&this.visit(e.type,t.type)}}function s(e,t){return t instanceof e.constructor}function o(e,t){return e===t||s(e,t)}function a(e,t){return e===t||s(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function c(e,t){return e===t||s(e,t)&&e.precision===t.precision}function u(e,t){return e===t||s(e,t)&&e.unit===t.unit}function l(e,t){return e===t||s(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function d(e,t){return e===t||s(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function h(e,r){return e===r||s(e,r)&&e.mode===r.mode&&e.typeIds.every((e,t)=>e===r.typeIds[t])&&t.instance.compareManyFields(e.children,r.children)}function f(e,t){return e===t||s(e,t)&&e.unit===t.unit}t.TypeComparator=n,n.prototype.visitNull=o,n.prototype.visitBool=o,n.prototype.visitInt=a,n.prototype.visitInt8=a,n.prototype.visitInt16=a,n.prototype.visitInt32=a,n.prototype.visitInt64=a,n.prototype.visitUint8=a,n.prototype.visitUint16=a,n.prototype.visitUint32=a,n.prototype.visitUint64=a,n.prototype.visitFloat=c,n.prototype.visitFloat16=c,n.prototype.visitFloat32=c,n.prototype.visitFloat64=c,n.prototype.visitUtf8=o,n.prototype.visitBinary=o,n.prototype.visitFixedSizeBinary=function(e,t){return e===t||s(e,t)&&e.byteWidth===t.byteWidth},n.prototype.visitDate=u,n.prototype.visitDateDay=u,n.prototype.visitDateMillisecond=u,n.prototype.visitTimestamp=l,n.prototype.visitTimestampSecond=l,n.prototype.visitTimestampMillisecond=l,n.prototype.visitTimestampMicrosecond=l,n.prototype.visitTimestampNanosecond=l,n.prototype.visitTime=d,n.prototype.visitTimeSecond=d,n.prototype.visitTimeMillisecond=d,n.prototype.visitTimeMicrosecond=d,n.prototype.visitTimeNanosecond=d,n.prototype.visitDecimal=o,n.prototype.visitList=function(e,r){return e===r||s(e,r)&&e.children.length===r.children.length&&t.instance.compareManyFields(e.children,r.children)},n.prototype.visitStruct=function(e,r){return e===r||s(e,r)&&e.children.length===r.children.length&&t.instance.compareManyFields(e.children,r.children)},n.prototype.visitUnion=h,n.prototype.visitDenseUnion=h,n.prototype.visitSparseUnion=h,n.prototype.visitDictionary=function(e,r){return e===r||s(e,r)&&e.id===r.id&&e.isOrdered===r.isOrdered&&t.instance.visit(e.indices,r.indices)&&t.instance.visit(e.dictionary,r.dictionary)},n.prototype.visitInterval=f,n.prototype.visitIntervalDayTime=f,n.prototype.visitIntervalYearMonth=f,n.prototype.visitFixedSizeList=function(e,r){return e===r||s(e,r)&&e.listSize===r.listSize&&e.children.length===r.children.length&&t.instance.compareManyFields(e.children,r.children)},n.prototype.visitMap=function(e,r){return e===r||s(e,r)&&e.keysSorted===r.keysSorted&&e.children.length===r.children.length&&t.instance.compareManyFields(e.children,r.children)},t.instance=new n,t.compareSchemas=function(e,r){return t.instance.compareSchemas(e,r)},t.compareFields=function(e,r){return t.instance.compareFields(e,r)},t.compareTypes=function(e,r){return t.instance.visit(e,r)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distributeVectorsIntoRecordBatches=t.distributeColumnsIntoRecordBatches=t.ensureSameLengthData=void 0;const i=r(10),n=r(6),s=r(19),o=r(15),a=new Uint8Array(0),c=e=>[a,a,new Uint8Array(e),a];function u(e,t){return function(e,t){const r=[...e.fields],i=[],s={numBatches:t.reduce((e,t)=>Math.max(e,t.length),0)};let a=0,c=0,u=-1;const d=t.length;let h,f=[];for(;s.numBatches-- >0;){for(c=Number.POSITIVE_INFINITY,u=-1;++u<d;)f[u]=h=t[u].shift(),c=Math.min(c,h?h.length:c);isFinite(c)&&(f=l(r,c,f,t,s),c>0&&(i[a++]=[c,f.slice()]))}return[e=new n.Schema(r,e.metadata),i.map(t=>new o.RecordBatch(e,...t))]}(e,t.map(e=>e instanceof s.Chunked?e.chunks.map(e=>e.data):[e.data]))}function l(e,t,r,n,s){let o,a,u=0,l=-1;const d=n.length,h=(t+63&-64)>>3;for(;++l<d;)(o=r[l])&&(u=o.length)>=t?u===t?r[l]=o:(r[l]=o.slice(0,t),o=o.slice(t,u-t),s.numBatches=Math.max(s.numBatches,n[l].unshift(o))):((a=e[l]).nullable||(e[l]=a.clone({nullable:!0})),r[l]=o?o._changeLengthAndBackfillNullBitmap(t):i.Data.new(a.type,0,t,t,c(h)));return r}t.ensureSameLengthData=function(e,t,r=t.reduce((e,t)=>Math.max(e,t.length),0)){let s,o,a=-1;const u=t.length,l=[...e.fields],d=[],h=(r+63&-64)>>3;for(;++a<u;)(s=t[a])&&s.length===r?d[a]=s:((o=l[a]).nullable||(l[a]=l[a].clone({nullable:!0})),d[a]=s?s._changeLengthAndBackfillNullBitmap(r):i.Data.new(o.type,0,r,r,c(h)));return[new n.Schema(l),r,d]},t.distributeColumnsIntoRecordBatches=function(e){return u(new n.Schema(e.map(({field:e})=>e)),e)},t.distributeVectorsIntoRecordBatches=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BinaryVector=void 0;const i=r(3),n=r(4),s=r(0);class o extends n.BaseVector{asUtf8(){return i.Vector.new(this.data.clone(new s.Utf8))}}t.BinaryVector=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BoolVector=void 0;const i=r(0),n=r(4),s=r(13);class o extends n.BaseVector{static from(e){return s.vectorFromValuesWithType(()=>new i.Bool,e)}}t.BoolVector=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DateMillisecondVector=t.DateDayVector=t.DateVector=void 0;const i=r(1),n=r(4),s=r(13),o=r(0);class a extends n.BaseVector{static from(...e){return 2===e.length?s.vectorFromValuesWithType(()=>e[1]===i.DateUnit.DAY?new o.DateDay:new o.DateMillisecond,e[0]):s.vectorFromValuesWithType(()=>new o.DateMillisecond,e[0])}}t.DateVector=a;t.DateDayVector=class extends a{};t.DateMillisecondVector=class extends a{}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DecimalVector=void 0;const i=r(4);class n extends i.BaseVector{}t.DecimalVector=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FixedSizeBinaryVector=void 0;const i=r(4);class n extends i.BaseVector{}t.FixedSizeBinaryVector=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FixedSizeListVector=void 0;const i=r(4);class n extends i.BaseVector{}t.FixedSizeListVector=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Float64Vector=t.Float32Vector=t.Float16Vector=t.FloatVector=void 0;const i=r(10),n=r(3),s=r(4),o=r(13),a=r(0);class c extends s.BaseVector{static from(e){let t=p(this);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)){const r=f(e.constructor)||t;if(null===t&&(t=r),t&&t===r){const r=new t,s=e.byteLength/r.ArrayType.BYTES_PER_ELEMENT;if(!h(t,e.constructor))return n.Vector.new(i.Data.Float(r,0,s,0,null,e))}}if(t)return o.vectorFromValuesWithType(()=>new t,e);if(e instanceof DataView||e instanceof ArrayBuffer)throw new TypeError("Cannot infer float type from instance of "+e.constructor.name);throw new TypeError("Unrecognized FloatVector input")}}t.FloatVector=c;class u extends c{toFloat32Array(){return new Float32Array(this)}toFloat64Array(){return new Float64Array(this)}}t.Float16Vector=u;class l extends c{}t.Float32Vector=l;class d extends c{}t.Float64Vector=d;const h=(e,t)=>e===a.Float16&&t!==Uint16Array,f=e=>{switch(e){case Uint16Array:return a.Float16;case Float32Array:return a.Float32;case Float64Array:return a.Float64;default:return null}},p=e=>{switch(e){case u:return a.Float16;case l:return a.Float32;case d:return a.Float64;default:return null}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IntervalYearMonthVector=t.IntervalDayTimeVector=t.IntervalVector=void 0;const i=r(4);class n extends i.BaseVector{}t.IntervalVector=n;t.IntervalDayTimeVector=class extends n{};t.IntervalYearMonthVector=class extends n{}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListVector=void 0;const i=r(4);class n extends i.BaseVector{}t.ListVector=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MapVector=void 0;const i=r(31),n=r(3),s=r(4),o=r(0);class a extends s.BaseVector{asList(){const e=this.type.children[0];return n.Vector.new(this.data.clone(new o.List(e)))}bind(e){const t=this.getChildAt(0),{[e]:r,[e+1]:n}=this.valueOffsets;return new i.MapRow(t.slice(r,n))}}t.MapVector=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NullVector=void 0;const i=r(4);class n extends i.BaseVector{}t.NullVector=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StructVector=void 0;const i=r(31),n=r(4),s=Symbol.for("rowIndex");class o extends n.BaseVector{bind(e){const t=this._row||(this._row=new i.StructRow(this)),r=Object.create(t);return r[s]=e,r}}t.StructVector=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimestampNanosecondVector=t.TimestampMicrosecondVector=t.TimestampMillisecondVector=t.TimestampSecondVector=t.TimestampVector=void 0;const i=r(4);class n extends i.BaseVector{}t.TimestampVector=n;t.TimestampSecondVector=class extends n{};t.TimestampMillisecondVector=class extends n{};t.TimestampMicrosecondVector=class extends n{};t.TimestampNanosecondVector=class extends n{}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeNanosecondVector=t.TimeMicrosecondVector=t.TimeMillisecondVector=t.TimeSecondVector=t.TimeVector=void 0;const i=r(4);class n extends i.BaseVector{}t.TimeVector=n;t.TimeSecondVector=class extends n{};t.TimeMillisecondVector=class extends n{};t.TimeMicrosecondVector=class extends n{};t.TimeNanosecondVector=class extends n{}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SparseUnionVector=t.DenseUnionVector=t.UnionVector=void 0;const i=r(4);class n extends i.BaseVector{get typeIdToChildIndex(){return this.data.type.typeIdToChildIndex}}t.UnionVector=n;t.DenseUnionVector=class extends n{get valueOffsets(){return this.data.valueOffsets}};t.SparseUnionVector=class extends n{}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Utf8Vector=void 0;const i=r(3),n=r(4),s=r(0),o=r(13);class a extends n.BaseVector{static from(e){return o.vectorFromValuesWithType(()=>new s.Utf8,e)}asBinary(){return i.Vector.new(this.data.clone(new s.Binary))}}t.Utf8Vector=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.instance=t.GetVisitor=void 0;const i=r(27),n=r(8),s=r(20),o=r(26),a=r(1);class c extends n.Visitor{}t.GetVisitor=c;const u=(e,t)=>4294967296*e[t+1]+(e[t]>>>0),l=e=>new Date(e),d=(e,t,r)=>{const{[r]:i,[r+1]:n}=t;return null!=i&&null!=n?e.subarray(i,n):null},h=({values:e},t)=>((e,t)=>l(((e,t)=>864e5*e[t])(e,t)))(e,t),f=({values:e},t)=>((e,t)=>l(u(e,t)))(e,2*t),p=({stride:e,values:t},r)=>t[e*r],y=({stride:e,values:t},r)=>o.uint16ToFloat64(t[e*r]),b=({stride:e,values:t,type:r},n)=>i.BN.new(t.subarray(e*n,e*(n+1)),r.isSigned),m=({values:e},t)=>1e3*u(e,2*t),g=({values:e},t)=>u(e,2*t),_=({values:e},t)=>((e,t)=>e[t+1]/1e3*4294967296+(e[t]>>>0)/1e3)(e,2*t),B=({values:e},t)=>((e,t)=>e[t+1]/1e6*4294967296+(e[t]>>>0)/1e6)(e,2*t),v=({values:e,stride:t},r)=>e[t*r],T=({values:e,stride:t},r)=>e[t*r],I=({values:e},t)=>i.BN.signed(e.subarray(2*t,2*(t+1))),w=({values:e},t)=>i.BN.signed(e.subarray(2*t,2*(t+1))),S=(e,t)=>{const r=e.typeIdToChildIndex[e.typeIds[t]],i=e.getChildAt(r);return i?i.get(e.valueOffsets[t]):null},O=(e,t)=>{const r=e.typeIdToChildIndex[e.typeIds[t]],i=e.getChildAt(r);return i?i.get(t):null},A=({values:e},t)=>e.subarray(2*t,2*(t+1)),D=({values:e},t)=>{const r=e[t],i=new Int32Array(2);return i[0]=r/12|0,i[1]=r%12|0,i};c.prototype.visitNull=(e,t)=>null,c.prototype.visitBool=({offset:e,values:t},r)=>{const i=e+r;return 0!=(t[i>>3]&1<<i%8)},c.prototype.visitInt=(e,t)=>e.type.bitWidth<64?p(e,t):b(e,t),c.prototype.visitInt8=p,c.prototype.visitInt16=p,c.prototype.visitInt32=p,c.prototype.visitInt64=b,c.prototype.visitUint8=p,c.prototype.visitUint16=p,c.prototype.visitUint32=p,c.prototype.visitUint64=b,c.prototype.visitFloat=(e,t)=>e.type.precision!==a.Precision.HALF?p(e,t):y(e,t),c.prototype.visitFloat16=y,c.prototype.visitFloat32=p,c.prototype.visitFloat64=p,c.prototype.visitUtf8=({values:e,valueOffsets:t},r)=>{const i=d(e,t,r);return null!==i?s.decodeUtf8(i):null},c.prototype.visitBinary=({values:e,valueOffsets:t},r)=>d(e,t,r),c.prototype.visitFixedSizeBinary=({stride:e,values:t},r)=>t.subarray(e*r,e*(r+1)),c.prototype.visitDate=(e,t)=>e.type.unit===a.DateUnit.DAY?h(e,t):f(e,t),c.prototype.visitDateDay=h,c.prototype.visitDateMillisecond=f,c.prototype.visitTimestamp=(e,t)=>{switch(e.type.unit){case a.TimeUnit.SECOND:return m(e,t);case a.TimeUnit.MILLISECOND:return g(e,t);case a.TimeUnit.MICROSECOND:return _(e,t);case a.TimeUnit.NANOSECOND:return B(e,t)}},c.prototype.visitTimestampSecond=m,c.prototype.visitTimestampMillisecond=g,c.prototype.visitTimestampMicrosecond=_,c.prototype.visitTimestampNanosecond=B,c.prototype.visitTime=(e,t)=>{switch(e.type.unit){case a.TimeUnit.SECOND:return v(e,t);case a.TimeUnit.MILLISECOND:return T(e,t);case a.TimeUnit.MICROSECOND:return I(e,t);case a.TimeUnit.NANOSECOND:return w(e,t)}},c.prototype.visitTimeSecond=v,c.prototype.visitTimeMillisecond=T,c.prototype.visitTimeMicrosecond=I,c.prototype.visitTimeNanosecond=w,c.prototype.visitDecimal=({values:e},t)=>i.BN.decimal(e.subarray(4*t,4*(t+1))),c.prototype.visitList=(e,t)=>{const r=e.getChildAt(0),{valueOffsets:i,stride:n}=e;return r.slice(i[t*n],i[t*n+1])},c.prototype.visitStruct=(e,t)=>e.bind(t),c.prototype.visitUnion=(e,t)=>e.type.mode===a.UnionMode.Dense?S(e,t):O(e,t),c.prototype.visitDenseUnion=S,c.prototype.visitSparseUnion=O,c.prototype.visitDictionary=(e,t)=>e.getValue(e.getKey(t)),c.prototype.visitInterval=(e,t)=>e.type.unit===a.IntervalUnit.DAY_TIME?A(e,t):D(e,t),c.prototype.visitIntervalDayTime=A,c.prototype.visitIntervalYearMonth=D,c.prototype.visitFixedSizeList=(e,t)=>{const r=e.getChildAt(0),{stride:i}=e;return r.slice(t*i,(t+1)*i)},c.prototype.visitMap=(e,t)=>e.bind(t),t.instance=new c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.instance=t.IteratorVisitor=void 0;const i=r(1),n=r(8),s=r(12),o=r(81);class a extends n.Visitor{}t.IteratorVisitor=a;class c{constructor(e,t){this.vector=e,this.getFn=t,this.index=0}next(){return this.index<this.vector.length?{value:this.getFn(this.vector,this.index++)}:{done:!0,value:null}}[Symbol.iterator](){return this}}function u(e){if(e.nullCount>0)return function(e){const t=o.instance.getVisitFn(e);return new s.BitIterator(e.data.nullBitmap,e.data.offset,e.length,e,(e,r,i,n)=>0!=(i&1<<n)?t(e,r):null)}(e);const{type:t,typeId:r,length:n}=e;return 1===e.stride&&(r===i.Type.Timestamp||r===i.Type.Int&&64!==t.bitWidth||r===i.Type.Time&&64!==t.bitWidth||r===i.Type.Float&&t.precision>0)?e.data.values.subarray(0,n)[Symbol.iterator]():new c(e,o.instance.getVisitFn(e))}a.prototype.visitNull=u,a.prototype.visitBool=u,a.prototype.visitInt=u,a.prototype.visitInt8=u,a.prototype.visitInt16=u,a.prototype.visitInt32=u,a.prototype.visitInt64=u,a.prototype.visitUint8=u,a.prototype.visitUint16=u,a.prototype.visitUint32=u,a.prototype.visitUint64=u,a.prototype.visitFloat=u,a.prototype.visitFloat16=u,a.prototype.visitFloat32=u,a.prototype.visitFloat64=u,a.prototype.visitUtf8=u,a.prototype.visitBinary=u,a.prototype.visitFixedSizeBinary=u,a.prototype.visitDate=u,a.prototype.visitDateDay=u,a.prototype.visitDateMillisecond=u,a.prototype.visitTimestamp=u,a.prototype.visitTimestampSecond=u,a.prototype.visitTimestampMillisecond=u,a.prototype.visitTimestampMicrosecond=u,a.prototype.visitTimestampNanosecond=u,a.prototype.visitTime=u,a.prototype.visitTimeSecond=u,a.prototype.visitTimeMillisecond=u,a.prototype.visitTimeMicrosecond=u,a.prototype.visitTimeNanosecond=u,a.prototype.visitDecimal=u,a.prototype.visitList=u,a.prototype.visitStruct=u,a.prototype.visitUnion=u,a.prototype.visitDenseUnion=u,a.prototype.visitSparseUnion=u,a.prototype.visitDictionary=u,a.prototype.visitInterval=u,a.prototype.visitIntervalDayTime=u,a.prototype.visitIntervalYearMonth=u,a.prototype.visitFixedSizeList=u,a.prototype.visitMap=u,t.instance=new a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.custom=t.or=t.and=t.col=t.lit=t.CustomPredicate=t.Not=t.GTeq=t.LTeq=t.Equals=t.Or=t.And=t.CombinationPredicate=t.ComparisonPredicate=t.Predicate=t.Col=t.Literal=t.Value=void 0;const i=r(39);class n{eq(e){return e instanceof n||(e=new s(e)),new h(this,e)}le(e){return e instanceof n||(e=new s(e)),new f(this,e)}ge(e){return e instanceof n||(e=new s(e)),new p(this,e)}lt(e){return new y(this.ge(e))}gt(e){return new y(this.le(e))}ne(e){return new y(this.eq(e))}}t.Value=n;class s extends n{constructor(e){super(),this.v=e}}t.Literal=s;class o extends n{constructor(e){super(),this.name=e}bind(e){if(!this.colidx){this.colidx=-1;const t=e.schema.fields;for(let e=-1;++e<t.length;)if(t[e].name===this.name){this.colidx=e;break}if(this.colidx<0)throw new Error(`Failed to bind Col "${this.name}"`)}const t=this.vector=e.getChildAt(this.colidx);return e=>t.get(e)}}t.Col=o;class a{and(...e){return new l(this,...e)}or(...e){return new d(this,...e)}not(){return new y(this)}}t.Predicate=a;class c extends a{constructor(e,t){super(),this.left=e,this.right=t}bind(e){return this.left instanceof s?this.right instanceof s?this._bindLitLit(e,this.left,this.right):this._bindLitCol(e,this.left,this.right):this.right instanceof s?this._bindColLit(e,this.left,this.right):this._bindColCol(e,this.left,this.right)}}t.ComparisonPredicate=c;class u extends a{constructor(...e){super(),this.children=e}}t.CombinationPredicate=u,u.prototype.children=Object.freeze([]);class l extends u{constructor(...e){e=e.reduce((e,t)=>e.concat(t instanceof l?t.children:t),[]),super(...e)}bind(e){const t=this.children.map(t=>t.bind(e));return(e,r)=>t.every(t=>t(e,r))}}t.And=l;class d extends u{constructor(...e){e=e.reduce((e,t)=>e.concat(t instanceof d?t.children:t),[]),super(...e)}bind(e){const t=this.children.map(t=>t.bind(e));return(e,r)=>t.some(t=>t(e,r))}}t.Or=d;class h extends c{_bindLitLit(e,t,r){const i=t.v==r.v;return()=>i}_bindColCol(e,t,r){const i=t.bind(e),n=r.bind(e);return(e,t)=>i(e,t)==n(e,t)}_bindColLit(e,t,r){const n=t.bind(e);if(t.vector instanceof i.DictionaryVector){let e;const i=t.vector;return i.dictionary!==this.lastDictionary?(e=i.reverseLookup(r.v),this.lastDictionary=i.dictionary,this.lastKey=e):e=this.lastKey,-1===e?()=>!1:t=>i.getKey(t)===e}return(e,t)=>n(e,t)==r.v}_bindLitCol(e,t,r){return this._bindColLit(e,r,t)}}t.Equals=h;class f extends c{_bindLitLit(e,t,r){const i=t.v<=r.v;return()=>i}_bindColCol(e,t,r){const i=t.bind(e),n=r.bind(e);return(e,t)=>i(e,t)<=n(e,t)}_bindColLit(e,t,r){const i=t.bind(e);return(e,t)=>i(e,t)<=r.v}_bindLitCol(e,t,r){const i=r.bind(e);return(e,r)=>t.v<=i(e,r)}}t.LTeq=f;class p extends c{_bindLitLit(e,t,r){const i=t.v>=r.v;return()=>i}_bindColCol(e,t,r){const i=t.bind(e),n=r.bind(e);return(e,t)=>i(e,t)>=n(e,t)}_bindColLit(e,t,r){const i=t.bind(e);return(e,t)=>i(e,t)>=r.v}_bindLitCol(e,t,r){const i=r.bind(e);return(e,r)=>t.v>=i(e,r)}}t.GTeq=p;class y extends a{constructor(e){super(),this.child=e}bind(e){const t=this.child.bind(e);return(e,r)=>!t(e,r)}}t.Not=y;class b extends a{constructor(e,t){super(),this.next=e,this.bind_=t}bind(e){return this.bind_(e),this.next}}t.CustomPredicate=b,t.lit=function(e){return new s(e)},t.col=function(e){return new o(e)},t.and=function(...e){return new l(...e)},t.or=function(...e){return new d(...e)},t.custom=function(e,t){return new b(e,t)}},function(e,t,r){const i=r(105);globalThis.loaders=globalThis.loaders||{},e.exports=Object.assign(globalThis.loaders,i)},function(e,t,r){"use strict";function i(e,t,r){return t<=e&&e<=r}function n(e){if(void 0===e)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function s(e){this.tokens=[].slice.call(e)}s.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():-1},prepend:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(e)},push:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.push(t.shift());else this.tokens.push(e)}};function o(e,t){if(e)throw TypeError("Decoder error");return t||65533}function a(e,t){if(!(this instanceof a))return new a(e,t);if("utf-8"!==(e=void 0!==e?String(e).toLowerCase():"utf-8"))throw new Error("Encoding not supported. Only utf-8 is supported");t=n(t),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=Boolean(t.fatal),this._ignoreBOM=Boolean(t.ignoreBOM),Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}function c(e,t){if(!(this instanceof c))return new c(e,t);if("utf-8"!==(e=void 0!==e?String(e).toLowerCase():"utf-8"))throw new Error("Encoding not supported. Only utf-8 is supported");t=n(t),this._streaming=!1,this._encoder=null,this._options={fatal:Boolean(t.fatal)},Object.defineProperty(this,"encoding",{value:"utf-8"})}function u(e){var t=e.fatal,r=0,n=0,s=0,a=128,c=191;this.handler=function(e,u){if(-1===u&&0!==s)return s=0,o(t);if(-1===u)return-1;if(0===s){if(i(u,0,127))return u;if(i(u,194,223))s=1,r=u-192;else if(i(u,224,239))224===u&&(a=160),237===u&&(c=159),s=2,r=u-224;else{if(!i(u,240,244))return o(t);240===u&&(a=144),244===u&&(c=143),s=3,r=u-240}return r<<=6*s,null}if(!i(u,a,c))return r=s=n=0,a=128,c=191,e.prepend(u),o(t);if(a=128,c=191,r+=u-128<<6*(s-(n+=1)),n!==s)return null;var l=r;return r=s=n=0,l}}function l(e){e.fatal;this.handler=function(e,t){if(-1===t)return-1;if(i(t,0,127))return t;var r,n;i(t,128,2047)?(r=1,n=192):i(t,2048,65535)?(r=2,n=224):i(t,65536,1114111)&&(r=3,n=240);for(var s=[(t>>6*r)+n];r>0;){var o=t>>6*(r-1);s.push(128|63&o),r-=1}return s}}a.prototype={decode:function(e,t){var r;r="object"==typeof e&&e instanceof ArrayBuffer?new Uint8Array(e):"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(0),t=n(t),this._streaming||(this._decoder=new u({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(t.stream);for(var i,o=new s(r),a=[];!o.endOfStream()&&-1!==(i=this._decoder.handler(o,o.read()));)null!==i&&(Array.isArray(i)?a.push.apply(a,i):a.push(i));if(!this._streaming){do{if(-1===(i=this._decoder.handler(o,o.read())))break;null!==i&&(Array.isArray(i)?a.push.apply(a,i):a.push(i))}while(!o.endOfStream());this._decoder=null}return a.length&&(-1===["utf-8"].indexOf(this.encoding)||this._ignoreBOM||this._BOMseen||(65279===a[0]?(this._BOMseen=!0,a.shift()):this._BOMseen=!0)),function(e){for(var t="",r=0;r<e.length;++r){var i=e[r];i<=65535?t+=String.fromCharCode(i):(i-=65536,t+=String.fromCharCode(55296+(i>>10),56320+(1023&i)))}return t}(a)}},c.prototype={encode:function(e,t){e=e?String(e):"",t=n(t),this._streaming||(this._encoder=new l(this._options)),this._streaming=Boolean(t.stream);for(var r,i=[],o=new s(function(e){for(var t=String(e),r=t.length,i=0,n=[];i<r;){var s=t.charCodeAt(i);if(s<55296||s>57343)n.push(s);else if(56320<=s&&s<=57343)n.push(65533);else if(55296<=s&&s<=56319)if(i===r-1)n.push(65533);else{var o=e.charCodeAt(i+1);if(56320<=o&&o<=57343){var a=1023&s,c=1023&o;n.push(65536+(a<<10)+c),i+=1}else n.push(65533)}i+=1}return n}(e));!o.endOfStream()&&-1!==(r=this._encoder.handler(o,o.read()));)Array.isArray(r)?i.push.apply(i,r):i.push(r);if(!this._streaming){for(;-1!==(r=this._encoder.handler(o,o.read()));)Array.isArray(r)?i.push.apply(i,r):i.push(r);this._encoder=null}return new Uint8Array(i)}},t.TextEncoder=c,t.TextDecoder=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createIsValidFunction=void 0;const i=r(41),n=r(9);t.createIsValidFunction=function(e){if(!e||e.length<=0)return function(e){return!0};let t="";const r=e.filter(e=>e==e);return r.length>0&&(t=`\n switch (x) {${r.map(e=>`\n case ${function(e){if("bigint"!=typeof e)return i.valueToString(e);if(n.BigIntAvailable)return i.valueToString(e)+"n";return`"${i.valueToString(e)}"`}(e)}:`).join("")}\n return false;\n }`),e.length!==r.length&&(t="if (x !== x) return false;\n"+t),new Function("x",t+"\nreturn true;")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.instance=t.GetBuilderCtor=void 0;const i=r(8),n=r(36),s=r(42),o=r(44),a=r(45),c=r(46),u=r(47),l=r(55),d=r(48),h=r(52),f=r(49),p=r(53),y=r(56),b=r(43),m=r(57),g=r(51),_=r(50),B=r(58),v=r(35);class T extends i.Visitor{visitNull(){return b.NullBuilder}visitBool(){return s.BoolBuilder}visitInt(){return f.IntBuilder}visitInt8(){return f.Int8Builder}visitInt16(){return f.Int16Builder}visitInt32(){return f.Int32Builder}visitInt64(){return f.Int64Builder}visitUint8(){return f.Uint8Builder}visitUint16(){return f.Uint16Builder}visitUint32(){return f.Uint32Builder}visitUint64(){return f.Uint64Builder}visitFloat(){return d.FloatBuilder}visitFloat16(){return d.Float16Builder}visitFloat32(){return d.Float32Builder}visitFloat64(){return d.Float64Builder}visitUtf8(){return v.Utf8Builder}visitBinary(){return n.BinaryBuilder}visitFixedSizeBinary(){return u.FixedSizeBinaryBuilder}visitDate(){return o.DateBuilder}visitDateDay(){return o.DateDayBuilder}visitDateMillisecond(){return o.DateMillisecondBuilder}visitTimestamp(){return g.TimestampBuilder}visitTimestampSecond(){return g.TimestampSecondBuilder}visitTimestampMillisecond(){return g.TimestampMillisecondBuilder}visitTimestampMicrosecond(){return g.TimestampMicrosecondBuilder}visitTimestampNanosecond(){return g.TimestampNanosecondBuilder}visitTime(){return _.TimeBuilder}visitTimeSecond(){return _.TimeSecondBuilder}visitTimeMillisecond(){return _.TimeMillisecondBuilder}visitTimeMicrosecond(){return _.TimeMicrosecondBuilder}visitTimeNanosecond(){return _.TimeNanosecondBuilder}visitDecimal(){return a.DecimalBuilder}visitList(){return p.ListBuilder}visitStruct(){return m.StructBuilder}visitUnion(){return B.UnionBuilder}visitDenseUnion(){return B.DenseUnionBuilder}visitSparseUnion(){return B.SparseUnionBuilder}visitDictionary(){return c.DictionaryBuilder}visitInterval(){return h.IntervalBuilder}visitIntervalDayTime(){return h.IntervalDayTimeBuilder}visitIntervalYearMonth(){return h.IntervalYearMonthBuilder}visitFixedSizeList(){return l.FixedSizeListBuilder}visitMap(){return y.MapBuilder}}t.GetBuilderCtor=T,t.instance=new T},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Block=t.Footer=void 0;const i=r(14),n=r(16);class s{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFooter(e,t){return(t||new s).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFooter(e,t){return e.setPosition(e.position()+i.flatbuffers.SIZE_PREFIX_LENGTH),(t||new s).__init(e.readInt32(e.position())+e.position(),e)}version(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):n.MetadataVersion.V1}schema(e){const t=this.bb.__offset(this.bb_pos,6);return t?(e||new n.Schema).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}dictionaries(e,t){const r=this.bb.__offset(this.bb_pos,8);return r?(t||new o).__init(this.bb.__vector(this.bb_pos+r)+24*e,this.bb):null}dictionariesLength(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}recordBatches(e,t){const r=this.bb.__offset(this.bb_pos,10);return r?(t||new o).__init(this.bb.__vector(this.bb_pos+r)+24*e,this.bb):null}recordBatchesLength(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){const r=this.bb.__offset(this.bb_pos,12);return r?(t||new n.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+4*e),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startFooter(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,n.MetadataVersion.V1)}static addSchema(e,t){e.addFieldOffset(1,t,0)}static addDictionaries(e,t){e.addFieldOffset(2,t,0)}static startDictionariesVector(e,t){e.startVector(24,t,8)}static addRecordBatches(e,t){e.addFieldOffset(3,t,0)}static startRecordBatchesVector(e,t){e.startVector(24,t,8)}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endFooter(e){return e.endObject()}static finishFooterBuffer(e,t){e.finish(t)}static finishSizePrefixedFooterBuffer(e,t){e.finish(t,void 0,!0)}static createFooter(e,t,r,i,n,o){return s.startFooter(e),s.addVersion(e,t),s.addSchema(e,r),s.addDictionaries(e,i),s.addRecordBatches(e,n),s.addCustomMetadata(e,o),s.endFooter(e)}}t.Footer=s;class o{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static createBlock(e,t,r,i){return e.prep(8,24),e.writeInt64(i),e.pad(4),e.writeInt32(r),e.writeInt64(t),e.offset()}}t.Block=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSONVectorLoader=t.VectorLoader=void 0;const i=r(10),n=r(6),s=r(0),o=r(8),a=r(12),c=r(20),u=r(62),l=r(1),d=r(5);class h extends o.Visitor{constructor(e,t,r,i){super(),this.nodesIndex=-1,this.buffersIndex=-1,this.bytes=e,this.nodes=t,this.buffers=r,this.dictionaries=i}visit(e){return super.visit(e instanceof n.Field?e.type:e)}visitNull(e,{length:t}=this.nextFieldNode()){return i.Data.Null(e,0,t)}visitBool(e,{length:t,nullCount:r}=this.nextFieldNode()){return i.Data.Bool(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitInt(e,{length:t,nullCount:r}=this.nextFieldNode()){return i.Data.Int(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitFloat(e,{length:t,nullCount:r}=this.nextFieldNode()){return i.Data.Float(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitUtf8(e,{length:t,nullCount:r}=this.nextFieldNode()){return i.Data.Utf8(e,0,t,r,this.readNullBitmap(e,r),this.readOffsets(e),this.readData(e))}visitBinary(e,{length:t,nullCount:r}=this.nextFieldNode()){return i.Data.Binary(e,0,t,r,this.readNullBitmap(e,r),this.readOffsets(e),this.readData(e))}visitFixedSizeBinary(e,{length:t,nullCount:r}=this.nextFieldNode()){return i.Data.FixedSizeBinary(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitDate(e,{length:t,nullCount:r}=this.nextFieldNode()){return i.Data.Date(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitTimestamp(e,{length:t,nullCount:r}=this.nextFieldNode()){return i.Data.Timestamp(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitTime(e,{length:t,nullCount:r}=this.nextFieldNode()){return i.Data.Time(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitDecimal(e,{length:t,nullCount:r}=this.nextFieldNode()){return i.Data.Decimal(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitList(e,{length:t,nullCount:r}=this.nextFieldNode()){return i.Data.List(e,0,t,r,this.readNullBitmap(e,r),this.readOffsets(e),this.visit(e.children[0]))}visitStruct(e,{length:t,nullCount:r}=this.nextFieldNode()){return i.Data.Struct(e,0,t,r,this.readNullBitmap(e,r),this.visitMany(e.children))}visitUnion(e){return e.mode===l.UnionMode.Sparse?this.visitSparseUnion(e):this.visitDenseUnion(e)}visitDenseUnion(e,{length:t,nullCount:r}=this.nextFieldNode()){return i.Data.Union(e,0,t,r,this.readNullBitmap(e,r),this.readTypeIds(e),this.readOffsets(e),this.visitMany(e.children))}visitSparseUnion(e,{length:t,nullCount:r}=this.nextFieldNode()){return i.Data.Union(e,0,t,r,this.readNullBitmap(e,r),this.readTypeIds(e),this.visitMany(e.children))}visitDictionary(e,{length:t,nullCount:r}=this.nextFieldNode()){return i.Data.Dictionary(e,0,t,r,this.readNullBitmap(e,r),this.readData(e.indices),this.readDictionary(e))}visitInterval(e,{length:t,nullCount:r}=this.nextFieldNode()){return i.Data.Interval(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitFixedSizeList(e,{length:t,nullCount:r}=this.nextFieldNode()){return i.Data.FixedSizeList(e,0,t,r,this.readNullBitmap(e,r),this.visit(e.children[0]))}visitMap(e,{length:t,nullCount:r}=this.nextFieldNode()){return i.Data.Map(e,0,t,r,this.readNullBitmap(e,r),this.readOffsets(e),this.visit(e.children[0]))}nextFieldNode(){return this.nodes[++this.nodesIndex]}nextBufferRange(){return this.buffers[++this.buffersIndex]}readNullBitmap(e,t,r=this.nextBufferRange()){return t>0&&this.readData(e,r)||new Uint8Array(0)}readOffsets(e,t){return this.readData(e,t)}readTypeIds(e,t){return this.readData(e,t)}readData(e,{length:t,offset:r}=this.nextBufferRange()){return this.bytes.subarray(r,r+t)}readDictionary(e){return this.dictionaries.get(e.id)}}t.VectorLoader=h;t.JSONVectorLoader=class extends h{constructor(e,t,r,i){super(new Uint8Array(0),t,r,i),this.sources=e}readNullBitmap(e,t,{offset:r}=this.nextBufferRange()){return t<=0?new Uint8Array(0):a.packBools(this.sources[r])}readOffsets(e,{offset:t}=this.nextBufferRange()){return d.toArrayBufferView(Uint8Array,d.toArrayBufferView(Int32Array,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return d.toArrayBufferView(Uint8Array,d.toArrayBufferView(e.ArrayType,this.sources[t]))}readData(e,{offset:t}=this.nextBufferRange()){const{sources:r}=this;return s.DataType.isTimestamp(e)||(s.DataType.isInt(e)||s.DataType.isTime(e))&&64===e.bitWidth||s.DataType.isDate(e)&&e.unit===l.DateUnit.MILLISECOND?d.toArrayBufferView(Uint8Array,u.Int64.convertArray(r[t])):s.DataType.isDecimal(e)?d.toArrayBufferView(Uint8Array,u.Int128.convertArray(r[t])):s.DataType.isBinary(e)||s.DataType.isFixedSizeBinary(e)?function(e){const t=e.join(""),r=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)r[e>>1]=parseInt(t.substr(e,2),16);return r}(r[t]):s.DataType.isBool(e)?a.packBools(r[t]):s.DataType.isUtf8(e)?c.encodeUtf8(r[t].join("")):d.toArrayBufferView(Uint8Array,d.toArrayBufferView(e.ArrayType,r[t].map(e=>+e)))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.instance=t.TypeAssembler=void 0;var i=r(14).flatbuffers.Long;const n=r(8),s=r(16);class o extends n.Visitor{visit(e,t){return null==e||null==t?void 0:super.visit(e,t)}visitNull(e,t){return s.Null.startNull(t),s.Null.endNull(t)}visitInt(e,t){return s.Int.startInt(t),s.Int.addBitWidth(t,e.bitWidth),s.Int.addIsSigned(t,e.isSigned),s.Int.endInt(t)}visitFloat(e,t){return s.FloatingPoint.startFloatingPoint(t),s.FloatingPoint.addPrecision(t,e.precision),s.FloatingPoint.endFloatingPoint(t)}visitBinary(e,t){return s.Binary.startBinary(t),s.Binary.endBinary(t)}visitBool(e,t){return s.Bool.startBool(t),s.Bool.endBool(t)}visitUtf8(e,t){return s.Utf8.startUtf8(t),s.Utf8.endUtf8(t)}visitDecimal(e,t){return s.Decimal.startDecimal(t),s.Decimal.addScale(t,e.scale),s.Decimal.addPrecision(t,e.precision),s.Decimal.endDecimal(t)}visitDate(e,t){return s.Date.startDate(t),s.Date.addUnit(t,e.unit),s.Date.endDate(t)}visitTime(e,t){return s.Time.startTime(t),s.Time.addUnit(t,e.unit),s.Time.addBitWidth(t,e.bitWidth),s.Time.endTime(t)}visitTimestamp(e,t){const r=e.timezone&&t.createString(e.timezone)||void 0;return s.Timestamp.startTimestamp(t),s.Timestamp.addUnit(t,e.unit),void 0!==r&&s.Timestamp.addTimezone(t,r),s.Timestamp.endTimestamp(t)}visitInterval(e,t){return s.Interval.startInterval(t),s.Interval.addUnit(t,e.unit),s.Interval.endInterval(t)}visitList(e,t){return s.List.startList(t),s.List.endList(t)}visitStruct(e,t){return s.Struct_.startStruct_(t),s.Struct_.endStruct_(t)}visitUnion(e,t){s.Union.startTypeIdsVector(t,e.typeIds.length);const r=s.Union.createTypeIdsVector(t,e.typeIds);return s.Union.startUnion(t),s.Union.addMode(t,e.mode),s.Union.addTypeIds(t,r),s.Union.endUnion(t)}visitDictionary(e,t){const r=this.visit(e.indices,t);return s.DictionaryEncoding.startDictionaryEncoding(t),s.DictionaryEncoding.addId(t,new i(e.id,0)),s.DictionaryEncoding.addIsOrdered(t,e.isOrdered),void 0!==r&&s.DictionaryEncoding.addIndexType(t,r),s.DictionaryEncoding.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return s.FixedSizeBinary.startFixedSizeBinary(t),s.FixedSizeBinary.addByteWidth(t,e.byteWidth),s.FixedSizeBinary.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return s.FixedSizeList.startFixedSizeList(t),s.FixedSizeList.addListSize(t,e.listSize),s.FixedSizeList.endFixedSizeList(t)}visitMap(e,t){return s.Map.startMap(t),s.Map.addKeysSorted(t,e.keysSorted),s.Map.endMap(t)}}t.TypeAssembler=o,t.instance=new o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fieldFromJSON=t.dictionaryBatchFromJSON=t.recordBatchFromJSON=t.schemaFromJSON=void 0;const i=r(6),n=r(0),s=r(21),o=r(1);function a(e){return new s.RecordBatch(e.count,function e(t){return(t||[]).reduce((t,r)=>{return[...t,new s.FieldNode(r.count,(i=r.VALIDITY,(i||[]).reduce((e,t)=>e+ +(0===t),0))),...e(r.children)];var i},[])}(e.columns),function e(t,r=[]){for(let i=-1,n=(t||[]).length;++i<n;){const n=t[i];n.VALIDITY&&r.push(new s.BufferRegion(r.length,n.VALIDITY.length)),n.TYPE&&r.push(new s.BufferRegion(r.length,n.TYPE.length)),n.OFFSET&&r.push(new s.BufferRegion(r.length,n.OFFSET.length)),n.DATA&&r.push(new s.BufferRegion(r.length,n.DATA.length)),r=e(n.children,r)}return r}(e.columns))}function c(e,t){return(e.children||[]).filter(Boolean).map(e=>i.Field.fromJSON(e,t))}function u(e){return new Map(Object.entries(e||{}))}function l(e){return new n.Int(e.isSigned,e.bitWidth)}function d(e,t){const r=e.type.name;switch(r){case"NONE":case"null":return new n.Null;case"binary":return new n.Binary;case"utf8":return new n.Utf8;case"bool":return new n.Bool;case"list":return new n.List((t||[])[0]);case"struct":case"struct_":return new n.Struct(t||[])}switch(r){case"int":{const t=e.type;return new n.Int(t.isSigned,t.bitWidth)}case"floatingpoint":{const t=e.type;return new n.Float(o.Precision[t.precision])}case"decimal":{const t=e.type;return new n.Decimal(t.scale,t.precision)}case"date":{const t=e.type;return new n.Date_(o.DateUnit[t.unit])}case"time":{const t=e.type;return new n.Time(o.TimeUnit[t.unit],t.bitWidth)}case"timestamp":{const t=e.type;return new n.Timestamp(o.TimeUnit[t.unit],t.timezone)}case"interval":{const t=e.type;return new n.Interval(o.IntervalUnit[t.unit])}case"union":{const r=e.type;return new n.Union(o.UnionMode[r.mode],r.typeIds||[],t||[])}case"fixedsizebinary":{const t=e.type;return new n.FixedSizeBinary(t.byteWidth)}case"fixedsizelist":{const r=e.type;return new n.FixedSizeList(r.listSize,(t||[])[0])}case"map":{const r=e.type;return new n.Map_((t||[])[0],r.keysSorted)}}throw new Error(`Unrecognized type: "${r}"`)}t.schemaFromJSON=function(e,t=new Map){return new i.Schema(function(e,t){return(e.fields||[]).filter(Boolean).map(e=>i.Field.fromJSON(e,t))}(e,t),u(e.customMetadata),t)},t.recordBatchFromJSON=a,t.dictionaryBatchFromJSON=function(e){return new s.DictionaryBatch(a(e.data),e.id,e.isDelta)},t.fieldFromJSON=function(e,t){let r,s,o,a,h,f;return t&&(a=e.dictionary)?t.has(r=a.id)?(s=(s=a.indexType)?l(s):new n.Int32,f=new n.Dictionary(t.get(r),s,r,a.isOrdered),o=new i.Field(e.name,f,e.nullable,u(e.customMetadata))):(s=(s=a.indexType)?l(s):new n.Int32,t.set(r,h=d(e,c(e,t))),f=new n.Dictionary(h,s,r,a.isOrdered),o=new i.Field(e.name,f,e.nullable,u(e.customMetadata))):(h=d(e,c(e,t)),o=new i.Field(e.name,h,e.nullable,u(e.customMetadata))),o||null}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VectorAssembler=void 0;const i=r(8),n=r(1),s=r(15),o=r(5),a=r(12),c=r(24),u=r(21),l=r(0);class d extends i.Visitor{constructor(){super(),this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}static assemble(...e){const t=new d,r=c.selectVectorChildrenArgs(s.RecordBatch,e),[i=t]=t.visitMany(r);return i}visit(e){if(!l.DataType.isDictionary(e.type)){const{data:t,length:r,nullCount:i}=e;if(r>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");l.DataType.isNull(e.type)||h.call(this,i<=0?new Uint8Array(0):a.truncateBitmap(t.offset,r,t.nullBitmap)),this.nodes.push(new u.FieldNode(r,i))}return super.visit(e)}visitNull(e){return this}visitDictionary(e){return this.visit(e.indices)}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}}function h(e){const t=e.byteLength+7&-8;return this.buffers.push(e),this.bufferRegions.push(new u.BufferRegion(this._byteLength,t)),this._byteLength+=t,this}function f(e){return h.call(this,e.values.subarray(0,e.length*e.stride))}function p(e){const{length:t,values:r,valueOffsets:i}=e,n=i[0],s=i[t],a=Math.min(s-n,r.byteLength-n);return h.call(this,o.rebaseValueOffsets(-i[0],t,i)),h.call(this,r.subarray(n,n+a)),this}function y(e){const{length:t,valueOffsets:r}=e;return r&&h.call(this,o.rebaseValueOffsets(r[0],t,r)),this.visit(e.getChildAt(0))}function b(e){return this.visitMany(e.type.children.map((t,r)=>e.getChildAt(r)).filter(Boolean))[0]}t.VectorAssembler=d,d.prototype.visitBool=function(e){let t;return e.nullCount>=e.length?h.call(this,new Uint8Array(0)):(t=e.values)instanceof Uint8Array?h.call(this,a.truncateBitmap(e.offset,e.length,t)):h.call(this,a.packBools(e))},d.prototype.visitInt=f,d.prototype.visitFloat=f,d.prototype.visitUtf8=p,d.prototype.visitBinary=p,d.prototype.visitFixedSizeBinary=f,d.prototype.visitDate=f,d.prototype.visitTimestamp=f,d.prototype.visitTime=f,d.prototype.visitDecimal=f,d.prototype.visitList=y,d.prototype.visitStruct=b,d.prototype.visitUnion=function(e){const{type:t,length:r,typeIds:i,valueOffsets:s}=e;if(h.call(this,i),t.mode===n.UnionMode.Sparse)return b.call(this,e);if(t.mode===n.UnionMode.Dense){if(e.offset<=0)return h.call(this,s),b.call(this,e);{const n=i.reduce((e,t)=>Math.max(e,t),i[0]),a=new Int32Array(n+1),c=new Int32Array(n+1).fill(-1),u=new Int32Array(r),l=o.rebaseValueOffsets(-s[0],r,s);for(let e,t,n=-1;++n<r;)-1===(t=c[e=i[n]])&&(t=c[e]=l[e]),u[n]=l[n]-t,++a[e];h.call(this,u);for(let i,n=-1,s=t.children.length;++n<s;)if(i=e.getChildAt(n)){const e=t.typeIds[n],s=Math.min(r,a[e]);this.visit(i.slice(c[e],s))}}}return this},d.prototype.visitInterval=f,d.prototype.visitFixedSizeList=y,d.prototype.visitMap=y},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSONTypeAssembler=void 0;const i=r(8),n=r(16),s=r(1);class o extends i.Visitor{visit(e){return null==e?void 0:super.visit(e)}visitNull({typeId:e}){return{name:n.Type[e].toLowerCase()}}visitInt({typeId:e,bitWidth:t,isSigned:r}){return{name:n.Type[e].toLowerCase(),bitWidth:t,isSigned:r}}visitFloat({typeId:e,precision:t}){return{name:n.Type[e].toLowerCase(),precision:s.Precision[t]}}visitBinary({typeId:e}){return{name:n.Type[e].toLowerCase()}}visitBool({typeId:e}){return{name:n.Type[e].toLowerCase()}}visitUtf8({typeId:e}){return{name:n.Type[e].toLowerCase()}}visitDecimal({typeId:e,scale:t,precision:r}){return{name:n.Type[e].toLowerCase(),scale:t,precision:r}}visitDate({typeId:e,unit:t}){return{name:n.Type[e].toLowerCase(),unit:s.DateUnit[t]}}visitTime({typeId:e,unit:t,bitWidth:r}){return{name:n.Type[e].toLowerCase(),unit:s.TimeUnit[t],bitWidth:r}}visitTimestamp({typeId:e,timezone:t,unit:r}){return{name:n.Type[e].toLowerCase(),unit:s.TimeUnit[r],timezone:t}}visitInterval({typeId:e,unit:t}){return{name:n.Type[e].toLowerCase(),unit:s.IntervalUnit[t]}}visitList({typeId:e}){return{name:n.Type[e].toLowerCase()}}visitStruct({typeId:e}){return{name:n.Type[e].toLowerCase()}}visitUnion({typeId:e,mode:t,typeIds:r}){return{name:n.Type[e].toLowerCase(),mode:s.UnionMode[t],typeIds:[...r]}}visitDictionary(e){return this.visit(e.dictionary)}visitFixedSizeBinary({typeId:e,byteWidth:t}){return{name:n.Type[e].toLowerCase(),byteWidth:t}}visitFixedSizeList({typeId:e,listSize:t}){return{name:n.Type[e].toLowerCase(),listSize:t}}visitMap({typeId:e,keysSorted:t}){return{name:n.Type[e].toLowerCase(),keysSorted:t}}}t.JSONTypeAssembler=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSONVectorAssembler=void 0;const i=r(27),n=r(23),s=r(3),o=r(8),a=r(1),c=r(15),u=r(1),l=r(12),d=r(24),h=r(0);class f extends o.Visitor{static assemble(...e){return(new f).visitMany(d.selectColumnChildrenArgs(c.RecordBatch,e))}visit(e){const{data:t,name:r,length:i}=e,{offset:n,nullCount:o,nullBitmap:c}=t,u=h.DataType.isDictionary(e.type)?e.type.indices:e.type,d=Object.assign([],t.buffers,{[a.BufferType.VALIDITY]:void 0});return{name:r,count:i,VALIDITY:h.DataType.isNull(u)?void 0:o<=0?Array.from({length:i},()=>1):[...new l.BitIterator(c,n,i,null,l.getBit)],...super.visit(s.Vector.new(t.clone(u,n,i,0,d)))}}visitNull(){return{}}visitBool({values:e,offset:t,length:r}){return{DATA:[...new l.BitIterator(e,t,r,null,l.getBool)]}}visitInt(e){return{DATA:e.type.bitWidth<64?[...e.values]:[...y(e.values,2)]}}visitFloat(e){return{DATA:[...e.values]}}visitUtf8(e){return{DATA:[...e],OFFSET:[...e.valueOffsets]}}visitBinary(e){return{DATA:[...p(e)],OFFSET:[...e.valueOffsets]}}visitFixedSizeBinary(e){return{DATA:[...p(e)]}}visitDate(e){return{DATA:e.type.unit===u.DateUnit.DAY?[...e.values]:[...y(e.values,2)]}}visitTimestamp(e){return{DATA:[...y(e.values,2)]}}visitTime(e){return{DATA:e.type.unit<u.TimeUnit.MICROSECOND?[...e.values]:[...y(e.values,2)]}}visitDecimal(e){return{DATA:[...y(e.values,4)]}}visitList(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map((t,r)=>this.visit(new n.Column(t,[e.getChildAt(r)])))}}visitStruct(e){return{children:e.type.children.map((t,r)=>this.visit(new n.Column(t,[e.getChildAt(r)])))}}visitUnion(e){return{TYPE:[...e.typeIds],OFFSET:e.type.mode===u.UnionMode.Dense?[...e.valueOffsets]:void 0,children:e.type.children.map((t,r)=>this.visit(new n.Column(t,[e.getChildAt(r)])))}}visitInterval(e){return{DATA:[...e.values]}}visitFixedSizeList(e){return{children:e.type.children.map((t,r)=>this.visit(new n.Column(t,[e.getChildAt(r)])))}}visitMap(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map((t,r)=>this.visit(new n.Column(t,[e.getChildAt(r)])))}}}function*p(e){for(const t of e)yield t.reduce((e,t)=>`${e}${("0"+(255&t).toString(16)).slice(-2)}`,"").toUpperCase()}function*y(e,t){for(let r=-1,n=e.length/t;++r<n;)yield""+i.BN.new(e.subarray((r+0)*t,(r+1)*t),!1)}t.JSONVectorAssembler=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.partial2=t.partial1=t.partial0=void 0,t.partial0=function(e){return function(){return e(this)}},t.partial1=function(e){return function(t){return e(this,t)}},t.partial2=function(e){return function(t,r){return e(this,t,r)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.instance=t.IndexOfVisitor=void 0;const i=r(8),n=r(12),s=r(30);class o extends i.Visitor{}function a(e,t,r){if(void 0===t)return-1;if(null===t)return function(e,t){const{nullBitmap:r}=e.data;if(!r||e.nullCount<=0)return-1;let i=0;for(const s of new n.BitIterator(r,e.data.offset+(t||0),e.length,r,n.getBool)){if(!s)return i;++i}return-1}(e,r);const i=s.createElementComparator(t);for(let t=(r||0)-1,n=e.length;++t<n;)if(i(e.get(t)))return t;return-1}function c(e,t,r){const i=s.createElementComparator(t);for(let t=(r||0)-1,n=e.length;++t<n;)if(i(e.get(t)))return t;return-1}t.IndexOfVisitor=o,o.prototype.visitNull=function(e,t){return null===t&&e.length>0?0:-1},o.prototype.visitBool=a,o.prototype.visitInt=a,o.prototype.visitInt8=a,o.prototype.visitInt16=a,o.prototype.visitInt32=a,o.prototype.visitInt64=a,o.prototype.visitUint8=a,o.prototype.visitUint16=a,o.prototype.visitUint32=a,o.prototype.visitUint64=a,o.prototype.visitFloat=a,o.prototype.visitFloat16=a,o.prototype.visitFloat32=a,o.prototype.visitFloat64=a,o.prototype.visitUtf8=a,o.prototype.visitBinary=a,o.prototype.visitFixedSizeBinary=a,o.prototype.visitDate=a,o.prototype.visitDateDay=a,o.prototype.visitDateMillisecond=a,o.prototype.visitTimestamp=a,o.prototype.visitTimestampSecond=a,o.prototype.visitTimestampMillisecond=a,o.prototype.visitTimestampMicrosecond=a,o.prototype.visitTimestampNanosecond=a,o.prototype.visitTime=a,o.prototype.visitTimeSecond=a,o.prototype.visitTimeMillisecond=a,o.prototype.visitTimeMicrosecond=a,o.prototype.visitTimeNanosecond=a,o.prototype.visitDecimal=a,o.prototype.visitList=a,o.prototype.visitStruct=a,o.prototype.visitUnion=a,o.prototype.visitDenseUnion=c,o.prototype.visitSparseUnion=c,o.prototype.visitDictionary=a,o.prototype.visitInterval=a,o.prototype.visitIntervalDayTime=a,o.prototype.visitIntervalYearMonth=a,o.prototype.visitFixedSizeList=a,o.prototype.visitMap=a,t.instance=new o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.instance=t.ToArrayVisitor=void 0;const i=r(1),n=r(8),s=r(82);class o extends n.Visitor{}function a(e){const{type:t,length:r,stride:n}=e;switch(t.typeId){case i.Type.Int:case i.Type.Float:case i.Type.Decimal:case i.Type.Time:case i.Type.Timestamp:return e.data.values.subarray(0,r*n)}return[...s.instance.visit(e)]}t.ToArrayVisitor=o,o.prototype.visitNull=a,o.prototype.visitBool=a,o.prototype.visitInt=a,o.prototype.visitInt8=a,o.prototype.visitInt16=a,o.prototype.visitInt32=a,o.prototype.visitInt64=a,o.prototype.visitUint8=a,o.prototype.visitUint16=a,o.prototype.visitUint32=a,o.prototype.visitUint64=a,o.prototype.visitFloat=a,o.prototype.visitFloat16=a,o.prototype.visitFloat32=a,o.prototype.visitFloat64=a,o.prototype.visitUtf8=a,o.prototype.visitBinary=a,o.prototype.visitFixedSizeBinary=a,o.prototype.visitDate=a,o.prototype.visitDateDay=a,o.prototype.visitDateMillisecond=a,o.prototype.visitTimestamp=a,o.prototype.visitTimestampSecond=a,o.prototype.visitTimestampMillisecond=a,o.prototype.visitTimestampMicrosecond=a,o.prototype.visitTimestampNanosecond=a,o.prototype.visitTime=a,o.prototype.visitTimeSecond=a,o.prototype.visitTimeMillisecond=a,o.prototype.visitTimeMicrosecond=a,o.prototype.visitTimeNanosecond=a,o.prototype.visitDecimal=a,o.prototype.visitList=a,o.prototype.visitStruct=a,o.prototype.visitUnion=a,o.prototype.visitDenseUnion=a,o.prototype.visitSparseUnion=a,o.prototype.visitDictionary=a,o.prototype.visitInterval=a,o.prototype.visitIntervalDayTime=a,o.prototype.visitIntervalYearMonth=a,o.prototype.visitFixedSizeList=a,o.prototype.visitMap=a,t.instance=new o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.instance=t.ByteWidthVisitor=void 0;const i=r(8),n=r(1),s=(e,t)=>e+t,o=e=>"Cannot compute the byte width of variable-width column "+e;class a extends i.Visitor{visitNull(e){return 0}visitInt(e){return e.bitWidth/8}visitFloat(e){return e.ArrayType.BYTES_PER_ELEMENT}visitBinary(e){throw new Error(o(e))}visitUtf8(e){throw new Error(o(e))}visitBool(e){return 1/8}visitDecimal(e){return 16}visitDate(e){return 4*(e.unit+1)}visitTime(e){return e.bitWidth/8}visitTimestamp(e){return e.unit===n.TimeUnit.SECOND?4:8}visitInterval(e){return 4*(e.unit+1)}visitList(e){throw new Error(o(e))}visitStruct(e){return this.visitFields(e.children).reduce(s,0)}visitUnion(e){return this.visitFields(e.children).reduce(s,0)}visitFixedSizeBinary(e){return e.byteWidth}visitFixedSizeList(e){return e.listSize*this.visitFields(e.children).reduce(s,0)}visitMap(e){return this.visitFields(e.children).reduce(s,0)}visitDictionary(e){return this.visit(e.indices)}visitFields(e){return(e||[]).map(e=>this.visit(e.type))}visitSchema(e){return this.visitFields(e.fields).reduce(s,0)}}t.ByteWidthVisitor=a,t.instance=new a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.instance=t.GetVectorConstructor=void 0;const i=r(8),n=r(65),s=r(66),o=r(67),a=r(68),c=r(39),u=r(69),l=r(70),d=r(71),h=r(72),f=r(40),p=r(73),y=r(74),b=r(75),m=r(76),g=r(77),_=r(78),B=r(79),v=r(80);class T extends i.Visitor{visitNull(){return b.NullVector}visitBool(){return s.BoolVector}visitInt(){return f.IntVector}visitInt8(){return f.Int8Vector}visitInt16(){return f.Int16Vector}visitInt32(){return f.Int32Vector}visitInt64(){return f.Int64Vector}visitUint8(){return f.Uint8Vector}visitUint16(){return f.Uint16Vector}visitUint32(){return f.Uint32Vector}visitUint64(){return f.Uint64Vector}visitFloat(){return d.FloatVector}visitFloat16(){return d.Float16Vector}visitFloat32(){return d.Float32Vector}visitFloat64(){return d.Float64Vector}visitUtf8(){return v.Utf8Vector}visitBinary(){return n.BinaryVector}visitFixedSizeBinary(){return u.FixedSizeBinaryVector}visitDate(){return o.DateVector}visitDateDay(){return o.DateDayVector}visitDateMillisecond(){return o.DateMillisecondVector}visitTimestamp(){return g.TimestampVector}visitTimestampSecond(){return g.TimestampSecondVector}visitTimestampMillisecond(){return g.TimestampMillisecondVector}visitTimestampMicrosecond(){return g.TimestampMicrosecondVector}visitTimestampNanosecond(){return g.TimestampNanosecondVector}visitTime(){return _.TimeVector}visitTimeSecond(){return _.TimeSecondVector}visitTimeMillisecond(){return _.TimeMillisecondVector}visitTimeMicrosecond(){return _.TimeMicrosecondVector}visitTimeNanosecond(){return _.TimeNanosecondVector}visitDecimal(){return a.DecimalVector}visitList(){return p.ListVector}visitStruct(){return m.StructVector}visitUnion(){return B.UnionVector}visitDenseUnion(){return B.DenseUnionVector}visitSparseUnion(){return B.SparseUnionVector}visitDictionary(){return c.DictionaryVector}visitInterval(){return h.IntervalVector}visitIntervalDayTime(){return h.IntervalDayTimeVector}visitIntervalYearMonth(){return h.IntervalYearMonthVector}visitFixedSizeList(){return l.FixedSizeListVector}visitMap(){return y.MapVector}}t.GetVectorConstructor=T,t.instance=new T},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toDOMStream=void 0;const i=r(5),n=r(9);t.toDOMStream=function(e,t){if(n.isAsyncIterable(e))return function(e,t){let r=null;const n=t&&"bytes"===t.type||!1,s=t&&t.highWaterMark||2**24;return new ReadableStream({...t,async start(t){await o(t,r||(r=e[Symbol.asyncIterator]()))},async pull(e){r?await o(e,r):e.close()},async cancel(){r&&r.return&&await r.return(),r=null}},{highWaterMark:n?s:void 0,...t});async function o(e,t){let r,s=null,o=e.desiredSize||null;for(;!(s=await t.next(n?o:null)).done;)if(ArrayBuffer.isView(s.value)&&(r=i.toUint8Array(s.value))&&(null!=o&&n&&(o=o-r.byteLength+1),s.value=r),e.enqueue(s.value),null!=o&&--o<=0)return;e.close()}}(e,t);if(n.isIterable(e))return function(e,t){let r=null;const n=t&&"bytes"===t.type||!1,s=t&&t.highWaterMark||2**24;return new ReadableStream({...t,start(t){o(t,r||(r=e[Symbol.iterator]()))},pull(e){r?o(e,r):e.close()},cancel(){r&&r.return&&r.return(),r=null}},{highWaterMark:n?s:void 0,...t});function o(e,t){let r,s=null,o=e.desiredSize||null;for(;!(s=t.next(n?o:null)).done;)if(ArrayBuffer.isView(s.value)&&(r=i.toUint8Array(s.value))&&(null!=o&&n&&(o=o-r.byteLength+1),s.value=r),e.enqueue(s.value),null!=o&&--o<=0)return;e.close()}}(e,t);throw new Error("toDOMStream() must be called with an Iterable or AsyncIterable")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BuilderTransform=t.builderThroughDOMStream=void 0;const i=r(33);t.builderThroughDOMStream=function(e){return new n(e)};class n{constructor(e){this._numChunks=0,this._finished=!1,this._bufferedSize=0;const{readableStrategy:t,writableStrategy:r,queueingStrategy:n="count",...a}=e;this._controller=null,this._builder=i.Builder.new(a),this._getSize="bytes"!==n?s:o;const{highWaterMark:c=("bytes"===n?16384:1e3)}={...t},{highWaterMark:u=("bytes"===n?16384:1e3)}={...r};this.readable=new ReadableStream({cancel:()=>{this._builder.clear()},pull:e=>{this._maybeFlush(this._builder,this._controller=e)},start:e=>{this._maybeFlush(this._builder,this._controller=e)}},{highWaterMark:c,size:"bytes"!==n?s:o}),this.writable=new WritableStream({abort:()=>{this._builder.clear()},write:()=>{this._maybeFlush(this._builder,this._controller)},close:()=>{this._maybeFlush(this._builder.finish(),this._controller)}},{highWaterMark:u,size:e=>this._writeValueAndReturnChunkSize(e)})}_writeValueAndReturnChunkSize(e){const t=this._bufferedSize;return this._bufferedSize=this._getSize(this._builder.append(e)),this._bufferedSize-t}_maybeFlush(e,t){null!==t&&(this._bufferedSize>=t.desiredSize&&++this._numChunks&&this._enqueue(t,e.toVector()),e.finished&&((e.length>0||0===this._numChunks)&&++this._numChunks&&this._enqueue(t,e.toVector()),!this._finished&&(this._finished=!0)&&this._enqueue(t,null)))}_enqueue(e,t){this._bufferedSize=0,this._controller=null,null===t?e.close():e.enqueue(t)}}t.BuilderTransform=n;const s=e=>e.length,o=e=>e.byteLength},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recordBatchReaderThroughDOMStream=void 0;const i=r(18),n=r(28);t.recordBatchReaderThroughDOMStream=function(e,t){const r=new i.AsyncByteQueue;let s=null;const o=new ReadableStream({async cancel(){await r.close()},async start(e){await a(e,s||(s=await async function(){return await(await n.RecordBatchReader.from(r)).open(t)}()))},async pull(e){s?await a(e,s):e.close()}});return{writable:new WritableStream(r,{highWaterMark:16384,...e}),readable:o};async function a(e,t){let r=e.desiredSize,i=null;for(;!(i=await t.next()).done;)if(e.enqueue(i.value),null!=r&&--r<=0)return;e.close()}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recordBatchWriterThroughDOMStream=void 0;const i=r(18);t.recordBatchWriterThroughDOMStream=function(e,t){const r=new this(e),n=new i.AsyncByteStream(r),s=new ReadableStream({type:"bytes",async cancel(){await n.cancel()},async pull(e){await o(e)},async start(e){await o(e)}},{highWaterMark:16384,...t});return{writable:new WritableStream(r,e),readable:s};async function o(e){let t=null,r=e.desiredSize;for(;t=await n.read(r||null);)if(e.enqueue(t),null!=r&&(r-=t.byteLength)<=0)return;e.close()}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FilteredDataFrame=t.CountByResult=t.DataFrame=void 0;const i=r(29),n=r(40),s=r(6),o=r(83),a=r(15),c=r(0);i.Table.prototype.countBy=function(e){return new u(this.chunks).countBy(e)},i.Table.prototype.scan=function(e,t){return new u(this.chunks).scan(e,t)},i.Table.prototype.scanReverse=function(e,t){return new u(this.chunks).scanReverse(e,t)},i.Table.prototype.filter=function(e){return new u(this.chunks).filter(e)};class u extends i.Table{filter(e){return new h(this.chunks,e)}scan(e,t){const r=this.chunks,i=r.length;for(let n=-1;++n<i;){const i=r[n];t&&t(i);for(let t=-1,r=i.length;++t<r;)e(t,i)}}scanReverse(e,t){const r=this.chunks;for(let i=r.length;--i>=0;){const n=r[i];t&&t(n);for(let t=n.length;--t>=0;)e(t,n)}}countBy(e){const t=this.chunks,r=t.length,i="string"==typeof e?new o.Col(e):e;i.bind(t[r-1]);const s=i.vector;if(!c.DataType.isDictionary(s.type))throw new Error("countBy currently only supports dictionary-encoded columns");const a=Math.ceil(Math.log(s.length)/Math.log(256)),u=new(4==a?Uint32Array:a>=2?Uint16Array:Uint8Array)(s.dictionary.length);for(let e=-1;++e<r;){const r=t[e];i.bind(r);const n=i.vector.indices;for(let e=-1,t=r.length;++e<t;){const t=n.get(e);null!==t&&u[t]++}}return new l(s.dictionary,n.IntVector.from(u))}}t.DataFrame=u;class l extends i.Table{constructor(e,t){const r=new s.Schema([new s.Field("values",e.type),new s.Field("counts",t.type)]);super(new a.RecordBatch(r,t.length,[e,t]))}toJSON(){const e=this.getColumnAt(0),t=this.getColumnAt(1),r={};for(let i=-1;++i<this.length;)r[e.get(i)]=t.get(i);return r}}t.CountByResult=l;class d{constructor(e,t){this.batches=e,this.predicate=t,this.batchIndex=0,this.index=0,this.batch=this.batches[this.batchIndex],this.predicateFunc=this.predicate.bind(this.batch)}next(){for(;this.batchIndex<this.batches.length;){for(;this.index<this.batch.length;){if(this.predicateFunc(this.index,this.batch))return{value:this.batch.get(this.index++)};this.index++}++this.batchIndex<this.batches.length&&(this.index=0,this.batch=this.batches[this.batchIndex],this.predicateFunc=this.predicate.bind(this.batch))}return{done:!0,value:null}}[Symbol.iterator](){return this}}class h extends u{constructor(e,t){super(e),this._predicate=t}scan(e,t){const r=this._chunks,i=r.length;for(let n=-1;++n<i;){const i=r[n],s=this._predicate.bind(i);let o=!1;for(let r=-1,n=i.length;++r<n;)s(r,i)&&(t&&!o&&(t(i),o=!0),e(r,i))}}scanReverse(e,t){const r=this._chunks;for(let i=r.length;--i>=0;){const n=r[i],s=this._predicate.bind(n);let o=!1;for(let r=n.length;--r>=0;)s(r,n)&&(t&&!o&&(t(n),o=!0),e(r,n))}}count(){let e=0;const t=this._chunks,r=t.length;for(let i=-1;++i<r;){const r=t[i],n=this._predicate.bind(r);for(let t=-1,i=r.length;++t<i;)n(t,r)&&++e}return e}[Symbol.iterator](){return new d(this._chunks,this._predicate)}filter(e){return new h(this._chunks,this._predicate.and(e))}countBy(e){const t=this._chunks,r=t.length,i="string"==typeof e?new o.Col(e):e;i.bind(t[r-1]);const s=i.vector;if(!c.DataType.isDictionary(s.type))throw new Error("countBy currently only supports dictionary-encoded columns");const a=Math.ceil(Math.log(s.length)/Math.log(256)),u=new(4==a?Uint32Array:a>=2?Uint16Array:Uint8Array)(s.dictionary.length);for(let e=-1;++e<r;){const r=t[e],n=this._predicate.bind(r);i.bind(r);const s=i.vector.indices;for(let e=-1,t=r.length;++e<t;){const t=s.get(e);null!==t&&n(e,r)&&u[t]++}}return new l(s.dictionary,n.IntVector.from(u))}}t.FilteredDataFrame=h},function(e,t,r){"use strict";function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.r(t),r.d(t,"TableBatchBuilder",(function(){return f})),r.d(t,"RowTableBatchAggregator",(function(){return c})),r.d(t,"ColumnarTableBatchAggregator",(function(){return l})),r.d(t,"convertToObjectRow",(function(){return s})),r.d(t,"convertToArrayRow",(function(){return o})),r.d(t,"getMeshSize",(function(){return p})),r.d(t,"getMeshBoundingBox",(function(){return y})),r.d(t,"convertMesh",(function(){return Oe})),r.d(t,"deduceMeshSchema",(function(){return Te})),r.d(t,"deduceMeshField",(function(){return Ie})),r.d(t,"makeMeshAttributeMetadata",(function(){return we})),r.d(t,"Schema",(function(){return v})),r.d(t,"Field",(function(){return w})),r.d(t,"DataType",(function(){return x})),r.d(t,"Null",(function(){return L})),r.d(t,"Binary",(function(){return ee})),r.d(t,"Bool",(function(){return N})),r.d(t,"Int",(function(){return R})),r.d(t,"Int8",(function(){return E})),r.d(t,"Int16",(function(){return C})),r.d(t,"Int32",(function(){return z})),r.d(t,"Int64",(function(){return k})),r.d(t,"Uint8",(function(){return W})),r.d(t,"Uint16",(function(){return Y})),r.d(t,"Uint32",(function(){return H})),r.d(t,"Uint64",(function(){return $})),r.d(t,"Float",(function(){return K})),r.d(t,"Float16",(function(){return q})),r.d(t,"Float32",(function(){return X})),r.d(t,"Float64",(function(){return Q})),r.d(t,"Utf8",(function(){return te})),r.d(t,"Date",(function(){return ie})),r.d(t,"DateDay",(function(){return ne})),r.d(t,"DateMillisecond",(function(){return se})),r.d(t,"Time",(function(){return ae})),r.d(t,"TimeMillisecond",(function(){return ue})),r.d(t,"TimeSecond",(function(){return ce})),r.d(t,"Timestamp",(function(){return le})),r.d(t,"TimestampSecond",(function(){return de})),r.d(t,"TimestampMillisecond",(function(){return he})),r.d(t,"TimestampMicrosecond",(function(){return fe})),r.d(t,"TimestampNanosecond",(function(){return pe})),r.d(t,"Interval",(function(){return be})),r.d(t,"IntervalDayTime",(function(){return me})),r.d(t,"IntervalYearMonth",(function(){return ge})),r.d(t,"FixedSizeList",(function(){return _e})),r.d(t,"Struct",(function(){return Be})),r.d(t,"deduceTypeFromColumn",(function(){return Ae})),r.d(t,"deduceTypeFromValue",(function(){return De})),r.d(t,"getTypeInfo",(function(){return Ve})),r.d(t,"getArrowTypeFromTypedArray",(function(){return ve})),r.d(t,"AsyncQueue",(function(){return xe}));class n{constructor(e,t){if(i(this,"schema",void 0),i(this,"options",void 0),i(this,"length",0),i(this,"rows",null),i(this,"cursor",0),i(this,"_headers",[]),this.options=t,this.schema=e,!Array.isArray(e)){this._headers=[];for(const t in e)this._headers[e[t].index]=e[t].name}}rowCount(){return this.length}addArrayRow(e,t){Number.isFinite(t)&&(this.cursor=t),this.rows=this.rows||new Array(100),this.rows[this.length]=e,this.length++}addObjectRow(e,t){Number.isFinite(t)&&(this.cursor=t),this.rows=this.rows||new Array(100),this.rows[this.length]=e,this.length++}getBatch(){let e=this.rows;if(!e)return null;e=e.slice(0,this.length),this.rows=null;return{shape:this.options.shape,batchType:"data",data:e,length:this.length,schema:this.schema,cursor:this.cursor}}}function s(e,t){if(!e)throw new Error("null row");if(!t)throw new Error("no headers");const r={};for(let i=0;i<t.length;i++)r[t[i]]=e[i];return r}function o(e,t){if(!e)throw new Error("null row");if(!t)throw new Error("no headers");const r=new Array(t.length);for(let i=0;i<t.length;i++)r[i]=e[t[i]];return r}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class c{constructor(e,t){if(a(this,"schema",void 0),a(this,"options",void 0),a(this,"length",0),a(this,"objectRows",null),a(this,"arrayRows",null),a(this,"cursor",0),a(this,"_headers",[]),this.options=t,this.schema=e,!Array.isArray(e)){this._headers=[];for(const t in e)this._headers[e[t].index]=e[t].name}}rowCount(){return this.length}addArrayRow(e,t){switch(Number.isFinite(t)&&(this.cursor=t),this.options.shape){case"object-row-table":const r=s(e,this._headers);this.addObjectRow(r,t);break;case"array-row-table":this.arrayRows=this.arrayRows||new Array(100),this.arrayRows[this.length]=e,this.length++}}addObjectRow(e,t){switch(Number.isFinite(t)&&(this.cursor=t),this.options.shape){case"array-row-table":const r=o(e,this._headers);this.addArrayRow(r,t);break;case"object-row-table":this.objectRows=this.objectRows||new Array(100),this.objectRows[this.length]=e,this.length++}}getBatch(){let e=this.arrayRows||this.objectRows;return e?(e=e.slice(0,this.length),this.arrayRows=null,this.objectRows=null,{shape:this.options.shape,batchType:"data",data:e,length:this.length,schema:this.schema,cursor:this.cursor}):null}}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class l{constructor(e,t){u(this,"schema",void 0),u(this,"length",0),u(this,"allocated",0),u(this,"columns",{}),this.schema=e,this._reallocateColumns()}rowCount(){return this.length}addArrayRow(e){this._reallocateColumns();let t=0;for(const r in this.columns)this.columns[r][this.length]=e[t++];this.length++}addObjectRow(e){this._reallocateColumns();for(const t in e)this.columns[t][this.length]=e[t];this.length++}getBatch(){this._pruneColumns();const e=Array.isArray(this.schema)?this.columns:{};if(!Array.isArray(this.schema))for(const t in this.schema){const r=this.schema[t];e[r.name]=this.columns[r.index]}this.columns={};return{shape:"columnar-table",batchType:"data",data:e,schema:this.schema,length:this.length}}_reallocateColumns(){if(!(this.length<this.allocated)){this.allocated=this.allocated>0?this.allocated*=2:100,this.columns={};for(const e in this.schema){const t=this.schema[e],r=t.type||Float32Array,i=this.columns[t.index];if(i&&ArrayBuffer.isView(i)){const e=new r(this.allocated);e.set(i),this.columns[t.index]=e}else i?(i.length=this.allocated,this.columns[t.index]=i):this.columns[t.index]=new r(this.allocated)}}}_pruneColumns(){for(const[e,t]of Object.entries(this.columns))this.columns[e]=t.slice(0,this.length)}}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const h={shape:"array-row-table",batchSize:"auto",batchDebounceMs:0,limit:0,_limitMB:0};class f{constructor(e,t){d(this,"schema",void 0),d(this,"options",void 0),d(this,"aggregator",null),d(this,"batchCount",0),d(this,"bytesUsed",0),d(this,"isChunkComplete",!1),d(this,"lastBatchEmittedMs",Date.now()),d(this,"totalLength",0),d(this,"totalBytes",0),d(this,"rowBytes",0),this.schema=e,this.options={...h,...t}}limitReached(){var e,t;return!!(Boolean(null===(e=this.options)||void 0===e?void 0:e.limit)&&this.totalLength>=this.options.limit)||!!(Boolean(null===(t=this.options)||void 0===t?void 0:t._limitMB)&&this.totalBytes/1e6>=this.options._limitMB)}addRow(e){this.limitReached()||(this.totalLength++,this.rowBytes=this.rowBytes||this._estimateRowMB(e),this.totalBytes+=this.rowBytes,Array.isArray(e)?this.addArrayRow(e):this.addObjectRow(e))}addArrayRow(e){if(!this.aggregator){const e=this._getTableBatchType();this.aggregator=new e(this.schema,this.options)}this.aggregator.addArrayRow(e)}addObjectRow(e){if(!this.aggregator){const e=this._getTableBatchType();this.aggregator=new e(this.schema,this.options)}this.aggregator.addObjectRow(e)}chunkComplete(e){e instanceof ArrayBuffer&&(this.bytesUsed+=e.byteLength),"string"==typeof e&&(this.bytesUsed+=e.length),this.isChunkComplete=!0}getFullBatch(e){return this._isFull()?this._getBatch(e):null}getFinalBatch(e){return this._getBatch(e)}_estimateRowMB(e){return Array.isArray(e)?8*e.length:8*Object.keys(e).length}_isFull(){if(!this.aggregator||0===this.aggregator.rowCount())return!1;if("auto"===this.options.batchSize){if(!this.isChunkComplete)return!1}else if(this.options.batchSize>this.aggregator.rowCount())return!1;return!(this.options.batchDebounceMs>Date.now()-this.lastBatchEmittedMs)&&(this.isChunkComplete=!1,this.lastBatchEmittedMs=Date.now(),!0)}_getBatch(e){if(!this.aggregator)return null;null!=e&&e.bytesUsed&&(this.bytesUsed=e.bytesUsed);const t=this.aggregator.getBatch();return t.count=this.batchCount,t.bytesUsed=this.bytesUsed,Object.assign(t,e),this.batchCount++,this.aggregator=null,t}_getTableBatchType(){switch(this.options.shape){case"row-table":return n;case"array-row-table":case"object-row-table":return c;case"columnar-table":return l;case"arrow-table":if(!f.ArrowBatch)throw new Error("TableBatchBuilder");return f.ArrowBatch;default:throw new Error("TableBatchBuilder")}}}function p(e){let t=0;for(const r in e){const i=e[r];ArrayBuffer.isView(i)&&(t+=i.byteLength*i.BYTES_PER_ELEMENT)}return t}function y(e){let t=1/0,r=1/0,i=1/0,n=-1/0,s=-1/0,o=-1/0;const a=e.POSITION?e.POSITION.value:[],c=a&&a.length;for(let e=0;e<c;e+=3){const c=a[e],u=a[e+1],l=a[e+2];t=c<t?c:t,r=u<r?u:r,i=l<i?l:i,n=c>n?c:n,s=u>s?u:s,o=l>o?l:o}return[[t,r,i],[n,s,o]]}d(f,"ArrowBatch",void 0);var b=r(11),m=r(7);function g(e){switch(e.constructor){case Int8Array:return new m.Int8;case Uint8Array:return new m.Uint8;case Int16Array:return new m.Int16;case Uint16Array:return new m.Uint16;case Int32Array:return new m.Int32;case Uint32Array:return new m.Uint32;case Float32Array:return new m.Float32;case Float64Array:return new m.Float64;default:throw new Error("array type not supported")}}function _(e){switch(e.constructor){case Int8Array:return m.Int8Vector.from(e);case Uint8Array:return m.Uint8Vector.from(e);case Int16Array:return m.Int16Vector.from(e);case Uint16Array:return m.Uint16Vector.from(e);case Int32Array:return m.Int32Vector.from(e);case Uint32Array:return m.Uint32Vector.from(e);case Float32Array:return m.Float32Vector.from(e);case Float64Array:return m.Float64Vector.from(e);default:throw new Error("array type not supported")}}function B(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class v{constructor(e,t){B(this,"fields",void 0),B(this,"metadata",void 0),function(e,t){if(!e)throw new Error(t||"loader assertion failed.")}(Array.isArray(e)),function(e){const t={};for(const r of e)t[r.name]&&console.warn("Schema: duplicated field name",r.name,r),t[r.name]=!0}(e),this.fields=e,this.metadata=t||new Map}compareTo(e){if(this.metadata!==e.metadata)return!1;if(this.fields.length!==e.fields.length)return!1;for(let t=0;t<this.fields.length;++t)if(!this.fields[t].compareTo(e.fields[t]))return!1;return!0}select(...e){const t=Object.create(null);for(const r of e)t[r]=!0;const r=this.fields.filter(e=>t[e.name]);return new v(r,this.metadata)}selectAt(...e){const t=e.map(e=>this.fields[e]).filter(Boolean);return new v(t,this.metadata)}assign(e){let t,r=this.metadata;if(e instanceof v){const i=e;t=i.fields,r=T(T(new Map,this.metadata),i.metadata)}else t=e;const i=Object.create(null);for(const e of this.fields)i[e.name]=e;for(const e of t)i[e.name]=e;const n=Object.values(i);return new v(n,r)}}function T(e,t){return new Map([...e||new Map,...t||new Map])}function I(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class w{constructor(e,t,r=!1,i=new Map){I(this,"name",void 0),I(this,"type",void 0),I(this,"nullable",void 0),I(this,"metadata",void 0),this.name=e,this.type=t,this.nullable=r,this.metadata=i}get typeId(){return this.type&&this.type.typeId}clone(){return new w(this.name,this.type,this.nullable,this.metadata)}compareTo(e){return this.name===e.name&&this.type===e.type&&this.nullable===e.nullable&&this.metadata===e.metadata}toString(){return`${this.type}${this.nullable?", nullable":""}${this.metadata?", metadata: "+this.metadata:""}`}}let S,O,A,D,V,F,M,U,P;function j(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}!function(e){e[e.NONE=0]="NONE",e[e.Null=1]="Null",e[e.Int=2]="Int",e[e.Float=3]="Float",e[e.Binary=4]="Binary",e[e.Utf8=5]="Utf8",e[e.Bool=6]="Bool",e[e.Decimal=7]="Decimal",e[e.Date=8]="Date",e[e.Time=9]="Time",e[e.Timestamp=10]="Timestamp",e[e.Interval=11]="Interval",e[e.List=12]="List",e[e.Struct=13]="Struct",e[e.Union=14]="Union",e[e.FixedSizeBinary=15]="FixedSizeBinary",e[e.FixedSizeList=16]="FixedSizeList",e[e.Map=17]="Map",e[e.Dictionary=-1]="Dictionary",e[e.Int8=-2]="Int8",e[e.Int16=-3]="Int16",e[e.Int32=-4]="Int32",e[e.Int64=-5]="Int64",e[e.Uint8=-6]="Uint8",e[e.Uint16=-7]="Uint16",e[e.Uint32=-8]="Uint32",e[e.Uint64=-9]="Uint64",e[e.Float16=-10]="Float16",e[e.Float32=-11]="Float32",e[e.Float64=-12]="Float64",e[e.DateDay=-13]="DateDay",e[e.DateMillisecond=-14]="DateMillisecond",e[e.TimestampSecond=-15]="TimestampSecond",e[e.TimestampMillisecond=-16]="TimestampMillisecond",e[e.TimestampMicrosecond=-17]="TimestampMicrosecond",e[e.TimestampNanosecond=-18]="TimestampNanosecond",e[e.TimeSecond=-19]="TimeSecond",e[e.TimeMillisecond=-20]="TimeMillisecond",e[e.TimeMicrosecond=-21]="TimeMicrosecond",e[e.TimeNanosecond=-22]="TimeNanosecond",e[e.DenseUnion=-23]="DenseUnion",e[e.SparseUnion=-24]="SparseUnion",e[e.IntervalDayTime=-25]="IntervalDayTime",e[e.IntervalYearMonth=-26]="IntervalYearMonth"}(S||(S={}));class x{static isNull(e){return e&&e.typeId===S.Null}static isInt(e){return e&&e.typeId===S.Int}static isFloat(e){return e&&e.typeId===S.Float}static isBinary(e){return e&&e.typeId===S.Binary}static isUtf8(e){return e&&e.typeId===S.Utf8}static isBool(e){return e&&e.typeId===S.Bool}static isDecimal(e){return e&&e.typeId===S.Decimal}static isDate(e){return e&&e.typeId===S.Date}static isTime(e){return e&&e.typeId===S.Time}static isTimestamp(e){return e&&e.typeId===S.Timestamp}static isInterval(e){return e&&e.typeId===S.Interval}static isList(e){return e&&e.typeId===S.List}static isStruct(e){return e&&e.typeId===S.Struct}static isUnion(e){return e&&e.typeId===S.Union}static isFixedSizeBinary(e){return e&&e.typeId===S.FixedSizeBinary}static isFixedSizeList(e){return e&&e.typeId===S.FixedSizeList}static isMap(e){return e&&e.typeId===S.Map}static isDictionary(e){return e&&e.typeId===S.Dictionary}get typeId(){return S.NONE}compareTo(e){return this===e}}class L extends x{get typeId(){return S.Null}get[Symbol.toStringTag](){return"Null"}toString(){return"Null"}}class N extends x{get typeId(){return S.Bool}get[Symbol.toStringTag](){return"Bool"}toString(){return"Bool"}}O=Symbol.toStringTag;class R extends x{constructor(e,t){super(),j(this,"isSigned",void 0),j(this,"bitWidth",void 0),this.isSigned=e,this.bitWidth=t}get typeId(){return S.Int}get[O](){return"Int"}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}class E extends R{constructor(){super(!0,8)}}class C extends R{constructor(){super(!0,16)}}class z extends R{constructor(){super(!0,32)}}class k extends R{constructor(){super(!0,64)}}class W extends R{constructor(){super(!1,8)}}class Y extends R{constructor(){super(!1,16)}}class H extends R{constructor(){super(!1,32)}}class $ extends R{constructor(){super(!1,64)}}const G=16,J=32,Z=64;A=Symbol.toStringTag;class K extends x{constructor(e){super(),j(this,"precision",void 0),this.precision=e}get typeId(){return S.Float}get[A](){return"Float"}toString(){return"Float"+this.precision}}class q extends K{constructor(){super(G)}}class X extends K{constructor(){super(J)}}class Q extends K{constructor(){super(Z)}}class ee extends x{constructor(){super()}get typeId(){return S.Binary}toString(){return"Binary"}get[Symbol.toStringTag](){return"Binary"}}class te extends x{get typeId(){return S.Utf8}get[Symbol.toStringTag](){return"Utf8"}toString(){return"Utf8"}}const re={DAY:0,MILLISECOND:1};D=Symbol.toStringTag;class ie extends x{constructor(e){super(),j(this,"unit",void 0),this.unit=e}get typeId(){return S.Date}get[D](){return"Date"}toString(){return`Date${32*(this.unit+1)}<${re[this.unit]}>`}}class ne extends ie{constructor(){super(re.DAY)}}class se extends ie{constructor(){super(re.MILLISECOND)}}const oe={SECOND:1,MILLISECOND:1e3,MICROSECOND:1e6,NANOSECOND:1e9};V=Symbol.toStringTag;class ae extends x{constructor(e,t){super(),j(this,"unit",void 0),j(this,"bitWidth",void 0),this.unit=e,this.bitWidth=t}get typeId(){return S.Time}toString(){return`Time${this.bitWidth}<${oe[this.unit]}>`}get[V](){return"Time"}}class ce extends ae{constructor(){super(oe.SECOND,32)}}class ue extends ae{constructor(){super(oe.MILLISECOND,32)}}F=Symbol.toStringTag;class le extends x{constructor(e,t=null){super(),j(this,"unit",void 0),j(this,"timezone",void 0),this.unit=e,this.timezone=t}get typeId(){return S.Timestamp}get[F](){return"Timestamp"}toString(){return`Timestamp<${oe[this.unit]}${this.timezone?", "+this.timezone:""}>`}}class de extends le{constructor(e=null){super(oe.SECOND,e)}}class he extends le{constructor(e=null){super(oe.MILLISECOND,e)}}class fe extends le{constructor(e=null){super(oe.MICROSECOND,e)}}class pe extends le{constructor(e=null){super(oe.NANOSECOND,e)}}const ye={DAY_TIME:0,YEAR_MONTH:1};M=Symbol.toStringTag;class be extends x{constructor(e){super(),j(this,"unit",void 0),this.unit=e}get typeId(){return S.Interval}get[M](){return"Interval"}toString(){return`Interval<${ye[this.unit]}>`}}class me extends be{constructor(){super(ye.DAY_TIME)}}class ge extends be{constructor(){super(ye.YEAR_MONTH)}}U=Symbol.toStringTag;class _e extends x{constructor(e,t){super(),j(this,"listSize",void 0),j(this,"children",void 0),this.listSize=e,this.children=[t]}get typeId(){return S.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get[U](){return"FixedSizeList"}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}P=Symbol.toStringTag;class Be extends x{constructor(e){super(),j(this,"children",void 0),this.children=e}get typeId(){return S.Struct}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}get[P](){return"Struct"}}function ve(e){switch(e.constructor){case Int8Array:return new E;case Uint8Array:return new W;case Int16Array:return new C;case Uint16Array:return new Y;case Int32Array:return new z;case Uint32Array:return new H;case Float32Array:return new X;case Float64Array:return new Q;default:throw new Error("array type not supported")}}function Te(e,t){const r=function(e){const t=[];for(const r in e){const i=e[r];t.push(Ie(r,i))}return t}(e);return new v(r,t)}function Ie(e,t,r){const i=ve(t.value),n=r||we(t);return new w(e,new _e(t.size,new w("value",i)),!1,n)}function we(e){const t=new Map;return"byteOffset"in e&&t.set("byteOffset",e.byteOffset.toString(10)),"byteStride"in e&&t.set("byteStride",e.byteStride.toString(10)),"normalized"in e&&t.set("normalized",e.normalized.toString()),t}function Se(e,t){var r;const i=[],n=[];for(const t in e.attributes){const r=e.attributes[t],{value:s,size:o=1}=r,a=g(s),c=_(s),u=new b.FixedSizeList(o,new b.Field("value",a)),l=new b.Field(t,u,!1,we(r)),d=new b.Data(u,0,s.length/o,0,void 0,[c]),h=new b.FixedSizeListVector(d);i.push(h),n.push(l)}const s=new b.Schema(n,(null==e||null===(r=e.schema)||void 0===r?void 0:r.metadata)||new Map),o=new b.RecordBatch(s,i[0].length,i);return new b.Table(s,o)}function Oe(e,t,r){switch(t||"mesh"){case"mesh":return e;case"columnar-table":return function(e){const t={};for(const[r,i]of Object.entries(e.attributes))t[r]=i.value;return{shape:"columnar-table",schema:e.schema,data:t}}(e);case"arrow-table":return{shape:"arrow-table",data:Se(e)};default:throw new Error("Unsupported shape "+(null==r?void 0:r.shape))}}function Ae(e){return e instanceof Date?Date:e instanceof Number?Float32Array:"string"==typeof e?String:null}function De(e){return e instanceof Date?Date:e instanceof Number?Float32Array:"string"==typeof e?String:null}function Ve(e){return{typeId:e.typeId,ArrayType:e.ArrayType,typeName:e.toString(),typeEnumName:Ue(e.typeId),precision:e.precision}}let Fe,Me=null;function Ue(e){if(!Me){Me={};for(const e in S)Me[S[e]]=e}return Me[e]}function Pe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class je extends Array{enqueue(e){return this.push(e)}dequeue(){return this.shift()}}Fe=Symbol.asyncIterator;class xe{constructor(){Pe(this,"_values",void 0),Pe(this,"_settlers",void 0),Pe(this,"_closed",void 0),this._values=new je,this._settlers=new je,this._closed=!1}close(){for(;this._settlers.length>0;)this._settlers.dequeue().resolve({done:!0});this._closed=!0}[Fe](){return this}enqueue(e){if(this._closed)throw new Error("Closed");if(this._settlers.length>0){if(this._values.length>0)throw new Error("Illegal internal state");const t=this._settlers.dequeue();e instanceof Error?t.reject(e):t.resolve({value:e})}else this._values.enqueue(e)}next(){if(this._values.length>0){const 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((e,t)=>{this._settlers.enqueue({resolve:e,reject:t})})}}}])}));
2
- //# sourceMappingURL=dist.min.js.map