@duckdb/duckdb-wasm 1.13.1-dev161.0 → 1.13.1-dev166.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,7 +14,7 @@ return true;`)}Nu.createIsValidFunction=hD;function pD(r){return typeof r!="bigi
14
14
  `:`,
15
15
  `),this._write(`${rk(this._recordBatches[e])}`),this._recordBatchBlocks.push(new ao.FileBlock(0,0,0));this._write(`
16
16
  ]`)}return this._schema&&this._write(`
17
- }`),this._dictionaries=[],this._recordBatches=[],super.close()}};ai.RecordBatchJSONWriter=Uc;function cp(r,e){let t=e;e instanceof ap.Table&&(t=e.chunks,r.reset(void 0,e.schema));for(let i of t)r.write(i);return r.finish()}function lp(r,e){var t,i,n,s;return kw.__awaiter(this,void 0,void 0,function*(){try{for(t=kw.__asyncValues(e);i=yield t.next(),!i.done;){let u=i.value;r.write(u)}}catch(u){n={error:u}}finally{try{i&&!i.done&&(s=t.return)&&(yield s.call(t))}finally{if(n)throw n.error}}return r.finish()})}function Ew({name:r,type:e,nullable:t}){let i=new Z2.JSONTypeAssembler;return{name:r,nullable:t,type:i.visit(e),children:(e.children||[]).map(Ew),dictionary:J2.DataType.isDictionary(e)?{id:e.id,isOrdered:e.isOrdered,indexType:i.visit(e.indices)}:void 0}}function tk(r,e,t=!1){let i=new X2.Field(`${e}`,r.type,r.nullCount>0),n=Uw.JSONVectorAssembler.assemble(new K2.Column(i,[r]));return JSON.stringify({id:e,isDelta:t,data:{count:r.length,columns:n}},null,2)}function rk(r){return JSON.stringify({count:r.length,columns:Uw.JSONVectorAssembler.assemble(r)},null,2)}});var hp=V(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.distributeVectorsIntoRecordBatches=ln.distributeColumnsIntoRecordBatches=ln.ensureSameLengthData=void 0;var Rw=Mr(),fp=St(),ik=sn(),nk=Ai(),dp=new Uint8Array(0),xw=r=>[dp,dp,new Uint8Array(r),dp];function sk(r,e,t=e.reduce((i,n)=>Math.max(i,n.length),0)){let i,n,s=-1,u=e.length,p=[...r.fields],m=[],B=(t+63&-64)>>3;for(;++s<u;)(i=e[s])&&i.length===t?m[s]=i:((n=p[s]).nullable||(p[s]=p[s].clone({nullable:!0})),m[s]=i?i._changeLengthAndBackfillNullBitmap(t):Rw.Data.new(n.type,0,t,t,xw(B)));return[new fp.Schema(p),t,m]}ln.ensureSameLengthData=sk;function ok(r){return Vw(new fp.Schema(r.map(({field:e})=>e)),r)}ln.distributeColumnsIntoRecordBatches=ok;function Vw(r,e){return ak(r,e.map(t=>t instanceof ik.Chunked?t.chunks.map(i=>i.data):[t.data]))}ln.distributeVectorsIntoRecordBatches=Vw;function ak(r,e){let t=[...r.fields],i=[],n={numBatches:e.reduce((R,W)=>Math.max(R,W.length),0)},s=0,u=0,p=-1,m=e.length,B,O=[];for(;n.numBatches-- >0;){for(u=Number.POSITIVE_INFINITY,p=-1;++p<m;)O[p]=B=e[p].shift(),u=Math.min(u,B?B.length:u);isFinite(u)&&(O=uk(t,u,O,e,n),u>0&&(i[s++]=[u,O.slice()]))}return[r=new fp.Schema(t,r.metadata),i.map(R=>new nk.RecordBatch(r,...R))]}function uk(r,e,t,i,n){let s,u,p=0,m=-1,B=i.length,O=(e+63&-64)>>3;for(;++m<B;)(s=t[m])&&(p=s.length)>=e?p===e?t[m]=s:(t[m]=s.slice(0,e),s=s.slice(e,p-e),n.numBatches=Math.max(n.numBatches,i[m].unshift(s))):((u=r[m]).nullable||(r[m]=u.clone({nullable:!0})),t[m]=s?s._changeLengthAndBackfillNullBitmap(e):Rw.Data.new(u.type,0,e,e,xw(O)));return t}});var ft=V(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});Rc.BaseVector=void 0;var ck=$e(),lk=sn(),dk=_a(),pp=lt(),_p=class extends pp.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`${ck.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 pp.Vector.new(e,t)}concat(...e){return lk.Chunked.concat(this,...e)}slice(e,t){return dk.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]=pp.Vector.new(this.data.childData[e]))}toJSON(){return[...this]}_sliceInternal(e,t,i){return e.clone(e.data.slice(t,i-t),null)}_bindDataAccessors(e){}};Rc.BaseVector=_p;_p.prototype[Symbol.isConcatSpreadable]=!0});var yp=V(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});xc.BinaryVector=void 0;var fk=lt(),hk=ft(),pk=Pe(),Nw=class extends hk.BaseVector{asUtf8(){return fk.Vector.new(this.data.clone(new pk.Utf8))}};xc.BinaryVector=Nw});var mp=V(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});Vc.BoolVector=void 0;var _k=Pe(),yk=ft(),mk=ui(),Pw=class extends yk.BaseVector{static from(e){return mk.vectorFromValuesWithType(()=>new _k.Bool,e)}};Vc.BoolVector=Pw});var gp=V(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.DateMillisecondVector=dn.DateDayVector=dn.DateVector=void 0;var bk=$e(),gk=ft(),Lw=ui(),bp=Pe(),Nc=class extends gk.BaseVector{static from(...e){return e.length===2?Lw.vectorFromValuesWithType(()=>e[1]===bk.DateUnit.DAY?new bp.DateDay:new bp.DateMillisecond,e[0]):Lw.vectorFromValuesWithType(()=>new bp.DateMillisecond,e[0])}};dn.DateVector=Nc;var qw=class extends Nc{};dn.DateDayVector=qw;var Hw=class extends Nc{};dn.DateMillisecondVector=Hw});var vp=V(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});Pc.DecimalVector=void 0;var vk=ft(),zw=class extends vk.BaseVector{};Pc.DecimalVector=zw});var qc=V(Lc=>{"use strict";Object.defineProperty(Lc,"__esModule",{value:!0});Lc.DictionaryVector=void 0;var wk=Mr(),Ww=lt(),jk=ft(),Bk=ui(),Tk=Pe(),wp=class extends jk.BaseVector{constructor(e){super(e);this.indices=Ww.Vector.new(e.clone(this.type.indices))}static from(...e){if(e.length===3){let[t,i,n]=e,s=new Tk.Dictionary(t.type,i,null,null);return Ww.Vector.new(wk.Data.Dictionary(s,0,n.length,0,null,n,t))}return Bk.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)}};Lc.DictionaryVector=wp;wp.prototype.indices=null});var jp=V(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});Hc.FixedSizeBinaryVector=void 0;var Sk=ft(),Yw=class extends Sk.BaseVector{};Hc.FixedSizeBinaryVector=Yw});var Bp=V(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});zc.FixedSizeListVector=void 0;var Ik=ft(),Gw=class extends Ik.BaseVector{};zc.FixedSizeListVector=Gw});var Ap=V(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.Float64Vector=ci.Float32Vector=ci.Float16Vector=ci.FloatVector=void 0;var Ak=Mr(),Dk=lt(),Fk=ft(),Ok=ui(),is=Pe(),Ta=class extends Fk.BaseVector{static from(e){let t=Mk(this);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)){let i=Ck(e.constructor)||t;if(t===null&&(t=i),t&&t===i){let n=new t,s=e.byteLength/n.ArrayType.BYTES_PER_ELEMENT;if(!kk(t,e.constructor))return Dk.Vector.new(Ak.Data.Float(n,0,s,0,null,e))}}if(t)return Ok.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")}};ci.FloatVector=Ta;var Tp=class extends Ta{toFloat32Array(){return new Float32Array(this)}toFloat64Array(){return new Float64Array(this)}};ci.Float16Vector=Tp;var Sp=class extends Ta{};ci.Float32Vector=Sp;var Ip=class extends Ta{};ci.Float64Vector=Ip;var kk=(r,e)=>r===is.Float16&&e!==Uint16Array,Ck=r=>{switch(r){case Uint16Array:return is.Float16;case Float32Array:return is.Float32;case Float64Array:return is.Float64;default:return null}},Mk=r=>{switch(r){case Tp:return is.Float16;case Sp:return is.Float32;case Ip:return is.Float64;default:return null}}});var Dp=V(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.IntervalYearMonthVector=fn.IntervalDayTimeVector=fn.IntervalVector=void 0;var Uk=ft(),Wc=class extends Uk.BaseVector{};fn.IntervalVector=Wc;var $w=class extends Wc{};fn.IntervalDayTimeVector=$w;var Kw=class extends Wc{};fn.IntervalYearMonthVector=Kw});var Yc=V(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.Uint64Vector=bt.Uint32Vector=bt.Uint16Vector=bt.Uint8Vector=bt.Int64Vector=bt.Int32Vector=bt.Int16Vector=bt.Int8Vector=bt.IntVector=void 0;var Ek=Mr(),Rk=lt(),xk=ft(),Vk=ui(),Jw=Rt(),Xw=gt(),ut=Pe(),li=class extends xk.BaseVector{static from(...e){let[t,i=!1]=e,n=Lk(this,i);if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)){let s=Pk(t.constructor,i)||n;if(n===null&&(n=s),n&&n===s){let u=new n,p=t.byteLength/u.ArrayType.BYTES_PER_ELEMENT;return Nk(n,t.constructor)&&(p*=.5),Rk.Vector.new(Ek.Data.Int(u,0,p,0,null,t))}}if(n)return Vk.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")}};bt.IntVector=li;var Fp=class extends li{};bt.Int8Vector=Fp;var Op=class extends li{};bt.Int16Vector=Op;var kp=class extends li{};bt.Int32Vector=kp;var Cp=class extends li{toBigInt64Array(){return Xw.toBigInt64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigInt64Array())}};bt.Int64Vector=Cp;var Mp=class extends li{};bt.Uint8Vector=Mp;var Up=class extends li{};bt.Uint16Vector=Up;var Ep=class extends li{};bt.Uint32Vector=Ep;var Rp=class extends li{toBigUint64Array(){return Xw.toBigUint64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigUint64Array())}};bt.Uint64Vector=Rp;var Nk=(r,e)=>(r===ut.Int64||r===ut.Uint64)&&(e===Int32Array||e===Uint32Array),Pk=(r,e)=>{switch(r){case Int8Array:return ut.Int8;case Int16Array:return ut.Int16;case Int32Array:return e?ut.Int64:ut.Int32;case Jw.BigInt64Array:return ut.Int64;case Uint8Array:return ut.Uint8;case Uint16Array:return ut.Uint16;case Uint32Array:return e?ut.Uint64:ut.Uint32;case Jw.BigUint64Array:return ut.Uint64;default:return null}},Lk=(r,e)=>{switch(r){case Fp:return ut.Int8;case Op:return ut.Int16;case kp:return e?ut.Int64:ut.Int32;case Cp:return ut.Int64;case Mp:return ut.Uint8;case Up:return ut.Uint16;case Ep:return e?ut.Uint64:ut.Uint32;case Rp:return ut.Uint64;default:return null}}});var xp=V(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});Gc.ListVector=void 0;var qk=ft(),Zw=class extends qk.BaseVector{};Gc.ListVector=Zw});var Vp=V($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});$c.MapVector=void 0;var Hk=ha(),zk=lt(),Wk=ft(),Yk=Pe(),Qw=class extends Wk.BaseVector{asList(){let e=this.type.children[0];return zk.Vector.new(this.data.clone(new Yk.List(e)))}bind(e){let t=this.getChildAt(0),{[e]:i,[e+1]:n}=this.valueOffsets;return new Hk.MapRow(t.slice(i,n))}};$c.MapVector=Qw});var Np=V(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});Kc.NullVector=void 0;var Gk=ft(),ej=class extends Gk.BaseVector{};Kc.NullVector=ej});var Pp=V(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});Jc.StructVector=void 0;var $k=ha(),Kk=ft(),Jk=Symbol.for("rowIndex"),tj=class extends Kk.BaseVector{bind(e){let t=this._row||(this._row=new $k.StructRow(this)),i=Object.create(t);return i[Jk]=e,i}};Jc.StructVector=tj});var Lp=V(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.TimestampNanosecondVector=gr.TimestampMicrosecondVector=gr.TimestampMillisecondVector=gr.TimestampSecondVector=gr.TimestampVector=void 0;var Xk=ft(),uo=class extends Xk.BaseVector{};gr.TimestampVector=uo;var rj=class extends uo{};gr.TimestampSecondVector=rj;var ij=class extends uo{};gr.TimestampMillisecondVector=ij;var nj=class extends uo{};gr.TimestampMicrosecondVector=nj;var sj=class extends uo{};gr.TimestampNanosecondVector=sj});var qp=V(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.TimeNanosecondVector=vr.TimeMicrosecondVector=vr.TimeMillisecondVector=vr.TimeSecondVector=vr.TimeVector=void 0;var Zk=ft(),co=class extends Zk.BaseVector{};vr.TimeVector=co;var oj=class extends co{};vr.TimeSecondVector=oj;var aj=class extends co{};vr.TimeMillisecondVector=aj;var uj=class extends co{};vr.TimeMicrosecondVector=uj;var cj=class extends co{};vr.TimeNanosecondVector=cj});var Hp=V(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.SparseUnionVector=hn.DenseUnionVector=hn.UnionVector=void 0;var Qk=ft(),Xc=class extends Qk.BaseVector{get typeIdToChildIndex(){return this.data.type.typeIdToChildIndex}};hn.UnionVector=Xc;var lj=class extends Xc{get valueOffsets(){return this.data.valueOffsets}};hn.DenseUnionVector=lj;var dj=class extends Xc{};hn.SparseUnionVector=dj});var zp=V(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});Zc.Utf8Vector=void 0;var eC=lt(),tC=ft(),fj=Pe(),rC=ui(),hj=class extends tC.BaseVector{static from(e){return rC.vectorFromValuesWithType(()=>new fj.Utf8,e)}asBinary(){return eC.Vector.new(this.data.clone(new fj.Binary))}};Zc.Utf8Vector=hj});var pj=V(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.partial2=pn.partial1=pn.partial0=void 0;function iC(r){return function(){return r(this)}}pn.partial0=iC;function nC(r){return function(e){return r(this,e)}}pn.partial1=nC;function sC(r){return function(e,t){return r(this,e,t)}}pn.partial2=sC});var Gp=V(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.instance=lo.GetVisitor=void 0;var Qc=aa(),oC=Ot(),aC=Rn(),uC=ia(),wr=$e(),de=class extends oC.Visitor{};lo.GetVisitor=de;var cC=(r,e)=>864e5*r[e],Wp=(r,e)=>4294967296*r[e+1]+(r[e]>>>0),lC=(r,e)=>4294967296*(r[e+1]/1e3)+(r[e]>>>0)/1e3,dC=(r,e)=>4294967296*(r[e+1]/1e6)+(r[e]>>>0)/1e6,_j=r=>new Date(r),fC=(r,e)=>_j(cC(r,e)),hC=(r,e)=>_j(Wp(r,e)),pC=(r,e)=>null,yj=(r,e,t)=>{let{[t]:i,[t+1]:n}=e;return i!=null&&n!=null?r.subarray(i,n):null},_C=({offset:r,values:e},t)=>{let i=r+t;return(e[i>>3]&1<<i%8)!==0},mj=({values:r},e)=>fC(r,e),bj=({values:r},e)=>hC(r,e*2),di=({stride:r,values:e},t)=>e[r*t],gj=({stride:r,values:e},t)=>uC.uint16ToFloat64(e[r*t]),Yp=({stride:r,values:e,type:t},i)=>Qc.BN.new(e.subarray(r*i,r*(i+1)),t.isSigned),yC=({stride:r,values:e},t)=>e.subarray(r*t,r*(t+1)),mC=({values:r,valueOffsets:e},t)=>yj(r,e,t),bC=({values:r,valueOffsets:e},t)=>{let i=yj(r,e,t);return i!==null?aC.decodeUtf8(i):null},gC=(r,e)=>r.type.bitWidth<64?di(r,e):Yp(r,e),vC=(r,e)=>r.type.precision!==wr.Precision.HALF?di(r,e):gj(r,e),wC=(r,e)=>r.type.unit===wr.DateUnit.DAY?mj(r,e):bj(r,e),vj=({values:r},e)=>1e3*Wp(r,e*2),wj=({values:r},e)=>Wp(r,e*2),jj=({values:r},e)=>lC(r,e*2),Bj=({values:r},e)=>dC(r,e*2),jC=(r,e)=>{switch(r.type.unit){case wr.TimeUnit.SECOND:return vj(r,e);case wr.TimeUnit.MILLISECOND:return wj(r,e);case wr.TimeUnit.MICROSECOND:return jj(r,e);case wr.TimeUnit.NANOSECOND:return Bj(r,e)}},Tj=({values:r,stride:e},t)=>r[e*t],Sj=({values:r,stride:e},t)=>r[e*t],Ij=({values:r},e)=>Qc.BN.signed(r.subarray(2*e,2*(e+1))),Aj=({values:r},e)=>Qc.BN.signed(r.subarray(2*e,2*(e+1))),BC=(r,e)=>{switch(r.type.unit){case wr.TimeUnit.SECOND:return Tj(r,e);case wr.TimeUnit.MILLISECOND:return Sj(r,e);case wr.TimeUnit.MICROSECOND:return Ij(r,e);case wr.TimeUnit.NANOSECOND:return Aj(r,e)}},TC=({values:r},e)=>Qc.BN.decimal(r.subarray(4*e,4*(e+1))),SC=(r,e)=>{let t=r.getChildAt(0),{valueOffsets:i,stride:n}=r;return t.slice(i[e*n],i[e*n+1])},IC=(r,e)=>r.bind(e),AC=(r,e)=>r.bind(e),DC=(r,e)=>r.type.mode===wr.UnionMode.Dense?Dj(r,e):Fj(r,e),Dj=(r,e)=>{let t=r.typeIdToChildIndex[r.typeIds[e]],i=r.getChildAt(t);return i?i.get(r.valueOffsets[e]):null},Fj=(r,e)=>{let t=r.typeIdToChildIndex[r.typeIds[e]],i=r.getChildAt(t);return i?i.get(e):null},FC=(r,e)=>r.getValue(r.getKey(e)),OC=(r,e)=>r.type.unit===wr.IntervalUnit.DAY_TIME?Oj(r,e):kj(r,e),Oj=({values:r},e)=>r.subarray(2*e,2*(e+1)),kj=({values:r},e)=>{let t=r[e],i=new Int32Array(2);return i[0]=t/12|0,i[1]=t%12|0,i},kC=(r,e)=>{let t=r.getChildAt(0),{stride:i}=r;return t.slice(e*i,(e+1)*i)};de.prototype.visitNull=pC;de.prototype.visitBool=_C;de.prototype.visitInt=gC;de.prototype.visitInt8=di;de.prototype.visitInt16=di;de.prototype.visitInt32=di;de.prototype.visitInt64=Yp;de.prototype.visitUint8=di;de.prototype.visitUint16=di;de.prototype.visitUint32=di;de.prototype.visitUint64=Yp;de.prototype.visitFloat=vC;de.prototype.visitFloat16=gj;de.prototype.visitFloat32=di;de.prototype.visitFloat64=di;de.prototype.visitUtf8=bC;de.prototype.visitBinary=mC;de.prototype.visitFixedSizeBinary=yC;de.prototype.visitDate=wC;de.prototype.visitDateDay=mj;de.prototype.visitDateMillisecond=bj;de.prototype.visitTimestamp=jC;de.prototype.visitTimestampSecond=vj;de.prototype.visitTimestampMillisecond=wj;de.prototype.visitTimestampMicrosecond=jj;de.prototype.visitTimestampNanosecond=Bj;de.prototype.visitTime=BC;de.prototype.visitTimeSecond=Tj;de.prototype.visitTimeMillisecond=Sj;de.prototype.visitTimeMicrosecond=Ij;de.prototype.visitTimeNanosecond=Aj;de.prototype.visitDecimal=TC;de.prototype.visitList=SC;de.prototype.visitStruct=AC;de.prototype.visitUnion=DC;de.prototype.visitDenseUnion=Dj;de.prototype.visitSparseUnion=Fj;de.prototype.visitDictionary=FC;de.prototype.visitInterval=OC;de.prototype.visitIntervalDayTime=Oj;de.prototype.visitIntervalYearMonth=kj;de.prototype.visitFixedSizeList=kC;de.prototype.visitMap=IC;lo.instance=new de});var Ej=V(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.instance=fo.IndexOfVisitor=void 0;var CC=Ot(),Cj=Xr(),Mj=_a(),fe=class extends CC.Visitor{};fo.IndexOfVisitor=fe;function MC(r,e){return e===null&&r.length>0?0:-1}function UC(r,e){let{nullBitmap:t}=r.data;if(!t||r.nullCount<=0)return-1;let i=0;for(let n of new Cj.BitIterator(t,r.data.offset+(e||0),r.length,t,Cj.getBool)){if(!n)return i;++i}return-1}function Ie(r,e,t){if(e===void 0)return-1;if(e===null)return UC(r,t);let i=Mj.createElementComparator(e);for(let n=(t||0)-1,s=r.length;++n<s;)if(i(r.get(n)))return n;return-1}function Uj(r,e,t){let i=Mj.createElementComparator(e);for(let n=(t||0)-1,s=r.length;++n<s;)if(i(r.get(n)))return n;return-1}fe.prototype.visitNull=MC;fe.prototype.visitBool=Ie;fe.prototype.visitInt=Ie;fe.prototype.visitInt8=Ie;fe.prototype.visitInt16=Ie;fe.prototype.visitInt32=Ie;fe.prototype.visitInt64=Ie;fe.prototype.visitUint8=Ie;fe.prototype.visitUint16=Ie;fe.prototype.visitUint32=Ie;fe.prototype.visitUint64=Ie;fe.prototype.visitFloat=Ie;fe.prototype.visitFloat16=Ie;fe.prototype.visitFloat32=Ie;fe.prototype.visitFloat64=Ie;fe.prototype.visitUtf8=Ie;fe.prototype.visitBinary=Ie;fe.prototype.visitFixedSizeBinary=Ie;fe.prototype.visitDate=Ie;fe.prototype.visitDateDay=Ie;fe.prototype.visitDateMillisecond=Ie;fe.prototype.visitTimestamp=Ie;fe.prototype.visitTimestampSecond=Ie;fe.prototype.visitTimestampMillisecond=Ie;fe.prototype.visitTimestampMicrosecond=Ie;fe.prototype.visitTimestampNanosecond=Ie;fe.prototype.visitTime=Ie;fe.prototype.visitTimeSecond=Ie;fe.prototype.visitTimeMillisecond=Ie;fe.prototype.visitTimeMicrosecond=Ie;fe.prototype.visitTimeNanosecond=Ie;fe.prototype.visitDecimal=Ie;fe.prototype.visitList=Ie;fe.prototype.visitStruct=Ie;fe.prototype.visitUnion=Ie;fe.prototype.visitDenseUnion=Uj;fe.prototype.visitSparseUnion=Uj;fe.prototype.visitDictionary=Ie;fe.prototype.visitInterval=Ie;fe.prototype.visitIntervalDayTime=Ie;fe.prototype.visitIntervalYearMonth=Ie;fe.prototype.visitFixedSizeList=Ie;fe.prototype.visitMap=Ie;fo.instance=new fe});var $p=V(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.instance=ho.IteratorVisitor=void 0;var el=$e(),EC=Ot(),RC=Xr(),Rj=Gp(),he=class extends EC.Visitor{};ho.IteratorVisitor=he;function xC(r){let e=Rj.instance.getVisitFn(r);return new RC.BitIterator(r.data.nullBitmap,r.data.offset,r.length,r,(t,i,n,s)=>(n&1<<s)!==0?e(t,i):null)}var xj=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 Be(r){if(r.nullCount>0)return xC(r);let{type:e,typeId:t,length:i}=r;return r.stride===1&&(t===el.Type.Timestamp||t===el.Type.Int&&e.bitWidth!==64||t===el.Type.Time&&e.bitWidth!==64||t===el.Type.Float&&e.precision>0)?r.data.values.subarray(0,i)[Symbol.iterator]():new xj(r,Rj.instance.getVisitFn(r))}he.prototype.visitNull=Be;he.prototype.visitBool=Be;he.prototype.visitInt=Be;he.prototype.visitInt8=Be;he.prototype.visitInt16=Be;he.prototype.visitInt32=Be;he.prototype.visitInt64=Be;he.prototype.visitUint8=Be;he.prototype.visitUint16=Be;he.prototype.visitUint32=Be;he.prototype.visitUint64=Be;he.prototype.visitFloat=Be;he.prototype.visitFloat16=Be;he.prototype.visitFloat32=Be;he.prototype.visitFloat64=Be;he.prototype.visitUtf8=Be;he.prototype.visitBinary=Be;he.prototype.visitFixedSizeBinary=Be;he.prototype.visitDate=Be;he.prototype.visitDateDay=Be;he.prototype.visitDateMillisecond=Be;he.prototype.visitTimestamp=Be;he.prototype.visitTimestampSecond=Be;he.prototype.visitTimestampMillisecond=Be;he.prototype.visitTimestampMicrosecond=Be;he.prototype.visitTimestampNanosecond=Be;he.prototype.visitTime=Be;he.prototype.visitTimeSecond=Be;he.prototype.visitTimeMillisecond=Be;he.prototype.visitTimeMicrosecond=Be;he.prototype.visitTimeNanosecond=Be;he.prototype.visitDecimal=Be;he.prototype.visitList=Be;he.prototype.visitStruct=Be;he.prototype.visitUnion=Be;he.prototype.visitDenseUnion=Be;he.prototype.visitSparseUnion=Be;he.prototype.visitDictionary=Be;he.prototype.visitInterval=Be;he.prototype.visitIntervalDayTime=Be;he.prototype.visitIntervalYearMonth=Be;he.prototype.visitFixedSizeList=Be;he.prototype.visitMap=Be;ho.instance=new he});var Vj=V(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.instance=po.ToArrayVisitor=void 0;var Sa=$e(),VC=Ot(),NC=$p(),pe=class extends VC.Visitor{};po.ToArrayVisitor=pe;function Te(r){let{type:e,length:t,stride:i}=r;switch(e.typeId){case Sa.Type.Int:case Sa.Type.Float:case Sa.Type.Decimal:case Sa.Type.Time:case Sa.Type.Timestamp:return r.data.values.subarray(0,t*i)}return[...NC.instance.visit(r)]}pe.prototype.visitNull=Te;pe.prototype.visitBool=Te;pe.prototype.visitInt=Te;pe.prototype.visitInt8=Te;pe.prototype.visitInt16=Te;pe.prototype.visitInt32=Te;pe.prototype.visitInt64=Te;pe.prototype.visitUint8=Te;pe.prototype.visitUint16=Te;pe.prototype.visitUint32=Te;pe.prototype.visitUint64=Te;pe.prototype.visitFloat=Te;pe.prototype.visitFloat16=Te;pe.prototype.visitFloat32=Te;pe.prototype.visitFloat64=Te;pe.prototype.visitUtf8=Te;pe.prototype.visitBinary=Te;pe.prototype.visitFixedSizeBinary=Te;pe.prototype.visitDate=Te;pe.prototype.visitDateDay=Te;pe.prototype.visitDateMillisecond=Te;pe.prototype.visitTimestamp=Te;pe.prototype.visitTimestampSecond=Te;pe.prototype.visitTimestampMillisecond=Te;pe.prototype.visitTimestampMicrosecond=Te;pe.prototype.visitTimestampNanosecond=Te;pe.prototype.visitTime=Te;pe.prototype.visitTimeSecond=Te;pe.prototype.visitTimeMillisecond=Te;pe.prototype.visitTimeMicrosecond=Te;pe.prototype.visitTimeNanosecond=Te;pe.prototype.visitDecimal=Te;pe.prototype.visitList=Te;pe.prototype.visitStruct=Te;pe.prototype.visitUnion=Te;pe.prototype.visitDenseUnion=Te;pe.prototype.visitSparseUnion=Te;pe.prototype.visitDictionary=Te;pe.prototype.visitInterval=Te;pe.prototype.visitIntervalDayTime=Te;pe.prototype.visitIntervalYearMonth=Te;pe.prototype.visitFixedSizeList=Te;pe.prototype.visitMap=Te;po.instance=new pe});var Nj=V(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.instance=_o.ByteWidthVisitor=void 0;var PC=Ot(),LC=$e(),Ia=(r,e)=>r+e,Kp=r=>`Cannot compute the byte width of variable-width column ${r}`,Jp=class extends PC.Visitor{visitNull(e){return 0}visitInt(e){return e.bitWidth/8}visitFloat(e){return e.ArrayType.BYTES_PER_ELEMENT}visitBinary(e){throw new Error(Kp(e))}visitUtf8(e){throw new Error(Kp(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===LC.TimeUnit.SECOND?4:8}visitInterval(e){return(e.unit+1)*4}visitList(e){throw new Error(Kp(e))}visitStruct(e){return this.visitFields(e.children).reduce(Ia,0)}visitUnion(e){return this.visitFields(e.children).reduce(Ia,0)}visitFixedSizeBinary(e){return e.byteWidth}visitFixedSizeList(e){return e.listSize*this.visitFields(e.children).reduce(Ia,0)}visitMap(e){return this.visitFields(e.children).reduce(Ia,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(Ia,0)}};_o.ByteWidthVisitor=Jp;_o.instance=new Jp});var Pj=V(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.instance=yo.GetVectorConstructor=void 0;var qC=Ot(),HC=yp(),zC=mp(),Xp=gp(),WC=vp(),YC=qc(),GC=jp(),$C=Bp(),tl=Ap(),Zp=Dp(),Di=Yc(),KC=xp(),JC=Vp(),XC=Np(),ZC=Pp(),Aa=Lp(),Da=qp(),Qp=Hp(),QC=zp(),e_=class extends qC.Visitor{visitNull(){return XC.NullVector}visitBool(){return zC.BoolVector}visitInt(){return Di.IntVector}visitInt8(){return Di.Int8Vector}visitInt16(){return Di.Int16Vector}visitInt32(){return Di.Int32Vector}visitInt64(){return Di.Int64Vector}visitUint8(){return Di.Uint8Vector}visitUint16(){return Di.Uint16Vector}visitUint32(){return Di.Uint32Vector}visitUint64(){return Di.Uint64Vector}visitFloat(){return tl.FloatVector}visitFloat16(){return tl.Float16Vector}visitFloat32(){return tl.Float32Vector}visitFloat64(){return tl.Float64Vector}visitUtf8(){return QC.Utf8Vector}visitBinary(){return HC.BinaryVector}visitFixedSizeBinary(){return GC.FixedSizeBinaryVector}visitDate(){return Xp.DateVector}visitDateDay(){return Xp.DateDayVector}visitDateMillisecond(){return Xp.DateMillisecondVector}visitTimestamp(){return Aa.TimestampVector}visitTimestampSecond(){return Aa.TimestampSecondVector}visitTimestampMillisecond(){return Aa.TimestampMillisecondVector}visitTimestampMicrosecond(){return Aa.TimestampMicrosecondVector}visitTimestampNanosecond(){return Aa.TimestampNanosecondVector}visitTime(){return Da.TimeVector}visitTimeSecond(){return Da.TimeSecondVector}visitTimeMillisecond(){return Da.TimeMillisecondVector}visitTimeMicrosecond(){return Da.TimeMicrosecondVector}visitTimeNanosecond(){return Da.TimeNanosecondVector}visitDecimal(){return WC.DecimalVector}visitList(){return KC.ListVector}visitStruct(){return ZC.StructVector}visitUnion(){return Qp.UnionVector}visitDenseUnion(){return Qp.DenseUnionVector}visitSparseUnion(){return Qp.SparseUnionVector}visitDictionary(){return YC.DictionaryVector}visitInterval(){return Zp.IntervalVector}visitIntervalDayTime(){return Zp.IntervalDayTimeVector}visitIntervalYearMonth(){return Zp.IntervalYearMonthVector}visitFixedSizeList(){return $C.FixedSizeListVector}visitMap(){return JC.MapVector}};yo.GetVectorConstructor=e_;yo.instance=new e_});var ui=V(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.vectorFromValuesWithType=L.StructRow=L.MapRow=L.Utf8Vector=L.SparseUnionVector=L.DenseUnionVector=L.UnionVector=L.TimeNanosecondVector=L.TimeMicrosecondVector=L.TimeMillisecondVector=L.TimeSecondVector=L.TimeVector=L.TimestampNanosecondVector=L.TimestampMicrosecondVector=L.TimestampMillisecondVector=L.TimestampSecondVector=L.TimestampVector=L.StructVector=L.NullVector=L.MapVector=L.ListVector=L.Uint64Vector=L.Uint32Vector=L.Uint16Vector=L.Uint8Vector=L.Int64Vector=L.Int32Vector=L.Int16Vector=L.Int8Vector=L.IntVector=L.IntervalYearMonthVector=L.IntervalDayTimeVector=L.IntervalVector=L.Float64Vector=L.Float32Vector=L.Float16Vector=L.FloatVector=L.FixedSizeListVector=L.FixedSizeBinaryVector=L.DictionaryVector=L.DecimalVector=L.DateMillisecondVector=L.DateDayVector=L.DateVector=L.Chunked=L.BoolVector=L.BinaryVector=L.BaseVector=L.Vector=void 0;var t_=Et(),eM=lt();Object.defineProperty(L,"Vector",{enumerable:!0,get:function(){return eM.Vector}});var tM=ft();Object.defineProperty(L,"BaseVector",{enumerable:!0,get:function(){return tM.BaseVector}});var rM=yp();Object.defineProperty(L,"BinaryVector",{enumerable:!0,get:function(){return rM.BinaryVector}});var iM=mp();Object.defineProperty(L,"BoolVector",{enumerable:!0,get:function(){return iM.BoolVector}});var nM=sn();Object.defineProperty(L,"Chunked",{enumerable:!0,get:function(){return nM.Chunked}});var i_=gp();Object.defineProperty(L,"DateVector",{enumerable:!0,get:function(){return i_.DateVector}});Object.defineProperty(L,"DateDayVector",{enumerable:!0,get:function(){return i_.DateDayVector}});Object.defineProperty(L,"DateMillisecondVector",{enumerable:!0,get:function(){return i_.DateMillisecondVector}});var sM=vp();Object.defineProperty(L,"DecimalVector",{enumerable:!0,get:function(){return sM.DecimalVector}});var oM=qc();Object.defineProperty(L,"DictionaryVector",{enumerable:!0,get:function(){return oM.DictionaryVector}});var aM=jp();Object.defineProperty(L,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return aM.FixedSizeBinaryVector}});var uM=Bp();Object.defineProperty(L,"FixedSizeListVector",{enumerable:!0,get:function(){return uM.FixedSizeListVector}});var il=Ap();Object.defineProperty(L,"FloatVector",{enumerable:!0,get:function(){return il.FloatVector}});Object.defineProperty(L,"Float16Vector",{enumerable:!0,get:function(){return il.Float16Vector}});Object.defineProperty(L,"Float32Vector",{enumerable:!0,get:function(){return il.Float32Vector}});Object.defineProperty(L,"Float64Vector",{enumerable:!0,get:function(){return il.Float64Vector}});var n_=Dp();Object.defineProperty(L,"IntervalVector",{enumerable:!0,get:function(){return n_.IntervalVector}});Object.defineProperty(L,"IntervalDayTimeVector",{enumerable:!0,get:function(){return n_.IntervalDayTimeVector}});Object.defineProperty(L,"IntervalYearMonthVector",{enumerable:!0,get:function(){return n_.IntervalYearMonthVector}});var Fi=Yc();Object.defineProperty(L,"IntVector",{enumerable:!0,get:function(){return Fi.IntVector}});Object.defineProperty(L,"Int8Vector",{enumerable:!0,get:function(){return Fi.Int8Vector}});Object.defineProperty(L,"Int16Vector",{enumerable:!0,get:function(){return Fi.Int16Vector}});Object.defineProperty(L,"Int32Vector",{enumerable:!0,get:function(){return Fi.Int32Vector}});Object.defineProperty(L,"Int64Vector",{enumerable:!0,get:function(){return Fi.Int64Vector}});Object.defineProperty(L,"Uint8Vector",{enumerable:!0,get:function(){return Fi.Uint8Vector}});Object.defineProperty(L,"Uint16Vector",{enumerable:!0,get:function(){return Fi.Uint16Vector}});Object.defineProperty(L,"Uint32Vector",{enumerable:!0,get:function(){return Fi.Uint32Vector}});Object.defineProperty(L,"Uint64Vector",{enumerable:!0,get:function(){return Fi.Uint64Vector}});var cM=xp();Object.defineProperty(L,"ListVector",{enumerable:!0,get:function(){return cM.ListVector}});var lM=Vp();Object.defineProperty(L,"MapVector",{enumerable:!0,get:function(){return lM.MapVector}});var dM=Np();Object.defineProperty(L,"NullVector",{enumerable:!0,get:function(){return dM.NullVector}});var fM=Pp();Object.defineProperty(L,"StructVector",{enumerable:!0,get:function(){return fM.StructVector}});var Oa=Lp();Object.defineProperty(L,"TimestampVector",{enumerable:!0,get:function(){return Oa.TimestampVector}});Object.defineProperty(L,"TimestampSecondVector",{enumerable:!0,get:function(){return Oa.TimestampSecondVector}});Object.defineProperty(L,"TimestampMillisecondVector",{enumerable:!0,get:function(){return Oa.TimestampMillisecondVector}});Object.defineProperty(L,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return Oa.TimestampMicrosecondVector}});Object.defineProperty(L,"TimestampNanosecondVector",{enumerable:!0,get:function(){return Oa.TimestampNanosecondVector}});var ka=qp();Object.defineProperty(L,"TimeVector",{enumerable:!0,get:function(){return ka.TimeVector}});Object.defineProperty(L,"TimeSecondVector",{enumerable:!0,get:function(){return ka.TimeSecondVector}});Object.defineProperty(L,"TimeMillisecondVector",{enumerable:!0,get:function(){return ka.TimeMillisecondVector}});Object.defineProperty(L,"TimeMicrosecondVector",{enumerable:!0,get:function(){return ka.TimeMicrosecondVector}});Object.defineProperty(L,"TimeNanosecondVector",{enumerable:!0,get:function(){return ka.TimeNanosecondVector}});var s_=Hp();Object.defineProperty(L,"UnionVector",{enumerable:!0,get:function(){return s_.UnionVector}});Object.defineProperty(L,"DenseUnionVector",{enumerable:!0,get:function(){return s_.DenseUnionVector}});Object.defineProperty(L,"SparseUnionVector",{enumerable:!0,get:function(){return s_.SparseUnionVector}});var hM=zp();Object.defineProperty(L,"Utf8Vector",{enumerable:!0,get:function(){return hM.Utf8Vector}});var Hj=ha();Object.defineProperty(L,"MapRow",{enumerable:!0,get:function(){return Hj.MapRow}});Object.defineProperty(L,"StructRow",{enumerable:!0,get:function(){return Hj.StructRow}});var Fa=pj(),r_=$e(),mo=lt(),Lj=sn(),ns=ft(),pM=Xr(),rl=Rt(),qj=st(),zj=Gp(),Wj=bh(),Yj=Ej(),Gj=Vj(),$j=$p(),Kj=Nj(),Jj=Pj();mo.Vector.new=_M;mo.Vector.from=mM;function _M(r,...e){return new(Jj.instance.getVisitFn(r)())(r,...e)}function yM(r,e){if(rl.isIterable(e))return mo.Vector.from({nullValues:[null,void 0],type:r(),values:e});if(rl.isAsyncIterable(e))return mo.Vector.from({nullValues:[null,void 0],type:r(),values:e});let{values:t=[],type:i=r(),nullValues:n=[null,void 0]}=Object.assign({},e);return rl.isIterable(t)?mo.Vector.from(Object.assign(Object.assign({nullValues:n},e),{type:i})):mo.Vector.from(Object.assign(Object.assign({nullValues:n},e),{type:i}))}L.vectorFromValuesWithType=yM;function mM(r){let e=Object.assign({nullValues:[null,void 0]},r),{values:t=[]}=e,i=t_.__rest(e,["values"]);if(rl.isIterable(t)){let n=[...qj.Builder.throughIterable(i)(t)];return n.length===1?n[0]:Lj.Chunked.concat(n)}return(n=>t_.__awaiter(this,void 0,void 0,function*(){var s,u;let p=qj.Builder.throughAsyncIterable(i);try{for(var m=t_.__asyncValues(p(t)),B;B=yield m.next(),!B.done;){let O=B.value;n.push(O)}}catch(O){s={error:O}}finally{try{B&&!B.done&&(u=m.return)&&(yield u.call(m))}finally{if(s)throw s.error}}return n.length===1?n[0]:Lj.Chunked.concat(n)}))([])}ns.BaseVector.prototype.get=function(e){return zj.instance.visit(this,e)};ns.BaseVector.prototype.set=function(e,t){return Wj.instance.visit(this,e,t)};ns.BaseVector.prototype.indexOf=function(e,t){return Yj.instance.visit(this,e,t)};ns.BaseVector.prototype.toArray=function(){return Gj.instance.visit(this)};ns.BaseVector.prototype.getByteWidth=function(){return Kj.instance.visit(this.type)};ns.BaseVector.prototype[Symbol.iterator]=function(){return $j.instance.visit(this)};ns.BaseVector.prototype._bindDataAccessors=wM;Object.keys(r_.Type).map(r=>r_.Type[r]).filter(r=>typeof r=="number").filter(r=>r!==r_.Type.NONE).forEach(r=>{let e=Jj.instance.visit(r);e.prototype.get=Fa.partial1(zj.instance.getVisitFn(r)),e.prototype.set=Fa.partial2(Wj.instance.getVisitFn(r)),e.prototype.indexOf=Fa.partial2(Yj.instance.getVisitFn(r)),e.prototype.toArray=Fa.partial0(Gj.instance.getVisitFn(r)),e.prototype.getByteWidth=bM(Kj.instance.getVisitFn(r)),e.prototype[Symbol.iterator]=Fa.partial0($j.instance.getVisitFn(r))});function bM(r){return function(){return r(this.type)}}function gM(r){return function(e){return this.isValid(e)?r.call(this,e):null}}function vM(r){return function(e,t){pM.setBool(this.nullBitmap,this.offset+e,t!=null)&&r.call(this,e,t)}}function wM(){let r=this.nullBitmap;r&&r.byteLength>0&&(this.get=gM(this.get),this.set=vM(this.set))}});var Ba=V(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});sl.Table=void 0;var nl=Et(),jM=ro(),BM=Ca(),Xj=Ec(),o_=Ai(),Zj=St(),u_=Pe(),Qj=Jn(),a_=Rt(),e1=hp(),c_=ui(),jt=class extends c_.Chunked{constructor(...e){var t;let i=null;e[0]instanceof Zj.Schema&&(i=e[0]);let n=e[0]instanceof jt?e[0].chunks:Qj.selectArgs(o_.RecordBatch,e);if(!i&&!(i=(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 o_._InternalEmptyPlaceholderRecordBatch(i));super(new u_.Struct(i.fields),n);this._schema=i,this._chunks=n}static empty(e=new Zj.Schema([])){return new jt(e,[])}static from(e){if(!e)return jt.empty();if(typeof e=="object"){let i=a_.isIterable(e.values)?TM(e):a_.isAsyncIterable(e.values)?SM(e):null;if(i!==null)return i}let t=BM.RecordBatchReader.from(e);return a_.isPromise(t)?(()=>nl.__awaiter(this,void 0,void 0,function*(){return yield jt.from(yield t)}))():t.isSync()&&(t=t.open())?t.schema?new jt(t.schema,[...t]):jt.empty():(i=>nl.__awaiter(this,void 0,void 0,function*(){var n,s;let u=yield i,p=u.schema,m=[];if(p){try{for(var B=nl.__asyncValues(u),O;O=yield B.next(),!O.done;){let R=O.value;m.push(R)}}catch(R){n={error:R}}finally{try{O&&!O.done&&(s=B.return)&&(yield s.call(B))}finally{if(n)throw n.error}}return new jt(p,m)}return jt.empty()}))(t.open())}static fromAsync(e){return nl.__awaiter(this,void 0,void 0,function*(){return yield jt.from(e)})}static fromStruct(e){return jt.new(e.data.childData,e.type.children)}static new(...e){return new jt(...e1.distributeColumnsIntoRecordBatches(Qj.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 jt(this._schema,e)}getColumn(e){return this.getColumnAt(this.getColumnIndex(e))}getColumnAt(e){return this.getChildAt(e)}getColumnIndex(e){return this._schema.fields.findIndex(t=>t.name===e)}getChildAt(e){if(e<0||e>=this.numChildren)return null;let t,i,n=this._schema.fields,s=this._children||(this._children=[]);if(i=s[e])return i;if(t=n[e]){let u=this._chunks.map(p=>p.getChildAt(e)).filter(p=>p!=null);if(u.length>0)return s[e]=new jM.Column(t,u)}return null}serialize(e="binary",t=!0){return(t?Xj.RecordBatchStreamWriter:Xj.RecordBatchFileWriter).writeAll(this).toUint8Array(!0)}count(){return this._length}select(...e){let t=this._schema.fields.reduce((i,n,s)=>i.set(n.name,s),new Map);return this.selectAt(...e.map(i=>t.get(i)).filter(i=>i>-1))}selectAt(...e){let t=this._schema.selectAt(...e);return new jt(t,this._chunks.map(({length:i,data:{childData:n}})=>new o_.RecordBatch(t,i,e.map(s=>n[s]).filter(Boolean))))}assign(e){let t=this._schema.fields,[i,n]=e.schema.fields.reduce((p,m,B)=>{let[O,R]=p,W=t.findIndex(N=>N.name===m.name);return~W?R[W]=B:O.push(B),p},[[],[]]),s=this._schema.assign(e.schema),u=[...t.map((p,m,B,O=n[m])=>O===void 0?this.getColumnAt(m):e.getColumnAt(O)),...i.map(p=>e.getColumnAt(p))].filter(Boolean);return new jt(...e1.distributeVectorsIntoRecordBatches(s,u))}};sl.Table=jt;function TM(r){let{type:e}=r;return e instanceof u_.Struct?jt.fromStruct(c_.StructVector.from(r)):null}function SM(r){let{type:e}=r;return e instanceof u_.Struct?c_.StructVector.from(r).then(t=>jt.fromStruct(t)):null}});var Ai=V(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo._InternalEmptyPlaceholderRecordBatch=bo.RecordBatch=void 0;var d_=Mr(),l_=Ba(),IM=lt(),AM=Ot(),DM=St(),FM=Rt(),OM=sn(),kM=Jn(),f_=Pe(),CM=hp(),MM=ui(),_n=class extends MM.StructVector{constructor(...e){let t,i=e[0],n;if(e[1]instanceof d_.Data)[,t,n]=e;else{let s=i.fields,[,u,p]=e;t=d_.Data.Struct(new f_.Struct(s),0,u,0,null,p)}super(t,n);this._schema=i}static from(e){return FM.isIterable(e.values),l_.Table.from(e)}static new(...e){let[t,i]=kM.selectFieldArgs(e),n=i.filter(s=>s instanceof IM.Vector);return new _n(...CM.ensureSameLengthData(new DM.Schema(t),n.map(s=>s.data)))}clone(e,t=this._children){return new _n(this._schema,e,t)}concat(...e){let t=this._schema,i=OM.Chunked.flatten(this,...e);return new l_.Table(t,i.map(({data:n})=>new _n(t,n)))}get schema(){return this._schema}get numCols(){return this._schema.fields.length}get dictionaries(){return this._dictionaries||(this._dictionaries=ol.collect(this))}select(...e){let t=this._schema.fields.reduce((i,n,s)=>i.set(n.name,s),new Map);return this.selectAt(...e.map(i=>t.get(i)).filter(i=>i>-1))}selectAt(...e){let t=this._schema.selectAt(...e),i=e.map(n=>this.data.childData[n]).filter(Boolean);return new _n(t,this.length,i)}};bo.RecordBatch=_n;var t1=class extends _n{constructor(e){super(e,0,e.fields.map(t=>d_.Data.new(t.type,0,0,0)))}};bo._InternalEmptyPlaceholderRecordBatch=t1;var ol=class extends AM.Visitor{constructor(){super(...arguments);this.dictionaries=new Map}static collect(e){return new ol().visit(e.data,new f_.Struct(e.schema.fields)).dictionaries}visit(e,t){return f_.DataType.isDictionary(t)?this.visitDictionary(e,t):(e.childData.forEach((i,n)=>this.visit(i,t.children[n].type)),this)}visitDictionary(e,t){let i=e.dictionary;return i&&i.length>0&&this.dictionaries.set(t.id,i),this}}});var Ca=V(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.AsyncRecordBatchFileReader=Br.RecordBatchFileReader=Br.AsyncRecordBatchStreamReader=Br.RecordBatchStreamReader=Br.RecordBatchReader=void 0;var Xe=Et(),r1=lt(),al=$e(),a1=Fh(),i1=ta(),n1=en(),Ma=Ch(),u1=V0(),h_=Ai(),ss=Fs(),Tr=Tc(),jr=Rt(),fi=class extends ss.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 jr.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 i1.default.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return i1.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 fi?e:jr.isArrowJSON(e)?UM(e):jr.isFileHandle(e)?xM(e):jr.isPromise(e)?(()=>Xe.__awaiter(this,void 0,void 0,function*(){return yield fi.from(yield e)}))():jr.isFetchResponse(e)||jr.isReadableDOMStream(e)||jr.isReadableNodeStream(e)||jr.isAsyncIterable(e)?RM(new n1.AsyncByteStream(e)):EM(new n1.ByteStream(e))}static readAll(e){return e instanceof fi?e.isSync()?s1(e):o1(e):jr.isArrowJSON(e)||ArrayBuffer.isView(e)||jr.isIterable(e)||jr.isIteratorResult(e)?s1(e):o1(e)}};Br.RecordBatchReader=fi;var go=class extends fi{constructor(e){super(e);this._impl=e}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return Xe.__asyncGenerator(this,arguments,function*(){yield Xe.__await(yield*Xe.__asyncDelegator(Xe.__asyncValues(this[Symbol.iterator]())))})}};Br.RecordBatchStreamReader=go;var vo=class extends fi{constructor(e){super(e);this._impl=e}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}};Br.AsyncRecordBatchStreamReader=vo;var ul=class extends go{constructor(e){super(e);this._impl=e}};Br.RecordBatchFileReader=ul;var p_=class extends vo{constructor(e){super(e);this._impl=e}};Br.AsyncRecordBatchFileReader=p_;var __=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 h_.RecordBatch(this.schema,e.length,this._loadVectors(e,t,this.schema.fields))}_loadDictionaryBatch(e,t){let{id:i,isDelta:n,data:s}=e,{dictionaries:u,schema:p}=this,m=u.get(i);if(n||!m){let B=p.dictionaries.get(i);return m&&n?m.concat(r1.Vector.new(this._loadVectors(s,t,[B])[0])):r1.Vector.new(this._loadVectors(s,t,[B])[0])}return m}_loadVectors(e,t,i){return new u1.VectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(i)}},Ua=class extends __{constructor(e,t){super(t);this._reader=jr.isArrowJSON(e)?new Tr.JSONMessageReader(this._handle=e):new Tr.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=d1(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):ss.ITERATOR_DONE}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):ss.ITERATOR_DONE}next(){if(this.closed)return ss.ITERATOR_DONE;let e,{_reader:t}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let i=e.header(),n=t.readMessageBody(e.bodyLength),s=this._loadRecordBatch(i,n);return{done:!1,value:s}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let i=e.header(),n=t.readMessageBody(e.bodyLength),s=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new h_._InternalEmptyPlaceholderRecordBatch(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},Ea=class extends __{constructor(e,t){super(t);this._reader=new Tr.AsyncMessageReader(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return Xe.__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 Xe.__awaiter(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=d1(this,e),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return Xe.__awaiter(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):ss.ITERATOR_DONE})}return(e){return Xe.__awaiter(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):ss.ITERATOR_DONE})}next(){return Xe.__awaiter(this,void 0,void 0,function*(){if(this.closed)return ss.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 i=e.header(),n=yield t.readMessageBody(e.bodyLength),s=this._loadRecordBatch(i,n);return{done:!1,value:s}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let i=e.header(),n=yield t.readMessageBody(e.bodyLength),s=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new h_._InternalEmptyPlaceholderRecordBatch(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return Xe.__awaiter(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}},y_=class extends Ua{constructor(e,t){super(e instanceof Ma.RandomAccessFile?e:new Ma.RandomAccessFile(e),t)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(let t of this._footer.dictionaryBatches())t&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){if(this.closed)return null;this._footer||this.open();let t=this._footer&&this._footer.getRecordBatch(e);if(t&&this._handle.seek(t.offset)){let i=this._reader.readMessage(al.MessageHeader.RecordBatch);if(i==null?void 0:i.isRecordBatch()){let n=i.header(),s=this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(n,s)}}return null}_readDictionaryBatch(e){let t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&this._handle.seek(t.offset)){let i=this._reader.readMessage(al.MessageHeader.DictionaryBatch);if(i==null?void 0:i.isDictionaryBatch()){let n=i.header(),s=this._reader.readMessageBody(i.bodyLength),u=this._loadDictionaryBatch(n,s);this.dictionaries.set(n.id,u)}}}_readFooter(){let{_handle:e}=this,t=e.size-Tr.magicAndPadding,i=e.readInt32(t),n=e.readAt(t-i,i);return a1.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}},c1=class extends Ea{constructor(e,...t){let i=typeof t[0]!="number"?t.shift():void 0,n=t[0]instanceof Map?t.shift():void 0;super(e instanceof Ma.AsyncRandomAccessFile?e:new Ma.AsyncRandomAccessFile(e,i),n)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isFile(){return!0}isAsync(){return!0}open(e){let t=Object.create(null,{open:{get:()=>super.open}});return Xe.__awaiter(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(let i of this._footer.dictionaryBatches())i&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield t.open.call(this,e)})}readRecordBatch(e){return Xe.__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 i=yield this._reader.readMessage(al.MessageHeader.RecordBatch);if(i==null?void 0:i.isRecordBatch()){let n=i.header(),s=yield this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(n,s)}}return null})}_readDictionaryBatch(e){return Xe.__awaiter(this,void 0,void 0,function*(){let t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&(yield this._handle.seek(t.offset))){let i=yield this._reader.readMessage(al.MessageHeader.DictionaryBatch);if(i==null?void 0:i.isDictionaryBatch()){let n=i.header(),s=yield this._reader.readMessageBody(i.bodyLength),u=this._loadDictionaryBatch(n,s);this.dictionaries.set(n.id,u)}}})}_readFooter(){return Xe.__awaiter(this,void 0,void 0,function*(){let{_handle:e}=this;e._pending&&(yield e._pending);let t=e.size-Tr.magicAndPadding,i=yield e.readInt32(t),n=yield e.readAt(t-i,i);return a1.Footer.decode(n)})}_readNextMessageAndValidate(e){return Xe.__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})}},l1=class extends Ua{constructor(e,t){super(e,t)}_loadVectors(e,t,i){return new u1.JSONVectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(i)}};function d1(r,e){return e&&typeof e.autoDestroy=="boolean"?e.autoDestroy:r.autoDestroy}function*s1(r){let e=fi.from(r);try{if(!e.open({autoDestroy:!1}).closed)do yield e;while(!e.reset().open().closed)}finally{e.cancel()}}function o1(r){return Xe.__asyncGenerator(this,arguments,function*(){let t=yield Xe.__await(fi.from(r));try{if(!(yield Xe.__await(t.open({autoDestroy:!1}))).closed)do yield yield Xe.__await(t);while(!(yield Xe.__await(t.reset().open())).closed)}finally{yield Xe.__await(t.cancel())}})}function UM(r){return new go(new l1(r))}function EM(r){let e=r.peek(Tr.magicLength+7&-8);return e&&e.byteLength>=4?Tr.checkForMagicArrowString(e)?new ul(new y_(r.read())):new go(new Ua(r)):new go(new Ua(function*(){}()))}function RM(r){return Xe.__awaiter(this,void 0,void 0,function*(){let e=yield r.peek(Tr.magicLength+7&-8);return e&&e.byteLength>=4?Tr.checkForMagicArrowString(e)?new ul(new y_(yield r.read())):new vo(new Ea(r)):new vo(new Ea(function(){return Xe.__asyncGenerator(this,arguments,function*(){})}()))})}function xM(r){return Xe.__awaiter(this,void 0,void 0,function*(){let{size:e}=yield r.stat(),t=new Ma.AsyncRandomAccessFile(r,e);return e>=Tr.magicX2AndPadding&&Tr.checkForMagicArrowString(yield t.readAt(0,Tr.magicLength+7&-8))?new p_(new c1(t)):new vo(new Ea(t))})}});var p1=V(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0});ll.toDOMStream=void 0;var cl=Et(),h1=gt(),f1=Rt();function VM(r,e){if(f1.isAsyncIterable(r))return PM(r,e);if(f1.isIterable(r))return NM(r,e);throw new Error("toDOMStream() must be called with an Iterable or AsyncIterable")}ll.toDOMStream=VM;function NM(r,e){let t=null,i=(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(u){s(u,t||(t=r[Symbol.iterator]()))},pull(u){t?s(u,t):u.close()},cancel(){((t==null?void 0:t.return)&&t.return()||!0)&&(t=null)}}),Object.assign({highWaterMark:i?n:void 0},e));function s(u,p){let m,B=null,O=u.desiredSize||null;for(;!(B=p.next(i?O:null)).done;)if(ArrayBuffer.isView(B.value)&&(m=h1.toUint8Array(B.value))&&(O!=null&&i&&(O=O-m.byteLength+1),B.value=m),u.enqueue(B.value),O!=null&&--O<=0)return;u.close()}}function PM(r,e){let t=null,i=(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(u){return cl.__awaiter(this,void 0,void 0,function*(){yield s(u,t||(t=r[Symbol.asyncIterator]()))})},pull(u){return cl.__awaiter(this,void 0,void 0,function*(){t?yield s(u,t):u.close()})},cancel(){return cl.__awaiter(this,void 0,void 0,function*(){((t==null?void 0:t.return)&&(yield t.return())||!0)&&(t=null)})}}),Object.assign({highWaterMark:i?n:void 0},e));function s(u,p){return cl.__awaiter(this,void 0,void 0,function*(){let m,B=null,O=u.desiredSize||null;for(;!(B=yield p.next(i?O:null)).done;)if(ArrayBuffer.isView(B.value)&&(m=h1.toUint8Array(B.value))&&(O!=null&&i&&(O=O-m.byteLength+1),B.value=m),u.enqueue(B.value),O!=null&&--O<=0)return;u.close()})}}});var m1=V(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.BuilderTransform=wo.builderThroughDOMStream=void 0;var LM=Et(),qM=lc();function HM(r){return new m_(r)}wo.builderThroughDOMStream=HM;var m_=class{constructor(e){this._numChunks=0,this._finished=!1,this._bufferedSize=0;let{["readableStrategy"]:t,["writableStrategy"]:i,["queueingStrategy"]:n="count"}=e,s=LM.__rest(e,["readableStrategy","writableStrategy","queueingStrategy"]);this._controller=null,this._builder=qM.Builder.new(s),this._getSize=n!=="bytes"?_1:y1;let{["highWaterMark"]:u=n==="bytes"?Math.pow(2,14):1e3}=Object.assign({},t),{["highWaterMark"]:p=n==="bytes"?Math.pow(2,14):1e3}=Object.assign({},i);this.readable=new ReadableStream({cancel:()=>{this._builder.clear()},pull:m=>{this._maybeFlush(this._builder,this._controller=m)},start:m=>{this._maybeFlush(this._builder,this._controller=m)}},{highWaterMark:u,size:n!=="bytes"?_1:y1}),this.writable=new WritableStream({abort:()=>{this._builder.clear()},write:()=>{this._maybeFlush(this._builder,this._controller)},close:()=>{this._maybeFlush(this._builder.finish(),this._controller)}},{highWaterMark:p,size:m=>this._writeValueAndReturnChunkSize(m)})}_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)}};wo.BuilderTransform=m_;var _1=r=>r.length,y1=r=>r.byteLength});var b1=V(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});dl.recordBatchReaderThroughDOMStream=void 0;var Ra=Et(),zM=en(),WM=Ca();function YM(r,e){let t=new zM.AsyncByteQueue,i=null,n=new ReadableStream({cancel(){return Ra.__awaiter(this,void 0,void 0,function*(){yield t.close()})},start(p){return Ra.__awaiter(this,void 0,void 0,function*(){yield u(p,i||(i=yield s()))})},pull(p){return Ra.__awaiter(this,void 0,void 0,function*(){i?yield u(p,i):p.close()})}});return{writable:new WritableStream(t,Object.assign({highWaterMark:Math.pow(2,14)},r)),readable:n};function s(){return Ra.__awaiter(this,void 0,void 0,function*(){return yield(yield WM.RecordBatchReader.from(t)).open(e)})}function u(p,m){return Ra.__awaiter(this,void 0,void 0,function*(){let B=p.desiredSize,O=null;for(;!(O=yield m.next()).done;)if(p.enqueue(O.value),B!=null&&--B<=0)return;p.close()})}}dl.recordBatchReaderThroughDOMStream=YM});var g1=V(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});hl.recordBatchWriterThroughDOMStream=void 0;var fl=Et(),GM=en();function $M(r,e){let t=new this(r),i=new GM.AsyncByteStream(t),n=new ReadableStream({type:"bytes",cancel(){return fl.__awaiter(this,void 0,void 0,function*(){yield i.cancel()})},pull(u){return fl.__awaiter(this,void 0,void 0,function*(){yield s(u)})},start(u){return fl.__awaiter(this,void 0,void 0,function*(){yield s(u)})}},Object.assign({highWaterMark:Math.pow(2,14)},e));return{writable:new WritableStream(t,r),readable:n};function s(u){return fl.__awaiter(this,void 0,void 0,function*(){let p=null,m=u.desiredSize;for(;p=yield i.read(m||null);)if(u.enqueue(p),m!=null&&(m-=p.byteLength)<=0)return;u.close()})}}hl.recordBatchWriterThroughDOMStream=$M});var B_=V(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.custom=De.or=De.and=De.col=De.lit=De.CustomPredicate=De.Not=De.GTeq=De.LTeq=De.Equals=De.Or=De.And=De.CombinationPredicate=De.ComparisonPredicate=De.Predicate=De.Col=De.Literal=De.Value=void 0;var KM=qc(),yn=class{eq(e){return e instanceof yn||(e=new Oi(e)),new g_(this,e)}le(e){return e instanceof yn||(e=new Oi(e)),new v_(this,e)}ge(e){return e instanceof yn||(e=new Oi(e)),new w_(this,e)}lt(e){return new jo(this.ge(e))}gt(e){return new jo(this.le(e))}ne(e){return new jo(this.eq(e))}};De.Value=yn;var Oi=class extends yn{constructor(e){super();this.v=e}};De.Literal=Oi;var b_=class extends yn{constructor(e){super();this.name=e}bind(e){if(!this.colidx){this.colidx=-1;let i=e.schema.fields;for(let n=-1;++n<i.length;)if(i[n].name===this.name){this.colidx=n;break}if(this.colidx<0)throw new Error(`Failed to bind Col "${this.name}"`)}let t=this.vector=e.getChildAt(this.colidx);return i=>t.get(i)}};De.Col=b_;var Bo=class{and(...e){return new To(this,...e)}or(...e){return new So(this,...e)}not(){return new jo(this)}};De.Predicate=Bo;var xa=class extends Bo{constructor(e,t){super();this.left=e,this.right=t}bind(e){return this.left instanceof Oi?this.right instanceof Oi?this._bindLitLit(e,this.left,this.right):this._bindLitCol(e,this.left,this.right):this.right instanceof Oi?this._bindColLit(e,this.left,this.right):this._bindColCol(e,this.left,this.right)}};De.ComparisonPredicate=xa;var Va=class extends Bo{constructor(...e){super();this.children=e}};De.CombinationPredicate=Va;Va.prototype.children=Object.freeze([]);var To=class extends Va{constructor(...e){e=e.reduce((t,i)=>t.concat(i instanceof To?i.children:i),[]);super(...e)}bind(e){let t=this.children.map(i=>i.bind(e));return(i,n)=>t.every(s=>s(i,n))}};De.And=To;var So=class extends Va{constructor(...e){e=e.reduce((t,i)=>t.concat(i instanceof So?i.children:i),[]);super(...e)}bind(e){let t=this.children.map(i=>i.bind(e));return(i,n)=>t.some(s=>s(i,n))}};De.Or=So;var g_=class extends xa{_bindLitLit(e,t,i){let n=t.v==i.v;return()=>n}_bindColCol(e,t,i){let n=t.bind(e),s=i.bind(e);return(u,p)=>n(u,p)==s(u,p)}_bindColLit(e,t,i){let n=t.bind(e);if(t.vector instanceof KM.DictionaryVector){let s,u=t.vector;return u.dictionary!==this.lastDictionary?(s=u.reverseLookup(i.v),this.lastDictionary=u.dictionary,this.lastKey=s):s=this.lastKey,s===-1?()=>!1:p=>u.getKey(p)===s}else return(s,u)=>n(s,u)==i.v}_bindLitCol(e,t,i){return this._bindColLit(e,i,t)}};De.Equals=g_;var v_=class extends xa{_bindLitLit(e,t,i){let n=t.v<=i.v;return()=>n}_bindColCol(e,t,i){let n=t.bind(e),s=i.bind(e);return(u,p)=>n(u,p)<=s(u,p)}_bindColLit(e,t,i){let n=t.bind(e);return(s,u)=>n(s,u)<=i.v}_bindLitCol(e,t,i){let n=i.bind(e);return(s,u)=>t.v<=n(s,u)}};De.LTeq=v_;var w_=class extends xa{_bindLitLit(e,t,i){let n=t.v>=i.v;return()=>n}_bindColCol(e,t,i){let n=t.bind(e),s=i.bind(e);return(u,p)=>n(u,p)>=s(u,p)}_bindColLit(e,t,i){let n=t.bind(e);return(s,u)=>n(s,u)>=i.v}_bindLitCol(e,t,i){let n=i.bind(e);return(s,u)=>t.v>=n(s,u)}};De.GTeq=w_;var jo=class extends Bo{constructor(e){super();this.child=e}bind(e){let t=this.child.bind(e);return(i,n)=>!t(i,n)}};De.Not=jo;var j_=class extends Bo{constructor(e,t){super();this.next=e,this.bind_=t}bind(e){return this.bind_(e),this.next}};De.CustomPredicate=j_;function JM(r){return new Oi(r)}De.lit=JM;function XM(r){return new b_(r)}De.col=XM;function ZM(...r){return new To(...r)}De.and=ZM;function QM(...r){return new So(...r)}De.or=QM;function eU(r,e){return new j_(r,e)}De.custom=eU});var S1=V(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.FilteredDataFrame=mn.CountByResult=mn.DataFrame=void 0;var v1=Ba(),w1=Yc(),T_=St(),j1=B_(),tU=Ai(),B1=Pe(),S_=class extends v1.Table{filter(e){return new Na(this.chunks,e)}scan(e,t){let i=this.chunks,n=i.length;for(let s=-1;++s<n;){let u=i[s];t&&t(u);for(let p=-1,m=u.length;++p<m;)e(p,u)}}scanReverse(e,t){let i=this.chunks,n=i.length;for(let s=n;--s>=0;){let u=i[s];t&&t(u);for(let p=u.length;--p>=0;)e(p,u)}}countBy(e){let t=this.chunks,i=t.length,n=typeof e=="string"?new j1.Col(e):e;n.bind(t[i-1]);let s=n.vector;if(!B1.DataType.isDictionary(s.type))throw new Error("countBy currently only supports dictionary-encoded columns");let u=Math.ceil(Math.log(s.length)/Math.log(256)),p=u==4?Uint32Array:u>=2?Uint16Array:Uint8Array,m=new p(s.dictionary.length);for(let B=-1;++B<i;){let O=t[B];n.bind(O);let R=n.vector.indices;for(let W=-1,N=O.length;++W<N;){let Se=R.get(W);Se!==null&&m[Se]++}}return new pl(s.dictionary,w1.IntVector.from(m))}};mn.DataFrame=S_;var pl=class extends v1.Table{constructor(e,t){let i=new T_.Schema([new T_.Field("values",e.type),new T_.Field("counts",t.type)]);super(new tU.RecordBatch(i,t.length,[e,t]))}toJSON(){let e=this.getColumnAt(0),t=this.getColumnAt(1),i={};for(let n=-1;++n<this.length;)i[e.get(n)]=t.get(n);return i}};mn.CountByResult=pl;var T1=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}},Na=class extends S_{constructor(e,t){super(e);this._predicate=t}scan(e,t){let i=this._chunks,n=i.length;for(let s=-1;++s<n;){let u=i[s],p=this._predicate.bind(u),m=!1;for(let B=-1,O=u.length;++B<O;)p(B,u)&&(t&&!m&&(t(u),m=!0),e(B,u))}}scanReverse(e,t){let i=this._chunks,n=i.length;for(let s=n;--s>=0;){let u=i[s],p=this._predicate.bind(u),m=!1;for(let B=u.length;--B>=0;)p(B,u)&&(t&&!m&&(t(u),m=!0),e(B,u))}}count(){let e=0,t=this._chunks,i=t.length;for(let n=-1;++n<i;){let s=t[n],u=this._predicate.bind(s);for(let p=-1,m=s.length;++p<m;)u(p,s)&&++e}return e}[Symbol.iterator](){return new T1(this._chunks,this._predicate)}filter(e){return new Na(this._chunks,this._predicate.and(e))}countBy(e){let t=this._chunks,i=t.length,n=typeof e=="string"?new j1.Col(e):e;n.bind(t[i-1]);let s=n.vector;if(!B1.DataType.isDictionary(s.type))throw new Error("countBy currently only supports dictionary-encoded columns");let u=Math.ceil(Math.log(s.length)/Math.log(256)),p=u==4?Uint32Array:u>=2?Uint16Array:Uint8Array,m=new p(s.dictionary.length);for(let B=-1;++B<i;){let O=t[B],R=this._predicate.bind(O);n.bind(O);let W=n.vector.indices;for(let N=-1,Se=O.length;++N<Se;){let ye=W.get(N);ye!==null&&R(N,O)&&m[ye]++}}return new pl(s.dictionary,w1.IntVector.from(m))}};mn.FilteredDataFrame=Na});var D1=V(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});w.isTypedArray=w.util=w.predicate=w.CountByResult=w.FilteredDataFrame=w.DataFrame=w.RecordBatch=w.Message=w.JSONMessageReader=w.AsyncMessageReader=w.MessageReader=w.RecordBatchJSONWriter=w.RecordBatchStreamWriter=w.RecordBatchFileWriter=w.RecordBatchWriter=w.AsyncRecordBatchStreamReader=w.AsyncRecordBatchFileReader=w.RecordBatchStreamReader=w.RecordBatchFileReader=w.RecordBatchReader=w.AsyncByteQueue=w.AsyncByteStream=w.ByteStream=w.Utf8Builder=w.SparseUnionBuilder=w.DenseUnionBuilder=w.UnionBuilder=w.TimeNanosecondBuilder=w.TimeMicrosecondBuilder=w.TimeMillisecondBuilder=w.TimeSecondBuilder=w.TimeBuilder=w.TimestampNanosecondBuilder=w.TimestampMicrosecondBuilder=w.TimestampMillisecondBuilder=w.TimestampSecondBuilder=w.TimestampBuilder=w.StructBuilder=w.NullBuilder=w.MapBuilder=w.ListBuilder=w.Uint64Builder=w.Uint32Builder=w.Uint16Builder=w.Uint8Builder=w.Int64Builder=w.Int32Builder=w.Int16Builder=w.Int8Builder=w.IntBuilder=w.IntervalYearMonthBuilder=w.IntervalDayTimeBuilder=w.IntervalBuilder=w.Float64Builder=w.Float32Builder=w.Float16Builder=w.FloatBuilder=w.FixedSizeListBuilder=w.FixedSizeBinaryBuilder=w.DictionaryBuilder=w.DecimalBuilder=w.DateMillisecondBuilder=w.DateDayBuilder=w.DateBuilder=w.BoolBuilder=w.BinaryBuilder=w.Builder=w.Utf8Vector=w.SparseUnionVector=w.DenseUnionVector=w.UnionVector=w.TimeNanosecondVector=w.TimeMicrosecondVector=w.TimeMillisecondVector=w.TimeSecondVector=w.TimeVector=w.TimestampNanosecondVector=w.TimestampMicrosecondVector=w.TimestampMillisecondVector=w.TimestampSecondVector=w.TimestampVector=w.StructVector=w.NullVector=w.MapVector=w.ListVector=w.Uint64Vector=w.Uint32Vector=w.Uint16Vector=w.Uint8Vector=w.Int64Vector=w.Int32Vector=w.Int16Vector=w.Int8Vector=w.IntVector=w.IntervalYearMonthVector=w.IntervalDayTimeVector=w.IntervalVector=w.Float64Vector=w.Float32Vector=w.Float16Vector=w.FloatVector=w.FixedSizeListVector=w.FixedSizeBinaryVector=w.DictionaryVector=w.DecimalVector=w.DateMillisecondVector=w.DateDayVector=w.DateVector=w.Chunked=w.BoolVector=w.BinaryVector=w.BaseVector=w.Vector=w.Field=w.Schema=w.Visitor=w.Column=w.Table=w.Map_=w.FixedSizeList=w.IntervalYearMonth=w.IntervalDayTime=w.Interval=w.Dictionary=w.SparseUnion=w.DenseUnion=w.Union=w.Struct=w.List=w.Decimal=w.TimeNanosecond=w.TimeMicrosecond=w.TimeMillisecond=w.TimeSecond=w.Time=w.TimestampNanosecond=w.TimestampMicrosecond=w.TimestampMillisecond=w.TimestampSecond=w.Timestamp=w.DateMillisecond=w.DateDay=w.Date_=w.FixedSizeBinary=w.Binary=w.Utf8=w.Float64=w.Float32=w.Float16=w.Float=w.Uint64=w.Uint32=w.Uint16=w.Uint8=w.Int64=w.Int32=w.Int16=w.Int8=w.Int=w.Bool=w.Null=w.DataType=w.Data=w.BufferType=w.Type=w.MessageHeader=w.MetadataVersion=w.IntervalUnit=w.UnionMode=w.Precision=w.TimeUnit=w.DateUnit=void 0;var Io=Li();Object.defineProperty(w,"DateUnit",{enumerable:!0,get:function(){return Io.DateUnit}});Object.defineProperty(w,"TimeUnit",{enumerable:!0,get:function(){return Io.TimeUnit}});Object.defineProperty(w,"Precision",{enumerable:!0,get:function(){return Io.Precision}});Object.defineProperty(w,"UnionMode",{enumerable:!0,get:function(){return Io.UnionMode}});Object.defineProperty(w,"IntervalUnit",{enumerable:!0,get:function(){return Io.IntervalUnit}});Object.defineProperty(w,"MetadataVersion",{enumerable:!0,get:function(){return Io.MetadataVersion}});var rU=Tu();Object.defineProperty(w,"MessageHeader",{enumerable:!0,get:function(){return rU.MessageHeader}});var I1=$e();Object.defineProperty(w,"Type",{enumerable:!0,get:function(){return I1.Type}});Object.defineProperty(w,"BufferType",{enumerable:!0,get:function(){return I1.BufferType}});var iU=Mr();Object.defineProperty(w,"Data",{enumerable:!0,get:function(){return iU.Data}});var we=Pe();Object.defineProperty(w,"DataType",{enumerable:!0,get:function(){return we.DataType}});Object.defineProperty(w,"Null",{enumerable:!0,get:function(){return we.Null}});Object.defineProperty(w,"Bool",{enumerable:!0,get:function(){return we.Bool}});Object.defineProperty(w,"Int",{enumerable:!0,get:function(){return we.Int}});Object.defineProperty(w,"Int8",{enumerable:!0,get:function(){return we.Int8}});Object.defineProperty(w,"Int16",{enumerable:!0,get:function(){return we.Int16}});Object.defineProperty(w,"Int32",{enumerable:!0,get:function(){return we.Int32}});Object.defineProperty(w,"Int64",{enumerable:!0,get:function(){return we.Int64}});Object.defineProperty(w,"Uint8",{enumerable:!0,get:function(){return we.Uint8}});Object.defineProperty(w,"Uint16",{enumerable:!0,get:function(){return we.Uint16}});Object.defineProperty(w,"Uint32",{enumerable:!0,get:function(){return we.Uint32}});Object.defineProperty(w,"Uint64",{enumerable:!0,get:function(){return we.Uint64}});Object.defineProperty(w,"Float",{enumerable:!0,get:function(){return we.Float}});Object.defineProperty(w,"Float16",{enumerable:!0,get:function(){return we.Float16}});Object.defineProperty(w,"Float32",{enumerable:!0,get:function(){return we.Float32}});Object.defineProperty(w,"Float64",{enumerable:!0,get:function(){return we.Float64}});Object.defineProperty(w,"Utf8",{enumerable:!0,get:function(){return we.Utf8}});Object.defineProperty(w,"Binary",{enumerable:!0,get:function(){return we.Binary}});Object.defineProperty(w,"FixedSizeBinary",{enumerable:!0,get:function(){return we.FixedSizeBinary}});Object.defineProperty(w,"Date_",{enumerable:!0,get:function(){return we.Date_}});Object.defineProperty(w,"DateDay",{enumerable:!0,get:function(){return we.DateDay}});Object.defineProperty(w,"DateMillisecond",{enumerable:!0,get:function(){return we.DateMillisecond}});Object.defineProperty(w,"Timestamp",{enumerable:!0,get:function(){return we.Timestamp}});Object.defineProperty(w,"TimestampSecond",{enumerable:!0,get:function(){return we.TimestampSecond}});Object.defineProperty(w,"TimestampMillisecond",{enumerable:!0,get:function(){return we.TimestampMillisecond}});Object.defineProperty(w,"TimestampMicrosecond",{enumerable:!0,get:function(){return we.TimestampMicrosecond}});Object.defineProperty(w,"TimestampNanosecond",{enumerable:!0,get:function(){return we.TimestampNanosecond}});Object.defineProperty(w,"Time",{enumerable:!0,get:function(){return we.Time}});Object.defineProperty(w,"TimeSecond",{enumerable:!0,get:function(){return we.TimeSecond}});Object.defineProperty(w,"TimeMillisecond",{enumerable:!0,get:function(){return we.TimeMillisecond}});Object.defineProperty(w,"TimeMicrosecond",{enumerable:!0,get:function(){return we.TimeMicrosecond}});Object.defineProperty(w,"TimeNanosecond",{enumerable:!0,get:function(){return we.TimeNanosecond}});Object.defineProperty(w,"Decimal",{enumerable:!0,get:function(){return we.Decimal}});Object.defineProperty(w,"List",{enumerable:!0,get:function(){return we.List}});Object.defineProperty(w,"Struct",{enumerable:!0,get:function(){return we.Struct}});Object.defineProperty(w,"Union",{enumerable:!0,get:function(){return we.Union}});Object.defineProperty(w,"DenseUnion",{enumerable:!0,get:function(){return we.DenseUnion}});Object.defineProperty(w,"SparseUnion",{enumerable:!0,get:function(){return we.SparseUnion}});Object.defineProperty(w,"Dictionary",{enumerable:!0,get:function(){return we.Dictionary}});Object.defineProperty(w,"Interval",{enumerable:!0,get:function(){return we.Interval}});Object.defineProperty(w,"IntervalDayTime",{enumerable:!0,get:function(){return we.IntervalDayTime}});Object.defineProperty(w,"IntervalYearMonth",{enumerable:!0,get:function(){return we.IntervalYearMonth}});Object.defineProperty(w,"FixedSizeList",{enumerable:!0,get:function(){return we.FixedSizeList}});Object.defineProperty(w,"Map_",{enumerable:!0,get:function(){return we.Map_}});var nU=Ba();Object.defineProperty(w,"Table",{enumerable:!0,get:function(){return nU.Table}});var sU=ro();Object.defineProperty(w,"Column",{enumerable:!0,get:function(){return sU.Column}});var oU=Ot();Object.defineProperty(w,"Visitor",{enumerable:!0,get:function(){return oU.Visitor}});var A1=St();Object.defineProperty(w,"Schema",{enumerable:!0,get:function(){return A1.Schema}});Object.defineProperty(w,"Field",{enumerable:!0,get:function(){return A1.Field}});var _e=ui();Object.defineProperty(w,"Vector",{enumerable:!0,get:function(){return _e.Vector}});Object.defineProperty(w,"BaseVector",{enumerable:!0,get:function(){return _e.BaseVector}});Object.defineProperty(w,"BinaryVector",{enumerable:!0,get:function(){return _e.BinaryVector}});Object.defineProperty(w,"BoolVector",{enumerable:!0,get:function(){return _e.BoolVector}});Object.defineProperty(w,"Chunked",{enumerable:!0,get:function(){return _e.Chunked}});Object.defineProperty(w,"DateVector",{enumerable:!0,get:function(){return _e.DateVector}});Object.defineProperty(w,"DateDayVector",{enumerable:!0,get:function(){return _e.DateDayVector}});Object.defineProperty(w,"DateMillisecondVector",{enumerable:!0,get:function(){return _e.DateMillisecondVector}});Object.defineProperty(w,"DecimalVector",{enumerable:!0,get:function(){return _e.DecimalVector}});Object.defineProperty(w,"DictionaryVector",{enumerable:!0,get:function(){return _e.DictionaryVector}});Object.defineProperty(w,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return _e.FixedSizeBinaryVector}});Object.defineProperty(w,"FixedSizeListVector",{enumerable:!0,get:function(){return _e.FixedSizeListVector}});Object.defineProperty(w,"FloatVector",{enumerable:!0,get:function(){return _e.FloatVector}});Object.defineProperty(w,"Float16Vector",{enumerable:!0,get:function(){return _e.Float16Vector}});Object.defineProperty(w,"Float32Vector",{enumerable:!0,get:function(){return _e.Float32Vector}});Object.defineProperty(w,"Float64Vector",{enumerable:!0,get:function(){return _e.Float64Vector}});Object.defineProperty(w,"IntervalVector",{enumerable:!0,get:function(){return _e.IntervalVector}});Object.defineProperty(w,"IntervalDayTimeVector",{enumerable:!0,get:function(){return _e.IntervalDayTimeVector}});Object.defineProperty(w,"IntervalYearMonthVector",{enumerable:!0,get:function(){return _e.IntervalYearMonthVector}});Object.defineProperty(w,"IntVector",{enumerable:!0,get:function(){return _e.IntVector}});Object.defineProperty(w,"Int8Vector",{enumerable:!0,get:function(){return _e.Int8Vector}});Object.defineProperty(w,"Int16Vector",{enumerable:!0,get:function(){return _e.Int16Vector}});Object.defineProperty(w,"Int32Vector",{enumerable:!0,get:function(){return _e.Int32Vector}});Object.defineProperty(w,"Int64Vector",{enumerable:!0,get:function(){return _e.Int64Vector}});Object.defineProperty(w,"Uint8Vector",{enumerable:!0,get:function(){return _e.Uint8Vector}});Object.defineProperty(w,"Uint16Vector",{enumerable:!0,get:function(){return _e.Uint16Vector}});Object.defineProperty(w,"Uint32Vector",{enumerable:!0,get:function(){return _e.Uint32Vector}});Object.defineProperty(w,"Uint64Vector",{enumerable:!0,get:function(){return _e.Uint64Vector}});Object.defineProperty(w,"ListVector",{enumerable:!0,get:function(){return _e.ListVector}});Object.defineProperty(w,"MapVector",{enumerable:!0,get:function(){return _e.MapVector}});Object.defineProperty(w,"NullVector",{enumerable:!0,get:function(){return _e.NullVector}});Object.defineProperty(w,"StructVector",{enumerable:!0,get:function(){return _e.StructVector}});Object.defineProperty(w,"TimestampVector",{enumerable:!0,get:function(){return _e.TimestampVector}});Object.defineProperty(w,"TimestampSecondVector",{enumerable:!0,get:function(){return _e.TimestampSecondVector}});Object.defineProperty(w,"TimestampMillisecondVector",{enumerable:!0,get:function(){return _e.TimestampMillisecondVector}});Object.defineProperty(w,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return _e.TimestampMicrosecondVector}});Object.defineProperty(w,"TimestampNanosecondVector",{enumerable:!0,get:function(){return _e.TimestampNanosecondVector}});Object.defineProperty(w,"TimeVector",{enumerable:!0,get:function(){return _e.TimeVector}});Object.defineProperty(w,"TimeSecondVector",{enumerable:!0,get:function(){return _e.TimeSecondVector}});Object.defineProperty(w,"TimeMillisecondVector",{enumerable:!0,get:function(){return _e.TimeMillisecondVector}});Object.defineProperty(w,"TimeMicrosecondVector",{enumerable:!0,get:function(){return _e.TimeMicrosecondVector}});Object.defineProperty(w,"TimeNanosecondVector",{enumerable:!0,get:function(){return _e.TimeNanosecondVector}});Object.defineProperty(w,"UnionVector",{enumerable:!0,get:function(){return _e.UnionVector}});Object.defineProperty(w,"DenseUnionVector",{enumerable:!0,get:function(){return _e.DenseUnionVector}});Object.defineProperty(w,"SparseUnionVector",{enumerable:!0,get:function(){return _e.SparseUnionVector}});Object.defineProperty(w,"Utf8Vector",{enumerable:!0,get:function(){return _e.Utf8Vector}});var je=lc();Object.defineProperty(w,"Builder",{enumerable:!0,get:function(){return je.Builder}});Object.defineProperty(w,"BinaryBuilder",{enumerable:!0,get:function(){return je.BinaryBuilder}});Object.defineProperty(w,"BoolBuilder",{enumerable:!0,get:function(){return je.BoolBuilder}});Object.defineProperty(w,"DateBuilder",{enumerable:!0,get:function(){return je.DateBuilder}});Object.defineProperty(w,"DateDayBuilder",{enumerable:!0,get:function(){return je.DateDayBuilder}});Object.defineProperty(w,"DateMillisecondBuilder",{enumerable:!0,get:function(){return je.DateMillisecondBuilder}});Object.defineProperty(w,"DecimalBuilder",{enumerable:!0,get:function(){return je.DecimalBuilder}});Object.defineProperty(w,"DictionaryBuilder",{enumerable:!0,get:function(){return je.DictionaryBuilder}});Object.defineProperty(w,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return je.FixedSizeBinaryBuilder}});Object.defineProperty(w,"FixedSizeListBuilder",{enumerable:!0,get:function(){return je.FixedSizeListBuilder}});Object.defineProperty(w,"FloatBuilder",{enumerable:!0,get:function(){return je.FloatBuilder}});Object.defineProperty(w,"Float16Builder",{enumerable:!0,get:function(){return je.Float16Builder}});Object.defineProperty(w,"Float32Builder",{enumerable:!0,get:function(){return je.Float32Builder}});Object.defineProperty(w,"Float64Builder",{enumerable:!0,get:function(){return je.Float64Builder}});Object.defineProperty(w,"IntervalBuilder",{enumerable:!0,get:function(){return je.IntervalBuilder}});Object.defineProperty(w,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return je.IntervalDayTimeBuilder}});Object.defineProperty(w,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return je.IntervalYearMonthBuilder}});Object.defineProperty(w,"IntBuilder",{enumerable:!0,get:function(){return je.IntBuilder}});Object.defineProperty(w,"Int8Builder",{enumerable:!0,get:function(){return je.Int8Builder}});Object.defineProperty(w,"Int16Builder",{enumerable:!0,get:function(){return je.Int16Builder}});Object.defineProperty(w,"Int32Builder",{enumerable:!0,get:function(){return je.Int32Builder}});Object.defineProperty(w,"Int64Builder",{enumerable:!0,get:function(){return je.Int64Builder}});Object.defineProperty(w,"Uint8Builder",{enumerable:!0,get:function(){return je.Uint8Builder}});Object.defineProperty(w,"Uint16Builder",{enumerable:!0,get:function(){return je.Uint16Builder}});Object.defineProperty(w,"Uint32Builder",{enumerable:!0,get:function(){return je.Uint32Builder}});Object.defineProperty(w,"Uint64Builder",{enumerable:!0,get:function(){return je.Uint64Builder}});Object.defineProperty(w,"ListBuilder",{enumerable:!0,get:function(){return je.ListBuilder}});Object.defineProperty(w,"MapBuilder",{enumerable:!0,get:function(){return je.MapBuilder}});Object.defineProperty(w,"NullBuilder",{enumerable:!0,get:function(){return je.NullBuilder}});Object.defineProperty(w,"StructBuilder",{enumerable:!0,get:function(){return je.StructBuilder}});Object.defineProperty(w,"TimestampBuilder",{enumerable:!0,get:function(){return je.TimestampBuilder}});Object.defineProperty(w,"TimestampSecondBuilder",{enumerable:!0,get:function(){return je.TimestampSecondBuilder}});Object.defineProperty(w,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return je.TimestampMillisecondBuilder}});Object.defineProperty(w,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return je.TimestampMicrosecondBuilder}});Object.defineProperty(w,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return je.TimestampNanosecondBuilder}});Object.defineProperty(w,"TimeBuilder",{enumerable:!0,get:function(){return je.TimeBuilder}});Object.defineProperty(w,"TimeSecondBuilder",{enumerable:!0,get:function(){return je.TimeSecondBuilder}});Object.defineProperty(w,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return je.TimeMillisecondBuilder}});Object.defineProperty(w,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return je.TimeMicrosecondBuilder}});Object.defineProperty(w,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return je.TimeNanosecondBuilder}});Object.defineProperty(w,"UnionBuilder",{enumerable:!0,get:function(){return je.UnionBuilder}});Object.defineProperty(w,"DenseUnionBuilder",{enumerable:!0,get:function(){return je.DenseUnionBuilder}});Object.defineProperty(w,"SparseUnionBuilder",{enumerable:!0,get:function(){return je.SparseUnionBuilder}});Object.defineProperty(w,"Utf8Builder",{enumerable:!0,get:function(){return je.Utf8Builder}});var A_=en();Object.defineProperty(w,"ByteStream",{enumerable:!0,get:function(){return A_.ByteStream}});Object.defineProperty(w,"AsyncByteStream",{enumerable:!0,get:function(){return A_.AsyncByteStream}});Object.defineProperty(w,"AsyncByteQueue",{enumerable:!0,get:function(){return A_.AsyncByteQueue}});var Pa=Ca();Object.defineProperty(w,"RecordBatchReader",{enumerable:!0,get:function(){return Pa.RecordBatchReader}});Object.defineProperty(w,"RecordBatchFileReader",{enumerable:!0,get:function(){return Pa.RecordBatchFileReader}});Object.defineProperty(w,"RecordBatchStreamReader",{enumerable:!0,get:function(){return Pa.RecordBatchStreamReader}});Object.defineProperty(w,"AsyncRecordBatchFileReader",{enumerable:!0,get:function(){return Pa.AsyncRecordBatchFileReader}});Object.defineProperty(w,"AsyncRecordBatchStreamReader",{enumerable:!0,get:function(){return Pa.AsyncRecordBatchStreamReader}});var _l=Ec();Object.defineProperty(w,"RecordBatchWriter",{enumerable:!0,get:function(){return _l.RecordBatchWriter}});Object.defineProperty(w,"RecordBatchFileWriter",{enumerable:!0,get:function(){return _l.RecordBatchFileWriter}});Object.defineProperty(w,"RecordBatchStreamWriter",{enumerable:!0,get:function(){return _l.RecordBatchStreamWriter}});Object.defineProperty(w,"RecordBatchJSONWriter",{enumerable:!0,get:function(){return _l.RecordBatchJSONWriter}});var D_=Tc();Object.defineProperty(w,"MessageReader",{enumerable:!0,get:function(){return D_.MessageReader}});Object.defineProperty(w,"AsyncMessageReader",{enumerable:!0,get:function(){return D_.AsyncMessageReader}});Object.defineProperty(w,"JSONMessageReader",{enumerable:!0,get:function(){return D_.JSONMessageReader}});var aU=Qn();Object.defineProperty(w,"Message",{enumerable:!0,get:function(){return aU.Message}});var uU=Ai();Object.defineProperty(w,"RecordBatch",{enumerable:!0,get:function(){return uU.RecordBatch}});var F_=S1();Object.defineProperty(w,"DataFrame",{enumerable:!0,get:function(){return F_.DataFrame}});Object.defineProperty(w,"FilteredDataFrame",{enumerable:!0,get:function(){return F_.FilteredDataFrame}});Object.defineProperty(w,"CountByResult",{enumerable:!0,get:function(){return F_.CountByResult}});var cU=aa(),lU=Uh(),dU=Xr(),fU=ia(),hU=gt(),pU=_a(),_U=B_();w.predicate=_U;var I_=Zh();w.util=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},cU),lU),dU),fU),hU),pU),{compareSchemas:I_.compareSchemas,compareFields:I_.compareFields,compareTypes:I_.compareTypes});var yU=Jn();Object.defineProperty(w,"isTypedArray",{enumerable:!0,get:function(){return yU.isTypedArray}})});var W1=V((exports,module)=>{(function(){"use strict";var ERROR="input is invalid type",WINDOW=typeof window=="object",root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&typeof self=="object",NODE_JS=!root.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,AMD=typeof define=="function"&&define.amd,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];(root.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(r){return Object.prototype.toString.call(r)==="[object Array]"}),ARRAY_BUFFER&&(root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(r){return typeof r=="object"&&r.buffer&&r.buffer.constructor===ArrayBuffer});var createOutputMethod=function(r,e){return function(t){return new Sha256(e,!0).update(t)[r]()}},createMethod=function(r){var e=createOutputMethod("hex",r);NODE_JS&&(e=nodeWrap(e,r)),e.create=function(){return new Sha256(r)},e.update=function(n){return e.create().update(n)};for(var t=0;t<OUTPUT_TYPES.length;++t){var i=OUTPUT_TYPES[t];e[i]=createOutputMethod(i,r)}return e},nodeWrap=function(method,is224){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),algorithm=is224?"sha224":"sha256",nodeMethod=function(r){if(typeof r=="string")return crypto.createHash(algorithm).update(r,"utf8").digest("hex");if(r==null)throw new Error(ERROR);return r.constructor===ArrayBuffer&&(r=new Uint8Array(r)),Array.isArray(r)||ArrayBuffer.isView(r)||r.constructor===Buffer?crypto.createHash(algorithm).update(new Buffer(r)).digest("hex"):method(r)};return nodeMethod},createHmacOutputMethod=function(r,e){return function(t,i){return new HmacSha256(t,e,!0).update(i)[r]()}},createHmacMethod=function(r){var e=createHmacOutputMethod("hex",r);e.create=function(n){return new HmacSha256(n,r)},e.update=function(n,s){return e.create(n).update(s)};for(var t=0;t<OUTPUT_TYPES.length;++t){var i=OUTPUT_TYPES[t];e[i]=createHmacOutputMethod(i,r)}return e};function Sha256(r,e){e?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=r}Sha256.prototype.update=function(r){if(!this.finalized){var e,t=typeof r;if(t!=="string"){if(t==="object"){if(r===null)throw new Error(ERROR);if(ARRAY_BUFFER&&r.constructor===ArrayBuffer)r=new Uint8Array(r);else if(!Array.isArray(r)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(r)))throw new Error(ERROR)}else throw new Error(ERROR);e=!0}for(var i,n=0,s,u=r.length,p=this.blocks;n<u;){if(this.hashed&&(this.hashed=!1,p[0]=this.block,p[16]=p[1]=p[2]=p[3]=p[4]=p[5]=p[6]=p[7]=p[8]=p[9]=p[10]=p[11]=p[12]=p[13]=p[14]=p[15]=0),e)for(s=this.start;n<u&&s<64;++n)p[s>>2]|=r[n]<<SHIFT[s++&3];else for(s=this.start;n<u&&s<64;++n)i=r.charCodeAt(n),i<128?p[s>>2]|=i<<SHIFT[s++&3]:i<2048?(p[s>>2]|=(192|i>>6)<<SHIFT[s++&3],p[s>>2]|=(128|i&63)<<SHIFT[s++&3]):i<55296||i>=57344?(p[s>>2]|=(224|i>>12)<<SHIFT[s++&3],p[s>>2]|=(128|i>>6&63)<<SHIFT[s++&3],p[s>>2]|=(128|i&63)<<SHIFT[s++&3]):(i=65536+((i&1023)<<10|r.charCodeAt(++n)&1023),p[s>>2]|=(240|i>>18)<<SHIFT[s++&3],p[s>>2]|=(128|i>>12&63)<<SHIFT[s++&3],p[s>>2]|=(128|i>>6&63)<<SHIFT[s++&3],p[s>>2]|=(128|i&63)<<SHIFT[s++&3]);this.lastByteIndex=s,this.bytes+=s-this.start,s>=64?(this.block=p[16],this.start=s-64,this.hash(),this.hashed=!0):this.start=s}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var r=this.blocks,e=this.lastByteIndex;r[16]=this.block,r[e>>2]|=EXTRA[e&3],this.block=r[16],e>=56&&(this.hashed||this.hash(),r[0]=this.block,r[16]=r[1]=r[2]=r[3]=r[4]=r[5]=r[6]=r[7]=r[8]=r[9]=r[10]=r[11]=r[12]=r[13]=r[14]=r[15]=0),r[14]=this.hBytes<<3|this.bytes>>>29,r[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var r=this.h0,e=this.h1,t=this.h2,i=this.h3,n=this.h4,s=this.h5,u=this.h6,p=this.h7,m=this.blocks,B,O,R,W,N,Se,ye,Ee,qe,Tt,Nr;for(B=16;B<64;++B)N=m[B-15],O=(N>>>7|N<<25)^(N>>>18|N<<14)^N>>>3,N=m[B-2],R=(N>>>17|N<<15)^(N>>>19|N<<13)^N>>>10,m[B]=m[B-16]+O+m[B-7]+R<<0;for(Nr=e&t,B=0;B<64;B+=4)this.first?(this.is224?(Ee=300032,N=m[0]-1413257819,p=N-150054599<<0,i=N+24177077<<0):(Ee=704751109,N=m[0]-210244248,p=N-1521486534<<0,i=N+143694565<<0),this.first=!1):(O=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),R=(n>>>6|n<<26)^(n>>>11|n<<21)^(n>>>25|n<<7),Ee=r&e,W=Ee^r&t^Nr,ye=n&s^~n&u,N=p+R+ye+K[B]+m[B],Se=O+W,p=i+N<<0,i=N+Se<<0),O=(i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10),R=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7),qe=i&r,W=qe^i&e^Ee,ye=p&n^~p&s,N=u+R+ye+K[B+1]+m[B+1],Se=O+W,u=t+N<<0,t=N+Se<<0,O=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),R=(u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7),Tt=t&i,W=Tt^t&r^qe,ye=u&p^~u&n,N=s+R+ye+K[B+2]+m[B+2],Se=O+W,s=e+N<<0,e=N+Se<<0,O=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),R=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),Nr=e&t,W=Nr^e&i^Tt,ye=s&u^~s&p,N=n+R+ye+K[B+3]+m[B+3],Se=O+W,n=r+N<<0,r=N+Se<<0;this.h0=this.h0+r<<0,this.h1=this.h1+e<<0,this.h2=this.h2+t<<0,this.h3=this.h3+i<<0,this.h4=this.h4+n<<0,this.h5=this.h5+s<<0,this.h6=this.h6+u<<0,this.h7=this.h7+p<<0},Sha256.prototype.hex=function(){this.finalize();var r=this.h0,e=this.h1,t=this.h2,i=this.h3,n=this.h4,s=this.h5,u=this.h6,p=this.h7,m=HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[r&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[e&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[t&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[i&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[n&15]+HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[s&15]+HEX_CHARS[u>>28&15]+HEX_CHARS[u>>24&15]+HEX_CHARS[u>>20&15]+HEX_CHARS[u>>16&15]+HEX_CHARS[u>>12&15]+HEX_CHARS[u>>8&15]+HEX_CHARS[u>>4&15]+HEX_CHARS[u&15];return this.is224||(m+=HEX_CHARS[p>>28&15]+HEX_CHARS[p>>24&15]+HEX_CHARS[p>>20&15]+HEX_CHARS[p>>16&15]+HEX_CHARS[p>>12&15]+HEX_CHARS[p>>8&15]+HEX_CHARS[p>>4&15]+HEX_CHARS[p&15]),m},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var r=this.h0,e=this.h1,t=this.h2,i=this.h3,n=this.h4,s=this.h5,u=this.h6,p=this.h7,m=[r>>24&255,r>>16&255,r>>8&255,r&255,e>>24&255,e>>16&255,e>>8&255,e&255,t>>24&255,t>>16&255,t>>8&255,t&255,i>>24&255,i>>16&255,i>>8&255,i&255,n>>24&255,n>>16&255,n>>8&255,n&255,s>>24&255,s>>16&255,s>>8&255,s&255,u>>24&255,u>>16&255,u>>8&255,u&255];return this.is224||m.push(p>>24&255,p>>16&255,p>>8&255,p&255),m},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var r=new ArrayBuffer(this.is224?28:32),e=new DataView(r);return e.setUint32(0,this.h0),e.setUint32(4,this.h1),e.setUint32(8,this.h2),e.setUint32(12,this.h3),e.setUint32(16,this.h4),e.setUint32(20,this.h5),e.setUint32(24,this.h6),this.is224||e.setUint32(28,this.h7),r};function HmacSha256(r,e,t){var i,n=typeof r;if(n==="string"){var s=[],u=r.length,p=0,m;for(i=0;i<u;++i)m=r.charCodeAt(i),m<128?s[p++]=m:m<2048?(s[p++]=192|m>>6,s[p++]=128|m&63):m<55296||m>=57344?(s[p++]=224|m>>12,s[p++]=128|m>>6&63,s[p++]=128|m&63):(m=65536+((m&1023)<<10|r.charCodeAt(++i)&1023),s[p++]=240|m>>18,s[p++]=128|m>>12&63,s[p++]=128|m>>6&63,s[p++]=128|m&63);r=s}else if(n==="object"){if(r===null)throw new Error(ERROR);if(ARRAY_BUFFER&&r.constructor===ArrayBuffer)r=new Uint8Array(r);else if(!Array.isArray(r)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(r)))throw new Error(ERROR)}else throw new Error(ERROR);r.length>64&&(r=new Sha256(e,!0).update(r).array());var B=[],O=[];for(i=0;i<64;++i){var R=r[i]||0;B[i]=92^R,O[i]=54^R}Sha256.call(this,e,t),this.update(O),this.oKeyPad=B,this.inner=!0,this.sharedMemory=t}HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var r=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(r),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&define(function(){return exports}))})()});var Ha=V(()=>{});var H_=V(()=>{});var F1=Wr(ta(),1),O1=Wr(lc(),1),Ao=Wr(Ca(),1),Do=Wr(Ec(),1),k1=Wr(p1(),1),C1=Wr(m1(),1),yl=Wr(b1(),1),ml=Wr(g1(),1),F=Wr(D1(),1);F1.default.toDOMStream=k1.toDOMStream;O1.Builder.throughDOM=C1.builderThroughDOMStream;Ao.RecordBatchReader.throughDOM=yl.recordBatchReaderThroughDOMStream;Ao.RecordBatchFileReader.throughDOM=yl.recordBatchReaderThroughDOMStream;Ao.RecordBatchStreamReader.throughDOM=yl.recordBatchReaderThroughDOMStream;Do.RecordBatchWriter.throughDOM=ml.recordBatchWriterThroughDOMStream;Do.RecordBatchFileWriter.throughDOM=ml.recordBatchWriterThroughDOMStream;Do.RecordBatchStreamWriter.throughDOM=ml.recordBatchWriterThroughDOMStream;var O_=class{constructor(e,t){this._bindings=e,this._conn=t}close(){this._bindings.disconnect(this._conn)}useUnsafe(e){return e(this._bindings,this._conn)}query(e){let t=this._bindings.runQuery(this._conn,e),i=F.RecordBatchReader.from(t);return console.assert(i.isSync()),console.assert(i.isFile()),F.Table.from(i)}send(e){let t=this._bindings.sendQuery(this._conn,e),i=new k_(this._bindings,this._conn,t),n=F.RecordBatchReader.from(i);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 U1(this._bindings,this._conn,t)}createScalarFunction(e,t,i){this._bindings.createScalarFunction(this._conn,e,t,i)}insertArrowTable(e,t){let i=e.serialize("binary",!0);this.insertArrowFromIPCStream(i,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)}},k_=class{constructor(e,t,i){this.bindings=e;this.conn=t;this.header=i;this._first=!0,this._depleted=!1}next(){if(this._first)return this._first=!1,{done:!1,value:this.header};if(this._depleted)return{done:!0,value:null};let e=this.bindings.fetchQueryResults(this.conn);return this._depleted=e.length==0,{done:this._depleted,value:e}}[Symbol.iterator](){return this}},U1=class{constructor(e,t,i){this.bindings=e,this.connectionId=t,this.statementId=i}close(){this.bindings.closePrepared(this.connectionId,this.statementId)}query(...e){let t=this.bindings.runPrepared(this.connectionId,this.statementId,e),i=F.RecordBatchReader.from(t);return console.assert(i.isSync()),console.assert(i.isFile()),F.Table.from(i)}send(...e){let t=this.bindings.sendPrepared(this.connectionId,this.statementId,e),i=new k_(this.bindings,this.connectionId,t),n=F.RecordBatchReader.from(i);return console.assert(n.isSync()),console.assert(n.isStream()),n}};var mU=(e=>(e[e.SUCCESS=0]="SUCCESS",e))(mU||{});var bU=new TextEncoder;function La(r,e,t){let i=bU.encode(t),n=r._malloc(i.byteLength),s=r.HEAPU8.subarray(n,n+i.byteLength);s.set(i),r.HEAPF64[(e>>3)+0]=1,r.HEAPF64[(e>>3)+1]=n,r.HEAPF64[(e>>3)+2]=s.byteLength}function C_(r){switch(r){case"UINT8":case"INT8":return 1;case"INT32":case"FLOAT":return 4;case"INT64":case"UINT64":case"DOUBLE":case"VARCHAR":return 8;default:return 0}}function bn(r,e,t,i){let n=r.HEAPU8.subarray(e,e+i*C_(t));switch(t){case"UINT8":return new Uint8Array(n.buffer,n.byteOffset,i);case"INT8":return new Int8Array(n.buffer,n.byteOffset,i);case"INT32":return new Int32Array(n.buffer,n.byteOffset,i);case"FLOAT":return new Float32Array(n.buffer,n.byteOffset,i);case"DOUBLE":return new Float64Array(n.buffer,n.byteOffset,i);case"VARCHAR":return new Float64Array(n.buffer,n.byteOffset,i);default:return new Array(0)}}function bl(r,e,t,i,n,s,u,p){try{let m=r._udfFunctions.get(i);if(!m){La(e,t,"Unknown UDF with id: "+i);return}let B=new TextDecoder().decode(e.HEAPU8.subarray(n,n+s)),O=JSON.parse(B),R=bn(e,u,"DOUBLE",p/8),W=[],N=[];for(let ge in O.args){let Ne=O.args[ge],ze=bn(e,R[Ne.data_buffer],Ne.physical_type,O.rows),tr=bn(e,R[Ne.validity_buffer],"UINT8",O.rows);if(ze.length==0||tr.length==0){La(e,t,"Can't create physical arrays for argument "+Ne.physical_type);return}if(W.push(tr),Ne.physical_type=="VARCHAR"){let Vt=bn(e,R[Ne.length_buffer],"DOUBLE",O.rows),rr=[],Kt=new TextDecoder;for(let Ye=0;Ye<O.rows;++Ye){if(!tr[Ye]){rr.push(void 0);continue}let Jt=e.HEAPU8.subarray(ze[Ye],ze[Ye]+Vt[Ye]),Bn=Kt.decode(Jt);rr.push(Bn)}N.push(rr)}else N.push(ze)}let Se=O.rows*C_(O.ret.physical_type),ye=e._malloc(Se),Ee=bn(e,ye,O.ret.physical_type,O.rows),qe=e._malloc(O.rows),Tt=bn(e,qe,"UINT8",O.rows);if(Ee.length==0||Tt.length==0){La(e,t,"Can't create physical arrays for result");return}let Nr=Ee;switch(O.ret.physical_type=="VARCHAR"&&(Ee=new Array(O.rows)),O.args.length){case 0:for(let ge=0;ge<O.rows;++ge){let Ne=m.func();Ee[ge]=Ne,Tt[ge]=Ne==null?0:1}break;case 1:for(let ge=0;ge<O.rows;++ge){let Ne=m.func(W[0][ge]?N[0][ge]:void 0);Ee[ge]=Ne,Tt[ge]=Ne==null?0:1}break;case 2:for(let ge=0;ge<O.rows;++ge){let Ne=m.func(W[0][ge]?N[0][ge]:void 0,W[1][ge]?N[1][ge]:void 0);Ee[ge]=Ne,Tt[ge]=Ne==null?0:1}break;default:La(e,t,"Can't deal with argument count: "+O.args.length);return}let Sr=0;if(O.ret.physical_type=="VARCHAR"){let ge=new TextEncoder,Ne=new Array(0),ze=0;Sr=e._malloc(O.rows*C_("DOUBLE"));let tr=bn(e,Sr,"DOUBLE",O.rows);for(let Ye=0;Ye<O.rows;++Ye)Ne[Ye]=ge.encode(Ee[Ye]),ze+=Ne[Ye].length,tr[Ye]=Ne[Ye].length;let Vt=e._malloc(ze),rr=e.HEAPU8.subarray(Vt,Vt+ze),Kt=0;Ee=Nr;for(let Ye=0;Ye<O.rows;++Ye){Ee[Ye]=Vt+Kt;for(let Jt=0;Jt<Ne[Ye].length;Jt++)rr[Kt+Jt]=Ne[Ye][Jt];Kt+=Ne[Ye].length}}let Ir=3*8,Pr=e._malloc(Ir),jn=bn(e,Pr,"DOUBLE",3);jn[0]=ye,jn[1]=qe,jn[2]=Sr,e.HEAPF64[(t>>3)+0]=0,e.HEAPF64[(t>>3)+1]=Pr,e.HEAPF64[(t>>3)+2]=0}catch(m){La(e,t,m.toString())}}function gU(){let r=new TextDecoder;return e=>(typeof SharedArrayBuffer<"u"&&e.buffer instanceof SharedArrayBuffer&&(e=new Uint8Array(e)),r.decode(e))}var vU=gU();function hi(r,e){r.ccall("duckdb_web_fail_with",null,["string"],[e])}function Fo(r,e,t){let i=r.HEAPU8.subarray(e,e+t),n=new Uint8Array(new ArrayBuffer(i.byteLength));return n.set(i),n}function Ae(r,e,t){return vU(r.HEAPU8.subarray(e,e+t))}var R1=(n=>(n[n.BUFFER=0]="BUFFER",n[n.NATIVE=1]="NATIVE",n[n.HTTP=3]="HTTP",n[n.S3=4]="S3",n))(R1||{}),x1=(u=>(u[u.FILE_FLAGS_READ=1]="FILE_FLAGS_READ",u[u.FILE_FLAGS_WRITE=2]="FILE_FLAGS_WRITE",u[u.FILE_FLAGS_DIRECT_IO=4]="FILE_FLAGS_DIRECT_IO",u[u.FILE_FLAGS_FILE_CREATE=8]="FILE_FLAGS_FILE_CREATE",u[u.FILE_FLAGS_FILE_CREATE_NEW=16]="FILE_FLAGS_FILE_CREATE_NEW",u[u.FILE_FLAGS_APPEND=32]="FILE_FLAGS_APPEND",u))(x1||{});function He(r,e,t,i){let n=r.stackSave(),s=r.stackAlloc(3*8);t.unshift("number"),i.unshift(s),r.ccall(e,null,t,i);let u=r.HEAPF64[(s>>3)+0],p=r.HEAPF64[(s>>3)+1],m=r.HEAPF64[(s>>3)+2];return r.stackRestore(n),[u,p,m]}function Ze(r){r.ccall("duckdb_web_clear_response",null,[],[])}var V1={_udfFunctions:new Map,testPlatformFeature:(r,e)=>!1,openFile:(r,e,t)=>{},syncFile:(r,e)=>{},closeFile:(r,e)=>{},getLastFileModificationTime:(r,e)=>0,truncateFile:(r,e,t)=>{},readFile:(r,e,t,i,n)=>0,writeFile:(r,e,t,i,n)=>0,removeDirectory:(r,e,t)=>{},checkDirectory:(r,e,t)=>!1,createDirectory:(r,e,t)=>{},listDirectoryEntries:(r,e,t)=>!1,glob:(r,e,t)=>{},moveFile:(r,e,t,i,n)=>{},checkFile:(r,e,t)=>!1,removeFile:(r,e,t)=>{},callScalarUDF:(r,e,t,i,n,s,u)=>{bl(V1,r,e,t,i,n,s,u)}};var M_=class{constructor(e){let t=new Float64Array(e.buffer,e.byteOffset,e.byteLength/8),i=new Uint8Array(new ArrayBuffer(e.byteLength));i.set(e.subarray(7*8)),this.totalFileReadsCold=t[0],this.totalFileReadsAhead=t[1],this.totalFileReadsCached=t[2],this.totalFileWrites=t[3],this.totalPageAccesses=t[4],this.totalPageLoads=t[5],this.blockSize=t[6],this.blockStats=i}getBlockStats(e,t){return t=t||{file_reads_cold:0,file_reads_ahead:0,file_reads_cached:0,file_writes:0,page_accesses:0,page_loads:0},t.file_writes=this.blockStats[e*3+0]&15,t.file_reads_cold=this.blockStats[e*3+0]>>4,t.file_reads_ahead=this.blockStats[e*3+1]&15,t.file_reads_cached=this.blockStats[e*3+1]>>4,t.page_accesses=this.blockStats[e*3+1]&15,t.page_loads=this.blockStats[e*3+1]>>4,t}};function U_(r){switch(r.typeId){case F.Type.Binary:return{type:"binary"};case F.Type.Bool:return{type:"bool"};case F.Type.Date:return{type:"date"};case F.Type.DateDay:return{type:"date32[d]"};case F.Type.DateMillisecond:return{type:"date64[ms]"};case F.Type.Decimal:{let e=r;return{type:"decimal",precision:e.precision,scale:e.scale}}case F.Type.Float:return{type:"float"};case F.Type.Float16:return{type:"float16"};case F.Type.Float32:return{type:"float32"};case F.Type.Float64:return{type:"float64"};case F.Type.Int:return{type:"int32"};case F.Type.Int16:return{type:"int16"};case F.Type.Int32:return{type:"int32"};case F.Type.Int64:return{type:"int64"};case F.Type.Uint16:return{type:"uint16"};case F.Type.Uint32:return{type:"uint32"};case F.Type.Uint64:return{type:"uint64"};case F.Type.Uint8:return{type:"uint8"};case F.Type.IntervalDayTime:return{type:"interval[dt]"};case F.Type.IntervalYearMonth:return{type:"interval[m]"};case F.Type.List:{let e=r;return{type:"list",children:[qa(e.valueField.name,e.valueField.type)]}}case F.Type.FixedSizeBinary:return{type:"fixedsizebinary",byteWidth:r.byteWidth};case F.Type.Null:return{type:"null"};case F.Type.Utf8:return{type:"utf8"};case F.Type.Struct:return{type:"struct",children:r.children.map(t=>qa(t.name,t.type))};case F.Type.Time:return{type:"time[s]"};case F.Type.TimeMicrosecond:return{type:"time[us]"};case F.Type.TimeMillisecond:return{type:"time[ms]"};case F.Type.TimeNanosecond:return{type:"time[ns]"};case F.Type.TimeSecond:return{type:"time[s]"};case F.Type.Timestamp:return{type:"timestamp",timezone:r.timezone||void 0};case F.Type.TimestampSecond:return{type:"timestamp[s]",timezone:r.timezone||void 0};case F.Type.TimestampMicrosecond:return{type:"timestamp[us]",timezone:r.timezone||void 0};case F.Type.TimestampNanosecond:return{type:"timestamp[ns]",timezone:r.timezone||void 0};case F.Type.TimestampMillisecond:return{type:"timestamp[ms]",timezone:r.timezone||void 0}}throw new Error(`unsupported arrow type: ${r.toString()}`)}function qa(r,e){let t=U_(e);return t.name=r,t}var wU=new TextEncoder,jU=(s=>(s[s.WASM_EXCEPTIONS=1]="WASM_EXCEPTIONS",s[s.WASM_THREADS=2]="WASM_THREADS",s[s.WASM_SIMD=4]="WASM_SIMD",s[s.WASM_BULK_MEMORY=8]="WASM_BULK_MEMORY",s[s.EMIT_BIGINT=16]="EMIT_BIGINT",s))(jU||{}),E_=class{constructor(e,t){this._instance=null;this._initPromise=null;this._initPromiseResolver=()=>{};this.onInstantiationProgress=[];this._logger=e,this._runtime=t,this._nextUDFId=1}get logger(){return this._logger}get mod(){return this._instance}get pthread(){return this.mod.PThread||null}async instantiate(e=t=>{}){return this._instance!=null?this:(this._initPromise!=null&&(this.onInstantiationProgress.push(e),await this._initPromise),this._initPromise=new Promise(t=>{this._initPromiseResolver=t}),this.onInstantiationProgress=[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.onInstantiationProgress=this.onInstantiationProgress.filter(t=>t!=e),this)}open(e){let[t,i,n]=He(this.mod,"duckdb_web_open",["string"],[JSON.stringify(e)]);if(t!==0)throw new Error(Ae(this.mod,i,n));Ze(this.mod)}reset(){let[e,t,i]=He(this.mod,"duckdb_web_reset",[],[]);if(e!==0)throw new Error(Ae(this.mod,t,i));Ze(this.mod)}getVersion(){let[e,t,i]=He(this.mod,"duckdb_web_get_version",[],[]);if(e!==0)throw new Error(Ae(this.mod,t,i));let n=Ae(this.mod,t,i);return Ze(this.mod),n}getFeatureFlags(){return this.mod.ccall("duckdb_web_get_feature_flags","number",[],[])}tokenize(e){let[t,i,n]=He(this.mod,"duckdb_web_tokenize",["string"],[e]);if(t!==0)throw new Error(Ae(this.mod,i,n));let s=Ae(this.mod,i,n);return Ze(this.mod),JSON.parse(s)}connect(){let e=this.mod.ccall("duckdb_web_connect","number",[],[]);return new O_(this,e)}disconnect(e){if(this.mod.ccall("duckdb_web_disconnect",null,["number"],[e]),this.pthread)for(let t of[...this.pthread.runningWorkers,...this.pthread.unusedWorkers])t.postMessage({cmd:"dropUDFFunctions",connectionId:e})}runQuery(e,t){let[i,n,s]=He(this.mod,"duckdb_web_query_run",["number","string"],[e,t]);if(i!==0)throw new Error(Ae(this.mod,n,s));let u=Fo(this.mod,n,s);return Ze(this.mod),u}sendQuery(e,t){let[i,n,s]=He(this.mod,"duckdb_web_query_send",["number","string"],[e,t]);if(i!==0)throw new Error(Ae(this.mod,n,s));let u=Fo(this.mod,n,s);return Ze(this.mod),u}fetchQueryResults(e){let[t,i,n]=He(this.mod,"duckdb_web_query_fetch_results",["number"],[e]);if(t!==0)throw new Error(Ae(this.mod,i,n));let s=Fo(this.mod,i,n);return Ze(this.mod),s}getTableNames(e,t){let[i,n,s]=He(this.mod,"duckdb_web_get_tablenames",["number","string"],[e,t]);if(i!==0)throw new Error(Ae(this.mod,n,s));let u=Ae(this.mod,n,s);return Ze(this.mod),JSON.parse(u)}createScalarFunction(e,t,i,n){let s={functionId:this._nextUDFId,name:t,returnType:U_(i)},u={functionId:s.functionId,connectionId:e,name:t,returnType:i,func:n};this._nextUDFId+=1;let[p,m,B]=He(this.mod,"duckdb_web_udf_scalar_create",["number","string"],[e,JSON.stringify(s)]);if(p!==0)throw new Error(Ae(this.mod,m,B));if(Ze(this.mod),globalThis.DUCKDB_RUNTIME._udfFunctions=(globalThis.DUCKDB_RUNTIME._udfFunctions||new Map).set(u.functionId,u),this.pthread)for(let O of[...this.pthread.runningWorkers,...this.pthread.unusedWorkers])O.postMessage({cmd:"registerUDFFunction",udf:u})}createPrepared(e,t){let[i,n,s]=He(this.mod,"duckdb_web_prepared_create",["number","string"],[e,t]);if(i!==0)throw new Error(Ae(this.mod,n,s));return Ze(this.mod),n}closePrepared(e,t){let[i,n,s]=He(this.mod,"duckdb_web_prepared_close",["number","number"],[e,t]);if(i!==0)throw new Error(Ae(this.mod,n,s));Ze(this.mod)}runPrepared(e,t,i){let[n,s,u]=He(this.mod,"duckdb_web_prepared_run",["number","number","string"],[e,t,JSON.stringify(i)]);if(n!==0)throw new Error(Ae(this.mod,s,u));let p=Fo(this.mod,s,u);return Ze(this.mod),p}sendPrepared(e,t,i){let[n,s,u]=He(this.mod,"duckdb_web_prepared_send",["number","number","string"],[e,t,JSON.stringify(i)]);if(n!==0)throw new Error(Ae(this.mod,s,u));let p=Fo(this.mod,s,u);return Ze(this.mod),p}insertArrowFromIPCStream(e,t,i){if(t.length==0)return;let n=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(n,n+t.length).set(t);let u=i?JSON.stringify(i):"",[p,m,B]=He(this.mod,"duckdb_web_insert_arrow_from_ipc_stream",["number","number","number","string"],[e,n,t.length,u]);if(p!==0)throw new Error(Ae(this.mod,m,B))}insertCSVFromPath(e,t,i){if(i.columns!==void 0){i.columnsFlat=[];for(let B in i.columns)i.columnsFlat.push(qa(B,i.columns[B]))}let n=zr({},i);n.columns=n.columnsFlat,delete n.columnsFlat;let s=JSON.stringify(n),[u,p,m]=He(this.mod,"duckdb_web_insert_csv_from_path",["number","string","string"],[e,t,s]);if(u!==0)throw new Error(Ae(this.mod,p,m))}insertJSONFromPath(e,t,i){if(i.columns!==void 0){i.columnsFlat=[];for(let B in i.columns)i.columnsFlat.push(qa(B,i.columns[B]))}let n=zr({},i);n.columns=n.columnsFlat,delete n.columnsFlat;let s=JSON.stringify(n),[u,p,m]=He(this.mod,"duckdb_web_insert_json_from_path",["number","string","string"],[e,t,s]);if(u!==0)throw new Error(Ae(this.mod,p,m))}globFiles(e){let[t,i,n]=He(this.mod,"duckdb_web_fs_glob_file_infos",["string"],[e]);if(t!==0)throw new Error(Ae(this.mod,i,n));let s=Ae(this.mod,i,n);Ze(this.mod);let u=JSON.parse(s);return u==null?[]:u}registerFileURL(e,t){t===void 0&&(t=e);let[i,n,s]=He(this.mod,"duckdb_web_fs_register_file_url",["string","string","number"],[e,t,-1]);if(i!==0)throw new Error(Ae(this.mod,n,s));Ze(this.mod)}registerFileText(e,t){let i=wU.encode(t);this.registerFileBuffer(e,i)}registerFileBuffer(e,t){let i=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(i,i+t.length).set(t);let[s,u,p]=He(this.mod,"duckdb_web_fs_register_file_buffer",["string","number","number"],[e,i,t.length]);if(s!==0)throw new Error(Ae(this.mod,u,p));Ze(this.mod)}registerFileHandle(e,t){let[i,n,s]=He(this.mod,"duckdb_web_fs_register_file_url",["string","string","number"],[e,e,-1]);if(i!==0)throw new Error(Ae(this.mod,n,s));if(Ze(this.mod),globalThis.DUCKDB_RUNTIME._files=(globalThis.DUCKDB_RUNTIME._files||new Map).set(e,t),this.pthread){for(let u of this.pthread.runningWorkers)u.postMessage({cmd:"registerFileHandle",fileName:e,fileHandle:t});for(let u of this.pthread.unusedWorkers)u.postMessage({cmd:"dropFileHandle",fileName:e})}}dropFile(e){let[t,i,n]=He(this.mod,"duckdb_web_fs_drop_file",["string"],[e]);if(t!==0)throw new Error(Ae(this.mod,i,n));Ze(this.mod)}dropFiles(){let[e,t,i]=He(this.mod,"duckdb_web_fs_drop_files",[],[]);if(e!==0)throw new Error(Ae(this.mod,t,i));Ze(this.mod)}flushFiles(){this.mod.ccall("duckdb_web_flush_files",null,[],[])}copyFileToPath(e,t){let[i,n,s]=He(this.mod,"duckdb_web_copy_file_to_path",["string","string"],[e,t]);if(i!==0)throw new Error(Ae(this.mod,n,s));Ze(this.mod)}copyFileToBuffer(e){let[t,i,n]=He(this.mod,"duckdb_web_copy_file_to_buffer",["string"],[e]);if(t!==0)throw new Error(Ae(this.mod,i,n));let s=this.mod.HEAPU8.subarray(i,i+n),u=new Uint8Array(s.length);return u.set(s),Ze(this.mod),u}collectFileStatistics(e,t){let[i,n,s]=He(this.mod,"duckdb_web_collect_file_stats",["string","boolean"],[e,t]);if(i!==0)throw new Error(Ae(this.mod,n,s))}exportFileStatistics(e){let[t,i,n]=He(this.mod,"duckdb_web_export_file_stats",["string"],[e]);if(t!==0)throw new Error(Ae(this.mod,i,n));return new M_(this.mod.HEAPU8.subarray(i,i+n))}};var BU=(t=>(t.ROW_ARRAY="row-array",t.COLUMN_OBJECT="column-object",t))(BU||{});var TU=(s=>(s[s.NONE=0]="NONE",s[s.DEBUG=1]="DEBUG",s[s.INFO=2]="INFO",s[s.WARNING=3]="WARNING",s[s.ERROR=4]="ERROR",s))(TU||{}),SU=(u=>(u[u.NONE=0]="NONE",u[u.CONNECT=1]="CONNECT",u[u.DISCONNECT=2]="DISCONNECT",u[u.OPEN=3]="OPEN",u[u.QUERY=4]="QUERY",u[u.INSTANTIATE=5]="INSTANTIATE",u))(SU||{}),IU=(u=>(u[u.NONE=0]="NONE",u[u.OK=1]="OK",u[u.ERROR=2]="ERROR",u[u.START=3]="START",u[u.RUN=4]="RUN",u[u.CAPTURE=5]="CAPTURE",u))(IU||{}),AU=(s=>(s[s.NONE=0]="NONE",s[s.WEB_WORKER=1]="WEB_WORKER",s[s.NODE_WORKER=2]="NODE_WORKER",s[s.BINDINGS=3]="BINDINGS",s[s.ASYNC_DUCKDB=4]="ASYNC_DUCKDB",s))(AU||{}),DU=class{log(e){}},FU=class{log(e){console.log(e)}};function c6(r){switch(r){case 0:return"NONE";case 1:return"DEBUG";case 2:return"INFO";case 3:return"WARNING";case 4:return"ERROR";default:return"?"}}function l6(r){switch(r){case 0:return"NONE";case 1:return"OK";case 2:return"ERROR";case 3:return"START";case 4:return"RUN";case 5:return"CAPTURE";default:return"?"}}function d6(r){switch(r){case 1:return"CONNECT";case 2:return"DISCONNECT";case 5:return"INSTANTIATE";case 3:return"OPEN";case 4:return"QUERY";default:return"?"}}function f6(r){switch(r){case 0:return"NONE";case 1:return"WEB WORKER";case 2:return"NODE WORKER";case 3:return"DUCKDB BINDINGS";case 4:return"DUCKDB";default:return"?"}}var N1=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])),P1=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,6,64,25,11,11]));var L1=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]));var q1=()=>(async r=>{try{return typeof MessageChannel<"u"&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(r)}catch(e){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]));var kU="@duckdb/duckdb-wasm",CU="1.13.1-dev161.0",MU="DuckDB powered by WebAssembly",UU="MPL-2.0",EU={type:"git",url:"https://github.com/duckdb/duckdb-wasm.git"},RU=["sql","duckdb","relational","database","data","query","wasm","analytics","olap","arrow","parquet","json","csv"],xU={"apache-arrow":"^6.0.1","wasm-feature-detect":"^1.2.11","fast-glob":"^3.2.11","web-worker":"^1.2.0","@types/emscripten":"^1.39.6","js-sha256":"^0.9.0"},VU={"@types/jasmine":"^3.10.3","@typescript-eslint/eslint-plugin":"^5.11.0","@typescript-eslint/parser":"^5.11.0",esbuild:"^0.14.21",eslint:"^8.8.0","eslint-plugin-jasmine":"^4.1.3","eslint-plugin-react":"^7.28.0",jasmine:"^4.0.2","jasmine-core":"^4.0.0","jasmine-spec-reporter":"^7.0.0",karma:"^6.3.15","karma-chrome-launcher":"^3.1.0","karma-coverage":"^2.2.0","karma-firefox-launcher":"^2.1.2","karma-jasmine":"^4.0.1","karma-jasmine-html-reporter":"^1.7.0","karma-sourcemap-loader":"^0.3.8","karma-spec-reporter":"^0.0.33","make-dir":"^3.1.0",nyc:"^15.1.0",prettier:"^2.5.1",puppeteer:"^13.3.0",rimraf:"^3.0.2",s3rver:"^3.7.1",typedoc:"^0.22.11",typescript:"^4.5.5"},NU={"build:debug":"node bundle.mjs debug && tsc --emitDeclarationOnly","build:release":"node bundle.mjs release && tsc --emitDeclarationOnly",docs:"typedoc",report:"node ./coverage.mjs","test:node":"node --enable-source-maps --experimental-wasm-eh ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs","test:node:debug":"node --inspect-brk --enable-source-maps --experimental-wasm-eh ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs","test:node:coverage":"nyc -r json --report-dir ./coverage/node node --experimental-wasm-eh ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs","test:firefox":"karma start ./karma/tests-firefox.cjs","test:chrome":"karma start ./karma/tests-chrome.cjs","test:chrome:eh":"karma start ./karma/tests-chrome-eh.cjs","test:chrome:coverage":"karma start ./karma/tests-chrome-coverage.cjs","test:browser":"karma start ./karma/tests-all.cjs","test:browser:debug":"karma start ./karma/tests-debug.cjs",test:"npm run test:chrome && npm run test:node","test:coverage":"npm run test:chrome:coverage && npm run test:node:coverage && npm run report",lint:"eslint src test"},PU=["dist","!dist/types/test"],LU="dist/duckdb-browser.cjs",qU="dist/duckdb-browser.mjs",HU="dist/duckdb-browser.d.ts",zU="dist/duckdb-browser.cjs",WU="dist/duckdb-browser.mjs",YU=!1,GU={fs:!1,path:!1,perf_hooks:!1,os:!1,worker_threads:!1},$U={"./dist/duckdb-mvp.wasm":"./dist/duckdb-mvp.wasm","./dist/duckdb-eh.wasm":"./dist/duckdb-eh.wasm","./dist/duckdb-coi.wasm":"./dist/duckdb-coi.wasm","./dist/duckdb-browser":"./dist/duckdb-browser.mjs","./dist/duckdb-browser.cjs":"./dist/duckdb-browser.cjs","./dist/duckdb-browser.mjs":"./dist/duckdb-browser.mjs","./dist/duckdb-browser-blocking":"./dist/duckdb-browser-blocking.mjs","./dist/duckdb-browser-blocking.mjs":"./dist/duckdb-browser-blocking.mjs","./dist/duckdb-browser-blocking.cjs":"./dist/duckdb-browser-blocking.cjs","./dist/duckdb-browser-coi.pthread.worker.js":"./dist/duckdb-browser-coi.pthread.worker.js","./dist/duckdb-browser-coi.worker.js":"./dist/duckdb-browser-coi.worker.js","./dist/duckdb-browser-eh.worker.js":"./dist/duckdb-browser-eh.worker.js","./dist/duckdb-browser-mvp.worker.js":"./dist/duckdb-browser-mvp.worker.js","./dist/duckdb-node":"./dist/duckdb-node.cjs","./dist/duckdb-node.cjs":"./dist/duckdb-node.cjs","./dist/duckdb-node-blocking":"./dist/duckdb-node-blocking.cjs","./dist/duckdb-node-blocking.cjs":"./dist/duckdb-node-blocking.cjs","./dist/duckdb-node-eh.worker.cjs":"./dist/duckdb-node-eh.worker.cjs","./dist/duckdb-node-mvp.worker.cjs":"./dist/duckdb-node-mvp.worker.cjs","./blocking":{browser:{types:"./dist/duckdb-browser-blocking.d.ts",import:"./dist/duckdb-browser-blocking.mjs",require:"./dist/duckdb-browser-blocking.cjs"},node:{types:"./dist/duckdb-node-blocking.d.ts",require:"./dist/duckdb-node-blocking.cjs",import:"./dist/duckdb-node-blocking.cjs"},types:"./dist/duckdb-browser-blocking.d.ts",import:"./dist/duckdb-browser-blocking.mjs",require:"./dist/duckdb-browser-blocking.cjs"},".":{browser:{types:"./dist/duckdb-browser.d.ts",import:"./dist/duckdb-browser.mjs",require:"./dist/duckdb-browser.cjs"},node:{types:"./dist/duckdb-node.d.ts",import:"./dist/duckdb-node.cjs",require:"./dist/duckdb-node.cjs"},types:"./dist/duckdb-browser.d.ts",import:"./dist/duckdb-browser.mjs",require:"./dist/duckdb-browser.cjs"}},gl={name:kU,version:CU,description:MU,license:UU,repository:EU,keywords:RU,dependencies:xU,devDependencies:VU,scripts:NU,files:PU,main:LU,module:qU,types:HU,jsdelivr:zU,unpkg:WU,sideEffects:YU,browser:GU,exports:$U};var H1=gl.name,z1=gl.version,R_=gl.version.split("."),y6=R_[0],m6=R_[1],b6=R_[2];function w6(){let r=`https://cdn.jsdelivr.net/npm/${H1}@${z1}/dist/`;return{mvp:{mainModule:`${r}duckdb-mvp.wasm`,mainWorker:`${r}duckdb-browser-mvp.worker.js`},eh:{mainModule:`${r}duckdb-eh.wasm`,mainWorker:`${r}duckdb-browser-eh.worker.js`}}}var x_=null,V_=null,N_=null,P_=null,L_=null;function KU(){return typeof process<"u"&&!1}async function q_(){return x_==null&&(x_=typeof BigInt64Array<"u"),V_==null&&(V_=await P1()),N_==null&&(N_=await q1()),P_==null&&(P_=await L1()),L_==null&&(L_=await N1()),{bigInt64Array:x_,crossOriginIsolated:KU()||globalThis.crossOriginIsolated||!1,wasmExceptions:V_,wasmSIMD:P_,wasmThreads:N_,wasmBulkMemory:L_}}async function j6(r){let e=await q_();if(e.wasmExceptions){if(e.wasmSIMD&&e.wasmThreads&&e.crossOriginIsolated&&r.coi)return{mainModule:r.coi.mainModule,mainWorker:r.coi.mainWorker,pthreadWorker:r.coi.pthreadWorker};if(r.eh)return{mainModule:r.eh.mainModule,mainWorker:r.eh.mainWorker,pthreadWorker:null}}return{mainModule:r.mvp.mainModule,mainWorker:r.mvp.mainWorker,pthreadWorker:null}}var gn=Wr(W1()),Y1=function(r,e,t){var i;if((i=r==null?void 0:r.endpoint)==null?void 0:i.startsWith("http")){let n=`${r==null?void 0:r.endpoint}`,s=n.indexOf("://")+3;return n.substring(s)}else return(r==null?void 0:r.endpoint)?`${t}.${r==null?void 0:r.endpoint}`:`${t}.s3.amazonaws.com`};function JU(r,e,t){var n,s,u,p;let i=G1(e);return{url:i.path,query:"",host:Y1(r,e,i.bucket),region:(n=r==null?void 0:r.region)!=null?n:"",service:"s3",method:t,accessKeyId:(s=r==null?void 0:r.accessKeyId)!=null?s:"",secretAccessKey:(u=r==null?void 0:r.secretAccessKey)!=null?u:"",sessionToken:(p=r==null?void 0:r.sessionToken)!=null?p:"",dateNow:new Date().toISOString().replace(/-/g,"").split("T")[0],datetimeNow:new Date().toISOString().replace(/-/g,"").replace(/:/g,"").split(".")[0]+"Z"}}function XU(r,e=!1){let t="0123456789ABCDEF",i="";for(let n=0;n<r.length;n++){let s=r[n];s>="A"&&s<="Z"||s>="a"&&s<="z"||s>="0"&&s<="9"||s=="_"||s=="-"||s=="~"||s=="."?i+=s:s=="/"?e?i+="%2F":i+=s:(i+="%",i+=t[s.charCodeAt(0)>>4],i+=t[s.charCodeAt(0)&15])}return i}function ZU(r,e=null){var Se;let t=(Se=e==null?void 0:e.contentHash)!=null?Se:"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",i=new Map;i.set("x-amz-date",r.datetimeNow),i.set("x-amz-content-sha256",t),r.sessionToken&&i.set("x-amz-security-token",r.sessionToken);let n="";(e==null?void 0:e.contentType)&&(n+="content-type;"),n+="host;x-amz-content-sha256;x-amz-date",r.sessionToken&&(n+=";x-amz-security-token");let s=r.method+`
17
+ }`),this._dictionaries=[],this._recordBatches=[],super.close()}};ai.RecordBatchJSONWriter=Uc;function cp(r,e){let t=e;e instanceof ap.Table&&(t=e.chunks,r.reset(void 0,e.schema));for(let i of t)r.write(i);return r.finish()}function lp(r,e){var t,i,n,s;return kw.__awaiter(this,void 0,void 0,function*(){try{for(t=kw.__asyncValues(e);i=yield t.next(),!i.done;){let u=i.value;r.write(u)}}catch(u){n={error:u}}finally{try{i&&!i.done&&(s=t.return)&&(yield s.call(t))}finally{if(n)throw n.error}}return r.finish()})}function Ew({name:r,type:e,nullable:t}){let i=new Z2.JSONTypeAssembler;return{name:r,nullable:t,type:i.visit(e),children:(e.children||[]).map(Ew),dictionary:J2.DataType.isDictionary(e)?{id:e.id,isOrdered:e.isOrdered,indexType:i.visit(e.indices)}:void 0}}function tk(r,e,t=!1){let i=new X2.Field(`${e}`,r.type,r.nullCount>0),n=Uw.JSONVectorAssembler.assemble(new K2.Column(i,[r]));return JSON.stringify({id:e,isDelta:t,data:{count:r.length,columns:n}},null,2)}function rk(r){return JSON.stringify({count:r.length,columns:Uw.JSONVectorAssembler.assemble(r)},null,2)}});var hp=V(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.distributeVectorsIntoRecordBatches=ln.distributeColumnsIntoRecordBatches=ln.ensureSameLengthData=void 0;var Rw=Mr(),fp=St(),ik=sn(),nk=Ai(),dp=new Uint8Array(0),xw=r=>[dp,dp,new Uint8Array(r),dp];function sk(r,e,t=e.reduce((i,n)=>Math.max(i,n.length),0)){let i,n,s=-1,u=e.length,p=[...r.fields],m=[],B=(t+63&-64)>>3;for(;++s<u;)(i=e[s])&&i.length===t?m[s]=i:((n=p[s]).nullable||(p[s]=p[s].clone({nullable:!0})),m[s]=i?i._changeLengthAndBackfillNullBitmap(t):Rw.Data.new(n.type,0,t,t,xw(B)));return[new fp.Schema(p),t,m]}ln.ensureSameLengthData=sk;function ok(r){return Vw(new fp.Schema(r.map(({field:e})=>e)),r)}ln.distributeColumnsIntoRecordBatches=ok;function Vw(r,e){return ak(r,e.map(t=>t instanceof ik.Chunked?t.chunks.map(i=>i.data):[t.data]))}ln.distributeVectorsIntoRecordBatches=Vw;function ak(r,e){let t=[...r.fields],i=[],n={numBatches:e.reduce((R,W)=>Math.max(R,W.length),0)},s=0,u=0,p=-1,m=e.length,B,O=[];for(;n.numBatches-- >0;){for(u=Number.POSITIVE_INFINITY,p=-1;++p<m;)O[p]=B=e[p].shift(),u=Math.min(u,B?B.length:u);isFinite(u)&&(O=uk(t,u,O,e,n),u>0&&(i[s++]=[u,O.slice()]))}return[r=new fp.Schema(t,r.metadata),i.map(R=>new nk.RecordBatch(r,...R))]}function uk(r,e,t,i,n){let s,u,p=0,m=-1,B=i.length,O=(e+63&-64)>>3;for(;++m<B;)(s=t[m])&&(p=s.length)>=e?p===e?t[m]=s:(t[m]=s.slice(0,e),s=s.slice(e,p-e),n.numBatches=Math.max(n.numBatches,i[m].unshift(s))):((u=r[m]).nullable||(r[m]=u.clone({nullable:!0})),t[m]=s?s._changeLengthAndBackfillNullBitmap(e):Rw.Data.new(u.type,0,e,e,xw(O)));return t}});var ft=V(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});Rc.BaseVector=void 0;var ck=$e(),lk=sn(),dk=_a(),pp=lt(),_p=class extends pp.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`${ck.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 pp.Vector.new(e,t)}concat(...e){return lk.Chunked.concat(this,...e)}slice(e,t){return dk.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]=pp.Vector.new(this.data.childData[e]))}toJSON(){return[...this]}_sliceInternal(e,t,i){return e.clone(e.data.slice(t,i-t),null)}_bindDataAccessors(e){}};Rc.BaseVector=_p;_p.prototype[Symbol.isConcatSpreadable]=!0});var yp=V(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});xc.BinaryVector=void 0;var fk=lt(),hk=ft(),pk=Pe(),Nw=class extends hk.BaseVector{asUtf8(){return fk.Vector.new(this.data.clone(new pk.Utf8))}};xc.BinaryVector=Nw});var mp=V(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});Vc.BoolVector=void 0;var _k=Pe(),yk=ft(),mk=ui(),Pw=class extends yk.BaseVector{static from(e){return mk.vectorFromValuesWithType(()=>new _k.Bool,e)}};Vc.BoolVector=Pw});var gp=V(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.DateMillisecondVector=dn.DateDayVector=dn.DateVector=void 0;var bk=$e(),gk=ft(),Lw=ui(),bp=Pe(),Nc=class extends gk.BaseVector{static from(...e){return e.length===2?Lw.vectorFromValuesWithType(()=>e[1]===bk.DateUnit.DAY?new bp.DateDay:new bp.DateMillisecond,e[0]):Lw.vectorFromValuesWithType(()=>new bp.DateMillisecond,e[0])}};dn.DateVector=Nc;var qw=class extends Nc{};dn.DateDayVector=qw;var Hw=class extends Nc{};dn.DateMillisecondVector=Hw});var vp=V(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});Pc.DecimalVector=void 0;var vk=ft(),zw=class extends vk.BaseVector{};Pc.DecimalVector=zw});var qc=V(Lc=>{"use strict";Object.defineProperty(Lc,"__esModule",{value:!0});Lc.DictionaryVector=void 0;var wk=Mr(),Ww=lt(),jk=ft(),Bk=ui(),Tk=Pe(),wp=class extends jk.BaseVector{constructor(e){super(e);this.indices=Ww.Vector.new(e.clone(this.type.indices))}static from(...e){if(e.length===3){let[t,i,n]=e,s=new Tk.Dictionary(t.type,i,null,null);return Ww.Vector.new(wk.Data.Dictionary(s,0,n.length,0,null,n,t))}return Bk.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)}};Lc.DictionaryVector=wp;wp.prototype.indices=null});var jp=V(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});Hc.FixedSizeBinaryVector=void 0;var Sk=ft(),Yw=class extends Sk.BaseVector{};Hc.FixedSizeBinaryVector=Yw});var Bp=V(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});zc.FixedSizeListVector=void 0;var Ik=ft(),Gw=class extends Ik.BaseVector{};zc.FixedSizeListVector=Gw});var Ap=V(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.Float64Vector=ci.Float32Vector=ci.Float16Vector=ci.FloatVector=void 0;var Ak=Mr(),Dk=lt(),Fk=ft(),Ok=ui(),is=Pe(),Ta=class extends Fk.BaseVector{static from(e){let t=Mk(this);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)){let i=Ck(e.constructor)||t;if(t===null&&(t=i),t&&t===i){let n=new t,s=e.byteLength/n.ArrayType.BYTES_PER_ELEMENT;if(!kk(t,e.constructor))return Dk.Vector.new(Ak.Data.Float(n,0,s,0,null,e))}}if(t)return Ok.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")}};ci.FloatVector=Ta;var Tp=class extends Ta{toFloat32Array(){return new Float32Array(this)}toFloat64Array(){return new Float64Array(this)}};ci.Float16Vector=Tp;var Sp=class extends Ta{};ci.Float32Vector=Sp;var Ip=class extends Ta{};ci.Float64Vector=Ip;var kk=(r,e)=>r===is.Float16&&e!==Uint16Array,Ck=r=>{switch(r){case Uint16Array:return is.Float16;case Float32Array:return is.Float32;case Float64Array:return is.Float64;default:return null}},Mk=r=>{switch(r){case Tp:return is.Float16;case Sp:return is.Float32;case Ip:return is.Float64;default:return null}}});var Dp=V(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.IntervalYearMonthVector=fn.IntervalDayTimeVector=fn.IntervalVector=void 0;var Uk=ft(),Wc=class extends Uk.BaseVector{};fn.IntervalVector=Wc;var $w=class extends Wc{};fn.IntervalDayTimeVector=$w;var Kw=class extends Wc{};fn.IntervalYearMonthVector=Kw});var Yc=V(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.Uint64Vector=bt.Uint32Vector=bt.Uint16Vector=bt.Uint8Vector=bt.Int64Vector=bt.Int32Vector=bt.Int16Vector=bt.Int8Vector=bt.IntVector=void 0;var Ek=Mr(),Rk=lt(),xk=ft(),Vk=ui(),Jw=Rt(),Xw=gt(),ut=Pe(),li=class extends xk.BaseVector{static from(...e){let[t,i=!1]=e,n=Lk(this,i);if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)){let s=Pk(t.constructor,i)||n;if(n===null&&(n=s),n&&n===s){let u=new n,p=t.byteLength/u.ArrayType.BYTES_PER_ELEMENT;return Nk(n,t.constructor)&&(p*=.5),Rk.Vector.new(Ek.Data.Int(u,0,p,0,null,t))}}if(n)return Vk.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")}};bt.IntVector=li;var Fp=class extends li{};bt.Int8Vector=Fp;var Op=class extends li{};bt.Int16Vector=Op;var kp=class extends li{};bt.Int32Vector=kp;var Cp=class extends li{toBigInt64Array(){return Xw.toBigInt64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigInt64Array())}};bt.Int64Vector=Cp;var Mp=class extends li{};bt.Uint8Vector=Mp;var Up=class extends li{};bt.Uint16Vector=Up;var Ep=class extends li{};bt.Uint32Vector=Ep;var Rp=class extends li{toBigUint64Array(){return Xw.toBigUint64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigUint64Array())}};bt.Uint64Vector=Rp;var Nk=(r,e)=>(r===ut.Int64||r===ut.Uint64)&&(e===Int32Array||e===Uint32Array),Pk=(r,e)=>{switch(r){case Int8Array:return ut.Int8;case Int16Array:return ut.Int16;case Int32Array:return e?ut.Int64:ut.Int32;case Jw.BigInt64Array:return ut.Int64;case Uint8Array:return ut.Uint8;case Uint16Array:return ut.Uint16;case Uint32Array:return e?ut.Uint64:ut.Uint32;case Jw.BigUint64Array:return ut.Uint64;default:return null}},Lk=(r,e)=>{switch(r){case Fp:return ut.Int8;case Op:return ut.Int16;case kp:return e?ut.Int64:ut.Int32;case Cp:return ut.Int64;case Mp:return ut.Uint8;case Up:return ut.Uint16;case Ep:return e?ut.Uint64:ut.Uint32;case Rp:return ut.Uint64;default:return null}}});var xp=V(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});Gc.ListVector=void 0;var qk=ft(),Zw=class extends qk.BaseVector{};Gc.ListVector=Zw});var Vp=V($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});$c.MapVector=void 0;var Hk=ha(),zk=lt(),Wk=ft(),Yk=Pe(),Qw=class extends Wk.BaseVector{asList(){let e=this.type.children[0];return zk.Vector.new(this.data.clone(new Yk.List(e)))}bind(e){let t=this.getChildAt(0),{[e]:i,[e+1]:n}=this.valueOffsets;return new Hk.MapRow(t.slice(i,n))}};$c.MapVector=Qw});var Np=V(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});Kc.NullVector=void 0;var Gk=ft(),ej=class extends Gk.BaseVector{};Kc.NullVector=ej});var Pp=V(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});Jc.StructVector=void 0;var $k=ha(),Kk=ft(),Jk=Symbol.for("rowIndex"),tj=class extends Kk.BaseVector{bind(e){let t=this._row||(this._row=new $k.StructRow(this)),i=Object.create(t);return i[Jk]=e,i}};Jc.StructVector=tj});var Lp=V(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.TimestampNanosecondVector=gr.TimestampMicrosecondVector=gr.TimestampMillisecondVector=gr.TimestampSecondVector=gr.TimestampVector=void 0;var Xk=ft(),uo=class extends Xk.BaseVector{};gr.TimestampVector=uo;var rj=class extends uo{};gr.TimestampSecondVector=rj;var ij=class extends uo{};gr.TimestampMillisecondVector=ij;var nj=class extends uo{};gr.TimestampMicrosecondVector=nj;var sj=class extends uo{};gr.TimestampNanosecondVector=sj});var qp=V(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.TimeNanosecondVector=vr.TimeMicrosecondVector=vr.TimeMillisecondVector=vr.TimeSecondVector=vr.TimeVector=void 0;var Zk=ft(),co=class extends Zk.BaseVector{};vr.TimeVector=co;var oj=class extends co{};vr.TimeSecondVector=oj;var aj=class extends co{};vr.TimeMillisecondVector=aj;var uj=class extends co{};vr.TimeMicrosecondVector=uj;var cj=class extends co{};vr.TimeNanosecondVector=cj});var Hp=V(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.SparseUnionVector=hn.DenseUnionVector=hn.UnionVector=void 0;var Qk=ft(),Xc=class extends Qk.BaseVector{get typeIdToChildIndex(){return this.data.type.typeIdToChildIndex}};hn.UnionVector=Xc;var lj=class extends Xc{get valueOffsets(){return this.data.valueOffsets}};hn.DenseUnionVector=lj;var dj=class extends Xc{};hn.SparseUnionVector=dj});var zp=V(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});Zc.Utf8Vector=void 0;var eC=lt(),tC=ft(),fj=Pe(),rC=ui(),hj=class extends tC.BaseVector{static from(e){return rC.vectorFromValuesWithType(()=>new fj.Utf8,e)}asBinary(){return eC.Vector.new(this.data.clone(new fj.Binary))}};Zc.Utf8Vector=hj});var pj=V(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.partial2=pn.partial1=pn.partial0=void 0;function iC(r){return function(){return r(this)}}pn.partial0=iC;function nC(r){return function(e){return r(this,e)}}pn.partial1=nC;function sC(r){return function(e,t){return r(this,e,t)}}pn.partial2=sC});var Gp=V(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.instance=lo.GetVisitor=void 0;var Qc=aa(),oC=Ot(),aC=Rn(),uC=ia(),wr=$e(),de=class extends oC.Visitor{};lo.GetVisitor=de;var cC=(r,e)=>864e5*r[e],Wp=(r,e)=>4294967296*r[e+1]+(r[e]>>>0),lC=(r,e)=>4294967296*(r[e+1]/1e3)+(r[e]>>>0)/1e3,dC=(r,e)=>4294967296*(r[e+1]/1e6)+(r[e]>>>0)/1e6,_j=r=>new Date(r),fC=(r,e)=>_j(cC(r,e)),hC=(r,e)=>_j(Wp(r,e)),pC=(r,e)=>null,yj=(r,e,t)=>{let{[t]:i,[t+1]:n}=e;return i!=null&&n!=null?r.subarray(i,n):null},_C=({offset:r,values:e},t)=>{let i=r+t;return(e[i>>3]&1<<i%8)!==0},mj=({values:r},e)=>fC(r,e),bj=({values:r},e)=>hC(r,e*2),di=({stride:r,values:e},t)=>e[r*t],gj=({stride:r,values:e},t)=>uC.uint16ToFloat64(e[r*t]),Yp=({stride:r,values:e,type:t},i)=>Qc.BN.new(e.subarray(r*i,r*(i+1)),t.isSigned),yC=({stride:r,values:e},t)=>e.subarray(r*t,r*(t+1)),mC=({values:r,valueOffsets:e},t)=>yj(r,e,t),bC=({values:r,valueOffsets:e},t)=>{let i=yj(r,e,t);return i!==null?aC.decodeUtf8(i):null},gC=(r,e)=>r.type.bitWidth<64?di(r,e):Yp(r,e),vC=(r,e)=>r.type.precision!==wr.Precision.HALF?di(r,e):gj(r,e),wC=(r,e)=>r.type.unit===wr.DateUnit.DAY?mj(r,e):bj(r,e),vj=({values:r},e)=>1e3*Wp(r,e*2),wj=({values:r},e)=>Wp(r,e*2),jj=({values:r},e)=>lC(r,e*2),Bj=({values:r},e)=>dC(r,e*2),jC=(r,e)=>{switch(r.type.unit){case wr.TimeUnit.SECOND:return vj(r,e);case wr.TimeUnit.MILLISECOND:return wj(r,e);case wr.TimeUnit.MICROSECOND:return jj(r,e);case wr.TimeUnit.NANOSECOND:return Bj(r,e)}},Tj=({values:r,stride:e},t)=>r[e*t],Sj=({values:r,stride:e},t)=>r[e*t],Ij=({values:r},e)=>Qc.BN.signed(r.subarray(2*e,2*(e+1))),Aj=({values:r},e)=>Qc.BN.signed(r.subarray(2*e,2*(e+1))),BC=(r,e)=>{switch(r.type.unit){case wr.TimeUnit.SECOND:return Tj(r,e);case wr.TimeUnit.MILLISECOND:return Sj(r,e);case wr.TimeUnit.MICROSECOND:return Ij(r,e);case wr.TimeUnit.NANOSECOND:return Aj(r,e)}},TC=({values:r},e)=>Qc.BN.decimal(r.subarray(4*e,4*(e+1))),SC=(r,e)=>{let t=r.getChildAt(0),{valueOffsets:i,stride:n}=r;return t.slice(i[e*n],i[e*n+1])},IC=(r,e)=>r.bind(e),AC=(r,e)=>r.bind(e),DC=(r,e)=>r.type.mode===wr.UnionMode.Dense?Dj(r,e):Fj(r,e),Dj=(r,e)=>{let t=r.typeIdToChildIndex[r.typeIds[e]],i=r.getChildAt(t);return i?i.get(r.valueOffsets[e]):null},Fj=(r,e)=>{let t=r.typeIdToChildIndex[r.typeIds[e]],i=r.getChildAt(t);return i?i.get(e):null},FC=(r,e)=>r.getValue(r.getKey(e)),OC=(r,e)=>r.type.unit===wr.IntervalUnit.DAY_TIME?Oj(r,e):kj(r,e),Oj=({values:r},e)=>r.subarray(2*e,2*(e+1)),kj=({values:r},e)=>{let t=r[e],i=new Int32Array(2);return i[0]=t/12|0,i[1]=t%12|0,i},kC=(r,e)=>{let t=r.getChildAt(0),{stride:i}=r;return t.slice(e*i,(e+1)*i)};de.prototype.visitNull=pC;de.prototype.visitBool=_C;de.prototype.visitInt=gC;de.prototype.visitInt8=di;de.prototype.visitInt16=di;de.prototype.visitInt32=di;de.prototype.visitInt64=Yp;de.prototype.visitUint8=di;de.prototype.visitUint16=di;de.prototype.visitUint32=di;de.prototype.visitUint64=Yp;de.prototype.visitFloat=vC;de.prototype.visitFloat16=gj;de.prototype.visitFloat32=di;de.prototype.visitFloat64=di;de.prototype.visitUtf8=bC;de.prototype.visitBinary=mC;de.prototype.visitFixedSizeBinary=yC;de.prototype.visitDate=wC;de.prototype.visitDateDay=mj;de.prototype.visitDateMillisecond=bj;de.prototype.visitTimestamp=jC;de.prototype.visitTimestampSecond=vj;de.prototype.visitTimestampMillisecond=wj;de.prototype.visitTimestampMicrosecond=jj;de.prototype.visitTimestampNanosecond=Bj;de.prototype.visitTime=BC;de.prototype.visitTimeSecond=Tj;de.prototype.visitTimeMillisecond=Sj;de.prototype.visitTimeMicrosecond=Ij;de.prototype.visitTimeNanosecond=Aj;de.prototype.visitDecimal=TC;de.prototype.visitList=SC;de.prototype.visitStruct=AC;de.prototype.visitUnion=DC;de.prototype.visitDenseUnion=Dj;de.prototype.visitSparseUnion=Fj;de.prototype.visitDictionary=FC;de.prototype.visitInterval=OC;de.prototype.visitIntervalDayTime=Oj;de.prototype.visitIntervalYearMonth=kj;de.prototype.visitFixedSizeList=kC;de.prototype.visitMap=IC;lo.instance=new de});var Ej=V(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.instance=fo.IndexOfVisitor=void 0;var CC=Ot(),Cj=Xr(),Mj=_a(),fe=class extends CC.Visitor{};fo.IndexOfVisitor=fe;function MC(r,e){return e===null&&r.length>0?0:-1}function UC(r,e){let{nullBitmap:t}=r.data;if(!t||r.nullCount<=0)return-1;let i=0;for(let n of new Cj.BitIterator(t,r.data.offset+(e||0),r.length,t,Cj.getBool)){if(!n)return i;++i}return-1}function Ie(r,e,t){if(e===void 0)return-1;if(e===null)return UC(r,t);let i=Mj.createElementComparator(e);for(let n=(t||0)-1,s=r.length;++n<s;)if(i(r.get(n)))return n;return-1}function Uj(r,e,t){let i=Mj.createElementComparator(e);for(let n=(t||0)-1,s=r.length;++n<s;)if(i(r.get(n)))return n;return-1}fe.prototype.visitNull=MC;fe.prototype.visitBool=Ie;fe.prototype.visitInt=Ie;fe.prototype.visitInt8=Ie;fe.prototype.visitInt16=Ie;fe.prototype.visitInt32=Ie;fe.prototype.visitInt64=Ie;fe.prototype.visitUint8=Ie;fe.prototype.visitUint16=Ie;fe.prototype.visitUint32=Ie;fe.prototype.visitUint64=Ie;fe.prototype.visitFloat=Ie;fe.prototype.visitFloat16=Ie;fe.prototype.visitFloat32=Ie;fe.prototype.visitFloat64=Ie;fe.prototype.visitUtf8=Ie;fe.prototype.visitBinary=Ie;fe.prototype.visitFixedSizeBinary=Ie;fe.prototype.visitDate=Ie;fe.prototype.visitDateDay=Ie;fe.prototype.visitDateMillisecond=Ie;fe.prototype.visitTimestamp=Ie;fe.prototype.visitTimestampSecond=Ie;fe.prototype.visitTimestampMillisecond=Ie;fe.prototype.visitTimestampMicrosecond=Ie;fe.prototype.visitTimestampNanosecond=Ie;fe.prototype.visitTime=Ie;fe.prototype.visitTimeSecond=Ie;fe.prototype.visitTimeMillisecond=Ie;fe.prototype.visitTimeMicrosecond=Ie;fe.prototype.visitTimeNanosecond=Ie;fe.prototype.visitDecimal=Ie;fe.prototype.visitList=Ie;fe.prototype.visitStruct=Ie;fe.prototype.visitUnion=Ie;fe.prototype.visitDenseUnion=Uj;fe.prototype.visitSparseUnion=Uj;fe.prototype.visitDictionary=Ie;fe.prototype.visitInterval=Ie;fe.prototype.visitIntervalDayTime=Ie;fe.prototype.visitIntervalYearMonth=Ie;fe.prototype.visitFixedSizeList=Ie;fe.prototype.visitMap=Ie;fo.instance=new fe});var $p=V(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.instance=ho.IteratorVisitor=void 0;var el=$e(),EC=Ot(),RC=Xr(),Rj=Gp(),he=class extends EC.Visitor{};ho.IteratorVisitor=he;function xC(r){let e=Rj.instance.getVisitFn(r);return new RC.BitIterator(r.data.nullBitmap,r.data.offset,r.length,r,(t,i,n,s)=>(n&1<<s)!==0?e(t,i):null)}var xj=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 Be(r){if(r.nullCount>0)return xC(r);let{type:e,typeId:t,length:i}=r;return r.stride===1&&(t===el.Type.Timestamp||t===el.Type.Int&&e.bitWidth!==64||t===el.Type.Time&&e.bitWidth!==64||t===el.Type.Float&&e.precision>0)?r.data.values.subarray(0,i)[Symbol.iterator]():new xj(r,Rj.instance.getVisitFn(r))}he.prototype.visitNull=Be;he.prototype.visitBool=Be;he.prototype.visitInt=Be;he.prototype.visitInt8=Be;he.prototype.visitInt16=Be;he.prototype.visitInt32=Be;he.prototype.visitInt64=Be;he.prototype.visitUint8=Be;he.prototype.visitUint16=Be;he.prototype.visitUint32=Be;he.prototype.visitUint64=Be;he.prototype.visitFloat=Be;he.prototype.visitFloat16=Be;he.prototype.visitFloat32=Be;he.prototype.visitFloat64=Be;he.prototype.visitUtf8=Be;he.prototype.visitBinary=Be;he.prototype.visitFixedSizeBinary=Be;he.prototype.visitDate=Be;he.prototype.visitDateDay=Be;he.prototype.visitDateMillisecond=Be;he.prototype.visitTimestamp=Be;he.prototype.visitTimestampSecond=Be;he.prototype.visitTimestampMillisecond=Be;he.prototype.visitTimestampMicrosecond=Be;he.prototype.visitTimestampNanosecond=Be;he.prototype.visitTime=Be;he.prototype.visitTimeSecond=Be;he.prototype.visitTimeMillisecond=Be;he.prototype.visitTimeMicrosecond=Be;he.prototype.visitTimeNanosecond=Be;he.prototype.visitDecimal=Be;he.prototype.visitList=Be;he.prototype.visitStruct=Be;he.prototype.visitUnion=Be;he.prototype.visitDenseUnion=Be;he.prototype.visitSparseUnion=Be;he.prototype.visitDictionary=Be;he.prototype.visitInterval=Be;he.prototype.visitIntervalDayTime=Be;he.prototype.visitIntervalYearMonth=Be;he.prototype.visitFixedSizeList=Be;he.prototype.visitMap=Be;ho.instance=new he});var Vj=V(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.instance=po.ToArrayVisitor=void 0;var Sa=$e(),VC=Ot(),NC=$p(),pe=class extends VC.Visitor{};po.ToArrayVisitor=pe;function Te(r){let{type:e,length:t,stride:i}=r;switch(e.typeId){case Sa.Type.Int:case Sa.Type.Float:case Sa.Type.Decimal:case Sa.Type.Time:case Sa.Type.Timestamp:return r.data.values.subarray(0,t*i)}return[...NC.instance.visit(r)]}pe.prototype.visitNull=Te;pe.prototype.visitBool=Te;pe.prototype.visitInt=Te;pe.prototype.visitInt8=Te;pe.prototype.visitInt16=Te;pe.prototype.visitInt32=Te;pe.prototype.visitInt64=Te;pe.prototype.visitUint8=Te;pe.prototype.visitUint16=Te;pe.prototype.visitUint32=Te;pe.prototype.visitUint64=Te;pe.prototype.visitFloat=Te;pe.prototype.visitFloat16=Te;pe.prototype.visitFloat32=Te;pe.prototype.visitFloat64=Te;pe.prototype.visitUtf8=Te;pe.prototype.visitBinary=Te;pe.prototype.visitFixedSizeBinary=Te;pe.prototype.visitDate=Te;pe.prototype.visitDateDay=Te;pe.prototype.visitDateMillisecond=Te;pe.prototype.visitTimestamp=Te;pe.prototype.visitTimestampSecond=Te;pe.prototype.visitTimestampMillisecond=Te;pe.prototype.visitTimestampMicrosecond=Te;pe.prototype.visitTimestampNanosecond=Te;pe.prototype.visitTime=Te;pe.prototype.visitTimeSecond=Te;pe.prototype.visitTimeMillisecond=Te;pe.prototype.visitTimeMicrosecond=Te;pe.prototype.visitTimeNanosecond=Te;pe.prototype.visitDecimal=Te;pe.prototype.visitList=Te;pe.prototype.visitStruct=Te;pe.prototype.visitUnion=Te;pe.prototype.visitDenseUnion=Te;pe.prototype.visitSparseUnion=Te;pe.prototype.visitDictionary=Te;pe.prototype.visitInterval=Te;pe.prototype.visitIntervalDayTime=Te;pe.prototype.visitIntervalYearMonth=Te;pe.prototype.visitFixedSizeList=Te;pe.prototype.visitMap=Te;po.instance=new pe});var Nj=V(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.instance=_o.ByteWidthVisitor=void 0;var PC=Ot(),LC=$e(),Ia=(r,e)=>r+e,Kp=r=>`Cannot compute the byte width of variable-width column ${r}`,Jp=class extends PC.Visitor{visitNull(e){return 0}visitInt(e){return e.bitWidth/8}visitFloat(e){return e.ArrayType.BYTES_PER_ELEMENT}visitBinary(e){throw new Error(Kp(e))}visitUtf8(e){throw new Error(Kp(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===LC.TimeUnit.SECOND?4:8}visitInterval(e){return(e.unit+1)*4}visitList(e){throw new Error(Kp(e))}visitStruct(e){return this.visitFields(e.children).reduce(Ia,0)}visitUnion(e){return this.visitFields(e.children).reduce(Ia,0)}visitFixedSizeBinary(e){return e.byteWidth}visitFixedSizeList(e){return e.listSize*this.visitFields(e.children).reduce(Ia,0)}visitMap(e){return this.visitFields(e.children).reduce(Ia,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(Ia,0)}};_o.ByteWidthVisitor=Jp;_o.instance=new Jp});var Pj=V(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.instance=yo.GetVectorConstructor=void 0;var qC=Ot(),HC=yp(),zC=mp(),Xp=gp(),WC=vp(),YC=qc(),GC=jp(),$C=Bp(),tl=Ap(),Zp=Dp(),Di=Yc(),KC=xp(),JC=Vp(),XC=Np(),ZC=Pp(),Aa=Lp(),Da=qp(),Qp=Hp(),QC=zp(),e_=class extends qC.Visitor{visitNull(){return XC.NullVector}visitBool(){return zC.BoolVector}visitInt(){return Di.IntVector}visitInt8(){return Di.Int8Vector}visitInt16(){return Di.Int16Vector}visitInt32(){return Di.Int32Vector}visitInt64(){return Di.Int64Vector}visitUint8(){return Di.Uint8Vector}visitUint16(){return Di.Uint16Vector}visitUint32(){return Di.Uint32Vector}visitUint64(){return Di.Uint64Vector}visitFloat(){return tl.FloatVector}visitFloat16(){return tl.Float16Vector}visitFloat32(){return tl.Float32Vector}visitFloat64(){return tl.Float64Vector}visitUtf8(){return QC.Utf8Vector}visitBinary(){return HC.BinaryVector}visitFixedSizeBinary(){return GC.FixedSizeBinaryVector}visitDate(){return Xp.DateVector}visitDateDay(){return Xp.DateDayVector}visitDateMillisecond(){return Xp.DateMillisecondVector}visitTimestamp(){return Aa.TimestampVector}visitTimestampSecond(){return Aa.TimestampSecondVector}visitTimestampMillisecond(){return Aa.TimestampMillisecondVector}visitTimestampMicrosecond(){return Aa.TimestampMicrosecondVector}visitTimestampNanosecond(){return Aa.TimestampNanosecondVector}visitTime(){return Da.TimeVector}visitTimeSecond(){return Da.TimeSecondVector}visitTimeMillisecond(){return Da.TimeMillisecondVector}visitTimeMicrosecond(){return Da.TimeMicrosecondVector}visitTimeNanosecond(){return Da.TimeNanosecondVector}visitDecimal(){return WC.DecimalVector}visitList(){return KC.ListVector}visitStruct(){return ZC.StructVector}visitUnion(){return Qp.UnionVector}visitDenseUnion(){return Qp.DenseUnionVector}visitSparseUnion(){return Qp.SparseUnionVector}visitDictionary(){return YC.DictionaryVector}visitInterval(){return Zp.IntervalVector}visitIntervalDayTime(){return Zp.IntervalDayTimeVector}visitIntervalYearMonth(){return Zp.IntervalYearMonthVector}visitFixedSizeList(){return $C.FixedSizeListVector}visitMap(){return JC.MapVector}};yo.GetVectorConstructor=e_;yo.instance=new e_});var ui=V(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.vectorFromValuesWithType=L.StructRow=L.MapRow=L.Utf8Vector=L.SparseUnionVector=L.DenseUnionVector=L.UnionVector=L.TimeNanosecondVector=L.TimeMicrosecondVector=L.TimeMillisecondVector=L.TimeSecondVector=L.TimeVector=L.TimestampNanosecondVector=L.TimestampMicrosecondVector=L.TimestampMillisecondVector=L.TimestampSecondVector=L.TimestampVector=L.StructVector=L.NullVector=L.MapVector=L.ListVector=L.Uint64Vector=L.Uint32Vector=L.Uint16Vector=L.Uint8Vector=L.Int64Vector=L.Int32Vector=L.Int16Vector=L.Int8Vector=L.IntVector=L.IntervalYearMonthVector=L.IntervalDayTimeVector=L.IntervalVector=L.Float64Vector=L.Float32Vector=L.Float16Vector=L.FloatVector=L.FixedSizeListVector=L.FixedSizeBinaryVector=L.DictionaryVector=L.DecimalVector=L.DateMillisecondVector=L.DateDayVector=L.DateVector=L.Chunked=L.BoolVector=L.BinaryVector=L.BaseVector=L.Vector=void 0;var t_=Et(),eM=lt();Object.defineProperty(L,"Vector",{enumerable:!0,get:function(){return eM.Vector}});var tM=ft();Object.defineProperty(L,"BaseVector",{enumerable:!0,get:function(){return tM.BaseVector}});var rM=yp();Object.defineProperty(L,"BinaryVector",{enumerable:!0,get:function(){return rM.BinaryVector}});var iM=mp();Object.defineProperty(L,"BoolVector",{enumerable:!0,get:function(){return iM.BoolVector}});var nM=sn();Object.defineProperty(L,"Chunked",{enumerable:!0,get:function(){return nM.Chunked}});var i_=gp();Object.defineProperty(L,"DateVector",{enumerable:!0,get:function(){return i_.DateVector}});Object.defineProperty(L,"DateDayVector",{enumerable:!0,get:function(){return i_.DateDayVector}});Object.defineProperty(L,"DateMillisecondVector",{enumerable:!0,get:function(){return i_.DateMillisecondVector}});var sM=vp();Object.defineProperty(L,"DecimalVector",{enumerable:!0,get:function(){return sM.DecimalVector}});var oM=qc();Object.defineProperty(L,"DictionaryVector",{enumerable:!0,get:function(){return oM.DictionaryVector}});var aM=jp();Object.defineProperty(L,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return aM.FixedSizeBinaryVector}});var uM=Bp();Object.defineProperty(L,"FixedSizeListVector",{enumerable:!0,get:function(){return uM.FixedSizeListVector}});var il=Ap();Object.defineProperty(L,"FloatVector",{enumerable:!0,get:function(){return il.FloatVector}});Object.defineProperty(L,"Float16Vector",{enumerable:!0,get:function(){return il.Float16Vector}});Object.defineProperty(L,"Float32Vector",{enumerable:!0,get:function(){return il.Float32Vector}});Object.defineProperty(L,"Float64Vector",{enumerable:!0,get:function(){return il.Float64Vector}});var n_=Dp();Object.defineProperty(L,"IntervalVector",{enumerable:!0,get:function(){return n_.IntervalVector}});Object.defineProperty(L,"IntervalDayTimeVector",{enumerable:!0,get:function(){return n_.IntervalDayTimeVector}});Object.defineProperty(L,"IntervalYearMonthVector",{enumerable:!0,get:function(){return n_.IntervalYearMonthVector}});var Fi=Yc();Object.defineProperty(L,"IntVector",{enumerable:!0,get:function(){return Fi.IntVector}});Object.defineProperty(L,"Int8Vector",{enumerable:!0,get:function(){return Fi.Int8Vector}});Object.defineProperty(L,"Int16Vector",{enumerable:!0,get:function(){return Fi.Int16Vector}});Object.defineProperty(L,"Int32Vector",{enumerable:!0,get:function(){return Fi.Int32Vector}});Object.defineProperty(L,"Int64Vector",{enumerable:!0,get:function(){return Fi.Int64Vector}});Object.defineProperty(L,"Uint8Vector",{enumerable:!0,get:function(){return Fi.Uint8Vector}});Object.defineProperty(L,"Uint16Vector",{enumerable:!0,get:function(){return Fi.Uint16Vector}});Object.defineProperty(L,"Uint32Vector",{enumerable:!0,get:function(){return Fi.Uint32Vector}});Object.defineProperty(L,"Uint64Vector",{enumerable:!0,get:function(){return Fi.Uint64Vector}});var cM=xp();Object.defineProperty(L,"ListVector",{enumerable:!0,get:function(){return cM.ListVector}});var lM=Vp();Object.defineProperty(L,"MapVector",{enumerable:!0,get:function(){return lM.MapVector}});var dM=Np();Object.defineProperty(L,"NullVector",{enumerable:!0,get:function(){return dM.NullVector}});var fM=Pp();Object.defineProperty(L,"StructVector",{enumerable:!0,get:function(){return fM.StructVector}});var Oa=Lp();Object.defineProperty(L,"TimestampVector",{enumerable:!0,get:function(){return Oa.TimestampVector}});Object.defineProperty(L,"TimestampSecondVector",{enumerable:!0,get:function(){return Oa.TimestampSecondVector}});Object.defineProperty(L,"TimestampMillisecondVector",{enumerable:!0,get:function(){return Oa.TimestampMillisecondVector}});Object.defineProperty(L,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return Oa.TimestampMicrosecondVector}});Object.defineProperty(L,"TimestampNanosecondVector",{enumerable:!0,get:function(){return Oa.TimestampNanosecondVector}});var ka=qp();Object.defineProperty(L,"TimeVector",{enumerable:!0,get:function(){return ka.TimeVector}});Object.defineProperty(L,"TimeSecondVector",{enumerable:!0,get:function(){return ka.TimeSecondVector}});Object.defineProperty(L,"TimeMillisecondVector",{enumerable:!0,get:function(){return ka.TimeMillisecondVector}});Object.defineProperty(L,"TimeMicrosecondVector",{enumerable:!0,get:function(){return ka.TimeMicrosecondVector}});Object.defineProperty(L,"TimeNanosecondVector",{enumerable:!0,get:function(){return ka.TimeNanosecondVector}});var s_=Hp();Object.defineProperty(L,"UnionVector",{enumerable:!0,get:function(){return s_.UnionVector}});Object.defineProperty(L,"DenseUnionVector",{enumerable:!0,get:function(){return s_.DenseUnionVector}});Object.defineProperty(L,"SparseUnionVector",{enumerable:!0,get:function(){return s_.SparseUnionVector}});var hM=zp();Object.defineProperty(L,"Utf8Vector",{enumerable:!0,get:function(){return hM.Utf8Vector}});var Hj=ha();Object.defineProperty(L,"MapRow",{enumerable:!0,get:function(){return Hj.MapRow}});Object.defineProperty(L,"StructRow",{enumerable:!0,get:function(){return Hj.StructRow}});var Fa=pj(),r_=$e(),mo=lt(),Lj=sn(),ns=ft(),pM=Xr(),rl=Rt(),qj=st(),zj=Gp(),Wj=bh(),Yj=Ej(),Gj=Vj(),$j=$p(),Kj=Nj(),Jj=Pj();mo.Vector.new=_M;mo.Vector.from=mM;function _M(r,...e){return new(Jj.instance.getVisitFn(r)())(r,...e)}function yM(r,e){if(rl.isIterable(e))return mo.Vector.from({nullValues:[null,void 0],type:r(),values:e});if(rl.isAsyncIterable(e))return mo.Vector.from({nullValues:[null,void 0],type:r(),values:e});let{values:t=[],type:i=r(),nullValues:n=[null,void 0]}=Object.assign({},e);return rl.isIterable(t)?mo.Vector.from(Object.assign(Object.assign({nullValues:n},e),{type:i})):mo.Vector.from(Object.assign(Object.assign({nullValues:n},e),{type:i}))}L.vectorFromValuesWithType=yM;function mM(r){let e=Object.assign({nullValues:[null,void 0]},r),{values:t=[]}=e,i=t_.__rest(e,["values"]);if(rl.isIterable(t)){let n=[...qj.Builder.throughIterable(i)(t)];return n.length===1?n[0]:Lj.Chunked.concat(n)}return(n=>t_.__awaiter(this,void 0,void 0,function*(){var s,u;let p=qj.Builder.throughAsyncIterable(i);try{for(var m=t_.__asyncValues(p(t)),B;B=yield m.next(),!B.done;){let O=B.value;n.push(O)}}catch(O){s={error:O}}finally{try{B&&!B.done&&(u=m.return)&&(yield u.call(m))}finally{if(s)throw s.error}}return n.length===1?n[0]:Lj.Chunked.concat(n)}))([])}ns.BaseVector.prototype.get=function(e){return zj.instance.visit(this,e)};ns.BaseVector.prototype.set=function(e,t){return Wj.instance.visit(this,e,t)};ns.BaseVector.prototype.indexOf=function(e,t){return Yj.instance.visit(this,e,t)};ns.BaseVector.prototype.toArray=function(){return Gj.instance.visit(this)};ns.BaseVector.prototype.getByteWidth=function(){return Kj.instance.visit(this.type)};ns.BaseVector.prototype[Symbol.iterator]=function(){return $j.instance.visit(this)};ns.BaseVector.prototype._bindDataAccessors=wM;Object.keys(r_.Type).map(r=>r_.Type[r]).filter(r=>typeof r=="number").filter(r=>r!==r_.Type.NONE).forEach(r=>{let e=Jj.instance.visit(r);e.prototype.get=Fa.partial1(zj.instance.getVisitFn(r)),e.prototype.set=Fa.partial2(Wj.instance.getVisitFn(r)),e.prototype.indexOf=Fa.partial2(Yj.instance.getVisitFn(r)),e.prototype.toArray=Fa.partial0(Gj.instance.getVisitFn(r)),e.prototype.getByteWidth=bM(Kj.instance.getVisitFn(r)),e.prototype[Symbol.iterator]=Fa.partial0($j.instance.getVisitFn(r))});function bM(r){return function(){return r(this.type)}}function gM(r){return function(e){return this.isValid(e)?r.call(this,e):null}}function vM(r){return function(e,t){pM.setBool(this.nullBitmap,this.offset+e,t!=null)&&r.call(this,e,t)}}function wM(){let r=this.nullBitmap;r&&r.byteLength>0&&(this.get=gM(this.get),this.set=vM(this.set))}});var Ba=V(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});sl.Table=void 0;var nl=Et(),jM=ro(),BM=Ca(),Xj=Ec(),o_=Ai(),Zj=St(),u_=Pe(),Qj=Jn(),a_=Rt(),e1=hp(),c_=ui(),jt=class extends c_.Chunked{constructor(...e){var t;let i=null;e[0]instanceof Zj.Schema&&(i=e[0]);let n=e[0]instanceof jt?e[0].chunks:Qj.selectArgs(o_.RecordBatch,e);if(!i&&!(i=(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 o_._InternalEmptyPlaceholderRecordBatch(i));super(new u_.Struct(i.fields),n);this._schema=i,this._chunks=n}static empty(e=new Zj.Schema([])){return new jt(e,[])}static from(e){if(!e)return jt.empty();if(typeof e=="object"){let i=a_.isIterable(e.values)?TM(e):a_.isAsyncIterable(e.values)?SM(e):null;if(i!==null)return i}let t=BM.RecordBatchReader.from(e);return a_.isPromise(t)?(()=>nl.__awaiter(this,void 0,void 0,function*(){return yield jt.from(yield t)}))():t.isSync()&&(t=t.open())?t.schema?new jt(t.schema,[...t]):jt.empty():(i=>nl.__awaiter(this,void 0,void 0,function*(){var n,s;let u=yield i,p=u.schema,m=[];if(p){try{for(var B=nl.__asyncValues(u),O;O=yield B.next(),!O.done;){let R=O.value;m.push(R)}}catch(R){n={error:R}}finally{try{O&&!O.done&&(s=B.return)&&(yield s.call(B))}finally{if(n)throw n.error}}return new jt(p,m)}return jt.empty()}))(t.open())}static fromAsync(e){return nl.__awaiter(this,void 0,void 0,function*(){return yield jt.from(e)})}static fromStruct(e){return jt.new(e.data.childData,e.type.children)}static new(...e){return new jt(...e1.distributeColumnsIntoRecordBatches(Qj.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 jt(this._schema,e)}getColumn(e){return this.getColumnAt(this.getColumnIndex(e))}getColumnAt(e){return this.getChildAt(e)}getColumnIndex(e){return this._schema.fields.findIndex(t=>t.name===e)}getChildAt(e){if(e<0||e>=this.numChildren)return null;let t,i,n=this._schema.fields,s=this._children||(this._children=[]);if(i=s[e])return i;if(t=n[e]){let u=this._chunks.map(p=>p.getChildAt(e)).filter(p=>p!=null);if(u.length>0)return s[e]=new jM.Column(t,u)}return null}serialize(e="binary",t=!0){return(t?Xj.RecordBatchStreamWriter:Xj.RecordBatchFileWriter).writeAll(this).toUint8Array(!0)}count(){return this._length}select(...e){let t=this._schema.fields.reduce((i,n,s)=>i.set(n.name,s),new Map);return this.selectAt(...e.map(i=>t.get(i)).filter(i=>i>-1))}selectAt(...e){let t=this._schema.selectAt(...e);return new jt(t,this._chunks.map(({length:i,data:{childData:n}})=>new o_.RecordBatch(t,i,e.map(s=>n[s]).filter(Boolean))))}assign(e){let t=this._schema.fields,[i,n]=e.schema.fields.reduce((p,m,B)=>{let[O,R]=p,W=t.findIndex(N=>N.name===m.name);return~W?R[W]=B:O.push(B),p},[[],[]]),s=this._schema.assign(e.schema),u=[...t.map((p,m,B,O=n[m])=>O===void 0?this.getColumnAt(m):e.getColumnAt(O)),...i.map(p=>e.getColumnAt(p))].filter(Boolean);return new jt(...e1.distributeVectorsIntoRecordBatches(s,u))}};sl.Table=jt;function TM(r){let{type:e}=r;return e instanceof u_.Struct?jt.fromStruct(c_.StructVector.from(r)):null}function SM(r){let{type:e}=r;return e instanceof u_.Struct?c_.StructVector.from(r).then(t=>jt.fromStruct(t)):null}});var Ai=V(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo._InternalEmptyPlaceholderRecordBatch=bo.RecordBatch=void 0;var d_=Mr(),l_=Ba(),IM=lt(),AM=Ot(),DM=St(),FM=Rt(),OM=sn(),kM=Jn(),f_=Pe(),CM=hp(),MM=ui(),_n=class extends MM.StructVector{constructor(...e){let t,i=e[0],n;if(e[1]instanceof d_.Data)[,t,n]=e;else{let s=i.fields,[,u,p]=e;t=d_.Data.Struct(new f_.Struct(s),0,u,0,null,p)}super(t,n);this._schema=i}static from(e){return FM.isIterable(e.values),l_.Table.from(e)}static new(...e){let[t,i]=kM.selectFieldArgs(e),n=i.filter(s=>s instanceof IM.Vector);return new _n(...CM.ensureSameLengthData(new DM.Schema(t),n.map(s=>s.data)))}clone(e,t=this._children){return new _n(this._schema,e,t)}concat(...e){let t=this._schema,i=OM.Chunked.flatten(this,...e);return new l_.Table(t,i.map(({data:n})=>new _n(t,n)))}get schema(){return this._schema}get numCols(){return this._schema.fields.length}get dictionaries(){return this._dictionaries||(this._dictionaries=ol.collect(this))}select(...e){let t=this._schema.fields.reduce((i,n,s)=>i.set(n.name,s),new Map);return this.selectAt(...e.map(i=>t.get(i)).filter(i=>i>-1))}selectAt(...e){let t=this._schema.selectAt(...e),i=e.map(n=>this.data.childData[n]).filter(Boolean);return new _n(t,this.length,i)}};bo.RecordBatch=_n;var t1=class extends _n{constructor(e){super(e,0,e.fields.map(t=>d_.Data.new(t.type,0,0,0)))}};bo._InternalEmptyPlaceholderRecordBatch=t1;var ol=class extends AM.Visitor{constructor(){super(...arguments);this.dictionaries=new Map}static collect(e){return new ol().visit(e.data,new f_.Struct(e.schema.fields)).dictionaries}visit(e,t){return f_.DataType.isDictionary(t)?this.visitDictionary(e,t):(e.childData.forEach((i,n)=>this.visit(i,t.children[n].type)),this)}visitDictionary(e,t){let i=e.dictionary;return i&&i.length>0&&this.dictionaries.set(t.id,i),this}}});var Ca=V(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.AsyncRecordBatchFileReader=Br.RecordBatchFileReader=Br.AsyncRecordBatchStreamReader=Br.RecordBatchStreamReader=Br.RecordBatchReader=void 0;var Xe=Et(),r1=lt(),al=$e(),a1=Fh(),i1=ta(),n1=en(),Ma=Ch(),u1=V0(),h_=Ai(),ss=Fs(),Tr=Tc(),jr=Rt(),fi=class extends ss.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 jr.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 i1.default.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return i1.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 fi?e:jr.isArrowJSON(e)?UM(e):jr.isFileHandle(e)?xM(e):jr.isPromise(e)?(()=>Xe.__awaiter(this,void 0,void 0,function*(){return yield fi.from(yield e)}))():jr.isFetchResponse(e)||jr.isReadableDOMStream(e)||jr.isReadableNodeStream(e)||jr.isAsyncIterable(e)?RM(new n1.AsyncByteStream(e)):EM(new n1.ByteStream(e))}static readAll(e){return e instanceof fi?e.isSync()?s1(e):o1(e):jr.isArrowJSON(e)||ArrayBuffer.isView(e)||jr.isIterable(e)||jr.isIteratorResult(e)?s1(e):o1(e)}};Br.RecordBatchReader=fi;var go=class extends fi{constructor(e){super(e);this._impl=e}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return Xe.__asyncGenerator(this,arguments,function*(){yield Xe.__await(yield*Xe.__asyncDelegator(Xe.__asyncValues(this[Symbol.iterator]())))})}};Br.RecordBatchStreamReader=go;var vo=class extends fi{constructor(e){super(e);this._impl=e}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}};Br.AsyncRecordBatchStreamReader=vo;var ul=class extends go{constructor(e){super(e);this._impl=e}};Br.RecordBatchFileReader=ul;var p_=class extends vo{constructor(e){super(e);this._impl=e}};Br.AsyncRecordBatchFileReader=p_;var __=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 h_.RecordBatch(this.schema,e.length,this._loadVectors(e,t,this.schema.fields))}_loadDictionaryBatch(e,t){let{id:i,isDelta:n,data:s}=e,{dictionaries:u,schema:p}=this,m=u.get(i);if(n||!m){let B=p.dictionaries.get(i);return m&&n?m.concat(r1.Vector.new(this._loadVectors(s,t,[B])[0])):r1.Vector.new(this._loadVectors(s,t,[B])[0])}return m}_loadVectors(e,t,i){return new u1.VectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(i)}},Ua=class extends __{constructor(e,t){super(t);this._reader=jr.isArrowJSON(e)?new Tr.JSONMessageReader(this._handle=e):new Tr.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=d1(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):ss.ITERATOR_DONE}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):ss.ITERATOR_DONE}next(){if(this.closed)return ss.ITERATOR_DONE;let e,{_reader:t}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let i=e.header(),n=t.readMessageBody(e.bodyLength),s=this._loadRecordBatch(i,n);return{done:!1,value:s}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let i=e.header(),n=t.readMessageBody(e.bodyLength),s=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new h_._InternalEmptyPlaceholderRecordBatch(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},Ea=class extends __{constructor(e,t){super(t);this._reader=new Tr.AsyncMessageReader(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return Xe.__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 Xe.__awaiter(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=d1(this,e),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return Xe.__awaiter(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):ss.ITERATOR_DONE})}return(e){return Xe.__awaiter(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):ss.ITERATOR_DONE})}next(){return Xe.__awaiter(this,void 0,void 0,function*(){if(this.closed)return ss.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 i=e.header(),n=yield t.readMessageBody(e.bodyLength),s=this._loadRecordBatch(i,n);return{done:!1,value:s}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let i=e.header(),n=yield t.readMessageBody(e.bodyLength),s=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new h_._InternalEmptyPlaceholderRecordBatch(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return Xe.__awaiter(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}},y_=class extends Ua{constructor(e,t){super(e instanceof Ma.RandomAccessFile?e:new Ma.RandomAccessFile(e),t)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(let t of this._footer.dictionaryBatches())t&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){if(this.closed)return null;this._footer||this.open();let t=this._footer&&this._footer.getRecordBatch(e);if(t&&this._handle.seek(t.offset)){let i=this._reader.readMessage(al.MessageHeader.RecordBatch);if(i==null?void 0:i.isRecordBatch()){let n=i.header(),s=this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(n,s)}}return null}_readDictionaryBatch(e){let t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&this._handle.seek(t.offset)){let i=this._reader.readMessage(al.MessageHeader.DictionaryBatch);if(i==null?void 0:i.isDictionaryBatch()){let n=i.header(),s=this._reader.readMessageBody(i.bodyLength),u=this._loadDictionaryBatch(n,s);this.dictionaries.set(n.id,u)}}}_readFooter(){let{_handle:e}=this,t=e.size-Tr.magicAndPadding,i=e.readInt32(t),n=e.readAt(t-i,i);return a1.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}},c1=class extends Ea{constructor(e,...t){let i=typeof t[0]!="number"?t.shift():void 0,n=t[0]instanceof Map?t.shift():void 0;super(e instanceof Ma.AsyncRandomAccessFile?e:new Ma.AsyncRandomAccessFile(e,i),n)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isFile(){return!0}isAsync(){return!0}open(e){let t=Object.create(null,{open:{get:()=>super.open}});return Xe.__awaiter(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(let i of this._footer.dictionaryBatches())i&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield t.open.call(this,e)})}readRecordBatch(e){return Xe.__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 i=yield this._reader.readMessage(al.MessageHeader.RecordBatch);if(i==null?void 0:i.isRecordBatch()){let n=i.header(),s=yield this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(n,s)}}return null})}_readDictionaryBatch(e){return Xe.__awaiter(this,void 0,void 0,function*(){let t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&(yield this._handle.seek(t.offset))){let i=yield this._reader.readMessage(al.MessageHeader.DictionaryBatch);if(i==null?void 0:i.isDictionaryBatch()){let n=i.header(),s=yield this._reader.readMessageBody(i.bodyLength),u=this._loadDictionaryBatch(n,s);this.dictionaries.set(n.id,u)}}})}_readFooter(){return Xe.__awaiter(this,void 0,void 0,function*(){let{_handle:e}=this;e._pending&&(yield e._pending);let t=e.size-Tr.magicAndPadding,i=yield e.readInt32(t),n=yield e.readAt(t-i,i);return a1.Footer.decode(n)})}_readNextMessageAndValidate(e){return Xe.__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})}},l1=class extends Ua{constructor(e,t){super(e,t)}_loadVectors(e,t,i){return new u1.JSONVectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(i)}};function d1(r,e){return e&&typeof e.autoDestroy=="boolean"?e.autoDestroy:r.autoDestroy}function*s1(r){let e=fi.from(r);try{if(!e.open({autoDestroy:!1}).closed)do yield e;while(!e.reset().open().closed)}finally{e.cancel()}}function o1(r){return Xe.__asyncGenerator(this,arguments,function*(){let t=yield Xe.__await(fi.from(r));try{if(!(yield Xe.__await(t.open({autoDestroy:!1}))).closed)do yield yield Xe.__await(t);while(!(yield Xe.__await(t.reset().open())).closed)}finally{yield Xe.__await(t.cancel())}})}function UM(r){return new go(new l1(r))}function EM(r){let e=r.peek(Tr.magicLength+7&-8);return e&&e.byteLength>=4?Tr.checkForMagicArrowString(e)?new ul(new y_(r.read())):new go(new Ua(r)):new go(new Ua(function*(){}()))}function RM(r){return Xe.__awaiter(this,void 0,void 0,function*(){let e=yield r.peek(Tr.magicLength+7&-8);return e&&e.byteLength>=4?Tr.checkForMagicArrowString(e)?new ul(new y_(yield r.read())):new vo(new Ea(r)):new vo(new Ea(function(){return Xe.__asyncGenerator(this,arguments,function*(){})}()))})}function xM(r){return Xe.__awaiter(this,void 0,void 0,function*(){let{size:e}=yield r.stat(),t=new Ma.AsyncRandomAccessFile(r,e);return e>=Tr.magicX2AndPadding&&Tr.checkForMagicArrowString(yield t.readAt(0,Tr.magicLength+7&-8))?new p_(new c1(t)):new vo(new Ea(t))})}});var p1=V(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0});ll.toDOMStream=void 0;var cl=Et(),h1=gt(),f1=Rt();function VM(r,e){if(f1.isAsyncIterable(r))return PM(r,e);if(f1.isIterable(r))return NM(r,e);throw new Error("toDOMStream() must be called with an Iterable or AsyncIterable")}ll.toDOMStream=VM;function NM(r,e){let t=null,i=(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(u){s(u,t||(t=r[Symbol.iterator]()))},pull(u){t?s(u,t):u.close()},cancel(){((t==null?void 0:t.return)&&t.return()||!0)&&(t=null)}}),Object.assign({highWaterMark:i?n:void 0},e));function s(u,p){let m,B=null,O=u.desiredSize||null;for(;!(B=p.next(i?O:null)).done;)if(ArrayBuffer.isView(B.value)&&(m=h1.toUint8Array(B.value))&&(O!=null&&i&&(O=O-m.byteLength+1),B.value=m),u.enqueue(B.value),O!=null&&--O<=0)return;u.close()}}function PM(r,e){let t=null,i=(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(u){return cl.__awaiter(this,void 0,void 0,function*(){yield s(u,t||(t=r[Symbol.asyncIterator]()))})},pull(u){return cl.__awaiter(this,void 0,void 0,function*(){t?yield s(u,t):u.close()})},cancel(){return cl.__awaiter(this,void 0,void 0,function*(){((t==null?void 0:t.return)&&(yield t.return())||!0)&&(t=null)})}}),Object.assign({highWaterMark:i?n:void 0},e));function s(u,p){return cl.__awaiter(this,void 0,void 0,function*(){let m,B=null,O=u.desiredSize||null;for(;!(B=yield p.next(i?O:null)).done;)if(ArrayBuffer.isView(B.value)&&(m=h1.toUint8Array(B.value))&&(O!=null&&i&&(O=O-m.byteLength+1),B.value=m),u.enqueue(B.value),O!=null&&--O<=0)return;u.close()})}}});var m1=V(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.BuilderTransform=wo.builderThroughDOMStream=void 0;var LM=Et(),qM=lc();function HM(r){return new m_(r)}wo.builderThroughDOMStream=HM;var m_=class{constructor(e){this._numChunks=0,this._finished=!1,this._bufferedSize=0;let{["readableStrategy"]:t,["writableStrategy"]:i,["queueingStrategy"]:n="count"}=e,s=LM.__rest(e,["readableStrategy","writableStrategy","queueingStrategy"]);this._controller=null,this._builder=qM.Builder.new(s),this._getSize=n!=="bytes"?_1:y1;let{["highWaterMark"]:u=n==="bytes"?Math.pow(2,14):1e3}=Object.assign({},t),{["highWaterMark"]:p=n==="bytes"?Math.pow(2,14):1e3}=Object.assign({},i);this.readable=new ReadableStream({cancel:()=>{this._builder.clear()},pull:m=>{this._maybeFlush(this._builder,this._controller=m)},start:m=>{this._maybeFlush(this._builder,this._controller=m)}},{highWaterMark:u,size:n!=="bytes"?_1:y1}),this.writable=new WritableStream({abort:()=>{this._builder.clear()},write:()=>{this._maybeFlush(this._builder,this._controller)},close:()=>{this._maybeFlush(this._builder.finish(),this._controller)}},{highWaterMark:p,size:m=>this._writeValueAndReturnChunkSize(m)})}_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)}};wo.BuilderTransform=m_;var _1=r=>r.length,y1=r=>r.byteLength});var b1=V(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});dl.recordBatchReaderThroughDOMStream=void 0;var Ra=Et(),zM=en(),WM=Ca();function YM(r,e){let t=new zM.AsyncByteQueue,i=null,n=new ReadableStream({cancel(){return Ra.__awaiter(this,void 0,void 0,function*(){yield t.close()})},start(p){return Ra.__awaiter(this,void 0,void 0,function*(){yield u(p,i||(i=yield s()))})},pull(p){return Ra.__awaiter(this,void 0,void 0,function*(){i?yield u(p,i):p.close()})}});return{writable:new WritableStream(t,Object.assign({highWaterMark:Math.pow(2,14)},r)),readable:n};function s(){return Ra.__awaiter(this,void 0,void 0,function*(){return yield(yield WM.RecordBatchReader.from(t)).open(e)})}function u(p,m){return Ra.__awaiter(this,void 0,void 0,function*(){let B=p.desiredSize,O=null;for(;!(O=yield m.next()).done;)if(p.enqueue(O.value),B!=null&&--B<=0)return;p.close()})}}dl.recordBatchReaderThroughDOMStream=YM});var g1=V(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});hl.recordBatchWriterThroughDOMStream=void 0;var fl=Et(),GM=en();function $M(r,e){let t=new this(r),i=new GM.AsyncByteStream(t),n=new ReadableStream({type:"bytes",cancel(){return fl.__awaiter(this,void 0,void 0,function*(){yield i.cancel()})},pull(u){return fl.__awaiter(this,void 0,void 0,function*(){yield s(u)})},start(u){return fl.__awaiter(this,void 0,void 0,function*(){yield s(u)})}},Object.assign({highWaterMark:Math.pow(2,14)},e));return{writable:new WritableStream(t,r),readable:n};function s(u){return fl.__awaiter(this,void 0,void 0,function*(){let p=null,m=u.desiredSize;for(;p=yield i.read(m||null);)if(u.enqueue(p),m!=null&&(m-=p.byteLength)<=0)return;u.close()})}}hl.recordBatchWriterThroughDOMStream=$M});var B_=V(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.custom=De.or=De.and=De.col=De.lit=De.CustomPredicate=De.Not=De.GTeq=De.LTeq=De.Equals=De.Or=De.And=De.CombinationPredicate=De.ComparisonPredicate=De.Predicate=De.Col=De.Literal=De.Value=void 0;var KM=qc(),yn=class{eq(e){return e instanceof yn||(e=new Oi(e)),new g_(this,e)}le(e){return e instanceof yn||(e=new Oi(e)),new v_(this,e)}ge(e){return e instanceof yn||(e=new Oi(e)),new w_(this,e)}lt(e){return new jo(this.ge(e))}gt(e){return new jo(this.le(e))}ne(e){return new jo(this.eq(e))}};De.Value=yn;var Oi=class extends yn{constructor(e){super();this.v=e}};De.Literal=Oi;var b_=class extends yn{constructor(e){super();this.name=e}bind(e){if(!this.colidx){this.colidx=-1;let i=e.schema.fields;for(let n=-1;++n<i.length;)if(i[n].name===this.name){this.colidx=n;break}if(this.colidx<0)throw new Error(`Failed to bind Col "${this.name}"`)}let t=this.vector=e.getChildAt(this.colidx);return i=>t.get(i)}};De.Col=b_;var Bo=class{and(...e){return new To(this,...e)}or(...e){return new So(this,...e)}not(){return new jo(this)}};De.Predicate=Bo;var xa=class extends Bo{constructor(e,t){super();this.left=e,this.right=t}bind(e){return this.left instanceof Oi?this.right instanceof Oi?this._bindLitLit(e,this.left,this.right):this._bindLitCol(e,this.left,this.right):this.right instanceof Oi?this._bindColLit(e,this.left,this.right):this._bindColCol(e,this.left,this.right)}};De.ComparisonPredicate=xa;var Va=class extends Bo{constructor(...e){super();this.children=e}};De.CombinationPredicate=Va;Va.prototype.children=Object.freeze([]);var To=class extends Va{constructor(...e){e=e.reduce((t,i)=>t.concat(i instanceof To?i.children:i),[]);super(...e)}bind(e){let t=this.children.map(i=>i.bind(e));return(i,n)=>t.every(s=>s(i,n))}};De.And=To;var So=class extends Va{constructor(...e){e=e.reduce((t,i)=>t.concat(i instanceof So?i.children:i),[]);super(...e)}bind(e){let t=this.children.map(i=>i.bind(e));return(i,n)=>t.some(s=>s(i,n))}};De.Or=So;var g_=class extends xa{_bindLitLit(e,t,i){let n=t.v==i.v;return()=>n}_bindColCol(e,t,i){let n=t.bind(e),s=i.bind(e);return(u,p)=>n(u,p)==s(u,p)}_bindColLit(e,t,i){let n=t.bind(e);if(t.vector instanceof KM.DictionaryVector){let s,u=t.vector;return u.dictionary!==this.lastDictionary?(s=u.reverseLookup(i.v),this.lastDictionary=u.dictionary,this.lastKey=s):s=this.lastKey,s===-1?()=>!1:p=>u.getKey(p)===s}else return(s,u)=>n(s,u)==i.v}_bindLitCol(e,t,i){return this._bindColLit(e,i,t)}};De.Equals=g_;var v_=class extends xa{_bindLitLit(e,t,i){let n=t.v<=i.v;return()=>n}_bindColCol(e,t,i){let n=t.bind(e),s=i.bind(e);return(u,p)=>n(u,p)<=s(u,p)}_bindColLit(e,t,i){let n=t.bind(e);return(s,u)=>n(s,u)<=i.v}_bindLitCol(e,t,i){let n=i.bind(e);return(s,u)=>t.v<=n(s,u)}};De.LTeq=v_;var w_=class extends xa{_bindLitLit(e,t,i){let n=t.v>=i.v;return()=>n}_bindColCol(e,t,i){let n=t.bind(e),s=i.bind(e);return(u,p)=>n(u,p)>=s(u,p)}_bindColLit(e,t,i){let n=t.bind(e);return(s,u)=>n(s,u)>=i.v}_bindLitCol(e,t,i){let n=i.bind(e);return(s,u)=>t.v>=n(s,u)}};De.GTeq=w_;var jo=class extends Bo{constructor(e){super();this.child=e}bind(e){let t=this.child.bind(e);return(i,n)=>!t(i,n)}};De.Not=jo;var j_=class extends Bo{constructor(e,t){super();this.next=e,this.bind_=t}bind(e){return this.bind_(e),this.next}};De.CustomPredicate=j_;function JM(r){return new Oi(r)}De.lit=JM;function XM(r){return new b_(r)}De.col=XM;function ZM(...r){return new To(...r)}De.and=ZM;function QM(...r){return new So(...r)}De.or=QM;function eU(r,e){return new j_(r,e)}De.custom=eU});var S1=V(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.FilteredDataFrame=mn.CountByResult=mn.DataFrame=void 0;var v1=Ba(),w1=Yc(),T_=St(),j1=B_(),tU=Ai(),B1=Pe(),S_=class extends v1.Table{filter(e){return new Na(this.chunks,e)}scan(e,t){let i=this.chunks,n=i.length;for(let s=-1;++s<n;){let u=i[s];t&&t(u);for(let p=-1,m=u.length;++p<m;)e(p,u)}}scanReverse(e,t){let i=this.chunks,n=i.length;for(let s=n;--s>=0;){let u=i[s];t&&t(u);for(let p=u.length;--p>=0;)e(p,u)}}countBy(e){let t=this.chunks,i=t.length,n=typeof e=="string"?new j1.Col(e):e;n.bind(t[i-1]);let s=n.vector;if(!B1.DataType.isDictionary(s.type))throw new Error("countBy currently only supports dictionary-encoded columns");let u=Math.ceil(Math.log(s.length)/Math.log(256)),p=u==4?Uint32Array:u>=2?Uint16Array:Uint8Array,m=new p(s.dictionary.length);for(let B=-1;++B<i;){let O=t[B];n.bind(O);let R=n.vector.indices;for(let W=-1,N=O.length;++W<N;){let Se=R.get(W);Se!==null&&m[Se]++}}return new pl(s.dictionary,w1.IntVector.from(m))}};mn.DataFrame=S_;var pl=class extends v1.Table{constructor(e,t){let i=new T_.Schema([new T_.Field("values",e.type),new T_.Field("counts",t.type)]);super(new tU.RecordBatch(i,t.length,[e,t]))}toJSON(){let e=this.getColumnAt(0),t=this.getColumnAt(1),i={};for(let n=-1;++n<this.length;)i[e.get(n)]=t.get(n);return i}};mn.CountByResult=pl;var T1=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}},Na=class extends S_{constructor(e,t){super(e);this._predicate=t}scan(e,t){let i=this._chunks,n=i.length;for(let s=-1;++s<n;){let u=i[s],p=this._predicate.bind(u),m=!1;for(let B=-1,O=u.length;++B<O;)p(B,u)&&(t&&!m&&(t(u),m=!0),e(B,u))}}scanReverse(e,t){let i=this._chunks,n=i.length;for(let s=n;--s>=0;){let u=i[s],p=this._predicate.bind(u),m=!1;for(let B=u.length;--B>=0;)p(B,u)&&(t&&!m&&(t(u),m=!0),e(B,u))}}count(){let e=0,t=this._chunks,i=t.length;for(let n=-1;++n<i;){let s=t[n],u=this._predicate.bind(s);for(let p=-1,m=s.length;++p<m;)u(p,s)&&++e}return e}[Symbol.iterator](){return new T1(this._chunks,this._predicate)}filter(e){return new Na(this._chunks,this._predicate.and(e))}countBy(e){let t=this._chunks,i=t.length,n=typeof e=="string"?new j1.Col(e):e;n.bind(t[i-1]);let s=n.vector;if(!B1.DataType.isDictionary(s.type))throw new Error("countBy currently only supports dictionary-encoded columns");let u=Math.ceil(Math.log(s.length)/Math.log(256)),p=u==4?Uint32Array:u>=2?Uint16Array:Uint8Array,m=new p(s.dictionary.length);for(let B=-1;++B<i;){let O=t[B],R=this._predicate.bind(O);n.bind(O);let W=n.vector.indices;for(let N=-1,Se=O.length;++N<Se;){let ye=W.get(N);ye!==null&&R(N,O)&&m[ye]++}}return new pl(s.dictionary,w1.IntVector.from(m))}};mn.FilteredDataFrame=Na});var D1=V(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});w.isTypedArray=w.util=w.predicate=w.CountByResult=w.FilteredDataFrame=w.DataFrame=w.RecordBatch=w.Message=w.JSONMessageReader=w.AsyncMessageReader=w.MessageReader=w.RecordBatchJSONWriter=w.RecordBatchStreamWriter=w.RecordBatchFileWriter=w.RecordBatchWriter=w.AsyncRecordBatchStreamReader=w.AsyncRecordBatchFileReader=w.RecordBatchStreamReader=w.RecordBatchFileReader=w.RecordBatchReader=w.AsyncByteQueue=w.AsyncByteStream=w.ByteStream=w.Utf8Builder=w.SparseUnionBuilder=w.DenseUnionBuilder=w.UnionBuilder=w.TimeNanosecondBuilder=w.TimeMicrosecondBuilder=w.TimeMillisecondBuilder=w.TimeSecondBuilder=w.TimeBuilder=w.TimestampNanosecondBuilder=w.TimestampMicrosecondBuilder=w.TimestampMillisecondBuilder=w.TimestampSecondBuilder=w.TimestampBuilder=w.StructBuilder=w.NullBuilder=w.MapBuilder=w.ListBuilder=w.Uint64Builder=w.Uint32Builder=w.Uint16Builder=w.Uint8Builder=w.Int64Builder=w.Int32Builder=w.Int16Builder=w.Int8Builder=w.IntBuilder=w.IntervalYearMonthBuilder=w.IntervalDayTimeBuilder=w.IntervalBuilder=w.Float64Builder=w.Float32Builder=w.Float16Builder=w.FloatBuilder=w.FixedSizeListBuilder=w.FixedSizeBinaryBuilder=w.DictionaryBuilder=w.DecimalBuilder=w.DateMillisecondBuilder=w.DateDayBuilder=w.DateBuilder=w.BoolBuilder=w.BinaryBuilder=w.Builder=w.Utf8Vector=w.SparseUnionVector=w.DenseUnionVector=w.UnionVector=w.TimeNanosecondVector=w.TimeMicrosecondVector=w.TimeMillisecondVector=w.TimeSecondVector=w.TimeVector=w.TimestampNanosecondVector=w.TimestampMicrosecondVector=w.TimestampMillisecondVector=w.TimestampSecondVector=w.TimestampVector=w.StructVector=w.NullVector=w.MapVector=w.ListVector=w.Uint64Vector=w.Uint32Vector=w.Uint16Vector=w.Uint8Vector=w.Int64Vector=w.Int32Vector=w.Int16Vector=w.Int8Vector=w.IntVector=w.IntervalYearMonthVector=w.IntervalDayTimeVector=w.IntervalVector=w.Float64Vector=w.Float32Vector=w.Float16Vector=w.FloatVector=w.FixedSizeListVector=w.FixedSizeBinaryVector=w.DictionaryVector=w.DecimalVector=w.DateMillisecondVector=w.DateDayVector=w.DateVector=w.Chunked=w.BoolVector=w.BinaryVector=w.BaseVector=w.Vector=w.Field=w.Schema=w.Visitor=w.Column=w.Table=w.Map_=w.FixedSizeList=w.IntervalYearMonth=w.IntervalDayTime=w.Interval=w.Dictionary=w.SparseUnion=w.DenseUnion=w.Union=w.Struct=w.List=w.Decimal=w.TimeNanosecond=w.TimeMicrosecond=w.TimeMillisecond=w.TimeSecond=w.Time=w.TimestampNanosecond=w.TimestampMicrosecond=w.TimestampMillisecond=w.TimestampSecond=w.Timestamp=w.DateMillisecond=w.DateDay=w.Date_=w.FixedSizeBinary=w.Binary=w.Utf8=w.Float64=w.Float32=w.Float16=w.Float=w.Uint64=w.Uint32=w.Uint16=w.Uint8=w.Int64=w.Int32=w.Int16=w.Int8=w.Int=w.Bool=w.Null=w.DataType=w.Data=w.BufferType=w.Type=w.MessageHeader=w.MetadataVersion=w.IntervalUnit=w.UnionMode=w.Precision=w.TimeUnit=w.DateUnit=void 0;var Io=Li();Object.defineProperty(w,"DateUnit",{enumerable:!0,get:function(){return Io.DateUnit}});Object.defineProperty(w,"TimeUnit",{enumerable:!0,get:function(){return Io.TimeUnit}});Object.defineProperty(w,"Precision",{enumerable:!0,get:function(){return Io.Precision}});Object.defineProperty(w,"UnionMode",{enumerable:!0,get:function(){return Io.UnionMode}});Object.defineProperty(w,"IntervalUnit",{enumerable:!0,get:function(){return Io.IntervalUnit}});Object.defineProperty(w,"MetadataVersion",{enumerable:!0,get:function(){return Io.MetadataVersion}});var rU=Tu();Object.defineProperty(w,"MessageHeader",{enumerable:!0,get:function(){return rU.MessageHeader}});var I1=$e();Object.defineProperty(w,"Type",{enumerable:!0,get:function(){return I1.Type}});Object.defineProperty(w,"BufferType",{enumerable:!0,get:function(){return I1.BufferType}});var iU=Mr();Object.defineProperty(w,"Data",{enumerable:!0,get:function(){return iU.Data}});var we=Pe();Object.defineProperty(w,"DataType",{enumerable:!0,get:function(){return we.DataType}});Object.defineProperty(w,"Null",{enumerable:!0,get:function(){return we.Null}});Object.defineProperty(w,"Bool",{enumerable:!0,get:function(){return we.Bool}});Object.defineProperty(w,"Int",{enumerable:!0,get:function(){return we.Int}});Object.defineProperty(w,"Int8",{enumerable:!0,get:function(){return we.Int8}});Object.defineProperty(w,"Int16",{enumerable:!0,get:function(){return we.Int16}});Object.defineProperty(w,"Int32",{enumerable:!0,get:function(){return we.Int32}});Object.defineProperty(w,"Int64",{enumerable:!0,get:function(){return we.Int64}});Object.defineProperty(w,"Uint8",{enumerable:!0,get:function(){return we.Uint8}});Object.defineProperty(w,"Uint16",{enumerable:!0,get:function(){return we.Uint16}});Object.defineProperty(w,"Uint32",{enumerable:!0,get:function(){return we.Uint32}});Object.defineProperty(w,"Uint64",{enumerable:!0,get:function(){return we.Uint64}});Object.defineProperty(w,"Float",{enumerable:!0,get:function(){return we.Float}});Object.defineProperty(w,"Float16",{enumerable:!0,get:function(){return we.Float16}});Object.defineProperty(w,"Float32",{enumerable:!0,get:function(){return we.Float32}});Object.defineProperty(w,"Float64",{enumerable:!0,get:function(){return we.Float64}});Object.defineProperty(w,"Utf8",{enumerable:!0,get:function(){return we.Utf8}});Object.defineProperty(w,"Binary",{enumerable:!0,get:function(){return we.Binary}});Object.defineProperty(w,"FixedSizeBinary",{enumerable:!0,get:function(){return we.FixedSizeBinary}});Object.defineProperty(w,"Date_",{enumerable:!0,get:function(){return we.Date_}});Object.defineProperty(w,"DateDay",{enumerable:!0,get:function(){return we.DateDay}});Object.defineProperty(w,"DateMillisecond",{enumerable:!0,get:function(){return we.DateMillisecond}});Object.defineProperty(w,"Timestamp",{enumerable:!0,get:function(){return we.Timestamp}});Object.defineProperty(w,"TimestampSecond",{enumerable:!0,get:function(){return we.TimestampSecond}});Object.defineProperty(w,"TimestampMillisecond",{enumerable:!0,get:function(){return we.TimestampMillisecond}});Object.defineProperty(w,"TimestampMicrosecond",{enumerable:!0,get:function(){return we.TimestampMicrosecond}});Object.defineProperty(w,"TimestampNanosecond",{enumerable:!0,get:function(){return we.TimestampNanosecond}});Object.defineProperty(w,"Time",{enumerable:!0,get:function(){return we.Time}});Object.defineProperty(w,"TimeSecond",{enumerable:!0,get:function(){return we.TimeSecond}});Object.defineProperty(w,"TimeMillisecond",{enumerable:!0,get:function(){return we.TimeMillisecond}});Object.defineProperty(w,"TimeMicrosecond",{enumerable:!0,get:function(){return we.TimeMicrosecond}});Object.defineProperty(w,"TimeNanosecond",{enumerable:!0,get:function(){return we.TimeNanosecond}});Object.defineProperty(w,"Decimal",{enumerable:!0,get:function(){return we.Decimal}});Object.defineProperty(w,"List",{enumerable:!0,get:function(){return we.List}});Object.defineProperty(w,"Struct",{enumerable:!0,get:function(){return we.Struct}});Object.defineProperty(w,"Union",{enumerable:!0,get:function(){return we.Union}});Object.defineProperty(w,"DenseUnion",{enumerable:!0,get:function(){return we.DenseUnion}});Object.defineProperty(w,"SparseUnion",{enumerable:!0,get:function(){return we.SparseUnion}});Object.defineProperty(w,"Dictionary",{enumerable:!0,get:function(){return we.Dictionary}});Object.defineProperty(w,"Interval",{enumerable:!0,get:function(){return we.Interval}});Object.defineProperty(w,"IntervalDayTime",{enumerable:!0,get:function(){return we.IntervalDayTime}});Object.defineProperty(w,"IntervalYearMonth",{enumerable:!0,get:function(){return we.IntervalYearMonth}});Object.defineProperty(w,"FixedSizeList",{enumerable:!0,get:function(){return we.FixedSizeList}});Object.defineProperty(w,"Map_",{enumerable:!0,get:function(){return we.Map_}});var nU=Ba();Object.defineProperty(w,"Table",{enumerable:!0,get:function(){return nU.Table}});var sU=ro();Object.defineProperty(w,"Column",{enumerable:!0,get:function(){return sU.Column}});var oU=Ot();Object.defineProperty(w,"Visitor",{enumerable:!0,get:function(){return oU.Visitor}});var A1=St();Object.defineProperty(w,"Schema",{enumerable:!0,get:function(){return A1.Schema}});Object.defineProperty(w,"Field",{enumerable:!0,get:function(){return A1.Field}});var _e=ui();Object.defineProperty(w,"Vector",{enumerable:!0,get:function(){return _e.Vector}});Object.defineProperty(w,"BaseVector",{enumerable:!0,get:function(){return _e.BaseVector}});Object.defineProperty(w,"BinaryVector",{enumerable:!0,get:function(){return _e.BinaryVector}});Object.defineProperty(w,"BoolVector",{enumerable:!0,get:function(){return _e.BoolVector}});Object.defineProperty(w,"Chunked",{enumerable:!0,get:function(){return _e.Chunked}});Object.defineProperty(w,"DateVector",{enumerable:!0,get:function(){return _e.DateVector}});Object.defineProperty(w,"DateDayVector",{enumerable:!0,get:function(){return _e.DateDayVector}});Object.defineProperty(w,"DateMillisecondVector",{enumerable:!0,get:function(){return _e.DateMillisecondVector}});Object.defineProperty(w,"DecimalVector",{enumerable:!0,get:function(){return _e.DecimalVector}});Object.defineProperty(w,"DictionaryVector",{enumerable:!0,get:function(){return _e.DictionaryVector}});Object.defineProperty(w,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return _e.FixedSizeBinaryVector}});Object.defineProperty(w,"FixedSizeListVector",{enumerable:!0,get:function(){return _e.FixedSizeListVector}});Object.defineProperty(w,"FloatVector",{enumerable:!0,get:function(){return _e.FloatVector}});Object.defineProperty(w,"Float16Vector",{enumerable:!0,get:function(){return _e.Float16Vector}});Object.defineProperty(w,"Float32Vector",{enumerable:!0,get:function(){return _e.Float32Vector}});Object.defineProperty(w,"Float64Vector",{enumerable:!0,get:function(){return _e.Float64Vector}});Object.defineProperty(w,"IntervalVector",{enumerable:!0,get:function(){return _e.IntervalVector}});Object.defineProperty(w,"IntervalDayTimeVector",{enumerable:!0,get:function(){return _e.IntervalDayTimeVector}});Object.defineProperty(w,"IntervalYearMonthVector",{enumerable:!0,get:function(){return _e.IntervalYearMonthVector}});Object.defineProperty(w,"IntVector",{enumerable:!0,get:function(){return _e.IntVector}});Object.defineProperty(w,"Int8Vector",{enumerable:!0,get:function(){return _e.Int8Vector}});Object.defineProperty(w,"Int16Vector",{enumerable:!0,get:function(){return _e.Int16Vector}});Object.defineProperty(w,"Int32Vector",{enumerable:!0,get:function(){return _e.Int32Vector}});Object.defineProperty(w,"Int64Vector",{enumerable:!0,get:function(){return _e.Int64Vector}});Object.defineProperty(w,"Uint8Vector",{enumerable:!0,get:function(){return _e.Uint8Vector}});Object.defineProperty(w,"Uint16Vector",{enumerable:!0,get:function(){return _e.Uint16Vector}});Object.defineProperty(w,"Uint32Vector",{enumerable:!0,get:function(){return _e.Uint32Vector}});Object.defineProperty(w,"Uint64Vector",{enumerable:!0,get:function(){return _e.Uint64Vector}});Object.defineProperty(w,"ListVector",{enumerable:!0,get:function(){return _e.ListVector}});Object.defineProperty(w,"MapVector",{enumerable:!0,get:function(){return _e.MapVector}});Object.defineProperty(w,"NullVector",{enumerable:!0,get:function(){return _e.NullVector}});Object.defineProperty(w,"StructVector",{enumerable:!0,get:function(){return _e.StructVector}});Object.defineProperty(w,"TimestampVector",{enumerable:!0,get:function(){return _e.TimestampVector}});Object.defineProperty(w,"TimestampSecondVector",{enumerable:!0,get:function(){return _e.TimestampSecondVector}});Object.defineProperty(w,"TimestampMillisecondVector",{enumerable:!0,get:function(){return _e.TimestampMillisecondVector}});Object.defineProperty(w,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return _e.TimestampMicrosecondVector}});Object.defineProperty(w,"TimestampNanosecondVector",{enumerable:!0,get:function(){return _e.TimestampNanosecondVector}});Object.defineProperty(w,"TimeVector",{enumerable:!0,get:function(){return _e.TimeVector}});Object.defineProperty(w,"TimeSecondVector",{enumerable:!0,get:function(){return _e.TimeSecondVector}});Object.defineProperty(w,"TimeMillisecondVector",{enumerable:!0,get:function(){return _e.TimeMillisecondVector}});Object.defineProperty(w,"TimeMicrosecondVector",{enumerable:!0,get:function(){return _e.TimeMicrosecondVector}});Object.defineProperty(w,"TimeNanosecondVector",{enumerable:!0,get:function(){return _e.TimeNanosecondVector}});Object.defineProperty(w,"UnionVector",{enumerable:!0,get:function(){return _e.UnionVector}});Object.defineProperty(w,"DenseUnionVector",{enumerable:!0,get:function(){return _e.DenseUnionVector}});Object.defineProperty(w,"SparseUnionVector",{enumerable:!0,get:function(){return _e.SparseUnionVector}});Object.defineProperty(w,"Utf8Vector",{enumerable:!0,get:function(){return _e.Utf8Vector}});var je=lc();Object.defineProperty(w,"Builder",{enumerable:!0,get:function(){return je.Builder}});Object.defineProperty(w,"BinaryBuilder",{enumerable:!0,get:function(){return je.BinaryBuilder}});Object.defineProperty(w,"BoolBuilder",{enumerable:!0,get:function(){return je.BoolBuilder}});Object.defineProperty(w,"DateBuilder",{enumerable:!0,get:function(){return je.DateBuilder}});Object.defineProperty(w,"DateDayBuilder",{enumerable:!0,get:function(){return je.DateDayBuilder}});Object.defineProperty(w,"DateMillisecondBuilder",{enumerable:!0,get:function(){return je.DateMillisecondBuilder}});Object.defineProperty(w,"DecimalBuilder",{enumerable:!0,get:function(){return je.DecimalBuilder}});Object.defineProperty(w,"DictionaryBuilder",{enumerable:!0,get:function(){return je.DictionaryBuilder}});Object.defineProperty(w,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return je.FixedSizeBinaryBuilder}});Object.defineProperty(w,"FixedSizeListBuilder",{enumerable:!0,get:function(){return je.FixedSizeListBuilder}});Object.defineProperty(w,"FloatBuilder",{enumerable:!0,get:function(){return je.FloatBuilder}});Object.defineProperty(w,"Float16Builder",{enumerable:!0,get:function(){return je.Float16Builder}});Object.defineProperty(w,"Float32Builder",{enumerable:!0,get:function(){return je.Float32Builder}});Object.defineProperty(w,"Float64Builder",{enumerable:!0,get:function(){return je.Float64Builder}});Object.defineProperty(w,"IntervalBuilder",{enumerable:!0,get:function(){return je.IntervalBuilder}});Object.defineProperty(w,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return je.IntervalDayTimeBuilder}});Object.defineProperty(w,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return je.IntervalYearMonthBuilder}});Object.defineProperty(w,"IntBuilder",{enumerable:!0,get:function(){return je.IntBuilder}});Object.defineProperty(w,"Int8Builder",{enumerable:!0,get:function(){return je.Int8Builder}});Object.defineProperty(w,"Int16Builder",{enumerable:!0,get:function(){return je.Int16Builder}});Object.defineProperty(w,"Int32Builder",{enumerable:!0,get:function(){return je.Int32Builder}});Object.defineProperty(w,"Int64Builder",{enumerable:!0,get:function(){return je.Int64Builder}});Object.defineProperty(w,"Uint8Builder",{enumerable:!0,get:function(){return je.Uint8Builder}});Object.defineProperty(w,"Uint16Builder",{enumerable:!0,get:function(){return je.Uint16Builder}});Object.defineProperty(w,"Uint32Builder",{enumerable:!0,get:function(){return je.Uint32Builder}});Object.defineProperty(w,"Uint64Builder",{enumerable:!0,get:function(){return je.Uint64Builder}});Object.defineProperty(w,"ListBuilder",{enumerable:!0,get:function(){return je.ListBuilder}});Object.defineProperty(w,"MapBuilder",{enumerable:!0,get:function(){return je.MapBuilder}});Object.defineProperty(w,"NullBuilder",{enumerable:!0,get:function(){return je.NullBuilder}});Object.defineProperty(w,"StructBuilder",{enumerable:!0,get:function(){return je.StructBuilder}});Object.defineProperty(w,"TimestampBuilder",{enumerable:!0,get:function(){return je.TimestampBuilder}});Object.defineProperty(w,"TimestampSecondBuilder",{enumerable:!0,get:function(){return je.TimestampSecondBuilder}});Object.defineProperty(w,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return je.TimestampMillisecondBuilder}});Object.defineProperty(w,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return je.TimestampMicrosecondBuilder}});Object.defineProperty(w,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return je.TimestampNanosecondBuilder}});Object.defineProperty(w,"TimeBuilder",{enumerable:!0,get:function(){return je.TimeBuilder}});Object.defineProperty(w,"TimeSecondBuilder",{enumerable:!0,get:function(){return je.TimeSecondBuilder}});Object.defineProperty(w,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return je.TimeMillisecondBuilder}});Object.defineProperty(w,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return je.TimeMicrosecondBuilder}});Object.defineProperty(w,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return je.TimeNanosecondBuilder}});Object.defineProperty(w,"UnionBuilder",{enumerable:!0,get:function(){return je.UnionBuilder}});Object.defineProperty(w,"DenseUnionBuilder",{enumerable:!0,get:function(){return je.DenseUnionBuilder}});Object.defineProperty(w,"SparseUnionBuilder",{enumerable:!0,get:function(){return je.SparseUnionBuilder}});Object.defineProperty(w,"Utf8Builder",{enumerable:!0,get:function(){return je.Utf8Builder}});var A_=en();Object.defineProperty(w,"ByteStream",{enumerable:!0,get:function(){return A_.ByteStream}});Object.defineProperty(w,"AsyncByteStream",{enumerable:!0,get:function(){return A_.AsyncByteStream}});Object.defineProperty(w,"AsyncByteQueue",{enumerable:!0,get:function(){return A_.AsyncByteQueue}});var Pa=Ca();Object.defineProperty(w,"RecordBatchReader",{enumerable:!0,get:function(){return Pa.RecordBatchReader}});Object.defineProperty(w,"RecordBatchFileReader",{enumerable:!0,get:function(){return Pa.RecordBatchFileReader}});Object.defineProperty(w,"RecordBatchStreamReader",{enumerable:!0,get:function(){return Pa.RecordBatchStreamReader}});Object.defineProperty(w,"AsyncRecordBatchFileReader",{enumerable:!0,get:function(){return Pa.AsyncRecordBatchFileReader}});Object.defineProperty(w,"AsyncRecordBatchStreamReader",{enumerable:!0,get:function(){return Pa.AsyncRecordBatchStreamReader}});var _l=Ec();Object.defineProperty(w,"RecordBatchWriter",{enumerable:!0,get:function(){return _l.RecordBatchWriter}});Object.defineProperty(w,"RecordBatchFileWriter",{enumerable:!0,get:function(){return _l.RecordBatchFileWriter}});Object.defineProperty(w,"RecordBatchStreamWriter",{enumerable:!0,get:function(){return _l.RecordBatchStreamWriter}});Object.defineProperty(w,"RecordBatchJSONWriter",{enumerable:!0,get:function(){return _l.RecordBatchJSONWriter}});var D_=Tc();Object.defineProperty(w,"MessageReader",{enumerable:!0,get:function(){return D_.MessageReader}});Object.defineProperty(w,"AsyncMessageReader",{enumerable:!0,get:function(){return D_.AsyncMessageReader}});Object.defineProperty(w,"JSONMessageReader",{enumerable:!0,get:function(){return D_.JSONMessageReader}});var aU=Qn();Object.defineProperty(w,"Message",{enumerable:!0,get:function(){return aU.Message}});var uU=Ai();Object.defineProperty(w,"RecordBatch",{enumerable:!0,get:function(){return uU.RecordBatch}});var F_=S1();Object.defineProperty(w,"DataFrame",{enumerable:!0,get:function(){return F_.DataFrame}});Object.defineProperty(w,"FilteredDataFrame",{enumerable:!0,get:function(){return F_.FilteredDataFrame}});Object.defineProperty(w,"CountByResult",{enumerable:!0,get:function(){return F_.CountByResult}});var cU=aa(),lU=Uh(),dU=Xr(),fU=ia(),hU=gt(),pU=_a(),_U=B_();w.predicate=_U;var I_=Zh();w.util=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},cU),lU),dU),fU),hU),pU),{compareSchemas:I_.compareSchemas,compareFields:I_.compareFields,compareTypes:I_.compareTypes});var yU=Jn();Object.defineProperty(w,"isTypedArray",{enumerable:!0,get:function(){return yU.isTypedArray}})});var W1=V((exports,module)=>{(function(){"use strict";var ERROR="input is invalid type",WINDOW=typeof window=="object",root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&typeof self=="object",NODE_JS=!root.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,AMD=typeof define=="function"&&define.amd,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];(root.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(r){return Object.prototype.toString.call(r)==="[object Array]"}),ARRAY_BUFFER&&(root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(r){return typeof r=="object"&&r.buffer&&r.buffer.constructor===ArrayBuffer});var createOutputMethod=function(r,e){return function(t){return new Sha256(e,!0).update(t)[r]()}},createMethod=function(r){var e=createOutputMethod("hex",r);NODE_JS&&(e=nodeWrap(e,r)),e.create=function(){return new Sha256(r)},e.update=function(n){return e.create().update(n)};for(var t=0;t<OUTPUT_TYPES.length;++t){var i=OUTPUT_TYPES[t];e[i]=createOutputMethod(i,r)}return e},nodeWrap=function(method,is224){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),algorithm=is224?"sha224":"sha256",nodeMethod=function(r){if(typeof r=="string")return crypto.createHash(algorithm).update(r,"utf8").digest("hex");if(r==null)throw new Error(ERROR);return r.constructor===ArrayBuffer&&(r=new Uint8Array(r)),Array.isArray(r)||ArrayBuffer.isView(r)||r.constructor===Buffer?crypto.createHash(algorithm).update(new Buffer(r)).digest("hex"):method(r)};return nodeMethod},createHmacOutputMethod=function(r,e){return function(t,i){return new HmacSha256(t,e,!0).update(i)[r]()}},createHmacMethod=function(r){var e=createHmacOutputMethod("hex",r);e.create=function(n){return new HmacSha256(n,r)},e.update=function(n,s){return e.create(n).update(s)};for(var t=0;t<OUTPUT_TYPES.length;++t){var i=OUTPUT_TYPES[t];e[i]=createHmacOutputMethod(i,r)}return e};function Sha256(r,e){e?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=r}Sha256.prototype.update=function(r){if(!this.finalized){var e,t=typeof r;if(t!=="string"){if(t==="object"){if(r===null)throw new Error(ERROR);if(ARRAY_BUFFER&&r.constructor===ArrayBuffer)r=new Uint8Array(r);else if(!Array.isArray(r)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(r)))throw new Error(ERROR)}else throw new Error(ERROR);e=!0}for(var i,n=0,s,u=r.length,p=this.blocks;n<u;){if(this.hashed&&(this.hashed=!1,p[0]=this.block,p[16]=p[1]=p[2]=p[3]=p[4]=p[5]=p[6]=p[7]=p[8]=p[9]=p[10]=p[11]=p[12]=p[13]=p[14]=p[15]=0),e)for(s=this.start;n<u&&s<64;++n)p[s>>2]|=r[n]<<SHIFT[s++&3];else for(s=this.start;n<u&&s<64;++n)i=r.charCodeAt(n),i<128?p[s>>2]|=i<<SHIFT[s++&3]:i<2048?(p[s>>2]|=(192|i>>6)<<SHIFT[s++&3],p[s>>2]|=(128|i&63)<<SHIFT[s++&3]):i<55296||i>=57344?(p[s>>2]|=(224|i>>12)<<SHIFT[s++&3],p[s>>2]|=(128|i>>6&63)<<SHIFT[s++&3],p[s>>2]|=(128|i&63)<<SHIFT[s++&3]):(i=65536+((i&1023)<<10|r.charCodeAt(++n)&1023),p[s>>2]|=(240|i>>18)<<SHIFT[s++&3],p[s>>2]|=(128|i>>12&63)<<SHIFT[s++&3],p[s>>2]|=(128|i>>6&63)<<SHIFT[s++&3],p[s>>2]|=(128|i&63)<<SHIFT[s++&3]);this.lastByteIndex=s,this.bytes+=s-this.start,s>=64?(this.block=p[16],this.start=s-64,this.hash(),this.hashed=!0):this.start=s}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var r=this.blocks,e=this.lastByteIndex;r[16]=this.block,r[e>>2]|=EXTRA[e&3],this.block=r[16],e>=56&&(this.hashed||this.hash(),r[0]=this.block,r[16]=r[1]=r[2]=r[3]=r[4]=r[5]=r[6]=r[7]=r[8]=r[9]=r[10]=r[11]=r[12]=r[13]=r[14]=r[15]=0),r[14]=this.hBytes<<3|this.bytes>>>29,r[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var r=this.h0,e=this.h1,t=this.h2,i=this.h3,n=this.h4,s=this.h5,u=this.h6,p=this.h7,m=this.blocks,B,O,R,W,N,Se,ye,Ee,qe,Tt,Nr;for(B=16;B<64;++B)N=m[B-15],O=(N>>>7|N<<25)^(N>>>18|N<<14)^N>>>3,N=m[B-2],R=(N>>>17|N<<15)^(N>>>19|N<<13)^N>>>10,m[B]=m[B-16]+O+m[B-7]+R<<0;for(Nr=e&t,B=0;B<64;B+=4)this.first?(this.is224?(Ee=300032,N=m[0]-1413257819,p=N-150054599<<0,i=N+24177077<<0):(Ee=704751109,N=m[0]-210244248,p=N-1521486534<<0,i=N+143694565<<0),this.first=!1):(O=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),R=(n>>>6|n<<26)^(n>>>11|n<<21)^(n>>>25|n<<7),Ee=r&e,W=Ee^r&t^Nr,ye=n&s^~n&u,N=p+R+ye+K[B]+m[B],Se=O+W,p=i+N<<0,i=N+Se<<0),O=(i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10),R=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7),qe=i&r,W=qe^i&e^Ee,ye=p&n^~p&s,N=u+R+ye+K[B+1]+m[B+1],Se=O+W,u=t+N<<0,t=N+Se<<0,O=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),R=(u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7),Tt=t&i,W=Tt^t&r^qe,ye=u&p^~u&n,N=s+R+ye+K[B+2]+m[B+2],Se=O+W,s=e+N<<0,e=N+Se<<0,O=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),R=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),Nr=e&t,W=Nr^e&i^Tt,ye=s&u^~s&p,N=n+R+ye+K[B+3]+m[B+3],Se=O+W,n=r+N<<0,r=N+Se<<0;this.h0=this.h0+r<<0,this.h1=this.h1+e<<0,this.h2=this.h2+t<<0,this.h3=this.h3+i<<0,this.h4=this.h4+n<<0,this.h5=this.h5+s<<0,this.h6=this.h6+u<<0,this.h7=this.h7+p<<0},Sha256.prototype.hex=function(){this.finalize();var r=this.h0,e=this.h1,t=this.h2,i=this.h3,n=this.h4,s=this.h5,u=this.h6,p=this.h7,m=HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[r&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[e&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[t&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[i&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[n&15]+HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[s&15]+HEX_CHARS[u>>28&15]+HEX_CHARS[u>>24&15]+HEX_CHARS[u>>20&15]+HEX_CHARS[u>>16&15]+HEX_CHARS[u>>12&15]+HEX_CHARS[u>>8&15]+HEX_CHARS[u>>4&15]+HEX_CHARS[u&15];return this.is224||(m+=HEX_CHARS[p>>28&15]+HEX_CHARS[p>>24&15]+HEX_CHARS[p>>20&15]+HEX_CHARS[p>>16&15]+HEX_CHARS[p>>12&15]+HEX_CHARS[p>>8&15]+HEX_CHARS[p>>4&15]+HEX_CHARS[p&15]),m},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var r=this.h0,e=this.h1,t=this.h2,i=this.h3,n=this.h4,s=this.h5,u=this.h6,p=this.h7,m=[r>>24&255,r>>16&255,r>>8&255,r&255,e>>24&255,e>>16&255,e>>8&255,e&255,t>>24&255,t>>16&255,t>>8&255,t&255,i>>24&255,i>>16&255,i>>8&255,i&255,n>>24&255,n>>16&255,n>>8&255,n&255,s>>24&255,s>>16&255,s>>8&255,s&255,u>>24&255,u>>16&255,u>>8&255,u&255];return this.is224||m.push(p>>24&255,p>>16&255,p>>8&255,p&255),m},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var r=new ArrayBuffer(this.is224?28:32),e=new DataView(r);return e.setUint32(0,this.h0),e.setUint32(4,this.h1),e.setUint32(8,this.h2),e.setUint32(12,this.h3),e.setUint32(16,this.h4),e.setUint32(20,this.h5),e.setUint32(24,this.h6),this.is224||e.setUint32(28,this.h7),r};function HmacSha256(r,e,t){var i,n=typeof r;if(n==="string"){var s=[],u=r.length,p=0,m;for(i=0;i<u;++i)m=r.charCodeAt(i),m<128?s[p++]=m:m<2048?(s[p++]=192|m>>6,s[p++]=128|m&63):m<55296||m>=57344?(s[p++]=224|m>>12,s[p++]=128|m>>6&63,s[p++]=128|m&63):(m=65536+((m&1023)<<10|r.charCodeAt(++i)&1023),s[p++]=240|m>>18,s[p++]=128|m>>12&63,s[p++]=128|m>>6&63,s[p++]=128|m&63);r=s}else if(n==="object"){if(r===null)throw new Error(ERROR);if(ARRAY_BUFFER&&r.constructor===ArrayBuffer)r=new Uint8Array(r);else if(!Array.isArray(r)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(r)))throw new Error(ERROR)}else throw new Error(ERROR);r.length>64&&(r=new Sha256(e,!0).update(r).array());var B=[],O=[];for(i=0;i<64;++i){var R=r[i]||0;B[i]=92^R,O[i]=54^R}Sha256.call(this,e,t),this.update(O),this.oKeyPad=B,this.inner=!0,this.sharedMemory=t}HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var r=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(r),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&define(function(){return exports}))})()});var Ha=V(()=>{});var H_=V(()=>{});var F1=Wr(ta(),1),O1=Wr(lc(),1),Ao=Wr(Ca(),1),Do=Wr(Ec(),1),k1=Wr(p1(),1),C1=Wr(m1(),1),yl=Wr(b1(),1),ml=Wr(g1(),1),F=Wr(D1(),1);F1.default.toDOMStream=k1.toDOMStream;O1.Builder.throughDOM=C1.builderThroughDOMStream;Ao.RecordBatchReader.throughDOM=yl.recordBatchReaderThroughDOMStream;Ao.RecordBatchFileReader.throughDOM=yl.recordBatchReaderThroughDOMStream;Ao.RecordBatchStreamReader.throughDOM=yl.recordBatchReaderThroughDOMStream;Do.RecordBatchWriter.throughDOM=ml.recordBatchWriterThroughDOMStream;Do.RecordBatchFileWriter.throughDOM=ml.recordBatchWriterThroughDOMStream;Do.RecordBatchStreamWriter.throughDOM=ml.recordBatchWriterThroughDOMStream;var O_=class{constructor(e,t){this._bindings=e,this._conn=t}close(){this._bindings.disconnect(this._conn)}useUnsafe(e){return e(this._bindings,this._conn)}query(e){let t=this._bindings.runQuery(this._conn,e),i=F.RecordBatchReader.from(t);return console.assert(i.isSync()),console.assert(i.isFile()),F.Table.from(i)}send(e){let t=this._bindings.sendQuery(this._conn,e),i=new k_(this._bindings,this._conn,t),n=F.RecordBatchReader.from(i);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 U1(this._bindings,this._conn,t)}createScalarFunction(e,t,i){this._bindings.createScalarFunction(this._conn,e,t,i)}insertArrowTable(e,t){let i=e.serialize("binary",!0);this.insertArrowFromIPCStream(i,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)}},k_=class{constructor(e,t,i){this.bindings=e;this.conn=t;this.header=i;this._first=!0,this._depleted=!1}next(){if(this._first)return this._first=!1,{done:!1,value:this.header};if(this._depleted)return{done:!0,value:null};let e=this.bindings.fetchQueryResults(this.conn);return this._depleted=e.length==0,{done:this._depleted,value:e}}[Symbol.iterator](){return this}},U1=class{constructor(e,t,i){this.bindings=e,this.connectionId=t,this.statementId=i}close(){this.bindings.closePrepared(this.connectionId,this.statementId)}query(...e){let t=this.bindings.runPrepared(this.connectionId,this.statementId,e),i=F.RecordBatchReader.from(t);return console.assert(i.isSync()),console.assert(i.isFile()),F.Table.from(i)}send(...e){let t=this.bindings.sendPrepared(this.connectionId,this.statementId,e),i=new k_(this.bindings,this.connectionId,t),n=F.RecordBatchReader.from(i);return console.assert(n.isSync()),console.assert(n.isStream()),n}};var mU=(e=>(e[e.SUCCESS=0]="SUCCESS",e))(mU||{});var bU=new TextEncoder;function La(r,e,t){let i=bU.encode(t),n=r._malloc(i.byteLength),s=r.HEAPU8.subarray(n,n+i.byteLength);s.set(i),r.HEAPF64[(e>>3)+0]=1,r.HEAPF64[(e>>3)+1]=n,r.HEAPF64[(e>>3)+2]=s.byteLength}function C_(r){switch(r){case"UINT8":case"INT8":return 1;case"INT32":case"FLOAT":return 4;case"INT64":case"UINT64":case"DOUBLE":case"VARCHAR":return 8;default:return 0}}function bn(r,e,t,i){let n=r.HEAPU8.subarray(e,e+i*C_(t));switch(t){case"UINT8":return new Uint8Array(n.buffer,n.byteOffset,i);case"INT8":return new Int8Array(n.buffer,n.byteOffset,i);case"INT32":return new Int32Array(n.buffer,n.byteOffset,i);case"FLOAT":return new Float32Array(n.buffer,n.byteOffset,i);case"DOUBLE":return new Float64Array(n.buffer,n.byteOffset,i);case"VARCHAR":return new Float64Array(n.buffer,n.byteOffset,i);default:return new Array(0)}}function bl(r,e,t,i,n,s,u,p){try{let m=r._udfFunctions.get(i);if(!m){La(e,t,"Unknown UDF with id: "+i);return}let B=new TextDecoder().decode(e.HEAPU8.subarray(n,n+s)),O=JSON.parse(B),R=bn(e,u,"DOUBLE",p/8),W=[],N=[];for(let ge in O.args){let Ne=O.args[ge],ze=bn(e,R[Ne.data_buffer],Ne.physical_type,O.rows),tr=bn(e,R[Ne.validity_buffer],"UINT8",O.rows);if(ze.length==0||tr.length==0){La(e,t,"Can't create physical arrays for argument "+Ne.physical_type);return}if(W.push(tr),Ne.physical_type=="VARCHAR"){let Vt=bn(e,R[Ne.length_buffer],"DOUBLE",O.rows),rr=[],Kt=new TextDecoder;for(let Ye=0;Ye<O.rows;++Ye){if(!tr[Ye]){rr.push(void 0);continue}let Jt=e.HEAPU8.subarray(ze[Ye],ze[Ye]+Vt[Ye]),Bn=Kt.decode(Jt);rr.push(Bn)}N.push(rr)}else N.push(ze)}let Se=O.rows*C_(O.ret.physical_type),ye=e._malloc(Se),Ee=bn(e,ye,O.ret.physical_type,O.rows),qe=e._malloc(O.rows),Tt=bn(e,qe,"UINT8",O.rows);if(Ee.length==0||Tt.length==0){La(e,t,"Can't create physical arrays for result");return}let Nr=Ee;switch(O.ret.physical_type=="VARCHAR"&&(Ee=new Array(O.rows)),O.args.length){case 0:for(let ge=0;ge<O.rows;++ge){let Ne=m.func();Ee[ge]=Ne,Tt[ge]=Ne==null?0:1}break;case 1:for(let ge=0;ge<O.rows;++ge){let Ne=m.func(W[0][ge]?N[0][ge]:void 0);Ee[ge]=Ne,Tt[ge]=Ne==null?0:1}break;case 2:for(let ge=0;ge<O.rows;++ge){let Ne=m.func(W[0][ge]?N[0][ge]:void 0,W[1][ge]?N[1][ge]:void 0);Ee[ge]=Ne,Tt[ge]=Ne==null?0:1}break;default:La(e,t,"Can't deal with argument count: "+O.args.length);return}let Sr=0;if(O.ret.physical_type=="VARCHAR"){let ge=new TextEncoder,Ne=new Array(0),ze=0;Sr=e._malloc(O.rows*C_("DOUBLE"));let tr=bn(e,Sr,"DOUBLE",O.rows);for(let Ye=0;Ye<O.rows;++Ye)Ne[Ye]=ge.encode(Ee[Ye]),ze+=Ne[Ye].length,tr[Ye]=Ne[Ye].length;let Vt=e._malloc(ze),rr=e.HEAPU8.subarray(Vt,Vt+ze),Kt=0;Ee=Nr;for(let Ye=0;Ye<O.rows;++Ye){Ee[Ye]=Vt+Kt;for(let Jt=0;Jt<Ne[Ye].length;Jt++)rr[Kt+Jt]=Ne[Ye][Jt];Kt+=Ne[Ye].length}}let Ir=3*8,Pr=e._malloc(Ir),jn=bn(e,Pr,"DOUBLE",3);jn[0]=ye,jn[1]=qe,jn[2]=Sr,e.HEAPF64[(t>>3)+0]=0,e.HEAPF64[(t>>3)+1]=Pr,e.HEAPF64[(t>>3)+2]=0}catch(m){La(e,t,m.toString())}}function gU(){let r=new TextDecoder;return e=>(typeof SharedArrayBuffer<"u"&&e.buffer instanceof SharedArrayBuffer&&(e=new Uint8Array(e)),r.decode(e))}var vU=gU();function hi(r,e){r.ccall("duckdb_web_fail_with",null,["string"],[e])}function Fo(r,e,t){let i=r.HEAPU8.subarray(e,e+t),n=new Uint8Array(new ArrayBuffer(i.byteLength));return n.set(i),n}function Ae(r,e,t){return vU(r.HEAPU8.subarray(e,e+t))}var R1=(n=>(n[n.BUFFER=0]="BUFFER",n[n.NATIVE=1]="NATIVE",n[n.HTTP=3]="HTTP",n[n.S3=4]="S3",n))(R1||{}),x1=(u=>(u[u.FILE_FLAGS_READ=1]="FILE_FLAGS_READ",u[u.FILE_FLAGS_WRITE=2]="FILE_FLAGS_WRITE",u[u.FILE_FLAGS_DIRECT_IO=4]="FILE_FLAGS_DIRECT_IO",u[u.FILE_FLAGS_FILE_CREATE=8]="FILE_FLAGS_FILE_CREATE",u[u.FILE_FLAGS_FILE_CREATE_NEW=16]="FILE_FLAGS_FILE_CREATE_NEW",u[u.FILE_FLAGS_APPEND=32]="FILE_FLAGS_APPEND",u))(x1||{});function He(r,e,t,i){let n=r.stackSave(),s=r.stackAlloc(3*8);t.unshift("number"),i.unshift(s),r.ccall(e,null,t,i);let u=r.HEAPF64[(s>>3)+0],p=r.HEAPF64[(s>>3)+1],m=r.HEAPF64[(s>>3)+2];return r.stackRestore(n),[u,p,m]}function Ze(r){r.ccall("duckdb_web_clear_response",null,[],[])}var V1={_udfFunctions:new Map,testPlatformFeature:(r,e)=>!1,openFile:(r,e,t)=>{},syncFile:(r,e)=>{},closeFile:(r,e)=>{},getLastFileModificationTime:(r,e)=>0,truncateFile:(r,e,t)=>{},readFile:(r,e,t,i,n)=>0,writeFile:(r,e,t,i,n)=>0,removeDirectory:(r,e,t)=>{},checkDirectory:(r,e,t)=>!1,createDirectory:(r,e,t)=>{},listDirectoryEntries:(r,e,t)=>!1,glob:(r,e,t)=>{},moveFile:(r,e,t,i,n)=>{},checkFile:(r,e,t)=>!1,removeFile:(r,e,t)=>{},callScalarUDF:(r,e,t,i,n,s,u)=>{bl(V1,r,e,t,i,n,s,u)}};var M_=class{constructor(e){let t=new Float64Array(e.buffer,e.byteOffset,e.byteLength/8),i=new Uint8Array(new ArrayBuffer(e.byteLength));i.set(e.subarray(7*8)),this.totalFileReadsCold=t[0],this.totalFileReadsAhead=t[1],this.totalFileReadsCached=t[2],this.totalFileWrites=t[3],this.totalPageAccesses=t[4],this.totalPageLoads=t[5],this.blockSize=t[6],this.blockStats=i}getBlockStats(e,t){return t=t||{file_reads_cold:0,file_reads_ahead:0,file_reads_cached:0,file_writes:0,page_accesses:0,page_loads:0},t.file_writes=this.blockStats[e*3+0]&15,t.file_reads_cold=this.blockStats[e*3+0]>>4,t.file_reads_ahead=this.blockStats[e*3+1]&15,t.file_reads_cached=this.blockStats[e*3+1]>>4,t.page_accesses=this.blockStats[e*3+1]&15,t.page_loads=this.blockStats[e*3+1]>>4,t}};function U_(r){switch(r.typeId){case F.Type.Binary:return{type:"binary"};case F.Type.Bool:return{type:"bool"};case F.Type.Date:return{type:"date"};case F.Type.DateDay:return{type:"date32[d]"};case F.Type.DateMillisecond:return{type:"date64[ms]"};case F.Type.Decimal:{let e=r;return{type:"decimal",precision:e.precision,scale:e.scale}}case F.Type.Float:return{type:"float"};case F.Type.Float16:return{type:"float16"};case F.Type.Float32:return{type:"float32"};case F.Type.Float64:return{type:"float64"};case F.Type.Int:return{type:"int32"};case F.Type.Int16:return{type:"int16"};case F.Type.Int32:return{type:"int32"};case F.Type.Int64:return{type:"int64"};case F.Type.Uint16:return{type:"uint16"};case F.Type.Uint32:return{type:"uint32"};case F.Type.Uint64:return{type:"uint64"};case F.Type.Uint8:return{type:"uint8"};case F.Type.IntervalDayTime:return{type:"interval[dt]"};case F.Type.IntervalYearMonth:return{type:"interval[m]"};case F.Type.List:{let e=r;return{type:"list",children:[qa(e.valueField.name,e.valueField.type)]}}case F.Type.FixedSizeBinary:return{type:"fixedsizebinary",byteWidth:r.byteWidth};case F.Type.Null:return{type:"null"};case F.Type.Utf8:return{type:"utf8"};case F.Type.Struct:return{type:"struct",children:r.children.map(t=>qa(t.name,t.type))};case F.Type.Time:return{type:"time[s]"};case F.Type.TimeMicrosecond:return{type:"time[us]"};case F.Type.TimeMillisecond:return{type:"time[ms]"};case F.Type.TimeNanosecond:return{type:"time[ns]"};case F.Type.TimeSecond:return{type:"time[s]"};case F.Type.Timestamp:return{type:"timestamp",timezone:r.timezone||void 0};case F.Type.TimestampSecond:return{type:"timestamp[s]",timezone:r.timezone||void 0};case F.Type.TimestampMicrosecond:return{type:"timestamp[us]",timezone:r.timezone||void 0};case F.Type.TimestampNanosecond:return{type:"timestamp[ns]",timezone:r.timezone||void 0};case F.Type.TimestampMillisecond:return{type:"timestamp[ms]",timezone:r.timezone||void 0}}throw new Error(`unsupported arrow type: ${r.toString()}`)}function qa(r,e){let t=U_(e);return t.name=r,t}var wU=new TextEncoder,jU=(s=>(s[s.WASM_EXCEPTIONS=1]="WASM_EXCEPTIONS",s[s.WASM_THREADS=2]="WASM_THREADS",s[s.WASM_SIMD=4]="WASM_SIMD",s[s.WASM_BULK_MEMORY=8]="WASM_BULK_MEMORY",s[s.EMIT_BIGINT=16]="EMIT_BIGINT",s))(jU||{}),E_=class{constructor(e,t){this._instance=null;this._initPromise=null;this._initPromiseResolver=()=>{};this.onInstantiationProgress=[];this._logger=e,this._runtime=t,this._nextUDFId=1}get logger(){return this._logger}get mod(){return this._instance}get pthread(){return this.mod.PThread||null}async instantiate(e=t=>{}){return this._instance!=null?this:(this._initPromise!=null&&(this.onInstantiationProgress.push(e),await this._initPromise),this._initPromise=new Promise(t=>{this._initPromiseResolver=t}),this.onInstantiationProgress=[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.onInstantiationProgress=this.onInstantiationProgress.filter(t=>t!=e),this)}open(e){let[t,i,n]=He(this.mod,"duckdb_web_open",["string"],[JSON.stringify(e)]);if(t!==0)throw new Error(Ae(this.mod,i,n));Ze(this.mod)}reset(){let[e,t,i]=He(this.mod,"duckdb_web_reset",[],[]);if(e!==0)throw new Error(Ae(this.mod,t,i));Ze(this.mod)}getVersion(){let[e,t,i]=He(this.mod,"duckdb_web_get_version",[],[]);if(e!==0)throw new Error(Ae(this.mod,t,i));let n=Ae(this.mod,t,i);return Ze(this.mod),n}getFeatureFlags(){return this.mod.ccall("duckdb_web_get_feature_flags","number",[],[])}tokenize(e){let[t,i,n]=He(this.mod,"duckdb_web_tokenize",["string"],[e]);if(t!==0)throw new Error(Ae(this.mod,i,n));let s=Ae(this.mod,i,n);return Ze(this.mod),JSON.parse(s)}connect(){let e=this.mod.ccall("duckdb_web_connect","number",[],[]);return new O_(this,e)}disconnect(e){if(this.mod.ccall("duckdb_web_disconnect",null,["number"],[e]),this.pthread)for(let t of[...this.pthread.runningWorkers,...this.pthread.unusedWorkers])t.postMessage({cmd:"dropUDFFunctions",connectionId:e})}runQuery(e,t){let[i,n,s]=He(this.mod,"duckdb_web_query_run",["number","string"],[e,t]);if(i!==0)throw new Error(Ae(this.mod,n,s));let u=Fo(this.mod,n,s);return Ze(this.mod),u}sendQuery(e,t){let[i,n,s]=He(this.mod,"duckdb_web_query_send",["number","string"],[e,t]);if(i!==0)throw new Error(Ae(this.mod,n,s));let u=Fo(this.mod,n,s);return Ze(this.mod),u}fetchQueryResults(e){let[t,i,n]=He(this.mod,"duckdb_web_query_fetch_results",["number"],[e]);if(t!==0)throw new Error(Ae(this.mod,i,n));let s=Fo(this.mod,i,n);return Ze(this.mod),s}getTableNames(e,t){let[i,n,s]=He(this.mod,"duckdb_web_get_tablenames",["number","string"],[e,t]);if(i!==0)throw new Error(Ae(this.mod,n,s));let u=Ae(this.mod,n,s);return Ze(this.mod),JSON.parse(u)}createScalarFunction(e,t,i,n){let s={functionId:this._nextUDFId,name:t,returnType:U_(i)},u={functionId:s.functionId,connectionId:e,name:t,returnType:i,func:n};this._nextUDFId+=1;let[p,m,B]=He(this.mod,"duckdb_web_udf_scalar_create",["number","string"],[e,JSON.stringify(s)]);if(p!==0)throw new Error(Ae(this.mod,m,B));if(Ze(this.mod),globalThis.DUCKDB_RUNTIME._udfFunctions=(globalThis.DUCKDB_RUNTIME._udfFunctions||new Map).set(u.functionId,u),this.pthread)for(let O of[...this.pthread.runningWorkers,...this.pthread.unusedWorkers])O.postMessage({cmd:"registerUDFFunction",udf:u})}createPrepared(e,t){let[i,n,s]=He(this.mod,"duckdb_web_prepared_create",["number","string"],[e,t]);if(i!==0)throw new Error(Ae(this.mod,n,s));return Ze(this.mod),n}closePrepared(e,t){let[i,n,s]=He(this.mod,"duckdb_web_prepared_close",["number","number"],[e,t]);if(i!==0)throw new Error(Ae(this.mod,n,s));Ze(this.mod)}runPrepared(e,t,i){let[n,s,u]=He(this.mod,"duckdb_web_prepared_run",["number","number","string"],[e,t,JSON.stringify(i)]);if(n!==0)throw new Error(Ae(this.mod,s,u));let p=Fo(this.mod,s,u);return Ze(this.mod),p}sendPrepared(e,t,i){let[n,s,u]=He(this.mod,"duckdb_web_prepared_send",["number","number","string"],[e,t,JSON.stringify(i)]);if(n!==0)throw new Error(Ae(this.mod,s,u));let p=Fo(this.mod,s,u);return Ze(this.mod),p}insertArrowFromIPCStream(e,t,i){if(t.length==0)return;let n=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(n,n+t.length).set(t);let u=i?JSON.stringify(i):"",[p,m,B]=He(this.mod,"duckdb_web_insert_arrow_from_ipc_stream",["number","number","number","string"],[e,n,t.length,u]);if(p!==0)throw new Error(Ae(this.mod,m,B))}insertCSVFromPath(e,t,i){if(i.columns!==void 0){i.columnsFlat=[];for(let B in i.columns)i.columnsFlat.push(qa(B,i.columns[B]))}let n=zr({},i);n.columns=n.columnsFlat,delete n.columnsFlat;let s=JSON.stringify(n),[u,p,m]=He(this.mod,"duckdb_web_insert_csv_from_path",["number","string","string"],[e,t,s]);if(u!==0)throw new Error(Ae(this.mod,p,m))}insertJSONFromPath(e,t,i){if(i.columns!==void 0){i.columnsFlat=[];for(let B in i.columns)i.columnsFlat.push(qa(B,i.columns[B]))}let n=zr({},i);n.columns=n.columnsFlat,delete n.columnsFlat;let s=JSON.stringify(n),[u,p,m]=He(this.mod,"duckdb_web_insert_json_from_path",["number","string","string"],[e,t,s]);if(u!==0)throw new Error(Ae(this.mod,p,m))}globFiles(e){let[t,i,n]=He(this.mod,"duckdb_web_fs_glob_file_infos",["string"],[e]);if(t!==0)throw new Error(Ae(this.mod,i,n));let s=Ae(this.mod,i,n);Ze(this.mod);let u=JSON.parse(s);return u==null?[]:u}registerFileURL(e,t){t===void 0&&(t=e);let[i,n,s]=He(this.mod,"duckdb_web_fs_register_file_url",["string","string","number"],[e,t,-1]);if(i!==0)throw new Error(Ae(this.mod,n,s));Ze(this.mod)}registerFileText(e,t){let i=wU.encode(t);this.registerFileBuffer(e,i)}registerFileBuffer(e,t){let i=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(i,i+t.length).set(t);let[s,u,p]=He(this.mod,"duckdb_web_fs_register_file_buffer",["string","number","number"],[e,i,t.length]);if(s!==0)throw new Error(Ae(this.mod,u,p));Ze(this.mod)}registerFileHandle(e,t){let[i,n,s]=He(this.mod,"duckdb_web_fs_register_file_url",["string","string","number"],[e,e,-1]);if(i!==0)throw new Error(Ae(this.mod,n,s));if(Ze(this.mod),globalThis.DUCKDB_RUNTIME._files=(globalThis.DUCKDB_RUNTIME._files||new Map).set(e,t),this.pthread){for(let u of this.pthread.runningWorkers)u.postMessage({cmd:"registerFileHandle",fileName:e,fileHandle:t});for(let u of this.pthread.unusedWorkers)u.postMessage({cmd:"dropFileHandle",fileName:e})}}dropFile(e){let[t,i,n]=He(this.mod,"duckdb_web_fs_drop_file",["string"],[e]);if(t!==0)throw new Error(Ae(this.mod,i,n));Ze(this.mod)}dropFiles(){let[e,t,i]=He(this.mod,"duckdb_web_fs_drop_files",[],[]);if(e!==0)throw new Error(Ae(this.mod,t,i));Ze(this.mod)}flushFiles(){this.mod.ccall("duckdb_web_flush_files",null,[],[])}copyFileToPath(e,t){let[i,n,s]=He(this.mod,"duckdb_web_copy_file_to_path",["string","string"],[e,t]);if(i!==0)throw new Error(Ae(this.mod,n,s));Ze(this.mod)}copyFileToBuffer(e){let[t,i,n]=He(this.mod,"duckdb_web_copy_file_to_buffer",["string"],[e]);if(t!==0)throw new Error(Ae(this.mod,i,n));let s=this.mod.HEAPU8.subarray(i,i+n),u=new Uint8Array(s.length);return u.set(s),Ze(this.mod),u}collectFileStatistics(e,t){let[i,n,s]=He(this.mod,"duckdb_web_collect_file_stats",["string","boolean"],[e,t]);if(i!==0)throw new Error(Ae(this.mod,n,s))}exportFileStatistics(e){let[t,i,n]=He(this.mod,"duckdb_web_export_file_stats",["string"],[e]);if(t!==0)throw new Error(Ae(this.mod,i,n));return new M_(this.mod.HEAPU8.subarray(i,i+n))}};var BU=(t=>(t.ROW_ARRAY="row-array",t.COLUMN_OBJECT="column-object",t))(BU||{});var TU=(s=>(s[s.NONE=0]="NONE",s[s.DEBUG=1]="DEBUG",s[s.INFO=2]="INFO",s[s.WARNING=3]="WARNING",s[s.ERROR=4]="ERROR",s))(TU||{}),SU=(u=>(u[u.NONE=0]="NONE",u[u.CONNECT=1]="CONNECT",u[u.DISCONNECT=2]="DISCONNECT",u[u.OPEN=3]="OPEN",u[u.QUERY=4]="QUERY",u[u.INSTANTIATE=5]="INSTANTIATE",u))(SU||{}),IU=(u=>(u[u.NONE=0]="NONE",u[u.OK=1]="OK",u[u.ERROR=2]="ERROR",u[u.START=3]="START",u[u.RUN=4]="RUN",u[u.CAPTURE=5]="CAPTURE",u))(IU||{}),AU=(s=>(s[s.NONE=0]="NONE",s[s.WEB_WORKER=1]="WEB_WORKER",s[s.NODE_WORKER=2]="NODE_WORKER",s[s.BINDINGS=3]="BINDINGS",s[s.ASYNC_DUCKDB=4]="ASYNC_DUCKDB",s))(AU||{}),DU=class{log(e){}},FU=class{log(e){console.log(e)}};function c6(r){switch(r){case 0:return"NONE";case 1:return"DEBUG";case 2:return"INFO";case 3:return"WARNING";case 4:return"ERROR";default:return"?"}}function l6(r){switch(r){case 0:return"NONE";case 1:return"OK";case 2:return"ERROR";case 3:return"START";case 4:return"RUN";case 5:return"CAPTURE";default:return"?"}}function d6(r){switch(r){case 1:return"CONNECT";case 2:return"DISCONNECT";case 5:return"INSTANTIATE";case 3:return"OPEN";case 4:return"QUERY";default:return"?"}}function f6(r){switch(r){case 0:return"NONE";case 1:return"WEB WORKER";case 2:return"NODE WORKER";case 3:return"DUCKDB BINDINGS";case 4:return"DUCKDB";default:return"?"}}var N1=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])),P1=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,6,64,25,11,11]));var L1=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]));var q1=()=>(async r=>{try{return typeof MessageChannel<"u"&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(r)}catch(e){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]));var kU="@duckdb/duckdb-wasm",CU="1.13.1-dev166.0",MU="DuckDB powered by WebAssembly",UU="MPL-2.0",EU={type:"git",url:"https://github.com/duckdb/duckdb-wasm.git"},RU=["sql","duckdb","relational","database","data","query","wasm","analytics","olap","arrow","parquet","json","csv"],xU={"apache-arrow":"^6.0.1","wasm-feature-detect":"^1.2.11","fast-glob":"^3.2.11","web-worker":"^1.2.0","@types/emscripten":"^1.39.6","js-sha256":"^0.9.0"},VU={"@types/jasmine":"^3.10.3","@typescript-eslint/eslint-plugin":"^5.11.0","@typescript-eslint/parser":"^5.11.0",esbuild:"^0.14.21",eslint:"^8.8.0","eslint-plugin-jasmine":"^4.1.3","eslint-plugin-react":"^7.28.0",jasmine:"^4.0.2","jasmine-core":"^4.0.0","jasmine-spec-reporter":"^7.0.0",karma:"^6.3.16","karma-chrome-launcher":"^3.1.0","karma-coverage":"^2.2.0","karma-firefox-launcher":"^2.1.2","karma-jasmine":"^4.0.1","karma-jasmine-html-reporter":"^1.7.0","karma-sourcemap-loader":"^0.3.8","karma-spec-reporter":"^0.0.33","make-dir":"^3.1.0",nyc:"^15.1.0",prettier:"^2.5.1",puppeteer:"^13.3.1",rimraf:"^3.0.2",s3rver:"^3.7.1",typedoc:"^0.22.11",typescript:"^4.5.5"},NU={"build:debug":"node bundle.mjs debug && tsc --emitDeclarationOnly","build:release":"node bundle.mjs release && tsc --emitDeclarationOnly",docs:"typedoc",report:"node ./coverage.mjs","test:node":"node --enable-source-maps --experimental-wasm-eh ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs","test:node:debug":"node --inspect-brk --enable-source-maps --experimental-wasm-eh ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs","test:node:coverage":"nyc -r json --report-dir ./coverage/node node --experimental-wasm-eh ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs","test:firefox":"karma start ./karma/tests-firefox.cjs","test:chrome":"karma start ./karma/tests-chrome.cjs","test:chrome:eh":"karma start ./karma/tests-chrome-eh.cjs","test:chrome:coverage":"karma start ./karma/tests-chrome-coverage.cjs","test:browser":"karma start ./karma/tests-all.cjs","test:browser:debug":"karma start ./karma/tests-debug.cjs",test:"npm run test:chrome && npm run test:node","test:coverage":"npm run test:chrome:coverage && npm run test:node:coverage && npm run report",lint:"eslint src test"},PU=["dist","!dist/types/test"],LU="dist/duckdb-browser.cjs",qU="dist/duckdb-browser.mjs",HU="dist/duckdb-browser.d.ts",zU="dist/duckdb-browser.cjs",WU="dist/duckdb-browser.mjs",YU=!1,GU={fs:!1,path:!1,perf_hooks:!1,os:!1,worker_threads:!1},$U={"./dist/duckdb-mvp.wasm":"./dist/duckdb-mvp.wasm","./dist/duckdb-eh.wasm":"./dist/duckdb-eh.wasm","./dist/duckdb-coi.wasm":"./dist/duckdb-coi.wasm","./dist/duckdb-browser":"./dist/duckdb-browser.mjs","./dist/duckdb-browser.cjs":"./dist/duckdb-browser.cjs","./dist/duckdb-browser.mjs":"./dist/duckdb-browser.mjs","./dist/duckdb-browser-blocking":"./dist/duckdb-browser-blocking.mjs","./dist/duckdb-browser-blocking.mjs":"./dist/duckdb-browser-blocking.mjs","./dist/duckdb-browser-blocking.cjs":"./dist/duckdb-browser-blocking.cjs","./dist/duckdb-browser-coi.pthread.worker.js":"./dist/duckdb-browser-coi.pthread.worker.js","./dist/duckdb-browser-coi.worker.js":"./dist/duckdb-browser-coi.worker.js","./dist/duckdb-browser-eh.worker.js":"./dist/duckdb-browser-eh.worker.js","./dist/duckdb-browser-mvp.worker.js":"./dist/duckdb-browser-mvp.worker.js","./dist/duckdb-node":"./dist/duckdb-node.cjs","./dist/duckdb-node.cjs":"./dist/duckdb-node.cjs","./dist/duckdb-node-blocking":"./dist/duckdb-node-blocking.cjs","./dist/duckdb-node-blocking.cjs":"./dist/duckdb-node-blocking.cjs","./dist/duckdb-node-eh.worker.cjs":"./dist/duckdb-node-eh.worker.cjs","./dist/duckdb-node-mvp.worker.cjs":"./dist/duckdb-node-mvp.worker.cjs","./blocking":{browser:{types:"./dist/duckdb-browser-blocking.d.ts",import:"./dist/duckdb-browser-blocking.mjs",require:"./dist/duckdb-browser-blocking.cjs"},node:{types:"./dist/duckdb-node-blocking.d.ts",require:"./dist/duckdb-node-blocking.cjs",import:"./dist/duckdb-node-blocking.cjs"},types:"./dist/duckdb-browser-blocking.d.ts",import:"./dist/duckdb-browser-blocking.mjs",require:"./dist/duckdb-browser-blocking.cjs"},".":{browser:{types:"./dist/duckdb-browser.d.ts",import:"./dist/duckdb-browser.mjs",require:"./dist/duckdb-browser.cjs"},node:{types:"./dist/duckdb-node.d.ts",import:"./dist/duckdb-node.cjs",require:"./dist/duckdb-node.cjs"},types:"./dist/duckdb-browser.d.ts",import:"./dist/duckdb-browser.mjs",require:"./dist/duckdb-browser.cjs"}},gl={name:kU,version:CU,description:MU,license:UU,repository:EU,keywords:RU,dependencies:xU,devDependencies:VU,scripts:NU,files:PU,main:LU,module:qU,types:HU,jsdelivr:zU,unpkg:WU,sideEffects:YU,browser:GU,exports:$U};var H1=gl.name,z1=gl.version,R_=gl.version.split("."),y6=R_[0],m6=R_[1],b6=R_[2];function w6(){let r=`https://cdn.jsdelivr.net/npm/${H1}@${z1}/dist/`;return{mvp:{mainModule:`${r}duckdb-mvp.wasm`,mainWorker:`${r}duckdb-browser-mvp.worker.js`},eh:{mainModule:`${r}duckdb-eh.wasm`,mainWorker:`${r}duckdb-browser-eh.worker.js`}}}var x_=null,V_=null,N_=null,P_=null,L_=null;function KU(){return typeof process<"u"&&!1}async function q_(){return x_==null&&(x_=typeof BigInt64Array<"u"),V_==null&&(V_=await P1()),N_==null&&(N_=await q1()),P_==null&&(P_=await L1()),L_==null&&(L_=await N1()),{bigInt64Array:x_,crossOriginIsolated:KU()||globalThis.crossOriginIsolated||!1,wasmExceptions:V_,wasmSIMD:P_,wasmThreads:N_,wasmBulkMemory:L_}}async function j6(r){let e=await q_();if(e.wasmExceptions){if(e.wasmSIMD&&e.wasmThreads&&e.crossOriginIsolated&&r.coi)return{mainModule:r.coi.mainModule,mainWorker:r.coi.mainWorker,pthreadWorker:r.coi.pthreadWorker};if(r.eh)return{mainModule:r.eh.mainModule,mainWorker:r.eh.mainWorker,pthreadWorker:null}}return{mainModule:r.mvp.mainModule,mainWorker:r.mvp.mainWorker,pthreadWorker:null}}var gn=Wr(W1()),Y1=function(r,e,t){var i;if((i=r==null?void 0:r.endpoint)==null?void 0:i.startsWith("http")){let n=`${r==null?void 0:r.endpoint}`,s=n.indexOf("://")+3;return n.substring(s)}else return(r==null?void 0:r.endpoint)?`${t}.${r==null?void 0:r.endpoint}`:`${t}.s3.amazonaws.com`};function JU(r,e,t){var n,s,u,p;let i=G1(e);return{url:i.path,query:"",host:Y1(r,e,i.bucket),region:(n=r==null?void 0:r.region)!=null?n:"",service:"s3",method:t,accessKeyId:(s=r==null?void 0:r.accessKeyId)!=null?s:"",secretAccessKey:(u=r==null?void 0:r.secretAccessKey)!=null?u:"",sessionToken:(p=r==null?void 0:r.sessionToken)!=null?p:"",dateNow:new Date().toISOString().replace(/-/g,"").split("T")[0],datetimeNow:new Date().toISOString().replace(/-/g,"").replace(/:/g,"").split(".")[0]+"Z"}}function XU(r,e=!1){let t="0123456789ABCDEF",i="";for(let n=0;n<r.length;n++){let s=r[n];s>="A"&&s<="Z"||s>="a"&&s<="z"||s>="0"&&s<="9"||s=="_"||s=="-"||s=="~"||s=="."?i+=s:s=="/"?e?i+="%2F":i+=s:(i+="%",i+=t[s.charCodeAt(0)>>4],i+=t[s.charCodeAt(0)&15])}return i}function ZU(r,e=null){var Se;let t=(Se=e==null?void 0:e.contentHash)!=null?Se:"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",i=new Map;i.set("x-amz-date",r.datetimeNow),i.set("x-amz-content-sha256",t),r.sessionToken&&i.set("x-amz-security-token",r.sessionToken);let n="";(e==null?void 0:e.contentType)&&(n+="content-type;"),n+="host;x-amz-content-sha256;x-amz-date",r.sessionToken&&(n+=";x-amz-security-token");let s=r.method+`
18
18
  `+XU(r.url)+`
19
19
  `+r.query;(e==null?void 0:e.contentType)&&(s+=`
20
20
  content-type:`+(e==null?void 0:e.contentType)),s+=`
@@ -28,7 +28,7 @@ x-amz-security-token:`+r.sessionToken),s+=`
28
28
  `+r.datetimeNow+`
29
29
  `+r.dateNow+"/"+r.region+"/"+r.service+`/aws4_request
30
30
  `+u,m="AWS4"+r.secretAccessKey,B=gn.sha256.hmac.arrayBuffer(m,r.dateNow),O=gn.sha256.hmac.arrayBuffer(B,r.region),R=gn.sha256.hmac.arrayBuffer(O,r.service),W=gn.sha256.hmac.arrayBuffer(R,"aws4_request"),N=gn.sha256.hmac(W,p);return i.set("Authorization","AWS4-HMAC-SHA256 Credential="+r.accessKeyId+"/"+r.dateNow+"/"+r.region+"/"+r.service+"/aws4_request, SignedHeaders="+n+", Signature="+N),i}var QU=function(r,e,t,i=null,n=null){let s=JU(r,e,t),u={contentType:i,contentHash:n?gn.sha256.hex(n):null};return ZU(s,u)};function vn(r,e,t,i,n=null,s=null){((e==null?void 0:e.accessKeyId)||(e==null?void 0:e.sessionToken))&&(QU(e,t,i,n,s).forEach((p,m)=>{r.setRequestHeader(m,p)}),n&&r.setRequestHeader("content-type",n))}function G1(r){if(r.indexOf("s3://")!=0)throw new Error("URL needs to start with s3://");let e=r.indexOf("/",5);if(e==-1)throw new Error("URL needs to contain a '/' after the host");let t=r.substring(5,e);if(!t)throw new Error("URL needs to contain a bucket name");let i=r.substring(e);if(!i)throw new Error("URL needs to contain key");return{bucket:t,path:i}}function wn(r,e){var i;let t=G1(e);return((i=r==null?void 0:r.endpoint)==null?void 0:i.startsWith("http"))?`${r==null?void 0:r.endpoint}/${t.bucket}`+t.path:"https://"+Y1(r,e,t.bucket)+t.path}var ht={_files:new Map,_fileInfoCache:new Map,_udfFunctions:new Map,_globalFileInfo:null,getFileInfo(r,e){try{let t=ht._fileInfoCache.get(e),[i,n,s]=He(r,"duckdb_web_fs_get_file_info_by_id",["number","number"],[e,(t==null?void 0:t.cacheEpoch)||0]);if(i!==0)return null;if(s===0)return t;let u=Ae(r,n,s);Ze(r);let p=JSON.parse(u);if(p==null)return null;let m=En(zr({},p),{blob:null});return ht._fileInfoCache.set(e,m),m}catch(t){return null}},getGlobalFileInfo(r){var e;try{let[t,i,n]=He(r,"duckdb_web_get_global_file_info",["number"],[((e=ht._globalFileInfo)==null?void 0:e.cacheEpoch)||0]);if(t!==0)return null;if(n===0)return ht._globalFileInfo;let s=Ae(r,i,n);Ze(r);let u=JSON.parse(s);return u==null?null:(ht._globalFileInfo=En(zr({},u),{blob:null}),ht._globalFileInfo)}catch(t){return null}},testPlatformFeature:(r,e)=>{switch(e){case 1:return typeof BigInt64Array<"u";default:return console.warn(`test for unknown feature: ${e}`),!1}},openFile:(r,e,t)=>{var i;try{ht._fileInfoCache.delete(e);let n=ht.getFileInfo(r,e);switch(n==null?void 0:n.dataProtocol){case 3:case 4:{if(t&1&&t&2)throw new Error(`Opening file ${n.fileName} failed: cannot open file with both read and write flags set`);if(t&32)throw new Error(`Opening file ${n.fileName} failed: appending to HTTP/S3 files is not supported`);if(t&2){let u=new XMLHttpRequest;if(n.dataProtocol==4?(u.open("HEAD",wn(n.s3Config,n.dataUrl),!1),vn(u,n.s3Config,n.dataUrl,"HEAD")):u.open("HEAD",n.dataUrl,!1),u.send(null),u.status!=200&&u.status!=404)throw new Error(`Opening file ${n.fileName} failed: Unexpected return status from server (${u.status})`);if(u.status==404&&!(t&8||t&16))throw new Error(`Opening file ${n.fileName} failed: Cannot write to non-existent file without FILE_FLAGS_FILE_CREATE or FILE_FLAGS_FILE_CREATE_NEW flag.`);let p=r._malloc(1),m=new Uint8Array;r.HEAPU8.set(m,p);let B=r._malloc(2*8);return r.HEAPF64[(B>>3)+0]=1,r.HEAPF64[(B>>3)+1]=p,B}else if(t!=1)throw new Error(`Opening file ${n.fileName} failed: unsupported file flags: ${t}`);let s=null;try{let u=new XMLHttpRequest;n.dataProtocol==4?(u.open("HEAD",wn(n.s3Config,n.dataUrl),!1),vn(u,n.s3Config,n.dataUrl,"HEAD")):u.open("HEAD",n.dataUrl,!1),u.setRequestHeader("Range","bytes=0-"),u.send(null);let p=u.getResponseHeader("Content-Length");if(u.status==206&&p!==null){let m=r._malloc(16);return r.HEAPF64[(m>>3)+0]=+p,r.HEAPF64[(m>>3)+1]=0,m}}catch(u){s=u,console.warn(`HEAD request with range header failed: ${u}`)}if(n.allowFullHttpReads){console.warn(`falling back to full HTTP read for: ${n.dataUrl}`);let u=new XMLHttpRequest;if(n.dataProtocol==4?(u.open("GET",wn(n.s3Config,n.dataUrl),!1),vn(u,n.s3Config,n.dataUrl,"GET")):u.open("GET",n.dataUrl,!1),u.responseType="arraybuffer",u.send(null),u.status==200){let p=r._malloc(u.response.byteLength),m=new Uint8Array(u.response,0,u.response.byteLength);r.HEAPU8.set(m,p);let B=r._malloc(2*8);return r.HEAPF64[(B>>3)+0]=u.response.byteLength,r.HEAPF64[(B>>3)+1]=p,B}}if(s!=null)throw new Error(`Reading file ${n.fileName} failed with error: ${s}`);return 0}case 1:{let s=(i=ht._files)==null?void 0:i.get(n.fileName);if(s){let m=r._malloc(16);return r.HEAPF64[(m>>3)+0]=s.size,r.HEAPF64[(m>>3)+1]=0,m}console.warn(`Buffering missing file: ${n.fileName}`);let u=r._malloc(2*8),p=r._malloc(1);return r.HEAPF64[(u>>3)+0]=1,r.HEAPF64[(u>>3)+1]=p,u}}}catch(n){console.error(n.toString()),hi(r,n.toString())}return 0},glob:(r,e,t)=>{try{let i=Ae(r,e,t);if(i.startsWith("http")||i.startsWith("s3://")){let n=new XMLHttpRequest;if(i.startsWith("s3://")){let s=ht.getGlobalFileInfo(r);n.open("HEAD",wn(s==null?void 0:s.s3Config,i),!1),vn(n,s==null?void 0:s.s3Config,i,"HEAD")}else n.open("HEAD",i,!1);if(n.send(null),n.status!=200&&n.status!==206){hi(r,`HEAD request failed: ${i}`);return}r.ccall("duckdb_web_fs_glob_add_path",null,["string"],[i])}}catch(i){return hi(r,i.toString()),0}},checkFile:(r,e,t)=>{try{let i=Ae(r,e,t);if(i.startsWith("http")||i.startsWith("s3://")){let n=new XMLHttpRequest;if(i.startsWith("s3://")){let u=ht.getGlobalFileInfo(r);n.open("HEAD",wn(u==null?void 0:u.s3Config,i),!1),vn(n,u==null?void 0:u.s3Config,i,"HEAD")}else n.open("HEAD",i,!1);n.setRequestHeader("Range","bytes=0-"),n.send(null);let s=!1;if(n.status==206)s=!0;else if(n.status==200)s=n.getResponseHeader("Accept-Ranges")==="bytes";else return!1;return!!s}}catch(i){return!1}return!1},syncFile:(r,e)=>{},closeFile:(r,e)=>{let t=ht.getFileInfo(r,e);switch(ht._fileInfoCache.delete(e),t==null?void 0:t.dataProtocol){case 3:case 4:break;case 1:return}},truncateFile:(r,e,t)=>{let i=ht.getFileInfo(r,e);switch(i==null?void 0:i.dataProtocol){case 3:hi(r,"Cannot truncate a http file");return;case 4:hi(r,"Cannot truncate an s3 file");return;case 1:hi(r,"truncateFile not implemented");return}return 0},readFile(r,e,t,i,n){var s;try{let u=ht.getFileInfo(r,e);switch(u==null?void 0:u.dataProtocol){case 3:case 4:{if(!u.dataUrl)throw new Error(`Missing data URL for file ${e}`);try{let p=new XMLHttpRequest;if(u.dataProtocol==4?(p.open("GET",wn(u==null?void 0:u.s3Config,u.dataUrl),!1),vn(p,u==null?void 0:u.s3Config,u.dataUrl,"GET")):p.open("GET",u.dataUrl,!1),p.responseType="arraybuffer",p.setRequestHeader("Range",`bytes=${n}-${n+i-1}`),p.send(null),p.status==206||p.status==200&&i==p.response.byteLength&&n==0){let m=new Uint8Array(p.response,0,Math.min(p.response.byteLength,i));return r.HEAPU8.set(m,t),m.byteLength}else throw p.status==200?new Error(`Range request for ${u.dataUrl} did not return a partial response: ${p.status} "${p.statusText}"`):new Error(`Range request for ${u.dataUrl} did returned non-success status: ${p.status} "${p.statusText}"`)}catch(p){throw new Error(`Range request for ${u.dataUrl} failed with error: ${p}"`)}}case 1:{let p=(s=ht._files)==null?void 0:s.get(u.fileName);if(!p)throw new Error(`No handle available for file: ${u.fileName}`);let m=p.slice(n,n+i),B=new Uint8Array(new FileReaderSync().readAsArrayBuffer(m));return r.HEAPU8.set(B,t),B.byteLength}}return 0}catch(u){return hi(r,u.toString()),0}},writeFile:(r,e,t,i,n)=>{let s=ht.getFileInfo(r,e);switch(s==null?void 0:s.dataProtocol){case 3:return hi(r,"Cannot write to HTTP file"),0;case 4:{let u=r.HEAPU8.subarray(t,t+i),p=new XMLHttpRequest;return p.open("PUT",wn(s==null?void 0:s.s3Config,s.dataUrl),!1),vn(p,s==null?void 0:s.s3Config,s.dataUrl,"PUT","",u),p.send(u),i}case 1:return hi(r,"writefile not implemented"),0}return 0},getLastFileModificationTime:(r,e)=>{var i;let t=ht.getFileInfo(r,e);switch(t==null?void 0:t.dataProtocol){case 1:{if(!((i=ht._files)==null?void 0:i.get(t.fileName)))throw Error(`No handle available for file: ${t.fileName}`);return 0}case 3:case 4:return new Date().getTime()}return 0},checkDirectory:(r,e,t)=>{let i=Ae(r,e,t);return console.log(`checkDirectory: ${i}`),!1},createDirectory:(r,e,t)=>{let i=Ae(r,e,t);console.log(`createDirectory: ${i}`)},removeDirectory:(r,e,t)=>{let i=Ae(r,e,t);console.log(`removeDirectory: ${i}`)},listDirectoryEntries:(r,e,t)=>{let i=Ae(r,e,t);return console.log(`listDirectoryEntries: ${i}`),!1},moveFile:(r,e,t,i,n)=>{},removeFile:(r,e,t)=>{},callScalarUDF:(r,e,t,i,n,s,u)=>{bl(ht,r,e,t,i,n,s,u)}};var eE=(()=>{var r=import.meta.url;return function(e){e=e||{};var t=typeof e<"u"?e:{},i=Object.assign,n,s;t.ready=new Promise(function(o,a){n=o,s=a});var u=i({},t),p=[],m="./this.program",B=(o,a)=>{throw a},O=typeof window=="object",R=typeof importScripts=="function",W=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",N="";function Se(o){return t.locateFile?t.locateFile(o,N):N+o}var ye,Ee,qe,Tt;function Nr(o){if(o instanceof pu)return;ge("exiting due to exception: "+o)}var Sr,Ir,Pr;W?(R?N=Ha().dirname(N)+"/":N=__dirname+"/",Pr=function(){Ir||(Sr=H_(),Ir=Ha())},ye=function(a,c){return Pr(),a=Ir.normalize(a),Sr.readFileSync(a,c?null:"utf8")},qe=function(a){var c=ye(a,!0);return c.buffer||(c=new Uint8Array(c)),c},Ee=function(a,c,l){Pr(),a=Ir.normalize(a),Sr.readFile(a,function(d,f){d?l(d):c(f.buffer)})},process.argv.length>1&&(m=process.argv[1].replace(/\\/g,"/")),p=process.argv.slice(2),process.on("uncaughtException",function(o){if(!(o instanceof pu))throw o}),process.on("unhandledRejection",function(o){throw o}),B=(o,a)=>{if(xo())throw process.exitCode=o,a;Nr(a),process.exit(o)},t.inspect=function(){return"[Emscripten Module object]"}):(O||R)&&(R?N=self.location.href:typeof document<"u"&&document.currentScript&&(N=document.currentScript.src),r&&(N=r),N.indexOf("blob:")!==0?N=N.substr(0,N.replace(/[?#].*/,"").lastIndexOf("/")+1):N="",ye=function(o){var a=new XMLHttpRequest;return a.open("GET",o,!1),a.send(null),a.responseText},R&&(qe=function(o){var a=new XMLHttpRequest;return a.open("GET",o,!1),a.responseType="arraybuffer",a.send(null),new Uint8Array(a.response)}),Ee=function(o,a,c){var l=new XMLHttpRequest;l.open("GET",o,!0),l.responseType="arraybuffer",l.onload=function(){if(l.status==200||l.status==0&&l.response){a(l.response);return}c()},l.onerror=c,l.send(null)},Tt=o=>document.title=o);var jn=t.print||console.log.bind(console),ge=t.printErr||console.warn.bind(console);i(t,u),u=null,t.arguments&&(p=t.arguments),t.thisProgram&&(m=t.thisProgram),t.quit&&(B=t.quit);var Ne=0,ze=function(o){Ne=o},tr=function(){return Ne},Vt;t.wasmBinary&&(Vt=t.wasmBinary);var rr=t.noExitRuntime||!0;typeof WebAssembly!="object"&&Ke("no native wasm support detected");var Kt,Ye=!1,Jt;function Bn(o,a){o||Ke(a)}function Wa(o){var a=t["_"+o];return a}function Ar(o,a,c,l,d){var f={string:function(Y){var ve=0;if(Y!=null&&Y!==0){var Fe=(Y.length<<2)+1;ve=Nt(Fe),Co(Y,ve,Fe)}return ve},array:function(Y){var ve=Nt(Y.length);return Mo(Y,ve),ve}};function h(Y){return a==="string"?Dr(Y):a==="boolean"?Boolean(Y):Y}var _=Wa(o),y=[],b=0;if(l)for(var g=0;g<l.length;g++){var I=f[c[g]];I?(b===0&&(b=A()),y[g]=I(l[g])):y[g]=l[g]}var k=_.apply(null,y);function E(Y){return b!==0&&S(b),h(Y)}return k=E(k),k}var Oo=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function os(o,a,c){for(var l=a+c,d=a;o[d]&&!(d>=l);)++d;if(d-a>16&&o.subarray&&Oo)return Oo.decode(o.subarray(a,d));for(var f="";a<d;){var h=o[a++];if(!(h&128)){f+=String.fromCharCode(h);continue}var _=o[a++]&63;if((h&224)==192){f+=String.fromCharCode((h&31)<<6|_);continue}var y=o[a++]&63;if((h&240)==224?h=(h&15)<<12|_<<6|y:h=(h&7)<<18|_<<12|y<<6|o[a++]&63,h<65536)f+=String.fromCharCode(h);else{var b=h-65536;f+=String.fromCharCode(55296|b>>10,56320|b&1023)}}return f}function Dr(o,a){return o?os(re,o,a):""}function ko(o,a,c,l){if(!(l>0))return 0;for(var d=c,f=c+l-1,h=0;h<o.length;++h){var _=o.charCodeAt(h);if(_>=55296&&_<=57343){var y=o.charCodeAt(++h);_=65536+((_&1023)<<10)|y&1023}if(_<=127){if(c>=f)break;a[c++]=_}else if(_<=2047){if(c+1>=f)break;a[c++]=192|_>>6,a[c++]=128|_&63}else if(_<=65535){if(c+2>=f)break;a[c++]=224|_>>12,a[c++]=128|_>>6&63,a[c++]=128|_&63}else{if(c+3>=f)break;a[c++]=240|_>>18,a[c++]=128|_>>12&63,a[c++]=128|_>>6&63,a[c++]=128|_&63}}return a[c]=0,c-d}function Co(o,a,c){return ko(o,re,a,c)}function vl(o){for(var a=0,c=0;c<o.length;++c){var l=o.charCodeAt(c);l>=55296&&l<=57343&&(l=65536+((l&1023)<<10)|o.charCodeAt(++c)&1023),l<=127?++a:l<=2047?a+=2:l<=65535?a+=3:a+=4}return a}function Mo(o,a){ir.set(o,a)}function Tn(o,a,c){for(var l=0;l<o.length;++l)ir[a++>>0]=o.charCodeAt(l);c||(ir[a>>0]=0)}function Lr(o,a){return o%a>0&&(o+=a-o%a),o}var ki,ir,re,Sn,Ya,Q,Ga,Y_,$a;function Uo(o){ki=o,t.HEAP8=ir=new Int8Array(o),t.HEAP16=Sn=new Int16Array(o),t.HEAP32=Q=new Int32Array(o),t.HEAPU8=re=new Uint8Array(o),t.HEAPU16=Ya=new Uint16Array(o),t.HEAPU32=Ga=new Uint32Array(o),t.HEAPF32=Y_=new Float32Array(o),t.HEAPF64=$a=new Float64Array(o)}var wl=t.INITIAL_MEMORY||16777216,Ka,Eo=[],Ja=[],jl=[],Xa=[],Ro=!1,Bl=!1,Tl=0;function xo(){return rr||Tl>0}function Sl(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)pi(t.preRun.shift());us(Eo)}function Il(){Ro=!0,us(Ja)}function Al(){us(jl)}function Dl(){Bl=!0}function Fl(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)In(t.postRun.shift());us(Xa)}function pi(o){Eo.unshift(o)}function Vo(o){Ja.unshift(o)}function In(o){Xa.unshift(o)}var _i=0,No=null,Dt=null;function Ol(o){_i++,t.monitorRunDependencies&&t.monitorRunDependencies(_i)}function Za(o){if(_i--,t.monitorRunDependencies&&t.monitorRunDependencies(_i),_i==0&&(No!==null&&(clearInterval(No),No=null),Dt)){var a=Dt;Dt=null,a()}}t.preloadedImages={},t.preloadedAudios={};function Ke(o){t.onAbort&&t.onAbort(o),o="Aborted("+o+")",ge(o),Ye=!0,Jt=1,o+=". Build with -s ASSERTIONS=1 for more info.";var a=new WebAssembly.RuntimeError(o);throw s(a),a}var Qa="data:application/octet-stream;base64,";function eu(o){return o.startsWith(Qa)}var Ht;t.locateFile?(Ht="./duckdb-mvp.wasm",eu(Ht)||(Ht=Se(Ht))):Ht=new URL("./duckdb-mvp.wasm",import.meta.url).toString();function An(o){try{if(o==Ht&&Vt)return new Uint8Array(Vt);if(qe)return qe(o);throw"both async and sync fetching of the wasm failed"}catch(a){Ke(a)}}function as(){return!Vt&&(O||R)&&typeof fetch=="function"?fetch(Ht,{credentials:"same-origin"}).then(function(o){if(!o.ok)throw"failed to load wasm binary file at '"+Ht+"'";return o.arrayBuffer()}).catch(function(){return An(Ht)}):Promise.resolve().then(function(){return An(Ht)})}function tu(){var o={a:zd};function a(h,_){var y=h.exports;t.asm=y,Kt=t.asm.Re,Uo(Kt.buffer),Ka=t.asm.Ue,Vo(t.asm.Se),Za("wasm-instantiate")}Ol("wasm-instantiate");function c(h){a(h.instance)}function l(h){return as().then(function(_){return WebAssembly.instantiate(_,o)}).then(function(_){return _}).then(h,function(_){ge("failed to asynchronously prepare wasm: "+_),Ke(_)})}function d(){return!Vt&&typeof WebAssembly.instantiateStreaming=="function"&&!eu(Ht)&&typeof fetch=="function"?fetch(Ht,{credentials:"same-origin"}).then(function(h){var _=WebAssembly.instantiateStreaming(h,o);return _.then(c,function(y){return ge("wasm streaming compile failed: "+y),ge("falling back to ArrayBuffer instantiation"),l(c)})}):l(c)}if(t.instantiateWasm)try{var f=t.instantiateWasm(o,a);return f}catch(h){return ge("Module.instantiateWasm callback failed with error: "+h),!1}return d().catch(s),{}}function us(o){for(;o.length>0;){var a=o.shift();if(typeof a=="function"){a(t);continue}var c=a.func;typeof c=="number"?a.arg===void 0?X(c)():X(c)(a.arg):c(a.arg===void 0?null:a.arg)}}var cs=[];function X(o){var a=cs[o];return a||(o>=cs.length&&(cs.length=o+1),cs[o]=a=Ka.get(o)),a}function kl(o){if(o instanceof pu||o=="unwind")return Jt;B(1,o)}function Cl(o,a,c,l){Ke("Assertion failed: "+Dr(o)+", at: "+[a?Dr(a):"unknown filename",c,l?Dr(l):"unknown function"])}function Ml(o){return q(o+16)+16}function qr(o){this.excPtr=o,this.ptr=o-16,this.set_type=function(a){Q[this.ptr+4>>2]=a},this.get_type=function(){return Q[this.ptr+4>>2]},this.set_destructor=function(a){Q[this.ptr+8>>2]=a},this.get_destructor=function(){return Q[this.ptr+8>>2]},this.set_refcount=function(a){Q[this.ptr>>2]=a},this.set_caught=function(a){a=a?1:0,ir[this.ptr+12>>0]=a},this.get_caught=function(){return ir[this.ptr+12>>0]!=0},this.set_rethrown=function(a){a=a?1:0,ir[this.ptr+13>>0]=a},this.get_rethrown=function(){return ir[this.ptr+13>>0]!=0},this.init=function(a,c){this.set_type(a),this.set_destructor(c),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var a=Q[this.ptr>>2];Q[this.ptr>>2]=a+1},this.release_ref=function(){var a=Q[this.ptr>>2];return Q[this.ptr>>2]=a-1,a===1}}function nr(o){this.free=function(){ce(this.ptr),this.ptr=0},this.set_base_ptr=function(a){Q[this.ptr>>2]=a},this.get_base_ptr=function(){return Q[this.ptr>>2]},this.set_adjusted_ptr=function(a){Q[this.ptr+4>>2]=a},this.get_adjusted_ptr_addr=function(){return this.ptr+4},this.get_adjusted_ptr=function(){return Q[this.ptr+4>>2]},this.get_exception_ptr=function(){var a=Ci(this.get_exception_info().get_type());if(a)return Q[this.get_base_ptr()>>2];var c=this.get_adjusted_ptr();return c!==0?c:this.get_base_ptr()},this.get_exception_info=function(){return new qr(this.get_base_ptr())},o===void 0?(this.ptr=q(8),this.set_adjusted_ptr(0)):this.ptr=o}var ls=[];function Po(o){o.add_ref()}var Dn=0;function ru(o){var a=new nr(o),c=a.get_exception_info();return c.get_caught()||(c.set_caught(!0),Dn--),c.set_rethrown(!1),ls.push(a),Po(c),a.get_exception_ptr()}var zt=0;function Fn(o){return ce(new qr(o).ptr)}function Lo(o){if(o.release_ref()&&!o.get_rethrown()){var a=o.get_destructor();a&&X(a)(o.excPtr),Fn(o.excPtr)}}function Wt(){T(0);var o=ls.pop();Lo(o.get_exception_info()),o.free(),zt=0}function iu(o){var a=new nr(o),c=a.get_base_ptr();throw zt||(zt=c),a.free(),c}function Ul(){var o=zt;if(!o)return ze(0),0;var a=new qr(o),c=a.get_type(),l=new nr;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!c)return ze(0),l.ptr|0;for(var d=Array.prototype.slice.call(arguments),f=0;f<d.length;f++){var h=d[f];if(h===0||h===c)break;if(Ut(h,c,l.get_adjusted_ptr_addr()))return ze(h),l.ptr|0}return ze(c),l.ptr|0}function El(){var o=zt;if(!o)return ze(0),0;var a=new qr(o),c=a.get_type(),l=new nr;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!c)return ze(0),l.ptr|0;for(var d=Array.prototype.slice.call(arguments),f=0;f<d.length;f++){var h=d[f];if(h===0||h===c)break;if(Ut(h,c,l.get_adjusted_ptr_addr()))return ze(h),l.ptr|0}return ze(c),l.ptr|0}function Rl(){var o=zt;if(!o)return ze(0),0;var a=new qr(o),c=a.get_type(),l=new nr;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!c)return ze(0),l.ptr|0;for(var d=Array.prototype.slice.call(arguments),f=0;f<d.length;f++){var h=d[f];if(h===0||h===c)break;if(Ut(h,c,l.get_adjusted_ptr_addr()))return ze(h),l.ptr|0}return ze(c),l.ptr|0}function xl(){var o=zt;if(!o)return ze(0),0;var a=new qr(o),c=a.get_type(),l=new nr;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!c)return ze(0),l.ptr|0;for(var d=Array.prototype.slice.call(arguments),f=0;f<d.length;f++){var h=d[f];if(h===0||h===c)break;if(Ut(h,c,l.get_adjusted_ptr_addr()))return ze(h),l.ptr|0}return ze(c),l.ptr|0}function Vl(){var o=ls.pop();o||Ke("no exception to throw");var a=o.get_exception_info(),c=o.get_base_ptr();throw a.get_rethrown()?o.free():(ls.push(o),a.set_rethrown(!0),a.set_caught(!1),Dn++),zt=c,c}function Nl(o,a,c){var l=new qr(o);throw l.init(a,c),zt=o,Dn++,o}function Pl(){return Dn}var ct={mappings:{},buffers:[null,[],[]],printChar:function(o,a){var c=ct.buffers[o];a===0||a===10?((o===1?jn:ge)(os(c,0)),c.length=0):c.push(a)},varargs:void 0,get:function(){ct.varargs+=4;var o=Q[ct.varargs-4>>2];return o},getStr:function(o){var a=Dr(o);return a},get64:function(o,a){return o}};function qo(o,a,c,l,d){}function Ll(o,a){return o=ct.getStr(o),ct.doAccess(o,a)}function ql(){ge("missing function: $SOCKFS"),Ke(-1)}function nu(){ge("missing function: $FS"),Ke(-1)}function On(o){var a=ql.getSocket(o);if(!a)throw new nu.ErrnoError(8);return a}function Hl(o){return Q[ue()>>2]=o,o}function Ho(o){return(o&255)+"."+(o>>8&255)+"."+(o>>16&255)+"."+(o>>24&255)}function su(o){var a="",c=0,l=0,d=0,f=0,h=0,_=0,y=[o[0]&65535,o[0]>>16,o[1]&65535,o[1]>>16,o[2]&65535,o[2]>>16,o[3]&65535,o[3]>>16],b=!0,g="";for(_=0;_<5;_++)if(y[_]!==0){b=!1;break}if(b){if(g=Ho(y[6]|y[7]<<16),y[5]===-1)return a="::ffff:",a+=g,a;if(y[5]===0)return a="::",g==="0.0.0.0"&&(g=""),g==="0.0.0.1"&&(g="1"),a+=g,a}for(c=0;c<8;c++)y[c]===0&&(c-d>1&&(h=0),d=c,h++),h>l&&(l=h,f=c-l+1);for(c=0;c<8;c++){if(l>1&&y[c]===0&&c>=f&&c<f+l){c===f&&(a+=":",f===0&&(a+=":"));continue}a+=Number(Mt(y[c]&65535)).toString(16),a+=c<7?":":""}return a}function ou(o,a){var c=Sn[o>>1],l=Mt(Ya[o+2>>1]),d;switch(c){case 2:if(a!==16)return{errno:28};d=Q[o+4>>2],d=Ho(d);break;case 10:if(a!==28)return{errno:28};d=[Q[o+8>>2],Q[o+12>>2],Q[o+16>>2],Q[o+20>>2]],d=su(d);break;default:return{errno:5}}return{family:c,addr:d,port:l}}function ds(o){for(var a=o.split("."),c=0;c<4;c++){var l=Number(a[c]);if(isNaN(l))return null;a[c]=l}return(a[0]|a[1]<<8|a[2]<<16|a[3]<<24)>>>0}function fs(o){return parseInt(o)}function zo(o){var a,c,l,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(o))return null;if(o==="::")return[0,0,0,0,0,0,0,0];for(o.startsWith("::")?o=o.replace("::","Z:"):o=o.replace("::",":Z:"),o.indexOf(".")>0?(o=o.replace(new RegExp("[.]","g"),":"),a=o.split(":"),a[a.length-4]=fs(a[a.length-4])+fs(a[a.length-3])*256,a[a.length-3]=fs(a[a.length-2])+fs(a[a.length-1])*256,a=a.slice(0,a.length-2)):a=o.split(":"),l=0,d=0,c=0;c<a.length;c++)if(typeof a[c]=="string")if(a[c]==="Z"){for(d=0;d<8-a.length+1;d++)h[c+d]=0;l=d-1}else h[c+l]=Me(parseInt(a[c],16));else h[c+l]=a[c];return[h[1]<<16|h[0],h[3]<<16|h[2],h[5]<<16|h[4],h[7]<<16|h[6]]}var Yt={address_map:{id:1,addrs:{},names:{}},lookup_name:function(o){var a=ds(o);if(a!==null||(a=zo(o),a!==null))return o;var c;if(Yt.address_map.addrs[o])c=Yt.address_map.addrs[o];else{var l=Yt.address_map.id++;Bn(l<65535,"exceeded max address mappings of 65535"),c="172.29."+(l&255)+"."+(l&65280),Yt.address_map.names[c]=o,Yt.address_map.addrs[o]=c}return c},lookup_addr:function(o){return Yt.address_map.names[o]?Yt.address_map.names[o]:null}};function au(o,a,c){if(c&&o===0)return null;var l=ou(o,a);if(l.errno)throw new nu.ErrnoError(l.errno);return l.addr=Yt.lookup_addr(l.addr)||l.addr,l}function zl(o,a,c){var l=On(o),d=au(a,c);return l.sock_ops.bind(l,d.addr,d.port),0}function Wl(o,a,c){var l=On(o),d=au(a,c);return l.sock_ops.connect(l,d.addr,d.port),0}function Yl(o,a,c){return ct.varargs=c,0}function Wo(o,a){}function Gl(o,a,c,l){}function $l(o,a,c){}function Kl(o,a,c){}function uu(o,a){re.fill(0,o,o+a)}function Yo(o,a,c,l,d){switch(a){case 2:c=ds(c),uu(o,16),d&&(Q[d>>2]=16),Sn[o>>1]=a,Q[o+4>>2]=c,Sn[o+2>>1]=Me(l);break;case 10:c=zo(c),uu(o,28),d&&(Q[d>>2]=28),Q[o>>2]=a,Q[o+8>>2]=c[0],Q[o+12>>2]=c[1],Q[o+16>>2]=c[2],Q[o+20>>2]=c[3],Sn[o+2>>1]=Me(l);break;default:return 5}return 0}function Jl(o,a,c){var l=On(o);if(!l.daddr)return-53;var d=Yo(a,l.family,Yt.lookup_name(l.daddr),l.dport,c);return 0}function Xl(o,a,c,l,d){var f=On(o);return a===1&&c===4?(Q[l>>2]=f.error,Q[d>>2]=4,f.error=null,0):-50}function Zl(o,a,c){return ct.varargs=c,0}function Ql(o,a){}function ed(o,a){return o=ct.getStr(o),ct.doMkdir(o,a)}function td(o,a,c){ct.varargs=c}function rd(o,a,c,l,d,f){var h=On(o),_=h.sock_ops.recvmsg(h,c);if(!_)return 0;if(d)var y=Yo(d,h.family,Yt.lookup_name(_.addr),_.port,f);return re.set(_.buffer,a),_.buffer.byteLength}function id(o,a){}function nd(o){}function sd(o,a,c,l,d,f){}function od(o,a,c){}function ad(o,a){}function ud(o){}function cd(o,a){Ke("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function ld(o,a){Ke("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function dd(){Ke("")}var kn;W?kn=()=>{var o=process.hrtime();return o[0]*1e3+o[1]/1e6}:kn=()=>performance.now();var fd=!0;function Cn(o,a){var c;if(o===0)c=Date.now();else if((o===1||o===4)&&fd)c=kn();else return Hl(28),-1;return Q[a>>2]=c/1e3|0,Q[a+4>>2]=c%1e3*1e3*1e3|0,0}function hd(o,a){return globalThis.DUCKDB_RUNTIME.createDirectory(t,o,a)}function pd(o,a){return globalThis.DUCKDB_RUNTIME.checkDirectory(t,o,a)}function _d(o,a){return globalThis.DUCKDB_RUNTIME.listDirectoryEntries(t,o,a)}function yd(o,a){return globalThis.DUCKDB_RUNTIME.removeDirectory(t,o,a)}function md(o){return globalThis.DUCKDB_RUNTIME.closeFile(t,o)}function bd(o,a){return globalThis.DUCKDB_RUNTIME.checkFile(t,o,a)}function gd(o){return globalThis.DUCKDB_RUNTIME.getLastFileModificationTime(t,o)}function vd(o,a,c,l){return globalThis.DUCKDB_RUNTIME.moveFile(t,o,a,c,l)}function wd(o,a){return globalThis.DUCKDB_RUNTIME.openFile(t,o,a)}function jd(o,a,c,l){return globalThis.DUCKDB_RUNTIME.readFile(t,o,a,c,l)}function Bd(o,a){return globalThis.DUCKDB_RUNTIME.truncateFile(t,o,a)}function hs(o,a,c,l){return globalThis.DUCKDB_RUNTIME.writeFile(t,o,a,c,l)}function Td(o,a){return globalThis.DUCKDB_RUNTIME.glob(t,o,a)}function ps(o){return globalThis.DUCKDB_RUNTIME.testPlatformFeature(t,o)}function Go(o,a,c,l,d,f){return globalThis.DUCKDB_RUNTIME.callScalarUDF(t,o,a,c,l,d,f)}function _s(){return 2147483648}function ys(o,a,c){re.copyWithin(o,a,a+c)}function ms(o){try{return Kt.grow(o-ki.byteLength+65535>>>16),Uo(Kt.buffer),1}catch(a){}}function Sd(o){var a=re.length;o=o>>>0;var c=2147483648;if(o>c)return!1;for(var l=1;l<=4;l*=2){var d=a*(1+.2/l);d=Math.min(d,o+100663296);var f=Math.min(c,Lr(Math.max(o,d),65536)),h=ms(f);if(h)return!0}return!1}var $o={};function Id(){return m||"./this.program"}function Mn(){if(!Mn.strings){var o=(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:o,_:Id()};for(var c in $o)$o[c]===void 0?delete a[c]:a[c]=$o[c];var l=[];for(var c in a)l.push(c+"="+a[c]);Mn.strings=l}return Mn.strings}function G_(o,a){var c=0;return Mn().forEach(function(l,d){var f=a+c;Q[o+d*4>>2]=f,Tn(l,f),c+=l.length+1}),0}function Ad(o,a){var c=Mn();Q[o>>2]=c.length;var l=0;return c.forEach(function(d){l+=d.length+1}),Q[a>>2]=l,0}function Dd(o){return 0}function Fd(o,a,c,l,d,f){var h=ct.getStreamFromFD(o),_=ct.doReadv(h,a,c,l);return Q[f>>2]=_,0}function Od(o,a,c,l,d,f){var h=ct.getStreamFromFD(o),_=ct.doWritev(h,a,c,l);return Q[f>>2]=_,0}function kd(o,a,c,l){var d=ct.getStreamFromFD(o),f=ct.doReadv(d,a,c);return Q[l>>2]=f,0}function Cd(o,a,c,l,d){}function Md(o){var a=ct.getStreamFromFD(o);return a.stream_ops&&a.stream_ops.fsync?-a.stream_ops.fsync(a):0}function Ud(o,a,c,l){for(var d=0,f=0;f<c;f++){var h=Q[a>>2],_=Q[a+4>>2];a+=8;for(var y=0;y<_;y++)ct.printChar(o,re[h+y]);d+=_}return Q[l>>2]=d,0}function Ed(){return tr()}function Rd(o,a,c,l){var d=0,f=0,h=0,_=0,y=0,b=0,g;function I(k,E,Y,ve,Fe,tt){var P,oe,Ue,Oe;return oe=k===10?28:16,Fe=k===10?su(Fe):Ho(Fe),P=q(oe),Oe=Yo(P,k,Fe,tt),Bn(!Oe),Ue=q(32),Q[Ue+4>>2]=k,Q[Ue+8>>2]=E,Q[Ue+12>>2]=Y,Q[Ue+24>>2]=ve,Q[Ue+20>>2]=P,k===10?Q[Ue+16>>2]=28:Q[Ue+16>>2]=16,Q[Ue+28>>2]=0,Ue}if(c&&(h=Q[c>>2],_=Q[c+4>>2],y=Q[c+8>>2],b=Q[c+12>>2]),y&&!b&&(b=y===2?17:6),!y&&b&&(y=b===17?2:1),b===0&&(b=6),y===0&&(y=1),!o&&!a)return-2;if(h&-1088||c!==0&&Q[c>>2]&2&&!o)return-1;if(h&32)return-2;if(y!==0&&y!==1&&y!==2)return-7;if(_!==0&&_!==2&&_!==10)return-6;if(a&&(a=Dr(a),f=parseInt(a,10),isNaN(f)))return h&1024?-2:-8;if(!o)return _===0&&(_=2),(h&1)===0&&(_===2?d=Re(2130706433):d=[0,0,0,1]),g=I(_,y,b,null,d,f),Q[l>>2]=g,0;if(o=Dr(o),d=ds(o),d!==null)if(_===0||_===2)_=2;else if(_===10&&h&8)d=[0,0,Re(65535),d],_=10;else return-2;else if(d=zo(o),d!==null)if(_===0||_===10)_=10;else return-2;return d!=null?(g=I(_,y,b,o,d,f),Q[l>>2]=g,0):h&4?-2:(o=Yt.lookup_name(o),d=ds(o),_===0?_=2:_===10&&(d=[0,0,Re(65535),d]),g=I(_,y,b,null,d,f),Q[l>>2]=g,0)}function xd(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var o=new Uint8Array(1);return function(){return crypto.getRandomValues(o),o[0]}}else if(W)try{var a=bg("crypto");return function(){return a.randomBytes(1)[0]}}catch(c){}return function(){Ke("randomDevice")}}function bs(o,a){bs.randomDevice||(bs.randomDevice=xd());for(var c=0;c<a;c++)ir[o+c>>0]=bs.randomDevice();return 0}function Vd(o,a,c,l,d,f,h){var _=ou(o,a);if(_.errno)return-6;var y=_.port,b=_.addr,g=!1;if(c&&l){var I;if(h&1||!(I=Yt.lookup_addr(b))){if(h&8)return-2}else b=I;var k=Co(b,c,l);k+1>=l&&(g=!0)}if(d&&f){y=""+y;var k=Co(y,d,f);k+1>=f&&(g=!0)}return g?-12:0}function Nd(o){return o}function Pd(o){ze(o)}function gs(o){return o%4===0&&(o%100!==0||o%400===0)}function Ko(o,a){for(var c=0,l=0;l<=a;c+=o[l++]);return c}var vs=[31,29,31,30,31,30,31,31,30,31,30,31],ws=[31,28,31,30,31,30,31,31,30,31,30,31];function js(o,a){for(var c=new Date(o.getTime());a>0;){var l=gs(c.getFullYear()),d=c.getMonth(),f=(l?vs:ws)[d];if(a>f-c.getDate())a-=f-c.getDate()+1,c.setDate(1),d<11?c.setMonth(d+1):(c.setMonth(0),c.setFullYear(c.getFullYear()+1));else return c.setDate(c.getDate()+a),c}return c}function Ld(o,a,c,l){var d=Q[l+40>>2],f={tm_sec:Q[l>>2],tm_min:Q[l+4>>2],tm_hour:Q[l+8>>2],tm_mday:Q[l+12>>2],tm_mon:Q[l+16>>2],tm_year:Q[l+20>>2],tm_wday:Q[l+24>>2],tm_yday:Q[l+28>>2],tm_isdst:Q[l+32>>2],tm_gmtoff:Q[l+36>>2],tm_zone:d?Dr(d):""},h=Dr(c),_={"%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 _)h=h.replace(new RegExp(y,"g"),_[y]);var b=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],g=["January","February","March","April","May","June","July","August","September","October","November","December"];function I(P,oe,Ue){for(var Oe=typeof P=="number"?P.toString():P||"";Oe.length<oe;)Oe=Ue[0]+Oe;return Oe}function k(P,oe){return I(P,oe,"0")}function E(P,oe){function Ue(Pt){return Pt<0?-1:Pt>0?1:0}var Oe;return(Oe=Ue(P.getFullYear()-oe.getFullYear()))===0&&(Oe=Ue(P.getMonth()-oe.getMonth()))===0&&(Oe=Ue(P.getDate()-oe.getDate())),Oe}function Y(P){switch(P.getDay()){case 0:return new Date(P.getFullYear()-1,11,29);case 1:return P;case 2:return new Date(P.getFullYear(),0,3);case 3:return new Date(P.getFullYear(),0,2);case 4:return new Date(P.getFullYear(),0,1);case 5:return new Date(P.getFullYear()-1,11,31);case 6:return new Date(P.getFullYear()-1,11,30)}}function ve(P){var oe=js(new Date(P.tm_year+1900,0,1),P.tm_yday),Ue=new Date(oe.getFullYear(),0,4),Oe=new Date(oe.getFullYear()+1,0,4),Pt=Y(Ue),Mi=Y(Oe);return E(Pt,oe)<=0?E(Mi,oe)<=0?oe.getFullYear()+1:oe.getFullYear():oe.getFullYear()-1}var Fe={"%a":function(P){return b[P.tm_wday].substring(0,3)},"%A":function(P){return b[P.tm_wday]},"%b":function(P){return g[P.tm_mon].substring(0,3)},"%B":function(P){return g[P.tm_mon]},"%C":function(P){var oe=P.tm_year+1900;return k(oe/100|0,2)},"%d":function(P){return k(P.tm_mday,2)},"%e":function(P){return I(P.tm_mday,2," ")},"%g":function(P){return ve(P).toString().substring(2)},"%G":function(P){return ve(P)},"%H":function(P){return k(P.tm_hour,2)},"%I":function(P){var oe=P.tm_hour;return oe==0?oe=12:oe>12&&(oe-=12),k(oe,2)},"%j":function(P){return k(P.tm_mday+Ko(gs(P.tm_year+1900)?vs:ws,P.tm_mon-1),3)},"%m":function(P){return k(P.tm_mon+1,2)},"%M":function(P){return k(P.tm_min,2)},"%n":function(){return`
31
- `},"%p":function(P){return P.tm_hour>=0&&P.tm_hour<12?"AM":"PM"},"%S":function(P){return k(P.tm_sec,2)},"%t":function(){return" "},"%u":function(P){return P.tm_wday||7},"%U":function(P){var oe=new Date(P.tm_year+1900,0,1),Ue=oe.getDay()===0?oe:js(oe,7-oe.getDay()),Oe=new Date(P.tm_year+1900,P.tm_mon,P.tm_mday);if(E(Ue,Oe)<0){var Pt=Ko(gs(Oe.getFullYear())?vs:ws,Oe.getMonth()-1)-31,Mi=31-Ue.getDate(),Un=Mi+Pt+Oe.getDate();return k(Math.ceil(Un/7),2)}return E(Ue,oe)===0?"01":"00"},"%V":function(P){var oe=new Date(P.tm_year+1900,0,4),Ue=new Date(P.tm_year+1901,0,4),Oe=Y(oe),Pt=Y(Ue),Mi=js(new Date(P.tm_year+1900,0,1),P.tm_yday);if(E(Mi,Oe)<0)return"53";if(E(Pt,Mi)<=0)return"01";var Un;return Oe.getFullYear()<P.tm_year+1900?Un=P.tm_yday+32-Oe.getDate():Un=P.tm_yday+1-Oe.getDate(),k(Math.ceil(Un/7),2)},"%w":function(P){return P.tm_wday},"%W":function(P){var oe=new Date(P.tm_year,0,1),Ue=oe.getDay()===1?oe:js(oe,oe.getDay()===0?1:7-oe.getDay()+1),Oe=new Date(P.tm_year+1900,P.tm_mon,P.tm_mday);if(E(Ue,Oe)<0){var Pt=Ko(gs(Oe.getFullYear())?vs:ws,Oe.getMonth()-1)-31,Mi=31-Ue.getDate(),Un=Mi+Pt+Oe.getDate();return k(Math.ceil(Un/7),2)}return E(Ue,oe)===0?"01":"00"},"%y":function(P){return(P.tm_year+1900).toString().substring(2)},"%Y":function(P){return P.tm_year+1900},"%z":function(P){var oe=P.tm_gmtoff,Ue=oe>=0;return oe=Math.abs(oe)/60,oe=oe/60*100+oe%60,(Ue?"+":"-")+String("0000"+oe).slice(-4)},"%Z":function(P){return P.tm_zone},"%%":function(){return"%"}};for(var y in Fe)h.includes(y)&&(h=h.replace(new RegExp(y,"g"),Fe[y](f)));var tt=Hd(h,!1);return tt.length>a?0:(Mo(tt,o),tt.length-1)}function qd(o,a,c,l){return Ld(o,a,c,l)}function Hd(o,a,c){var l=c>0?c:vl(o)+1,d=new Array(l),f=ko(o,d,0,d.length);return a&&(d.length=f),d}var zd={p:Cl,j:Ml,A:ru,F:Wt,b:Ul,n:El,H:Rl,W:xl,i:Fn,da:Vl,v:Nl,E:Pl,e:iu,Ca:qo,Qe:Ll,Ea:zl,Da:Wl,Q:Yl,Sa:Wo,Qa:Gl,Na:$l,Oa:Kl,ya:Jl,Ba:Xl,Ua:Zl,Pa:Ql,Ta:ed,oa:td,za:rd,Oe:id,ma:nd,Aa:sd,ga:od,Ra:ad,na:ud,ha:cd,Ga:ld,_:dd,la:Cn,Ge:hd,He:pd,Ee:_d,Fe:yd,ta:md,Ce:bd,Je:gd,De:vd,Ke:wd,fa:jd,Ie:Bd,ua:hs,Be:Td,sa:ps,Le:Go,Va:_s,kb:ys,ed:Sd,Xa:G_,Ya:Ad,U:Dd,pe:Fd,qb:Od,qa:kd,ye:Cd,Pe:Md,ea:Ud,a:Ed,Fa:Rd,Ma:bs,xa:Vd,ia:PB,N:OB,Ja:RB,T:oB,yc:$S,ja:NB,X:CB,ra:sB,zc:GS,u:fB,Ha:qB,Ka:jB,Z:SB,Ia:LB,La:wB,d:Z1,aa:WB,D:IB,Ib:VI,c:Q1,Y:kB,va:GB,h:tB,Gb:PI,m:nB,pa:gB,o:rB,w:pB,z:lB,S:TB,y:dB,x:_B,q:EB,O:zB,J:HB,cc:yI,fc:hI,ic:lI,oc:nI,dc:_I,Hb:NI,xc:KS,gc:fI,pc:iI,Pb:kI,ue:tT,Qd:CT,Jd:NT,te:rT,Ub:II,jd:dS,Lb:EI,Kb:RI,Xd:ST,Pd:MT,yb:$I,Xc:TS,Wd:IT,Ec:HS,Vb:SI,Jb:xI,ke:lT,Td:FT,Ac:YS,Kd:VT,vd:QT,Hd:LT,mb:sA,Ud:DT,me:uT,Rd:kT,id:fS,gb:lA,Ob:CI,se:iT,Yd:TT,xd:XT,wb:JI,Ld:xT,hb:cA,Fb:LI,Sd:OT,Dd:WT,Gd:qT,Fd:HT,Ed:zT,Ad:$T,mc:oI,$b:gI,ee:yT,qc:rI,ae:vT,qe:sT,tc:QS,sc:eI,xe:ZB,we:QB,Od:UT,Ae:JB,qd:nS,rc:tI,ec:pI,Fc:qS,vc:XS,Uc:AS,vb:XI,Cc:WS,sd:rS,md:uS,Mc:ES,wc:JS,zb:GI,ac:bI,od:oS,dd:yS,Pc:CS,Oc:MS,Lc:RS,Nc:US,td:tS,ad:gS,Mb:UI,kc:uI,ob:iA,_c:wS,uc:ZS,Cb:zI,Yb:jI,Db:HI,Wb:TI,t:J1,k:eB,C:FB,ba:UB,sb:eA,K:DB,ca:MB,tb:QI,f:X1,V:uB,R:AB,Bc:aB,g:cB,l:iB,Ne:$B,r:BB,s:bB,wa:YB,B:hB,L:vB,P:VB,M:yB,Me:KB,ka:xB,$:mB,Cd:YT,rb:tA,kd:lS,bc:mI,Dc:zS,nc:sI,Qb:OI,Za:gA,jb:aA,ie:fT,Vd:AT,xb:KI,eb:fA,yd:JT,zd:KT,Zb:wI,Yc:BS,Sb:DI,Rb:FI,_a:bA,Qc:kS,he:hT,_d:jT,Bd:GT,Wc:SS,Ic:NS,Ab:YI,Nb:MI,Bb:WI,ib:uA,ce:bT,ud:eS,Tb:AI,Gc:LS,Tc:DS,ge:pT,fb:dA,oe:oT,re:nT,ve:eT,Id:PT,db:hA,cd:mS,Kc:xS,Jc:VS,bd:bS,Zc:jS,nd:aS,lb:oA,hd:hS,cb:pA,Hc:PS,nb:nA,ze:XB,le:cT,fd:_S,Rc:OS,be:gT,hc:dI,je:dT,de:mT,gd:pS,Nd:ET,Md:RT,$c:vS,ub:ZI,ld:cS,lc:aI,fe:_T,bb:_A,Sc:FS,pb:rA,$d:wT,Vc:IS,$a:mA,ab:yA,jc:cI,ne:aT,rd:iS,Zd:BT,Xb:BI,_b:vI,Eb:qI,wd:ZT,pd:sS,G:Nd,I:Pd,Wa:qd},$_=tu(),Wd=t.___wasm_call_ctors=function(){return(Wd=t.___wasm_call_ctors=t.asm.Se).apply(null,arguments)},Yd=t._main=function(){return(Yd=t._main=t.asm.Te).apply(null,arguments)},Gd=t._duckdb_web_fs_glob_add_path=function(){return(Gd=t._duckdb_web_fs_glob_add_path=t.asm.Ve).apply(null,arguments)},$d=t._duckdb_web_clear_response=function(){return($d=t._duckdb_web_clear_response=t.asm.We).apply(null,arguments)},Kd=t._duckdb_web_fail_with=function(){return(Kd=t._duckdb_web_fail_with=t.asm.Xe).apply(null,arguments)},Jd=t._duckdb_web_reset=function(){return(Jd=t._duckdb_web_reset=t.asm.Ye).apply(null,arguments)},Xd=t._duckdb_web_connect=function(){return(Xd=t._duckdb_web_connect=t.asm.Ze).apply(null,arguments)},Zd=t._duckdb_web_disconnect=function(){return(Zd=t._duckdb_web_disconnect=t.asm._e).apply(null,arguments)},Qd=t._duckdb_web_flush_files=function(){return(Qd=t._duckdb_web_flush_files=t.asm.$e).apply(null,arguments)},ef=t._duckdb_web_flush_file=function(){return(ef=t._duckdb_web_flush_file=t.asm.af).apply(null,arguments)},tf=t._duckdb_web_open=function(){return(tf=t._duckdb_web_open=t.asm.bf).apply(null,arguments)},rf=t._duckdb_web_get_global_file_info=function(){return(rf=t._duckdb_web_get_global_file_info=t.asm.cf).apply(null,arguments)},nf=t._duckdb_web_collect_file_stats=function(){return(nf=t._duckdb_web_collect_file_stats=t.asm.df).apply(null,arguments)},sf=t._duckdb_web_export_file_stats=function(){return(sf=t._duckdb_web_export_file_stats=t.asm.ef).apply(null,arguments)},cu=t._duckdb_web_fs_drop_file=function(){return(cu=t._duckdb_web_fs_drop_file=t.asm.ff).apply(null,arguments)},Bs=t._duckdb_web_fs_drop_files=function(){return(Bs=t._duckdb_web_fs_drop_files=t.asm.gf).apply(null,arguments)},Ts=t._duckdb_web_fs_glob_file_infos=function(){return(Ts=t._duckdb_web_fs_glob_file_infos=t.asm.hf).apply(null,arguments)},Jo=t._duckdb_web_fs_get_file_info_by_id=function(){return(Jo=t._duckdb_web_fs_get_file_info_by_id=t.asm.jf).apply(null,arguments)},lu=t._duckdb_web_fs_get_file_info_by_name=function(){return(lu=t._duckdb_web_fs_get_file_info_by_name=t.asm.kf).apply(null,arguments)},du=t._duckdb_web_fs_set_file_descriptor=function(){return(du=t._duckdb_web_fs_set_file_descriptor=t.asm.lf).apply(null,arguments)},Xo=t._duckdb_web_fs_register_file_url=function(){return(Xo=t._duckdb_web_fs_register_file_url=t.asm.mf).apply(null,arguments)},Zo=t._duckdb_web_fs_register_file_buffer=function(){return(Zo=t._duckdb_web_fs_register_file_buffer=t.asm.nf).apply(null,arguments)},of=t._duckdb_web_copy_file_to_buffer=function(){return(of=t._duckdb_web_copy_file_to_buffer=t.asm.of).apply(null,arguments)},Ss=t._duckdb_web_copy_file_to_path=function(){return(Ss=t._duckdb_web_copy_file_to_path=t.asm.pf).apply(null,arguments)},Is=t._duckdb_web_get_version=function(){return(Is=t._duckdb_web_get_version=t.asm.qf).apply(null,arguments)},af=t._duckdb_web_get_feature_flags=function(){return(af=t._duckdb_web_get_feature_flags=t.asm.rf).apply(null,arguments)},uf=t._duckdb_web_tokenize=function(){return(uf=t._duckdb_web_tokenize=t.asm.sf).apply(null,arguments)},Qo=t._duckdb_web_udf_scalar_create=function(){return(Qo=t._duckdb_web_udf_scalar_create=t.asm.tf).apply(null,arguments)},cf=t._duckdb_web_prepared_create=function(){return(cf=t._duckdb_web_prepared_create=t.asm.uf).apply(null,arguments)},lf=t._duckdb_web_prepared_close=function(){return(lf=t._duckdb_web_prepared_close=t.asm.vf).apply(null,arguments)},fu=t._duckdb_web_prepared_run=function(){return(fu=t._duckdb_web_prepared_run=t.asm.wf).apply(null,arguments)},v=t._duckdb_web_prepared_send=function(){return(v=t._duckdb_web_prepared_send=t.asm.xf).apply(null,arguments)},j=t._duckdb_web_query_run=function(){return(j=t._duckdb_web_query_run=t.asm.yf).apply(null,arguments)},D=t._duckdb_web_query_send=function(){return(D=t._duckdb_web_query_send=t.asm.zf).apply(null,arguments)},C=t._duckdb_web_query_fetch_results=function(){return(C=t._duckdb_web_query_fetch_results=t.asm.Af).apply(null,arguments)},x=t._duckdb_web_get_tablenames=function(){return(x=t._duckdb_web_get_tablenames=t.asm.Bf).apply(null,arguments)},te=t._duckdb_web_insert_arrow_from_ipc_stream=function(){return(te=t._duckdb_web_insert_arrow_from_ipc_stream=t.asm.Cf).apply(null,arguments)},J=t._duckdb_web_insert_csv_from_path=function(){return(J=t._duckdb_web_insert_csv_from_path=t.asm.Df).apply(null,arguments)},$=t._duckdb_web_insert_json_from_path=function(){return($=t._duckdb_web_insert_json_from_path=t.asm.Ef).apply(null,arguments)},ue=t.___errno_location=function(){return(ue=t.___errno_location=t.asm.Ff).apply(null,arguments)},Re=t._htonl=function(){return(Re=t._htonl=t.asm.Gf).apply(null,arguments)},Me=t._htons=function(){return(Me=t._htons=t.asm.Hf).apply(null,arguments)},Mt=t._ntohs=function(){return(Mt=t._ntohs=t.asm.If).apply(null,arguments)},T=t._setThrew=function(){return(T=t._setThrew=t.asm.Jf).apply(null,arguments)},A=t.stackSave=function(){return(A=t.stackSave=t.asm.Kf).apply(null,arguments)},S=t.stackRestore=function(){return(S=t.stackRestore=t.asm.Lf).apply(null,arguments)},Nt=t.stackAlloc=function(){return(Nt=t.stackAlloc=t.asm.Mf).apply(null,arguments)},Ut=t.___cxa_can_catch=function(){return(Ut=t.___cxa_can_catch=t.asm.Nf).apply(null,arguments)},Ci=t.___cxa_is_pointer_type=function(){return(Ci=t.___cxa_is_pointer_type=t.asm.Of).apply(null,arguments)},q=t._malloc=function(){return(q=t._malloc=t.asm.Pf).apply(null,arguments)},ce=t._free=function(){return(ce=t._free=t.asm.Qf).apply(null,arguments)},xe=t.dynCall_jiiii=function(){return(xe=t.dynCall_jiiii=t.asm.Rf).apply(null,arguments)},Ve=t.dynCall_iiiiij=function(){return(Ve=t.dynCall_iiiiij=t.asm.Sf).apply(null,arguments)},Xt=t.dynCall_iiiiijj=function(){return(Xt=t.dynCall_iiiiijj=t.asm.Tf).apply(null,arguments)},Fr=t.dynCall_viijii=function(){return(Fr=t.dynCall_viijii=t.asm.Uf).apply(null,arguments)},Hr=t.dynCall_j=function(){return(Hr=t.dynCall_j=t.asm.Vf).apply(null,arguments)},K_=t.dynCall_ji=function(){return(K_=t.dynCall_ji=t.asm.Wf).apply(null,arguments)},J_=t.dynCall_iij=function(){return(J_=t.dynCall_iij=t.asm.Xf).apply(null,arguments)},X_=t.dynCall_viij=function(){return(X_=t.dynCall_viij=t.asm.Yf).apply(null,arguments)},Z_=t.dynCall_viijji=function(){return(Z_=t.dynCall_viijji=t.asm.Zf).apply(null,arguments)},Q_=t.dynCall_viijj=function(){return(Q_=t.dynCall_viijj=t.asm._f).apply(null,arguments)},ey=t.dynCall_viiijj=function(){return(ey=t.dynCall_viiijj=t.asm.$f).apply(null,arguments)},ty=t.dynCall_viiji=function(){return(ty=t.dynCall_viiji=t.asm.ag).apply(null,arguments)},ry=t.dynCall_vijjj=function(){return(ry=t.dynCall_vijjj=t.asm.bg).apply(null,arguments)},iy=t.dynCall_iiijj=function(){return(iy=t.dynCall_iiijj=t.asm.cg).apply(null,arguments)},ny=t.dynCall_viiij=function(){return(ny=t.dynCall_viiij=t.asm.dg).apply(null,arguments)},sy=t.dynCall_viijij=function(){return(sy=t.dynCall_viijij=t.asm.eg).apply(null,arguments)},oy=t.dynCall_viiijjj=function(){return(oy=t.dynCall_viiijjj=t.asm.fg).apply(null,arguments)},ay=t.dynCall_iiij=function(){return(ay=t.dynCall_iiij=t.asm.gg).apply(null,arguments)},uy=t.dynCall_vijijj=function(){return(uy=t.dynCall_vijijj=t.asm.hg).apply(null,arguments)},cy=t.dynCall_iji=function(){return(cy=t.dynCall_iji=t.asm.ig).apply(null,arguments)},ly=t.dynCall_viji=function(){return(ly=t.dynCall_viji=t.asm.jg).apply(null,arguments)},dy=t.dynCall_vij=function(){return(dy=t.dynCall_vij=t.asm.kg).apply(null,arguments)},fy=t.dynCall_viiiij=function(){return(fy=t.dynCall_viiiij=t.asm.lg).apply(null,arguments)},hy=t.dynCall_jii=function(){return(hy=t.dynCall_jii=t.asm.mg).apply(null,arguments)},py=t.dynCall_viiiji=function(){return(py=t.dynCall_viiiji=t.asm.ng).apply(null,arguments)},_y=t.dynCall_vijj=function(){return(_y=t.dynCall_vijj=t.asm.og).apply(null,arguments)},yy=t.dynCall_vj=function(){return(yy=t.dynCall_vj=t.asm.pg).apply(null,arguments)},my=t.dynCall_iiji=function(){return(my=t.dynCall_iiji=t.asm.qg).apply(null,arguments)},by=t.dynCall_iiiij=function(){return(by=t.dynCall_iiiij=t.asm.rg).apply(null,arguments)},gy=t.dynCall_iiiiiji=function(){return(gy=t.dynCall_iiiiiji=t.asm.sg).apply(null,arguments)},vy=t.dynCall_iiiji=function(){return(vy=t.dynCall_iiiji=t.asm.tg).apply(null,arguments)},wy=t.dynCall_iiiiji=function(){return(wy=t.dynCall_iiiiji=t.asm.ug).apply(null,arguments)},jy=t.dynCall_jiii=function(){return(jy=t.dynCall_jiii=t.asm.vg).apply(null,arguments)},By=t.dynCall_jij=function(){return(By=t.dynCall_jij=t.asm.wg).apply(null,arguments)},Ty=t.dynCall_iijjijj=function(){return(Ty=t.dynCall_iijjijj=t.asm.xg).apply(null,arguments)},Sy=t.dynCall_viiiijiiiii=function(){return(Sy=t.dynCall_viiiijiiiii=t.asm.yg).apply(null,arguments)},Iy=t.dynCall_viiiijiiii=function(){return(Iy=t.dynCall_viiiijiiii=t.asm.zg).apply(null,arguments)},Ay=t.dynCall_viiijii=function(){return(Ay=t.dynCall_viiijii=t.asm.Ag).apply(null,arguments)},Dy=t.dynCall_viiiiiij=function(){return(Dy=t.dynCall_viiiiiij=t.asm.Bg).apply(null,arguments)},Fy=t.dynCall_iiijiii=function(){return(Fy=t.dynCall_iiijiii=t.asm.Cg).apply(null,arguments)},Oy=t.dynCall_iiiiijii=function(){return(Oy=t.dynCall_iiiiijii=t.asm.Dg).apply(null,arguments)},ky=t.dynCall_viijiii=function(){return(ky=t.dynCall_viijiii=t.asm.Eg).apply(null,arguments)},Cy=t.dynCall_iiijiij=function(){return(Cy=t.dynCall_iiijiij=t.asm.Fg).apply(null,arguments)},My=t.dynCall_vijiii=function(){return(My=t.dynCall_vijiii=t.asm.Gg).apply(null,arguments)},Uy=t.dynCall_iijjii=function(){return(Uy=t.dynCall_iijjii=t.asm.Hg).apply(null,arguments)},Ey=t.dynCall_iijjiii=function(){return(Ey=t.dynCall_iijjiii=t.asm.Ig).apply(null,arguments)},Ry=t.dynCall_iijjiiii=function(){return(Ry=t.dynCall_iijjiiii=t.asm.Jg).apply(null,arguments)},xy=t.dynCall_iijji=function(){return(xy=t.dynCall_iijji=t.asm.Kg).apply(null,arguments)},Vy=t.dynCall_vijiiii=function(){return(Vy=t.dynCall_vijiiii=t.asm.Lg).apply(null,arguments)},Ny=t.dynCall_iijiiii=function(){return(Ny=t.dynCall_iijiiii=t.asm.Mg).apply(null,arguments)},Py=t.dynCall_iijii=function(){return(Py=t.dynCall_iijii=t.asm.Ng).apply(null,arguments)},Ly=t.dynCall_vijij=function(){return(Ly=t.dynCall_vijij=t.asm.Og).apply(null,arguments)},qy=t.dynCall_iiijiiii=function(){return(qy=t.dynCall_iiijiiii=t.asm.Pg).apply(null,arguments)},Hy=t.dynCall_jiiij=function(){return(Hy=t.dynCall_jiiij=t.asm.Qg).apply(null,arguments)},zy=t.dynCall_jiiiii=function(){return(zy=t.dynCall_jiiiii=t.asm.Rg).apply(null,arguments)},Wy=t.dynCall_iiiiijjiijj=function(){return(Wy=t.dynCall_iiiiijjiijj=t.asm.Sg).apply(null,arguments)},Yy=t.dynCall_viijiiji=function(){return(Yy=t.dynCall_viijiiji=t.asm.Tg).apply(null,arguments)},Gy=t.dynCall_vjjijij=function(){return(Gy=t.dynCall_vjjijij=t.asm.Ug).apply(null,arguments)},$y=t.dynCall_vijjji=function(){return($y=t.dynCall_vijjji=t.asm.Vg).apply(null,arguments)},Ky=t.dynCall_vjjii=function(){return(Ky=t.dynCall_vjjii=t.asm.Wg).apply(null,arguments)},Jy=t.dynCall_viiiiiji=function(){return(Jy=t.dynCall_viiiiiji=t.asm.Xg).apply(null,arguments)},Xy=t.dynCall_jiiiji=function(){return(Xy=t.dynCall_jiiiji=t.asm.Yg).apply(null,arguments)},Zy=t.dynCall_iijj=function(){return(Zy=t.dynCall_iijj=t.asm.Zg).apply(null,arguments)},Qy=t.dynCall_iiijjii=function(){return(Qy=t.dynCall_iiijjii=t.asm._g).apply(null,arguments)},em=t.dynCall_vijii=function(){return(em=t.dynCall_vijii=t.asm.$g).apply(null,arguments)},tm=t.dynCall_viijjii=function(){return(tm=t.dynCall_viijjii=t.asm.ah).apply(null,arguments)},rm=t.dynCall_viiiijj=function(){return(rm=t.dynCall_viiiijj=t.asm.bh).apply(null,arguments)},im=t.dynCall_jijjij=function(){return(im=t.dynCall_jijjij=t.asm.ch).apply(null,arguments)},nm=t.dynCall_jiijii=function(){return(nm=t.dynCall_jiijii=t.asm.dh).apply(null,arguments)},sm=t.dynCall_jijiii=function(){return(sm=t.dynCall_jijiii=t.asm.eh).apply(null,arguments)},om=t.dynCall_viijiiiii=function(){return(om=t.dynCall_viijiiiii=t.asm.fh).apply(null,arguments)},am=t.dynCall_viijiiij=function(){return(am=t.dynCall_viijiiij=t.asm.gh).apply(null,arguments)},um=t.dynCall_vijiiiji=function(){return(um=t.dynCall_vijiiiji=t.asm.hh).apply(null,arguments)},cm=t.dynCall_jiiji=function(){return(cm=t.dynCall_jiiji=t.asm.ih).apply(null,arguments)},lm=t.dynCall_viiijij=function(){return(lm=t.dynCall_viiijij=t.asm.jh).apply(null,arguments)},dm=t.dynCall_viijiij=function(){return(dm=t.dynCall_viijiij=t.asm.kh).apply(null,arguments)},fm=t.dynCall_viiiiijj=function(){return(fm=t.dynCall_viiiiijj=t.asm.lh).apply(null,arguments)},hm=t.dynCall_viiijji=function(){return(hm=t.dynCall_viiijji=t.asm.mh).apply(null,arguments)},pm=t.dynCall_iiiijiii=function(){return(pm=t.dynCall_iiiijiii=t.asm.nh).apply(null,arguments)},_m=t.dynCall_iiijij=function(){return(_m=t.dynCall_iiijij=t.asm.oh).apply(null,arguments)},ym=t.dynCall_iiijji=function(){return(ym=t.dynCall_iiijji=t.asm.ph).apply(null,arguments)},mm=t.dynCall_iiiijj=function(){return(mm=t.dynCall_iiiijj=t.asm.qh).apply(null,arguments)},bm=t.dynCall_viiijiii=function(){return(bm=t.dynCall_viiijiii=t.asm.rh).apply(null,arguments)},gm=t.dynCall_vijji=function(){return(gm=t.dynCall_vijji=t.asm.sh).apply(null,arguments)},vm=t.dynCall_jiiiij=function(){return(vm=t.dynCall_jiiiij=t.asm.th).apply(null,arguments)},wm=t.dynCall_jiijiiiii=function(){return(wm=t.dynCall_jiijiiiii=t.asm.uh).apply(null,arguments)},jm=t.dynCall_jiijiijiii=function(){return(jm=t.dynCall_jiijiijiii=t.asm.vh).apply(null,arguments)},Bm=t.dynCall_jiijjiii=function(){return(Bm=t.dynCall_jiijjiii=t.asm.wh).apply(null,arguments)},Tm=t.dynCall_jiiijii=function(){return(Tm=t.dynCall_jiiijii=t.asm.xh).apply(null,arguments)},Sm=t.dynCall_jiijijii=function(){return(Sm=t.dynCall_jiijijii=t.asm.yh).apply(null,arguments)},Im=t.dynCall_viiijjij=function(){return(Im=t.dynCall_viiijjij=t.asm.zh).apply(null,arguments)},Am=t.dynCall_vijijjiij=function(){return(Am=t.dynCall_vijijjiij=t.asm.Ah).apply(null,arguments)},Dm=t.dynCall_viijjij=function(){return(Dm=t.dynCall_viijjij=t.asm.Bh).apply(null,arguments)},Fm=t.dynCall_viiijjiij=function(){return(Fm=t.dynCall_viiijjiij=t.asm.Ch).apply(null,arguments)},Om=t.dynCall_viiiijjjj=function(){return(Om=t.dynCall_viiiijjjj=t.asm.Dh).apply(null,arguments)},km=t.dynCall_viijiiiiij=function(){return(km=t.dynCall_viijiiiiij=t.asm.Eh).apply(null,arguments)},Cm=t.dynCall_viijiiiijj=function(){return(Cm=t.dynCall_viijiiiijj=t.asm.Fh).apply(null,arguments)},Mm=t.dynCall_viiijiiiijjj=function(){return(Mm=t.dynCall_viiijiiiijjj=t.asm.Gh).apply(null,arguments)},Um=t.dynCall_viijijiiiijjj=function(){return(Um=t.dynCall_viijijiiiijjj=t.asm.Hh).apply(null,arguments)},Em=t.dynCall_viiiiijiiii=function(){return(Em=t.dynCall_viiiiijiiii=t.asm.Ih).apply(null,arguments)},Rm=t.dynCall_iiijii=function(){return(Rm=t.dynCall_iiijii=t.asm.Jh).apply(null,arguments)},xm=t.dynCall_fiijii=function(){return(xm=t.dynCall_fiijii=t.asm.Kh).apply(null,arguments)},Vm=t.dynCall_diijii=function(){return(Vm=t.dynCall_diijii=t.asm.Lh).apply(null,arguments)},Nm=t.dynCall_iiiiiiijii=function(){return(Nm=t.dynCall_iiiiiiijii=t.asm.Mh).apply(null,arguments)},Pm=t.dynCall_viiiiji=function(){return(Pm=t.dynCall_viiiiji=t.asm.Nh).apply(null,arguments)},Lm=t.dynCall_jiiiijii=function(){return(Lm=t.dynCall_jiiiijii=t.asm.Oh).apply(null,arguments)},qm=t.dynCall_jiiijiii=function(){return(qm=t.dynCall_jiiijiii=t.asm.Ph).apply(null,arguments)},Hm=t.dynCall_jiiiiijiiii=function(){return(Hm=t.dynCall_jiiiiijiiii=t.asm.Qh).apply(null,arguments)},zm=t.dynCall_jj=function(){return(zm=t.dynCall_jj=t.asm.Rh).apply(null,arguments)},Wm=t.dynCall_jd=function(){return(Wm=t.dynCall_jd=t.asm.Sh).apply(null,arguments)},Ym=t.dynCall_jf=function(){return(Ym=t.dynCall_jf=t.asm.Th).apply(null,arguments)},Gm=t.dynCall_iijjj=function(){return(Gm=t.dynCall_iijjj=t.asm.Uh).apply(null,arguments)},$m=t.dynCall_vijijiiiijjj=function(){return($m=t.dynCall_vijijiiiijjj=t.asm.Vh).apply(null,arguments)},Km=t.dynCall_iiiiiiji=function(){return(Km=t.dynCall_iiiiiiji=t.asm.Wh).apply(null,arguments)},Jm=t.dynCall_iiiiiiiiji=function(){return(Jm=t.dynCall_iiiiiiiiji=t.asm.Xh).apply(null,arguments)},Xm=t.dynCall_jijijjij=function(){return(Xm=t.dynCall_jijijjij=t.asm.Yh).apply(null,arguments)},Zm=t.dynCall_viijjj=function(){return(Zm=t.dynCall_viijjj=t.asm.Zh).apply(null,arguments)},Qm=t.dynCall_vijjij=function(){return(Qm=t.dynCall_vijjij=t.asm._h).apply(null,arguments)},eb=t.dynCall_viijjji=function(){return(eb=t.dynCall_viijjji=t.asm.$h).apply(null,arguments)},tb=t.dynCall_iiiiiij=function(){return(tb=t.dynCall_iiiiiij=t.asm.ai).apply(null,arguments)},rb=t.dynCall_iiiiiiiiiiji=function(){return(rb=t.dynCall_iiiiiiiiiiji=t.asm.bi).apply(null,arguments)},ib=t.dynCall_jiiiiiii=function(){return(ib=t.dynCall_jiiiiiii=t.asm.ci).apply(null,arguments)},nb=t.dynCall_jijj=function(){return(nb=t.dynCall_jijj=t.asm.di).apply(null,arguments)},sb=t.dynCall_viiiijiiiiiiii=function(){return(sb=t.dynCall_viiiijiiiiiiii=t.asm.ei).apply(null,arguments)},ob=t.dynCall_ij=function(){return(ob=t.dynCall_ij=t.asm.fi).apply(null,arguments)},ab=t.dynCall_jjj=function(){return(ab=t.dynCall_jjj=t.asm.gi).apply(null,arguments)},ub=t.dynCall_vjii=function(){return(ub=t.dynCall_vjii=t.asm.hi).apply(null,arguments)},cb=t.dynCall_jjjjjjd=function(){return(cb=t.dynCall_jjjjjjd=t.asm.ii).apply(null,arguments)},lb=t.dynCall_vjiiii=function(){return(lb=t.dynCall_vjiiii=t.asm.ji).apply(null,arguments)},db=t.dynCall_viiiiijiii=function(){return(db=t.dynCall_viiiiijiii=t.asm.ki).apply(null,arguments)},fb=t.dynCall_jiij=function(){return(fb=t.dynCall_jiij=t.asm.li).apply(null,arguments)},hb=t.dynCall_iiiijjii=function(){return(hb=t.dynCall_iiiijjii=t.asm.mi).apply(null,arguments)},pb=t.dynCall_iiiiijji=function(){return(pb=t.dynCall_iiiiijji=t.asm.ni).apply(null,arguments)},_b=t.dynCall_viiijjii=function(){return(_b=t.dynCall_viiijjii=t.asm.oi).apply(null,arguments)},yb=t.dynCall_viiiijji=function(){return(yb=t.dynCall_viiiijji=t.asm.pi).apply(null,arguments)},mb=t.dynCall_viiiijjii=function(){return(mb=t.dynCall_viiiijjii=t.asm.qi).apply(null,arguments)},bb=t.dynCall_viiiiijji=function(){return(bb=t.dynCall_viiiiijji=t.asm.ri).apply(null,arguments)},gb=t.dynCall_iiiiiijji=function(){return(gb=t.dynCall_iiiiiijji=t.asm.si).apply(null,arguments)},vb=t.dynCall_iiiiijjj=function(){return(vb=t.dynCall_iiiiijjj=t.asm.ti).apply(null,arguments)},wb=t.dynCall_jijiiii=function(){return(wb=t.dynCall_jijiiii=t.asm.ui).apply(null,arguments)},jb=t.dynCall_viiijiji=function(){return(jb=t.dynCall_viiijiji=t.asm.vi).apply(null,arguments)},Bb=t.dynCall_iiijjjii=function(){return(Bb=t.dynCall_iiijjjii=t.asm.wi).apply(null,arguments)},Tb=t.dynCall_iiiiijjji=function(){return(Tb=t.dynCall_iiiiijjji=t.asm.xi).apply(null,arguments)},Sb=t.dynCall_iiiijjj=function(){return(Sb=t.dynCall_iiiijjj=t.asm.yi).apply(null,arguments)},Ib=t.dynCall_iidj=function(){return(Ib=t.dynCall_iidj=t.asm.zi).apply(null,arguments)},Ab=t.dynCall_ijji=function(){return(Ab=t.dynCall_ijji=t.asm.Ai).apply(null,arguments)},Db=t.dynCall_iiiiiiiij=function(){return(Db=t.dynCall_iiiiiiiij=t.asm.Bi).apply(null,arguments)},Fb=t.dynCall_iiiiiiij=function(){return(Fb=t.dynCall_iiiiiiij=t.asm.Ci).apply(null,arguments)},Ob=t.dynCall_iiiiiiiiiiiij=function(){return(Ob=t.dynCall_iiiiiiiiiiiij=t.asm.Di).apply(null,arguments)},kb=t.dynCall_iiiiiiiji=function(){return(kb=t.dynCall_iiiiiiiji=t.asm.Ei).apply(null,arguments)},Cb=t.dynCall_iiiidjj=function(){return(Cb=t.dynCall_iiiidjj=t.asm.Fi).apply(null,arguments)},Mb=t.dynCall_jiiiiiijii=function(){return(Mb=t.dynCall_jiiiiiijii=t.asm.Gi).apply(null,arguments)},Ub=t.dynCall_iiiijji=function(){return(Ub=t.dynCall_iiiijji=t.asm.Hi).apply(null,arguments)},Eb=t.dynCall_jiiiiii=function(){return(Eb=t.dynCall_jiiiiii=t.asm.Ii).apply(null,arguments)},Rb=t.dynCall_iijiji=function(){return(Rb=t.dynCall_iijiji=t.asm.Ji).apply(null,arguments)},xb=t.dynCall_vjiiiji=function(){return(xb=t.dynCall_vjiiiji=t.asm.Ki).apply(null,arguments)},Vb=t.dynCall_jjjii=function(){return(Vb=t.dynCall_jjjii=t.asm.Li).apply(null,arguments)},Nb=t.dynCall_jji=function(){return(Nb=t.dynCall_jji=t.asm.Mi).apply(null,arguments)},Pb=t.dynCall_viiijijiji=function(){return(Pb=t.dynCall_viiijijiji=t.asm.Ni).apply(null,arguments)},Lb=t.dynCall_jiiijj=function(){return(Lb=t.dynCall_jiiijj=t.asm.Oi).apply(null,arguments)},qb=t.dynCall_iiiijii=function(){return(qb=t.dynCall_iiiijii=t.asm.Pi).apply(null,arguments)},Hb=t.dynCall_viiiijii=function(){return(Hb=t.dynCall_viiiijii=t.asm.Qi).apply(null,arguments)},zb=t.dynCall_iijiii=function(){return(zb=t.dynCall_iijiii=t.asm.Ri).apply(null,arguments)},Wb=t.dynCall_jiiiiji=function(){return(Wb=t.dynCall_jiiiiji=t.asm.Si).apply(null,arguments)},Yb=t.dynCall_vijiijj=function(){return(Yb=t.dynCall_vijiijj=t.asm.Ti).apply(null,arguments)},Gb=t.dynCall_vifiijj=function(){return(Gb=t.dynCall_vifiijj=t.asm.Ui).apply(null,arguments)},$b=t.dynCall_vidiijj=function(){return($b=t.dynCall_vidiijj=t.asm.Vi).apply(null,arguments)},Kb=t.dynCall_viiiiij=function(){return(Kb=t.dynCall_viiiiij=t.asm.Wi).apply(null,arguments)},Jb=t.dynCall_ijjiii=function(){return(Jb=t.dynCall_ijjiii=t.asm.Xi).apply(null,arguments)},Xb=t.dynCall_vijijjji=function(){return(Xb=t.dynCall_vijijjji=t.asm.Yi).apply(null,arguments)},Zb=t.dynCall_viijiijj=function(){return(Zb=t.dynCall_viijiijj=t.asm.Zi).apply(null,arguments)},Qb=t.dynCall_viijijj=function(){return(Qb=t.dynCall_viijijj=t.asm._i).apply(null,arguments)},eg=t.dynCall_viiiiijjji=function(){return(eg=t.dynCall_viiiiijjji=t.asm.$i).apply(null,arguments)},tg=t.dynCall_iiijiijj=function(){return(tg=t.dynCall_iiijiijj=t.asm.aj).apply(null,arguments)},rg=t.dynCall_viiijijjj=function(){return(rg=t.dynCall_viiijijjj=t.asm.bj).apply(null,arguments)},ig=t.dynCall_iijiijj=function(){return(ig=t.dynCall_iijiijj=t.asm.cj).apply(null,arguments)},ng=t.dynCall_viiijjjji=function(){return(ng=t.dynCall_viiijjjji=t.asm.dj).apply(null,arguments)},sg=t.dynCall_viiiijiii=function(){return(sg=t.dynCall_viiiijiii=t.asm.ej).apply(null,arguments)},og=t.dynCall_viijiiii=function(){return(og=t.dynCall_viijiiii=t.asm.fj).apply(null,arguments)},ag=t.dynCall_vijjiiii=function(){return(ag=t.dynCall_vijjiiii=t.asm.gj).apply(null,arguments)},ug=t.dynCall_vijijjiiiii=function(){return(ug=t.dynCall_vijijjiiiii=t.asm.hj).apply(null,arguments)},cg=t.dynCall_vijjiiiii=function(){return(cg=t.dynCall_vijjiiiii=t.asm.ij).apply(null,arguments)},lg=t.dynCall_iiijjji=function(){return(lg=t.dynCall_iiijjji=t.asm.jj).apply(null,arguments)},dg=t.dynCall_viiiijjj=function(){return(dg=t.dynCall_viiiijjj=t.asm.kj).apply(null,arguments)},fg=t.dynCall_viiiiijjj=function(){return(fg=t.dynCall_viiiiijjj=t.asm.lj).apply(null,arguments)},hg=t.dynCall_viijiji=function(){return(hg=t.dynCall_viijiji=t.asm.mj).apply(null,arguments)};function J1(o){var a=A();try{X(o)()}catch(c){if(S(a),c!==c+0&&c!=="longjmp")throw c;T(1,0)}}function X1(o,a,c){var l=A();try{X(o)(a,c)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function Z1(o,a){var c=A();try{return X(o)(a)}catch(l){if(S(c),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function Q1(o,a,c){var l=A();try{return X(o)(a,c)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function eB(o,a){var c=A();try{X(o)(a)}catch(l){if(S(c),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function tB(o,a,c,l){var d=A();try{return X(o)(a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function rB(o,a,c,l,d,f){var h=A();try{return X(o)(a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function iB(o,a,c,l,d){var f=A();try{X(o)(a,c,l,d)}catch(h){if(S(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function nB(o,a,c,l,d){var f=A();try{return X(o)(a,c,l,d)}catch(h){if(S(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function sB(o,a,c,l){var d=A();try{return X(o)(a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function oB(o,a,c,l){var d=A();try{return X(o)(a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function aB(o,a,c,l){var d=A();try{X(o)(a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function uB(o,a,c,l){var d=A();try{X(o)(a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function cB(o,a,c,l){var d=A();try{X(o)(a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function lB(o,a,c,l,d,f,h,_){var y=A();try{return X(o)(a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function dB(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{return X(o)(a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function fB(o){var a=A();try{return X(o)()}catch(c){if(S(a),c!==c+0&&c!=="longjmp")throw c;T(1,0)}}function hB(o,a,c,l,d,f,h,_){var y=A();try{X(o)(a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function pB(o,a,c,l,d,f,h){var _=A();try{return X(o)(a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function _B(o,a,c,l,d,f,h,_,y,b,g,I){var k=A();try{return X(o)(a,c,l,d,f,h,_,y,b,g,I)}catch(E){if(S(k),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function yB(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{X(o)(a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function mB(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y,ve){var Fe=A();try{X(o)(a,c,l,d,f,h,_,y,b,g,I,k,E,Y,ve)}catch(tt){if(S(Fe),tt!==tt+0&&tt!=="longjmp")throw tt;T(1,0)}}function bB(o,a,c,l,d,f,h){var _=A();try{X(o)(a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function gB(o,a,c,l,d,f){var h=A();try{return X(o)(a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function vB(o,a,c,l,d,f,h,_,y){var b=A();try{X(o)(a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function wB(o,a,c){var l=A();try{return X(o)(a,c)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function jB(o,a,c){var l=A();try{return X(o)(a,c)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function BB(o,a,c,l,d,f){var h=A();try{X(o)(a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function TB(o,a,c,l,d,f,h,_,y){var b=A();try{return X(o)(a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function SB(o,a,c,l,d){var f=A();try{return X(o)(a,c,l,d)}catch(h){if(S(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function IB(o,a,c,l,d){var f=A();try{return X(o)(a,c,l,d)}catch(h){if(S(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function AB(o,a,c,l,d,f){var h=A();try{X(o)(a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function DB(o,a,c){var l=A();try{X(o)(a,c)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function FB(o,a,c){var l=A();try{X(o)(a,c)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function OB(o,a){var c=A();try{return X(o)(a)}catch(l){if(S(c),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function kB(o,a,c,l){var d=A();try{return X(o)(a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function CB(o,a){var c=A();try{return X(o)(a)}catch(l){if(S(c),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function MB(o,a,c,l){var d=A();try{X(o)(a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function UB(o,a,c,l){var d=A();try{X(o)(a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function EB(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y){var ve=A();try{return X(o)(a,c,l,d,f,h,_,y,b,g,I,k,E,Y)}catch(Fe){if(S(ve),Fe!==Fe+0&&Fe!=="longjmp")throw Fe;T(1,0)}}function RB(o,a,c){var l=A();try{return X(o)(a,c)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function xB(o,a,c,l,d,f,h,_,y,b,g,I,k,E){var Y=A();try{X(o)(a,c,l,d,f,h,_,y,b,g,I,k,E)}catch(ve){if(S(Y),ve!==ve+0&&ve!=="longjmp")throw ve;T(1,0)}}function VB(o,a,c,l,d,f,h,_,y,b){var g=A();try{X(o)(a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function NB(o){var a=A();try{return X(o)()}catch(c){if(S(a),c!==c+0&&c!=="longjmp")throw c;T(1,0)}}function PB(o){var a=A();try{return X(o)()}catch(c){if(S(a),c!==c+0&&c!=="longjmp")throw c;T(1,0)}}function LB(o,a){var c=A();try{return X(o)(a)}catch(l){if(S(c),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function qB(o,a){var c=A();try{return X(o)(a)}catch(l){if(S(c),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function HB(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y,ve,Fe,tt,P,oe,Ue){var Oe=A();try{return X(o)(a,c,l,d,f,h,_,y,b,g,I,k,E,Y,ve,Fe,tt,P,oe,Ue)}catch(Pt){if(S(Oe),Pt!==Pt+0&&Pt!=="longjmp")throw Pt;T(1,0)}}function zB(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y,ve,Fe,tt,P,oe){var Ue=A();try{return X(o)(a,c,l,d,f,h,_,y,b,g,I,k,E,Y,ve,Fe,tt,P,oe)}catch(Oe){if(S(Ue),Oe!==Oe+0&&Oe!=="longjmp")throw Oe;T(1,0)}}function WB(o,a,c){var l=A();try{return X(o)(a,c)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function YB(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{X(o)(a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function GB(o,a,c,l){var d=A();try{return X(o)(a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function $B(o,a,c,l,d,f,h,_,y,b){var g=A();try{X(o)(a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function KB(o,a,c,l,d,f,h,_,y,b,g,I){var k=A();try{X(o)(a,c,l,d,f,h,_,y,b,g,I)}catch(E){if(S(k),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function JB(o,a,c,l,d){var f=A();try{return xe(o,a,c,l,d)}catch(h){if(S(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function XB(o,a,c,l,d,f,h){var _=A();try{Q_(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function ZB(o,a){var c=A();try{return K_(o,a)}catch(l){if(S(c),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function QB(o,a,c){var l=A();try{return hy(o,a,c)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function eT(o,a,c,l,d,f,h){var _=A();try{Fr(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function tT(o,a,c,l,d,f,h){var _=A();try{return Ve(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function rT(o,a,c,l,d,f,h,_,y){var b=A();try{return Xt(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function iT(o,a,c,l){var d=A();try{return J_(o,a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function nT(o,a,c,l,d,f){var h=A();try{ty(o,a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function sT(o){var a=A();try{return Hr(o)}catch(c){if(S(a),c!==c+0&&c!=="longjmp")throw c;T(1,0)}}function oT(o,a,c,l,d){var f=A();try{X_(o,a,c,l,d)}catch(h){if(S(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function aT(o,a,c,l,d,f,h,_){var y=A();try{ry(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function uT(o,a,c,l,d,f,h){var _=A();try{return iy(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function cT(o,a,c,l,d,f,h,_){var y=A();try{Z_(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function lT(o,a,c,l,d){var f=A();try{return ay(o,a,c,l,d)}catch(h){if(S(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function dT(o,a,c,l){var d=A();try{dy(o,a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function fT(o,a,c,l,d,f,h){var _=A();try{fy(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function hT(o,a,c,l,d,f){var h=A();try{ny(o,a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function pT(o,a,c,l,d,f,h,_,y,b){var g=A();try{oy(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function _T(o,a,c,l,d,f,h,_,y){var b=A();try{uy(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function yT(o,a,c,l){var d=A();try{return cy(o,a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function mT(o,a,c,l,d){var f=A();try{ly(o,a,c,l,d)}catch(h){if(S(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function bT(o,a,c,l,d,f,h,_){var y=A();try{ey(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function gT(o,a,c,l,d,f,h,_,y){var b=A();try{Zm(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function vT(o,a,c,l,d,f,h,_){var y=A();try{return Jb(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function wT(o,a,c,l,d,f){var h=A();try{_y(o,a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function jT(o,a,c,l,d,f,h){var _=A();try{py(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function BT(o,a,c){var l=A();try{yy(o,a,c)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function TT(o,a,c,l,d){var f=A();try{return my(o,a,c,l,d)}catch(h){if(S(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function ST(o,a,c,l,d,f){var h=A();try{return by(o,a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function IT(o,a,c,l,d,f,h,_){var y=A();try{return mm(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function AT(o,a,c,l,d,f,h,_){var y=A();try{Pm(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function DT(o,a,c,l,d,f,h,_){var y=A();try{return _m(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function FT(o,a,c,l,d,f){var h=A();try{return vy(o,a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function OT(o,a,c,l,d,f){var h=A();try{return Zy(o,a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function kT(o,a,c,l,d,f,h,_){var y=A();try{return ym(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function CT(o,a,c,l,d,f,h,_){var y=A();try{return gy(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function MT(o,a,c,l,d,f,h){var _=A();try{return wy(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function UT(o,a,c,l){var d=A();try{return jy(o,a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function ET(o,a,c,l,d,f,h){var _=A();try{My(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function RT(o,a,c,l,d,f,h,_){var y=A();try{Vy(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function xT(o,a,c,l,d,f,h,_){var y=A();try{return Ny(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function VT(o,a,c,l,d,f,h,_){var y=A();try{return Fy(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function NT(o,a,c,l,d,f,h,_,y){var b=A();try{return Oy(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function PT(o,a,c,l,d,f,h,_){var y=A();try{ky(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function LT(o,a,c,l,d,f,h,_,y){var b=A();try{return Cy(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function qT(o,a,c,l,d,f,h,_){var y=A();try{return Uy(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function HT(o,a,c,l,d,f,h,_,y){var b=A();try{return Ey(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function zT(o,a,c,l,d,f,h,_,y,b){var g=A();try{return Ry(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function WT(o,a,c,l,d,f,h){var _=A();try{return xy(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function YT(o,a,c,l,d,f,h,_,y){var b=A();try{Dy(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function GT(o,a,c,l,d,f,h,_){var y=A();try{Ay(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function $T(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{return Ty(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function KT(o,a,c,l,d,f,h,_,y,b,g,I){var k=A();try{Sy(o,a,c,l,d,f,h,_,y,b,g,I)}catch(E){if(S(k),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function JT(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{Iy(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function XT(o,a,c,l,d,f){var h=A();try{return Py(o,a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function ZT(o,a,c,l,d,f,h){var _=A();try{Ky(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function QT(o,a,c,l,d,f,h,_,y){var b=A();try{return qy(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function eS(o,a,c,l,d,f,h,_,y){var b=A();try{hm(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function tS(o,a,c,l){var d=A();try{return By(o,a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function rS(o,a,c,l,d,f){var h=A();try{return Hy(o,a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function iS(o,a,c,l,d,f,h,_,y){var b=A();try{$y(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function nS(o,a,c,l,d,f){var h=A();try{return zy(o,a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function sS(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{Gy(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function oS(o,a,c,l,d,f){var h=A();try{return cm(o,a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function aS(o,a,c,l,d,f,h,_,y,b){var g=A();try{Yy(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function uS(o,a,c,l,d,f,h){var _=A();try{return Xy(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function cS(o,a,c,l,d,f,h){var _=A();try{Ly(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function lS(o,a,c,l,d,f,h,_,y){var b=A();try{Jy(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function dS(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y){var ve=A();try{return Wy(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y)}catch(Fe){if(S(ve),Fe!==Fe+0&&Fe!=="longjmp")throw Fe;T(1,0)}}function fS(o,a,c,l,d,f,h,_,y){var b=A();try{return Qy(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function hS(o,a,c,l,d,f,h,_){var y=A();try{sy(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function pS(o,a,c,l,d,f){var h=A();try{em(o,a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function _S(o,a,c,l,d,f,h,_,y){var b=A();try{tm(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function yS(o,a,c,l,d,f,h){var _=A();try{return nm(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function mS(o,a,c,l,d,f,h,_,y,b){var g=A();try{om(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function bS(o,a,c,l,d,f,h,_,y,b){var g=A();try{am(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function gS(o,a,c,l,d,f,h){var _=A();try{return sm(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function vS(o,a,c,l,d,f,h,_,y,b){var g=A();try{um(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function wS(o,a,c,l,d,f,h,_,y){var b=A();try{return im(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function jS(o,a,c,l,d,f,h,_,y){var b=A();try{dm(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function BS(o,a,c,l,d,f,h,_,y){var b=A();try{rm(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function TS(o,a,c,l,d,f,h,_,y){var b=A();try{return pm(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function SS(o,a,c,l,d,f,h,_,y){var b=A();try{bm(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function IS(o,a,c,l,d,f,h){var _=A();try{gm(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function AS(o,a,c,l,d,f,h){var _=A();try{return vm(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function DS(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{Im(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function FS(o,a,c,l,d,f,h,_,y,b,g,I,k){var E=A();try{Am(o,a,c,l,d,f,h,_,y,b,g,I,k)}catch(Y){if(S(E),Y!==Y+0&&Y!=="longjmp")throw Y;T(1,0)}}function OS(o,a,c,l,d,f,h,_,y,b){var g=A();try{Dm(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function kS(o,a,c,l,d,f,h,_,y,b,g,I,k){var E=A();try{Om(o,a,c,l,d,f,h,_,y,b,g,I,k)}catch(Y){if(S(E),Y!==Y+0&&Y!=="longjmp")throw Y;T(1,0)}}function CS(o,a,c,l,d,f,h,_,y,b){var g=A();try{return wm(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function MS(o,a,c,l,d,f,h,_,y,b,g,I){var k=A();try{return jm(o,a,c,l,d,f,h,_,y,b,g,I)}catch(E){if(S(k),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function US(o,a,c,l,d,f,h,_,y,b){var g=A();try{return Bm(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function ES(o,a,c,l,d,f,h,_){var y=A();try{return Tm(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function RS(o,a,c,l,d,f,h,_,y,b){var g=A();try{return Sm(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function xS(o,a,c,l,d,f,h,_,y,b,g,I){var k=A();try{km(o,a,c,l,d,f,h,_,y,b,g,I)}catch(E){if(S(k),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function VS(o,a,c,l,d,f,h,_,y,b,g,I,k){var E=A();try{Cm(o,a,c,l,d,f,h,_,y,b,g,I,k)}catch(Y){if(S(E),Y!==Y+0&&Y!=="longjmp")throw Y;T(1,0)}}function NS(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y,ve){var Fe=A();try{Mm(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y,ve)}catch(tt){if(S(Fe),tt!==tt+0&&tt!=="longjmp")throw tt;T(1,0)}}function PS(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y,ve,Fe,tt){var P=A();try{Um(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y,ve,Fe,tt)}catch(oe){if(S(P),oe!==oe+0&&oe!=="longjmp")throw oe;T(1,0)}}function LS(o,a,c,l,d,f,h,_,y,b,g,I){var k=A();try{Fm(o,a,c,l,d,f,h,_,y,b,g,I)}catch(E){if(S(k),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function qS(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{return Mb(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function HS(o,a,c,l,d,f,h,_,y){var b=A();try{return Ub(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function zS(o,a,c,l,d,f,h,_,y,b,g,I){var k=A();try{Em(o,a,c,l,d,f,h,_,y,b,g,I)}catch(E){if(S(k),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function WS(o,a,c,l,d,f,h,_,y){var b=A();try{return Lm(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function YS(o,a,c,l,d,f,h){var _=A();try{return Rm(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function GS(o,a,c,l,d,f,h){var _=A();try{return xm(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function $S(o,a,c,l,d,f,h){var _=A();try{return Vm(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function KS(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{return Nm(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function JS(o,a,c,l,d,f,h,_,y){var b=A();try{return qm(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function XS(o,a,c,l,d,f,h,_,y,b,g,I){var k=A();try{return Hm(o,a,c,l,d,f,h,_,y,b,g,I)}catch(E){if(S(k),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function ZS(o,a,c){var l=A();try{return zm(o,a,c)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function QS(o,a){var c=A();try{return Wm(o,a)}catch(l){if(S(c),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function eI(o,a){var c=A();try{return Ym(o,a)}catch(l){if(S(c),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function tI(o,a,c,l,d,f,h){var _=A();try{return Eb(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function rI(o,a,c,l,d,f){var h=A();try{return Ab(o,a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function iI(o,a,c,l,d,f,h,_,y){var b=A();try{return Km(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function nI(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{return Jm(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function sI(o,a,c,l,d,f,h,_,y,b){var g=A();try{fm(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function oI(o,a,c,l,d,f,h,_){var y=A();try{return Gm(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function aI(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y,ve,Fe){var tt=A();try{$m(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y,ve,Fe)}catch(P){if(S(tt),P!==P+0&&P!=="longjmp")throw P;T(1,0)}}function uI(o,a,c,l,d,f,h,_,y,b,g,I){var k=A();try{return Xm(o,a,c,l,d,f,h,_,y,b,g,I)}catch(E){if(S(k),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function cI(o,a,c,l,d,f,h,_,y){var b=A();try{Qm(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function lI(o,a,c,l,d,f,h,_,y,b){var g=A();try{return Db(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function dI(o,a,c,l,d,f,h,_,y,b){var g=A();try{eb(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function fI(o,a,c,l,d,f,h,_){var y=A();try{return tb(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function hI(o,a,c,l,d,f,h,_,y,b,g,I,k){var E=A();try{return rb(o,a,c,l,d,f,h,_,y,b,g,I,k)}catch(Y){if(S(E),Y!==Y+0&&Y!=="longjmp")throw Y;T(1,0)}}function pI(o,a,c,l,d,f,h,_){var y=A();try{return ib(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function _I(o,a,c,l,d,f,h,_,y){var b=A();try{return Fb(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function yI(o,a,c,l,d,f,h,_,y,b,g,I,k,E){var Y=A();try{return Ob(o,a,c,l,d,f,h,_,y,b,g,I,k,E)}catch(ve){if(S(Y),ve!==ve+0&&ve!=="longjmp")throw ve;T(1,0)}}function mI(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{db(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function bI(o,a,c,l,d){var f=A();try{return fb(o,a,c,l,d)}catch(h){if(S(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function gI(o,a,c){var l=A();try{return ob(o,a,c)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function vI(o,a,c,l,d,f,h){var _=A();try{lb(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function wI(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y){var ve=A();try{sb(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y)}catch(Fe){if(S(ve),Fe!==Fe+0&&Fe!=="longjmp")throw Fe;T(1,0)}}function jI(o,a,c,l,d){var f=A();try{return ab(o,a,c,l,d)}catch(h){if(S(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function BI(o,a,c,l,d){var f=A();try{ub(o,a,c,l,d)}catch(h){if(S(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function TI(o,a,c,l,d,f,h,_,y,b,g,I){var k=A();try{return cb(o,a,c,l,d,f,h,_,y,b,g,I)}catch(E){if(S(k),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function SI(o,a,c,l,d,f,h,_,y,b){var g=A();try{return hb(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function II(o,a,c,l,d,f,h,_,y,b){var g=A();try{return pb(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function AI(o,a,c,l,d,f,h,_,y,b){var g=A();try{_b(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function DI(o,a,c,l,d,f,h,_,y,b){var g=A();try{yb(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function FI(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{mb(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function OI(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{bb(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function kI(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{return gb(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function CI(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{return Bb(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function MI(o,a,c,l,d,f,h,_,y,b){var g=A();try{jb(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function UI(o,a,c,l,d,f,h,_){var y=A();try{return wb(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function EI(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{return vb(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function RI(o,a,c,l,d,f,h,_,y,b,g,I){var k=A();try{return Tb(o,a,c,l,d,f,h,_,y,b,g,I)}catch(E){if(S(k),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function xI(o,a,c,l,d,f,h,_,y,b){var g=A();try{return Sb(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function VI(o,a,c,l,d){var f=A();try{return Ib(o,a,c,l,d)}catch(h){if(S(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function NI(o,a,c,l,d,f,h,_,y,b){var g=A();try{return kb(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function PI(o,a,c,l,d,f,h,_,y){var b=A();try{return Cb(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function LI(o,a,c,l,d,f,h,_){var y=A();try{return Rb(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function qI(o,a,c,l,d,f,h,_,y){var b=A();try{xb(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function HI(o,a,c,l,d,f,h){var _=A();try{return Vb(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function zI(o,a,c,l){var d=A();try{return Nb(o,a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function WI(o,a,c,l,d,f,h,_,y,b,g,I,k){var E=A();try{Pb(o,a,c,l,d,f,h,_,y,b,g,I,k)}catch(Y){if(S(E),Y!==Y+0&&Y!=="longjmp")throw Y;T(1,0)}}function YI(o,a,c,l,d,f,h,_,y){var b=A();try{lm(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function GI(o,a,c,l,d,f,h,_){var y=A();try{return Lb(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function $I(o,a,c,l,d,f,h,_){var y=A();try{return qb(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function KI(o,a,c,l,d,f,h,_,y){var b=A();try{Hb(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function JI(o,a,c,l,d,f,h){var _=A();try{return zb(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function XI(o,a,c,l,d,f,h,_){var y=A();try{return Wb(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function ZI(o,a,c,l,d,f,h,_,y,b){var g=A();try{Yb(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function QI(o,a,c,l,d,f,h,_,y){var b=A();try{Gb(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function eA(o,a,c,l,d,f,h,_,y){var b=A();try{$b(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function tA(o,a,c,l,d,f,h,_){var y=A();try{Kb(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function rA(o,a,c,l,d,f,h,_,y,b,g,I){var k=A();try{Xb(o,a,c,l,d,f,h,_,y,b,g,I)}catch(E){if(S(k),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function iA(o,a,c,l,d,f){var h=A();try{return nb(o,a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function nA(o,a,c,l,d,f,h,_,y,b){var g=A();try{Qb(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function sA(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{return tg(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function oA(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{Zb(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function aA(o,a,c,l,d,f,h,_,y,b,g,I,k){var E=A();try{eg(o,a,c,l,d,f,h,_,y,b,g,I,k)}catch(Y){if(S(E),Y!==Y+0&&Y!=="longjmp")throw Y;T(1,0)}}function uA(o,a,c,l,d,f,h,_,y,b,g,I,k){var E=A();try{rg(o,a,c,l,d,f,h,_,y,b,g,I,k)}catch(Y){if(S(E),Y!==Y+0&&Y!=="longjmp")throw Y;T(1,0)}}function cA(o,a,c,l,d,f,h,_,y,b){var g=A();try{return ig(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function lA(o,a,c,l,d,f,h,_,y,b){var g=A();try{return lg(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function dA(o,a,c,l,d,f,h,_,y,b,g,I,k){var E=A();try{ng(o,a,c,l,d,f,h,_,y,b,g,I,k)}catch(Y){if(S(E),Y!==Y+0&&Y!=="longjmp")throw Y;T(1,0)}}function fA(o,a,c,l,d,f,h,_,y,b){var g=A();try{sg(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function hA(o,a,c,l,d,f,h,_,y){var b=A();try{og(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function pA(o,a,c,l,d,f,h,_,y){var b=A();try{hg(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function _A(o,a,c,l,d,f,h,_,y,b,g,I,k,E){var Y=A();try{ug(o,a,c,l,d,f,h,_,y,b,g,I,k,E)}catch(ve){if(S(Y),ve!==ve+0&&ve!=="longjmp")throw ve;T(1,0)}}function yA(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{cg(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function mA(o,a,c,l,d,f,h,_,y,b){var g=A();try{ag(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function bA(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{dg(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function gA(o,a,c,l,d,f,h,_,y,b,g,I){var k=A();try{fg(o,a,c,l,d,f,h,_,y,b,g,I)}catch(E){if(S(k),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}t.ccall=Ar;var hu;function pu(o){this.name="ExitStatus",this.message="Program terminated with exit("+o+")",this.status=o}var vA=!1;Dt=function o(){hu||df(),hu||(Dt=o)};function wA(o){var a=t._main,c=0,l=0;try{var d=a(c,l);return jA(d,!0),d}catch(f){return kl(f)}finally{vA=!0}}function df(o){if(o=o||p,_i>0||(Sl(),_i>0))return;function a(){hu||(hu=!0,t.calledRun=!0,!Ye&&(Il(),Al(),n(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),pg&&wA(o),Fl()))}t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),a()},1)):a()}t.run=df;function jA(o,a){Jt=o,xo()||Dl(),BA(o)}function BA(o){Jt=o,xo()||(t.onExit&&t.onExit(o),Ye=!0),B(o,new pu(o))}if(t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();var pg=!0;return t.noInitialRun&&(pg=!1),df(),e.ready}})(),$1=eE;var za=class extends E_{constructor(e,t,i,n){super(e,t);this.mainModuleURL=i,this.pthreadWorkerURL=n}locateFile(e,t){if(e.endsWith(".wasm"))return this.mainModuleURL;if(e.endsWith(".worker.js")){if(!this.pthreadWorkerURL)throw new Error("Missing DuckDB worker URL!");return this.pthreadWorkerURL}throw new Error(`WASM instantiation requested unexpected file: prefix=${t} path=${e}`)}instantiateWasm(e,t){globalThis.DUCKDB_RUNTIME=this._runtime;let i=this.onInstantiationProgress;if(typeof TransformStream=="function"&&ReadableStream.prototype.pipeThrough&&WebAssembly.instantiateStreaming){let s=(async()=>{var Se;let u=new Request(this.mainModuleURL),p=await fetch(u),m=p.headers.get("content-length"),B=m&&parseInt(m,10)||0,O=new Date,R={startedAt:O,updatedAt:O,bytesTotal:B||0,bytesLoaded:0},W={transform(ye,Ee){R.bytesLoaded+=ye.byteLength;let qe=new Date;if(qe.getTime()-R.updatedAt.getTime()<20){R.updatedAt=qe,Ee.enqueue(ye);return}for(let Tt of i)Tt(R);Ee.enqueue(ye)}},N=new TransformStream(W);return new Response((Se=p.body)==null?void 0:Se.pipeThrough(N),p)})();WebAssembly.instantiateStreaming(s,e).then(u=>{t(u.instance,u.module)})}else{let n=new XMLHttpRequest,s=this.mainModuleURL,u=new Date,p={startedAt:u,updatedAt:u,bytesTotal:0,bytesLoaded:0};n.open("GET",s),n.responseType="arraybuffer",n.onerror=m=>{throw this.logger.log({timestamp:new Date,level:4,origin:3,topic:5,event:2,value:"Failed to load WASM: "+m}),new Error(m.toString())},n.onprogress=m=>{p.bytesTotal=m.total,p.bytesLoaded=m.loaded;let B=new Date;if(B.getTime()-p.updatedAt.getTime()<20){p.updatedAt=B;return}for(let O of i)O(p)},n.onload=()=>{WebAssembly.instantiate(n.response,e).then(m=>{t(m.instance,m.module)}).catch(m=>{throw this.logger.log({timestamp:new Date,level:4,origin:3,topic:5,event:2,value:"Failed to instantiate WASM: "+m}),new Error(m)})},n.send()}return[]}};var z_=class extends za{constructor(e,t,i,n=null){super(e,t,i,n)}instantiateImpl(e){return $1(En(zr({},e),{instantiateWasm:this.instantiateWasm.bind(this),locateFile:this.locateFile.bind(this)}))}};var tE=(()=>{var r=import.meta.url;return function(e){e=e||{};var t=typeof e<"u"?e:{},i=Object.assign,n,s;t.ready=new Promise(function(v,j){n=v,s=j});var u=i({},t),p=[],m="./this.program",B=(v,j)=>{throw j},O=typeof window=="object",R=typeof importScripts=="function",W=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",N="";function Se(v){return t.locateFile?t.locateFile(v,N):N+v}var ye,Ee,qe,Tt;function Nr(v){if(v instanceof Is)return;ge("exiting due to exception: "+v)}var Sr,Ir,Pr;W?(R?N=Ha().dirname(N)+"/":N=__dirname+"/",Pr=function(){Ir||(Sr=H_(),Ir=Ha())},ye=function(j,D){return Pr(),j=Ir.normalize(j),Sr.readFileSync(j,D?null:"utf8")},qe=function(j){var D=ye(j,!0);return D.buffer||(D=new Uint8Array(D)),D},Ee=function(j,D,C){Pr(),j=Ir.normalize(j),Sr.readFile(j,function(x,te){x?C(x):D(te.buffer)})},process.argv.length>1&&(m=process.argv[1].replace(/\\/g,"/")),p=process.argv.slice(2),process.on("uncaughtException",function(v){if(!(v instanceof Is))throw v}),process.on("unhandledRejection",function(v){throw v}),B=(v,j)=>{if(Ro())throw process.exitCode=v,j;Nr(j),process.exit(v)},t.inspect=function(){return"[Emscripten Module object]"}):(O||R)&&(R?N=self.location.href:typeof document<"u"&&document.currentScript&&(N=document.currentScript.src),r&&(N=r),N.indexOf("blob:")!==0?N=N.substr(0,N.replace(/[?#].*/,"").lastIndexOf("/")+1):N="",ye=function(v){var j=new XMLHttpRequest;return j.open("GET",v,!1),j.send(null),j.responseText},R&&(qe=function(v){var j=new XMLHttpRequest;return j.open("GET",v,!1),j.responseType="arraybuffer",j.send(null),new Uint8Array(j.response)}),Ee=function(v,j,D){var C=new XMLHttpRequest;C.open("GET",v,!0),C.responseType="arraybuffer",C.onload=function(){if(C.status==200||C.status==0&&C.response){j(C.response);return}D()},C.onerror=D,C.send(null)},Tt=v=>document.title=v);var jn=t.print||console.log.bind(console),ge=t.printErr||console.warn.bind(console);i(t,u),u=null,t.arguments&&(p=t.arguments),t.thisProgram&&(m=t.thisProgram),t.quit&&(B=t.quit);var Ne;t.wasmBinary&&(Ne=t.wasmBinary);var ze=t.noExitRuntime||!0;typeof WebAssembly!="object"&&Dt("no native wasm support detected");var tr,Vt=!1,rr;function Kt(v,j){v||Dt(j)}function Ye(v){var j=t["_"+v];return j}function Jt(v,j,D,C,x){var te={string:function(S){var Nt=0;if(S!=null&&S!==0){var Ut=(S.length<<2)+1;Nt=Xo(Ut),os(S,Nt,Ut)}return Nt},array:function(S){var Nt=Xo(S.length);return ko(S,Nt),Nt}};function J(S){return j==="string"?Ar(S):j==="boolean"?Boolean(S):S}var $=Ye(v),ue=[],Re=0;if(C)for(var Me=0;Me<C.length;Me++){var Mt=te[D[Me]];Mt?(Re===0&&(Re=lu()),ue[Me]=Mt(C[Me])):ue[Me]=C[Me]}var T=$.apply(null,ue);function A(S){return Re!==0&&du(Re),J(S)}return T=A(T),T}var Bn=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function Wa(v,j,D){for(var C=j+D,x=j;v[x]&&!(x>=C);)++x;if(x-j>16&&v.subarray&&Bn)return Bn.decode(v.subarray(j,x));for(var te="";j<x;){var J=v[j++];if(!(J&128)){te+=String.fromCharCode(J);continue}var $=v[j++]&63;if((J&224)==192){te+=String.fromCharCode((J&31)<<6|$);continue}var ue=v[j++]&63;if((J&240)==224?J=(J&15)<<12|$<<6|ue:J=(J&7)<<18|$<<12|ue<<6|v[j++]&63,J<65536)te+=String.fromCharCode(J);else{var Re=J-65536;te+=String.fromCharCode(55296|Re>>10,56320|Re&1023)}}return te}function Ar(v,j){return v?Wa(Lr,v,j):""}function Oo(v,j,D,C){if(!(C>0))return 0;for(var x=D,te=D+C-1,J=0;J<v.length;++J){var $=v.charCodeAt(J);if($>=55296&&$<=57343){var ue=v.charCodeAt(++J);$=65536+(($&1023)<<10)|ue&1023}if($<=127){if(D>=te)break;j[D++]=$}else if($<=2047){if(D+1>=te)break;j[D++]=192|$>>6,j[D++]=128|$&63}else if($<=65535){if(D+2>=te)break;j[D++]=224|$>>12,j[D++]=128|$>>6&63,j[D++]=128|$&63}else{if(D+3>=te)break;j[D++]=240|$>>18,j[D++]=128|$>>12&63,j[D++]=128|$>>6&63,j[D++]=128|$&63}}return j[D]=0,D-x}function os(v,j,D){return Oo(v,Lr,j,D)}function Dr(v){for(var j=0,D=0;D<v.length;++D){var C=v.charCodeAt(D);C>=55296&&C<=57343&&(C=65536+((C&1023)<<10)|v.charCodeAt(++D)&1023),C<=127?++j:C<=2047?j+=2:C<=65535?j+=3:j+=4}return j}function ko(v,j){Tn.set(v,j)}function Co(v,j,D){for(var C=0;C<v.length;++C)Tn[j++>>0]=v.charCodeAt(C);D||(Tn[j>>0]=0)}function vl(v,j){return v%j>0&&(v+=j-v%j),v}var Mo,Tn,Lr,ki,ir,re,Sn,Ya,Q;function Ga(v){Mo=v,t.HEAP8=Tn=new Int8Array(v),t.HEAP16=ki=new Int16Array(v),t.HEAP32=re=new Int32Array(v),t.HEAPU8=Lr=new Uint8Array(v),t.HEAPU16=ir=new Uint16Array(v),t.HEAPU32=Sn=new Uint32Array(v),t.HEAPF32=Ya=new Float32Array(v),t.HEAPF64=Q=new Float64Array(v)}var Y_=t.INITIAL_MEMORY||16777216,$a,Uo=[],wl=[],Ka=[],Eo=[],Ja=!1,jl=!1,Xa=0;function Ro(){return ze||Xa>0}function Bl(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)Al(t.preRun.shift());An(Uo)}function Tl(){Ja=!0,An(wl)}function xo(){An(Ka)}function Sl(){jl=!0}function Il(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)Fl(t.postRun.shift());An(Eo)}function Al(v){Uo.unshift(v)}function Dl(v){wl.unshift(v)}function Fl(v){Eo.unshift(v)}var pi=0,Vo=null,In=null;function _i(v){pi++,t.monitorRunDependencies&&t.monitorRunDependencies(pi)}function No(v){if(pi--,t.monitorRunDependencies&&t.monitorRunDependencies(pi),pi==0&&(Vo!==null&&(clearInterval(Vo),Vo=null),In)){var j=In;In=null,j()}}t.preloadedImages={},t.preloadedAudios={};function Dt(v){t.onAbort&&t.onAbort(v),v="Aborted("+v+")",ge(v),Vt=!0,rr=1,v+=". Build with -s ASSERTIONS=1 for more info.";var j=new WebAssembly.RuntimeError(v);throw s(j),j}var Ol="data:application/octet-stream;base64,";function Za(v){return v.startsWith(Ol)}var Ke;t.locateFile?(Ke="./duckdb-eh.wasm",Za(Ke)||(Ke=Se(Ke))):Ke=new URL("./duckdb-eh.wasm",import.meta.url).toString();function Qa(v){try{if(v==Ke&&Ne)return new Uint8Array(Ne);if(qe)return qe(v);throw"both async and sync fetching of the wasm failed"}catch(j){Dt(j)}}function eu(){return!Ne&&(O||R)&&typeof fetch=="function"?fetch(Ke,{credentials:"same-origin"}).then(function(v){if(!v.ok)throw"failed to load wasm binary file at '"+Ke+"'";return v.arrayBuffer()}).catch(function(){return Qa(Ke)}):Promise.resolve().then(function(){return Qa(Ke)})}function Ht(){var v={a:Mn};function j(J,$){var ue=J.exports;t.asm=ue,tr=t.asm.ea,Ga(tr.buffer),$a=t.asm.ha,Dl(t.asm.fa),No("wasm-instantiate")}_i("wasm-instantiate");function D(J){j(J.instance)}function C(J){return eu().then(function($){return WebAssembly.instantiate($,v)}).then(function($){return $}).then(J,function($){ge("failed to asynchronously prepare wasm: "+$),Dt($)})}function x(){return!Ne&&typeof WebAssembly.instantiateStreaming=="function"&&!Za(Ke)&&typeof fetch=="function"?fetch(Ke,{credentials:"same-origin"}).then(function(J){var $=WebAssembly.instantiateStreaming(J,v);return $.then(D,function(ue){return ge("wasm streaming compile failed: "+ue),ge("falling back to ArrayBuffer instantiation"),C(D)})}):C(D)}if(t.instantiateWasm)try{var te=t.instantiateWasm(v,j);return te}catch(J){return ge("Module.instantiateWasm callback failed with error: "+J),!1}return x().catch(s),{}}function An(v){for(;v.length>0;){var j=v.shift();if(typeof j=="function"){j(t);continue}var D=j.func;typeof D=="number"?j.arg===void 0?tu(D)():tu(D)(j.arg):D(j.arg===void 0?null:j.arg)}}var as=[];function tu(v){var j=as[v];return j||(v>=as.length&&(as.length=v+1),as[v]=j=$a.get(v)),j}function us(v){if(v instanceof Is||v=="unwind")return rr;B(1,v)}function cs(v,j,D,C){Dt("Assertion failed: "+Ar(v)+", at: "+[j?Ar(j):"unknown filename",D,C?Ar(C):"unknown function"])}var X={mappings:{},buffers:[null,[],[]],printChar:function(v,j){var D=X.buffers[v];j===0||j===10?((v===1?jn:ge)(Wa(D,0)),D.length=0):D.push(j)},varargs:void 0,get:function(){X.varargs+=4;var v=re[X.varargs-4>>2];return v},getStr:function(v){var j=Ar(v);return j},get64:function(v,j){return v}};function kl(v,j,D,C,x){}function Cl(v,j){return v=X.getStr(v),X.doAccess(v,j)}function Ml(){ge("missing function: $SOCKFS"),Dt(-1)}function qr(){ge("missing function: $FS"),Dt(-1)}function nr(v){var j=Ml.getSocket(v);if(!j)throw new qr.ErrnoError(8);return j}function ls(v){return re[cu()>>2]=v,v}function Po(v){return(v&255)+"."+(v>>8&255)+"."+(v>>16&255)+"."+(v>>24&255)}function Dn(v){var j="",D=0,C=0,x=0,te=0,J=0,$=0,ue=[v[0]&65535,v[0]>>16,v[1]&65535,v[1]>>16,v[2]&65535,v[2]>>16,v[3]&65535,v[3]>>16],Re=!0,Me="";for($=0;$<5;$++)if(ue[$]!==0){Re=!1;break}if(Re){if(Me=Po(ue[6]|ue[7]<<16),ue[5]===-1)return j="::ffff:",j+=Me,j;if(ue[5]===0)return j="::",Me==="0.0.0.0"&&(Me=""),Me==="0.0.0.1"&&(Me="1"),j+=Me,j}for(D=0;D<8;D++)ue[D]===0&&(D-x>1&&(J=0),x=D,J++),J>C&&(C=J,te=D-C+1);for(D=0;D<8;D++){if(C>1&&ue[D]===0&&D>=te&&D<te+C){D===te&&(j+=":",te===0&&(j+=":"));continue}j+=Number(Jo(ue[D]&65535)).toString(16),j+=D<7?":":""}return j}function ru(v,j){var D=ki[v>>1],C=Jo(ir[v+2>>1]),x;switch(D){case 2:if(j!==16)return{errno:28};x=re[v+4>>2],x=Po(x);break;case 10:if(j!==28)return{errno:28};x=[re[v+8>>2],re[v+12>>2],re[v+16>>2],re[v+20>>2]],x=Dn(x);break;default:return{errno:5}}return{family:D,addr:x,port:C}}function zt(v){for(var j=v.split("."),D=0;D<4;D++){var C=Number(j[D]);if(isNaN(C))return null;j[D]=C}return(j[0]|j[1]<<8|j[2]<<16|j[3]<<24)>>>0}function Fn(v){return parseInt(v)}function Lo(v){var j,D,C,x,te=/^((?=.*::)(?!.*::.+::)(::)?([\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,J=[];if(!te.test(v))return null;if(v==="::")return[0,0,0,0,0,0,0,0];for(v.startsWith("::")?v=v.replace("::","Z:"):v=v.replace("::",":Z:"),v.indexOf(".")>0?(v=v.replace(new RegExp("[.]","g"),":"),j=v.split(":"),j[j.length-4]=Fn(j[j.length-4])+Fn(j[j.length-3])*256,j[j.length-3]=Fn(j[j.length-2])+Fn(j[j.length-1])*256,j=j.slice(0,j.length-2)):j=v.split(":"),C=0,x=0,D=0;D<j.length;D++)if(typeof j[D]=="string")if(j[D]==="Z"){for(x=0;x<8-j.length+1;x++)J[D+x]=0;C=x-1}else J[D+C]=Ts(parseInt(j[D],16));else J[D+C]=j[D];return[J[1]<<16|J[0],J[3]<<16|J[2],J[5]<<16|J[4],J[7]<<16|J[6]]}var Wt={address_map:{id:1,addrs:{},names:{}},lookup_name:function(v){var j=zt(v);if(j!==null||(j=Lo(v),j!==null))return v;var D;if(Wt.address_map.addrs[v])D=Wt.address_map.addrs[v];else{var C=Wt.address_map.id++;Kt(C<65535,"exceeded max address mappings of 65535"),D="172.29."+(C&255)+"."+(C&65280),Wt.address_map.names[D]=v,Wt.address_map.addrs[v]=D}return D},lookup_addr:function(v){return Wt.address_map.names[v]?Wt.address_map.names[v]:null}};function iu(v,j,D){if(D&&v===0)return null;var C=ru(v,j);if(C.errno)throw new qr.ErrnoError(C.errno);return C.addr=Wt.lookup_addr(C.addr)||C.addr,C}function Ul(v,j,D){var C=nr(v),x=iu(j,D);return C.sock_ops.bind(C,x.addr,x.port),0}function El(v,j,D){var C=nr(v),x=iu(j,D);return C.sock_ops.connect(C,x.addr,x.port),0}function Rl(v,j,D){return X.varargs=D,0}function xl(v,j){}function Vl(v,j,D,C){}function Nl(v,j,D){}function Pl(v,j,D){}function ct(v,j){Lr.fill(0,v,v+j)}function qo(v,j,D,C,x){switch(j){case 2:D=zt(D),ct(v,16),x&&(re[x>>2]=16),ki[v>>1]=j,re[v+4>>2]=D,ki[v+2>>1]=Ts(C);break;case 10:D=Lo(D),ct(v,28),x&&(re[x>>2]=28),re[v>>2]=j,re[v+8>>2]=D[0],re[v+12>>2]=D[1],re[v+16>>2]=D[2],re[v+20>>2]=D[3],ki[v+2>>1]=Ts(C);break;default:return 5}return 0}function Ll(v,j,D){var C=nr(v);if(!C.daddr)return-53;var x=qo(j,C.family,Wt.lookup_name(C.daddr),C.dport,D);return 0}function ql(v,j,D,C,x){var te=nr(v);return j===1&&D===4?(re[C>>2]=te.error,re[x>>2]=4,te.error=null,0):-50}function nu(v,j,D){return X.varargs=D,0}function On(v,j){}function Hl(v,j){return v=X.getStr(v),X.doMkdir(v,j)}function Ho(v,j,D){X.varargs=D}function su(v,j,D,C,x,te){var J=nr(v),$=J.sock_ops.recvmsg(J,D);if(!$)return 0;if(x)var ue=qo(x,J.family,Wt.lookup_name($.addr),$.port,te);return Lr.set($.buffer,j),$.buffer.byteLength}function ou(v,j){}function ds(v){}function fs(v,j,D,C,x,te){}function zo(v,j,D){}function Yt(v,j){}function au(v){}function zl(v,j){Dt("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function Wl(v,j){Dt("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function Yl(){Dt("")}var Wo;W?Wo=()=>{var v=process.hrtime();return v[0]*1e3+v[1]/1e6}:Wo=()=>performance.now();var Gl=!0;function $l(v,j){var D;if(v===0)D=Date.now();else if((v===1||v===4)&&Gl)D=Wo();else return ls(28),-1;return re[j>>2]=D/1e3|0,re[j+4>>2]=D%1e3*1e3*1e3|0,0}function Kl(v,j){return globalThis.DUCKDB_RUNTIME.createDirectory(t,v,j)}function uu(v,j){return globalThis.DUCKDB_RUNTIME.checkDirectory(t,v,j)}function Yo(v,j){return globalThis.DUCKDB_RUNTIME.listDirectoryEntries(t,v,j)}function Jl(v,j){return globalThis.DUCKDB_RUNTIME.removeDirectory(t,v,j)}function Xl(v){return globalThis.DUCKDB_RUNTIME.closeFile(t,v)}function Zl(v,j){return globalThis.DUCKDB_RUNTIME.checkFile(t,v,j)}function Ql(v){return globalThis.DUCKDB_RUNTIME.getLastFileModificationTime(t,v)}function ed(v,j,D,C){return globalThis.DUCKDB_RUNTIME.moveFile(t,v,j,D,C)}function td(v,j){return globalThis.DUCKDB_RUNTIME.openFile(t,v,j)}function rd(v,j,D,C){return globalThis.DUCKDB_RUNTIME.readFile(t,v,j,D,C)}function id(v,j){return globalThis.DUCKDB_RUNTIME.truncateFile(t,v,j)}function nd(v,j,D,C){return globalThis.DUCKDB_RUNTIME.writeFile(t,v,j,D,C)}function sd(v,j){return globalThis.DUCKDB_RUNTIME.glob(t,v,j)}function od(v){return globalThis.DUCKDB_RUNTIME.testPlatformFeature(t,v)}function ad(v,j,D,C,x,te){return globalThis.DUCKDB_RUNTIME.callScalarUDF(t,v,j,D,C,x,te)}function ud(){return 2147483648}function cd(v,j,D){Lr.copyWithin(v,j,j+D)}function ld(v){try{return tr.grow(v-Mo.byteLength+65535>>>16),Ga(tr.buffer),1}catch(j){}}function dd(v){var j=Lr.length;v=v>>>0;var D=2147483648;if(v>D)return!1;for(var C=1;C<=4;C*=2){var x=j*(1+.2/C);x=Math.min(x,v+100663296);var te=Math.min(D,vl(Math.max(v,x),65536)),J=ld(te);if(J)return!0}return!1}var kn={};function fd(){return m||"./this.program"}function Cn(){if(!Cn.strings){var v=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",j={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:v,_:fd()};for(var D in kn)kn[D]===void 0?delete j[D]:j[D]=kn[D];var C=[];for(var D in j)C.push(D+"="+j[D]);Cn.strings=C}return Cn.strings}function hd(v,j){var D=0;return Cn().forEach(function(C,x){var te=j+D;re[v+x*4>>2]=te,Co(C,te),D+=C.length+1}),0}function pd(v,j){var D=Cn();re[v>>2]=D.length;var C=0;return D.forEach(function(x){C+=x.length+1}),re[j>>2]=C,0}function _d(v){return 0}function yd(v,j,D,C,x,te){var J=X.getStreamFromFD(v),$=X.doReadv(J,j,D,C);return re[te>>2]=$,0}function md(v,j,D,C,x,te){var J=X.getStreamFromFD(v),$=X.doWritev(J,j,D,C);return re[te>>2]=$,0}function bd(v,j,D,C){var x=X.getStreamFromFD(v),te=X.doReadv(x,j,D);return re[C>>2]=te,0}function gd(v,j,D,C,x){}function vd(v){var j=X.getStreamFromFD(v);return j.stream_ops&&j.stream_ops.fsync?-j.stream_ops.fsync(j):0}function wd(v,j,D,C){for(var x=0,te=0;te<D;te++){var J=re[j>>2],$=re[j+4>>2];j+=8;for(var ue=0;ue<$;ue++)X.printChar(v,Lr[J+ue]);x+=$}return re[C>>2]=x,0}function jd(v,j,D,C){var x=0,te=0,J=0,$=0,ue=0,Re=0,Me;function Mt(T,A,S,Nt,Ut,Ci){var q,ce,xe,Ve;return ce=T===10?28:16,Ut=T===10?Dn(Ut):Po(Ut),q=Zo(ce),Ve=qo(q,T,Ut,Ci),Kt(!Ve),xe=Zo(32),re[xe+4>>2]=T,re[xe+8>>2]=A,re[xe+12>>2]=S,re[xe+24>>2]=Nt,re[xe+20>>2]=q,T===10?re[xe+16>>2]=28:re[xe+16>>2]=16,re[xe+28>>2]=0,xe}if(D&&(J=re[D>>2],$=re[D+4>>2],ue=re[D+8>>2],Re=re[D+12>>2]),ue&&!Re&&(Re=ue===2?17:6),!ue&&Re&&(ue=Re===17?2:1),Re===0&&(Re=6),ue===0&&(ue=1),!v&&!j)return-2;if(J&-1088||D!==0&&re[D>>2]&2&&!v)return-1;if(J&32)return-2;if(ue!==0&&ue!==1&&ue!==2)return-7;if($!==0&&$!==2&&$!==10)return-6;if(j&&(j=Ar(j),te=parseInt(j,10),isNaN(te)))return J&1024?-2:-8;if(!v)return $===0&&($=2),(J&1)===0&&($===2?x=Bs(2130706433):x=[0,0,0,1]),Me=Mt($,ue,Re,null,x,te),re[C>>2]=Me,0;if(v=Ar(v),x=zt(v),x!==null)if($===0||$===2)$=2;else if($===10&&J&8)x=[0,0,Bs(65535),x],$=10;else return-2;else if(x=Lo(v),x!==null)if($===0||$===10)$=10;else return-2;return x!=null?(Me=Mt($,ue,Re,v,x,te),re[C>>2]=Me,0):J&4?-2:(v=Wt.lookup_name(v),x=zt(v),$===0?$=2:$===10&&(x=[0,0,Bs(65535),x]),Me=Mt($,ue,Re,null,x,te),re[C>>2]=Me,0)}function Bd(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var v=new Uint8Array(1);return function(){return crypto.getRandomValues(v),v[0]}}else if(W)try{var j=bg("crypto");return function(){return j.randomBytes(1)[0]}}catch(D){}return function(){Dt("randomDevice")}}function hs(v,j){hs.randomDevice||(hs.randomDevice=Bd());for(var D=0;D<j;D++)Tn[v+D>>0]=hs.randomDevice();return 0}function Td(v,j,D,C,x,te,J){var $=ru(v,j);if($.errno)return-6;var ue=$.port,Re=$.addr,Me=!1;if(D&&C){var Mt;if(J&1||!(Mt=Wt.lookup_addr(Re))){if(J&8)return-2}else Re=Mt;var T=os(Re,D,C);T+1>=C&&(Me=!0)}if(x&&te){ue=""+ue;var T=os(ue,x,te);T+1>=te&&(Me=!0)}return Me?-12:0}function ps(v){return v%4===0&&(v%100!==0||v%400===0)}function Go(v,j){for(var D=0,C=0;C<=j;D+=v[C++]);return D}var _s=[31,29,31,30,31,30,31,31,30,31,30,31],ys=[31,28,31,30,31,30,31,31,30,31,30,31];function ms(v,j){for(var D=new Date(v.getTime());j>0;){var C=ps(D.getFullYear()),x=D.getMonth(),te=(C?_s:ys)[x];if(j>te-D.getDate())j-=te-D.getDate()+1,D.setDate(1),x<11?D.setMonth(x+1):(D.setMonth(0),D.setFullYear(D.getFullYear()+1));else return D.setDate(D.getDate()+j),D}return D}function Sd(v,j,D,C){var x=re[C+40>>2],te={tm_sec:re[C>>2],tm_min:re[C+4>>2],tm_hour:re[C+8>>2],tm_mday:re[C+12>>2],tm_mon:re[C+16>>2],tm_year:re[C+20>>2],tm_wday:re[C+24>>2],tm_yday:re[C+28>>2],tm_isdst:re[C+32>>2],tm_gmtoff:re[C+36>>2],tm_zone:x?Ar(x):""},J=Ar(D),$={"%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 ue in $)J=J.replace(new RegExp(ue,"g"),$[ue]);var Re=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Me=["January","February","March","April","May","June","July","August","September","October","November","December"];function Mt(q,ce,xe){for(var Ve=typeof q=="number"?q.toString():q||"";Ve.length<ce;)Ve=xe[0]+Ve;return Ve}function T(q,ce){return Mt(q,ce,"0")}function A(q,ce){function xe(Xt){return Xt<0?-1:Xt>0?1:0}var Ve;return(Ve=xe(q.getFullYear()-ce.getFullYear()))===0&&(Ve=xe(q.getMonth()-ce.getMonth()))===0&&(Ve=xe(q.getDate()-ce.getDate())),Ve}function S(q){switch(q.getDay()){case 0:return new Date(q.getFullYear()-1,11,29);case 1:return q;case 2:return new Date(q.getFullYear(),0,3);case 3:return new Date(q.getFullYear(),0,2);case 4:return new Date(q.getFullYear(),0,1);case 5:return new Date(q.getFullYear()-1,11,31);case 6:return new Date(q.getFullYear()-1,11,30)}}function Nt(q){var ce=ms(new Date(q.tm_year+1900,0,1),q.tm_yday),xe=new Date(ce.getFullYear(),0,4),Ve=new Date(ce.getFullYear()+1,0,4),Xt=S(xe),Fr=S(Ve);return A(Xt,ce)<=0?A(Fr,ce)<=0?ce.getFullYear()+1:ce.getFullYear():ce.getFullYear()-1}var Ut={"%a":function(q){return Re[q.tm_wday].substring(0,3)},"%A":function(q){return Re[q.tm_wday]},"%b":function(q){return Me[q.tm_mon].substring(0,3)},"%B":function(q){return Me[q.tm_mon]},"%C":function(q){var ce=q.tm_year+1900;return T(ce/100|0,2)},"%d":function(q){return T(q.tm_mday,2)},"%e":function(q){return Mt(q.tm_mday,2," ")},"%g":function(q){return Nt(q).toString().substring(2)},"%G":function(q){return Nt(q)},"%H":function(q){return T(q.tm_hour,2)},"%I":function(q){var ce=q.tm_hour;return ce==0?ce=12:ce>12&&(ce-=12),T(ce,2)},"%j":function(q){return T(q.tm_mday+Go(ps(q.tm_year+1900)?_s:ys,q.tm_mon-1),3)},"%m":function(q){return T(q.tm_mon+1,2)},"%M":function(q){return T(q.tm_min,2)},"%n":function(){return`
31
+ `},"%p":function(P){return P.tm_hour>=0&&P.tm_hour<12?"AM":"PM"},"%S":function(P){return k(P.tm_sec,2)},"%t":function(){return" "},"%u":function(P){return P.tm_wday||7},"%U":function(P){var oe=new Date(P.tm_year+1900,0,1),Ue=oe.getDay()===0?oe:js(oe,7-oe.getDay()),Oe=new Date(P.tm_year+1900,P.tm_mon,P.tm_mday);if(E(Ue,Oe)<0){var Pt=Ko(gs(Oe.getFullYear())?vs:ws,Oe.getMonth()-1)-31,Mi=31-Ue.getDate(),Un=Mi+Pt+Oe.getDate();return k(Math.ceil(Un/7),2)}return E(Ue,oe)===0?"01":"00"},"%V":function(P){var oe=new Date(P.tm_year+1900,0,4),Ue=new Date(P.tm_year+1901,0,4),Oe=Y(oe),Pt=Y(Ue),Mi=js(new Date(P.tm_year+1900,0,1),P.tm_yday);if(E(Mi,Oe)<0)return"53";if(E(Pt,Mi)<=0)return"01";var Un;return Oe.getFullYear()<P.tm_year+1900?Un=P.tm_yday+32-Oe.getDate():Un=P.tm_yday+1-Oe.getDate(),k(Math.ceil(Un/7),2)},"%w":function(P){return P.tm_wday},"%W":function(P){var oe=new Date(P.tm_year,0,1),Ue=oe.getDay()===1?oe:js(oe,oe.getDay()===0?1:7-oe.getDay()+1),Oe=new Date(P.tm_year+1900,P.tm_mon,P.tm_mday);if(E(Ue,Oe)<0){var Pt=Ko(gs(Oe.getFullYear())?vs:ws,Oe.getMonth()-1)-31,Mi=31-Ue.getDate(),Un=Mi+Pt+Oe.getDate();return k(Math.ceil(Un/7),2)}return E(Ue,oe)===0?"01":"00"},"%y":function(P){return(P.tm_year+1900).toString().substring(2)},"%Y":function(P){return P.tm_year+1900},"%z":function(P){var oe=P.tm_gmtoff,Ue=oe>=0;return oe=Math.abs(oe)/60,oe=oe/60*100+oe%60,(Ue?"+":"-")+String("0000"+oe).slice(-4)},"%Z":function(P){return P.tm_zone},"%%":function(){return"%"}};for(var y in Fe)h.includes(y)&&(h=h.replace(new RegExp(y,"g"),Fe[y](f)));var tt=Hd(h,!1);return tt.length>a?0:(Mo(tt,o),tt.length-1)}function qd(o,a,c,l){return Ld(o,a,c,l)}function Hd(o,a,c){var l=c>0?c:vl(o)+1,d=new Array(l),f=ko(o,d,0,d.length);return a&&(d.length=f),d}var zd={p:Cl,j:Ml,A:ru,F:Wt,b:Ul,n:El,H:Rl,W:xl,i:Fn,da:Vl,v:Nl,E:Pl,e:iu,Ca:qo,Qe:Ll,Ea:zl,Da:Wl,Q:Yl,Sa:Wo,Qa:Gl,Na:$l,Oa:Kl,ya:Jl,Ba:Xl,Ua:Zl,Pa:Ql,Ta:ed,oa:td,za:rd,Oe:id,ma:nd,Aa:sd,ga:od,Ra:ad,na:ud,ha:cd,Ga:ld,_:dd,la:Cn,Ge:hd,He:pd,Ee:_d,Fe:yd,ta:md,Ce:bd,Je:gd,De:vd,Ke:wd,fa:jd,Ie:Bd,ua:hs,Be:Td,sa:ps,Le:Go,Va:_s,kb:ys,ed:Sd,Xa:G_,Ya:Ad,U:Dd,pe:Fd,qb:Od,qa:kd,ye:Cd,Pe:Md,ea:Ud,a:Ed,Fa:Rd,Ma:bs,xa:Vd,ia:PB,N:OB,Ja:RB,T:oB,yc:$S,ja:NB,X:CB,ra:sB,zc:GS,u:fB,Ha:qB,Ka:jB,Z:SB,Ia:LB,La:wB,d:Z1,aa:WB,D:IB,Ib:VI,c:Q1,Y:kB,va:GB,h:tB,Gb:PI,m:nB,pa:gB,o:rB,w:pB,z:lB,S:TB,y:dB,x:_B,q:EB,O:zB,J:HB,cc:yI,fc:hI,ic:lI,oc:nI,dc:_I,Hb:NI,xc:KS,gc:fI,pc:iI,Pb:kI,ue:tT,Qd:CT,Jd:NT,te:rT,Ub:II,jd:dS,Lb:EI,Kb:RI,Xd:ST,Pd:MT,yb:$I,Xc:TS,Wd:IT,Ec:HS,Vb:SI,Jb:xI,ke:lT,Td:FT,Ac:YS,Kd:VT,vd:QT,Hd:LT,mb:sA,Ud:DT,me:uT,Rd:kT,id:fS,gb:lA,Ob:CI,se:iT,Yd:TT,xd:XT,wb:JI,Ld:xT,hb:cA,Fb:LI,Sd:OT,Dd:WT,Gd:qT,Fd:HT,Ed:zT,Ad:$T,mc:oI,$b:gI,ee:yT,qc:rI,ae:vT,qe:sT,tc:QS,sc:eI,xe:ZB,we:QB,Od:UT,Ae:JB,qd:nS,rc:tI,ec:pI,Fc:qS,vc:XS,Uc:AS,vb:XI,Cc:WS,sd:rS,md:uS,Mc:ES,wc:JS,zb:GI,ac:bI,od:oS,dd:yS,Pc:CS,Oc:MS,Lc:RS,Nc:US,td:tS,ad:gS,Mb:UI,kc:uI,ob:iA,_c:wS,uc:ZS,Cb:zI,Yb:jI,Db:HI,Wb:TI,t:J1,k:eB,C:FB,ba:UB,sb:eA,K:DB,ca:MB,tb:QI,f:X1,V:uB,R:AB,Bc:aB,g:cB,l:iB,Ne:$B,s:BB,r:bB,wa:YB,B:hB,L:vB,P:VB,M:yB,Me:KB,ka:xB,$:mB,Cd:YT,rb:tA,kd:lS,bc:mI,Dc:zS,nc:sI,Qb:OI,Za:gA,jb:aA,ie:fT,Vd:AT,xb:KI,eb:fA,yd:JT,zd:KT,Zb:wI,Yc:BS,Sb:DI,Rb:FI,_a:bA,Qc:kS,he:hT,_d:jT,Bd:GT,Wc:SS,Ic:NS,Ab:YI,Nb:MI,Bb:WI,ib:uA,ce:bT,ud:eS,Tb:AI,Gc:LS,Tc:DS,ge:pT,fb:dA,oe:oT,re:nT,ve:eT,Id:PT,db:hA,cd:mS,Kc:xS,Jc:VS,bd:bS,Zc:jS,nd:aS,lb:oA,hd:hS,cb:pA,Hc:PS,nb:nA,ze:XB,le:cT,fd:_S,Rc:OS,be:gT,hc:dI,je:dT,de:mT,gd:pS,Nd:ET,Md:RT,$c:vS,ub:ZI,ld:cS,lc:aI,fe:_T,bb:_A,Sc:FS,pb:rA,$d:wT,Vc:IS,$a:mA,ab:yA,jc:cI,ne:aT,rd:iS,Zd:BT,Xb:BI,_b:vI,Eb:qI,wd:ZT,pd:sS,G:Nd,I:Pd,Wa:qd},$_=tu(),Wd=t.___wasm_call_ctors=function(){return(Wd=t.___wasm_call_ctors=t.asm.Se).apply(null,arguments)},Yd=t._main=function(){return(Yd=t._main=t.asm.Te).apply(null,arguments)},Gd=t._duckdb_web_fs_glob_add_path=function(){return(Gd=t._duckdb_web_fs_glob_add_path=t.asm.Ve).apply(null,arguments)},$d=t._duckdb_web_clear_response=function(){return($d=t._duckdb_web_clear_response=t.asm.We).apply(null,arguments)},Kd=t._duckdb_web_fail_with=function(){return(Kd=t._duckdb_web_fail_with=t.asm.Xe).apply(null,arguments)},Jd=t._duckdb_web_reset=function(){return(Jd=t._duckdb_web_reset=t.asm.Ye).apply(null,arguments)},Xd=t._duckdb_web_connect=function(){return(Xd=t._duckdb_web_connect=t.asm.Ze).apply(null,arguments)},Zd=t._duckdb_web_disconnect=function(){return(Zd=t._duckdb_web_disconnect=t.asm._e).apply(null,arguments)},Qd=t._duckdb_web_flush_files=function(){return(Qd=t._duckdb_web_flush_files=t.asm.$e).apply(null,arguments)},ef=t._duckdb_web_flush_file=function(){return(ef=t._duckdb_web_flush_file=t.asm.af).apply(null,arguments)},tf=t._duckdb_web_open=function(){return(tf=t._duckdb_web_open=t.asm.bf).apply(null,arguments)},rf=t._duckdb_web_get_global_file_info=function(){return(rf=t._duckdb_web_get_global_file_info=t.asm.cf).apply(null,arguments)},nf=t._duckdb_web_collect_file_stats=function(){return(nf=t._duckdb_web_collect_file_stats=t.asm.df).apply(null,arguments)},sf=t._duckdb_web_export_file_stats=function(){return(sf=t._duckdb_web_export_file_stats=t.asm.ef).apply(null,arguments)},cu=t._duckdb_web_fs_drop_file=function(){return(cu=t._duckdb_web_fs_drop_file=t.asm.ff).apply(null,arguments)},Bs=t._duckdb_web_fs_drop_files=function(){return(Bs=t._duckdb_web_fs_drop_files=t.asm.gf).apply(null,arguments)},Ts=t._duckdb_web_fs_glob_file_infos=function(){return(Ts=t._duckdb_web_fs_glob_file_infos=t.asm.hf).apply(null,arguments)},Jo=t._duckdb_web_fs_get_file_info_by_id=function(){return(Jo=t._duckdb_web_fs_get_file_info_by_id=t.asm.jf).apply(null,arguments)},lu=t._duckdb_web_fs_get_file_info_by_name=function(){return(lu=t._duckdb_web_fs_get_file_info_by_name=t.asm.kf).apply(null,arguments)},du=t._duckdb_web_fs_set_file_descriptor=function(){return(du=t._duckdb_web_fs_set_file_descriptor=t.asm.lf).apply(null,arguments)},Xo=t._duckdb_web_fs_register_file_url=function(){return(Xo=t._duckdb_web_fs_register_file_url=t.asm.mf).apply(null,arguments)},Zo=t._duckdb_web_fs_register_file_buffer=function(){return(Zo=t._duckdb_web_fs_register_file_buffer=t.asm.nf).apply(null,arguments)},of=t._duckdb_web_copy_file_to_buffer=function(){return(of=t._duckdb_web_copy_file_to_buffer=t.asm.of).apply(null,arguments)},Ss=t._duckdb_web_copy_file_to_path=function(){return(Ss=t._duckdb_web_copy_file_to_path=t.asm.pf).apply(null,arguments)},Is=t._duckdb_web_get_version=function(){return(Is=t._duckdb_web_get_version=t.asm.qf).apply(null,arguments)},af=t._duckdb_web_get_feature_flags=function(){return(af=t._duckdb_web_get_feature_flags=t.asm.rf).apply(null,arguments)},uf=t._duckdb_web_tokenize=function(){return(uf=t._duckdb_web_tokenize=t.asm.sf).apply(null,arguments)},Qo=t._duckdb_web_udf_scalar_create=function(){return(Qo=t._duckdb_web_udf_scalar_create=t.asm.tf).apply(null,arguments)},cf=t._duckdb_web_prepared_create=function(){return(cf=t._duckdb_web_prepared_create=t.asm.uf).apply(null,arguments)},lf=t._duckdb_web_prepared_close=function(){return(lf=t._duckdb_web_prepared_close=t.asm.vf).apply(null,arguments)},fu=t._duckdb_web_prepared_run=function(){return(fu=t._duckdb_web_prepared_run=t.asm.wf).apply(null,arguments)},v=t._duckdb_web_prepared_send=function(){return(v=t._duckdb_web_prepared_send=t.asm.xf).apply(null,arguments)},j=t._duckdb_web_query_run=function(){return(j=t._duckdb_web_query_run=t.asm.yf).apply(null,arguments)},D=t._duckdb_web_query_send=function(){return(D=t._duckdb_web_query_send=t.asm.zf).apply(null,arguments)},C=t._duckdb_web_query_fetch_results=function(){return(C=t._duckdb_web_query_fetch_results=t.asm.Af).apply(null,arguments)},x=t._duckdb_web_get_tablenames=function(){return(x=t._duckdb_web_get_tablenames=t.asm.Bf).apply(null,arguments)},te=t._duckdb_web_insert_arrow_from_ipc_stream=function(){return(te=t._duckdb_web_insert_arrow_from_ipc_stream=t.asm.Cf).apply(null,arguments)},J=t._duckdb_web_insert_csv_from_path=function(){return(J=t._duckdb_web_insert_csv_from_path=t.asm.Df).apply(null,arguments)},$=t._duckdb_web_insert_json_from_path=function(){return($=t._duckdb_web_insert_json_from_path=t.asm.Ef).apply(null,arguments)},ue=t.___errno_location=function(){return(ue=t.___errno_location=t.asm.Ff).apply(null,arguments)},Re=t._htonl=function(){return(Re=t._htonl=t.asm.Gf).apply(null,arguments)},Me=t._htons=function(){return(Me=t._htons=t.asm.Hf).apply(null,arguments)},Mt=t._ntohs=function(){return(Mt=t._ntohs=t.asm.If).apply(null,arguments)},T=t._setThrew=function(){return(T=t._setThrew=t.asm.Jf).apply(null,arguments)},A=t.stackSave=function(){return(A=t.stackSave=t.asm.Kf).apply(null,arguments)},S=t.stackRestore=function(){return(S=t.stackRestore=t.asm.Lf).apply(null,arguments)},Nt=t.stackAlloc=function(){return(Nt=t.stackAlloc=t.asm.Mf).apply(null,arguments)},Ut=t.___cxa_can_catch=function(){return(Ut=t.___cxa_can_catch=t.asm.Nf).apply(null,arguments)},Ci=t.___cxa_is_pointer_type=function(){return(Ci=t.___cxa_is_pointer_type=t.asm.Of).apply(null,arguments)},q=t._malloc=function(){return(q=t._malloc=t.asm.Pf).apply(null,arguments)},ce=t._free=function(){return(ce=t._free=t.asm.Qf).apply(null,arguments)},xe=t.dynCall_jiiii=function(){return(xe=t.dynCall_jiiii=t.asm.Rf).apply(null,arguments)},Ve=t.dynCall_iiiiij=function(){return(Ve=t.dynCall_iiiiij=t.asm.Sf).apply(null,arguments)},Xt=t.dynCall_iiiiijj=function(){return(Xt=t.dynCall_iiiiijj=t.asm.Tf).apply(null,arguments)},Fr=t.dynCall_viijii=function(){return(Fr=t.dynCall_viijii=t.asm.Uf).apply(null,arguments)},Hr=t.dynCall_j=function(){return(Hr=t.dynCall_j=t.asm.Vf).apply(null,arguments)},K_=t.dynCall_ji=function(){return(K_=t.dynCall_ji=t.asm.Wf).apply(null,arguments)},J_=t.dynCall_iij=function(){return(J_=t.dynCall_iij=t.asm.Xf).apply(null,arguments)},X_=t.dynCall_viij=function(){return(X_=t.dynCall_viij=t.asm.Yf).apply(null,arguments)},Z_=t.dynCall_viijji=function(){return(Z_=t.dynCall_viijji=t.asm.Zf).apply(null,arguments)},Q_=t.dynCall_viijj=function(){return(Q_=t.dynCall_viijj=t.asm._f).apply(null,arguments)},ey=t.dynCall_viiijj=function(){return(ey=t.dynCall_viiijj=t.asm.$f).apply(null,arguments)},ty=t.dynCall_viiji=function(){return(ty=t.dynCall_viiji=t.asm.ag).apply(null,arguments)},ry=t.dynCall_vijjj=function(){return(ry=t.dynCall_vijjj=t.asm.bg).apply(null,arguments)},iy=t.dynCall_iiijj=function(){return(iy=t.dynCall_iiijj=t.asm.cg).apply(null,arguments)},ny=t.dynCall_viiij=function(){return(ny=t.dynCall_viiij=t.asm.dg).apply(null,arguments)},sy=t.dynCall_viijij=function(){return(sy=t.dynCall_viijij=t.asm.eg).apply(null,arguments)},oy=t.dynCall_viiijjj=function(){return(oy=t.dynCall_viiijjj=t.asm.fg).apply(null,arguments)},ay=t.dynCall_iiij=function(){return(ay=t.dynCall_iiij=t.asm.gg).apply(null,arguments)},uy=t.dynCall_vijijj=function(){return(uy=t.dynCall_vijijj=t.asm.hg).apply(null,arguments)},cy=t.dynCall_iji=function(){return(cy=t.dynCall_iji=t.asm.ig).apply(null,arguments)},ly=t.dynCall_viji=function(){return(ly=t.dynCall_viji=t.asm.jg).apply(null,arguments)},dy=t.dynCall_vij=function(){return(dy=t.dynCall_vij=t.asm.kg).apply(null,arguments)},fy=t.dynCall_viiiij=function(){return(fy=t.dynCall_viiiij=t.asm.lg).apply(null,arguments)},hy=t.dynCall_jii=function(){return(hy=t.dynCall_jii=t.asm.mg).apply(null,arguments)},py=t.dynCall_viiiji=function(){return(py=t.dynCall_viiiji=t.asm.ng).apply(null,arguments)},_y=t.dynCall_vijj=function(){return(_y=t.dynCall_vijj=t.asm.og).apply(null,arguments)},yy=t.dynCall_vj=function(){return(yy=t.dynCall_vj=t.asm.pg).apply(null,arguments)},my=t.dynCall_iiji=function(){return(my=t.dynCall_iiji=t.asm.qg).apply(null,arguments)},by=t.dynCall_iiiij=function(){return(by=t.dynCall_iiiij=t.asm.rg).apply(null,arguments)},gy=t.dynCall_iiiiiji=function(){return(gy=t.dynCall_iiiiiji=t.asm.sg).apply(null,arguments)},vy=t.dynCall_iiiji=function(){return(vy=t.dynCall_iiiji=t.asm.tg).apply(null,arguments)},wy=t.dynCall_iiiiji=function(){return(wy=t.dynCall_iiiiji=t.asm.ug).apply(null,arguments)},jy=t.dynCall_jiii=function(){return(jy=t.dynCall_jiii=t.asm.vg).apply(null,arguments)},By=t.dynCall_jij=function(){return(By=t.dynCall_jij=t.asm.wg).apply(null,arguments)},Ty=t.dynCall_iijjijj=function(){return(Ty=t.dynCall_iijjijj=t.asm.xg).apply(null,arguments)},Sy=t.dynCall_viiiijiiiii=function(){return(Sy=t.dynCall_viiiijiiiii=t.asm.yg).apply(null,arguments)},Iy=t.dynCall_viiiijiiii=function(){return(Iy=t.dynCall_viiiijiiii=t.asm.zg).apply(null,arguments)},Ay=t.dynCall_viiijii=function(){return(Ay=t.dynCall_viiijii=t.asm.Ag).apply(null,arguments)},Dy=t.dynCall_viiiiiij=function(){return(Dy=t.dynCall_viiiiiij=t.asm.Bg).apply(null,arguments)},Fy=t.dynCall_iiijiii=function(){return(Fy=t.dynCall_iiijiii=t.asm.Cg).apply(null,arguments)},Oy=t.dynCall_iiiiijii=function(){return(Oy=t.dynCall_iiiiijii=t.asm.Dg).apply(null,arguments)},ky=t.dynCall_viijiii=function(){return(ky=t.dynCall_viijiii=t.asm.Eg).apply(null,arguments)},Cy=t.dynCall_iiijiij=function(){return(Cy=t.dynCall_iiijiij=t.asm.Fg).apply(null,arguments)},My=t.dynCall_vijiii=function(){return(My=t.dynCall_vijiii=t.asm.Gg).apply(null,arguments)},Uy=t.dynCall_iijjii=function(){return(Uy=t.dynCall_iijjii=t.asm.Hg).apply(null,arguments)},Ey=t.dynCall_iijjiii=function(){return(Ey=t.dynCall_iijjiii=t.asm.Ig).apply(null,arguments)},Ry=t.dynCall_iijjiiii=function(){return(Ry=t.dynCall_iijjiiii=t.asm.Jg).apply(null,arguments)},xy=t.dynCall_iijji=function(){return(xy=t.dynCall_iijji=t.asm.Kg).apply(null,arguments)},Vy=t.dynCall_vijiiii=function(){return(Vy=t.dynCall_vijiiii=t.asm.Lg).apply(null,arguments)},Ny=t.dynCall_iijiiii=function(){return(Ny=t.dynCall_iijiiii=t.asm.Mg).apply(null,arguments)},Py=t.dynCall_iijii=function(){return(Py=t.dynCall_iijii=t.asm.Ng).apply(null,arguments)},Ly=t.dynCall_vijij=function(){return(Ly=t.dynCall_vijij=t.asm.Og).apply(null,arguments)},qy=t.dynCall_iiijiiii=function(){return(qy=t.dynCall_iiijiiii=t.asm.Pg).apply(null,arguments)},Hy=t.dynCall_jiiij=function(){return(Hy=t.dynCall_jiiij=t.asm.Qg).apply(null,arguments)},zy=t.dynCall_jiiiii=function(){return(zy=t.dynCall_jiiiii=t.asm.Rg).apply(null,arguments)},Wy=t.dynCall_iiiiijjiijj=function(){return(Wy=t.dynCall_iiiiijjiijj=t.asm.Sg).apply(null,arguments)},Yy=t.dynCall_viijiiji=function(){return(Yy=t.dynCall_viijiiji=t.asm.Tg).apply(null,arguments)},Gy=t.dynCall_vjjijij=function(){return(Gy=t.dynCall_vjjijij=t.asm.Ug).apply(null,arguments)},$y=t.dynCall_vijjji=function(){return($y=t.dynCall_vijjji=t.asm.Vg).apply(null,arguments)},Ky=t.dynCall_vjjii=function(){return(Ky=t.dynCall_vjjii=t.asm.Wg).apply(null,arguments)},Jy=t.dynCall_viiiiiji=function(){return(Jy=t.dynCall_viiiiiji=t.asm.Xg).apply(null,arguments)},Xy=t.dynCall_jiiiji=function(){return(Xy=t.dynCall_jiiiji=t.asm.Yg).apply(null,arguments)},Zy=t.dynCall_iijj=function(){return(Zy=t.dynCall_iijj=t.asm.Zg).apply(null,arguments)},Qy=t.dynCall_iiijjii=function(){return(Qy=t.dynCall_iiijjii=t.asm._g).apply(null,arguments)},em=t.dynCall_vijii=function(){return(em=t.dynCall_vijii=t.asm.$g).apply(null,arguments)},tm=t.dynCall_viijjii=function(){return(tm=t.dynCall_viijjii=t.asm.ah).apply(null,arguments)},rm=t.dynCall_viiiijj=function(){return(rm=t.dynCall_viiiijj=t.asm.bh).apply(null,arguments)},im=t.dynCall_jijjij=function(){return(im=t.dynCall_jijjij=t.asm.ch).apply(null,arguments)},nm=t.dynCall_jiijii=function(){return(nm=t.dynCall_jiijii=t.asm.dh).apply(null,arguments)},sm=t.dynCall_jijiii=function(){return(sm=t.dynCall_jijiii=t.asm.eh).apply(null,arguments)},om=t.dynCall_viijiiiii=function(){return(om=t.dynCall_viijiiiii=t.asm.fh).apply(null,arguments)},am=t.dynCall_viijiiij=function(){return(am=t.dynCall_viijiiij=t.asm.gh).apply(null,arguments)},um=t.dynCall_vijiiiji=function(){return(um=t.dynCall_vijiiiji=t.asm.hh).apply(null,arguments)},cm=t.dynCall_jiiji=function(){return(cm=t.dynCall_jiiji=t.asm.ih).apply(null,arguments)},lm=t.dynCall_viiijij=function(){return(lm=t.dynCall_viiijij=t.asm.jh).apply(null,arguments)},dm=t.dynCall_viijiij=function(){return(dm=t.dynCall_viijiij=t.asm.kh).apply(null,arguments)},fm=t.dynCall_viiiiijj=function(){return(fm=t.dynCall_viiiiijj=t.asm.lh).apply(null,arguments)},hm=t.dynCall_viiijji=function(){return(hm=t.dynCall_viiijji=t.asm.mh).apply(null,arguments)},pm=t.dynCall_iiiijiii=function(){return(pm=t.dynCall_iiiijiii=t.asm.nh).apply(null,arguments)},_m=t.dynCall_iiijij=function(){return(_m=t.dynCall_iiijij=t.asm.oh).apply(null,arguments)},ym=t.dynCall_iiijji=function(){return(ym=t.dynCall_iiijji=t.asm.ph).apply(null,arguments)},mm=t.dynCall_iiiijj=function(){return(mm=t.dynCall_iiiijj=t.asm.qh).apply(null,arguments)},bm=t.dynCall_viiijiii=function(){return(bm=t.dynCall_viiijiii=t.asm.rh).apply(null,arguments)},gm=t.dynCall_vijji=function(){return(gm=t.dynCall_vijji=t.asm.sh).apply(null,arguments)},vm=t.dynCall_jiiiij=function(){return(vm=t.dynCall_jiiiij=t.asm.th).apply(null,arguments)},wm=t.dynCall_jiijiiiii=function(){return(wm=t.dynCall_jiijiiiii=t.asm.uh).apply(null,arguments)},jm=t.dynCall_jiijiijiii=function(){return(jm=t.dynCall_jiijiijiii=t.asm.vh).apply(null,arguments)},Bm=t.dynCall_jiijjiii=function(){return(Bm=t.dynCall_jiijjiii=t.asm.wh).apply(null,arguments)},Tm=t.dynCall_jiiijii=function(){return(Tm=t.dynCall_jiiijii=t.asm.xh).apply(null,arguments)},Sm=t.dynCall_jiijijii=function(){return(Sm=t.dynCall_jiijijii=t.asm.yh).apply(null,arguments)},Im=t.dynCall_viiijjij=function(){return(Im=t.dynCall_viiijjij=t.asm.zh).apply(null,arguments)},Am=t.dynCall_vijijjiij=function(){return(Am=t.dynCall_vijijjiij=t.asm.Ah).apply(null,arguments)},Dm=t.dynCall_viijjij=function(){return(Dm=t.dynCall_viijjij=t.asm.Bh).apply(null,arguments)},Fm=t.dynCall_viiijjiij=function(){return(Fm=t.dynCall_viiijjiij=t.asm.Ch).apply(null,arguments)},Om=t.dynCall_viiiijjjj=function(){return(Om=t.dynCall_viiiijjjj=t.asm.Dh).apply(null,arguments)},km=t.dynCall_viijiiiiij=function(){return(km=t.dynCall_viijiiiiij=t.asm.Eh).apply(null,arguments)},Cm=t.dynCall_viijiiiijj=function(){return(Cm=t.dynCall_viijiiiijj=t.asm.Fh).apply(null,arguments)},Mm=t.dynCall_viiijiiiijjj=function(){return(Mm=t.dynCall_viiijiiiijjj=t.asm.Gh).apply(null,arguments)},Um=t.dynCall_viijijiiiijjj=function(){return(Um=t.dynCall_viijijiiiijjj=t.asm.Hh).apply(null,arguments)},Em=t.dynCall_viiiiijiiii=function(){return(Em=t.dynCall_viiiiijiiii=t.asm.Ih).apply(null,arguments)},Rm=t.dynCall_iiijii=function(){return(Rm=t.dynCall_iiijii=t.asm.Jh).apply(null,arguments)},xm=t.dynCall_fiijii=function(){return(xm=t.dynCall_fiijii=t.asm.Kh).apply(null,arguments)},Vm=t.dynCall_diijii=function(){return(Vm=t.dynCall_diijii=t.asm.Lh).apply(null,arguments)},Nm=t.dynCall_iiiiiiijii=function(){return(Nm=t.dynCall_iiiiiiijii=t.asm.Mh).apply(null,arguments)},Pm=t.dynCall_viiiiji=function(){return(Pm=t.dynCall_viiiiji=t.asm.Nh).apply(null,arguments)},Lm=t.dynCall_jiiiijii=function(){return(Lm=t.dynCall_jiiiijii=t.asm.Oh).apply(null,arguments)},qm=t.dynCall_jiiijiii=function(){return(qm=t.dynCall_jiiijiii=t.asm.Ph).apply(null,arguments)},Hm=t.dynCall_jiiiiijiiii=function(){return(Hm=t.dynCall_jiiiiijiiii=t.asm.Qh).apply(null,arguments)},zm=t.dynCall_jj=function(){return(zm=t.dynCall_jj=t.asm.Rh).apply(null,arguments)},Wm=t.dynCall_jd=function(){return(Wm=t.dynCall_jd=t.asm.Sh).apply(null,arguments)},Ym=t.dynCall_jf=function(){return(Ym=t.dynCall_jf=t.asm.Th).apply(null,arguments)},Gm=t.dynCall_iijjj=function(){return(Gm=t.dynCall_iijjj=t.asm.Uh).apply(null,arguments)},$m=t.dynCall_vijijiiiijjj=function(){return($m=t.dynCall_vijijiiiijjj=t.asm.Vh).apply(null,arguments)},Km=t.dynCall_iiiiiiji=function(){return(Km=t.dynCall_iiiiiiji=t.asm.Wh).apply(null,arguments)},Jm=t.dynCall_iiiiiiiiji=function(){return(Jm=t.dynCall_iiiiiiiiji=t.asm.Xh).apply(null,arguments)},Xm=t.dynCall_jijijjij=function(){return(Xm=t.dynCall_jijijjij=t.asm.Yh).apply(null,arguments)},Zm=t.dynCall_viijjj=function(){return(Zm=t.dynCall_viijjj=t.asm.Zh).apply(null,arguments)},Qm=t.dynCall_vijjij=function(){return(Qm=t.dynCall_vijjij=t.asm._h).apply(null,arguments)},eb=t.dynCall_viijjji=function(){return(eb=t.dynCall_viijjji=t.asm.$h).apply(null,arguments)},tb=t.dynCall_iiiiiij=function(){return(tb=t.dynCall_iiiiiij=t.asm.ai).apply(null,arguments)},rb=t.dynCall_iiiiiiiiiiji=function(){return(rb=t.dynCall_iiiiiiiiiiji=t.asm.bi).apply(null,arguments)},ib=t.dynCall_jiiiiiii=function(){return(ib=t.dynCall_jiiiiiii=t.asm.ci).apply(null,arguments)},nb=t.dynCall_jijj=function(){return(nb=t.dynCall_jijj=t.asm.di).apply(null,arguments)},sb=t.dynCall_viiiijiiiiiiii=function(){return(sb=t.dynCall_viiiijiiiiiiii=t.asm.ei).apply(null,arguments)},ob=t.dynCall_ij=function(){return(ob=t.dynCall_ij=t.asm.fi).apply(null,arguments)},ab=t.dynCall_jjj=function(){return(ab=t.dynCall_jjj=t.asm.gi).apply(null,arguments)},ub=t.dynCall_vjii=function(){return(ub=t.dynCall_vjii=t.asm.hi).apply(null,arguments)},cb=t.dynCall_jjjjjjd=function(){return(cb=t.dynCall_jjjjjjd=t.asm.ii).apply(null,arguments)},lb=t.dynCall_vjiiii=function(){return(lb=t.dynCall_vjiiii=t.asm.ji).apply(null,arguments)},db=t.dynCall_viiiiijiii=function(){return(db=t.dynCall_viiiiijiii=t.asm.ki).apply(null,arguments)},fb=t.dynCall_jiij=function(){return(fb=t.dynCall_jiij=t.asm.li).apply(null,arguments)},hb=t.dynCall_iiiijjii=function(){return(hb=t.dynCall_iiiijjii=t.asm.mi).apply(null,arguments)},pb=t.dynCall_iiiiijji=function(){return(pb=t.dynCall_iiiiijji=t.asm.ni).apply(null,arguments)},_b=t.dynCall_viiijjii=function(){return(_b=t.dynCall_viiijjii=t.asm.oi).apply(null,arguments)},yb=t.dynCall_viiiijji=function(){return(yb=t.dynCall_viiiijji=t.asm.pi).apply(null,arguments)},mb=t.dynCall_viiiijjii=function(){return(mb=t.dynCall_viiiijjii=t.asm.qi).apply(null,arguments)},bb=t.dynCall_viiiiijji=function(){return(bb=t.dynCall_viiiiijji=t.asm.ri).apply(null,arguments)},gb=t.dynCall_iiiiiijji=function(){return(gb=t.dynCall_iiiiiijji=t.asm.si).apply(null,arguments)},vb=t.dynCall_iiiiijjj=function(){return(vb=t.dynCall_iiiiijjj=t.asm.ti).apply(null,arguments)},wb=t.dynCall_jijiiii=function(){return(wb=t.dynCall_jijiiii=t.asm.ui).apply(null,arguments)},jb=t.dynCall_viiijiji=function(){return(jb=t.dynCall_viiijiji=t.asm.vi).apply(null,arguments)},Bb=t.dynCall_iiijjjii=function(){return(Bb=t.dynCall_iiijjjii=t.asm.wi).apply(null,arguments)},Tb=t.dynCall_iiiiijjji=function(){return(Tb=t.dynCall_iiiiijjji=t.asm.xi).apply(null,arguments)},Sb=t.dynCall_iiiijjj=function(){return(Sb=t.dynCall_iiiijjj=t.asm.yi).apply(null,arguments)},Ib=t.dynCall_iidj=function(){return(Ib=t.dynCall_iidj=t.asm.zi).apply(null,arguments)},Ab=t.dynCall_ijji=function(){return(Ab=t.dynCall_ijji=t.asm.Ai).apply(null,arguments)},Db=t.dynCall_iiiiiiiij=function(){return(Db=t.dynCall_iiiiiiiij=t.asm.Bi).apply(null,arguments)},Fb=t.dynCall_iiiiiiij=function(){return(Fb=t.dynCall_iiiiiiij=t.asm.Ci).apply(null,arguments)},Ob=t.dynCall_iiiiiiiiiiiij=function(){return(Ob=t.dynCall_iiiiiiiiiiiij=t.asm.Di).apply(null,arguments)},kb=t.dynCall_iiiiiiiji=function(){return(kb=t.dynCall_iiiiiiiji=t.asm.Ei).apply(null,arguments)},Cb=t.dynCall_iiiidjj=function(){return(Cb=t.dynCall_iiiidjj=t.asm.Fi).apply(null,arguments)},Mb=t.dynCall_jiiiiiijii=function(){return(Mb=t.dynCall_jiiiiiijii=t.asm.Gi).apply(null,arguments)},Ub=t.dynCall_iiiijji=function(){return(Ub=t.dynCall_iiiijji=t.asm.Hi).apply(null,arguments)},Eb=t.dynCall_jiiiiii=function(){return(Eb=t.dynCall_jiiiiii=t.asm.Ii).apply(null,arguments)},Rb=t.dynCall_iijiji=function(){return(Rb=t.dynCall_iijiji=t.asm.Ji).apply(null,arguments)},xb=t.dynCall_vjiiiji=function(){return(xb=t.dynCall_vjiiiji=t.asm.Ki).apply(null,arguments)},Vb=t.dynCall_jjjii=function(){return(Vb=t.dynCall_jjjii=t.asm.Li).apply(null,arguments)},Nb=t.dynCall_jji=function(){return(Nb=t.dynCall_jji=t.asm.Mi).apply(null,arguments)},Pb=t.dynCall_viiijijiji=function(){return(Pb=t.dynCall_viiijijiji=t.asm.Ni).apply(null,arguments)},Lb=t.dynCall_jiiijj=function(){return(Lb=t.dynCall_jiiijj=t.asm.Oi).apply(null,arguments)},qb=t.dynCall_iiiijii=function(){return(qb=t.dynCall_iiiijii=t.asm.Pi).apply(null,arguments)},Hb=t.dynCall_viiiijii=function(){return(Hb=t.dynCall_viiiijii=t.asm.Qi).apply(null,arguments)},zb=t.dynCall_iijiii=function(){return(zb=t.dynCall_iijiii=t.asm.Ri).apply(null,arguments)},Wb=t.dynCall_jiiiiji=function(){return(Wb=t.dynCall_jiiiiji=t.asm.Si).apply(null,arguments)},Yb=t.dynCall_vijiijj=function(){return(Yb=t.dynCall_vijiijj=t.asm.Ti).apply(null,arguments)},Gb=t.dynCall_vifiijj=function(){return(Gb=t.dynCall_vifiijj=t.asm.Ui).apply(null,arguments)},$b=t.dynCall_vidiijj=function(){return($b=t.dynCall_vidiijj=t.asm.Vi).apply(null,arguments)},Kb=t.dynCall_viiiiij=function(){return(Kb=t.dynCall_viiiiij=t.asm.Wi).apply(null,arguments)},Jb=t.dynCall_ijjiii=function(){return(Jb=t.dynCall_ijjiii=t.asm.Xi).apply(null,arguments)},Xb=t.dynCall_vijijjji=function(){return(Xb=t.dynCall_vijijjji=t.asm.Yi).apply(null,arguments)},Zb=t.dynCall_viijiijj=function(){return(Zb=t.dynCall_viijiijj=t.asm.Zi).apply(null,arguments)},Qb=t.dynCall_viijijj=function(){return(Qb=t.dynCall_viijijj=t.asm._i).apply(null,arguments)},eg=t.dynCall_viiiiijjji=function(){return(eg=t.dynCall_viiiiijjji=t.asm.$i).apply(null,arguments)},tg=t.dynCall_iiijiijj=function(){return(tg=t.dynCall_iiijiijj=t.asm.aj).apply(null,arguments)},rg=t.dynCall_viiijijjj=function(){return(rg=t.dynCall_viiijijjj=t.asm.bj).apply(null,arguments)},ig=t.dynCall_iijiijj=function(){return(ig=t.dynCall_iijiijj=t.asm.cj).apply(null,arguments)},ng=t.dynCall_viiijjjji=function(){return(ng=t.dynCall_viiijjjji=t.asm.dj).apply(null,arguments)},sg=t.dynCall_viiiijiii=function(){return(sg=t.dynCall_viiiijiii=t.asm.ej).apply(null,arguments)},og=t.dynCall_viijiiii=function(){return(og=t.dynCall_viijiiii=t.asm.fj).apply(null,arguments)},ag=t.dynCall_vijjiiii=function(){return(ag=t.dynCall_vijjiiii=t.asm.gj).apply(null,arguments)},ug=t.dynCall_vijijjiiiii=function(){return(ug=t.dynCall_vijijjiiiii=t.asm.hj).apply(null,arguments)},cg=t.dynCall_vijjiiiii=function(){return(cg=t.dynCall_vijjiiiii=t.asm.ij).apply(null,arguments)},lg=t.dynCall_iiijjji=function(){return(lg=t.dynCall_iiijjji=t.asm.jj).apply(null,arguments)},dg=t.dynCall_viiiijjj=function(){return(dg=t.dynCall_viiiijjj=t.asm.kj).apply(null,arguments)},fg=t.dynCall_viiiiijjj=function(){return(fg=t.dynCall_viiiiijjj=t.asm.lj).apply(null,arguments)},hg=t.dynCall_viijiji=function(){return(hg=t.dynCall_viijiji=t.asm.mj).apply(null,arguments)};function J1(o){var a=A();try{X(o)()}catch(c){if(S(a),c!==c+0&&c!=="longjmp")throw c;T(1,0)}}function X1(o,a,c){var l=A();try{X(o)(a,c)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function Z1(o,a){var c=A();try{return X(o)(a)}catch(l){if(S(c),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function Q1(o,a,c){var l=A();try{return X(o)(a,c)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function eB(o,a){var c=A();try{X(o)(a)}catch(l){if(S(c),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function tB(o,a,c,l){var d=A();try{return X(o)(a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function rB(o,a,c,l,d,f){var h=A();try{return X(o)(a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function iB(o,a,c,l,d){var f=A();try{X(o)(a,c,l,d)}catch(h){if(S(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function nB(o,a,c,l,d){var f=A();try{return X(o)(a,c,l,d)}catch(h){if(S(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function sB(o,a,c,l){var d=A();try{return X(o)(a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function oB(o,a,c,l){var d=A();try{return X(o)(a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function aB(o,a,c,l){var d=A();try{X(o)(a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function uB(o,a,c,l){var d=A();try{X(o)(a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function cB(o,a,c,l){var d=A();try{X(o)(a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function lB(o,a,c,l,d,f,h,_){var y=A();try{return X(o)(a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function dB(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{return X(o)(a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function fB(o){var a=A();try{return X(o)()}catch(c){if(S(a),c!==c+0&&c!=="longjmp")throw c;T(1,0)}}function hB(o,a,c,l,d,f,h,_){var y=A();try{X(o)(a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function pB(o,a,c,l,d,f,h){var _=A();try{return X(o)(a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function _B(o,a,c,l,d,f,h,_,y,b,g,I){var k=A();try{return X(o)(a,c,l,d,f,h,_,y,b,g,I)}catch(E){if(S(k),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function yB(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{X(o)(a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function mB(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y,ve){var Fe=A();try{X(o)(a,c,l,d,f,h,_,y,b,g,I,k,E,Y,ve)}catch(tt){if(S(Fe),tt!==tt+0&&tt!=="longjmp")throw tt;T(1,0)}}function bB(o,a,c,l,d,f,h){var _=A();try{X(o)(a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function gB(o,a,c,l,d,f){var h=A();try{return X(o)(a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function vB(o,a,c,l,d,f,h,_,y){var b=A();try{X(o)(a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function wB(o,a,c){var l=A();try{return X(o)(a,c)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function jB(o,a,c){var l=A();try{return X(o)(a,c)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function BB(o,a,c,l,d,f){var h=A();try{X(o)(a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function TB(o,a,c,l,d,f,h,_,y){var b=A();try{return X(o)(a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function SB(o,a,c,l,d){var f=A();try{return X(o)(a,c,l,d)}catch(h){if(S(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function IB(o,a,c,l,d){var f=A();try{return X(o)(a,c,l,d)}catch(h){if(S(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function AB(o,a,c,l,d,f){var h=A();try{X(o)(a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function DB(o,a,c){var l=A();try{X(o)(a,c)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function FB(o,a,c){var l=A();try{X(o)(a,c)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function OB(o,a){var c=A();try{return X(o)(a)}catch(l){if(S(c),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function kB(o,a,c,l){var d=A();try{return X(o)(a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function CB(o,a){var c=A();try{return X(o)(a)}catch(l){if(S(c),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function MB(o,a,c,l){var d=A();try{X(o)(a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function UB(o,a,c,l){var d=A();try{X(o)(a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function EB(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y){var ve=A();try{return X(o)(a,c,l,d,f,h,_,y,b,g,I,k,E,Y)}catch(Fe){if(S(ve),Fe!==Fe+0&&Fe!=="longjmp")throw Fe;T(1,0)}}function RB(o,a,c){var l=A();try{return X(o)(a,c)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function xB(o,a,c,l,d,f,h,_,y,b,g,I,k,E){var Y=A();try{X(o)(a,c,l,d,f,h,_,y,b,g,I,k,E)}catch(ve){if(S(Y),ve!==ve+0&&ve!=="longjmp")throw ve;T(1,0)}}function VB(o,a,c,l,d,f,h,_,y,b){var g=A();try{X(o)(a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function NB(o){var a=A();try{return X(o)()}catch(c){if(S(a),c!==c+0&&c!=="longjmp")throw c;T(1,0)}}function PB(o){var a=A();try{return X(o)()}catch(c){if(S(a),c!==c+0&&c!=="longjmp")throw c;T(1,0)}}function LB(o,a){var c=A();try{return X(o)(a)}catch(l){if(S(c),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function qB(o,a){var c=A();try{return X(o)(a)}catch(l){if(S(c),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function HB(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y,ve,Fe,tt,P,oe,Ue){var Oe=A();try{return X(o)(a,c,l,d,f,h,_,y,b,g,I,k,E,Y,ve,Fe,tt,P,oe,Ue)}catch(Pt){if(S(Oe),Pt!==Pt+0&&Pt!=="longjmp")throw Pt;T(1,0)}}function zB(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y,ve,Fe,tt,P,oe){var Ue=A();try{return X(o)(a,c,l,d,f,h,_,y,b,g,I,k,E,Y,ve,Fe,tt,P,oe)}catch(Oe){if(S(Ue),Oe!==Oe+0&&Oe!=="longjmp")throw Oe;T(1,0)}}function WB(o,a,c){var l=A();try{return X(o)(a,c)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function YB(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{X(o)(a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function GB(o,a,c,l){var d=A();try{return X(o)(a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function $B(o,a,c,l,d,f,h,_,y,b){var g=A();try{X(o)(a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function KB(o,a,c,l,d,f,h,_,y,b,g,I){var k=A();try{X(o)(a,c,l,d,f,h,_,y,b,g,I)}catch(E){if(S(k),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function JB(o,a,c,l,d){var f=A();try{return xe(o,a,c,l,d)}catch(h){if(S(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function XB(o,a,c,l,d,f,h){var _=A();try{Q_(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function ZB(o,a){var c=A();try{return K_(o,a)}catch(l){if(S(c),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function QB(o,a,c){var l=A();try{return hy(o,a,c)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function eT(o,a,c,l,d,f,h){var _=A();try{Fr(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function tT(o,a,c,l,d,f,h){var _=A();try{return Ve(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function rT(o,a,c,l,d,f,h,_,y){var b=A();try{return Xt(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function iT(o,a,c,l){var d=A();try{return J_(o,a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function nT(o,a,c,l,d,f){var h=A();try{ty(o,a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function sT(o){var a=A();try{return Hr(o)}catch(c){if(S(a),c!==c+0&&c!=="longjmp")throw c;T(1,0)}}function oT(o,a,c,l,d){var f=A();try{X_(o,a,c,l,d)}catch(h){if(S(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function aT(o,a,c,l,d,f,h,_){var y=A();try{ry(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function uT(o,a,c,l,d,f,h){var _=A();try{return iy(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function cT(o,a,c,l,d,f,h,_){var y=A();try{Z_(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function lT(o,a,c,l,d){var f=A();try{return ay(o,a,c,l,d)}catch(h){if(S(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function dT(o,a,c,l){var d=A();try{dy(o,a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function fT(o,a,c,l,d,f,h){var _=A();try{fy(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function hT(o,a,c,l,d,f){var h=A();try{ny(o,a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function pT(o,a,c,l,d,f,h,_,y,b){var g=A();try{oy(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function _T(o,a,c,l,d,f,h,_,y){var b=A();try{uy(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function yT(o,a,c,l){var d=A();try{return cy(o,a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function mT(o,a,c,l,d){var f=A();try{ly(o,a,c,l,d)}catch(h){if(S(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function bT(o,a,c,l,d,f,h,_){var y=A();try{ey(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function gT(o,a,c,l,d,f,h,_,y){var b=A();try{Zm(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function vT(o,a,c,l,d,f,h,_){var y=A();try{return Jb(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function wT(o,a,c,l,d,f){var h=A();try{_y(o,a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function jT(o,a,c,l,d,f,h){var _=A();try{py(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function BT(o,a,c){var l=A();try{yy(o,a,c)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function TT(o,a,c,l,d){var f=A();try{return my(o,a,c,l,d)}catch(h){if(S(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function ST(o,a,c,l,d,f){var h=A();try{return by(o,a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function IT(o,a,c,l,d,f,h,_){var y=A();try{return mm(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function AT(o,a,c,l,d,f,h,_){var y=A();try{Pm(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function DT(o,a,c,l,d,f,h,_){var y=A();try{return _m(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function FT(o,a,c,l,d,f){var h=A();try{return vy(o,a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function OT(o,a,c,l,d,f){var h=A();try{return Zy(o,a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function kT(o,a,c,l,d,f,h,_){var y=A();try{return ym(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function CT(o,a,c,l,d,f,h,_){var y=A();try{return gy(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function MT(o,a,c,l,d,f,h){var _=A();try{return wy(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function UT(o,a,c,l){var d=A();try{return jy(o,a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function ET(o,a,c,l,d,f,h){var _=A();try{My(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function RT(o,a,c,l,d,f,h,_){var y=A();try{Vy(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function xT(o,a,c,l,d,f,h,_){var y=A();try{return Ny(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function VT(o,a,c,l,d,f,h,_){var y=A();try{return Fy(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function NT(o,a,c,l,d,f,h,_,y){var b=A();try{return Oy(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function PT(o,a,c,l,d,f,h,_){var y=A();try{ky(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function LT(o,a,c,l,d,f,h,_,y){var b=A();try{return Cy(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function qT(o,a,c,l,d,f,h,_){var y=A();try{return Uy(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function HT(o,a,c,l,d,f,h,_,y){var b=A();try{return Ey(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function zT(o,a,c,l,d,f,h,_,y,b){var g=A();try{return Ry(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function WT(o,a,c,l,d,f,h){var _=A();try{return xy(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function YT(o,a,c,l,d,f,h,_,y){var b=A();try{Dy(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function GT(o,a,c,l,d,f,h,_){var y=A();try{Ay(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function $T(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{return Ty(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function KT(o,a,c,l,d,f,h,_,y,b,g,I){var k=A();try{Sy(o,a,c,l,d,f,h,_,y,b,g,I)}catch(E){if(S(k),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function JT(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{Iy(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function XT(o,a,c,l,d,f){var h=A();try{return Py(o,a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function ZT(o,a,c,l,d,f,h){var _=A();try{Ky(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function QT(o,a,c,l,d,f,h,_,y){var b=A();try{return qy(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function eS(o,a,c,l,d,f,h,_,y){var b=A();try{hm(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function tS(o,a,c,l){var d=A();try{return By(o,a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function rS(o,a,c,l,d,f){var h=A();try{return Hy(o,a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function iS(o,a,c,l,d,f,h,_,y){var b=A();try{$y(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function nS(o,a,c,l,d,f){var h=A();try{return zy(o,a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function sS(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{Gy(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function oS(o,a,c,l,d,f){var h=A();try{return cm(o,a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function aS(o,a,c,l,d,f,h,_,y,b){var g=A();try{Yy(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function uS(o,a,c,l,d,f,h){var _=A();try{return Xy(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function cS(o,a,c,l,d,f,h){var _=A();try{Ly(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function lS(o,a,c,l,d,f,h,_,y){var b=A();try{Jy(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function dS(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y){var ve=A();try{return Wy(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y)}catch(Fe){if(S(ve),Fe!==Fe+0&&Fe!=="longjmp")throw Fe;T(1,0)}}function fS(o,a,c,l,d,f,h,_,y){var b=A();try{return Qy(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function hS(o,a,c,l,d,f,h,_){var y=A();try{sy(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function pS(o,a,c,l,d,f){var h=A();try{em(o,a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function _S(o,a,c,l,d,f,h,_,y){var b=A();try{tm(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function yS(o,a,c,l,d,f,h){var _=A();try{return nm(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function mS(o,a,c,l,d,f,h,_,y,b){var g=A();try{om(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function bS(o,a,c,l,d,f,h,_,y,b){var g=A();try{am(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function gS(o,a,c,l,d,f,h){var _=A();try{return sm(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function vS(o,a,c,l,d,f,h,_,y,b){var g=A();try{um(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function wS(o,a,c,l,d,f,h,_,y){var b=A();try{return im(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function jS(o,a,c,l,d,f,h,_,y){var b=A();try{dm(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function BS(o,a,c,l,d,f,h,_,y){var b=A();try{rm(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function TS(o,a,c,l,d,f,h,_,y){var b=A();try{return pm(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function SS(o,a,c,l,d,f,h,_,y){var b=A();try{bm(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function IS(o,a,c,l,d,f,h){var _=A();try{gm(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function AS(o,a,c,l,d,f,h){var _=A();try{return vm(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function DS(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{Im(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function FS(o,a,c,l,d,f,h,_,y,b,g,I,k){var E=A();try{Am(o,a,c,l,d,f,h,_,y,b,g,I,k)}catch(Y){if(S(E),Y!==Y+0&&Y!=="longjmp")throw Y;T(1,0)}}function OS(o,a,c,l,d,f,h,_,y,b){var g=A();try{Dm(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function kS(o,a,c,l,d,f,h,_,y,b,g,I,k){var E=A();try{Om(o,a,c,l,d,f,h,_,y,b,g,I,k)}catch(Y){if(S(E),Y!==Y+0&&Y!=="longjmp")throw Y;T(1,0)}}function CS(o,a,c,l,d,f,h,_,y,b){var g=A();try{return wm(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function MS(o,a,c,l,d,f,h,_,y,b,g,I){var k=A();try{return jm(o,a,c,l,d,f,h,_,y,b,g,I)}catch(E){if(S(k),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function US(o,a,c,l,d,f,h,_,y,b){var g=A();try{return Bm(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function ES(o,a,c,l,d,f,h,_){var y=A();try{return Tm(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function RS(o,a,c,l,d,f,h,_,y,b){var g=A();try{return Sm(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function xS(o,a,c,l,d,f,h,_,y,b,g,I){var k=A();try{km(o,a,c,l,d,f,h,_,y,b,g,I)}catch(E){if(S(k),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function VS(o,a,c,l,d,f,h,_,y,b,g,I,k){var E=A();try{Cm(o,a,c,l,d,f,h,_,y,b,g,I,k)}catch(Y){if(S(E),Y!==Y+0&&Y!=="longjmp")throw Y;T(1,0)}}function NS(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y,ve){var Fe=A();try{Mm(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y,ve)}catch(tt){if(S(Fe),tt!==tt+0&&tt!=="longjmp")throw tt;T(1,0)}}function PS(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y,ve,Fe,tt){var P=A();try{Um(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y,ve,Fe,tt)}catch(oe){if(S(P),oe!==oe+0&&oe!=="longjmp")throw oe;T(1,0)}}function LS(o,a,c,l,d,f,h,_,y,b,g,I){var k=A();try{Fm(o,a,c,l,d,f,h,_,y,b,g,I)}catch(E){if(S(k),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function qS(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{return Mb(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function HS(o,a,c,l,d,f,h,_,y){var b=A();try{return Ub(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function zS(o,a,c,l,d,f,h,_,y,b,g,I){var k=A();try{Em(o,a,c,l,d,f,h,_,y,b,g,I)}catch(E){if(S(k),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function WS(o,a,c,l,d,f,h,_,y){var b=A();try{return Lm(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function YS(o,a,c,l,d,f,h){var _=A();try{return Rm(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function GS(o,a,c,l,d,f,h){var _=A();try{return xm(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function $S(o,a,c,l,d,f,h){var _=A();try{return Vm(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function KS(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{return Nm(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function JS(o,a,c,l,d,f,h,_,y){var b=A();try{return qm(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function XS(o,a,c,l,d,f,h,_,y,b,g,I){var k=A();try{return Hm(o,a,c,l,d,f,h,_,y,b,g,I)}catch(E){if(S(k),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function ZS(o,a,c){var l=A();try{return zm(o,a,c)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function QS(o,a){var c=A();try{return Wm(o,a)}catch(l){if(S(c),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function eI(o,a){var c=A();try{return Ym(o,a)}catch(l){if(S(c),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function tI(o,a,c,l,d,f,h){var _=A();try{return Eb(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function rI(o,a,c,l,d,f){var h=A();try{return Ab(o,a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function iI(o,a,c,l,d,f,h,_,y){var b=A();try{return Km(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function nI(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{return Jm(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function sI(o,a,c,l,d,f,h,_,y,b){var g=A();try{fm(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function oI(o,a,c,l,d,f,h,_){var y=A();try{return Gm(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function aI(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y,ve,Fe){var tt=A();try{$m(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y,ve,Fe)}catch(P){if(S(tt),P!==P+0&&P!=="longjmp")throw P;T(1,0)}}function uI(o,a,c,l,d,f,h,_,y,b,g,I){var k=A();try{return Xm(o,a,c,l,d,f,h,_,y,b,g,I)}catch(E){if(S(k),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function cI(o,a,c,l,d,f,h,_,y){var b=A();try{Qm(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function lI(o,a,c,l,d,f,h,_,y,b){var g=A();try{return Db(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function dI(o,a,c,l,d,f,h,_,y,b){var g=A();try{eb(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function fI(o,a,c,l,d,f,h,_){var y=A();try{return tb(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function hI(o,a,c,l,d,f,h,_,y,b,g,I,k){var E=A();try{return rb(o,a,c,l,d,f,h,_,y,b,g,I,k)}catch(Y){if(S(E),Y!==Y+0&&Y!=="longjmp")throw Y;T(1,0)}}function pI(o,a,c,l,d,f,h,_){var y=A();try{return ib(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function _I(o,a,c,l,d,f,h,_,y){var b=A();try{return Fb(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function yI(o,a,c,l,d,f,h,_,y,b,g,I,k,E){var Y=A();try{return Ob(o,a,c,l,d,f,h,_,y,b,g,I,k,E)}catch(ve){if(S(Y),ve!==ve+0&&ve!=="longjmp")throw ve;T(1,0)}}function mI(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{db(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function bI(o,a,c,l,d){var f=A();try{return fb(o,a,c,l,d)}catch(h){if(S(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function gI(o,a,c){var l=A();try{return ob(o,a,c)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function vI(o,a,c,l,d,f,h){var _=A();try{lb(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function wI(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y){var ve=A();try{sb(o,a,c,l,d,f,h,_,y,b,g,I,k,E,Y)}catch(Fe){if(S(ve),Fe!==Fe+0&&Fe!=="longjmp")throw Fe;T(1,0)}}function jI(o,a,c,l,d){var f=A();try{return ab(o,a,c,l,d)}catch(h){if(S(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function BI(o,a,c,l,d){var f=A();try{ub(o,a,c,l,d)}catch(h){if(S(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function TI(o,a,c,l,d,f,h,_,y,b,g,I){var k=A();try{return cb(o,a,c,l,d,f,h,_,y,b,g,I)}catch(E){if(S(k),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function SI(o,a,c,l,d,f,h,_,y,b){var g=A();try{return hb(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function II(o,a,c,l,d,f,h,_,y,b){var g=A();try{return pb(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function AI(o,a,c,l,d,f,h,_,y,b){var g=A();try{_b(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function DI(o,a,c,l,d,f,h,_,y,b){var g=A();try{yb(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function FI(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{mb(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function OI(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{bb(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function kI(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{return gb(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function CI(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{return Bb(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function MI(o,a,c,l,d,f,h,_,y,b){var g=A();try{jb(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function UI(o,a,c,l,d,f,h,_){var y=A();try{return wb(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function EI(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{return vb(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function RI(o,a,c,l,d,f,h,_,y,b,g,I){var k=A();try{return Tb(o,a,c,l,d,f,h,_,y,b,g,I)}catch(E){if(S(k),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function xI(o,a,c,l,d,f,h,_,y,b){var g=A();try{return Sb(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function VI(o,a,c,l,d){var f=A();try{return Ib(o,a,c,l,d)}catch(h){if(S(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function NI(o,a,c,l,d,f,h,_,y,b){var g=A();try{return kb(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function PI(o,a,c,l,d,f,h,_,y){var b=A();try{return Cb(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function LI(o,a,c,l,d,f,h,_){var y=A();try{return Rb(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function qI(o,a,c,l,d,f,h,_,y){var b=A();try{xb(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function HI(o,a,c,l,d,f,h){var _=A();try{return Vb(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function zI(o,a,c,l){var d=A();try{return Nb(o,a,c,l)}catch(f){if(S(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function WI(o,a,c,l,d,f,h,_,y,b,g,I,k){var E=A();try{Pb(o,a,c,l,d,f,h,_,y,b,g,I,k)}catch(Y){if(S(E),Y!==Y+0&&Y!=="longjmp")throw Y;T(1,0)}}function YI(o,a,c,l,d,f,h,_,y){var b=A();try{lm(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function GI(o,a,c,l,d,f,h,_){var y=A();try{return Lb(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function $I(o,a,c,l,d,f,h,_){var y=A();try{return qb(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function KI(o,a,c,l,d,f,h,_,y){var b=A();try{Hb(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function JI(o,a,c,l,d,f,h){var _=A();try{return zb(o,a,c,l,d,f,h)}catch(y){if(S(_),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function XI(o,a,c,l,d,f,h,_){var y=A();try{return Wb(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function ZI(o,a,c,l,d,f,h,_,y,b){var g=A();try{Yb(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function QI(o,a,c,l,d,f,h,_,y){var b=A();try{Gb(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function eA(o,a,c,l,d,f,h,_,y){var b=A();try{$b(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function tA(o,a,c,l,d,f,h,_){var y=A();try{Kb(o,a,c,l,d,f,h,_)}catch(b){if(S(y),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function rA(o,a,c,l,d,f,h,_,y,b,g,I){var k=A();try{Xb(o,a,c,l,d,f,h,_,y,b,g,I)}catch(E){if(S(k),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function iA(o,a,c,l,d,f){var h=A();try{return nb(o,a,c,l,d,f)}catch(_){if(S(h),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function nA(o,a,c,l,d,f,h,_,y,b){var g=A();try{Qb(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function sA(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{return tg(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function oA(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{Zb(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function aA(o,a,c,l,d,f,h,_,y,b,g,I,k){var E=A();try{eg(o,a,c,l,d,f,h,_,y,b,g,I,k)}catch(Y){if(S(E),Y!==Y+0&&Y!=="longjmp")throw Y;T(1,0)}}function uA(o,a,c,l,d,f,h,_,y,b,g,I,k){var E=A();try{rg(o,a,c,l,d,f,h,_,y,b,g,I,k)}catch(Y){if(S(E),Y!==Y+0&&Y!=="longjmp")throw Y;T(1,0)}}function cA(o,a,c,l,d,f,h,_,y,b){var g=A();try{return ig(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function lA(o,a,c,l,d,f,h,_,y,b){var g=A();try{return lg(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function dA(o,a,c,l,d,f,h,_,y,b,g,I,k){var E=A();try{ng(o,a,c,l,d,f,h,_,y,b,g,I,k)}catch(Y){if(S(E),Y!==Y+0&&Y!=="longjmp")throw Y;T(1,0)}}function fA(o,a,c,l,d,f,h,_,y,b){var g=A();try{sg(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function hA(o,a,c,l,d,f,h,_,y){var b=A();try{og(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function pA(o,a,c,l,d,f,h,_,y){var b=A();try{hg(o,a,c,l,d,f,h,_,y)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function _A(o,a,c,l,d,f,h,_,y,b,g,I,k,E){var Y=A();try{ug(o,a,c,l,d,f,h,_,y,b,g,I,k,E)}catch(ve){if(S(Y),ve!==ve+0&&ve!=="longjmp")throw ve;T(1,0)}}function yA(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{cg(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function mA(o,a,c,l,d,f,h,_,y,b){var g=A();try{ag(o,a,c,l,d,f,h,_,y,b)}catch(I){if(S(g),I!==I+0&&I!=="longjmp")throw I;T(1,0)}}function bA(o,a,c,l,d,f,h,_,y,b,g){var I=A();try{dg(o,a,c,l,d,f,h,_,y,b,g)}catch(k){if(S(I),k!==k+0&&k!=="longjmp")throw k;T(1,0)}}function gA(o,a,c,l,d,f,h,_,y,b,g,I){var k=A();try{fg(o,a,c,l,d,f,h,_,y,b,g,I)}catch(E){if(S(k),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}t.ccall=Ar;var hu;function pu(o){this.name="ExitStatus",this.message="Program terminated with exit("+o+")",this.status=o}var vA=!1;Dt=function o(){hu||df(),hu||(Dt=o)};function wA(o){var a=t._main,c=0,l=0;try{var d=a(c,l);return jA(d,!0),d}catch(f){return kl(f)}finally{vA=!0}}function df(o){if(o=o||p,_i>0||(Sl(),_i>0))return;function a(){hu||(hu=!0,t.calledRun=!0,!Ye&&(Il(),Al(),n(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),pg&&wA(o),Fl()))}t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),a()},1)):a()}t.run=df;function jA(o,a){Jt=o,xo()||Dl(),BA(o)}function BA(o){Jt=o,xo()||(t.onExit&&t.onExit(o),Ye=!0),B(o,new pu(o))}if(t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();var pg=!0;return t.noInitialRun&&(pg=!1),df(),e.ready}})(),$1=eE;var za=class extends E_{constructor(e,t,i,n){super(e,t);this.mainModuleURL=i,this.pthreadWorkerURL=n}locateFile(e,t){if(e.endsWith(".wasm"))return this.mainModuleURL;if(e.endsWith(".worker.js")){if(!this.pthreadWorkerURL)throw new Error("Missing DuckDB worker URL!");return this.pthreadWorkerURL}throw new Error(`WASM instantiation requested unexpected file: prefix=${t} path=${e}`)}instantiateWasm(e,t){globalThis.DUCKDB_RUNTIME=this._runtime;let i=this.onInstantiationProgress;if(typeof TransformStream=="function"&&ReadableStream.prototype.pipeThrough&&WebAssembly.instantiateStreaming){let s=(async()=>{var Se;let u=new Request(this.mainModuleURL),p=await fetch(u),m=p.headers.get("content-length"),B=m&&parseInt(m,10)||0,O=new Date,R={startedAt:O,updatedAt:O,bytesTotal:B||0,bytesLoaded:0},W={transform(ye,Ee){R.bytesLoaded+=ye.byteLength;let qe=new Date;if(qe.getTime()-R.updatedAt.getTime()<20){R.updatedAt=qe,Ee.enqueue(ye);return}for(let Tt of i)Tt(R);Ee.enqueue(ye)}},N=new TransformStream(W);return new Response((Se=p.body)==null?void 0:Se.pipeThrough(N),p)})();WebAssembly.instantiateStreaming(s,e).then(u=>{t(u.instance,u.module)})}else{let n=new XMLHttpRequest,s=this.mainModuleURL,u=new Date,p={startedAt:u,updatedAt:u,bytesTotal:0,bytesLoaded:0};n.open("GET",s),n.responseType="arraybuffer",n.onerror=m=>{throw this.logger.log({timestamp:new Date,level:4,origin:3,topic:5,event:2,value:"Failed to load WASM: "+m}),new Error(m.toString())},n.onprogress=m=>{p.bytesTotal=m.total,p.bytesLoaded=m.loaded;let B=new Date;if(B.getTime()-p.updatedAt.getTime()<20){p.updatedAt=B;return}for(let O of i)O(p)},n.onload=()=>{WebAssembly.instantiate(n.response,e).then(m=>{t(m.instance,m.module)}).catch(m=>{throw this.logger.log({timestamp:new Date,level:4,origin:3,topic:5,event:2,value:"Failed to instantiate WASM: "+m}),new Error(m)})},n.send()}return[]}};var z_=class extends za{constructor(e,t,i,n=null){super(e,t,i,n)}instantiateImpl(e){return $1(En(zr({},e),{instantiateWasm:this.instantiateWasm.bind(this),locateFile:this.locateFile.bind(this)}))}};var tE=(()=>{var r=import.meta.url;return function(e){e=e||{};var t=typeof e<"u"?e:{},i=Object.assign,n,s;t.ready=new Promise(function(v,j){n=v,s=j});var u=i({},t),p=[],m="./this.program",B=(v,j)=>{throw j},O=typeof window=="object",R=typeof importScripts=="function",W=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",N="";function Se(v){return t.locateFile?t.locateFile(v,N):N+v}var ye,Ee,qe,Tt;function Nr(v){if(v instanceof Is)return;ge("exiting due to exception: "+v)}var Sr,Ir,Pr;W?(R?N=Ha().dirname(N)+"/":N=__dirname+"/",Pr=function(){Ir||(Sr=H_(),Ir=Ha())},ye=function(j,D){return Pr(),j=Ir.normalize(j),Sr.readFileSync(j,D?null:"utf8")},qe=function(j){var D=ye(j,!0);return D.buffer||(D=new Uint8Array(D)),D},Ee=function(j,D,C){Pr(),j=Ir.normalize(j),Sr.readFile(j,function(x,te){x?C(x):D(te.buffer)})},process.argv.length>1&&(m=process.argv[1].replace(/\\/g,"/")),p=process.argv.slice(2),process.on("uncaughtException",function(v){if(!(v instanceof Is))throw v}),process.on("unhandledRejection",function(v){throw v}),B=(v,j)=>{if(Ro())throw process.exitCode=v,j;Nr(j),process.exit(v)},t.inspect=function(){return"[Emscripten Module object]"}):(O||R)&&(R?N=self.location.href:typeof document<"u"&&document.currentScript&&(N=document.currentScript.src),r&&(N=r),N.indexOf("blob:")!==0?N=N.substr(0,N.replace(/[?#].*/,"").lastIndexOf("/")+1):N="",ye=function(v){var j=new XMLHttpRequest;return j.open("GET",v,!1),j.send(null),j.responseText},R&&(qe=function(v){var j=new XMLHttpRequest;return j.open("GET",v,!1),j.responseType="arraybuffer",j.send(null),new Uint8Array(j.response)}),Ee=function(v,j,D){var C=new XMLHttpRequest;C.open("GET",v,!0),C.responseType="arraybuffer",C.onload=function(){if(C.status==200||C.status==0&&C.response){j(C.response);return}D()},C.onerror=D,C.send(null)},Tt=v=>document.title=v);var jn=t.print||console.log.bind(console),ge=t.printErr||console.warn.bind(console);i(t,u),u=null,t.arguments&&(p=t.arguments),t.thisProgram&&(m=t.thisProgram),t.quit&&(B=t.quit);var Ne;t.wasmBinary&&(Ne=t.wasmBinary);var ze=t.noExitRuntime||!0;typeof WebAssembly!="object"&&Dt("no native wasm support detected");var tr,Vt=!1,rr;function Kt(v,j){v||Dt(j)}function Ye(v){var j=t["_"+v];return j}function Jt(v,j,D,C,x){var te={string:function(S){var Nt=0;if(S!=null&&S!==0){var Ut=(S.length<<2)+1;Nt=Xo(Ut),os(S,Nt,Ut)}return Nt},array:function(S){var Nt=Xo(S.length);return ko(S,Nt),Nt}};function J(S){return j==="string"?Ar(S):j==="boolean"?Boolean(S):S}var $=Ye(v),ue=[],Re=0;if(C)for(var Me=0;Me<C.length;Me++){var Mt=te[D[Me]];Mt?(Re===0&&(Re=lu()),ue[Me]=Mt(C[Me])):ue[Me]=C[Me]}var T=$.apply(null,ue);function A(S){return Re!==0&&du(Re),J(S)}return T=A(T),T}var Bn=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function Wa(v,j,D){for(var C=j+D,x=j;v[x]&&!(x>=C);)++x;if(x-j>16&&v.subarray&&Bn)return Bn.decode(v.subarray(j,x));for(var te="";j<x;){var J=v[j++];if(!(J&128)){te+=String.fromCharCode(J);continue}var $=v[j++]&63;if((J&224)==192){te+=String.fromCharCode((J&31)<<6|$);continue}var ue=v[j++]&63;if((J&240)==224?J=(J&15)<<12|$<<6|ue:J=(J&7)<<18|$<<12|ue<<6|v[j++]&63,J<65536)te+=String.fromCharCode(J);else{var Re=J-65536;te+=String.fromCharCode(55296|Re>>10,56320|Re&1023)}}return te}function Ar(v,j){return v?Wa(Lr,v,j):""}function Oo(v,j,D,C){if(!(C>0))return 0;for(var x=D,te=D+C-1,J=0;J<v.length;++J){var $=v.charCodeAt(J);if($>=55296&&$<=57343){var ue=v.charCodeAt(++J);$=65536+(($&1023)<<10)|ue&1023}if($<=127){if(D>=te)break;j[D++]=$}else if($<=2047){if(D+1>=te)break;j[D++]=192|$>>6,j[D++]=128|$&63}else if($<=65535){if(D+2>=te)break;j[D++]=224|$>>12,j[D++]=128|$>>6&63,j[D++]=128|$&63}else{if(D+3>=te)break;j[D++]=240|$>>18,j[D++]=128|$>>12&63,j[D++]=128|$>>6&63,j[D++]=128|$&63}}return j[D]=0,D-x}function os(v,j,D){return Oo(v,Lr,j,D)}function Dr(v){for(var j=0,D=0;D<v.length;++D){var C=v.charCodeAt(D);C>=55296&&C<=57343&&(C=65536+((C&1023)<<10)|v.charCodeAt(++D)&1023),C<=127?++j:C<=2047?j+=2:C<=65535?j+=3:j+=4}return j}function ko(v,j){Tn.set(v,j)}function Co(v,j,D){for(var C=0;C<v.length;++C)Tn[j++>>0]=v.charCodeAt(C);D||(Tn[j>>0]=0)}function vl(v,j){return v%j>0&&(v+=j-v%j),v}var Mo,Tn,Lr,ki,ir,re,Sn,Ya,Q;function Ga(v){Mo=v,t.HEAP8=Tn=new Int8Array(v),t.HEAP16=ki=new Int16Array(v),t.HEAP32=re=new Int32Array(v),t.HEAPU8=Lr=new Uint8Array(v),t.HEAPU16=ir=new Uint16Array(v),t.HEAPU32=Sn=new Uint32Array(v),t.HEAPF32=Ya=new Float32Array(v),t.HEAPF64=Q=new Float64Array(v)}var Y_=t.INITIAL_MEMORY||16777216,$a,Uo=[],wl=[],Ka=[],Eo=[],Ja=!1,jl=!1,Xa=0;function Ro(){return ze||Xa>0}function Bl(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)Al(t.preRun.shift());An(Uo)}function Tl(){Ja=!0,An(wl)}function xo(){An(Ka)}function Sl(){jl=!0}function Il(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)Fl(t.postRun.shift());An(Eo)}function Al(v){Uo.unshift(v)}function Dl(v){wl.unshift(v)}function Fl(v){Eo.unshift(v)}var pi=0,Vo=null,In=null;function _i(v){pi++,t.monitorRunDependencies&&t.monitorRunDependencies(pi)}function No(v){if(pi--,t.monitorRunDependencies&&t.monitorRunDependencies(pi),pi==0&&(Vo!==null&&(clearInterval(Vo),Vo=null),In)){var j=In;In=null,j()}}t.preloadedImages={},t.preloadedAudios={};function Dt(v){t.onAbort&&t.onAbort(v),v="Aborted("+v+")",ge(v),Vt=!0,rr=1,v+=". Build with -s ASSERTIONS=1 for more info.";var j=new WebAssembly.RuntimeError(v);throw s(j),j}var Ol="data:application/octet-stream;base64,";function Za(v){return v.startsWith(Ol)}var Ke;t.locateFile?(Ke="./duckdb-eh.wasm",Za(Ke)||(Ke=Se(Ke))):Ke=new URL("./duckdb-eh.wasm",import.meta.url).toString();function Qa(v){try{if(v==Ke&&Ne)return new Uint8Array(Ne);if(qe)return qe(v);throw"both async and sync fetching of the wasm failed"}catch(j){Dt(j)}}function eu(){return!Ne&&(O||R)&&typeof fetch=="function"?fetch(Ke,{credentials:"same-origin"}).then(function(v){if(!v.ok)throw"failed to load wasm binary file at '"+Ke+"'";return v.arrayBuffer()}).catch(function(){return Qa(Ke)}):Promise.resolve().then(function(){return Qa(Ke)})}function Ht(){var v={a:Mn};function j(J,$){var ue=J.exports;t.asm=ue,tr=t.asm.ea,Ga(tr.buffer),$a=t.asm.ha,Dl(t.asm.fa),No("wasm-instantiate")}_i("wasm-instantiate");function D(J){j(J.instance)}function C(J){return eu().then(function($){return WebAssembly.instantiate($,v)}).then(function($){return $}).then(J,function($){ge("failed to asynchronously prepare wasm: "+$),Dt($)})}function x(){return!Ne&&typeof WebAssembly.instantiateStreaming=="function"&&!Za(Ke)&&typeof fetch=="function"?fetch(Ke,{credentials:"same-origin"}).then(function(J){var $=WebAssembly.instantiateStreaming(J,v);return $.then(D,function(ue){return ge("wasm streaming compile failed: "+ue),ge("falling back to ArrayBuffer instantiation"),C(D)})}):C(D)}if(t.instantiateWasm)try{var te=t.instantiateWasm(v,j);return te}catch(J){return ge("Module.instantiateWasm callback failed with error: "+J),!1}return x().catch(s),{}}function An(v){for(;v.length>0;){var j=v.shift();if(typeof j=="function"){j(t);continue}var D=j.func;typeof D=="number"?j.arg===void 0?tu(D)():tu(D)(j.arg):D(j.arg===void 0?null:j.arg)}}var as=[];function tu(v){var j=as[v];return j||(v>=as.length&&(as.length=v+1),as[v]=j=$a.get(v)),j}function us(v){if(v instanceof Is||v=="unwind")return rr;B(1,v)}function cs(v,j,D,C){Dt("Assertion failed: "+Ar(v)+", at: "+[j?Ar(j):"unknown filename",D,C?Ar(C):"unknown function"])}var X={mappings:{},buffers:[null,[],[]],printChar:function(v,j){var D=X.buffers[v];j===0||j===10?((v===1?jn:ge)(Wa(D,0)),D.length=0):D.push(j)},varargs:void 0,get:function(){X.varargs+=4;var v=re[X.varargs-4>>2];return v},getStr:function(v){var j=Ar(v);return j},get64:function(v,j){return v}};function kl(v,j,D,C,x){}function Cl(v,j){return v=X.getStr(v),X.doAccess(v,j)}function Ml(){ge("missing function: $SOCKFS"),Dt(-1)}function qr(){ge("missing function: $FS"),Dt(-1)}function nr(v){var j=Ml.getSocket(v);if(!j)throw new qr.ErrnoError(8);return j}function ls(v){return re[cu()>>2]=v,v}function Po(v){return(v&255)+"."+(v>>8&255)+"."+(v>>16&255)+"."+(v>>24&255)}function Dn(v){var j="",D=0,C=0,x=0,te=0,J=0,$=0,ue=[v[0]&65535,v[0]>>16,v[1]&65535,v[1]>>16,v[2]&65535,v[2]>>16,v[3]&65535,v[3]>>16],Re=!0,Me="";for($=0;$<5;$++)if(ue[$]!==0){Re=!1;break}if(Re){if(Me=Po(ue[6]|ue[7]<<16),ue[5]===-1)return j="::ffff:",j+=Me,j;if(ue[5]===0)return j="::",Me==="0.0.0.0"&&(Me=""),Me==="0.0.0.1"&&(Me="1"),j+=Me,j}for(D=0;D<8;D++)ue[D]===0&&(D-x>1&&(J=0),x=D,J++),J>C&&(C=J,te=D-C+1);for(D=0;D<8;D++){if(C>1&&ue[D]===0&&D>=te&&D<te+C){D===te&&(j+=":",te===0&&(j+=":"));continue}j+=Number(Jo(ue[D]&65535)).toString(16),j+=D<7?":":""}return j}function ru(v,j){var D=ki[v>>1],C=Jo(ir[v+2>>1]),x;switch(D){case 2:if(j!==16)return{errno:28};x=re[v+4>>2],x=Po(x);break;case 10:if(j!==28)return{errno:28};x=[re[v+8>>2],re[v+12>>2],re[v+16>>2],re[v+20>>2]],x=Dn(x);break;default:return{errno:5}}return{family:D,addr:x,port:C}}function zt(v){for(var j=v.split("."),D=0;D<4;D++){var C=Number(j[D]);if(isNaN(C))return null;j[D]=C}return(j[0]|j[1]<<8|j[2]<<16|j[3]<<24)>>>0}function Fn(v){return parseInt(v)}function Lo(v){var j,D,C,x,te=/^((?=.*::)(?!.*::.+::)(::)?([\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,J=[];if(!te.test(v))return null;if(v==="::")return[0,0,0,0,0,0,0,0];for(v.startsWith("::")?v=v.replace("::","Z:"):v=v.replace("::",":Z:"),v.indexOf(".")>0?(v=v.replace(new RegExp("[.]","g"),":"),j=v.split(":"),j[j.length-4]=Fn(j[j.length-4])+Fn(j[j.length-3])*256,j[j.length-3]=Fn(j[j.length-2])+Fn(j[j.length-1])*256,j=j.slice(0,j.length-2)):j=v.split(":"),C=0,x=0,D=0;D<j.length;D++)if(typeof j[D]=="string")if(j[D]==="Z"){for(x=0;x<8-j.length+1;x++)J[D+x]=0;C=x-1}else J[D+C]=Ts(parseInt(j[D],16));else J[D+C]=j[D];return[J[1]<<16|J[0],J[3]<<16|J[2],J[5]<<16|J[4],J[7]<<16|J[6]]}var Wt={address_map:{id:1,addrs:{},names:{}},lookup_name:function(v){var j=zt(v);if(j!==null||(j=Lo(v),j!==null))return v;var D;if(Wt.address_map.addrs[v])D=Wt.address_map.addrs[v];else{var C=Wt.address_map.id++;Kt(C<65535,"exceeded max address mappings of 65535"),D="172.29."+(C&255)+"."+(C&65280),Wt.address_map.names[D]=v,Wt.address_map.addrs[v]=D}return D},lookup_addr:function(v){return Wt.address_map.names[v]?Wt.address_map.names[v]:null}};function iu(v,j,D){if(D&&v===0)return null;var C=ru(v,j);if(C.errno)throw new qr.ErrnoError(C.errno);return C.addr=Wt.lookup_addr(C.addr)||C.addr,C}function Ul(v,j,D){var C=nr(v),x=iu(j,D);return C.sock_ops.bind(C,x.addr,x.port),0}function El(v,j,D){var C=nr(v),x=iu(j,D);return C.sock_ops.connect(C,x.addr,x.port),0}function Rl(v,j,D){return X.varargs=D,0}function xl(v,j){}function Vl(v,j,D,C){}function Nl(v,j,D){}function Pl(v,j,D){}function ct(v,j){Lr.fill(0,v,v+j)}function qo(v,j,D,C,x){switch(j){case 2:D=zt(D),ct(v,16),x&&(re[x>>2]=16),ki[v>>1]=j,re[v+4>>2]=D,ki[v+2>>1]=Ts(C);break;case 10:D=Lo(D),ct(v,28),x&&(re[x>>2]=28),re[v>>2]=j,re[v+8>>2]=D[0],re[v+12>>2]=D[1],re[v+16>>2]=D[2],re[v+20>>2]=D[3],ki[v+2>>1]=Ts(C);break;default:return 5}return 0}function Ll(v,j,D){var C=nr(v);if(!C.daddr)return-53;var x=qo(j,C.family,Wt.lookup_name(C.daddr),C.dport,D);return 0}function ql(v,j,D,C,x){var te=nr(v);return j===1&&D===4?(re[C>>2]=te.error,re[x>>2]=4,te.error=null,0):-50}function nu(v,j,D){return X.varargs=D,0}function On(v,j){}function Hl(v,j){return v=X.getStr(v),X.doMkdir(v,j)}function Ho(v,j,D){X.varargs=D}function su(v,j,D,C,x,te){var J=nr(v),$=J.sock_ops.recvmsg(J,D);if(!$)return 0;if(x)var ue=qo(x,J.family,Wt.lookup_name($.addr),$.port,te);return Lr.set($.buffer,j),$.buffer.byteLength}function ou(v,j){}function ds(v){}function fs(v,j,D,C,x,te){}function zo(v,j,D){}function Yt(v,j){}function au(v){}function zl(v,j){Dt("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function Wl(v,j){Dt("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function Yl(){Dt("")}var Wo;W?Wo=()=>{var v=process.hrtime();return v[0]*1e3+v[1]/1e6}:Wo=()=>performance.now();var Gl=!0;function $l(v,j){var D;if(v===0)D=Date.now();else if((v===1||v===4)&&Gl)D=Wo();else return ls(28),-1;return re[j>>2]=D/1e3|0,re[j+4>>2]=D%1e3*1e3*1e3|0,0}function Kl(v,j){return globalThis.DUCKDB_RUNTIME.createDirectory(t,v,j)}function uu(v,j){return globalThis.DUCKDB_RUNTIME.checkDirectory(t,v,j)}function Yo(v,j){return globalThis.DUCKDB_RUNTIME.listDirectoryEntries(t,v,j)}function Jl(v,j){return globalThis.DUCKDB_RUNTIME.removeDirectory(t,v,j)}function Xl(v){return globalThis.DUCKDB_RUNTIME.closeFile(t,v)}function Zl(v,j){return globalThis.DUCKDB_RUNTIME.checkFile(t,v,j)}function Ql(v){return globalThis.DUCKDB_RUNTIME.getLastFileModificationTime(t,v)}function ed(v,j,D,C){return globalThis.DUCKDB_RUNTIME.moveFile(t,v,j,D,C)}function td(v,j){return globalThis.DUCKDB_RUNTIME.openFile(t,v,j)}function rd(v,j,D,C){return globalThis.DUCKDB_RUNTIME.readFile(t,v,j,D,C)}function id(v,j){return globalThis.DUCKDB_RUNTIME.truncateFile(t,v,j)}function nd(v,j,D,C){return globalThis.DUCKDB_RUNTIME.writeFile(t,v,j,D,C)}function sd(v,j){return globalThis.DUCKDB_RUNTIME.glob(t,v,j)}function od(v){return globalThis.DUCKDB_RUNTIME.testPlatformFeature(t,v)}function ad(v,j,D,C,x,te){return globalThis.DUCKDB_RUNTIME.callScalarUDF(t,v,j,D,C,x,te)}function ud(){return 2147483648}function cd(v,j,D){Lr.copyWithin(v,j,j+D)}function ld(v){try{return tr.grow(v-Mo.byteLength+65535>>>16),Ga(tr.buffer),1}catch(j){}}function dd(v){var j=Lr.length;v=v>>>0;var D=2147483648;if(v>D)return!1;for(var C=1;C<=4;C*=2){var x=j*(1+.2/C);x=Math.min(x,v+100663296);var te=Math.min(D,vl(Math.max(v,x),65536)),J=ld(te);if(J)return!0}return!1}var kn={};function fd(){return m||"./this.program"}function Cn(){if(!Cn.strings){var v=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",j={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:v,_:fd()};for(var D in kn)kn[D]===void 0?delete j[D]:j[D]=kn[D];var C=[];for(var D in j)C.push(D+"="+j[D]);Cn.strings=C}return Cn.strings}function hd(v,j){var D=0;return Cn().forEach(function(C,x){var te=j+D;re[v+x*4>>2]=te,Co(C,te),D+=C.length+1}),0}function pd(v,j){var D=Cn();re[v>>2]=D.length;var C=0;return D.forEach(function(x){C+=x.length+1}),re[j>>2]=C,0}function _d(v){return 0}function yd(v,j,D,C,x,te){var J=X.getStreamFromFD(v),$=X.doReadv(J,j,D,C);return re[te>>2]=$,0}function md(v,j,D,C,x,te){var J=X.getStreamFromFD(v),$=X.doWritev(J,j,D,C);return re[te>>2]=$,0}function bd(v,j,D,C){var x=X.getStreamFromFD(v),te=X.doReadv(x,j,D);return re[C>>2]=te,0}function gd(v,j,D,C,x){}function vd(v){var j=X.getStreamFromFD(v);return j.stream_ops&&j.stream_ops.fsync?-j.stream_ops.fsync(j):0}function wd(v,j,D,C){for(var x=0,te=0;te<D;te++){var J=re[j>>2],$=re[j+4>>2];j+=8;for(var ue=0;ue<$;ue++)X.printChar(v,Lr[J+ue]);x+=$}return re[C>>2]=x,0}function jd(v,j,D,C){var x=0,te=0,J=0,$=0,ue=0,Re=0,Me;function Mt(T,A,S,Nt,Ut,Ci){var q,ce,xe,Ve;return ce=T===10?28:16,Ut=T===10?Dn(Ut):Po(Ut),q=Zo(ce),Ve=qo(q,T,Ut,Ci),Kt(!Ve),xe=Zo(32),re[xe+4>>2]=T,re[xe+8>>2]=A,re[xe+12>>2]=S,re[xe+24>>2]=Nt,re[xe+20>>2]=q,T===10?re[xe+16>>2]=28:re[xe+16>>2]=16,re[xe+28>>2]=0,xe}if(D&&(J=re[D>>2],$=re[D+4>>2],ue=re[D+8>>2],Re=re[D+12>>2]),ue&&!Re&&(Re=ue===2?17:6),!ue&&Re&&(ue=Re===17?2:1),Re===0&&(Re=6),ue===0&&(ue=1),!v&&!j)return-2;if(J&-1088||D!==0&&re[D>>2]&2&&!v)return-1;if(J&32)return-2;if(ue!==0&&ue!==1&&ue!==2)return-7;if($!==0&&$!==2&&$!==10)return-6;if(j&&(j=Ar(j),te=parseInt(j,10),isNaN(te)))return J&1024?-2:-8;if(!v)return $===0&&($=2),(J&1)===0&&($===2?x=Bs(2130706433):x=[0,0,0,1]),Me=Mt($,ue,Re,null,x,te),re[C>>2]=Me,0;if(v=Ar(v),x=zt(v),x!==null)if($===0||$===2)$=2;else if($===10&&J&8)x=[0,0,Bs(65535),x],$=10;else return-2;else if(x=Lo(v),x!==null)if($===0||$===10)$=10;else return-2;return x!=null?(Me=Mt($,ue,Re,v,x,te),re[C>>2]=Me,0):J&4?-2:(v=Wt.lookup_name(v),x=zt(v),$===0?$=2:$===10&&(x=[0,0,Bs(65535),x]),Me=Mt($,ue,Re,null,x,te),re[C>>2]=Me,0)}function Bd(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var v=new Uint8Array(1);return function(){return crypto.getRandomValues(v),v[0]}}else if(W)try{var j=bg("crypto");return function(){return j.randomBytes(1)[0]}}catch(D){}return function(){Dt("randomDevice")}}function hs(v,j){hs.randomDevice||(hs.randomDevice=Bd());for(var D=0;D<j;D++)Tn[v+D>>0]=hs.randomDevice();return 0}function Td(v,j,D,C,x,te,J){var $=ru(v,j);if($.errno)return-6;var ue=$.port,Re=$.addr,Me=!1;if(D&&C){var Mt;if(J&1||!(Mt=Wt.lookup_addr(Re))){if(J&8)return-2}else Re=Mt;var T=os(Re,D,C);T+1>=C&&(Me=!0)}if(x&&te){ue=""+ue;var T=os(ue,x,te);T+1>=te&&(Me=!0)}return Me?-12:0}function ps(v){return v%4===0&&(v%100!==0||v%400===0)}function Go(v,j){for(var D=0,C=0;C<=j;D+=v[C++]);return D}var _s=[31,29,31,30,31,30,31,31,30,31,30,31],ys=[31,28,31,30,31,30,31,31,30,31,30,31];function ms(v,j){for(var D=new Date(v.getTime());j>0;){var C=ps(D.getFullYear()),x=D.getMonth(),te=(C?_s:ys)[x];if(j>te-D.getDate())j-=te-D.getDate()+1,D.setDate(1),x<11?D.setMonth(x+1):(D.setMonth(0),D.setFullYear(D.getFullYear()+1));else return D.setDate(D.getDate()+j),D}return D}function Sd(v,j,D,C){var x=re[C+40>>2],te={tm_sec:re[C>>2],tm_min:re[C+4>>2],tm_hour:re[C+8>>2],tm_mday:re[C+12>>2],tm_mon:re[C+16>>2],tm_year:re[C+20>>2],tm_wday:re[C+24>>2],tm_yday:re[C+28>>2],tm_isdst:re[C+32>>2],tm_gmtoff:re[C+36>>2],tm_zone:x?Ar(x):""},J=Ar(D),$={"%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 ue in $)J=J.replace(new RegExp(ue,"g"),$[ue]);var Re=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Me=["January","February","March","April","May","June","July","August","September","October","November","December"];function Mt(q,ce,xe){for(var Ve=typeof q=="number"?q.toString():q||"";Ve.length<ce;)Ve=xe[0]+Ve;return Ve}function T(q,ce){return Mt(q,ce,"0")}function A(q,ce){function xe(Xt){return Xt<0?-1:Xt>0?1:0}var Ve;return(Ve=xe(q.getFullYear()-ce.getFullYear()))===0&&(Ve=xe(q.getMonth()-ce.getMonth()))===0&&(Ve=xe(q.getDate()-ce.getDate())),Ve}function S(q){switch(q.getDay()){case 0:return new Date(q.getFullYear()-1,11,29);case 1:return q;case 2:return new Date(q.getFullYear(),0,3);case 3:return new Date(q.getFullYear(),0,2);case 4:return new Date(q.getFullYear(),0,1);case 5:return new Date(q.getFullYear()-1,11,31);case 6:return new Date(q.getFullYear()-1,11,30)}}function Nt(q){var ce=ms(new Date(q.tm_year+1900,0,1),q.tm_yday),xe=new Date(ce.getFullYear(),0,4),Ve=new Date(ce.getFullYear()+1,0,4),Xt=S(xe),Fr=S(Ve);return A(Xt,ce)<=0?A(Fr,ce)<=0?ce.getFullYear()+1:ce.getFullYear():ce.getFullYear()-1}var Ut={"%a":function(q){return Re[q.tm_wday].substring(0,3)},"%A":function(q){return Re[q.tm_wday]},"%b":function(q){return Me[q.tm_mon].substring(0,3)},"%B":function(q){return Me[q.tm_mon]},"%C":function(q){var ce=q.tm_year+1900;return T(ce/100|0,2)},"%d":function(q){return T(q.tm_mday,2)},"%e":function(q){return Mt(q.tm_mday,2," ")},"%g":function(q){return Nt(q).toString().substring(2)},"%G":function(q){return Nt(q)},"%H":function(q){return T(q.tm_hour,2)},"%I":function(q){var ce=q.tm_hour;return ce==0?ce=12:ce>12&&(ce-=12),T(ce,2)},"%j":function(q){return T(q.tm_mday+Go(ps(q.tm_year+1900)?_s:ys,q.tm_mon-1),3)},"%m":function(q){return T(q.tm_mon+1,2)},"%M":function(q){return T(q.tm_min,2)},"%n":function(){return`
32
32
  `},"%p":function(q){return q.tm_hour>=0&&q.tm_hour<12?"AM":"PM"},"%S":function(q){return T(q.tm_sec,2)},"%t":function(){return" "},"%u":function(q){return q.tm_wday||7},"%U":function(q){var ce=new Date(q.tm_year+1900,0,1),xe=ce.getDay()===0?ce:ms(ce,7-ce.getDay()),Ve=new Date(q.tm_year+1900,q.tm_mon,q.tm_mday);if(A(xe,Ve)<0){var Xt=Go(ps(Ve.getFullYear())?_s:ys,Ve.getMonth()-1)-31,Fr=31-xe.getDate(),Hr=Fr+Xt+Ve.getDate();return T(Math.ceil(Hr/7),2)}return A(xe,ce)===0?"01":"00"},"%V":function(q){var ce=new Date(q.tm_year+1900,0,4),xe=new Date(q.tm_year+1901,0,4),Ve=S(ce),Xt=S(xe),Fr=ms(new Date(q.tm_year+1900,0,1),q.tm_yday);if(A(Fr,Ve)<0)return"53";if(A(Xt,Fr)<=0)return"01";var Hr;return Ve.getFullYear()<q.tm_year+1900?Hr=q.tm_yday+32-Ve.getDate():Hr=q.tm_yday+1-Ve.getDate(),T(Math.ceil(Hr/7),2)},"%w":function(q){return q.tm_wday},"%W":function(q){var ce=new Date(q.tm_year,0,1),xe=ce.getDay()===1?ce:ms(ce,ce.getDay()===0?1:7-ce.getDay()+1),Ve=new Date(q.tm_year+1900,q.tm_mon,q.tm_mday);if(A(xe,Ve)<0){var Xt=Go(ps(Ve.getFullYear())?_s:ys,Ve.getMonth()-1)-31,Fr=31-xe.getDate(),Hr=Fr+Xt+Ve.getDate();return T(Math.ceil(Hr/7),2)}return A(xe,ce)===0?"01":"00"},"%y":function(q){return(q.tm_year+1900).toString().substring(2)},"%Y":function(q){return q.tm_year+1900},"%z":function(q){var ce=q.tm_gmtoff,xe=ce>=0;return ce=Math.abs(ce)/60,ce=ce/60*100+ce%60,(xe?"+":"-")+String("0000"+ce).slice(-4)},"%Z":function(q){return q.tm_zone},"%%":function(){return"%"}};for(var ue in Ut)J.includes(ue)&&(J=J.replace(new RegExp(ue,"g"),Ut[ue](te)));var Ci=Id(J,!1);return Ci.length>j?0:(ko(Ci,v),Ci.length-1)}function $o(v,j,D,C){return Sd(v,j,D,C)}function Id(v,j,D){var C=D>0?D:Dr(v)+1,x=new Array(C),te=Oo(v,x,0,x.length);return j&&(x.length=te),x}var Mn={a:cs,R:kl,L:Cl,T:Ul,S:El,b:Rl,$:xl,Z:Vl,W:Nl,X:Pl,N:Ll,Q:ql,ba:nu,Y:On,aa:Hl,q:Ho,O:su,J:ou,o:ds,P:fs,k:zo,_:Yt,p:au,m:zl,U:Wl,d:Yl,n:$l,D:Kl,E:uu,B:Yo,C:Jl,h:Xl,z:Zl,G:Ql,A:ed,H:td,f:rd,F:id,i:nd,y:sd,g:od,I:ad,r:ud,ca:cd,da:dd,t:hd,u:pd,c:_d,w:yd,v:md,j:bd,x:gd,K:vd,e:wd,l:jd,V:hs,M:Td,s:$o},G_=Ht(),Ad=t.___wasm_call_ctors=function(){return(Ad=t.___wasm_call_ctors=t.asm.fa).apply(null,arguments)},Dd=t._main=function(){return(Dd=t._main=t.asm.ga).apply(null,arguments)},Fd=t._duckdb_web_fs_glob_add_path=function(){return(Fd=t._duckdb_web_fs_glob_add_path=t.asm.ia).apply(null,arguments)},Od=t._duckdb_web_clear_response=function(){return(Od=t._duckdb_web_clear_response=t.asm.ja).apply(null,arguments)},kd=t._duckdb_web_fail_with=function(){return(kd=t._duckdb_web_fail_with=t.asm.ka).apply(null,arguments)},Cd=t._duckdb_web_reset=function(){return(Cd=t._duckdb_web_reset=t.asm.la).apply(null,arguments)},Md=t._duckdb_web_connect=function(){return(Md=t._duckdb_web_connect=t.asm.ma).apply(null,arguments)},Ud=t._duckdb_web_disconnect=function(){return(Ud=t._duckdb_web_disconnect=t.asm.na).apply(null,arguments)},Ed=t._duckdb_web_flush_files=function(){return(Ed=t._duckdb_web_flush_files=t.asm.oa).apply(null,arguments)},Rd=t._duckdb_web_flush_file=function(){return(Rd=t._duckdb_web_flush_file=t.asm.pa).apply(null,arguments)},xd=t._duckdb_web_open=function(){return(xd=t._duckdb_web_open=t.asm.qa).apply(null,arguments)},bs=t._duckdb_web_get_global_file_info=function(){return(bs=t._duckdb_web_get_global_file_info=t.asm.ra).apply(null,arguments)},Vd=t._duckdb_web_collect_file_stats=function(){return(Vd=t._duckdb_web_collect_file_stats=t.asm.sa).apply(null,arguments)},Nd=t._duckdb_web_export_file_stats=function(){return(Nd=t._duckdb_web_export_file_stats=t.asm.ta).apply(null,arguments)},Pd=t._duckdb_web_fs_drop_file=function(){return(Pd=t._duckdb_web_fs_drop_file=t.asm.ua).apply(null,arguments)},gs=t._duckdb_web_fs_drop_files=function(){return(gs=t._duckdb_web_fs_drop_files=t.asm.va).apply(null,arguments)},Ko=t._duckdb_web_fs_glob_file_infos=function(){return(Ko=t._duckdb_web_fs_glob_file_infos=t.asm.wa).apply(null,arguments)},vs=t._duckdb_web_fs_get_file_info_by_id=function(){return(vs=t._duckdb_web_fs_get_file_info_by_id=t.asm.xa).apply(null,arguments)},ws=t._duckdb_web_fs_get_file_info_by_name=function(){return(ws=t._duckdb_web_fs_get_file_info_by_name=t.asm.ya).apply(null,arguments)},js=t._duckdb_web_fs_set_file_descriptor=function(){return(js=t._duckdb_web_fs_set_file_descriptor=t.asm.za).apply(null,arguments)},Ld=t._duckdb_web_fs_register_file_url=function(){return(Ld=t._duckdb_web_fs_register_file_url=t.asm.Aa).apply(null,arguments)},qd=t._duckdb_web_fs_register_file_buffer=function(){return(qd=t._duckdb_web_fs_register_file_buffer=t.asm.Ba).apply(null,arguments)},Hd=t._duckdb_web_copy_file_to_buffer=function(){return(Hd=t._duckdb_web_copy_file_to_buffer=t.asm.Ca).apply(null,arguments)},zd=t._duckdb_web_copy_file_to_path=function(){return(zd=t._duckdb_web_copy_file_to_path=t.asm.Da).apply(null,arguments)},$_=t._duckdb_web_get_version=function(){return($_=t._duckdb_web_get_version=t.asm.Ea).apply(null,arguments)},Wd=t._duckdb_web_get_feature_flags=function(){return(Wd=t._duckdb_web_get_feature_flags=t.asm.Fa).apply(null,arguments)},Yd=t._duckdb_web_tokenize=function(){return(Yd=t._duckdb_web_tokenize=t.asm.Ga).apply(null,arguments)},Gd=t._duckdb_web_udf_scalar_create=function(){return(Gd=t._duckdb_web_udf_scalar_create=t.asm.Ha).apply(null,arguments)},$d=t._duckdb_web_prepared_create=function(){return($d=t._duckdb_web_prepared_create=t.asm.Ia).apply(null,arguments)},Kd=t._duckdb_web_prepared_close=function(){return(Kd=t._duckdb_web_prepared_close=t.asm.Ja).apply(null,arguments)},Jd=t._duckdb_web_prepared_run=function(){return(Jd=t._duckdb_web_prepared_run=t.asm.Ka).apply(null,arguments)},Xd=t._duckdb_web_prepared_send=function(){return(Xd=t._duckdb_web_prepared_send=t.asm.La).apply(null,arguments)},Zd=t._duckdb_web_query_run=function(){return(Zd=t._duckdb_web_query_run=t.asm.Ma).apply(null,arguments)},Qd=t._duckdb_web_query_send=function(){return(Qd=t._duckdb_web_query_send=t.asm.Na).apply(null,arguments)},ef=t._duckdb_web_query_fetch_results=function(){return(ef=t._duckdb_web_query_fetch_results=t.asm.Oa).apply(null,arguments)},tf=t._duckdb_web_get_tablenames=function(){return(tf=t._duckdb_web_get_tablenames=t.asm.Pa).apply(null,arguments)},rf=t._duckdb_web_insert_arrow_from_ipc_stream=function(){return(rf=t._duckdb_web_insert_arrow_from_ipc_stream=t.asm.Qa).apply(null,arguments)},nf=t._duckdb_web_insert_csv_from_path=function(){return(nf=t._duckdb_web_insert_csv_from_path=t.asm.Ra).apply(null,arguments)},sf=t._duckdb_web_insert_json_from_path=function(){return(sf=t._duckdb_web_insert_json_from_path=t.asm.Sa).apply(null,arguments)},cu=t.___errno_location=function(){return(cu=t.___errno_location=t.asm.Ta).apply(null,arguments)},Bs=t._htonl=function(){return(Bs=t._htonl=t.asm.Ua).apply(null,arguments)},Ts=t._htons=function(){return(Ts=t._htons=t.asm.Va).apply(null,arguments)},Jo=t._ntohs=function(){return(Jo=t._ntohs=t.asm.Wa).apply(null,arguments)},lu=t.stackSave=function(){return(lu=t.stackSave=t.asm.Xa).apply(null,arguments)},du=t.stackRestore=function(){return(du=t.stackRestore=t.asm.Ya).apply(null,arguments)},Xo=t.stackAlloc=function(){return(Xo=t.stackAlloc=t.asm.Za).apply(null,arguments)},Zo=t._malloc=function(){return(Zo=t._malloc=t.asm._a).apply(null,arguments)},of=t._free=function(){return(of=t._free=t.asm.$a).apply(null,arguments)};t.ccall=Jt;var Ss;function Is(v){this.name="ExitStatus",this.message="Program terminated with exit("+v+")",this.status=v}var af=!1;In=function v(){Ss||Qo(),Ss||(In=v)};function uf(v){var j=t._main,D=0,C=0;try{var x=j(D,C);return cf(x,!0),x}catch(te){return us(te)}finally{af=!0}}function Qo(v){if(v=v||p,pi>0||(Bl(),pi>0))return;function j(){Ss||(Ss=!0,t.calledRun=!0,!Vt&&(Tl(),xo(),n(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),fu&&uf(v),Il()))}t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),j()},1)):j()}t.run=Qo;function cf(v,j){rr=v,Ro()||Sl(),lf(v)}function lf(v){rr=v,Ro()||(t.onExit&&t.onExit(v),Vt=!0),B(v,new Is(v))}if(t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();var fu=!0;return t.noInitialRun&&(fu=!1),Qo(),e.ready}})(),K1=tE;var W_=class extends za{constructor(e,t,i,n=null){super(e,t,i,n)}instantiateImpl(e){return K1(En(zr({},e),{instantiateWasm:this.instantiateWasm.bind(this),locateFile:this.locateFile.bind(this)}))}};async function K6(r,e,t){return(await q_()).wasmExceptions&&r.eh?new W_(e,t,r.eh.mainModule):new z_(e,t,r.mvp.mainModule)}export{ht as BROWSER_RUNTIME,FU as ConsoleLogger,V1 as DEFAULT_RUNTIME,E_ as DuckDBBindingsBase,O_ as DuckDBConnection,R1 as DuckDBDataProtocol,jU as DuckDBFeature,x1 as FileFlags,M_ as FileStatistics,BU as JSONTableShape,IU as LogEvent,TU as LogLevel,AU as LogOrigin,SU as LogTopic,H1 as PACKAGE_NAME,z1 as PACKAGE_VERSION,y6 as PACKAGE_VERSION_MAJOR,m6 as PACKAGE_VERSION_MINOR,b6 as PACKAGE_VERSION_PATCH,U1 as PreparedStatement,k_ as ResultStreamIterator,mU as StatusCode,DU as VoidLogger,He as callSRet,Fo as copyBuffer,K6 as createDuckDB,vU as decodeText,Ze as dropResponseBuffers,hi as failWith,w6 as getJsDelivrBundles,l6 as getLogEventLabel,c6 as getLogLevelLabel,f6 as getLogOriginLabel,d6 as getLogTopicLabel,q_ as getPlatformFeatures,Ae as readString,j6 as selectBundle};
33
33
  /*! *****************************************************************************
34
34
  Copyright (c) Microsoft Corporation.