openms-insight 0.1.11__tar.gz → 0.1.12__tar.gz

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.
Files changed (31) hide show
  1. {openms_insight-0.1.11 → openms_insight-0.1.12}/PKG-INFO +1 -1
  2. {openms_insight-0.1.11 → openms_insight-0.1.12}/openms_insight/js-component/dist/assets/index.js +1 -1
  3. {openms_insight-0.1.11 → openms_insight-0.1.12}/pyproject.toml +1 -1
  4. {openms_insight-0.1.11 → openms_insight-0.1.12}/.gitignore +0 -0
  5. {openms_insight-0.1.11 → openms_insight-0.1.12}/LICENSE +0 -0
  6. {openms_insight-0.1.11 → openms_insight-0.1.12}/README.md +0 -0
  7. {openms_insight-0.1.11 → openms_insight-0.1.12}/openms_insight/__init__.py +0 -0
  8. {openms_insight-0.1.11 → openms_insight-0.1.12}/openms_insight/components/__init__.py +0 -0
  9. {openms_insight-0.1.11 → openms_insight-0.1.12}/openms_insight/components/heatmap.py +0 -0
  10. {openms_insight-0.1.11 → openms_insight-0.1.12}/openms_insight/components/lineplot.py +0 -0
  11. {openms_insight-0.1.11 → openms_insight-0.1.12}/openms_insight/components/sequenceview.py +0 -0
  12. {openms_insight-0.1.11 → openms_insight-0.1.12}/openms_insight/components/table.py +0 -0
  13. {openms_insight-0.1.11 → openms_insight-0.1.12}/openms_insight/components/volcanoplot.py +0 -0
  14. {openms_insight-0.1.11 → openms_insight-0.1.12}/openms_insight/core/__init__.py +0 -0
  15. {openms_insight-0.1.11 → openms_insight-0.1.12}/openms_insight/core/base.py +0 -0
  16. {openms_insight-0.1.11 → openms_insight-0.1.12}/openms_insight/core/cache.py +0 -0
  17. {openms_insight-0.1.11 → openms_insight-0.1.12}/openms_insight/core/registry.py +0 -0
  18. {openms_insight-0.1.11 → openms_insight-0.1.12}/openms_insight/core/state.py +0 -0
  19. {openms_insight-0.1.11 → openms_insight-0.1.12}/openms_insight/core/subprocess_preprocess.py +0 -0
  20. {openms_insight-0.1.11 → openms_insight-0.1.12}/openms_insight/js-component/dist/assets/index.css +0 -0
  21. {openms_insight-0.1.11 → openms_insight-0.1.12}/openms_insight/js-component/dist/assets/materialdesignicons-webfont.eot +0 -0
  22. {openms_insight-0.1.11 → openms_insight-0.1.12}/openms_insight/js-component/dist/assets/materialdesignicons-webfont.ttf +0 -0
  23. {openms_insight-0.1.11 → openms_insight-0.1.12}/openms_insight/js-component/dist/assets/materialdesignicons-webfont.woff +0 -0
  24. {openms_insight-0.1.11 → openms_insight-0.1.12}/openms_insight/js-component/dist/assets/materialdesignicons-webfont.woff2 +0 -0
  25. {openms_insight-0.1.11 → openms_insight-0.1.12}/openms_insight/js-component/dist/index.html +0 -0
  26. {openms_insight-0.1.11 → openms_insight-0.1.12}/openms_insight/preprocessing/__init__.py +0 -0
  27. {openms_insight-0.1.11 → openms_insight-0.1.12}/openms_insight/preprocessing/compression.py +0 -0
  28. {openms_insight-0.1.11 → openms_insight-0.1.12}/openms_insight/preprocessing/filtering.py +0 -0
  29. {openms_insight-0.1.11 → openms_insight-0.1.12}/openms_insight/preprocessing/scatter.py +0 -0
  30. {openms_insight-0.1.11 → openms_insight-0.1.12}/openms_insight/rendering/__init__.py +0 -0
  31. {openms_insight-0.1.11 → openms_insight-0.1.12}/openms_insight/rendering/bridge.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openms-insight
3
- Version: 0.1.11
3
+ Version: 0.1.12
4
4
  Summary: Interactive visualization components for mass spectrometry data in Streamlit
5
5
  Project-URL: Homepage, https://github.com/t0mdavid-m/OpenMS-Insight
6
6
  Project-URL: Documentation, https://github.com/t0mdavid-m/OpenMS-Insight#readme
@@ -52,7 +52,7 @@ object-assign
52
52
  background-color: var(--background-color);
53
53
  color: var(--text-color);
54
54
  }
