UNPKG

20.1 kBJavaScriptView Raw
1/**
2 * bootstrap-table - An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation)
3 *
4 * @version v1.21.3
5 * @homepage https://bootstrap-table.com
6 * @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
7 * @license MIT
8 */
9
10!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).jQuery)}(this,(function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r=function(t){return t&&t.Math==Math&&t},n=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof e&&e)||function(){return this}()||Function("return this")(),o={},i=function(t){try{return!!t()}catch(t){return!0}},a=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),s=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),c=s,u=Function.prototype.call,f=c?u.bind(u):function(){return u.apply(u,arguments)},p={},l={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,d=h&&!l.call({1:2},1);p.f=d?function(t){var e=h(this,t);return!!e&&e.enumerable}:l;var y,g,b=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},v=s,m=Function.prototype,w=m.call,S=v&&m.bind.bind(w,w),O=v?S:function(t){return function(){return w.apply(t,arguments)}},j=O,P=j({}.toString),x=j("".slice),T=function(t){return x(P(t),8,-1)},C=i,A=T,E=Object,z=O("".split),W=C((function(){return!E("z").propertyIsEnumerable(0)}))?function(t){return"String"==A(t)?z(t,""):E(t)}:E,N=function(t){return null==t},R=N,F=TypeError,I=function(t){if(R(t))throw F("Can't call method on "+t);return t},L=W,D=I,M=function(t){return L(D(t))},_="object"==typeof document&&document.all,k={all:_,IS_HTMLDDA:void 0===_&&void 0!==_},q=k.all,H=k.IS_HTMLDDA?function(t){return"function"==typeof t||t===q}:function(t){return"function"==typeof t},G=H,J=k.all,V=k.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:G(t)||t===J}:function(t){return"object"==typeof t?null!==t:G(t)},$=n,B=H,U=function(t){return B(t)?t:void 0},K=function(t,e){return arguments.length<2?U($[t]):$[t]&&$[t][e]},Q=O({}.isPrototypeOf),X=n,Y="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Z=X.process,tt=X.Deno,et=Z&&Z.versions||tt&&tt.version,rt=et&&et.v8;rt&&(g=(y=rt.split("."))[0]>0&&y[0]<4?1:+(y[0]+y[1])),!g&&Y&&(!(y=Y.match(/Edge\/(\d+)/))||y[1]>=74)&&(y=Y.match(/Chrome\/(\d+)/))&&(g=+y[1]);var nt=g,ot=nt,it=i,at=!!Object.getOwnPropertySymbols&&!it((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&ot&&ot<41})),st=at&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ct=K,ut=H,ft=Q,pt=Object,lt=st?function(t){return"symbol"==typeof t}:function(t){var e=ct("Symbol");return ut(e)&&ft(e.prototype,pt(t))},ht=String,dt=H,yt=function(t){try{return ht(t)}catch(t){return"Object"}},gt=TypeError,bt=function(t){if(dt(t))return t;throw gt(yt(t)+" is not a function")},vt=bt,mt=N,wt=f,St=H,Ot=V,jt=TypeError,Pt={},xt={get exports(){return Pt},set exports(t){Pt=t}},Tt=n,Ct=Object.defineProperty,At=function(t,e){try{Ct(Tt,t,{value:e,configurable:!0,writable:!0})}catch(r){Tt[t]=e}return e},Et=At,zt="__core-js_shared__",Wt=n[zt]||Et(zt,{}),Nt=Wt;(xt.exports=function(t,e){return Nt[t]||(Nt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.29.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Rt=I,Ft=Object,It=function(t){return Ft(Rt(t))},Lt=It,Dt=O({}.hasOwnProperty),Mt=Object.hasOwn||function(t,e){return Dt(Lt(t),e)},_t=O,kt=0,qt=Math.random(),Ht=_t(1..toString),Gt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Ht(++kt+qt,36)},Jt=Pt,Vt=Mt,$t=Gt,Bt=at,Ut=st,Kt=n.Symbol,Qt=Jt("wks"),Xt=Ut?Kt.for||Kt:Kt&&Kt.withoutSetter||$t,Yt=function(t){return Vt(Qt,t)||(Qt[t]=Bt&&Vt(Kt,t)?Kt[t]:Xt("Symbol."+t)),Qt[t]},Zt=f,te=V,ee=lt,re=function(t,e){var r=t[e];return mt(r)?void 0:vt(r)},ne=function(t,e){var r,n;if("string"===e&&St(r=t.toString)&&!Ot(n=wt(r,t)))return n;if(St(r=t.valueOf)&&!Ot(n=wt(r,t)))return n;if("string"!==e&&St(r=t.toString)&&!Ot(n=wt(r,t)))return n;throw jt("Can't convert object to primitive value")},oe=TypeError,ie=Yt("toPrimitive"),ae=function(t,e){if(!te(t)||ee(t))return t;var r,n=re(t,ie);if(n){if(void 0===e&&(e="default"),r=Zt(n,t,e),!te(r)||ee(r))return r;throw oe("Can't convert object to primitive value")}return void 0===e&&(e="number"),ne(t,e)},se=lt,ce=function(t){var e=ae(t,"string");return se(e)?e:e+""},ue=V,fe=n.document,pe=ue(fe)&&ue(fe.createElement),le=function(t){return pe?fe.createElement(t):{}},he=!a&&!i((function(){return 7!=Object.defineProperty(le("div"),"a",{get:function(){return 7}}).a})),de=a,ye=f,ge=p,be=b,ve=M,me=ce,we=Mt,Se=he,Oe=Object.getOwnPropertyDescriptor;o.f=de?Oe:function(t,e){if(t=ve(t),e=me(e),Se)try{return Oe(t,e)}catch(t){}if(we(t,e))return be(!ye(ge.f,t,e),t[e])};var je={},Pe=a&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),xe=V,Te=String,Ce=TypeError,Ae=function(t){if(xe(t))return t;throw Ce(Te(t)+" is not an object")},Ee=a,ze=he,We=Pe,Ne=Ae,Re=ce,Fe=TypeError,Ie=Object.defineProperty,Le=Object.getOwnPropertyDescriptor,De="enumerable",Me="configurable",_e="writable";je.f=Ee?We?function(t,e,r){if(Ne(t),e=Re(e),Ne(r),"function"==typeof t&&"prototype"===e&&"value"in r&&_e in r&&!r.writable){var n=Le(t,e);n&&n.writable&&(t[e]=r.value,r={configurable:Me in r?r.configurable:n.configurable,enumerable:De in r?r.enumerable:n.enumerable,writable:!1})}return Ie(t,e,r)}:Ie:function(t,e,r){if(Ne(t),e=Re(e),Ne(r),ze)try{return Ie(t,e,r)}catch(t){}if("get"in r||"set"in r)throw Fe("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var ke=je,qe=b,He=a?function(t,e,r){return ke.f(t,e,qe(1,r))}:function(t,e,r){return t[e]=r,t},Ge={},Je={get exports(){return Ge},set exports(t){Ge=t}},Ve=a,$e=Mt,Be=Function.prototype,Ue=Ve&&Object.getOwnPropertyDescriptor,Ke=$e(Be,"name"),Qe={EXISTS:Ke,PROPER:Ke&&"something"===function(){}.name,CONFIGURABLE:Ke&&(!Ve||Ve&&Ue(Be,"name").configurable)},Xe=H,Ye=Wt,Ze=O(Function.toString);Xe(Ye.inspectSource)||(Ye.inspectSource=function(t){return Ze(t)});var tr,er,rr,nr=Ye.inspectSource,or=H,ir=n.WeakMap,ar=or(ir)&&/native code/.test(String(ir)),sr=Gt,cr=Pt("keys"),ur={},fr=ar,pr=n,lr=V,hr=He,dr=Mt,yr=Wt,gr=function(t){return cr[t]||(cr[t]=sr(t))},br=ur,vr="Object already initialized",mr=pr.TypeError,wr=pr.WeakMap;if(fr||yr.state){var Sr=yr.state||(yr.state=new wr);Sr.get=Sr.get,Sr.has=Sr.has,Sr.set=Sr.set,tr=function(t,e){if(Sr.has(t))throw mr(vr);return e.facade=t,Sr.set(t,e),e},er=function(t){return Sr.get(t)||{}},rr=function(t){return Sr.has(t)}}else{var Or=gr("state");br[Or]=!0,tr=function(t,e){if(dr(t,Or))throw mr(vr);return e.facade=t,hr(t,Or,e),e},er=function(t){return dr(t,Or)?t[Or]:{}},rr=function(t){return dr(t,Or)}}var jr={set:tr,get:er,has:rr,enforce:function(t){return rr(t)?er(t):tr(t,{})},getterFor:function(t){return function(e){var r;if(!lr(e)||(r=er(e)).type!==t)throw mr("Incompatible receiver, "+t+" required");return r}}},Pr=O,xr=i,Tr=H,Cr=Mt,Ar=a,Er=Qe.CONFIGURABLE,zr=nr,Wr=jr.enforce,Nr=jr.get,Rr=String,Fr=Object.defineProperty,Ir=Pr("".slice),Lr=Pr("".replace),Dr=Pr([].join),Mr=Ar&&!xr((function(){return 8!==Fr((function(){}),"length",{value:8}).length})),_r=String(String).split("String"),kr=Je.exports=function(t,e,r){"Symbol("===Ir(Rr(e),0,7)&&(e="["+Lr(Rr(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!Cr(t,"name")||Er&&t.name!==e)&&(Ar?Fr(t,"name",{value:e,configurable:!0}):t.name=e),Mr&&r&&Cr(r,"arity")&&t.length!==r.arity&&Fr(t,"length",{value:r.arity});try{r&&Cr(r,"constructor")&&r.constructor?Ar&&Fr(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=Wr(t);return Cr(n,"source")||(n.source=Dr(_r,"string"==typeof e?e:"")),t};Function.prototype.toString=kr((function(){return Tr(this)&&Nr(this).source||zr(this)}),"toString");var qr=H,Hr=je,Gr=Ge,Jr=At,Vr=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(qr(r)&&Gr(r,i,n),n.global)o?t[e]=r:Jr(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=r:Hr.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},$r={},Br=Math.ceil,Ur=Math.floor,Kr=Math.trunc||function(t){var e=+t;return(e>0?Ur:Br)(e)},Qr=function(t){var e=+t;return e!=e||0===e?0:Kr(e)},Xr=Qr,Yr=Math.max,Zr=Math.min,tn=function(t,e){var r=Xr(t);return r<0?Yr(r+e,0):Zr(r,e)},en=Qr,rn=Math.min,nn=function(t){return t>0?rn(en(t),9007199254740991):0},on=function(t){return nn(t.length)},an=M,sn=tn,cn=on,un=function(t){return function(e,r,n){var o,i=an(e),a=cn(i),s=sn(n,a);if(t&&r!=r){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((t||s in i)&&i[s]===r)return t||s||0;return!t&&-1}},fn={includes:un(!0),indexOf:un(!1)},pn=Mt,ln=M,hn=fn.indexOf,dn=ur,yn=O([].push),gn=function(t,e){var r,n=ln(t),o=0,i=[];for(r in n)!pn(dn,r)&&pn(n,r)&&yn(i,r);for(;e.length>o;)pn(n,r=e[o++])&&(~hn(i,r)||yn(i,r));return i},bn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],vn=gn,mn=bn.concat("length","prototype");$r.f=Object.getOwnPropertyNames||function(t){return vn(t,mn)};var wn={};wn.f=Object.getOwnPropertySymbols;var Sn=K,On=$r,jn=wn,Pn=Ae,xn=O([].concat),Tn=Sn("Reflect","ownKeys")||function(t){var e=On.f(Pn(t)),r=jn.f;return r?xn(e,r(t)):e},Cn=Mt,An=Tn,En=o,zn=je,Wn=i,Nn=H,Rn=/#|\.prototype\./,Fn=function(t,e){var r=Ln[In(t)];return r==Mn||r!=Dn&&(Nn(e)?Wn(e):!!e)},In=Fn.normalize=function(t){return String(t).replace(Rn,".").toLowerCase()},Ln=Fn.data={},Dn=Fn.NATIVE="N",Mn=Fn.POLYFILL="P",_n=Fn,kn=n,qn=o.f,Hn=He,Gn=Vr,Jn=At,Vn=function(t,e,r){for(var n=An(e),o=zn.f,i=En.f,a=0;a<n.length;a++){var s=n[a];Cn(t,s)||r&&Cn(r,s)||o(t,s,i(e,s))}},$n=_n,Bn=function(t,e){var r,n,o,i,a,s=t.target,c=t.global,u=t.stat;if(r=c?kn:u?kn[s]||Jn(s,{}):(kn[s]||{}).prototype)for(n in e){if(i=e[n],o=t.dontCallGetSet?(a=qn(r,n))&&a.value:r[n],!$n(c?n:s+(u?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Vn(i,o)}(t.sham||o&&o.sham)&&Hn(i,"sham",!0),Gn(r,n,i,t)}},Un=gn,Kn=bn,Qn=Object.keys||function(t){return Un(t,Kn)},Xn=a,Yn=O,Zn=f,to=i,eo=Qn,ro=wn,no=p,oo=It,io=W,ao=Object.assign,so=Object.defineProperty,co=Yn([].concat),uo=!ao||to((function(){if(Xn&&1!==ao({b:1},ao(so({},"a",{enumerable:!0,get:function(){so(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach((function(t){e[t]=t})),7!=ao({},t)[r]||eo(ao({},e)).join("")!=n}))?function(t,e){for(var r=oo(t),n=arguments.length,o=1,i=ro.f,a=no.f;n>o;)for(var s,c=io(arguments[o++]),u=i?co(eo(c),i(c)):eo(c),f=u.length,p=0;f>p;)s=u[p++],Xn&&!Zn(a,c,s)||(r[s]=c[s]);return r}:ao,fo=uo;Bn({target:"Object",stat:!0,arity:2,forced:Object.assign!==fo},{assign:fo});var po=T,lo=Array.isArray||function(t){return"Array"==po(t)},ho={};ho[Yt("toStringTag")]="z";var yo="[object z]"===String(ho),go=yo,bo=H,vo=T,mo=Yt("toStringTag"),wo=Object,So="Arguments"==vo(function(){return arguments}()),Oo=go?vo:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=wo(t),mo))?r:So?vo(e):"Object"==(n=vo(e))&&bo(e.callee)?"Arguments":n},jo=O,Po=i,xo=H,To=Oo,Co=nr,Ao=function(){},Eo=[],zo=K("Reflect","construct"),Wo=/^\s*(?:class|function)\b/,No=jo(Wo.exec),Ro=!Wo.exec(Ao),Fo=function(t){if(!xo(t))return!1;try{return zo(Ao,Eo,t),!0}catch(t){return!1}},Io=function(t){if(!xo(t))return!1;switch(To(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Ro||!!No(Wo,Co(t))}catch(t){return!0}};Io.sham=!0;var Lo=!zo||Po((function(){var t;return Fo(Fo.call)||!Fo(Object)||!Fo((function(){t=!0}))||t}))?Io:Fo,Do=ce,Mo=je,_o=b,ko=i,qo=nt,Ho=Yt("species"),Go=function(t){return qo>=51||!ko((function(){var e=[];return(e.constructor={})[Ho]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Jo=O([].slice),Vo=Bn,$o=lo,Bo=Lo,Uo=V,Ko=tn,Qo=on,Xo=M,Yo=function(t,e,r){var n=Do(e);n in t?Mo.f(t,n,_o(0,r)):t[n]=r},Zo=Yt,ti=Jo,ei=Go("slice"),ri=Zo("species"),ni=Array,oi=Math.max;Vo({target:"Array",proto:!0,forced:!ei},{slice:function(t,e){var r,n,o,i=Xo(this),a=Qo(i),s=Ko(t,a),c=Ko(void 0===e?a:e,a);if($o(i)&&(r=i.constructor,(Bo(r)&&(r===ni||$o(r.prototype))||Uo(r)&&null===(r=r[ri]))&&(r=void 0),r===ni||void 0===r))return ti(i,s,c);for(n=new(void 0===r?ni:r)(oi(c-s,0)),o=0;s<c;s++,o++)s in i&&Yo(n,o,i[s]);return n.length=o,n}});var ii=Oo,ai=String,si=function(t){if("Symbol"===ii(t))throw TypeError("Cannot convert a Symbol value to a string");return ai(t)},ci="\t\n\v\f\r                 \u2028\u2029\ufeff",ui=I,fi=si,pi=ci,li=O("".replace),hi=RegExp("^["+pi+"]+"),di=RegExp("(^|[^"+pi+"])["+pi+"]+$"),yi=function(t){return function(e){var r=fi(ui(e));return 1&t&&(r=li(r,hi,"")),2&t&&(r=li(r,di,"$1")),r}},gi={start:yi(1),end:yi(2),trim:yi(3)},bi=n,vi=i,mi=O,wi=si,Si=gi.trim,Oi=ci,ji=bi.parseInt,Pi=bi.Symbol,xi=Pi&&Pi.iterator,Ti=/^[+-]?0x/i,Ci=mi(Ti.exec),Ai=8!==ji(Oi+"08")||22!==ji(Oi+"0x16")||xi&&!vi((function(){ji(Object(xi))}))?function(t,e){var r=Si(wi(t));return ji(r,e>>>0||(Ci(Ti,r)?16:10))}:ji;Bn({global:!0,forced:parseInt!=Ai},{parseInt:Ai});var Ei=T,zi=O,Wi=function(t){if("Function"===Ei(t))return zi(t)},Ni=i,Ri=Bn,Fi=fn.indexOf,Ii=function(t,e){var r=[][t];return!!r&&Ni((function(){r.call(null,e||function(){return 1},1)}))},Li=Wi([].indexOf),Di=!!Li&&1/Li([1],1,-0)<0;Ri({target:"Array",proto:!0,forced:Di||!Ii("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return Di?Li(this,t,e)||0:Fi(this,t,e)}});var Mi=bt,_i=s,ki=Wi(Wi.bind),qi=lo,Hi=Lo,Gi=V,Ji=Yt("species"),Vi=Array,$i=function(t){var e;return qi(t)&&(e=t.constructor,(Hi(e)&&(e===Vi||qi(e.prototype))||Gi(e)&&null===(e=e[Ji]))&&(e=void 0)),void 0===e?Vi:e},Bi=function(t,e){return Mi(t),void 0===e?t:_i?ki(t,e):function(){return t.apply(e,arguments)}},Ui=W,Ki=It,Qi=on,Xi=function(t,e){return new($i(t))(0===e?0:e)},Yi=O([].push),Zi=function(t){var e=1==t,r=2==t,n=3==t,o=4==t,i=6==t,a=7==t,s=5==t||i;return function(c,u,f,p){for(var l,h,d=Ki(c),y=Ui(d),g=Bi(u,f),b=Qi(y),v=0,m=p||Xi,w=e?m(c,b):r||a?m(c,0):void 0;b>v;v++)if((s||v in y)&&(h=g(l=y[v],v,d),t))if(e)w[v]=h;else if(h)switch(t){case 3:return!0;case 5:return l;case 6:return v;case 2:Yi(w,l)}else switch(t){case 4:return!1;case 7:Yi(w,l)}return i?-1:n||o?o:w}},ta={forEach:Zi(0),map:Zi(1),filter:Zi(2),some:Zi(3),every:Zi(4),find:Zi(5),findIndex:Zi(6),filterReject:Zi(7)}.filter;Bn({target:"Array",proto:!0,forced:!Go("filter")},{filter:function(t){return ta(this,t,arguments.length>1?arguments[1]:void 0)}});var ea=Oo,ra=yo?{}.toString:function(){return"[object "+ea(this)+"]"};yo||Vr(Object.prototype,"toString",ra,{unsafe:!0});var na=t.fn.bootstrapTable.utils;Object.assign(t.fn.bootstrapTable.defaults,{usePipeline:!1,pipelineSize:1e3,onCachedDataHit:function(t){return!1},onCachedDataReset:function(t){return!1}}),Object.assign(t.fn.bootstrapTable.events,{"cached-data-hit.bs.table":"onCachedDataHit","cached-data-reset.bs.table":"onCachedDataReset"});var oa=t.fn.bootstrapTable.Constructor,ia=oa.prototype.init,aa=oa.prototype.onSearch,sa=oa.prototype.onSort,ca=oa.prototype.onPageListChange;oa.prototype.init=function(){this.initPipeline();for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];ia.apply(this,Array.prototype.slice.apply(e))},oa.prototype.initPipeline=function(){this.cacheRequestJSON={},this.cacheWindows=[],this.currWindow=0,this.resetCache=!0},oa.prototype.onSearch=function(){this.options.usePipeline&&(this.resetCache=!0),aa.apply(this,Array.prototype.slice.apply(arguments))},oa.prototype.onSort=function(){this.options.usePipeline&&(this.resetCache=!0),sa.apply(this,Array.prototype.slice.apply(arguments))},oa.prototype.onPageListChange=function(e){var r=t(e.currentTarget),n=parseInt(r.text(),10);this.options.pipelineSize=this.calculatePipelineSize(this.options.pipelineSize,n),this.resetCache=!0,ca.apply(this,Array.prototype.slice.apply(arguments))},oa.prototype.calculatePipelineSize=function(t,e){return 0===e?0:Math.ceil(t/e)*e},oa.prototype.setCacheWindows=function(){this.cacheWindows=[];for(var t=this.options.totalRows/this.options.pipelineSize,e=0;e<=t;e++){var r=e*this.options.pipelineSize;this.cacheWindows[e]={lower:r,upper:r+this.options.pipelineSize-1}}},oa.prototype.setCurrWindow=function(t){this.currWindow=0;for(var e=0;e<this.cacheWindows.length;e++)if(this.cacheWindows[e].lower<=t&&t<=this.cacheWindows[e].upper){this.currWindow=e;break}},oa.prototype.drawFromCache=function(t,e){var r=na.extend(!0,{},this.cacheRequestJSON),n=t-this.cacheWindows[this.currWindow].lower,o=n+e;return r.rows=r.rows.slice(n,o),r},oa.prototype.initServer=function(e,r,n){var o,i={},a=this.header.fields.indexOf(this.options.sortName),s={searchText:this.searchText,sortName:this.options.sortName,sortOrder:this.options.sortOrder};if(this.header.sortNames[a]&&(s.sortName=this.header.sortNames[a]),this.options.pagination&&"server"===this.options.sidePagination&&(s.pageSize=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize,s.pageNumber=this.options.pageNumber),n||this.options.url||this.options.ajax){var c=!0;if("limit"===this.options.queryParamsType&&(s={searchText:s.searchText,sortName:s.sortName,sortOrder:s.sortOrder},this.options.pagination&&"server"===this.options.sidePagination))if(s.limit=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize,s.offset=(this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize)*(this.options.pageNumber-1),this.options.usePipeline)if(this.cacheWindows.length){var u=this.cacheWindows[this.currWindow];this.resetCache||s.offset<u.lower||s.offset>u.upper?(c=!0,this.setCurrWindow(s.offset),s.drawOffset=s.offset,s.offset=this.cacheWindows[this.currWindow].lower):c=!1}else c=!0,s.drawOffset=s.offset;else 0===s.limit&&delete s.limit;if(this.resetCache&&(c=!0,this.resetCache=!1),this.options.usePipeline&&c&&(s.drawLimit=s.limit,s.limit=this.options.pipelineSize),!c){var f=this.drawFromCache(s.offset,s.limit);return this.load(f),this.trigger("load-success",f),void this.trigger("cached-data-hit",f)}if(t.isEmptyObject(this.filterColumnsPartial)||(s.filter=JSON.stringify(this.filterColumnsPartial,null)),i=na.calculateObjectValue(this.options,this.options.queryParams,[s],i),na.extend(i,r||{}),!1!==i){e||this.$tableLoading.show();var p=this;o=na.extend({},na.calculateObjectValue(null,this.options.ajaxOptions),{type:this.options.method,url:n||this.options.url,data:"application/json"===this.options.contentType&&"post"===this.options.method?JSON.stringify(i):i,cache:this.options.cache,contentType:this.options.contentType,dataType:this.options.dataType,success:function(t){t=na.calculateObjectValue(p.options,p.options.responseHandler,[t],t),p.options.usePipeline&&(p.cacheRequestJSON=na.extend(!0,{},t),p.options.totalRows=t[p.options.totalField],p.setCacheWindows(),p.setCurrWindow(s.drawOffset),t=p.drawFromCache(s.drawOffset,s.drawLimit),p.trigger("cached-data-reset",t)),p.load(t),p.trigger("load-success",t),e||p.hideLoading()},error:function(t){var r=[];"server"===p.options.sidePagination&&((r={})[p.options.totalField]=0,r[p.options.dataField]=[]),p.load(r),p.trigger("load-error",t.status,t),e||p.hideLoading()}}),this.options.ajax?na.calculateObjectValue(this,this.options.ajax,[o],null):(this._xhr&&4!==this._xhr.readyState&&this._xhr.abort(),this._xhr=t.ajax(o))}}}}));