@influxdata/influxdb3-client 2.4.0-nightly.24235 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.browser.js +1 -1
- package/dist/index.browser.js.gz +0 -0
- package/dist/index.browser.js.map +1 -1
- package/dist/index.browser.mjs +1 -1
- package/dist/index.browser.mjs.gz +0 -0
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.gz +0 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.gz +0 -0
- package/dist/index.mjs.map +1 -1
- package/dist/influxdb.js +1 -1
- package/dist/influxdb.js.gz +0 -0
- package/dist/influxdb.js.map +1 -1
- package/package.json +2 -2
package/dist/influxdb.js
CHANGED
|
@@ -21,6 +21,6 @@ ${t}`),new Function("x",`${t}
|
|
|
21
21
|
return true;`)}function Xp(r){return typeof r!="bigint"?ge(r):`${ge(r)}n`}function Sc(r,t){let e=Math.ceil(r)*t-1;return(e-e%64+64||64)/t}function kf(r,t=0){return r.length>=t?r.subarray(0,t):rn(new r.constructor(t),r,0)}var jt=class{constructor(t,e=0,i=1){this.length=Math.ceil(e/i),this.buffer=new t(this.length),this.stride=i,this.BYTES_PER_ELEMENT=t.BYTES_PER_ELEMENT,this.ArrayType=t}get byteLength(){return Math.ceil(this.length*this.stride)*this.BYTES_PER_ELEMENT}get reservedLength(){return this.buffer.length/this.stride}get reservedByteLength(){return this.buffer.byteLength}set(t,e){return this}append(t){return this.set(this.length,t)}reserve(t){if(t>0){this.length+=t;let e=this.stride,i=this.length*e,n=this.buffer.length;i>=n&&this._resize(n===0?Sc(i*1,this.BYTES_PER_ELEMENT):Sc(i*2,this.BYTES_PER_ELEMENT))}return this}flush(t=this.length){t=Sc(t*this.stride,this.BYTES_PER_ELEMENT);let e=kf(this.buffer,t);return this.clear(),e}clear(){return this.length=0,this.buffer=new this.ArrayType,this}_resize(t){return this.buffer=kf(this.buffer,t)}},sr=class extends jt{last(){return this.get(this.length-1)}get(t){return this.buffer[t]}set(t,e){return this.reserve(t-this.length+1),this.buffer[t*this.stride]=e,this}},xi=class extends sr{constructor(){super(Uint8Array,0,1/8),this.numValid=0}get numInvalid(){return this.length-this.numValid}get(t){return this.buffer[t>>3]>>t%8&1}set(t,e){let{buffer:i}=this.reserve(t-this.length+1),n=t>>3,s=t%8,o=i[n]>>s&1;return e?o===0&&(i[n]|=1<<s,++this.numValid):o===1&&(i[n]&=~(1<<s),--this.numValid),this}clear(){return this.numValid=0,super.clear()}},Fr=class extends sr{constructor(t){super(t.OffsetArrayType,1,1)}append(t){return this.set(this.length-1,t)}set(t,e){let i=this.length-1,n=this.reserve(t-i+1).buffer;return i<t++&&i>=0&&n.fill(n[i],i,t),n[t]=n[t-1]+e,this}flush(t=this.length-1){return t>this.length&&this.set(t-1,this.BYTES_PER_ELEMENT>4?BigInt(0):0),super.flush(t+1)}};var nt=class{static throughNode(t){throw new Error('"throughNode" not available in this environment')}static throughDOM(t){throw new Error('"throughDOM" not available in this environment')}constructor({type:t,nullValues:e}){this.length=0,this.finished=!1,this.type=t,this.children=[],this.nullValues=e,this.stride=Yt(t),this._nulls=new xi,e&&e.length>0&&(this._isValid=Cf(e))}toVector(){return new j([this.flush()])}get ArrayType(){return this.type.ArrayType}get nullCount(){return this._nulls.numInvalid}get numChildren(){return this.children.length}get byteLength(){let t=0,{_offsets:e,_values:i,_nulls:n,_typeIds:s,children:o}=this;return e&&(t+=e.byteLength),i&&(t+=i.byteLength),n&&(t+=n.byteLength),s&&(t+=s.byteLength),o.reduce((a,c)=>a+c.byteLength,t)}get reservedLength(){return this._nulls.reservedLength}get reservedByteLength(){let t=0;return this._offsets&&(t+=this._offsets.reservedByteLength),this._values&&(t+=this._values.reservedByteLength),this._nulls&&(t+=this._nulls.reservedByteLength),this._typeIds&&(t+=this._typeIds.reservedByteLength),this.children.reduce((e,i)=>e+i.reservedByteLength,t)}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(t){return this.set(this.length,t)}isValid(t){return this._isValid(t)}set(t,e){return this.setValid(t,this.isValid(e))&&this.setValue(t,e),this}setValue(t,e){this._setValue(this,t,e)}setValid(t,e){return this.length=this._nulls.set(t,+e).length,e}addChild(t,e=`${this.numChildren}`){throw new Error(`Cannot append children to non-nested type "${this.type}"`)}getChildAt(t){return this.children[t]||null}flush(){let t,e,i,n,{type:s,length:o,nullCount:a,_typeIds:c,_offsets:l,_values:u,_nulls:d}=this;(e=c==null?void 0:c.flush(o))?n=l==null?void 0:l.flush(o):(n=l==null?void 0:l.flush(o))?t=u==null?void 0:u.flush(l.last()):t=u==null?void 0:u.flush(o),a>0&&(i=d==null?void 0:d.flush(o));let p=this.children.map(m=>m.flush());return this.clear(),E({type:s,length:o,nullCount:a,children:p,child:p[0],data:t,typeIds:e,nullBitmap:i,valueOffsets:n})}finish(){this.finished=!0;for(let t of this.children)t.finish();return this}clear(){var t,e,i,n;this.length=0,(t=this._nulls)===null||t===void 0||t.clear(),(e=this._values)===null||e===void 0||e.clear(),(i=this._offsets)===null||i===void 0||i.clear(),(n=this._typeIds)===null||n===void 0||n.clear();for(let s of this.children)s.clear();return this}};nt.prototype.length=1;nt.prototype.stride=1;nt.prototype.children=null;nt.prototype.finished=!1;nt.prototype.nullValues=null;nt.prototype._isValid=()=>!0;var _t=class extends nt{constructor(t){super(t),this._values=new sr(this.ArrayType,0,this.stride)}setValue(t,e){let i=this._values;return i.reserve(t-i.length+1),super.setValue(t,e)}},Dt=class extends nt{constructor(t){super(t),this._pendingLength=0,this._offsets=new Fr(t.type)}setValue(t,e){let i=this._pending||(this._pending=new Map),n=i.get(t);n&&(this._pendingLength-=n.length),this._pendingLength+=e instanceof Ue?e[Ar].length:e.length,i.set(t,e)}setValid(t,e){return super.setValid(t,e)?!0:((this._pending||(this._pending=new Map)).set(t,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(){let t=this._pending,e=this._pendingLength;return this._pendingLength=0,this._pending=void 0,t&&t.size>0&&this._flushPending(t,e),this}};var Yr=class{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,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 sizeOf(){return 24}static createBlock(t,e,i,n){return t.prep(8,24),t.writeInt64(BigInt(n!=null?n:0)),t.pad(4),t.writeInt32(i),t.writeInt64(BigInt(e!=null?e:0)),t.offset()}};var Zt=class r{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsFooter(t,e){return(e||new r).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFooter(t,e){return t.setPosition(t.position()+4),(e||new r).__init(t.readInt32(t.position())+t.position(),t)}version(){let t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):K.V1}schema(t){let e=this.bb.__offset(this.bb_pos,6);return e?(t||new kt).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}dictionaries(t,e){let i=this.bb.__offset(this.bb_pos,8);return i?(e||new Yr).__init(this.bb.__vector(this.bb_pos+i)+t*24,this.bb):null}dictionariesLength(){let t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__vector_len(this.bb_pos+t):0}recordBatches(t,e){let i=this.bb.__offset(this.bb_pos,10);return i?(e||new Yr).__init(this.bb.__vector(this.bb_pos+i)+t*24,this.bb):null}recordBatchesLength(){let t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,e){let i=this.bb.__offset(this.bb_pos,12);return i?(e||new ft).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+t*4),this.bb):null}customMetadataLength(){let t=this.bb.__offset(this.bb_pos,12);return t?this.bb.__vector_len(this.bb_pos+t):0}static startFooter(t){t.startObject(5)}static addVersion(t,e){t.addFieldInt16(0,e,K.V1)}static addSchema(t,e){t.addFieldOffset(1,e,0)}static addDictionaries(t,e){t.addFieldOffset(2,e,0)}static startDictionariesVector(t,e){t.startVector(24,e,8)}static addRecordBatches(t,e){t.addFieldOffset(3,e,0)}static startRecordBatchesVector(t,e){t.startVector(24,e,8)}static addCustomMetadata(t,e){t.addFieldOffset(4,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4);for(let i=e.length-1;i>=0;i--)t.addOffset(e[i]);return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endFooter(t){return t.endObject()}static finishFooterBuffer(t,e){t.finish(e)}static finishSizePrefixedFooterBuffer(t,e){t.finish(e,void 0,!0)}};var Pf=Symbol.for("apache-arrow/Schema"),jf=Symbol.for("apache-arrow/Field"),G=class r{static isSchema(t){return(t==null?void 0:t[Pf])===!0}constructor(t=[],e,i,n=K.V5){this.fields=t||[],this.metadata=e||new Map,i||(i=Bc(this.fields)),this.dictionaries=i,this.metadataVersion=n}get[Symbol.toStringTag](){return"Schema"}get names(){return this.fields.map(t=>t.name)}toString(){return`Schema<{ ${this.fields.map((t,e)=>`${e}: ${t}`).join(", ")} }>`}select(t){let e=new Set(t),i=this.fields.filter(n=>e.has(n.name));return new r(i,this.metadata)}selectAt(t){let e=t.map(i=>this.fields[i]).filter(Boolean);return new r(e,this.metadata)}assign(...t){let e=t[0]instanceof r?t[0]:Array.isArray(t[0])?new r(t[0]):new r(t),i=[...this.fields],n=So(So(new Map,this.metadata),e.metadata),s=e.fields.filter(a=>{let c=i.findIndex(l=>l.name===a.name);return~c?(i[c]=a.clone({metadata:So(So(new Map,i[c].metadata),a.metadata)}))&&!1:!0}),o=Bc(s,new Map);return new r([...i,...s],n,new Map([...this.dictionaries,...o]))}};G.prototype.fields=null;G.prototype.metadata=null;G.prototype.dictionaries=null;G.prototype[Pf]=!0;Object.defineProperty(G,Symbol.hasInstance,{value:function(t){return Function.prototype[Symbol.hasInstance].call(this,t)||this===G&&G.isSchema(t)}});var U=class r{static isField(t){return(t==null?void 0:t[jf])===!0}static new(...t){let[e,i,n,s]=t;return t[0]&&typeof t[0]=="object"&&({name:e}=t[0],i===void 0&&(i=t[0].type),n===void 0&&(n=t[0].nullable),s===void 0&&(s=t[0].metadata)),new r(`${e}`,i,n,s)}constructor(t,e,i=!1,n){this.name=t,this.type=e,this.nullable=i,this.metadata=n||new Map}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...t){let[e,i,n,s]=t;return!t[0]||typeof t[0]!="object"?[e=this.name,i=this.type,n=this.nullable,s=this.metadata]=t:{name:e=this.name,type:i=this.type,nullable:n=this.nullable,metadata:s=this.metadata}=t[0],r.new(e,i,n,s)}};U.prototype.type=null;U.prototype.name=null;U.prototype.nullable=null;U.prototype.metadata=null;U.prototype[jf]=!0;Object.defineProperty(U,Symbol.hasInstance,{value:function(t){return Function.prototype[Symbol.hasInstance].call(this,t)||this===U&&U.isField(t)}});function So(r,t){return new Map([...r||new Map,...t||new Map])}function Bc(r,t=new Map){for(let e=-1,i=r.length;++e<i;){let s=r[e].type;if(g.isDictionary(s)){if(!t.has(s.id))t.set(s.id,s.dictionary);else if(t.get(s.id)!==s.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}s.children&&s.children.length>0&&Bc(s.children,t)}return t}var qp=$r,Kp=Tt,or=class{static decode(t){t=new Kp(I(t));let e=Zt.getRootAsFooter(t),i=G.decode(e.schema(),new Map,e.version());return new Tc(i,e)}static encode(t){let e=new qp,i=G.encode(e,t.schema);Zt.startRecordBatchesVector(e,t.numRecordBatches);for(let o of[...t.recordBatches()].slice().reverse())ar.encode(e,o);let n=e.endVector();Zt.startDictionariesVector(e,t.numDictionaries);for(let o of[...t.dictionaryBatches()].slice().reverse())ar.encode(e,o);let s=e.endVector();return Zt.startFooter(e),Zt.addSchema(e,i),Zt.addVersion(e,K.V5),Zt.addRecordBatches(e,n),Zt.addDictionaries(e,s),Zt.finishFooterBuffer(e,Zt.endFooter(e)),e.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(t,e=K.V5,i,n){this.schema=t,this.version=e,i&&(this._recordBatches=i),n&&(this._dictionaryBatches=n)}*recordBatches(){for(let t,e=-1,i=this.numRecordBatches;++e<i;)(t=this.getRecordBatch(e))&&(yield t)}*dictionaryBatches(){for(let t,e=-1,i=this.numDictionaries;++e<i;)(t=this.getDictionaryBatch(e))&&(yield t)}getRecordBatch(t){return t>=0&&t<this.numRecordBatches&&this._recordBatches[t]||null}getDictionaryBatch(t){return t>=0&&t<this.numDictionaries&&this._dictionaryBatches[t]||null}};var Tc=class extends or{get numRecordBatches(){return this._footer.recordBatchesLength()}get numDictionaries(){return this._footer.dictionariesLength()}constructor(t,e){super(t,e.version()),this._footer=e}getRecordBatch(t){if(t>=0&&t<this.numRecordBatches){let e=this._footer.recordBatches(t);if(e)return ar.decode(e)}return null}getDictionaryBatch(t){if(t>=0&&t<this.numDictionaries){let e=this._footer.dictionaries(t);if(e)return ar.decode(e)}return null}},ar=class r{static decode(t){return new r(t.metaDataLength(),t.bodyLength(),t.offset())}static encode(t,e){let{metaDataLength:i}=e,n=BigInt(e.offset),s=BigInt(e.bodyLength);return Yr.createBlock(t,n,i,s)}constructor(t,e,i){this.metaDataLength=t,this.offset=P(i),this.bodyLength=P(e)}};var Qt=class r{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsMessage(t,e){return(e||new r).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsMessage(t,e){return t.setPosition(t.position()+4),(e||new r).__init(t.readInt32(t.position())+t.position(),t)}version(){let t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):K.V1}headerType(){let t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readUint8(this.bb_pos+t):H.NONE}header(t){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__union(t,this.bb_pos+e):null}bodyLength(){let t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb_pos+t):BigInt("0")}customMetadata(t,e){let i=this.bb.__offset(this.bb_pos,12);return i?(e||new ft).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+t*4),this.bb):null}customMetadataLength(){let t=this.bb.__offset(this.bb_pos,12);return t?this.bb.__vector_len(this.bb_pos+t):0}static startMessage(t){t.startObject(5)}static addVersion(t,e){t.addFieldInt16(0,e,K.V1)}static addHeaderType(t,e){t.addFieldInt8(1,e,H.NONE)}static addHeader(t,e){t.addFieldOffset(2,e,0)}static addBodyLength(t,e){t.addFieldInt64(3,e,BigInt("0"))}static addCustomMetadata(t,e){t.addFieldOffset(4,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4);for(let i=e.length-1;i>=0;i--)t.addOffset(e[i]);return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endMessage(t){return t.endObject()}static finishMessageBuffer(t,e){t.finish(e)}static finishSizePrefixedMessageBuffer(t,e){t.finish(e,void 0,!0)}static createMessage(t,e,i,n,s,o){return r.startMessage(t),r.addVersion(t,e),r.addHeaderType(t,i),r.addHeader(t,n),r.addBodyLength(t,s),r.addCustomMetadata(t,o),r.endMessage(t)}};var xc=class extends A{visit(t,e){return t==null||e==null?void 0:super.visit(t,e)}visitNull(t,e){return pn.startNull(e),pn.endNull(e)}visitInt(t,e){return me.startInt(e),me.addBitWidth(e,t.bitWidth),me.addIsSigned(e,t.isSigned),me.endInt(e)}visitFloat(t,e){return Sr.startFloatingPoint(e),Sr.addPrecision(e,t.precision),Sr.endFloatingPoint(e)}visitBinary(t,e){return an.startBinary(e),an.endBinary(e)}visitBinaryView(t,e){return cn.startBinaryView(e),cn.endBinaryView(e)}visitLargeBinary(t,e){return un.startLargeBinary(e),un.endLargeBinary(e)}visitBool(t,e){return ln.startBool(e),ln.endBool(e)}visitUtf8(t,e){return yn.startUtf8(e),yn.endUtf8(e)}visitUtf8View(t,e){return gn.startUtf8View(e),gn.endUtf8View(e)}visitLargeUtf8(t,e){return dn.startLargeUtf8(e),dn.endLargeUtf8(e)}visitDecimal(t,e){return Ee.startDecimal(e),Ee.addScale(e,t.scale),Ee.addPrecision(e,t.precision),Ee.addBitWidth(e,t.bitWidth),Ee.endDecimal(e)}visitDate(t,e){return _r.startDate(e),_r.addUnit(e,t.unit),_r.endDate(e)}visitTime(t,e){return $e.startTime(e),$e.addUnit(e,t.unit),$e.addBitWidth(e,t.bitWidth),$e.endTime(e)}visitTimestamp(t,e){let i=t.timezone&&e.createString(t.timezone)||void 0;return He.startTimestamp(e),He.addUnit(e,t.unit),i!==void 0&&He.addTimezone(e,i),He.endTimestamp(e)}visitInterval(t,e){return Br.startInterval(e),Br.addUnit(e,t.unit),Br.endInterval(e)}visitDuration(t,e){return wr.startDuration(e),wr.addUnit(e,t.unit),wr.endDuration(e)}visitList(t,e){return hn.startList(e),hn.endList(e)}visitLargeList(t,e){return fn.startLargeList(e),fn.endLargeList(e)}visitStruct(t,e){return mn.startStruct_(e),mn.endStruct_(e)}visitUnion(t,e){ye.startTypeIdsVector(e,t.typeIds.length);let i=ye.createTypeIdsVector(e,t.typeIds);return ye.startUnion(e),ye.addMode(e,t.mode),ye.addTypeIds(e,i),ye.endUnion(e)}visitDictionary(t,e){let i=this.visit(t.indices,e);return Ne.startDictionaryEncoding(e),Ne.addId(e,BigInt(t.id)),Ne.addIsOrdered(e,t.isOrdered),i!==void 0&&Ne.addIndexType(e,i),Ne.endDictionaryEncoding(e)}visitFixedSizeBinary(t,e){return vr.startFixedSizeBinary(e),vr.addByteWidth(e,t.byteWidth),vr.endFixedSizeBinary(e)}visitFixedSizeList(t,e){return Ir.startFixedSizeList(e),Ir.addListSize(e,t.listSize),Ir.endFixedSizeList(e)}visitMap(t,e){return Tr.startMap(e),Tr.addKeysSorted(e,t.keysSorted),Tr.endMap(e)}},Bo=new xc;function Hf(r,t=new Map){return new G(Yp(r,t),To(r.metadata),t)}function Oc(r){return new wt(r.count,Jf(r.columns),Xf(r.columns),null,qf(r.columns))}function Gf(r){return new Ft(Oc(r.data),r.id,r.isDelta)}function Yp(r,t){return(r.fields||[]).filter(Boolean).map(e=>U.fromJSON(e,t))}function zf(r,t){return(r.children||[]).filter(Boolean).map(e=>U.fromJSON(e,t))}function Jf(r){return(r||[]).reduce((t,e)=>[...t,new oe(e.count,Zp(e.VALIDITY)),...Jf(e.children)],[])}function Xf(r,t=[]){for(let e=-1,i=(r||[]).length;++e<i;){let n=r[e];if(n.VALIDITY&&t.push(new pt(t.length,n.VALIDITY.length)),n.TYPE_ID&&t.push(new pt(t.length,n.TYPE_ID.length)),n.OFFSET&&t.push(new pt(t.length,n.OFFSET.length)),n.DATA&&t.push(new pt(t.length,n.DATA.length)),n.VIEWS&&t.push(new pt(t.length,n.VIEWS.length)),n.VARIADIC_DATA_BUFFERS)for(let s of n.VARIADIC_DATA_BUFFERS)t.push(new pt(t.length,s.length));t=Xf(n.children,t)}return t}function Zp(r){return(r||[]).reduce((t,e)=>t+ +(e===0),0)}function qf(r){return(r||[]).reduce((t,e)=>[...t,...e.VARIADIC_DATA_BUFFERS?[e.VARIADIC_DATA_BUFFERS.length]:[],...qf(e.children)],[])}function Kf(r,t){let e,i,n,s,o,a;return!t||!(s=r.dictionary)?(o=$f(r,zf(r,t)),n=new U(r.name,o,r.nullable,To(r.metadata))):t.has(e=s.id)?(i=(i=s.indexType)?Wf(i):new Le,a=new Kt(t.get(e),i,e,s.isOrdered),n=new U(r.name,a,r.nullable,To(r.metadata))):(i=(i=s.indexType)?Wf(i):new Le,t.set(e,o=$f(r,zf(r,t))),a=new Kt(o,i,e,s.isOrdered),n=new U(r.name,a,r.nullable,To(r.metadata))),n||null}function To(r=[]){return new Map(r.map(({key:t,value:e})=>[t,e]))}function Wf(r){return new St(r.isSigned,r.bitWidth)}function $f(r,t){let e=r.type.name;switch(e){case"NONE":return new Mt;case"null":return new Mt;case"binary":return new Ge;case"largebinary":return new Je;case"binaryview":return new R;case"utf8":return new Xe;case"largeutf8":return new qe;case"utf8view":return new qt;case"bool":return new Ke;case"list":return new _e((t||[])[0]);case"largelist":return new we((t||[])[0]);case"struct":return new at(t||[]);case"struct_":return new at(t||[])}switch(e){case"int":{let i=r.type;return new St(i.isSigned,i.bitWidth)}case"floatingpoint":{let i=r.type;return new se(Q[i.precision])}case"decimal":{let i=r.type;return new Ye(i.scale,i.precision,i.bitWidth)}case"date":{let i=r.type;return new Ze(ht[i.unit])}case"time":{let i=r.type;return new Qe(v[i.unit],i.bitWidth)}case"timestamp":{let i=r.type;return new tr(v[i.unit],i.timezone)}case"interval":{let i=r.type;return new er(it[i.unit])}case"duration":{let i=r.type;return new rr(v[i.unit])}case"union":{let i=r.type,[n,...s]=(i.mode+"").toLowerCase(),o=n.toUpperCase()+s.join("");return new ve(et[o],i.typeIds||[],t||[])}case"fixedsizebinary":{let i=r.type;return new ir(i.byteWidth)}case"fixedsizelist":{let i=r.type;return new Ie(i.listSize,(t||[])[0])}case"map":{let i=r.type;return new Se((t||[])[0],i.keysSorted)}}throw new Error(`Unrecognized type: "${e}"`)}var Qp=$r,tm=Tt,zt=class r{static fromJSON(t,e){let i=new r(0,K.V5,e);return i._createHeader=em(t,e),i}static decode(t){t=new tm(I(t));let e=Qt.getRootAsMessage(t),i=e.bodyLength(),n=e.version(),s=e.headerType(),o=hm(e),a=new r(i,n,s,void 0,o);return a._createHeader=rm(e,s),a}static encode(t){let e=new Qp,i=-1;t.isSchema()?i=G.encode(e,t.header()):t.isRecordBatch()?i=wt.encode(e,t.header()):t.isDictionaryBatch()&&(i=Ft.encode(e,t.header()));let n=t.metadata&&t.metadata.size>0?Qt.createCustomMetadataVector(e,[...t.metadata].map(([s,o])=>{let a=e.createString(`${s}`),c=e.createString(`${o}`);return ft.startKeyValue(e),ft.addKey(e,a),ft.addValue(e,c),ft.endKeyValue(e)})):-1;return Qt.startMessage(e),Qt.addVersion(e,K.V5),Qt.addHeader(e,i),Qt.addHeaderType(e,t.headerType),Qt.addBodyLength(e,BigInt(t.bodyLength)),n!==-1&&Qt.addCustomMetadata(e,n),Qt.finishMessageBuffer(e,Qt.endMessage(e)),e.asUint8Array()}static from(t,e=0){if(t instanceof G)return new r(0,K.V5,H.Schema,t);if(t instanceof wt)return new r(e,K.V5,H.RecordBatch,t,t.metadata);if(t instanceof Ft)return new r(e,K.V5,H.DictionaryBatch,t);throw new Error(`Unrecognized Message header: ${t}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get compression(){return this._compression}get bodyLength(){return this._bodyLength}get metadata(){return this._metadata}header(){return this._createHeader()}isSchema(){return this.headerType===H.Schema}isRecordBatch(){return this.headerType===H.RecordBatch}isDictionaryBatch(){return this.headerType===H.DictionaryBatch}constructor(t,e,i,n,s){this._version=e,this._headerType=i,this.body=new Uint8Array(0),this._compression=n==null?void 0:n.compression,n&&(this._createHeader=()=>n),this._bodyLength=P(t),this._metadata=s||new Map}},wt=class{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}get compression(){return this._compression}get variadicBufferCounts(){return this._variadicBufferCounts}get metadata(){return this._metadata}constructor(t,e,i,n,s=[],o){this._nodes=e,this._buffers=i,this._length=P(t),this._compression=n,this._variadicBufferCounts=s,this._metadata=o||new Map}},Ft=class{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}constructor(t,e,i=!1){this._data=t,this._isDelta=i,this._id=P(e)}},pt=class{constructor(t,e){this.offset=P(t),this.length=P(e)}},oe=class{constructor(t,e){this.length=P(t),this.nullCount=P(e)}},Zr=class{constructor(t,e=Hr.BUFFER){this.type=t,this.method=e}};function em(r,t){return(()=>{switch(t){case H.Schema:return G.fromJSON(r);case H.RecordBatch:return wt.fromJSON(r);case H.DictionaryBatch:return Ft.fromJSON(r)}throw new Error(`Unrecognized Message type: { name: ${H[t]}, type: ${t} }`)})}function rm(r,t){return(()=>{switch(t){case H.Schema:return G.decode(r.header(new kt),new Map,r.version());case H.RecordBatch:return wt.decode(r.header(new Ot),r.version());case H.DictionaryBatch:return Ft.decode(r.header(new We),r.version())}throw new Error(`Unrecognized Message type: { name: ${H[t]}, type: ${t} }`)})}U.encode=mm;U.decode=dm;U.fromJSON=Kf;G.encode=pm;G.decode=im;G.fromJSON=Hf;wt.encode=ym;wt.decode=nm;wt.fromJSON=Oc;Ft.encode=gm;Ft.decode=sm;Ft.fromJSON=Gf;oe.encode=bm;oe.decode=am;pt.encode=_m;pt.decode=om;Zr.encode=ed;Zr.decode=td;function im(r,t=new Map,e=K.V5){let i=fm(r,t);return new G(i,xo(r),t,e)}function nm(r,t=K.V5){return new wt(r.length(),cm(r),lm(r,t),td(r.compression()),um(r))}function sm(r,t=K.V5){return new Ft(wt.decode(r.data(),t),r.id(),r.isDelta())}function om(r){return new pt(r.offset(),r.length())}function am(r){return new oe(r.length(),r.nullCount())}function cm(r){let t=[];for(let e,i=-1,n=-1,s=r.nodesLength();++i<s;)(e=r.nodes(i))&&(t[++n]=oe.decode(e));return t}function lm(r,t){let e=[];for(let i,n=-1,s=-1,o=r.buffersLength();++n<o;)(i=r.buffers(n))&&(t<K.V4&&(i.bb_pos+=8*(n+1)),e[++s]=pt.decode(i));return e}function um(r){let t=[],e=Math.trunc(r.variadicBufferCountsLength());for(let i=0;i<e;++i)t.push(P(r.variadicBufferCounts(i)));return t}function fm(r,t){let e=[];for(let i,n=-1,s=-1,o=r.fieldsLength();++n<o;)(i=r.fields(n))&&(e[++s]=U.decode(i,t));return e}function Yf(r,t){let e=[];for(let i,n=-1,s=-1,o=r.childrenLength();++n<o;)(i=r.children(n))&&(e[++s]=U.decode(i,t));return e}function dm(r,t){let e,i,n,s,o,a;return!t||!(a=r.dictionary())?(n=Qf(r,Yf(r,t)),i=new U(r.name(),n,r.nullable(),xo(r))):t.has(e=P(a.id()))?(s=(s=a.indexType())?Zf(s):new Le,o=new Kt(t.get(e),s,e,a.isOrdered()),i=new U(r.name(),o,r.nullable(),xo(r))):(s=(s=a.indexType())?Zf(s):new Le,t.set(e,n=Qf(r,Yf(r,t))),o=new Kt(n,s,e,a.isOrdered()),i=new U(r.name(),o,r.nullable(),xo(r))),i||null}function xo(r){let t=new Map;if(r)for(let e,i,n=-1,s=Math.trunc(r.customMetadataLength());++n<s;)(e=r.customMetadata(n))&&(i=e.key())!=null&&t.set(i,e.value());return t}function hm(r){let t=new Map;for(let e,i,n=-1,s=Math.trunc(r.customMetadataLength());++n<s;)(e=r.customMetadata(n))&&(i=e.key())!=null&&t.set(i,e.value());return t}function Zf(r){return new St(r.isSigned(),r.bitWidth())}function Qf(r,t){let e=r.typeType();switch(e){case Y.NONE:return new Mt;case Y.Null:return new Mt;case Y.Binary:return new Ge;case Y.LargeBinary:return new Je;case Y.BinaryView:return new R;case Y.Utf8:return new Xe;case Y.LargeUtf8:return new qe;case Y.Utf8View:return new qt;case Y.Bool:return new Ke;case Y.List:return new _e((t||[])[0]);case Y.LargeList:return new we((t||[])[0]);case Y.Struct_:return new at(t||[])}switch(e){case Y.Int:{let i=r.type(new me);return new St(i.isSigned(),i.bitWidth())}case Y.FloatingPoint:{let i=r.type(new Sr);return new se(i.precision())}case Y.Decimal:{let i=r.type(new Ee);return new Ye(i.scale(),i.precision(),i.bitWidth())}case Y.Date:{let i=r.type(new _r);return new Ze(i.unit())}case Y.Time:{let i=r.type(new $e);return new Qe(i.unit(),i.bitWidth())}case Y.Timestamp:{let i=r.type(new He);return new tr(i.unit(),i.timezone())}case Y.Interval:{let i=r.type(new Br);return new er(i.unit())}case Y.Duration:{let i=r.type(new wr);return new rr(i.unit())}case Y.Union:{let i=r.type(new ye);return new ve(i.mode(),i.typeIdsArray()||[],t||[])}case Y.FixedSizeBinary:{let i=r.type(new vr);return new ir(i.byteWidth())}case Y.FixedSizeList:{let i=r.type(new Ir);return new Ie(i.listSize(),(t||[])[0])}case Y.Map:{let i=r.type(new Tr);return new Se((t||[])[0],i.keysSorted())}}throw new Error(`Unrecognized type: "${Y[e]}" (${e})`)}function td(r){return r?new Zr(r.codec(),r.method()):null}function pm(r,t){let e=t.fields.map(s=>U.encode(r,s));kt.startFieldsVector(r,e.length);let i=kt.createFieldsVector(r,e),n=t.metadata&&t.metadata.size>0?kt.createCustomMetadataVector(r,[...t.metadata].map(([s,o])=>{let a=r.createString(`${s}`),c=r.createString(`${o}`);return ft.startKeyValue(r),ft.addKey(r,a),ft.addValue(r,c),ft.endKeyValue(r)})):-1;return kt.startSchema(r),kt.addFields(r,i),kt.addEndianness(r,wm?br.Little:br.Big),n!==-1&&kt.addCustomMetadata(r,n),kt.endSchema(r)}function mm(r,t){let e=-1,i=-1,n=-1,s=t.type,o=t.typeId;g.isDictionary(s)?(o=s.dictionary.typeId,n=Bo.visit(s,r),i=Bo.visit(s.dictionary,r)):i=Bo.visit(s,r);let a=(s.children||[]).map(u=>U.encode(r,u)),c=At.createChildrenVector(r,a),l=t.metadata&&t.metadata.size>0?At.createCustomMetadataVector(r,[...t.metadata].map(([u,d])=>{let p=r.createString(`${u}`),m=r.createString(`${d}`);return ft.startKeyValue(r),ft.addKey(r,p),ft.addValue(r,m),ft.endKeyValue(r)})):-1;return t.name&&(e=r.createString(t.name)),At.startField(r),At.addType(r,i),At.addTypeType(r,o),At.addChildren(r,c),At.addNullable(r,!!t.nullable),e!==-1&&At.addName(r,e),n!==-1&&At.addDictionary(r,n),l!==-1&&At.addCustomMetadata(r,l),At.endField(r)}function ym(r,t){let e=t.nodes||[],i=t.buffers||[],n=t.variadicBufferCounts||[];Ot.startNodesVector(r,e.length);for(let l of e.slice().reverse())oe.encode(r,l);let s=r.endVector();Ot.startBuffersVector(r,i.length);for(let l of i.slice().reverse())pt.encode(r,l);let o=r.endVector(),a=null;t.compression!==null&&(a=ed(r,t.compression));let c=-1;return n.length>0&&(c=Ot.createVariadicBufferCountsVector(r,n.map(BigInt))),Ot.startRecordBatch(r),Ot.addLength(r,BigInt(t.length)),Ot.addNodes(r,s),Ot.addBuffers(r,o),t.compression!==null&&a&&Ot.addCompression(r,a),c!==-1&&Ot.addVariadicBufferCounts(r,c),Ot.endRecordBatch(r)}function ed(r,t){return ze.startBodyCompression(r),ze.addCodec(r,t.type),ze.addMethod(r,t.method),ze.endBodyCompression(r)}function gm(r,t){let e=wt.encode(r,t.data);return We.startDictionaryBatch(r),We.addId(r,BigInt(t.id)),We.addIsDelta(r,t.isDelta),We.addData(r,e),We.endDictionaryBatch(r)}function bm(r,t){return pi.createFieldNode(r,BigInt(t.length),BigInt(t.nullCount))}function _m(r,t){return hi.createBuffer(r,BigInt(t.offset),BigInt(t.length))}var wm=(()=>{let r=new ArrayBuffer(2);return new DataView(r).setInt16(0,256,!0),new Int16Array(r)[0]===256})();var ct=Object.freeze({done:!0,value:void 0}),Tn=class{constructor(t){this._json=t}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}},Qr=class{tee(){return this._getDOMStream().tee()}pipe(t,e){return this._getNodeStream().pipe(t,e)}pipeTo(t,e){return this._getDOMStream().pipeTo(t,e)}pipeThrough(t,e){return this._getDOMStream().pipeThrough(t,e)}_getDOMStream(){return this._DOMStream||(this._DOMStream=this.toDOMStream())}_getNodeStream(){return this._nodeStream||(this._nodeStream=this.toNodeStream())}},Oo=class extends Qr{constructor(){super(),this._values=[],this.resolvers=[],this._closedPromise=new Promise(t=>this._closedPromiseResolve=t)}get closed(){return this._closedPromise}cancel(t){return _(this,void 0,void 0,function*(){yield this.return(t)})}write(t){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(t):this.resolvers.shift().resolve({done:!1,value:t}))}abort(t){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:t}:this.resolvers.shift().reject({done:!0,value:t}))}close(){if(this._closedPromiseResolve){let{resolvers:t}=this;for(;t.length>0;)t.shift().resolve(ct);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(t){return Bt.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,t)}toNodeStream(t){return Bt.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,t)}throw(t){return _(this,void 0,void 0,function*(){return yield this.abort(t),ct})}return(t){return _(this,void 0,void 0,function*(){return yield this.close(),ct})}read(t){return _(this,void 0,void 0,function*(){return(yield this.next(t,"read")).value})}peek(t){return _(this,void 0,void 0,function*(){return(yield this.next(t,"peek")).value})}next(...t){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,i)=>{this.resolvers.push({resolve:e,reject:i})}):Promise.resolve(ct)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error("AsyncQueue is closed")}};var Me=class extends Oo{write(t){if((t=I(t)).byteLength>0)return super.write(t)}toString(t=!1){return t?fi(this.toUint8Array(!0)):this.toUint8Array(!1).then(fi)}toUint8Array(t=!1){return t?Xt(this._values)[0]:_(this,void 0,void 0,function*(){var e,i,n,s;let o=[],a=0;try{for(var c=!0,l=ue(this),u;u=yield l.next(),e=u.done,!e;c=!0){s=u.value,c=!1;let d=s;o.push(d),a+=d.byteLength}}catch(d){i={error:d}}finally{try{!c&&!e&&(n=l.return)&&(yield n.call(l))}finally{if(i)throw i.error}}return Xt(o,a)[0]})}},Ve=class{constructor(t){t&&(this.source=new Ac(Bt.fromIterable(t)))}[Symbol.iterator](){return this}next(t){return this.source.next(t)}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}peek(t){return this.source.peek(t)}read(t){return this.source.read(t)}},ae=class r{constructor(t){t instanceof r?this.source=t.source:t instanceof Me?this.source=new cr(Bt.fromAsyncIterable(t)):Ls(t)?this.source=new cr(Bt.fromNodeStream(t)):en(t)?this.source=new cr(Bt.fromDOMStream(t)):Ns(t)?this.source=new cr(Bt.fromDOMStream(t.body)):de(t)?this.source=new cr(Bt.fromIterable(t)):fe(t)?this.source=new cr(Bt.fromAsyncIterable(t)):ie(t)&&(this.source=new cr(Bt.fromAsyncIterable(t)))}[Symbol.asyncIterator](){return this}next(t){return this.source.next(t)}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}get closed(){return this.source.closed}cancel(t){return this.source.cancel(t)}peek(t){return this.source.peek(t)}read(t){return this.source.read(t)}},Ac=class{constructor(t){this.source=t}cancel(t){this.return(t)}peek(t){return this.next(t,"peek").value}read(t){return this.next(t,"read").value}next(t,e="read"){return this.source.next({cmd:e,size:t})}throw(t){return Object.create(this.source.throw&&this.source.throw(t)||ct)}return(t){return Object.create(this.source.return&&this.source.return(t)||ct)}},cr=class{constructor(t){this.source=t,this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}cancel(t){return _(this,void 0,void 0,function*(){yield this.return(t)})}get closed(){return this._closedPromise}read(t){return _(this,void 0,void 0,function*(){return(yield this.next(t,"read")).value})}peek(t){return _(this,void 0,void 0,function*(){return(yield this.next(t,"peek")).value})}next(t){return _(this,arguments,void 0,function*(e,i="read"){return yield this.source.next({cmd:i,size:e})})}throw(t){return _(this,void 0,void 0,function*(){let e=this.source.throw&&(yield this.source.throw(t))||ct;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(e)})}return(t){return _(this,void 0,void 0,function*(){let e=this.source.return&&(yield this.source.return(t))||ct;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(e)})}};var xn=class extends Ve{constructor(t,e){super(),this.position=0,this.buffer=I(t),this.size=e===void 0?this.buffer.byteLength:e}readInt32(t){let{buffer:e,byteOffset:i}=this.readAt(t,4);return new DataView(e,i).getInt32(0,!0)}seek(t){return this.position=Math.min(t,this.size),t<this.size}read(t){let{buffer:e,size:i,position:n}=this;return e&&n<i?(typeof t!="number"&&(t=Number.POSITIVE_INFINITY),this.position=Math.min(i,n+Math.min(i-n,t)),e.subarray(n,this.position)):null}readAt(t,e){let i=this.buffer,n=Math.min(this.size,t+e);return i?i.subarray(t,n):new Uint8Array(e)}close(){this.buffer&&(this.buffer=null)}throw(t){return this.close(),{done:!0,value:t}}return(t){return this.close(),{done:!0,value:t}}},Nr=class extends ae{constructor(t,e){super(),this.position=0,this._handle=t,typeof e=="number"?this.size=e:this._pending=_(this,void 0,void 0,function*(){this.size=(yield t.stat()).size,delete this._pending})}readInt32(t){return _(this,void 0,void 0,function*(){let{buffer:e,byteOffset:i}=yield this.readAt(t,4);return new DataView(e,i).getInt32(0,!0)})}seek(t){return _(this,void 0,void 0,function*(){return this._pending&&(yield this._pending),this.position=Math.min(t,this.size),t<this.size})}read(t){return _(this,void 0,void 0,function*(){this._pending&&(yield this._pending);let{_handle:e,size:i,position:n}=this;if(e&&n<i){typeof t!="number"&&(t=Number.POSITIVE_INFINITY);let s=n,o=0,a=0,c=Math.min(i,s+Math.min(i-s,t)),l=new Uint8Array(Math.max(0,(this.position=c)-s));for(;(s+=a)<c&&(o+=a)<l.byteLength;)({bytesRead:a}=yield e.read(l,o,l.byteLength-o,s));return l}return null})}readAt(t,e){return _(this,void 0,void 0,function*(){this._pending&&(yield this._pending);let{_handle:i,size:n}=this;if(i&&t+e<n){let s=Math.min(n,t+e),o=new Uint8Array(s-t);return(yield i.read(o,0,e,t)).buffer}return new Uint8Array(e)})}close(){return _(this,void 0,void 0,function*(){let t=this._handle;this._handle=null,t&&(yield t.close())})}throw(t){return _(this,void 0,void 0,function*(){return yield this.close(),{done:!0,value:t}})}return(t){return _(this,void 0,void 0,function*(){return yield this.close(),{done:!0,value:t}})}};var Fc={};xe(Fc,{BaseInt64:()=>On,Int128:()=>An,Int64:()=>lr,Uint64:()=>dt});function Oi(r){return r<0&&(r=4294967295+r+1),`0x${r.toString(16)}`}var Ai=8,Dc=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8],On=class{constructor(t){this.buffer=t}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(t){let e=new Uint32Array([this.buffer[1]>>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),i=new Uint32Array([t.buffer[1]>>>16,t.buffer[1]&65535,t.buffer[0]>>>16,t.buffer[0]&65535]),n=e[3]*i[3];this.buffer[0]=n&65535;let s=n>>>16;return n=e[2]*i[3],s+=n,n=e[3]*i[2]>>>0,s+=n,this.buffer[0]+=s<<16,this.buffer[1]=s>>>0<n?65536:0,this.buffer[1]+=s>>>16,this.buffer[1]+=e[1]*i[3]+e[2]*i[2]+e[3]*i[1],this.buffer[1]+=e[0]*i[3]+e[1]*i[2]+e[2]*i[1]+e[3]*i[0]<<16,this}_plus(t){let e=this.buffer[0]+t.buffer[0]>>>0;this.buffer[1]+=t.buffer[1],e<this.buffer[0]>>>0&&++this.buffer[1],this.buffer[0]=e}lessThan(t){return this.buffer[1]<t.buffer[1]||this.buffer[1]===t.buffer[1]&&this.buffer[0]<t.buffer[0]}equals(t){return this.buffer[1]===t.buffer[1]&&this.buffer[0]==t.buffer[0]}greaterThan(t){return t.lessThan(this)}hex(){return`${Oi(this.buffer[1])} ${Oi(this.buffer[0])}`}},dt=class r extends On{times(t){return this._times(t),this}plus(t){return this._plus(t),this}static from(t,e=new Uint32Array(2)){return r.fromString(typeof t=="string"?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(2)){return r.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(2)){let i=t.length,n=new r(e);for(let s=0;s<i;){let o=Ai<i-s?Ai:i-s,a=new r(new Uint32Array([Number.parseInt(t.slice(s,s+o),10),0])),c=new r(new Uint32Array([Dc[o],0]));n.times(c),n.plus(a),s+=o}return n}static convertArray(t){let e=new Uint32Array(t.length*2);for(let i=-1,n=t.length;++i<n;)r.from(t[i],new Uint32Array(e.buffer,e.byteOffset+2*i*4,2));return e}static multiply(t,e){return new r(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new r(new Uint32Array(t.buffer)).plus(e)}},lr=class r extends On{negate(){return this.buffer[0]=~this.buffer[0]+1,this.buffer[1]=~this.buffer[1],this.buffer[0]==0&&++this.buffer[1],this}times(t){return this._times(t),this}plus(t){return this._plus(t),this}lessThan(t){let e=this.buffer[1]<<0,i=t.buffer[1]<<0;return e<i||e===i&&this.buffer[0]<t.buffer[0]}static from(t,e=new Uint32Array(2)){return r.fromString(typeof t=="string"?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(2)){return r.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(2)){let i=t.startsWith("-"),n=t.length,s=new r(e);for(let o=i?1:0;o<n;){let a=Ai<n-o?Ai:n-o,c=new r(new Uint32Array([Number.parseInt(t.slice(o,o+a),10),0])),l=new r(new Uint32Array([Dc[a],0]));s.times(l),s.plus(c),o+=a}return i?s.negate():s}static convertArray(t){let e=new Uint32Array(t.length*2);for(let i=-1,n=t.length;++i<n;)r.from(t[i],new Uint32Array(e.buffer,e.byteOffset+2*i*4,2));return e}static multiply(t,e){return new r(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new r(new Uint32Array(t.buffer)).plus(e)}},An=class r{constructor(t){this.buffer=t}high(){return new lr(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2))}low(){return new lr(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset,2))}negate(){return this.buffer[0]=~this.buffer[0]+1,this.buffer[1]=~this.buffer[1],this.buffer[2]=~this.buffer[2],this.buffer[3]=~this.buffer[3],this.buffer[0]==0&&++this.buffer[1],this.buffer[1]==0&&++this.buffer[2],this.buffer[2]==0&&++this.buffer[3],this}times(t){let e=new dt(new Uint32Array([this.buffer[3],0])),i=new dt(new Uint32Array([this.buffer[2],0])),n=new dt(new Uint32Array([this.buffer[1],0])),s=new dt(new Uint32Array([this.buffer[0],0])),o=new dt(new Uint32Array([t.buffer[3],0])),a=new dt(new Uint32Array([t.buffer[2],0])),c=new dt(new Uint32Array([t.buffer[1],0])),l=new dt(new Uint32Array([t.buffer[0],0])),u=dt.multiply(s,l);this.buffer[0]=u.low();let d=new dt(new Uint32Array([u.high(),0]));return u=dt.multiply(n,l),d.plus(u),u=dt.multiply(s,c),d.plus(u),this.buffer[1]=d.low(),this.buffer[3]=d.lessThan(u)?1:0,this.buffer[2]=d.high(),new dt(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2)).plus(dt.multiply(i,l)).plus(dt.multiply(n,c)).plus(dt.multiply(s,a)),this.buffer[3]+=dt.multiply(e,l).plus(dt.multiply(i,c)).plus(dt.multiply(n,a)).plus(dt.multiply(s,o)).low(),this}plus(t){let e=new Uint32Array(4);return e[3]=this.buffer[3]+t.buffer[3]>>>0,e[2]=this.buffer[2]+t.buffer[2]>>>0,e[1]=this.buffer[1]+t.buffer[1]>>>0,e[0]=this.buffer[0]+t.buffer[0]>>>0,e[0]<this.buffer[0]>>>0&&++e[1],e[1]<this.buffer[1]>>>0&&++e[2],e[2]<this.buffer[2]>>>0&&++e[3],this.buffer[3]=e[3],this.buffer[2]=e[2],this.buffer[1]=e[1],this.buffer[0]=e[0],this}hex(){return`${Oi(this.buffer[3])} ${Oi(this.buffer[2])} ${Oi(this.buffer[1])} ${Oi(this.buffer[0])}`}static multiply(t,e){return new r(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new r(new Uint32Array(t.buffer)).plus(e)}static from(t,e=new Uint32Array(4)){return r.fromString(typeof t=="string"?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(4)){return r.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(4)){let i=t.startsWith("-"),n=t.length,s=new r(e);for(let o=i?1:0;o<n;){let a=Ai<n-o?Ai:n-o,c=new r(new Uint32Array([Number.parseInt(t.slice(o,o+a),10),0,0,0])),l=new r(new Uint32Array([Dc[a],0,0,0]));s.times(l),s.plus(c),o+=a}return i?s.negate():s}static convertArray(t){let e=new Uint32Array(t.length*4);for(let i=-1,n=t.length;++i<n;)r.from(t[i],new Uint32Array(e.buffer,e.byteOffset+16*i,4));return e}};var Lc={};xe(Lc,{toIntervalDayTimeInt32Array:()=>Nc,toIntervalDayTimeObjects:()=>vm,toIntervalMonthDayNanoInt32Array:()=>Ec,toIntervalMonthDayNanoObjects:()=>Im});function Nc(r){var t,e;let i=r.length,n=new Int32Array(i*2);for(let s=0,o=0;s<i;s++){let a=r[s];n[o++]=(t=a.days)!==null&&t!==void 0?t:0,n[o++]=(e=a.milliseconds)!==null&&e!==void 0?e:0}return n}function Ec(r){var t,e;let i=r.length,n=new Int32Array(i*4);for(let s=0,o=0;s<i;s++){let a=r[s];n[o++]=(t=a.months)!==null&&t!==void 0?t:0,n[o++]=(e=a.days)!==null&&e!==void 0?e:0;let c=a.nanoseconds;if(c){let l=BigInt(c);n[o++]=Number(l&BigInt(4294967295))>>>0,n[o++]=Number(l>>BigInt(32))>>>0}else o+=2}return n}function vm(r){let t=r.length,e=new Array(t/2);for(let i=0,n=0;i<t;i+=2)e[n++]={days:r[i],milliseconds:r[i+1]};return e}function Im(r,t){let e=r.length,i=new Array(e/4);for(let n=0,s=0;n<e;n+=4){let o=BigInt(r[n+3])<<BigInt(32)|BigInt(r[n+2]>>>0);i[s++]={months:r[n],days:r[n+1],nanoseconds:t?`${o}`:o}}return i}var Di=class extends A{constructor(t,e,i,n,s=K.V5,o=[]){super(),this.nodesIndex=-1,this.buffersIndex=-1,this.variadicBufferIndex=-1,this.bytes=t,this.nodes=e,this.buffers=i,this.dictionaries=n,this.metadataVersion=s,this.variadicBufferCounts=o}visit(t){return super.visit(t instanceof U?t.type:t)}visitNull(t,{length:e}=this.nextFieldNode()){return E({type:t,length:e})}visitBool(t,{length:e,nullCount:i}=this.nextFieldNode()){return E({type:t,length:e,nullCount:i,nullBitmap:this.readNullBitmap(t,i),data:this.readData(t)})}visitInt(t,{length:e,nullCount:i}=this.nextFieldNode()){return E({type:t,length:e,nullCount:i,nullBitmap:this.readNullBitmap(t,i),data:this.readData(t)})}visitFloat(t,{length:e,nullCount:i}=this.nextFieldNode()){return E({type:t,length:e,nullCount:i,nullBitmap:this.readNullBitmap(t,i),data:this.readData(t)})}visitUtf8(t,{length:e,nullCount:i}=this.nextFieldNode()){return E({type:t,length:e,nullCount:i,nullBitmap:this.readNullBitmap(t,i),valueOffsets:this.readOffsets(t),data:this.readData(t)})}visitLargeUtf8(t,{length:e,nullCount:i}=this.nextFieldNode()){return E({type:t,length:e,nullCount:i,nullBitmap:this.readNullBitmap(t,i),valueOffsets:this.readOffsets(t),data:this.readData(t)})}visitUtf8View(t,{length:e,nullCount:i}=this.nextFieldNode()){let n=this.readNullBitmap(t,i),s=this.readData(t),o=this.readVariadicBuffers(this.nextVariadicBufferCount());return E({type:t,length:e,nullCount:i,nullBitmap:n,views:s,variadicBuffers:o})}visitBinary(t,{length:e,nullCount:i}=this.nextFieldNode()){return E({type:t,length:e,nullCount:i,nullBitmap:this.readNullBitmap(t,i),valueOffsets:this.readOffsets(t),data:this.readData(t)})}visitLargeBinary(t,{length:e,nullCount:i}=this.nextFieldNode()){return E({type:t,length:e,nullCount:i,nullBitmap:this.readNullBitmap(t,i),valueOffsets:this.readOffsets(t),data:this.readData(t)})}visitBinaryView(t,{length:e,nullCount:i}=this.nextFieldNode()){let n=this.readNullBitmap(t,i),s=this.readData(t),o=this.readVariadicBuffers(this.nextVariadicBufferCount());return E({type:t,length:e,nullCount:i,nullBitmap:n,views:s,variadicBuffers:o})}visitFixedSizeBinary(t,{length:e,nullCount:i}=this.nextFieldNode()){return E({type:t,length:e,nullCount:i,nullBitmap:this.readNullBitmap(t,i),data:this.readData(t)})}visitDate(t,{length:e,nullCount:i}=this.nextFieldNode()){return E({type:t,length:e,nullCount:i,nullBitmap:this.readNullBitmap(t,i),data:this.readData(t)})}visitTimestamp(t,{length:e,nullCount:i}=this.nextFieldNode()){return E({type:t,length:e,nullCount:i,nullBitmap:this.readNullBitmap(t,i),data:this.readData(t)})}visitTime(t,{length:e,nullCount:i}=this.nextFieldNode()){return E({type:t,length:e,nullCount:i,nullBitmap:this.readNullBitmap(t,i),data:this.readData(t)})}visitDecimal(t,{length:e,nullCount:i}=this.nextFieldNode()){return E({type:t,length:e,nullCount:i,nullBitmap:this.readNullBitmap(t,i),data:this.readData(t)})}visitList(t,{length:e,nullCount:i}=this.nextFieldNode()){return E({type:t,length:e,nullCount:i,nullBitmap:this.readNullBitmap(t,i),valueOffsets:this.readOffsets(t),child:this.visit(t.children[0])})}visitLargeList(t,{length:e,nullCount:i}=this.nextFieldNode()){return E({type:t,length:e,nullCount:i,nullBitmap:this.readNullBitmap(t,i),valueOffsets:this.readOffsets(t),child:this.visit(t.children[0])})}visitStruct(t,{length:e,nullCount:i}=this.nextFieldNode()){return E({type:t,length:e,nullCount:i,nullBitmap:this.readNullBitmap(t,i),children:this.visitMany(t.children)})}visitUnion(t,{length:e,nullCount:i}=this.nextFieldNode()){return this.metadataVersion<K.V5&&this.readNullBitmap(t,i),t.mode===et.Sparse?this.visitSparseUnion(t,{length:e,nullCount:i}):this.visitDenseUnion(t,{length:e,nullCount:i})}visitDenseUnion(t,{length:e,nullCount:i}=this.nextFieldNode()){return E({type:t,length:e,nullCount:i,typeIds:this.readTypeIds(t),valueOffsets:this.readOffsets(t),children:this.visitMany(t.children)})}visitSparseUnion(t,{length:e,nullCount:i}=this.nextFieldNode()){return E({type:t,length:e,nullCount:i,typeIds:this.readTypeIds(t),children:this.visitMany(t.children)})}visitDictionary(t,{length:e,nullCount:i}=this.nextFieldNode()){return E({type:t,length:e,nullCount:i,nullBitmap:this.readNullBitmap(t,i),data:this.readData(t.indices),dictionary:this.readDictionary(t)})}visitInterval(t,{length:e,nullCount:i}=this.nextFieldNode()){return E({type:t,length:e,nullCount:i,nullBitmap:this.readNullBitmap(t,i),data:this.readData(t)})}visitDuration(t,{length:e,nullCount:i}=this.nextFieldNode()){return E({type:t,length:e,nullCount:i,nullBitmap:this.readNullBitmap(t,i),data:this.readData(t)})}visitFixedSizeList(t,{length:e,nullCount:i}=this.nextFieldNode()){return E({type:t,length:e,nullCount:i,nullBitmap:this.readNullBitmap(t,i),child:this.visit(t.children[0])})}visitMap(t,{length:e,nullCount:i}=this.nextFieldNode()){return E({type:t,length:e,nullCount:i,nullBitmap:this.readNullBitmap(t,i),valueOffsets:this.readOffsets(t),child:this.visit(t.children[0])})}nextFieldNode(){return this.nodes[++this.nodesIndex]}nextBufferRange(){return this.buffers[++this.buffersIndex]}readNullBitmap(t,e,i=this.nextBufferRange()){return e>0&&this.readData(t,i)||new Uint8Array(0)}readOffsets(t,e){return this.readData(t,e)}readTypeIds(t,e){return this.readData(t,e)}readData(t,{length:e,offset:i}=this.nextBufferRange()){return this.bytes.subarray(i,i+e)}readVariadicBuffers(t){return Array.from({length:t},()=>this.readData(null))}nextVariadicBufferCount(){var t;return(t=this.variadicBufferCounts[++this.variadicBufferIndex])!==null&&t!==void 0?t:0}readDictionary(t){return this.dictionaries.get(t.id)}},Ao=class extends Di{constructor(t,e,i,n,s,o=[]){super(new Uint8Array(0),e,i,n,s,o),this.sources=t}readNullBitmap(t,e,{offset:i}=this.nextBufferRange()){return e<=0?new Uint8Array(0):qr(this.sources[i])}readOffsets(t,{offset:e}=this.nextBufferRange()){return k(Uint8Array,k(t.OffsetArrayType,this.sources[e]))}readTypeIds(t,{offset:e}=this.nextBufferRange()){return k(Uint8Array,k(t.ArrayType,this.sources[e]))}readData(t,{offset:e}=this.nextBufferRange()){let{sources:i}=this;if(g.isTimestamp(t))return k(Uint8Array,lr.convertArray(i[e]));if((g.isInt(t)||g.isTime(t))&&t.bitWidth===64||g.isDuration(t))return k(Uint8Array,lr.convertArray(i[e]));if(g.isDate(t)&&t.unit===ht.MILLISECOND)return k(Uint8Array,lr.convertArray(i[e]));if(g.isDecimal(t))return k(Uint8Array,An.convertArray(i[e]));if(g.isBinary(t)||g.isLargeBinary(t)||g.isFixedSizeBinary(t))return Sm(i[e]);if(g.isBinaryView(t))return Bm(i[e]);if(g.isUtf8View(t))return Tm(i[e]);if(g.isBool(t))return qr(i[e]);if(g.isUtf8(t)||g.isLargeUtf8(t))return Jt(i[e].join(""));if(g.isInterval(t))switch(t.unit){case it.DAY_TIME:return Nc(i[e]);case it.MONTH_DAY_NANO:return Ec(i[e]);default:break}return k(Uint8Array,k(t.ArrayType,i[e].map(n=>+n)))}readVariadicBuffers(t){let e=[];for(let i=0;i<t;i++){let{offset:n}=this.nextBufferRange(),s=this.sources[n];e.push(id(s))}return e}};function id(r){let t=new Uint8Array(r.length/2);for(let e=0;e<r.length;e+=2)t[e>>1]=Number.parseInt(r.slice(e,e+2),16);return t}function Sm(r){return id(r.join(""))}function nd(r,t){let e=new Uint8Array(r.length*16),i=new DataView(e.buffer);for(let[n,s]of r.entries()){let o=n*16,a=s.SIZE;if(i.setInt32(o,a,!0),s.INLINED!==void 0){let c=t(s.INLINED);for(let l=0;l<c.length&&l<12;l++)e[o+4+l]=c[l]}else{let c=s.PREFIX_HEX;for(let l=0;l<8&&l<c.length;l+=2)e[o+4+(l>>1)]=Number.parseInt(c.slice(l,l+2),16);i.setInt32(o+8,s.BUFFER_INDEX,!0),i.setInt32(o+12,s.OFFSET,!0)}}return e}function Bm(r){return nd(r,t=>{let e=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)e[i>>1]=Number.parseInt(t.slice(i,i+2),16);return e})}function Tm(r){return nd(r,t=>new TextEncoder().encode(t))}var Do=class extends Di{constructor(t,e,i,n,s,o=[]){super(new Uint8Array(0),e,i,n,s,o),this.bodyChunks=t}readData(t,e=this.nextBufferRange()){return this.bodyChunks[this.buffersIndex]}};var Fi=class extends Dt{constructor(t){super(t),this._values=new jt(Uint8Array)}get byteLength(){let t=this._pendingLength+this.length*4;return this._offsets&&(t+=this._offsets.byteLength),this._values&&(t+=this._values.byteLength),this._nulls&&(t+=this._nulls.byteLength),t}setValue(t,e){return super.setValue(t,I(e))}_flushPending(t,e){let i=this._offsets,n=this._values.reserve(e).buffer,s=0;for(let[o,a]of t)if(a===void 0)i.set(o,0);else{let c=a.length;n.set(a,s),i.set(o,c),s+=c}}};var Ni=class extends Dt{constructor(t){super(t),this._values=new jt(Uint8Array)}get byteLength(){let t=this._pendingLength+this.length*4;return this._offsets&&(t+=this._offsets.byteLength),this._values&&(t+=this._values.byteLength),this._nulls&&(t+=this._nulls.byteLength),t}setValue(t,e){return super.setValue(t,I(e))}_flushPending(t,e){let i=this._offsets,n=this._values.reserve(e).buffer,s=0;for(let[o,a]of t)if(a===void 0)i.set(o,BigInt(0));else{let c=a.length;n.set(a,s),i.set(o,BigInt(c)),s+=c}}};var Fo=class extends nt{constructor(t){super(t),this._values=new xi}setValue(t,e){this._values.set(t,+e)}};var ti=class extends _t{};ti.prototype._setValue=ac;var Dn=class extends ti{};Dn.prototype._setValue=Ks;var Fn=class extends ti{};Fn.prototype._setValue=Ys;var Nn=class extends _t{};Nn.prototype._setValue=uc;var No=class extends nt{constructor({type:t,nullValues:e,dictionaryHashFunction:i}){super({type:new Kt(t.dictionary,t.indices,t.id,t.isOrdered)}),this._nulls=null,this._dictionaryOffset=0,this._keysToIndices=Object.create(null),this.indices=ei({type:this.type.indices,nullValues:e}),this.dictionary=ei({type:this.type.dictionary,nullValues:null}),typeof i=="function"&&(this.valueToKey=i)}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(t){return this.indices.isValid(t)}setValid(t,e){let i=this.indices;return e=i.setValid(t,e),this.length=i.length,e}setValue(t,e){let i=this._keysToIndices,n=this.valueToKey(e),s=i[n];return s===void 0&&(i[n]=s=this._dictionaryOffset+this.dictionary.append(e).length-1),this.indices.setValue(t,s)}flush(){let t=this.type,e=this._dictionary,i=this.dictionary.toVector(),n=this.indices.flush().clone(t);return n.dictionary=e?e.concat(i):i,this.finished||(this._dictionaryOffset+=i.length),this._dictionary=n.dictionary,this.clear(),n}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(t){return typeof t=="string"?t:`${t}`}};var En=class extends _t{};En.prototype._setValue=oc;var Eo=class extends nt{setValue(t,e){let[i]=this.children,n=t*this.stride;for(let s=-1,o=this.stride;++s<o;)i.set(n+s,e[s])}setValid(t,e){return super.setValid(t,e)||this.children[0].setValid((t+1)*this.stride-1,!1),e}addChild(t,e="0"){if(this.numChildren>0)throw new Error("FixedSizeListBuilder can only have one child.");let i=this.children.push(t);return this.type=new Ie(this.type.listSize,new U(e,t.type,!0)),i}};var ri=class extends _t{setValue(t,e){this._values.set(t,e)}},Lo=class extends ri{setValue(t,e){super.setValue(t,wn(e))}},Uo=class extends ri{},Mo=class extends ri{};var Er=class extends _t{};Er.prototype._setValue=fc;var Ln=class extends Er{};Ln.prototype._setValue=oo;var Un=class extends Er{};Un.prototype._setValue=ao;var Mn=class extends Er{};Mn.prototype._setValue=co;var ur=class extends _t{};ur.prototype._setValue=dc;var Vn=class extends ur{};Vn.prototype._setValue=lo;var Rn=class extends ur{};Rn.prototype._setValue=uo;var Cn=class extends ur{};Cn.prototype._setValue=fo;var kn=class extends ur{};kn.prototype._setValue=ho;var ce=class extends _t{setValue(t,e){this._values.set(t,e)}},Vo=class extends ce{},Ro=class extends ce{},Co=class extends ce{},ko=class extends ce{},Po=class extends ce{},jo=class extends ce{},zo=class extends ce{},Wo=class extends ce{};var $o=class extends Dt{constructor(t){super(t),this._offsets=new Fr(t.type)}addChild(t,e="0"){if(this.numChildren>0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=t,this.type=new _e(new U(e,t.type,!0)),this.numChildren-1}_flushPending(t){let e=this._offsets,[i]=this.children;for(let[n,s]of t)if(typeof s=="undefined")e.set(n,0);else{let o=s,a=o.length,c=e.set(n,a).buffer[n];for(let l=-1;++l<a;)i.set(c+l,o[l])}}};var Ho=class extends Dt{constructor(t){super(t),this._offsets=new Fr(t.type)}addChild(t,e="0"){if(this.numChildren>0)throw new Error("LargeListBuilder can only have one child.");return this.children[this.numChildren]=t,this.type=new we(new U(e,t.type,!0)),this.numChildren-1}_flushPending(t){let e=this._offsets,[i]=this.children;for(let[n,s]of t)if(typeof s=="undefined")e.set(n,BigInt(0));else{let o=s,a=o.length,c=P(e.set(n,BigInt(a)).buffer[n]);for(let l=-1;++l<a;)i.set(c+l,o[l])}}};var Go=class extends Dt{set(t,e){return super.set(t,e)}setValue(t,e){let i=e instanceof Map?e:new Map(Object.entries(e)),n=this._pending||(this._pending=new Map),s=n.get(t);s&&(this._pendingLength-=s.size),this._pendingLength+=i.size,n.set(t,i)}addChild(t,e=`${this.numChildren}`){if(this.numChildren>0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=t,this.type=new Se(new U(e,t.type,!0),this.type.keysSorted),this.numChildren-1}_flushPending(t){let e=this._offsets,[i]=this.children;for(let[n,s]of t)if(s===void 0)e.set(n,0);else{let{[n]:o,[n+1]:a}=e.set(n,s.size).buffer;for(let c of s.entries())if(i.set(o,c),++o>=a)break}}};var Jo=class extends nt{setValue(t,e){}setValid(t,e){return this.length=Math.max(t+1,this.length),e}};var Xo=class extends nt{setValue(t,e){let{children:i,type:n}=this;switch(Array.isArray(e)||e.constructor){case!0:return n.children.forEach((s,o)=>i[o].set(t,e[o]));case Map:return n.children.forEach((s,o)=>i[o].set(t,e.get(s.name)));default:return n.children.forEach((s,o)=>i[o].set(t,e[s.name]))}}setValid(t,e){return super.setValid(t,e)||this.children.forEach(i=>i.setValid(t,e)),e}addChild(t,e=`${this.numChildren}`){let i=this.children.push(t);return this.type=new at([...this.type.children,new U(e,t.type,!0)]),i}};var fr=class extends _t{};fr.prototype._setValue=cc;var Pn=class extends fr{};Pn.prototype._setValue=Zs;var jn=class extends fr{};jn.prototype._setValue=Qs;var zn=class extends fr{};zn.prototype._setValue=to;var Wn=class extends fr{};Wn.prototype._setValue=eo;var dr=class extends _t{};dr.prototype._setValue=lc;var $n=class extends dr{};$n.prototype._setValue=ro;var Hn=class extends dr{};Hn.prototype._setValue=io;var Gn=class extends dr{};Gn.prototype._setValue=no;var Jn=class extends dr{};Jn.prototype._setValue=so;var Ei=class extends nt{constructor(t){super(t),this._typeIds=new sr(Int8Array,0,1),typeof t.valueToChildTypeId=="function"&&(this._valueToChildTypeId=t.valueToChildTypeId)}get typeIdToChildIndex(){return this.type.typeIdToChildIndex}append(t,e){return this.set(this.length,t,e)}set(t,e,i){return i===void 0&&(i=this._valueToChildTypeId(this,e,t)),this.setValue(t,e,i),this}setValue(t,e,i){this._typeIds.set(t,i);let n=this.type.typeIdToChildIndex[i],s=this.children[n];s==null||s.set(t,e),this.length=Math.max(t+1,this.length)}addChild(t,e=`${this.children.length}`){let i=this.children.push(t),{type:{children:n,mode:s,typeIds:o}}=this,a=[...n,new U(e,t.type)];return this.type=new ve(s,[...o,i],a),i}_valueToChildTypeId(t,e,i){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.")}},qo=class extends Ei{},Ko=class extends Ei{constructor(t){super(t),this._offsets=new sr(Int32Array)}setValue(t,e,i){let n=this._typeIds.set(t,i).buffer[t],s=this.getChildAt(this.type.typeIdToChildIndex[n]),o=this._offsets.set(t,s.length).buffer[t];s==null||s.set(o,e),this.length=Math.max(t+1,this.length)}};var Xn=class extends Dt{constructor(t){super(t),this._values=new jt(Uint8Array)}get byteLength(){let t=this._pendingLength+this.length*4;return this._offsets&&(t+=this._offsets.byteLength),this._values&&(t+=this._values.byteLength),this._nulls&&(t+=this._nulls.byteLength),t}setValue(t,e){return super.setValue(t,Jt(e))}_flushPending(t,e){}};Xn.prototype._flushPending=Fi.prototype._flushPending;var qn=class extends Dt{constructor(t){super(t),this._values=new jt(Uint8Array)}get byteLength(){let t=this._pendingLength+this.length*4;return this._offsets&&(t+=this._offsets.byteLength),this._values&&(t+=this._values.byteLength),this._nulls&&(t+=this._nulls.byteLength),t}setValue(t,e){return super.setValue(t,Jt(e))}_flushPending(t,e){}};qn.prototype._flushPending=Ni.prototype._flushPending;var Li=class extends nt{constructor(t){super(t),this._variadicBuffers=[],this._currentBuffer=null,this._currentBufferIndex=0,this._currentBufferOffset=0,this._bufferSize=32*1024*1024,this._views=new jt(Uint8Array)}get byteLength(){let t=0;this._views&&(t+=this._views.byteLength),this._nulls&&(t+=this._nulls.byteLength);for(let e of this._variadicBuffers)t+=e.byteLength;return this._currentBuffer&&(t+=this._currentBuffer.byteLength),t}setValue(t,e){return this.writeBinaryValue(t,this.encodeValue(e))}writeBinaryValue(t,e){let i=e.length,n=(t+1)*R.ELEMENT_WIDTH,s=this._views.length;n>s&&this._views.reserve(n-s);let o=this._views.buffer,a=t*R.ELEMENT_WIDTH,c=new DataView(o.buffer,o.byteOffset+a,R.ELEMENT_WIDTH);if(c.setInt32(R.LENGTH_OFFSET,i,!0),i<=R.INLINE_CAPACITY){o.set(e,a+R.INLINE_OFFSET);for(let l=i;l<R.INLINE_CAPACITY;l++)o[a+R.INLINE_OFFSET+l]=0}else{let l=new DataView(e.buffer,e.byteOffset,Math.min(4,i));c.setUint32(R.INLINE_OFFSET,l.getUint32(0,!0),!0),(!this._currentBuffer||this._currentBufferOffset+i>this._bufferSize)&&(this._currentBuffer&&this._variadicBuffers.push(this._currentBuffer.buffer.slice(0,this._currentBufferOffset)),this._currentBuffer=new jt(Uint8Array),this._currentBufferIndex=this._variadicBuffers.length,this._currentBufferOffset=0),this._currentBuffer.reserve(i).buffer.set(e,this._currentBufferOffset),c.setInt32(R.BUFFER_INDEX_OFFSET,this._currentBufferIndex,!0),c.setInt32(R.BUFFER_OFFSET_OFFSET,this._currentBufferOffset,!0),this._currentBufferOffset+=i}return this}encodeValue(t){return I(t)}setValid(t,e){let i=(t+1)*R.ELEMENT_WIDTH,n=this._views.length;i>n&&this._views.reserve(i-n);let s=super.setValid(t,e);if(!s){let o=this._views.buffer,a=t*R.ELEMENT_WIDTH;for(let c=0;c<R.ELEMENT_WIDTH;c++)o[a+c]=0}return s}clear(){return this._variadicBuffers=[],this._currentBuffer=null,this._currentBufferIndex=0,this._currentBufferOffset=0,this._views.clear(),super.clear()}flush(){let{type:t,length:e,nullCount:i,_views:n,_nulls:s}=this;this._currentBuffer&&this._currentBufferOffset>0&&(this._variadicBuffers.push(this._currentBuffer.buffer.slice(0,this._currentBufferOffset)),this._currentBuffer=null,this._currentBufferOffset=0);let o=n.flush(e*R.ELEMENT_WIDTH),a=i>0?s.flush(e):void 0,c=this._variadicBuffers.slice();return this._variadicBuffers=[],this._currentBufferIndex=0,this.clear(),E({type:t,length:e,nullCount:i,nullBitmap:a,views:o,variadicBuffers:c})}finish(){return this.finished=!0,this}};var Yo=class extends Li{constructor(t){super(t)}setValue(t,e){return this.writeBinaryValue(t,Jt(e))}};var Uc=class extends A{visitNull(){return Jo}visitBool(){return Fo}visitInt(){return ce}visitInt8(){return Vo}visitInt16(){return Ro}visitInt32(){return Co}visitInt64(){return ko}visitUint8(){return Po}visitUint16(){return jo}visitUint32(){return zo}visitUint64(){return Wo}visitFloat(){return ri}visitFloat16(){return Lo}visitFloat32(){return Uo}visitFloat64(){return Mo}visitUtf8(){return Xn}visitLargeUtf8(){return qn}visitBinary(){return Fi}visitLargeBinary(){return Ni}visitFixedSizeBinary(){return En}visitDate(){return ti}visitDateDay(){return Dn}visitDateMillisecond(){return Fn}visitTimestamp(){return fr}visitTimestampSecond(){return Pn}visitTimestampMillisecond(){return jn}visitTimestampMicrosecond(){return zn}visitTimestampNanosecond(){return Wn}visitTime(){return dr}visitTimeSecond(){return $n}visitTimeMillisecond(){return Hn}visitTimeMicrosecond(){return Gn}visitTimeNanosecond(){return Jn}visitDecimal(){return Nn}visitList(){return $o}visitLargeList(){return Ho}visitStruct(){return Xo}visitUnion(){return Ei}visitDenseUnion(){return Ko}visitSparseUnion(){return qo}visitDictionary(){return No}visitInterval(){return Er}visitIntervalDayTime(){return Ln}visitIntervalYearMonth(){return Un}visitIntervalMonthDayNano(){return Mn}visitDuration(){return ur}visitDurationSecond(){return Vn}visitDurationMillisecond(){return Rn}visitDurationMicrosecond(){return Cn}visitDurationNanosecond(){return kn}visitFixedSizeList(){return Eo}visitMap(){return Go}visitBinaryView(){return Li}visitUtf8View(){return Yo}},sd=new Uc;var x=class extends A{compareSchemas(t,e){return t===e||e instanceof t.constructor&&this.compareManyFields(t.fields,e.fields)}compareManyFields(t,e){return t===e||Array.isArray(t)&&Array.isArray(e)&&t.length===e.length&&t.every((i,n)=>this.compareFields(i,e[n]))}compareFields(t,e){return t===e||e instanceof t.constructor&&t.name===e.name&&t.nullable===e.nullable&&this.visit(t.type,e.type)}};function Vt(r,t){return t instanceof r.constructor}function hr(r,t){return r===t||Vt(r,t)}function pr(r,t){return r===t||Vt(r,t)&&r.bitWidth===t.bitWidth&&r.isSigned===t.isSigned}function Zo(r,t){return r===t||Vt(r,t)&&r.precision===t.precision}function xm(r,t){return r===t||Vt(r,t)&&r.byteWidth===t.byteWidth}function Mc(r,t){return r===t||Vt(r,t)&&r.unit===t.unit}function Kn(r,t){return r===t||Vt(r,t)&&r.unit===t.unit&&r.timezone===t.timezone}function Yn(r,t){return r===t||Vt(r,t)&&r.unit===t.unit&&r.bitWidth===t.bitWidth}function od(r,t){return r===t||Vt(r,t)&&r.children.length===t.children.length&&Re.compareManyFields(r.children,t.children)}function Om(r,t){return r===t||Vt(r,t)&&r.children.length===t.children.length&&Re.compareManyFields(r.children,t.children)}function Vc(r,t){return r===t||Vt(r,t)&&r.mode===t.mode&&r.typeIds.every((e,i)=>e===t.typeIds[i])&&Re.compareManyFields(r.children,t.children)}function Am(r,t){return r===t||Vt(r,t)&&r.id===t.id&&r.isOrdered===t.isOrdered&&Re.visit(r.indices,t.indices)&&Re.visit(r.dictionary,t.dictionary)}function Qo(r,t){return r===t||Vt(r,t)&&r.unit===t.unit}function Zn(r,t){return r===t||Vt(r,t)&&r.unit===t.unit}function Dm(r,t){return r===t||Vt(r,t)&&r.listSize===t.listSize&&r.children.length===t.children.length&&Re.compareManyFields(r.children,t.children)}function Fm(r,t){return r===t||Vt(r,t)&&r.keysSorted===t.keysSorted&&r.children.length===t.children.length&&Re.compareManyFields(r.children,t.children)}x.prototype.visitNull=hr;x.prototype.visitBool=hr;x.prototype.visitInt=pr;x.prototype.visitInt8=pr;x.prototype.visitInt16=pr;x.prototype.visitInt32=pr;x.prototype.visitInt64=pr;x.prototype.visitUint8=pr;x.prototype.visitUint16=pr;x.prototype.visitUint32=pr;x.prototype.visitUint64=pr;x.prototype.visitFloat=Zo;x.prototype.visitFloat16=Zo;x.prototype.visitFloat32=Zo;x.prototype.visitFloat64=Zo;x.prototype.visitUtf8=hr;x.prototype.visitLargeUtf8=hr;x.prototype.visitUtf8View=hr;x.prototype.visitBinary=hr;x.prototype.visitLargeBinary=hr;x.prototype.visitBinaryView=hr;x.prototype.visitFixedSizeBinary=xm;x.prototype.visitDate=Mc;x.prototype.visitDateDay=Mc;x.prototype.visitDateMillisecond=Mc;x.prototype.visitTimestamp=Kn;x.prototype.visitTimestampSecond=Kn;x.prototype.visitTimestampMillisecond=Kn;x.prototype.visitTimestampMicrosecond=Kn;x.prototype.visitTimestampNanosecond=Kn;x.prototype.visitTime=Yn;x.prototype.visitTimeSecond=Yn;x.prototype.visitTimeMillisecond=Yn;x.prototype.visitTimeMicrosecond=Yn;x.prototype.visitTimeNanosecond=Yn;x.prototype.visitDecimal=hr;x.prototype.visitList=od;x.prototype.visitLargeList=od;x.prototype.visitStruct=Om;x.prototype.visitUnion=Vc;x.prototype.visitDenseUnion=Vc;x.prototype.visitSparseUnion=Vc;x.prototype.visitDictionary=Am;x.prototype.visitInterval=Qo;x.prototype.visitIntervalDayTime=Qo;x.prototype.visitIntervalYearMonth=Qo;x.prototype.visitIntervalMonthDayNano=Qo;x.prototype.visitDuration=Zn;x.prototype.visitDurationSecond=Zn;x.prototype.visitDurationMillisecond=Zn;x.prototype.visitDurationMicrosecond=Zn;x.prototype.visitDurationNanosecond=Zn;x.prototype.visitFixedSizeList=Dm;x.prototype.visitMap=Fm;var Re=new x;function ii(r,t){return Re.compareSchemas(r,t)}function ad(r,t){return Re.compareFields(r,t)}function cd(r,t){return Re.visit(r,t)}function ei(r){let t=r.type,e=new(sd.getVisitFn(t)())(r);if(t.children&&t.children.length>0){let i=r.children||[],n={nullValues:r.nullValues},s=Array.isArray(i)?((o,a)=>i[a]||n):(({name:o})=>i[o]||n);for(let[o,a]of t.children.entries()){let{type:c}=a,l=s(a,o);e.children.push(ei(Object.assign(Object.assign({},l),{type:c})))}}return e}function ta(r,t){return Nm(r,t.map(e=>e.data.concat()))}function Nm(r,t){let e=[...r.fields],i=[],n={numBatches:t.reduce((d,p)=>Math.max(d,p.length),0)},s=0,o=0,a=-1,c=t.length,l,u=[];for(;n.numBatches-- >0;){for(o=Number.POSITIVE_INFINITY,a=-1;++a<c;)u[a]=l=t[a].shift(),o=Math.min(o,l?l.length:o);Number.isFinite(o)&&(u=Em(e,o,u,t,n),o>0&&(i[s++]=E({type:new at(e),length:o,nullCount:0,children:u.slice()})))}return[r=r.assign(e),i.map(d=>new st(r,d))]}function Em(r,t,e,i,n){var s;let o=(t+63&-64)>>3;for(let a=-1,c=i.length;++a<c;){let l=e[a],u=l==null?void 0:l.length;if(u>=t)u===t?e[a]=l:(e[a]=l.slice(0,t),n.numBatches=Math.max(n.numBatches,i[a].unshift(l.slice(t,u-t))));else{let d=r[a];r[a]=d.clone({nullable:!0}),e[a]=(s=l==null?void 0:l._changeLengthAndBackfillNullBitmap(t))!==null&&s!==void 0?s:E({type:d.type,length:t,nullCount:t,nullBitmap:new Uint8Array(o)})}}return e}var ld,ud=Symbol.for("apache-arrow/Table"),Nt=class r{static isTable(t){return(t==null?void 0:t[ud])===!0}constructor(...t){var e,i;if(t.length===0)return this.batches=[],this.schema=new G([]),this._offsets=[0],this;let n,s;t[0]instanceof G&&(n=t.shift()),t.at(-1)instanceof Uint32Array&&(s=t.pop());let o=c=>{if(c){if(c instanceof st)return[c];if(c instanceof r)return c.batches;if(c instanceof W){if(c.type instanceof at)return[new st(new G(c.type.children),c)]}else{if(Array.isArray(c))return c.flatMap(l=>o(l));if(typeof c[Symbol.iterator]=="function")return[...c].flatMap(l=>o(l));if(typeof c=="object"){let l=Object.keys(c),u=l.map(m=>new j([c[m]])),d=n!=null?n:new G(l.map((m,b)=>new U(String(m),u[b].type,u[b].nullable))),[,p]=ta(d,u);return p.length===0?[new st(c)]:p}}}return[]},a=t.flatMap(c=>o(c));if(n=(i=n!=null?n:(e=a[0])===null||e===void 0?void 0:e.schema)!==null&&i!==void 0?i:new G([]),!(n instanceof G))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");for(let c of a){if(!(c instanceof st))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");if(!ii(n,c.schema))throw new TypeError("Table and inner RecordBatch schemas must be equivalent.")}this.schema=n,this.batches=a,this._offsets=s!=null?s:bo(this.data)}get data(){return this.batches.map(({data:t})=>t)}get numCols(){return this.schema.fields.length}get numRows(){return this.data.reduce((t,e)=>t+e.length,0)}get nullCount(){return this._nullCount===-1&&(this._nullCount=go(this.data)),this._nullCount}isValid(t){return!1}get(t){return null}at(t){return this.get(Gr(t,this.numRows))}set(t,e){}indexOf(t,e){return-1}[Symbol.iterator](){return this.batches.length>0?Ti.visit(new j(this.data)):new Array(0)[Symbol.iterator]()}toArray(){return[...this]}toString(){return`[
|
|
22
22
|
${this.toArray().join(`,
|
|
23
23
|
`)}
|
|
24
|
-
]`}concat(...t){let e=this.schema,i=this.data.concat(t.flatMap(({data:n})=>n));return new r(e,i.map(n=>new st(e,n)))}slice(t,e){let i=this.schema;[t,e]=vn({length:this.numRows},t,e);let n=_o(this.data,this._offsets,t,e);return new r(i,n.map(s=>new st(i,s)))}getChild(t){return this.getChildAt(this.schema.fields.findIndex(e=>e.name===t))}getChildAt(t){if(t>-1&&t<this.schema.fields.length){let e=this.data.map(i=>i.children[t]);if(e.length===0){let{type:i}=this.schema.fields[t],n=E({type:i,length:0,nullCount:0});e.push(n._changeLengthAndBackfillNullBitmap(this.numRows))}return new j(e)}return null}setChild(t,e){var i;return this.setChildAt((i=this.schema.fields)===null||i===void 0?void 0:i.findIndex(n=>n.name===t),e)}setChildAt(t,e){let i=this.schema,n=[...this.batches];if(t>-1&&t<this.numCols){e||(e=new j([E({type:new Mt,length:this.numRows})]));let s=i.fields.slice(),o=s[t].clone({type:e.type}),a=this.schema.fields.map((c,l)=>this.getChildAt(l));[s[t],a[t]]=[o,e],[i,n]=ta(i,a)}return new r(i,n)}select(t){let e=this.schema.fields.reduce((i,n,s)=>i.set(n.name,s),new Map);return this.selectAt(t.map(i=>e.get(i)).filter(i=>i>-1))}selectAt(t){let e=this.schema.selectAt(t),i=this.batches.map(n=>n.selectAt(t));return new r(e,i)}assign(t){let e=this.schema.fields,[i,n]=t.schema.fields.reduce((a,c,l)=>{let[u,d]=a,p=e.findIndex(m=>m.name===c.name);return~p?d[p]=l:u.push(l),a},[[],[]]),s=this.schema.assign(t.schema),o=[...e.map((a,c)=>[c,n[c]]).map(([a,c])=>c===void 0?this.getChildAt(a):t.getChildAt(c)),...i.map(a=>t.getChildAt(a))].filter(Boolean);return new r(...ta(s,o))}};ld=Symbol.toStringTag;Nt[ld]=(r=>(r.schema=null,r.batches=[],r._offsets=new Uint32Array([0]),r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,r[ud]=!0,r.isValid=Bi(Bn),r.get=Bi(bt.getVisitFn(f.Struct)),r.set=wo(xt.getVisitFn(f.Struct)),r.indexOf=vo(Kr.getVisitFn(f.Struct)),"Table"))(Nt.prototype);Object.defineProperty(Nt,Symbol.hasInstance,{value:function(t){return Function.prototype[Symbol.hasInstance].call(this,t)||this===Nt&&Nt.isTable(t)}});var dd,hd=Symbol.for("apache-arrow/RecordBatch"),st=class r{static isRecordBatch(t){return(t==null?void 0:t[hd])===!0}constructor(...t){switch(t.length){case 3:case 2:{if([this.schema]=t,!(this.schema instanceof G))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");if([,this.data=E({nullCount:0,type:new at(this.schema.fields),children:this.schema.fields.map(e=>E({type:e.type,nullCount:0}))}),this._metadata=new Map]=t,!(this.data instanceof W))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");[this.schema,this.data]=fd(this.schema,this.data.children,this.data.length);break}case 1:{let[e]=t,{fields:i,children:n,length:s}=Object.keys(e).reduce((c,l,u)=>(c.children[u]=e[l],c.length=Math.max(c.length,e[l].length),c.fields[u]=U.new({name:l,type:e[l].type,nullable:!0}),c),{length:0,fields:new Array,children:new Array}),o=new G(i),a=E({type:new at(i),length:s,children:n,nullCount:0});[this.schema,this.data]=fd(o,a.children,s),this._metadata=new Map;break}default:throw new TypeError("RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.")}}get metadata(){return this._metadata}get dictionaries(){return this._dictionaries||(this._dictionaries=pd(this.schema.fields,this.data.children))}get numCols(){return this.schema.fields.length}get numRows(){return this.data.length}get nullCount(){return this.data.nullCount}isValid(t){return this.data.getValid(t)}get(t){return bt.visit(this.data,t)}at(t){return this.get(Gr(t,this.numRows))}set(t,e){return xt.visit(this.data,t,e)}indexOf(t,e){return Kr.visit(this.data,t,e)}[Symbol.iterator](){return Ti.visit(new j([this.data]))}toArray(){return[...this]}concat(...t){return new Nt(this.schema,[this,...t])}slice(t,e){let[i]=new j([this.data]).slice(t,e).data;return new r(this.schema,i,this._metadata)}getChild(t){var e;return this.getChildAt((e=this.schema.fields)===null||e===void 0?void 0:e.findIndex(i=>i.name===t))}getChildAt(t){return t>-1&&t<this.schema.fields.length?new j([this.data.children[t]]):null}setChild(t,e){var i;return this.setChildAt((i=this.schema.fields)===null||i===void 0?void 0:i.findIndex(n=>n.name===t),e)}setChildAt(t,e){let i=this.schema,n=this.data;if(t>-1&&t<this.numCols){e||(e=new j([E({type:new Mt,length:this.numRows})]));let s=i.fields.slice(),o=n.children.slice(),a=s[t].clone({type:e.type});[s[t],o[t]]=[a,e.data[0]],i=new G(s,new Map(this.schema.metadata)),n=E({type:new at(s),length:n.length,children:o})}return new r(i,n,this._metadata)}select(t){let e=this.schema.select(t),i=new at(e.fields),n=[];for(let s of t){let o=this.schema.fields.findIndex(a=>a.name===s);~o&&(n[o]=this.data.children[o])}return new r(e,E({type:i,length:this.numRows,children:n}),this._metadata)}selectAt(t){let e=this.schema.selectAt(t),i=t.map(s=>this.data.children[s]).filter(Boolean),n=E({type:new at(e.fields),length:this.numRows,children:i});return new r(e,n,this._metadata)}};dd=Symbol.toStringTag;st[dd]=(r=>(r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,r[hd]=!0,"RecordBatch"))(st.prototype);Object.defineProperty(st,Symbol.hasInstance,{value:function(t){return Function.prototype[Symbol.hasInstance].call(this,t)||this===st&&st.isRecordBatch(t)}});function fd(r,t,e=t.reduce((i,n)=>Math.max(i,n.length),0)){var i;let n=[...r.fields],s=[...t],o=(e+63&-64)>>3;for(let[a,c]of r.fields.entries()){let l=t[a];(!l||l.length!==e)&&(n[a]=c.clone({nullable:!0}),s[a]=(i=l==null?void 0:l._changeLengthAndBackfillNullBitmap(e))!==null&&i!==void 0?i:E({type:c.type,length:e,nullCount:e,nullBitmap:new Uint8Array(o)}))}return[r.assign(n),E({type:new at(n),length:e,children:s})]}function pd(r,t,e=new Map){var i,n;if(((i=r==null?void 0:r.length)!==null&&i!==void 0?i:0)>0&&(r==null?void 0:r.length)===(t==null?void 0:t.length))for(let s=-1,o=r.length;++s<o;){let{type:a}=r[s],c=t[s];for(let l of[c,...((n=c==null?void 0:c.dictionary)===null||n===void 0?void 0:n.data)||[]])pd(a.children,l==null?void 0:l.children,e);if(g.isDictionary(a)){let{id:l}=a;if(!e.has(l))c!=null&&c.dictionary&&e.set(l,c.dictionary);else if(e.get(l)!==c.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}}return e}var ni=class extends st{constructor(t,e){let i=t.fields.map(s=>E({type:s.type})),n=E({type:new at(t.fields),length:0,nullCount:0,children:i});super(t,n,e||new Map)}};var Cc=r=>`Expected ${H[r]} Message in stream, but was null or length 0.`,kc=r=>`Header pointer of flatbuffer-encoded ${H[r]} Message is null or length 0.`,md=(r,t)=>`Expected to read ${r} metadata bytes, but only read ${t}.`,yd=(r,t)=>`Expected to read ${r} bytes for message body, but only read ${t}.`,Ui=class{constructor(t){this.source=t instanceof Ve?t:new Ve(t)}[Symbol.iterator](){return this}next(){let t;return(t=this.readMetadataLength()).done?ct:t.value===-1&&(t=this.readMetadataLength()).done?ct:(t=this.readMetadata(t.value)).done?ct:t}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}readMessage(t){let e;if((e=this.next()).done)return null;if(t!=null&&e.value.headerType!==t)throw new Error(Cc(t));return e.value}readMessageBody(t){if(t<=0)return new Uint8Array(0);let e=I(this.source.read(t));if(e.byteLength<t)throw new Error(yd(t,e.byteLength));return e.byteOffset%8===0&&e.byteOffset+e.byteLength<=e.buffer.byteLength?e:e.slice()}readSchema(t=!1){let e=H.Schema,i=this.readMessage(e),n=i==null?void 0:i.header();if(t&&!n)throw new Error(kc(e));return n}readMetadataLength(){let t=this.source.read(ea),e=t&&new Tt(t),i=(e==null?void 0:e.readInt32(0))||0;return{done:i===0,value:i}}readMetadata(t){let e=this.source.read(t);if(!e)return ct;if(e.byteLength<t)throw new Error(md(t,e.byteLength));return{done:!1,value:zt.decode(e)}}},Qn=class{constructor(t,e){this.source=t instanceof ae?t:Fs(t)?new Nr(t,e):new ae(t)}[Symbol.asyncIterator](){return this}next(){return _(this,void 0,void 0,function*(){let t;return(t=yield this.readMetadataLength()).done?ct:t.value===-1&&(t=yield this.readMetadataLength()).done?ct:(t=yield this.readMetadata(t.value)).done?ct:t})}throw(t){return _(this,void 0,void 0,function*(){return yield this.source.throw(t)})}return(t){return _(this,void 0,void 0,function*(){return yield this.source.return(t)})}readMessage(t){return _(this,void 0,void 0,function*(){let e;if((e=yield this.next()).done)return null;if(t!=null&&e.value.headerType!==t)throw new Error(Cc(t));return e.value})}readMessageBody(t){return _(this,void 0,void 0,function*(){if(t<=0)return new Uint8Array(0);let e=I(yield this.source.read(t));if(e.byteLength<t)throw new Error(yd(t,e.byteLength));return e.byteOffset%8===0&&e.byteOffset+e.byteLength<=e.buffer.byteLength?e:e.slice()})}readSchema(){return _(this,arguments,void 0,function*(t=!1){let e=H.Schema,i=yield this.readMessage(e),n=i==null?void 0:i.header();if(t&&!n)throw new Error(kc(e));return n})}readMetadataLength(){return _(this,void 0,void 0,function*(){let t=yield this.source.read(ea),e=t&&new Tt(t),i=(e==null?void 0:e.readInt32(0))||0;return{done:i===0,value:i}})}readMetadata(t){return _(this,void 0,void 0,function*(){let e=yield this.source.read(t);if(!e)return ct;if(e.byteLength<t)throw new Error(md(t,e.byteLength));return{done:!1,value:zt.decode(e)}})}},ts=class extends Ui{constructor(t){super(new Uint8Array(0)),this._schema=!1,this._body=[],this._batchIndex=0,this._dictionaryIndex=0,this._json=t instanceof Tn?t:new Tn(t)}next(){let{_json:t}=this;if(!this._schema)return this._schema=!0,{done:!1,value:zt.fromJSON(t.schema,H.Schema)};if(this._dictionaryIndex<t.dictionaries.length){let e=t.dictionaries[this._dictionaryIndex++];return this._body=e.data.columns,{done:!1,value:zt.fromJSON(e,H.DictionaryBatch)}}if(this._batchIndex<t.batches.length){let e=t.batches[this._batchIndex++];return this._body=e.columns,{done:!1,value:zt.fromJSON(e,H.RecordBatch)}}return this._body=[],ct}readMessageBody(t){return e(this._body);function e(i){return(i||[]).reduce((n,s)=>[...n,...s.VALIDITY&&[s.VALIDITY]||[],...s.TYPE_ID&&[s.TYPE_ID]||[],...s.OFFSET&&[s.OFFSET]||[],...s.DATA&&[s.DATA]||[],...s.VIEWS&&[s.VIEWS]||[],...s.VARIADIC_DATA_BUFFERS||[],...e(s.children)],[])}}readMessage(t){let e;if((e=this.next()).done)return null;if(t!=null&&e.value.headerType!==t)throw new Error(Cc(t));return e.value}readSchema(){let t=H.Schema,e=this.readMessage(t),i=e==null?void 0:e.header();if(!e||!i)throw new Error(kc(t));return i}},ea=4,Rc="ARROW1",Mi=new Uint8Array(Rc.length);for(let r=0;r<Rc.length;r+=1)Mi[r]=Rc.codePointAt(r);function ra(r,t=0){for(let e=-1,i=Mi.length;++e<i;)if(Mi[e]!==r[t+e])return!1;return!0}var Vi=Mi.length,Pc=Vi+ea,gd=Vi*2+ea;var jc=class{constructor(){this.LZ4_FRAME_MAGIC=new Uint8Array([4,34,77,24]),this.MIN_HEADER_LENGTH=7}isValidCodecEncode(t){let e=new Uint8Array([1,2,3,4,5,6,7,8]),i=t.encode(e);return this._isValidCompressed(i)}_isValidCompressed(t){return this._hasMinimumLength(t)&&this._hasValidMagicNumber(t)&&this._hasValidVersion(t)}_hasMinimumLength(t){return t.length>=this.MIN_HEADER_LENGTH}_hasValidMagicNumber(t){return this.LZ4_FRAME_MAGIC.every((e,i)=>t[i]===e)}_hasValidVersion(t){return(t[4]&192)>>6===1}},zc=class{constructor(){this.ZSTD_MAGIC=new Uint8Array([40,181,47,253]),this.MIN_HEADER_LENGTH=6}isValidCodecEncode(t){let e=new Uint8Array([1,2,3,4,5,6,7,8]),i=t.encode(e);return this._isValidCompressed(i)}_isValidCompressed(t){return this._hasMinimumLength(t)&&this._hasValidMagicNumber(t)}_hasMinimumLength(t){return t.length>=this.MIN_HEADER_LENGTH}_hasValidMagicNumber(t){return this.ZSTD_MAGIC.every((e,i)=>t[i]===e)}},bd={[Ut.LZ4_FRAME]:new jc,[Ut.ZSTD]:new zc};var Wc=class{constructor(){this.registry={}}set(t,e){if(e!=null&&e.encode&&typeof e.encode=="function"&&!bd[t].isValidCodecEncode(e))throw new Error(`Encoder for ${Ut[t]} is not valid.`);this.registry[t]=e}get(t){var e;return((e=this.registry)===null||e===void 0?void 0:e[t])||null}},Ri=new Wc;var Wt=class r extends Qr{constructor(t){super(),this._impl=t}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(t){return this._impl.throw(t)}return(t){return this._impl.return(t)}cancel(){return this._impl.cancel()}reset(t){return this._impl.reset(t),this._DOMStream=void 0,this._nodeStream=void 0,this}open(t){let e=this._impl.open(t);return fe(e)?e.then(()=>this):this}readRecordBatch(t){return this._impl.isFile()?this._impl.readRecordBatch(t):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return Bt.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return Bt.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(t){throw new Error('"throughNode" not available in this environment')}static throughDOM(t,e){throw new Error('"throughDOM" not available in this environment')}static from(t){return t instanceof r?t:As(t)?Mm(t):Fs(t)?Cm(t):fe(t)?_(this,void 0,void 0,function*(){return yield r.from(yield t)}):Ns(t)||en(t)||Ls(t)||ie(t)?Rm(new ae(t)):Vm(new Ve(t))}static readAll(t){return t instanceof r?t.isSync()?_d(t):wd(t):As(t)||ArrayBuffer.isView(t)||de(t)||Ds(t)?_d(t):wd(t)}},Ce=class extends Wt{constructor(t){super(t),this._impl=t}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return Gt(this,arguments,function*(){yield V(yield*ui(ue(this[Symbol.iterator]())))})}},Lr=class extends Wt{constructor(t){super(t),this._impl=t}readAll(){return _(this,void 0,void 0,function*(){var t,e,i,n;let s=new Array;try{for(var o=!0,a=ue(this),c;c=yield a.next(),t=c.done,!t;o=!0){n=c.value,o=!1;let l=n;s.push(l)}}catch(l){e={error:l}}finally{try{!o&&!t&&(i=a.return)&&(yield i.call(a))}finally{if(e)throw e.error}}return s})}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}},Ur=class extends Ce{constructor(t){super(t),this._impl=t}},es=class extends Lr{constructor(t){super(t),this._impl=t}},ia=class{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(t=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=t}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(t){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=t,this.dictionaries=new Map,this}_loadRecordBatch(t,e,i){let n;if(t.compression!=null){let o=Ri.get(t.compression.type);if(o!=null&&o.decode&&typeof o.decode=="function"){let{decommpressedBody:a,buffers:c}=this._decompressBuffers(t,e,o);n=this._loadCompressedVectors(t,a,this.schema.fields),t=new wt(t.length,t.nodes,c,null)}else throw new Error("Record batch is compressed but codec not found")}else n=this._loadVectors(t,e,this.schema.fields);let s=E({type:new at(this.schema.fields),length:t.length,children:n});return new st(this.schema,s,i)}_loadDictionaryBatch(t,e){let{id:i,isDelta:n}=t,{dictionaries:s,schema:o}=this,a=s.get(i),c=o.dictionaries.get(i),l;if(t.data.compression!=null){let u=Ri.get(t.data.compression.type);if(u!=null&&u.decode&&typeof u.decode=="function"){let{decommpressedBody:d,buffers:p}=this._decompressBuffers(t.data,e,u);l=this._loadCompressedVectors(t.data,d,[c]),t=new Ft(new wt(t.data.length,t.data.nodes,p,null,t.data.variadicBufferCounts),i,n)}else throw new Error("Dictionary batch is compressed but codec not found")}else l=this._loadVectors(t.data,e,[c]);return(a&&n?a.concat(new j(l)):new j(l)).memoize()}_loadVectors(t,e,i){return new Di(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion,t.variadicBufferCounts).visitMany(i)}_loadCompressedVectors(t,e,i){return new Do(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion,t.variadicBufferCounts).visitMany(i)}_decompressBuffers(t,e,i){let n=[],s=[],o=0;for(let{offset:a,length:c}of t.buffers){if(c===0){n.push(new Uint8Array(0)),s.push(new pt(o,0));continue}let l=new Tt(e.subarray(a,a+c)),u=P(l.readInt64(0)),d=l.bytes().subarray(8),p=u===-1?d:i.decode(d);n.push(p);let m=(o+7&-8)-o;o+=m,s.push(new pt(o,p.length)),o+=p.length}return{decommpressedBody:n,buffers:s}}},Ci=class extends ia{constructor(t,e){super(e),this._reader=As(t)?new ts(this._handle=t):new Ui(this._handle=t)}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(t){return this.closed||(this.autoDestroy=Id(this,t),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(t):ct}return(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(t):ct}next(){if(this.closed)return ct;let t,{_reader:e}=this;for(;t=this._readNextMessageAndValidate();)if(t.isSchema())this.reset(t.header());else if(t.isRecordBatch()){this._recordBatchIndex++;let i=t.header(),n=e.readMessageBody(t.bodyLength);return{done:!1,value:this._loadRecordBatch(i,n,t.metadata)}}else if(t.isDictionaryBatch()){this._dictionaryIndex++;let i=t.header(),n=e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new ni(this.schema)}):this.return()}_readNextMessageAndValidate(t){return this._reader.readMessage(t)}},ki=class extends ia{constructor(t,e){super(e),this._reader=new Qn(this._handle=t)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return _(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(t){return _(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=Id(this,t),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(t){return _(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(t):ct})}return(t){return _(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(t):ct})}next(){return _(this,void 0,void 0,function*(){if(this.closed)return ct;let t,{_reader:e}=this;for(;t=yield this._readNextMessageAndValidate();)if(t.isSchema())yield this.reset(t.header());else if(t.isRecordBatch()){this._recordBatchIndex++;let i=t.header(),n=yield e.readMessageBody(t.bodyLength);return{done:!1,value:this._loadRecordBatch(i,n,t.metadata)}}else if(t.isDictionaryBatch()){this._dictionaryIndex++;let i=t.header(),n=yield e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new ni(this.schema)}):yield this.return()})}_readNextMessageAndValidate(t){return _(this,void 0,void 0,function*(){return yield this._reader.readMessage(t)})}},na=class extends Ci{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(t,e){super(t instanceof xn?t:new xn(t),e)}isSync(){return!0}isFile(){return!0}open(t){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(let e of this._footer.dictionaryBatches())e&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(t)}readRecordBatch(t){var e;if(this.closed)return null;this._footer||this.open();let i=(e=this._footer)===null||e===void 0?void 0:e.getRecordBatch(t);if(i&&this._handle.seek(i.offset)){let n=this._reader.readMessage(H.RecordBatch);if(n!=null&&n.isRecordBatch()){let s=n.header(),o=this._reader.readMessageBody(n.bodyLength);return this._loadRecordBatch(s,o,n.metadata)}}return null}_readDictionaryBatch(t){var e;let i=(e=this._footer)===null||e===void 0?void 0:e.getDictionaryBatch(t);if(i&&this._handle.seek(i.offset)){let n=this._reader.readMessage(H.DictionaryBatch);if(n!=null&&n.isDictionaryBatch()){let s=n.header(),o=this._reader.readMessageBody(n.bodyLength),a=this._loadDictionaryBatch(s,o);this.dictionaries.set(s.id,a)}}}_readFooter(){let{_handle:t}=this,e=t.size-Pc,i=t.readInt32(e),n=t.readAt(e-i,i);return or.decode(n)}_readNextMessageAndValidate(t){var e;if(this._footer||this.open(),this._footer&&this._recordBatchIndex<this.numRecordBatches){let i=(e=this._footer)===null||e===void 0?void 0:e.getRecordBatch(this._recordBatchIndex);if(i&&this._handle.seek(i.offset))return this._reader.readMessage(t)}return null}},$c=class extends ki{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(t,...e){let i=typeof e[0]!="number"?e.shift():void 0,n=e[0]instanceof Map?e.shift():void 0;super(t instanceof Nr?t:new Nr(t,i),n)}isFile(){return!0}isAsync(){return!0}open(t){let e=Object.create(null,{open:{get:()=>super.open}});return _(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(let i of this._footer.dictionaryBatches())i&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield e.open.call(this,t)})}readRecordBatch(t){return _(this,void 0,void 0,function*(){var e;if(this.closed)return null;this._footer||(yield this.open());let i=(e=this._footer)===null||e===void 0?void 0:e.getRecordBatch(t);if(i&&(yield this._handle.seek(i.offset))){let n=yield this._reader.readMessage(H.RecordBatch);if(n!=null&&n.isRecordBatch()){let s=n.header(),o=yield this._reader.readMessageBody(n.bodyLength);return this._loadRecordBatch(s,o,n.metadata)}}return null})}_readDictionaryBatch(t){return _(this,void 0,void 0,function*(){var e;let i=(e=this._footer)===null||e===void 0?void 0:e.getDictionaryBatch(t);if(i&&(yield this._handle.seek(i.offset))){let n=yield this._reader.readMessage(H.DictionaryBatch);if(n!=null&&n.isDictionaryBatch()){let s=n.header(),o=yield this._reader.readMessageBody(n.bodyLength),a=this._loadDictionaryBatch(s,o);this.dictionaries.set(s.id,a)}}})}_readFooter(){return _(this,void 0,void 0,function*(){let{_handle:t}=this;t._pending&&(yield t._pending);let e=t.size-Pc,i=yield t.readInt32(e),n=yield t.readAt(e-i,i);return or.decode(n)})}_readNextMessageAndValidate(t){return _(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex<this.numRecordBatches){let e=this._footer.getRecordBatch(this._recordBatchIndex);if(e&&(yield this._handle.seek(e.offset)))return yield this._reader.readMessage(t)}return null})}},Hc=class extends Ci{constructor(t,e){super(t,e)}_loadVectors(t,e,i){return new Ao(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion,t.variadicBufferCounts).visitMany(i)}};function Id(r,t){return t&&typeof t.autoDestroy=="boolean"?t.autoDestroy:r.autoDestroy}function*_d(r){let t=Wt.from(r);try{if(!t.open({autoDestroy:!1}).closed)do yield t;while(!t.reset().open().closed)}finally{t.cancel()}}function wd(r){return Gt(this,arguments,function*(){let e=yield V(Wt.from(r));try{if(!(yield V(e.open({autoDestroy:!1}))).closed)do yield yield V(e);while(!(yield V(e.reset().open())).closed)}finally{yield V(e.cancel())}})}function Mm(r){return new Ce(new Hc(r))}function Vm(r){let t=r.peek(Vi+7&-8);return t&&t.byteLength>=4?ra(t)?new Ur(new na(r.read())):new Ce(new Ci(r)):new Ce(new Ci((function*(){})()))}function Rm(r){return _(this,void 0,void 0,function*(){let t=yield r.peek(Vi+7&-8);return t&&t.byteLength>=4?ra(t)?new Ur(new na(yield r.read())):new Lr(new ki(r)):new Lr(new ki((function(){return Gt(this,arguments,function*(){})})()))})}function Cm(r){return _(this,void 0,void 0,function*(){let{size:t}=yield r.stat(),e=new Nr(r,t);return t>=gd&&ra(yield e.readAt(0,Vi+7&-8))?new es(new $c(e)):new Lr(new ki(e))})}var lt=class r extends A{static assemble(...t){let e=n=>n.flatMap(s=>Array.isArray(s)?e(s):s instanceof st?s.data.children:s.data),i=new r;return i.visitMany(e(t)),i}constructor(){super(),this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[],this._variadicBufferCounts=[]}visit(t){if(t instanceof j)return this.visitMany(t.data),this;let{type:e}=t;if(!g.isDictionary(e)){let{length:i}=t;if(i>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");if(g.isUnion(e))this.nodes.push(new oe(i,0));else{let{nullCount:n}=t;g.isNull(e)||te.call(this,n<=0?new Uint8Array(0):Xr(t.offset,i,t.nullBitmap)),this.nodes.push(new oe(i,n))}}return super.visit(t)}visitNull(t){return this}visitDictionary(t){return this.visit(t.clone(t.type.indices))}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}get variadicBufferCounts(){return this._variadicBufferCounts}};function te(r){let t=r.byteLength+7&-8;return this.buffers.push(r),this.bufferRegions.push(new pt(this._byteLength,t)),this._byteLength+=t,this}function km(r){var t;let{type:e,length:i,typeIds:n,valueOffsets:s}=r;if(te.call(this,n),e.mode===et.Sparse)return Gc.call(this,r);if(e.mode===et.Dense){if(r.offset<=0)return te.call(this,s),Gc.call(this,r);{let o=new Int32Array(i),a=Object.create(null),c=Object.create(null);for(let l,u,d=-1;++d<i;)(l=n[d])!==void 0&&((u=a[l])===void 0&&(u=a[l]=s[d]),o[d]=s[d]-u,c[l]=((t=c[l])!==null&&t!==void 0?t:0)+1);te.call(this,o),this.visitMany(r.children.map((l,u)=>{let d=e.typeIds[u],p=a[d],m=c[d];return l.slice(p,Math.min(i,m))}))}}return this}function Pm(r){let t;return r.nullCount>=r.length?te.call(this,new Uint8Array(r.length+7>>3)):(t=r.values)instanceof Uint8Array?te.call(this,Xr(r.offset,r.length,t)):te.call(this,qr(r.values))}function mr(r){return te.call(this,r.values.subarray(0,r.length*r.stride))}function sa(r){let{length:t,values:e,valueOffsets:i}=r,n=P(i[0]),s=P(i[t]),o=Math.min(s-n,e.byteLength-n);return te.call(this,Us(-n,t+1,i)),te.call(this,e.subarray(n,n+o)),this}function Sd(r){let{offset:t,length:e,stride:i,values:n,variadicBuffers:s=[]}=r;if(!n)throw new Error("BinaryView data is missing view buffer");let o=t*i,a=o+e*i;te.call(this,n.subarray(o,a));for(let c of s)te.call(this,c);return this._variadicBufferCounts.push(s.length),this}function oa(r){let{length:t,valueOffsets:e}=r;if(e){let i=P(e[0]),n=P(e[t]);return te.call(this,Us(-i,t+1,e)),this.visit(r.children[0].slice(i,n-i))}return this.visit(r.children[0])}function Gc(r){return this.visitMany(r.type.children.map((t,e)=>r.children[e]).filter(Boolean))[0]}lt.prototype.visitBool=Pm;lt.prototype.visitInt=mr;lt.prototype.visitFloat=mr;lt.prototype.visitUtf8=sa;lt.prototype.visitLargeUtf8=sa;lt.prototype.visitUtf8View=Sd;lt.prototype.visitBinary=sa;lt.prototype.visitLargeBinary=sa;lt.prototype.visitBinaryView=Sd;lt.prototype.visitFixedSizeBinary=mr;lt.prototype.visitDate=mr;lt.prototype.visitTimestamp=mr;lt.prototype.visitTime=mr;lt.prototype.visitDecimal=mr;lt.prototype.visitList=oa;lt.prototype.visitLargeList=oa;lt.prototype.visitStruct=Gc;lt.prototype.visitUnion=km;lt.prototype.visitInterval=mr;lt.prototype.visitDuration=mr;lt.prototype.visitFixedSizeList=oa;lt.prototype.visitMap=oa;var si=class extends Qr{static throughNode(t){throw new Error('"throughNode" not available in this environment')}static throughDOM(t,e){throw new Error('"throughDOM" not available in this environment')}constructor(t){if(super(),this._position=0,this._started=!1,this._compression=null,this._sink=new Me,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,Lt(t)||(t={autoDestroy:!0,writeLegacyIpcFormat:!1,compressionType:null}),this._autoDestroy=typeof t.autoDestroy=="boolean"?t.autoDestroy:!0,this._writeLegacyIpcFormat=typeof t.writeLegacyIpcFormat=="boolean"?t.writeLegacyIpcFormat:!1,t.compressionType!=null){if(this._writeLegacyIpcFormat)throw new Error("Legacy IPC format does not support columnar compression. Use modern IPC format (writeLegacyIpcFormat=false).");if(Object.values(Ut).includes(t.compressionType))this._compression=new Zr(t.compressionType);else{let e=Object.values(Ut).filter(i=>typeof i=="string");throw new Error(`Unsupported compressionType: ${t.compressionType} Available types: ${e.join(", ")}`)}}else this._compression=null}toString(t=!1){return this._sink.toString(t)}toUint8Array(t=!1){return this._sink.toUint8Array(t)}writeAll(t){return fe(t)?t.then(e=>this.writeAll(e)):ie(t)?Xc(this,t):Jc(this,t)}get closed(){return this._sink.closed}[Symbol.asyncIterator](){return this._sink[Symbol.asyncIterator]()}toDOMStream(t){return this._sink.toDOMStream(t)}toNodeStream(t){return this._sink.toNodeStream(t)}close(){return this.reset()._sink.close()}abort(t){return this.reset()._sink.abort(t)}finish(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}reset(t=this._sink,e=null){return t===this._sink||t instanceof Me?this._sink=t:(this._sink=new Me,t&&hu(t)?this.toDOMStream({type:"bytes"}).pipeTo(t):t&&pu(t)&&this.toNodeStream({objectMode:!1}).pipe(t)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,(!e||!ii(e,this._schema))&&(e==null?(this._position=0,this._schema=null):(this._started=!0,this._schema=e,this._writeSchema(e))),this}write(t){let e=null;if(this._sink){if(t==null)return this.finish()&&void 0;if(t instanceof Nt&&!(e=t.schema))return this.finish()&&void 0;if(t instanceof st&&!(e=t.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(e&&!ii(e,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,e)}t instanceof st?t instanceof ni||this._writeRecordBatch(t):t instanceof Nt?this.writeAll(t.batches):de(t)&&this.writeAll(t)}_writeMessage(t,e=8){let i=e-1,n=zt.encode(t),s=n.byteLength,o=this._writeLegacyIpcFormat?4:8,a=s+o+i&~i,c=a-s-o;return t.headerType===H.RecordBatch?this._recordBatchBlocks.push(new ar(a,t.bodyLength,this._position)):t.headerType===H.DictionaryBatch&&this._dictionaryBlocks.push(new ar(a,t.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(a-o)),s>0&&this._write(n),this._writePadding(c)}_write(t){if(this._started){let e=I(t);e&&e.byteLength>0&&(this._sink.write(e),this._position+=e.byteLength)}return this}_writeSchema(t){return this._writeMessage(zt.from(t))}_writeFooter(t){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(Mi)}_writePadding(t){return t>0?this._write(new Uint8Array(t)):this}_writeRecordBatch(t){let{byteLength:e,nodes:i,bufferRegions:n,buffers:s,variadicBufferCounts:o}=this._assembleRecordBatch(t),a=new wt(t.numRows,i,n,this._compression,o,t.metadata),c=zt.from(a,e);return this._writeDictionaries(t)._writeMessage(c)._writeBodyBuffers(s)}_assembleRecordBatch(t){let{byteLength:e,nodes:i,bufferRegions:n,buffers:s,variadicBufferCounts:o}=lt.assemble(t);return this._compression!=null&&({byteLength:e,bufferRegions:n,buffers:s}=this._compressBodyBuffers(s)),{byteLength:e,nodes:i,bufferRegions:n,buffers:s,variadicBufferCounts:o}}_compressBodyBuffers(t){let e=Ri.get(this._compression.type);if(!(e!=null&&e.encode)||typeof e.encode!="function")throw new Error(`Codec for compression type "${Ut[this._compression.type]}" has invalid encode method`);let i=0,n=[],s=[];for(let a of t){let c=I(a);if(c.length===0){n.push(new Uint8Array(0),new Uint8Array(0)),s.push(new pt(i,0));continue}let l=e.encode(c),u=l.length<c.length,d=u?l:c,p=u?d.length:-1,m=new Tt(new Uint8Array(8));m.writeInt64(0,BigInt(p)),n.push(m.bytes(),new Uint8Array(d));let b=(i+7&-8)-i;i+=b;let z=8+d.length;s.push(new pt(i,z)),i+=z}let o=(i+7&-8)-i;return i+=o,{byteLength:i,bufferRegions:s,buffers:n}}_writeDictionaryBatch(t,e,i=!1){let{byteLength:n,nodes:s,bufferRegions:o,buffers:a,variadicBufferCounts:c}=this._assembleRecordBatch(new j([t])),l=new wt(t.length,s,o,this._compression,c),u=new Ft(l,e,i),d=zt.from(u,n);return this._writeMessage(d)._writeBodyBuffers(a)}_writeBodyBuffers(t){let e=this._compression!=null?2:1,i=new Array(e);for(let n=0;n<t.length;n+=e){let s=0;for(let a=-1;++a<e;)i[a]=t[n+a],s+=i[a].byteLength;if(s===0)continue;for(let a of i)this._write(a);let o=(s+7&-8)-s;o>0&&this._writePadding(o)}return this}_writeDictionaries(t){var e,i;for(let[n,s]of t.dictionaries){let o=(e=s==null?void 0:s.data)!==null&&e!==void 0?e:[],a=this._seenDictionaries.get(n),c=(i=this._dictionaryDeltaOffsets.get(n))!==null&&i!==void 0?i:0;if(!a||a.data[0]!==o[0])for(let[l,u]of o.entries())this._writeDictionaryBatch(u,n,l>0);else if(c<o.length)for(let l of o.slice(c))this._writeDictionaryBatch(l,n,!0);this._seenDictionaries.set(n,s),this._dictionaryDeltaOffsets.set(n,o.length)}return this}},rs=class r extends si{static writeAll(t,e){let i=new r(e);return fe(t)?t.then(n=>i.writeAll(n)):ie(t)?Xc(i,t):Jc(i,t)}},is=class r extends si{static writeAll(t,e){let i=new r(e);return fe(t)?t.then(n=>i.writeAll(n)):ie(t)?Xc(i,t):Jc(i,t)}constructor(t){super(t),this._autoDestroy=!0,this._writeLegacyIpcFormat=!1}_writeSchema(t){return this._writeMagic()._writePadding(2)}_writeDictionaryBatch(t,e,i=!1){if(!i&&this._seenDictionaries.has(e))throw new Error("The Arrow File format does not support replacement dictionaries. ");return super._writeDictionaryBatch(t,e,i)}_writeFooter(t){let e=or.encode(new or(t,K.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(t)._write(e)._write(Int32Array.of(e.byteLength))._writeMagic()}};function Jc(r,t){let e=t;t instanceof Nt&&(e=t.batches,r.reset(void 0,t.schema));for(let i of e)r.write(i);return r.finish()}function Xc(r,t){return _(this,void 0,void 0,function*(){var e,i,n,s,o,a,c;try{for(e=!0,i=ue(t);n=yield i.next(),s=n.done,!s;e=!0){c=n.value,e=!1;let l=c;r.write(l)}}catch(l){o={error:l}}finally{try{!e&&!s&&(a=i.return)&&(yield a.call(i))}finally{if(o)throw o.error}}return r.finish()})}function Bd(r,t){if(ie(r))return zm(r,t);if(de(r))return jm(r,t);throw new Error("toDOMStream() must be called with an Iterable or AsyncIterable")}function jm(r,t){let e=null,i=(t==null?void 0:t.type)==="bytes"||!1,n=(t==null?void 0:t.highWaterMark)||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},t),{start(o){s(o,e||(e=r[Symbol.iterator]()))},pull(o){e?s(o,e):o.close()},cancel(){e!=null&&e.return&&e.return(),e=null}}),Object.assign({highWaterMark:i?n:void 0},t));function s(o,a){let c,l=null,u=o.desiredSize||null;for(;!(l=a.next(i?u:null)).done;)if(ArrayBuffer.isView(l.value)&&(c=I(l.value))&&(u!=null&&i&&(u=u-c.byteLength+1),l.value=c),o.enqueue(l.value),u!=null&&--u<=0)return;o.close()}}function zm(r,t){let e=null,i=(t==null?void 0:t.type)==="bytes"||!1,n=(t==null?void 0:t.highWaterMark)||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},t),{start(o){return _(this,void 0,void 0,function*(){yield s(o,e||(e=r[Symbol.asyncIterator]()))})},pull(o){return _(this,void 0,void 0,function*(){e?yield s(o,e):o.close()})},cancel(){return _(this,void 0,void 0,function*(){e!=null&&e.return&&(yield e.return()),e=null})}}),Object.assign({highWaterMark:i?n:void 0},t));function s(o,a){return _(this,void 0,void 0,function*(){let c,l=null,u=o.desiredSize||null;for(;!(l=yield a.next(i?u:null)).done;)if(ArrayBuffer.isView(l.value)&&(c=I(l.value))&&(u!=null&&i&&(u=u-c.byteLength+1),l.value=c),o.enqueue(l.value),u!=null&&--u<=0)return;o.close()})}}function Od(r){return new qc(r)}var qc=class{constructor(t){this._numChunks=0,this._finished=!1,this._bufferedSize=0;let{["readableStrategy"]:e,["writableStrategy"]:i,["queueingStrategy"]:n="count"}=t,s=uu(t,["readableStrategy","writableStrategy","queueingStrategy"]);this._controller=null,this._builder=ei(s),this._getSize=n!=="bytes"?Td:xd;let{["highWaterMark"]:o=n==="bytes"?Math.pow(2,14):1e3}=Object.assign({},e),{["highWaterMark"]:a=n==="bytes"?Math.pow(2,14):1e3}=Object.assign({},i);this.readable=new ReadableStream({cancel:()=>{this._builder.clear()},pull:c=>{this._maybeFlush(this._builder,this._controller=c)},start:c=>{this._maybeFlush(this._builder,this._controller=c)}},{highWaterMark:o,size:n!=="bytes"?Td:xd}),this.writable=new WritableStream({abort:()=>{this._builder.clear()},write:()=>{this._maybeFlush(this._builder,this._controller)},close:()=>{this._maybeFlush(this._builder.finish(),this._controller)}},{highWaterMark:a,size:c=>this._writeValueAndReturnChunkSize(c)})}_writeValueAndReturnChunkSize(t){let e=this._bufferedSize;return this._bufferedSize=this._getSize(this._builder.append(t)),this._bufferedSize-e}_maybeFlush(t,e){e!=null&&(this._bufferedSize>=e.desiredSize&&++this._numChunks&&this._enqueue(e,t.toVector()),t.finished&&((t.length>0||this._numChunks===0)&&++this._numChunks&&this._enqueue(e,t.toVector()),!this._finished&&(this._finished=!0)&&this._enqueue(e,null)))}_enqueue(t,e){this._bufferedSize=0,this._controller=null,e==null?t.close():t.enqueue(e)}},Td=r=>{var t;return(t=r==null?void 0:r.length)!==null&&t!==void 0?t:0},xd=r=>{var t;return(t=r==null?void 0:r.byteLength)!==null&&t!==void 0?t:0};function aa(r,t){let e=new Me,i=null,n=new ReadableStream({cancel(){return _(this,void 0,void 0,function*(){yield e.close()})},start(a){return _(this,void 0,void 0,function*(){yield o(a,i||(i=yield s()))})},pull(a){return _(this,void 0,void 0,function*(){i?yield o(a,i):a.close()})}});return{writable:new WritableStream(e,Object.assign({highWaterMark:Math.pow(2,14)},r)),readable:n};function s(){return _(this,void 0,void 0,function*(){return yield(yield Wt.from(e)).open(t)})}function o(a,c){return _(this,void 0,void 0,function*(){let l=a.desiredSize,u=null;for(;!(u=yield c.next()).done;)if(a.enqueue(u.value),l!=null&&--l<=0)return;a.close()})}}function ca(r,t){let e=new this(r),i=new ae(e),n=new ReadableStream({cancel(){return _(this,void 0,void 0,function*(){yield i.cancel()})},pull(o){return _(this,void 0,void 0,function*(){yield s(o)})},start(o){return _(this,void 0,void 0,function*(){yield s(o)})}},Object.assign({highWaterMark:Math.pow(2,14)},t));return{writable:new WritableStream(e,r),readable:n};function s(o){return _(this,void 0,void 0,function*(){let a=null,c=o.desiredSize;for(;a=yield i.read(c||null);)if(o.enqueue(a),c!=null&&(c-=a.byteLength)<=0)return;o.close()})}}var Kc={};xe(Kc,{isArrowData:()=>Nd,isArrowDataType:()=>Fd,isArrowField:()=>Dd,isArrowRecordBatch:()=>Ld,isArrowSchema:()=>Ad,isArrowTable:()=>Ud,isArrowVector:()=>Ed});function Ad(r){return G.isSchema(r)}function Dd(r){return U.isField(r)}function Fd(r){return g.isDataType(r)}function Nd(r){return W.isData(r)}function Ed(r){return j.isVector(r)}function Ld(r){return st.isRecordBatch(r)}function Ud(r){return Nt.isTable(r)}var Wm=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ic),Fc),_c),nc),Ka),bc),Qa),Lc),Kc),{compareSchemas:ii,compareFields:ad,compareTypes:cd});Bt.toDOMStream=Bd;nt.throughDOM=Od;Wt.throughDOM=aa;Ur.throughDOM=aa;Ce.throughDOM=aa;si.throughDOM=ca;is.throughDOM=ca;rs.throughDOM=ca;var Yc=class extends ot{constructor(){super("google.protobuf.Timestamp",[{no:1,name:"seconds",kind:"scalar",T:3,L:0},{no:2,name:"nanos",kind:"scalar",T:5}])}now(){let t=this.create(),e=Date.now();return t.seconds=Z.from(Math.floor(e/1e3)).toBigInt(),t.nanos=e%1e3*1e6,t}toDate(t){return new Date(Z.from(t.seconds).toNumber()*1e3+Math.ceil(t.nanos/1e6))}fromDate(t){let e=this.create(),i=t.getTime();return e.seconds=Z.from(Math.floor(i/1e3)).toBigInt(),e.nanos=i%1e3*1e6,e}internalJsonWrite(t,e){let i=Z.from(t.seconds).toNumber()*1e3;if(i<Date.parse("0001-01-01T00:00:00Z")||i>Date.parse("9999-12-31T23:59:59Z"))throw new Error("Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");if(t.nanos<0)throw new Error("Unable to encode invalid Timestamp to JSON. Nanos must not be negative.");let n="Z";if(t.nanos>0){let s=(t.nanos+1e9).toString().substring(1);s.substring(3)==="000000"?n="."+s.substring(0,3)+"Z":s.substring(6)==="000"?n="."+s.substring(0,6)+"Z":n="."+s+"Z"}return new Date(i).toISOString().replace(".000Z",n)}internalJsonRead(t,e,i){if(typeof t!="string")throw new Error("Unable to parse Timestamp from JSON "+kr(t)+".");let n=t.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!n)throw new Error("Unable to parse Timestamp from JSON. Invalid format.");let s=Date.parse(n[1]+"-"+n[2]+"-"+n[3]+"T"+n[4]+":"+n[5]+":"+n[6]+(n[8]?n[8]:"Z"));if(Number.isNaN(s))throw new Error("Unable to parse Timestamp from JSON. Invalid value.");if(s<Date.parse("0001-01-01T00:00:00Z")||s>Date.parse("9999-12-31T23:59:59Z"))throw new globalThis.Error("Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");return i||(i=this.create()),i.seconds=Z.from(s/1e3).toBigInt(),i.nanos=0,n[7]&&(i.nanos=parseInt("1"+n[7]+"0".repeat(9-n[7].length))-1e9),i}},Zc=new Yc;var Md=(i=>(i[i.UNKNOWN=0]="UNKNOWN",i[i.PATH=1]="PATH",i[i.CMD=2]="CMD",i))(Md||{}),Vd=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.CANCELLED=1]="CANCELLED",n[n.CANCELLING=2]="CANCELLING",n[n.NOT_CANCELLABLE=3]="NOT_CANCELLABLE",n))(Vd||{}),Qc=class extends ot{constructor(){super("arrow.flight.protocol.HandshakeRequest",[{no:1,name:"protocol_version",kind:"scalar",T:4,L:0},{no:2,name:"payload",kind:"scalar",T:12}])}},$m=new Qc,tl=class extends ot{constructor(){super("arrow.flight.protocol.HandshakeResponse",[{no:1,name:"protocol_version",kind:"scalar",T:4,L:0},{no:2,name:"payload",kind:"scalar",T:12}])}},Hm=new tl,el=class extends ot{constructor(){super("arrow.flight.protocol.BasicAuth",[{no:2,name:"username",kind:"scalar",T:9},{no:3,name:"password",kind:"scalar",T:9}])}},MA=new el,rl=class extends ot{constructor(){super("arrow.flight.protocol.Empty",[])}},Gm=new rl,il=class extends ot{constructor(){super("arrow.flight.protocol.ActionType",[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9}])}},Jm=new il,nl=class extends ot{constructor(){super("arrow.flight.protocol.Criteria",[{no:1,name:"expression",kind:"scalar",T:12}])}},Xm=new nl,sl=class extends ot{constructor(){super("arrow.flight.protocol.Action",[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"body",kind:"scalar",T:12}])}},qm=new sl,ol=class extends ot{constructor(){super("arrow.flight.protocol.CancelFlightInfoRequest",[{no:1,name:"info",kind:"message",T:()=>ua}])}},VA=new ol,al=class extends ot{constructor(){super("arrow.flight.protocol.RenewFlightEndpointRequest",[{no:1,name:"endpoint",kind:"message",T:()=>Rd}])}},RA=new al,cl=class extends ot{constructor(){super("arrow.flight.protocol.Result",[{no:1,name:"body",kind:"scalar",T:12}])}},Km=new cl,ll=class extends ot{constructor(){super("arrow.flight.protocol.CancelFlightInfoResult",[{no:1,name:"status",kind:"enum",T:()=>["arrow.flight.protocol.CancelStatus",Vd,"CANCEL_STATUS_"]}])}},CA=new ll,ul=class extends ot{constructor(){super("arrow.flight.protocol.SchemaResult",[{no:1,name:"schema",kind:"scalar",T:12}])}},Ym=new ul,fl=class extends ot{constructor(){super("arrow.flight.protocol.FlightDescriptor",[{no:1,name:"type",kind:"enum",T:()=>["arrow.flight.protocol.FlightDescriptor.DescriptorType",Md]},{no:2,name:"cmd",kind:"scalar",T:12},{no:3,name:"path",kind:"scalar",repeat:2,T:9}])}},Pi=new fl,dl=class extends ot{constructor(){super("arrow.flight.protocol.FlightInfo",[{no:1,name:"schema",kind:"scalar",T:12},{no:2,name:"flight_descriptor",kind:"message",T:()=>Pi},{no:3,name:"endpoint",kind:"message",repeat:1,T:()=>Rd},{no:4,name:"total_records",kind:"scalar",T:3,L:0},{no:5,name:"total_bytes",kind:"scalar",T:3,L:0},{no:6,name:"ordered",kind:"scalar",T:8},{no:7,name:"app_metadata",kind:"scalar",T:12}])}},ua=new dl,hl=class extends ot{constructor(){super("arrow.flight.protocol.PollInfo",[{no:1,name:"info",kind:"message",T:()=>ua},{no:2,name:"flight_descriptor",kind:"message",T:()=>Pi},{no:3,name:"progress",kind:"scalar",opt:!0,T:1},{no:4,name:"expiration_time",kind:"message",T:()=>Zc}])}},Zm=new hl,pl=class extends ot{constructor(){super("arrow.flight.protocol.FlightEndpoint",[{no:1,name:"ticket",kind:"message",T:()=>fa},{no:2,name:"location",kind:"message",repeat:1,T:()=>Qm},{no:3,name:"expiration_time",kind:"message",T:()=>Zc},{no:4,name:"app_metadata",kind:"scalar",T:12}])}},Rd=new pl,ml=class extends ot{constructor(){super("arrow.flight.protocol.Location",[{no:1,name:"uri",kind:"scalar",T:9}])}},Qm=new ml,yl=class extends ot{constructor(){super("arrow.flight.protocol.Ticket",[{no:1,name:"ticket",kind:"scalar",T:12}])}},fa=new yl,gl=class extends ot{constructor(){super("arrow.flight.protocol.FlightData",[{no:1,name:"flight_descriptor",kind:"message",T:()=>Pi},{no:2,name:"data_header",kind:"scalar",T:12},{no:3,name:"app_metadata",kind:"scalar",T:12},{no:1e3,name:"data_body",kind:"scalar",T:12}])}},la=new gl,bl=class extends ot{constructor(){super("arrow.flight.protocol.PutResult",[{no:1,name:"app_metadata",kind:"scalar",T:12}])}},ty=new bl,da=new qi("arrow.flight.protocol.FlightService",[{name:"Handshake",serverStreaming:!0,clientStreaming:!0,options:{},I:$m,O:Hm},{name:"ListFlights",serverStreaming:!0,options:{},I:Xm,O:ua},{name:"GetFlightInfo",options:{},I:Pi,O:ua},{name:"PollFlightInfo",options:{},I:Pi,O:Zm},{name:"GetSchema",options:{},I:Pi,O:Ym},{name:"DoGet",serverStreaming:!0,options:{},I:fa,O:la},{name:"DoPut",serverStreaming:!0,clientStreaming:!0,options:{},I:la,O:ty},{name:"DoExchange",serverStreaming:!0,clientStreaming:!0,options:{},I:la,O:la},{name:"DoAction",serverStreaming:!0,options:{},I:qm,O:Km},{name:"ListActions",serverStreaming:!0,options:{},I:Gm,O:Jm}]);var ha=class{constructor(t){M(this,"_transport",t);M(this,"typeName",da.typeName);M(this,"methods",da.methods);M(this,"options",da.options)}handshake(t){let e=this.methods[0],i=this._transport.mergeOptions(t);return ee("duplex",this._transport,e,i)}listFlights(t,e){let i=this.methods[1],n=this._transport.mergeOptions(e);return ee("serverStreaming",this._transport,i,n,t)}getFlightInfo(t,e){let i=this.methods[2],n=this._transport.mergeOptions(e);return ee("unary",this._transport,i,n,t)}pollFlightInfo(t,e){let i=this.methods[3],n=this._transport.mergeOptions(e);return ee("unary",this._transport,i,n,t)}getSchema(t,e){let i=this.methods[4],n=this._transport.mergeOptions(e);return ee("unary",this._transport,i,n,t)}doGet(t,e){let i=this.methods[5],n=this._transport.mergeOptions(e);return ee("serverStreaming",this._transport,i,n,t)}doPut(t){let e=this.methods[6],i=this._transport.mergeOptions(t);return ee("duplex",this._transport,e,i)}doExchange(t){let e=this.methods[7],i=this._transport.mergeOptions(t);return ee("duplex",this._transport,e,i)}doAction(t,e){let i=this.methods[8],n=this._transport.mergeOptions(e);return ee("serverStreaming",this._transport,i,n,t)}listActions(t,e){let i=this.methods[9],n=this._transport.mergeOptions(e);return ee("serverStreaming",this._transport,i,n,t)}};var Cd=/\$(\w+)/g;function kd(r){return!!r.match(Cd)}function Pd(r,t){let e=r.match(Cd);if(e)for(let i of e)t[i.trim().replace("$","")]||ai(new Error(`No parameter matching ${i} provided in the query params map`));return!0}var ey="2.4.0.nightly",jd=`influxdb3-js/${ey}`;function _l(r,t){if(t==null)return null;let e=r.metadata.get("iox::column::type");if(!e||r.typeId===f.Timestamp)return t;let[,,i,n]=e.split("::");if(i==="field")switch(n){case"integer":return ci(t)?parseInt(t):(console.warn(`Value ${t} is not an integer`),t);case"uinteger":return kl(t)?parseInt(t):(console.warn(`Value ${t} is not an unsigned integer`),t);case"float":return ci(t)?parseFloat(t):(console.warn(`Value ${t} is not a float`),t);case"boolean":return typeof t=="boolean"||console.warn(`Value ${t} is not a boolean`),t;case"string":return typeof t=="string"?String(t):(console.warn(`Value ${t} is not a string`),t);default:return t}return t}var ns=class{constructor(t){M(this,"_options",t);M(this,"_closed",!1);M(this,"_flightClient");M(this,"_transport");M(this,"_defaultHeaders");let{host:e,queryTimeout:i,grpcOptions:n}=this._options;this._defaultHeaders=this._options.headers;let s={};n!==void 0&&(s=n),this._transport=zr.queryTransport({host:e,timeout:i,clientOptions:{...s}}),this._flightClient=new ha(this._transport)}prepareTicket(t,e,i){let n={database:t,sql_query:e,query_type:i.type};if(i.params){let s={};for(let o of Object.keys(i.params))i.params[o]&&(s[o]=i.params[o]);n.params=s}return fa.create({ticket:new TextEncoder().encode(JSON.stringify(n))})}prepareMetadata(t){let e={"User-Agent":jd,...this._defaultHeaders,...t},i=this._options.token;return i&&(e.authorization=`Bearer ${i}`),e}async*_queryRawBatches(t,e,i){var d;if(i.params&&kd(t)&&Pd(t,i.params),this._closed)throw new Error("queryApi: already closed!");let n=this._flightClient,s=this.prepareTicket(e,t,i),a={meta:this.prepareMetadata(i.headers)};a.timeout=(d=i.timeout)!=null?d:this._options.queryTimeout;let c=n.doGet(s,a),l=(async function*(){for await(let p of c.responses)yield Rl(p.dataHeader.length),yield p.dataHeader,yield p.dataBody})();yield*await Wt.from(l)}async*query(t,e,i){let n=this._queryRawBatches(t,e,i);for await(let s of n)for(let o of s){let a={};for(let c of s.schema.fields){let l=o[c.name];a[c.name]=_l(c,l)}yield a}}async*queryPoints(t,e,i){var s;let n=this._queryRawBatches(t,e,i);for await(let o of n)for(let a=0;a<o.numRows;a++){let c=new yr;for(let l=0;l<o.numCols;l++){let u=o.schema.fields[l],d=u.name,p=(s=o.getChildAt(l))==null?void 0:s.get(a),m=u.typeId,b=u.metadata.get("iox::column::type");if(p==null)continue;if((d==="measurement"||d=="iox::measurement")&&typeof p=="string"){c.setMeasurement(p);continue}if(!b){d==="time"&&m===f.Timestamp?c.setTimestamp(p):c.setField(d,p);continue}let[,,z,tt]=b.split("::");if(z==="field"){if(tt&&p!==void 0&&p!==null){let mt=_l(u,p);c.setField(d,mt,tt)}}else z==="tag"?c.setTag(d,p):z==="timestamp"&&c.setTimestamp(p)}yield c}}async close(){var t,e;this._closed=!0,(e=(t=this._transport).close)==null||e.call(t)}};var wl=`Please specify the 'database' as a method parameter or use default configuration at 'ClientOptions.database'
|
|
24
|
+
]`}concat(...t){let e=this.schema,i=this.data.concat(t.flatMap(({data:n})=>n));return new r(e,i.map(n=>new st(e,n)))}slice(t,e){let i=this.schema;[t,e]=vn({length:this.numRows},t,e);let n=_o(this.data,this._offsets,t,e);return new r(i,n.map(s=>new st(i,s)))}getChild(t){return this.getChildAt(this.schema.fields.findIndex(e=>e.name===t))}getChildAt(t){if(t>-1&&t<this.schema.fields.length){let e=this.data.map(i=>i.children[t]);if(e.length===0){let{type:i}=this.schema.fields[t],n=E({type:i,length:0,nullCount:0});e.push(n._changeLengthAndBackfillNullBitmap(this.numRows))}return new j(e)}return null}setChild(t,e){var i;return this.setChildAt((i=this.schema.fields)===null||i===void 0?void 0:i.findIndex(n=>n.name===t),e)}setChildAt(t,e){let i=this.schema,n=[...this.batches];if(t>-1&&t<this.numCols){e||(e=new j([E({type:new Mt,length:this.numRows})]));let s=i.fields.slice(),o=s[t].clone({type:e.type}),a=this.schema.fields.map((c,l)=>this.getChildAt(l));[s[t],a[t]]=[o,e],[i,n]=ta(i,a)}return new r(i,n)}select(t){let e=this.schema.fields.reduce((i,n,s)=>i.set(n.name,s),new Map);return this.selectAt(t.map(i=>e.get(i)).filter(i=>i>-1))}selectAt(t){let e=this.schema.selectAt(t),i=this.batches.map(n=>n.selectAt(t));return new r(e,i)}assign(t){let e=this.schema.fields,[i,n]=t.schema.fields.reduce((a,c,l)=>{let[u,d]=a,p=e.findIndex(m=>m.name===c.name);return~p?d[p]=l:u.push(l),a},[[],[]]),s=this.schema.assign(t.schema),o=[...e.map((a,c)=>[c,n[c]]).map(([a,c])=>c===void 0?this.getChildAt(a):t.getChildAt(c)),...i.map(a=>t.getChildAt(a))].filter(Boolean);return new r(...ta(s,o))}};ld=Symbol.toStringTag;Nt[ld]=(r=>(r.schema=null,r.batches=[],r._offsets=new Uint32Array([0]),r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,r[ud]=!0,r.isValid=Bi(Bn),r.get=Bi(bt.getVisitFn(f.Struct)),r.set=wo(xt.getVisitFn(f.Struct)),r.indexOf=vo(Kr.getVisitFn(f.Struct)),"Table"))(Nt.prototype);Object.defineProperty(Nt,Symbol.hasInstance,{value:function(t){return Function.prototype[Symbol.hasInstance].call(this,t)||this===Nt&&Nt.isTable(t)}});var dd,hd=Symbol.for("apache-arrow/RecordBatch"),st=class r{static isRecordBatch(t){return(t==null?void 0:t[hd])===!0}constructor(...t){switch(t.length){case 3:case 2:{if([this.schema]=t,!(this.schema instanceof G))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");if([,this.data=E({nullCount:0,type:new at(this.schema.fields),children:this.schema.fields.map(e=>E({type:e.type,nullCount:0}))}),this._metadata=new Map]=t,!(this.data instanceof W))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");[this.schema,this.data]=fd(this.schema,this.data.children,this.data.length);break}case 1:{let[e]=t,{fields:i,children:n,length:s}=Object.keys(e).reduce((c,l,u)=>(c.children[u]=e[l],c.length=Math.max(c.length,e[l].length),c.fields[u]=U.new({name:l,type:e[l].type,nullable:!0}),c),{length:0,fields:new Array,children:new Array}),o=new G(i),a=E({type:new at(i),length:s,children:n,nullCount:0});[this.schema,this.data]=fd(o,a.children,s),this._metadata=new Map;break}default:throw new TypeError("RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.")}}get metadata(){return this._metadata}get dictionaries(){return this._dictionaries||(this._dictionaries=pd(this.schema.fields,this.data.children))}get numCols(){return this.schema.fields.length}get numRows(){return this.data.length}get nullCount(){return this.data.nullCount}isValid(t){return this.data.getValid(t)}get(t){return bt.visit(this.data,t)}at(t){return this.get(Gr(t,this.numRows))}set(t,e){return xt.visit(this.data,t,e)}indexOf(t,e){return Kr.visit(this.data,t,e)}[Symbol.iterator](){return Ti.visit(new j([this.data]))}toArray(){return[...this]}concat(...t){return new Nt(this.schema,[this,...t])}slice(t,e){let[i]=new j([this.data]).slice(t,e).data;return new r(this.schema,i,this._metadata)}getChild(t){var e;return this.getChildAt((e=this.schema.fields)===null||e===void 0?void 0:e.findIndex(i=>i.name===t))}getChildAt(t){return t>-1&&t<this.schema.fields.length?new j([this.data.children[t]]):null}setChild(t,e){var i;return this.setChildAt((i=this.schema.fields)===null||i===void 0?void 0:i.findIndex(n=>n.name===t),e)}setChildAt(t,e){let i=this.schema,n=this.data;if(t>-1&&t<this.numCols){e||(e=new j([E({type:new Mt,length:this.numRows})]));let s=i.fields.slice(),o=n.children.slice(),a=s[t].clone({type:e.type});[s[t],o[t]]=[a,e.data[0]],i=new G(s,new Map(this.schema.metadata)),n=E({type:new at(s),length:n.length,children:o})}return new r(i,n,this._metadata)}select(t){let e=this.schema.select(t),i=new at(e.fields),n=[];for(let s of t){let o=this.schema.fields.findIndex(a=>a.name===s);~o&&(n[o]=this.data.children[o])}return new r(e,E({type:i,length:this.numRows,children:n}),this._metadata)}selectAt(t){let e=this.schema.selectAt(t),i=t.map(s=>this.data.children[s]).filter(Boolean),n=E({type:new at(e.fields),length:this.numRows,children:i});return new r(e,n,this._metadata)}};dd=Symbol.toStringTag;st[dd]=(r=>(r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,r[hd]=!0,"RecordBatch"))(st.prototype);Object.defineProperty(st,Symbol.hasInstance,{value:function(t){return Function.prototype[Symbol.hasInstance].call(this,t)||this===st&&st.isRecordBatch(t)}});function fd(r,t,e=t.reduce((i,n)=>Math.max(i,n.length),0)){var i;let n=[...r.fields],s=[...t],o=(e+63&-64)>>3;for(let[a,c]of r.fields.entries()){let l=t[a];(!l||l.length!==e)&&(n[a]=c.clone({nullable:!0}),s[a]=(i=l==null?void 0:l._changeLengthAndBackfillNullBitmap(e))!==null&&i!==void 0?i:E({type:c.type,length:e,nullCount:e,nullBitmap:new Uint8Array(o)}))}return[r.assign(n),E({type:new at(n),length:e,children:s})]}function pd(r,t,e=new Map){var i,n;if(((i=r==null?void 0:r.length)!==null&&i!==void 0?i:0)>0&&(r==null?void 0:r.length)===(t==null?void 0:t.length))for(let s=-1,o=r.length;++s<o;){let{type:a}=r[s],c=t[s];for(let l of[c,...((n=c==null?void 0:c.dictionary)===null||n===void 0?void 0:n.data)||[]])pd(a.children,l==null?void 0:l.children,e);if(g.isDictionary(a)){let{id:l}=a;if(!e.has(l))c!=null&&c.dictionary&&e.set(l,c.dictionary);else if(e.get(l)!==c.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}}return e}var ni=class extends st{constructor(t,e){let i=t.fields.map(s=>E({type:s.type})),n=E({type:new at(t.fields),length:0,nullCount:0,children:i});super(t,n,e||new Map)}};var Cc=r=>`Expected ${H[r]} Message in stream, but was null or length 0.`,kc=r=>`Header pointer of flatbuffer-encoded ${H[r]} Message is null or length 0.`,md=(r,t)=>`Expected to read ${r} metadata bytes, but only read ${t}.`,yd=(r,t)=>`Expected to read ${r} bytes for message body, but only read ${t}.`,Ui=class{constructor(t){this.source=t instanceof Ve?t:new Ve(t)}[Symbol.iterator](){return this}next(){let t;return(t=this.readMetadataLength()).done?ct:t.value===-1&&(t=this.readMetadataLength()).done?ct:(t=this.readMetadata(t.value)).done?ct:t}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}readMessage(t){let e;if((e=this.next()).done)return null;if(t!=null&&e.value.headerType!==t)throw new Error(Cc(t));return e.value}readMessageBody(t){if(t<=0)return new Uint8Array(0);let e=I(this.source.read(t));if(e.byteLength<t)throw new Error(yd(t,e.byteLength));return e.byteOffset%8===0&&e.byteOffset+e.byteLength<=e.buffer.byteLength?e:e.slice()}readSchema(t=!1){let e=H.Schema,i=this.readMessage(e),n=i==null?void 0:i.header();if(t&&!n)throw new Error(kc(e));return n}readMetadataLength(){let t=this.source.read(ea),e=t&&new Tt(t),i=(e==null?void 0:e.readInt32(0))||0;return{done:i===0,value:i}}readMetadata(t){let e=this.source.read(t);if(!e)return ct;if(e.byteLength<t)throw new Error(md(t,e.byteLength));return{done:!1,value:zt.decode(e)}}},Qn=class{constructor(t,e){this.source=t instanceof ae?t:Fs(t)?new Nr(t,e):new ae(t)}[Symbol.asyncIterator](){return this}next(){return _(this,void 0,void 0,function*(){let t;return(t=yield this.readMetadataLength()).done?ct:t.value===-1&&(t=yield this.readMetadataLength()).done?ct:(t=yield this.readMetadata(t.value)).done?ct:t})}throw(t){return _(this,void 0,void 0,function*(){return yield this.source.throw(t)})}return(t){return _(this,void 0,void 0,function*(){return yield this.source.return(t)})}readMessage(t){return _(this,void 0,void 0,function*(){let e;if((e=yield this.next()).done)return null;if(t!=null&&e.value.headerType!==t)throw new Error(Cc(t));return e.value})}readMessageBody(t){return _(this,void 0,void 0,function*(){if(t<=0)return new Uint8Array(0);let e=I(yield this.source.read(t));if(e.byteLength<t)throw new Error(yd(t,e.byteLength));return e.byteOffset%8===0&&e.byteOffset+e.byteLength<=e.buffer.byteLength?e:e.slice()})}readSchema(){return _(this,arguments,void 0,function*(t=!1){let e=H.Schema,i=yield this.readMessage(e),n=i==null?void 0:i.header();if(t&&!n)throw new Error(kc(e));return n})}readMetadataLength(){return _(this,void 0,void 0,function*(){let t=yield this.source.read(ea),e=t&&new Tt(t),i=(e==null?void 0:e.readInt32(0))||0;return{done:i===0,value:i}})}readMetadata(t){return _(this,void 0,void 0,function*(){let e=yield this.source.read(t);if(!e)return ct;if(e.byteLength<t)throw new Error(md(t,e.byteLength));return{done:!1,value:zt.decode(e)}})}},ts=class extends Ui{constructor(t){super(new Uint8Array(0)),this._schema=!1,this._body=[],this._batchIndex=0,this._dictionaryIndex=0,this._json=t instanceof Tn?t:new Tn(t)}next(){let{_json:t}=this;if(!this._schema)return this._schema=!0,{done:!1,value:zt.fromJSON(t.schema,H.Schema)};if(this._dictionaryIndex<t.dictionaries.length){let e=t.dictionaries[this._dictionaryIndex++];return this._body=e.data.columns,{done:!1,value:zt.fromJSON(e,H.DictionaryBatch)}}if(this._batchIndex<t.batches.length){let e=t.batches[this._batchIndex++];return this._body=e.columns,{done:!1,value:zt.fromJSON(e,H.RecordBatch)}}return this._body=[],ct}readMessageBody(t){return e(this._body);function e(i){return(i||[]).reduce((n,s)=>[...n,...s.VALIDITY&&[s.VALIDITY]||[],...s.TYPE_ID&&[s.TYPE_ID]||[],...s.OFFSET&&[s.OFFSET]||[],...s.DATA&&[s.DATA]||[],...s.VIEWS&&[s.VIEWS]||[],...s.VARIADIC_DATA_BUFFERS||[],...e(s.children)],[])}}readMessage(t){let e;if((e=this.next()).done)return null;if(t!=null&&e.value.headerType!==t)throw new Error(Cc(t));return e.value}readSchema(){let t=H.Schema,e=this.readMessage(t),i=e==null?void 0:e.header();if(!e||!i)throw new Error(kc(t));return i}},ea=4,Rc="ARROW1",Mi=new Uint8Array(Rc.length);for(let r=0;r<Rc.length;r+=1)Mi[r]=Rc.codePointAt(r);function ra(r,t=0){for(let e=-1,i=Mi.length;++e<i;)if(Mi[e]!==r[t+e])return!1;return!0}var Vi=Mi.length,Pc=Vi+ea,gd=Vi*2+ea;var jc=class{constructor(){this.LZ4_FRAME_MAGIC=new Uint8Array([4,34,77,24]),this.MIN_HEADER_LENGTH=7}isValidCodecEncode(t){let e=new Uint8Array([1,2,3,4,5,6,7,8]),i=t.encode(e);return this._isValidCompressed(i)}_isValidCompressed(t){return this._hasMinimumLength(t)&&this._hasValidMagicNumber(t)&&this._hasValidVersion(t)}_hasMinimumLength(t){return t.length>=this.MIN_HEADER_LENGTH}_hasValidMagicNumber(t){return this.LZ4_FRAME_MAGIC.every((e,i)=>t[i]===e)}_hasValidVersion(t){return(t[4]&192)>>6===1}},zc=class{constructor(){this.ZSTD_MAGIC=new Uint8Array([40,181,47,253]),this.MIN_HEADER_LENGTH=6}isValidCodecEncode(t){let e=new Uint8Array([1,2,3,4,5,6,7,8]),i=t.encode(e);return this._isValidCompressed(i)}_isValidCompressed(t){return this._hasMinimumLength(t)&&this._hasValidMagicNumber(t)}_hasMinimumLength(t){return t.length>=this.MIN_HEADER_LENGTH}_hasValidMagicNumber(t){return this.ZSTD_MAGIC.every((e,i)=>t[i]===e)}},bd={[Ut.LZ4_FRAME]:new jc,[Ut.ZSTD]:new zc};var Wc=class{constructor(){this.registry={}}set(t,e){if(e!=null&&e.encode&&typeof e.encode=="function"&&!bd[t].isValidCodecEncode(e))throw new Error(`Encoder for ${Ut[t]} is not valid.`);this.registry[t]=e}get(t){var e;return((e=this.registry)===null||e===void 0?void 0:e[t])||null}},Ri=new Wc;var Wt=class r extends Qr{constructor(t){super(),this._impl=t}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(t){return this._impl.throw(t)}return(t){return this._impl.return(t)}cancel(){return this._impl.cancel()}reset(t){return this._impl.reset(t),this._DOMStream=void 0,this._nodeStream=void 0,this}open(t){let e=this._impl.open(t);return fe(e)?e.then(()=>this):this}readRecordBatch(t){return this._impl.isFile()?this._impl.readRecordBatch(t):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return Bt.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return Bt.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(t){throw new Error('"throughNode" not available in this environment')}static throughDOM(t,e){throw new Error('"throughDOM" not available in this environment')}static from(t){return t instanceof r?t:As(t)?Mm(t):Fs(t)?Cm(t):fe(t)?_(this,void 0,void 0,function*(){return yield r.from(yield t)}):Ns(t)||en(t)||Ls(t)||ie(t)?Rm(new ae(t)):Vm(new Ve(t))}static readAll(t){return t instanceof r?t.isSync()?_d(t):wd(t):As(t)||ArrayBuffer.isView(t)||de(t)||Ds(t)?_d(t):wd(t)}},Ce=class extends Wt{constructor(t){super(t),this._impl=t}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return Gt(this,arguments,function*(){yield V(yield*ui(ue(this[Symbol.iterator]())))})}},Lr=class extends Wt{constructor(t){super(t),this._impl=t}readAll(){return _(this,void 0,void 0,function*(){var t,e,i,n;let s=new Array;try{for(var o=!0,a=ue(this),c;c=yield a.next(),t=c.done,!t;o=!0){n=c.value,o=!1;let l=n;s.push(l)}}catch(l){e={error:l}}finally{try{!o&&!t&&(i=a.return)&&(yield i.call(a))}finally{if(e)throw e.error}}return s})}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}},Ur=class extends Ce{constructor(t){super(t),this._impl=t}},es=class extends Lr{constructor(t){super(t),this._impl=t}},ia=class{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(t=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=t}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(t){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=t,this.dictionaries=new Map,this}_loadRecordBatch(t,e,i){let n;if(t.compression!=null){let o=Ri.get(t.compression.type);if(o!=null&&o.decode&&typeof o.decode=="function"){let{decommpressedBody:a,buffers:c}=this._decompressBuffers(t,e,o);n=this._loadCompressedVectors(t,a,this.schema.fields),t=new wt(t.length,t.nodes,c,null)}else throw new Error("Record batch is compressed but codec not found")}else n=this._loadVectors(t,e,this.schema.fields);let s=E({type:new at(this.schema.fields),length:t.length,children:n});return new st(this.schema,s,i)}_loadDictionaryBatch(t,e){let{id:i,isDelta:n}=t,{dictionaries:s,schema:o}=this,a=s.get(i),c=o.dictionaries.get(i),l;if(t.data.compression!=null){let u=Ri.get(t.data.compression.type);if(u!=null&&u.decode&&typeof u.decode=="function"){let{decommpressedBody:d,buffers:p}=this._decompressBuffers(t.data,e,u);l=this._loadCompressedVectors(t.data,d,[c]),t=new Ft(new wt(t.data.length,t.data.nodes,p,null,t.data.variadicBufferCounts),i,n)}else throw new Error("Dictionary batch is compressed but codec not found")}else l=this._loadVectors(t.data,e,[c]);return(a&&n?a.concat(new j(l)):new j(l)).memoize()}_loadVectors(t,e,i){return new Di(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion,t.variadicBufferCounts).visitMany(i)}_loadCompressedVectors(t,e,i){return new Do(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion,t.variadicBufferCounts).visitMany(i)}_decompressBuffers(t,e,i){let n=[],s=[],o=0;for(let{offset:a,length:c}of t.buffers){if(c===0){n.push(new Uint8Array(0)),s.push(new pt(o,0));continue}let l=new Tt(e.subarray(a,a+c)),u=P(l.readInt64(0)),d=l.bytes().subarray(8),p=u===-1?d:i.decode(d);n.push(p);let m=(o+7&-8)-o;o+=m,s.push(new pt(o,p.length)),o+=p.length}return{decommpressedBody:n,buffers:s}}},Ci=class extends ia{constructor(t,e){super(e),this._reader=As(t)?new ts(this._handle=t):new Ui(this._handle=t)}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(t){return this.closed||(this.autoDestroy=Id(this,t),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(t):ct}return(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(t):ct}next(){if(this.closed)return ct;let t,{_reader:e}=this;for(;t=this._readNextMessageAndValidate();)if(t.isSchema())this.reset(t.header());else if(t.isRecordBatch()){this._recordBatchIndex++;let i=t.header(),n=e.readMessageBody(t.bodyLength);return{done:!1,value:this._loadRecordBatch(i,n,t.metadata)}}else if(t.isDictionaryBatch()){this._dictionaryIndex++;let i=t.header(),n=e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new ni(this.schema)}):this.return()}_readNextMessageAndValidate(t){return this._reader.readMessage(t)}},ki=class extends ia{constructor(t,e){super(e),this._reader=new Qn(this._handle=t)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return _(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(t){return _(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=Id(this,t),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(t){return _(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(t):ct})}return(t){return _(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(t):ct})}next(){return _(this,void 0,void 0,function*(){if(this.closed)return ct;let t,{_reader:e}=this;for(;t=yield this._readNextMessageAndValidate();)if(t.isSchema())yield this.reset(t.header());else if(t.isRecordBatch()){this._recordBatchIndex++;let i=t.header(),n=yield e.readMessageBody(t.bodyLength);return{done:!1,value:this._loadRecordBatch(i,n,t.metadata)}}else if(t.isDictionaryBatch()){this._dictionaryIndex++;let i=t.header(),n=yield e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new ni(this.schema)}):yield this.return()})}_readNextMessageAndValidate(t){return _(this,void 0,void 0,function*(){return yield this._reader.readMessage(t)})}},na=class extends Ci{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(t,e){super(t instanceof xn?t:new xn(t),e)}isSync(){return!0}isFile(){return!0}open(t){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(let e of this._footer.dictionaryBatches())e&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(t)}readRecordBatch(t){var e;if(this.closed)return null;this._footer||this.open();let i=(e=this._footer)===null||e===void 0?void 0:e.getRecordBatch(t);if(i&&this._handle.seek(i.offset)){let n=this._reader.readMessage(H.RecordBatch);if(n!=null&&n.isRecordBatch()){let s=n.header(),o=this._reader.readMessageBody(n.bodyLength);return this._loadRecordBatch(s,o,n.metadata)}}return null}_readDictionaryBatch(t){var e;let i=(e=this._footer)===null||e===void 0?void 0:e.getDictionaryBatch(t);if(i&&this._handle.seek(i.offset)){let n=this._reader.readMessage(H.DictionaryBatch);if(n!=null&&n.isDictionaryBatch()){let s=n.header(),o=this._reader.readMessageBody(n.bodyLength),a=this._loadDictionaryBatch(s,o);this.dictionaries.set(s.id,a)}}}_readFooter(){let{_handle:t}=this,e=t.size-Pc,i=t.readInt32(e),n=t.readAt(e-i,i);return or.decode(n)}_readNextMessageAndValidate(t){var e;if(this._footer||this.open(),this._footer&&this._recordBatchIndex<this.numRecordBatches){let i=(e=this._footer)===null||e===void 0?void 0:e.getRecordBatch(this._recordBatchIndex);if(i&&this._handle.seek(i.offset))return this._reader.readMessage(t)}return null}},$c=class extends ki{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(t,...e){let i=typeof e[0]!="number"?e.shift():void 0,n=e[0]instanceof Map?e.shift():void 0;super(t instanceof Nr?t:new Nr(t,i),n)}isFile(){return!0}isAsync(){return!0}open(t){let e=Object.create(null,{open:{get:()=>super.open}});return _(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(let i of this._footer.dictionaryBatches())i&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield e.open.call(this,t)})}readRecordBatch(t){return _(this,void 0,void 0,function*(){var e;if(this.closed)return null;this._footer||(yield this.open());let i=(e=this._footer)===null||e===void 0?void 0:e.getRecordBatch(t);if(i&&(yield this._handle.seek(i.offset))){let n=yield this._reader.readMessage(H.RecordBatch);if(n!=null&&n.isRecordBatch()){let s=n.header(),o=yield this._reader.readMessageBody(n.bodyLength);return this._loadRecordBatch(s,o,n.metadata)}}return null})}_readDictionaryBatch(t){return _(this,void 0,void 0,function*(){var e;let i=(e=this._footer)===null||e===void 0?void 0:e.getDictionaryBatch(t);if(i&&(yield this._handle.seek(i.offset))){let n=yield this._reader.readMessage(H.DictionaryBatch);if(n!=null&&n.isDictionaryBatch()){let s=n.header(),o=yield this._reader.readMessageBody(n.bodyLength),a=this._loadDictionaryBatch(s,o);this.dictionaries.set(s.id,a)}}})}_readFooter(){return _(this,void 0,void 0,function*(){let{_handle:t}=this;t._pending&&(yield t._pending);let e=t.size-Pc,i=yield t.readInt32(e),n=yield t.readAt(e-i,i);return or.decode(n)})}_readNextMessageAndValidate(t){return _(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex<this.numRecordBatches){let e=this._footer.getRecordBatch(this._recordBatchIndex);if(e&&(yield this._handle.seek(e.offset)))return yield this._reader.readMessage(t)}return null})}},Hc=class extends Ci{constructor(t,e){super(t,e)}_loadVectors(t,e,i){return new Ao(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion,t.variadicBufferCounts).visitMany(i)}};function Id(r,t){return t&&typeof t.autoDestroy=="boolean"?t.autoDestroy:r.autoDestroy}function*_d(r){let t=Wt.from(r);try{if(!t.open({autoDestroy:!1}).closed)do yield t;while(!t.reset().open().closed)}finally{t.cancel()}}function wd(r){return Gt(this,arguments,function*(){let e=yield V(Wt.from(r));try{if(!(yield V(e.open({autoDestroy:!1}))).closed)do yield yield V(e);while(!(yield V(e.reset().open())).closed)}finally{yield V(e.cancel())}})}function Mm(r){return new Ce(new Hc(r))}function Vm(r){let t=r.peek(Vi+7&-8);return t&&t.byteLength>=4?ra(t)?new Ur(new na(r.read())):new Ce(new Ci(r)):new Ce(new Ci((function*(){})()))}function Rm(r){return _(this,void 0,void 0,function*(){let t=yield r.peek(Vi+7&-8);return t&&t.byteLength>=4?ra(t)?new Ur(new na(yield r.read())):new Lr(new ki(r)):new Lr(new ki((function(){return Gt(this,arguments,function*(){})})()))})}function Cm(r){return _(this,void 0,void 0,function*(){let{size:t}=yield r.stat(),e=new Nr(r,t);return t>=gd&&ra(yield e.readAt(0,Vi+7&-8))?new es(new $c(e)):new Lr(new ki(e))})}var lt=class r extends A{static assemble(...t){let e=n=>n.flatMap(s=>Array.isArray(s)?e(s):s instanceof st?s.data.children:s.data),i=new r;return i.visitMany(e(t)),i}constructor(){super(),this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[],this._variadicBufferCounts=[]}visit(t){if(t instanceof j)return this.visitMany(t.data),this;let{type:e}=t;if(!g.isDictionary(e)){let{length:i}=t;if(i>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");if(g.isUnion(e))this.nodes.push(new oe(i,0));else{let{nullCount:n}=t;g.isNull(e)||te.call(this,n<=0?new Uint8Array(0):Xr(t.offset,i,t.nullBitmap)),this.nodes.push(new oe(i,n))}}return super.visit(t)}visitNull(t){return this}visitDictionary(t){return this.visit(t.clone(t.type.indices))}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}get variadicBufferCounts(){return this._variadicBufferCounts}};function te(r){let t=r.byteLength+7&-8;return this.buffers.push(r),this.bufferRegions.push(new pt(this._byteLength,t)),this._byteLength+=t,this}function km(r){var t;let{type:e,length:i,typeIds:n,valueOffsets:s}=r;if(te.call(this,n),e.mode===et.Sparse)return Gc.call(this,r);if(e.mode===et.Dense){if(r.offset<=0)return te.call(this,s),Gc.call(this,r);{let o=new Int32Array(i),a=Object.create(null),c=Object.create(null);for(let l,u,d=-1;++d<i;)(l=n[d])!==void 0&&((u=a[l])===void 0&&(u=a[l]=s[d]),o[d]=s[d]-u,c[l]=((t=c[l])!==null&&t!==void 0?t:0)+1);te.call(this,o),this.visitMany(r.children.map((l,u)=>{let d=e.typeIds[u],p=a[d],m=c[d];return l.slice(p,Math.min(i,m))}))}}return this}function Pm(r){let t;return r.nullCount>=r.length?te.call(this,new Uint8Array(r.length+7>>3)):(t=r.values)instanceof Uint8Array?te.call(this,Xr(r.offset,r.length,t)):te.call(this,qr(r.values))}function mr(r){return te.call(this,r.values.subarray(0,r.length*r.stride))}function sa(r){let{length:t,values:e,valueOffsets:i}=r,n=P(i[0]),s=P(i[t]),o=Math.min(s-n,e.byteLength-n);return te.call(this,Us(-n,t+1,i)),te.call(this,e.subarray(n,n+o)),this}function Sd(r){let{offset:t,length:e,stride:i,values:n,variadicBuffers:s=[]}=r;if(!n)throw new Error("BinaryView data is missing view buffer");let o=t*i,a=o+e*i;te.call(this,n.subarray(o,a));for(let c of s)te.call(this,c);return this._variadicBufferCounts.push(s.length),this}function oa(r){let{length:t,valueOffsets:e}=r;if(e){let i=P(e[0]),n=P(e[t]);return te.call(this,Us(-i,t+1,e)),this.visit(r.children[0].slice(i,n-i))}return this.visit(r.children[0])}function Gc(r){return this.visitMany(r.type.children.map((t,e)=>r.children[e]).filter(Boolean))[0]}lt.prototype.visitBool=Pm;lt.prototype.visitInt=mr;lt.prototype.visitFloat=mr;lt.prototype.visitUtf8=sa;lt.prototype.visitLargeUtf8=sa;lt.prototype.visitUtf8View=Sd;lt.prototype.visitBinary=sa;lt.prototype.visitLargeBinary=sa;lt.prototype.visitBinaryView=Sd;lt.prototype.visitFixedSizeBinary=mr;lt.prototype.visitDate=mr;lt.prototype.visitTimestamp=mr;lt.prototype.visitTime=mr;lt.prototype.visitDecimal=mr;lt.prototype.visitList=oa;lt.prototype.visitLargeList=oa;lt.prototype.visitStruct=Gc;lt.prototype.visitUnion=km;lt.prototype.visitInterval=mr;lt.prototype.visitDuration=mr;lt.prototype.visitFixedSizeList=oa;lt.prototype.visitMap=oa;var si=class extends Qr{static throughNode(t){throw new Error('"throughNode" not available in this environment')}static throughDOM(t,e){throw new Error('"throughDOM" not available in this environment')}constructor(t){if(super(),this._position=0,this._started=!1,this._compression=null,this._sink=new Me,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,Lt(t)||(t={autoDestroy:!0,writeLegacyIpcFormat:!1,compressionType:null}),this._autoDestroy=typeof t.autoDestroy=="boolean"?t.autoDestroy:!0,this._writeLegacyIpcFormat=typeof t.writeLegacyIpcFormat=="boolean"?t.writeLegacyIpcFormat:!1,t.compressionType!=null){if(this._writeLegacyIpcFormat)throw new Error("Legacy IPC format does not support columnar compression. Use modern IPC format (writeLegacyIpcFormat=false).");if(Object.values(Ut).includes(t.compressionType))this._compression=new Zr(t.compressionType);else{let e=Object.values(Ut).filter(i=>typeof i=="string");throw new Error(`Unsupported compressionType: ${t.compressionType} Available types: ${e.join(", ")}`)}}else this._compression=null}toString(t=!1){return this._sink.toString(t)}toUint8Array(t=!1){return this._sink.toUint8Array(t)}writeAll(t){return fe(t)?t.then(e=>this.writeAll(e)):ie(t)?Xc(this,t):Jc(this,t)}get closed(){return this._sink.closed}[Symbol.asyncIterator](){return this._sink[Symbol.asyncIterator]()}toDOMStream(t){return this._sink.toDOMStream(t)}toNodeStream(t){return this._sink.toNodeStream(t)}close(){return this.reset()._sink.close()}abort(t){return this.reset()._sink.abort(t)}finish(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}reset(t=this._sink,e=null){return t===this._sink||t instanceof Me?this._sink=t:(this._sink=new Me,t&&hu(t)?this.toDOMStream({type:"bytes"}).pipeTo(t):t&&pu(t)&&this.toNodeStream({objectMode:!1}).pipe(t)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,(!e||!ii(e,this._schema))&&(e==null?(this._position=0,this._schema=null):(this._started=!0,this._schema=e,this._writeSchema(e))),this}write(t){let e=null;if(this._sink){if(t==null)return this.finish()&&void 0;if(t instanceof Nt&&!(e=t.schema))return this.finish()&&void 0;if(t instanceof st&&!(e=t.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(e&&!ii(e,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,e)}t instanceof st?t instanceof ni||this._writeRecordBatch(t):t instanceof Nt?this.writeAll(t.batches):de(t)&&this.writeAll(t)}_writeMessage(t,e=8){let i=e-1,n=zt.encode(t),s=n.byteLength,o=this._writeLegacyIpcFormat?4:8,a=s+o+i&~i,c=a-s-o;return t.headerType===H.RecordBatch?this._recordBatchBlocks.push(new ar(a,t.bodyLength,this._position)):t.headerType===H.DictionaryBatch&&this._dictionaryBlocks.push(new ar(a,t.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(a-o)),s>0&&this._write(n),this._writePadding(c)}_write(t){if(this._started){let e=I(t);e&&e.byteLength>0&&(this._sink.write(e),this._position+=e.byteLength)}return this}_writeSchema(t){return this._writeMessage(zt.from(t))}_writeFooter(t){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(Mi)}_writePadding(t){return t>0?this._write(new Uint8Array(t)):this}_writeRecordBatch(t){let{byteLength:e,nodes:i,bufferRegions:n,buffers:s,variadicBufferCounts:o}=this._assembleRecordBatch(t),a=new wt(t.numRows,i,n,this._compression,o,t.metadata),c=zt.from(a,e);return this._writeDictionaries(t)._writeMessage(c)._writeBodyBuffers(s)}_assembleRecordBatch(t){let{byteLength:e,nodes:i,bufferRegions:n,buffers:s,variadicBufferCounts:o}=lt.assemble(t);return this._compression!=null&&({byteLength:e,bufferRegions:n,buffers:s}=this._compressBodyBuffers(s)),{byteLength:e,nodes:i,bufferRegions:n,buffers:s,variadicBufferCounts:o}}_compressBodyBuffers(t){let e=Ri.get(this._compression.type);if(!(e!=null&&e.encode)||typeof e.encode!="function")throw new Error(`Codec for compression type "${Ut[this._compression.type]}" has invalid encode method`);let i=0,n=[],s=[];for(let a of t){let c=I(a);if(c.length===0){n.push(new Uint8Array(0),new Uint8Array(0)),s.push(new pt(i,0));continue}let l=e.encode(c),u=l.length<c.length,d=u?l:c,p=u?d.length:-1,m=new Tt(new Uint8Array(8));m.writeInt64(0,BigInt(p)),n.push(m.bytes(),new Uint8Array(d));let b=(i+7&-8)-i;i+=b;let z=8+d.length;s.push(new pt(i,z)),i+=z}let o=(i+7&-8)-i;return i+=o,{byteLength:i,bufferRegions:s,buffers:n}}_writeDictionaryBatch(t,e,i=!1){let{byteLength:n,nodes:s,bufferRegions:o,buffers:a,variadicBufferCounts:c}=this._assembleRecordBatch(new j([t])),l=new wt(t.length,s,o,this._compression,c),u=new Ft(l,e,i),d=zt.from(u,n);return this._writeMessage(d)._writeBodyBuffers(a)}_writeBodyBuffers(t){let e=this._compression!=null?2:1,i=new Array(e);for(let n=0;n<t.length;n+=e){let s=0;for(let a=-1;++a<e;)i[a]=t[n+a],s+=i[a].byteLength;if(s===0)continue;for(let a of i)this._write(a);let o=(s+7&-8)-s;o>0&&this._writePadding(o)}return this}_writeDictionaries(t){var e,i;for(let[n,s]of t.dictionaries){let o=(e=s==null?void 0:s.data)!==null&&e!==void 0?e:[],a=this._seenDictionaries.get(n),c=(i=this._dictionaryDeltaOffsets.get(n))!==null&&i!==void 0?i:0;if(!a||a.data[0]!==o[0])for(let[l,u]of o.entries())this._writeDictionaryBatch(u,n,l>0);else if(c<o.length)for(let l of o.slice(c))this._writeDictionaryBatch(l,n,!0);this._seenDictionaries.set(n,s),this._dictionaryDeltaOffsets.set(n,o.length)}return this}},rs=class r extends si{static writeAll(t,e){let i=new r(e);return fe(t)?t.then(n=>i.writeAll(n)):ie(t)?Xc(i,t):Jc(i,t)}},is=class r extends si{static writeAll(t,e){let i=new r(e);return fe(t)?t.then(n=>i.writeAll(n)):ie(t)?Xc(i,t):Jc(i,t)}constructor(t){super(t),this._autoDestroy=!0,this._writeLegacyIpcFormat=!1}_writeSchema(t){return this._writeMagic()._writePadding(2)}_writeDictionaryBatch(t,e,i=!1){if(!i&&this._seenDictionaries.has(e))throw new Error("The Arrow File format does not support replacement dictionaries. ");return super._writeDictionaryBatch(t,e,i)}_writeFooter(t){let e=or.encode(new or(t,K.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(t)._write(e)._write(Int32Array.of(e.byteLength))._writeMagic()}};function Jc(r,t){let e=t;t instanceof Nt&&(e=t.batches,r.reset(void 0,t.schema));for(let i of e)r.write(i);return r.finish()}function Xc(r,t){return _(this,void 0,void 0,function*(){var e,i,n,s,o,a,c;try{for(e=!0,i=ue(t);n=yield i.next(),s=n.done,!s;e=!0){c=n.value,e=!1;let l=c;r.write(l)}}catch(l){o={error:l}}finally{try{!e&&!s&&(a=i.return)&&(yield a.call(i))}finally{if(o)throw o.error}}return r.finish()})}function Bd(r,t){if(ie(r))return zm(r,t);if(de(r))return jm(r,t);throw new Error("toDOMStream() must be called with an Iterable or AsyncIterable")}function jm(r,t){let e=null,i=(t==null?void 0:t.type)==="bytes"||!1,n=(t==null?void 0:t.highWaterMark)||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},t),{start(o){s(o,e||(e=r[Symbol.iterator]()))},pull(o){e?s(o,e):o.close()},cancel(){e!=null&&e.return&&e.return(),e=null}}),Object.assign({highWaterMark:i?n:void 0},t));function s(o,a){let c,l=null,u=o.desiredSize||null;for(;!(l=a.next(i?u:null)).done;)if(ArrayBuffer.isView(l.value)&&(c=I(l.value))&&(u!=null&&i&&(u=u-c.byteLength+1),l.value=c),o.enqueue(l.value),u!=null&&--u<=0)return;o.close()}}function zm(r,t){let e=null,i=(t==null?void 0:t.type)==="bytes"||!1,n=(t==null?void 0:t.highWaterMark)||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},t),{start(o){return _(this,void 0,void 0,function*(){yield s(o,e||(e=r[Symbol.asyncIterator]()))})},pull(o){return _(this,void 0,void 0,function*(){e?yield s(o,e):o.close()})},cancel(){return _(this,void 0,void 0,function*(){e!=null&&e.return&&(yield e.return()),e=null})}}),Object.assign({highWaterMark:i?n:void 0},t));function s(o,a){return _(this,void 0,void 0,function*(){let c,l=null,u=o.desiredSize||null;for(;!(l=yield a.next(i?u:null)).done;)if(ArrayBuffer.isView(l.value)&&(c=I(l.value))&&(u!=null&&i&&(u=u-c.byteLength+1),l.value=c),o.enqueue(l.value),u!=null&&--u<=0)return;o.close()})}}function Od(r){return new qc(r)}var qc=class{constructor(t){this._numChunks=0,this._finished=!1,this._bufferedSize=0;let{["readableStrategy"]:e,["writableStrategy"]:i,["queueingStrategy"]:n="count"}=t,s=uu(t,["readableStrategy","writableStrategy","queueingStrategy"]);this._controller=null,this._builder=ei(s),this._getSize=n!=="bytes"?Td:xd;let{["highWaterMark"]:o=n==="bytes"?Math.pow(2,14):1e3}=Object.assign({},e),{["highWaterMark"]:a=n==="bytes"?Math.pow(2,14):1e3}=Object.assign({},i);this.readable=new ReadableStream({cancel:()=>{this._builder.clear()},pull:c=>{this._maybeFlush(this._builder,this._controller=c)},start:c=>{this._maybeFlush(this._builder,this._controller=c)}},{highWaterMark:o,size:n!=="bytes"?Td:xd}),this.writable=new WritableStream({abort:()=>{this._builder.clear()},write:()=>{this._maybeFlush(this._builder,this._controller)},close:()=>{this._maybeFlush(this._builder.finish(),this._controller)}},{highWaterMark:a,size:c=>this._writeValueAndReturnChunkSize(c)})}_writeValueAndReturnChunkSize(t){let e=this._bufferedSize;return this._bufferedSize=this._getSize(this._builder.append(t)),this._bufferedSize-e}_maybeFlush(t,e){e!=null&&(this._bufferedSize>=e.desiredSize&&++this._numChunks&&this._enqueue(e,t.toVector()),t.finished&&((t.length>0||this._numChunks===0)&&++this._numChunks&&this._enqueue(e,t.toVector()),!this._finished&&(this._finished=!0)&&this._enqueue(e,null)))}_enqueue(t,e){this._bufferedSize=0,this._controller=null,e==null?t.close():t.enqueue(e)}},Td=r=>{var t;return(t=r==null?void 0:r.length)!==null&&t!==void 0?t:0},xd=r=>{var t;return(t=r==null?void 0:r.byteLength)!==null&&t!==void 0?t:0};function aa(r,t){let e=new Me,i=null,n=new ReadableStream({cancel(){return _(this,void 0,void 0,function*(){yield e.close()})},start(a){return _(this,void 0,void 0,function*(){yield o(a,i||(i=yield s()))})},pull(a){return _(this,void 0,void 0,function*(){i?yield o(a,i):a.close()})}});return{writable:new WritableStream(e,Object.assign({highWaterMark:Math.pow(2,14)},r)),readable:n};function s(){return _(this,void 0,void 0,function*(){return yield(yield Wt.from(e)).open(t)})}function o(a,c){return _(this,void 0,void 0,function*(){let l=a.desiredSize,u=null;for(;!(u=yield c.next()).done;)if(a.enqueue(u.value),l!=null&&--l<=0)return;a.close()})}}function ca(r,t){let e=new this(r),i=new ae(e),n=new ReadableStream({cancel(){return _(this,void 0,void 0,function*(){yield i.cancel()})},pull(o){return _(this,void 0,void 0,function*(){yield s(o)})},start(o){return _(this,void 0,void 0,function*(){yield s(o)})}},Object.assign({highWaterMark:Math.pow(2,14)},t));return{writable:new WritableStream(e,r),readable:n};function s(o){return _(this,void 0,void 0,function*(){let a=null,c=o.desiredSize;for(;a=yield i.read(c||null);)if(o.enqueue(a),c!=null&&(c-=a.byteLength)<=0)return;o.close()})}}var Kc={};xe(Kc,{isArrowData:()=>Nd,isArrowDataType:()=>Fd,isArrowField:()=>Dd,isArrowRecordBatch:()=>Ld,isArrowSchema:()=>Ad,isArrowTable:()=>Ud,isArrowVector:()=>Ed});function Ad(r){return G.isSchema(r)}function Dd(r){return U.isField(r)}function Fd(r){return g.isDataType(r)}function Nd(r){return W.isData(r)}function Ed(r){return j.isVector(r)}function Ld(r){return st.isRecordBatch(r)}function Ud(r){return Nt.isTable(r)}var Wm=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ic),Fc),_c),nc),Ka),bc),Qa),Lc),Kc),{compareSchemas:ii,compareFields:ad,compareTypes:cd});Bt.toDOMStream=Bd;nt.throughDOM=Od;Wt.throughDOM=aa;Ur.throughDOM=aa;Ce.throughDOM=aa;si.throughDOM=ca;is.throughDOM=ca;rs.throughDOM=ca;var Yc=class extends ot{constructor(){super("google.protobuf.Timestamp",[{no:1,name:"seconds",kind:"scalar",T:3,L:0},{no:2,name:"nanos",kind:"scalar",T:5}])}now(){let t=this.create(),e=Date.now();return t.seconds=Z.from(Math.floor(e/1e3)).toBigInt(),t.nanos=e%1e3*1e6,t}toDate(t){return new Date(Z.from(t.seconds).toNumber()*1e3+Math.ceil(t.nanos/1e6))}fromDate(t){let e=this.create(),i=t.getTime();return e.seconds=Z.from(Math.floor(i/1e3)).toBigInt(),e.nanos=i%1e3*1e6,e}internalJsonWrite(t,e){let i=Z.from(t.seconds).toNumber()*1e3;if(i<Date.parse("0001-01-01T00:00:00Z")||i>Date.parse("9999-12-31T23:59:59Z"))throw new Error("Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");if(t.nanos<0)throw new Error("Unable to encode invalid Timestamp to JSON. Nanos must not be negative.");let n="Z";if(t.nanos>0){let s=(t.nanos+1e9).toString().substring(1);s.substring(3)==="000000"?n="."+s.substring(0,3)+"Z":s.substring(6)==="000"?n="."+s.substring(0,6)+"Z":n="."+s+"Z"}return new Date(i).toISOString().replace(".000Z",n)}internalJsonRead(t,e,i){if(typeof t!="string")throw new Error("Unable to parse Timestamp from JSON "+kr(t)+".");let n=t.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!n)throw new Error("Unable to parse Timestamp from JSON. Invalid format.");let s=Date.parse(n[1]+"-"+n[2]+"-"+n[3]+"T"+n[4]+":"+n[5]+":"+n[6]+(n[8]?n[8]:"Z"));if(Number.isNaN(s))throw new Error("Unable to parse Timestamp from JSON. Invalid value.");if(s<Date.parse("0001-01-01T00:00:00Z")||s>Date.parse("9999-12-31T23:59:59Z"))throw new globalThis.Error("Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");return i||(i=this.create()),i.seconds=Z.from(s/1e3).toBigInt(),i.nanos=0,n[7]&&(i.nanos=parseInt("1"+n[7]+"0".repeat(9-n[7].length))-1e9),i}},Zc=new Yc;var Md=(i=>(i[i.UNKNOWN=0]="UNKNOWN",i[i.PATH=1]="PATH",i[i.CMD=2]="CMD",i))(Md||{}),Vd=(n=>(n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.CANCELLED=1]="CANCELLED",n[n.CANCELLING=2]="CANCELLING",n[n.NOT_CANCELLABLE=3]="NOT_CANCELLABLE",n))(Vd||{}),Qc=class extends ot{constructor(){super("arrow.flight.protocol.HandshakeRequest",[{no:1,name:"protocol_version",kind:"scalar",T:4,L:0},{no:2,name:"payload",kind:"scalar",T:12}])}},$m=new Qc,tl=class extends ot{constructor(){super("arrow.flight.protocol.HandshakeResponse",[{no:1,name:"protocol_version",kind:"scalar",T:4,L:0},{no:2,name:"payload",kind:"scalar",T:12}])}},Hm=new tl,el=class extends ot{constructor(){super("arrow.flight.protocol.BasicAuth",[{no:2,name:"username",kind:"scalar",T:9},{no:3,name:"password",kind:"scalar",T:9}])}},MA=new el,rl=class extends ot{constructor(){super("arrow.flight.protocol.Empty",[])}},Gm=new rl,il=class extends ot{constructor(){super("arrow.flight.protocol.ActionType",[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9}])}},Jm=new il,nl=class extends ot{constructor(){super("arrow.flight.protocol.Criteria",[{no:1,name:"expression",kind:"scalar",T:12}])}},Xm=new nl,sl=class extends ot{constructor(){super("arrow.flight.protocol.Action",[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"body",kind:"scalar",T:12}])}},qm=new sl,ol=class extends ot{constructor(){super("arrow.flight.protocol.CancelFlightInfoRequest",[{no:1,name:"info",kind:"message",T:()=>ua}])}},VA=new ol,al=class extends ot{constructor(){super("arrow.flight.protocol.RenewFlightEndpointRequest",[{no:1,name:"endpoint",kind:"message",T:()=>Rd}])}},RA=new al,cl=class extends ot{constructor(){super("arrow.flight.protocol.Result",[{no:1,name:"body",kind:"scalar",T:12}])}},Km=new cl,ll=class extends ot{constructor(){super("arrow.flight.protocol.CancelFlightInfoResult",[{no:1,name:"status",kind:"enum",T:()=>["arrow.flight.protocol.CancelStatus",Vd,"CANCEL_STATUS_"]}])}},CA=new ll,ul=class extends ot{constructor(){super("arrow.flight.protocol.SchemaResult",[{no:1,name:"schema",kind:"scalar",T:12}])}},Ym=new ul,fl=class extends ot{constructor(){super("arrow.flight.protocol.FlightDescriptor",[{no:1,name:"type",kind:"enum",T:()=>["arrow.flight.protocol.FlightDescriptor.DescriptorType",Md]},{no:2,name:"cmd",kind:"scalar",T:12},{no:3,name:"path",kind:"scalar",repeat:2,T:9}])}},Pi=new fl,dl=class extends ot{constructor(){super("arrow.flight.protocol.FlightInfo",[{no:1,name:"schema",kind:"scalar",T:12},{no:2,name:"flight_descriptor",kind:"message",T:()=>Pi},{no:3,name:"endpoint",kind:"message",repeat:1,T:()=>Rd},{no:4,name:"total_records",kind:"scalar",T:3,L:0},{no:5,name:"total_bytes",kind:"scalar",T:3,L:0},{no:6,name:"ordered",kind:"scalar",T:8},{no:7,name:"app_metadata",kind:"scalar",T:12}])}},ua=new dl,hl=class extends ot{constructor(){super("arrow.flight.protocol.PollInfo",[{no:1,name:"info",kind:"message",T:()=>ua},{no:2,name:"flight_descriptor",kind:"message",T:()=>Pi},{no:3,name:"progress",kind:"scalar",opt:!0,T:1},{no:4,name:"expiration_time",kind:"message",T:()=>Zc}])}},Zm=new hl,pl=class extends ot{constructor(){super("arrow.flight.protocol.FlightEndpoint",[{no:1,name:"ticket",kind:"message",T:()=>fa},{no:2,name:"location",kind:"message",repeat:1,T:()=>Qm},{no:3,name:"expiration_time",kind:"message",T:()=>Zc},{no:4,name:"app_metadata",kind:"scalar",T:12}])}},Rd=new pl,ml=class extends ot{constructor(){super("arrow.flight.protocol.Location",[{no:1,name:"uri",kind:"scalar",T:9}])}},Qm=new ml,yl=class extends ot{constructor(){super("arrow.flight.protocol.Ticket",[{no:1,name:"ticket",kind:"scalar",T:12}])}},fa=new yl,gl=class extends ot{constructor(){super("arrow.flight.protocol.FlightData",[{no:1,name:"flight_descriptor",kind:"message",T:()=>Pi},{no:2,name:"data_header",kind:"scalar",T:12},{no:3,name:"app_metadata",kind:"scalar",T:12},{no:1e3,name:"data_body",kind:"scalar",T:12}])}},la=new gl,bl=class extends ot{constructor(){super("arrow.flight.protocol.PutResult",[{no:1,name:"app_metadata",kind:"scalar",T:12}])}},ty=new bl,da=new qi("arrow.flight.protocol.FlightService",[{name:"Handshake",serverStreaming:!0,clientStreaming:!0,options:{},I:$m,O:Hm},{name:"ListFlights",serverStreaming:!0,options:{},I:Xm,O:ua},{name:"GetFlightInfo",options:{},I:Pi,O:ua},{name:"PollFlightInfo",options:{},I:Pi,O:Zm},{name:"GetSchema",options:{},I:Pi,O:Ym},{name:"DoGet",serverStreaming:!0,options:{},I:fa,O:la},{name:"DoPut",serverStreaming:!0,clientStreaming:!0,options:{},I:la,O:ty},{name:"DoExchange",serverStreaming:!0,clientStreaming:!0,options:{},I:la,O:la},{name:"DoAction",serverStreaming:!0,options:{},I:qm,O:Km},{name:"ListActions",serverStreaming:!0,options:{},I:Gm,O:Jm}]);var ha=class{constructor(t){M(this,"_transport",t);M(this,"typeName",da.typeName);M(this,"methods",da.methods);M(this,"options",da.options)}handshake(t){let e=this.methods[0],i=this._transport.mergeOptions(t);return ee("duplex",this._transport,e,i)}listFlights(t,e){let i=this.methods[1],n=this._transport.mergeOptions(e);return ee("serverStreaming",this._transport,i,n,t)}getFlightInfo(t,e){let i=this.methods[2],n=this._transport.mergeOptions(e);return ee("unary",this._transport,i,n,t)}pollFlightInfo(t,e){let i=this.methods[3],n=this._transport.mergeOptions(e);return ee("unary",this._transport,i,n,t)}getSchema(t,e){let i=this.methods[4],n=this._transport.mergeOptions(e);return ee("unary",this._transport,i,n,t)}doGet(t,e){let i=this.methods[5],n=this._transport.mergeOptions(e);return ee("serverStreaming",this._transport,i,n,t)}doPut(t){let e=this.methods[6],i=this._transport.mergeOptions(t);return ee("duplex",this._transport,e,i)}doExchange(t){let e=this.methods[7],i=this._transport.mergeOptions(t);return ee("duplex",this._transport,e,i)}doAction(t,e){let i=this.methods[8],n=this._transport.mergeOptions(e);return ee("serverStreaming",this._transport,i,n,t)}listActions(t,e){let i=this.methods[9],n=this._transport.mergeOptions(e);return ee("serverStreaming",this._transport,i,n,t)}};var Cd=/\$(\w+)/g;function kd(r){return!!r.match(Cd)}function Pd(r,t){let e=r.match(Cd);if(e)for(let i of e)t[i.trim().replace("$","")]||ai(new Error(`No parameter matching ${i} provided in the query params map`));return!0}var ey="2.4.0",jd=`influxdb3-js/${ey}`;function _l(r,t){if(t==null)return null;let e=r.metadata.get("iox::column::type");if(!e||r.typeId===f.Timestamp)return t;let[,,i,n]=e.split("::");if(i==="field")switch(n){case"integer":return ci(t)?parseInt(t):(console.warn(`Value ${t} is not an integer`),t);case"uinteger":return kl(t)?parseInt(t):(console.warn(`Value ${t} is not an unsigned integer`),t);case"float":return ci(t)?parseFloat(t):(console.warn(`Value ${t} is not a float`),t);case"boolean":return typeof t=="boolean"||console.warn(`Value ${t} is not a boolean`),t;case"string":return typeof t=="string"?String(t):(console.warn(`Value ${t} is not a string`),t);default:return t}return t}var ns=class{constructor(t){M(this,"_options",t);M(this,"_closed",!1);M(this,"_flightClient");M(this,"_transport");M(this,"_defaultHeaders");let{host:e,queryTimeout:i,grpcOptions:n}=this._options;this._defaultHeaders=this._options.headers;let s={};n!==void 0&&(s=n),this._transport=zr.queryTransport({host:e,timeout:i,clientOptions:{...s}}),this._flightClient=new ha(this._transport)}prepareTicket(t,e,i){let n={database:t,sql_query:e,query_type:i.type};if(i.params){let s={};for(let o of Object.keys(i.params))i.params[o]&&(s[o]=i.params[o]);n.params=s}return fa.create({ticket:new TextEncoder().encode(JSON.stringify(n))})}prepareMetadata(t){let e={"User-Agent":jd,...this._defaultHeaders,...t},i=this._options.token;return i&&(e.authorization=`Bearer ${i}`),e}async*_queryRawBatches(t,e,i){var d;if(i.params&&kd(t)&&Pd(t,i.params),this._closed)throw new Error("queryApi: already closed!");let n=this._flightClient,s=this.prepareTicket(e,t,i),a={meta:this.prepareMetadata(i.headers)};a.timeout=(d=i.timeout)!=null?d:this._options.queryTimeout;let c=n.doGet(s,a),l=(async function*(){for await(let p of c.responses)yield Rl(p.dataHeader.length),yield p.dataHeader,yield p.dataBody})();yield*await Wt.from(l)}async*query(t,e,i){let n=this._queryRawBatches(t,e,i);for await(let s of n)for(let o of s){let a={};for(let c of s.schema.fields){let l=o[c.name];a[c.name]=_l(c,l)}yield a}}async*queryPoints(t,e,i){var s;let n=this._queryRawBatches(t,e,i);for await(let o of n)for(let a=0;a<o.numRows;a++){let c=new yr;for(let l=0;l<o.numCols;l++){let u=o.schema.fields[l],d=u.name,p=(s=o.getChildAt(l))==null?void 0:s.get(a),m=u.typeId,b=u.metadata.get("iox::column::type");if(p==null)continue;if((d==="measurement"||d=="iox::measurement")&&typeof p=="string"){c.setMeasurement(p);continue}if(!b){d==="time"&&m===f.Timestamp?c.setTimestamp(p):c.setField(d,p);continue}let[,,z,tt]=b.split("::");if(z==="field"){if(tt&&p!==void 0&&p!==null){let mt=_l(u,p);c.setField(d,mt,tt)}}else z==="tag"?c.setTag(d,p):z==="timestamp"&&c.setTimestamp(p)}yield c}}async close(){var t,e;this._closed=!0,(e=(t=this._transport).close)==null||e.call(t)}};var wl=`Please specify the 'database' as a method parameter or use default configuration at 'ClientOptions.database'
|
|
25
25
|
`,ss=class{constructor(...t){M(this,"_options");M(this,"_writeApi");M(this,"_queryApi");M(this,"_transport");M(this,"_mergeWriteOptions",t=>{var n;let e={...(n=this._options.writeOptions)==null?void 0:n.headers,...t==null?void 0:t.headers},i={...this._options.writeOptions,...t};return i.headers=e,i});M(this,"_mergeQueryOptions",t=>{var s,o;let e={...(s=this._options.queryOptions)==null?void 0:s.headers,...t==null?void 0:t.headers},i={...(o=this._options.queryOptions)==null?void 0:o.params,...t==null?void 0:t.params},n={...this._options.queryOptions,...t};return n.headers=e,n.params=i,n});var s,o,a,c,l,u,d,p;let e;switch(t.length){case 0:{e=_a();break}case 1:{if(t[0]==null)throw new Oe("No configuration specified!");typeof t[0]=="string"?e=ba(t[0]):e=t[0];break}default:throw new Oe("Multiple arguments specified!")}this._options={...ya,...e},this._options.grpcOptions?this._options.queryOptions={...e.queryOptions,grpcOptions:{...this._options.grpcOptions}}:(s=e.queryOptions)!=null&&s.grpcOptions&&(this._options.grpcOptions=(o=e.queryOptions)==null?void 0:o.grpcOptions);let i=this._options.host;if(typeof i!="string")throw new Oe("No host specified!");if(i.endsWith("/")&&(this._options.host=i.substring(0,i.length-1)),typeof this._options.token!="string")throw new Oe("No token specified!");this._queryApi=new ns({...this._options,queryTimeout:(l=(a=this._options.queryOptions)==null?void 0:a.timeout)!=null?l:(c=this._options)==null?void 0:c.queryTimeout});let n=(p=(d=this._options.timeout)!=null?d:(u=this._options.writeOptions)==null?void 0:u.timeout)!=null?p:this._options.writeTimeout;this._transport=zr.writeTransport({...this._options,writeTimeout:n}),this._writeApi=new tn({transport:this._transport,...this._options})}async write(t,e,i,n){var o;let s=this._mergeWriteOptions(n);await this._writeApi.doWrite(Aa(t,s==null?void 0:s.defaultTags,s==null?void 0:s.tagOrder,s==null?void 0:s.precision),(o=e!=null?e:this._options.database)!=null?o:ai(new Error(wl)),i,s)}query(t,e,i=(n=>(n=this._options.queryOptions)!=null?n:as)()){var o;let s=this._mergeQueryOptions(i);return this._queryApi.query(t,(o=e!=null?e:this._options.database)!=null?o:ai(new Error(wl)),s)}queryPoints(t,e,i=(n=>(n=this._options.queryOptions)!=null?n:as)()){var o;let s=this._mergeQueryOptions(i);return this._queryApi.queryPoints(t,(o=e!=null?e:this._options.database)!=null?o:ai(new Error(wl)),s)}async getServerVersion(){let t;try{let e=await this._transport.request("/ping",null,{method:"GET"},(i,n)=>{var s;t=(s=i["X-Influxdb-Version"])!=null?s:i["x-influxdb-version"]});e&&!t&&(t=e.version)}catch(e){return Promise.reject(e)}return Promise.resolve(t)}async close(){await this._writeApi.close(),await this._queryApi.close()}};return Jd(ry);})();
|
|
26
26
|
//# sourceMappingURL=influxdb.js.map
|
package/dist/influxdb.js.gz
CHANGED
|
Binary file
|