55
- `)};function kj(t){var e=!1;try{e=t instanceof BigInt64Array||t instanceof BigUint64Array}catch{}return t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array||e}var Sj=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,R){u.__proto__=R}||function(u,R){for(var p in R)Object.prototype.hasOwnProperty.call(R,p)&&(u[p]=R[p])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function u(){this.constructor=e}e.prototype=r===null?Object.create(r):(u.prototype=r.prototype,new u)}}();(function(t){Sj(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.componentDidMount=function(){Hc.setFrameHeight()},e.prototype.componentDidUpdate=function(){Hc.setFrameHeight()},e})(FB.PureComponent);const Aj=new TextDecoder("utf-8"),Cj=t=>Aj.decode(t),Mj=new TextEncoder,b7=t=>Mj.encode(t),rv=t=>typeof t=="function",x7=t=>t!=null&&Object(t)===t,Ej=t=>x7(t)&&"done"in t&&"value"in t,Ij=t=>x7(t)&&rv(t.clear)&&rv(t.bytes)&&rv(t.position)&&rv(t.setPosition)&&rv(t.capacity)&&rv(t.getBufferIdentifier)&&rv(t.createLong),Lj=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;function _7(t,e){let r=Ej(e)?e.value:e;return r instanceof t?t===Uint8Array?new t(r.buffer,r.byteOffset,r.byteLength):r:r?(typeof r=="string"&&(r=b7(r)),r instanceof ArrayBuffer?new t(r):r instanceof Lj?new t(r):Ij(r)?_7(t,r.bytes()):ArrayBuffer.isView(r)?r.byteLength<=0?new t(0):new t(r.buffer,r.byteOffset,r.byteLength/t.BYTES_PER_ELEMENT):t.from(r)):new t(0)}function Pj(t,e){let r=0;const u=t.length;if(u!==e.length)return!1;if(u>0)do if(t[r]!==e[r])return!1;while(++r<u);return!0}var dp;(function(t){t[t.Sparse=0]="Sparse",t[t.Dense=1]="Dense"})(dp||(dp={}));var Of;(function(t){t[t.HALF=0]="HALF",t[t.SINGLE=1]="SINGLE",t[t.DOUBLE=2]="DOUBLE"})(Of||(Of={}));var dg;(function(t){t[t.DAY=0]="DAY",t[t.MILLISECOND=1]="MILLISECOND"})(dg||(dg={}));var Ja;(function(t){t[t.SECOND=0]="SECOND",t[t.MILLISECOND=1]="MILLISECOND",t[t.MICROSECOND=2]="MICROSECOND",t[t.NANOSECOND=3]="NANOSECOND"})(Ja||(Ja={}));var Iv;(function(t){t[t.YEAR_MONTH=0]="YEAR_MONTH",t[t.DAY_TIME=1]="DAY_TIME",t[t.MONTH_DAY_NANO=2]="MONTH_DAY_NANO"})(Iv||(Iv={}));var _r;(function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Duration=18]="Duration",t[t.LargeBinary=19]="LargeBinary",t[t.LargeUtf8=20]="LargeUtf8",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth",t[t.DurationSecond=-27]="DurationSecond",t[t.DurationMillisecond=-28]="DurationMillisecond",t[t.DurationMicrosecond=-29]="DurationMicrosecond",t[t.DurationNanosecond=-30]="DurationNanosecond"})(_r||(_r={}));var jp;(function(t){t[t.OFFSET=0]="OFFSET",t[t.DATA=1]="DATA",t[t.VALIDITY=2]="VALIDITY",t[t.TYPE=3]="TYPE"})(jp||(jp={}));const Dj=void 0;function Cb(t){if(t===null)return"null";if(t===Dj)return"undefined";switch(typeof t){case"number":return`${t}`;case"bigint":return`${t}`;case"string":return`"${t}"`}return typeof t[Symbol.toPrimitive]=="function"?t[Symbol.toPrimitive]("string"):ArrayBuffer.isView(t)?t instanceof BigInt64Array||t instanceof BigUint64Array?`[${[...t].map(e=>Cb(e))}]`:`[${t}]`:ArrayBuffer.isView(t)?`[${t}]`:JSON.stringify(t,(e,r)=>typeof r=="bigint"?`${r}`:r)}function Xh(t){if(typeof t=="bigint"&&(t<Number.MIN_SAFE_INTEGER||t>Number.MAX_SAFE_INTEGER))throw new TypeError(`${t} is not safe to convert to a number.`);return Number(t)}function w7(t,e){return Xh(t/e)+Xh(t%e)/Xh(e)}const Rj=Symbol.for("isArrowBigNum");function Pd(t,...e){return e.length===0?Object.setPrototypeOf(_7(this.TypedArray,t),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(t,...e),this.constructor.prototype)}Pd.prototype[Rj]=!0;Pd.prototype.toJSON=function(){return`"${Eb(this)}"`};Pd.prototype.valueOf=function(t){return T7(this,t)};Pd.prototype.toString=function(){return Eb(this)};Pd.prototype[Symbol.toPrimitive]=function(t="default"){switch(t){case"number":return T7(this);case"string":return Eb(this);case"default":return Fj(this)}return Eb(this)};function ly(...t){return Pd.apply(this,t)}function uy(...t){return Pd.apply(this,t)}function Mb(...t){return Pd.apply(this,t)}Object.setPrototypeOf(ly.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(uy.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(Mb.prototype,Object.create(Uint32Array.prototype));Object.assign(ly.prototype,Pd.prototype,{constructor:ly,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array});Object.assign(uy.prototype,Pd.prototype,{constructor:uy,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array});Object.assign(Mb.prototype,Pd.prototype,{constructor:Mb,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const Oj=BigInt(4294967296)*BigInt(4294967296),zj=Oj-BigInt(1);function T7(t,e){const{buffer:r,byteOffset:u,byteLength:R,signed:p}=t,f=new BigUint64Array(r,u,R/8),n=p&&f.at(-1)&BigInt(1)<<BigInt(63);let l=BigInt(0),c=0;if(n){for(const i of f)l|=(i^zj)*(BigInt(1)<<BigInt(64*c++));l*=BigInt(-1),l-=BigInt(1)}else for(const i of f)l|=i*(BigInt(1)<<BigInt(64*c++));if(typeof e=="number"){const i=BigInt(Math.pow(10,e)),_=l/i,b=l%i;return Xh(_)+Xh(b)/Xh(i)}return Xh(l)}function Eb(t){if(t.byteLength===8)return`${new t.BigIntArray(t.buffer,t.byteOffset,1)[0]}`;if(!t.signed)return p5(t);let e=new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2);if(new Int16Array([e.at(-1)])[0]>=0)return p5(t);e=e.slice();let u=1;for(let p=0;p<e.length;p++){const f=e[p],n=~f+u;e[p]=n,u&=f===0?1:0}return`-${p5(e)}`}function Fj(t){return t.byteLength===8?new t.BigIntArray(t.buffer,t.byteOffset,1)[0]:Eb(t)}function p5(t){let e="";const r=new Uint32Array(2);let u=new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2);const R=new Uint32Array((u=new Uint16Array(u).reverse()).buffer);let p=-1;const f=u.length-1;do{for(r[0]=u[p=0];p<f;)u[p++]=r[1]=r[0]/10,r[0]=(r[0]-r[1]*10<<16)+u[p];u[p]=r[1]=r[0]/10,r[0]=r[0]-r[1]*10,e=`${r[0]}${e}`}while(R[0]||R[1]||R[2]||R[3]);return e??"0"}class B4{static new(e,r){switch(r){case!0:return new ly(e);case!1:return new uy(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case BigInt64Array:return new ly(e)}return e.byteLength===16?new Mb(e):new uy(e)}static signed(e){return new ly(e)}static unsigned(e){return new uy(e)}static decimal(e){return new Mb(e)}constructor(e,r){return B4.new(e,r)}}var k7,S7,A7,C7,M7,E7,I7,L7,P7,D7,R7,O7,z7,F7,B7,N7,V7,j7,U7,H7,q7,W7;class so{static isNull(e){return(e==null?void 0:e.typeId)===_r.Null}static isInt(e){return(e==null?void 0:e.typeId)===_r.Int}static isFloat(e){return(e==null?void 0:e.typeId)===_r.Float}static isBinary(e){return(e==null?void 0:e.typeId)===_r.Binary}static isLargeBinary(e){return(e==null?void 0:e.typeId)===_r.LargeBinary}static isUtf8(e){return(e==null?void 0:e.typeId)===_r.Utf8}static isLargeUtf8(e){return(e==null?void 0:e.typeId)===_r.LargeUtf8}static isBool(e){return(e==null?void 0:e.typeId)===_r.Bool}static isDecimal(e){return(e==null?void 0:e.typeId)===_r.Decimal}static isDate(e){return(e==null?void 0:e.typeId)===_r.Date}static isTime(e){return(e==null?void 0:e.typeId)===_r.Time}static isTimestamp(e){return(e==null?void 0:e.typeId)===_r.Timestamp}static isInterval(e){return(e==null?void 0:e.typeId)===_r.Interval}static isDuration(e){return(e==null?void 0:e.typeId)===_r.Duration}static isList(e){return(e==null?void 0:e.typeId)===_r.List}static isStruct(e){return(e==null?void 0:e.typeId)===_r.Struct}static isUnion(e){return(e==null?void 0:e.typeId)===_r.Union}static isFixedSizeBinary(e){return(e==null?void 0:e.typeId)===_r.FixedSizeBinary}static isFixedSizeList(e){return(e==null?void 0:e.typeId)===_r.FixedSizeList}static isMap(e){return(e==null?void 0:e.typeId)===_r.Map}static isDictionary(e){return(e==null?void 0:e.typeId)===_r.Dictionary}static isDenseUnion(e){return so.isUnion(e)&&e.mode===dp.Dense}static isSparseUnion(e){return so.isUnion(e)&&e.mode===dp.Sparse}constructor(e){this.typeId=e}}k7=Symbol.toStringTag;so[k7]=(t=>(t.children=null,t.ArrayType=Array,t.OffsetArrayType=Int32Array,t[Symbol.toStringTag]="DataType"))(so.prototype);class PC extends so{constructor(){super(_r.Null)}toString(){return"Null"}}S7=Symbol.toStringTag;PC[S7]=(t=>t[Symbol.toStringTag]="Null")(PC.prototype);class DC extends so{constructor(e,r){super(_r.Int),this.isSigned=e,this.bitWidth=r}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}A7=Symbol.toStringTag;DC[A7]=(t=>(t.isSigned=null,t.bitWidth=null,t[Symbol.toStringTag]="Int"))(DC.prototype);class RC extends so{constructor(e){super(_r.Float),this.precision=e}get ArrayType(){switch(this.precision){case Of.HALF:return Uint16Array;case Of.SINGLE:return Float32Array;case Of.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}}C7=Symbol.toStringTag;RC[C7]=(t=>(t.precision=null,t[Symbol.toStringTag]="Float"))(RC.prototype);class OC extends so{constructor(){super(_r.Binary)}toString(){return"Binary"}}M7=Symbol.toStringTag;OC[M7]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Binary"))(OC.prototype);class zC extends so{constructor(){super(_r.LargeBinary)}toString(){return"LargeBinary"}}E7=Symbol.toStringTag;zC[E7]=(t=>(t.ArrayType=Uint8Array,t.OffsetArrayType=BigInt64Array,t[Symbol.toStringTag]="LargeBinary"))(zC.prototype);class FC extends so{constructor(){super(_r.Utf8)}toString(){return"Utf8"}}I7=Symbol.toStringTag;FC[I7]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Utf8"))(FC.prototype);class BC extends so{constructor(){super(_r.LargeUtf8)}toString(){return"LargeUtf8"}}L7=Symbol.toStringTag;BC[L7]=(t=>(t.ArrayType=Uint8Array,t.OffsetArrayType=BigInt64Array,t[Symbol.toStringTag]="LargeUtf8"))(BC.prototype);class NC extends so{constructor(){super(_r.Bool)}toString(){return"Bool"}}P7=Symbol.toStringTag;NC[P7]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Bool"))(NC.prototype);class VC extends so{constructor(e,r,u=128){super(_r.Decimal),this.scale=e,this.precision=r,this.bitWidth=u}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}}D7=Symbol.toStringTag;VC[D7]=(t=>(t.scale=null,t.precision=null,t.ArrayType=Uint32Array,t[Symbol.toStringTag]="Decimal"))(VC.prototype);class jC extends so{constructor(e){super(_r.Date),this.unit=e}toString(){return`Date${(this.unit+1)*32}<${dg[this.unit]}>`}get ArrayType(){return this.unit===dg.DAY?Int32Array:BigInt64Array}}R7=Symbol.toStringTag;jC[R7]=(t=>(t.unit=null,t[Symbol.toStringTag]="Date"))(jC.prototype);class UC extends so{constructor(e,r){super(_r.Time),this.unit=e,this.bitWidth=r}toString(){return`Time${this.bitWidth}<${Ja[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}O7=Symbol.toStringTag;UC[O7]=(t=>(t.unit=null,t.bitWidth=null,t[Symbol.toStringTag]="Time"))(UC.prototype);class HC extends so{constructor(e,r){super(_r.Timestamp),this.unit=e,this.timezone=r}toString(){return`Timestamp<${Ja[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}}z7=Symbol.toStringTag;HC[z7]=(t=>(t.unit=null,t.timezone=null,t.ArrayType=BigInt64Array,t[Symbol.toStringTag]="Timestamp"))(HC.prototype);class qC extends so{constructor(e){super(_r.Interval),this.unit=e}toString(){return`Interval<${Iv[this.unit]}>`}}F7=Symbol.toStringTag;qC[F7]=(t=>(t.unit=null,t.ArrayType=Int32Array,t[Symbol.toStringTag]="Interval"))(qC.prototype);class WC extends so{constructor(e){super(_r.Duration),this.unit=e}toString(){return`Duration<${Ja[this.unit]}>`}}B7=Symbol.toStringTag;WC[B7]=(t=>(t.unit=null,t.ArrayType=BigInt64Array,t[Symbol.toStringTag]="Duration"))(WC.prototype);class GC extends so{constructor(e){super(_r.List),this.children=[e]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}}N7=Symbol.toStringTag;GC[N7]=(t=>(t.children=null,t[Symbol.toStringTag]="List"))(GC.prototype);class $C extends so{constructor(e){super(_r.Struct),this.children=e}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}}V7=Symbol.toStringTag;$C[V7]=(t=>(t.children=null,t[Symbol.toStringTag]="Struct"))($C.prototype);class YC extends so{constructor(e,r,u){super(_r.Union),this.mode=e,this.children=u,this.typeIds=r=Int32Array.from(r),this.typeIdToChildIndex=r.reduce((R,p,f)=>(R[p]=f)&&R||R,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(" | ")}>`}}j7=Symbol.toStringTag;YC[j7]=(t=>(t.mode=null,t.typeIds=null,t.children=null,t.typeIdToChildIndex=null,t.ArrayType=Int8Array,t[Symbol.toStringTag]="Union"))(YC.prototype);class ZC extends so{constructor(e){super(_r.FixedSizeBinary),this.byteWidth=e}toString(){return`FixedSizeBinary[${this.byteWidth}]`}}U7=Symbol.toStringTag;ZC[U7]=(t=>(t.byteWidth=null,t.ArrayType=Uint8Array,t[Symbol.toStringTag]="FixedSizeBinary"))(ZC.prototype);class XC extends so{constructor(e,r){super(_r.FixedSizeList),this.listSize=e,this.children=[r]}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}H7=Symbol.toStringTag;XC[H7]=(t=>(t.children=null,t.listSize=null,t[Symbol.toStringTag]="FixedSizeList"))(XC.prototype);class KC extends so{constructor(e,r=!1){var u,R,p;if(super(_r.Map),this.children=[e],this.keysSorted=r,e&&(e.name="entries",!((u=e==null?void 0:e.type)===null||u===void 0)&&u.children)){const f=(R=e==null?void 0:e.type)===null||R===void 0?void 0:R.children[0];f&&(f.name="key");const n=(p=e==null?void 0:e.type)===null||p===void 0?void 0:p.children[1];n&&(n.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}}q7=Symbol.toStringTag;KC[q7]=(t=>(t.children=null,t.keysSorted=null,t[Symbol.toStringTag]="Map_"))(KC.prototype);const Bj=(t=>()=>++t)(-1);class JC extends so{constructor(e,r,u,R){super(_r.Dictionary),this.indices=r,this.dictionary=e,this.isOrdered=R||!1,this.id=u==null?Bj():Xh(u)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}}W7=Symbol.toStringTag;JC[W7]=(t=>(t.id=null,t.indices=null,t.isOrdered=null,t.dictionary=null,t[Symbol.toStringTag]="Dictionary"))(JC.prototype);function G7(t){const e=t;switch(t.typeId){case _r.Decimal:return t.bitWidth/32;case _r.Interval:return 1+e.unit;case _r.FixedSizeList:return e.listSize;case _r.FixedSizeBinary:return e.byteWidth;default:return 1}}class zo{visitMany(e,...r){return e.map((u,R)=>this.visit(u,...r.map(p=>p[R])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,r=!0){return Nj(this,e,r)}getVisitFnByTypeId(e,r=!0){return V0(this,e,r)}visitNull(e,...r){return null}visitBool(e,...r){return null}visitInt(e,...r){return null}visitFloat(e,...r){return null}visitUtf8(e,...r){return null}visitLargeUtf8(e,...r){return null}visitBinary(e,...r){return null}visitLargeBinary(e,...r){return null}visitFixedSizeBinary(e,...r){return null}visitDate(e,...r){return null}visitTimestamp(e,...r){return null}visitTime(e,...r){return null}visitDecimal(e,...r){return null}visitList(e,...r){return null}visitStruct(e,...r){return null}visitUnion(e,...r){return null}visitDictionary(e,...r){return null}visitInterval(e,...r){return null}visitDuration(e,...r){return null}visitFixedSizeList(e,...r){return null}visitMap(e,...r){return null}}function Nj(t,e,r=!0){return typeof e=="number"?V0(t,e,r):typeof e=="string"&&e in _r?V0(t,_r[e],r):e&&e instanceof so?V0(t,QC(e),r):e!=null&&e.type&&e.type instanceof so?V0(t,QC(e.type),r):V0(t,_r.NONE,r)}function V0(t,e,r=!0){let u=null;switch(e){case _r.Null:u=t.visitNull;break;case _r.Bool:u=t.visitBool;break;case _r.Int:u=t.visitInt;break;case _r.Int8:u=t.visitInt8||t.visitInt;break;case _r.Int16:u=t.visitInt16||t.visitInt;break;case _r.Int32:u=t.visitInt32||t.visitInt;break;case _r.Int64:u=t.visitInt64||t.visitInt;break;case _r.Uint8:u=t.visitUint8||t.visitInt;break;case _r.Uint16:u=t.visitUint16||t.visitInt;break;case _r.Uint32:u=t.visitUint32||t.visitInt;break;case _r.Uint64:u=t.visitUint64||t.visitInt;break;case _r.Float:u=t.visitFloat;break;case _r.Float16:u=t.visitFloat16||t.visitFloat;break;case _r.Float32:u=t.visitFloat32||t.visitFloat;break;case _r.Float64:u=t.visitFloat64||t.visitFloat;break;case _r.Utf8:u=t.visitUtf8;break;case _r.LargeUtf8:u=t.visitLargeUtf8;break;case _r.Binary:u=t.visitBinary;break;case _r.LargeBinary:u=t.visitLargeBinary;break;case _r.FixedSizeBinary:u=t.visitFixedSizeBinary;break;case _r.Date:u=t.visitDate;break;case _r.DateDay:u=t.visitDateDay||t.visitDate;break;case _r.DateMillisecond:u=t.visitDateMillisecond||t.visitDate;break;case _r.Timestamp:u=t.visitTimestamp;break;case _r.TimestampSecond:u=t.visitTimestampSecond||t.visitTimestamp;break;case _r.TimestampMillisecond:u=t.visitTimestampMillisecond||t.visitTimestamp;break;case _r.TimestampMicrosecond:u=t.visitTimestampMicrosecond||t.visitTimestamp;break;case _r.TimestampNanosecond:u=t.visitTimestampNanosecond||t.visitTimestamp;break;case _r.Time:u=t.visitTime;break;case _r.TimeSecond:u=t.visitTimeSecond||t.visitTime;break;case _r.TimeMillisecond:u=t.visitTimeMillisecond||t.visitTime;break;case _r.TimeMicrosecond:u=t.visitTimeMicrosecond||t.visitTime;break;case _r.TimeNanosecond:u=t.visitTimeNanosecond||t.visitTime;break;case _r.Decimal:u=t.visitDecimal;break;case _r.List:u=t.visitList;break;case _r.Struct:u=t.visitStruct;break;case _r.Union:u=t.visitUnion;break;case _r.DenseUnion:u=t.visitDenseUnion||t.visitUnion;break;case _r.SparseUnion:u=t.visitSparseUnion||t.visitUnion;break;case _r.Dictionary:u=t.visitDictionary;break;case _r.Interval:u=t.visitInterval;break;case _r.IntervalDayTime:u=t.visitIntervalDayTime||t.visitInterval;break;case _r.IntervalYearMonth:u=t.visitIntervalYearMonth||t.visitInterval;break;case _r.Duration:u=t.visitDuration;break;case _r.DurationSecond:u=t.visitDurationSecond||t.visitDuration;break;case _r.DurationMillisecond:u=t.visitDurationMillisecond||t.visitDuration;break;case _r.DurationMicrosecond:u=t.visitDurationMicrosecond||t.visitDuration;break;case _r.DurationNanosecond:u=t.visitDurationNanosecond||t.visitDuration;break;case _r.FixedSizeList:u=t.visitFixedSizeList;break;case _r.Map:u=t.visitMap;break}if(typeof u=="function")return u;if(!r)return()=>null;throw new Error(`Unrecognized type '${_r[e]}'`)}function QC(t){switch(t.typeId){case _r.Null:return _r.Null;case _r.Int:{const{bitWidth:e,isSigned:r}=t;switch(e){case 8:return r?_r.Int8:_r.Uint8;case 16:return r?_r.Int16:_r.Uint16;case 32:return r?_r.Int32:_r.Uint32;case 64:return r?_r.Int64:_r.Uint64}return _r.Int}case _r.Float:switch(t.precision){case Of.HALF:return _r.Float16;case Of.SINGLE:return _r.Float32;case Of.DOUBLE:return _r.Float64}return _r.Float;case _r.Binary:return _r.Binary;case _r.LargeBinary:return _r.LargeBinary;case _r.Utf8:return _r.Utf8;case _r.LargeUtf8:return _r.LargeUtf8;case _r.Bool:return _r.Bool;case _r.Decimal:return _r.Decimal;case _r.Time:switch(t.unit){case Ja.SECOND:return _r.TimeSecond;case Ja.MILLISECOND:return _r.TimeMillisecond;case Ja.MICROSECOND:return _r.TimeMicrosecond;case Ja.NANOSECOND:return _r.TimeNanosecond}return _r.Time;case _r.Timestamp:switch(t.unit){case Ja.SECOND:return _r.TimestampSecond;case Ja.MILLISECOND:return _r.TimestampMillisecond;case Ja.MICROSECOND:return _r.TimestampMicrosecond;case Ja.NANOSECOND:return _r.TimestampNanosecond}return _r.Timestamp;case _r.Date:switch(t.unit){case dg.DAY:return _r.DateDay;case dg.MILLISECOND:return _r.DateMillisecond}return _r.Date;case _r.Interval:switch(t.unit){case Iv.DAY_TIME:return _r.IntervalDayTime;case Iv.YEAR_MONTH:return _r.IntervalYearMonth}return _r.Interval;case _r.Duration:switch(t.unit){case Ja.SECOND:return _r.DurationSecond;case Ja.MILLISECOND:return _r.DurationMillisecond;case Ja.MICROSECOND:return _r.DurationMicrosecond;case Ja.NANOSECOND:return _r.DurationNanosecond}return _r.Duration;case _r.Map:return _r.Map;case _r.List:return _r.List;case _r.Struct:return _r.Struct;case _r.Union:switch(t.mode){case dp.Dense:return _r.DenseUnion;case dp.Sparse:return _r.SparseUnion}return _r.Union;case _r.FixedSizeBinary:return _r.FixedSizeBinary;case _r.FixedSizeList:return _r.FixedSizeList;case _r.Dictionary:return _r.Dictionary}throw new Error(`Unrecognized type '${_r[t.typeId]}'`)}zo.prototype.visitInt8=null;zo.prototype.visitInt16=null;zo.prototype.visitInt32=null;zo.prototype.visitInt64=null;zo.prototype.visitUint8=null;zo.prototype.visitUint16=null;zo.prototype.visitUint32=null;zo.prototype.visitUint64=null;zo.prototype.visitFloat16=null;zo.prototype.visitFloat32=null;zo.prototype.visitFloat64=null;zo.prototype.visitDateDay=null;zo.prototype.visitDateMillisecond=null;zo.prototype.visitTimestampSecond=null;zo.prototype.visitTimestampMillisecond=null;zo.prototype.visitTimestampMicrosecond=null;zo.prototype.visitTimestampNanosecond=null;zo.prototype.visitTimeSecond=null;zo.prototype.visitTimeMillisecond=null;zo.prototype.visitTimeMicrosecond=null;zo.prototype.visitTimeNanosecond=null;zo.prototype.visitDenseUnion=null;zo.prototype.visitSparseUnion=null;zo.prototype.visitIntervalDayTime=null;zo.prototype.visitIntervalYearMonth=null;zo.prototype.visitDuration=null;zo.prototype.visitDurationSecond=null;zo.prototype.visitDurationMillisecond=null;zo.prototype.visitDurationMicrosecond=null;zo.prototype.visitDurationNanosecond=null;const $7=new Float64Array(1),C0=new Uint32Array($7.buffer);function Y7(t){const e=(t&31744)>>10,r=(t&1023)/1024,u=Math.pow(-1,(t&32768)>>15);switch(e){case 31:return u*(r?Number.NaN:1/0);case 0:return u*(r?6103515625e-14*r:0)}return u*Math.pow(2,e-15)*(1+r)}function Vj(t){if(t!==t)return 32256;$7[0]=t;const e=(C0[1]&2147483648)>>16&65535;let r=C0[1]&2146435072,u=0;return r>=1089470464?C0[0]>0?r=31744:(r=(r&2080374784)>>16,u=(C0[1]&1048575)>>10):r<=1056964608?(u=1048576+(C0[1]&1048575),u=1048576+(u<<(r>>20)-998)>>21,r=0):(r=r-1056964608>>10,u=(C0[1]&1048575)+512>>10),e|r|u&65535}class da extends zo{}function ya(t){return(e,r,u)=>{if(e.setValid(r,u!=null))return t(e,r,u)}}const jj=(t,e,r)=>{t[e]=Math.floor(r/864e5)},Z7=(t,e,r,u)=>{if(r+1<e.length){const R=Xh(e[r]),p=Xh(e[r+1]);t.set(u.subarray(0,p-R),R)}},Uj=({offset:t,values:e},r,u)=>{const R=t+r;u?e[R>>3]|=1<<R%8:e[R>>3]&=~(1<<R%8)},fm=({values:t},e,r)=>{t[e]=r},N4=({values:t},e,r)=>{t[e]=r},X7=({values:t},e,r)=>{t[e]=Vj(r)},Hj=(t,e,r)=>{switch(t.type.precision){case Of.HALF:return X7(t,e,r);case Of.SINGLE:case Of.DOUBLE:return N4(t,e,r)}},K7=({values:t},e,r)=>{jj(t,e,r.valueOf())},J7=({values:t},e,r)=>{t[e]=BigInt(r)},qj=({stride:t,values:e},r,u)=>{e.set(u.subarray(0,t),t*r)},Q7=({values:t,valueOffsets:e},r,u)=>Z7(t,e,r,u),eL=({values:t,valueOffsets:e},r,u)=>Z7(t,e,r,b7(u)),Wj=(t,e,r)=>{t.type.unit===dg.DAY?K7(t,e,r):J7(t,e,r)},tL=({values:t},e,r)=>{t[e]=BigInt(r/1e3)},nL=({values:t},e,r)=>{t[e]=BigInt(r)},rL=({values:t},e,r)=>{t[e]=BigInt(r*1e3)},iL=({values:t},e,r)=>{t[e]=BigInt(r*1e6)},Gj=(t,e,r)=>{switch(t.type.unit){case Ja.SECOND:return tL(t,e,r);case Ja.MILLISECOND:return nL(t,e,r);case Ja.MICROSECOND:return rL(t,e,r);case Ja.NANOSECOND:return iL(t,e,r)}},aL=({values:t},e,r)=>{t[e]=r},oL=({values:t},e,r)=>{t[e]=r},sL=({values:t},e,r)=>{t[e]=r},lL=({values:t},e,r)=>{t[e]=r},$j=(t,e,r)=>{switch(t.type.unit){case Ja.SECOND:return aL(t,e,r);case Ja.MILLISECOND:return oL(t,e,r);case Ja.MICROSECOND:return sL(t,e,r);case Ja.NANOSECOND:return lL(t,e,r)}},Yj=({values:t,stride:e},r,u)=>{t.set(u.subarray(0,e),e*r)},Zj=(t,e,r)=>{const u=t.children[0],R=t.valueOffsets,p=pp.getVisitFn(u);if(Array.isArray(r))for(let f=-1,n=R[e],l=R[e+1];n<l;)p(u,n++,r[++f]);else for(let f=-1,n=R[e],l=R[e+1];n<l;)p(u,n++,r.get(++f))},Xj=(t,e,r)=>{const u=t.children[0],{valueOffsets:R}=t,p=pp.getVisitFn(u);let{[e]:f,[e+1]:n}=R;const l=r instanceof Map?r.entries():Object.entries(r);for(const c of l)if(p(u,f,c),++f>=n)break},Kj=(t,e)=>(r,u,R,p)=>u&&r(u,t,e[p]),Jj=(t,e)=>(r,u,R,p)=>u&&r(u,t,e.get(p)),Qj=(t,e)=>(r,u,R,p)=>u&&r(u,t,e.get(R.name)),eU=(t,e)=>(r,u,R,p)=>u&&r(u,t,e[R.name]),tU=(t,e,r)=>{const u=t.type.children.map(p=>pp.getVisitFn(p.type)),R=r instanceof Map?Qj(e,r):r instanceof qc?Jj(e,r):Array.isArray(r)?Kj(e,r):eU(e,r);t.type.children.forEach((p,f)=>R(u[f],t.children[f],p,f))},nU=(t,e,r)=>{t.type.mode===dp.Dense?uL(t,e,r):cL(t,e,r)},uL=(t,e,r)=>{const u=t.type.typeIdToChildIndex[t.typeIds[e]],R=t.children[u];pp.visit(R,t.valueOffsets[e],r)},cL=(t,e,r)=>{const u=t.type.typeIdToChildIndex[t.typeIds[e]],R=t.children[u];pp.visit(R,e,r)},rU=(t,e,r)=>{var u;(u=t.dictionary)===null||u===void 0||u.set(t.values[e],r)},iU=(t,e,r)=>{t.type.unit===Iv.DAY_TIME?hL(t,e,r):fL(t,e,r)},hL=({values:t},e,r)=>{t.set(r.subarray(0,2),2*e)},fL=({values:t},e,r)=>{t[e]=r[0]*12+r[1]%12},dL=({values:t},e,r)=>{t[e]=r},pL=({values:t},e,r)=>{t[e]=r},mL=({values:t},e,r)=>{t[e]=r},gL=({values:t},e,r)=>{t[e]=r},aU=(t,e,r)=>{switch(t.type.unit){case Ja.SECOND:return dL(t,e,r);case Ja.MILLISECOND:return pL(t,e,r);case Ja.MICROSECOND:return mL(t,e,r);case Ja.NANOSECOND:return gL(t,e,r)}},oU=(t,e,r)=>{const{stride:u}=t,R=t.children[0],p=pp.getVisitFn(R);if(Array.isArray(r))for(let f=-1,n=e*u;++f<u;)p(R,n+f,r[f]);else for(let f=-1,n=e*u;++f<u;)p(R,n+f,r.get(f))};da.prototype.visitBool=ya(Uj);da.prototype.visitInt=ya(fm);da.prototype.visitInt8=ya(fm);da.prototype.visitInt16=ya(fm);da.prototype.visitInt32=ya(fm);da.prototype.visitInt64=ya(fm);da.prototype.visitUint8=ya(fm);da.prototype.visitUint16=ya(fm);da.prototype.visitUint32=ya(fm);da.prototype.visitUint64=ya(fm);da.prototype.visitFloat=ya(Hj);da.prototype.visitFloat16=ya(X7);da.prototype.visitFloat32=ya(N4);da.prototype.visitFloat64=ya(N4);da.prototype.visitUtf8=ya(eL);da.prototype.visitLargeUtf8=ya(eL);da.prototype.visitBinary=ya(Q7);da.prototype.visitLargeBinary=ya(Q7);da.prototype.visitFixedSizeBinary=ya(qj);da.prototype.visitDate=ya(Wj);da.prototype.visitDateDay=ya(K7);da.prototype.visitDateMillisecond=ya(J7);da.prototype.visitTimestamp=ya(Gj);da.prototype.visitTimestampSecond=ya(tL);da.prototype.visitTimestampMillisecond=ya(nL);da.prototype.visitTimestampMicrosecond=ya(rL);da.prototype.visitTimestampNanosecond=ya(iL);da.prototype.visitTime=ya($j);da.prototype.visitTimeSecond=ya(aL);da.prototype.visitTimeMillisecond=ya(oL);da.prototype.visitTimeMicrosecond=ya(sL);da.prototype.visitTimeNanosecond=ya(lL);da.prototype.visitDecimal=ya(Yj);da.prototype.visitList=ya(Zj);da.prototype.visitStruct=ya(tU);da.prototype.visitUnion=ya(nU);da.prototype.visitDenseUnion=ya(uL);da.prototype.visitSparseUnion=ya(cL);da.prototype.visitDictionary=ya(rU);da.prototype.visitInterval=ya(iU);da.prototype.visitIntervalDayTime=ya(hL);da.prototype.visitIntervalYearMonth=ya(fL);da.prototype.visitDuration=ya(aU);da.prototype.visitDurationSecond=ya(dL);da.prototype.visitDurationMillisecond=ya(pL);da.prototype.visitDurationMicrosecond=ya(mL);da.prototype.visitDurationNanosecond=ya(gL);da.prototype.visitFixedSizeList=ya(oU);da.prototype.visitMap=ya(Xj);const pp=new da,bd=Symbol.for("parent"),cy=Symbol.for("rowIndex");class V4{constructor(e,r){return this[bd]=e,this[cy]=r,new Proxy(this,new lU)}toArray(){return Object.values(this.toJSON())}toJSON(){const e=this[cy],r=this[bd],u=r.type.children,R={};for(let p=-1,f=u.length;++p<f;)R[u[p].name]=ad.visit(r.children[p],e);return R}toString(){return`{${[...this].map(([e,r])=>`${Cb(e)}: ${Cb(r)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new sU(this[bd],this[cy])}}class sU{constructor(e,r){this.childIndex=0,this.children=e.children,this.rowIndex=r,this.childFields=e.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){const e=this.childIndex;return e<this.numChildren?(this.childIndex=e+1,{done:!1,value:[this.childFields[e].name,ad.visit(this.children[e],this.rowIndex)]}):{done:!0,value:null}}}Object.defineProperties(V4.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[bd]:{writable:!0,enumerable:!1,configurable:!1,value:null},[cy]:{writable:!0,enumerable:!1,configurable:!1,value:-1}});class lU{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[bd].type.children.map(r=>r.name)}has(e,r){return e[bd].type.children.findIndex(u=>u.name===r)!==-1}getOwnPropertyDescriptor(e,r){if(e[bd].type.children.findIndex(u=>u.name===r)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,r){if(Reflect.has(e,r))return e[r];const u=e[bd].type.children.findIndex(R=>R.name===r);if(u!==-1){const R=ad.visit(e[bd].children[u],e[cy]);return Reflect.set(e,r,R),R}}set(e,r,u){const R=e[bd].type.children.findIndex(p=>p.name===r);return R!==-1?(pp.visit(e[bd].children[R],e[cy],u),Reflect.set(e,r,u)):Reflect.has(e,r)||typeof r=="symbol"?Reflect.set(e,r,u):!1}}class ua extends zo{}function pa(t){return(e,r)=>e.getValid(r)?t(e,r):null}const uU=(t,e)=>864e5*t[e],cU=(t,e)=>null,vL=(t,e,r)=>{if(r+1>=e.length)return null;const u=Xh(e[r]),R=Xh(e[r+1]);return t.subarray(u,R)},hU=({offset:t,values:e},r)=>{const u=t+r;return(e[u>>3]&1<<u%8)!==0},yL=({values:t},e)=>uU(t,e),bL=({values:t},e)=>Xh(t[e]),Ag=({stride:t,values:e},r)=>e[t*r],fU=({stride:t,values:e},r)=>Y7(e[t*r]),xL=({values:t},e)=>t[e],dU=({stride:t,values:e},r)=>e.subarray(t*r,t*(r+1)),_L=({values:t,valueOffsets:e},r)=>vL(t,e,r),wL=({values:t,valueOffsets:e},r)=>{const u=vL(t,e,r);return u!==null?Cj(u):null},pU=({values:t},e)=>t[e],mU=({type:t,values:e},r)=>t.precision!==Of.HALF?e[r]:Y7(e[r]),gU=(t,e)=>t.type.unit===dg.DAY?yL(t,e):bL(t,e),TL=({values:t},e)=>1e3*Xh(t[e]),kL=({values:t},e)=>Xh(t[e]),SL=({values:t},e)=>w7(t[e],BigInt(1e3)),AL=({values:t},e)=>w7(t[e],BigInt(1e6)),vU=(t,e)=>{switch(t.type.unit){case Ja.SECOND:return TL(t,e);case Ja.MILLISECOND:return kL(t,e);case Ja.MICROSECOND:return SL(t,e);case Ja.NANOSECOND:return AL(t,e)}},CL=({values:t},e)=>t[e],ML=({values:t},e)=>t[e],EL=({values:t},e)=>t[e],IL=({values:t},e)=>t[e],yU=(t,e)=>{switch(t.type.unit){case Ja.SECOND:return CL(t,e);case Ja.MILLISECOND:return ML(t,e);case Ja.MICROSECOND:return EL(t,e);case Ja.NANOSECOND:return IL(t,e)}},bU=({values:t,stride:e},r)=>B4.decimal(t.subarray(e*r,e*(r+1))),xU=(t,e)=>{const{valueOffsets:r,stride:u,children:R}=t,{[e*u]:p,[e*u+1]:f}=r,l=R[0].slice(p,f-p);return new qc([l])},_U=(t,e)=>{const{valueOffsets:r,children:u}=t,{[e]:R,[e+1]:p}=r,f=u[0];return new j4(f.slice(R,p-R))},wU=(t,e)=>new V4(t,e),TU=(t,e)=>t.type.mode===dp.Dense?LL(t,e):PL(t,e),LL=(t,e)=>{const r=t.type.typeIdToChildIndex[t.typeIds[e]],u=t.children[r];return ad.visit(u,t.valueOffsets[e])},PL=(t,e)=>{const r=t.type.typeIdToChildIndex[t.typeIds[e]],u=t.children[r];return ad.visit(u,e)},kU=(t,e)=>{var r;return(r=t.dictionary)===null||r===void 0?void 0:r.get(t.values[e])},SU=(t,e)=>t.type.unit===Iv.DAY_TIME?DL(t,e):RL(t,e),DL=({values:t},e)=>t.subarray(2*e,2*(e+1)),RL=({values:t},e)=>{const r=t[e],u=new Int32Array(2);return u[0]=Math.trunc(r/12),u[1]=Math.trunc(r%12),u},OL=({values:t},e)=>t[e],zL=({values:t},e)=>t[e],FL=({values:t},e)=>t[e],BL=({values:t},e)=>t[e],AU=(t,e)=>{switch(t.type.unit){case Ja.SECOND:return OL(t,e);case Ja.MILLISECOND:return zL(t,e);case Ja.MICROSECOND:return FL(t,e);case Ja.NANOSECOND:return BL(t,e)}},CU=(t,e)=>{const{stride:r,children:u}=t,p=u[0].slice(e*r,r);return new qc([p])};ua.prototype.visitNull=pa(cU);ua.prototype.visitBool=pa(hU);ua.prototype.visitInt=pa(pU);ua.prototype.visitInt8=pa(Ag);ua.prototype.visitInt16=pa(Ag);ua.prototype.visitInt32=pa(Ag);ua.prototype.visitInt64=pa(xL);ua.prototype.visitUint8=pa(Ag);ua.prototype.visitUint16=pa(Ag);ua.prototype.visitUint32=pa(Ag);ua.prototype.visitUint64=pa(xL);ua.prototype.visitFloat=pa(mU);ua.prototype.visitFloat16=pa(fU);ua.prototype.visitFloat32=pa(Ag);ua.prototype.visitFloat64=pa(Ag);ua.prototype.visitUtf8=pa(wL);ua.prototype.visitLargeUtf8=pa(wL);ua.prototype.visitBinary=pa(_L);ua.prototype.visitLargeBinary=pa(_L);ua.prototype.visitFixedSizeBinary=pa(dU);ua.prototype.visitDate=pa(gU);ua.prototype.visitDateDay=pa(yL);ua.prototype.visitDateMillisecond=pa(bL);ua.prototype.visitTimestamp=pa(vU);ua.prototype.visitTimestampSecond=pa(TL);ua.prototype.visitTimestampMillisecond=pa(kL);ua.prototype.visitTimestampMicrosecond=pa(SL);ua.prototype.visitTimestampNanosecond=pa(AL);ua.prototype.visitTime=pa(yU);ua.prototype.visitTimeSecond=pa(CL);ua.prototype.visitTimeMillisecond=pa(ML);ua.prototype.visitTimeMicrosecond=pa(EL);ua.prototype.visitTimeNanosecond=pa(IL);ua.prototype.visitDecimal=pa(bU);ua.prototype.visitList=pa(xU);ua.prototype.visitStruct=pa(wU);ua.prototype.visitUnion=pa(TU);ua.prototype.visitDenseUnion=pa(LL);ua.prototype.visitSparseUnion=pa(PL);ua.prototype.visitDictionary=pa(kU);ua.prototype.visitInterval=pa(SU);ua.prototype.visitIntervalDayTime=pa(DL);ua.prototype.visitIntervalYearMonth=pa(RL);ua.prototype.visitDuration=pa(AU);ua.prototype.visitDurationSecond=pa(OL);ua.prototype.visitDurationMillisecond=pa(zL);ua.prototype.visitDurationMicrosecond=pa(FL);ua.prototype.visitDurationNanosecond=pa(BL);ua.prototype.visitFixedSizeList=pa(CU);ua.prototype.visitMap=pa(_U);const ad=new ua,j0=Symbol.for("keys"),hy=Symbol.for("vals"),U0=Symbol.for("kKeysAsStrings"),dT=Symbol.for("_kKeysAsStrings");class j4{constructor(e){return this[j0]=new qc([e.children[0]]).memoize(),this[hy]=e.children[1],new Proxy(this,new EU)}get[U0](){return this[dT]||(this[dT]=Array.from(this[j0].toArray(),String))}[Symbol.iterator](){return new MU(this[j0],this[hy])}get size(){return this[j0].length}toArray(){return Object.values(this.toJSON())}toJSON(){const e=this[j0],r=this[hy],u={};for(let R=-1,p=e.length;++R<p;)u[e.get(R)]=ad.visit(r,R);return u}toString(){return`{${[...this].map(([e,r])=>`${Cb(e)}: ${Cb(r)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}class MU{constructor(e,r){this.keys=e,this.vals=r,this.keyIndex=0,this.numKeys=e.length}[Symbol.iterator](){return this}next(){const e=this.keyIndex;return e===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(e),ad.visit(this.vals,e)]})}}class EU{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[U0]}has(e,r){return e[U0].includes(r)}getOwnPropertyDescriptor(e,r){if(e[U0].indexOf(r)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,r){if(Reflect.has(e,r))return e[r];const u=e[U0].indexOf(r);if(u!==-1){const R=ad.visit(Reflect.get(e,hy),u);return Reflect.set(e,r,R),R}}set(e,r,u){const R=e[U0].indexOf(r);return R!==-1?(pp.visit(Reflect.get(e,hy),R,u),Reflect.set(e,r,u)):Reflect.has(e,r)?Reflect.set(e,r,u):!1}}Object.defineProperties(j4.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[j0]:{writable:!0,enumerable:!1,configurable:!1,value:null},[hy]:{writable:!0,enumerable:!1,configurable:!1,value:null},[dT]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let e6;function IU(t,e,r,u){const{length:R=0}=t;let p=typeof e!="number"?0:e,f=typeof r!="number"?R:r;return p<0&&(p=(p%R+R)%R),f<0&&(f=(f%R+R)%R),f<p&&(e6=p,p=f,f=e6),f>R&&(f=R),u?u(t,p,f):[p,f]}const LU=(t,e)=>t<0?e+t:t,t6=t=>t!==t;function Oy(t){if(typeof t!=="object"||t===null)return t6(t)?t6:r=>r===t;if(t instanceof Date){const r=t.valueOf();return u=>u instanceof Date?u.valueOf()===r:!1}return ArrayBuffer.isView(t)?r=>r?Pj(t,r):!1:t instanceof Map?DU(t):Array.isArray(t)?PU(t):t instanceof qc?RU(t):OU(t,!0)}function PU(t){const e=[];for(let r=-1,u=t.length;++r<u;)e[r]=Oy(t[r]);return Mw(e)}function DU(t){let e=-1;const r=[];for(const u of t.values())r[++e]=Oy(u);return Mw(r)}function RU(t){const e=[];for(let r=-1,u=t.length;++r<u;)e[r]=Oy(t.get(r));return Mw(e)}function OU(t,e=!1){const r=Object.keys(t);if(!e&&r.length===0)return()=>!1;const u=[];for(let R=-1,p=r.length;++R<p;)u[R]=Oy(t[r[R]]);return Mw(u,r)}function Mw(t,e){return r=>{if(!r||typeof r!="object")return!1;switch(r.constructor){case Array:return zU(t,r);case Map:return n6(t,r,r.keys());case j4:case V4:case Object:case void 0:return n6(t,r,e||Object.keys(r))}return r instanceof qc?FU(t,r):!1}}function zU(t,e){const r=t.length;if(e.length!==r)return!1;for(let u=-1;++u<r;)if(!t[u](e[u]))return!1;return!0}function FU(t,e){const r=t.length;if(e.length!==r)return!1;for(let u=-1;++u<r;)if(!t[u](e.get(u)))return!1;return!0}function n6(t,e,r){const u=r[Symbol.iterator](),R=e instanceof Map?e.keys():Object.keys(e)[Symbol.iterator](),p=e instanceof Map?e.values():Object.values(e)[Symbol.iterator]();let f=0;const n=t.length;let l=p.next(),c=u.next(),i=R.next();for(;f<n&&!c.done&&!i.done&&!l.done&&!(c.value!==i.value||!t[f](l.value));++f,c=u.next(),i=R.next(),l=p.next());return f===n&&c.done&&i.done&&l.done?!0:(u.return&&u.return(),R.return&&R.return(),p.return&&p.return(),!1)}function NL(t,e,r,u){return(r&1<<u)!==0}function BU(t,e,r,u){return(r&1<<u)>>u}function r6(t,e,r){const u=r.byteLength+7&-8;if(t>0||r.byteLength<u){const R=new Uint8Array(u);return R.set(t%8===0?r.subarray(t>>3):NU(new U4(r,t,e,null,NL)).subarray(0,u)),R}return r}function NU(t){const e=[];let r=0,u=0,R=0;for(const f of t)f&&(R|=1<<u),++u===8&&(e[r++]=R,R=u=0);(r===0||u>0)&&(e[r++]=R);const p=new Uint8Array(e.length+7&-8);return p.set(e),p}class U4{constructor(e,r,u,R,p){this.bytes=e,this.length=u,this.context=R,this.get=p,this.bit=r%8,this.byteIndex=r>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index<this.length?(this.bit===8&&(this.bit=0,this.byte=this.bytes[this.byteIndex++]),{value:this.get(this.context,this.index++,this.byte,this.bit++)}):{done:!0,value:null}}[Symbol.iterator](){return this}}function pT(t,e,r){if(r-e<=0)return 0;if(r-e<8){let p=0;for(const f of new U4(t,e,r-e,t,BU))p+=f;return p}const u=r>>3<<3,R=e+(e%8===0?0:8-e%8);return pT(t,e,R)+pT(t,u,r)+VU(t,R>>3,u-R>>3)}function VU(t,e,r){let u=0,R=Math.trunc(e);const p=new DataView(t.buffer,t.byteOffset,t.byteLength),f=r===void 0?t.byteLength:R+r;for(;f-R>=4;)u+=m5(p.getUint32(R)),R+=4;for(;f-R>=2;)u+=m5(p.getUint16(R)),R+=2;for(;f-R>=1;)u+=m5(p.getUint8(R)),R+=1;return u}function m5(t){let e=Math.trunc(t);return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24}const jU=-1;class Ib{get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get nullable(){if(this._nullCount!==0){const{type:e}=this;return so.isSparseUnion(e)?this.children.some(r=>r.nullable):so.isDenseUnion(e)?this.children.some(r=>r.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let e=0;const{valueOffsets:r,values:u,nullBitmap:R,typeIds:p}=this;return r&&(e+=r.byteLength),u&&(e+=u.byteLength),R&&(e+=R.byteLength),p&&(e+=p.byteLength),this.children.reduce((f,n)=>f+n.byteLength,e)}get nullCount(){if(so.isUnion(this.type))return this.children.reduce((u,R)=>u+R.nullCount,0);let e=this._nullCount,r;return e<=jU&&(r=this.nullBitmap)&&(this._nullCount=e=r.length===0?0:this.length-pT(r,this.offset,this.offset+this.length)),e}constructor(e,r,u,R,p,f=[],n){this.type=e,this.children=f,this.dictionary=n,this.offset=Math.floor(Math.max(r||0,0)),this.length=Math.floor(Math.max(u||0,0)),this._nullCount=Math.floor(Math.max(R||0,-1));let l;p instanceof Ib?(this.stride=p.stride,this.values=p.values,this.typeIds=p.typeIds,this.nullBitmap=p.nullBitmap,this.valueOffsets=p.valueOffsets):(this.stride=G7(e),p&&((l=p[0])&&(this.valueOffsets=l),(l=p[1])&&(this.values=l),(l=p[2])&&(this.nullBitmap=l),(l=p[3])&&(this.typeIds=l)))}getValid(e){const{type:r}=this;if(so.isUnion(r)){const u=r,R=this.children[u.typeIdToChildIndex[this.typeIds[e]]],p=u.mode===dp.Dense?this.valueOffsets[e]:e;return R.getValid(p)}if(this.nullable&&this.nullCount>0){const u=this.offset+e;return(this.nullBitmap[u>>3]&1<<u%8)!==0}return!0}setValid(e,r){let u;const{type:R}=this;if(so.isUnion(R)){const p=R,f=this.children[p.typeIdToChildIndex[this.typeIds[e]]],n=p.mode===dp.Dense?this.valueOffsets[e]:e;u=f.getValid(n),f.setValid(n,r)}else{let{nullBitmap:p}=this;const{offset:f,length:n}=this,l=f+e,c=1<<l%8,i=l>>3;(!p||p.byteLength<=i)&&(p=new Uint8Array((f+n+63&-64)>>3).fill(255),this.nullCount>0?(p.set(r6(f,n,this.nullBitmap),0),Object.assign(this,{nullBitmap:p})):Object.assign(this,{nullBitmap:p,_nullCount:0}));const _=p[i];u=(_&c)!==0,p[i]=r?_|c:_&~c}return u!==!!r&&(this._nullCount=this.nullCount+(r?-1:1)),r}clone(e=this.type,r=this.offset,u=this.length,R=this._nullCount,p=this,f=this.children){return new Ib(e,r,u,R,p,f,this.dictionary)}slice(e,r){const{stride:u,typeId:R,children:p}=this,f=+(this._nullCount===0)-1,n=R===16?u:1,l=this._sliceBuffers(e,r,u,R);return this.clone(this.type,this.offset+e,r,f,l,p.length===0||this.valueOffsets?p:this._sliceChildren(p,n*e,n*r))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===_r.Null)return this.clone(this.type,0,e,0);const{length:r,nullCount:u}=this,R=new Uint8Array((e+63&-64)>>3).fill(255,0,r>>3);R[r>>3]=(1<<r-(r&-8))-1,u>0&&R.set(r6(this.offset,r,this.nullBitmap),0);const p=this.buffers;return p[jp.VALIDITY]=R,this.clone(this.type,0,e,u+(e-r),p)}_sliceBuffers(e,r,u,R){let p;const{buffers:f}=this;return(p=f[jp.TYPE])&&(f[jp.TYPE]=p.subarray(e,e+r)),(p=f[jp.OFFSET])&&(f[jp.OFFSET]=p.subarray(e,e+r+1))||(p=f[jp.DATA])&&(f[jp.DATA]=R===6?p:p.subarray(u*e,u*(e+r))),f}_sliceChildren(e,r,u){return e.map(R=>R.slice(r,u))}}Ib.prototype.children=Object.freeze([]);class i6{constructor(e=0,r){this.numChunks=e,this.getChunkIterator=r,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndex<this.numChunks;){const e=this.chunkIterator.next();if(!e.done)return e;++this.chunkIndex<this.numChunks&&(this.chunkIterator=this.getChunkIterator(this.chunkIndex))}return{done:!0,value:null}}[Symbol.iterator](){return this}}function UU(t){return t.some(e=>e.nullable)}function HU(t){return t.reduce((e,r)=>e+r.nullCount,0)}function qU(t){return t.reduce((e,r,u)=>(e[u+1]=e[u]+r.length,e),new Uint32Array(t.length+1))}function WU(t,e,r,u){const R=[];for(let p=-1,f=t.length;++p<f;){const n=t[p],l=e[p],{length:c}=n;if(l>=u)break;if(r>=l+c)continue;if(l>=r&&l+c<=u){R.push(n);continue}const i=Math.max(0,r-l),_=Math.min(u-l,c);R.push(n.slice(i,_-i))}return R.length===0&&R.push(t[0].slice(0,0)),R}function H4(t,e,r,u){let R=0,p=0,f=e.length-1;do{if(R>=f-1)return r<e[f]?u(t,R,r-e[R]):null;p=R+Math.trunc((f-R)*.5),r<e[p]?f=p:R=p}while(R<f)}function VL(t,e){return t.getValid(e)}function a6(t){function e(r,u,R){return t(r[u],R)}return function(r){const u=this.data;return H4(u,this._offsets,r,e)}}function GU(t){let e;function r(u,R,p){return t(u[R],p,e)}return function(u,R){const p=this.data;e=R;const f=H4(p,this._offsets,u,r);return e=void 0,f}}function $U(t){let e;function r(u,R,p){let f=p,n=0,l=0;for(let c=R-1,i=u.length;++c<i;){const _=u[c];if(~(n=t(_,e,f)))return l+n;f=0,l+=_.length}return-1}return function(u,R){e=u;const p=this.data,f=typeof R!="number"?r(p,0,0):H4(p,this._offsets,R,r);return e=void 0,f}}class ca extends zo{}function YU(t,e){return e===null&&t.length>0?0:-1}function ZU(t,e){const{nullBitmap:r}=t;if(!r||t.nullCount<=0)return-1;let u=0;for(const R of new U4(r,t.offset+(e||0),t.length,r,NL)){if(!R)return u;++u}return-1}function wa(t,e,r){if(e===void 0)return-1;if(e===null)switch(t.typeId){case _r.Union:break;case _r.Dictionary:break;default:return ZU(t,r)}const u=ad.getVisitFn(t),R=Oy(e);for(let p=(r||0)-1,f=t.length;++p<f;)if(R(u(t,p)))return p;return-1}function jL(t,e,r){const u=ad.getVisitFn(t),R=Oy(e);for(let p=(r||0)-1,f=t.length;++p<f;)if(R(u(t,p)))return p;return-1}ca.prototype.visitNull=YU;ca.prototype.visitBool=wa;ca.prototype.visitInt=wa;ca.prototype.visitInt8=wa;ca.prototype.visitInt16=wa;ca.prototype.visitInt32=wa;ca.prototype.visitInt64=wa;ca.prototype.visitUint8=wa;ca.prototype.visitUint16=wa;ca.prototype.visitUint32=wa;ca.prototype.visitUint64=wa;ca.prototype.visitFloat=wa;ca.prototype.visitFloat16=wa;ca.prototype.visitFloat32=wa;ca.prototype.visitFloat64=wa;ca.prototype.visitUtf8=wa;ca.prototype.visitLargeUtf8=wa;ca.prototype.visitBinary=wa;ca.prototype.visitLargeBinary=wa;ca.prototype.visitFixedSizeBinary=wa;ca.prototype.visitDate=wa;ca.prototype.visitDateDay=wa;ca.prototype.visitDateMillisecond=wa;ca.prototype.visitTimestamp=wa;ca.prototype.visitTimestampSecond=wa;ca.prototype.visitTimestampMillisecond=wa;ca.prototype.visitTimestampMicrosecond=wa;ca.prototype.visitTimestampNanosecond=wa;ca.prototype.visitTime=wa;ca.prototype.visitTimeSecond=wa;ca.prototype.visitTimeMillisecond=wa;ca.prototype.visitTimeMicrosecond=wa;ca.prototype.visitTimeNanosecond=wa;ca.prototype.visitDecimal=wa;ca.prototype.visitList=wa;ca.prototype.visitStruct=wa;ca.prototype.visitUnion=wa;ca.prototype.visitDenseUnion=jL;ca.prototype.visitSparseUnion=jL;ca.prototype.visitDictionary=wa;ca.prototype.visitInterval=wa;ca.prototype.visitIntervalDayTime=wa;ca.prototype.visitIntervalYearMonth=wa;ca.prototype.visitDuration=wa;ca.prototype.visitDurationSecond=wa;ca.prototype.visitDurationMillisecond=wa;ca.prototype.visitDurationMicrosecond=wa;ca.prototype.visitDurationNanosecond=wa;ca.prototype.visitFixedSizeList=wa;ca.prototype.visitMap=wa;const o6=new ca;class ha extends zo{}function ma(t){const{type:e}=t;if(t.nullCount===0&&t.stride===1&&(so.isInt(e)&&e.bitWidth!==64||so.isTime(e)&&e.bitWidth!==64||so.isFloat(e)&&e.precision!==Of.HALF))return new i6(t.data.length,u=>{const R=t.data[u];return R.values.subarray(0,R.length)[Symbol.iterator]()});let r=0;return new i6(t.data.length,u=>{const p=t.data[u].length,f=t.slice(r,r+p);return r+=p,new XU(f)})}class XU{constructor(e){this.vector=e,this.index=0}next(){return this.index<this.vector.length?{value:this.vector.get(this.index++)}:{done:!0,value:null}}[Symbol.iterator](){return this}}ha.prototype.visitNull=ma;ha.prototype.visitBool=ma;ha.prototype.visitInt=ma;ha.prototype.visitInt8=ma;ha.prototype.visitInt16=ma;ha.prototype.visitInt32=ma;ha.prototype.visitInt64=ma;ha.prototype.visitUint8=ma;ha.prototype.visitUint16=ma;ha.prototype.visitUint32=ma;ha.prototype.visitUint64=ma;ha.prototype.visitFloat=ma;ha.prototype.visitFloat16=ma;ha.prototype.visitFloat32=ma;ha.prototype.visitFloat64=ma;ha.prototype.visitUtf8=ma;ha.prototype.visitLargeUtf8=ma;ha.prototype.visitBinary=ma;ha.prototype.visitLargeBinary=ma;ha.prototype.visitFixedSizeBinary=ma;ha.prototype.visitDate=ma;ha.prototype.visitDateDay=ma;ha.prototype.visitDateMillisecond=ma;ha.prototype.visitTimestamp=ma;ha.prototype.visitTimestampSecond=ma;ha.prototype.visitTimestampMillisecond=ma;ha.prototype.visitTimestampMicrosecond=ma;ha.prototype.visitTimestampNanosecond=ma;ha.prototype.visitTime=ma;ha.prototype.visitTimeSecond=ma;ha.prototype.visitTimeMillisecond=ma;ha.prototype.visitTimeMicrosecond=ma;ha.prototype.visitTimeNanosecond=ma;ha.prototype.visitDecimal=ma;ha.prototype.visitList=ma;ha.prototype.visitStruct=ma;ha.prototype.visitUnion=ma;ha.prototype.visitDenseUnion=ma;ha.prototype.visitSparseUnion=ma;ha.prototype.visitDictionary=ma;ha.prototype.visitInterval=ma;ha.prototype.visitIntervalDayTime=ma;ha.prototype.visitIntervalYearMonth=ma;ha.prototype.visitDuration=ma;ha.prototype.visitDurationSecond=ma;ha.prototype.visitDurationMillisecond=ma;ha.prototype.visitDurationMicrosecond=ma;ha.prototype.visitDurationNanosecond=ma;ha.prototype.visitFixedSizeList=ma;ha.prototype.visitMap=ma;const KU=new ha;var UL;const HL={},qL={};class qc{constructor(e){var r,u,R;const p=e[0]instanceof qc?e.flatMap(n=>n.data):e;if(p.length===0||p.some(n=>!(n instanceof Ib)))throw new TypeError("Vector constructor expects an Array of Data instances.");const f=(r=p[0])===null||r===void 0?void 0:r.type;switch(p.length){case 0:this._offsets=[0];break;case 1:{const{get:n,set:l,indexOf:c}=HL[f.typeId],i=p[0];this.isValid=_=>VL(i,_),this.get=_=>n(i,_),this.set=(_,b)=>l(i,_,b),this.indexOf=_=>c(i,_),this._offsets=[0,i.length];break}default:Object.setPrototypeOf(this,qL[f.typeId]),this._offsets=qU(p);break}this.data=p,this.type=f,this.stride=G7(f),this.numChildren=(R=(u=f.children)===null||u===void 0?void 0:u.length)!==null&&R!==void 0?R:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((e,r)=>e+r.byteLength,0)}get nullable(){return UU(this.data)}get nullCount(){return HU(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${_r[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}at(e){return this.get(LU(e,this.length))}set(e,r){}indexOf(e,r){return-1}includes(e,r){return this.indexOf(e,r)>-1}[Symbol.iterator](){return KU.visit(this)}concat(...e){return new qc(this.data.concat(e.flatMap(r=>r.data).flat(Number.POSITIVE_INFINITY)))}slice(e,r){return new qc(IU(this,e,r,({data:u,_offsets:R},p,f)=>WU(u,R,p,f)))}toJSON(){return[...this]}toArray(){const{type:e,data:r,length:u,stride:R,ArrayType:p}=this;switch(e.typeId){case _r.Int:case _r.Float:case _r.Decimal:case _r.Time:case _r.Timestamp:switch(r.length){case 0:return new p;case 1:return r[0].values.subarray(0,u*R);default:return r.reduce((f,{values:n,length:l})=>(f.array.set(n.subarray(0,l*R),f.offset),f.offset+=l*R,f),{array:new p(u*R),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(",")}]`}getChild(e){var r;return this.getChildAt((r=this.type.children)===null||r===void 0?void 0:r.findIndex(u=>u.name===e))}getChildAt(e){return e>-1&&e<this.numChildren?new qc(this.data.map(({children:r})=>r[e])):null}get isMemoized(){return so.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(so.isDictionary(this.type)){const e=new N2(this.data[0].dictionary),r=this.data.map(u=>{const R=u.clone();return R.dictionary=e,R});return new qc(r)}return new N2(this)}unmemoize(){if(so.isDictionary(this.type)&&this.isMemoized){const e=this.data[0].dictionary.unmemoize(),r=this.data.map(u=>{const R=u.clone();return R.dictionary=e,R});return new qc(r)}return this}}UL=Symbol.toStringTag;qc[UL]=(t=>{t.type=so.prototype,t.data=[],t.length=0,t.stride=1,t.numChildren=0,t._offsets=new Uint32Array([0]),t[Symbol.isConcatSpreadable]=!0;const e=Object.keys(_r).map(r=>_r[r]).filter(r=>typeof r=="number"&&r!==_r.NONE);for(const r of e){const u=ad.getVisitFnByTypeId(r),R=pp.getVisitFnByTypeId(r),p=o6.getVisitFnByTypeId(r);HL[r]={get:u,set:R,indexOf:p},qL[r]=Object.create(t,{isValid:{value:a6(VL)},get:{value:a6(ad.getVisitFnByTypeId(r))},set:{value:GU(pp.getVisitFnByTypeId(r))},indexOf:{value:$U(o6.getVisitFnByTypeId(r))}})}return"Vector"})(qc.prototype);class N2 extends qc{constructor(e){super(e.data);const r=this.get,u=this.set,R=this.slice,p=new Array(this.length);Object.defineProperty(this,"get",{value(f){const n=p[f];if(n!==void 0)return n;const l=r.call(this,f);return p[f]=l,l}}),Object.defineProperty(this,"set",{value(f,n){u.call(this,f,n),p[f]=n}}),Object.defineProperty(this,"slice",{value:(f,n)=>new N2(R.call(this,f,n))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new qc(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}}function JU(t){return t.endsWith("_page")}const zy=h8("selection",{state:()=>({id:void 0,selection_counter:void 0,pagination_counter:void 0,counter:void 0}),actions:{updateSelection(t,e){const r=JU(t);console.log("[SelectionStore] ===== updateSelection =====",{timestamp:Date.now(),identifier:t,value:e,isPagination:r,currentSelectionCounter:this.$state.selection_counter,currentPaginationCounter:this.$state.pagination_counter}),this.$patch(u=>{u[t]=e,r?u.pagination_counter=(u.pagination_counter||0)+1:u.selection_counter=(u.selection_counter||0)+1,u.counter=(u.counter||0)+1}),console.log("[SelectionStore] updateSelection DONE",{selectionCounter:this.$state.selection_counter,paginationCounter:this.$state.pagination_counter})}}}),Cg=h8("streamlit-data",{state:()=>({renderData:null,dataForDrawing:{},hash:"",annotations:null,requestData:!1}),getters:{args:t=>{var e;return(e=t.renderData)==null?void 0:e.args},components(){var t;return(t=this.args)==null?void 0:t.components},allDataForDrawing:t=>t.dataForDrawing,theme:t=>{var e;return(e=t.renderData)==null?void 0:e.theme}},actions:{updateRenderData(t){var p,f,n,l;const e=zy(),r=t.args.selection_store,u=t.args.hash,R=t.args.dataChanged;if(delete t.args.selection_store,delete t.args.hash,delete t.args.dataChanged,console.log("[StreamlitDataStore] ===== updateRenderData START =====",{timestamp:Date.now(),dataChanged:R,oldHash:(p=this.hash)==null?void 0:p.substring(0,8),newHash:u==null?void 0:u.substring(0,8),hasPagination:!!t.args._pagination,paginationPage:(f=t.args._pagination)==null?void 0:f.page,hasTableData:!!t.args.tableData,pythonStateCounter:r==null?void 0:r.counter,pythonSelectionCounter:r==null?void 0:r.selection_counter,pythonPaginationCounter:r==null?void 0:r.pagination_counter,pythonStateKeys:r?Object.keys(r):[]}),r){const c=r.selection_counter??r.counter??0,i=r.pagination_counter??r.counter??0,_=e.$state.selection_counter??e.$state.counter??0,b=e.$state.pagination_counter??e.$state.counter??0;e.$patch(w=>{if(r.id!==w.id){for(const v in w)w[v]=void 0;Object.assign(w,r)}else for(const v in r){const o=v.endsWith("_page"),a=o?i:c,h=o?b:_,s=!(v in w)||w[v]===void 0||a>=h||o&&R;console.log(`[StreamlitDataStore] State key "${v}":`,{isPagination:o,pythonCounter:a,vueCounter:h,dataChanged:R,keyInState:v in w,currentValue:w[v],pythonValue:r[v],shouldAccept:s}),s&&(w[v]=r[v])}})}if(R&&u){this.renderData=t;const c=t.args;Object.entries(c).forEach(([i,_])=>{var b;if(_ instanceof fT)if(i==="plotData"){const w=this.parseArrowTableToColumns(_);console.log(`[StreamlitDataStore] Parsed ${i} to columns:`,{columns:Object.keys(w),rowCount:((b=Object.values(w)[0])==null?void 0:b.length)??0}),this.dataForDrawing[i]=w}else{const w=this.parseArrowTable(_);console.log(`[StreamlitDataStore] Parsed ${i}:`,{rowCount:w.length}),this.dataForDrawing[i]=w}else this.dataForDrawing[i]=_}),c._pagination!==void 0&&(console.log("[StreamlitDataStore] Updating _pagination:",{oldPage:(n=this.dataForDrawing._pagination)==null?void 0:n.page,newPage:(l=c._pagination)==null?void 0:l.page,newPagination:c._pagination}),this.dataForDrawing._pagination=c._pagination),c._navigate_to_page!==void 0&&(console.log("[StreamlitDataStore] Updating _navigate_to_page:",c._navigate_to_page),this.dataForDrawing._navigate_to_page=c._navigate_to_page),c._target_row_index!==void 0&&(console.log("[StreamlitDataStore] Updating _target_row_index:",c._target_row_index),this.dataForDrawing._target_row_index=c._target_row_index),this.hash=u}else if(!R){const c=Object.keys(this.dataForDrawing).length>0;if(console.log("[StreamlitDataStore] Using cached data branch:",{timestamp:Date.now(),hasCache:c,incomingPagination:t.args._pagination,cachedPagination:this.dataForDrawing._pagination}),c)console.log("[StreamlitDataStore] Data unchanged, using cached data"),t.args.components&&(this.renderData?this.renderData.args.components=t.args.components:this.renderData=t),t.args._plotConfig!==void 0&&(this.dataForDrawing._plotConfig=t.args._plotConfig);else{console.warn("[StreamlitDataStore] Cache miss - requesting data from Python"),this.requestData=!0;return}}},parseArrowTable(t){const e=t.table.numRows,r=t.table.schema.fields.map(p=>p.name),u=new Map;r.forEach((p,f)=>{const n=t.table.getChildAt(f);if(n){const l=n.toArray(),c=new Array(l.length);for(let i=0;i<l.length;i++)c[i]=this.parseArrowValue(l[i]);u.set(p,c)}});const R=new Array(e);for(let p=0;p<e;p++){const f={};r.forEach(n=>{const l=u.get(n);l&&(f[n]=l[p])}),R[p]=f}return R},parseArrowTableToColumns(t){const e={};return t.table.schema.fields.map(u=>u.name).forEach((u,R)=>{const p=t.table.getChildAt(R);if(p){const f=p.toArray(),n=new Array(f.length);for(let l=0;l<f.length;l++)n[l]=this.parseArrowValue(f[l]);e[u]=n}else e[u]=[]}),e},parseArrowValue(t){if(typeof t=="bigint")return Number(t);if(t instanceof qc){const e=[];for(let r=0;r<t.length;r++)e.push(this.parseArrowValue(t.get(r)));return e}return t},setAnnotations(t){this.annotations=t},clearRequestData(){this.requestData=!1}}});class ch{constructor(e){this.table=e}reloadData(e,r,u){return this.table.dataLoader.load(e,void 0,void 0,void 0,r,u)}langText(){return this.table.modules.localize.getText(...arguments)}langBind(){return this.table.modules.localize.bind(...arguments)}langLocale(){return this.table.modules.localize.getLocale(...arguments)}commsConnections(){return this.table.modules.comms.getConnections(...arguments)}commsSend(){return this.table.modules.comms.send(...arguments)}layoutMode(){return this.table.modules.layout.getMode()}layoutRefresh(e){return this.table.modules.layout.layout(e)}subscribe(){return this.table.eventBus.subscribe(...arguments)}unsubscribe(){return this.table.eventBus.unsubscribe(...arguments)}subscribed(e){return this.table.eventBus.subscribed(e)}subscriptionChange(){return this.table.eventBus.subscriptionChange(...arguments)}dispatch(){return this.table.eventBus.dispatch(...arguments)}chain(){return this.table.eventBus.chain(...arguments)}confirm(){return this.table.eventBus.confirm(...arguments)}dispatchExternal(){return this.table.externalEvents.dispatch(...arguments)}subscribedExternal(e){return this.table.externalEvents.subscribed(e)}subscriptionChangeExternal(){return this.table.externalEvents.subscriptionChange(...arguments)}options(e){return this.table.options[e]}setOption(e,r){return typeof r<"u"&&(this.table.options[e]=r),this.table.options[e]}deprecationCheck(e,r,u){return this.table.deprecationAdvisor.check(e,r,u)}deprecationCheckMsg(e,r){return this.table.deprecationAdvisor.checkMsg(e,r)}deprecationMsg(e){return this.table.deprecationAdvisor.msg(e)}module(e){return this.table.module(e)}}class Ks{static elVisible(e){return!(e.offsetWidth<=0&&e.offsetHeight<=0)}static elOffset(e){var r=e.getBoundingClientRect();return{top:r.top+window.pageYOffset-document.documentElement.clientTop,left:r.left+window.pageXOffset-document.documentElement.clientLeft}}static retrieveNestedData(e,r,u){var R=e?r.split(e):[r],p=R.length,f;for(let n=0;n<p&&(u=u[R[n]],f=u,!!u);n++);return f}static deepClone(e,r,u=[]){var R={}.__proto__,p=[].__proto__;r||(r=Object.assign(Array.isArray(e)?[]:{},e));for(var f in e){let n=e[f],l,c;n!=null&&typeof n=="object"&&(n.__proto__===R||n.__proto__===p)&&(l=u.findIndex(i=>i.subject===n),l>-1?r[f]=u[l].copy:(c=Object.assign(Array.isArray(n)?[]:{},n),u.unshift({subject:n,copy:c}),r[f]=this.deepClone(n,c,u)))}return r}}let QU=class WL extends ch{constructor(e,r,u){super(e),this.element=r,this.container=this._lookupContainer(),this.parent=u,this.reversedX=!1,this.childPopup=null,this.blurable=!1,this.blurCallback=null,this.blurEventsBound=!1,this.renderedCallback=null,this.visible=!1,this.hideable=!0,this.element.classList.add("tabulator-popup-container"),this.blurEvent=this.hide.bind(this,!1),this.escEvent=this._escapeCheck.bind(this),this.destroyBinding=this.tableDestroyed.bind(this),this.destroyed=!1}tableDestroyed(){this.destroyed=!0,this.hide(!0)}_lookupContainer(){var e=this.table.options.popupContainer;return typeof e=="string"?(e=document.querySelector(e),e||console.warn("Menu Error - no container element found matching selector:",this.table.options.popupContainer,"(defaulting to document body)")):e===!0&&(e=this.table.element),e&&!this._checkContainerIsParent(e)&&(e=!1,console.warn("Menu Error - container element does not contain this table:",this.table.options.popupContainer,"(defaulting to document body)")),e||(e=document.body),e}_checkContainerIsParent(e,r=this.table.element){return e===r?!0:r.parentNode?this._checkContainerIsParent(e,r.parentNode):!1}renderCallback(e){this.renderedCallback=e}containerEventCoords(e){var r=!(e instanceof MouseEvent),u=r?e.touches[0].pageX:e.pageX,R=r?e.touches[0].pageY:e.pageY;if(this.container!==document.body){let p=Ks.elOffset(this.container);u-=p.left,R-=p.top}return{x:u,y:R}}elementPositionCoords(e,r="right"){var u=Ks.elOffset(e),R,p,f;switch(this.container!==document.body&&(R=Ks.elOffset(this.container),u.left-=R.left,u.top-=R.top),r){case"right":p=u.left+e.offsetWidth,f=u.top-1;break;case"bottom":p=u.left,f=u.top+e.offsetHeight;break;case"left":p=u.left,f=u.top-1;break;case"top":p=u.left,f=u.top;break;case"center":p=u.left+e.offsetWidth/2,f=u.top+e.offsetHeight/2;break}return{x:p,y:f,offset:u}}show(e,r){var u,R,p,f,n;return this.destroyed||this.table.destroyed?this:(e instanceof HTMLElement?(p=e,n=this.elementPositionCoords(e,r),f=n.offset,u=n.x,R=n.y):typeof e=="number"?(f={top:0,left:0},u=e,R=r):(n=this.containerEventCoords(e),u=n.x,R=n.y,this.reversedX=!1),this.element.style.top=R+"px",this.element.style.left=u+"px",this.container.appendChild(this.element),typeof this.renderedCallback=="function"&&this.renderedCallback(),this._fitToScreen(u,R,p,f,r),this.visible=!0,this.subscribe("table-destroy",this.destroyBinding),this.element.addEventListener("mousedown",l=>{l.stopPropagation()}),this)}_fitToScreen(e,r,u,R,p){var f=this.container===document.body?document.documentElement.scrollTop:this.container.scrollTop;(e+this.element.offsetWidth>=this.container.offsetWidth||this.reversedX)&&(this.element.style.left="",u?this.element.style.right=this.container.offsetWidth-R.left+"px":this.element.style.right=this.container.offsetWidth-e+"px",this.reversedX=!0);let n=Math.max(this.container.offsetHeight,f?this.container.scrollHeight:0);if(r+this.element.offsetHeight>n)if(u)switch(p){case"bottom":this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight-u.offsetHeight-1+"px";break;default:this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight+u.offsetHeight+1+"px"}else this.element.style.height=n+"px"}isVisible(){return this.visible}hideOnBlur(e){return this.blurable=!0,this.visible&&(setTimeout(()=>{this.visible&&(this.table.rowManager.element.addEventListener("scroll",this.blurEvent),this.subscribe("cell-editing",this.blurEvent),document.body.addEventListener("click",this.blurEvent),document.body.addEventListener("contextmenu",this.blurEvent),document.body.addEventListener("mousedown",this.blurEvent),window.addEventListener("resize",this.blurEvent),document.body.addEventListener("keydown",this.escEvent),this.blurEventsBound=!0)},100),this.blurCallback=e),this}_escapeCheck(e){e.keyCode==27&&this.hide()}blockHide(){this.hideable=!1}restoreHide(){this.hideable=!0}hide(e=!1){return this.visible&&this.hideable&&(this.blurable&&this.blurEventsBound&&(document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),document.body.removeEventListener("mousedown",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent),this.unsubscribe("cell-editing",this.blurEvent),this.blurEventsBound=!1),this.childPopup&&this.childPopup.hide(),this.parent&&(this.parent.childPopup=null),this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.visible=!1,this.blurCallback&&!e&&this.blurCallback(),this.unsubscribe("table-destroy",this.destroyBinding)),this}child(e){return this.childPopup&&this.childPopup.hide(),this.childPopup=new WL(this.table,e,this),this.childPopup}};class uo extends ch{constructor(e,r){super(e),this._handler=null}initialize(){}registerTableOption(e,r){this.table.optionsList.register(e,r)}registerColumnOption(e,r){this.table.columnManager.optionsList.register(e,r)}registerTableFunction(e,r){typeof this.table[e]>"u"?this.table[e]=(...u)=>(this.table.initGuard(e),r(...u)):console.warn("Unable to bind table function, name already in use",e)}registerComponentFunction(e,r,u){return this.table.componentFunctionBinder.bind(e,r,u)}registerDataHandler(e,r){this.table.rowManager.registerDataPipelineHandler(e,r),this._handler=e}registerDisplayHandler(e,r){this.table.rowManager.registerDisplayPipelineHandler(e,r),this._handler=e}displayRows(e){var r=this.table.rowManager.displayRows.length-1,u;if(this._handler&&(u=this.table.rowManager.displayPipeline.findIndex(R=>R.handler===this._handler),u>-1&&(r=u)),e&&(r=r+e),this._handler)return r>-1?this.table.rowManager.getDisplayRows(r):this.activeRows()}activeRows(){return this.table.rowManager.activeRows}refreshData(e,r){r||(r=this._handler),r&&this.table.rowManager.refreshActiveData(r,!1,e)}footerAppend(e){return this.table.footerManager.append(e)}footerPrepend(e){return this.table.footerManager.prepend(e)}footerRemove(e){return this.table.footerManager.remove(e)}popup(e,r){return new QU(this.table,e,r)}alert(e,r){return this.table.alertManager.alert(e,r)}clearAlert(){return this.table.alertManager.clear()}}var eH={rownum:function(t,e,r,u,R,p){return p.getPosition()}};const Y0=class Y0 extends uo{constructor(e){super(e),this.allowedTypes=["","data","download","clipboard","print","htmlOutput"],this.registerColumnOption("accessor"),this.registerColumnOption("accessorParams"),this.registerColumnOption("accessorData"),this.registerColumnOption("accessorDataParams"),this.registerColumnOption("accessorDownload"),this.registerColumnOption("accessorDownloadParams"),this.registerColumnOption("accessorClipboard"),this.registerColumnOption("accessorClipboardParams"),this.registerColumnOption("accessorPrint"),this.registerColumnOption("accessorPrintParams"),this.registerColumnOption("accessorHtmlOutput"),this.registerColumnOption("accessorHtmlOutputParams")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-retrieve",this.transformRow.bind(this))}initializeColumn(e){var r=!1,u={};this.allowedTypes.forEach(R=>{var p="accessor"+(R.charAt(0).toUpperCase()+R.slice(1)),f;e.definition[p]&&(f=this.lookupAccessor(e.definition[p]),f&&(r=!0,u[p]={accessor:f,params:e.definition[p+"Params"]||{}}))}),r&&(e.modules.accessor=u)}lookupAccessor(e){var r=!1;switch(typeof e){case"string":Y0.accessors[e]?r=Y0.accessors[e]:console.warn("Accessor Error - No such accessor found, ignoring: ",e);break;case"function":r=e;break}return r}transformRow(e,r){var u="accessor"+(r.charAt(0).toUpperCase()+r.slice(1)),R=e.getComponent(),p=Ks.deepClone(e.data||{});return this.table.columnManager.traverse(function(f){var n,l,c,i;f.modules.accessor&&(l=f.modules.accessor[u]||f.modules.accessor.accessor||!1,l&&(n=f.getFieldValue(p),n!="undefined"&&(i=f.getComponent(),c=typeof l.params=="function"?l.params(n,p,r,i,R):l.params,f.setFieldValue(p,l.accessor(n,p,r,c,i,R)))))}),p}};Ci(Y0,"moduleName","accessor"),Ci(Y0,"accessors",eH);let mT=Y0;var tH={method:"GET"};function gT(t,e){var r=[];if(e=e||"",Array.isArray(t))t.forEach((R,p)=>{r=r.concat(gT(R,e?e+"["+p+"]":p))});else if(typeof t=="object")for(var u in t)r=r.concat(gT(t[u],e?e+"["+u+"]":u));else r.push({key:e,value:t});return r}function nH(t){var e=gT(t),r=[];return e.forEach(function(u){r.push(encodeURIComponent(u.key)+"="+encodeURIComponent(u.value))}),r.join("&")}function GL(t,e,r){return t&&r&&Object.keys(r).length&&(!e.method||e.method.toLowerCase()=="get")&&(e.method="get",t+=(t.includes("?")?"&":"?")+nH(r)),t}function rH(t,e,r){var u;return new Promise((R,p)=>{if(t=this.urlGenerator.call(this.table,t,e,r),e.method.toUpperCase()!="GET")if(u=typeof this.table.options.ajaxContentType=="object"?this.table.options.ajaxContentType:this.contentTypeFormatters[this.table.options.ajaxContentType],u){for(var f in u.headers)e.headers||(e.headers={}),typeof e.headers[f]>"u"&&(e.headers[f]=u.headers[f]);e.body=u.body.call(this,t,e,r)}else console.warn("Ajax Error - Invalid ajaxContentType value:",this.table.options.ajaxContentType);t?(typeof e.headers>"u"&&(e.headers={}),typeof e.headers.Accept>"u"&&(e.headers.Accept="application/json"),typeof e.headers["X-Requested-With"]>"u"&&(e.headers["X-Requested-With"]="XMLHttpRequest"),typeof e.mode>"u"&&(e.mode="cors"),e.mode=="cors"?(typeof e.headers.Origin>"u"&&(e.headers.Origin=window.location.origin),typeof e.credentials>"u"&&(e.credentials="same-origin")):typeof e.credentials>"u"&&(e.credentials="include"),fetch(t,e).then(n=>{n.ok?n.json().then(l=>{R(l)}).catch(l=>{p(l),console.warn("Ajax Load Error - Invalid JSON returned",l)}):(console.error("Ajax Load Error - Connection Error: "+n.status,n.statusText),p(n))}).catch(n=>{console.error("Ajax Load Error - Connection Error: ",n),p(n)})):(console.warn("Ajax Load Error - No URL Set"),R([]))})}function vT(t,e){var r=[];if(e=e||"",Array.isArray(t))t.forEach((R,p)=>{r=r.concat(vT(R,e?e+"["+p+"]":p))});else if(typeof t=="object")for(var u in t)r=r.concat(vT(t[u],e?e+"["+u+"]":u));else r.push({key:e,value:t});return r}var iH={json:{headers:{"Content-Type":"application/json"},body:function(t,e,r){return JSON.stringify(r)}},form:{headers:{},body:function(t,e,r){var u=vT(r),R=new FormData;return u.forEach(function(p){R.append(p.key,p.value)}),R}}};const vd=class vd extends uo{constructor(e){super(e),this.config={},this.url="",this.urlGenerator=!1,this.params=!1,this.loaderPromise=!1,this.registerTableOption("ajaxURL",!1),this.registerTableOption("ajaxURLGenerator",!1),this.registerTableOption("ajaxParams",{}),this.registerTableOption("ajaxConfig","get"),this.registerTableOption("ajaxContentType","form"),this.registerTableOption("ajaxRequestFunc",!1),this.registerTableOption("ajaxRequesting",function(){}),this.registerTableOption("ajaxResponse",!1),this.contentTypeFormatters=vd.contentTypeFormatters}initialize(){this.loaderPromise=this.table.options.ajaxRequestFunc||vd.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||vd.defaultURLGenerator,this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.setDefaultConfig(this.table.options.ajaxConfig),this.registerTableFunction("getAjaxUrl",this.getUrl.bind(this)),this.subscribe("data-loading",this.requestDataCheck.bind(this)),this.subscribe("data-params",this.requestParams.bind(this)),this.subscribe("data-load",this.requestData.bind(this))}requestParams(e,r,u,R){var p=this.table.options.ajaxParams;return p&&(typeof p=="function"&&(p=p.call(this.table)),R=Object.assign(Object.assign({},p),R)),R}requestDataCheck(e,r,u,R){return!!(!e&&this.url||typeof e=="string")}requestData(e,r,u,R,p){var f;return!p&&this.requestDataCheck(e)?(e&&this.setUrl(e),f=this.generateConfig(u),this.sendRequest(this.url,r,f)):p}setDefaultConfig(e={}){this.config=Object.assign({},vd.defaultConfig),typeof e=="string"?this.config.method=e:Object.assign(this.config,e)}generateConfig(e={}){var r=Object.assign({},this.config);return typeof e=="string"?r.method=e:Object.assign(r,e),r}setUrl(e){this.url=e}getUrl(){return this.url}sendRequest(e,r,u){return this.table.options.ajaxRequesting.call(this.table,e,r)!==!1?this.loaderPromise(e,u,r).then(R=>(this.table.options.ajaxResponse&&(R=this.table.options.ajaxResponse.call(this.table,e,r,R)),R)):Promise.reject()}};Ci(vd,"moduleName","ajax"),Ci(vd,"defaultConfig",tH),Ci(vd,"defaultURLGenerator",GL),Ci(vd,"defaultLoaderPromise",rH),Ci(vd,"contentTypeFormatters",iH);let yT=vd;var aH={replace:function(t){return this.table.setData(t)},update:function(t){return this.table.updateOrAddData(t)},insert:function(t){return this.table.addData(t)}},oH={table:function(t){var e=[],r=!0,u=this.table.columnManager.columns,R=[],p=[];return t=t.split(`
55
+ `)};function kj(t){var e=!1;try{e=t instanceof BigInt64Array||t instanceof BigUint64Array}catch{}return t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array||e}var Sj=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,R){u.__proto__=R}||function(u,R){for(var p in R)Object.prototype.hasOwnProperty.call(R,p)&&(u[p]=R[p])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function u(){this.constructor=e}e.prototype=r===null?Object.create(r):(u.prototype=r.prototype,new u)}}();(function(t){Sj(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.componentDidMount=function(){Hc.setFrameHeight()},e.prototype.componentDidUpdate=function(){Hc.setFrameHeight()},e})(FB.PureComponent);const Aj=new TextDecoder("utf-8"),Cj=t=>Aj.decode(t),Mj=new TextEncoder,b7=t=>Mj.encode(t),rv=t=>typeof t=="function",x7=t=>t!=null&&Object(t)===t,Ej=t=>x7(t)&&"done"in t&&"value"in t,Ij=t=>x7(t)&&rv(t.clear)&&rv(t.bytes)&&rv(t.position)&&rv(t.setPosition)&&rv(t.capacity)&&rv(t.getBufferIdentifier)&&rv(t.createLong),Lj=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;function _7(t,e){let r=Ej(e)?e.value:e;return r instanceof t?t===Uint8Array?new t(r.buffer,r.byteOffset,r.byteLength):r:r?(typeof r=="string"&&(r=b7(r)),r instanceof ArrayBuffer?new t(r):r instanceof Lj?new t(r):Ij(r)?_7(t,r.bytes()):ArrayBuffer.isView(r)?r.byteLength<=0?new t(0):new t(r.buffer,r.byteOffset,r.byteLength/t.BYTES_PER_ELEMENT):t.from(r)):new t(0)}function Pj(t,e){let r=0;const u=t.length;if(u!==e.length)return!1;if(u>0)do if(t[r]!==e[r])return!1;while(++r<u);return!0}var dp;(function(t){t[t.Sparse=0]="Sparse",t[t.Dense=1]="Dense"})(dp||(dp={}));var Of;(function(t){t[t.HALF=0]="HALF",t[t.SINGLE=1]="SINGLE",t[t.DOUBLE=2]="DOUBLE"})(Of||(Of={}));var dg;(function(t){t[t.DAY=0]="DAY",t[t.MILLISECOND=1]="MILLISECOND"})(dg||(dg={}));var Ja;(function(t){t[t.SECOND=0]="SECOND",t[t.MILLISECOND=1]="MILLISECOND",t[t.MICROSECOND=2]="MICROSECOND",t[t.NANOSECOND=3]="NANOSECOND"})(Ja||(Ja={}));var Iv;(function(t){t[t.YEAR_MONTH=0]="YEAR_MONTH",t[t.DAY_TIME=1]="DAY_TIME",t[t.MONTH_DAY_NANO=2]="MONTH_DAY_NANO"})(Iv||(Iv={}));var _r;(function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Duration=18]="Duration",t[t.LargeBinary=19]="LargeBinary",t[t.LargeUtf8=20]="LargeUtf8",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth",t[t.DurationSecond=-27]="DurationSecond",t[t.DurationMillisecond=-28]="DurationMillisecond",t[t.DurationMicrosecond=-29]="DurationMicrosecond",t[t.DurationNanosecond=-30]="DurationNanosecond"})(_r||(_r={}));var jp;(function(t){t[t.OFFSET=0]="OFFSET",t[t.DATA=1]="DATA",t[t.VALIDITY=2]="VALIDITY",t[t.TYPE=3]="TYPE"})(jp||(jp={}));const Dj=void 0;function Cb(t){if(t===null)return"null";if(t===Dj)return"undefined";switch(typeof t){case"number":return`${t}`;case"bigint":return`${t}`;case"string":return`"${t}"`}return typeof t[Symbol.toPrimitive]=="function"?t[Symbol.toPrimitive]("string"):ArrayBuffer.isView(t)?t instanceof BigInt64Array||t instanceof BigUint64Array?`[${[...t].map(e=>Cb(e))}]`:`[${t}]`:ArrayBuffer.isView(t)?`[${t}]`:JSON.stringify(t,(e,r)=>typeof r=="bigint"?`${r}`:r)}function Xh(t){if(typeof t=="bigint"&&(t<Number.MIN_SAFE_INTEGER||t>Number.MAX_SAFE_INTEGER))throw new TypeError(`${t} is not safe to convert to a number.`);return Number(t)}function w7(t,e){return Xh(t/e)+Xh(t%e)/Xh(e)}const Rj=Symbol.for("isArrowBigNum");function Pd(t,...e){return e.length===0?Object.setPrototypeOf(_7(this.TypedArray,t),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(t,...e),this.constructor.prototype)}Pd.prototype[Rj]=!0;Pd.prototype.toJSON=function(){return`"${Eb(this)}"`};Pd.prototype.valueOf=function(t){return T7(this,t)};Pd.prototype.toString=function(){return Eb(this)};Pd.prototype[Symbol.toPrimitive]=function(t="default"){switch(t){case"number":return T7(this);case"string":return Eb(this);case"default":return Fj(this)}return Eb(this)};function ly(...t){return Pd.apply(this,t)}function uy(...t){return Pd.apply(this,t)}function Mb(...t){return Pd.apply(this,t)}Object.setPrototypeOf(ly.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(uy.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(Mb.prototype,Object.create(Uint32Array.prototype));Object.assign(ly.prototype,Pd.prototype,{constructor:ly,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array});Object.assign(uy.prototype,Pd.prototype,{constructor:uy,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array});Object.assign(Mb.prototype,Pd.prototype,{constructor:Mb,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const Oj=BigInt(4294967296)*BigInt(4294967296),zj=Oj-BigInt(1);function T7(t,e){const{buffer:r,byteOffset:u,byteLength:R,signed:p}=t,f=new BigUint64Array(r,u,R/8),n=p&&f.at(-1)&BigInt(1)<<BigInt(63);let l=BigInt(0),c=0;if(n){for(const i of f)l|=(i^zj)*(BigInt(1)<<BigInt(64*c++));l*=BigInt(-1),l-=BigInt(1)}else for(const i of f)l|=i*(BigInt(1)<<BigInt(64*c++));if(typeof e=="number"){const i=BigInt(Math.pow(10,e)),_=l/i,b=l%i;return Xh(_)+Xh(b)/Xh(i)}return Xh(l)}function Eb(t){if(t.byteLength===8)return`${new t.BigIntArray(t.buffer,t.byteOffset,1)[0]}`;if(!t.signed)return p5(t);let e=new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2);if(new Int16Array([e.at(-1)])[0]>=0)return p5(t);e=e.slice();let u=1;for(let p=0;p<e.length;p++){const f=e[p],n=~f+u;e[p]=n,u&=f===0?1:0}return`-${p5(e)}`}function Fj(t){return t.byteLength===8?new t.BigIntArray(t.buffer,t.byteOffset,1)[0]:Eb(t)}function p5(t){let e="";const r=new Uint32Array(2);let u=new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2);const R=new Uint32Array((u=new Uint16Array(u).reverse()).buffer);let p=-1;const f=u.length-1;do{for(r[0]=u[p=0];p<f;)u[p++]=r[1]=r[0]/10,r[0]=(r[0]-r[1]*10<<16)+u[p];u[p]=r[1]=r[0]/10,r[0]=r[0]-r[1]*10,e=`${r[0]}${e}`}while(R[0]||R[1]||R[2]||R[3]);return e??"0"}class B4{static new(e,r){switch(r){case!0:return new ly(e);case!1:return new uy(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case BigInt64Array:return new ly(e)}return e.byteLength===16?new Mb(e):new uy(e)}static signed(e){return new ly(e)}static unsigned(e){return new uy(e)}static decimal(e){return new Mb(e)}constructor(e,r){return B4.new(e,r)}}var k7,S7,A7,C7,M7,E7,I7,L7,P7,D7,R7,O7,z7,F7,B7,N7,V7,j7,U7,H7,q7,W7;class so{static isNull(e){return(e==null?void 0:e.typeId)===_r.Null}static isInt(e){return(e==null?void 0:e.typeId)===_r.Int}static isFloat(e){return(e==null?void 0:e.typeId)===_r.Float}static isBinary(e){return(e==null?void 0:e.typeId)===_r.Binary}static isLargeBinary(e){return(e==null?void 0:e.typeId)===_r.LargeBinary}static isUtf8(e){return(e==null?void 0:e.typeId)===_r.Utf8}static isLargeUtf8(e){return(e==null?void 0:e.typeId)===_r.LargeUtf8}static isBool(e){return(e==null?void 0:e.typeId)===_r.Bool}static isDecimal(e){return(e==null?void 0:e.typeId)===_r.Decimal}static isDate(e){return(e==null?void 0:e.typeId)===_r.Date}static isTime(e){return(e==null?void 0:e.typeId)===_r.Time}static isTimestamp(e){return(e==null?void 0:e.typeId)===_r.Timestamp}static isInterval(e){return(e==null?void 0:e.typeId)===_r.Interval}static isDuration(e){return(e==null?void 0:e.typeId)===_r.Duration}static isList(e){return(e==null?void 0:e.typeId)===_r.List}static isStruct(e){return(e==null?void 0:e.typeId)===_r.Struct}static isUnion(e){return(e==null?void 0:e.typeId)===_r.Union}static isFixedSizeBinary(e){return(e==null?void 0:e.typeId)===_r.FixedSizeBinary}static isFixedSizeList(e){return(e==null?void 0:e.typeId)===_r.FixedSizeList}static isMap(e){return(e==null?void 0:e.typeId)===_r.Map}static isDictionary(e){return(e==null?void 0:e.typeId)===_r.Dictionary}static isDenseUnion(e){return so.isUnion(e)&&e.mode===dp.Dense}static isSparseUnion(e){return so.isUnion(e)&&e.mode===dp.Sparse}constructor(e){this.typeId=e}}k7=Symbol.toStringTag;so[k7]=(t=>(t.children=null,t.ArrayType=Array,t.OffsetArrayType=Int32Array,t[Symbol.toStringTag]="DataType"))(so.prototype);class PC extends so{constructor(){super(_r.Null)}toString(){return"Null"}}S7=Symbol.toStringTag;PC[S7]=(t=>t[Symbol.toStringTag]="Null")(PC.prototype);class DC extends so{constructor(e,r){super(_r.Int),this.isSigned=e,this.bitWidth=r}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}A7=Symbol.toStringTag;DC[A7]=(t=>(t.isSigned=null,t.bitWidth=null,t[Symbol.toStringTag]="Int"))(DC.prototype);class RC extends so{constructor(e){super(_r.Float),this.precision=e}get ArrayType(){switch(this.precision){case Of.HALF:return Uint16Array;case Of.SINGLE:return Float32Array;case Of.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}}C7=Symbol.toStringTag;RC[C7]=(t=>(t.precision=null,t[Symbol.toStringTag]="Float"))(RC.prototype);class OC extends so{constructor(){super(_r.Binary)}toString(){return"Binary"}}M7=Symbol.toStringTag;OC[M7]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Binary"))(OC.prototype);class zC extends so{constructor(){super(_r.LargeBinary)}toString(){return"LargeBinary"}}E7=Symbol.toStringTag;zC[E7]=(t=>(t.ArrayType=Uint8Array,t.OffsetArrayType=BigInt64Array,t[Symbol.toStringTag]="LargeBinary"))(zC.prototype);class FC extends so{constructor(){super(_r.Utf8)}toString(){return"Utf8"}}I7=Symbol.toStringTag;FC[I7]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Utf8"))(FC.prototype);class BC extends so{constructor(){super(_r.LargeUtf8)}toString(){return"LargeUtf8"}}L7=Symbol.toStringTag;BC[L7]=(t=>(t.ArrayType=Uint8Array,t.OffsetArrayType=BigInt64Array,t[Symbol.toStringTag]="LargeUtf8"))(BC.prototype);class NC extends so{constructor(){super(_r.Bool)}toString(){return"Bool"}}P7=Symbol.toStringTag;NC[P7]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Bool"))(NC.prototype);class VC extends so{constructor(e,r,u=128){super(_r.Decimal),this.scale=e,this.precision=r,this.bitWidth=u}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}}D7=Symbol.toStringTag;VC[D7]=(t=>(t.scale=null,t.precision=null,t.ArrayType=Uint32Array,t[Symbol.toStringTag]="Decimal"))(VC.prototype);class jC extends so{constructor(e){super(_r.Date),this.unit=e}toString(){return`Date${(this.unit+1)*32}<${dg[this.unit]}>`}get ArrayType(){return this.unit===dg.DAY?Int32Array:BigInt64Array}}R7=Symbol.toStringTag;jC[R7]=(t=>(t.unit=null,t[Symbol.toStringTag]="Date"))(jC.prototype);class UC extends so{constructor(e,r){super(_r.Time),this.unit=e,this.bitWidth=r}toString(){return`Time${this.bitWidth}<${Ja[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}O7=Symbol.toStringTag;UC[O7]=(t=>(t.unit=null,t.bitWidth=null,t[Symbol.toStringTag]="Time"))(UC.prototype);class HC extends so{constructor(e,r){super(_r.Timestamp),this.unit=e,this.timezone=r}toString(){return`Timestamp<${Ja[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}}z7=Symbol.toStringTag;HC[z7]=(t=>(t.unit=null,t.timezone=null,t.ArrayType=BigInt64Array,t[Symbol.toStringTag]="Timestamp"))(HC.prototype);class qC extends so{constructor(e){super(_r.Interval),this.unit=e}toString(){return`Interval<${Iv[this.unit]}>`}}F7=Symbol.toStringTag;qC[F7]=(t=>(t.unit=null,t.ArrayType=Int32Array,t[Symbol.toStringTag]="Interval"))(qC.prototype);class WC extends so{constructor(e){super(_r.Duration),this.unit=e}toString(){return`Duration<${Ja[this.unit]}>`}}B7=Symbol.toStringTag;WC[B7]=(t=>(t.unit=null,t.ArrayType=BigInt64Array,t[Symbol.toStringTag]="Duration"))(WC.prototype);class GC extends so{constructor(e){super(_r.List),this.children=[e]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}}N7=Symbol.toStringTag;GC[N7]=(t=>(t.children=null,t[Symbol.toStringTag]="List"))(GC.prototype);class $C extends so{constructor(e){super(_r.Struct),this.children=e}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}}V7=Symbol.toStringTag;$C[V7]=(t=>(t.children=null,t[Symbol.toStringTag]="Struct"))($C.prototype);class YC extends so{constructor(e,r,u){super(_r.Union),this.mode=e,this.children=u,this.typeIds=r=Int32Array.from(r),this.typeIdToChildIndex=r.reduce((R,p,f)=>(R[p]=f)&&R||R,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(" | ")}>`}}j7=Symbol.toStringTag;YC[j7]=(t=>(t.mode=null,t.typeIds=null,t.children=null,t.typeIdToChildIndex=null,t.ArrayType=Int8Array,t[Symbol.toStringTag]="Union"))(YC.prototype);class ZC extends so{constructor(e){super(_r.FixedSizeBinary),this.byteWidth=e}toString(){return`FixedSizeBinary[${this.byteWidth}]`}}U7=Symbol.toStringTag;ZC[U7]=(t=>(t.byteWidth=null,t.ArrayType=Uint8Array,t[Symbol.toStringTag]="FixedSizeBinary"))(ZC.prototype);class XC extends so{constructor(e,r){super(_r.FixedSizeList),this.listSize=e,this.children=[r]}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}H7=Symbol.toStringTag;XC[H7]=(t=>(t.children=null,t.listSize=null,t[Symbol.toStringTag]="FixedSizeList"))(XC.prototype);class KC extends so{constructor(e,r=!1){var u,R,p;if(super(_r.Map),this.children=[e],this.keysSorted=r,e&&(e.name="entries",!((u=e==null?void 0:e.type)===null||u===void 0)&&u.children)){const f=(R=e==null?void 0:e.type)===null||R===void 0?void 0:R.children[0];f&&(f.name="key");const n=(p=e==null?void 0:e.type)===null||p===void 0?void 0:p.children[1];n&&(n.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}}q7=Symbol.toStringTag;KC[q7]=(t=>(t.children=null,t.keysSorted=null,t[Symbol.toStringTag]="Map_"))(KC.prototype);const Bj=(t=>()=>++t)(-1);class JC extends so{constructor(e,r,u,R){super(_r.Dictionary),this.indices=r,this.dictionary=e,this.isOrdered=R||!1,this.id=u==null?Bj():Xh(u)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}}W7=Symbol.toStringTag;JC[W7]=(t=>(t.id=null,t.indices=null,t.isOrdered=null,t.dictionary=null,t[Symbol.toStringTag]="Dictionary"))(JC.prototype);function G7(t){const e=t;switch(t.typeId){case _r.Decimal:return t.bitWidth/32;case _r.Interval:return 1+e.unit;case _r.FixedSizeList:return e.listSize;case _r.FixedSizeBinary:return e.byteWidth;default:return 1}}class zo{visitMany(e,...r){return e.map((u,R)=>this.visit(u,...r.map(p=>p[R])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,r=!0){return Nj(this,e,r)}getVisitFnByTypeId(e,r=!0){return V0(this,e,r)}visitNull(e,...r){return null}visitBool(e,...r){return null}visitInt(e,...r){return null}visitFloat(e,...r){return null}visitUtf8(e,...r){return null}visitLargeUtf8(e,...r){return null}visitBinary(e,...r){return null}visitLargeBinary(e,...r){return null}visitFixedSizeBinary(e,...r){return null}visitDate(e,...r){return null}visitTimestamp(e,...r){return null}visitTime(e,...r){return null}visitDecimal(e,...r){return null}visitList(e,...r){return null}visitStruct(e,...r){return null}visitUnion(e,...r){return null}visitDictionary(e,...r){return null}visitInterval(e,...r){return null}visitDuration(e,...r){return null}visitFixedSizeList(e,...r){return null}visitMap(e,...r){return null}}function Nj(t,e,r=!0){return typeof e=="number"?V0(t,e,r):typeof e=="string"&&e in _r?V0(t,_r[e],r):e&&e instanceof so?V0(t,QC(e),r):e!=null&&e.type&&e.type instanceof so?V0(t,QC(e.type),r):V0(t,_r.NONE,r)}function V0(t,e,r=!0){let u=null;switch(e){case _r.Null:u=t.visitNull;break;case _r.Bool:u=t.visitBool;break;case _r.Int:u=t.visitInt;break;case _r.Int8:u=t.visitInt8||t.visitInt;break;case _r.Int16:u=t.visitInt16||t.visitInt;break;case _r.Int32:u=t.visitInt32||t.visitInt;break;case _r.Int64:u=t.visitInt64||t.visitInt;break;case _r.Uint8:u=t.visitUint8||t.visitInt;break;case _r.Uint16:u=t.visitUint16||t.visitInt;break;case _r.Uint32:u=t.visitUint32||t.visitInt;break;case _r.Uint64:u=t.visitUint64||t.visitInt;break;case _r.Float:u=t.visitFloat;break;case _r.Float16:u=t.visitFloat16||t.visitFloat;break;case _r.Float32:u=t.visitFloat32||t.visitFloat;break;case _r.Float64:u=t.visitFloat64||t.visitFloat;break;case _r.Utf8:u=t.visitUtf8;break;case _r.LargeUtf8:u=t.visitLargeUtf8;break;case _r.Binary:u=t.visitBinary;break;case _r.LargeBinary:u=t.visitLargeBinary;break;case _r.FixedSizeBinary:u=t.visitFixedSizeBinary;break;case _r.Date:u=t.visitDate;break;case _r.DateDay:u=t.visitDateDay||t.visitDate;break;case _r.DateMillisecond:u=t.visitDateMillisecond||t.visitDate;break;case _r.Timestamp:u=t.visitTimestamp;break;case _r.TimestampSecond:u=t.visitTimestampSecond||t.visitTimestamp;break;case _r.TimestampMillisecond:u=t.visitTimestampMillisecond||t.visitTimestamp;break;case _r.TimestampMicrosecond:u=t.visitTimestampMicrosecond||t.visitTimestamp;break;case _r.TimestampNanosecond:u=t.visitTimestampNanosecond||t.visitTimestamp;break;case _r.Time:u=t.visitTime;break;case _r.TimeSecond:u=t.visitTimeSecond||t.visitTime;break;case _r.TimeMillisecond:u=t.visitTimeMillisecond||t.visitTime;break;case _r.TimeMicrosecond:u=t.visitTimeMicrosecond||t.visitTime;break;case _r.TimeNanosecond:u=t.visitTimeNanosecond||t.visitTime;break;case _r.Decimal:u=t.visitDecimal;break;case _r.List:u=t.visitList;break;case _r.Struct:u=t.visitStruct;break;case _r.Union:u=t.visitUnion;break;case _r.DenseUnion:u=t.visitDenseUnion||t.visitUnion;break;case _r.SparseUnion:u=t.visitSparseUnion||t.visitUnion;break;case _r.Dictionary:u=t.visitDictionary;break;case _r.Interval:u=t.visitInterval;break;case _r.IntervalDayTime:u=t.visitIntervalDayTime||t.visitInterval;break;case _r.IntervalYearMonth:u=t.visitIntervalYearMonth||t.visitInterval;break;case _r.Duration:u=t.visitDuration;break;case _r.DurationSecond:u=t.visitDurationSecond||t.visitDuration;break;case _r.DurationMillisecond:u=t.visitDurationMillisecond||t.visitDuration;break;case _r.DurationMicrosecond:u=t.visitDurationMicrosecond||t.visitDuration;break;case _r.DurationNanosecond:u=t.visitDurationNanosecond||t.visitDuration;break;case _r.FixedSizeList:u=t.visitFixedSizeList;break;case _r.Map:u=t.visitMap;break}if(typeof u=="function")return u;if(!r)return()=>null;throw new Error(`Unrecognized type '${_r[e]}'`)}function QC(t){switch(t.typeId){case _r.Null:return _r.Null;case _r.Int:{const{bitWidth:e,isSigned:r}=t;switch(e){case 8:return r?_r.Int8:_r.Uint8;case 16:return r?_r.Int16:_r.Uint16;case 32:return r?_r.Int32:_r.Uint32;case 64:return r?_r.Int64:_r.Uint64}return _r.Int}case _r.Float:switch(t.precision){case Of.HALF:return _r.Float16;case Of.SINGLE:return _r.Float32;case Of.DOUBLE:return _r.Float64}return _r.Float;case _r.Binary:return _r.Binary;case _r.LargeBinary:return _r.LargeBinary;case _r.Utf8:return _r.Utf8;case _r.LargeUtf8:return _r.LargeUtf8;case _r.Bool:return _r.Bool;case _r.Decimal:return _r.Decimal;case _r.Time:switch(t.unit){case Ja.SECOND:return _r.TimeSecond;case Ja.MILLISECOND:return _r.TimeMillisecond;case Ja.MICROSECOND:return _r.TimeMicrosecond;case Ja.NANOSECOND:return _r.TimeNanosecond}return _r.Time;case _r.Timestamp:switch(t.unit){case Ja.SECOND:return _r.TimestampSecond;case Ja.MILLISECOND:return _r.TimestampMillisecond;case Ja.MICROSECOND:return _r.TimestampMicrosecond;case Ja.NANOSECOND:return _r.TimestampNanosecond}return _r.Timestamp;case _r.Date:switch(t.unit){case dg.DAY:return _r.DateDay;case dg.MILLISECOND:return _r.DateMillisecond}return _r.Date;case _r.Interval:switch(t.unit){case Iv.DAY_TIME:return _r.IntervalDayTime;case Iv.YEAR_MONTH:return _r.IntervalYearMonth}return _r.Interval;case _r.Duration:switch(t.unit){case Ja.SECOND:return _r.DurationSecond;case Ja.MILLISECOND:return _r.DurationMillisecond;case Ja.MICROSECOND:return _r.DurationMicrosecond;case Ja.NANOSECOND:return _r.DurationNanosecond}return _r.Duration;case _r.Map:return _r.Map;case _r.List:return _r.List;case _r.Struct:return _r.Struct;case _r.Union:switch(t.mode){case dp.Dense:return _r.DenseUnion;case dp.Sparse:return _r.SparseUnion}return _r.Union;case _r.FixedSizeBinary:return _r.FixedSizeBinary;case _r.FixedSizeList:return _r.FixedSizeList;case _r.Dictionary:return _r.Dictionary}throw new Error(`Unrecognized type '${_r[t.typeId]}'`)}zo.prototype.visitInt8=null;zo.prototype.visitInt16=null;zo.prototype.visitInt32=null;zo.prototype.visitInt64=null;zo.prototype.visitUint8=null;zo.prototype.visitUint16=null;zo.prototype.visitUint32=null;zo.prototype.visitUint64=null;zo.prototype.visitFloat16=null;zo.prototype.visitFloat32=null;zo.prototype.visitFloat64=null;zo.prototype.visitDateDay=null;zo.prototype.visitDateMillisecond=null;zo.prototype.visitTimestampSecond=null;zo.prototype.visitTimestampMillisecond=null;zo.prototype.visitTimestampMicrosecond=null;zo.prototype.visitTimestampNanosecond=null;zo.prototype.visitTimeSecond=null;zo.prototype.visitTimeMillisecond=null;zo.prototype.visitTimeMicrosecond=null;zo.prototype.visitTimeNanosecond=null;zo.prototype.visitDenseUnion=null;zo.prototype.visitSparseUnion=null;zo.prototype.visitIntervalDayTime=null;zo.prototype.visitIntervalYearMonth=null;zo.prototype.visitDuration=null;zo.prototype.visitDurationSecond=null;zo.prototype.visitDurationMillisecond=null;zo.prototype.visitDurationMicrosecond=null;zo.prototype.visitDurationNanosecond=null;const $7=new Float64Array(1),C0=new Uint32Array($7.buffer);function Y7(t){const e=(t&31744)>>10,r=(t&1023)/1024,u=Math.pow(-1,(t&32768)>>15);switch(e){case 31:return u*(r?Number.NaN:1/0);case 0:return u*(r?6103515625e-14*r:0)}return u*Math.pow(2,e-15)*(1+r)}function Vj(t){if(t!==t)return 32256;$7[0]=t;const e=(C0[1]&2147483648)>>16&65535;let r=C0[1]&2146435072,u=0;return r>=1089470464?C0[0]>0?r=31744:(r=(r&2080374784)>>16,u=(C0[1]&1048575)>>10):r<=1056964608?(u=1048576+(C0[1]&1048575),u=1048576+(u<<(r>>20)-998)>>21,r=0):(r=r-1056964608>>10,u=(C0[1]&1048575)+512>>10),e|r|u&65535}class da extends zo{}function ya(t){return(e,r,u)=>{if(e.setValid(r,u!=null))return t(e,r,u)}}const jj=(t,e,r)=>{t[e]=Math.floor(r/864e5)},Z7=(t,e,r,u)=>{if(r+1<e.length){const R=Xh(e[r]),p=Xh(e[r+1]);t.set(u.subarray(0,p-R),R)}},Uj=({offset:t,values:e},r,u)=>{const R=t+r;u?e[R>>3]|=1<<R%8:e[R>>3]&=~(1<<R%8)},fm=({values:t},e,r)=>{t[e]=r},N4=({values:t},e,r)=>{t[e]=r},X7=({values:t},e,r)=>{t[e]=Vj(r)},Hj=(t,e,r)=>{switch(t.type.precision){case Of.HALF:return X7(t,e,r);case Of.SINGLE:case Of.DOUBLE:return N4(t,e,r)}},K7=({values:t},e,r)=>{jj(t,e,r.valueOf())},J7=({values:t},e,r)=>{t[e]=BigInt(r)},qj=({stride:t,values:e},r,u)=>{e.set(u.subarray(0,t),t*r)},Q7=({values:t,valueOffsets:e},r,u)=>Z7(t,e,r,u),eL=({values:t,valueOffsets:e},r,u)=>Z7(t,e,r,b7(u)),Wj=(t,e,r)=>{t.type.unit===dg.DAY?K7(t,e,r):J7(t,e,r)},tL=({values:t},e,r)=>{t[e]=BigInt(r/1e3)},nL=({values:t},e,r)=>{t[e]=BigInt(r)},rL=({values:t},e,r)=>{t[e]=BigInt(r*1e3)},iL=({values:t},e,r)=>{t[e]=BigInt(r*1e6)},Gj=(t,e,r)=>{switch(t.type.unit){case Ja.SECOND:return tL(t,e,r);case Ja.MILLISECOND:return nL(t,e,r);case Ja.MICROSECOND:return rL(t,e,r);case Ja.NANOSECOND:return iL(t,e,r)}},aL=({values:t},e,r)=>{t[e]=r},oL=({values:t},e,r)=>{t[e]=r},sL=({values:t},e,r)=>{t[e]=r},lL=({values:t},e,r)=>{t[e]=r},$j=(t,e,r)=>{switch(t.type.unit){case Ja.SECOND:return aL(t,e,r);case Ja.MILLISECOND:return oL(t,e,r);case Ja.MICROSECOND:return sL(t,e,r);case Ja.NANOSECOND:return lL(t,e,r)}},Yj=({values:t,stride:e},r,u)=>{t.set(u.subarray(0,e),e*r)},Zj=(t,e,r)=>{const u=t.children[0],R=t.valueOffsets,p=pp.getVisitFn(u);if(Array.isArray(r))for(let f=-1,n=R[e],l=R[e+1];n<l;)p(u,n++,r[++f]);else for(let f=-1,n=R[e],l=R[e+1];n<l;)p(u,n++,r.get(++f))},Xj=(t,e,r)=>{const u=t.children[0],{valueOffsets:R}=t,p=pp.getVisitFn(u);let{[e]:f,[e+1]:n}=R;const l=r instanceof Map?r.entries():Object.entries(r);for(const c of l)if(p(u,f,c),++f>=n)break},Kj=(t,e)=>(r,u,R,p)=>u&&r(u,t,e[p]),Jj=(t,e)=>(r,u,R,p)=>u&&r(u,t,e.get(p)),Qj=(t,e)=>(r,u,R,p)=>u&&r(u,t,e.get(R.name)),eU=(t,e)=>(r,u,R,p)=>u&&r(u,t,e[R.name]),tU=(t,e,r)=>{const u=t.type.children.map(p=>pp.getVisitFn(p.type)),R=r instanceof Map?Qj(e,r):r instanceof qc?Jj(e,r):Array.isArray(r)?Kj(e,r):eU(e,r);t.type.children.forEach((p,f)=>R(u[f],t.children[f],p,f))},nU=(t,e,r)=>{t.type.mode===dp.Dense?uL(t,e,r):cL(t,e,r)},uL=(t,e,r)=>{const u=t.type.typeIdToChildIndex[t.typeIds[e]],R=t.children[u];pp.visit(R,t.valueOffsets[e],r)},cL=(t,e,r)=>{const u=t.type.typeIdToChildIndex[t.typeIds[e]],R=t.children[u];pp.visit(R,e,r)},rU=(t,e,r)=>{var u;(u=t.dictionary)===null||u===void 0||u.set(t.values[e],r)},iU=(t,e,r)=>{t.type.unit===Iv.DAY_TIME?hL(t,e,r):fL(t,e,r)},hL=({values:t},e,r)=>{t.set(r.subarray(0,2),2*e)},fL=({values:t},e,r)=>{t[e]=r[0]*12+r[1]%12},dL=({values:t},e,r)=>{t[e]=r},pL=({values:t},e,r)=>{t[e]=r},mL=({values:t},e,r)=>{t[e]=r},gL=({values:t},e,r)=>{t[e]=r},aU=(t,e,r)=>{switch(t.type.unit){case Ja.SECOND:return dL(t,e,r);case Ja.MILLISECOND:return pL(t,e,r);case Ja.MICROSECOND:return mL(t,e,r);case Ja.NANOSECOND:return gL(t,e,r)}},oU=(t,e,r)=>{const{stride:u}=t,R=t.children[0],p=pp.getVisitFn(R);if(Array.isArray(r))for(let f=-1,n=e*u;++f<u;)p(R,n+f,r[f]);else for(let f=-1,n=e*u;++f<u;)p(R,n+f,r.get(f))};da.prototype.visitBool=ya(Uj);da.prototype.visitInt=ya(fm);da.prototype.visitInt8=ya(fm);da.prototype.visitInt16=ya(fm);da.prototype.visitInt32=ya(fm);da.prototype.visitInt64=ya(fm);da.prototype.visitUint8=ya(fm);da.prototype.visitUint16=ya(fm);da.prototype.visitUint32=ya(fm);da.prototype.visitUint64=ya(fm);da.prototype.visitFloat=ya(Hj);da.prototype.visitFloat16=ya(X7);da.prototype.visitFloat32=ya(N4);da.prototype.visitFloat64=ya(N4);da.prototype.visitUtf8=ya(eL);da.prototype.visitLargeUtf8=ya(eL);da.prototype.visitBinary=ya(Q7);da.prototype.visitLargeBinary=ya(Q7);da.prototype.visitFixedSizeBinary=ya(qj);da.prototype.visitDate=ya(Wj);da.prototype.visitDateDay=ya(K7);da.prototype.visitDateMillisecond=ya(J7);da.prototype.visitTimestamp=ya(Gj);da.prototype.visitTimestampSecond=ya(tL);da.prototype.visitTimestampMillisecond=ya(nL);da.prototype.visitTimestampMicrosecond=ya(rL);da.prototype.visitTimestampNanosecond=ya(iL);da.prototype.visitTime=ya($j);da.prototype.visitTimeSecond=ya(aL);da.prototype.visitTimeMillisecond=ya(oL);da.prototype.visitTimeMicrosecond=ya(sL);da.prototype.visitTimeNanosecond=ya(lL);da.prototype.visitDecimal=ya(Yj);da.prototype.visitList=ya(Zj);da.prototype.visitStruct=ya(tU);da.prototype.visitUnion=ya(nU);da.prototype.visitDenseUnion=ya(uL);da.prototype.visitSparseUnion=ya(cL);da.prototype.visitDictionary=ya(rU);da.prototype.visitInterval=ya(iU);da.prototype.visitIntervalDayTime=ya(hL);da.prototype.visitIntervalYearMonth=ya(fL);da.prototype.visitDuration=ya(aU);da.prototype.visitDurationSecond=ya(dL);da.prototype.visitDurationMillisecond=ya(pL);da.prototype.visitDurationMicrosecond=ya(mL);da.prototype.visitDurationNanosecond=ya(gL);da.prototype.visitFixedSizeList=ya(oU);da.prototype.visitMap=ya(Xj);const pp=new da,bd=Symbol.for("parent"),cy=Symbol.for("rowIndex");class V4{constructor(e,r){return this[bd]=e,this[cy]=r,new Proxy(this,new lU)}toArray(){return Object.values(this.toJSON())}toJSON(){const e=this[cy],r=this[bd],u=r.type.children,R={};for(let p=-1,f=u.length;++p<f;)R[u[p].name]=ad.visit(r.children[p],e);return R}toString(){return`{${[...this].map(([e,r])=>`${Cb(e)}: ${Cb(r)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new sU(this[bd],this[cy])}}class sU{constructor(e,r){this.childIndex=0,this.children=e.children,this.rowIndex=r,this.childFields=e.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){const e=this.childIndex;return e<this.numChildren?(this.childIndex=e+1,{done:!1,value:[this.childFields[e].name,ad.visit(this.children[e],this.rowIndex)]}):{done:!0,value:null}}}Object.defineProperties(V4.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[bd]:{writable:!0,enumerable:!1,configurable:!1,value:null},[cy]:{writable:!0,enumerable:!1,configurable:!1,value:-1}});class lU{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[bd].type.children.map(r=>r.name)}has(e,r){return e[bd].type.children.findIndex(u=>u.name===r)!==-1}getOwnPropertyDescriptor(e,r){if(e[bd].type.children.findIndex(u=>u.name===r)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,r){if(Reflect.has(e,r))return e[r];const u=e[bd].type.children.findIndex(R=>R.name===r);if(u!==-1){const R=ad.visit(e[bd].children[u],e[cy]);return Reflect.set(e,r,R),R}}set(e,r,u){const R=e[bd].type.children.findIndex(p=>p.name===r);return R!==-1?(pp.visit(e[bd].children[R],e[cy],u),Reflect.set(e,r,u)):Reflect.has(e,r)||typeof r=="symbol"?Reflect.set(e,r,u):!1}}class ua extends zo{}function pa(t){return(e,r)=>e.getValid(r)?t(e,r):null}const uU=(t,e)=>864e5*t[e],cU=(t,e)=>null,vL=(t,e,r)=>{if(r+1>=e.length)return null;const u=Xh(e[r]),R=Xh(e[r+1]);return t.subarray(u,R)},hU=({offset:t,values:e},r)=>{const u=t+r;return(e[u>>3]&1<<u%8)!==0},yL=({values:t},e)=>uU(t,e),bL=({values:t},e)=>Xh(t[e]),Ag=({stride:t,values:e},r)=>e[t*r],fU=({stride:t,values:e},r)=>Y7(e[t*r]),xL=({values:t},e)=>t[e],dU=({stride:t,values:e},r)=>e.subarray(t*r,t*(r+1)),_L=({values:t,valueOffsets:e},r)=>vL(t,e,r),wL=({values:t,valueOffsets:e},r)=>{const u=vL(t,e,r);return u!==null?Cj(u):null},pU=({values:t},e)=>t[e],mU=({type:t,values:e},r)=>t.precision!==Of.HALF?e[r]:Y7(e[r]),gU=(t,e)=>t.type.unit===dg.DAY?yL(t,e):bL(t,e),TL=({values:t},e)=>1e3*Xh(t[e]),kL=({values:t},e)=>Xh(t[e]),SL=({values:t},e)=>w7(t[e],BigInt(1e3)),AL=({values:t},e)=>w7(t[e],BigInt(1e6)),vU=(t,e)=>{switch(t.type.unit){case Ja.SECOND:return TL(t,e);case Ja.MILLISECOND:return kL(t,e);case Ja.MICROSECOND:return SL(t,e);case Ja.NANOSECOND:return AL(t,e)}},CL=({values:t},e)=>t[e],ML=({values:t},e)=>t[e],EL=({values:t},e)=>t[e],IL=({values:t},e)=>t[e],yU=(t,e)=>{switch(t.type.unit){case Ja.SECOND:return CL(t,e);case Ja.MILLISECOND:return ML(t,e);case Ja.MICROSECOND:return EL(t,e);case Ja.NANOSECOND:return IL(t,e)}},bU=({values:t,stride:e},r)=>B4.decimal(t.subarray(e*r,e*(r+1))),xU=(t,e)=>{const{valueOffsets:r,stride:u,children:R}=t,{[e*u]:p,[e*u+1]:f}=r,l=R[0].slice(p,f-p);return new qc([l])},_U=(t,e)=>{const{valueOffsets:r,children:u}=t,{[e]:R,[e+1]:p}=r,f=u[0];return new j4(f.slice(R,p-R))},wU=(t,e)=>new V4(t,e),TU=(t,e)=>t.type.mode===dp.Dense?LL(t,e):PL(t,e),LL=(t,e)=>{const r=t.type.typeIdToChildIndex[t.typeIds[e]],u=t.children[r];return ad.visit(u,t.valueOffsets[e])},PL=(t,e)=>{const r=t.type.typeIdToChildIndex[t.typeIds[e]],u=t.children[r];return ad.visit(u,e)},kU=(t,e)=>{var r;return(r=t.dictionary)===null||r===void 0?void 0:r.get(t.values[e])},SU=(t,e)=>t.type.unit===Iv.DAY_TIME?DL(t,e):RL(t,e),DL=({values:t},e)=>t.subarray(2*e,2*(e+1)),RL=({values:t},e)=>{const r=t[e],u=new Int32Array(2);return u[0]=Math.trunc(r/12),u[1]=Math.trunc(r%12),u},OL=({values:t},e)=>t[e],zL=({values:t},e)=>t[e],FL=({values:t},e)=>t[e],BL=({values:t},e)=>t[e],AU=(t,e)=>{switch(t.type.unit){case Ja.SECOND:return OL(t,e);case Ja.MILLISECOND:return zL(t,e);case Ja.MICROSECOND:return FL(t,e);case Ja.NANOSECOND:return BL(t,e)}},CU=(t,e)=>{const{stride:r,children:u}=t,p=u[0].slice(e*r,r);return new qc([p])};ua.prototype.visitNull=pa(cU);ua.prototype.visitBool=pa(hU);ua.prototype.visitInt=pa(pU);ua.prototype.visitInt8=pa(Ag);ua.prototype.visitInt16=pa(Ag);ua.prototype.visitInt32=pa(Ag);ua.prototype.visitInt64=pa(xL);ua.prototype.visitUint8=pa(Ag);ua.prototype.visitUint16=pa(Ag);ua.prototype.visitUint32=pa(Ag);ua.prototype.visitUint64=pa(xL);ua.prototype.visitFloat=pa(mU);ua.prototype.visitFloat16=pa(fU);ua.prototype.visitFloat32=pa(Ag);ua.prototype.visitFloat64=pa(Ag);ua.prototype.visitUtf8=pa(wL);ua.prototype.visitLargeUtf8=pa(wL);ua.prototype.visitBinary=pa(_L);ua.prototype.visitLargeBinary=pa(_L);ua.prototype.visitFixedSizeBinary=pa(dU);ua.prototype.visitDate=pa(gU);ua.prototype.visitDateDay=pa(yL);ua.prototype.visitDateMillisecond=pa(bL);ua.prototype.visitTimestamp=pa(vU);ua.prototype.visitTimestampSecond=pa(TL);ua.prototype.visitTimestampMillisecond=pa(kL);ua.prototype.visitTimestampMicrosecond=pa(SL);ua.prototype.visitTimestampNanosecond=pa(AL);ua.prototype.visitTime=pa(yU);ua.prototype.visitTimeSecond=pa(CL);ua.prototype.visitTimeMillisecond=pa(ML);ua.prototype.visitTimeMicrosecond=pa(EL);ua.prototype.visitTimeNanosecond=pa(IL);ua.prototype.visitDecimal=pa(bU);ua.prototype.visitList=pa(xU);ua.prototype.visitStruct=pa(wU);ua.prototype.visitUnion=pa(TU);ua.prototype.visitDenseUnion=pa(LL);ua.prototype.visitSparseUnion=pa(PL);ua.prototype.visitDictionary=pa(kU);ua.prototype.visitInterval=pa(SU);ua.prototype.visitIntervalDayTime=pa(DL);ua.prototype.visitIntervalYearMonth=pa(RL);ua.prototype.visitDuration=pa(AU);ua.prototype.visitDurationSecond=pa(OL);ua.prototype.visitDurationMillisecond=pa(zL);ua.prototype.visitDurationMicrosecond=pa(FL);ua.prototype.visitDurationNanosecond=pa(BL);ua.prototype.visitFixedSizeList=pa(CU);ua.prototype.visitMap=pa(_U);const ad=new ua,j0=Symbol.for("keys"),hy=Symbol.for("vals"),U0=Symbol.for("kKeysAsStrings"),dT=Symbol.for("_kKeysAsStrings");class j4{constructor(e){return this[j0]=new qc([e.children[0]]).memoize(),this[hy]=e.children[1],new Proxy(this,new EU)}get[U0](){return this[dT]||(this[dT]=Array.from(this[j0].toArray(),String))}[Symbol.iterator](){return new MU(this[j0],this[hy])}get size(){return this[j0].length}toArray(){return Object.values(this.toJSON())}toJSON(){const e=this[j0],r=this[hy],u={};for(let R=-1,p=e.length;++R<p;)u[e.get(R)]=ad.visit(r,R);return u}toString(){return`{${[...this].map(([e,r])=>`${Cb(e)}: ${Cb(r)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}class MU{constructor(e,r){this.keys=e,this.vals=r,this.keyIndex=0,this.numKeys=e.length}[Symbol.iterator](){return this}next(){const e=this.keyIndex;return e===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(e),ad.visit(this.vals,e)]})}}class EU{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[U0]}has(e,r){return e[U0].includes(r)}getOwnPropertyDescriptor(e,r){if(e[U0].indexOf(r)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,r){if(Reflect.has(e,r))return e[r];const u=e[U0].indexOf(r);if(u!==-1){const R=ad.visit(Reflect.get(e,hy),u);return Reflect.set(e,r,R),R}}set(e,r,u){const R=e[U0].indexOf(r);return R!==-1?(pp.visit(Reflect.get(e,hy),R,u),Reflect.set(e,r,u)):Reflect.has(e,r)?Reflect.set(e,r,u):!1}}Object.defineProperties(j4.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[j0]:{writable:!0,enumerable:!1,configurable:!1,value:null},[hy]:{writable:!0,enumerable:!1,configurable:!1,value:null},[dT]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let e6;function IU(t,e,r,u){const{length:R=0}=t;let p=typeof e!="number"?0:e,f=typeof r!="number"?R:r;return p<0&&(p=(p%R+R)%R),f<0&&(f=(f%R+R)%R),f<p&&(e6=p,p=f,f=e6),f>R&&(f=R),u?u(t,p,f):[p,f]}const LU=(t,e)=>t<0?e+t:t,t6=t=>t!==t;function Oy(t){if(typeof t!=="object"||t===null)return t6(t)?t6:r=>r===t;if(t instanceof Date){const r=t.valueOf();return u=>u instanceof Date?u.valueOf()===r:!1}return ArrayBuffer.isView(t)?r=>r?Pj(t,r):!1:t instanceof Map?DU(t):Array.isArray(t)?PU(t):t instanceof qc?RU(t):OU(t,!0)}function PU(t){const e=[];for(let r=-1,u=t.length;++r<u;)e[r]=Oy(t[r]);return Mw(e)}function DU(t){let e=-1;const r=[];for(const u of t.values())r[++e]=Oy(u);return Mw(r)}function RU(t){const e=[];for(let r=-1,u=t.length;++r<u;)e[r]=Oy(t.get(r));return Mw(e)}function OU(t,e=!1){const r=Object.keys(t);if(!e&&r.length===0)return()=>!1;const u=[];for(let R=-1,p=r.length;++R<p;)u[R]=Oy(t[r[R]]);return Mw(u,r)}function Mw(t,e){return r=>{if(!r||typeof r!="object")return!1;switch(r.constructor){case Array:return zU(t,r);case Map:return n6(t,r,r.keys());case j4:case V4:case Object:case void 0:return n6(t,r,e||Object.keys(r))}return r instanceof qc?FU(t,r):!1}}function zU(t,e){const r=t.length;if(e.length!==r)return!1;for(let u=-1;++u<r;)if(!t[u](e[u]))return!1;return!0}function FU(t,e){const r=t.length;if(e.length!==r)return!1;for(let u=-1;++u<r;)if(!t[u](e.get(u)))return!1;return!0}function n6(t,e,r){const u=r[Symbol.iterator](),R=e instanceof Map?e.keys():Object.keys(e)[Symbol.iterator](),p=e instanceof Map?e.values():Object.values(e)[Symbol.iterator]();let f=0;const n=t.length;let l=p.next(),c=u.next(),i=R.next();for(;f<n&&!c.done&&!i.done&&!l.done&&!(c.value!==i.value||!t[f](l.value));++f,c=u.next(),i=R.next(),l=p.next());return f===n&&c.done&&i.done&&l.done?!0:(u.return&&u.return(),R.return&&R.return(),p.return&&p.return(),!1)}function NL(t,e,r,u){return(r&1<<u)!==0}function BU(t,e,r,u){return(r&1<<u)>>u}function r6(t,e,r){const u=r.byteLength+7&-8;if(t>0||r.byteLength<u){const R=new Uint8Array(u);return R.set(t%8===0?r.subarray(t>>3):NU(new U4(r,t,e,null,NL)).subarray(0,u)),R}return r}function NU(t){const e=[];let r=0,u=0,R=0;for(const f of t)f&&(R|=1<<u),++u===8&&(e[r++]=R,R=u=0);(r===0||u>0)&&(e[r++]=R);const p=new Uint8Array(e.length+7&-8);return p.set(e),p}class U4{constructor(e,r,u,R,p){this.bytes=e,this.length=u,this.context=R,this.get=p,this.bit=r%8,this.byteIndex=r>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index<this.length?(this.bit===8&&(this.bit=0,this.byte=this.bytes[this.byteIndex++]),{value:this.get(this.context,this.index++,this.byte,this.bit++)}):{done:!0,value:null}}[Symbol.iterator](){return this}}function pT(t,e,r){if(r-e<=0)return 0;if(r-e<8){let p=0;for(const f of new U4(t,e,r-e,t,BU))p+=f;return p}const u=r>>3<<3,R=e+(e%8===0?0:8-e%8);return pT(t,e,R)+pT(t,u,r)+VU(t,R>>3,u-R>>3)}function VU(t,e,r){let u=0,R=Math.trunc(e);const p=new DataView(t.buffer,t.byteOffset,t.byteLength),f=r===void 0?t.byteLength:R+r;for(;f-R>=4;)u+=m5(p.getUint32(R)),R+=4;for(;f-R>=2;)u+=m5(p.getUint16(R)),R+=2;for(;f-R>=1;)u+=m5(p.getUint8(R)),R+=1;return u}function m5(t){let e=Math.trunc(t);return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24}const jU=-1;class Ib{get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get nullable(){if(this._nullCount!==0){const{type:e}=this;return so.isSparseUnion(e)?this.children.some(r=>r.nullable):so.isDenseUnion(e)?this.children.some(r=>r.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let e=0;const{valueOffsets:r,values:u,nullBitmap:R,typeIds:p}=this;return r&&(e+=r.byteLength),u&&(e+=u.byteLength),R&&(e+=R.byteLength),p&&(e+=p.byteLength),this.children.reduce((f,n)=>f+n.byteLength,e)}get nullCount(){if(so.isUnion(this.type))return this.children.reduce((u,R)=>u+R.nullCount,0);let e=this._nullCount,r;return e<=jU&&(r=this.nullBitmap)&&(this._nullCount=e=r.length===0?0:this.length-pT(r,this.offset,this.offset+this.length)),e}constructor(e,r,u,R,p,f=[],n){this.type=e,this.children=f,this.dictionary=n,this.offset=Math.floor(Math.max(r||0,0)),this.length=Math.floor(Math.max(u||0,0)),this._nullCount=Math.floor(Math.max(R||0,-1));let l;p instanceof Ib?(this.stride=p.stride,this.values=p.values,this.typeIds=p.typeIds,this.nullBitmap=p.nullBitmap,this.valueOffsets=p.valueOffsets):(this.stride=G7(e),p&&((l=p[0])&&(this.valueOffsets=l),(l=p[1])&&(this.values=l),(l=p[2])&&(this.nullBitmap=l),(l=p[3])&&(this.typeIds=l)))}getValid(e){const{type:r}=this;if(so.isUnion(r)){const u=r,R=this.children[u.typeIdToChildIndex[this.typeIds[e]]],p=u.mode===dp.Dense?this.valueOffsets[e]:e;return R.getValid(p)}if(this.nullable&&this.nullCount>0){const u=this.offset+e;return(this.nullBitmap[u>>3]&1<<u%8)!==0}return!0}setValid(e,r){let u;const{type:R}=this;if(so.isUnion(R)){const p=R,f=this.children[p.typeIdToChildIndex[this.typeIds[e]]],n=p.mode===dp.Dense?this.valueOffsets[e]:e;u=f.getValid(n),f.setValid(n,r)}else{let{nullBitmap:p}=this;const{offset:f,length:n}=this,l=f+e,c=1<<l%8,i=l>>3;(!p||p.byteLength<=i)&&(p=new Uint8Array((f+n+63&-64)>>3).fill(255),this.nullCount>0?(p.set(r6(f,n,this.nullBitmap),0),Object.assign(this,{nullBitmap:p})):Object.assign(this,{nullBitmap:p,_nullCount:0}));const _=p[i];u=(_&c)!==0,p[i]=r?_|c:_&~c}return u!==!!r&&(this._nullCount=this.nullCount+(r?-1:1)),r}clone(e=this.type,r=this.offset,u=this.length,R=this._nullCount,p=this,f=this.children){return new Ib(e,r,u,R,p,f,this.dictionary)}slice(e,r){const{stride:u,typeId:R,children:p}=this,f=+(this._nullCount===0)-1,n=R===16?u:1,l=this._sliceBuffers(e,r,u,R);return this.clone(this.type,this.offset+e,r,f,l,p.length===0||this.valueOffsets?p:this._sliceChildren(p,n*e,n*r))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===_r.Null)return this.clone(this.type,0,e,0);const{length:r,nullCount:u}=this,R=new Uint8Array((e+63&-64)>>3).fill(255,0,r>>3);R[r>>3]=(1<<r-(r&-8))-1,u>0&&R.set(r6(this.offset,r,this.nullBitmap),0);const p=this.buffers;return p[jp.VALIDITY]=R,this.clone(this.type,0,e,u+(e-r),p)}_sliceBuffers(e,r,u,R){let p;const{buffers:f}=this;return(p=f[jp.TYPE])&&(f[jp.TYPE]=p.subarray(e,e+r)),(p=f[jp.OFFSET])&&(f[jp.OFFSET]=p.subarray(e,e+r+1))||(p=f[jp.DATA])&&(f[jp.DATA]=R===6?p:p.subarray(u*e,u*(e+r))),f}_sliceChildren(e,r,u){return e.map(R=>R.slice(r,u))}}Ib.prototype.children=Object.freeze([]);class i6{constructor(e=0,r){this.numChunks=e,this.getChunkIterator=r,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndex<this.numChunks;){const e=this.chunkIterator.next();if(!e.done)return e;++this.chunkIndex<this.numChunks&&(this.chunkIterator=this.getChunkIterator(this.chunkIndex))}return{done:!0,value:null}}[Symbol.iterator](){return this}}function UU(t){return t.some(e=>e.nullable)}function HU(t){return t.reduce((e,r)=>e+r.nullCount,0)}function qU(t){return t.reduce((e,r,u)=>(e[u+1]=e[u]+r.length,e),new Uint32Array(t.length+1))}function WU(t,e,r,u){const R=[];for(let p=-1,f=t.length;++p<f;){const n=t[p],l=e[p],{length:c}=n;if(l>=u)break;if(r>=l+c)continue;if(l>=r&&l+c<=u){R.push(n);continue}const i=Math.max(0,r-l),_=Math.min(u-l,c);R.push(n.slice(i,_-i))}return R.length===0&&R.push(t[0].slice(0,0)),R}function H4(t,e,r,u){let R=0,p=0,f=e.length-1;do{if(R>=f-1)return r<e[f]?u(t,R,r-e[R]):null;p=R+Math.trunc((f-R)*.5),r<e[p]?f=p:R=p}while(R<f)}function VL(t,e){return t.getValid(e)}function a6(t){function e(r,u,R){return t(r[u],R)}return function(r){const u=this.data;return H4(u,this._offsets,r,e)}}function GU(t){let e;function r(u,R,p){return t(u[R],p,e)}return function(u,R){const p=this.data;e=R;const f=H4(p,this._offsets,u,r);return e=void 0,f}}function $U(t){let e;function r(u,R,p){let f=p,n=0,l=0;for(let c=R-1,i=u.length;++c<i;){const _=u[c];if(~(n=t(_,e,f)))return l+n;f=0,l+=_.length}return-1}return function(u,R){e=u;const p=this.data,f=typeof R!="number"?r(p,0,0):H4(p,this._offsets,R,r);return e=void 0,f}}class ca extends zo{}function YU(t,e){return e===null&&t.length>0?0:-1}function ZU(t,e){const{nullBitmap:r}=t;if(!r||t.nullCount<=0)return-1;let u=0;for(const R of new U4(r,t.offset+(e||0),t.length,r,NL)){if(!R)return u;++u}return-1}function wa(t,e,r){if(e===void 0)return-1;if(e===null)switch(t.typeId){case _r.Union:break;case _r.Dictionary:break;default:return ZU(t,r)}const u=ad.getVisitFn(t),R=Oy(e);for(let p=(r||0)-1,f=t.length;++p<f;)if(R(u(t,p)))return p;return-1}function jL(t,e,r){const u=ad.getVisitFn(t),R=Oy(e);for(let p=(r||0)-1,f=t.length;++p<f;)if(R(u(t,p)))return p;return-1}ca.prototype.visitNull=YU;ca.prototype.visitBool=wa;ca.prototype.visitInt=wa;ca.prototype.visitInt8=wa;ca.prototype.visitInt16=wa;ca.prototype.visitInt32=wa;ca.prototype.visitInt64=wa;ca.prototype.visitUint8=wa;ca.prototype.visitUint16=wa;ca.prototype.visitUint32=wa;ca.prototype.visitUint64=wa;ca.prototype.visitFloat=wa;ca.prototype.visitFloat16=wa;ca.prototype.visitFloat32=wa;ca.prototype.visitFloat64=wa;ca.prototype.visitUtf8=wa;ca.prototype.visitLargeUtf8=wa;ca.prototype.visitBinary=wa;ca.prototype.visitLargeBinary=wa;ca.prototype.visitFixedSizeBinary=wa;ca.prototype.visitDate=wa;ca.prototype.visitDateDay=wa;ca.prototype.visitDateMillisecond=wa;ca.prototype.visitTimestamp=wa;ca.prototype.visitTimestampSecond=wa;ca.prototype.visitTimestampMillisecond=wa;ca.prototype.visitTimestampMicrosecond=wa;ca.prototype.visitTimestampNanosecond=wa;ca.prototype.visitTime=wa;ca.prototype.visitTimeSecond=wa;ca.prototype.visitTimeMillisecond=wa;ca.prototype.visitTimeMicrosecond=wa;ca.prototype.visitTimeNanosecond=wa;ca.prototype.visitDecimal=wa;ca.prototype.visitList=wa;ca.prototype.visitStruct=wa;ca.prototype.visitUnion=wa;ca.prototype.visitDenseUnion=jL;ca.prototype.visitSparseUnion=jL;ca.prototype.visitDictionary=wa;ca.prototype.visitInterval=wa;ca.prototype.visitIntervalDayTime=wa;ca.prototype.visitIntervalYearMonth=wa;ca.prototype.visitDuration=wa;ca.prototype.visitDurationSecond=wa;ca.prototype.visitDurationMillisecond=wa;ca.prototype.visitDurationMicrosecond=wa;ca.prototype.visitDurationNanosecond=wa;ca.prototype.visitFixedSizeList=wa;ca.prototype.visitMap=wa;const o6=new ca;class ha extends zo{}function ma(t){const{type:e}=t;if(t.nullCount===0&&t.stride===1&&(so.isInt(e)&&e.bitWidth!==64||so.isTime(e)&&e.bitWidth!==64||so.isFloat(e)&&e.precision!==Of.HALF))return new i6(t.data.length,u=>{const R=t.data[u];return R.values.subarray(0,R.length)[Symbol.iterator]()});let r=0;return new i6(t.data.length,u=>{const p=t.data[u].length,f=t.slice(r,r+p);return r+=p,new XU(f)})}class XU{constructor(e){this.vector=e,this.index=0}next(){return this.index<this.vector.length?{value:this.vector.get(this.index++)}:{done:!0,value:null}}[Symbol.iterator](){return this}}ha.prototype.visitNull=ma;ha.prototype.visitBool=ma;ha.prototype.visitInt=ma;ha.prototype.visitInt8=ma;ha.prototype.visitInt16=ma;ha.prototype.visitInt32=ma;ha.prototype.visitInt64=ma;ha.prototype.visitUint8=ma;ha.prototype.visitUint16=ma;ha.prototype.visitUint32=ma;ha.prototype.visitUint64=ma;ha.prototype.visitFloat=ma;ha.prototype.visitFloat16=ma;ha.prototype.visitFloat32=ma;ha.prototype.visitFloat64=ma;ha.prototype.visitUtf8=ma;ha.prototype.visitLargeUtf8=ma;ha.prototype.visitBinary=ma;ha.prototype.visitLargeBinary=ma;ha.prototype.visitFixedSizeBinary=ma;ha.prototype.visitDate=ma;ha.prototype.visitDateDay=ma;ha.prototype.visitDateMillisecond=ma;ha.prototype.visitTimestamp=ma;ha.prototype.visitTimestampSecond=ma;ha.prototype.visitTimestampMillisecond=ma;ha.prototype.visitTimestampMicrosecond=ma;ha.prototype.visitTimestampNanosecond=ma;ha.prototype.visitTime=ma;ha.prototype.visitTimeSecond=ma;ha.prototype.visitTimeMillisecond=ma;ha.prototype.visitTimeMicrosecond=ma;ha.prototype.visitTimeNanosecond=ma;ha.prototype.visitDecimal=ma;ha.prototype.visitList=ma;ha.prototype.visitStruct=ma;ha.prototype.visitUnion=ma;ha.prototype.visitDenseUnion=ma;ha.prototype.visitSparseUnion=ma;ha.prototype.visitDictionary=ma;ha.prototype.visitInterval=ma;ha.prototype.visitIntervalDayTime=ma;ha.prototype.visitIntervalYearMonth=ma;ha.prototype.visitDuration=ma;ha.prototype.visitDurationSecond=ma;ha.prototype.visitDurationMillisecond=ma;ha.prototype.visitDurationMicrosecond=ma;ha.prototype.visitDurationNanosecond=ma;ha.prototype.visitFixedSizeList=ma;ha.prototype.visitMap=ma;const KU=new ha;var UL;const HL={},qL={};class qc{constructor(e){var r,u,R;const p=e[0]instanceof qc?e.flatMap(n=>n.data):e;if(p.length===0||p.some(n=>!(n instanceof Ib)))throw new TypeError("Vector constructor expects an Array of Data instances.");const f=(r=p[0])===null||r===void 0?void 0:r.type;switch(p.length){case 0:this._offsets=[0];break;case 1:{const{get:n,set:l,indexOf:c}=HL[f.typeId],i=p[0];this.isValid=_=>VL(i,_),this.get=_=>n(i,_),this.set=(_,b)=>l(i,_,b),this.indexOf=_=>c(i,_),this._offsets=[0,i.length];break}default:Object.setPrototypeOf(this,qL[f.typeId]),this._offsets=qU(p);break}this.data=p,this.type=f,this.stride=G7(f),this.numChildren=(R=(u=f.children)===null||u===void 0?void 0:u.length)!==null&&R!==void 0?R:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((e,r)=>e+r.byteLength,0)}get nullable(){return UU(this.data)}get nullCount(){return HU(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${_r[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}at(e){return this.get(LU(e,this.length))}set(e,r){}indexOf(e,r){return-1}includes(e,r){return this.indexOf(e,r)>-1}[Symbol.iterator](){return KU.visit(this)}concat(...e){return new qc(this.data.concat(e.flatMap(r=>r.data).flat(Number.POSITIVE_INFINITY)))}slice(e,r){return new qc(IU(this,e,r,({data:u,_offsets:R},p,f)=>WU(u,R,p,f)))}toJSON(){return[...this]}toArray(){const{type:e,data:r,length:u,stride:R,ArrayType:p}=this;switch(e.typeId){case _r.Int:case _r.Float:case _r.Decimal:case _r.Time:case _r.Timestamp:switch(r.length){case 0:return new p;case 1:return r[0].values.subarray(0,u*R);default:return r.reduce((f,{values:n,length:l})=>(f.array.set(n.subarray(0,l*R),f.offset),f.offset+=l*R,f),{array:new p(u*R),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(",")}]`}getChild(e){var r;return this.getChildAt((r=this.type.children)===null||r===void 0?void 0:r.findIndex(u=>u.name===e))}getChildAt(e){return e>-1&&e<this.numChildren?new qc(this.data.map(({children:r})=>r[e])):null}get isMemoized(){return so.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(so.isDictionary(this.type)){const e=new N2(this.data[0].dictionary),r=this.data.map(u=>{const R=u.clone();return R.dictionary=e,R});return new qc(r)}return new N2(this)}unmemoize(){if(so.isDictionary(this.type)&&this.isMemoized){const e=this.data[0].dictionary.unmemoize(),r=this.data.map(u=>{const R=u.clone();return R.dictionary=e,R});return new qc(r)}return this}}UL=Symbol.toStringTag;qc[UL]=(t=>{t.type=so.prototype,t.data=[],t.length=0,t.stride=1,t.numChildren=0,t._offsets=new Uint32Array([0]),t[Symbol.isConcatSpreadable]=!0;const e=Object.keys(_r).map(r=>_r[r]).filter(r=>typeof r=="number"&&r!==_r.NONE);for(const r of e){const u=ad.getVisitFnByTypeId(r),R=pp.getVisitFnByTypeId(r),p=o6.getVisitFnByTypeId(r);HL[r]={get:u,set:R,indexOf:p},qL[r]=Object.create(t,{isValid:{value:a6(VL)},get:{value:a6(ad.getVisitFnByTypeId(r))},set:{value:GU(pp.getVisitFnByTypeId(r))},indexOf:{value:$U(o6.getVisitFnByTypeId(r))}})}return"Vector"})(qc.prototype);class N2 extends qc{constructor(e){super(e.data);const r=this.get,u=this.set,R=this.slice,p=new Array(this.length);Object.defineProperty(this,"get",{value(f){const n=p[f];if(n!==void 0)return n;const l=r.call(this,f);return p[f]=l,l}}),Object.defineProperty(this,"set",{value(f,n){u.call(this,f,n),p[f]=n}}),Object.defineProperty(this,"slice",{value:(f,n)=>new N2(R.call(this,f,n))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new qc(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}}function JU(t){return t.endsWith("_page")}const zy=h8("selection",{state:()=>({id:void 0,selection_counter:void 0,pagination_counter:void 0,counter:void 0}),actions:{updateSelection(t,e){const r=JU(t);console.log("[SelectionStore] ===== updateSelection =====",{timestamp:Date.now(),identifier:t,value:e,isPagination:r,currentSelectionCounter:this.$state.selection_counter,currentPaginationCounter:this.$state.pagination_counter}),this.$patch(u=>{u[t]=e,r?u.pagination_counter=(u.pagination_counter||0)+1:u.selection_counter=(u.selection_counter||0)+1,u.counter=(u.counter||0)+1}),console.log("[SelectionStore] updateSelection DONE",{selectionCounter:this.$state.selection_counter,paginationCounter:this.$state.pagination_counter})}}}),Cg=h8("streamlit-data",{state:()=>({renderData:null,dataForDrawing:{},hash:"",annotations:null,requestData:!1}),getters:{args:t=>{var e;return(e=t.renderData)==null?void 0:e.args},components(){var t;return(t=this.args)==null?void 0:t.components},allDataForDrawing:t=>t.dataForDrawing,theme:t=>{var e;return(e=t.renderData)==null?void 0:e.theme}},actions:{updateRenderData(t){var p,f,n,l;const e=zy(),r=t.args.selection_store,u=t.args.hash,R=t.args.dataChanged;if(delete t.args.selection_store,delete t.args.hash,delete t.args.dataChanged,console.log("[StreamlitDataStore] ===== updateRenderData START =====",{timestamp:Date.now(),dataChanged:R,oldHash:(p=this.hash)==null?void 0:p.substring(0,8),newHash:u==null?void 0:u.substring(0,8),hasPagination:!!t.args._pagination,paginationPage:(f=t.args._pagination)==null?void 0:f.page,hasTableData:!!t.args.tableData,pythonStateCounter:r==null?void 0:r.counter,pythonSelectionCounter:r==null?void 0:r.selection_counter,pythonPaginationCounter:r==null?void 0:r.pagination_counter,pythonStateKeys:r?Object.keys(r):[]}),r){const c=r.selection_counter??r.counter??0,i=r.pagination_counter??r.counter??0,_=e.$state.selection_counter??e.$state.counter??0,b=e.$state.pagination_counter??e.$state.counter??0;e.$patch(w=>{if(r.id!==w.id){for(const v in w)w[v]=void 0;Object.assign(w,r)}else for(const v in r){const o=v.endsWith("_page"),a=o?i:c,h=o?b:_,s=!(v in w)||w[v]===void 0||a>=h;console.log(`[StreamlitDataStore] State key "${v}":`,{isPagination:o,pythonCounter:a,vueCounter:h,dataChanged:R,keyInState:v in w,currentValue:w[v],pythonValue:r[v],shouldAccept:s}),s&&(w[v]=r[v])}})}if(R&&u){this.renderData=t;const c=t.args;Object.entries(c).forEach(([i,_])=>{var b;if(_ instanceof fT)if(i==="plotData"){const w=this.parseArrowTableToColumns(_);console.log(`[StreamlitDataStore] Parsed ${i} to columns:`,{columns:Object.keys(w),rowCount:((b=Object.values(w)[0])==null?void 0:b.length)??0}),this.dataForDrawing[i]=w}else{const w=this.parseArrowTable(_);console.log(`[StreamlitDataStore] Parsed ${i}:`,{rowCount:w.length}),this.dataForDrawing[i]=w}else this.dataForDrawing[i]=_}),c._pagination!==void 0&&(console.log("[StreamlitDataStore] Updating _pagination:",{oldPage:(n=this.dataForDrawing._pagination)==null?void 0:n.page,newPage:(l=c._pagination)==null?void 0:l.page,newPagination:c._pagination}),this.dataForDrawing._pagination=c._pagination),c._navigate_to_page!==void 0&&(console.log("[StreamlitDataStore] Updating _navigate_to_page:",c._navigate_to_page),this.dataForDrawing._navigate_to_page=c._navigate_to_page),c._target_row_index!==void 0&&(console.log("[StreamlitDataStore] Updating _target_row_index:",c._target_row_index),this.dataForDrawing._target_row_index=c._target_row_index),this.hash=u}else if(!R){const c=Object.keys(this.dataForDrawing).length>0;if(console.log("[StreamlitDataStore] Using cached data branch:",{timestamp:Date.now(),hasCache:c,incomingPagination:t.args._pagination,cachedPagination:this.dataForDrawing._pagination}),c)console.log("[StreamlitDataStore] Data unchanged, using cached data"),t.args.components&&(this.renderData?this.renderData.args.components=t.args.components:this.renderData=t),t.args._plotConfig!==void 0&&(this.dataForDrawing._plotConfig=t.args._plotConfig);else{console.warn("[StreamlitDataStore] Cache miss - requesting data from Python"),this.requestData=!0;return}}},parseArrowTable(t){const e=t.table.numRows,r=t.table.schema.fields.map(p=>p.name),u=new Map;r.forEach((p,f)=>{const n=t.table.getChildAt(f);if(n){const l=n.toArray(),c=new Array(l.length);for(let i=0;i<l.length;i++)c[i]=this.parseArrowValue(l[i]);u.set(p,c)}});const R=new Array(e);for(let p=0;p<e;p++){const f={};r.forEach(n=>{const l=u.get(n);l&&(f[n]=l[p])}),R[p]=f}return R},parseArrowTableToColumns(t){const e={};return t.table.schema.fields.map(u=>u.name).forEach((u,R)=>{const p=t.table.getChildAt(R);if(p){const f=p.toArray(),n=new Array(f.length);for(let l=0;l<f.length;l++)n[l]=this.parseArrowValue(f[l]);e[u]=n}else e[u]=[]}),e},parseArrowValue(t){if(typeof t=="bigint")return Number(t);if(t instanceof qc){const e=[];for(let r=0;r<t.length;r++)e.push(this.parseArrowValue(t.get(r)));return e}return t},setAnnotations(t){this.annotations=t},clearRequestData(){this.requestData=!1}}});class ch{constructor(e){this.table=e}reloadData(e,r,u){return this.table.dataLoader.load(e,void 0,void 0,void 0,r,u)}langText(){return this.table.modules.localize.getText(...arguments)}langBind(){return this.table.modules.localize.bind(...arguments)}langLocale(){return this.table.modules.localize.getLocale(...arguments)}commsConnections(){return this.table.modules.comms.getConnections(...arguments)}commsSend(){return this.table.modules.comms.send(...arguments)}layoutMode(){return this.table.modules.layout.getMode()}layoutRefresh(e){return this.table.modules.layout.layout(e)}subscribe(){return this.table.eventBus.subscribe(...arguments)}unsubscribe(){return this.table.eventBus.unsubscribe(...arguments)}subscribed(e){return this.table.eventBus.subscribed(e)}subscriptionChange(){return this.table.eventBus.subscriptionChange(...arguments)}dispatch(){return this.table.eventBus.dispatch(...arguments)}chain(){return this.table.eventBus.chain(...arguments)}confirm(){return this.table.eventBus.confirm(...arguments)}dispatchExternal(){return this.table.externalEvents.dispatch(...arguments)}subscribedExternal(e){return this.table.externalEvents.subscribed(e)}subscriptionChangeExternal(){return this.table.externalEvents.subscriptionChange(...arguments)}options(e){return this.table.options[e]}setOption(e,r){return typeof r<"u"&&(this.table.options[e]=r),this.table.options[e]}deprecationCheck(e,r,u){return this.table.deprecationAdvisor.check(e,r,u)}deprecationCheckMsg(e,r){return this.table.deprecationAdvisor.checkMsg(e,r)}deprecationMsg(e){return this.table.deprecationAdvisor.msg(e)}module(e){return this.table.module(e)}}class Ks{static elVisible(e){return!(e.offsetWidth<=0&&e.offsetHeight<=0)}static elOffset(e){var r=e.getBoundingClientRect();return{top:r.top+window.pageYOffset-document.documentElement.clientTop,left:r.left+window.pageXOffset-document.documentElement.clientLeft}}static retrieveNestedData(e,r,u){var R=e?r.split(e):[r],p=R.length,f;for(let n=0;n<p&&(u=u[R[n]],f=u,!!u);n++);return f}static deepClone(e,r,u=[]){var R={}.__proto__,p=[].__proto__;r||(r=Object.assign(Array.isArray(e)?[]:{},e));for(var f in e){let n=e[f],l,c;n!=null&&typeof n=="object"&&(n.__proto__===R||n.__proto__===p)&&(l=u.findIndex(i=>i.subject===n),l>-1?r[f]=u[l].copy:(c=Object.assign(Array.isArray(n)?[]:{},n),u.unshift({subject:n,copy:c}),r[f]=this.deepClone(n,c,u)))}return r}}let QU=class WL extends ch{constructor(e,r,u){super(e),this.element=r,this.container=this._lookupContainer(),this.parent=u,this.reversedX=!1,this.childPopup=null,this.blurable=!1,this.blurCallback=null,this.blurEventsBound=!1,this.renderedCallback=null,this.visible=!1,this.hideable=!0,this.element.classList.add("tabulator-popup-container"),this.blurEvent=this.hide.bind(this,!1),this.escEvent=this._escapeCheck.bind(this),this.destroyBinding=this.tableDestroyed.bind(this),this.destroyed=!1}tableDestroyed(){this.destroyed=!0,this.hide(!0)}_lookupContainer(){var e=this.table.options.popupContainer;return typeof e=="string"?(e=document.querySelector(e),e||console.warn("Menu Error - no container element found matching selector:",this.table.options.popupContainer,"(defaulting to document body)")):e===!0&&(e=this.table.element),e&&!this._checkContainerIsParent(e)&&(e=!1,console.warn("Menu Error - container element does not contain this table:",this.table.options.popupContainer,"(defaulting to document body)")),e||(e=document.body),e}_checkContainerIsParent(e,r=this.table.element){return e===r?!0:r.parentNode?this._checkContainerIsParent(e,r.parentNode):!1}renderCallback(e){this.renderedCallback=e}containerEventCoords(e){var r=!(e instanceof MouseEvent),u=r?e.touches[0].pageX:e.pageX,R=r?e.touches[0].pageY:e.pageY;if(this.container!==document.body){let p=Ks.elOffset(this.container);u-=p.left,R-=p.top}return{x:u,y:R}}elementPositionCoords(e,r="right"){var u=Ks.elOffset(e),R,p,f;switch(this.container!==document.body&&(R=Ks.elOffset(this.container),u.left-=R.left,u.top-=R.top),r){case"right":p=u.left+e.offsetWidth,f=u.top-1;break;case"bottom":p=u.left,f=u.top+e.offsetHeight;break;case"left":p=u.left,f=u.top-1;break;case"top":p=u.left,f=u.top;break;case"center":p=u.left+e.offsetWidth/2,f=u.top+e.offsetHeight/2;break}return{x:p,y:f,offset:u}}show(e,r){var u,R,p,f,n;return this.destroyed||this.table.destroyed?this:(e instanceof HTMLElement?(p=e,n=this.elementPositionCoords(e,r),f=n.offset,u=n.x,R=n.y):typeof e=="number"?(f={top:0,left:0},u=e,R=r):(n=this.containerEventCoords(e),u=n.x,R=n.y,this.reversedX=!1),this.element.style.top=R+"px",this.element.style.left=u+"px",this.container.appendChild(this.element),typeof this.renderedCallback=="function"&&this.renderedCallback(),this._fitToScreen(u,R,p,f,r),this.visible=!0,this.subscribe("table-destroy",this.destroyBinding),this.element.addEventListener("mousedown",l=>{l.stopPropagation()}),this)}_fitToScreen(e,r,u,R,p){var f=this.container===document.body?document.documentElement.scrollTop:this.container.scrollTop;(e+this.element.offsetWidth>=this.container.offsetWidth||this.reversedX)&&(this.element.style.left="",u?this.element.style.right=this.container.offsetWidth-R.left+"px":this.element.style.right=this.container.offsetWidth-e+"px",this.reversedX=!0);let n=Math.max(this.container.offsetHeight,f?this.container.scrollHeight:0);if(r+this.element.offsetHeight>n)if(u)switch(p){case"bottom":this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight-u.offsetHeight-1+"px";break;default:this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight+u.offsetHeight+1+"px"}else this.element.style.height=n+"px"}isVisible(){return this.visible}hideOnBlur(e){return this.blurable=!0,this.visible&&(setTimeout(()=>{this.visible&&(this.table.rowManager.element.addEventListener("scroll",this.blurEvent),this.subscribe("cell-editing",this.blurEvent),document.body.addEventListener("click",this.blurEvent),document.body.addEventListener("contextmenu",this.blurEvent),document.body.addEventListener("mousedown",this.blurEvent),window.addEventListener("resize",this.blurEvent),document.body.addEventListener("keydown",this.escEvent),this.blurEventsBound=!0)},100),this.blurCallback=e),this}_escapeCheck(e){e.keyCode==27&&this.hide()}blockHide(){this.hideable=!1}restoreHide(){this.hideable=!0}hide(e=!1){return this.visible&&this.hideable&&(this.blurable&&this.blurEventsBound&&(document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),document.body.removeEventListener("mousedown",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent),this.unsubscribe("cell-editing",this.blurEvent),this.blurEventsBound=!1),this.childPopup&&this.childPopup.hide(),this.parent&&(this.parent.childPopup=null),this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.visible=!1,this.blurCallback&&!e&&this.blurCallback(),this.unsubscribe("table-destroy",this.destroyBinding)),this}child(e){return this.childPopup&&this.childPopup.hide(),this.childPopup=new WL(this.table,e,this),this.childPopup}};class uo extends ch{constructor(e,r){super(e),this._handler=null}initialize(){}registerTableOption(e,r){this.table.optionsList.register(e,r)}registerColumnOption(e,r){this.table.columnManager.optionsList.register(e,r)}registerTableFunction(e,r){typeof this.table[e]>"u"?this.table[e]=(...u)=>(this.table.initGuard(e),r(...u)):console.warn("Unable to bind table function, name already in use",e)}registerComponentFunction(e,r,u){return this.table.componentFunctionBinder.bind(e,r,u)}registerDataHandler(e,r){this.table.rowManager.registerDataPipelineHandler(e,r),this._handler=e}registerDisplayHandler(e,r){this.table.rowManager.registerDisplayPipelineHandler(e,r),this._handler=e}displayRows(e){var r=this.table.rowManager.displayRows.length-1,u;if(this._handler&&(u=this.table.rowManager.displayPipeline.findIndex(R=>R.handler===this._handler),u>-1&&(r=u)),e&&(r=r+e),this._handler)return r>-1?this.table.rowManager.getDisplayRows(r):this.activeRows()}activeRows(){return this.table.rowManager.activeRows}refreshData(e,r){r||(r=this._handler),r&&this.table.rowManager.refreshActiveData(r,!1,e)}footerAppend(e){return this.table.footerManager.append(e)}footerPrepend(e){return this.table.footerManager.prepend(e)}footerRemove(e){return this.table.footerManager.remove(e)}popup(e,r){return new QU(this.table,e,r)}alert(e,r){return this.table.alertManager.alert(e,r)}clearAlert(){return this.table.alertManager.clear()}}var eH={rownum:function(t,e,r,u,R,p){return p.getPosition()}};const Y0=class Y0 extends uo{constructor(e){super(e),this.allowedTypes=["","data","download","clipboard","print","htmlOutput"],this.registerColumnOption("accessor"),this.registerColumnOption("accessorParams"),this.registerColumnOption("accessorData"),this.registerColumnOption("accessorDataParams"),this.registerColumnOption("accessorDownload"),this.registerColumnOption("accessorDownloadParams"),this.registerColumnOption("accessorClipboard"),this.registerColumnOption("accessorClipboardParams"),this.registerColumnOption("accessorPrint"),this.registerColumnOption("accessorPrintParams"),this.registerColumnOption("accessorHtmlOutput"),this.registerColumnOption("accessorHtmlOutputParams")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-retrieve",this.transformRow.bind(this))}initializeColumn(e){var r=!1,u={};this.allowedTypes.forEach(R=>{var p="accessor"+(R.charAt(0).toUpperCase()+R.slice(1)),f;e.definition[p]&&(f=this.lookupAccessor(e.definition[p]),f&&(r=!0,u[p]={accessor:f,params:e.definition[p+"Params"]||{}}))}),r&&(e.modules.accessor=u)}lookupAccessor(e){var r=!1;switch(typeof e){case"string":Y0.accessors[e]?r=Y0.accessors[e]:console.warn("Accessor Error - No such accessor found, ignoring: ",e);break;case"function":r=e;break}return r}transformRow(e,r){var u="accessor"+(r.charAt(0).toUpperCase()+r.slice(1)),R=e.getComponent(),p=Ks.deepClone(e.data||{});return this.table.columnManager.traverse(function(f){var n,l,c,i;f.modules.accessor&&(l=f.modules.accessor[u]||f.modules.accessor.accessor||!1,l&&(n=f.getFieldValue(p),n!="undefined"&&(i=f.getComponent(),c=typeof l.params=="function"?l.params(n,p,r,i,R):l.params,f.setFieldValue(p,l.accessor(n,p,r,c,i,R)))))}),p}};Ci(Y0,"moduleName","accessor"),Ci(Y0,"accessors",eH);let mT=Y0;var tH={method:"GET"};function gT(t,e){var r=[];if(e=e||"",Array.isArray(t))t.forEach((R,p)=>{r=r.concat(gT(R,e?e+"["+p+"]":p))});else if(typeof t=="object")for(var u in t)r=r.concat(gT(t[u],e?e+"["+u+"]":u));else r.push({key:e,value:t});return r}function nH(t){var e=gT(t),r=[];return e.forEach(function(u){r.push(encodeURIComponent(u.key)+"="+encodeURIComponent(u.value))}),r.join("&")}function GL(t,e,r){return t&&r&&Object.keys(r).length&&(!e.method||e.method.toLowerCase()=="get")&&(e.method="get",t+=(t.includes("?")?"&":"?")+nH(r)),t}function rH(t,e,r){var u;return new Promise((R,p)=>{if(t=this.urlGenerator.call(this.table,t,e,r),e.method.toUpperCase()!="GET")if(u=typeof this.table.options.ajaxContentType=="object"?this.table.options.ajaxContentType:this.contentTypeFormatters[this.table.options.ajaxContentType],u){for(var f in u.headers)e.headers||(e.headers={}),typeof e.headers[f]>"u"&&(e.headers[f]=u.headers[f]);e.body=u.body.call(this,t,e,r)}else console.warn("Ajax Error - Invalid ajaxContentType value:",this.table.options.ajaxContentType);t?(typeof e.headers>"u"&&(e.headers={}),typeof e.headers.Accept>"u"&&(e.headers.Accept="application/json"),typeof e.headers["X-Requested-With"]>"u"&&(e.headers["X-Requested-With"]="XMLHttpRequest"),typeof e.mode>"u"&&(e.mode="cors"),e.mode=="cors"?(typeof e.headers.Origin>"u"&&(e.headers.Origin=window.location.origin),typeof e.credentials>"u"&&(e.credentials="same-origin")):typeof e.credentials>"u"&&(e.credentials="include"),fetch(t,e).then(n=>{n.ok?n.json().then(l=>{R(l)}).catch(l=>{p(l),console.warn("Ajax Load Error - Invalid JSON returned",l)}):(console.error("Ajax Load Error - Connection Error: "+n.status,n.statusText),p(n))}).catch(n=>{console.error("Ajax Load Error - Connection Error: ",n),p(n)})):(console.warn("Ajax Load Error - No URL Set"),R([]))})}function vT(t,e){var r=[];if(e=e||"",Array.isArray(t))t.forEach((R,p)=>{r=r.concat(vT(R,e?e+"["+p+"]":p))});else if(typeof t=="object")for(var u in t)r=r.concat(vT(t[u],e?e+"["+u+"]":u));else r.push({key:e,value:t});return r}var iH={json:{headers:{"Content-Type":"application/json"},body:function(t,e,r){return JSON.stringify(r)}},form:{headers:{},body:function(t,e,r){var u=vT(r),R=new FormData;return u.forEach(function(p){R.append(p.key,p.value)}),R}}};const vd=class vd extends uo{constructor(e){super(e),this.config={},this.url="",this.urlGenerator=!1,this.params=!1,this.loaderPromise=!1,this.registerTableOption("ajaxURL",!1),this.registerTableOption("ajaxURLGenerator",!1),this.registerTableOption("ajaxParams",{}),this.registerTableOption("ajaxConfig","get"),this.registerTableOption("ajaxContentType","form"),this.registerTableOption("ajaxRequestFunc",!1),this.registerTableOption("ajaxRequesting",function(){}),this.registerTableOption("ajaxResponse",!1),this.contentTypeFormatters=vd.contentTypeFormatters}initialize(){this.loaderPromise=this.table.options.ajaxRequestFunc||vd.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||vd.defaultURLGenerator,this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.setDefaultConfig(this.table.options.ajaxConfig),this.registerTableFunction("getAjaxUrl",this.getUrl.bind(this)),this.subscribe("data-loading",this.requestDataCheck.bind(this)),this.subscribe("data-params",this.requestParams.bind(this)),this.subscribe("data-load",this.requestData.bind(this))}requestParams(e,r,u,R){var p=this.table.options.ajaxParams;return p&&(typeof p=="function"&&(p=p.call(this.table)),R=Object.assign(Object.assign({},p),R)),R}requestDataCheck(e,r,u,R){return!!(!e&&this.url||typeof e=="string")}requestData(e,r,u,R,p){var f;return!p&&this.requestDataCheck(e)?(e&&this.setUrl(e),f=this.generateConfig(u),this.sendRequest(this.url,r,f)):p}setDefaultConfig(e={}){this.config=Object.assign({},vd.defaultConfig),typeof e=="string"?this.config.method=e:Object.assign(this.config,e)}generateConfig(e={}){var r=Object.assign({},this.config);return typeof e=="string"?r.method=e:Object.assign(r,e),r}setUrl(e){this.url=e}getUrl(){return this.url}sendRequest(e,r,u){return this.table.options.ajaxRequesting.call(this.table,e,r)!==!1?this.loaderPromise(e,u,r).then(R=>(this.table.options.ajaxResponse&&(R=this.table.options.ajaxResponse.call(this.table,e,r,R)),R)):Promise.reject()}};Ci(vd,"moduleName","ajax"),Ci(vd,"defaultConfig",tH),Ci(vd,"defaultURLGenerator",GL),Ci(vd,"defaultLoaderPromise",rH),Ci(vd,"contentTypeFormatters",iH);let yT=vd;var aH={replace:function(t){return this.table.setData(t)},update:function(t){return this.table.updateOrAddData(t)},insert:function(t){return this.table.addData(t)}},oH={table:function(t){var e=[],r=!0,u=this.table.columnManager.columns,R=[],p=[];return t=t.split(`
56
56
  `),t.forEach(function(f){e.push(f.split(" "))}),e.length&&!(e.length===1&&e[0].length<2)?(e[0].forEach(function(f){var n=u.find(function(l){return f&&l.definition.title&&f.trim()&&l.definition.title.trim()===f.trim()});n?R.push(n):r=!1}),r||(r=!0,R=[],e[0].forEach(function(f){var n=u.find(function(l){return f&&l.field&&f.trim()&&l.field.trim()===f.trim()});n?R.push(n):r=!1}),r||(R=this.table.columnManager.columnsByIndex)),r&&e.shift(),e.forEach(function(f){var n={};f.forEach(function(l,c){R[c]&&(n[R[c].field]=l)}),p.push(n)}),p):!1}},sH={copyToClipboard:["ctrl + 67","meta + 67"]},lH={copyToClipboard:function(t){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}},uH={keybindings:{bindings:sH,actions:lH}};const Xm=class Xm extends uo{constructor(e){super(e),this.mode=!0,this.pasteParser=function(){},this.pasteAction=function(){},this.customSelection=!1,this.rowRange=!1,this.blocked=!0,this.registerTableOption("clipboard",!1),this.registerTableOption("clipboardCopyStyled",!0),this.registerTableOption("clipboardCopyConfig",!1),this.registerTableOption("clipboardCopyFormatter",!1),this.registerTableOption("clipboardCopyRowRange","active"),this.registerTableOption("clipboardPasteParser","table"),this.registerTableOption("clipboardPasteAction","insert"),this.registerColumnOption("clipboard"),this.registerColumnOption("titleClipboard")}initialize(){this.mode=this.table.options.clipboard,this.rowRange=this.table.options.clipboardCopyRowRange,(this.mode===!0||this.mode==="copy")&&this.table.element.addEventListener("copy",e=>{var r,u,R;this.blocked||(e.preventDefault(),this.customSelection?(r=this.customSelection,this.table.options.clipboardCopyFormatter&&(r=this.table.options.clipboardCopyFormatter("plain",r))):(R=this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig,this.table.options.clipboardCopyStyled,this.rowRange,"clipboard"),u=this.table.modules.export.generateHTMLTable(R),r=u?this.generatePlainContent(R):"",this.table.options.clipboardCopyFormatter&&(r=this.table.options.clipboardCopyFormatter("plain",r),u=this.table.options.clipboardCopyFormatter("html",u))),window.clipboardData&&window.clipboardData.setData?window.clipboardData.setData("Text",r):e.clipboardData&&e.clipboardData.setData?(e.clipboardData.setData("text/plain",r),u&&e.clipboardData.setData("text/html",u)):e.originalEvent&&e.originalEvent.clipboardData.setData&&(e.originalEvent.clipboardData.setData("text/plain",r),u&&e.originalEvent.clipboardData.setData("text/html",u)),this.dispatchExternal("clipboardCopied",r,u),this.reset())}),(this.mode===!0||this.mode==="paste")&&this.table.element.addEventListener("paste",e=>{this.paste(e)}),this.setPasteParser(this.table.options.clipboardPasteParser),this.setPasteAction(this.table.options.clipboardPasteAction),this.registerTableFunction("copyToClipboard",this.copy.bind(this))}reset(){this.blocked=!0,this.customSelection=!1}generatePlainContent(e){var r=[];return e.forEach(u=>{var R=[];u.columns.forEach(p=>{var f="";if(p)if(u.type==="group"&&(p.value=p.component.getKey()),p.value===null)f="";else switch(typeof p.value){case"object":f=JSON.stringify(p.value);break;case"undefined":f="";break;default:f=p.value}R.push(f)}),r.push(R.join(" "))}),r.join(`
57
57
  `)}copy(e,r){var u,R;this.blocked=!1,this.customSelection=!1,(this.mode===!0||this.mode==="copy")&&(this.rowRange=e||this.table.options.clipboardCopyRowRange,typeof window.getSelection<"u"&&typeof document.createRange<"u"?(e=document.createRange(),e.selectNodeContents(this.table.element),u=window.getSelection(),u.toString()&&r&&(this.customSelection=u.toString()),u.removeAllRanges(),u.addRange(e)):typeof document.selection<"u"&&typeof document.body.createTextRange<"u"&&(R=document.body.createTextRange(),R.moveToElementText(this.table.element),R.select()),document.execCommand("copy"),u&&u.removeAllRanges())}setPasteAction(e){switch(typeof e){case"string":this.pasteAction=Xm.pasteActions[e],this.pasteAction||console.warn("Clipboard Error - No such paste action found:",e);break;case"function":this.pasteAction=e;break}}setPasteParser(e){switch(typeof e){case"string":this.pasteParser=Xm.pasteParsers[e],this.pasteParser||console.warn("Clipboard Error - No such paste parser found:",e);break;case"function":this.pasteParser=e;break}}paste(e){var r,u,R;this.checkPasteOrigin(e)&&(r=this.getPasteData(e),u=this.pasteParser.call(this,r),u?(e.preventDefault(),this.table.modExists("mutator")&&(u=this.mutateData(u)),R=this.pasteAction.call(this,u),this.dispatchExternal("clipboardPasted",r,u,R)):this.dispatchExternal("clipboardPasteError",r))}mutateData(e){var r=[];return Array.isArray(e)?e.forEach(u=>{r.push(this.table.modules.mutator.transformRow(u,"clipboard"))}):r=e,r}checkPasteOrigin(e){var r=!0,u=this.confirm("clipboard-paste",[e]);return(u||!["DIV","SPAN"].includes(e.target.tagName))&&(r=!1),r}getPasteData(e){var r;return window.clipboardData&&window.clipboardData.getData?r=window.clipboardData.getData("Text"):e.clipboardData&&e.clipboardData.getData?r=e.clipboardData.getData("text/plain"):e.originalEvent&&e.originalEvent.clipboardData.getData&&(r=e.originalEvent.clipboardData.getData("text/plain")),r}};Ci(Xm,"moduleName","clipboard"),Ci(Xm,"moduleExtensions",uH),Ci(Xm,"pasteActions",aH),Ci(Xm,"pasteParsers",oH);let bT=Xm;class cH{constructor(e){return this._row=e,new Proxy(this,{get:function(r,u,R){return typeof r[u]<"u"?r[u]:r._row.table.componentFunctionBinder.handle("row",r._row,u)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getTable(){return this._row.table}getCells(){var e=[];return this._row.getCells().forEach(function(r){e.push(r.getComponent())}),e}getCell(e){var r=this._row.getCell(e);return r?r.getComponent():!1}_getSelf(){return this._row}}class $L{constructor(e){return this._cell=e,new Proxy(this,{get:function(r,u,R){return typeof r[u]<"u"?r[u]:r._cell.table.componentFunctionBinder.handle("cell",r._cell,u)}})}getValue(){return this._cell.getValue()}getOldValue(){return this._cell.getOldValue()}getInitialValue(){return this._cell.initialValue}getElement(){return this._cell.getElement()}getRow(){return this._cell.row.getComponent()}getData(e){return this._cell.row.getData(e)}getType(){return"cell"}getField(){return this._cell.column.getField()}getColumn(){return this._cell.column.getComponent()}setValue(e,r){typeof r>"u"&&(r=!0),this._cell.setValue(e,r)}restoreOldValue(){this._cell.setValueActual(this._cell.getOldValue())}restoreInitialValue(){this._cell.setValueActual(this._cell.initialValue)}checkHeight(){this._cell.checkHeight()}getTable(){return this._cell.table}_getSelf(){return this._cell}}class sx extends ch{constructor(e,r){super(e.table),this.table=e.table,this.column=e,this.row=r,this.element=null,this.value=null,this.initialValue,this.oldValue=null,this.modules={},this.height=null,this.width=null,this.minWidth=null,this.component=null,this.loaded=!1,this.build()}build(){this.generateElement(),this.setWidth(),this._configureCell(),this.setValueActual(this.column.getFieldValue(this.row.data)),this.initialValue=this.value}generateElement(){this.element=document.createElement("div"),this.element.className="tabulator-cell",this.element.setAttribute("role","gridcell"),this.column.isRowHeader&&this.element.classList.add("tabulator-row-header")}_configureCell(){var e=this.element,r=this.column.getField(),u={top:"flex-start",bottom:"flex-end",middle:"center"},R={left:"flex-start",right:"flex-end",center:"center"};if(e.style.textAlign=this.column.hozAlign,this.column.vertAlign&&(e.style.display="inline-flex",e.style.alignItems=u[this.column.vertAlign]||"",this.column.hozAlign&&(e.style.justifyContent=R[this.column.hozAlign]||"")),r&&e.setAttribute("tabulator-field",r),this.column.definition.cssClass){var p=this.column.definition.cssClass.split(" ");p.forEach(f=>{e.classList.add(f)})}this.dispatch("cell-init",this),this.column.visible||this.hide()}_generateContents(){var e;switch(e=this.chain("cell-format",this,null,()=>this.element.innerHTML=this.value),typeof e){case"object":if(e instanceof Node){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.appendChild(e)}else this.element.innerHTML="",e!=null&&console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",e);break;case"undefined":this.element.innerHTML="";break;default:this.element.innerHTML=e}}cellRendered(){this.dispatch("cell-rendered",this)}getElement(e){return this.loaded||(this.loaded=!0,e||this.layoutElement()),this.element}getValue(){return this.value}getOldValue(){return this.oldValue}setValue(e,r,u){var R=this.setValueProcessData(e,r,u);R&&(this.dispatch("cell-value-updated",this),this.cellRendered(),this.column.definition.cellEdited&&this.column.definition.cellEdited.call(this.table,this.getComponent()),this.dispatchExternal("cellEdited",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()))}setValueProcessData(e,r,u){var R=!1;return(this.value!==e||u)&&(R=!0,r&&(e=this.chain("cell-value-changing",[this,e],null,e))),this.setValueActual(e),R&&this.dispatch("cell-value-changed",this),R}setValueActual(e){this.oldValue=this.value,this.value=e,this.dispatch("cell-value-save-before",this),this.column.setFieldValue(this.row.data,e),this.dispatch("cell-value-save-after",this),this.loaded&&this.layoutElement()}layoutElement(){this._generateContents(),this.dispatch("cell-layout",this)}setWidth(){this.width=this.column.width,this.element.style.width=this.column.widthStyled}clearWidth(){this.width="",this.element.style.width=""}getWidth(){return this.width||this.element.offsetWidth}setMinWidth(){this.minWidth=this.column.minWidth,this.element.style.minWidth=this.column.minWidthStyled}setMaxWidth(){this.maxWidth=this.column.maxWidth,this.element.style.maxWidth=this.column.maxWidthStyled}checkHeight(){this.row.reinitializeHeight()}clearHeight(){this.element.style.height="",this.height=null,this.dispatch("cell-height",this,"")}setHeight(){this.height=this.row.height,this.element.style.height=this.row.heightStyled,this.dispatch("cell-height",this,this.row.heightStyled)}getHeight(){return this.height||this.element.offsetHeight}show(){this.element.style.display=this.column.vertAlign?"inline-flex":""}hide(){this.element.style.display="none"}delete(){this.dispatch("cell-delete",this),!this.table.rowManager.redrawBlock&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=!1,this.column.deleteCell(this),this.row.deleteCell(this),this.calcs={}}getIndex(){return this.row.getCellIndex(this)}getComponent(){return this.component||(this.component=new $L(this)),this.component}}class YL{constructor(e){return this._column=e,this.type="ColumnComponent",new Proxy(this,{get:function(r,u,R){return typeof r[u]<"u"?r[u]:r._column.table.componentFunctionBinder.handle("column",r._column,u)}})}getElement(){return this._column.getElement()}getDefinition(){return this._column.getDefinition()}getField(){return this._column.getField()}getTitleDownload(){return this._column.getTitleDownload()}getCells(){var e=[];return this._column.cells.forEach(function(r){e.push(r.getComponent())}),e}isVisible(){return this._column.visible}show(){this._column.isGroup?this._column.columns.forEach(function(e){e.show()}):this._column.show()}hide(){this._column.isGroup?this._column.columns.forEach(function(e){e.hide()}):this._column.hide()}toggle(){this._column.visible?this.hide():this.show()}delete(){return this._column.delete()}getSubColumns(){var e=[];return this._column.columns.length&&this._column.columns.forEach(function(r){e.push(r.getComponent())}),e}getParentColumn(){return this._column.getParentComponent()}_getSelf(){return this._column}scrollTo(e,r){return this._column.table.columnManager.scrollToColumn(this._column,e,r)}getTable(){return this._column.table}move(e,r){var u=this._column.table.columnManager.findColumn(e);u?this._column.table.columnManager.moveColumn(this._column,u,r):console.warn("Move Error - No matching column found:",u)}getNextColumn(){var e=this._column.nextColumn();return e?e.getComponent():!1}getPrevColumn(){var e=this._column.prevColumn();return e?e.getComponent():!1}updateDefinition(e){return this._column.updateDefinition(e)}getWidth(){return this._column.getWidth()}setWidth(e){var r;return e===!0?r=this._column.reinitializeWidth(!0):r=this._column.setWidth(e),this._column.table.columnManager.rerenderColumns(!0),r}}var ZL={title:void 0,field:void 0,columns:void 0,visible:void 0,hozAlign:void 0,vertAlign:void 0,width:void 0,minWidth:40,maxWidth:void 0,maxInitialWidth:void 0,cssClass:void 0,variableHeight:void 0,headerVertical:void 0,headerHozAlign:void 0,headerWordWrap:!1,editableTitle:void 0};const hv=class hv extends ch{constructor(e,r,u){super(r.table),this.definition=e,this.parent=r,this.type="column",this.columns=[],this.cells=[],this.isGroup=!1,this.isRowHeader=u,this.element=this.createElement(),this.contentElement=!1,this.titleHolderElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleDownload=null,this.titleFormatterRendered=!1,this.mapDefinitions(),this.setField(this.definition.field),this.modules={},this.width=null,this.widthStyled="",this.maxWidth=null,this.maxWidthStyled="",this.maxInitialWidth=null,this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this.definition.columns?(this.isGroup=!0,this.definition.columns.forEach((R,p)=>{var f=new hv(R,this);this.attachColumn(f)}),this.checkColumnVisibility()):r.registerColumnField(this),this._initialize()}createElement(){var e=document.createElement("div");switch(e.classList.add("tabulator-col"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),this.isRowHeader&&e.classList.add("tabulator-row-header"),this.table.options.columnHeaderVertAlign){case"middle":e.style.justifyContent="center";break;case"bottom":e.style.justifyContent="flex-end";break}return e}createGroupElement(){var e=document.createElement("div");return e.classList.add("tabulator-col-group-cols"),e}mapDefinitions(){var e=this.table.options.columnDefaults;if(e)for(let r in e)typeof this.definition[r]>"u"&&(this.definition[r]=e[r]);this.definition=this.table.columnManager.optionsList.generate(hv.defaultOptionList,this.definition)}checkDefinition(){Object.keys(this.definition).forEach(e=>{hv.defaultOptionList.indexOf(e)===-1&&console.warn("Invalid column definition option in '"+(this.field||this.definition.title)+"' column:",e)})}setField(e){this.field=e,this.fieldStructure=e?this.table.options.nestedFieldSeparator?e.split(this.table.options.nestedFieldSeparator):[e]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData}registerColumnPosition(e){this.parent.registerColumnPosition(e)}registerColumnField(e){this.parent.registerColumnField(e)}reRegisterPosition(){this.isGroup?this.columns.forEach(function(e){e.reRegisterPosition()}):this.registerColumnPosition(this)}_initialize(){for(var e=this.definition;this.element.firstChild;)this.element.removeChild(this.element.firstChild);e.headerVertical&&(this.element.classList.add("tabulator-col-vertical"),e.headerVertical==="flip"&&this.element.classList.add("tabulator-col-vertical-flip")),this.contentElement=this._buildColumnHeaderContent(),this.element.appendChild(this.contentElement),this.isGroup?this._buildGroupHeader():this._buildColumnHeader(),this.dispatch("column-init",this)}_buildColumnHeader(){var e=this.definition;if(this.dispatch("column-layout",this),typeof e.visible<"u"&&(e.visible?this.show(!0):this.hide(!0)),e.cssClass){var r=e.cssClass.split(" ");r.forEach(u=>{this.element.classList.add(u)})}e.field&&this.element.setAttribute("tabulator-field",e.field),this.setMinWidth(parseInt(e.minWidth)),e.maxInitialWidth&&(this.maxInitialWidth=parseInt(e.maxInitialWidth)),e.maxWidth&&this.setMaxWidth(parseInt(e.maxWidth)),this.reinitializeWidth(),this.hozAlign=this.definition.hozAlign,this.vertAlign=this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign}_buildColumnHeaderContent(){var e=document.createElement("div");return e.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),e.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),e}_buildColumnHeaderTitle(){var e=this.definition,r=document.createElement("div");if(r.classList.add("tabulator-col-title"),e.headerWordWrap&&r.classList.add("tabulator-col-title-wrap"),e.editableTitle){var u=document.createElement("input");u.classList.add("tabulator-title-editor"),u.addEventListener("click",R=>{R.stopPropagation(),u.focus()}),u.addEventListener("mousedown",R=>{R.stopPropagation()}),u.addEventListener("change",()=>{e.title=u.value,this.dispatchExternal("columnTitleChanged",this.getComponent())}),r.appendChild(u),e.field?this.langBind("columns|"+e.field,R=>{u.value=R||e.title||"&nbsp;"}):u.value=e.title||"&nbsp;"}else e.field?this.langBind("columns|"+e.field,R=>{this._formatColumnHeaderTitle(r,R||e.title||"&nbsp;")}):this._formatColumnHeaderTitle(r,e.title||"&nbsp;");return r}_formatColumnHeaderTitle(e,r){var u=this.chain("column-format",[this,r,e],null,()=>r);switch(typeof u){case"object":u instanceof Node?e.appendChild(u):(e.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",u));break;case"undefined":e.innerHTML="";break;default:e.innerHTML=u}}_buildGroupHeader(){if(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass){var e=this.definition.cssClass.split(" ");e.forEach(r=>{this.element.classList.add(r)})}this.titleElement.style.textAlign=this.definition.headerHozAlign,this.element.appendChild(this.groupElement)}_getFlatData(e){return e[this.field]}_getNestedData(e){var r=e,u=this.fieldStructure,R=u.length,p;for(let f=0;f<R&&(r=r[u[f]],p=r,!!r);f++);return p}_setFlatData(e,r){this.field&&(e[this.field]=r)}_setNestedData(e,r){var u=e,R=this.fieldStructure,p=R.length;for(let f=0;f<p;f++)if(f==p-1)u[R[f]]=r;else{if(!u[R[f]])if(typeof r<"u")u[R[f]]={};else break;u=u[R[f]]}}attachColumn(e){this.groupElement?(this.columns.push(e),this.groupElement.appendChild(e.getElement()),e.columnRendered()):console.warn("Column Warning - Column being attached to another column instead of column group")}verticalAlign(e,r){var u=this.parent.isGroup?this.parent.getGroupElement().clientHeight:r||this.parent.getHeadersElement().clientHeight;this.element.style.height=u+"px",this.dispatch("column-height",this,this.element.style.height),this.isGroup&&(this.groupElement.style.minHeight=u-this.contentElement.offsetHeight+"px"),this.columns.forEach(function(R){R.verticalAlign(e)})}clearVerticalAlign(){this.element.style.paddingTop="",this.element.style.height="",this.element.style.minHeight="",this.groupElement.style.minHeight="",this.columns.forEach(function(e){e.clearVerticalAlign()}),this.dispatch("column-height",this,"")}getElement(){return this.element}getGroupElement(){return this.groupElement}getField(){return this.field}getTitleDownload(){return this.titleDownload}getFirstColumn(){return this.isGroup?this.columns.length?this.columns[0].getFirstColumn():!1:this}getLastColumn(){return this.isGroup?this.columns.length?this.columns[this.columns.length-1].getLastColumn():!1:this}getColumns(e){var r=[];return e?this.columns.forEach(u=>{r.push(u),r=r.concat(u.getColumns(!0))}):r=this.columns,r}getCells(){return this.cells}getTopColumn(){return this.parent.isGroup?this.parent.getTopColumn():this}getDefinition(e){var r=[];return this.isGroup&&e&&(this.columns.forEach(function(u){r.push(u.getDefinition(!0))}),this.definition.columns=r),this.definition}checkColumnVisibility(){var e=!1;this.columns.forEach(function(r){r.visible&&(e=!0)}),e?(this.show(),this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1)):this.hide()}show(e,r){this.visible||(this.visible=!0,this.element.style.display="",this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(u){u.show()}),!this.isGroup&&this.width===null&&this.reinitializeWidth(),this.table.columnManager.verticalAlignHeaders(),this.dispatch("column-show",this,r),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!0),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}hide(e,r){this.visible&&(this.visible=!1,this.element.style.display="none",this.table.columnManager.verticalAlignHeaders(),this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(u){u.hide()}),this.dispatch("column-hide",this,r),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}matchChildWidths(){var e=0;this.contentElement&&this.columns.length&&(this.columns.forEach(function(r){r.visible&&(e+=r.getWidth())}),this.contentElement.style.maxWidth=e-1+"px",this.table.initialized&&(this.element.style.width=e+"px"),this.parent.isGroup&&this.parent.matchChildWidths())}removeChild(e){var r=this.columns.indexOf(e);r>-1&&this.columns.splice(r,1),this.columns.length||this.delete()}setWidth(e){this.widthFixed=!0,this.setWidthActual(e)}setWidthActual(e){isNaN(e)&&(e=Math.floor(this.table.element.clientWidth/100*parseInt(e))),e=Math.max(this.minWidth,e),this.maxWidth&&(e=Math.min(this.maxWidth,e)),this.width=e,this.widthStyled=e?e+"px":"",this.element.style.width=this.widthStyled,this.isGroup||this.cells.forEach(function(r){r.setWidth()}),this.parent.isGroup&&this.parent.matchChildWidths(),this.dispatch("column-width",this),this.subscribedExternal("columnWidth")&&this.dispatchExternal("columnWidth",this.getComponent())}checkCellHeights(){var e=[];this.cells.forEach(function(r){r.row.heightInitialized&&(r.row.getElement().offsetParent!==null?(e.push(r.row),r.row.clearCellHeight()):r.row.heightInitialized=!1)}),e.forEach(function(r){r.calcHeight()}),e.forEach(function(r){r.setCellHeight()})}getWidth(){var e=0;return this.isGroup?this.columns.forEach(function(r){r.visible&&(e+=r.getWidth())}):e=this.width,e}getLeftOffset(){var e=this.element.offsetLeft;return this.parent.isGroup&&(e+=this.parent.getLeftOffset()),e}getHeight(){return Math.ceil(this.element.getBoundingClientRect().height)}setMinWidth(e){this.maxWidth&&e>this.maxWidth&&(e=this.maxWidth,console.warn("the minWidth ("+e+"px) for column '"+this.field+"' cannot be bigger that its maxWidth ("+this.maxWidthStyled+")")),this.minWidth=e,this.minWidthStyled=e?e+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach(function(r){r.setMinWidth()})}setMaxWidth(e){this.minWidth&&e<this.minWidth&&(e=this.minWidth,console.warn("the maxWidth ("+e+"px) for column '"+this.field+"' cannot be smaller that its minWidth ("+this.minWidthStyled+")")),this.maxWidth=e,this.maxWidthStyled=e?e+"px":"",this.element.style.maxWidth=this.maxWidthStyled,this.cells.forEach(function(r){r.setMaxWidth()})}delete(){return new Promise((e,r)=>{this.isGroup&&this.columns.forEach(function(R){R.delete()}),this.dispatch("column-delete",this);var u=this.cells.length;for(let R=0;R<u;R++)this.cells[0].delete();this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=!1,this.contentElement=!1,this.titleElement=!1,this.groupElement=!1,this.parent.isGroup&&this.parent.removeChild(this),this.table.columnManager.deregisterColumn(this),this.table.columnManager.rerenderColumns(!0),this.dispatch("column-deleted",this),e()})}columnRendered(){this.titleFormatterRendered&&this.titleFormatterRendered(),this.dispatch("column-rendered",this)}generateCell(e){var r=new sx(this,e);return this.cells.push(r),r}nextColumn(){var e=this.table.columnManager.findColumnIndex(this);return e>-1?this._nextVisibleColumn(e+1):!1}_nextVisibleColumn(e){var r=this.table.columnManager.getColumnByIndex(e);return!r||r.visible?r:this._nextVisibleColumn(e+1)}prevColumn(){var e=this.table.columnManager.findColumnIndex(this);return e>-1?this._prevVisibleColumn(e-1):!1}_prevVisibleColumn(e){var r=this.table.columnManager.getColumnByIndex(e);return!r||r.visible?r:this._prevVisibleColumn(e-1)}reinitializeWidth(e){this.widthFixed=!1,typeof this.definition.width<"u"&&!e&&this.setWidth(this.definition.width),this.dispatch("column-width-fit-before",this),this.fitToData(e),this.dispatch("column-width-fit-after",this)}fitToData(e){if(!this.isGroup){this.widthFixed||(this.element.style.width="",this.cells.forEach(R=>{R.clearWidth()}));var r=this.element.offsetWidth;if((!this.width||!this.widthFixed)&&(this.cells.forEach(R=>{var p=R.getWidth();p>r&&(r=p)}),r)){var u=r+1;e?this.setWidth(u):(this.maxInitialWidth&&!e&&(u=Math.min(u,this.maxInitialWidth)),this.setWidthActual(u))}}}updateDefinition(e){var r;return this.isGroup||this.parent.isGroup?(console.error("Column Update Error - The updateDefinition function is only available on ungrouped columns"),Promise.reject("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(r=Object.assign({},this.getDefinition()),r=Object.assign(r,e),this.table.columnManager.addColumn(r,!1,this).then(u=>(r.field==this.field&&(this.field=!1),this.delete().then(()=>u.getComponent()))))}deleteCell(e){var r=this.cells.indexOf(e);r>-1&&this.cells.splice(r,1)}getComponent(){return this.component||(this.component=new YL(this)),this.component}getPosition(){return this.table.columnManager.getVisibleColumnsByIndex().indexOf(this)+1}getParentComponent(){return this.parent instanceof hv?this.parent.getComponent():!1}};Ci(hv,"defaultOptionList",ZL);let xv=hv;class Ew{constructor(e){return this._row=e,new Proxy(this,{get:function(r,u,R){return typeof r[u]<"u"?r[u]:r._row.table.componentFunctionBinder.handle("row",r._row,u)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getCells(){var e=[];return this._row.getCells().forEach(function(r){e.push(r.getComponent())}),e}getCell(e){var r=this._row.getCell(e);return r?r.getComponent():!1}getIndex(){return this._row.getData("data")[this._row.table.options.index]}getPosition(){return this._row.getPosition()}watchPosition(e){return this._row.watchPosition(e)}delete(){return this._row.delete()}scrollTo(e,r){return this._row.table.rowManager.scrollToRow(this._row,e,r)}move(e,r){this._row.moveToRow(e,r)}update(e){return this._row.updateData(e)}normalizeHeight(){this._row.normalizeHeight(!0)}_getSelf(){return this._row}reformat(){return this._row.reinitialize()}getTable(){return this._row.table}getNextRow(){var e=this._row.nextRow();return e&&e.getComponent()}getPrevRow(){var e=this._row.prevRow();return e&&e.getComponent()}}class Sh extends ch{constructor(e,r,u="row"){super(r.table),this.parent=r,this.data={},this.type=u,this.element=!1,this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.position=0,this.positionWatchers=[],this.component=null,this.created=!1,this.setData(e)}create(){this.created||(this.created=!0,this.generateElement())}createElement(){var e=document.createElement("div");e.classList.add("tabulator-row"),e.setAttribute("role","row"),this.element=e}getElement(){return this.create(),this.element}detachElement(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}generateElement(){this.createElement(),this.dispatch("row-init",this)}generateCells(){this.cells=this.table.columnManager.generateCells(this)}initialize(e,r){if(this.create(),!this.initialized||e){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.dispatch("row-layout-before",this),this.generateCells(),this.initialized=!0,this.table.columnManager.renderer.renderRowCells(this,r),e&&this.normalizeHeight(),this.dispatch("row-layout",this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.dispatch("row-layout-after",this)}else this.table.columnManager.renderer.rerenderRowCells(this,r)}rendered(){this.cells.forEach(e=>{e.cellRendered()})}reinitializeHeight(){this.heightInitialized=!1,this.element&&this.element.offsetParent!==null&&this.normalizeHeight(!0)}deinitialize(){this.initialized=!1}deinitializeHeight(){this.heightInitialized=!1}reinitialize(e){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),this.element&&this.element.offsetParent!==null&&this.initialize(!0),this.dispatch("row-relayout",this)}calcHeight(e){var r=0,u=0;this.table.options.rowHeight?this.height=this.table.options.rowHeight:(u=this.calcMinHeight(),r=this.calcMaxHeight(),e?this.height=Math.max(r,u):this.height=this.manualHeight?this.height:Math.max(r,u)),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight}calcMinHeight(){return this.table.options.resizableRows?this.element.clientHeight:0}calcMaxHeight(){var e=0;return this.cells.forEach(function(r){var u=r.getHeight();u>e&&(e=u)}),e}setCellHeight(){this.cells.forEach(function(e){e.setHeight()}),this.heightInitialized=!0}clearCellHeight(){this.cells.forEach(function(e){e.clearHeight()})}normalizeHeight(e){e&&!this.table.options.rowHeight&&this.clearCellHeight(),this.calcHeight(e),this.setCellHeight()}setHeight(e,r){(this.height!=e||r)&&(this.manualHeight=!0,this.height=e,this.heightStyled=e?e+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight,this.subscribedExternal("rowHeight")&&this.dispatchExternal("rowHeight",this.getComponent()))}getHeight(){return this.outerHeight}getWidth(){return this.element.offsetWidth}deleteCell(e){var r=this.cells.indexOf(e);r>-1&&this.cells.splice(r,1)}setData(e){this.data=this.chain("row-data-init-before",[this,e],void 0,e),this.dispatch("row-data-init-after",this)}updateData(e){var r=this.element&&Ks.elVisible(this.element),u={},R;return new Promise((p,f)=>{typeof e=="string"&&(e=JSON.parse(e)),this.dispatch("row-data-save-before",this),this.subscribed("row-data-changing")&&(u=Object.assign(u,this.data),u=Object.assign(u,e)),R=this.chain("row-data-changing",[this,u,e],null,e);for(let n in R)this.data[n]=R[n];this.dispatch("row-data-save-after",this);for(let n in e)this.table.columnManager.getColumnsByFieldRoot(n).forEach(c=>{let i=this.getCell(c.getField());if(i){let _=c.getFieldValue(R);i.getValue()!==_&&(i.setValueProcessData(_),r&&i.cellRendered())}});r?(this.normalizeHeight(!0),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent())):(this.initialized=!1,this.height=0,this.heightStyled=""),this.dispatch("row-data-changed",this,r,e),this.dispatchExternal("rowUpdated",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),p()})}getData(e){return e?this.chain("row-data-retrieve",[this,e],null,this.data):this.data}getCell(e){var r=!1;return e=this.table.columnManager.findColumn(e),!this.initialized&&this.cells.length===0&&this.generateCells(),r=this.cells.find(function(u){return u.column===e}),r}getCellIndex(e){return this.cells.findIndex(function(r){return r===e})}findCell(e){return this.cells.find(r=>r.element===e)}getCells(){return!this.initialized&&this.cells.length===0&&this.generateCells(),this.cells}nextRow(){var e=this.table.rowManager.nextDisplayRow(this,!0);return e||!1}prevRow(){var e=this.table.rowManager.prevDisplayRow(this,!0);return e||!1}moveToRow(e,r){var u=this.table.rowManager.findRow(e);u?(this.table.rowManager.moveRowActual(this,u,!r),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",e)}delete(){return this.dispatch("row-delete",this),this.deleteActual(),Promise.resolve()}deleteActual(e){this.detachModules(),this.table.rowManager.deleteRow(this,e),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.dispatch("row-deleted",this)}detachModules(){this.dispatch("row-deleting",this)}deleteCells(){var e=this.cells.length;for(let r=0;r<e;r++)this.cells[0].delete()}wipe(){if(this.detachModules(),this.deleteCells(),this.element){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.parentNode&&this.element.parentNode.removeChild(this.element)}this.element=!1,this.modules={}}isDisplayed(){return this.table.rowManager.getDisplayRows().includes(this)}getPosition(){return this.isDisplayed()?this.position:!1}setPosition(e){e!=this.position&&(this.position=e,this.positionWatchers.forEach(r=>{r(this.position)}))}watchPosition(e){this.positionWatchers.push(e),e(this.position)}getGroup(){return this.modules.group||!1}getComponent(){return this.component||(this.component=new Ew(this)),this.component}}var hH={avg:function(t,e,r){var u=0,R=typeof r.precision<"u"?r.precision:2;return t.length&&(u=t.reduce(function(p,f){return Number(p)+Number(f)}),u=u/t.length,u=R!==!1?u.toFixed(R):u),parseFloat(u).toString()},max:function(t,e,r){var u=null,R=typeof r.precision<"u"?r.precision:!1;return t.forEach(function(p){p=Number(p),(p>u||u===null)&&(u=p)}),u!==null?R!==!1?u.toFixed(R):u:""},min:function(t,e,r){var u=null,R=typeof r.precision<"u"?r.precision:!1;return t.forEach(function(p){p=Number(p),(p<u||u===null)&&(u=p)}),u!==null?R!==!1?u.toFixed(R):u:""},sum:function(t,e,r){var u=0,R=typeof r.precision<"u"?r.precision:!1;return t.length&&t.forEach(function(p){p=Number(p),u+=isNaN(p)?0:Number(p)}),R!==!1?u.toFixed(R):u},concat:function(t,e,r){var u=0;return t.length&&(u=t.reduce(function(R,p){return String(R)+String(p)})),u},count:function(t,e,r){var u=0;return t.length&&t.forEach(function(R){R&&u++}),u},unique:function(t,e,r){var u=t.filter((R,p)=>(t||R===0)&&t.indexOf(R)===p);return u.length}};const Km=class Km extends uo{constructor(e){super(e),this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=this.createElement(),this.botElement=this.createElement(),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.blocked=!1,this.recalcAfterBlock=!1,this.registerTableOption("columnCalcs",!0),this.registerColumnOption("topCalc"),this.registerColumnOption("topCalcParams"),this.registerColumnOption("topCalcFormatter"),this.registerColumnOption("topCalcFormatterParams"),this.registerColumnOption("bottomCalc"),this.registerColumnOption("bottomCalcParams"),this.registerColumnOption("bottomCalcFormatter"),this.registerColumnOption("bottomCalcFormatterParams")}createElement(){var e=document.createElement("div");return e.classList.add("tabulator-calcs-holder"),e}initialize(){this.genColumn=new xv({field:"value"},this),this.subscribe("cell-value-changed",this.cellValueChanged.bind(this)),this.subscribe("column-init",this.initializeColumnCheck.bind(this)),this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("row-added",this.rowsUpdated.bind(this)),this.subscribe("column-moved",this.recalcActiveRows.bind(this)),this.subscribe("column-add",this.recalcActiveRows.bind(this)),this.subscribe("data-refreshed",this.recalcActiveRowsRefresh.bind(this)),this.subscribe("table-redraw",this.tableRedraw.bind(this)),this.subscribe("rows-visible",this.visibleRows.bind(this)),this.subscribe("scrollbar-vertical",this.adjustForScrollbar.bind(this)),this.subscribe("redraw-blocked",this.blockRedraw.bind(this)),this.subscribe("redraw-restored",this.restoreRedraw.bind(this)),this.subscribe("table-redrawing",this.resizeHolderWidth.bind(this)),this.subscribe("column-resized",this.resizeHolderWidth.bind(this)),this.subscribe("column-show",this.resizeHolderWidth.bind(this)),this.subscribe("column-hide",this.resizeHolderWidth.bind(this)),this.registerTableFunction("getCalcResults",this.getResults.bind(this)),this.registerTableFunction("recalc",this.userRecalc.bind(this)),this.resizeHolderWidth()}resizeHolderWidth(){this.topElement.style.minWidth=this.table.columnManager.headersElement.offsetWidth+"px"}tableRedraw(e){this.recalc(this.table.rowManager.activeRows),e&&this.redraw()}blockRedraw(){this.blocked=!0,this.recalcAfterBlock=!1}restoreRedraw(){this.blocked=!1,this.recalcAfterBlock&&(this.recalcAfterBlock=!1,this.recalcActiveRowsRefresh())}userRecalc(){this.recalc(this.table.rowManager.activeRows)}blockCheck(){return this.blocked&&(this.recalcAfterBlock=!0),this.blocked}visibleRows(e,r){return this.topRow&&r.unshift(this.topRow),this.botRow&&r.push(this.botRow),r}rowsUpdated(e){this.table.options.groupBy?this.recalcRowGroup(e):this.recalcActiveRows()}recalcActiveRowsRefresh(){this.table.options.groupBy&&this.table.options.dataTreeStartExpanded&&this.table.options.dataTree?this.recalcAll():this.recalcActiveRows()}recalcActiveRows(){this.recalc(this.table.rowManager.activeRows)}cellValueChanged(e){(e.column.definition.topCalc||e.column.definition.bottomCalc)&&(this.table.options.groupBy?((this.table.options.columnCalcs=="table"||this.table.options.columnCalcs=="both")&&this.recalcActiveRows(),this.table.options.columnCalcs!="table"&&this.recalcRowGroup(e.row)):this.recalcActiveRows())}initializeColumnCheck(e){(e.definition.topCalc||e.definition.bottomCalc)&&this.initializeColumn(e)}initializeColumn(e){var r=e.definition,u={topCalcParams:r.topCalcParams||{},botCalcParams:r.bottomCalcParams||{}};if(r.topCalc){switch(typeof r.topCalc){case"string":Km.calculations[r.topCalc]?u.topCalc=Km.calculations[r.topCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",r.topCalc);break;case"function":u.topCalc=r.topCalc;break}u.topCalc&&(e.modules.columnCalcs=u,this.topCalcs.push(e),this.table.options.columnCalcs!="group"&&this.initializeTopRow())}if(r.bottomCalc){switch(typeof r.bottomCalc){case"string":Km.calculations[r.bottomCalc]?u.botCalc=Km.calculations[r.bottomCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",r.bottomCalc);break;case"function":u.botCalc=r.bottomCalc;break}u.botCalc&&(e.modules.columnCalcs=u,this.botCalcs.push(e),this.table.options.columnCalcs!="group"&&this.initializeBottomRow())}}registerColumnField(){}removeCalcs(){var e=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.parentNode.removeChild(this.topElement),e=!0),this.botInitialized&&(this.botInitialized=!1,this.footerRemove(this.botElement),e=!0),e&&this.table.rowManager.adjustTableSize()}reinitializeCalcs(){this.topCalcs.length&&this.initializeTopRow(),this.botCalcs.length&&this.initializeBottomRow()}initializeTopRow(){var e=document.createDocumentFragment();this.topInitialized||(e.appendChild(document.createElement("br")),e.appendChild(this.topElement),this.table.columnManager.getContentsElement().insertBefore(e,this.table.columnManager.headersElement.nextSibling),this.topInitialized=!0)}initializeBottomRow(){this.botInitialized||(this.footerPrepend(this.botElement),this.botInitialized=!0)}scrollHorizontal(e){this.botInitialized&&this.botRow&&(this.botElement.scrollLeft=e)}recalc(e){var r,u;if(!this.blockCheck()&&(this.topInitialized||this.botInitialized)){if(r=this.rowsToData(e),this.topInitialized){for(this.topRow&&this.topRow.deleteCells(),u=this.generateRow("top",r),this.topRow=u;this.topElement.firstChild;)this.topElement.removeChild(this.topElement.firstChild);this.topElement.appendChild(u.getElement()),u.initialize(!0)}if(this.botInitialized){for(this.botRow&&this.botRow.deleteCells(),u=this.generateRow("bottom",r),this.botRow=u;this.botElement.firstChild;)this.botElement.removeChild(this.botElement.firstChild);this.botElement.appendChild(u.getElement()),u.initialize(!0)}this.table.rowManager.adjustTableSize(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()}}recalcRowGroup(e){this.recalcGroup(this.table.modules.groupRows.getRowGroup(e))}recalcAll(){if((this.topCalcs.length||this.botCalcs.length)&&(this.table.options.columnCalcs!=="group"&&this.recalcActiveRows(),this.table.options.groupBy&&this.table.options.columnCalcs!=="table")){var e=this.table.modules.groupRows.getChildGroups();e.forEach(r=>{this.recalcGroup(r)})}}recalcGroup(e){var r,u;this.blockCheck()||e&&e.calcs&&(e.calcs.bottom&&(r=this.rowsToData(e.rows),u=this.generateRowData("bottom",r),e.calcs.bottom.updateData(u),e.calcs.bottom.reinitialize()),e.calcs.top&&(r=this.rowsToData(e.rows),u=this.generateRowData("top",r),e.calcs.top.updateData(u),e.calcs.top.reinitialize()))}generateTopRow(e){return this.generateRow("top",this.rowsToData(e))}generateBottomRow(e){return this.generateRow("bottom",this.rowsToData(e))}rowsToData(e){var r=[],u=this.table.options.dataTree&&this.table.options.dataTreeChildColumnCalcs,R=this.table.modules.dataTree;return e.forEach(p=>{var f;r.push(p.getData()),u&&((f=p.modules.dataTree)!=null&&f.open)&&this.rowsToData(R.getFilteredTreeChildren(p)).forEach(n=>{r.push(p)})}),r}generateRow(e,r){var u=this.generateRowData(e,r),R;return this.table.modExists("mutator")&&this.table.modules.mutator.disable(),R=new Sh(u,this,"calc"),this.table.modExists("mutator")&&this.table.modules.mutator.enable(),R.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+e),R.component=!1,R.getComponent=()=>(R.component||(R.component=new cH(R)),R.component),R.generateCells=()=>{var p=[];this.table.columnManager.columnsByIndex.forEach(f=>{this.genColumn.setField(f.getField()),this.genColumn.hozAlign=f.hozAlign,f.definition[e+"CalcFormatter"]&&this.table.modExists("format")?this.genColumn.modules.format={formatter:this.table.modules.format.lookupFormatter(f.definition[e+"CalcFormatter"]),params:f.definition[e+"CalcFormatterParams"]||{}}:this.genColumn.modules.format={formatter:this.table.modules.format.lookupFormatter("plaintext"),params:{}},this.genColumn.definition.cssClass=f.definition.cssClass;var n=new sx(this.genColumn,R);n.getElement(),n.column=f,n.setWidth(),f.cells.push(n),p.push(n),f.visible||n.hide()}),R.cells=p},R}generateRowData(e,r){var u={},R=e=="top"?this.topCalcs:this.botCalcs,p=e=="top"?"topCalc":"botCalc",f,n;return R.forEach(function(l){var c=[];l.modules.columnCalcs&&l.modules.columnCalcs[p]&&(r.forEach(function(i){c.push(l.getFieldValue(i))}),n=p+"Params",f=typeof l.modules.columnCalcs[n]=="function"?l.modules.columnCalcs[n](c,r):l.modules.columnCalcs[n],l.setFieldValue(u,l.modules.columnCalcs[p](c,r,f)))}),u}hasTopCalcs(){return!!this.topCalcs.length}hasBottomCalcs(){return!!this.botCalcs.length}redraw(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)}getResults(){var e={},r;return this.table.options.groupBy&&this.table.modExists("groupRows")?(r=this.table.modules.groupRows.getGroups(!0),r.forEach(u=>{e[u.getKey()]=this.getGroupResults(u)})):e={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},e}getGroupResults(e){var r=e._getSelf(),u=e.getSubGroups(),R={},p={};return u.forEach(f=>{R[f.getKey()]=this.getGroupResults(f)}),p={top:r.calcs.top?r.calcs.top.getData():{},bottom:r.calcs.bottom?r.calcs.bottom.getData():{},groups:R},p}adjustForScrollbar(e){this.botRow&&(this.table.rtl?this.botElement.style.paddingLeft=e+"px":this.botElement.style.paddingRight=e+"px")}};Ci(Km,"moduleName","columnCalcs"),Ci(Km,"calculations",hH);let xT=Km;class XL extends uo{constructor(e){super(e),this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null,this.elementField=!1,this.startOpen=function(){},this.registerTableOption("dataTree",!1),this.registerTableOption("dataTreeFilter",!0),this.registerTableOption("dataTreeSort",!0),this.registerTableOption("dataTreeElementColumn",!1),this.registerTableOption("dataTreeBranchElement",!0),this.registerTableOption("dataTreeChildIndent",9),this.registerTableOption("dataTreeChildField","_children"),this.registerTableOption("dataTreeCollapseElement",!1),this.registerTableOption("dataTreeExpandElement",!1),this.registerTableOption("dataTreeStartExpanded",!1),this.registerTableOption("dataTreeChildColumnCalcs",!1),this.registerTableOption("dataTreeSelectPropagate",!1),this.registerComponentFunction("row","treeCollapse",this.collapseRow.bind(this)),this.registerComponentFunction("row","treeExpand",this.expandRow.bind(this)),this.registerComponentFunction("row","treeToggle",this.toggleRow.bind(this)),this.registerComponentFunction("row","getTreeParent",this.getTreeParent.bind(this)),this.registerComponentFunction("row","getTreeChildren",this.getRowChildren.bind(this)),this.registerComponentFunction("row","addTreeChild",this.addTreeChildRow.bind(this)),this.registerComponentFunction("row","isTreeExpanded",this.isRowExpanded.bind(this))}initialize(){if(this.table.options.dataTree){var e=null,r=this.table.options;switch(this.field=r.dataTreeChildField,this.indent=r.dataTreeChildIndent,this.options("movableRows")&&console.warn("The movableRows option is not available with dataTree enabled, moving of child rows could result in unpredictable behavior"),r.dataTreeBranchElement?r.dataTreeBranchElement===!0?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):typeof r.dataTreeBranchElement=="string"?(e=document.createElement("div"),e.innerHTML=r.dataTreeBranchElement,this.branchEl=e.firstChild):this.branchEl=r.dataTreeBranchElement:(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch-empty")),r.dataTreeCollapseElement?typeof r.dataTreeCollapseElement=="string"?(e=document.createElement("div"),e.innerHTML=r.dataTreeCollapseElement,this.collapseEl=e.firstChild):this.collapseEl=r.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.tabIndex=0,this.collapseEl.innerHTML="<div class='tabulator-data-tree-control-collapse'></div>"),r.dataTreeExpandElement?typeof r.dataTreeExpandElement=="string"?(e=document.createElement("div"),e.innerHTML=r.dataTreeExpandElement,this.expandEl=e.firstChild):this.expandEl=r.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="<div class='tabulator-data-tree-control-expand'></div>"),typeof r.dataTreeStartExpanded){case"boolean":this.startOpen=function(u,R){return r.dataTreeStartExpanded};break;case"function":this.startOpen=r.dataTreeStartExpanded;break;default:this.startOpen=function(u,R){return r.dataTreeStartExpanded[R]};break}this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("row-deleting",this.rowDeleting.bind(this)),this.subscribe("row-deleted",this.rowDelete.bind(this),0),this.subscribe("row-data-changed",this.rowDataChanged.bind(this),10),this.subscribe("cell-value-updated",this.cellValueChanged.bind(this)),this.subscribe("edit-cancelled",this.cellValueChanged.bind(this)),this.subscribe("column-moving-rows",this.columnMoving.bind(this)),this.subscribe("table-built",this.initializeElementField.bind(this)),this.subscribe("table-redrawing",this.tableRedrawing.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),30)}}tableRedrawing(e){var r;e&&(r=this.table.rowManager.getRows(),r.forEach(u=>{this.reinitializeRowChildren(u)}))}initializeElementField(){var e=this.table.columnManager.getFirstVisibleColumn();this.elementField=this.table.options.dataTreeElementColumn||(e?e.field:!1)}getRowChildren(e){return this.getTreeChildren(e,!0)}columnMoving(){var e=[];return this.table.rowManager.rows.forEach(r=>{e=e.concat(this.getTreeChildren(r,!1,!0))}),e}rowDataChanged(e,r,u){this.redrawNeeded(u)&&(this.initializeRow(e),r&&(this.layoutRow(e),this.refreshData(!0)))}cellValueChanged(e){var r=e.column.getField();r===this.elementField&&this.layoutRow(e.row)}initializeRow(e){var r=e.getData()[this.field],u=Array.isArray(r),R=u||!u&&typeof r=="object"&&r!==null;!R&&e.modules.dataTree&&e.modules.dataTree.branchEl&&e.modules.dataTree.branchEl.parentNode.removeChild(e.modules.dataTree.branchEl),!R&&e.modules.dataTree&&e.modules.dataTree.controlEl&&e.modules.dataTree.controlEl.parentNode.removeChild(e.modules.dataTree.controlEl),e.modules.dataTree={index:e.modules.dataTree?e.modules.dataTree.index:0,open:R?e.modules.dataTree?e.modules.dataTree.open:this.startOpen(e.getComponent(),0):!1,controlEl:e.modules.dataTree&&R?e.modules.dataTree.controlEl:!1,branchEl:e.modules.dataTree&&R?e.modules.dataTree.branchEl:!1,parent:e.modules.dataTree?e.modules.dataTree.parent:!1,children:R}}reinitializeRowChildren(e){var r=this.getTreeChildren(e,!1,!0);r.forEach(function(u){u.reinitialize(!0)})}layoutRow(e){var r=this.elementField?e.getCell(this.elementField):e.getCells()[0],u=r.getElement(),R=e.modules.dataTree;R.branchEl&&(R.branchEl.parentNode&&R.branchEl.parentNode.removeChild(R.branchEl),R.branchEl=!1),R.controlEl&&(R.controlEl.parentNode&&R.controlEl.parentNode.removeChild(R.controlEl),R.controlEl=!1),this.generateControlElement(e,u),e.getElement().classList.add("tabulator-tree-level-"+R.index),R.index&&(this.branchEl?(R.branchEl=this.branchEl.cloneNode(!0),u.insertBefore(R.branchEl,u.firstChild),this.table.rtl?R.branchEl.style.marginRight=(R.branchEl.offsetWidth+R.branchEl.style.marginLeft)*(R.index-1)+R.index*this.indent+"px":R.branchEl.style.marginLeft=(R.branchEl.offsetWidth+R.branchEl.style.marginRight)*(R.index-1)+R.index*this.indent+"px"):this.table.rtl?u.style.paddingRight=parseInt(window.getComputedStyle(u,null).getPropertyValue("padding-right"))+R.index*this.indent+"px":u.style.paddingLeft=parseInt(window.getComputedStyle(u,null).getPropertyValue("padding-left"))+R.index*this.indent+"px")}generateControlElement(e,r){var u=e.modules.dataTree,R=u.controlEl;r=r||e.getCells()[0].getElement(),u.children!==!1&&(u.open?(u.controlEl=this.collapseEl.cloneNode(!0),u.controlEl.addEventListener("click",p=>{p.stopPropagation(),this.collapseRow(e)})):(u.controlEl=this.expandEl.cloneNode(!0),u.controlEl.addEventListener("click",p=>{p.stopPropagation(),this.expandRow(e)})),u.controlEl.addEventListener("mousedown",p=>{p.stopPropagation()}),R&&R.parentNode===r?R.parentNode.replaceChild(u.controlEl,R):r.insertBefore(u.controlEl,r.firstChild))}getRows(e){var r=[];return e.forEach((u,R)=>{var p,f;r.push(u),u instanceof Sh&&(u.create(),p=u.modules.dataTree,!p.index&&p.children!==!1&&(f=this.getChildren(u,!1,!0),f.forEach(n=>{n.create(),r.push(n)})))}),r}getChildren(e,r,u){var R=e.modules.dataTree,p=[],f=[];return R.children!==!1&&(R.open||r)&&(Array.isArray(R.children)||(R.children=this.generateChildren(e)),this.table.modExists("filter")&&this.table.options.dataTreeFilter?p=this.table.modules.filter.filter(R.children):p=R.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(p,u),p.forEach(n=>{f.push(n);var l=this.getChildren(n,!1,!0);l.forEach(c=>{f.push(c)})})),f}generateChildren(e){var r=[],u=e.getData()[this.field];return Array.isArray(u)||(u=[u]),u.forEach(R=>{var p=new Sh(R||{},this.table.rowManager);p.create(),p.modules.dataTree.index=e.modules.dataTree.index+1,p.modules.dataTree.parent=e,p.modules.dataTree.children&&(p.modules.dataTree.open=this.startOpen(p.getComponent(),p.modules.dataTree.index)),r.push(p)}),r}expandRow(e,r){var u=e.modules.dataTree;u.children!==!1&&(u.open=!0,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowExpanded",e.getComponent(),e.modules.dataTree.index))}collapseRow(e){var r=e.modules.dataTree;r.children!==!1&&(r.open=!1,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowCollapsed",e.getComponent(),e.modules.dataTree.index))}toggleRow(e){var r=e.modules.dataTree;r.children!==!1&&(r.open?this.collapseRow(e):this.expandRow(e))}isRowExpanded(e){return e.modules.dataTree.open}getTreeParent(e){return e.modules.dataTree.parent?e.modules.dataTree.parent.getComponent():!1}getTreeParentRoot(e){return e.modules.dataTree&&e.modules.dataTree.parent?this.getTreeParentRoot(e.modules.dataTree.parent):e}getFilteredTreeChildren(e){var r=e.modules.dataTree,u=[],R;return r.children&&(Array.isArray(r.children)||(r.children=this.generateChildren(e)),this.table.modExists("filter")&&this.table.options.dataTreeFilter?R=this.table.modules.filter.filter(r.children):R=r.children,R.forEach(p=>{p instanceof Sh&&u.push(p)})),u}rowDeleting(e){var r=e.modules.dataTree;r&&r.children&&Array.isArray(r.children)&&r.children.forEach(u=>{u instanceof Sh&&u.wipe()})}rowDelete(e){var r=e.modules.dataTree.parent,u;r&&(u=this.findChildIndex(e,r),u!==!1&&r.data[this.field].splice(u,1),r.data[this.field].length||delete r.data[this.field],this.initializeRow(r),this.layoutRow(r)),this.refreshData(!0)}addTreeChildRow(e,r,u,R){var p=!1;typeof r=="string"&&(r=JSON.parse(r)),Array.isArray(e.data[this.field])||(e.data[this.field]=[],e.modules.dataTree.open=this.startOpen(e.getComponent(),e.modules.dataTree.index)),typeof R<"u"&&(p=this.findChildIndex(R,e),p!==!1&&e.data[this.field].splice(u?p:p+1,0,r)),p===!1&&(u?e.data[this.field].unshift(r):e.data[this.field].push(r)),this.initializeRow(e),this.layoutRow(e),this.refreshData(!0)}findChildIndex(e,r){var u=!1;return typeof e=="object"?e instanceof Sh?u=e.data:e instanceof Ew?u=e._getSelf().data:typeof HTMLElement<"u"&&e instanceof HTMLElement?r.modules.dataTree&&(u=r.modules.dataTree.children.find(R=>R instanceof Sh?R.element===e:!1),u&&(u=u.data)):e===null&&(u=!1):typeof e>"u"?u=!1:u=r.data[this.field].find(R=>R.data[this.table.options.index]==e),u&&(Array.isArray(r.data[this.field])&&(u=r.data[this.field].indexOf(u)),u==-1&&(u=!1)),u}getTreeChildren(e,r,u){var R=e.modules.dataTree,p=[];return R&&R.children&&(Array.isArray(R.children)||(R.children=this.generateChildren(e)),R.children.forEach(f=>{f instanceof Sh&&(p.push(r?f.getComponent():f),u&&this.getTreeChildren(f,r,u).forEach(n=>{p.push(n)}))})),p}getChildField(){return this.field}redrawNeeded(e){return(this.field?typeof e[this.field]<"u":!1)||(this.elementField?typeof e[this.elementField]<"u":!1)}}Ci(XL,"moduleName","dataTree");function fH(t,e={},r){var u=e.delimiter?e.delimiter:",",R=[],p=[];t.forEach(f=>{var n=[];switch(f.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":f.columns.forEach((l,c)=>{l&&l.depth===1&&(p[c]=typeof l.value>"u"||l.value===null?"":'"'+String(l.value).split('"').join('""')+'"')});break;case"row":f.columns.forEach(l=>{if(l){switch(typeof l.value){case"object":l.value=l.value!==null?JSON.stringify(l.value):"";break;case"undefined":l.value="";break}n.push('"'+String(l.value).split('"').join('""')+'"')}}),R.push(n.join(u));break}}),p.length&&R.unshift(p.join(u)),R=R.join(`
58
58
  `),e.bom&&(R="\uFEFF"+R),r(R,"text/csv")}function dH(t,e,r){var u=[];t.forEach(R=>{var p={};switch(R.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":R.columns.forEach(f=>{f&&(p[f.component.getTitleDownload()||f.component.getField()]=f.value)}),u.push(p);break}}),u=JSON.stringify(u,null," "),r(u,"application/json")}function pH(t,e={},r){var u=[],R=[],p={},f=e.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},n=e.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},l=e.jsPDF||{},c=e.title?e.title:"",i,_;l.orientation||(l.orientation=e.orientation||"landscape"),l.unit||(l.unit="pt"),t.forEach(w=>{switch(w.type){case"header":u.push(b(w));break;case"group":R.push(b(w,f));break;case"calc":R.push(b(w,n));break;case"row":R.push(b(w));break}});function b(w,v){var o=[];return w.columns.forEach(a=>{var h;if(a){switch(typeof a.value){case"object":a.value=a.value!==null?JSON.stringify(a.value):"";break;case"undefined":a.value="";break}h={content:a.value,colSpan:a.width,rowSpan:a.height},v&&(h.styles=v),o.push(h)}}),o}i=this.dependencyRegistry.lookup("jspdf","jsPDF"),_=new i(l),e.autoTable&&(typeof e.autoTable=="function"?p=e.autoTable(_)||{}:p=e.autoTable),c&&(p.didDrawPage=function(w){_.text(c,40,30)}),p.head=u,p.body=R,_.autoTable(p),e.documentProcessing&&e.documentProcessing(_),r(_.output("arraybuffer"),"application/pdf")}function mH(t,e,r){var u=this,R=e.sheetName||"Sheet1",p=this.dependencyRegistry.lookup("XLSX"),f=p.utils.book_new(),n=new ch(this),l="compress"in e?e.compress:!0,c=e.writeOptions||{bookType:"xlsx",bookSST:!0,compression:l},i;c.type="binary",f.SheetNames=[],f.Sheets={};function _(){var v=[],o=[],a={},h={s:{c:0,r:0},e:{c:t[0]?t[0].columns.reduce((s,m)=>s+(m&&m.width?m.width:1),0):0,r:t.length}};return t.forEach((s,m)=>{var y=[];s.columns.forEach(function(x,S){x?(y.push(!(x.value instanceof Date)&&typeof x.value=="object"?JSON.stringify(x.value):x.value),(x.width>1||x.height>-1)&&(x.height>1||x.width>1)&&o.push({s:{r:m,c:S},e:{r:m+x.height-1,c:S+x.width-1}})):y.push("")}),v.push(y)}),p.utils.sheet_add_aoa(a,v),a["!ref"]=p.utils.encode_range(h),o.length&&(a["!merges"]=o),a}if(e.sheetOnly){r(_());return}if(e.sheets)for(var b in e.sheets)e.sheets[b]===!0?(f.SheetNames.push(b),f.Sheets[b]=_()):(f.SheetNames.push(b),n.commsSend(e.sheets[b],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:u.active,intercept:function(v){f.Sheets[b]=v}}));else f.SheetNames.push(R),f.Sheets[R]=_();e.documentProcessing&&(f=e.documentProcessing(f));function w(v){for(var o=new ArrayBuffer(v.length),a=new Uint8Array(o),h=0;h!=v.length;++h)a[h]=v.charCodeAt(h)&255;return o}i=p.write(f,c),r(w(i),"application/octet-stream")}function gH(t,e,r){this.modExists("export",!0)&&r(this.modules.export.generateHTMLTable(t),"text/html")}function vH(t,e,r){const u=[];t.forEach(R=>{const p={};switch(R.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":R.columns.forEach(f=>{f&&(p[f.component.getTitleDownload()||f.component.getField()]=f.value)}),u.push(JSON.stringify(p));break}}),r(u.join(`
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "openms-insight"
7
- version = "0.1.11"
7
+ version = "0.1.12"
8
8
  description = "Interactive visualization components for mass spectrometry data in Streamlit"
9
9
  readme = "README.md"
10
10
  license = "BSD-3-Clause"
File without changes