jquery.dgtable 2.0.36 → 2.0.38

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.
@@ -1,3 +1,3 @@
1
- import e from"jquery";function t(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var r,n,i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},o={};function l(){if(n)return r;n=1;var e=function(e){return e&&e.Math===Math&&e};return r=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof i&&i)||e("object"==typeof r&&r)||function(){return this}()||Function("return this")()}var s,a,u,d,c,h,m,f,v={};function p(){return a?s:(a=1,s=function(e){try{return!!e()}catch(e){return!0}})}function g(){if(d)return u;d=1;var e=p();return u=!e(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})}function b(){if(h)return c;h=1;var e=p();return c=!e(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})}function C(){if(f)return m;f=1;var e=b(),t=Function.prototype.call;return m=e?t.bind(t):function(){return t.apply(t,arguments)},m}var w,y,W,S,_,x,R,I,N,E,k,P,F,T,z,M,A,L,H,O,D,$,j,B,V,q,U,X,Y,G,J,K,Q,Z,ee,te,re,ne,ie,oe,le,se={};function ae(){return W?y:(W=1,y=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function ue(){if(_)return S;_=1;var e=b(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return S=e?n:function(e){return function(){return r.apply(e,arguments)}},S}function de(){if(R)return x;R=1;var e=ue(),t=e({}.toString),r=e("".slice);return x=function(e){return r(t(e),8,-1)}}function ce(){return k?E:(k=1,E=function(e){return null==e})}function he(){if(F)return P;F=1;var e=ce(),t=TypeError;return P=function(r){if(e(r))throw new t("Can't call method on "+r);return r}}function me(){if(z)return T;z=1;var e=function(){if(N)return I;N=1;var e=ue(),t=p(),r=de(),n=Object,i=e("".split);return I=t(function(){return!n("z").propertyIsEnumerable(0)})?function(e){return"String"===r(e)?i(e,""):n(e)}:n}(),t=he();return T=function(r){return e(t(r))}}function fe(){if(A)return M;A=1;var e="object"==typeof document&&document.all;return M=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}function ve(){if(H)return L;H=1;var e=fe();return L=function(t){return"object"==typeof t?null!==t:e(t)}}function pe(){if(D)return O;D=1;var e=l(),t=fe();return O=function(r,n){return arguments.length<2?(i=e[r],t(i)?i:void 0):e[r]&&e[r][n];var i},O}function ge(){if(j)return $;j=1;var e=ue();return $=e({}.isPrototypeOf)}function be(){if(V)return B;V=1;var e=l().navigator,t=e&&e.userAgent;return B=t?String(t):""}function Ce(){if(U)return q;U=1;var e,t,r=l(),n=be(),i=r.process,o=r.Deno,s=i&&i.versions||o&&o.version,a=s&&s.v8;return a&&(t=(e=a.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!t&&n&&(!(e=n.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=n.match(/Chrome\/(\d+)/))&&(t=+e[1]),q=t}function we(){if(Y)return X;Y=1;var e=Ce(),t=p(),r=l().String;return X=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol("symbol detection");return!r(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41})}function ye(){if(J)return G;J=1;var e=we();return G=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function We(){if(Q)return K;Q=1;var e=pe(),t=fe(),r=ge(),n=ye(),i=Object;return K=n?function(e){return"symbol"==typeof e}:function(n){var o=e("Symbol");return t(o)&&r(o.prototype,i(n))}}function Se(){if(ee)return Z;ee=1;var e=String;return Z=function(t){try{return e(t)}catch(e){return"Object"}}}function _e(){if(re)return te;re=1;var e=fe(),t=Se(),r=TypeError;return te=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")}}function xe(){if(ie)return ne;ie=1;var e=_e(),t=ce();return ne=function(r,n){var i=r[n];return t(i)?void 0:e(i)},ne}function Re(){if(le)return oe;le=1;var e=C(),t=fe(),r=ve(),n=TypeError;return oe=function(i,o){var l,s;if("string"===o&&t(l=i.toString)&&!r(s=e(l,i)))return s;if(t(l=i.valueOf)&&!r(s=e(l,i)))return s;if("string"!==o&&t(l=i.toString)&&!r(s=e(l,i)))return s;throw new n("Can't convert object to primitive value")}}var Ie,Ne,Ee,ke,Pe,Fe,Te,ze,Me,Ae,Le,He,Oe,De,$e,je,Be,Ve,qe,Ue,Xe,Ye,Ge,Je,Ke={exports:{}};function Qe(){if(ke)return Ee;ke=1;var e=l(),t=Object.defineProperty;return Ee=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch(t){e[r]=n}return n}}function Ze(){if(Pe)return Ke.exports;Pe=1;var e=Ne?Ie:(Ne=1,Ie=!1),t=l(),r=Qe(),n="__core-js_shared__",i=Ke.exports=t[n]||r(n,{});return(i.versions||(i.versions=[])).push({version:"3.48.0",mode:e?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.48.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Ke.exports}function et(){if(Te)return Fe;Te=1;var e=Ze();return Fe=function(t,r){return e[t]||(e[t]=r||{})}}function tt(){if(Me)return ze;Me=1;var e=he(),t=Object;return ze=function(r){return t(e(r))}}function rt(){if(Le)return Ae;Le=1;var e=ue(),t=tt(),r=e({}.hasOwnProperty);return Ae=Object.hasOwn||function(e,n){return r(t(e),n)}}function nt(){if(Oe)return He;Oe=1;var e=ue(),t=0,r=Math.random(),n=e(1.1.toString);return He=function(e){return"Symbol("+(void 0===e?"":e)+")_"+n(++t+r,36)}}function it(){if($e)return De;$e=1;var e=l(),t=et(),r=rt(),n=nt(),i=we(),o=ye(),s=e.Symbol,a=t("wks"),u=o?s.for||s:s&&s.withoutSetter||n;return De=function(e){return r(a,e)||(a[e]=i&&r(s,e)?s[e]:u("Symbol."+e)),a[e]}}function ot(){if(Be)return je;Be=1;var e=C(),t=ve(),r=We(),n=xe(),i=Re(),o=it(),l=TypeError,s=o("toPrimitive");return je=function(o,a){if(!t(o)||r(o))return o;var u,d=n(o,s);if(d){if(void 0===a&&(a="default"),u=e(d,o,a),!t(u)||r(u))return u;throw new l("Can't convert object to primitive value")}return void 0===a&&(a="number"),i(o,a)}}function lt(){if(qe)return Ve;qe=1;var e=ot(),t=We();return Ve=function(r){var n=e(r,"string");return t(n)?n:n+""}}function st(){if(Ge)return Ye;Ge=1;var e=g(),t=p(),r=function(){if(Xe)return Ue;Xe=1;var e=l(),t=ve(),r=e.document,n=t(r)&&t(r.createElement);return Ue=function(e){return n?r.createElement(e):{}}}();return Ye=!e&&!t(function(){return 7!==Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a})}function at(){if(Je)return v;Je=1;var e=g(),t=C(),r=function(){if(w)return se;w=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return se.f=r?function(e){var r=t(this,e);return!!r&&r.enumerable}:e,se}(),n=ae(),i=me(),o=lt(),l=rt(),s=st(),a=Object.getOwnPropertyDescriptor;return v.f=e?a:function(e,u){if(e=i(e),u=o(u),s)try{return a(e,u)}catch(e){}if(l(e,u))return n(!t(r.f,e,u),e[u])},v}var ut,dt,ct,ht,mt,ft,vt,pt={};function gt(){if(ht)return ct;ht=1;var e=ve(),t=String,r=TypeError;return ct=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")}}function bt(){if(mt)return pt;mt=1;var e=g(),t=st(),r=function(){if(dt)return ut;dt=1;var e=g(),t=p();return ut=e&&t(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})}(),n=gt(),i=lt(),o=TypeError,l=Object.defineProperty,s=Object.getOwnPropertyDescriptor,a="enumerable",u="configurable",d="writable";return pt.f=e?r?function(e,t,r){if(n(e),t=i(t),n(r),"function"==typeof e&&"prototype"===t&&"value"in r&&d in r&&!r[d]){var o=s(e,t);o&&o[d]&&(e[t]=r.value,r={configurable:u in r?r[u]:o[u],enumerable:a in r?r[a]:o[a],writable:!1})}return l(e,t,r)}:l:function(e,r,s){if(n(e),r=i(r),n(s),t)try{return l(e,r,s)}catch(e){}if("get"in s||"set"in s)throw new o("Accessors not supported");return"value"in s&&(e[r]=s.value),e},pt}function Ct(){if(vt)return ft;vt=1;var e=g(),t=bt(),r=ae();return ft=e?function(e,n,i){return t.f(e,n,r(1,i))}:function(e,t,r){return e[t]=r,e}}var wt,yt,Wt,St,_t,xt,Rt,It,Nt,Et,kt,Pt,Ft,Tt,zt,Mt={exports:{}};function At(){if(St)return Wt;St=1;var e=ue(),t=fe(),r=Ze(),n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(e){return n(e)}),Wt=r.inspectSource}function Lt(){if(It)return Rt;It=1;var e=et(),t=nt(),r=e("keys");return Rt=function(e){return r[e]||(r[e]=t(e))}}function Ht(){return Et?Nt:(Et=1,Nt={})}function Ot(){if(Ft)return Mt.exports;Ft=1;var e=ue(),t=p(),r=fe(),n=rt(),i=g(),o=function(){if(yt)return wt;yt=1;var e=g(),t=rt(),r=Function.prototype,n=e&&Object.getOwnPropertyDescriptor,i=t(r,"name"),o=i&&"something"===function(){}.name,l=i&&(!e||e&&n(r,"name").configurable);return wt={EXISTS:i,PROPER:o,CONFIGURABLE:l}}().CONFIGURABLE,s=At(),a=function(){if(Pt)return kt;Pt=1;var e,t,r,n=function(){if(xt)return _t;xt=1;var e=l(),t=fe(),r=e.WeakMap;return _t=t(r)&&/native code/.test(String(r))}(),i=l(),o=ve(),s=Ct(),a=rt(),u=Ze(),d=Lt(),c=Ht(),h="Object already initialized",m=i.TypeError,f=i.WeakMap;if(n||u.state){var v=u.state||(u.state=new f);v.get=v.get,v.has=v.has,v.set=v.set,e=function(e,t){if(v.has(e))throw new m(h);return t.facade=e,v.set(e,t),t},t=function(e){return v.get(e)||{}},r=function(e){return v.has(e)}}else{var p=d("state");c[p]=!0,e=function(e,t){if(a(e,p))throw new m(h);return t.facade=e,s(e,p,t),t},t=function(e){return a(e,p)?e[p]:{}},r=function(e){return a(e,p)}}return kt={set:e,get:t,has:r,enforce:function(n){return r(n)?t(n):e(n,{})},getterFor:function(e){return function(r){var n;if(!o(r)||(n=t(r)).type!==e)throw new m("Incompatible receiver, "+e+" required");return n}}}}(),u=a.enforce,d=a.get,c=String,h=Object.defineProperty,m=e("".slice),f=e("".replace),v=e([].join),b=i&&!t(function(){return 8!==h(function(){},"length",{value:8}).length}),C=String(String).split("String"),w=Mt.exports=function(e,t,r){"Symbol("===m(c(t),0,7)&&(t="["+f(c(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!n(e,"name")||o&&e.name!==t)&&(i?h(e,"name",{value:t,configurable:!0}):e.name=t),b&&r&&n(r,"arity")&&e.length!==r.arity&&h(e,"length",{value:r.arity});try{r&&n(r,"constructor")&&r.constructor?i&&h(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var l=u(e);return n(l,"source")||(l.source=v(C,"string"==typeof t?t:"")),e};return Function.prototype.toString=w(function(){return r(this)&&d(this).source||s(this)},"toString"),Mt.exports}function Dt(){if(zt)return Tt;zt=1;var e=fe(),t=bt(),r=Ot(),n=Qe();return Tt=function(i,o,l,s){s||(s={});var a=s.enumerable,u=void 0!==s.name?s.name:o;if(e(l)&&r(l,u,s),s.global)a?i[o]=l:n(o,l);else{try{s.unsafe?i[o]&&(a=!0):delete i[o]}catch(e){}a?i[o]=l:t.f(i,o,{value:l,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return i},Tt}var $t,jt,Bt,Vt,qt,Ut,Xt,Yt,Gt,Jt,Kt,Qt,Zt,er,tr,rr,nr,ir={};function or(){if(Vt)return Bt;Vt=1;var e=function(){if(jt)return $t;jt=1;var e=Math.ceil,t=Math.floor;return $t=Math.trunc||function(r){var n=+r;return(n>0?t:e)(n)},$t}();return Bt=function(t){var r=+t;return r!=r||0===r?0:e(r)}}function lr(){if(Ut)return qt;Ut=1;var e=or(),t=Math.max,r=Math.min;return qt=function(n,i){var o=e(n);return o<0?t(o+i,0):r(o,i)}}function sr(){if(Yt)return Xt;Yt=1;var e=or(),t=Math.min;return Xt=function(r){var n=e(r);return n>0?t(n,9007199254740991):0}}function ar(){if(Jt)return Gt;Jt=1;var e=sr();return Gt=function(t){return e(t.length)}}var ur,dr,cr,hr,mr,fr,vr,pr,gr,br,Cr,wr,yr,Wr,Sr,_r,xr,Rr,Ir={};function Nr(){if(cr)return dr;cr=1;var e=pe(),t=ue(),r=function(){if(nr)return ir;nr=1;var e=function(){if(er)return Zt;er=1;var e=ue(),t=rt(),r=me(),n=function(){if(Qt)return Kt;Qt=1;var e=me(),t=lr(),r=ar(),n=function(n){return function(i,o,l){var s=e(i),a=r(s);if(0===a)return!n&&-1;var u,d=t(l,a);if(n&&o!=o){for(;a>d;)if((u=s[d++])!=u)return!0}else for(;a>d;d++)if((n||d in s)&&s[d]===o)return n||d||0;return!n&&-1}};return Kt={includes:n(!0),indexOf:n(!1)}}().indexOf,i=Ht(),o=e([].push);return Zt=function(e,l){var s,a=r(e),u=0,d=[];for(s in a)!t(i,s)&&t(a,s)&&o(d,s);for(;l.length>u;)t(a,s=l[u++])&&(~n(d,s)||o(d,s));return d},Zt}(),t=(rr?tr:(rr=1,tr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])).concat("length","prototype");return ir.f=Object.getOwnPropertyNames||function(r){return e(r,t)},ir}(),n=(ur||(ur=1,Ir.f=Object.getOwnPropertySymbols),Ir),i=gt(),o=t([].concat);return dr=e("Reflect","ownKeys")||function(e){var t=r.f(i(e)),l=n.f;return l?o(t,l(e)):t}}function Er(){if(mr)return hr;mr=1;var e=rt(),t=Nr(),r=at(),n=bt();return hr=function(i,o,l){for(var s=t(o),a=n.f,u=r.f,d=0;d<s.length;d++){var c=s[d];e(i,c)||l&&e(l,c)||a(i,c,u(o,c))}}}function kr(){if(gr)return pr;gr=1;var e=l(),t=at().f,r=Ct(),n=Dt(),i=Qe(),o=Er(),s=function(){if(vr)return fr;vr=1;var e=p(),t=fe(),r=/#|\.prototype\./,n=function(r,n){var a=o[i(r)];return a===s||a!==l&&(t(n)?e(n):!!n)},i=n.normalize=function(e){return String(e).replace(r,".").toLowerCase()},o=n.data={},l=n.NATIVE="N",s=n.POLYFILL="P";return fr=n}();return pr=function(l,a){var u,d,c,h,m,f=l.target,v=l.global,p=l.stat;if(u=v?e:p?e[f]||i(f,{}):e[f]&&e[f].prototype)for(d in a){if(h=a[d],c=l.dontCallGetSet?(m=t(u,d))&&m.value:u[d],!s(v?d:f+(p?".":"#")+d,l.forced)&&void 0!==c){if(typeof h==typeof c)continue;o(h,c)}(l.sham||c&&c.sham)&&r(h,"sham",!0),n(u,d,h,l)}}}function Pr(){if(yr)return wr;yr=1;var e=function(){if(Cr)return br;Cr=1;var e={};return e[it()("toStringTag")]="z",br="[object z]"===String(e)}(),t=fe(),r=de(),n=it()("toStringTag"),i=Object,o="Arguments"===r(function(){return arguments}());return wr=e?r:function(e){var l,s,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(s=function(e,t){try{return e[t]}catch(e){}}(l=i(e),n))?s:o?r(l):"Object"===(a=r(l))&&t(l.callee)?"Arguments":a},wr}function Fr(){if(Sr)return Wr;Sr=1;var e=Pr(),t=String;return Wr=function(r){if("Symbol"===e(r))throw new TypeError("Cannot convert a Symbol value to a string");return t(r)}}function Tr(){if(xr)return _r;xr=1;var e=Ot(),t=bt();return _r=function(r,n,i){return i.get&&e(i.get,n,{getter:!0}),i.set&&e(i.set,n,{setter:!0}),t.f(r,n,i)}}!function(){if(Rr)return o;Rr=1;var e=kr(),t=g(),r=l(),n=ue(),i=rt(),s=fe(),a=ge(),u=Fr(),d=Tr(),c=Er(),h=r.Symbol,m=h&&h.prototype;if(t&&s(h)&&(!("description"in m)||void 0!==h().description)){var f={},v=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:u(arguments[0]),t=a(m,this)?new h(e):void 0===e?h():h(e);return""===e&&(f[t]=!0),t};c(v,h),v.prototype=m,m.constructor=v;var p="Symbol(description detection)"===String(h("description detection")),b=n(m.valueOf),C=n(m.toString),w=/^Symbol\((.*)\)[^)]+$/,y=n("".replace),W=n("".slice);d(m,"description",{configurable:!0,get:function(){var e=b(this);if(i(f,e))return"";var t=C(e),r=p?W(t,7,-1):y(t,w,"$1");return""===r?void 0:r}}),e({global:!0,constructor:!0,forced:!0},{Symbol:v})}}();var zr,Mr,Ar,Lr,Hr,Or,Dr,$r,jr,Br,Vr,qr,Ur,Xr,Yr,Gr={};function Jr(){if(Mr)return zr;Mr=1;var e=Se(),t=TypeError;return zr=function(r,n){if(!delete r[n])throw new t("Cannot delete property "+e(n)+" of "+e(r))},zr}function Kr(){if(Lr)return Ar;Lr=1;var e=ue();return Ar=e([].slice)}function Qr(){if($r)return Dr;$r=1;var e=p();return Dr=function(t,r){var n=[][t];return!!n&&e(function(){n.call(null,r||function(){return 1},1)})}}let Zr;!function(){if(Yr)return Gr;Yr=1;var e=kr(),t=ue(),r=_e(),n=tt(),i=ar(),o=Jr(),l=Fr(),s=p(),a=function(){if(Or)return Hr;Or=1;var e=Kr(),t=Math.floor,r=function(n,i){var o=n.length;if(o<8)for(var l,s,a=1;a<o;){for(s=a,l=n[a];s&&i(n[s-1],l)>0;)n[s]=n[--s];s!==a++&&(n[s]=l)}else for(var u=t(o/2),d=r(e(n,0,u),i),c=r(e(n,u),i),h=d.length,m=c.length,f=0,v=0;f<h||v<m;)n[f+v]=f<h&&v<m?i(d[f],c[v])<=0?d[f++]:c[v++]:f<h?d[f++]:c[v++];return n};return Hr=r}(),u=Qr(),d=function(){if(Br)return jr;Br=1;var e=be().match(/firefox\/(\d+)/i);return jr=!!e&&+e[1]}(),c=function(){if(qr)return Vr;qr=1;var e=be();return Vr=/MSIE|Trident/.test(e)}(),h=Ce(),m=function(){if(Xr)return Ur;Xr=1;var e=be().match(/AppleWebKit\/(\d+)\./);return Ur=!!e&&+e[1]}(),f=[],v=t(f.sort),g=t(f.push),b=s(function(){f.sort(void 0)}),C=s(function(){f.sort(null)}),w=u("sort"),y=!s(function(){if(h)return h<70;if(!(d&&d>3)){if(c)return!0;if(m)return m<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)f.push({k:t+n,v:r})}for(f.sort(function(e,t){return t.v-e.v}),n=0;n<f.length;n++)t=f[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}});e({target:"Array",proto:!0,forced:b||!C||!w||!y},{sort:function(e){void 0!==e&&r(e);var t=n(this);if(y)return void 0===e?v(t):v(t,e);var s,u,d=[],c=i(t);for(u=0;u<c;u++)u in t&&g(d,t[u]);for(a(d,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:l(t)>l(r)?1:-1}}(e)),s=i(d),u=0;u<s;)t[u]=d[u++];for(;u<c;)o(t,u++);return t}})}();const en=()=>{const e=document.createElement("div");e.dir="rtl",Object.assign(e.style,{direction:"rtl",fontSize:"14px",width:"1px",height:"1px",position:"absolute",top:"-1000px",overflow:"scroll"}),e.textContent="A",document.body.appendChild(e);let t="reverse";return e.scrollLeft>0?t="default":(e.scrollLeft=1,0===Math.floor(e.scrollLeft)&&(t="negative")),e.parentNode.removeChild(e),t};function tn(e,t){if(void 0===t&&(t="rtl"===getComputedStyle(e).direction),!0===t&&void 0===Zr&&(Zr=en()),!t)return e.scrollLeft;switch(Zr){case"negative":return e.scrollLeft+e.scrollWidth-e.clientWidth;case"reverse":return e.scrollWidth-e.scrollLeft-e.clientWidth;default:return e.scrollLeft}}function rn(e,t,r){e.scrollLeft=function(e,t,r){return void 0===r&&(r="rtl"===getComputedStyle(e).direction),function(e,t,r){if(void 0===r&&(r="rtl"===getComputedStyle(e).direction),!0===r&&void 0===Zr&&(Zr=en()),!r)return t;switch(Zr){case"negative":return t-e.scrollWidth+e.clientWidth;case"reverse":return e.scrollWidth-t-e.clientWidth;default:return t}}(e,r?e.scrollWidth-e.clientWidth-t:t,r)}(e,t,r)}const nn=function(e,t){for(let[r,n]of Object.entries(t))e.style[r]=null==n?"":String(n)},on=function(e,t,r,n,i){return(...o)=>{let l,s,a,u,d=o[0];if(e?(l=o[1],s=!!o[2],a=!!o[3],u=!!o[4]):(s=!!o[1],a=!!o[2],u=!!o[3]),d===window)return d.document.documentElement[`client${r}`];if(9===d.nodeType){const e=d.documentElement,t=d.body;return Math.max(t[`scroll${r}`],e[`scroll${r}`],t[`offset${r}`],e[`offset${r}`],e[`client${r}`])}{let o,c,h=!1,m=!1;if(!e&&"getBoundingClientRect"in d&&(o=d.getBoundingClientRect()[t],h=!0,m=!0),(void 0===o||u||h!==s||m!==a)&&(c=e?getComputedStyle(d,l):getComputedStyle(d)),void 0===o){let e=c[t];"auto"===e?(o=d[`client${r}`],h=!0):o=parseFloat(e),"border-box"===c.boxSizing&&(h=!0,m=!0)}if(s!==h){let e=parseFloat(c[`padding-${n}`]||0)+parseFloat(c[`padding-${i}`]||0);s?o+=e:o-=e}if(a!==m){let e=parseFloat(c[`border-${n}-width`]||0)+parseFloat(c[`border-${i}-width`]||0);a?o+=e:o-=e}return o<0&&(o=0),u&&(o+=parseFloat(c[`margin-${n}`]||0)+parseFloat(c[`margin-${i}`]||0)),o}}},ln=on(!1,"width","Width","left","right"),sn=on(!1,"height","Height","top","bottom"),an=(un="left",dn="right",(e,t,r=!1,n=!1,i=!1)=>{if(e===window)return;if(9===e.nodeType)return;const o=getComputedStyle(e);let l=!1;if("border-box"===o.boxSizing&&(l=!0),r=!!r,n=!!n,(i=!!i)&&(t-=(parseFloat(o[`margin-${un}`])||0)+(parseFloat(o[`margin-${dn}`])||0)),r!==l){let e=parseFloat(o[`padding-${un}`]||0)+parseFloat(o[`padding-${dn}`]||0);r?t-=e:t+=e}if(n!==l){let e=(parseFloat(o[`border-${un}-width`])||0)+(parseFloat(o[`border-${dn}-width`])||0);n?t-=e:t+=e}t<0&&(t=0),e.style.width=t+"px"});var un,dn;const cn=e=>{if(!e.getClientRects().length)return{top:0,left:0};let t=e.getBoundingClientRect(),r=e.ownerDocument.defaultView;return{top:t.top+r.pageYOffset,left:t.left+r.pageXOffset}};let hn=null;const mn=function(e,t){if(null===hn&&(()=>{try{document.createElement("div").querySelector(":scope > div"),hn=!0}catch(e){hn=!1}})(),!0===hn)return e.querySelectorAll(t.replace(/((?:^|,)\s*)/g,"$1:scope "));{let r=e.id;const n="ID_"+Date.now();e.id=n,t=t.replace(/((?:^|,)\s*)/g,"$1#"+n);try{return e.querySelectorAll(t)}finally{this.id=r}}};class fn{constructor(){this._events=[]}add(e,t,r,n){let i=t.split("."),o=i[0],l=i[1];e.addEventListener(o,r,n||!1);let s=!0===n||"object"==typeof n&&!0===n.capture;return this._events.push({el:e,name:o,namespace:l,handler:r,useCapture:s}),this}remove(e,t,r,n){let i=t?t.split("."):"",o=i[0],l=i[1],s=!0===n||"object"==typeof n&&!0===n.capture,a=[],u=[];if(e||o||l||r||void 0!==n)for(let t of this._events)e&&t.el!==e||o&&t.name!==o||l&&t.namespace!==l||r&&t.handler!==r||void 0!==n&&t.useCapture!==s?a.push(t):u.push(t);else u=this._events;this._events=a;for(let e of u)e.el.removeEventListener(e.name,e.handler,e.useCapture);return this}}const vn=Object.prototype.hasOwnProperty,pn=void 0!==Element.prototype.insertAdjacentElement;function gn(e,t,r){t?!1===pn||e instanceof DocumentFragment?r.insertBefore(e,t):t.insertAdjacentElement("beforebegin",e):r.appendChild(e)}function bn(e,t,r,n){return e.parentNode!==n?(t||(t=document.createDocumentFragment()),t.appendChild(e)):(t&&t.childNodes.length>0&&(gn(t,r,n),t=null),e.nextSibling!==r&&gn(e,r,n)),t}const Cn=Symbol("destroyed");class wn{constructor(e){var t;const r=this._p={list:e.list||null,hookScrollEvent:void 0===e.hookScrollEvent||!!e.hookScrollEvent,count:e.count||0,virtual:void 0===e.virtual||!!e.virtual,userItemsParent:e.itemsParent||null,setVirtualWrapperWidth:null===(t=e.autoVirtualWrapperWidth)||void 0===t||t,estimatedItemHeight:20,buffer:5,itemHeightEstimatorFn:null,itemElementCreatorFn:Sn,onItemRender:null,onItemUnrender:null,onScrollHeightChange:null,virtualWrapper:null,currentItemsParent:null,cachedItemHeights:[],cachedItemEstimatedHeights:[],cachedItemPositions:[],itemPositionsNeedsUpdate:0,boundRender:this.render.bind(this),existingEls:[]};r.currentItemsParent=r.userItemsParent||r.list,this._hookEvents(),"number"==typeof e.count&&this.setCount(e.count),"boolean"==typeof e.virtual&&this.setVirtual(e.virtual),"number"==typeof e.estimatedItemHeight&&this.setEstimatedItemHeight(e.estimatedItemHeight),"number"==typeof e.buffer&&this.setBuffer(e.buffer),"function"==typeof e.itemHeightEstimatorFn&&this.setItemHeightEstimatorFn(e.itemHeightEstimatorFn),"function"==typeof e.itemElementCreatorFn&&this.setItemElementCreatorFn(e.itemElementCreatorFn),"function"==typeof e.onItemRender&&this.setOnItemRender(e.onItemRender),"function"==typeof e.onItemUnrender&&this.setOnItemUnrender(e.onItemUnrender),"function"==typeof e.onScrollHeightChange&&this.setOnScrollHeightChange(e.onScrollHeightChange)}destroy(){this[Cn]||(this[Cn]=!0,this._unhookEvents().invalidate()._destroyElements())}setHookScrollEvent(e){const t=this._p;return e=void 0===e||!!e,t.hookScrollEvent===e||(t.hookScrollEvent=e,this._unhookEvents()._hookEvents()),this}isHookScrollEventEnabled(){return this._p.hookScrollEvent}setCount(e){return this._p.count=e,this.invalidate()}getCount(){return this._p.count}setVirtual(e){const t=this._p;return e=void 0===e||!!e,t.virtual===e||(t.virtual=e,this._hookEvents().invalidate()._destroyElements()),this}isVirtual(){return this._p.virtual}setEstimatedItemHeight(e){return this._p.estimatedItemHeight=Math.abs(("number"==typeof e?e:Number(e))||20),this}getEstimatedItemHeight(){return this._p.estimatedItemHeight}setAutoVirtualWrapperWidth(e){const t=this._p;return t.autoVirtualWrapperWidth=void 0===e||!!e,t.virtualWrapper&&t.autoVirtualWrapperWidth!==t.virtualWrapperWidthWasSet&&(t.virtualWrapper.style.width=t.autoVirtualWrapperWidth?"100%":"",t.virtualWrapperWidthWasSet=t.autoVirtualWrapperWidth),this}isAutoVirtualWrapperWidth(){return this._p.autoVirtualWrapperWidth}setBuffer(e){return this._p.buffer=Math.abs("number"==typeof e?e:Number(e)||5),this}getBuffer(){return this._p.buffer}setItemHeightEstimatorFn(e){return this._p.itemHeightEstimatorFn=e,this}setItemElementCreatorFn(e){return this._p.itemElementCreatorFn=e||Sn,this}setOnItemRender(e){return this._p.onItemRender=e,this}setOnItemUnrender(e){return this._p.onItemUnrender=e,this}setOnScrollHeightChange(e){return this._p.onScrollHeightChange=e,this}estimateFullHeight(){const e=this._p;if(0===e.count)return 0;if(e.virtual)return this._calculateItemPosition(e.count)||0;{const t=e.existingEls;if(e.count===t.length){let e=t[0].getBoundingClientRect(),r=t[t.length-1].getBoundingClientRect();return r.top-e.top+r.height}return this._calculateItemPosition(e.count)||0}}invalidatePositions(){const e=this._p;return e.itemPositionsNeedsUpdate=0,e.cachedItemHeights=[],e.cachedItemEstimatedHeights=[],e.cachedItemPositions=[],e.cachedItemHeights.length=e.count,e.cachedItemEstimatedHeights.length=e.count,e.cachedItemPositions.length=e.count,this}invalidate(){const e=this._p;this.invalidatePositions(),e.virtual||this._destroyElements();for(let t of e.existingEls)delete t[yn];return this}render(){if(this[Cn])return;const e=this._p,t=e.list,r=e.virtual;let n=e.virtualWrapper,i=e.currentItemsParent,o=t.scrollTop,l=o+t.clientHeight,s=e.count,a=e.buffer,u=e.onItemUnrender,d=e.existingEls,c=d.length;if(r){const r=t.clientWidth;n||(n=e.virtualWrapper=e.userItemsParent,n||(n=e.virtualWrapper=document.createElement("div"),t.appendChild(n)),this._resetCurrentItemsParent(),i=e.currentItemsParent,e.autoVirtualWrapperWidth?(n.style.width="100%",e.virtualWrapperWidthWasSet=!0):e.virtualWrapperWidthWasSet=!1);for(let e=0;e<c;e++)d[e][Wn]=!0;this._calculateItemPosition(e.count-1);let u=this._getExistingElsRange(),m=_n(e.cachedItemPositions,o),f=Math.max(0,m-a),v=f,p=this._calculateItemPosition(v),g=a,b=Math.max(v,_n(e.cachedItemPositions,l-1)+1+a),C=[],w=null,y=n.childNodes[0];const W=function(e){let t;return-1!==u.firstIndex&&e>=u.firstIndex&&e<=u.lastIndex&&(t=d.find(t=>t[yn]===e&&!0===t[Wn])),void 0===t&&(t=(u.firstIndex<f||u.firstValidArrayIndex>0?d.find(e=>(e[yn]<f||!1===vn.call(e,yn))&&!0===e[Wn]):void 0)||Rn(d,e=>!0===e[Wn])),void 0!==t&&delete t[Wn],t};for(;v<s&&v<b;v++){let e=W(v);y&&y===e&&(y=y.nextSibling);const t=this._dequeueElementForIndex(e,v,y,!0);C.push([t,v]),w=bn(t,w,y,i)}w&&w.childNodes.length>0&&gn(w,y,i);for(let t of C){const r=t[1];this._insertItemAndFlow(t[0],r,!1),p=e.cachedItemPositions[r]+e.cachedItemHeights[r]}if(p<l)for(;(p<l||g-- >0)&&v<s;v++){let t=W(v);y&&y===t&&(y=y.nextSibling),this._dequeueElementForIndex(t,v,y,!1),p=e.cachedItemPositions[v]+e.cachedItemHeights[v]}let S=this.estimateFullHeight(),_=S+"px";var h;n.style.height!==_&&(n.style.height=_,null===(h=e.onScrollHeightChange)||void 0===h||h.call(e,S)),r!==t.clientWidth&&this.render()}else if(s!==d.length){for(let e=0;e<c;e++)d[e][Wn]=!0;let e=i.childNodes[0],t=null;for(let r=0;r<s;r++){let n=d.find(e=>e[yn]===r&&!0===e[Wn]);void 0!==n&&delete n[Wn],e&&e===n&&(e=e.nextSibling),t=bn(this._dequeueElementForIndex(n,r,e,!0),t,e,i)}t&&t.childNodes.length>0&&gn(t,e,i)}c=d.length;for(let e=0;e<c;e++){const t=d[e];if(!0!==t[Wn])continue;let r=t.parentNode;r&&r.removeChild(t),u&&void 0!==t[yn]&&u(t),d.splice(e,1),e--,c--}}addItemsAt(e,t=-1){if("number"!=typeof e||e<=0)return this;const r=this._p;if((t<0||t>=r.count)&&(t=r.count),r.count+=e,r.virtual)t>=0&&t<r.count&&this._invalidateItemIndexesAt(t,-1);else{let n=r.existingEls;if(n.length!==r.count-e)return this;let i=this._getExistingElsRange();if(-1===i.firstValidArrayIndex)return this;const o=r.currentItemsParent;let l=i.firstValidArrayIndex+t-i.firstIndex;this._pushItemIndexesAt(t,e);let s=n[l-1]?n[l-1].nextSibling:n[0],a=null;for(let r=t,n=t+e;r<n;r++)a=bn(this._dequeueElementForIndex(void 0,r,s,!0),a,s,o);a&&a.childNodes.length>0&&gn(a,s,o)}return this}removeItemsAt(e,t){const r=this._p;if("number"!=typeof e||"number"!=typeof t||e<=0||t<0||t>=r.count)return this;if(r.count-=Math.min(e,r.count-t),r.virtual)this._invalidateItemIndexesAt(t,-1);else{let n=r.existingEls;if(n.length!==r.count+e)return this;let i=this._getExistingElsRange();if(-1===i.firstValidArrayIndex)return this;this._pushItemIndexesAt(t+e,-e);const o=r.onItemUnrender;let l=i.firstValidArrayIndex+t-i.firstIndex;if(l<n.length){for(let t=0;t<e;t++){let e=n[l+t],r=e.parentNode;r&&r.removeChild(e),o&&void 0!==e[yn]&&o(e)}n.splice(l,e)}}return this}refreshItemAt(e){const t=this._p;if("number"!=typeof e||e<0||e>=t.count)return this;if(t.virtual)this._invalidateItemIndexesAt(e,1);else{let r=t.existingEls;if(r.length!==t.count)return this;let n=this._getExistingElsRange();if(e>=n.firstIndex&&e<=n.lastIndex){let t=r[n.firstValidArrayIndex+e-n.firstIndex];delete t[yn],this._dequeueElementForIndex(t,e,t.nextSibling,!1)}}return this}isItemRendered(e){const t=this._p;if("number"!=typeof e||e<0||e>=t.count)return!1;let r=this._getExistingElsRange();return e>=r.firstIndex&&e<=r.lastIndex}getItemElementAt(e){const t=this._p;if("number"!=typeof e||e<0||e>=t.count)return;let r=t.existingEls,n=this._getExistingElsRange();return e>=n.firstIndex&&e<=n.lastIndex?r[n.firstValidArrayIndex+e-n.firstIndex]:void 0}getItemPosition(e){const t=this._p;if(!("number"!=typeof e||e<0||e>=t.count)){if(t.virtual)return this._calculateItemPosition(e);{let r=this.getItemElementAt(e);if(void 0===r)return;const n=t.list;return cn(r).top-cn(n).top+n.scrollTop}}}getItemIndexFromElement(e){return e?e[yn]:void 0}getItemSize(e){const t=this._p;if("number"!=typeof e||e<0||e>=t.count)return;let r=t.cachedItemHeights[e-1];return void 0===r&&(r=t.itemHeightEstimatorFn?t.itemHeightEstimatorFn(e-1):null,"number"!=typeof r&&(r=t.estimatedItemHeight),t.cachedItemEstimatedHeights[e-1]=r),r}getVisibleItemCount(){const e=this._p,t=e.list;let r,n,i=t.scrollTop,o=t.clientHeight;if(e.virtual)r=_n(e.cachedItemPositions,i),n=_n(e.cachedItemPositions,i+o,r);else{const t=e=>{let t=this.getItemPosition(e);return void 0===t&&(t=1/0),t};r=xn(e.count,t,i),n=xn(e.count,t,i+o,r)}return this.getItemPosition(n)===i+o&&n--,n-r+1}createGhostItemElement(e,t,r){const n=this._p;let i=this._dequeueElementForIndex(null,e,!1,!0);try{t&&n.currentItemsParent.appendChild(i),r(i)}finally{if(t){let e=i.parentNode;e&&e.removeChild(i)}n.onItemUnrender&&n.onItemUnrender(i)}}_resetCurrentItemsParent(){var e,t;const r=this._p;r.currentItemsParent=null!==(e=null!==(t=r.virtualWrapper)&&void 0!==t?t:r.userItemsParent)&&void 0!==e?e:r.list}_destroyElements(){const e=this._p,t=e.onItemUnrender,r=e.existingEls;for(let e=0;e<r.length;e++){const n=r[e];let i=n.parentNode;i&&i.removeChild(n),t&&void 0!==n[yn]&&t(n)}return r.length=0,e.virtualWrapper&&(e.virtualWrapper!==e.userItemsParent&&e.virtualWrapper.parentNode&&e.virtualWrapper.parentNode.removeChild(e.virtualWrapper),e.virtualWrapper=null,this._resetCurrentItemsParent()),this}_invalidateItemIndexesAt(e,t){const r=this._p;this._setItemPositionsNeedsUpdate(e);let n=r.existingEls,i=n.length,o=this._getExistingElsRange();if(-1!==o.firstValidArrayIndex&&(-1===t&&(t=n.length),e>=o.firstIndex&&e<=o.lastIndex))for(let r=o.firstValidArrayIndex+e-o.firstIndex,l=0;r<i&&l<t;r++,l++)delete n[r][yn]}_pushItemIndexesAt(e,t){let r=this._p.existingEls,n=r.length,i=this._getExistingElsRange();if(-1!==i.firstValidArrayIndex&&e>=i.firstIndex&&e<=i.lastIndex)for(let o=i.firstValidArrayIndex+e-i.firstIndex;o<n;o++)r[o][yn]+=t}_hookEvents(){const e=this._p;return this._unhookEvents(),e.virtual&&e.hookScrollEvent&&e.list&&e.list.addEventListener("scroll",e.boundRender),this}_unhookEvents(){const e=this._p;return e.list&&e.list.removeEventListener("scroll",e.boundRender),this}_setItemPositionsNeedsUpdate(e){const t=this._p;e<t.itemPositionsNeedsUpdate&&(t.itemPositionsNeedsUpdate=e)}_calculateItemPosition(e){const t=this._p,r=t.cachedItemPositions;if(e>=t.itemPositionsNeedsUpdate){const n=t.count,i=t.cachedItemHeights,o=t.cachedItemEstimatedHeights,l=t.estimatedItemHeight,s=t.itemHeightEstimatorFn;i.length!==n&&(i.length=n,o.length=n,r.length=n);let a=t.itemPositionsNeedsUpdate,u=Math.min(e,n),d=0;a>0&&(d=r[a-1]);for(let e=a;e<=u;e++){if(0===e){r[e]=d;continue}const t=e-1;let n=i[t];void 0===n&&(n=s?s(t):null,"number"!=typeof n&&(n=l),o[t]=n),d+=n,r[e]=d}t.itemPositionsNeedsUpdate=u+1}if(e>0&&e===t.count){let n=t.cachedItemHeights[e-1];return void 0===n&&(n=t.itemHeightEstimatorFn?t.itemHeightEstimatorFn(e-1):null,"number"!=typeof n&&(n=t.estimatedItemHeight),t.cachedItemEstimatedHeights[e-1]=n),r[e-1]+n}return r[e]}_dequeueElementForIndex(e,t,r,n){const i=this._p,o=i.virtualWrapper;i.currentItemsParent;const l=i.existingEls,s=i.onItemRender,a=i.onItemUnrender,u=!e,d=u||t!==e[yn];if(e?a&&d&&a(e):(e=i.itemElementCreatorFn(),o&&!1!==r&&(e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.right="0")),d&&(e.innerHTML="",s&&s(e,t)),!1!==r){if(r instanceof Node||(r=null),!u){let t=l.indexOf(e);-1!==t&&l.splice(t,1)}let i=r?l.indexOf(r):-1;-1===i?l.push(e):l.splice(i,0,e),n||this._insertItemAndFlow(e,t,r)}return e[yn]=t,e}_insertItemAndFlow(e,t,r){const n=this._p,i=n.virtualWrapper,o=n.currentItemsParent;if(!1!==r&&(r instanceof Node||(r=null),e.parentNode===o&&e.nextSibling===r||gn(e,r,o)),i){let r=e.getBoundingClientRect().height,i=n.cachedItemHeights[t];i!==r&&(n.cachedItemHeights[t]=r),(void 0!==i&&r!==i||void 0===i&&r!==n.cachedItemEstimatedHeights[t])&&this._setItemPositionsNeedsUpdate(t+1);let o=this._calculateItemPosition(t);const l=Nn();!1===l?e.style.top=`${o}px`:e.style[l]=`translateY(${o}px)`}}_getExistingElsRange(){const e=this._p.existingEls;let t=-1,r=-1;for(let r=0,n=e.length;r<n;r++)if(!1!==vn.call(e[r],yn)){t=r;break}for(let t=e.length-1;t>=0;t--)if(!1!==vn.call(e[t],yn)){r=t;break}return{firstValidArrayIndex:t,lastValidArrayIndex:r,firstIndex:-1!==t?e[t][yn]:-1,lastIndex:-1!==r?e[r][yn]:-1}}}const yn=Symbol("index"),Wn=Symbol("reuse"),Sn=()=>document.createElement("li"),_n=(e,t,r=0,n=-1)=>{let i=e.length;if(n<0&&(n+=i),n<=r)return n;for(;r<=n;){let o=Math.floor(r+(n-r)/2),l=e[o];if(l===t||l<=t&&o<i&&e[o+1]>t){for(;o>0&&e[o-1]===l;)o--;return o}l<t?r=o+1:n=o-1}return-1===n?0:i-1},xn=(e,t,r,n=0,i=-1)=>{if(i<0&&(i+=e),i<=n)return i;for(;n<=i;){let o=Math.floor(n+(i-n)/2),l=t(o);if(l===r||l<=r&&o<e&&t(o+1)>r){for(;o>0&&t(o-1)===l;)o--;return o}l<r?n=o+1:i=o-1}return-1===i?0:t(e-1)},Rn=(e,t)=>{for(let r=e.length-1;r>=0;r--)if(t(e[r]))return e[r]};let In=null;const Nn=()=>{if(null===In){let e=["transform","WebkitTransform","MozTransform","OTransform","msTransform"],t=document.createElement("div");In=!1;for(let r of e)if(t&&void 0!==t.style[r]){In=r;break}}return In};function En(e,t){for(let r=0,n=e.length;r>=0&&r<n;r+=1)if(t(e[r],r,e))return e[r]}function kn(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#39;").replace(/"/g,"&quot;").replace(/\n/g,"<br />")}const Pn=Symbol("safe"),Fn=Symbol("hover_in"),Tn=Symbol("hover_out"),zn=Symbol("row_click"),Mn=Symbol("preview_cell"),An=Symbol("cell"),Ln=Symbol("related_touch"),Hn=Symbol("original_row_index"),On=Symbol("destroyed");class Dn extends Array{constructor(e){var r,n,i;super(),t(this,"sortColumn",void 0),t(this,"onComparatorRequired",null),t(this,"customSortingProvider",null),e=e||{},this.sortColumn=null!==(r=e.sortColumn)&&void 0!==r?r:[],this.onComparatorRequired=null!==(n=e.onComparatorRequired)&&void 0!==n?n:null,this.customSortingProvider=null!==(i=e.customSortingProvider)&&void 0!==i?i:null}add(e,t){if(Array.isArray(e)){const r=e;if("number"==typeof t)for(let e=0,n=r.length;e<n;e++)this.splice(t++,0,r[e]);else for(let e=0,t=r.length;e<t;e++)this.push(r[e])}else{const r=e;"number"==typeof t?this.splice(t,0,r):this.push(r)}}reset(e){this.length=0,e&&this.add(e)}filteredCollection(e,t){if(e&&t){const r=new Dn({sortColumn:this.sortColumn,onComparatorRequired:this.onComparatorRequired,customSortingProvider:this.customSortingProvider});for(let n=0,i=this.length;n<i;n++){const i=this[n];e(i,t)&&(i[Hn]=n,r.push(i))}return r}return null}sort(e){let t;if("function"==typeof e)return super.sort(e);if(this.sortColumn.length){const e=[];for(let t=0;t<this.sortColumn.length;t++){const r=$n(this.sortColumn[t],this.sortColumn[t].descending);let n=null;this.onComparatorRequired&&(n=this.onComparatorRequired(this.sortColumn[t].column,this.sortColumn[t].descending,r)),n||(n=r),e.push(n.bind(this))}if(1===e.length)t=e[0];else{const r=e.length;t=(t,n)=>{let i=0;for(let o=0;o<r;o++)if(i=e[o](t,n),0!==i)return i;return i}}const r=e=>(e.sort(t),e);if(this.customSortingProvider){const e=this.customSortingProvider(this,r);e!==this&&this.splice(0,this.length,...e)}else r(this)}return this}}function $n(e,t){let r=e.comparePath;"string"==typeof r&&(r=r.split("."));const n=r.length,i=n>1,o=t?1:-1,l=t?-1:1;return function(e,t){let s=e[r[0]],a=t[r[0]];if(i)for(let e=1;e<n;e++)s=s&&s[r[e]],a=a&&a[r[e]];return s===a?0:null==s?o:null==a?l:s<a?o:l}}class jn extends Array{constructor(){super()}get(e){for(let t=0,r=this.length;t<r;t++)if(this[t].name===e)return this[t];return null}indexOf(e){const t="string"==typeof e?e:e.name;for(let e=0,r=this.length;e<r;e++)if(this[e].name===t)return e;return-1}getByOrder(e){for(let t=0,r=this.length;t<r;t++)if(this[t].order===e)return this[t];return null}normalizeOrder(){const e=[];for(let t=0;t<this.length;t++)e.push(this[t]);e.sort((e,t)=>e.order<t.order?-1:e.order>t.order?1:0);for(let t=0;t<e.length;t++)e[t].order=t;return this}getColumns(){const e=[];for(let t=0;t<this.length;t++)e.push(this[t]);return e.sort((e,t)=>e.order<t.order?-1:e.order>t.order?1:0),e}getVisibleColumns(){const e=[];for(let t=0;t<this.length;t++){const r=this[t];r.visible&&e.push(r)}return e.sort((e,t)=>e.order<t.order?-1:e.order>t.order?1:0),e}getMaxOrder(){let e=0;for(let t=0;t<this.length;t++){const r=this[t];r.order>e&&(e=r.order)}return e}moveColumn(e,t){if(e&&t){const r=e.order,n=t.order;if(r<n)for(let e=r+1;e<=n;e++){const t=this.getByOrder(e);t&&t.order--}else for(let e=r-1;e>=n;e--){const t=this.getByOrder(e);t&&t.order++}e.order=n}return this}}function Bn(e,t){const r=t.column,n=null==t.keyword?"":t.keyword.toString();if(!n||!r)return!0;let i=e[r];if(null==i)return!1;let o=i.toString(),l=n;return t.caseSensitive||(o=o.toLowerCase(),l=l.toLowerCase()),-1!==o.indexOf(l)}const Vn={NONE:"none",AUTO:"auto",SCROLL:"scroll"};class qn{static saveSelection(e){const t=window.getSelection();if(!t||0===t.rangeCount)return null;const r=t.getRangeAt(0);if(e!==r.commonAncestorContainer&&!function(e,t){let r=e;for(;(r=null!==(n=null===(i=r)||void 0===i?void 0:i.parentNode)&&void 0!==n?n:null)&&r!==t;)var n,i;return!!r}(r.commonAncestorContainer,e))return null;const n=r.cloneRange();n.selectNodeContents(e),n.setEnd(r.startContainer,r.startOffset);const i=n.toString().length;return{start:i,end:i+r.toString().length}}static restoreSelection(e,t){let r=0;const n=[e];let i,o=!1,l=!1;const s=document.createRange();for(s.setStart(e,0),s.collapse(!0);!l&&(i=n.pop());)if(i.nodeType===Node.TEXT_NODE){const e=r+i.length;!o&&t.start>=r&&t.start<=e&&(s.setStart(i,t.start-r),o=!0),o&&t.end>=r&&t.end<=e&&(s.setEnd(i,t.end-r),l=!0),r=e}else{let e=i.childNodes.length;for(;e--;)n.push(i.childNodes[e])}const a=window.getSelection();a&&(a.removeAllRanges(),a.addRange(s))}}const Un=Array.prototype.indexOf,Xn=document.createElement.bind(document);function Yn(e){const t=e._p;if(t.cellPreviewCell){var r;const n=t.cellPreviewCell,i=n[An];let o;try{o=qn.saveSelection(n)}catch{}t.cellPreviewCell.remove(),i&&t._unbindCellHoverOut(i),t._unbindCellHoverOut(n);try{o&&i&&qn.restoreSelection(i,o)}catch{}e.emit("cellpreviewdestroy",{el:n.firstChild,name:n.columnName,rowIndex:null!==(r=n.rowIndex)&&void 0!==r?r:null,rowData:null==n.rowIndex?null:t.rows[n.rowIndex],cell:i,cellEl:null==i?void 0:i.firstChild}),i&&delete i[Mn],delete n[An],t.cellPreviewCell=null,t.abortCellPreview=!1}else t.abortCellPreview=!0;return e}const Gn=document.createElement.bind(document);function Jn(e){var t,r,n;const i=e;return null!==(t=null!==(r=e[Ln])&&void 0!==r?r:null===(n=i.changedTouches)||void 0===n?void 0:n[0])&&void 0!==t?t:e}function Kn(e){var t;const r=e._p;if(null==r.columnResizeStartTimeout)return;clearTimeout(r.columnResizeStartTimeout),r.columnResizeStartTimeout=null;const n=null===(t=r.lastResizeAreaClick)||void 0===t?void 0:t.columnName;r.lastResizeAreaClick=null,n&&function(e,t){const r=e._o,n=e._p,i=n.columns.get(t);if(!r.resizableColumns||!i||!i.resizable)return void Zn(e);const o=Fi(e);n.resizer=Gn("div"),n.resizer.className=r.resizerClassName,nn(n.resizer,{position:"absolute",display:"block",zIndex:"-1",visibility:"hidden",width:"2px",background:"#000",opacity:"0.7"}),e.el.appendChild(n.resizer);const l=i.element,s=n.resizer.parentNode,a=getComputedStyle(s),u=getComputedStyle(l),d=cn(l),c=cn(s);c.left+=parseFloat(a.borderLeftWidth)||0,c.top+=parseFloat(a.borderTopWidth)||0,d.left-=c.left,d.top-=c.top,d.top-=parseFloat(u.borderTopWidth)||0;const h=ln(n.resizer,!0,!0,!0);o?(d.left-=Math.ceil((parseFloat(u.borderLeftWidth)||0)/2),d.left-=Math.ceil(h/2)):(d.left+=ln(l,!0,!0,!0),d.left+=Math.ceil((parseFloat(u.borderRightWidth)||0)/2),d.left-=Math.ceil(h/2)),nn(n.resizer,{"z-index":"10",visibility:"visible",left:d.left+"px",top:d.top+"px",height:sn(e.el,!1,!1,!1)+"px"}),n.resizer.columnName=l.columnName;try{n.resizer.style.zIndex=""}catch{}}(e,n)}function Qn(e,t){const r=e._o,n=Fi(e);let i=t.target.closest(`div.${r.tableClassName}-header-cell,div.${r.cellPreviewClassName}`);if(!i)return null;i[An]&&(i=i[An]);let o=i.previousSibling;for(;o&&1!==o.nodeType;)o=o.previousSibling;const l=!o,s=Jn(t),a=(s.pageX||s.clientX||0)-cn(i).left;if(n){var u,d,c;if(!l&&ln(i,!0,!0,!0)-a<=r.resizeAreaWidth/2)return null!==(u=null===(d=o)||void 0===d?void 0:d.columnName)&&void 0!==u?u:null;if(a<=r.resizeAreaWidth/2)return null!==(c=i.columnName)&&void 0!==c?c:null}else{var h,m,f;if(!l&&a<=r.resizeAreaWidth/2)return null!==(h=null===(m=o)||void 0===m?void 0:m.columnName)&&void 0!==h?h:null;if(ln(i,!0,!0,!0)-a<=r.resizeAreaWidth/2)return null!==(f=i.columnName)&&void 0!==f?f:null}return null}function Zn(e){const t=e._p;return null!=t.columnResizeStartTimeout&&(clearTimeout(t.columnResizeStartTimeout),t.columnResizeStartTimeout=null),t.resizer&&(t.resizer.remove(),t.resizer=null),t.eventsSink.remove(document,".colresize"),e}function ei(e,t){const r=t;if("mousedown"===t.type&&0!==r.button)return;const n=e._o,i=e._p,o=Qn(e,t);if(o){const r=i.columns.get(o);if(!n.resizableColumns||!r||!r.resizable)return!1;if(function(e,t,r){const n=e._p,i=e._o,o=Jn(t),l=Date.now(),s=function(e){return e.type.startsWith("touch")?"touch":"mouse"}(t),a=n.lastResizeAreaClick;if(n.lastResizeAreaClick={columnName:r,time:l,pageX:o.pageX||o.clientX||0,pageY:o.pageY||0,pointerType:s},!a||a.columnName!==r||a.pointerType!==s)return!1;const u=l-a.time;return!(u<0||u>i.resizeAreaDoubleClickDuration)&&Math.sqrt(Math.pow(n.lastResizeAreaClick.pageX-a.pageX,2)+Math.pow(n.lastResizeAreaClick.pageY-a.pageY,2))<=Math.max(i.resizeAreaWidth,12)}(e,t,r.name))return Zn(e),function(e,t,r,n){const i=e._o,o=e._p,l=o.columns.get(r);if(!i.resizableColumns||!l||!l.resizable)return!1;const s=Date.now();return(null===(n=o.lastResizeAreaDoubleClick)||void 0===n?void 0:n.columnName)===l.name&&s-o.lastResizeAreaDoubleClick.time<100?(t.preventDefault(),!0):(o.lastResizeAreaClick=null,o.lastResizeAreaDoubleClick={columnName:l.name,time:s},e.emit("columnresizeareadoubleclick",{name:l.name,columnName:l.name,event:t}),i.autoFitColumnOnResizeDoubleClick&&e.autoFitColumn(l.name),t.preventDefault(),!0)}(e,t,r.name);Zn(e),i.columnResizeStartTimeout=setTimeout(()=>Kn(e),n.resizeAreaDoubleClickDuration),i.eventsSink.add(document,"mousemove.colresize",t=>ti(e,t)).add(document,"touchmove.colresize",t=>ti(e,t)).add(document,"mouseup.colresize",t=>ri(e,t)).add(document,"touchend.colresize",t=>ri(e,t)),t.preventDefault()}}function ti(e,t){const r=e._p;if(null!=r.columnResizeStartTimeout&&!function(e,t){const r=e._p.lastResizeAreaClick;if(!r)return!1;const n=Jn(t),i=n.pageX||n.clientX||0,o=n.pageY||0;return Math.sqrt(Math.pow(i-r.pageX,2)+Math.pow(o-r.pageY,2))>4}(e,t))return;if(Kn(e),!r.resizer)return;const n=r.columns.get(r.resizer.columnName);if(!n)return;const i=Fi(e),o=n.element,l=r.resizer.parentNode,s=getComputedStyle(l),a=getComputedStyle(o),u=cn(o),d=cn(l);d.left+=parseFloat(s.borderLeftWidth)||0,u.left-=d.left;const c=ln(r.resizer,!0,!0,!0),h="border-box"===a.boxSizing;let m=Jn(t).pageX-d.left,f=u.left;f-=Math.ceil(c/2),i?(f+=ln(o,!0,!0,!0),f-=n.ignoreMin?0:e._o.minColumnWidth,h||(f-=Math.ceil((parseFloat(a.borderLeftWidth)||0)/2),f-=Ii(o)),m>f&&(m=f)):(f+=n.ignoreMin?0:e._o.minColumnWidth,h||(f+=Math.ceil((parseFloat(a.borderRightWidth)||0)/2),f+=Ii(o)),m<f&&(m=f)),r.resizer.style.left=m+"px"}function ri(e,t){var r,n,i;const o=e._o,l=e._p;if(null!=l.columnResizeStartTimeout)return void Zn(e);if(!l.resizer)return;l.eventsSink.remove(document,".colresize");const s=l.columns.get(l.resizer.columnName);if(!s)return l.resizer.remove(),void(l.resizer=null);const a=Fi(e),u=s.element,d=u.firstChild,c=l.resizer.parentNode,h=getComputedStyle(c),m=getComputedStyle(u),f=cn(u),v=cn(c);v.left+=parseFloat(h.borderLeftWidth)||0,f.left-=v.left;const p=ln(l.resizer,!0,!0,!0),g="border-box"===m.boxSizing,b=t;let C=(null!==(r=null!==(n=t[Ln])&&void 0!==n?n:null===(i=b.changedTouches)||void 0===i?void 0:i[0])&&void 0!==r?r:t).pageX-v.left,w=f.left,y=0;if(w-=Math.ceil(p/2),a){if(!g){C+=Ii(u);const e=getComputedStyle(d||u);C+=parseFloat(e.borderLeftWidth)||0,C+=parseFloat(e.borderRightWidth)||0,C+=s.arrowProposedWidth||0}w+=ln(u,!0,!0,!0);const t=w-(s.ignoreMin?0:e._o.minColumnWidth);C>t&&(C=t),y=w-C}else{if(!g){C-=Ii(u);const e=getComputedStyle(d||u);C-=parseFloat(e.borderLeftWidth)||0,C-=parseFloat(e.borderRightWidth)||0,C-=s.arrowProposedWidth||0}const t=w+(s.ignoreMin?0:e._o.minColumnWidth);C<t&&(C=t),y=C-w}l.resizer.remove(),l.resizer=null;let W=y;if(2===s.widthMode){let t=ki(e),r=0,n=0;for(let e=0;e<l.visibleColumns.length;e++){var S;const i=l.visibleColumns[e];i.name!==s.name&&(2===i.widthMode?(r+=i.width,n++):t-=null!==(S=i.actualWidth)&&void 0!==S?S:0)}if(t<=0&&l.table&&(t=l.table.clientWidth),t>Math.max(o.minColumnWidth,1)){if(W=y/t,n>0){const e=W/((1-W)/r);r+=W,(r<1&&o.relativeWidthGrowsToFillWidth||r>1&&o.relativeWidthShrinksToFillWidth)&&(W=e)}W*=100,W+="%"}}e.setColumnWidth(s.name,W)}function ni(e,t){var r;const n=e._o,i=e._p;if(!n.resizableColumns)return;const o=Qn(e,t),l=t.target.closest(`div.${n.tableClassName}-header-cell,div.${n.cellPreviewClassName}`);l&&(o&&null!==(r=i.columns.get(o))&&void 0!==r&&r.resizable?l.style.cursor="e-resize":l.style.cursor="")}function ii(e,t){var r,n,i;const o=e._o,l=t,s=t,a=null!==(r=null!==(n=t[Ln])&&void 0!==n?n:null===(i=l.changedTouches)||void 0===i?void 0:i[0])&&void 0!==r?r:{pageX:s.pageX,pageY:s.pageY},u=t.target.closest(`div.${o.tableClassName}-header-cell,div.${o.cellPreviewClassName}`);if(!u)return;const d=cn(u);d.width=ln(u,!0,!0,!0),d.height=sn(u,!0,!0,!0),e.emit("headercontextmenu",{columnName:u.columnName,pageX:a.pageX,pageY:a.pageY,bounds:d})}function oi(e,t){if(Ri(t))return;if(Qn(e,t))return;const r=e._o,n=e._p,i=t.target.closest(`div.${r.tableClassName}-header-cell,div.${r.cellPreviewClassName}`);if(!i)return;if(!r.sortableColumns)return;const o=n.columns.get(i.columnName),l=n.rows.sortColumn;if(o&&o.sortable){let t=!0;const n=l.length?l[l.length-1]:null;n&&n.column===o.name&&(n.descending&&r.allowCancelSort?(t=!1,l.splice(l.length-1,1)):n.descending=!n.descending);const i=e;t?i.sort(o.name,void 0,!0).render():i.sort()}}function li(e,t){const r=e._p,n=r.visibleColumns.findIndex(e=>e.movable),i=r.visibleColumns.findLastIndex(e=>e.movable),o=r.visibleColumns.findIndex(e=>e===t);return t.movable||-1!==n&&o>=n&&o<=i}const si=Array.prototype.indexOf,ai=document.createElement.bind(document);function ui(e){const t=e._p;return t.headerRow&&(t.headerRow=void 0),e}function di(e){const t=e._o,r=e._p;if(!r.tbody)return e;if(t.virtualTable&&r.virtualListHelper){const e=r.virtualListHelper.estimateFullHeight();r._lastVirtualScrollHeight=e,r.tbody.style.height=e+"px"}else r.tbody.style.height="";return e}function ci(e,t){const r=e._p;if(!r.table)return e;const n=r.table.offsetWidth-r.table.clientWidth;if(n!==r.scrollbarWidth||t){var i;r.scrollbarWidth=n;for(let e=0;e<r.columns.length;e++)r.columns[e].actualWidthConsideringScrollbarWidth=null;if(r.scrollbarWidth>0&&r.visibleColumns.length>0&&r.tbody&&r.headerRow){var o;const e=r.visibleColumns.length-1;r.visibleColumns[e].actualWidthConsideringScrollbarWidth=(null!==(o=r.visibleColumns[e].actualWidth)&&void 0!==o?o:0)-r.scrollbarWidth;const t=r.visibleColumns[e].actualWidthConsideringScrollbarWidth+"px",n=r.tbody.childNodes;for(let r=0,i=n.length;r<i;r++){const i=n[r];1===i.nodeType&&(i.childNodes[e].style.width=t)}r.headerRow.childNodes[e].style.width=t}mi(e),null===(i=r.notifyRendererOfColumnsConfig)||void 0===i||i.call(r)}return e}function hi(e,t){const r=e._o,n=e._p;if(!n.tbody||!n.table||!n.headerRow)return e;const i=Pi(e);if(n.tbody.style.minWidth=i+"px",n.headerRow.style.minWidth=i+(n.scrollbarWidth||0)+"px",n.eventsSink.remove(n.table,"scroll"),r.width===Vn.AUTO)an(n.table,ln(n.tbody,!0,!0,!0)),an(e.el,ln(n.table,!0,!0,!0));else if(r.width===Vn.SCROLL){if(t){const t=n.table?n.table.scrollTop:0,r=n.table?n.table.scrollLeft:0;!function(e){const t=e.style.display;e.style.display="none",e.offsetHeight,e.style.display=t}(e.el),n.table.scrollTop=t,n.table.scrollLeft=r,n.header&&(n.header.scrollLeft=r)}const r=()=>function(e){const t=e._p;t.header.scrollLeft=t.table.scrollLeft,fi(e)}(e);n.eventsSink.add(n.table,"scroll",r)}return e}function mi(e){var t;const r=e._p,n=e._o;if(!r.headerRow)return;const i=n.tableClassName+"-sticky",o=r.headerRow,l=Fi(e);r.lastIsRtl=l;const s=null!==(t=r.scrollbarWidth)&&void 0!==t?t:0,a=r.lastDetectedWidth,u=n.maxStickyColumnRelativeWidth,d="number"==typeof u&&a?a*u:null;let c=0,h=0,m=null;const f=[],v=[];let p=null,g=[],b=null,C=0,w=[];for(let e=o.firstElementChild;e;e=e.nextElementSibling){var y,W;const t=e.getAttribute("data-column");if(!t)continue;const n=r.columns.get(t);if(!n)continue;n.headerScrollbarCompensation=0;let o="start"===n.sticky||"end"===n.sticky;if(o&&null!==d&&C+(null!==(y=n.actualWidth)&&void 0!==y?y:0)>d&&(o=!1),o){var S,_,x,R,I;let t=null!==(S=n.actualWidth)&&void 0!==S?S:0;C+=0,e.className+=" "+i,e.style.position="sticky";let o,a=null;null===m&&(a=getComputedStyle(e),m=a.boxSizing),"content-box"===m&&(null===a&&(a=getComputedStyle(e)),t+=(parseFloat(a.paddingLeft)||0)+(parseFloat(a.paddingRight)||0)+(parseFloat(a.borderLeftWidth)||0)+(parseFloat(a.borderRightWidth)||0)),"start"===n.sticky?(o={direction:"start",absDirection:l?"right":"left",offset:c},e.style[o.absDirection]=c+"px",c+=t,g.length=0,p=[e],f.push(p)):(b=e,o={direction:"end",absDirection:l?"left":"right",offset:h},e.style[o.absDirection]=h+s+"px",e.style.width=(null!==(_=n.actualWidth)&&void 0!==_?_:0)+"px",h+=t,v.push([e,...g]),g.length=0),o.direction===(null===(x=n.stickyPos)||void 0===x?void 0:x.direction)&&o.offset===(null===(R=n.stickyPos)||void 0===R?void 0:R.offset)&&o.absDirection===(null===(I=n.stickyPos)||void 0===I?void 0:I.absDirection)||w.push(r.visibleColumns.indexOf(n)),n.stickyPos=o}else n.stickyPos&&w.push(r.visibleColumns.indexOf(n)),delete n.stickyPos,null!==(W=p)&&void 0!==W&&W.push(e),null!=g&&g.push(e),"sticky"===e.style.position&&(e.classList.remove(i),e.style.position="",e.style.left="",e.style.right="")}b&&(b.style[l?"left":"right"]="0px"),r.stickiesStart=f,r.stickiesEnd=v,w.length>0&&e.refreshAllVirtualRows(),r.lastStickyScrollLeft=void 0,fi(e)}function fi(e){const t=e._p;if(!t.table||!t.headerRow||!t.tbody)return;const r=t.stickiesStart,n=t.stickiesEnd,i=t.stickiesSetStart,o=t.stickiesSetEnd,l=t.stickiesSetStart=new Set,s=t.stickiesSetEnd=new Set;if(null!=r&&r.length||null!=n&&n.length){const e=t.table.scrollLeft;if(e===t.lastStickyScrollLeft)return;t.lastStickyScrollLeft=e;const i=t.headerRow.children,o=1.5,a=t.lastIsRtl;let u=null;const d=(e,r,n)=>{if(e&&e.length){for(const t of e){r||(u=t);const e=t[0],l=t.slice(1),s=l[0],d=l[l.length-1];if(!e||!e.getBoundingClientRect)continue;const c=e.getBoundingClientRect(),h=r!==a;let m=!1;if(s&&d){const e=s.getBoundingClientRect(),t=d.getBoundingClientRect();m=r?a?c.right-o>t.left&&c.left+o<e.right:c.right-o>e.left&&c.left+o<t.right:a?c.left+o<e.right&&c.right-o>t.left:c.left+o<t.right&&c.right-o>e.left}e.classList.toggle(h?"is-sticky-left":"is-sticky-right",m),m&&n.add(si.call(i,e))}if(u){var l,s,d,c;const e=u[0],r=t.columns.get(e.getAttribute("data-column")),n=a?"marginRight":"marginLeft";e.style[n]="",e.style.width=(null!==(l=null!==(s=r.actualWidthConsideringScrollbarWidth)&&void 0!==s?s:r.actualWidth)&&void 0!==l?l:0)+"px";let i=0;if(t.scrollbarWidth>0){const r=e.getBoundingClientRect(),o=e.offsetParent.getBoundingClientRect(),l=a?r.left-o.left:o.right-r.right;l<=t.scrollbarWidth&&(i=Math.min(t.scrollbarWidth,Math.max(0,t.scrollbarWidth-l+1)),i<t.scrollbarWidth&&(e.style[n]=-i+"px"))}r.headerScrollbarCompensation=i,e.style.width=(null!==(d=null!==(c=r.actualWidthConsideringScrollbarWidth)&&void 0!==c?c:r.actualWidth)&&void 0!==d?d:0)+i+"px"}}};d(r,!0,l),d(n,!1,s)}const a=[],u=[];for(const e of l)(null==i?void 0:i.has(e))||a.push({index:e,start:!0});for(const e of s)(null==o?void 0:o.has(e))||a.push({index:e,start:!1});if(i)for(const e of i)l.has(e)||u.push({index:e,start:!0});if(o)for(const e of o)s.has(e)||u.push({index:e,start:!1});if(!a.length&&!u.length)return;let d=t.tbody.firstElementChild;for(;d;){const e=d.children;for(const r of u){var c;null===(c=e[r.index])||void 0===c||c.classList.remove(r.start!==t.lastIsRtl?"is-sticky-left":"is-sticky-right")}for(const r of a){var h;null===(h=e[r.index])||void 0===h||h.classList.add(r.start!==t.lastIsRtl?"is-sticky-left":"is-sticky-right")}d=d.nextElementSibling}t.isStickyColumns=new Map;for(const e of l)t.isStickyColumns.set(e,"start");for(const e of s)t.isStickyColumns.set(e,"end")}function vi(e,t){const r=e._p,n=e._o;if(!r.headerRow||!r.tbody)return e;const i=r.headerRow.querySelectorAll(`div.${n.tableClassName}-header-cell`)[t];if(!i)return e;const o=r.columns.get(i.columnName);if(o){var l,s,a;const e=null!==(l=o.headerScrollbarCompensation)&&void 0!==l?l:0;i.style.width=(null!==(s=null!==(a=o.actualWidthConsideringScrollbarWidth)&&void 0!==a?a:o.actualWidth)&&void 0!==s?s:0)+e+"px";const n=(o.actualWidthConsideringScrollbarWidth||o.actualWidth||0)+"px",u=r.tbody.childNodes;for(let e=0,r=u.length;e<r;e++){const r=u[e];1===r.nodeType&&(r.childNodes[t].style.width=n)}}return e}function pi(e){const t=e._p,r=e._o;if(t.table&&t.headerRow){const e=r.tableClassName,i=mn(t.headerRow,`>div.${e}-header-cell.sorted`),o=Array.prototype.slice.call(i,0).map(e=>e.querySelector(":scope>div>.sort-arrow")).filter(e=>!!e);for(const e of o){var n;const r=null===(n=e.parentNode)||void 0===n?void 0:n.parentNode;if(r){const e=t.columns.get(r.columnName);e&&(e.arrowProposedWidth=0)}e.remove()}for(const e of i)e.classList.remove("sorted","desc")}return e}function gi(e,t,r){var n;const i=e._p,o=e._o,l=i.columns.get(t);if(!l)return!1;const s=ai("span");return s.className="sort-arrow",l.element&&(l.element.className+=r?" sorted desc":" sorted",null!==(n=l.element.firstChild)&&void 0!==n&&n.insertBefore(s,l.element.firstChild.firstChild)),2!==l.widthMode&&o.adjustColumnWidthForSortArrow&&(l.arrowProposedWidth=s.scrollWidth+(parseFloat(getComputedStyle(s).marginRight)||0)+(parseFloat(getComputedStyle(s).marginLeft)||0)),!0}function bi(e,t){t.firstChild,t.addEventListener("mousedown",t=>ei(e,t)),t.addEventListener("mousemove",t=>ni(e,t)),t.addEventListener("mouseup",t=>function(e,t){2===t.button&&ii(e,t)}(e,t)),t.addEventListener("mouseleave",t=>function(e,t){const r=e._o,n=t.target.closest(`div.${r.tableClassName}-header-cell,div.${r.cellPreviewClassName}`);n&&(n.style.cursor="")}(e,t)),t.addEventListener("touchstart",t=>function(e,t){const r=e._p;if(r.currentTouchId)return;const n=t.changedTouches[0];r.currentTouchId=n.identifier;const i=t.currentTarget,o={x:n.pageX,y:n.pageY};let l,s=o;const a=function(){r.currentTouchId=null,r.eventsSink.remove(i,".colheader"),clearTimeout(l)};t[Ln]=t.changedTouches[0],!0!==ei(e,t)?(l=setTimeout(()=>{a(),r.eventsSink.add(i,"touchend.colheader",e=>{Ri(e)||e.preventDefault(),r.eventsSink.remove(i,".colheader")},{once:!0}).add(i,"touchcancel.colheader",e=>{r.eventsSink.remove(i,".colheader")},{once:!0}),Math.sqrt(Math.pow(Math.abs(s.x-o.x),2)+Math.pow(Math.abs(s.y-o.y),2))<9&&(Zn(e),ii(e,t))},500),r.eventsSink.add(i,"touchend.colheader",t=>{const n=t,i=En(Array.from(n.changedTouches),e=>e.identifier===r.currentTouchId);i&&(a(),Ri(t)||t.preventDefault(),s={x:i.pageX,y:i.pageY},(Math.sqrt(Math.pow(Math.abs(s.x-o.x),2)+Math.pow(Math.abs(s.y-o.y),2))<9||r.resizer)&&(n[Ln]=i,oi(e,n)))}).add(i,"touchcancel.colheader",a).add(i,"touchmove.colheader",t=>{const n=t,i=En(Array.from(n.changedTouches),e=>e.identifier===r.currentTouchId);i&&(s={x:i.pageX,y:i.pageY},r.resizer&&(t.preventDefault(),n[Ln]=i,ni(e,n)))})):r.currentTouchId=null}(e,t)),t.addEventListener("dragstart",t=>function(e,t){const r=e._o,n=e._p;if(r.movableColumns){var i;const e=t.target.closest(`div.${r.tableClassName}-header-cell,div.${r.cellPreviewClassName}`);if(!e)return void t.preventDefault();const o=n.columns.get(e.columnName);o&&o.movable?(e.style.opacity="0.35",n.dragId=161061273*Math.random(),null===(i=t.dataTransfer)||void 0===i||i.setData("text",JSON.stringify({dragId:n.dragId,column:o.name}))):t.preventDefault()}else t.preventDefault()}(e,t)),t.addEventListener("click",t=>oi(e,t)),t.addEventListener("contextmenu",e=>e.preventDefault()),t.addEventListener("dragenter",t=>function(e,t){const r=e._o,n=e._p;if(r.movableColumns){var i;let o=null;const l=null===(i=t.dataTransfer)||void 0===i?void 0:i.getData("text");if(l)try{o=JSON.parse(l)}catch{o=null}const s=t.target.closest(`div.${r.tableClassName}-header-cell,div.${r.cellPreviewClassName}`);if(!s)return;if(!o||n.dragId===o.dragId&&s.columnName!==o.column){const t=n.columns.get(s.columnName);t&&li(e,t)&&s.classList.add("drag-over")}}}(e,t)),t.addEventListener("dragover",e=>{e.preventDefault()}),t.addEventListener("dragleave",t=>function(e,t){const r=e._o,n=t.target.closest(`div.${r.tableClassName}-header-cell,div.${r.cellPreviewClassName}`);if(!n)return;const i=t.relatedTarget;i===n||n.contains(i)||n.classList.remove("drag-over")}(e,t)),t.addEventListener("drop",t=>function(e,t,r){t.preventDefault();const n=e._o,i=e._p,o=null===(r=t.dataTransfer)||void 0===r?void 0:r.getData("text");if(!o)return;let l;try{l=JSON.parse(o)}catch{return}const s=t.target.closest(`div.${n.tableClassName}-header-cell,div.${n.cellPreviewClassName}`);if(s){if(n.movableColumns&&l.dragId===i.dragId){const t=l.column,r=s.columnName,n=i.columns.get(t),o=i.columns.get(r);n&&o&&n.movable&&li(e,o)&&e.moveColumn(t,r)}s.classList.remove("drag-over")}}(e,t))}function Ci(e,t){let r=0;if("string"==typeof e){const t=e.trim().toLowerCase();if("rest"===t)return{width:0,mode:3};if("auto"===t)return{width:0,mode:0}}let n=parseFloat(e);return Number.isFinite(n)||(n=0),n=Math.max(0,n),n>0&&("string"==typeof e&&e.trim().endsWith("%")?(r=2,n/=100):n>0&&n<1?r=2:(n<t&&(n=t),r=1)),{width:n,mode:r}}function wi(e,t){var r;let n=Ci(t.width,t.ignoreMin?0:e.minColumnWidth),i={name:t.name,label:void 0===t.label?t.name:t.label,width:n.width,widthMode:n.mode,resizable:void 0===t.resizable||t.resizable,sortable:void 0===t.sortable||t.sortable,movable:void 0===t.movable||t.movable,visible:void 0===t.visible||t.visible,cellClasses:void 0===t.cellClasses?e.cellClasses:t.cellClasses,ignoreMin:void 0!==t.ignoreMin&&!!t.ignoreMin,sticky:void 0===t.sticky?null:t.sticky||null,allowPreview:!(null!==(r=t.allowPreview)&&void 0!==r&&!r),dataPath:[],comparePath:[],order:0};const o=void 0===t.dataPath?i.name:t.dataPath,l=void 0===t.comparePath?o:t.comparePath;return i.dataPath="string"==typeof o?o.split("."):o,i.comparePath="string"==typeof l?l.split("."):l,i}function yi(e){const t=e._p;0===t.visibleColumns.length&&t.columns.length&&(t.columns[0].visible=!0,t.visibleColumns.push(t.columns[0]),e.emit("showcolumn",t.columns[0].name))}function Wi(e){const t=e._p;if(t.filteredRows&&t.filterArgs){let r=e._o.filter||Bn;t.filteredRows=t.rows.filteredCollection(r,t.filterArgs)}}function Si(e,t,r){let n=r.dataPath,i=t[n[0]];for(let e=1;e<n.length&&null!=i;e++)i=i&&i[n[e]];const o=e.cellFormatter;let l;if(o[Pn])l=o(i,r.name,t);else try{l=o(i,r.name,t)}catch(e){l="[ERROR]",console.error("Failed to generate content for cell "+r.name,e)}return null==l&&(l=""),l}const _i=document.createElement.bind(document);function xi(e){["relative","absolute","fixed"].includes(getComputedStyle(e).position)||(e.style.position="relative")}function Ri(e){const t=e.target;return/^(?:INPUT|TEXTAREA|BUTTON|SELECT)$/.test(t.tagName)}function Ii(e){const t=getComputedStyle(e);return(parseFloat(t.paddingLeft)||0)+(parseFloat(t.paddingRight)||0)}function Ni(e){const t=e.style;t["-webkit-touch-callout"]="none",t["-webkit-user-select"]="none",t["-moz-user-select"]="none",t["-ms-user-select"]="none",t["-o-user-select"]="none",t["user-select"]="none"}function Ei(e,t,r=null){const n=e._o,i=n.tableClassName,o=_i("div");o.className=e.el.className,nn(o,{position:"absolute",top:"-9999px",left:"0",visibility:"hidden",width:"auto",overflow:"visible"});const l=_i("div");l.className=`${i}-header`;const s=_i("div");s.className=`${i}-header-row`;const a=_i("div");a.className=`${i}-header-cell ${t.cellClasses||""}`,a.style.width="auto";const u=a.cloneNode(!0),d=a.cloneNode(!0);a.appendChild(_i("div")).innerHTML=n.headerCellFormatter(t.label,t.name),s.appendChild(u),s.appendChild(a),s.appendChild(d),l.appendChild(s),o.appendChild(l),document.body.appendChild(o);let c=ln(a,!0,!0,!0)+n.columnAutoWidthExtraSize;if(r){const e=_i("div");e.className=`${i}-body`;const l=_i("div");l.className=`${i}-row`;const s=_i("div");s.className=`${i}-cell ${t.cellClasses||""}`,s.style.width="auto";const a=s.appendChild(_i("div"));l.appendChild(s),e.appendChild(l),o.appendChild(e);for(let e=0;e<r.length;e++)a.innerHTML=Si(n,r[e],t),c=Math.max(c,ln(s,!0,!0,!0))}return o.remove(),c+=t.arrowProposedWidth||0,!t.ignoreMin&&c<n.minColumnWidth&&(c=n.minColumnWidth),Math.ceil(c)}function ki(e){const t=e._o,r=e._p;let n,i=0,o=0;r.table&&(i=r.table?r.table.scrollTop:0,o=r.table?r.table.scrollLeft:0,t.virtualTable&&(n=r.table.style.display,r.table.style.display="none"));let l=ln(e.el);r.table&&(t.virtualTable&&void 0!==n&&(r.table.style.display=n),r.table.scrollTop=i,r.table.scrollLeft=o,r.header&&(r.header.scrollLeft=o));const s=t.tableClassName,a=_i("div");a.className=e.el.className,nn(a,{"z-index":"-1",position:"absolute",left:"0",top:"-9999px"});const u=_i("div");u.className=`${s}-header`,a.appendChild(u);const d=_i("div");d.index=null,d.vIndex=null,d.className=`${s}-header-row`,u.appendChild(d);for(let e=0;e<r.visibleColumns.length;e++){const t=r.visibleColumns[e],n=_i("div");n.className=`${s}-header-cell ${t.cellClasses||""}`,n.columnName=t.name,n.appendChild(_i("div")),d.appendChild(n)}document.body.appendChild(a),l-=function(e){const t=getComputedStyle(e);return(parseFloat(t.borderLeftWidth)||0)+(parseFloat(t.borderRightWidth)||0)}(d);const c=d.querySelectorAll(`div.${s}-header-cell`);for(const e of c){const t=getComputedStyle(e);if("border-box"!==t.boxSizing){l-=(parseFloat(t.borderRightWidth)||0)+(parseFloat(t.borderLeftWidth)||0)+Ii(e);const n=e.columnName,i=r.columns.get(n);i&&(l-=i.arrowProposedWidth||0)}}return a.remove(),Math.max(0,l)}function Pi(e){const t=e._p,r=e._o.tableClassName,n=r+"-row",i=r+"-cell",o=t.visibleColumns,l=o.length,s=_i("div");s.className=n,s.style.float="left";let a=0;for(let e=0;e<l;e++){var u,d;const t=o[e],r=_i("div");r.className=i,r.style.width=(null!==(u=t.actualWidth)&&void 0!==u?u:0)+"px",t.cellClasses&&(r.className+=" "+t.cellClasses),r.appendChild(_i("div")),s.appendChild(r),a+=null!==(d=t.actualWidth)&&void 0!==d?d:0}const c=_i("div");c.className=e.el.className,nn(c,{"z-index":"-1",position:"absolute",left:"0",top:"-9999px",float:"left",width:"1px",overflow:"hidden"});const h=_i("div");h.className=r,c.appendChild(h);const m=_i("div");m.className=r+"-body",m.style.width=a+1e4+"px",h.appendChild(m),m.appendChild(s),document.body.appendChild(c);const f=_i("div");nn(f,{border:"1.5px solid #000",width:"0",height:"0",position:"absolute",left:"0",top:"-9999px"}),document.body.appendChild(f);const v=parseFloat(getComputedStyle(f).borderWidth),p=Math.round(v)!==v;f.remove();let g=ln(s,!0,!0,!0);return g-=t.scrollbarWidth||0,p&&g++,c.remove(),g}function Fi(e){const t=e._p;return!!t.table&&"rtl"===getComputedStyle(t.table).direction}function Ti(e){var t;const r=null!=e.unconvertedWidth?e.unconvertedWidth:e.width,n=null!=e.unconvertedWidth&&null!==(t=e.unconvertedWidthMode)&&void 0!==t?t:e.widthMode;return 0===n?"auto":2===n?100*r+"%":3===n?"rest":r}const zi=Object.prototype.hasOwnProperty;document.createElement.bind(document);class Mi{constructor(e){var r,n;t(this,"VERSION",void 0),t(this,"el",void 0),t(this,"_o",void 0),t(this,"_p",void 0),t(this,On,void 0),this.VERSION=Mi.VERSION;const i=this._o={},o=this._p={eventsSink:new fn,mitt:{all:l=l||new Map,on:function(e,t){var r=l.get(e);r?r.push(t):l.set(e,[t])},off:function(e,t){var r=l.get(e);r&&(t?r.splice(r.indexOf(t)>>>0,1):l.set(e,[]))},emit:function(e,t){var r=l.get(e);r&&r.slice().map(function(e){e(t)}),(r=l.get("*"))&&r.slice().map(function(r){r(e,t)})}},tableSkeletonNeedsRendering:!0};var l;this.el=e.el&&e.el instanceof HTMLElement?e.el:document.createElement("div"),this.el!==e.el&&this.el.classList.add(e.className||"dgtable-wrapper"),o.eventsSink.add(this.el,"dragend.colresize",e=>{return t=e,void(this._p.resizer||(t.target.style.opacity=""));var t}),o.isWheelScrolling=!1,o.eventsSink.add(this.el,"wheel",e=>{if(o.cellPreviewCell){let t=!1,r=e.target;for(;r&&r!==o.cellPreviewCell;){const e=getComputedStyle(r),n=e.overflowY,i=e.overflowX,o=("auto"===n||"scroll"===n)&&r.scrollHeight>r.clientHeight,l=("auto"===i||"scroll"===i)&&r.scrollWidth>r.clientWidth;if(o||l){t=!0;break}r=r.parentElement}if(t)return}o.isWheelScrolling=!0,Yn(this),o.wheelScrollTimeout&&clearTimeout(o.wheelScrollTimeout),o.wheelScrollTimeout=setTimeout(()=>{o.isWheelScrolling=!1,o.wheelScrollTimeout=void 0},100)},{passive:!0}),i.virtualTable=void 0===e.virtualTable||!!e.virtualTable,i.estimatedRowHeight=e.estimatedRowHeight||void 0,i.rowsBufferSize=e.rowsBufferSize||3,i.minColumnWidth=Math.max(e.minColumnWidth||35,0),i.maxStickyColumnRelativeWidth=e.maxStickyColumnRelativeWidth||null,i.columnAutoWidthExtraSize=e.columnAutoWidthExtraSize||0,i.resizeAreaWidth=e.resizeAreaWidth||8,i.resizeAreaDoubleClickDuration=e.resizeAreaDoubleClickDuration||300,i.autoFitColumnOnResizeDoubleClick=void 0!==e.autoFitColumnOnResizeDoubleClick&&!!e.autoFitColumnOnResizeDoubleClick,i.resizableColumns=void 0===e.resizableColumns||!!e.resizableColumns,i.movableColumns=void 0===e.movableColumns||!!e.movableColumns;const s=null!==(r=e.maxColumnsSortCount)&&void 0!==r?r:e.sortableColumns;i.sortableColumns=void 0===s?1:Number(s)||1,i.adjustColumnWidthForSortArrow=void 0===e.adjustColumnWidthForSortArrow||!!e.adjustColumnWidthForSortArrow,i.convertColumnWidthsToRelative=void 0!==e.convertColumnWidthsToRelative&&!!e.convertColumnWidthsToRelative,i.autoFillTableWidth=void 0!==e.autoFillTableWidth&&!!e.autoFillTableWidth,i.autoFillLastColumn=void 0===e.autoFillLastColumn||!!e.autoFillLastColumn,i.allowCancelSort=void 0===e.allowCancelSort||!!e.allowCancelSort,i.cellClasses=void 0===e.cellClasses?"":e.cellClasses,i.resizerClassName=void 0===e.resizerClassName?"dgtable-resize":e.resizerClassName,i.tableClassName=void 0===e.tableClassName?"dgtable":e.tableClassName,i.allowCellPreview=void 0===e.allowCellPreview||e.allowCellPreview,i.allowHeaderCellPreview=void 0===e.allowHeaderCellPreview||e.allowHeaderCellPreview,i.cellPreviewClassName=void 0===e.cellPreviewClassName?"dgtable-cell-preview":e.cellPreviewClassName,i.cellPreviewAutoBackground=void 0===e.cellPreviewAutoBackground||e.cellPreviewAutoBackground,i.onComparatorRequired=void 0===e.onComparatorRequired?null:e.onComparatorRequired,i.customSortingProvider=void 0===e.customSortingProvider?null:e.customSortingProvider,i.width=void 0===e.width?Vn.NONE:e.width,i.relativeWidthGrowsToFillWidth=void 0===e.relativeWidthGrowsToFillWidth||!!e.relativeWidthGrowsToFillWidth,i.relativeWidthShrinksToFillWidth=void 0!==e.relativeWidthShrinksToFillWidth&&!!e.relativeWidthShrinksToFillWidth,this.setCellFormatter(e.cellFormatter),this.setHeaderCellFormatter(e.headerCellFormatter),this.setFilter(e.filter),i.height=e.height,this.setColumns(e.columns||[],!1);let a=[];const u=null!==(n=e.sortedColumns)&&void 0!==n?n:e.sortColumn;if(u){let e=Array.isArray(u)?u:[u];for(let t=0,r=e.length;t<r;t++){var d;let r=e[t];"string"==typeof r&&(r={column:r,descending:!1});let n=o.columns.get(r.column);n&&a.push({column:r.column,comparePath:n.comparePath||n.dataPath,descending:null!==(d=r.descending)&&void 0!==d&&d})}}o.rows=new Dn({sortColumn:a}),o.rows.onComparatorRequired=(e,t,r)=>{if(i.onComparatorRequired)return i.onComparatorRequired(e,t,r)},o.rows.customSortingProvider=(e,t)=>i.customSortingProvider?i.customSortingProvider(e,t):t(e),o.filteredRows=null,o.scrollbarWidth=0,o._lastVirtualScrollHeight=0,function(e){const t=e._p,r=t=>{let r=t.currentTarget,n=t.relatedTarget;n===r||r.contains(n)||r[Mn]&&(n===r[Mn]||r[Mn].contains(n))||function(e,t,r,n){const i=e._o,o=e._p;if(o.isWheelScrolling)return;const l=t.firstElementChild;if(!l)return;if(!(l.scrollWidth-l.clientWidth>1||l.scrollHeight-l.clientHeight>1))return;Yn(e),o.abortCellPreview=!1;const s=t.parentElement;if(!s)return;const a=null===(r=o.visibleColumns[Un.call(s.childNodes,t)])||void 0===r?void 0:r.name,u=a?o.columns.get(a):null;if(!u)return;const d=s.index;if(e.emit("cellhoveroverflow",{name:a,rowIndex:null!=d?d:null,rowData:null==d?null:o.rows[d],cell:t,cellEl:l}),!1===u.allowPreview)return;const c=Xn("div");c.innerHTML=t.innerHTML,c.className=i.cellPreviewClassName+" "+(u.cellClasses||"");const h=t.classList.contains(`${i.tableClassName}-header-cell`);h&&(c.classList.add("header"),t.classList.contains("sortable")&&c.classList.add("sortable"),c.draggable=!0,bi(e,c));const m=getComputedStyle(t),f=getComputedStyle(l),v="right"===m.float,p=v?"right":"left",g=parseFloat(m.paddingLeft)||0,b=parseFloat(m.paddingRight)||0,C=parseFloat(m.paddingTop)||0,w=parseFloat(m.paddingBottom)||0;let y=l.scrollWidth+(t.clientWidth-l.offsetWidth);const W="border-box"===m.boxSizing;if(W?c.style.boxSizing="border-box":(y-=g+b,c.style.marginTop=(parseFloat(m.borderTopWidth)||0)+"px"),!o.transparentBgColor1){const e=document.createElement("div");document.body.appendChild(e),e.style.backgroundColor="transparent",o.transparentBgColor1=getComputedStyle(e).backgroundColor,e.style.backgroundColor="rgba(0,0,0,0)",o.transparentBgColor2=getComputedStyle(e).backgroundColor,e.remove()}const S={"box-sizing":W?"border-box":"content-box",width:y+"px","min-height":Math.max(sn(t),/%/.test(m.minHeight)?0:parseFloat(m.minHeight)||0)+"px","padding-left":g+"px","padding-right":b+"px","padding-top":C+"px","padding-bottom":w+"px",overflow:"hidden",position:"absolute","z-index":"-1",[p]:"0",top:"0",cursor:m.cursor};let _=m.backgroundColor;_!==o.transparentBgColor1&&_!==o.transparentBgColor2||(_=getComputedStyle(s).backgroundColor),_!==o.transparentBgColor1&&_!==o.transparentBgColor2||(_="#fff"),S["background-color"]=_,nn(c,S),c.firstChild&&nn(c.firstChild,{direction:f.direction,"white-space":f.whiteSpace,"min-height":f.minHeight,"line-height":f.lineHeight,font:f.font}),e.el.appendChild(c),h&&Ni(c),c.rowVIndex=s.vIndex,c.rowIndex=d,c.columnName=a;try{const e=qn.saveSelection(t);e&&qn.restoreSelection(c,e)}catch{}if(e.emit("cellpreview",{el:c.firstElementChild,name:c.columnName,rowIndex:null!=d?d:null,rowData:null==d?null:o.rows[d],cell:t,cellEl:l}),o.abortCellPreview)return void c.remove();null!=d&&c.addEventListener("click",t=>{e.emit("rowclick",{event:t,filteredRowIndex:s.vIndex,rowIndex:d,rowEl:s,rowData:o.rows[d]})});const x=e.el,R=x===window?document:x,I=getComputedStyle(x),N=cn(t),E=cn(x);if(v){const e=window.innerWidth;N.right=e-(N.left+ln(t,!0,!0,!0)),E.right=e-(E.left+ln(x,!0,!0,!0))}N.left-=parseFloat(I.borderLeftWidth)||0,"right"===p&&void 0!==N.right&&void 0!==E.right&&(N.right-=parseFloat(I.borderRightWidth)||0),N.top-=parseFloat(I.borderTopWidth)||0,"left"===p?N.left+=parseFloat(m.borderLeftWidth)||0:void 0!==N.right&&(N.right+=parseFloat(m.borderRightWidth)||0),N.top+=parseFloat(m.borderTopWidth)||parseFloat(m.borderBottomWidth)||0,N.left-=E.left,"right"===p&&void 0!==N.right&&void 0!==E.right&&(N.right-=E.right),N.top-=E.top;const k=ln(x,!1,!1,!1)-ln(c,!0,!0,!0),P="left"===p?N.left:null!==(n=N.right)&&void 0!==n?n:0,F=P<0?0:P>k?k:P;"left"===p?N.left=F:N.right=F;const T=sn(t,!0,!0,!0),z=("scrollTop"in R?R.scrollTop:0)+sn(x,!0)-T;N.top>z&&(N.top=Math.max(0,z));const M={top:N.top+"px","z-index":9999};M[p]=("left"===p?N.left:N.right)+"px",nn(c,M),c[An]=t,o.cellPreviewCell=c,t[Mn]=c,o._bindCellHoverOut(t),o._bindCellHoverOut(c)}(e,r)},n=t=>{let r=t.currentTarget[An]||t.currentTarget,n=t.relatedTarget;n===e.el||r.contains(n)||r[Mn]&&(n===r[Mn]||r[Mn].contains(n))||function(e){Yn(e)}(e)};t._bindCellHoverIn=e=>{e[Fn]||e.addEventListener("mouseover",e[Fn]=r)},t._unbindCellHoverIn=e=>{e[Fn]&&(e.removeEventListener("mouseover",e[Fn]),e[Fn]=null)},t._bindCellHoverOut=e=>{e[Tn]||e.addEventListener("mouseout",e[Tn]=n)},t._unbindCellHoverOut=e=>{e[Tn]&&(e.removeEventListener("mouseout",e[Tn]),e[Tn]=null)}}(this)}on(e,t){return this[On]||this._p.mitt.on(e,t),this}once(e,t){if(this[On])return this;const r=n=>{this._p.mitt.off(e,r),t(n)};return this._p.mitt.on(e,r),this}off(e,t){return this[On]||(e||t?this._p.mitt.off(e,t):this._p.mitt.all.clear()),this}emit(e,t){return this[On]||this._p.mitt.emit(e,t),this}destroy(){var e,t,r;const n=this._p,i=this.el;if(this[On]||!n)return this;if(Zn(this),null!==(e=n.virtualListHelper)&&void 0!==e&&e.destroy(),n.virtualListHelper=null,ui(this),null!==(t=n.table)&&void 0!==t&&t.remove(),null!==(r=n.tbody)&&void 0!==r&&r.remove(),n.workerListeners){for(let e=0;e<n.workerListeners.length;e++){let t=n.workerListeners[e];t.worker.removeEventListener("message",t.listener,!1)}n.workerListeners.length=0}n.rows.length=n.columns.length=0,n._deferredRender&&clearTimeout(n._deferredRender);for(let e in this)zi.call(this,e)&&(this[e]=null);return this[On]=!0,i&&i.remove(),this}close(){this.destroy()}remove(){this.destroy()}render(){const e=this._o,t=this._p;if(!this.el.offsetParent)return t._deferredRender||(t._deferredRender=setTimeout(()=>{t._deferredRender=null,!this[On]&&this.el.offsetParent&&this.render()})),this;if(!0===t.tableSkeletonNeedsRendering){var r;t.tableSkeletonNeedsRendering=!1,e.width===Vn.AUTO&&pi(this);let o=t.table&&t.table.parentNode?t.table.scrollTop:NaN,l=t.table&&t.table.parentNode?(n=t.table,void 0===i&&(i="rtl"===getComputedStyle(n).direction),i?n.scrollWidth-n.clientWidth-tn(n,i):tn(n,i)):NaN;!function(e,t){const r=e._p,n=e._o;null!==(t=r.virtualListHelper)&&void 0!==t&&t.destroy(),r.virtualListHelper=null,r.table&&n.virtualTable&&(r.table.remove(),r.table=void 0,r.tbody=void 0),ui(e),r.currentTouchId=null,r.header&&r.header.remove();const i=n.tableClassName,o=ai("div"),l=ai("div");o.className=`${i}-header`,l.className=`${i}-header-row`,r.header=o,r.headerRow=l,o.appendChild(l),e.el.prepend(o),xi(e.el),n.width===Vn.SCROLL?e.el.style.overflow="hidden":e.el.style.overflow="",!n.height&&n.virtualTable&&(n.height=sn(e.el,!0))}(this),function(e){const t=e._p,r=e._o,n=r.tableClassName;if(r.virtualTable&&!t.virtualRowHeight){const r=()=>{const e=ai("div"),t=e.appendChild(ai("div")),r=t.appendChild(ai("div"));return e.className=`${n}-row`,t.className=`${n}-cell`,r.innerHTML="0",e.style.visibility="hidden",e.style.position="absolute",e},i=ai("div");i.className=e.el.className,nn(i,{"z-index":"-1",position:"absolute",left:"0",top:"-9999px",width:"1px",overflow:"hidden"});const o=ai("div");o.className=n,i.appendChild(o);const l=ai("div");l.className=`${n}-body`,l.style.width="99999px",o.appendChild(l),document.body.appendChild(i);const s=r(),a=r(),u=r();l.appendChild(s),l.appendChild(a),l.appendChild(u),t.virtualRowHeight=sn(a,!0,!0,!0),i.remove()}if(!t.table){var i;const o=document.createDocumentFragment(),l=ai("div");l.className=n,r.virtualTable&&(l.className+=" virtual");const s=getComputedStyle(l);let a=(null!==(i=r.height)&&void 0!==i?i:0)-sn(t.header,!0,!0,!0);"border-box"!==s.boxSizing&&(a-=parseFloat(s.borderTopWidth)||0,a-=parseFloat(s.borderBottomWidth)||0,a-=parseFloat(s.paddingTop)||0,a-=parseFloat(s.paddingBottom)||0),nn(l,{height:r.height?a+"px":"auto",display:"block",overflowY:"auto",overflowX:r.width===Vn.SCROLL?"auto":"hidden"}),o.appendChild(l);const u=ai("div");u.className=r.tableClassName+"-body",u.style.minHeight="1px",t.table=l,t.tbody=u,xi(u),xi(l),l.appendChild(u),e.el.appendChild(o),function(e,t){const r=e._p,n=e._o,i=n.tableClassName,o=i+"-row",l=i+"-row-alt",s=i+"-cell",a=i+"-sticky";let u=r.visibleColumns,d=u.length;r.notifyRendererOfColumnsConfig=()=>{u=r.visibleColumns,d=u.length;for(let e=0;e<d;e++){const t=u[e];t._finalWidth=t.actualWidthConsideringScrollbarWidth||t.actualWidth}},r.virtualListHelper=new wn({list:r.table,itemsParent:r.tbody,autoVirtualWrapperWidth:!1,virtual:n.virtualTable,buffer:n.rowsBufferSize,estimatedItemHeight:n.estimatedRowHeight?n.estimatedRowHeight:r.virtualRowHeight||40,itemElementCreatorFn:()=>ai("div"),onItemRender:(t,i)=>{const c=r.filteredRows||r.rows,h=!!r.filteredRows,m=r.isStickyColumns;t.className=o,i%2==1&&(t.className+=" "+l);const f=c[i],v=h?f[Hn]:i;t.vIndex=i,t.index=v;for(let e=0;e<d;e++){var p;const i=u[e],o=ai("div");if(o.columnName=i.name,o.setAttribute("data-column",i.name),o.className=s,o.style.width=(null!==(p=i._finalWidth)&&void 0!==p?p:0)+"px",i.cellClasses&&(o.className+=" "+i.cellClasses),i.stickyPos){o.className+=" "+a,o.style.position="sticky",o.style[i.stickyPos.absDirection]=i.stickyPos.offset+"px";const t=null==m?void 0:m.get(e);"start"===t&&!r.lastIsRtl||"end"===t&&r.lastIsRtl?o.classList.add("is-sticky-left"):("start"===t&&r.lastIsRtl||"end"===t&&!r.lastIsRtl)&&o.classList.add("is-sticky-right")}r._bindCellHoverIn(o),o.appendChild(ai("div")).innerHTML=Si(n,f,i),t.appendChild(o)}t.addEventListener("click",t[zn]=r=>{e.emit("rowclick",{event:r,filteredRowIndex:i,rowIndex:v,rowEl:t,rowData:f})}),e.emit("rowcreate",{filteredRowIndex:i,rowIndex:v,rowEl:t,rowData:f})},onItemUnrender:t=>{t[zn]&&t.removeEventListener("click",t[zn]),function(e,t){const r=e._p;for(let e=0,n=t.childNodes,i=n.length;e<i;e++)r._unbindCellHoverIn(n[e])}(e,t),e.emit("rowdestroy",t)},onScrollHeightChange:t=>{t>r._lastVirtualScrollHeight&&!r.scrollbarWidth&&ci(e),r._lastVirtualScrollHeight=t}}),r.virtualListHelper.setCount((null!==(t=r.filteredRows)&&void 0!==t?t:r.rows).length),r.notifyRendererOfColumnsConfig()}(e)}}(this),this.tableWidthChanged(!0,!1),function(e){const t=e._p,r=e._o,n=r.tableClassName+"-header-cell",i=t.headerRow;for(let l=0;l<t.visibleColumns.length;l++){const s=t.visibleColumns[l];if(s.visible){var o;const a=ai("div");a.draggable=!0,a.className=n,a.style.width=(null!==(o=s.actualWidth)&&void 0!==o?o:0)+"px",r.sortableColumns&&s.sortable&&(a.className+=" sortable"),a.columnName=s.name,a.setAttribute("data-column",s.name);const u=ai("div");u.innerHTML=r.headerCellFormatter(s.label,s.name),a.appendChild(u),t._bindCellHoverIn(a),i.appendChild(a),t.visibleColumns[l].element=a,bi(e,a),Ni(a)}}mi(e),e.emit("headerrowcreate",i)}(this),t.virtualListHelper.setCount((null!==(r=t.filteredRows)&&void 0!==r?r:t.rows).length),di(this),ci(this,!0),hi(this,!0);for(let e=0;e<t.rows.sortColumn.length;e++)gi(this,t.rows.sortColumn[e].column,t.rows.sortColumn[e].descending);e.adjustColumnWidthForSortArrow&&t.rows.sortColumn.length?this.tableWidthChanged(!0):e.virtualTable||this.tableWidthChanged(),isNaN(o)||(t.table.scrollTop=o),isNaN(l)||(rn(t.table,l),rn(t.header,l)),mi(this),this.emit("renderskeleton")}var n,i;return t.virtualListHelper.render(),this.emit("render"),this}clearAndRender(e){var t;let r=this._p;return r.tableSkeletonNeedsRendering=!0,null!==(t=r.notifyRendererOfColumnsConfig)&&void 0!==t&&t.call(r),(void 0===e||e)&&this.render(),this}setColumns(e,t){const r=this._p;e=e||[];let n=new jn;for(let t=0,r=0;t<e.length;t++){let i=e[t],o=wi(this._o,i);void 0!==i.order?(i.order>r&&(r=i.order+1),o.order=i.order):o.order=r++,n.push(o)}return n.normalizeOrder(),r.columns=n,r.visibleColumns=n.getVisibleColumns(),yi(this),this.clearAndRender(t),this}addColumn(e,t,r){const n=this._p;let i=n.columns;if(e&&!i.get(e.name)){let o=null;void 0!==t&&(o="string"==typeof t?i.get(t):i.getByOrder(t));let l=wi(this._o,e);l.order=o?o.order:i.getMaxOrder()+1;for(let e=i.getMaxOrder(),t=l.order;e>=t;e--){let t=i.getByOrder(e);t&&t.order++}i.push(l),i.normalizeOrder(),n.visibleColumns=i.getVisibleColumns(),yi(this),this.clearAndRender(r),this.emit("addcolumn",l.name)}return this}removeColumn(e,t){const r=this._p;let n=r.columns,i=n.indexOf(e);return i>-1&&(n.splice(i,1),n.normalizeOrder(),r.visibleColumns=n.getVisibleColumns(),yi(this),this.clearAndRender(t),this.emit("removecolumn",e)),this}setColumnLabel(e,t){let r=this._p.columns.get(e);if(r&&(r.label=void 0===t?r.name:t,r.element))for(let e=0;e<r.element.firstChild.childNodes.length;e++){let t=r.element.firstChild.childNodes[e];if(3===t.nodeType){t.textContent=r.label;break}}return this}moveColumn(e,t,r=!0){const n=this._o,i=this._p;let o,l,s=i.columns,a=r?i.visibleColumns:s.getColumns();if("string"==typeof e?o=s.get(e):"number"==typeof e&&(o=a[e]),"string"==typeof t?l=s.get(t):"number"==typeof t&&(l=a[t]),o&&l&&e!==t){let e=o.order,t=l.order,r=s.moveColumn(o,l).getVisibleColumns();if(i.visibleColumns.length!==r.length||i.visibleColumns.some((e,t)=>e!==r[t]))if(i.visibleColumns=r,yi(this),n.virtualTable)this.clearAndRender();else{var u,d;const r=mn(i.headerRow,`>div.${n.tableClassName}-header-cell`);let o=e<t?t+1:t,l=e;r[0].parentNode.insertBefore(r[l],r[o]);let s=i.visibleColumns[e],a=(null!==(u=s.actualWidthConsideringScrollbarWidth||s.actualWidth)&&void 0!==u?u:0)+"px",c=i.visibleColumns[t],h=(null!==(d=c.actualWidthConsideringScrollbarWidth||c.actualWidth)&&void 0!==d?d:0)+"px",m=i.tbody.childNodes;for(let r=0,n=m.length;r<n;r++){let n=m[r];1===n.nodeType&&(n.insertBefore(n.childNodes[l],n.childNodes[o]),n.childNodes[t].firstChild.style.width=h,n.childNodes[e].firstChild.style.width=a)}this.tableWidthChanged(!0)}this.emit("movecolumn",{name:o.name,src:e,dest:t})}return this}setColumnVisible(e,t){const r=this._p;let n=r.columns.get(e);return t=!!t,n&&!!n.visible!==t&&(n.visible=t,r.visibleColumns=r.columns.getVisibleColumns(),this.emit(t?"showcolumn":"hidecolumn",e),yi(this),this.clearAndRender()),this}isColumnVisible(e){let t=this._p.columns.get(e);return!!t&&t.visible}setMinColumnWidth(e){let t=this._o;return e=Math.max(e,0),t.minColumnWidth!==e&&(t.minColumnWidth=e,this.tableWidthChanged(!0)),this}getMinColumnWidth(){return this._o.minColumnWidth}setColumnAutoWidthExtraSize(e){let t=this._o;return e=Math.max(e,0),t.columnAutoWidthExtraSize!==e&&(t.columnAutoWidthExtraSize=e,this.tableWidthChanged(!0)),this}getColumnAutoWidthExtraSize(){return this._o.columnAutoWidthExtraSize}setResizeAreaWidth(e){let t=this._o;return e=Math.max(e,0),t.resizeAreaWidth!==e&&(t.resizeAreaWidth=e,this.tableWidthChanged(!0)),this}getResizeAreaWidth(){return this._o.resizeAreaWidth}setResizeAreaDoubleClickDuration(e){let t=this._o;return e=Math.max(e,0),t.resizeAreaDoubleClickDuration!==e&&(t.resizeAreaDoubleClickDuration=e,this.tableWidthChanged(!0)),this}getResizeAreaDoubleClickDuration(){return this._o.resizeAreaDoubleClickDuration}setMaxStickyColumnRelativeWidth(e){let t=this._o;return e=e||null,t.maxStickyColumnRelativeWidth!==e&&(t.maxStickyColumnRelativeWidth=e,this.tableWidthChanged(!0)),this}getMaxStickyColumnRelativeWidth(){return this._o.maxStickyColumnRelativeWidth}setColumnWidth(e,t){let r=this._p.columns.get(e);if(r){let e=Ci(t,r.ignoreMin?0:this._o.minColumnWidth),n=Ti(r);r.width=e.width,r.widthMode=e.mode,r.unconvertedWidth=null,r.unconvertedWidthMode=null;let i=Ti(r);n!==i&&this.tableWidthChanged(!0),this.emit("columnwidth",{name:r.name,width:i,oldWidth:n})}return this}autoFitColumn(e){const t=this._p,r=t.filteredRows||t.rows,n=t.columns.get(e);if(!n||r.length<1)return this;const i=Ei(this,n,r);return i>0&&this.setColumnWidth(e,i),this}getColumnWidth(e){let t=this._p.columns.get(e);return t?Ti(t):null}getColumnConfig(e){let t=this._p.columns.get(e);if(t){var r,n,i;const e=t.width,o=t.widthMode;null!=t.unconvertedWidth&&(t.width=t.unconvertedWidth,t.widthMode=null!==(r=t.unconvertedWidthMode)&&void 0!==r?r:t.widthMode);const l=Ti(t);return null!=t.unconvertedWidth&&(t.width=e,t.widthMode=o),{name:t.name,label:t.label,width:l,dataPath:null===(n=t.dataPath)||void 0===n?void 0:n.join("."),comparePath:null===(i=t.comparePath)||void 0===i?void 0:i.join("."),resizable:t.resizable,movable:t.movable,sortable:t.sortable,visible:t.visible,cellClasses:t.cellClasses,ignoreMin:t.ignoreMin,sticky:t.sticky,order:t.order}}return null}getColumnsConfig(){const e=this._p;let t={};for(let r=0;r<e.columns.length;r++)t[e.columns[r].name]=this.getColumnConfig(e.columns[r].name);return t}setMaxColumnSortCount(e){const t=this._p,r=this._o;if(r.sortableColumns!==e&&(r.sortableColumns=e,t.table)){const e=mn(t.headerRow,`>div.${r.tableClassName}-header-cell`);for(let n=0,i=e.length;n<i;n++)e[n].classList[r.sortableColumns>0&&t.visibleColumns[n].sortable?"add":"remove"]("sortable")}return this}getMaxColumnSortCount(){return this._o.sortableColumns}setSortableColumns(e){return this.setMaxColumnSortCount(e)}getSortableColumns(){return this.getMaxColumnSortCount()}setMovableColumns(e){let t=this._o;return e=void 0===e||!!e,t.movableColumns!==e&&(t.movableColumns=e),this}getMovableColumns(){return this._o.movableColumns}setResizableColumns(e){let t=this._o;return e=void 0===e||!!e,t.resizableColumns!==e&&(t.resizableColumns=e),this}getResizableColumns(){return this._o.resizableColumns}getConvertColumnWidthsToRelative(){return this._o.convertColumnWidthsToRelative}setConvertColumnWidthsToRelative(e,t=!0){let r=this._o;return e=!!e,r.convertColumnWidthsToRelative!==e&&(r.convertColumnWidthsToRelative=e,t&&this.tableWidthChanged(!0)),this}setOnComparatorRequired(e){let t=this._o;return t.onComparatorRequired!==e&&(t.onComparatorRequired=e),this}setCustomSortingProvider(e){let t=this._o;return t.customSortingProvider!==e&&(t.customSortingProvider=e),this}sort(e,t,r){const n=this._o,i=this._p;let o=i.columns.get(e),l=i.rows.sortColumn.map(e=>({column:e.column,descending:e.descending}));if(o){if(r){for(let e=0;e<l.length;e++)if(l[e].column===o.name){e<l.length-1?l.length=0:(t=l[l.length-1].descending,l.splice(l.length-1,1));break}(n.sortableColumns>0&&l.length>=n.sortableColumns||l.length>=i.visibleColumns.length)&&(l.length=0)}else l.length=0;t=void 0!==t&&t,l.push({column:o.name,descending:!!t})}else l.length=0;return this.setSortedColumns(l)}resort(){const e=this._p;let t=e.columns,r=e.rows.sortColumn;if(r.length){var n;for(let e=0;e<r.length;e++)t.get(r[e].column)||r.splice(e--,1);e.rows.sortColumn=r,r.length&&(e.rows.sort(),e.filteredRows&&(e.filteredRows.sortColumn=e.rows.sortColumn,e.filteredRows.onComparatorRequired=e.rows.onComparatorRequired,e.filteredRows.customSortingProvider=e.rows.customSortingProvider,e.filteredRows.sort())),null===(n=e.virtualListHelper)||void 0===n||n.invalidate();let i=[];for(let e=0;e<r.length;e++)i.push({column:r[e].column,descending:r[e].descending});this.emit("sort",{sorts:i,resort:!0})}return this}setSortedColumns(e,t={immediate:!0,render:!0}){var r;const n=this._o,i=this._p;let o=i.columns,l=e.filter(e=>o.get(e.column)).map(e=>{let t=o.get(e.column);return{column:t.name,comparePath:t.comparePath||t.dataPath,descending:!!e.descending}});n.sortableColumns>0&&l.length>n.sortableColumns&&(l.length=n.sortableColumns),pi(this);for(let e=0;e<l.length;e++)gi(this,l[e].column,l[e].descending);n.adjustColumnWidthForSortArrow&&!i.tableSkeletonNeedsRendering&&this.tableWidthChanged(!0),i.rows.sortColumn=l,l.length&&t.immediate&&(i.rows.sort(),i.filteredRows&&(i.filteredRows.sortColumn=i.rows.sortColumn,i.filteredRows.onComparatorRequired=i.rows.onComparatorRequired,i.filteredRows.customSortingProvider=i.rows.customSortingProvider,i.filteredRows.sort()),null!==(r=i.virtualListHelper)&&void 0!==r&&r.invalidate(),i.virtualListHelper&&t.render&&i.virtualListHelper.render());let s=[];for(let e=0;e<l.length;e++)s.push({column:l[e].column,descending:l[e].descending});return this.emit("sort",{sorts:s}),this}getSortedColumns(){const e=this._p;let t=[];for(let r=0;r<e.rows.sortColumn.length;r++){let n=e.rows.sortColumn[r];t.push({column:n.column,descending:n.descending})}return t}setCellFormatter(e){if(!e){const t=e=>"string"==typeof e?kn(e):e;t[Pn]=!0,e=t}return this._o.cellFormatter=e,this}setHeaderCellFormatter(e){return this._o.headerCellFormatter=e||function(e){return"string"==typeof e?kn(e):e},this}setFilter(e){return this._o.filter=e,this}filter(e){const t=this._p;let r=this._o.filter||Bn,n=!!t.filteredRows;return t.filteredRows&&(t.filteredRows=null),t.filterArgs=null==e?null:"object"!=typeof e||Array.isArray(e)?e:Object.assign({},e),null!==t.filterArgs?(t.filteredRows=t.rows.filteredCollection(r,t.filterArgs),(n||t.filteredRows)&&(this.clearAndRender(),this.emit("filter",e))):(t.filterArgs=null,t.filteredRows=null,this.clearAndRender(),this.emit("filterclear",{})),this}clearFilter(){const e=this._p;return e.filteredRows&&(e.filterArgs=null,e.filteredRows=null,this.clearAndRender(),this.emit("filterclear",{})),this}getHtmlForRowCell(e,t){const r=this._p;if(e<0||e>r.rows.length-1)return null;let n=r.columns.get(t);if(!n)return null;let i=r.rows[e];return Si(this._o,i,n)}getHtmlForRowDataCell(e,t){let r=this._p.columns.get(t);return r?Si(this._o,e,r):null}getRowYPos(e){return this._p.virtualListHelper.getItemPosition(e)||null}getDataForRow(e){const t=this._p;return e<0||e>t.rows.length-1?null:t.rows[e]}getRowCount(){const e=this._p;return e.rows?e.rows.length:0}getIndexForRow(e){return this._p.rows.indexOf(e)}getFilteredRowCount(){const e=this._p;return(e.filteredRows||e.rows).length}getIndexForFilteredRow(e){const t=this._p;return(t.filteredRows||t.rows).indexOf(e)}getDataForFilteredRow(e){const t=this._p;return e<0||e>(t.filteredRows||t.rows).length-1?null:(t.filteredRows||t.rows)[e]}getHeaderRowElement(){return this._p.headerRow}addRows(e,t,r,n){let i=this._p;"boolean"==typeof t&&(n=r,r=t,t=-1),"number"!=typeof t&&(t=-1),(t<0||t>i.rows.length)&&(t=i.rows.length),n=void 0===n||!!n;const o=(Array.isArray(e)?e:[e]).length;return e&&(i.rows.add(e,t),i.filteredRows||r&&i.rows.sortColumn.length?(r&&i.rows.sortColumn.length?this.resort():Wi(this),i.tableSkeletonNeedsRendering=!0,n&&this.render()):n&&(i.virtualListHelper.addItemsAt(o,t),this._o.virtualTable?(di(this),ci(this),this.render(),hi(this,!1)):i.tbody&&(this.render(),ci(this),hi(this,!0))),this.emit("addrows",{count:o,clear:!1})),this}removeRows(e,t,r){let n=this._p;return"number"!=typeof t||t<=0||e<0||e>n.rows.length-1||(n.rows.splice(e,t),r=void 0===r||!!r,n.filteredRows?(Wi(this),n.tableSkeletonNeedsRendering=!0,r&&this.render()):r&&(n.virtualListHelper.removeItemsAt(t,e),this._o.virtualTable?(di(this),ci(this),this.render(),hi(this,!1)):(this.render(),ci(this),hi(this,!0)))),this}removeRow(e,t){return this.removeRows(e,1,t)}refreshRow(e,t=!0){let r=this._p;if(e<0||e>r.rows.length-1)return this;let n=-1;return r.filteredRows&&-1===(n=r.filteredRows.indexOf(r.rows[e]))||(-1===n&&(n=e),r.virtualListHelper.refreshItemAt(n),t&&r.virtualListHelper.render()),this}getRowElement(e){let t=this._p;if(e<0||e>t.rows.length-1)return null;let r=-1;return t.filteredRows&&-1===(r=t.filteredRows.indexOf(t.rows[e]))?null:(-1===r&&(r=e),t.virtualListHelper.getItemElementAt(r)||null)}refreshAllVirtualRows(){return this._p.virtualListHelper.invalidate().render(),this}setRows(e,t){let r=this._p;return r.rows.reset(e),t&&r.rows.sortColumn.length?this.resort():Wi(this),this.clearAndRender().emit("addrows",{count:e.length,clear:!0}),this}tableWidthChanged(e,t){let r=this._o,n=this._p,i=ki(this),o=i,l=0;if(!n.table)return this;t=void 0===t||t;let s=0;if(n.tbody||(t=!1),t&&(s=parseFloat(n.tbody.style.minWidth)||0),o!==n.lastDetectedWidth||e){var a;n.lastDetectedWidth=i;let e=0,h=[],m=0,f=0;for(let e=0;e<n.columns.length;e++)n.columns[e].actualWidthConsideringScrollbarWidth=null;for(let t=0;t<n.visibleColumns.length;t++){var u;let i=n.visibleColumns[t];if(null!=i.unconvertedWidth&&(i.width=i.unconvertedWidth,i.widthMode=null!==(u=i.unconvertedWidthMode)&&void 0!==u?u:i.widthMode,i.unconvertedWidth=null,i.unconvertedWidthMode=null),1===i.widthMode){let n=i.width;n+=i.arrowProposedWidth||0,!i.ignoreMin&&n<r.minColumnWidth&&(n=r.minColumnWidth),o-=n,e+=n,n!==i.actualWidth&&(i.actualWidth=n,h.push(t))}else if(0===i.widthMode){let l=Ei(this,i);i===n.visibleColumns[n.visibleColumns.length-1]&&(l+=n.scrollbarWidth),o-=l,e+=l,l!==i.actualWidth&&(i.actualWidth=l,r.convertColumnWidthsToRelative||h.push(t))}else 2===i.widthMode?(m+=i.width,l++):3===i.widthMode&&f++}if(r.convertColumnWidthsToRelative)for(let t=0;t<n.visibleColumns.length;t++){let r=n.visibleColumns[t];if(0===r.widthMode){const t=r.width,n=r.widthMode;null==r.unconvertedWidth&&(r.unconvertedWidth=t,r.unconvertedWidthMode=n),r.widthMode=2,o+=r.actualWidth,r.width=r.actualWidth/e,m+=r.width,l++}}if(l&&(m<1&&!f&&r.relativeWidthGrowsToFillWidth||m>1&&r.relativeWidthShrinksToFillWidth))for(let e=0;e<n.visibleColumns.length;e++){let t=n.visibleColumns[e];2===t.widthMode&&(null==t.unconvertedWidth&&(t.unconvertedWidth=t.width,t.unconvertedWidthMode=t.widthMode),t.width/=m)}let v=Math.max(0,o);0===v&&(v=n.table.clientWidth);let p=r.minColumnWidth/v;if(Number.isFinite(p)||(p=0),p>0){let e,t=0;for(let e=0;e<n.visibleColumns.length;e++){let r=n.visibleColumns[e];2===r.widthMode&&!r.ignoreMin&&r.width<p&&(t+=p-r.width,r.width=p)}for(let r=0;r<n.visibleColumns.length;r++){let i=n.visibleColumns[r];2===i.widthMode&&!i.ignoreMin&&i.width>p&&t>0&&(null==i.unconvertedWidth&&(i.unconvertedWidth=i.width,i.unconvertedWidthMode=i.widthMode),e=Math.min(t,i.width-p),i.width-=e,t-=e)}}if(!f&&r.autoFillTableWidth&&o>0){let e=0,t=o;for(let r=0;r<n.visibleColumns.length;r++){let i=n.visibleColumns[r];i.resizable||1!==i.widthMode||(e+=i.width),2===i.widthMode&&(t-=Math.round(v*i.width))}let r=(i-e)/(i-t-e)||NaN;for(let e=0;e<n.visibleColumns.length&&t>0;e++){let t=n.visibleColumns[e];if(t.resizable||1!==t.widthMode)if(2===t.widthMode)null==t.unconvertedWidth&&(t.unconvertedWidth=t.width,t.unconvertedWidthMode=t.widthMode),t.width*=r;else{let n=t.actualWidth*r;t.actualWidth!==n&&(t.actualWidth=n,-1===h.indexOf(e)&&h.push(e))}}}for(let e=0;e<n.visibleColumns.length;e++){let t=n.visibleColumns[e];if(2===t.widthMode){let r=Math.round(v*t.width);o-=r,l--,0===l&&1===o&&(r++,o--),-1===o&&(r--,o++),r!==t.actualWidth&&(t.actualWidth=r,h.push(e))}}if(f){let e=Math.max(0,o),t=f;for(let i=0;i<n.visibleColumns.length;i++){let o=n.visibleColumns[i];if(3===o.widthMode){let n=Math.floor(e/t);!o.ignoreMin&&n<r.minColumnWidth&&(n=r.minColumnWidth),e-=n,t--,n!==o.actualWidth&&(o.actualWidth=n,h.push(i))}}}if(r.autoFillLastColumn&&n.visibleColumns.length){var d;let e=0;for(let t=0;t<n.visibleColumns.length;t++){var c;e+=null!==(c=n.visibleColumns[t].actualWidth)&&void 0!==c?c:0}const t=n.visibleColumns.length-1,r=n.visibleColumns[t],o=i-e;o>0&&(r.actualWidth=(null!==(d=r.actualWidth)&&void 0!==d?d:0)+o,-1===h.indexOf(t)&&h.push(t))}if(n.visibleColumns.length&&(n.visibleColumns[n.visibleColumns.length-1].actualWidthConsideringScrollbarWidth=n.visibleColumns[n.visibleColumns.length-1].actualWidth-(n.scrollbarWidth||0)),null!==(a=n.notifyRendererOfColumnsConfig)&&void 0!==a&&a.call(n),t){let e=Pi(this);s<e&&hi(this,!1);for(let e=0;e<h.length;e++)vi(this,h[e]);s>e&&hi(this,!1)}mi(this)}return this}tableHeightChanged(){let e=this._o,t=this._p;if(!t.table)return this;const r=getComputedStyle(t.table);let n=sn(this.el,!0)-(parseFloat(r.borderTopWidth)||0)-(parseFloat(r.borderBottomWidth)||0);return n!==e.height&&(e.height=n,t.tbody&&(t.tbody.style.height=Math.max(e.height-sn(t.header,!0,!0,!0),1)+"px"),e.virtualTable&&this.clearAndRender()),this}hideCellPreview(){return Yn(this),this}abortCellPreview(){return this.hideCellPreview(),this}cancelColumnResize(){return Zn(this),this}getUrlForElementContent(e){let t,r=document.getElementById(e);if(r){let e=r.textContent;if("function"==typeof Blob)t=new Blob([e||""]);else{const r=window,n=r.BlobBuilder||r.WebKitBlobBuilder||r.MozBlobBuilder||r.MSBlobBuilder;if(!n)return null;const i=new n;i.append(e||""),t=i.getBlob()}return(window.URL||window.webkitURL).createObjectURL(t)}return null}isWorkerSupported(){return window.Worker instanceof Function}createWebWorker(e,t,r){if(this.isWorkerSupported()){let n=this._p,i=new Worker(e),o=e=>{e.data.append?this.addRows(e.data.rows,r):this.setRows(e.data.rows,r)};return i.addEventListener("message",o,!1),n.workerListeners||(n.workerListeners=[]),n.workerListeners.push({worker:i,listener:o}),(t||void 0===t)&&i.postMessage(null),i}return null}unbindWebWorker(e){let t=this._p;if(t.workerListeners)for(let r=0;r<t.workerListeners.length;r++)t.workerListeners[r].worker===e&&(e.removeEventListener("message",t.workerListeners[r].listener,!1),t.workerListeners.splice(r,1),r--);return this}}t(Mi,"VERSION","@@VERSION"),t(Mi,"Width",Vn);class Ai extends Mi{constructor(t){super(t),this.$el=e(this.el).data("dgtable",this).on("remove",()=>this.destroy()),this.on("headerrowdestroy",()=>{var t;const r=null===(t=this._p)||void 0===t?void 0:t.headerRow;r&&e(r).find(`div.${this._o.tableClassName}-header-cell`).remove()})}destroy(){var t,r;return null!==(t=this._p)&&void 0!==t&&t.table&&e(this._p.table).empty(),null!==(r=this._p)&&void 0!==r&&r.tbody&&e(this._p.tbody).empty(),super.destroy()}}export{Ai as default};
1
+ import e from"jquery";function t(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var r,n,i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},o={};function l(){if(n)return r;n=1;var e=function(e){return e&&e.Math===Math&&e};return r=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof i&&i)||e("object"==typeof r&&r)||function(){return this}()||Function("return this")()}var s,a,u,d,c,h,m,f,v={};function p(){return a?s:(a=1,s=function(e){try{return!!e()}catch(e){return!0}})}function g(){if(d)return u;d=1;var e=p();return u=!e(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})}function b(){if(h)return c;h=1;var e=p();return c=!e(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})}function C(){if(f)return m;f=1;var e=b(),t=Function.prototype.call;return m=e?t.bind(t):function(){return t.apply(t,arguments)},m}var w,y,W,S,_,x,R,I,N,E,k,P,F,T,M,A,L,z,H,O,D,$,j,B,V,q,U,X,Y,G,J,K,Q,Z,ee,te,re,ne,ie,oe,le,se={};function ae(){return W?y:(W=1,y=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function ue(){if(_)return S;_=1;var e=b(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return S=e?n:function(e){return function(){return r.apply(e,arguments)}},S}function de(){if(R)return x;R=1;var e=ue(),t=e({}.toString),r=e("".slice);return x=function(e){return r(t(e),8,-1)}}function ce(){return k?E:(k=1,E=function(e){return null==e})}function he(){if(F)return P;F=1;var e=ce(),t=TypeError;return P=function(r){if(e(r))throw new t("Can't call method on "+r);return r}}function me(){if(M)return T;M=1;var e=function(){if(N)return I;N=1;var e=ue(),t=p(),r=de(),n=Object,i=e("".split);return I=t(function(){return!n("z").propertyIsEnumerable(0)})?function(e){return"String"===r(e)?i(e,""):n(e)}:n}(),t=he();return T=function(r){return e(t(r))}}function fe(){if(L)return A;L=1;var e="object"==typeof document&&document.all;return A=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}function ve(){if(H)return z;H=1;var e=fe();return z=function(t){return"object"==typeof t?null!==t:e(t)}}function pe(){if(D)return O;D=1;var e=l(),t=fe();return O=function(r,n){return arguments.length<2?(i=e[r],t(i)?i:void 0):e[r]&&e[r][n];var i},O}function ge(){if(j)return $;j=1;var e=ue();return $=e({}.isPrototypeOf)}function be(){if(V)return B;V=1;var e=l().navigator,t=e&&e.userAgent;return B=t?String(t):""}function Ce(){if(U)return q;U=1;var e,t,r=l(),n=be(),i=r.process,o=r.Deno,s=i&&i.versions||o&&o.version,a=s&&s.v8;return a&&(t=(e=a.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!t&&n&&(!(e=n.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=n.match(/Chrome\/(\d+)/))&&(t=+e[1]),q=t}function we(){if(Y)return X;Y=1;var e=Ce(),t=p(),r=l().String;return X=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol("symbol detection");return!r(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41})}function ye(){if(J)return G;J=1;var e=we();return G=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function We(){if(Q)return K;Q=1;var e=pe(),t=fe(),r=ge(),n=ye(),i=Object;return K=n?function(e){return"symbol"==typeof e}:function(n){var o=e("Symbol");return t(o)&&r(o.prototype,i(n))}}function Se(){if(ee)return Z;ee=1;var e=String;return Z=function(t){try{return e(t)}catch(e){return"Object"}}}function _e(){if(re)return te;re=1;var e=fe(),t=Se(),r=TypeError;return te=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")}}function xe(){if(ie)return ne;ie=1;var e=_e(),t=ce();return ne=function(r,n){var i=r[n];return t(i)?void 0:e(i)},ne}function Re(){if(le)return oe;le=1;var e=C(),t=fe(),r=ve(),n=TypeError;return oe=function(i,o){var l,s;if("string"===o&&t(l=i.toString)&&!r(s=e(l,i)))return s;if(t(l=i.valueOf)&&!r(s=e(l,i)))return s;if("string"!==o&&t(l=i.toString)&&!r(s=e(l,i)))return s;throw new n("Can't convert object to primitive value")}}var Ie,Ne,Ee,ke,Pe,Fe,Te,Me,Ae,Le,ze,He,Oe,De,$e,je,Be,Ve,qe,Ue,Xe,Ye,Ge,Je,Ke={exports:{}};function Qe(){if(ke)return Ee;ke=1;var e=l(),t=Object.defineProperty;return Ee=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch(t){e[r]=n}return n}}function Ze(){if(Pe)return Ke.exports;Pe=1;var e=Ne?Ie:(Ne=1,Ie=!1),t=l(),r=Qe(),n="__core-js_shared__",i=Ke.exports=t[n]||r(n,{});return(i.versions||(i.versions=[])).push({version:"3.50.0",mode:e?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.50.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Ke.exports}function et(){if(Te)return Fe;Te=1;var e=Ze(),t=Object.create||Object;return Fe=function(r,n){return e[r]||(e[r]=n||t(null))}}function tt(){if(Ae)return Me;Ae=1;var e=he(),t=Object;return Me=function(r){return t(e(r))}}function rt(){if(ze)return Le;ze=1;var e=ue(),t=tt(),r=e({}.hasOwnProperty);return Le=Object.hasOwn||function(e,n){return r(t(e),n)}}function nt(){if(Oe)return He;Oe=1;var e=ue(),t=0,r=Math.random(),n=e(1.1.toString);return He=function(e){return"Symbol("+(void 0===e?"":e)+")_"+n(++t+r,36)}}function it(){if($e)return De;$e=1;var e=l(),t=et(),r=rt(),n=nt(),i=we(),o=ye(),s=e.Symbol,a=t("wks"),u=o?s.for||s:s&&s.withoutSetter||n;return De=function(e){return r(a,e)||(a[e]=i&&r(s,e)?s[e]:u("Symbol."+e)),a[e]}}function ot(){if(Be)return je;Be=1;var e=C(),t=ve(),r=We(),n=xe(),i=Re(),o=it(),l=TypeError,s=o("toPrimitive");return je=function(o,a){if(!t(o)||r(o))return o;var u,d=n(o,s);if(d){if(void 0===a&&(a="default"),u=e(d,o,a),!t(u)||r(u))return u;throw new l("Can't convert object to primitive value")}return void 0===a&&(a="number"),i(o,a)}}function lt(){if(qe)return Ve;qe=1;var e=ot(),t=We();return Ve=function(r){var n=e(r,"string");return t(n)?n:n+""}}function st(){if(Ge)return Ye;Ge=1;var e=g(),t=p(),r=function(){if(Xe)return Ue;Xe=1;var e=l(),t=ve(),r=e.document,n=t(r)&&t(r.createElement);return Ue=function(e){return n?r.createElement(e):{}}}();return Ye=!e&&!t(function(){return 7!==Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a})}function at(){if(Je)return v;Je=1;var e=g(),t=C(),r=function(){if(w)return se;w=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return se.f=r?function(e){var r=t(this,e);return!!r&&r.enumerable}:e,se}(),n=ae(),i=me(),o=lt(),l=rt(),s=st(),a=Object.getOwnPropertyDescriptor;return v.f=e?a:function(e,u){if(e=i(e),u=o(u),s)try{return a(e,u)}catch(e){}if(l(e,u))return n(!t(r.f,e,u),e[u])},v}var ut,dt,ct,ht,mt,ft,vt,pt={};function gt(){if(ht)return ct;ht=1;var e=ve(),t=String,r=TypeError;return ct=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")}}function bt(){if(mt)return pt;mt=1;var e=g(),t=st(),r=function(){if(dt)return ut;dt=1;var e=g(),t=p();return ut=e&&t(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})}(),n=gt(),i=lt(),o=TypeError,l=Object.defineProperty,s=Object.getOwnPropertyDescriptor,a="enumerable",u="configurable",d="writable";return pt.f=e?r?function(e,t,r){if(n(e),t=i(t),n(r),"function"==typeof e&&"prototype"===t&&"value"in r&&d in r&&!r[d]){var o=s(e,t);o&&o[d]&&(e[t]=r.value,r={configurable:u in r?r[u]:o[u],enumerable:a in r?r[a]:o[a],writable:!1})}return l(e,t,r)}:l:function(e,r,s){if(n(e),r=i(r),n(s),t)try{return l(e,r,s)}catch(e){}if("get"in s||"set"in s)throw new o("Accessors not supported");return"value"in s&&(e[r]=s.value),e},pt}function Ct(){if(vt)return ft;vt=1;var e=g(),t=bt(),r=ae();return ft=e?function(e,n,i){return t.f(e,n,r(1,i))}:function(e,t,r){return e[t]=r,e}}var wt,yt,Wt,St,_t,xt,Rt,It,Nt,Et,kt,Pt,Ft,Tt,Mt,At={exports:{}};function Lt(){if(St)return Wt;St=1;var e=ue(),t=fe(),r=Ze(),n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(e){return n(e)}),Wt=r.inspectSource}function zt(){if(It)return Rt;It=1;var e=et(),t=nt(),r=e("keys");return Rt=function(e){return r[e]||(r[e]=t(e))}}function Ht(){return Et?Nt:(Et=1,Nt={})}function Ot(){if(Ft)return At.exports;Ft=1;var e=ue(),t=p(),r=fe(),n=rt(),i=g(),o=function(){if(yt)return wt;yt=1;var e=g(),t=rt(),r=Function.prototype,n=e&&Object.getOwnPropertyDescriptor,i=t(r,"name"),o=i&&"something"===function(){}.name,l=i&&(!e||e&&n(r,"name").configurable);return wt={EXISTS:i,PROPER:o,CONFIGURABLE:l}}().CONFIGURABLE,s=Lt(),a=function(){if(Pt)return kt;Pt=1;var e,t,r,n=function(){if(xt)return _t;xt=1;var e=l(),t=fe(),r=e.WeakMap;return _t=t(r)&&/native code/.test(String(r))}(),i=l(),o=ve(),s=Ct(),a=rt(),u=Ze(),d=zt(),c=Ht(),h="Object already initialized",m=i.TypeError,f=i.WeakMap;if(n||u.state){var v=u.state||(u.state=new f);v.get=v.get,v.has=v.has,v.set=v.set,e=function(e,t){if(v.has(e))throw new m(h);return t.facade=e,v.set(e,t),t},t=function(e){return v.get(e)||{}},r=function(e){return v.has(e)}}else{var p=d("state");c[p]=!0,e=function(e,t){if(a(e,p))throw new m(h);return t.facade=e,s(e,p,t),t},t=function(e){return a(e,p)?e[p]:{}},r=function(e){return a(e,p)}}return kt={set:e,get:t,has:r,enforce:function(n){return r(n)?t(n):e(n,{})},getterFor:function(e){return function(r){var n;if(!o(r)||(n=t(r)).type!==e)throw new m("Incompatible receiver, "+e+" required");return n}}}}(),u=a.enforce,d=a.get,c=String,h=Object.defineProperty,m=e("".slice),f=e("".replace),v=e([].join),b=i&&!t(function(){return 8!==h(function(){},"length",{value:8}).length}),C=String(String).split("String"),w=At.exports=function(e,t,r){"Symbol("===m(c(t),0,7)&&(t="["+f(c(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!n(e,"name")||o&&e.name!==t)&&(i?h(e,"name",{value:t,configurable:!0}):e.name=t),b&&r&&n(r,"arity")&&e.length!==r.arity&&h(e,"length",{value:r.arity});try{r&&n(r,"constructor")&&r.constructor?i&&h(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var l=u(e);return n(l,"source")||(l.source=v(C,"string"==typeof t?t:"")),e};return Function.prototype.toString=w(function(){return r(this)&&d(this).source||s(this)},"toString"),At.exports}function Dt(){if(Mt)return Tt;Mt=1;var e=fe(),t=bt(),r=Ot(),n=Qe();return Tt=function(i,o,l,s){s||(s={});var a=s.enumerable,u=void 0!==s.name?s.name:o;if(e(l)&&r(l,u,s),s.global)a?i[o]=l:n(o,l);else{try{s.unsafe?i[o]&&(a=!0):delete i[o]}catch(e){}a?i[o]=l:t.f(i,o,{value:l,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return i},Tt}var $t,jt,Bt,Vt,qt,Ut,Xt,Yt,Gt,Jt,Kt,Qt,Zt,er,tr,rr,nr,ir={};function or(){if(Vt)return Bt;Vt=1;var e=function(){if(jt)return $t;jt=1;var e=Math.ceil,t=Math.floor;return $t=Math.trunc||function(r){var n=+r;return(n>0?t:e)(n)},$t}();return Bt=function(t){var r=+t;return r!=r||0===r?0:e(r)}}function lr(){if(Ut)return qt;Ut=1;var e=or(),t=Math.max,r=Math.min;return qt=function(n,i){var o=e(n);return o<0?t(o+i,0):r(o,i)}}function sr(){if(Yt)return Xt;Yt=1;var e=or(),t=Math.min;return Xt=function(r){var n=e(r);return n>0?t(n,9007199254740991):0}}function ar(){if(Jt)return Gt;Jt=1;var e=sr();return Gt=function(t){return e(t.length)}}var ur,dr,cr,hr,mr,fr,vr,pr,gr,br,Cr,wr,yr,Wr,Sr,_r,xr,Rr,Ir={};function Nr(){if(cr)return dr;cr=1;var e=pe(),t=ue(),r=function(){if(nr)return ir;nr=1;var e=function(){if(er)return Zt;er=1;var e=ue(),t=rt(),r=me(),n=function(){if(Qt)return Kt;Qt=1;var e=me(),t=lr(),r=ar(),n=function(n){return function(i,o,l){var s=e(i),a=r(s);if(0===a)return!n&&-1;var u,d=t(l,a);if(n&&o!=o){for(;a>d;)if((u=s[d++])!=u)return!0}else for(;a>d;d++)if((n||d in s)&&s[d]===o)return n||d||0;return!n&&-1}};return Kt={includes:n(!0),indexOf:n(!1)}}().indexOf,i=Ht(),o=e([].push);return Zt=function(e,l){var s,a=r(e),u=0,d=[];for(s in a)!t(i,s)&&t(a,s)&&o(d,s);for(;l.length>u;)t(a,s=l[u++])&&(~n(d,s)||o(d,s));return d},Zt}(),t=(rr?tr:(rr=1,tr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])).concat("length","prototype");return ir.f=Object.getOwnPropertyNames||function(r){return e(r,t)},ir}(),n=(ur||(ur=1,Ir.f=Object.getOwnPropertySymbols),Ir),i=gt(),o=t([].concat);return dr=e("Reflect","ownKeys")||function(e){var t=r.f(i(e)),l=n.f;return l?o(t,l(e)):t}}function Er(){if(mr)return hr;mr=1;var e=rt(),t=Nr(),r=at(),n=bt();return hr=function(i,o,l){for(var s=t(o),a=n.f,u=r.f,d=0;d<s.length;d++){var c=s[d];e(i,c)||l&&e(l,c)||a(i,c,u(o,c))}}}function kr(){if(gr)return pr;gr=1;var e=l(),t=at().f,r=Ct(),n=Dt(),i=Qe(),o=Er(),s=function(){if(vr)return fr;vr=1;var e=p(),t=fe(),r=/#|\.prototype\./,n=function(r,n){var a=o[i(r)];return a===s||a!==l&&(t(n)?e(n):!!n)},i=n.normalize=function(e){return String(e).replace(r,".").toLowerCase()},o=n.data={},l=n.NATIVE="N",s=n.POLYFILL="P";return fr=n}();return pr=function(l,a){var u,d,c,h,m,f=l.target,v=l.global,p=l.stat;if(u=v?e:p?e[f]||i(f,{}):e[f]&&e[f].prototype)for(d in a){if(h=a[d],c=l.dontCallGetSet?(m=t(u,d))&&m.value:u[d],!s(v?d:f+(p?".":"#")+d,l.forced)&&void 0!==c){if(typeof h==typeof c)continue;o(h,c)}(l.sham||c&&c.sham)&&r(h,"sham",!0),n(u,d,h,l)}}}function Pr(){if(yr)return wr;yr=1;var e=function(){if(Cr)return br;Cr=1;var e={};return e[it()("toStringTag")]="z",br="[object z]"===String(e)}(),t=fe(),r=de(),n=it()("toStringTag"),i=Object,o="Arguments"===r(function(){return arguments}());return wr=e?r:function(e){var l,s,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(s=function(e,t){try{return e[t]}catch(e){}}(l=i(e),n))?s:o?r(l):"Object"===(a=r(l))&&t(l.callee)?"Arguments":a},wr}function Fr(){if(Sr)return Wr;Sr=1;var e=Pr(),t=String;return Wr=function(r){if("Symbol"===e(r))throw new TypeError("Cannot convert a Symbol value to a string");return t(r)}}function Tr(){if(xr)return _r;xr=1;var e=Ot(),t=bt();return _r=function(r,n,i){return i.get&&e(i.get,n,{getter:!0}),i.set&&e(i.set,n,{setter:!0}),t.f(r,n,i)}}!function(){if(Rr)return o;Rr=1;var e=kr(),t=g(),r=l(),n=C(),i=ue(),s=rt(),a=fe(),u=ge(),d=Fr(),c=Tr(),h=Er(),m=r.Symbol,f=m&&m.prototype;if(t&&a(m)&&(!("description"in f)||void 0!==m().description)){var v={},p=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:d(arguments[0]),t=u(f,this)?new m(e):void 0===e?m():m(e);return""===e&&(v[t]=!0),t};h(p,m);var b=p.for;p.for={for:function(e){var t=d(e),r=n(b,this,t);return""===t&&(v[r]=!0),r}}.for,p.prototype=f,f.constructor=p;var w="Symbol(description detection)"===String(m("description detection")),y=i(f.valueOf),W=i(f.toString),S=/^Symbol\((.*)\)[^)]+$/,_=i("".replace),x=i("".slice);c(f,"description",{configurable:!0,get:function(){var e=y(this);if(s(v,e))return"";var t=W(e),r=w?x(t,7,-1):_(t,S,"$1");return""===r?void 0:r}}),e({global:!0,constructor:!0,forced:!0},{Symbol:p})}}();var Mr,Ar,Lr,zr,Hr,Or,Dr,$r,jr,Br,Vr,qr,Ur,Xr,Yr,Gr={};function Jr(){if(Ar)return Mr;Ar=1;var e=Se(),t=TypeError;return Mr=function(r,n){if(!delete r[n])throw new t("Cannot delete property "+e(n)+" of "+e(r))},Mr}function Kr(){if(zr)return Lr;zr=1;var e=ue();return Lr=e([].slice)}function Qr(){if($r)return Dr;$r=1;var e=p();return Dr=function(t,r){var n=[][t];return!!n&&e(function(){n.call(null,r||function(){return 1},1)})}}let Zr;!function(){if(Yr)return Gr;Yr=1;var e=kr(),t=ue(),r=_e(),n=tt(),i=ar(),o=Jr(),l=Fr(),s=p(),a=function(){if(Or)return Hr;Or=1;var e=Kr(),t=Math.floor,r=function(n,i){var o=n.length;if(o<8)for(var l,s,a=1;a<o;){for(s=a,l=n[a];s&&i(n[s-1],l)>0;)n[s]=n[--s];s!==a++&&(n[s]=l)}else for(var u=t(o/2),d=r(e(n,0,u),i),c=r(e(n,u),i),h=d.length,m=c.length,f=0,v=0;f<h||v<m;)n[f+v]=f<h&&v<m?i(d[f],c[v])<=0?d[f++]:c[v++]:f<h?d[f++]:c[v++];return n};return Hr=r}(),u=Qr(),d=function(){if(Br)return jr;Br=1;var e=be().match(/firefox\/(\d+)/i);return jr=!!e&&+e[1]}(),c=function(){if(qr)return Vr;qr=1;var e=be();return Vr=/MSIE|Trident/.test(e)}(),h=Ce(),m=function(){if(Xr)return Ur;Xr=1;var e=be().match(/AppleWebKit\/(\d+)\./);return Ur=!!e&&+e[1]}(),f=[],v=t(f.sort),g=t(f.push),b=s(function(){f.sort(void 0)}),C=s(function(){f.sort(null)}),w=u("sort"),y=!s(function(){if(h)return h<70;if(!(d&&d>3)){if(c)return!0;if(m)return m<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)f.push({k:t+n,v:r})}for(f.sort(function(e,t){return t.v-e.v}),n=0;n<f.length;n++)t=f[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}});e({target:"Array",proto:!0,forced:b||!C||!w||!y},{sort:function(e){void 0!==e&&r(e);var t=n(this);if(y)return void 0===e?v(t):v(t,e);var s,u,d=[],c=i(t);for(u=0;u<c;u++)u in t&&g(d,t[u]);for(a(d,function(e){return function(t,r){if(void 0===r)return-1;if(void 0===t)return 1;if(void 0!==e)return+e(t,r)||0;var n=l(t),i=l(r);return n===i?0:n>i?1:-1}}(e)),s=i(d),u=0;u<s;)t[u]=d[u++];for(;u<c;)o(t,u++);return t}})}();const en=()=>{const e=document.createElement("div");e.dir="rtl",Object.assign(e.style,{direction:"rtl",fontSize:"14px",width:"1px",height:"1px",position:"absolute",top:"-1000px",overflow:"scroll"}),e.textContent="A",document.body.appendChild(e);let t="reverse";return e.scrollLeft>0?t="default":(e.scrollLeft=1,0===Math.floor(e.scrollLeft)&&(t="negative")),e.parentNode.removeChild(e),t};function tn(e,t){if(void 0===t&&(t="rtl"===getComputedStyle(e).direction),!0===t&&void 0===Zr&&(Zr=en()),!t)return e.scrollLeft;switch(Zr){case"negative":return e.scrollLeft+e.scrollWidth-e.clientWidth;case"reverse":return e.scrollWidth-e.scrollLeft-e.clientWidth;default:return e.scrollLeft}}function rn(e,t,r){e.scrollLeft=function(e,t,r){return void 0===r&&(r="rtl"===getComputedStyle(e).direction),function(e,t,r){if(void 0===r&&(r="rtl"===getComputedStyle(e).direction),!0===r&&void 0===Zr&&(Zr=en()),!r)return t;switch(Zr){case"negative":return t-e.scrollWidth+e.clientWidth;case"reverse":return e.scrollWidth-t-e.clientWidth;default:return t}}(e,r?e.scrollWidth-e.clientWidth-t:t,r)}(e,t,r)}const nn=function(e,t){for(let[r,n]of Object.entries(t))e.style[r]=null==n?"":String(n)},on=function(e,t,r,n,i){return(...o)=>{let l,s,a,u,d=o[0];if(e?(l=o[1],s=!!o[2],a=!!o[3],u=!!o[4]):(s=!!o[1],a=!!o[2],u=!!o[3]),d===window)return d.document.documentElement[`client${r}`];if(9===d.nodeType){const e=d.documentElement,t=d.body;return Math.max(t[`scroll${r}`],e[`scroll${r}`],t[`offset${r}`],e[`offset${r}`],e[`client${r}`])}{let o,c,h=!1,m=!1;if(!e&&"getBoundingClientRect"in d&&(o=d.getBoundingClientRect()[t],h=!0,m=!0),(void 0===o||u||h!==s||m!==a)&&(c=e?getComputedStyle(d,l):getComputedStyle(d)),void 0===o){let e=c[t];"auto"===e?(o=d[`client${r}`],h=!0):o=parseFloat(e),"border-box"===c.boxSizing&&(h=!0,m=!0)}if(s!==h){let e=parseFloat(c[`padding-${n}`]||0)+parseFloat(c[`padding-${i}`]||0);s?o+=e:o-=e}if(a!==m){let e=parseFloat(c[`border-${n}-width`]||0)+parseFloat(c[`border-${i}-width`]||0);a?o+=e:o-=e}return o<0&&(o=0),u&&(o+=parseFloat(c[`margin-${n}`]||0)+parseFloat(c[`margin-${i}`]||0)),o}}},ln=on(!1,"width","Width","left","right"),sn=on(!1,"height","Height","top","bottom"),an=(un="left",dn="right",(e,t,r=!1,n=!1,i=!1)=>{if(e===window)return;if(9===e.nodeType)return;const o=getComputedStyle(e);let l=!1;if("border-box"===o.boxSizing&&(l=!0),r=!!r,n=!!n,(i=!!i)&&(t-=(parseFloat(o[`margin-${un}`])||0)+(parseFloat(o[`margin-${dn}`])||0)),r!==l){let e=parseFloat(o[`padding-${un}`]||0)+parseFloat(o[`padding-${dn}`]||0);r?t-=e:t+=e}if(n!==l){let e=(parseFloat(o[`border-${un}-width`])||0)+(parseFloat(o[`border-${dn}-width`])||0);n?t-=e:t+=e}t<0&&(t=0),e.style.width=t+"px"});var un,dn;const cn=e=>{if(!e.getClientRects().length)return{top:0,left:0};let t=e.getBoundingClientRect(),r=e.ownerDocument.defaultView;return{top:t.top+r.pageYOffset,left:t.left+r.pageXOffset}};let hn=null;const mn=function(e,t){if(null===hn&&(()=>{try{document.createElement("div").querySelector(":scope > div"),hn=!0}catch(e){hn=!1}})(),!0===hn)return e.querySelectorAll(t.replace(/((?:^|,)\s*)/g,"$1:scope "));{let r=e.id;const n="ID_"+Date.now();e.id=n,t=t.replace(/((?:^|,)\s*)/g,"$1#"+n);try{return e.querySelectorAll(t)}finally{this.id=r}}};class fn{constructor(){this._events=[]}add(e,t,r,n){let i=t.split("."),o=i[0],l=i[1];e.addEventListener(o,r,n||!1);let s=!0===n||"object"==typeof n&&!0===n.capture;return this._events.push({el:e,name:o,namespace:l,handler:r,useCapture:s}),this}remove(e,t,r,n){let i=t?t.split("."):"",o=i[0],l=i[1],s=!0===n||"object"==typeof n&&!0===n.capture,a=[],u=[];if(e||o||l||r||void 0!==n)for(let t of this._events)e&&t.el!==e||o&&t.name!==o||l&&t.namespace!==l||r&&t.handler!==r||void 0!==n&&t.useCapture!==s?a.push(t):u.push(t);else u=this._events;this._events=a;for(let e of u)e.el.removeEventListener(e.name,e.handler,e.useCapture);return this}}const vn=Object.prototype.hasOwnProperty,pn=void 0!==Element.prototype.insertAdjacentElement;function gn(e,t,r){t?!1===pn||e instanceof DocumentFragment?r.insertBefore(e,t):t.insertAdjacentElement("beforebegin",e):r.appendChild(e)}function bn(e,t,r,n){return e.parentNode!==n?(t||(t=document.createDocumentFragment()),t.appendChild(e)):(t&&t.childNodes.length>0&&(gn(t,r,n),t=null),e.nextSibling!==r&&gn(e,r,n)),t}const Cn=Symbol("destroyed");class wn{constructor(e){var t;const r=this._p={list:e.list||null,hookScrollEvent:void 0===e.hookScrollEvent||!!e.hookScrollEvent,count:e.count||0,virtual:void 0===e.virtual||!!e.virtual,userItemsParent:e.itemsParent||null,autoVirtualWrapperWidth:null===(t=e.autoVirtualWrapperWidth)||void 0===t||t,estimatedItemHeight:20,buffer:5,itemHeightEstimatorFn:null,itemElementCreatorFn:Sn,onItemRender:null,onItemUnrender:null,onScrollHeightChange:null,virtualWrapper:null,currentItemsParent:null,cachedItemHeights:[],cachedItemEstimatedHeights:[],cachedItemPositions:[],itemPositionsNeedsUpdate:0,boundRender:this.render.bind(this),existingEls:[]};r.currentItemsParent=r.userItemsParent||r.list,this._hookEvents(),"number"==typeof e.count&&this.setCount(e.count),"boolean"==typeof e.virtual&&this.setVirtual(e.virtual),"number"==typeof e.estimatedItemHeight&&this.setEstimatedItemHeight(e.estimatedItemHeight),"number"==typeof e.buffer&&this.setBuffer(e.buffer),"function"==typeof e.itemHeightEstimatorFn&&this.setItemHeightEstimatorFn(e.itemHeightEstimatorFn),"function"==typeof e.itemElementCreatorFn&&this.setItemElementCreatorFn(e.itemElementCreatorFn),"function"==typeof e.onItemRender&&this.setOnItemRender(e.onItemRender),"function"==typeof e.onItemUnrender&&this.setOnItemUnrender(e.onItemUnrender),"function"==typeof e.onScrollHeightChange&&this.setOnScrollHeightChange(e.onScrollHeightChange)}destroy(){this[Cn]||(this[Cn]=!0,this._unhookEvents().invalidate()._destroyElements())}setHookScrollEvent(e){const t=this._p;return e=void 0===e||!!e,t.hookScrollEvent===e||(t.hookScrollEvent=e,this._unhookEvents()._hookEvents()),this}isHookScrollEventEnabled(){return this._p.hookScrollEvent}setCount(e){return this._p.count=e,this.invalidate()}getCount(){return this._p.count}setVirtual(e){const t=this._p;return e=void 0===e||!!e,t.virtual===e||(t.virtual=e,this._hookEvents().invalidate()._destroyElements()),this}isVirtual(){return this._p.virtual}setEstimatedItemHeight(e){return this._p.estimatedItemHeight=Math.abs(("number"==typeof e?e:Number(e))||20),this}getEstimatedItemHeight(){return this._p.estimatedItemHeight}setAutoVirtualWrapperWidth(e){const t=this._p;return t.autoVirtualWrapperWidth=void 0===e||!!e,t.virtualWrapper&&t.autoVirtualWrapperWidth!==t.virtualWrapperWidthWasSet&&(t.virtualWrapper.style.width=t.autoVirtualWrapperWidth?"100%":"",t.virtualWrapperWidthWasSet=t.autoVirtualWrapperWidth),this}isAutoVirtualWrapperWidth(){return this._p.autoVirtualWrapperWidth}setBuffer(e){return this._p.buffer=Math.abs("number"==typeof e?e:Number(e)||5),this}getBuffer(){return this._p.buffer}setItemHeightEstimatorFn(e){return this._p.itemHeightEstimatorFn=e,this}setItemElementCreatorFn(e){return this._p.itemElementCreatorFn=e||Sn,this}setOnItemRender(e){return this._p.onItemRender=e,this}setOnItemUnrender(e){return this._p.onItemUnrender=e,this}setOnScrollHeightChange(e){return this._p.onScrollHeightChange=e,this}estimateFullHeight(){const e=this._p;if(0===e.count)return 0;if(e.virtual)return this._calculateItemPosition(e.count)||0;{const t=e.existingEls;if(e.count===t.length){let e=t[0].getBoundingClientRect(),r=t[t.length-1].getBoundingClientRect();return r.top-e.top+r.height}return this._calculateItemPosition(e.count)||0}}invalidatePositions(){const e=this._p;return e.itemPositionsNeedsUpdate=0,e.cachedItemHeights=[],e.cachedItemEstimatedHeights=[],e.cachedItemPositions=[],e.cachedItemHeights.length=e.count,e.cachedItemEstimatedHeights.length=e.count,e.cachedItemPositions.length=e.count,this}invalidate(){const e=this._p;this.invalidatePositions(),e.virtual||this._destroyElements();for(let t of e.existingEls)delete t[yn];return this}render(){if(this[Cn])return;const e=this._p,t=e.list,r=e.virtual;let n=e.virtualWrapper,i=e.currentItemsParent,o=t.scrollTop,l=o+t.clientHeight,s=e.count,a=e.buffer,u=e.onItemUnrender,d=e.existingEls,c=d.length;if(r){const r=t.clientWidth;n||(n=e.virtualWrapper=e.userItemsParent,n||(n=e.virtualWrapper=document.createElement("div"),t.appendChild(n)),this._resetCurrentItemsParent(),i=e.currentItemsParent,e.autoVirtualWrapperWidth?(n.style.width="100%",e.virtualWrapperWidthWasSet=!0):e.virtualWrapperWidthWasSet=!1);for(let e=0;e<c;e++)d[e][Wn]=!0;this._calculateItemPosition(e.count-1);let u=this._getExistingElsRange(),m=_n(e.cachedItemPositions,o),f=Math.max(0,m-a),v=f,p=this._calculateItemPosition(v),g=a,b=Math.max(v,_n(e.cachedItemPositions,l-1)+1+a),C=[],w=null,y=n.childNodes[0];const W=function(e){let t;return-1!==u.firstIndex&&e>=u.firstIndex&&e<=u.lastIndex&&(t=d.find(t=>t[yn]===e&&!0===t[Wn])),void 0===t&&(t=(u.firstIndex<f||u.firstValidArrayIndex>0?d.find(e=>(e[yn]<f||!1===vn.call(e,yn))&&!0===e[Wn]):void 0)||Rn(d,e=>!0===e[Wn])),void 0!==t&&delete t[Wn],t};for(;v<s&&v<b;v++){let e=W(v);y&&y===e&&(y=y.nextSibling);const t=this._dequeueElementForIndex(e,v,y,!0);C.push([t,v]),w=bn(t,w,y,i)}w&&w.childNodes.length>0&&gn(w,y,i);for(let t of C){const r=t[1];this._insertItemAndFlow(t[0],r,!1),p=e.cachedItemPositions[r]+e.cachedItemHeights[r]}if(p<l)for(;(p<l||g-- >0)&&v<s;v++){let t=W(v);y&&y===t&&(y=y.nextSibling),this._dequeueElementForIndex(t,v,y,!1),p=e.cachedItemPositions[v]+e.cachedItemHeights[v]}let S=this.estimateFullHeight(),_=S+"px";var h;n.style.height!==_&&(n.style.height=_,null===(h=e.onScrollHeightChange)||void 0===h||h.call(e,S)),r!==t.clientWidth&&this.render()}else if(s!==d.length){for(let e=0;e<c;e++)d[e][Wn]=!0;let e=i.childNodes[0],t=null;for(let r=0;r<s;r++){let n=d.find(e=>e[yn]===r&&!0===e[Wn]);void 0!==n&&delete n[Wn],e&&e===n&&(e=e.nextSibling),t=bn(this._dequeueElementForIndex(n,r,e,!0),t,e,i)}t&&t.childNodes.length>0&&gn(t,e,i)}c=d.length;for(let e=0;e<c;e++){const t=d[e];if(!0!==t[Wn])continue;let r=t.parentNode;r&&r.removeChild(t),u&&void 0!==t[yn]&&u(t),d.splice(e,1),e--,c--}}addItemsAt(e,t=-1){if("number"!=typeof e||e<=0)return this;const r=this._p;if((t<0||t>=r.count)&&(t=r.count),r.count+=e,r.virtual)t>=0&&t<r.count&&this._invalidateItemIndexesAt(t,-1);else{let n=r.existingEls;if(n.length!==r.count-e)return this;let i=this._getExistingElsRange();if(-1===i.firstValidArrayIndex)return this;const o=r.currentItemsParent;let l=i.firstValidArrayIndex+t-i.firstIndex;this._pushItemIndexesAt(t,e);let s=n[l-1]?n[l-1].nextSibling:n[0],a=null;for(let r=t,n=t+e;r<n;r++)a=bn(this._dequeueElementForIndex(void 0,r,s,!0),a,s,o);a&&a.childNodes.length>0&&gn(a,s,o)}return this}removeItemsAt(e,t){const r=this._p;if("number"!=typeof e||"number"!=typeof t||e<=0||t<0||t>=r.count)return this;if(r.count-=Math.min(e,r.count-t),r.virtual)this._invalidateItemIndexesAt(t,-1);else{let n=r.existingEls;if(n.length!==r.count+e)return this;let i=this._getExistingElsRange();if(-1===i.firstValidArrayIndex)return this;this._pushItemIndexesAt(t+e,-e);const o=r.onItemUnrender;let l=i.firstValidArrayIndex+t-i.firstIndex;if(l<n.length){for(let t=0;t<e;t++){let e=n[l+t],r=e.parentNode;r&&r.removeChild(e),o&&void 0!==e[yn]&&o(e)}n.splice(l,e)}}return this}refreshItemAt(e){const t=this._p;if("number"!=typeof e||e<0||e>=t.count)return this;if(t.virtual)this._invalidateItemIndexesAt(e,1);else{let r=t.existingEls;if(r.length!==t.count)return this;let n=this._getExistingElsRange();if(e>=n.firstIndex&&e<=n.lastIndex){let t=r[n.firstValidArrayIndex+e-n.firstIndex];delete t[yn],this._dequeueElementForIndex(t,e,t.nextSibling,!1)}}return this}isItemRendered(e){const t=this._p;if("number"!=typeof e||e<0||e>=t.count)return!1;let r=this._getExistingElsRange();return e>=r.firstIndex&&e<=r.lastIndex}getItemElementAt(e){const t=this._p;if("number"!=typeof e||e<0||e>=t.count)return;let r=t.existingEls,n=this._getExistingElsRange();return e>=n.firstIndex&&e<=n.lastIndex?r[n.firstValidArrayIndex+e-n.firstIndex]:void 0}getItemPosition(e){const t=this._p;if(!("number"!=typeof e||e<0||e>=t.count)){if(t.virtual)return this._calculateItemPosition(e);{let r=this.getItemElementAt(e);if(void 0===r)return;const n=t.list;return cn(r).top-cn(n).top+n.scrollTop}}}getItemIndexFromElement(e){return e?e[yn]:void 0}getItemSize(e){const t=this._p;if("number"!=typeof e||e<0||e>=t.count)return;let r=t.cachedItemHeights[e];return void 0===r&&(r=t.itemHeightEstimatorFn?t.itemHeightEstimatorFn(e):null,"number"!=typeof r&&(r=t.estimatedItemHeight),t.cachedItemEstimatedHeights[e]=r),r}getVisibleItemCount(){const e=this._p,t=e.list;let r,n,i=t.scrollTop,o=t.clientHeight;if(0===e.count||0===o)return 0;if(e.virtual)r=_n(e.cachedItemPositions,i,0,e.count-1),n=_n(e.cachedItemPositions,i+o,r,e.count-1);else{const t=e=>{let t=this.getItemPosition(e);return void 0===t&&(t=1/0),t};r=xn(e.count,t,i),n=xn(e.count,t,i+o,r)}return this.getItemPosition(n)===i+o&&n--,n-r+1}createGhostItemElement(e,t,r){const n=this._p;let i=this._dequeueElementForIndex(null,e,!1,!0);try{t&&n.currentItemsParent.appendChild(i),r(i)}finally{if(t){let e=i.parentNode;e&&e.removeChild(i)}n.onItemUnrender&&n.onItemUnrender(i)}}_resetCurrentItemsParent(){var e,t;const r=this._p;r.currentItemsParent=null!==(e=null!==(t=r.virtualWrapper)&&void 0!==t?t:r.userItemsParent)&&void 0!==e?e:r.list}_destroyElements(){const e=this._p,t=e.onItemUnrender,r=e.existingEls;for(let e=0;e<r.length;e++){const n=r[e];let i=n.parentNode;i&&i.removeChild(n),t&&t(n)}return r.length=0,e.virtualWrapper&&(e.virtualWrapper!==e.userItemsParent&&e.virtualWrapper.parentNode&&e.virtualWrapper.parentNode.removeChild(e.virtualWrapper),e.virtualWrapper=null,this._resetCurrentItemsParent()),this}_invalidateItemIndexesAt(e,t){const r=this._p;this._setItemPositionsNeedsUpdate(e);let n=r.existingEls,i=n.length,o=this._getExistingElsRange();if(-1!==o.firstValidArrayIndex&&(-1===t&&(t=n.length),e>=o.firstIndex&&e<=o.lastIndex))for(let r=o.firstValidArrayIndex+e-o.firstIndex,l=0;r<i&&l<t;r++,l++)delete n[r][yn]}_pushItemIndexesAt(e,t){let r=this._p.existingEls,n=r.length,i=this._getExistingElsRange();if(-1!==i.firstValidArrayIndex&&e>=i.firstIndex&&e<=i.lastIndex)for(let o=i.firstValidArrayIndex+e-i.firstIndex;o<n;o++)r[o][yn]+=t}_hookEvents(){const e=this._p;return this._unhookEvents(),e.virtual&&e.hookScrollEvent&&e.list&&e.list.addEventListener("scroll",e.boundRender),this}_unhookEvents(){const e=this._p;return e.list&&e.list.removeEventListener("scroll",e.boundRender),this}_setItemPositionsNeedsUpdate(e){const t=this._p;e<t.itemPositionsNeedsUpdate&&(t.itemPositionsNeedsUpdate=e)}_calculateItemPosition(e){const t=this._p,r=t.cachedItemPositions;if(e>=t.itemPositionsNeedsUpdate){const n=t.count,i=t.cachedItemHeights,o=t.cachedItemEstimatedHeights,l=t.estimatedItemHeight,s=t.itemHeightEstimatorFn;i.length!==n&&(i.length=n,o.length=n,r.length=n);let a=t.itemPositionsNeedsUpdate,u=Math.min(e,n),d=0;a>0&&(d=r[a-1]);for(let e=a;e<=u;e++){if(0===e){r[e]=d;continue}const t=e-1;let n=i[t];void 0===n&&(n=s?s(t):null,"number"!=typeof n&&(n=l),o[t]=n),d+=n,r[e]=d}t.itemPositionsNeedsUpdate=u+1}if(e>0&&e===t.count){let n=t.cachedItemHeights[e-1];return void 0===n&&(n=t.itemHeightEstimatorFn?t.itemHeightEstimatorFn(e-1):null,"number"!=typeof n&&(n=t.estimatedItemHeight),t.cachedItemEstimatedHeights[e-1]=n),r[e-1]+n}return r[e]}_dequeueElementForIndex(e,t,r,n){const i=this._p,o=i.virtualWrapper;i.currentItemsParent;const l=i.existingEls,s=i.onItemRender,a=i.onItemUnrender,u=!e,d=u||t!==e[yn];if(e?a&&d&&a(e):(e=i.itemElementCreatorFn(),o&&!1!==r&&(e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.right="0")),d&&(e.innerHTML="",s&&s(e,t)),!1!==r){if(r instanceof Node||(r=null),!u){let t=l.indexOf(e);-1!==t&&l.splice(t,1)}let i=r?l.indexOf(r):-1;-1===i?l.push(e):l.splice(i,0,e),n||this._insertItemAndFlow(e,t,r)}return e[yn]=t,e}_insertItemAndFlow(e,t,r){const n=this._p,i=n.virtualWrapper,o=n.currentItemsParent;if(!1!==r&&(r instanceof Node||(r=null),e.parentNode===o&&e.nextSibling===r||gn(e,r,o)),i){let r=e.getBoundingClientRect().height,i=n.cachedItemHeights[t];i!==r&&(n.cachedItemHeights[t]=r),(void 0!==i&&r!==i||void 0===i&&r!==n.cachedItemEstimatedHeights[t])&&this._setItemPositionsNeedsUpdate(t+1);let o=this._calculateItemPosition(t);const l=Nn();!1===l?e.style.top=`${o}px`:e.style[l]=`translateY(${o}px)`}}_getExistingElsRange(){const e=this._p.existingEls;let t=-1,r=-1;for(let r=0,n=e.length;r<n;r++)if(!1!==vn.call(e[r],yn)){t=r;break}for(let t=e.length-1;t>=0;t--)if(!1!==vn.call(e[t],yn)){r=t;break}return{firstValidArrayIndex:t,lastValidArrayIndex:r,firstIndex:-1!==t?e[t][yn]:-1,lastIndex:-1!==r?e[r][yn]:-1}}}const yn=Symbol("index"),Wn=Symbol("reuse"),Sn=()=>document.createElement("li"),_n=(e,t,r=0,n=-1)=>{let i=e.length;if(n<0&&(n+=i),n<=r)return n;for(;r<=n;){let o=Math.floor(r+(n-r)/2),l=e[o];if(l===t||l<=t&&o<i&&e[o+1]>t){for(;o>0&&e[o-1]===l;)o--;return o}l<t?r=o+1:n=o-1}return-1===n?0:n},xn=(e,t,r,n=0,i=-1)=>{if(i<0&&(i+=e),i<=n)return i;for(;n<=i;){let o=Math.floor(n+(i-n)/2),l=t(o);if(l===r||l<=r&&o<e&&t(o+1)>r){for(;o>0&&t(o-1)===l;)o--;return o}l<r?n=o+1:i=o-1}return-1===i?0:i},Rn=(e,t)=>{for(let r=e.length-1;r>=0;r--)if(t(e[r]))return e[r]};let In=null;const Nn=()=>{if(null===In){let e=["transform","WebkitTransform","MozTransform","OTransform","msTransform"],t=document.createElement("div");In=!1;for(let r of e)if(t&&void 0!==t.style[r]){In=r;break}}return In};function En(e,t){for(let r=0,n=e.length;r>=0&&r<n;r+=1)if(t(e[r],r,e))return e[r]}function kn(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#39;").replace(/"/g,"&quot;").replace(/\n/g,"<br />")}const Pn=Symbol("safe"),Fn=Symbol("hover_in"),Tn=Symbol("hover_out"),Mn=Symbol("row_click"),An=Symbol("preview_cell"),Ln=Symbol("cell"),zn=Symbol("related_touch"),Hn=Symbol("original_row_index"),On=Symbol("destroyed");class Dn extends Array{constructor(e){var r,n,i;super(),t(this,"sortColumn",void 0),t(this,"onComparatorRequired",null),t(this,"customSortingProvider",null),e=e||{},this.sortColumn=null!==(r=e.sortColumn)&&void 0!==r?r:[],this.onComparatorRequired=null!==(n=e.onComparatorRequired)&&void 0!==n?n:null,this.customSortingProvider=null!==(i=e.customSortingProvider)&&void 0!==i?i:null}add(e,t){if(Array.isArray(e)){const r=e;if("number"==typeof t){const e=r.length,n=this.length;t=t<0?Math.max(n+t,0):Math.min(t,n),this.length=n+e;for(let r=n-1;r>=t;r--)this[r+e]=this[r];for(let n=0;n<e;n++)this[t+n]=r[n]}else for(let e=0,t=r.length;e<t;e++)this.push(r[e])}else{const r=e;"number"==typeof t?this.splice(t,0,r):this.push(r)}}reset(e){this.length=0,e&&this.add(e)}filteredCollection(e,t){if(e&&t){const r=new Dn({sortColumn:this.sortColumn,onComparatorRequired:this.onComparatorRequired,customSortingProvider:this.customSortingProvider});for(let n=0,i=this.length;n<i;n++){const i=this[n];e(i,t)&&(i[Hn]=n,r.push(i))}return r}return null}sort(e){let t;if("function"==typeof e)return super.sort(e);if(this.sortColumn.length){const e=[];for(let t=0;t<this.sortColumn.length;t++){const r=$n(this.sortColumn[t],this.sortColumn[t].descending);let n=null;this.onComparatorRequired&&(n=this.onComparatorRequired(this.sortColumn[t].column,this.sortColumn[t].descending,r)),n||(n=r),e.push(n.bind(this))}if(1===e.length)t=e[0];else{const r=e.length;t=(t,n)=>{let i=0;for(let o=0;o<r;o++)if(i=e[o](t,n),0!==i)return i;return i}}const r=e=>(e.sort(t),e);if(this.customSortingProvider){const e=this.customSortingProvider(this,r);if(e!==this){this.length=e.length;for(let t=0,r=e.length;t<r;t++)this[t]=e[t]}}else r(this)}return this}}function $n(e,t){let r=e.comparePath;"string"==typeof r&&(r=r.split("."));const n=r.length,i=n>1,o=t?1:-1,l=t?-1:1;return function(e,t){let s=e[r[0]],a=t[r[0]];if(i)for(let e=1;e<n;e++)s=s&&s[r[e]],a=a&&a[r[e]];return s===a||null==s&&null==a?0:null==s?o:null==a?l:s<a?o:l}}class jn extends Array{constructor(){super()}get(e){for(let t=0,r=this.length;t<r;t++)if(this[t].name===e)return this[t];return null}indexOf(e){const t="string"==typeof e?e:e.name;for(let e=0,r=this.length;e<r;e++)if(this[e].name===t)return e;return-1}getByOrder(e){for(let t=0,r=this.length;t<r;t++)if(this[t].order===e)return this[t];return null}normalizeOrder(){const e=[];for(let t=0;t<this.length;t++)e.push(this[t]);e.sort((e,t)=>e.order<t.order?-1:e.order>t.order?1:0);for(let t=0;t<e.length;t++)e[t].order=t;return this}getColumns(){const e=[];for(let t=0;t<this.length;t++)e.push(this[t]);return e.sort((e,t)=>e.order<t.order?-1:e.order>t.order?1:0),e}getVisibleColumns(){const e=[];for(let t=0;t<this.length;t++){const r=this[t];r.visible&&e.push(r)}return e.sort((e,t)=>e.order<t.order?-1:e.order>t.order?1:0),e}getMaxOrder(){let e=0;for(let t=0;t<this.length;t++){const r=this[t];r.order>e&&(e=r.order)}return e}moveColumn(e,t){if(e&&t){const r=e.order,n=t.order;if(r<n)for(let e=r+1;e<=n;e++){const t=this.getByOrder(e);t&&t.order--}else for(let e=r-1;e>=n;e--){const t=this.getByOrder(e);t&&t.order++}e.order=n}return this}}function Bn(e,t){const r=t.column,n=null==t.keyword?"":t.keyword.toString();if(!n||!r)return!0;let i=e[r];if(null==i)return!1;let o=i.toString(),l=n;return t.caseSensitive||(o=o.toLowerCase(),l=l.toLowerCase()),-1!==o.indexOf(l)}const Vn={NONE:"none",AUTO:"auto",SCROLL:"scroll"};class qn{static saveSelection(e){const t=window.getSelection();if(!t||0===t.rangeCount)return null;const r=t.getRangeAt(0);if(e!==r.commonAncestorContainer&&!function(e,t){let r=e;for(;(r=null!==(n=null===(i=r)||void 0===i?void 0:i.parentNode)&&void 0!==n?n:null)&&r!==t;)var n,i;return!!r}(r.commonAncestorContainer,e))return null;const n=r.cloneRange();n.selectNodeContents(e),n.setEnd(r.startContainer,r.startOffset);const i=n.toString().length;return{start:i,end:i+r.toString().length}}static restoreSelection(e,t){let r=0;const n=[e];let i,o=!1,l=!1;const s=document.createRange();for(s.setStart(e,0),s.collapse(!0);!l&&(i=n.pop());)if(i.nodeType===Node.TEXT_NODE){const e=r+i.length;!o&&t.start>=r&&t.start<=e&&(s.setStart(i,t.start-r),o=!0),o&&t.end>=r&&t.end<=e&&(s.setEnd(i,t.end-r),l=!0),r=e}else{let e=i.childNodes.length;for(;e--;)n.push(i.childNodes[e])}const a=window.getSelection();a&&(a.removeAllRanges(),a.addRange(s))}}const Un=Array.prototype.indexOf,Xn=document.createElement.bind(document);function Yn(e){const t=e._p;if(t.cellPreviewCell){var r;const n=t.cellPreviewCell,i=n[Ln];let o;try{o=qn.saveSelection(n)}catch{}t.cellPreviewCell.remove(),i&&t._unbindCellHoverOut(i),t._unbindCellHoverOut(n);try{o&&i&&qn.restoreSelection(i,o)}catch{}e.emit("cellpreviewdestroy",{el:n.firstChild,name:n.columnName,rowIndex:null!==(r=n.rowIndex)&&void 0!==r?r:null,rowData:null==n.rowIndex?null:t.rows[n.rowIndex],cell:i,cellEl:null==i?void 0:i.firstChild}),i&&delete i[An],delete n[Ln],t.cellPreviewCell=null,t.abortCellPreview=!1}else t.abortCellPreview=!0;return e}const Gn=document.createElement.bind(document);function Jn(e){var t,r,n;const i=e;return null!==(t=null!==(r=e[zn])&&void 0!==r?r:null===(n=i.changedTouches)||void 0===n?void 0:n[0])&&void 0!==t?t:e}function Kn(e){var t;const r=e._p;if(null==r.columnResizeStartTimeout)return;clearTimeout(r.columnResizeStartTimeout),r.columnResizeStartTimeout=null;const n=null===(t=r.lastResizeAreaClick)||void 0===t?void 0:t.columnName;r.lastResizeAreaClick=null,n&&function(e,t){const r=e._o,n=e._p,i=n.columns.get(t);if(!r.resizableColumns||!i||!i.resizable)return void Zn(e);const o=Li(e);n.resizer=Gn("div"),n.resizer.className=r.resizerClassName,nn(n.resizer,{position:"absolute",display:"block",zIndex:"-1",visibility:"hidden",width:"2px",background:"#000",opacity:"0.7"}),e.el.appendChild(n.resizer);const l=i.element,s=n.resizer.parentNode,a=getComputedStyle(s),u=getComputedStyle(l),d=cn(l),c=cn(s);c.left+=parseFloat(a.borderLeftWidth)||0,c.top+=parseFloat(a.borderTopWidth)||0,d.left-=c.left,d.top-=c.top,d.top-=parseFloat(u.borderTopWidth)||0;const h=ln(n.resizer,!0,!0,!0);o?(d.left-=Math.ceil((parseFloat(u.borderLeftWidth)||0)/2),d.left-=Math.ceil(h/2)):(d.left+=ln(l,!0,!0,!0),d.left+=Math.ceil((parseFloat(u.borderRightWidth)||0)/2),d.left-=Math.ceil(h/2)),nn(n.resizer,{"z-index":"10",visibility:"visible",left:d.left+"px",top:d.top+"px",height:sn(e.el,!1,!1,!1)+"px"}),n.resizer.columnName=l.columnName;try{n.resizer.style.zIndex=""}catch{}}(e,n)}function Qn(e,t){const r=e._o,n=Li(e);let i=t.target.closest(`div.${r.tableClassName}-header-cell,div.${r.cellPreviewClassName}`);if(!i)return null;i[Ln]&&(i=i[Ln]);let o=i.previousSibling;for(;o&&1!==o.nodeType;)o=o.previousSibling;const l=!o,s=Jn(t),a=(s.pageX||s.clientX||0)-cn(i).left;if(n){var u,d,c;if(!l&&ln(i,!0,!0,!0)-a<=r.resizeAreaWidth/2)return null!==(u=null===(d=o)||void 0===d?void 0:d.columnName)&&void 0!==u?u:null;if(a<=r.resizeAreaWidth/2)return null!==(c=i.columnName)&&void 0!==c?c:null}else{var h,m,f;if(!l&&a<=r.resizeAreaWidth/2)return null!==(h=null===(m=o)||void 0===m?void 0:m.columnName)&&void 0!==h?h:null;if(ln(i,!0,!0,!0)-a<=r.resizeAreaWidth/2)return null!==(f=i.columnName)&&void 0!==f?f:null}return null}function Zn(e){const t=e._p;return null!=t.columnResizeStartTimeout&&(clearTimeout(t.columnResizeStartTimeout),t.columnResizeStartTimeout=null),t.resizer&&(t.resizer.remove(),t.resizer=null),t.eventsSink.remove(document,".colresize"),e}function ei(e,t){const r=t;if("mousedown"===t.type&&0!==r.button)return;const n=e._o,i=e._p,o=Qn(e,t);if(o){const r=i.columns.get(o);return!!(n.resizableColumns&&r&&r.resizable)&&(function(e,t,r){const n=e._p,i=e._o,o=Jn(t),l=Date.now(),s=function(e){return e.type.startsWith("touch")?"touch":"mouse"}(t),a=n.lastResizeAreaClick;if(n.lastResizeAreaClick={columnName:r,time:l,pageX:o.pageX||o.clientX||0,pageY:o.pageY||0,pointerType:s},!a||a.columnName!==r||a.pointerType!==s)return!1;const u=l-a.time;return!(u<0||u>i.resizeAreaDoubleClickDuration)&&Math.sqrt(Math.pow(n.lastResizeAreaClick.pageX-a.pageX,2)+Math.pow(n.lastResizeAreaClick.pageY-a.pageY,2))<=Math.max(i.resizeAreaWidth,12)}(e,t,r.name)?(Zn(e),function(e,t,r,n){const i=e._o,o=e._p,l=o.columns.get(r);if(!i.resizableColumns||!l||!l.resizable)return!1;const s=Date.now();return(null===(n=o.lastResizeAreaDoubleClick)||void 0===n?void 0:n.columnName)===l.name&&s-o.lastResizeAreaDoubleClick.time<100?(t.preventDefault(),!0):(o.lastResizeAreaClick=null,o.lastResizeAreaDoubleClick={columnName:l.name,time:s},e.emit("columnresizeareadoubleclick",{name:l.name,columnName:l.name,event:t}),i.autoFitColumnOnResizeDoubleClick&&e.autoFitColumn(l.name),t.preventDefault(),!0)}(e,t,r.name)):(Zn(e),i.columnResizeStartTimeout=setTimeout(()=>Kn(e),n.resizeAreaDoubleClickDuration),i.eventsSink.add(document,"mousemove.colresize",t=>ti(e,t)).add(document,"touchmove.colresize",t=>ti(e,t)).add(document,"mouseup.colresize",t=>ri(e,t)).add(document,"touchend.colresize",t=>ri(e,t)),t.preventDefault(),!0))}}function ti(e,t){const r=e._p;if(null!=r.columnResizeStartTimeout&&!function(e,t){const r=e._p.lastResizeAreaClick;if(!r)return!1;const n=Jn(t),i=n.pageX||n.clientX||0,o=n.pageY||0;return Math.sqrt(Math.pow(i-r.pageX,2)+Math.pow(o-r.pageY,2))>4}(e,t))return;if(Kn(e),!r.resizer)return;const n=r.columns.get(r.resizer.columnName);if(!n)return;const i=Li(e),o=n.element,l=r.resizer.parentNode,s=getComputedStyle(l),a=getComputedStyle(o),u=cn(o),d=cn(l);d.left+=parseFloat(s.borderLeftWidth)||0,u.left-=d.left;const c=ln(r.resizer,!0,!0,!0),h="border-box"===a.boxSizing;let m=Jn(t).pageX-d.left,f=u.left;f-=Math.ceil(c/2),i?(f+=ln(o,!0,!0,!0),f-=n.ignoreMin?0:e._o.minColumnWidth,h||(f-=Math.ceil((parseFloat(a.borderLeftWidth)||0)/2),f-=Pi(o)),m>f&&(m=f)):(f+=n.ignoreMin?0:e._o.minColumnWidth,h||(f+=Math.ceil((parseFloat(a.borderRightWidth)||0)/2),f+=Pi(o)),m<f&&(m=f)),r.resizer.style.left=m+"px"}function ri(e,t){var r,n,i;const o=e._o,l=e._p;if(null!=l.columnResizeStartTimeout)return void Zn(e);if(!l.resizer)return;l.eventsSink.remove(document,".colresize");const s=l.columns.get(l.resizer.columnName);if(!s)return l.resizer.remove(),void(l.resizer=null);const a=Li(e),u=s.element,d=u.firstChild,c=l.resizer.parentNode,h=getComputedStyle(c),m=getComputedStyle(u),f=cn(u),v=cn(c);v.left+=parseFloat(h.borderLeftWidth)||0,f.left-=v.left;const p=ln(l.resizer,!0,!0,!0),g="border-box"===m.boxSizing,b=t;let C=(null!==(r=null!==(n=t[zn])&&void 0!==n?n:null===(i=b.changedTouches)||void 0===i?void 0:i[0])&&void 0!==r?r:t).pageX-v.left,w=f.left,y=0;if(a){if(!g){C+=Pi(u);const e=getComputedStyle(d||u);C+=parseFloat(e.borderLeftWidth)||0,C+=parseFloat(e.borderRightWidth)||0}C+=s.arrowProposedWidth||0,w+=Math.ceil(p/2),w+=ln(u,!0,!0,!0);const t=w-(s.ignoreMin?0:e._o.minColumnWidth);C>t&&(C=t),y=w-C}else{if(!g){C-=Pi(u);const e=getComputedStyle(d||u);C-=parseFloat(e.borderLeftWidth)||0,C-=parseFloat(e.borderRightWidth)||0}C-=s.arrowProposedWidth||0,w-=Math.ceil(p/2);const t=w+(s.ignoreMin?0:e._o.minColumnWidth);C<t&&(C=t),y=C-w}l.resizer.remove(),l.resizer=null;let W=y;if(2===s.widthMode){let t=Mi(e),r=0,n=0;for(let e=0;e<l.visibleColumns.length;e++){var S;const i=l.visibleColumns[e];i.name!==s.name&&(2===i.widthMode?(r+=i.width,n++):t-=null!==(S=i.actualWidth)&&void 0!==S?S:0)}if(t<=0&&l.table&&(t=l.table.clientWidth),t>Math.max(o.minColumnWidth,1)){if(W=y/t,n>0){const e=W/((1-W)/r);r+=W,(r<1&&o.relativeWidthGrowsToFillWidth||r>1&&o.relativeWidthShrinksToFillWidth)&&(W=e)}W*=100,W+="%"}}e.setColumnWidth(s.name,W)}function ni(e,t){var r;const n=e._o,i=e._p;if(!n.resizableColumns)return;const o=Qn(e,t),l=t.target.closest(`div.${n.tableClassName}-header-cell,div.${n.cellPreviewClassName}`);l&&(o&&null!==(r=i.columns.get(o))&&void 0!==r&&r.resizable?l.style.cursor="e-resize":l.style.cursor="")}function ii(e,t){var r,n,i;const o=e._o,l=t,s=t,a=null!==(r=null!==(n=t[zn])&&void 0!==n?n:null===(i=l.changedTouches)||void 0===i?void 0:i[0])&&void 0!==r?r:{pageX:s.pageX,pageY:s.pageY},u=t.target.closest(`div.${o.tableClassName}-header-cell,div.${o.cellPreviewClassName}`);if(!u)return;const d=cn(u);d.width=ln(u,!0,!0,!0),d.height=sn(u,!0,!0,!0),e.emit("headercontextmenu",{columnName:u.columnName,pageX:a.pageX,pageY:a.pageY,bounds:d})}function oi(e,t){if(ki(t))return;if(Qn(e,t))return;const r=e._o,n=e._p,i=t.target.closest(`div.${r.tableClassName}-header-cell,div.${r.cellPreviewClassName}`);if(!i)return;if(!r.sortableColumns)return;const o=n.columns.get(i.columnName),l=n.rows.sortColumn;if(o&&o.sortable){let t=!0;const n=l.length?l[l.length-1]:null;n&&n.column===o.name&&(n.descending&&r.allowCancelSort?(t=!1,l.splice(l.length-1,1)):n.descending=!n.descending);const i=e;t?i.sort(o.name,void 0,!0).render():i.setSortedColumns(l.map(e=>({column:e.column,descending:e.descending})))}}function li(e,t){const r=e._p,n=r.visibleColumns.findIndex(e=>e.movable),i=r.visibleColumns.findLastIndex(e=>e.movable),o=r.visibleColumns.findIndex(e=>e===t);return t.movable||-1!==n&&o>=n&&o<=i}const si=Array.prototype.indexOf,ai=document.createElement.bind(document);function ui(e,t){const r=t[Mn];r&&(t.removeEventListener("click",r),t[Mn]=null,function(e,t){const r=e._p;for(let e=0,n=t.childNodes,i=n.length;e<i;e++)r._unbindCellHoverIn(n[e])}(e,t),e.emit("rowdestroy",t))}function di(e){const t=e._p.tbody;if(t)for(let r=t.firstElementChild;r;r=r.nextElementSibling)ui(e,r)}function ci(e){const t=e._p,r=e._o;if(!t.table||!t.header)return e;if(!r.height)return t.table.style.height="auto",e;const n=getComputedStyle(t.table);let i=r.height-sn(t.header,!0,!0,!0);return"border-box"!==n.boxSizing&&(i-=parseFloat(n.borderTopWidth)||0,i-=parseFloat(n.borderBottomWidth)||0,i-=parseFloat(n.paddingTop)||0,i-=parseFloat(n.paddingBottom)||0),t.table.style.height=Math.max(i,0)+"px",e}function hi(e){const t=e._p;return t.headerRow&&(t.headerRow=void 0),e}function mi(e){const t=e._o,r=e._p;if(!r.tbody)return e;if(t.virtualTable&&r.virtualListHelper){const e=r.virtualListHelper.estimateFullHeight();r._lastVirtualScrollHeight=e,r.tbody.style.height=e+"px"}else r.tbody.style.height="";return e}function fi(e,t){const r=e._p;if(!r.table)return e;const n=r.table.offsetWidth-r.table.clientWidth;if(n!==r.scrollbarWidth||t){var i;r.scrollbarWidth=n;for(let e=0;e<r.columns.length;e++)r.columns[e].actualWidthConsideringScrollbarWidth=null;if(r.visibleColumns.length>0&&r.tbody&&r.headerRow){var o,l,s;const e=r.visibleColumns.length-1,t=r.visibleColumns[e];t.actualWidthConsideringScrollbarWidth=r.scrollbarWidth>0?(null!==(o=t.actualWidth)&&void 0!==o?o:0)-r.scrollbarWidth:null;const n=(null!==(l=null!==(s=t.actualWidthConsideringScrollbarWidth)&&void 0!==s?s:t.actualWidth)&&void 0!==l?l:0)+"px",i=r.tbody.childNodes;for(let t=0,r=i.length;t<r;t++){const r=i[t];1===r.nodeType&&(r.childNodes[e].style.width=n)}r.headerRow.childNodes[e].style.width=n}pi(e),null===(i=r.notifyRendererOfColumnsConfig)||void 0===i||i.call(r)}return e}function vi(e,t){const r=e._o,n=e._p;if(!n.tbody||!n.table||!n.headerRow)return e;const i=Ai(e);if(n.tbody.style.minWidth=i+"px",n.headerRow.style.minWidth=i+(n.scrollbarWidth||0)+"px",n.eventsSink.remove(n.table,"scroll"),r.width===Vn.AUTO)an(n.table,ln(n.tbody,!0,!0,!0)),an(e.el,ln(n.table,!0,!0,!0));else if(r.width===Vn.SCROLL){if(t){const t=n.table?n.table.scrollTop:0,r=n.table?n.table.scrollLeft:0;!function(e){const t=e.style.display;e.style.display="none",e.offsetHeight,e.style.display=t}(e.el),n.table.scrollTop=t,n.table.scrollLeft=r,n.header&&(n.header.scrollLeft=r)}const r=()=>function(e){const t=e._p;t.header.scrollLeft=t.table.scrollLeft,gi(e)}(e);n.eventsSink.add(n.table,"scroll",r)}return e}function pi(e){var t;const r=e._p,n=e._o;if(!r.headerRow)return;const i=n.tableClassName+"-sticky",o=r.headerRow,l=Li(e);r.lastIsRtl=l;const s=null!==(t=r.scrollbarWidth)&&void 0!==t?t:0,a=r.lastDetectedWidth,u=n.maxStickyColumnRelativeWidth,d="number"==typeof u&&a?a*u:null;let c=0,h=0,m=null;const f=[],v=[];let p=null,g=[],b=null,C=0,w=[];for(let e=o.firstElementChild;e;e=e.nextElementSibling){var y,W;const t=e.getAttribute("data-column");if(!t)continue;const n=r.columns.get(t);if(!n)continue;n.headerScrollbarCompensation=0;let o="start"===n.sticky||"end"===n.sticky;if(o&&null!==d&&C+(null!==(y=n.actualWidth)&&void 0!==y?y:0)>d&&(o=!1),o){var S,_,x,R,I;let t=null!==(S=n.actualWidth)&&void 0!==S?S:0;C+=0,e.className+=" "+i,e.style.position="sticky";let o,a=null;null===m&&(a=getComputedStyle(e),m=a.boxSizing),"content-box"===m&&(null===a&&(a=getComputedStyle(e)),t+=(parseFloat(a.paddingLeft)||0)+(parseFloat(a.paddingRight)||0)+(parseFloat(a.borderLeftWidth)||0)+(parseFloat(a.borderRightWidth)||0)),"start"===n.sticky?(o={direction:"start",absDirection:l?"right":"left",offset:c},e.style[o.absDirection]=c+"px",c+=t,g.length=0,p=[e],f.push(p)):(b=e,o={direction:"end",absDirection:l?"left":"right",offset:h},e.style[o.absDirection]=h+s+"px",e.style.width=(null!==(_=n.actualWidth)&&void 0!==_?_:0)+"px",h+=t,v.push([e,...g]),g.length=0),o.direction===(null===(x=n.stickyPos)||void 0===x?void 0:x.direction)&&o.offset===(null===(R=n.stickyPos)||void 0===R?void 0:R.offset)&&o.absDirection===(null===(I=n.stickyPos)||void 0===I?void 0:I.absDirection)||w.push(r.visibleColumns.indexOf(n)),n.stickyPos=o}else n.stickyPos&&w.push(r.visibleColumns.indexOf(n)),delete n.stickyPos,null!==(W=p)&&void 0!==W&&W.push(e),null!=g&&g.push(e),"sticky"===e.style.position&&(e.classList.remove(i),e.style.position="",e.style.left="",e.style.right="")}b&&(b.style[l?"left":"right"]="0px"),r.stickiesStart=f,r.stickiesEnd=v,w.length>0&&e.refreshAllVirtualRows(),r.lastStickyScrollLeft=void 0,gi(e)}function gi(e){const t=e._p;if(!t.table||!t.headerRow||!t.tbody)return;const r=t.stickiesStart,n=t.stickiesEnd,i=t.stickiesSetStart,o=t.stickiesSetEnd,l=t.stickiesSetStart=new Set,s=t.stickiesSetEnd=new Set;if(null!=r&&r.length||null!=n&&n.length){const e=t.table.scrollLeft;if(e===t.lastStickyScrollLeft)return;t.lastStickyScrollLeft=e;const i=t.headerRow.children,o=1.5,a=t.lastIsRtl;let u=null;const d=(e,r,n)=>{if(e&&e.length){for(const t of e){r||(u=t);const e=t[0],l=t.slice(1),s=l[0],d=l[l.length-1];if(!e||!e.getBoundingClientRect)continue;const c=e.getBoundingClientRect(),h=r!==a;let m=!1;if(s&&d){const e=s.getBoundingClientRect(),t=d.getBoundingClientRect();m=r?a?c.right-o>t.left&&c.left+o<e.right:c.right-o>e.left&&c.left+o<t.right:a?c.left+o<e.right&&c.right-o>t.left:c.left+o<t.right&&c.right-o>e.left}e.classList.toggle(h?"is-sticky-left":"is-sticky-right",m),m&&n.add(si.call(i,e))}if(u){var l,s,d,c;const e=u[0],r=t.columns.get(e.getAttribute("data-column")),n=a?"marginRight":"marginLeft";e.style[n]="",e.style.width=(null!==(l=null!==(s=r.actualWidthConsideringScrollbarWidth)&&void 0!==s?s:r.actualWidth)&&void 0!==l?l:0)+"px";let i=0;if(t.scrollbarWidth>0){const r=e.getBoundingClientRect(),o=e.offsetParent.getBoundingClientRect(),l=a?r.left-o.left:o.right-r.right;l<=t.scrollbarWidth&&(i=Math.min(t.scrollbarWidth,Math.max(0,t.scrollbarWidth-l+1)),i<t.scrollbarWidth&&(e.style[n]=-i+"px"))}r.headerScrollbarCompensation=i,e.style.width=(null!==(d=null!==(c=r.actualWidthConsideringScrollbarWidth)&&void 0!==c?c:r.actualWidth)&&void 0!==d?d:0)+i+"px"}}};d(r,!0,l),d(n,!1,s)}const a=[],u=[];for(const e of l)(null==i?void 0:i.has(e))||a.push({index:e,start:!0});for(const e of s)(null==o?void 0:o.has(e))||a.push({index:e,start:!1});if(i)for(const e of i)l.has(e)||u.push({index:e,start:!0});if(o)for(const e of o)s.has(e)||u.push({index:e,start:!1});if(!a.length&&!u.length)return;let d=t.tbody.firstElementChild;for(;d;){const e=d.children;for(const r of u){var c;null===(c=e[r.index])||void 0===c||c.classList.remove(r.start!==t.lastIsRtl?"is-sticky-left":"is-sticky-right")}for(const r of a){var h;null===(h=e[r.index])||void 0===h||h.classList.add(r.start!==t.lastIsRtl?"is-sticky-left":"is-sticky-right")}d=d.nextElementSibling}t.isStickyColumns=new Map;for(const e of l)t.isStickyColumns.set(e,"start");for(const e of s)t.isStickyColumns.set(e,"end")}function bi(e,t){const r=e._p,n=e._o;if(!r.headerRow||!r.tbody)return e;const i=r.headerRow.querySelectorAll(`div.${n.tableClassName}-header-cell`)[t];if(!i)return e;const o=r.columns.get(i.columnName);if(o){var l,s,a;const e=null!==(l=o.headerScrollbarCompensation)&&void 0!==l?l:0;i.style.width=(null!==(s=null!==(a=o.actualWidthConsideringScrollbarWidth)&&void 0!==a?a:o.actualWidth)&&void 0!==s?s:0)+e+"px";const n=(o.actualWidthConsideringScrollbarWidth||o.actualWidth||0)+"px",u=r.tbody.childNodes;for(let e=0,r=u.length;e<r;e++){const r=u[e];1===r.nodeType&&(r.childNodes[t].style.width=n)}}return e}function Ci(e){const t=e._p,r=e._o;if(t.table&&t.headerRow){const e=r.tableClassName,i=mn(t.headerRow,`>div.${e}-header-cell.sorted`),o=Array.prototype.slice.call(i,0).map(e=>e.querySelector(":scope>div>.sort-arrow")).filter(e=>!!e);for(const e of o){var n;const r=null===(n=e.parentNode)||void 0===n?void 0:n.parentNode;if(r){const e=t.columns.get(r.columnName);e&&(e.arrowProposedWidth=0)}e.remove()}for(const e of i)e.classList.remove("sorted","desc")}return e}function wi(e,t,r){var n;const i=e._p,o=e._o,l=i.columns.get(t);if(!l)return!1;const s=ai("span");return s.className="sort-arrow",l.element&&(l.element.className+=r?" sorted desc":" sorted",null!==(n=l.element.firstChild)&&void 0!==n&&n.insertBefore(s,l.element.firstChild.firstChild)),2!==l.widthMode&&o.adjustColumnWidthForSortArrow&&(l.arrowProposedWidth=s.scrollWidth+(parseFloat(getComputedStyle(s).marginRight)||0)+(parseFloat(getComputedStyle(s).marginLeft)||0)),!0}function yi(e,t){t.firstChild,t.addEventListener("mousedown",t=>ei(e,t)),t.addEventListener("mousemove",t=>ni(e,t)),t.addEventListener("mouseup",t=>function(e,t){2===t.button&&ii(e,t)}(e,t)),t.addEventListener("mouseleave",t=>function(e,t){const r=e._o,n=t.target.closest(`div.${r.tableClassName}-header-cell,div.${r.cellPreviewClassName}`);n&&(n.style.cursor="")}(e,t)),t.addEventListener("touchstart",t=>function(e,t){const r=e._p;if(r.currentTouchId)return;const n=t.changedTouches[0];r.currentTouchId=n.identifier;const i=t.currentTarget,o={x:n.pageX,y:n.pageY};let l=o;const s=function(){r.currentTouchId=null,r.eventsSink.remove(i,".colheader"),clearTimeout(r.tapAndHoldTimeout),r.tapAndHoldTimeout=null};t[zn]=t.changedTouches[0],!0!==ei(e,t)?(r.tapAndHoldTimeout=setTimeout(()=>{s(),r.eventsSink.add(i,"touchend.colheader",e=>{ki(e)||e.preventDefault(),r.eventsSink.remove(i,".colheader")},{once:!0}).add(i,"touchcancel.colheader",e=>{r.eventsSink.remove(i,".colheader")},{once:!0}),Math.sqrt(Math.pow(Math.abs(l.x-o.x),2)+Math.pow(Math.abs(l.y-o.y),2))<9&&(Zn(e),ii(e,t))},500),r.eventsSink.add(i,"touchend.colheader",t=>{const n=t,i=En(Array.from(n.changedTouches),e=>e.identifier===r.currentTouchId);i&&(s(),ki(t)||t.preventDefault(),l={x:i.pageX,y:i.pageY},(Math.sqrt(Math.pow(Math.abs(l.x-o.x),2)+Math.pow(Math.abs(l.y-o.y),2))<9||r.resizer)&&(n[zn]=i,oi(e,n)))}).add(i,"touchcancel.colheader",s).add(i,"touchmove.colheader",t=>{const n=t,i=En(Array.from(n.changedTouches),e=>e.identifier===r.currentTouchId);i&&(l={x:i.pageX,y:i.pageY},r.resizer&&(t.preventDefault(),n[zn]=i,ni(e,n)))})):r.currentTouchId=null}(e,t)),t.addEventListener("dragstart",t=>function(e,t){const r=e._o,n=e._p;if(r.movableColumns){var i;const e=t.target.closest(`div.${r.tableClassName}-header-cell,div.${r.cellPreviewClassName}`);if(!e)return void t.preventDefault();const o=n.columns.get(e.columnName);o&&o.movable?(e.style.opacity="0.35",n.dragId=161061273*Math.random(),null===(i=t.dataTransfer)||void 0===i||i.setData("text",JSON.stringify({dragId:n.dragId,column:o.name}))):t.preventDefault()}else t.preventDefault()}(e,t)),t.addEventListener("click",t=>oi(e,t)),t.addEventListener("contextmenu",e=>e.preventDefault()),t.addEventListener("dragenter",t=>function(e,t){const r=e._o,n=e._p;if(r.movableColumns){var i;let o=null;const l=null===(i=t.dataTransfer)||void 0===i?void 0:i.getData("text");if(l)try{o=JSON.parse(l)}catch{o=null}const s=t.target.closest(`div.${r.tableClassName}-header-cell,div.${r.cellPreviewClassName}`);if(!s)return;if(!o||n.dragId===o.dragId&&s.columnName!==o.column){const t=n.columns.get(s.columnName);t&&li(e,t)&&s.classList.add("drag-over")}}}(e,t)),t.addEventListener("dragover",e=>{e.preventDefault()}),t.addEventListener("dragleave",t=>function(e,t){const r=e._o,n=t.target.closest(`div.${r.tableClassName}-header-cell,div.${r.cellPreviewClassName}`);if(!n)return;const i=t.relatedTarget;i===n||n.contains(i)||n.classList.remove("drag-over")}(e,t)),t.addEventListener("drop",t=>function(e,t,r){t.preventDefault();const n=e._o,i=e._p,o=null===(r=t.dataTransfer)||void 0===r?void 0:r.getData("text");if(!o)return;let l;try{l=JSON.parse(o)}catch{return}const s=t.target.closest(`div.${n.tableClassName}-header-cell,div.${n.cellPreviewClassName}`);if(s){if(n.movableColumns&&l.dragId===i.dragId){const t=l.column,r=s.columnName,n=i.columns.get(t),o=i.columns.get(r);n&&o&&n.movable&&li(e,o)&&e.moveColumn(t,r)}s.classList.remove("drag-over")}}(e,t))}function Wi(e,t){let r=0;if("string"==typeof e){const t=e.trim().toLowerCase();if("rest"===t)return{width:0,mode:3};if("auto"===t)return{width:0,mode:0}}let n=parseFloat(e);return Number.isFinite(n)||(n=0),n=Math.max(0,n),n>0&&("string"==typeof e&&e.trim().endsWith("%")?(r=2,n/=100):n>0&&n<1?r=2:(n<t&&(n=t),r=1)),{width:n,mode:r}}function Si(e,t){var r;let n=Wi(t.width,t.ignoreMin?0:e.minColumnWidth),i={name:t.name,label:void 0===t.label?t.name:t.label,width:n.width,widthMode:n.mode,resizable:void 0===t.resizable||t.resizable,sortable:void 0===t.sortable||t.sortable,movable:void 0===t.movable||t.movable,visible:void 0===t.visible||t.visible,cellClasses:void 0===t.cellClasses?e.cellClasses:t.cellClasses,ignoreMin:void 0!==t.ignoreMin&&!!t.ignoreMin,sticky:void 0===t.sticky?null:t.sticky||null,allowPreview:!(null!==(r=t.allowPreview)&&void 0!==r&&!r),dataPath:[],comparePath:[],order:0};const o=void 0===t.dataPath?i.name:t.dataPath,l=void 0===t.comparePath?o:t.comparePath;return i.dataPath="string"==typeof o?o.split("."):o,i.comparePath="string"==typeof l?l.split("."):l,i}function _i(e){const t=e._p;0===t.visibleColumns.length&&t.columns.length&&(t.columns[0].visible=!0,t.visibleColumns.push(t.columns[0]),e.emit("showcolumn",t.columns[0].name))}function xi(e){const t=e._p;if(t.filteredRows&&t.filterArgs){let r=e._o.filter||Bn;t.filteredRows=t.rows.filteredCollection(r,t.filterArgs)}}function Ri(e){const t=e._p;if(!t.filteredRows)return;const r=new Set(t.filteredRows),n=new Dn({sortColumn:t.rows.sortColumn,onComparatorRequired:t.rows.onComparatorRequired,customSortingProvider:t.rows.customSortingProvider});for(let e=0,i=t.rows.length;e<i;e++){const i=t.rows[e];r.has(i)&&(i[Hn]=e,n.push(i))}t.filteredRows=n}function Ii(e,t,r){let n=r.dataPath,i=t[n[0]];for(let e=1;e<n.length&&null!=i;e++)i=i&&i[n[e]];const o=e.cellFormatter;let l;if(o[Pn])l=o(i,r.name,t);else try{l=o(i,r.name,t)}catch(e){l="[ERROR]",console.error("Failed to generate content for cell "+r.name,e)}return null==l&&(l=""),l}const Ni=document.createElement.bind(document);function Ei(e){["relative","absolute","fixed"].includes(getComputedStyle(e).position)||(e.style.position="relative")}function ki(e){const t=e.target;return/^(?:INPUT|TEXTAREA|BUTTON|SELECT)$/.test(t.tagName)}function Pi(e){const t=getComputedStyle(e);return(parseFloat(t.paddingLeft)||0)+(parseFloat(t.paddingRight)||0)}function Fi(e){const t=e.style;t["-webkit-touch-callout"]="none",t["-webkit-user-select"]="none",t["-moz-user-select"]="none",t["-ms-user-select"]="none",t["-o-user-select"]="none",t["user-select"]="none"}function Ti(e,t,r=null){const n=e._o,i=n.tableClassName,o=Ni("div");o.className=e.el.className,nn(o,{position:"absolute",top:"-9999px",left:"0",visibility:"hidden",width:"auto",overflow:"visible"});const l=Ni("div");l.className=`${i}-header`;const s=Ni("div");s.className=`${i}-header-row`;const a=Ni("div");a.className=`${i}-header-cell ${t.cellClasses||""}`,a.style.width="auto";const u=a.cloneNode(!0),d=a.cloneNode(!0);a.appendChild(Ni("div")).innerHTML=n.headerCellFormatter(t.label,t.name),s.appendChild(u),s.appendChild(a),s.appendChild(d),l.appendChild(s),o.appendChild(l),document.body.appendChild(o);let c=ln(a,!0,!0,!0)+n.columnAutoWidthExtraSize;if(r){const e=Ni("div");e.className=`${i}-body`;const l=Ni("div");l.className=`${i}-row`;const s=Ni("div");s.className=`${i}-cell ${t.cellClasses||""}`,s.style.width="auto";const a=s.appendChild(Ni("div"));l.appendChild(s),e.appendChild(l),o.appendChild(e);for(let e=0;e<r.length;e++)a.innerHTML=Ii(n,r[e],t),c=Math.max(c,ln(s,!0,!0,!0))}return o.remove(),c+=t.arrowProposedWidth||0,!t.ignoreMin&&c<n.minColumnWidth&&(c=n.minColumnWidth),Math.ceil(c)}function Mi(e){const t=e._o,r=e._p;let n,i=0,o=0;r.table&&(i=r.table?r.table.scrollTop:0,o=r.table?r.table.scrollLeft:0,t.virtualTable&&(n=r.table.style.display,r.table.style.display="none"));let l=ln(e.el);r.table&&(t.virtualTable&&void 0!==n&&(r.table.style.display=n),r.table.scrollTop=i,r.table.scrollLeft=o,r.header&&(r.header.scrollLeft=o));const s=t.tableClassName,a=Ni("div");a.className=e.el.className,nn(a,{"z-index":"-1",position:"absolute",left:"0",top:"-9999px"});const u=Ni("div");u.className=`${s}-header`,a.appendChild(u);const d=Ni("div");d.index=null,d.vIndex=null,d.className=`${s}-header-row`,u.appendChild(d);for(let e=0;e<r.visibleColumns.length;e++){const t=r.visibleColumns[e],n=Ni("div");n.className=`${s}-header-cell ${t.cellClasses||""}`,n.columnName=t.name,n.appendChild(Ni("div")),d.appendChild(n)}document.body.appendChild(a),l-=function(e){const t=getComputedStyle(e);return(parseFloat(t.borderLeftWidth)||0)+(parseFloat(t.borderRightWidth)||0)}(d);const c=d.querySelectorAll(`div.${s}-header-cell`);for(const e of c){const t=getComputedStyle(e);if("border-box"!==t.boxSizing){l-=(parseFloat(t.borderRightWidth)||0)+(parseFloat(t.borderLeftWidth)||0)+Pi(e);const n=e.columnName,i=r.columns.get(n);i&&(l-=i.arrowProposedWidth||0)}}return a.remove(),Math.max(0,l)}function Ai(e){const t=e._p,r=e._o.tableClassName,n=r+"-row",i=r+"-cell",o=t.visibleColumns,l=o.length,s=Ni("div");s.className=n,s.style.float="left";let a=0;for(let e=0;e<l;e++){var u,d;const t=o[e],r=Ni("div");r.className=i,r.style.width=(null!==(u=t.actualWidth)&&void 0!==u?u:0)+"px",t.cellClasses&&(r.className+=" "+t.cellClasses),r.appendChild(Ni("div")),s.appendChild(r),a+=null!==(d=t.actualWidth)&&void 0!==d?d:0}const c=Ni("div");c.className=e.el.className,nn(c,{"z-index":"-1",position:"absolute",left:"0",top:"-9999px",float:"left",width:"1px",overflow:"hidden"});const h=Ni("div");h.className=r,c.appendChild(h);const m=Ni("div");m.className=r+"-body",m.style.width=a+1e4+"px",h.appendChild(m),m.appendChild(s),document.body.appendChild(c);const f=Ni("div");nn(f,{border:"1.5px solid #000",width:"0",height:"0",position:"absolute",left:"0",top:"-9999px"}),document.body.appendChild(f);const v=parseFloat(getComputedStyle(f).borderWidth),p=Math.round(v)!==v;f.remove();let g=ln(s,!0,!0,!0);return g-=t.scrollbarWidth||0,p&&g++,c.remove(),g}function Li(e){const t=e._p;return!!t.table&&"rtl"===getComputedStyle(t.table).direction}function zi(e){var t;const r=null!=e.unconvertedWidth?e.unconvertedWidth:e.width,n=null!=e.unconvertedWidth&&null!==(t=e.unconvertedWidthMode)&&void 0!==t?t:e.widthMode;return 0===n?"auto":2===n?parseFloat((100*r).toPrecision(12))+"%":3===n?"rest":r}const Hi=Object.prototype.hasOwnProperty,Oi=Symbol("once_original_handler");document.createElement.bind(document);class Di{constructor(e){var r,n,i,o,l,s;t(this,"VERSION",void 0),t(this,"el",void 0),t(this,"_o",void 0),t(this,"_p",void 0),t(this,On,void 0),e=e||{},this.VERSION=Di.VERSION;const a=this._o={},u=this._p={eventsSink:new fn,mitt:{all:d=d||new Map,on:function(e,t){var r=d.get(e);r?r.push(t):d.set(e,[t])},off:function(e,t){var r=d.get(e);r&&(t?r.splice(r.indexOf(t)>>>0,1):d.set(e,[]))},emit:function(e,t){var r=d.get(e);r&&r.slice().map(function(e){e(t)}),(r=d.get("*"))&&r.slice().map(function(r){r(e,t)})}},tableSkeletonNeedsRendering:!0};var d;if(this.el=e.el&&e.el instanceof HTMLElement?e.el:document.createElement("div"),this.el!==e.el){const t=(e.className||"dgtable-wrapper").split(/\s+/).filter(Boolean);this.el.classList.add(...t)}u.eventsSink.add(this.el,"dragend.colresize",e=>{return t=e,void(this._p.resizer||(t.target.style.opacity=""));var t}),u.isWheelScrolling=!1,u.eventsSink.add(this.el,"wheel",e=>{if(u.cellPreviewCell){let t=!1,r=e.target;for(;r&&r!==u.cellPreviewCell;){const e=getComputedStyle(r),n=e.overflowY,i=e.overflowX,o=("auto"===n||"scroll"===n)&&r.scrollHeight>r.clientHeight,l=("auto"===i||"scroll"===i)&&r.scrollWidth>r.clientWidth;if(o||l){t=!0;break}r=r.parentElement}if(t)return}u.isWheelScrolling=!0,Yn(this),u.wheelScrollTimeout&&clearTimeout(u.wheelScrollTimeout),u.wheelScrollTimeout=setTimeout(()=>{u.isWheelScrolling=!1,u.wheelScrollTimeout=void 0},100)},{passive:!0}),a.virtualTable=void 0===e.virtualTable||!!e.virtualTable,a.estimatedRowHeight=e.estimatedRowHeight||void 0,a.rowsBufferSize=Math.max(null!==(r=e.rowsBufferSize)&&void 0!==r?r:3,0),a.minColumnWidth=Math.max(null!==(n=e.minColumnWidth)&&void 0!==n?n:35,0),a.maxStickyColumnRelativeWidth=e.maxStickyColumnRelativeWidth||null,a.columnAutoWidthExtraSize=e.columnAutoWidthExtraSize||0,a.resizeAreaWidth=Math.max(null!==(i=e.resizeAreaWidth)&&void 0!==i?i:8,0),a.resizeAreaDoubleClickDuration=Math.max(null!==(o=e.resizeAreaDoubleClickDuration)&&void 0!==o?o:300,0),a.autoFitColumnOnResizeDoubleClick=void 0!==e.autoFitColumnOnResizeDoubleClick&&!!e.autoFitColumnOnResizeDoubleClick,a.resizableColumns=void 0===e.resizableColumns||!!e.resizableColumns,a.movableColumns=void 0===e.movableColumns||!!e.movableColumns;const c=null!==(l=e.maxColumnsSortCount)&&void 0!==l?l:e.sortableColumns,h=Number(null!=c?c:1);a.sortableColumns=Number.isFinite(h)?Math.max(h,0):1,a.adjustColumnWidthForSortArrow=void 0===e.adjustColumnWidthForSortArrow||!!e.adjustColumnWidthForSortArrow,a.convertColumnWidthsToRelative=void 0!==e.convertColumnWidthsToRelative&&!!e.convertColumnWidthsToRelative,a.autoFillTableWidth=void 0!==e.autoFillTableWidth&&!!e.autoFillTableWidth,a.autoFillLastColumn=void 0===e.autoFillLastColumn||!!e.autoFillLastColumn,a.allowCancelSort=void 0===e.allowCancelSort||!!e.allowCancelSort,a.cellClasses=void 0===e.cellClasses?"":e.cellClasses,a.resizerClassName=void 0===e.resizerClassName?"dgtable-resize":e.resizerClassName,a.tableClassName=void 0===e.tableClassName?"dgtable":e.tableClassName,a.allowCellPreview=void 0===e.allowCellPreview||e.allowCellPreview,a.allowHeaderCellPreview=void 0===e.allowHeaderCellPreview||e.allowHeaderCellPreview,a.cellPreviewClassName=void 0===e.cellPreviewClassName?"dgtable-cell-preview":e.cellPreviewClassName,a.cellPreviewAutoBackground=void 0===e.cellPreviewAutoBackground||e.cellPreviewAutoBackground,a.onComparatorRequired=void 0===e.onComparatorRequired?null:e.onComparatorRequired,a.customSortingProvider=void 0===e.customSortingProvider?null:e.customSortingProvider,a.width=void 0===e.width?Vn.NONE:e.width,a.relativeWidthGrowsToFillWidth=void 0===e.relativeWidthGrowsToFillWidth||!!e.relativeWidthGrowsToFillWidth,a.relativeWidthShrinksToFillWidth=void 0!==e.relativeWidthShrinksToFillWidth&&!!e.relativeWidthShrinksToFillWidth,this.setCellFormatter(e.cellFormatter),this.setHeaderCellFormatter(e.headerCellFormatter),this.setFilter(e.filter),a.height=e.height,this.setColumns(e.columns||[],!1);let m=[];const f=null!==(s=e.sortedColumns)&&void 0!==s?s:e.sortColumn;if(f){let e=Array.isArray(f)?f:[f];for(let t=0,r=e.length;t<r;t++){var v;let r=e[t];"string"==typeof r&&(r={column:r,descending:!1});let n=u.columns.get(r.column);n&&m.push({column:r.column,comparePath:n.comparePath||n.dataPath,descending:null!==(v=r.descending)&&void 0!==v&&v})}}u.rows=new Dn({sortColumn:m}),u.rows.onComparatorRequired=(e,t,r)=>{if(a.onComparatorRequired)return a.onComparatorRequired(e,t,r)},u.rows.customSortingProvider=(e,t)=>a.customSortingProvider?a.customSortingProvider(e,t):t(e),u.filteredRows=null,u.scrollbarWidth=0,u._lastVirtualScrollHeight=0,function(e){const t=e._p,r=t=>{let r=t.currentTarget,n=t.relatedTarget;n===r||r.contains(n)||r[An]&&(n===r[An]||r[An].contains(n))||function(e,t,r,n){const i=e._o,o=e._p;if(o.isWheelScrolling)return;const l=t.firstElementChild;if(!l)return;if(!(l.scrollWidth-l.clientWidth>1||l.scrollHeight-l.clientHeight>1))return;Yn(e),o.abortCellPreview=!1;const s=t.parentElement;if(!s)return;const a=null===(r=o.visibleColumns[Un.call(s.childNodes,t)])||void 0===r?void 0:r.name,u=a?o.columns.get(a):null;if(!u)return;const d=s.index;if(e.emit("cellhoveroverflow",{name:a,rowIndex:null!=d?d:null,rowData:null==d?null:o.rows[d],cell:t,cellEl:l}),!1===u.allowPreview)return;const c=t.classList.contains(`${i.tableClassName}-header-cell`);if(c?!i.allowHeaderCellPreview:!i.allowCellPreview)return;const h=Xn("div");h.innerHTML=t.innerHTML,h.className=i.cellPreviewClassName+" "+(u.cellClasses||""),c&&(h.classList.add("header"),t.classList.contains("sortable")&&h.classList.add("sortable"),h.draggable=!0,yi(e,h));const m=getComputedStyle(t),f=getComputedStyle(l),v="right"===m.float,p=v?"right":"left",g=parseFloat(m.paddingLeft)||0,b=parseFloat(m.paddingRight)||0,C=parseFloat(m.paddingTop)||0,w=parseFloat(m.paddingBottom)||0;let y=l.scrollWidth+(t.clientWidth-l.offsetWidth);const W="border-box"===m.boxSizing;if(W?h.style.boxSizing="border-box":(y-=g+b,h.style.marginTop=(parseFloat(m.borderTopWidth)||0)+"px"),!o.transparentBgColor1){const e=document.createElement("div");document.body.appendChild(e),e.style.backgroundColor="transparent",o.transparentBgColor1=getComputedStyle(e).backgroundColor,e.style.backgroundColor="rgba(0,0,0,0)",o.transparentBgColor2=getComputedStyle(e).backgroundColor,e.remove()}const S={"box-sizing":W?"border-box":"content-box",width:y+"px","min-height":Math.max(sn(t),/%/.test(m.minHeight)?0:parseFloat(m.minHeight)||0)+"px","padding-left":g+"px","padding-right":b+"px","padding-top":C+"px","padding-bottom":w+"px",overflow:"hidden",position:"absolute","z-index":"-1",[p]:"0",top:"0",cursor:m.cursor};if(i.cellPreviewAutoBackground){let e=m.backgroundColor;e!==o.transparentBgColor1&&e!==o.transparentBgColor2||(e=getComputedStyle(s).backgroundColor),e!==o.transparentBgColor1&&e!==o.transparentBgColor2||(e="#fff"),S["background-color"]=e}nn(h,S),h.firstChild&&nn(h.firstChild,{direction:f.direction,"white-space":f.whiteSpace,"min-height":f.minHeight,"line-height":f.lineHeight,font:f.font}),e.el.appendChild(h),c&&Fi(h),h.rowVIndex=s.vIndex,h.rowIndex=d,h.columnName=a;try{const e=qn.saveSelection(t);e&&qn.restoreSelection(h,e)}catch{}if(e.emit("cellpreview",{el:h.firstElementChild,name:h.columnName,rowIndex:null!=d?d:null,rowData:null==d?null:o.rows[d],cell:t,cellEl:l}),o.abortCellPreview)return void h.remove();null!=d&&h.addEventListener("click",t=>{e.emit("rowclick",{event:t,filteredRowIndex:s.vIndex,rowIndex:d,rowEl:s,rowData:o.rows[d]})});const _=e.el,x=_===window?document:_,R=getComputedStyle(_),I=cn(t),N=cn(_);if(v){const e=window.innerWidth;I.right=e-(I.left+ln(t,!0,!0,!0)),N.right=e-(N.left+ln(_,!0,!0,!0))}I.left-=parseFloat(R.borderLeftWidth)||0,"right"===p&&void 0!==I.right&&void 0!==N.right&&(I.right-=parseFloat(R.borderRightWidth)||0),I.top-=parseFloat(R.borderTopWidth)||0,"left"===p?I.left+=parseFloat(m.borderLeftWidth)||0:void 0!==I.right&&(I.right+=parseFloat(m.borderRightWidth)||0),I.top+=parseFloat(m.borderTopWidth)||parseFloat(m.borderBottomWidth)||0,I.left-=N.left,"right"===p&&void 0!==I.right&&void 0!==N.right&&(I.right-=N.right),I.top-=N.top;const E=ln(_,!1,!1,!1)-ln(h,!0,!0,!0),k="left"===p?I.left:null!==(n=I.right)&&void 0!==n?n:0,P=Math.max(0,Math.min(E,k));"left"===p?I.left=P:I.right=P;const F=sn(t,!0,!0,!0),T=("scrollTop"in x?x.scrollTop:0)+sn(_,!0)-F;I.top>T&&(I.top=Math.max(0,T));const M={top:I.top+"px","z-index":9999};M[p]=("left"===p?I.left:I.right)+"px",nn(h,M),h[Ln]=t,o.cellPreviewCell=h,t[An]=h,o._bindCellHoverOut(t),o._bindCellHoverOut(h)}(e,r)},n=t=>{let r=t.currentTarget[Ln]||t.currentTarget,n=t.relatedTarget;n===e.el||r.contains(n)||r[An]&&(n===r[An]||r[An].contains(n))||function(e){Yn(e)}(e)};t._bindCellHoverIn=e=>{e[Fn]||e.addEventListener("mouseover",e[Fn]=r)},t._unbindCellHoverIn=e=>{e[Fn]&&(e.removeEventListener("mouseover",e[Fn]),e[Fn]=null)},t._bindCellHoverOut=e=>{e[Tn]||e.addEventListener("mouseout",e[Tn]=n)},t._unbindCellHoverOut=e=>{e[Tn]&&(e.removeEventListener("mouseout",e[Tn]),e[Tn]=null)}}(this)}on(e,t){return this[On]||this._p.mitt.on(e,t),this}once(e,t){if(this[On])return this;const r=n=>{this._p.mitt.off(e,r),t(n)};return r[Oi]=t,this._p.mitt.on(e,r),this}off(e,t){if(this[On])return this;if(e||t){if(this._p.mitt.off(e,t),t){var r;const n=null!==(r=this._p.mitt.all.get(e))&&void 0!==r?r:[];for(const r of n.slice())r[Oi]===t&&this._p.mitt.off(e,r)}}else this._p.mitt.all.clear();return this}emit(e,t){return this[On]||this._p.mitt.emit(e,t),this}destroy(){var e,t,r;const n=this._p,i=this.el;if(this[On]||!n)return this;if(Zn(this),di(this),null!==(e=n.virtualListHelper)&&void 0!==e&&e.destroy(),n.virtualListHelper=null,hi(this),null!==(t=n.table)&&void 0!==t&&t.remove(),null!==(r=n.tbody)&&void 0!==r&&r.remove(),n.workerListeners){for(let e=0;e<n.workerListeners.length;e++){let t=n.workerListeners[e];t.worker.removeEventListener("message",t.listener,!1)}n.workerListeners.length=0}n.rows.length=n.columns.length=0,n._deferredRender&&clearTimeout(n._deferredRender),n.wheelScrollTimeout&&clearTimeout(n.wheelScrollTimeout),n.tapAndHoldTimeout&&clearTimeout(n.tapAndHoldTimeout),n.eventsSink.remove();for(let e in this)Hi.call(this,e)&&(this[e]=null);return this[On]=!0,i&&i.remove(),this}close(){this.destroy()}remove(){this.destroy()}render(){const e=this._o,t=this._p;if(!this.el.offsetParent)return t._deferredRender||(t._deferredRender=setTimeout(()=>{t._deferredRender=null,!this[On]&&this.el.offsetParent&&this.render()})),this;if(!0===t.tableSkeletonNeedsRendering){var r;t.tableSkeletonNeedsRendering=!1,e.width===Vn.AUTO&&Ci(this);let o=t.table&&t.table.parentNode?t.table.scrollTop:NaN,l=t.table&&t.table.parentNode?(n=t.table,void 0===i&&(i="rtl"===getComputedStyle(n).direction),i?n.scrollWidth-n.clientWidth-tn(n,i):tn(n,i)):NaN;!function(e,t){const r=e._p,n=e._o;di(e),null!==(t=r.virtualListHelper)&&void 0!==t&&t.destroy(),r.virtualListHelper=null,r.table&&n.virtualTable&&(r.table.remove(),r.table=void 0,r.tbody=void 0),hi(e),r.currentTouchId=null,r.header&&r.header.remove();const i=n.tableClassName,o=ai("div"),l=ai("div");o.className=`${i}-header`,l.className=`${i}-header-row`,r.header=o,r.headerRow=l,o.appendChild(l),e.el.prepend(o),Ei(e.el),n.width===Vn.SCROLL?e.el.style.overflow="hidden":e.el.style.overflow="",!n.height&&n.virtualTable&&(n.height=sn(e.el,!0))}(this),function(e){const t=e._p,r=e._o,n=r.tableClassName;if(r.virtualTable&&!t.virtualRowHeight){const r=()=>{const e=ai("div"),t=e.appendChild(ai("div")),r=t.appendChild(ai("div"));return e.className=`${n}-row`,t.className=`${n}-cell`,r.innerHTML="0",e.style.visibility="hidden",e.style.position="absolute",e},i=ai("div");i.className=e.el.className,nn(i,{"z-index":"-1",position:"absolute",left:"0",top:"-9999px",width:"1px",overflow:"hidden"});const o=ai("div");o.className=n,i.appendChild(o);const l=ai("div");l.className=`${n}-body`,l.style.width="99999px",o.appendChild(l),document.body.appendChild(i);const s=r(),a=r(),u=r();l.appendChild(s),l.appendChild(a),l.appendChild(u),t.virtualRowHeight=sn(a,!0,!0,!0),i.remove()}if(!t.table){var i;const o=document.createDocumentFragment(),l=ai("div");l.className=n,r.virtualTable&&(l.className+=" virtual");const s=getComputedStyle(l);let a=(null!==(i=r.height)&&void 0!==i?i:0)-sn(t.header,!0,!0,!0);"border-box"!==s.boxSizing&&(a-=parseFloat(s.borderTopWidth)||0,a-=parseFloat(s.borderBottomWidth)||0,a-=parseFloat(s.paddingTop)||0,a-=parseFloat(s.paddingBottom)||0),nn(l,{height:r.height?a+"px":"auto",display:"block",overflowY:"auto",overflowX:r.width===Vn.SCROLL?"auto":"hidden"}),o.appendChild(l);const u=ai("div");u.className=r.tableClassName+"-body",u.style.minHeight="1px",t.table=l,t.tbody=u,Ei(u),Ei(l),l.appendChild(u),e.el.appendChild(o)}t.virtualListHelper||function(e,t){const r=e._p,n=e._o,i=n.tableClassName,o=i+"-row",l=i+"-row-alt",s=i+"-cell",a=i+"-sticky";let u=r.visibleColumns,d=u.length;r.notifyRendererOfColumnsConfig=()=>{u=r.visibleColumns,d=u.length;for(let e=0;e<d;e++){const t=u[e];t._finalWidth=t.actualWidthConsideringScrollbarWidth||t.actualWidth}},r.virtualListHelper=new wn({list:r.table,itemsParent:r.tbody,autoVirtualWrapperWidth:!1,virtual:n.virtualTable,buffer:n.rowsBufferSize,estimatedItemHeight:n.estimatedRowHeight?n.estimatedRowHeight:r.virtualRowHeight||40,itemElementCreatorFn:()=>ai("div"),onItemRender:(t,i)=>{const c=t,h=r.filteredRows||r.rows,m=!!r.filteredRows,f=r.isStickyColumns;c.className=o,i%2==1&&(c.className+=" "+l);const v=h[i],p=m?v[Hn]:i;c.vIndex=i,c.index=p;for(let e=0;e<d;e++){var g;const t=u[e],i=ai("div");if(i.columnName=t.name,i.setAttribute("data-column",t.name),i.className=s,i.style.width=(null!==(g=t._finalWidth)&&void 0!==g?g:0)+"px",t.cellClasses&&(i.className+=" "+t.cellClasses),t.stickyPos){i.className+=" "+a,i.style.position="sticky",i.style[t.stickyPos.absDirection]=t.stickyPos.offset+"px";const n=null==f?void 0:f.get(e);"start"===n&&!r.lastIsRtl||"end"===n&&r.lastIsRtl?i.classList.add("is-sticky-left"):("start"===n&&r.lastIsRtl||"end"===n&&!r.lastIsRtl)&&i.classList.add("is-sticky-right")}r._bindCellHoverIn(i),i.appendChild(ai("div")).innerHTML=Ii(n,v,t),c.appendChild(i)}c.addEventListener("click",c[Mn]=t=>{e.emit("rowclick",{event:t,filteredRowIndex:i,rowIndex:p,rowEl:c,rowData:v})}),e.emit("rowcreate",{filteredRowIndex:i,rowIndex:p,rowEl:c,rowData:v})},onItemUnrender:t=>ui(e,t),onScrollHeightChange:t=>{t>r._lastVirtualScrollHeight&&!r.scrollbarWidth&&fi(e),r._lastVirtualScrollHeight=t}}),r.virtualListHelper.setCount((null!==(t=r.filteredRows)&&void 0!==t?t:r.rows).length),r.notifyRendererOfColumnsConfig()}(e)}(this),this.tableWidthChanged(!0,!1),function(e){const t=e._p,r=e._o,n=r.tableClassName+"-header-cell",i=t.headerRow;for(let l=0;l<t.visibleColumns.length;l++){const s=t.visibleColumns[l];if(s.visible){var o;const a=ai("div");a.draggable=!0,a.className=n,a.style.width=(null!==(o=s.actualWidth)&&void 0!==o?o:0)+"px",r.sortableColumns&&s.sortable&&(a.className+=" sortable"),a.columnName=s.name,a.setAttribute("data-column",s.name);const u=ai("div");u.innerHTML=r.headerCellFormatter(s.label,s.name),a.appendChild(u),t._bindCellHoverIn(a),i.appendChild(a),t.visibleColumns[l].element=a,yi(e,a),Fi(a)}}pi(e),e.emit("headerrowcreate",i)}(this),t.virtualListHelper.setCount((null!==(r=t.filteredRows)&&void 0!==r?r:t.rows).length),mi(this),fi(this,!0),vi(this,!0),ci(this),fi(this);for(let e=0;e<t.rows.sortColumn.length;e++)wi(this,t.rows.sortColumn[e].column,t.rows.sortColumn[e].descending);e.adjustColumnWidthForSortArrow&&t.rows.sortColumn.length?this.tableWidthChanged(!0):e.virtualTable||this.tableWidthChanged(),isNaN(o)||(t.table.scrollTop=o),isNaN(l)||(rn(t.table,l),rn(t.header,l)),pi(this),this.emit("renderskeleton")}var n,i;t.virtualListHelper.render();const o=t.scrollbarWidth;return fi(this),t.scrollbarWidth!==o&&vi(this,!1),this.emit("render"),this}clearAndRender(e){var t;let r=this._p;return r.tableSkeletonNeedsRendering=!0,null!==(t=r.notifyRendererOfColumnsConfig)&&void 0!==t&&t.call(r),(void 0===e||e)&&this.render(),this}setColumns(e,t){const r=this._p;e=e||[];let n=new jn;for(let t=0,r=0;t<e.length;t++){let i=e[t],o=Si(this._o,i);void 0!==i.order?(i.order>r&&(r=i.order+1),o.order=i.order):o.order=r++,n.push(o)}return n.normalizeOrder(),r.columns=n,r.visibleColumns=n.getVisibleColumns(),_i(this),this.clearAndRender(t),this}addColumn(e,t,r){const n=this._p;let i=n.columns;if(e&&!i.get(e.name)){let o=null;void 0!==t&&(o="string"==typeof t?i.get(t):i.getByOrder(t));let l=Si(this._o,e);l.order=o?o.order:i.getMaxOrder()+1;for(let e=i.getMaxOrder(),t=l.order;e>=t;e--){let t=i.getByOrder(e);t&&t.order++}i.push(l),i.normalizeOrder(),n.visibleColumns=i.getVisibleColumns(),_i(this),this.clearAndRender(r),this.emit("addcolumn",l.name)}return this}removeColumn(e,t){const r=this._p;let n=r.columns,i=n.indexOf(e);return i>-1&&(n.splice(i,1),n.normalizeOrder(),r.visibleColumns=n.getVisibleColumns(),_i(this),this.clearAndRender(t),this.emit("removecolumn",e)),this}setColumnLabel(e,t){let r=this._p.columns.get(e);if(r&&(r.label=void 0===t?r.name:t,r.element)){const e=r.element.firstChild,t=e.querySelector(":scope > .sort-arrow");e.innerHTML=this._o.headerCellFormatter(r.label,r.name),t&&e.insertBefore(t,e.firstChild)}return this}moveColumn(e,t,r=!0){const n=this._o,i=this._p;let o,l,s=i.columns,a=r?i.visibleColumns:s.getColumns();if("string"==typeof e?o=s.get(e):"number"==typeof e&&(o=a[e]),"string"==typeof t?l=s.get(t):"number"==typeof t&&(l=a[t]),o&&l&&e!==t){let e=o.order,t=l.order,r=s.moveColumn(o,l).getVisibleColumns();if(i.visibleColumns.length!==r.length||i.visibleColumns.some((e,t)=>e!==r[t])){const e=i.visibleColumns.indexOf(o),t=i.visibleColumns.indexOf(l);if(i.visibleColumns=r,_i(this),!n.virtualTable&&-1!==e&&-1!==t&&i.headerRow&&i.tbody){var u,d;const r=mn(i.headerRow,`>div.${n.tableClassName}-header-cell`),o=e<t?t+1:t;r[0].parentNode.insertBefore(r[e],r[o]);const l=i.visibleColumns[t],s=(null!==(u=l.actualWidthConsideringScrollbarWidth||l.actualWidth)&&void 0!==u?u:0)+"px",a=i.visibleColumns[e],c=(null!==(d=a.actualWidthConsideringScrollbarWidth||a.actualWidth)&&void 0!==d?d:0)+"px",h=i.tbody.childNodes;for(let r=0,n=h.length;r<n;r++){const n=h[r];1===n.nodeType&&(n.insertBefore(n.childNodes[e],n.childNodes[o]),n.childNodes[t].firstChild.style.width=s,n.childNodes[e].firstChild.style.width=c)}this.tableWidthChanged(!0)}else this.clearAndRender()}this.emit("movecolumn",{name:o.name,src:e,dest:t})}return this}setColumnVisible(e,t){const r=this._p;let n=r.columns.get(e);return t=!!t,n&&!!n.visible!==t&&(n.visible=t,r.visibleColumns=r.columns.getVisibleColumns(),this.emit(t?"showcolumn":"hidecolumn",e),_i(this),this.clearAndRender()),this}isColumnVisible(e){let t=this._p.columns.get(e);return!!t&&t.visible}setMinColumnWidth(e){let t=this._o;return e=Math.max(e,0),t.minColumnWidth!==e&&(t.minColumnWidth=e,this.tableWidthChanged(!0)),this}getMinColumnWidth(){return this._o.minColumnWidth}setColumnAutoWidthExtraSize(e){let t=this._o;return e=Math.max(e,0),t.columnAutoWidthExtraSize!==e&&(t.columnAutoWidthExtraSize=e,this.tableWidthChanged(!0)),this}getColumnAutoWidthExtraSize(){return this._o.columnAutoWidthExtraSize}setResizeAreaWidth(e){let t=this._o;return e=Math.max(e,0),t.resizeAreaWidth!==e&&(t.resizeAreaWidth=e,this.tableWidthChanged(!0)),this}getResizeAreaWidth(){return this._o.resizeAreaWidth}setResizeAreaDoubleClickDuration(e){let t=this._o;return e=Math.max(e,0),t.resizeAreaDoubleClickDuration!==e&&(t.resizeAreaDoubleClickDuration=e,this.tableWidthChanged(!0)),this}getResizeAreaDoubleClickDuration(){return this._o.resizeAreaDoubleClickDuration}setMaxStickyColumnRelativeWidth(e){let t=this._o;return e=e||null,t.maxStickyColumnRelativeWidth!==e&&(t.maxStickyColumnRelativeWidth=e,this.tableWidthChanged(!0)),this}getMaxStickyColumnRelativeWidth(){return this._o.maxStickyColumnRelativeWidth}setColumnWidth(e,t){let r=this._p.columns.get(e);if(r){let e=Wi(t,r.ignoreMin?0:this._o.minColumnWidth),n=zi(r);r.width=e.width,r.widthMode=e.mode,r.unconvertedWidth=null,r.unconvertedWidthMode=null;let i=zi(r);n!==i&&this.tableWidthChanged(!0),this.emit("columnwidth",{name:r.name,width:i,oldWidth:n})}return this}autoFitColumn(e){const t=this._p,r=t.filteredRows||t.rows,n=t.columns.get(e);if(!n||r.length<1)return this;const i=Ti(this,n,r);return i>0&&this.setColumnWidth(e,i),this}getColumnWidth(e){let t=this._p.columns.get(e);return t?zi(t):null}getColumnConfig(e){let t=this._p.columns.get(e);if(t){var r,n,i;const e=t.width,o=t.widthMode;null!=t.unconvertedWidth&&(t.width=t.unconvertedWidth,t.widthMode=null!==(r=t.unconvertedWidthMode)&&void 0!==r?r:t.widthMode);const l=zi(t);return null!=t.unconvertedWidth&&(t.width=e,t.widthMode=o),{name:t.name,label:t.label,width:l,dataPath:null===(n=t.dataPath)||void 0===n?void 0:n.join("."),comparePath:null===(i=t.comparePath)||void 0===i?void 0:i.join("."),resizable:t.resizable,movable:t.movable,sortable:t.sortable,visible:t.visible,cellClasses:t.cellClasses,ignoreMin:t.ignoreMin,sticky:t.sticky,order:t.order,allowPreview:t.allowPreview}}return null}getColumnsConfig(){const e=this._p;let t={};for(let r=0;r<e.columns.length;r++)t[e.columns[r].name]=this.getColumnConfig(e.columns[r].name);return t}setMaxColumnSortCount(e){const t=this._p,r=this._o;if(r.sortableColumns!==e&&(r.sortableColumns=e,t.table)){const e=mn(t.headerRow,`>div.${r.tableClassName}-header-cell`);for(let n=0,i=e.length;n<i;n++)e[n].classList[r.sortableColumns>0&&t.visibleColumns[n].sortable?"add":"remove"]("sortable")}return this}getMaxColumnSortCount(){return this._o.sortableColumns}setSortableColumns(e){return this.setMaxColumnSortCount(e)}getSortableColumns(){return this.getMaxColumnSortCount()}setMovableColumns(e){let t=this._o;return e=void 0===e||!!e,t.movableColumns!==e&&(t.movableColumns=e),this}getMovableColumns(){return this._o.movableColumns}setResizableColumns(e){let t=this._o;return e=void 0===e||!!e,t.resizableColumns!==e&&(t.resizableColumns=e),this}getResizableColumns(){return this._o.resizableColumns}getConvertColumnWidthsToRelative(){return this._o.convertColumnWidthsToRelative}setConvertColumnWidthsToRelative(e,t=!0){let r=this._o;return e=!!e,r.convertColumnWidthsToRelative!==e&&(r.convertColumnWidthsToRelative=e,t&&this.tableWidthChanged(!0)),this}setOnComparatorRequired(e){let t=this._o;return t.onComparatorRequired!==e&&(t.onComparatorRequired=e),this}setCustomSortingProvider(e){let t=this._o;return t.customSortingProvider!==e&&(t.customSortingProvider=e),this}sort(e,t,r){const n=this._o,i=this._p;let o=i.columns.get(e),l=i.rows.sortColumn.map(e=>({column:e.column,descending:e.descending}));if(o){if(r){for(let e=0;e<l.length;e++)if(l[e].column===o.name){e<l.length-1?l.length=0:(t=l[l.length-1].descending,l.splice(l.length-1,1));break}(n.sortableColumns>0&&l.length>=n.sortableColumns||l.length>=i.visibleColumns.length)&&(l.length=0)}else l.length=0;t=void 0!==t&&t,l.push({column:o.name,descending:!!t})}else l.length=0;return this.setSortedColumns(l)}resort(){const e=this._p;let t=e.columns,r=e.rows.sortColumn;if(r.length){var n;for(let e=0;e<r.length;e++)t.get(r[e].column)||r.splice(e--,1);e.rows.sortColumn=r,r.length&&(e.rows.sort(),Ri(this)),null===(n=e.virtualListHelper)||void 0===n||n.invalidate();let i=[];for(let e=0;e<r.length;e++)i.push({column:r[e].column,descending:r[e].descending});this.emit("sort",{sorts:i,resort:!0})}return this}setSortedColumns(e,t={immediate:!0,render:!0}){var r;const n=this._o,i=this._p;let o=i.columns,l=e.filter(e=>o.get(e.column)).map(e=>{let t=o.get(e.column);return{column:t.name,comparePath:t.comparePath||t.dataPath,descending:!!e.descending}});n.sortableColumns>0&&l.length>n.sortableColumns&&(l.length=n.sortableColumns),Ci(this);for(let e=0;e<l.length;e++)wi(this,l[e].column,l[e].descending);n.adjustColumnWidthForSortArrow&&!i.tableSkeletonNeedsRendering&&this.tableWidthChanged(!0),i.rows.sortColumn=l,l.length&&t.immediate&&(i.rows.sort(),Ri(this),null!==(r=i.virtualListHelper)&&void 0!==r&&r.invalidate(),i.virtualListHelper&&t.render&&i.virtualListHelper.render());let s=[];for(let e=0;e<l.length;e++)s.push({column:l[e].column,descending:l[e].descending});return this.emit("sort",{sorts:s}),this}getSortedColumns(){const e=this._p;let t=[];for(let r=0;r<e.rows.sortColumn.length;r++){let n=e.rows.sortColumn[r];t.push({column:n.column,descending:n.descending})}return t}setCellFormatter(e){if(!e){const t=e=>"string"==typeof e?kn(e):e;t[Pn]=!0,e=t}return this._o.cellFormatter=e,this}setHeaderCellFormatter(e){return this._o.headerCellFormatter=e||function(e){return"string"==typeof e?kn(e):e},this}setFilter(e){return this._o.filter=e,this}filter(e){const t=this._p;let r=this._o.filter||Bn,n=!!t.filteredRows;return t.filteredRows&&(t.filteredRows=null),t.filterArgs=null==e?null:"object"!=typeof e||Array.isArray(e)?e:Object.assign({},e),null!==t.filterArgs?(t.filteredRows=t.rows.filteredCollection(r,t.filterArgs),(n||t.filteredRows)&&(this.clearAndRender(),this.emit("filter",e))):(t.filterArgs=null,t.filteredRows=null,this.clearAndRender(),this.emit("filterclear",{})),this}clearFilter(){const e=this._p;return e.filteredRows&&(e.filterArgs=null,e.filteredRows=null,this.clearAndRender(),this.emit("filterclear",{})),this}getHtmlForRowCell(e,t){const r=this._p;if(e<0||e>r.rows.length-1)return null;let n=r.columns.get(t);if(!n)return null;let i=r.rows[e];return Ii(this._o,i,n)}getHtmlForRowDataCell(e,t){let r=this._p.columns.get(t);return r?Ii(this._o,e,r):null}getRowYPos(e){var t,r;const n=this._p;if(e<0||e>n.rows.length-1)return null;let i=e;return n.filteredRows&&-1===(i=n.filteredRows.indexOf(n.rows[e]))?null:null!==(t=null===(r=n.virtualListHelper)||void 0===r?void 0:r.getItemPosition(i))&&void 0!==t?t:null}getDataForRow(e){const t=this._p;return e<0||e>t.rows.length-1?null:t.rows[e]}getRowCount(){const e=this._p;return e.rows?e.rows.length:0}getIndexForRow(e){return this._p.rows.indexOf(e)}getFilteredRowCount(){const e=this._p;return(e.filteredRows||e.rows).length}getIndexForFilteredRow(e){const t=this._p;return(t.filteredRows||t.rows).indexOf(e)}getDataForFilteredRow(e){const t=this._p;return e<0||e>(t.filteredRows||t.rows).length-1?null:(t.filteredRows||t.rows)[e]}getHeaderRowElement(){return this._p.headerRow}addRows(e,t,r,n){let i=this._p;"boolean"==typeof t&&(n=r,r=t,t=-1),"number"!=typeof t&&(t=-1),(t<0||t>i.rows.length)&&(t=i.rows.length),n=void 0===n||!!n;const o=(Array.isArray(e)?e:[e]).length;if(e){if(i.rows.add(e,t),i.filteredRows||r&&i.rows.sortColumn.length)xi(this),r&&i.rows.sortColumn.length&&this.resort(),i.tableSkeletonNeedsRendering=!0,n&&this.render();else if(n&&i.virtualListHelper){if(i.virtualListHelper.addItemsAt(o,t),this._o.virtualTable)mi(this),fi(this),this.render(),vi(this,!1);else if(i.tbody){for(let e=t+o,r=i.virtualListHelper.getCount();e<r;e++)i.virtualListHelper.refreshItemAt(e);this.render(),fi(this),vi(this,!0)}}else i.tableSkeletonNeedsRendering=!0;this.emit("addrows",{count:o,clear:!1})}return this}removeRows(e,t,r){let n=this._p;if("number"!=typeof t||t<=0)return this;if(e<0||e>n.rows.length-1)return this;if(n.rows.splice(e,t),r=void 0===r||!!r,n.filteredRows)xi(this),n.tableSkeletonNeedsRendering=!0,r&&this.render();else if(r&&n.virtualListHelper)if(n.virtualListHelper.removeItemsAt(t,e),this._o.virtualTable)mi(this),fi(this),this.render(),vi(this,!1);else{for(let t=e,r=n.virtualListHelper.getCount();t<r;t++)n.virtualListHelper.refreshItemAt(t);this.render(),fi(this),vi(this,!0)}else n.tableSkeletonNeedsRendering=!0;return this}removeRow(e,t){return this.removeRows(e,1,t)}refreshRow(e,t=!0){let r=this._p;if(e<0||e>r.rows.length-1)return this;let n=-1;return r.filteredRows&&-1===(n=r.filteredRows.indexOf(r.rows[e]))?this:(-1===n&&(n=e),r.virtualListHelper?(r.virtualListHelper.refreshItemAt(n),t&&r.virtualListHelper.render(),this):this)}getRowElement(e){var t;let r=this._p;if(e<0||e>r.rows.length-1)return null;let n=-1;return r.filteredRows&&-1===(n=r.filteredRows.indexOf(r.rows[e]))?null:(-1===n&&(n=e),(null===(t=r.virtualListHelper)||void 0===t?void 0:t.getItemElementAt(n))||null)}refreshAllVirtualRows(){var e;return null!==(e=this._p.virtualListHelper)&&void 0!==e&&e.invalidate().render(),this}setRows(e,t){let r=this._p;return r.rows.reset(e),xi(this),t&&r.rows.sortColumn.length&&this.resort(),this.clearAndRender().emit("addrows",{count:e.length,clear:!0}),this}tableWidthChanged(e,t){let r=this._o,n=this._p,i=Mi(this),o=i,l=0;if(!n.table)return this;t=void 0===t||t;let s=0;if(n.tbody||(t=!1),t&&(s=parseFloat(n.tbody.style.minWidth)||0),o!==n.lastDetectedWidth||e){var a;n.lastDetectedWidth=i;let e=0,h=[],m=0,f=0;for(let e=0;e<n.columns.length;e++)n.columns[e].actualWidthConsideringScrollbarWidth=null;for(let t=0;t<n.visibleColumns.length;t++){var u;let i=n.visibleColumns[t];if(null!=i.unconvertedWidth&&(i.width=i.unconvertedWidth,i.widthMode=null!==(u=i.unconvertedWidthMode)&&void 0!==u?u:i.widthMode,i.unconvertedWidth=null,i.unconvertedWidthMode=null),1===i.widthMode){let n=i.width;n+=i.arrowProposedWidth||0,!i.ignoreMin&&n<r.minColumnWidth&&(n=r.minColumnWidth),o-=n,e+=n,n!==i.actualWidth&&(i.actualWidth=n,h.push(t))}else if(0===i.widthMode){let l=Ti(this,i);i===n.visibleColumns[n.visibleColumns.length-1]&&(l+=n.scrollbarWidth),o-=l,e+=l,l!==i.actualWidth&&(i.actualWidth=l,r.convertColumnWidthsToRelative||h.push(t))}else 2===i.widthMode?(m+=i.width,l++):3===i.widthMode&&f++}if(r.convertColumnWidthsToRelative)for(let t=0;t<n.visibleColumns.length;t++){let r=n.visibleColumns[t];if(0===r.widthMode){const t=r.width,n=r.widthMode;null==r.unconvertedWidth&&(r.unconvertedWidth=t,r.unconvertedWidthMode=n),r.widthMode=2,o+=r.actualWidth,r.width=r.actualWidth/e,m+=r.width,l++}}if(l&&(m<1&&!f&&r.relativeWidthGrowsToFillWidth||m>1&&r.relativeWidthShrinksToFillWidth))for(let e=0;e<n.visibleColumns.length;e++){let t=n.visibleColumns[e];2===t.widthMode&&(null==t.unconvertedWidth&&(t.unconvertedWidth=t.width,t.unconvertedWidthMode=t.widthMode),t.width/=m)}let v=Math.max(0,o);0===v&&(v=n.table.clientWidth);let p=r.minColumnWidth/v;if(Number.isFinite(p)||(p=0),p>0){let e,t=0;for(let e=0;e<n.visibleColumns.length;e++){let r=n.visibleColumns[e];2===r.widthMode&&!r.ignoreMin&&r.width<p&&(t+=p-r.width,r.width=p)}for(let r=0;r<n.visibleColumns.length;r++){let i=n.visibleColumns[r];2===i.widthMode&&!i.ignoreMin&&i.width>p&&t>0&&(null==i.unconvertedWidth&&(i.unconvertedWidth=i.width,i.unconvertedWidthMode=i.widthMode),e=Math.min(t,i.width-p),i.width-=e,t-=e)}}if(!f&&r.autoFillTableWidth&&o>0){let e=0,t=o;for(let r=0;r<n.visibleColumns.length;r++){let i=n.visibleColumns[r];i.resizable||1!==i.widthMode||(e+=i.width),2===i.widthMode&&(t-=Math.round(v*i.width))}let r=(i-e)/(i-t-e)||NaN;for(let e=0;e<n.visibleColumns.length&&t>0;e++){let t=n.visibleColumns[e];if(t.resizable||1!==t.widthMode)if(2===t.widthMode)null==t.unconvertedWidth&&(t.unconvertedWidth=t.width,t.unconvertedWidthMode=t.widthMode),t.width*=r;else{let n=t.actualWidth*r;t.actualWidth!==n&&(t.actualWidth=n,-1===h.indexOf(e)&&h.push(e))}}}for(let e=0;e<n.visibleColumns.length;e++){let t=n.visibleColumns[e];if(2===t.widthMode){let r=Math.round(v*t.width);o-=r,l--,0===l&&1===o&&(r++,o--),-1===o&&(r--,o++),r!==t.actualWidth&&(t.actualWidth=r,h.push(e))}}if(f){let e=Math.max(0,o),t=f;for(let i=0;i<n.visibleColumns.length;i++){let o=n.visibleColumns[i];if(3===o.widthMode){let n=Math.max(0,Math.floor(e/t));!o.ignoreMin&&n<r.minColumnWidth&&(n=r.minColumnWidth),e-=n,t--,n!==o.actualWidth&&(o.actualWidth=n,h.push(i))}}}if(r.autoFillLastColumn&&n.visibleColumns.length){var d;let e=0;for(let t=0;t<n.visibleColumns.length;t++){var c;e+=null!==(c=n.visibleColumns[t].actualWidth)&&void 0!==c?c:0}const t=n.visibleColumns.length-1,r=n.visibleColumns[t],o=i-e;o>0&&(r.actualWidth=(null!==(d=r.actualWidth)&&void 0!==d?d:0)+o,-1===h.indexOf(t)&&h.push(t))}if(n.visibleColumns.length&&(n.visibleColumns[n.visibleColumns.length-1].actualWidthConsideringScrollbarWidth=n.visibleColumns[n.visibleColumns.length-1].actualWidth-(n.scrollbarWidth||0)),null!==(a=n.notifyRendererOfColumnsConfig)&&void 0!==a&&a.call(n),t){let e=Ai(this);s<e&&vi(this,!1);for(let e=0;e<h.length;e++)bi(this,h[e]);s>e&&vi(this,!1)}pi(this)}return this}tableHeightChanged(){let e=this._o;if(!this._p.table)return this;let t=sn(this.el,!0);return t!==e.height&&(e.height=t,ci(this),e.virtualTable&&this.clearAndRender()),this}hideCellPreview(){return Yn(this),this}abortCellPreview(){return this.hideCellPreview(),this}cancelColumnResize(){return Zn(this),this}getUrlForElementContent(e){let t,r=document.getElementById(e);if(r){let e=r.textContent;if("function"==typeof Blob)t=new Blob([e||""]);else{const r=window,n=r.BlobBuilder||r.WebKitBlobBuilder||r.MozBlobBuilder||r.MSBlobBuilder;if(!n)return null;const i=new n;i.append(e||""),t=i.getBlob()}return(window.URL||window.webkitURL).createObjectURL(t)}return null}isWorkerSupported(){return window.Worker instanceof Function}createWebWorker(e,t,r){if(this.isWorkerSupported()){let n=this._p,i=new Worker(e),o=e=>{e.data.append?this.addRows(e.data.rows,r):this.setRows(e.data.rows,r)};return i.addEventListener("message",o,!1),n.workerListeners||(n.workerListeners=[]),n.workerListeners.push({worker:i,listener:o}),(t||void 0===t)&&i.postMessage(null),i}return null}unbindWebWorker(e){let t=this._p;if(t.workerListeners)for(let r=0;r<t.workerListeners.length;r++)t.workerListeners[r].worker===e&&(e.removeEventListener("message",t.workerListeners[r].listener,!1),t.workerListeners.splice(r,1),r--);return this}}t(Di,"VERSION","2.0.38"),t(Di,"Width",Vn);class $i extends Di{constructor(t){super(t),this.$el=e(this.el).data("dgtable",this).on("remove",()=>this.destroy()),this.on("headerrowdestroy",()=>{var t;const r=null===(t=this._p)||void 0===t?void 0:t.headerRow;r&&e(r).find(`div.${this._o.tableClassName}-header-cell`).remove()})}destroy(){var t,r;return null!==(t=this._p)&&void 0!==t&&t.table&&e(this._p.table).empty(),null!==(r=this._p)&&void 0!==r&&r.tbody&&e(this._p.tbody).empty(),super.destroy()}}export{$i as default};
2
2
 
3
3
  //# sourceMappingURL=lib.es6.min.js.map