@duckdb/duckdb-wasm 1.10.0 → 1.11.1-dev.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/README.md +94 -47
- package/dist/duckdb-browser-blocking.cjs +25 -0
- package/dist/duckdb-browser-blocking.cjs.map +7 -0
- package/dist/duckdb-browser-blocking.d.ts +1 -0
- package/dist/duckdb-browser-blocking.mjs +25 -0
- package/dist/duckdb-browser-blocking.mjs.map +7 -0
- package/dist/duckdb-browser-coi.pthread.worker.js +27 -0
- package/dist/duckdb-browser-coi.pthread.worker.js.map +7 -0
- package/dist/duckdb-browser-coi.worker.js +35 -0
- package/dist/duckdb-browser-coi.worker.js.map +7 -0
- package/dist/duckdb-browser-eh.worker.js +33 -0
- package/dist/duckdb-browser-eh.worker.js.map +7 -0
- package/dist/duckdb-browser-mvp.worker.js +33 -0
- package/dist/duckdb-browser-mvp.worker.js.map +7 -0
- package/dist/duckdb-browser.cjs +2 -0
- package/dist/duckdb-browser.cjs.map +7 -0
- package/dist/duckdb-browser.d.ts +1 -0
- package/dist/duckdb-browser.mjs +2 -0
- package/dist/duckdb-browser.mjs.map +7 -0
- package/dist/{duckdb-next-coi.wasm → duckdb-coi.wasm} +0 -0
- package/dist/{duckdb.wasm → duckdb-eh.wasm} +0 -0
- package/dist/duckdb-mvp.wasm +0 -0
- package/dist/duckdb-node-blocking.cjs +37 -0
- package/dist/duckdb-node-blocking.cjs.map +7 -0
- package/dist/duckdb-node-blocking.d.ts +1 -0
- package/dist/duckdb-node-eh.worker.cjs +37 -0
- package/dist/duckdb-node-eh.worker.cjs.map +7 -0
- package/dist/duckdb-node-mvp.worker.cjs +36 -0
- package/dist/duckdb-node-mvp.worker.cjs.map +7 -0
- package/dist/duckdb-node.cjs +2 -0
- package/dist/duckdb-node.cjs.map +7 -0
- package/dist/duckdb-node.d.ts +1 -0
- package/dist/img/duckdb.svg +6 -0
- package/dist/img/duckdb_version_badge.svg +1 -0
- package/dist/img/duckdb_wasm.svg +14 -0
- package/dist/tests-browser.js +20661 -19449
- package/dist/tests-browser.js.map +4 -4
- package/dist/tests-node.cjs +17258 -0
- package/dist/tests-node.cjs.map +7 -0
- package/dist/types/src/bindings/bindings_base.d.ts +30 -8
- package/dist/types/src/bindings/{bindings_browser_next.d.ts → bindings_browser_coi.d.ts} +0 -0
- package/dist/types/src/bindings/{bindings_browser_next_coi.d.ts → bindings_browser_eh.d.ts} +0 -0
- package/dist/types/src/bindings/{bindings_browser.d.ts → bindings_browser_mvp.d.ts} +0 -0
- package/dist/types/src/bindings/bindings_interface.d.ts +13 -5
- package/dist/types/src/bindings/{bindings_node_next.d.ts → bindings_node_eh.d.ts} +0 -0
- package/dist/types/src/bindings/{bindings_node.d.ts → bindings_node_mvp.d.ts} +0 -0
- package/dist/types/src/bindings/config.d.ts +43 -2
- package/dist/types/src/bindings/connection.d.ts +7 -7
- package/dist/types/src/bindings/index.d.ts +1 -1
- package/dist/types/src/bindings/insert_options.d.ts +3 -3
- package/dist/types/src/bindings/progress.d.ts +9 -0
- package/dist/types/src/bindings/runtime.d.ts +41 -10
- package/dist/types/src/bindings/runtime_browser.d.ts +5 -3
- package/dist/types/src/bindings/runtime_node.d.ts +2 -1
- package/dist/types/src/bindings/udf_function.d.ts +14 -0
- package/dist/types/src/bindings/udf_runtime.d.ts +3 -0
- package/dist/types/src/bindings/web_file.d.ts +11 -0
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/json_typedef.d.ts +17 -0
- package/dist/types/src/log.d.ts +5 -2
- package/dist/types/src/parallel/async_bindings.d.ts +19 -6
- package/dist/types/src/parallel/async_bindings_interface.d.ts +6 -3
- package/dist/types/src/parallel/async_connection.d.ts +4 -6
- package/dist/types/src/parallel/worker_dispatcher.d.ts +2 -1
- package/dist/types/src/parallel/worker_request.d.ts +18 -7
- package/dist/types/src/platform.d.ts +6 -3
- package/dist/types/src/targets/duckdb-browser-blocking.d.ts +12 -0
- package/dist/types/src/targets/{duckdb-browser-async-next-coi.pthread.worker.d.ts → duckdb-browser-coi.pthread.worker.d.ts} +0 -0
- package/dist/types/src/targets/{duckdb-browser-async-next-coi.worker.d.ts → duckdb-browser-coi.worker.d.ts} +0 -0
- package/dist/types/src/targets/{duckdb-browser-async-next.worker.d.ts → duckdb-browser-eh.worker.d.ts} +0 -0
- package/dist/types/src/targets/{duckdb-browser-async.worker.d.ts → duckdb-browser-mvp.worker.d.ts} +0 -0
- package/dist/types/src/targets/duckdb-node-blocking.d.ts +13 -0
- package/dist/types/src/targets/{duckdb-node-async-next.worker.d.ts → duckdb-node-eh.worker.d.ts} +0 -0
- package/dist/types/src/targets/{duckdb-node-async.worker.d.ts → duckdb-node-mvp.worker.d.ts} +0 -0
- package/dist/types/src/targets/duckdb.d.ts +8 -0
- package/dist/types/src/utils/index.d.ts +1 -1
- package/dist/types/src/utils/s3_helper.d.ts +27 -0
- package/dist/types/src/worker.d.ts +1 -0
- package/package.json +108 -44
- package/dist/duckdb-browser-async-next-coi.d.ts +0 -1
- package/dist/duckdb-browser-async-next-coi.pthread.worker.js +0 -4
- package/dist/duckdb-browser-async-next-coi.pthread.worker.js.map +0 -7
- package/dist/duckdb-browser-async-next-coi.worker.js +0 -19
- package/dist/duckdb-browser-async-next-coi.worker.js.map +0 -7
- package/dist/duckdb-browser-async-next.d.ts +0 -1
- package/dist/duckdb-browser-async-next.worker.js +0 -19
- package/dist/duckdb-browser-async-next.worker.js.map +0 -7
- package/dist/duckdb-browser-async.d.ts +0 -1
- package/dist/duckdb-browser-async.js +0 -18
- package/dist/duckdb-browser-async.js.map +0 -7
- package/dist/duckdb-browser-async.worker.js +0 -19
- package/dist/duckdb-browser-async.worker.js.map +0 -7
- package/dist/duckdb-browser-sync-next.d.ts +0 -1
- package/dist/duckdb-browser-sync-next.js +0 -19
- package/dist/duckdb-browser-sync-next.js.map +0 -7
- package/dist/duckdb-browser-sync.d.ts +0 -1
- package/dist/duckdb-browser-sync.js +0 -19
- package/dist/duckdb-browser-sync.js.map +0 -7
- package/dist/duckdb-esm.d.ts +0 -1
- package/dist/duckdb-esm.js +0 -2
- package/dist/duckdb-esm.js.map +0 -7
- package/dist/duckdb-next.wasm +0 -0
- package/dist/duckdb-node-async-next.worker.js +0 -4
- package/dist/duckdb-node-async-next.worker.js.map +0 -7
- package/dist/duckdb-node-async.d.ts +0 -1
- package/dist/duckdb-node-async.js +0 -2
- package/dist/duckdb-node-async.js.map +0 -7
- package/dist/duckdb-node-async.worker.js +0 -3
- package/dist/duckdb-node-async.worker.js.map +0 -7
- package/dist/duckdb-node-sync-next.d.ts +0 -1
- package/dist/duckdb-node-sync-next.js +0 -4
- package/dist/duckdb-node-sync-next.js.map +0 -7
- package/dist/duckdb-node-sync.d.ts +0 -1
- package/dist/duckdb-node-sync.js +0 -3
- package/dist/duckdb-node-sync.js.map +0 -7
- package/dist/tests-node.js +0 -152
- package/dist/tests-node.js.map +0 -7
- package/dist/types/src/bindings/insert.d.ts +0 -7
- package/dist/types/src/flat_arrow.d.ts +0 -14
- package/dist/types/src/targets/duckdb-browser-async.d.ts +0 -4
- package/dist/types/src/targets/duckdb-browser-sync-next.d.ts +0 -6
- package/dist/types/src/targets/duckdb-browser-sync.d.ts +0 -6
- package/dist/types/src/targets/duckdb-esm.d.ts +0 -1
- package/dist/types/src/targets/duckdb-node-async.d.ts +0 -4
- package/dist/types/src/targets/duckdb-node-sync-next.d.ts +0 -6
- package/dist/types/src/targets/duckdb-node-sync.d.ts +0 -6
- package/dist/types/src/utils/ipc_buffer.d.ts +0 -4
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
var duckdb=(()=>{var lS=Object.create;var Ms=Object.defineProperty;var dS=Object.getOwnPropertyDescriptor;var fS=Object.getOwnPropertyNames;var hS=Object.getPrototypeOf,pS=Object.prototype.hasOwnProperty;var sy=r=>Ms(r,"__esModule",{value:!0});var U=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),yS=(r,e)=>{sy(r);for(var t in e)Ms(r,t,{get:e[t],enumerable:!0})},mS=(r,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of fS(e))!pS.call(r,i)&&i!=="default"&&Ms(r,i,{get:()=>e[i],enumerable:!(t=dS(e,i))||t.enumerable});return r},Ps=r=>mS(sy(Ms(r!=null?lS(hS(r)):{},"default",r&&r.__esModule&&"default"in r?{get:()=>r.default,enumerable:!0}:{value:r,enumerable:!0})),r);var Di=U(ay=>{var F={};F.Offset;F.Table;F.SIZEOF_SHORT=2;F.SIZEOF_INT=4;F.FILE_IDENTIFIER_LENGTH=4;F.Encoding={UTF8_BYTES:1,UTF16_STRING:2};F.int32=new Int32Array(2);F.float32=new Float32Array(F.int32.buffer);F.float64=new Float64Array(F.int32.buffer);F.isLittleEndian=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;F.Long=function(r,e){this.low=r|0,this.high=e|0};F.Long.create=function(r,e){return r==0&&e==0?F.Long.ZERO:new F.Long(r,e)};F.Long.prototype.toFloat64=function(){return(this.low>>>0)+this.high*4294967296};F.Long.prototype.equals=function(r){return this.low==r.low&&this.high==r.high};F.Long.ZERO=new F.Long(0,0);F.Builder=function(r){if(r)var e=r;else var e=1024;this.bb=F.ByteBuffer.allocate(e),this.space=e,this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1};F.Builder.prototype.clear=function(){this.bb.clear(),this.space=this.bb.capacity(),this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1};F.Builder.prototype.forceDefaults=function(r){this.force_defaults=r};F.Builder.prototype.dataBuffer=function(){return this.bb};F.Builder.prototype.asUint8Array=function(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())};F.Builder.prototype.prep=function(r,e){r>this.minalign&&(this.minalign=r);for(var t=~(this.bb.capacity()-this.space+e)+1&r-1;this.space<t+r+e;){var i=this.bb.capacity();this.bb=F.Builder.growByteBuffer(this.bb),this.space+=this.bb.capacity()-i}this.pad(t)};F.Builder.prototype.pad=function(r){for(var e=0;e<r;e++)this.bb.writeInt8(--this.space,0)};F.Builder.prototype.writeInt8=function(r){this.bb.writeInt8(this.space-=1,r)};F.Builder.prototype.writeInt16=function(r){this.bb.writeInt16(this.space-=2,r)};F.Builder.prototype.writeInt32=function(r){this.bb.writeInt32(this.space-=4,r)};F.Builder.prototype.writeInt64=function(r){this.bb.writeInt64(this.space-=8,r)};F.Builder.prototype.writeFloat32=function(r){this.bb.writeFloat32(this.space-=4,r)};F.Builder.prototype.writeFloat64=function(r){this.bb.writeFloat64(this.space-=8,r)};F.Builder.prototype.addInt8=function(r){this.prep(1,0),this.writeInt8(r)};F.Builder.prototype.addInt16=function(r){this.prep(2,0),this.writeInt16(r)};F.Builder.prototype.addInt32=function(r){this.prep(4,0),this.writeInt32(r)};F.Builder.prototype.addInt64=function(r){this.prep(8,0),this.writeInt64(r)};F.Builder.prototype.addFloat32=function(r){this.prep(4,0),this.writeFloat32(r)};F.Builder.prototype.addFloat64=function(r){this.prep(8,0),this.writeFloat64(r)};F.Builder.prototype.addFieldInt8=function(r,e,t){(this.force_defaults||e!=t)&&(this.addInt8(e),this.slot(r))};F.Builder.prototype.addFieldInt16=function(r,e,t){(this.force_defaults||e!=t)&&(this.addInt16(e),this.slot(r))};F.Builder.prototype.addFieldInt32=function(r,e,t){(this.force_defaults||e!=t)&&(this.addInt32(e),this.slot(r))};F.Builder.prototype.addFieldInt64=function(r,e,t){(this.force_defaults||!e.equals(t))&&(this.addInt64(e),this.slot(r))};F.Builder.prototype.addFieldFloat32=function(r,e,t){(this.force_defaults||e!=t)&&(this.addFloat32(e),this.slot(r))};F.Builder.prototype.addFieldFloat64=function(r,e,t){(this.force_defaults||e!=t)&&(this.addFloat64(e),this.slot(r))};F.Builder.prototype.addFieldOffset=function(r,e,t){(this.force_defaults||e!=t)&&(this.addOffset(e),this.slot(r))};F.Builder.prototype.addFieldStruct=function(r,e,t){e!=t&&(this.nested(e),this.slot(r))};F.Builder.prototype.nested=function(r){if(r!=this.offset())throw new Error("FlatBuffers: struct must be serialized inline.")};F.Builder.prototype.notNested=function(){if(this.isNested)throw new Error("FlatBuffers: object serialization must not be nested.")};F.Builder.prototype.slot=function(r){this.vtable[r]=this.offset()};F.Builder.prototype.offset=function(){return this.bb.capacity()-this.space};F.Builder.growByteBuffer=function(r){var e=r.capacity();if(e&3221225472)throw new Error("FlatBuffers: cannot grow buffer beyond 2 gigabytes.");var t=e<<1,i=F.ByteBuffer.allocate(t);return i.setPosition(t-e),i.bytes().set(r.bytes(),t-e),i};F.Builder.prototype.addOffset=function(r){this.prep(F.SIZEOF_INT,0),this.writeInt32(this.offset()-r+F.SIZEOF_INT)};F.Builder.prototype.startObject=function(r){this.notNested(),this.vtable==null&&(this.vtable=[]),this.vtable_in_use=r;for(var e=0;e<r;e++)this.vtable[e]=0;this.isNested=!0,this.object_start=this.offset()};F.Builder.prototype.endObject=function(){if(this.vtable==null||!this.isNested)throw new Error("FlatBuffers: endObject called without startObject");this.addInt32(0);for(var r=this.offset(),e=this.vtable_in_use-1;e>=0&&this.vtable[e]==0;e--);for(var t=e+1;e>=0;e--)this.addInt16(this.vtable[e]!=0?r-this.vtable[e]:0);var i=2;this.addInt16(r-this.object_start);var n=(t+i)*F.SIZEOF_SHORT;this.addInt16(n);var a=0,c=this.space;e:for(e=0;e<this.vtables.length;e++){var f=this.bb.capacity()-this.vtables[e];if(n==this.bb.readInt16(f)){for(var j=F.SIZEOF_SHORT;j<n;j+=F.SIZEOF_SHORT)if(this.bb.readInt16(c+j)!=this.bb.readInt16(f+j))continue e;a=this.vtables[e];break}}return a?(this.space=this.bb.capacity()-r,this.bb.writeInt32(this.space,a-r)):(this.vtables.push(this.offset()),this.bb.writeInt32(this.bb.capacity()-r,this.offset()-r)),this.isNested=!1,r};F.Builder.prototype.finish=function(r,e){if(e){var t=e;if(this.prep(this.minalign,F.SIZEOF_INT+F.FILE_IDENTIFIER_LENGTH),t.length!=F.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+F.FILE_IDENTIFIER_LENGTH);for(var i=F.FILE_IDENTIFIER_LENGTH-1;i>=0;i--)this.writeInt8(t.charCodeAt(i))}this.prep(this.minalign,F.SIZEOF_INT),this.addOffset(r),this.bb.setPosition(this.space)};F.Builder.prototype.requiredField=function(r,e){var t=this.bb.capacity()-r,i=t-this.bb.readInt32(t),n=this.bb.readInt16(i+e)!=0;if(!n)throw new Error("FlatBuffers: field "+e+" must be set")};F.Builder.prototype.startVector=function(r,e,t){this.notNested(),this.vector_num_elems=e,this.prep(F.SIZEOF_INT,r*e),this.prep(t,r*e)};F.Builder.prototype.endVector=function(){return this.writeInt32(this.vector_num_elems),this.offset()};F.Builder.prototype.createString=function(r){if(r instanceof Uint8Array)var e=r;else for(var e=[],t=0;t<r.length;){var i,n=r.charCodeAt(t++);if(n<55296||n>=56320)i=n;else{var a=r.charCodeAt(t++);i=(n<<10)+a+(65536-(55296<<10)-56320)}i<128?e.push(i):(i<2048?e.push(i>>6&31|192):(i<65536?e.push(i>>12&15|224):e.push(i>>18&7|240,i>>12&63|128),e.push(i>>6&63|128)),e.push(i&63|128))}this.addInt8(0),this.startVector(1,e.length,1),this.bb.setPosition(this.space-=e.length);for(var t=0,c=this.space,f=this.bb.bytes();t<e.length;t++)f[c++]=e[t];return this.endVector()};F.Builder.prototype.createLong=function(r,e){return F.Long.create(r,e)};F.ByteBuffer=function(r){this.bytes_=r,this.position_=0};F.ByteBuffer.allocate=function(r){return new F.ByteBuffer(new Uint8Array(r))};F.ByteBuffer.prototype.clear=function(){this.position_=0};F.ByteBuffer.prototype.bytes=function(){return this.bytes_};F.ByteBuffer.prototype.position=function(){return this.position_};F.ByteBuffer.prototype.setPosition=function(r){this.position_=r};F.ByteBuffer.prototype.capacity=function(){return this.bytes_.length};F.ByteBuffer.prototype.readInt8=function(r){return this.readUint8(r)<<24>>24};F.ByteBuffer.prototype.readUint8=function(r){return this.bytes_[r]};F.ByteBuffer.prototype.readInt16=function(r){return this.readUint16(r)<<16>>16};F.ByteBuffer.prototype.readUint16=function(r){return this.bytes_[r]|this.bytes_[r+1]<<8};F.ByteBuffer.prototype.readInt32=function(r){return this.bytes_[r]|this.bytes_[r+1]<<8|this.bytes_[r+2]<<16|this.bytes_[r+3]<<24};F.ByteBuffer.prototype.readUint32=function(r){return this.readInt32(r)>>>0};F.ByteBuffer.prototype.readInt64=function(r){return new F.Long(this.readInt32(r),this.readInt32(r+4))};F.ByteBuffer.prototype.readUint64=function(r){return new F.Long(this.readUint32(r),this.readUint32(r+4))};F.ByteBuffer.prototype.readFloat32=function(r){return F.int32[0]=this.readInt32(r),F.float32[0]};F.ByteBuffer.prototype.readFloat64=function(r){return F.int32[F.isLittleEndian?0:1]=this.readInt32(r),F.int32[F.isLittleEndian?1:0]=this.readInt32(r+4),F.float64[0]};F.ByteBuffer.prototype.writeInt8=function(r,e){this.bytes_[r]=e};F.ByteBuffer.prototype.writeUint8=function(r,e){this.bytes_[r]=e};F.ByteBuffer.prototype.writeInt16=function(r,e){this.bytes_[r]=e,this.bytes_[r+1]=e>>8};F.ByteBuffer.prototype.writeUint16=function(r,e){this.bytes_[r]=e,this.bytes_[r+1]=e>>8};F.ByteBuffer.prototype.writeInt32=function(r,e){this.bytes_[r]=e,this.bytes_[r+1]=e>>8,this.bytes_[r+2]=e>>16,this.bytes_[r+3]=e>>24};F.ByteBuffer.prototype.writeUint32=function(r,e){this.bytes_[r]=e,this.bytes_[r+1]=e>>8,this.bytes_[r+2]=e>>16,this.bytes_[r+3]=e>>24};F.ByteBuffer.prototype.writeInt64=function(r,e){this.writeInt32(r,e.low),this.writeInt32(r+4,e.high)};F.ByteBuffer.prototype.writeUint64=function(r,e){this.writeUint32(r,e.low),this.writeUint32(r+4,e.high)};F.ByteBuffer.prototype.writeFloat32=function(r,e){F.float32[0]=e,this.writeInt32(r,F.int32[0])};F.ByteBuffer.prototype.writeFloat64=function(r,e){F.float64[0]=e,this.writeInt32(r,F.int32[F.isLittleEndian?0:1]),this.writeInt32(r+4,F.int32[F.isLittleEndian?1:0])};F.ByteBuffer.prototype.getBufferIdentifier=function(){if(this.bytes_.length<this.position_+F.SIZEOF_INT+F.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: ByteBuffer is too short to contain an identifier.");for(var r="",e=0;e<F.FILE_IDENTIFIER_LENGTH;e++)r+=String.fromCharCode(this.readInt8(this.position_+F.SIZEOF_INT+e));return r};F.ByteBuffer.prototype.__offset=function(r,e){var t=r-this.readInt32(r);return e<this.readInt16(t)?this.readInt16(t+e):0};F.ByteBuffer.prototype.__union=function(r,e){return r.bb_pos=e+this.readInt32(e),r.bb=this,r};F.ByteBuffer.prototype.__string=function(r,e){r+=this.readInt32(r);var t=this.readInt32(r),i="",n=0;if(r+=F.SIZEOF_INT,e===F.Encoding.UTF8_BYTES)return this.bytes_.subarray(r,r+t);for(;n<t;){var a,c=this.readUint8(r+n++);if(c<192)a=c;else{var f=this.readUint8(r+n++);if(c<224)a=(c&31)<<6|f&63;else{var j=this.readUint8(r+n++);if(c<240)a=(c&15)<<12|(f&63)<<6|j&63;else{var s=this.readUint8(r+n++);a=(c&7)<<18|(f&63)<<12|(j&63)<<6|s&63}}}a<65536?i+=String.fromCharCode(a):(a-=65536,i+=String.fromCharCode((a>>10)+55296,(a&(1<<10)-1)+56320))}return i};F.ByteBuffer.prototype.__indirect=function(r){return r+this.readInt32(r)};F.ByteBuffer.prototype.__vector=function(r){return r+this.readInt32(r)+F.SIZEOF_INT};F.ByteBuffer.prototype.__vector_len=function(r){return this.readInt32(r+this.readInt32(r))};F.ByteBuffer.prototype.__has_identifier=function(r){if(r.length!=F.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+F.FILE_IDENTIFIER_LENGTH);for(var e=0;e<F.FILE_IDENTIFIER_LENGTH;e++)if(r.charCodeAt(e)!=this.readInt8(this.position_+F.SIZEOF_INT+e))return!1;return!0};F.ByteBuffer.prototype.createLong=function(r,e){return F.Long.create(r,e)};ay.flatbuffers=F});var oy=U(Zo=>{"use strict";function mr(r,e,t){return e<=r&&r<=t}function Vs(r){if(r===void 0)return{};if(r===Object(r))return r;throw TypeError("Could not convert argument to dictionary")}function _S(r){for(var e=String(r),t=e.length,i=0,n=[];i<t;){var a=e.charCodeAt(i);if(a<55296||a>57343)n.push(a);else if(56320<=a&&a<=57343)n.push(65533);else if(55296<=a&&a<=56319)if(i===t-1)n.push(65533);else{var c=r.charCodeAt(i+1);if(56320<=c&&c<=57343){var f=a&1023,j=c&1023;n.push(65536+(f<<10)+j),i+=1}else n.push(65533)}i+=1}return n}function bS(r){for(var e="",t=0;t<r.length;++t){var i=r[t];i<=65535?e+=String.fromCharCode(i):(i-=65536,e+=String.fromCharCode((i>>10)+55296,(i&1023)+56320))}return e}var Ns=-1;function Ko(r){this.tokens=[].slice.call(r)}Ko.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():Ns},prepend:function(r){if(Array.isArray(r))for(var e=r;e.length;)this.tokens.unshift(e.pop());else this.tokens.unshift(r)},push:function(r){if(Array.isArray(r))for(var e=r;e.length;)this.tokens.push(e.shift());else this.tokens.push(r)}};var Fi=-1;function Qo(r,e){if(r)throw TypeError("Decoder error");return e||65533}var Ls="utf-8";function xs(r,e){if(!(this instanceof xs))return new xs(r,e);if(r=r!==void 0?String(r).toLowerCase():Ls,r!==Ls)throw new Error("Encoding not supported. Only utf-8 is supported");e=Vs(e),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=Boolean(e.fatal),this._ignoreBOM=Boolean(e.ignoreBOM),Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}xs.prototype={decode:function(e,t){var i;typeof e=="object"&&e instanceof ArrayBuffer?i=new Uint8Array(e):typeof e=="object"&&"buffer"in e&&e.buffer instanceof ArrayBuffer?i=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):i=new Uint8Array(0),t=Vs(t),this._streaming||(this._decoder=new gS({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(t.stream);for(var n=new Ko(i),a=[],c;!n.endOfStream()&&(c=this._decoder.handler(n,n.read()),c!==Fi);)c!==null&&(Array.isArray(c)?a.push.apply(a,c):a.push(c));if(!this._streaming){do{if(c=this._decoder.handler(n,n.read()),c===Fi)break;c!==null&&(Array.isArray(c)?a.push.apply(a,c):a.push(c))}while(!n.endOfStream());this._decoder=null}return a.length&&["utf-8"].indexOf(this.encoding)!==-1&&!this._ignoreBOM&&!this._BOMseen&&(a[0]===65279?(this._BOMseen=!0,a.shift()):this._BOMseen=!0),bS(a)}};function qs(r,e){if(!(this instanceof qs))return new qs(r,e);if(r=r!==void 0?String(r).toLowerCase():Ls,r!==Ls)throw new Error("Encoding not supported. Only utf-8 is supported");e=Vs(e),this._streaming=!1,this._encoder=null,this._options={fatal:Boolean(e.fatal)},Object.defineProperty(this,"encoding",{value:"utf-8"})}qs.prototype={encode:function(e,t){e=e?String(e):"",t=Vs(t),this._streaming||(this._encoder=new vS(this._options)),this._streaming=Boolean(t.stream);for(var i=[],n=new Ko(_S(e)),a;!n.endOfStream()&&(a=this._encoder.handler(n,n.read()),a!==Fi);)Array.isArray(a)?i.push.apply(i,a):i.push(a);if(!this._streaming){for(;a=this._encoder.handler(n,n.read()),a!==Fi;)Array.isArray(a)?i.push.apply(i,a):i.push(a);this._encoder=null}return new Uint8Array(i)}};function gS(r){var e=r.fatal,t=0,i=0,n=0,a=128,c=191;this.handler=function(f,j){if(j===Ns&&n!==0)return n=0,Qo(e);if(j===Ns)return Fi;if(n===0){if(mr(j,0,127))return j;if(mr(j,194,223))n=1,t=j-192;else if(mr(j,224,239))j===224&&(a=160),j===237&&(c=159),n=2,t=j-224;else if(mr(j,240,244))j===240&&(a=144),j===244&&(c=143),n=3,t=j-240;else return Qo(e);return t=t<<6*n,null}if(!mr(j,a,c))return t=n=i=0,a=128,c=191,f.prepend(j),Qo(e);if(a=128,c=191,i+=1,t+=j-128<<6*(n-i),i!==n)return null;var s=t;return t=n=i=0,s}}function vS(r){var e=r.fatal;this.handler=function(t,i){if(i===Ns)return Fi;if(mr(i,0,127))return i;var n,a;mr(i,128,2047)?(n=1,a=192):mr(i,2048,65535)?(n=2,a=224):mr(i,65536,1114111)&&(n=3,a=240);for(var c=[(i>>6*n)+a];n>0;){var f=i>>6*(n-1);c.push(128|f&63),n-=1}return c}}Zo.TextEncoder=qs;Zo.TextDecoder=xs});var ci=U(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.encodeUtf8=Ri.decodeUtf8=void 0;var uy=Ne(),cy=oy(),Ws=typeof Buffer=="function"?Buffer:null,ly=typeof TextDecoder=="function"&&typeof TextEncoder=="function";Ri.decodeUtf8=(r=>{if(ly||!Ws){let e=new r("utf-8");return t=>e.decode(t)}return e=>{let{buffer:t,byteOffset:i,length:n}=uy.toUint8Array(e);return Ws.from(t,i,n).toString()}})(typeof TextDecoder!="undefined"?TextDecoder:cy.TextDecoder);Ri.encodeUtf8=(r=>{if(ly||!Ws){let e=new r;return t=>e.encode(t)}return(e="")=>uy.toUint8Array(Ws.from(e,"utf8"))})(typeof TextEncoder!="undefined"?TextEncoder:cy.TextEncoder)});var Ei=U(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.AsyncQueue=yt.ReadableInterop=yt.ArrowJSON=yt.ITERATOR_DONE=void 0;var dy=kn();yt.ITERATOR_DONE=Object.freeze({done:!0,value:void 0});var fy=class{constructor(e){this._json=e}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}};yt.ArrowJSON=fy;var Xo=class{tee(){return this._getDOMStream().tee()}pipe(e,t){return this._getNodeStream().pipe(e,t)}pipeTo(e,t){return this._getDOMStream().pipeTo(e,t)}pipeThrough(e,t){return this._getDOMStream().pipeThrough(e,t)}_getDOMStream(){return this._DOMStream||(this._DOMStream=this.toDOMStream())}_getNodeStream(){return this._nodeStream||(this._nodeStream=this.toNodeStream())}};yt.ReadableInterop=Xo;var hy=class extends Xo{constructor(){super();this._values=[],this.resolvers=[],this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}get closed(){return this._closedPromise}async cancel(e){await this.return(e)}write(e){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(e):this.resolvers.shift().resolve({done:!1,value:e}))}abort(e){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:e}:this.resolvers.shift().reject({done:!0,value:e}))}close(){if(this._closedPromiseResolve){let{resolvers:e}=this;for(;e.length>0;)e.shift().resolve(yt.ITERATOR_DONE);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return dy.default.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return dy.default.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}async throw(e){return await this.abort(e),yt.ITERATOR_DONE}async return(e){return await this.close(),yt.ITERATOR_DONE}async read(e){return(await this.next(e,"read")).value}async peek(e){return(await this.next(e,"peek")).value}next(...e){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise((t,i)=>{this.resolvers.push({resolve:t,reject:i})}):Promise.resolve(yt.ITERATOR_DONE)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error(`${this} is closed`)}};yt.AsyncQueue=hy});var ut=U(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.isReadableNodeStream=z.isWritableNodeStream=z.isReadableDOMStream=z.isWritableDOMStream=z.isFetchResponse=z.isFSReadStream=z.isFileHandle=z.isUnderlyingSink=z.isIteratorResult=z.isArrayLike=z.isArrowJSON=z.isAsyncIterable=z.isIterable=z.isObservable=z.isPromise=z.isObject=z.BigUint64ArrayAvailable=z.BigUint64Array=z.BigInt64ArrayAvailable=z.BigInt64Array=z.BigIntAvailable=z.BigInt=void 0;var zs=Ei(),[wS,jS]=(()=>{let r=()=>{throw new Error("BigInt is not available in this environment")};function e(){throw r()}return e.asIntN=()=>{throw r()},e.asUintN=()=>{throw r()},typeof BigInt!="undefined"?[BigInt,!0]:[e,!1]})();z.BigInt=wS;z.BigIntAvailable=jS;var[TS,BS]=(()=>{let r=()=>{throw new Error("BigInt64Array is not available in this environment")};class e{static get BYTES_PER_ELEMENT(){return 8}static of(){throw r()}static from(){throw r()}constructor(){throw r()}}return typeof BigInt64Array!="undefined"?[BigInt64Array,!0]:[e,!1]})();z.BigInt64Array=TS;z.BigInt64ArrayAvailable=BS;var[IS,SS]=(()=>{let r=()=>{throw new Error("BigUint64Array is not available in this environment")};class e{static get BYTES_PER_ELEMENT(){return 8}static of(){throw r()}static from(){throw r()}constructor(){throw r()}}return typeof BigUint64Array!="undefined"?[BigUint64Array,!0]:[e,!1]})();z.BigUint64Array=IS;z.BigUint64ArrayAvailable=SS;var eu=r=>typeof r=="number",py=r=>typeof r=="boolean",rt=r=>typeof r=="function";z.isObject=r=>r!=null&&Object(r)===r;z.isPromise=r=>z.isObject(r)&&rt(r.then);z.isObservable=r=>z.isObject(r)&&rt(r.subscribe);z.isIterable=r=>z.isObject(r)&&rt(r[Symbol.iterator]);z.isAsyncIterable=r=>z.isObject(r)&&rt(r[Symbol.asyncIterator]);z.isArrowJSON=r=>z.isObject(r)&&z.isObject(r.schema);z.isArrayLike=r=>z.isObject(r)&&eu(r.length);z.isIteratorResult=r=>z.isObject(r)&&"done"in r&&"value"in r;z.isUnderlyingSink=r=>z.isObject(r)&&rt(r.abort)&&rt(r.close)&&rt(r.start)&&rt(r.write);z.isFileHandle=r=>z.isObject(r)&&rt(r.stat)&&eu(r.fd);z.isFSReadStream=r=>z.isReadableNodeStream(r)&&eu(r.bytesRead);z.isFetchResponse=r=>z.isObject(r)&&z.isReadableDOMStream(r.body);z.isWritableDOMStream=r=>z.isObject(r)&&rt(r.abort)&&rt(r.getWriter)&&!(r instanceof zs.ReadableInterop);z.isReadableDOMStream=r=>z.isObject(r)&&rt(r.cancel)&&rt(r.getReader)&&!(r instanceof zs.ReadableInterop);z.isWritableNodeStream=r=>z.isObject(r)&&rt(r.end)&&rt(r.write)&&py(r.writable)&&!(r instanceof zs.ReadableInterop);z.isReadableNodeStream=r=>z.isObject(r)&&rt(r.read)&&rt(r.pipe)&&py(r.readable)&&!(r instanceof zs.ReadableInterop)});var Ne=U(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.compareArrayLike=L.rebaseValueOffsets=L.toUint8ClampedArrayAsyncIterator=L.toFloat64ArrayAsyncIterator=L.toFloat32ArrayAsyncIterator=L.toUint32ArrayAsyncIterator=L.toUint16ArrayAsyncIterator=L.toUint8ArrayAsyncIterator=L.toInt32ArrayAsyncIterator=L.toInt16ArrayAsyncIterator=L.toInt8ArrayAsyncIterator=L.toArrayBufferViewAsyncIterator=L.toUint8ClampedArrayIterator=L.toFloat64ArrayIterator=L.toFloat32ArrayIterator=L.toUint32ArrayIterator=L.toUint16ArrayIterator=L.toUint8ArrayIterator=L.toInt32ArrayIterator=L.toInt16ArrayIterator=L.toInt8ArrayIterator=L.toArrayBufferViewIterator=L.toUint8ClampedArray=L.toFloat64Array=L.toFloat32Array=L.toBigUint64Array=L.toUint32Array=L.toUint16Array=L.toUint8Array=L.toBigInt64Array=L.toInt32Array=L.toInt16Array=L.toInt8Array=L.toArrayBufferView=L.joinUint8Arrays=L.memcpy=void 0;var OS=Di(),AS=ci(),DS=OS.flatbuffers.ByteBuffer,li=ut(),tu=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:ArrayBuffer;function FS(r){let e=r[0]?[r[0]]:[],t,i,n,a;for(let c,f,j=0,s=0,m=r.length;++j<m;){if(c=e[s],f=r[j],!c||!f||c.buffer!==f.buffer||f.byteOffset<c.byteOffset){f&&(e[++s]=f);continue}if({byteOffset:t,byteLength:n}=c,{byteOffset:i,byteLength:a}=f,t+n<i||i+a<t){f&&(e[++s]=f);continue}e[s]=new Uint8Array(c.buffer,t,i-t+a)}return e}function ru(r,e,t=0,i=e.byteLength){let n=r.byteLength,a=new Uint8Array(r.buffer,r.byteOffset,n),c=new Uint8Array(e.buffer,e.byteOffset,Math.min(i,n));return a.set(c,t),r}L.memcpy=ru;function RS(r,e){let t=FS(r),i=t.reduce((m,R)=>m+R.byteLength,0),n,a,c,f=0,j=-1,s=Math.min(e||1/0,i);for(let m=t.length;++j<m;){if(n=t[j],a=n.subarray(0,Math.min(n.length,s-f)),s<=f+a.length){a.length<n.length?t[j]=n.subarray(a.length):a.length===n.length&&j++,c?ru(c,a,f):c=a;break}ru(c||(c=new Uint8Array(s)),a,f),f+=a.length}return[c||new Uint8Array(0),t.slice(j),i-(c?c.byteLength:0)]}L.joinUint8Arrays=RS;function dt(r,e){let t=li.isIteratorResult(e)?e.value:e;return t instanceof r?r===Uint8Array?new r(t.buffer,t.byteOffset,t.byteLength):t:t?(typeof t=="string"&&(t=AS.encodeUtf8(t)),t instanceof ArrayBuffer?new r(t):t instanceof tu?new r(t):t instanceof DS?dt(r,t.bytes()):ArrayBuffer.isView(t)?t.byteLength<=0?new r(0):new r(t.buffer,t.byteOffset,t.byteLength/r.BYTES_PER_ELEMENT):r.from(t)):new r(0)}L.toArrayBufferView=dt;L.toInt8Array=r=>dt(Int8Array,r);L.toInt16Array=r=>dt(Int16Array,r);L.toInt32Array=r=>dt(Int32Array,r);L.toBigInt64Array=r=>dt(li.BigInt64Array,r);L.toUint8Array=r=>dt(Uint8Array,r);L.toUint16Array=r=>dt(Uint16Array,r);L.toUint32Array=r=>dt(Uint32Array,r);L.toBigUint64Array=r=>dt(li.BigUint64Array,r);L.toFloat32Array=r=>dt(Float32Array,r);L.toFloat64Array=r=>dt(Float64Array,r);L.toUint8ClampedArray=r=>dt(Uint8ClampedArray,r);var iu=r=>(r.next(),r);function*Jt(r,e){let t=function*(n){yield n},i=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof tu?t(e):li.isIterable(e)?e:t(e);return yield*iu(function*(n){let a=null;do a=n.next(yield dt(r,a));while(!a.done)}(i[Symbol.iterator]())),new r}L.toArrayBufferViewIterator=Jt;L.toInt8ArrayIterator=r=>Jt(Int8Array,r);L.toInt16ArrayIterator=r=>Jt(Int16Array,r);L.toInt32ArrayIterator=r=>Jt(Int32Array,r);L.toUint8ArrayIterator=r=>Jt(Uint8Array,r);L.toUint16ArrayIterator=r=>Jt(Uint16Array,r);L.toUint32ArrayIterator=r=>Jt(Uint32Array,r);L.toFloat32ArrayIterator=r=>Jt(Float32Array,r);L.toFloat64ArrayIterator=r=>Jt(Float64Array,r);L.toUint8ClampedArrayIterator=r=>Jt(Uint8ClampedArray,r);async function*Vt(r,e){if(li.isPromise(e))return yield*Vt(r,await e);let t=async function*(a){yield await a},i=async function*(a){yield*iu(function*(c){let f=null;do f=c.next(yield f&&f.value);while(!f.done)}(a[Symbol.iterator]()))},n=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof tu?t(e):li.isIterable(e)?i(e):li.isAsyncIterable(e)?e:t(e);return yield*iu(async function*(a){let c=null;do c=await a.next(yield dt(r,c));while(!c.done)}(n[Symbol.asyncIterator]())),new r}L.toArrayBufferViewAsyncIterator=Vt;L.toInt8ArrayAsyncIterator=r=>Vt(Int8Array,r);L.toInt16ArrayAsyncIterator=r=>Vt(Int16Array,r);L.toInt32ArrayAsyncIterator=r=>Vt(Int32Array,r);L.toUint8ArrayAsyncIterator=r=>Vt(Uint8Array,r);L.toUint16ArrayAsyncIterator=r=>Vt(Uint16Array,r);L.toUint32ArrayAsyncIterator=r=>Vt(Uint32Array,r);L.toFloat32ArrayAsyncIterator=r=>Vt(Float32Array,r);L.toFloat64ArrayAsyncIterator=r=>Vt(Float64Array,r);L.toUint8ClampedArrayAsyncIterator=r=>Vt(Uint8ClampedArray,r);function ES(r,e,t){if(r!==0){t=t.slice(0,e+1);for(let i=-1;++i<=e;)t[i]+=r}return t}L.rebaseValueOffsets=ES;function CS(r,e){let t=0,i=r.length;if(i!==e.length)return!1;if(i>0)do if(r[t]!==e[t])return!1;while(++t<i);return!0}L.compareArrayLike=CS});var kn=U(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});var ft=Ne();su.default={fromIterable(r){return Ys(US(r))},fromAsyncIterable(r){return Ys(kS(r))},fromDOMStream(r){return Ys(MS(r))},fromNodeStream(r){return Ys(PS(r))},toDOMStream(r,e){throw new Error('"toDOMStream" not available in this environment')},toNodeStream(r,e){throw new Error('"toNodeStream" not available in this environment')}};var Ys=r=>(r.next(),r);function*US(r){let e,t=!1,i=[],n,a,c,f=0;function j(){return a==="peek"?ft.joinUint8Arrays(i,c)[0]:([n,i,f]=ft.joinUint8Arrays(i,c),n)}({cmd:a,size:c}=yield null);let s=ft.toUint8ArrayIterator(r)[Symbol.iterator]();try{do if({done:e,value:n}=isNaN(c-f)?s.next(void 0):s.next(c-f),!e&&n.byteLength>0&&(i.push(n),f+=n.byteLength),e||c<=f)do({cmd:a,size:c}=yield j());while(c<f);while(!e)}catch(m){(t=!0)&&typeof s.throw=="function"&&s.throw(m)}finally{t===!1&&typeof s.return=="function"&&s.return(null)}return null}async function*kS(r){let e,t=!1,i=[],n,a,c,f=0;function j(){return a==="peek"?ft.joinUint8Arrays(i,c)[0]:([n,i,f]=ft.joinUint8Arrays(i,c),n)}({cmd:a,size:c}=yield null);let s=ft.toUint8ArrayAsyncIterator(r)[Symbol.asyncIterator]();try{do if({done:e,value:n}=isNaN(c-f)?await s.next(void 0):await s.next(c-f),!e&&n.byteLength>0&&(i.push(n),f+=n.byteLength),e||c<=f)do({cmd:a,size:c}=yield j());while(c<f);while(!e)}catch(m){(t=!0)&&typeof s.throw=="function"&&await s.throw(m)}finally{t===!1&&typeof s.return=="function"&&await s.return(new Uint8Array(0))}return null}async function*MS(r){let e=!1,t=!1,i=[],n,a,c,f=0;function j(){return a==="peek"?ft.joinUint8Arrays(i,c)[0]:([n,i,f]=ft.joinUint8Arrays(i,c),n)}({cmd:a,size:c}=yield null);let s=new yy(r);try{do if({done:e,value:n}=isNaN(c-f)?await s.read(void 0):await s.read(c-f),!e&&n.byteLength>0&&(i.push(ft.toUint8Array(n)),f+=n.byteLength),e||c<=f)do({cmd:a,size:c}=yield j());while(c<f);while(!e)}catch(m){(t=!0)&&await s.cancel(m)}finally{t===!1?await s.cancel():r.locked&&s.releaseLock()}return null}var yy=class{constructor(e){this.source=e,this.byobReader=null,this.defaultReader=null;try{this.supportsBYOB=!!(this.reader=this.getBYOBReader())}catch{this.supportsBYOB=!(this.reader=this.getDefaultReader())}}get closed(){return this.reader?this.reader.closed.catch(()=>{}):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=this.byobReader=this.defaultReader=null}async cancel(e){let{reader:t,source:i}=this;t&&await t.cancel(e).catch(()=>{}),i&&i.locked&&this.releaseLock()}async read(e){if(e===0)return{done:this.reader==null,value:new Uint8Array(0)};let t=!this.supportsBYOB||typeof e!="number"?await this.getDefaultReader().read():await this.readFromBYOBReader(e);return!t.done&&(t.value=ft.toUint8Array(t)),t}getDefaultReader(){return this.byobReader&&this.releaseLock(),this.defaultReader||(this.defaultReader=this.source.getReader(),this.defaultReader.closed.catch(()=>{})),this.reader=this.defaultReader}getBYOBReader(){return this.defaultReader&&this.releaseLock(),this.byobReader||(this.byobReader=this.source.getReader({mode:"byob"}),this.byobReader.closed.catch(()=>{})),this.reader=this.byobReader}async readFromBYOBReader(e){return await my(this.getBYOBReader(),new ArrayBuffer(e),0,e)}};async function my(r,e,t,i){if(t>=i)return{done:!1,value:new Uint8Array(e,0,i)};let{done:n,value:a}=await r.read(new Uint8Array(e,t,i-t));return(t+=a.byteLength)<i&&!n?await my(r,a.buffer,t,i):{done:n,value:new Uint8Array(a.buffer,0,t)}}var nu=(r,e)=>{let t=n=>i([e,n]),i;return[e,t,new Promise(n=>(i=n)&&r.once(e,t))]};async function*PS(r){let e=[],t="error",i=!1,n=null,a,c,f=0,j=[],s;function m(){return a==="peek"?ft.joinUint8Arrays(j,c)[0]:([s,j,f]=ft.joinUint8Arrays(j,c),s)}if({cmd:a,size:c}=yield null,r.isTTY)return yield new Uint8Array(0),null;try{e[0]=nu(r,"end"),e[1]=nu(r,"error");do{if(e[2]=nu(r,"readable"),[t,n]=await Promise.race(e.map($=>$[2])),t==="error")break;if((i=t==="end")||(isFinite(c-f)?(s=ft.toUint8Array(r.read(c-f)),s.byteLength<c-f&&(s=ft.toUint8Array(r.read(void 0)))):s=ft.toUint8Array(r.read(void 0)),s.byteLength>0&&(j.push(s),f+=s.byteLength)),i||c<=f)do({cmd:a,size:c}=yield m());while(c<f)}while(!i)}finally{await R(e,t==="error"?n:null)}return null;function R($,ue){return s=j=null,new Promise(async(pt,Ht)=>{for(let[Pt,ce]of $)r.off(Pt,ce);try{let Pt=r.destroy;Pt&&Pt.call(r,ue),ue=void 0}catch(Pt){ue=Pt||ue}finally{ue!=null?Ht(ue):pt()}})}}});var Pe=U(Ci=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});Ci.Vector=Ci.AbstractVector=void 0;var Hs=class{};Ci.AbstractVector=Hs;Ci.Vector=Hs;Hs.prototype.data=null});var Ui=U(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.org=void 0;var _e;(function(r){var e;(function(t){var i;(function(n){var a;(function(c){let f;(function(j){j[j.V1=0]="V1",j[j.V2=1]="V2",j[j.V3=2]="V3",j[j.V4=3]="V4"})(f=c.MetadataVersion||(c.MetadataVersion={}))})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){let f;(function(j){j[j.Sparse=0]="Sparse",j[j.Dense=1]="Dense"})(f=c.UnionMode||(c.UnionMode={}))})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){let f;(function(j){j[j.HALF=0]="HALF",j[j.SINGLE=1]="SINGLE",j[j.DOUBLE=2]="DOUBLE"})(f=c.Precision||(c.Precision={}))})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){let f;(function(j){j[j.DAY=0]="DAY",j[j.MILLISECOND=1]="MILLISECOND"})(f=c.DateUnit||(c.DateUnit={}))})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){let f;(function(j){j[j.SECOND=0]="SECOND",j[j.MILLISECOND=1]="MILLISECOND",j[j.MICROSECOND=2]="MICROSECOND",j[j.NANOSECOND=3]="NANOSECOND"})(f=c.TimeUnit||(c.TimeUnit={}))})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){let f;(function(j){j[j.YEAR_MONTH=0]="YEAR_MONTH",j[j.DAY_TIME=1]="DAY_TIME"})(f=c.IntervalUnit||(c.IntervalUnit={}))})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){let f;(function(j){j[j.NONE=0]="NONE",j[j.Null=1]="Null",j[j.Int=2]="Int",j[j.FloatingPoint=3]="FloatingPoint",j[j.Binary=4]="Binary",j[j.Utf8=5]="Utf8",j[j.Bool=6]="Bool",j[j.Decimal=7]="Decimal",j[j.Date=8]="Date",j[j.Time=9]="Time",j[j.Timestamp=10]="Timestamp",j[j.Interval=11]="Interval",j[j.List=12]="List",j[j.Struct_=13]="Struct_",j[j.Union=14]="Union",j[j.FixedSizeBinary=15]="FixedSizeBinary",j[j.FixedSizeList=16]="FixedSizeList",j[j.Map=17]="Map",j[j.Duration=18]="Duration",j[j.LargeBinary=19]="LargeBinary",j[j.LargeUtf8=20]="LargeUtf8",j[j.LargeList=21]="LargeList"})(f=c.Type||(c.Type={}))})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){let f;(function(j){j[j.Little=0]="Little",j[j.Big=1]="Big"})(f=c.Endianness||(c.Endianness={}))})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsNull(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}static startNull(s){s.startObject(0)}static endNull(s){return s.endObject()}static createNull(s){return f.startNull(s),f.endNull(s)}}c.Null=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsStruct_(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}static startStruct_(s){s.startObject(0)}static endStruct_(s){return s.endObject()}static createStruct_(s){return f.startStruct_(s),f.endStruct_(s)}}c.Struct_=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsList(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}static startList(s){s.startObject(0)}static endList(s){return s.endObject()}static createList(s){return f.startList(s),f.endList(s)}}c.List=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsLargeList(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}static startLargeList(s){s.startObject(0)}static endLargeList(s){return s.endObject()}static createLargeList(s){return f.startLargeList(s),f.endLargeList(s)}}c.LargeList=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsFixedSizeList(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}listSize(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt32(this.bb_pos+s):0}static startFixedSizeList(s){s.startObject(1)}static addListSize(s,m){s.addFieldInt32(0,m,0)}static endFixedSizeList(s){return s.endObject()}static createFixedSizeList(s,m){return f.startFixedSizeList(s),f.addListSize(s,m),f.endFixedSizeList(s)}}c.FixedSizeList=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsMap(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}keysSorted(){let s=this.bb.__offset(this.bb_pos,4);return s?!!this.bb.readInt8(this.bb_pos+s):!1}static startMap(s){s.startObject(1)}static addKeysSorted(s,m){s.addFieldInt8(0,+m,0)}static endMap(s){return s.endObject()}static createMap(s,m){return f.startMap(s),f.addKeysSorted(s,m),f.endMap(s)}}c.Map=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsUnion(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}mode(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt16(this.bb_pos+s):r.apache.arrow.flatbuf.UnionMode.Sparse}typeIds(s){let m=this.bb.__offset(this.bb_pos,6);return m?this.bb.readInt32(this.bb.__vector(this.bb_pos+m)+s*4):0}typeIdsLength(){let s=this.bb.__offset(this.bb_pos,6);return s?this.bb.__vector_len(this.bb_pos+s):0}typeIdsArray(){let s=this.bb.__offset(this.bb_pos,6);return s?new Int32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+s),this.bb.__vector_len(this.bb_pos+s)):null}static startUnion(s){s.startObject(2)}static addMode(s,m){s.addFieldInt16(0,m,r.apache.arrow.flatbuf.UnionMode.Sparse)}static addTypeIds(s,m){s.addFieldOffset(1,m,0)}static createTypeIdsVector(s,m){s.startVector(4,m.length,4);for(let R=m.length-1;R>=0;R--)s.addInt32(m[R]);return s.endVector()}static startTypeIdsVector(s,m){s.startVector(4,m,4)}static endUnion(s){return s.endObject()}static createUnion(s,m,R){return f.startUnion(s),f.addMode(s,m),f.addTypeIds(s,R),f.endUnion(s)}}c.Union=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsInt(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}bitWidth(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt32(this.bb_pos+s):0}isSigned(){let s=this.bb.__offset(this.bb_pos,6);return s?!!this.bb.readInt8(this.bb_pos+s):!1}static startInt(s){s.startObject(2)}static addBitWidth(s,m){s.addFieldInt32(0,m,0)}static addIsSigned(s,m){s.addFieldInt8(1,+m,0)}static endInt(s){return s.endObject()}static createInt(s,m,R){return f.startInt(s),f.addBitWidth(s,m),f.addIsSigned(s,R),f.endInt(s)}}c.Int=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsFloatingPoint(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}precision(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt16(this.bb_pos+s):r.apache.arrow.flatbuf.Precision.HALF}static startFloatingPoint(s){s.startObject(1)}static addPrecision(s,m){s.addFieldInt16(0,m,r.apache.arrow.flatbuf.Precision.HALF)}static endFloatingPoint(s){return s.endObject()}static createFloatingPoint(s,m){return f.startFloatingPoint(s),f.addPrecision(s,m),f.endFloatingPoint(s)}}c.FloatingPoint=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsUtf8(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}static startUtf8(s){s.startObject(0)}static endUtf8(s){return s.endObject()}static createUtf8(s){return f.startUtf8(s),f.endUtf8(s)}}c.Utf8=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsBinary(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}static startBinary(s){s.startObject(0)}static endBinary(s){return s.endObject()}static createBinary(s){return f.startBinary(s),f.endBinary(s)}}c.Binary=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsLargeUtf8(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}static startLargeUtf8(s){s.startObject(0)}static endLargeUtf8(s){return s.endObject()}static createLargeUtf8(s){return f.startLargeUtf8(s),f.endLargeUtf8(s)}}c.LargeUtf8=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsLargeBinary(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}static startLargeBinary(s){s.startObject(0)}static endLargeBinary(s){return s.endObject()}static createLargeBinary(s){return f.startLargeBinary(s),f.endLargeBinary(s)}}c.LargeBinary=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsFixedSizeBinary(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}byteWidth(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt32(this.bb_pos+s):0}static startFixedSizeBinary(s){s.startObject(1)}static addByteWidth(s,m){s.addFieldInt32(0,m,0)}static endFixedSizeBinary(s){return s.endObject()}static createFixedSizeBinary(s,m){return f.startFixedSizeBinary(s),f.addByteWidth(s,m),f.endFixedSizeBinary(s)}}c.FixedSizeBinary=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsBool(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}static startBool(s){s.startObject(0)}static endBool(s){return s.endObject()}static createBool(s){return f.startBool(s),f.endBool(s)}}c.Bool=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsDecimal(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}precision(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt32(this.bb_pos+s):0}scale(){let s=this.bb.__offset(this.bb_pos,6);return s?this.bb.readInt32(this.bb_pos+s):0}static startDecimal(s){s.startObject(2)}static addPrecision(s,m){s.addFieldInt32(0,m,0)}static addScale(s,m){s.addFieldInt32(1,m,0)}static endDecimal(s){return s.endObject()}static createDecimal(s,m,R){return f.startDecimal(s),f.addPrecision(s,m),f.addScale(s,R),f.endDecimal(s)}}c.Decimal=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsDate(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}unit(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt16(this.bb_pos+s):r.apache.arrow.flatbuf.DateUnit.MILLISECOND}static startDate(s){s.startObject(1)}static addUnit(s,m){s.addFieldInt16(0,m,r.apache.arrow.flatbuf.DateUnit.MILLISECOND)}static endDate(s){return s.endObject()}static createDate(s,m){return f.startDate(s),f.addUnit(s,m),f.endDate(s)}}c.Date=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsTime(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}unit(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt16(this.bb_pos+s):r.apache.arrow.flatbuf.TimeUnit.MILLISECOND}bitWidth(){let s=this.bb.__offset(this.bb_pos,6);return s?this.bb.readInt32(this.bb_pos+s):32}static startTime(s){s.startObject(2)}static addUnit(s,m){s.addFieldInt16(0,m,r.apache.arrow.flatbuf.TimeUnit.MILLISECOND)}static addBitWidth(s,m){s.addFieldInt32(1,m,32)}static endTime(s){return s.endObject()}static createTime(s,m,R){return f.startTime(s),f.addUnit(s,m),f.addBitWidth(s,R),f.endTime(s)}}c.Time=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsTimestamp(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}unit(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt16(this.bb_pos+s):r.apache.arrow.flatbuf.TimeUnit.SECOND}timezone(s){let m=this.bb.__offset(this.bb_pos,6);return m?this.bb.__string(this.bb_pos+m,s):null}static startTimestamp(s){s.startObject(2)}static addUnit(s,m){s.addFieldInt16(0,m,r.apache.arrow.flatbuf.TimeUnit.SECOND)}static addTimezone(s,m){s.addFieldOffset(1,m,0)}static endTimestamp(s){return s.endObject()}static createTimestamp(s,m,R){return f.startTimestamp(s),f.addUnit(s,m),f.addTimezone(s,R),f.endTimestamp(s)}}c.Timestamp=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsInterval(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}unit(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt16(this.bb_pos+s):r.apache.arrow.flatbuf.IntervalUnit.YEAR_MONTH}static startInterval(s){s.startObject(1)}static addUnit(s,m){s.addFieldInt16(0,m,r.apache.arrow.flatbuf.IntervalUnit.YEAR_MONTH)}static endInterval(s){return s.endObject()}static createInterval(s,m){return f.startInterval(s),f.addUnit(s,m),f.endInterval(s)}}c.Interval=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsDuration(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}unit(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt16(this.bb_pos+s):r.apache.arrow.flatbuf.TimeUnit.MILLISECOND}static startDuration(s){s.startObject(1)}static addUnit(s,m){s.addFieldInt16(0,m,r.apache.arrow.flatbuf.TimeUnit.MILLISECOND)}static endDuration(s){return s.endObject()}static createDuration(s,m){return f.startDuration(s),f.addUnit(s,m),f.endDuration(s)}}c.Duration=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsKeyValue(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}key(s){let m=this.bb.__offset(this.bb_pos,4);return m?this.bb.__string(this.bb_pos+m,s):null}value(s){let m=this.bb.__offset(this.bb_pos,6);return m?this.bb.__string(this.bb_pos+m,s):null}static startKeyValue(s){s.startObject(2)}static addKey(s,m){s.addFieldOffset(0,m,0)}static addValue(s,m){s.addFieldOffset(1,m,0)}static endKeyValue(s){return s.endObject()}static createKeyValue(s,m,R){return f.startKeyValue(s),f.addKey(s,m),f.addValue(s,R),f.endKeyValue(s)}}c.KeyValue=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsDictionaryEncoding(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}id(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt64(this.bb_pos+s):this.bb.createLong(0,0)}indexType(s){let m=this.bb.__offset(this.bb_pos,6);return m?(s||new r.apache.arrow.flatbuf.Int).__init(this.bb.__indirect(this.bb_pos+m),this.bb):null}isOrdered(){let s=this.bb.__offset(this.bb_pos,8);return s?!!this.bb.readInt8(this.bb_pos+s):!1}static startDictionaryEncoding(s){s.startObject(3)}static addId(s,m){s.addFieldInt64(0,m,s.createLong(0,0))}static addIndexType(s,m){s.addFieldOffset(1,m,0)}static addIsOrdered(s,m){s.addFieldInt8(2,+m,0)}static endDictionaryEncoding(s){return s.endObject()}static createDictionaryEncoding(s,m,R,$){return f.startDictionaryEncoding(s),f.addId(s,m),f.addIndexType(s,R),f.addIsOrdered(s,$),f.endDictionaryEncoding(s)}}c.DictionaryEncoding=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsField(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}name(s){let m=this.bb.__offset(this.bb_pos,4);return m?this.bb.__string(this.bb_pos+m,s):null}nullable(){let s=this.bb.__offset(this.bb_pos,6);return s?!!this.bb.readInt8(this.bb_pos+s):!1}typeType(){let s=this.bb.__offset(this.bb_pos,8);return s?this.bb.readUint8(this.bb_pos+s):r.apache.arrow.flatbuf.Type.NONE}type(s){let m=this.bb.__offset(this.bb_pos,10);return m?this.bb.__union(s,this.bb_pos+m):null}dictionary(s){let m=this.bb.__offset(this.bb_pos,12);return m?(s||new r.apache.arrow.flatbuf.DictionaryEncoding).__init(this.bb.__indirect(this.bb_pos+m),this.bb):null}children(s,m){let R=this.bb.__offset(this.bb_pos,14);return R?(m||new r.apache.arrow.flatbuf.Field).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+R)+s*4),this.bb):null}childrenLength(){let s=this.bb.__offset(this.bb_pos,14);return s?this.bb.__vector_len(this.bb_pos+s):0}customMetadata(s,m){let R=this.bb.__offset(this.bb_pos,16);return R?(m||new r.apache.arrow.flatbuf.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+R)+s*4),this.bb):null}customMetadataLength(){let s=this.bb.__offset(this.bb_pos,16);return s?this.bb.__vector_len(this.bb_pos+s):0}static startField(s){s.startObject(7)}static addName(s,m){s.addFieldOffset(0,m,0)}static addNullable(s,m){s.addFieldInt8(1,+m,0)}static addTypeType(s,m){s.addFieldInt8(2,m,r.apache.arrow.flatbuf.Type.NONE)}static addType(s,m){s.addFieldOffset(3,m,0)}static addDictionary(s,m){s.addFieldOffset(4,m,0)}static addChildren(s,m){s.addFieldOffset(5,m,0)}static createChildrenVector(s,m){s.startVector(4,m.length,4);for(let R=m.length-1;R>=0;R--)s.addOffset(m[R]);return s.endVector()}static startChildrenVector(s,m){s.startVector(4,m,4)}static addCustomMetadata(s,m){s.addFieldOffset(6,m,0)}static createCustomMetadataVector(s,m){s.startVector(4,m.length,4);for(let R=m.length-1;R>=0;R--)s.addOffset(m[R]);return s.endVector()}static startCustomMetadataVector(s,m){s.startVector(4,m,4)}static endField(s){return s.endObject()}static createField(s,m,R,$,ue,pt,Ht,Pt){return f.startField(s),f.addName(s,m),f.addNullable(s,R),f.addTypeType(s,$),f.addType(s,ue),f.addDictionary(s,pt),f.addChildren(s,Ht),f.addCustomMetadata(s,Pt),f.endField(s)}}c.Field=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}offset(){return this.bb.readInt64(this.bb_pos)}length(){return this.bb.readInt64(this.bb_pos+8)}static createBuffer(s,m,R){return s.prep(8,16),s.writeInt64(R),s.writeInt64(m),s.offset()}}c.Buffer=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsSchema(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}endianness(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt16(this.bb_pos+s):r.apache.arrow.flatbuf.Endianness.Little}fields(s,m){let R=this.bb.__offset(this.bb_pos,6);return R?(m||new r.apache.arrow.flatbuf.Field).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+R)+s*4),this.bb):null}fieldsLength(){let s=this.bb.__offset(this.bb_pos,6);return s?this.bb.__vector_len(this.bb_pos+s):0}customMetadata(s,m){let R=this.bb.__offset(this.bb_pos,8);return R?(m||new r.apache.arrow.flatbuf.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+R)+s*4),this.bb):null}customMetadataLength(){let s=this.bb.__offset(this.bb_pos,8);return s?this.bb.__vector_len(this.bb_pos+s):0}static startSchema(s){s.startObject(3)}static addEndianness(s,m){s.addFieldInt16(0,m,r.apache.arrow.flatbuf.Endianness.Little)}static addFields(s,m){s.addFieldOffset(1,m,0)}static createFieldsVector(s,m){s.startVector(4,m.length,4);for(let R=m.length-1;R>=0;R--)s.addOffset(m[R]);return s.endVector()}static startFieldsVector(s,m){s.startVector(4,m,4)}static addCustomMetadata(s,m){s.addFieldOffset(2,m,0)}static createCustomMetadataVector(s,m){s.startVector(4,m.length,4);for(let R=m.length-1;R>=0;R--)s.addOffset(m[R]);return s.endVector()}static startCustomMetadataVector(s,m){s.startVector(4,m,4)}static endSchema(s){return s.endObject()}static finishSchemaBuffer(s,m){s.finish(m)}static createSchema(s,m,R,$){return f.startSchema(s),f.addEndianness(s,m),f.addFields(s,R),f.addCustomMetadata(s,$),f.endSchema(s)}}c.Schema=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(_e=x.org||(x.org={}))});var au=U(ht=>{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.org=void 0;var Mn=Ui(),ki;(function(r){var e;(function(t){var i;(function(n){var a;(function(c){c.Schema=Mn.org.apache.arrow.flatbuf.Schema})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ki=ht.org||(ht.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){let f;(function(j){j[j.NONE=0]="NONE",j[j.Schema=1]="Schema",j[j.DictionaryBatch=2]="DictionaryBatch",j[j.RecordBatch=3]="RecordBatch",j[j.Tensor=4]="Tensor",j[j.SparseTensor=5]="SparseTensor"})(f=c.MessageHeader||(c.MessageHeader={}))})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ki=ht.org||(ht.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}length(){return this.bb.readInt64(this.bb_pos)}nullCount(){return this.bb.readInt64(this.bb_pos+8)}static createFieldNode(s,m,R){return s.prep(8,16),s.writeInt64(R),s.writeInt64(m),s.offset()}}c.FieldNode=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ki=ht.org||(ht.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsRecordBatch(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}length(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt64(this.bb_pos+s):this.bb.createLong(0,0)}nodes(s,m){let R=this.bb.__offset(this.bb_pos,6);return R?(m||new r.apache.arrow.flatbuf.FieldNode).__init(this.bb.__vector(this.bb_pos+R)+s*16,this.bb):null}nodesLength(){let s=this.bb.__offset(this.bb_pos,6);return s?this.bb.__vector_len(this.bb_pos+s):0}buffers(s,m){let R=this.bb.__offset(this.bb_pos,8);return R?(m||new Mn.org.apache.arrow.flatbuf.Buffer).__init(this.bb.__vector(this.bb_pos+R)+s*16,this.bb):null}buffersLength(){let s=this.bb.__offset(this.bb_pos,8);return s?this.bb.__vector_len(this.bb_pos+s):0}static startRecordBatch(s){s.startObject(3)}static addLength(s,m){s.addFieldInt64(0,m,s.createLong(0,0))}static addNodes(s,m){s.addFieldOffset(1,m,0)}static startNodesVector(s,m){s.startVector(16,m,8)}static addBuffers(s,m){s.addFieldOffset(2,m,0)}static startBuffersVector(s,m){s.startVector(16,m,8)}static endRecordBatch(s){return s.endObject()}static createRecordBatch(s,m,R,$){return f.startRecordBatch(s),f.addLength(s,m),f.addNodes(s,R),f.addBuffers(s,$),f.endRecordBatch(s)}}c.RecordBatch=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ki=ht.org||(ht.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsDictionaryBatch(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}id(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt64(this.bb_pos+s):this.bb.createLong(0,0)}data(s){let m=this.bb.__offset(this.bb_pos,6);return m?(s||new r.apache.arrow.flatbuf.RecordBatch).__init(this.bb.__indirect(this.bb_pos+m),this.bb):null}isDelta(){let s=this.bb.__offset(this.bb_pos,8);return s?!!this.bb.readInt8(this.bb_pos+s):!1}static startDictionaryBatch(s){s.startObject(3)}static addId(s,m){s.addFieldInt64(0,m,s.createLong(0,0))}static addData(s,m){s.addFieldOffset(1,m,0)}static addIsDelta(s,m){s.addFieldInt8(2,+m,0)}static endDictionaryBatch(s){return s.endObject()}static createDictionaryBatch(s,m,R,$){return f.startDictionaryBatch(s),f.addId(s,m),f.addData(s,R),f.addIsDelta(s,$),f.endDictionaryBatch(s)}}c.DictionaryBatch=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ki=ht.org||(ht.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsMessage(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}version(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt16(this.bb_pos+s):Mn.org.apache.arrow.flatbuf.MetadataVersion.V1}headerType(){let s=this.bb.__offset(this.bb_pos,6);return s?this.bb.readUint8(this.bb_pos+s):r.apache.arrow.flatbuf.MessageHeader.NONE}header(s){let m=this.bb.__offset(this.bb_pos,8);return m?this.bb.__union(s,this.bb_pos+m):null}bodyLength(){let s=this.bb.__offset(this.bb_pos,10);return s?this.bb.readInt64(this.bb_pos+s):this.bb.createLong(0,0)}customMetadata(s,m){let R=this.bb.__offset(this.bb_pos,12);return R?(m||new Mn.org.apache.arrow.flatbuf.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+R)+s*4),this.bb):null}customMetadataLength(){let s=this.bb.__offset(this.bb_pos,12);return s?this.bb.__vector_len(this.bb_pos+s):0}static startMessage(s){s.startObject(5)}static addVersion(s,m){s.addFieldInt16(0,m,Mn.org.apache.arrow.flatbuf.MetadataVersion.V1)}static addHeaderType(s,m){s.addFieldInt8(1,m,r.apache.arrow.flatbuf.MessageHeader.NONE)}static addHeader(s,m){s.addFieldOffset(2,m,0)}static addBodyLength(s,m){s.addFieldInt64(3,m,s.createLong(0,0))}static addCustomMetadata(s,m){s.addFieldOffset(4,m,0)}static createCustomMetadataVector(s,m){s.startVector(4,m.length,4);for(let R=m.length-1;R>=0;R--)s.addOffset(m[R]);return s.endVector()}static startCustomMetadataVector(s,m){s.startVector(4,m,4)}static endMessage(s){return s.endObject()}static finishMessageBuffer(s,m){s.finish(m)}static createMessage(s,m,R,$,ue,pt){return f.startMessage(s),f.addVersion(s,m),f.addHeaderType(s,R),f.addHeader(s,$),f.addBodyLength(s,ue),f.addCustomMetadata(s,pt),f.endMessage(s)}}c.Message=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ki=ht.org||(ht.org={}))});var Ie=U(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.BufferType=Oe.Type=Oe.MetadataVersion=Oe.MessageHeader=Oe.IntervalUnit=Oe.UnionMode=Oe.Precision=Oe.TimeUnit=Oe.DateUnit=Oe.ArrowType=void 0;var di=Ui(),VS=au();Oe.ArrowType=di.org.apache.arrow.flatbuf.Type;Oe.DateUnit=di.org.apache.arrow.flatbuf.DateUnit;Oe.TimeUnit=di.org.apache.arrow.flatbuf.TimeUnit;Oe.Precision=di.org.apache.arrow.flatbuf.Precision;Oe.UnionMode=di.org.apache.arrow.flatbuf.UnionMode;Oe.IntervalUnit=di.org.apache.arrow.flatbuf.IntervalUnit;Oe.MessageHeader=VS.org.apache.arrow.flatbuf.MessageHeader;Oe.MetadataVersion=di.org.apache.arrow.flatbuf.MetadataVersion;var NS;(function(r){r[r.NONE=0]="NONE",r[r.Null=1]="Null",r[r.Int=2]="Int",r[r.Float=3]="Float",r[r.Binary=4]="Binary",r[r.Utf8=5]="Utf8",r[r.Bool=6]="Bool",r[r.Decimal=7]="Decimal",r[r.Date=8]="Date",r[r.Time=9]="Time",r[r.Timestamp=10]="Timestamp",r[r.Interval=11]="Interval",r[r.List=12]="List",r[r.Struct=13]="Struct",r[r.Union=14]="Union",r[r.FixedSizeBinary=15]="FixedSizeBinary",r[r.FixedSizeList=16]="FixedSizeList",r[r.Map=17]="Map",r[r.Dictionary=-1]="Dictionary",r[r.Int8=-2]="Int8",r[r.Int16=-3]="Int16",r[r.Int32=-4]="Int32",r[r.Int64=-5]="Int64",r[r.Uint8=-6]="Uint8",r[r.Uint16=-7]="Uint16",r[r.Uint32=-8]="Uint32",r[r.Uint64=-9]="Uint64",r[r.Float16=-10]="Float16",r[r.Float32=-11]="Float32",r[r.Float64=-12]="Float64",r[r.DateDay=-13]="DateDay",r[r.DateMillisecond=-14]="DateMillisecond",r[r.TimestampSecond=-15]="TimestampSecond",r[r.TimestampMillisecond=-16]="TimestampMillisecond",r[r.TimestampMicrosecond=-17]="TimestampMicrosecond",r[r.TimestampNanosecond=-18]="TimestampNanosecond",r[r.TimeSecond=-19]="TimeSecond",r[r.TimeMillisecond=-20]="TimeMillisecond",r[r.TimeMicrosecond=-21]="TimeMicrosecond",r[r.TimeNanosecond=-22]="TimeNanosecond",r[r.DenseUnion=-23]="DenseUnion",r[r.SparseUnion=-24]="SparseUnion",r[r.IntervalDayTime=-25]="IntervalDayTime",r[r.IntervalYearMonth=-26]="IntervalYearMonth"})(NS=Oe.Type||(Oe.Type={}));var LS;(function(r){r[r.OFFSET=0]="OFFSET",r[r.DATA=1]="DATA",r[r.VALIDITY=2]="VALIDITY",r[r.TYPE=3]="TYPE"})(LS=Oe.BufferType||(Oe.BufferType={}))});var Kt=U(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.popcnt_uint32=Le.popcnt_array=Le.popcnt_bit_range=Le.iterateBits=Le.packBools=Le.truncateBitmap=Le.setBool=Le.getBit=Le.getBool=void 0;function _y(r,e,t,i){return(t&1<<i)!=0}Le.getBool=_y;function by(r,e,t,i){return(t&1<<i)>>i}Le.getBit=by;function xS(r,e,t){return t?!!(r[e>>3]|=1<<e%8)||!0:!(r[e>>3]&=~(1<<e%8))&&!1}Le.setBool=xS;function qS(r,e,t){let i=t.byteLength+7&~7;if(r>0||t.byteLength<i){let n=new Uint8Array(i);return n.set(r%8==0?t.subarray(r>>3):gy(ou(t,r,e,null,_y)).subarray(0,i)),n}return t}Le.truncateBitmap=qS;function gy(r){let e=[],t=0,i=0,n=0;for(let c of r)c&&(n|=1<<i),++i==8&&(e[t++]=n,n=i=0);(t===0||i>0)&&(e[t++]=n);let a=new Uint8Array(e.length+7&~7);return a.set(e),a}Le.packBools=gy;function*ou(r,e,t,i,n){let a=e%8,c=e>>3,f=0,j=t;for(;j>0;a=0){let s=r[c++];do yield n(i,f++,s,a);while(--j>0&&++a<8)}}Le.iterateBits=ou;function uu(r,e,t){if(t-e<=0)return 0;if(t-e<8){let a=0;for(let c of ou(r,e,t-e,r,by))a+=c;return a}let i=t>>3<<3,n=e+(e%8==0?0:8-e%8);return uu(r,e,n)+uu(r,i,t)+vy(r,n>>3,i-n>>3)}Le.popcnt_bit_range=uu;function vy(r,e,t){let i=0,n=e|0,a=new DataView(r.buffer,r.byteOffset,r.byteLength),c=t===void 0?r.byteLength:n+t;for(;c-n>=4;)i+=Gs(a.getUint32(n)),n+=4;for(;c-n>=2;)i+=Gs(a.getUint16(n)),n+=2;for(;c-n>=1;)i+=Gs(a.getUint8(n)),n+=1;return i}Le.popcnt_array=vy;function Gs(r){let e=r|0;return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24}Le.popcnt_uint32=Gs});var it=U($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});$s.Visitor=void 0;var WS=Nt(),zS=Pe(),E=Ie(),YS=ve(),Te=class{visitMany(e,...t){return e.map((i,n)=>this.visit(i,...t.map(a=>a[n])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,t=!0){return HS(this,e,t)}visitNull(e,...t){return null}visitBool(e,...t){return null}visitInt(e,...t){return null}visitFloat(e,...t){return null}visitUtf8(e,...t){return null}visitBinary(e,...t){return null}visitFixedSizeBinary(e,...t){return null}visitDate(e,...t){return null}visitTimestamp(e,...t){return null}visitTime(e,...t){return null}visitDecimal(e,...t){return null}visitList(e,...t){return null}visitStruct(e,...t){return null}visitUnion(e,...t){return null}visitDictionary(e,...t){return null}visitInterval(e,...t){return null}visitFixedSizeList(e,...t){return null}visitMap(e,...t){return null}};$s.Visitor=Te;function HS(r,e,t=!0){let i=null,n=E.Type.NONE;switch(e instanceof WS.Data||e instanceof zS.Vector?n=cu(e.type):e instanceof YS.DataType?n=cu(e):typeof(n=e)!="number"&&(n=E.Type[e]),n){case E.Type.Null:i=r.visitNull;break;case E.Type.Bool:i=r.visitBool;break;case E.Type.Int:i=r.visitInt;break;case E.Type.Int8:i=r.visitInt8||r.visitInt;break;case E.Type.Int16:i=r.visitInt16||r.visitInt;break;case E.Type.Int32:i=r.visitInt32||r.visitInt;break;case E.Type.Int64:i=r.visitInt64||r.visitInt;break;case E.Type.Uint8:i=r.visitUint8||r.visitInt;break;case E.Type.Uint16:i=r.visitUint16||r.visitInt;break;case E.Type.Uint32:i=r.visitUint32||r.visitInt;break;case E.Type.Uint64:i=r.visitUint64||r.visitInt;break;case E.Type.Float:i=r.visitFloat;break;case E.Type.Float16:i=r.visitFloat16||r.visitFloat;break;case E.Type.Float32:i=r.visitFloat32||r.visitFloat;break;case E.Type.Float64:i=r.visitFloat64||r.visitFloat;break;case E.Type.Utf8:i=r.visitUtf8;break;case E.Type.Binary:i=r.visitBinary;break;case E.Type.FixedSizeBinary:i=r.visitFixedSizeBinary;break;case E.Type.Date:i=r.visitDate;break;case E.Type.DateDay:i=r.visitDateDay||r.visitDate;break;case E.Type.DateMillisecond:i=r.visitDateMillisecond||r.visitDate;break;case E.Type.Timestamp:i=r.visitTimestamp;break;case E.Type.TimestampSecond:i=r.visitTimestampSecond||r.visitTimestamp;break;case E.Type.TimestampMillisecond:i=r.visitTimestampMillisecond||r.visitTimestamp;break;case E.Type.TimestampMicrosecond:i=r.visitTimestampMicrosecond||r.visitTimestamp;break;case E.Type.TimestampNanosecond:i=r.visitTimestampNanosecond||r.visitTimestamp;break;case E.Type.Time:i=r.visitTime;break;case E.Type.TimeSecond:i=r.visitTimeSecond||r.visitTime;break;case E.Type.TimeMillisecond:i=r.visitTimeMillisecond||r.visitTime;break;case E.Type.TimeMicrosecond:i=r.visitTimeMicrosecond||r.visitTime;break;case E.Type.TimeNanosecond:i=r.visitTimeNanosecond||r.visitTime;break;case E.Type.Decimal:i=r.visitDecimal;break;case E.Type.List:i=r.visitList;break;case E.Type.Struct:i=r.visitStruct;break;case E.Type.Union:i=r.visitUnion;break;case E.Type.DenseUnion:i=r.visitDenseUnion||r.visitUnion;break;case E.Type.SparseUnion:i=r.visitSparseUnion||r.visitUnion;break;case E.Type.Dictionary:i=r.visitDictionary;break;case E.Type.Interval:i=r.visitInterval;break;case E.Type.IntervalDayTime:i=r.visitIntervalDayTime||r.visitInterval;break;case E.Type.IntervalYearMonth:i=r.visitIntervalYearMonth||r.visitInterval;break;case E.Type.FixedSizeList:i=r.visitFixedSizeList;break;case E.Type.Map:i=r.visitMap;break}if(typeof i=="function")return i;if(!t)return()=>null;throw new Error(`Unrecognized type '${E.Type[n]}'`)}function cu(r){switch(r.typeId){case E.Type.Null:return E.Type.Null;case E.Type.Int:let{bitWidth:e,isSigned:t}=r;switch(e){case 8:return t?E.Type.Int8:E.Type.Uint8;case 16:return t?E.Type.Int16:E.Type.Uint16;case 32:return t?E.Type.Int32:E.Type.Uint32;case 64:return t?E.Type.Int64:E.Type.Uint64}return E.Type.Int;case E.Type.Float:switch(r.precision){case E.Precision.HALF:return E.Type.Float16;case E.Precision.SINGLE:return E.Type.Float32;case E.Precision.DOUBLE:return E.Type.Float64}return E.Type.Float;case E.Type.Binary:return E.Type.Binary;case E.Type.Utf8:return E.Type.Utf8;case E.Type.Bool:return E.Type.Bool;case E.Type.Decimal:return E.Type.Decimal;case E.Type.Time:switch(r.unit){case E.TimeUnit.SECOND:return E.Type.TimeSecond;case E.TimeUnit.MILLISECOND:return E.Type.TimeMillisecond;case E.TimeUnit.MICROSECOND:return E.Type.TimeMicrosecond;case E.TimeUnit.NANOSECOND:return E.Type.TimeNanosecond}return E.Type.Time;case E.Type.Timestamp:switch(r.unit){case E.TimeUnit.SECOND:return E.Type.TimestampSecond;case E.TimeUnit.MILLISECOND:return E.Type.TimestampMillisecond;case E.TimeUnit.MICROSECOND:return E.Type.TimestampMicrosecond;case E.TimeUnit.NANOSECOND:return E.Type.TimestampNanosecond}return E.Type.Timestamp;case E.Type.Date:switch(r.unit){case E.DateUnit.DAY:return E.Type.DateDay;case E.DateUnit.MILLISECOND:return E.Type.DateMillisecond}return E.Type.Date;case E.Type.Interval:switch(r.unit){case E.IntervalUnit.DAY_TIME:return E.Type.IntervalDayTime;case E.IntervalUnit.YEAR_MONTH:return E.Type.IntervalYearMonth}return E.Type.Interval;case E.Type.Map:return E.Type.Map;case E.Type.List:return E.Type.List;case E.Type.Struct:return E.Type.Struct;case E.Type.Union:switch(r.mode){case E.UnionMode.Dense:return E.Type.DenseUnion;case E.UnionMode.Sparse:return E.Type.SparseUnion}return E.Type.Union;case E.Type.FixedSizeBinary:return E.Type.FixedSizeBinary;case E.Type.FixedSizeList:return E.Type.FixedSizeList;case E.Type.Dictionary:return E.Type.Dictionary}throw new Error(`Unrecognized type '${E.Type[r.typeId]}'`)}Te.prototype.visitInt8=null;Te.prototype.visitInt16=null;Te.prototype.visitInt32=null;Te.prototype.visitInt64=null;Te.prototype.visitUint8=null;Te.prototype.visitUint16=null;Te.prototype.visitUint32=null;Te.prototype.visitUint64=null;Te.prototype.visitFloat16=null;Te.prototype.visitFloat32=null;Te.prototype.visitFloat64=null;Te.prototype.visitDateDay=null;Te.prototype.visitDateMillisecond=null;Te.prototype.visitTimestampSecond=null;Te.prototype.visitTimestampMillisecond=null;Te.prototype.visitTimestampMicrosecond=null;Te.prototype.visitTimestampNanosecond=null;Te.prototype.visitTimeSecond=null;Te.prototype.visitTimeMillisecond=null;Te.prototype.visitTimeMicrosecond=null;Te.prototype.visitTimeNanosecond=null;Te.prototype.visitDenseUnion=null;Te.prototype.visitSparseUnion=null;Te.prototype.visitIntervalDayTime=null;Te.prototype.visitIntervalYearMonth=null});var hu=U(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.instance=ct.TypeComparator=void 0;var GS=it(),J=class extends GS.Visitor{compareSchemas(e,t){return e===t||t instanceof e.constructor&&ct.instance.compareFields(e.fields,t.fields)}compareFields(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((i,n)=>ct.instance.compareField(i,t[n]))}compareField(e,t){return e===t||t instanceof e.constructor&&e.name===t.name&&e.nullable===t.nullable&&ct.instance.visit(e.type,t.type)}};ct.TypeComparator=J;function mt(r,e){return e instanceof r.constructor}function Pn(r,e){return r===e||mt(r,e)}function _r(r,e){return r===e||mt(r,e)&&r.bitWidth===e.bitWidth&&r.isSigned===e.isSigned}function Js(r,e){return r===e||mt(r,e)&&r.precision===e.precision}function $S(r,e){return r===e||mt(r,e)&&r.byteWidth===e.byteWidth}function lu(r,e){return r===e||mt(r,e)&&r.unit===e.unit}function Vn(r,e){return r===e||mt(r,e)&&r.unit===e.unit&&r.timezone===e.timezone}function Nn(r,e){return r===e||mt(r,e)&&r.unit===e.unit&&r.bitWidth===e.bitWidth}function JS(r,e){return r===e||mt(r,e)&&r.children.length===e.children.length&&ct.instance.compareFields(r.children,e.children)}function KS(r,e){return r===e||mt(r,e)&&r.children.length===e.children.length&&ct.instance.compareFields(r.children,e.children)}function du(r,e){return r===e||mt(r,e)&&r.mode===e.mode&&r.typeIds.every((t,i)=>t===e.typeIds[i])&&ct.instance.compareFields(r.children,e.children)}function QS(r,e){return r===e||mt(r,e)&&r.id===e.id&&r.isOrdered===e.isOrdered&&ct.instance.visit(r.indices,e.indices)&&ct.instance.visit(r.dictionary,e.dictionary)}function fu(r,e){return r===e||mt(r,e)&&r.unit===e.unit}function ZS(r,e){return r===e||mt(r,e)&&r.listSize===e.listSize&&r.children.length===e.children.length&&ct.instance.compareFields(r.children,e.children)}function XS(r,e){return r===e||mt(r,e)&&r.keysSorted===e.keysSorted&&r.children.length===e.children.length&&ct.instance.compareFields(r.children,e.children)}J.prototype.visitNull=Pn;J.prototype.visitBool=Pn;J.prototype.visitInt=_r;J.prototype.visitInt8=_r;J.prototype.visitInt16=_r;J.prototype.visitInt32=_r;J.prototype.visitInt64=_r;J.prototype.visitUint8=_r;J.prototype.visitUint16=_r;J.prototype.visitUint32=_r;J.prototype.visitUint64=_r;J.prototype.visitFloat=Js;J.prototype.visitFloat16=Js;J.prototype.visitFloat32=Js;J.prototype.visitFloat64=Js;J.prototype.visitUtf8=Pn;J.prototype.visitBinary=Pn;J.prototype.visitFixedSizeBinary=$S;J.prototype.visitDate=lu;J.prototype.visitDateDay=lu;J.prototype.visitDateMillisecond=lu;J.prototype.visitTimestamp=Vn;J.prototype.visitTimestampSecond=Vn;J.prototype.visitTimestampMillisecond=Vn;J.prototype.visitTimestampMicrosecond=Vn;J.prototype.visitTimestampNanosecond=Vn;J.prototype.visitTime=Nn;J.prototype.visitTimeSecond=Nn;J.prototype.visitTimeMillisecond=Nn;J.prototype.visitTimeMicrosecond=Nn;J.prototype.visitTimeNanosecond=Nn;J.prototype.visitDecimal=Pn;J.prototype.visitList=JS;J.prototype.visitStruct=KS;J.prototype.visitUnion=du;J.prototype.visitDenseUnion=du;J.prototype.visitSparseUnion=du;J.prototype.visitDictionary=QS;J.prototype.visitInterval=fu;J.prototype.visitIntervalDayTime=fu;J.prototype.visitIntervalYearMonth=fu;J.prototype.visitFixedSizeList=ZS;J.prototype.visitMap=XS;ct.instance=new J});var ve=U(P=>{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.strideForType=P.Dictionary=P.Map_=P.FixedSizeList=P.FixedSizeBinary=P.SparseUnion=P.DenseUnion=P.Union=P.Struct=P.List=P.IntervalYearMonth=P.IntervalDayTime=P.Interval=P.TimestampNanosecond=P.TimestampMicrosecond=P.TimestampMillisecond=P.TimestampSecond=P.Timestamp=P.TimeNanosecond=P.TimeMicrosecond=P.TimeMillisecond=P.TimeSecond=P.Time=P.DateMillisecond=P.DateDay=P.Date_=P.Decimal=P.Bool=P.Utf8=P.Binary=P.Float64=P.Float32=P.Float16=P.Float=P.Uint64=P.Uint32=P.Uint16=P.Uint8=P.Int64=P.Int32=P.Int16=P.Int8=P.Int=P.Null=P.DataType=void 0;var eO=hu(),q=Ie(),Ce=class{static isNull(e){return e&&e.typeId===q.Type.Null}static isInt(e){return e&&e.typeId===q.Type.Int}static isFloat(e){return e&&e.typeId===q.Type.Float}static isBinary(e){return e&&e.typeId===q.Type.Binary}static isUtf8(e){return e&&e.typeId===q.Type.Utf8}static isBool(e){return e&&e.typeId===q.Type.Bool}static isDecimal(e){return e&&e.typeId===q.Type.Decimal}static isDate(e){return e&&e.typeId===q.Type.Date}static isTime(e){return e&&e.typeId===q.Type.Time}static isTimestamp(e){return e&&e.typeId===q.Type.Timestamp}static isInterval(e){return e&&e.typeId===q.Type.Interval}static isList(e){return e&&e.typeId===q.Type.List}static isStruct(e){return e&&e.typeId===q.Type.Struct}static isUnion(e){return e&&e.typeId===q.Type.Union}static isFixedSizeBinary(e){return e&&e.typeId===q.Type.FixedSizeBinary}static isFixedSizeList(e){return e&&e.typeId===q.Type.FixedSizeList}static isMap(e){return e&&e.typeId===q.Type.Map}static isDictionary(e){return e&&e.typeId===q.Type.Dictionary}get typeId(){return q.Type.NONE}compareTo(e){return eO.instance.visit(this,e)}};P.DataType=Ce;Ce[Symbol.toStringTag]=(r=>(r.children=null,r.ArrayType=Array,r[Symbol.toStringTag]="DataType"))(Ce.prototype);var Ks=class extends Ce{toString(){return"Null"}get typeId(){return q.Type.Null}};P.Null=Ks;Ks[Symbol.toStringTag]=(r=>r[Symbol.toStringTag]="Null")(Ks.prototype);var Tt=class extends Ce{constructor(e,t){super();this.isSigned=e,this.bitWidth=t}get typeId(){return q.Type.Int}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?Int32Array:Uint32Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}};P.Int=Tt;Tt[Symbol.toStringTag]=(r=>(r.isSigned=null,r.bitWidth=null,r[Symbol.toStringTag]="Int"))(Tt.prototype);var pu=class extends Tt{constructor(){super(!0,8)}};P.Int8=pu;var yu=class extends Tt{constructor(){super(!0,16)}};P.Int16=yu;var mu=class extends Tt{constructor(){super(!0,32)}};P.Int32=mu;var _u=class extends Tt{constructor(){super(!0,64)}};P.Int64=_u;var bu=class extends Tt{constructor(){super(!1,8)}};P.Uint8=bu;var gu=class extends Tt{constructor(){super(!1,16)}};P.Uint16=gu;var vu=class extends Tt{constructor(){super(!1,32)}};P.Uint32=vu;var wu=class extends Tt{constructor(){super(!1,64)}};P.Uint64=wu;Object.defineProperty(pu.prototype,"ArrayType",{value:Int8Array});Object.defineProperty(yu.prototype,"ArrayType",{value:Int16Array});Object.defineProperty(mu.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(_u.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(bu.prototype,"ArrayType",{value:Uint8Array});Object.defineProperty(gu.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(vu.prototype,"ArrayType",{value:Uint32Array});Object.defineProperty(wu.prototype,"ArrayType",{value:Uint32Array});var fi=class extends Ce{constructor(e){super();this.precision=e}get typeId(){return q.Type.Float}get ArrayType(){switch(this.precision){case q.Precision.HALF:return Uint16Array;case q.Precision.SINGLE:return Float32Array;case q.Precision.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};P.Float=fi;fi[Symbol.toStringTag]=(r=>(r.precision=null,r[Symbol.toStringTag]="Float"))(fi.prototype);var ju=class extends fi{constructor(){super(q.Precision.HALF)}};P.Float16=ju;var Tu=class extends fi{constructor(){super(q.Precision.SINGLE)}};P.Float32=Tu;var Bu=class extends fi{constructor(){super(q.Precision.DOUBLE)}};P.Float64=Bu;Object.defineProperty(ju.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(Tu.prototype,"ArrayType",{value:Float32Array});Object.defineProperty(Bu.prototype,"ArrayType",{value:Float64Array});var Qs=class extends Ce{constructor(){super()}get typeId(){return q.Type.Binary}toString(){return"Binary"}};P.Binary=Qs;Qs[Symbol.toStringTag]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Binary"))(Qs.prototype);var Zs=class extends Ce{constructor(){super()}get typeId(){return q.Type.Utf8}toString(){return"Utf8"}};P.Utf8=Zs;Zs[Symbol.toStringTag]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Utf8"))(Zs.prototype);var Xs=class extends Ce{constructor(){super()}get typeId(){return q.Type.Bool}toString(){return"Bool"}};P.Bool=Xs;Xs[Symbol.toStringTag]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Bool"))(Xs.prototype);var ea=class extends Ce{constructor(e,t){super();this.scale=e,this.precision=t}get typeId(){return q.Type.Decimal}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}};P.Decimal=ea;ea[Symbol.toStringTag]=(r=>(r.scale=null,r.precision=null,r.ArrayType=Uint32Array,r[Symbol.toStringTag]="Decimal"))(ea.prototype);var Mi=class extends Ce{constructor(e){super();this.unit=e}get typeId(){return q.Type.Date}toString(){return`Date${(this.unit+1)*32}<${q.DateUnit[this.unit]}>`}};P.Date_=Mi;Mi[Symbol.toStringTag]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Date"))(Mi.prototype);var wy=class extends Mi{constructor(){super(q.DateUnit.DAY)}};P.DateDay=wy;var jy=class extends Mi{constructor(){super(q.DateUnit.MILLISECOND)}};P.DateMillisecond=jy;var Ar=class extends Ce{constructor(e,t){super();this.unit=e,this.bitWidth=t}get typeId(){return q.Type.Time}toString(){return`Time${this.bitWidth}<${q.TimeUnit[this.unit]}>`}};P.Time=Ar;Ar[Symbol.toStringTag]=(r=>(r.unit=null,r.bitWidth=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Time"))(Ar.prototype);var Ty=class extends Ar{constructor(){super(q.TimeUnit.SECOND,32)}};P.TimeSecond=Ty;var By=class extends Ar{constructor(){super(q.TimeUnit.MILLISECOND,32)}};P.TimeMillisecond=By;var Iy=class extends Ar{constructor(){super(q.TimeUnit.MICROSECOND,64)}};P.TimeMicrosecond=Iy;var Sy=class extends Ar{constructor(){super(q.TimeUnit.NANOSECOND,64)}};P.TimeNanosecond=Sy;var Dr=class extends Ce{constructor(e,t){super();this.unit=e,this.timezone=t}get typeId(){return q.Type.Timestamp}toString(){return`Timestamp<${q.TimeUnit[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}};P.Timestamp=Dr;Dr[Symbol.toStringTag]=(r=>(r.unit=null,r.timezone=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Timestamp"))(Dr.prototype);var Oy=class extends Dr{constructor(e){super(q.TimeUnit.SECOND,e)}};P.TimestampSecond=Oy;var Ay=class extends Dr{constructor(e){super(q.TimeUnit.MILLISECOND,e)}};P.TimestampMillisecond=Ay;var Dy=class extends Dr{constructor(e){super(q.TimeUnit.MICROSECOND,e)}};P.TimestampMicrosecond=Dy;var Fy=class extends Dr{constructor(e){super(q.TimeUnit.NANOSECOND,e)}};P.TimestampNanosecond=Fy;var Pi=class extends Ce{constructor(e){super();this.unit=e}get typeId(){return q.Type.Interval}toString(){return`Interval<${q.IntervalUnit[this.unit]}>`}};P.Interval=Pi;Pi[Symbol.toStringTag]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Interval"))(Pi.prototype);var Ry=class extends Pi{constructor(){super(q.IntervalUnit.DAY_TIME)}};P.IntervalDayTime=Ry;var Ey=class extends Pi{constructor(){super(q.IntervalUnit.YEAR_MONTH)}};P.IntervalYearMonth=Ey;var ta=class extends Ce{constructor(e){super();this.children=[e]}get typeId(){return q.Type.List}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}};P.List=ta;ta[Symbol.toStringTag]=(r=>(r.children=null,r[Symbol.toStringTag]="List"))(ta.prototype);var ra=class extends Ce{constructor(e){super();this.children=e}get typeId(){return q.Type.Struct}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}};P.Struct=ra;ra[Symbol.toStringTag]=(r=>(r.children=null,r[Symbol.toStringTag]="Struct"))(ra.prototype);var Vi=class extends Ce{constructor(e,t,i){super();this.mode=e,this.children=i,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce((n,a,c)=>(n[a]=c)&&n||n,Object.create(null))}get typeId(){return q.Type.Union}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(" | ")}>`}};P.Union=Vi;Vi[Symbol.toStringTag]=(r=>(r.mode=null,r.typeIds=null,r.children=null,r.typeIdToChildIndex=null,r.ArrayType=Int8Array,r[Symbol.toStringTag]="Union"))(Vi.prototype);var Cy=class extends Vi{constructor(e,t){super(q.UnionMode.Dense,e,t)}};P.DenseUnion=Cy;var Uy=class extends Vi{constructor(e,t){super(q.UnionMode.Sparse,e,t)}};P.SparseUnion=Uy;var ia=class extends Ce{constructor(e){super();this.byteWidth=e}get typeId(){return q.Type.FixedSizeBinary}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};P.FixedSizeBinary=ia;ia[Symbol.toStringTag]=(r=>(r.byteWidth=null,r.ArrayType=Uint8Array,r[Symbol.toStringTag]="FixedSizeBinary"))(ia.prototype);var na=class extends Ce{constructor(e,t){super();this.listSize=e,this.children=[t]}get typeId(){return q.Type.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}};P.FixedSizeList=na;na[Symbol.toStringTag]=(r=>(r.children=null,r.listSize=null,r[Symbol.toStringTag]="FixedSizeList"))(na.prototype);var sa=class extends Ce{constructor(e,t=!1){super();this.children=[e],this.keysSorted=t}get typeId(){return q.Type.Map}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}toString(){return`Map<{${this.children[0].type.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}};P.Map_=sa;sa[Symbol.toStringTag]=(r=>(r.children=null,r.keysSorted=null,r[Symbol.toStringTag]="Map_"))(sa.prototype);var tO=(r=>()=>++r)(-1),aa=class extends Ce{constructor(e,t,i,n){super();this.indices=t,this.dictionary=e,this.isOrdered=n||!1,this.id=i==null?tO():typeof i=="number"?i:i.low}get typeId(){return q.Type.Dictionary}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}};P.Dictionary=aa;aa[Symbol.toStringTag]=(r=>(r.id=null,r.indices=null,r.isOrdered=null,r.dictionary=null,r[Symbol.toStringTag]="Dictionary"))(aa.prototype);function rO(r){let e=r;switch(r.typeId){case q.Type.Decimal:return 4;case q.Type.Timestamp:return 2;case q.Type.Date:return 1+e.unit;case q.Type.Interval:return 1+e.unit;case q.Type.Int:return 1+ +(e.bitWidth>32);case q.Type.Time:return 1+ +(e.bitWidth>32);case q.Type.FixedSizeList:return e.listSize;case q.Type.FixedSizeBinary:return e.byteWidth;default:return 1}}P.strideForType=rO});var Nt=U(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.Data=hi.kUnknownNullCount=void 0;var iO=Kt(),nO=Kt(),Y=Ie(),sO=ve(),pe=Ne();hi.kUnknownNullCount=-1;var te=class{constructor(e,t,i,n,a,c,f){this.type=e,this.dictionary=f,this.offset=Math.floor(Math.max(t||0,0)),this.length=Math.floor(Math.max(i||0,0)),this._nullCount=Math.floor(Math.max(n||0,-1)),this.childData=(c||[]).map(s=>s instanceof te?s:s.data);let j;a instanceof te?(this.stride=a.stride,this.values=a.values,this.typeIds=a.typeIds,this.nullBitmap=a.nullBitmap,this.valueOffsets=a.valueOffsets):(this.stride=sO.strideForType(e),a&&((j=a[0])&&(this.valueOffsets=j),(j=a[1])&&(this.values=j),(j=a[2])&&(this.nullBitmap=j),(j=a[3])&&(this.typeIds=j)))}get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get byteLength(){let e=0,{valueOffsets:t,values:i,nullBitmap:n,typeIds:a}=this;return t&&(e+=t.byteLength),i&&(e+=i.byteLength),n&&(e+=n.byteLength),a&&(e+=a.byteLength),this.childData.reduce((c,f)=>c+f.byteLength,e)}get nullCount(){let e=this._nullCount,t;return e<=hi.kUnknownNullCount&&(t=this.nullBitmap)&&(this._nullCount=e=this.length-nO.popcnt_bit_range(t,this.offset,this.offset+this.length)),e}clone(e,t=this.offset,i=this.length,n=this._nullCount,a=this,c=this.childData){return new te(e,t,i,n,a,c,this.dictionary)}slice(e,t){let{stride:i,typeId:n,childData:a}=this,c=+(this._nullCount===0)-1,f=n===16?i:1,j=this._sliceBuffers(e,t,i,n);return this.clone(this.type,this.offset+e,t,c,j,!a.length||this.valueOffsets?a:this._sliceChildren(a,f*e,f*t))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===Y.Type.Null)return this.clone(this.type,0,e,0);let{length:t,nullCount:i}=this,n=new Uint8Array((e+63&~63)>>3).fill(255,0,t>>3);n[t>>3]=(1<<t-(t&~7))-1,i>0&&n.set(iO.truncateBitmap(this.offset,t,this.nullBitmap),0);let a=this.buffers;return a[Y.BufferType.VALIDITY]=n,this.clone(this.type,0,e,i+(e-t),a)}_sliceBuffers(e,t,i,n){let a,{buffers:c}=this;return(a=c[Y.BufferType.TYPE])&&(c[Y.BufferType.TYPE]=a.subarray(e,e+t)),(a=c[Y.BufferType.OFFSET])&&(c[Y.BufferType.OFFSET]=a.subarray(e,e+t+1))||(a=c[Y.BufferType.DATA])&&(c[Y.BufferType.DATA]=n===6?a:a.subarray(i*e,i*(e+t))),c}_sliceChildren(e,t,i){return e.map(n=>n.slice(t,i))}static new(e,t,i,n,a,c,f){switch(a instanceof te?a=a.buffers:a||(a=[]),e.typeId){case Y.Type.Null:return te.Null(e,t,i);case Y.Type.Int:return te.Int(e,t,i,n||0,a[Y.BufferType.VALIDITY],a[Y.BufferType.DATA]||[]);case Y.Type.Dictionary:return te.Dictionary(e,t,i,n||0,a[Y.BufferType.VALIDITY],a[Y.BufferType.DATA]||[],f);case Y.Type.Float:return te.Float(e,t,i,n||0,a[Y.BufferType.VALIDITY],a[Y.BufferType.DATA]||[]);case Y.Type.Bool:return te.Bool(e,t,i,n||0,a[Y.BufferType.VALIDITY],a[Y.BufferType.DATA]||[]);case Y.Type.Decimal:return te.Decimal(e,t,i,n||0,a[Y.BufferType.VALIDITY],a[Y.BufferType.DATA]||[]);case Y.Type.Date:return te.Date(e,t,i,n||0,a[Y.BufferType.VALIDITY],a[Y.BufferType.DATA]||[]);case Y.Type.Time:return te.Time(e,t,i,n||0,a[Y.BufferType.VALIDITY],a[Y.BufferType.DATA]||[]);case Y.Type.Timestamp:return te.Timestamp(e,t,i,n||0,a[Y.BufferType.VALIDITY],a[Y.BufferType.DATA]||[]);case Y.Type.Interval:return te.Interval(e,t,i,n||0,a[Y.BufferType.VALIDITY],a[Y.BufferType.DATA]||[]);case Y.Type.FixedSizeBinary:return te.FixedSizeBinary(e,t,i,n||0,a[Y.BufferType.VALIDITY],a[Y.BufferType.DATA]||[]);case Y.Type.Binary:return te.Binary(e,t,i,n||0,a[Y.BufferType.VALIDITY],a[Y.BufferType.OFFSET]||[],a[Y.BufferType.DATA]||[]);case Y.Type.Utf8:return te.Utf8(e,t,i,n||0,a[Y.BufferType.VALIDITY],a[Y.BufferType.OFFSET]||[],a[Y.BufferType.DATA]||[]);case Y.Type.List:return te.List(e,t,i,n||0,a[Y.BufferType.VALIDITY],a[Y.BufferType.OFFSET]||[],(c||[])[0]);case Y.Type.FixedSizeList:return te.FixedSizeList(e,t,i,n||0,a[Y.BufferType.VALIDITY],(c||[])[0]);case Y.Type.Struct:return te.Struct(e,t,i,n||0,a[Y.BufferType.VALIDITY],c||[]);case Y.Type.Map:return te.Map(e,t,i,n||0,a[Y.BufferType.VALIDITY],a[Y.BufferType.OFFSET]||[],(c||[])[0]);case Y.Type.Union:return te.Union(e,t,i,n||0,a[Y.BufferType.VALIDITY],a[Y.BufferType.TYPE]||[],a[Y.BufferType.OFFSET]||c,c)}throw new Error(`Unrecognized typeId ${e.typeId}`)}static Null(e,t,i){return new te(e,t,i,0)}static Int(e,t,i,n,a,c){return new te(e,t,i,n,[void 0,pe.toArrayBufferView(e.ArrayType,c),pe.toUint8Array(a)])}static Dictionary(e,t,i,n,a,c,f){return new te(e,t,i,n,[void 0,pe.toArrayBufferView(e.indices.ArrayType,c),pe.toUint8Array(a)],[],f)}static Float(e,t,i,n,a,c){return new te(e,t,i,n,[void 0,pe.toArrayBufferView(e.ArrayType,c),pe.toUint8Array(a)])}static Bool(e,t,i,n,a,c){return new te(e,t,i,n,[void 0,pe.toArrayBufferView(e.ArrayType,c),pe.toUint8Array(a)])}static Decimal(e,t,i,n,a,c){return new te(e,t,i,n,[void 0,pe.toArrayBufferView(e.ArrayType,c),pe.toUint8Array(a)])}static Date(e,t,i,n,a,c){return new te(e,t,i,n,[void 0,pe.toArrayBufferView(e.ArrayType,c),pe.toUint8Array(a)])}static Time(e,t,i,n,a,c){return new te(e,t,i,n,[void 0,pe.toArrayBufferView(e.ArrayType,c),pe.toUint8Array(a)])}static Timestamp(e,t,i,n,a,c){return new te(e,t,i,n,[void 0,pe.toArrayBufferView(e.ArrayType,c),pe.toUint8Array(a)])}static Interval(e,t,i,n,a,c){return new te(e,t,i,n,[void 0,pe.toArrayBufferView(e.ArrayType,c),pe.toUint8Array(a)])}static FixedSizeBinary(e,t,i,n,a,c){return new te(e,t,i,n,[void 0,pe.toArrayBufferView(e.ArrayType,c),pe.toUint8Array(a)])}static Binary(e,t,i,n,a,c,f){return new te(e,t,i,n,[pe.toInt32Array(c),pe.toUint8Array(f),pe.toUint8Array(a)])}static Utf8(e,t,i,n,a,c,f){return new te(e,t,i,n,[pe.toInt32Array(c),pe.toUint8Array(f),pe.toUint8Array(a)])}static List(e,t,i,n,a,c,f){return new te(e,t,i,n,[pe.toInt32Array(c),void 0,pe.toUint8Array(a)],f?[f]:[])}static FixedSizeList(e,t,i,n,a,c){return new te(e,t,i,n,[void 0,void 0,pe.toUint8Array(a)],c?[c]:[])}static Struct(e,t,i,n,a,c){return new te(e,t,i,n,[void 0,void 0,pe.toUint8Array(a)],c)}static Map(e,t,i,n,a,c,f){return new te(e,t,i,n,[pe.toInt32Array(c),void 0,pe.toUint8Array(a)],f?[f]:[])}static Union(e,t,i,n,a,c,f,j){let s=[void 0,void 0,pe.toUint8Array(a),pe.toArrayBufferView(e.ArrayType,c)];return e.mode===Y.UnionMode.Sparse?new te(e,t,i,n,s,f):(s[Y.BufferType.OFFSET]=pe.toInt32Array(f),new te(e,t,i,n,s,j))}};hi.Data=te;te.prototype.childData=Object.freeze([])});var Iu=U(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.valueToString=void 0;var aO=void 0;function oO(r){if(r===null)return"null";if(r===aO)return"undefined";switch(typeof r){case"number":return`${r}`;case"bigint":return`${r}`;case"string":return`"${r}"`}return typeof r[Symbol.toPrimitive]=="function"?r[Symbol.toPrimitive]("string"):ArrayBuffer.isView(r)?`[${r}]`:JSON.stringify(r)}oa.valueToString=oO});var ky=U(ua=>{"use strict";Object.defineProperty(ua,"__esModule",{value:!0});ua.createIsValidFunction=void 0;var Su=Iu(),uO=ut();function cO(r){if(!r||r.length<=0)return function(n){return!0};let e="",t=r.filter(i=>i===i);return t.length>0&&(e=`
|
|
2
|
-
switch (x) {${t.map(i=>`
|
|
3
|
-
case ${lO(i)}:`).join("")}
|
|
4
|
-
return false;
|
|
5
|
-
}`),r.length!==t.length&&(e=`if (x !== x) return false;
|
|
6
|
-
${e}`),new Function("x",`${e}
|
|
7
|
-
return true;`)}ua.createIsValidFunction=cO;function lO(r){return typeof r!="bigint"?Su.valueToString(r):uO.BigIntAvailable?`${Su.valueToString(r)}n`:`"${Su.valueToString(r)}"`}});var Fr=U(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.WideBufferBuilder=Bt.OffsetsBufferBuilder=Bt.BitmapBufferBuilder=Bt.DataBufferBuilder=Bt.BufferBuilder=void 0;var My=Ne(),Ou=ut(),Au=(r,e)=>(r*e+63&~63||64)/e,dO=(r,e=0)=>r.length>=e?r.subarray(0,e):My.memcpy(new r.constructor(e),r,0),Ln=class{constructor(e,t=1){this.buffer=e,this.stride=t,this.BYTES_PER_ELEMENT=e.BYTES_PER_ELEMENT,this.ArrayType=e.constructor,this._resize(this.length=e.length/t|0)}get byteLength(){return this.length*this.stride*this.BYTES_PER_ELEMENT|0}get reservedLength(){return this.buffer.length/this.stride}get reservedByteLength(){return this.buffer.byteLength}set(e,t){return this}append(e){return this.set(this.length,e)}reserve(e){if(e>0){this.length+=e;let t=this.stride,i=this.length*t,n=this.buffer.length;i>=n&&this._resize(n===0?Au(i*1,this.BYTES_PER_ELEMENT):Au(i*2,this.BYTES_PER_ELEMENT))}return this}flush(e=this.length){e=Au(e*this.stride,this.BYTES_PER_ELEMENT);let t=dO(this.buffer,e);return this.clear(),t}clear(){return this.length=0,this._resize(0),this}_resize(e){return this.buffer=My.memcpy(new this.ArrayType(e),this.buffer)}};Bt.BufferBuilder=Ln;Ln.prototype.offset=0;var ca=class extends Ln{last(){return this.get(this.length-1)}get(e){return this.buffer[e]}set(e,t){return this.reserve(e-this.length+1),this.buffer[e*this.stride]=t,this}};Bt.DataBufferBuilder=ca;var Py=class extends ca{constructor(e=new Uint8Array(0)){super(e,1/8);this.numValid=0}get numInvalid(){return this.length-this.numValid}get(e){return this.buffer[e>>3]>>e%8&1}set(e,t){let{buffer:i}=this.reserve(e-this.length+1),n=e>>3,a=e%8,c=i[n]>>a&1;return t?c===0&&(i[n]|=1<<a,++this.numValid):c===1&&(i[n]&=~(1<<a),--this.numValid),this}clear(){return this.numValid=0,super.clear()}};Bt.BitmapBufferBuilder=Py;var Vy=class extends ca{constructor(e=new Int32Array(1)){super(e,1)}append(e){return this.set(this.length-1,e)}set(e,t){let i=this.length-1,n=this.reserve(e-i+1).buffer;return i<e++&&n.fill(n[i],i,e),n[e]=n[e-1]+t,this}flush(e=this.length-1){return e>this.length&&this.set(e-1,0),super.flush(e+1)}};Bt.OffsetsBufferBuilder=Vy;var Ny=class extends Ln{get ArrayType64(){return this._ArrayType64||(this._ArrayType64=this.buffer instanceof Int32Array?Ou.BigInt64Array:Ou.BigUint64Array)}set(e,t){switch(this.reserve(e-this.length+1),typeof t){case"bigint":this.buffer64[e]=t;break;case"number":this.buffer[e*this.stride]=t;break;default:this.buffer.set(t,e*this.stride)}return this}_resize(e){let t=super._resize(e),i=t.byteLength/(this.BYTES_PER_ELEMENT*this.stride);return Ou.BigIntAvailable&&(this.buffer64=new this.ArrayType64(t.buffer,t.byteOffset,i)),t}};Bt.WideBufferBuilder=Ny});var Ue=U(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.VariableWidthBuilder=Rr.FixedWidthBuilder=Rr.Builder=void 0;var fO=Pe(),Ni=Ie(),hO=Nt(),pO=ky(),Du=Fr(),yO=ve(),It=class{constructor({type:e,nullValues:t}){this.length=0,this.finished=!1,this.type=e,this.children=[],this.nullValues=t,this.stride=yO.strideForType(e),this._nulls=new Du.BitmapBufferBuilder,t&&t.length>0&&(this._isValid=pO.createIsValidFunction(t))}static new(e){}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e){throw new Error('"throughDOM" not available in this environment')}static throughIterable(e){return mO(e)}static throughAsyncIterable(e){return _O(e)}toVector(){return fO.Vector.new(this.flush())}get ArrayType(){return this.type.ArrayType}get nullCount(){return this._nulls.numInvalid}get numChildren(){return this.children.length}get byteLength(){let e=0;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),this._typeIds&&(e+=this._typeIds.byteLength),this.children.reduce((t,i)=>t+i.byteLength,e)}get reservedLength(){return this._nulls.reservedLength}get reservedByteLength(){let e=0;return this._offsets&&(e+=this._offsets.reservedByteLength),this._values&&(e+=this._values.reservedByteLength),this._nulls&&(e+=this._nulls.reservedByteLength),this._typeIds&&(e+=this._typeIds.reservedByteLength),this.children.reduce((t,i)=>t+i.reservedByteLength,e)}get valueOffsets(){return this._offsets?this._offsets.buffer:null}get values(){return this._values?this._values.buffer:null}get nullBitmap(){return this._nulls?this._nulls.buffer:null}get typeIds(){return this._typeIds?this._typeIds.buffer:null}append(e){return this.set(this.length,e)}isValid(e){return this._isValid(e)}set(e,t){return this.setValid(e,this.isValid(t))&&this.setValue(e,t),this}setValue(e,t){this._setValue(this,e,t)}setValid(e,t){return this.length=this._nulls.set(e,+t).length,t}addChild(e,t=`${this.numChildren}`){throw new Error(`Cannot append children to non-nested type "${this.type}"`)}getChildAt(e){return this.children[e]||null}flush(){let e=[],t=this._values,i=this._offsets,n=this._typeIds,{length:a,nullCount:c}=this;n?(e[Ni.BufferType.TYPE]=n.flush(a),i&&(e[Ni.BufferType.OFFSET]=i.flush(a))):i?(t&&(e[Ni.BufferType.DATA]=t.flush(i.last())),e[Ni.BufferType.OFFSET]=i.flush(a)):t&&(e[Ni.BufferType.DATA]=t.flush(a)),c>0&&(e[Ni.BufferType.VALIDITY]=this._nulls.flush(a));let f=hO.Data.new(this.type,0,a,c,e,this.children.map(j=>j.flush()));return this.clear(),f}finish(){return this.finished=!0,this.children.forEach(e=>e.finish()),this}clear(){return this.length=0,this._offsets&&this._offsets.clear(),this._values&&this._values.clear(),this._nulls&&this._nulls.clear(),this._typeIds&&this._typeIds.clear(),this.children.forEach(e=>e.clear()),this}};Rr.Builder=It;It.prototype.length=1;It.prototype.stride=1;It.prototype.children=null;It.prototype.finished=!1;It.prototype.nullValues=null;It.prototype._isValid=()=>!0;var Ly=class extends It{constructor(e){super(e);this._values=new Du.DataBufferBuilder(new this.ArrayType(0),this.stride)}setValue(e,t){let i=this._values;return i.reserve(e-i.length+1),super.setValue(e,t)}};Rr.FixedWidthBuilder=Ly;var xy=class extends It{constructor(e){super(e);this._pendingLength=0,this._offsets=new Du.OffsetsBufferBuilder}setValue(e,t){let i=this._pending||(this._pending=new Map),n=i.get(e);n&&(this._pendingLength-=n.length),this._pendingLength+=t.length,i.set(e,t)}setValid(e,t){return super.setValid(e,t)?!0:((this._pending||(this._pending=new Map)).set(e,void 0),!1)}clear(){return this._pendingLength=0,this._pending=void 0,super.clear()}flush(){return this._flush(),super.flush()}finish(){return this._flush(),super.finish()}_flush(){let e=this._pending,t=this._pendingLength;return this._pendingLength=0,this._pending=void 0,e&&e.size>0&&this._flushPending(e,t),this}};Rr.VariableWidthBuilder=xy;function mO(r){let{["queueingStrategy"]:e="count"}=r,{["highWaterMark"]:t=e!=="bytes"?1e3:2**14}=r,i=e!=="bytes"?"length":"byteLength";return function*(n){let a=0,c=It.new(r);for(let f of n)c.append(f)[i]>=t&&++a&&(yield c.toVector());(c.finish().length>0||a===0)&&(yield c.toVector())}}function _O(r){let{["queueingStrategy"]:e="count"}=r,{["highWaterMark"]:t=e!=="bytes"?1e3:2**14}=r,i=e!=="bytes"?"length":"byteLength";return async function*(n){let a=0,c=It.new(r);for await(let f of n)c.append(f)[i]>=t&&++a&&(yield c.toVector());(c.finish().length>0||a===0)&&(yield c.toVector())}}});var Fu=U(la=>{"use strict";Object.defineProperty(la,"__esModule",{value:!0});la.BoolBuilder=void 0;var bO=Fr(),gO=Ue(),qy=class extends gO.Builder{constructor(e){super(e);this._values=new bO.BitmapBufferBuilder}setValue(e,t){this._values.set(e,+t)}};la.BoolBuilder=qy});var Ru=U(da=>{"use strict";Object.defineProperty(da,"__esModule",{value:!0});da.NullBuilder=void 0;var vO=Ue(),Wy=class extends vO.Builder{setValue(e,t){}setValid(e,t){return this.length=Math.max(e+1,this.length),t}};da.NullBuilder=Wy});var Eu=U(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.DateMillisecondBuilder=Er.DateDayBuilder=Er.DateBuilder=void 0;var wO=Ue(),fa=class extends wO.FixedWidthBuilder{};Er.DateBuilder=fa;var zy=class extends fa{};Er.DateDayBuilder=zy;var Yy=class extends fa{};Er.DateMillisecondBuilder=Yy});var Cu=U(ha=>{"use strict";Object.defineProperty(ha,"__esModule",{value:!0});ha.DecimalBuilder=void 0;var jO=Ue(),Hy=class extends jO.FixedWidthBuilder{};ha.DecimalBuilder=Hy});var ku=U(pa=>{"use strict";Object.defineProperty(pa,"__esModule",{value:!0});pa.DictionaryBuilder=void 0;var TO=ve(),Uu=Ue(),Gy=class extends Uu.Builder{constructor({type:e,nullValues:t,dictionaryHashFunction:i}){super({type:new TO.Dictionary(e.dictionary,e.indices,e.id,e.isOrdered)});this._nulls=null,this._dictionaryOffset=0,this._keysToIndices=Object.create(null),this.indices=Uu.Builder.new({type:this.type.indices,nullValues:t}),this.dictionary=Uu.Builder.new({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(e){return this.indices.isValid(e)}setValid(e,t){let i=this.indices;return t=i.setValid(e,t),this.length=i.length,t}setValue(e,t){let i=this._keysToIndices,n=this.valueToKey(t),a=i[n];return a===void 0&&(i[n]=a=this._dictionaryOffset+this.dictionary.append(t).length-1),this.indices.setValue(e,a)}flush(){let e=this.type,t=this._dictionary,i=this.dictionary.toVector(),n=this.indices.flush().clone(e);return n.dictionary=t?t.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(e){return typeof e=="string"?e:`${e}`}};pa.DictionaryBuilder=Gy});var Mu=U(ya=>{"use strict";Object.defineProperty(ya,"__esModule",{value:!0});ya.FixedSizeBinaryBuilder=void 0;var BO=Ue(),$y=class extends BO.FixedWidthBuilder{};ya.FixedSizeBinaryBuilder=$y});var xn=U(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});xi.float64ToUint16=xi.uint16ToFloat64=void 0;var Jy=new Float64Array(1),Li=new Uint32Array(Jy.buffer);function IO(r){let e=(r&31744)>>10,t=(r&1023)/1024,i=(-1)**((r&32768)>>15);switch(e){case 31:return i*(t?NaN:1/0);case 0:return i*(t?6103515625e-14*t:0)}return i*2**(e-15)*(1+t)}xi.uint16ToFloat64=IO;function SO(r){if(r!==r)return 32256;Jy[0]=r;let e=(Li[1]&2147483648)>>16&65535,t=Li[1]&2146435072,i=0;return t>=1089470464?Li[0]>0?t=31744:(t=(t&2080374784)>>16,i=(Li[1]&1048575)>>10):t<=1056964608?(i=1048576+(Li[1]&1048575),i=1048576+(i<<(t>>20)-998)>>21,t=0):(t=t-1056964608>>10,i=(Li[1]&1048575)+512>>10),e|t|i&65535}xi.float64ToUint16=SO});var Pu=U(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.Float64Builder=Qt.Float32Builder=Qt.Float16Builder=Qt.FloatBuilder=void 0;var OO=xn(),AO=Ue(),qn=class extends AO.FixedWidthBuilder{};Qt.FloatBuilder=qn;var Ky=class extends qn{setValue(e,t){this._values.set(e,OO.float64ToUint16(t))}};Qt.Float16Builder=Ky;var Qy=class extends qn{setValue(e,t){this._values.set(e,t)}};Qt.Float32Builder=Qy;var Zy=class extends qn{setValue(e,t){this._values.set(e,t)}};Qt.Float64Builder=Zy});var Yn=U(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.BN=Ye.bignumToBigInt=Ye.bignumToString=Ye.isArrowBigNumSymbol=void 0;var DO=Ne(),Wn=ut();Ye.isArrowBigNumSymbol=Symbol.for("isArrowBigNum");function Lt(r,...e){return e.length===0?Object.setPrototypeOf(DO.toArrayBufferView(this.TypedArray,r),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(r,...e),this.constructor.prototype)}Lt.prototype[Ye.isArrowBigNumSymbol]=!0;Lt.prototype.toJSON=function(){return`"${Ye.bignumToString(this)}"`};Lt.prototype.valueOf=function(){return Xy(this)};Lt.prototype.toString=function(){return Ye.bignumToString(this)};Lt.prototype[Symbol.toPrimitive]=function(r="default"){switch(r){case"number":return Xy(this);case"string":return Ye.bignumToString(this);case"default":return Ye.bignumToBigInt(this)}return Ye.bignumToString(this)};function qi(...r){return Lt.apply(this,r)}function Wi(...r){return Lt.apply(this,r)}function zn(...r){return Lt.apply(this,r)}Object.setPrototypeOf(qi.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(Wi.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(zn.prototype,Object.create(Uint32Array.prototype));Object.assign(qi.prototype,Lt.prototype,{constructor:qi,signed:!0,TypedArray:Int32Array,BigIntArray:Wn.BigInt64Array});Object.assign(Wi.prototype,Lt.prototype,{constructor:Wi,signed:!1,TypedArray:Uint32Array,BigIntArray:Wn.BigUint64Array});Object.assign(zn.prototype,Lt.prototype,{constructor:zn,signed:!0,TypedArray:Uint32Array,BigIntArray:Wn.BigUint64Array});function Xy(r){let{buffer:e,byteOffset:t,length:i,signed:n}=r,a=new Int32Array(e,t,i),c=0,f=0,j=a.length,s,m;for(;f<j;)m=a[f++],s=a[f++],n||(s=s>>>0),c+=(m>>>0)+s*f**32;return c}Wn.BigIntAvailable?(Ye.bignumToBigInt=r=>r.byteLength===8?new r.BigIntArray(r.buffer,r.byteOffset,1)[0]:Vu(r),Ye.bignumToString=r=>r.byteLength===8?`${new r.BigIntArray(r.buffer,r.byteOffset,1)[0]}`:Vu(r)):(Ye.bignumToString=Vu,Ye.bignumToBigInt=Ye.bignumToString);function Vu(r){let e="",t=new Uint32Array(2),i=new Uint16Array(r.buffer,r.byteOffset,r.byteLength/2),n=new Uint32Array((i=new Uint16Array(i).reverse()).buffer),a=-1,c=i.length-1;do{for(t[0]=i[a=0];a<c;)i[a++]=t[1]=t[0]/10,t[0]=(t[0]-t[1]*10<<16)+i[a];i[a]=t[1]=t[0]/10,t[0]=t[0]-t[1]*10,e=`${t[0]}${e}`}while(n[0]||n[1]||n[2]||n[3]);return e||"0"}var ma=class{static new(e,t){switch(t){case!0:return new qi(e);case!1:return new Wi(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case Wn.BigInt64Array:return new qi(e)}return e.byteLength===16?new zn(e):new Wi(e)}static signed(e){return new qi(e)}static unsigned(e){return new Wi(e)}static decimal(e){return new zn(e)}constructor(e,t){return ma.new(e,t)}};Ye.BN=ma});var Nu=U(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.Uint64Builder=xe.Uint32Builder=xe.Uint16Builder=xe.Uint8Builder=xe.Int64Builder=xe.Int32Builder=xe.Int16Builder=xe.Int8Builder=xe.IntBuilder=void 0;var FO=Yn(),em=Fr(),RO=ut(),EO=Ue(),Zt=class extends EO.FixedWidthBuilder{setValue(e,t){this._values.set(e,t)}};xe.IntBuilder=Zt;var tm=class extends Zt{};xe.Int8Builder=tm;var rm=class extends Zt{};xe.Int16Builder=rm;var im=class extends Zt{};xe.Int32Builder=im;var nm=class extends Zt{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map(_a));super(e);this._values=new em.WideBufferBuilder(new Int32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid(_a(e))}};xe.Int64Builder=nm;var sm=class extends Zt{};xe.Uint8Builder=sm;var am=class extends Zt{};xe.Uint16Builder=am;var om=class extends Zt{};xe.Uint32Builder=om;var um=class extends Zt{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map(_a));super(e);this._values=new em.WideBufferBuilder(new Uint32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid(_a(e))}};xe.Uint64Builder=um;var _a=(r=>e=>(ArrayBuffer.isView(e)&&(r.buffer=e.buffer,r.byteOffset=e.byteOffset,r.byteLength=e.byteLength,e=FO.bignumToBigInt(r),r.buffer=null),e))({BigIntArray:RO.BigInt64Array})});var Lu=U(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.TimeNanosecondBuilder=St.TimeMicrosecondBuilder=St.TimeMillisecondBuilder=St.TimeSecondBuilder=St.TimeBuilder=void 0;var CO=Ue(),zi=class extends CO.FixedWidthBuilder{};St.TimeBuilder=zi;var cm=class extends zi{};St.TimeSecondBuilder=cm;var lm=class extends zi{};St.TimeMillisecondBuilder=lm;var dm=class extends zi{};St.TimeMicrosecondBuilder=dm;var fm=class extends zi{};St.TimeNanosecondBuilder=fm});var xu=U(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.TimestampNanosecondBuilder=Ot.TimestampMicrosecondBuilder=Ot.TimestampMillisecondBuilder=Ot.TimestampSecondBuilder=Ot.TimestampBuilder=void 0;var UO=Ue(),Yi=class extends UO.FixedWidthBuilder{};Ot.TimestampBuilder=Yi;var hm=class extends Yi{};Ot.TimestampSecondBuilder=hm;var pm=class extends Yi{};Ot.TimestampMillisecondBuilder=pm;var ym=class extends Yi{};Ot.TimestampMicrosecondBuilder=ym;var mm=class extends Yi{};Ot.TimestampNanosecondBuilder=mm});var qu=U(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.IntervalYearMonthBuilder=Cr.IntervalDayTimeBuilder=Cr.IntervalBuilder=void 0;var kO=Ue(),ba=class extends kO.FixedWidthBuilder{};Cr.IntervalBuilder=ba;var _m=class extends ba{};Cr.IntervalDayTimeBuilder=_m;var bm=class extends ba{};Cr.IntervalYearMonthBuilder=bm});var va=U(ga=>{"use strict";Object.defineProperty(ga,"__esModule",{value:!0});ga.BinaryBuilder=void 0;var MO=Ne(),PO=Fr(),VO=Ue(),gm=class extends VO.VariableWidthBuilder{constructor(e){super(e);this._values=new PO.BufferBuilder(new Uint8Array(0))}get byteLength(){let e=this._pendingLength+this.length*4;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,t){return super.setValue(e,MO.toUint8Array(t))}_flushPending(e,t){let i=this._offsets,n=this._values.reserve(t).buffer,a=0,c=0,f=0,j;for([a,j]of e)j===void 0?i.set(a,0):(c=j.length,n.set(j,f),i.set(a,c),f+=c)}};ga.BinaryBuilder=gm});var ja=U(wa=>{"use strict";Object.defineProperty(wa,"__esModule",{value:!0});wa.Utf8Builder=void 0;var NO=ci(),LO=va(),xO=Fr(),qO=Ue(),Wu=class extends qO.VariableWidthBuilder{constructor(e){super(e);this._values=new xO.BufferBuilder(new Uint8Array(0))}get byteLength(){let e=this._pendingLength+this.length*4;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,t){return super.setValue(e,NO.encodeUtf8(t))}_flushPending(e,t){}};wa.Utf8Builder=Wu;Wu.prototype._flushPending=LO.BinaryBuilder.prototype._flushPending});var zu=U(Ta=>{"use strict";Object.defineProperty(Ta,"__esModule",{value:!0});Ta.Run=void 0;var WO=Pe(),vm=class{get length(){return this._values.length}get(e){return this._values[e]}clear(){return this._values=null,this}bind(e){return e instanceof WO.Vector?e:(this._values=e,this)}};Ta.Run=vm});var Hn=U(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.StructRow=Gi.MapRow=void 0;var wm=Iu(),nt=Symbol.for("parent"),Hi=Symbol.for("rowIndex"),bt=Symbol.for("keyToIdx"),gt=Symbol.for("idxToVal"),Yu=Symbol.for("nodejs.util.inspect.custom"),Xt=class{constructor(e,t){this[nt]=e,this.size=t}entries(){return this[Symbol.iterator]()}has(e){return this.get(e)!==void 0}get(e){let t;if(e!=null){let i=this[bt]||(this[bt]=new Map),n=i.get(e);if(n!==void 0){let a=this[gt]||(this[gt]=new Array(this.size));(t=a[n])!==void 0||(a[n]=t=this.getValue(n))}else if((n=this.getIndex(e))>-1){i.set(e,n);let a=this[gt]||(this[gt]=new Array(this.size));(t=a[n])!==void 0||(a[n]=t=this.getValue(n))}}return t}set(e,t){if(e!=null){let i=this[bt]||(this[bt]=new Map),n=i.get(e);if(n===void 0&&i.set(e,n=this.getIndex(e)),n>-1){let a=this[gt]||(this[gt]=new Array(this.size));a[n]=this.setValue(n,t)}}return this}clear(){throw new Error(`Clearing ${this[Symbol.toStringTag]} not supported.`)}delete(e){throw new Error(`Deleting ${this[Symbol.toStringTag]} values not supported.`)}*[Symbol.iterator](){let e=this.keys(),t=this.values(),i=this[bt]||(this[bt]=new Map),n=this[gt]||(this[gt]=new Array(this.size));for(let a,c,f=0,j,s;!((j=e.next()).done||(s=t.next()).done);++f)a=j.value,c=s.value,n[f]=c,i.has(a)||i.set(a,f),yield[a,c]}forEach(e,t){let i=this.keys(),n=this.values(),a=t===void 0?e:(j,s,m)=>e.call(t,j,s,m),c=this[bt]||(this[bt]=new Map),f=this[gt]||(this[gt]=new Array(this.size));for(let j,s,m=0,R,$;!((R=i.next()).done||($=n.next()).done);++m)j=R.value,s=$.value,f[m]=s,c.has(j)||c.set(j,m),a(s,j,this)}toArray(){return[...this.values()]}toJSON(){let e={};return this.forEach((t,i)=>e[i]=t),e}inspect(){return this.toString()}[Yu](){return this.toString()}toString(){let e=[];return this.forEach((t,i)=>{i=wm.valueToString(i),t=wm.valueToString(t),e.push(`${i}: ${t}`)}),`{ ${e.join(", ")} }`}};Xt[Symbol.toStringTag]=(r=>(Object.defineProperties(r,{size:{writable:!0,enumerable:!1,configurable:!1,value:0},[nt]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Hi]:{writable:!0,enumerable:!1,configurable:!1,value:-1}}),r[Symbol.toStringTag]="Row"))(Xt.prototype);var jm=class extends Xt{constructor(e){super(e,e.length);return zO(this)}keys(){return this[nt].getChildAt(0)[Symbol.iterator]()}values(){return this[nt].getChildAt(1)[Symbol.iterator]()}getKey(e){return this[nt].getChildAt(0).get(e)}getIndex(e){return this[nt].getChildAt(0).indexOf(e)}getValue(e){return this[nt].getChildAt(1).get(e)}setValue(e,t){this[nt].getChildAt(1).set(e,t)}};Gi.MapRow=jm;var Tm=class extends Xt{constructor(e){super(e,e.type.children.length);return Bm(this)}*keys(){for(let e of this[nt].type.children)yield e.name}*values(){for(let e of this[nt].type.children)yield this[e.name]}getKey(e){return this[nt].type.children[e].name}getIndex(e){return this[nt].type.children.findIndex(t=>t.name===e)}getValue(e){return this[nt].getChildAt(e).get(this[Hi])}setValue(e,t){return this[nt].getChildAt(e).set(this[Hi],t)}};Gi.StructRow=Tm;Object.setPrototypeOf(Xt.prototype,Map.prototype);var Bm=(()=>{let r={enumerable:!0,configurable:!1,get:null,set:null};return e=>{let t=-1,i=e[bt]||(e[bt]=new Map),n=c=>function(){return this.get(c)},a=c=>function(f){return this.set(c,f)};for(let c of e.keys())i.set(c,++t),r.get=n(c),r.set=a(c),e.hasOwnProperty(c)||(r.enumerable=!0,Object.defineProperty(e,c,r)),e.hasOwnProperty(t)||(r.enumerable=!1,Object.defineProperty(e,t,r));return r.get=r.set=null,e}})(),zO=(()=>{if(typeof Proxy=="undefined")return Bm;let r=Xt.prototype.has,e=Xt.prototype.get,t=Xt.prototype.set,i=Xt.prototype.getKey,n={isExtensible(){return!1},deleteProperty(){return!1},preventExtensions(){return!0},ownKeys(a){return[...a.keys()].map(c=>`${c}`)},has(a,c){switch(c){case"getKey":case"getIndex":case"getValue":case"setValue":case"toArray":case"toJSON":case"inspect":case"constructor":case"isPrototypeOf":case"propertyIsEnumerable":case"toString":case"toLocaleString":case"valueOf":case"size":case"has":case"get":case"set":case"clear":case"delete":case"keys":case"values":case"entries":case"forEach":case"__proto__":case"__defineGetter__":case"__defineSetter__":case"hasOwnProperty":case"__lookupGetter__":case"__lookupSetter__":case Symbol.iterator:case Symbol.toStringTag:case nt:case Hi:case gt:case bt:case Yu:return!0}return typeof c=="number"&&!a.has(c)&&(c=a.getKey(c)),a.has(c)},get(a,c,f){switch(c){case"getKey":case"getIndex":case"getValue":case"setValue":case"toArray":case"toJSON":case"inspect":case"constructor":case"isPrototypeOf":case"propertyIsEnumerable":case"toString":case"toLocaleString":case"valueOf":case"size":case"has":case"get":case"set":case"clear":case"delete":case"keys":case"values":case"entries":case"forEach":case"__proto__":case"__defineGetter__":case"__defineSetter__":case"hasOwnProperty":case"__lookupGetter__":case"__lookupSetter__":case Symbol.iterator:case Symbol.toStringTag:case nt:case Hi:case gt:case bt:case Yu:return Reflect.get(a,c,f)}return typeof c=="number"&&!r.call(f,c)&&(c=i.call(f,c)),e.call(f,c)},set(a,c,f,j){switch(c){case nt:case Hi:case gt:case bt:return Reflect.set(a,c,f,j);case"getKey":case"getIndex":case"getValue":case"setValue":case"toArray":case"toJSON":case"inspect":case"constructor":case"isPrototypeOf":case"propertyIsEnumerable":case"toString":case"toLocaleString":case"valueOf":case"size":case"has":case"get":case"set":case"clear":case"delete":case"keys":case"values":case"entries":case"forEach":case"__proto__":case"__defineGetter__":case"__defineSetter__":case"hasOwnProperty":case"__lookupGetter__":case"__lookupSetter__":case Symbol.iterator:case Symbol.toStringTag:return!1}return typeof c=="number"&&!r.call(j,c)&&(c=i.call(j,c)),r.call(j,c)?!!t.call(j,c,f):!1}};return a=>new Proxy(a,n)})()});var $n=U(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.createElementComparator=Ur.clampRange=Ur.clampIndex=void 0;var Im=Pe(),Sm=Hn(),YO=Ne(),Om=ut();function HO(r,e,t){let i=r.length,n=e>-1?e:i+e%i;return t?t(r,n):n}Ur.clampIndex=HO;var Am;function GO(r,e,t,i){let{length:n=0}=r,a=typeof e!="number"?0:e,c=typeof t!="number"?n:t;return a<0&&(a=(a%n+n)%n),c<0&&(c=(c%n+n)%n),c<a&&(Am=a,a=c,c=Am),c>n&&(c=n),i?i(r,a,c):[a,c]}Ur.clampRange=GO;var $O=Om.BigIntAvailable?Om.BigInt(0):0,Dm=r=>r!==r;function Gn(r){let e=typeof r;if(e!=="object"||r===null)return Dm(r)?Dm:e!=="bigint"?t=>t===r:t=>$O+t===r;if(r instanceof Date){let t=r.valueOf();return i=>i instanceof Date?i.valueOf()===t:!1}return ArrayBuffer.isView(r)?t=>t?YO.compareArrayLike(r,t):!1:r instanceof Map?KO(r):Array.isArray(r)?JO(r):r instanceof Im.Vector?QO(r):ZO(r)}Ur.createElementComparator=Gn;function JO(r){let e=[];for(let t=-1,i=r.length;++t<i;)e[t]=Gn(r[t]);return Ba(e)}function KO(r){let e=-1,t=[];return r.forEach(i=>t[++e]=Gn(i)),Ba(t)}function QO(r){let e=[];for(let t=-1,i=r.length;++t<i;)e[t]=Gn(r.get(t));return Ba(e)}function ZO(r){let e=Object.keys(r);if(e.length===0)return()=>!1;let t=[];for(let i=-1,n=e.length;++i<n;)t[i]=Gn(r[e[i]]);return Ba(t,e)}function Ba(r,e){return t=>{if(!t||typeof t!="object")return!1;switch(t.constructor){case Array:return XO(r,t);case Map:case Sm.MapRow:case Sm.StructRow:return Fm(r,t,t.keys());case Object:case void 0:return Fm(r,t,e||Object.keys(t))}return t instanceof Im.Vector?e1(r,t):!1}}function XO(r,e){let t=r.length;if(e.length!==t)return!1;for(let i=-1;++i<t;)if(!r[i](e[i]))return!1;return!0}function e1(r,e){let t=r.length;if(e.length!==t)return!1;for(let i=-1;++i<t;)if(!r[i](e.get(i)))return!1;return!0}function Fm(r,e,t){let i=t[Symbol.iterator](),n=e instanceof Map?e.keys():Object.keys(e)[Symbol.iterator](),a=e instanceof Map?e.values():Object.values(e)[Symbol.iterator](),c=0,f=r.length,j=a.next(),s=i.next(),m=n.next();for(;c<f&&!s.done&&!m.done&&!j.done&&!(s.value!==m.value||!r[c](j.value));++c,s=i.next(),m=n.next(),j=a.next());return c===f&&s.done&&m.done&&j.done?!0:(i.return&&i.return(),n.return&&n.return(),a.return&&a.return(),!1)}});var kr=U(Ia=>{"use strict";Object.defineProperty(Ia,"__esModule",{value:!0});Ia.Chunked=void 0;var t1=$n(),Rm=ve(),r1=Mr(),Em=Pe(),br=class extends Em.AbstractVector{constructor(e,t=[],i=i1(t)){super();this._nullCount=-1,this._type=e,this._chunks=t,this._chunkOffsets=i,this._length=i[i.length-1],this._numChildren=(this._type.children||[]).length}static flatten(...e){return r1.selectChunkArgs(Em.Vector,e)}static concat(...e){let t=br.flatten(...e);return new br(t[0].type,t)}get type(){return this._type}get length(){return this._length}get chunks(){return this._chunks}get typeId(){return this._type.typeId}get VectorName(){return`Chunked<${this._type}>`}get data(){return this._chunks[0]?this._chunks[0].data:null}get ArrayType(){return this._type.ArrayType}get numChildren(){return this._numChildren}get stride(){return this._chunks[0]?this._chunks[0].stride:1}get byteLength(){return this._chunks.reduce((e,t)=>e+t.byteLength,0)}get nullCount(){let e=this._nullCount;return e<0&&(this._nullCount=e=this._chunks.reduce((t,{nullCount:i})=>t+i,0)),e}get indices(){if(Rm.DataType.isDictionary(this._type)){if(!this._indices){let e=this._chunks;this._indices=e.length===1?e[0].indices:br.concat(...e.map(t=>t.indices))}return this._indices}return null}get dictionary(){return Rm.DataType.isDictionary(this._type)?this._chunks[this._chunks.length-1].data.dictionary:null}*[Symbol.iterator](){for(let e of this._chunks)yield*e}clone(e=this._chunks){return new br(this._type,e)}concat(...e){return this.clone(br.flatten(this,...e))}slice(e,t){return t1.clampRange(this,e,t,this._sliceInternal)}getChildAt(e){if(e<0||e>=this._numChildren)return null;let t=this._children||(this._children=[]),i,n,a;return(i=t[e])?i:(n=(this._type.children||[])[e])&&(a=this._chunks.map(c=>c.getChildAt(e)).filter(c=>c!=null),a.length>0)?t[e]=new br(n.type,a):null}search(e,t){let i=e,n=this._chunkOffsets,a=n.length-1;if(i<0||i>=n[a])return null;if(a<=1)return t?t(this,0,i):[0,i];let c=0,f=0,j=0;do{if(c+1===a)return t?t(this,c,i-f):[c,i-f];j=c+(a-c)/2|0,i>=n[j]?c=j:a=j}while(i<n[a]&&i>=(f=n[c]));return null}isValid(e){return!!this.search(e,this.isValidInternal)}get(e){return this.search(e,this.getInternal)}set(e,t){this.search(e,({chunks:i},n,a)=>i[n].set(a,t))}indexOf(e,t){return t&&typeof t=="number"?this.search(t,(i,n,a)=>this.indexOfInternal(i,n,a,e)):this.indexOfInternal(this,0,Math.max(0,t||0),e)}toArray(){let{chunks:e}=this,t=e.length,i=this._type.ArrayType;if(t<=0)return new i(0);if(t<=1)return e[0].toArray();let n=0,a=new Array(t);for(let j=-1;++j<t;)n+=(a[j]=e[j].toArray()).length;i!==a[0].constructor&&(i=a[0].constructor);let c=new i(n),f=i===Array?s1:n1;for(let j=-1,s=0;++j<t;)s=f(a[j],c,s);return c}getInternal({_chunks:e},t,i){return e[t].get(i)}isValidInternal({_chunks:e},t,i){return e[t].isValid(i)}indexOfInternal({_chunks:e},t,i,n){let a=t-1,c=e.length,f=i,j=0,s=-1;for(;++a<c;){if(~(s=e[a].indexOf(n,f)))return j+s;f=0,j+=e[a].length}return-1}_sliceInternal(e,t,i){let n=[],{chunks:a,_chunkOffsets:c}=e;for(let f=-1,j=a.length;++f<j;){let s=a[f],m=s.length,R=c[f];if(R>=i)break;if(t>=R+m)continue;if(R>=t&&R+m<=i){n.push(s);continue}let $=Math.max(0,t-R),ue=Math.min(i-R,m);n.push(s.slice($,ue))}return e.clone(n)}};Ia.Chunked=br;function i1(r){let e=new Uint32Array((r||[]).length+1),t=e[0]=0,i=e.length;for(let n=0;++n<i;)e[n]=t+=r[n-1].length;return e}var n1=(r,e,t)=>(e.set(r,t),t+r.length),s1=(r,e,t)=>{let i=t;for(let n=-1,a=r.length;++n<a;)e[i++]=r[n];return i}});var $i=U(Sa=>{"use strict";Object.defineProperty(Sa,"__esModule",{value:!0});Sa.Column=void 0;var Cm=Qe(),Um=Pe(),Hu=kr(),pi=class extends Hu.Chunked{constructor(e,t=[],i){t=Hu.Chunked.flatten(...t);super(e.type,t,i);if(this._field=e,t.length===1&&!(this instanceof Gu))return new Gu(e,t[0],this._chunkOffsets)}static new(...e){let[t,i,...n]=e;typeof t!="string"&&!(t instanceof Cm.Field)&&(i=t,t="");let a=Hu.Chunked.flatten(Array.isArray(i)?[...i,...n]:i instanceof Um.Vector?[i,...n]:[Um.Vector.new(i,...n)]);if(typeof t=="string"){let c=a[0].data.type;t=new Cm.Field(t,c,!0)}else!t.nullable&&a.some(({nullCount:c})=>c>0)&&(t=t.clone({nullable:!0}));return new pi(t,a)}get field(){return this._field}get name(){return this._field.name}get nullable(){return this._field.nullable}get metadata(){return this._field.metadata}clone(e=this._chunks){return new pi(this._field,e)}getChildAt(e){if(e<0||e>=this.numChildren)return null;let t=this._children||(this._children=[]),i,n,a;return(i=t[e])?i:(n=(this.type.children||[])[e])&&(a=this._chunks.map(c=>c.getChildAt(e)).filter(c=>c!=null),a.length>0)?t[e]=new pi(n,a):null}};Sa.Column=pi;var Gu=class extends pi{constructor(e,t,i){super(e,[t],i);this._chunk=t}search(e,t){return t?t(this,0,e):[0,e]}isValid(e){return this._chunk.isValid(e)}get(e){return this._chunk.get(e)}set(e,t){this._chunk.set(e,t)}indexOf(e,t){return this._chunk.indexOf(e,t)}}});var Mr=U(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.selectColumnChildrenArgs=_t.selectVectorChildrenArgs=_t.selectChunkArgs=_t.selectFieldArgs=_t.selectColumnArgs=_t.selectArgs=void 0;var km=Nt(),Mm=Qe(),Pr=$i(),Jn=Pe(),Pm=ve(),a1=kr(),Vr=Array.isArray;_t.selectArgs=(r,e)=>Oa(r,e,[],0);_t.selectColumnArgs=r=>{let[e,t]=Ju(r,[[],[]]);return t.map((i,n)=>i instanceof Pr.Column?Pr.Column.new(i.field.clone(e[n]),i):i instanceof Jn.Vector?Pr.Column.new(e[n],i):Pr.Column.new(e[n],[]))};_t.selectFieldArgs=r=>Ju(r,[[],[]]);_t.selectChunkArgs=(r,e)=>$u(r,e,[],0);_t.selectVectorChildrenArgs=(r,e)=>Vm(r,e,[],0);_t.selectColumnChildrenArgs=(r,e)=>Nm(r,e,[],0);function Oa(r,e,t,i){let n,a=i,c=-1,f=e.length;for(;++c<f;)Vr(n=e[c])?a=Oa(r,n,t,a).length:n instanceof r&&(t[a++]=n);return t}function $u(r,e,t,i){let n,a=i,c=-1,f=e.length;for(;++c<f;)Vr(n=e[c])?a=$u(r,n,t,a).length:n instanceof a1.Chunked?a=$u(r,n.chunks,t,a).length:n instanceof r&&(t[a++]=n);return t}function Vm(r,e,t,i){let n,a=i,c=-1,f=e.length;for(;++c<f;)Vr(n=e[c])?a=Vm(r,n,t,a).length:n instanceof r?a=Oa(Jn.Vector,n.schema.fields.map((j,s)=>n.getChildAt(s)),t,a).length:n instanceof Jn.Vector&&(t[a++]=n);return t}function Nm(r,e,t,i){let n,a=i,c=-1,f=e.length;for(;++c<f;)Vr(n=e[c])?a=Nm(r,n,t,a).length:n instanceof r?a=Oa(Pr.Column,n.schema.fields.map((j,s)=>Pr.Column.new(j,n.getChildAt(s))),t,a).length:n instanceof Pr.Column&&(t[a++]=n);return t}var o1=(r,[e,t],i)=>(r[0][i]=e,r[1][i]=t,r);function Ju(r,e){let t,i;switch(i=r.length){case 0:return e;case 1:if(t=e[0],!r[0])return e;if(Vr(r[0]))return Ju(r[0],e);r[0]instanceof km.Data||r[0]instanceof Jn.Vector||r[0]instanceof Pm.DataType||([t,r]=Object.entries(r[0]).reduce(o1,e));break;default:Vr(t=r[i-1])?r=Vr(r[0])?r[0]:r.slice(0,i-1):(r=Vr(r[0])?r[0]:r,t=[])}let n=-1,a=-1,c=-1,f=r.length,j,s,[m,R]=e;for(;++c<f;)s=r[c],s instanceof Pr.Column&&(R[++a]=s)?m[++n]=s.field.clone(t[c],s.type,!0):({[c]:j=c}=t,s instanceof Pm.DataType&&(R[++a]=s)?m[++n]=Mm.Field.new(j,s,!0):s&&s.type&&(R[++a]=s)&&(s instanceof km.Data&&(R[a]=s=Jn.Vector.new(s)),m[++n]=Mm.Field.new(j,s.type,!0)));return e}});var Qe=U(Ji=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.Field=Ji.Schema=void 0;var u1=ve(),c1=Mr(),l1=Mr(),Lm=hu(),vt=class{constructor(e=[],t,i){this.fields=e||[],this.metadata=t||new Map,i||(i=Ku(e)),this.dictionaries=i}static from(...e){return vt.new(e[0],e[1])}static new(...e){return new vt(l1.selectFieldArgs(e)[0])}get[Symbol.toStringTag](){return"Schema"}toString(){return`Schema<{ ${this.fields.map((e,t)=>`${t}: ${e}`).join(", ")} }>`}compareTo(e){return Lm.instance.compareSchemas(this,e)}select(...e){let t=e.reduce((i,n)=>(i[n]=!0)&&i,Object.create(null));return new vt(this.fields.filter(i=>t[i.name]),this.metadata)}selectAt(...e){return new vt(e.map(t=>this.fields[t]).filter(Boolean),this.metadata)}assign(...e){let t=e[0]instanceof vt?e[0]:new vt(c1.selectArgs(er,e)),i=[...this.fields],n=Aa(Aa(new Map,this.metadata),t.metadata),a=t.fields.filter(f=>{let j=i.findIndex(s=>s.name===f.name);return~j?(i[j]=f.clone({metadata:Aa(Aa(new Map,i[j].metadata),f.metadata)}))&&!1:!0}),c=Ku(a,new Map);return new vt([...i,...a],n,new Map([...this.dictionaries,...c]))}};Ji.Schema=vt;var er=class{constructor(e,t,i=!1,n){this.name=e,this.type=t,this.nullable=i,this.metadata=n||new Map}static new(...e){let[t,i,n,a]=e;return e[0]&&typeof e[0]=="object"&&({name:t}=e[0],i===void 0&&(i=e[0].type),n===void 0&&(n=e[0].nullable),a===void 0&&(a=e[0].metadata)),new er(`${t}`,i,n,a)}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}compareTo(e){return Lm.instance.compareField(this,e)}clone(...e){let[t,i,n,a]=e;return!e[0]||typeof e[0]!="object"?[t=this.name,i=this.type,n=this.nullable,a=this.metadata]=e:{name:t=this.name,type:i=this.type,nullable:n=this.nullable,metadata:a=this.metadata}=e[0],er.new(t,i,n,a)}};Ji.Field=er;function Aa(r,e){return new Map([...r||new Map,...e||new Map])}function Ku(r,e=new Map){for(let t=-1,i=r.length;++t<i;){let a=r[t].type;if(u1.DataType.isDictionary(a)){if(!e.has(a.id))e.set(a.id,a.dictionary);else if(e.get(a.id)!==a.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}a.children&&a.children.length>0&&Ku(a.children,e)}return e}vt.prototype.fields=null;vt.prototype.metadata=null;vt.prototype.dictionaries=null;er.prototype.type=null;er.prototype.name=null;er.prototype.nullable=null;er.prototype.metadata=null});var Qu=U(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});Da.ListBuilder=void 0;var d1=zu(),f1=Qe(),h1=ve(),p1=Fr(),y1=Ue(),xm=class extends y1.VariableWidthBuilder{constructor(e){super(e);this._run=new d1.Run,this._offsets=new p1.OffsetsBufferBuilder}addChild(e,t="0"){if(this.numChildren>0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=e,this.type=new h1.List(new f1.Field(t,e.type,!0)),this.numChildren-1}clear(){return this._run.clear(),super.clear()}_flushPending(e){let t=this._run,i=this._offsets,n=this._setValue,a=0,c;for([a,c]of e)c===void 0?i.set(a,0):(i.set(a,c.length),n(this,a,t.bind(c)))}};Da.ListBuilder=xm});var Zu=U(Fa=>{"use strict";Object.defineProperty(Fa,"__esModule",{value:!0});Fa.FixedSizeListBuilder=void 0;var m1=zu(),_1=Qe(),b1=Ue(),g1=ve(),qm=class extends b1.Builder{constructor(){super(...arguments);this._run=new m1.Run}setValue(e,t){super.setValue(e,this._run.bind(t))}addChild(e,t="0"){if(this.numChildren>0)throw new Error("FixedSizeListBuilder can only have one child.");let i=this.children.push(e);return this.type=new g1.FixedSizeList(this.type.listSize,new _1.Field(t,e.type,!0)),i}clear(){return this._run.clear(),super.clear()}};Fa.FixedSizeListBuilder=qm});var Xu=U(Ra=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});Ra.MapBuilder=void 0;var v1=Qe(),w1=ve(),j1=Ue(),Wm=class extends j1.VariableWidthBuilder{set(e,t){return super.set(e,t)}setValue(e,t){t=t instanceof Map?t:new Map(Object.entries(t));let i=this._pending||(this._pending=new Map),n=i.get(e);n&&(this._pendingLength-=n.size),this._pendingLength+=t.size,i.set(e,t)}addChild(e,t=`${this.numChildren}`){if(this.numChildren>0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=e,this.type=new w1.Map_(new v1.Field(t,e.type,!0),this.type.keysSorted),this.numChildren-1}_flushPending(e){let t=this._offsets,i=this._setValue;e.forEach((n,a)=>{n===void 0?t.set(a,0):(t.set(a,n.size),i(this,a,n))})}};Ra.MapBuilder=Wm});var ec=U(Ea=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});Ea.StructBuilder=void 0;var T1=Qe(),B1=Ue(),I1=ve(),zm=class extends B1.Builder{addChild(e,t=`${this.numChildren}`){let i=this.children.push(e);return this.type=new I1.Struct([...this.type.children,new T1.Field(t,e.type,!0)]),i}};Ea.StructBuilder=zm});var tc=U(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.DenseUnionBuilder=Nr.SparseUnionBuilder=Nr.UnionBuilder=void 0;var S1=Qe(),Ym=Fr(),O1=Ue(),A1=ve(),Ca=class extends O1.Builder{constructor(e){super(e);this._typeIds=new Ym.DataBufferBuilder(new Int8Array(0),1),typeof e.valueToChildTypeId=="function"&&(this._valueToChildTypeId=e.valueToChildTypeId)}get typeIdToChildIndex(){return this.type.typeIdToChildIndex}append(e,t){return this.set(this.length,e,t)}set(e,t,i){return i===void 0&&(i=this._valueToChildTypeId(this,t,e)),this.setValid(e,this.isValid(t))&&this.setValue(e,t,i),this}setValue(e,t,i){this._typeIds.set(e,i),super.setValue(e,t)}addChild(e,t=`${this.children.length}`){let i=this.children.push(e),{type:{children:n,mode:a,typeIds:c}}=this,f=[...n,new S1.Field(t,e.type)];return this.type=new A1.Union(a,[...c,i],f),i}_valueToChildTypeId(e,t,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.")}};Nr.UnionBuilder=Ca;var Hm=class extends Ca{};Nr.SparseUnionBuilder=Hm;var Gm=class extends Ca{constructor(e){super(e);this._offsets=new Ym.DataBufferBuilder(new Int32Array(0))}setValue(e,t,i){let n=this.type.typeIdToChildIndex[i];return this._offsets.set(e,this.getChildAt(n).length),super.setValue(e,t,i)}};Nr.DenseUnionBuilder=Gm});var nc=U(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.instance=Ki.SetVisitor=void 0;var D1=Pe(),F1=it(),R1=ci(),E1=xn(),C1=Ne(),At=Ie(),re=class extends F1.Visitor{};Ki.SetVisitor=re;var U1=(r,e,t)=>{r[e]=t/864e5|0},rc=(r,e,t)=>{r[e]=t%4294967296|0,r[e+1]=t/4294967296|0},k1=(r,e,t)=>{r[e]=t*1e3%4294967296|0,r[e+1]=t*1e3/4294967296|0},M1=(r,e,t)=>{r[e]=t*1e6%4294967296|0,r[e+1]=t*1e6/4294967296|0},$m=(r,e,t,i)=>{let{[t]:n,[t+1]:a}=e;n!=null&&a!=null&&r.set(i.subarray(0,a-n),n)},P1=({offset:r,values:e},t,i)=>{let n=r+t;i?e[n>>3]|=1<<n%8:e[n>>3]&=~(1<<n%8)},Jm=({values:r},e,t)=>{U1(r,e,t.valueOf())},Km=({values:r},e,t)=>{rc(r,e*2,t.valueOf())},tr=({stride:r,values:e},t,i)=>{e[r*t]=i},Qm=({stride:r,values:e},t,i)=>{e[r*t]=E1.float64ToUint16(i)},ic=(r,e,t)=>{switch(typeof t){case"bigint":r.values64[e]=t;break;case"number":r.values[e*r.stride]=t;break;default:let i=t,{stride:n,ArrayType:a}=r,c=C1.toArrayBufferView(a,i);r.values.set(c.subarray(0,n),n*e)}},V1=({stride:r,values:e},t,i)=>{e.set(i.subarray(0,r),r*t)},N1=({values:r,valueOffsets:e},t,i)=>$m(r,e,t,i),L1=({values:r,valueOffsets:e},t,i)=>{$m(r,e,t,R1.encodeUtf8(i))},x1=(r,e,t)=>{r.type.bitWidth<64?tr(r,e,t):ic(r,e,t)},q1=(r,e,t)=>{r.type.precision!==At.Precision.HALF?tr(r,e,t):Qm(r,e,t)},W1=(r,e,t)=>{r.type.unit===At.DateUnit.DAY?Jm(r,e,t):Km(r,e,t)},Zm=({values:r},e,t)=>rc(r,e*2,t/1e3),Xm=({values:r},e,t)=>rc(r,e*2,t),e_=({values:r},e,t)=>k1(r,e*2,t),t_=({values:r},e,t)=>M1(r,e*2,t),z1=(r,e,t)=>{switch(r.type.unit){case At.TimeUnit.SECOND:return Zm(r,e,t);case At.TimeUnit.MILLISECOND:return Xm(r,e,t);case At.TimeUnit.MICROSECOND:return e_(r,e,t);case At.TimeUnit.NANOSECOND:return t_(r,e,t)}},r_=({values:r,stride:e},t,i)=>{r[e*t]=i},i_=({values:r,stride:e},t,i)=>{r[e*t]=i},n_=({values:r},e,t)=>{r.set(t.subarray(0,2),2*e)},s_=({values:r},e,t)=>{r.set(t.subarray(0,2),2*e)},Y1=(r,e,t)=>{switch(r.type.unit){case At.TimeUnit.SECOND:return r_(r,e,t);case At.TimeUnit.MILLISECOND:return i_(r,e,t);case At.TimeUnit.MICROSECOND:return n_(r,e,t);case At.TimeUnit.NANOSECOND:return s_(r,e,t)}},H1=({values:r},e,t)=>{r.set(t.subarray(0,4),4*e)},G1=(r,e,t)=>{let i=r.getChildAt(0),n=r.valueOffsets;for(let a=-1,c=n[e],f=n[e+1];c<f;)i.set(c++,t.get(++a))},$1=(r,e,t)=>{let i=r.getChildAt(0),n=r.valueOffsets,a=t instanceof Map?[...t]:Object.entries(t);for(let c=-1,f=n[e],j=n[e+1];f<j;)i.set(f++,a[++c])},J1=(r,e)=>(t,i,n)=>t&&t.set(r,e[n]),K1=(r,e)=>(t,i,n)=>t&&t.set(r,e.get(n)),Q1=(r,e)=>(t,i,n)=>t&&t.set(r,e.get(i.name)),Z1=(r,e)=>(t,i,n)=>t&&t.set(r,e[i.name]),X1=(r,e,t)=>{let i=t instanceof Map?Q1(e,t):t instanceof D1.Vector?K1(e,t):Array.isArray(t)?J1(e,t):Z1(e,t);r.type.children.forEach((n,a)=>i(r.getChildAt(a),n,a))},eA=(r,e,t)=>{r.type.mode===At.UnionMode.Dense?a_(r,e,t):o_(r,e,t)},a_=(r,e,t)=>{let i=r.typeIdToChildIndex[r.typeIds[e]],n=r.getChildAt(i);n&&n.set(r.valueOffsets[e],t)},o_=(r,e,t)=>{let i=r.typeIdToChildIndex[r.typeIds[e]],n=r.getChildAt(i);n&&n.set(e,t)},tA=(r,e,t)=>{let i=r.getKey(e);i!==null&&r.setValue(i,t)},rA=(r,e,t)=>{r.type.unit===At.IntervalUnit.DAY_TIME?u_(r,e,t):c_(r,e,t)},u_=({values:r},e,t)=>{r.set(t.subarray(0,2),2*e)},c_=({values:r},e,t)=>{r[e]=t[0]*12+t[1]%12},iA=(r,e,t)=>{let i=r.getChildAt(0),{stride:n}=r;for(let a=-1,c=e*n;++a<n;)i.set(c+a,t.get(a))};re.prototype.visitBool=P1;re.prototype.visitInt=x1;re.prototype.visitInt8=tr;re.prototype.visitInt16=tr;re.prototype.visitInt32=tr;re.prototype.visitInt64=ic;re.prototype.visitUint8=tr;re.prototype.visitUint16=tr;re.prototype.visitUint32=tr;re.prototype.visitUint64=ic;re.prototype.visitFloat=q1;re.prototype.visitFloat16=Qm;re.prototype.visitFloat32=tr;re.prototype.visitFloat64=tr;re.prototype.visitUtf8=L1;re.prototype.visitBinary=N1;re.prototype.visitFixedSizeBinary=V1;re.prototype.visitDate=W1;re.prototype.visitDateDay=Jm;re.prototype.visitDateMillisecond=Km;re.prototype.visitTimestamp=z1;re.prototype.visitTimestampSecond=Zm;re.prototype.visitTimestampMillisecond=Xm;re.prototype.visitTimestampMicrosecond=e_;re.prototype.visitTimestampNanosecond=t_;re.prototype.visitTime=Y1;re.prototype.visitTimeSecond=r_;re.prototype.visitTimeMillisecond=i_;re.prototype.visitTimeMicrosecond=n_;re.prototype.visitTimeNanosecond=s_;re.prototype.visitDecimal=H1;re.prototype.visitList=G1;re.prototype.visitStruct=X1;re.prototype.visitUnion=eA;re.prototype.visitDenseUnion=a_;re.prototype.visitSparseUnion=o_;re.prototype.visitDictionary=tA;re.prototype.visitInterval=rA;re.prototype.visitIntervalDayTime=u_;re.prototype.visitIntervalYearMonth=c_;re.prototype.visitFixedSizeList=iA;re.prototype.visitMap=$1;Ki.instance=new re});var l_=U(Qi=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});Qi.instance=Qi.GetBuilderCtor=void 0;var nA=it(),sA=va(),aA=Fu(),sc=Eu(),oA=Cu(),uA=ku(),cA=Mu(),lA=Zu(),Ua=Pu(),ac=qu(),gr=Nu(),dA=Qu(),fA=Xu(),hA=Ru(),pA=ec(),Kn=xu(),Qn=Lu(),oc=tc(),yA=ja(),uc=class extends nA.Visitor{visitNull(){return hA.NullBuilder}visitBool(){return aA.BoolBuilder}visitInt(){return gr.IntBuilder}visitInt8(){return gr.Int8Builder}visitInt16(){return gr.Int16Builder}visitInt32(){return gr.Int32Builder}visitInt64(){return gr.Int64Builder}visitUint8(){return gr.Uint8Builder}visitUint16(){return gr.Uint16Builder}visitUint32(){return gr.Uint32Builder}visitUint64(){return gr.Uint64Builder}visitFloat(){return Ua.FloatBuilder}visitFloat16(){return Ua.Float16Builder}visitFloat32(){return Ua.Float32Builder}visitFloat64(){return Ua.Float64Builder}visitUtf8(){return yA.Utf8Builder}visitBinary(){return sA.BinaryBuilder}visitFixedSizeBinary(){return cA.FixedSizeBinaryBuilder}visitDate(){return sc.DateBuilder}visitDateDay(){return sc.DateDayBuilder}visitDateMillisecond(){return sc.DateMillisecondBuilder}visitTimestamp(){return Kn.TimestampBuilder}visitTimestampSecond(){return Kn.TimestampSecondBuilder}visitTimestampMillisecond(){return Kn.TimestampMillisecondBuilder}visitTimestampMicrosecond(){return Kn.TimestampMicrosecondBuilder}visitTimestampNanosecond(){return Kn.TimestampNanosecondBuilder}visitTime(){return Qn.TimeBuilder}visitTimeSecond(){return Qn.TimeSecondBuilder}visitTimeMillisecond(){return Qn.TimeMillisecondBuilder}visitTimeMicrosecond(){return Qn.TimeMicrosecondBuilder}visitTimeNanosecond(){return Qn.TimeNanosecondBuilder}visitDecimal(){return oA.DecimalBuilder}visitList(){return dA.ListBuilder}visitStruct(){return pA.StructBuilder}visitUnion(){return oc.UnionBuilder}visitDenseUnion(){return oc.DenseUnionBuilder}visitSparseUnion(){return oc.SparseUnionBuilder}visitDictionary(){return uA.DictionaryBuilder}visitInterval(){return ac.IntervalBuilder}visitIntervalDayTime(){return ac.IntervalDayTimeBuilder}visitIntervalYearMonth(){return ac.IntervalYearMonthBuilder}visitFixedSizeList(){return lA.FixedSizeListBuilder}visitMap(){return fA.MapBuilder}};Qi.GetBuilderCtor=uc;Qi.instance=new uc});var Ma=U(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.DenseUnionBuilder=V.SparseUnionBuilder=V.UnionBuilder=V.StructBuilder=V.MapBuilder=V.FixedSizeListBuilder=V.ListBuilder=V.BinaryBuilder=V.Utf8Builder=V.IntervalYearMonthBuilder=V.IntervalDayTimeBuilder=V.IntervalBuilder=V.TimestampNanosecondBuilder=V.TimestampMicrosecondBuilder=V.TimestampMillisecondBuilder=V.TimestampSecondBuilder=V.TimestampBuilder=V.TimeNanosecondBuilder=V.TimeMicrosecondBuilder=V.TimeMillisecondBuilder=V.TimeSecondBuilder=V.TimeBuilder=V.Uint64Builder=V.Uint32Builder=V.Uint16Builder=V.Uint8Builder=V.Int64Builder=V.Int32Builder=V.Int16Builder=V.Int8Builder=V.IntBuilder=V.Float64Builder=V.Float32Builder=V.Float16Builder=V.FloatBuilder=V.FixedSizeBinaryBuilder=V.DictionaryBuilder=V.DecimalBuilder=V.DateMillisecondBuilder=V.DateDayBuilder=V.DateBuilder=V.NullBuilder=V.BoolBuilder=V.Builder=void 0;var mA=Ue();Object.defineProperty(V,"Builder",{enumerable:!0,get:function(){return mA.Builder}});var _A=Fu();Object.defineProperty(V,"BoolBuilder",{enumerable:!0,get:function(){return _A.BoolBuilder}});var bA=Ru();Object.defineProperty(V,"NullBuilder",{enumerable:!0,get:function(){return bA.NullBuilder}});var cc=Eu();Object.defineProperty(V,"DateBuilder",{enumerable:!0,get:function(){return cc.DateBuilder}});Object.defineProperty(V,"DateDayBuilder",{enumerable:!0,get:function(){return cc.DateDayBuilder}});Object.defineProperty(V,"DateMillisecondBuilder",{enumerable:!0,get:function(){return cc.DateMillisecondBuilder}});var gA=Cu();Object.defineProperty(V,"DecimalBuilder",{enumerable:!0,get:function(){return gA.DecimalBuilder}});var vA=ku();Object.defineProperty(V,"DictionaryBuilder",{enumerable:!0,get:function(){return vA.DictionaryBuilder}});var wA=Mu();Object.defineProperty(V,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return wA.FixedSizeBinaryBuilder}});var ka=Pu();Object.defineProperty(V,"FloatBuilder",{enumerable:!0,get:function(){return ka.FloatBuilder}});Object.defineProperty(V,"Float16Builder",{enumerable:!0,get:function(){return ka.Float16Builder}});Object.defineProperty(V,"Float32Builder",{enumerable:!0,get:function(){return ka.Float32Builder}});Object.defineProperty(V,"Float64Builder",{enumerable:!0,get:function(){return ka.Float64Builder}});var vr=Nu();Object.defineProperty(V,"IntBuilder",{enumerable:!0,get:function(){return vr.IntBuilder}});Object.defineProperty(V,"Int8Builder",{enumerable:!0,get:function(){return vr.Int8Builder}});Object.defineProperty(V,"Int16Builder",{enumerable:!0,get:function(){return vr.Int16Builder}});Object.defineProperty(V,"Int32Builder",{enumerable:!0,get:function(){return vr.Int32Builder}});Object.defineProperty(V,"Int64Builder",{enumerable:!0,get:function(){return vr.Int64Builder}});Object.defineProperty(V,"Uint8Builder",{enumerable:!0,get:function(){return vr.Uint8Builder}});Object.defineProperty(V,"Uint16Builder",{enumerable:!0,get:function(){return vr.Uint16Builder}});Object.defineProperty(V,"Uint32Builder",{enumerable:!0,get:function(){return vr.Uint32Builder}});Object.defineProperty(V,"Uint64Builder",{enumerable:!0,get:function(){return vr.Uint64Builder}});var Zn=Lu();Object.defineProperty(V,"TimeBuilder",{enumerable:!0,get:function(){return Zn.TimeBuilder}});Object.defineProperty(V,"TimeSecondBuilder",{enumerable:!0,get:function(){return Zn.TimeSecondBuilder}});Object.defineProperty(V,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return Zn.TimeMillisecondBuilder}});Object.defineProperty(V,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return Zn.TimeMicrosecondBuilder}});Object.defineProperty(V,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return Zn.TimeNanosecondBuilder}});var Xn=xu();Object.defineProperty(V,"TimestampBuilder",{enumerable:!0,get:function(){return Xn.TimestampBuilder}});Object.defineProperty(V,"TimestampSecondBuilder",{enumerable:!0,get:function(){return Xn.TimestampSecondBuilder}});Object.defineProperty(V,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return Xn.TimestampMillisecondBuilder}});Object.defineProperty(V,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return Xn.TimestampMicrosecondBuilder}});Object.defineProperty(V,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return Xn.TimestampNanosecondBuilder}});var lc=qu();Object.defineProperty(V,"IntervalBuilder",{enumerable:!0,get:function(){return lc.IntervalBuilder}});Object.defineProperty(V,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return lc.IntervalDayTimeBuilder}});Object.defineProperty(V,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return lc.IntervalYearMonthBuilder}});var jA=ja();Object.defineProperty(V,"Utf8Builder",{enumerable:!0,get:function(){return jA.Utf8Builder}});var TA=va();Object.defineProperty(V,"BinaryBuilder",{enumerable:!0,get:function(){return TA.BinaryBuilder}});var BA=Qu();Object.defineProperty(V,"ListBuilder",{enumerable:!0,get:function(){return BA.ListBuilder}});var IA=Zu();Object.defineProperty(V,"FixedSizeListBuilder",{enumerable:!0,get:function(){return IA.FixedSizeListBuilder}});var SA=Xu();Object.defineProperty(V,"MapBuilder",{enumerable:!0,get:function(){return SA.MapBuilder}});var OA=ec();Object.defineProperty(V,"StructBuilder",{enumerable:!0,get:function(){return OA.StructBuilder}});var dc=tc();Object.defineProperty(V,"UnionBuilder",{enumerable:!0,get:function(){return dc.UnionBuilder}});Object.defineProperty(V,"SparseUnionBuilder",{enumerable:!0,get:function(){return dc.SparseUnionBuilder}});Object.defineProperty(V,"DenseUnionBuilder",{enumerable:!0,get:function(){return dc.DenseUnionBuilder}});var fc=Ie(),AA=ja(),DA=Ue(),d_=nc(),f_=l_();DA.Builder.new=h_;function h_(r){let e=r.type,t=new(f_.instance.getVisitFn(e)())(r);if(e.children&&e.children.length>0){let i=r.children||[],n={nullValues:r.nullValues},a=Array.isArray(i)?(c,f)=>i[f]||n:({name:c})=>i[c]||n;e.children.forEach((c,f)=>{let{type:j}=c,s=a(c,f);t.children.push(h_({...s,type:j}))})}return t}Object.keys(fc.Type).map(r=>fc.Type[r]).filter(r=>typeof r=="number"&&r!==fc.Type.NONE).forEach(r=>{let e=f_.instance.visit(r);e.prototype._setValue=d_.instance.getVisitFn(r)});AA.Utf8Builder.prototype._setValue=d_.instance.visitBinary});var y_=U(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.org=void 0;var hc=Ui(),p_;(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsFooter(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}version(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt16(this.bb_pos+s):hc.org.apache.arrow.flatbuf.MetadataVersion.V1}schema(s){let m=this.bb.__offset(this.bb_pos,6);return m?(s||new hc.org.apache.arrow.flatbuf.Schema).__init(this.bb.__indirect(this.bb_pos+m),this.bb):null}dictionaries(s,m){let R=this.bb.__offset(this.bb_pos,8);return R?(m||new r.apache.arrow.flatbuf.Block).__init(this.bb.__vector(this.bb_pos+R)+s*24,this.bb):null}dictionariesLength(){let s=this.bb.__offset(this.bb_pos,8);return s?this.bb.__vector_len(this.bb_pos+s):0}recordBatches(s,m){let R=this.bb.__offset(this.bb_pos,10);return R?(m||new r.apache.arrow.flatbuf.Block).__init(this.bb.__vector(this.bb_pos+R)+s*24,this.bb):null}recordBatchesLength(){let s=this.bb.__offset(this.bb_pos,10);return s?this.bb.__vector_len(this.bb_pos+s):0}static startFooter(s){s.startObject(4)}static addVersion(s,m){s.addFieldInt16(0,m,hc.org.apache.arrow.flatbuf.MetadataVersion.V1)}static addSchema(s,m){s.addFieldOffset(1,m,0)}static addDictionaries(s,m){s.addFieldOffset(2,m,0)}static startDictionariesVector(s,m){s.startVector(24,m,8)}static addRecordBatches(s,m){s.addFieldOffset(3,m,0)}static startRecordBatchesVector(s,m){s.startVector(24,m,8)}static endFooter(s){return s.endObject()}static finishFooterBuffer(s,m){s.finish(m)}static createFooter(s,m,R,$,ue){return f.startFooter(s),f.addVersion(s,m),f.addSchema(s,R),f.addDictionaries(s,$),f.addRecordBatches(s,ue),f.endFooter(s)}}c.Footer=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(p_=yi.org||(yi.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static createBlock(s,m,R,$){return s.prep(8,24),s.writeInt64($),s.pad(4),s.writeInt32(R),s.writeInt64(m),s.offset()}}c.Block=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(p_=yi.org||(yi.org={}))});var mc=U(Zi=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});Zi.FileBlock=Zi.Footer=void 0;var m_=y_(),pc=Di(),__=pc.flatbuffers.Long,FA=pc.flatbuffers.Builder,RA=pc.flatbuffers.ByteBuffer,EA=m_.org.apache.arrow.flatbuf.Block,rr=m_.org.apache.arrow.flatbuf.Footer,b_=Qe(),g_=Ie(),CA=Ne(),yc=class{constructor(e,t=g_.MetadataVersion.V4,i,n){this.schema=e,this.version=t,i&&(this._recordBatches=i),n&&(this._dictionaryBatches=n)}static decode(e){e=new RA(CA.toUint8Array(e));let t=rr.getRootAsFooter(e),i=b_.Schema.decode(t.schema());return new v_(i,t)}static encode(e){let t=new FA,i=b_.Schema.encode(t,e.schema);rr.startRecordBatchesVector(t,e.numRecordBatches),[...e.recordBatches()].slice().reverse().forEach(c=>Lr.encode(t,c));let n=t.endVector();rr.startDictionariesVector(t,e.numDictionaries),[...e.dictionaryBatches()].slice().reverse().forEach(c=>Lr.encode(t,c));let a=t.endVector();return rr.startFooter(t),rr.addSchema(t,i),rr.addVersion(t,g_.MetadataVersion.V4),rr.addRecordBatches(t,n),rr.addDictionaries(t,a),rr.finishFooterBuffer(t,rr.endFooter(t)),t.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}*recordBatches(){for(let e,t=-1,i=this.numRecordBatches;++t<i;)(e=this.getRecordBatch(t))&&(yield e)}*dictionaryBatches(){for(let e,t=-1,i=this.numDictionaries;++t<i;)(e=this.getDictionaryBatch(t))&&(yield e)}getRecordBatch(e){return e>=0&&e<this.numRecordBatches&&this._recordBatches[e]||null}getDictionaryBatch(e){return e>=0&&e<this.numDictionaries&&this._dictionaryBatches[e]||null}};Zi.Footer=yc;var v_=class extends yc{constructor(e,t){super(e,t.version());this._footer=t}get numRecordBatches(){return this._footer.recordBatchesLength()}get numDictionaries(){return this._footer.dictionariesLength()}getRecordBatch(e){if(e>=0&&e<this.numRecordBatches){let t=this._footer.recordBatches(e);if(t)return Lr.decode(t)}return null}getDictionaryBatch(e){if(e>=0&&e<this.numDictionaries){let t=this._footer.dictionaries(e);if(t)return Lr.decode(t)}return null}},Lr=class{constructor(e,t,i){this.metaDataLength=e,this.offset=typeof i=="number"?i:i.low,this.bodyLength=typeof t=="number"?t:t.low}static decode(e){return new Lr(e.metaDataLength(),e.bodyLength(),e.offset())}static encode(e,t){let{metaDataLength:i}=t,n=new __(t.offset,0),a=new __(t.bodyLength,0);return EA.createBlock(e,n,i,a)}};Zi.FileBlock=Lr});var zr=U(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.AsyncByteStream=Wr.ByteStream=Wr.AsyncByteQueue=void 0;var xr=kn(),w_=ci(),es=Ei(),_c=Ne(),Xi=ut(),bc=class extends es.AsyncQueue{write(e){if((e=_c.toUint8Array(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?w_.decodeUtf8(this.toUint8Array(!0)):this.toUint8Array(!1).then(w_.decodeUtf8)}toUint8Array(e=!1){return e?_c.joinUint8Arrays(this._values)[0]:(async()=>{let t=[],i=0;for await(let n of this)t.push(n),i+=n.byteLength;return _c.joinUint8Arrays(t,i)[0]})()}};Wr.AsyncByteQueue=bc;var j_=class{constructor(e){e&&(this.source=new T_(xr.default.fromIterable(e)))}[Symbol.iterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}};Wr.ByteStream=j_;var Pa=class{constructor(e){e instanceof Pa?this.source=e.source:e instanceof bc?this.source=new qr(xr.default.fromAsyncIterable(e)):Xi.isReadableNodeStream(e)?this.source=new qr(xr.default.fromNodeStream(e)):Xi.isReadableDOMStream(e)?this.source=new qr(xr.default.fromDOMStream(e)):Xi.isFetchResponse(e)?this.source=new qr(xr.default.fromDOMStream(e.body)):Xi.isIterable(e)?this.source=new qr(xr.default.fromIterable(e)):Xi.isPromise(e)?this.source=new qr(xr.default.fromAsyncIterable(e)):Xi.isAsyncIterable(e)&&(this.source=new qr(xr.default.fromAsyncIterable(e)))}[Symbol.asyncIterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}get closed(){return this.source.closed}cancel(e){return this.source.cancel(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}};Wr.AsyncByteStream=Pa;var T_=class{constructor(e){this.source=e}cancel(e){this.return(e)}peek(e){return this.next(e,"peek").value}read(e){return this.next(e,"read").value}next(e,t="read"){return this.source.next({cmd:t,size:e})}throw(e){return Object.create(this.source.throw&&this.source.throw(e)||es.ITERATOR_DONE)}return(e){return Object.create(this.source.return&&this.source.return(e)||es.ITERATOR_DONE)}},qr=class{constructor(e){this.source=e,this._closedPromise=new Promise(t=>this._closedPromiseResolve=t)}async cancel(e){await this.return(e)}get closed(){return this._closedPromise}async read(e){return(await this.next(e,"read")).value}async peek(e){return(await this.next(e,"peek")).value}async next(e,t="read"){return await this.source.next({cmd:t,size:e})}async throw(e){let t=this.source.throw&&await this.source.throw(e)||es.ITERATOR_DONE;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)}async return(e){let t=this.source.return&&await this.source.return(e)||es.ITERATOR_DONE;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)}}});var gc=U(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.AsyncRandomAccessFile=en.RandomAccessFile=void 0;var B_=zr(),UA=Ne(),I_=class extends B_.ByteStream{constructor(e,t){super();this.position=0,this.buffer=UA.toUint8Array(e),this.size=typeof t=="undefined"?this.buffer.byteLength:t}readInt32(e){let{buffer:t,byteOffset:i}=this.readAt(e,4);return new DataView(t,i).getInt32(0,!0)}seek(e){return this.position=Math.min(e,this.size),e<this.size}read(e){let{buffer:t,size:i,position:n}=this;return t&&n<i?(typeof e!="number"&&(e=1/0),this.position=Math.min(i,n+Math.min(i-n,e)),t.subarray(n,this.position)):null}readAt(e,t){let i=this.buffer,n=Math.min(this.size,e+t);return i?i.subarray(e,n):new Uint8Array(t)}close(){this.buffer&&(this.buffer=null)}throw(e){return this.close(),{done:!0,value:e}}return(e){return this.close(),{done:!0,value:e}}};en.RandomAccessFile=I_;var S_=class extends B_.AsyncByteStream{constructor(e,t){super();this.position=0,this._handle=e,typeof t=="number"?this.size=t:this._pending=(async()=>{this.size=(await e.stat()).size,delete this._pending})()}async readInt32(e){let{buffer:t,byteOffset:i}=await this.readAt(e,4);return new DataView(t,i).getInt32(0,!0)}async seek(e){return this._pending&&await this._pending,this.position=Math.min(e,this.size),e<this.size}async read(e){this._pending&&await this._pending;let{_handle:t,size:i,position:n}=this;if(t&&n<i){typeof e!="number"&&(e=1/0);let a=n,c=0,f=0,j=Math.min(i,a+Math.min(i-a,e)),s=new Uint8Array(Math.max(0,(this.position=j)-a));for(;(a+=f)<j&&(c+=f)<s.byteLength;)({bytesRead:f}=await t.read(s,c,s.byteLength-c,a));return s}return null}async readAt(e,t){this._pending&&await this._pending;let{_handle:i,size:n}=this;if(i&&e+t<n){let a=Math.min(n,e+t),c=new Uint8Array(a-e);return(await i.read(c,0,t,e)).buffer}return new Uint8Array(t)}async close(){let e=this._handle;this._handle=null,e&&await e.close()}async throw(e){return await this.close(),{done:!0,value:e}}async return(e){return await this.close(),{done:!0,value:e}}};en.AsyncRandomAccessFile=S_});var wc=U(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.Int128=ir.Int64=ir.Uint64=ir.BaseInt64=void 0;var kA=1<<16;function tn(r){return r<0&&(r=4294967295+r+1),`0x${r.toString(16)}`}var rn=8,vc=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8],Va=class{constructor(e){this.buffer=e}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(e){let t=new Uint32Array([this.buffer[1]>>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),i=new Uint32Array([e.buffer[1]>>>16,e.buffer[1]&65535,e.buffer[0]>>>16,e.buffer[0]&65535]),n=t[3]*i[3];this.buffer[0]=n&65535;let a=n>>>16;return n=t[2]*i[3],a+=n,n=t[3]*i[2]>>>0,a+=n,this.buffer[0]+=a<<16,this.buffer[1]=a>>>0<n?kA:0,this.buffer[1]+=a>>>16,this.buffer[1]+=t[1]*i[3]+t[2]*i[2]+t[3]*i[1],this.buffer[1]+=t[0]*i[3]+t[1]*i[2]+t[2]*i[1]+t[3]*i[0]<<16,this}_plus(e){let t=this.buffer[0]+e.buffer[0]>>>0;this.buffer[1]+=e.buffer[1],t<this.buffer[0]>>>0&&++this.buffer[1],this.buffer[0]=t}lessThan(e){return this.buffer[1]<e.buffer[1]||this.buffer[1]===e.buffer[1]&&this.buffer[0]<e.buffer[0]}equals(e){return this.buffer[1]===e.buffer[1]&&this.buffer[0]==e.buffer[0]}greaterThan(e){return e.lessThan(this)}hex(){return`${tn(this.buffer[1])} ${tn(this.buffer[0])}`}};ir.BaseInt64=Va;var we=class extends Va{times(e){return this._times(e),this}plus(e){return this._plus(e),this}static from(e,t=new Uint32Array(2)){return we.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return we.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){let i=e.length,n=new we(t);for(let a=0;a<i;){let c=rn<i-a?rn:i-a,f=new we(new Uint32Array([parseInt(e.substr(a,c),10),0])),j=new we(new Uint32Array([vc[c],0]));n.times(j),n.plus(f),a+=c}return n}static convertArray(e){let t=new Uint32Array(e.length*2);for(let i=-1,n=e.length;++i<n;)we.from(e[i],new Uint32Array(t.buffer,t.byteOffset+2*i*4,2));return t}static multiply(e,t){return new we(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new we(new Uint32Array(e.buffer)).plus(t)}};ir.Uint64=we;var wt=class extends Va{negate(){return this.buffer[0]=~this.buffer[0]+1,this.buffer[1]=~this.buffer[1],this.buffer[0]==0&&++this.buffer[1],this}times(e){return this._times(e),this}plus(e){return this._plus(e),this}lessThan(e){let t=this.buffer[1]<<0,i=e.buffer[1]<<0;return t<i||t===i&&this.buffer[0]<e.buffer[0]}static from(e,t=new Uint32Array(2)){return wt.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return wt.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){let i=e.startsWith("-"),n=e.length,a=new wt(t);for(let c=i?1:0;c<n;){let f=rn<n-c?rn:n-c,j=new wt(new Uint32Array([parseInt(e.substr(c,f),10),0])),s=new wt(new Uint32Array([vc[f],0]));a.times(s),a.plus(j),c+=f}return i?a.negate():a}static convertArray(e){let t=new Uint32Array(e.length*2);for(let i=-1,n=e.length;++i<n;)wt.from(e[i],new Uint32Array(t.buffer,t.byteOffset+2*i*4,2));return t}static multiply(e,t){return new wt(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new wt(new Uint32Array(e.buffer)).plus(t)}};ir.Int64=wt;var xt=class{constructor(e){this.buffer=e}high(){return new wt(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2))}low(){return new wt(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(e){let t=new we(new Uint32Array([this.buffer[3],0])),i=new we(new Uint32Array([this.buffer[2],0])),n=new we(new Uint32Array([this.buffer[1],0])),a=new we(new Uint32Array([this.buffer[0],0])),c=new we(new Uint32Array([e.buffer[3],0])),f=new we(new Uint32Array([e.buffer[2],0])),j=new we(new Uint32Array([e.buffer[1],0])),s=new we(new Uint32Array([e.buffer[0],0])),m=we.multiply(a,s);this.buffer[0]=m.low();let R=new we(new Uint32Array([m.high(),0]));return m=we.multiply(n,s),R.plus(m),m=we.multiply(a,j),R.plus(m),this.buffer[1]=R.low(),this.buffer[3]=R.lessThan(m)?1:0,this.buffer[2]=R.high(),new we(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2)).plus(we.multiply(i,s)).plus(we.multiply(n,j)).plus(we.multiply(a,f)),this.buffer[3]+=we.multiply(t,s).plus(we.multiply(i,j)).plus(we.multiply(n,f)).plus(we.multiply(a,c)).low(),this}plus(e){let t=new Uint32Array(4);return t[3]=this.buffer[3]+e.buffer[3]>>>0,t[2]=this.buffer[2]+e.buffer[2]>>>0,t[1]=this.buffer[1]+e.buffer[1]>>>0,t[0]=this.buffer[0]+e.buffer[0]>>>0,t[0]<this.buffer[0]>>>0&&++t[1],t[1]<this.buffer[1]>>>0&&++t[2],t[2]<this.buffer[2]>>>0&&++t[3],this.buffer[3]=t[3],this.buffer[2]=t[2],this.buffer[1]=t[1],this.buffer[0]=t[0],this}hex(){return`${tn(this.buffer[3])} ${tn(this.buffer[2])} ${tn(this.buffer[1])} ${tn(this.buffer[0])}`}static multiply(e,t){return new xt(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new xt(new Uint32Array(e.buffer)).plus(t)}static from(e,t=new Uint32Array(4)){return xt.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(4)){return xt.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(4)){let i=e.startsWith("-"),n=e.length,a=new xt(t);for(let c=i?1:0;c<n;){let f=rn<n-c?rn:n-c,j=new xt(new Uint32Array([parseInt(e.substr(c,f),10),0,0,0])),s=new xt(new Uint32Array([vc[f],0,0,0]));a.times(s),a.plus(j),c+=f}return i?a.negate():a}static convertArray(e){let t=new Uint32Array(e.length*4);for(let i=-1,n=e.length;++i<n;)xt.from(e[i],new Uint32Array(t.buffer,t.byteOffset+4*4*i,4));return t}};ir.Int128=xt});var F_=U(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.JSONVectorLoader=nn.VectorLoader=void 0;var He=Nt(),MA=Qe(),wr=ve(),PA=it(),O_=Kt(),VA=ci(),Na=wc(),A_=Ie(),nr=Ne(),jc=class extends PA.Visitor{constructor(e,t,i,n){super();this.nodesIndex=-1,this.buffersIndex=-1,this.bytes=e,this.nodes=t,this.buffers=i,this.dictionaries=n}visit(e){return super.visit(e instanceof MA.Field?e.type:e)}visitNull(e,{length:t}=this.nextFieldNode()){return He.Data.Null(e,0,t)}visitBool(e,{length:t,nullCount:i}=this.nextFieldNode()){return He.Data.Bool(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitInt(e,{length:t,nullCount:i}=this.nextFieldNode()){return He.Data.Int(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitFloat(e,{length:t,nullCount:i}=this.nextFieldNode()){return He.Data.Float(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitUtf8(e,{length:t,nullCount:i}=this.nextFieldNode()){return He.Data.Utf8(e,0,t,i,this.readNullBitmap(e,i),this.readOffsets(e),this.readData(e))}visitBinary(e,{length:t,nullCount:i}=this.nextFieldNode()){return He.Data.Binary(e,0,t,i,this.readNullBitmap(e,i),this.readOffsets(e),this.readData(e))}visitFixedSizeBinary(e,{length:t,nullCount:i}=this.nextFieldNode()){return He.Data.FixedSizeBinary(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitDate(e,{length:t,nullCount:i}=this.nextFieldNode()){return He.Data.Date(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitTimestamp(e,{length:t,nullCount:i}=this.nextFieldNode()){return He.Data.Timestamp(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitTime(e,{length:t,nullCount:i}=this.nextFieldNode()){return He.Data.Time(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitDecimal(e,{length:t,nullCount:i}=this.nextFieldNode()){return He.Data.Decimal(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitList(e,{length:t,nullCount:i}=this.nextFieldNode()){return He.Data.List(e,0,t,i,this.readNullBitmap(e,i),this.readOffsets(e),this.visit(e.children[0]))}visitStruct(e,{length:t,nullCount:i}=this.nextFieldNode()){return He.Data.Struct(e,0,t,i,this.readNullBitmap(e,i),this.visitMany(e.children))}visitUnion(e){return e.mode===A_.UnionMode.Sparse?this.visitSparseUnion(e):this.visitDenseUnion(e)}visitDenseUnion(e,{length:t,nullCount:i}=this.nextFieldNode()){return He.Data.Union(e,0,t,i,this.readNullBitmap(e,i),this.readTypeIds(e),this.readOffsets(e),this.visitMany(e.children))}visitSparseUnion(e,{length:t,nullCount:i}=this.nextFieldNode()){return He.Data.Union(e,0,t,i,this.readNullBitmap(e,i),this.readTypeIds(e),this.visitMany(e.children))}visitDictionary(e,{length:t,nullCount:i}=this.nextFieldNode()){return He.Data.Dictionary(e,0,t,i,this.readNullBitmap(e,i),this.readData(e.indices),this.readDictionary(e))}visitInterval(e,{length:t,nullCount:i}=this.nextFieldNode()){return He.Data.Interval(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitFixedSizeList(e,{length:t,nullCount:i}=this.nextFieldNode()){return He.Data.FixedSizeList(e,0,t,i,this.readNullBitmap(e,i),this.visit(e.children[0]))}visitMap(e,{length:t,nullCount:i}=this.nextFieldNode()){return He.Data.Map(e,0,t,i,this.readNullBitmap(e,i),this.readOffsets(e),this.visit(e.children[0]))}nextFieldNode(){return this.nodes[++this.nodesIndex]}nextBufferRange(){return this.buffers[++this.buffersIndex]}readNullBitmap(e,t,i=this.nextBufferRange()){return t>0&&this.readData(e,i)||new Uint8Array(0)}readOffsets(e,t){return this.readData(e,t)}readTypeIds(e,t){return this.readData(e,t)}readData(e,{length:t,offset:i}=this.nextBufferRange()){return this.bytes.subarray(i,i+t)}readDictionary(e){return this.dictionaries.get(e.id)}};nn.VectorLoader=jc;var D_=class extends jc{constructor(e,t,i,n){super(new Uint8Array(0),t,i,n);this.sources=e}readNullBitmap(e,t,{offset:i}=this.nextBufferRange()){return t<=0?new Uint8Array(0):O_.packBools(this.sources[i])}readOffsets(e,{offset:t}=this.nextBufferRange()){return nr.toArrayBufferView(Uint8Array,nr.toArrayBufferView(Int32Array,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return nr.toArrayBufferView(Uint8Array,nr.toArrayBufferView(e.ArrayType,this.sources[t]))}readData(e,{offset:t}=this.nextBufferRange()){let{sources:i}=this;return wr.DataType.isTimestamp(e)||(wr.DataType.isInt(e)||wr.DataType.isTime(e))&&e.bitWidth===64||wr.DataType.isDate(e)&&e.unit===A_.DateUnit.MILLISECOND?nr.toArrayBufferView(Uint8Array,Na.Int64.convertArray(i[t])):wr.DataType.isDecimal(e)?nr.toArrayBufferView(Uint8Array,Na.Int128.convertArray(i[t])):wr.DataType.isBinary(e)||wr.DataType.isFixedSizeBinary(e)?NA(i[t]):wr.DataType.isBool(e)?O_.packBools(i[t]):wr.DataType.isUtf8(e)?VA.encodeUtf8(i[t].join("")):nr.toArrayBufferView(Uint8Array,nr.toArrayBufferView(e.ArrayType,i[t].map(n=>+n)))}};nn.JSONVectorLoader=D_;function NA(r){let e=r.join(""),t=new Uint8Array(e.length/2);for(let i=0;i<e.length;i+=2)t[i>>1]=parseInt(e.substr(i,2),16);return t}});var P_=U(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.instance=an.TypeAssembler=void 0;var LA=Di(),xA=LA.flatbuffers.Long,Ze=Ui(),qA=it(),R_=Ze.org.apache.arrow.flatbuf.Null,La=Ze.org.apache.arrow.flatbuf.Int,Tc=Ze.org.apache.arrow.flatbuf.FloatingPoint,E_=Ze.org.apache.arrow.flatbuf.Binary,C_=Ze.org.apache.arrow.flatbuf.Bool,U_=Ze.org.apache.arrow.flatbuf.Utf8,xa=Ze.org.apache.arrow.flatbuf.Decimal,Bc=Ze.org.apache.arrow.flatbuf.Date,qa=Ze.org.apache.arrow.flatbuf.Time,Wa=Ze.org.apache.arrow.flatbuf.Timestamp,Ic=Ze.org.apache.arrow.flatbuf.Interval,k_=Ze.org.apache.arrow.flatbuf.List,M_=Ze.org.apache.arrow.flatbuf.Struct_,sn=Ze.org.apache.arrow.flatbuf.Union,ts=Ze.org.apache.arrow.flatbuf.DictionaryEncoding,Sc=Ze.org.apache.arrow.flatbuf.FixedSizeBinary,Oc=Ze.org.apache.arrow.flatbuf.FixedSizeList,Ac=Ze.org.apache.arrow.flatbuf.Map,Dc=class extends qA.Visitor{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return R_.startNull(t),R_.endNull(t)}visitInt(e,t){return La.startInt(t),La.addBitWidth(t,e.bitWidth),La.addIsSigned(t,e.isSigned),La.endInt(t)}visitFloat(e,t){return Tc.startFloatingPoint(t),Tc.addPrecision(t,e.precision),Tc.endFloatingPoint(t)}visitBinary(e,t){return E_.startBinary(t),E_.endBinary(t)}visitBool(e,t){return C_.startBool(t),C_.endBool(t)}visitUtf8(e,t){return U_.startUtf8(t),U_.endUtf8(t)}visitDecimal(e,t){return xa.startDecimal(t),xa.addScale(t,e.scale),xa.addPrecision(t,e.precision),xa.endDecimal(t)}visitDate(e,t){return Bc.startDate(t),Bc.addUnit(t,e.unit),Bc.endDate(t)}visitTime(e,t){return qa.startTime(t),qa.addUnit(t,e.unit),qa.addBitWidth(t,e.bitWidth),qa.endTime(t)}visitTimestamp(e,t){let i=e.timezone&&t.createString(e.timezone)||void 0;return Wa.startTimestamp(t),Wa.addUnit(t,e.unit),i!==void 0&&Wa.addTimezone(t,i),Wa.endTimestamp(t)}visitInterval(e,t){return Ic.startInterval(t),Ic.addUnit(t,e.unit),Ic.endInterval(t)}visitList(e,t){return k_.startList(t),k_.endList(t)}visitStruct(e,t){return M_.startStruct_(t),M_.endStruct_(t)}visitUnion(e,t){sn.startTypeIdsVector(t,e.typeIds.length);let i=sn.createTypeIdsVector(t,e.typeIds);return sn.startUnion(t),sn.addMode(t,e.mode),sn.addTypeIds(t,i),sn.endUnion(t)}visitDictionary(e,t){let i=this.visit(e.indices,t);return ts.startDictionaryEncoding(t),ts.addId(t,new xA(e.id,0)),ts.addIsOrdered(t,e.isOrdered),i!==void 0&&ts.addIndexType(t,i),ts.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return Sc.startFixedSizeBinary(t),Sc.addByteWidth(t,e.byteWidth),Sc.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return Oc.startFixedSizeList(t),Oc.addListSize(t,e.listSize),Oc.endFixedSizeList(t)}visitMap(e,t){return Ac.startMap(t),Ac.addKeysSorted(t,e.keysSorted),Ac.endMap(t)}};an.TypeAssembler=Dc;an.instance=new Dc});var z_=U(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.fieldFromJSON=sr.dictionaryBatchFromJSON=sr.recordBatchFromJSON=sr.schemaFromJSON=void 0;var on=Qe(),Ae=ve(),mi=_i(),un=Ie();function WA(r,e=new Map){return new on.Schema(YA(r,e),za(r.customMetadata),e)}sr.schemaFromJSON=WA;function V_(r){return new mi.RecordBatch(r.count,L_(r.columns),x_(r.columns))}sr.recordBatchFromJSON=V_;function zA(r){return new mi.DictionaryBatch(V_(r.data),r.id,r.isDelta)}sr.dictionaryBatchFromJSON=zA;function YA(r,e){return(r.fields||[]).filter(Boolean).map(t=>on.Field.fromJSON(t,e))}function N_(r,e){return(r.children||[]).filter(Boolean).map(t=>on.Field.fromJSON(t,e))}function L_(r){return(r||[]).reduce((e,t)=>[...e,new mi.FieldNode(t.count,HA(t.VALIDITY)),...L_(t.children)],[])}function x_(r,e=[]){for(let t=-1,i=(r||[]).length;++t<i;){let n=r[t];n.VALIDITY&&e.push(new mi.BufferRegion(e.length,n.VALIDITY.length)),n.TYPE&&e.push(new mi.BufferRegion(e.length,n.TYPE.length)),n.OFFSET&&e.push(new mi.BufferRegion(e.length,n.OFFSET.length)),n.DATA&&e.push(new mi.BufferRegion(e.length,n.DATA.length)),e=x_(n.children,e)}return e}function HA(r){return(r||[]).reduce((e,t)=>e+ +(t===0),0)}function GA(r,e){let t,i,n,a,c,f;return!e||!(a=r.dictionary)?(c=W_(r,N_(r,e)),n=new on.Field(r.name,c,r.nullable,za(r.customMetadata))):e.has(t=a.id)?(i=(i=a.indexType)?q_(i):new Ae.Int32,f=new Ae.Dictionary(e.get(t),i,t,a.isOrdered),n=new on.Field(r.name,f,r.nullable,za(r.customMetadata))):(i=(i=a.indexType)?q_(i):new Ae.Int32,e.set(t,c=W_(r,N_(r,e))),f=new Ae.Dictionary(c,i,t,a.isOrdered),n=new on.Field(r.name,f,r.nullable,za(r.customMetadata))),n||null}sr.fieldFromJSON=GA;function za(r){return new Map(Object.entries(r||{}))}function q_(r){return new Ae.Int(r.isSigned,r.bitWidth)}function W_(r,e){let t=r.type.name;switch(t){case"NONE":return new Ae.Null;case"null":return new Ae.Null;case"binary":return new Ae.Binary;case"utf8":return new Ae.Utf8;case"bool":return new Ae.Bool;case"list":return new Ae.List((e||[])[0]);case"struct":return new Ae.Struct(e||[]);case"struct_":return new Ae.Struct(e||[])}switch(t){case"int":{let i=r.type;return new Ae.Int(i.isSigned,i.bitWidth)}case"floatingpoint":{let i=r.type;return new Ae.Float(un.Precision[i.precision])}case"decimal":{let i=r.type;return new Ae.Decimal(i.scale,i.precision)}case"date":{let i=r.type;return new Ae.Date_(un.DateUnit[i.unit])}case"time":{let i=r.type;return new Ae.Time(un.TimeUnit[i.unit],i.bitWidth)}case"timestamp":{let i=r.type;return new Ae.Timestamp(un.TimeUnit[i.unit],i.timezone)}case"interval":{let i=r.type;return new Ae.Interval(un.IntervalUnit[i.unit])}case"union":{let i=r.type;return new Ae.Union(un.UnionMode[i.mode],i.typeIds||[],e||[])}case"fixedsizebinary":{let i=r.type;return new Ae.FixedSizeBinary(i.byteWidth)}case"fixedsizelist":{let i=r.type;return new Ae.FixedSizeList(i.listSize,(e||[])[0])}case"map":{let i=r.type;return new Ae.Map_((e||[])[0],i.keysSorted)}}throw new Error(`Unrecognized type: "${t}"`)}});var _i=U(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.FieldNode=Ft.BufferRegion=Ft.DictionaryBatch=Ft.RecordBatch=Ft.Message=void 0;var Fc=Di(),st=Ui(),Ya=au(),Xe=Qe(),$A=Ne(),ke=Ie(),Rc=P_(),Ha=z_(),bi=Fc.flatbuffers.Long,JA=Fc.flatbuffers.Builder,KA=Fc.flatbuffers.ByteBuffer,Ge=st.org.apache.arrow.flatbuf.Type,qt=st.org.apache.arrow.flatbuf.Field,jr=st.org.apache.arrow.flatbuf.Schema,QA=st.org.apache.arrow.flatbuf.Buffer,Yr=Ya.org.apache.arrow.flatbuf.Message,Hr=st.org.apache.arrow.flatbuf.KeyValue,ZA=Ya.org.apache.arrow.flatbuf.FieldNode,Y_=st.org.apache.arrow.flatbuf.Endianness,Gr=Ya.org.apache.arrow.flatbuf.RecordBatch,cn=Ya.org.apache.arrow.flatbuf.DictionaryBatch,De=ve(),$r=class{constructor(e,t,i,n){this._version=t,this._headerType=i,this.body=new Uint8Array(0),n&&(this._createHeader=()=>n),this._bodyLength=typeof e=="number"?e:e.low}static fromJSON(e,t){let i=new $r(0,ke.MetadataVersion.V4,t);return i._createHeader=XA(e,t),i}static decode(e){e=new KA($A.toUint8Array(e));let t=Yr.getRootAsMessage(e),i=t.bodyLength(),n=t.version(),a=t.headerType(),c=new $r(i,n,a);return c._createHeader=eD(t,a),c}static encode(e){let t=new JA,i=-1;return e.isSchema()?i=Xe.Schema.encode(t,e.header()):e.isRecordBatch()?i=Dt.encode(t,e.header()):e.isDictionaryBatch()&&(i=ar.encode(t,e.header())),Yr.startMessage(t),Yr.addVersion(t,ke.MetadataVersion.V4),Yr.addHeader(t,i),Yr.addHeaderType(t,e.headerType),Yr.addBodyLength(t,new bi(e.bodyLength,0)),Yr.finishMessageBuffer(t,Yr.endMessage(t)),t.asUint8Array()}static from(e,t=0){if(e instanceof Xe.Schema)return new $r(0,ke.MetadataVersion.V4,ke.MessageHeader.Schema,e);if(e instanceof Dt)return new $r(t,ke.MetadataVersion.V4,ke.MessageHeader.RecordBatch,e);if(e instanceof ar)return new $r(t,ke.MetadataVersion.V4,ke.MessageHeader.DictionaryBatch,e);throw new Error(`Unrecognized Message header: ${e}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===ke.MessageHeader.Schema}isRecordBatch(){return this.headerType===ke.MessageHeader.RecordBatch}isDictionaryBatch(){return this.headerType===ke.MessageHeader.DictionaryBatch}};Ft.Message=$r;var Dt=class{constructor(e,t,i){this._nodes=t,this._buffers=i,this._length=typeof e=="number"?e:e.low}get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}};Ft.RecordBatch=Dt;var ar=class{constructor(e,t,i=!1){this._data=e,this._isDelta=i,this._id=typeof t=="number"?t:t.low}get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}};Ft.DictionaryBatch=ar;var gi=class{constructor(e,t){this.offset=typeof e=="number"?e:e.low,this.length=typeof t=="number"?t:t.low}};Ft.BufferRegion=gi;var vi=class{constructor(e,t){this.length=typeof e=="number"?e:e.low,this.nullCount=typeof t=="number"?t:t.low}};Ft.FieldNode=vi;function XA(r,e){return()=>{switch(e){case ke.MessageHeader.Schema:return Xe.Schema.fromJSON(r);case ke.MessageHeader.RecordBatch:return Dt.fromJSON(r);case ke.MessageHeader.DictionaryBatch:return ar.fromJSON(r)}throw new Error(`Unrecognized Message type: { name: ${ke.MessageHeader[e]}, type: ${e} }`)}}function eD(r,e){return()=>{switch(e){case ke.MessageHeader.Schema:return Xe.Schema.decode(r.header(new jr));case ke.MessageHeader.RecordBatch:return Dt.decode(r.header(new Gr),r.version());case ke.MessageHeader.DictionaryBatch:return ar.decode(r.header(new cn),r.version())}throw new Error(`Unrecognized Message type: { name: ${ke.MessageHeader[e]}, type: ${e} }`)}}Xe.Field.encode=dD;Xe.Field.decode=cD;Xe.Field.fromJSON=Ha.fieldFromJSON;Xe.Schema.encode=lD;Xe.Schema.decode=tD;Xe.Schema.fromJSON=Ha.schemaFromJSON;Dt.encode=fD;Dt.decode=rD;Dt.fromJSON=Ha.recordBatchFromJSON;ar.encode=hD;ar.decode=iD;ar.fromJSON=Ha.dictionaryBatchFromJSON;vi.encode=pD;vi.decode=sD;gi.encode=yD;gi.decode=nD;function tD(r,e=new Map){let t=uD(r,e);return new Xe.Schema(t,Ga(r),e)}function rD(r,e=ke.MetadataVersion.V4){return new Dt(r.length(),aD(r),oD(r,e))}function iD(r,e=ke.MetadataVersion.V4){return new ar(Dt.decode(r.data(),e),r.id(),r.isDelta())}function nD(r){return new gi(r.offset(),r.length())}function sD(r){return new vi(r.length(),r.nullCount())}function aD(r){let e=[];for(let t,i=-1,n=-1,a=r.nodesLength();++i<a;)(t=r.nodes(i))&&(e[++n]=vi.decode(t));return e}function oD(r,e){let t=[];for(let i,n=-1,a=-1,c=r.buffersLength();++n<c;)(i=r.buffers(n))&&(e<ke.MetadataVersion.V4&&(i.bb_pos+=8*(n+1)),t[++a]=gi.decode(i));return t}function uD(r,e){let t=[];for(let i,n=-1,a=-1,c=r.fieldsLength();++n<c;)(i=r.fields(n))&&(t[++a]=Xe.Field.decode(i,e));return t}function H_(r,e){let t=[];for(let i,n=-1,a=-1,c=r.childrenLength();++n<c;)(i=r.children(n))&&(t[++a]=Xe.Field.decode(i,e));return t}function cD(r,e){let t,i,n,a,c,f;return!e||!(f=r.dictionary())?(n=$_(r,H_(r,e)),i=new Xe.Field(r.name(),n,r.nullable(),Ga(r))):e.has(t=f.id().low)?(a=(a=f.indexType())?G_(a):new De.Int32,c=new De.Dictionary(e.get(t),a,t,f.isOrdered()),i=new Xe.Field(r.name(),c,r.nullable(),Ga(r))):(a=(a=f.indexType())?G_(a):new De.Int32,e.set(t,n=$_(r,H_(r,e))),c=new De.Dictionary(n,a,t,f.isOrdered()),i=new Xe.Field(r.name(),c,r.nullable(),Ga(r))),i||null}function Ga(r){let e=new Map;if(r)for(let t,i,n=-1,a=r.customMetadataLength()|0;++n<a;)(t=r.customMetadata(n))&&(i=t.key())!=null&&e.set(i,t.value());return e}function G_(r){return new De.Int(r.isSigned(),r.bitWidth())}function $_(r,e){let t=r.typeType();switch(t){case Ge.NONE:return new De.Null;case Ge.Null:return new De.Null;case Ge.Binary:return new De.Binary;case Ge.Utf8:return new De.Utf8;case Ge.Bool:return new De.Bool;case Ge.List:return new De.List((e||[])[0]);case Ge.Struct_:return new De.Struct(e||[])}switch(t){case Ge.Int:{let i=r.type(new st.org.apache.arrow.flatbuf.Int);return new De.Int(i.isSigned(),i.bitWidth())}case Ge.FloatingPoint:{let i=r.type(new st.org.apache.arrow.flatbuf.FloatingPoint);return new De.Float(i.precision())}case Ge.Decimal:{let i=r.type(new st.org.apache.arrow.flatbuf.Decimal);return new De.Decimal(i.scale(),i.precision())}case Ge.Date:{let i=r.type(new st.org.apache.arrow.flatbuf.Date);return new De.Date_(i.unit())}case Ge.Time:{let i=r.type(new st.org.apache.arrow.flatbuf.Time);return new De.Time(i.unit(),i.bitWidth())}case Ge.Timestamp:{let i=r.type(new st.org.apache.arrow.flatbuf.Timestamp);return new De.Timestamp(i.unit(),i.timezone())}case Ge.Interval:{let i=r.type(new st.org.apache.arrow.flatbuf.Interval);return new De.Interval(i.unit())}case Ge.Union:{let i=r.type(new st.org.apache.arrow.flatbuf.Union);return new De.Union(i.mode(),i.typeIdsArray()||[],e||[])}case Ge.FixedSizeBinary:{let i=r.type(new st.org.apache.arrow.flatbuf.FixedSizeBinary);return new De.FixedSizeBinary(i.byteWidth())}case Ge.FixedSizeList:{let i=r.type(new st.org.apache.arrow.flatbuf.FixedSizeList);return new De.FixedSizeList(i.listSize(),(e||[])[0])}case Ge.Map:{let i=r.type(new st.org.apache.arrow.flatbuf.Map);return new De.Map_((e||[])[0],i.keysSorted())}}throw new Error(`Unrecognized type: "${Ge[t]}" (${t})`)}function lD(r,e){let t=e.fields.map(a=>Xe.Field.encode(r,a));jr.startFieldsVector(r,t.length);let i=jr.createFieldsVector(r,t),n=e.metadata&&e.metadata.size>0?jr.createCustomMetadataVector(r,[...e.metadata].map(([a,c])=>{let f=r.createString(`${a}`),j=r.createString(`${c}`);return Hr.startKeyValue(r),Hr.addKey(r,f),Hr.addValue(r,j),Hr.endKeyValue(r)})):-1;return jr.startSchema(r),jr.addFields(r,i),jr.addEndianness(r,mD?Y_.Little:Y_.Big),n!==-1&&jr.addCustomMetadata(r,n),jr.endSchema(r)}function dD(r,e){let t=-1,i=-1,n=-1,a=e.type,c=e.typeId;De.DataType.isDictionary(a)?(c=a.dictionary.typeId,n=Rc.instance.visit(a,r),i=Rc.instance.visit(a.dictionary,r)):i=Rc.instance.visit(a,r);let f=(a.children||[]).map(m=>Xe.Field.encode(r,m)),j=qt.createChildrenVector(r,f),s=e.metadata&&e.metadata.size>0?qt.createCustomMetadataVector(r,[...e.metadata].map(([m,R])=>{let $=r.createString(`${m}`),ue=r.createString(`${R}`);return Hr.startKeyValue(r),Hr.addKey(r,$),Hr.addValue(r,ue),Hr.endKeyValue(r)})):-1;return e.name&&(t=r.createString(e.name)),qt.startField(r),qt.addType(r,i),qt.addTypeType(r,c),qt.addChildren(r,j),qt.addNullable(r,!!e.nullable),t!==-1&&qt.addName(r,t),n!==-1&&qt.addDictionary(r,n),s!==-1&&qt.addCustomMetadata(r,s),qt.endField(r)}function fD(r,e){let t=e.nodes||[],i=e.buffers||[];Gr.startNodesVector(r,t.length),t.slice().reverse().forEach(c=>vi.encode(r,c));let n=r.endVector();Gr.startBuffersVector(r,i.length),i.slice().reverse().forEach(c=>gi.encode(r,c));let a=r.endVector();return Gr.startRecordBatch(r),Gr.addLength(r,new bi(e.length,0)),Gr.addNodes(r,n),Gr.addBuffers(r,a),Gr.endRecordBatch(r)}function hD(r,e){let t=Dt.encode(r,e.data);return cn.startDictionaryBatch(r),cn.addId(r,new bi(e.id,0)),cn.addIsDelta(r,e.isDelta),cn.addData(r,t),cn.endDictionaryBatch(r)}function pD(r,e){return ZA.createFieldNode(r,new bi(e.length,0),new bi(e.nullCount,0))}function yD(r,e){return QA.createBuffer(r,new bi(e.offset,0),new bi(e.length,0))}var mD=function(){let r=new ArrayBuffer(2);return new DataView(r).setInt16(0,256,!0),new Int16Array(r)[0]===256}()});var Ja=U(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.magicX2AndPadding=ye.magicAndPadding=ye.magicLength=ye.checkForMagicArrowString=ye.MAGIC=ye.MAGIC_STR=ye.PADDING=ye.JSONMessageReader=ye.AsyncMessageReader=ye.MessageReader=void 0;var Jr=Ie(),_D=Di(),J_=_D.flatbuffers.ByteBuffer,rs=_i(),bD=ut(),gD=gc(),K_=Ne(),$a=zr(),Wt=Ei(),Ec=r=>`Expected ${Jr.MessageHeader[r]} Message in stream, but was null or length 0.`,Cc=r=>`Header pointer of flatbuffer-encoded ${Jr.MessageHeader[r]} Message is null or length 0.`,Q_=(r,e)=>`Expected to read ${r} metadata bytes, but only read ${e}.`,Z_=(r,e)=>`Expected to read ${r} bytes for message body, but only read ${e}.`,Uc=class{constructor(e){this.source=e instanceof $a.ByteStream?e:new $a.ByteStream(e)}[Symbol.iterator](){return this}next(){let e;return(e=this.readMetadataLength()).done||e.value===-1&&(e=this.readMetadataLength()).done||(e=this.readMetadata(e.value)).done?Wt.ITERATOR_DONE:e}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(Ec(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array(0);let t=K_.toUint8Array(this.source.read(e));if(t.byteLength<e)throw new Error(Z_(e,t.byteLength));return t.byteOffset%8==0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()}readSchema(e=!1){let t=Jr.MessageHeader.Schema,i=this.readMessage(t),n=i&&i.header();if(e&&!n)throw new Error(Cc(t));return n}readMetadataLength(){let e=this.source.read(ye.PADDING),t=e&&new J_(e),i=t&&t.readInt32(0)||0;return{done:i===0,value:i}}readMetadata(e){let t=this.source.read(e);if(!t)return Wt.ITERATOR_DONE;if(t.byteLength<e)throw new Error(Q_(e,t.byteLength));return{done:!1,value:rs.Message.decode(t)}}};ye.MessageReader=Uc;var X_=class{constructor(e,t){this.source=e instanceof $a.AsyncByteStream?e:bD.isFileHandle(e)?new gD.AsyncRandomAccessFile(e,t):new $a.AsyncByteStream(e)}[Symbol.asyncIterator](){return this}async next(){let e;return(e=await this.readMetadataLength()).done||e.value===-1&&(e=await this.readMetadataLength()).done||(e=await this.readMetadata(e.value)).done?Wt.ITERATOR_DONE:e}async throw(e){return await this.source.throw(e)}async return(e){return await this.source.return(e)}async readMessage(e){let t;if((t=await this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(Ec(e));return t.value}async readMessageBody(e){if(e<=0)return new Uint8Array(0);let t=K_.toUint8Array(await this.source.read(e));if(t.byteLength<e)throw new Error(Z_(e,t.byteLength));return t.byteOffset%8==0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()}async readSchema(e=!1){let t=Jr.MessageHeader.Schema,i=await this.readMessage(t),n=i&&i.header();if(e&&!n)throw new Error(Cc(t));return n}async readMetadataLength(){let e=await this.source.read(ye.PADDING),t=e&&new J_(e),i=t&&t.readInt32(0)||0;return{done:i===0,value:i}}async readMetadata(e){let t=await this.source.read(e);if(!t)return Wt.ITERATOR_DONE;if(t.byteLength<e)throw new Error(Q_(e,t.byteLength));return{done:!1,value:rs.Message.decode(t)}}};ye.AsyncMessageReader=X_;var eb=class extends Uc{constructor(e){super(new Uint8Array(0));this._schema=!1,this._body=[],this._batchIndex=0,this._dictionaryIndex=0,this._json=e instanceof Wt.ArrowJSON?e:new Wt.ArrowJSON(e)}next(){let{_json:e}=this;if(!this._schema){this._schema=!0;let t=rs.Message.fromJSON(e.schema,Jr.MessageHeader.Schema);return{done:!1,value:t}}if(this._dictionaryIndex<e.dictionaries.length){let t=e.dictionaries[this._dictionaryIndex++];this._body=t.data.columns;let i=rs.Message.fromJSON(t,Jr.MessageHeader.DictionaryBatch);return{done:!1,value:i}}if(this._batchIndex<e.batches.length){let t=e.batches[this._batchIndex++];this._body=t.columns;let i=rs.Message.fromJSON(t,Jr.MessageHeader.RecordBatch);return{done:!1,value:i}}return this._body=[],Wt.ITERATOR_DONE}readMessageBody(e){return t(this._body);function t(i){return(i||[]).reduce((n,a)=>[...n,...a.VALIDITY&&[a.VALIDITY]||[],...a.TYPE&&[a.TYPE]||[],...a.OFFSET&&[a.OFFSET]||[],...a.DATA&&[a.DATA]||[],...t(a.children)],[])}}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(Ec(e));return t.value}readSchema(){let e=Jr.MessageHeader.Schema,t=this.readMessage(e),i=t&&t.header();if(!t||!i)throw new Error(Cc(e));return i}};ye.JSONMessageReader=eb;ye.PADDING=4;ye.MAGIC_STR="ARROW1";ye.MAGIC=new Uint8Array(ye.MAGIC_STR.length);for(let r=0;r<ye.MAGIC_STR.length;r+=1|0)ye.MAGIC[r]=ye.MAGIC_STR.charCodeAt(r);function vD(r,e=0){for(let t=-1,i=ye.MAGIC.length;++t<i;)if(ye.MAGIC[t]!==r[e+t])return!1;return!0}ye.checkForMagicArrowString=vD;ye.magicLength=ye.MAGIC.length;ye.magicAndPadding=ye.magicLength+ye.PADDING;ye.magicX2AndPadding=ye.magicLength*2+ye.PADDING});var sb=U(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});Ka.VectorAssembler=void 0;var wD=it(),tb=Ie(),jD=Tr(),kc=Ne(),Mc=Kt(),TD=Mr(),rb=_i(),ib=ve(),qe=class extends wD.Visitor{constructor(){super();this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}static assemble(...e){let t=new qe,i=TD.selectVectorChildrenArgs(jD.RecordBatch,e),[n=t]=t.visitMany(i);return n}visit(e){if(!ib.DataType.isDictionary(e.type)){let{data:t,length:i,nullCount:n}=e;if(i>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");ib.DataType.isNull(e.type)||zt.call(this,n<=0?new Uint8Array(0):Mc.truncateBitmap(t.offset,i,t.nullBitmap)),this.nodes.push(new rb.FieldNode(i,n))}return super.visit(e)}visitNull(e){return this}visitDictionary(e){return this.visit(e.indices)}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}};Ka.VectorAssembler=qe;function zt(r){let e=r.byteLength+7&~7;return this.buffers.push(r),this.bufferRegions.push(new rb.BufferRegion(this._byteLength,e)),this._byteLength+=e,this}function BD(r){let{type:e,length:t,typeIds:i,valueOffsets:n}=r;if(zt.call(this,i),e.mode===tb.UnionMode.Sparse)return Vc.call(this,r);if(e.mode===tb.UnionMode.Dense){if(r.offset<=0)return zt.call(this,n),Vc.call(this,r);{let a=i.reduce((m,R)=>Math.max(m,R),i[0]),c=new Int32Array(a+1),f=new Int32Array(a+1).fill(-1),j=new Int32Array(t),s=kc.rebaseValueOffsets(-n[0],t,n);for(let m,R,$=-1;++$<t;)(R=f[m=i[$]])===-1&&(R=f[m]=s[m]),j[$]=s[$]-R,++c[m];zt.call(this,j);for(let m,R=-1,$=e.children.length;++R<$;)if(m=r.getChildAt(R)){let ue=e.typeIds[R],pt=Math.min(t,c[ue]);this.visit(m.slice(f[ue],pt))}}}return this}function ID(r){let e;return r.nullCount>=r.length?zt.call(this,new Uint8Array(0)):(e=r.values)instanceof Uint8Array?zt.call(this,Mc.truncateBitmap(r.offset,r.length,e)):zt.call(this,Mc.packBools(r))}function Kr(r){return zt.call(this,r.values.subarray(0,r.length*r.stride))}function nb(r){let{length:e,values:t,valueOffsets:i}=r,n=i[0],a=i[e],c=Math.min(a-n,t.byteLength-n);return zt.call(this,kc.rebaseValueOffsets(-i[0],e,i)),zt.call(this,t.subarray(n,n+c)),this}function Pc(r){let{length:e,valueOffsets:t}=r;return t&&zt.call(this,kc.rebaseValueOffsets(t[0],e,t)),this.visit(r.getChildAt(0))}function Vc(r){return this.visitMany(r.type.children.map((e,t)=>r.getChildAt(t)).filter(Boolean))[0]}qe.prototype.visitBool=ID;qe.prototype.visitInt=Kr;qe.prototype.visitFloat=Kr;qe.prototype.visitUtf8=nb;qe.prototype.visitBinary=nb;qe.prototype.visitFixedSizeBinary=Kr;qe.prototype.visitDate=Kr;qe.prototype.visitTimestamp=Kr;qe.prototype.visitTime=Kr;qe.prototype.visitDecimal=Kr;qe.prototype.visitList=Pc;qe.prototype.visitStruct=Vc;qe.prototype.visitUnion=BD;qe.prototype.visitInterval=Kr;qe.prototype.visitFixedSizeList=Pc;qe.prototype.visitMap=Pc});var ob=U(Qa=>{"use strict";Object.defineProperty(Qa,"__esModule",{value:!0});Qa.JSONTypeAssembler=void 0;var SD=it(),Ee=Ie(),ab=class extends SD.Visitor{visit(e){return e==null?void 0:super.visit(e)}visitNull({typeId:e}){return{name:Ee.ArrowType[e].toLowerCase()}}visitInt({typeId:e,bitWidth:t,isSigned:i}){return{name:Ee.ArrowType[e].toLowerCase(),bitWidth:t,isSigned:i}}visitFloat({typeId:e,precision:t}){return{name:Ee.ArrowType[e].toLowerCase(),precision:Ee.Precision[t]}}visitBinary({typeId:e}){return{name:Ee.ArrowType[e].toLowerCase()}}visitBool({typeId:e}){return{name:Ee.ArrowType[e].toLowerCase()}}visitUtf8({typeId:e}){return{name:Ee.ArrowType[e].toLowerCase()}}visitDecimal({typeId:e,scale:t,precision:i}){return{name:Ee.ArrowType[e].toLowerCase(),scale:t,precision:i}}visitDate({typeId:e,unit:t}){return{name:Ee.ArrowType[e].toLowerCase(),unit:Ee.DateUnit[t]}}visitTime({typeId:e,unit:t,bitWidth:i}){return{name:Ee.ArrowType[e].toLowerCase(),unit:Ee.TimeUnit[t],bitWidth:i}}visitTimestamp({typeId:e,timezone:t,unit:i}){return{name:Ee.ArrowType[e].toLowerCase(),unit:Ee.TimeUnit[i],timezone:t}}visitInterval({typeId:e,unit:t}){return{name:Ee.ArrowType[e].toLowerCase(),unit:Ee.IntervalUnit[t]}}visitList({typeId:e}){return{name:Ee.ArrowType[e].toLowerCase()}}visitStruct({typeId:e}){return{name:Ee.ArrowType[e].toLowerCase()}}visitUnion({typeId:e,mode:t,typeIds:i}){return{name:Ee.ArrowType[e].toLowerCase(),mode:Ee.UnionMode[t],typeIds:[...i]}}visitDictionary(e){return this.visit(e.dictionary)}visitFixedSizeBinary({typeId:e,byteWidth:t}){return{name:Ee.ArrowType[e].toLowerCase(),byteWidth:t}}visitFixedSizeList({typeId:e,listSize:t}){return{name:Ee.ArrowType[e].toLowerCase(),listSize:t}}visitMap({typeId:e,keysSorted:t}){return{name:Ee.ArrowType[e].toLowerCase(),keysSorted:t}}};Qa.JSONTypeAssembler=ab});var lb=U(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.JSONVectorAssembler=void 0;var OD=Yn(),is=$i(),AD=Pe(),DD=it(),FD=Ie(),RD=Tr(),Nc=Ie(),Za=Kt(),ED=Mr(),ub=ve(),Xa=class extends DD.Visitor{static assemble(...e){return new Xa().visitMany(ED.selectColumnChildrenArgs(RD.RecordBatch,e))}visit(e){let{data:t,name:i,length:n}=e,{offset:a,nullCount:c,nullBitmap:f}=t,j=ub.DataType.isDictionary(e.type)?e.type.indices:e.type,s=Object.assign([],t.buffers,{[FD.BufferType.VALIDITY]:void 0});return{name:i,count:n,VALIDITY:ub.DataType.isNull(j)?void 0:c<=0?Array.from({length:n},()=>1):[...Za.iterateBits(f,a,n,null,Za.getBit)],...super.visit(AD.Vector.new(t.clone(j,a,n,0,s)))}}visitNull(){return{}}visitBool({values:e,offset:t,length:i}){return{DATA:[...Za.iterateBits(e,t,i,null,Za.getBool)]}}visitInt(e){return{DATA:e.type.bitWidth<64?[...e.values]:[...ns(e.values,2)]}}visitFloat(e){return{DATA:[...e.values]}}visitUtf8(e){return{DATA:[...e],OFFSET:[...e.valueOffsets]}}visitBinary(e){return{DATA:[...cb(e)],OFFSET:[...e.valueOffsets]}}visitFixedSizeBinary(e){return{DATA:[...cb(e)]}}visitDate(e){return{DATA:e.type.unit===Nc.DateUnit.DAY?[...e.values]:[...ns(e.values,2)]}}visitTimestamp(e){return{DATA:[...ns(e.values,2)]}}visitTime(e){return{DATA:e.type.unit<Nc.TimeUnit.MICROSECOND?[...e.values]:[...ns(e.values,2)]}}visitDecimal(e){return{DATA:[...ns(e.values,4)]}}visitList(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map((t,i)=>this.visit(new is.Column(t,[e.getChildAt(i)])))}}visitStruct(e){return{children:e.type.children.map((t,i)=>this.visit(new is.Column(t,[e.getChildAt(i)])))}}visitUnion(e){return{TYPE:[...e.typeIds],OFFSET:e.type.mode===Nc.UnionMode.Dense?[...e.valueOffsets]:void 0,children:e.type.children.map((t,i)=>this.visit(new is.Column(t,[e.getChildAt(i)])))}}visitInterval(e){return{DATA:[...e.values]}}visitFixedSizeList(e){return{children:e.type.children.map((t,i)=>this.visit(new is.Column(t,[e.getChildAt(i)])))}}visitMap(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map((t,i)=>this.visit(new is.Column(t,[e.getChildAt(i)])))}}};eo.JSONVectorAssembler=Xa;function*cb(r){for(let e of r)yield e.reduce((t,i)=>`${t}${("0"+(i&255).toString(16)).slice(-2)}`,"").toUpperCase()}function*ns(r,e){for(let t=-1,i=r.length/e;++t<i;)yield`${OD.BN.new(r.subarray((t+0)*e,(t+1)*e),!1)}`}});var so=U(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.RecordBatchJSONWriter=ur.RecordBatchFileWriter=ur.RecordBatchStreamWriter=ur.RecordBatchWriter=void 0;var Lc=as(),CD=Ja(),UD=$i(),kD=ve(),MD=Qe(),to=_i(),xc=_i(),ln=mc(),qc=Ie(),Wc=zr(),db=sb(),PD=ob(),fb=lb(),VD=Ne(),zc=Tr(),ND=Ei(),or=ut(),ss=class extends ND.ReadableInterop{constructor(e){super();this._position=0,this._started=!1,this._sink=new Wc.AsyncByteQueue,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,or.isObject(e)||(e={autoDestroy:!0,writeLegacyIpcFormat:!1}),this._autoDestroy=typeof e.autoDestroy=="boolean"?e.autoDestroy:!0,this._writeLegacyIpcFormat=typeof e.writeLegacyIpcFormat=="boolean"?e.writeLegacyIpcFormat:!1}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,t){throw new Error('"throughDOM" not available in this environment')}toString(e=!1){return this._sink.toString(e)}toUint8Array(e=!1){return this._sink.toUint8Array(e)}writeAll(e){return or.isPromise(e)?e.then(t=>this.writeAll(t)):or.isAsyncIterable(e)?Hc(this,e):Yc(this,e)}get closed(){return this._sink.closed}[Symbol.asyncIterator](){return this._sink[Symbol.asyncIterator]()}toDOMStream(e){return this._sink.toDOMStream(e)}toNodeStream(e){return this._sink.toNodeStream(e)}close(){return this.reset()._sink.close()}abort(e){return this.reset()._sink.abort(e)}finish(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}reset(e=this._sink,t=null){return e===this._sink||e instanceof Wc.AsyncByteQueue?this._sink=e:(this._sink=new Wc.AsyncByteQueue,e&&or.isWritableDOMStream(e)?this.toDOMStream({type:"bytes"}).pipeTo(e):e&&or.isWritableNodeStream(e)&&this.toNodeStream({objectMode:!1}).pipe(e)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,(!t||!t.compareTo(this._schema))&&(t===null?(this._position=0,this._schema=null):(this._started=!0,this._schema=t,this._writeSchema(t))),this}write(e){let t=null;if(this._sink){if(e==null)return this.finish()&&void 0;if(e instanceof Lc.Table&&!(t=e.schema))return this.finish()&&void 0;if(e instanceof zc.RecordBatch&&!(t=e.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(t&&!t.compareTo(this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof zc.RecordBatch?e instanceof zc._InternalEmptyPlaceholderRecordBatch||this._writeRecordBatch(e):e instanceof Lc.Table?this.writeAll(e.chunks):or.isIterable(e)&&this.writeAll(e)}_writeMessage(e,t=8){let i=t-1,n=to.Message.encode(e),a=n.byteLength,c=this._writeLegacyIpcFormat?4:8,f=a+c+i&~i,j=f-a-c;return e.headerType===qc.MessageHeader.RecordBatch?this._recordBatchBlocks.push(new ln.FileBlock(f,e.bodyLength,this._position)):e.headerType===qc.MessageHeader.DictionaryBatch&&this._dictionaryBlocks.push(new ln.FileBlock(f,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(f-c)),a>0&&this._write(n),this._writePadding(j)}_write(e){if(this._started){let t=VD.toUint8Array(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(to.Message.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(CD.MAGIC)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:t,nodes:i,bufferRegions:n,buffers:a}=db.VectorAssembler.assemble(e),c=new xc.RecordBatch(e.length,i,n),f=to.Message.from(c,t);return this._writeDictionaries(e)._writeMessage(f)._writeBodyBuffers(a)}_writeDictionaryBatch(e,t,i=!1){this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0));let{byteLength:n,nodes:a,bufferRegions:c,buffers:f}=db.VectorAssembler.assemble(e),j=new xc.RecordBatch(e.length,a,c),s=new xc.DictionaryBatch(j,t,i),m=to.Message.from(s,n);return this._writeMessage(m)._writeBodyBuffers(f)}_writeBodyBuffers(e){let t,i,n;for(let a=-1,c=e.length;++a<c;)(t=e[a])&&(i=t.byteLength)>0&&(this._write(t),(n=(i+7&~7)-i)>0&&this._writePadding(n));return this}_writeDictionaries(e){for(let[t,i]of e.dictionaries){let n=this._dictionaryDeltaOffsets.get(t)||0;if(n===0||(i=i.slice(n)).length>0){let a="chunks"in i?i.chunks:[i];for(let c of a)this._writeDictionaryBatch(c,t,n>0),n+=c.length}}return this}};ur.RecordBatchWriter=ss;var ro=class extends ss{static writeAll(e,t){let i=new ro(t);return or.isPromise(e)?e.then(n=>i.writeAll(n)):or.isAsyncIterable(e)?Hc(i,e):Yc(i,e)}};ur.RecordBatchStreamWriter=ro;var io=class extends ss{static writeAll(e){let t=new io;return or.isPromise(e)?e.then(i=>t.writeAll(i)):or.isAsyncIterable(e)?Hc(t,e):Yc(t,e)}constructor(){super();this._autoDestroy=!0}_writeSchema(e){return this._writeMagic()._writePadding(2)}_writeFooter(e){let t=ln.Footer.encode(new ln.Footer(e,qc.MetadataVersion.V4,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}};ur.RecordBatchFileWriter=io;var no=class extends ss{constructor(){super();this._autoDestroy=!0,this._recordBatches=[],this._dictionaries=[]}static writeAll(e){return new no().writeAll(e)}_writeMessage(){return this}_writeFooter(e){return this}_writeSchema(e){return this._write(`{
|
|
8
|
-
"schema": ${JSON.stringify({fields:e.fields.map(hb)},null,2)}`)}_writeDictionaries(e){return e.dictionaries.size>0&&this._dictionaries.push(e),this}_writeDictionaryBatch(e,t,i=!1){return this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0)),this._write(this._dictionaryBlocks.length===0?" ":`,
|
|
9
|
-
`),this._write(`${LD(e,t,i)}`),this._dictionaryBlocks.push(new ln.FileBlock(0,0,0)),this}_writeRecordBatch(e){return this._writeDictionaries(e),this._recordBatches.push(e),this}close(){if(this._dictionaries.length>0){this._write(`,
|
|
10
|
-
"dictionaries": [
|
|
11
|
-
`);for(let e of this._dictionaries)super._writeDictionaries(e);this._write(`
|
|
12
|
-
]`)}if(this._recordBatches.length>0){for(let e=-1,t=this._recordBatches.length;++e<t;)this._write(e===0?`,
|
|
13
|
-
"batches": [
|
|
14
|
-
`:`,
|
|
15
|
-
`),this._write(`${xD(this._recordBatches[e])}`),this._recordBatchBlocks.push(new ln.FileBlock(0,0,0));this._write(`
|
|
16
|
-
]`)}return this._schema&&this._write(`
|
|
17
|
-
}`),this._dictionaries=[],this._recordBatches=[],super.close()}};ur.RecordBatchJSONWriter=no;function Yc(r,e){let t=e;e instanceof Lc.Table&&(t=e.chunks,r.reset(void 0,e.schema));for(let i of t)r.write(i);return r.finish()}async function Hc(r,e){for await(let t of e)r.write(t);return r.finish()}function hb({name:r,type:e,nullable:t}){let i=new PD.JSONTypeAssembler;return{name:r,nullable:t,type:i.visit(e),children:(e.children||[]).map(hb),dictionary:kD.DataType.isDictionary(e)?{id:e.id,isOrdered:e.isOrdered,indexType:i.visit(e.indices)}:void 0}}function LD(r,e,t=!1){let i=new MD.Field(`${e}`,r.type,r.nullCount>0),n=fb.JSONVectorAssembler.assemble(new UD.Column(i,[r]));return JSON.stringify({id:e,isDelta:t,data:{count:r.length,columns:n}},null,2)}function xD(r){return JSON.stringify({count:r.length,columns:fb.JSONVectorAssembler.assemble(r)},null,2)}});var Jc=U(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.distributeVectorsIntoRecordBatches=Qr.distributeColumnsIntoRecordBatches=Qr.ensureSameLengthData=void 0;var pb=Nt(),Gc=Qe(),qD=kr(),WD=Tr(),$c=new Uint8Array(0),yb=r=>[$c,$c,new Uint8Array(r),$c];function zD(r,e,t=e.reduce((i,n)=>Math.max(i,n.length),0)){let i,n,a=-1,c=e.length,f=[...r.fields],j=[],s=(t+63&~63)>>3;for(;++a<c;)(i=e[a])&&i.length===t?j[a]=i:((n=f[a]).nullable||(f[a]=f[a].clone({nullable:!0})),j[a]=i?i._changeLengthAndBackfillNullBitmap(t):pb.Data.new(n.type,0,t,t,yb(s)));return[new Gc.Schema(f),t,j]}Qr.ensureSameLengthData=zD;function YD(r){return mb(new Gc.Schema(r.map(({field:e})=>e)),r)}Qr.distributeColumnsIntoRecordBatches=YD;function mb(r,e){return HD(r,e.map(t=>t instanceof qD.Chunked?t.chunks.map(i=>i.data):[t.data]))}Qr.distributeVectorsIntoRecordBatches=mb;function HD(r,e){let t=[...r.fields],i=[],n={numBatches:e.reduce((R,$)=>Math.max(R,$.length),0)},a=0,c=0,f=-1,j=e.length,s,m=[];for(;n.numBatches-- >0;){for(c=Number.POSITIVE_INFINITY,f=-1;++f<j;)m[f]=s=e[f].shift(),c=Math.min(c,s?s.length:c);isFinite(c)&&(m=GD(t,c,m,e,n),c>0&&(i[a++]=[c,m.slice()]))}return[r=new Gc.Schema(t,r.metadata),i.map(R=>new WD.RecordBatch(r,...R))]}function GD(r,e,t,i,n){let a,c,f=0,j=-1,s=i.length,m=(e+63&~63)>>3;for(;++j<s;)(a=t[j])&&(f=a.length)>=e?f===e?t[j]=a:(t[j]=a.slice(0,e),a=a.slice(e,f-e),n.numBatches=Math.max(n.numBatches,i[j].unshift(a))):((c=r[j]).nullable||(r[j]=c.clone({nullable:!0})),t[j]=a?a._changeLengthAndBackfillNullBitmap(e):pb.Data.new(c.type,0,e,e,yb(m)));return t}});var Ve=U(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.BaseVector=void 0;var $D=Ie(),JD=kr(),KD=$n(),Kc=Pe(),Qc=class extends Kc.AbstractVector{constructor(e,t){super();this._children=t,this.numChildren=e.childData.length,this._bindDataAccessors(this.data=e)}get type(){return this.data.type}get typeId(){return this.data.typeId}get length(){return this.data.length}get offset(){return this.data.offset}get stride(){return this.data.stride}get nullCount(){return this.data.nullCount}get byteLength(){return this.data.byteLength}get VectorName(){return`${$D.Type[this.typeId]}Vector`}get ArrayType(){return this.type.ArrayType}get values(){return this.data.values}get typeIds(){return this.data.typeIds}get nullBitmap(){return this.data.nullBitmap}get valueOffsets(){return this.data.valueOffsets}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}clone(e,t=this._children){return Kc.Vector.new(e,t)}concat(...e){return JD.Chunked.concat(this,...e)}slice(e,t){return KD.clampRange(this,e,t,this._sliceInternal)}isValid(e){if(this.nullCount>0){let t=this.offset+e;return(this.nullBitmap[t>>3]&1<<t%8)!==0}return!0}getChildAt(e){return e<0||e>=this.numChildren?null:(this._children||(this._children=[]))[e]||(this._children[e]=Kc.Vector.new(this.data.childData[e]))}toJSON(){return[...this]}_sliceInternal(e,t,i){return e.clone(e.data.slice(t,i-t),null)}_bindDataAccessors(e){}};ao.BaseVector=Qc;Qc.prototype[Symbol.isConcatSpreadable]=!0});var Zc=U(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.BinaryVector=void 0;var QD=Pe(),ZD=Ve(),XD=ve(),_b=class extends ZD.BaseVector{asUtf8(){return QD.Vector.new(this.data.clone(new XD.Utf8))}};oo.BinaryVector=_b});var Xc=U(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});uo.BoolVector=void 0;var eF=ve(),tF=Ve(),rF=cr(),bb=class extends tF.BaseVector{static from(e){return rF.vectorFromValuesWithType(()=>new eF.Bool,e)}};uo.BoolVector=bb});var tl=U(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.DateMillisecondVector=Zr.DateDayVector=Zr.DateVector=void 0;var iF=Ie(),nF=Ve(),gb=cr(),el=ve(),co=class extends nF.BaseVector{static from(...e){return e.length===2?gb.vectorFromValuesWithType(()=>e[1]===iF.DateUnit.DAY?new el.DateDay:new el.DateMillisecond,e[0]):gb.vectorFromValuesWithType(()=>new el.DateMillisecond,e[0])}};Zr.DateVector=co;var vb=class extends co{};Zr.DateDayVector=vb;var wb=class extends co{};Zr.DateMillisecondVector=wb});var rl=U(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.DecimalVector=void 0;var sF=Ve(),jb=class extends sF.BaseVector{};lo.DecimalVector=jb});var ho=U(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.DictionaryVector=void 0;var aF=Nt(),Tb=Pe(),oF=Ve(),uF=cr(),cF=ve(),il=class extends oF.BaseVector{constructor(e){super(e);this.indices=Tb.Vector.new(e.clone(this.type.indices))}static from(...e){if(e.length===3){let[t,i,n]=e,a=new cF.Dictionary(t.type,i,null,null);return Tb.Vector.new(aF.Data.Dictionary(a,0,n.length,0,null,n,t))}return uF.vectorFromValuesWithType(()=>e[0].type,e[0])}get dictionary(){return this.data.dictionary}reverseLookup(e){return this.dictionary.indexOf(e)}getKey(e){return this.indices.get(e)}getValue(e){return this.dictionary.get(e)}setKey(e,t){return this.indices.set(e,t)}setValue(e,t){return this.dictionary.set(e,t)}};fo.DictionaryVector=il;il.prototype.indices=null});var nl=U(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.FixedSizeBinaryVector=void 0;var lF=Ve(),Bb=class extends lF.BaseVector{};po.FixedSizeBinaryVector=Bb});var sl=U(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.FixedSizeListVector=void 0;var dF=Ve(),Ib=class extends dF.BaseVector{};yo.FixedSizeListVector=Ib});var cl=U(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.Float64Vector=lr.Float32Vector=lr.Float16Vector=lr.FloatVector=void 0;var fF=Nt(),hF=Pe(),pF=Ve(),yF=cr(),wi=ve(),os=class extends pF.BaseVector{static from(e){let t=bF(this);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)){let i=_F(e.constructor)||t;if(t===null&&(t=i),t&&t===i){let n=new t,a=e.byteLength/n.ArrayType.BYTES_PER_ELEMENT;if(!mF(t,e.constructor))return hF.Vector.new(fF.Data.Float(n,0,a,0,null,e))}}if(t)return yF.vectorFromValuesWithType(()=>new t,e);throw e instanceof DataView||e instanceof ArrayBuffer?new TypeError(`Cannot infer float type from instance of ${e.constructor.name}`):new TypeError("Unrecognized FloatVector input")}};lr.FloatVector=os;var al=class extends os{toFloat32Array(){return new Float32Array(this)}toFloat64Array(){return new Float64Array(this)}};lr.Float16Vector=al;var ol=class extends os{};lr.Float32Vector=ol;var ul=class extends os{};lr.Float64Vector=ul;var mF=(r,e)=>r===wi.Float16&&e!==Uint16Array,_F=r=>{switch(r){case Uint16Array:return wi.Float16;case Float32Array:return wi.Float32;case Float64Array:return wi.Float64;default:return null}},bF=r=>{switch(r){case al:return wi.Float16;case ol:return wi.Float32;case ul:return wi.Float64;default:return null}}});var ll=U(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.IntervalYearMonthVector=Xr.IntervalDayTimeVector=Xr.IntervalVector=void 0;var gF=Ve(),mo=class extends gF.BaseVector{};Xr.IntervalVector=mo;var Sb=class extends mo{};Xr.IntervalDayTimeVector=Sb;var Ob=class extends mo{};Xr.IntervalYearMonthVector=Ob});var _o=U(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.Uint64Vector=We.Uint32Vector=We.Uint16Vector=We.Uint8Vector=We.Int64Vector=We.Int32Vector=We.Int16Vector=We.Int8Vector=We.IntVector=void 0;var vF=Nt(),wF=Pe(),jF=Ve(),TF=cr(),Ab=ut(),Db=Ne(),Me=ve(),dr=class extends jF.BaseVector{static from(...e){let[t,i=!1]=e,n=SF(this,i);if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)){let a=IF(t.constructor,i)||n;if(n===null&&(n=a),n&&n===a){let c=new n,f=t.byteLength/c.ArrayType.BYTES_PER_ELEMENT;return BF(n,t.constructor)&&(f*=.5),wF.Vector.new(vF.Data.Int(c,0,f,0,null,t))}}if(n)return TF.vectorFromValuesWithType(()=>new n,t);throw t instanceof DataView||t instanceof ArrayBuffer?new TypeError(`Cannot infer integer type from instance of ${t.constructor.name}`):new TypeError("Unrecognized IntVector input")}};We.IntVector=dr;var dl=class extends dr{};We.Int8Vector=dl;var fl=class extends dr{};We.Int16Vector=fl;var hl=class extends dr{};We.Int32Vector=hl;var pl=class extends dr{toBigInt64Array(){return Db.toBigInt64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigInt64Array())}};We.Int64Vector=pl;var yl=class extends dr{};We.Uint8Vector=yl;var ml=class extends dr{};We.Uint16Vector=ml;var _l=class extends dr{};We.Uint32Vector=_l;var bl=class extends dr{toBigUint64Array(){return Db.toBigUint64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigUint64Array())}};We.Uint64Vector=bl;var BF=(r,e)=>(r===Me.Int64||r===Me.Uint64)&&(e===Int32Array||e===Uint32Array),IF=(r,e)=>{switch(r){case Int8Array:return Me.Int8;case Int16Array:return Me.Int16;case Int32Array:return e?Me.Int64:Me.Int32;case Ab.BigInt64Array:return Me.Int64;case Uint8Array:return Me.Uint8;case Uint16Array:return Me.Uint16;case Uint32Array:return e?Me.Uint64:Me.Uint32;case Ab.BigUint64Array:return Me.Uint64;default:return null}},SF=(r,e)=>{switch(r){case dl:return Me.Int8;case fl:return Me.Int16;case hl:return e?Me.Int64:Me.Int32;case pl:return Me.Int64;case yl:return Me.Uint8;case ml:return Me.Uint16;case _l:return e?Me.Uint64:Me.Uint32;case bl:return Me.Uint64;default:return null}}});var gl=U(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.ListVector=void 0;var OF=Ve(),Fb=class extends OF.BaseVector{};bo.ListVector=Fb});var vl=U(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});go.MapVector=void 0;var AF=Hn(),DF=Pe(),FF=Ve(),RF=ve(),Rb=class extends FF.BaseVector{asList(){let e=this.type.children[0];return DF.Vector.new(this.data.clone(new RF.List(e)))}bind(e){let t=this.getChildAt(0),{[e]:i,[e+1]:n}=this.valueOffsets;return new AF.MapRow(t.slice(i,n))}};go.MapVector=Rb});var wl=U(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.NullVector=void 0;var EF=Ve(),Eb=class extends EF.BaseVector{};vo.NullVector=Eb});var jl=U(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.StructVector=void 0;var CF=Hn(),UF=Ve(),kF=Symbol.for("rowIndex"),Cb=class extends UF.BaseVector{bind(e){let t=this._row||(this._row=new CF.StructRow(this)),i=Object.create(t);return i[kF]=e,i}};wo.StructVector=Cb});var Tl=U(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.TimestampNanosecondVector=Rt.TimestampMicrosecondVector=Rt.TimestampMillisecondVector=Rt.TimestampSecondVector=Rt.TimestampVector=void 0;var MF=Ve(),dn=class extends MF.BaseVector{};Rt.TimestampVector=dn;var Ub=class extends dn{};Rt.TimestampSecondVector=Ub;var kb=class extends dn{};Rt.TimestampMillisecondVector=kb;var Mb=class extends dn{};Rt.TimestampMicrosecondVector=Mb;var Pb=class extends dn{};Rt.TimestampNanosecondVector=Pb});var Bl=U(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.TimeNanosecondVector=Et.TimeMicrosecondVector=Et.TimeMillisecondVector=Et.TimeSecondVector=Et.TimeVector=void 0;var PF=Ve(),fn=class extends PF.BaseVector{};Et.TimeVector=fn;var Vb=class extends fn{};Et.TimeSecondVector=Vb;var Nb=class extends fn{};Et.TimeMillisecondVector=Nb;var Lb=class extends fn{};Et.TimeMicrosecondVector=Lb;var xb=class extends fn{};Et.TimeNanosecondVector=xb});var Il=U(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.SparseUnionVector=ei.DenseUnionVector=ei.UnionVector=void 0;var VF=Ve(),jo=class extends VF.BaseVector{get typeIdToChildIndex(){return this.data.type.typeIdToChildIndex}};ei.UnionVector=jo;var qb=class extends jo{get valueOffsets(){return this.data.valueOffsets}};ei.DenseUnionVector=qb;var Wb=class extends jo{};ei.SparseUnionVector=Wb});var Sl=U(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.Utf8Vector=void 0;var NF=Pe(),LF=Ve(),zb=ve(),xF=cr(),Yb=class extends LF.BaseVector{static from(e){return xF.vectorFromValuesWithType(()=>new zb.Utf8,e)}asBinary(){return NF.Vector.new(this.data.clone(new zb.Binary))}};To.Utf8Vector=Yb});var Hb=U(ti=>{"use strict";Object.defineProperty(ti,"__esModule",{value:!0});ti.partial2=ti.partial1=ti.partial0=void 0;function qF(r){return function(){return r(this)}}ti.partial0=qF;function WF(r){return function(e){return r(this,e)}}ti.partial1=WF;function zF(r){return function(e,t){return r(this,e,t)}}ti.partial2=zF});var Dl=U(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.instance=hn.GetVisitor=void 0;var Bo=Yn(),YF=it(),HF=ci(),GF=xn(),Ct=Ie(),K=class extends YF.Visitor{};hn.GetVisitor=K;var $F=(r,e)=>864e5*r[e],Ol=(r,e)=>4294967296*r[e+1]+(r[e]>>>0),JF=(r,e)=>4294967296*(r[e+1]/1e3)+(r[e]>>>0)/1e3,KF=(r,e)=>4294967296*(r[e+1]/1e6)+(r[e]>>>0)/1e6,Gb=r=>new Date(r),QF=(r,e)=>Gb($F(r,e)),ZF=(r,e)=>Gb(Ol(r,e)),XF=(r,e)=>null,$b=(r,e,t)=>{let{[t]:i,[t+1]:n}=e;return i!=null&&n!=null?r.subarray(i,n):null},eR=({offset:r,values:e},t)=>{let i=r+t;return(e[i>>3]&1<<i%8)!=0},Jb=({values:r},e)=>QF(r,e),Kb=({values:r},e)=>ZF(r,e*2),fr=({stride:r,values:e},t)=>e[r*t],Qb=({stride:r,values:e},t)=>GF.uint16ToFloat64(e[r*t]),Al=({stride:r,values:e,type:t},i)=>Bo.BN.new(e.subarray(r*i,r*(i+1)),t.isSigned),tR=({stride:r,values:e},t)=>e.subarray(r*t,r*(t+1)),rR=({values:r,valueOffsets:e},t)=>$b(r,e,t),iR=({values:r,valueOffsets:e},t)=>{let i=$b(r,e,t);return i!==null?HF.decodeUtf8(i):null},nR=(r,e)=>r.type.bitWidth<64?fr(r,e):Al(r,e),sR=(r,e)=>r.type.precision!==Ct.Precision.HALF?fr(r,e):Qb(r,e),aR=(r,e)=>r.type.unit===Ct.DateUnit.DAY?Jb(r,e):Kb(r,e),Zb=({values:r},e)=>1e3*Ol(r,e*2),Xb=({values:r},e)=>Ol(r,e*2),eg=({values:r},e)=>JF(r,e*2),tg=({values:r},e)=>KF(r,e*2),oR=(r,e)=>{switch(r.type.unit){case Ct.TimeUnit.SECOND:return Zb(r,e);case Ct.TimeUnit.MILLISECOND:return Xb(r,e);case Ct.TimeUnit.MICROSECOND:return eg(r,e);case Ct.TimeUnit.NANOSECOND:return tg(r,e)}},rg=({values:r,stride:e},t)=>r[e*t],ig=({values:r,stride:e},t)=>r[e*t],ng=({values:r},e)=>Bo.BN.signed(r.subarray(2*e,2*(e+1))),sg=({values:r},e)=>Bo.BN.signed(r.subarray(2*e,2*(e+1))),uR=(r,e)=>{switch(r.type.unit){case Ct.TimeUnit.SECOND:return rg(r,e);case Ct.TimeUnit.MILLISECOND:return ig(r,e);case Ct.TimeUnit.MICROSECOND:return ng(r,e);case Ct.TimeUnit.NANOSECOND:return sg(r,e)}},cR=({values:r},e)=>Bo.BN.decimal(r.subarray(4*e,4*(e+1))),lR=(r,e)=>{let t=r.getChildAt(0),{valueOffsets:i,stride:n}=r;return t.slice(i[e*n],i[e*n+1])},dR=(r,e)=>r.bind(e),fR=(r,e)=>r.bind(e),hR=(r,e)=>r.type.mode===Ct.UnionMode.Dense?ag(r,e):og(r,e),ag=(r,e)=>{let t=r.typeIdToChildIndex[r.typeIds[e]],i=r.getChildAt(t);return i?i.get(r.valueOffsets[e]):null},og=(r,e)=>{let t=r.typeIdToChildIndex[r.typeIds[e]],i=r.getChildAt(t);return i?i.get(e):null},pR=(r,e)=>r.getValue(r.getKey(e)),yR=(r,e)=>r.type.unit===Ct.IntervalUnit.DAY_TIME?ug(r,e):cg(r,e),ug=({values:r},e)=>r.subarray(2*e,2*(e+1)),cg=({values:r},e)=>{let t=r[e],i=new Int32Array(2);return i[0]=t/12|0,i[1]=t%12|0,i},mR=(r,e)=>{let t=r.getChildAt(0),{stride:i}=r;return t.slice(e*i,(e+1)*i)};K.prototype.visitNull=XF;K.prototype.visitBool=eR;K.prototype.visitInt=nR;K.prototype.visitInt8=fr;K.prototype.visitInt16=fr;K.prototype.visitInt32=fr;K.prototype.visitInt64=Al;K.prototype.visitUint8=fr;K.prototype.visitUint16=fr;K.prototype.visitUint32=fr;K.prototype.visitUint64=Al;K.prototype.visitFloat=sR;K.prototype.visitFloat16=Qb;K.prototype.visitFloat32=fr;K.prototype.visitFloat64=fr;K.prototype.visitUtf8=iR;K.prototype.visitBinary=rR;K.prototype.visitFixedSizeBinary=tR;K.prototype.visitDate=aR;K.prototype.visitDateDay=Jb;K.prototype.visitDateMillisecond=Kb;K.prototype.visitTimestamp=oR;K.prototype.visitTimestampSecond=Zb;K.prototype.visitTimestampMillisecond=Xb;K.prototype.visitTimestampMicrosecond=eg;K.prototype.visitTimestampNanosecond=tg;K.prototype.visitTime=uR;K.prototype.visitTimeSecond=rg;K.prototype.visitTimeMillisecond=ig;K.prototype.visitTimeMicrosecond=ng;K.prototype.visitTimeNanosecond=sg;K.prototype.visitDecimal=cR;K.prototype.visitList=lR;K.prototype.visitStruct=fR;K.prototype.visitUnion=hR;K.prototype.visitDenseUnion=ag;K.prototype.visitSparseUnion=og;K.prototype.visitDictionary=pR;K.prototype.visitInterval=yR;K.prototype.visitIntervalDayTime=ug;K.prototype.visitIntervalYearMonth=cg;K.prototype.visitFixedSizeList=mR;K.prototype.visitMap=dR;hn.instance=new K});var hg=U(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.instance=pn.IndexOfVisitor=void 0;var _R=it(),lg=Kt(),dg=$n(),Q=class extends _R.Visitor{};pn.IndexOfVisitor=Q;function bR(r,e){return e===null&&r.length>0?0:-1}function gR(r,e){let{nullBitmap:t}=r.data;if(!t||r.nullCount<=0)return-1;let i=0;for(let n of lg.iterateBits(t,r.data.offset+(e||0),r.length,t,lg.getBool)){if(!n)return i;++i}return-1}function le(r,e,t){if(e===void 0)return-1;if(e===null)return gR(r,t);let i=dg.createElementComparator(e);for(let n=(t||0)-1,a=r.length;++n<a;)if(i(r.get(n)))return n;return-1}function fg(r,e,t){let i=dg.createElementComparator(e);for(let n=(t||0)-1,a=r.length;++n<a;)if(i(r.get(n)))return n;return-1}Q.prototype.visitNull=bR;Q.prototype.visitBool=le;Q.prototype.visitInt=le;Q.prototype.visitInt8=le;Q.prototype.visitInt16=le;Q.prototype.visitInt32=le;Q.prototype.visitInt64=le;Q.prototype.visitUint8=le;Q.prototype.visitUint16=le;Q.prototype.visitUint32=le;Q.prototype.visitUint64=le;Q.prototype.visitFloat=le;Q.prototype.visitFloat16=le;Q.prototype.visitFloat32=le;Q.prototype.visitFloat64=le;Q.prototype.visitUtf8=le;Q.prototype.visitBinary=le;Q.prototype.visitFixedSizeBinary=le;Q.prototype.visitDate=le;Q.prototype.visitDateDay=le;Q.prototype.visitDateMillisecond=le;Q.prototype.visitTimestamp=le;Q.prototype.visitTimestampSecond=le;Q.prototype.visitTimestampMillisecond=le;Q.prototype.visitTimestampMicrosecond=le;Q.prototype.visitTimestampNanosecond=le;Q.prototype.visitTime=le;Q.prototype.visitTimeSecond=le;Q.prototype.visitTimeMillisecond=le;Q.prototype.visitTimeMicrosecond=le;Q.prototype.visitTimeNanosecond=le;Q.prototype.visitDecimal=le;Q.prototype.visitList=le;Q.prototype.visitStruct=le;Q.prototype.visitUnion=le;Q.prototype.visitDenseUnion=fg;Q.prototype.visitSparseUnion=fg;Q.prototype.visitDictionary=le;Q.prototype.visitInterval=le;Q.prototype.visitIntervalDayTime=le;Q.prototype.visitIntervalYearMonth=le;Q.prototype.visitFixedSizeList=le;Q.prototype.visitMap=le;pn.instance=new Q});var Fl=U(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.instance=yn.IteratorVisitor=void 0;var Io=Ie(),vR=it(),wR=Kt(),pg=Dl(),Z=class extends vR.Visitor{};yn.IteratorVisitor=Z;function jR(r){let e=pg.instance.getVisitFn(r);return wR.iterateBits(r.data.nullBitmap,r.data.offset,r.length,r,(t,i,n,a)=>(n&1<<a)!=0?e(t,i):null)}function ae(r){if(r.nullCount>0)return jR(r);let{type:e,typeId:t,length:i}=r;return r.stride===1&&(t===Io.Type.Timestamp||t===Io.Type.Int&&e.bitWidth!==64||t===Io.Type.Time&&e.bitWidth!==64||t===Io.Type.Float&&e.precision>0)?r.data.values.subarray(0,i)[Symbol.iterator]():function*(n){for(let a=-1;++a<i;)yield n(r,a)}(pg.instance.getVisitFn(r))}Z.prototype.visitNull=ae;Z.prototype.visitBool=ae;Z.prototype.visitInt=ae;Z.prototype.visitInt8=ae;Z.prototype.visitInt16=ae;Z.prototype.visitInt32=ae;Z.prototype.visitInt64=ae;Z.prototype.visitUint8=ae;Z.prototype.visitUint16=ae;Z.prototype.visitUint32=ae;Z.prototype.visitUint64=ae;Z.prototype.visitFloat=ae;Z.prototype.visitFloat16=ae;Z.prototype.visitFloat32=ae;Z.prototype.visitFloat64=ae;Z.prototype.visitUtf8=ae;Z.prototype.visitBinary=ae;Z.prototype.visitFixedSizeBinary=ae;Z.prototype.visitDate=ae;Z.prototype.visitDateDay=ae;Z.prototype.visitDateMillisecond=ae;Z.prototype.visitTimestamp=ae;Z.prototype.visitTimestampSecond=ae;Z.prototype.visitTimestampMillisecond=ae;Z.prototype.visitTimestampMicrosecond=ae;Z.prototype.visitTimestampNanosecond=ae;Z.prototype.visitTime=ae;Z.prototype.visitTimeSecond=ae;Z.prototype.visitTimeMillisecond=ae;Z.prototype.visitTimeMicrosecond=ae;Z.prototype.visitTimeNanosecond=ae;Z.prototype.visitDecimal=ae;Z.prototype.visitList=ae;Z.prototype.visitStruct=ae;Z.prototype.visitUnion=ae;Z.prototype.visitDenseUnion=ae;Z.prototype.visitSparseUnion=ae;Z.prototype.visitDictionary=ae;Z.prototype.visitInterval=ae;Z.prototype.visitIntervalDayTime=ae;Z.prototype.visitIntervalYearMonth=ae;Z.prototype.visitFixedSizeList=ae;Z.prototype.visitMap=ae;yn.instance=new Z});var yg=U(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.instance=mn.ToArrayVisitor=void 0;var us=Ie(),TR=it(),BR=Fl(),X=class extends TR.Visitor{};mn.ToArrayVisitor=X;function oe(r){let{type:e,length:t,stride:i}=r;switch(e.typeId){case us.Type.Int:case us.Type.Float:case us.Type.Decimal:case us.Type.Time:case us.Type.Timestamp:return r.data.values.subarray(0,t*i)}return[...BR.instance.visit(r)]}X.prototype.visitNull=oe;X.prototype.visitBool=oe;X.prototype.visitInt=oe;X.prototype.visitInt8=oe;X.prototype.visitInt16=oe;X.prototype.visitInt32=oe;X.prototype.visitInt64=oe;X.prototype.visitUint8=oe;X.prototype.visitUint16=oe;X.prototype.visitUint32=oe;X.prototype.visitUint64=oe;X.prototype.visitFloat=oe;X.prototype.visitFloat16=oe;X.prototype.visitFloat32=oe;X.prototype.visitFloat64=oe;X.prototype.visitUtf8=oe;X.prototype.visitBinary=oe;X.prototype.visitFixedSizeBinary=oe;X.prototype.visitDate=oe;X.prototype.visitDateDay=oe;X.prototype.visitDateMillisecond=oe;X.prototype.visitTimestamp=oe;X.prototype.visitTimestampSecond=oe;X.prototype.visitTimestampMillisecond=oe;X.prototype.visitTimestampMicrosecond=oe;X.prototype.visitTimestampNanosecond=oe;X.prototype.visitTime=oe;X.prototype.visitTimeSecond=oe;X.prototype.visitTimeMillisecond=oe;X.prototype.visitTimeMicrosecond=oe;X.prototype.visitTimeNanosecond=oe;X.prototype.visitDecimal=oe;X.prototype.visitList=oe;X.prototype.visitStruct=oe;X.prototype.visitUnion=oe;X.prototype.visitDenseUnion=oe;X.prototype.visitSparseUnion=oe;X.prototype.visitDictionary=oe;X.prototype.visitInterval=oe;X.prototype.visitIntervalDayTime=oe;X.prototype.visitIntervalYearMonth=oe;X.prototype.visitFixedSizeList=oe;X.prototype.visitMap=oe;mn.instance=new X});var mg=U(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.instance=_n.ByteWidthVisitor=void 0;var IR=it(),SR=Ie(),cs=(r,e)=>r+e,Rl=r=>`Cannot compute the byte width of variable-width column ${r}`,El=class extends IR.Visitor{visitNull(e){return 0}visitInt(e){return e.bitWidth/8}visitFloat(e){return e.ArrayType.BYTES_PER_ELEMENT}visitBinary(e){throw new Error(Rl(e))}visitUtf8(e){throw new Error(Rl(e))}visitBool(e){return 1/8}visitDecimal(e){return 16}visitDate(e){return(e.unit+1)*4}visitTime(e){return e.bitWidth/8}visitTimestamp(e){return e.unit===SR.TimeUnit.SECOND?4:8}visitInterval(e){return(e.unit+1)*4}visitList(e){throw new Error(Rl(e))}visitStruct(e){return this.visitFields(e.children).reduce(cs,0)}visitUnion(e){return this.visitFields(e.children).reduce(cs,0)}visitFixedSizeBinary(e){return e.byteWidth}visitFixedSizeList(e){return e.listSize*this.visitFields(e.children).reduce(cs,0)}visitMap(e){return this.visitFields(e.children).reduce(cs,0)}visitDictionary(e){return this.visit(e.indices)}visitFields(e){return(e||[]).map(t=>this.visit(t.type))}visitSchema(e){return this.visitFields(e.fields).reduce(cs,0)}};_n.ByteWidthVisitor=El;_n.instance=new El});var _g=U(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.instance=bn.GetVectorConstructor=void 0;var OR=it(),AR=Zc(),DR=Xc(),Cl=tl(),FR=rl(),RR=ho(),ER=nl(),CR=sl(),So=cl(),Ul=ll(),Br=_o(),UR=gl(),kR=vl(),MR=wl(),PR=jl(),ls=Tl(),ds=Bl(),kl=Il(),VR=Sl(),Ml=class extends OR.Visitor{visitNull(){return MR.NullVector}visitBool(){return DR.BoolVector}visitInt(){return Br.IntVector}visitInt8(){return Br.Int8Vector}visitInt16(){return Br.Int16Vector}visitInt32(){return Br.Int32Vector}visitInt64(){return Br.Int64Vector}visitUint8(){return Br.Uint8Vector}visitUint16(){return Br.Uint16Vector}visitUint32(){return Br.Uint32Vector}visitUint64(){return Br.Uint64Vector}visitFloat(){return So.FloatVector}visitFloat16(){return So.Float16Vector}visitFloat32(){return So.Float32Vector}visitFloat64(){return So.Float64Vector}visitUtf8(){return VR.Utf8Vector}visitBinary(){return AR.BinaryVector}visitFixedSizeBinary(){return ER.FixedSizeBinaryVector}visitDate(){return Cl.DateVector}visitDateDay(){return Cl.DateDayVector}visitDateMillisecond(){return Cl.DateMillisecondVector}visitTimestamp(){return ls.TimestampVector}visitTimestampSecond(){return ls.TimestampSecondVector}visitTimestampMillisecond(){return ls.TimestampMillisecondVector}visitTimestampMicrosecond(){return ls.TimestampMicrosecondVector}visitTimestampNanosecond(){return ls.TimestampNanosecondVector}visitTime(){return ds.TimeVector}visitTimeSecond(){return ds.TimeSecondVector}visitTimeMillisecond(){return ds.TimeMillisecondVector}visitTimeMicrosecond(){return ds.TimeMicrosecondVector}visitTimeNanosecond(){return ds.TimeNanosecondVector}visitDecimal(){return FR.DecimalVector}visitList(){return UR.ListVector}visitStruct(){return PR.StructVector}visitUnion(){return kl.UnionVector}visitDenseUnion(){return kl.DenseUnionVector}visitSparseUnion(){return kl.SparseUnionVector}visitDictionary(){return RR.DictionaryVector}visitInterval(){return Ul.IntervalVector}visitIntervalDayTime(){return Ul.IntervalDayTimeVector}visitIntervalYearMonth(){return Ul.IntervalYearMonthVector}visitFixedSizeList(){return CR.FixedSizeListVector}visitMap(){return kR.MapVector}};bn.GetVectorConstructor=Ml;bn.instance=new Ml});var cr=U(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.vectorFromValuesWithType=k.StructRow=k.MapRow=k.Utf8Vector=k.SparseUnionVector=k.DenseUnionVector=k.UnionVector=k.TimeNanosecondVector=k.TimeMicrosecondVector=k.TimeMillisecondVector=k.TimeSecondVector=k.TimeVector=k.TimestampNanosecondVector=k.TimestampMicrosecondVector=k.TimestampMillisecondVector=k.TimestampSecondVector=k.TimestampVector=k.StructVector=k.NullVector=k.MapVector=k.ListVector=k.Uint64Vector=k.Uint32Vector=k.Uint16Vector=k.Uint8Vector=k.Int64Vector=k.Int32Vector=k.Int16Vector=k.Int8Vector=k.IntVector=k.IntervalYearMonthVector=k.IntervalDayTimeVector=k.IntervalVector=k.Float64Vector=k.Float32Vector=k.Float16Vector=k.FloatVector=k.FixedSizeListVector=k.FixedSizeBinaryVector=k.DictionaryVector=k.DecimalVector=k.DateMillisecondVector=k.DateDayVector=k.DateVector=k.Chunked=k.BoolVector=k.BinaryVector=k.BaseVector=k.Vector=void 0;var NR=Pe();Object.defineProperty(k,"Vector",{enumerable:!0,get:function(){return NR.Vector}});var LR=Ve();Object.defineProperty(k,"BaseVector",{enumerable:!0,get:function(){return LR.BaseVector}});var xR=Zc();Object.defineProperty(k,"BinaryVector",{enumerable:!0,get:function(){return xR.BinaryVector}});var qR=Xc();Object.defineProperty(k,"BoolVector",{enumerable:!0,get:function(){return qR.BoolVector}});var WR=kr();Object.defineProperty(k,"Chunked",{enumerable:!0,get:function(){return WR.Chunked}});var Pl=tl();Object.defineProperty(k,"DateVector",{enumerable:!0,get:function(){return Pl.DateVector}});Object.defineProperty(k,"DateDayVector",{enumerable:!0,get:function(){return Pl.DateDayVector}});Object.defineProperty(k,"DateMillisecondVector",{enumerable:!0,get:function(){return Pl.DateMillisecondVector}});var zR=rl();Object.defineProperty(k,"DecimalVector",{enumerable:!0,get:function(){return zR.DecimalVector}});var YR=ho();Object.defineProperty(k,"DictionaryVector",{enumerable:!0,get:function(){return YR.DictionaryVector}});var HR=nl();Object.defineProperty(k,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return HR.FixedSizeBinaryVector}});var GR=sl();Object.defineProperty(k,"FixedSizeListVector",{enumerable:!0,get:function(){return GR.FixedSizeListVector}});var Oo=cl();Object.defineProperty(k,"FloatVector",{enumerable:!0,get:function(){return Oo.FloatVector}});Object.defineProperty(k,"Float16Vector",{enumerable:!0,get:function(){return Oo.Float16Vector}});Object.defineProperty(k,"Float32Vector",{enumerable:!0,get:function(){return Oo.Float32Vector}});Object.defineProperty(k,"Float64Vector",{enumerable:!0,get:function(){return Oo.Float64Vector}});var Vl=ll();Object.defineProperty(k,"IntervalVector",{enumerable:!0,get:function(){return Vl.IntervalVector}});Object.defineProperty(k,"IntervalDayTimeVector",{enumerable:!0,get:function(){return Vl.IntervalDayTimeVector}});Object.defineProperty(k,"IntervalYearMonthVector",{enumerable:!0,get:function(){return Vl.IntervalYearMonthVector}});var Ir=_o();Object.defineProperty(k,"IntVector",{enumerable:!0,get:function(){return Ir.IntVector}});Object.defineProperty(k,"Int8Vector",{enumerable:!0,get:function(){return Ir.Int8Vector}});Object.defineProperty(k,"Int16Vector",{enumerable:!0,get:function(){return Ir.Int16Vector}});Object.defineProperty(k,"Int32Vector",{enumerable:!0,get:function(){return Ir.Int32Vector}});Object.defineProperty(k,"Int64Vector",{enumerable:!0,get:function(){return Ir.Int64Vector}});Object.defineProperty(k,"Uint8Vector",{enumerable:!0,get:function(){return Ir.Uint8Vector}});Object.defineProperty(k,"Uint16Vector",{enumerable:!0,get:function(){return Ir.Uint16Vector}});Object.defineProperty(k,"Uint32Vector",{enumerable:!0,get:function(){return Ir.Uint32Vector}});Object.defineProperty(k,"Uint64Vector",{enumerable:!0,get:function(){return Ir.Uint64Vector}});var $R=gl();Object.defineProperty(k,"ListVector",{enumerable:!0,get:function(){return $R.ListVector}});var JR=vl();Object.defineProperty(k,"MapVector",{enumerable:!0,get:function(){return JR.MapVector}});var KR=wl();Object.defineProperty(k,"NullVector",{enumerable:!0,get:function(){return KR.NullVector}});var QR=jl();Object.defineProperty(k,"StructVector",{enumerable:!0,get:function(){return QR.StructVector}});var fs=Tl();Object.defineProperty(k,"TimestampVector",{enumerable:!0,get:function(){return fs.TimestampVector}});Object.defineProperty(k,"TimestampSecondVector",{enumerable:!0,get:function(){return fs.TimestampSecondVector}});Object.defineProperty(k,"TimestampMillisecondVector",{enumerable:!0,get:function(){return fs.TimestampMillisecondVector}});Object.defineProperty(k,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return fs.TimestampMicrosecondVector}});Object.defineProperty(k,"TimestampNanosecondVector",{enumerable:!0,get:function(){return fs.TimestampNanosecondVector}});var hs=Bl();Object.defineProperty(k,"TimeVector",{enumerable:!0,get:function(){return hs.TimeVector}});Object.defineProperty(k,"TimeSecondVector",{enumerable:!0,get:function(){return hs.TimeSecondVector}});Object.defineProperty(k,"TimeMillisecondVector",{enumerable:!0,get:function(){return hs.TimeMillisecondVector}});Object.defineProperty(k,"TimeMicrosecondVector",{enumerable:!0,get:function(){return hs.TimeMicrosecondVector}});Object.defineProperty(k,"TimeNanosecondVector",{enumerable:!0,get:function(){return hs.TimeNanosecondVector}});var Nl=Il();Object.defineProperty(k,"UnionVector",{enumerable:!0,get:function(){return Nl.UnionVector}});Object.defineProperty(k,"DenseUnionVector",{enumerable:!0,get:function(){return Nl.DenseUnionVector}});Object.defineProperty(k,"SparseUnionVector",{enumerable:!0,get:function(){return Nl.SparseUnionVector}});var ZR=Sl();Object.defineProperty(k,"Utf8Vector",{enumerable:!0,get:function(){return ZR.Utf8Vector}});var bg=Hn();Object.defineProperty(k,"MapRow",{enumerable:!0,get:function(){return bg.MapRow}});Object.defineProperty(k,"StructRow",{enumerable:!0,get:function(){return bg.StructRow}});var ps=Hb(),Ll=Ie(),gn=Pe(),gg=kr(),ji=Ve(),XR=Kt(),Ao=ut(),vg=Ue(),wg=Dl(),jg=nc(),Tg=hg(),Bg=yg(),Ig=Fl(),Sg=mg(),Og=_g();gn.Vector.new=eE;gn.Vector.from=rE;function eE(r,...e){return new(Og.instance.getVisitFn(r)())(r,...e)}function tE(r,e){if(Ao.isIterable(e))return gn.Vector.from({nullValues:[null,void 0],type:r(),values:e});if(Ao.isAsyncIterable(e))return gn.Vector.from({nullValues:[null,void 0],type:r(),values:e});let{values:t=[],type:i=r(),nullValues:n=[null,void 0]}={...e};return Ao.isIterable(t)?gn.Vector.from({nullValues:n,...e,type:i}):gn.Vector.from({nullValues:n,...e,type:i})}k.vectorFromValuesWithType=tE;function rE(r){let{values:e=[],...t}={nullValues:[null,void 0],...r};if(Ao.isIterable(e)){let i=[...vg.Builder.throughIterable(t)(e)];return i.length===1?i[0]:gg.Chunked.concat(i)}return(async i=>{let n=vg.Builder.throughAsyncIterable(t);for await(let a of n(e))i.push(a);return i.length===1?i[0]:gg.Chunked.concat(i)})([])}ji.BaseVector.prototype.get=function(e){return wg.instance.visit(this,e)};ji.BaseVector.prototype.set=function(e,t){return jg.instance.visit(this,e,t)};ji.BaseVector.prototype.indexOf=function(e,t){return Tg.instance.visit(this,e,t)};ji.BaseVector.prototype.toArray=function(){return Bg.instance.visit(this)};ji.BaseVector.prototype.getByteWidth=function(){return Sg.instance.visit(this.type)};ji.BaseVector.prototype[Symbol.iterator]=function(){return Ig.instance.visit(this)};ji.BaseVector.prototype._bindDataAccessors=aE;Object.keys(Ll.Type).map(r=>Ll.Type[r]).filter(r=>typeof r=="number").filter(r=>r!==Ll.Type.NONE).forEach(r=>{let e=Og.instance.visit(r);e.prototype.get=ps.partial1(wg.instance.getVisitFn(r)),e.prototype.set=ps.partial2(jg.instance.getVisitFn(r)),e.prototype.indexOf=ps.partial2(Tg.instance.getVisitFn(r)),e.prototype.toArray=ps.partial0(Bg.instance.getVisitFn(r)),e.prototype.getByteWidth=iE(Sg.instance.getVisitFn(r)),e.prototype[Symbol.iterator]=ps.partial0(Ig.instance.getVisitFn(r))});function iE(r){return function(){return r(this.type)}}function nE(r){return function(e){return this.isValid(e)?r.call(this,e):null}}function sE(r){return function(e,t){XR.setBool(this.nullBitmap,this.offset+e,t!=null)&&r.call(this,e,t)}}function aE(){let r=this.nullBitmap;r&&r.byteLength>0&&(this.get=nE(this.get),this.set=sE(this.set))}});var as=U(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});Do.Table=void 0;var oE=$i(),Ag=Qe(),xl=Tr(),uE=ys(),ql=ve(),Dg=Mr(),Wl=ut(),Fg=so(),Rg=Jc(),zl=cr(),et=class extends zl.Chunked{constructor(...e){let t=null;e[0]instanceof Ag.Schema&&(t=e.shift());let i=Dg.selectArgs(xl.RecordBatch,e);if(!t&&!(t=i[0]&&i[0].schema))throw new TypeError("Table must be initialized with a Schema or at least one RecordBatch");i[0]||(i[0]=new xl._InternalEmptyPlaceholderRecordBatch(t));super(new ql.Struct(t.fields),i);this._schema=t,this._chunks=i}static empty(e=new Ag.Schema([])){return new et(e,[])}static from(e){if(!e)return et.empty();if(typeof e=="object"){let i=Wl.isIterable(e.values)?cE(e):Wl.isAsyncIterable(e.values)?lE(e):null;if(i!==null)return i}let t=uE.RecordBatchReader.from(e);return Wl.isPromise(t)?(async()=>await et.from(await t))():t.isSync()&&(t=t.open())?t.schema?new et(t.schema,[...t]):et.empty():(async i=>{let n=await i,a=n.schema,c=[];if(a){for await(let f of n)c.push(f);return new et(a,c)}return et.empty()})(t.open())}static async fromAsync(e){return await et.from(e)}static fromStruct(e){return et.new(e.data.childData,e.type.children)}static new(...e){return new et(...Rg.distributeColumnsIntoRecordBatches(Dg.selectColumnArgs(e)))}get schema(){return this._schema}get length(){return this._length}get chunks(){return this._chunks}get numCols(){return this._numChildren}clone(e=this._chunks){return new et(this._schema,e)}getColumn(e){return this.getColumnAt(this.getColumnIndex(e))}getColumnAt(e){return this.getChildAt(e)}getColumnIndex(e){return this._schema.fields.findIndex(t=>t.name===e)}getChildAt(e){if(e<0||e>=this.numChildren)return null;let t,i,n=this._schema.fields,a=this._children||(this._children=[]);if(i=a[e])return i;if(t=n[e]){let c=this._chunks.map(f=>f.getChildAt(e)).filter(f=>f!=null);if(c.length>0)return a[e]=new oE.Column(t,c)}return null}serialize(e="binary",t=!0){return(t?Fg.RecordBatchStreamWriter:Fg.RecordBatchFileWriter).writeAll(this).toUint8Array(!0)}count(){return this._length}select(...e){let t=this._schema.fields.reduce((i,n,a)=>i.set(n.name,a),new Map);return this.selectAt(...e.map(i=>t.get(i)).filter(i=>i>-1))}selectAt(...e){let t=this._schema.selectAt(...e);return new et(t,this._chunks.map(({length:i,data:{childData:n}})=>new xl.RecordBatch(t,i,e.map(a=>n[a]).filter(Boolean))))}assign(e){let t=this._schema.fields,[i,n]=e.schema.fields.reduce((f,j,s)=>{let[m,R]=f,$=t.findIndex(ue=>ue.name===j.name);return~$?R[$]=s:m.push(s),f},[[],[]]),a=this._schema.assign(e.schema),c=[...t.map((f,j,s,m=n[j])=>m===void 0?this.getColumnAt(j):e.getColumnAt(m)),...i.map(f=>e.getColumnAt(f))].filter(Boolean);return new et(...Rg.distributeVectorsIntoRecordBatches(a,c))}};Do.Table=et;function cE(r){let{type:e}=r;return e instanceof ql.Struct?et.fromStruct(zl.StructVector.from(r)):null}function lE(r){let{type:e}=r;return e instanceof ql.Struct?zl.StructVector.from(r).then(t=>et.fromStruct(t)):null}});var Tr=U(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn._InternalEmptyPlaceholderRecordBatch=vn.RecordBatch=void 0;var Yl=Nt(),Hl=as(),dE=Pe(),fE=it(),hE=Qe(),pE=ut(),yE=kr(),mE=Mr(),Gl=ve(),_E=Jc(),bE=cr(),ri=class extends bE.StructVector{constructor(...e){let t,i=e[0],n;if(e[1]instanceof Yl.Data)[,t,n]=e;else{let a=i.fields,[,c,f]=e;t=Yl.Data.Struct(new Gl.Struct(a),0,c,0,null,f)}super(t,n);this._schema=i}static from(e){return pE.isIterable(e.values),Hl.Table.from(e)}static new(...e){let[t,i]=mE.selectFieldArgs(e),n=i.filter(a=>a instanceof dE.Vector);return new ri(..._E.ensureSameLengthData(new hE.Schema(t),n.map(a=>a.data)))}clone(e,t=this._children){return new ri(this._schema,e,t)}concat(...e){let t=this._schema,i=yE.Chunked.flatten(this,...e);return new Hl.Table(t,i.map(({data:n})=>new ri(t,n)))}get schema(){return this._schema}get numCols(){return this._schema.fields.length}get dictionaries(){return this._dictionaries||(this._dictionaries=Fo.collect(this))}select(...e){let t=this._schema.fields.reduce((i,n,a)=>i.set(n.name,a),new Map);return this.selectAt(...e.map(i=>t.get(i)).filter(i=>i>-1))}selectAt(...e){let t=this._schema.selectAt(...e),i=e.map(n=>this.data.childData[n]).filter(Boolean);return new ri(t,this.length,i)}};vn.RecordBatch=ri;var Eg=class extends ri{constructor(e){super(e,0,e.fields.map(t=>Yl.Data.new(t.type,0,0,0)))}};vn._InternalEmptyPlaceholderRecordBatch=Eg;var Fo=class extends fE.Visitor{constructor(){super(...arguments);this.dictionaries=new Map}static collect(e){return new Fo().visit(e.data,new Gl.Struct(e.schema.fields)).dictionaries}visit(e,t){return Gl.DataType.isDictionary(t)?this.visitDictionary(e,t):(e.childData.forEach((i,n)=>this.visit(i,t.children[n].type)),this)}visitDictionary(e,t){let i=e.dictionary;return i&&i.length>0&&this.dictionaries.set(t.id,i),this}}});var ys=U(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.AsyncRecordBatchFileReader=Mt.RecordBatchFileReader=Mt.AsyncRecordBatchStreamReader=Mt.RecordBatchStreamReader=Mt.RecordBatchReader=void 0;var Cg=Pe(),Ro=Ie(),Ug=mc(),kg=kn(),Mg=zr(),ms=gc(),Pg=F_(),$l=Tr(),Ti=Ei(),Ut=Ja(),kt=ut(),hr=class extends Ti.ReadableInterop{constructor(e){super();this._impl=e}get closed(){return this._impl.closed}get schema(){return this._impl.schema}get autoDestroy(){return this._impl.autoDestroy}get dictionaries(){return this._impl.dictionaries}get numDictionaries(){return this._impl.numDictionaries}get numRecordBatches(){return this._impl.numRecordBatches}get footer(){return this._impl.isFile()?this._impl.footer:null}isSync(){return this._impl.isSync()}isAsync(){return this._impl.isAsync()}isFile(){return this._impl.isFile()}isStream(){return this._impl.isStream()}next(){return this._impl.next()}throw(e){return this._impl.throw(e)}return(e){return this._impl.return(e)}cancel(){return this._impl.cancel()}reset(e){return this._impl.reset(e),this._DOMStream=void 0,this._nodeStream=void 0,this}open(e){let t=this._impl.open(e);return kt.isPromise(t)?t.then(()=>this):this}readRecordBatch(e){return this._impl.isFile()?this._impl.readRecordBatch(e):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return kg.default.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return kg.default.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,t){throw new Error('"throughDOM" not available in this environment')}static from(e){return e instanceof hr?e:kt.isArrowJSON(e)?gE(e):kt.isFileHandle(e)?jE(e):kt.isPromise(e)?(async()=>await hr.from(await e))():kt.isFetchResponse(e)||kt.isReadableDOMStream(e)||kt.isReadableNodeStream(e)||kt.isAsyncIterable(e)?wE(new Mg.AsyncByteStream(e)):vE(new Mg.ByteStream(e))}static readAll(e){return e instanceof hr?e.isSync()?xg(e):qg(e):kt.isArrowJSON(e)||ArrayBuffer.isView(e)||kt.isIterable(e)||kt.isIteratorResult(e)?xg(e):qg(e)}};Mt.RecordBatchReader=hr;var wn=class extends hr{constructor(e){super(e);this._impl=e}[Symbol.iterator](){return this._impl[Symbol.iterator]()}async*[Symbol.asyncIterator](){yield*this[Symbol.iterator]()}};Mt.RecordBatchStreamReader=wn;var jn=class extends hr{constructor(e){super(e);this._impl=e}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}};Mt.AsyncRecordBatchStreamReader=jn;var Eo=class extends wn{constructor(e){super(e);this._impl=e}};Mt.RecordBatchFileReader=Eo;var Jl=class extends jn{constructor(e){super(e);this._impl=e}};Mt.AsyncRecordBatchFileReader=Jl;var Kl=class{constructor(e=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=e}get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(e){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=e,this.dictionaries=new Map,this}_loadRecordBatch(e,t){return new $l.RecordBatch(this.schema,e.length,this._loadVectors(e,t,this.schema.fields))}_loadDictionaryBatch(e,t){let{id:i,isDelta:n,data:a}=e,{dictionaries:c,schema:f}=this,j=c.get(i);if(n||!j){let s=f.dictionaries.get(i);return j&&n?j.concat(Cg.Vector.new(this._loadVectors(a,t,[s])[0])):Cg.Vector.new(this._loadVectors(a,t,[s])[0])}return j}_loadVectors(e,t,i){return new Pg.VectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(i)}},_s=class extends Kl{constructor(e,t){super(t);this._reader=kt.isArrowJSON(e)?new Ut.JSONMessageReader(this._handle=e):new Ut.MessageReader(this._handle=e)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(e){return this.closed||(this.autoDestroy=Lg(this,e),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):Ti.ITERATOR_DONE}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):Ti.ITERATOR_DONE}next(){if(this.closed)return Ti.ITERATOR_DONE;let e,{_reader:t}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let i=e.header(),n=t.readMessageBody(e.bodyLength),a=this._loadRecordBatch(i,n);return{done:!1,value:a}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let i=e.header(),n=t.readMessageBody(e.bodyLength),a=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,a)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new $l._InternalEmptyPlaceholderRecordBatch(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},bs=class extends Kl{constructor(e,t){super(t);this._reader=new Ut.AsyncMessageReader(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}async cancel(){!this.closed&&(this.closed=!0)&&(await this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}async open(e){return this.closed||(this.autoDestroy=Lg(this,e),this.schema||(this.schema=await this._reader.readSchema())||await this.cancel()),this}async throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?await this.reset()._reader.throw(e):Ti.ITERATOR_DONE}async return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?await this.reset()._reader.return(e):Ti.ITERATOR_DONE}async next(){if(this.closed)return Ti.ITERATOR_DONE;let e,{_reader:t}=this;for(;e=await this._readNextMessageAndValidate();)if(e.isSchema())await this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let i=e.header(),n=await t.readMessageBody(e.bodyLength),a=this._loadRecordBatch(i,n);return{done:!1,value:a}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let i=e.header(),n=await t.readMessageBody(e.bodyLength),a=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,a)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new $l._InternalEmptyPlaceholderRecordBatch(this.schema)}):await this.return()}async _readNextMessageAndValidate(e){return await this._reader.readMessage(e)}},Ql=class extends _s{constructor(e,t){super(e instanceof ms.RandomAccessFile?e:new ms.RandomAccessFile(e),t)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(let t of this._footer.dictionaryBatches())t&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){if(this.closed)return null;this._footer||this.open();let t=this._footer&&this._footer.getRecordBatch(e);if(t&&this._handle.seek(t.offset)){let i=this._reader.readMessage(Ro.MessageHeader.RecordBatch);if(i&&i.isRecordBatch()){let n=i.header(),a=this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(n,a)}}return null}_readDictionaryBatch(e){let t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&this._handle.seek(t.offset)){let i=this._reader.readMessage(Ro.MessageHeader.DictionaryBatch);if(i&&i.isDictionaryBatch()){let n=i.header(),a=this._reader.readMessageBody(i.bodyLength),c=this._loadDictionaryBatch(n,a);this.dictionaries.set(n.id,c)}}}_readFooter(){let{_handle:e}=this,t=e.size-Ut.magicAndPadding,i=e.readInt32(t),n=e.readAt(t-i,i);return Ug.Footer.decode(n)}_readNextMessageAndValidate(e){if(this._footer||this.open(),this._footer&&this._recordBatchIndex<this.numRecordBatches){let t=this._footer&&this._footer.getRecordBatch(this._recordBatchIndex);if(t&&this._handle.seek(t.offset))return this._reader.readMessage(e)}return null}},Vg=class extends bs{constructor(e,...t){let i=typeof t[0]!="number"?t.shift():void 0,n=t[0]instanceof Map?t.shift():void 0;super(e instanceof ms.AsyncRandomAccessFile?e:new ms.AsyncRandomAccessFile(e,i),n)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isFile(){return!0}isAsync(){return!0}async open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=await this._readFooter()).schema;for(let t of this._footer.dictionaryBatches())t&&await this._readDictionaryBatch(this._dictionaryIndex++)}return await super.open(e)}async readRecordBatch(e){if(this.closed)return null;this._footer||await this.open();let t=this._footer&&this._footer.getRecordBatch(e);if(t&&await this._handle.seek(t.offset)){let i=await this._reader.readMessage(Ro.MessageHeader.RecordBatch);if(i&&i.isRecordBatch()){let n=i.header(),a=await this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(n,a)}}return null}async _readDictionaryBatch(e){let t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&await this._handle.seek(t.offset)){let i=await this._reader.readMessage(Ro.MessageHeader.DictionaryBatch);if(i&&i.isDictionaryBatch()){let n=i.header(),a=await this._reader.readMessageBody(i.bodyLength),c=this._loadDictionaryBatch(n,a);this.dictionaries.set(n.id,c)}}}async _readFooter(){let{_handle:e}=this;e._pending&&await e._pending;let t=e.size-Ut.magicAndPadding,i=await e.readInt32(t),n=await e.readAt(t-i,i);return Ug.Footer.decode(n)}async _readNextMessageAndValidate(e){if(this._footer||await this.open(),this._footer&&this._recordBatchIndex<this.numRecordBatches){let t=this._footer.getRecordBatch(this._recordBatchIndex);if(t&&await this._handle.seek(t.offset))return await this._reader.readMessage(e)}return null}},Ng=class extends _s{constructor(e,t){super(e,t)}_loadVectors(e,t,i){return new Pg.JSONVectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(i)}};function Lg(r,e){return e&&typeof e.autoDestroy=="boolean"?e.autoDestroy:r.autoDestroy}function*xg(r){let e=hr.from(r);try{if(!e.open({autoDestroy:!1}).closed)do yield e;while(!e.reset().open().closed)}finally{e.cancel()}}async function*qg(r){let e=await hr.from(r);try{if(!(await e.open({autoDestroy:!1})).closed)do yield e;while(!(await e.reset().open()).closed)}finally{await e.cancel()}}function gE(r){return new wn(new Ng(r))}function vE(r){let e=r.peek(Ut.magicLength+7&~7);return e&&e.byteLength>=4?Ut.checkForMagicArrowString(e)?new Eo(new Ql(r.read())):new wn(new _s(r)):new wn(new _s(function*(){}()))}async function wE(r){let e=await r.peek(Ut.magicLength+7&~7);return e&&e.byteLength>=4?Ut.checkForMagicArrowString(e)?new Eo(new Ql(await r.read())):new jn(new bs(r)):new jn(new bs(async function*(){}()))}async function jE(r){let{size:e}=await r.stat(),t=new ms.AsyncRandomAccessFile(r,e);return e>=Ut.magicX2AndPadding&&Ut.checkForMagicArrowString(await t.readAt(0,Ut.magicLength+7&~7))?new Jl(new Vg(t)):new jn(new bs(t))}});var Yg=U(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.toDOMStream=void 0;var Wg=Ne(),zg=ut();function TE(r,e){if(zg.isAsyncIterable(r))return IE(r,e);if(zg.isIterable(r))return BE(r,e);throw new Error("toDOMStream() must be called with an Iterable or AsyncIterable")}Co.toDOMStream=TE;function BE(r,e){let t=null,i=e&&e.type==="bytes"||!1,n=e&&e.highWaterMark||2**24;return new ReadableStream({...e,start(c){a(c,t||(t=r[Symbol.iterator]()))},pull(c){t?a(c,t):c.close()},cancel(){(t&&t.return&&t.return()||!0)&&(t=null)}},{highWaterMark:i?n:void 0,...e});function a(c,f){let j,s=null,m=c.desiredSize||null;for(;!(s=f.next(i?m:null)).done;)if(ArrayBuffer.isView(s.value)&&(j=Wg.toUint8Array(s.value))&&(m!=null&&i&&(m=m-j.byteLength+1),s.value=j),c.enqueue(s.value),m!=null&&--m<=0)return;c.close()}}function IE(r,e){let t=null,i=e&&e.type==="bytes"||!1,n=e&&e.highWaterMark||2**24;return new ReadableStream({...e,async start(c){await a(c,t||(t=r[Symbol.asyncIterator]()))},async pull(c){t?await a(c,t):c.close()},async cancel(){(t&&t.return&&await t.return()||!0)&&(t=null)}},{highWaterMark:i?n:void 0,...e});async function a(c,f){let j,s=null,m=c.desiredSize||null;for(;!(s=await f.next(i?m:null)).done;)if(ArrayBuffer.isView(s.value)&&(j=Wg.toUint8Array(s.value))&&(m!=null&&i&&(m=m-j.byteLength+1),s.value=j),c.enqueue(s.value),m!=null&&--m<=0)return;c.close()}}});var $g=U(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.BuilderTransform=Tn.builderThroughDOMStream=void 0;var SE=Ma();function OE(r){return new Zl(r)}Tn.builderThroughDOMStream=OE;var Zl=class{constructor(e){this._numChunks=0,this._finished=!1,this._bufferedSize=0;let{["readableStrategy"]:t,["writableStrategy"]:i,["queueingStrategy"]:n="count",...a}=e;this._controller=null,this._builder=SE.Builder.new(a),this._getSize=n!=="bytes"?Hg:Gg;let{["highWaterMark"]:c=n==="bytes"?2**14:1e3}={...t},{["highWaterMark"]:f=n==="bytes"?2**14:1e3}={...i};this.readable=new ReadableStream({cancel:()=>{this._builder.clear()},pull:j=>{this._maybeFlush(this._builder,this._controller=j)},start:j=>{this._maybeFlush(this._builder,this._controller=j)}},{highWaterMark:c,size:n!=="bytes"?Hg:Gg}),this.writable=new WritableStream({abort:()=>{this._builder.clear()},write:()=>{this._maybeFlush(this._builder,this._controller)},close:()=>{this._maybeFlush(this._builder.finish(),this._controller)}},{highWaterMark:f,size:j=>this._writeValueAndReturnChunkSize(j)})}_writeValueAndReturnChunkSize(e){let t=this._bufferedSize;return this._bufferedSize=this._getSize(this._builder.append(e)),this._bufferedSize-t}_maybeFlush(e,t){t!==null&&(this._bufferedSize>=t.desiredSize&&++this._numChunks&&this._enqueue(t,e.toVector()),e.finished&&((e.length>0||this._numChunks===0)&&++this._numChunks&&this._enqueue(t,e.toVector()),!this._finished&&(this._finished=!0)&&this._enqueue(t,null)))}_enqueue(e,t){this._bufferedSize=0,this._controller=null,t===null?e.close():e.enqueue(t)}};Tn.BuilderTransform=Zl;var Hg=r=>r.length,Gg=r=>r.byteLength});var Jg=U(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});Uo.recordBatchReaderThroughDOMStream=void 0;var AE=zr(),DE=ys();function FE(r,e){let t=new AE.AsyncByteQueue,i=null,n=new ReadableStream({async cancel(){await t.close()},async start(f){await c(f,i||(i=await a()))},async pull(f){i?await c(f,i):f.close()}});return{writable:new WritableStream(t,{highWaterMark:2**14,...r}),readable:n};async function a(){return await(await DE.RecordBatchReader.from(t)).open(e)}async function c(f,j){let s=f.desiredSize,m=null;for(;!(m=await j.next()).done;)if(f.enqueue(m.value),s!=null&&--s<=0)return;f.close()}}Uo.recordBatchReaderThroughDOMStream=FE});var Kg=U(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.recordBatchWriterThroughDOMStream=void 0;var RE=zr();function EE(r,e){let t=new this(r),i=new RE.AsyncByteStream(t),n=new ReadableStream({type:"bytes",async cancel(){await i.cancel()},async pull(c){await a(c)},async start(c){await a(c)}},{highWaterMark:2**14,...e});return{writable:new WritableStream(t,r),readable:n};async function a(c){let f=null,j=c.desiredSize;for(;f=await i.read(j||null);)if(c.enqueue(f),j!=null&&(j-=f.byteLength)<=0)return;c.close()}}ko.recordBatchWriterThroughDOMStream=EE});var nd=U(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.custom=fe.or=fe.and=fe.col=fe.lit=fe.CustomPredicate=fe.Not=fe.GTeq=fe.LTeq=fe.Equals=fe.Or=fe.And=fe.CombinationPredicate=fe.ComparisonPredicate=fe.Predicate=fe.Col=fe.Literal=fe.Value=void 0;var CE=ho(),ii=class{eq(e){return e instanceof ii||(e=new Sr(e)),new ed(this,e)}le(e){return e instanceof ii||(e=new Sr(e)),new td(this,e)}ge(e){return e instanceof ii||(e=new Sr(e)),new rd(this,e)}lt(e){return new On(this.ge(e))}gt(e){return new On(this.le(e))}ne(e){return new On(this.eq(e))}};fe.Value=ii;var Sr=class extends ii{constructor(e){super();this.v=e}};fe.Literal=Sr;var Xl=class extends ii{constructor(e){super();this.name=e}bind(e){if(!this.colidx){this.colidx=-1;let i=e.schema.fields;for(let n=-1;++n<i.length;)if(i[n].name===this.name){this.colidx=n;break}if(this.colidx<0)throw new Error(`Failed to bind Col "${this.name}"`)}let t=this.vector=e.getChildAt(this.colidx);return i=>t.get(i)}};fe.Col=Xl;var Bn=class{and(...e){return new In(this,...e)}or(...e){return new Sn(this,...e)}not(){return new On(this)}};fe.Predicate=Bn;var gs=class extends Bn{constructor(e,t){super();this.left=e,this.right=t}bind(e){return this.left instanceof Sr?this.right instanceof Sr?this._bindLitLit(e,this.left,this.right):this._bindLitCol(e,this.left,this.right):this.right instanceof Sr?this._bindColLit(e,this.left,this.right):this._bindColCol(e,this.left,this.right)}};fe.ComparisonPredicate=gs;var vs=class extends Bn{constructor(...e){super();this.children=e}};fe.CombinationPredicate=vs;vs.prototype.children=Object.freeze([]);var In=class extends vs{constructor(...e){e=e.reduce((t,i)=>t.concat(i instanceof In?i.children:i),[]);super(...e)}bind(e){let t=this.children.map(i=>i.bind(e));return(i,n)=>t.every(a=>a(i,n))}};fe.And=In;var Sn=class extends vs{constructor(...e){e=e.reduce((t,i)=>t.concat(i instanceof Sn?i.children:i),[]);super(...e)}bind(e){let t=this.children.map(i=>i.bind(e));return(i,n)=>t.some(a=>a(i,n))}};fe.Or=Sn;var ed=class extends gs{_bindLitLit(e,t,i){let n=t.v==i.v;return()=>n}_bindColCol(e,t,i){let n=t.bind(e),a=i.bind(e);return(c,f)=>n(c,f)==a(c,f)}_bindColLit(e,t,i){let n=t.bind(e);if(t.vector instanceof CE.DictionaryVector){let a,c=t.vector;return c.dictionary!==this.lastDictionary?(a=c.reverseLookup(i.v),this.lastDictionary=c.dictionary,this.lastKey=a):a=this.lastKey,a===-1?()=>!1:f=>c.getKey(f)===a}else return(a,c)=>n(a,c)==i.v}_bindLitCol(e,t,i){return this._bindColLit(e,i,t)}};fe.Equals=ed;var td=class extends gs{_bindLitLit(e,t,i){let n=t.v<=i.v;return()=>n}_bindColCol(e,t,i){let n=t.bind(e),a=i.bind(e);return(c,f)=>n(c,f)<=a(c,f)}_bindColLit(e,t,i){let n=t.bind(e);return(a,c)=>n(a,c)<=i.v}_bindLitCol(e,t,i){let n=i.bind(e);return(a,c)=>t.v<=n(a,c)}};fe.LTeq=td;var rd=class extends gs{_bindLitLit(e,t,i){let n=t.v>=i.v;return()=>n}_bindColCol(e,t,i){let n=t.bind(e),a=i.bind(e);return(c,f)=>n(c,f)>=a(c,f)}_bindColLit(e,t,i){let n=t.bind(e);return(a,c)=>n(a,c)>=i.v}_bindLitCol(e,t,i){let n=i.bind(e);return(a,c)=>t.v>=n(a,c)}};fe.GTeq=rd;var On=class extends Bn{constructor(e){super();this.child=e}bind(e){let t=this.child.bind(e);return(i,n)=>!t(i,n)}};fe.Not=On;var id=class extends Bn{constructor(e,t){super();this.next=e,this.bind_=t}bind(e){return this.bind_(e),this.next}};fe.CustomPredicate=id;function UE(r){return new Sr(r)}fe.lit=UE;function kE(r){return new Xl(r)}fe.col=kE;function ME(...r){return new In(...r)}fe.and=ME;function PE(...r){return new Sn(...r)}fe.or=PE;function VE(r,e){return new id(r,e)}fe.custom=VE});var ev=U(ni=>{"use strict";Object.defineProperty(ni,"__esModule",{value:!0});ni.FilteredDataFrame=ni.CountByResult=ni.DataFrame=void 0;var An=as(),Qg=_o(),sd=Qe(),Zg=nd(),NE=Tr(),Xg=ve();An.Table.prototype.countBy=function(r){return new Bi(this.chunks).countBy(r)};An.Table.prototype.scan=function(r,e){return new Bi(this.chunks).scan(r,e)};An.Table.prototype.scanReverse=function(r,e){return new Bi(this.chunks).scanReverse(r,e)};An.Table.prototype.filter=function(r){return new Bi(this.chunks).filter(r)};var Bi=class extends An.Table{filter(e){return new ws(this.chunks,e)}scan(e,t){let i=this.chunks,n=i.length;for(let a=-1;++a<n;){let c=i[a];t&&t(c);for(let f=-1,j=c.length;++f<j;)e(f,c)}}scanReverse(e,t){let i=this.chunks,n=i.length;for(let a=n;--a>=0;){let c=i[a];t&&t(c);for(let f=c.length;--f>=0;)e(f,c)}}countBy(e){let t=this.chunks,i=t.length,n=typeof e=="string"?new Zg.Col(e):e;n.bind(t[i-1]);let a=n.vector;if(!Xg.DataType.isDictionary(a.type))throw new Error("countBy currently only supports dictionary-encoded columns");let c=Math.ceil(Math.log(a.length)/Math.log(256)),f=c==4?Uint32Array:c>=2?Uint16Array:Uint8Array,j=new f(a.dictionary.length);for(let s=-1;++s<i;){let m=t[s];n.bind(m);let R=n.vector.indices;for(let $=-1,ue=m.length;++$<ue;){let pt=R.get($);pt!==null&&j[pt]++}}return new Mo(a.dictionary,Qg.IntVector.from(j))}};ni.DataFrame=Bi;var Mo=class extends An.Table{constructor(e,t){let i=new sd.Schema([new sd.Field("values",e.type),new sd.Field("counts",t.type)]);super(new NE.RecordBatch(i,t.length,[e,t]))}toJSON(){let e=this.getColumnAt(0),t=this.getColumnAt(1),i={};for(let n=-1;++n<this.length;)i[e.get(n)]=t.get(n);return i}};ni.CountByResult=Mo;var ws=class extends Bi{constructor(e,t){super(e);this._predicate=t}scan(e,t){let i=this._chunks,n=i.length;for(let a=-1;++a<n;){let c=i[a],f=this._predicate.bind(c),j=!1;for(let s=-1,m=c.length;++s<m;)f(s,c)&&(t&&!j&&(t(c),j=!0),e(s,c))}}scanReverse(e,t){let i=this._chunks,n=i.length;for(let a=n;--a>=0;){let c=i[a],f=this._predicate.bind(c),j=!1;for(let s=c.length;--s>=0;)f(s,c)&&(t&&!j&&(t(c),j=!0),e(s,c))}}count(){let e=0,t=this._chunks,i=t.length;for(let n=-1;++n<i;){let a=t[n],c=this._predicate.bind(a);for(let f=-1,j=a.length;++f<j;)c(f,a)&&++e}return e}*[Symbol.iterator](){let e=this._chunks,t=e.length;for(let i=-1;++i<t;){let n=e[i],a=this._predicate.bind(n);for(let c=-1,f=n.length;++c<f;)a(c,n)&&(yield n.get(c))}}filter(e){return new ws(this._chunks,this._predicate.and(e))}countBy(e){let t=this._chunks,i=t.length,n=typeof e=="string"?new Zg.Col(e):e;n.bind(t[i-1]);let a=n.vector;if(!Xg.DataType.isDictionary(a.type))throw new Error("countBy currently only supports dictionary-encoded columns");let c=Math.ceil(Math.log(a.length)/Math.log(256)),f=c==4?Uint32Array:c>=2?Uint16Array:Uint8Array,j=new f(a.dictionary.length);for(let s=-1;++s<i;){let m=t[s],R=this._predicate.bind(m);n.bind(m);let $=n.vector.indices;for(let ue=-1,pt=m.length;++ue<pt;){let Ht=$.get(ue);Ht!==null&&R(ue,m)&&j[Ht]++}}return new Mo(a.dictionary,Qg.IntVector.from(j))}};ni.FilteredDataFrame=ws});var rv=U(v=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0});v.util=v.predicate=v.CountByResult=v.FilteredDataFrame=v.DataFrame=v.RecordBatch=v.Message=v.JSONMessageReader=v.AsyncMessageReader=v.MessageReader=v.RecordBatchJSONWriter=v.RecordBatchStreamWriter=v.RecordBatchFileWriter=v.RecordBatchWriter=v.AsyncRecordBatchStreamReader=v.AsyncRecordBatchFileReader=v.RecordBatchStreamReader=v.RecordBatchFileReader=v.RecordBatchReader=v.AsyncByteQueue=v.AsyncByteStream=v.ByteStream=v.Utf8Builder=v.SparseUnionBuilder=v.DenseUnionBuilder=v.UnionBuilder=v.TimeNanosecondBuilder=v.TimeMicrosecondBuilder=v.TimeMillisecondBuilder=v.TimeSecondBuilder=v.TimeBuilder=v.TimestampNanosecondBuilder=v.TimestampMicrosecondBuilder=v.TimestampMillisecondBuilder=v.TimestampSecondBuilder=v.TimestampBuilder=v.StructBuilder=v.NullBuilder=v.MapBuilder=v.ListBuilder=v.Uint64Builder=v.Uint32Builder=v.Uint16Builder=v.Uint8Builder=v.Int64Builder=v.Int32Builder=v.Int16Builder=v.Int8Builder=v.IntBuilder=v.IntervalYearMonthBuilder=v.IntervalDayTimeBuilder=v.IntervalBuilder=v.Float64Builder=v.Float32Builder=v.Float16Builder=v.FloatBuilder=v.FixedSizeListBuilder=v.FixedSizeBinaryBuilder=v.DictionaryBuilder=v.DecimalBuilder=v.DateMillisecondBuilder=v.DateDayBuilder=v.DateBuilder=v.BoolBuilder=v.BinaryBuilder=v.Builder=v.Utf8Vector=v.SparseUnionVector=v.DenseUnionVector=v.UnionVector=v.TimeNanosecondVector=v.TimeMicrosecondVector=v.TimeMillisecondVector=v.TimeSecondVector=v.TimeVector=v.TimestampNanosecondVector=v.TimestampMicrosecondVector=v.TimestampMillisecondVector=v.TimestampSecondVector=v.TimestampVector=v.StructVector=v.NullVector=v.MapVector=v.ListVector=v.Uint64Vector=v.Uint32Vector=v.Uint16Vector=v.Uint8Vector=v.Int64Vector=v.Int32Vector=v.Int16Vector=v.Int8Vector=v.IntVector=v.IntervalYearMonthVector=v.IntervalDayTimeVector=v.IntervalVector=v.Float64Vector=v.Float32Vector=v.Float16Vector=v.FloatVector=v.FixedSizeListVector=v.FixedSizeBinaryVector=v.DictionaryVector=v.DecimalVector=v.DateMillisecondVector=v.DateDayVector=v.DateVector=v.Chunked=v.BoolVector=v.BinaryVector=v.BaseVector=v.Vector=v.Field=v.Schema=v.Visitor=v.Column=v.Table=v.Map_=v.FixedSizeList=v.IntervalYearMonth=v.IntervalDayTime=v.Interval=v.Dictionary=v.SparseUnion=v.DenseUnion=v.Union=v.Struct=v.List=v.Decimal=v.TimeNanosecond=v.TimeMicrosecond=v.TimeMillisecond=v.TimeSecond=v.Time=v.TimestampNanosecond=v.TimestampMicrosecond=v.TimestampMillisecond=v.TimestampSecond=v.Timestamp=v.DateMillisecond=v.DateDay=v.Date_=v.FixedSizeBinary=v.Binary=v.Utf8=v.Float64=v.Float32=v.Float16=v.Float=v.Uint64=v.Uint32=v.Uint16=v.Uint8=v.Int64=v.Int32=v.Int16=v.Int8=v.Int=v.Bool=v.Null=v.DataType=v.Data=v.BufferType=v.UnionMode=v.Type=v.TimeUnit=v.Precision=v.MetadataVersion=v.MessageHeader=v.IntervalUnit=v.DateUnit=v.ArrowType=void 0;var pr=Ie();Object.defineProperty(v,"ArrowType",{enumerable:!0,get:function(){return pr.ArrowType}});Object.defineProperty(v,"DateUnit",{enumerable:!0,get:function(){return pr.DateUnit}});Object.defineProperty(v,"IntervalUnit",{enumerable:!0,get:function(){return pr.IntervalUnit}});Object.defineProperty(v,"MessageHeader",{enumerable:!0,get:function(){return pr.MessageHeader}});Object.defineProperty(v,"MetadataVersion",{enumerable:!0,get:function(){return pr.MetadataVersion}});Object.defineProperty(v,"Precision",{enumerable:!0,get:function(){return pr.Precision}});Object.defineProperty(v,"TimeUnit",{enumerable:!0,get:function(){return pr.TimeUnit}});Object.defineProperty(v,"Type",{enumerable:!0,get:function(){return pr.Type}});Object.defineProperty(v,"UnionMode",{enumerable:!0,get:function(){return pr.UnionMode}});Object.defineProperty(v,"BufferType",{enumerable:!0,get:function(){return pr.BufferType}});var LE=Nt();Object.defineProperty(v,"Data",{enumerable:!0,get:function(){return LE.Data}});var ne=ve();Object.defineProperty(v,"DataType",{enumerable:!0,get:function(){return ne.DataType}});Object.defineProperty(v,"Null",{enumerable:!0,get:function(){return ne.Null}});Object.defineProperty(v,"Bool",{enumerable:!0,get:function(){return ne.Bool}});Object.defineProperty(v,"Int",{enumerable:!0,get:function(){return ne.Int}});Object.defineProperty(v,"Int8",{enumerable:!0,get:function(){return ne.Int8}});Object.defineProperty(v,"Int16",{enumerable:!0,get:function(){return ne.Int16}});Object.defineProperty(v,"Int32",{enumerable:!0,get:function(){return ne.Int32}});Object.defineProperty(v,"Int64",{enumerable:!0,get:function(){return ne.Int64}});Object.defineProperty(v,"Uint8",{enumerable:!0,get:function(){return ne.Uint8}});Object.defineProperty(v,"Uint16",{enumerable:!0,get:function(){return ne.Uint16}});Object.defineProperty(v,"Uint32",{enumerable:!0,get:function(){return ne.Uint32}});Object.defineProperty(v,"Uint64",{enumerable:!0,get:function(){return ne.Uint64}});Object.defineProperty(v,"Float",{enumerable:!0,get:function(){return ne.Float}});Object.defineProperty(v,"Float16",{enumerable:!0,get:function(){return ne.Float16}});Object.defineProperty(v,"Float32",{enumerable:!0,get:function(){return ne.Float32}});Object.defineProperty(v,"Float64",{enumerable:!0,get:function(){return ne.Float64}});Object.defineProperty(v,"Utf8",{enumerable:!0,get:function(){return ne.Utf8}});Object.defineProperty(v,"Binary",{enumerable:!0,get:function(){return ne.Binary}});Object.defineProperty(v,"FixedSizeBinary",{enumerable:!0,get:function(){return ne.FixedSizeBinary}});Object.defineProperty(v,"Date_",{enumerable:!0,get:function(){return ne.Date_}});Object.defineProperty(v,"DateDay",{enumerable:!0,get:function(){return ne.DateDay}});Object.defineProperty(v,"DateMillisecond",{enumerable:!0,get:function(){return ne.DateMillisecond}});Object.defineProperty(v,"Timestamp",{enumerable:!0,get:function(){return ne.Timestamp}});Object.defineProperty(v,"TimestampSecond",{enumerable:!0,get:function(){return ne.TimestampSecond}});Object.defineProperty(v,"TimestampMillisecond",{enumerable:!0,get:function(){return ne.TimestampMillisecond}});Object.defineProperty(v,"TimestampMicrosecond",{enumerable:!0,get:function(){return ne.TimestampMicrosecond}});Object.defineProperty(v,"TimestampNanosecond",{enumerable:!0,get:function(){return ne.TimestampNanosecond}});Object.defineProperty(v,"Time",{enumerable:!0,get:function(){return ne.Time}});Object.defineProperty(v,"TimeSecond",{enumerable:!0,get:function(){return ne.TimeSecond}});Object.defineProperty(v,"TimeMillisecond",{enumerable:!0,get:function(){return ne.TimeMillisecond}});Object.defineProperty(v,"TimeMicrosecond",{enumerable:!0,get:function(){return ne.TimeMicrosecond}});Object.defineProperty(v,"TimeNanosecond",{enumerable:!0,get:function(){return ne.TimeNanosecond}});Object.defineProperty(v,"Decimal",{enumerable:!0,get:function(){return ne.Decimal}});Object.defineProperty(v,"List",{enumerable:!0,get:function(){return ne.List}});Object.defineProperty(v,"Struct",{enumerable:!0,get:function(){return ne.Struct}});Object.defineProperty(v,"Union",{enumerable:!0,get:function(){return ne.Union}});Object.defineProperty(v,"DenseUnion",{enumerable:!0,get:function(){return ne.DenseUnion}});Object.defineProperty(v,"SparseUnion",{enumerable:!0,get:function(){return ne.SparseUnion}});Object.defineProperty(v,"Dictionary",{enumerable:!0,get:function(){return ne.Dictionary}});Object.defineProperty(v,"Interval",{enumerable:!0,get:function(){return ne.Interval}});Object.defineProperty(v,"IntervalDayTime",{enumerable:!0,get:function(){return ne.IntervalDayTime}});Object.defineProperty(v,"IntervalYearMonth",{enumerable:!0,get:function(){return ne.IntervalYearMonth}});Object.defineProperty(v,"FixedSizeList",{enumerable:!0,get:function(){return ne.FixedSizeList}});Object.defineProperty(v,"Map_",{enumerable:!0,get:function(){return ne.Map_}});var xE=as();Object.defineProperty(v,"Table",{enumerable:!0,get:function(){return xE.Table}});var qE=$i();Object.defineProperty(v,"Column",{enumerable:!0,get:function(){return qE.Column}});var WE=it();Object.defineProperty(v,"Visitor",{enumerable:!0,get:function(){return WE.Visitor}});var tv=Qe();Object.defineProperty(v,"Schema",{enumerable:!0,get:function(){return tv.Schema}});Object.defineProperty(v,"Field",{enumerable:!0,get:function(){return tv.Field}});var ee=cr();Object.defineProperty(v,"Vector",{enumerable:!0,get:function(){return ee.Vector}});Object.defineProperty(v,"BaseVector",{enumerable:!0,get:function(){return ee.BaseVector}});Object.defineProperty(v,"BinaryVector",{enumerable:!0,get:function(){return ee.BinaryVector}});Object.defineProperty(v,"BoolVector",{enumerable:!0,get:function(){return ee.BoolVector}});Object.defineProperty(v,"Chunked",{enumerable:!0,get:function(){return ee.Chunked}});Object.defineProperty(v,"DateVector",{enumerable:!0,get:function(){return ee.DateVector}});Object.defineProperty(v,"DateDayVector",{enumerable:!0,get:function(){return ee.DateDayVector}});Object.defineProperty(v,"DateMillisecondVector",{enumerable:!0,get:function(){return ee.DateMillisecondVector}});Object.defineProperty(v,"DecimalVector",{enumerable:!0,get:function(){return ee.DecimalVector}});Object.defineProperty(v,"DictionaryVector",{enumerable:!0,get:function(){return ee.DictionaryVector}});Object.defineProperty(v,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return ee.FixedSizeBinaryVector}});Object.defineProperty(v,"FixedSizeListVector",{enumerable:!0,get:function(){return ee.FixedSizeListVector}});Object.defineProperty(v,"FloatVector",{enumerable:!0,get:function(){return ee.FloatVector}});Object.defineProperty(v,"Float16Vector",{enumerable:!0,get:function(){return ee.Float16Vector}});Object.defineProperty(v,"Float32Vector",{enumerable:!0,get:function(){return ee.Float32Vector}});Object.defineProperty(v,"Float64Vector",{enumerable:!0,get:function(){return ee.Float64Vector}});Object.defineProperty(v,"IntervalVector",{enumerable:!0,get:function(){return ee.IntervalVector}});Object.defineProperty(v,"IntervalDayTimeVector",{enumerable:!0,get:function(){return ee.IntervalDayTimeVector}});Object.defineProperty(v,"IntervalYearMonthVector",{enumerable:!0,get:function(){return ee.IntervalYearMonthVector}});Object.defineProperty(v,"IntVector",{enumerable:!0,get:function(){return ee.IntVector}});Object.defineProperty(v,"Int8Vector",{enumerable:!0,get:function(){return ee.Int8Vector}});Object.defineProperty(v,"Int16Vector",{enumerable:!0,get:function(){return ee.Int16Vector}});Object.defineProperty(v,"Int32Vector",{enumerable:!0,get:function(){return ee.Int32Vector}});Object.defineProperty(v,"Int64Vector",{enumerable:!0,get:function(){return ee.Int64Vector}});Object.defineProperty(v,"Uint8Vector",{enumerable:!0,get:function(){return ee.Uint8Vector}});Object.defineProperty(v,"Uint16Vector",{enumerable:!0,get:function(){return ee.Uint16Vector}});Object.defineProperty(v,"Uint32Vector",{enumerable:!0,get:function(){return ee.Uint32Vector}});Object.defineProperty(v,"Uint64Vector",{enumerable:!0,get:function(){return ee.Uint64Vector}});Object.defineProperty(v,"ListVector",{enumerable:!0,get:function(){return ee.ListVector}});Object.defineProperty(v,"MapVector",{enumerable:!0,get:function(){return ee.MapVector}});Object.defineProperty(v,"NullVector",{enumerable:!0,get:function(){return ee.NullVector}});Object.defineProperty(v,"StructVector",{enumerable:!0,get:function(){return ee.StructVector}});Object.defineProperty(v,"TimestampVector",{enumerable:!0,get:function(){return ee.TimestampVector}});Object.defineProperty(v,"TimestampSecondVector",{enumerable:!0,get:function(){return ee.TimestampSecondVector}});Object.defineProperty(v,"TimestampMillisecondVector",{enumerable:!0,get:function(){return ee.TimestampMillisecondVector}});Object.defineProperty(v,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return ee.TimestampMicrosecondVector}});Object.defineProperty(v,"TimestampNanosecondVector",{enumerable:!0,get:function(){return ee.TimestampNanosecondVector}});Object.defineProperty(v,"TimeVector",{enumerable:!0,get:function(){return ee.TimeVector}});Object.defineProperty(v,"TimeSecondVector",{enumerable:!0,get:function(){return ee.TimeSecondVector}});Object.defineProperty(v,"TimeMillisecondVector",{enumerable:!0,get:function(){return ee.TimeMillisecondVector}});Object.defineProperty(v,"TimeMicrosecondVector",{enumerable:!0,get:function(){return ee.TimeMicrosecondVector}});Object.defineProperty(v,"TimeNanosecondVector",{enumerable:!0,get:function(){return ee.TimeNanosecondVector}});Object.defineProperty(v,"UnionVector",{enumerable:!0,get:function(){return ee.UnionVector}});Object.defineProperty(v,"DenseUnionVector",{enumerable:!0,get:function(){return ee.DenseUnionVector}});Object.defineProperty(v,"SparseUnionVector",{enumerable:!0,get:function(){return ee.SparseUnionVector}});Object.defineProperty(v,"Utf8Vector",{enumerable:!0,get:function(){return ee.Utf8Vector}});var se=Ma();Object.defineProperty(v,"Builder",{enumerable:!0,get:function(){return se.Builder}});Object.defineProperty(v,"BinaryBuilder",{enumerable:!0,get:function(){return se.BinaryBuilder}});Object.defineProperty(v,"BoolBuilder",{enumerable:!0,get:function(){return se.BoolBuilder}});Object.defineProperty(v,"DateBuilder",{enumerable:!0,get:function(){return se.DateBuilder}});Object.defineProperty(v,"DateDayBuilder",{enumerable:!0,get:function(){return se.DateDayBuilder}});Object.defineProperty(v,"DateMillisecondBuilder",{enumerable:!0,get:function(){return se.DateMillisecondBuilder}});Object.defineProperty(v,"DecimalBuilder",{enumerable:!0,get:function(){return se.DecimalBuilder}});Object.defineProperty(v,"DictionaryBuilder",{enumerable:!0,get:function(){return se.DictionaryBuilder}});Object.defineProperty(v,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return se.FixedSizeBinaryBuilder}});Object.defineProperty(v,"FixedSizeListBuilder",{enumerable:!0,get:function(){return se.FixedSizeListBuilder}});Object.defineProperty(v,"FloatBuilder",{enumerable:!0,get:function(){return se.FloatBuilder}});Object.defineProperty(v,"Float16Builder",{enumerable:!0,get:function(){return se.Float16Builder}});Object.defineProperty(v,"Float32Builder",{enumerable:!0,get:function(){return se.Float32Builder}});Object.defineProperty(v,"Float64Builder",{enumerable:!0,get:function(){return se.Float64Builder}});Object.defineProperty(v,"IntervalBuilder",{enumerable:!0,get:function(){return se.IntervalBuilder}});Object.defineProperty(v,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return se.IntervalDayTimeBuilder}});Object.defineProperty(v,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return se.IntervalYearMonthBuilder}});Object.defineProperty(v,"IntBuilder",{enumerable:!0,get:function(){return se.IntBuilder}});Object.defineProperty(v,"Int8Builder",{enumerable:!0,get:function(){return se.Int8Builder}});Object.defineProperty(v,"Int16Builder",{enumerable:!0,get:function(){return se.Int16Builder}});Object.defineProperty(v,"Int32Builder",{enumerable:!0,get:function(){return se.Int32Builder}});Object.defineProperty(v,"Int64Builder",{enumerable:!0,get:function(){return se.Int64Builder}});Object.defineProperty(v,"Uint8Builder",{enumerable:!0,get:function(){return se.Uint8Builder}});Object.defineProperty(v,"Uint16Builder",{enumerable:!0,get:function(){return se.Uint16Builder}});Object.defineProperty(v,"Uint32Builder",{enumerable:!0,get:function(){return se.Uint32Builder}});Object.defineProperty(v,"Uint64Builder",{enumerable:!0,get:function(){return se.Uint64Builder}});Object.defineProperty(v,"ListBuilder",{enumerable:!0,get:function(){return se.ListBuilder}});Object.defineProperty(v,"MapBuilder",{enumerable:!0,get:function(){return se.MapBuilder}});Object.defineProperty(v,"NullBuilder",{enumerable:!0,get:function(){return se.NullBuilder}});Object.defineProperty(v,"StructBuilder",{enumerable:!0,get:function(){return se.StructBuilder}});Object.defineProperty(v,"TimestampBuilder",{enumerable:!0,get:function(){return se.TimestampBuilder}});Object.defineProperty(v,"TimestampSecondBuilder",{enumerable:!0,get:function(){return se.TimestampSecondBuilder}});Object.defineProperty(v,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return se.TimestampMillisecondBuilder}});Object.defineProperty(v,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return se.TimestampMicrosecondBuilder}});Object.defineProperty(v,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return se.TimestampNanosecondBuilder}});Object.defineProperty(v,"TimeBuilder",{enumerable:!0,get:function(){return se.TimeBuilder}});Object.defineProperty(v,"TimeSecondBuilder",{enumerable:!0,get:function(){return se.TimeSecondBuilder}});Object.defineProperty(v,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return se.TimeMillisecondBuilder}});Object.defineProperty(v,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return se.TimeMicrosecondBuilder}});Object.defineProperty(v,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return se.TimeNanosecondBuilder}});Object.defineProperty(v,"UnionBuilder",{enumerable:!0,get:function(){return se.UnionBuilder}});Object.defineProperty(v,"DenseUnionBuilder",{enumerable:!0,get:function(){return se.DenseUnionBuilder}});Object.defineProperty(v,"SparseUnionBuilder",{enumerable:!0,get:function(){return se.SparseUnionBuilder}});Object.defineProperty(v,"Utf8Builder",{enumerable:!0,get:function(){return se.Utf8Builder}});var ad=zr();Object.defineProperty(v,"ByteStream",{enumerable:!0,get:function(){return ad.ByteStream}});Object.defineProperty(v,"AsyncByteStream",{enumerable:!0,get:function(){return ad.AsyncByteStream}});Object.defineProperty(v,"AsyncByteQueue",{enumerable:!0,get:function(){return ad.AsyncByteQueue}});var js=ys();Object.defineProperty(v,"RecordBatchReader",{enumerable:!0,get:function(){return js.RecordBatchReader}});Object.defineProperty(v,"RecordBatchFileReader",{enumerable:!0,get:function(){return js.RecordBatchFileReader}});Object.defineProperty(v,"RecordBatchStreamReader",{enumerable:!0,get:function(){return js.RecordBatchStreamReader}});Object.defineProperty(v,"AsyncRecordBatchFileReader",{enumerable:!0,get:function(){return js.AsyncRecordBatchFileReader}});Object.defineProperty(v,"AsyncRecordBatchStreamReader",{enumerable:!0,get:function(){return js.AsyncRecordBatchStreamReader}});var Po=so();Object.defineProperty(v,"RecordBatchWriter",{enumerable:!0,get:function(){return Po.RecordBatchWriter}});Object.defineProperty(v,"RecordBatchFileWriter",{enumerable:!0,get:function(){return Po.RecordBatchFileWriter}});Object.defineProperty(v,"RecordBatchStreamWriter",{enumerable:!0,get:function(){return Po.RecordBatchStreamWriter}});Object.defineProperty(v,"RecordBatchJSONWriter",{enumerable:!0,get:function(){return Po.RecordBatchJSONWriter}});var od=Ja();Object.defineProperty(v,"MessageReader",{enumerable:!0,get:function(){return od.MessageReader}});Object.defineProperty(v,"AsyncMessageReader",{enumerable:!0,get:function(){return od.AsyncMessageReader}});Object.defineProperty(v,"JSONMessageReader",{enumerable:!0,get:function(){return od.JSONMessageReader}});var zE=_i();Object.defineProperty(v,"Message",{enumerable:!0,get:function(){return zE.Message}});var YE=Tr();Object.defineProperty(v,"RecordBatch",{enumerable:!0,get:function(){return YE.RecordBatch}});var ud=ev();Object.defineProperty(v,"DataFrame",{enumerable:!0,get:function(){return ud.DataFrame}});Object.defineProperty(v,"FilteredDataFrame",{enumerable:!0,get:function(){return ud.FilteredDataFrame}});Object.defineProperty(v,"CountByResult",{enumerable:!0,get:function(){return ud.CountByResult}});var HE=Yn(),GE=wc(),$E=Kt(),JE=xn(),KE=Ne(),QE=$n(),ZE=nd();v.predicate=ZE;v.util={...HE,...GE,...$E,...JE,...KE,...QE}});var Ts=U(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});w.Utf8Builder=w.SparseUnionBuilder=w.DenseUnionBuilder=w.UnionBuilder=w.TimeNanosecondBuilder=w.TimeMicrosecondBuilder=w.TimeMillisecondBuilder=w.TimeSecondBuilder=w.TimeBuilder=w.TimestampNanosecondBuilder=w.TimestampMicrosecondBuilder=w.TimestampMillisecondBuilder=w.TimestampSecondBuilder=w.TimestampBuilder=w.StructBuilder=w.NullBuilder=w.MapBuilder=w.ListBuilder=w.Uint64Builder=w.Uint32Builder=w.Uint16Builder=w.Uint8Builder=w.Int64Builder=w.Int32Builder=w.Int16Builder=w.Int8Builder=w.IntBuilder=w.IntervalYearMonthBuilder=w.IntervalDayTimeBuilder=w.IntervalBuilder=w.Float64Builder=w.Float32Builder=w.Float16Builder=w.FloatBuilder=w.FixedSizeListBuilder=w.FixedSizeBinaryBuilder=w.DictionaryBuilder=w.DecimalBuilder=w.DateMillisecondBuilder=w.DateDayBuilder=w.DateBuilder=w.BoolBuilder=w.BinaryBuilder=w.Builder=w.util=w.predicate=w.CountByResult=w.FilteredDataFrame=w.DataFrame=w.RecordBatch=w.Message=w.JSONMessageReader=w.AsyncMessageReader=w.MessageReader=w.RecordBatchJSONWriter=w.RecordBatchStreamWriter=w.RecordBatchFileWriter=w.RecordBatchWriter=w.AsyncRecordBatchStreamReader=w.AsyncRecordBatchFileReader=w.RecordBatchStreamReader=w.RecordBatchFileReader=w.RecordBatchReader=w.AsyncByteQueue=w.AsyncByteStream=w.ByteStream=w.Utf8Vector=w.SparseUnionVector=w.DenseUnionVector=w.UnionVector=w.TimeNanosecondVector=w.TimeMicrosecondVector=w.TimeMillisecondVector=w.TimeSecondVector=w.TimeVector=w.TimestampNanosecondVector=w.TimestampMicrosecondVector=w.TimestampMillisecondVector=w.TimestampSecondVector=w.TimestampVector=w.StructVector=w.NullVector=w.MapVector=w.ListVector=w.Uint64Vector=w.Uint32Vector=w.Uint16Vector=w.Uint8Vector=w.Int64Vector=w.Int32Vector=w.Int16Vector=w.Int8Vector=w.IntVector=w.IntervalYearMonthVector=w.IntervalDayTimeVector=w.IntervalVector=w.Float64Vector=w.Float32Vector=w.Float16Vector=w.FloatVector=w.FixedSizeListVector=w.FixedSizeBinaryVector=w.DictionaryVector=w.DecimalVector=w.DateMillisecondVector=w.DateDayVector=w.DateVector=w.Chunked=w.BoolVector=w.BinaryVector=w.BaseVector=w.Vector=w.Visitor=w.Field=w.Schema=w.Column=w.Table=w.Map_=w.FixedSizeList=w.IntervalYearMonth=w.IntervalDayTime=w.Interval=w.Dictionary=w.SparseUnion=w.DenseUnion=w.Union=w.Struct=w.List=w.Decimal=w.TimeNanosecond=w.TimeMicrosecond=w.TimeMillisecond=w.TimeSecond=w.Time=w.TimestampNanosecond=w.TimestampMicrosecond=w.TimestampMillisecond=w.TimestampSecond=w.Timestamp=w.DateMillisecond=w.DateDay=w.Date_=w.FixedSizeBinary=w.Binary=w.Utf8=w.Float64=w.Float32=w.Float16=w.Float=w.Uint64=w.Uint32=w.Uint16=w.Uint8=w.Int64=w.Int32=w.Int16=w.Int8=w.Int=w.Bool=w.Null=w.DataType=w.Data=w.BufferType=w.UnionMode=w.Type=w.TimeUnit=w.Precision=w.MetadataVersion=w.MessageHeader=w.IntervalUnit=w.DateUnit=w.ArrowType=void 0;var XE=kn(),eC=Ma(),tC=ys(),rC=so(),iC=Yg(),nC=$g(),sC=Jg(),aC=Kg();XE.default.toDOMStream=iC.toDOMStream;eC.Builder.throughDOM=nC.builderThroughDOMStream;tC.RecordBatchReader.throughDOM=sC.recordBatchReaderThroughDOMStream;rC.RecordBatchWriter.throughDOM=aC.recordBatchWriterThroughDOMStream;var D=rv();Object.defineProperty(w,"ArrowType",{enumerable:!0,get:function(){return D.ArrowType}});Object.defineProperty(w,"DateUnit",{enumerable:!0,get:function(){return D.DateUnit}});Object.defineProperty(w,"IntervalUnit",{enumerable:!0,get:function(){return D.IntervalUnit}});Object.defineProperty(w,"MessageHeader",{enumerable:!0,get:function(){return D.MessageHeader}});Object.defineProperty(w,"MetadataVersion",{enumerable:!0,get:function(){return D.MetadataVersion}});Object.defineProperty(w,"Precision",{enumerable:!0,get:function(){return D.Precision}});Object.defineProperty(w,"TimeUnit",{enumerable:!0,get:function(){return D.TimeUnit}});Object.defineProperty(w,"Type",{enumerable:!0,get:function(){return D.Type}});Object.defineProperty(w,"UnionMode",{enumerable:!0,get:function(){return D.UnionMode}});Object.defineProperty(w,"BufferType",{enumerable:!0,get:function(){return D.BufferType}});Object.defineProperty(w,"Data",{enumerable:!0,get:function(){return D.Data}});Object.defineProperty(w,"DataType",{enumerable:!0,get:function(){return D.DataType}});Object.defineProperty(w,"Null",{enumerable:!0,get:function(){return D.Null}});Object.defineProperty(w,"Bool",{enumerable:!0,get:function(){return D.Bool}});Object.defineProperty(w,"Int",{enumerable:!0,get:function(){return D.Int}});Object.defineProperty(w,"Int8",{enumerable:!0,get:function(){return D.Int8}});Object.defineProperty(w,"Int16",{enumerable:!0,get:function(){return D.Int16}});Object.defineProperty(w,"Int32",{enumerable:!0,get:function(){return D.Int32}});Object.defineProperty(w,"Int64",{enumerable:!0,get:function(){return D.Int64}});Object.defineProperty(w,"Uint8",{enumerable:!0,get:function(){return D.Uint8}});Object.defineProperty(w,"Uint16",{enumerable:!0,get:function(){return D.Uint16}});Object.defineProperty(w,"Uint32",{enumerable:!0,get:function(){return D.Uint32}});Object.defineProperty(w,"Uint64",{enumerable:!0,get:function(){return D.Uint64}});Object.defineProperty(w,"Float",{enumerable:!0,get:function(){return D.Float}});Object.defineProperty(w,"Float16",{enumerable:!0,get:function(){return D.Float16}});Object.defineProperty(w,"Float32",{enumerable:!0,get:function(){return D.Float32}});Object.defineProperty(w,"Float64",{enumerable:!0,get:function(){return D.Float64}});Object.defineProperty(w,"Utf8",{enumerable:!0,get:function(){return D.Utf8}});Object.defineProperty(w,"Binary",{enumerable:!0,get:function(){return D.Binary}});Object.defineProperty(w,"FixedSizeBinary",{enumerable:!0,get:function(){return D.FixedSizeBinary}});Object.defineProperty(w,"Date_",{enumerable:!0,get:function(){return D.Date_}});Object.defineProperty(w,"DateDay",{enumerable:!0,get:function(){return D.DateDay}});Object.defineProperty(w,"DateMillisecond",{enumerable:!0,get:function(){return D.DateMillisecond}});Object.defineProperty(w,"Timestamp",{enumerable:!0,get:function(){return D.Timestamp}});Object.defineProperty(w,"TimestampSecond",{enumerable:!0,get:function(){return D.TimestampSecond}});Object.defineProperty(w,"TimestampMillisecond",{enumerable:!0,get:function(){return D.TimestampMillisecond}});Object.defineProperty(w,"TimestampMicrosecond",{enumerable:!0,get:function(){return D.TimestampMicrosecond}});Object.defineProperty(w,"TimestampNanosecond",{enumerable:!0,get:function(){return D.TimestampNanosecond}});Object.defineProperty(w,"Time",{enumerable:!0,get:function(){return D.Time}});Object.defineProperty(w,"TimeSecond",{enumerable:!0,get:function(){return D.TimeSecond}});Object.defineProperty(w,"TimeMillisecond",{enumerable:!0,get:function(){return D.TimeMillisecond}});Object.defineProperty(w,"TimeMicrosecond",{enumerable:!0,get:function(){return D.TimeMicrosecond}});Object.defineProperty(w,"TimeNanosecond",{enumerable:!0,get:function(){return D.TimeNanosecond}});Object.defineProperty(w,"Decimal",{enumerable:!0,get:function(){return D.Decimal}});Object.defineProperty(w,"List",{enumerable:!0,get:function(){return D.List}});Object.defineProperty(w,"Struct",{enumerable:!0,get:function(){return D.Struct}});Object.defineProperty(w,"Union",{enumerable:!0,get:function(){return D.Union}});Object.defineProperty(w,"DenseUnion",{enumerable:!0,get:function(){return D.DenseUnion}});Object.defineProperty(w,"SparseUnion",{enumerable:!0,get:function(){return D.SparseUnion}});Object.defineProperty(w,"Dictionary",{enumerable:!0,get:function(){return D.Dictionary}});Object.defineProperty(w,"Interval",{enumerable:!0,get:function(){return D.Interval}});Object.defineProperty(w,"IntervalDayTime",{enumerable:!0,get:function(){return D.IntervalDayTime}});Object.defineProperty(w,"IntervalYearMonth",{enumerable:!0,get:function(){return D.IntervalYearMonth}});Object.defineProperty(w,"FixedSizeList",{enumerable:!0,get:function(){return D.FixedSizeList}});Object.defineProperty(w,"Map_",{enumerable:!0,get:function(){return D.Map_}});Object.defineProperty(w,"Table",{enumerable:!0,get:function(){return D.Table}});Object.defineProperty(w,"Column",{enumerable:!0,get:function(){return D.Column}});Object.defineProperty(w,"Schema",{enumerable:!0,get:function(){return D.Schema}});Object.defineProperty(w,"Field",{enumerable:!0,get:function(){return D.Field}});Object.defineProperty(w,"Visitor",{enumerable:!0,get:function(){return D.Visitor}});Object.defineProperty(w,"Vector",{enumerable:!0,get:function(){return D.Vector}});Object.defineProperty(w,"BaseVector",{enumerable:!0,get:function(){return D.BaseVector}});Object.defineProperty(w,"BinaryVector",{enumerable:!0,get:function(){return D.BinaryVector}});Object.defineProperty(w,"BoolVector",{enumerable:!0,get:function(){return D.BoolVector}});Object.defineProperty(w,"Chunked",{enumerable:!0,get:function(){return D.Chunked}});Object.defineProperty(w,"DateVector",{enumerable:!0,get:function(){return D.DateVector}});Object.defineProperty(w,"DateDayVector",{enumerable:!0,get:function(){return D.DateDayVector}});Object.defineProperty(w,"DateMillisecondVector",{enumerable:!0,get:function(){return D.DateMillisecondVector}});Object.defineProperty(w,"DecimalVector",{enumerable:!0,get:function(){return D.DecimalVector}});Object.defineProperty(w,"DictionaryVector",{enumerable:!0,get:function(){return D.DictionaryVector}});Object.defineProperty(w,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return D.FixedSizeBinaryVector}});Object.defineProperty(w,"FixedSizeListVector",{enumerable:!0,get:function(){return D.FixedSizeListVector}});Object.defineProperty(w,"FloatVector",{enumerable:!0,get:function(){return D.FloatVector}});Object.defineProperty(w,"Float16Vector",{enumerable:!0,get:function(){return D.Float16Vector}});Object.defineProperty(w,"Float32Vector",{enumerable:!0,get:function(){return D.Float32Vector}});Object.defineProperty(w,"Float64Vector",{enumerable:!0,get:function(){return D.Float64Vector}});Object.defineProperty(w,"IntervalVector",{enumerable:!0,get:function(){return D.IntervalVector}});Object.defineProperty(w,"IntervalDayTimeVector",{enumerable:!0,get:function(){return D.IntervalDayTimeVector}});Object.defineProperty(w,"IntervalYearMonthVector",{enumerable:!0,get:function(){return D.IntervalYearMonthVector}});Object.defineProperty(w,"IntVector",{enumerable:!0,get:function(){return D.IntVector}});Object.defineProperty(w,"Int8Vector",{enumerable:!0,get:function(){return D.Int8Vector}});Object.defineProperty(w,"Int16Vector",{enumerable:!0,get:function(){return D.Int16Vector}});Object.defineProperty(w,"Int32Vector",{enumerable:!0,get:function(){return D.Int32Vector}});Object.defineProperty(w,"Int64Vector",{enumerable:!0,get:function(){return D.Int64Vector}});Object.defineProperty(w,"Uint8Vector",{enumerable:!0,get:function(){return D.Uint8Vector}});Object.defineProperty(w,"Uint16Vector",{enumerable:!0,get:function(){return D.Uint16Vector}});Object.defineProperty(w,"Uint32Vector",{enumerable:!0,get:function(){return D.Uint32Vector}});Object.defineProperty(w,"Uint64Vector",{enumerable:!0,get:function(){return D.Uint64Vector}});Object.defineProperty(w,"ListVector",{enumerable:!0,get:function(){return D.ListVector}});Object.defineProperty(w,"MapVector",{enumerable:!0,get:function(){return D.MapVector}});Object.defineProperty(w,"NullVector",{enumerable:!0,get:function(){return D.NullVector}});Object.defineProperty(w,"StructVector",{enumerable:!0,get:function(){return D.StructVector}});Object.defineProperty(w,"TimestampVector",{enumerable:!0,get:function(){return D.TimestampVector}});Object.defineProperty(w,"TimestampSecondVector",{enumerable:!0,get:function(){return D.TimestampSecondVector}});Object.defineProperty(w,"TimestampMillisecondVector",{enumerable:!0,get:function(){return D.TimestampMillisecondVector}});Object.defineProperty(w,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return D.TimestampMicrosecondVector}});Object.defineProperty(w,"TimestampNanosecondVector",{enumerable:!0,get:function(){return D.TimestampNanosecondVector}});Object.defineProperty(w,"TimeVector",{enumerable:!0,get:function(){return D.TimeVector}});Object.defineProperty(w,"TimeSecondVector",{enumerable:!0,get:function(){return D.TimeSecondVector}});Object.defineProperty(w,"TimeMillisecondVector",{enumerable:!0,get:function(){return D.TimeMillisecondVector}});Object.defineProperty(w,"TimeMicrosecondVector",{enumerable:!0,get:function(){return D.TimeMicrosecondVector}});Object.defineProperty(w,"TimeNanosecondVector",{enumerable:!0,get:function(){return D.TimeNanosecondVector}});Object.defineProperty(w,"UnionVector",{enumerable:!0,get:function(){return D.UnionVector}});Object.defineProperty(w,"DenseUnionVector",{enumerable:!0,get:function(){return D.DenseUnionVector}});Object.defineProperty(w,"SparseUnionVector",{enumerable:!0,get:function(){return D.SparseUnionVector}});Object.defineProperty(w,"Utf8Vector",{enumerable:!0,get:function(){return D.Utf8Vector}});Object.defineProperty(w,"ByteStream",{enumerable:!0,get:function(){return D.ByteStream}});Object.defineProperty(w,"AsyncByteStream",{enumerable:!0,get:function(){return D.AsyncByteStream}});Object.defineProperty(w,"AsyncByteQueue",{enumerable:!0,get:function(){return D.AsyncByteQueue}});Object.defineProperty(w,"RecordBatchReader",{enumerable:!0,get:function(){return D.RecordBatchReader}});Object.defineProperty(w,"RecordBatchFileReader",{enumerable:!0,get:function(){return D.RecordBatchFileReader}});Object.defineProperty(w,"RecordBatchStreamReader",{enumerable:!0,get:function(){return D.RecordBatchStreamReader}});Object.defineProperty(w,"AsyncRecordBatchFileReader",{enumerable:!0,get:function(){return D.AsyncRecordBatchFileReader}});Object.defineProperty(w,"AsyncRecordBatchStreamReader",{enumerable:!0,get:function(){return D.AsyncRecordBatchStreamReader}});Object.defineProperty(w,"RecordBatchWriter",{enumerable:!0,get:function(){return D.RecordBatchWriter}});Object.defineProperty(w,"RecordBatchFileWriter",{enumerable:!0,get:function(){return D.RecordBatchFileWriter}});Object.defineProperty(w,"RecordBatchStreamWriter",{enumerable:!0,get:function(){return D.RecordBatchStreamWriter}});Object.defineProperty(w,"RecordBatchJSONWriter",{enumerable:!0,get:function(){return D.RecordBatchJSONWriter}});Object.defineProperty(w,"MessageReader",{enumerable:!0,get:function(){return D.MessageReader}});Object.defineProperty(w,"AsyncMessageReader",{enumerable:!0,get:function(){return D.AsyncMessageReader}});Object.defineProperty(w,"JSONMessageReader",{enumerable:!0,get:function(){return D.JSONMessageReader}});Object.defineProperty(w,"Message",{enumerable:!0,get:function(){return D.Message}});Object.defineProperty(w,"RecordBatch",{enumerable:!0,get:function(){return D.RecordBatch}});Object.defineProperty(w,"DataFrame",{enumerable:!0,get:function(){return D.DataFrame}});Object.defineProperty(w,"FilteredDataFrame",{enumerable:!0,get:function(){return D.FilteredDataFrame}});Object.defineProperty(w,"CountByResult",{enumerable:!0,get:function(){return D.CountByResult}});Object.defineProperty(w,"predicate",{enumerable:!0,get:function(){return D.predicate}});Object.defineProperty(w,"util",{enumerable:!0,get:function(){return D.util}});Object.defineProperty(w,"Builder",{enumerable:!0,get:function(){return D.Builder}});Object.defineProperty(w,"BinaryBuilder",{enumerable:!0,get:function(){return D.BinaryBuilder}});Object.defineProperty(w,"BoolBuilder",{enumerable:!0,get:function(){return D.BoolBuilder}});Object.defineProperty(w,"DateBuilder",{enumerable:!0,get:function(){return D.DateBuilder}});Object.defineProperty(w,"DateDayBuilder",{enumerable:!0,get:function(){return D.DateDayBuilder}});Object.defineProperty(w,"DateMillisecondBuilder",{enumerable:!0,get:function(){return D.DateMillisecondBuilder}});Object.defineProperty(w,"DecimalBuilder",{enumerable:!0,get:function(){return D.DecimalBuilder}});Object.defineProperty(w,"DictionaryBuilder",{enumerable:!0,get:function(){return D.DictionaryBuilder}});Object.defineProperty(w,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return D.FixedSizeBinaryBuilder}});Object.defineProperty(w,"FixedSizeListBuilder",{enumerable:!0,get:function(){return D.FixedSizeListBuilder}});Object.defineProperty(w,"FloatBuilder",{enumerable:!0,get:function(){return D.FloatBuilder}});Object.defineProperty(w,"Float16Builder",{enumerable:!0,get:function(){return D.Float16Builder}});Object.defineProperty(w,"Float32Builder",{enumerable:!0,get:function(){return D.Float32Builder}});Object.defineProperty(w,"Float64Builder",{enumerable:!0,get:function(){return D.Float64Builder}});Object.defineProperty(w,"IntervalBuilder",{enumerable:!0,get:function(){return D.IntervalBuilder}});Object.defineProperty(w,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return D.IntervalDayTimeBuilder}});Object.defineProperty(w,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return D.IntervalYearMonthBuilder}});Object.defineProperty(w,"IntBuilder",{enumerable:!0,get:function(){return D.IntBuilder}});Object.defineProperty(w,"Int8Builder",{enumerable:!0,get:function(){return D.Int8Builder}});Object.defineProperty(w,"Int16Builder",{enumerable:!0,get:function(){return D.Int16Builder}});Object.defineProperty(w,"Int32Builder",{enumerable:!0,get:function(){return D.Int32Builder}});Object.defineProperty(w,"Int64Builder",{enumerable:!0,get:function(){return D.Int64Builder}});Object.defineProperty(w,"Uint8Builder",{enumerable:!0,get:function(){return D.Uint8Builder}});Object.defineProperty(w,"Uint16Builder",{enumerable:!0,get:function(){return D.Uint16Builder}});Object.defineProperty(w,"Uint32Builder",{enumerable:!0,get:function(){return D.Uint32Builder}});Object.defineProperty(w,"Uint64Builder",{enumerable:!0,get:function(){return D.Uint64Builder}});Object.defineProperty(w,"ListBuilder",{enumerable:!0,get:function(){return D.ListBuilder}});Object.defineProperty(w,"MapBuilder",{enumerable:!0,get:function(){return D.MapBuilder}});Object.defineProperty(w,"NullBuilder",{enumerable:!0,get:function(){return D.NullBuilder}});Object.defineProperty(w,"StructBuilder",{enumerable:!0,get:function(){return D.StructBuilder}});Object.defineProperty(w,"TimestampBuilder",{enumerable:!0,get:function(){return D.TimestampBuilder}});Object.defineProperty(w,"TimestampSecondBuilder",{enumerable:!0,get:function(){return D.TimestampSecondBuilder}});Object.defineProperty(w,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return D.TimestampMillisecondBuilder}});Object.defineProperty(w,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return D.TimestampMicrosecondBuilder}});Object.defineProperty(w,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return D.TimestampNanosecondBuilder}});Object.defineProperty(w,"TimeBuilder",{enumerable:!0,get:function(){return D.TimeBuilder}});Object.defineProperty(w,"TimeSecondBuilder",{enumerable:!0,get:function(){return D.TimeSecondBuilder}});Object.defineProperty(w,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return D.TimeMillisecondBuilder}});Object.defineProperty(w,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return D.TimeMicrosecondBuilder}});Object.defineProperty(w,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return D.TimeNanosecondBuilder}});Object.defineProperty(w,"UnionBuilder",{enumerable:!0,get:function(){return D.UnionBuilder}});Object.defineProperty(w,"DenseUnionBuilder",{enumerable:!0,get:function(){return D.DenseUnionBuilder}});Object.defineProperty(w,"SparseUnionBuilder",{enumerable:!0,get:function(){return D.SparseUnionBuilder}});Object.defineProperty(w,"Utf8Builder",{enumerable:!0,get:function(){return D.Utf8Builder}})});var No=U(()=>{});var yd=U(()=>{});var nv=U(()=>{});var fC={};yS(fC,{registerWorker:()=>lv});var hd=Ps(Ts());var iv=Ps(Ts()),Vo=class extends iv.AsyncByteQueue{flush(){let e=super.toUint8Array(!0);return this._values.length=0,e}};var cd;(function(a){a[a.NONE=0]="NONE",a[a.DEBUG=1]="DEBUG",a[a.INFO=2]="INFO",a[a.WARNING=3]="WARNING",a[a.ERROR=4]="ERROR"})(cd||(cd={}));var ld;(function(a){a[a.NONE=0]="NONE",a[a.CONNECT=1]="CONNECT",a[a.DISCONNECT=2]="DISCONNECT",a[a.OPEN=3]="OPEN",a[a.QUERY=4]="QUERY"})(ld||(ld={}));var dd;(function(c){c[c.NONE=0]="NONE",c[c.OK=1]="OK",c[c.ERROR=2]="ERROR",c[c.START=3]="START",c[c.RUN=4]="RUN",c[c.CAPTURE=5]="CAPTURE"})(dd||(dd={}));var fd;(function(a){a[a.NONE=0]="NONE",a[a.WEB_WORKER=1]="WEB_WORKER",a[a.NODE_WORKER=2]="NODE_WORKER",a[a.BINDINGS=3]="BINDINGS",a[a.ASYNC_DUCKDB=4]="ASYNC_DUCKDB"})(fd||(fd={}));var oC=class{constructor(e,t,i){this.db=e;this.conn=t;this.header=i;this._first=!0,this._depleted=!1,this._inFlight=null}async next(){if(this._first)return this._first=!1,{done:!1,value:this.header};if(this._depleted)return{done:!0,value:null};let e;return this._inFlight!=null?(e=await this._inFlight,this._inFlight=null):e=await this.db.fetchQueryResults(this.conn),this._depleted=e.length==0,this._depleted||(this._inFlight=this.db.fetchQueryResults(this.conn)),{done:this._depleted,value:e}}[Symbol.asyncIterator](){return this}};var ge;(function(W){W.CLOSE_PREPARED="CLOSE_PREPARED",W.COLLECT_FILE_STATISTICS="COLLECT_FILE_STATISTICS",W.CONNECT="CONNECT",W.COPY_FILE_TO_BUFFER="COPY_FILE_TO_BUFFER",W.COPY_FILE_TO_PATH="COPY_FILE_TO_PATH",W.CREATE_PREPARED="CREATE_PREPARED",W.DISCONNECT="DISCONNECT",W.DROP_FILE="DROP_FILE",W.DROP_FILES="DROP_FILES",W.EXPORT_FILE_STATISTICS="EXPORT_FILE_STATISTICS",W.FETCH_QUERY_RESULTS="FETCH_QUERY_RESULTS",W.FLUSH_FILES="FLUSH_FILES",W.GET_FEATURE_FLAGS="GET_FEATURE_FLAGS",W.GET_VERSION="GET_VERSION",W.INSERT_ARROW_FROM_IPC_STREAM="INSERT_ARROW_FROM_IPC_STREAM",W.INSERT_CSV_FROM_PATH="IMPORT_CSV_FROM_PATH",W.INSERT_JSON_FROM_PATH="IMPORT_JSON_FROM_PATH",W.INSTANTIATE="INSTANTIATE",W.OPEN="OPEN",W.PING="PING",W.REGISTER_FILE_BUFFER="REGISTER_FILE_BUFFER",W.REGISTER_FILE_HANDLE="REGISTER_FILE_HANDLE",W.REGISTER_FILE_URL="REGISTER_FILE_URL",W.RESET="RESET",W.RUN_PREPARED="RUN_PREPARED",W.RUN_QUERY="RUN_QUERY",W.SEND_PREPARED="SEND_PREPARED",W.SEND_QUERY="SEND_QUERY",W.TOKENIZE="TOKENIZE"})(ge||(ge={}));var ze;(function(ce){ce.CONNECTION_INFO="CONNECTION_INFO",ce.ERROR="ERROR",ce.FEATURE_FLAGS="FEATURE_FLAGS",ce.FILE_BUFFER="FILE_BUFFER",ce.FILE_SIZE="FILE_SIZE",ce.FILE_STATISTICS="FILE_STATISTICS",ce.LOG="LOG",ce.OK="OK",ce.PREPARED_STATEMENT_ID="PREPARED_STATEMENT_ID",ce.QUERY_PLAN="QUERY_PLAN",ce.QUERY_RESULT="QUERY_RESULT",ce.QUERY_RESULT_CHUNK="QUERY_RESULT_CHUNK",ce.QUERY_START="QUERY_START",ce.REGISTERED_FILE="REGISTERED_FILE",ce.SCRIPT_TOKENS="SCRIPT_TOKENS",ce.SUCCESS="SUCCESS",ce.VERSION_STRING="VERSION_STRING"})(ze||(ze={}));var he=Ps(Ts());function Dn(r,e){switch(e.typeId){case he.Type.Binary:return{name:r,type:"binary"};case he.Type.Bool:return{name:r,type:"bool"};case he.Type.Date:return{name:r,type:"date"};case he.Type.DateDay:return{name:r,type:"date32[d]"};case he.Type.DateMillisecond:return{name:r,type:"date64[ms]"};case he.Type.Decimal:{let t=e;return{name:r,type:"decimal",precision:t.precision,scale:t.scale}}case he.Type.Float:return{name:r,type:"float"};case he.Type.Float16:return{name:r,type:"float16"};case he.Type.Float32:return{name:r,type:"float32"};case he.Type.Float64:return{name:r,type:"float64"};case he.Type.Int:return{name:r,type:"int32"};case he.Type.Int16:return{name:r,type:"int16"};case he.Type.Int32:return{name:r,type:"int32"};case he.Type.Int64:return{name:r,type:"int64"};case he.Type.Uint16:return{name:r,type:"uint16"};case he.Type.Uint32:return{name:r,type:"uint32"};case he.Type.Uint64:return{name:r,type:"uint64"};case he.Type.Uint8:return{name:r,type:"uint8"};case he.Type.IntervalDayTime:return{name:r,type:"interval[dt]"};case he.Type.IntervalYearMonth:return{name:r,type:"interval[m]"};case he.Type.List:{let t=e;return{name:r,type:"list",children:[Dn(t.valueField.name,t.valueField.type)]}}case he.Type.FixedSizeBinary:return{name:r,type:"fixedsizebinary",byteWidth:e.byteWidth};case he.Type.Null:return{name:r,type:"null"};case he.Type.Utf8:return{name:r,type:"utf8"};case he.Type.Struct:return{name:r,type:"struct",children:e.children.map(i=>Dn(i.name,i.type))};case he.Type.Time:return{name:r,type:"time[s]"};case he.Type.TimeMicrosecond:return{name:r,type:"time[us]"};case he.Type.TimeMillisecond:return{name:r,type:"time[ms]"};case he.Type.TimeNanosecond:return{name:r,type:"time[ns]"};case he.Type.TimeSecond:return{name:r,type:"time[s]"};case he.Type.Timestamp:return{name:r,type:"timestamp",timezone:e.timezone||void 0};case he.Type.TimestampSecond:return{name:r,type:"timestamp[s]",timezone:e.timezone||void 0};case he.Type.TimestampMicrosecond:return{name:r,type:"timestamp[us]",timezone:e.timezone||void 0};case he.Type.TimestampNanosecond:return{name:r,type:"timestamp[ns]",timezone:e.timezone||void 0};case he.Type.TimestampMillisecond:return{name:r,type:"timestamp[ms]",timezone:e.timezone||void 0}}throw new Error(`unsupported arrow type: ${e.toString()}`)}var Ek=new TextEncoder;var pd=class{constructor(){this._bindings=null;this._nextMessageId=0}log(e){this.postMessage({messageId:this._nextMessageId++,requestId:0,type:ze.LOG,data:e},[])}sendOK(e){this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:ze.OK,data:null},[])}failWith(e,t){let i={name:t.name,message:t.message,stack:t.stack||void 0};this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:ze.ERROR,data:i},[])}async onMessage(e){switch(e.type){case ge.PING:this.sendOK(e);return;case ge.INSTANTIATE:this._bindings!=null&&this.failWith(e,new Error("duckdb already initialized"));try{this._bindings=await this.instantiate(e.data[0],e.data[1]),this.sendOK(e)}catch(t){this._bindings=null,this.failWith(e,t)}return;default:break}if(!this._bindings)return this.failWith(e,new Error("duckdb is not initialized"));try{switch(e.type){case ge.GET_VERSION:this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:ze.VERSION_STRING,data:this._bindings.getVersion()},[]);break;case ge.GET_FEATURE_FLAGS:this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:ze.FEATURE_FLAGS,data:this._bindings.getFeatureFlags()},[]);break;case ge.RESET:this._bindings.reset(),this.sendOK(e);break;case ge.OPEN:this._bindings.open(e.data),this.sendOK(e);break;case ge.DROP_FILE:this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:ze.SUCCESS,data:this._bindings.dropFile(e.data)},[]);break;case ge.DROP_FILES:this._bindings.dropFiles(),this.sendOK(e);break;case ge.FLUSH_FILES:this._bindings.flushFiles(),this.sendOK(e);break;case ge.CONNECT:{let t=this._bindings.connect();this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:ze.CONNECTION_INFO,data:t.useUnsafe((i,n)=>n)},[]);break}case ge.DISCONNECT:this._bindings.disconnect(e.data),this.sendOK(e);break;case ge.CREATE_PREPARED:{let t=this._bindings.createPrepared(e.data[0],e.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:ze.PREPARED_STATEMENT_ID,data:t},[]);break}case ge.CLOSE_PREPARED:{this._bindings.closePrepared(e.data[0],e.data[1]),this.sendOK(e);break}case ge.RUN_PREPARED:{let t=this._bindings.runPrepared(e.data[0],e.data[1],e.data[2]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:ze.QUERY_RESULT,data:t},[t.buffer]);break}case ge.RUN_QUERY:{let t=this._bindings.runQuery(e.data[0],e.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:ze.QUERY_RESULT,data:t},[t.buffer]);break}case ge.SEND_PREPARED:{let t=this._bindings.sendPrepared(e.data[0],e.data[1],e.data[2]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:ze.QUERY_START,data:t},[t.buffer]);break}case ge.SEND_QUERY:{let t=this._bindings.sendQuery(e.data[0],e.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:ze.QUERY_START,data:t},[t.buffer]);break}case ge.FETCH_QUERY_RESULTS:{let t=this._bindings.fetchQueryResults(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:ze.QUERY_RESULT_CHUNK,data:t},[t.buffer]);break}case ge.REGISTER_FILE_URL:this._bindings.registerFileURL(e.data[0],e.data[1]),this.sendOK(e);break;case ge.REGISTER_FILE_BUFFER:this._bindings.registerFileBuffer(e.data[0],e.data[1]),this.sendOK(e);break;case ge.REGISTER_FILE_HANDLE:this._bindings.registerFileHandle(e.data[0],e.data[1]),this.sendOK(e);break;case ge.COPY_FILE_TO_PATH:this._bindings.copyFileToPath(e.data[0],e.data[1]),this.sendOK(e);break;case ge.COPY_FILE_TO_BUFFER:{let t=this._bindings.copyFileToBuffer(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:ze.FILE_BUFFER,data:t},[]);break}case ge.COLLECT_FILE_STATISTICS:this._bindings.collectFileStatistics(e.data[0],e.data[1]),this.sendOK(e);break;case ge.EXPORT_FILE_STATISTICS:{this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:ze.FILE_STATISTICS,data:this._bindings.exportFileStatistics(e.data)},[]);break}case ge.INSERT_ARROW_FROM_IPC_STREAM:{this._bindings.insertArrowFromIPCStream(e.data[0],e.data[1],e.data[2]),this.sendOK(e);break}case ge.INSERT_CSV_FROM_PATH:{this._bindings.insertCSVFromPath(e.data[0],e.data[1],e.data[2]),this.sendOK(e);break}case ge.INSERT_JSON_FROM_PATH:{this._bindings.insertJSONFromPath(e.data[0],e.data[1],e.data[2]),this.sendOK(e);break}case ge.TOKENIZE:{let t=this._bindings.tokenize(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:ze.SCRIPT_TOKENS,data:t},[]);break}}}catch(t){return this.failWith(e,t)}}};var av={},uC=function(){var r=av.url;return function(e){e=e||{};var t=typeof e!="undefined"?e:{},i,n;t.ready=new Promise(function(o,u){i=o,n=u});var a={},c;for(c in t)t.hasOwnProperty(c)&&(a[c]=t[c]);var f=[],j="./this.program",s=function(o,u){throw u},m=typeof window=="object",R=typeof importScripts=="function",$=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",ue="";function pt(o){return t.locateFile?t.locateFile(o,ue):ue+o}var Ht,Pt,ce,dv;function fv(o){if(!(o instanceof ks)){var u=o;si("exiting due to exception: "+u)}}var Ii,Si;$?(R?ue=No().dirname(ue)+"/":ue=__dirname+"/",Ht=function(u,l){return Ii||(Ii=yd()),Si||(Si=No()),u=Si.normalize(u),Ii.readFileSync(u,l?null:"utf8")},ce=function(u){var l=Ht(u,!0);return l.buffer||(l=new Uint8Array(l)),Td(l.buffer),l},Pt=function(u,l,d){Ii||(Ii=yd()),Si||(Si=No()),u=Si.normalize(u),Ii.readFile(u,function(h,p){h?d(h):l(p.buffer)})},process.argv.length>1&&(j=process.argv[1].replace(/\\/g,"/")),f=process.argv.slice(2),process.on("uncaughtException",function(o){if(!(o instanceof ks))throw o}),process.on("unhandledRejection",function(o){throw o}),s=function(o,u){if(xo())throw process.exitCode=o,u;fv(u),process.exit(o)},t.inspect=function(){return"[Emscripten Module object]"}):(m||R)&&(R?ue=self.location.href:typeof document!="undefined"&&document.currentScript&&(ue=document.currentScript.src),r&&(ue=r),ue.indexOf("blob:")!==0?ue=ue.substr(0,ue.replace(/[?#].*/,"").lastIndexOf("/")+1):ue="",Ht=function(o){var u=new XMLHttpRequest;return u.open("GET",o,!1),u.send(null),u.responseText},R&&(ce=function(o){var u=new XMLHttpRequest;return u.open("GET",o,!1),u.responseType="arraybuffer",u.send(null),new Uint8Array(u.response)}),Pt=function(o,u,l){var d=new XMLHttpRequest;d.open("GET",o,!0),d.responseType="arraybuffer",d.onload=function(){if(d.status==200||d.status==0&&d.response){u(d.response);return}l()},d.onerror=l,d.send(null)},dv=function(o){document.title=o});var hv=t.print||console.log.bind(console),si=t.printErr||console.warn.bind(console);for(c in a)a.hasOwnProperty(c)&&(t[c]=a[c]);a=null,t.arguments&&(f=t.arguments),t.thisProgram&&(j=t.thisProgram),t.quit&&(s=t.quit);var jd=0,tt=function(o){jd=o},pv=function(){return jd},Rn;t.wasmBinary&&(Rn=t.wasmBinary);var yv=t.noExitRuntime||!0;typeof WebAssembly!="object"&&$t("no native wasm support detected");var W,Lo=!1,Bs;function Td(o,u){o||$t("Assertion failed: "+u)}function mv(o){var u=t["_"+o];return Td(u,"Cannot call unknown function "+o+", make sure it is exported"),u}function _v(o,u,l,d,h){var p={string:function(N){var ie=0;if(N!=null&&N!==0){var me=(N.length<<2)+1;ie=Ho(me),bv(N,ie,me)}return ie},array:function(N){var ie=Ho(N.length);return Od(N,ie),ie}};function y(N){return u==="string"?Is(N):u==="boolean"?Boolean(N):N}var _=mv(o),b=[],g=0;if(d)for(var T=0;T<d.length;T++){var B=p[l[T]];B?(g===0&&(g=I()),b[T]=B(d[T])):b[T]=d[T]}var A=_.apply(null,b);function C(N){return g!==0&&S(g),y(N)}return A=C(A),A}var Bd=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function Id(o,u,l){for(var d=u+l,h=u;o[h]&&!(h>=d);)++h;if(h-u>16&&o.subarray&&Bd)return Bd.decode(o.subarray(u,h));for(var p="";u<h;){var y=o[u++];if(!(y&128)){p+=String.fromCharCode(y);continue}var _=o[u++]&63;if((y&224)==192){p+=String.fromCharCode((y&31)<<6|_);continue}var b=o[u++]&63;if((y&240)==224?y=(y&15)<<12|_<<6|b:y=(y&7)<<18|_<<12|b<<6|o[u++]&63,y<65536)p+=String.fromCharCode(y);else{var g=y-65536;p+=String.fromCharCode(55296|g>>10,56320|g&1023)}}return p}function Is(o,u){return o?Id(Oi,o,u):""}function Sd(o,u,l,d){if(!(d>0))return 0;for(var h=l,p=l+d-1,y=0;y<o.length;++y){var _=o.charCodeAt(y);if(_>=55296&&_<=57343){var b=o.charCodeAt(++y);_=65536+((_&1023)<<10)|b&1023}if(_<=127){if(l>=p)break;u[l++]=_}else if(_<=2047){if(l+1>=p)break;u[l++]=192|_>>6,u[l++]=128|_&63}else if(_<=65535){if(l+2>=p)break;u[l++]=224|_>>12,u[l++]=128|_>>6&63,u[l++]=128|_&63}else{if(l+3>=p)break;u[l++]=240|_>>18,u[l++]=128|_>>12&63,u[l++]=128|_>>6&63,u[l++]=128|_&63}}return u[l]=0,l-h}function bv(o,u,l){return Sd(o,Oi,u,l)}function gv(o){for(var u=0,l=0;l<o.length;++l){var d=o.charCodeAt(l);d>=55296&&d<=57343&&(d=65536+((d&1023)<<10)|o.charCodeAt(++l)&1023),d<=127?++u:d<=2047?u+=2:d<=65535?u+=3:u+=4}return u}function Od(o,u){Gt.set(o,u)}function vv(o,u,l){for(var d=0;d<o.length;++d)Gt[u++>>0]=o.charCodeAt(d);l||(Gt[u>>0]=0)}function wv(o,u){return o%u>0&&(o+=u-o%u),o}var Ad,Gt,Oi,jv,Tv,de,Bv,Iv,Sv;function Dd(o){Ad=o,t.HEAP8=Gt=new Int8Array(o),t.HEAP16=jv=new Int16Array(o),t.HEAP32=de=new Int32Array(o),t.HEAPU8=Oi=new Uint8Array(o),t.HEAPU16=Tv=new Uint16Array(o),t.HEAPU32=Bv=new Uint32Array(o),t.HEAPF32=Iv=new Float32Array(o),t.HEAPF64=Sv=new Float64Array(o)}var hC=t.INITIAL_MEMORY||16777216,H,Fd=[],Rd=[],Ov=[],Ed=[],Av=!1,Dv=!1,Fv=0;function xo(){return yv||Fv>0}function Rv(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)Mv(t.preRun.shift());Ss(Fd)}function Ev(){Av=!0,Ss(Rd)}function Cv(){Ss(Ov)}function Uv(){Dv=!0}function kv(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)Vv(t.postRun.shift());Ss(Ed)}function Mv(o){Fd.unshift(o)}function Pv(o){Rd.unshift(o)}function Vv(o){Ed.unshift(o)}var ai=0,qo=null,En=null;function Nv(o){ai++,t.monitorRunDependencies&&t.monitorRunDependencies(ai)}function Lv(o){if(ai--,t.monitorRunDependencies&&t.monitorRunDependencies(ai),ai==0&&(qo!==null&&(clearInterval(qo),qo=null),En)){var u=En;En=null,u()}}t.preloadedImages={},t.preloadedAudios={};function $t(o){t.onAbort&&t.onAbort(o),o="Aborted("+o+")",si(o),Lo=!0,Bs=1,o+=". Build with -s ASSERTIONS=1 for more info.";var u=new WebAssembly.RuntimeError(o);throw n(u),u}var xv="data:application/octet-stream;base64,";function Cd(o){return o.startsWith(xv)}var jt;t.locateFile?(jt="duckdb_wasm.wasm",Cd(jt)||(jt=pt(jt))):jt=new URL("duckdb_wasm.wasm",av.url).toString();function Ud(o){try{if(o==jt&&Rn)return new Uint8Array(Rn);if(ce)return ce(o);throw"both async and sync fetching of the wasm failed"}catch(u){$t(u)}}function qv(){return!Rn&&(m||R)&&typeof fetch=="function"?fetch(jt,{credentials:"same-origin"}).then(function(o){if(!o.ok)throw"failed to load wasm binary file at '"+jt+"'";return o.arrayBuffer()}).catch(function(){return Ud(jt)}):Promise.resolve().then(function(){return Ud(jt)})}function Wv(){var o={a:oj};function u(y,_){var b=y.exports;t.asm=b,W=t.asm.Be,Dd(W.buffer),H=t.asm.Ee,Pv(t.asm.Ce),Lv("wasm-instantiate")}Nv("wasm-instantiate");function l(y){u(y.instance)}function d(y){return qv().then(function(_){return WebAssembly.instantiate(_,o)}).then(function(_){return _}).then(y,function(_){si("failed to asynchronously prepare wasm: "+_),$t(_)})}function h(){return!Rn&&typeof WebAssembly.instantiateStreaming=="function"&&!Cd(jt)&&typeof fetch=="function"?fetch(jt,{credentials:"same-origin"}).then(function(y){var _=WebAssembly.instantiateStreaming(y,o);return _.then(l,function(b){return si("wasm streaming compile failed: "+b),si("falling back to ArrayBuffer instantiation"),d(l)})}):d(l)}if(t.instantiateWasm)try{var p=t.instantiateWasm(o,u);return p}catch(y){return si("Module.instantiateWasm callback failed with error: "+y),!1}return h().catch(n),{}}function Ss(o){for(;o.length>0;){var u=o.shift();if(typeof u=="function"){u(t);continue}var l=u.func;typeof l=="number"?u.arg===void 0?H.get(l)():H.get(l)(u.arg):l(u.arg===void 0?null:u.arg)}}function zv(o){if(o instanceof ks||o=="unwind")return Bs;s(1,o)}function Yv(o){return Go(o+16)+16}function oi(o){this.excPtr=o,this.ptr=o-16,this.set_type=function(u){de[this.ptr+4>>2]=u},this.get_type=function(){return de[this.ptr+4>>2]},this.set_destructor=function(u){de[this.ptr+8>>2]=u},this.get_destructor=function(){return de[this.ptr+8>>2]},this.set_refcount=function(u){de[this.ptr>>2]=u},this.set_caught=function(u){u=u?1:0,Gt[this.ptr+12>>0]=u},this.get_caught=function(){return Gt[this.ptr+12>>0]!=0},this.set_rethrown=function(u){u=u?1:0,Gt[this.ptr+13>>0]=u},this.get_rethrown=function(){return Gt[this.ptr+13>>0]!=0},this.init=function(u,l){this.set_type(u),this.set_destructor(l),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var u=de[this.ptr>>2];de[this.ptr>>2]=u+1},this.release_ref=function(){var u=de[this.ptr>>2];return de[this.ptr>>2]=u-1,u===1}}function Ai(o){this.free=function(){$o(this.ptr),this.ptr=0},this.set_base_ptr=function(u){de[this.ptr>>2]=u},this.get_base_ptr=function(){return de[this.ptr>>2]},this.set_adjusted_ptr=function(u){de[this.ptr+4>>2]=u},this.get_adjusted_ptr_addr=function(){return this.ptr+4},this.get_adjusted_ptr=function(){return de[this.ptr+4>>2]},this.get_exception_ptr=function(){var u=Pd(this.get_exception_info().get_type());if(u)return de[this.get_base_ptr()>>2];var l=this.get_adjusted_ptr();return l!==0?l:this.get_base_ptr()},this.get_exception_info=function(){return new oi(this.get_base_ptr())},o===void 0?(this.ptr=Go(8),this.set_adjusted_ptr(0)):this.ptr=o}var Os=[];function Hv(o){o.add_ref()}var As=0;function Gv(o){var u=new Ai(o),l=u.get_exception_info();return l.get_caught()||(l.set_caught(!0),As--),l.set_rethrown(!1),Os.push(u),Hv(l),u.get_exception_ptr()}var yr=0;function kd(o){return $o(new oi(o).ptr)}function $v(o){if(o.release_ref()&&!o.get_rethrown()){var u=o.get_destructor();u&&H.get(u)(o.excPtr),kd(o.excPtr)}}function Jv(){O(0);var o=Os.pop();$v(o.get_exception_info()),o.free(),yr=0}function Kv(o){var u=new Ai(o),l=u.get_base_ptr();throw yr||(yr=l),u.free(),l}function Qv(){var o=yr;if(!o)return tt(0),0|0;var u=new oi(o),l=u.get_type(),d=new Ai;if(d.set_base_ptr(o),d.set_adjusted_ptr(o),!l)return tt(0),d.ptr|0;for(var h=Array.prototype.slice.call(arguments),p=0;p<h.length;p++){var y=h[p];if(y===0||y===l)break;if(Un(y,l,d.get_adjusted_ptr_addr()))return tt(y),d.ptr|0}return tt(l),d.ptr|0}function Zv(){var o=yr;if(!o)return tt(0),0|0;var u=new oi(o),l=u.get_type(),d=new Ai;if(d.set_base_ptr(o),d.set_adjusted_ptr(o),!l)return tt(0),d.ptr|0;for(var h=Array.prototype.slice.call(arguments),p=0;p<h.length;p++){var y=h[p];if(y===0||y===l)break;if(Un(y,l,d.get_adjusted_ptr_addr()))return tt(y),d.ptr|0}return tt(l),d.ptr|0}function Xv(){var o=yr;if(!o)return tt(0),0|0;var u=new oi(o),l=u.get_type(),d=new Ai;if(d.set_base_ptr(o),d.set_adjusted_ptr(o),!l)return tt(0),d.ptr|0;for(var h=Array.prototype.slice.call(arguments),p=0;p<h.length;p++){var y=h[p];if(y===0||y===l)break;if(Un(y,l,d.get_adjusted_ptr_addr()))return tt(y),d.ptr|0}return tt(l),d.ptr|0}function ew(){var o=yr;if(!o)return tt(0),0|0;var u=new oi(o),l=u.get_type(),d=new Ai;if(d.set_base_ptr(o),d.set_adjusted_ptr(o),!l)return tt(0),d.ptr|0;for(var h=Array.prototype.slice.call(arguments),p=0;p<h.length;p++){var y=h[p];if(y===0||y===l)break;if(Un(y,l,d.get_adjusted_ptr_addr()))return tt(y),d.ptr|0}return tt(l),d.ptr|0}function tw(){var o=Os.pop();o||$t("no exception to throw");var u=o.get_exception_info(),l=o.get_base_ptr();throw u.get_rethrown()?o.free():(Os.push(o),u.set_rethrown(!0),u.set_caught(!1),As++),yr=l,l}function rw(o,u,l){var d=new oi(o);throw d.init(u,l),yr=o,As++,o}function iw(){return As}var Ke={mappings:{},buffers:[null,[],[]],printChar:function(o,u){var l=Ke.buffers[o];u===0||u===10?((o===1?hv:si)(Id(l,0)),l.length=0):l.push(u)},varargs:void 0,get:function(){Ke.varargs+=4;var o=de[Ke.varargs-4>>2];return o},getStr:function(o){var u=Is(o);return u},get64:function(o,u){return o}};function nw(o,u){return o=Ke.getStr(o),Ke.doAccess(o,u)}function sw(o){return de[Md()>>2]=o,o}function aw(o,u,l){return Ke.varargs=l,0}function ow(o,u){}function uw(o,u,l,d){}function cw(o,u,l){}function lw(){return 42}function dw(o,u,l){return Ke.varargs=l,0}function fw(o,u,l){return 0}function hw(o,u){return o=Ke.getStr(o),Ke.doMkdir(o,u)}function pw(o,u,l){Ke.varargs=l}function yw(o,u){}function mw(o){}function _w(o,u){}function bw(o){}function gw(o,u){$t("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function vw(o,u){$t("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function ww(){$t("")}var Wo;$?Wo=function(){var o=process.hrtime();return o[0]*1e3+o[1]/1e6}:Wo=function(){return performance.now()};var jw=!0;function Tw(o,u){var l;if(o===0)l=Date.now();else if((o===1||o===4)&&jw)l=Wo();else return sw(28),-1;return de[u>>2]=l/1e3|0,de[u+4>>2]=l%1e3*1e3*1e3|0,0}function Bw(o,u){return globalThis.DUCKDB_RUNTIME.createDirectory(t,o,u)}function Iw(o,u){return globalThis.DUCKDB_RUNTIME.checkDirectory(t,o,u)}function Sw(o,u){return globalThis.DUCKDB_RUNTIME.listDirectoryEntries(t,o,u)}function Ow(o,u){return globalThis.DUCKDB_RUNTIME.removeDirectory(t,o,u)}function Aw(o){return globalThis.DUCKDB_RUNTIME.closeFile(t,o)}function Dw(o,u){return globalThis.DUCKDB_RUNTIME.checkFile(t,o,u)}function Fw(o){return globalThis.DUCKDB_RUNTIME.getLastFileModificationTime(t,o)}function Rw(o){return globalThis.DUCKDB_RUNTIME.getFileSize(t,o)}function Ew(o,u,l,d){return globalThis.DUCKDB_RUNTIME.moveFile(t,o,u,l,d)}function Cw(o){return globalThis.DUCKDB_RUNTIME.openFile(t,o)}function Uw(o,u,l,d){return globalThis.DUCKDB_RUNTIME.readFile(t,o,u,l,d)}function kw(o,u){return globalThis.DUCKDB_RUNTIME.truncateFile(t,o,u)}function Mw(o,u,l,d){return globalThis.DUCKDB_RUNTIME.writeFile(t,o,u,l,d)}function Pw(o,u){return globalThis.DUCKDB_RUNTIME.glob(t,o,u)}function Vw(o){return globalThis.DUCKDB_RUNTIME.testPlatformFeature(t,o)}function Nw(){return 2147483648}function Lw(o,u,l){Oi.copyWithin(o,u,u+l)}function xw(o){try{return W.grow(o-Ad.byteLength+65535>>>16),Dd(W.buffer),1}catch{}}function qw(o){var u=Oi.length;o=o>>>0;var l=2147483648;if(o>l)return!1;for(var d=1;d<=4;d*=2){var h=u*(1+.2/d);h=Math.min(h,o+100663296);var p=Math.min(l,wv(Math.max(o,h),65536)),y=xw(p);if(y)return!0}return!1}var zo={};function Ww(){return j||"./this.program"}function Cn(){if(!Cn.strings){var o=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",u={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:o,_:Ww()};for(var l in zo)zo[l]===void 0?delete u[l]:u[l]=zo[l];var d=[];for(var l in u)d.push(l+"="+u[l]);Cn.strings=d}return Cn.strings}function zw(o,u){var l=0;return Cn().forEach(function(d,h){var p=u+l;de[o+h*4>>2]=p,vv(d,p),l+=d.length+1}),0}function Yw(o,u){var l=Cn();de[o>>2]=l.length;var d=0;return l.forEach(function(h){d+=h.length+1}),de[u>>2]=d,0}function Hw(o){return 0}function Gw(o,u){var l=o==1||o==2?2:$t();return Gt[u>>0]=l,0}function $w(o,u,l,d,h,p){var y=Ke.getStreamFromFD(o),_=Ke.doReadv(y,u,l,d);return de[p>>2]=_,0}function Jw(o,u,l,d,h,p){var y=Ke.getStreamFromFD(o),_=Ke.doWritev(y,u,l,d);return de[p>>2]=_,0}function Kw(o,u,l,d){var h=Ke.getStreamFromFD(o),p=Ke.doReadv(h,u,l);return de[d>>2]=p,0}function Qw(o,u,l,d,h){}function Zw(o){var u=Ke.getStreamFromFD(o);return u.stream_ops&&u.stream_ops.fsync?-u.stream_ops.fsync(u):0}function Xw(o,u,l,d){for(var h=0,p=0;p<l;p++){for(var y=de[u+p*8>>2],_=de[u+(p*8+4)>>2],b=0;b<_;b++)Ke.printChar(o,Oi[y+b]);h+=_}return de[d>>2]=h,0}function ej(){return pv()}function tj(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var o=new Uint8Array(1);return function(){return crypto.getRandomValues(o),o[0]}}else if($)try{var u=nv();return function(){return u.randomBytes(1)[0]}}catch{}return function(){$t("randomDevice")}}function Ds(o,u){Ds.randomDevice||(Ds.randomDevice=tj());for(var l=0;l<u;l++)Gt[o+l>>0]=Ds.randomDevice();return 0}function rj(o){return o}function ij(o){tt(o)}function Fs(o){return o%4==0&&(o%100!=0||o%400==0)}function Yo(o,u){for(var l=0,d=0;d<=u;l+=o[d++]);return l}var Rs=[31,29,31,30,31,30,31,31,30,31,30,31],Es=[31,28,31,30,31,30,31,31,30,31,30,31];function Cs(o,u){for(var l=new Date(o.getTime());u>0;){var d=Fs(l.getFullYear()),h=l.getMonth(),p=(d?Rs:Es)[h];if(u>p-l.getDate())u-=p-l.getDate()+1,l.setDate(1),h<11?l.setMonth(h+1):(l.setMonth(0),l.setFullYear(l.getFullYear()+1));else return l.setDate(l.getDate()+u),l}return l}function nj(o,u,l,d){var h=de[d+40>>2],p={tm_sec:de[d>>2],tm_min:de[d+4>>2],tm_hour:de[d+8>>2],tm_mday:de[d+12>>2],tm_mon:de[d+16>>2],tm_year:de[d+20>>2],tm_wday:de[d+24>>2],tm_yday:de[d+28>>2],tm_isdst:de[d+32>>2],tm_gmtoff:de[d+36>>2],tm_zone:h?Is(h):""},y=Is(l),_={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var b in _)y=y.replace(new RegExp(b,"g"),_[b]);var g=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],T=["January","February","March","April","May","June","July","August","September","October","November","December"];function B(M,G,Re){for(var be=typeof M=="number"?M.toString():M||"";be.length<G;)be=Re[0]+be;return be}function A(M,G){return B(M,G,"0")}function C(M,G){function Re(lt){return lt<0?-1:lt>0?1:0}var be;return(be=Re(M.getFullYear()-G.getFullYear()))===0&&(be=Re(M.getMonth()-G.getMonth()))===0&&(be=Re(M.getDate()-G.getDate())),be}function N(M){switch(M.getDay()){case 0:return new Date(M.getFullYear()-1,11,29);case 1:return M;case 2:return new Date(M.getFullYear(),0,3);case 3:return new Date(M.getFullYear(),0,2);case 4:return new Date(M.getFullYear(),0,1);case 5:return new Date(M.getFullYear()-1,11,31);case 6:return new Date(M.getFullYear()-1,11,30)}}function ie(M){var G=Cs(new Date(M.tm_year+1900,0,1),M.tm_yday),Re=new Date(G.getFullYear(),0,4),be=new Date(G.getFullYear()+1,0,4),lt=N(Re),Or=N(be);return C(lt,G)<=0?C(Or,G)<=0?G.getFullYear()+1:G.getFullYear():G.getFullYear()-1}var me={"%a":function(M){return g[M.tm_wday].substring(0,3)},"%A":function(M){return g[M.tm_wday]},"%b":function(M){return T[M.tm_mon].substring(0,3)},"%B":function(M){return T[M.tm_mon]},"%C":function(M){var G=M.tm_year+1900;return A(G/100|0,2)},"%d":function(M){return A(M.tm_mday,2)},"%e":function(M){return B(M.tm_mday,2," ")},"%g":function(M){return ie(M).toString().substring(2)},"%G":function(M){return ie(M)},"%H":function(M){return A(M.tm_hour,2)},"%I":function(M){var G=M.tm_hour;return G==0?G=12:G>12&&(G-=12),A(G,2)},"%j":function(M){return A(M.tm_mday+Yo(Fs(M.tm_year+1900)?Rs:Es,M.tm_mon-1),3)},"%m":function(M){return A(M.tm_mon+1,2)},"%M":function(M){return A(M.tm_min,2)},"%n":function(){return`
|
|
18
|
-
`},"%p":function(M){return M.tm_hour>=0&&M.tm_hour<12?"AM":"PM"},"%S":function(M){return A(M.tm_sec,2)},"%t":function(){return" "},"%u":function(M){return M.tm_wday||7},"%U":function(M){var G=new Date(M.tm_year+1900,0,1),Re=G.getDay()===0?G:Cs(G,7-G.getDay()),be=new Date(M.tm_year+1900,M.tm_mon,M.tm_mday);if(C(Re,be)<0){var lt=Yo(Fs(be.getFullYear())?Rs:Es,be.getMonth()-1)-31,Or=31-Re.getDate(),ui=Or+lt+be.getDate();return A(Math.ceil(ui/7),2)}return C(Re,G)===0?"01":"00"},"%V":function(M){var G=new Date(M.tm_year+1900,0,4),Re=new Date(M.tm_year+1901,0,4),be=N(G),lt=N(Re),Or=Cs(new Date(M.tm_year+1900,0,1),M.tm_yday);if(C(Or,be)<0)return"53";if(C(lt,Or)<=0)return"01";var ui;return be.getFullYear()<M.tm_year+1900?ui=M.tm_yday+32-be.getDate():ui=M.tm_yday+1-be.getDate(),A(Math.ceil(ui/7),2)},"%w":function(M){return M.tm_wday},"%W":function(M){var G=new Date(M.tm_year,0,1),Re=G.getDay()===1?G:Cs(G,G.getDay()===0?1:7-G.getDay()+1),be=new Date(M.tm_year+1900,M.tm_mon,M.tm_mday);if(C(Re,be)<0){var lt=Yo(Fs(be.getFullYear())?Rs:Es,be.getMonth()-1)-31,Or=31-Re.getDate(),ui=Or+lt+be.getDate();return A(Math.ceil(ui/7),2)}return C(Re,G)===0?"01":"00"},"%y":function(M){return(M.tm_year+1900).toString().substring(2)},"%Y":function(M){return M.tm_year+1900},"%z":function(M){var G=M.tm_gmtoff,Re=G>=0;return G=Math.abs(G)/60,G=G/60*100+G%60,(Re?"+":"-")+String("0000"+G).slice(-4)},"%Z":function(M){return M.tm_zone},"%%":function(){return"%"}};for(var b in me)y.includes(b)&&(y=y.replace(new RegExp(b,"g"),me[b](p)));var Be=aj(y,!1);return Be.length>u?0:(Od(Be,o),Be.length-1)}function sj(o,u,l,d){return nj(o,u,l,d)}function aj(o,u,l){var d=l>0?l:gv(o)+1,h=new Array(d),p=Sd(o,h,0,h.length);return u&&(h.length=p),h}var oj={i:Yv,A:Gv,G:Jv,b:Qv,n:Zv,J:Xv,ja:ew,j:kd,sa:tw,u:rw,E:iw,c:Kv,ze:nw,ea:aw,Oa:ow,Na:uw,Pa:cw,ma:lw,Ra:dw,Ma:fw,Qa:hw,pa:pw,xe:yw,la:mw,oa:_w,na:bw,wa:gw,va:vw,fa:ww,ka:Tw,Ea:Bw,Fa:Iw,Ca:Sw,Da:Ow,Wa:Aw,Aa:Dw,Ha:Fw,Ja:Rw,Ba:Ew,Ka:Cw,da:Uw,Ga:kw,Ia:Mw,za:Pw,ve:Vw,xb:Nw,Xa:Lw,Pc:qw,Ta:zw,Ua:Yw,Y:Hw,Va:Gw,je:$w,qb:Jw,ra:Kw,qe:Qw,ye:Zw,ga:Xw,a:ej,La:Ds,Z:kT,K:hT,R:Zj,bd:nB,_:UT,M:CT,ta:Qj,cd:iB,t:rT,U:LT,xa:mT,W:bT,V:NT,ya:yT,e:zj,$:RT,B:gT,hc:KB,d:Yj,ca:TT,ua:MT,h:Gj,fc:ZB,l:Kj,qa:dT,o:$j,z:aT,w:iT,Q:_T,x:nT,v:oT,p:DT,L:BT,I:IT,Ac:EB,Hc:IB,Kc:jB,Rc:mB,Bc:RB,gc:QB,ad:sB,Ic:BB,Sc:yB,oe:HT,Hd:S0,cc:tI,ne:GT,pc:WB,Pb:mI,Za:nS,Ya:sS,Ud:h0,Gd:O0,zb:EI,Xb:uI,Td:p0,jd:K0,qc:qB,ec:XB,be:n0,Ld:j0,fd:eB,dc:eI,Vb:lI,bc:rI,mb:WI,Md:w0,ge:XT,Jd:B0,Ob:_I,hb:$I,_a:iS,Fb:SI,me:$T,Zb:aI,eb:QI,wb:UI,Cd:R0,ib:GI,Eb:OI,Kd:T0,_b:sI,Nb:bI,ac:iI,$b:nI,Gc:SB,Oc:bB,yc:UB,$d:a0,Xd:l0,Tc:pB,Wd:d0,ke:KT,Xc:lB,Wc:dB,se:WT,re:zT,Fd:A0,ue:xT,md:G0,Vc:fB,Cc:FB,kd:J0,_c:oB,mc:HB,vb:kI,gd:X0,$c:aB,lc:GB,id:Q0,Zc:uB,Bb:FI,Qb:yI,xc:kB,Sb:hI,ed:tB,vd:V0,ud:N0,sd:x0,td:L0,vc:PB,Cb:DI,Jb:jI,$a:rS,Mc:vB,ob:xI,Hb:BI,Yc:cB,tc:NB,s:qj,k:Hj,C:jT,aa:OT,sb:VI,D:wT,ba:ST,tb:PI,f:Wj,T:eT,O:vT,kc:Xj,g:tT,m:Jj,Ae:PT,q:pT,r:lT,ha:ET,y:sT,P:fT,N:FT,S:uT,we:VT,ia:AT,X:cT,ld:$0,rb:NI,Dc:DB,zc:CB,Rd:m0,Qc:_B,ic:JB,lb:zI,Id:I0,hd:Z0,yb:CI,fb:KI,Ec:AB,Fc:OB,uc:VB,Sd:y0,nc:YB,jc:$B,wd:P0,de:r0,Uc:hB,dd:rB,Wb:cI,pd:z0,Nd:v0,Od:g0,jb:HI,_d:o0,Pd:b0,oc:zB,nd:H0,Ad:C0,ce:i0,gb:JI,ie:QT,le:JT,pe:YT,zd:U0,Ab:RI,Qd:_0,rd:q0,qd:W0,Kb:wI,kb:YI,Rb:pI,Bd:E0,ab:tS,od:Y0,nb:qI,te:qT,fe:e0,Lb:vI,xd:M0,Zd:u0,Jc:TB,ee:t0,Yd:c0,Mb:gI,Ed:D0,Dd:F0,Ib:TI,ub:MI,Gb:II,Nc:gB,ae:s0,db:ZI,yd:k0,pb:LI,Vd:f0,rc:xB,bb:eS,cb:XI,Lc:wB,he:ZT,Ub:dI,sc:LB,wc:MB,Db:AI,Yb:oI,Tb:fI,H:rj,F:ij,Sa:sj},pC=Wv(),uj=t.___wasm_call_ctors=function(){return(uj=t.___wasm_call_ctors=t.asm.Ce).apply(null,arguments)},cj=t._main=function(){return(cj=t._main=t.asm.De).apply(null,arguments)},lj=t._duckdb_web_fs_glob_add_path=function(){return(lj=t._duckdb_web_fs_glob_add_path=t.asm.Fe).apply(null,arguments)},dj=t._duckdb_web_clear_response=function(){return(dj=t._duckdb_web_clear_response=t.asm.Ge).apply(null,arguments)},fj=t._duckdb_web_fail_with=function(){return(fj=t._duckdb_web_fail_with=t.asm.He).apply(null,arguments)},hj=t._duckdb_web_reset=function(){return(hj=t._duckdb_web_reset=t.asm.Ie).apply(null,arguments)},pj=t._duckdb_web_connect=function(){return(pj=t._duckdb_web_connect=t.asm.Je).apply(null,arguments)},yj=t._duckdb_web_disconnect=function(){return(yj=t._duckdb_web_disconnect=t.asm.Ke).apply(null,arguments)},mj=t._duckdb_web_flush_files=function(){return(mj=t._duckdb_web_flush_files=t.asm.Le).apply(null,arguments)},_j=t._duckdb_web_flush_file=function(){return(_j=t._duckdb_web_flush_file=t.asm.Me).apply(null,arguments)},bj=t._duckdb_web_open=function(){return(bj=t._duckdb_web_open=t.asm.Ne).apply(null,arguments)},gj=t._duckdb_web_collect_file_stats=function(){return(gj=t._duckdb_web_collect_file_stats=t.asm.Oe).apply(null,arguments)},vj=t._duckdb_web_export_file_stats=function(){return(vj=t._duckdb_web_export_file_stats=t.asm.Pe).apply(null,arguments)},wj=t._duckdb_web_fs_drop_file=function(){return(wj=t._duckdb_web_fs_drop_file=t.asm.Qe).apply(null,arguments)},jj=t._duckdb_web_fs_drop_files=function(){return(jj=t._duckdb_web_fs_drop_files=t.asm.Re).apply(null,arguments)},Tj=t._duckdb_web_fs_get_file_info=function(){return(Tj=t._duckdb_web_fs_get_file_info=t.asm.Se).apply(null,arguments)},Bj=t._duckdb_web_fs_set_file_descriptor=function(){return(Bj=t._duckdb_web_fs_set_file_descriptor=t.asm.Te).apply(null,arguments)},Ij=t._duckdb_web_fs_register_file_url=function(){return(Ij=t._duckdb_web_fs_register_file_url=t.asm.Ue).apply(null,arguments)},Sj=t._duckdb_web_fs_register_file_buffer=function(){return(Sj=t._duckdb_web_fs_register_file_buffer=t.asm.Ve).apply(null,arguments)},Oj=t._duckdb_web_copy_file_to_buffer=function(){return(Oj=t._duckdb_web_copy_file_to_buffer=t.asm.We).apply(null,arguments)},Aj=t._duckdb_web_copy_file_to_path=function(){return(Aj=t._duckdb_web_copy_file_to_path=t.asm.Xe).apply(null,arguments)},Dj=t._duckdb_web_get_version=function(){return(Dj=t._duckdb_web_get_version=t.asm.Ye).apply(null,arguments)},Fj=t._duckdb_web_get_feature_flags=function(){return(Fj=t._duckdb_web_get_feature_flags=t.asm.Ze).apply(null,arguments)},Rj=t._duckdb_web_tokenize=function(){return(Rj=t._duckdb_web_tokenize=t.asm._e).apply(null,arguments)},Ej=t._duckdb_web_prepared_create=function(){return(Ej=t._duckdb_web_prepared_create=t.asm.$e).apply(null,arguments)},Cj=t._duckdb_web_prepared_close=function(){return(Cj=t._duckdb_web_prepared_close=t.asm.af).apply(null,arguments)},Uj=t._duckdb_web_prepared_run=function(){return(Uj=t._duckdb_web_prepared_run=t.asm.bf).apply(null,arguments)},kj=t._duckdb_web_prepared_send=function(){return(kj=t._duckdb_web_prepared_send=t.asm.cf).apply(null,arguments)},Mj=t._duckdb_web_query_run=function(){return(Mj=t._duckdb_web_query_run=t.asm.df).apply(null,arguments)},Pj=t._duckdb_web_query_send=function(){return(Pj=t._duckdb_web_query_send=t.asm.ef).apply(null,arguments)},Vj=t._duckdb_web_query_fetch_results=function(){return(Vj=t._duckdb_web_query_fetch_results=t.asm.ff).apply(null,arguments)},Nj=t._duckdb_web_insert_arrow_from_ipc_stream=function(){return(Nj=t._duckdb_web_insert_arrow_from_ipc_stream=t.asm.gf).apply(null,arguments)},Lj=t._duckdb_web_insert_csv_from_path=function(){return(Lj=t._duckdb_web_insert_csv_from_path=t.asm.hf).apply(null,arguments)},xj=t._duckdb_web_insert_json_from_path=function(){return(xj=t._duckdb_web_insert_json_from_path=t.asm.jf).apply(null,arguments)},Md=t.___errno_location=function(){return(Md=t.___errno_location=t.asm.kf).apply(null,arguments)},I=t.stackSave=function(){return(I=t.stackSave=t.asm.lf).apply(null,arguments)},S=t.stackRestore=function(){return(S=t.stackRestore=t.asm.mf).apply(null,arguments)},Ho=t.stackAlloc=function(){return(Ho=t.stackAlloc=t.asm.nf).apply(null,arguments)},O=t._setThrew=function(){return(O=t._setThrew=t.asm.of).apply(null,arguments)},Un=t.___cxa_can_catch=function(){return(Un=t.___cxa_can_catch=t.asm.pf).apply(null,arguments)},Pd=t.___cxa_is_pointer_type=function(){return(Pd=t.___cxa_is_pointer_type=t.asm.qf).apply(null,arguments)},Go=t._malloc=function(){return(Go=t._malloc=t.asm.rf).apply(null,arguments)},$o=t._free=function(){return($o=t._free=t.asm.sf).apply(null,arguments)},Vd=t.dynCall_jiji=function(){return(Vd=t.dynCall_jiji=t.asm.tf).apply(null,arguments)},Nd=t.dynCall_jiiii=function(){return(Nd=t.dynCall_jiiii=t.asm.uf).apply(null,arguments)},Ld=t.dynCall_iiiiij=function(){return(Ld=t.dynCall_iiiiij=t.asm.vf).apply(null,arguments)},xd=t.dynCall_iiiiijj=function(){return(xd=t.dynCall_iiiiijj=t.asm.wf).apply(null,arguments)},qd=t.dynCall_viijii=function(){return(qd=t.dynCall_viijii=t.asm.xf).apply(null,arguments)},Wd=t.dynCall_j=function(){return(Wd=t.dynCall_j=t.asm.yf).apply(null,arguments)},zd=t.dynCall_ji=function(){return(zd=t.dynCall_ji=t.asm.zf).apply(null,arguments)},Yd=t.dynCall_iij=function(){return(Yd=t.dynCall_iij=t.asm.Af).apply(null,arguments)},Hd=t.dynCall_viij=function(){return(Hd=t.dynCall_viij=t.asm.Bf).apply(null,arguments)},Gd=t.dynCall_viijji=function(){return(Gd=t.dynCall_viijji=t.asm.Cf).apply(null,arguments)},$d=t.dynCall_viijj=function(){return($d=t.dynCall_viijj=t.asm.Df).apply(null,arguments)},Jd=t.dynCall_viiijj=function(){return(Jd=t.dynCall_viiijj=t.asm.Ef).apply(null,arguments)},Kd=t.dynCall_viiji=function(){return(Kd=t.dynCall_viiji=t.asm.Ff).apply(null,arguments)},Qd=t.dynCall_vijjj=function(){return(Qd=t.dynCall_vijjj=t.asm.Gf).apply(null,arguments)},Zd=t.dynCall_iiijj=function(){return(Zd=t.dynCall_iiijj=t.asm.Hf).apply(null,arguments)},Xd=t.dynCall_viiij=function(){return(Xd=t.dynCall_viiij=t.asm.If).apply(null,arguments)},ef=t.dynCall_viijij=function(){return(ef=t.dynCall_viijij=t.asm.Jf).apply(null,arguments)},tf=t.dynCall_viiijjj=function(){return(tf=t.dynCall_viiijjj=t.asm.Kf).apply(null,arguments)},rf=t.dynCall_iiij=function(){return(rf=t.dynCall_iiij=t.asm.Lf).apply(null,arguments)},nf=t.dynCall_vijijj=function(){return(nf=t.dynCall_vijijj=t.asm.Mf).apply(null,arguments)},sf=t.dynCall_iji=function(){return(sf=t.dynCall_iji=t.asm.Nf).apply(null,arguments)},af=t.dynCall_vij=function(){return(af=t.dynCall_vij=t.asm.Of).apply(null,arguments)},of=t.dynCall_jii=function(){return(of=t.dynCall_jii=t.asm.Pf).apply(null,arguments)},uf=t.dynCall_vijj=function(){return(uf=t.dynCall_vijj=t.asm.Qf).apply(null,arguments)},cf=t.dynCall_viji=function(){return(cf=t.dynCall_viji=t.asm.Rf).apply(null,arguments)},lf=t.dynCall_iiiijj=function(){return(lf=t.dynCall_iiiijj=t.asm.Sf).apply(null,arguments)},df=t.dynCall_viijiiiii=function(){return(df=t.dynCall_viijiiiii=t.asm.Tf).apply(null,arguments)},ff=t.dynCall_viiiiijiiii=function(){return(ff=t.dynCall_viiiiijiiii=t.asm.Uf).apply(null,arguments)},hf=t.dynCall_viiiijj=function(){return(hf=t.dynCall_viiiijj=t.asm.Vf).apply(null,arguments)},pf=t.dynCall_viiiij=function(){return(pf=t.dynCall_viiiij=t.asm.Wf).apply(null,arguments)},yf=t.dynCall_iiiij=function(){return(yf=t.dynCall_iiiij=t.asm.Xf).apply(null,arguments)},mf=t.dynCall_iiiiiji=function(){return(mf=t.dynCall_iiiiiji=t.asm.Yf).apply(null,arguments)},_f=t.dynCall_iiiji=function(){return(_f=t.dynCall_iiiji=t.asm.Zf).apply(null,arguments)},bf=t.dynCall_iiiiji=function(){return(bf=t.dynCall_iiiiji=t.asm._f).apply(null,arguments)},gf=t.dynCall_jiii=function(){return(gf=t.dynCall_jiii=t.asm.$f).apply(null,arguments)},vf=t.dynCall_jij=function(){return(vf=t.dynCall_jij=t.asm.ag).apply(null,arguments)},wf=t.dynCall_jiijiiiii=function(){return(wf=t.dynCall_jiijiiiii=t.asm.bg).apply(null,arguments)},jf=t.dynCall_jiijiijiii=function(){return(jf=t.dynCall_jiijiijiii=t.asm.cg).apply(null,arguments)},Tf=t.dynCall_jiijjiii=function(){return(Tf=t.dynCall_jiijjiii=t.asm.dg).apply(null,arguments)},Bf=t.dynCall_jiijijii=function(){return(Bf=t.dynCall_jiijijii=t.asm.eg).apply(null,arguments)},If=t.dynCall_viiijjij=function(){return(If=t.dynCall_viiijjij=t.asm.fg).apply(null,arguments)},Sf=t.dynCall_viijiii=function(){return(Sf=t.dynCall_viijiii=t.asm.gg).apply(null,arguments)},Of=t.dynCall_vijijjiij=function(){return(Of=t.dynCall_vijijjiij=t.asm.hg).apply(null,arguments)},Af=t.dynCall_viijjij=function(){return(Af=t.dynCall_viijjij=t.asm.ig).apply(null,arguments)},Df=t.dynCall_viiijjiij=function(){return(Df=t.dynCall_viiijjiij=t.asm.jg).apply(null,arguments)},Ff=t.dynCall_viiiijjjj=function(){return(Ff=t.dynCall_viiiijjjj=t.asm.kg).apply(null,arguments)},Rf=t.dynCall_viijiiiiij=function(){return(Rf=t.dynCall_viijiiiiij=t.asm.lg).apply(null,arguments)},Ef=t.dynCall_viijiiiijj=function(){return(Ef=t.dynCall_viijiiiijj=t.asm.mg).apply(null,arguments)},Cf=t.dynCall_viiijiiiijjj=function(){return(Cf=t.dynCall_viiijiiiijjj=t.asm.ng).apply(null,arguments)},Uf=t.dynCall_viijijiiiijjj=function(){return(Uf=t.dynCall_viijijiiiijjj=t.asm.og).apply(null,arguments)},kf=t.dynCall_jiiijii=function(){return(kf=t.dynCall_jiiijii=t.asm.pg).apply(null,arguments)},Mf=t.dynCall_iiijii=function(){return(Mf=t.dynCall_iiijii=t.asm.qg).apply(null,arguments)},Pf=t.dynCall_jiijii=function(){return(Pf=t.dynCall_jiijii=t.asm.rg).apply(null,arguments)},Vf=t.dynCall_viiijii=function(){return(Vf=t.dynCall_viiijii=t.asm.sg).apply(null,arguments)},Nf=t.dynCall_fiijii=function(){return(Nf=t.dynCall_fiijii=t.asm.tg).apply(null,arguments)},Lf=t.dynCall_diijii=function(){return(Lf=t.dynCall_diijii=t.asm.ug).apply(null,arguments)},xf=t.dynCall_iiiiiiijii=function(){return(xf=t.dynCall_iiiiiiijii=t.asm.vg).apply(null,arguments)},qf=t.dynCall_viiiiji=function(){return(qf=t.dynCall_viiiiji=t.asm.wg).apply(null,arguments)},Wf=t.dynCall_jiiiijii=function(){return(Wf=t.dynCall_jiiiijii=t.asm.xg).apply(null,arguments)},zf=t.dynCall_jiiiijiiiiiiii=function(){return(zf=t.dynCall_jiiiijiiiiiiii=t.asm.yg).apply(null,arguments)},Yf=t.dynCall_jiiiiijiiii=function(){return(Yf=t.dynCall_jiiiiijiiii=t.asm.zg).apply(null,arguments)},Hf=t.dynCall_jiiijiii=function(){return(Hf=t.dynCall_jiiijiii=t.asm.Ag).apply(null,arguments)},Gf=t.dynCall_jj=function(){return(Gf=t.dynCall_jj=t.asm.Bg).apply(null,arguments)},$f=t.dynCall_jd=function(){return($f=t.dynCall_jd=t.asm.Cg).apply(null,arguments)},Jf=t.dynCall_jf=function(){return(Jf=t.dynCall_jf=t.asm.Dg).apply(null,arguments)},Kf=t.dynCall_iijjjj=function(){return(Kf=t.dynCall_iijjjj=t.asm.Eg).apply(null,arguments)},Qf=t.dynCall_iiijji=function(){return(Qf=t.dynCall_iiijji=t.asm.Fg).apply(null,arguments)},Zf=t.dynCall_vijijiiiijjj=function(){return(Zf=t.dynCall_vijijiiiijjj=t.asm.Gg).apply(null,arguments)},Xf=t.dynCall_viiiiiij=function(){return(Xf=t.dynCall_viiiiiij=t.asm.Hg).apply(null,arguments)},eh=t.dynCall_iiiiiiji=function(){return(eh=t.dynCall_iiiiiiji=t.asm.Ig).apply(null,arguments)},th=t.dynCall_iiiiiiiiji=function(){return(th=t.dynCall_iiiiiiiiji=t.asm.Jg).apply(null,arguments)},rh=t.dynCall_viiiiijj=function(){return(rh=t.dynCall_viiiiijj=t.asm.Kg).apply(null,arguments)},ih=t.dynCall_vijiii=function(){return(ih=t.dynCall_vijiii=t.asm.Lg).apply(null,arguments)},nh=t.dynCall_jijijjij=function(){return(nh=t.dynCall_jijijjij=t.asm.Mg).apply(null,arguments)},sh=t.dynCall_vijjij=function(){return(sh=t.dynCall_vijjij=t.asm.Ng).apply(null,arguments)},ah=t.dynCall_viijjj=function(){return(ah=t.dynCall_viijjj=t.asm.Og).apply(null,arguments)},oh=t.dynCall_viijjji=function(){return(oh=t.dynCall_viijjji=t.asm.Pg).apply(null,arguments)},uh=t.dynCall_iijjijj=function(){return(uh=t.dynCall_iijjijj=t.asm.Qg).apply(null,arguments)},ch=t.dynCall_viiiijiiiii=function(){return(ch=t.dynCall_viiiijiiiii=t.asm.Rg).apply(null,arguments)},lh=t.dynCall_viiiijiiii=function(){return(lh=t.dynCall_viiiijiiii=t.asm.Sg).apply(null,arguments)},dh=t.dynCall_iiiiiij=function(){return(dh=t.dynCall_iiiiiij=t.asm.Tg).apply(null,arguments)},fh=t.dynCall_iiiiiiiiiiji=function(){return(fh=t.dynCall_iiiiiiiiiiji=t.asm.Ug).apply(null,arguments)},hh=t.dynCall_viiiiiji=function(){return(hh=t.dynCall_viiiiiji=t.asm.Vg).apply(null,arguments)},ph=t.dynCall_jiiiiiii=function(){return(ph=t.dynCall_jiiiiiii=t.asm.Wg).apply(null,arguments)},yh=t.dynCall_viiiji=function(){return(yh=t.dynCall_viiiji=t.asm.Xg).apply(null,arguments)},mh=t.dynCall_jijj=function(){return(mh=t.dynCall_jijj=t.asm.Yg).apply(null,arguments)},_h=t.dynCall_viiiijiiiiiiii=function(){return(_h=t.dynCall_viiiijiiiiiiii=t.asm.Zg).apply(null,arguments)},bh=t.dynCall_ij=function(){return(bh=t.dynCall_ij=t.asm._g).apply(null,arguments)},gh=t.dynCall_jjj=function(){return(gh=t.dynCall_jjj=t.asm.$g).apply(null,arguments)},vh=t.dynCall_vjii=function(){return(vh=t.dynCall_vjii=t.asm.ah).apply(null,arguments)},wh=t.dynCall_vjiiii=function(){return(wh=t.dynCall_vjiiii=t.asm.bh).apply(null,arguments)},jh=t.dynCall_viiiiijiii=function(){return(jh=t.dynCall_viiiiijiii=t.asm.ch).apply(null,arguments)},Th=t.dynCall_vijji=function(){return(Th=t.dynCall_vijji=t.asm.dh).apply(null,arguments)},Bh=t.dynCall_jiij=function(){return(Bh=t.dynCall_jiij=t.asm.eh).apply(null,arguments)},Ih=t.dynCall_iiiijjii=function(){return(Ih=t.dynCall_iiiijjii=t.asm.fh).apply(null,arguments)},Sh=t.dynCall_iiiiijji=function(){return(Sh=t.dynCall_iiiiijji=t.asm.gh).apply(null,arguments)},Oh=t.dynCall_viiijjii=function(){return(Oh=t.dynCall_viiijjii=t.asm.hh).apply(null,arguments)},Ah=t.dynCall_viiiijji=function(){return(Ah=t.dynCall_viiiijji=t.asm.ih).apply(null,arguments)},Dh=t.dynCall_viiiijjii=function(){return(Dh=t.dynCall_viiiijjii=t.asm.jh).apply(null,arguments)},Fh=t.dynCall_viiiiijji=function(){return(Fh=t.dynCall_viiiiijji=t.asm.kh).apply(null,arguments)},Rh=t.dynCall_jiiiij=function(){return(Rh=t.dynCall_jiiiij=t.asm.lh).apply(null,arguments)},Eh=t.dynCall_iidj=function(){return(Eh=t.dynCall_iidj=t.asm.mh).apply(null,arguments)},Ch=t.dynCall_ijji=function(){return(Ch=t.dynCall_ijji=t.asm.nh).apply(null,arguments)},Uh=t.dynCall_iiiiiiiij=function(){return(Uh=t.dynCall_iiiiiiiij=t.asm.oh).apply(null,arguments)},kh=t.dynCall_iiiiiiij=function(){return(kh=t.dynCall_iiiiiiij=t.asm.ph).apply(null,arguments)},Mh=t.dynCall_iiiiiiiiiiiij=function(){return(Mh=t.dynCall_iiiiiiiiiiiij=t.asm.qh).apply(null,arguments)},Ph=t.dynCall_iiiiiiiji=function(){return(Ph=t.dynCall_iiiiiiiji=t.asm.rh).apply(null,arguments)},Vh=t.dynCall_iiiidjj=function(){return(Vh=t.dynCall_iiiidjj=t.asm.sh).apply(null,arguments)},Nh=t.dynCall_iiiijjj=function(){return(Nh=t.dynCall_iiiijjj=t.asm.th).apply(null,arguments)},Lh=t.dynCall_jiiiii=function(){return(Lh=t.dynCall_jiiiii=t.asm.uh).apply(null,arguments)},xh=t.dynCall_jiiiiiijii=function(){return(xh=t.dynCall_jiiiiiijii=t.asm.vh).apply(null,arguments)},qh=t.dynCall_iiiijji=function(){return(qh=t.dynCall_iiiijji=t.asm.wh).apply(null,arguments)},Wh=t.dynCall_viiijji=function(){return(Wh=t.dynCall_viiijji=t.asm.xh).apply(null,arguments)},zh=t.dynCall_jiiiiii=function(){return(zh=t.dynCall_jiiiiii=t.asm.yh).apply(null,arguments)},Yh=t.dynCall_iiijiii=function(){return(Yh=t.dynCall_iiijiii=t.asm.zh).apply(null,arguments)},Hh=t.dynCall_iiiiijii=function(){return(Hh=t.dynCall_iiiiijii=t.asm.Ah).apply(null,arguments)},Gh=t.dynCall_iiijiij=function(){return(Gh=t.dynCall_iiijiij=t.asm.Bh).apply(null,arguments)},$h=t.dynCall_iijjiii=function(){return($h=t.dynCall_iijjiii=t.asm.Ch).apply(null,arguments)},Jh=t.dynCall_iijjiiii=function(){return(Jh=t.dynCall_iijjiiii=t.asm.Dh).apply(null,arguments)},Kh=t.dynCall_iiji=function(){return(Kh=t.dynCall_iiji=t.asm.Eh).apply(null,arguments)},Qh=t.dynCall_iijji=function(){return(Qh=t.dynCall_iijji=t.asm.Fh).apply(null,arguments)},Zh=t.dynCall_vijiiii=function(){return(Zh=t.dynCall_vijiiii=t.asm.Gh).apply(null,arguments)},Xh=t.dynCall_iijiiii=function(){return(Xh=t.dynCall_iijiiii=t.asm.Hh).apply(null,arguments)},ep=t.dynCall_vjjii=function(){return(ep=t.dynCall_vjjii=t.asm.Ih).apply(null,arguments)},tp=t.dynCall_iiiijiii=function(){return(tp=t.dynCall_iiiijiii=t.asm.Jh).apply(null,arguments)},rp=t.dynCall_iiijij=function(){return(rp=t.dynCall_iiijij=t.asm.Kh).apply(null,arguments)},ip=t.dynCall_iijj=function(){return(ip=t.dynCall_iijj=t.asm.Lh).apply(null,arguments)},np=t.dynCall_viiijiii=function(){return(np=t.dynCall_viiijiii=t.asm.Mh).apply(null,arguments)},sp=t.dynCall_iiijiiii=function(){return(sp=t.dynCall_iiijiiii=t.asm.Nh).apply(null,arguments)},ap=t.dynCall_jiiij=function(){return(ap=t.dynCall_jiiij=t.asm.Oh).apply(null,arguments)},op=t.dynCall_iiiiijjiijj=function(){return(op=t.dynCall_iiiiijjiijj=t.asm.Ph).apply(null,arguments)},up=t.dynCall_viijiijji=function(){return(up=t.dynCall_viijiijji=t.asm.Qh).apply(null,arguments)},cp=t.dynCall_vjjijij=function(){return(cp=t.dynCall_vjjijij=t.asm.Rh).apply(null,arguments)},lp=t.dynCall_vijjji=function(){return(lp=t.dynCall_vijjji=t.asm.Sh).apply(null,arguments)},dp=t.dynCall_jiiijji=function(){return(dp=t.dynCall_jiiijji=t.asm.Th).apply(null,arguments)},fp=t.dynCall_iiijjii=function(){return(fp=t.dynCall_iiijjii=t.asm.Uh).apply(null,arguments)},hp=t.dynCall_iijjii=function(){return(hp=t.dynCall_iijjii=t.asm.Vh).apply(null,arguments)},pp=t.dynCall_vijii=function(){return(pp=t.dynCall_vijii=t.asm.Wh).apply(null,arguments)},yp=t.dynCall_viijjii=function(){return(yp=t.dynCall_viijjii=t.asm.Xh).apply(null,arguments)},mp=t.dynCall_jijjij=function(){return(mp=t.dynCall_jijjij=t.asm.Yh).apply(null,arguments)},_p=t.dynCall_jijiii=function(){return(_p=t.dynCall_jijiii=t.asm.Zh).apply(null,arguments)},bp=t.dynCall_viijiiij=function(){return(bp=t.dynCall_viijiiij=t.asm._h).apply(null,arguments)},gp=t.dynCall_vijiiiji=function(){return(gp=t.dynCall_vijiiiji=t.asm.$h).apply(null,arguments)},vp=t.dynCall_jiiji=function(){return(vp=t.dynCall_jiiji=t.asm.ai).apply(null,arguments)},wp=t.dynCall_viiijij=function(){return(wp=t.dynCall_viiijij=t.asm.bi).apply(null,arguments)},jp=t.dynCall_viijiijj=function(){return(jp=t.dynCall_viijiijj=t.asm.ci).apply(null,arguments)},Tp=t.dynCall_vijij=function(){return(Tp=t.dynCall_vijij=t.asm.di).apply(null,arguments)},Bp=t.dynCall_iiijjjj=function(){return(Bp=t.dynCall_iiijjjj=t.asm.ei).apply(null,arguments)},Ip=t.dynCall_iijiji=function(){return(Ip=t.dynCall_iijiji=t.asm.fi).apply(null,arguments)},Sp=t.dynCall_viiijijiji=function(){return(Sp=t.dynCall_viiijijiji=t.asm.gi).apply(null,arguments)},Op=t.dynCall_vjiiiji=function(){return(Op=t.dynCall_vjiiiji=t.asm.hi).apply(null,arguments)},Ap=t.dynCall_jiiijj=function(){return(Ap=t.dynCall_jiiijj=t.asm.ii).apply(null,arguments)},Dp=t.dynCall_viijiiii=function(){return(Dp=t.dynCall_viijiiii=t.asm.ji).apply(null,arguments)},Fp=t.dynCall_iiiijii=function(){return(Fp=t.dynCall_iiiijii=t.asm.ki).apply(null,arguments)},Rp=t.dynCall_viiiijii=function(){return(Rp=t.dynCall_viiiijii=t.asm.li).apply(null,arguments)},Ep=t.dynCall_iijiii=function(){return(Ep=t.dynCall_iijiii=t.asm.mi).apply(null,arguments)},Cp=t.dynCall_jiiiiji=function(){return(Cp=t.dynCall_jiiiiji=t.asm.ni).apply(null,arguments)},Up=t.dynCall_vijiijj=function(){return(Up=t.dynCall_vijiijj=t.asm.oi).apply(null,arguments)},kp=t.dynCall_vifiijj=function(){return(kp=t.dynCall_vifiijj=t.asm.pi).apply(null,arguments)},Mp=t.dynCall_vidiijj=function(){return(Mp=t.dynCall_vidiijj=t.asm.qi).apply(null,arguments)},Pp=t.dynCall_viiiiij=function(){return(Pp=t.dynCall_viiiiij=t.asm.ri).apply(null,arguments)},Vp=t.dynCall_ijj=function(){return(Vp=t.dynCall_ijj=t.asm.si).apply(null,arguments)},Np=t.dynCall_ijjiii=function(){return(Np=t.dynCall_ijjiii=t.asm.ti).apply(null,arguments)},Lp=t.dynCall_vijijjji=function(){return(Lp=t.dynCall_vijijjji=t.asm.ui).apply(null,arguments)},xp=t.dynCall_viiiiijjji=function(){return(xp=t.dynCall_viiiiijjji=t.asm.vi).apply(null,arguments)},qp=t.dynCall_viijijj=function(){return(qp=t.dynCall_viijijj=t.asm.wi).apply(null,arguments)},Wp=t.dynCall_iiijiijj=function(){return(Wp=t.dynCall_iiijiijj=t.asm.xi).apply(null,arguments)},zp=t.dynCall_viiijijjj=function(){return(zp=t.dynCall_viiijijjj=t.asm.yi).apply(null,arguments)},Yp=t.dynCall_iijiijj=function(){return(Yp=t.dynCall_iijiijj=t.asm.zi).apply(null,arguments)},Hp=t.dynCall_viiijjjji=function(){return(Hp=t.dynCall_viiijjjji=t.asm.Ai).apply(null,arguments)},Gp=t.dynCall_viiiijiii=function(){return(Gp=t.dynCall_viiiijiii=t.asm.Bi).apply(null,arguments)},$p=t.dynCall_iijii=function(){return($p=t.dynCall_iijii=t.asm.Ci).apply(null,arguments)},Jp=t.dynCall_vijjiiii=function(){return(Jp=t.dynCall_vijjiiii=t.asm.Di).apply(null,arguments)},Kp=t.dynCall_vijijjiiiii=function(){return(Kp=t.dynCall_vijijjiiiii=t.asm.Ei).apply(null,arguments)},Qp=t.dynCall_vijjiiiii=function(){return(Qp=t.dynCall_vijjiiiii=t.asm.Fi).apply(null,arguments)},Zp=t.dynCall_iiijjji=function(){return(Zp=t.dynCall_iiijjji=t.asm.Gi).apply(null,arguments)},Xp=t.dynCall_iiiiijjj=function(){return(Xp=t.dynCall_iiiiijjj=t.asm.Hi).apply(null,arguments)},ey=t.dynCall_jijiiii=function(){return(ey=t.dynCall_jijiiii=t.asm.Ii).apply(null,arguments)},ty=t.dynCall_iiijjjii=function(){return(ty=t.dynCall_iiijjjii=t.asm.Ji).apply(null,arguments)},ry=t.dynCall_iiiiijjji=function(){return(ry=t.dynCall_iiiiijjji=t.asm.Ki).apply(null,arguments)},iy=t.dynCall_viijiji=function(){return(iy=t.dynCall_viijiji=t.asm.Li).apply(null,arguments)};function qj(o){var u=I();try{H.get(o)()}catch(l){if(S(u),l!==l+0&&l!=="longjmp")throw l;O(1,0)}}function Wj(o,u,l){var d=I();try{H.get(o)(u,l)}catch(h){if(S(d),h!==h+0&&h!=="longjmp")throw h;O(1,0)}}function zj(o,u){var l=I();try{return H.get(o)(u)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;O(1,0)}}function Yj(o,u,l){var d=I();try{return H.get(o)(u,l)}catch(h){if(S(d),h!==h+0&&h!=="longjmp")throw h;O(1,0)}}function Hj(o,u){var l=I();try{H.get(o)(u)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;O(1,0)}}function Gj(o,u,l,d){var h=I();try{return H.get(o)(u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;O(1,0)}}function $j(o,u,l,d,h,p){var y=I();try{return H.get(o)(u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;O(1,0)}}function Jj(o,u,l,d,h){var p=I();try{H.get(o)(u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;O(1,0)}}function Kj(o,u,l,d,h){var p=I();try{return H.get(o)(u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;O(1,0)}}function Qj(o,u,l,d){var h=I();try{return H.get(o)(u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;O(1,0)}}function Zj(o,u,l,d){var h=I();try{return H.get(o)(u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;O(1,0)}}function Xj(o,u,l,d){var h=I();try{H.get(o)(u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;O(1,0)}}function eT(o,u,l,d){var h=I();try{H.get(o)(u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;O(1,0)}}function tT(o,u,l,d){var h=I();try{H.get(o)(u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;O(1,0)}}function rT(o){var u=I();try{return H.get(o)()}catch(l){if(S(u),l!==l+0&&l!=="longjmp")throw l;O(1,0)}}function iT(o,u,l,d,h,p,y,_){var b=I();try{return H.get(o)(u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;O(1,0)}}function nT(o,u,l,d,h,p,y,_,b,g,T){var B=I();try{return H.get(o)(u,l,d,h,p,y,_,b,g,T)}catch(A){if(S(B),A!==A+0&&A!=="longjmp")throw A;O(1,0)}}function sT(o,u,l,d,h,p,y,_){var b=I();try{H.get(o)(u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;O(1,0)}}function aT(o,u,l,d,h,p,y){var _=I();try{return H.get(o)(u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;O(1,0)}}function oT(o,u,l,d,h,p,y,_,b,g,T,B){var A=I();try{return H.get(o)(u,l,d,h,p,y,_,b,g,T,B)}catch(C){if(S(A),C!==C+0&&C!=="longjmp")throw C;O(1,0)}}function uT(o,u,l,d,h,p,y,_,b,g,T){var B=I();try{H.get(o)(u,l,d,h,p,y,_,b,g,T)}catch(A){if(S(B),A!==A+0&&A!=="longjmp")throw A;O(1,0)}}function cT(o,u,l,d,h,p,y,_,b,g,T,B,A,C,N,ie){var me=I();try{H.get(o)(u,l,d,h,p,y,_,b,g,T,B,A,C,N,ie)}catch(Be){if(S(me),Be!==Be+0&&Be!=="longjmp")throw Be;O(1,0)}}function lT(o,u,l,d,h,p,y){var _=I();try{H.get(o)(u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;O(1,0)}}function dT(o,u,l,d,h,p){var y=I();try{return H.get(o)(u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;O(1,0)}}function fT(o,u,l,d,h,p,y,_,b){var g=I();try{H.get(o)(u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function hT(o,u){var l=I();try{return H.get(o)(u)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;O(1,0)}}function pT(o,u,l,d,h,p){var y=I();try{H.get(o)(u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;O(1,0)}}function yT(o,u,l){var d=I();try{return H.get(o)(u,l)}catch(h){if(S(d),h!==h+0&&h!=="longjmp")throw h;O(1,0)}}function mT(o,u,l){var d=I();try{return H.get(o)(u,l)}catch(h){if(S(d),h!==h+0&&h!=="longjmp")throw h;O(1,0)}}function _T(o,u,l,d,h,p,y,_,b){var g=I();try{return H.get(o)(u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function bT(o,u,l,d,h){var p=I();try{return H.get(o)(u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;O(1,0)}}function gT(o,u,l,d,h){var p=I();try{return H.get(o)(u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;O(1,0)}}function vT(o,u,l,d,h,p){var y=I();try{H.get(o)(u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;O(1,0)}}function wT(o,u,l){var d=I();try{H.get(o)(u,l)}catch(h){if(S(d),h!==h+0&&h!=="longjmp")throw h;O(1,0)}}function jT(o,u,l){var d=I();try{H.get(o)(u,l)}catch(h){if(S(d),h!==h+0&&h!=="longjmp")throw h;O(1,0)}}function TT(o,u,l,d){var h=I();try{return H.get(o)(u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;O(1,0)}}function BT(o,u,l,d,h,p,y,_,b,g,T,B,A,C,N,ie,me,Be,M,G){var Re=I();try{return H.get(o)(u,l,d,h,p,y,_,b,g,T,B,A,C,N,ie,me,Be,M,G)}catch(be){if(S(Re),be!==be+0&&be!=="longjmp")throw be;O(1,0)}}function IT(o,u,l,d,h,p,y,_,b,g,T,B,A,C,N,ie,me,Be,M,G,Re){var be=I();try{return H.get(o)(u,l,d,h,p,y,_,b,g,T,B,A,C,N,ie,me,Be,M,G,Re)}catch(lt){if(S(be),lt!==lt+0&<!=="longjmp")throw lt;O(1,0)}}function ST(o,u,l,d){var h=I();try{H.get(o)(u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;O(1,0)}}function OT(o,u,l,d){var h=I();try{H.get(o)(u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;O(1,0)}}function AT(o,u,l,d,h,p,y,_,b,g,T,B,A,C){var N=I();try{H.get(o)(u,l,d,h,p,y,_,b,g,T,B,A,C)}catch(ie){if(S(N),ie!==ie+0&&ie!=="longjmp")throw ie;O(1,0)}}function DT(o,u,l,d,h,p,y,_,b,g,T,B,A,C,N,ie){var me=I();try{return H.get(o)(u,l,d,h,p,y,_,b,g,T,B,A,C,N,ie)}catch(Be){if(S(me),Be!==Be+0&&Be!=="longjmp")throw Be;O(1,0)}}function FT(o,u,l,d,h,p,y,_,b,g){var T=I();try{H.get(o)(u,l,d,h,p,y,_,b,g)}catch(B){if(S(T),B!==B+0&&B!=="longjmp")throw B;O(1,0)}}function RT(o,u,l){var d=I();try{return H.get(o)(u,l)}catch(h){if(S(d),h!==h+0&&h!=="longjmp")throw h;O(1,0)}}function ET(o,u,l,d,h,p,y,_,b,g,T){var B=I();try{H.get(o)(u,l,d,h,p,y,_,b,g,T)}catch(A){if(S(B),A!==A+0&&A!=="longjmp")throw A;O(1,0)}}function CT(o,u){var l=I();try{return H.get(o)(u)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;O(1,0)}}function UT(o,u,l){var d=I();try{return H.get(o)(u,l)}catch(h){if(S(d),h!==h+0&&h!=="longjmp")throw h;O(1,0)}}function kT(o,u,l){var d=I();try{return H.get(o)(u,l)}catch(h){if(S(d),h!==h+0&&h!=="longjmp")throw h;O(1,0)}}function MT(o,u,l,d){var h=I();try{return H.get(o)(u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;O(1,0)}}function PT(o,u,l,d,h,p,y,_,b,g){var T=I();try{H.get(o)(u,l,d,h,p,y,_,b,g)}catch(B){if(S(T),B!==B+0&&B!=="longjmp")throw B;O(1,0)}}function VT(o,u,l,d,h,p,y,_,b,g,T,B){var A=I();try{H.get(o)(u,l,d,h,p,y,_,b,g,T,B)}catch(C){if(S(A),C!==C+0&&C!=="longjmp")throw C;O(1,0)}}function NT(o,u){var l=I();try{return H.get(o)(u)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;O(1,0)}}function LT(o,u){var l=I();try{return H.get(o)(u)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;O(1,0)}}function xT(o,u,l,d,h){var p=I();try{return Nd(o,u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;O(1,0)}}function qT(o,u,l,d,h,p,y){var _=I();try{$d(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;O(1,0)}}function WT(o,u){var l=I();try{return zd(o,u)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;O(1,0)}}function zT(o,u,l){var d=I();try{return of(o,u,l)}catch(h){if(S(d),h!==h+0&&h!=="longjmp")throw h;O(1,0)}}function YT(o,u,l,d,h,p,y){var _=I();try{qd(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;O(1,0)}}function HT(o,u,l,d,h,p,y){var _=I();try{return Ld(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;O(1,0)}}function GT(o,u,l,d,h,p,y,_,b){var g=I();try{return xd(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function $T(o,u,l,d){var h=I();try{return Yd(o,u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;O(1,0)}}function JT(o,u,l,d,h,p){var y=I();try{Kd(o,u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;O(1,0)}}function KT(o){var u=I();try{return Wd(o)}catch(l){if(S(u),l!==l+0&&l!=="longjmp")throw l;O(1,0)}}function QT(o,u,l,d,h){var p=I();try{Hd(o,u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;O(1,0)}}function ZT(o,u,l,d,h,p,y,_){var b=I();try{Qd(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;O(1,0)}}function XT(o,u,l,d,h,p,y){var _=I();try{return Zd(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;O(1,0)}}function e0(o,u,l,d,h,p,y,_){var b=I();try{Gd(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;O(1,0)}}function t0(o,u,l,d){var h=I();try{af(o,u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;O(1,0)}}function r0(o,u,l,d,h,p){var y=I();try{Xd(o,u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;O(1,0)}}function i0(o,u,l,d,h,p,y,_,b,g){var T=I();try{tf(o,u,l,d,h,p,y,_,b,g)}catch(B){if(S(T),B!==B+0&&B!=="longjmp")throw B;O(1,0)}}function n0(o,u,l,d,h){var p=I();try{return rf(o,u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;O(1,0)}}function s0(o,u,l,d,h,p,y,_,b){var g=I();try{nf(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function a0(o,u,l,d){var h=I();try{return sf(o,u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;O(1,0)}}function o0(o,u,l,d,h,p,y,_){var b=I();try{Jd(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;O(1,0)}}function u0(o,u,l,d,h,p,y,_,b){var g=I();try{ah(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function c0(o,u,l,d,h){var p=I();try{cf(o,u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;O(1,0)}}function l0(o,u,l,d,h){var p=I();try{return Vp(o,u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;O(1,0)}}function d0(o,u,l,d,h,p,y,_){var b=I();try{return Np(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;O(1,0)}}function f0(o,u,l,d,h,p){var y=I();try{uf(o,u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;O(1,0)}}function h0(o,u,l,d,h,p){var y=I();try{return yf(o,u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;O(1,0)}}function p0(o,u,l,d,h,p,y,_){var b=I();try{return lf(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;O(1,0)}}function y0(o,u,l,d,h,p,y,_,b){var g=I();try{hf(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function m0(o,u,l,d,h,p,y,_,b,g,T,B){var A=I();try{ff(o,u,l,d,h,p,y,_,b,g,T,B)}catch(C){if(S(A),C!==C+0&&C!=="longjmp")throw C;O(1,0)}}function _0(o,u,l,d,h,p,y,_,b,g){var T=I();try{df(o,u,l,d,h,p,y,_,b,g)}catch(B){if(S(T),B!==B+0&&B!=="longjmp")throw B;O(1,0)}}function b0(o,u,l,d,h,p,y,_,b){var g=I();try{Wh(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function g0(o,u,l,d,h,p,y,_,b,g,T,B,A){var C=I();try{Sp(o,u,l,d,h,p,y,_,b,g,T,B,A)}catch(N){if(S(C),N!==N+0&&N!=="longjmp")throw N;O(1,0)}}function v0(o,u,l,d,h,p,y,_,b){var g=I();try{wp(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function w0(o,u,l,d,h,p,y,_){var b=I();try{return rp(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;O(1,0)}}function j0(o,u,l,d,h,p){var y=I();try{return _f(o,u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;O(1,0)}}function T0(o,u,l,d,h,p){var y=I();try{return ip(o,u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;O(1,0)}}function B0(o,u,l,d,h,p,y,_){var b=I();try{return Qf(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;O(1,0)}}function I0(o,u,l,d,h,p,y){var _=I();try{pf(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;O(1,0)}}function S0(o,u,l,d,h,p,y,_){var b=I();try{return mf(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;O(1,0)}}function O0(o,u,l,d,h,p,y){var _=I();try{return bf(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;O(1,0)}}function A0(o,u,l,d){var h=I();try{return gf(o,u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;O(1,0)}}function D0(o,u,l,d,h,p,y){var _=I();try{ih(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;O(1,0)}}function F0(o,u,l,d,h,p,y,_){var b=I();try{Zh(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;O(1,0)}}function R0(o,u,l,d,h,p,y,_){var b=I();try{return Xh(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;O(1,0)}}function E0(o,u,l,d,h,p,y,_){var b=I();try{ef(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;O(1,0)}}function C0(o,u,l,d,h,p,y,_,b,g,T){var B=I();try{If(o,u,l,d,h,p,y,_,b,g,T)}catch(A){if(S(B),A!==A+0&&A!=="longjmp")throw A;O(1,0)}}function U0(o,u,l,d,h,p,y,_){var b=I();try{Sf(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;O(1,0)}}function k0(o,u,l,d,h,p,y,_,b,g,T,B,A){var C=I();try{Of(o,u,l,d,h,p,y,_,b,g,T,B,A)}catch(N){if(S(C),N!==N+0&&N!=="longjmp")throw N;O(1,0)}}function M0(o,u,l,d,h,p,y,_,b,g){var T=I();try{Af(o,u,l,d,h,p,y,_,b,g)}catch(B){if(S(T),B!==B+0&&B!=="longjmp")throw B;O(1,0)}}function P0(o,u,l,d,h,p,y,_,b,g,T,B,A){var C=I();try{Ff(o,u,l,d,h,p,y,_,b,g,T,B,A)}catch(N){if(S(C),N!==N+0&&N!=="longjmp")throw N;O(1,0)}}function V0(o,u,l,d,h,p,y,_,b,g){var T=I();try{return wf(o,u,l,d,h,p,y,_,b,g)}catch(B){if(S(T),B!==B+0&&B!=="longjmp")throw B;O(1,0)}}function N0(o,u,l,d,h,p,y,_,b,g,T,B){var A=I();try{return jf(o,u,l,d,h,p,y,_,b,g,T,B)}catch(C){if(S(A),C!==C+0&&C!=="longjmp")throw C;O(1,0)}}function L0(o,u,l,d,h,p,y,_,b,g){var T=I();try{return Tf(o,u,l,d,h,p,y,_,b,g)}catch(B){if(S(T),B!==B+0&&B!=="longjmp")throw B;O(1,0)}}function x0(o,u,l,d,h,p,y,_,b,g){var T=I();try{return Bf(o,u,l,d,h,p,y,_,b,g)}catch(B){if(S(T),B!==B+0&&B!=="longjmp")throw B;O(1,0)}}function q0(o,u,l,d,h,p,y,_,b,g,T,B){var A=I();try{Rf(o,u,l,d,h,p,y,_,b,g,T,B)}catch(C){if(S(A),C!==C+0&&C!=="longjmp")throw C;O(1,0)}}function W0(o,u,l,d,h,p,y,_,b,g,T,B,A){var C=I();try{Ef(o,u,l,d,h,p,y,_,b,g,T,B,A)}catch(N){if(S(C),N!==N+0&&N!=="longjmp")throw N;O(1,0)}}function z0(o,u,l,d,h,p,y,_,b,g,T,B,A,C,N,ie){var me=I();try{Cf(o,u,l,d,h,p,y,_,b,g,T,B,A,C,N,ie)}catch(Be){if(S(me),Be!==Be+0&&Be!=="longjmp")throw Be;O(1,0)}}function Y0(o,u,l,d,h,p,y,_,b,g,T,B,A,C,N,ie,me,Be){var M=I();try{Uf(o,u,l,d,h,p,y,_,b,g,T,B,A,C,N,ie,me,Be)}catch(G){if(S(M),G!==G+0&&G!=="longjmp")throw G;O(1,0)}}function H0(o,u,l,d,h,p,y,_,b,g,T,B){var A=I();try{Df(o,u,l,d,h,p,y,_,b,g,T,B)}catch(C){if(S(A),C!==C+0&&C!=="longjmp")throw C;O(1,0)}}function G0(o,u,l,d,h,p){var y=I();try{return Lh(o,u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;O(1,0)}}function $0(o,u,l,d,h,p,y,_,b){var g=I();try{Xf(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function J0(o,u,l,d,h,p,y,_,b,g,T){var B=I();try{return xh(o,u,l,d,h,p,y,_,b,g,T)}catch(A){if(S(B),A!==A+0&&A!=="longjmp")throw A;O(1,0)}}function K0(o,u,l,d,h,p,y,_,b){var g=I();try{return qh(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function Q0(o,u,l,d,h,p,y,_){var b=I();try{return kf(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;O(1,0)}}function Z0(o,u,l,d,h,p,y,_){var b=I();try{qf(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;O(1,0)}}function X0(o,u,l,d,h,p,y,_,b){var g=I();try{return Wf(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function eB(o,u,l,d,h,p,y){var _=I();try{return Mf(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;O(1,0)}}function tB(o,u,l,d,h,p,y){var _=I();try{return Pf(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;O(1,0)}}function rB(o,u,l,d,h,p,y,_){var b=I();try{Vf(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;O(1,0)}}function iB(o,u,l,d,h,p,y){var _=I();try{return Nf(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;O(1,0)}}function nB(o,u,l,d,h,p,y){var _=I();try{return Lf(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;O(1,0)}}function sB(o,u,l,d,h,p,y,_,b,g,T){var B=I();try{return xf(o,u,l,d,h,p,y,_,b,g,T)}catch(A){if(S(B),A!==A+0&&A!=="longjmp")throw A;O(1,0)}}function aB(o,u,l,d,h,p,y,_,b,g,T,B,A,C,N){var ie=I();try{return zf(o,u,l,d,h,p,y,_,b,g,T,B,A,C,N)}catch(me){if(S(ie),me!==me+0&&me!=="longjmp")throw me;O(1,0)}}function oB(o,u,l,d,h,p,y,_,b,g,T,B){var A=I();try{return Yf(o,u,l,d,h,p,y,_,b,g,T,B)}catch(C){if(S(A),C!==C+0&&C!=="longjmp")throw C;O(1,0)}}function uB(o,u,l,d,h,p,y,_,b){var g=I();try{return Hf(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function cB(o,u,l){var d=I();try{return Gf(o,u,l)}catch(h){if(S(d),h!==h+0&&h!=="longjmp")throw h;O(1,0)}}function lB(o,u){var l=I();try{return $f(o,u)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;O(1,0)}}function dB(o,u){var l=I();try{return Jf(o,u)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;O(1,0)}}function fB(o,u,l,d,h,p,y){var _=I();try{return zh(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;O(1,0)}}function hB(o,u,l,d,h,p,y){var _=I();try{yh(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;O(1,0)}}function pB(o,u,l,d,h,p){var y=I();try{return Ch(o,u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;O(1,0)}}function yB(o,u,l,d,h,p,y,_,b){var g=I();try{return eh(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function mB(o,u,l,d,h,p,y,_,b,g,T){var B=I();try{return th(o,u,l,d,h,p,y,_,b,g,T)}catch(A){if(S(B),A!==A+0&&A!=="longjmp")throw A;O(1,0)}}function _B(o,u,l,d,h,p,y,_,b,g){var T=I();try{rh(o,u,l,d,h,p,y,_,b,g)}catch(B){if(S(T),B!==B+0&&B!=="longjmp")throw B;O(1,0)}}function bB(o,u,l,d,h,p,y,_,b,g){var T=I();try{return Kf(o,u,l,d,h,p,y,_,b,g)}catch(B){if(S(T),B!==B+0&&B!=="longjmp")throw B;O(1,0)}}function gB(o,u,l,d,h,p,y,_,b,g,T,B,A,C,N,ie,me){var Be=I();try{Zf(o,u,l,d,h,p,y,_,b,g,T,B,A,C,N,ie,me)}catch(M){if(S(Be),M!==M+0&&M!=="longjmp")throw M;O(1,0)}}function vB(o,u,l,d,h,p,y,_,b,g,T,B){var A=I();try{return nh(o,u,l,d,h,p,y,_,b,g,T,B)}catch(C){if(S(A),C!==C+0&&C!=="longjmp")throw C;O(1,0)}}function wB(o,u,l,d,h,p,y,_,b){var g=I();try{sh(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function jB(o,u,l,d,h,p,y,_,b,g){var T=I();try{return Uh(o,u,l,d,h,p,y,_,b,g)}catch(B){if(S(T),B!==B+0&&B!=="longjmp")throw B;O(1,0)}}function TB(o,u,l,d,h,p,y,_,b,g){var T=I();try{oh(o,u,l,d,h,p,y,_,b,g)}catch(B){if(S(T),B!==B+0&&B!=="longjmp")throw B;O(1,0)}}function BB(o,u,l,d,h,p,y,_){var b=I();try{return dh(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;O(1,0)}}function IB(o,u,l,d,h,p,y,_,b,g,T,B,A){var C=I();try{return fh(o,u,l,d,h,p,y,_,b,g,T,B,A)}catch(N){if(S(C),N!==N+0&&N!=="longjmp")throw N;O(1,0)}}function SB(o,u,l,d,h,p,y,_,b,g,T){var B=I();try{return uh(o,u,l,d,h,p,y,_,b,g,T)}catch(A){if(S(B),A!==A+0&&A!=="longjmp")throw A;O(1,0)}}function OB(o,u,l,d,h,p,y,_,b,g,T,B){var A=I();try{ch(o,u,l,d,h,p,y,_,b,g,T,B)}catch(C){if(S(A),C!==C+0&&C!=="longjmp")throw C;O(1,0)}}function AB(o,u,l,d,h,p,y,_,b,g,T){var B=I();try{lh(o,u,l,d,h,p,y,_,b,g,T)}catch(A){if(S(B),A!==A+0&&A!=="longjmp")throw A;O(1,0)}}function DB(o,u,l,d,h,p,y,_,b){var g=I();try{hh(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function FB(o,u,l,d,h,p,y,_){var b=I();try{return ph(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;O(1,0)}}function RB(o,u,l,d,h,p,y,_,b){var g=I();try{return kh(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function EB(o,u,l,d,h,p,y,_,b,g,T,B,A,C){var N=I();try{return Mh(o,u,l,d,h,p,y,_,b,g,T,B,A,C)}catch(ie){if(S(N),ie!==ie+0&&ie!=="longjmp")throw ie;O(1,0)}}function CB(o,u,l,d,h,p,y,_,b,g,T){var B=I();try{jh(o,u,l,d,h,p,y,_,b,g,T)}catch(A){if(S(B),A!==A+0&&A!=="longjmp")throw A;O(1,0)}}function UB(o,u,l){var d=I();try{return bh(o,u,l)}catch(h){if(S(d),h!==h+0&&h!=="longjmp")throw h;O(1,0)}}function kB(o,u,l,d,h){var p=I();try{return Bh(o,u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;O(1,0)}}function MB(o,u,l,d,h,p,y){var _=I();try{wh(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;O(1,0)}}function PB(o,u,l,d){var h=I();try{return vf(o,u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;O(1,0)}}function VB(o,u,l,d,h,p,y,_,b,g,T,B,A,C,N){var ie=I();try{_h(o,u,l,d,h,p,y,_,b,g,T,B,A,C,N)}catch(me){if(S(ie),me!==me+0&&me!=="longjmp")throw me;O(1,0)}}function NB(o,u,l,d,h){var p=I();try{return gh(o,u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;O(1,0)}}function LB(o,u,l,d,h){var p=I();try{vh(o,u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;O(1,0)}}function xB(o,u,l,d,h,p,y){var _=I();try{Th(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;O(1,0)}}function qB(o,u,l,d,h,p,y,_,b,g){var T=I();try{return Ih(o,u,l,d,h,p,y,_,b,g)}catch(B){if(S(T),B!==B+0&&B!=="longjmp")throw B;O(1,0)}}function WB(o,u,l,d,h,p,y,_,b,g){var T=I();try{return Sh(o,u,l,d,h,p,y,_,b,g)}catch(B){if(S(T),B!==B+0&&B!=="longjmp")throw B;O(1,0)}}function zB(o,u,l,d,h,p,y,_,b,g){var T=I();try{Oh(o,u,l,d,h,p,y,_,b,g)}catch(B){if(S(T),B!==B+0&&B!=="longjmp")throw B;O(1,0)}}function YB(o,u,l,d,h,p,y,_,b,g){var T=I();try{Ah(o,u,l,d,h,p,y,_,b,g)}catch(B){if(S(T),B!==B+0&&B!=="longjmp")throw B;O(1,0)}}function HB(o,u,l,d,h,p,y){var _=I();try{return Rh(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;O(1,0)}}function GB(o,u,l,d,h,p){var y=I();try{return ap(o,u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;O(1,0)}}function $B(o,u,l,d,h,p,y,_,b,g,T){var B=I();try{Dh(o,u,l,d,h,p,y,_,b,g,T)}catch(A){if(S(B),A!==A+0&&A!=="longjmp")throw A;O(1,0)}}function JB(o,u,l,d,h,p,y,_,b,g,T){var B=I();try{Fh(o,u,l,d,h,p,y,_,b,g,T)}catch(A){if(S(B),A!==A+0&&A!=="longjmp")throw A;O(1,0)}}function KB(o,u,l,d,h){var p=I();try{return Eh(o,u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;O(1,0)}}function QB(o,u,l,d,h,p,y,_,b,g){var T=I();try{return Ph(o,u,l,d,h,p,y,_,b,g)}catch(B){if(S(T),B!==B+0&&B!=="longjmp")throw B;O(1,0)}}function ZB(o,u,l,d,h,p,y,_,b){var g=I();try{return Vh(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function XB(o,u,l,d,h,p,y,_,b,g){var T=I();try{return Nh(o,u,l,d,h,p,y,_,b,g)}catch(B){if(S(T),B!==B+0&&B!=="longjmp")throw B;O(1,0)}}function eI(o,u,l,d,h,p,y,_){var b=I();try{return Yh(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;O(1,0)}}function tI(o,u,l,d,h,p,y,_,b){var g=I();try{return Hh(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function rI(o,u,l,d,h,p,y,_,b){var g=I();try{return Gh(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function iI(o,u,l,d,h,p,y,_,b){var g=I();try{return $h(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function nI(o,u,l,d,h,p,y,_,b,g){var T=I();try{return Jh(o,u,l,d,h,p,y,_,b,g)}catch(B){if(S(T),B!==B+0&&B!=="longjmp")throw B;O(1,0)}}function sI(o,u,l,d,h,p,y){var _=I();try{return Qh(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;O(1,0)}}function aI(o,u,l,d,h){var p=I();try{return Kh(o,u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;O(1,0)}}function oI(o,u,l,d,h,p,y){var _=I();try{ep(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;O(1,0)}}function uI(o,u,l,d,h,p,y,_,b){var g=I();try{return tp(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function cI(o,u,l,d,h,p,y,_,b){var g=I();try{np(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function lI(o,u,l,d,h,p,y,_,b){var g=I();try{return sp(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function dI(o,u,l,d,h,p,y,_,b){var g=I();try{lp(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function fI(o,u,l,d,h,p,y,_,b,g,T){var B=I();try{cp(o,u,l,d,h,p,y,_,b,g,T)}catch(A){if(S(B),A!==A+0&&A!=="longjmp")throw A;O(1,0)}}function hI(o,u,l,d,h,p){var y=I();try{return vp(o,u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;O(1,0)}}function pI(o,u,l,d,h,p,y,_,b,g,T,B){var A=I();try{up(o,u,l,d,h,p,y,_,b,g,T,B)}catch(C){if(S(A),C!==C+0&&C!=="longjmp")throw C;O(1,0)}}function yI(o,u,l,d,h,p,y,_,b){var g=I();try{return dp(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function mI(o,u,l,d,h,p,y,_,b,g,T,B,A,C,N){var ie=I();try{return op(o,u,l,d,h,p,y,_,b,g,T,B,A,C,N)}catch(me){if(S(ie),me!==me+0&&me!=="longjmp")throw me;O(1,0)}}function _I(o,u,l,d,h,p,y,_,b){var g=I();try{return fp(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function bI(o,u,l,d,h,p,y,_){var b=I();try{return hp(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;O(1,0)}}function gI(o,u,l,d,h,p){var y=I();try{pp(o,u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;O(1,0)}}function vI(o,u,l,d,h,p,y,_,b){var g=I();try{yp(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function wI(o,u,l,d,h,p,y,_,b,g){var T=I();try{bp(o,u,l,d,h,p,y,_,b,g)}catch(B){if(S(T),B!==B+0&&B!=="longjmp")throw B;O(1,0)}}function jI(o,u,l,d,h,p,y){var _=I();try{return _p(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;O(1,0)}}function TI(o,u,l,d,h,p,y,_,b,g){var T=I();try{gp(o,u,l,d,h,p,y,_,b,g)}catch(B){if(S(T),B!==B+0&&B!=="longjmp")throw B;O(1,0)}}function BI(o,u,l,d,h,p,y,_,b){var g=I();try{return mp(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function II(o,u,l,d,h,p,y){var _=I();try{Tp(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;O(1,0)}}function SI(o,u,l,d,h,p,y,_,b,g,T){var B=I();try{return Bp(o,u,l,d,h,p,y,_,b,g,T)}catch(A){if(S(B),A!==A+0&&A!=="longjmp")throw A;O(1,0)}}function OI(o,u,l,d,h,p,y,_){var b=I();try{return Ip(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;O(1,0)}}function AI(o,u,l,d,h,p,y,_,b){var g=I();try{Op(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function DI(o,u,l,d,h){var p=I();try{return Vd(o,u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;O(1,0)}}function FI(o,u,l,d,h,p,y,_){var b=I();try{return Ap(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;O(1,0)}}function RI(o,u,l,d,h,p,y,_,b){var g=I();try{Dp(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function EI(o,u,l,d,h,p,y,_){var b=I();try{return Fp(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;O(1,0)}}function CI(o,u,l,d,h,p,y,_,b){var g=I();try{Rp(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function UI(o,u,l,d,h,p,y){var _=I();try{return Ep(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;O(1,0)}}function kI(o,u,l,d,h,p,y,_){var b=I();try{return Cp(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;O(1,0)}}function MI(o,u,l,d,h,p,y,_,b,g){var T=I();try{Up(o,u,l,d,h,p,y,_,b,g)}catch(B){if(S(T),B!==B+0&&B!=="longjmp")throw B;O(1,0)}}function PI(o,u,l,d,h,p,y,_,b){var g=I();try{kp(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function VI(o,u,l,d,h,p,y,_,b){var g=I();try{Mp(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function NI(o,u,l,d,h,p,y,_){var b=I();try{Pp(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;O(1,0)}}function LI(o,u,l,d,h,p,y,_,b,g,T,B){var A=I();try{Lp(o,u,l,d,h,p,y,_,b,g,T,B)}catch(C){if(S(A),C!==C+0&&C!=="longjmp")throw C;O(1,0)}}function xI(o,u,l,d,h,p){var y=I();try{return mh(o,u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;O(1,0)}}function qI(o,u,l,d,h,p,y,_,b,g){var T=I();try{qp(o,u,l,d,h,p,y,_,b,g)}catch(B){if(S(T),B!==B+0&&B!=="longjmp")throw B;O(1,0)}}function WI(o,u,l,d,h,p,y,_,b,g,T){var B=I();try{return Wp(o,u,l,d,h,p,y,_,b,g,T)}catch(A){if(S(B),A!==A+0&&A!=="longjmp")throw A;O(1,0)}}function zI(o,u,l,d,h,p,y,_,b,g,T,B,A){var C=I();try{xp(o,u,l,d,h,p,y,_,b,g,T,B,A)}catch(N){if(S(C),N!==N+0&&N!=="longjmp")throw N;O(1,0)}}function YI(o,u,l,d,h,p,y,_,b,g,T){var B=I();try{jp(o,u,l,d,h,p,y,_,b,g,T)}catch(A){if(S(B),A!==A+0&&A!=="longjmp")throw A;O(1,0)}}function HI(o,u,l,d,h,p,y,_,b,g,T,B,A){var C=I();try{zp(o,u,l,d,h,p,y,_,b,g,T,B,A)}catch(N){if(S(C),N!==N+0&&N!=="longjmp")throw N;O(1,0)}}function GI(o,u,l,d,h,p,y,_,b,g){var T=I();try{return Yp(o,u,l,d,h,p,y,_,b,g)}catch(B){if(S(T),B!==B+0&&B!=="longjmp")throw B;O(1,0)}}function $I(o,u,l,d,h,p,y,_,b,g){var T=I();try{return Zp(o,u,l,d,h,p,y,_,b,g)}catch(B){if(S(T),B!==B+0&&B!=="longjmp")throw B;O(1,0)}}function JI(o,u,l,d,h,p,y,_,b,g,T,B,A){var C=I();try{Hp(o,u,l,d,h,p,y,_,b,g,T,B,A)}catch(N){if(S(C),N!==N+0&&N!=="longjmp")throw N;O(1,0)}}function KI(o,u,l,d,h,p,y,_,b,g){var T=I();try{Gp(o,u,l,d,h,p,y,_,b,g)}catch(B){if(S(T),B!==B+0&&B!=="longjmp")throw B;O(1,0)}}function QI(o,u,l,d,h,p){var y=I();try{return $p(o,u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;O(1,0)}}function ZI(o,u,l,d,h,p,y,_,b,g,T,B,A,C){var N=I();try{Kp(o,u,l,d,h,p,y,_,b,g,T,B,A,C)}catch(ie){if(S(N),ie!==ie+0&&ie!=="longjmp")throw ie;O(1,0)}}function XI(o,u,l,d,h,p,y,_,b,g,T){var B=I();try{Qp(o,u,l,d,h,p,y,_,b,g,T)}catch(A){if(S(B),A!==A+0&&A!=="longjmp")throw A;O(1,0)}}function eS(o,u,l,d,h,p,y,_,b,g){var T=I();try{Jp(o,u,l,d,h,p,y,_,b,g)}catch(B){if(S(T),B!==B+0&&B!=="longjmp")throw B;O(1,0)}}function tS(o,u,l,d,h,p,y,_,b){var g=I();try{iy(o,u,l,d,h,p,y,_,b)}catch(T){if(S(g),T!==T+0&&T!=="longjmp")throw T;O(1,0)}}function rS(o,u,l,d,h,p,y,_){var b=I();try{return ey(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;O(1,0)}}function iS(o,u,l,d,h,p,y,_,b,g,T){var B=I();try{return ty(o,u,l,d,h,p,y,_,b,g,T)}catch(A){if(S(B),A!==A+0&&A!=="longjmp")throw A;O(1,0)}}function nS(o,u,l,d,h,p,y,_,b,g,T){var B=I();try{return Xp(o,u,l,d,h,p,y,_,b,g,T)}catch(A){if(S(B),A!==A+0&&A!=="longjmp")throw A;O(1,0)}}function sS(o,u,l,d,h,p,y,_,b,g,T,B){var A=I();try{return ry(o,u,l,d,h,p,y,_,b,g,T,B)}catch(C){if(S(A),C!==C+0&&C!=="longjmp")throw C;O(1,0)}}t.ccall=_v;var Us;function ks(o){this.name="ExitStatus",this.message="Program terminated with exit("+o+")",this.status=o}var aS=!1;En=function o(){Us||Jo(),Us||(En=o)};function oS(o){var u=t._main,l=0,d=0;try{var h=u(l,d);return uS(h,!0),h}catch(p){return zv(p)}finally{aS=!0}}function Jo(o){if(o=o||f,ai>0||(Rv(),ai>0))return;function u(){Us||(Us=!0,t.calledRun=!0,!Lo&&(Ev(),Cv(),i(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),ny&&oS(o),kv()))}t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),u()},1)):u()}t.run=Jo;function uS(o,u){Bs=o,xo()||Uv(),cS(o)}function cS(o){Bs=o,xo()||(t.onExit&&t.onExit(o),Lo=!0),s(o,new ks(o))}if(t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();var ny=!0;return t.noInitialRun&&(ny=!1),Jo(),e.ready}}(),sv=uC;var Yt=Ps(Ts());var md=class{constructor(e,t){this._bindings=e,this._conn=t}close(){this._bindings.disconnect(this._conn)}useUnsafe(e){return e(this._bindings,this._conn)}query(e){let t=this._bindings.runQuery(this._conn,e),i=Yt.RecordBatchReader.from(t);return console.assert(i.isSync()),console.assert(i.isFile()),Yt.Table.from(i)}send(e){let t=this._bindings.sendQuery(this._conn,e),i=new _d(this._bindings,this._conn,t),n=Yt.RecordBatchReader.from(i);return console.assert(n.isSync()),console.assert(n.isStream()),n}prepare(e){let t=this._bindings.createPrepared(this._conn,e);return new ov(this._bindings,this._conn,t)}insertArrowVectors(e,t){this.insertArrowTable(Yt.Table.new(e),t)}insertArrowTable(e,t){e.schema.fields.length==0&&console.warn("The schema is empty! If you used arrow.Table.from, consider constructing schema and batches manually"),this.insertArrowBatches(e.schema,e.chunks,t)}insertArrowBatches(e,t,i){e.fields.length==0&&console.warn("The schema is empty! If you used arrow.Table.from, consider constructing schema and batches manually");let n=new Vo,a=new Yt.RecordBatchStreamWriter().reset(n,e),c=!0;for(let f of t)c||this._bindings.insertArrowFromIPCStream(this._conn,n.flush(),i),c=!1,a.write(f);a.finish(),this._bindings.insertArrowFromIPCStream(this._conn,n.flush(),i)}insertArrowFromIPCStream(e,t){this._bindings.insertArrowFromIPCStream(this._conn,e,t)}insertCSVFromPath(e,t){this._bindings.insertCSVFromPath(this._conn,e,t)}insertJSONFromPath(e,t){this._bindings.insertJSONFromPath(this._conn,e,t)}},_d=class{constructor(e,t,i){this.bindings=e;this.conn=t;this.header=i;this._first=!0,this._depleted=!1}next(){if(this._first)return this._first=!1,{done:!1,value:this.header};if(this._depleted)return{done:!0,value:null};let e=this.bindings.fetchQueryResults(this.conn);return this._depleted=e.length==0,{done:this._depleted,value:e}}[Symbol.iterator](){return this}},ov=class{constructor(e,t,i){this.bindings=e,this.connectionId=t,this.statementId=i}close(){this.bindings.closePrepared(this.connectionId,this.statementId)}query(...e){let t=this.bindings.runPrepared(this.connectionId,this.statementId,e),i=Yt.RecordBatchReader.from(t);return console.assert(i.isSync()),console.assert(i.isFile()),Yt.Table.from(i)}send(...e){let t=this.bindings.sendPrepared(this.connectionId,this.statementId,e),i=new _d(this.bindings,this.connectionId,t),n=Yt.RecordBatchReader.from(i);return console.assert(n.isSync()),console.assert(n.isStream()),n}};var Se;(function(e){e[e.SUCCESS=0]="SUCCESS"})(Se||(Se={}));function cC(){let r=new TextDecoder;return e=>(typeof SharedArrayBuffer!="undefined"&&e.buffer instanceof SharedArrayBuffer&&(e=new Uint8Array(e)),r.decode(e))}var lC=cC();function $e(r,e){console.error(e),r.ccall("duckdb_web_fail_with",null,["string"],[e])}function Fn(r,e,t){let i=r.HEAPU8.subarray(e,e+t),n=new Uint8Array(new ArrayBuffer(i.byteLength));return n.set(i),n}function je(r,e,t){return lC(r.HEAPU8.subarray(e,e+t))}var at;(function(i){i[i.BUFFER=0]="BUFFER",i[i.NATIVE=1]="NATIVE",i[i.HTTP=3]="HTTP"})(at||(at={}));function Fe(r,e,t,i){let n=r.stackSave(),a=r.stackAlloc(3*8);t.unshift("number"),i.unshift(a),r.ccall(e,null,t,i);let c=r.HEAPF64[(a>>3)+0],f=r.HEAPF64[(a>>3)+1],j=r.HEAPF64[(a>>3)+2];return r.stackRestore(n),[c,f,j]}function Je(r){r.ccall("duckdb_web_clear_response",null,[],[])}var bd=class{constructor(e){let t=new Float64Array(e.buffer,e.byteOffset,e.byteLength/8),i=new Uint8Array(new ArrayBuffer(e.byteLength));i.set(e.subarray(7*8)),this.totalFileReadsCold=t[0],this.totalFileReadsAhead=t[1],this.totalFileReadsCached=t[2],this.totalFileWrites=t[3],this.totalPageAccesses=t[4],this.totalPageLoads=t[5],this.blockSize=t[6],this.blockStats=i}getBlockStats(e,t){return t=t||{file_reads_cold:0,file_reads_ahead:0,file_reads_cached:0,file_writes:0,page_accesses:0,page_loads:0},t.file_writes=this.blockStats[e*3+0]&15,t.file_reads_cold=this.blockStats[e*3+0]>>4,t.file_reads_ahead=this.blockStats[e*3+1]&15,t.file_reads_cached=this.blockStats[e*3+1]>>4,t.page_accesses=this.blockStats[e*3+1]&15,t.page_loads=this.blockStats[e*3+1]>>4,t}};var dC=new TextEncoder,uv;(function(a){a[a.WASM_EXCEPTIONS=1]="WASM_EXCEPTIONS",a[a.WASM_THREADS=2]="WASM_THREADS",a[a.WASM_SIMD=4]="WASM_SIMD",a[a.WASM_BULK_MEMORY=8]="WASM_BULK_MEMORY",a[a.EMIT_BIGINT=16]="EMIT_BIGINT"})(uv||(uv={}));var gd=class{constructor(e,t){this._instance=null;this._initPromise=null;this._initPromiseResolver=()=>{};this._logger=e,this._runtime=t}get logger(){return this._logger}get mod(){return this._instance}get pthread(){return this.mod.PThread||null}async instantiate(){return this._instance!=null?this:(this._initPromise!=null&&await this._initPromise,this._initPromise=new Promise(e=>{this._initPromiseResolver=e}),this._instance=await this.instantiateImpl({print:console.log.bind(console),printErr:console.log.bind(console),onRuntimeInitialized:this._initPromiseResolver}),await this._initPromise,this._initPromise=null,this)}open(e){let[t,i,n]=Fe(this.mod,"duckdb_web_open",["string"],[JSON.stringify(e)]);if(t!==Se.SUCCESS)throw new Error(je(this.mod,i,n));Je(this.mod)}reset(){let[e,t,i]=Fe(this.mod,"duckdb_web_reset",[],[]);if(e!==Se.SUCCESS)throw new Error(je(this.mod,t,i));Je(this.mod)}getVersion(){let[e,t,i]=Fe(this.mod,"duckdb_web_get_version",[],[]);if(e!==Se.SUCCESS)throw new Error(je(this.mod,t,i));let n=je(this.mod,t,i);return Je(this.mod),n}getFeatureFlags(){return this.mod.ccall("duckdb_web_get_feature_flags","number",[],[])}tokenize(e){let[t,i,n]=Fe(this.mod,"duckdb_web_tokenize",["string"],[e]);if(t!==Se.SUCCESS)throw new Error(je(this.mod,i,n));let a=je(this.mod,i,n);return Je(this.mod),JSON.parse(a)}connect(){let e=this.mod.ccall("duckdb_web_connect","number",[],[]);return new md(this,e)}disconnect(e){this.mod.ccall("duckdb_web_disconnect",null,["number"],[e])}runQuery(e,t){let[i,n,a]=Fe(this.mod,"duckdb_web_query_run",["number","string"],[e,t]);if(i!==Se.SUCCESS)throw new Error(je(this.mod,n,a));let c=Fn(this.mod,n,a);return Je(this.mod),c}sendQuery(e,t){let[i,n,a]=Fe(this.mod,"duckdb_web_query_send",["number","string"],[e,t]);if(i!==Se.SUCCESS)throw new Error(je(this.mod,n,a));let c=Fn(this.mod,n,a);return Je(this.mod),c}fetchQueryResults(e){let[t,i,n]=Fe(this.mod,"duckdb_web_query_fetch_results",["number"],[e]);if(t!==Se.SUCCESS)throw new Error(je(this.mod,i,n));let a=Fn(this.mod,i,n);return Je(this.mod),a}createPrepared(e,t){let[i,n,a]=Fe(this.mod,"duckdb_web_prepared_create",["number","string"],[e,t]);if(i!==Se.SUCCESS)throw new Error(je(this.mod,n,a));return Je(this.mod),n}closePrepared(e,t){let[i,n,a]=Fe(this.mod,"duckdb_web_prepared_close",["number","number"],[e,t]);if(i!==Se.SUCCESS)throw new Error(je(this.mod,n,a));Je(this.mod)}runPrepared(e,t,i){let[n,a,c]=Fe(this.mod,"duckdb_web_prepared_run",["number","number","string"],[e,t,JSON.stringify(i)]);if(n!==Se.SUCCESS)throw new Error(je(this.mod,a,c));let f=Fn(this.mod,a,c);return Je(this.mod),f}sendPrepared(e,t,i){let[n,a,c]=Fe(this.mod,"duckdb_web_prepared_send",["number","number","string"],[e,t,JSON.stringify(i)]);if(n!==Se.SUCCESS)throw new Error(je(this.mod,a,c));let f=Fn(this.mod,a,c);return Je(this.mod),f}insertArrowFromIPCStream(e,t,i){let n=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(n,n+t.length).set(t);let c=i?JSON.stringify(i):"",[f,j,s]=Fe(this.mod,"duckdb_web_insert_arrow_from_ipc_stream",["number","number","number","string"],[e,n,t.length,c]);if(f!==Se.SUCCESS)throw new Error(je(this.mod,j,s))}insertCSVFromPath(e,t,i){if(i.columns!==void 0){i.columnsFlat=[];for(let s in i.columns)i.columnsFlat.push(Dn(s,i.columns[s]))}let n={...i};n.columns=n.columnsFlat,delete n.columnsFlat;let a=JSON.stringify(n),[c,f,j]=Fe(this.mod,"duckdb_web_insert_csv_from_path",["number","string","string"],[e,t,a]);if(c!==Se.SUCCESS)throw new Error(je(this.mod,f,j))}insertJSONFromPath(e,t,i){if(i.columns!==void 0){i.columnsFlat=[];for(let s in i.columns)i.columnsFlat.push(Dn(s,i.columns[s]))}let n={...i};n.columns=n.columnsFlat,delete n.columnsFlat;let a=JSON.stringify(n),[c,f,j]=Fe(this.mod,"duckdb_web_insert_json_from_path",["number","string","string"],[e,t,a]);if(c!==Se.SUCCESS)throw new Error(je(this.mod,f,j))}registerFileURL(e,t){t===void 0&&(t=e);let[i,n,a]=Fe(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[e,t]);if(i!==Se.SUCCESS)throw new Error(je(this.mod,n,a));Je(this.mod)}registerFileText(e,t){let i=dC.encode(t);this.registerFileBuffer(e,i)}registerFileBuffer(e,t){let i=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(i,i+t.length).set(t);let[a,c,f]=Fe(this.mod,"duckdb_web_fs_register_file_buffer",["string","number","number"],[e,i,t.length]);if(a!==Se.SUCCESS)throw new Error(je(this.mod,c,f));Je(this.mod)}registerFileHandle(e,t){let[i,n,a]=Fe(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[e,e]);if(i!==Se.SUCCESS)throw new Error(je(this.mod,n,a));if(Je(this.mod),globalThis.DUCKDB_RUNTIME._files=(globalThis.DUCKDB_RUNTIME._files||new Map).set(e,t),this.pthread){for(let c of this.pthread.runningWorkers)c.postMessage({cmd:"registerFileHandle",fileName:e,fileHandle:t});for(let c of this.pthread.unusedWorkers)c.postMessage({cmd:"dropFileHandle",fileName:e})}}dropFile(e){return this.mod.ccall("duckdb_web_fs_drop_file","boolean",["string"],[e])}dropFiles(){this.mod.ccall("duckdb_web_fs_drop_files",null,[],[])}flushFiles(){this.mod.ccall("duckdb_web_flush_files",null,[],[])}copyFileToPath(e,t){let[i,n,a]=Fe(this.mod,"duckdb_web_copy_file_to_path",["string","string"],[e,t]);if(i!==Se.SUCCESS)throw new Error(je(this.mod,n,a));Je(this.mod)}copyFileToBuffer(e){let[t,i,n]=Fe(this.mod,"duckdb_web_copy_file_to_buffer",["string"],[e]);if(t!==Se.SUCCESS)throw new Error(je(this.mod,i,n));let a=this.mod.HEAPU8.subarray(i,i+n),c=new Uint8Array(a.length);return c.set(a),Je(this.mod),c}collectFileStatistics(e,t){let[i,n,a]=Fe(this.mod,"duckdb_web_collect_file_stats",["string","boolean"],[e,t]);if(i!==Se.SUCCESS)throw new Error(je(this.mod,n,a))}exportFileStatistics(e){let[t,i,n]=Fe(this.mod,"duckdb_web_export_file_stats",["string"],[e]);if(t!==Se.SUCCESS)throw new Error(je(this.mod,i,n));return new bd(this.mod.HEAPU8.subarray(i,i+n))}};var vd=class extends gd{constructor(e,t,i,n){super(e,t);this.mainModuleURL=i,this.pthreadWorkerURL=n}locateFile(e,t){if(e.endsWith(".wasm"))return this.mainModuleURL;if(e.endsWith(".worker.js")){if(!this.pthreadWorkerURL)throw new Error("Missing DuckDB worker URL!");return this.pthreadWorkerURL}throw new Error(`WASM instantiation requested unexpected file: prefix=${t} path=${e}`)}instantiateWasm(e,t){return globalThis.DUCKDB_RUNTIME=this._runtime,WebAssembly.instantiateStreaming?WebAssembly.instantiateStreaming(fetch(this.mainModuleURL),e).then(i=>{t(i.instance,i.module)}):fetch(this.mainModuleURL).then(i=>i.arrayBuffer()).then(i=>WebAssembly.instantiate(i,e).then(n=>{t(n.instance,n.module)})).catch(i=>{console.error("Failed to instantiate WASM:",i)}),[]}};var wd=class extends vd{constructor(e,t,i,n=null){super(e,t,i,n)}instantiateImpl(e){return sv({...e,instantiateWasm:this.instantiateWasm.bind(this),locateFile:this.locateFile.bind(this)})}};var ot={fileInfoCache:new Map,getFileInfo(r,e){try{let t=ot.fileInfoCache.get(e);if(t)return t;let[i,n,a]=Fe(r,"duckdb_web_fs_get_file_info",["number"],[e]);if(i!==Se.SUCCESS)throw new Error(je(r,n,a));let c=je(r,n,a);Je(r);let f=JSON.parse(c);if(f==null)return null;let j={...f,blob:null};return ot.fileInfoCache.set(e,j),j}catch(t){return $e(r,t.toString()),null}},testPlatformFeature:(r,e)=>{switch(e){case 1:return typeof BigInt64Array!="undefined";default:return console.warn(`test for unknown feature: ${e}`),!1}},openFile:(r,e)=>{try{ot.fileInfoCache.delete(e);let t=ot.getFileInfo(r,e);switch(t?.data_protocol){case at.HTTP:{let i=new XMLHttpRequest;i.open("HEAD",t.data_url,!1),i.setRequestHeader("Range","bytes=0-"),i.send(null);let n=!1;if(i.status==206?n=!0:i.status==200&&(n=i.getResponseHeader("Accept-Ranges")==="bytes"),!n)return $e(r,`File does not support range requests: ${t.file_name}`),0;break}case at.NATIVE:{if(!ot._files?.get(t.file_name))return $e(r,`No handle available for file: ${t.file_name}`),0;break}}}catch(t){$e(r,t.toString())}return 0},glob:(r,e,t)=>{try{let i=je(r,e,t);if(i.startsWith("http")){let n=new XMLHttpRequest;n.open("HEAD",i,!1),n.setRequestHeader("Range","bytes=0-"),n.send(null);let a=!1;if(n.status==206)a=!0;else if(n.status==200)a=n.getResponseHeader("Accept-Ranges")==="bytes";else{$e(r,`HEAD request failed: ${i}`);return}if(!a){$e(r,`File does not support range requests: ${i}`);return}r.ccall("duckdb_web_fs_glob_add_path",null,["string"],[i])}}catch(i){return $e(r,i.toString()),0}},checkFile:(r,e,t)=>{try{let i=je(r,e,t);if(i.startsWith("http")){let n=new XMLHttpRequest;n.open("HEAD",i,!1),n.setRequestHeader("Range","bytes=0-"),n.send(null);let a=!1;if(n.status==206)a=!0;else if(n.status==200)a=n.getResponseHeader("Accept-Ranges")==="bytes";else return!1;return!!a}}catch{return!1}return!1},syncFile:(r,e)=>{},closeFile:(r,e)=>{let t=ot.getFileInfo(r,e);switch(ot.fileInfoCache.delete(e),t?.data_protocol){case at.HTTP:break;case at.NATIVE:return}},truncateFile:(r,e,t)=>{switch(ot.getFileInfo(r,e)?.data_protocol){case at.HTTP:$e(r,"Cannot truncate a http file");return;case at.NATIVE:$e(r,"truncateFile not implemented");return}return 0},readFile(r,e,t,i,n){try{let a=ot.getFileInfo(r,e);switch(a?.data_protocol){case at.HTTP:{if(!a.data_url)return $e(r,`Missing data URL for file ${e}`),0;let c=new XMLHttpRequest;if(c.open("GET",a.data_url,!1),c.responseType="arraybuffer",c.setRequestHeader("Range",`bytes=${n}-${n+i-1}`),c.send(null),c.status==206||c.status==200&&i==c.response.byteLength&&n==0){let f=new Uint8Array(c.response,0,Math.min(c.response.byteLength,i));return r.HEAPU8.set(f,t),f.byteLength}else return c.status==200?($e(r,`Range request for ${a.data_url} did not return a partial response: ${c.status} "${c.statusText}"`),0):($e(r,`Range request for ${a.data_url} did returned non-success status: ${c.status} "${c.statusText}"`),0)}case at.NATIVE:{let c=ot._files?.get(a.file_name);if(!c)return $e(r,`No handle available for file: ${a.file_name}`),0;let f=c.slice(n,n+i),j=new Uint8Array(new FileReaderSync().readAsArrayBuffer(f));return r.HEAPU8.set(j,t),j.byteLength}}return 0}catch(a){return $e(r,a.toString()),0}},writeFile:(r,e,t,i,n)=>{switch(ot.getFileInfo(r,e)?.data_protocol){case at.HTTP:return $e(r,"Cannot write to HTTP file"),0;case at.NATIVE:return $e(r,"writefile not implemented"),0}return 0},getFileSize:(r,e)=>{try{let t=ot.getFileInfo(r,e);switch(t?.data_protocol){case at.NATIVE:{let i=ot._files?.get(t.file_name);return i?i.size:($e(r,`No handle available for file: ${t.file_name}`),0)}case at.HTTP:{if(!t.data_url)throw new Error(`Missing data URL for file ${e}`);let i=new XMLHttpRequest;if(i.open("HEAD",t.data_url,!1),i.send(null),i.status==200){let n=i.getResponseHeader("Content-Length");if(n)return parseInt(n);throw Error(`HEAD ${t.data_url} does not contain the HTTP header: Content-Length`)}else throw Error(`HEAD ${t.data_url} returned non-success status: ${i.status} "${i.statusText}"`)}}return 0}catch(t){return $e(r,t.toString()),0}},getLastFileModificationTime:(r,e)=>{let t=ot.getFileInfo(r,e);switch(t?.data_protocol){case at.NATIVE:{if(!ot._files?.get(t.file_name))throw Error(`No handle available for file: ${t.file_name}`);return 0}case at.HTTP:return new Date().getTime()}return 0},checkDirectory:(r,e,t)=>!1,createDirectory:(r,e,t)=>{},removeDirectory:(r,e,t)=>{},listDirectoryEntries:(r,e,t)=>!1,moveFile:(r,e,t,i,n)=>{},removeFile:(r,e,t)=>{}};var cv=class extends pd{postMessage(e,t){globalThis.postMessage(e,t)}async instantiate(e,t){return await new wd(this,ot,e,t).instantiate()}};function lv(){let r=new cv;globalThis.onmessage=async e=>{await r.onMessage(e.data)}}lv();return fC;})();
|
|
19
|
-
//# sourceMappingURL=duckdb-browser-async.worker.js.map
|