@duckdb/duckdb-wasm 1.13.0 → 1.13.1-dev7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,8 +14,8 @@ return true;`)}Wo.createIsValidFunction=VA;function kA(i){return typeof i!="bigi
14
14
  `:`,
15
15
  `),this._write(`${BM(this._recordBatches[e])}`),this._recordBatchBlocks.push(new Pn.FileBlock(0,0,0));this._write(`
16
16
  ]`)}return this._schema&&this._write(`
17
- }`),this._dictionaries=[],this._recordBatches=[],super.close()}};pi.RecordBatchJSONWriter=Na;function kl(i,e){let t=e;e instanceof Fl.Table&&(t=e.chunks,i.reset(void 0,e.schema));for(let r of t)i.write(r);return i.finish()}function El(i,e){var t,r,n,o;return vg.__awaiter(this,void 0,void 0,function*(){try{for(t=vg.__asyncValues(e);r=yield t.next(),!r.done;){let l=r.value;i.write(l)}}catch(l){n={error:l}}finally{try{r&&!r.done&&(o=t.return)&&(yield o.call(t))}finally{if(n)throw n.error}}return i.finish()})}function Ig({name:i,type:e,nullable:t}){let r=new gM.JSONTypeAssembler;return{name:i,nullable:t,type:r.visit(e),children:(e.children||[]).map(Ig),dictionary:mM.DataType.isDictionary(e)?{id:e.id,isOrdered:e.isOrdered,indexType:r.visit(e.indices)}:void 0}}function wM(i,e,t=!1){let r=new bM.Field(`${e}`,i.type,i.nullCount>0),n=Bg.JSONVectorAssembler.assemble(new _M.Column(r,[i]));return JSON.stringify({id:e,isDelta:t,data:{count:i.length,columns:n}},null,2)}function BM(i){return JSON.stringify({count:i.length,columns:Bg.JSONVectorAssembler.assemble(i)},null,2)}});var Nl=C(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.distributeVectorsIntoRecordBatches=_r.distributeColumnsIntoRecordBatches=_r.ensureSameLengthData=void 0;var Tg=Yt(),Rl=Xe(),IM=dr(),TM=Vi(),Pl=new Uint8Array(0),Sg=i=>[Pl,Pl,new Uint8Array(i),Pl];function SM(i,e,t=e.reduce((r,n)=>Math.max(r,n.length),0)){let r,n,o=-1,l=e.length,_=[...i.fields],v=[],T=(t+63&~63)>>3;for(;++o<l;)(r=e[o])&&r.length===t?v[o]=r:((n=_[o]).nullable||(_[o]=_[o].clone({nullable:!0})),v[o]=r?r._changeLengthAndBackfillNullBitmap(t):Tg.Data.new(n.type,0,t,t,Sg(T)));return[new Rl.Schema(_),t,v]}_r.ensureSameLengthData=SM;function AM(i){return Ag(new Rl.Schema(i.map(({field:e})=>e)),i)}_r.distributeColumnsIntoRecordBatches=AM;function Ag(i,e){return DM(i,e.map(t=>t instanceof IM.Chunked?t.chunks.map(r=>r.data):[t.data]))}_r.distributeVectorsIntoRecordBatches=Ag;function DM(i,e){let t=[...i.fields],r=[],n={numBatches:e.reduce((N,z)=>Math.max(N,z.length),0)},o=0,l=0,_=-1,v=e.length,T,D=[];for(;n.numBatches-- >0;){for(l=Number.POSITIVE_INFINITY,_=-1;++_<v;)D[_]=T=e[_].shift(),l=Math.min(l,T?T.length:l);isFinite(l)&&(D=OM(t,l,D,e,n),l>0&&(r[o++]=[l,D.slice()]))}return[i=new Rl.Schema(t,i.metadata),r.map(N=>new TM.RecordBatch(i,...N))]}function OM(i,e,t,r,n){let o,l,_=0,v=-1,T=r.length,D=(e+63&~63)>>3;for(;++v<T;)(o=t[v])&&(_=o.length)>=e?_===e?t[v]=o:(t[v]=o.slice(0,e),o=o.slice(e,_-e),n.numBatches=Math.max(n.numBatches,r[v].unshift(o))):((l=i[v]).nullable||(i[v]=l.clone({nullable:!0})),t[v]=o?o._changeLengthAndBackfillNullBitmap(e):Tg.Data.new(l.type,0,e,e,Sg(D)));return t}});var xe=C(xa=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});xa.BaseVector=void 0;var FM=Be(),MM=dr(),CM=Os(),Ll=Ne(),xl=class extends Ll.AbstractVector{constructor(e,t){super();this._children=t,this.numChildren=e.childData.length,this._bindDataAccessors(this.data=e)}get type(){return this.data.type}get typeId(){return this.data.typeId}get length(){return this.data.length}get offset(){return this.data.offset}get stride(){return this.data.stride}get nullCount(){return this.data.nullCount}get byteLength(){return this.data.byteLength}get VectorName(){return`${FM.Type[this.typeId]}Vector`}get ArrayType(){return this.type.ArrayType}get values(){return this.data.values}get typeIds(){return this.data.typeIds}get nullBitmap(){return this.data.nullBitmap}get valueOffsets(){return this.data.valueOffsets}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}clone(e,t=this._children){return Ll.Vector.new(e,t)}concat(...e){return MM.Chunked.concat(this,...e)}slice(e,t){return CM.clampRange(this,e,t,this._sliceInternal)}isValid(e){if(this.nullCount>0){let t=this.offset+e;return(this.nullBitmap[t>>3]&1<<t%8)!==0}return!0}getChildAt(e){return e<0||e>=this.numChildren?null:(this._children||(this._children=[]))[e]||(this._children[e]=Ll.Vector.new(this.data.childData[e]))}toJSON(){return[...this]}_sliceInternal(e,t,r){return e.clone(e.data.slice(t,r-t),null)}_bindDataAccessors(e){}};xa.BaseVector=xl;xl.prototype[Symbol.isConcatSpreadable]=!0});var ql=C(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});qa.BinaryVector=void 0;var UM=Ne(),VM=xe(),kM=be(),Dg=class extends VM.BaseVector{asUtf8(){return UM.Vector.new(this.data.clone(new kM.Utf8))}};qa.BinaryVector=Dg});var zl=C(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});za.BoolVector=void 0;var EM=be(),RM=xe(),PM=yi(),Og=class extends RM.BaseVector{static from(e){return PM.vectorFromValuesWithType(()=>new EM.Bool,e)}};za.BoolVector=Og});var Hl=C(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.DateMillisecondVector=mr.DateDayVector=mr.DateVector=void 0;var NM=Be(),LM=xe(),Fg=yi(),Wl=be(),Wa=class extends LM.BaseVector{static from(...e){return e.length===2?Fg.vectorFromValuesWithType(()=>e[1]===NM.DateUnit.DAY?new Wl.DateDay:new Wl.DateMillisecond,e[0]):Fg.vectorFromValuesWithType(()=>new Wl.DateMillisecond,e[0])}};mr.DateVector=Wa;var Mg=class extends Wa{};mr.DateDayVector=Mg;var Cg=class extends Wa{};mr.DateMillisecondVector=Cg});var Yl=C(Ha=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});Ha.DecimalVector=void 0;var xM=xe(),Ug=class extends xM.BaseVector{};Ha.DecimalVector=Ug});var $a=C(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});Ya.DictionaryVector=void 0;var qM=Yt(),Vg=Ne(),zM=xe(),WM=yi(),HM=be(),$l=class extends zM.BaseVector{constructor(e){super(e);this.indices=Vg.Vector.new(e.clone(this.type.indices))}static from(...e){if(e.length===3){let[t,r,n]=e,o=new HM.Dictionary(t.type,r,null,null);return Vg.Vector.new(qM.Data.Dictionary(o,0,n.length,0,null,n,t))}return WM.vectorFromValuesWithType(()=>e[0].type,e[0])}get dictionary(){return this.data.dictionary}reverseLookup(e){return this.dictionary.indexOf(e)}getKey(e){return this.indices.get(e)}getValue(e){return this.dictionary.get(e)}setKey(e,t){return this.indices.set(e,t)}setValue(e,t){return this.dictionary.set(e,t)}};Ya.DictionaryVector=$l;$l.prototype.indices=null});var Gl=C(Ga=>{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});Ga.FixedSizeBinaryVector=void 0;var YM=xe(),kg=class extends YM.BaseVector{};Ga.FixedSizeBinaryVector=kg});var Jl=C(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});Ja.FixedSizeListVector=void 0;var $M=xe(),Eg=class extends $M.BaseVector{};Ja.FixedSizeListVector=Eg});var Ql=C(_i=>{"use strict";Object.defineProperty(_i,"__esModule",{value:!0});_i.Float64Vector=_i.Float32Vector=_i.Float16Vector=_i.FloatVector=void 0;var GM=Yt(),JM=Ne(),KM=xe(),ZM=yi(),Jr=be(),Ps=class extends KM.BaseVector{static from(e){let t=eC(this);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)){let r=QM(e.constructor)||t;if(t===null&&(t=r),t&&t===r){let n=new t,o=e.byteLength/n.ArrayType.BYTES_PER_ELEMENT;if(!XM(t,e.constructor))return JM.Vector.new(GM.Data.Float(n,0,o,0,null,e))}}if(t)return ZM.vectorFromValuesWithType(()=>new t,e);throw e instanceof DataView||e instanceof ArrayBuffer?new TypeError(`Cannot infer float type from instance of ${e.constructor.name}`):new TypeError("Unrecognized FloatVector input")}};_i.FloatVector=Ps;var Kl=class extends Ps{toFloat32Array(){return new Float32Array(this)}toFloat64Array(){return new Float64Array(this)}};_i.Float16Vector=Kl;var Zl=class extends Ps{};_i.Float32Vector=Zl;var Xl=class extends Ps{};_i.Float64Vector=Xl;var XM=(i,e)=>i===Jr.Float16&&e!==Uint16Array,QM=i=>{switch(i){case Uint16Array:return Jr.Float16;case Float32Array:return Jr.Float32;case Float64Array:return Jr.Float64;default:return null}},eC=i=>{switch(i){case Kl:return Jr.Float16;case Zl:return Jr.Float32;case Xl:return Jr.Float64;default:return null}}});var ed=C(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.IntervalYearMonthVector=br.IntervalDayTimeVector=br.IntervalVector=void 0;var tC=xe(),Ka=class extends tC.BaseVector{};br.IntervalVector=Ka;var Rg=class extends Ka{};br.IntervalDayTimeVector=Rg;var Pg=class extends Ka{};br.IntervalYearMonthVector=Pg});var Za=C(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.Uint64Vector=Ye.Uint32Vector=Ye.Uint16Vector=Ye.Uint8Vector=Ye.Int64Vector=Ye.Int32Vector=Ye.Int16Vector=Ye.Int8Vector=Ye.IntVector=void 0;var iC=Yt(),rC=Ne(),nC=xe(),sC=yi(),Ng=at(),Lg=$e(),Re=be(),mi=class extends nC.BaseVector{static from(...e){let[t,r=!1]=e,n=uC(this,r);if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)){let o=aC(t.constructor,r)||n;if(n===null&&(n=o),n&&n===o){let l=new n,_=t.byteLength/l.ArrayType.BYTES_PER_ELEMENT;return oC(n,t.constructor)&&(_*=.5),rC.Vector.new(iC.Data.Int(l,0,_,0,null,t))}}if(n)return sC.vectorFromValuesWithType(()=>new n,t);throw t instanceof DataView||t instanceof ArrayBuffer?new TypeError(`Cannot infer integer type from instance of ${t.constructor.name}`):new TypeError("Unrecognized IntVector input")}};Ye.IntVector=mi;var td=class extends mi{};Ye.Int8Vector=td;var id=class extends mi{};Ye.Int16Vector=id;var rd=class extends mi{};Ye.Int32Vector=rd;var nd=class extends mi{toBigInt64Array(){return Lg.toBigInt64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigInt64Array())}};Ye.Int64Vector=nd;var sd=class extends mi{};Ye.Uint8Vector=sd;var od=class extends mi{};Ye.Uint16Vector=od;var ad=class extends mi{};Ye.Uint32Vector=ad;var ud=class extends mi{toBigUint64Array(){return Lg.toBigUint64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigUint64Array())}};Ye.Uint64Vector=ud;var oC=(i,e)=>(i===Re.Int64||i===Re.Uint64)&&(e===Int32Array||e===Uint32Array),aC=(i,e)=>{switch(i){case Int8Array:return Re.Int8;case Int16Array:return Re.Int16;case Int32Array:return e?Re.Int64:Re.Int32;case Ng.BigInt64Array:return Re.Int64;case Uint8Array:return Re.Uint8;case Uint16Array:return Re.Uint16;case Uint32Array:return e?Re.Uint64:Re.Uint32;case Ng.BigUint64Array:return Re.Uint64;default:return null}},uC=(i,e)=>{switch(i){case td:return Re.Int8;case id:return Re.Int16;case rd:return e?Re.Int64:Re.Int32;case nd:return Re.Int64;case sd:return Re.Uint8;case od:return Re.Uint16;case ad:return e?Re.Uint64:Re.Uint32;case ud:return Re.Uint64;default:return null}}});var cd=C(Xa=>{"use strict";Object.defineProperty(Xa,"__esModule",{value:!0});Xa.ListVector=void 0;var cC=xe(),xg=class extends cC.BaseVector{};Xa.ListVector=xg});var ld=C(Qa=>{"use strict";Object.defineProperty(Qa,"__esModule",{value:!0});Qa.MapVector=void 0;var lC=As(),dC=Ne(),fC=xe(),hC=be(),qg=class extends fC.BaseVector{asList(){let e=this.type.children[0];return dC.Vector.new(this.data.clone(new hC.List(e)))}bind(e){let t=this.getChildAt(0),{[e]:r,[e+1]:n}=this.valueOffsets;return new lC.MapRow(t.slice(r,n))}};Qa.MapVector=qg});var dd=C(eu=>{"use strict";Object.defineProperty(eu,"__esModule",{value:!0});eu.NullVector=void 0;var pC=xe(),zg=class extends pC.BaseVector{};eu.NullVector=zg});var fd=C(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});tu.StructVector=void 0;var yC=As(),_C=xe(),mC=Symbol.for("rowIndex"),Wg=class extends _C.BaseVector{bind(e){let t=this._row||(this._row=new yC.StructRow(this)),r=Object.create(t);return r[mC]=e,r}};tu.StructVector=Wg});var hd=C(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.TimestampNanosecondVector=Et.TimestampMicrosecondVector=Et.TimestampMillisecondVector=Et.TimestampSecondVector=Et.TimestampVector=void 0;var bC=xe(),Nn=class extends bC.BaseVector{};Et.TimestampVector=Nn;var Hg=class extends Nn{};Et.TimestampSecondVector=Hg;var Yg=class extends Nn{};Et.TimestampMillisecondVector=Yg;var $g=class extends Nn{};Et.TimestampMicrosecondVector=$g;var Gg=class extends Nn{};Et.TimestampNanosecondVector=Gg});var pd=C(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.TimeNanosecondVector=Rt.TimeMicrosecondVector=Rt.TimeMillisecondVector=Rt.TimeSecondVector=Rt.TimeVector=void 0;var gC=xe(),Ln=class extends gC.BaseVector{};Rt.TimeVector=Ln;var Jg=class extends Ln{};Rt.TimeSecondVector=Jg;var Kg=class extends Ln{};Rt.TimeMillisecondVector=Kg;var Zg=class extends Ln{};Rt.TimeMicrosecondVector=Zg;var Xg=class extends Ln{};Rt.TimeNanosecondVector=Xg});var yd=C(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.SparseUnionVector=gr.DenseUnionVector=gr.UnionVector=void 0;var vC=xe(),iu=class extends vC.BaseVector{get typeIdToChildIndex(){return this.data.type.typeIdToChildIndex}};gr.UnionVector=iu;var Qg=class extends iu{get valueOffsets(){return this.data.valueOffsets}};gr.DenseUnionVector=Qg;var ev=class extends iu{};gr.SparseUnionVector=ev});var _d=C(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.Utf8Vector=void 0;var jC=Ne(),wC=xe(),tv=be(),BC=yi(),iv=class extends wC.BaseVector{static from(e){return BC.vectorFromValuesWithType(()=>new tv.Utf8,e)}asBinary(){return jC.Vector.new(this.data.clone(new tv.Binary))}};ru.Utf8Vector=iv});var rv=C(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.partial2=vr.partial1=vr.partial0=void 0;function IC(i){return function(){return i(this)}}vr.partial0=IC;function TC(i){return function(e){return i(this,e)}}vr.partial1=TC;function SC(i){return function(e,t){return i(this,e,t)}}vr.partial2=SC});var gd=C(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.instance=xn.GetVisitor=void 0;var nu=js(),AC=rt(),DC=Dr(),OC=ms(),Pt=Be(),Q=class extends AC.Visitor{};xn.GetVisitor=Q;var FC=(i,e)=>864e5*i[e],md=(i,e)=>4294967296*i[e+1]+(i[e]>>>0),MC=(i,e)=>4294967296*(i[e+1]/1e3)+(i[e]>>>0)/1e3,CC=(i,e)=>4294967296*(i[e+1]/1e6)+(i[e]>>>0)/1e6,nv=i=>new Date(i),UC=(i,e)=>nv(FC(i,e)),VC=(i,e)=>nv(md(i,e)),kC=(i,e)=>null,sv=(i,e,t)=>{let{[t]:r,[t+1]:n}=e;return r!=null&&n!=null?i.subarray(r,n):null},EC=({offset:i,values:e},t)=>{let r=i+t;return(e[r>>3]&1<<r%8)!==0},ov=({values:i},e)=>UC(i,e),av=({values:i},e)=>VC(i,e*2),bi=({stride:i,values:e},t)=>e[i*t],uv=({stride:i,values:e},t)=>OC.uint16ToFloat64(e[i*t]),bd=({stride:i,values:e,type:t},r)=>nu.BN.new(e.subarray(i*r,i*(r+1)),t.isSigned),RC=({stride:i,values:e},t)=>e.subarray(i*t,i*(t+1)),PC=({values:i,valueOffsets:e},t)=>sv(i,e,t),NC=({values:i,valueOffsets:e},t)=>{let r=sv(i,e,t);return r!==null?DC.decodeUtf8(r):null},LC=(i,e)=>i.type.bitWidth<64?bi(i,e):bd(i,e),xC=(i,e)=>i.type.precision!==Pt.Precision.HALF?bi(i,e):uv(i,e),qC=(i,e)=>i.type.unit===Pt.DateUnit.DAY?ov(i,e):av(i,e),cv=({values:i},e)=>1e3*md(i,e*2),lv=({values:i},e)=>md(i,e*2),dv=({values:i},e)=>MC(i,e*2),fv=({values:i},e)=>CC(i,e*2),zC=(i,e)=>{switch(i.type.unit){case Pt.TimeUnit.SECOND:return cv(i,e);case Pt.TimeUnit.MILLISECOND:return lv(i,e);case Pt.TimeUnit.MICROSECOND:return dv(i,e);case Pt.TimeUnit.NANOSECOND:return fv(i,e)}},hv=({values:i,stride:e},t)=>i[e*t],pv=({values:i,stride:e},t)=>i[e*t],yv=({values:i},e)=>nu.BN.signed(i.subarray(2*e,2*(e+1))),_v=({values:i},e)=>nu.BN.signed(i.subarray(2*e,2*(e+1))),WC=(i,e)=>{switch(i.type.unit){case Pt.TimeUnit.SECOND:return hv(i,e);case Pt.TimeUnit.MILLISECOND:return pv(i,e);case Pt.TimeUnit.MICROSECOND:return yv(i,e);case Pt.TimeUnit.NANOSECOND:return _v(i,e)}},HC=({values:i},e)=>nu.BN.decimal(i.subarray(4*e,4*(e+1))),YC=(i,e)=>{let t=i.getChildAt(0),{valueOffsets:r,stride:n}=i;return t.slice(r[e*n],r[e*n+1])},$C=(i,e)=>i.bind(e),GC=(i,e)=>i.bind(e),JC=(i,e)=>i.type.mode===Pt.UnionMode.Dense?mv(i,e):bv(i,e),mv=(i,e)=>{let t=i.typeIdToChildIndex[i.typeIds[e]],r=i.getChildAt(t);return r?r.get(i.valueOffsets[e]):null},bv=(i,e)=>{let t=i.typeIdToChildIndex[i.typeIds[e]],r=i.getChildAt(t);return r?r.get(e):null},KC=(i,e)=>i.getValue(i.getKey(e)),ZC=(i,e)=>i.type.unit===Pt.IntervalUnit.DAY_TIME?gv(i,e):vv(i,e),gv=({values:i},e)=>i.subarray(2*e,2*(e+1)),vv=({values:i},e)=>{let t=i[e],r=new Int32Array(2);return r[0]=t/12|0,r[1]=t%12|0,r},XC=(i,e)=>{let t=i.getChildAt(0),{stride:r}=i;return t.slice(e*r,(e+1)*r)};Q.prototype.visitNull=kC;Q.prototype.visitBool=EC;Q.prototype.visitInt=LC;Q.prototype.visitInt8=bi;Q.prototype.visitInt16=bi;Q.prototype.visitInt32=bi;Q.prototype.visitInt64=bd;Q.prototype.visitUint8=bi;Q.prototype.visitUint16=bi;Q.prototype.visitUint32=bi;Q.prototype.visitUint64=bd;Q.prototype.visitFloat=xC;Q.prototype.visitFloat16=uv;Q.prototype.visitFloat32=bi;Q.prototype.visitFloat64=bi;Q.prototype.visitUtf8=NC;Q.prototype.visitBinary=PC;Q.prototype.visitFixedSizeBinary=RC;Q.prototype.visitDate=qC;Q.prototype.visitDateDay=ov;Q.prototype.visitDateMillisecond=av;Q.prototype.visitTimestamp=zC;Q.prototype.visitTimestampSecond=cv;Q.prototype.visitTimestampMillisecond=lv;Q.prototype.visitTimestampMicrosecond=dv;Q.prototype.visitTimestampNanosecond=fv;Q.prototype.visitTime=WC;Q.prototype.visitTimeSecond=hv;Q.prototype.visitTimeMillisecond=pv;Q.prototype.visitTimeMicrosecond=yv;Q.prototype.visitTimeNanosecond=_v;Q.prototype.visitDecimal=HC;Q.prototype.visitList=YC;Q.prototype.visitStruct=GC;Q.prototype.visitUnion=JC;Q.prototype.visitDenseUnion=mv;Q.prototype.visitSparseUnion=bv;Q.prototype.visitDictionary=KC;Q.prototype.visitInterval=ZC;Q.prototype.visitIntervalDayTime=gv;Q.prototype.visitIntervalYearMonth=vv;Q.prototype.visitFixedSizeList=XC;Q.prototype.visitMap=$C;xn.instance=new Q});var Iv=C(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.instance=qn.IndexOfVisitor=void 0;var QC=rt(),jv=ni(),wv=Os(),ee=class extends QC.Visitor{};qn.IndexOfVisitor=ee;function eU(i,e){return e===null&&i.length>0?0:-1}function tU(i,e){let{nullBitmap:t}=i.data;if(!t||i.nullCount<=0)return-1;let r=0;for(let n of new jv.BitIterator(t,i.data.offset+(e||0),i.length,t,jv.getBool)){if(!n)return r;++r}return-1}function de(i,e,t){if(e===void 0)return-1;if(e===null)return tU(i,t);let r=wv.createElementComparator(e);for(let n=(t||0)-1,o=i.length;++n<o;)if(r(i.get(n)))return n;return-1}function Bv(i,e,t){let r=wv.createElementComparator(e);for(let n=(t||0)-1,o=i.length;++n<o;)if(r(i.get(n)))return n;return-1}ee.prototype.visitNull=eU;ee.prototype.visitBool=de;ee.prototype.visitInt=de;ee.prototype.visitInt8=de;ee.prototype.visitInt16=de;ee.prototype.visitInt32=de;ee.prototype.visitInt64=de;ee.prototype.visitUint8=de;ee.prototype.visitUint16=de;ee.prototype.visitUint32=de;ee.prototype.visitUint64=de;ee.prototype.visitFloat=de;ee.prototype.visitFloat16=de;ee.prototype.visitFloat32=de;ee.prototype.visitFloat64=de;ee.prototype.visitUtf8=de;ee.prototype.visitBinary=de;ee.prototype.visitFixedSizeBinary=de;ee.prototype.visitDate=de;ee.prototype.visitDateDay=de;ee.prototype.visitDateMillisecond=de;ee.prototype.visitTimestamp=de;ee.prototype.visitTimestampSecond=de;ee.prototype.visitTimestampMillisecond=de;ee.prototype.visitTimestampMicrosecond=de;ee.prototype.visitTimestampNanosecond=de;ee.prototype.visitTime=de;ee.prototype.visitTimeSecond=de;ee.prototype.visitTimeMillisecond=de;ee.prototype.visitTimeMicrosecond=de;ee.prototype.visitTimeNanosecond=de;ee.prototype.visitDecimal=de;ee.prototype.visitList=de;ee.prototype.visitStruct=de;ee.prototype.visitUnion=de;ee.prototype.visitDenseUnion=Bv;ee.prototype.visitSparseUnion=Bv;ee.prototype.visitDictionary=de;ee.prototype.visitInterval=de;ee.prototype.visitIntervalDayTime=de;ee.prototype.visitIntervalYearMonth=de;ee.prototype.visitFixedSizeList=de;ee.prototype.visitMap=de;qn.instance=new ee});var vd=C(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.instance=zn.IteratorVisitor=void 0;var su=Be(),iU=rt(),rU=ni(),Tv=gd(),te=class extends iU.Visitor{};zn.IteratorVisitor=te;function nU(i){let e=Tv.instance.getVisitFn(i);return new rU.BitIterator(i.data.nullBitmap,i.data.offset,i.length,i,(t,r,n,o)=>(n&1<<o)!==0?e(t,r):null)}var Sv=class{constructor(e,t){this.vector=e,this.getFn=t,this.index=0}next(){return this.index<this.vector.length?{value:this.getFn(this.vector,this.index++)}:{done:!0,value:null}}[Symbol.iterator](){return this}};function ue(i){if(i.nullCount>0)return nU(i);let{type:e,typeId:t,length:r}=i;return i.stride===1&&(t===su.Type.Timestamp||t===su.Type.Int&&e.bitWidth!==64||t===su.Type.Time&&e.bitWidth!==64||t===su.Type.Float&&e.precision>0)?i.data.values.subarray(0,r)[Symbol.iterator]():new Sv(i,Tv.instance.getVisitFn(i))}te.prototype.visitNull=ue;te.prototype.visitBool=ue;te.prototype.visitInt=ue;te.prototype.visitInt8=ue;te.prototype.visitInt16=ue;te.prototype.visitInt32=ue;te.prototype.visitInt64=ue;te.prototype.visitUint8=ue;te.prototype.visitUint16=ue;te.prototype.visitUint32=ue;te.prototype.visitUint64=ue;te.prototype.visitFloat=ue;te.prototype.visitFloat16=ue;te.prototype.visitFloat32=ue;te.prototype.visitFloat64=ue;te.prototype.visitUtf8=ue;te.prototype.visitBinary=ue;te.prototype.visitFixedSizeBinary=ue;te.prototype.visitDate=ue;te.prototype.visitDateDay=ue;te.prototype.visitDateMillisecond=ue;te.prototype.visitTimestamp=ue;te.prototype.visitTimestampSecond=ue;te.prototype.visitTimestampMillisecond=ue;te.prototype.visitTimestampMicrosecond=ue;te.prototype.visitTimestampNanosecond=ue;te.prototype.visitTime=ue;te.prototype.visitTimeSecond=ue;te.prototype.visitTimeMillisecond=ue;te.prototype.visitTimeMicrosecond=ue;te.prototype.visitTimeNanosecond=ue;te.prototype.visitDecimal=ue;te.prototype.visitList=ue;te.prototype.visitStruct=ue;te.prototype.visitUnion=ue;te.prototype.visitDenseUnion=ue;te.prototype.visitSparseUnion=ue;te.prototype.visitDictionary=ue;te.prototype.visitInterval=ue;te.prototype.visitIntervalDayTime=ue;te.prototype.visitIntervalYearMonth=ue;te.prototype.visitFixedSizeList=ue;te.prototype.visitMap=ue;zn.instance=new te});var Av=C(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.instance=Wn.ToArrayVisitor=void 0;var Ns=Be(),sU=rt(),oU=vd(),ie=class extends sU.Visitor{};Wn.ToArrayVisitor=ie;function ce(i){let{type:e,length:t,stride:r}=i;switch(e.typeId){case Ns.Type.Int:case Ns.Type.Float:case Ns.Type.Decimal:case Ns.Type.Time:case Ns.Type.Timestamp:return i.data.values.subarray(0,t*r)}return[...oU.instance.visit(i)]}ie.prototype.visitNull=ce;ie.prototype.visitBool=ce;ie.prototype.visitInt=ce;ie.prototype.visitInt8=ce;ie.prototype.visitInt16=ce;ie.prototype.visitInt32=ce;ie.prototype.visitInt64=ce;ie.prototype.visitUint8=ce;ie.prototype.visitUint16=ce;ie.prototype.visitUint32=ce;ie.prototype.visitUint64=ce;ie.prototype.visitFloat=ce;ie.prototype.visitFloat16=ce;ie.prototype.visitFloat32=ce;ie.prototype.visitFloat64=ce;ie.prototype.visitUtf8=ce;ie.prototype.visitBinary=ce;ie.prototype.visitFixedSizeBinary=ce;ie.prototype.visitDate=ce;ie.prototype.visitDateDay=ce;ie.prototype.visitDateMillisecond=ce;ie.prototype.visitTimestamp=ce;ie.prototype.visitTimestampSecond=ce;ie.prototype.visitTimestampMillisecond=ce;ie.prototype.visitTimestampMicrosecond=ce;ie.prototype.visitTimestampNanosecond=ce;ie.prototype.visitTime=ce;ie.prototype.visitTimeSecond=ce;ie.prototype.visitTimeMillisecond=ce;ie.prototype.visitTimeMicrosecond=ce;ie.prototype.visitTimeNanosecond=ce;ie.prototype.visitDecimal=ce;ie.prototype.visitList=ce;ie.prototype.visitStruct=ce;ie.prototype.visitUnion=ce;ie.prototype.visitDenseUnion=ce;ie.prototype.visitSparseUnion=ce;ie.prototype.visitDictionary=ce;ie.prototype.visitInterval=ce;ie.prototype.visitIntervalDayTime=ce;ie.prototype.visitIntervalYearMonth=ce;ie.prototype.visitFixedSizeList=ce;ie.prototype.visitMap=ce;Wn.instance=new ie});var Dv=C(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.instance=Hn.ByteWidthVisitor=void 0;var aU=rt(),uU=Be(),Ls=(i,e)=>i+e,jd=i=>`Cannot compute the byte width of variable-width column ${i}`,wd=class extends aU.Visitor{visitNull(e){return 0}visitInt(e){return e.bitWidth/8}visitFloat(e){return e.ArrayType.BYTES_PER_ELEMENT}visitBinary(e){throw new Error(jd(e))}visitUtf8(e){throw new Error(jd(e))}visitBool(e){return 1/8}visitDecimal(e){return 16}visitDate(e){return(e.unit+1)*4}visitTime(e){return e.bitWidth/8}visitTimestamp(e){return e.unit===uU.TimeUnit.SECOND?4:8}visitInterval(e){return(e.unit+1)*4}visitList(e){throw new Error(jd(e))}visitStruct(e){return this.visitFields(e.children).reduce(Ls,0)}visitUnion(e){return this.visitFields(e.children).reduce(Ls,0)}visitFixedSizeBinary(e){return e.byteWidth}visitFixedSizeList(e){return e.listSize*this.visitFields(e.children).reduce(Ls,0)}visitMap(e){return this.visitFields(e.children).reduce(Ls,0)}visitDictionary(e){return this.visit(e.indices)}visitFields(e){return(e||[]).map(t=>this.visit(t.type))}visitSchema(e){return this.visitFields(e.fields).reduce(Ls,0)}};Hn.ByteWidthVisitor=wd;Hn.instance=new wd});var Ov=C(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.instance=Yn.GetVectorConstructor=void 0;var cU=rt(),lU=ql(),dU=zl(),Bd=Hl(),fU=Yl(),hU=$a(),pU=Gl(),yU=Jl(),ou=Ql(),Id=ed(),ki=Za(),_U=cd(),mU=ld(),bU=dd(),gU=fd(),xs=hd(),qs=pd(),Td=yd(),vU=_d(),Sd=class extends cU.Visitor{visitNull(){return bU.NullVector}visitBool(){return dU.BoolVector}visitInt(){return ki.IntVector}visitInt8(){return ki.Int8Vector}visitInt16(){return ki.Int16Vector}visitInt32(){return ki.Int32Vector}visitInt64(){return ki.Int64Vector}visitUint8(){return ki.Uint8Vector}visitUint16(){return ki.Uint16Vector}visitUint32(){return ki.Uint32Vector}visitUint64(){return ki.Uint64Vector}visitFloat(){return ou.FloatVector}visitFloat16(){return ou.Float16Vector}visitFloat32(){return ou.Float32Vector}visitFloat64(){return ou.Float64Vector}visitUtf8(){return vU.Utf8Vector}visitBinary(){return lU.BinaryVector}visitFixedSizeBinary(){return pU.FixedSizeBinaryVector}visitDate(){return Bd.DateVector}visitDateDay(){return Bd.DateDayVector}visitDateMillisecond(){return Bd.DateMillisecondVector}visitTimestamp(){return xs.TimestampVector}visitTimestampSecond(){return xs.TimestampSecondVector}visitTimestampMillisecond(){return xs.TimestampMillisecondVector}visitTimestampMicrosecond(){return xs.TimestampMicrosecondVector}visitTimestampNanosecond(){return xs.TimestampNanosecondVector}visitTime(){return qs.TimeVector}visitTimeSecond(){return qs.TimeSecondVector}visitTimeMillisecond(){return qs.TimeMillisecondVector}visitTimeMicrosecond(){return qs.TimeMicrosecondVector}visitTimeNanosecond(){return qs.TimeNanosecondVector}visitDecimal(){return fU.DecimalVector}visitList(){return _U.ListVector}visitStruct(){return gU.StructVector}visitUnion(){return Td.UnionVector}visitDenseUnion(){return Td.DenseUnionVector}visitSparseUnion(){return Td.SparseUnionVector}visitDictionary(){return hU.DictionaryVector}visitInterval(){return Id.IntervalVector}visitIntervalDayTime(){return Id.IntervalDayTimeVector}visitIntervalYearMonth(){return Id.IntervalYearMonthVector}visitFixedSizeList(){return yU.FixedSizeListVector}visitMap(){return mU.MapVector}};Yn.GetVectorConstructor=Sd;Yn.instance=new Sd});var yi=C(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.vectorFromValuesWithType=V.StructRow=V.MapRow=V.Utf8Vector=V.SparseUnionVector=V.DenseUnionVector=V.UnionVector=V.TimeNanosecondVector=V.TimeMicrosecondVector=V.TimeMillisecondVector=V.TimeSecondVector=V.TimeVector=V.TimestampNanosecondVector=V.TimestampMicrosecondVector=V.TimestampMillisecondVector=V.TimestampSecondVector=V.TimestampVector=V.StructVector=V.NullVector=V.MapVector=V.ListVector=V.Uint64Vector=V.Uint32Vector=V.Uint16Vector=V.Uint8Vector=V.Int64Vector=V.Int32Vector=V.Int16Vector=V.Int8Vector=V.IntVector=V.IntervalYearMonthVector=V.IntervalDayTimeVector=V.IntervalVector=V.Float64Vector=V.Float32Vector=V.Float16Vector=V.FloatVector=V.FixedSizeListVector=V.FixedSizeBinaryVector=V.DictionaryVector=V.DecimalVector=V.DateMillisecondVector=V.DateDayVector=V.DateVector=V.Chunked=V.BoolVector=V.BinaryVector=V.BaseVector=V.Vector=void 0;var Ad=ot(),jU=Ne();Object.defineProperty(V,"Vector",{enumerable:!0,get:function(){return jU.Vector}});var wU=xe();Object.defineProperty(V,"BaseVector",{enumerable:!0,get:function(){return wU.BaseVector}});var BU=ql();Object.defineProperty(V,"BinaryVector",{enumerable:!0,get:function(){return BU.BinaryVector}});var IU=zl();Object.defineProperty(V,"BoolVector",{enumerable:!0,get:function(){return IU.BoolVector}});var TU=dr();Object.defineProperty(V,"Chunked",{enumerable:!0,get:function(){return TU.Chunked}});var Dd=Hl();Object.defineProperty(V,"DateVector",{enumerable:!0,get:function(){return Dd.DateVector}});Object.defineProperty(V,"DateDayVector",{enumerable:!0,get:function(){return Dd.DateDayVector}});Object.defineProperty(V,"DateMillisecondVector",{enumerable:!0,get:function(){return Dd.DateMillisecondVector}});var SU=Yl();Object.defineProperty(V,"DecimalVector",{enumerable:!0,get:function(){return SU.DecimalVector}});var AU=$a();Object.defineProperty(V,"DictionaryVector",{enumerable:!0,get:function(){return AU.DictionaryVector}});var DU=Gl();Object.defineProperty(V,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return DU.FixedSizeBinaryVector}});var OU=Jl();Object.defineProperty(V,"FixedSizeListVector",{enumerable:!0,get:function(){return OU.FixedSizeListVector}});var au=Ql();Object.defineProperty(V,"FloatVector",{enumerable:!0,get:function(){return au.FloatVector}});Object.defineProperty(V,"Float16Vector",{enumerable:!0,get:function(){return au.Float16Vector}});Object.defineProperty(V,"Float32Vector",{enumerable:!0,get:function(){return au.Float32Vector}});Object.defineProperty(V,"Float64Vector",{enumerable:!0,get:function(){return au.Float64Vector}});var Od=ed();Object.defineProperty(V,"IntervalVector",{enumerable:!0,get:function(){return Od.IntervalVector}});Object.defineProperty(V,"IntervalDayTimeVector",{enumerable:!0,get:function(){return Od.IntervalDayTimeVector}});Object.defineProperty(V,"IntervalYearMonthVector",{enumerable:!0,get:function(){return Od.IntervalYearMonthVector}});var Ei=Za();Object.defineProperty(V,"IntVector",{enumerable:!0,get:function(){return Ei.IntVector}});Object.defineProperty(V,"Int8Vector",{enumerable:!0,get:function(){return Ei.Int8Vector}});Object.defineProperty(V,"Int16Vector",{enumerable:!0,get:function(){return Ei.Int16Vector}});Object.defineProperty(V,"Int32Vector",{enumerable:!0,get:function(){return Ei.Int32Vector}});Object.defineProperty(V,"Int64Vector",{enumerable:!0,get:function(){return Ei.Int64Vector}});Object.defineProperty(V,"Uint8Vector",{enumerable:!0,get:function(){return Ei.Uint8Vector}});Object.defineProperty(V,"Uint16Vector",{enumerable:!0,get:function(){return Ei.Uint16Vector}});Object.defineProperty(V,"Uint32Vector",{enumerable:!0,get:function(){return Ei.Uint32Vector}});Object.defineProperty(V,"Uint64Vector",{enumerable:!0,get:function(){return Ei.Uint64Vector}});var FU=cd();Object.defineProperty(V,"ListVector",{enumerable:!0,get:function(){return FU.ListVector}});var MU=ld();Object.defineProperty(V,"MapVector",{enumerable:!0,get:function(){return MU.MapVector}});var CU=dd();Object.defineProperty(V,"NullVector",{enumerable:!0,get:function(){return CU.NullVector}});var UU=fd();Object.defineProperty(V,"StructVector",{enumerable:!0,get:function(){return UU.StructVector}});var zs=hd();Object.defineProperty(V,"TimestampVector",{enumerable:!0,get:function(){return zs.TimestampVector}});Object.defineProperty(V,"TimestampSecondVector",{enumerable:!0,get:function(){return zs.TimestampSecondVector}});Object.defineProperty(V,"TimestampMillisecondVector",{enumerable:!0,get:function(){return zs.TimestampMillisecondVector}});Object.defineProperty(V,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return zs.TimestampMicrosecondVector}});Object.defineProperty(V,"TimestampNanosecondVector",{enumerable:!0,get:function(){return zs.TimestampNanosecondVector}});var Ws=pd();Object.defineProperty(V,"TimeVector",{enumerable:!0,get:function(){return Ws.TimeVector}});Object.defineProperty(V,"TimeSecondVector",{enumerable:!0,get:function(){return Ws.TimeSecondVector}});Object.defineProperty(V,"TimeMillisecondVector",{enumerable:!0,get:function(){return Ws.TimeMillisecondVector}});Object.defineProperty(V,"TimeMicrosecondVector",{enumerable:!0,get:function(){return Ws.TimeMicrosecondVector}});Object.defineProperty(V,"TimeNanosecondVector",{enumerable:!0,get:function(){return Ws.TimeNanosecondVector}});var Fd=yd();Object.defineProperty(V,"UnionVector",{enumerable:!0,get:function(){return Fd.UnionVector}});Object.defineProperty(V,"DenseUnionVector",{enumerable:!0,get:function(){return Fd.DenseUnionVector}});Object.defineProperty(V,"SparseUnionVector",{enumerable:!0,get:function(){return Fd.SparseUnionVector}});var VU=_d();Object.defineProperty(V,"Utf8Vector",{enumerable:!0,get:function(){return VU.Utf8Vector}});var Fv=As();Object.defineProperty(V,"MapRow",{enumerable:!0,get:function(){return Fv.MapRow}});Object.defineProperty(V,"StructRow",{enumerable:!0,get:function(){return Fv.StructRow}});var Hs=rv(),Md=Be(),$n=Ne(),Mv=dr(),Kr=xe(),kU=ni(),uu=at(),Cv=Ve(),Uv=gd(),Vv=Wc(),kv=Iv(),Ev=Av(),Rv=vd(),Pv=Dv(),Nv=Ov();$n.Vector.new=EU;$n.Vector.from=PU;function EU(i,...e){return new(Nv.instance.getVisitFn(i)())(i,...e)}function RU(i,e){if(uu.isIterable(e))return $n.Vector.from({nullValues:[null,void 0],type:i(),values:e});if(uu.isAsyncIterable(e))return $n.Vector.from({nullValues:[null,void 0],type:i(),values:e});let{values:t=[],type:r=i(),nullValues:n=[null,void 0]}=Object.assign({},e);return uu.isIterable(t)?$n.Vector.from(Object.assign(Object.assign({nullValues:n},e),{type:r})):$n.Vector.from(Object.assign(Object.assign({nullValues:n},e),{type:r}))}V.vectorFromValuesWithType=RU;function PU(i){let e=Object.assign({nullValues:[null,void 0]},i),{values:t=[]}=e,r=Ad.__rest(e,["values"]);if(uu.isIterable(t)){let n=[...Cv.Builder.throughIterable(r)(t)];return n.length===1?n[0]:Mv.Chunked.concat(n)}return(n=>Ad.__awaiter(this,void 0,void 0,function*(){var o,l;let _=Cv.Builder.throughAsyncIterable(r);try{for(var v=Ad.__asyncValues(_(t)),T;T=yield v.next(),!T.done;){let D=T.value;n.push(D)}}catch(D){o={error:D}}finally{try{T&&!T.done&&(l=v.return)&&(yield l.call(v))}finally{if(o)throw o.error}}return n.length===1?n[0]:Mv.Chunked.concat(n)}))([])}Kr.BaseVector.prototype.get=function(e){return Uv.instance.visit(this,e)};Kr.BaseVector.prototype.set=function(e,t){return Vv.instance.visit(this,e,t)};Kr.BaseVector.prototype.indexOf=function(e,t){return kv.instance.visit(this,e,t)};Kr.BaseVector.prototype.toArray=function(){return Ev.instance.visit(this)};Kr.BaseVector.prototype.getByteWidth=function(){return Pv.instance.visit(this.type)};Kr.BaseVector.prototype[Symbol.iterator]=function(){return Rv.instance.visit(this)};Kr.BaseVector.prototype._bindDataAccessors=qU;Object.keys(Md.Type).map(i=>Md.Type[i]).filter(i=>typeof i=="number").filter(i=>i!==Md.Type.NONE).forEach(i=>{let e=Nv.instance.visit(i);e.prototype.get=Hs.partial1(Uv.instance.getVisitFn(i)),e.prototype.set=Hs.partial2(Vv.instance.getVisitFn(i)),e.prototype.indexOf=Hs.partial2(kv.instance.getVisitFn(i)),e.prototype.toArray=Hs.partial0(Ev.instance.getVisitFn(i)),e.prototype.getByteWidth=NU(Pv.instance.getVisitFn(i)),e.prototype[Symbol.iterator]=Hs.partial0(Rv.instance.getVisitFn(i))});function NU(i){return function(){return i(this.type)}}function LU(i){return function(e){return this.isValid(e)?i.call(this,e):null}}function xU(i){return function(e,t){kU.setBool(this.nullBitmap,this.offset+e,t!=null)&&i.call(this,e,t)}}function qU(){let i=this.nullBitmap;i&&i.byteLength>0&&(this.get=LU(this.get),this.set=xU(this.set))}});var Rs=C(lu=>{"use strict";Object.defineProperty(lu,"__esModule",{value:!0});lu.Table=void 0;var cu=ot(),zU=Un(),WU=Ys(),Lv=La(),Cd=Vi(),xv=Xe(),Ud=be(),qv=qr(),Vd=at(),zv=Nl(),kd=yi(),Ke=class extends kd.Chunked{constructor(...e){var t;let r=null;e[0]instanceof xv.Schema&&(r=e[0]);let n=e[0]instanceof Ke?e[0].chunks:qv.selectArgs(Cd.RecordBatch,e);if(!r&&!(r=(t=n[0])===null||t===void 0?void 0:t.schema))throw new TypeError("Table must be initialized with a Schema or at least one RecordBatch");n[0]||(n[0]=new Cd._InternalEmptyPlaceholderRecordBatch(r));super(new Ud.Struct(r.fields),n);this._schema=r,this._chunks=n}static empty(e=new xv.Schema([])){return new Ke(e,[])}static from(e){if(!e)return Ke.empty();if(typeof e=="object"){let r=Vd.isIterable(e.values)?HU(e):Vd.isAsyncIterable(e.values)?YU(e):null;if(r!==null)return r}let t=WU.RecordBatchReader.from(e);return Vd.isPromise(t)?(()=>cu.__awaiter(this,void 0,void 0,function*(){return yield Ke.from(yield t)}))():t.isSync()&&(t=t.open())?t.schema?new Ke(t.schema,[...t]):Ke.empty():(r=>cu.__awaiter(this,void 0,void 0,function*(){var n,o;let l=yield r,_=l.schema,v=[];if(_){try{for(var T=cu.__asyncValues(l),D;D=yield T.next(),!D.done;){let N=D.value;v.push(N)}}catch(N){n={error:N}}finally{try{D&&!D.done&&(o=T.return)&&(yield o.call(T))}finally{if(n)throw n.error}}return new Ke(_,v)}return Ke.empty()}))(t.open())}static fromAsync(e){return cu.__awaiter(this,void 0,void 0,function*(){return yield Ke.from(e)})}static fromStruct(e){return Ke.new(e.data.childData,e.type.children)}static new(...e){return new Ke(...zv.distributeColumnsIntoRecordBatches(qv.selectColumnArgs(e)))}get schema(){return this._schema}get length(){return this._length}get chunks(){return this._chunks}get numCols(){return this._numChildren}clone(e=this._chunks){return new Ke(this._schema,e)}getColumn(e){return this.getColumnAt(this.getColumnIndex(e))}getColumnAt(e){return this.getChildAt(e)}getColumnIndex(e){return this._schema.fields.findIndex(t=>t.name===e)}getChildAt(e){if(e<0||e>=this.numChildren)return null;let t,r,n=this._schema.fields,o=this._children||(this._children=[]);if(r=o[e])return r;if(t=n[e]){let l=this._chunks.map(_=>_.getChildAt(e)).filter(_=>_!=null);if(l.length>0)return o[e]=new zU.Column(t,l)}return null}serialize(e="binary",t=!0){return(t?Lv.RecordBatchStreamWriter:Lv.RecordBatchFileWriter).writeAll(this).toUint8Array(!0)}count(){return this._length}select(...e){let t=this._schema.fields.reduce((r,n,o)=>r.set(n.name,o),new Map);return this.selectAt(...e.map(r=>t.get(r)).filter(r=>r>-1))}selectAt(...e){let t=this._schema.selectAt(...e);return new Ke(t,this._chunks.map(({length:r,data:{childData:n}})=>new Cd.RecordBatch(t,r,e.map(o=>n[o]).filter(Boolean))))}assign(e){let t=this._schema.fields,[r,n]=e.schema.fields.reduce((_,v,T)=>{let[D,N]=_,z=t.findIndex(K=>K.name===v.name);return~z?N[z]=T:D.push(T),_},[[],[]]),o=this._schema.assign(e.schema),l=[...t.map((_,v,T,D=n[v])=>D===void 0?this.getColumnAt(v):e.getColumnAt(D)),...r.map(_=>e.getColumnAt(_))].filter(Boolean);return new Ke(...zv.distributeVectorsIntoRecordBatches(o,l))}};lu.Table=Ke;function HU(i){let{type:e}=i;return e instanceof Ud.Struct?Ke.fromStruct(kd.StructVector.from(i)):null}function YU(i){let{type:e}=i;return e instanceof Ud.Struct?kd.StructVector.from(i).then(t=>Ke.fromStruct(t)):null}});var Vi=C(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn._InternalEmptyPlaceholderRecordBatch=Gn.RecordBatch=void 0;var Ed=Yt(),Rd=Rs(),$U=Ne(),GU=rt(),JU=Xe(),KU=at(),ZU=dr(),XU=qr(),Pd=be(),QU=Nl(),eV=yi(),jr=class extends eV.StructVector{constructor(...e){let t,r=e[0],n;if(e[1]instanceof Ed.Data)[,t,n]=e;else{let o=r.fields,[,l,_]=e;t=Ed.Data.Struct(new Pd.Struct(o),0,l,0,null,_)}super(t,n);this._schema=r}static from(e){return KU.isIterable(e.values),Rd.Table.from(e)}static new(...e){let[t,r]=XU.selectFieldArgs(e),n=r.filter(o=>o instanceof $U.Vector);return new jr(...QU.ensureSameLengthData(new JU.Schema(t),n.map(o=>o.data)))}clone(e,t=this._children){return new jr(this._schema,e,t)}concat(...e){let t=this._schema,r=ZU.Chunked.flatten(this,...e);return new Rd.Table(t,r.map(({data:n})=>new jr(t,n)))}get schema(){return this._schema}get numCols(){return this._schema.fields.length}get dictionaries(){return this._dictionaries||(this._dictionaries=du.collect(this))}select(...e){let t=this._schema.fields.reduce((r,n,o)=>r.set(n.name,o),new Map);return this.selectAt(...e.map(r=>t.get(r)).filter(r=>r>-1))}selectAt(...e){let t=this._schema.selectAt(...e),r=e.map(n=>this.data.childData[n]).filter(Boolean);return new jr(t,this.length,r)}};Gn.RecordBatch=jr;var Wv=class extends jr{constructor(e){super(e,0,e.fields.map(t=>Ed.Data.new(t.type,0,0,0)))}};Gn._InternalEmptyPlaceholderRecordBatch=Wv;var du=class extends GU.Visitor{constructor(){super(...arguments);this.dictionaries=new Map}static collect(e){return new du().visit(e.data,new Pd.Struct(e.schema.fields)).dictionaries}visit(e,t){return Pd.DataType.isDictionary(t)?this.visitDictionary(e,t):(e.childData.forEach((r,n)=>this.visit(r,t.children[n].type)),this)}visitDictionary(e,t){let r=e.dictionary;return r&&r.length>0&&this.dictionaries.set(t.id,r),this}}});var Ys=C(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.AsyncRecordBatchFileReader=xt.RecordBatchFileReader=xt.AsyncRecordBatchStreamReader=xt.RecordBatchStreamReader=xt.RecordBatchReader=void 0;var Se=ot(),Hv=Ne(),fu=Be(),Yv=tl(),$v=ys(),Gv=ar(),$s=nl(),Jv=Ab(),Nd=Vi(),Zr=on(),Nt=Oa(),Lt=at(),gi=class extends Zr.ReadableInterop{constructor(e){super();this._impl=e}get closed(){return this._impl.closed}get schema(){return this._impl.schema}get autoDestroy(){return this._impl.autoDestroy}get dictionaries(){return this._impl.dictionaries}get numDictionaries(){return this._impl.numDictionaries}get numRecordBatches(){return this._impl.numRecordBatches}get footer(){return this._impl.isFile()?this._impl.footer:null}isSync(){return this._impl.isSync()}isAsync(){return this._impl.isAsync()}isFile(){return this._impl.isFile()}isStream(){return this._impl.isStream()}next(){return this._impl.next()}throw(e){return this._impl.throw(e)}return(e){return this._impl.return(e)}cancel(){return this._impl.cancel()}reset(e){return this._impl.reset(e),this._DOMStream=void 0,this._nodeStream=void 0,this}open(e){let t=this._impl.open(e);return Lt.isPromise(t)?t.then(()=>this):this}readRecordBatch(e){return this._impl.isFile()?this._impl.readRecordBatch(e):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return $v.default.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return $v.default.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,t){throw new Error('"throughDOM" not available in this environment')}static from(e){return e instanceof gi?e:Lt.isArrowJSON(e)?tV(e):Lt.isFileHandle(e)?nV(e):Lt.isPromise(e)?(()=>Se.__awaiter(this,void 0,void 0,function*(){return yield gi.from(yield e)}))():Lt.isFetchResponse(e)||Lt.isReadableDOMStream(e)||Lt.isReadableNodeStream(e)||Lt.isAsyncIterable(e)?rV(new Gv.AsyncByteStream(e)):iV(new Gv.ByteStream(e))}static readAll(e){return e instanceof gi?e.isSync()?Qv(e):e0(e):Lt.isArrowJSON(e)||ArrayBuffer.isView(e)||Lt.isIterable(e)||Lt.isIteratorResult(e)?Qv(e):e0(e)}};xt.RecordBatchReader=gi;var Jn=class extends gi{constructor(e){super(e);this._impl=e}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return Se.__asyncGenerator(this,arguments,function*(){yield Se.__await(yield*Se.__asyncDelegator(Se.__asyncValues(this[Symbol.iterator]())))})}};xt.RecordBatchStreamReader=Jn;var Kn=class extends gi{constructor(e){super(e);this._impl=e}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}};xt.AsyncRecordBatchStreamReader=Kn;var hu=class extends Jn{constructor(e){super(e);this._impl=e}};xt.RecordBatchFileReader=hu;var Ld=class extends Kn{constructor(e){super(e);this._impl=e}};xt.AsyncRecordBatchFileReader=Ld;var xd=class{constructor(e=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=e}get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(e){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=e,this.dictionaries=new Map,this}_loadRecordBatch(e,t){return new Nd.RecordBatch(this.schema,e.length,this._loadVectors(e,t,this.schema.fields))}_loadDictionaryBatch(e,t){let{id:r,isDelta:n,data:o}=e,{dictionaries:l,schema:_}=this,v=l.get(r);if(n||!v){let T=_.dictionaries.get(r);return v&&n?v.concat(Hv.Vector.new(this._loadVectors(o,t,[T])[0])):Hv.Vector.new(this._loadVectors(o,t,[T])[0])}return v}_loadVectors(e,t,r){return new Jv.VectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(r)}},Gs=class extends xd{constructor(e,t){super(t);this._reader=Lt.isArrowJSON(e)?new Nt.JSONMessageReader(this._handle=e):new Nt.MessageReader(this._handle=e)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(e){return this.closed||(this.autoDestroy=Xv(this,e),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):Zr.ITERATOR_DONE}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):Zr.ITERATOR_DONE}next(){if(this.closed)return Zr.ITERATOR_DONE;let e,{_reader:t}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let r=e.header(),n=t.readMessageBody(e.bodyLength),o=this._loadRecordBatch(r,n);return{done:!1,value:o}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let r=e.header(),n=t.readMessageBody(e.bodyLength),o=this._loadDictionaryBatch(r,n);this.dictionaries.set(r.id,o)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new Nd._InternalEmptyPlaceholderRecordBatch(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},Js=class extends xd{constructor(e,t){super(t);this._reader=new Nt.AsyncMessageReader(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return Se.__awaiter(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(e){return Se.__awaiter(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=Xv(this,e),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return Se.__awaiter(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):Zr.ITERATOR_DONE})}return(e){return Se.__awaiter(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):Zr.ITERATOR_DONE})}next(){return Se.__awaiter(this,void 0,void 0,function*(){if(this.closed)return Zr.ITERATOR_DONE;let e,{_reader:t}=this;for(;e=yield this._readNextMessageAndValidate();)if(e.isSchema())yield this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let r=e.header(),n=yield t.readMessageBody(e.bodyLength),o=this._loadRecordBatch(r,n);return{done:!1,value:o}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let r=e.header(),n=yield t.readMessageBody(e.bodyLength),o=this._loadDictionaryBatch(r,n);this.dictionaries.set(r.id,o)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new Nd._InternalEmptyPlaceholderRecordBatch(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return Se.__awaiter(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}},qd=class extends Gs{constructor(e,t){super(e instanceof $s.RandomAccessFile?e:new $s.RandomAccessFile(e),t)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(let t of this._footer.dictionaryBatches())t&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){if(this.closed)return null;this._footer||this.open();let t=this._footer&&this._footer.getRecordBatch(e);if(t&&this._handle.seek(t.offset)){let r=this._reader.readMessage(fu.MessageHeader.RecordBatch);if(r==null?void 0:r.isRecordBatch()){let n=r.header(),o=this._reader.readMessageBody(r.bodyLength);return this._loadRecordBatch(n,o)}}return null}_readDictionaryBatch(e){let t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&this._handle.seek(t.offset)){let r=this._reader.readMessage(fu.MessageHeader.DictionaryBatch);if(r==null?void 0:r.isDictionaryBatch()){let n=r.header(),o=this._reader.readMessageBody(r.bodyLength),l=this._loadDictionaryBatch(n,o);this.dictionaries.set(n.id,l)}}}_readFooter(){let{_handle:e}=this,t=e.size-Nt.magicAndPadding,r=e.readInt32(t),n=e.readAt(t-r,r);return Yv.Footer.decode(n)}_readNextMessageAndValidate(e){if(this._footer||this.open(),this._footer&&this._recordBatchIndex<this.numRecordBatches){let t=this._footer&&this._footer.getRecordBatch(this._recordBatchIndex);if(t&&this._handle.seek(t.offset))return this._reader.readMessage(e)}return null}},Kv=class extends Js{constructor(e,...t){let r=typeof t[0]!="number"?t.shift():void 0,n=t[0]instanceof Map?t.shift():void 0;super(e instanceof $s.AsyncRandomAccessFile?e:new $s.AsyncRandomAccessFile(e,r),n)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isFile(){return!0}isAsync(){return!0}open(e){let t=Object.create(null,{open:{get:()=>super.open}});return Se.__awaiter(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(let r of this._footer.dictionaryBatches())r&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield t.open.call(this,e)})}readRecordBatch(e){return Se.__awaiter(this,void 0,void 0,function*(){if(this.closed)return null;this._footer||(yield this.open());let t=this._footer&&this._footer.getRecordBatch(e);if(t&&(yield this._handle.seek(t.offset))){let r=yield this._reader.readMessage(fu.MessageHeader.RecordBatch);if(r==null?void 0:r.isRecordBatch()){let n=r.header(),o=yield this._reader.readMessageBody(r.bodyLength);return this._loadRecordBatch(n,o)}}return null})}_readDictionaryBatch(e){return Se.__awaiter(this,void 0,void 0,function*(){let t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&(yield this._handle.seek(t.offset))){let r=yield this._reader.readMessage(fu.MessageHeader.DictionaryBatch);if(r==null?void 0:r.isDictionaryBatch()){let n=r.header(),o=yield this._reader.readMessageBody(r.bodyLength),l=this._loadDictionaryBatch(n,o);this.dictionaries.set(n.id,l)}}})}_readFooter(){return Se.__awaiter(this,void 0,void 0,function*(){let{_handle:e}=this;e._pending&&(yield e._pending);let t=e.size-Nt.magicAndPadding,r=yield e.readInt32(t),n=yield e.readAt(t-r,r);return Yv.Footer.decode(n)})}_readNextMessageAndValidate(e){return Se.__awaiter(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex<this.numRecordBatches){let t=this._footer.getRecordBatch(this._recordBatchIndex);if(t&&(yield this._handle.seek(t.offset)))return yield this._reader.readMessage(e)}return null})}},Zv=class extends Gs{constructor(e,t){super(e,t)}_loadVectors(e,t,r){return new Jv.JSONVectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(r)}};function Xv(i,e){return e&&typeof e.autoDestroy=="boolean"?e.autoDestroy:i.autoDestroy}function*Qv(i){let e=gi.from(i);try{if(!e.open({autoDestroy:!1}).closed)do yield e;while(!e.reset().open().closed)}finally{e.cancel()}}function e0(i){return Se.__asyncGenerator(this,arguments,function*(){let t=yield Se.__await(gi.from(i));try{if(!(yield Se.__await(t.open({autoDestroy:!1}))).closed)do yield yield Se.__await(t);while(!(yield Se.__await(t.reset().open())).closed)}finally{yield Se.__await(t.cancel())}})}function tV(i){return new Jn(new Zv(i))}function iV(i){let e=i.peek(Nt.magicLength+7&~7);return e&&e.byteLength>=4?Nt.checkForMagicArrowString(e)?new hu(new qd(i.read())):new Jn(new Gs(i)):new Jn(new Gs(function*(){}()))}function rV(i){return Se.__awaiter(this,void 0,void 0,function*(){let e=yield i.peek(Nt.magicLength+7&~7);return e&&e.byteLength>=4?Nt.checkForMagicArrowString(e)?new hu(new qd(yield i.read())):new Kn(new Js(i)):new Kn(new Js(function(){return Se.__asyncGenerator(this,arguments,function*(){})}()))})}function nV(i){return Se.__awaiter(this,void 0,void 0,function*(){let{size:e}=yield i.stat(),t=new $s.AsyncRandomAccessFile(i,e);return e>=Nt.magicX2AndPadding&&Nt.checkForMagicArrowString(yield t.readAt(0,Nt.magicLength+7&~7))?new Ld(new Kv(t)):new Kn(new Js(t))})}});var r0=C(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.toDOMStream=void 0;var pu=ot(),t0=$e(),i0=at();function sV(i,e){if(i0.isAsyncIterable(i))return aV(i,e);if(i0.isIterable(i))return oV(i,e);throw new Error("toDOMStream() must be called with an Iterable or AsyncIterable")}yu.toDOMStream=sV;function oV(i,e){let t=null,r=(e==null?void 0:e.type)==="bytes"||!1,n=(e==null?void 0:e.highWaterMark)||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},e),{start(l){o(l,t||(t=i[Symbol.iterator]()))},pull(l){t?o(l,t):l.close()},cancel(){((t==null?void 0:t.return)&&t.return()||!0)&&(t=null)}}),Object.assign({highWaterMark:r?n:void 0},e));function o(l,_){let v,T=null,D=l.desiredSize||null;for(;!(T=_.next(r?D:null)).done;)if(ArrayBuffer.isView(T.value)&&(v=t0.toUint8Array(T.value))&&(D!=null&&r&&(D=D-v.byteLength+1),T.value=v),l.enqueue(T.value),D!=null&&--D<=0)return;l.close()}}function aV(i,e){let t=null,r=(e==null?void 0:e.type)==="bytes"||!1,n=(e==null?void 0:e.highWaterMark)||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},e),{start(l){return pu.__awaiter(this,void 0,void 0,function*(){yield o(l,t||(t=i[Symbol.asyncIterator]()))})},pull(l){return pu.__awaiter(this,void 0,void 0,function*(){t?yield o(l,t):l.close()})},cancel(){return pu.__awaiter(this,void 0,void 0,function*(){((t==null?void 0:t.return)&&(yield t.return())||!0)&&(t=null)})}}),Object.assign({highWaterMark:r?n:void 0},e));function o(l,_){return pu.__awaiter(this,void 0,void 0,function*(){let v,T=null,D=l.desiredSize||null;for(;!(T=yield _.next(r?D:null)).done;)if(ArrayBuffer.isView(T.value)&&(v=t0.toUint8Array(T.value))&&(D!=null&&r&&(D=D-v.byteLength+1),T.value=v),l.enqueue(T.value),D!=null&&--D<=0)return;l.close()})}}});var o0=C(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.BuilderTransform=Zn.builderThroughDOMStream=void 0;var uV=ot(),cV=ya();function lV(i){return new zd(i)}Zn.builderThroughDOMStream=lV;var zd=class{constructor(e){this._numChunks=0,this._finished=!1,this._bufferedSize=0;let{["readableStrategy"]:t,["writableStrategy"]:r,["queueingStrategy"]:n="count"}=e,o=uV.__rest(e,["readableStrategy","writableStrategy","queueingStrategy"]);this._controller=null,this._builder=cV.Builder.new(o),this._getSize=n!=="bytes"?n0:s0;let{["highWaterMark"]:l=n==="bytes"?Math.pow(2,14):1e3}=Object.assign({},t),{["highWaterMark"]:_=n==="bytes"?Math.pow(2,14):1e3}=Object.assign({},r);this.readable=new ReadableStream({cancel:()=>{this._builder.clear()},pull:v=>{this._maybeFlush(this._builder,this._controller=v)},start:v=>{this._maybeFlush(this._builder,this._controller=v)}},{highWaterMark:l,size:n!=="bytes"?n0:s0}),this.writable=new WritableStream({abort:()=>{this._builder.clear()},write:()=>{this._maybeFlush(this._builder,this._controller)},close:()=>{this._maybeFlush(this._builder.finish(),this._controller)}},{highWaterMark:_,size:v=>this._writeValueAndReturnChunkSize(v)})}_writeValueAndReturnChunkSize(e){let t=this._bufferedSize;return this._bufferedSize=this._getSize(this._builder.append(e)),this._bufferedSize-t}_maybeFlush(e,t){t!==null&&(this._bufferedSize>=t.desiredSize&&++this._numChunks&&this._enqueue(t,e.toVector()),e.finished&&((e.length>0||this._numChunks===0)&&++this._numChunks&&this._enqueue(t,e.toVector()),!this._finished&&(this._finished=!0)&&this._enqueue(t,null)))}_enqueue(e,t){this._bufferedSize=0,this._controller=null,t===null?e.close():e.enqueue(t)}};Zn.BuilderTransform=zd;var n0=i=>i.length,s0=i=>i.byteLength});var a0=C(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.recordBatchReaderThroughDOMStream=void 0;var Ks=ot(),dV=ar(),fV=Ys();function hV(i,e){let t=new dV.AsyncByteQueue,r=null,n=new ReadableStream({cancel(){return Ks.__awaiter(this,void 0,void 0,function*(){yield t.close()})},start(_){return Ks.__awaiter(this,void 0,void 0,function*(){yield l(_,r||(r=yield o()))})},pull(_){return Ks.__awaiter(this,void 0,void 0,function*(){r?yield l(_,r):_.close()})}});return{writable:new WritableStream(t,Object.assign({highWaterMark:Math.pow(2,14)},i)),readable:n};function o(){return Ks.__awaiter(this,void 0,void 0,function*(){return yield(yield fV.RecordBatchReader.from(t)).open(e)})}function l(_,v){return Ks.__awaiter(this,void 0,void 0,function*(){let T=_.desiredSize,D=null;for(;!(D=yield v.next()).done;)if(_.enqueue(D.value),T!=null&&--T<=0)return;_.close()})}}_u.recordBatchReaderThroughDOMStream=hV});var u0=C(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.recordBatchWriterThroughDOMStream=void 0;var mu=ot(),pV=ar();function yV(i,e){let t=new this(i),r=new pV.AsyncByteStream(t),n=new ReadableStream({type:"bytes",cancel(){return mu.__awaiter(this,void 0,void 0,function*(){yield r.cancel()})},pull(l){return mu.__awaiter(this,void 0,void 0,function*(){yield o(l)})},start(l){return mu.__awaiter(this,void 0,void 0,function*(){yield o(l)})}},Object.assign({highWaterMark:Math.pow(2,14)},e));return{writable:new WritableStream(t,i),readable:n};function o(l){return mu.__awaiter(this,void 0,void 0,function*(){let _=null,v=l.desiredSize;for(;_=yield r.read(v||null);)if(l.enqueue(_),v!=null&&(v-=_.byteLength)<=0)return;l.close()})}}bu.recordBatchWriterThroughDOMStream=yV});var Jd=C(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.custom=fe.or=fe.and=fe.col=fe.lit=fe.CustomPredicate=fe.Not=fe.GTeq=fe.LTeq=fe.Equals=fe.Or=fe.And=fe.CombinationPredicate=fe.ComparisonPredicate=fe.Predicate=fe.Col=fe.Literal=fe.Value=void 0;var _V=$a(),wr=class{eq(e){return e instanceof wr||(e=new Ri(e)),new Hd(this,e)}le(e){return e instanceof wr||(e=new Ri(e)),new Yd(this,e)}ge(e){return e instanceof wr||(e=new Ri(e)),new $d(this,e)}lt(e){return new ts(this.ge(e))}gt(e){return new ts(this.le(e))}ne(e){return new ts(this.eq(e))}};fe.Value=wr;var Ri=class extends wr{constructor(e){super();this.v=e}};fe.Literal=Ri;var Wd=class extends wr{constructor(e){super();this.name=e}bind(e){if(!this.colidx){this.colidx=-1;let r=e.schema.fields;for(let n=-1;++n<r.length;)if(r[n].name===this.name){this.colidx=n;break}if(this.colidx<0)throw new Error(`Failed to bind Col "${this.name}"`)}let t=this.vector=e.getChildAt(this.colidx);return r=>t.get(r)}};fe.Col=Wd;var Xn=class{and(...e){return new Qn(this,...e)}or(...e){return new es(this,...e)}not(){return new ts(this)}};fe.Predicate=Xn;var Zs=class extends Xn{constructor(e,t){super();this.left=e,this.right=t}bind(e){return this.left instanceof Ri?this.right instanceof Ri?this._bindLitLit(e,this.left,this.right):this._bindLitCol(e,this.left,this.right):this.right instanceof Ri?this._bindColLit(e,this.left,this.right):this._bindColCol(e,this.left,this.right)}};fe.ComparisonPredicate=Zs;var Xs=class extends Xn{constructor(...e){super();this.children=e}};fe.CombinationPredicate=Xs;Xs.prototype.children=Object.freeze([]);var Qn=class extends Xs{constructor(...e){e=e.reduce((t,r)=>t.concat(r instanceof Qn?r.children:r),[]);super(...e)}bind(e){let t=this.children.map(r=>r.bind(e));return(r,n)=>t.every(o=>o(r,n))}};fe.And=Qn;var es=class extends Xs{constructor(...e){e=e.reduce((t,r)=>t.concat(r instanceof es?r.children:r),[]);super(...e)}bind(e){let t=this.children.map(r=>r.bind(e));return(r,n)=>t.some(o=>o(r,n))}};fe.Or=es;var Hd=class extends Zs{_bindLitLit(e,t,r){let n=t.v==r.v;return()=>n}_bindColCol(e,t,r){let n=t.bind(e),o=r.bind(e);return(l,_)=>n(l,_)==o(l,_)}_bindColLit(e,t,r){let n=t.bind(e);if(t.vector instanceof _V.DictionaryVector){let o,l=t.vector;return l.dictionary!==this.lastDictionary?(o=l.reverseLookup(r.v),this.lastDictionary=l.dictionary,this.lastKey=o):o=this.lastKey,o===-1?()=>!1:_=>l.getKey(_)===o}else return(o,l)=>n(o,l)==r.v}_bindLitCol(e,t,r){return this._bindColLit(e,r,t)}};fe.Equals=Hd;var Yd=class extends Zs{_bindLitLit(e,t,r){let n=t.v<=r.v;return()=>n}_bindColCol(e,t,r){let n=t.bind(e),o=r.bind(e);return(l,_)=>n(l,_)<=o(l,_)}_bindColLit(e,t,r){let n=t.bind(e);return(o,l)=>n(o,l)<=r.v}_bindLitCol(e,t,r){let n=r.bind(e);return(o,l)=>t.v<=n(o,l)}};fe.LTeq=Yd;var $d=class extends Zs{_bindLitLit(e,t,r){let n=t.v>=r.v;return()=>n}_bindColCol(e,t,r){let n=t.bind(e),o=r.bind(e);return(l,_)=>n(l,_)>=o(l,_)}_bindColLit(e,t,r){let n=t.bind(e);return(o,l)=>n(o,l)>=r.v}_bindLitCol(e,t,r){let n=r.bind(e);return(o,l)=>t.v>=n(o,l)}};fe.GTeq=$d;var ts=class extends Xn{constructor(e){super();this.child=e}bind(e){let t=this.child.bind(e);return(r,n)=>!t(r,n)}};fe.Not=ts;var Gd=class extends Xn{constructor(e,t){super();this.next=e,this.bind_=t}bind(e){return this.bind_(e),this.next}};fe.CustomPredicate=Gd;function mV(i){return new Ri(i)}fe.lit=mV;function bV(i){return new Wd(i)}fe.col=bV;function gV(...i){return new Qn(...i)}fe.and=gV;function vV(...i){return new es(...i)}fe.or=vV;function jV(i,e){return new Gd(i,e)}fe.custom=jV});var p0=C(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.FilteredDataFrame=Br.CountByResult=Br.DataFrame=void 0;var c0=Rs(),l0=Za(),Kd=Xe(),d0=Jd(),wV=Vi(),f0=be(),Zd=class extends c0.Table{filter(e){return new Qs(this.chunks,e)}scan(e,t){let r=this.chunks,n=r.length;for(let o=-1;++o<n;){let l=r[o];t&&t(l);for(let _=-1,v=l.length;++_<v;)e(_,l)}}scanReverse(e,t){let r=this.chunks,n=r.length;for(let o=n;--o>=0;){let l=r[o];t&&t(l);for(let _=l.length;--_>=0;)e(_,l)}}countBy(e){let t=this.chunks,r=t.length,n=typeof e=="string"?new d0.Col(e):e;n.bind(t[r-1]);let o=n.vector;if(!f0.DataType.isDictionary(o.type))throw new Error("countBy currently only supports dictionary-encoded columns");let l=Math.ceil(Math.log(o.length)/Math.log(256)),_=l==4?Uint32Array:l>=2?Uint16Array:Uint8Array,v=new _(o.dictionary.length);for(let T=-1;++T<r;){let D=t[T];n.bind(D);let N=n.vector.indices;for(let z=-1,K=D.length;++z<K;){let Me=N.get(z);Me!==null&&v[Me]++}}return new gu(o.dictionary,l0.IntVector.from(v))}};Br.DataFrame=Zd;var gu=class extends c0.Table{constructor(e,t){let r=new Kd.Schema([new Kd.Field("values",e.type),new Kd.Field("counts",t.type)]);super(new wV.RecordBatch(r,t.length,[e,t]))}toJSON(){let e=this.getColumnAt(0),t=this.getColumnAt(1),r={};for(let n=-1;++n<this.length;)r[e.get(n)]=t.get(n);return r}};Br.CountByResult=gu;var h0=class{constructor(e,t){this.batches=e,this.predicate=t,this.batchIndex=0,this.index=0,this.batch=this.batches[this.batchIndex],this.predicateFunc=this.predicate.bind(this.batch)}next(){for(;this.batchIndex<this.batches.length;){for(;this.index<this.batch.length;){if(this.predicateFunc(this.index,this.batch))return{value:this.batch.get(this.index++)};this.index++}++this.batchIndex<this.batches.length&&(this.index=0,this.batch=this.batches[this.batchIndex],this.predicateFunc=this.predicate.bind(this.batch))}return{done:!0,value:null}}[Symbol.iterator](){return this}},Qs=class extends Zd{constructor(e,t){super(e);this._predicate=t}scan(e,t){let r=this._chunks,n=r.length;for(let o=-1;++o<n;){let l=r[o],_=this._predicate.bind(l),v=!1;for(let T=-1,D=l.length;++T<D;)_(T,l)&&(t&&!v&&(t(l),v=!0),e(T,l))}}scanReverse(e,t){let r=this._chunks,n=r.length;for(let o=n;--o>=0;){let l=r[o],_=this._predicate.bind(l),v=!1;for(let T=l.length;--T>=0;)_(T,l)&&(t&&!v&&(t(l),v=!0),e(T,l))}}count(){let e=0,t=this._chunks,r=t.length;for(let n=-1;++n<r;){let o=t[n],l=this._predicate.bind(o);for(let _=-1,v=o.length;++_<v;)l(_,o)&&++e}return e}[Symbol.iterator](){return new h0(this._chunks,this._predicate)}filter(e){return new Qs(this._chunks,this._predicate.and(e))}countBy(e){let t=this._chunks,r=t.length,n=typeof e=="string"?new d0.Col(e):e;n.bind(t[r-1]);let o=n.vector;if(!f0.DataType.isDictionary(o.type))throw new Error("countBy currently only supports dictionary-encoded columns");let l=Math.ceil(Math.log(o.length)/Math.log(256)),_=l==4?Uint32Array:l>=2?Uint16Array:Uint8Array,v=new _(o.dictionary.length);for(let T=-1;++T<r;){let D=t[T],N=this._predicate.bind(D);n.bind(D);let z=n.vector.indices;for(let K=-1,Me=D.length;++K<Me;){let Ie=z.get(K);Ie!==null&&N(K,D)&&v[Ie]++}}return new gu(o.dictionary,l0.IntVector.from(v))}};Br.FilteredDataFrame=Qs});var m0=C(g=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});g.isTypedArray=g.util=g.predicate=g.CountByResult=g.FilteredDataFrame=g.DataFrame=g.RecordBatch=g.Message=g.JSONMessageReader=g.AsyncMessageReader=g.MessageReader=g.RecordBatchJSONWriter=g.RecordBatchStreamWriter=g.RecordBatchFileWriter=g.RecordBatchWriter=g.AsyncRecordBatchStreamReader=g.AsyncRecordBatchFileReader=g.RecordBatchStreamReader=g.RecordBatchFileReader=g.RecordBatchReader=g.AsyncByteQueue=g.AsyncByteStream=g.ByteStream=g.Utf8Builder=g.SparseUnionBuilder=g.DenseUnionBuilder=g.UnionBuilder=g.TimeNanosecondBuilder=g.TimeMicrosecondBuilder=g.TimeMillisecondBuilder=g.TimeSecondBuilder=g.TimeBuilder=g.TimestampNanosecondBuilder=g.TimestampMicrosecondBuilder=g.TimestampMillisecondBuilder=g.TimestampSecondBuilder=g.TimestampBuilder=g.StructBuilder=g.NullBuilder=g.MapBuilder=g.ListBuilder=g.Uint64Builder=g.Uint32Builder=g.Uint16Builder=g.Uint8Builder=g.Int64Builder=g.Int32Builder=g.Int16Builder=g.Int8Builder=g.IntBuilder=g.IntervalYearMonthBuilder=g.IntervalDayTimeBuilder=g.IntervalBuilder=g.Float64Builder=g.Float32Builder=g.Float16Builder=g.FloatBuilder=g.FixedSizeListBuilder=g.FixedSizeBinaryBuilder=g.DictionaryBuilder=g.DecimalBuilder=g.DateMillisecondBuilder=g.DateDayBuilder=g.DateBuilder=g.BoolBuilder=g.BinaryBuilder=g.Builder=g.Utf8Vector=g.SparseUnionVector=g.DenseUnionVector=g.UnionVector=g.TimeNanosecondVector=g.TimeMicrosecondVector=g.TimeMillisecondVector=g.TimeSecondVector=g.TimeVector=g.TimestampNanosecondVector=g.TimestampMicrosecondVector=g.TimestampMillisecondVector=g.TimestampSecondVector=g.TimestampVector=g.StructVector=g.NullVector=g.MapVector=g.ListVector=g.Uint64Vector=g.Uint32Vector=g.Uint16Vector=g.Uint8Vector=g.Int64Vector=g.Int32Vector=g.Int16Vector=g.Int8Vector=g.IntVector=g.IntervalYearMonthVector=g.IntervalDayTimeVector=g.IntervalVector=g.Float64Vector=g.Float32Vector=g.Float16Vector=g.FloatVector=g.FixedSizeListVector=g.FixedSizeBinaryVector=g.DictionaryVector=g.DecimalVector=g.DateMillisecondVector=g.DateDayVector=g.DateVector=g.Chunked=g.BoolVector=g.BinaryVector=g.BaseVector=g.Vector=g.Field=g.Schema=g.Visitor=g.Column=g.Table=g.Map_=g.FixedSizeList=g.IntervalYearMonth=g.IntervalDayTime=g.Interval=g.Dictionary=g.SparseUnion=g.DenseUnion=g.Union=g.Struct=g.List=g.Decimal=g.TimeNanosecond=g.TimeMicrosecond=g.TimeMillisecond=g.TimeSecond=g.Time=g.TimestampNanosecond=g.TimestampMicrosecond=g.TimestampMillisecond=g.TimestampSecond=g.Timestamp=g.DateMillisecond=g.DateDay=g.Date_=g.FixedSizeBinary=g.Binary=g.Utf8=g.Float64=g.Float32=g.Float16=g.Float=g.Uint64=g.Uint32=g.Uint16=g.Uint8=g.Int64=g.Int32=g.Int16=g.Int8=g.Int=g.Bool=g.Null=g.DataType=g.Data=g.BufferType=g.Type=g.MessageHeader=g.MetadataVersion=g.IntervalUnit=g.UnionMode=g.Precision=g.TimeUnit=g.DateUnit=void 0;var is=Gi();Object.defineProperty(g,"DateUnit",{enumerable:!0,get:function(){return is.DateUnit}});Object.defineProperty(g,"TimeUnit",{enumerable:!0,get:function(){return is.TimeUnit}});Object.defineProperty(g,"Precision",{enumerable:!0,get:function(){return is.Precision}});Object.defineProperty(g,"UnionMode",{enumerable:!0,get:function(){return is.UnionMode}});Object.defineProperty(g,"IntervalUnit",{enumerable:!0,get:function(){return is.IntervalUnit}});Object.defineProperty(g,"MetadataVersion",{enumerable:!0,get:function(){return is.MetadataVersion}});var BV=Oo();Object.defineProperty(g,"MessageHeader",{enumerable:!0,get:function(){return BV.MessageHeader}});var y0=Be();Object.defineProperty(g,"Type",{enumerable:!0,get:function(){return y0.Type}});Object.defineProperty(g,"BufferType",{enumerable:!0,get:function(){return y0.BufferType}});var IV=Yt();Object.defineProperty(g,"Data",{enumerable:!0,get:function(){return IV.Data}});var oe=be();Object.defineProperty(g,"DataType",{enumerable:!0,get:function(){return oe.DataType}});Object.defineProperty(g,"Null",{enumerable:!0,get:function(){return oe.Null}});Object.defineProperty(g,"Bool",{enumerable:!0,get:function(){return oe.Bool}});Object.defineProperty(g,"Int",{enumerable:!0,get:function(){return oe.Int}});Object.defineProperty(g,"Int8",{enumerable:!0,get:function(){return oe.Int8}});Object.defineProperty(g,"Int16",{enumerable:!0,get:function(){return oe.Int16}});Object.defineProperty(g,"Int32",{enumerable:!0,get:function(){return oe.Int32}});Object.defineProperty(g,"Int64",{enumerable:!0,get:function(){return oe.Int64}});Object.defineProperty(g,"Uint8",{enumerable:!0,get:function(){return oe.Uint8}});Object.defineProperty(g,"Uint16",{enumerable:!0,get:function(){return oe.Uint16}});Object.defineProperty(g,"Uint32",{enumerable:!0,get:function(){return oe.Uint32}});Object.defineProperty(g,"Uint64",{enumerable:!0,get:function(){return oe.Uint64}});Object.defineProperty(g,"Float",{enumerable:!0,get:function(){return oe.Float}});Object.defineProperty(g,"Float16",{enumerable:!0,get:function(){return oe.Float16}});Object.defineProperty(g,"Float32",{enumerable:!0,get:function(){return oe.Float32}});Object.defineProperty(g,"Float64",{enumerable:!0,get:function(){return oe.Float64}});Object.defineProperty(g,"Utf8",{enumerable:!0,get:function(){return oe.Utf8}});Object.defineProperty(g,"Binary",{enumerable:!0,get:function(){return oe.Binary}});Object.defineProperty(g,"FixedSizeBinary",{enumerable:!0,get:function(){return oe.FixedSizeBinary}});Object.defineProperty(g,"Date_",{enumerable:!0,get:function(){return oe.Date_}});Object.defineProperty(g,"DateDay",{enumerable:!0,get:function(){return oe.DateDay}});Object.defineProperty(g,"DateMillisecond",{enumerable:!0,get:function(){return oe.DateMillisecond}});Object.defineProperty(g,"Timestamp",{enumerable:!0,get:function(){return oe.Timestamp}});Object.defineProperty(g,"TimestampSecond",{enumerable:!0,get:function(){return oe.TimestampSecond}});Object.defineProperty(g,"TimestampMillisecond",{enumerable:!0,get:function(){return oe.TimestampMillisecond}});Object.defineProperty(g,"TimestampMicrosecond",{enumerable:!0,get:function(){return oe.TimestampMicrosecond}});Object.defineProperty(g,"TimestampNanosecond",{enumerable:!0,get:function(){return oe.TimestampNanosecond}});Object.defineProperty(g,"Time",{enumerable:!0,get:function(){return oe.Time}});Object.defineProperty(g,"TimeSecond",{enumerable:!0,get:function(){return oe.TimeSecond}});Object.defineProperty(g,"TimeMillisecond",{enumerable:!0,get:function(){return oe.TimeMillisecond}});Object.defineProperty(g,"TimeMicrosecond",{enumerable:!0,get:function(){return oe.TimeMicrosecond}});Object.defineProperty(g,"TimeNanosecond",{enumerable:!0,get:function(){return oe.TimeNanosecond}});Object.defineProperty(g,"Decimal",{enumerable:!0,get:function(){return oe.Decimal}});Object.defineProperty(g,"List",{enumerable:!0,get:function(){return oe.List}});Object.defineProperty(g,"Struct",{enumerable:!0,get:function(){return oe.Struct}});Object.defineProperty(g,"Union",{enumerable:!0,get:function(){return oe.Union}});Object.defineProperty(g,"DenseUnion",{enumerable:!0,get:function(){return oe.DenseUnion}});Object.defineProperty(g,"SparseUnion",{enumerable:!0,get:function(){return oe.SparseUnion}});Object.defineProperty(g,"Dictionary",{enumerable:!0,get:function(){return oe.Dictionary}});Object.defineProperty(g,"Interval",{enumerable:!0,get:function(){return oe.Interval}});Object.defineProperty(g,"IntervalDayTime",{enumerable:!0,get:function(){return oe.IntervalDayTime}});Object.defineProperty(g,"IntervalYearMonth",{enumerable:!0,get:function(){return oe.IntervalYearMonth}});Object.defineProperty(g,"FixedSizeList",{enumerable:!0,get:function(){return oe.FixedSizeList}});Object.defineProperty(g,"Map_",{enumerable:!0,get:function(){return oe.Map_}});var TV=Rs();Object.defineProperty(g,"Table",{enumerable:!0,get:function(){return TV.Table}});var SV=Un();Object.defineProperty(g,"Column",{enumerable:!0,get:function(){return SV.Column}});var AV=rt();Object.defineProperty(g,"Visitor",{enumerable:!0,get:function(){return AV.Visitor}});var _0=Xe();Object.defineProperty(g,"Schema",{enumerable:!0,get:function(){return _0.Schema}});Object.defineProperty(g,"Field",{enumerable:!0,get:function(){return _0.Field}});var re=yi();Object.defineProperty(g,"Vector",{enumerable:!0,get:function(){return re.Vector}});Object.defineProperty(g,"BaseVector",{enumerable:!0,get:function(){return re.BaseVector}});Object.defineProperty(g,"BinaryVector",{enumerable:!0,get:function(){return re.BinaryVector}});Object.defineProperty(g,"BoolVector",{enumerable:!0,get:function(){return re.BoolVector}});Object.defineProperty(g,"Chunked",{enumerable:!0,get:function(){return re.Chunked}});Object.defineProperty(g,"DateVector",{enumerable:!0,get:function(){return re.DateVector}});Object.defineProperty(g,"DateDayVector",{enumerable:!0,get:function(){return re.DateDayVector}});Object.defineProperty(g,"DateMillisecondVector",{enumerable:!0,get:function(){return re.DateMillisecondVector}});Object.defineProperty(g,"DecimalVector",{enumerable:!0,get:function(){return re.DecimalVector}});Object.defineProperty(g,"DictionaryVector",{enumerable:!0,get:function(){return re.DictionaryVector}});Object.defineProperty(g,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return re.FixedSizeBinaryVector}});Object.defineProperty(g,"FixedSizeListVector",{enumerable:!0,get:function(){return re.FixedSizeListVector}});Object.defineProperty(g,"FloatVector",{enumerable:!0,get:function(){return re.FloatVector}});Object.defineProperty(g,"Float16Vector",{enumerable:!0,get:function(){return re.Float16Vector}});Object.defineProperty(g,"Float32Vector",{enumerable:!0,get:function(){return re.Float32Vector}});Object.defineProperty(g,"Float64Vector",{enumerable:!0,get:function(){return re.Float64Vector}});Object.defineProperty(g,"IntervalVector",{enumerable:!0,get:function(){return re.IntervalVector}});Object.defineProperty(g,"IntervalDayTimeVector",{enumerable:!0,get:function(){return re.IntervalDayTimeVector}});Object.defineProperty(g,"IntervalYearMonthVector",{enumerable:!0,get:function(){return re.IntervalYearMonthVector}});Object.defineProperty(g,"IntVector",{enumerable:!0,get:function(){return re.IntVector}});Object.defineProperty(g,"Int8Vector",{enumerable:!0,get:function(){return re.Int8Vector}});Object.defineProperty(g,"Int16Vector",{enumerable:!0,get:function(){return re.Int16Vector}});Object.defineProperty(g,"Int32Vector",{enumerable:!0,get:function(){return re.Int32Vector}});Object.defineProperty(g,"Int64Vector",{enumerable:!0,get:function(){return re.Int64Vector}});Object.defineProperty(g,"Uint8Vector",{enumerable:!0,get:function(){return re.Uint8Vector}});Object.defineProperty(g,"Uint16Vector",{enumerable:!0,get:function(){return re.Uint16Vector}});Object.defineProperty(g,"Uint32Vector",{enumerable:!0,get:function(){return re.Uint32Vector}});Object.defineProperty(g,"Uint64Vector",{enumerable:!0,get:function(){return re.Uint64Vector}});Object.defineProperty(g,"ListVector",{enumerable:!0,get:function(){return re.ListVector}});Object.defineProperty(g,"MapVector",{enumerable:!0,get:function(){return re.MapVector}});Object.defineProperty(g,"NullVector",{enumerable:!0,get:function(){return re.NullVector}});Object.defineProperty(g,"StructVector",{enumerable:!0,get:function(){return re.StructVector}});Object.defineProperty(g,"TimestampVector",{enumerable:!0,get:function(){return re.TimestampVector}});Object.defineProperty(g,"TimestampSecondVector",{enumerable:!0,get:function(){return re.TimestampSecondVector}});Object.defineProperty(g,"TimestampMillisecondVector",{enumerable:!0,get:function(){return re.TimestampMillisecondVector}});Object.defineProperty(g,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return re.TimestampMicrosecondVector}});Object.defineProperty(g,"TimestampNanosecondVector",{enumerable:!0,get:function(){return re.TimestampNanosecondVector}});Object.defineProperty(g,"TimeVector",{enumerable:!0,get:function(){return re.TimeVector}});Object.defineProperty(g,"TimeSecondVector",{enumerable:!0,get:function(){return re.TimeSecondVector}});Object.defineProperty(g,"TimeMillisecondVector",{enumerable:!0,get:function(){return re.TimeMillisecondVector}});Object.defineProperty(g,"TimeMicrosecondVector",{enumerable:!0,get:function(){return re.TimeMicrosecondVector}});Object.defineProperty(g,"TimeNanosecondVector",{enumerable:!0,get:function(){return re.TimeNanosecondVector}});Object.defineProperty(g,"UnionVector",{enumerable:!0,get:function(){return re.UnionVector}});Object.defineProperty(g,"DenseUnionVector",{enumerable:!0,get:function(){return re.DenseUnionVector}});Object.defineProperty(g,"SparseUnionVector",{enumerable:!0,get:function(){return re.SparseUnionVector}});Object.defineProperty(g,"Utf8Vector",{enumerable:!0,get:function(){return re.Utf8Vector}});var ae=ya();Object.defineProperty(g,"Builder",{enumerable:!0,get:function(){return ae.Builder}});Object.defineProperty(g,"BinaryBuilder",{enumerable:!0,get:function(){return ae.BinaryBuilder}});Object.defineProperty(g,"BoolBuilder",{enumerable:!0,get:function(){return ae.BoolBuilder}});Object.defineProperty(g,"DateBuilder",{enumerable:!0,get:function(){return ae.DateBuilder}});Object.defineProperty(g,"DateDayBuilder",{enumerable:!0,get:function(){return ae.DateDayBuilder}});Object.defineProperty(g,"DateMillisecondBuilder",{enumerable:!0,get:function(){return ae.DateMillisecondBuilder}});Object.defineProperty(g,"DecimalBuilder",{enumerable:!0,get:function(){return ae.DecimalBuilder}});Object.defineProperty(g,"DictionaryBuilder",{enumerable:!0,get:function(){return ae.DictionaryBuilder}});Object.defineProperty(g,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return ae.FixedSizeBinaryBuilder}});Object.defineProperty(g,"FixedSizeListBuilder",{enumerable:!0,get:function(){return ae.FixedSizeListBuilder}});Object.defineProperty(g,"FloatBuilder",{enumerable:!0,get:function(){return ae.FloatBuilder}});Object.defineProperty(g,"Float16Builder",{enumerable:!0,get:function(){return ae.Float16Builder}});Object.defineProperty(g,"Float32Builder",{enumerable:!0,get:function(){return ae.Float32Builder}});Object.defineProperty(g,"Float64Builder",{enumerable:!0,get:function(){return ae.Float64Builder}});Object.defineProperty(g,"IntervalBuilder",{enumerable:!0,get:function(){return ae.IntervalBuilder}});Object.defineProperty(g,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return ae.IntervalDayTimeBuilder}});Object.defineProperty(g,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return ae.IntervalYearMonthBuilder}});Object.defineProperty(g,"IntBuilder",{enumerable:!0,get:function(){return ae.IntBuilder}});Object.defineProperty(g,"Int8Builder",{enumerable:!0,get:function(){return ae.Int8Builder}});Object.defineProperty(g,"Int16Builder",{enumerable:!0,get:function(){return ae.Int16Builder}});Object.defineProperty(g,"Int32Builder",{enumerable:!0,get:function(){return ae.Int32Builder}});Object.defineProperty(g,"Int64Builder",{enumerable:!0,get:function(){return ae.Int64Builder}});Object.defineProperty(g,"Uint8Builder",{enumerable:!0,get:function(){return ae.Uint8Builder}});Object.defineProperty(g,"Uint16Builder",{enumerable:!0,get:function(){return ae.Uint16Builder}});Object.defineProperty(g,"Uint32Builder",{enumerable:!0,get:function(){return ae.Uint32Builder}});Object.defineProperty(g,"Uint64Builder",{enumerable:!0,get:function(){return ae.Uint64Builder}});Object.defineProperty(g,"ListBuilder",{enumerable:!0,get:function(){return ae.ListBuilder}});Object.defineProperty(g,"MapBuilder",{enumerable:!0,get:function(){return ae.MapBuilder}});Object.defineProperty(g,"NullBuilder",{enumerable:!0,get:function(){return ae.NullBuilder}});Object.defineProperty(g,"StructBuilder",{enumerable:!0,get:function(){return ae.StructBuilder}});Object.defineProperty(g,"TimestampBuilder",{enumerable:!0,get:function(){return ae.TimestampBuilder}});Object.defineProperty(g,"TimestampSecondBuilder",{enumerable:!0,get:function(){return ae.TimestampSecondBuilder}});Object.defineProperty(g,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return ae.TimestampMillisecondBuilder}});Object.defineProperty(g,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return ae.TimestampMicrosecondBuilder}});Object.defineProperty(g,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return ae.TimestampNanosecondBuilder}});Object.defineProperty(g,"TimeBuilder",{enumerable:!0,get:function(){return ae.TimeBuilder}});Object.defineProperty(g,"TimeSecondBuilder",{enumerable:!0,get:function(){return ae.TimeSecondBuilder}});Object.defineProperty(g,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return ae.TimeMillisecondBuilder}});Object.defineProperty(g,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return ae.TimeMicrosecondBuilder}});Object.defineProperty(g,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return ae.TimeNanosecondBuilder}});Object.defineProperty(g,"UnionBuilder",{enumerable:!0,get:function(){return ae.UnionBuilder}});Object.defineProperty(g,"DenseUnionBuilder",{enumerable:!0,get:function(){return ae.DenseUnionBuilder}});Object.defineProperty(g,"SparseUnionBuilder",{enumerable:!0,get:function(){return ae.SparseUnionBuilder}});Object.defineProperty(g,"Utf8Builder",{enumerable:!0,get:function(){return ae.Utf8Builder}});var Xd=ar();Object.defineProperty(g,"ByteStream",{enumerable:!0,get:function(){return Xd.ByteStream}});Object.defineProperty(g,"AsyncByteStream",{enumerable:!0,get:function(){return Xd.AsyncByteStream}});Object.defineProperty(g,"AsyncByteQueue",{enumerable:!0,get:function(){return Xd.AsyncByteQueue}});var eo=Ys();Object.defineProperty(g,"RecordBatchReader",{enumerable:!0,get:function(){return eo.RecordBatchReader}});Object.defineProperty(g,"RecordBatchFileReader",{enumerable:!0,get:function(){return eo.RecordBatchFileReader}});Object.defineProperty(g,"RecordBatchStreamReader",{enumerable:!0,get:function(){return eo.RecordBatchStreamReader}});Object.defineProperty(g,"AsyncRecordBatchFileReader",{enumerable:!0,get:function(){return eo.AsyncRecordBatchFileReader}});Object.defineProperty(g,"AsyncRecordBatchStreamReader",{enumerable:!0,get:function(){return eo.AsyncRecordBatchStreamReader}});var vu=La();Object.defineProperty(g,"RecordBatchWriter",{enumerable:!0,get:function(){return vu.RecordBatchWriter}});Object.defineProperty(g,"RecordBatchFileWriter",{enumerable:!0,get:function(){return vu.RecordBatchFileWriter}});Object.defineProperty(g,"RecordBatchStreamWriter",{enumerable:!0,get:function(){return vu.RecordBatchStreamWriter}});Object.defineProperty(g,"RecordBatchJSONWriter",{enumerable:!0,get:function(){return vu.RecordBatchJSONWriter}});var Qd=Oa();Object.defineProperty(g,"MessageReader",{enumerable:!0,get:function(){return Qd.MessageReader}});Object.defineProperty(g,"AsyncMessageReader",{enumerable:!0,get:function(){return Qd.AsyncMessageReader}});Object.defineProperty(g,"JSONMessageReader",{enumerable:!0,get:function(){return Qd.JSONMessageReader}});var DV=Hr();Object.defineProperty(g,"Message",{enumerable:!0,get:function(){return DV.Message}});var OV=Vi();Object.defineProperty(g,"RecordBatch",{enumerable:!0,get:function(){return OV.RecordBatch}});var ef=p0();Object.defineProperty(g,"DataFrame",{enumerable:!0,get:function(){return ef.DataFrame}});Object.defineProperty(g,"FilteredDataFrame",{enumerable:!0,get:function(){return ef.FilteredDataFrame}});Object.defineProperty(g,"CountByResult",{enumerable:!0,get:function(){return ef.CountByResult}});var FV=js(),MV=ol(),CV=ni(),UV=ms(),VV=$e(),kV=Os(),EV=Jd();g.predicate=EV;var tf=Il();g.util=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},FV),MV),CV),UV),VV),kV),{compareSchemas:tf.compareSchemas,compareFields:tf.compareFields,compareTypes:tf.compareTypes});var RV=qr();Object.defineProperty(g,"isTypedArray",{enumerable:!0,get:function(){return RV.isTypedArray}})});var Bu=C(()=>{});var nf=C(()=>{});var qV={};XS(qV,{registerWorker:()=>A0});var b0=wi(ys(),1),g0=wi(ya(),1),rs=wi(Ys(),1),ns=wi(La(),1),v0=wi(r0(),1),j0=wi(o0(),1),ju=wi(a0(),1),wu=wi(u0(),1),S=wi(m0(),1);b0.default.toDOMStream=v0.toDOMStream;g0.Builder.throughDOM=j0.builderThroughDOMStream;rs.RecordBatchReader.throughDOM=ju.recordBatchReaderThroughDOMStream;rs.RecordBatchFileReader.throughDOM=ju.recordBatchReaderThroughDOMStream;rs.RecordBatchStreamReader.throughDOM=ju.recordBatchReaderThroughDOMStream;ns.RecordBatchWriter.throughDOM=wu.recordBatchWriterThroughDOMStream;ns.RecordBatchFileWriter.throughDOM=wu.recordBatchWriterThroughDOMStream;ns.RecordBatchStreamWriter.throughDOM=wu.recordBatchWriterThroughDOMStream;function to(i,e){switch(e.typeId){case S.Type.Binary:return{name:i,type:"binary"};case S.Type.Bool:return{name:i,type:"bool"};case S.Type.Date:return{name:i,type:"date"};case S.Type.DateDay:return{name:i,type:"date32[d]"};case S.Type.DateMillisecond:return{name:i,type:"date64[ms]"};case S.Type.Decimal:{let t=e;return{name:i,type:"decimal",precision:t.precision,scale:t.scale}}case S.Type.Float:return{name:i,type:"float"};case S.Type.Float16:return{name:i,type:"float16"};case S.Type.Float32:return{name:i,type:"float32"};case S.Type.Float64:return{name:i,type:"float64"};case S.Type.Int:return{name:i,type:"int32"};case S.Type.Int16:return{name:i,type:"int16"};case S.Type.Int32:return{name:i,type:"int32"};case S.Type.Int64:return{name:i,type:"int64"};case S.Type.Uint16:return{name:i,type:"uint16"};case S.Type.Uint32:return{name:i,type:"uint32"};case S.Type.Uint64:return{name:i,type:"uint64"};case S.Type.Uint8:return{name:i,type:"uint8"};case S.Type.IntervalDayTime:return{name:i,type:"interval[dt]"};case S.Type.IntervalYearMonth:return{name:i,type:"interval[m]"};case S.Type.List:{let t=e;return{name:i,type:"list",children:[to(t.valueField.name,t.valueField.type)]}}case S.Type.FixedSizeBinary:return{name:i,type:"fixedsizebinary",byteWidth:e.byteWidth};case S.Type.Null:return{name:i,type:"null"};case S.Type.Utf8:return{name:i,type:"utf8"};case S.Type.Struct:return{name:i,type:"struct",children:e.children.map(r=>to(r.name,r.type))};case S.Type.Time:return{name:i,type:"time[s]"};case S.Type.TimeMicrosecond:return{name:i,type:"time[us]"};case S.Type.TimeMillisecond:return{name:i,type:"time[ms]"};case S.Type.TimeNanosecond:return{name:i,type:"time[ns]"};case S.Type.TimeSecond:return{name:i,type:"time[s]"};case S.Type.Timestamp:return{name:i,type:"timestamp",timezone:e.timezone||void 0};case S.Type.TimestampSecond:return{name:i,type:"timestamp[s]",timezone:e.timezone||void 0};case S.Type.TimestampMicrosecond:return{name:i,type:"timestamp[us]",timezone:e.timezone||void 0};case S.Type.TimestampNanosecond:return{name:i,type:"timestamp[ns]",timezone:e.timezone||void 0};case S.Type.TimestampMillisecond:return{name:i,type:"timestamp[ms]",timezone:e.timezone||void 0}}throw new Error(`unsupported arrow type: ${e.toString()}`)}var rf=class{constructor(){this._bindings=null;this._nextMessageId=0}log(e){this.postMessage({messageId:this._nextMessageId++,requestId:0,type:"LOG",data:e},[])}sendOK(e){this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"OK",data:null},[])}failWith(e,t){let r={name:t.name,message:t.message,stack:t.stack||void 0};this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"ERROR",data:r},[])}async onMessage(e){switch(e.type){case"PING":this.sendOK(e);return;case"INSTANTIATE":this._bindings!=null&&this.failWith(e,new Error("duckdb already initialized"));try{this._bindings=await this.instantiate(e.data[0],e.data[1]),this.sendOK(e)}catch(t){this._bindings=null,this.failWith(e,t)}return;default:break}if(!this._bindings)return this.failWith(e,new Error("duckdb is not initialized"));try{switch(e.type){case"GET_VERSION":this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"VERSION_STRING",data:this._bindings.getVersion()},[]);break;case"GET_FEATURE_FLAGS":this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"FEATURE_FLAGS",data:this._bindings.getFeatureFlags()},[]);break;case"RESET":this._bindings.reset(),this.sendOK(e);break;case"OPEN":this._bindings.open(e.data),this.sendOK(e);break;case"DROP_FILE":this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"SUCCESS",data:this._bindings.dropFile(e.data)},[]);break;case"DROP_FILES":this._bindings.dropFiles(),this.sendOK(e);break;case"FLUSH_FILES":this._bindings.flushFiles(),this.sendOK(e);break;case"CONNECT":{let t=this._bindings.connect();this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"CONNECTION_INFO",data:t.useUnsafe((r,n)=>n)},[]);break}case"DISCONNECT":this._bindings.disconnect(e.data),this.sendOK(e);break;case"CREATE_PREPARED":{let t=this._bindings.createPrepared(e.data[0],e.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"PREPARED_STATEMENT_ID",data:t},[]);break}case"CLOSE_PREPARED":{this._bindings.closePrepared(e.data[0],e.data[1]),this.sendOK(e);break}case"RUN_PREPARED":{let t=this._bindings.runPrepared(e.data[0],e.data[1],e.data[2]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"QUERY_RESULT",data:t},[t.buffer]);break}case"RUN_QUERY":{let t=this._bindings.runQuery(e.data[0],e.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"QUERY_RESULT",data:t},[t.buffer]);break}case"SEND_PREPARED":{let t=this._bindings.sendPrepared(e.data[0],e.data[1],e.data[2]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"QUERY_START",data:t},[t.buffer]);break}case"SEND_QUERY":{let t=this._bindings.sendQuery(e.data[0],e.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"QUERY_START",data:t},[t.buffer]);break}case"FETCH_QUERY_RESULTS":{let t=this._bindings.fetchQueryResults(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"QUERY_RESULT_CHUNK",data:t},[t.buffer]);break}case"GET_TABLE_NAMES":{let t=this._bindings.getTableNames(e.data[0],e.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"TABLE_NAMES",data:t},[]);break}case"GLOB_FILE_INFOS":{let t=this._bindings.globFiles(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"FILE_INFOS",data:t},[]);break}case"REGISTER_FILE_URL":this._bindings.registerFileURL(e.data[0],e.data[1]),this.sendOK(e);break;case"REGISTER_FILE_BUFFER":this._bindings.registerFileBuffer(e.data[0],e.data[1]),this.sendOK(e);break;case"REGISTER_FILE_HANDLE":this._bindings.registerFileHandle(e.data[0],e.data[1]),this.sendOK(e);break;case"COPY_FILE_TO_PATH":this._bindings.copyFileToPath(e.data[0],e.data[1]),this.sendOK(e);break;case"COPY_FILE_TO_BUFFER":{let t=this._bindings.copyFileToBuffer(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"FILE_BUFFER",data:t},[]);break}case"COLLECT_FILE_STATISTICS":this._bindings.collectFileStatistics(e.data[0],e.data[1]),this.sendOK(e);break;case"EXPORT_FILE_STATISTICS":{this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"FILE_STATISTICS",data:this._bindings.exportFileStatistics(e.data)},[]);break}case"INSERT_ARROW_FROM_IPC_STREAM":{this._bindings.insertArrowFromIPCStream(e.data[0],e.data[1],e.data[2]),this.sendOK(e);break}case"IMPORT_CSV_FROM_PATH":{this._bindings.insertCSVFromPath(e.data[0],e.data[1],e.data[2]),this.sendOK(e);break}case"IMPORT_JSON_FROM_PATH":{this._bindings.insertJSONFromPath(e.data[0],e.data[1],e.data[2]),this.sendOK(e);break}case"TOKENIZE":{let t=this._bindings.tokenize(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"SCRIPT_TOKENS",data:t},[]);break}}}catch(t){return this.failWith(e,t)}}};var I0={},PV=function(){var i=I0.url;return function(e){e=e||{};var t=typeof e!="undefined"?e:{},r,n;t.ready=new Promise(function(s,a){r=s,n=a});var o={},l;for(l in t)t.hasOwnProperty(l)&&(o[l]=t[l]);var _=[],v="./this.program",T=function(s,a){throw a},D=typeof window=="object",N=typeof importScripts=="function",z=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",K="";function Me(s){return t.locateFile?t.locateFile(s,K):K+s}var Ie,qt,ct,os;function D0(s){if(!(s instanceof go)){var a=s;vi("exiting due to exception: "+a)}}var Xr,Qr;z?(N?K=Bu().dirname(K)+"/":K=__dirname+"/",Ie=function(a,u){return Xr||(Xr=nf()),Qr||(Qr=Bu()),a=Qr.normalize(a),Xr.readFileSync(a,u?null:"utf8")},ct=function(a){var u=Ie(a,!0);return u.buffer||(u=new Uint8Array(u)),no(u.buffer),u},qt=function(a,u,c){Xr||(Xr=nf()),Qr||(Qr=Bu()),a=Qr.normalize(a),Xr.readFile(a,function(d,f){d?c(d):u(f.buffer)})},process.argv.length>1&&(v=process.argv[1].replace(/\\/g,"/")),_=process.argv.slice(2),process.on("uncaughtException",function(s){if(!(s instanceof go))throw s}),process.on("unhandledRejection",function(s){throw s}),T=function(s,a){if(Su())throw process.exitCode=s,a;D0(a),process.exit(s)},t.inspect=function(){return"[Emscripten Module object]"}):(D||N)&&(N?K=self.location.href:typeof document!="undefined"&&document.currentScript&&(K=document.currentScript.src),i&&(K=i),K.indexOf("blob:")!==0?K=K.substr(0,K.replace(/[?#].*/,"").lastIndexOf("/")+1):K="",Ie=function(s){var a=new XMLHttpRequest;return a.open("GET",s,!1),a.send(null),a.responseText},N&&(ct=function(s){var a=new XMLHttpRequest;return a.open("GET",s,!1),a.responseType="arraybuffer",a.send(null),new Uint8Array(a.response)}),qt=function(s,a,u){var c=new XMLHttpRequest;c.open("GET",s,!0),c.responseType="arraybuffer",c.onload=function(){if(c.status==200||c.status==0&&c.response){a(c.response);return}u()},c.onerror=u,c.send(null)},os=function(s){document.title=s});var O0=t.print||console.log.bind(console),vi=t.printErr||console.warn.bind(console);for(l in o)o.hasOwnProperty(l)&&(t[l]=o[l]);o=null,t.arguments&&(_=t.arguments),t.thisProgram&&(v=t.thisProgram),t.quit&&(T=t.quit);var df=0,tt=function(s){df=s},F0=function(){return df},as;t.wasmBinary&&(as=t.wasmBinary);var M0=t.noExitRuntime||!0;typeof WebAssembly!="object"&&gt("no native wasm support detected");var io,Iu=!1,ro;function no(s,a){s||gt("Assertion failed: "+a)}function C0(s){var a=t["_"+s];return no(a,"Cannot call unknown function "+s+", make sure it is exported"),a}function U0(s,a,u,c,d){var f={string:function(R){var Z=0;if(R!=null&&R!==0){var le=(R.length<<2)+1;Z=ku(le),Tu(R,Z,le)}return Z},array:function(R){var Z=ku(R.length);return yf(R,Z),Z}};function h(R){return a==="string"?en(R):a==="boolean"?Boolean(R):R}var p=C0(s),y=[],m=0;if(c)for(var b=0;b<c.length;b++){var j=f[u[b]];j?(m===0&&(m=w()),y[b]=j(c[b])):y[b]=c[b]}var A=p.apply(null,y);function M(R){return m!==0&&B(m),h(R)}return A=M(A),A}var ff=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function hf(s,a,u){for(var c=a+u,d=a;s[d]&&!(d>=c);)++d;if(d-a>16&&s.subarray&&ff)return ff.decode(s.subarray(a,d));for(var f="";a<d;){var h=s[a++];if(!(h&128)){f+=String.fromCharCode(h);continue}var p=s[a++]&63;if((h&224)==192){f+=String.fromCharCode((h&31)<<6|p);continue}var y=s[a++]&63;if((h&240)==224?h=(h&15)<<12|p<<6|y:h=(h&7)<<18|p<<12|y<<6|s[a++]&63,h<65536)f+=String.fromCharCode(h);else{var m=h-65536;f+=String.fromCharCode(55296|m>>10,56320|m&1023)}}return f}function en(s,a){return s?hf(Ni,s,a):""}function pf(s,a,u,c){if(!(c>0))return 0;for(var d=u,f=u+c-1,h=0;h<s.length;++h){var p=s.charCodeAt(h);if(p>=55296&&p<=57343){var y=s.charCodeAt(++h);p=65536+((p&1023)<<10)|y&1023}if(p<=127){if(u>=f)break;a[u++]=p}else if(p<=2047){if(u+1>=f)break;a[u++]=192|p>>6,a[u++]=128|p&63}else if(p<=65535){if(u+2>=f)break;a[u++]=224|p>>12,a[u++]=128|p>>6&63,a[u++]=128|p&63}else{if(u+3>=f)break;a[u++]=240|p>>18,a[u++]=128|p>>12&63,a[u++]=128|p>>6&63,a[u++]=128|p&63}}return a[u]=0,u-d}function Tu(s,a,u){return pf(s,Ni,a,u)}function V0(s){for(var a=0,u=0;u<s.length;++u){var c=s.charCodeAt(u);c>=55296&&c<=57343&&(c=65536+((c&1023)<<10)|s.charCodeAt(++u)&1023),c<=127?++a:c<=2047?a+=2:c<=65535?a+=3:a+=4}return a}function yf(s,a){Xt.set(s,a)}function k0(s,a,u){for(var c=0;c<s.length;++c)Xt[a++>>0]=s.charCodeAt(c);u||(Xt[a>>0]=0)}function E0(s,a){return s%a>0&&(s+=a-s%a),s}var _f,Xt,Ni,us,mf,x,R0,P0,N0;function bf(s){_f=s,t.HEAP8=Xt=new Int8Array(s),t.HEAP16=us=new Int16Array(s),t.HEAP32=x=new Int32Array(s),t.HEAPU8=Ni=new Uint8Array(s),t.HEAPU16=mf=new Uint16Array(s),t.HEAPU32=R0=new Uint32Array(s),t.HEAPF32=P0=new Float32Array(s),t.HEAPF64=N0=new Float64Array(s)}var zV=t.INITIAL_MEMORY||16777216,$,gf=[],vf=[],L0=[],jf=[],x0=!1,q0=!1,z0=0;function Su(){return M0||z0>0}function W0(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)J0(t.preRun.shift());so(gf)}function H0(){x0=!0,so(vf)}function Y0(){so(L0)}function $0(){q0=!0}function G0(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)Z0(t.postRun.shift());so(jf)}function J0(s){gf.unshift(s)}function K0(s){vf.unshift(s)}function Z0(s){jf.unshift(s)}var Ir=0,Au=null,cs=null;function X0(s){Ir++,t.monitorRunDependencies&&t.monitorRunDependencies(Ir)}function Q0(s){if(Ir--,t.monitorRunDependencies&&t.monitorRunDependencies(Ir),Ir==0&&(Au!==null&&(clearInterval(Au),Au=null),cs)){var a=cs;cs=null,a()}}t.preloadedImages={},t.preloadedAudios={};function gt(s){t.onAbort&&t.onAbort(s),s="Aborted("+s+")",vi(s),Iu=!0,ro=1,s+=". Build with -s ASSERTIONS=1 for more info.";var a=new WebAssembly.RuntimeError(s);throw n(a),a}var ej="data:application/octet-stream;base64,";function wf(s){return s.startsWith(ej)}var vt;t.locateFile?(vt="./duckdb-wasm.wasm",wf(vt)||(vt=Me(vt))):vt=new URL("duckdb_wasm.wasm",I0.url).toString();function Bf(s){try{if(s==vt&&as)return new Uint8Array(as);if(ct)return ct(s);throw"both async and sync fetching of the wasm failed"}catch(a){gt(a)}}function tj(){return!as&&(D||N)&&typeof fetch=="function"?fetch(vt,{credentials:"same-origin"}).then(function(s){if(!s.ok)throw"failed to load wasm binary file at '"+vt+"'";return s.arrayBuffer()}).catch(function(){return Bf(vt)}):Promise.resolve().then(function(){return Bf(vt)})}function ij(){var s={a:Cw};function a(h,p){var y=h.exports;t.asm=y,io=t.asm.Se,bf(io.buffer),$=t.asm.Ve,K0(t.asm.Te),Q0("wasm-instantiate")}X0("wasm-instantiate");function u(h){a(h.instance)}function c(h){return tj().then(function(p){return WebAssembly.instantiate(p,s)}).then(function(p){return p}).then(h,function(p){vi("failed to asynchronously prepare wasm: "+p),gt(p)})}function d(){return!as&&typeof WebAssembly.instantiateStreaming=="function"&&!wf(vt)&&typeof fetch=="function"?fetch(vt,{credentials:"same-origin"}).then(function(h){var p=WebAssembly.instantiateStreaming(h,s);return p.then(u,function(y){return vi("wasm streaming compile failed: "+y),vi("falling back to ArrayBuffer instantiation"),c(u)})}):c(u)}if(t.instantiateWasm)try{var f=t.instantiateWasm(s,a);return f}catch(h){return vi("Module.instantiateWasm callback failed with error: "+h),!1}return d().catch(n),{}}function so(s){for(;s.length>0;){var a=s.shift();if(typeof a=="function"){a(t);continue}var u=a.func;typeof u=="number"?a.arg===void 0?$.get(u)():$.get(u)(a.arg):u(a.arg===void 0?null:a.arg)}}function rj(s){if(s instanceof go||s=="unwind")return ro;T(1,s)}function nj(s){return fs(s+16)+16}function Tr(s){this.excPtr=s,this.ptr=s-16,this.set_type=function(a){x[this.ptr+4>>2]=a},this.get_type=function(){return x[this.ptr+4>>2]},this.set_destructor=function(a){x[this.ptr+8>>2]=a},this.get_destructor=function(){return x[this.ptr+8>>2]},this.set_refcount=function(a){x[this.ptr>>2]=a},this.set_caught=function(a){a=a?1:0,Xt[this.ptr+12>>0]=a},this.get_caught=function(){return Xt[this.ptr+12>>0]!=0},this.set_rethrown=function(a){a=a?1:0,Xt[this.ptr+13>>0]=a},this.get_rethrown=function(){return Xt[this.ptr+13>>0]!=0},this.init=function(a,u){this.set_type(a),this.set_destructor(u),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var a=x[this.ptr>>2];x[this.ptr>>2]=a+1},this.release_ref=function(){var a=x[this.ptr>>2];return x[this.ptr>>2]=a-1,a===1}}function tn(s){this.free=function(){Eu(this.ptr),this.ptr=0},this.set_base_ptr=function(a){x[this.ptr>>2]=a},this.get_base_ptr=function(){return x[this.ptr>>2]},this.set_adjusted_ptr=function(a){x[this.ptr+4>>2]=a},this.get_adjusted_ptr_addr=function(){return this.ptr+4},this.get_adjusted_ptr=function(){return x[this.ptr+4>>2]},this.get_exception_ptr=function(){var a=Mf(this.get_exception_info().get_type());if(a)return x[this.get_base_ptr()>>2];var u=this.get_adjusted_ptr();return u!==0?u:this.get_base_ptr()},this.get_exception_info=function(){return new Tr(this.get_base_ptr())},s===void 0?(this.ptr=fs(8),this.set_adjusted_ptr(0)):this.ptr=s}var oo=[];function sj(s){s.add_ref()}var ao=0;function oj(s){var a=new tn(s),u=a.get_exception_info();return u.get_caught()||(u.set_caught(!0),ao--),u.set_rethrown(!1),oo.push(a),sj(u),a.get_exception_ptr()}var ji=0;function If(s){return Eu(new Tr(s).ptr)}function aj(s){if(s.release_ref()&&!s.get_rethrown()){var a=s.get_destructor();a&&$.get(a)(s.excPtr),If(s.excPtr)}}function uj(){I(0);var s=oo.pop();aj(s.get_exception_info()),s.free(),ji=0}function cj(s){var a=new tn(s),u=a.get_base_ptr();throw ji||(ji=u),a.free(),u}function lj(){var s=ji;if(!s)return tt(0),0|0;var a=new Tr(s),u=a.get_type(),c=new tn;if(c.set_base_ptr(s),c.set_adjusted_ptr(s),!u)return tt(0),c.ptr|0;for(var d=Array.prototype.slice.call(arguments),f=0;f<d.length;f++){var h=d[f];if(h===0||h===u)break;if(ds(h,u,c.get_adjusted_ptr_addr()))return tt(h),c.ptr|0}return tt(u),c.ptr|0}function dj(){var s=ji;if(!s)return tt(0),0|0;var a=new Tr(s),u=a.get_type(),c=new tn;if(c.set_base_ptr(s),c.set_adjusted_ptr(s),!u)return tt(0),c.ptr|0;for(var d=Array.prototype.slice.call(arguments),f=0;f<d.length;f++){var h=d[f];if(h===0||h===u)break;if(ds(h,u,c.get_adjusted_ptr_addr()))return tt(h),c.ptr|0}return tt(u),c.ptr|0}function fj(){var s=ji;if(!s)return tt(0),0|0;var a=new Tr(s),u=a.get_type(),c=new tn;if(c.set_base_ptr(s),c.set_adjusted_ptr(s),!u)return tt(0),c.ptr|0;for(var d=Array.prototype.slice.call(arguments),f=0;f<d.length;f++){var h=d[f];if(h===0||h===u)break;if(ds(h,u,c.get_adjusted_ptr_addr()))return tt(h),c.ptr|0}return tt(u),c.ptr|0}function hj(){var s=ji;if(!s)return tt(0),0|0;var a=new Tr(s),u=a.get_type(),c=new tn;if(c.set_base_ptr(s),c.set_adjusted_ptr(s),!u)return tt(0),c.ptr|0;for(var d=Array.prototype.slice.call(arguments),f=0;f<d.length;f++){var h=d[f];if(h===0||h===u)break;if(ds(h,u,c.get_adjusted_ptr_addr()))return tt(h),c.ptr|0}return tt(u),c.ptr|0}function pj(){var s=oo.pop();s||gt("no exception to throw");var a=s.get_exception_info(),u=s.get_base_ptr();throw a.get_rethrown()?s.free():(oo.push(s),a.set_rethrown(!0),a.set_caught(!1),ao++),ji=u,u}function yj(s,a,u){var c=new Tr(s);throw c.init(a,u),ji=s,ao++,s}function _j(){return ao}var Ze={mappings:{},buffers:[null,[],[]],printChar:function(s,a){var u=Ze.buffers[s];a===0||a===10?((s===1?O0:vi)(hf(u,0)),u.length=0):u.push(a)},varargs:void 0,get:function(){Ze.varargs+=4;var s=x[Ze.varargs-4>>2];return s},getStr:function(s){var a=en(s);return a},get64:function(s,a){return s}};function mj(s,a,u,c,d){}function bj(s,a){return s=Ze.getStr(s),Ze.doAccess(s,a)}function gj(){vi("missing function: $SOCKFS"),gt(-1)}function Tf(){vi("missing function: $FS"),gt(-1)}function rn(s){var a=gj.getSocket(s);if(!a)throw new Tf.ErrnoError(8);return a}function vj(s){return x[Ff()>>2]=s,s}function Du(s){return(s&255)+"."+(s>>8&255)+"."+(s>>16&255)+"."+(s>>24&255)}function Sf(s){var a="",u=0,c=0,d=0,f=0,h=0,p=0,y=[s[0]&65535,s[0]>>16,s[1]&65535,s[1]>>16,s[2]&65535,s[2]>>16,s[3]&65535,s[3]>>16],m=!0,b="";for(p=0;p<5;p++)if(y[p]!==0){m=!1;break}if(m){if(b=Du(y[6]|y[7]<<16),y[5]===-1)return a="::ffff:",a+=b,a;if(y[5]===0)return a="::",b==="0.0.0.0"&&(b=""),b==="0.0.0.1"&&(b="1"),a+=b,a}for(u=0;u<8;u++)y[u]===0&&(u-d>1&&(h=0),d=u,h++),h>c&&(c=h,f=u-c+1);for(u=0;u<8;u++){if(c>1&&y[u]===0&&u>=f&&u<f+c){u===f&&(a+=":",f===0&&(a+=":"));continue}a+=Number(Vu(y[u]&65535)).toString(16),a+=u<7?":":""}return a}function Af(s,a){var u=us[s>>1],c=Vu(mf[s+2>>1]),d;switch(u){case 2:if(a!==16)return{errno:28};d=x[s+4>>2],d=Du(d);break;case 10:if(a!==28)return{errno:28};d=[x[s+8>>2],x[s+12>>2],x[s+16>>2],x[s+20>>2]],d=Sf(d);break;default:return{errno:5}}return{family:u,addr:d,port:c}}function Df(s,a,u){if(u&&s===0)return null;var c=Af(s,a);if(c.errno)throw new Tf.ErrnoError(c.errno);return c.addr=jt.lookup_addr(c.addr)||c.addr,c}function jj(s,a,u){var c=rn(s),d=Df(a,u);return c.sock_ops.bind(c,d.addr,d.port),0}function wj(s,a,u){var c=rn(s),d=Df(a,u);return c.sock_ops.connect(c,d.addr,d.port),0}function Bj(s,a,u){return Ze.varargs=u,0}function Ij(s,a){}function Tj(s,a,u,c){}function Sj(s,a,u){}function uo(s){for(var a=s.split("."),u=0;u<4;u++){var c=Number(a[u]);if(isNaN(c))return null;a[u]=c}return(a[0]|a[1]<<8|a[2]<<16|a[3]<<24)>>>0}function co(s){return parseInt(s)}function Ou(s){var a,u,c,d,f=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i,h=[];if(!f.test(s))return null;if(s==="::")return[0,0,0,0,0,0,0,0];for(s.startsWith("::")?s=s.replace("::","Z:"):s=s.replace("::",":Z:"),s.indexOf(".")>0?(s=s.replace(new RegExp("[.]","g"),":"),a=s.split(":"),a[a.length-4]=co(a[a.length-4])+co(a[a.length-3])*256,a[a.length-3]=co(a[a.length-2])+co(a[a.length-1])*256,a=a.slice(0,a.length-2)):a=s.split(":"),c=0,d=0,u=0;u<a.length;u++)if(typeof a[u]=="string")if(a[u]==="Z"){for(d=0;d<8-a.length+1;d++)h[u+d]=0;c=d-1}else h[u+c]=mo(parseInt(a[u],16));else h[u+c]=a[u];return[h[1]<<16|h[0],h[3]<<16|h[2],h[5]<<16|h[4],h[7]<<16|h[6]]}function Of(s,a){Ni.fill(0,s,s+a)}function Fu(s,a,u,c,d){switch(a){case 2:u=uo(u),Of(s,16),d&&(x[d>>2]=16),us[s>>1]=a,x[s+4>>2]=u,us[s+2>>1]=mo(c);break;case 10:u=Ou(u),Of(s,28),d&&(x[d>>2]=28),x[s>>2]=a,x[s+8>>2]=u[0],x[s+12>>2]=u[1],x[s+16>>2]=u[2],x[s+20>>2]=u[3],us[s+2>>1]=mo(c);break;default:return 5}return 0}var jt={address_map:{id:1,addrs:{},names:{}},lookup_name:function(s){var a=uo(s);if(a!==null||(a=Ou(s),a!==null))return s;var u;if(jt.address_map.addrs[s])u=jt.address_map.addrs[s];else{var c=jt.address_map.id++;no(c<65535,"exceeded max address mappings of 65535"),u="172.29."+(c&255)+"."+(c&65280),jt.address_map.names[u]=s,jt.address_map.addrs[s]=u}return u},lookup_addr:function(s){return jt.address_map.names[s]?jt.address_map.names[s]:null}};function Aj(s,a,u){var c=rn(s);if(!c.daddr)return-53;var d=Fu(a,c.family,jt.lookup_name(c.daddr),c.dport,u);return 0}function Dj(){return 42}function Oj(s,a,u,c,d){var f=rn(s);return a===1&&u===4?(x[c>>2]=f.error,x[d>>2]=4,f.error=null,0):-50}function Fj(s,a,u){return Ze.varargs=u,0}function Mj(s,a,u){return 0}function Cj(s,a){return s=Ze.getStr(s),Ze.doMkdir(s,a)}function Uj(s,a,u){Ze.varargs=u}function Vj(s,a,u,c,d,f){var h=rn(s),p=h.sock_ops.recvmsg(h,u);if(!p)return 0;if(d)var y=Fu(d,h.family,jt.lookup_name(p.addr),p.port,f);return Ni.set(p.buffer,a),p.buffer.byteLength}function kj(s,a){}function Ej(s){}function Rj(s,a,u,c,d,f){}function Pj(s){return-50}function Nj(s,a){return rn(s),-52}function Lj(s,a,u){}function xj(s,a){}function qj(s){}function zj(s,a){gt("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function Wj(s,a){gt("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function Hj(){gt("")}var Mu;z?Mu=function(){var s=process.hrtime();return s[0]*1e3+s[1]/1e6}:Mu=function(){return performance.now()};var Yj=!0;function $j(s,a){var u;if(s===0)u=Date.now();else if((s===1||s===4)&&Yj)u=Mu();else return vj(28),-1;return x[a>>2]=u/1e3|0,x[a+4>>2]=u%1e3*1e3*1e3|0,0}function Gj(s,a){return globalThis.DUCKDB_RUNTIME.createDirectory(t,s,a)}function Jj(s,a){return globalThis.DUCKDB_RUNTIME.checkDirectory(t,s,a)}function Kj(s,a){return globalThis.DUCKDB_RUNTIME.listDirectoryEntries(t,s,a)}function Zj(s,a){return globalThis.DUCKDB_RUNTIME.removeDirectory(t,s,a)}function Xj(s){return globalThis.DUCKDB_RUNTIME.closeFile(t,s)}function Qj(s,a){return globalThis.DUCKDB_RUNTIME.checkFile(t,s,a)}function ew(s){return globalThis.DUCKDB_RUNTIME.getLastFileModificationTime(t,s)}function tw(s,a,u,c){return globalThis.DUCKDB_RUNTIME.moveFile(t,s,a,u,c)}function iw(s){return globalThis.DUCKDB_RUNTIME.openFile(t,s)}function rw(s,a,u,c){return globalThis.DUCKDB_RUNTIME.readFile(t,s,a,u,c)}function nw(s,a){return globalThis.DUCKDB_RUNTIME.truncateFile(t,s,a)}function sw(s,a,u,c){return globalThis.DUCKDB_RUNTIME.writeFile(t,s,a,u,c)}function ow(s,a){return globalThis.DUCKDB_RUNTIME.glob(t,s,a)}function aw(s){return globalThis.DUCKDB_RUNTIME.testPlatformFeature(t,s)}function uw(){return 2147483648}function cw(s,a,u){Ni.copyWithin(s,a,a+u)}function lw(s){try{return io.grow(s-_f.byteLength+65535>>>16),bf(io.buffer),1}catch(a){}}function dw(s){var a=Ni.length;s=s>>>0;var u=2147483648;if(s>u)return!1;for(var c=1;c<=4;c*=2){var d=a*(1+.2/c);d=Math.min(d,s+100663296);var f=Math.min(u,E0(Math.max(s,d),65536)),h=lw(f);if(h)return!0}return!1}var Cu={};function fw(){return v||"./this.program"}function ls(){if(!ls.strings){var s=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:s,_:fw()};for(var u in Cu)Cu[u]===void 0?delete a[u]:a[u]=Cu[u];var c=[];for(var u in a)c.push(u+"="+a[u]);ls.strings=c}return ls.strings}function hw(s,a){var u=0;return ls().forEach(function(c,d){var f=a+u;x[s+d*4>>2]=f,k0(c,f),u+=c.length+1}),0}function pw(s,a){var u=ls();x[s>>2]=u.length;var c=0;return u.forEach(function(d){c+=d.length+1}),x[a>>2]=c,0}function yw(s){return 0}function _w(s,a){var u=s==1||s==2?2:gt();return Xt[a>>0]=u,0}function mw(s,a,u,c,d,f){var h=Ze.getStreamFromFD(s),p=Ze.doReadv(h,a,u,c);return x[f>>2]=p,0}function bw(s,a,u,c,d,f){var h=Ze.getStreamFromFD(s),p=Ze.doWritev(h,a,u,c);return x[f>>2]=p,0}function gw(s,a,u,c){var d=Ze.getStreamFromFD(s),f=Ze.doReadv(d,a,u);return x[c>>2]=f,0}function vw(s,a,u,c,d){}function jw(s){var a=Ze.getStreamFromFD(s);return a.stream_ops&&a.stream_ops.fsync?-a.stream_ops.fsync(a):0}function ww(s,a,u,c){for(var d=0,f=0;f<u;f++){for(var h=x[a+f*8>>2],p=x[a+(f*8+4)>>2],y=0;y<p;y++)Ze.printChar(s,Ni[h+y]);d+=p}return x[c>>2]=d,0}function Bw(){return F0()}function Iw(s,a,u,c){var d=0,f=0,h=0,p=0,y=0,m=0,b;function j(A,M,R,Z,le,Oe){var U,G,me,pe;return G=A===10?28:16,le=A===10?Sf(le):Du(le),U=fs(G),pe=Fu(U,A,le,Oe),no(!pe),me=fs(32),x[me+4>>2]=A,x[me+8>>2]=M,x[me+12>>2]=R,x[me+24>>2]=Z,x[me+20>>2]=U,A===10?x[me+16>>2]=28:x[me+16>>2]=16,x[me+28>>2]=0,me}if(u&&(h=x[u>>2],p=x[u+4>>2],y=x[u+8>>2],m=x[u+12>>2]),y&&!m&&(m=y===2?17:6),!y&&m&&(y=m===17?2:1),m===0&&(m=6),y===0&&(y=1),!s&&!a)return-2;if(h&~(1|2|4|1024|8|16|32)||u!==0&&x[u>>2]&2&&!s)return-1;if(h&32)return-2;if(y!==0&&y!==1&&y!==2)return-7;if(p!==0&&p!==2&&p!==10)return-6;if(a&&(a=en(a),f=parseInt(a,10),isNaN(f)))return h&1024?-2:-8;if(!s)return p===0&&(p=2),(h&1)===0&&(p===2?d=_o(2130706433):d=[0,0,0,1]),b=j(p,y,m,null,d,f),x[c>>2]=b,0;if(s=en(s),d=uo(s),d!==null)if(p===0||p===2)p=2;else if(p===10&&h&8)d=[0,0,_o(65535),d],p=10;else return-2;else if(d=Ou(s),d!==null)if(p===0||p===10)p=10;else return-2;return d!=null?(b=j(p,y,m,s,d,f),x[c>>2]=b,0):h&4?-2:(s=jt.lookup_name(s),d=uo(s),p===0?p=2:p===10&&(d=[0,0,_o(65535),d]),b=j(p,y,m,null,d,f),x[c>>2]=b,0)}function Tw(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var s=new Uint8Array(1);return function(){return crypto.getRandomValues(s),s[0]}}else if(z)try{var a=ZS("crypto");return function(){return a.randomBytes(1)[0]}}catch(u){}return function(){gt("randomDevice")}}function lo(s,a){lo.randomDevice||(lo.randomDevice=Tw());for(var u=0;u<a;u++)Xt[s+u>>0]=lo.randomDevice();return 0}function Sw(s,a,u,c,d,f,h){var p=Af(s,a);if(p.errno)return-6;var y=p.port,m=p.addr,b=!1;if(u&&c){var j;if(h&1||!(j=jt.lookup_addr(m))){if(h&8)return-2}else m=j;var A=Tu(m,u,c);A+1>=c&&(b=!0)}if(d&&f){y=""+y;var A=Tu(y,d,f);A+1>=f&&(b=!0)}return b?-12:0}function Aw(s){return s}function Dw(s){tt(s)}function fo(s){return s%4===0&&(s%100!==0||s%400===0)}function Uu(s,a){for(var u=0,c=0;c<=a;u+=s[c++]);return u}var ho=[31,29,31,30,31,30,31,31,30,31,30,31],po=[31,28,31,30,31,30,31,31,30,31,30,31];function yo(s,a){for(var u=new Date(s.getTime());a>0;){var c=fo(u.getFullYear()),d=u.getMonth(),f=(c?ho:po)[d];if(a>f-u.getDate())a-=f-u.getDate()+1,u.setDate(1),d<11?u.setMonth(d+1):(u.setMonth(0),u.setFullYear(u.getFullYear()+1));else return u.setDate(u.getDate()+a),u}return u}function Ow(s,a,u,c){var d=x[c+40>>2],f={tm_sec:x[c>>2],tm_min:x[c+4>>2],tm_hour:x[c+8>>2],tm_mday:x[c+12>>2],tm_mon:x[c+16>>2],tm_year:x[c+20>>2],tm_wday:x[c+24>>2],tm_yday:x[c+28>>2],tm_isdst:x[c+32>>2],tm_gmtoff:x[c+36>>2],tm_zone:d?en(d):""},h=en(u),p={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var y in p)h=h.replace(new RegExp(y,"g"),p[y]);var m=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b=["January","February","March","April","May","June","July","August","September","October","November","December"];function j(U,G,me){for(var pe=typeof U=="number"?U.toString():U||"";pe.length<G;)pe=me[0]+pe;return pe}function A(U,G){return j(U,G,"0")}function M(U,G){function me(lt){return lt<0?-1:lt>0?1:0}var pe;return(pe=me(U.getFullYear()-G.getFullYear()))===0&&(pe=me(U.getMonth()-G.getMonth()))===0&&(pe=me(U.getDate()-G.getDate())),pe}function R(U){switch(U.getDay()){case 0:return new Date(U.getFullYear()-1,11,29);case 1:return U;case 2:return new Date(U.getFullYear(),0,3);case 3:return new Date(U.getFullYear(),0,2);case 4:return new Date(U.getFullYear(),0,1);case 5:return new Date(U.getFullYear()-1,11,31);case 6:return new Date(U.getFullYear()-1,11,30)}}function Z(U){var G=yo(new Date(U.tm_year+1900,0,1),U.tm_yday),me=new Date(G.getFullYear(),0,4),pe=new Date(G.getFullYear()+1,0,4),lt=R(me),Li=R(pe);return M(lt,G)<=0?M(Li,G)<=0?G.getFullYear()+1:G.getFullYear():G.getFullYear()-1}var le={"%a":function(U){return m[U.tm_wday].substring(0,3)},"%A":function(U){return m[U.tm_wday]},"%b":function(U){return b[U.tm_mon].substring(0,3)},"%B":function(U){return b[U.tm_mon]},"%C":function(U){var G=U.tm_year+1900;return A(G/100|0,2)},"%d":function(U){return A(U.tm_mday,2)},"%e":function(U){return j(U.tm_mday,2," ")},"%g":function(U){return Z(U).toString().substring(2)},"%G":function(U){return Z(U)},"%H":function(U){return A(U.tm_hour,2)},"%I":function(U){var G=U.tm_hour;return G==0?G=12:G>12&&(G-=12),A(G,2)},"%j":function(U){return A(U.tm_mday+Uu(fo(U.tm_year+1900)?ho:po,U.tm_mon-1),3)},"%m":function(U){return A(U.tm_mon+1,2)},"%M":function(U){return A(U.tm_min,2)},"%n":function(){return`
18
- `},"%p":function(U){return U.tm_hour>=0&&U.tm_hour<12?"AM":"PM"},"%S":function(U){return A(U.tm_sec,2)},"%t":function(){return" "},"%u":function(U){return U.tm_wday||7},"%U":function(U){var G=new Date(U.tm_year+1900,0,1),me=G.getDay()===0?G:yo(G,7-G.getDay()),pe=new Date(U.tm_year+1900,U.tm_mon,U.tm_mday);if(M(me,pe)<0){var lt=Uu(fo(pe.getFullYear())?ho:po,pe.getMonth()-1)-31,Li=31-me.getDate(),Sr=Li+lt+pe.getDate();return A(Math.ceil(Sr/7),2)}return M(me,G)===0?"01":"00"},"%V":function(U){var G=new Date(U.tm_year+1900,0,4),me=new Date(U.tm_year+1901,0,4),pe=R(G),lt=R(me),Li=yo(new Date(U.tm_year+1900,0,1),U.tm_yday);if(M(Li,pe)<0)return"53";if(M(lt,Li)<=0)return"01";var Sr;return pe.getFullYear()<U.tm_year+1900?Sr=U.tm_yday+32-pe.getDate():Sr=U.tm_yday+1-pe.getDate(),A(Math.ceil(Sr/7),2)},"%w":function(U){return U.tm_wday},"%W":function(U){var G=new Date(U.tm_year,0,1),me=G.getDay()===1?G:yo(G,G.getDay()===0?1:7-G.getDay()+1),pe=new Date(U.tm_year+1900,U.tm_mon,U.tm_mday);if(M(me,pe)<0){var lt=Uu(fo(pe.getFullYear())?ho:po,pe.getMonth()-1)-31,Li=31-me.getDate(),Sr=Li+lt+pe.getDate();return A(Math.ceil(Sr/7),2)}return M(me,G)===0?"01":"00"},"%y":function(U){return(U.tm_year+1900).toString().substring(2)},"%Y":function(U){return U.tm_year+1900},"%z":function(U){var G=U.tm_gmtoff,me=G>=0;return G=Math.abs(G)/60,G=G/60*100+G%60,(me?"+":"-")+String("0000"+G).slice(-4)},"%Z":function(U){return U.tm_zone},"%%":function(){return"%"}};for(var y in le)h.includes(y)&&(h=h.replace(new RegExp(y,"g"),le[y](f)));var Oe=Mw(h,!1);return Oe.length>a?0:(yf(Oe,s),Oe.length-1)}function Fw(s,a,u,c){return Ow(s,a,u,c)}function Mw(s,a,u){var c=u>0?u:V0(s)+1,d=new Array(c),f=pf(s,d,0,d.length);return a&&(d.length=f),d}var Cw={j:nj,A:oj,F:uj,b:lj,n:dj,I:fj,V:hj,i:If,da:pj,u:yj,E:_j,e:cj,Fa:mj,wa:bj,Ha:jj,Ga:wj,N:Bj,ya:Ij,xa:Tj,Qe:Sj,Ba:Aj,ta:Dj,Ea:Oj,Ra:Fj,Me:Mj,Re:Cj,oa:Uj,Ca:Vj,Oe:kj,ua:Ej,Da:Rj,Ia:Pj,Ka:Nj,ia:Lj,fa:xj,va:qj,Ma:zj,La:Wj,ca:Hj,ma:$j,Fe:Gj,Ge:Jj,De:Kj,Ee:Zj,sa:Xj,Be:Qj,Ie:ew,Ce:tw,Ke:iw,ea:rw,He:nw,Je:sw,Ae:ow,ra:aw,Sa:uw,ib:cw,ed:dw,Ua:hw,Va:pw,T:yw,Qa:_w,nb:mw,mb:bw,na:gw,Td:vw,Pe:jw,ba:ww,a:Bw,Ja:Iw,za:lo,Aa:Sw,ja:oI,L:GB,Pa:iI,S:SB,yc:pT,ka:sI,W:KB,qa:TB,zc:hT,s:RB,Na:uI,Nb:MB,Y:zB,Oa:aI,Yb:FB,d:bB,_:dI,C:WB,Fb:sS,c:gB,X:JB,ga:hI,h:jB,Db:aS,l:IB,pa:XB,o:wB,v:kB,z:EB,R:VB,x:PB,w:LB,p:tI,M:lI,J:cI,ac:PT,dc:kT,gc:CT,nc:TT,bc:RT,Eb:oS,xc:yT,ec:VT,oc:IT,Lb:QT,we:gI,Rd:ZI,Kd:n1,je:CI,Rb:GT,id:C1,Ib:iS,Hb:rS,$d:qI,Qd:XI,vb:yS,Xc:W1,_d:zI,Ec:cT,Sb:$T,Gb:nS,re:II,Xd:YI,Ac:fT,Ld:r1,vd:g1,Id:o1,hb:SS,Yd:HI,lc:AT,Vd:GI,hd:U1,cb:MS,Kb:eS,kd:F1,ce:NI,ae:xI,_a:kS,tb:mS,Md:i1,db:FS,Cb:uS,Wd:$I,Ed:l1,Hd:a1,Gd:u1,Fd:c1,Bd:h1,kc:DT,Zb:xT,pe:SI,he:VI,pc:BT,ge:kI,Sd:KI,sc:vT,rc:jT,ne:DI,ie:UI,Pd:QI,ze:_I,qd:I1,qc:wT,cc:ET,Fc:uT,uc:bT,Uc:$1,sb:bS,Cc:dT,wc:_T,sd:w1,md:D1,Mc:tT,vc:mT,wb:pS,_b:LT,od:S1,cd:R1,Pc:X1,Oc:Q1,Lc:iT,Nc:eT,td:j1,$c:L1,Jb:tS,ic:FT,kb:IS,Zc:q1,tc:gT,zb:dS,Vb:WT,Ab:lS,Tb:YT,t:_B,k:vB,B:$B,$:eI,pb:jS,D:YB,aa:QB,qb:vS,f:mB,U:DB,Q:HB,Bc:AB,g:OB,m:BB,Ne:pI,q:UB,r:CB,ha:fI,y:NB,O:ZB,P:nI,K:xB,Le:yI,la:rI,Z:qB,Dd:d1,ob:wS,jd:M1,$b:NT,Dc:lT,mc:ST,Mb:XT,fb:DS,ue:jI,Zd:WI,ub:_S,ab:US,zd:y1,Ad:p1,Wb:zT,wd:b1,Pb:KT,Ob:ZT,Qc:Z1,te:wI,xd:m1,Cd:f1,Wc:H1,Ic:sT,xb:hS,yb:fS,eb:OS,me:OI,ud:v1,Qb:JT,Gc:aT,Tc:G1,se:BI,bb:CS,xe:bI,ee:RI,fe:EI,Jd:s1,$a:VS,bd:P1,Kc:rT,Jc:nT,ad:N1,Yc:z1,nd:A1,gb:AS,gd:V1,Za:ES,Hc:oT,jb:TS,ye:mI,Ud:JI,dd:E1,Rc:K1,ke:MI,fc:UT,ve:vI,oe:AI,fd:k1,Od:e1,Nd:t1,_c:x1,rb:gS,ld:O1,jc:OT,qe:TI,Ya:RS,Sc:J1,lb:BS,de:PI,Vc:Y1,Wa:NS,Xa:PS,hc:MT,le:FI,rd:B1,be:LI,Ub:HT,Xb:qT,Bb:cS,yd:_1,pd:T1,H:Aw,G:Dw,Ta:Fw},WV=ij(),Uw=t.___wasm_call_ctors=function(){return(Uw=t.___wasm_call_ctors=t.asm.Te).apply(null,arguments)},Vw=t._main=function(){return(Vw=t._main=t.asm.Ue).apply(null,arguments)},kw=t._duckdb_web_fs_glob_add_path=function(){return(kw=t._duckdb_web_fs_glob_add_path=t.asm.We).apply(null,arguments)},Ew=t._duckdb_web_clear_response=function(){return(Ew=t._duckdb_web_clear_response=t.asm.Xe).apply(null,arguments)},Rw=t._duckdb_web_fail_with=function(){return(Rw=t._duckdb_web_fail_with=t.asm.Ye).apply(null,arguments)},Pw=t._duckdb_web_reset=function(){return(Pw=t._duckdb_web_reset=t.asm.Ze).apply(null,arguments)},Nw=t._duckdb_web_connect=function(){return(Nw=t._duckdb_web_connect=t.asm._e).apply(null,arguments)},Lw=t._duckdb_web_disconnect=function(){return(Lw=t._duckdb_web_disconnect=t.asm.$e).apply(null,arguments)},xw=t._duckdb_web_flush_files=function(){return(xw=t._duckdb_web_flush_files=t.asm.af).apply(null,arguments)},qw=t._duckdb_web_flush_file=function(){return(qw=t._duckdb_web_flush_file=t.asm.bf).apply(null,arguments)},zw=t._duckdb_web_open=function(){return(zw=t._duckdb_web_open=t.asm.cf).apply(null,arguments)},Ww=t._duckdb_web_collect_file_stats=function(){return(Ww=t._duckdb_web_collect_file_stats=t.asm.df).apply(null,arguments)},Hw=t._duckdb_web_export_file_stats=function(){return(Hw=t._duckdb_web_export_file_stats=t.asm.ef).apply(null,arguments)},Yw=t._duckdb_web_fs_drop_file=function(){return(Yw=t._duckdb_web_fs_drop_file=t.asm.ff).apply(null,arguments)},$w=t._duckdb_web_fs_drop_files=function(){return($w=t._duckdb_web_fs_drop_files=t.asm.gf).apply(null,arguments)},Gw=t._duckdb_web_fs_glob_file_infos=function(){return(Gw=t._duckdb_web_fs_glob_file_infos=t.asm.hf).apply(null,arguments)},Jw=t._duckdb_web_fs_get_file_info_by_id=function(){return(Jw=t._duckdb_web_fs_get_file_info_by_id=t.asm.jf).apply(null,arguments)},Kw=t._duckdb_web_fs_get_file_info_by_name=function(){return(Kw=t._duckdb_web_fs_get_file_info_by_name=t.asm.kf).apply(null,arguments)},Zw=t._duckdb_web_fs_set_file_descriptor=function(){return(Zw=t._duckdb_web_fs_set_file_descriptor=t.asm.lf).apply(null,arguments)},Xw=t._duckdb_web_fs_register_file_url=function(){return(Xw=t._duckdb_web_fs_register_file_url=t.asm.mf).apply(null,arguments)},Qw=t._duckdb_web_fs_register_file_buffer=function(){return(Qw=t._duckdb_web_fs_register_file_buffer=t.asm.nf).apply(null,arguments)},eB=t._duckdb_web_copy_file_to_buffer=function(){return(eB=t._duckdb_web_copy_file_to_buffer=t.asm.of).apply(null,arguments)},tB=t._duckdb_web_copy_file_to_path=function(){return(tB=t._duckdb_web_copy_file_to_path=t.asm.pf).apply(null,arguments)},iB=t._duckdb_web_get_version=function(){return(iB=t._duckdb_web_get_version=t.asm.qf).apply(null,arguments)},rB=t._duckdb_web_get_feature_flags=function(){return(rB=t._duckdb_web_get_feature_flags=t.asm.rf).apply(null,arguments)},nB=t._duckdb_web_tokenize=function(){return(nB=t._duckdb_web_tokenize=t.asm.sf).apply(null,arguments)},sB=t._duckdb_web_prepared_create=function(){return(sB=t._duckdb_web_prepared_create=t.asm.tf).apply(null,arguments)},oB=t._duckdb_web_prepared_close=function(){return(oB=t._duckdb_web_prepared_close=t.asm.uf).apply(null,arguments)},aB=t._duckdb_web_prepared_run=function(){return(aB=t._duckdb_web_prepared_run=t.asm.vf).apply(null,arguments)},uB=t._duckdb_web_prepared_send=function(){return(uB=t._duckdb_web_prepared_send=t.asm.wf).apply(null,arguments)},cB=t._duckdb_web_query_run=function(){return(cB=t._duckdb_web_query_run=t.asm.xf).apply(null,arguments)},lB=t._duckdb_web_query_send=function(){return(lB=t._duckdb_web_query_send=t.asm.yf).apply(null,arguments)},dB=t._duckdb_web_query_fetch_results=function(){return(dB=t._duckdb_web_query_fetch_results=t.asm.zf).apply(null,arguments)},fB=t._duckdb_web_get_tablenames=function(){return(fB=t._duckdb_web_get_tablenames=t.asm.Af).apply(null,arguments)},hB=t._duckdb_web_insert_arrow_from_ipc_stream=function(){return(hB=t._duckdb_web_insert_arrow_from_ipc_stream=t.asm.Bf).apply(null,arguments)},pB=t._duckdb_web_insert_csv_from_path=function(){return(pB=t._duckdb_web_insert_csv_from_path=t.asm.Cf).apply(null,arguments)},yB=t._duckdb_web_insert_json_from_path=function(){return(yB=t._duckdb_web_insert_json_from_path=t.asm.Df).apply(null,arguments)},Ff=t.___errno_location=function(){return(Ff=t.___errno_location=t.asm.Ef).apply(null,arguments)},_o=t._htonl=function(){return(_o=t._htonl=t.asm.Ff).apply(null,arguments)},Vu=t._ntohs=function(){return(Vu=t._ntohs=t.asm.Gf).apply(null,arguments)},mo=t._htons=function(){return(mo=t._htons=t.asm.Hf).apply(null,arguments)},w=t.stackSave=function(){return(w=t.stackSave=t.asm.If).apply(null,arguments)},B=t.stackRestore=function(){return(B=t.stackRestore=t.asm.Jf).apply(null,arguments)},ku=t.stackAlloc=function(){return(ku=t.stackAlloc=t.asm.Kf).apply(null,arguments)},I=t._setThrew=function(){return(I=t._setThrew=t.asm.Lf).apply(null,arguments)},ds=t.___cxa_can_catch=function(){return(ds=t.___cxa_can_catch=t.asm.Mf).apply(null,arguments)},Mf=t.___cxa_is_pointer_type=function(){return(Mf=t.___cxa_is_pointer_type=t.asm.Nf).apply(null,arguments)},fs=t._malloc=function(){return(fs=t._malloc=t.asm.Of).apply(null,arguments)},Eu=t._free=function(){return(Eu=t._free=t.asm.Pf).apply(null,arguments)},Cf=t.dynCall_viiij=function(){return(Cf=t.dynCall_viiij=t.asm.Qf).apply(null,arguments)},Uf=t.dynCall_viiijjj=function(){return(Uf=t.dynCall_viiijjj=t.asm.Rf).apply(null,arguments)},Vf=t.dynCall_iiij=function(){return(Vf=t.dynCall_iiij=t.asm.Sf).apply(null,arguments)},kf=t.dynCall_vijijj=function(){return(kf=t.dynCall_vijijj=t.asm.Tf).apply(null,arguments)},Ef=t.dynCall_iji=function(){return(Ef=t.dynCall_iji=t.asm.Uf).apply(null,arguments)},Rf=t.dynCall_viji=function(){return(Rf=t.dynCall_viji=t.asm.Vf).apply(null,arguments)},Pf=t.dynCall_vij=function(){return(Pf=t.dynCall_vij=t.asm.Wf).apply(null,arguments)},Nf=t.dynCall_viijj=function(){return(Nf=t.dynCall_viijj=t.asm.Xf).apply(null,arguments)},Lf=t.dynCall_ji=function(){return(Lf=t.dynCall_ji=t.asm.Yf).apply(null,arguments)},xf=t.dynCall_viiijj=function(){return(xf=t.dynCall_viiijj=t.asm.Zf).apply(null,arguments)},qf=t.dynCall_vijjj=function(){return(qf=t.dynCall_vijjj=t.asm._f).apply(null,arguments)},zf=t.dynCall_viiiij=function(){return(zf=t.dynCall_viiiij=t.asm.$f).apply(null,arguments)},Wf=t.dynCall_jii=function(){return(Wf=t.dynCall_jii=t.asm.ag).apply(null,arguments)},Hf=t.dynCall_jiiii=function(){return(Hf=t.dynCall_jiiii=t.asm.bg).apply(null,arguments)},Yf=t.dynCall_iiiiij=function(){return(Yf=t.dynCall_iiiiij=t.asm.cg).apply(null,arguments)},$f=t.dynCall_iiiiijj=function(){return($f=t.dynCall_iiiiijj=t.asm.dg).apply(null,arguments)},Gf=t.dynCall_iij=function(){return(Gf=t.dynCall_iij=t.asm.eg).apply(null,arguments)},Jf=t.dynCall_viijii=function(){return(Jf=t.dynCall_viijii=t.asm.fg).apply(null,arguments)},Kf=t.dynCall_viiji=function(){return(Kf=t.dynCall_viiji=t.asm.gg).apply(null,arguments)},Zf=t.dynCall_vijj=function(){return(Zf=t.dynCall_vijj=t.asm.hg).apply(null,arguments)},Xf=t.dynCall_viij=function(){return(Xf=t.dynCall_viij=t.asm.ig).apply(null,arguments)},Qf=t.dynCall_vj=function(){return(Qf=t.dynCall_vj=t.asm.jg).apply(null,arguments)},eh=t.dynCall_iiji=function(){return(eh=t.dynCall_iiji=t.asm.kg).apply(null,arguments)},th=t.dynCall_iiiij=function(){return(th=t.dynCall_iiiij=t.asm.lg).apply(null,arguments)},ih=t.dynCall_iiiiiji=function(){return(ih=t.dynCall_iiiiiji=t.asm.mg).apply(null,arguments)},rh=t.dynCall_iiiji=function(){return(rh=t.dynCall_iiiji=t.asm.ng).apply(null,arguments)},nh=t.dynCall_iiiiji=function(){return(nh=t.dynCall_iiiiji=t.asm.og).apply(null,arguments)},sh=t.dynCall_jiii=function(){return(sh=t.dynCall_jiii=t.asm.pg).apply(null,arguments)},oh=t.dynCall_jij=function(){return(oh=t.dynCall_jij=t.asm.qg).apply(null,arguments)},ah=t.dynCall_j=function(){return(ah=t.dynCall_j=t.asm.rg).apply(null,arguments)},uh=t.dynCall_viijij=function(){return(uh=t.dynCall_viijij=t.asm.sg).apply(null,arguments)},ch=t.dynCall_iijjijj=function(){return(ch=t.dynCall_iijjijj=t.asm.tg).apply(null,arguments)},lh=t.dynCall_viiiijiiiii=function(){return(lh=t.dynCall_viiiijiiiii=t.asm.ug).apply(null,arguments)},dh=t.dynCall_viiiijiiii=function(){return(dh=t.dynCall_viiiijiiii=t.asm.vg).apply(null,arguments)},fh=t.dynCall_viiijii=function(){return(fh=t.dynCall_viiijii=t.asm.wg).apply(null,arguments)},hh=t.dynCall_viiiiiij=function(){return(hh=t.dynCall_viiiiiij=t.asm.xg).apply(null,arguments)},ph=t.dynCall_iiijiii=function(){return(ph=t.dynCall_iiijiii=t.asm.yg).apply(null,arguments)},yh=t.dynCall_iiiiijii=function(){return(yh=t.dynCall_iiiiijii=t.asm.zg).apply(null,arguments)},_h=t.dynCall_viijiii=function(){return(_h=t.dynCall_viijiii=t.asm.Ag).apply(null,arguments)},mh=t.dynCall_iiijiij=function(){return(mh=t.dynCall_iiijiij=t.asm.Bg).apply(null,arguments)},bh=t.dynCall_vijiii=function(){return(bh=t.dynCall_vijiii=t.asm.Cg).apply(null,arguments)},gh=t.dynCall_iijjii=function(){return(gh=t.dynCall_iijjii=t.asm.Dg).apply(null,arguments)},vh=t.dynCall_iijjiii=function(){return(vh=t.dynCall_iijjiii=t.asm.Eg).apply(null,arguments)},jh=t.dynCall_iijjiiii=function(){return(jh=t.dynCall_iijjiiii=t.asm.Fg).apply(null,arguments)},wh=t.dynCall_iijji=function(){return(wh=t.dynCall_iijji=t.asm.Gg).apply(null,arguments)},Bh=t.dynCall_vijiiii=function(){return(Bh=t.dynCall_vijiiii=t.asm.Hg).apply(null,arguments)},Ih=t.dynCall_iijiiii=function(){return(Ih=t.dynCall_iijiiii=t.asm.Ig).apply(null,arguments)},Th=t.dynCall_vijij=function(){return(Th=t.dynCall_vijij=t.asm.Jg).apply(null,arguments)},Sh=t.dynCall_iiijjjj=function(){return(Sh=t.dynCall_iiijjjj=t.asm.Kg).apply(null,arguments)},Ah=t.dynCall_iiijiiii=function(){return(Ah=t.dynCall_iiijiiii=t.asm.Lg).apply(null,arguments)},Dh=t.dynCall_jiiij=function(){return(Dh=t.dynCall_jiiij=t.asm.Mg).apply(null,arguments)},Oh=t.dynCall_jiiiii=function(){return(Oh=t.dynCall_jiiiii=t.asm.Ng).apply(null,arguments)},Fh=t.dynCall_iiiiijjiijj=function(){return(Fh=t.dynCall_iiiiijjiijj=t.asm.Og).apply(null,arguments)},Mh=t.dynCall_viijiiji=function(){return(Mh=t.dynCall_viijiiji=t.asm.Pg).apply(null,arguments)},Ch=t.dynCall_vjjijij=function(){return(Ch=t.dynCall_vjjijij=t.asm.Qg).apply(null,arguments)},Uh=t.dynCall_vijjji=function(){return(Uh=t.dynCall_vijjji=t.asm.Rg).apply(null,arguments)},Vh=t.dynCall_vjjii=function(){return(Vh=t.dynCall_vjjii=t.asm.Sg).apply(null,arguments)},kh=t.dynCall_viiiiiji=function(){return(kh=t.dynCall_viiiiiji=t.asm.Tg).apply(null,arguments)},Eh=t.dynCall_jiiiji=function(){return(Eh=t.dynCall_jiiiji=t.asm.Ug).apply(null,arguments)},Rh=t.dynCall_iijj=function(){return(Rh=t.dynCall_iijj=t.asm.Vg).apply(null,arguments)},Ph=t.dynCall_iiijjii=function(){return(Ph=t.dynCall_iiijjii=t.asm.Wg).apply(null,arguments)},Nh=t.dynCall_vijii=function(){return(Nh=t.dynCall_vijii=t.asm.Xg).apply(null,arguments)},Lh=t.dynCall_viijjii=function(){return(Lh=t.dynCall_viijjii=t.asm.Yg).apply(null,arguments)},xh=t.dynCall_viiiijj=function(){return(xh=t.dynCall_viiiijj=t.asm.Zg).apply(null,arguments)},qh=t.dynCall_jijjij=function(){return(qh=t.dynCall_jijjij=t.asm._g).apply(null,arguments)},zh=t.dynCall_jiijii=function(){return(zh=t.dynCall_jiijii=t.asm.$g).apply(null,arguments)},Wh=t.dynCall_jijiii=function(){return(Wh=t.dynCall_jijiii=t.asm.ah).apply(null,arguments)},Hh=t.dynCall_viijiiiii=function(){return(Hh=t.dynCall_viijiiiii=t.asm.bh).apply(null,arguments)},Yh=t.dynCall_viijiiij=function(){return(Yh=t.dynCall_viijiiij=t.asm.ch).apply(null,arguments)},$h=t.dynCall_vijiiiji=function(){return($h=t.dynCall_vijiiiji=t.asm.dh).apply(null,arguments)},Gh=t.dynCall_jiiji=function(){return(Gh=t.dynCall_jiiji=t.asm.eh).apply(null,arguments)},Jh=t.dynCall_viiijij=function(){return(Jh=t.dynCall_viiijij=t.asm.fh).apply(null,arguments)},Kh=t.dynCall_viijiij=function(){return(Kh=t.dynCall_viijiij=t.asm.gh).apply(null,arguments)},Zh=t.dynCall_viiiiijj=function(){return(Zh=t.dynCall_viiiiijj=t.asm.hh).apply(null,arguments)},Xh=t.dynCall_viiijji=function(){return(Xh=t.dynCall_viiijji=t.asm.ih).apply(null,arguments)},Qh=t.dynCall_viiiji=function(){return(Qh=t.dynCall_viiiji=t.asm.jh).apply(null,arguments)},ep=t.dynCall_iiiijiii=function(){return(ep=t.dynCall_iiiijiii=t.asm.kh).apply(null,arguments)},tp=t.dynCall_iiijij=function(){return(tp=t.dynCall_iiijij=t.asm.lh).apply(null,arguments)},ip=t.dynCall_iiijji=function(){return(ip=t.dynCall_iiijji=t.asm.mh).apply(null,arguments)},rp=t.dynCall_viijji=function(){return(rp=t.dynCall_viijji=t.asm.nh).apply(null,arguments)},np=t.dynCall_iiiijj=function(){return(np=t.dynCall_iiiijj=t.asm.oh).apply(null,arguments)},sp=t.dynCall_viiijiii=function(){return(sp=t.dynCall_viiijiii=t.asm.ph).apply(null,arguments)},op=t.dynCall_vijji=function(){return(op=t.dynCall_vijji=t.asm.qh).apply(null,arguments)},ap=t.dynCall_jiiiij=function(){return(ap=t.dynCall_jiiiij=t.asm.rh).apply(null,arguments)},up=t.dynCall_jiijiiiii=function(){return(up=t.dynCall_jiijiiiii=t.asm.sh).apply(null,arguments)},cp=t.dynCall_jiijiijiii=function(){return(cp=t.dynCall_jiijiijiii=t.asm.th).apply(null,arguments)},lp=t.dynCall_jiijjiii=function(){return(lp=t.dynCall_jiijjiii=t.asm.uh).apply(null,arguments)},dp=t.dynCall_jiiijii=function(){return(dp=t.dynCall_jiiijii=t.asm.vh).apply(null,arguments)},fp=t.dynCall_jiijijii=function(){return(fp=t.dynCall_jiijijii=t.asm.wh).apply(null,arguments)},hp=t.dynCall_viiijjij=function(){return(hp=t.dynCall_viiijjij=t.asm.xh).apply(null,arguments)},pp=t.dynCall_vijijjiij=function(){return(pp=t.dynCall_vijijjiij=t.asm.yh).apply(null,arguments)},yp=t.dynCall_viijjij=function(){return(yp=t.dynCall_viijjij=t.asm.zh).apply(null,arguments)},_p=t.dynCall_viiijjiij=function(){return(_p=t.dynCall_viiijjiij=t.asm.Ah).apply(null,arguments)},mp=t.dynCall_viiiijjjj=function(){return(mp=t.dynCall_viiiijjjj=t.asm.Bh).apply(null,arguments)},bp=t.dynCall_viijiiiiij=function(){return(bp=t.dynCall_viijiiiiij=t.asm.Ch).apply(null,arguments)},gp=t.dynCall_viijiiiijj=function(){return(gp=t.dynCall_viijiiiijj=t.asm.Dh).apply(null,arguments)},vp=t.dynCall_viiijiiiijjj=function(){return(vp=t.dynCall_viiijiiiijjj=t.asm.Eh).apply(null,arguments)},jp=t.dynCall_viijijiiiijjj=function(){return(jp=t.dynCall_viijijiiiijjj=t.asm.Fh).apply(null,arguments)},wp=t.dynCall_viiiiijiiii=function(){return(wp=t.dynCall_viiiiijiiii=t.asm.Gh).apply(null,arguments)},Bp=t.dynCall_iiijii=function(){return(Bp=t.dynCall_iiijii=t.asm.Hh).apply(null,arguments)},Ip=t.dynCall_fiijii=function(){return(Ip=t.dynCall_fiijii=t.asm.Ih).apply(null,arguments)},Tp=t.dynCall_diijii=function(){return(Tp=t.dynCall_diijii=t.asm.Jh).apply(null,arguments)},Sp=t.dynCall_iiiiiiijii=function(){return(Sp=t.dynCall_iiiiiiijii=t.asm.Kh).apply(null,arguments)},Ap=t.dynCall_viiiiji=function(){return(Ap=t.dynCall_viiiiji=t.asm.Lh).apply(null,arguments)},Dp=t.dynCall_jiiiijii=function(){return(Dp=t.dynCall_jiiiijii=t.asm.Mh).apply(null,arguments)},Op=t.dynCall_jiiiijiiiiiiii=function(){return(Op=t.dynCall_jiiiijiiiiiiii=t.asm.Nh).apply(null,arguments)},Fp=t.dynCall_jiiijiii=function(){return(Fp=t.dynCall_jiiijiii=t.asm.Oh).apply(null,arguments)},Mp=t.dynCall_jiiiiijiiii=function(){return(Mp=t.dynCall_jiiiiijiiii=t.asm.Ph).apply(null,arguments)},Cp=t.dynCall_jj=function(){return(Cp=t.dynCall_jj=t.asm.Qh).apply(null,arguments)},Up=t.dynCall_jd=function(){return(Up=t.dynCall_jd=t.asm.Rh).apply(null,arguments)},Vp=t.dynCall_jf=function(){return(Vp=t.dynCall_jf=t.asm.Sh).apply(null,arguments)},kp=t.dynCall_iijjj=function(){return(kp=t.dynCall_iijjj=t.asm.Th).apply(null,arguments)},Ep=t.dynCall_iiijj=function(){return(Ep=t.dynCall_iiijj=t.asm.Uh).apply(null,arguments)},Rp=t.dynCall_vijijiiiijjj=function(){return(Rp=t.dynCall_vijijiiiijjj=t.asm.Vh).apply(null,arguments)},Pp=t.dynCall_iiiiiiji=function(){return(Pp=t.dynCall_iiiiiiji=t.asm.Wh).apply(null,arguments)},Np=t.dynCall_iiiiiiiiji=function(){return(Np=t.dynCall_iiiiiiiiji=t.asm.Xh).apply(null,arguments)},Lp=t.dynCall_jijijjij=function(){return(Lp=t.dynCall_jijijjij=t.asm.Yh).apply(null,arguments)},xp=t.dynCall_viijjj=function(){return(xp=t.dynCall_viijjj=t.asm.Zh).apply(null,arguments)},qp=t.dynCall_vijjij=function(){return(qp=t.dynCall_vijjij=t.asm._h).apply(null,arguments)},zp=t.dynCall_viijjji=function(){return(zp=t.dynCall_viijjji=t.asm.$h).apply(null,arguments)},Wp=t.dynCall_iiiiiij=function(){return(Wp=t.dynCall_iiiiiij=t.asm.ai).apply(null,arguments)},Hp=t.dynCall_iiiiiiiiiiji=function(){return(Hp=t.dynCall_iiiiiiiiiiji=t.asm.bi).apply(null,arguments)},Yp=t.dynCall_jiiiiiii=function(){return(Yp=t.dynCall_jiiiiiii=t.asm.ci).apply(null,arguments)},$p=t.dynCall_jijj=function(){return($p=t.dynCall_jijj=t.asm.di).apply(null,arguments)},Gp=t.dynCall_viiiijiiiiiiii=function(){return(Gp=t.dynCall_viiiijiiiiiiii=t.asm.ei).apply(null,arguments)},Jp=t.dynCall_ij=function(){return(Jp=t.dynCall_ij=t.asm.fi).apply(null,arguments)},Kp=t.dynCall_jjj=function(){return(Kp=t.dynCall_jjj=t.asm.gi).apply(null,arguments)},Zp=t.dynCall_vjii=function(){return(Zp=t.dynCall_vjii=t.asm.hi).apply(null,arguments)},Xp=t.dynCall_jjjjjjd=function(){return(Xp=t.dynCall_jjjjjjd=t.asm.ii).apply(null,arguments)},Qp=t.dynCall_vjiiii=function(){return(Qp=t.dynCall_vjiiii=t.asm.ji).apply(null,arguments)},ey=t.dynCall_viiiiijiii=function(){return(ey=t.dynCall_viiiiijiii=t.asm.ki).apply(null,arguments)},ty=t.dynCall_jiij=function(){return(ty=t.dynCall_jiij=t.asm.li).apply(null,arguments)},iy=t.dynCall_iiiijjii=function(){return(iy=t.dynCall_iiiijjii=t.asm.mi).apply(null,arguments)},ry=t.dynCall_iiiiijji=function(){return(ry=t.dynCall_iiiiijji=t.asm.ni).apply(null,arguments)},ny=t.dynCall_viiijjii=function(){return(ny=t.dynCall_viiijjii=t.asm.oi).apply(null,arguments)},sy=t.dynCall_viiiijji=function(){return(sy=t.dynCall_viiiijji=t.asm.pi).apply(null,arguments)},oy=t.dynCall_viiiijjii=function(){return(oy=t.dynCall_viiiijjii=t.asm.qi).apply(null,arguments)},ay=t.dynCall_viiiiijji=function(){return(ay=t.dynCall_viiiiijji=t.asm.ri).apply(null,arguments)},uy=t.dynCall_iiiiiijji=function(){return(uy=t.dynCall_iiiiiijji=t.asm.si).apply(null,arguments)},cy=t.dynCall_iiiiijjj=function(){return(cy=t.dynCall_iiiiijjj=t.asm.ti).apply(null,arguments)},ly=t.dynCall_jijiiii=function(){return(ly=t.dynCall_jijiiii=t.asm.ui).apply(null,arguments)},dy=t.dynCall_iiijjjii=function(){return(dy=t.dynCall_iiijjjii=t.asm.vi).apply(null,arguments)},fy=t.dynCall_iiiiijjji=function(){return(fy=t.dynCall_iiiiijjji=t.asm.wi).apply(null,arguments)},hy=t.dynCall_iiiijjj=function(){return(hy=t.dynCall_iiiijjj=t.asm.xi).apply(null,arguments)},py=t.dynCall_iidj=function(){return(py=t.dynCall_iidj=t.asm.yi).apply(null,arguments)},yy=t.dynCall_ijji=function(){return(yy=t.dynCall_ijji=t.asm.zi).apply(null,arguments)},_y=t.dynCall_iiiiiiiij=function(){return(_y=t.dynCall_iiiiiiiij=t.asm.Ai).apply(null,arguments)},my=t.dynCall_iiiiiiij=function(){return(my=t.dynCall_iiiiiiij=t.asm.Bi).apply(null,arguments)},by=t.dynCall_iiiiiiiiiiiij=function(){return(by=t.dynCall_iiiiiiiiiiiij=t.asm.Ci).apply(null,arguments)},gy=t.dynCall_iiiiiiiji=function(){return(gy=t.dynCall_iiiiiiiji=t.asm.Di).apply(null,arguments)},vy=t.dynCall_iiiidjj=function(){return(vy=t.dynCall_iiiidjj=t.asm.Ei).apply(null,arguments)},jy=t.dynCall_jiiiiiijii=function(){return(jy=t.dynCall_jiiiiiijii=t.asm.Fi).apply(null,arguments)},wy=t.dynCall_iiiijji=function(){return(wy=t.dynCall_iiiijji=t.asm.Gi).apply(null,arguments)},By=t.dynCall_jiiiiii=function(){return(By=t.dynCall_jiiiiii=t.asm.Hi).apply(null,arguments)},Iy=t.dynCall_iijiji=function(){return(Iy=t.dynCall_iijiji=t.asm.Ii).apply(null,arguments)},Ty=t.dynCall_vjiiiji=function(){return(Ty=t.dynCall_vjiiiji=t.asm.Ji).apply(null,arguments)},Sy=t.dynCall_jjjii=function(){return(Sy=t.dynCall_jjjii=t.asm.Ki).apply(null,arguments)},Ay=t.dynCall_jji=function(){return(Ay=t.dynCall_jji=t.asm.Li).apply(null,arguments)},Dy=t.dynCall_viiijijiji=function(){return(Dy=t.dynCall_viiijijiji=t.asm.Mi).apply(null,arguments)},Oy=t.dynCall_jiiijj=function(){return(Oy=t.dynCall_jiiijj=t.asm.Ni).apply(null,arguments)},Fy=t.dynCall_iiiijii=function(){return(Fy=t.dynCall_iiiijii=t.asm.Oi).apply(null,arguments)},My=t.dynCall_viiiijii=function(){return(My=t.dynCall_viiiijii=t.asm.Pi).apply(null,arguments)},Cy=t.dynCall_iijiii=function(){return(Cy=t.dynCall_iijiii=t.asm.Qi).apply(null,arguments)},Uy=t.dynCall_jiiiiji=function(){return(Uy=t.dynCall_jiiiiji=t.asm.Ri).apply(null,arguments)},Vy=t.dynCall_vijiijj=function(){return(Vy=t.dynCall_vijiijj=t.asm.Si).apply(null,arguments)},ky=t.dynCall_vifiijj=function(){return(ky=t.dynCall_vifiijj=t.asm.Ti).apply(null,arguments)},Ey=t.dynCall_vidiijj=function(){return(Ey=t.dynCall_vidiijj=t.asm.Ui).apply(null,arguments)},Ry=t.dynCall_viiiiij=function(){return(Ry=t.dynCall_viiiiij=t.asm.Vi).apply(null,arguments)},Py=t.dynCall_ijj=function(){return(Py=t.dynCall_ijj=t.asm.Wi).apply(null,arguments)},Ny=t.dynCall_ijjiii=function(){return(Ny=t.dynCall_ijjiii=t.asm.Xi).apply(null,arguments)},Ly=t.dynCall_vijijjji=function(){return(Ly=t.dynCall_vijijjji=t.asm.Yi).apply(null,arguments)},xy=t.dynCall_viijiijj=function(){return(xy=t.dynCall_viijiijj=t.asm.Zi).apply(null,arguments)},qy=t.dynCall_viijijj=function(){return(qy=t.dynCall_viijijj=t.asm._i).apply(null,arguments)},zy=t.dynCall_viiiiijjji=function(){return(zy=t.dynCall_viiiiijjji=t.asm.$i).apply(null,arguments)},Wy=t.dynCall_iiijiijj=function(){return(Wy=t.dynCall_iiijiijj=t.asm.aj).apply(null,arguments)},Hy=t.dynCall_viiijijjj=function(){return(Hy=t.dynCall_viiijijjj=t.asm.bj).apply(null,arguments)},Yy=t.dynCall_iijiijj=function(){return(Yy=t.dynCall_iijiijj=t.asm.cj).apply(null,arguments)},$y=t.dynCall_viiijjjji=function(){return($y=t.dynCall_viiijjjji=t.asm.dj).apply(null,arguments)},Gy=t.dynCall_viiiijiii=function(){return(Gy=t.dynCall_viiiijiii=t.asm.ej).apply(null,arguments)},Jy=t.dynCall_viijiiii=function(){return(Jy=t.dynCall_viijiiii=t.asm.fj).apply(null,arguments)},Ky=t.dynCall_iijii=function(){return(Ky=t.dynCall_iijii=t.asm.gj).apply(null,arguments)},Zy=t.dynCall_vijjiiii=function(){return(Zy=t.dynCall_vijjiiii=t.asm.hj).apply(null,arguments)},Xy=t.dynCall_vijijjiiiii=function(){return(Xy=t.dynCall_vijijjiiiii=t.asm.ij).apply(null,arguments)},Qy=t.dynCall_vijjiiiii=function(){return(Qy=t.dynCall_vijjiiiii=t.asm.jj).apply(null,arguments)},e_=t.dynCall_iiijjji=function(){return(e_=t.dynCall_iiijjji=t.asm.kj).apply(null,arguments)},t_=t.dynCall_viijiji=function(){return(t_=t.dynCall_viijiji=t.asm.lj).apply(null,arguments)};function _B(s){var a=w();try{$.get(s)()}catch(u){if(B(a),u!==u+0&&u!=="longjmp")throw u;I(1,0)}}function mB(s,a,u){var c=w();try{$.get(s)(a,u)}catch(d){if(B(c),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function bB(s,a){var u=w();try{return $.get(s)(a)}catch(c){if(B(u),c!==c+0&&c!=="longjmp")throw c;I(1,0)}}function gB(s,a,u){var c=w();try{return $.get(s)(a,u)}catch(d){if(B(c),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function vB(s,a){var u=w();try{$.get(s)(a)}catch(c){if(B(u),c!==c+0&&c!=="longjmp")throw c;I(1,0)}}function jB(s,a,u,c){var d=w();try{return $.get(s)(a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function wB(s,a,u,c,d,f){var h=w();try{return $.get(s)(a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function BB(s,a,u,c,d){var f=w();try{$.get(s)(a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function IB(s,a,u,c,d){var f=w();try{return $.get(s)(a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function TB(s,a,u,c){var d=w();try{return $.get(s)(a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function SB(s,a,u,c){var d=w();try{return $.get(s)(a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function AB(s,a,u,c){var d=w();try{$.get(s)(a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function DB(s,a,u,c){var d=w();try{$.get(s)(a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function OB(s,a,u,c){var d=w();try{$.get(s)(a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function FB(s,a,u){var c=w();try{return $.get(s)(a,u)}catch(d){if(B(c),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function MB(s,a,u){var c=w();try{return $.get(s)(a,u)}catch(d){if(B(c),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function CB(s,a,u,c,d,f,h){var p=w();try{$.get(s)(a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function UB(s,a,u,c,d,f){var h=w();try{$.get(s)(a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function VB(s,a,u,c,d,f,h,p,y){var m=w();try{return $.get(s)(a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function kB(s,a,u,c,d,f,h){var p=w();try{return $.get(s)(a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function EB(s,a,u,c,d,f,h,p){var y=w();try{return $.get(s)(a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function RB(s){var a=w();try{return $.get(s)()}catch(u){if(B(a),u!==u+0&&u!=="longjmp")throw u;I(1,0)}}function PB(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{return $.get(s)(a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function NB(s,a,u,c,d,f,h,p){var y=w();try{$.get(s)(a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function LB(s,a,u,c,d,f,h,p,y,m,b,j){var A=w();try{return $.get(s)(a,u,c,d,f,h,p,y,m,b,j)}catch(M){if(B(A),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function xB(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{$.get(s)(a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function qB(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R,Z){var le=w();try{$.get(s)(a,u,c,d,f,h,p,y,m,b,j,A,M,R,Z)}catch(Oe){if(B(le),Oe!==Oe+0&&Oe!=="longjmp")throw Oe;I(1,0)}}function zB(s,a,u,c,d){var f=w();try{return $.get(s)(a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function WB(s,a,u,c,d){var f=w();try{return $.get(s)(a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function HB(s,a,u,c,d,f){var h=w();try{$.get(s)(a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function YB(s,a,u){var c=w();try{$.get(s)(a,u)}catch(d){if(B(c),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function $B(s,a,u){var c=w();try{$.get(s)(a,u)}catch(d){if(B(c),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function GB(s,a){var u=w();try{return $.get(s)(a)}catch(c){if(B(u),c!==c+0&&c!=="longjmp")throw c;I(1,0)}}function JB(s,a,u,c){var d=w();try{return $.get(s)(a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function KB(s,a){var u=w();try{return $.get(s)(a)}catch(c){if(B(u),c!==c+0&&c!=="longjmp")throw c;I(1,0)}}function ZB(s,a,u,c,d,f,h,p,y){var m=w();try{$.get(s)(a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function XB(s,a,u,c,d,f){var h=w();try{return $.get(s)(a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function QB(s,a,u,c){var d=w();try{$.get(s)(a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function eI(s,a,u,c){var d=w();try{$.get(s)(a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function tI(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R){var Z=w();try{return $.get(s)(a,u,c,d,f,h,p,y,m,b,j,A,M,R)}catch(le){if(B(Z),le!==le+0&&le!=="longjmp")throw le;I(1,0)}}function iI(s,a,u){var c=w();try{return $.get(s)(a,u)}catch(d){if(B(c),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function rI(s,a,u,c,d,f,h,p,y,m,b,j,A,M){var R=w();try{$.get(s)(a,u,c,d,f,h,p,y,m,b,j,A,M)}catch(Z){if(B(R),Z!==Z+0&&Z!=="longjmp")throw Z;I(1,0)}}function nI(s,a,u,c,d,f,h,p,y,m){var b=w();try{$.get(s)(a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function sI(s){var a=w();try{return $.get(s)()}catch(u){if(B(a),u!==u+0&&u!=="longjmp")throw u;I(1,0)}}function oI(s){var a=w();try{return $.get(s)()}catch(u){if(B(a),u!==u+0&&u!=="longjmp")throw u;I(1,0)}}function aI(s,a){var u=w();try{return $.get(s)(a)}catch(c){if(B(u),c!==c+0&&c!=="longjmp")throw c;I(1,0)}}function uI(s,a){var u=w();try{return $.get(s)(a)}catch(c){if(B(u),c!==c+0&&c!=="longjmp")throw c;I(1,0)}}function cI(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R,Z,le,Oe,U,G,me){var pe=w();try{return $.get(s)(a,u,c,d,f,h,p,y,m,b,j,A,M,R,Z,le,Oe,U,G,me)}catch(lt){if(B(pe),lt!==lt+0&&lt!=="longjmp")throw lt;I(1,0)}}function lI(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R,Z,le,Oe,U,G){var me=w();try{return $.get(s)(a,u,c,d,f,h,p,y,m,b,j,A,M,R,Z,le,Oe,U,G)}catch(pe){if(B(me),pe!==pe+0&&pe!=="longjmp")throw pe;I(1,0)}}function dI(s,a,u){var c=w();try{return $.get(s)(a,u)}catch(d){if(B(c),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function fI(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{$.get(s)(a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function hI(s,a,u,c){var d=w();try{return $.get(s)(a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function pI(s,a,u,c,d,f,h,p,y,m){var b=w();try{$.get(s)(a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function yI(s,a,u,c,d,f,h,p,y,m,b,j){var A=w();try{$.get(s)(a,u,c,d,f,h,p,y,m,b,j)}catch(M){if(B(A),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function _I(s,a,u,c,d){var f=w();try{return Hf(s,a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function mI(s,a,u,c,d,f,h){var p=w();try{Nf(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function bI(s,a,u,c,d){var f=w();try{Xf(s,a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function gI(s,a,u,c,d,f,h){var p=w();try{return Yf(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function vI(s,a,u,c){var d=w();try{Pf(s,a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function jI(s,a,u,c,d,f,h){var p=w();try{zf(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function wI(s,a,u,c,d,f){var h=w();try{Cf(s,a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function BI(s,a,u,c,d,f,h,p,y,m){var b=w();try{Uf(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function II(s,a,u,c,d){var f=w();try{return Vf(s,a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function TI(s,a,u,c,d,f,h,p,y){var m=w();try{kf(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function SI(s,a,u,c){var d=w();try{return Ef(s,a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function AI(s,a,u,c,d){var f=w();try{Rf(s,a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function DI(s,a){var u=w();try{return Lf(s,a)}catch(c){if(B(u),c!==c+0&&c!=="longjmp")throw c;I(1,0)}}function OI(s,a,u,c,d,f,h,p){var y=w();try{xf(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function FI(s,a,u,c,d,f,h,p){var y=w();try{qf(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function MI(s,a,u,c,d,f,h,p,y){var m=w();try{xp(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function CI(s,a,u,c,d,f,h,p,y){var m=w();try{return $f(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function UI(s,a,u){var c=w();try{return Wf(s,a,u)}catch(d){if(B(c),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function VI(s,a,u,c,d){var f=w();try{return Py(s,a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function kI(s,a,u,c,d,f,h,p){var y=w();try{return Ny(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function EI(s,a,u,c,d,f,h){var p=w();try{Jf(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function RI(s,a,u,c,d,f){var h=w();try{Kf(s,a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function PI(s,a,u,c,d,f){var h=w();try{Zf(s,a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function NI(s,a,u,c){var d=w();try{return Gf(s,a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function LI(s,a,u){var c=w();try{Qf(s,a,u)}catch(d){if(B(c),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function xI(s,a,u,c,d){var f=w();try{return eh(s,a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function qI(s,a,u,c,d,f){var h=w();try{return th(s,a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function zI(s,a,u,c,d,f,h,p){var y=w();try{return np(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function WI(s,a,u,c,d,f,h,p){var y=w();try{Ap(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function HI(s,a,u,c,d,f,h,p){var y=w();try{return tp(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function YI(s,a,u,c,d,f){var h=w();try{return rh(s,a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function $I(s,a,u,c,d,f){var h=w();try{return Rh(s,a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function GI(s,a,u,c,d,f,h,p){var y=w();try{return ip(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function JI(s,a,u,c,d,f,h,p){var y=w();try{rp(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function KI(s){var a=w();try{return ah(s)}catch(u){if(B(a),u!==u+0&&u!=="longjmp")throw u;I(1,0)}}function ZI(s,a,u,c,d,f,h,p){var y=w();try{return ih(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function XI(s,a,u,c,d,f,h){var p=w();try{return nh(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function QI(s,a,u,c){var d=w();try{return sh(s,a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function e1(s,a,u,c,d,f,h){var p=w();try{bh(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function t1(s,a,u,c,d,f,h,p){var y=w();try{Bh(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function i1(s,a,u,c,d,f,h,p){var y=w();try{return Ih(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function r1(s,a,u,c,d,f,h,p){var y=w();try{return ph(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function n1(s,a,u,c,d,f,h,p,y){var m=w();try{return yh(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function s1(s,a,u,c,d,f,h,p){var y=w();try{_h(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function o1(s,a,u,c,d,f,h,p,y){var m=w();try{return mh(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function a1(s,a,u,c,d,f,h,p){var y=w();try{return gh(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function u1(s,a,u,c,d,f,h,p,y){var m=w();try{return vh(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function c1(s,a,u,c,d,f,h,p,y,m){var b=w();try{return jh(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function l1(s,a,u,c,d,f,h){var p=w();try{return wh(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function d1(s,a,u,c,d,f,h,p,y){var m=w();try{hh(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function f1(s,a,u,c,d,f,h,p){var y=w();try{fh(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function h1(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{return ch(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function p1(s,a,u,c,d,f,h,p,y,m,b,j){var A=w();try{lh(s,a,u,c,d,f,h,p,y,m,b,j)}catch(M){if(B(A),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function y1(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{dh(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function _1(s,a,u,c,d,f,h){var p=w();try{Vh(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function m1(s,a,u,c,d,f,h){var p=w();try{Qh(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function b1(s,a,u,c,d,f,h,p,y){var m=w();try{xh(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function g1(s,a,u,c,d,f,h,p,y){var m=w();try{return Ah(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function v1(s,a,u,c,d,f,h,p,y){var m=w();try{Xh(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function j1(s,a,u,c){var d=w();try{return oh(s,a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function w1(s,a,u,c,d,f){var h=w();try{return Dh(s,a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function B1(s,a,u,c,d,f,h,p,y){var m=w();try{Uh(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function I1(s,a,u,c,d,f){var h=w();try{return Oh(s,a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function T1(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{Ch(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function S1(s,a,u,c,d,f){var h=w();try{return Gh(s,a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function A1(s,a,u,c,d,f,h,p,y,m){var b=w();try{Mh(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function D1(s,a,u,c,d,f,h){var p=w();try{return Eh(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function O1(s,a,u,c,d,f,h){var p=w();try{Th(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function F1(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{return Sh(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function M1(s,a,u,c,d,f,h,p,y){var m=w();try{kh(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function C1(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R){var Z=w();try{return Fh(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R)}catch(le){if(B(Z),le!==le+0&&le!=="longjmp")throw le;I(1,0)}}function U1(s,a,u,c,d,f,h,p,y){var m=w();try{return Ph(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function V1(s,a,u,c,d,f,h,p){var y=w();try{uh(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function k1(s,a,u,c,d,f){var h=w();try{Nh(s,a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function E1(s,a,u,c,d,f,h,p,y){var m=w();try{Lh(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function R1(s,a,u,c,d,f,h){var p=w();try{return zh(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function P1(s,a,u,c,d,f,h,p,y,m){var b=w();try{Hh(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function N1(s,a,u,c,d,f,h,p,y,m){var b=w();try{Yh(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function L1(s,a,u,c,d,f,h){var p=w();try{return Wh(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function x1(s,a,u,c,d,f,h,p,y,m){var b=w();try{$h(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function q1(s,a,u,c,d,f,h,p,y){var m=w();try{return qh(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function z1(s,a,u,c,d,f,h,p,y){var m=w();try{Kh(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function W1(s,a,u,c,d,f,h,p,y){var m=w();try{return ep(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function H1(s,a,u,c,d,f,h,p,y){var m=w();try{sp(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function Y1(s,a,u,c,d,f,h){var p=w();try{op(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function $1(s,a,u,c,d,f,h){var p=w();try{return ap(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function G1(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{hp(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function J1(s,a,u,c,d,f,h,p,y,m,b,j,A){var M=w();try{pp(s,a,u,c,d,f,h,p,y,m,b,j,A)}catch(R){if(B(M),R!==R+0&&R!=="longjmp")throw R;I(1,0)}}function K1(s,a,u,c,d,f,h,p,y,m){var b=w();try{yp(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function Z1(s,a,u,c,d,f,h,p,y,m,b,j,A){var M=w();try{mp(s,a,u,c,d,f,h,p,y,m,b,j,A)}catch(R){if(B(M),R!==R+0&&R!=="longjmp")throw R;I(1,0)}}function X1(s,a,u,c,d,f,h,p,y,m){var b=w();try{return up(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function Q1(s,a,u,c,d,f,h,p,y,m,b,j){var A=w();try{return cp(s,a,u,c,d,f,h,p,y,m,b,j)}catch(M){if(B(A),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function eT(s,a,u,c,d,f,h,p,y,m){var b=w();try{return lp(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function tT(s,a,u,c,d,f,h,p){var y=w();try{return dp(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function iT(s,a,u,c,d,f,h,p,y,m){var b=w();try{return fp(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function rT(s,a,u,c,d,f,h,p,y,m,b,j){var A=w();try{bp(s,a,u,c,d,f,h,p,y,m,b,j)}catch(M){if(B(A),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function nT(s,a,u,c,d,f,h,p,y,m,b,j,A){var M=w();try{gp(s,a,u,c,d,f,h,p,y,m,b,j,A)}catch(R){if(B(M),R!==R+0&&R!=="longjmp")throw R;I(1,0)}}function sT(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R,Z){var le=w();try{vp(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R,Z)}catch(Oe){if(B(le),Oe!==Oe+0&&Oe!=="longjmp")throw Oe;I(1,0)}}function oT(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R,Z,le,Oe){var U=w();try{jp(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R,Z,le,Oe)}catch(G){if(B(U),G!==G+0&&G!=="longjmp")throw G;I(1,0)}}function aT(s,a,u,c,d,f,h,p,y,m,b,j){var A=w();try{_p(s,a,u,c,d,f,h,p,y,m,b,j)}catch(M){if(B(A),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function uT(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{return jy(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function cT(s,a,u,c,d,f,h,p,y){var m=w();try{return wy(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function lT(s,a,u,c,d,f,h,p,y,m,b,j){var A=w();try{wp(s,a,u,c,d,f,h,p,y,m,b,j)}catch(M){if(B(A),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function dT(s,a,u,c,d,f,h,p,y){var m=w();try{return Dp(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function fT(s,a,u,c,d,f,h){var p=w();try{return Bp(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function hT(s,a,u,c,d,f,h){var p=w();try{return Ip(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function pT(s,a,u,c,d,f,h){var p=w();try{return Tp(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function yT(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{return Sp(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function _T(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R){var Z=w();try{return Op(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R)}catch(le){if(B(Z),le!==le+0&&le!=="longjmp")throw le;I(1,0)}}function mT(s,a,u,c,d,f,h,p,y){var m=w();try{return Fp(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function bT(s,a,u,c,d,f,h,p,y,m,b,j){var A=w();try{return Mp(s,a,u,c,d,f,h,p,y,m,b,j)}catch(M){if(B(A),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function gT(s,a,u){var c=w();try{return Cp(s,a,u)}catch(d){if(B(c),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function vT(s,a){var u=w();try{return Up(s,a)}catch(c){if(B(u),c!==c+0&&c!=="longjmp")throw c;I(1,0)}}function jT(s,a){var u=w();try{return Vp(s,a)}catch(c){if(B(u),c!==c+0&&c!=="longjmp")throw c;I(1,0)}}function wT(s,a,u,c,d,f,h){var p=w();try{return By(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function BT(s,a,u,c,d,f){var h=w();try{return yy(s,a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function IT(s,a,u,c,d,f,h,p,y){var m=w();try{return Pp(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function TT(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{return Np(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function ST(s,a,u,c,d,f,h,p,y,m){var b=w();try{Zh(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function AT(s,a,u,c,d,f,h){var p=w();try{return Ep(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function DT(s,a,u,c,d,f,h,p){var y=w();try{return kp(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function OT(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R,Z,le){var Oe=w();try{Rp(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R,Z,le)}catch(U){if(B(Oe),U!==U+0&&U!=="longjmp")throw U;I(1,0)}}function FT(s,a,u,c,d,f,h,p,y,m,b,j){var A=w();try{return Lp(s,a,u,c,d,f,h,p,y,m,b,j)}catch(M){if(B(A),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function MT(s,a,u,c,d,f,h,p,y){var m=w();try{qp(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function CT(s,a,u,c,d,f,h,p,y,m){var b=w();try{return _y(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function UT(s,a,u,c,d,f,h,p,y,m){var b=w();try{zp(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function VT(s,a,u,c,d,f,h,p){var y=w();try{return Wp(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function kT(s,a,u,c,d,f,h,p,y,m,b,j,A){var M=w();try{return Hp(s,a,u,c,d,f,h,p,y,m,b,j,A)}catch(R){if(B(M),R!==R+0&&R!=="longjmp")throw R;I(1,0)}}function ET(s,a,u,c,d,f,h,p){var y=w();try{return Yp(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function RT(s,a,u,c,d,f,h,p,y){var m=w();try{return my(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function PT(s,a,u,c,d,f,h,p,y,m,b,j,A,M){var R=w();try{return by(s,a,u,c,d,f,h,p,y,m,b,j,A,M)}catch(Z){if(B(R),Z!==Z+0&&Z!=="longjmp")throw Z;I(1,0)}}function NT(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{ey(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function LT(s,a,u,c,d){var f=w();try{return ty(s,a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function xT(s,a,u){var c=w();try{return Jp(s,a,u)}catch(d){if(B(c),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function qT(s,a,u,c,d,f,h){var p=w();try{Qp(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function zT(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R){var Z=w();try{Gp(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R)}catch(le){if(B(Z),le!==le+0&&le!=="longjmp")throw le;I(1,0)}}function WT(s,a,u,c,d){var f=w();try{return Kp(s,a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function HT(s,a,u,c,d){var f=w();try{Zp(s,a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function YT(s,a,u,c,d,f,h,p,y,m,b,j){var A=w();try{return Xp(s,a,u,c,d,f,h,p,y,m,b,j)}catch(M){if(B(A),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function $T(s,a,u,c,d,f,h,p,y,m){var b=w();try{return iy(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function GT(s,a,u,c,d,f,h,p,y,m){var b=w();try{return ry(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function JT(s,a,u,c,d,f,h,p,y,m){var b=w();try{ny(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function KT(s,a,u,c,d,f,h,p,y,m){var b=w();try{sy(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function ZT(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{oy(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function XT(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{ay(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function QT(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{return uy(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function eS(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{return dy(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function tS(s,a,u,c,d,f,h,p){var y=w();try{return ly(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function iS(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{return cy(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function rS(s,a,u,c,d,f,h,p,y,m,b,j){var A=w();try{return fy(s,a,u,c,d,f,h,p,y,m,b,j)}catch(M){if(B(A),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function nS(s,a,u,c,d,f,h,p,y,m){var b=w();try{return hy(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function sS(s,a,u,c,d){var f=w();try{return py(s,a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function oS(s,a,u,c,d,f,h,p,y,m){var b=w();try{return gy(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function aS(s,a,u,c,d,f,h,p,y){var m=w();try{return vy(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function uS(s,a,u,c,d,f,h,p){var y=w();try{return Iy(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function cS(s,a,u,c,d,f,h,p,y){var m=w();try{Ty(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function lS(s,a,u,c,d,f,h){var p=w();try{return Sy(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function dS(s,a,u,c){var d=w();try{return Ay(s,a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function fS(s,a,u,c,d,f,h,p,y,m,b,j,A){var M=w();try{Dy(s,a,u,c,d,f,h,p,y,m,b,j,A)}catch(R){if(B(M),R!==R+0&&R!=="longjmp")throw R;I(1,0)}}function hS(s,a,u,c,d,f,h,p,y){var m=w();try{Jh(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function pS(s,a,u,c,d,f,h,p){var y=w();try{return Oy(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function yS(s,a,u,c,d,f,h,p){var y=w();try{return Fy(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function _S(s,a,u,c,d,f,h,p,y){var m=w();try{My(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function mS(s,a,u,c,d,f,h){var p=w();try{return Cy(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function bS(s,a,u,c,d,f,h,p){var y=w();try{return Uy(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function gS(s,a,u,c,d,f,h,p,y,m){var b=w();try{Vy(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function vS(s,a,u,c,d,f,h,p,y){var m=w();try{ky(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function jS(s,a,u,c,d,f,h,p,y){var m=w();try{Ey(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function wS(s,a,u,c,d,f,h,p){var y=w();try{Ry(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function BS(s,a,u,c,d,f,h,p,y,m,b,j){var A=w();try{Ly(s,a,u,c,d,f,h,p,y,m,b,j)}catch(M){if(B(A),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function IS(s,a,u,c,d,f){var h=w();try{return $p(s,a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function TS(s,a,u,c,d,f,h,p,y,m){var b=w();try{qy(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function SS(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{return Wy(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function AS(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{xy(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function DS(s,a,u,c,d,f,h,p,y,m,b,j,A){var M=w();try{zy(s,a,u,c,d,f,h,p,y,m,b,j,A)}catch(R){if(B(M),R!==R+0&&R!=="longjmp")throw R;I(1,0)}}function OS(s,a,u,c,d,f,h,p,y,m,b,j,A){var M=w();try{Hy(s,a,u,c,d,f,h,p,y,m,b,j,A)}catch(R){if(B(M),R!==R+0&&R!=="longjmp")throw R;I(1,0)}}function FS(s,a,u,c,d,f,h,p,y,m){var b=w();try{return Yy(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function MS(s,a,u,c,d,f,h,p,y,m){var b=w();try{return e_(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function CS(s,a,u,c,d,f,h,p,y,m,b,j,A){var M=w();try{$y(s,a,u,c,d,f,h,p,y,m,b,j,A)}catch(R){if(B(M),R!==R+0&&R!=="longjmp")throw R;I(1,0)}}function US(s,a,u,c,d,f,h,p,y,m){var b=w();try{Gy(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function VS(s,a,u,c,d,f,h,p,y){var m=w();try{Jy(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function kS(s,a,u,c,d,f){var h=w();try{return Ky(s,a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function ES(s,a,u,c,d,f,h,p,y){var m=w();try{t_(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function RS(s,a,u,c,d,f,h,p,y,m,b,j,A,M){var R=w();try{Xy(s,a,u,c,d,f,h,p,y,m,b,j,A,M)}catch(Z){if(B(R),Z!==Z+0&&Z!=="longjmp")throw Z;I(1,0)}}function PS(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{Qy(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function NS(s,a,u,c,d,f,h,p,y,m){var b=w();try{Zy(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}t.ccall=U0;var bo;function go(s){this.name="ExitStatus",this.message="Program terminated with exit("+s+")",this.status=s}var LS=!1;cs=function s(){bo||Ru(),bo||(cs=s)};function xS(s){var a=t._main,u=0,c=0;try{var d=a(u,c);return qS(d,!0),d}catch(f){return rj(f)}finally{LS=!0}}function Ru(s){if(s=s||_,Ir>0||(W0(),Ir>0))return;function a(){bo||(bo=!0,t.calledRun=!0,!Iu&&(H0(),Y0(),r(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),i_&&xS(s),G0()))}t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),a()},1)):a()}t.run=Ru;function qS(s,a){ro=s,Su()||$0(),zS(s)}function zS(s){ro=s,Su()||(t.onExit&&t.onExit(s),Iu=!0),T(s,new go(s))}if(t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();var i_=!0;return t.noInitialRun&&(i_=!1),Ru(),e.ready}}(),B0=PV;var sf=class{constructor(e,t){this._bindings=e,this._conn=t}close(){this._bindings.disconnect(this._conn)}useUnsafe(e){return e(this._bindings,this._conn)}query(e){let t=this._bindings.runQuery(this._conn,e),r=S.RecordBatchReader.from(t);return console.assert(r.isSync()),console.assert(r.isFile()),S.Table.from(r)}send(e){let t=this._bindings.sendQuery(this._conn,e),r=new of(this._bindings,this._conn,t),n=S.RecordBatchReader.from(r);return console.assert(n.isSync()),console.assert(n.isStream()),n}getTableNames(e){return this._bindings.getTableNames(this._conn,e)}prepare(e){let t=this._bindings.createPrepared(this._conn,e);return new T0(this._bindings,this._conn,t)}insertArrowTable(e,t){let r=e.serialize("binary",!0);this.insertArrowFromIPCStream(r,t)}insertArrowFromIPCStream(e,t){this._bindings.insertArrowFromIPCStream(this._conn,e,t)}insertCSVFromPath(e,t){this._bindings.insertCSVFromPath(this._conn,e,t)}insertJSONFromPath(e,t){this._bindings.insertJSONFromPath(this._conn,e,t)}},of=class{constructor(e,t,r){this.bindings=e;this.conn=t;this.header=r;this._first=!0,this._depleted=!1}next(){if(this._first)return this._first=!1,{done:!1,value:this.header};if(this._depleted)return{done:!0,value:null};let e=this.bindings.fetchQueryResults(this.conn);return this._depleted=e.length==0,{done:this._depleted,value:e}}[Symbol.iterator](){return this}},T0=class{constructor(e,t,r){this.bindings=e,this.connectionId=t,this.statementId=r}close(){this.bindings.closePrepared(this.connectionId,this.statementId)}query(...e){let t=this.bindings.runPrepared(this.connectionId,this.statementId,e),r=S.RecordBatchReader.from(t);return console.assert(r.isSync()),console.assert(r.isFile()),S.Table.from(r)}send(...e){let t=this.bindings.sendPrepared(this.connectionId,this.statementId,e),r=new of(this.bindings,this.connectionId,t),n=S.RecordBatchReader.from(r);return console.assert(n.isSync()),console.assert(n.isStream()),n}};function NV(){let i=new TextDecoder;return e=>(typeof SharedArrayBuffer!="undefined"&&e.buffer instanceof SharedArrayBuffer&&(e=new Uint8Array(e)),i.decode(e))}var LV=NV();function Pi(i,e){i.ccall("duckdb_web_fail_with",null,["string"],[e])}function ss(i,e,t){let r=i.HEAPU8.subarray(e,e+t),n=new Uint8Array(new ArrayBuffer(r.byteLength));return n.set(r),n}function he(i,e,t){return LV(i.HEAPU8.subarray(e,e+t))}function we(i,e,t,r){let n=i.stackSave(),o=i.stackAlloc(3*8);t.unshift("number"),r.unshift(o),i.ccall(e,null,t,r);let l=i.HEAPF64[(o>>3)+0],_=i.HEAPF64[(o>>3)+1],v=i.HEAPF64[(o>>3)+2];return i.stackRestore(n),[l,_,v]}function Pe(i){i.ccall("duckdb_web_clear_response",null,[],[])}var af=class{constructor(e){let t=new Float64Array(e.buffer,e.byteOffset,e.byteLength/8),r=new Uint8Array(new ArrayBuffer(e.byteLength));r.set(e.subarray(7*8)),this.totalFileReadsCold=t[0],this.totalFileReadsAhead=t[1],this.totalFileReadsCached=t[2],this.totalFileWrites=t[3],this.totalPageAccesses=t[4],this.totalPageLoads=t[5],this.blockSize=t[6],this.blockStats=r}getBlockStats(e,t){return t=t||{file_reads_cold:0,file_reads_ahead:0,file_reads_cached:0,file_writes:0,page_accesses:0,page_loads:0},t.file_writes=this.blockStats[e*3+0]&15,t.file_reads_cold=this.blockStats[e*3+0]>>4,t.file_reads_ahead=this.blockStats[e*3+1]&15,t.file_reads_cached=this.blockStats[e*3+1]>>4,t.page_accesses=this.blockStats[e*3+1]&15,t.page_loads=this.blockStats[e*3+1]>>4,t}};var xV=new TextEncoder;var uf=class{constructor(e,t){this._instance=null;this._initPromise=null;this._initPromiseResolver=()=>{};this._logger=e,this._runtime=t}get logger(){return this._logger}get mod(){return this._instance}get pthread(){return this.mod.PThread||null}async instantiate(){return this._instance!=null?this:(this._initPromise!=null&&await this._initPromise,this._initPromise=new Promise(e=>{this._initPromiseResolver=e}),this._instance=await this.instantiateImpl({print:console.log.bind(console),printErr:console.log.bind(console),onRuntimeInitialized:this._initPromiseResolver}),await this._initPromise,this._initPromise=null,this)}open(e){let[t,r,n]=we(this.mod,"duckdb_web_open",["string"],[JSON.stringify(e)]);if(t!==0)throw new Error(he(this.mod,r,n));Pe(this.mod)}reset(){let[e,t,r]=we(this.mod,"duckdb_web_reset",[],[]);if(e!==0)throw new Error(he(this.mod,t,r));Pe(this.mod)}getVersion(){let[e,t,r]=we(this.mod,"duckdb_web_get_version",[],[]);if(e!==0)throw new Error(he(this.mod,t,r));let n=he(this.mod,t,r);return Pe(this.mod),n}getFeatureFlags(){return this.mod.ccall("duckdb_web_get_feature_flags","number",[],[])}tokenize(e){let[t,r,n]=we(this.mod,"duckdb_web_tokenize",["string"],[e]);if(t!==0)throw new Error(he(this.mod,r,n));let o=he(this.mod,r,n);return Pe(this.mod),JSON.parse(o)}connect(){let e=this.mod.ccall("duckdb_web_connect","number",[],[]);return new sf(this,e)}disconnect(e){this.mod.ccall("duckdb_web_disconnect",null,["number"],[e])}runQuery(e,t){let[r,n,o]=we(this.mod,"duckdb_web_query_run",["number","string"],[e,t]);if(r!==0)throw new Error(he(this.mod,n,o));let l=ss(this.mod,n,o);return Pe(this.mod),l}sendQuery(e,t){let[r,n,o]=we(this.mod,"duckdb_web_query_send",["number","string"],[e,t]);if(r!==0)throw new Error(he(this.mod,n,o));let l=ss(this.mod,n,o);return Pe(this.mod),l}fetchQueryResults(e){let[t,r,n]=we(this.mod,"duckdb_web_query_fetch_results",["number"],[e]);if(t!==0)throw new Error(he(this.mod,r,n));let o=ss(this.mod,r,n);return Pe(this.mod),o}getTableNames(e,t){let[r,n,o]=we(this.mod,"duckdb_web_get_tablenames",["number","string"],[e,t]);if(r!==0)throw new Error(he(this.mod,n,o));let l=he(this.mod,n,o);return Pe(this.mod),JSON.parse(l)}createPrepared(e,t){let[r,n,o]=we(this.mod,"duckdb_web_prepared_create",["number","string"],[e,t]);if(r!==0)throw new Error(he(this.mod,n,o));return Pe(this.mod),n}closePrepared(e,t){let[r,n,o]=we(this.mod,"duckdb_web_prepared_close",["number","number"],[e,t]);if(r!==0)throw new Error(he(this.mod,n,o));Pe(this.mod)}runPrepared(e,t,r){let[n,o,l]=we(this.mod,"duckdb_web_prepared_run",["number","number","string"],[e,t,JSON.stringify(r)]);if(n!==0)throw new Error(he(this.mod,o,l));let _=ss(this.mod,o,l);return Pe(this.mod),_}sendPrepared(e,t,r){let[n,o,l]=we(this.mod,"duckdb_web_prepared_send",["number","number","string"],[e,t,JSON.stringify(r)]);if(n!==0)throw new Error(he(this.mod,o,l));let _=ss(this.mod,o,l);return Pe(this.mod),_}insertArrowFromIPCStream(e,t,r){if(t.length==0)return;let n=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(n,n+t.length).set(t);let l=r?JSON.stringify(r):"",[_,v,T]=we(this.mod,"duckdb_web_insert_arrow_from_ipc_stream",["number","number","number","string"],[e,n,t.length,l]);if(_!==0)throw new Error(he(this.mod,v,T))}insertCSVFromPath(e,t,r){if(r.columns!==void 0){r.columnsFlat=[];for(let T in r.columns)r.columnsFlat.push(to(T,r.columns[T]))}let n=Ar({},r);n.columns=n.columnsFlat,delete n.columnsFlat;let o=JSON.stringify(n),[l,_,v]=we(this.mod,"duckdb_web_insert_csv_from_path",["number","string","string"],[e,t,o]);if(l!==0)throw new Error(he(this.mod,_,v))}insertJSONFromPath(e,t,r){if(r.columns!==void 0){r.columnsFlat=[];for(let T in r.columns)r.columnsFlat.push(to(T,r.columns[T]))}let n=Ar({},r);n.columns=n.columnsFlat,delete n.columnsFlat;let o=JSON.stringify(n),[l,_,v]=we(this.mod,"duckdb_web_insert_json_from_path",["number","string","string"],[e,t,o]);if(l!==0)throw new Error(he(this.mod,_,v))}globFiles(e){let[t,r,n]=we(this.mod,"duckdb_web_fs_glob_file_infos",["string"],[e]);if(t!==0)throw new Error(he(this.mod,r,n));let o=he(this.mod,r,n);Pe(this.mod);let l=JSON.parse(o);return l==null?[]:l}registerFileURL(e,t){t===void 0&&(t=e);let[r,n,o]=we(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[e,t]);if(r!==0)throw new Error(he(this.mod,n,o));Pe(this.mod)}registerFileText(e,t){let r=xV.encode(t);this.registerFileBuffer(e,r)}registerFileBuffer(e,t){let r=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(r,r+t.length).set(t);let[o,l,_]=we(this.mod,"duckdb_web_fs_register_file_buffer",["string","number","number"],[e,r,t.length]);if(o!==0)throw new Error(he(this.mod,l,_));Pe(this.mod)}registerFileHandle(e,t){let[r,n,o]=we(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[e,e]);if(r!==0)throw new Error(he(this.mod,n,o));if(Pe(this.mod),globalThis.DUCKDB_RUNTIME._files=(globalThis.DUCKDB_RUNTIME._files||new Map).set(e,t),this.pthread){for(let l of this.pthread.runningWorkers)l.postMessage({cmd:"registerFileHandle",fileName:e,fileHandle:t});for(let l of this.pthread.unusedWorkers)l.postMessage({cmd:"dropFileHandle",fileName:e})}}dropFile(e){return this.mod.ccall("duckdb_web_fs_drop_file","boolean",["string"],[e])}dropFiles(){let[e,t,r]=we(this.mod,"duckdb_web_fs_drop_files",[],[]);if(e!==0)throw new Error(he(this.mod,t,r));Pe(this.mod)}flushFiles(){this.mod.ccall("duckdb_web_flush_files",null,[],[])}copyFileToPath(e,t){let[r,n,o]=we(this.mod,"duckdb_web_copy_file_to_path",["string","string"],[e,t]);if(r!==0)throw new Error(he(this.mod,n,o));Pe(this.mod)}copyFileToBuffer(e){let[t,r,n]=we(this.mod,"duckdb_web_copy_file_to_buffer",["string"],[e]);if(t!==0)throw new Error(he(this.mod,r,n));let o=this.mod.HEAPU8.subarray(r,r+n),l=new Uint8Array(o.length);return l.set(o),Pe(this.mod),l}collectFileStatistics(e,t){let[r,n,o]=we(this.mod,"duckdb_web_collect_file_stats",["string","boolean"],[e,t]);if(r!==0)throw new Error(he(this.mod,n,o))}exportFileStatistics(e){let[t,r,n]=we(this.mod,"duckdb_web_export_file_stats",["string"],[e]);if(t!==0)throw new Error(he(this.mod,r,n));return new af(this.mod.HEAPU8.subarray(r,r+n))}};var cf=class extends uf{constructor(e,t,r,n){super(e,t);this.mainModuleURL=r,this.pthreadWorkerURL=n}locateFile(e,t){if(e.endsWith(".wasm"))return this.mainModuleURL;if(e.endsWith(".worker.js")){if(!this.pthreadWorkerURL)throw new Error("Missing DuckDB worker URL!");return this.pthreadWorkerURL}throw new Error(`WASM instantiation requested unexpected file: prefix=${t} path=${e}`)}instantiateWasm(e,t){return globalThis.DUCKDB_RUNTIME=this._runtime,WebAssembly.instantiateStreaming?WebAssembly.instantiateStreaming(fetch(this.mainModuleURL,{mode:"cors"}),e).then(r=>{t(r.instance,r.module)}):fetch(this.mainModuleURL,{mode:"cors"}).then(r=>r.arrayBuffer()).then(r=>WebAssembly.instantiate(r,e).then(n=>{t(n.instance,n.module)})).catch(r=>{console.error("Failed to instantiate WASM:",r)}),[]}};var lf=class extends cf{constructor(e,t,r,n=null){super(e,t,r,n)}instantiateImpl(e){return B0(vo(Ar({},e),{instantiateWasm:this.instantiateWasm.bind(this),locateFile:this.locateFile.bind(this)}))}};var ht={fileInfoCache:new Map,getFileInfo(i,e){try{let t=ht.fileInfoCache.get(e);if(t)return t;let[r,n,o]=we(i,"duckdb_web_fs_get_file_info_by_id",["number"],[e]);if(r!==0)return null;let l=he(i,n,o);Pe(i);let _=JSON.parse(l);if(_==null)return null;let v=vo(Ar({},_),{blob:null});return ht.fileInfoCache.set(e,v),v}catch(t){return null}},testPlatformFeature:(i,e)=>{switch(e){case 1:return typeof BigInt64Array!="undefined";default:return console.warn(`test for unknown feature: ${e}`),!1}},openFile:(i,e)=>{var t;try{ht.fileInfoCache.delete(e);let r=ht.getFileInfo(i,e);switch(r==null?void 0:r.dataProtocol){case 3:{let n=null;try{let o=new XMLHttpRequest;o.open("HEAD",r.dataUrl,!1),o.setRequestHeader("Range","bytes=0-"),o.send(null);let l=o.getResponseHeader("Content-Length");if(o.status==206&&l!==null){let _=i._malloc(2*8);return i.HEAPF64[(_>>3)+0]=+l,i.HEAPF64[(_>>3)+1]=0,_}}catch(o){n=o,console.warn(`HEAD request with range header failed: ${o}`)}if(r.allowFullHttpReads){console.warn(`falling back to full HTTP read for: ${r.dataUrl}`);let o=new XMLHttpRequest;if(o.open("GET",r.dataUrl,!1),o.responseType="arraybuffer",o.send(null),o.status==200){let l=i._malloc(o.response.byteLength),_=new Uint8Array(o.response,0,o.response.byteLength);i.HEAPU8.set(_,l);let v=i._malloc(2*8);return i.HEAPF64[(v>>3)+0]=o.response.byteLength,i.HEAPF64[(v>>3)+1]=l,v}}if(n!=null)throw new Error(`Reading file ${r.fileName} failed with error: ${n}`);return 0}case 1:{let n=(t=ht._files)==null?void 0:t.get(r.fileName);if(n){let _=i._malloc(2*8);return i.HEAPF64[(_>>3)+0]=n.size,i.HEAPF64[(_>>3)+1]=0,_}console.warn(`Buffering missing file: ${r.fileName}`);let o=i._malloc(2*8),l=i._malloc(1);return i.HEAPF64[(o>>3)+0]=1,i.HEAPF64[(o>>3)+1]=l,o}}}catch(r){console.error(r.toString()),Pi(i,r.toString())}return 0},glob:(i,e,t)=>{try{let r=he(i,e,t);if(r.startsWith("http")){let n=new XMLHttpRequest;if(n.open("HEAD",r,!1),n.send(null),n.status!=200&&n.status!==206){Pi(i,`HEAD request failed: ${r}`);return}i.ccall("duckdb_web_fs_glob_add_path",null,["string"],[r])}}catch(r){return Pi(i,r.toString()),0}},checkFile:(i,e,t)=>{try{let r=he(i,e,t);if(r.startsWith("http")){let n=new XMLHttpRequest;n.open("HEAD",r,!1),n.setRequestHeader("Range","bytes=0-"),n.send(null);let o=!1;if(n.status==206)o=!0;else if(n.status==200)o=n.getResponseHeader("Accept-Ranges")==="bytes";else return!1;return!!o}}catch(r){return!1}return!1},syncFile:(i,e)=>{},closeFile:(i,e)=>{let t=ht.getFileInfo(i,e);switch(ht.fileInfoCache.delete(e),t==null?void 0:t.dataProtocol){case 3:break;case 1:return}},truncateFile:(i,e,t)=>{let r=ht.getFileInfo(i,e);switch(r==null?void 0:r.dataProtocol){case 3:Pi(i,"Cannot truncate a http file");return;case 1:Pi(i,"truncateFile not implemented");return}return 0},readFile(i,e,t,r,n){var o;try{let l=ht.getFileInfo(i,e);switch(l==null?void 0:l.dataProtocol){case 3:{if(!l.dataUrl)throw new Error(`Missing data URL for file ${e}`);try{let _=new XMLHttpRequest;if(_.open("GET",l.dataUrl,!1),_.responseType="arraybuffer",_.setRequestHeader("Range",`bytes=${n}-${n+r-1}`),_.send(null),_.status==206||_.status==200&&r==_.response.byteLength&&n==0){let v=new Uint8Array(_.response,0,Math.min(_.response.byteLength,r));return i.HEAPU8.set(v,t),v.byteLength}else throw _.status==200?new Error(`Range request for ${l.dataUrl} did not return a partial response: ${_.status} "${_.statusText}"`):new Error(`Range request for ${l.dataUrl} did returned non-success status: ${_.status} "${_.statusText}"`)}catch(_){throw new Error(`Range request for ${l.dataUrl} failed with error: ${_}"`)}}case 1:{let _=(o=ht._files)==null?void 0:o.get(l.fileName);if(!_)throw new Error(`No handle available for file: ${l.fileName}`);let v=_.slice(n,n+r),T=new Uint8Array(new FileReaderSync().readAsArrayBuffer(v));return i.HEAPU8.set(T,t),T.byteLength}}return 0}catch(l){return Pi(i,l.toString()),0}},writeFile:(i,e,t,r,n)=>{let o=ht.getFileInfo(i,e);switch(o==null?void 0:o.dataProtocol){case 3:return Pi(i,"Cannot write to HTTP file"),0;case 1:return Pi(i,"writefile not implemented"),0}return 0},getLastFileModificationTime:(i,e)=>{var r;let t=ht.getFileInfo(i,e);switch(t==null?void 0:t.dataProtocol){case 1:{if(!((r=ht._files)==null?void 0:r.get(t.fileName)))throw Error(`No handle available for file: ${t.fileName}`);return 0}case 3:return new Date().getTime()}return 0},checkDirectory:(i,e,t)=>{let r=he(i,e,t);return console.log(`checkDirectory: ${r}`),!1},createDirectory:(i,e,t)=>{let r=he(i,e,t);console.log(`createDirectory: ${r}`)},removeDirectory:(i,e,t)=>{let r=he(i,e,t);console.log(`removeDirectory: ${r}`)},listDirectoryEntries:(i,e,t)=>{let r=he(i,e,t);return console.log(`listDirectoryEntries: ${r}`),!1},moveFile:(i,e,t,r,n)=>{},removeFile:(i,e,t)=>{}};var S0=class extends rf{postMessage(e,t){globalThis.postMessage(e,t)}async instantiate(e,t){return await new lf(this,ht,e,t).instantiate()}};function A0(){let i=new S0;globalThis.onmessage=async e=>{await i.onMessage(e.data)}}A0();return QS(qV);})();
17
+ }`),this._dictionaries=[],this._recordBatches=[],super.close()}};pi.RecordBatchJSONWriter=Na;function kl(i,e){let t=e;e instanceof Fl.Table&&(t=e.chunks,i.reset(void 0,e.schema));for(let r of t)i.write(r);return i.finish()}function El(i,e){var t,r,n,o;return vg.__awaiter(this,void 0,void 0,function*(){try{for(t=vg.__asyncValues(e);r=yield t.next(),!r.done;){let l=r.value;i.write(l)}}catch(l){n={error:l}}finally{try{r&&!r.done&&(o=t.return)&&(yield o.call(t))}finally{if(n)throw n.error}}return i.finish()})}function Ig({name:i,type:e,nullable:t}){let r=new gM.JSONTypeAssembler;return{name:i,nullable:t,type:r.visit(e),children:(e.children||[]).map(Ig),dictionary:mM.DataType.isDictionary(e)?{id:e.id,isOrdered:e.isOrdered,indexType:r.visit(e.indices)}:void 0}}function wM(i,e,t=!1){let r=new bM.Field(`${e}`,i.type,i.nullCount>0),n=Bg.JSONVectorAssembler.assemble(new _M.Column(r,[i]));return JSON.stringify({id:e,isDelta:t,data:{count:i.length,columns:n}},null,2)}function BM(i){return JSON.stringify({count:i.length,columns:Bg.JSONVectorAssembler.assemble(i)},null,2)}});var Nl=C(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.distributeVectorsIntoRecordBatches=_r.distributeColumnsIntoRecordBatches=_r.ensureSameLengthData=void 0;var Tg=Yt(),Rl=Xe(),IM=dr(),TM=Vi(),Pl=new Uint8Array(0),Sg=i=>[Pl,Pl,new Uint8Array(i),Pl];function SM(i,e,t=e.reduce((r,n)=>Math.max(r,n.length),0)){let r,n,o=-1,l=e.length,_=[...i.fields],v=[],T=(t+63&~63)>>3;for(;++o<l;)(r=e[o])&&r.length===t?v[o]=r:((n=_[o]).nullable||(_[o]=_[o].clone({nullable:!0})),v[o]=r?r._changeLengthAndBackfillNullBitmap(t):Tg.Data.new(n.type,0,t,t,Sg(T)));return[new Rl.Schema(_),t,v]}_r.ensureSameLengthData=SM;function AM(i){return Ag(new Rl.Schema(i.map(({field:e})=>e)),i)}_r.distributeColumnsIntoRecordBatches=AM;function Ag(i,e){return DM(i,e.map(t=>t instanceof IM.Chunked?t.chunks.map(r=>r.data):[t.data]))}_r.distributeVectorsIntoRecordBatches=Ag;function DM(i,e){let t=[...i.fields],r=[],n={numBatches:e.reduce((N,z)=>Math.max(N,z.length),0)},o=0,l=0,_=-1,v=e.length,T,D=[];for(;n.numBatches-- >0;){for(l=Number.POSITIVE_INFINITY,_=-1;++_<v;)D[_]=T=e[_].shift(),l=Math.min(l,T?T.length:l);isFinite(l)&&(D=OM(t,l,D,e,n),l>0&&(r[o++]=[l,D.slice()]))}return[i=new Rl.Schema(t,i.metadata),r.map(N=>new TM.RecordBatch(i,...N))]}function OM(i,e,t,r,n){let o,l,_=0,v=-1,T=r.length,D=(e+63&~63)>>3;for(;++v<T;)(o=t[v])&&(_=o.length)>=e?_===e?t[v]=o:(t[v]=o.slice(0,e),o=o.slice(e,_-e),n.numBatches=Math.max(n.numBatches,r[v].unshift(o))):((l=i[v]).nullable||(i[v]=l.clone({nullable:!0})),t[v]=o?o._changeLengthAndBackfillNullBitmap(e):Tg.Data.new(l.type,0,e,e,Sg(D)));return t}});var xe=C(xa=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});xa.BaseVector=void 0;var FM=Be(),MM=dr(),CM=Os(),Ll=Ne(),xl=class extends Ll.AbstractVector{constructor(e,t){super();this._children=t,this.numChildren=e.childData.length,this._bindDataAccessors(this.data=e)}get type(){return this.data.type}get typeId(){return this.data.typeId}get length(){return this.data.length}get offset(){return this.data.offset}get stride(){return this.data.stride}get nullCount(){return this.data.nullCount}get byteLength(){return this.data.byteLength}get VectorName(){return`${FM.Type[this.typeId]}Vector`}get ArrayType(){return this.type.ArrayType}get values(){return this.data.values}get typeIds(){return this.data.typeIds}get nullBitmap(){return this.data.nullBitmap}get valueOffsets(){return this.data.valueOffsets}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}clone(e,t=this._children){return Ll.Vector.new(e,t)}concat(...e){return MM.Chunked.concat(this,...e)}slice(e,t){return CM.clampRange(this,e,t,this._sliceInternal)}isValid(e){if(this.nullCount>0){let t=this.offset+e;return(this.nullBitmap[t>>3]&1<<t%8)!==0}return!0}getChildAt(e){return e<0||e>=this.numChildren?null:(this._children||(this._children=[]))[e]||(this._children[e]=Ll.Vector.new(this.data.childData[e]))}toJSON(){return[...this]}_sliceInternal(e,t,r){return e.clone(e.data.slice(t,r-t),null)}_bindDataAccessors(e){}};xa.BaseVector=xl;xl.prototype[Symbol.isConcatSpreadable]=!0});var ql=C(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});qa.BinaryVector=void 0;var UM=Ne(),VM=xe(),kM=be(),Dg=class extends VM.BaseVector{asUtf8(){return UM.Vector.new(this.data.clone(new kM.Utf8))}};qa.BinaryVector=Dg});var zl=C(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});za.BoolVector=void 0;var EM=be(),RM=xe(),PM=yi(),Og=class extends RM.BaseVector{static from(e){return PM.vectorFromValuesWithType(()=>new EM.Bool,e)}};za.BoolVector=Og});var Hl=C(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.DateMillisecondVector=mr.DateDayVector=mr.DateVector=void 0;var NM=Be(),LM=xe(),Fg=yi(),Wl=be(),Wa=class extends LM.BaseVector{static from(...e){return e.length===2?Fg.vectorFromValuesWithType(()=>e[1]===NM.DateUnit.DAY?new Wl.DateDay:new Wl.DateMillisecond,e[0]):Fg.vectorFromValuesWithType(()=>new Wl.DateMillisecond,e[0])}};mr.DateVector=Wa;var Mg=class extends Wa{};mr.DateDayVector=Mg;var Cg=class extends Wa{};mr.DateMillisecondVector=Cg});var Yl=C(Ha=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});Ha.DecimalVector=void 0;var xM=xe(),Ug=class extends xM.BaseVector{};Ha.DecimalVector=Ug});var $a=C(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});Ya.DictionaryVector=void 0;var qM=Yt(),Vg=Ne(),zM=xe(),WM=yi(),HM=be(),$l=class extends zM.BaseVector{constructor(e){super(e);this.indices=Vg.Vector.new(e.clone(this.type.indices))}static from(...e){if(e.length===3){let[t,r,n]=e,o=new HM.Dictionary(t.type,r,null,null);return Vg.Vector.new(qM.Data.Dictionary(o,0,n.length,0,null,n,t))}return WM.vectorFromValuesWithType(()=>e[0].type,e[0])}get dictionary(){return this.data.dictionary}reverseLookup(e){return this.dictionary.indexOf(e)}getKey(e){return this.indices.get(e)}getValue(e){return this.dictionary.get(e)}setKey(e,t){return this.indices.set(e,t)}setValue(e,t){return this.dictionary.set(e,t)}};Ya.DictionaryVector=$l;$l.prototype.indices=null});var Gl=C(Ga=>{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});Ga.FixedSizeBinaryVector=void 0;var YM=xe(),kg=class extends YM.BaseVector{};Ga.FixedSizeBinaryVector=kg});var Jl=C(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});Ja.FixedSizeListVector=void 0;var $M=xe(),Eg=class extends $M.BaseVector{};Ja.FixedSizeListVector=Eg});var Ql=C(_i=>{"use strict";Object.defineProperty(_i,"__esModule",{value:!0});_i.Float64Vector=_i.Float32Vector=_i.Float16Vector=_i.FloatVector=void 0;var GM=Yt(),JM=Ne(),KM=xe(),ZM=yi(),Jr=be(),Ps=class extends KM.BaseVector{static from(e){let t=eC(this);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)){let r=QM(e.constructor)||t;if(t===null&&(t=r),t&&t===r){let n=new t,o=e.byteLength/n.ArrayType.BYTES_PER_ELEMENT;if(!XM(t,e.constructor))return JM.Vector.new(GM.Data.Float(n,0,o,0,null,e))}}if(t)return ZM.vectorFromValuesWithType(()=>new t,e);throw e instanceof DataView||e instanceof ArrayBuffer?new TypeError(`Cannot infer float type from instance of ${e.constructor.name}`):new TypeError("Unrecognized FloatVector input")}};_i.FloatVector=Ps;var Kl=class extends Ps{toFloat32Array(){return new Float32Array(this)}toFloat64Array(){return new Float64Array(this)}};_i.Float16Vector=Kl;var Zl=class extends Ps{};_i.Float32Vector=Zl;var Xl=class extends Ps{};_i.Float64Vector=Xl;var XM=(i,e)=>i===Jr.Float16&&e!==Uint16Array,QM=i=>{switch(i){case Uint16Array:return Jr.Float16;case Float32Array:return Jr.Float32;case Float64Array:return Jr.Float64;default:return null}},eC=i=>{switch(i){case Kl:return Jr.Float16;case Zl:return Jr.Float32;case Xl:return Jr.Float64;default:return null}}});var ed=C(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.IntervalYearMonthVector=br.IntervalDayTimeVector=br.IntervalVector=void 0;var tC=xe(),Ka=class extends tC.BaseVector{};br.IntervalVector=Ka;var Rg=class extends Ka{};br.IntervalDayTimeVector=Rg;var Pg=class extends Ka{};br.IntervalYearMonthVector=Pg});var Za=C(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.Uint64Vector=Ye.Uint32Vector=Ye.Uint16Vector=Ye.Uint8Vector=Ye.Int64Vector=Ye.Int32Vector=Ye.Int16Vector=Ye.Int8Vector=Ye.IntVector=void 0;var iC=Yt(),rC=Ne(),nC=xe(),sC=yi(),Ng=at(),Lg=$e(),Re=be(),mi=class extends nC.BaseVector{static from(...e){let[t,r=!1]=e,n=uC(this,r);if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)){let o=aC(t.constructor,r)||n;if(n===null&&(n=o),n&&n===o){let l=new n,_=t.byteLength/l.ArrayType.BYTES_PER_ELEMENT;return oC(n,t.constructor)&&(_*=.5),rC.Vector.new(iC.Data.Int(l,0,_,0,null,t))}}if(n)return sC.vectorFromValuesWithType(()=>new n,t);throw t instanceof DataView||t instanceof ArrayBuffer?new TypeError(`Cannot infer integer type from instance of ${t.constructor.name}`):new TypeError("Unrecognized IntVector input")}};Ye.IntVector=mi;var td=class extends mi{};Ye.Int8Vector=td;var id=class extends mi{};Ye.Int16Vector=id;var rd=class extends mi{};Ye.Int32Vector=rd;var nd=class extends mi{toBigInt64Array(){return Lg.toBigInt64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigInt64Array())}};Ye.Int64Vector=nd;var sd=class extends mi{};Ye.Uint8Vector=sd;var od=class extends mi{};Ye.Uint16Vector=od;var ad=class extends mi{};Ye.Uint32Vector=ad;var ud=class extends mi{toBigUint64Array(){return Lg.toBigUint64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigUint64Array())}};Ye.Uint64Vector=ud;var oC=(i,e)=>(i===Re.Int64||i===Re.Uint64)&&(e===Int32Array||e===Uint32Array),aC=(i,e)=>{switch(i){case Int8Array:return Re.Int8;case Int16Array:return Re.Int16;case Int32Array:return e?Re.Int64:Re.Int32;case Ng.BigInt64Array:return Re.Int64;case Uint8Array:return Re.Uint8;case Uint16Array:return Re.Uint16;case Uint32Array:return e?Re.Uint64:Re.Uint32;case Ng.BigUint64Array:return Re.Uint64;default:return null}},uC=(i,e)=>{switch(i){case td:return Re.Int8;case id:return Re.Int16;case rd:return e?Re.Int64:Re.Int32;case nd:return Re.Int64;case sd:return Re.Uint8;case od:return Re.Uint16;case ad:return e?Re.Uint64:Re.Uint32;case ud:return Re.Uint64;default:return null}}});var cd=C(Xa=>{"use strict";Object.defineProperty(Xa,"__esModule",{value:!0});Xa.ListVector=void 0;var cC=xe(),xg=class extends cC.BaseVector{};Xa.ListVector=xg});var ld=C(Qa=>{"use strict";Object.defineProperty(Qa,"__esModule",{value:!0});Qa.MapVector=void 0;var lC=As(),dC=Ne(),fC=xe(),hC=be(),qg=class extends fC.BaseVector{asList(){let e=this.type.children[0];return dC.Vector.new(this.data.clone(new hC.List(e)))}bind(e){let t=this.getChildAt(0),{[e]:r,[e+1]:n}=this.valueOffsets;return new lC.MapRow(t.slice(r,n))}};Qa.MapVector=qg});var dd=C(eu=>{"use strict";Object.defineProperty(eu,"__esModule",{value:!0});eu.NullVector=void 0;var pC=xe(),zg=class extends pC.BaseVector{};eu.NullVector=zg});var fd=C(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});tu.StructVector=void 0;var yC=As(),_C=xe(),mC=Symbol.for("rowIndex"),Wg=class extends _C.BaseVector{bind(e){let t=this._row||(this._row=new yC.StructRow(this)),r=Object.create(t);return r[mC]=e,r}};tu.StructVector=Wg});var hd=C(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.TimestampNanosecondVector=Et.TimestampMicrosecondVector=Et.TimestampMillisecondVector=Et.TimestampSecondVector=Et.TimestampVector=void 0;var bC=xe(),Nn=class extends bC.BaseVector{};Et.TimestampVector=Nn;var Hg=class extends Nn{};Et.TimestampSecondVector=Hg;var Yg=class extends Nn{};Et.TimestampMillisecondVector=Yg;var $g=class extends Nn{};Et.TimestampMicrosecondVector=$g;var Gg=class extends Nn{};Et.TimestampNanosecondVector=Gg});var pd=C(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.TimeNanosecondVector=Rt.TimeMicrosecondVector=Rt.TimeMillisecondVector=Rt.TimeSecondVector=Rt.TimeVector=void 0;var gC=xe(),Ln=class extends gC.BaseVector{};Rt.TimeVector=Ln;var Jg=class extends Ln{};Rt.TimeSecondVector=Jg;var Kg=class extends Ln{};Rt.TimeMillisecondVector=Kg;var Zg=class extends Ln{};Rt.TimeMicrosecondVector=Zg;var Xg=class extends Ln{};Rt.TimeNanosecondVector=Xg});var yd=C(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.SparseUnionVector=gr.DenseUnionVector=gr.UnionVector=void 0;var vC=xe(),iu=class extends vC.BaseVector{get typeIdToChildIndex(){return this.data.type.typeIdToChildIndex}};gr.UnionVector=iu;var Qg=class extends iu{get valueOffsets(){return this.data.valueOffsets}};gr.DenseUnionVector=Qg;var ev=class extends iu{};gr.SparseUnionVector=ev});var _d=C(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.Utf8Vector=void 0;var jC=Ne(),wC=xe(),tv=be(),BC=yi(),iv=class extends wC.BaseVector{static from(e){return BC.vectorFromValuesWithType(()=>new tv.Utf8,e)}asBinary(){return jC.Vector.new(this.data.clone(new tv.Binary))}};ru.Utf8Vector=iv});var rv=C(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.partial2=vr.partial1=vr.partial0=void 0;function IC(i){return function(){return i(this)}}vr.partial0=IC;function TC(i){return function(e){return i(this,e)}}vr.partial1=TC;function SC(i){return function(e,t){return i(this,e,t)}}vr.partial2=SC});var gd=C(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.instance=xn.GetVisitor=void 0;var nu=js(),AC=rt(),DC=Dr(),OC=ms(),Pt=Be(),Q=class extends AC.Visitor{};xn.GetVisitor=Q;var FC=(i,e)=>864e5*i[e],md=(i,e)=>4294967296*i[e+1]+(i[e]>>>0),MC=(i,e)=>4294967296*(i[e+1]/1e3)+(i[e]>>>0)/1e3,CC=(i,e)=>4294967296*(i[e+1]/1e6)+(i[e]>>>0)/1e6,nv=i=>new Date(i),UC=(i,e)=>nv(FC(i,e)),VC=(i,e)=>nv(md(i,e)),kC=(i,e)=>null,sv=(i,e,t)=>{let{[t]:r,[t+1]:n}=e;return r!=null&&n!=null?i.subarray(r,n):null},EC=({offset:i,values:e},t)=>{let r=i+t;return(e[r>>3]&1<<r%8)!==0},ov=({values:i},e)=>UC(i,e),av=({values:i},e)=>VC(i,e*2),bi=({stride:i,values:e},t)=>e[i*t],uv=({stride:i,values:e},t)=>OC.uint16ToFloat64(e[i*t]),bd=({stride:i,values:e,type:t},r)=>nu.BN.new(e.subarray(i*r,i*(r+1)),t.isSigned),RC=({stride:i,values:e},t)=>e.subarray(i*t,i*(t+1)),PC=({values:i,valueOffsets:e},t)=>sv(i,e,t),NC=({values:i,valueOffsets:e},t)=>{let r=sv(i,e,t);return r!==null?DC.decodeUtf8(r):null},LC=(i,e)=>i.type.bitWidth<64?bi(i,e):bd(i,e),xC=(i,e)=>i.type.precision!==Pt.Precision.HALF?bi(i,e):uv(i,e),qC=(i,e)=>i.type.unit===Pt.DateUnit.DAY?ov(i,e):av(i,e),cv=({values:i},e)=>1e3*md(i,e*2),lv=({values:i},e)=>md(i,e*2),dv=({values:i},e)=>MC(i,e*2),fv=({values:i},e)=>CC(i,e*2),zC=(i,e)=>{switch(i.type.unit){case Pt.TimeUnit.SECOND:return cv(i,e);case Pt.TimeUnit.MILLISECOND:return lv(i,e);case Pt.TimeUnit.MICROSECOND:return dv(i,e);case Pt.TimeUnit.NANOSECOND:return fv(i,e)}},hv=({values:i,stride:e},t)=>i[e*t],pv=({values:i,stride:e},t)=>i[e*t],yv=({values:i},e)=>nu.BN.signed(i.subarray(2*e,2*(e+1))),_v=({values:i},e)=>nu.BN.signed(i.subarray(2*e,2*(e+1))),WC=(i,e)=>{switch(i.type.unit){case Pt.TimeUnit.SECOND:return hv(i,e);case Pt.TimeUnit.MILLISECOND:return pv(i,e);case Pt.TimeUnit.MICROSECOND:return yv(i,e);case Pt.TimeUnit.NANOSECOND:return _v(i,e)}},HC=({values:i},e)=>nu.BN.decimal(i.subarray(4*e,4*(e+1))),YC=(i,e)=>{let t=i.getChildAt(0),{valueOffsets:r,stride:n}=i;return t.slice(r[e*n],r[e*n+1])},$C=(i,e)=>i.bind(e),GC=(i,e)=>i.bind(e),JC=(i,e)=>i.type.mode===Pt.UnionMode.Dense?mv(i,e):bv(i,e),mv=(i,e)=>{let t=i.typeIdToChildIndex[i.typeIds[e]],r=i.getChildAt(t);return r?r.get(i.valueOffsets[e]):null},bv=(i,e)=>{let t=i.typeIdToChildIndex[i.typeIds[e]],r=i.getChildAt(t);return r?r.get(e):null},KC=(i,e)=>i.getValue(i.getKey(e)),ZC=(i,e)=>i.type.unit===Pt.IntervalUnit.DAY_TIME?gv(i,e):vv(i,e),gv=({values:i},e)=>i.subarray(2*e,2*(e+1)),vv=({values:i},e)=>{let t=i[e],r=new Int32Array(2);return r[0]=t/12|0,r[1]=t%12|0,r},XC=(i,e)=>{let t=i.getChildAt(0),{stride:r}=i;return t.slice(e*r,(e+1)*r)};Q.prototype.visitNull=kC;Q.prototype.visitBool=EC;Q.prototype.visitInt=LC;Q.prototype.visitInt8=bi;Q.prototype.visitInt16=bi;Q.prototype.visitInt32=bi;Q.prototype.visitInt64=bd;Q.prototype.visitUint8=bi;Q.prototype.visitUint16=bi;Q.prototype.visitUint32=bi;Q.prototype.visitUint64=bd;Q.prototype.visitFloat=xC;Q.prototype.visitFloat16=uv;Q.prototype.visitFloat32=bi;Q.prototype.visitFloat64=bi;Q.prototype.visitUtf8=NC;Q.prototype.visitBinary=PC;Q.prototype.visitFixedSizeBinary=RC;Q.prototype.visitDate=qC;Q.prototype.visitDateDay=ov;Q.prototype.visitDateMillisecond=av;Q.prototype.visitTimestamp=zC;Q.prototype.visitTimestampSecond=cv;Q.prototype.visitTimestampMillisecond=lv;Q.prototype.visitTimestampMicrosecond=dv;Q.prototype.visitTimestampNanosecond=fv;Q.prototype.visitTime=WC;Q.prototype.visitTimeSecond=hv;Q.prototype.visitTimeMillisecond=pv;Q.prototype.visitTimeMicrosecond=yv;Q.prototype.visitTimeNanosecond=_v;Q.prototype.visitDecimal=HC;Q.prototype.visitList=YC;Q.prototype.visitStruct=GC;Q.prototype.visitUnion=JC;Q.prototype.visitDenseUnion=mv;Q.prototype.visitSparseUnion=bv;Q.prototype.visitDictionary=KC;Q.prototype.visitInterval=ZC;Q.prototype.visitIntervalDayTime=gv;Q.prototype.visitIntervalYearMonth=vv;Q.prototype.visitFixedSizeList=XC;Q.prototype.visitMap=$C;xn.instance=new Q});var Iv=C(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.instance=qn.IndexOfVisitor=void 0;var QC=rt(),jv=ni(),wv=Os(),ee=class extends QC.Visitor{};qn.IndexOfVisitor=ee;function eU(i,e){return e===null&&i.length>0?0:-1}function tU(i,e){let{nullBitmap:t}=i.data;if(!t||i.nullCount<=0)return-1;let r=0;for(let n of new jv.BitIterator(t,i.data.offset+(e||0),i.length,t,jv.getBool)){if(!n)return r;++r}return-1}function de(i,e,t){if(e===void 0)return-1;if(e===null)return tU(i,t);let r=wv.createElementComparator(e);for(let n=(t||0)-1,o=i.length;++n<o;)if(r(i.get(n)))return n;return-1}function Bv(i,e,t){let r=wv.createElementComparator(e);for(let n=(t||0)-1,o=i.length;++n<o;)if(r(i.get(n)))return n;return-1}ee.prototype.visitNull=eU;ee.prototype.visitBool=de;ee.prototype.visitInt=de;ee.prototype.visitInt8=de;ee.prototype.visitInt16=de;ee.prototype.visitInt32=de;ee.prototype.visitInt64=de;ee.prototype.visitUint8=de;ee.prototype.visitUint16=de;ee.prototype.visitUint32=de;ee.prototype.visitUint64=de;ee.prototype.visitFloat=de;ee.prototype.visitFloat16=de;ee.prototype.visitFloat32=de;ee.prototype.visitFloat64=de;ee.prototype.visitUtf8=de;ee.prototype.visitBinary=de;ee.prototype.visitFixedSizeBinary=de;ee.prototype.visitDate=de;ee.prototype.visitDateDay=de;ee.prototype.visitDateMillisecond=de;ee.prototype.visitTimestamp=de;ee.prototype.visitTimestampSecond=de;ee.prototype.visitTimestampMillisecond=de;ee.prototype.visitTimestampMicrosecond=de;ee.prototype.visitTimestampNanosecond=de;ee.prototype.visitTime=de;ee.prototype.visitTimeSecond=de;ee.prototype.visitTimeMillisecond=de;ee.prototype.visitTimeMicrosecond=de;ee.prototype.visitTimeNanosecond=de;ee.prototype.visitDecimal=de;ee.prototype.visitList=de;ee.prototype.visitStruct=de;ee.prototype.visitUnion=de;ee.prototype.visitDenseUnion=Bv;ee.prototype.visitSparseUnion=Bv;ee.prototype.visitDictionary=de;ee.prototype.visitInterval=de;ee.prototype.visitIntervalDayTime=de;ee.prototype.visitIntervalYearMonth=de;ee.prototype.visitFixedSizeList=de;ee.prototype.visitMap=de;qn.instance=new ee});var vd=C(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.instance=zn.IteratorVisitor=void 0;var su=Be(),iU=rt(),rU=ni(),Tv=gd(),te=class extends iU.Visitor{};zn.IteratorVisitor=te;function nU(i){let e=Tv.instance.getVisitFn(i);return new rU.BitIterator(i.data.nullBitmap,i.data.offset,i.length,i,(t,r,n,o)=>(n&1<<o)!==0?e(t,r):null)}var Sv=class{constructor(e,t){this.vector=e,this.getFn=t,this.index=0}next(){return this.index<this.vector.length?{value:this.getFn(this.vector,this.index++)}:{done:!0,value:null}}[Symbol.iterator](){return this}};function ue(i){if(i.nullCount>0)return nU(i);let{type:e,typeId:t,length:r}=i;return i.stride===1&&(t===su.Type.Timestamp||t===su.Type.Int&&e.bitWidth!==64||t===su.Type.Time&&e.bitWidth!==64||t===su.Type.Float&&e.precision>0)?i.data.values.subarray(0,r)[Symbol.iterator]():new Sv(i,Tv.instance.getVisitFn(i))}te.prototype.visitNull=ue;te.prototype.visitBool=ue;te.prototype.visitInt=ue;te.prototype.visitInt8=ue;te.prototype.visitInt16=ue;te.prototype.visitInt32=ue;te.prototype.visitInt64=ue;te.prototype.visitUint8=ue;te.prototype.visitUint16=ue;te.prototype.visitUint32=ue;te.prototype.visitUint64=ue;te.prototype.visitFloat=ue;te.prototype.visitFloat16=ue;te.prototype.visitFloat32=ue;te.prototype.visitFloat64=ue;te.prototype.visitUtf8=ue;te.prototype.visitBinary=ue;te.prototype.visitFixedSizeBinary=ue;te.prototype.visitDate=ue;te.prototype.visitDateDay=ue;te.prototype.visitDateMillisecond=ue;te.prototype.visitTimestamp=ue;te.prototype.visitTimestampSecond=ue;te.prototype.visitTimestampMillisecond=ue;te.prototype.visitTimestampMicrosecond=ue;te.prototype.visitTimestampNanosecond=ue;te.prototype.visitTime=ue;te.prototype.visitTimeSecond=ue;te.prototype.visitTimeMillisecond=ue;te.prototype.visitTimeMicrosecond=ue;te.prototype.visitTimeNanosecond=ue;te.prototype.visitDecimal=ue;te.prototype.visitList=ue;te.prototype.visitStruct=ue;te.prototype.visitUnion=ue;te.prototype.visitDenseUnion=ue;te.prototype.visitSparseUnion=ue;te.prototype.visitDictionary=ue;te.prototype.visitInterval=ue;te.prototype.visitIntervalDayTime=ue;te.prototype.visitIntervalYearMonth=ue;te.prototype.visitFixedSizeList=ue;te.prototype.visitMap=ue;zn.instance=new te});var Av=C(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.instance=Wn.ToArrayVisitor=void 0;var Ns=Be(),sU=rt(),oU=vd(),ie=class extends sU.Visitor{};Wn.ToArrayVisitor=ie;function ce(i){let{type:e,length:t,stride:r}=i;switch(e.typeId){case Ns.Type.Int:case Ns.Type.Float:case Ns.Type.Decimal:case Ns.Type.Time:case Ns.Type.Timestamp:return i.data.values.subarray(0,t*r)}return[...oU.instance.visit(i)]}ie.prototype.visitNull=ce;ie.prototype.visitBool=ce;ie.prototype.visitInt=ce;ie.prototype.visitInt8=ce;ie.prototype.visitInt16=ce;ie.prototype.visitInt32=ce;ie.prototype.visitInt64=ce;ie.prototype.visitUint8=ce;ie.prototype.visitUint16=ce;ie.prototype.visitUint32=ce;ie.prototype.visitUint64=ce;ie.prototype.visitFloat=ce;ie.prototype.visitFloat16=ce;ie.prototype.visitFloat32=ce;ie.prototype.visitFloat64=ce;ie.prototype.visitUtf8=ce;ie.prototype.visitBinary=ce;ie.prototype.visitFixedSizeBinary=ce;ie.prototype.visitDate=ce;ie.prototype.visitDateDay=ce;ie.prototype.visitDateMillisecond=ce;ie.prototype.visitTimestamp=ce;ie.prototype.visitTimestampSecond=ce;ie.prototype.visitTimestampMillisecond=ce;ie.prototype.visitTimestampMicrosecond=ce;ie.prototype.visitTimestampNanosecond=ce;ie.prototype.visitTime=ce;ie.prototype.visitTimeSecond=ce;ie.prototype.visitTimeMillisecond=ce;ie.prototype.visitTimeMicrosecond=ce;ie.prototype.visitTimeNanosecond=ce;ie.prototype.visitDecimal=ce;ie.prototype.visitList=ce;ie.prototype.visitStruct=ce;ie.prototype.visitUnion=ce;ie.prototype.visitDenseUnion=ce;ie.prototype.visitSparseUnion=ce;ie.prototype.visitDictionary=ce;ie.prototype.visitInterval=ce;ie.prototype.visitIntervalDayTime=ce;ie.prototype.visitIntervalYearMonth=ce;ie.prototype.visitFixedSizeList=ce;ie.prototype.visitMap=ce;Wn.instance=new ie});var Dv=C(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.instance=Hn.ByteWidthVisitor=void 0;var aU=rt(),uU=Be(),Ls=(i,e)=>i+e,jd=i=>`Cannot compute the byte width of variable-width column ${i}`,wd=class extends aU.Visitor{visitNull(e){return 0}visitInt(e){return e.bitWidth/8}visitFloat(e){return e.ArrayType.BYTES_PER_ELEMENT}visitBinary(e){throw new Error(jd(e))}visitUtf8(e){throw new Error(jd(e))}visitBool(e){return 1/8}visitDecimal(e){return 16}visitDate(e){return(e.unit+1)*4}visitTime(e){return e.bitWidth/8}visitTimestamp(e){return e.unit===uU.TimeUnit.SECOND?4:8}visitInterval(e){return(e.unit+1)*4}visitList(e){throw new Error(jd(e))}visitStruct(e){return this.visitFields(e.children).reduce(Ls,0)}visitUnion(e){return this.visitFields(e.children).reduce(Ls,0)}visitFixedSizeBinary(e){return e.byteWidth}visitFixedSizeList(e){return e.listSize*this.visitFields(e.children).reduce(Ls,0)}visitMap(e){return this.visitFields(e.children).reduce(Ls,0)}visitDictionary(e){return this.visit(e.indices)}visitFields(e){return(e||[]).map(t=>this.visit(t.type))}visitSchema(e){return this.visitFields(e.fields).reduce(Ls,0)}};Hn.ByteWidthVisitor=wd;Hn.instance=new wd});var Ov=C(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.instance=Yn.GetVectorConstructor=void 0;var cU=rt(),lU=ql(),dU=zl(),Bd=Hl(),fU=Yl(),hU=$a(),pU=Gl(),yU=Jl(),ou=Ql(),Id=ed(),ki=Za(),_U=cd(),mU=ld(),bU=dd(),gU=fd(),xs=hd(),qs=pd(),Td=yd(),vU=_d(),Sd=class extends cU.Visitor{visitNull(){return bU.NullVector}visitBool(){return dU.BoolVector}visitInt(){return ki.IntVector}visitInt8(){return ki.Int8Vector}visitInt16(){return ki.Int16Vector}visitInt32(){return ki.Int32Vector}visitInt64(){return ki.Int64Vector}visitUint8(){return ki.Uint8Vector}visitUint16(){return ki.Uint16Vector}visitUint32(){return ki.Uint32Vector}visitUint64(){return ki.Uint64Vector}visitFloat(){return ou.FloatVector}visitFloat16(){return ou.Float16Vector}visitFloat32(){return ou.Float32Vector}visitFloat64(){return ou.Float64Vector}visitUtf8(){return vU.Utf8Vector}visitBinary(){return lU.BinaryVector}visitFixedSizeBinary(){return pU.FixedSizeBinaryVector}visitDate(){return Bd.DateVector}visitDateDay(){return Bd.DateDayVector}visitDateMillisecond(){return Bd.DateMillisecondVector}visitTimestamp(){return xs.TimestampVector}visitTimestampSecond(){return xs.TimestampSecondVector}visitTimestampMillisecond(){return xs.TimestampMillisecondVector}visitTimestampMicrosecond(){return xs.TimestampMicrosecondVector}visitTimestampNanosecond(){return xs.TimestampNanosecondVector}visitTime(){return qs.TimeVector}visitTimeSecond(){return qs.TimeSecondVector}visitTimeMillisecond(){return qs.TimeMillisecondVector}visitTimeMicrosecond(){return qs.TimeMicrosecondVector}visitTimeNanosecond(){return qs.TimeNanosecondVector}visitDecimal(){return fU.DecimalVector}visitList(){return _U.ListVector}visitStruct(){return gU.StructVector}visitUnion(){return Td.UnionVector}visitDenseUnion(){return Td.DenseUnionVector}visitSparseUnion(){return Td.SparseUnionVector}visitDictionary(){return hU.DictionaryVector}visitInterval(){return Id.IntervalVector}visitIntervalDayTime(){return Id.IntervalDayTimeVector}visitIntervalYearMonth(){return Id.IntervalYearMonthVector}visitFixedSizeList(){return yU.FixedSizeListVector}visitMap(){return mU.MapVector}};Yn.GetVectorConstructor=Sd;Yn.instance=new Sd});var yi=C(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.vectorFromValuesWithType=V.StructRow=V.MapRow=V.Utf8Vector=V.SparseUnionVector=V.DenseUnionVector=V.UnionVector=V.TimeNanosecondVector=V.TimeMicrosecondVector=V.TimeMillisecondVector=V.TimeSecondVector=V.TimeVector=V.TimestampNanosecondVector=V.TimestampMicrosecondVector=V.TimestampMillisecondVector=V.TimestampSecondVector=V.TimestampVector=V.StructVector=V.NullVector=V.MapVector=V.ListVector=V.Uint64Vector=V.Uint32Vector=V.Uint16Vector=V.Uint8Vector=V.Int64Vector=V.Int32Vector=V.Int16Vector=V.Int8Vector=V.IntVector=V.IntervalYearMonthVector=V.IntervalDayTimeVector=V.IntervalVector=V.Float64Vector=V.Float32Vector=V.Float16Vector=V.FloatVector=V.FixedSizeListVector=V.FixedSizeBinaryVector=V.DictionaryVector=V.DecimalVector=V.DateMillisecondVector=V.DateDayVector=V.DateVector=V.Chunked=V.BoolVector=V.BinaryVector=V.BaseVector=V.Vector=void 0;var Ad=ot(),jU=Ne();Object.defineProperty(V,"Vector",{enumerable:!0,get:function(){return jU.Vector}});var wU=xe();Object.defineProperty(V,"BaseVector",{enumerable:!0,get:function(){return wU.BaseVector}});var BU=ql();Object.defineProperty(V,"BinaryVector",{enumerable:!0,get:function(){return BU.BinaryVector}});var IU=zl();Object.defineProperty(V,"BoolVector",{enumerable:!0,get:function(){return IU.BoolVector}});var TU=dr();Object.defineProperty(V,"Chunked",{enumerable:!0,get:function(){return TU.Chunked}});var Dd=Hl();Object.defineProperty(V,"DateVector",{enumerable:!0,get:function(){return Dd.DateVector}});Object.defineProperty(V,"DateDayVector",{enumerable:!0,get:function(){return Dd.DateDayVector}});Object.defineProperty(V,"DateMillisecondVector",{enumerable:!0,get:function(){return Dd.DateMillisecondVector}});var SU=Yl();Object.defineProperty(V,"DecimalVector",{enumerable:!0,get:function(){return SU.DecimalVector}});var AU=$a();Object.defineProperty(V,"DictionaryVector",{enumerable:!0,get:function(){return AU.DictionaryVector}});var DU=Gl();Object.defineProperty(V,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return DU.FixedSizeBinaryVector}});var OU=Jl();Object.defineProperty(V,"FixedSizeListVector",{enumerable:!0,get:function(){return OU.FixedSizeListVector}});var au=Ql();Object.defineProperty(V,"FloatVector",{enumerable:!0,get:function(){return au.FloatVector}});Object.defineProperty(V,"Float16Vector",{enumerable:!0,get:function(){return au.Float16Vector}});Object.defineProperty(V,"Float32Vector",{enumerable:!0,get:function(){return au.Float32Vector}});Object.defineProperty(V,"Float64Vector",{enumerable:!0,get:function(){return au.Float64Vector}});var Od=ed();Object.defineProperty(V,"IntervalVector",{enumerable:!0,get:function(){return Od.IntervalVector}});Object.defineProperty(V,"IntervalDayTimeVector",{enumerable:!0,get:function(){return Od.IntervalDayTimeVector}});Object.defineProperty(V,"IntervalYearMonthVector",{enumerable:!0,get:function(){return Od.IntervalYearMonthVector}});var Ei=Za();Object.defineProperty(V,"IntVector",{enumerable:!0,get:function(){return Ei.IntVector}});Object.defineProperty(V,"Int8Vector",{enumerable:!0,get:function(){return Ei.Int8Vector}});Object.defineProperty(V,"Int16Vector",{enumerable:!0,get:function(){return Ei.Int16Vector}});Object.defineProperty(V,"Int32Vector",{enumerable:!0,get:function(){return Ei.Int32Vector}});Object.defineProperty(V,"Int64Vector",{enumerable:!0,get:function(){return Ei.Int64Vector}});Object.defineProperty(V,"Uint8Vector",{enumerable:!0,get:function(){return Ei.Uint8Vector}});Object.defineProperty(V,"Uint16Vector",{enumerable:!0,get:function(){return Ei.Uint16Vector}});Object.defineProperty(V,"Uint32Vector",{enumerable:!0,get:function(){return Ei.Uint32Vector}});Object.defineProperty(V,"Uint64Vector",{enumerable:!0,get:function(){return Ei.Uint64Vector}});var FU=cd();Object.defineProperty(V,"ListVector",{enumerable:!0,get:function(){return FU.ListVector}});var MU=ld();Object.defineProperty(V,"MapVector",{enumerable:!0,get:function(){return MU.MapVector}});var CU=dd();Object.defineProperty(V,"NullVector",{enumerable:!0,get:function(){return CU.NullVector}});var UU=fd();Object.defineProperty(V,"StructVector",{enumerable:!0,get:function(){return UU.StructVector}});var zs=hd();Object.defineProperty(V,"TimestampVector",{enumerable:!0,get:function(){return zs.TimestampVector}});Object.defineProperty(V,"TimestampSecondVector",{enumerable:!0,get:function(){return zs.TimestampSecondVector}});Object.defineProperty(V,"TimestampMillisecondVector",{enumerable:!0,get:function(){return zs.TimestampMillisecondVector}});Object.defineProperty(V,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return zs.TimestampMicrosecondVector}});Object.defineProperty(V,"TimestampNanosecondVector",{enumerable:!0,get:function(){return zs.TimestampNanosecondVector}});var Ws=pd();Object.defineProperty(V,"TimeVector",{enumerable:!0,get:function(){return Ws.TimeVector}});Object.defineProperty(V,"TimeSecondVector",{enumerable:!0,get:function(){return Ws.TimeSecondVector}});Object.defineProperty(V,"TimeMillisecondVector",{enumerable:!0,get:function(){return Ws.TimeMillisecondVector}});Object.defineProperty(V,"TimeMicrosecondVector",{enumerable:!0,get:function(){return Ws.TimeMicrosecondVector}});Object.defineProperty(V,"TimeNanosecondVector",{enumerable:!0,get:function(){return Ws.TimeNanosecondVector}});var Fd=yd();Object.defineProperty(V,"UnionVector",{enumerable:!0,get:function(){return Fd.UnionVector}});Object.defineProperty(V,"DenseUnionVector",{enumerable:!0,get:function(){return Fd.DenseUnionVector}});Object.defineProperty(V,"SparseUnionVector",{enumerable:!0,get:function(){return Fd.SparseUnionVector}});var VU=_d();Object.defineProperty(V,"Utf8Vector",{enumerable:!0,get:function(){return VU.Utf8Vector}});var Fv=As();Object.defineProperty(V,"MapRow",{enumerable:!0,get:function(){return Fv.MapRow}});Object.defineProperty(V,"StructRow",{enumerable:!0,get:function(){return Fv.StructRow}});var Hs=rv(),Md=Be(),$n=Ne(),Mv=dr(),Kr=xe(),kU=ni(),uu=at(),Cv=Ve(),Uv=gd(),Vv=Wc(),kv=Iv(),Ev=Av(),Rv=vd(),Pv=Dv(),Nv=Ov();$n.Vector.new=EU;$n.Vector.from=PU;function EU(i,...e){return new(Nv.instance.getVisitFn(i)())(i,...e)}function RU(i,e){if(uu.isIterable(e))return $n.Vector.from({nullValues:[null,void 0],type:i(),values:e});if(uu.isAsyncIterable(e))return $n.Vector.from({nullValues:[null,void 0],type:i(),values:e});let{values:t=[],type:r=i(),nullValues:n=[null,void 0]}=Object.assign({},e);return uu.isIterable(t)?$n.Vector.from(Object.assign(Object.assign({nullValues:n},e),{type:r})):$n.Vector.from(Object.assign(Object.assign({nullValues:n},e),{type:r}))}V.vectorFromValuesWithType=RU;function PU(i){let e=Object.assign({nullValues:[null,void 0]},i),{values:t=[]}=e,r=Ad.__rest(e,["values"]);if(uu.isIterable(t)){let n=[...Cv.Builder.throughIterable(r)(t)];return n.length===1?n[0]:Mv.Chunked.concat(n)}return(n=>Ad.__awaiter(this,void 0,void 0,function*(){var o,l;let _=Cv.Builder.throughAsyncIterable(r);try{for(var v=Ad.__asyncValues(_(t)),T;T=yield v.next(),!T.done;){let D=T.value;n.push(D)}}catch(D){o={error:D}}finally{try{T&&!T.done&&(l=v.return)&&(yield l.call(v))}finally{if(o)throw o.error}}return n.length===1?n[0]:Mv.Chunked.concat(n)}))([])}Kr.BaseVector.prototype.get=function(e){return Uv.instance.visit(this,e)};Kr.BaseVector.prototype.set=function(e,t){return Vv.instance.visit(this,e,t)};Kr.BaseVector.prototype.indexOf=function(e,t){return kv.instance.visit(this,e,t)};Kr.BaseVector.prototype.toArray=function(){return Ev.instance.visit(this)};Kr.BaseVector.prototype.getByteWidth=function(){return Pv.instance.visit(this.type)};Kr.BaseVector.prototype[Symbol.iterator]=function(){return Rv.instance.visit(this)};Kr.BaseVector.prototype._bindDataAccessors=qU;Object.keys(Md.Type).map(i=>Md.Type[i]).filter(i=>typeof i=="number").filter(i=>i!==Md.Type.NONE).forEach(i=>{let e=Nv.instance.visit(i);e.prototype.get=Hs.partial1(Uv.instance.getVisitFn(i)),e.prototype.set=Hs.partial2(Vv.instance.getVisitFn(i)),e.prototype.indexOf=Hs.partial2(kv.instance.getVisitFn(i)),e.prototype.toArray=Hs.partial0(Ev.instance.getVisitFn(i)),e.prototype.getByteWidth=NU(Pv.instance.getVisitFn(i)),e.prototype[Symbol.iterator]=Hs.partial0(Rv.instance.getVisitFn(i))});function NU(i){return function(){return i(this.type)}}function LU(i){return function(e){return this.isValid(e)?i.call(this,e):null}}function xU(i){return function(e,t){kU.setBool(this.nullBitmap,this.offset+e,t!=null)&&i.call(this,e,t)}}function qU(){let i=this.nullBitmap;i&&i.byteLength>0&&(this.get=LU(this.get),this.set=xU(this.set))}});var Rs=C(lu=>{"use strict";Object.defineProperty(lu,"__esModule",{value:!0});lu.Table=void 0;var cu=ot(),zU=Un(),WU=Ys(),Lv=La(),Cd=Vi(),xv=Xe(),Ud=be(),qv=qr(),Vd=at(),zv=Nl(),kd=yi(),Ke=class extends kd.Chunked{constructor(...e){var t;let r=null;e[0]instanceof xv.Schema&&(r=e[0]);let n=e[0]instanceof Ke?e[0].chunks:qv.selectArgs(Cd.RecordBatch,e);if(!r&&!(r=(t=n[0])===null||t===void 0?void 0:t.schema))throw new TypeError("Table must be initialized with a Schema or at least one RecordBatch");n[0]||(n[0]=new Cd._InternalEmptyPlaceholderRecordBatch(r));super(new Ud.Struct(r.fields),n);this._schema=r,this._chunks=n}static empty(e=new xv.Schema([])){return new Ke(e,[])}static from(e){if(!e)return Ke.empty();if(typeof e=="object"){let r=Vd.isIterable(e.values)?HU(e):Vd.isAsyncIterable(e.values)?YU(e):null;if(r!==null)return r}let t=WU.RecordBatchReader.from(e);return Vd.isPromise(t)?(()=>cu.__awaiter(this,void 0,void 0,function*(){return yield Ke.from(yield t)}))():t.isSync()&&(t=t.open())?t.schema?new Ke(t.schema,[...t]):Ke.empty():(r=>cu.__awaiter(this,void 0,void 0,function*(){var n,o;let l=yield r,_=l.schema,v=[];if(_){try{for(var T=cu.__asyncValues(l),D;D=yield T.next(),!D.done;){let N=D.value;v.push(N)}}catch(N){n={error:N}}finally{try{D&&!D.done&&(o=T.return)&&(yield o.call(T))}finally{if(n)throw n.error}}return new Ke(_,v)}return Ke.empty()}))(t.open())}static fromAsync(e){return cu.__awaiter(this,void 0,void 0,function*(){return yield Ke.from(e)})}static fromStruct(e){return Ke.new(e.data.childData,e.type.children)}static new(...e){return new Ke(...zv.distributeColumnsIntoRecordBatches(qv.selectColumnArgs(e)))}get schema(){return this._schema}get length(){return this._length}get chunks(){return this._chunks}get numCols(){return this._numChildren}clone(e=this._chunks){return new Ke(this._schema,e)}getColumn(e){return this.getColumnAt(this.getColumnIndex(e))}getColumnAt(e){return this.getChildAt(e)}getColumnIndex(e){return this._schema.fields.findIndex(t=>t.name===e)}getChildAt(e){if(e<0||e>=this.numChildren)return null;let t,r,n=this._schema.fields,o=this._children||(this._children=[]);if(r=o[e])return r;if(t=n[e]){let l=this._chunks.map(_=>_.getChildAt(e)).filter(_=>_!=null);if(l.length>0)return o[e]=new zU.Column(t,l)}return null}serialize(e="binary",t=!0){return(t?Lv.RecordBatchStreamWriter:Lv.RecordBatchFileWriter).writeAll(this).toUint8Array(!0)}count(){return this._length}select(...e){let t=this._schema.fields.reduce((r,n,o)=>r.set(n.name,o),new Map);return this.selectAt(...e.map(r=>t.get(r)).filter(r=>r>-1))}selectAt(...e){let t=this._schema.selectAt(...e);return new Ke(t,this._chunks.map(({length:r,data:{childData:n}})=>new Cd.RecordBatch(t,r,e.map(o=>n[o]).filter(Boolean))))}assign(e){let t=this._schema.fields,[r,n]=e.schema.fields.reduce((_,v,T)=>{let[D,N]=_,z=t.findIndex(K=>K.name===v.name);return~z?N[z]=T:D.push(T),_},[[],[]]),o=this._schema.assign(e.schema),l=[...t.map((_,v,T,D=n[v])=>D===void 0?this.getColumnAt(v):e.getColumnAt(D)),...r.map(_=>e.getColumnAt(_))].filter(Boolean);return new Ke(...zv.distributeVectorsIntoRecordBatches(o,l))}};lu.Table=Ke;function HU(i){let{type:e}=i;return e instanceof Ud.Struct?Ke.fromStruct(kd.StructVector.from(i)):null}function YU(i){let{type:e}=i;return e instanceof Ud.Struct?kd.StructVector.from(i).then(t=>Ke.fromStruct(t)):null}});var Vi=C(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn._InternalEmptyPlaceholderRecordBatch=Gn.RecordBatch=void 0;var Ed=Yt(),Rd=Rs(),$U=Ne(),GU=rt(),JU=Xe(),KU=at(),ZU=dr(),XU=qr(),Pd=be(),QU=Nl(),eV=yi(),jr=class extends eV.StructVector{constructor(...e){let t,r=e[0],n;if(e[1]instanceof Ed.Data)[,t,n]=e;else{let o=r.fields,[,l,_]=e;t=Ed.Data.Struct(new Pd.Struct(o),0,l,0,null,_)}super(t,n);this._schema=r}static from(e){return KU.isIterable(e.values),Rd.Table.from(e)}static new(...e){let[t,r]=XU.selectFieldArgs(e),n=r.filter(o=>o instanceof $U.Vector);return new jr(...QU.ensureSameLengthData(new JU.Schema(t),n.map(o=>o.data)))}clone(e,t=this._children){return new jr(this._schema,e,t)}concat(...e){let t=this._schema,r=ZU.Chunked.flatten(this,...e);return new Rd.Table(t,r.map(({data:n})=>new jr(t,n)))}get schema(){return this._schema}get numCols(){return this._schema.fields.length}get dictionaries(){return this._dictionaries||(this._dictionaries=du.collect(this))}select(...e){let t=this._schema.fields.reduce((r,n,o)=>r.set(n.name,o),new Map);return this.selectAt(...e.map(r=>t.get(r)).filter(r=>r>-1))}selectAt(...e){let t=this._schema.selectAt(...e),r=e.map(n=>this.data.childData[n]).filter(Boolean);return new jr(t,this.length,r)}};Gn.RecordBatch=jr;var Wv=class extends jr{constructor(e){super(e,0,e.fields.map(t=>Ed.Data.new(t.type,0,0,0)))}};Gn._InternalEmptyPlaceholderRecordBatch=Wv;var du=class extends GU.Visitor{constructor(){super(...arguments);this.dictionaries=new Map}static collect(e){return new du().visit(e.data,new Pd.Struct(e.schema.fields)).dictionaries}visit(e,t){return Pd.DataType.isDictionary(t)?this.visitDictionary(e,t):(e.childData.forEach((r,n)=>this.visit(r,t.children[n].type)),this)}visitDictionary(e,t){let r=e.dictionary;return r&&r.length>0&&this.dictionaries.set(t.id,r),this}}});var Ys=C(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.AsyncRecordBatchFileReader=xt.RecordBatchFileReader=xt.AsyncRecordBatchStreamReader=xt.RecordBatchStreamReader=xt.RecordBatchReader=void 0;var Se=ot(),Hv=Ne(),fu=Be(),Yv=tl(),$v=ys(),Gv=ar(),$s=nl(),Jv=Ab(),Nd=Vi(),Zr=on(),Nt=Oa(),Lt=at(),gi=class extends Zr.ReadableInterop{constructor(e){super();this._impl=e}get closed(){return this._impl.closed}get schema(){return this._impl.schema}get autoDestroy(){return this._impl.autoDestroy}get dictionaries(){return this._impl.dictionaries}get numDictionaries(){return this._impl.numDictionaries}get numRecordBatches(){return this._impl.numRecordBatches}get footer(){return this._impl.isFile()?this._impl.footer:null}isSync(){return this._impl.isSync()}isAsync(){return this._impl.isAsync()}isFile(){return this._impl.isFile()}isStream(){return this._impl.isStream()}next(){return this._impl.next()}throw(e){return this._impl.throw(e)}return(e){return this._impl.return(e)}cancel(){return this._impl.cancel()}reset(e){return this._impl.reset(e),this._DOMStream=void 0,this._nodeStream=void 0,this}open(e){let t=this._impl.open(e);return Lt.isPromise(t)?t.then(()=>this):this}readRecordBatch(e){return this._impl.isFile()?this._impl.readRecordBatch(e):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return $v.default.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return $v.default.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,t){throw new Error('"throughDOM" not available in this environment')}static from(e){return e instanceof gi?e:Lt.isArrowJSON(e)?tV(e):Lt.isFileHandle(e)?nV(e):Lt.isPromise(e)?(()=>Se.__awaiter(this,void 0,void 0,function*(){return yield gi.from(yield e)}))():Lt.isFetchResponse(e)||Lt.isReadableDOMStream(e)||Lt.isReadableNodeStream(e)||Lt.isAsyncIterable(e)?rV(new Gv.AsyncByteStream(e)):iV(new Gv.ByteStream(e))}static readAll(e){return e instanceof gi?e.isSync()?Qv(e):e0(e):Lt.isArrowJSON(e)||ArrayBuffer.isView(e)||Lt.isIterable(e)||Lt.isIteratorResult(e)?Qv(e):e0(e)}};xt.RecordBatchReader=gi;var Jn=class extends gi{constructor(e){super(e);this._impl=e}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return Se.__asyncGenerator(this,arguments,function*(){yield Se.__await(yield*Se.__asyncDelegator(Se.__asyncValues(this[Symbol.iterator]())))})}};xt.RecordBatchStreamReader=Jn;var Kn=class extends gi{constructor(e){super(e);this._impl=e}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}};xt.AsyncRecordBatchStreamReader=Kn;var hu=class extends Jn{constructor(e){super(e);this._impl=e}};xt.RecordBatchFileReader=hu;var Ld=class extends Kn{constructor(e){super(e);this._impl=e}};xt.AsyncRecordBatchFileReader=Ld;var xd=class{constructor(e=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=e}get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(e){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=e,this.dictionaries=new Map,this}_loadRecordBatch(e,t){return new Nd.RecordBatch(this.schema,e.length,this._loadVectors(e,t,this.schema.fields))}_loadDictionaryBatch(e,t){let{id:r,isDelta:n,data:o}=e,{dictionaries:l,schema:_}=this,v=l.get(r);if(n||!v){let T=_.dictionaries.get(r);return v&&n?v.concat(Hv.Vector.new(this._loadVectors(o,t,[T])[0])):Hv.Vector.new(this._loadVectors(o,t,[T])[0])}return v}_loadVectors(e,t,r){return new Jv.VectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(r)}},Gs=class extends xd{constructor(e,t){super(t);this._reader=Lt.isArrowJSON(e)?new Nt.JSONMessageReader(this._handle=e):new Nt.MessageReader(this._handle=e)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(e){return this.closed||(this.autoDestroy=Xv(this,e),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):Zr.ITERATOR_DONE}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):Zr.ITERATOR_DONE}next(){if(this.closed)return Zr.ITERATOR_DONE;let e,{_reader:t}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let r=e.header(),n=t.readMessageBody(e.bodyLength),o=this._loadRecordBatch(r,n);return{done:!1,value:o}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let r=e.header(),n=t.readMessageBody(e.bodyLength),o=this._loadDictionaryBatch(r,n);this.dictionaries.set(r.id,o)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new Nd._InternalEmptyPlaceholderRecordBatch(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},Js=class extends xd{constructor(e,t){super(t);this._reader=new Nt.AsyncMessageReader(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return Se.__awaiter(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(e){return Se.__awaiter(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=Xv(this,e),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return Se.__awaiter(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):Zr.ITERATOR_DONE})}return(e){return Se.__awaiter(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):Zr.ITERATOR_DONE})}next(){return Se.__awaiter(this,void 0,void 0,function*(){if(this.closed)return Zr.ITERATOR_DONE;let e,{_reader:t}=this;for(;e=yield this._readNextMessageAndValidate();)if(e.isSchema())yield this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let r=e.header(),n=yield t.readMessageBody(e.bodyLength),o=this._loadRecordBatch(r,n);return{done:!1,value:o}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let r=e.header(),n=yield t.readMessageBody(e.bodyLength),o=this._loadDictionaryBatch(r,n);this.dictionaries.set(r.id,o)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new Nd._InternalEmptyPlaceholderRecordBatch(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return Se.__awaiter(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}},qd=class extends Gs{constructor(e,t){super(e instanceof $s.RandomAccessFile?e:new $s.RandomAccessFile(e),t)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(let t of this._footer.dictionaryBatches())t&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){if(this.closed)return null;this._footer||this.open();let t=this._footer&&this._footer.getRecordBatch(e);if(t&&this._handle.seek(t.offset)){let r=this._reader.readMessage(fu.MessageHeader.RecordBatch);if(r==null?void 0:r.isRecordBatch()){let n=r.header(),o=this._reader.readMessageBody(r.bodyLength);return this._loadRecordBatch(n,o)}}return null}_readDictionaryBatch(e){let t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&this._handle.seek(t.offset)){let r=this._reader.readMessage(fu.MessageHeader.DictionaryBatch);if(r==null?void 0:r.isDictionaryBatch()){let n=r.header(),o=this._reader.readMessageBody(r.bodyLength),l=this._loadDictionaryBatch(n,o);this.dictionaries.set(n.id,l)}}}_readFooter(){let{_handle:e}=this,t=e.size-Nt.magicAndPadding,r=e.readInt32(t),n=e.readAt(t-r,r);return Yv.Footer.decode(n)}_readNextMessageAndValidate(e){if(this._footer||this.open(),this._footer&&this._recordBatchIndex<this.numRecordBatches){let t=this._footer&&this._footer.getRecordBatch(this._recordBatchIndex);if(t&&this._handle.seek(t.offset))return this._reader.readMessage(e)}return null}},Kv=class extends Js{constructor(e,...t){let r=typeof t[0]!="number"?t.shift():void 0,n=t[0]instanceof Map?t.shift():void 0;super(e instanceof $s.AsyncRandomAccessFile?e:new $s.AsyncRandomAccessFile(e,r),n)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isFile(){return!0}isAsync(){return!0}open(e){let t=Object.create(null,{open:{get:()=>super.open}});return Se.__awaiter(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(let r of this._footer.dictionaryBatches())r&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield t.open.call(this,e)})}readRecordBatch(e){return Se.__awaiter(this,void 0,void 0,function*(){if(this.closed)return null;this._footer||(yield this.open());let t=this._footer&&this._footer.getRecordBatch(e);if(t&&(yield this._handle.seek(t.offset))){let r=yield this._reader.readMessage(fu.MessageHeader.RecordBatch);if(r==null?void 0:r.isRecordBatch()){let n=r.header(),o=yield this._reader.readMessageBody(r.bodyLength);return this._loadRecordBatch(n,o)}}return null})}_readDictionaryBatch(e){return Se.__awaiter(this,void 0,void 0,function*(){let t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&(yield this._handle.seek(t.offset))){let r=yield this._reader.readMessage(fu.MessageHeader.DictionaryBatch);if(r==null?void 0:r.isDictionaryBatch()){let n=r.header(),o=yield this._reader.readMessageBody(r.bodyLength),l=this._loadDictionaryBatch(n,o);this.dictionaries.set(n.id,l)}}})}_readFooter(){return Se.__awaiter(this,void 0,void 0,function*(){let{_handle:e}=this;e._pending&&(yield e._pending);let t=e.size-Nt.magicAndPadding,r=yield e.readInt32(t),n=yield e.readAt(t-r,r);return Yv.Footer.decode(n)})}_readNextMessageAndValidate(e){return Se.__awaiter(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex<this.numRecordBatches){let t=this._footer.getRecordBatch(this._recordBatchIndex);if(t&&(yield this._handle.seek(t.offset)))return yield this._reader.readMessage(e)}return null})}},Zv=class extends Gs{constructor(e,t){super(e,t)}_loadVectors(e,t,r){return new Jv.JSONVectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(r)}};function Xv(i,e){return e&&typeof e.autoDestroy=="boolean"?e.autoDestroy:i.autoDestroy}function*Qv(i){let e=gi.from(i);try{if(!e.open({autoDestroy:!1}).closed)do yield e;while(!e.reset().open().closed)}finally{e.cancel()}}function e0(i){return Se.__asyncGenerator(this,arguments,function*(){let t=yield Se.__await(gi.from(i));try{if(!(yield Se.__await(t.open({autoDestroy:!1}))).closed)do yield yield Se.__await(t);while(!(yield Se.__await(t.reset().open())).closed)}finally{yield Se.__await(t.cancel())}})}function tV(i){return new Jn(new Zv(i))}function iV(i){let e=i.peek(Nt.magicLength+7&~7);return e&&e.byteLength>=4?Nt.checkForMagicArrowString(e)?new hu(new qd(i.read())):new Jn(new Gs(i)):new Jn(new Gs(function*(){}()))}function rV(i){return Se.__awaiter(this,void 0,void 0,function*(){let e=yield i.peek(Nt.magicLength+7&~7);return e&&e.byteLength>=4?Nt.checkForMagicArrowString(e)?new hu(new qd(yield i.read())):new Kn(new Js(i)):new Kn(new Js(function(){return Se.__asyncGenerator(this,arguments,function*(){})}()))})}function nV(i){return Se.__awaiter(this,void 0,void 0,function*(){let{size:e}=yield i.stat(),t=new $s.AsyncRandomAccessFile(i,e);return e>=Nt.magicX2AndPadding&&Nt.checkForMagicArrowString(yield t.readAt(0,Nt.magicLength+7&~7))?new Ld(new Kv(t)):new Kn(new Js(t))})}});var r0=C(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.toDOMStream=void 0;var pu=ot(),t0=$e(),i0=at();function sV(i,e){if(i0.isAsyncIterable(i))return aV(i,e);if(i0.isIterable(i))return oV(i,e);throw new Error("toDOMStream() must be called with an Iterable or AsyncIterable")}yu.toDOMStream=sV;function oV(i,e){let t=null,r=(e==null?void 0:e.type)==="bytes"||!1,n=(e==null?void 0:e.highWaterMark)||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},e),{start(l){o(l,t||(t=i[Symbol.iterator]()))},pull(l){t?o(l,t):l.close()},cancel(){((t==null?void 0:t.return)&&t.return()||!0)&&(t=null)}}),Object.assign({highWaterMark:r?n:void 0},e));function o(l,_){let v,T=null,D=l.desiredSize||null;for(;!(T=_.next(r?D:null)).done;)if(ArrayBuffer.isView(T.value)&&(v=t0.toUint8Array(T.value))&&(D!=null&&r&&(D=D-v.byteLength+1),T.value=v),l.enqueue(T.value),D!=null&&--D<=0)return;l.close()}}function aV(i,e){let t=null,r=(e==null?void 0:e.type)==="bytes"||!1,n=(e==null?void 0:e.highWaterMark)||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},e),{start(l){return pu.__awaiter(this,void 0,void 0,function*(){yield o(l,t||(t=i[Symbol.asyncIterator]()))})},pull(l){return pu.__awaiter(this,void 0,void 0,function*(){t?yield o(l,t):l.close()})},cancel(){return pu.__awaiter(this,void 0,void 0,function*(){((t==null?void 0:t.return)&&(yield t.return())||!0)&&(t=null)})}}),Object.assign({highWaterMark:r?n:void 0},e));function o(l,_){return pu.__awaiter(this,void 0,void 0,function*(){let v,T=null,D=l.desiredSize||null;for(;!(T=yield _.next(r?D:null)).done;)if(ArrayBuffer.isView(T.value)&&(v=t0.toUint8Array(T.value))&&(D!=null&&r&&(D=D-v.byteLength+1),T.value=v),l.enqueue(T.value),D!=null&&--D<=0)return;l.close()})}}});var o0=C(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.BuilderTransform=Zn.builderThroughDOMStream=void 0;var uV=ot(),cV=ya();function lV(i){return new zd(i)}Zn.builderThroughDOMStream=lV;var zd=class{constructor(e){this._numChunks=0,this._finished=!1,this._bufferedSize=0;let{["readableStrategy"]:t,["writableStrategy"]:r,["queueingStrategy"]:n="count"}=e,o=uV.__rest(e,["readableStrategy","writableStrategy","queueingStrategy"]);this._controller=null,this._builder=cV.Builder.new(o),this._getSize=n!=="bytes"?n0:s0;let{["highWaterMark"]:l=n==="bytes"?Math.pow(2,14):1e3}=Object.assign({},t),{["highWaterMark"]:_=n==="bytes"?Math.pow(2,14):1e3}=Object.assign({},r);this.readable=new ReadableStream({cancel:()=>{this._builder.clear()},pull:v=>{this._maybeFlush(this._builder,this._controller=v)},start:v=>{this._maybeFlush(this._builder,this._controller=v)}},{highWaterMark:l,size:n!=="bytes"?n0:s0}),this.writable=new WritableStream({abort:()=>{this._builder.clear()},write:()=>{this._maybeFlush(this._builder,this._controller)},close:()=>{this._maybeFlush(this._builder.finish(),this._controller)}},{highWaterMark:_,size:v=>this._writeValueAndReturnChunkSize(v)})}_writeValueAndReturnChunkSize(e){let t=this._bufferedSize;return this._bufferedSize=this._getSize(this._builder.append(e)),this._bufferedSize-t}_maybeFlush(e,t){t!==null&&(this._bufferedSize>=t.desiredSize&&++this._numChunks&&this._enqueue(t,e.toVector()),e.finished&&((e.length>0||this._numChunks===0)&&++this._numChunks&&this._enqueue(t,e.toVector()),!this._finished&&(this._finished=!0)&&this._enqueue(t,null)))}_enqueue(e,t){this._bufferedSize=0,this._controller=null,t===null?e.close():e.enqueue(t)}};Zn.BuilderTransform=zd;var n0=i=>i.length,s0=i=>i.byteLength});var a0=C(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.recordBatchReaderThroughDOMStream=void 0;var Ks=ot(),dV=ar(),fV=Ys();function hV(i,e){let t=new dV.AsyncByteQueue,r=null,n=new ReadableStream({cancel(){return Ks.__awaiter(this,void 0,void 0,function*(){yield t.close()})},start(_){return Ks.__awaiter(this,void 0,void 0,function*(){yield l(_,r||(r=yield o()))})},pull(_){return Ks.__awaiter(this,void 0,void 0,function*(){r?yield l(_,r):_.close()})}});return{writable:new WritableStream(t,Object.assign({highWaterMark:Math.pow(2,14)},i)),readable:n};function o(){return Ks.__awaiter(this,void 0,void 0,function*(){return yield(yield fV.RecordBatchReader.from(t)).open(e)})}function l(_,v){return Ks.__awaiter(this,void 0,void 0,function*(){let T=_.desiredSize,D=null;for(;!(D=yield v.next()).done;)if(_.enqueue(D.value),T!=null&&--T<=0)return;_.close()})}}_u.recordBatchReaderThroughDOMStream=hV});var u0=C(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.recordBatchWriterThroughDOMStream=void 0;var mu=ot(),pV=ar();function yV(i,e){let t=new this(i),r=new pV.AsyncByteStream(t),n=new ReadableStream({type:"bytes",cancel(){return mu.__awaiter(this,void 0,void 0,function*(){yield r.cancel()})},pull(l){return mu.__awaiter(this,void 0,void 0,function*(){yield o(l)})},start(l){return mu.__awaiter(this,void 0,void 0,function*(){yield o(l)})}},Object.assign({highWaterMark:Math.pow(2,14)},e));return{writable:new WritableStream(t,i),readable:n};function o(l){return mu.__awaiter(this,void 0,void 0,function*(){let _=null,v=l.desiredSize;for(;_=yield r.read(v||null);)if(l.enqueue(_),v!=null&&(v-=_.byteLength)<=0)return;l.close()})}}bu.recordBatchWriterThroughDOMStream=yV});var Jd=C(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.custom=fe.or=fe.and=fe.col=fe.lit=fe.CustomPredicate=fe.Not=fe.GTeq=fe.LTeq=fe.Equals=fe.Or=fe.And=fe.CombinationPredicate=fe.ComparisonPredicate=fe.Predicate=fe.Col=fe.Literal=fe.Value=void 0;var _V=$a(),wr=class{eq(e){return e instanceof wr||(e=new Ri(e)),new Hd(this,e)}le(e){return e instanceof wr||(e=new Ri(e)),new Yd(this,e)}ge(e){return e instanceof wr||(e=new Ri(e)),new $d(this,e)}lt(e){return new ts(this.ge(e))}gt(e){return new ts(this.le(e))}ne(e){return new ts(this.eq(e))}};fe.Value=wr;var Ri=class extends wr{constructor(e){super();this.v=e}};fe.Literal=Ri;var Wd=class extends wr{constructor(e){super();this.name=e}bind(e){if(!this.colidx){this.colidx=-1;let r=e.schema.fields;for(let n=-1;++n<r.length;)if(r[n].name===this.name){this.colidx=n;break}if(this.colidx<0)throw new Error(`Failed to bind Col "${this.name}"`)}let t=this.vector=e.getChildAt(this.colidx);return r=>t.get(r)}};fe.Col=Wd;var Xn=class{and(...e){return new Qn(this,...e)}or(...e){return new es(this,...e)}not(){return new ts(this)}};fe.Predicate=Xn;var Zs=class extends Xn{constructor(e,t){super();this.left=e,this.right=t}bind(e){return this.left instanceof Ri?this.right instanceof Ri?this._bindLitLit(e,this.left,this.right):this._bindLitCol(e,this.left,this.right):this.right instanceof Ri?this._bindColLit(e,this.left,this.right):this._bindColCol(e,this.left,this.right)}};fe.ComparisonPredicate=Zs;var Xs=class extends Xn{constructor(...e){super();this.children=e}};fe.CombinationPredicate=Xs;Xs.prototype.children=Object.freeze([]);var Qn=class extends Xs{constructor(...e){e=e.reduce((t,r)=>t.concat(r instanceof Qn?r.children:r),[]);super(...e)}bind(e){let t=this.children.map(r=>r.bind(e));return(r,n)=>t.every(o=>o(r,n))}};fe.And=Qn;var es=class extends Xs{constructor(...e){e=e.reduce((t,r)=>t.concat(r instanceof es?r.children:r),[]);super(...e)}bind(e){let t=this.children.map(r=>r.bind(e));return(r,n)=>t.some(o=>o(r,n))}};fe.Or=es;var Hd=class extends Zs{_bindLitLit(e,t,r){let n=t.v==r.v;return()=>n}_bindColCol(e,t,r){let n=t.bind(e),o=r.bind(e);return(l,_)=>n(l,_)==o(l,_)}_bindColLit(e,t,r){let n=t.bind(e);if(t.vector instanceof _V.DictionaryVector){let o,l=t.vector;return l.dictionary!==this.lastDictionary?(o=l.reverseLookup(r.v),this.lastDictionary=l.dictionary,this.lastKey=o):o=this.lastKey,o===-1?()=>!1:_=>l.getKey(_)===o}else return(o,l)=>n(o,l)==r.v}_bindLitCol(e,t,r){return this._bindColLit(e,r,t)}};fe.Equals=Hd;var Yd=class extends Zs{_bindLitLit(e,t,r){let n=t.v<=r.v;return()=>n}_bindColCol(e,t,r){let n=t.bind(e),o=r.bind(e);return(l,_)=>n(l,_)<=o(l,_)}_bindColLit(e,t,r){let n=t.bind(e);return(o,l)=>n(o,l)<=r.v}_bindLitCol(e,t,r){let n=r.bind(e);return(o,l)=>t.v<=n(o,l)}};fe.LTeq=Yd;var $d=class extends Zs{_bindLitLit(e,t,r){let n=t.v>=r.v;return()=>n}_bindColCol(e,t,r){let n=t.bind(e),o=r.bind(e);return(l,_)=>n(l,_)>=o(l,_)}_bindColLit(e,t,r){let n=t.bind(e);return(o,l)=>n(o,l)>=r.v}_bindLitCol(e,t,r){let n=r.bind(e);return(o,l)=>t.v>=n(o,l)}};fe.GTeq=$d;var ts=class extends Xn{constructor(e){super();this.child=e}bind(e){let t=this.child.bind(e);return(r,n)=>!t(r,n)}};fe.Not=ts;var Gd=class extends Xn{constructor(e,t){super();this.next=e,this.bind_=t}bind(e){return this.bind_(e),this.next}};fe.CustomPredicate=Gd;function mV(i){return new Ri(i)}fe.lit=mV;function bV(i){return new Wd(i)}fe.col=bV;function gV(...i){return new Qn(...i)}fe.and=gV;function vV(...i){return new es(...i)}fe.or=vV;function jV(i,e){return new Gd(i,e)}fe.custom=jV});var p0=C(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.FilteredDataFrame=Br.CountByResult=Br.DataFrame=void 0;var c0=Rs(),l0=Za(),Kd=Xe(),d0=Jd(),wV=Vi(),f0=be(),Zd=class extends c0.Table{filter(e){return new Qs(this.chunks,e)}scan(e,t){let r=this.chunks,n=r.length;for(let o=-1;++o<n;){let l=r[o];t&&t(l);for(let _=-1,v=l.length;++_<v;)e(_,l)}}scanReverse(e,t){let r=this.chunks,n=r.length;for(let o=n;--o>=0;){let l=r[o];t&&t(l);for(let _=l.length;--_>=0;)e(_,l)}}countBy(e){let t=this.chunks,r=t.length,n=typeof e=="string"?new d0.Col(e):e;n.bind(t[r-1]);let o=n.vector;if(!f0.DataType.isDictionary(o.type))throw new Error("countBy currently only supports dictionary-encoded columns");let l=Math.ceil(Math.log(o.length)/Math.log(256)),_=l==4?Uint32Array:l>=2?Uint16Array:Uint8Array,v=new _(o.dictionary.length);for(let T=-1;++T<r;){let D=t[T];n.bind(D);let N=n.vector.indices;for(let z=-1,K=D.length;++z<K;){let Me=N.get(z);Me!==null&&v[Me]++}}return new gu(o.dictionary,l0.IntVector.from(v))}};Br.DataFrame=Zd;var gu=class extends c0.Table{constructor(e,t){let r=new Kd.Schema([new Kd.Field("values",e.type),new Kd.Field("counts",t.type)]);super(new wV.RecordBatch(r,t.length,[e,t]))}toJSON(){let e=this.getColumnAt(0),t=this.getColumnAt(1),r={};for(let n=-1;++n<this.length;)r[e.get(n)]=t.get(n);return r}};Br.CountByResult=gu;var h0=class{constructor(e,t){this.batches=e,this.predicate=t,this.batchIndex=0,this.index=0,this.batch=this.batches[this.batchIndex],this.predicateFunc=this.predicate.bind(this.batch)}next(){for(;this.batchIndex<this.batches.length;){for(;this.index<this.batch.length;){if(this.predicateFunc(this.index,this.batch))return{value:this.batch.get(this.index++)};this.index++}++this.batchIndex<this.batches.length&&(this.index=0,this.batch=this.batches[this.batchIndex],this.predicateFunc=this.predicate.bind(this.batch))}return{done:!0,value:null}}[Symbol.iterator](){return this}},Qs=class extends Zd{constructor(e,t){super(e);this._predicate=t}scan(e,t){let r=this._chunks,n=r.length;for(let o=-1;++o<n;){let l=r[o],_=this._predicate.bind(l),v=!1;for(let T=-1,D=l.length;++T<D;)_(T,l)&&(t&&!v&&(t(l),v=!0),e(T,l))}}scanReverse(e,t){let r=this._chunks,n=r.length;for(let o=n;--o>=0;){let l=r[o],_=this._predicate.bind(l),v=!1;for(let T=l.length;--T>=0;)_(T,l)&&(t&&!v&&(t(l),v=!0),e(T,l))}}count(){let e=0,t=this._chunks,r=t.length;for(let n=-1;++n<r;){let o=t[n],l=this._predicate.bind(o);for(let _=-1,v=o.length;++_<v;)l(_,o)&&++e}return e}[Symbol.iterator](){return new h0(this._chunks,this._predicate)}filter(e){return new Qs(this._chunks,this._predicate.and(e))}countBy(e){let t=this._chunks,r=t.length,n=typeof e=="string"?new d0.Col(e):e;n.bind(t[r-1]);let o=n.vector;if(!f0.DataType.isDictionary(o.type))throw new Error("countBy currently only supports dictionary-encoded columns");let l=Math.ceil(Math.log(o.length)/Math.log(256)),_=l==4?Uint32Array:l>=2?Uint16Array:Uint8Array,v=new _(o.dictionary.length);for(let T=-1;++T<r;){let D=t[T],N=this._predicate.bind(D);n.bind(D);let z=n.vector.indices;for(let K=-1,Me=D.length;++K<Me;){let Ie=z.get(K);Ie!==null&&N(K,D)&&v[Ie]++}}return new gu(o.dictionary,l0.IntVector.from(v))}};Br.FilteredDataFrame=Qs});var m0=C(g=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});g.isTypedArray=g.util=g.predicate=g.CountByResult=g.FilteredDataFrame=g.DataFrame=g.RecordBatch=g.Message=g.JSONMessageReader=g.AsyncMessageReader=g.MessageReader=g.RecordBatchJSONWriter=g.RecordBatchStreamWriter=g.RecordBatchFileWriter=g.RecordBatchWriter=g.AsyncRecordBatchStreamReader=g.AsyncRecordBatchFileReader=g.RecordBatchStreamReader=g.RecordBatchFileReader=g.RecordBatchReader=g.AsyncByteQueue=g.AsyncByteStream=g.ByteStream=g.Utf8Builder=g.SparseUnionBuilder=g.DenseUnionBuilder=g.UnionBuilder=g.TimeNanosecondBuilder=g.TimeMicrosecondBuilder=g.TimeMillisecondBuilder=g.TimeSecondBuilder=g.TimeBuilder=g.TimestampNanosecondBuilder=g.TimestampMicrosecondBuilder=g.TimestampMillisecondBuilder=g.TimestampSecondBuilder=g.TimestampBuilder=g.StructBuilder=g.NullBuilder=g.MapBuilder=g.ListBuilder=g.Uint64Builder=g.Uint32Builder=g.Uint16Builder=g.Uint8Builder=g.Int64Builder=g.Int32Builder=g.Int16Builder=g.Int8Builder=g.IntBuilder=g.IntervalYearMonthBuilder=g.IntervalDayTimeBuilder=g.IntervalBuilder=g.Float64Builder=g.Float32Builder=g.Float16Builder=g.FloatBuilder=g.FixedSizeListBuilder=g.FixedSizeBinaryBuilder=g.DictionaryBuilder=g.DecimalBuilder=g.DateMillisecondBuilder=g.DateDayBuilder=g.DateBuilder=g.BoolBuilder=g.BinaryBuilder=g.Builder=g.Utf8Vector=g.SparseUnionVector=g.DenseUnionVector=g.UnionVector=g.TimeNanosecondVector=g.TimeMicrosecondVector=g.TimeMillisecondVector=g.TimeSecondVector=g.TimeVector=g.TimestampNanosecondVector=g.TimestampMicrosecondVector=g.TimestampMillisecondVector=g.TimestampSecondVector=g.TimestampVector=g.StructVector=g.NullVector=g.MapVector=g.ListVector=g.Uint64Vector=g.Uint32Vector=g.Uint16Vector=g.Uint8Vector=g.Int64Vector=g.Int32Vector=g.Int16Vector=g.Int8Vector=g.IntVector=g.IntervalYearMonthVector=g.IntervalDayTimeVector=g.IntervalVector=g.Float64Vector=g.Float32Vector=g.Float16Vector=g.FloatVector=g.FixedSizeListVector=g.FixedSizeBinaryVector=g.DictionaryVector=g.DecimalVector=g.DateMillisecondVector=g.DateDayVector=g.DateVector=g.Chunked=g.BoolVector=g.BinaryVector=g.BaseVector=g.Vector=g.Field=g.Schema=g.Visitor=g.Column=g.Table=g.Map_=g.FixedSizeList=g.IntervalYearMonth=g.IntervalDayTime=g.Interval=g.Dictionary=g.SparseUnion=g.DenseUnion=g.Union=g.Struct=g.List=g.Decimal=g.TimeNanosecond=g.TimeMicrosecond=g.TimeMillisecond=g.TimeSecond=g.Time=g.TimestampNanosecond=g.TimestampMicrosecond=g.TimestampMillisecond=g.TimestampSecond=g.Timestamp=g.DateMillisecond=g.DateDay=g.Date_=g.FixedSizeBinary=g.Binary=g.Utf8=g.Float64=g.Float32=g.Float16=g.Float=g.Uint64=g.Uint32=g.Uint16=g.Uint8=g.Int64=g.Int32=g.Int16=g.Int8=g.Int=g.Bool=g.Null=g.DataType=g.Data=g.BufferType=g.Type=g.MessageHeader=g.MetadataVersion=g.IntervalUnit=g.UnionMode=g.Precision=g.TimeUnit=g.DateUnit=void 0;var is=Gi();Object.defineProperty(g,"DateUnit",{enumerable:!0,get:function(){return is.DateUnit}});Object.defineProperty(g,"TimeUnit",{enumerable:!0,get:function(){return is.TimeUnit}});Object.defineProperty(g,"Precision",{enumerable:!0,get:function(){return is.Precision}});Object.defineProperty(g,"UnionMode",{enumerable:!0,get:function(){return is.UnionMode}});Object.defineProperty(g,"IntervalUnit",{enumerable:!0,get:function(){return is.IntervalUnit}});Object.defineProperty(g,"MetadataVersion",{enumerable:!0,get:function(){return is.MetadataVersion}});var BV=Oo();Object.defineProperty(g,"MessageHeader",{enumerable:!0,get:function(){return BV.MessageHeader}});var y0=Be();Object.defineProperty(g,"Type",{enumerable:!0,get:function(){return y0.Type}});Object.defineProperty(g,"BufferType",{enumerable:!0,get:function(){return y0.BufferType}});var IV=Yt();Object.defineProperty(g,"Data",{enumerable:!0,get:function(){return IV.Data}});var oe=be();Object.defineProperty(g,"DataType",{enumerable:!0,get:function(){return oe.DataType}});Object.defineProperty(g,"Null",{enumerable:!0,get:function(){return oe.Null}});Object.defineProperty(g,"Bool",{enumerable:!0,get:function(){return oe.Bool}});Object.defineProperty(g,"Int",{enumerable:!0,get:function(){return oe.Int}});Object.defineProperty(g,"Int8",{enumerable:!0,get:function(){return oe.Int8}});Object.defineProperty(g,"Int16",{enumerable:!0,get:function(){return oe.Int16}});Object.defineProperty(g,"Int32",{enumerable:!0,get:function(){return oe.Int32}});Object.defineProperty(g,"Int64",{enumerable:!0,get:function(){return oe.Int64}});Object.defineProperty(g,"Uint8",{enumerable:!0,get:function(){return oe.Uint8}});Object.defineProperty(g,"Uint16",{enumerable:!0,get:function(){return oe.Uint16}});Object.defineProperty(g,"Uint32",{enumerable:!0,get:function(){return oe.Uint32}});Object.defineProperty(g,"Uint64",{enumerable:!0,get:function(){return oe.Uint64}});Object.defineProperty(g,"Float",{enumerable:!0,get:function(){return oe.Float}});Object.defineProperty(g,"Float16",{enumerable:!0,get:function(){return oe.Float16}});Object.defineProperty(g,"Float32",{enumerable:!0,get:function(){return oe.Float32}});Object.defineProperty(g,"Float64",{enumerable:!0,get:function(){return oe.Float64}});Object.defineProperty(g,"Utf8",{enumerable:!0,get:function(){return oe.Utf8}});Object.defineProperty(g,"Binary",{enumerable:!0,get:function(){return oe.Binary}});Object.defineProperty(g,"FixedSizeBinary",{enumerable:!0,get:function(){return oe.FixedSizeBinary}});Object.defineProperty(g,"Date_",{enumerable:!0,get:function(){return oe.Date_}});Object.defineProperty(g,"DateDay",{enumerable:!0,get:function(){return oe.DateDay}});Object.defineProperty(g,"DateMillisecond",{enumerable:!0,get:function(){return oe.DateMillisecond}});Object.defineProperty(g,"Timestamp",{enumerable:!0,get:function(){return oe.Timestamp}});Object.defineProperty(g,"TimestampSecond",{enumerable:!0,get:function(){return oe.TimestampSecond}});Object.defineProperty(g,"TimestampMillisecond",{enumerable:!0,get:function(){return oe.TimestampMillisecond}});Object.defineProperty(g,"TimestampMicrosecond",{enumerable:!0,get:function(){return oe.TimestampMicrosecond}});Object.defineProperty(g,"TimestampNanosecond",{enumerable:!0,get:function(){return oe.TimestampNanosecond}});Object.defineProperty(g,"Time",{enumerable:!0,get:function(){return oe.Time}});Object.defineProperty(g,"TimeSecond",{enumerable:!0,get:function(){return oe.TimeSecond}});Object.defineProperty(g,"TimeMillisecond",{enumerable:!0,get:function(){return oe.TimeMillisecond}});Object.defineProperty(g,"TimeMicrosecond",{enumerable:!0,get:function(){return oe.TimeMicrosecond}});Object.defineProperty(g,"TimeNanosecond",{enumerable:!0,get:function(){return oe.TimeNanosecond}});Object.defineProperty(g,"Decimal",{enumerable:!0,get:function(){return oe.Decimal}});Object.defineProperty(g,"List",{enumerable:!0,get:function(){return oe.List}});Object.defineProperty(g,"Struct",{enumerable:!0,get:function(){return oe.Struct}});Object.defineProperty(g,"Union",{enumerable:!0,get:function(){return oe.Union}});Object.defineProperty(g,"DenseUnion",{enumerable:!0,get:function(){return oe.DenseUnion}});Object.defineProperty(g,"SparseUnion",{enumerable:!0,get:function(){return oe.SparseUnion}});Object.defineProperty(g,"Dictionary",{enumerable:!0,get:function(){return oe.Dictionary}});Object.defineProperty(g,"Interval",{enumerable:!0,get:function(){return oe.Interval}});Object.defineProperty(g,"IntervalDayTime",{enumerable:!0,get:function(){return oe.IntervalDayTime}});Object.defineProperty(g,"IntervalYearMonth",{enumerable:!0,get:function(){return oe.IntervalYearMonth}});Object.defineProperty(g,"FixedSizeList",{enumerable:!0,get:function(){return oe.FixedSizeList}});Object.defineProperty(g,"Map_",{enumerable:!0,get:function(){return oe.Map_}});var TV=Rs();Object.defineProperty(g,"Table",{enumerable:!0,get:function(){return TV.Table}});var SV=Un();Object.defineProperty(g,"Column",{enumerable:!0,get:function(){return SV.Column}});var AV=rt();Object.defineProperty(g,"Visitor",{enumerable:!0,get:function(){return AV.Visitor}});var _0=Xe();Object.defineProperty(g,"Schema",{enumerable:!0,get:function(){return _0.Schema}});Object.defineProperty(g,"Field",{enumerable:!0,get:function(){return _0.Field}});var re=yi();Object.defineProperty(g,"Vector",{enumerable:!0,get:function(){return re.Vector}});Object.defineProperty(g,"BaseVector",{enumerable:!0,get:function(){return re.BaseVector}});Object.defineProperty(g,"BinaryVector",{enumerable:!0,get:function(){return re.BinaryVector}});Object.defineProperty(g,"BoolVector",{enumerable:!0,get:function(){return re.BoolVector}});Object.defineProperty(g,"Chunked",{enumerable:!0,get:function(){return re.Chunked}});Object.defineProperty(g,"DateVector",{enumerable:!0,get:function(){return re.DateVector}});Object.defineProperty(g,"DateDayVector",{enumerable:!0,get:function(){return re.DateDayVector}});Object.defineProperty(g,"DateMillisecondVector",{enumerable:!0,get:function(){return re.DateMillisecondVector}});Object.defineProperty(g,"DecimalVector",{enumerable:!0,get:function(){return re.DecimalVector}});Object.defineProperty(g,"DictionaryVector",{enumerable:!0,get:function(){return re.DictionaryVector}});Object.defineProperty(g,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return re.FixedSizeBinaryVector}});Object.defineProperty(g,"FixedSizeListVector",{enumerable:!0,get:function(){return re.FixedSizeListVector}});Object.defineProperty(g,"FloatVector",{enumerable:!0,get:function(){return re.FloatVector}});Object.defineProperty(g,"Float16Vector",{enumerable:!0,get:function(){return re.Float16Vector}});Object.defineProperty(g,"Float32Vector",{enumerable:!0,get:function(){return re.Float32Vector}});Object.defineProperty(g,"Float64Vector",{enumerable:!0,get:function(){return re.Float64Vector}});Object.defineProperty(g,"IntervalVector",{enumerable:!0,get:function(){return re.IntervalVector}});Object.defineProperty(g,"IntervalDayTimeVector",{enumerable:!0,get:function(){return re.IntervalDayTimeVector}});Object.defineProperty(g,"IntervalYearMonthVector",{enumerable:!0,get:function(){return re.IntervalYearMonthVector}});Object.defineProperty(g,"IntVector",{enumerable:!0,get:function(){return re.IntVector}});Object.defineProperty(g,"Int8Vector",{enumerable:!0,get:function(){return re.Int8Vector}});Object.defineProperty(g,"Int16Vector",{enumerable:!0,get:function(){return re.Int16Vector}});Object.defineProperty(g,"Int32Vector",{enumerable:!0,get:function(){return re.Int32Vector}});Object.defineProperty(g,"Int64Vector",{enumerable:!0,get:function(){return re.Int64Vector}});Object.defineProperty(g,"Uint8Vector",{enumerable:!0,get:function(){return re.Uint8Vector}});Object.defineProperty(g,"Uint16Vector",{enumerable:!0,get:function(){return re.Uint16Vector}});Object.defineProperty(g,"Uint32Vector",{enumerable:!0,get:function(){return re.Uint32Vector}});Object.defineProperty(g,"Uint64Vector",{enumerable:!0,get:function(){return re.Uint64Vector}});Object.defineProperty(g,"ListVector",{enumerable:!0,get:function(){return re.ListVector}});Object.defineProperty(g,"MapVector",{enumerable:!0,get:function(){return re.MapVector}});Object.defineProperty(g,"NullVector",{enumerable:!0,get:function(){return re.NullVector}});Object.defineProperty(g,"StructVector",{enumerable:!0,get:function(){return re.StructVector}});Object.defineProperty(g,"TimestampVector",{enumerable:!0,get:function(){return re.TimestampVector}});Object.defineProperty(g,"TimestampSecondVector",{enumerable:!0,get:function(){return re.TimestampSecondVector}});Object.defineProperty(g,"TimestampMillisecondVector",{enumerable:!0,get:function(){return re.TimestampMillisecondVector}});Object.defineProperty(g,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return re.TimestampMicrosecondVector}});Object.defineProperty(g,"TimestampNanosecondVector",{enumerable:!0,get:function(){return re.TimestampNanosecondVector}});Object.defineProperty(g,"TimeVector",{enumerable:!0,get:function(){return re.TimeVector}});Object.defineProperty(g,"TimeSecondVector",{enumerable:!0,get:function(){return re.TimeSecondVector}});Object.defineProperty(g,"TimeMillisecondVector",{enumerable:!0,get:function(){return re.TimeMillisecondVector}});Object.defineProperty(g,"TimeMicrosecondVector",{enumerable:!0,get:function(){return re.TimeMicrosecondVector}});Object.defineProperty(g,"TimeNanosecondVector",{enumerable:!0,get:function(){return re.TimeNanosecondVector}});Object.defineProperty(g,"UnionVector",{enumerable:!0,get:function(){return re.UnionVector}});Object.defineProperty(g,"DenseUnionVector",{enumerable:!0,get:function(){return re.DenseUnionVector}});Object.defineProperty(g,"SparseUnionVector",{enumerable:!0,get:function(){return re.SparseUnionVector}});Object.defineProperty(g,"Utf8Vector",{enumerable:!0,get:function(){return re.Utf8Vector}});var ae=ya();Object.defineProperty(g,"Builder",{enumerable:!0,get:function(){return ae.Builder}});Object.defineProperty(g,"BinaryBuilder",{enumerable:!0,get:function(){return ae.BinaryBuilder}});Object.defineProperty(g,"BoolBuilder",{enumerable:!0,get:function(){return ae.BoolBuilder}});Object.defineProperty(g,"DateBuilder",{enumerable:!0,get:function(){return ae.DateBuilder}});Object.defineProperty(g,"DateDayBuilder",{enumerable:!0,get:function(){return ae.DateDayBuilder}});Object.defineProperty(g,"DateMillisecondBuilder",{enumerable:!0,get:function(){return ae.DateMillisecondBuilder}});Object.defineProperty(g,"DecimalBuilder",{enumerable:!0,get:function(){return ae.DecimalBuilder}});Object.defineProperty(g,"DictionaryBuilder",{enumerable:!0,get:function(){return ae.DictionaryBuilder}});Object.defineProperty(g,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return ae.FixedSizeBinaryBuilder}});Object.defineProperty(g,"FixedSizeListBuilder",{enumerable:!0,get:function(){return ae.FixedSizeListBuilder}});Object.defineProperty(g,"FloatBuilder",{enumerable:!0,get:function(){return ae.FloatBuilder}});Object.defineProperty(g,"Float16Builder",{enumerable:!0,get:function(){return ae.Float16Builder}});Object.defineProperty(g,"Float32Builder",{enumerable:!0,get:function(){return ae.Float32Builder}});Object.defineProperty(g,"Float64Builder",{enumerable:!0,get:function(){return ae.Float64Builder}});Object.defineProperty(g,"IntervalBuilder",{enumerable:!0,get:function(){return ae.IntervalBuilder}});Object.defineProperty(g,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return ae.IntervalDayTimeBuilder}});Object.defineProperty(g,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return ae.IntervalYearMonthBuilder}});Object.defineProperty(g,"IntBuilder",{enumerable:!0,get:function(){return ae.IntBuilder}});Object.defineProperty(g,"Int8Builder",{enumerable:!0,get:function(){return ae.Int8Builder}});Object.defineProperty(g,"Int16Builder",{enumerable:!0,get:function(){return ae.Int16Builder}});Object.defineProperty(g,"Int32Builder",{enumerable:!0,get:function(){return ae.Int32Builder}});Object.defineProperty(g,"Int64Builder",{enumerable:!0,get:function(){return ae.Int64Builder}});Object.defineProperty(g,"Uint8Builder",{enumerable:!0,get:function(){return ae.Uint8Builder}});Object.defineProperty(g,"Uint16Builder",{enumerable:!0,get:function(){return ae.Uint16Builder}});Object.defineProperty(g,"Uint32Builder",{enumerable:!0,get:function(){return ae.Uint32Builder}});Object.defineProperty(g,"Uint64Builder",{enumerable:!0,get:function(){return ae.Uint64Builder}});Object.defineProperty(g,"ListBuilder",{enumerable:!0,get:function(){return ae.ListBuilder}});Object.defineProperty(g,"MapBuilder",{enumerable:!0,get:function(){return ae.MapBuilder}});Object.defineProperty(g,"NullBuilder",{enumerable:!0,get:function(){return ae.NullBuilder}});Object.defineProperty(g,"StructBuilder",{enumerable:!0,get:function(){return ae.StructBuilder}});Object.defineProperty(g,"TimestampBuilder",{enumerable:!0,get:function(){return ae.TimestampBuilder}});Object.defineProperty(g,"TimestampSecondBuilder",{enumerable:!0,get:function(){return ae.TimestampSecondBuilder}});Object.defineProperty(g,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return ae.TimestampMillisecondBuilder}});Object.defineProperty(g,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return ae.TimestampMicrosecondBuilder}});Object.defineProperty(g,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return ae.TimestampNanosecondBuilder}});Object.defineProperty(g,"TimeBuilder",{enumerable:!0,get:function(){return ae.TimeBuilder}});Object.defineProperty(g,"TimeSecondBuilder",{enumerable:!0,get:function(){return ae.TimeSecondBuilder}});Object.defineProperty(g,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return ae.TimeMillisecondBuilder}});Object.defineProperty(g,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return ae.TimeMicrosecondBuilder}});Object.defineProperty(g,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return ae.TimeNanosecondBuilder}});Object.defineProperty(g,"UnionBuilder",{enumerable:!0,get:function(){return ae.UnionBuilder}});Object.defineProperty(g,"DenseUnionBuilder",{enumerable:!0,get:function(){return ae.DenseUnionBuilder}});Object.defineProperty(g,"SparseUnionBuilder",{enumerable:!0,get:function(){return ae.SparseUnionBuilder}});Object.defineProperty(g,"Utf8Builder",{enumerable:!0,get:function(){return ae.Utf8Builder}});var Xd=ar();Object.defineProperty(g,"ByteStream",{enumerable:!0,get:function(){return Xd.ByteStream}});Object.defineProperty(g,"AsyncByteStream",{enumerable:!0,get:function(){return Xd.AsyncByteStream}});Object.defineProperty(g,"AsyncByteQueue",{enumerable:!0,get:function(){return Xd.AsyncByteQueue}});var eo=Ys();Object.defineProperty(g,"RecordBatchReader",{enumerable:!0,get:function(){return eo.RecordBatchReader}});Object.defineProperty(g,"RecordBatchFileReader",{enumerable:!0,get:function(){return eo.RecordBatchFileReader}});Object.defineProperty(g,"RecordBatchStreamReader",{enumerable:!0,get:function(){return eo.RecordBatchStreamReader}});Object.defineProperty(g,"AsyncRecordBatchFileReader",{enumerable:!0,get:function(){return eo.AsyncRecordBatchFileReader}});Object.defineProperty(g,"AsyncRecordBatchStreamReader",{enumerable:!0,get:function(){return eo.AsyncRecordBatchStreamReader}});var vu=La();Object.defineProperty(g,"RecordBatchWriter",{enumerable:!0,get:function(){return vu.RecordBatchWriter}});Object.defineProperty(g,"RecordBatchFileWriter",{enumerable:!0,get:function(){return vu.RecordBatchFileWriter}});Object.defineProperty(g,"RecordBatchStreamWriter",{enumerable:!0,get:function(){return vu.RecordBatchStreamWriter}});Object.defineProperty(g,"RecordBatchJSONWriter",{enumerable:!0,get:function(){return vu.RecordBatchJSONWriter}});var Qd=Oa();Object.defineProperty(g,"MessageReader",{enumerable:!0,get:function(){return Qd.MessageReader}});Object.defineProperty(g,"AsyncMessageReader",{enumerable:!0,get:function(){return Qd.AsyncMessageReader}});Object.defineProperty(g,"JSONMessageReader",{enumerable:!0,get:function(){return Qd.JSONMessageReader}});var DV=Hr();Object.defineProperty(g,"Message",{enumerable:!0,get:function(){return DV.Message}});var OV=Vi();Object.defineProperty(g,"RecordBatch",{enumerable:!0,get:function(){return OV.RecordBatch}});var ef=p0();Object.defineProperty(g,"DataFrame",{enumerable:!0,get:function(){return ef.DataFrame}});Object.defineProperty(g,"FilteredDataFrame",{enumerable:!0,get:function(){return ef.FilteredDataFrame}});Object.defineProperty(g,"CountByResult",{enumerable:!0,get:function(){return ef.CountByResult}});var FV=js(),MV=ol(),CV=ni(),UV=ms(),VV=$e(),kV=Os(),EV=Jd();g.predicate=EV;var tf=Il();g.util=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},FV),MV),CV),UV),VV),kV),{compareSchemas:tf.compareSchemas,compareFields:tf.compareFields,compareTypes:tf.compareTypes});var RV=qr();Object.defineProperty(g,"isTypedArray",{enumerable:!0,get:function(){return RV.isTypedArray}})});var Bu=C(()=>{});var nf=C(()=>{});var qV={};XS(qV,{registerWorker:()=>A0});var b0=wi(ys(),1),g0=wi(ya(),1),rs=wi(Ys(),1),ns=wi(La(),1),v0=wi(r0(),1),j0=wi(o0(),1),ju=wi(a0(),1),wu=wi(u0(),1),S=wi(m0(),1);b0.default.toDOMStream=v0.toDOMStream;g0.Builder.throughDOM=j0.builderThroughDOMStream;rs.RecordBatchReader.throughDOM=ju.recordBatchReaderThroughDOMStream;rs.RecordBatchFileReader.throughDOM=ju.recordBatchReaderThroughDOMStream;rs.RecordBatchStreamReader.throughDOM=ju.recordBatchReaderThroughDOMStream;ns.RecordBatchWriter.throughDOM=wu.recordBatchWriterThroughDOMStream;ns.RecordBatchFileWriter.throughDOM=wu.recordBatchWriterThroughDOMStream;ns.RecordBatchStreamWriter.throughDOM=wu.recordBatchWriterThroughDOMStream;function to(i,e){switch(e.typeId){case S.Type.Binary:return{name:i,type:"binary"};case S.Type.Bool:return{name:i,type:"bool"};case S.Type.Date:return{name:i,type:"date"};case S.Type.DateDay:return{name:i,type:"date32[d]"};case S.Type.DateMillisecond:return{name:i,type:"date64[ms]"};case S.Type.Decimal:{let t=e;return{name:i,type:"decimal",precision:t.precision,scale:t.scale}}case S.Type.Float:return{name:i,type:"float"};case S.Type.Float16:return{name:i,type:"float16"};case S.Type.Float32:return{name:i,type:"float32"};case S.Type.Float64:return{name:i,type:"float64"};case S.Type.Int:return{name:i,type:"int32"};case S.Type.Int16:return{name:i,type:"int16"};case S.Type.Int32:return{name:i,type:"int32"};case S.Type.Int64:return{name:i,type:"int64"};case S.Type.Uint16:return{name:i,type:"uint16"};case S.Type.Uint32:return{name:i,type:"uint32"};case S.Type.Uint64:return{name:i,type:"uint64"};case S.Type.Uint8:return{name:i,type:"uint8"};case S.Type.IntervalDayTime:return{name:i,type:"interval[dt]"};case S.Type.IntervalYearMonth:return{name:i,type:"interval[m]"};case S.Type.List:{let t=e;return{name:i,type:"list",children:[to(t.valueField.name,t.valueField.type)]}}case S.Type.FixedSizeBinary:return{name:i,type:"fixedsizebinary",byteWidth:e.byteWidth};case S.Type.Null:return{name:i,type:"null"};case S.Type.Utf8:return{name:i,type:"utf8"};case S.Type.Struct:return{name:i,type:"struct",children:e.children.map(r=>to(r.name,r.type))};case S.Type.Time:return{name:i,type:"time[s]"};case S.Type.TimeMicrosecond:return{name:i,type:"time[us]"};case S.Type.TimeMillisecond:return{name:i,type:"time[ms]"};case S.Type.TimeNanosecond:return{name:i,type:"time[ns]"};case S.Type.TimeSecond:return{name:i,type:"time[s]"};case S.Type.Timestamp:return{name:i,type:"timestamp",timezone:e.timezone||void 0};case S.Type.TimestampSecond:return{name:i,type:"timestamp[s]",timezone:e.timezone||void 0};case S.Type.TimestampMicrosecond:return{name:i,type:"timestamp[us]",timezone:e.timezone||void 0};case S.Type.TimestampNanosecond:return{name:i,type:"timestamp[ns]",timezone:e.timezone||void 0};case S.Type.TimestampMillisecond:return{name:i,type:"timestamp[ms]",timezone:e.timezone||void 0}}throw new Error(`unsupported arrow type: ${e.toString()}`)}var rf=class{constructor(){this._bindings=null;this._nextMessageId=0}log(e){this.postMessage({messageId:this._nextMessageId++,requestId:0,type:"LOG",data:e},[])}sendOK(e){this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"OK",data:null},[])}failWith(e,t){let r={name:t.name,message:t.message,stack:t.stack||void 0};this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"ERROR",data:r},[])}async onMessage(e){switch(e.type){case"PING":this.sendOK(e);return;case"INSTANTIATE":this._bindings!=null&&this.failWith(e,new Error("duckdb already initialized"));try{this._bindings=await this.instantiate(e.data[0],e.data[1]),this.sendOK(e)}catch(t){this._bindings=null,this.failWith(e,t)}return;default:break}if(!this._bindings)return this.failWith(e,new Error("duckdb is not initialized"));try{switch(e.type){case"GET_VERSION":this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"VERSION_STRING",data:this._bindings.getVersion()},[]);break;case"GET_FEATURE_FLAGS":this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"FEATURE_FLAGS",data:this._bindings.getFeatureFlags()},[]);break;case"RESET":this._bindings.reset(),this.sendOK(e);break;case"OPEN":this._bindings.open(e.data),this.sendOK(e);break;case"DROP_FILE":this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"SUCCESS",data:this._bindings.dropFile(e.data)},[]);break;case"DROP_FILES":this._bindings.dropFiles(),this.sendOK(e);break;case"FLUSH_FILES":this._bindings.flushFiles(),this.sendOK(e);break;case"CONNECT":{let t=this._bindings.connect();this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"CONNECTION_INFO",data:t.useUnsafe((r,n)=>n)},[]);break}case"DISCONNECT":this._bindings.disconnect(e.data),this.sendOK(e);break;case"CREATE_PREPARED":{let t=this._bindings.createPrepared(e.data[0],e.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"PREPARED_STATEMENT_ID",data:t},[]);break}case"CLOSE_PREPARED":{this._bindings.closePrepared(e.data[0],e.data[1]),this.sendOK(e);break}case"RUN_PREPARED":{let t=this._bindings.runPrepared(e.data[0],e.data[1],e.data[2]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"QUERY_RESULT",data:t},[t.buffer]);break}case"RUN_QUERY":{let t=this._bindings.runQuery(e.data[0],e.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"QUERY_RESULT",data:t},[t.buffer]);break}case"SEND_PREPARED":{let t=this._bindings.sendPrepared(e.data[0],e.data[1],e.data[2]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"QUERY_START",data:t},[t.buffer]);break}case"SEND_QUERY":{let t=this._bindings.sendQuery(e.data[0],e.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"QUERY_START",data:t},[t.buffer]);break}case"FETCH_QUERY_RESULTS":{let t=this._bindings.fetchQueryResults(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"QUERY_RESULT_CHUNK",data:t},[t.buffer]);break}case"GET_TABLE_NAMES":{let t=this._bindings.getTableNames(e.data[0],e.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"TABLE_NAMES",data:t},[]);break}case"GLOB_FILE_INFOS":{let t=this._bindings.globFiles(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"FILE_INFOS",data:t},[]);break}case"REGISTER_FILE_URL":this._bindings.registerFileURL(e.data[0],e.data[1]),this.sendOK(e);break;case"REGISTER_FILE_BUFFER":this._bindings.registerFileBuffer(e.data[0],e.data[1]),this.sendOK(e);break;case"REGISTER_FILE_HANDLE":this._bindings.registerFileHandle(e.data[0],e.data[1]),this.sendOK(e);break;case"COPY_FILE_TO_PATH":this._bindings.copyFileToPath(e.data[0],e.data[1]),this.sendOK(e);break;case"COPY_FILE_TO_BUFFER":{let t=this._bindings.copyFileToBuffer(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"FILE_BUFFER",data:t},[]);break}case"COLLECT_FILE_STATISTICS":this._bindings.collectFileStatistics(e.data[0],e.data[1]),this.sendOK(e);break;case"EXPORT_FILE_STATISTICS":{this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"FILE_STATISTICS",data:this._bindings.exportFileStatistics(e.data)},[]);break}case"INSERT_ARROW_FROM_IPC_STREAM":{this._bindings.insertArrowFromIPCStream(e.data[0],e.data[1],e.data[2]),this.sendOK(e);break}case"IMPORT_CSV_FROM_PATH":{this._bindings.insertCSVFromPath(e.data[0],e.data[1],e.data[2]),this.sendOK(e);break}case"IMPORT_JSON_FROM_PATH":{this._bindings.insertJSONFromPath(e.data[0],e.data[1],e.data[2]),this.sendOK(e);break}case"TOKENIZE":{let t=this._bindings.tokenize(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"SCRIPT_TOKENS",data:t},[]);break}}}catch(t){return this.failWith(e,t)}}};var I0={},PV=function(){var i=I0.url;return function(e){e=e||{};var t=typeof e!="undefined"?e:{},r,n;t.ready=new Promise(function(s,a){r=s,n=a});var o={},l;for(l in t)t.hasOwnProperty(l)&&(o[l]=t[l]);var _=[],v="./this.program",T=function(s,a){throw a},D=typeof window=="object",N=typeof importScripts=="function",z=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",K="";function Me(s){return t.locateFile?t.locateFile(s,K):K+s}var Ie,qt,ct,os;function D0(s){if(!(s instanceof go)){var a=s;vi("exiting due to exception: "+a)}}var Xr,Qr;z?(N?K=Bu().dirname(K)+"/":K=__dirname+"/",Ie=function(a,u){return Xr||(Xr=nf()),Qr||(Qr=Bu()),a=Qr.normalize(a),Xr.readFileSync(a,u?null:"utf8")},ct=function(a){var u=Ie(a,!0);return u.buffer||(u=new Uint8Array(u)),no(u.buffer),u},qt=function(a,u,c){Xr||(Xr=nf()),Qr||(Qr=Bu()),a=Qr.normalize(a),Xr.readFile(a,function(d,f){d?c(d):u(f.buffer)})},process.argv.length>1&&(v=process.argv[1].replace(/\\/g,"/")),_=process.argv.slice(2),process.on("uncaughtException",function(s){if(!(s instanceof go))throw s}),process.on("unhandledRejection",function(s){throw s}),T=function(s,a){if(Su())throw process.exitCode=s,a;D0(a),process.exit(s)},t.inspect=function(){return"[Emscripten Module object]"}):(D||N)&&(N?K=self.location.href:typeof document!="undefined"&&document.currentScript&&(K=document.currentScript.src),i&&(K=i),K.indexOf("blob:")!==0?K=K.substr(0,K.replace(/[?#].*/,"").lastIndexOf("/")+1):K="",Ie=function(s){var a=new XMLHttpRequest;return a.open("GET",s,!1),a.send(null),a.responseText},N&&(ct=function(s){var a=new XMLHttpRequest;return a.open("GET",s,!1),a.responseType="arraybuffer",a.send(null),new Uint8Array(a.response)}),qt=function(s,a,u){var c=new XMLHttpRequest;c.open("GET",s,!0),c.responseType="arraybuffer",c.onload=function(){if(c.status==200||c.status==0&&c.response){a(c.response);return}u()},c.onerror=u,c.send(null)},os=function(s){document.title=s});var O0=t.print||console.log.bind(console),vi=t.printErr||console.warn.bind(console);for(l in o)o.hasOwnProperty(l)&&(t[l]=o[l]);o=null,t.arguments&&(_=t.arguments),t.thisProgram&&(v=t.thisProgram),t.quit&&(T=t.quit);var df=0,tt=function(s){df=s},F0=function(){return df},as;t.wasmBinary&&(as=t.wasmBinary);var M0=t.noExitRuntime||!0;typeof WebAssembly!="object"&&gt("no native wasm support detected");var io,Iu=!1,ro;function no(s,a){s||gt("Assertion failed: "+a)}function C0(s){var a=t["_"+s];return no(a,"Cannot call unknown function "+s+", make sure it is exported"),a}function U0(s,a,u,c,d){var f={string:function(R){var Z=0;if(R!=null&&R!==0){var le=(R.length<<2)+1;Z=ku(le),Tu(R,Z,le)}return Z},array:function(R){var Z=ku(R.length);return yf(R,Z),Z}};function h(R){return a==="string"?en(R):a==="boolean"?Boolean(R):R}var p=C0(s),y=[],m=0;if(c)for(var b=0;b<c.length;b++){var j=f[u[b]];j?(m===0&&(m=w()),y[b]=j(c[b])):y[b]=c[b]}var A=p.apply(null,y);function M(R){return m!==0&&B(m),h(R)}return A=M(A),A}var ff=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function hf(s,a,u){for(var c=a+u,d=a;s[d]&&!(d>=c);)++d;if(d-a>16&&s.subarray&&ff)return ff.decode(s.subarray(a,d));for(var f="";a<d;){var h=s[a++];if(!(h&128)){f+=String.fromCharCode(h);continue}var p=s[a++]&63;if((h&224)==192){f+=String.fromCharCode((h&31)<<6|p);continue}var y=s[a++]&63;if((h&240)==224?h=(h&15)<<12|p<<6|y:h=(h&7)<<18|p<<12|y<<6|s[a++]&63,h<65536)f+=String.fromCharCode(h);else{var m=h-65536;f+=String.fromCharCode(55296|m>>10,56320|m&1023)}}return f}function en(s,a){return s?hf(Ni,s,a):""}function pf(s,a,u,c){if(!(c>0))return 0;for(var d=u,f=u+c-1,h=0;h<s.length;++h){var p=s.charCodeAt(h);if(p>=55296&&p<=57343){var y=s.charCodeAt(++h);p=65536+((p&1023)<<10)|y&1023}if(p<=127){if(u>=f)break;a[u++]=p}else if(p<=2047){if(u+1>=f)break;a[u++]=192|p>>6,a[u++]=128|p&63}else if(p<=65535){if(u+2>=f)break;a[u++]=224|p>>12,a[u++]=128|p>>6&63,a[u++]=128|p&63}else{if(u+3>=f)break;a[u++]=240|p>>18,a[u++]=128|p>>12&63,a[u++]=128|p>>6&63,a[u++]=128|p&63}}return a[u]=0,u-d}function Tu(s,a,u){return pf(s,Ni,a,u)}function V0(s){for(var a=0,u=0;u<s.length;++u){var c=s.charCodeAt(u);c>=55296&&c<=57343&&(c=65536+((c&1023)<<10)|s.charCodeAt(++u)&1023),c<=127?++a:c<=2047?a+=2:c<=65535?a+=3:a+=4}return a}function yf(s,a){Xt.set(s,a)}function k0(s,a,u){for(var c=0;c<s.length;++c)Xt[a++>>0]=s.charCodeAt(c);u||(Xt[a>>0]=0)}function E0(s,a){return s%a>0&&(s+=a-s%a),s}var _f,Xt,Ni,us,mf,x,R0,P0,N0;function bf(s){_f=s,t.HEAP8=Xt=new Int8Array(s),t.HEAP16=us=new Int16Array(s),t.HEAP32=x=new Int32Array(s),t.HEAPU8=Ni=new Uint8Array(s),t.HEAPU16=mf=new Uint16Array(s),t.HEAPU32=R0=new Uint32Array(s),t.HEAPF32=P0=new Float32Array(s),t.HEAPF64=N0=new Float64Array(s)}var zV=t.INITIAL_MEMORY||16777216,$,gf=[],vf=[],L0=[],jf=[],x0=!1,q0=!1,z0=0;function Su(){return M0||z0>0}function W0(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)J0(t.preRun.shift());so(gf)}function H0(){x0=!0,so(vf)}function Y0(){so(L0)}function $0(){q0=!0}function G0(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)Z0(t.postRun.shift());so(jf)}function J0(s){gf.unshift(s)}function K0(s){vf.unshift(s)}function Z0(s){jf.unshift(s)}var Ir=0,Au=null,cs=null;function X0(s){Ir++,t.monitorRunDependencies&&t.monitorRunDependencies(Ir)}function Q0(s){if(Ir--,t.monitorRunDependencies&&t.monitorRunDependencies(Ir),Ir==0&&(Au!==null&&(clearInterval(Au),Au=null),cs)){var a=cs;cs=null,a()}}t.preloadedImages={},t.preloadedAudios={};function gt(s){t.onAbort&&t.onAbort(s),s="Aborted("+s+")",vi(s),Iu=!0,ro=1,s+=". Build with -s ASSERTIONS=1 for more info.";var a=new WebAssembly.RuntimeError(s);throw n(a),a}var ej="data:application/octet-stream;base64,";function wf(s){return s.startsWith(ej)}var vt;t.locateFile?(vt="./duckdb.wasm",wf(vt)||(vt=Me(vt))):vt=new URL("./duckdb.wasm",I0.url).toString();function Bf(s){try{if(s==vt&&as)return new Uint8Array(as);if(ct)return ct(s);throw"both async and sync fetching of the wasm failed"}catch(a){gt(a)}}function tj(){return!as&&(D||N)&&typeof fetch=="function"?fetch(vt,{credentials:"same-origin"}).then(function(s){if(!s.ok)throw"failed to load wasm binary file at '"+vt+"'";return s.arrayBuffer()}).catch(function(){return Bf(vt)}):Promise.resolve().then(function(){return Bf(vt)})}function ij(){var s={a:Cw};function a(h,p){var y=h.exports;t.asm=y,io=t.asm.Se,bf(io.buffer),$=t.asm.Ve,K0(t.asm.Te),Q0("wasm-instantiate")}X0("wasm-instantiate");function u(h){a(h.instance)}function c(h){return tj().then(function(p){return WebAssembly.instantiate(p,s)}).then(function(p){return p}).then(h,function(p){vi("failed to asynchronously prepare wasm: "+p),gt(p)})}function d(){return!as&&typeof WebAssembly.instantiateStreaming=="function"&&!wf(vt)&&typeof fetch=="function"?fetch(vt,{credentials:"same-origin"}).then(function(h){var p=WebAssembly.instantiateStreaming(h,s);return p.then(u,function(y){return vi("wasm streaming compile failed: "+y),vi("falling back to ArrayBuffer instantiation"),c(u)})}):c(u)}if(t.instantiateWasm)try{var f=t.instantiateWasm(s,a);return f}catch(h){return vi("Module.instantiateWasm callback failed with error: "+h),!1}return d().catch(n),{}}function so(s){for(;s.length>0;){var a=s.shift();if(typeof a=="function"){a(t);continue}var u=a.func;typeof u=="number"?a.arg===void 0?$.get(u)():$.get(u)(a.arg):u(a.arg===void 0?null:a.arg)}}function rj(s){if(s instanceof go||s=="unwind")return ro;T(1,s)}function nj(s){return fs(s+16)+16}function Tr(s){this.excPtr=s,this.ptr=s-16,this.set_type=function(a){x[this.ptr+4>>2]=a},this.get_type=function(){return x[this.ptr+4>>2]},this.set_destructor=function(a){x[this.ptr+8>>2]=a},this.get_destructor=function(){return x[this.ptr+8>>2]},this.set_refcount=function(a){x[this.ptr>>2]=a},this.set_caught=function(a){a=a?1:0,Xt[this.ptr+12>>0]=a},this.get_caught=function(){return Xt[this.ptr+12>>0]!=0},this.set_rethrown=function(a){a=a?1:0,Xt[this.ptr+13>>0]=a},this.get_rethrown=function(){return Xt[this.ptr+13>>0]!=0},this.init=function(a,u){this.set_type(a),this.set_destructor(u),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var a=x[this.ptr>>2];x[this.ptr>>2]=a+1},this.release_ref=function(){var a=x[this.ptr>>2];return x[this.ptr>>2]=a-1,a===1}}function tn(s){this.free=function(){Eu(this.ptr),this.ptr=0},this.set_base_ptr=function(a){x[this.ptr>>2]=a},this.get_base_ptr=function(){return x[this.ptr>>2]},this.set_adjusted_ptr=function(a){x[this.ptr+4>>2]=a},this.get_adjusted_ptr_addr=function(){return this.ptr+4},this.get_adjusted_ptr=function(){return x[this.ptr+4>>2]},this.get_exception_ptr=function(){var a=Mf(this.get_exception_info().get_type());if(a)return x[this.get_base_ptr()>>2];var u=this.get_adjusted_ptr();return u!==0?u:this.get_base_ptr()},this.get_exception_info=function(){return new Tr(this.get_base_ptr())},s===void 0?(this.ptr=fs(8),this.set_adjusted_ptr(0)):this.ptr=s}var oo=[];function sj(s){s.add_ref()}var ao=0;function oj(s){var a=new tn(s),u=a.get_exception_info();return u.get_caught()||(u.set_caught(!0),ao--),u.set_rethrown(!1),oo.push(a),sj(u),a.get_exception_ptr()}var ji=0;function If(s){return Eu(new Tr(s).ptr)}function aj(s){if(s.release_ref()&&!s.get_rethrown()){var a=s.get_destructor();a&&$.get(a)(s.excPtr),If(s.excPtr)}}function uj(){I(0);var s=oo.pop();aj(s.get_exception_info()),s.free(),ji=0}function cj(s){var a=new tn(s),u=a.get_base_ptr();throw ji||(ji=u),a.free(),u}function lj(){var s=ji;if(!s)return tt(0),0|0;var a=new Tr(s),u=a.get_type(),c=new tn;if(c.set_base_ptr(s),c.set_adjusted_ptr(s),!u)return tt(0),c.ptr|0;for(var d=Array.prototype.slice.call(arguments),f=0;f<d.length;f++){var h=d[f];if(h===0||h===u)break;if(ds(h,u,c.get_adjusted_ptr_addr()))return tt(h),c.ptr|0}return tt(u),c.ptr|0}function dj(){var s=ji;if(!s)return tt(0),0|0;var a=new Tr(s),u=a.get_type(),c=new tn;if(c.set_base_ptr(s),c.set_adjusted_ptr(s),!u)return tt(0),c.ptr|0;for(var d=Array.prototype.slice.call(arguments),f=0;f<d.length;f++){var h=d[f];if(h===0||h===u)break;if(ds(h,u,c.get_adjusted_ptr_addr()))return tt(h),c.ptr|0}return tt(u),c.ptr|0}function fj(){var s=ji;if(!s)return tt(0),0|0;var a=new Tr(s),u=a.get_type(),c=new tn;if(c.set_base_ptr(s),c.set_adjusted_ptr(s),!u)return tt(0),c.ptr|0;for(var d=Array.prototype.slice.call(arguments),f=0;f<d.length;f++){var h=d[f];if(h===0||h===u)break;if(ds(h,u,c.get_adjusted_ptr_addr()))return tt(h),c.ptr|0}return tt(u),c.ptr|0}function hj(){var s=ji;if(!s)return tt(0),0|0;var a=new Tr(s),u=a.get_type(),c=new tn;if(c.set_base_ptr(s),c.set_adjusted_ptr(s),!u)return tt(0),c.ptr|0;for(var d=Array.prototype.slice.call(arguments),f=0;f<d.length;f++){var h=d[f];if(h===0||h===u)break;if(ds(h,u,c.get_adjusted_ptr_addr()))return tt(h),c.ptr|0}return tt(u),c.ptr|0}function pj(){var s=oo.pop();s||gt("no exception to throw");var a=s.get_exception_info(),u=s.get_base_ptr();throw a.get_rethrown()?s.free():(oo.push(s),a.set_rethrown(!0),a.set_caught(!1),ao++),ji=u,u}function yj(s,a,u){var c=new Tr(s);throw c.init(a,u),ji=s,ao++,s}function _j(){return ao}var Ze={mappings:{},buffers:[null,[],[]],printChar:function(s,a){var u=Ze.buffers[s];a===0||a===10?((s===1?O0:vi)(hf(u,0)),u.length=0):u.push(a)},varargs:void 0,get:function(){Ze.varargs+=4;var s=x[Ze.varargs-4>>2];return s},getStr:function(s){var a=en(s);return a},get64:function(s,a){return s}};function mj(s,a,u,c,d){}function bj(s,a){return s=Ze.getStr(s),Ze.doAccess(s,a)}function gj(){vi("missing function: $SOCKFS"),gt(-1)}function Tf(){vi("missing function: $FS"),gt(-1)}function rn(s){var a=gj.getSocket(s);if(!a)throw new Tf.ErrnoError(8);return a}function vj(s){return x[Ff()>>2]=s,s}function Du(s){return(s&255)+"."+(s>>8&255)+"."+(s>>16&255)+"."+(s>>24&255)}function Sf(s){var a="",u=0,c=0,d=0,f=0,h=0,p=0,y=[s[0]&65535,s[0]>>16,s[1]&65535,s[1]>>16,s[2]&65535,s[2]>>16,s[3]&65535,s[3]>>16],m=!0,b="";for(p=0;p<5;p++)if(y[p]!==0){m=!1;break}if(m){if(b=Du(y[6]|y[7]<<16),y[5]===-1)return a="::ffff:",a+=b,a;if(y[5]===0)return a="::",b==="0.0.0.0"&&(b=""),b==="0.0.0.1"&&(b="1"),a+=b,a}for(u=0;u<8;u++)y[u]===0&&(u-d>1&&(h=0),d=u,h++),h>c&&(c=h,f=u-c+1);for(u=0;u<8;u++){if(c>1&&y[u]===0&&u>=f&&u<f+c){u===f&&(a+=":",f===0&&(a+=":"));continue}a+=Number(Vu(y[u]&65535)).toString(16),a+=u<7?":":""}return a}function Af(s,a){var u=us[s>>1],c=Vu(mf[s+2>>1]),d;switch(u){case 2:if(a!==16)return{errno:28};d=x[s+4>>2],d=Du(d);break;case 10:if(a!==28)return{errno:28};d=[x[s+8>>2],x[s+12>>2],x[s+16>>2],x[s+20>>2]],d=Sf(d);break;default:return{errno:5}}return{family:u,addr:d,port:c}}function Df(s,a,u){if(u&&s===0)return null;var c=Af(s,a);if(c.errno)throw new Tf.ErrnoError(c.errno);return c.addr=jt.lookup_addr(c.addr)||c.addr,c}function jj(s,a,u){var c=rn(s),d=Df(a,u);return c.sock_ops.bind(c,d.addr,d.port),0}function wj(s,a,u){var c=rn(s),d=Df(a,u);return c.sock_ops.connect(c,d.addr,d.port),0}function Bj(s,a,u){return Ze.varargs=u,0}function Ij(s,a){}function Tj(s,a,u,c){}function Sj(s,a,u){}function uo(s){for(var a=s.split("."),u=0;u<4;u++){var c=Number(a[u]);if(isNaN(c))return null;a[u]=c}return(a[0]|a[1]<<8|a[2]<<16|a[3]<<24)>>>0}function co(s){return parseInt(s)}function Ou(s){var a,u,c,d,f=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i,h=[];if(!f.test(s))return null;if(s==="::")return[0,0,0,0,0,0,0,0];for(s.startsWith("::")?s=s.replace("::","Z:"):s=s.replace("::",":Z:"),s.indexOf(".")>0?(s=s.replace(new RegExp("[.]","g"),":"),a=s.split(":"),a[a.length-4]=co(a[a.length-4])+co(a[a.length-3])*256,a[a.length-3]=co(a[a.length-2])+co(a[a.length-1])*256,a=a.slice(0,a.length-2)):a=s.split(":"),c=0,d=0,u=0;u<a.length;u++)if(typeof a[u]=="string")if(a[u]==="Z"){for(d=0;d<8-a.length+1;d++)h[u+d]=0;c=d-1}else h[u+c]=mo(parseInt(a[u],16));else h[u+c]=a[u];return[h[1]<<16|h[0],h[3]<<16|h[2],h[5]<<16|h[4],h[7]<<16|h[6]]}function Of(s,a){Ni.fill(0,s,s+a)}function Fu(s,a,u,c,d){switch(a){case 2:u=uo(u),Of(s,16),d&&(x[d>>2]=16),us[s>>1]=a,x[s+4>>2]=u,us[s+2>>1]=mo(c);break;case 10:u=Ou(u),Of(s,28),d&&(x[d>>2]=28),x[s>>2]=a,x[s+8>>2]=u[0],x[s+12>>2]=u[1],x[s+16>>2]=u[2],x[s+20>>2]=u[3],us[s+2>>1]=mo(c);break;default:return 5}return 0}var jt={address_map:{id:1,addrs:{},names:{}},lookup_name:function(s){var a=uo(s);if(a!==null||(a=Ou(s),a!==null))return s;var u;if(jt.address_map.addrs[s])u=jt.address_map.addrs[s];else{var c=jt.address_map.id++;no(c<65535,"exceeded max address mappings of 65535"),u="172.29."+(c&255)+"."+(c&65280),jt.address_map.names[u]=s,jt.address_map.addrs[s]=u}return u},lookup_addr:function(s){return jt.address_map.names[s]?jt.address_map.names[s]:null}};function Aj(s,a,u){var c=rn(s);if(!c.daddr)return-53;var d=Fu(a,c.family,jt.lookup_name(c.daddr),c.dport,u);return 0}function Dj(){return 42}function Oj(s,a,u,c,d){var f=rn(s);return a===1&&u===4?(x[c>>2]=f.error,x[d>>2]=4,f.error=null,0):-50}function Fj(s,a,u){return Ze.varargs=u,0}function Mj(s,a,u){return 0}function Cj(s,a){return s=Ze.getStr(s),Ze.doMkdir(s,a)}function Uj(s,a,u){Ze.varargs=u}function Vj(s,a,u,c,d,f){var h=rn(s),p=h.sock_ops.recvmsg(h,u);if(!p)return 0;if(d)var y=Fu(d,h.family,jt.lookup_name(p.addr),p.port,f);return Ni.set(p.buffer,a),p.buffer.byteLength}function kj(s,a){}function Ej(s){}function Rj(s,a,u,c,d,f){}function Pj(s){return-50}function Nj(s,a){return rn(s),-52}function Lj(s,a,u){}function xj(s,a){}function qj(s){}function zj(s,a){gt("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function Wj(s,a){gt("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function Hj(){gt("")}var Mu;z?Mu=function(){var s=process.hrtime();return s[0]*1e3+s[1]/1e6}:Mu=function(){return performance.now()};var Yj=!0;function $j(s,a){var u;if(s===0)u=Date.now();else if((s===1||s===4)&&Yj)u=Mu();else return vj(28),-1;return x[a>>2]=u/1e3|0,x[a+4>>2]=u%1e3*1e3*1e3|0,0}function Gj(s,a){return globalThis.DUCKDB_RUNTIME.createDirectory(t,s,a)}function Jj(s,a){return globalThis.DUCKDB_RUNTIME.checkDirectory(t,s,a)}function Kj(s,a){return globalThis.DUCKDB_RUNTIME.listDirectoryEntries(t,s,a)}function Zj(s,a){return globalThis.DUCKDB_RUNTIME.removeDirectory(t,s,a)}function Xj(s){return globalThis.DUCKDB_RUNTIME.closeFile(t,s)}function Qj(s,a){return globalThis.DUCKDB_RUNTIME.checkFile(t,s,a)}function ew(s){return globalThis.DUCKDB_RUNTIME.getLastFileModificationTime(t,s)}function tw(s,a,u,c){return globalThis.DUCKDB_RUNTIME.moveFile(t,s,a,u,c)}function iw(s){return globalThis.DUCKDB_RUNTIME.openFile(t,s)}function rw(s,a,u,c){return globalThis.DUCKDB_RUNTIME.readFile(t,s,a,u,c)}function nw(s,a){return globalThis.DUCKDB_RUNTIME.truncateFile(t,s,a)}function sw(s,a,u,c){return globalThis.DUCKDB_RUNTIME.writeFile(t,s,a,u,c)}function ow(s,a){return globalThis.DUCKDB_RUNTIME.glob(t,s,a)}function aw(s){return globalThis.DUCKDB_RUNTIME.testPlatformFeature(t,s)}function uw(){return 2147483648}function cw(s,a,u){Ni.copyWithin(s,a,a+u)}function lw(s){try{return io.grow(s-_f.byteLength+65535>>>16),bf(io.buffer),1}catch(a){}}function dw(s){var a=Ni.length;s=s>>>0;var u=2147483648;if(s>u)return!1;for(var c=1;c<=4;c*=2){var d=a*(1+.2/c);d=Math.min(d,s+100663296);var f=Math.min(u,E0(Math.max(s,d),65536)),h=lw(f);if(h)return!0}return!1}var Cu={};function fw(){return v||"./this.program"}function ls(){if(!ls.strings){var s=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:s,_:fw()};for(var u in Cu)Cu[u]===void 0?delete a[u]:a[u]=Cu[u];var c=[];for(var u in a)c.push(u+"="+a[u]);ls.strings=c}return ls.strings}function hw(s,a){var u=0;return ls().forEach(function(c,d){var f=a+u;x[s+d*4>>2]=f,k0(c,f),u+=c.length+1}),0}function pw(s,a){var u=ls();x[s>>2]=u.length;var c=0;return u.forEach(function(d){c+=d.length+1}),x[a>>2]=c,0}function yw(s){return 0}function _w(s,a){var u=s==1||s==2?2:gt();return Xt[a>>0]=u,0}function mw(s,a,u,c,d,f){var h=Ze.getStreamFromFD(s),p=Ze.doReadv(h,a,u,c);return x[f>>2]=p,0}function bw(s,a,u,c,d,f){var h=Ze.getStreamFromFD(s),p=Ze.doWritev(h,a,u,c);return x[f>>2]=p,0}function gw(s,a,u,c){var d=Ze.getStreamFromFD(s),f=Ze.doReadv(d,a,u);return x[c>>2]=f,0}function vw(s,a,u,c,d){}function jw(s){var a=Ze.getStreamFromFD(s);return a.stream_ops&&a.stream_ops.fsync?-a.stream_ops.fsync(a):0}function ww(s,a,u,c){for(var d=0,f=0;f<u;f++){for(var h=x[a+f*8>>2],p=x[a+(f*8+4)>>2],y=0;y<p;y++)Ze.printChar(s,Ni[h+y]);d+=p}return x[c>>2]=d,0}function Bw(){return F0()}function Iw(s,a,u,c){var d=0,f=0,h=0,p=0,y=0,m=0,b;function j(A,M,R,Z,le,Oe){var U,G,me,pe;return G=A===10?28:16,le=A===10?Sf(le):Du(le),U=fs(G),pe=Fu(U,A,le,Oe),no(!pe),me=fs(32),x[me+4>>2]=A,x[me+8>>2]=M,x[me+12>>2]=R,x[me+24>>2]=Z,x[me+20>>2]=U,A===10?x[me+16>>2]=28:x[me+16>>2]=16,x[me+28>>2]=0,me}if(u&&(h=x[u>>2],p=x[u+4>>2],y=x[u+8>>2],m=x[u+12>>2]),y&&!m&&(m=y===2?17:6),!y&&m&&(y=m===17?2:1),m===0&&(m=6),y===0&&(y=1),!s&&!a)return-2;if(h&~(1|2|4|1024|8|16|32)||u!==0&&x[u>>2]&2&&!s)return-1;if(h&32)return-2;if(y!==0&&y!==1&&y!==2)return-7;if(p!==0&&p!==2&&p!==10)return-6;if(a&&(a=en(a),f=parseInt(a,10),isNaN(f)))return h&1024?-2:-8;if(!s)return p===0&&(p=2),(h&1)===0&&(p===2?d=_o(2130706433):d=[0,0,0,1]),b=j(p,y,m,null,d,f),x[c>>2]=b,0;if(s=en(s),d=uo(s),d!==null)if(p===0||p===2)p=2;else if(p===10&&h&8)d=[0,0,_o(65535),d],p=10;else return-2;else if(d=Ou(s),d!==null)if(p===0||p===10)p=10;else return-2;return d!=null?(b=j(p,y,m,s,d,f),x[c>>2]=b,0):h&4?-2:(s=jt.lookup_name(s),d=uo(s),p===0?p=2:p===10&&(d=[0,0,_o(65535),d]),b=j(p,y,m,null,d,f),x[c>>2]=b,0)}function Tw(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var s=new Uint8Array(1);return function(){return crypto.getRandomValues(s),s[0]}}else if(z)try{var a=ZS("crypto");return function(){return a.randomBytes(1)[0]}}catch(u){}return function(){gt("randomDevice")}}function lo(s,a){lo.randomDevice||(lo.randomDevice=Tw());for(var u=0;u<a;u++)Xt[s+u>>0]=lo.randomDevice();return 0}function Sw(s,a,u,c,d,f,h){var p=Af(s,a);if(p.errno)return-6;var y=p.port,m=p.addr,b=!1;if(u&&c){var j;if(h&1||!(j=jt.lookup_addr(m))){if(h&8)return-2}else m=j;var A=Tu(m,u,c);A+1>=c&&(b=!0)}if(d&&f){y=""+y;var A=Tu(y,d,f);A+1>=f&&(b=!0)}return b?-12:0}function Aw(s){return s}function Dw(s){tt(s)}function fo(s){return s%4===0&&(s%100!==0||s%400===0)}function Uu(s,a){for(var u=0,c=0;c<=a;u+=s[c++]);return u}var ho=[31,29,31,30,31,30,31,31,30,31,30,31],po=[31,28,31,30,31,30,31,31,30,31,30,31];function yo(s,a){for(var u=new Date(s.getTime());a>0;){var c=fo(u.getFullYear()),d=u.getMonth(),f=(c?ho:po)[d];if(a>f-u.getDate())a-=f-u.getDate()+1,u.setDate(1),d<11?u.setMonth(d+1):(u.setMonth(0),u.setFullYear(u.getFullYear()+1));else return u.setDate(u.getDate()+a),u}return u}function Ow(s,a,u,c){var d=x[c+40>>2],f={tm_sec:x[c>>2],tm_min:x[c+4>>2],tm_hour:x[c+8>>2],tm_mday:x[c+12>>2],tm_mon:x[c+16>>2],tm_year:x[c+20>>2],tm_wday:x[c+24>>2],tm_yday:x[c+28>>2],tm_isdst:x[c+32>>2],tm_gmtoff:x[c+36>>2],tm_zone:d?en(d):""},h=en(u),p={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var y in p)h=h.replace(new RegExp(y,"g"),p[y]);var m=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b=["January","February","March","April","May","June","July","August","September","October","November","December"];function j(U,G,me){for(var pe=typeof U=="number"?U.toString():U||"";pe.length<G;)pe=me[0]+pe;return pe}function A(U,G){return j(U,G,"0")}function M(U,G){function me(lt){return lt<0?-1:lt>0?1:0}var pe;return(pe=me(U.getFullYear()-G.getFullYear()))===0&&(pe=me(U.getMonth()-G.getMonth()))===0&&(pe=me(U.getDate()-G.getDate())),pe}function R(U){switch(U.getDay()){case 0:return new Date(U.getFullYear()-1,11,29);case 1:return U;case 2:return new Date(U.getFullYear(),0,3);case 3:return new Date(U.getFullYear(),0,2);case 4:return new Date(U.getFullYear(),0,1);case 5:return new Date(U.getFullYear()-1,11,31);case 6:return new Date(U.getFullYear()-1,11,30)}}function Z(U){var G=yo(new Date(U.tm_year+1900,0,1),U.tm_yday),me=new Date(G.getFullYear(),0,4),pe=new Date(G.getFullYear()+1,0,4),lt=R(me),Li=R(pe);return M(lt,G)<=0?M(Li,G)<=0?G.getFullYear()+1:G.getFullYear():G.getFullYear()-1}var le={"%a":function(U){return m[U.tm_wday].substring(0,3)},"%A":function(U){return m[U.tm_wday]},"%b":function(U){return b[U.tm_mon].substring(0,3)},"%B":function(U){return b[U.tm_mon]},"%C":function(U){var G=U.tm_year+1900;return A(G/100|0,2)},"%d":function(U){return A(U.tm_mday,2)},"%e":function(U){return j(U.tm_mday,2," ")},"%g":function(U){return Z(U).toString().substring(2)},"%G":function(U){return Z(U)},"%H":function(U){return A(U.tm_hour,2)},"%I":function(U){var G=U.tm_hour;return G==0?G=12:G>12&&(G-=12),A(G,2)},"%j":function(U){return A(U.tm_mday+Uu(fo(U.tm_year+1900)?ho:po,U.tm_mon-1),3)},"%m":function(U){return A(U.tm_mon+1,2)},"%M":function(U){return A(U.tm_min,2)},"%n":function(){return`
18
+ `},"%p":function(U){return U.tm_hour>=0&&U.tm_hour<12?"AM":"PM"},"%S":function(U){return A(U.tm_sec,2)},"%t":function(){return" "},"%u":function(U){return U.tm_wday||7},"%U":function(U){var G=new Date(U.tm_year+1900,0,1),me=G.getDay()===0?G:yo(G,7-G.getDay()),pe=new Date(U.tm_year+1900,U.tm_mon,U.tm_mday);if(M(me,pe)<0){var lt=Uu(fo(pe.getFullYear())?ho:po,pe.getMonth()-1)-31,Li=31-me.getDate(),Sr=Li+lt+pe.getDate();return A(Math.ceil(Sr/7),2)}return M(me,G)===0?"01":"00"},"%V":function(U){var G=new Date(U.tm_year+1900,0,4),me=new Date(U.tm_year+1901,0,4),pe=R(G),lt=R(me),Li=yo(new Date(U.tm_year+1900,0,1),U.tm_yday);if(M(Li,pe)<0)return"53";if(M(lt,Li)<=0)return"01";var Sr;return pe.getFullYear()<U.tm_year+1900?Sr=U.tm_yday+32-pe.getDate():Sr=U.tm_yday+1-pe.getDate(),A(Math.ceil(Sr/7),2)},"%w":function(U){return U.tm_wday},"%W":function(U){var G=new Date(U.tm_year,0,1),me=G.getDay()===1?G:yo(G,G.getDay()===0?1:7-G.getDay()+1),pe=new Date(U.tm_year+1900,U.tm_mon,U.tm_mday);if(M(me,pe)<0){var lt=Uu(fo(pe.getFullYear())?ho:po,pe.getMonth()-1)-31,Li=31-me.getDate(),Sr=Li+lt+pe.getDate();return A(Math.ceil(Sr/7),2)}return M(me,G)===0?"01":"00"},"%y":function(U){return(U.tm_year+1900).toString().substring(2)},"%Y":function(U){return U.tm_year+1900},"%z":function(U){var G=U.tm_gmtoff,me=G>=0;return G=Math.abs(G)/60,G=G/60*100+G%60,(me?"+":"-")+String("0000"+G).slice(-4)},"%Z":function(U){return U.tm_zone},"%%":function(){return"%"}};for(var y in le)h.includes(y)&&(h=h.replace(new RegExp(y,"g"),le[y](f)));var Oe=Mw(h,!1);return Oe.length>a?0:(yf(Oe,s),Oe.length-1)}function Fw(s,a,u,c){return Ow(s,a,u,c)}function Mw(s,a,u){var c=u>0?u:V0(s)+1,d=new Array(c),f=pf(s,d,0,d.length);return a&&(d.length=f),d}var Cw={j:nj,A:oj,F:uj,b:lj,n:dj,I:fj,V:hj,i:If,da:pj,u:yj,E:_j,e:cj,Fa:mj,wa:bj,Ha:jj,Ga:wj,N:Bj,ya:Ij,xa:Tj,Qe:Sj,Ba:Aj,ta:Dj,Ea:Oj,Ra:Fj,Me:Mj,Re:Cj,oa:Uj,Ca:Vj,Oe:kj,ua:Ej,Da:Rj,Ia:Pj,Ka:Nj,ia:Lj,fa:xj,va:qj,Ma:zj,La:Wj,ca:Hj,ma:$j,Fe:Gj,Ge:Jj,De:Kj,Ee:Zj,sa:Xj,Be:Qj,Ie:ew,Ce:tw,Ke:iw,ea:rw,He:nw,Je:sw,Ae:ow,ra:aw,Sa:uw,ib:cw,ed:dw,Ua:hw,Va:pw,T:yw,Qa:_w,nb:mw,mb:bw,na:gw,Td:vw,Pe:jw,ba:ww,a:Bw,Ja:Iw,za:lo,Aa:Sw,ja:oI,L:GB,Pa:iI,S:SB,yc:pT,ka:sI,W:KB,qa:TB,zc:hT,s:RB,Na:uI,Nb:MB,Y:zB,Oa:aI,Yb:FB,d:bB,_:dI,C:WB,Fb:sS,c:gB,X:JB,ga:hI,h:jB,Db:aS,l:IB,pa:XB,o:wB,v:kB,z:EB,R:VB,x:PB,w:LB,p:tI,M:lI,J:cI,ac:PT,dc:kT,gc:CT,nc:TT,bc:RT,Eb:oS,xc:yT,ec:VT,oc:IT,Lb:QT,we:gI,Rd:ZI,Kd:n1,je:CI,Rb:GT,id:C1,Ib:iS,Hb:rS,$d:qI,Qd:XI,vb:yS,Xc:W1,_d:zI,Ec:cT,Sb:$T,Gb:nS,re:II,Xd:YI,Ac:fT,Ld:r1,vd:g1,Id:o1,hb:SS,Yd:HI,lc:AT,Vd:GI,hd:U1,cb:MS,Kb:eS,kd:F1,ce:NI,ae:xI,_a:kS,tb:mS,Md:i1,db:FS,Cb:uS,Wd:$I,Ed:l1,Hd:a1,Gd:u1,Fd:c1,Bd:h1,kc:DT,Zb:xT,pe:SI,he:VI,pc:BT,ge:kI,Sd:KI,sc:vT,rc:jT,ne:DI,ie:UI,Pd:QI,ze:_I,qd:I1,qc:wT,cc:ET,Fc:uT,uc:bT,Uc:$1,sb:bS,Cc:dT,wc:_T,sd:w1,md:D1,Mc:tT,vc:mT,wb:pS,_b:LT,od:S1,cd:R1,Pc:X1,Oc:Q1,Lc:iT,Nc:eT,td:j1,$c:L1,Jb:tS,ic:FT,kb:IS,Zc:q1,tc:gT,zb:dS,Vb:WT,Ab:lS,Tb:YT,t:_B,k:vB,B:$B,$:eI,pb:jS,D:YB,aa:QB,qb:vS,f:mB,U:DB,Q:HB,Bc:AB,g:OB,m:BB,Ne:pI,q:UB,r:CB,ha:fI,y:NB,O:ZB,P:nI,K:xB,Le:yI,la:rI,Z:qB,Dd:d1,ob:wS,jd:M1,$b:NT,Dc:lT,mc:ST,Mb:XT,fb:DS,ue:jI,Zd:WI,ub:_S,ab:US,zd:y1,Ad:p1,Wb:zT,wd:b1,Pb:KT,Ob:ZT,Qc:Z1,te:wI,xd:m1,Cd:f1,Wc:H1,Ic:sT,xb:hS,yb:fS,eb:OS,me:OI,ud:v1,Qb:JT,Gc:aT,Tc:G1,se:BI,bb:CS,xe:bI,ee:RI,fe:EI,Jd:s1,$a:VS,bd:P1,Kc:rT,Jc:nT,ad:N1,Yc:z1,nd:A1,gb:AS,gd:V1,Za:ES,Hc:oT,jb:TS,ye:mI,Ud:JI,dd:E1,Rc:K1,ke:MI,fc:UT,ve:vI,oe:AI,fd:k1,Od:e1,Nd:t1,_c:x1,rb:gS,ld:O1,jc:OT,qe:TI,Ya:RS,Sc:J1,lb:BS,de:PI,Vc:Y1,Wa:NS,Xa:PS,hc:MT,le:FI,rd:B1,be:LI,Ub:HT,Xb:qT,Bb:cS,yd:_1,pd:T1,H:Aw,G:Dw,Ta:Fw},WV=ij(),Uw=t.___wasm_call_ctors=function(){return(Uw=t.___wasm_call_ctors=t.asm.Te).apply(null,arguments)},Vw=t._main=function(){return(Vw=t._main=t.asm.Ue).apply(null,arguments)},kw=t._duckdb_web_fs_glob_add_path=function(){return(kw=t._duckdb_web_fs_glob_add_path=t.asm.We).apply(null,arguments)},Ew=t._duckdb_web_clear_response=function(){return(Ew=t._duckdb_web_clear_response=t.asm.Xe).apply(null,arguments)},Rw=t._duckdb_web_fail_with=function(){return(Rw=t._duckdb_web_fail_with=t.asm.Ye).apply(null,arguments)},Pw=t._duckdb_web_reset=function(){return(Pw=t._duckdb_web_reset=t.asm.Ze).apply(null,arguments)},Nw=t._duckdb_web_connect=function(){return(Nw=t._duckdb_web_connect=t.asm._e).apply(null,arguments)},Lw=t._duckdb_web_disconnect=function(){return(Lw=t._duckdb_web_disconnect=t.asm.$e).apply(null,arguments)},xw=t._duckdb_web_flush_files=function(){return(xw=t._duckdb_web_flush_files=t.asm.af).apply(null,arguments)},qw=t._duckdb_web_flush_file=function(){return(qw=t._duckdb_web_flush_file=t.asm.bf).apply(null,arguments)},zw=t._duckdb_web_open=function(){return(zw=t._duckdb_web_open=t.asm.cf).apply(null,arguments)},Ww=t._duckdb_web_collect_file_stats=function(){return(Ww=t._duckdb_web_collect_file_stats=t.asm.df).apply(null,arguments)},Hw=t._duckdb_web_export_file_stats=function(){return(Hw=t._duckdb_web_export_file_stats=t.asm.ef).apply(null,arguments)},Yw=t._duckdb_web_fs_drop_file=function(){return(Yw=t._duckdb_web_fs_drop_file=t.asm.ff).apply(null,arguments)},$w=t._duckdb_web_fs_drop_files=function(){return($w=t._duckdb_web_fs_drop_files=t.asm.gf).apply(null,arguments)},Gw=t._duckdb_web_fs_glob_file_infos=function(){return(Gw=t._duckdb_web_fs_glob_file_infos=t.asm.hf).apply(null,arguments)},Jw=t._duckdb_web_fs_get_file_info_by_id=function(){return(Jw=t._duckdb_web_fs_get_file_info_by_id=t.asm.jf).apply(null,arguments)},Kw=t._duckdb_web_fs_get_file_info_by_name=function(){return(Kw=t._duckdb_web_fs_get_file_info_by_name=t.asm.kf).apply(null,arguments)},Zw=t._duckdb_web_fs_set_file_descriptor=function(){return(Zw=t._duckdb_web_fs_set_file_descriptor=t.asm.lf).apply(null,arguments)},Xw=t._duckdb_web_fs_register_file_url=function(){return(Xw=t._duckdb_web_fs_register_file_url=t.asm.mf).apply(null,arguments)},Qw=t._duckdb_web_fs_register_file_buffer=function(){return(Qw=t._duckdb_web_fs_register_file_buffer=t.asm.nf).apply(null,arguments)},eB=t._duckdb_web_copy_file_to_buffer=function(){return(eB=t._duckdb_web_copy_file_to_buffer=t.asm.of).apply(null,arguments)},tB=t._duckdb_web_copy_file_to_path=function(){return(tB=t._duckdb_web_copy_file_to_path=t.asm.pf).apply(null,arguments)},iB=t._duckdb_web_get_version=function(){return(iB=t._duckdb_web_get_version=t.asm.qf).apply(null,arguments)},rB=t._duckdb_web_get_feature_flags=function(){return(rB=t._duckdb_web_get_feature_flags=t.asm.rf).apply(null,arguments)},nB=t._duckdb_web_tokenize=function(){return(nB=t._duckdb_web_tokenize=t.asm.sf).apply(null,arguments)},sB=t._duckdb_web_prepared_create=function(){return(sB=t._duckdb_web_prepared_create=t.asm.tf).apply(null,arguments)},oB=t._duckdb_web_prepared_close=function(){return(oB=t._duckdb_web_prepared_close=t.asm.uf).apply(null,arguments)},aB=t._duckdb_web_prepared_run=function(){return(aB=t._duckdb_web_prepared_run=t.asm.vf).apply(null,arguments)},uB=t._duckdb_web_prepared_send=function(){return(uB=t._duckdb_web_prepared_send=t.asm.wf).apply(null,arguments)},cB=t._duckdb_web_query_run=function(){return(cB=t._duckdb_web_query_run=t.asm.xf).apply(null,arguments)},lB=t._duckdb_web_query_send=function(){return(lB=t._duckdb_web_query_send=t.asm.yf).apply(null,arguments)},dB=t._duckdb_web_query_fetch_results=function(){return(dB=t._duckdb_web_query_fetch_results=t.asm.zf).apply(null,arguments)},fB=t._duckdb_web_get_tablenames=function(){return(fB=t._duckdb_web_get_tablenames=t.asm.Af).apply(null,arguments)},hB=t._duckdb_web_insert_arrow_from_ipc_stream=function(){return(hB=t._duckdb_web_insert_arrow_from_ipc_stream=t.asm.Bf).apply(null,arguments)},pB=t._duckdb_web_insert_csv_from_path=function(){return(pB=t._duckdb_web_insert_csv_from_path=t.asm.Cf).apply(null,arguments)},yB=t._duckdb_web_insert_json_from_path=function(){return(yB=t._duckdb_web_insert_json_from_path=t.asm.Df).apply(null,arguments)},Ff=t.___errno_location=function(){return(Ff=t.___errno_location=t.asm.Ef).apply(null,arguments)},_o=t._htonl=function(){return(_o=t._htonl=t.asm.Ff).apply(null,arguments)},Vu=t._ntohs=function(){return(Vu=t._ntohs=t.asm.Gf).apply(null,arguments)},mo=t._htons=function(){return(mo=t._htons=t.asm.Hf).apply(null,arguments)},w=t.stackSave=function(){return(w=t.stackSave=t.asm.If).apply(null,arguments)},B=t.stackRestore=function(){return(B=t.stackRestore=t.asm.Jf).apply(null,arguments)},ku=t.stackAlloc=function(){return(ku=t.stackAlloc=t.asm.Kf).apply(null,arguments)},I=t._setThrew=function(){return(I=t._setThrew=t.asm.Lf).apply(null,arguments)},ds=t.___cxa_can_catch=function(){return(ds=t.___cxa_can_catch=t.asm.Mf).apply(null,arguments)},Mf=t.___cxa_is_pointer_type=function(){return(Mf=t.___cxa_is_pointer_type=t.asm.Nf).apply(null,arguments)},fs=t._malloc=function(){return(fs=t._malloc=t.asm.Of).apply(null,arguments)},Eu=t._free=function(){return(Eu=t._free=t.asm.Pf).apply(null,arguments)},Cf=t.dynCall_viiij=function(){return(Cf=t.dynCall_viiij=t.asm.Qf).apply(null,arguments)},Uf=t.dynCall_viiijjj=function(){return(Uf=t.dynCall_viiijjj=t.asm.Rf).apply(null,arguments)},Vf=t.dynCall_iiij=function(){return(Vf=t.dynCall_iiij=t.asm.Sf).apply(null,arguments)},kf=t.dynCall_vijijj=function(){return(kf=t.dynCall_vijijj=t.asm.Tf).apply(null,arguments)},Ef=t.dynCall_iji=function(){return(Ef=t.dynCall_iji=t.asm.Uf).apply(null,arguments)},Rf=t.dynCall_viji=function(){return(Rf=t.dynCall_viji=t.asm.Vf).apply(null,arguments)},Pf=t.dynCall_vij=function(){return(Pf=t.dynCall_vij=t.asm.Wf).apply(null,arguments)},Nf=t.dynCall_viijj=function(){return(Nf=t.dynCall_viijj=t.asm.Xf).apply(null,arguments)},Lf=t.dynCall_ji=function(){return(Lf=t.dynCall_ji=t.asm.Yf).apply(null,arguments)},xf=t.dynCall_viiijj=function(){return(xf=t.dynCall_viiijj=t.asm.Zf).apply(null,arguments)},qf=t.dynCall_vijjj=function(){return(qf=t.dynCall_vijjj=t.asm._f).apply(null,arguments)},zf=t.dynCall_viiiij=function(){return(zf=t.dynCall_viiiij=t.asm.$f).apply(null,arguments)},Wf=t.dynCall_jii=function(){return(Wf=t.dynCall_jii=t.asm.ag).apply(null,arguments)},Hf=t.dynCall_jiiii=function(){return(Hf=t.dynCall_jiiii=t.asm.bg).apply(null,arguments)},Yf=t.dynCall_iiiiij=function(){return(Yf=t.dynCall_iiiiij=t.asm.cg).apply(null,arguments)},$f=t.dynCall_iiiiijj=function(){return($f=t.dynCall_iiiiijj=t.asm.dg).apply(null,arguments)},Gf=t.dynCall_iij=function(){return(Gf=t.dynCall_iij=t.asm.eg).apply(null,arguments)},Jf=t.dynCall_viijii=function(){return(Jf=t.dynCall_viijii=t.asm.fg).apply(null,arguments)},Kf=t.dynCall_viiji=function(){return(Kf=t.dynCall_viiji=t.asm.gg).apply(null,arguments)},Zf=t.dynCall_vijj=function(){return(Zf=t.dynCall_vijj=t.asm.hg).apply(null,arguments)},Xf=t.dynCall_viij=function(){return(Xf=t.dynCall_viij=t.asm.ig).apply(null,arguments)},Qf=t.dynCall_vj=function(){return(Qf=t.dynCall_vj=t.asm.jg).apply(null,arguments)},eh=t.dynCall_iiji=function(){return(eh=t.dynCall_iiji=t.asm.kg).apply(null,arguments)},th=t.dynCall_iiiij=function(){return(th=t.dynCall_iiiij=t.asm.lg).apply(null,arguments)},ih=t.dynCall_iiiiiji=function(){return(ih=t.dynCall_iiiiiji=t.asm.mg).apply(null,arguments)},rh=t.dynCall_iiiji=function(){return(rh=t.dynCall_iiiji=t.asm.ng).apply(null,arguments)},nh=t.dynCall_iiiiji=function(){return(nh=t.dynCall_iiiiji=t.asm.og).apply(null,arguments)},sh=t.dynCall_jiii=function(){return(sh=t.dynCall_jiii=t.asm.pg).apply(null,arguments)},oh=t.dynCall_jij=function(){return(oh=t.dynCall_jij=t.asm.qg).apply(null,arguments)},ah=t.dynCall_j=function(){return(ah=t.dynCall_j=t.asm.rg).apply(null,arguments)},uh=t.dynCall_viijij=function(){return(uh=t.dynCall_viijij=t.asm.sg).apply(null,arguments)},ch=t.dynCall_iijjijj=function(){return(ch=t.dynCall_iijjijj=t.asm.tg).apply(null,arguments)},lh=t.dynCall_viiiijiiiii=function(){return(lh=t.dynCall_viiiijiiiii=t.asm.ug).apply(null,arguments)},dh=t.dynCall_viiiijiiii=function(){return(dh=t.dynCall_viiiijiiii=t.asm.vg).apply(null,arguments)},fh=t.dynCall_viiijii=function(){return(fh=t.dynCall_viiijii=t.asm.wg).apply(null,arguments)},hh=t.dynCall_viiiiiij=function(){return(hh=t.dynCall_viiiiiij=t.asm.xg).apply(null,arguments)},ph=t.dynCall_iiijiii=function(){return(ph=t.dynCall_iiijiii=t.asm.yg).apply(null,arguments)},yh=t.dynCall_iiiiijii=function(){return(yh=t.dynCall_iiiiijii=t.asm.zg).apply(null,arguments)},_h=t.dynCall_viijiii=function(){return(_h=t.dynCall_viijiii=t.asm.Ag).apply(null,arguments)},mh=t.dynCall_iiijiij=function(){return(mh=t.dynCall_iiijiij=t.asm.Bg).apply(null,arguments)},bh=t.dynCall_vijiii=function(){return(bh=t.dynCall_vijiii=t.asm.Cg).apply(null,arguments)},gh=t.dynCall_iijjii=function(){return(gh=t.dynCall_iijjii=t.asm.Dg).apply(null,arguments)},vh=t.dynCall_iijjiii=function(){return(vh=t.dynCall_iijjiii=t.asm.Eg).apply(null,arguments)},jh=t.dynCall_iijjiiii=function(){return(jh=t.dynCall_iijjiiii=t.asm.Fg).apply(null,arguments)},wh=t.dynCall_iijji=function(){return(wh=t.dynCall_iijji=t.asm.Gg).apply(null,arguments)},Bh=t.dynCall_vijiiii=function(){return(Bh=t.dynCall_vijiiii=t.asm.Hg).apply(null,arguments)},Ih=t.dynCall_iijiiii=function(){return(Ih=t.dynCall_iijiiii=t.asm.Ig).apply(null,arguments)},Th=t.dynCall_vijij=function(){return(Th=t.dynCall_vijij=t.asm.Jg).apply(null,arguments)},Sh=t.dynCall_iiijjjj=function(){return(Sh=t.dynCall_iiijjjj=t.asm.Kg).apply(null,arguments)},Ah=t.dynCall_iiijiiii=function(){return(Ah=t.dynCall_iiijiiii=t.asm.Lg).apply(null,arguments)},Dh=t.dynCall_jiiij=function(){return(Dh=t.dynCall_jiiij=t.asm.Mg).apply(null,arguments)},Oh=t.dynCall_jiiiii=function(){return(Oh=t.dynCall_jiiiii=t.asm.Ng).apply(null,arguments)},Fh=t.dynCall_iiiiijjiijj=function(){return(Fh=t.dynCall_iiiiijjiijj=t.asm.Og).apply(null,arguments)},Mh=t.dynCall_viijiiji=function(){return(Mh=t.dynCall_viijiiji=t.asm.Pg).apply(null,arguments)},Ch=t.dynCall_vjjijij=function(){return(Ch=t.dynCall_vjjijij=t.asm.Qg).apply(null,arguments)},Uh=t.dynCall_vijjji=function(){return(Uh=t.dynCall_vijjji=t.asm.Rg).apply(null,arguments)},Vh=t.dynCall_vjjii=function(){return(Vh=t.dynCall_vjjii=t.asm.Sg).apply(null,arguments)},kh=t.dynCall_viiiiiji=function(){return(kh=t.dynCall_viiiiiji=t.asm.Tg).apply(null,arguments)},Eh=t.dynCall_jiiiji=function(){return(Eh=t.dynCall_jiiiji=t.asm.Ug).apply(null,arguments)},Rh=t.dynCall_iijj=function(){return(Rh=t.dynCall_iijj=t.asm.Vg).apply(null,arguments)},Ph=t.dynCall_iiijjii=function(){return(Ph=t.dynCall_iiijjii=t.asm.Wg).apply(null,arguments)},Nh=t.dynCall_vijii=function(){return(Nh=t.dynCall_vijii=t.asm.Xg).apply(null,arguments)},Lh=t.dynCall_viijjii=function(){return(Lh=t.dynCall_viijjii=t.asm.Yg).apply(null,arguments)},xh=t.dynCall_viiiijj=function(){return(xh=t.dynCall_viiiijj=t.asm.Zg).apply(null,arguments)},qh=t.dynCall_jijjij=function(){return(qh=t.dynCall_jijjij=t.asm._g).apply(null,arguments)},zh=t.dynCall_jiijii=function(){return(zh=t.dynCall_jiijii=t.asm.$g).apply(null,arguments)},Wh=t.dynCall_jijiii=function(){return(Wh=t.dynCall_jijiii=t.asm.ah).apply(null,arguments)},Hh=t.dynCall_viijiiiii=function(){return(Hh=t.dynCall_viijiiiii=t.asm.bh).apply(null,arguments)},Yh=t.dynCall_viijiiij=function(){return(Yh=t.dynCall_viijiiij=t.asm.ch).apply(null,arguments)},$h=t.dynCall_vijiiiji=function(){return($h=t.dynCall_vijiiiji=t.asm.dh).apply(null,arguments)},Gh=t.dynCall_jiiji=function(){return(Gh=t.dynCall_jiiji=t.asm.eh).apply(null,arguments)},Jh=t.dynCall_viiijij=function(){return(Jh=t.dynCall_viiijij=t.asm.fh).apply(null,arguments)},Kh=t.dynCall_viijiij=function(){return(Kh=t.dynCall_viijiij=t.asm.gh).apply(null,arguments)},Zh=t.dynCall_viiiiijj=function(){return(Zh=t.dynCall_viiiiijj=t.asm.hh).apply(null,arguments)},Xh=t.dynCall_viiijji=function(){return(Xh=t.dynCall_viiijji=t.asm.ih).apply(null,arguments)},Qh=t.dynCall_viiiji=function(){return(Qh=t.dynCall_viiiji=t.asm.jh).apply(null,arguments)},ep=t.dynCall_iiiijiii=function(){return(ep=t.dynCall_iiiijiii=t.asm.kh).apply(null,arguments)},tp=t.dynCall_iiijij=function(){return(tp=t.dynCall_iiijij=t.asm.lh).apply(null,arguments)},ip=t.dynCall_iiijji=function(){return(ip=t.dynCall_iiijji=t.asm.mh).apply(null,arguments)},rp=t.dynCall_viijji=function(){return(rp=t.dynCall_viijji=t.asm.nh).apply(null,arguments)},np=t.dynCall_iiiijj=function(){return(np=t.dynCall_iiiijj=t.asm.oh).apply(null,arguments)},sp=t.dynCall_viiijiii=function(){return(sp=t.dynCall_viiijiii=t.asm.ph).apply(null,arguments)},op=t.dynCall_vijji=function(){return(op=t.dynCall_vijji=t.asm.qh).apply(null,arguments)},ap=t.dynCall_jiiiij=function(){return(ap=t.dynCall_jiiiij=t.asm.rh).apply(null,arguments)},up=t.dynCall_jiijiiiii=function(){return(up=t.dynCall_jiijiiiii=t.asm.sh).apply(null,arguments)},cp=t.dynCall_jiijiijiii=function(){return(cp=t.dynCall_jiijiijiii=t.asm.th).apply(null,arguments)},lp=t.dynCall_jiijjiii=function(){return(lp=t.dynCall_jiijjiii=t.asm.uh).apply(null,arguments)},dp=t.dynCall_jiiijii=function(){return(dp=t.dynCall_jiiijii=t.asm.vh).apply(null,arguments)},fp=t.dynCall_jiijijii=function(){return(fp=t.dynCall_jiijijii=t.asm.wh).apply(null,arguments)},hp=t.dynCall_viiijjij=function(){return(hp=t.dynCall_viiijjij=t.asm.xh).apply(null,arguments)},pp=t.dynCall_vijijjiij=function(){return(pp=t.dynCall_vijijjiij=t.asm.yh).apply(null,arguments)},yp=t.dynCall_viijjij=function(){return(yp=t.dynCall_viijjij=t.asm.zh).apply(null,arguments)},_p=t.dynCall_viiijjiij=function(){return(_p=t.dynCall_viiijjiij=t.asm.Ah).apply(null,arguments)},mp=t.dynCall_viiiijjjj=function(){return(mp=t.dynCall_viiiijjjj=t.asm.Bh).apply(null,arguments)},bp=t.dynCall_viijiiiiij=function(){return(bp=t.dynCall_viijiiiiij=t.asm.Ch).apply(null,arguments)},gp=t.dynCall_viijiiiijj=function(){return(gp=t.dynCall_viijiiiijj=t.asm.Dh).apply(null,arguments)},vp=t.dynCall_viiijiiiijjj=function(){return(vp=t.dynCall_viiijiiiijjj=t.asm.Eh).apply(null,arguments)},jp=t.dynCall_viijijiiiijjj=function(){return(jp=t.dynCall_viijijiiiijjj=t.asm.Fh).apply(null,arguments)},wp=t.dynCall_viiiiijiiii=function(){return(wp=t.dynCall_viiiiijiiii=t.asm.Gh).apply(null,arguments)},Bp=t.dynCall_iiijii=function(){return(Bp=t.dynCall_iiijii=t.asm.Hh).apply(null,arguments)},Ip=t.dynCall_fiijii=function(){return(Ip=t.dynCall_fiijii=t.asm.Ih).apply(null,arguments)},Tp=t.dynCall_diijii=function(){return(Tp=t.dynCall_diijii=t.asm.Jh).apply(null,arguments)},Sp=t.dynCall_iiiiiiijii=function(){return(Sp=t.dynCall_iiiiiiijii=t.asm.Kh).apply(null,arguments)},Ap=t.dynCall_viiiiji=function(){return(Ap=t.dynCall_viiiiji=t.asm.Lh).apply(null,arguments)},Dp=t.dynCall_jiiiijii=function(){return(Dp=t.dynCall_jiiiijii=t.asm.Mh).apply(null,arguments)},Op=t.dynCall_jiiiijiiiiiiii=function(){return(Op=t.dynCall_jiiiijiiiiiiii=t.asm.Nh).apply(null,arguments)},Fp=t.dynCall_jiiijiii=function(){return(Fp=t.dynCall_jiiijiii=t.asm.Oh).apply(null,arguments)},Mp=t.dynCall_jiiiiijiiii=function(){return(Mp=t.dynCall_jiiiiijiiii=t.asm.Ph).apply(null,arguments)},Cp=t.dynCall_jj=function(){return(Cp=t.dynCall_jj=t.asm.Qh).apply(null,arguments)},Up=t.dynCall_jd=function(){return(Up=t.dynCall_jd=t.asm.Rh).apply(null,arguments)},Vp=t.dynCall_jf=function(){return(Vp=t.dynCall_jf=t.asm.Sh).apply(null,arguments)},kp=t.dynCall_iijjj=function(){return(kp=t.dynCall_iijjj=t.asm.Th).apply(null,arguments)},Ep=t.dynCall_iiijj=function(){return(Ep=t.dynCall_iiijj=t.asm.Uh).apply(null,arguments)},Rp=t.dynCall_vijijiiiijjj=function(){return(Rp=t.dynCall_vijijiiiijjj=t.asm.Vh).apply(null,arguments)},Pp=t.dynCall_iiiiiiji=function(){return(Pp=t.dynCall_iiiiiiji=t.asm.Wh).apply(null,arguments)},Np=t.dynCall_iiiiiiiiji=function(){return(Np=t.dynCall_iiiiiiiiji=t.asm.Xh).apply(null,arguments)},Lp=t.dynCall_jijijjij=function(){return(Lp=t.dynCall_jijijjij=t.asm.Yh).apply(null,arguments)},xp=t.dynCall_viijjj=function(){return(xp=t.dynCall_viijjj=t.asm.Zh).apply(null,arguments)},qp=t.dynCall_vijjij=function(){return(qp=t.dynCall_vijjij=t.asm._h).apply(null,arguments)},zp=t.dynCall_viijjji=function(){return(zp=t.dynCall_viijjji=t.asm.$h).apply(null,arguments)},Wp=t.dynCall_iiiiiij=function(){return(Wp=t.dynCall_iiiiiij=t.asm.ai).apply(null,arguments)},Hp=t.dynCall_iiiiiiiiiiji=function(){return(Hp=t.dynCall_iiiiiiiiiiji=t.asm.bi).apply(null,arguments)},Yp=t.dynCall_jiiiiiii=function(){return(Yp=t.dynCall_jiiiiiii=t.asm.ci).apply(null,arguments)},$p=t.dynCall_jijj=function(){return($p=t.dynCall_jijj=t.asm.di).apply(null,arguments)},Gp=t.dynCall_viiiijiiiiiiii=function(){return(Gp=t.dynCall_viiiijiiiiiiii=t.asm.ei).apply(null,arguments)},Jp=t.dynCall_ij=function(){return(Jp=t.dynCall_ij=t.asm.fi).apply(null,arguments)},Kp=t.dynCall_jjj=function(){return(Kp=t.dynCall_jjj=t.asm.gi).apply(null,arguments)},Zp=t.dynCall_vjii=function(){return(Zp=t.dynCall_vjii=t.asm.hi).apply(null,arguments)},Xp=t.dynCall_jjjjjjd=function(){return(Xp=t.dynCall_jjjjjjd=t.asm.ii).apply(null,arguments)},Qp=t.dynCall_vjiiii=function(){return(Qp=t.dynCall_vjiiii=t.asm.ji).apply(null,arguments)},ey=t.dynCall_viiiiijiii=function(){return(ey=t.dynCall_viiiiijiii=t.asm.ki).apply(null,arguments)},ty=t.dynCall_jiij=function(){return(ty=t.dynCall_jiij=t.asm.li).apply(null,arguments)},iy=t.dynCall_iiiijjii=function(){return(iy=t.dynCall_iiiijjii=t.asm.mi).apply(null,arguments)},ry=t.dynCall_iiiiijji=function(){return(ry=t.dynCall_iiiiijji=t.asm.ni).apply(null,arguments)},ny=t.dynCall_viiijjii=function(){return(ny=t.dynCall_viiijjii=t.asm.oi).apply(null,arguments)},sy=t.dynCall_viiiijji=function(){return(sy=t.dynCall_viiiijji=t.asm.pi).apply(null,arguments)},oy=t.dynCall_viiiijjii=function(){return(oy=t.dynCall_viiiijjii=t.asm.qi).apply(null,arguments)},ay=t.dynCall_viiiiijji=function(){return(ay=t.dynCall_viiiiijji=t.asm.ri).apply(null,arguments)},uy=t.dynCall_iiiiiijji=function(){return(uy=t.dynCall_iiiiiijji=t.asm.si).apply(null,arguments)},cy=t.dynCall_iiiiijjj=function(){return(cy=t.dynCall_iiiiijjj=t.asm.ti).apply(null,arguments)},ly=t.dynCall_jijiiii=function(){return(ly=t.dynCall_jijiiii=t.asm.ui).apply(null,arguments)},dy=t.dynCall_iiijjjii=function(){return(dy=t.dynCall_iiijjjii=t.asm.vi).apply(null,arguments)},fy=t.dynCall_iiiiijjji=function(){return(fy=t.dynCall_iiiiijjji=t.asm.wi).apply(null,arguments)},hy=t.dynCall_iiiijjj=function(){return(hy=t.dynCall_iiiijjj=t.asm.xi).apply(null,arguments)},py=t.dynCall_iidj=function(){return(py=t.dynCall_iidj=t.asm.yi).apply(null,arguments)},yy=t.dynCall_ijji=function(){return(yy=t.dynCall_ijji=t.asm.zi).apply(null,arguments)},_y=t.dynCall_iiiiiiiij=function(){return(_y=t.dynCall_iiiiiiiij=t.asm.Ai).apply(null,arguments)},my=t.dynCall_iiiiiiij=function(){return(my=t.dynCall_iiiiiiij=t.asm.Bi).apply(null,arguments)},by=t.dynCall_iiiiiiiiiiiij=function(){return(by=t.dynCall_iiiiiiiiiiiij=t.asm.Ci).apply(null,arguments)},gy=t.dynCall_iiiiiiiji=function(){return(gy=t.dynCall_iiiiiiiji=t.asm.Di).apply(null,arguments)},vy=t.dynCall_iiiidjj=function(){return(vy=t.dynCall_iiiidjj=t.asm.Ei).apply(null,arguments)},jy=t.dynCall_jiiiiiijii=function(){return(jy=t.dynCall_jiiiiiijii=t.asm.Fi).apply(null,arguments)},wy=t.dynCall_iiiijji=function(){return(wy=t.dynCall_iiiijji=t.asm.Gi).apply(null,arguments)},By=t.dynCall_jiiiiii=function(){return(By=t.dynCall_jiiiiii=t.asm.Hi).apply(null,arguments)},Iy=t.dynCall_iijiji=function(){return(Iy=t.dynCall_iijiji=t.asm.Ii).apply(null,arguments)},Ty=t.dynCall_vjiiiji=function(){return(Ty=t.dynCall_vjiiiji=t.asm.Ji).apply(null,arguments)},Sy=t.dynCall_jjjii=function(){return(Sy=t.dynCall_jjjii=t.asm.Ki).apply(null,arguments)},Ay=t.dynCall_jji=function(){return(Ay=t.dynCall_jji=t.asm.Li).apply(null,arguments)},Dy=t.dynCall_viiijijiji=function(){return(Dy=t.dynCall_viiijijiji=t.asm.Mi).apply(null,arguments)},Oy=t.dynCall_jiiijj=function(){return(Oy=t.dynCall_jiiijj=t.asm.Ni).apply(null,arguments)},Fy=t.dynCall_iiiijii=function(){return(Fy=t.dynCall_iiiijii=t.asm.Oi).apply(null,arguments)},My=t.dynCall_viiiijii=function(){return(My=t.dynCall_viiiijii=t.asm.Pi).apply(null,arguments)},Cy=t.dynCall_iijiii=function(){return(Cy=t.dynCall_iijiii=t.asm.Qi).apply(null,arguments)},Uy=t.dynCall_jiiiiji=function(){return(Uy=t.dynCall_jiiiiji=t.asm.Ri).apply(null,arguments)},Vy=t.dynCall_vijiijj=function(){return(Vy=t.dynCall_vijiijj=t.asm.Si).apply(null,arguments)},ky=t.dynCall_vifiijj=function(){return(ky=t.dynCall_vifiijj=t.asm.Ti).apply(null,arguments)},Ey=t.dynCall_vidiijj=function(){return(Ey=t.dynCall_vidiijj=t.asm.Ui).apply(null,arguments)},Ry=t.dynCall_viiiiij=function(){return(Ry=t.dynCall_viiiiij=t.asm.Vi).apply(null,arguments)},Py=t.dynCall_ijj=function(){return(Py=t.dynCall_ijj=t.asm.Wi).apply(null,arguments)},Ny=t.dynCall_ijjiii=function(){return(Ny=t.dynCall_ijjiii=t.asm.Xi).apply(null,arguments)},Ly=t.dynCall_vijijjji=function(){return(Ly=t.dynCall_vijijjji=t.asm.Yi).apply(null,arguments)},xy=t.dynCall_viijiijj=function(){return(xy=t.dynCall_viijiijj=t.asm.Zi).apply(null,arguments)},qy=t.dynCall_viijijj=function(){return(qy=t.dynCall_viijijj=t.asm._i).apply(null,arguments)},zy=t.dynCall_viiiiijjji=function(){return(zy=t.dynCall_viiiiijjji=t.asm.$i).apply(null,arguments)},Wy=t.dynCall_iiijiijj=function(){return(Wy=t.dynCall_iiijiijj=t.asm.aj).apply(null,arguments)},Hy=t.dynCall_viiijijjj=function(){return(Hy=t.dynCall_viiijijjj=t.asm.bj).apply(null,arguments)},Yy=t.dynCall_iijiijj=function(){return(Yy=t.dynCall_iijiijj=t.asm.cj).apply(null,arguments)},$y=t.dynCall_viiijjjji=function(){return($y=t.dynCall_viiijjjji=t.asm.dj).apply(null,arguments)},Gy=t.dynCall_viiiijiii=function(){return(Gy=t.dynCall_viiiijiii=t.asm.ej).apply(null,arguments)},Jy=t.dynCall_viijiiii=function(){return(Jy=t.dynCall_viijiiii=t.asm.fj).apply(null,arguments)},Ky=t.dynCall_iijii=function(){return(Ky=t.dynCall_iijii=t.asm.gj).apply(null,arguments)},Zy=t.dynCall_vijjiiii=function(){return(Zy=t.dynCall_vijjiiii=t.asm.hj).apply(null,arguments)},Xy=t.dynCall_vijijjiiiii=function(){return(Xy=t.dynCall_vijijjiiiii=t.asm.ij).apply(null,arguments)},Qy=t.dynCall_vijjiiiii=function(){return(Qy=t.dynCall_vijjiiiii=t.asm.jj).apply(null,arguments)},e_=t.dynCall_iiijjji=function(){return(e_=t.dynCall_iiijjji=t.asm.kj).apply(null,arguments)},t_=t.dynCall_viijiji=function(){return(t_=t.dynCall_viijiji=t.asm.lj).apply(null,arguments)};function _B(s){var a=w();try{$.get(s)()}catch(u){if(B(a),u!==u+0&&u!=="longjmp")throw u;I(1,0)}}function mB(s,a,u){var c=w();try{$.get(s)(a,u)}catch(d){if(B(c),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function bB(s,a){var u=w();try{return $.get(s)(a)}catch(c){if(B(u),c!==c+0&&c!=="longjmp")throw c;I(1,0)}}function gB(s,a,u){var c=w();try{return $.get(s)(a,u)}catch(d){if(B(c),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function vB(s,a){var u=w();try{$.get(s)(a)}catch(c){if(B(u),c!==c+0&&c!=="longjmp")throw c;I(1,0)}}function jB(s,a,u,c){var d=w();try{return $.get(s)(a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function wB(s,a,u,c,d,f){var h=w();try{return $.get(s)(a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function BB(s,a,u,c,d){var f=w();try{$.get(s)(a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function IB(s,a,u,c,d){var f=w();try{return $.get(s)(a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function TB(s,a,u,c){var d=w();try{return $.get(s)(a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function SB(s,a,u,c){var d=w();try{return $.get(s)(a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function AB(s,a,u,c){var d=w();try{$.get(s)(a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function DB(s,a,u,c){var d=w();try{$.get(s)(a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function OB(s,a,u,c){var d=w();try{$.get(s)(a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function FB(s,a,u){var c=w();try{return $.get(s)(a,u)}catch(d){if(B(c),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function MB(s,a,u){var c=w();try{return $.get(s)(a,u)}catch(d){if(B(c),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function CB(s,a,u,c,d,f,h){var p=w();try{$.get(s)(a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function UB(s,a,u,c,d,f){var h=w();try{$.get(s)(a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function VB(s,a,u,c,d,f,h,p,y){var m=w();try{return $.get(s)(a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function kB(s,a,u,c,d,f,h){var p=w();try{return $.get(s)(a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function EB(s,a,u,c,d,f,h,p){var y=w();try{return $.get(s)(a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function RB(s){var a=w();try{return $.get(s)()}catch(u){if(B(a),u!==u+0&&u!=="longjmp")throw u;I(1,0)}}function PB(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{return $.get(s)(a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function NB(s,a,u,c,d,f,h,p){var y=w();try{$.get(s)(a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function LB(s,a,u,c,d,f,h,p,y,m,b,j){var A=w();try{return $.get(s)(a,u,c,d,f,h,p,y,m,b,j)}catch(M){if(B(A),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function xB(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{$.get(s)(a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function qB(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R,Z){var le=w();try{$.get(s)(a,u,c,d,f,h,p,y,m,b,j,A,M,R,Z)}catch(Oe){if(B(le),Oe!==Oe+0&&Oe!=="longjmp")throw Oe;I(1,0)}}function zB(s,a,u,c,d){var f=w();try{return $.get(s)(a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function WB(s,a,u,c,d){var f=w();try{return $.get(s)(a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function HB(s,a,u,c,d,f){var h=w();try{$.get(s)(a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function YB(s,a,u){var c=w();try{$.get(s)(a,u)}catch(d){if(B(c),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function $B(s,a,u){var c=w();try{$.get(s)(a,u)}catch(d){if(B(c),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function GB(s,a){var u=w();try{return $.get(s)(a)}catch(c){if(B(u),c!==c+0&&c!=="longjmp")throw c;I(1,0)}}function JB(s,a,u,c){var d=w();try{return $.get(s)(a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function KB(s,a){var u=w();try{return $.get(s)(a)}catch(c){if(B(u),c!==c+0&&c!=="longjmp")throw c;I(1,0)}}function ZB(s,a,u,c,d,f,h,p,y){var m=w();try{$.get(s)(a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function XB(s,a,u,c,d,f){var h=w();try{return $.get(s)(a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function QB(s,a,u,c){var d=w();try{$.get(s)(a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function eI(s,a,u,c){var d=w();try{$.get(s)(a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function tI(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R){var Z=w();try{return $.get(s)(a,u,c,d,f,h,p,y,m,b,j,A,M,R)}catch(le){if(B(Z),le!==le+0&&le!=="longjmp")throw le;I(1,0)}}function iI(s,a,u){var c=w();try{return $.get(s)(a,u)}catch(d){if(B(c),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function rI(s,a,u,c,d,f,h,p,y,m,b,j,A,M){var R=w();try{$.get(s)(a,u,c,d,f,h,p,y,m,b,j,A,M)}catch(Z){if(B(R),Z!==Z+0&&Z!=="longjmp")throw Z;I(1,0)}}function nI(s,a,u,c,d,f,h,p,y,m){var b=w();try{$.get(s)(a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function sI(s){var a=w();try{return $.get(s)()}catch(u){if(B(a),u!==u+0&&u!=="longjmp")throw u;I(1,0)}}function oI(s){var a=w();try{return $.get(s)()}catch(u){if(B(a),u!==u+0&&u!=="longjmp")throw u;I(1,0)}}function aI(s,a){var u=w();try{return $.get(s)(a)}catch(c){if(B(u),c!==c+0&&c!=="longjmp")throw c;I(1,0)}}function uI(s,a){var u=w();try{return $.get(s)(a)}catch(c){if(B(u),c!==c+0&&c!=="longjmp")throw c;I(1,0)}}function cI(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R,Z,le,Oe,U,G,me){var pe=w();try{return $.get(s)(a,u,c,d,f,h,p,y,m,b,j,A,M,R,Z,le,Oe,U,G,me)}catch(lt){if(B(pe),lt!==lt+0&&lt!=="longjmp")throw lt;I(1,0)}}function lI(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R,Z,le,Oe,U,G){var me=w();try{return $.get(s)(a,u,c,d,f,h,p,y,m,b,j,A,M,R,Z,le,Oe,U,G)}catch(pe){if(B(me),pe!==pe+0&&pe!=="longjmp")throw pe;I(1,0)}}function dI(s,a,u){var c=w();try{return $.get(s)(a,u)}catch(d){if(B(c),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function fI(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{$.get(s)(a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function hI(s,a,u,c){var d=w();try{return $.get(s)(a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function pI(s,a,u,c,d,f,h,p,y,m){var b=w();try{$.get(s)(a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function yI(s,a,u,c,d,f,h,p,y,m,b,j){var A=w();try{$.get(s)(a,u,c,d,f,h,p,y,m,b,j)}catch(M){if(B(A),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function _I(s,a,u,c,d){var f=w();try{return Hf(s,a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function mI(s,a,u,c,d,f,h){var p=w();try{Nf(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function bI(s,a,u,c,d){var f=w();try{Xf(s,a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function gI(s,a,u,c,d,f,h){var p=w();try{return Yf(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function vI(s,a,u,c){var d=w();try{Pf(s,a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function jI(s,a,u,c,d,f,h){var p=w();try{zf(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function wI(s,a,u,c,d,f){var h=w();try{Cf(s,a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function BI(s,a,u,c,d,f,h,p,y,m){var b=w();try{Uf(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function II(s,a,u,c,d){var f=w();try{return Vf(s,a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function TI(s,a,u,c,d,f,h,p,y){var m=w();try{kf(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function SI(s,a,u,c){var d=w();try{return Ef(s,a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function AI(s,a,u,c,d){var f=w();try{Rf(s,a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function DI(s,a){var u=w();try{return Lf(s,a)}catch(c){if(B(u),c!==c+0&&c!=="longjmp")throw c;I(1,0)}}function OI(s,a,u,c,d,f,h,p){var y=w();try{xf(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function FI(s,a,u,c,d,f,h,p){var y=w();try{qf(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function MI(s,a,u,c,d,f,h,p,y){var m=w();try{xp(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function CI(s,a,u,c,d,f,h,p,y){var m=w();try{return $f(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function UI(s,a,u){var c=w();try{return Wf(s,a,u)}catch(d){if(B(c),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function VI(s,a,u,c,d){var f=w();try{return Py(s,a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function kI(s,a,u,c,d,f,h,p){var y=w();try{return Ny(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function EI(s,a,u,c,d,f,h){var p=w();try{Jf(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function RI(s,a,u,c,d,f){var h=w();try{Kf(s,a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function PI(s,a,u,c,d,f){var h=w();try{Zf(s,a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function NI(s,a,u,c){var d=w();try{return Gf(s,a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function LI(s,a,u){var c=w();try{Qf(s,a,u)}catch(d){if(B(c),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function xI(s,a,u,c,d){var f=w();try{return eh(s,a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function qI(s,a,u,c,d,f){var h=w();try{return th(s,a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function zI(s,a,u,c,d,f,h,p){var y=w();try{return np(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function WI(s,a,u,c,d,f,h,p){var y=w();try{Ap(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function HI(s,a,u,c,d,f,h,p){var y=w();try{return tp(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function YI(s,a,u,c,d,f){var h=w();try{return rh(s,a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function $I(s,a,u,c,d,f){var h=w();try{return Rh(s,a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function GI(s,a,u,c,d,f,h,p){var y=w();try{return ip(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function JI(s,a,u,c,d,f,h,p){var y=w();try{rp(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function KI(s){var a=w();try{return ah(s)}catch(u){if(B(a),u!==u+0&&u!=="longjmp")throw u;I(1,0)}}function ZI(s,a,u,c,d,f,h,p){var y=w();try{return ih(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function XI(s,a,u,c,d,f,h){var p=w();try{return nh(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function QI(s,a,u,c){var d=w();try{return sh(s,a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function e1(s,a,u,c,d,f,h){var p=w();try{bh(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function t1(s,a,u,c,d,f,h,p){var y=w();try{Bh(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function i1(s,a,u,c,d,f,h,p){var y=w();try{return Ih(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function r1(s,a,u,c,d,f,h,p){var y=w();try{return ph(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function n1(s,a,u,c,d,f,h,p,y){var m=w();try{return yh(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function s1(s,a,u,c,d,f,h,p){var y=w();try{_h(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function o1(s,a,u,c,d,f,h,p,y){var m=w();try{return mh(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function a1(s,a,u,c,d,f,h,p){var y=w();try{return gh(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function u1(s,a,u,c,d,f,h,p,y){var m=w();try{return vh(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function c1(s,a,u,c,d,f,h,p,y,m){var b=w();try{return jh(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function l1(s,a,u,c,d,f,h){var p=w();try{return wh(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function d1(s,a,u,c,d,f,h,p,y){var m=w();try{hh(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function f1(s,a,u,c,d,f,h,p){var y=w();try{fh(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function h1(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{return ch(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function p1(s,a,u,c,d,f,h,p,y,m,b,j){var A=w();try{lh(s,a,u,c,d,f,h,p,y,m,b,j)}catch(M){if(B(A),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function y1(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{dh(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function _1(s,a,u,c,d,f,h){var p=w();try{Vh(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function m1(s,a,u,c,d,f,h){var p=w();try{Qh(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function b1(s,a,u,c,d,f,h,p,y){var m=w();try{xh(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function g1(s,a,u,c,d,f,h,p,y){var m=w();try{return Ah(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function v1(s,a,u,c,d,f,h,p,y){var m=w();try{Xh(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function j1(s,a,u,c){var d=w();try{return oh(s,a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function w1(s,a,u,c,d,f){var h=w();try{return Dh(s,a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function B1(s,a,u,c,d,f,h,p,y){var m=w();try{Uh(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function I1(s,a,u,c,d,f){var h=w();try{return Oh(s,a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function T1(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{Ch(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function S1(s,a,u,c,d,f){var h=w();try{return Gh(s,a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function A1(s,a,u,c,d,f,h,p,y,m){var b=w();try{Mh(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function D1(s,a,u,c,d,f,h){var p=w();try{return Eh(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function O1(s,a,u,c,d,f,h){var p=w();try{Th(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function F1(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{return Sh(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function M1(s,a,u,c,d,f,h,p,y){var m=w();try{kh(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function C1(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R){var Z=w();try{return Fh(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R)}catch(le){if(B(Z),le!==le+0&&le!=="longjmp")throw le;I(1,0)}}function U1(s,a,u,c,d,f,h,p,y){var m=w();try{return Ph(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function V1(s,a,u,c,d,f,h,p){var y=w();try{uh(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function k1(s,a,u,c,d,f){var h=w();try{Nh(s,a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function E1(s,a,u,c,d,f,h,p,y){var m=w();try{Lh(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function R1(s,a,u,c,d,f,h){var p=w();try{return zh(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function P1(s,a,u,c,d,f,h,p,y,m){var b=w();try{Hh(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function N1(s,a,u,c,d,f,h,p,y,m){var b=w();try{Yh(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function L1(s,a,u,c,d,f,h){var p=w();try{return Wh(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function x1(s,a,u,c,d,f,h,p,y,m){var b=w();try{$h(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function q1(s,a,u,c,d,f,h,p,y){var m=w();try{return qh(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function z1(s,a,u,c,d,f,h,p,y){var m=w();try{Kh(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function W1(s,a,u,c,d,f,h,p,y){var m=w();try{return ep(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function H1(s,a,u,c,d,f,h,p,y){var m=w();try{sp(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function Y1(s,a,u,c,d,f,h){var p=w();try{op(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function $1(s,a,u,c,d,f,h){var p=w();try{return ap(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function G1(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{hp(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function J1(s,a,u,c,d,f,h,p,y,m,b,j,A){var M=w();try{pp(s,a,u,c,d,f,h,p,y,m,b,j,A)}catch(R){if(B(M),R!==R+0&&R!=="longjmp")throw R;I(1,0)}}function K1(s,a,u,c,d,f,h,p,y,m){var b=w();try{yp(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function Z1(s,a,u,c,d,f,h,p,y,m,b,j,A){var M=w();try{mp(s,a,u,c,d,f,h,p,y,m,b,j,A)}catch(R){if(B(M),R!==R+0&&R!=="longjmp")throw R;I(1,0)}}function X1(s,a,u,c,d,f,h,p,y,m){var b=w();try{return up(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function Q1(s,a,u,c,d,f,h,p,y,m,b,j){var A=w();try{return cp(s,a,u,c,d,f,h,p,y,m,b,j)}catch(M){if(B(A),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function eT(s,a,u,c,d,f,h,p,y,m){var b=w();try{return lp(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function tT(s,a,u,c,d,f,h,p){var y=w();try{return dp(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function iT(s,a,u,c,d,f,h,p,y,m){var b=w();try{return fp(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function rT(s,a,u,c,d,f,h,p,y,m,b,j){var A=w();try{bp(s,a,u,c,d,f,h,p,y,m,b,j)}catch(M){if(B(A),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function nT(s,a,u,c,d,f,h,p,y,m,b,j,A){var M=w();try{gp(s,a,u,c,d,f,h,p,y,m,b,j,A)}catch(R){if(B(M),R!==R+0&&R!=="longjmp")throw R;I(1,0)}}function sT(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R,Z){var le=w();try{vp(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R,Z)}catch(Oe){if(B(le),Oe!==Oe+0&&Oe!=="longjmp")throw Oe;I(1,0)}}function oT(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R,Z,le,Oe){var U=w();try{jp(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R,Z,le,Oe)}catch(G){if(B(U),G!==G+0&&G!=="longjmp")throw G;I(1,0)}}function aT(s,a,u,c,d,f,h,p,y,m,b,j){var A=w();try{_p(s,a,u,c,d,f,h,p,y,m,b,j)}catch(M){if(B(A),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function uT(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{return jy(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function cT(s,a,u,c,d,f,h,p,y){var m=w();try{return wy(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function lT(s,a,u,c,d,f,h,p,y,m,b,j){var A=w();try{wp(s,a,u,c,d,f,h,p,y,m,b,j)}catch(M){if(B(A),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function dT(s,a,u,c,d,f,h,p,y){var m=w();try{return Dp(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function fT(s,a,u,c,d,f,h){var p=w();try{return Bp(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function hT(s,a,u,c,d,f,h){var p=w();try{return Ip(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function pT(s,a,u,c,d,f,h){var p=w();try{return Tp(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function yT(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{return Sp(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function _T(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R){var Z=w();try{return Op(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R)}catch(le){if(B(Z),le!==le+0&&le!=="longjmp")throw le;I(1,0)}}function mT(s,a,u,c,d,f,h,p,y){var m=w();try{return Fp(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function bT(s,a,u,c,d,f,h,p,y,m,b,j){var A=w();try{return Mp(s,a,u,c,d,f,h,p,y,m,b,j)}catch(M){if(B(A),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function gT(s,a,u){var c=w();try{return Cp(s,a,u)}catch(d){if(B(c),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function vT(s,a){var u=w();try{return Up(s,a)}catch(c){if(B(u),c!==c+0&&c!=="longjmp")throw c;I(1,0)}}function jT(s,a){var u=w();try{return Vp(s,a)}catch(c){if(B(u),c!==c+0&&c!=="longjmp")throw c;I(1,0)}}function wT(s,a,u,c,d,f,h){var p=w();try{return By(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function BT(s,a,u,c,d,f){var h=w();try{return yy(s,a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function IT(s,a,u,c,d,f,h,p,y){var m=w();try{return Pp(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function TT(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{return Np(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function ST(s,a,u,c,d,f,h,p,y,m){var b=w();try{Zh(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function AT(s,a,u,c,d,f,h){var p=w();try{return Ep(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function DT(s,a,u,c,d,f,h,p){var y=w();try{return kp(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function OT(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R,Z,le){var Oe=w();try{Rp(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R,Z,le)}catch(U){if(B(Oe),U!==U+0&&U!=="longjmp")throw U;I(1,0)}}function FT(s,a,u,c,d,f,h,p,y,m,b,j){var A=w();try{return Lp(s,a,u,c,d,f,h,p,y,m,b,j)}catch(M){if(B(A),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function MT(s,a,u,c,d,f,h,p,y){var m=w();try{qp(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function CT(s,a,u,c,d,f,h,p,y,m){var b=w();try{return _y(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function UT(s,a,u,c,d,f,h,p,y,m){var b=w();try{zp(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function VT(s,a,u,c,d,f,h,p){var y=w();try{return Wp(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function kT(s,a,u,c,d,f,h,p,y,m,b,j,A){var M=w();try{return Hp(s,a,u,c,d,f,h,p,y,m,b,j,A)}catch(R){if(B(M),R!==R+0&&R!=="longjmp")throw R;I(1,0)}}function ET(s,a,u,c,d,f,h,p){var y=w();try{return Yp(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function RT(s,a,u,c,d,f,h,p,y){var m=w();try{return my(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function PT(s,a,u,c,d,f,h,p,y,m,b,j,A,M){var R=w();try{return by(s,a,u,c,d,f,h,p,y,m,b,j,A,M)}catch(Z){if(B(R),Z!==Z+0&&Z!=="longjmp")throw Z;I(1,0)}}function NT(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{ey(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function LT(s,a,u,c,d){var f=w();try{return ty(s,a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function xT(s,a,u){var c=w();try{return Jp(s,a,u)}catch(d){if(B(c),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function qT(s,a,u,c,d,f,h){var p=w();try{Qp(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function zT(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R){var Z=w();try{Gp(s,a,u,c,d,f,h,p,y,m,b,j,A,M,R)}catch(le){if(B(Z),le!==le+0&&le!=="longjmp")throw le;I(1,0)}}function WT(s,a,u,c,d){var f=w();try{return Kp(s,a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function HT(s,a,u,c,d){var f=w();try{Zp(s,a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function YT(s,a,u,c,d,f,h,p,y,m,b,j){var A=w();try{return Xp(s,a,u,c,d,f,h,p,y,m,b,j)}catch(M){if(B(A),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function $T(s,a,u,c,d,f,h,p,y,m){var b=w();try{return iy(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function GT(s,a,u,c,d,f,h,p,y,m){var b=w();try{return ry(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function JT(s,a,u,c,d,f,h,p,y,m){var b=w();try{ny(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function KT(s,a,u,c,d,f,h,p,y,m){var b=w();try{sy(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function ZT(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{oy(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function XT(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{ay(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function QT(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{return uy(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function eS(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{return dy(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function tS(s,a,u,c,d,f,h,p){var y=w();try{return ly(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function iS(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{return cy(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function rS(s,a,u,c,d,f,h,p,y,m,b,j){var A=w();try{return fy(s,a,u,c,d,f,h,p,y,m,b,j)}catch(M){if(B(A),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function nS(s,a,u,c,d,f,h,p,y,m){var b=w();try{return hy(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function sS(s,a,u,c,d){var f=w();try{return py(s,a,u,c,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function oS(s,a,u,c,d,f,h,p,y,m){var b=w();try{return gy(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function aS(s,a,u,c,d,f,h,p,y){var m=w();try{return vy(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function uS(s,a,u,c,d,f,h,p){var y=w();try{return Iy(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function cS(s,a,u,c,d,f,h,p,y){var m=w();try{Ty(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function lS(s,a,u,c,d,f,h){var p=w();try{return Sy(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function dS(s,a,u,c){var d=w();try{return Ay(s,a,u,c)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function fS(s,a,u,c,d,f,h,p,y,m,b,j,A){var M=w();try{Dy(s,a,u,c,d,f,h,p,y,m,b,j,A)}catch(R){if(B(M),R!==R+0&&R!=="longjmp")throw R;I(1,0)}}function hS(s,a,u,c,d,f,h,p,y){var m=w();try{Jh(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function pS(s,a,u,c,d,f,h,p){var y=w();try{return Oy(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function yS(s,a,u,c,d,f,h,p){var y=w();try{return Fy(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function _S(s,a,u,c,d,f,h,p,y){var m=w();try{My(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function mS(s,a,u,c,d,f,h){var p=w();try{return Cy(s,a,u,c,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function bS(s,a,u,c,d,f,h,p){var y=w();try{return Uy(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function gS(s,a,u,c,d,f,h,p,y,m){var b=w();try{Vy(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function vS(s,a,u,c,d,f,h,p,y){var m=w();try{ky(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function jS(s,a,u,c,d,f,h,p,y){var m=w();try{Ey(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function wS(s,a,u,c,d,f,h,p){var y=w();try{Ry(s,a,u,c,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function BS(s,a,u,c,d,f,h,p,y,m,b,j){var A=w();try{Ly(s,a,u,c,d,f,h,p,y,m,b,j)}catch(M){if(B(A),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function IS(s,a,u,c,d,f){var h=w();try{return $p(s,a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function TS(s,a,u,c,d,f,h,p,y,m){var b=w();try{qy(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function SS(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{return Wy(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function AS(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{xy(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function DS(s,a,u,c,d,f,h,p,y,m,b,j,A){var M=w();try{zy(s,a,u,c,d,f,h,p,y,m,b,j,A)}catch(R){if(B(M),R!==R+0&&R!=="longjmp")throw R;I(1,0)}}function OS(s,a,u,c,d,f,h,p,y,m,b,j,A){var M=w();try{Hy(s,a,u,c,d,f,h,p,y,m,b,j,A)}catch(R){if(B(M),R!==R+0&&R!=="longjmp")throw R;I(1,0)}}function FS(s,a,u,c,d,f,h,p,y,m){var b=w();try{return Yy(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function MS(s,a,u,c,d,f,h,p,y,m){var b=w();try{return e_(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function CS(s,a,u,c,d,f,h,p,y,m,b,j,A){var M=w();try{$y(s,a,u,c,d,f,h,p,y,m,b,j,A)}catch(R){if(B(M),R!==R+0&&R!=="longjmp")throw R;I(1,0)}}function US(s,a,u,c,d,f,h,p,y,m){var b=w();try{Gy(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function VS(s,a,u,c,d,f,h,p,y){var m=w();try{Jy(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function kS(s,a,u,c,d,f){var h=w();try{return Ky(s,a,u,c,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function ES(s,a,u,c,d,f,h,p,y){var m=w();try{t_(s,a,u,c,d,f,h,p,y)}catch(b){if(B(m),b!==b+0&&b!=="longjmp")throw b;I(1,0)}}function RS(s,a,u,c,d,f,h,p,y,m,b,j,A,M){var R=w();try{Xy(s,a,u,c,d,f,h,p,y,m,b,j,A,M)}catch(Z){if(B(R),Z!==Z+0&&Z!=="longjmp")throw Z;I(1,0)}}function PS(s,a,u,c,d,f,h,p,y,m,b){var j=w();try{Qy(s,a,u,c,d,f,h,p,y,m,b)}catch(A){if(B(j),A!==A+0&&A!=="longjmp")throw A;I(1,0)}}function NS(s,a,u,c,d,f,h,p,y,m){var b=w();try{Zy(s,a,u,c,d,f,h,p,y,m)}catch(j){if(B(b),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}t.ccall=U0;var bo;function go(s){this.name="ExitStatus",this.message="Program terminated with exit("+s+")",this.status=s}var LS=!1;cs=function s(){bo||Ru(),bo||(cs=s)};function xS(s){var a=t._main,u=0,c=0;try{var d=a(u,c);return qS(d,!0),d}catch(f){return rj(f)}finally{LS=!0}}function Ru(s){if(s=s||_,Ir>0||(W0(),Ir>0))return;function a(){bo||(bo=!0,t.calledRun=!0,!Iu&&(H0(),Y0(),r(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),i_&&xS(s),G0()))}t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),a()},1)):a()}t.run=Ru;function qS(s,a){ro=s,Su()||$0(),zS(s)}function zS(s){ro=s,Su()||(t.onExit&&t.onExit(s),Iu=!0),T(s,new go(s))}if(t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();var i_=!0;return t.noInitialRun&&(i_=!1),Ru(),e.ready}}(),B0=PV;var sf=class{constructor(e,t){this._bindings=e,this._conn=t}close(){this._bindings.disconnect(this._conn)}useUnsafe(e){return e(this._bindings,this._conn)}query(e){let t=this._bindings.runQuery(this._conn,e),r=S.RecordBatchReader.from(t);return console.assert(r.isSync()),console.assert(r.isFile()),S.Table.from(r)}send(e){let t=this._bindings.sendQuery(this._conn,e),r=new of(this._bindings,this._conn,t),n=S.RecordBatchReader.from(r);return console.assert(n.isSync()),console.assert(n.isStream()),n}getTableNames(e){return this._bindings.getTableNames(this._conn,e)}prepare(e){let t=this._bindings.createPrepared(this._conn,e);return new T0(this._bindings,this._conn,t)}insertArrowTable(e,t){let r=e.serialize("binary",!0);this.insertArrowFromIPCStream(r,t)}insertArrowFromIPCStream(e,t){this._bindings.insertArrowFromIPCStream(this._conn,e,t)}insertCSVFromPath(e,t){this._bindings.insertCSVFromPath(this._conn,e,t)}insertJSONFromPath(e,t){this._bindings.insertJSONFromPath(this._conn,e,t)}},of=class{constructor(e,t,r){this.bindings=e;this.conn=t;this.header=r;this._first=!0,this._depleted=!1}next(){if(this._first)return this._first=!1,{done:!1,value:this.header};if(this._depleted)return{done:!0,value:null};let e=this.bindings.fetchQueryResults(this.conn);return this._depleted=e.length==0,{done:this._depleted,value:e}}[Symbol.iterator](){return this}},T0=class{constructor(e,t,r){this.bindings=e,this.connectionId=t,this.statementId=r}close(){this.bindings.closePrepared(this.connectionId,this.statementId)}query(...e){let t=this.bindings.runPrepared(this.connectionId,this.statementId,e),r=S.RecordBatchReader.from(t);return console.assert(r.isSync()),console.assert(r.isFile()),S.Table.from(r)}send(...e){let t=this.bindings.sendPrepared(this.connectionId,this.statementId,e),r=new of(this.bindings,this.connectionId,t),n=S.RecordBatchReader.from(r);return console.assert(n.isSync()),console.assert(n.isStream()),n}};function NV(){let i=new TextDecoder;return e=>(typeof SharedArrayBuffer!="undefined"&&e.buffer instanceof SharedArrayBuffer&&(e=new Uint8Array(e)),i.decode(e))}var LV=NV();function Pi(i,e){i.ccall("duckdb_web_fail_with",null,["string"],[e])}function ss(i,e,t){let r=i.HEAPU8.subarray(e,e+t),n=new Uint8Array(new ArrayBuffer(r.byteLength));return n.set(r),n}function he(i,e,t){return LV(i.HEAPU8.subarray(e,e+t))}function we(i,e,t,r){let n=i.stackSave(),o=i.stackAlloc(3*8);t.unshift("number"),r.unshift(o),i.ccall(e,null,t,r);let l=i.HEAPF64[(o>>3)+0],_=i.HEAPF64[(o>>3)+1],v=i.HEAPF64[(o>>3)+2];return i.stackRestore(n),[l,_,v]}function Pe(i){i.ccall("duckdb_web_clear_response",null,[],[])}var af=class{constructor(e){let t=new Float64Array(e.buffer,e.byteOffset,e.byteLength/8),r=new Uint8Array(new ArrayBuffer(e.byteLength));r.set(e.subarray(7*8)),this.totalFileReadsCold=t[0],this.totalFileReadsAhead=t[1],this.totalFileReadsCached=t[2],this.totalFileWrites=t[3],this.totalPageAccesses=t[4],this.totalPageLoads=t[5],this.blockSize=t[6],this.blockStats=r}getBlockStats(e,t){return t=t||{file_reads_cold:0,file_reads_ahead:0,file_reads_cached:0,file_writes:0,page_accesses:0,page_loads:0},t.file_writes=this.blockStats[e*3+0]&15,t.file_reads_cold=this.blockStats[e*3+0]>>4,t.file_reads_ahead=this.blockStats[e*3+1]&15,t.file_reads_cached=this.blockStats[e*3+1]>>4,t.page_accesses=this.blockStats[e*3+1]&15,t.page_loads=this.blockStats[e*3+1]>>4,t}};var xV=new TextEncoder;var uf=class{constructor(e,t){this._instance=null;this._initPromise=null;this._initPromiseResolver=()=>{};this._logger=e,this._runtime=t}get logger(){return this._logger}get mod(){return this._instance}get pthread(){return this.mod.PThread||null}async instantiate(){return this._instance!=null?this:(this._initPromise!=null&&await this._initPromise,this._initPromise=new Promise(e=>{this._initPromiseResolver=e}),this._instance=await this.instantiateImpl({print:console.log.bind(console),printErr:console.log.bind(console),onRuntimeInitialized:this._initPromiseResolver}),await this._initPromise,this._initPromise=null,this)}open(e){let[t,r,n]=we(this.mod,"duckdb_web_open",["string"],[JSON.stringify(e)]);if(t!==0)throw new Error(he(this.mod,r,n));Pe(this.mod)}reset(){let[e,t,r]=we(this.mod,"duckdb_web_reset",[],[]);if(e!==0)throw new Error(he(this.mod,t,r));Pe(this.mod)}getVersion(){let[e,t,r]=we(this.mod,"duckdb_web_get_version",[],[]);if(e!==0)throw new Error(he(this.mod,t,r));let n=he(this.mod,t,r);return Pe(this.mod),n}getFeatureFlags(){return this.mod.ccall("duckdb_web_get_feature_flags","number",[],[])}tokenize(e){let[t,r,n]=we(this.mod,"duckdb_web_tokenize",["string"],[e]);if(t!==0)throw new Error(he(this.mod,r,n));let o=he(this.mod,r,n);return Pe(this.mod),JSON.parse(o)}connect(){let e=this.mod.ccall("duckdb_web_connect","number",[],[]);return new sf(this,e)}disconnect(e){this.mod.ccall("duckdb_web_disconnect",null,["number"],[e])}runQuery(e,t){let[r,n,o]=we(this.mod,"duckdb_web_query_run",["number","string"],[e,t]);if(r!==0)throw new Error(he(this.mod,n,o));let l=ss(this.mod,n,o);return Pe(this.mod),l}sendQuery(e,t){let[r,n,o]=we(this.mod,"duckdb_web_query_send",["number","string"],[e,t]);if(r!==0)throw new Error(he(this.mod,n,o));let l=ss(this.mod,n,o);return Pe(this.mod),l}fetchQueryResults(e){let[t,r,n]=we(this.mod,"duckdb_web_query_fetch_results",["number"],[e]);if(t!==0)throw new Error(he(this.mod,r,n));let o=ss(this.mod,r,n);return Pe(this.mod),o}getTableNames(e,t){let[r,n,o]=we(this.mod,"duckdb_web_get_tablenames",["number","string"],[e,t]);if(r!==0)throw new Error(he(this.mod,n,o));let l=he(this.mod,n,o);return Pe(this.mod),JSON.parse(l)}createPrepared(e,t){let[r,n,o]=we(this.mod,"duckdb_web_prepared_create",["number","string"],[e,t]);if(r!==0)throw new Error(he(this.mod,n,o));return Pe(this.mod),n}closePrepared(e,t){let[r,n,o]=we(this.mod,"duckdb_web_prepared_close",["number","number"],[e,t]);if(r!==0)throw new Error(he(this.mod,n,o));Pe(this.mod)}runPrepared(e,t,r){let[n,o,l]=we(this.mod,"duckdb_web_prepared_run",["number","number","string"],[e,t,JSON.stringify(r)]);if(n!==0)throw new Error(he(this.mod,o,l));let _=ss(this.mod,o,l);return Pe(this.mod),_}sendPrepared(e,t,r){let[n,o,l]=we(this.mod,"duckdb_web_prepared_send",["number","number","string"],[e,t,JSON.stringify(r)]);if(n!==0)throw new Error(he(this.mod,o,l));let _=ss(this.mod,o,l);return Pe(this.mod),_}insertArrowFromIPCStream(e,t,r){if(t.length==0)return;let n=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(n,n+t.length).set(t);let l=r?JSON.stringify(r):"",[_,v,T]=we(this.mod,"duckdb_web_insert_arrow_from_ipc_stream",["number","number","number","string"],[e,n,t.length,l]);if(_!==0)throw new Error(he(this.mod,v,T))}insertCSVFromPath(e,t,r){if(r.columns!==void 0){r.columnsFlat=[];for(let T in r.columns)r.columnsFlat.push(to(T,r.columns[T]))}let n=Ar({},r);n.columns=n.columnsFlat,delete n.columnsFlat;let o=JSON.stringify(n),[l,_,v]=we(this.mod,"duckdb_web_insert_csv_from_path",["number","string","string"],[e,t,o]);if(l!==0)throw new Error(he(this.mod,_,v))}insertJSONFromPath(e,t,r){if(r.columns!==void 0){r.columnsFlat=[];for(let T in r.columns)r.columnsFlat.push(to(T,r.columns[T]))}let n=Ar({},r);n.columns=n.columnsFlat,delete n.columnsFlat;let o=JSON.stringify(n),[l,_,v]=we(this.mod,"duckdb_web_insert_json_from_path",["number","string","string"],[e,t,o]);if(l!==0)throw new Error(he(this.mod,_,v))}globFiles(e){let[t,r,n]=we(this.mod,"duckdb_web_fs_glob_file_infos",["string"],[e]);if(t!==0)throw new Error(he(this.mod,r,n));let o=he(this.mod,r,n);Pe(this.mod);let l=JSON.parse(o);return l==null?[]:l}registerFileURL(e,t){t===void 0&&(t=e);let[r,n,o]=we(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[e,t]);if(r!==0)throw new Error(he(this.mod,n,o));Pe(this.mod)}registerFileText(e,t){let r=xV.encode(t);this.registerFileBuffer(e,r)}registerFileBuffer(e,t){let r=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(r,r+t.length).set(t);let[o,l,_]=we(this.mod,"duckdb_web_fs_register_file_buffer",["string","number","number"],[e,r,t.length]);if(o!==0)throw new Error(he(this.mod,l,_));Pe(this.mod)}registerFileHandle(e,t){let[r,n,o]=we(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[e,e]);if(r!==0)throw new Error(he(this.mod,n,o));if(Pe(this.mod),globalThis.DUCKDB_RUNTIME._files=(globalThis.DUCKDB_RUNTIME._files||new Map).set(e,t),this.pthread){for(let l of this.pthread.runningWorkers)l.postMessage({cmd:"registerFileHandle",fileName:e,fileHandle:t});for(let l of this.pthread.unusedWorkers)l.postMessage({cmd:"dropFileHandle",fileName:e})}}dropFile(e){return this.mod.ccall("duckdb_web_fs_drop_file","boolean",["string"],[e])}dropFiles(){let[e,t,r]=we(this.mod,"duckdb_web_fs_drop_files",[],[]);if(e!==0)throw new Error(he(this.mod,t,r));Pe(this.mod)}flushFiles(){this.mod.ccall("duckdb_web_flush_files",null,[],[])}copyFileToPath(e,t){let[r,n,o]=we(this.mod,"duckdb_web_copy_file_to_path",["string","string"],[e,t]);if(r!==0)throw new Error(he(this.mod,n,o));Pe(this.mod)}copyFileToBuffer(e){let[t,r,n]=we(this.mod,"duckdb_web_copy_file_to_buffer",["string"],[e]);if(t!==0)throw new Error(he(this.mod,r,n));let o=this.mod.HEAPU8.subarray(r,r+n),l=new Uint8Array(o.length);return l.set(o),Pe(this.mod),l}collectFileStatistics(e,t){let[r,n,o]=we(this.mod,"duckdb_web_collect_file_stats",["string","boolean"],[e,t]);if(r!==0)throw new Error(he(this.mod,n,o))}exportFileStatistics(e){let[t,r,n]=we(this.mod,"duckdb_web_export_file_stats",["string"],[e]);if(t!==0)throw new Error(he(this.mod,r,n));return new af(this.mod.HEAPU8.subarray(r,r+n))}};var cf=class extends uf{constructor(e,t,r,n){super(e,t);this.mainModuleURL=r,this.pthreadWorkerURL=n}locateFile(e,t){if(e.endsWith(".wasm"))return this.mainModuleURL;if(e.endsWith(".worker.js")){if(!this.pthreadWorkerURL)throw new Error("Missing DuckDB worker URL!");return this.pthreadWorkerURL}throw new Error(`WASM instantiation requested unexpected file: prefix=${t} path=${e}`)}instantiateWasm(e,t){if(globalThis.DUCKDB_RUNTIME=this._runtime,WebAssembly.instantiateStreaming){let r=new Request(this.mainModuleURL);WebAssembly.instantiateStreaming(fetch(r),e).then(n=>{t(n.instance,n.module)})}else{let r=new Request(this.mainModuleURL);fetch(r).then(n=>n.arrayBuffer()).then(n=>WebAssembly.instantiate(n,e).then(o=>{t(o.instance,o.module)})).catch(n=>{console.error("Failed to instantiate WASM:",n)})}return[]}};var lf=class extends cf{constructor(e,t,r,n=null){super(e,t,r,n)}instantiateImpl(e){return B0(vo(Ar({},e),{instantiateWasm:this.instantiateWasm.bind(this),locateFile:this.locateFile.bind(this)}))}};var ht={fileInfoCache:new Map,getFileInfo(i,e){try{let t=ht.fileInfoCache.get(e);if(t)return t;let[r,n,o]=we(i,"duckdb_web_fs_get_file_info_by_id",["number"],[e]);if(r!==0)return null;let l=he(i,n,o);Pe(i);let _=JSON.parse(l);if(_==null)return null;let v=vo(Ar({},_),{blob:null});return ht.fileInfoCache.set(e,v),v}catch(t){return null}},testPlatformFeature:(i,e)=>{switch(e){case 1:return typeof BigInt64Array!="undefined";default:return console.warn(`test for unknown feature: ${e}`),!1}},openFile:(i,e)=>{var t;try{ht.fileInfoCache.delete(e);let r=ht.getFileInfo(i,e);switch(r==null?void 0:r.dataProtocol){case 3:{let n=null;try{let o=new XMLHttpRequest;o.open("HEAD",r.dataUrl,!1),o.setRequestHeader("Range","bytes=0-"),o.send(null);let l=o.getResponseHeader("Content-Length");if(o.status==206&&l!==null){let _=i._malloc(2*8);return i.HEAPF64[(_>>3)+0]=+l,i.HEAPF64[(_>>3)+1]=0,_}}catch(o){n=o,console.warn(`HEAD request with range header failed: ${o}`)}if(r.allowFullHttpReads){console.warn(`falling back to full HTTP read for: ${r.dataUrl}`);let o=new XMLHttpRequest;if(o.open("GET",r.dataUrl,!1),o.responseType="arraybuffer",o.send(null),o.status==200){let l=i._malloc(o.response.byteLength),_=new Uint8Array(o.response,0,o.response.byteLength);i.HEAPU8.set(_,l);let v=i._malloc(2*8);return i.HEAPF64[(v>>3)+0]=o.response.byteLength,i.HEAPF64[(v>>3)+1]=l,v}}if(n!=null)throw new Error(`Reading file ${r.fileName} failed with error: ${n}`);return 0}case 1:{let n=(t=ht._files)==null?void 0:t.get(r.fileName);if(n){let _=i._malloc(2*8);return i.HEAPF64[(_>>3)+0]=n.size,i.HEAPF64[(_>>3)+1]=0,_}console.warn(`Buffering missing file: ${r.fileName}`);let o=i._malloc(2*8),l=i._malloc(1);return i.HEAPF64[(o>>3)+0]=1,i.HEAPF64[(o>>3)+1]=l,o}}}catch(r){console.error(r.toString()),Pi(i,r.toString())}return 0},glob:(i,e,t)=>{try{let r=he(i,e,t);if(r.startsWith("http")){let n=new XMLHttpRequest;if(n.open("HEAD",r,!1),n.send(null),n.status!=200&&n.status!==206){Pi(i,`HEAD request failed: ${r}`);return}i.ccall("duckdb_web_fs_glob_add_path",null,["string"],[r])}}catch(r){return Pi(i,r.toString()),0}},checkFile:(i,e,t)=>{try{let r=he(i,e,t);if(r.startsWith("http")){let n=new XMLHttpRequest;n.open("HEAD",r,!1),n.setRequestHeader("Range","bytes=0-"),n.send(null);let o=!1;if(n.status==206)o=!0;else if(n.status==200)o=n.getResponseHeader("Accept-Ranges")==="bytes";else return!1;return!!o}}catch(r){return!1}return!1},syncFile:(i,e)=>{},closeFile:(i,e)=>{let t=ht.getFileInfo(i,e);switch(ht.fileInfoCache.delete(e),t==null?void 0:t.dataProtocol){case 3:break;case 1:return}},truncateFile:(i,e,t)=>{let r=ht.getFileInfo(i,e);switch(r==null?void 0:r.dataProtocol){case 3:Pi(i,"Cannot truncate a http file");return;case 1:Pi(i,"truncateFile not implemented");return}return 0},readFile(i,e,t,r,n){var o;try{let l=ht.getFileInfo(i,e);switch(l==null?void 0:l.dataProtocol){case 3:{if(!l.dataUrl)throw new Error(`Missing data URL for file ${e}`);try{let _=new XMLHttpRequest;if(_.open("GET",l.dataUrl,!1),_.responseType="arraybuffer",_.setRequestHeader("Range",`bytes=${n}-${n+r-1}`),_.send(null),_.status==206||_.status==200&&r==_.response.byteLength&&n==0){let v=new Uint8Array(_.response,0,Math.min(_.response.byteLength,r));return i.HEAPU8.set(v,t),v.byteLength}else throw _.status==200?new Error(`Range request for ${l.dataUrl} did not return a partial response: ${_.status} "${_.statusText}"`):new Error(`Range request for ${l.dataUrl} did returned non-success status: ${_.status} "${_.statusText}"`)}catch(_){throw new Error(`Range request for ${l.dataUrl} failed with error: ${_}"`)}}case 1:{let _=(o=ht._files)==null?void 0:o.get(l.fileName);if(!_)throw new Error(`No handle available for file: ${l.fileName}`);let v=_.slice(n,n+r),T=new Uint8Array(new FileReaderSync().readAsArrayBuffer(v));return i.HEAPU8.set(T,t),T.byteLength}}return 0}catch(l){return Pi(i,l.toString()),0}},writeFile:(i,e,t,r,n)=>{let o=ht.getFileInfo(i,e);switch(o==null?void 0:o.dataProtocol){case 3:return Pi(i,"Cannot write to HTTP file"),0;case 1:return Pi(i,"writefile not implemented"),0}return 0},getLastFileModificationTime:(i,e)=>{var r;let t=ht.getFileInfo(i,e);switch(t==null?void 0:t.dataProtocol){case 1:{if(!((r=ht._files)==null?void 0:r.get(t.fileName)))throw Error(`No handle available for file: ${t.fileName}`);return 0}case 3:return new Date().getTime()}return 0},checkDirectory:(i,e,t)=>{let r=he(i,e,t);return console.log(`checkDirectory: ${r}`),!1},createDirectory:(i,e,t)=>{let r=he(i,e,t);console.log(`createDirectory: ${r}`)},removeDirectory:(i,e,t)=>{let r=he(i,e,t);console.log(`removeDirectory: ${r}`)},listDirectoryEntries:(i,e,t)=>{let r=he(i,e,t);return console.log(`listDirectoryEntries: ${r}`),!1},moveFile:(i,e,t,r,n)=>{},removeFile:(i,e,t)=>{}};var S0=class extends rf{postMessage(e,t){globalThis.postMessage(e,t)}async instantiate(e,t){return await new lf(this,ht,e,t).instantiate()}};function A0(){let i=new S0;globalThis.onmessage=async e=>{await i.onMessage(e.data)}}A0();return QS(qV);})();
19
19
  /*! *****************************************************************************
20
20
  Copyright (c) Microsoft Corporation.
21
21