@loaders.gl/las 4.4.0-alpha.10 → 4.4.0-alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dist.min.js CHANGED
@@ -4,7 +4,7 @@
4
4
  else if (typeof define === 'function' && define.amd) define([], factory);
5
5
  else if (typeof exports === 'object') exports['loaders'] = factory();
6
6
  else root['loaders'] = factory();})(globalThis, function () {
7
- "use strict";var __exports__=(()=>{var N5=Object.create;var ku=Object.defineProperty;var k5=Object.getOwnPropertyDescriptor;var O5=Object.getOwnPropertyNames;var Z5=Object.getPrototypeOf,D5=Object.prototype.hasOwnProperty;var da=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),Ai=(o,e)=>{for(var s in e)ku(o,s,{get:e[s],enumerable:!0})},Nu=(o,e,s,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let A of O5(e))!D5.call(o,A)&&A!==s&&ku(o,A,{get:()=>e[A],enumerable:!(l=k5(e,A))||l.enumerable});return o},Ou=(o,e,s)=>(Nu(o,e,"default"),s&&Nu(s,e,"default")),W5=(o,e,s)=>(s=o!=null?N5(Z5(o)):{},Nu(e||!o||!o.__esModule?ku(s,"default",{value:o,enumerable:!0}):s,o)),z5=o=>Nu(ku({},"__esModule",{value:!0}),o);var Sd=da((xU,Id)=>{Id.exports=globalThis.loaders});var _f=da(()=>{});var Ip=da(()=>{});var $o={};Ai($o,{LASArrowLoader:()=>Tp,LASFormat:()=>Zu,LASLoader:()=>Us,LASWorkerLoader:()=>C0,LAZPerfLoader:()=>Us,LAZRsLoader:()=>zp});Ou($o,W5(Sd(),1));var Zu={name:"LAS",id:"las",module:"las",extensions:["las","laz"],mimeTypes:["application/octet-stream"],text:!1,binary:!0,tests:["LASF"]};var E5="4.4.0-alpha.10",C0={...Zu,dataType:null,batchType:null,version:E5,worker:!0,options:{las:{shape:"mesh",fp64:!1,skip:1,colorDepth:8}}};function X5(o,e="float32"){return o instanceof Date?"date-millisecond":o instanceof Number?e:typeof o=="string"?"utf8":(o===null||o==="undefined","null")}function bd(o){let e=Aa(o);return e!=="null"?{type:e,nullable:!1}:o.length>0?(e=X5(o[0]),{type:e,nullable:!0}):{type:"null",nullable:!0}}function Aa(o){switch(o.constructor){case Int8Array:return"int8";case Uint8Array:case Uint8ClampedArray:return"uint8";case Int16Array:return"int16";case Uint16Array:return"uint16";case Int32Array:return"int32";case Uint32Array:return"uint32";case Float32Array:return"float32";case Float64Array:return"float64";default:return"null"}}function Ud(o,e){var s={};for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&e.indexOf(l)<0&&(s[l]=o[l]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function")for(var A=0,l=Object.getOwnPropertySymbols(o);A<l.length;A++)e.indexOf(l[A])<0&&Object.prototype.propertyIsEnumerable.call(o,l[A])&&(s[l[A]]=o[l[A]]);return s}function Q(o,e,s,l){function A(p){return p instanceof s?p:new s(function(w){w(p)})}return new(s||(s=Promise))(function(p,w){function F(V){try{R(l.next(V))}catch(X){w(X)}}function S(V){try{R(l.throw(V))}catch(X){w(X)}}function R(V){V.done?p(V.value):A(V.value).then(F,S)}R((l=l.apply(o,e||[])).next())})}function Td(o){var e=typeof Symbol=="function"&&Symbol.iterator,s=e&&o[e],l=0;if(s)return s.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&l>=o.length&&(o=void 0),{value:o&&o[l++],done:!o}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function yt(o){return this instanceof yt?(this.v=o,this):new yt(o)}function wr(o,e,s){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l=s.apply(o,e||[]),A,p=[];return A=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),F("next"),F("throw"),F("return",w),A[Symbol.asyncIterator]=function(){return this},A;function w(mt){return function(Xt){return Promise.resolve(Xt).then(mt,X)}}function F(mt,Xt){l[mt]&&(A[mt]=function(br){return new Promise(function(Jr,xe){p.push([mt,br,Jr,xe])>1||S(mt,br)})},Xt&&(A[mt]=Xt(A[mt])))}function S(mt,Xt){try{R(l[mt](Xt))}catch(br){at(p[0][3],br)}}function R(mt){mt.value instanceof yt?Promise.resolve(mt.value.v).then(V,X):at(p[0][2],mt)}function V(mt){S("next",mt)}function X(mt){S("throw",mt)}function at(mt,Xt){mt(Xt),p.shift(),p.length&&S(p[0][0],p[0][1])}}function G0(o){var e,s;return e={},l("next"),l("throw",function(A){throw A}),l("return"),e[Symbol.iterator]=function(){return this},e;function l(A,p){e[A]=o[A]?function(w){return(s=!s)?{value:yt(o[A](w)),done:!1}:p?p(w):w}:p}}function Qr(o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=o[Symbol.asyncIterator],s;return e?e.call(o):(o=typeof Td=="function"?Td(o):o[Symbol.iterator](),s={},l("next"),l("throw"),l("return"),s[Symbol.asyncIterator]=function(){return this},s);function l(p){s[p]=o[p]&&function(w){return new Promise(function(F,S){w=o[p](w),A(F,S,w.done,w.value)})}}function A(p,w,F,S){Promise.resolve(S).then(function(R){p({value:R,done:F})},w)}}var _a={};Ai(_a,{compareArrayLike:()=>wa,joinUint8Arrays:()=>_r,memcpy:()=>oo,rebaseValueOffsets:()=>ju,toArrayBufferView:()=>wt,toArrayBufferViewAsyncIterator:()=>Kr,toArrayBufferViewIterator:()=>vn,toBigInt64Array:()=>Gu,toBigUint64Array:()=>Q5,toFloat32Array:()=>$5,toFloat32ArrayAsyncIterator:()=>dS,toFloat32ArrayIterator:()=>sS,toFloat64Array:()=>q5,toFloat64ArrayAsyncIterator:()=>AS,toFloat64ArrayIterator:()=>oS,toInt16Array:()=>Y5,toInt16ArrayAsyncIterator:()=>lS,toInt16ArrayIterator:()=>eS,toInt32Array:()=>ji,toInt32ArrayAsyncIterator:()=>aS,toInt32ArrayIterator:()=>rS,toInt8Array:()=>J5,toInt8ArrayAsyncIterator:()=>cS,toInt8ArrayIterator:()=>tS,toUint16Array:()=>P5,toUint16ArrayAsyncIterator:()=>fS,toUint16ArrayIterator:()=>nS,toUint32Array:()=>H5,toUint32ArrayAsyncIterator:()=>hS,toUint32ArrayIterator:()=>iS,toUint8Array:()=>st,toUint8ArrayAsyncIterator:()=>ga,toUint8ArrayIterator:()=>ya,toUint8ClampedArray:()=>K5,toUint8ClampedArrayAsyncIterator:()=>pS,toUint8ClampedArrayIterator:()=>uS});var C5=new TextDecoder("utf-8"),io=o=>C5.decode(o),G5=new TextEncoder,_n=o=>G5.encode(o);var j5=o=>typeof o=="number",Rd=o=>typeof o=="boolean",ye=o=>typeof o=="function",Ce=o=>o!=null&&Object(o)===o,$r=o=>Ce(o)&&ye(o.then);var qr=o=>Ce(o)&&ye(o[Symbol.iterator]),Zr=o=>Ce(o)&&ye(o[Symbol.asyncIterator]),Du=o=>Ce(o)&&Ce(o.schema);var Wu=o=>Ce(o)&&"done"in o&&"value"in o;var zu=o=>Ce(o)&&ye(o.stat)&&j5(o.fd);var Eu=o=>Ce(o)&&so(o.body),Xu=o=>"_getDOMStream"in o&&"_getNodeStream"in o,Vd=o=>Ce(o)&&ye(o.abort)&&ye(o.getWriter)&&!Xu(o),so=o=>Ce(o)&&ye(o.cancel)&&ye(o.getReader)&&!Xu(o),xd=o=>Ce(o)&&ye(o.end)&&ye(o.write)&&Rd(o.writable)&&!Xu(o),Cu=o=>Ce(o)&&ye(o.read)&&ye(o.pipe)&&Rd(o.readable)&&!Xu(o),Md=o=>Ce(o)&&ye(o.clear)&&ye(o.bytes)&&ye(o.position)&&ye(o.setPosition)&&ye(o.capacity)&&ye(o.getBufferIdentifier)&&ye(o.createLong);var ma=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;function L5(o){let e=o[0]?[o[0]]:[],s,l,A,p;for(let w,F,S=0,R=0,V=o.length;++S<V;){if(w=e[R],F=o[S],!w||!F||w.buffer!==F.buffer||F.byteOffset<w.byteOffset){F&&(e[++R]=F);continue}if({byteOffset:s,byteLength:A}=w,{byteOffset:l,byteLength:p}=F,s+A<l||l+p<s){F&&(e[++R]=F);continue}e[R]=new Uint8Array(w.buffer,s,l-s+p)}return e}function oo(o,e,s=0,l=e.byteLength){let A=o.byteLength,p=new Uint8Array(o.buffer,o.byteOffset,A),w=new Uint8Array(e.buffer,e.byteOffset,Math.min(l,A));return p.set(w,s),o}function _r(o,e){let s=L5(o),l=s.reduce((V,X)=>V+X.byteLength,0),A,p,w,F=0,S=-1,R=Math.min(e||Number.POSITIVE_INFINITY,l);for(let V=s.length;++S<V;){if(A=s[S],p=A.subarray(0,Math.min(A.length,R-F)),R<=F+p.length){p.length<A.length?s[S]=A.subarray(p.length):p.length===A.length&&S++,w?oo(w,p,F):w=p;break}oo(w||(w=new Uint8Array(R)),p,F),F+=p.length}return[w||new Uint8Array(0),s.slice(S),l-(w?w.byteLength:0)]}function wt(o,e){let s=Wu(e)?e.value:e;return s instanceof o?o===Uint8Array?new o(s.buffer,s.byteOffset,s.byteLength):s:s?(typeof s=="string"&&(s=_n(s)),s instanceof ArrayBuffer?new o(s):s instanceof ma?new o(s):Md(s)?wt(o,s.bytes()):ArrayBuffer.isView(s)?s.byteLength<=0?new o(0):new o(s.buffer,s.byteOffset,s.byteLength/o.BYTES_PER_ELEMENT):o.from(s)):new o(0)}var J5=o=>wt(Int8Array,o),Y5=o=>wt(Int16Array,o),ji=o=>wt(Int32Array,o),Gu=o=>wt(BigInt64Array,o),st=o=>wt(Uint8Array,o),P5=o=>wt(Uint16Array,o),H5=o=>wt(Uint32Array,o),Q5=o=>wt(BigUint64Array,o),$5=o=>wt(Float32Array,o),q5=o=>wt(Float64Array,o),K5=o=>wt(Uint8ClampedArray,o),pa=o=>(o.next(),o);function*vn(o,e){let s=function*(A){yield A},l=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof ma?s(e):qr(e)?e:s(e);return yield*pa(function*(A){let p=null;do p=A.next(yield wt(o,p));while(!p.done)}(l[Symbol.iterator]())),new o}var tS=o=>vn(Int8Array,o),eS=o=>vn(Int16Array,o),rS=o=>vn(Int32Array,o),ya=o=>vn(Uint8Array,o),nS=o=>vn(Uint16Array,o),iS=o=>vn(Uint32Array,o),sS=o=>vn(Float32Array,o),oS=o=>vn(Float64Array,o),uS=o=>vn(Uint8ClampedArray,o);function Kr(o,e){return wr(this,arguments,function*(){if($r(e))return yield yt(yield yt(yield*G0(Qr(Kr(o,yield yt(e))))));let l=function(w){return wr(this,arguments,function*(){yield yield yt(yield yt(w))})},A=function(w){return wr(this,arguments,function*(){yield yt(yield*G0(Qr(pa(function*(F){let S=null;do S=F.next(yield S?.value);while(!S.done)}(w[Symbol.iterator]())))))})},p=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof ma?l(e):qr(e)?A(e):Zr(e)?e:l(e);return yield yt(yield*G0(Qr(pa(function(w){return wr(this,arguments,function*(){let F=null;do F=yield yt(w.next(yield yield yt(wt(o,F))));while(!F.done)})}(p[Symbol.asyncIterator]()))))),yield yt(new o)})}var cS=o=>Kr(Int8Array,o),lS=o=>Kr(Int16Array,o),aS=o=>Kr(Int32Array,o),ga=o=>Kr(Uint8Array,o),fS=o=>Kr(Uint16Array,o),hS=o=>Kr(Uint32Array,o),dS=o=>Kr(Float32Array,o),AS=o=>Kr(Float64Array,o),pS=o=>Kr(Uint8ClampedArray,o);function ju(o,e,s){if(o!==0){s=s.slice(0,e);for(let l=-1,A=s.length;++l<A;)s[l]+=o}return s.subarray(0,e)}function wa(o,e){let s=0,l=o.length;if(l!==e.length)return!1;if(l>0)do if(o[s]!==e[s])return!1;while(++s<l);return!0}var Ue={fromIterable(o){return Lu(mS(o))},fromAsyncIterable(o){return Lu(yS(o))},fromDOMStream(o){return Lu(gS(o))},fromNodeStream(o){return Lu(wS(o))},toDOMStream(o,e){throw new Error('"toDOMStream" not available in this environment')},toNodeStream(o,e){throw new Error('"toNodeStream" not available in this environment')}},Lu=o=>(o.next(),o);function*mS(o){let e,s=!1,l=[],A,p,w,F=0;function S(){return p==="peek"?_r(l,w)[0]:([A,l,F]=_r(l,w),A)}({cmd:p,size:w}=(yield(()=>null)())||{cmd:"read",size:0});let R=ya(o)[Symbol.iterator]();try{do if({done:e,value:A}=Number.isNaN(w-F)?R.next():R.next(w-F),!e&&A.byteLength>0&&(l.push(A),F+=A.byteLength),e||w<=F)do({cmd:p,size:w}=yield S());while(w<F);while(!e)}catch(V){(s=!0)&&typeof R.throw=="function"&&R.throw(V)}finally{s===!1&&typeof R.return=="function"&&R.return(null)}return null}function yS(o){return wr(this,arguments,function*(){let s,l=!1,A=[],p,w,F,S=0;function R(){return w==="peek"?_r(A,F)[0]:([p,A,S]=_r(A,F),p)}({cmd:w,size:F}=(yield yield yt((()=>null)()))||{cmd:"read",size:0});let V=ga(o)[Symbol.asyncIterator]();try{do if({done:s,value:p}=Number.isNaN(F-S)?yield yt(V.next()):yield yt(V.next(F-S)),!s&&p.byteLength>0&&(A.push(p),S+=p.byteLength),s||F<=S)do({cmd:w,size:F}=yield yield yt(R()));while(F<S);while(!s)}catch(X){(l=!0)&&typeof V.throw=="function"&&(yield yt(V.throw(X)))}finally{l===!1&&typeof V.return=="function"&&(yield yt(V.return(new Uint8Array(0))))}return yield yt(null)})}function gS(o){return wr(this,arguments,function*(){let s=!1,l=!1,A=[],p,w,F,S=0;function R(){return w==="peek"?_r(A,F)[0]:([p,A,S]=_r(A,F),p)}({cmd:w,size:F}=(yield yield yt((()=>null)()))||{cmd:"read",size:0});let V=new Fa(o);try{do if({done:s,value:p}=Number.isNaN(F-S)?yield yt(V.read()):yield yt(V.read(F-S)),!s&&p.byteLength>0&&(A.push(st(p)),S+=p.byteLength),s||F<=S)do({cmd:w,size:F}=yield yield yt(R()));while(F<S);while(!s)}catch(X){(l=!0)&&(yield yt(V.cancel(X)))}finally{l===!1?yield yt(V.cancel()):o.locked&&V.releaseLock()}return yield yt(null)})}var Fa=class{constructor(e){this.source=e,this.reader=null,this.reader=this.source.getReader(),this.reader.closed.catch(()=>{})}get closed(){return this.reader?this.reader.closed.catch(()=>{}):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=null}cancel(e){return Q(this,void 0,void 0,function*(){let{reader:s,source:l}=this;s&&(yield s.cancel(e).catch(()=>{})),l&&l.locked&&this.releaseLock()})}read(e){return Q(this,void 0,void 0,function*(){if(e===0)return{done:this.reader==null,value:new Uint8Array(0)};let s=yield this.reader.read();return!s.done&&(s.value=st(s)),s})}},va=(o,e)=>{let s=A=>l([e,A]),l;return[e,s,new Promise(A=>(l=A)&&o.once(e,s))]};function wS(o){return wr(this,arguments,function*(){let s=[],l="error",A=!1,p=null,w,F,S=0,R=[],V;function X(){return w==="peek"?_r(R,F)[0]:([V,R,S]=_r(R,F),V)}if({cmd:w,size:F}=(yield yield yt((()=>null)()))||{cmd:"read",size:0},o.isTTY)return yield yield yt(new Uint8Array(0)),yield yt(null);try{s[0]=va(o,"end"),s[1]=va(o,"error");do{if(s[2]=va(o,"readable"),[l,p]=yield yt(Promise.race(s.map(mt=>mt[2]))),l==="error")break;if((A=l==="end")||(Number.isFinite(F-S)?(V=st(o.read(F-S)),V.byteLength<F-S&&(V=st(o.read()))):V=st(o.read()),V.byteLength>0&&(R.push(V),S+=V.byteLength)),A||F<=S)do({cmd:w,size:F}=yield yield yt(X()));while(F<S)}while(!A)}finally{yield yt(at(s,l==="error"?p:null))}return yield yt(null);function at(mt,Xt){return V=R=null,new Promise((br,Jr)=>{for(let[xe,Fi]of mt)o.off(xe,Fi);try{let xe=o.destroy;xe&&xe.call(o,Xt),Xt=void 0}catch(xe){Xt=xe||Xt}finally{Xt!=null?Jr(Xt):br()}})}})}var Zt;(function(o){o[o.V1=0]="V1",o[o.V2=1]="V2",o[o.V3=2]="V3",o[o.V4=3]="V4",o[o.V5=4]="V5"})(Zt||(Zt={}));var Gt;(function(o){o[o.Sparse=0]="Sparse",o[o.Dense=1]="Dense"})(Gt||(Gt={}));var zt;(function(o){o[o.HALF=0]="HALF",o[o.SINGLE=1]="SINGLE",o[o.DOUBLE=2]="DOUBLE"})(zt||(zt={}));var Kt;(function(o){o[o.DAY=0]="DAY",o[o.MILLISECOND=1]="MILLISECOND"})(Kt||(Kt={}));var H;(function(o){o[o.SECOND=0]="SECOND",o[o.MILLISECOND=1]="MILLISECOND",o[o.MICROSECOND=2]="MICROSECOND",o[o.NANOSECOND=3]="NANOSECOND"})(H||(H={}));var ce;(function(o){o[o.YEAR_MONTH=0]="YEAR_MONTH",o[o.DAY_TIME=1]="DAY_TIME",o[o.MONTH_DAY_NANO=2]="MONTH_DAY_NANO"})(ce||(ce={}));var Fn=new Int32Array(2),Ju=new Float32Array(Fn.buffer),Yu=new Float64Array(Fn.buffer),j0=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;var uo;(function(o){o[o.UTF8_BYTES=1]="UTF8_BYTES",o[o.UTF16_STRING=2]="UTF16_STRING"})(uo||(uo={}));var Ge=class{constructor(e){this.bytes_=e,this.position_=0,this.text_decoder_=new TextDecoder}static allocate(e){return new Ge(new Uint8Array(e))}clear(){this.position_=0}bytes(){return this.bytes_}position(){return this.position_}setPosition(e){this.position_=e}capacity(){return this.bytes_.length}readInt8(e){return this.readUint8(e)<<24>>24}readUint8(e){return this.bytes_[e]}readInt16(e){return this.readUint16(e)<<16>>16}readUint16(e){return this.bytes_[e]|this.bytes_[e+1]<<8}readInt32(e){return this.bytes_[e]|this.bytes_[e+1]<<8|this.bytes_[e+2]<<16|this.bytes_[e+3]<<24}readUint32(e){return this.readInt32(e)>>>0}readInt64(e){return BigInt.asIntN(64,BigInt(this.readUint32(e))+(BigInt(this.readUint32(e+4))<<BigInt(32)))}readUint64(e){return BigInt.asUintN(64,BigInt(this.readUint32(e))+(BigInt(this.readUint32(e+4))<<BigInt(32)))}readFloat32(e){return Fn[0]=this.readInt32(e),Ju[0]}readFloat64(e){return Fn[j0?0:1]=this.readInt32(e),Fn[j0?1:0]=this.readInt32(e+4),Yu[0]}writeInt8(e,s){this.bytes_[e]=s}writeUint8(e,s){this.bytes_[e]=s}writeInt16(e,s){this.bytes_[e]=s,this.bytes_[e+1]=s>>8}writeUint16(e,s){this.bytes_[e]=s,this.bytes_[e+1]=s>>8}writeInt32(e,s){this.bytes_[e]=s,this.bytes_[e+1]=s>>8,this.bytes_[e+2]=s>>16,this.bytes_[e+3]=s>>24}writeUint32(e,s){this.bytes_[e]=s,this.bytes_[e+1]=s>>8,this.bytes_[e+2]=s>>16,this.bytes_[e+3]=s>>24}writeInt64(e,s){this.writeInt32(e,Number(BigInt.asIntN(32,s))),this.writeInt32(e+4,Number(BigInt.asIntN(32,s>>BigInt(32))))}writeUint64(e,s){this.writeUint32(e,Number(BigInt.asUintN(32,s))),this.writeUint32(e+4,Number(BigInt.asUintN(32,s>>BigInt(32))))}writeFloat32(e,s){Ju[0]=s,this.writeInt32(e,Fn[0])}writeFloat64(e,s){Yu[0]=s,this.writeInt32(e,Fn[j0?0:1]),this.writeInt32(e+4,Fn[j0?1:0])}getBufferIdentifier(){if(this.bytes_.length<this.position_+4+4)throw new Error("FlatBuffers: ByteBuffer is too short to contain an identifier.");let e="";for(let s=0;s<4;s++)e+=String.fromCharCode(this.readInt8(this.position_+4+s));return e}__offset(e,s){let l=e-this.readInt32(e);return s<this.readInt16(l)?this.readInt16(l+s):0}__union(e,s){return e.bb_pos=s+this.readInt32(s),e.bb=this,e}__string(e,s){e+=this.readInt32(e);let l=this.readInt32(e);e+=4;let A=this.bytes_.subarray(e,e+l);return s===uo.UTF8_BYTES?A:this.text_decoder_.decode(A)}__union_with_string(e,s){return typeof e=="string"?this.__string(s):this.__union(e,s)}__indirect(e){return e+this.readInt32(e)}__vector(e){return e+this.readInt32(e)+4}__vector_len(e){return this.readInt32(e+this.readInt32(e))}__has_identifier(e){if(e.length!=4)throw new Error("FlatBuffers: file identifier must be length "+4);for(let s=0;s<4;s++)if(e.charCodeAt(s)!=this.readInt8(this.position()+4+s))return!1;return!0}createScalarList(e,s){let l=[];for(let A=0;A<s;++A){let p=e(A);p!==null&&l.push(p)}return l}createObjList(e,s){let l=[];for(let A=0;A<s;++A){let p=e(A);p!==null&&l.push(p.unpack())}return l}};var Yn=class{constructor(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,this.string_maps=null,this.text_encoder=new TextEncoder;let s;e?s=e:s=1024,this.bb=Ge.allocate(s),this.space=s}clear(){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,this.string_maps=null}forceDefaults(e){this.force_defaults=e}dataBuffer(){return this.bb}asUint8Array(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())}prep(e,s){e>this.minalign&&(this.minalign=e);let l=~(this.bb.capacity()-this.space+s)+1&e-1;for(;this.space<l+e+s;){let A=this.bb.capacity();this.bb=Yn.growByteBuffer(this.bb),this.space+=this.bb.capacity()-A}this.pad(l)}pad(e){for(let s=0;s<e;s++)this.bb.writeInt8(--this.space,0)}writeInt8(e){this.bb.writeInt8(this.space-=1,e)}writeInt16(e){this.bb.writeInt16(this.space-=2,e)}writeInt32(e){this.bb.writeInt32(this.space-=4,e)}writeInt64(e){this.bb.writeInt64(this.space-=8,e)}writeFloat32(e){this.bb.writeFloat32(this.space-=4,e)}writeFloat64(e){this.bb.writeFloat64(this.space-=8,e)}addInt8(e){this.prep(1,0),this.writeInt8(e)}addInt16(e){this.prep(2,0),this.writeInt16(e)}addInt32(e){this.prep(4,0),this.writeInt32(e)}addInt64(e){this.prep(8,0),this.writeInt64(e)}addFloat32(e){this.prep(4,0),this.writeFloat32(e)}addFloat64(e){this.prep(8,0),this.writeFloat64(e)}addFieldInt8(e,s,l){(this.force_defaults||s!=l)&&(this.addInt8(s),this.slot(e))}addFieldInt16(e,s,l){(this.force_defaults||s!=l)&&(this.addInt16(s),this.slot(e))}addFieldInt32(e,s,l){(this.force_defaults||s!=l)&&(this.addInt32(s),this.slot(e))}addFieldInt64(e,s,l){(this.force_defaults||s!==l)&&(this.addInt64(s),this.slot(e))}addFieldFloat32(e,s,l){(this.force_defaults||s!=l)&&(this.addFloat32(s),this.slot(e))}addFieldFloat64(e,s,l){(this.force_defaults||s!=l)&&(this.addFloat64(s),this.slot(e))}addFieldOffset(e,s,l){(this.force_defaults||s!=l)&&(this.addOffset(s),this.slot(e))}addFieldStruct(e,s,l){s!=l&&(this.nested(s),this.slot(e))}nested(e){if(e!=this.offset())throw new TypeError("FlatBuffers: struct must be serialized inline.")}notNested(){if(this.isNested)throw new TypeError("FlatBuffers: object serialization must not be nested.")}slot(e){this.vtable!==null&&(this.vtable[e]=this.offset())}offset(){return this.bb.capacity()-this.space}static growByteBuffer(e){let s=e.capacity();if(s&3221225472)throw new Error("FlatBuffers: cannot grow buffer beyond 2 gigabytes.");let l=s<<1,A=Ge.allocate(l);return A.setPosition(l-s),A.bytes().set(e.bytes(),l-s),A}addOffset(e){this.prep(4,0),this.writeInt32(this.offset()-e+4)}startObject(e){this.notNested(),this.vtable==null&&(this.vtable=[]),this.vtable_in_use=e;for(let s=0;s<e;s++)this.vtable[s]=0;this.isNested=!0,this.object_start=this.offset()}endObject(){if(this.vtable==null||!this.isNested)throw new Error("FlatBuffers: endObject called without startObject");this.addInt32(0);let e=this.offset(),s=this.vtable_in_use-1;for(;s>=0&&this.vtable[s]==0;s--);let l=s+1;for(;s>=0;s--)this.addInt16(this.vtable[s]!=0?e-this.vtable[s]:0);let A=2;this.addInt16(e-this.object_start);let p=(l+A)*2;this.addInt16(p);let w=0,F=this.space;t:for(s=0;s<this.vtables.length;s++){let S=this.bb.capacity()-this.vtables[s];if(p==this.bb.readInt16(S)){for(let R=2;R<p;R+=2)if(this.bb.readInt16(F+R)!=this.bb.readInt16(S+R))continue t;w=this.vtables[s];break}}return w?(this.space=this.bb.capacity()-e,this.bb.writeInt32(this.space,w-e)):(this.vtables.push(this.offset()),this.bb.writeInt32(this.bb.capacity()-e,this.offset()-e)),this.isNested=!1,e}finish(e,s,l){let A=l?4:0;if(s){let p=s;if(this.prep(this.minalign,4+4+A),p.length!=4)throw new TypeError("FlatBuffers: file identifier must be length "+4);for(let w=4-1;w>=0;w--)this.writeInt8(p.charCodeAt(w))}this.prep(this.minalign,4+A),this.addOffset(e),A&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)}finishSizePrefixed(e,s){this.finish(e,s,!0)}requiredField(e,s){let l=this.bb.capacity()-e,A=l-this.bb.readInt32(l);if(!(s<this.bb.readInt16(A)&&this.bb.readInt16(A+s)!=0))throw new TypeError("FlatBuffers: field "+s+" must be set")}startVector(e,s,l){this.notNested(),this.vector_num_elems=s,this.prep(4,e*s),this.prep(l,e*s)}endVector(){return this.writeInt32(this.vector_num_elems),this.offset()}createSharedString(e){if(!e)return 0;if(this.string_maps||(this.string_maps=new Map),this.string_maps.has(e))return this.string_maps.get(e);let s=this.createString(e);return this.string_maps.set(e,s),s}createString(e){if(e==null)return 0;let s;return e instanceof Uint8Array?s=e:s=this.text_encoder.encode(e),this.addInt8(0),this.startVector(1,s.length,1),this.bb.setPosition(this.space-=s.length),this.bb.bytes().set(s,this.space),this.endVector()}createByteVector(e){return e==null?0:(this.startVector(1,e.length,1),this.bb.setPosition(this.space-=e.length),this.bb.bytes().set(e,this.space),this.endVector())}createObjectOffset(e){return e===null?0:typeof e=="string"?this.createString(e):e.pack(this)}createObjectOffsetList(e){let s=[];for(let l=0;l<e.length;++l){let A=e[l];if(A!==null)s.push(this.createObjectOffset(A));else throw new TypeError("FlatBuffers: Argument for createObjectOffsetList cannot contain null.")}return s}createStructOffsetList(e,s){return s(this,e.length),this.createObjectOffsetList(e.slice().reverse()),this.endVector()}};var co;(function(o){o[o.BUFFER=0]="BUFFER"})(co||(co={}));var lo;(function(o){o[o.LZ4_FRAME=0]="LZ4_FRAME",o[o.ZSTD=1]="ZSTD"})(lo||(lo={}));var en=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsBodyCompression(e,s){return(s||new en).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBodyCompression(e,s){return e.setPosition(e.position()+4),(s||new en).__init(e.readInt32(e.position())+e.position(),e)}codec(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt8(this.bb_pos+e):lo.LZ4_FRAME}method(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt8(this.bb_pos+e):co.BUFFER}static startBodyCompression(e){e.startObject(2)}static addCodec(e,s){e.addFieldInt8(0,s,lo.LZ4_FRAME)}static addMethod(e,s){e.addFieldInt8(1,s,co.BUFFER)}static endBodyCompression(e){return e.endObject()}static createBodyCompression(e,s,l){return en.startBodyCompression(e),en.addCodec(e,s),en.addMethod(e,l),en.endBodyCompression(e)}};var L0=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}offset(){return this.bb.readInt64(this.bb_pos)}length(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createBuffer(e,s,l){return e.prep(8,16),e.writeInt64(BigInt(l??0)),e.writeInt64(BigInt(s??0)),e.offset()}};var J0=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}length(){return this.bb.readInt64(this.bb_pos)}nullCount(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createFieldNode(e,s,l){return e.prep(8,16),e.writeInt64(BigInt(l??0)),e.writeInt64(BigInt(s??0)),e.offset()}};var Oe=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsRecordBatch(e,s){return(s||new Oe).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsRecordBatch(e,s){return e.setPosition(e.position()+4),(s||new Oe).__init(e.readInt32(e.position())+e.position(),e)}length(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):BigInt("0")}nodes(e,s){let l=this.bb.__offset(this.bb_pos,6);return l?(s||new J0).__init(this.bb.__vector(this.bb_pos+l)+e*16,this.bb):null}nodesLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}buffers(e,s){let l=this.bb.__offset(this.bb_pos,8);return l?(s||new L0).__init(this.bb.__vector(this.bb_pos+l)+e*16,this.bb):null}buffersLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}compression(e){let s=this.bb.__offset(this.bb_pos,10);return s?(e||new en).__init(this.bb.__indirect(this.bb_pos+s),this.bb):null}static startRecordBatch(e){e.startObject(4)}static addLength(e,s){e.addFieldInt64(0,s,BigInt("0"))}static addNodes(e,s){e.addFieldOffset(1,s,0)}static startNodesVector(e,s){e.startVector(16,s,8)}static addBuffers(e,s){e.addFieldOffset(2,s,0)}static startBuffersVector(e,s){e.startVector(16,s,8)}static addCompression(e,s){e.addFieldOffset(3,s,0)}static endRecordBatch(e){return e.endObject()}};var Wr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsDictionaryBatch(e,s){return(s||new Wr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryBatch(e,s){return e.setPosition(e.position()+4),(s||new Wr).__init(e.readInt32(e.position())+e.position(),e)}id(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):BigInt("0")}data(e){let s=this.bb.__offset(this.bb_pos,6);return s?(e||new Oe).__init(this.bb.__indirect(this.bb_pos+s),this.bb):null}isDelta(){let e=this.bb.__offset(this.bb_pos,8);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startDictionaryBatch(e){e.startObject(3)}static addId(e,s){e.addFieldInt64(0,s,BigInt("0"))}static addData(e,s){e.addFieldOffset(1,s,0)}static addIsDelta(e,s){e.addFieldInt8(2,+s,0)}static endDictionaryBatch(e){return e.endObject()}};var pi;(function(o){o[o.Little=0]="Little",o[o.Big=1]="Big"})(pi||(pi={}));var ao;(function(o){o[o.DenseArray=0]="DenseArray"})(ao||(ao={}));var Fe=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsInt(e,s){return(s||new Fe).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInt(e,s){return e.setPosition(e.position()+4),(s||new Fe).__init(e.readInt32(e.position())+e.position(),e)}bitWidth(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}isSigned(){let e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startInt(e){e.startObject(2)}static addBitWidth(e,s){e.addFieldInt32(0,s,0)}static addIsSigned(e,s){e.addFieldInt8(1,+s,0)}static endInt(e){return e.endObject()}static createInt(e,s,l){return Fe.startInt(e),Fe.addBitWidth(e,s),Fe.addIsSigned(e,l),Fe.endInt(e)}};var vr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsDictionaryEncoding(e,s){return(s||new vr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryEncoding(e,s){return e.setPosition(e.position()+4),(s||new vr).__init(e.readInt32(e.position())+e.position(),e)}id(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):BigInt("0")}indexType(e){let s=this.bb.__offset(this.bb_pos,6);return s?(e||new Fe).__init(this.bb.__indirect(this.bb_pos+s),this.bb):null}isOrdered(){let e=this.bb.__offset(this.bb_pos,8);return e?!!this.bb.readInt8(this.bb_pos+e):!1}dictionaryKind(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt16(this.bb_pos+e):ao.DenseArray}static startDictionaryEncoding(e){e.startObject(4)}static addId(e,s){e.addFieldInt64(0,s,BigInt("0"))}static addIndexType(e,s){e.addFieldOffset(1,s,0)}static addIsOrdered(e,s){e.addFieldInt8(2,+s,0)}static addDictionaryKind(e,s){e.addFieldInt16(3,s,ao.DenseArray)}static endDictionaryEncoding(e){return e.endObject()}};var Ht=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsKeyValue(e,s){return(s||new Ht).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsKeyValue(e,s){return e.setPosition(e.position()+4),(s||new Ht).__init(e.readInt32(e.position())+e.position(),e)}key(e){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.__string(this.bb_pos+s,e):null}value(e){let s=this.bb.__offset(this.bb_pos,6);return s?this.bb.__string(this.bb_pos+s,e):null}static startKeyValue(e){e.startObject(2)}static addKey(e,s){e.addFieldOffset(0,s,0)}static addValue(e,s){e.addFieldOffset(1,s,0)}static endKeyValue(e){return e.endObject()}static createKeyValue(e,s,l){return Ht.startKeyValue(e),Ht.addKey(e,s),Ht.addValue(e,l),Ht.endKeyValue(e)}};var Bn=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsBinary(e,s){return(s||new Bn).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBinary(e,s){return e.setPosition(e.position()+4),(s||new Bn).__init(e.readInt32(e.position())+e.position(),e)}static startBinary(e){e.startObject(0)}static endBinary(e){return e.endObject()}static createBinary(e){return Bn.startBinary(e),Bn.endBinary(e)}};var In=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsBool(e,s){return(s||new In).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBool(e,s){return e.setPosition(e.position()+4),(s||new In).__init(e.readInt32(e.position())+e.position(),e)}static startBool(e){e.startObject(0)}static endBool(e){return e.endObject()}static createBool(e){return In.startBool(e),In.endBool(e)}};var He=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsDate(e,s){return(s||new He).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDate(e,s){return e.setPosition(e.position()+4),(s||new He).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Kt.MILLISECOND}static startDate(e){e.startObject(1)}static addUnit(e,s){e.addFieldInt16(0,s,Kt.MILLISECOND)}static endDate(e){return e.endObject()}static createDate(e,s){return He.startDate(e),He.addUnit(e,s),He.endDate(e)}};var Be=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsDecimal(e,s){return(s||new Be).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDecimal(e,s){return e.setPosition(e.position()+4),(s||new Be).__init(e.readInt32(e.position())+e.position(),e)}precision(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}scale(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):0}bitWidth(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readInt32(this.bb_pos+e):128}static startDecimal(e){e.startObject(3)}static addPrecision(e,s){e.addFieldInt32(0,s,0)}static addScale(e,s){e.addFieldInt32(1,s,0)}static addBitWidth(e,s){e.addFieldInt32(2,s,128)}static endDecimal(e){return e.endObject()}static createDecimal(e,s,l,A){return Be.startDecimal(e),Be.addPrecision(e,s),Be.addScale(e,l),Be.addBitWidth(e,A),Be.endDecimal(e)}};var Qe=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsDuration(e,s){return(s||new Qe).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDuration(e,s){return e.setPosition(e.position()+4),(s||new Qe).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):H.MILLISECOND}static startDuration(e){e.startObject(1)}static addUnit(e,s){e.addFieldInt16(0,s,H.MILLISECOND)}static endDuration(e){return e.endObject()}static createDuration(e,s){return Qe.startDuration(e),Qe.addUnit(e,s),Qe.endDuration(e)}};var $e=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsFixedSizeBinary(e,s){return(s||new $e).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeBinary(e,s){return e.setPosition(e.position()+4),(s||new $e).__init(e.readInt32(e.position())+e.position(),e)}byteWidth(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeBinary(e){e.startObject(1)}static addByteWidth(e,s){e.addFieldInt32(0,s,0)}static endFixedSizeBinary(e){return e.endObject()}static createFixedSizeBinary(e,s){return $e.startFixedSizeBinary(e),$e.addByteWidth(e,s),$e.endFixedSizeBinary(e)}};var qe=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsFixedSizeList(e,s){return(s||new qe).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeList(e,s){return e.setPosition(e.position()+4),(s||new qe).__init(e.readInt32(e.position())+e.position(),e)}listSize(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeList(e){e.startObject(1)}static addListSize(e,s){e.addFieldInt32(0,s,0)}static endFixedSizeList(e){return e.endObject()}static createFixedSizeList(e,s){return qe.startFixedSizeList(e),qe.addListSize(e,s),qe.endFixedSizeList(e)}};var Ke=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsFloatingPoint(e,s){return(s||new Ke).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFloatingPoint(e,s){return e.setPosition(e.position()+4),(s||new Ke).__init(e.readInt32(e.position())+e.position(),e)}precision(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):zt.HALF}static startFloatingPoint(e){e.startObject(1)}static addPrecision(e,s){e.addFieldInt16(0,s,zt.HALF)}static endFloatingPoint(e){return e.endObject()}static createFloatingPoint(e,s){return Ke.startFloatingPoint(e),Ke.addPrecision(e,s),Ke.endFloatingPoint(e)}};var tr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsInterval(e,s){return(s||new tr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInterval(e,s){return e.setPosition(e.position()+4),(s||new tr).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):ce.YEAR_MONTH}static startInterval(e){e.startObject(1)}static addUnit(e,s){e.addFieldInt16(0,s,ce.YEAR_MONTH)}static endInterval(e){return e.endObject()}static createInterval(e,s){return tr.startInterval(e),tr.addUnit(e,s),tr.endInterval(e)}};var Sn=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsLargeBinary(e,s){return(s||new Sn).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeBinary(e,s){return e.setPosition(e.position()+4),(s||new Sn).__init(e.readInt32(e.position())+e.position(),e)}static startLargeBinary(e){e.startObject(0)}static endLargeBinary(e){return e.endObject()}static createLargeBinary(e){return Sn.startLargeBinary(e),Sn.endLargeBinary(e)}};var bn=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsLargeUtf8(e,s){return(s||new bn).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeUtf8(e,s){return e.setPosition(e.position()+4),(s||new bn).__init(e.readInt32(e.position())+e.position(),e)}static startLargeUtf8(e){e.startObject(0)}static endLargeUtf8(e){return e.endObject()}static createLargeUtf8(e){return bn.startLargeUtf8(e),bn.endLargeUtf8(e)}};var Tn=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsList(e,s){return(s||new Tn).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsList(e,s){return e.setPosition(e.position()+4),(s||new Tn).__init(e.readInt32(e.position())+e.position(),e)}static startList(e){e.startObject(0)}static endList(e){return e.endObject()}static createList(e){return Tn.startList(e),Tn.endList(e)}};var er=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsMap(e,s){return(s||new er).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMap(e,s){return e.setPosition(e.position()+4),(s||new er).__init(e.readInt32(e.position())+e.position(),e)}keysSorted(){let e=this.bb.__offset(this.bb_pos,4);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startMap(e){e.startObject(1)}static addKeysSorted(e,s){e.addFieldInt8(0,+s,0)}static endMap(e){return e.endObject()}static createMap(e,s){return er.startMap(e),er.addKeysSorted(e,s),er.endMap(e)}};var Un=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsNull(e,s){return(s||new Un).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsNull(e,s){return e.setPosition(e.position()+4),(s||new Un).__init(e.readInt32(e.position())+e.position(),e)}static startNull(e){e.startObject(0)}static endNull(e){return e.endObject()}static createNull(e){return Un.startNull(e),Un.endNull(e)}};var Rn=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsStruct_(e,s){return(s||new Rn).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsStruct_(e,s){return e.setPosition(e.position()+4),(s||new Rn).__init(e.readInt32(e.position())+e.position(),e)}static startStruct_(e){e.startObject(0)}static endStruct_(e){return e.endObject()}static createStruct_(e){return Rn.startStruct_(e),Rn.endStruct_(e)}};var Ze=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsTime(e,s){return(s||new Ze).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTime(e,s){return e.setPosition(e.position()+4),(s||new Ze).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):H.MILLISECOND}bitWidth(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):32}static startTime(e){e.startObject(2)}static addUnit(e,s){e.addFieldInt16(0,s,H.MILLISECOND)}static addBitWidth(e,s){e.addFieldInt32(1,s,32)}static endTime(e){return e.endObject()}static createTime(e,s,l){return Ze.startTime(e),Ze.addUnit(e,s),Ze.addBitWidth(e,l),Ze.endTime(e)}};var De=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsTimestamp(e,s){return(s||new De).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTimestamp(e,s){return e.setPosition(e.position()+4),(s||new De).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):H.SECOND}timezone(e){let s=this.bb.__offset(this.bb_pos,6);return s?this.bb.__string(this.bb_pos+s,e):null}static startTimestamp(e){e.startObject(2)}static addUnit(e,s){e.addFieldInt16(0,s,H.SECOND)}static addTimezone(e,s){e.addFieldOffset(1,s,0)}static endTimestamp(e){return e.endObject()}static createTimestamp(e,s,l){return De.startTimestamp(e),De.addUnit(e,s),De.addTimezone(e,l),De.endTimestamp(e)}};var Ie=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsUnion(e,s){return(s||new Ie).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUnion(e,s){return e.setPosition(e.position()+4),(s||new Ie).__init(e.readInt32(e.position())+e.position(),e)}mode(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Gt.Sparse}typeIds(e){let s=this.bb.__offset(this.bb_pos,6);return s?this.bb.readInt32(this.bb.__vector(this.bb_pos+s)+e*4):0}typeIdsLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}typeIdsArray(){let e=this.bb.__offset(this.bb_pos,6);return e?new Int32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}static startUnion(e){e.startObject(2)}static addMode(e,s){e.addFieldInt16(0,s,Gt.Sparse)}static addTypeIds(e,s){e.addFieldOffset(1,s,0)}static createTypeIdsVector(e,s){e.startVector(4,s.length,4);for(let l=s.length-1;l>=0;l--)e.addInt32(s[l]);return e.endVector()}static startTypeIdsVector(e,s){e.startVector(4,s,4)}static endUnion(e){return e.endObject()}static createUnion(e,s,l){return Ie.startUnion(e),Ie.addMode(e,s),Ie.addTypeIds(e,l),Ie.endUnion(e)}};var Vn=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsUtf8(e,s){return(s||new Vn).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUtf8(e,s){return e.setPosition(e.position()+4),(s||new Vn).__init(e.readInt32(e.position())+e.position(),e)}static startUtf8(e){e.startObject(0)}static endUtf8(e){return e.endObject()}static createUtf8(e){return Vn.startUtf8(e),Vn.endUtf8(e)}};var jt;(function(o){o[o.NONE=0]="NONE",o[o.Null=1]="Null",o[o.Int=2]="Int",o[o.FloatingPoint=3]="FloatingPoint",o[o.Binary=4]="Binary",o[o.Utf8=5]="Utf8",o[o.Bool=6]="Bool",o[o.Decimal=7]="Decimal",o[o.Date=8]="Date",o[o.Time=9]="Time",o[o.Timestamp=10]="Timestamp",o[o.Interval=11]="Interval",o[o.List=12]="List",o[o.Struct_=13]="Struct_",o[o.Union=14]="Union",o[o.FixedSizeBinary=15]="FixedSizeBinary",o[o.FixedSizeList=16]="FixedSizeList",o[o.Map=17]="Map",o[o.Duration=18]="Duration",o[o.LargeBinary=19]="LargeBinary",o[o.LargeUtf8=20]="LargeUtf8",o[o.LargeList=21]="LargeList",o[o.RunEndEncoded=22]="RunEndEncoded"})(jt||(jt={}));var he=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsField(e,s){return(s||new he).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsField(e,s){return e.setPosition(e.position()+4),(s||new he).__init(e.readInt32(e.position())+e.position(),e)}name(e){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.__string(this.bb_pos+s,e):null}nullable(){let e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}typeType(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readUint8(this.bb_pos+e):jt.NONE}type(e){let s=this.bb.__offset(this.bb_pos,10);return s?this.bb.__union(e,this.bb_pos+s):null}dictionary(e){let s=this.bb.__offset(this.bb_pos,12);return s?(e||new vr).__init(this.bb.__indirect(this.bb_pos+s),this.bb):null}children(e,s){let l=this.bb.__offset(this.bb_pos,14);return l?(s||new he).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+l)+e*4),this.bb):null}childrenLength(){let e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,s){let l=this.bb.__offset(this.bb_pos,16);return l?(s||new Ht).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+l)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,16);return e?this.bb.__vector_len(this.bb_pos+e):0}static startField(e){e.startObject(7)}static addName(e,s){e.addFieldOffset(0,s,0)}static addNullable(e,s){e.addFieldInt8(1,+s,0)}static addTypeType(e,s){e.addFieldInt8(2,s,jt.NONE)}static addType(e,s){e.addFieldOffset(3,s,0)}static addDictionary(e,s){e.addFieldOffset(4,s,0)}static addChildren(e,s){e.addFieldOffset(5,s,0)}static createChildrenVector(e,s){e.startVector(4,s.length,4);for(let l=s.length-1;l>=0;l--)e.addOffset(s[l]);return e.endVector()}static startChildrenVector(e,s){e.startVector(4,s,4)}static addCustomMetadata(e,s){e.addFieldOffset(6,s,0)}static createCustomMetadataVector(e,s){e.startVector(4,s.length,4);for(let l=s.length-1;l>=0;l--)e.addOffset(s[l]);return e.endVector()}static startCustomMetadataVector(e,s){e.startVector(4,s,4)}static endField(e){return e.endObject()}};var se=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsSchema(e,s){return(s||new se).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsSchema(e,s){return e.setPosition(e.position()+4),(s||new se).__init(e.readInt32(e.position())+e.position(),e)}endianness(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):pi.Little}fields(e,s){let l=this.bb.__offset(this.bb_pos,6);return l?(s||new he).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+l)+e*4),this.bb):null}fieldsLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,s){let l=this.bb.__offset(this.bb_pos,8);return l?(s||new Ht).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+l)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}features(e){let s=this.bb.__offset(this.bb_pos,10);return s?this.bb.readInt64(this.bb.__vector(this.bb_pos+s)+e*8):BigInt(0)}featuresLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}static startSchema(e){e.startObject(4)}static addEndianness(e,s){e.addFieldInt16(0,s,pi.Little)}static addFields(e,s){e.addFieldOffset(1,s,0)}static createFieldsVector(e,s){e.startVector(4,s.length,4);for(let l=s.length-1;l>=0;l--)e.addOffset(s[l]);return e.endVector()}static startFieldsVector(e,s){e.startVector(4,s,4)}static addCustomMetadata(e,s){e.addFieldOffset(2,s,0)}static createCustomMetadataVector(e,s){e.startVector(4,s.length,4);for(let l=s.length-1;l>=0;l--)e.addOffset(s[l]);return e.endVector()}static startCustomMetadataVector(e,s){e.startVector(4,s,4)}static addFeatures(e,s){e.addFieldOffset(3,s,0)}static createFeaturesVector(e,s){e.startVector(8,s.length,8);for(let l=s.length-1;l>=0;l--)e.addInt64(s[l]);return e.endVector()}static startFeaturesVector(e,s){e.startVector(8,s,8)}static endSchema(e){return e.endObject()}static finishSchemaBuffer(e,s){e.finish(s)}static finishSizePrefixedSchemaBuffer(e,s){e.finish(s,void 0,!0)}static createSchema(e,s,l,A,p){return se.startSchema(e),se.addEndianness(e,s),se.addFields(e,l),se.addCustomMetadata(e,A),se.addFeatures(e,p),se.endSchema(e)}};var It;(function(o){o[o.NONE=0]="NONE",o[o.Schema=1]="Schema",o[o.DictionaryBatch=2]="DictionaryBatch",o[o.RecordBatch=3]="RecordBatch",o[o.Tensor=4]="Tensor",o[o.SparseTensor=5]="SparseTensor"})(It||(It={}));var x;(function(o){o[o.NONE=0]="NONE",o[o.Null=1]="Null",o[o.Int=2]="Int",o[o.Float=3]="Float",o[o.Binary=4]="Binary",o[o.Utf8=5]="Utf8",o[o.Bool=6]="Bool",o[o.Decimal=7]="Decimal",o[o.Date=8]="Date",o[o.Time=9]="Time",o[o.Timestamp=10]="Timestamp",o[o.Interval=11]="Interval",o[o.List=12]="List",o[o.Struct=13]="Struct",o[o.Union=14]="Union",o[o.FixedSizeBinary=15]="FixedSizeBinary",o[o.FixedSizeList=16]="FixedSizeList",o[o.Map=17]="Map",o[o.Duration=18]="Duration",o[o.LargeBinary=19]="LargeBinary",o[o.LargeUtf8=20]="LargeUtf8",o[o.Dictionary=-1]="Dictionary",o[o.Int8=-2]="Int8",o[o.Int16=-3]="Int16",o[o.Int32=-4]="Int32",o[o.Int64=-5]="Int64",o[o.Uint8=-6]="Uint8",o[o.Uint16=-7]="Uint16",o[o.Uint32=-8]="Uint32",o[o.Uint64=-9]="Uint64",o[o.Float16=-10]="Float16",o[o.Float32=-11]="Float32",o[o.Float64=-12]="Float64",o[o.DateDay=-13]="DateDay",o[o.DateMillisecond=-14]="DateMillisecond",o[o.TimestampSecond=-15]="TimestampSecond",o[o.TimestampMillisecond=-16]="TimestampMillisecond",o[o.TimestampMicrosecond=-17]="TimestampMicrosecond",o[o.TimestampNanosecond=-18]="TimestampNanosecond",o[o.TimeSecond=-19]="TimeSecond",o[o.TimeMillisecond=-20]="TimeMillisecond",o[o.TimeMicrosecond=-21]="TimeMicrosecond",o[o.TimeNanosecond=-22]="TimeNanosecond",o[o.DenseUnion=-23]="DenseUnion",o[o.SparseUnion=-24]="SparseUnion",o[o.IntervalDayTime=-25]="IntervalDayTime",o[o.IntervalYearMonth=-26]="IntervalYearMonth",o[o.DurationSecond=-27]="DurationSecond",o[o.DurationMillisecond=-28]="DurationMillisecond",o[o.DurationMicrosecond=-29]="DurationMicrosecond",o[o.DurationNanosecond=-30]="DurationNanosecond"})(x||(x={}));var rr;(function(o){o[o.OFFSET=0]="OFFSET",o[o.DATA=1]="DATA",o[o.VALIDITY=2]="VALIDITY",o[o.TYPE=3]="TYPE"})(rr||(rr={}));var Ca={};Ai(Ca,{clampRange:()=>Ao,createElementComparator:()=>wi,wrapIndex:()=>r0});var Ba={};Ai(Ba,{valueToString:()=>rn});function rn(o){if(o===null)return"null";if(o===void 0)return"undefined";switch(typeof o){case"number":return`${o}`;case"bigint":return`${o}`;case"string":return`"${o}"`}return typeof o[Symbol.toPrimitive]=="function"?o[Symbol.toPrimitive]("string"):ArrayBuffer.isView(o)?o instanceof BigInt64Array||o instanceof BigUint64Array?`[${[...o].map(e=>rn(e))}]`:`[${o}]`:ArrayBuffer.isView(o)?`[${o}]`:JSON.stringify(o,(e,s)=>typeof s=="bigint"?`${s}`:s)}var Ta={};Ai(Ta,{BN:()=>Li,bigNumToBigInt:()=>kd,bigNumToNumber:()=>ba,bigNumToString:()=>H0,isArrowBigNumSymbol:()=>Nd});function Rt(o){if(typeof o=="bigint"&&(o<Number.MIN_SAFE_INTEGER||o>Number.MAX_SAFE_INTEGER))throw new TypeError(`${o} is not safe to convert to a number.`);return Number(o)}function Ia(o,e){return Rt(o/e)+Rt(o%e)/Rt(e)}var Nd=Symbol.for("isArrowBigNum");function nn(o,...e){return e.length===0?Object.setPrototypeOf(wt(this.TypedArray,o),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(o,...e),this.constructor.prototype)}nn.prototype[Nd]=!0;nn.prototype.toJSON=function(){return`"${H0(this)}"`};nn.prototype.valueOf=function(o){return ba(this,o)};nn.prototype.toString=function(){return H0(this)};nn.prototype[Symbol.toPrimitive]=function(o="default"){switch(o){case"number":return ba(this);case"string":return H0(this);case"default":return kd(this)}return H0(this)};function Y0(...o){return nn.apply(this,o)}function P0(...o){return nn.apply(this,o)}function fo(...o){return nn.apply(this,o)}Object.setPrototypeOf(Y0.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(P0.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(fo.prototype,Object.create(Uint32Array.prototype));Object.assign(Y0.prototype,nn.prototype,{constructor:Y0,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array});Object.assign(P0.prototype,nn.prototype,{constructor:P0,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array});Object.assign(fo.prototype,nn.prototype,{constructor:fo,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});var _S=BigInt(4294967296)*BigInt(4294967296),vS=_S-BigInt(1);function ba(o,e){let{buffer:s,byteOffset:l,byteLength:A,signed:p}=o,w=new BigUint64Array(s,l,A/8),F=p&&w.at(-1)&BigInt(1)<<BigInt(63),S=BigInt(0),R=0;if(F){for(let V of w)S|=(V^vS)*(BigInt(1)<<BigInt(64*R++));S*=BigInt(-1),S-=BigInt(1)}else for(let V of w)S|=V*(BigInt(1)<<BigInt(64*R++));if(typeof e=="number"){let V=BigInt(Math.pow(10,e)),X=S/V,at=S%V;return Rt(X)+Rt(at)/Rt(V)}return Rt(S)}function H0(o){if(o.byteLength===8)return`${new o.BigIntArray(o.buffer,o.byteOffset,1)[0]}`;if(!o.signed)return Sa(o);let e=new Uint16Array(o.buffer,o.byteOffset,o.byteLength/2);if(new Int16Array([e.at(-1)])[0]>=0)return Sa(o);e=e.slice();let l=1;for(let p=0;p<e.length;p++){let w=e[p],F=~w+l;e[p]=F,l&=w===0?1:0}return`-${Sa(e)}`}function kd(o){return o.byteLength===8?new o.BigIntArray(o.buffer,o.byteOffset,1)[0]:H0(o)}function Sa(o){let e="",s=new Uint32Array(2),l=new Uint16Array(o.buffer,o.byteOffset,o.byteLength/2),A=new Uint32Array((l=new Uint16Array(l).reverse()).buffer),p=-1,w=l.length-1;do{for(s[0]=l[p=0];p<w;)l[p++]=s[1]=s[0]/10,s[0]=(s[0]-s[1]*10<<16)+l[p];l[p]=s[1]=s[0]/10,s[0]=s[0]-s[1]*10,e=`${s[0]}${e}`}while(A[0]||A[1]||A[2]||A[3]);return e??"0"}var Li=class{static new(e,s){switch(s){case!0:return new Y0(e);case!1:return new P0(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case BigInt64Array:return new Y0(e)}return e.byteLength===16?new fo(e):new P0(e)}static signed(e){return new Y0(e)}static unsigned(e){return new P0(e)}static decimal(e){return new fo(e)}constructor(e,s){return Li.new(e,s)}};var Od,Zd,Dd,Wd,zd,Ed,Xd,Cd,Gd,jd,Ld,Jd,Yd,Pd,Hd,Qd,$d,qd,Kd,tA,eA,rA,P=class{static isNull(e){return e?.typeId===x.Null}static isInt(e){return e?.typeId===x.Int}static isFloat(e){return e?.typeId===x.Float}static isBinary(e){return e?.typeId===x.Binary}static isLargeBinary(e){return e?.typeId===x.LargeBinary}static isUtf8(e){return e?.typeId===x.Utf8}static isLargeUtf8(e){return e?.typeId===x.LargeUtf8}static isBool(e){return e?.typeId===x.Bool}static isDecimal(e){return e?.typeId===x.Decimal}static isDate(e){return e?.typeId===x.Date}static isTime(e){return e?.typeId===x.Time}static isTimestamp(e){return e?.typeId===x.Timestamp}static isInterval(e){return e?.typeId===x.Interval}static isDuration(e){return e?.typeId===x.Duration}static isList(e){return e?.typeId===x.List}static isStruct(e){return e?.typeId===x.Struct}static isUnion(e){return e?.typeId===x.Union}static isFixedSizeBinary(e){return e?.typeId===x.FixedSizeBinary}static isFixedSizeList(e){return e?.typeId===x.FixedSizeList}static isMap(e){return e?.typeId===x.Map}static isDictionary(e){return e?.typeId===x.Dictionary}static isDenseUnion(e){return P.isUnion(e)&&e.mode===Gt.Dense}static isSparseUnion(e){return P.isUnion(e)&&e.mode===Gt.Sparse}constructor(e){this.typeId=e}};Od=Symbol.toStringTag;P[Od]=(o=>(o.children=null,o.ArrayType=Array,o.OffsetArrayType=Int32Array,o[Symbol.toStringTag]="DataType"))(P.prototype);var Se=class extends P{constructor(){super(x.Null)}toString(){return"Null"}};Zd=Symbol.toStringTag;Se[Zd]=(o=>o[Symbol.toStringTag]="Null")(Se.prototype);var le=class extends P{constructor(e,s){super(x.Int),this.isSigned=e,this.bitWidth=s}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?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}};Dd=Symbol.toStringTag;le[Dd]=(o=>(o.isSigned=null,o.bitWidth=null,o[Symbol.toStringTag]="Int"))(le.prototype);var Ji=class extends le{constructor(){super(!0,8)}get ArrayType(){return Int8Array}},Yi=class extends le{constructor(){super(!0,16)}get ArrayType(){return Int16Array}},Fr=class extends le{constructor(){super(!0,32)}get ArrayType(){return Int32Array}},Pi=class extends le{constructor(){super(!0,64)}get ArrayType(){return BigInt64Array}},Hi=class extends le{constructor(){super(!1,8)}get ArrayType(){return Uint8Array}},Qi=class extends le{constructor(){super(!1,16)}get ArrayType(){return Uint16Array}},$i=class extends le{constructor(){super(!1,32)}get ArrayType(){return Uint32Array}},qi=class extends le{constructor(){super(!1,64)}get ArrayType(){return BigUint64Array}};Object.defineProperty(Ji.prototype,"ArrayType",{value:Int8Array});Object.defineProperty(Yi.prototype,"ArrayType",{value:Int16Array});Object.defineProperty(Fr.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(Pi.prototype,"ArrayType",{value:BigInt64Array});Object.defineProperty(Hi.prototype,"ArrayType",{value:Uint8Array});Object.defineProperty(Qi.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty($i.prototype,"ArrayType",{value:Uint32Array});Object.defineProperty(qi.prototype,"ArrayType",{value:BigUint64Array});var nr=class extends P{constructor(e){super(x.Float),this.precision=e}get ArrayType(){switch(this.precision){case zt.HALF:return Uint16Array;case zt.SINGLE:return Float32Array;case zt.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};Wd=Symbol.toStringTag;nr[Wd]=(o=>(o.precision=null,o[Symbol.toStringTag]="Float"))(nr.prototype);var Ki=class extends nr{constructor(){super(zt.HALF)}},t0=class extends nr{constructor(){super(zt.SINGLE)}},e0=class extends nr{constructor(){super(zt.DOUBLE)}};Object.defineProperty(Ki.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(t0.prototype,"ArrayType",{value:Float32Array});Object.defineProperty(e0.prototype,"ArrayType",{value:Float64Array});var zr=class extends P{constructor(){super(x.Binary)}toString(){return"Binary"}};zd=Symbol.toStringTag;zr[zd]=(o=>(o.ArrayType=Uint8Array,o[Symbol.toStringTag]="Binary"))(zr.prototype);var xn=class extends P{constructor(){super(x.LargeBinary)}toString(){return"LargeBinary"}};Ed=Symbol.toStringTag;xn[Ed]=(o=>(o.ArrayType=Uint8Array,o.OffsetArrayType=BigInt64Array,o[Symbol.toStringTag]="LargeBinary"))(xn.prototype);var Er=class extends P{constructor(){super(x.Utf8)}toString(){return"Utf8"}};Xd=Symbol.toStringTag;Er[Xd]=(o=>(o.ArrayType=Uint8Array,o[Symbol.toStringTag]="Utf8"))(Er.prototype);var Mn=class extends P{constructor(){super(x.LargeUtf8)}toString(){return"LargeUtf8"}};Cd=Symbol.toStringTag;Mn[Cd]=(o=>(o.ArrayType=Uint8Array,o.OffsetArrayType=BigInt64Array,o[Symbol.toStringTag]="LargeUtf8"))(Mn.prototype);var Xr=class extends P{constructor(){super(x.Bool)}toString(){return"Bool"}};Gd=Symbol.toStringTag;Xr[Gd]=(o=>(o.ArrayType=Uint8Array,o[Symbol.toStringTag]="Bool"))(Xr.prototype);var Cr=class extends P{constructor(e,s,l=128){super(x.Decimal),this.scale=e,this.precision=s,this.bitWidth=l}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}};jd=Symbol.toStringTag;Cr[jd]=(o=>(o.scale=null,o.precision=null,o.ArrayType=Uint32Array,o[Symbol.toStringTag]="Decimal"))(Cr.prototype);var Br=class extends P{constructor(e){super(x.Date),this.unit=e}toString(){return`Date${(this.unit+1)*32}<${Kt[this.unit]}>`}get ArrayType(){return this.unit===Kt.DAY?Int32Array:BigInt64Array}};Ld=Symbol.toStringTag;Br[Ld]=(o=>(o.unit=null,o[Symbol.toStringTag]="Date"))(Br.prototype);var Q0=class extends Br{constructor(){super(Kt.DAY)}},$0=class extends Br{constructor(){super(Kt.MILLISECOND)}},je=class extends P{constructor(e,s){super(x.Time),this.unit=e,this.bitWidth=s}toString(){return`Time${this.bitWidth}<${H[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};Jd=Symbol.toStringTag;je[Jd]=(o=>(o.unit=null,o.bitWidth=null,o[Symbol.toStringTag]="Time"))(je.prototype);var q0=class extends je{constructor(){super(H.SECOND,32)}},K0=class extends je{constructor(){super(H.MILLISECOND,32)}},ts=class extends je{constructor(){super(H.MICROSECOND,64)}},es=class extends je{constructor(){super(H.NANOSECOND,64)}},Le=class extends P{constructor(e,s){super(x.Timestamp),this.unit=e,this.timezone=s}toString(){return`Timestamp<${H[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}};Yd=Symbol.toStringTag;Le[Yd]=(o=>(o.unit=null,o.timezone=null,o.ArrayType=BigInt64Array,o[Symbol.toStringTag]="Timestamp"))(Le.prototype);var rs=class extends Le{constructor(e){super(H.SECOND,e)}},ns=class extends Le{constructor(e){super(H.MILLISECOND,e)}},is=class extends Le{constructor(e){super(H.MICROSECOND,e)}},ss=class extends Le{constructor(e){super(H.NANOSECOND,e)}},Ir=class extends P{constructor(e){super(x.Interval),this.unit=e}toString(){return`Interval<${ce[this.unit]}>`}};Pd=Symbol.toStringTag;Ir[Pd]=(o=>(o.unit=null,o.ArrayType=Int32Array,o[Symbol.toStringTag]="Interval"))(Ir.prototype);var os=class extends Ir{constructor(){super(ce.DAY_TIME)}},us=class extends Ir{constructor(){super(ce.YEAR_MONTH)}},Nn=class extends P{constructor(e){super(x.Duration),this.unit=e}toString(){return`Duration<${H[this.unit]}>`}};Hd=Symbol.toStringTag;Nn[Hd]=(o=>(o.unit=null,o.ArrayType=BigInt64Array,o[Symbol.toStringTag]="Duration"))(Nn.prototype);var ir=class extends P{constructor(e){super(x.List),this.children=[e]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}};Qd=Symbol.toStringTag;ir[Qd]=(o=>(o.children=null,o[Symbol.toStringTag]="List"))(ir.prototype);var Wt=class extends P{constructor(e){super(x.Struct),this.children=e}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}};$d=Symbol.toStringTag;Wt[$d]=(o=>(o.children=null,o[Symbol.toStringTag]="Struct"))(Wt.prototype);var Gr=class extends P{constructor(e,s,l){super(x.Union),this.mode=e,this.children=l,this.typeIds=s=Int32Array.from(s),this.typeIdToChildIndex=s.reduce((A,p,w)=>(A[p]=w)&&A||A,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(" | ")}>`}};qd=Symbol.toStringTag;Gr[qd]=(o=>(o.mode=null,o.typeIds=null,o.children=null,o.typeIdToChildIndex=null,o.ArrayType=Int8Array,o[Symbol.toStringTag]="Union"))(Gr.prototype);var kn=class extends P{constructor(e){super(x.FixedSizeBinary),this.byteWidth=e}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};Kd=Symbol.toStringTag;kn[Kd]=(o=>(o.byteWidth=null,o.ArrayType=Uint8Array,o[Symbol.toStringTag]="FixedSizeBinary"))(kn.prototype);var We=class extends P{constructor(e,s){super(x.FixedSizeList),this.listSize=e,this.children=[s]}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}>`}};tA=Symbol.toStringTag;We[tA]=(o=>(o.children=null,o.listSize=null,o[Symbol.toStringTag]="FixedSizeList"))(We.prototype);var sr=class extends P{constructor(e,s=!1){var l,A,p;if(super(x.Map),this.children=[e],this.keysSorted=s,e&&(e.name="entries",!((l=e?.type)===null||l===void 0)&&l.children)){let w=(A=e?.type)===null||A===void 0?void 0:A.children[0];w&&(w.name="key");let F=(p=e?.type)===null||p===void 0?void 0:p.children[1];F&&(F.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}};eA=Symbol.toStringTag;sr[eA]=(o=>(o.children=null,o.keysSorted=null,o[Symbol.toStringTag]="Map_"))(sr.prototype);var FS=(o=>()=>++o)(-1),or=class extends P{constructor(e,s,l,A){super(x.Dictionary),this.indices=s,this.dictionary=e,this.isOrdered=A||!1,this.id=l==null?FS():Rt(l)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}};rA=Symbol.toStringTag;or[rA]=(o=>(o.id=null,o.indices=null,o.isOrdered=null,o.dictionary=null,o[Symbol.toStringTag]="Dictionary"))(or.prototype);function Sr(o){let e=o;switch(o.typeId){case x.Decimal:return o.bitWidth/32;case x.Interval:return 1+e.unit;case x.FixedSizeList:return e.listSize;case x.FixedSizeBinary:return e.byteWidth;default:return 1}}var K=class{visitMany(e,...s){return e.map((l,A)=>this.visit(l,...s.map(p=>p[A])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,s=!0){return BS(this,e,s)}getVisitFnByTypeId(e,s=!0){return cs(this,e,s)}visitNull(e,...s){return null}visitBool(e,...s){return null}visitInt(e,...s){return null}visitFloat(e,...s){return null}visitUtf8(e,...s){return null}visitLargeUtf8(e,...s){return null}visitBinary(e,...s){return null}visitLargeBinary(e,...s){return null}visitFixedSizeBinary(e,...s){return null}visitDate(e,...s){return null}visitTimestamp(e,...s){return null}visitTime(e,...s){return null}visitDecimal(e,...s){return null}visitList(e,...s){return null}visitStruct(e,...s){return null}visitUnion(e,...s){return null}visitDictionary(e,...s){return null}visitInterval(e,...s){return null}visitDuration(e,...s){return null}visitFixedSizeList(e,...s){return null}visitMap(e,...s){return null}};function BS(o,e,s=!0){return typeof e=="number"?cs(o,e,s):typeof e=="string"&&e in x?cs(o,x[e],s):e&&e instanceof P?cs(o,nA(e),s):e?.type&&e.type instanceof P?cs(o,nA(e.type),s):cs(o,x.NONE,s)}function cs(o,e,s=!0){let l=null;switch(e){case x.Null:l=o.visitNull;break;case x.Bool:l=o.visitBool;break;case x.Int:l=o.visitInt;break;case x.Int8:l=o.visitInt8||o.visitInt;break;case x.Int16:l=o.visitInt16||o.visitInt;break;case x.Int32:l=o.visitInt32||o.visitInt;break;case x.Int64:l=o.visitInt64||o.visitInt;break;case x.Uint8:l=o.visitUint8||o.visitInt;break;case x.Uint16:l=o.visitUint16||o.visitInt;break;case x.Uint32:l=o.visitUint32||o.visitInt;break;case x.Uint64:l=o.visitUint64||o.visitInt;break;case x.Float:l=o.visitFloat;break;case x.Float16:l=o.visitFloat16||o.visitFloat;break;case x.Float32:l=o.visitFloat32||o.visitFloat;break;case x.Float64:l=o.visitFloat64||o.visitFloat;break;case x.Utf8:l=o.visitUtf8;break;case x.LargeUtf8:l=o.visitLargeUtf8;break;case x.Binary:l=o.visitBinary;break;case x.LargeBinary:l=o.visitLargeBinary;break;case x.FixedSizeBinary:l=o.visitFixedSizeBinary;break;case x.Date:l=o.visitDate;break;case x.DateDay:l=o.visitDateDay||o.visitDate;break;case x.DateMillisecond:l=o.visitDateMillisecond||o.visitDate;break;case x.Timestamp:l=o.visitTimestamp;break;case x.TimestampSecond:l=o.visitTimestampSecond||o.visitTimestamp;break;case x.TimestampMillisecond:l=o.visitTimestampMillisecond||o.visitTimestamp;break;case x.TimestampMicrosecond:l=o.visitTimestampMicrosecond||o.visitTimestamp;break;case x.TimestampNanosecond:l=o.visitTimestampNanosecond||o.visitTimestamp;break;case x.Time:l=o.visitTime;break;case x.TimeSecond:l=o.visitTimeSecond||o.visitTime;break;case x.TimeMillisecond:l=o.visitTimeMillisecond||o.visitTime;break;case x.TimeMicrosecond:l=o.visitTimeMicrosecond||o.visitTime;break;case x.TimeNanosecond:l=o.visitTimeNanosecond||o.visitTime;break;case x.Decimal:l=o.visitDecimal;break;case x.List:l=o.visitList;break;case x.Struct:l=o.visitStruct;break;case x.Union:l=o.visitUnion;break;case x.DenseUnion:l=o.visitDenseUnion||o.visitUnion;break;case x.SparseUnion:l=o.visitSparseUnion||o.visitUnion;break;case x.Dictionary:l=o.visitDictionary;break;case x.Interval:l=o.visitInterval;break;case x.IntervalDayTime:l=o.visitIntervalDayTime||o.visitInterval;break;case x.IntervalYearMonth:l=o.visitIntervalYearMonth||o.visitInterval;break;case x.Duration:l=o.visitDuration;break;case x.DurationSecond:l=o.visitDurationSecond||o.visitDuration;break;case x.DurationMillisecond:l=o.visitDurationMillisecond||o.visitDuration;break;case x.DurationMicrosecond:l=o.visitDurationMicrosecond||o.visitDuration;break;case x.DurationNanosecond:l=o.visitDurationNanosecond||o.visitDuration;break;case x.FixedSizeList:l=o.visitFixedSizeList;break;case x.Map:l=o.visitMap;break}if(typeof l=="function")return l;if(!s)return()=>null;throw new Error(`Unrecognized type '${x[e]}'`)}function nA(o){switch(o.typeId){case x.Null:return x.Null;case x.Int:{let{bitWidth:e,isSigned:s}=o;switch(e){case 8:return s?x.Int8:x.Uint8;case 16:return s?x.Int16:x.Uint16;case 32:return s?x.Int32:x.Uint32;case 64:return s?x.Int64:x.Uint64}return x.Int}case x.Float:switch(o.precision){case zt.HALF:return x.Float16;case zt.SINGLE:return x.Float32;case zt.DOUBLE:return x.Float64}return x.Float;case x.Binary:return x.Binary;case x.LargeBinary:return x.LargeBinary;case x.Utf8:return x.Utf8;case x.LargeUtf8:return x.LargeUtf8;case x.Bool:return x.Bool;case x.Decimal:return x.Decimal;case x.Time:switch(o.unit){case H.SECOND:return x.TimeSecond;case H.MILLISECOND:return x.TimeMillisecond;case H.MICROSECOND:return x.TimeMicrosecond;case H.NANOSECOND:return x.TimeNanosecond}return x.Time;case x.Timestamp:switch(o.unit){case H.SECOND:return x.TimestampSecond;case H.MILLISECOND:return x.TimestampMillisecond;case H.MICROSECOND:return x.TimestampMicrosecond;case H.NANOSECOND:return x.TimestampNanosecond}return x.Timestamp;case x.Date:switch(o.unit){case Kt.DAY:return x.DateDay;case Kt.MILLISECOND:return x.DateMillisecond}return x.Date;case x.Interval:switch(o.unit){case ce.DAY_TIME:return x.IntervalDayTime;case ce.YEAR_MONTH:return x.IntervalYearMonth}return x.Interval;case x.Duration:switch(o.unit){case H.SECOND:return x.DurationSecond;case H.MILLISECOND:return x.DurationMillisecond;case H.MICROSECOND:return x.DurationMicrosecond;case H.NANOSECOND:return x.DurationNanosecond}return x.Duration;case x.Map:return x.Map;case x.List:return x.List;case x.Struct:return x.Struct;case x.Union:switch(o.mode){case Gt.Dense:return x.DenseUnion;case Gt.Sparse:return x.SparseUnion}return x.Union;case x.FixedSizeBinary:return x.FixedSizeBinary;case x.FixedSizeList:return x.FixedSizeList;case x.Dictionary:return x.Dictionary}throw new Error(`Unrecognized type '${x[o.typeId]}'`)}K.prototype.visitInt8=null;K.prototype.visitInt16=null;K.prototype.visitInt32=null;K.prototype.visitInt64=null;K.prototype.visitUint8=null;K.prototype.visitUint16=null;K.prototype.visitUint32=null;K.prototype.visitUint64=null;K.prototype.visitFloat16=null;K.prototype.visitFloat32=null;K.prototype.visitFloat64=null;K.prototype.visitDateDay=null;K.prototype.visitDateMillisecond=null;K.prototype.visitTimestampSecond=null;K.prototype.visitTimestampMillisecond=null;K.prototype.visitTimestampMicrosecond=null;K.prototype.visitTimestampNanosecond=null;K.prototype.visitTimeSecond=null;K.prototype.visitTimeMillisecond=null;K.prototype.visitTimeMicrosecond=null;K.prototype.visitTimeNanosecond=null;K.prototype.visitDenseUnion=null;K.prototype.visitSparseUnion=null;K.prototype.visitIntervalDayTime=null;K.prototype.visitIntervalYearMonth=null;K.prototype.visitDuration=null;K.prototype.visitDurationSecond=null;K.prototype.visitDurationMillisecond=null;K.prototype.visitDurationMicrosecond=null;K.prototype.visitDurationNanosecond=null;var Ua={};Ai(Ua,{float64ToUint16:()=>ho,uint16ToFloat64:()=>Hu});var iA=new Float64Array(1),ls=new Uint32Array(iA.buffer);function Hu(o){let e=(o&31744)>>10,s=(o&1023)/1024,l=Math.pow(-1,(o&32768)>>15);switch(e){case 31:return l*(s?Number.NaN:1/0);case 0:return l*(s?6103515625e-14*s:0)}return l*Math.pow(2,e-15)*(1+s)}function ho(o){if(o!==o)return 32256;iA[0]=o;let e=(ls[1]&2147483648)>>16&65535,s=ls[1]&2146435072,l=0;return s>=1089470464?ls[0]>0?s=31744:(s=(s&2080374784)>>16,l=(ls[1]&1048575)>>10):s<=1056964608?(l=1048576+(ls[1]&1048575),l=1048576+(l<<(s>>20)-998)>>21,s=0):(s=s-1056964608>>10,l=(ls[1]&1048575)+512>>10),e|s|l&65535}var it=class extends K{};function lt(o){return(e,s,l)=>{if(e.setValid(s,l!=null))return o(e,s,l)}}var IS=(o,e,s)=>{o[e]=Math.floor(s/864e5)},sA=(o,e,s,l)=>{if(s+1<e.length){let A=Rt(e[s]),p=Rt(e[s+1]);o.set(l.subarray(0,p-A),A)}},SS=({offset:o,values:e},s,l)=>{let A=o+s;l?e[A>>3]|=1<<A%8:e[A>>3]&=~(1<<A%8)},Pn=({values:o},e,s)=>{o[e]=s},Ra=({values:o},e,s)=>{o[e]=s},oA=({values:o},e,s)=>{o[e]=ho(s)},bS=(o,e,s)=>{switch(o.type.precision){case zt.HALF:return oA(o,e,s);case zt.SINGLE:case zt.DOUBLE:return Ra(o,e,s)}},Qu=({values:o},e,s)=>{IS(o,e,s.valueOf())},$u=({values:o},e,s)=>{o[e]=BigInt(s)},Va=({stride:o,values:e},s,l)=>{e.set(l.subarray(0,o),o*s)},uA=({values:o,valueOffsets:e},s,l)=>sA(o,e,s,l),cA=({values:o,valueOffsets:e},s,l)=>sA(o,e,s,_n(l)),xa=(o,e,s)=>{o.type.unit===Kt.DAY?Qu(o,e,s):$u(o,e,s)},qu=({values:o},e,s)=>{o[e]=BigInt(s/1e3)},Ku=({values:o},e,s)=>{o[e]=BigInt(s)},tc=({values:o},e,s)=>{o[e]=BigInt(s*1e3)},ec=({values:o},e,s)=>{o[e]=BigInt(s*1e6)},Ma=(o,e,s)=>{switch(o.type.unit){case H.SECOND:return qu(o,e,s);case H.MILLISECOND:return Ku(o,e,s);case H.MICROSECOND:return tc(o,e,s);case H.NANOSECOND:return ec(o,e,s)}},rc=({values:o},e,s)=>{o[e]=s},nc=({values:o},e,s)=>{o[e]=s},ic=({values:o},e,s)=>{o[e]=s},sc=({values:o},e,s)=>{o[e]=s},Na=(o,e,s)=>{switch(o.type.unit){case H.SECOND:return rc(o,e,s);case H.MILLISECOND:return nc(o,e,s);case H.MICROSECOND:return ic(o,e,s);case H.NANOSECOND:return sc(o,e,s)}},ka=({values:o,stride:e},s,l)=>{o.set(l.subarray(0,e),e*s)},TS=(o,e,s)=>{let l=o.children[0],A=o.valueOffsets,p=Re.getVisitFn(l);if(Array.isArray(s))for(let w=-1,F=A[e],S=A[e+1];F<S;)p(l,F++,s[++w]);else for(let w=-1,F=A[e],S=A[e+1];F<S;)p(l,F++,s.get(++w))},US=(o,e,s)=>{let l=o.children[0],{valueOffsets:A}=o,p=Re.getVisitFn(l),{[e]:w,[e+1]:F}=A,S=s instanceof Map?s.entries():Object.entries(s);for(let R of S)if(p(l,w,R),++w>=F)break},RS=(o,e)=>(s,l,A,p)=>l&&s(l,o,e[p]),VS=(o,e)=>(s,l,A,p)=>l&&s(l,o,e.get(p)),xS=(o,e)=>(s,l,A,p)=>l&&s(l,o,e.get(A.name)),MS=(o,e)=>(s,l,A,p)=>l&&s(l,o,e[A.name]),NS=(o,e,s)=>{let l=o.type.children.map(p=>Re.getVisitFn(p.type)),A=s instanceof Map?xS(e,s):s instanceof pt?VS(e,s):Array.isArray(s)?RS(e,s):MS(e,s);o.type.children.forEach((p,w)=>A(l[w],o.children[w],p,w))},kS=(o,e,s)=>{o.type.mode===Gt.Dense?lA(o,e,s):aA(o,e,s)},lA=(o,e,s)=>{let l=o.type.typeIdToChildIndex[o.typeIds[e]],A=o.children[l];Re.visit(A,o.valueOffsets[e],s)},aA=(o,e,s)=>{let l=o.type.typeIdToChildIndex[o.typeIds[e]],A=o.children[l];Re.visit(A,e,s)},OS=(o,e,s)=>{var l;(l=o.dictionary)===null||l===void 0||l.set(o.values[e],s)},Oa=(o,e,s)=>{o.type.unit===ce.DAY_TIME?oc(o,e,s):uc(o,e,s)},oc=({values:o},e,s)=>{o.set(s.subarray(0,2),2*e)},uc=({values:o},e,s)=>{o[e]=s[0]*12+s[1]%12},cc=({values:o},e,s)=>{o[e]=s},lc=({values:o},e,s)=>{o[e]=s},ac=({values:o},e,s)=>{o[e]=s},fc=({values:o},e,s)=>{o[e]=s},Za=(o,e,s)=>{switch(o.type.unit){case H.SECOND:return cc(o,e,s);case H.MILLISECOND:return lc(o,e,s);case H.MICROSECOND:return ac(o,e,s);case H.NANOSECOND:return fc(o,e,s)}},ZS=(o,e,s)=>{let{stride:l}=o,A=o.children[0],p=Re.getVisitFn(A);if(Array.isArray(s))for(let w=-1,F=e*l;++w<l;)p(A,F+w,s[w]);else for(let w=-1,F=e*l;++w<l;)p(A,F+w,s.get(w))};it.prototype.visitBool=lt(SS);it.prototype.visitInt=lt(Pn);it.prototype.visitInt8=lt(Pn);it.prototype.visitInt16=lt(Pn);it.prototype.visitInt32=lt(Pn);it.prototype.visitInt64=lt(Pn);it.prototype.visitUint8=lt(Pn);it.prototype.visitUint16=lt(Pn);it.prototype.visitUint32=lt(Pn);it.prototype.visitUint64=lt(Pn);it.prototype.visitFloat=lt(bS);it.prototype.visitFloat16=lt(oA);it.prototype.visitFloat32=lt(Ra);it.prototype.visitFloat64=lt(Ra);it.prototype.visitUtf8=lt(cA);it.prototype.visitLargeUtf8=lt(cA);it.prototype.visitBinary=lt(uA);it.prototype.visitLargeBinary=lt(uA);it.prototype.visitFixedSizeBinary=lt(Va);it.prototype.visitDate=lt(xa);it.prototype.visitDateDay=lt(Qu);it.prototype.visitDateMillisecond=lt($u);it.prototype.visitTimestamp=lt(Ma);it.prototype.visitTimestampSecond=lt(qu);it.prototype.visitTimestampMillisecond=lt(Ku);it.prototype.visitTimestampMicrosecond=lt(tc);it.prototype.visitTimestampNanosecond=lt(ec);it.prototype.visitTime=lt(Na);it.prototype.visitTimeSecond=lt(rc);it.prototype.visitTimeMillisecond=lt(nc);it.prototype.visitTimeMicrosecond=lt(ic);it.prototype.visitTimeNanosecond=lt(sc);it.prototype.visitDecimal=lt(ka);it.prototype.visitList=lt(TS);it.prototype.visitStruct=lt(NS);it.prototype.visitUnion=lt(kS);it.prototype.visitDenseUnion=lt(lA);it.prototype.visitSparseUnion=lt(aA);it.prototype.visitDictionary=lt(OS);it.prototype.visitInterval=lt(Oa);it.prototype.visitIntervalDayTime=lt(oc);it.prototype.visitIntervalYearMonth=lt(uc);it.prototype.visitDuration=lt(Za);it.prototype.visitDurationSecond=lt(cc);it.prototype.visitDurationMillisecond=lt(lc);it.prototype.visitDurationMicrosecond=lt(ac);it.prototype.visitDurationNanosecond=lt(fc);it.prototype.visitFixedSizeList=lt(ZS);it.prototype.visitMap=lt(US);var Re=new it;var sn=Symbol.for("parent"),as=Symbol.for("rowIndex"),mi=class{constructor(e,s){return this[sn]=e,this[as]=s,new Proxy(this,new Wa)}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[as],s=this[sn],l=s.type.children,A={};for(let p=-1,w=l.length;++p<w;)A[l[p].name]=de.visit(s.children[p],e);return A}toString(){return`{${[...this].map(([e,s])=>`${rn(e)}: ${rn(s)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new Da(this[sn],this[as])}},Da=class{constructor(e,s){this.childIndex=0,this.children=e.children,this.rowIndex=s,this.childFields=e.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){let e=this.childIndex;return e<this.numChildren?(this.childIndex=e+1,{done:!1,value:[this.childFields[e].name,de.visit(this.children[e],this.rowIndex)]}):{done:!0,value:null}}};Object.defineProperties(mi.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[sn]:{writable:!0,enumerable:!1,configurable:!1,value:null},[as]:{writable:!0,enumerable:!1,configurable:!1,value:-1}});var Wa=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[sn].type.children.map(s=>s.name)}has(e,s){return e[sn].type.children.findIndex(l=>l.name===s)!==-1}getOwnPropertyDescriptor(e,s){if(e[sn].type.children.findIndex(l=>l.name===s)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,s){if(Reflect.has(e,s))return e[s];let l=e[sn].type.children.findIndex(A=>A.name===s);if(l!==-1){let A=de.visit(e[sn].children[l],e[as]);return Reflect.set(e,s,A),A}}set(e,s,l){let A=e[sn].type.children.findIndex(p=>p.name===s);return A!==-1?(Re.visit(e[sn].children[A],e[as],l),Reflect.set(e,s,l)):Reflect.has(e,s)||typeof s=="symbol"?Reflect.set(e,s,l):!1}};var tt=class extends K{};function ut(o){return(e,s)=>e.getValid(s)?o(e,s):null}var DS=(o,e)=>864e5*o[e],WS=(o,e)=>null,fA=(o,e,s)=>{if(s+1>=e.length)return null;let l=Rt(e[s]),A=Rt(e[s+1]);return o.subarray(l,A)},zS=({offset:o,values:e},s)=>{let l=o+s;return(e[l>>3]&1<<l%8)!==0},hA=({values:o},e)=>DS(o,e),dA=({values:o},e)=>Rt(o[e]),yi=({stride:o,values:e},s)=>e[o*s],ES=({stride:o,values:e},s)=>Hu(e[o*s]),AA=({values:o},e)=>o[e],XS=({stride:o,values:e},s)=>e.subarray(o*s,o*(s+1)),pA=({values:o,valueOffsets:e},s)=>fA(o,e,s),mA=({values:o,valueOffsets:e},s)=>{let l=fA(o,e,s);return l!==null?io(l):null},CS=({values:o},e)=>o[e],GS=({type:o,values:e},s)=>o.precision!==zt.HALF?e[s]:Hu(e[s]),jS=(o,e)=>o.type.unit===Kt.DAY?hA(o,e):dA(o,e),yA=({values:o},e)=>1e3*Rt(o[e]),gA=({values:o},e)=>Rt(o[e]),wA=({values:o},e)=>Ia(o[e],BigInt(1e3)),_A=({values:o},e)=>Ia(o[e],BigInt(1e6)),LS=(o,e)=>{switch(o.type.unit){case H.SECOND:return yA(o,e);case H.MILLISECOND:return gA(o,e);case H.MICROSECOND:return wA(o,e);case H.NANOSECOND:return _A(o,e)}},vA=({values:o},e)=>o[e],FA=({values:o},e)=>o[e],BA=({values:o},e)=>o[e],IA=({values:o},e)=>o[e],JS=(o,e)=>{switch(o.type.unit){case H.SECOND:return vA(o,e);case H.MILLISECOND:return FA(o,e);case H.MICROSECOND:return BA(o,e);case H.NANOSECOND:return IA(o,e)}},YS=({values:o,stride:e},s)=>Li.decimal(o.subarray(e*s,e*(s+1))),PS=(o,e)=>{let{valueOffsets:s,stride:l,children:A}=o,{[e*l]:p,[e*l+1]:w}=s,S=A[0].slice(p,w-p);return new pt([S])},HS=(o,e)=>{let{valueOffsets:s,children:l}=o,{[e]:A,[e+1]:p}=s,w=l[0];return new On(w.slice(A,p-A))},QS=(o,e)=>new mi(o,e),$S=(o,e)=>o.type.mode===Gt.Dense?SA(o,e):bA(o,e),SA=(o,e)=>{let s=o.type.typeIdToChildIndex[o.typeIds[e]],l=o.children[s];return de.visit(l,o.valueOffsets[e])},bA=(o,e)=>{let s=o.type.typeIdToChildIndex[o.typeIds[e]],l=o.children[s];return de.visit(l,e)},qS=(o,e)=>{var s;return(s=o.dictionary)===null||s===void 0?void 0:s.get(o.values[e])},KS=(o,e)=>o.type.unit===ce.DAY_TIME?TA(o,e):UA(o,e),TA=({values:o},e)=>o.subarray(2*e,2*(e+1)),UA=({values:o},e)=>{let s=o[e],l=new Int32Array(2);return l[0]=Math.trunc(s/12),l[1]=Math.trunc(s%12),l},RA=({values:o},e)=>o[e],VA=({values:o},e)=>o[e],xA=({values:o},e)=>o[e],MA=({values:o},e)=>o[e],tb=(o,e)=>{switch(o.type.unit){case H.SECOND:return RA(o,e);case H.MILLISECOND:return VA(o,e);case H.MICROSECOND:return xA(o,e);case H.NANOSECOND:return MA(o,e)}},eb=(o,e)=>{let{stride:s,children:l}=o,p=l[0].slice(e*s,s);return new pt([p])};tt.prototype.visitNull=ut(WS);tt.prototype.visitBool=ut(zS);tt.prototype.visitInt=ut(CS);tt.prototype.visitInt8=ut(yi);tt.prototype.visitInt16=ut(yi);tt.prototype.visitInt32=ut(yi);tt.prototype.visitInt64=ut(AA);tt.prototype.visitUint8=ut(yi);tt.prototype.visitUint16=ut(yi);tt.prototype.visitUint32=ut(yi);tt.prototype.visitUint64=ut(AA);tt.prototype.visitFloat=ut(GS);tt.prototype.visitFloat16=ut(ES);tt.prototype.visitFloat32=ut(yi);tt.prototype.visitFloat64=ut(yi);tt.prototype.visitUtf8=ut(mA);tt.prototype.visitLargeUtf8=ut(mA);tt.prototype.visitBinary=ut(pA);tt.prototype.visitLargeBinary=ut(pA);tt.prototype.visitFixedSizeBinary=ut(XS);tt.prototype.visitDate=ut(jS);tt.prototype.visitDateDay=ut(hA);tt.prototype.visitDateMillisecond=ut(dA);tt.prototype.visitTimestamp=ut(LS);tt.prototype.visitTimestampSecond=ut(yA);tt.prototype.visitTimestampMillisecond=ut(gA);tt.prototype.visitTimestampMicrosecond=ut(wA);tt.prototype.visitTimestampNanosecond=ut(_A);tt.prototype.visitTime=ut(JS);tt.prototype.visitTimeSecond=ut(vA);tt.prototype.visitTimeMillisecond=ut(FA);tt.prototype.visitTimeMicrosecond=ut(BA);tt.prototype.visitTimeNanosecond=ut(IA);tt.prototype.visitDecimal=ut(YS);tt.prototype.visitList=ut(PS);tt.prototype.visitStruct=ut(QS);tt.prototype.visitUnion=ut($S);tt.prototype.visitDenseUnion=ut(SA);tt.prototype.visitSparseUnion=ut(bA);tt.prototype.visitDictionary=ut(qS);tt.prototype.visitInterval=ut(KS);tt.prototype.visitIntervalDayTime=ut(TA);tt.prototype.visitIntervalYearMonth=ut(UA);tt.prototype.visitDuration=ut(tb);tt.prototype.visitDurationSecond=ut(RA);tt.prototype.visitDurationMillisecond=ut(VA);tt.prototype.visitDurationMicrosecond=ut(xA);tt.prototype.visitDurationNanosecond=ut(MA);tt.prototype.visitFixedSizeList=ut(eb);tt.prototype.visitMap=ut(HS);var de=new tt;var gi=Symbol.for("keys"),hs=Symbol.for("vals"),fs=Symbol.for("kKeysAsStrings"),za=Symbol.for("_kKeysAsStrings"),On=class{constructor(e){return this[gi]=new pt([e.children[0]]).memoize(),this[hs]=e.children[1],new Proxy(this,new Xa)}get[fs](){return this[za]||(this[za]=Array.from(this[gi].toArray(),String))}[Symbol.iterator](){return new Ea(this[gi],this[hs])}get size(){return this[gi].length}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[gi],s=this[hs],l={};for(let A=-1,p=e.length;++A<p;)l[e.get(A)]=de.visit(s,A);return l}toString(){return`{${[...this].map(([e,s])=>`${rn(e)}: ${rn(s)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}},Ea=class{constructor(e,s){this.keys=e,this.vals=s,this.keyIndex=0,this.numKeys=e.length}[Symbol.iterator](){return this}next(){let e=this.keyIndex;return e===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(e),de.visit(this.vals,e)]})}},Xa=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[fs]}has(e,s){return e[fs].includes(s)}getOwnPropertyDescriptor(e,s){if(e[fs].indexOf(s)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,s){if(Reflect.has(e,s))return e[s];let l=e[fs].indexOf(s);if(l!==-1){let A=de.visit(Reflect.get(e,hs),l);return Reflect.set(e,s,A),A}}set(e,s,l){let A=e[fs].indexOf(s);return A!==-1?(Re.visit(Reflect.get(e,hs),A,l),Reflect.set(e,s,l)):Reflect.has(e,s)?Reflect.set(e,s,l):!1}};Object.defineProperties(On.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[gi]:{writable:!0,enumerable:!1,configurable:!1,value:null},[hs]:{writable:!0,enumerable:!1,configurable:!1,value:null},[za]:{writable:!0,enumerable:!1,configurable:!1,value:null}});var NA;function Ao(o,e,s,l){let{length:A=0}=o,p=typeof e!="number"?0:e,w=typeof s!="number"?A:s;return p<0&&(p=(p%A+A)%A),w<0&&(w=(w%A+A)%A),w<p&&(NA=p,p=w,w=NA),w>A&&(w=A),l?l(o,p,w):[p,w]}var r0=(o,e)=>o<0?e+o:o,kA=o=>o!==o;function wi(o){if(typeof o!=="object"||o===null)return kA(o)?kA:s=>s===o;if(o instanceof Date){let s=o.valueOf();return l=>l instanceof Date?l.valueOf()===s:!1}return ArrayBuffer.isView(o)?s=>s?wa(o,s):!1:o instanceof Map?nb(o):Array.isArray(o)?rb(o):o instanceof pt?ib(o):sb(o,!0)}function rb(o){let e=[];for(let s=-1,l=o.length;++s<l;)e[s]=wi(o[s]);return hc(e)}function nb(o){let e=-1,s=[];for(let l of o.values())s[++e]=wi(l);return hc(s)}function ib(o){let e=[];for(let s=-1,l=o.length;++s<l;)e[s]=wi(o.get(s));return hc(e)}function sb(o,e=!1){let s=Object.keys(o);if(!e&&s.length===0)return()=>!1;let l=[];for(let A=-1,p=s.length;++A<p;)l[A]=wi(o[s[A]]);return hc(l,s)}function hc(o,e){return s=>{if(!s||typeof s!="object")return!1;switch(s.constructor){case Array:return ob(o,s);case Map:return OA(o,s,s.keys());case On:case mi:case Object:case void 0:return OA(o,s,e||Object.keys(s))}return s instanceof pt?ub(o,s):!1}}function ob(o,e){let s=o.length;if(e.length!==s)return!1;for(let l=-1;++l<s;)if(!o[l](e[l]))return!1;return!0}function ub(o,e){let s=o.length;if(e.length!==s)return!1;for(let l=-1;++l<s;)if(!o[l](e.get(l)))return!1;return!0}function OA(o,e,s){let l=s[Symbol.iterator](),A=e instanceof Map?e.keys():Object.keys(e)[Symbol.iterator](),p=e instanceof Map?e.values():Object.values(e)[Symbol.iterator](),w=0,F=o.length,S=p.next(),R=l.next(),V=A.next();for(;w<F&&!R.done&&!V.done&&!S.done&&!(R.value!==V.value||!o[w](S.value));++w,R=l.next(),V=A.next(),S=p.next());return w===F&&R.done&&V.done&&S.done?!0:(l.return&&l.return(),A.return&&A.return(),p.return&&p.return(),!1)}var Ga={};Ai(Ga,{BitIterator:()=>n0,getBit:()=>ZA,getBool:()=>Ac,packBools:()=>s0,popcnt_array:()=>DA,popcnt_bit_range:()=>po,popcnt_uint32:()=>dc,setBool:()=>cb,truncateBitmap:()=>i0});function Ac(o,e,s,l){return(s&1<<l)!==0}function ZA(o,e,s,l){return(s&1<<l)>>l}function cb(o,e,s){return s?!!(o[e>>3]|=1<<e%8)||!0:!(o[e>>3]&=~(1<<e%8))&&!1}function i0(o,e,s){let l=s.byteLength+7&-8;if(o>0||s.byteLength<l){let A=new Uint8Array(l);return A.set(o%8===0?s.subarray(o>>3):s0(new n0(s,o,e,null,Ac)).subarray(0,l)),A}return s}function s0(o){let e=[],s=0,l=0,A=0;for(let w of o)w&&(A|=1<<l),++l===8&&(e[s++]=A,A=l=0);(s===0||l>0)&&(e[s++]=A);let p=new Uint8Array(e.length+7&-8);return p.set(e),p}var n0=class{constructor(e,s,l,A,p){this.bytes=e,this.length=l,this.context=A,this.get=p,this.bit=s%8,this.byteIndex=s>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index<this.length?(this.bit===8&&(this.bit=0,this.byte=this.bytes[this.byteIndex++]),{value:this.get(this.context,this.index++,this.byte,this.bit++)}):{done:!0,value:null}}[Symbol.iterator](){return this}};function po(o,e,s){if(s-e<=0)return 0;if(s-e<8){let p=0;for(let w of new n0(o,e,s-e,o,ZA))p+=w;return p}let l=s>>3<<3,A=e+(e%8===0?0:8-e%8);return po(o,e,A)+po(o,l,s)+DA(o,A>>3,l-A>>3)}function DA(o,e,s){let l=0,A=Math.trunc(e),p=new DataView(o.buffer,o.byteOffset,o.byteLength),w=s===void 0?o.byteLength:A+s;for(;w-A>=4;)l+=dc(p.getUint32(A)),A+=4;for(;w-A>=2;)l+=dc(p.getUint16(A)),A+=2;for(;w-A>=1;)l+=dc(p.getUint8(A)),A+=1;return l}function dc(o){let e=Math.trunc(o);return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24}var lb=-1,_t=class{get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get nullable(){if(this._nullCount!==0){let{type:e}=this;return P.isSparseUnion(e)?this.children.some(s=>s.nullable):P.isDenseUnion(e)?this.children.some(s=>s.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let e=0,{valueOffsets:s,values:l,nullBitmap:A,typeIds:p}=this;return s&&(e+=s.byteLength),l&&(e+=l.byteLength),A&&(e+=A.byteLength),p&&(e+=p.byteLength),this.children.reduce((w,F)=>w+F.byteLength,e)}get nullCount(){if(P.isUnion(this.type))return this.children.reduce((l,A)=>l+A.nullCount,0);let e=this._nullCount,s;return e<=lb&&(s=this.nullBitmap)&&(this._nullCount=e=s.length===0?0:this.length-po(s,this.offset,this.offset+this.length)),e}constructor(e,s,l,A,p,w=[],F){this.type=e,this.children=w,this.dictionary=F,this.offset=Math.floor(Math.max(s||0,0)),this.length=Math.floor(Math.max(l||0,0)),this._nullCount=Math.floor(Math.max(A||0,-1));let S;p instanceof _t?(this.stride=p.stride,this.values=p.values,this.typeIds=p.typeIds,this.nullBitmap=p.nullBitmap,this.valueOffsets=p.valueOffsets):(this.stride=Sr(e),p&&((S=p[0])&&(this.valueOffsets=S),(S=p[1])&&(this.values=S),(S=p[2])&&(this.nullBitmap=S),(S=p[3])&&(this.typeIds=S)))}getValid(e){let{type:s}=this;if(P.isUnion(s)){let l=s,A=this.children[l.typeIdToChildIndex[this.typeIds[e]]],p=l.mode===Gt.Dense?this.valueOffsets[e]:e;return A.getValid(p)}if(this.nullable&&this.nullCount>0){let l=this.offset+e;return(this.nullBitmap[l>>3]&1<<l%8)!==0}return!0}setValid(e,s){let l,{type:A}=this;if(P.isUnion(A)){let p=A,w=this.children[p.typeIdToChildIndex[this.typeIds[e]]],F=p.mode===Gt.Dense?this.valueOffsets[e]:e;l=w.getValid(F),w.setValid(F,s)}else{let{nullBitmap:p}=this,{offset:w,length:F}=this,S=w+e,R=1<<S%8,V=S>>3;(!p||p.byteLength<=V)&&(p=new Uint8Array((w+F+63&-64)>>3).fill(255),this.nullCount>0?(p.set(i0(w,F,this.nullBitmap),0),Object.assign(this,{nullBitmap:p})):Object.assign(this,{nullBitmap:p,_nullCount:0}));let X=p[V];l=(X&R)!==0,p[V]=s?X|R:X&~R}return l!==!!s&&(this._nullCount=this.nullCount+(s?-1:1)),s}clone(e=this.type,s=this.offset,l=this.length,A=this._nullCount,p=this,w=this.children){return new _t(e,s,l,A,p,w,this.dictionary)}slice(e,s){let{stride:l,typeId:A,children:p}=this,w=+(this._nullCount===0)-1,F=A===16?l:1,S=this._sliceBuffers(e,s,l,A);return this.clone(this.type,this.offset+e,s,w,S,p.length===0||this.valueOffsets?p:this._sliceChildren(p,F*e,F*s))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===x.Null)return this.clone(this.type,0,e,0);let{length:s,nullCount:l}=this,A=new Uint8Array((e+63&-64)>>3).fill(255,0,s>>3);A[s>>3]=(1<<s-(s&-8))-1,l>0&&A.set(i0(this.offset,s,this.nullBitmap),0);let p=this.buffers;return p[rr.VALIDITY]=A,this.clone(this.type,0,e,l+(e-s),p)}_sliceBuffers(e,s,l,A){let p,{buffers:w}=this;return(p=w[rr.TYPE])&&(w[rr.TYPE]=p.subarray(e,e+s)),(p=w[rr.OFFSET])&&(w[rr.OFFSET]=p.subarray(e,e+s+1))||(p=w[rr.DATA])&&(w[rr.DATA]=A===6?p:p.subarray(l*e,l*(e+s))),w}_sliceChildren(e,s,l){return e.map(A=>A.slice(s,l))}};_t.prototype.children=Object.freeze([]);var o0=class extends K{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){let{["type"]:s,["offset"]:l=0,["length"]:A=0}=e;return new _t(s,l,A,A)}visitBool(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.nullBitmap),p=wt(s.ArrayType,e.data),{["length"]:w=p.length>>3,["nullCount"]:F=e.nullBitmap?-1:0}=e;return new _t(s,l,w,F,[void 0,p,A])}visitInt(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.nullBitmap),p=wt(s.ArrayType,e.data),{["length"]:w=p.length,["nullCount"]:F=e.nullBitmap?-1:0}=e;return new _t(s,l,w,F,[void 0,p,A])}visitFloat(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.nullBitmap),p=wt(s.ArrayType,e.data),{["length"]:w=p.length,["nullCount"]:F=e.nullBitmap?-1:0}=e;return new _t(s,l,w,F,[void 0,p,A])}visitUtf8(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.data),p=st(e.nullBitmap),w=ji(e.valueOffsets),{["length"]:F=w.length-1,["nullCount"]:S=e.nullBitmap?-1:0}=e;return new _t(s,l,F,S,[w,A,p])}visitLargeUtf8(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.data),p=st(e.nullBitmap),w=Gu(e.valueOffsets),{["length"]:F=w.length-1,["nullCount"]:S=e.nullBitmap?-1:0}=e;return new _t(s,l,F,S,[w,A,p])}visitBinary(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.data),p=st(e.nullBitmap),w=ji(e.valueOffsets),{["length"]:F=w.length-1,["nullCount"]:S=e.nullBitmap?-1:0}=e;return new _t(s,l,F,S,[w,A,p])}visitLargeBinary(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.data),p=st(e.nullBitmap),w=Gu(e.valueOffsets),{["length"]:F=w.length-1,["nullCount"]:S=e.nullBitmap?-1:0}=e;return new _t(s,l,F,S,[w,A,p])}visitFixedSizeBinary(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.nullBitmap),p=wt(s.ArrayType,e.data),{["length"]:w=p.length/Sr(s),["nullCount"]:F=e.nullBitmap?-1:0}=e;return new _t(s,l,w,F,[void 0,p,A])}visitDate(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.nullBitmap),p=wt(s.ArrayType,e.data),{["length"]:w=p.length/Sr(s),["nullCount"]:F=e.nullBitmap?-1:0}=e;return new _t(s,l,w,F,[void 0,p,A])}visitTimestamp(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.nullBitmap),p=wt(s.ArrayType,e.data),{["length"]:w=p.length/Sr(s),["nullCount"]:F=e.nullBitmap?-1:0}=e;return new _t(s,l,w,F,[void 0,p,A])}visitTime(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.nullBitmap),p=wt(s.ArrayType,e.data),{["length"]:w=p.length/Sr(s),["nullCount"]:F=e.nullBitmap?-1:0}=e;return new _t(s,l,w,F,[void 0,p,A])}visitDecimal(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.nullBitmap),p=wt(s.ArrayType,e.data),{["length"]:w=p.length/Sr(s),["nullCount"]:F=e.nullBitmap?-1:0}=e;return new _t(s,l,w,F,[void 0,p,A])}visitList(e){let{["type"]:s,["offset"]:l=0,["child"]:A}=e,p=st(e.nullBitmap),w=ji(e.valueOffsets),{["length"]:F=w.length-1,["nullCount"]:S=e.nullBitmap?-1:0}=e;return new _t(s,l,F,S,[w,void 0,p],[A])}visitStruct(e){let{["type"]:s,["offset"]:l=0,["children"]:A=[]}=e,p=st(e.nullBitmap),{length:w=A.reduce((S,{length:R})=>Math.max(S,R),0),nullCount:F=e.nullBitmap?-1:0}=e;return new _t(s,l,w,F,[void 0,void 0,p],A)}visitUnion(e){let{["type"]:s,["offset"]:l=0,["children"]:A=[]}=e,p=wt(s.ArrayType,e.typeIds),{["length"]:w=p.length,["nullCount"]:F=-1}=e;if(P.isSparseUnion(s))return new _t(s,l,w,F,[void 0,void 0,void 0,p],A);let S=ji(e.valueOffsets);return new _t(s,l,w,F,[S,void 0,void 0,p],A)}visitDictionary(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.nullBitmap),p=wt(s.indices.ArrayType,e.data),{["dictionary"]:w=new pt([new o0().visit({type:s.dictionary})])}=e,{["length"]:F=p.length,["nullCount"]:S=e.nullBitmap?-1:0}=e;return new _t(s,l,F,S,[void 0,p,A],[],w)}visitInterval(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.nullBitmap),p=wt(s.ArrayType,e.data),{["length"]:w=p.length/Sr(s),["nullCount"]:F=e.nullBitmap?-1:0}=e;return new _t(s,l,w,F,[void 0,p,A])}visitDuration(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.nullBitmap),p=wt(s.ArrayType,e.data),{["length"]:w=p.length,["nullCount"]:F=e.nullBitmap?-1:0}=e;return new _t(s,l,w,F,[void 0,p,A])}visitFixedSizeList(e){let{["type"]:s,["offset"]:l=0,["child"]:A=new o0().visit({type:s.valueType})}=e,p=st(e.nullBitmap),{["length"]:w=A.length/Sr(s),["nullCount"]:F=e.nullBitmap?-1:0}=e;return new _t(s,l,w,F,[void 0,void 0,p],[A])}visitMap(e){let{["type"]:s,["offset"]:l=0,["child"]:A=new o0().visit({type:s.childType})}=e,p=st(e.nullBitmap),w=ji(e.valueOffsets),{["length"]:F=w.length-1,["nullCount"]:S=e.nullBitmap?-1:0}=e;return new _t(s,l,F,S,[w,void 0,p],[A])}},ab=new o0;function ft(o){return ab.visit(o)}var mo=class{constructor(e=0,s){this.numChunks=e,this.getChunkIterator=s,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndex<this.numChunks;){let e=this.chunkIterator.next();if(!e.done)return e;++this.chunkIndex<this.numChunks&&(this.chunkIterator=this.getChunkIterator(this.chunkIndex))}return{done:!0,value:null}}[Symbol.iterator](){return this}};function WA(o){return o.some(e=>e.nullable)}function pc(o){return o.reduce((e,s)=>e+s.nullCount,0)}function mc(o){return o.reduce((e,s,l)=>(e[l+1]=e[l]+s.length,e),new Uint32Array(o.length+1))}function yc(o,e,s,l){let A=[];for(let p=-1,w=o.length;++p<w;){let F=o[p],S=e[p],{length:R}=F;if(S>=l)break;if(s>=S+R)continue;if(S>=s&&S+R<=l){A.push(F);continue}let V=Math.max(0,s-S),X=Math.min(l-S,R);A.push(F.slice(V,X-V))}return A.length===0&&A.push(o[0].slice(0,0)),A}function ja(o,e,s,l){let A=0,p=0,w=e.length-1;do{if(A>=w-1)return s<e[w]?l(o,A,s-e[A]):null;p=A+Math.trunc((w-A)*.5),s<e[p]?w=p:A=p}while(A<w)}function yo(o,e){return o.getValid(e)}function ds(o){function e(s,l,A){return o(s[l],A)}return function(s){let l=this.data;return ja(l,this._offsets,s,e)}}function gc(o){let e;function s(l,A,p){return o(l[A],p,e)}return function(l,A){let p=this.data;e=A;let w=ja(p,this._offsets,l,s);return e=void 0,w}}function wc(o){let e;function s(l,A,p){let w=p,F=0,S=0;for(let R=A-1,V=l.length;++R<V;){let X=l[R];if(~(F=o(X,e,w)))return S+F;w=0,S+=X.length}return-1}return function(l,A){e=l;let p=this.data,w=typeof A!="number"?s(p,0,0):ja(p,this._offsets,A,s);return e=void 0,w}}var et=class extends K{};function fb(o,e){return e===null&&o.length>0?0:-1}function hb(o,e){let{nullBitmap:s}=o;if(!s||o.nullCount<=0)return-1;let l=0;for(let A of new n0(s,o.offset+(e||0),o.length,s,Ac)){if(!A)return l;++l}return-1}function At(o,e,s){if(e===void 0)return-1;if(e===null)switch(o.typeId){case x.Union:break;case x.Dictionary:break;default:return hb(o,s)}let l=de.getVisitFn(o),A=wi(e);for(let p=(s||0)-1,w=o.length;++p<w;)if(A(l(o,p)))return p;return-1}function zA(o,e,s){let l=de.getVisitFn(o),A=wi(e);for(let p=(s||0)-1,w=o.length;++p<w;)if(A(l(o,p)))return p;return-1}et.prototype.visitNull=fb;et.prototype.visitBool=At;et.prototype.visitInt=At;et.prototype.visitInt8=At;et.prototype.visitInt16=At;et.prototype.visitInt32=At;et.prototype.visitInt64=At;et.prototype.visitUint8=At;et.prototype.visitUint16=At;et.prototype.visitUint32=At;et.prototype.visitUint64=At;et.prototype.visitFloat=At;et.prototype.visitFloat16=At;et.prototype.visitFloat32=At;et.prototype.visitFloat64=At;et.prototype.visitUtf8=At;et.prototype.visitLargeUtf8=At;et.prototype.visitBinary=At;et.prototype.visitLargeBinary=At;et.prototype.visitFixedSizeBinary=At;et.prototype.visitDate=At;et.prototype.visitDateDay=At;et.prototype.visitDateMillisecond=At;et.prototype.visitTimestamp=At;et.prototype.visitTimestampSecond=At;et.prototype.visitTimestampMillisecond=At;et.prototype.visitTimestampMicrosecond=At;et.prototype.visitTimestampNanosecond=At;et.prototype.visitTime=At;et.prototype.visitTimeSecond=At;et.prototype.visitTimeMillisecond=At;et.prototype.visitTimeMicrosecond=At;et.prototype.visitTimeNanosecond=At;et.prototype.visitDecimal=At;et.prototype.visitList=At;et.prototype.visitStruct=At;et.prototype.visitUnion=At;et.prototype.visitDenseUnion=zA;et.prototype.visitSparseUnion=zA;et.prototype.visitDictionary=At;et.prototype.visitInterval=At;et.prototype.visitIntervalDayTime=At;et.prototype.visitIntervalYearMonth=At;et.prototype.visitDuration=At;et.prototype.visitDurationSecond=At;et.prototype.visitDurationMillisecond=At;et.prototype.visitDurationMicrosecond=At;et.prototype.visitDurationNanosecond=At;et.prototype.visitFixedSizeList=At;et.prototype.visitMap=At;var u0=new et;var rt=class extends K{};function ct(o){let{type:e}=o;if(o.nullCount===0&&o.stride===1&&(P.isInt(e)&&e.bitWidth!==64||P.isTime(e)&&e.bitWidth!==64||P.isFloat(e)&&e.precision!==zt.HALF))return new mo(o.data.length,l=>{let A=o.data[l];return A.values.subarray(0,A.length)[Symbol.iterator]()});let s=0;return new mo(o.data.length,l=>{let p=o.data[l].length,w=o.slice(s,s+p);return s+=p,new La(w)})}var La=class{constructor(e){this.vector=e,this.index=0}next(){return this.index<this.vector.length?{value:this.vector.get(this.index++)}:{done:!0,value:null}}[Symbol.iterator](){return this}};rt.prototype.visitNull=ct;rt.prototype.visitBool=ct;rt.prototype.visitInt=ct;rt.prototype.visitInt8=ct;rt.prototype.visitInt16=ct;rt.prototype.visitInt32=ct;rt.prototype.visitInt64=ct;rt.prototype.visitUint8=ct;rt.prototype.visitUint16=ct;rt.prototype.visitUint32=ct;rt.prototype.visitUint64=ct;rt.prototype.visitFloat=ct;rt.prototype.visitFloat16=ct;rt.prototype.visitFloat32=ct;rt.prototype.visitFloat64=ct;rt.prototype.visitUtf8=ct;rt.prototype.visitLargeUtf8=ct;rt.prototype.visitBinary=ct;rt.prototype.visitLargeBinary=ct;rt.prototype.visitFixedSizeBinary=ct;rt.prototype.visitDate=ct;rt.prototype.visitDateDay=ct;rt.prototype.visitDateMillisecond=ct;rt.prototype.visitTimestamp=ct;rt.prototype.visitTimestampSecond=ct;rt.prototype.visitTimestampMillisecond=ct;rt.prototype.visitTimestampMicrosecond=ct;rt.prototype.visitTimestampNanosecond=ct;rt.prototype.visitTime=ct;rt.prototype.visitTimeSecond=ct;rt.prototype.visitTimeMillisecond=ct;rt.prototype.visitTimeMicrosecond=ct;rt.prototype.visitTimeNanosecond=ct;rt.prototype.visitDecimal=ct;rt.prototype.visitList=ct;rt.prototype.visitStruct=ct;rt.prototype.visitUnion=ct;rt.prototype.visitDenseUnion=ct;rt.prototype.visitSparseUnion=ct;rt.prototype.visitDictionary=ct;rt.prototype.visitInterval=ct;rt.prototype.visitIntervalDayTime=ct;rt.prototype.visitIntervalYearMonth=ct;rt.prototype.visitDuration=ct;rt.prototype.visitDurationSecond=ct;rt.prototype.visitDurationMillisecond=ct;rt.prototype.visitDurationMicrosecond=ct;rt.prototype.visitDurationNanosecond=ct;rt.prototype.visitFixedSizeList=ct;rt.prototype.visitMap=ct;var As=new rt;var EA,XA={},CA={},pt=class{constructor(e){var s,l,A;let p=e[0]instanceof pt?e.flatMap(F=>F.data):e;if(p.length===0||p.some(F=>!(F instanceof _t)))throw new TypeError("Vector constructor expects an Array of Data instances.");let w=(s=p[0])===null||s===void 0?void 0:s.type;switch(p.length){case 0:this._offsets=[0];break;case 1:{let{get:F,set:S,indexOf:R}=XA[w.typeId],V=p[0];this.isValid=X=>yo(V,X),this.get=X=>F(V,X),this.set=(X,at)=>S(V,X,at),this.indexOf=X=>R(V,X),this._offsets=[0,V.length];break}default:Object.setPrototypeOf(this,CA[w.typeId]),this._offsets=mc(p);break}this.data=p,this.type=w,this.stride=Sr(w),this.numChildren=(A=(l=w.children)===null||l===void 0?void 0:l.length)!==null&&A!==void 0?A:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((e,s)=>e+s.byteLength,0)}get nullable(){return WA(this.data)}get nullCount(){return pc(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${x[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}at(e){return this.get(r0(e,this.length))}set(e,s){}indexOf(e,s){return-1}includes(e,s){return this.indexOf(e,s)>-1}[Symbol.iterator](){return As.visit(this)}concat(...e){return new pt(this.data.concat(e.flatMap(s=>s.data).flat(Number.POSITIVE_INFINITY)))}slice(e,s){return new pt(Ao(this,e,s,({data:l,_offsets:A},p,w)=>yc(l,A,p,w)))}toJSON(){return[...this]}toArray(){let{type:e,data:s,length:l,stride:A,ArrayType:p}=this;switch(e.typeId){case x.Int:case x.Float:case x.Decimal:case x.Time:case x.Timestamp:switch(s.length){case 0:return new p;case 1:return s[0].values.subarray(0,l*A);default:return s.reduce((w,{values:F,length:S})=>(w.array.set(F.subarray(0,S*A),w.offset),w.offset+=S*A,w),{array:new p(l*A),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(",")}]`}getChild(e){var s;return this.getChildAt((s=this.type.children)===null||s===void 0?void 0:s.findIndex(l=>l.name===e))}getChildAt(e){return e>-1&&e<this.numChildren?new pt(this.data.map(({children:s})=>s[e])):null}get isMemoized(){return P.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(P.isDictionary(this.type)){let e=new ps(this.data[0].dictionary),s=this.data.map(l=>{let A=l.clone();return A.dictionary=e,A});return new pt(s)}return new ps(this)}unmemoize(){if(P.isDictionary(this.type)&&this.isMemoized){let e=this.data[0].dictionary.unmemoize(),s=this.data.map(l=>{let A=l.clone();return A.dictionary=e,A});return new pt(s)}return this}};EA=Symbol.toStringTag;pt[EA]=(o=>{o.type=P.prototype,o.data=[],o.length=0,o.stride=1,o.numChildren=0,o._offsets=new Uint32Array([0]),o[Symbol.isConcatSpreadable]=!0;let e=Object.keys(x).map(s=>x[s]).filter(s=>typeof s=="number"&&s!==x.NONE);for(let s of e){let l=de.getVisitFnByTypeId(s),A=Re.getVisitFnByTypeId(s),p=u0.getVisitFnByTypeId(s);XA[s]={get:l,set:A,indexOf:p},CA[s]=Object.create(o,{isValid:{value:ds(yo)},get:{value:ds(de.getVisitFnByTypeId(s))},set:{value:gc(Re.getVisitFnByTypeId(s))},indexOf:{value:wc(u0.getVisitFnByTypeId(s))}})}return"Vector"})(pt.prototype);var ps=class extends pt{constructor(e){super(e.data);let s=this.get,l=this.set,A=this.slice,p=new Array(this.length);Object.defineProperty(this,"get",{value(w){let F=p[w];if(F!==void 0)return F;let S=s.call(this,w);return p[w]=S,S}}),Object.defineProperty(this,"set",{value(w,F){l.call(this,w,F),p[w]=F}}),Object.defineProperty(this,"slice",{value:(w,F)=>new ps(A.call(this,w,F))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new pt(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}};function GA(o){if(!o||o.length<=0)return function(A){return!0};let e="",s=o.filter(l=>l===l);return s.length>0&&(e=`
7
+ "use strict";var __exports__=(()=>{var N5=Object.create;var ku=Object.defineProperty;var k5=Object.getOwnPropertyDescriptor;var O5=Object.getOwnPropertyNames;var Z5=Object.getPrototypeOf,D5=Object.prototype.hasOwnProperty;var da=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),Ai=(o,e)=>{for(var s in e)ku(o,s,{get:e[s],enumerable:!0})},Nu=(o,e,s,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let A of O5(e))!D5.call(o,A)&&A!==s&&ku(o,A,{get:()=>e[A],enumerable:!(l=k5(e,A))||l.enumerable});return o},Ou=(o,e,s)=>(Nu(o,e,"default"),s&&Nu(s,e,"default")),W5=(o,e,s)=>(s=o!=null?N5(Z5(o)):{},Nu(e||!o||!o.__esModule?ku(s,"default",{value:o,enumerable:!0}):s,o)),z5=o=>Nu(ku({},"__esModule",{value:!0}),o);var Sd=da((xU,Id)=>{Id.exports=globalThis.loaders});var _f=da(()=>{});var Ip=da(()=>{});var $o={};Ai($o,{LASArrowLoader:()=>Tp,LASFormat:()=>Zu,LASLoader:()=>Us,LASWorkerLoader:()=>C0,LAZPerfLoader:()=>Us,LAZRsLoader:()=>zp});Ou($o,W5(Sd(),1));var Zu={name:"LAS",id:"las",module:"las",extensions:["las","laz"],mimeTypes:["application/octet-stream"],text:!1,binary:!0,tests:["LASF"]};var E5="4.4.0-alpha.9",C0={...Zu,dataType:null,batchType:null,version:E5,worker:!0,options:{las:{shape:"mesh",fp64:!1,skip:1,colorDepth:8}}};function X5(o,e="float32"){return o instanceof Date?"date-millisecond":o instanceof Number?e:typeof o=="string"?"utf8":(o===null||o==="undefined","null")}function bd(o){let e=Aa(o);return e!=="null"?{type:e,nullable:!1}:o.length>0?(e=X5(o[0]),{type:e,nullable:!0}):{type:"null",nullable:!0}}function Aa(o){switch(o.constructor){case Int8Array:return"int8";case Uint8Array:case Uint8ClampedArray:return"uint8";case Int16Array:return"int16";case Uint16Array:return"uint16";case Int32Array:return"int32";case Uint32Array:return"uint32";case Float32Array:return"float32";case Float64Array:return"float64";default:return"null"}}function Ud(o,e){var s={};for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&e.indexOf(l)<0&&(s[l]=o[l]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function")for(var A=0,l=Object.getOwnPropertySymbols(o);A<l.length;A++)e.indexOf(l[A])<0&&Object.prototype.propertyIsEnumerable.call(o,l[A])&&(s[l[A]]=o[l[A]]);return s}function Q(o,e,s,l){function A(p){return p instanceof s?p:new s(function(w){w(p)})}return new(s||(s=Promise))(function(p,w){function F(V){try{R(l.next(V))}catch(X){w(X)}}function S(V){try{R(l.throw(V))}catch(X){w(X)}}function R(V){V.done?p(V.value):A(V.value).then(F,S)}R((l=l.apply(o,e||[])).next())})}function Td(o){var e=typeof Symbol=="function"&&Symbol.iterator,s=e&&o[e],l=0;if(s)return s.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&l>=o.length&&(o=void 0),{value:o&&o[l++],done:!o}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function yt(o){return this instanceof yt?(this.v=o,this):new yt(o)}function wr(o,e,s){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l=s.apply(o,e||[]),A,p=[];return A=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),F("next"),F("throw"),F("return",w),A[Symbol.asyncIterator]=function(){return this},A;function w(mt){return function(Xt){return Promise.resolve(Xt).then(mt,X)}}function F(mt,Xt){l[mt]&&(A[mt]=function(br){return new Promise(function(Jr,xe){p.push([mt,br,Jr,xe])>1||S(mt,br)})},Xt&&(A[mt]=Xt(A[mt])))}function S(mt,Xt){try{R(l[mt](Xt))}catch(br){at(p[0][3],br)}}function R(mt){mt.value instanceof yt?Promise.resolve(mt.value.v).then(V,X):at(p[0][2],mt)}function V(mt){S("next",mt)}function X(mt){S("throw",mt)}function at(mt,Xt){mt(Xt),p.shift(),p.length&&S(p[0][0],p[0][1])}}function G0(o){var e,s;return e={},l("next"),l("throw",function(A){throw A}),l("return"),e[Symbol.iterator]=function(){return this},e;function l(A,p){e[A]=o[A]?function(w){return(s=!s)?{value:yt(o[A](w)),done:!1}:p?p(w):w}:p}}function Qr(o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=o[Symbol.asyncIterator],s;return e?e.call(o):(o=typeof Td=="function"?Td(o):o[Symbol.iterator](),s={},l("next"),l("throw"),l("return"),s[Symbol.asyncIterator]=function(){return this},s);function l(p){s[p]=o[p]&&function(w){return new Promise(function(F,S){w=o[p](w),A(F,S,w.done,w.value)})}}function A(p,w,F,S){Promise.resolve(S).then(function(R){p({value:R,done:F})},w)}}var _a={};Ai(_a,{compareArrayLike:()=>wa,joinUint8Arrays:()=>_r,memcpy:()=>oo,rebaseValueOffsets:()=>ju,toArrayBufferView:()=>wt,toArrayBufferViewAsyncIterator:()=>Kr,toArrayBufferViewIterator:()=>vn,toBigInt64Array:()=>Gu,toBigUint64Array:()=>Q5,toFloat32Array:()=>$5,toFloat32ArrayAsyncIterator:()=>dS,toFloat32ArrayIterator:()=>sS,toFloat64Array:()=>q5,toFloat64ArrayAsyncIterator:()=>AS,toFloat64ArrayIterator:()=>oS,toInt16Array:()=>Y5,toInt16ArrayAsyncIterator:()=>lS,toInt16ArrayIterator:()=>eS,toInt32Array:()=>ji,toInt32ArrayAsyncIterator:()=>aS,toInt32ArrayIterator:()=>rS,toInt8Array:()=>J5,toInt8ArrayAsyncIterator:()=>cS,toInt8ArrayIterator:()=>tS,toUint16Array:()=>P5,toUint16ArrayAsyncIterator:()=>fS,toUint16ArrayIterator:()=>nS,toUint32Array:()=>H5,toUint32ArrayAsyncIterator:()=>hS,toUint32ArrayIterator:()=>iS,toUint8Array:()=>st,toUint8ArrayAsyncIterator:()=>ga,toUint8ArrayIterator:()=>ya,toUint8ClampedArray:()=>K5,toUint8ClampedArrayAsyncIterator:()=>pS,toUint8ClampedArrayIterator:()=>uS});var C5=new TextDecoder("utf-8"),io=o=>C5.decode(o),G5=new TextEncoder,_n=o=>G5.encode(o);var j5=o=>typeof o=="number",Rd=o=>typeof o=="boolean",ye=o=>typeof o=="function",Ce=o=>o!=null&&Object(o)===o,$r=o=>Ce(o)&&ye(o.then);var qr=o=>Ce(o)&&ye(o[Symbol.iterator]),Zr=o=>Ce(o)&&ye(o[Symbol.asyncIterator]),Du=o=>Ce(o)&&Ce(o.schema);var Wu=o=>Ce(o)&&"done"in o&&"value"in o;var zu=o=>Ce(o)&&ye(o.stat)&&j5(o.fd);var Eu=o=>Ce(o)&&so(o.body),Xu=o=>"_getDOMStream"in o&&"_getNodeStream"in o,Vd=o=>Ce(o)&&ye(o.abort)&&ye(o.getWriter)&&!Xu(o),so=o=>Ce(o)&&ye(o.cancel)&&ye(o.getReader)&&!Xu(o),xd=o=>Ce(o)&&ye(o.end)&&ye(o.write)&&Rd(o.writable)&&!Xu(o),Cu=o=>Ce(o)&&ye(o.read)&&ye(o.pipe)&&Rd(o.readable)&&!Xu(o),Md=o=>Ce(o)&&ye(o.clear)&&ye(o.bytes)&&ye(o.position)&&ye(o.setPosition)&&ye(o.capacity)&&ye(o.getBufferIdentifier)&&ye(o.createLong);var ma=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;function L5(o){let e=o[0]?[o[0]]:[],s,l,A,p;for(let w,F,S=0,R=0,V=o.length;++S<V;){if(w=e[R],F=o[S],!w||!F||w.buffer!==F.buffer||F.byteOffset<w.byteOffset){F&&(e[++R]=F);continue}if({byteOffset:s,byteLength:A}=w,{byteOffset:l,byteLength:p}=F,s+A<l||l+p<s){F&&(e[++R]=F);continue}e[R]=new Uint8Array(w.buffer,s,l-s+p)}return e}function oo(o,e,s=0,l=e.byteLength){let A=o.byteLength,p=new Uint8Array(o.buffer,o.byteOffset,A),w=new Uint8Array(e.buffer,e.byteOffset,Math.min(l,A));return p.set(w,s),o}function _r(o,e){let s=L5(o),l=s.reduce((V,X)=>V+X.byteLength,0),A,p,w,F=0,S=-1,R=Math.min(e||Number.POSITIVE_INFINITY,l);for(let V=s.length;++S<V;){if(A=s[S],p=A.subarray(0,Math.min(A.length,R-F)),R<=F+p.length){p.length<A.length?s[S]=A.subarray(p.length):p.length===A.length&&S++,w?oo(w,p,F):w=p;break}oo(w||(w=new Uint8Array(R)),p,F),F+=p.length}return[w||new Uint8Array(0),s.slice(S),l-(w?w.byteLength:0)]}function wt(o,e){let s=Wu(e)?e.value:e;return s instanceof o?o===Uint8Array?new o(s.buffer,s.byteOffset,s.byteLength):s:s?(typeof s=="string"&&(s=_n(s)),s instanceof ArrayBuffer?new o(s):s instanceof ma?new o(s):Md(s)?wt(o,s.bytes()):ArrayBuffer.isView(s)?s.byteLength<=0?new o(0):new o(s.buffer,s.byteOffset,s.byteLength/o.BYTES_PER_ELEMENT):o.from(s)):new o(0)}var J5=o=>wt(Int8Array,o),Y5=o=>wt(Int16Array,o),ji=o=>wt(Int32Array,o),Gu=o=>wt(BigInt64Array,o),st=o=>wt(Uint8Array,o),P5=o=>wt(Uint16Array,o),H5=o=>wt(Uint32Array,o),Q5=o=>wt(BigUint64Array,o),$5=o=>wt(Float32Array,o),q5=o=>wt(Float64Array,o),K5=o=>wt(Uint8ClampedArray,o),pa=o=>(o.next(),o);function*vn(o,e){let s=function*(A){yield A},l=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof ma?s(e):qr(e)?e:s(e);return yield*pa(function*(A){let p=null;do p=A.next(yield wt(o,p));while(!p.done)}(l[Symbol.iterator]())),new o}var tS=o=>vn(Int8Array,o),eS=o=>vn(Int16Array,o),rS=o=>vn(Int32Array,o),ya=o=>vn(Uint8Array,o),nS=o=>vn(Uint16Array,o),iS=o=>vn(Uint32Array,o),sS=o=>vn(Float32Array,o),oS=o=>vn(Float64Array,o),uS=o=>vn(Uint8ClampedArray,o);function Kr(o,e){return wr(this,arguments,function*(){if($r(e))return yield yt(yield yt(yield*G0(Qr(Kr(o,yield yt(e))))));let l=function(w){return wr(this,arguments,function*(){yield yield yt(yield yt(w))})},A=function(w){return wr(this,arguments,function*(){yield yt(yield*G0(Qr(pa(function*(F){let S=null;do S=F.next(yield S?.value);while(!S.done)}(w[Symbol.iterator]())))))})},p=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof ma?l(e):qr(e)?A(e):Zr(e)?e:l(e);return yield yt(yield*G0(Qr(pa(function(w){return wr(this,arguments,function*(){let F=null;do F=yield yt(w.next(yield yield yt(wt(o,F))));while(!F.done)})}(p[Symbol.asyncIterator]()))))),yield yt(new o)})}var cS=o=>Kr(Int8Array,o),lS=o=>Kr(Int16Array,o),aS=o=>Kr(Int32Array,o),ga=o=>Kr(Uint8Array,o),fS=o=>Kr(Uint16Array,o),hS=o=>Kr(Uint32Array,o),dS=o=>Kr(Float32Array,o),AS=o=>Kr(Float64Array,o),pS=o=>Kr(Uint8ClampedArray,o);function ju(o,e,s){if(o!==0){s=s.slice(0,e);for(let l=-1,A=s.length;++l<A;)s[l]+=o}return s.subarray(0,e)}function wa(o,e){let s=0,l=o.length;if(l!==e.length)return!1;if(l>0)do if(o[s]!==e[s])return!1;while(++s<l);return!0}var Ue={fromIterable(o){return Lu(mS(o))},fromAsyncIterable(o){return Lu(yS(o))},fromDOMStream(o){return Lu(gS(o))},fromNodeStream(o){return Lu(wS(o))},toDOMStream(o,e){throw new Error('"toDOMStream" not available in this environment')},toNodeStream(o,e){throw new Error('"toNodeStream" not available in this environment')}},Lu=o=>(o.next(),o);function*mS(o){let e,s=!1,l=[],A,p,w,F=0;function S(){return p==="peek"?_r(l,w)[0]:([A,l,F]=_r(l,w),A)}({cmd:p,size:w}=(yield(()=>null)())||{cmd:"read",size:0});let R=ya(o)[Symbol.iterator]();try{do if({done:e,value:A}=Number.isNaN(w-F)?R.next():R.next(w-F),!e&&A.byteLength>0&&(l.push(A),F+=A.byteLength),e||w<=F)do({cmd:p,size:w}=yield S());while(w<F);while(!e)}catch(V){(s=!0)&&typeof R.throw=="function"&&R.throw(V)}finally{s===!1&&typeof R.return=="function"&&R.return(null)}return null}function yS(o){return wr(this,arguments,function*(){let s,l=!1,A=[],p,w,F,S=0;function R(){return w==="peek"?_r(A,F)[0]:([p,A,S]=_r(A,F),p)}({cmd:w,size:F}=(yield yield yt((()=>null)()))||{cmd:"read",size:0});let V=ga(o)[Symbol.asyncIterator]();try{do if({done:s,value:p}=Number.isNaN(F-S)?yield yt(V.next()):yield yt(V.next(F-S)),!s&&p.byteLength>0&&(A.push(p),S+=p.byteLength),s||F<=S)do({cmd:w,size:F}=yield yield yt(R()));while(F<S);while(!s)}catch(X){(l=!0)&&typeof V.throw=="function"&&(yield yt(V.throw(X)))}finally{l===!1&&typeof V.return=="function"&&(yield yt(V.return(new Uint8Array(0))))}return yield yt(null)})}function gS(o){return wr(this,arguments,function*(){let s=!1,l=!1,A=[],p,w,F,S=0;function R(){return w==="peek"?_r(A,F)[0]:([p,A,S]=_r(A,F),p)}({cmd:w,size:F}=(yield yield yt((()=>null)()))||{cmd:"read",size:0});let V=new Fa(o);try{do if({done:s,value:p}=Number.isNaN(F-S)?yield yt(V.read()):yield yt(V.read(F-S)),!s&&p.byteLength>0&&(A.push(st(p)),S+=p.byteLength),s||F<=S)do({cmd:w,size:F}=yield yield yt(R()));while(F<S);while(!s)}catch(X){(l=!0)&&(yield yt(V.cancel(X)))}finally{l===!1?yield yt(V.cancel()):o.locked&&V.releaseLock()}return yield yt(null)})}var Fa=class{constructor(e){this.source=e,this.reader=null,this.reader=this.source.getReader(),this.reader.closed.catch(()=>{})}get closed(){return this.reader?this.reader.closed.catch(()=>{}):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=null}cancel(e){return Q(this,void 0,void 0,function*(){let{reader:s,source:l}=this;s&&(yield s.cancel(e).catch(()=>{})),l&&l.locked&&this.releaseLock()})}read(e){return Q(this,void 0,void 0,function*(){if(e===0)return{done:this.reader==null,value:new Uint8Array(0)};let s=yield this.reader.read();return!s.done&&(s.value=st(s)),s})}},va=(o,e)=>{let s=A=>l([e,A]),l;return[e,s,new Promise(A=>(l=A)&&o.once(e,s))]};function wS(o){return wr(this,arguments,function*(){let s=[],l="error",A=!1,p=null,w,F,S=0,R=[],V;function X(){return w==="peek"?_r(R,F)[0]:([V,R,S]=_r(R,F),V)}if({cmd:w,size:F}=(yield yield yt((()=>null)()))||{cmd:"read",size:0},o.isTTY)return yield yield yt(new Uint8Array(0)),yield yt(null);try{s[0]=va(o,"end"),s[1]=va(o,"error");do{if(s[2]=va(o,"readable"),[l,p]=yield yt(Promise.race(s.map(mt=>mt[2]))),l==="error")break;if((A=l==="end")||(Number.isFinite(F-S)?(V=st(o.read(F-S)),V.byteLength<F-S&&(V=st(o.read()))):V=st(o.read()),V.byteLength>0&&(R.push(V),S+=V.byteLength)),A||F<=S)do({cmd:w,size:F}=yield yield yt(X()));while(F<S)}while(!A)}finally{yield yt(at(s,l==="error"?p:null))}return yield yt(null);function at(mt,Xt){return V=R=null,new Promise((br,Jr)=>{for(let[xe,Fi]of mt)o.off(xe,Fi);try{let xe=o.destroy;xe&&xe.call(o,Xt),Xt=void 0}catch(xe){Xt=xe||Xt}finally{Xt!=null?Jr(Xt):br()}})}})}var Zt;(function(o){o[o.V1=0]="V1",o[o.V2=1]="V2",o[o.V3=2]="V3",o[o.V4=3]="V4",o[o.V5=4]="V5"})(Zt||(Zt={}));var Gt;(function(o){o[o.Sparse=0]="Sparse",o[o.Dense=1]="Dense"})(Gt||(Gt={}));var zt;(function(o){o[o.HALF=0]="HALF",o[o.SINGLE=1]="SINGLE",o[o.DOUBLE=2]="DOUBLE"})(zt||(zt={}));var Kt;(function(o){o[o.DAY=0]="DAY",o[o.MILLISECOND=1]="MILLISECOND"})(Kt||(Kt={}));var H;(function(o){o[o.SECOND=0]="SECOND",o[o.MILLISECOND=1]="MILLISECOND",o[o.MICROSECOND=2]="MICROSECOND",o[o.NANOSECOND=3]="NANOSECOND"})(H||(H={}));var ce;(function(o){o[o.YEAR_MONTH=0]="YEAR_MONTH",o[o.DAY_TIME=1]="DAY_TIME",o[o.MONTH_DAY_NANO=2]="MONTH_DAY_NANO"})(ce||(ce={}));var Fn=new Int32Array(2),Ju=new Float32Array(Fn.buffer),Yu=new Float64Array(Fn.buffer),j0=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;var uo;(function(o){o[o.UTF8_BYTES=1]="UTF8_BYTES",o[o.UTF16_STRING=2]="UTF16_STRING"})(uo||(uo={}));var Ge=class{constructor(e){this.bytes_=e,this.position_=0,this.text_decoder_=new TextDecoder}static allocate(e){return new Ge(new Uint8Array(e))}clear(){this.position_=0}bytes(){return this.bytes_}position(){return this.position_}setPosition(e){this.position_=e}capacity(){return this.bytes_.length}readInt8(e){return this.readUint8(e)<<24>>24}readUint8(e){return this.bytes_[e]}readInt16(e){return this.readUint16(e)<<16>>16}readUint16(e){return this.bytes_[e]|this.bytes_[e+1]<<8}readInt32(e){return this.bytes_[e]|this.bytes_[e+1]<<8|this.bytes_[e+2]<<16|this.bytes_[e+3]<<24}readUint32(e){return this.readInt32(e)>>>0}readInt64(e){return BigInt.asIntN(64,BigInt(this.readUint32(e))+(BigInt(this.readUint32(e+4))<<BigInt(32)))}readUint64(e){return BigInt.asUintN(64,BigInt(this.readUint32(e))+(BigInt(this.readUint32(e+4))<<BigInt(32)))}readFloat32(e){return Fn[0]=this.readInt32(e),Ju[0]}readFloat64(e){return Fn[j0?0:1]=this.readInt32(e),Fn[j0?1:0]=this.readInt32(e+4),Yu[0]}writeInt8(e,s){this.bytes_[e]=s}writeUint8(e,s){this.bytes_[e]=s}writeInt16(e,s){this.bytes_[e]=s,this.bytes_[e+1]=s>>8}writeUint16(e,s){this.bytes_[e]=s,this.bytes_[e+1]=s>>8}writeInt32(e,s){this.bytes_[e]=s,this.bytes_[e+1]=s>>8,this.bytes_[e+2]=s>>16,this.bytes_[e+3]=s>>24}writeUint32(e,s){this.bytes_[e]=s,this.bytes_[e+1]=s>>8,this.bytes_[e+2]=s>>16,this.bytes_[e+3]=s>>24}writeInt64(e,s){this.writeInt32(e,Number(BigInt.asIntN(32,s))),this.writeInt32(e+4,Number(BigInt.asIntN(32,s>>BigInt(32))))}writeUint64(e,s){this.writeUint32(e,Number(BigInt.asUintN(32,s))),this.writeUint32(e+4,Number(BigInt.asUintN(32,s>>BigInt(32))))}writeFloat32(e,s){Ju[0]=s,this.writeInt32(e,Fn[0])}writeFloat64(e,s){Yu[0]=s,this.writeInt32(e,Fn[j0?0:1]),this.writeInt32(e+4,Fn[j0?1:0])}getBufferIdentifier(){if(this.bytes_.length<this.position_+4+4)throw new Error("FlatBuffers: ByteBuffer is too short to contain an identifier.");let e="";for(let s=0;s<4;s++)e+=String.fromCharCode(this.readInt8(this.position_+4+s));return e}__offset(e,s){let l=e-this.readInt32(e);return s<this.readInt16(l)?this.readInt16(l+s):0}__union(e,s){return e.bb_pos=s+this.readInt32(s),e.bb=this,e}__string(e,s){e+=this.readInt32(e);let l=this.readInt32(e);e+=4;let A=this.bytes_.subarray(e,e+l);return s===uo.UTF8_BYTES?A:this.text_decoder_.decode(A)}__union_with_string(e,s){return typeof e=="string"?this.__string(s):this.__union(e,s)}__indirect(e){return e+this.readInt32(e)}__vector(e){return e+this.readInt32(e)+4}__vector_len(e){return this.readInt32(e+this.readInt32(e))}__has_identifier(e){if(e.length!=4)throw new Error("FlatBuffers: file identifier must be length "+4);for(let s=0;s<4;s++)if(e.charCodeAt(s)!=this.readInt8(this.position()+4+s))return!1;return!0}createScalarList(e,s){let l=[];for(let A=0;A<s;++A){let p=e(A);p!==null&&l.push(p)}return l}createObjList(e,s){let l=[];for(let A=0;A<s;++A){let p=e(A);p!==null&&l.push(p.unpack())}return l}};var Yn=class{constructor(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,this.string_maps=null,this.text_encoder=new TextEncoder;let s;e?s=e:s=1024,this.bb=Ge.allocate(s),this.space=s}clear(){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,this.string_maps=null}forceDefaults(e){this.force_defaults=e}dataBuffer(){return this.bb}asUint8Array(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())}prep(e,s){e>this.minalign&&(this.minalign=e);let l=~(this.bb.capacity()-this.space+s)+1&e-1;for(;this.space<l+e+s;){let A=this.bb.capacity();this.bb=Yn.growByteBuffer(this.bb),this.space+=this.bb.capacity()-A}this.pad(l)}pad(e){for(let s=0;s<e;s++)this.bb.writeInt8(--this.space,0)}writeInt8(e){this.bb.writeInt8(this.space-=1,e)}writeInt16(e){this.bb.writeInt16(this.space-=2,e)}writeInt32(e){this.bb.writeInt32(this.space-=4,e)}writeInt64(e){this.bb.writeInt64(this.space-=8,e)}writeFloat32(e){this.bb.writeFloat32(this.space-=4,e)}writeFloat64(e){this.bb.writeFloat64(this.space-=8,e)}addInt8(e){this.prep(1,0),this.writeInt8(e)}addInt16(e){this.prep(2,0),this.writeInt16(e)}addInt32(e){this.prep(4,0),this.writeInt32(e)}addInt64(e){this.prep(8,0),this.writeInt64(e)}addFloat32(e){this.prep(4,0),this.writeFloat32(e)}addFloat64(e){this.prep(8,0),this.writeFloat64(e)}addFieldInt8(e,s,l){(this.force_defaults||s!=l)&&(this.addInt8(s),this.slot(e))}addFieldInt16(e,s,l){(this.force_defaults||s!=l)&&(this.addInt16(s),this.slot(e))}addFieldInt32(e,s,l){(this.force_defaults||s!=l)&&(this.addInt32(s),this.slot(e))}addFieldInt64(e,s,l){(this.force_defaults||s!==l)&&(this.addInt64(s),this.slot(e))}addFieldFloat32(e,s,l){(this.force_defaults||s!=l)&&(this.addFloat32(s),this.slot(e))}addFieldFloat64(e,s,l){(this.force_defaults||s!=l)&&(this.addFloat64(s),this.slot(e))}addFieldOffset(e,s,l){(this.force_defaults||s!=l)&&(this.addOffset(s),this.slot(e))}addFieldStruct(e,s,l){s!=l&&(this.nested(s),this.slot(e))}nested(e){if(e!=this.offset())throw new TypeError("FlatBuffers: struct must be serialized inline.")}notNested(){if(this.isNested)throw new TypeError("FlatBuffers: object serialization must not be nested.")}slot(e){this.vtable!==null&&(this.vtable[e]=this.offset())}offset(){return this.bb.capacity()-this.space}static growByteBuffer(e){let s=e.capacity();if(s&3221225472)throw new Error("FlatBuffers: cannot grow buffer beyond 2 gigabytes.");let l=s<<1,A=Ge.allocate(l);return A.setPosition(l-s),A.bytes().set(e.bytes(),l-s),A}addOffset(e){this.prep(4,0),this.writeInt32(this.offset()-e+4)}startObject(e){this.notNested(),this.vtable==null&&(this.vtable=[]),this.vtable_in_use=e;for(let s=0;s<e;s++)this.vtable[s]=0;this.isNested=!0,this.object_start=this.offset()}endObject(){if(this.vtable==null||!this.isNested)throw new Error("FlatBuffers: endObject called without startObject");this.addInt32(0);let e=this.offset(),s=this.vtable_in_use-1;for(;s>=0&&this.vtable[s]==0;s--);let l=s+1;for(;s>=0;s--)this.addInt16(this.vtable[s]!=0?e-this.vtable[s]:0);let A=2;this.addInt16(e-this.object_start);let p=(l+A)*2;this.addInt16(p);let w=0,F=this.space;t:for(s=0;s<this.vtables.length;s++){let S=this.bb.capacity()-this.vtables[s];if(p==this.bb.readInt16(S)){for(let R=2;R<p;R+=2)if(this.bb.readInt16(F+R)!=this.bb.readInt16(S+R))continue t;w=this.vtables[s];break}}return w?(this.space=this.bb.capacity()-e,this.bb.writeInt32(this.space,w-e)):(this.vtables.push(this.offset()),this.bb.writeInt32(this.bb.capacity()-e,this.offset()-e)),this.isNested=!1,e}finish(e,s,l){let A=l?4:0;if(s){let p=s;if(this.prep(this.minalign,4+4+A),p.length!=4)throw new TypeError("FlatBuffers: file identifier must be length "+4);for(let w=4-1;w>=0;w--)this.writeInt8(p.charCodeAt(w))}this.prep(this.minalign,4+A),this.addOffset(e),A&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)}finishSizePrefixed(e,s){this.finish(e,s,!0)}requiredField(e,s){let l=this.bb.capacity()-e,A=l-this.bb.readInt32(l);if(!(s<this.bb.readInt16(A)&&this.bb.readInt16(A+s)!=0))throw new TypeError("FlatBuffers: field "+s+" must be set")}startVector(e,s,l){this.notNested(),this.vector_num_elems=s,this.prep(4,e*s),this.prep(l,e*s)}endVector(){return this.writeInt32(this.vector_num_elems),this.offset()}createSharedString(e){if(!e)return 0;if(this.string_maps||(this.string_maps=new Map),this.string_maps.has(e))return this.string_maps.get(e);let s=this.createString(e);return this.string_maps.set(e,s),s}createString(e){if(e==null)return 0;let s;return e instanceof Uint8Array?s=e:s=this.text_encoder.encode(e),this.addInt8(0),this.startVector(1,s.length,1),this.bb.setPosition(this.space-=s.length),this.bb.bytes().set(s,this.space),this.endVector()}createByteVector(e){return e==null?0:(this.startVector(1,e.length,1),this.bb.setPosition(this.space-=e.length),this.bb.bytes().set(e,this.space),this.endVector())}createObjectOffset(e){return e===null?0:typeof e=="string"?this.createString(e):e.pack(this)}createObjectOffsetList(e){let s=[];for(let l=0;l<e.length;++l){let A=e[l];if(A!==null)s.push(this.createObjectOffset(A));else throw new TypeError("FlatBuffers: Argument for createObjectOffsetList cannot contain null.")}return s}createStructOffsetList(e,s){return s(this,e.length),this.createObjectOffsetList(e.slice().reverse()),this.endVector()}};var co;(function(o){o[o.BUFFER=0]="BUFFER"})(co||(co={}));var lo;(function(o){o[o.LZ4_FRAME=0]="LZ4_FRAME",o[o.ZSTD=1]="ZSTD"})(lo||(lo={}));var en=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsBodyCompression(e,s){return(s||new en).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBodyCompression(e,s){return e.setPosition(e.position()+4),(s||new en).__init(e.readInt32(e.position())+e.position(),e)}codec(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt8(this.bb_pos+e):lo.LZ4_FRAME}method(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt8(this.bb_pos+e):co.BUFFER}static startBodyCompression(e){e.startObject(2)}static addCodec(e,s){e.addFieldInt8(0,s,lo.LZ4_FRAME)}static addMethod(e,s){e.addFieldInt8(1,s,co.BUFFER)}static endBodyCompression(e){return e.endObject()}static createBodyCompression(e,s,l){return en.startBodyCompression(e),en.addCodec(e,s),en.addMethod(e,l),en.endBodyCompression(e)}};var L0=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}offset(){return this.bb.readInt64(this.bb_pos)}length(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createBuffer(e,s,l){return e.prep(8,16),e.writeInt64(BigInt(l??0)),e.writeInt64(BigInt(s??0)),e.offset()}};var J0=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}length(){return this.bb.readInt64(this.bb_pos)}nullCount(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createFieldNode(e,s,l){return e.prep(8,16),e.writeInt64(BigInt(l??0)),e.writeInt64(BigInt(s??0)),e.offset()}};var Oe=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsRecordBatch(e,s){return(s||new Oe).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsRecordBatch(e,s){return e.setPosition(e.position()+4),(s||new Oe).__init(e.readInt32(e.position())+e.position(),e)}length(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):BigInt("0")}nodes(e,s){let l=this.bb.__offset(this.bb_pos,6);return l?(s||new J0).__init(this.bb.__vector(this.bb_pos+l)+e*16,this.bb):null}nodesLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}buffers(e,s){let l=this.bb.__offset(this.bb_pos,8);return l?(s||new L0).__init(this.bb.__vector(this.bb_pos+l)+e*16,this.bb):null}buffersLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}compression(e){let s=this.bb.__offset(this.bb_pos,10);return s?(e||new en).__init(this.bb.__indirect(this.bb_pos+s),this.bb):null}static startRecordBatch(e){e.startObject(4)}static addLength(e,s){e.addFieldInt64(0,s,BigInt("0"))}static addNodes(e,s){e.addFieldOffset(1,s,0)}static startNodesVector(e,s){e.startVector(16,s,8)}static addBuffers(e,s){e.addFieldOffset(2,s,0)}static startBuffersVector(e,s){e.startVector(16,s,8)}static addCompression(e,s){e.addFieldOffset(3,s,0)}static endRecordBatch(e){return e.endObject()}};var Wr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsDictionaryBatch(e,s){return(s||new Wr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryBatch(e,s){return e.setPosition(e.position()+4),(s||new Wr).__init(e.readInt32(e.position())+e.position(),e)}id(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):BigInt("0")}data(e){let s=this.bb.__offset(this.bb_pos,6);return s?(e||new Oe).__init(this.bb.__indirect(this.bb_pos+s),this.bb):null}isDelta(){let e=this.bb.__offset(this.bb_pos,8);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startDictionaryBatch(e){e.startObject(3)}static addId(e,s){e.addFieldInt64(0,s,BigInt("0"))}static addData(e,s){e.addFieldOffset(1,s,0)}static addIsDelta(e,s){e.addFieldInt8(2,+s,0)}static endDictionaryBatch(e){return e.endObject()}};var pi;(function(o){o[o.Little=0]="Little",o[o.Big=1]="Big"})(pi||(pi={}));var ao;(function(o){o[o.DenseArray=0]="DenseArray"})(ao||(ao={}));var Fe=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsInt(e,s){return(s||new Fe).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInt(e,s){return e.setPosition(e.position()+4),(s||new Fe).__init(e.readInt32(e.position())+e.position(),e)}bitWidth(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}isSigned(){let e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startInt(e){e.startObject(2)}static addBitWidth(e,s){e.addFieldInt32(0,s,0)}static addIsSigned(e,s){e.addFieldInt8(1,+s,0)}static endInt(e){return e.endObject()}static createInt(e,s,l){return Fe.startInt(e),Fe.addBitWidth(e,s),Fe.addIsSigned(e,l),Fe.endInt(e)}};var vr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsDictionaryEncoding(e,s){return(s||new vr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryEncoding(e,s){return e.setPosition(e.position()+4),(s||new vr).__init(e.readInt32(e.position())+e.position(),e)}id(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):BigInt("0")}indexType(e){let s=this.bb.__offset(this.bb_pos,6);return s?(e||new Fe).__init(this.bb.__indirect(this.bb_pos+s),this.bb):null}isOrdered(){let e=this.bb.__offset(this.bb_pos,8);return e?!!this.bb.readInt8(this.bb_pos+e):!1}dictionaryKind(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt16(this.bb_pos+e):ao.DenseArray}static startDictionaryEncoding(e){e.startObject(4)}static addId(e,s){e.addFieldInt64(0,s,BigInt("0"))}static addIndexType(e,s){e.addFieldOffset(1,s,0)}static addIsOrdered(e,s){e.addFieldInt8(2,+s,0)}static addDictionaryKind(e,s){e.addFieldInt16(3,s,ao.DenseArray)}static endDictionaryEncoding(e){return e.endObject()}};var Ht=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsKeyValue(e,s){return(s||new Ht).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsKeyValue(e,s){return e.setPosition(e.position()+4),(s||new Ht).__init(e.readInt32(e.position())+e.position(),e)}key(e){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.__string(this.bb_pos+s,e):null}value(e){let s=this.bb.__offset(this.bb_pos,6);return s?this.bb.__string(this.bb_pos+s,e):null}static startKeyValue(e){e.startObject(2)}static addKey(e,s){e.addFieldOffset(0,s,0)}static addValue(e,s){e.addFieldOffset(1,s,0)}static endKeyValue(e){return e.endObject()}static createKeyValue(e,s,l){return Ht.startKeyValue(e),Ht.addKey(e,s),Ht.addValue(e,l),Ht.endKeyValue(e)}};var Bn=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsBinary(e,s){return(s||new Bn).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBinary(e,s){return e.setPosition(e.position()+4),(s||new Bn).__init(e.readInt32(e.position())+e.position(),e)}static startBinary(e){e.startObject(0)}static endBinary(e){return e.endObject()}static createBinary(e){return Bn.startBinary(e),Bn.endBinary(e)}};var In=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsBool(e,s){return(s||new In).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBool(e,s){return e.setPosition(e.position()+4),(s||new In).__init(e.readInt32(e.position())+e.position(),e)}static startBool(e){e.startObject(0)}static endBool(e){return e.endObject()}static createBool(e){return In.startBool(e),In.endBool(e)}};var He=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsDate(e,s){return(s||new He).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDate(e,s){return e.setPosition(e.position()+4),(s||new He).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Kt.MILLISECOND}static startDate(e){e.startObject(1)}static addUnit(e,s){e.addFieldInt16(0,s,Kt.MILLISECOND)}static endDate(e){return e.endObject()}static createDate(e,s){return He.startDate(e),He.addUnit(e,s),He.endDate(e)}};var Be=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsDecimal(e,s){return(s||new Be).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDecimal(e,s){return e.setPosition(e.position()+4),(s||new Be).__init(e.readInt32(e.position())+e.position(),e)}precision(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}scale(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):0}bitWidth(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readInt32(this.bb_pos+e):128}static startDecimal(e){e.startObject(3)}static addPrecision(e,s){e.addFieldInt32(0,s,0)}static addScale(e,s){e.addFieldInt32(1,s,0)}static addBitWidth(e,s){e.addFieldInt32(2,s,128)}static endDecimal(e){return e.endObject()}static createDecimal(e,s,l,A){return Be.startDecimal(e),Be.addPrecision(e,s),Be.addScale(e,l),Be.addBitWidth(e,A),Be.endDecimal(e)}};var Qe=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsDuration(e,s){return(s||new Qe).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDuration(e,s){return e.setPosition(e.position()+4),(s||new Qe).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):H.MILLISECOND}static startDuration(e){e.startObject(1)}static addUnit(e,s){e.addFieldInt16(0,s,H.MILLISECOND)}static endDuration(e){return e.endObject()}static createDuration(e,s){return Qe.startDuration(e),Qe.addUnit(e,s),Qe.endDuration(e)}};var $e=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsFixedSizeBinary(e,s){return(s||new $e).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeBinary(e,s){return e.setPosition(e.position()+4),(s||new $e).__init(e.readInt32(e.position())+e.position(),e)}byteWidth(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeBinary(e){e.startObject(1)}static addByteWidth(e,s){e.addFieldInt32(0,s,0)}static endFixedSizeBinary(e){return e.endObject()}static createFixedSizeBinary(e,s){return $e.startFixedSizeBinary(e),$e.addByteWidth(e,s),$e.endFixedSizeBinary(e)}};var qe=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsFixedSizeList(e,s){return(s||new qe).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeList(e,s){return e.setPosition(e.position()+4),(s||new qe).__init(e.readInt32(e.position())+e.position(),e)}listSize(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeList(e){e.startObject(1)}static addListSize(e,s){e.addFieldInt32(0,s,0)}static endFixedSizeList(e){return e.endObject()}static createFixedSizeList(e,s){return qe.startFixedSizeList(e),qe.addListSize(e,s),qe.endFixedSizeList(e)}};var Ke=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsFloatingPoint(e,s){return(s||new Ke).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFloatingPoint(e,s){return e.setPosition(e.position()+4),(s||new Ke).__init(e.readInt32(e.position())+e.position(),e)}precision(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):zt.HALF}static startFloatingPoint(e){e.startObject(1)}static addPrecision(e,s){e.addFieldInt16(0,s,zt.HALF)}static endFloatingPoint(e){return e.endObject()}static createFloatingPoint(e,s){return Ke.startFloatingPoint(e),Ke.addPrecision(e,s),Ke.endFloatingPoint(e)}};var tr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsInterval(e,s){return(s||new tr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInterval(e,s){return e.setPosition(e.position()+4),(s||new tr).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):ce.YEAR_MONTH}static startInterval(e){e.startObject(1)}static addUnit(e,s){e.addFieldInt16(0,s,ce.YEAR_MONTH)}static endInterval(e){return e.endObject()}static createInterval(e,s){return tr.startInterval(e),tr.addUnit(e,s),tr.endInterval(e)}};var Sn=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsLargeBinary(e,s){return(s||new Sn).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeBinary(e,s){return e.setPosition(e.position()+4),(s||new Sn).__init(e.readInt32(e.position())+e.position(),e)}static startLargeBinary(e){e.startObject(0)}static endLargeBinary(e){return e.endObject()}static createLargeBinary(e){return Sn.startLargeBinary(e),Sn.endLargeBinary(e)}};var bn=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsLargeUtf8(e,s){return(s||new bn).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeUtf8(e,s){return e.setPosition(e.position()+4),(s||new bn).__init(e.readInt32(e.position())+e.position(),e)}static startLargeUtf8(e){e.startObject(0)}static endLargeUtf8(e){return e.endObject()}static createLargeUtf8(e){return bn.startLargeUtf8(e),bn.endLargeUtf8(e)}};var Tn=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsList(e,s){return(s||new Tn).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsList(e,s){return e.setPosition(e.position()+4),(s||new Tn).__init(e.readInt32(e.position())+e.position(),e)}static startList(e){e.startObject(0)}static endList(e){return e.endObject()}static createList(e){return Tn.startList(e),Tn.endList(e)}};var er=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsMap(e,s){return(s||new er).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMap(e,s){return e.setPosition(e.position()+4),(s||new er).__init(e.readInt32(e.position())+e.position(),e)}keysSorted(){let e=this.bb.__offset(this.bb_pos,4);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startMap(e){e.startObject(1)}static addKeysSorted(e,s){e.addFieldInt8(0,+s,0)}static endMap(e){return e.endObject()}static createMap(e,s){return er.startMap(e),er.addKeysSorted(e,s),er.endMap(e)}};var Un=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsNull(e,s){return(s||new Un).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsNull(e,s){return e.setPosition(e.position()+4),(s||new Un).__init(e.readInt32(e.position())+e.position(),e)}static startNull(e){e.startObject(0)}static endNull(e){return e.endObject()}static createNull(e){return Un.startNull(e),Un.endNull(e)}};var Rn=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsStruct_(e,s){return(s||new Rn).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsStruct_(e,s){return e.setPosition(e.position()+4),(s||new Rn).__init(e.readInt32(e.position())+e.position(),e)}static startStruct_(e){e.startObject(0)}static endStruct_(e){return e.endObject()}static createStruct_(e){return Rn.startStruct_(e),Rn.endStruct_(e)}};var Ze=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsTime(e,s){return(s||new Ze).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTime(e,s){return e.setPosition(e.position()+4),(s||new Ze).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):H.MILLISECOND}bitWidth(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):32}static startTime(e){e.startObject(2)}static addUnit(e,s){e.addFieldInt16(0,s,H.MILLISECOND)}static addBitWidth(e,s){e.addFieldInt32(1,s,32)}static endTime(e){return e.endObject()}static createTime(e,s,l){return Ze.startTime(e),Ze.addUnit(e,s),Ze.addBitWidth(e,l),Ze.endTime(e)}};var De=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsTimestamp(e,s){return(s||new De).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTimestamp(e,s){return e.setPosition(e.position()+4),(s||new De).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):H.SECOND}timezone(e){let s=this.bb.__offset(this.bb_pos,6);return s?this.bb.__string(this.bb_pos+s,e):null}static startTimestamp(e){e.startObject(2)}static addUnit(e,s){e.addFieldInt16(0,s,H.SECOND)}static addTimezone(e,s){e.addFieldOffset(1,s,0)}static endTimestamp(e){return e.endObject()}static createTimestamp(e,s,l){return De.startTimestamp(e),De.addUnit(e,s),De.addTimezone(e,l),De.endTimestamp(e)}};var Ie=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsUnion(e,s){return(s||new Ie).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUnion(e,s){return e.setPosition(e.position()+4),(s||new Ie).__init(e.readInt32(e.position())+e.position(),e)}mode(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Gt.Sparse}typeIds(e){let s=this.bb.__offset(this.bb_pos,6);return s?this.bb.readInt32(this.bb.__vector(this.bb_pos+s)+e*4):0}typeIdsLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}typeIdsArray(){let e=this.bb.__offset(this.bb_pos,6);return e?new Int32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}static startUnion(e){e.startObject(2)}static addMode(e,s){e.addFieldInt16(0,s,Gt.Sparse)}static addTypeIds(e,s){e.addFieldOffset(1,s,0)}static createTypeIdsVector(e,s){e.startVector(4,s.length,4);for(let l=s.length-1;l>=0;l--)e.addInt32(s[l]);return e.endVector()}static startTypeIdsVector(e,s){e.startVector(4,s,4)}static endUnion(e){return e.endObject()}static createUnion(e,s,l){return Ie.startUnion(e),Ie.addMode(e,s),Ie.addTypeIds(e,l),Ie.endUnion(e)}};var Vn=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsUtf8(e,s){return(s||new Vn).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUtf8(e,s){return e.setPosition(e.position()+4),(s||new Vn).__init(e.readInt32(e.position())+e.position(),e)}static startUtf8(e){e.startObject(0)}static endUtf8(e){return e.endObject()}static createUtf8(e){return Vn.startUtf8(e),Vn.endUtf8(e)}};var jt;(function(o){o[o.NONE=0]="NONE",o[o.Null=1]="Null",o[o.Int=2]="Int",o[o.FloatingPoint=3]="FloatingPoint",o[o.Binary=4]="Binary",o[o.Utf8=5]="Utf8",o[o.Bool=6]="Bool",o[o.Decimal=7]="Decimal",o[o.Date=8]="Date",o[o.Time=9]="Time",o[o.Timestamp=10]="Timestamp",o[o.Interval=11]="Interval",o[o.List=12]="List",o[o.Struct_=13]="Struct_",o[o.Union=14]="Union",o[o.FixedSizeBinary=15]="FixedSizeBinary",o[o.FixedSizeList=16]="FixedSizeList",o[o.Map=17]="Map",o[o.Duration=18]="Duration",o[o.LargeBinary=19]="LargeBinary",o[o.LargeUtf8=20]="LargeUtf8",o[o.LargeList=21]="LargeList",o[o.RunEndEncoded=22]="RunEndEncoded"})(jt||(jt={}));var he=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsField(e,s){return(s||new he).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsField(e,s){return e.setPosition(e.position()+4),(s||new he).__init(e.readInt32(e.position())+e.position(),e)}name(e){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.__string(this.bb_pos+s,e):null}nullable(){let e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}typeType(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readUint8(this.bb_pos+e):jt.NONE}type(e){let s=this.bb.__offset(this.bb_pos,10);return s?this.bb.__union(e,this.bb_pos+s):null}dictionary(e){let s=this.bb.__offset(this.bb_pos,12);return s?(e||new vr).__init(this.bb.__indirect(this.bb_pos+s),this.bb):null}children(e,s){let l=this.bb.__offset(this.bb_pos,14);return l?(s||new he).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+l)+e*4),this.bb):null}childrenLength(){let e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,s){let l=this.bb.__offset(this.bb_pos,16);return l?(s||new Ht).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+l)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,16);return e?this.bb.__vector_len(this.bb_pos+e):0}static startField(e){e.startObject(7)}static addName(e,s){e.addFieldOffset(0,s,0)}static addNullable(e,s){e.addFieldInt8(1,+s,0)}static addTypeType(e,s){e.addFieldInt8(2,s,jt.NONE)}static addType(e,s){e.addFieldOffset(3,s,0)}static addDictionary(e,s){e.addFieldOffset(4,s,0)}static addChildren(e,s){e.addFieldOffset(5,s,0)}static createChildrenVector(e,s){e.startVector(4,s.length,4);for(let l=s.length-1;l>=0;l--)e.addOffset(s[l]);return e.endVector()}static startChildrenVector(e,s){e.startVector(4,s,4)}static addCustomMetadata(e,s){e.addFieldOffset(6,s,0)}static createCustomMetadataVector(e,s){e.startVector(4,s.length,4);for(let l=s.length-1;l>=0;l--)e.addOffset(s[l]);return e.endVector()}static startCustomMetadataVector(e,s){e.startVector(4,s,4)}static endField(e){return e.endObject()}};var se=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,s){return this.bb_pos=e,this.bb=s,this}static getRootAsSchema(e,s){return(s||new se).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsSchema(e,s){return e.setPosition(e.position()+4),(s||new se).__init(e.readInt32(e.position())+e.position(),e)}endianness(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):pi.Little}fields(e,s){let l=this.bb.__offset(this.bb_pos,6);return l?(s||new he).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+l)+e*4),this.bb):null}fieldsLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,s){let l=this.bb.__offset(this.bb_pos,8);return l?(s||new Ht).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+l)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}features(e){let s=this.bb.__offset(this.bb_pos,10);return s?this.bb.readInt64(this.bb.__vector(this.bb_pos+s)+e*8):BigInt(0)}featuresLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}static startSchema(e){e.startObject(4)}static addEndianness(e,s){e.addFieldInt16(0,s,pi.Little)}static addFields(e,s){e.addFieldOffset(1,s,0)}static createFieldsVector(e,s){e.startVector(4,s.length,4);for(let l=s.length-1;l>=0;l--)e.addOffset(s[l]);return e.endVector()}static startFieldsVector(e,s){e.startVector(4,s,4)}static addCustomMetadata(e,s){e.addFieldOffset(2,s,0)}static createCustomMetadataVector(e,s){e.startVector(4,s.length,4);for(let l=s.length-1;l>=0;l--)e.addOffset(s[l]);return e.endVector()}static startCustomMetadataVector(e,s){e.startVector(4,s,4)}static addFeatures(e,s){e.addFieldOffset(3,s,0)}static createFeaturesVector(e,s){e.startVector(8,s.length,8);for(let l=s.length-1;l>=0;l--)e.addInt64(s[l]);return e.endVector()}static startFeaturesVector(e,s){e.startVector(8,s,8)}static endSchema(e){return e.endObject()}static finishSchemaBuffer(e,s){e.finish(s)}static finishSizePrefixedSchemaBuffer(e,s){e.finish(s,void 0,!0)}static createSchema(e,s,l,A,p){return se.startSchema(e),se.addEndianness(e,s),se.addFields(e,l),se.addCustomMetadata(e,A),se.addFeatures(e,p),se.endSchema(e)}};var It;(function(o){o[o.NONE=0]="NONE",o[o.Schema=1]="Schema",o[o.DictionaryBatch=2]="DictionaryBatch",o[o.RecordBatch=3]="RecordBatch",o[o.Tensor=4]="Tensor",o[o.SparseTensor=5]="SparseTensor"})(It||(It={}));var x;(function(o){o[o.NONE=0]="NONE",o[o.Null=1]="Null",o[o.Int=2]="Int",o[o.Float=3]="Float",o[o.Binary=4]="Binary",o[o.Utf8=5]="Utf8",o[o.Bool=6]="Bool",o[o.Decimal=7]="Decimal",o[o.Date=8]="Date",o[o.Time=9]="Time",o[o.Timestamp=10]="Timestamp",o[o.Interval=11]="Interval",o[o.List=12]="List",o[o.Struct=13]="Struct",o[o.Union=14]="Union",o[o.FixedSizeBinary=15]="FixedSizeBinary",o[o.FixedSizeList=16]="FixedSizeList",o[o.Map=17]="Map",o[o.Duration=18]="Duration",o[o.LargeBinary=19]="LargeBinary",o[o.LargeUtf8=20]="LargeUtf8",o[o.Dictionary=-1]="Dictionary",o[o.Int8=-2]="Int8",o[o.Int16=-3]="Int16",o[o.Int32=-4]="Int32",o[o.Int64=-5]="Int64",o[o.Uint8=-6]="Uint8",o[o.Uint16=-7]="Uint16",o[o.Uint32=-8]="Uint32",o[o.Uint64=-9]="Uint64",o[o.Float16=-10]="Float16",o[o.Float32=-11]="Float32",o[o.Float64=-12]="Float64",o[o.DateDay=-13]="DateDay",o[o.DateMillisecond=-14]="DateMillisecond",o[o.TimestampSecond=-15]="TimestampSecond",o[o.TimestampMillisecond=-16]="TimestampMillisecond",o[o.TimestampMicrosecond=-17]="TimestampMicrosecond",o[o.TimestampNanosecond=-18]="TimestampNanosecond",o[o.TimeSecond=-19]="TimeSecond",o[o.TimeMillisecond=-20]="TimeMillisecond",o[o.TimeMicrosecond=-21]="TimeMicrosecond",o[o.TimeNanosecond=-22]="TimeNanosecond",o[o.DenseUnion=-23]="DenseUnion",o[o.SparseUnion=-24]="SparseUnion",o[o.IntervalDayTime=-25]="IntervalDayTime",o[o.IntervalYearMonth=-26]="IntervalYearMonth",o[o.DurationSecond=-27]="DurationSecond",o[o.DurationMillisecond=-28]="DurationMillisecond",o[o.DurationMicrosecond=-29]="DurationMicrosecond",o[o.DurationNanosecond=-30]="DurationNanosecond"})(x||(x={}));var rr;(function(o){o[o.OFFSET=0]="OFFSET",o[o.DATA=1]="DATA",o[o.VALIDITY=2]="VALIDITY",o[o.TYPE=3]="TYPE"})(rr||(rr={}));var Ca={};Ai(Ca,{clampRange:()=>Ao,createElementComparator:()=>wi,wrapIndex:()=>r0});var Ba={};Ai(Ba,{valueToString:()=>rn});function rn(o){if(o===null)return"null";if(o===void 0)return"undefined";switch(typeof o){case"number":return`${o}`;case"bigint":return`${o}`;case"string":return`"${o}"`}return typeof o[Symbol.toPrimitive]=="function"?o[Symbol.toPrimitive]("string"):ArrayBuffer.isView(o)?o instanceof BigInt64Array||o instanceof BigUint64Array?`[${[...o].map(e=>rn(e))}]`:`[${o}]`:ArrayBuffer.isView(o)?`[${o}]`:JSON.stringify(o,(e,s)=>typeof s=="bigint"?`${s}`:s)}var Ta={};Ai(Ta,{BN:()=>Li,bigNumToBigInt:()=>kd,bigNumToNumber:()=>ba,bigNumToString:()=>H0,isArrowBigNumSymbol:()=>Nd});function Rt(o){if(typeof o=="bigint"&&(o<Number.MIN_SAFE_INTEGER||o>Number.MAX_SAFE_INTEGER))throw new TypeError(`${o} is not safe to convert to a number.`);return Number(o)}function Ia(o,e){return Rt(o/e)+Rt(o%e)/Rt(e)}var Nd=Symbol.for("isArrowBigNum");function nn(o,...e){return e.length===0?Object.setPrototypeOf(wt(this.TypedArray,o),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(o,...e),this.constructor.prototype)}nn.prototype[Nd]=!0;nn.prototype.toJSON=function(){return`"${H0(this)}"`};nn.prototype.valueOf=function(o){return ba(this,o)};nn.prototype.toString=function(){return H0(this)};nn.prototype[Symbol.toPrimitive]=function(o="default"){switch(o){case"number":return ba(this);case"string":return H0(this);case"default":return kd(this)}return H0(this)};function Y0(...o){return nn.apply(this,o)}function P0(...o){return nn.apply(this,o)}function fo(...o){return nn.apply(this,o)}Object.setPrototypeOf(Y0.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(P0.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(fo.prototype,Object.create(Uint32Array.prototype));Object.assign(Y0.prototype,nn.prototype,{constructor:Y0,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array});Object.assign(P0.prototype,nn.prototype,{constructor:P0,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array});Object.assign(fo.prototype,nn.prototype,{constructor:fo,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});var _S=BigInt(4294967296)*BigInt(4294967296),vS=_S-BigInt(1);function ba(o,e){let{buffer:s,byteOffset:l,byteLength:A,signed:p}=o,w=new BigUint64Array(s,l,A/8),F=p&&w.at(-1)&BigInt(1)<<BigInt(63),S=BigInt(0),R=0;if(F){for(let V of w)S|=(V^vS)*(BigInt(1)<<BigInt(64*R++));S*=BigInt(-1),S-=BigInt(1)}else for(let V of w)S|=V*(BigInt(1)<<BigInt(64*R++));if(typeof e=="number"){let V=BigInt(Math.pow(10,e)),X=S/V,at=S%V;return Rt(X)+Rt(at)/Rt(V)}return Rt(S)}function H0(o){if(o.byteLength===8)return`${new o.BigIntArray(o.buffer,o.byteOffset,1)[0]}`;if(!o.signed)return Sa(o);let e=new Uint16Array(o.buffer,o.byteOffset,o.byteLength/2);if(new Int16Array([e.at(-1)])[0]>=0)return Sa(o);e=e.slice();let l=1;for(let p=0;p<e.length;p++){let w=e[p],F=~w+l;e[p]=F,l&=w===0?1:0}return`-${Sa(e)}`}function kd(o){return o.byteLength===8?new o.BigIntArray(o.buffer,o.byteOffset,1)[0]:H0(o)}function Sa(o){let e="",s=new Uint32Array(2),l=new Uint16Array(o.buffer,o.byteOffset,o.byteLength/2),A=new Uint32Array((l=new Uint16Array(l).reverse()).buffer),p=-1,w=l.length-1;do{for(s[0]=l[p=0];p<w;)l[p++]=s[1]=s[0]/10,s[0]=(s[0]-s[1]*10<<16)+l[p];l[p]=s[1]=s[0]/10,s[0]=s[0]-s[1]*10,e=`${s[0]}${e}`}while(A[0]||A[1]||A[2]||A[3]);return e??"0"}var Li=class{static new(e,s){switch(s){case!0:return new Y0(e);case!1:return new P0(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case BigInt64Array:return new Y0(e)}return e.byteLength===16?new fo(e):new P0(e)}static signed(e){return new Y0(e)}static unsigned(e){return new P0(e)}static decimal(e){return new fo(e)}constructor(e,s){return Li.new(e,s)}};var Od,Zd,Dd,Wd,zd,Ed,Xd,Cd,Gd,jd,Ld,Jd,Yd,Pd,Hd,Qd,$d,qd,Kd,tA,eA,rA,P=class{static isNull(e){return e?.typeId===x.Null}static isInt(e){return e?.typeId===x.Int}static isFloat(e){return e?.typeId===x.Float}static isBinary(e){return e?.typeId===x.Binary}static isLargeBinary(e){return e?.typeId===x.LargeBinary}static isUtf8(e){return e?.typeId===x.Utf8}static isLargeUtf8(e){return e?.typeId===x.LargeUtf8}static isBool(e){return e?.typeId===x.Bool}static isDecimal(e){return e?.typeId===x.Decimal}static isDate(e){return e?.typeId===x.Date}static isTime(e){return e?.typeId===x.Time}static isTimestamp(e){return e?.typeId===x.Timestamp}static isInterval(e){return e?.typeId===x.Interval}static isDuration(e){return e?.typeId===x.Duration}static isList(e){return e?.typeId===x.List}static isStruct(e){return e?.typeId===x.Struct}static isUnion(e){return e?.typeId===x.Union}static isFixedSizeBinary(e){return e?.typeId===x.FixedSizeBinary}static isFixedSizeList(e){return e?.typeId===x.FixedSizeList}static isMap(e){return e?.typeId===x.Map}static isDictionary(e){return e?.typeId===x.Dictionary}static isDenseUnion(e){return P.isUnion(e)&&e.mode===Gt.Dense}static isSparseUnion(e){return P.isUnion(e)&&e.mode===Gt.Sparse}constructor(e){this.typeId=e}};Od=Symbol.toStringTag;P[Od]=(o=>(o.children=null,o.ArrayType=Array,o.OffsetArrayType=Int32Array,o[Symbol.toStringTag]="DataType"))(P.prototype);var Se=class extends P{constructor(){super(x.Null)}toString(){return"Null"}};Zd=Symbol.toStringTag;Se[Zd]=(o=>o[Symbol.toStringTag]="Null")(Se.prototype);var le=class extends P{constructor(e,s){super(x.Int),this.isSigned=e,this.bitWidth=s}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?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}};Dd=Symbol.toStringTag;le[Dd]=(o=>(o.isSigned=null,o.bitWidth=null,o[Symbol.toStringTag]="Int"))(le.prototype);var Ji=class extends le{constructor(){super(!0,8)}get ArrayType(){return Int8Array}},Yi=class extends le{constructor(){super(!0,16)}get ArrayType(){return Int16Array}},Fr=class extends le{constructor(){super(!0,32)}get ArrayType(){return Int32Array}},Pi=class extends le{constructor(){super(!0,64)}get ArrayType(){return BigInt64Array}},Hi=class extends le{constructor(){super(!1,8)}get ArrayType(){return Uint8Array}},Qi=class extends le{constructor(){super(!1,16)}get ArrayType(){return Uint16Array}},$i=class extends le{constructor(){super(!1,32)}get ArrayType(){return Uint32Array}},qi=class extends le{constructor(){super(!1,64)}get ArrayType(){return BigUint64Array}};Object.defineProperty(Ji.prototype,"ArrayType",{value:Int8Array});Object.defineProperty(Yi.prototype,"ArrayType",{value:Int16Array});Object.defineProperty(Fr.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(Pi.prototype,"ArrayType",{value:BigInt64Array});Object.defineProperty(Hi.prototype,"ArrayType",{value:Uint8Array});Object.defineProperty(Qi.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty($i.prototype,"ArrayType",{value:Uint32Array});Object.defineProperty(qi.prototype,"ArrayType",{value:BigUint64Array});var nr=class extends P{constructor(e){super(x.Float),this.precision=e}get ArrayType(){switch(this.precision){case zt.HALF:return Uint16Array;case zt.SINGLE:return Float32Array;case zt.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};Wd=Symbol.toStringTag;nr[Wd]=(o=>(o.precision=null,o[Symbol.toStringTag]="Float"))(nr.prototype);var Ki=class extends nr{constructor(){super(zt.HALF)}},t0=class extends nr{constructor(){super(zt.SINGLE)}},e0=class extends nr{constructor(){super(zt.DOUBLE)}};Object.defineProperty(Ki.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(t0.prototype,"ArrayType",{value:Float32Array});Object.defineProperty(e0.prototype,"ArrayType",{value:Float64Array});var zr=class extends P{constructor(){super(x.Binary)}toString(){return"Binary"}};zd=Symbol.toStringTag;zr[zd]=(o=>(o.ArrayType=Uint8Array,o[Symbol.toStringTag]="Binary"))(zr.prototype);var xn=class extends P{constructor(){super(x.LargeBinary)}toString(){return"LargeBinary"}};Ed=Symbol.toStringTag;xn[Ed]=(o=>(o.ArrayType=Uint8Array,o.OffsetArrayType=BigInt64Array,o[Symbol.toStringTag]="LargeBinary"))(xn.prototype);var Er=class extends P{constructor(){super(x.Utf8)}toString(){return"Utf8"}};Xd=Symbol.toStringTag;Er[Xd]=(o=>(o.ArrayType=Uint8Array,o[Symbol.toStringTag]="Utf8"))(Er.prototype);var Mn=class extends P{constructor(){super(x.LargeUtf8)}toString(){return"LargeUtf8"}};Cd=Symbol.toStringTag;Mn[Cd]=(o=>(o.ArrayType=Uint8Array,o.OffsetArrayType=BigInt64Array,o[Symbol.toStringTag]="LargeUtf8"))(Mn.prototype);var Xr=class extends P{constructor(){super(x.Bool)}toString(){return"Bool"}};Gd=Symbol.toStringTag;Xr[Gd]=(o=>(o.ArrayType=Uint8Array,o[Symbol.toStringTag]="Bool"))(Xr.prototype);var Cr=class extends P{constructor(e,s,l=128){super(x.Decimal),this.scale=e,this.precision=s,this.bitWidth=l}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}};jd=Symbol.toStringTag;Cr[jd]=(o=>(o.scale=null,o.precision=null,o.ArrayType=Uint32Array,o[Symbol.toStringTag]="Decimal"))(Cr.prototype);var Br=class extends P{constructor(e){super(x.Date),this.unit=e}toString(){return`Date${(this.unit+1)*32}<${Kt[this.unit]}>`}get ArrayType(){return this.unit===Kt.DAY?Int32Array:BigInt64Array}};Ld=Symbol.toStringTag;Br[Ld]=(o=>(o.unit=null,o[Symbol.toStringTag]="Date"))(Br.prototype);var Q0=class extends Br{constructor(){super(Kt.DAY)}},$0=class extends Br{constructor(){super(Kt.MILLISECOND)}},je=class extends P{constructor(e,s){super(x.Time),this.unit=e,this.bitWidth=s}toString(){return`Time${this.bitWidth}<${H[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};Jd=Symbol.toStringTag;je[Jd]=(o=>(o.unit=null,o.bitWidth=null,o[Symbol.toStringTag]="Time"))(je.prototype);var q0=class extends je{constructor(){super(H.SECOND,32)}},K0=class extends je{constructor(){super(H.MILLISECOND,32)}},ts=class extends je{constructor(){super(H.MICROSECOND,64)}},es=class extends je{constructor(){super(H.NANOSECOND,64)}},Le=class extends P{constructor(e,s){super(x.Timestamp),this.unit=e,this.timezone=s}toString(){return`Timestamp<${H[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}};Yd=Symbol.toStringTag;Le[Yd]=(o=>(o.unit=null,o.timezone=null,o.ArrayType=BigInt64Array,o[Symbol.toStringTag]="Timestamp"))(Le.prototype);var rs=class extends Le{constructor(e){super(H.SECOND,e)}},ns=class extends Le{constructor(e){super(H.MILLISECOND,e)}},is=class extends Le{constructor(e){super(H.MICROSECOND,e)}},ss=class extends Le{constructor(e){super(H.NANOSECOND,e)}},Ir=class extends P{constructor(e){super(x.Interval),this.unit=e}toString(){return`Interval<${ce[this.unit]}>`}};Pd=Symbol.toStringTag;Ir[Pd]=(o=>(o.unit=null,o.ArrayType=Int32Array,o[Symbol.toStringTag]="Interval"))(Ir.prototype);var os=class extends Ir{constructor(){super(ce.DAY_TIME)}},us=class extends Ir{constructor(){super(ce.YEAR_MONTH)}},Nn=class extends P{constructor(e){super(x.Duration),this.unit=e}toString(){return`Duration<${H[this.unit]}>`}};Hd=Symbol.toStringTag;Nn[Hd]=(o=>(o.unit=null,o.ArrayType=BigInt64Array,o[Symbol.toStringTag]="Duration"))(Nn.prototype);var ir=class extends P{constructor(e){super(x.List),this.children=[e]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}};Qd=Symbol.toStringTag;ir[Qd]=(o=>(o.children=null,o[Symbol.toStringTag]="List"))(ir.prototype);var Wt=class extends P{constructor(e){super(x.Struct),this.children=e}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}};$d=Symbol.toStringTag;Wt[$d]=(o=>(o.children=null,o[Symbol.toStringTag]="Struct"))(Wt.prototype);var Gr=class extends P{constructor(e,s,l){super(x.Union),this.mode=e,this.children=l,this.typeIds=s=Int32Array.from(s),this.typeIdToChildIndex=s.reduce((A,p,w)=>(A[p]=w)&&A||A,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(" | ")}>`}};qd=Symbol.toStringTag;Gr[qd]=(o=>(o.mode=null,o.typeIds=null,o.children=null,o.typeIdToChildIndex=null,o.ArrayType=Int8Array,o[Symbol.toStringTag]="Union"))(Gr.prototype);var kn=class extends P{constructor(e){super(x.FixedSizeBinary),this.byteWidth=e}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};Kd=Symbol.toStringTag;kn[Kd]=(o=>(o.byteWidth=null,o.ArrayType=Uint8Array,o[Symbol.toStringTag]="FixedSizeBinary"))(kn.prototype);var We=class extends P{constructor(e,s){super(x.FixedSizeList),this.listSize=e,this.children=[s]}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}>`}};tA=Symbol.toStringTag;We[tA]=(o=>(o.children=null,o.listSize=null,o[Symbol.toStringTag]="FixedSizeList"))(We.prototype);var sr=class extends P{constructor(e,s=!1){var l,A,p;if(super(x.Map),this.children=[e],this.keysSorted=s,e&&(e.name="entries",!((l=e?.type)===null||l===void 0)&&l.children)){let w=(A=e?.type)===null||A===void 0?void 0:A.children[0];w&&(w.name="key");let F=(p=e?.type)===null||p===void 0?void 0:p.children[1];F&&(F.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}};eA=Symbol.toStringTag;sr[eA]=(o=>(o.children=null,o.keysSorted=null,o[Symbol.toStringTag]="Map_"))(sr.prototype);var FS=(o=>()=>++o)(-1),or=class extends P{constructor(e,s,l,A){super(x.Dictionary),this.indices=s,this.dictionary=e,this.isOrdered=A||!1,this.id=l==null?FS():Rt(l)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}};rA=Symbol.toStringTag;or[rA]=(o=>(o.id=null,o.indices=null,o.isOrdered=null,o.dictionary=null,o[Symbol.toStringTag]="Dictionary"))(or.prototype);function Sr(o){let e=o;switch(o.typeId){case x.Decimal:return o.bitWidth/32;case x.Interval:return 1+e.unit;case x.FixedSizeList:return e.listSize;case x.FixedSizeBinary:return e.byteWidth;default:return 1}}var K=class{visitMany(e,...s){return e.map((l,A)=>this.visit(l,...s.map(p=>p[A])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,s=!0){return BS(this,e,s)}getVisitFnByTypeId(e,s=!0){return cs(this,e,s)}visitNull(e,...s){return null}visitBool(e,...s){return null}visitInt(e,...s){return null}visitFloat(e,...s){return null}visitUtf8(e,...s){return null}visitLargeUtf8(e,...s){return null}visitBinary(e,...s){return null}visitLargeBinary(e,...s){return null}visitFixedSizeBinary(e,...s){return null}visitDate(e,...s){return null}visitTimestamp(e,...s){return null}visitTime(e,...s){return null}visitDecimal(e,...s){return null}visitList(e,...s){return null}visitStruct(e,...s){return null}visitUnion(e,...s){return null}visitDictionary(e,...s){return null}visitInterval(e,...s){return null}visitDuration(e,...s){return null}visitFixedSizeList(e,...s){return null}visitMap(e,...s){return null}};function BS(o,e,s=!0){return typeof e=="number"?cs(o,e,s):typeof e=="string"&&e in x?cs(o,x[e],s):e&&e instanceof P?cs(o,nA(e),s):e?.type&&e.type instanceof P?cs(o,nA(e.type),s):cs(o,x.NONE,s)}function cs(o,e,s=!0){let l=null;switch(e){case x.Null:l=o.visitNull;break;case x.Bool:l=o.visitBool;break;case x.Int:l=o.visitInt;break;case x.Int8:l=o.visitInt8||o.visitInt;break;case x.Int16:l=o.visitInt16||o.visitInt;break;case x.Int32:l=o.visitInt32||o.visitInt;break;case x.Int64:l=o.visitInt64||o.visitInt;break;case x.Uint8:l=o.visitUint8||o.visitInt;break;case x.Uint16:l=o.visitUint16||o.visitInt;break;case x.Uint32:l=o.visitUint32||o.visitInt;break;case x.Uint64:l=o.visitUint64||o.visitInt;break;case x.Float:l=o.visitFloat;break;case x.Float16:l=o.visitFloat16||o.visitFloat;break;case x.Float32:l=o.visitFloat32||o.visitFloat;break;case x.Float64:l=o.visitFloat64||o.visitFloat;break;case x.Utf8:l=o.visitUtf8;break;case x.LargeUtf8:l=o.visitLargeUtf8;break;case x.Binary:l=o.visitBinary;break;case x.LargeBinary:l=o.visitLargeBinary;break;case x.FixedSizeBinary:l=o.visitFixedSizeBinary;break;case x.Date:l=o.visitDate;break;case x.DateDay:l=o.visitDateDay||o.visitDate;break;case x.DateMillisecond:l=o.visitDateMillisecond||o.visitDate;break;case x.Timestamp:l=o.visitTimestamp;break;case x.TimestampSecond:l=o.visitTimestampSecond||o.visitTimestamp;break;case x.TimestampMillisecond:l=o.visitTimestampMillisecond||o.visitTimestamp;break;case x.TimestampMicrosecond:l=o.visitTimestampMicrosecond||o.visitTimestamp;break;case x.TimestampNanosecond:l=o.visitTimestampNanosecond||o.visitTimestamp;break;case x.Time:l=o.visitTime;break;case x.TimeSecond:l=o.visitTimeSecond||o.visitTime;break;case x.TimeMillisecond:l=o.visitTimeMillisecond||o.visitTime;break;case x.TimeMicrosecond:l=o.visitTimeMicrosecond||o.visitTime;break;case x.TimeNanosecond:l=o.visitTimeNanosecond||o.visitTime;break;case x.Decimal:l=o.visitDecimal;break;case x.List:l=o.visitList;break;case x.Struct:l=o.visitStruct;break;case x.Union:l=o.visitUnion;break;case x.DenseUnion:l=o.visitDenseUnion||o.visitUnion;break;case x.SparseUnion:l=o.visitSparseUnion||o.visitUnion;break;case x.Dictionary:l=o.visitDictionary;break;case x.Interval:l=o.visitInterval;break;case x.IntervalDayTime:l=o.visitIntervalDayTime||o.visitInterval;break;case x.IntervalYearMonth:l=o.visitIntervalYearMonth||o.visitInterval;break;case x.Duration:l=o.visitDuration;break;case x.DurationSecond:l=o.visitDurationSecond||o.visitDuration;break;case x.DurationMillisecond:l=o.visitDurationMillisecond||o.visitDuration;break;case x.DurationMicrosecond:l=o.visitDurationMicrosecond||o.visitDuration;break;case x.DurationNanosecond:l=o.visitDurationNanosecond||o.visitDuration;break;case x.FixedSizeList:l=o.visitFixedSizeList;break;case x.Map:l=o.visitMap;break}if(typeof l=="function")return l;if(!s)return()=>null;throw new Error(`Unrecognized type '${x[e]}'`)}function nA(o){switch(o.typeId){case x.Null:return x.Null;case x.Int:{let{bitWidth:e,isSigned:s}=o;switch(e){case 8:return s?x.Int8:x.Uint8;case 16:return s?x.Int16:x.Uint16;case 32:return s?x.Int32:x.Uint32;case 64:return s?x.Int64:x.Uint64}return x.Int}case x.Float:switch(o.precision){case zt.HALF:return x.Float16;case zt.SINGLE:return x.Float32;case zt.DOUBLE:return x.Float64}return x.Float;case x.Binary:return x.Binary;case x.LargeBinary:return x.LargeBinary;case x.Utf8:return x.Utf8;case x.LargeUtf8:return x.LargeUtf8;case x.Bool:return x.Bool;case x.Decimal:return x.Decimal;case x.Time:switch(o.unit){case H.SECOND:return x.TimeSecond;case H.MILLISECOND:return x.TimeMillisecond;case H.MICROSECOND:return x.TimeMicrosecond;case H.NANOSECOND:return x.TimeNanosecond}return x.Time;case x.Timestamp:switch(o.unit){case H.SECOND:return x.TimestampSecond;case H.MILLISECOND:return x.TimestampMillisecond;case H.MICROSECOND:return x.TimestampMicrosecond;case H.NANOSECOND:return x.TimestampNanosecond}return x.Timestamp;case x.Date:switch(o.unit){case Kt.DAY:return x.DateDay;case Kt.MILLISECOND:return x.DateMillisecond}return x.Date;case x.Interval:switch(o.unit){case ce.DAY_TIME:return x.IntervalDayTime;case ce.YEAR_MONTH:return x.IntervalYearMonth}return x.Interval;case x.Duration:switch(o.unit){case H.SECOND:return x.DurationSecond;case H.MILLISECOND:return x.DurationMillisecond;case H.MICROSECOND:return x.DurationMicrosecond;case H.NANOSECOND:return x.DurationNanosecond}return x.Duration;case x.Map:return x.Map;case x.List:return x.List;case x.Struct:return x.Struct;case x.Union:switch(o.mode){case Gt.Dense:return x.DenseUnion;case Gt.Sparse:return x.SparseUnion}return x.Union;case x.FixedSizeBinary:return x.FixedSizeBinary;case x.FixedSizeList:return x.FixedSizeList;case x.Dictionary:return x.Dictionary}throw new Error(`Unrecognized type '${x[o.typeId]}'`)}K.prototype.visitInt8=null;K.prototype.visitInt16=null;K.prototype.visitInt32=null;K.prototype.visitInt64=null;K.prototype.visitUint8=null;K.prototype.visitUint16=null;K.prototype.visitUint32=null;K.prototype.visitUint64=null;K.prototype.visitFloat16=null;K.prototype.visitFloat32=null;K.prototype.visitFloat64=null;K.prototype.visitDateDay=null;K.prototype.visitDateMillisecond=null;K.prototype.visitTimestampSecond=null;K.prototype.visitTimestampMillisecond=null;K.prototype.visitTimestampMicrosecond=null;K.prototype.visitTimestampNanosecond=null;K.prototype.visitTimeSecond=null;K.prototype.visitTimeMillisecond=null;K.prototype.visitTimeMicrosecond=null;K.prototype.visitTimeNanosecond=null;K.prototype.visitDenseUnion=null;K.prototype.visitSparseUnion=null;K.prototype.visitIntervalDayTime=null;K.prototype.visitIntervalYearMonth=null;K.prototype.visitDuration=null;K.prototype.visitDurationSecond=null;K.prototype.visitDurationMillisecond=null;K.prototype.visitDurationMicrosecond=null;K.prototype.visitDurationNanosecond=null;var Ua={};Ai(Ua,{float64ToUint16:()=>ho,uint16ToFloat64:()=>Hu});var iA=new Float64Array(1),ls=new Uint32Array(iA.buffer);function Hu(o){let e=(o&31744)>>10,s=(o&1023)/1024,l=Math.pow(-1,(o&32768)>>15);switch(e){case 31:return l*(s?Number.NaN:1/0);case 0:return l*(s?6103515625e-14*s:0)}return l*Math.pow(2,e-15)*(1+s)}function ho(o){if(o!==o)return 32256;iA[0]=o;let e=(ls[1]&2147483648)>>16&65535,s=ls[1]&2146435072,l=0;return s>=1089470464?ls[0]>0?s=31744:(s=(s&2080374784)>>16,l=(ls[1]&1048575)>>10):s<=1056964608?(l=1048576+(ls[1]&1048575),l=1048576+(l<<(s>>20)-998)>>21,s=0):(s=s-1056964608>>10,l=(ls[1]&1048575)+512>>10),e|s|l&65535}var it=class extends K{};function lt(o){return(e,s,l)=>{if(e.setValid(s,l!=null))return o(e,s,l)}}var IS=(o,e,s)=>{o[e]=Math.floor(s/864e5)},sA=(o,e,s,l)=>{if(s+1<e.length){let A=Rt(e[s]),p=Rt(e[s+1]);o.set(l.subarray(0,p-A),A)}},SS=({offset:o,values:e},s,l)=>{let A=o+s;l?e[A>>3]|=1<<A%8:e[A>>3]&=~(1<<A%8)},Pn=({values:o},e,s)=>{o[e]=s},Ra=({values:o},e,s)=>{o[e]=s},oA=({values:o},e,s)=>{o[e]=ho(s)},bS=(o,e,s)=>{switch(o.type.precision){case zt.HALF:return oA(o,e,s);case zt.SINGLE:case zt.DOUBLE:return Ra(o,e,s)}},Qu=({values:o},e,s)=>{IS(o,e,s.valueOf())},$u=({values:o},e,s)=>{o[e]=BigInt(s)},Va=({stride:o,values:e},s,l)=>{e.set(l.subarray(0,o),o*s)},uA=({values:o,valueOffsets:e},s,l)=>sA(o,e,s,l),cA=({values:o,valueOffsets:e},s,l)=>sA(o,e,s,_n(l)),xa=(o,e,s)=>{o.type.unit===Kt.DAY?Qu(o,e,s):$u(o,e,s)},qu=({values:o},e,s)=>{o[e]=BigInt(s/1e3)},Ku=({values:o},e,s)=>{o[e]=BigInt(s)},tc=({values:o},e,s)=>{o[e]=BigInt(s*1e3)},ec=({values:o},e,s)=>{o[e]=BigInt(s*1e6)},Ma=(o,e,s)=>{switch(o.type.unit){case H.SECOND:return qu(o,e,s);case H.MILLISECOND:return Ku(o,e,s);case H.MICROSECOND:return tc(o,e,s);case H.NANOSECOND:return ec(o,e,s)}},rc=({values:o},e,s)=>{o[e]=s},nc=({values:o},e,s)=>{o[e]=s},ic=({values:o},e,s)=>{o[e]=s},sc=({values:o},e,s)=>{o[e]=s},Na=(o,e,s)=>{switch(o.type.unit){case H.SECOND:return rc(o,e,s);case H.MILLISECOND:return nc(o,e,s);case H.MICROSECOND:return ic(o,e,s);case H.NANOSECOND:return sc(o,e,s)}},ka=({values:o,stride:e},s,l)=>{o.set(l.subarray(0,e),e*s)},TS=(o,e,s)=>{let l=o.children[0],A=o.valueOffsets,p=Re.getVisitFn(l);if(Array.isArray(s))for(let w=-1,F=A[e],S=A[e+1];F<S;)p(l,F++,s[++w]);else for(let w=-1,F=A[e],S=A[e+1];F<S;)p(l,F++,s.get(++w))},US=(o,e,s)=>{let l=o.children[0],{valueOffsets:A}=o,p=Re.getVisitFn(l),{[e]:w,[e+1]:F}=A,S=s instanceof Map?s.entries():Object.entries(s);for(let R of S)if(p(l,w,R),++w>=F)break},RS=(o,e)=>(s,l,A,p)=>l&&s(l,o,e[p]),VS=(o,e)=>(s,l,A,p)=>l&&s(l,o,e.get(p)),xS=(o,e)=>(s,l,A,p)=>l&&s(l,o,e.get(A.name)),MS=(o,e)=>(s,l,A,p)=>l&&s(l,o,e[A.name]),NS=(o,e,s)=>{let l=o.type.children.map(p=>Re.getVisitFn(p.type)),A=s instanceof Map?xS(e,s):s instanceof pt?VS(e,s):Array.isArray(s)?RS(e,s):MS(e,s);o.type.children.forEach((p,w)=>A(l[w],o.children[w],p,w))},kS=(o,e,s)=>{o.type.mode===Gt.Dense?lA(o,e,s):aA(o,e,s)},lA=(o,e,s)=>{let l=o.type.typeIdToChildIndex[o.typeIds[e]],A=o.children[l];Re.visit(A,o.valueOffsets[e],s)},aA=(o,e,s)=>{let l=o.type.typeIdToChildIndex[o.typeIds[e]],A=o.children[l];Re.visit(A,e,s)},OS=(o,e,s)=>{var l;(l=o.dictionary)===null||l===void 0||l.set(o.values[e],s)},Oa=(o,e,s)=>{o.type.unit===ce.DAY_TIME?oc(o,e,s):uc(o,e,s)},oc=({values:o},e,s)=>{o.set(s.subarray(0,2),2*e)},uc=({values:o},e,s)=>{o[e]=s[0]*12+s[1]%12},cc=({values:o},e,s)=>{o[e]=s},lc=({values:o},e,s)=>{o[e]=s},ac=({values:o},e,s)=>{o[e]=s},fc=({values:o},e,s)=>{o[e]=s},Za=(o,e,s)=>{switch(o.type.unit){case H.SECOND:return cc(o,e,s);case H.MILLISECOND:return lc(o,e,s);case H.MICROSECOND:return ac(o,e,s);case H.NANOSECOND:return fc(o,e,s)}},ZS=(o,e,s)=>{let{stride:l}=o,A=o.children[0],p=Re.getVisitFn(A);if(Array.isArray(s))for(let w=-1,F=e*l;++w<l;)p(A,F+w,s[w]);else for(let w=-1,F=e*l;++w<l;)p(A,F+w,s.get(w))};it.prototype.visitBool=lt(SS);it.prototype.visitInt=lt(Pn);it.prototype.visitInt8=lt(Pn);it.prototype.visitInt16=lt(Pn);it.prototype.visitInt32=lt(Pn);it.prototype.visitInt64=lt(Pn);it.prototype.visitUint8=lt(Pn);it.prototype.visitUint16=lt(Pn);it.prototype.visitUint32=lt(Pn);it.prototype.visitUint64=lt(Pn);it.prototype.visitFloat=lt(bS);it.prototype.visitFloat16=lt(oA);it.prototype.visitFloat32=lt(Ra);it.prototype.visitFloat64=lt(Ra);it.prototype.visitUtf8=lt(cA);it.prototype.visitLargeUtf8=lt(cA);it.prototype.visitBinary=lt(uA);it.prototype.visitLargeBinary=lt(uA);it.prototype.visitFixedSizeBinary=lt(Va);it.prototype.visitDate=lt(xa);it.prototype.visitDateDay=lt(Qu);it.prototype.visitDateMillisecond=lt($u);it.prototype.visitTimestamp=lt(Ma);it.prototype.visitTimestampSecond=lt(qu);it.prototype.visitTimestampMillisecond=lt(Ku);it.prototype.visitTimestampMicrosecond=lt(tc);it.prototype.visitTimestampNanosecond=lt(ec);it.prototype.visitTime=lt(Na);it.prototype.visitTimeSecond=lt(rc);it.prototype.visitTimeMillisecond=lt(nc);it.prototype.visitTimeMicrosecond=lt(ic);it.prototype.visitTimeNanosecond=lt(sc);it.prototype.visitDecimal=lt(ka);it.prototype.visitList=lt(TS);it.prototype.visitStruct=lt(NS);it.prototype.visitUnion=lt(kS);it.prototype.visitDenseUnion=lt(lA);it.prototype.visitSparseUnion=lt(aA);it.prototype.visitDictionary=lt(OS);it.prototype.visitInterval=lt(Oa);it.prototype.visitIntervalDayTime=lt(oc);it.prototype.visitIntervalYearMonth=lt(uc);it.prototype.visitDuration=lt(Za);it.prototype.visitDurationSecond=lt(cc);it.prototype.visitDurationMillisecond=lt(lc);it.prototype.visitDurationMicrosecond=lt(ac);it.prototype.visitDurationNanosecond=lt(fc);it.prototype.visitFixedSizeList=lt(ZS);it.prototype.visitMap=lt(US);var Re=new it;var sn=Symbol.for("parent"),as=Symbol.for("rowIndex"),mi=class{constructor(e,s){return this[sn]=e,this[as]=s,new Proxy(this,new Wa)}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[as],s=this[sn],l=s.type.children,A={};for(let p=-1,w=l.length;++p<w;)A[l[p].name]=de.visit(s.children[p],e);return A}toString(){return`{${[...this].map(([e,s])=>`${rn(e)}: ${rn(s)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new Da(this[sn],this[as])}},Da=class{constructor(e,s){this.childIndex=0,this.children=e.children,this.rowIndex=s,this.childFields=e.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){let e=this.childIndex;return e<this.numChildren?(this.childIndex=e+1,{done:!1,value:[this.childFields[e].name,de.visit(this.children[e],this.rowIndex)]}):{done:!0,value:null}}};Object.defineProperties(mi.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[sn]:{writable:!0,enumerable:!1,configurable:!1,value:null},[as]:{writable:!0,enumerable:!1,configurable:!1,value:-1}});var Wa=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[sn].type.children.map(s=>s.name)}has(e,s){return e[sn].type.children.findIndex(l=>l.name===s)!==-1}getOwnPropertyDescriptor(e,s){if(e[sn].type.children.findIndex(l=>l.name===s)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,s){if(Reflect.has(e,s))return e[s];let l=e[sn].type.children.findIndex(A=>A.name===s);if(l!==-1){let A=de.visit(e[sn].children[l],e[as]);return Reflect.set(e,s,A),A}}set(e,s,l){let A=e[sn].type.children.findIndex(p=>p.name===s);return A!==-1?(Re.visit(e[sn].children[A],e[as],l),Reflect.set(e,s,l)):Reflect.has(e,s)||typeof s=="symbol"?Reflect.set(e,s,l):!1}};var tt=class extends K{};function ut(o){return(e,s)=>e.getValid(s)?o(e,s):null}var DS=(o,e)=>864e5*o[e],WS=(o,e)=>null,fA=(o,e,s)=>{if(s+1>=e.length)return null;let l=Rt(e[s]),A=Rt(e[s+1]);return o.subarray(l,A)},zS=({offset:o,values:e},s)=>{let l=o+s;return(e[l>>3]&1<<l%8)!==0},hA=({values:o},e)=>DS(o,e),dA=({values:o},e)=>Rt(o[e]),yi=({stride:o,values:e},s)=>e[o*s],ES=({stride:o,values:e},s)=>Hu(e[o*s]),AA=({values:o},e)=>o[e],XS=({stride:o,values:e},s)=>e.subarray(o*s,o*(s+1)),pA=({values:o,valueOffsets:e},s)=>fA(o,e,s),mA=({values:o,valueOffsets:e},s)=>{let l=fA(o,e,s);return l!==null?io(l):null},CS=({values:o},e)=>o[e],GS=({type:o,values:e},s)=>o.precision!==zt.HALF?e[s]:Hu(e[s]),jS=(o,e)=>o.type.unit===Kt.DAY?hA(o,e):dA(o,e),yA=({values:o},e)=>1e3*Rt(o[e]),gA=({values:o},e)=>Rt(o[e]),wA=({values:o},e)=>Ia(o[e],BigInt(1e3)),_A=({values:o},e)=>Ia(o[e],BigInt(1e6)),LS=(o,e)=>{switch(o.type.unit){case H.SECOND:return yA(o,e);case H.MILLISECOND:return gA(o,e);case H.MICROSECOND:return wA(o,e);case H.NANOSECOND:return _A(o,e)}},vA=({values:o},e)=>o[e],FA=({values:o},e)=>o[e],BA=({values:o},e)=>o[e],IA=({values:o},e)=>o[e],JS=(o,e)=>{switch(o.type.unit){case H.SECOND:return vA(o,e);case H.MILLISECOND:return FA(o,e);case H.MICROSECOND:return BA(o,e);case H.NANOSECOND:return IA(o,e)}},YS=({values:o,stride:e},s)=>Li.decimal(o.subarray(e*s,e*(s+1))),PS=(o,e)=>{let{valueOffsets:s,stride:l,children:A}=o,{[e*l]:p,[e*l+1]:w}=s,S=A[0].slice(p,w-p);return new pt([S])},HS=(o,e)=>{let{valueOffsets:s,children:l}=o,{[e]:A,[e+1]:p}=s,w=l[0];return new On(w.slice(A,p-A))},QS=(o,e)=>new mi(o,e),$S=(o,e)=>o.type.mode===Gt.Dense?SA(o,e):bA(o,e),SA=(o,e)=>{let s=o.type.typeIdToChildIndex[o.typeIds[e]],l=o.children[s];return de.visit(l,o.valueOffsets[e])},bA=(o,e)=>{let s=o.type.typeIdToChildIndex[o.typeIds[e]],l=o.children[s];return de.visit(l,e)},qS=(o,e)=>{var s;return(s=o.dictionary)===null||s===void 0?void 0:s.get(o.values[e])},KS=(o,e)=>o.type.unit===ce.DAY_TIME?TA(o,e):UA(o,e),TA=({values:o},e)=>o.subarray(2*e,2*(e+1)),UA=({values:o},e)=>{let s=o[e],l=new Int32Array(2);return l[0]=Math.trunc(s/12),l[1]=Math.trunc(s%12),l},RA=({values:o},e)=>o[e],VA=({values:o},e)=>o[e],xA=({values:o},e)=>o[e],MA=({values:o},e)=>o[e],tb=(o,e)=>{switch(o.type.unit){case H.SECOND:return RA(o,e);case H.MILLISECOND:return VA(o,e);case H.MICROSECOND:return xA(o,e);case H.NANOSECOND:return MA(o,e)}},eb=(o,e)=>{let{stride:s,children:l}=o,p=l[0].slice(e*s,s);return new pt([p])};tt.prototype.visitNull=ut(WS);tt.prototype.visitBool=ut(zS);tt.prototype.visitInt=ut(CS);tt.prototype.visitInt8=ut(yi);tt.prototype.visitInt16=ut(yi);tt.prototype.visitInt32=ut(yi);tt.prototype.visitInt64=ut(AA);tt.prototype.visitUint8=ut(yi);tt.prototype.visitUint16=ut(yi);tt.prototype.visitUint32=ut(yi);tt.prototype.visitUint64=ut(AA);tt.prototype.visitFloat=ut(GS);tt.prototype.visitFloat16=ut(ES);tt.prototype.visitFloat32=ut(yi);tt.prototype.visitFloat64=ut(yi);tt.prototype.visitUtf8=ut(mA);tt.prototype.visitLargeUtf8=ut(mA);tt.prototype.visitBinary=ut(pA);tt.prototype.visitLargeBinary=ut(pA);tt.prototype.visitFixedSizeBinary=ut(XS);tt.prototype.visitDate=ut(jS);tt.prototype.visitDateDay=ut(hA);tt.prototype.visitDateMillisecond=ut(dA);tt.prototype.visitTimestamp=ut(LS);tt.prototype.visitTimestampSecond=ut(yA);tt.prototype.visitTimestampMillisecond=ut(gA);tt.prototype.visitTimestampMicrosecond=ut(wA);tt.prototype.visitTimestampNanosecond=ut(_A);tt.prototype.visitTime=ut(JS);tt.prototype.visitTimeSecond=ut(vA);tt.prototype.visitTimeMillisecond=ut(FA);tt.prototype.visitTimeMicrosecond=ut(BA);tt.prototype.visitTimeNanosecond=ut(IA);tt.prototype.visitDecimal=ut(YS);tt.prototype.visitList=ut(PS);tt.prototype.visitStruct=ut(QS);tt.prototype.visitUnion=ut($S);tt.prototype.visitDenseUnion=ut(SA);tt.prototype.visitSparseUnion=ut(bA);tt.prototype.visitDictionary=ut(qS);tt.prototype.visitInterval=ut(KS);tt.prototype.visitIntervalDayTime=ut(TA);tt.prototype.visitIntervalYearMonth=ut(UA);tt.prototype.visitDuration=ut(tb);tt.prototype.visitDurationSecond=ut(RA);tt.prototype.visitDurationMillisecond=ut(VA);tt.prototype.visitDurationMicrosecond=ut(xA);tt.prototype.visitDurationNanosecond=ut(MA);tt.prototype.visitFixedSizeList=ut(eb);tt.prototype.visitMap=ut(HS);var de=new tt;var gi=Symbol.for("keys"),hs=Symbol.for("vals"),fs=Symbol.for("kKeysAsStrings"),za=Symbol.for("_kKeysAsStrings"),On=class{constructor(e){return this[gi]=new pt([e.children[0]]).memoize(),this[hs]=e.children[1],new Proxy(this,new Xa)}get[fs](){return this[za]||(this[za]=Array.from(this[gi].toArray(),String))}[Symbol.iterator](){return new Ea(this[gi],this[hs])}get size(){return this[gi].length}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[gi],s=this[hs],l={};for(let A=-1,p=e.length;++A<p;)l[e.get(A)]=de.visit(s,A);return l}toString(){return`{${[...this].map(([e,s])=>`${rn(e)}: ${rn(s)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}},Ea=class{constructor(e,s){this.keys=e,this.vals=s,this.keyIndex=0,this.numKeys=e.length}[Symbol.iterator](){return this}next(){let e=this.keyIndex;return e===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(e),de.visit(this.vals,e)]})}},Xa=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[fs]}has(e,s){return e[fs].includes(s)}getOwnPropertyDescriptor(e,s){if(e[fs].indexOf(s)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,s){if(Reflect.has(e,s))return e[s];let l=e[fs].indexOf(s);if(l!==-1){let A=de.visit(Reflect.get(e,hs),l);return Reflect.set(e,s,A),A}}set(e,s,l){let A=e[fs].indexOf(s);return A!==-1?(Re.visit(Reflect.get(e,hs),A,l),Reflect.set(e,s,l)):Reflect.has(e,s)?Reflect.set(e,s,l):!1}};Object.defineProperties(On.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[gi]:{writable:!0,enumerable:!1,configurable:!1,value:null},[hs]:{writable:!0,enumerable:!1,configurable:!1,value:null},[za]:{writable:!0,enumerable:!1,configurable:!1,value:null}});var NA;function Ao(o,e,s,l){let{length:A=0}=o,p=typeof e!="number"?0:e,w=typeof s!="number"?A:s;return p<0&&(p=(p%A+A)%A),w<0&&(w=(w%A+A)%A),w<p&&(NA=p,p=w,w=NA),w>A&&(w=A),l?l(o,p,w):[p,w]}var r0=(o,e)=>o<0?e+o:o,kA=o=>o!==o;function wi(o){if(typeof o!=="object"||o===null)return kA(o)?kA:s=>s===o;if(o instanceof Date){let s=o.valueOf();return l=>l instanceof Date?l.valueOf()===s:!1}return ArrayBuffer.isView(o)?s=>s?wa(o,s):!1:o instanceof Map?nb(o):Array.isArray(o)?rb(o):o instanceof pt?ib(o):sb(o,!0)}function rb(o){let e=[];for(let s=-1,l=o.length;++s<l;)e[s]=wi(o[s]);return hc(e)}function nb(o){let e=-1,s=[];for(let l of o.values())s[++e]=wi(l);return hc(s)}function ib(o){let e=[];for(let s=-1,l=o.length;++s<l;)e[s]=wi(o.get(s));return hc(e)}function sb(o,e=!1){let s=Object.keys(o);if(!e&&s.length===0)return()=>!1;let l=[];for(let A=-1,p=s.length;++A<p;)l[A]=wi(o[s[A]]);return hc(l,s)}function hc(o,e){return s=>{if(!s||typeof s!="object")return!1;switch(s.constructor){case Array:return ob(o,s);case Map:return OA(o,s,s.keys());case On:case mi:case Object:case void 0:return OA(o,s,e||Object.keys(s))}return s instanceof pt?ub(o,s):!1}}function ob(o,e){let s=o.length;if(e.length!==s)return!1;for(let l=-1;++l<s;)if(!o[l](e[l]))return!1;return!0}function ub(o,e){let s=o.length;if(e.length!==s)return!1;for(let l=-1;++l<s;)if(!o[l](e.get(l)))return!1;return!0}function OA(o,e,s){let l=s[Symbol.iterator](),A=e instanceof Map?e.keys():Object.keys(e)[Symbol.iterator](),p=e instanceof Map?e.values():Object.values(e)[Symbol.iterator](),w=0,F=o.length,S=p.next(),R=l.next(),V=A.next();for(;w<F&&!R.done&&!V.done&&!S.done&&!(R.value!==V.value||!o[w](S.value));++w,R=l.next(),V=A.next(),S=p.next());return w===F&&R.done&&V.done&&S.done?!0:(l.return&&l.return(),A.return&&A.return(),p.return&&p.return(),!1)}var Ga={};Ai(Ga,{BitIterator:()=>n0,getBit:()=>ZA,getBool:()=>Ac,packBools:()=>s0,popcnt_array:()=>DA,popcnt_bit_range:()=>po,popcnt_uint32:()=>dc,setBool:()=>cb,truncateBitmap:()=>i0});function Ac(o,e,s,l){return(s&1<<l)!==0}function ZA(o,e,s,l){return(s&1<<l)>>l}function cb(o,e,s){return s?!!(o[e>>3]|=1<<e%8)||!0:!(o[e>>3]&=~(1<<e%8))&&!1}function i0(o,e,s){let l=s.byteLength+7&-8;if(o>0||s.byteLength<l){let A=new Uint8Array(l);return A.set(o%8===0?s.subarray(o>>3):s0(new n0(s,o,e,null,Ac)).subarray(0,l)),A}return s}function s0(o){let e=[],s=0,l=0,A=0;for(let w of o)w&&(A|=1<<l),++l===8&&(e[s++]=A,A=l=0);(s===0||l>0)&&(e[s++]=A);let p=new Uint8Array(e.length+7&-8);return p.set(e),p}var n0=class{constructor(e,s,l,A,p){this.bytes=e,this.length=l,this.context=A,this.get=p,this.bit=s%8,this.byteIndex=s>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index<this.length?(this.bit===8&&(this.bit=0,this.byte=this.bytes[this.byteIndex++]),{value:this.get(this.context,this.index++,this.byte,this.bit++)}):{done:!0,value:null}}[Symbol.iterator](){return this}};function po(o,e,s){if(s-e<=0)return 0;if(s-e<8){let p=0;for(let w of new n0(o,e,s-e,o,ZA))p+=w;return p}let l=s>>3<<3,A=e+(e%8===0?0:8-e%8);return po(o,e,A)+po(o,l,s)+DA(o,A>>3,l-A>>3)}function DA(o,e,s){let l=0,A=Math.trunc(e),p=new DataView(o.buffer,o.byteOffset,o.byteLength),w=s===void 0?o.byteLength:A+s;for(;w-A>=4;)l+=dc(p.getUint32(A)),A+=4;for(;w-A>=2;)l+=dc(p.getUint16(A)),A+=2;for(;w-A>=1;)l+=dc(p.getUint8(A)),A+=1;return l}function dc(o){let e=Math.trunc(o);return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24}var lb=-1,_t=class{get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get nullable(){if(this._nullCount!==0){let{type:e}=this;return P.isSparseUnion(e)?this.children.some(s=>s.nullable):P.isDenseUnion(e)?this.children.some(s=>s.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let e=0,{valueOffsets:s,values:l,nullBitmap:A,typeIds:p}=this;return s&&(e+=s.byteLength),l&&(e+=l.byteLength),A&&(e+=A.byteLength),p&&(e+=p.byteLength),this.children.reduce((w,F)=>w+F.byteLength,e)}get nullCount(){if(P.isUnion(this.type))return this.children.reduce((l,A)=>l+A.nullCount,0);let e=this._nullCount,s;return e<=lb&&(s=this.nullBitmap)&&(this._nullCount=e=s.length===0?0:this.length-po(s,this.offset,this.offset+this.length)),e}constructor(e,s,l,A,p,w=[],F){this.type=e,this.children=w,this.dictionary=F,this.offset=Math.floor(Math.max(s||0,0)),this.length=Math.floor(Math.max(l||0,0)),this._nullCount=Math.floor(Math.max(A||0,-1));let S;p instanceof _t?(this.stride=p.stride,this.values=p.values,this.typeIds=p.typeIds,this.nullBitmap=p.nullBitmap,this.valueOffsets=p.valueOffsets):(this.stride=Sr(e),p&&((S=p[0])&&(this.valueOffsets=S),(S=p[1])&&(this.values=S),(S=p[2])&&(this.nullBitmap=S),(S=p[3])&&(this.typeIds=S)))}getValid(e){let{type:s}=this;if(P.isUnion(s)){let l=s,A=this.children[l.typeIdToChildIndex[this.typeIds[e]]],p=l.mode===Gt.Dense?this.valueOffsets[e]:e;return A.getValid(p)}if(this.nullable&&this.nullCount>0){let l=this.offset+e;return(this.nullBitmap[l>>3]&1<<l%8)!==0}return!0}setValid(e,s){let l,{type:A}=this;if(P.isUnion(A)){let p=A,w=this.children[p.typeIdToChildIndex[this.typeIds[e]]],F=p.mode===Gt.Dense?this.valueOffsets[e]:e;l=w.getValid(F),w.setValid(F,s)}else{let{nullBitmap:p}=this,{offset:w,length:F}=this,S=w+e,R=1<<S%8,V=S>>3;(!p||p.byteLength<=V)&&(p=new Uint8Array((w+F+63&-64)>>3).fill(255),this.nullCount>0?(p.set(i0(w,F,this.nullBitmap),0),Object.assign(this,{nullBitmap:p})):Object.assign(this,{nullBitmap:p,_nullCount:0}));let X=p[V];l=(X&R)!==0,p[V]=s?X|R:X&~R}return l!==!!s&&(this._nullCount=this.nullCount+(s?-1:1)),s}clone(e=this.type,s=this.offset,l=this.length,A=this._nullCount,p=this,w=this.children){return new _t(e,s,l,A,p,w,this.dictionary)}slice(e,s){let{stride:l,typeId:A,children:p}=this,w=+(this._nullCount===0)-1,F=A===16?l:1,S=this._sliceBuffers(e,s,l,A);return this.clone(this.type,this.offset+e,s,w,S,p.length===0||this.valueOffsets?p:this._sliceChildren(p,F*e,F*s))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===x.Null)return this.clone(this.type,0,e,0);let{length:s,nullCount:l}=this,A=new Uint8Array((e+63&-64)>>3).fill(255,0,s>>3);A[s>>3]=(1<<s-(s&-8))-1,l>0&&A.set(i0(this.offset,s,this.nullBitmap),0);let p=this.buffers;return p[rr.VALIDITY]=A,this.clone(this.type,0,e,l+(e-s),p)}_sliceBuffers(e,s,l,A){let p,{buffers:w}=this;return(p=w[rr.TYPE])&&(w[rr.TYPE]=p.subarray(e,e+s)),(p=w[rr.OFFSET])&&(w[rr.OFFSET]=p.subarray(e,e+s+1))||(p=w[rr.DATA])&&(w[rr.DATA]=A===6?p:p.subarray(l*e,l*(e+s))),w}_sliceChildren(e,s,l){return e.map(A=>A.slice(s,l))}};_t.prototype.children=Object.freeze([]);var o0=class extends K{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){let{["type"]:s,["offset"]:l=0,["length"]:A=0}=e;return new _t(s,l,A,A)}visitBool(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.nullBitmap),p=wt(s.ArrayType,e.data),{["length"]:w=p.length>>3,["nullCount"]:F=e.nullBitmap?-1:0}=e;return new _t(s,l,w,F,[void 0,p,A])}visitInt(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.nullBitmap),p=wt(s.ArrayType,e.data),{["length"]:w=p.length,["nullCount"]:F=e.nullBitmap?-1:0}=e;return new _t(s,l,w,F,[void 0,p,A])}visitFloat(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.nullBitmap),p=wt(s.ArrayType,e.data),{["length"]:w=p.length,["nullCount"]:F=e.nullBitmap?-1:0}=e;return new _t(s,l,w,F,[void 0,p,A])}visitUtf8(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.data),p=st(e.nullBitmap),w=ji(e.valueOffsets),{["length"]:F=w.length-1,["nullCount"]:S=e.nullBitmap?-1:0}=e;return new _t(s,l,F,S,[w,A,p])}visitLargeUtf8(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.data),p=st(e.nullBitmap),w=Gu(e.valueOffsets),{["length"]:F=w.length-1,["nullCount"]:S=e.nullBitmap?-1:0}=e;return new _t(s,l,F,S,[w,A,p])}visitBinary(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.data),p=st(e.nullBitmap),w=ji(e.valueOffsets),{["length"]:F=w.length-1,["nullCount"]:S=e.nullBitmap?-1:0}=e;return new _t(s,l,F,S,[w,A,p])}visitLargeBinary(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.data),p=st(e.nullBitmap),w=Gu(e.valueOffsets),{["length"]:F=w.length-1,["nullCount"]:S=e.nullBitmap?-1:0}=e;return new _t(s,l,F,S,[w,A,p])}visitFixedSizeBinary(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.nullBitmap),p=wt(s.ArrayType,e.data),{["length"]:w=p.length/Sr(s),["nullCount"]:F=e.nullBitmap?-1:0}=e;return new _t(s,l,w,F,[void 0,p,A])}visitDate(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.nullBitmap),p=wt(s.ArrayType,e.data),{["length"]:w=p.length/Sr(s),["nullCount"]:F=e.nullBitmap?-1:0}=e;return new _t(s,l,w,F,[void 0,p,A])}visitTimestamp(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.nullBitmap),p=wt(s.ArrayType,e.data),{["length"]:w=p.length/Sr(s),["nullCount"]:F=e.nullBitmap?-1:0}=e;return new _t(s,l,w,F,[void 0,p,A])}visitTime(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.nullBitmap),p=wt(s.ArrayType,e.data),{["length"]:w=p.length/Sr(s),["nullCount"]:F=e.nullBitmap?-1:0}=e;return new _t(s,l,w,F,[void 0,p,A])}visitDecimal(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.nullBitmap),p=wt(s.ArrayType,e.data),{["length"]:w=p.length/Sr(s),["nullCount"]:F=e.nullBitmap?-1:0}=e;return new _t(s,l,w,F,[void 0,p,A])}visitList(e){let{["type"]:s,["offset"]:l=0,["child"]:A}=e,p=st(e.nullBitmap),w=ji(e.valueOffsets),{["length"]:F=w.length-1,["nullCount"]:S=e.nullBitmap?-1:0}=e;return new _t(s,l,F,S,[w,void 0,p],[A])}visitStruct(e){let{["type"]:s,["offset"]:l=0,["children"]:A=[]}=e,p=st(e.nullBitmap),{length:w=A.reduce((S,{length:R})=>Math.max(S,R),0),nullCount:F=e.nullBitmap?-1:0}=e;return new _t(s,l,w,F,[void 0,void 0,p],A)}visitUnion(e){let{["type"]:s,["offset"]:l=0,["children"]:A=[]}=e,p=wt(s.ArrayType,e.typeIds),{["length"]:w=p.length,["nullCount"]:F=-1}=e;if(P.isSparseUnion(s))return new _t(s,l,w,F,[void 0,void 0,void 0,p],A);let S=ji(e.valueOffsets);return new _t(s,l,w,F,[S,void 0,void 0,p],A)}visitDictionary(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.nullBitmap),p=wt(s.indices.ArrayType,e.data),{["dictionary"]:w=new pt([new o0().visit({type:s.dictionary})])}=e,{["length"]:F=p.length,["nullCount"]:S=e.nullBitmap?-1:0}=e;return new _t(s,l,F,S,[void 0,p,A],[],w)}visitInterval(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.nullBitmap),p=wt(s.ArrayType,e.data),{["length"]:w=p.length/Sr(s),["nullCount"]:F=e.nullBitmap?-1:0}=e;return new _t(s,l,w,F,[void 0,p,A])}visitDuration(e){let{["type"]:s,["offset"]:l=0}=e,A=st(e.nullBitmap),p=wt(s.ArrayType,e.data),{["length"]:w=p.length,["nullCount"]:F=e.nullBitmap?-1:0}=e;return new _t(s,l,w,F,[void 0,p,A])}visitFixedSizeList(e){let{["type"]:s,["offset"]:l=0,["child"]:A=new o0().visit({type:s.valueType})}=e,p=st(e.nullBitmap),{["length"]:w=A.length/Sr(s),["nullCount"]:F=e.nullBitmap?-1:0}=e;return new _t(s,l,w,F,[void 0,void 0,p],[A])}visitMap(e){let{["type"]:s,["offset"]:l=0,["child"]:A=new o0().visit({type:s.childType})}=e,p=st(e.nullBitmap),w=ji(e.valueOffsets),{["length"]:F=w.length-1,["nullCount"]:S=e.nullBitmap?-1:0}=e;return new _t(s,l,F,S,[w,void 0,p],[A])}},ab=new o0;function ft(o){return ab.visit(o)}var mo=class{constructor(e=0,s){this.numChunks=e,this.getChunkIterator=s,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndex<this.numChunks;){let e=this.chunkIterator.next();if(!e.done)return e;++this.chunkIndex<this.numChunks&&(this.chunkIterator=this.getChunkIterator(this.chunkIndex))}return{done:!0,value:null}}[Symbol.iterator](){return this}};function WA(o){return o.some(e=>e.nullable)}function pc(o){return o.reduce((e,s)=>e+s.nullCount,0)}function mc(o){return o.reduce((e,s,l)=>(e[l+1]=e[l]+s.length,e),new Uint32Array(o.length+1))}function yc(o,e,s,l){let A=[];for(let p=-1,w=o.length;++p<w;){let F=o[p],S=e[p],{length:R}=F;if(S>=l)break;if(s>=S+R)continue;if(S>=s&&S+R<=l){A.push(F);continue}let V=Math.max(0,s-S),X=Math.min(l-S,R);A.push(F.slice(V,X-V))}return A.length===0&&A.push(o[0].slice(0,0)),A}function ja(o,e,s,l){let A=0,p=0,w=e.length-1;do{if(A>=w-1)return s<e[w]?l(o,A,s-e[A]):null;p=A+Math.trunc((w-A)*.5),s<e[p]?w=p:A=p}while(A<w)}function yo(o,e){return o.getValid(e)}function ds(o){function e(s,l,A){return o(s[l],A)}return function(s){let l=this.data;return ja(l,this._offsets,s,e)}}function gc(o){let e;function s(l,A,p){return o(l[A],p,e)}return function(l,A){let p=this.data;e=A;let w=ja(p,this._offsets,l,s);return e=void 0,w}}function wc(o){let e;function s(l,A,p){let w=p,F=0,S=0;for(let R=A-1,V=l.length;++R<V;){let X=l[R];if(~(F=o(X,e,w)))return S+F;w=0,S+=X.length}return-1}return function(l,A){e=l;let p=this.data,w=typeof A!="number"?s(p,0,0):ja(p,this._offsets,A,s);return e=void 0,w}}var et=class extends K{};function fb(o,e){return e===null&&o.length>0?0:-1}function hb(o,e){let{nullBitmap:s}=o;if(!s||o.nullCount<=0)return-1;let l=0;for(let A of new n0(s,o.offset+(e||0),o.length,s,Ac)){if(!A)return l;++l}return-1}function At(o,e,s){if(e===void 0)return-1;if(e===null)switch(o.typeId){case x.Union:break;case x.Dictionary:break;default:return hb(o,s)}let l=de.getVisitFn(o),A=wi(e);for(let p=(s||0)-1,w=o.length;++p<w;)if(A(l(o,p)))return p;return-1}function zA(o,e,s){let l=de.getVisitFn(o),A=wi(e);for(let p=(s||0)-1,w=o.length;++p<w;)if(A(l(o,p)))return p;return-1}et.prototype.visitNull=fb;et.prototype.visitBool=At;et.prototype.visitInt=At;et.prototype.visitInt8=At;et.prototype.visitInt16=At;et.prototype.visitInt32=At;et.prototype.visitInt64=At;et.prototype.visitUint8=At;et.prototype.visitUint16=At;et.prototype.visitUint32=At;et.prototype.visitUint64=At;et.prototype.visitFloat=At;et.prototype.visitFloat16=At;et.prototype.visitFloat32=At;et.prototype.visitFloat64=At;et.prototype.visitUtf8=At;et.prototype.visitLargeUtf8=At;et.prototype.visitBinary=At;et.prototype.visitLargeBinary=At;et.prototype.visitFixedSizeBinary=At;et.prototype.visitDate=At;et.prototype.visitDateDay=At;et.prototype.visitDateMillisecond=At;et.prototype.visitTimestamp=At;et.prototype.visitTimestampSecond=At;et.prototype.visitTimestampMillisecond=At;et.prototype.visitTimestampMicrosecond=At;et.prototype.visitTimestampNanosecond=At;et.prototype.visitTime=At;et.prototype.visitTimeSecond=At;et.prototype.visitTimeMillisecond=At;et.prototype.visitTimeMicrosecond=At;et.prototype.visitTimeNanosecond=At;et.prototype.visitDecimal=At;et.prototype.visitList=At;et.prototype.visitStruct=At;et.prototype.visitUnion=At;et.prototype.visitDenseUnion=zA;et.prototype.visitSparseUnion=zA;et.prototype.visitDictionary=At;et.prototype.visitInterval=At;et.prototype.visitIntervalDayTime=At;et.prototype.visitIntervalYearMonth=At;et.prototype.visitDuration=At;et.prototype.visitDurationSecond=At;et.prototype.visitDurationMillisecond=At;et.prototype.visitDurationMicrosecond=At;et.prototype.visitDurationNanosecond=At;et.prototype.visitFixedSizeList=At;et.prototype.visitMap=At;var u0=new et;var rt=class extends K{};function ct(o){let{type:e}=o;if(o.nullCount===0&&o.stride===1&&(P.isInt(e)&&e.bitWidth!==64||P.isTime(e)&&e.bitWidth!==64||P.isFloat(e)&&e.precision!==zt.HALF))return new mo(o.data.length,l=>{let A=o.data[l];return A.values.subarray(0,A.length)[Symbol.iterator]()});let s=0;return new mo(o.data.length,l=>{let p=o.data[l].length,w=o.slice(s,s+p);return s+=p,new La(w)})}var La=class{constructor(e){this.vector=e,this.index=0}next(){return this.index<this.vector.length?{value:this.vector.get(this.index++)}:{done:!0,value:null}}[Symbol.iterator](){return this}};rt.prototype.visitNull=ct;rt.prototype.visitBool=ct;rt.prototype.visitInt=ct;rt.prototype.visitInt8=ct;rt.prototype.visitInt16=ct;rt.prototype.visitInt32=ct;rt.prototype.visitInt64=ct;rt.prototype.visitUint8=ct;rt.prototype.visitUint16=ct;rt.prototype.visitUint32=ct;rt.prototype.visitUint64=ct;rt.prototype.visitFloat=ct;rt.prototype.visitFloat16=ct;rt.prototype.visitFloat32=ct;rt.prototype.visitFloat64=ct;rt.prototype.visitUtf8=ct;rt.prototype.visitLargeUtf8=ct;rt.prototype.visitBinary=ct;rt.prototype.visitLargeBinary=ct;rt.prototype.visitFixedSizeBinary=ct;rt.prototype.visitDate=ct;rt.prototype.visitDateDay=ct;rt.prototype.visitDateMillisecond=ct;rt.prototype.visitTimestamp=ct;rt.prototype.visitTimestampSecond=ct;rt.prototype.visitTimestampMillisecond=ct;rt.prototype.visitTimestampMicrosecond=ct;rt.prototype.visitTimestampNanosecond=ct;rt.prototype.visitTime=ct;rt.prototype.visitTimeSecond=ct;rt.prototype.visitTimeMillisecond=ct;rt.prototype.visitTimeMicrosecond=ct;rt.prototype.visitTimeNanosecond=ct;rt.prototype.visitDecimal=ct;rt.prototype.visitList=ct;rt.prototype.visitStruct=ct;rt.prototype.visitUnion=ct;rt.prototype.visitDenseUnion=ct;rt.prototype.visitSparseUnion=ct;rt.prototype.visitDictionary=ct;rt.prototype.visitInterval=ct;rt.prototype.visitIntervalDayTime=ct;rt.prototype.visitIntervalYearMonth=ct;rt.prototype.visitDuration=ct;rt.prototype.visitDurationSecond=ct;rt.prototype.visitDurationMillisecond=ct;rt.prototype.visitDurationMicrosecond=ct;rt.prototype.visitDurationNanosecond=ct;rt.prototype.visitFixedSizeList=ct;rt.prototype.visitMap=ct;var As=new rt;var EA,XA={},CA={},pt=class{constructor(e){var s,l,A;let p=e[0]instanceof pt?e.flatMap(F=>F.data):e;if(p.length===0||p.some(F=>!(F instanceof _t)))throw new TypeError("Vector constructor expects an Array of Data instances.");let w=(s=p[0])===null||s===void 0?void 0:s.type;switch(p.length){case 0:this._offsets=[0];break;case 1:{let{get:F,set:S,indexOf:R}=XA[w.typeId],V=p[0];this.isValid=X=>yo(V,X),this.get=X=>F(V,X),this.set=(X,at)=>S(V,X,at),this.indexOf=X=>R(V,X),this._offsets=[0,V.length];break}default:Object.setPrototypeOf(this,CA[w.typeId]),this._offsets=mc(p);break}this.data=p,this.type=w,this.stride=Sr(w),this.numChildren=(A=(l=w.children)===null||l===void 0?void 0:l.length)!==null&&A!==void 0?A:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((e,s)=>e+s.byteLength,0)}get nullable(){return WA(this.data)}get nullCount(){return pc(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${x[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}at(e){return this.get(r0(e,this.length))}set(e,s){}indexOf(e,s){return-1}includes(e,s){return this.indexOf(e,s)>-1}[Symbol.iterator](){return As.visit(this)}concat(...e){return new pt(this.data.concat(e.flatMap(s=>s.data).flat(Number.POSITIVE_INFINITY)))}slice(e,s){return new pt(Ao(this,e,s,({data:l,_offsets:A},p,w)=>yc(l,A,p,w)))}toJSON(){return[...this]}toArray(){let{type:e,data:s,length:l,stride:A,ArrayType:p}=this;switch(e.typeId){case x.Int:case x.Float:case x.Decimal:case x.Time:case x.Timestamp:switch(s.length){case 0:return new p;case 1:return s[0].values.subarray(0,l*A);default:return s.reduce((w,{values:F,length:S})=>(w.array.set(F.subarray(0,S*A),w.offset),w.offset+=S*A,w),{array:new p(l*A),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(",")}]`}getChild(e){var s;return this.getChildAt((s=this.type.children)===null||s===void 0?void 0:s.findIndex(l=>l.name===e))}getChildAt(e){return e>-1&&e<this.numChildren?new pt(this.data.map(({children:s})=>s[e])):null}get isMemoized(){return P.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(P.isDictionary(this.type)){let e=new ps(this.data[0].dictionary),s=this.data.map(l=>{let A=l.clone();return A.dictionary=e,A});return new pt(s)}return new ps(this)}unmemoize(){if(P.isDictionary(this.type)&&this.isMemoized){let e=this.data[0].dictionary.unmemoize(),s=this.data.map(l=>{let A=l.clone();return A.dictionary=e,A});return new pt(s)}return this}};EA=Symbol.toStringTag;pt[EA]=(o=>{o.type=P.prototype,o.data=[],o.length=0,o.stride=1,o.numChildren=0,o._offsets=new Uint32Array([0]),o[Symbol.isConcatSpreadable]=!0;let e=Object.keys(x).map(s=>x[s]).filter(s=>typeof s=="number"&&s!==x.NONE);for(let s of e){let l=de.getVisitFnByTypeId(s),A=Re.getVisitFnByTypeId(s),p=u0.getVisitFnByTypeId(s);XA[s]={get:l,set:A,indexOf:p},CA[s]=Object.create(o,{isValid:{value:ds(yo)},get:{value:ds(de.getVisitFnByTypeId(s))},set:{value:gc(Re.getVisitFnByTypeId(s))},indexOf:{value:wc(u0.getVisitFnByTypeId(s))}})}return"Vector"})(pt.prototype);var ps=class extends pt{constructor(e){super(e.data);let s=this.get,l=this.set,A=this.slice,p=new Array(this.length);Object.defineProperty(this,"get",{value(w){let F=p[w];if(F!==void 0)return F;let S=s.call(this,w);return p[w]=S,S}}),Object.defineProperty(this,"set",{value(w,F){l.call(this,w,F),p[w]=F}}),Object.defineProperty(this,"slice",{value:(w,F)=>new ps(A.call(this,w,F))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new pt(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}};function GA(o){if(!o||o.length<=0)return function(A){return!0};let e="",s=o.filter(l=>l===l);return s.length>0&&(e=`
8
8
  switch (x) {${s.map(l=>`
9
9
  case ${db(l)}:`).join("")}
10
10
  return false;
package/dist/index.cjs CHANGED
@@ -44,7 +44,7 @@ var LASFormat = {
44
44
  };
45
45
 
46
46
  // dist/las-loader.js
47
- var VERSION = true ? "4.4.0-alpha.10" : "latest";
47
+ var VERSION = true ? "4.4.0-alpha.9" : "latest";
48
48
  var LASWorkerLoader = {
49
49
  ...LASFormat,
50
50
  dataType: null,