UNPKG

25.9 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.15.5
5 * @homepage https://bootstrap-table.com
6 * @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
7 * @license MIT
8 */
9
10!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):t((e=e||self).jQuery)}(this,(function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e,t){return e(t={exports:{}},t.exports),t.exports}var n,r,i,a="object",c=function(e){return e&&e.Math==Math&&e},s=c(typeof globalThis==a&&globalThis)||c(typeof window==a&&window)||c(typeof self==a&&self)||c(typeof t==a&&t)||Function("return this")(),l=function(e){try{return!!e()}catch(e){return!0}},u=!l((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})),f={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,h={f:p&&!f.call({1:2},1)?function(e){var t=p(this,e);return!!t&&t.enumerable}:f},d=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},g={}.toString,v=function(e){return g.call(e).slice(8,-1)},b="".split,y=l((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==v(e)?b.call(e,""):Object(e)}:Object,k=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},m=function(e){return y(k(e))},C=function(e){return"object"==typeof e?null!==e:"function"==typeof e},x=function(e,t){if(!C(e))return e;var o,n;if(t&&"function"==typeof(o=e.toString)&&!C(n=o.call(e)))return n;if("function"==typeof(o=e.valueOf)&&!C(n=o.call(e)))return n;if(!t&&"function"==typeof(o=e.toString)&&!C(n=o.call(e)))return n;throw TypeError("Can't convert object to primitive value")},S={}.hasOwnProperty,w=function(e,t){return S.call(e,t)},I=s.document,O=C(I)&&C(I.createElement),T=function(e){return O?I.createElement(e):{}},E=!u&&!l((function(){return 7!=Object.defineProperty(T("div"),"a",{get:function(){return 7}}).a})),j=Object.getOwnPropertyDescriptor,N={f:u?j:function(e,t){if(e=m(e),t=x(t,!0),E)try{return j(e,t)}catch(e){}if(w(e,t))return d(!h.f.call(e,t),e[t])}},P=function(e){if(!C(e))throw TypeError(String(e)+" is not an object");return e},A=Object.defineProperty,R={f:u?A:function(e,t,o){if(P(e),t=x(t,!0),P(o),E)try{return A(e,t,o)}catch(e){}if("get"in o||"set"in o)throw TypeError("Accessors not supported");return"value"in o&&(e[t]=o.value),e}},_=u?function(e,t,o){return R.f(e,t,d(1,o))}:function(e,t,o){return e[t]=o,e},L=function(e,t){try{_(s,e,t)}catch(o){s[e]=t}return t},M=o((function(e){var t=s["__core-js_shared__"]||L("__core-js_shared__",{});(e.exports=function(e,o){return t[e]||(t[e]=void 0!==o?o:{})})("versions",[]).push({version:"3.1.3",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})})),$=M("native-function-to-string",Function.toString),B=s.WeakMap,D="function"==typeof B&&/native code/.test($.call(B)),F=0,J=Math.random(),z=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++F+J).toString(36)},V=M("keys"),q=function(e){return V[e]||(V[e]=z(e))},G={},H=s.WeakMap;if(D){var U=new H,W=U.get,K=U.has,Q=U.set;n=function(e,t){return Q.call(U,e,t),t},r=function(e){return W.call(U,e)||{}},i=function(e){return K.call(U,e)}}else{var Y=q("state");G[Y]=!0,n=function(e,t){return _(e,Y,t),t},r=function(e){return w(e,Y)?e[Y]:{}},i=function(e){return w(e,Y)}}var Z={set:n,get:r,has:i,enforce:function(e){return i(e)?r(e):n(e,{})},getterFor:function(e){return function(t){var o;if(!C(t)||(o=r(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return o}}},X=o((function(e){var t=Z.get,o=Z.enforce,n=String($).split("toString");M("inspectSource",(function(e){return $.call(e)})),(e.exports=function(e,t,r,i){var a=!!i&&!!i.unsafe,c=!!i&&!!i.enumerable,l=!!i&&!!i.noTargetGet;"function"==typeof r&&("string"!=typeof t||w(r,"name")||_(r,"name",t),o(r).source=n.join("string"==typeof t?t:"")),e!==s?(a?!l&&e[t]&&(c=!0):delete e[t],c?e[t]=r:_(e,t,r)):c?e[t]=r:L(t,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||$.call(this)}))})),ee=s,te=function(e){return"function"==typeof e?e:void 0},oe=function(e,t){return arguments.length<2?te(ee[e])||te(s[e]):ee[e]&&ee[e][t]||s[e]&&s[e][t]},ne=Math.ceil,re=Math.floor,ie=function(e){return isNaN(e=+e)?0:(e>0?re:ne)(e)},ae=Math.min,ce=function(e){return e>0?ae(ie(e),9007199254740991):0},se=Math.max,le=Math.min,ue=function(e){return function(t,o,n){var r,i=m(t),a=ce(i.length),c=function(e,t){var o=ie(e);return o<0?se(o+t,0):le(o,t)}(n,a);if(e&&o!=o){for(;a>c;)if((r=i[c++])!=r)return!0}else for(;a>c;c++)if((e||c in i)&&i[c]===o)return e||c||0;return!e&&-1}},fe={includes:ue(!0),indexOf:ue(!1)}.indexOf,pe=function(e,t){var o,n=m(e),r=0,i=[];for(o in n)!w(G,o)&&w(n,o)&&i.push(o);for(;t.length>r;)w(n,o=t[r++])&&(~fe(i,o)||i.push(o));return i},he=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],de=he.concat("length","prototype"),ge={f:Object.getOwnPropertyNames||function(e){return pe(e,de)}},ve={f:Object.getOwnPropertySymbols},be=oe("Reflect","ownKeys")||function(e){var t=ge.f(P(e)),o=ve.f;return o?t.concat(o(e)):t},ye=function(e,t){for(var o=be(t),n=R.f,r=N.f,i=0;i<o.length;i++){var a=o[i];w(e,a)||n(e,a,r(t,a))}},ke=/#|\.prototype\./,me=function(e,t){var o=xe[Ce(e)];return o==we||o!=Se&&("function"==typeof t?l(t):!!t)},Ce=me.normalize=function(e){return String(e).replace(ke,".").toLowerCase()},xe=me.data={},Se=me.NATIVE="N",we=me.POLYFILL="P",Ie=me,Oe=N.f,Te=function(e,t){var o,n,r,i,a,c=e.target,l=e.global,u=e.stat;if(o=l?s:u?s[c]||L(c,{}):(s[c]||{}).prototype)for(n in t){if(i=t[n],r=e.noTargetGet?(a=Oe(o,n))&&a.value:o[n],!Ie(l?n:c+(u?".":"#")+n,e.forced)&&void 0!==r){if(typeof i==typeof r)continue;ye(i,r)}(e.sham||r&&r.sham)&&_(i,"sham",!0),X(o,n,i,e)}},Ee=Array.isArray||function(e){return"Array"==v(e)},je=function(e){return Object(k(e))},Ne=function(e,t,o){var n=x(t);n in e?R.f(e,n,d(0,o)):e[n]=o},Pe=!!Object.getOwnPropertySymbols&&!l((function(){return!String(Symbol())})),Ae=s.Symbol,Re=M("wks"),_e=function(e){return Re[e]||(Re[e]=Pe&&Ae[e]||(Pe?Ae:z)("Symbol."+e))},Le=_e("species"),Me=function(e,t){var o;return Ee(e)&&("function"!=typeof(o=e.constructor)||o!==Array&&!Ee(o.prototype)?C(o)&&null===(o=o[Le])&&(o=void 0):o=void 0),new(void 0===o?Array:o)(0===t?0:t)},$e=_e("species"),Be=function(e){return!l((function(){var t=[];return(t.constructor={})[$e]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},De=_e("isConcatSpreadable"),Fe=!l((function(){var e=[];return e[De]=!1,e.concat()[0]!==e})),Je=Be("concat"),ze=function(e){if(!C(e))return!1;var t=e[De];return void 0!==t?!!t:Ee(e)};Te({target:"Array",proto:!0,forced:!Fe||!Je},{concat:function(e){var t,o,n,r,i,a=je(this),c=Me(a,0),s=0;for(t=-1,n=arguments.length;t<n;t++)if(i=-1===t?a:arguments[t],ze(i)){if(s+(r=ce(i.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(o=0;o<r;o++,s++)o in i&&Ne(c,s,i[o])}else{if(s>=9007199254740991)throw TypeError("Maximum allowed index exceeded");Ne(c,s++,i)}return c.length=s,c}});var Ve=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},qe=[].push,Ge=function(e){var t=1==e,o=2==e,n=3==e,r=4==e,i=6==e,a=5==e||i;return function(c,s,l,u){for(var f,p,h=je(c),d=y(h),g=function(e,t,o){if(Ve(e),void 0===t)return e;switch(o){case 0:return function(){return e.call(t)};case 1:return function(o){return e.call(t,o)};case 2:return function(o,n){return e.call(t,o,n)};case 3:return function(o,n,r){return e.call(t,o,n,r)}}return function(){return e.apply(t,arguments)}}(s,l,3),v=ce(d.length),b=0,k=u||Me,m=t?k(c,v):o?k(c,0):void 0;v>b;b++)if((a||b in d)&&(p=g(f=d[b],b,h),e))if(t)m[b]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return b;case 2:qe.call(m,f)}else if(r)return!1;return i?-1:n||r?r:m}},He={forEach:Ge(0),map:Ge(1),filter:Ge(2),some:Ge(3),every:Ge(4),find:Ge(5),findIndex:Ge(6)},Ue=He.filter;Te({target:"Array",proto:!0,forced:!Be("filter")},{filter:function(e){return Ue(this,e,arguments.length>1?arguments[1]:void 0)}});var We=Object.keys||function(e){return pe(e,he)},Ke=u?Object.defineProperties:function(e,t){P(e);for(var o,n=We(t),r=n.length,i=0;r>i;)R.f(e,o=n[i++],t[o]);return e},Qe=oe("document","documentElement"),Ye=q("IE_PROTO"),Ze=function(){},Xe=function(){var e,t=T("iframe"),o=he.length;for(t.style.display="none",Qe.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),Xe=e.F;o--;)delete Xe.prototype[he[o]];return Xe()},et=Object.create||function(e,t){var o;return null!==e?(Ze.prototype=P(e),o=new Ze,Ze.prototype=null,o[Ye]=e):o=Xe(),void 0===t?o:Ke(o,t)};G[Ye]=!0;var tt=_e("unscopables"),ot=Array.prototype;null==ot[tt]&&_(ot,tt,et(null));var nt,rt=He.find,it=!0;"find"in[]&&Array(1).find((function(){it=!1})),Te({target:"Array",proto:!0,forced:it},{find:function(e){return rt(this,e,arguments.length>1?arguments[1]:void 0)}}),nt="find",ot[tt][nt]=!0;var at,ct,st=[].join,lt=y!=Object,ut=(at=",",!(ct=[]["join"])||!l((function(){ct.call(null,at||function(){throw 1},1)})));Te({target:"Array",proto:!0,forced:lt||ut},{join:function(e){return st.call(m(this),void 0===e?",":e)}});var ft,pt,ht=function(){var e=P(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},dt=RegExp.prototype.exec,gt=String.prototype.replace,vt=dt,bt=(ft=/a/,pt=/b*/g,dt.call(ft,"a"),dt.call(pt,"a"),0!==ft.lastIndex||0!==pt.lastIndex),yt=void 0!==/()??/.exec("")[1];(bt||yt)&&(vt=function(e){var t,o,n,r,i=this;return yt&&(o=new RegExp("^"+i.source+"$(?!\\s)",ht.call(i))),bt&&(t=i.lastIndex),n=dt.call(i,e),bt&&n&&(i.lastIndex=i.global?n.index+n[0].length:t),yt&&n&&n.length>1&&gt.call(n[0],o,(function(){for(r=1;r<arguments.length-2;r++)void 0===arguments[r]&&(n[r]=void 0)})),n});var kt=vt,mt=_e("species"),Ct=!l((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),xt=!l((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var o="ab".split(e);return 2!==o.length||"a"!==o[0]||"b"!==o[1]})),St=function(e,t,o,n){var r=_e(e),i=!l((function(){var t={};return t[r]=function(){return 7},7!=""[e](t)})),a=i&&!l((function(){var t=!1,o=/a/;return o.exec=function(){return t=!0,null},"split"===e&&(o.constructor={},o.constructor[mt]=function(){return o}),o[r](""),!t}));if(!i||!a||"replace"===e&&!Ct||"split"===e&&!xt){var c=/./[r],s=o(r,""[e],(function(e,t,o,n,r){return t.exec===kt?i&&!r?{done:!0,value:c.call(t,o,n)}:{done:!0,value:e.call(o,t,n)}:{done:!1}})),u=s[0],f=s[1];X(String.prototype,e,u),X(RegExp.prototype,r,2==t?function(e,t){return f.call(e,this,t)}:function(e){return f.call(e,this)}),n&&_(RegExp.prototype[r],"sham",!0)}},wt=function(e){return function(t,o){var n,r,i=String(k(t)),a=ie(o),c=i.length;return a<0||a>=c?e?"":void 0:(n=i.charCodeAt(a))<55296||n>56319||a+1===c||(r=i.charCodeAt(a+1))<56320||r>57343?e?i.charAt(a):n:e?i.slice(a,a+2):r-56320+(n-55296<<10)+65536}},It={codeAt:wt(!1),charAt:wt(!0)}.charAt,Ot=function(e,t,o){return t+(o?It(e,t).length:1)},Tt=function(e,t){var o=e.exec;if("function"==typeof o){var n=o.call(e,t);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==v(e))throw TypeError("RegExp#exec called on incompatible receiver");return kt.call(e,t)},Et=Math.max,jt=Math.min,Nt=Math.floor,Pt=/\$([$&'`]|\d\d?|<[^>]*>)/g,At=/\$([$&'`]|\d\d?)/g;St("replace",2,(function(e,t,o){return[function(o,n){var r=k(this),i=null==o?void 0:o[e];return void 0!==i?i.call(o,r,n):t.call(String(r),o,n)},function(e,r){var i=o(t,e,this,r);if(i.done)return i.value;var a=P(e),c=String(this),s="function"==typeof r;s||(r=String(r));var l=a.global;if(l){var u=a.unicode;a.lastIndex=0}for(var f=[];;){var p=Tt(a,c);if(null===p)break;if(f.push(p),!l)break;""===String(p[0])&&(a.lastIndex=Ot(c,ce(a.lastIndex),u))}for(var h,d="",g=0,v=0;v<f.length;v++){p=f[v];for(var b=String(p[0]),y=Et(jt(ie(p.index),c.length),0),k=[],m=1;m<p.length;m++)k.push(void 0===(h=p[m])?h:String(h));var C=p.groups;if(s){var x=[b].concat(k,y,c);void 0!==C&&x.push(C);var S=String(r.apply(void 0,x))}else S=n(b,c,y,k,C,r);y>=g&&(d+=c.slice(g,y)+S,g=y+b.length)}return d+c.slice(g)}];function n(e,o,n,r,i,a){var c=n+e.length,s=r.length,l=At;return void 0!==i&&(i=je(i),l=Pt),t.call(a,l,(function(t,a){var l;switch(a.charAt(0)){case"$":return"$";case"&":return e;case"`":return o.slice(0,n);case"'":return o.slice(c);case"<":l=i[a.slice(1,-1)];break;default:var u=+a;if(0===u)return t;if(u>s){var f=Nt(u/10);return 0===f?t:f<=s?void 0===r[f-1]?a.charAt(1):r[f-1]+a.charAt(1):t}l=r[u-1]}return void 0===l?"":l}))}}));var Rt=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};St("search",1,(function(e,t,o){return[function(t){var o=k(this),n=null==t?void 0:t[e];return void 0!==n?n.call(t,o):new RegExp(t)[e](String(o))},function(e){var n=o(t,e,this);if(n.done)return n.value;var r=P(e),i=String(this),a=r.lastIndex;Rt(a,0)||(r.lastIndex=0);var c=Tt(r,i);return Rt(r.lastIndex,a)||(r.lastIndex=a),null===c?-1:c.index}]}));var _t=_e("match"),Lt=_e("species"),Mt=[].push,$t=Math.min,Bt=!l((function(){return!RegExp(4294967295,"y")}));function Dt(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ft(e){return(Ft=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Jt(e,t){return(Jt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zt(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Vt(e,t,o){return(Vt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,o){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ft(e)););return e}(e,t);if(n){var r=Object.getOwnPropertyDescriptor(n,t);return r.get?r.get.call(o):r.value}})(e,t,o||e)}St("split",2,(function(e,t,o){var n;return n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,o){var n,r,i=String(k(this)),a=void 0===o?4294967295:o>>>0;if(0===a)return[];if(void 0===e)return[i];if(!C(n=e)||(void 0!==(r=n[_t])?!r:"RegExp"!=v(n)))return t.call(i,e,a);for(var c,s,l,u=[],f=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),p=0,h=new RegExp(e.source,f+"g");(c=kt.call(h,i))&&!((s=h.lastIndex)>p&&(u.push(i.slice(p,c.index)),c.length>1&&c.index<i.length&&Mt.apply(u,c.slice(1)),l=c[0].length,p=s,u.length>=a));)h.lastIndex===c.index&&h.lastIndex++;return p===i.length?!l&&h.test("")||u.push(""):u.push(i.slice(p)),u.length>a?u.slice(0,a):u}:"0".split(void 0,0).length?function(e,o){return void 0===e&&0===o?[]:t.call(this,e,o)}:t,[function(t,o){var r=k(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,r,o):n.call(String(r),t,o)},function(e,r){var i=o(n,e,this,r,n!==t);if(i.done)return i.value;var a=P(e),c=String(this),s=function(e,t){var o,n=P(e).constructor;return void 0===n||null==(o=P(n)[Lt])?t:Ve(o)}(a,RegExp),l=a.unicode,u=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(Bt?"y":"g"),f=new s(Bt?a:"^(?:"+a.source+")",u),p=void 0===r?4294967295:r>>>0;if(0===p)return[];if(0===c.length)return null===Tt(f,c)?[c]:[];for(var h=0,d=0,g=[];d<c.length;){f.lastIndex=Bt?d:0;var v,b=Tt(f,Bt?c:c.slice(d));if(null===b||(v=$t(ce(f.lastIndex+(Bt?0:d)),c.length))===h)d=Ot(c,d,l);else{if(g.push(c.slice(h,d)),g.length===p)return g;for(var y=1;y<=b.length-1;y++)if(g.push(b[y]),g.length===p)return g;d=h=v}}return g.push(c.slice(h)),g}]}),!Bt);var qt={cookieIds:{sortOrder:"bs.table.sortOrder",sortName:"bs.table.sortName",pageNumber:"bs.table.pageNumber",pageList:"bs.table.pageList",columns:"bs.table.columns",searchText:"bs.table.searchText",filterControl:"bs.table.filterControl",filterBy:"bs.table.filterBy"},getCurrentHeader:function(e){var t=e.$header;return e.options.height&&(t=e.$tableHeader),t},getCurrentSearchControls:function(e){var t="select, input";return e.options.height&&(t="table select, table input"),t},cookieEnabled:function(){return!!navigator.cookieEnabled},inArrayCookiesEnabled:function(e,t){for(var o=-1,n=0;n<t.length;n++)if(e.toLowerCase()===t[n].toLowerCase()){o=n;break}return o},setCookie:function(e,t,o){if(e.options.cookie&&qt.cookieEnabled()&&""!==e.options.cookieIdTable&&-1!==qt.inArrayCookiesEnabled(t,e.options.cookiesEnabled)){switch(t="".concat(e.options.cookieIdTable,".").concat(t),e.options.cookieStorage){case"cookieStorage":document.cookie=[t,"=",encodeURIComponent(o),"; expires=".concat(qt.calculateExpiration(e.options.cookieExpire)),e.options.cookiePath?"; path=".concat(e.options.cookiePath):"",e.options.cookieDomain?"; domain=".concat(e.options.cookieDomain):"",e.options.cookieSecure?"; secure":""].join("");break;case"localStorage":localStorage.setItem(t,o);break;case"sessionStorage":sessionStorage.setItem(t,o);break;default:return!1}return!0}},getCookie:function(e,t,o){if(!o)return null;if(-1===qt.inArrayCookiesEnabled(o,e.options.cookiesEnabled))return null;switch(o="".concat(t,".").concat(o),e.options.cookieStorage){case"cookieStorage":var n="; ".concat(document.cookie).split("; ".concat(o,"="));return 2===n.length?decodeURIComponent(n.pop().split(";").shift()):null;case"localStorage":return localStorage.getItem(o);case"sessionStorage":return sessionStorage.getItem(o);default:return null}},deleteCookie:function(e,t,o){switch(o="".concat(t,".").concat(o),e.options.cookieStorage){case"cookieStorage":document.cookie=[encodeURIComponent(o),"=","; expires=Thu, 01 Jan 1970 00:00:00 GMT",e.options.cookiePath?"; path=".concat(e.options.cookiePath):"",e.options.cookieDomain?"; domain=".concat(e.options.cookieDomain):""].join("");break;case"localStorage":localStorage.removeItem(o);break;case"sessionStorage":sessionStorage.removeItem(o);break;default:return!1}return!0},calculateExpiration:function(e){var t=e.replace(/[0-9]*/,"");switch(e=e.replace(/[A-Za-z]{1,2}/,""),t.toLowerCase()){case"s":e=+e;break;case"mi":e*=60;break;case"h":e=60*e*60;break;case"d":e=24*e*60*60;break;case"m":e=30*e*24*60*60;break;case"y":e=365*e*24*60*60;break;default:e=void 0}if(!e)return"";var o=new Date;return o.setTime(o.getTime()+1e3*e),o.toGMTString()},initCookieFilters:function(t){setTimeout((function(){var o=JSON.parse(qt.getCookie(t,t.options.cookieIdTable,qt.cookieIds.filterControl));if(!t.options.filterControlValuesLoaded&&o){var n={},r=qt.getCurrentHeader(t),i=qt.getCurrentSearchControls(t);r.find(i).each((function(){var t=e(this).closest("[data-field]").data("field");!function(t,o){e(o).each((function(o,r){""!==r.text&&(e(t).val(r.text),n[r.field]=r.text)}))}(this,o.filter((function(e){return e.field===t})))})),t.initColumnSearch(n),t.options.filterControlValuesLoaded=!0,t.initServer()}}),250)}};e.extend(e.fn.bootstrapTable.defaults,{cookie:!1,cookieExpire:"2h",cookiePath:null,cookieDomain:null,cookieSecure:null,cookieIdTable:"",cookiesEnabled:["bs.table.sortOrder","bs.table.sortName","bs.table.pageNumber","bs.table.pageList","bs.table.columns","bs.table.searchText","bs.table.filterControl","bs.table.filterBy"],cookieStorage:"cookieStorage",filterControls:[],filterControlValuesLoaded:!1}),e.fn.bootstrapTable.methods.push("getCookies"),e.fn.bootstrapTable.methods.push("deleteCookie"),e.extend(e.fn.bootstrapTable.utils,{setCookie:qt.setCookie,getCookie:qt.getCookie}),e.BootstrapTable=function(t){function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),zt(this,Ft(o).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jt(e,t)}(o,t),n=o,(r=[{key:"init",value:function(){var e=JSON.parse(qt.getCookie(this,this.options.cookieIdTable,qt.cookieIds.filterBy));if(this.filterColumns=e||{},this.options.filterControls=[],this.options.filterControlValuesLoaded=!1,this.options.cookiesEnabled="string"==typeof this.options.cookiesEnabled?this.options.cookiesEnabled.replace("[","").replace("]","").replace(/ /g,"").toLowerCase().split(","):this.options.cookiesEnabled,this.options.filterControl){var t=this;this.$el.on("column-search.bs.table",(function(e,o,n){for(var r=!0,i=0;i<t.options.filterControls.length;i++)if(t.options.filterControls[i].field===o){t.options.filterControls[i].text=n,r=!1;break}r&&t.options.filterControls.push({field:o,text:n}),qt.setCookie(t,qt.cookieIds.filterControl,JSON.stringify(t.options.filterControls))})).on("created-controls.bs.table",qt.initCookieFilters(t))}Vt(Ft(o.prototype),"init",this).call(this)}},{key:"initServer",value:function(){var e;if(this.options.cookie&&this.options.filterControl&&!this.options.filterControlValuesLoaded){var t=JSON.parse(qt.getCookie(this,this.options.cookieIdTable,qt.cookieIds.filterControl));if(t)return}for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];(e=Vt(Ft(o.prototype),"initServer",this)).call.apply(e,[this].concat(r))}},{key:"initTable",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=Vt(Ft(o.prototype),"initTable",this)).call.apply(e,[this].concat(n)),this.initCookie()}},{key:"onSort",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=Vt(Ft(o.prototype),"onSort",this)).call.apply(e,[this].concat(n)),qt.setCookie(this,qt.cookieIds.sortOrder,this.options.sortOrder),qt.setCookie(this,qt.cookieIds.sortName,this.options.sortName)}},{key:"onPageNumber",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=Vt(Ft(o.prototype),"onPageNumber",this)).call.apply(e,[this].concat(n)),qt.setCookie(this,qt.cookieIds.pageNumber,this.options.pageNumber)}},{key:"onPageListChange",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=Vt(Ft(o.prototype),"onPageListChange",this)).call.apply(e,[this].concat(n)),qt.setCookie(this,qt.cookieIds.pageList,this.options.pageSize),qt.setCookie(this,qt.cookieIds.pageNumber,this.options.pageNumber)}},{key:"onPagePre",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=Vt(Ft(o.prototype),"onPagePre",this)).call.apply(e,[this].concat(n)),qt.setCookie(this,qt.cookieIds.pageNumber,this.options.pageNumber)}},{key:"onPageNext",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=Vt(Ft(o.prototype),"onPageNext",this)).call.apply(e,[this].concat(n)),qt.setCookie(this,qt.cookieIds.pageNumber,this.options.pageNumber)}},{key:"_toggleColumn",value:function(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];(t=Vt(Ft(o.prototype),"_toggleColumn",this)).call.apply(t,[this].concat(r));var a=[];e.each(this.columns,(function(e,t){t.visible&&a.push(t.field)})),qt.setCookie(this,qt.cookieIds.columns,JSON.stringify(a))}},{key:"selectPage",value:function(e){Vt(Ft(o.prototype),"selectPage",this).call(this,e),qt.setCookie(this,qt.cookieIds.pageNumber,e)}},{key:"onSearch",value:function(e){Vt(Ft(o.prototype),"onSearch",this).call(this,e),this.options.search&&qt.setCookie(this,qt.cookieIds.searchText,this.searchText),qt.setCookie(this,qt.cookieIds.pageNumber,this.options.pageNumber)}},{key:"filterBy",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=Vt(Ft(o.prototype),"filterBy",this)).call.apply(e,[this].concat(n)),qt.setCookie(this,qt.cookieIds.filterBy,JSON.stringify(this.filterColumns))}},{key:"initCookie",value:function(){if(this.options.cookie){if(""===this.options.cookieIdTable||""===this.options.cookieExpire||!qt.cookieEnabled())return console.error("Configuration error. Please review the cookieIdTable and the cookieExpire property. If the properties are correct, then this browser does not support cookies."),void(this.options.cookie=!1);var t=qt.getCookie(this,this.options.cookieIdTable,qt.cookieIds.sortOrder),o=qt.getCookie(this,this.options.cookieIdTable,qt.cookieIds.sortName),n=qt.getCookie(this,this.options.cookieIdTable,qt.cookieIds.pageNumber),r=qt.getCookie(this,this.options.cookieIdTable,qt.cookieIds.pageList),i=JSON.parse(qt.getCookie(this,this.options.cookieIdTable,qt.cookieIds.columns)),a=qt.getCookie(this,this.options.cookieIdTable,qt.cookieIds.searchText);this.options.sortOrder=t||this.options.sortOrder,this.options.sortName=o||this.options.sortName,this.options.pageNumber=n?+n:this.options.pageNumber,this.options.pageSize=r?r===this.options.formatAllRows()?r:+r:this.options.pageSize,this.options.searchText=a||"",i&&e.each(this.columns,(function(t,o){o.visible=-1!==e.inArray(o.field,i)}))}}},{key:"getCookies",value:function(){var t=this,o={};return e.each(qt.cookieIds,(function(e,n){o[e]=qt.getCookie(t,t.options.cookieIdTable,n),"columns"===e&&(o[e]=JSON.parse(o[e]))})),o}},{key:"deleteCookie",value:function(e){""!==e&&qt.cookieEnabled()&&qt.deleteCookie(this,this.options.cookieIdTable,qt.cookieIds[e])}}])&&Dt(n.prototype,r),i&&Dt(n,i),o}(e.BootstrapTable)}));